-#define PLATFORM_CHECK_READ(a) \
- if (address >= cfg->custom_low && address < cfg->custom_high) { \
- unsigned int target = 0; \
- switch(cfg->platform->id) { \
- case PLATFORM_AMIGA: { \
- if (address >= PISCSI_OFFSET && address < PISCSI_UPPER) { \
- return handle_piscsi_read(address, a); \
- } \
- if (address >= PINET_OFFSET && address < PINET_UPPER) { \
- return handle_pinet_read(address, a); \
- } \
- if (address >= PIGFX_RTG_BASE && address < PIGFX_UPPER) { \
- return rtg_read((address & 0x0FFFFFFF), a); \
- } \
- if (custom_read_amiga(cfg, address, &target, a) != -1) { \
- return target; \
- } \
- break; \
- } \
- default: \
- break; \
- } \
- } \
- if (ovl || (address >= cfg->mapped_low && address < cfg->mapped_high)) { \
- if (handle_mapped_read(cfg, address, &target, a) != -1) \
- return target; \
- }
-
-unsigned int m68k_read_memory_8(unsigned int address) {
- PLATFORM_CHECK_READ(OP_TYPE_BYTE);
-
- /*if (address >= 0xE90000 && address < 0xF00000) {
- printf("BYTE read from DMAC @%.8X:", address);
- uint32_t v = cdtv_dmac_read(address & 0xFFFF, OP_TYPE_BYTE);
- printf("%.2X\n", v);
- M68K_END_TIMESLICE;
- cpu_emulation_running = 0;
- return v;
- }*/
-
- /*if (m68k_get_reg(NULL, M68K_REG_PC) >= 0x080032F0 && m68k_get_reg(NULL, M68K_REG_PC) <= 0x080032F0 + 0x4000) {
- stop_cpu_emulation(1);
- }*/
-
-
- if (address & 0xFF000000)
- return 0;
-
- unsigned char result = (unsigned int)read8((uint32_t)address);
-
- if (mouse_hook_enabled) {
- if (address == CIAAPRA) {
- if (mouse_buttons & 0x01) {
- //mouse_buttons -= 1;
- return (unsigned int)(result ^ 0x40);
- }
-
- return (unsigned int)result;
- }