tomm / fab-agon-emulator

Agon Light, Agon Light 2, Agon Console8 Emulator for Linux, Windows, any system with libSDL
GNU General Public License v3.0
87 stars 19 forks source link

Possible cpu emulation bug #47

Closed leuat closed 8 months ago

leuat commented 8 months ago

Hi there

I'm having serous trouble getting TRSE-compiled programs to work for the agon, and came to the realization that there might be an error in the emulator - this stuff works on other emulators (such as caprice 32 etc for the amstrad, gameboy etc)

ld d,0 ld e,1 add hl,de <- ooops! "de" is definitely not "01" when running in the emulator

however ld de,01 add hl,de <- works just fine

similarly, ld a,1 ld e,a ld d,0 <- de is still not "01"...

leuat commented 8 months ago

ah sorry this might be because de is a 24-bit number, and I'm not clearing the high byte here...