|
Internet Janitor posted:I'm working on something more elaborate, but I just whipped up a rough version of an idea discussed on IRC- a minimalist pipe-dream clone that runs in basic chip-8 at a stock clock speed: Did you ever get a chance to think about this more? It looked like it had potential.
|
# ? Apr 22, 2017 15:48 |
|
|
# ? May 10, 2024 01:55 |
|
TomR posted:Did you ever get a chance to think about this more? It looked like it had potential. In other news, we're only a month and a half away from yet another Octojam, so I decided to spend a little time giving this project some love. Octo programmers everywhere, rejoice- I have added macros! quote:Sometimes your code will contain repetitive patterns that don't make sense to break out into subroutines. Perhaps they differ by the registers they operate upon, or for performance reasons you need to avoid the overhead of a call and a return. The :macro command is the solution. It takes a name, followed by names for 0 or more arguments, then a {, a sequence of arbitrary Octo statements and finally a terminal }. When you reference the name of a macro, you must provide tokens corresponding to each argument, and then Octo will inline the contents of the macro with any instances of the argument names substituted by the input tokens. Here's a trivial use and definition example: See the commit here to see some old example programs I have simplified using this feature. I have a few more ideas for refining this new functionality, and I'd love to hear feedback.
|
# ? Aug 12, 2017 17:54 |
|
lookin good http://johnearnest.github.io/Octo/index.html?gist=3d9cf05648af4aa6f8fa1d0f97d77d71
|
# ? Aug 13, 2017 19:58 |
|
Dr. Stab posted:lookin good That's... not quite what I had in mind when I designed the feature, but I suppose it demonstrates the flexibility of the mechanism. I have also added another feature which is frequently demanded and relatively common (in some form or another) in assemblers: compile-time calculations. These can be handy in all sorts of places where there's a relationship between constants in your program. Expressing these relationships in code is much easier and less error-prone than leaving them up to the programmer to do by hand. Using :calc in combination with :macro permits some fun and exotic programming techniques: code:
|
# ? Aug 14, 2017 02:35 |
|
Nice IJ. I immediately wondered how the macro system would handle use of labels inside the macro. It works but I had to pass in a unique label so I could instantiate the macro more than once. Would you be interested in a PR that adds a unique counter to the end of labels inside macros that are used more than once?code:
taqueso fucked around with this message at 17:32 on Aug 14, 2017 |
# ? Aug 14, 2017 17:24 |
|
taqueso posted:Would you be interested in a PR that adds a unique counter to the end of labels inside macros that are used more than once? I'd hold off for now. I've been thinking about this kind of use case, and I'm not quite sure how I want to proceed with it. I don't want to add things hastily, so I'd like to spend some time working with macros as they currently exist. Passing in "nonce" labels as arguments to macros is a reasonable workaround for the time being.
|
# ? Aug 14, 2017 22:34 |
|
Is it possible to concatenate two tokens?
|
# ? Sep 5, 2017 14:22 |
|
I just realized that I'll be traveling in Asia for over two weeks in October, which means I'll miss most of Octojam I'll still probably participate, but will probably end up with something more limited this year. Spent quite a lot of time on Binding of Cosmac last year...
|
# ? Sep 18, 2017 20:43 |
|
It's all good, you can Octojam from anywhere in the world that has internet.
|
# ? Sep 19, 2017 19:02 |
|
taqueso posted:Is it possible to concatenate two tokens? I've been thinking about this. Might be worth adding a :suffix for such a purpose. In other news, the Octojam IV page is together: http://www.awfuljams.com/octojam-iv
|
# ? Sep 23, 2017 23:35 |
|
Greetings fellow Octonauts! With Octojam 4 just around the corner, I feel now is a good time to post this as I'll be on holiday! After last year's implausibly successful SuperChip ShowCase, the HP48 calculator will be returning to run your SCHIP and computationally demanding CHIP8 games on real hardware. This year, our range of calculators has expanded from 1 to 2, now including the mighty HP48-GX, which packs twice the CPU power of the HP48-S calculator we used last year. This increase in power is held back a little by sharing the same RAM frequency, but still translates to around a 50% boost in speed in the SCHIP interpreter on the G series calculators, the details of which can be found here, however the crux of it is as follows: As you may know, unlike in Octo, on both the COSMAC VIP and the HP48 SCHIP platforms, some instructions just take longer than others. The worst offender that you're likely to be doing a lot of in a main loop is the sprite command. The more weighted towards or away from graphics your game is, the slower or faster you can expect it to run. Here is an advisory as to the speeds you might want to set Octo on to get an idea of how things will run on the GX calculator (You may need to provide a custom GIST)
As before, I have all the period interpreters that will run programs as per the relevant quirks modes Octo has (and other issues) as well as SCHPC, which more closely mirros the COSMAC, and thus Octo's quirkless behavior which should be able to run anything if the quirks are getting you down. If you have any questions and hope to make a game that will run on hardware, I'm on the SA GameDev Discord and IRC, and am always happy to answer questions or offer any help, about SCHIP or anything CHIP8 related really. I've made quite a lot of notes on the oddities of SCHIP, and compiled them here and the full list of key notes can be found in my post from last year here, the most germane of which are reproduced (and augmented) here: Superchip 1.1 expresses the following quirks:
|
# ? Sep 25, 2017 06:40 |
|
Internet Janitor posted:I've been thinking about this. Might be worth adding a :suffix for such a purpose. An example of concatenation being useful: I have been making some macros for 16-bit math, and I would really like to be able to use MACRO_ADD_U16 v01 v23 and have it turn v01 (etc) into v01-hi and v01-lo, which I would define as aliases for v0 and v1. Currently, I invoke the macro as MACRO_ADD_U16 v0 v1 v2 v3 which works but is more cumbersome and error prone. I tried making a macro that defined v01 as { v0 v1 }, but octo doesn't seem to like to expand macros that are parameters. Another thing I've been wishing for is a way to conditionally compile, something like :if { expression-evaluating-to-zero-or-nonzero } { <octo commands here> }. I have some macros I want to disable when not debugging, so I make two definitions, one with an empty body, and only define the one I want. It would be nice if that could happen to a bunch of macros with a single :const change.
|
# ? Sep 25, 2017 18:11 |
|
It's October
|
# ? Oct 1, 2017 07:30 |
|
I made a little spaceship http://johnearnest.github.io/Octo/index.html?gist=6be5db905087c99cca632e40575dc4f8
|
# ? Oct 4, 2017 00:52 |
|
Octojam livestream is happening now: http://twitch.tv/awfuljams
|
# ? Nov 11, 2017 02:32 |
|
|
# ? May 10, 2024 01:55 |
Almost missed Octojam again! Just played the games and then watched the stream. My top 3 were probably Kesha Was NIIInja (great return to form!), Sub-Terr8nia, and octoroads. Honorable mentions to H8 and Tetris. If any of the contributors of Octojam IV happen upon this: Great stuff this year! Thanks!
|
|
# ? Nov 14, 2017 04:11 |