From ec4eed4f35910aa27ca353fceea38155806ef188 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 1 Jan 2015 14:36:55 -0800 Subject: Remove some of the hard coded assumptions about the memory map from the CPU cores --- m68k_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'm68k_core.h') diff --git a/m68k_core.h b/m68k_core.h index 370aa1e..31ca320 100644 --- a/m68k_core.h +++ b/m68k_core.h @@ -59,7 +59,7 @@ typedef struct { uint16_t reserved; native_map_slot *native_code_map; - void *options; + m68k_options *options; uint8_t ram_code_flags[32/8]; void *system; } m68k_context; -- cgit v1.2.3 From 8ac1e753e1af481b2090a4c1b7395853f30b5e8f Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 3 Jan 2015 16:08:23 -0800 Subject: All cycle counters are now based off the master clock. This seems to have messed up Z80 interrupt timing (music in Sonic 2 is too slow for instance), but things are generally working --- m68k_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'm68k_core.h') diff --git a/m68k_core.h b/m68k_core.h index 31ca320..cf43864 100644 --- a/m68k_core.h +++ b/m68k_core.h @@ -67,7 +67,7 @@ typedef struct { void translate_m68k(m68k_options * opts, struct m68kinst * inst); void translate_m68k_stream(uint32_t address, m68k_context * context); void start_68k_context(m68k_context * context, uint32_t address); -void init_m68k_opts(m68k_options * opts, memmap_chunk * memmap, uint32_t num_chunks); +void init_m68k_opts(m68k_options * opts, memmap_chunk * memmap, uint32_t num_chunks, uint32_t clock_divider); void init_68k_context(m68k_context * context, native_map_slot * native_code_map, void * opts); void m68k_reset(m68k_context * context); void insert_breakpoint(m68k_context * context, uint32_t address, uint8_t * bp_handler); -- cgit v1.2.3 From f439d8688758710b74d4909e77ebce6444b8a448 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 14 Jan 2015 09:38:54 -0800 Subject: Removed hardcoded assumptions in M68K core about which parts of the memory map are RAM --- m68k_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'm68k_core.h') diff --git a/m68k_core.h b/m68k_core.h index cf43864..2635a09 100644 --- a/m68k_core.h +++ b/m68k_core.h @@ -60,15 +60,15 @@ typedef struct { native_map_slot *native_code_map; m68k_options *options; - uint8_t ram_code_flags[32/8]; void *system; + uint8_t ram_code_flags[]; } m68k_context; void translate_m68k(m68k_options * opts, struct m68kinst * inst); void translate_m68k_stream(uint32_t address, m68k_context * context); void start_68k_context(m68k_context * context, uint32_t address); void init_m68k_opts(m68k_options * opts, memmap_chunk * memmap, uint32_t num_chunks, uint32_t clock_divider); -void init_68k_context(m68k_context * context, native_map_slot * native_code_map, void * opts); +m68k_context * init_68k_context(m68k_options * opts); void m68k_reset(m68k_context * context); void insert_breakpoint(m68k_context * context, uint32_t address, uint8_t * bp_handler); void remove_breakpoint(m68k_context * context, uint32_t address); -- cgit v1.2.3 From 057e8fb32092e1c1c642791cf915c2522b5662e0 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Fri, 22 May 2015 23:49:32 -0700 Subject: Don't attempt to translate or map code at odd addresses. This fixes a bug that shows up when playing College Footbal USA 96 --- m68k_core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'm68k_core.h') diff --git a/m68k_core.h b/m68k_core.h index 2635a09..b91a37b 100644 --- a/m68k_core.h +++ b/m68k_core.h @@ -34,6 +34,7 @@ typedef struct { code_ptr write_32_highfirst; code_ptr do_sync; code_ptr trap; + code_ptr odd_address; start_fun start_context; code_ptr retrans_stub; code_ptr native_addr; -- cgit v1.2.3