Core/burn/drv/capcom/cps_rw.cpp
// Write output port 0x000-0x1ff
Write output port 0x000-0x1ff
Write output port 0x000 - 0x1ff
void CpsWritePort(const UINT32 ia, UINT8 d)
{
	if ((Cps & 1) && Cps1Qs == 0) {
		if (!Cps1DisablePSnd) {
			if (ia == 0x181 || (Port6SoundWrite && (ia == 0x006 || ia == 0x007))) {
				PsndSyncZ80((INT64)SekTotalCycles() * nCpsZ80Cycles / nCpsCycles);
				PsndCode = d;
				return;
			}
			if (ia == 0x189) {
				PsndSyncZ80((INT64)SekTotalCycles() * nCpsZ80Cycles / nCpsCycles);
				PsndFade = d;
				return;
			}
		} else {
			if (ia == 0x181 || (Port6SoundWrite && (ia == 0x006 || ia == 0x007))) {
				if (CpsRWSoundCommandCallbackFunction) {
					CpsRWSoundCommandCallbackFunction(d);
				}
			}
		}
		if (ia == 0x041) {
			nDial055 = 0;
		}
		if (ia == 0x049) {
			nDial05d = 0;
		}
	}
	if (Cps == 1 && Cps1QsHack == 1) {
		if (ia == 0x181) {
			CpsZRamC0[0x001] = d;
		}
	}
	if (ia >= 0x100 && ia < 0x200) {
		if (PangEEP == 1 && ia == 0x17B) {
			EEPROMWrite(d & 0x40, d & 0x80, d & 0x01);
			return;
		}
		CpsReg[(ia ^ 1) & 0xFF] = d;
		if (ia == 0x10b) {
			GetPalette(0, 6);
			CpsPalUpdate(CpsSavePal);
		}
		return;
	}
	if (Cps == 2) {
		if (ia == 0x40) {
			EEPROMWrite(d & 0x20, d& 0x40, d & 0x10);
			return;
		}
		if ((ia & 0x1FF) == 0x0E1) {
			CpsMapObjectBanks(d & 1);
			return;
		}
		if (ia == 0x41 && Pzloop2) {
			ReadPaddle = d & 0x02;
		}
	}
	if (Cps1Qs == 1 || CpsBootlegEEPROM) {
		if (ia == 0xc007) {
			EEPROMWrite(d & 0x40, d & 0x80, d & 0x01);
			return;
		}
	}
}
void CpsWritePort ( const UINT32 ia , UINT8 d ) { if ( ( Cps & 1 ) && Cps1Qs == 0 ) { if ( ! Cps1DisablePSnd ) { if ( ia == 0x181 || ( Port6SoundWrite && ( ia == 0x006 || ia == 0x007 ) ) ) { PsndSyncZ80 ( ( INT64 ) SekTotalCycles ( ) * nCpsZ80Cycles / nCpsCycles ) ; PsndCode = d ; return ; } if ( ia == 0x189 ) { PsndSyncZ80 ( ( INT64 ) SekTotalCycles ( ) * nCpsZ80Cycles / nCpsCycles ) ; PsndFade = d ; return ; } } else { if ( ia == 0x181 || ( Port6SoundWrite && ( ia == 0x006 || ia == 0x007 ) ) ) { if ( CpsRWSoundCommandCallbackFunction ) { CpsRWSoundCommandCallbackFunction ( d ) ; } } } if ( ia == 0x041 ) { nDial055 = 0 ; } if ( ia == 0x049 ) { nDial05d = 0 ; } } if ( Cps == 1 && Cps1QsHack == 1 ) { if ( ia == 0x181 ) { CpsZRamC0 [ 0x001 ] = d ; } } if ( ia >= 0x100 && ia < 0x200 ) { if ( PangEEP == 1 && ia == 0x17B ) { EEPROMWrite ( d & 0x40 , d & 0x80 , d & 0x01 ) ; return ; } CpsReg [ ( ia ^ 1 ) & 0xFF ] = d ; if ( ia == 0x10b ) { GetPalette ( 0 , 6 ) ; CpsPalUpdate ( CpsSavePal ) ; } return ; } if ( Cps == 2 ) { if ( ia == 0x40 ) { EEPROMWrite ( d & 0x20 , d & 0x40 , d & 0x10 ) ; return ; } if ( ( ia & 0x1FF ) == 0x0E1 ) { CpsMapObjectBanks ( d & 1 ) ; return ; } if ( ia == 0x41 && Pzloop2 ) { ReadPaddle = d & 0x02 ; } } if ( Cps1Qs == 1 || CpsBootlegEEPROM ) { if ( ia == 0xc007 ) { EEPROMWrite ( d & 0x40 , d & 0x80 , d & 0x01 ) ; return ; } } }
Write output port 0x000-0x1ff
Write output port 0x000 - 0x1ff
// CPS1 sound code // CPS1 sound fade // Pass the Sound Code to the Q-Sound Shared Ram // CPS registers //Pang3 EEPROM // CPS2 object bank select //			bprintf(PRINT_NORMAL, _T("  - %2i (%3i)\n"), d & 1, SekCurrentScanline()); //			CpsObjGet(); //CPS1 EEPROM write //	bprintf(PRINT_NORMAL, _T("Write Port %x, %x\n"), ia, d);