trunk/src/mame/drivers/capbowl.c
| r26285 | r26286 | |
| 32 | 32 | (Each row appears vertically because the monitor is rotated) |
| 33 | 33 | |
| 34 | 34 | 6000 Sound command |
| 35 | | 6800 Trackball Reset. Double duties as a watchdog. |
| 36 | | 7000 Input port 1 Bit 0-3 Trackball Vertical Position |
| 35 | 6800 Trackball Reset. Double duties as a watchdog. |
| 36 | 7000 Input port 1 Bit 0-3 Trackball Vertical Position |
| 37 | 37 | Bit 4 Player 2 Hook Left |
| 38 | 38 | Bit 5 Player 2 Hook Right |
| 39 | 39 | Bit 6 Upright/Cocktail DIP Switch |
| 40 | | Bit 7 Coin 2 |
| 41 | | 7800 Input port 2 Bit 0-3 Trackball Horizontal Positon |
| 42 | | Bit 4 Player 1 Hook Left |
| 43 | | Bit 5 Player 1 Hook Right |
| 44 | | Bit 6 Start |
| 45 | | Bit 7 Coin 1 |
| 46 | | 8000-ffff ROM |
| 40 | Bit 7 Coin 2 |
| 41 | 7800 Input port 2 Bit 0-3 Trackball Horizontal Positon |
| 42 | Bit 4 Player 1 Hook Left |
| 43 | Bit 5 Player 1 Hook Right |
| 44 | Bit 6 Start |
| 45 | Bit 7 Coin 1 |
| 46 | 8000-ffff ROM |
| 47 | 47 | |
| 48 | 48 | |
| 49 | 49 | Sound Board: |
| r26285 | r26286 | |
| 52 | 52 | 1000-1001 YM2203 |
| 53 | 53 | Port A D7 Read is ticket sensor |
| 54 | 54 | Port B D7 Write is ticket dispenser enable |
| 55 | | Port B D6 looks like a diagnostics LED to indicate that |
| 56 | | the PCB is operating. It's pulsated by the |
| 57 | | sound CPU. It is kind of pointless to emulate it. |
| 58 | | 2000 Not hooked up according to the schematics |
| 55 | Port B D6 Write is Sound OK LED |
| 56 | 2000 Sound watchdog clear |
| 59 | 57 | 6000 DAC write |
| 60 | 58 | 7000 Sound command read (0x34 is used to dispense a ticket) |
| 61 | 59 | 8000-ffff ROM |
| r26285 | r26286 | |
| 94 | 92 | #include "sound/2203intf.h" |
| 95 | 93 | #include "sound/dac.h" |
| 96 | 94 | |
| 97 | | #define MASTER_CLOCK 8000000 /* 8MHz crystal */ |
| 95 | #define MASTER_CLOCK XTAL_8MHz |
| 98 | 96 | |
| 99 | 97 | |
| 100 | 98 | /************************************* |
| r26285 | r26286 | |
| 257 | 255 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, capbowl_state ) |
| 258 | 256 | AM_RANGE(0x0000, 0x07ff) AM_RAM |
| 259 | 257 | AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write) |
| 260 | | AM_RANGE(0x2000, 0x2000) AM_WRITENOP /* Not hooked up according to the schematics */ |
| 258 | AM_RANGE(0x2000, 0x2000) AM_WRITENOP /* watchdog */ |
| 261 | 259 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("dac", dac_device, write_unsigned8) |
| 262 | 260 | AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_byte_r) |
| 263 | 261 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| r26285 | r26286 | |
| 368 | 366 | MCFG_CPU_ADD("maincpu", M6809E, MASTER_CLOCK) |
| 369 | 367 | MCFG_CPU_PROGRAM_MAP(capbowl_map) |
| 370 | 368 | MCFG_CPU_VBLANK_INT_DRIVER("screen", capbowl_state, capbowl_interrupt) |
| 371 | | MCFG_WATCHDOG_VBLANK_INIT(8) // Unverified |
| 369 | MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_ASTABLE(100000.0, 100000.0, 0.1e-6) * 15.5) // ~0.3s |
| 372 | 370 | |
| 373 | 371 | MCFG_CPU_ADD("audiocpu", M6809E, MASTER_CLOCK) |
| 374 | 372 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| 373 | // MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_ASTABLE(100000.0, 100000.0, 0.1e-6) * 15.5) // TODO |
| 375 | 374 | |
| 376 | 375 | MCFG_NVRAM_ADD_RANDOM_FILL("nvram") |
| 377 | 376 | |
| 378 | 377 | MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW) |
| 379 | 378 | |
| 380 | 379 | /* video hardware */ |
| 381 | | |
| 382 | 380 | MCFG_SCREEN_ADD("screen", RASTER) |
| 383 | 381 | MCFG_SCREEN_SIZE(360, 256) |
| 384 | 382 | MCFG_SCREEN_VISIBLE_AREA(0, 359, 0, 244) |