Previous 15994 Revisions Next

r11907 Sunday 12th June, 2011 at 12:38:55 UTC by Robbbert
(nw) MK14 - modernised.
[src/mess/drivers]mk14.c
[src/mess/layout]mk14.lay

src/mess/layout/mk14.lay
r11906r11907
1717      <bezel element="background">
1818         <bounds left="1" top="1" right="600" bottom="480" />
1919      </bezel>
20      <bezel name="digit0" element="digit">
20      <bezel name="digit7" element="digit">
2121         <bounds left="100" top="105" right="148" bottom="185" />
2222      </bezel>
23      <bezel name="digit1" element="digit">
23      <bezel name="digit6" element="digit">
2424         <bounds left="148" top="105" right="196" bottom="185" />
2525      </bezel>
26      <bezel name="digit2" element="digit">
26      <bezel name="digit5" element="digit">
2727         <bounds left="196" top="105" right="244" bottom="185" />
2828      </bezel>
29      <bezel name="digit3" element="digit">
29      <bezel name="digit4" element="digit">
3030         <bounds left="244" top="105" right="292" bottom="185" />
3131      </bezel>
32      <bezel name="digit4" element="digit">
32      <bezel name="digit3" element="digit">
3333         <bounds left="292" top="105" right="340" bottom="185" />
3434      </bezel>
35      <bezel name="digit5" element="digit">
35      <bezel name="digit2" element="digit">
3636         <bounds left="340" top="105" right="388" bottom="185" />
3737      </bezel>
38      <bezel name="digit6" element="digit">
38      <bezel name="digit1" element="digit">
3939         <bounds left="388" top="105" right="436" bottom="185" />
4040      </bezel>
41      <bezel name="digit7" element="digit">
41      <bezel name="digit0" element="digit">
4242         <bounds left="436" top="105" right="484" bottom="185" />
4343      </bezel>
4444   </view>
src/mess/drivers/mk14.c
r11906r11907
55        20/11/2009 Skeleton driver.
66
77****************************************************************************/
8#define ADDRESS_MAP_MODERN
89
910#include "emu.h"
1011#include "cpu/scmp/scmp.h"
r11906r11907
1819   mk14_state(const machine_config &mconfig, device_type type, const char *tag)
1920      : driver_device(mconfig, type, tag) { }
2021
22   DECLARE_READ8_MEMBER(keyboard_r);
23   DECLARE_WRITE8_MEMBER(display_w);
2124};
2225
2326/*
r11906r11907
3639F00-FFF  256 bytes RAM (Standard) / VDU RAM  Decoded by 1111
3740
3841*/
39static const char *const keynames[] = {
40   "LINE0", "LINE1", "LINE2", "LINE3",
41   "LINE4", "LINE5", "LINE6", "LINE7"
42};
4342
44static READ8_HANDLER(keyboard_r)
43
44READ8_MEMBER( mk14_state::keyboard_r )
4545{
46   if (offset < 8) {
47      return input_port_read(space->machine(), keynames[offset]);
48   } else {
46   if (offset < 8)
47   {
48      char kbdrow[6];
49      sprintf(kbdrow,"X%X",offset);
50      return input_port_read(machine(), kbdrow);
51   }
52   else
4953      return 0xff;
50   }
5154}
5255
53static WRITE8_HANDLER(display_w)
56WRITE8_MEMBER( mk14_state::display_w )
5457{
55   if (offset < 8 ) {
56      output_set_digit_value(7-offset, data);
57   } else {
58   if (offset < 8 )
59      output_set_digit_value(offset, data);
60   else
61   {
5862      //logerror("write %02x to %02x\n",data,offset);
5963   }
6064}
6165
62static ADDRESS_MAP_START(mk14_mem, AS_PROGRAM, 8)
66static ADDRESS_MAP_START(mk14_mem, AS_PROGRAM, 8, mk14_state)
6367   ADDRESS_MAP_UNMAP_HIGH
6468   ADDRESS_MAP_GLOBAL_MASK(0x0fff)
6569   AM_RANGE(0x000, 0x1ff) AM_ROM AM_MIRROR(0x600) // ROM
6670   AM_RANGE(0x800, 0x87f) AM_RAM AM_MIRROR(0x600) // 128 I/O chip RAM
67   AM_RANGE(0x880, 0x8ff) AM_DEVREADWRITE("ic8", ins8154_r, ins8154_w) AM_MIRROR(0x600) // I/O
71   AM_RANGE(0x880, 0x8ff) AM_DEVREADWRITE_LEGACY("ic8", ins8154_r, ins8154_w) AM_MIRROR(0x600) // I/O
6872   AM_RANGE(0x900, 0x9ff) AM_READWRITE(keyboard_r, display_w) AM_MIRROR(0x400)
6973   AM_RANGE(0xb00, 0xbff) AM_RAM // VDU RAM
7074   AM_RANGE(0xf00, 0xfff) AM_RAM // Standard RAM
r11906r11907
7377
7478/* Input ports */
7579static INPUT_PORTS_START( mk14 )
76   PORT_START("LINE0")
80   PORT_START("X0")
7781      PORT_BIT(0x0F, IP_ACTIVE_LOW, IPT_UNUSED)
7882      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
7983      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
8084      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
8185      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
82   PORT_START("LINE1")
86   PORT_START("X1")
8387      PORT_BIT(0x0F, IP_ACTIVE_LOW, IPT_UNUSED)
8488      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
8589      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
8690      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
8791      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
88   PORT_START("LINE2")
92   PORT_START("X2")
8993      PORT_BIT(0x0F, IP_ACTIVE_LOW, IPT_UNUSED)
9094      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
9195      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GO") PORT_CODE(KEYCODE_F1)
9296      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
9397      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
94   PORT_START("LINE3")
98   PORT_START("X3")
9599      PORT_BIT(0x0F, IP_ACTIVE_LOW, IPT_UNUSED)
96100      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
97101      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MEM") PORT_CODE(KEYCODE_F2)
98102      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
99103      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
100   PORT_START("LINE4")
104   PORT_START("X4")
101105      PORT_BIT(0x0F, IP_ACTIVE_LOW, IPT_UNUSED)
102106      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
103107      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("AB") PORT_CODE(KEYCODE_F3)
104108      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
105109      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
106   PORT_START("LINE5")
110   PORT_START("X5")
107111      PORT_BIT(0x0F, IP_ACTIVE_LOW, IPT_UNUSED)
108112      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
109113      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
110114      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
111115      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
112   PORT_START("LINE6")
116   PORT_START("X6")
113117      PORT_BIT(0x0F, IP_ACTIVE_LOW, IPT_UNUSED)
114118      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
115119      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
116120      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
117121      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
118   PORT_START("LINE7")
122   PORT_START("X7")
119123      PORT_BIT(0x0F, IP_ACTIVE_LOW, IPT_UNUSED)
120124      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
121125      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TERM") PORT_CODE(KEYCODE_F4)
r11906r11907
138142};
139143
140144static MACHINE_CONFIG_START( mk14, mk14_state )
141    /* basic machine hardware */
145   /* basic machine hardware */
142146   // IC1 1SP-8A/600 (8060) SC/MP Microprocessor
143    MCFG_CPU_ADD("maincpu", INS8060, XTAL_4_433619MHz)
144    MCFG_CPU_PROGRAM_MAP(mk14_mem)
147   MCFG_CPU_ADD("maincpu", INS8060, XTAL_4_433619MHz)
148   MCFG_CPU_PROGRAM_MAP(mk14_mem)
145149
146    MCFG_MACHINE_RESET(mk14)
150   MCFG_MACHINE_RESET(mk14)
147151
148152   /* video hardware */
149153   MCFG_DEFAULT_LAYOUT(layout_mk14)
r11906r11907
154158
155159/* ROM definition */
156160ROM_START( mk14 )
157    ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
161   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
158162   // IC2,3 74S571 512 x 4 bit ROM
159163   ROM_LOAD( "scios.bin", 0x0000, 0x0200, CRC(8b667daa) SHA1(802dc637ce5391a2a6627f76f919b12a869b56ef))
160164ROM_END
161165
162166/* Driver */
163167
164/*    YEAR  NAME   PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY                   FULLNAME     FLAGS */
165COMP( 1977, mk14,  0,       0,      mk14,      mk14,    0,    "Science of Cambridge",   "MK-14",      GAME_NO_SOUND)
166
168/*    YEAR  NAME   PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY              FULLNAME     FLAGS */
169COMP( 1977, mk14,  0,       0,      mk14,      mk14,      0, "Science of Cambridge", "MK-14", GAME_NO_SOUND)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team