Previous 15994 Revisions Next

r7136 Friday 22nd January, 2010 at 20:05:55 UTC by Wilbert Pol
[Pv1000] Added dummy sound interface.
[src/mess/drivers]pv1000.c

src/mess/drivers/pv1000.c
r7135r7136
77#include "emu.h"
88#include "cpu/z80/z80.h"
99#include "devices/cartslot.h"
10#include "streams.h"
1011
1112
13#define SOUND_PV1000   DEVICE_GET_INFO_NAME(pv1000_sound)
14
15
1216static UINT8 *pv1000_ram;
1317static UINT8 pv1000_io_regs[8];
1418static UINT8 pv1000_fd_data;
19static sound_stream *pv1000_sh_channel;
1520
1621
1722static WRITE8_HANDLER( pv1000_io_w );
r7135r7136
4449static WRITE8_HANDLER( pv1000_io_w )
4550{
4651//   logerror("pv1000_io_w offset=%02x, data=%02x\n", offset, data );
47   if ( offset == 0x05 )
52   switch ( offset )
4853   {
54   case 0x00:
55   case 0x01:
56   case 0x02:
57   case 0x03:
58      /* Sound i/O ports */
59      break;
60
61   case 0x05:
4962      pv1000_fd_data = 1;
63      break;
5064   }
5165
5266   pv1000_io_regs[offset] = data;
r7135r7136
186200}
187201
188202
203static STREAM_UPDATE( pv1000_sound_update )
204{
205   stream_sample_t *buffer = outputs[0];
206
207   while( samples > 0 )
208   {
209      *buffer = 0;
210      buffer++;
211      samples--;
212   }
213}
214
215
216static DEVICE_START( pv1000_sound )
217{
218   pv1000_sh_channel = stream_create( device, 0, 1, device->clock, 0, pv1000_sound_update );
219}
220
221
222static DEVICE_GET_INFO( pv1000_sound )
223{
224   switch (state)
225   {
226      /* --- the following bits of info are returned as pointers to data or functions --- */
227      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(pv1000_sound);   break;
228
229      /* --- the following bits of info are returned as NULL-terminated strings --- */
230      case DEVINFO_STR_NAME:                     strcpy(info->s, "NEC D65010G031");            break;
231      case DEVINFO_STR_SOURCE_FILE:               strcpy(info->s, __FILE__);                  break;
232   }
233}
234
235
189236static TIMER_DEVICE_CALLBACK( pv1000_irq )
190237{
191238   const device_config *cpu = devtag_get_device( timer->machine, "maincpu" );
r7135r7136
237284   MDRV_PALETTE_INIT( pv1000 )
238285   MDRV_GFXDECODE( pv1000 )
239286
240   /* uPD4016c / D65010G031 - Video & sound chip */
287   /* D65010G031 - Video & sound chip */
241288   MDRV_VIDEO_UPDATE( pv1000 )
242289
290   MDRV_SPEAKER_STANDARD_MONO("mono")
291   MDRV_SOUND_ADD( "pv1000_sound", PV1000, 17897725 )
292   MDRV_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
293
243294   /* Cartridge slot */
244295   MDRV_CARTSLOT_ADD( "cart" )
245296   MDRV_CARTSLOT_EXTENSION_LIST( "bin" )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team