|
|
| version 1.5, 2004/01/05 14:16:34 | version 1.9, 2005/02/07 14:46:08 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include "memory.h" | #include "cpucore.h" |
| #include "pccore.h" | #include "pccore.h" |
| #include "iocore.h" | #include "iocore.h" |
| #include "cs4231io.h" | #include "cs4231io.h" |
| Line 83 void cs4231io_reset(void) { | Line 83 void cs4231io_reset(void) { |
| cs4231.adrs = 0x22; | cs4231.adrs = 0x22; |
| cs4231.dmairq = cs4231irq[(cs4231.adrs >> 3) & 7]; | cs4231.dmairq = cs4231irq[(cs4231.adrs >> 3) & 7]; |
| cs4231.dmach = cs4231dma[cs4231.adrs & 7]; | cs4231.dmach = cs4231dma[cs4231.adrs & 7]; |
| cs4231.step = 22050; | |
| if (cs4231.dmach != 0xff) { | if (cs4231.dmach != 0xff) { |
| dmac_attach(DMADEV_CS4231, cs4231.dmach); | dmac_attach(DMADEV_CS4231, cs4231.dmach); |
| } | } |
| Line 112 void IOOUTCALL cs4231io_w8(UINT port, RE | Line 111 void IOOUTCALL cs4231io_w8(UINT port, RE |
| dmac_detach(DMADEV_CS4231); | dmac_detach(DMADEV_CS4231); |
| if (cs4231.dmach != 0xff) { | if (cs4231.dmach != 0xff) { |
| dmac_attach(DMADEV_CS4231, cs4231.dmach); | dmac_attach(DMADEV_CS4231, cs4231.dmach); |
| #if 0 | |
| if (cs4231.sdc_enable) { | |
| dmac.dmach[cs4231.dmach].ready = 1; | |
| dmac_check(); | |
| } | |
| #endif | |
| } | } |
| break; | break; |
| Line 126 void IOOUTCALL cs4231io_w8(UINT port, RE | Line 131 void IOOUTCALL cs4231io_w8(UINT port, RE |
| case 6: | case 6: |
| cs4231.intflag = 0; | cs4231.intflag = 0; |
| break; | break; |
| case 7: | |
| cs4231_datasend(value); | |
| break; | |
| } | } |
| } | } |
| Line 142 REG8 IOINPCALL cs4231io_r8(UINT port) { | Line 151 REG8 IOINPCALL cs4231io_r8(UINT port) { |
| return(cs4231.index & 0x7f); | return(cs4231.index & 0x7f); |
| case 5: | case 5: |
| return(*(((BYTE *)(&cs4231.reg)) + (cs4231.index & 0x1f))); | return(*(((UINT8 *)(&cs4231.reg)) + (cs4231.index & 0x1f))); |
| case 6: | case 6: |
| return(cs4231.intflag); | return(cs4231.intflag); |