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; }
unsigned char __fastcall donpachiReadByte(unsigned int sekAddress) { switch (sekAddress) { case 0x900000: case 0x900001: case 0x900002: case 0x900003: { unsigned char nRet = (nUnknownIRQ << 1) | nVideoIRQ; return nRet; } case 0x900004: case 0x900005: { unsigned char nRet = (nUnknownIRQ << 1) | nVideoIRQ; nVideoIRQ = 1; UpdateIRQStatus(); return nRet; } case 0x900006: case 0x900007: { unsigned char nRet = (nUnknownIRQ << 1) | nVideoIRQ; nUnknownIRQ = 1; UpdateIRQStatus(); return nRet; } case 0xB00001: return MSM6295ReadStatus(0); case 0xB00011: return MSM6295ReadStatus(1); case 0xC00000: return (DrvInput[0] >> 8) ^ 0xFF; case 0xC00001: return (DrvInput[0] & 0xFF) ^ 0xFF; case 0xC00002: return (DrvInput[1] >> 8) ^ 0xF7 | (EEPROMRead() << 3); case 0xC00003: return (DrvInput[1] & 0xFF) ^ 0xFF; default: { // bprintf(PRINT_NORMAL, "Attempt to read byte value of location %x\n", sekAddress); } } return 0; }
UINT8 __fastcall shippumdZ80Read(UINT16 nAddress) { if (nAddress == 0xE001) { return BurnYM2151ReadStatus(); } if (nAddress == 0xE004) { return MSM6295ReadStatus(0); } return 0; }
unsigned char __fastcall shippumdZ80Read(unsigned short nAddress) { if (nAddress == 0xE001) { return BurnYM2151ReadStatus(); } if (nAddress == 0xE004) { return MSM6295ReadStatus(0); } return 0; }
UINT8 __fastcall mahoudaiZ80Read(UINT16 nAddress) { // bprintf(PRINT_NORMAL, "z80 read %4X\n", nAddress); if (nAddress == 0xE001) { return BurnYM2151ReadStatus(); } if (nAddress == 0xE004) { return MSM6295ReadStatus(0); } return 0; }
unsigned short __fastcall k1945iiiReadWord(unsigned int sekAddress) { switch (sekAddress) { case 0x400000: return ~( DrvInput[0] + (DrvInput[1]<<8) ); case 0x440000: return ~DrvInput[2]; case 0x480000: return ~( DrvInput[4] + (DrvInput[5]<<8) ); case 0x4C0000: return MSM6295ReadStatus(0); case 0x500000: return MSM6295ReadStatus(1); //default: // bprintf(PRINT_NORMAL, _T("Attempt to read word value of location %x\n"), sekAddress); } 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; }
unsigned char __fastcall dogyuun_v25_read(unsigned int address) { switch (address) { case 0x00001: return BurnYM2151ReadStatus(); case 0x00004: return MSM6295ReadStatus(0); } return 0; }
UINT8 __fastcall batsugun_v25_read(UINT32 address) { switch (address) { case 0x00001: return BurnYM2151ReadStatus(); case 0x00004: return MSM6295ReadStatus(0); } return 0; }
UINT8 __fastcall batriderZIn(UINT16 nAddress) { nAddress &= 0xFF; switch (nAddress) { // The sound commands sent by the 68000 are read from these locations case 0x48: return RamShared[0]; case 0x4A: return RamShared[1]; case 0x81: return BurnYM2151ReadStatus(); case 0x82: return MSM6295ReadStatus(0); case 0x84: return MSM6295ReadStatus(1); } return 0; }
UINT8 __fastcall kbash_v25_read(UINT32 address) { switch (address) { case 0x04001: return BurnYM2151ReadStatus(); case 0x04002: return MSM6295ReadStatus(0); } return 0; }
unsigned short __fastcall donpachiReadWord(unsigned int sekAddress) { switch (sekAddress) { case 0x900000: case 0x900002: { unsigned short nRet = (nUnknownIRQ << 1) | nVideoIRQ; return nRet; } case 0x900004: { unsigned short nRet = (nUnknownIRQ << 1) | nVideoIRQ; nVideoIRQ = 1; UpdateIRQStatus(); return nRet; } case 0x900006: { unsigned short nRet = (nUnknownIRQ << 1) | nVideoIRQ; nUnknownIRQ = 1; UpdateIRQStatus(); return nRet; } case 0xB00000: return MSM6295ReadStatus(0); case 0xB00010: return MSM6295ReadStatus(1); case 0xC00000: return DrvInput[0] ^ 0xFFFF; case 0xC00002: return DrvInput[1] ^ 0xF7FF | (EEPROMRead() << 11); default: { // bprintf(PRINT_NORMAL, "Attempt to read word value of location %x\n", sekAddress); } } return 0; }
UINT8 __fastcall speedspn_sound_read(UINT16 address) { switch (address) { case 0x9800: return MSM6295ReadStatus(0); case 0xa000: ZetSetIRQLine(0, CPU_IRQSTATUS_NONE); return *soundlatch; } return 0; }
unsigned char __fastcall speedspn_sound_read(unsigned short address) { switch (address) { case 0x9800: return MSM6295ReadStatus(0); case 0xa000: ZetSetIRQLine(0, ZET_IRQSTATUS_NONE); return *soundlatch; } return 0; }
static UINT8 __fastcall kbash2ReadByte(UINT32 sekAddress) { switch (sekAddress) { case 0x200005: // Dipswitch 1 return DrvInput[3]; case 0x200009: // Dipswitch 2 return DrvInput[4]; case 0x20000d: // Dipswitch 3 - Territory return DrvInput[5]; case 0x200011: // Player 1 Input return DrvInput[0]; case 0x200015: // Player 2 Input return DrvInput[1]; case 0x200019: // System... return DrvInput[2]; case 0x200021: return MSM6295ReadStatus(1); case 0x200025: return MSM6295ReadStatus(0); case 0x20002D: return ToaScanlineRegister(); case 0x30000d: // VBlank return ToaVBlankRegister(); // default: // printf("Attempt to read byte value of location %x\n", sekAddress); } return 0; }
unsigned char dec0_aud_read_byte(unsigned short address) { switch (address) { case 0x3000: // soundlatch read bprintf(PRINT_NORMAL, _T("soundlatch read: %x,\n"),robocopSoundLatch); return robocopSoundLatch; break; case 0x3800: // oki staus read return MSM6295ReadStatus(0); break; default: bprintf(PRINT_NORMAL, _T("unmapped audio read: %x,\n"),address); break; } return 0; }
UINT8 __fastcall battlegZ80Read(UINT16 nAddress) { // printf("z80 read %4X\n", nAddress); switch (nAddress) { case 0xE001: return BurnYM2151ReadStatus(); case 0xE004: return MSM6295ReadStatus(0); case 0xE01C: return nSoundCommand; case 0xE01D: // Bit 0 enables/disables interrupt processing (0 = enabled) return 0; } return 0; }
UINT16 __fastcall snowbro2ReadWord(UINT32 sekAddress) { switch (sekAddress) { case 0x300004: return ToaGP9001ReadRAM_Hi(0); case 0x300006: return ToaGP9001ReadRAM_Lo(0); case 0x30000C: return ToaVBlankRegister(); case 0x70000C: // Player 1 inputs return DrvInput[0]; case 0x700010: // Player 2 inputs return DrvInput[1]; case 0x700014: // Player 3 inputs return DrvInput[6]; case 0x700018: // Player 4 inputs return DrvInput[7]; case 0x70001C: // Other inputs return DrvInput[2]; case 0x700004: // Dipswitch A return DrvInput[3]; case 0x700008: // Dipswitch B return DrvInput[4]; case 0x600000: return MSM6295ReadStatus(0); case 0x500002: return BurnYM2151ReadStatus(); default: { // printf("Attempt to read word value of location %x\n", sekAddress); } } return 0; }