The Octo IDE discussed here looks awesome. One of the problems that I had with CHIP-8 implementations in the past is that my games would run differently on all of them.
It's a fantastic educational project, as well as a fun way for more experienced programmers to scratch the "low-level coding" itch. I've used older versions of Octo with after-school groups, and I was pleasantly surprised to discover that other educators have made use of it in their own curricula[0].
There's a colorful history to how and why a number of mutual incompatibilities crept into CHIP-8 specs and programs over the decades. In addition to a range of "quirks mode" flags to adapt to differences in behavior, Octo recently gained a tracing linter (Toolbox -> Binary Tools -> Linter Mode) which can flag the use of features which differ between VIP CHIP-8 and SCHIP.
Yep! A number of people had asked for a vim mode over the years.
You can also use Octo's assembler from the commandline if you wish, although you will need to pair it with a separate emulator for that workflow. Tom Swan has a high-quality emulator suitable for this purpose, for example[0].
The Octo github page links[1] third-party syntax highlighting modes for a wide variety of external text editors. The Sublime mode is the most actively-maintained; if anyone likes using Vim, Emacs, Atom, or so on, you could help out by sprucing up any that are out of date.
I used to do this thing on my HP48 where I would switch between two GROBs rapidly and the slow screen would give me white, gray, and black. Any of the chip8 emulators support that?
To my knowledge, a handful of emulators have attempted to recreate the HP-48's slow display, but I'm not aware of any surviving CHIP8/SCHIP programs that try to take advantage of this behavior to produce grayscale. XO-CHIP bitplanes are indeed somewhat similar to alternating framebuffers, as you describe, from a programming standpoint.
Looks like a fun side project. In a similar vein, I'd also recommend the Synacor Challenge, which involves a set of gradually expanding challenges around implementing a virtual machine: https://challenge.synacor.com/
Hey Rodger, Octo inspired me to write my own chip-8 emulator and B-like compiler a number of years ago. It was probably my favorite learning experience of all time
Shortly before the pandemic turned everything upside-down I quit my job and moved across the country to focus on my creative projects. Pet chickens are much closer on the horizon now. :)
I'm not sure when I'll be in the right headspace to work on comics again, but I do have plenty of ideas.
Can someone explain how the variable i works in the home page's sample source code?
: main
i := ball
loop
sprite v0 v1 7
v0 += 3
v1 += 5
again
: ball
0x38 0x74 0xFA 0xFE 0xFE 0x7C 0x38
I understand v0 and v1 -- makes sense they're initialized to zero, and the language must not require declarations -- but i is a mystery. ball is assigned to it, but then nobody refers to it again.
I believe i is a register that in this case points to the location of the sprite data used by the sprite command. In this case the data represents the pixels of the ball.
They're not variables, they're CHIP8 registers. The I register is used to hold memory locations; in particular, the operation that displays a sprite reads sprite data from the memory address in I.
Almost none of these games work correctly in the CHIP-8 emulator for Sony Vita. Of the 12 or so that I've tried, it's only the jam title games that seem to perform the way they're supposed to :(
Sounds like an opportunity to give the emulator you're using a touchup!
The most common problem is disagreement over the semantics of the shift instructions and how load/store treat the index register "i". In a nutshell, SCHIP on the HP-48 got these wrong, and so modern programs are a mix of depending on VIP-style CHIP-8 semantics or SCHIP-style semantics. If an interpreter is based on reference information derived from "Cowgod's reference", it likely contains the mistakes introduced in SCHIP.
Out of the box, Octo behaves mostly like the original CHIP-8, but you can configure it to work more like SCHIP. With care it's possible to write programs that run correctly on both; see the linter I mentioned elsewhere in this discussion.
23 comments
[ 0.26 ms ] story [ 60.9 ms ] threadThe Octo IDE discussed here looks awesome. One of the problems that I had with CHIP-8 implementations in the past is that my games would run differently on all of them.
There's a colorful history to how and why a number of mutual incompatibilities crept into CHIP-8 specs and programs over the decades. In addition to a range of "quirks mode" flags to adapt to differences in behavior, Octo recently gained a tracing linter (Toolbox -> Binary Tools -> Linter Mode) which can flag the use of features which differ between VIP CHIP-8 and SCHIP.
[0]https://www.researchgate.net/publication/338558857_Aplicacio...
You can also use Octo's assembler from the commandline if you wish, although you will need to pair it with a separate emulator for that workflow. Tom Swan has a high-quality emulator suitable for this purpose, for example[0].
The Octo github page links[1] third-party syntax highlighting modes for a wide variety of external text editors. The Sublime mode is the most actively-maintained; if anyone likes using Vim, Emacs, Atom, or so on, you could help out by sprucing up any that are out of date.
[0] https://github.com/TomSwan/mychip8
[1] https://github.com/JohnEarnest/Octo#links
I used to do this thing on my HP48 where I would switch between two GROBs rapidly and the slow screen would give me white, gray, and black. Any of the chip8 emulators support that?
https://github.com/JohnEarnest/Octo/blob/gh-pages/docs/XO-Ch...
https://johnearnest.github.io/chip8Archive/
Games are categorized as being CHIP-8, SCHIP, or XO-CHIP, include any necessary quirks-mode settings, and often come with source code.
I'm not sure when I'll be in the right headspace to work on comics again, but I do have plenty of ideas.
Check out this reference: http://devernay.free.fr/hacks/chip8/C8TECH10.HTM
https://massung.github.io/CHIP-8/
I blame the Vita interpreter, myself.
The most common problem is disagreement over the semantics of the shift instructions and how load/store treat the index register "i". In a nutshell, SCHIP on the HP-48 got these wrong, and so modern programs are a mix of depending on VIP-style CHIP-8 semantics or SCHIP-style semantics. If an interpreter is based on reference information derived from "Cowgod's reference", it likely contains the mistakes introduced in SCHIP.
Out of the box, Octo behaves mostly like the original CHIP-8, but you can configure it to work more like SCHIP. With care it's possible to write programs that run correctly on both; see the linter I mentioned elsewhere in this discussion.