int handle_register_write_amiga(unsigned int addr, unsigned int value, unsigned char type);
int init_rtg_data();
+extern int ac_z2_current_pic;
extern int ac_z2_done;
extern int ac_z2_pic_count;
extern int ac_z2_type[AC_PIC_LIMIT];
extern int ac_z2_index[AC_PIC_LIMIT];
+extern int ac_z3_current_pic;
extern int ac_z3_pic_count;
extern int ac_z3_done;
extern int ac_z3_type[AC_PIC_LIMIT];
static uint8_t rtg_enabled = 0, piscsi_enabled = 0, pinet_enabled = 0;
+extern uint32_t piscsi_base;
+extern uint8_t piscsi_diag_read = 0;
+
+extern void stop_cpu_emulation(uint8_t disasm_cur);
+
inline int custom_read_amiga(struct emulator_config *cfg, unsigned int addr, unsigned int *val, unsigned char type) {
if (!ac_z2_done && addr >= AC_Z2_BASE && addr < AC_Z2_BASE + AC_SIZE) {
if (ac_z2_pic_count == 0) {
}
}
+ if (addr >= piscsi_base && addr < piscsi_base + (64 * SIZE_KILO)) {
+ printf("[Amiga-Custom] %s read from PISCSI base @$%.8X.\n", op_type_names[type], addr);
+ stop_cpu_emulation(1);
+ *val = handle_piscsi_read(addr, type);
+ return 1;
+ }
+
return -1;
}
}
}
+ if (addr >= piscsi_base && addr < piscsi_base + (64 * SIZE_KILO)) {
+ printf("[Amiga-Custom] %s write to PISCSI base @$%.8x: %.8X\n", op_type_names[type], addr, val);
+ handle_piscsi_write(addr, val, type);
+ return 1;
+ }
+
return -1;
}
else
cfg->custom_low = min(cfg->custom_low, PISCSI_OFFSET);
cfg->custom_high = max(cfg->custom_high, PISCSI_UPPER);
+ if (piscsi_base != 0) {
+ cfg->custom_low = min(cfg->custom_low, piscsi_base);
+ }
}
if (pinet_enabled) {
if (cfg->custom_low == 0)
void handle_reset_amiga(struct emulator_config *cfg) {
ac_z3_done = 0;
ac_z2_done = 0;
+ ac_z2_current_pic = 0;
+ ac_z3_current_pic = 0;
+ piscsi_diag_read = 0;
adjust_ranges_amiga(cfg);
}