summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Frank Palazzolo <frank@avoidspikes.com>2017-06-06 00:38:10 -0400
committer Vas Crabb <cuavas@users.noreply.github.com>2017-06-06 14:38:10 +1000
commit101cc6720263a729a28bf4131b941d182de91422 (patch)
tree64845d2dc561b206b972409f1260fcad3e007cc9 /src
parenta29e43a74cecc09815aa1b21e99d4f64968f7fc5 (diff)
Fix mametesters bug #3041 (#2359)
* starshp1: Fast/Slow control from toggled to momentary, as in real game * Update clocks per latest information * Add note about Throttle Level behaviour * Change format of comments
Diffstat (limited to 'src')
-rw-r--r--src/mame/audio/starshp1.cpp2
-rw-r--r--src/mame/drivers/starshp1.cpp5
-rw-r--r--src/mame/includes/starshp1.h16
3 files changed, 17 insertions, 6 deletions
diff --git a/src/mame/audio/starshp1.cpp b/src/mame/audio/starshp1.cpp
index e36d5f8744d..b9f58ada159 100644
--- a/src/mame/audio/starshp1.cpp
+++ b/src/mame/audio/starshp1.cpp
@@ -26,7 +26,7 @@
#define STARSHP1_SL2_SND NODE_17
/* Timing signals */
-#define STARSHP1_HSYNC 15750 /* per manual */
+#define STARSHP1_HSYNC (STARSHP1_PIXEL_CLOCK / STARSHP1_HTOTAL)
#define STARSHP1_S1V STARSHP1_HSYNC / 2
#define STARSHP1_S128V STARSHP1_S1V / 128
diff --git a/src/mame/drivers/starshp1.cpp b/src/mame/drivers/starshp1.cpp
index dbd09fae4e1..5f57715c250 100644
--- a/src/mame/drivers/starshp1.cpp
+++ b/src/mame/drivers/starshp1.cpp
@@ -197,7 +197,10 @@ static INPUT_PORTS_START( starshp1 )
PORT_DIPNAME( 0x20, 0x20, "Extended Play" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_TOGGLE
+ // IPT_BUTTON3 is the Speed lever (Throttle)
+ // This is _not_ IPT_TOGGLE, even though it looks like one.
+ // It returns to SLOW unless you hold it down (FAST)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("VBLANK")
diff --git a/src/mame/includes/starshp1.h b/src/mame/includes/starshp1.h
index fc4e239271d..a376c2ab8ec 100644
--- a/src/mame/includes/starshp1.h
+++ b/src/mame/includes/starshp1.h
@@ -14,8 +14,16 @@
* probably too low. I suspect that screen is not really
* 512 pixels wide -- most likely 384, which would give 60Hz
*
- * Some of the graphics, like the starfield, is clocked with the
- * 12MHz signal, effectively doubling the horizontal resolution
+ * Based on photographs of the PCB, and analysis of videos of
+ * actual gameplay, the horizontal screen really is 384 clocks.
+ *
+ * However, some of the graphics, like the starfield, are
+ * clocked with the 12MHz signal. This effectively doubles
+ * the horizontal resolution:
+ *
+ * 6.048Mhz clocks 12.096Mhz clocks
+ * Horizontal Visible Area 384 (0x180) 768 (0x300)
+ * Horizontal Blanking Time 128 (0x080) 256 (0x100)
*/
#include "sound/discrete.h"
@@ -24,8 +32,8 @@
#define STARSHP1_MASTER_CLOCK (12096000)
#define STARSHP1_CPU_CLOCK (STARSHP1_MASTER_CLOCK / 16)
-#define STARSHP1_PIXEL_CLOCK (STARSHP1_MASTER_CLOCK / 2)
-#define STARSHP1_HTOTAL (0x200)
+#define STARSHP1_PIXEL_CLOCK (STARSHP1_MASTER_CLOCK)
+#define STARSHP1_HTOTAL (0x300)
#define STARSHP1_HBEND (0x000)
#define STARSHP1_HBSTART (0x200)
#define STARSHP1_VTOTAL (0x106)