]> git.sesse.net Git - pistorm/commitdiff
A314 updates
authorbeeanyew <beeanyew@gmail.com>
Mon, 17 May 2021 19:43:03 +0000 (21:43 +0200)
committerbeeanyew <beeanyew@gmail.com>
Mon, 17 May 2021 19:43:03 +0000 (21:43 +0200)
Replace a314.device with one suitable for PiStorm
Adjust address of writes/reads to/from the emulated device
Add missing includes to startup.c

a314/a314device/a314.device [new file with mode: 0644]
a314/a314device/startup.c
platforms/amiga/amiga-platform.c

diff --git a/a314/a314device/a314.device b/a314/a314device/a314.device
new file mode 100644 (file)
index 0000000..9efa80d
Binary files /dev/null and b/a314/a314device/a314.device differ
index 79437c0664c6efbf7b82f82df8912383d706c080..47ffb913de48e0d5a9114c4cd6b1e93c28c2030f 100644 (file)
@@ -12,6 +12,9 @@
 #include <proto/exec.h>
 #include <proto/expansion.h>
 
+#include <exec/nodes.h>
+#include <exec/interrupts.h>
+
 #include "a314.h"
 #include "device.h"
 #include "protocol.h"
index 819eda4f523110197aed36170b85a28f7cd70b52..a7a8f34e646fd5c0726f3536361c99f8c80a77d0 100644 (file)
@@ -116,17 +116,18 @@ inline int custom_read_amiga(struct emulator_config *cfg, unsigned int addr, uns
     }
 
     if (a314_emulation_enabled && addr >= a314_base && addr < a314_base + (64 * SIZE_KILO)) {
+        //printf("%s read from A314 @$%.8X\n", op_type_names[type], addr);
         switch (type) {
             case OP_TYPE_BYTE:
-                *val = a314_read_memory_8(addr);
+                *val = a314_read_memory_8(addr - a314_base);
                 return 1;
                 break;
             case OP_TYPE_WORD:
-                *val = a314_read_memory_16(addr);
+                *val = a314_read_memory_16(addr - a314_base);
                 return 1;                
                 break;
             case OP_TYPE_LONGWORD:
-                *val = a314_read_memory_32(addr);
+                *val = a314_read_memory_32(addr - a314_base);
                 return 1;
                 break;
             default:
@@ -202,9 +203,10 @@ inline int custom_write_amiga(struct emulator_config *cfg, unsigned int addr, un
     }
 
     if (a314_emulation_enabled && addr >= a314_base && addr < a314_base + (64 * SIZE_KILO)) {
+        //printf("%s write to A314 @$%.8X: %d\n", op_type_names[type], addr, val);
         switch (type) {
             case OP_TYPE_BYTE:
-                a314_write_memory_8(addr, val);
+                a314_write_memory_8(addr - a314_base, val);
                 return 1;
                 break;
             case OP_TYPE_WORD: