|
|
| version 1.15, 2004/06/26 15:47:00 | version 1.16, 2005/05/13 05:47:24 |
|---|---|
| Line 213 void amd98int(NEVENTITEM item) { | Line 213 void amd98int(NEVENTITEM item) { |
| static void IOOUTCALL amd_od8(UINT port, REG8 dat) { | static void IOOUTCALL amd_od8(UINT port, REG8 dat) { |
| opn.opnreg = dat; | opn.addr = dat; |
| (void)port; | (void)port; |
| } | } |
| static void IOOUTCALL amd_od9(UINT port, REG8 dat) { | static void IOOUTCALL amd_od9(UINT port, REG8 dat) { |
| opn.extreg = dat; | opn.addr2 = dat; |
| (void)port; | (void)port; |
| } | } |
| static void IOOUTCALL amd_oda(UINT port, REG8 dat) { | static void IOOUTCALL amd_oda(UINT port, REG8 dat) { |
| if (opn.opnreg < 0x0e) { | UINT addr; |
| psggen_setreg(&psg1, opn.opnreg, dat); | |
| addr = opn.addr; | |
| if (addr < 0x0e) { | |
| psggen_setreg(&psg1, addr, dat); | |
| } | } |
| else if (opn.opnreg == 0x0f) { | else if (addr == 0x0f) { |
| psg1.reg.io2 = dat; | psg1.reg.io2 = dat; |
| } | } |
| (void)port; | (void)port; |
| Line 236 static void IOOUTCALL amd_oda(UINT port, | Line 239 static void IOOUTCALL amd_oda(UINT port, |
| static void IOOUTCALL amd_odb(UINT port, REG8 dat) { | static void IOOUTCALL amd_odb(UINT port, REG8 dat) { |
| if (opn.extreg < 0x0e) { | UINT addr; |
| psggen_setreg(&psg2, opn.extreg, dat); | |
| addr = opn.addr2; | |
| if (addr < 0x0e) { | |
| psggen_setreg(&psg2, addr, dat); | |
| } | } |
| else if (opn.extreg == 0x0f) { | else if (addr == 0x0f) { |
| REG8 b; | REG8 b; |
| b = psg2.reg.io2; | b = psg2.reg.io2; |
| if ((b & 1) > (dat & 1)) { | if ((b & 1) > (dat & 1)) { |
| Line 281 static void IOOUTCALL amd_ode(UINT port, | Line 287 static void IOOUTCALL amd_ode(UINT port, |
| static REG8 IOINPCALL amd_ida(UINT port) { | static REG8 IOINPCALL amd_ida(UINT port) { |
| if (opn.opnreg < 0x0e) { | UINT addr; |
| return(psggen_getreg(&psg1, opn.opnreg)); | |
| addr = opn.addr; | |
| if (addr < 0x0e) { | |
| return(psggen_getreg(&psg1, addr)); | |
| } | } |
| else if (opn.opnreg == 0x0f) { | else if (addr == 0x0f) { |
| return(psg1.reg.io2); | return(psg1.reg.io2); |
| } | } |
| (void)port; | (void)port; |
| Line 293 static REG8 IOINPCALL amd_ida(UINT port) | Line 302 static REG8 IOINPCALL amd_ida(UINT port) |
| static REG8 IOINPCALL amd_idb(UINT port) { | static REG8 IOINPCALL amd_idb(UINT port) { |
| if (opn.extreg < 0x0e) { | UINT addr; |
| return(psggen_getreg(&psg2, opn.extreg)); | |
| addr = opn.addr2; | |
| if (addr < 0x0e) { | |
| return(psggen_getreg(&psg2, addr)); | |
| } | } |
| else if (opn.extreg == 0x0f) { | else if (addr == 0x0f) { |
| return(psg2.reg.io2); | return(psg2.reg.io2); |
| } | } |
| (void)port; | (void)port; |