]> git.sesse.net Git - pistorm/commitdiff
Update m68kcpu.c
authorbeeanyew <beeanyew@gmail.com>
Sat, 20 Feb 2021 07:40:54 +0000 (08:40 +0100)
committerbeeanyew <beeanyew@gmail.com>
Sat, 20 Feb 2021 07:40:54 +0000 (08:40 +0100)
m68kcpu.c

index f4d3f2c8252d6be8d3461c4cfffb96ae26b104b1..45db1f3a1b6076815611fccdc14c952a676e6e25 100644 (file)
--- a/m68kcpu.c
+++ b/m68kcpu.c
@@ -1175,9 +1175,10 @@ void m68k_set_context(void* src)
        if(src) m68ki_cpu = *(m68ki_cpu_core*)src;
 }
 
+#if M68K_SEPARATE_READS
 /* Read data immediately following the PC */
 inline unsigned int  m68k_read_immediate_16(unsigned int address) {
-#ifndef M68K_EMULATE_PREFETCH
+#if M68K_EMULATE_PREFETCH == OPT_OFF
        for (int i = 0; i < read_ranges; i++) {
                if(address >= read_addr[i] && address < read_upper[i]) {
                        return be16toh(((unsigned short *)(read_data[i] + (address - read_addr[i])))[0]);
@@ -1188,7 +1189,7 @@ inline unsigned int  m68k_read_immediate_16(unsigned int address) {
        return m68k_read_memory_16(address);
 }
 inline unsigned int  m68k_read_immediate_32(unsigned int address) {
-#ifndef M68K_EMULATE_PREFETCH
+#if M68K_EMULATE_PREFETCH == OPT_OFF
        for (int i = 0; i < read_ranges; i++) {
                if(address >= read_addr[i] && address < read_upper[i]) {
                        return be32toh(((unsigned int *)(read_data[i] + (address - read_addr[i])))[0]);
@@ -1227,6 +1228,7 @@ inline unsigned int  m68k_read_pcrelative_32(unsigned int address) {
 
     return m68k_read_memory_32(address);
 }
+#endif
 
 void m68k_add_ram_range(uint32_t addr, uint32_t upper, unsigned char *ptr)
 {