UINT16 __fastcall pipibibsReadWord(UINT32 sekAddress) { switch (sekAddress) { case 0x19c030: // Player 1 inputs return DrvInput[0]; case 0x19c034: // Player 2 inputs return DrvInput[1]; case 0x19c02c: // Other inputs return DrvInput[2]; case 0x19c020: // Dipswitch 1 return DrvInput[3]; case 0x19c024: // Dipswitch 2 return DrvInput[4]; case 0x19c028: // Dipswitch 3 - Territory return DrvInput[5]&0x0f; case 0x140004: return ToaGP9001ReadRAM_Hi(0); case 0x140006: return ToaGP9001ReadRAM_Lo(0); case 0x14000C: return ToaVBlankRegister(); // default: // printf("Attempt to read word value of location %x\n", sekAddress); } return 0; }
unsigned char __fastcall tekipakiReadByte(unsigned int sekAddress) { switch (sekAddress) { case 0x180051: // Player 1 inputs return DrvInput[0]; case 0x180061: // Player 2 inputs return DrvInput[1]; case 0x180021: // Other inputs return DrvInput[2]; case 0x180001: // Dipswitch 1 return DrvInput[3]; case 0x180011: // Dipswitch 2 return DrvInput[4]; case 0x180031: // Dipswitch 3 - Territory return (DrvInput[5] & 0x0F) | 0x10; case 0x14000D: // VBlank return ToaVBlankRegister(); // default: // printf("Attempt to read byte value of location %x\n", sekAddress); } return 0; }
UINT8 __fastcall pipibibsReadByte(UINT32 sekAddress) { switch (sekAddress) { case 0x19c031: // Player 1 inputs return DrvInput[0]; case 0x19c035: // Player 2 inputs return DrvInput[1]; case 0x19c02d: // Other inputs return DrvInput[2]; case 0x19c021: // Dipswitch 1 return DrvInput[3]; case 0x19c025: // Dipswitch 2 return DrvInput[4]; case 0x19c029: // Dipswitch 3 - Territory return DrvInput[5]&0x0f; case 0x14000D: // VBlank return ToaVBlankRegister(); // default: // printf("Attempt to read byte value of location %x\n", sekAddress); } return 0; }
unsigned char __fastcall samesameReadByte(unsigned int a) { switch (a) { case 0x100001: case 0x1c0001: return ToaVBlankRegister(); case 0x140001: return DrvInputs[0]; case 0x140003: return DrvInputs[1]; case 0x140005: return DrvDips[0]; case 0x140007: return DrvDips[1]; case 0x140009: return DrvInputs[2]; case 0x14000b: return (0x80 | DrvDips[2]); } return 0; }
unsigned char __fastcall shippumdReadByte(unsigned int sekAddress) { switch (sekAddress) { case 0x21C021: // Player 1 inputs return DrvInput[0]; case 0x21C025: // Player 2 inputs return DrvInput[1]; case 0x21C029: // Other inputs return DrvInput[2]; case 0x21C02D: // Dipswitch A return DrvInput[3]; case 0x21C031: // Dipswitch B return DrvInput[4]; case 0x21C035: // Dipswitch C - Territory return DrvInput[5]; case 0x30000D: return ToaVBlankRegister(); default: { // printf("Attempt to read byte value of location %x\n", sekAddress); if ((sekAddress & 0x00FFC000) == 0x00218000) { return RamZ80[(sekAddress & 0x3FFF) >> 1]; } } } return 0; }
unsigned char __fastcall batsugunReadByte(unsigned int sekAddress) { switch (sekAddress) { case 0x200011: // Player 1 inputs return DrvInput[0]; case 0x200015: // Player 2 inputs return DrvInput[1]; case 0x200019: // Other inputs return DrvInput[2]; case 0x21F001: { static int nValue = 0xFF; nValue ^= 0x55; return nValue; } case 0x21F005: // Dipswitch A return DrvInput[3]; case 0x21F007: // Dipswitch B return DrvInput[4]; case 0x21F009: // Dipswitch C - Territory return DrvInput[5]; case 0x30000D: return ToaVBlankRegister(); // default: // printf("Attempt to read %06X (byte).\n", sekAddress); } return 0; }
UINT16 __fastcall tekipakiReadWord(UINT32 sekAddress) { switch (sekAddress) { case 0x180050: // Player 1 inputs return DrvInput[0]; case 0x180060: // Player 2 inputs return DrvInput[1]; case 0x180020: // Other inputs return DrvInput[2]; case 0x180000: // Dipswitch 1 return DrvInput[3]; case 0x180010: // Dipswitch 2 return DrvInput[4]; case 0x180030: // Dipswitch 3 - Territory return (DrvInput[5] & 0x0F) | 0x10; case 0x140004: return ToaGP9001ReadRAM_Hi(0); case 0x140006: return ToaGP9001ReadRAM_Lo(0); case 0x14000C: return ToaVBlankRegister(); default: bprintf(PRINT_NORMAL, _T("Attempt to read word value of location %x\n"), sekAddress); } return 0; }
UINT16 __fastcall kbashReadWord(UINT32 sekAddress) { if ((sekAddress & 0xfff000) == 0x200000) { return ShareRAM[(sekAddress / 2) & 0x07ff]; } switch (sekAddress) { case 0x208010: // Player 1 inputs return DrvInput[0]; case 0x208014: // Player 2 inputs return DrvInput[1]; case 0x208018: // Other inputs return DrvInput[2]; case 0x300004: return ToaGP9001ReadRAM_Hi(0); case 0x300006: return ToaGP9001ReadRAM_Lo(0); case 0x30000C: return ToaVBlankRegister(); case 0x700000: return ToaScanlineRegister(); // default: // printf("Attempt to read word value of location %x\n", sekAddress); } return 0; }
unsigned char __fastcall outzoneZ80In(unsigned short nAddress) { // bprintf(PRINT_NORMAL, _T("z80 read %4X\n"), nAddress); nAddress &= 0xFF; switch (nAddress) { case 0x00: return BurnYM3812Read(0); case 0x08: // DIP A return DrvInput[2]; case 0x0C: // DIP B return DrvInput[3]; case 0x10: // Sysytem inputs return DrvInput[4] | (ToaVBlankRegister() << 7); case 0x14: // Player 1 return DrvInput[0]; case 0x18: // Player 2 return DrvInput[1]; case 0x1C: // Region return DrvInput[5]; } return 0; }
unsigned char __fastcall kbashReadByte(unsigned int sekAddress) { switch (sekAddress) { case 0x208011: // Player 1 inputs return DrvInput[0]; case 0x208015: // Player 2 inputs return DrvInput[1]; case 0x208019: // Other inputs return DrvInput[2]; case 0x200001: return ZX80Status(); case 0x200005: // Dipswitch 1 return DrvInput[3]; case 0x200007: // Dipswitch 2 return DrvInput[4]; case 0x200009: // Dipswitch 3 - Territory return DrvInput[5]; case 0x30000D: // VBlank return ToaVBlankRegister(); // default: // printf("Attempt to read byte value of location %x\n", sekAddress); } return 0; }
UINT8 __fastcall tekipakiReadByte(UINT32 sekAddress) { switch (sekAddress) { case 0x180051: // Player 1 inputs return DrvInput[0]; case 0x180061: // Player 2 inputs return DrvInput[1]; case 0x180021: // Other inputs return DrvInput[2]; case 0x180001: // Dipswitch 1 return DrvInput[3]; case 0x180011: // Dipswitch 2 return DrvInput[4]; case 0x180031: // Dipswitch 3 - Territory return (DrvInput[5] & 0x0F) | 0x10; case 0x14000D: // VBlank return ToaVBlankRegister(); default: bprintf(PRINT_NORMAL, _T("Attempt to read byte value of location %x\n"), sekAddress); } return 0; }
UINT8 __fastcall snowbro2ReadByte(UINT32 sekAddress) { switch (sekAddress) { case 0x30000D: return ToaVBlankRegister(); case 0x70000D: // Player 1 inputs return DrvInput[0]; case 0x700011: // Player 2 inputs return DrvInput[1]; case 0x700015: // Player 3 inputs return DrvInput[6]; case 0x700019: // Player 4 inputs return DrvInput[7]; case 0x70001D: // Other inputs return DrvInput[2]; case 0x700005: // Dipswitch A return DrvInput[3]; case 0x700009: // Dipswitch B return DrvInput[4]; case 0x700000: // Dipswitch C - Territory return DrvInput[5]; case 0x600001: return MSM6295ReadStatus(0); case 0x500003: return BurnYM2151ReadStatus(); default: { // printf("Attempt to read byte value of location %x\n", sekAddress); } } return 0; }
UINT8 __fastcall truxtonZ80In(UINT16 nAddress) { nAddress &= 0xFF; switch (nAddress) { case 0x60: return BurnYM3812Read(0); case 0x40: // DIP A return DrvInput[2]; case 0x50: // DIP B return DrvInput[3]; case 0x20: // Sysytem inputs return DrvInput[4] | (ToaVBlankRegister() << 7); case 0x00: // Player 1 return DrvInput[0]; case 0x10: // Player 2 return DrvInput[1]; case 0x70: // Region return DrvInput[5]; } // bprintf(PRINT_NORMAL, _T("z80 read %4X\n"), nAddress); return 0; }
UINT8 __fastcall mahoudaiReadByte(UINT32 sekAddress) { switch (sekAddress) { case 0x21C021: // Player 1 inputs return DrvInput[0]; case 0x21C025: // Player 2 inputs return DrvInput[1]; case 0x21C029: // Other inputs return DrvInput[2]; case 0x21C02D: // Dipswitch A return DrvInput[3]; case 0x21C031: // Dipswitch B return DrvInput[4]; case 0x21C035: // Dipswitch C - Territory return DrvInput[5]; case 0x30000D: return ToaVBlankRegister(); default: { if ((sekAddress & 0x00FFC000) == 0x00218000) { return RamZ80[(sekAddress & 0x3FFF) >> 1]; } // bprintf(PRINT_NORMAL, "Attempt to read byte value of location %x\n", sekAddress); } } return 0; }
UINT8 __fastcall rallybikReadByte(UINT32 a) { switch (a) { case 0x140001: return ToaVBlankRegister(); } return 0; }
UINT8 __fastcall demonwldReadByte(UINT32 a) { switch (a) { case 0x400001: case 0xa00001: return ToaVBlankRegister(); } return 0; }
unsigned char __fastcall demonwldReadByte(unsigned int a) { switch (a) { case 0x400001: case 0xa00001: return ToaVBlankRegister(); } return 0; }
unsigned short __fastcall dogyuunReadWord(unsigned int sekAddress) { switch (sekAddress) { case 0x200010: // Player 1 inputs return DrvInput[0]; case 0x200014: // Player 2 inputs return DrvInput[1]; case 0x200018: // Other inputs return DrvInput[2]; case 0x21F004: // Dipswitch A return DrvInput[3]; case 0x21F006: // Dipswitch B return DrvInput[4]; case 0x21F008: // Dipswitch C - Territory return DrvInput[5]; case 0x21F000: return ZX80Status(); case 0x300004: return ToaGP9001ReadRAM_Hi(0); case 0x300006: return ToaGP9001ReadRAM_Lo(0); case 0x30000C: return ToaVBlankRegister(); case 0x500004: return ToaGP9001ReadRAM_Hi(1); case 0x500006: return ToaGP9001ReadRAM_Lo(1); case 0x700000: { static int i; unsigned short nStatus; i++; nStatus = 0xFFFF - (i & 0xFF); if (i & 1) { nStatus &= 0x00FF; } return nStatus; } // default: // printf("Attempt to read word value of location %x\n", sekAddress); } return 0; }
UINT8 __fastcall truxtonReadByte(UINT32 sekAddress) { switch (sekAddress) { case 0x0c0001: case 0x140001: return ToaVBlankRegister(); default: { // bprintf(PRINT_NORMAL, _T("Read Byte %06X.\n"), sekAddress); } } return 0; }
unsigned char __fastcall hellfireReadByte(unsigned int sekAddress) { switch (sekAddress) { case 0x080001: case 0x140001: return ToaVBlankRegister(); default: { // bprintf(PRINT_NORMAL, _T("Read Byte %06X.\n"), sekAddress); } } return 0; }
unsigned char __fastcall outzoneReadByte(unsigned int sekAddress) { switch (sekAddress) { case 0x100001: case 0x300001: return ToaVBlankRegister(); default: { // printf("Attempt to read byte value of location %x\n", sekAddress); } } return 0; }
UINT8 __fastcall vimanaReadByte(UINT32 a) { switch (a) { case 0x0c0001: case 0x400001: return ToaVBlankRegister(); case 0x440001: return 0xff; case 0x440003: return 0; case 0x440005: return vimana_credits; case 0x440007: return DrvDips[0]; case 0x440009: { INT32 p = DrvInputs[2]; vimana_latch ^= p; p = vimana_latch & p; if (p & 0x18) { vimana_credits++; } vimana_latch = p; return p; } case 0x44000b: return DrvInputs[0]; case 0x44000d: return DrvInputs[1]; case 0x44000f: return DrvDips[1]; case 0x440011: return DrvDips[2]; } return 0; }
unsigned short __fastcall dogyuunReadWord(unsigned int sekAddress) { if ((sekAddress & 0xff0000) == 0x210000) { return ShareRAM[(sekAddress / 2) & 0x7fff]; } switch (sekAddress) { case 0x200010: // Player 1 inputs return DrvInput[0]; case 0x200014: // Player 2 inputs return DrvInput[1]; case 0x200018: // Other inputs return DrvInput[2]; case 0x300004: return ToaGP9001ReadRAM_Hi(0); case 0x300006: return ToaGP9001ReadRAM_Lo(0); case 0x30000C: return ToaVBlankRegister(); case 0x500004: return ToaGP9001ReadRAM_Hi(1); case 0x500006: return ToaGP9001ReadRAM_Lo(1); case 0x700000: { static int i; unsigned short nStatus; i++; nStatus = 0xFFFF - (i & 0xFF); if (i & 1) { nStatus &= 0x00FF; } return nStatus; } // default: // printf("Attempt to read word value of location %x\n", sekAddress); } return 0; }
unsigned short __fastcall outzoneReadWord(unsigned int sekAddress) { switch (sekAddress) { case 0x100002: return ToaFCU2GetRAMPointer(); case 0x100004: return ToaFCU2ReadRAM(); case 0x100006: return ToaFCU2ReadRAMSize(); case 0x200002: return ToaBCU2GetRAMPointer(); case 0x200004: return ToaBCU2ReadRAM_Hi(); case 0x200006: return ToaBCU2ReadRAM_Lo(); case 0x200010: case 0x200011: case 0x200012: case 0x200013: case 0x200014: case 0x200015: case 0x200016: case 0x200017: case 0x200018: case 0x200019: case 0x20001A: case 0x20001B: case 0x20001C: case 0x20001D: case 0x20001E: case 0x20001F: return BCU2Reg[(sekAddress & 15) >> 1]; case 0x100000: case 0x300000: return ToaVBlankRegister(); default: { // printf("Attempt to read word value of location %x\n", sekAddress); } } return 0; }
UINT16 __fastcall truxtonReadWord(UINT32 sekAddress) { switch (sekAddress) { case 0x0c0002: return ToaFCU2GetRAMPointer(); case 0x0c0004: return ToaFCU2ReadRAM(); case 0x0c0006: return ToaFCU2ReadRAMSize(); case 0x100002: return ToaBCU2GetRAMPointer(); case 0x100004: return ToaBCU2ReadRAM_Hi(); case 0x100006: return ToaBCU2ReadRAM_Lo(); case 0x100010: case 0x100011: case 0x100012: case 0x100013: case 0x100014: case 0x100015: case 0x100016: case 0x100017: case 0x100018: case 0x100019: case 0x10001A: case 0x10001B: case 0x10001C: case 0x10001D: case 0x10001E: case 0x10001F: return BCU2Reg[(sekAddress & 15) >> 1]; case 0x0c0000: case 0x140000: return ToaVBlankRegister(); default: { // bprintf(PRINT_NORMAL, _T("Read Word %06X.\n"), sekAddress); } } return 0; }
UINT16 __fastcall ghoxReadWord(UINT32 sekAddress) { switch (sekAddress) { case 0x18000c: // Player 1 inputs return DrvInput[0]; case 0x18000e: // Player 2 inputs return DrvInput[1]; case 0x180010: // Other inputs return DrvInput[2]; case 0x180006: // Dipswitch 1 return DrvInput[3]; case 0x180008: // Dipswitch 2 return DrvInput[4]; case 0x18100c: // Dipswitch 3 - Territory return DrvInput[5]&0x0f; case 0x140004: return ToaGP9001ReadRAM_Hi(0); case 0x140006: return ToaGP9001ReadRAM_Lo(0); case 0x14000C: return ToaVBlankRegister(); case 0x040000: return PaddleRead(1); case 0x100000: return PaddleRead(0); case 0x180000: case 0x180001: return 0xffff; // default: // printf("Attempt to read word value of location %x\n", sekAddress); } if ((sekAddress & 0xfff000) == 0x180000) { return ShareRAM[(sekAddress >> 1) & 0x7ff]; } return 0; }
UINT8 __fastcall ghoxReadByte(UINT32 sekAddress) { switch (sekAddress) { case 0x18000d: // Player 1 inputs return DrvInput[0]; case 0x18000f: // Player 2 inputs return DrvInput[1]; case 0x180011: // Other inputs return DrvInput[2]; case 0x180007: // Dipswitch 1 return DrvInput[3]; case 0x180009: // Dipswitch 2 return DrvInput[4]; case 0x18100d: // Dipswitch 3 - Territory return DrvInput[5]&0x0f; case 0x14000D: // VBlank return ToaVBlankRegister(); case 0x040000: case 0x040001: return PaddleRead(1); case 0x100000: case 0x100001: return PaddleRead(0); case 0x180000: case 0x180001: return 0xff; // default: // printf("Attempt to read byte value of location %x\n", sekAddress); } if ((sekAddress & 0xfff000) == 0x180000) { return ShareRAM[(sekAddress >> 1) & 0x7ff]; } return 0; }
static UINT16 __fastcall kbash2ReadWord(UINT32 sekAddress) { switch (sekAddress) { case 0x200004: // Dipswitch 1 return DrvInput[3]; case 0x200008: // Dipswitch 2 return DrvInput[4]; case 0x20000c: // Dipswitch 3 - Territory return DrvInput[5]; case 0x200010: // Player 1 Input return DrvInput[0]; case 0x200014: // Player 2 Input return DrvInput[1]; case 0x200018: // System... return DrvInput[2]; case 0x200020: return MSM6295ReadStatus(1); case 0x200024: return MSM6295ReadStatus(0); case 0x20002c: return ToaScanlineRegister(); case 0x300004: return ToaGP9001ReadRAM_Hi(0); case 0x300006: return ToaGP9001ReadRAM_Lo(0); case 0x30000C: // VBlank return ToaVBlankRegister(); // default: // printf("Attempt to read word value of location %x\n", sekAddress); } return 0; }
UINT8 __fastcall batsugunReadByte(UINT32 sekAddress) { if ((sekAddress & 0xff0000) == 0x210000) { return ShareRAM[(sekAddress / 2) & 0x7fff]; } switch (sekAddress) { case 0x200011: // Player 1 inputs return DrvInput[0]; case 0x200015: // Player 2 inputs return DrvInput[1]; case 0x200019: // Other inputs return DrvInput[2]; case 0x30000D: return ToaVBlankRegister(); // default: // printf("Attempt to read %06X (byte).\n", sekAddress); } return 0; }
unsigned short __fastcall kbashReadWord(unsigned int sekAddress) { switch (sekAddress) { case 0x208010: // Player 1 inputs return DrvInput[0]; case 0x208014: // Player 2 inputs return DrvInput[1]; case 0x208018: // Other inputs return DrvInput[2]; case 0x200000: return ZX80Status(); case 0x200004: // Dipswitch 1 return DrvInput[3]; case 0x200006: // Dipswitch 2 return DrvInput[4]; case 0x200008: // Dipswitch 3 - Territory return DrvInput[5]; case 0x300004: return ToaGP9001ReadRAM_Hi(0); case 0x300006: return ToaGP9001ReadRAM_Lo(0); case 0x30000C: return ToaVBlankRegister(); case 0x700000: return ToaScanlineRegister(); // default: // printf("Attempt to read word value of location %x\n", sekAddress); } return 0; }