diff options
-rw-r--r-- | src/mame/drivers/citycon.cpp | 26 | ||||
-rw-r--r-- | src/mame/drivers/galaxia.cpp | 25 | ||||
-rw-r--r-- | src/mame/drivers/ikki.cpp | 29 |
3 files changed, 53 insertions, 27 deletions
diff --git a/src/mame/drivers/citycon.cpp b/src/mame/drivers/citycon.cpp index 5b9031cc32f..f8704bd48bd 100644 --- a/src/mame/drivers/citycon.cpp +++ b/src/mame/drivers/citycon.cpp @@ -19,6 +19,17 @@ Dip locations added from dip listing at crazykong.com #include "screen.h" #include "speaker.h" +#define MASTER_CLOCK (20_MHz_XTAL) +#define PIXEL_CLOCK (MASTER_CLOCK/4) // guess +#define CPU_CLOCK (8_MHz_XTAL) + +/* also a guess, need to extract PAL equations to get further answers */ +#define HTOTAL (320) +#define HBEND (8) +#define HBSTART (248) +#define VTOTAL (262) +#define VBEND (16) +#define VBSTART (240) READ8_MEMBER(citycon_state::citycon_in_r) { @@ -190,20 +201,17 @@ void citycon_state::machine_reset() MACHINE_CONFIG_START(citycon_state::citycon) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", MC6809, XTAL(8'000'000)) // HD68B09P + MCFG_DEVICE_ADD("maincpu", MC6809, CPU_CLOCK) // HD68B09P MCFG_DEVICE_PROGRAM_MAP(citycon_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", citycon_state, irq0_line_assert) - MCFG_DEVICE_ADD("audiocpu", MC6809E, XTAL(20'000'000) / 32) // schematics allow for either a 6809 or 6809E; HD68A09EP found on one actual PCB + MCFG_DEVICE_ADD("audiocpu", MC6809E, MASTER_CLOCK / 32) // schematics allow for either a 6809 or 6809E; HD68A09EP found on one actual PCB MCFG_DEVICE_PROGRAM_MAP(sound_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", citycon_state, irq0_line_hold) //actually unused, probably it was during development + MCFG_DEVICE_VBLANK_INT_DRIVER("screen", citycon_state, irq0_line_hold) // actually unused, probably it was during development /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) + MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) MCFG_SCREEN_UPDATE_DRIVER(citycon_state, screen_update_citycon) MCFG_SCREEN_PALETTE("palette") @@ -217,10 +225,10 @@ MACHINE_CONFIG_START(citycon_state::citycon) MCFG_GENERIC_LATCH_8_ADD("soundlatch") MCFG_GENERIC_LATCH_8_ADD("soundlatch2") - MCFG_DEVICE_ADD("aysnd", AY8910, XTAL(20'000'000) / 16) // schematics consistently specify AY-3-8910, though YM2149 found on one actual PCB + MCFG_DEVICE_ADD("aysnd", AY8910, MASTER_CLOCK / 16) // schematics consistently specify AY-3-8910, though YM2149 found on one actual PCB MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) - MCFG_DEVICE_ADD("ymsnd", YM2203, XTAL(20'000'000) / 16) + MCFG_DEVICE_ADD("ymsnd", YM2203, MASTER_CLOCK / 16) MCFG_AY8910_PORT_A_READ_CB(READ8("soundlatch", generic_latch_8_device, read)) MCFG_AY8910_PORT_B_READ_CB(READ8("soundlatch2", generic_latch_8_device, read)) MCFG_SOUND_ROUTE(0, "mono", 0.40) diff --git a/src/mame/drivers/galaxia.cpp b/src/mame/drivers/galaxia.cpp index 9ac5db7e13a..f114418cae4 100644 --- a/src/mame/drivers/galaxia.cpp +++ b/src/mame/drivers/galaxia.cpp @@ -57,16 +57,21 @@ http://www.zzzaccaria.com/manuals/GalaxiaSchematics.zip The manual for Astro Wars can also be found at: http://www.opdenkelder.com/Astrowars_manual.zip -HW has many similarities with quasar.c / cvs.c / zac2650.c +HW has many similarities with quasar.cpp / cvs.cpp / zac2650.cpp +real hardware video of Astro Wars can be seen here: youtu.be/eSrQFBMeDlM --- TODO: -- speed is wrong for all games. needs investigation, interrupt related? - real hardware video of Astro Wars can be seen here: youtu.be/eSrQFBMeDlM -- correct color/star generation using info from Galaxia technical manual and schematics +- go through everything in the schematics for astrowar / galaxia +- video rewrite to: + * support RAW_PARAMS, blanking is much like how laserbat hardware does it + and is needed to correct the speed in all machines + * improve bullets + * provide correct color/star generation, using info from Galaxia technical + manual and schematics + * provide accurate sprite/bg sync in astrowar +- what is the PROM for? schematics are too burnt to tell anything - add sound board emulation -- improve bullets -- accurate sprite/bg sync in astrowar */ @@ -112,13 +117,17 @@ WRITE8_MEMBER(galaxia_state::galaxia_scroll_w) WRITE8_MEMBER(galaxia_state::galaxia_ctrlport_w) { - // d0/d1: maybe coincounter + // d0: triggers on every new credit + // d1: coin counter? if you put a coin in slot A, galaxia constantly + // strobes sets and clears the bit. if you put a coin in slot B + // however, the bit is set and cleared only once. + // d5: set as soon as the game completes selftest // other bits: unknown } WRITE8_MEMBER(galaxia_state::galaxia_dataport_w) { - // cvs-style video fx? or lamps? + // seems to be related to sound board comms } READ8_MEMBER(galaxia_state::galaxia_collision_r) diff --git a/src/mame/drivers/ikki.cpp b/src/mame/drivers/ikki.cpp index 74d1f186ddb..5d471fd9e53 100644 --- a/src/mame/drivers/ikki.cpp +++ b/src/mame/drivers/ikki.cpp @@ -10,6 +10,7 @@ Ikki (c) 1985 Sun Electronics TODO: - understand proper CPU communications and irq firing; +- merge with markham.cpp - timings *****************************************************************************/ @@ -21,6 +22,18 @@ TODO: #include "sound/sn76496.h" #include "speaker.h" +#define MASTER_CLOCK (20_MHz_XTAL) +#define PIXEL_CLOCK (MASTER_CLOCK/4) // guess +#define CPU_CLOCK (8_MHz_XTAL) + +/* also a guess */ +#define HTOTAL (320) +#define HBEND (8) +#define HBSTART (248) +#define VTOTAL (262) +#define VBEND (16) +#define VBSTART (240) + /************************************* * @@ -243,24 +256,20 @@ TIMER_DEVICE_CALLBACK_MEMBER(ikki_state::ikki_irq) MACHINE_CONFIG_START(ikki_state::ikki) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", Z80,8000000/2) /* 4.000MHz */ + MCFG_DEVICE_ADD("maincpu", Z80,CPU_CLOCK/2) /* 4.000MHz */ MCFG_DEVICE_PROGRAM_MAP(ikki_cpu1) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ikki_state, ikki_irq, "screen", 0, 1) - MCFG_DEVICE_ADD("sub", Z80,8000000/2) /* 4.000MHz */ + MCFG_DEVICE_ADD("sub", Z80,CPU_CLOCK/2) /* 4.000MHz */ MCFG_DEVICE_PROGRAM_MAP(ikki_cpu2) - MCFG_DEVICE_PERIODIC_INT_DRIVER(ikki_state, irq0_line_hold, 2*60) + MCFG_DEVICE_PERIODIC_INT_DRIVER(ikki_state, irq0_line_hold, 2*(PIXEL_CLOCK/HTOTAL/VTOTAL)) MCFG_QUANTUM_PERFECT_CPU("maincpu") /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) -// MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) - MCFG_SCREEN_SIZE(32*8, 32*8+3*8) - MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) + MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) MCFG_SCREEN_UPDATE_DRIVER(ikki_state, screen_update_ikki) MCFG_SCREEN_PALETTE("palette") @@ -272,10 +281,10 @@ MACHINE_CONFIG_START(ikki_state::ikki) /* sound hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("sn1", SN76496, 8000000/4) + MCFG_DEVICE_ADD("sn1", SN76496, CPU_CLOCK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_DEVICE_ADD("sn2", SN76496, 8000000/2) + MCFG_DEVICE_ADD("sn2", SN76496, CPU_CLOCK/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) MACHINE_CONFIG_END |