Previous 15994 Revisions Next

r14048 Sunday 15th January, 2012 at 18:25:42 UTC by R. Belmont
SoundBlaster: E2 protection check fixed. test-sbc.exe now passes initial tests. [R. Belmont]
[src/mess/machine]isa_sblaster.c isa_sblaster.h

src/mess/machine/isa_sblaster.c
r14047r14048
272272            queue_r(m_dsp.version >> 8);
273273            queue_r(m_dsp.version & 0xff);
274274            break;
275            case 0xe2: // DSP protection
275        case 0xe2: // DSP protection
276276                for (int i = 0; i < 8; i++)
277277                {
278278                    if ((m_dsp.fifo[1] >> i) & 0x01)
279279                    {
280280                        m_dsp.prot_value += protection_magic[m_dsp.prot_count % 4][i];
281281                    }
282                }
282283
283                    m_dsp.prot_value += protection_magic[m_dsp.prot_count % 4][8];
284                    m_dsp.prot_count++;
285                }
284                m_dsp.prot_value += protection_magic[m_dsp.prot_count % 4][8];
285                m_dsp.prot_count++;
286286               
287                // this wants to return prot_data by a 1 byte DMA.  how does ISA DMA work?
288                queue_r(m_dsp.prot_value);
287                m_dack_out = (UINT8)(m_dsp.prot_value & 0xff);
289288                m_isa->drq1_w(1);
290289                break;
291290         case 0xe4: // write test register
r14047r14048
408407{
409408    m_dsp.prot_value = 0xaa;
410409    m_dsp.prot_count = 0;
410    m_dack_out = 0;
411411}
412412
413413bool sb8_device::have_dack(int line)
r14047r14048
416416   return FALSE;
417417}
418418
419UINT8 sb8_device::dack_r(int line)
420{
421//    printf("dack_r: line %x out = %02x\n", line, m_dack_out);
422    return m_dack_out;
423}
424
425void sb8_device::dack_w(int line, UINT8 data)
426{
427//    printf("dack_w: line %x data %02x\n", line, data);
428}
429
src/mess/machine/isa_sblaster.h
r14047r14048
2020    UINT16 version;
2121    UINT8 test_reg;
2222    UINT8 speaker_on;
23    UINT8 prot_count;
24    INT8 prot_value;
23    UINT32 prot_count;
24    INT32 prot_value;
2525};
2626
2727// ======================> sb8_device (parent)
r14047r14048
5252        // device-level overrides
5353        virtual void device_start();
5454        virtual void device_reset();
55      virtual bool have_dack(int line);
55   virtual bool have_dack(int line);
56        virtual UINT8 dack_r(int line);
57        virtual void dack_w(int line, UINT8 data);
5658
5759        struct sb8_dsp_state m_dsp;
58
60        UINT8 m_dack_out;
5961private:
6062};
6163

Previous 15994 Revisions Next


© 1998-2018 The MESS Team