Replace a314.device with one suitable for PiStorm
Adjust address of writes/reads to/from the emulated device
Add missing includes to startup.c
#include <proto/exec.h>
#include <proto/expansion.h>
#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"
#include "a314.h"
#include "device.h"
#include "protocol.h"
}
if (a314_emulation_enabled && addr >= a314_base && addr < a314_base + (64 * SIZE_KILO)) {
}
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:
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:
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:
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:
return 1;
break;
default:
}
if (a314_emulation_enabled && addr >= a314_base && addr < a314_base + (64 * SIZE_KILO)) {
}
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:
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:
return 1;
break;
case OP_TYPE_WORD: