CPU fixes from tracing against AppleWin

- All regs are 0xFF on reboot
    - Stack pointer is 0xFC on reboot
    - Flags are set accordingly
    - Fix op_JMP_ind tracing display
This commit is contained in:
Aaron Culliney 2014-11-18 22:27:25 -08:00
parent 9bbe906f43
commit e6ca42be64

View File

@ -1249,10 +1249,7 @@ E(op_JMP_abs)
Continue Continue
E(op_JMP_ind) // 0x6c E(op_JMP_ind) // 0x6c
GetFromPC_B GetFromPC_W
xchgb %al, %ah
GetFromPC_B
xchgb %al, %ah
cmpb $0xFF, %al cmpb $0xFF, %al
je jmp_special je jmp_special
GetFromMem_W(_XAX) GetFromMem_W(_XAX)
@ -2252,10 +2249,14 @@ E(cpu65_run)
// Zero all used registers // Zero all used registers
xorLQ _XAX, _XAX xorLQ _XAX, _XAX
xorLQ XY_Reg_X, XY_Reg_X xorLQ XY_Reg_X, XY_Reg_X
movb $0xFF, X_Reg
movb $0xFF, Y_Reg
xorLQ AF_Reg_X, AF_Reg_X xorLQ AF_Reg_X, AF_Reg_X
movb $0xFF, A_Reg
orb $(C_Flag|X_Flag|I_Flag|V_Flag|B_Flag|Z_Flag|N_Flag), F_Reg
xorLQ PC_Reg_X, PC_Reg_X xorLQ PC_Reg_X, PC_Reg_X
xorLQ EffectiveAddr_X, EffectiveAddr_X xorLQ EffectiveAddr_X, EffectiveAddr_X
movLQ $0x1FF, SP_Reg_X movLQ $0x1FC, SP_Reg_X
jmp ex_reset jmp ex_reset
exit_cpu65_run: exit_cpu65_run: