static void IOOUTCALL opn_o08a(UINT port, REG8 dat) { UINT addr; opn.data2 = dat; addr = opn.addr2; if (addr < 0x10) { if (addr != 0x0e) { psggen_setreg(&psg1, addr, dat); } } else { if (addr < 0x30) { if (addr == 0x28) { if ((dat & 0x0f) < 3) { opngen_keyon(dat & 0x0f, dat); } } else { fmtimer_setreg(addr, dat); if (addr == 0x27) { opnch[2].extop = dat & 0xc0; } } } else if (addr < 0xc0) { opngen_setreg(0, addr, dat); } opn.reg[addr + 0x200] = dat; } (void)port; }
static void IOOUTCALL opn_o18a(UINT port, REG8 dat) { UINT addr; g_opn.data1 = dat; addr = g_opn.addr1l; S98_put(NORMAL2608, addr, dat); g_opn.reg[addr] = dat; if (addr < 0x10) { psggen_setreg(&g_psg1, addr, dat); } else if (addr < 0x100) { if (addr < 0x30) { if (addr == 0x28) { if ((dat & 0x0f) < 3) { opngen_keyon(&g_opngen, dat & 0x0f, dat); } } else { fmtimer_setreg(addr, dat); if (addr == 0x27) { g_opngen.opnch[2].extop = dat & 0xc0; } } } else if (addr < 0xc0) { opngen_setreg(&g_opngen, 0, addr, dat); } } (void)port; }
static void IOOUTCALL opna_o18a(UINT port, REG8 dat) { UINT addr; opn.data = dat; addr = opn.addr; if (addr >= 0x100) { return; } S98_put(NORMAL2608, addr, dat); if (addr < 0x10) { if (addr != 0x0e) { psggen_setreg(&psg2, addr, dat); } } else { if (addr < 0x20) { if (opn.extend) { rhythm_setreg(&rhythm, addr, dat); } } else if (addr < 0x30) { if (addr == 0x28) { if ((dat & 0x0f) < 3) { opngen_keyon((dat & 0x0f) + 3, dat); } else if (((dat & 0x0f) != 3) && ((dat & 0x0f) < 7)) { opngen_keyon((dat & 0x0f) + 2, dat); } } else { fmtimer_setreg(addr, dat); if (addr == 0x27) { opnch[2].extop = dat & 0xc0; } } } else if (addr < 0xc0) { opngen_setreg(3, addr, dat); } opn.reg[addr] = dat; } (void)port; }
static void IOOUTCALL ymf_o18a(UINT port, REG8 dat) { UINT addr; opn.data = dat; addr = opn.addr; if (addr >= 0x100) { return; } S98_put(NORMAL2608, addr, dat); if (addr < 0x10) { if (addr != 0x0e) { psggen_setreg(&psg1, addr, dat); } } else { if (addr < 0x20) { rhythm_setreg(&rhythm, addr, dat); } else if (addr < 0x30) { if (addr == 0x28) { if ((dat & 0x0f) < 3) { opngen_keyon(dat & 0x0f, dat); } else if (((dat & 0x0f) != 3) && ((dat & 0x0f) < 7)) { opngen_keyon((dat & 0x07) - 1, dat); } } else { fmtimer_setreg(addr, dat); } } else if (addr < 0xc0) { opngen_setreg(0, addr, dat); } opn.reg[addr] = dat; } (void)port; }
static void IOOUTCALL ymf_o18a(UINT port, REG8 dat) { UINT addr; g_opn.data1 = dat; if (g_opn.addr1h != 0) { return; } addr = g_opn.addr1l; S98_put(NORMAL2608, addr, dat); g_opn.reg[addr] = dat; if (addr < 0x10) { psggen_setreg(&g_psg1, addr, dat); } else { if (addr < 0x20) { rhythm_setreg(&g_rhythm, addr, dat); } else if (addr < 0x30) { if (addr == 0x28) { if ((dat & 0x0f) < 3) { opngen_keyon(&g_opngen, dat & 0x0f, dat); } else if (((dat & 0x0f) != 3) && ((dat & 0x0f) < 7)) { opngen_keyon(&g_opngen, (dat & 0x07) - 1, dat); } } else { fmtimer_setreg(addr, dat); } } else if (addr < 0xc0) { opngen_setreg(&g_opngen, 0, addr, dat); } } (void)port; }
static void IOOUTCALL p86_o28a(UINT port, REG8 dat) { UINT addr; // g_opn3.data1 = dat; addr = g_opn3.addr1l; // S98_put(NORMAL2608, addr, dat); g_opn3.reg[addr] = dat; if (addr < 0x10) { psggen_setreg(&g_psg3, addr, dat); } else { if (addr < 0x20) { rhythm_setreg(&g_rhythm3, addr, dat); } else if (addr < 0x30) { if (addr == 0x28) { if ((dat & 0x0f) < 3) { opngen_keyon(&g_opngen, (dat & 0x0f) + 24, dat); } else if (((dat & 0x0f) != 3) && ((dat & 0x0f) < 7)) { opngen_keyon(&g_opngen, (dat & 0x0f) + 23, dat); } } else { fmtimer_setreg(addr, dat); if (addr == 0x27) { g_opngen.opnch[26].extop = dat & 0xc0; } } } else if (addr < 0xc0) { opngen_setreg(&g_opngen, 24, addr, dat); } } (void)port; }
static void IOOUTCALL spb_o08a(UINT port, REG8 dat) { UINT addr; // g_opn2.data1 = dat; addr = g_opn2.addr1l; // S98_put(NORMAL2608, addr, dat); g_opn2.reg[addr] = dat; if (addr < 0x10) { psggen_setreg(&g_psg2, addr, dat); } else { if (addr < 0x20) { rhythm_setreg(&g_rhythm2, addr, dat); } else if (addr < 0x30) { if (addr == 0x28) { if ((dat & 0x0f) < 3) { opngen_keyon(&g_opngen, (dat & 0x0f) + 12, dat); } else if (((dat & 0x0f) != 3) && ((dat & 0x0f) < 7)) { opngen_keyon(&g_opngen, (dat & 0x0f) + 11, dat); } } else { fmtimer_setreg(addr, dat); if (addr == 0x27) { g_opngen.opnch[14].extop = dat & 0xc0; } } } else if (addr < 0xc0) { opngen_setreg(&g_opngen, 12, addr, dat); } } (void)port; }