UINT8 parodius_main_read(UINT16 address) { switch (address) { case 0x3f8c: return DrvInputs[0]; case 0x3f8d: return DrvInputs[1]; case 0x3f8e: return (DrvDips[2] & 0xf0) | (DrvInputs[2] & 0x0f); case 0x3f8f: return DrvDips[0]; case 0x3f90: return DrvDips[1]; case 0x3fc0: // watchdog return 0; case 0x3fcc: case 0x3fcd: return K053260Read(0, (address & 1)+2); } if ((address & 0xf800) == 0x0000) { if (nDrvRomBank[1] & 1) { return DrvPalRAM[((nDrvRomBank[1] & 0x04) << 9) + address]; } else { return DrvBankRAM[address]; } } if ((address & 0xfff0) == 0x3fa0) { return K053244Read(0, address & 0x0f); } if ((address & 0xf800) == 0x2000) { if (nDrvRomBank[1] & 0x02) { return K053245Read(0, address & 0x7ff); } } if (address >= 0x2000 && address <= 0x5fff) { return K052109Read(address - 0x2000); } return 0; }
unsigned char rollerg_main_read(unsigned short address) { switch (address) { case 0x0020: // watchdog return 0; case 0x0030: case 0x0031: return K053260Read(0, (address & 1)+2); case 0x0050: return DrvInputs[0]; case 0x0051: return DrvInputs[1]; case 0x0052: return (DrvInputs[2] & 0xf0) | (DrvDips[2] & 0x0f); case 0x0053: return DrvDips[0]; case 0x0060: return DrvDips[1]; case 0x0061: return 0x7f; } if ((address & 0xfff0) == 0x0300) { return K053244Read(0, address & 0x0f); } if ((address & 0xf800) == 0x0800) { if (readzoomroms) return K051316ReadRom(0, address & 0x7ff); else return K051316Read(0, address & 0x7ff); } if ((address & 0xf800) == 0x1000) { return K053245Read(0, address & 0x7ff); } return 0; }
unsigned char __fastcall rollerg_sound_read(unsigned short address) { switch (address) { case 0xc000: case 0xc001: return BurnYM3812Read(address & 1); } if (address >= 0xa000 && address <= 0xa02f) { // not sure... if ((address & 0x3e) == 0x00) ZetSetIRQLine(0, ZET_IRQSTATUS_NONE); return K053260Read(0, address & 0x3f); } return 0; }
UINT8 __fastcall parodius_sound_read(UINT16 address) { switch (address) { case 0xf800: return 0xff; case 0xf801: return BurnYM2151ReadStatus(); } if (address >= 0xfc00 && address <= 0xfc2f) { if ((address & 0x3e) == 0x00) ZetSetIRQLine(0, ZET_IRQSTATUS_NONE); return K053260Read(0, address & 0x3f); } return 0; }