unsigned int m68k_read_memory_32(unsigned int address);
/* Read data immediately following the PC */
-unsigned int m68k_read_immediate_16(unsigned int address);
-unsigned int m68k_read_immediate_32(unsigned int address);
+unsigned int m68k_read_immediate_16(struct m68ki_cpu_core *state, unsigned int address);
+unsigned int m68k_read_immediate_32(struct m68ki_cpu_core *state, unsigned int address);
/* Read data relative to the PC */
-unsigned int m68k_read_pcrelative_8(unsigned int address);
-unsigned int m68k_read_pcrelative_16(unsigned int address);
-unsigned int m68k_read_pcrelative_32(unsigned int address);
+unsigned int m68k_read_pcrelative_8(struct m68ki_cpu_core *state, unsigned int address);
+unsigned int m68k_read_pcrelative_16(struct m68ki_cpu_core *state, unsigned int address);
+unsigned int m68k_read_pcrelative_32(struct m68ki_cpu_core *state, unsigned int address);
/* Memory access for the disassembler */
unsigned int m68k_read_disassembler_8 (unsigned int address);
/* PiStorm speed hax */
void m68k_add_ram_range(uint32_t addr, uint32_t upper, unsigned char *ptr);
void m68k_add_rom_range(uint32_t addr, uint32_t upper, unsigned char *ptr);
+void m68k_remove_range(unsigned char *ptr);
void m68k_clear_ranges();
/* Special call to simulate undocumented 68k behavior when move.l with a
* Currently supported types are: M68K_CPU_TYPE_68000, M68K_CPU_TYPE_68010,
* M68K_CPU_TYPE_EC020, and M68K_CPU_TYPE_68020.
*/
-void m68k_set_cpu_type(unsigned int cpu_type);
+void m68k_set_cpu_type(struct m68ki_cpu_core *state, unsigned int cpu_type);
/* Do whatever initialisations the core requires. Should be called
* at least once at init time.
/* Trigger a bus error exception */
-void m68k_pulse_bus_error(void);
+void m68k_pulse_bus_error(struct m68ki_cpu_core *state);
/* Context switching to allow multiple CPUs */
unsigned int m68k_get_reg(void* context, m68k_register_t reg);
/* Poke values into the internals of the currently running CPU context */
-void m68k_set_reg(m68k_register_t reg, unsigned int value);
+void m68k_set_reg(void *context, m68k_register_t regnum, unsigned int value);
/* Check if an instruction is valid for the specified CPU type */
unsigned int m68k_is_valid_instruction(unsigned int instruction, unsigned int cpu_type);