1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-12-13 01:29:57 +00:00

Emulate zero page wrap for zp,x addressing.

This commit is contained in:
Radosław Kujawa 2018-03-28 13:46:06 +02:00
parent 0b2be69481
commit 260ac09c01

View File

@ -283,8 +283,7 @@ instruction_data_write_1(rk65c02emu_t *e, instrdef_t *id, instruction_t *i, uint
bus_write_1(e->bus, i->op1, val);
break;
case ZPX:
/* XXX: wraps around zero page? */
bus_write_1(e->bus, i->op1 + e->regs.X, val);
bus_write_1(e->bus, (uint8_t) (i->op1 + e->regs.X), val);
break;
case ZPY:
bus_write_1(e->bus, i->op1 + e->regs.Y, val);