| 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 |
| r1694 | r1695 | |
|---|---|---|
| 11 | 11 | READ8_HANDLER( gamepock_port_b_r ); |
| 12 | 12 | READ8_HANDLER( gamepock_port_c_r ); |
| 13 | 13 | |
| 14 | int gamepock_io_callback( int ioline, int state ); | |
| 15 | ||
| 14 | 16 | #endif |
| r1694 | r1695 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "sound/speaker.h" | |
| 3 | #include "cpu/upd7810/upd7810.h" | |
| 2 | 4 | #include "includes/gamepock.h" |
| 3 | 5 | |
| 4 | 6 | typedef struct { |
| r1694 | r1695 | |
| 184 | 186 | return 0; |
| 185 | 187 | } |
| 186 | 188 | |
| 189 | /* This is called whenever the T0 pin switches state */ | |
| 190 | int 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 |
| r1694 | r1695 | |
|---|---|---|
| 34 | 34 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) |
| 35 | 35 | INPUT_PORTS_END |
| 36 | 36 | |
| 37 | static const UPD7810_CONFIG gamepock_cpu_config = { TYPE_78C06, | |
| 37 | static const UPD7810_CONFIG gamepock_cpu_config = { TYPE_78C06, gamepock_io_callback }; | |
| 38 | 38 | |
| 39 | 39 | static MACHINE_DRIVER_START( gamepock ) |
| 40 | 40 | MDRV_CPU_ADD_TAG("main", UPD78C06, XTAL_6MHz) /* uPD78C06AG */ |
| r1694 | r1695 | |
| 54 | 54 | MDRV_PALETTE_INIT(black_and_white) |
| 55 | 55 | MDRV_VIDEO_UPDATE( gamepock ) |
| 56 | 56 | |
| 57 | /* sound hardware */ | |
| 58 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 59 | MDRV_SOUND_ADD(SPEAKER, 0) | |
| 60 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 57 | 61 | MACHINE_DRIVER_END |
| 58 | 62 | |
| 59 | 63 | static DEVICE_INIT(gamepock_cart) { |
| Previous | 15994 Revisions | Next |