Monday, May 1, 2017

Sixer problems

Well, once again the folks at AtariAge are smart.

The usual cause of this problem is accidentally reading from a write-only register.  On many systems, this will return the address you are trying to read from, but some will give garbage.  But it's an easy mistake to miss:

lda #13 ; loads the value 13 into the accumulator
lda 13  ; loads the value at memory location 13 into the accumulator
; (which actually is a write-only register, so on some systems will accidentally load 13 into the register, but others will load garbage)

There's actually a setting in Stella (the emulator) that lets you force it to return garbage when reading from these registers, so by setting that flag, I can reproduce the problem that happens on the sixers.  And knowing what sort of typo to look for, I can probably sort this out relatively quickly.

No comments:

Batari Basic and Fixed Point

When I'm too tired/frustrated to work on my NES game, I've been playing around with ideas for another hobby project that I've he...