Previous 15994 Revisions Next

r1695 Tuesday 19th February, 2008 at 16:41:18 UTC by Wilbert Pol
[GAMEPOCK] Added sound.
[src/mess/drivers]gamepock.c
[src/mess/includes]gamepock.h
[src/mess/machine]gamepock.c

src/mess/includes/gamepock.h
r1694r1695
1111READ8_HANDLER( gamepock_port_b_r );
1212READ8_HANDLER( gamepock_port_c_r );
1313
14int gamepock_io_callback( int ioline, int state );
15
1416#endif
src/mess/machine/gamepock.c
r1694r1695
11#include "driver.h"
2#include "sound/speaker.h"
3#include "cpu/upd7810/upd7810.h"
24#include "includes/gamepock.h"
35
46typedef struct {
r1694r1695
184186   return 0;
185187}
186188
189/* This is called whenever the T0 pin switches state */
190int gamepock_io_callback( int ioline, int state ) {
191   if ( ioline == UPD7810_TO ) {
192      speaker_level_w(0, state & 1 );
193   }
194   return 0;
195}
196
197
src/mess/drivers/gamepock.c
r1694r1695
3434   PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 )
3535INPUT_PORTS_END
3636
37static const UPD7810_CONFIG gamepock_cpu_config = { TYPE_78C06, NULL };
37static const UPD7810_CONFIG gamepock_cpu_config = { TYPE_78C06, gamepock_io_callback };
3838
3939static MACHINE_DRIVER_START( gamepock )
4040   MDRV_CPU_ADD_TAG("main", UPD78C06, XTAL_6MHz)   /* uPD78C06AG */
r1694r1695
5454   MDRV_PALETTE_INIT(black_and_white)
5555   MDRV_VIDEO_UPDATE( gamepock )
5656
57   /* sound hardware */
58   MDRV_SPEAKER_STANDARD_MONO("mono")
59   MDRV_SOUND_ADD(SPEAKER, 0)
60   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
5761MACHINE_DRIVER_END
5862
5963static DEVICE_INIT(gamepock_cart) {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team