unsigned char __fastcall twinhawkZ80Read(unsigned short a) { switch (a) { case (0xe000): return BurnYM2151ReadStatus(); case (0xe001): return BurnYM2151ReadStatus(); case (0xe201): return tc0140_slave_comm_r(); default: return 0; } }
unsigned char __fastcall tmntZ80Read(unsigned short wordValue) { if (wordValue==0x9000) { //printf("\nZ80: tmnt_sres_r"); } if (wordValue==0xa000) { //ZetRaiseIrq(1); return tmnt_soundlatch; // printf("\nZ80: read from soundlatch"); } if ((wordValue>=0xb000) && (wordValue<=0xb00d)) { // printf("\nZ80: read from K007232 %d",0xb000 - wordValue); } if (wordValue==0xc001) { return BurnYM2151ReadStatus(); // printf("\nZ80: YM2151 status read"); } if (wordValue==0xf000) { return UPD7759BusyRead(); // bprintf(PRINT_NORMAL, _T("\nZ80: UDP7759 busy read")); } 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 vfive_v25_read(UINT32 address) { switch (address) { case 0x00001: return BurnYM2151ReadStatus(); } return 0; }
unsigned char __fastcall vfive_v25_read(unsigned int address) { switch (address) { case 0x00001: return BurnYM2151ReadStatus(); } return 0; }
unsigned char __fastcall shippumdZ80Read(unsigned short nAddress) { if (nAddress == 0xE001) { return BurnYM2151ReadStatus(); } if (nAddress == 0xE004) { return MSM6295ReadStatus(0); } return 0; }
UINT8 __fastcall shippumdZ80Read(UINT16 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; }
UINT8 __fastcall kbash_v25_read(UINT32 address) { switch (address) { case 0x04001: return BurnYM2151ReadStatus(); case 0x04002: 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; }
unsigned char __fastcall dogyuun_v25_read(unsigned int address) { switch (address) { case 0x00001: return BurnYM2151ReadStatus(); case 0x00004: return MSM6295ReadStatus(0); } return 0; }
unsigned char __fastcall RastanZ80Read(unsigned short a) { switch (a) { case (0x9001): return BurnYM2151ReadStatus(); case (0xa001): return tc0140_slave_comm_r(); default: bprintf(PRINT_NORMAL, _T("z80 read %x\n"),a); return 0xff; } }
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; }
unsigned char __fastcall scontra_sound_read(unsigned short address) { if ((address & 0xfff0) == 0xb000) { return K007232ReadReg(0, address & 0x0f); } switch (address) { case 0xa000: ZetSetIRQLine(0, ZET_IRQSTATUS_NONE); return *soundlatch; case 0xc001: return BurnYM2151ReadStatus(); } return 0; }
UINT8 __fastcall Sf2mdtZ80Read(UINT16 a) { switch (a) { case 0xd801: { return BurnYM2151ReadStatus(); } case 0xdc00: { ZetSetIRQLine(0, ZET_IRQSTATUS_NONE); return Sf2mdtSoundLatch; } default: { bprintf(PRINT_NORMAL, _T("Z80 #1 Read => %04X\n"), a); } } 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; }
UINT8 __fastcall aliens_sound_read(UINT16 address) { if ((address & 0xfff0) == 0xe000) { return K007232ReadReg(0, address & 0x0f); } switch (address) { case 0xa000: case 0xa001: return BurnYM2151ReadStatus(); case 0xc000: ZetSetIRQLine(0, ZET_IRQSTATUS_NONE); return *soundlatch; } 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; }
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; }