Vexed for Atari 5200


When I released the Atari 5200 version of Vexed, it worked fine on the two emulators I was using: Atari800 and Mame. I don't have actual hardware for these systems, so I have to rely on the emulators. Unfortunately emulators aren't always perfect, and in this case Vexed for Atari 5200 didn't actually work on real hardware.

On starting, the level was set to 121 (of a max of 59), and level shown on start was full of letters instead of blocks.

The issue was the code assumed the memory had been cleared to 0, which unfortunately the emulators helpfully did for me. On real hardware, this didn't happen. Part of the problem is my initialisation code (called crt0) doesn't support presetting global variables. In lieu of this, I rely on the code being set to 0. The end result was the initial stage was set to a random and invalid stage number, starting the game past the valid maximum level. So it was getting random data for the stage layout.

After this, the analog thresholds for moving the cursor were a little low (again with feedback from RB5200). I also had to implement hysteresis, so once the joystick was past the movement threshold, the joystick had to be moved back a little further back to turn it off again. This stops the joystick from triggering when sitting on the threshold, giving double movements when moving the joystick.

I fixed these problems, and it worked on real hardware, helpfully tested by RB5200.

Unfortunately, it didn't work on the popular Altirra emulator. Many people will try it on this first and when it didn't work, assumed it wouldn't work on real hardware. So it was important to get it working on the Altirra emulator as well.

It appeared to hang on Altirra. It actually didn't hang, but it wasn't able to read the joystick inputs. For Altira, I had to wait for the ALLPOT register to be set to zero before reading the joystick inputs. The SKCTL register also had to be initialised with 2 to enable reading the buttons.

Altirra also doesn't reset the sprite data, so shows blocks on the bottom on the screen, looking like the screen was being corrupted. I cleared all the sprite data on start as well.

The start/pause and reset buttons weren't working (on both real hardware and Altirra). I had SKCTL set to 3, which enables the keyboard debounce on the Atari 800. The debounce must be disabled (thus SKCTL set to 2) for the Atari 5200 for these extra buttons to work.

Files

Vexed-1.15.zip 376 kB
Apr 18, 2024

Get Vexed

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.