Previous 15994 Revisions Next

r14024 Saturday 14th January, 2012 at 18:35:27 UTC by Angelo Salese
Bunch of new commands implemented, currently dies at protection register
[src/mess/machine]isa_sblaster.c

src/mess/machine/isa_sblaster.c
r14023r14024
66  - DSP type is unknown at current time, and probably has an internal ROM
77    that needs decapping;
88  - joystick port;
9  - implement jumpers dip-sw;
9  - implement jumpers DIP-SWs;
1010  - state machine + read/write members
1111
1212***************************************************************************/
r14023r14024
1616#include "sound/speaker.h"
1717#include "sound/3812intf.h"
1818#include "sound/saa1099.h"
19#include "machine/pic8259.h"
1920
2021/*
2122  adlib (YM3812/OPL2 chip), part of many many soundcards (soundblaster)
r14023r14024
4243   UINT8 wbuf_status;
4344   UINT8 fifo[16],fifo_ptr;
4445   UINT8 fifo_r[16],fifo_r_ptr;
46   UINT16 version;
47   UINT8 test_reg;
4548}m_dsp;
4649
4750
r14023r14024
6265   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, /* Bx */
6366   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, /* Cx */
6467   -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 */
6770};
6871
6972static const ym3812_interface pc_ym3812_interface =
r14023r14024
241244   logerror("Soundblaster DSP Read Buffer status undocumented write\n");
242245}
243246
244static void process_fifo(UINT8 cmd)
247static void process_fifo(running_machine &machine, UINT8 cmd)
245248{
246249   if (m_cmd_fifo_length[cmd] == -1)
247250   {
r14023r14024
258261         case 0xe0: // get DSP identification
259262            queue_r(m_dsp.fifo[1] ^ 0xff);
260263            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;
261277         case 0xf8: // ???
262278            queue_r(0);
263279            break;
r14023r14024
274290
275291   queue(data);
276292
277   process_fifo(m_dsp.fifo[0]);
293   process_fifo(device->machine(),m_dsp.fifo[0]);
278294}
279295
280296//**************************************************************************
r14023r14024
334350   m_isa->install_device(this,                   0x022c, 0x022d, 0, 0, FUNC(dsp_wbuf_status_r),  FUNC(dsp_cmd_w) );
335351   m_isa->install_device(this,                   0x022e, 0x022f, 0, 0, FUNC(dsp_rbuf_status_r),  FUNC(dsp_rbuf_status_w) );
336352   m_isa->install_device(subdevice("ym3812"),    0x0388, 0x0389, 0, 0, FUNC(ym3812_16_r), FUNC(ym3812_16_w) );
353   m_dsp.version = 0x0105;
337354}
338355
339356void isa8_sblaster1_5_device::device_start()
r14023r14024
346363   m_isa->install_device(this,                   0x022c, 0x022d, 0, 0, FUNC(dsp_wbuf_status_r),  FUNC(dsp_cmd_w) );
347364   m_isa->install_device(this,                   0x022e, 0x022f, 0, 0, FUNC(dsp_rbuf_status_r),  FUNC(dsp_rbuf_status_w) );
348365   m_isa->install_device(subdevice("ym3812"),    0x0388, 0x0389, 0, 0, FUNC(ym3812_16_r), FUNC(ym3812_16_w) );
366   m_dsp.version = 0x0200;
349367}
350368
351369//-------------------------------------------------

Previous 15994 Revisions Next


© 1998-2018 The MESS Team