Previous 15994 Revisions Next

r1807 Friday 29th February, 2008 at 04:55:21 UTC by Robbbert
[MBEE]Fix sound and improve colours[Robbbert]
[src/mess/drivers]mbee.c
[src/mess/machine]mbee.c
[src/mess/video]mbee.c

src/mess/video/mbee.c
r1806r1807
7474   {
7575      logerror("mbee videoram [$%04X] <- $%02X\n", offset, data);
7676      videoram[offset] = data;
77      colorram[offset] = 2;
7877   }
7978}
8079
src/mess/machine/mbee.c
r1806r1807
123123 */
124124READ8_HANDLER ( mbee_pio_r )
125125{
126    UINT8 data = (offset & 2) ? z80pio_c_r(0, offset & 1) : z80pio_d_r(0, offset & 1);
127   if( offset != 2 )
128      return data;
129
130    data |= 0x01;
126   UINT8 data=0;
127   if (offset == 0) return z80pio_d_r(0,0);
128   if (offset == 1) return z80pio_c_r(0,0);
129   if (offset == 3) return z80pio_c_r(0,1);
130   data = z80pio_d_r(0,1) | 1;
131131   if (cassette_input(cassette_device_image()) > 0.03)
132      data &= ~0x01;
133
134    return data;
132      data &= ~1;
133   return data;
135134}
136135
137136WRITE8_HANDLER ( mbee_pio_w )
138137{
139   if (offset & 2)
140      z80pio_c_w(0, offset & 1, data);
141   else
142      z80pio_d_w(0, offset & 1, data);
138   if (offset == 0) z80pio_d_w(0,0,data);
139   if (offset == 1) z80pio_c_w(0,0,data);
140   if (offset == 3) z80pio_c_w(0,1,data);
143141
144142   if( offset == 2 )
145143   {
144      z80pio_d_w(0,1,data);
145      data = z80pio_p_r(0,1);
146146      cassette_output(cassette_device_image(), (data & 0x02) ? -1.0 : +1.0);
147      speaker_level_w(0, (data >> 6) & 1);
147      speaker_level_w(0, (data & 0x40) ? 1 : 0);
148148   }
149149}
150150
r1806r1807
202202
203203INTERRUPT_GEN( mbee_interrupt )
204204{
205    /* once per frame, pulse the PIO B bit 7 */
206    logerror("mbee interrupt\n");
205   /* once per frame, pulse the PIO B bit 7 */
207206   z80pio_p_w(0, 1, 0x80);
208    z80pio_p_w(0, 1, 0x00);
207   z80pio_p_w(0, 1, 0x00);
209208}
210209
211210DEVICE_LOAD( mbee_cart )
src/mess/drivers/mbee.c
r1806r1807
277277   MDRV_SOUND_ADD(WAVE, 0)
278278   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
279279   MDRV_SOUND_ADD(SPEAKER, 0)
280   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
280   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
281281MACHINE_DRIVER_END
282282
283283

Previous 15994 Revisions Next


© 1998-2018 The MESS Team