Beispiel #1
0
/**
 * Reads extended register
 * @param[in] opna The instance
 * @param[in] nAddress The address
 * @return data
 */
REG8 opna_readExtendedRegister(POPNA opna, UINT nAddress)
{
	if ((opna->s.cCaps & OPNA_HAS_ADPCM) && (nAddress == 0x08))
	{
		return adpcm_readsample(&opna->adpcm);
	}
	return opna->s.reg[nAddress + 0x100];
}
static REG8 IOINPCALL opnac_i18e(UINT port) {

	if (opn.extend) {
		UINT addr = opn.addr - 0x100;
		if (addr == 0x08) {
			return(adpcm_readsample(&adpcm));
		}
		else if (addr == 0x0f) {
			return(opn.reg[addr + 0x100]);
		}
		return(opn.data);
	}
	(void)port;
	return(0xff);
}
Beispiel #3
0
static REG8 IOINPCALL spb_i18e(UINT port) {

	UINT	addr;

	addr = opn.addr - 0x100;
	if (addr == 0x08) {
		return(adpcm_readsample(&adpcm));
	}
	else if (addr == 0x0f) {
		return(opn.reg[addr + 0x100]);
	}
	else {
		(void)port;
		return(opn.data);
	}
}
Beispiel #4
0
static REG8 IOINPCALL p86_i28e(UINT port) {

	UINT	addr;

	addr = g_opn3.addr1h;
	if (addr == 0x08) {
		return(adpcm_readsample(&g_adpcm3));
	}
	else if (addr == 0x0f) {
		return(g_opn3.reg[addr + 0x100]);
	}
	else {
		(void)port;
		return(g_opn3.reg[g_opn3.addr1l]);
	}
}