Previous 199869 Revisions Next

r36851 Tuesday 31st March, 2015 at 21:47:35 UTC by hap
(MESS)New working game added
-----------------
Kosmos Astro [hap, Sean Riddle]
[src/mess/drivers]hh_tms1k.c
[src/mess/includes]hh_tms1k.h
[src/mess/layout]astro.lay

trunk/src/mess/drivers/hh_tms1k.c
r245362r245363
13441344  * TMS1470NLHL MP1133 (die labeled TMS1400 MP1133)
13451345  * 9digit 7seg VFD display + 8 LEDs(4 green, 4 yellow), no sound
13461346
1347  x
1347  This is an astrological calculator, and also supports 4-function
1348  calculations. Refer to the official manual on how to use this device.
13481349
13491350***************************************************************************/
13501351
1352void hh_tms1k_state::astro_display()
1353{
1354   // declare 7segs
1355   for (int y = 0; y < 9; y++)
1356      m_display_segmask[y] = 0xff;
1357
1358   display_matrix(8, 10, m_o, m_r);
1359}
1360
13511361WRITE16_MEMBER(hh_tms1k_state::astro_write_r)
13521362{
1363   // R0-R7: input mux
1364   m_inp_mux = data & 0xff;
1365   
1366   // R0-R9: select digit/leds
1367   m_r = data;
1368   astro_display();
13531369}
13541370
13551371WRITE16_MEMBER(hh_tms1k_state::astro_write_o)
13561372{
1373   // O0-O7: digit segments/leds
1374   m_o = data;
1375   astro_display();
13571376}
13581377
13591378READ8_MEMBER(hh_tms1k_state::astro_read_k)
13601379{
1361   return 0;
1380   return read_inputs(8);
13621381}
13631382
13641383
13651384static INPUT_PORTS_START( astro )
1385   PORT_START("IN.0") // R0
1386   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
1387   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
1388   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE"/Sun")
1389   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
1390
1391   PORT_START("IN.1") // R1
1392   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
1393   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
1394   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY"/Mercury")
1395   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
1396
1397   PORT_START("IN.2") // R2
1398   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
1399   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
1400   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-/Venus")
1401   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
1402
1403   PORT_START("IN.3") // R3
1404   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
1405   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
1406   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+/Mars")
1407   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
1408
1409   PORT_START("IN.4") // R4
1410   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
1411   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
1412   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=/Astro")
1413   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
1414
1415   PORT_START("IN.5") // R5
1416   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_NAME("B1")
1417   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("B2")
1418   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME(".")
1419   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
1420
1421   PORT_START("IN.6") // R6
1422   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("C")
1423   PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
1424
1425   PORT_START("IN.7") // R7
1426   PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
1427   PORT_CONFNAME( 0x08, 0x08, "Mode" )
1428   PORT_CONFSETTING(    0x00, "Calculator" )
1429   PORT_CONFSETTING(    0x08, "Astro" )
13661430INPUT_PORTS_END
13671431
13681432
13691433static MACHINE_CONFIG_START( astro, hh_tms1k_state )
13701434
13711435   /* basic machine hardware */
1372   MCFG_CPU_ADD("maincpu", TMS1470, 400000) // approximation - RC osc. R=4.7K, C=33pf, but unknown RC curve
1436   MCFG_CPU_ADD("maincpu", TMS1470, 450000) // approximation - RC osc. R=4.7K, C=33pf, but unknown RC curve
13731437   MCFG_TMS1XXX_READ_K_CB(READ8(hh_tms1k_state, astro_read_k))
13741438   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(hh_tms1k_state, astro_write_r))
13751439   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(hh_tms1k_state, astro_write_o))
r245362r245363
13991463  Press the R key to start, followed by a set of unique numbers and E.
14001464  Refer to the official manual for more information.
14011465
1402
14031466***************************************************************************/
14041467
14051468WRITE16_MEMBER(hh_tms1k_state::comp4_write_r)
r245362r245363
25932656CONS( 1979, starwbc,   0,        0, starwbc,   starwbc,   driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command", GAME_SUPPORTS_SAVE )
25942657CONS( 1979, starwbcp,  starwbc,  0, starwbc,   starwbc,   driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command (prototype)", GAME_SUPPORTS_SAVE )
25952658
2596COMP( 1979, astro,     0,        0, astro,     astro,     driver_device, 0, "Kosmos", "Astro", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW | GAME_NOT_WORKING )
2659COMP( 1979, astro,     0,        0, astro,     astro,     driver_device, 0, "Kosmos", "Astro", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
25972660
25982661CONS( 1977, comp4,     0,        0, comp4,     comp4,     driver_device, 0, "Milton Bradley", "Comp IV", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
25992662CONS( 1978, simon,     0,        0, simon,     simon,     driver_device, 0, "Milton Bradley", "Simon (Rev. A)", GAME_SUPPORTS_SAVE )
trunk/src/mess/includes/hh_tms1k.h
r245362r245363
101101   DECLARE_WRITE16_MEMBER(starwbc_write_o);
102102   DECLARE_READ8_MEMBER(starwbc_read_k);
103103
104   void astro_display();
104105   DECLARE_WRITE16_MEMBER(astro_write_r);
105106   DECLARE_WRITE16_MEMBER(astro_write_o);
106107   DECLARE_READ8_MEMBER(astro_read_k);
trunk/src/mess/layout/astro.lay
r245362r245363
55
66   <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
77
8   <element name="text_sun"><text string="SUN"><color red="0.66" green="0.66" blue="0.7" /></text></element>
9   <element name="text_mercury"><text string="MERCURY"><color red="0.66" green="0.66" blue="0.7" /></text></element>
10   <element name="text_venus"><text string="VENUS"><color red="0.66" green="0.66" blue="0.7" /></text></element>
11   <element name="text_mars"><text string="MARS"><color red="0.66" green="0.66" blue="0.7" /></text></element>
812
13   <element name="led_g" defstate="0">
14      <disk state="1"><color red="0.25" green="1.0" blue="0.25" /></disk>
15      <disk state="0"><color red="0.05" green="0.2" blue="0.05" /></disk>
16   </element>
17   <element name="led_y" defstate="0">
18      <disk state="1"><color red="1.0" green="1.0" blue="0.25" /></disk>
19      <disk state="0"><color red="0.2" green="0.2" blue="0.05" /></disk>
20   </element>
21
22   <element name="digit" defstate="0">
23      <led7seg><color red="0.2" green="1.0" blue="0.85" /></led7seg>
24   </element>
25
26
927<!-- build screen -->
1028
1129   <view name="Internal Layout">
12      <bounds left="0" right="47" top="0" bottom="53" />
30      <bounds left="0" right="90" top="0" bottom="32" />
1331      <bezel element="static_black">
14         <bounds left="0" right="47" top="0" bottom="53" />
32         <bounds left="0" right="90" top="0" bottom="32" />
1533      </bezel>
1634
35      <bezel name="digit0" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel>
36      <bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel>
37      <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel>
38      <bezel name="digit3" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel>
39      <bezel name="digit4" element="digit"><bounds x="40" y="0" width="10" height="15" /></bezel>
40      <bezel name="digit5" element="digit"><bounds x="50" y="0" width="10" height="15" /></bezel>
41      <bezel name="digit6" element="digit"><bounds x="60" y="0" width="10" height="15" /></bezel>
42      <bezel name="digit7" element="digit"><bounds x="70" y="0" width="10" height="15" /></bezel>
43      <bezel name="digit8" element="digit"><bounds x="80" y="0" width="10" height="15" /></bezel>
1744
45      <bezel element="text_sun"><bounds x="10" y="22" width="10" height="3" /></bezel>
46      <bezel element="text_mercury"><bounds x="30" y="22" width="10" height="3" /></bezel>
47      <bezel element="text_venus"><bounds x="50" y="22" width="10" height="3" /></bezel>
48      <bezel element="text_mars"><bounds x="70" y="22" width="10" height="3" /></bezel>
49
50      <bezel name="lamp90" element="led_g"><bounds x="10" y="27" width="4" height="4" /></bezel>
51      <bezel name="lamp91" element="led_y"><bounds x="15" y="27" width="4" height="4" /></bezel>
52
53      <bezel name="lamp92" element="led_g"><bounds x="30" y="27" width="4" height="4" /></bezel>
54      <bezel name="lamp93" element="led_y"><bounds x="35" y="27" width="4" height="4" /></bezel>
55
56      <bezel name="lamp94" element="led_g"><bounds x="50" y="27" width="4" height="4" /></bezel>
57      <bezel name="lamp95" element="led_y"><bounds x="55" y="27" width="4" height="4" /></bezel>
58
59      <bezel name="lamp96" element="led_g"><bounds x="70" y="27" width="4" height="4" /></bezel>
60      <bezel name="lamp97" element="led_y"><bounds x="75" y="27" width="4" height="4" /></bezel>
61
62
1863   </view>
1964</mamelayout>


Previous 199869 Revisions Next


© 1997-2024 The MAME Team