Posted October 25, 2019 by Tobias V. I. Langhoff
#bugfix
Just a couple of bugfixes today!
Octo had a bug where web exports would not run in certain browsers (including Chrome) if third-party cookies were disabled, because of how it retrieved emulation settings from the Octo interpreter. This was fixed, so I re-exported for web, and it should work fine now. Details here.
The game had a bug: When you try to toggle an unlit button (which is not allowed), it would simply jump back to the start of the game loop. Since the code that tries to toggle a light was a subroutine, which returns after a successful toggle to continue the game loop where it left off, this meant that trying to press unlit buttons would cause the stack to grow. Since the COSMAC VIP's CHIP-8 call stack only holds 12 addresses, this was a problem!
I changed it so that the code that toggles is no longer a subroutine, and it just jumps back in the middle of the game loop if toggling fails. It was only called that one place, so I'm not sure why it was a subroutine to begin with. Luckily it was an easy fix. To patch the original ROM:
I got the word out to the editors of VIPER before the issue was printed, so please find attached a new scanned copy of the "manual" for the game which has the correct code listing.