mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-12-12 10:30:23 +00:00
Add STA, STY, STX emulation.
This commit is contained in:
parent
ee8a16a5ba
commit
f9708ca049
@ -128,35 +128,35 @@ OP_ADC_ABSX,"adc",ABSOLUTEX,3,NULL
|
|||||||
OP_ROR_ABSX,"ror",ABSOLUTEX,3,NULL
|
OP_ROR_ABSX,"ror",ABSOLUTEX,3,NULL
|
||||||
OP_BBR7_REL,"bbr7",ZPR,2,NULL
|
OP_BBR7_REL,"bbr7",ZPR,2,NULL
|
||||||
OP_BRA_REL,"bra",RELATIVE,2,NULL
|
OP_BRA_REL,"bra",RELATIVE,2,NULL
|
||||||
OP_STA_IZPX,"sta",IZPX,2,NULL
|
OP_STA_IZPX,"sta",IZPX,2,emul_sta
|
||||||
OP_NOPI_83,"nop",IMMEDIATE,2,NULL
|
OP_NOPI_83,"nop",IMMEDIATE,2,NULL
|
||||||
OP_NOPI_84,"nop",IMPLIED,1,NULL
|
OP_NOPI_84,"nop",IMPLIED,1,NULL
|
||||||
OP_STY_ZP,"sty",ZP,2,NULL
|
OP_STY_ZP,"sty",ZP,2,emul_sty
|
||||||
OP_STA_ZP,"sta",ZP,2,NULL
|
OP_STA_ZP,"sta",ZP,2,emul_sta
|
||||||
OP_STX_ZP,"stx",ZP,2,NULL
|
OP_STX_ZP,"stx",ZP,2,emul_stx
|
||||||
OP_SMB0_ZP,"smb0",ZP,2,NULL
|
OP_SMB0_ZP,"smb0",ZP,2,NULL
|
||||||
OP_DEY,"dey",IMPLIED,1,emul_dey
|
OP_DEY,"dey",IMPLIED,1,emul_dey
|
||||||
OP_BIT_IMM,"bit",IMMEDIATE,2,NULL
|
OP_BIT_IMM,"bit",IMMEDIATE,2,NULL
|
||||||
OP_TXA,"txa",IMPLIED,1,emul_txa
|
OP_TXA,"txa",IMPLIED,1,emul_txa
|
||||||
OP_NOPI_8C,"nop",IMPLIED,1,NULL
|
OP_NOPI_8C,"nop",IMPLIED,1,NULL
|
||||||
OP_STY_ABS,"sty",ABSOLUTE,3,NULL
|
OP_STY_ABS,"sty",ABSOLUTE,3,emul_sty
|
||||||
OP_STA_ABS,"sta",ABSOLUTE,3,NULL
|
OP_STA_ABS,"sta",ABSOLUTE,3,emul_sta
|
||||||
OP_STX_ABS,"stx",ABSOLUTE,3,NULL
|
OP_STX_ABS,"stx",ABSOLUTE,3,emul_stx
|
||||||
OP_BBS0_REL,"bbs0",ZPR,2,NULL
|
OP_BBS0_REL,"bbs0",ZPR,2,NULL
|
||||||
OP_BCC_REL,"bcc",RELATIVE,2,NULL
|
OP_BCC_REL,"bcc",RELATIVE,2,NULL
|
||||||
OP_STA_IZPY,"sta",IZPY,2,NULL
|
OP_STA_IZPY,"sta",IZPY,2,emul_sta
|
||||||
OP_STA_IZP,"sta",IZP,2,NULL
|
OP_STA_IZP,"sta",IZP,2,emul_sta
|
||||||
OP_NOPI_94,"nop",IMPLIED,1,NULL
|
OP_NOPI_94,"nop",IMPLIED,1,NULL
|
||||||
OP_STY_ZPX,"sty",ZPX,2,NULL
|
OP_STY_ZPX,"sty",ZPX,2,emul_sty
|
||||||
OP_STA_ZPX,"sta",ZPX,2,NULL
|
OP_STA_ZPX,"sta",ZPX,2,emul_sta
|
||||||
OP_STX_ZPY,"stx",ZPY,2,NULL
|
OP_STX_ZPY,"stx",ZPY,2,emul_stx
|
||||||
OP_SMB1_ZP,"smb1",ZP,2,NULL
|
OP_SMB1_ZP,"smb1",ZP,2,NULL
|
||||||
OP_TYA,"tya",IMPLIED,1,emul_tya
|
OP_TYA,"tya",IMPLIED,1,emul_tya
|
||||||
OP_STA_ABSY,"sta",ABSOLUTEY,3,NULL
|
OP_STA_ABSY,"sta",ABSOLUTEY,3,emul_sta
|
||||||
OP_TXS,"txs",IMPLIED,1,emul_txs
|
OP_TXS,"txs",IMPLIED,1,emul_txs
|
||||||
OP_NOPI_9C,"nop",IMPLIED,1,NULL
|
OP_NOPI_9C,"nop",IMPLIED,1,NULL
|
||||||
OP_STZ_ABS,"stz",ABSOLUTE,3,emul_stz
|
OP_STZ_ABS,"stz",ABSOLUTE,3,emul_stz
|
||||||
OP_STA_ABSX,"sta",ABSOLUTEX,3,NULL
|
OP_STA_ABSX,"sta",ABSOLUTEX,3,emul_sta
|
||||||
OP_STZ_ABSX,"stz",ABSOLUTEX,3,emul_stz
|
OP_STZ_ABSX,"stz",ABSOLUTEX,3,emul_stz
|
||||||
OP_BBS1_REL,"bbs1",ZPR,2,NULL
|
OP_BBS1_REL,"bbs1",ZPR,2,NULL
|
||||||
OP_LDY_IMM,"ldy",IMMEDIATE,2,emul_ldy
|
OP_LDY_IMM,"ldy",IMMEDIATE,2,emul_ldy
|
||||||
|
|
@ -160,6 +160,27 @@ emul_stp(rk65c02emu_t *e, void *id, instruction_t *i)
|
|||||||
e->state = STOPPED;
|
e->state = STOPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* STA - store accumulator */
|
||||||
|
void
|
||||||
|
emul_sta(rk65c02emu_t *e, void *id, instruction_t *i)
|
||||||
|
{
|
||||||
|
instruction_data_write_1(e, id, i, e->regs.A);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* STX - store X */
|
||||||
|
void
|
||||||
|
emul_stx(rk65c02emu_t *e, void *id, instruction_t *i)
|
||||||
|
{
|
||||||
|
instruction_data_write_1(e, id, i, e->regs.X);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* STY - store Y */
|
||||||
|
void
|
||||||
|
emul_sty(rk65c02emu_t *e, void *id, instruction_t *i)
|
||||||
|
{
|
||||||
|
instruction_data_write_1(e, id, i, e->regs.Y);
|
||||||
|
}
|
||||||
|
|
||||||
/* STZ - store zero */
|
/* STZ - store zero */
|
||||||
void
|
void
|
||||||
emul_stz(rk65c02emu_t *e, void *id, instruction_t *i)
|
emul_stz(rk65c02emu_t *e, void *id, instruction_t *i)
|
||||||
|
Loading…
Reference in New Issue
Block a user