1
0
mirror of https://github.com/specht/champ.git synced 2024-11-26 01:49:20 +00:00

fixed a nasty bug (THE BUG)

This commit is contained in:
Michael Specht 2018-02-15 22:22:09 +01:00
parent 95cf3207d4
commit e2d99bcca0

View File

@ -604,10 +604,10 @@ void handle_next_opcode()
target_address = read16(rpc8()); target_address = read16(rpc8());
break; break;
case zero_page_x: case zero_page_x:
target_address = (rpc8() + cpu.x) % 0xff; target_address = (rpc8() + cpu.x) & 0xff;
break; break;
case zero_page_y: case zero_page_y:
target_address = (rpc8() + cpu.y) % 0xff; target_address = (rpc8() + cpu.y) & 0xff;
break; break;
case absolute_x: case absolute_x:
target_address = rpc16(); target_address = rpc16();