src/mess/machine/isa_sblaster.c
| r14023 | r14024 | |
| 6 | 6 | - DSP type is unknown at current time, and probably has an internal ROM |
| 7 | 7 | that needs decapping; |
| 8 | 8 | - joystick port; |
| 9 | | - implement jumpers dip-sw; |
| 9 | - implement jumpers DIP-SWs; |
| 10 | 10 | - state machine + read/write members |
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| r14023 | r14024 | |
| 16 | 16 | #include "sound/speaker.h" |
| 17 | 17 | #include "sound/3812intf.h" |
| 18 | 18 | #include "sound/saa1099.h" |
| 19 | #include "machine/pic8259.h" |
| 19 | 20 | |
| 20 | 21 | /* |
| 21 | 22 | adlib (YM3812/OPL2 chip), part of many many soundcards (soundblaster) |
| r14023 | r14024 | |
| 42 | 43 | UINT8 wbuf_status; |
| 43 | 44 | UINT8 fifo[16],fifo_ptr; |
| 44 | 45 | UINT8 fifo_r[16],fifo_r_ptr; |
| 46 | UINT16 version; |
| 47 | UINT8 test_reg; |
| 45 | 48 | }m_dsp; |
| 46 | 49 | |
| 47 | 50 | |
| r14023 | r14024 | |
| 62 | 65 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* Bx */ |
| 63 | 66 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* Cx */ |
| 64 | 67 | -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* Dx */ |
| 65 | | 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* Ex */ |
| 66 | | -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1 /* Fx */ |
| 68 | 2, 1, -1, -1, 2, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, /* Ex */ |
| 69 | -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1 /* Fx */ |
| 67 | 70 | }; |
| 68 | 71 | |
| 69 | 72 | static const ym3812_interface pc_ym3812_interface = |
| r14023 | r14024 | |
| 241 | 244 | logerror("Soundblaster DSP Read Buffer status undocumented write\n"); |
| 242 | 245 | } |
| 243 | 246 | |
| 244 | | static void process_fifo(UINT8 cmd) |
| 247 | static void process_fifo(running_machine &machine, UINT8 cmd) |
| 245 | 248 | { |
| 246 | 249 | if (m_cmd_fifo_length[cmd] == -1) |
| 247 | 250 | { |
| r14023 | r14024 | |
| 258 | 261 | case 0xe0: // get DSP identification |
| 259 | 262 | queue_r(m_dsp.fifo[1] ^ 0xff); |
| 260 | 263 | break; |
| 264 | case 0xe1: // get DSP version |
| 265 | queue_r(m_dsp.version >> 8); |
| 266 | queue_r(m_dsp.version & 0xff); |
| 267 | break; |
| 268 | case 0xe4: // write test register |
| 269 | m_dsp.test_reg = m_dsp.fifo[1]; |
| 270 | break; |
| 271 | case 0xe8: // read test register |
| 272 | queue_r(m_dsp.test_reg); |
| 273 | break; |
| 274 | case 0xf2: // send PIC irq |
| 275 | pic8259_ir5_w(machine.device("pic8259_master"), 1); |
| 276 | break; |
| 261 | 277 | case 0xf8: // ??? |
| 262 | 278 | queue_r(0); |
| 263 | 279 | break; |
| r14023 | r14024 | |
| 274 | 290 | |
| 275 | 291 | queue(data); |
| 276 | 292 | |
| 277 | | process_fifo(m_dsp.fifo[0]); |
| 293 | process_fifo(device->machine(),m_dsp.fifo[0]); |
| 278 | 294 | } |
| 279 | 295 | |
| 280 | 296 | //************************************************************************** |
| r14023 | r14024 | |
| 334 | 350 | m_isa->install_device(this, 0x022c, 0x022d, 0, 0, FUNC(dsp_wbuf_status_r), FUNC(dsp_cmd_w) ); |
| 335 | 351 | m_isa->install_device(this, 0x022e, 0x022f, 0, 0, FUNC(dsp_rbuf_status_r), FUNC(dsp_rbuf_status_w) ); |
| 336 | 352 | m_isa->install_device(subdevice("ym3812"), 0x0388, 0x0389, 0, 0, FUNC(ym3812_16_r), FUNC(ym3812_16_w) ); |
| 353 | m_dsp.version = 0x0105; |
| 337 | 354 | } |
| 338 | 355 | |
| 339 | 356 | void isa8_sblaster1_5_device::device_start() |
| r14023 | r14024 | |
| 346 | 363 | m_isa->install_device(this, 0x022c, 0x022d, 0, 0, FUNC(dsp_wbuf_status_r), FUNC(dsp_cmd_w) ); |
| 347 | 364 | m_isa->install_device(this, 0x022e, 0x022f, 0, 0, FUNC(dsp_rbuf_status_r), FUNC(dsp_rbuf_status_w) ); |
| 348 | 365 | m_isa->install_device(subdevice("ym3812"), 0x0388, 0x0389, 0, 0, FUNC(ym3812_16_r), FUNC(ym3812_16_w) ); |
| 366 | m_dsp.version = 0x0200; |
| 349 | 367 | } |
| 350 | 368 | |
| 351 | 369 | //------------------------------------------------- |