kstenerud / Musashi

Motorola 680x0 emulator written in C
412 stars 94 forks source link

m68k_pulse_reset(), make boot PC + SSP optional #91

Open shoggoth77 opened 2 years ago

shoggoth77 commented 2 years ago

In some cases, such as when not emulating an actual system but e g providing userland emulation for 68k stuff, it may be beneficial to skip the boot PC + SSP (address 0 + address 4) sequence in m68kk_pulse_reset().

It would be neat if this could be optional (but perhaps enabled by default), e g:

ifdef M68K_RESET_PC_SSP

/* Read the initial stack pointer and program counter */
m68ki_jump(0);
REG_SP = m68ki_read_imm_32();
REG_PC = m68ki_read_imm_32();
m68ki_jump(REG_PC);

endif