From f5cd4ea09ed3540ffe569cd96d8295482b10cb6f Mon Sep 17 00:00:00 2001 From: meepingsnesroms Date: Tue, 5 Jun 2018 17:02:54 -0700 Subject: [PATCH] Trap launching now works. Trap launching works, but I launched that trap wrong, the error proves it was called though. With this the emulator has surpassed PersianTree, my old Palm OS emulator using only 1/8 the code, starting over to use the OS APIs has paid off finally. --- src/emulator.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/emulator.c b/src/emulator.c index 1d17b28..fe574e1 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -281,23 +281,12 @@ uint32_t callTrap(bool fallthrough, const char* name, const char* prototype, ... callWriteOut += 2; //end execution with CMD_EXECUTION_DONE - m68k_write_memory_16(callWriteOut, 0x23F9);//move.l imm imm opcode + m68k_write_memory_16(callWriteOut, 0x23FC);//move.l data imm to address at imm2 opcode callWriteOut += 2; m68k_write_memory_32(callWriteOut, MAKE_EMU_CMD(CMD_EXECUTION_DONE)); callWriteOut += 4; m68k_write_memory_32(callWriteOut, EMU_REG_ADDR(EMU_CMD)); callWriteOut += 4; - //23cf 00000000 - /* - m68k_write_memory_16(callWriteOut, 0x239F);//move.l imm to SP opcode - callWriteOut += 2; - m68k_write_memory_32(callWriteOut, EMU_REG_ADDR(EMU_CMD)); - callWriteOut += 4; - m68k_write_memory_16(callWriteOut, 0x2EB9);//move.l imm to address in SP opcode - callWriteOut += 2; - m68k_write_memory_32(callWriteOut, MAKE_EMU_CMD(CMD_EXECUTION_DONE)); - callWriteOut += 4; - */ executionFinished = false; m68k_set_reg(M68K_REG_SP, stackAddr);