summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Alex W. Jackson <alex.w.jackson@gmail.com>2014-04-07 00:02:01 +0000
committer Alex W. Jackson <alex.w.jackson@gmail.com>2014-04-07 00:02:01 +0000
commit4afefdf4b6e8f15d65e77c0477c83d031acdd510 (patch)
tree6878a8ab01539d40f8de62889e36870785219d0d
parentb67f2f5c8a7eb179b948f5385995f5b8502913a6 (diff)
toaplan1.c: correct SCREEN_RAW_PARAMS for all games based on CRTC registers [Alex Jackson]
-rw-r--r--src/mame/drivers/toaplan1.c48
1 files changed, 20 insertions, 28 deletions
diff --git a/src/mame/drivers/toaplan1.c b/src/mame/drivers/toaplan1.c
index aab5bc7b33f..6099b31c63f 100644
--- a/src/mame/drivers/toaplan1.c
+++ b/src/mame/drivers/toaplan1.c
@@ -448,10 +448,9 @@ Stephh's and AWJ's notes (based on the games M68000 and Z80 code and some tests)
- Spelling error on the Sound Check screen: "BUTTAN" instead of "BUTTON".
- This set and 'outzonec' have a hidden use for the two "Unused" Dip Switches.
If DSWA bit 0 ("Unused") and DSWB bit 7 (also "Unused") are both set to ON and
- P2 joystick is held DOWN during startup, video registers 0x300008 and 0x340000
- are loaded with different values than usual (code at 0x013868 and 0x013904).
- Unfortunately, whatever difference this is supposed to make to the display is
- not currently known nor emulated by MAME :(
+ P2 joystick is held DOWN during startup, the CRTC registers are programmed for a
+ smaller VTOTAL than usual, giving a higher frame rate but cutting off the edges
+ of the screen (the effect of this isn't correctly emulated yet)
- Likewise, if DSWA bit 0 is ON and DSWB bit 7 is OFF, the game never starts up
(it seems to infinitely repeat one of the RAM tests)
@@ -620,27 +619,6 @@ To Do:
#include "includes/toaplan1.h"
#include "sound/3812intf.h"
-#define PIXEL_CLOCK (XTAL_28MHz/4)
-
-/* freq V Hz H kHz
-Fire Shark 57.6132 14.82 --> 472.33 * 257.23 *note: H may be inaccurate
-Vimana 57.6125 14.78 --> 473.61 * 256.54 *note: H may be inaccurate
-
-** earlier measurements from another pcb owner, why are some of these off by 2Hz???
-Hellfire 57.59 ?
-Truxton 57.59 ?
-Rally Bike 55.14 ?
-Vimana 55.14 ?
-
-*/
-#define HTOTAL (464)
-#define HBEND (0)
-#define HBSTART (320)
-
-#define VTOTAL (262)
-#define VBEND (0)
-#define VBSTART (240)
-
/***************************** 68000 Memory Map *****************************/
@@ -1787,6 +1765,20 @@ WRITE_LINE_MEMBER(toaplan1_state::irqhandler)
m_audiocpu->set_input_line(0, state);
}
+#define PIXEL_CLOCK (XTAL_28MHz/4)
+
+// HTOTAL and VTOTAL taken from CRTC registers (toaplan1_bcu_control_w)
+// rallybik, demonwld and outzone program a larger VTOTAL than the other
+// games, giving them a lower frame rate
+
+#define HTOTAL ((224+1)*2)
+#define HBEND (0)
+#define HBSTART (320)
+
+#define VTOTAL ((134+1)*2)
+#define VTOTAL55 ((140+1)*2)
+#define VBEND (0)
+#define VBSTART (240)
static MACHINE_CONFIG_START( rallybik, toaplan1_rallybik_state )
@@ -1807,7 +1799,7 @@ static MACHINE_CONFIG_START( rallybik, toaplan1_rallybik_state )
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
+ MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL55, VBEND, VBSTART)
MCFG_SCREEN_UPDATE_DRIVER(toaplan1_rallybik_state, screen_update_rallybik)
MCFG_SCREEN_VBLANK_DRIVER(toaplan1_rallybik_state, screen_eof_rallybik)
MCFG_SCREEN_PALETTE("palette")
@@ -1965,7 +1957,7 @@ static MACHINE_CONFIG_START( demonwld, toaplan1_state )
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND+16, VBSTART+16)
+ MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL55, VBEND+16, VBSTART+16)
MCFG_SCREEN_UPDATE_DRIVER(toaplan1_state, screen_update_toaplan1)
MCFG_SCREEN_VBLANK_DRIVER(toaplan1_state, screen_eof_toaplan1)
MCFG_SCREEN_PALETTE("palette")
@@ -2039,7 +2031,7 @@ static MACHINE_CONFIG_START( outzone, toaplan1_state )
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
+ MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL55, VBEND, VBSTART)
MCFG_SCREEN_UPDATE_DRIVER(toaplan1_state, screen_update_toaplan1)
MCFG_SCREEN_VBLANK_DRIVER(toaplan1_state, screen_eof_toaplan1)
MCFG_SCREEN_PALETTE("palette")