summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorGravatarGravatar Robbbert <robbbert@users.noreply.github.com>2012-09-12 13:24:51 +0000
committerGravatarGravatar Robbbert <robbbert@users.noreply.github.com>2012-09-12 13:24:51 +0000
commitdec248d2bfdf7161d010a09b253dc6b15eb91a04 (patch)
tree93a29a8aae174076cf34676946f2f52f38e8e77a /src
parentfe659e80fda65fbc2b40bf3d486c68741c9f5d0d (diff)
rotation: added inputs and diagnostic keyboard.
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/g627.c105
-rw-r--r--src/mame/layout/g627.lay6
2 files changed, 105 insertions, 6 deletions
diff --git a/src/mame/drivers/g627.c b/src/mame/drivers/g627.c
index b8cf858453f..09162b464d8 100644
--- a/src/mame/drivers/g627.c
+++ b/src/mame/drivers/g627.c
@@ -17,10 +17,8 @@
ToDo:
- Battery backup
-- Inputs
- Outputs
-- Displays / Layout
-- Diagnostic keyboard
+- Displays / Layout to fix
- Possibility of a rom missing (most likely it is optional)
*******************************************************************************/
@@ -55,6 +53,7 @@ protected:
virtual void machine_reset();
private:
UINT8 m_seg[6];
+ UINT8 m_portc;
};
@@ -73,25 +72,119 @@ static ADDRESS_MAP_START( g627_io, AS_IO, 8, g627_state )
ADDRESS_MAP_END
static INPUT_PORTS_START( g627 )
+ PORT_START("X0")
+ //bits 0,1 : optical encoder for precise table alignment. Correct position = 3.
+ //bit2-7 : position of table as it turns, using Gray code.
+ PORT_START("X1")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Centre TB") PORT_CODE(KEYCODE_Q)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Bank Shot Outlane") PORT_CODE(KEYCODE_W)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Spinner") PORT_CODE(KEYCODE_E)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("8 Ball Target") PORT_CODE(KEYCODE_R)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_START3) PORT_NAME("Call East")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_START2) PORT_NAME("Call South")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Call North")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_START4) PORT_NAME("Call West")
+ PORT_START("X2")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Bottom TB") PORT_CODE(KEYCODE_Y)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Left Flipper Return") PORT_CODE(KEYCODE_U)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("3/11 Target") PORT_CODE(KEYCODE_I)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("1/9 Target") PORT_CODE(KEYCODE_O)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("North Slam")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("North Test") PORT_CODE(KEYCODE_9)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("North Coin")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("North Tilt") PORT_CODE(KEYCODE_T)
+ PORT_START("X3")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Top Slingshot") PORT_CODE(KEYCODE_O)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Bank Shot Advance") PORT_CODE(KEYCODE_A)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("4/12 Target") PORT_CODE(KEYCODE_S)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("2/10 Target") PORT_CODE(KEYCODE_D)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("South Slam")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("South Test") PORT_CODE(KEYCODE_0)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_COIN2) PORT_NAME("South Coin")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("South Tilt")
+ PORT_START("X4")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Right Slingshot") PORT_CODE(KEYCODE_F)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("OutHole") PORT_CODE(KEYCODE_X)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("5/13 Target") PORT_CODE(KEYCODE_G)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("4/16 Target") PORT_CODE(KEYCODE_H)
+ PORT_START("X5")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Left Slingshot") PORT_CODE(KEYCODE_J)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Right Flipper Return") PORT_CODE(KEYCODE_K)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Right Out Lane") PORT_CODE(KEYCODE_L)
+ PORT_START("X6")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Top TB") PORT_CODE(KEYCODE_COLON)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("7/15 Target") PORT_CODE(KEYCODE_QUOTE)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("10 Points") PORT_CODE(KEYCODE_EQUALS)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Break Shot Hole") PORT_CODE(KEYCODE_Z)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Left Out Lane") PORT_CODE(KEYCODE_MINUS)
+
+ // Diagnostic Keyboard: Press GAME then END then TEST#. Press GAME etc for more tests.
+ // Pressing test 8 at any time will instantly reset the NVRAM.
+ PORT_START("Y0")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("3") PORT_CODE(KEYCODE_3_PAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("2") PORT_CODE(KEYCODE_2_PAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("0") PORT_CODE(KEYCODE_0_PAD)
+ PORT_START("Y1")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("7") PORT_CODE(KEYCODE_7_PAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("6") PORT_CODE(KEYCODE_6_PAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("4") PORT_CODE(KEYCODE_4_PAD)
+ PORT_START("Y2")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("SET") PORT_CODE(KEYCODE_PLUS_PAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME(".") PORT_CODE(KEYCODE_DEL_PAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("9") PORT_CODE(KEYCODE_9_PAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("8") PORT_CODE(KEYCODE_8_PAD)
+ PORT_START("Y3")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test 3") PORT_CODE(KEYCODE_B)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test 2") PORT_CODE(KEYCODE_V)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test 1") PORT_CODE(KEYCODE_C)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("GAME") PORT_CODE(KEYCODE_ENTER_PAD)
+ PORT_START("Y4")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test 7")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test 6") PORT_CODE(KEYCODE_COMMA)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test 5") PORT_CODE(KEYCODE_M)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test 4") PORT_CODE(KEYCODE_N)
+ PORT_START("Y5")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("END") PORT_CODE(KEYCODE_END)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test 10")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test 9")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test 8") PORT_CODE(KEYCODE_STOP)
INPUT_PORTS_END
void g627_state::machine_reset()
{
+
}
+// inputs
READ8_MEMBER( g627_state::porta_r )
{
+ if (m_portc < 7)
+ {
+ char kbdrow[6];
+ sprintf(kbdrow,"X%X",m_portc);
+ return ioport(kbdrow)->read();
+ }
return 0;
}
+// diagnostic keyboard
READ8_MEMBER( g627_state::portb_r )
{
+ if (m_portc < 6)
+ {
+ char kbdrow[6];
+ sprintf(kbdrow,"Y%X",m_portc);
+ return ioport(kbdrow)->read();
+ }
return 0;
}
// write the 6 digits of 1 display panel
WRITE8_MEMBER( g627_state::portc_w )
{
+ m_portc = data;
if (data < 7)
for (int i = 0; i < 6; i++)
output_set_digit_value(data * 10 + i, m_seg[i]);
@@ -102,8 +195,8 @@ WRITE8_MEMBER( g627_state::disp_w )
{
static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0, 0, 0, 0, 0, 0 };
offset <<= 1;
- m_seg[offset]=patterns[data>>4];
- m_seg[++offset]=patterns[data&15];
+ m_seg[offset] = patterns[data>>4];
+ m_seg[++offset] = patterns[data&15];
}
static I8156_INTERFACE(i8156_intf)
@@ -135,7 +228,7 @@ MACHINE_CONFIG_END
/ Rotation VIII (09/1978)
/-------------------------------------------------------------------*/
ROM_START(rotation)
- ROM_REGION(0x10000, "maincpu", 0) // schematic shows 4x 2716 roms
+ ROM_REGION(0x10000, "maincpu", ROMREGION_ERASEFF) // schematic shows 4x 2716 roms
ROM_LOAD("rot-a117.dat", 0x0000, 0x0800, CRC(7bb6beb3) SHA1(5ee62246032158c68d426c11a4a9a889ee7655d7))
ROM_LOAD("rot-b117.dat", 0x0800, 0x0800, CRC(538e37b2) SHA1(d283ac4d0024388b92b6494fcde63957b705bf48))
ROM_LOAD("rot-c117.dat", 0x1000, 0x0800, CRC(3321ff08) SHA1(d6d94fea27ef58ca648b2829b32d62fcec108c9b))
diff --git a/src/mame/layout/g627.lay b/src/mame/layout/g627.lay
index 470c4124a28..e1606b322d1 100644
--- a/src/mame/layout/g627.lay
+++ b/src/mame/layout/g627.lay
@@ -141,6 +141,12 @@
<bezel name="digit54" element="digit">
<bounds left="54" top="345" right="88" bottom="384" />
</bezel>
+ <bezel name="digit53" element="digit">
+ <bounds left="98" top="345" right="132" bottom="384" />
+ </bezel>
+ <bezel name="digit52" element="digit">
+ <bounds left="142" top="345" right="176" bottom="384" />
+ </bezel>
<!-- Match / Balls Left -->
<bezel name="digit51" element="digit">