Speccery / EP994A

My TI-99/4A clone, two versions: FPGA+TMS99105 CPU and FPGA with my CPU core
Other
27 stars 6 forks source link

PC is only 15 bits (ignores LSB) #6

Open greyrogue opened 5 years ago

greyrogue commented 5 years ago

Bigfoot (and possibly other games) at some point calls BL to an odd address. This needs to mask out the lowest bit and use an even address instead. Presumably, the register only stores the top 15 bits, and the least significant bit is thrown away. The hack for fixing this in MiSTer probably isn't the best way to do this: https://github.com/MiSTer-devel/TI-99_4A_MiSTer/commit/987cfff913c763d963ff14babf052cb3d53c4f43

After finding this with debugging, I did go looking for confirmation and found it in classic99: https://github.com/tursilion/classic99/blob/ebb105ee7e8cf58d1b21530b6a965d6f7f1df69a/console/cpu9900.cpp#L434

I also found an issue with using 1KB of scratchpad RAM for Congo Bongo. It writes to 0x80XX and expects them to show up in the 0x83XX range. This causes the sprites in the second level to mess up badly. Not sure if you're interested in this is an issue or not: https://github.com/MiSTer-devel/TI-99_4A_MiSTer/commit/12fce2811a950e6fe1bd57114f5e4997d14c40c4#diff-bd409b2375717f312cacabaaeed3840e Feel free to ignore this one, if you don't consider it a bug for what you're doing.