src/mess/drivers/pmi80.c
| r12004 | r12005 | |
| 3 | 3 | Tesla PMI-80 |
| 4 | 4 | |
| 5 | 5 | 12/05/2009 Skeleton driver. |
| 6 | 20/06/2011 Made mostly working [Robbbert] |
| 6 | 7 | |
| 7 | 8 | |
| 8 | 9 | ToDo: |
| 9 | | - everything! |
| 10 | 10 | - cassette |
| 11 | | - keyboard |
| 12 | | - 9 x 7-segment display |
| 11 | - keyboard to be finished |
| 13 | 12 | - artwork |
| 14 | 13 | |
| 14 | |
| 15 | Notes: |
| 16 | - Keyboard consists of 16 black hex keys, and 9 blue function keys |
| 17 | - The hex keys are 0 thru 9, A thru F on our keyboard |
| 18 | - The function keys are mostly not worked out although I've guessed a few |
| 19 | - The function key labels are RE, I, EX, R, BR, M, L, S, = |
| 20 | - The letter M shows as an inverted U in the display |
| 21 | - Turn it on, it says ''PMI -80'' |
| 22 | - Press any key, it shows a ? at the left |
| 23 | - Press the function key corresponding to what you want to do |
| 24 | - Press the numbers to select an address or whatever |
| 25 | - For example, press M then enter an address, press =, enter data, |
| 26 | press = to increment to next address or to scan through them. |
| 27 | - As for the rest, no idea |
| 28 | - In the layout, there is a 10th digit. It is disabled but if you |
| 29 | enable it (by renaming 'digitx' to 'digit9'), it will display |
| 30 | things. Perhaps it connected to discrete LEDs or output lines. |
| 31 | |
| 15 | 32 | ****************************************************************************/ |
| 16 | 33 | #define ADDRESS_MAP_MODERN |
| 17 | 34 | |
| 18 | 35 | #include "emu.h" |
| 19 | 36 | #include "cpu/i8085/i8085.h" |
| 37 | #include "pmi80.lh" |
| 20 | 38 | |
| 21 | | |
| 22 | 39 | class pmi80_state : public driver_device |
| 23 | 40 | { |
| 24 | 41 | public: |
| 25 | 42 | pmi80_state(const machine_config &mconfig, device_type type, const char *tag) |
| 26 | | : driver_device(mconfig, type, tag) { } |
| 43 | : driver_device(mconfig, type, tag), |
| 44 | m_ledready(0) |
| 45 | { } |
| 27 | 46 | |
| 28 | 47 | DECLARE_READ8_MEMBER(keyboard_r); |
| 29 | 48 | DECLARE_WRITE8_MEMBER(keyboard_w); |
| 49 | DECLARE_WRITE8_MEMBER(leds_w); |
| 30 | 50 | UINT8 m_keyrow; |
| 51 | bool m_ledready; |
| 31 | 52 | }; |
| 32 | 53 | |
| 33 | 54 | |
| r12004 | r12005 | |
| 41 | 62 | WRITE8_MEMBER( pmi80_state::keyboard_w ) |
| 42 | 63 | { |
| 43 | 64 | m_keyrow = data; |
| 65 | m_ledready = TRUE; |
| 44 | 66 | } |
| 45 | 67 | |
| 68 | WRITE8_MEMBER( pmi80_state::leds_w ) |
| 69 | { |
| 70 | if (m_ledready) |
| 71 | { |
| 72 | m_ledready = FALSE; |
| 73 | output_set_digit_value(m_keyrow^0xff, data^0xff); |
| 74 | } |
| 75 | } |
| 76 | |
| 46 | 77 | static ADDRESS_MAP_START(pmi80_mem, AS_PROGRAM, 8, pmi80_state) |
| 47 | 78 | ADDRESS_MAP_UNMAP_HIGH |
| 48 | 79 | AM_RANGE( 0x0000, 0x03ff ) AM_ROM |
| r12004 | r12005 | |
| 52 | 83 | static ADDRESS_MAP_START(pmi80_io, AS_IO, 8, pmi80_state) |
| 53 | 84 | ADDRESS_MAP_UNMAP_HIGH |
| 54 | 85 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 86 | AM_RANGE(0xf8, 0xf8) AM_WRITE(leds_w) |
| 55 | 87 | AM_RANGE(0xfa, 0xfa) AM_READWRITE(keyboard_r,keyboard_w) |
| 56 | 88 | ADDRESS_MAP_END |
| 57 | 89 | |
| 58 | 90 | /* Input ports */ |
| 59 | 91 | static INPUT_PORTS_START( pmi80 ) |
| 60 | 92 | PORT_START("F6") |
| 61 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 62 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 63 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 93 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) // does nothing |
| 94 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("??") PORT_CODE(KEYCODE_Q) // unknown |
| 95 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) // same as '2' |
| 64 | 96 | PORT_BIT(0x8F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 65 | 97 | PORT_START("F7") |
| 66 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 67 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 68 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 98 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) |
| 99 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 100 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 69 | 101 | PORT_BIT(0x8F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 70 | 102 | PORT_START("F8") |
| 71 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 72 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 73 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 103 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("??") PORT_CODE(KEYCODE_W) // unknown |
| 104 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 105 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 74 | 106 | PORT_BIT(0x8F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 75 | 107 | PORT_START("F9") |
| 76 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 77 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 78 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 108 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("??") PORT_CODE(KEYCODE_R) // unknown |
| 109 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B BC") PORT_CODE(KEYCODE_B) |
| 110 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 HL") PORT_CODE(KEYCODE_9) |
| 79 | 111 | PORT_BIT(0x8F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 80 | 112 | PORT_START("FA") |
| 81 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 82 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 83 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 113 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) // memory mode |
| 114 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 115 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 84 | 116 | PORT_BIT(0x8F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 85 | 117 | PORT_START("FB") |
| 86 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 87 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 88 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 118 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BR") PORT_CODE(KEYCODE_B) // b mode? |
| 119 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 120 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D DE") PORT_CODE(KEYCODE_D) |
| 89 | 121 | PORT_BIT(0x8F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 90 | 122 | PORT_START("FC") |
| 91 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 92 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 93 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 123 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("??") PORT_CODE(KEYCODE_T) // unknown |
| 124 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("??") PORT_CODE(KEYCODE_Y) // unknown |
| 125 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("EX") PORT_CODE(KEYCODE_G) // Go? |
| 94 | 126 | PORT_BIT(0x8F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 95 | 127 | PORT_START("FD") |
| 96 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 97 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 98 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 128 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) // Load tape? |
| 129 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A AF") PORT_CODE(KEYCODE_A) |
| 130 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 SP") PORT_CODE(KEYCODE_8) |
| 99 | 131 | PORT_BIT(0x8F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 100 | 132 | PORT_START("FE") |
| 101 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 102 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 103 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 133 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) // Save tape? |
| 134 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 135 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 104 | 136 | PORT_BIT(0x8F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 105 | 137 | PORT_START("FF") |
| 106 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 107 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 108 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD) |
| 138 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("??") PORT_CODE(KEYCODE_U) // unknown |
| 139 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 140 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 109 | 141 | PORT_BIT(0x8F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 110 | 142 | INPUT_PORTS_END |
| 111 | 143 | |
| r12004 | r12005 | |
| 114 | 146 | { |
| 115 | 147 | } |
| 116 | 148 | |
| 117 | | static VIDEO_START( pmi80 ) |
| 118 | | { |
| 119 | | } |
| 120 | 149 | |
| 121 | | static SCREEN_UPDATE( pmi80 ) |
| 122 | | { |
| 123 | | return 0; |
| 124 | | } |
| 125 | | |
| 126 | 150 | static MACHINE_CONFIG_START( pmi80, pmi80_state ) |
| 127 | 151 | /* basic machine hardware */ |
| 128 | 152 | MCFG_CPU_ADD("maincpu",I8080, XTAL_1MHz) |
| r12004 | r12005 | |
| 132 | 156 | MCFG_MACHINE_RESET(pmi80) |
| 133 | 157 | |
| 134 | 158 | /* video hardware */ |
| 135 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 136 | | MCFG_SCREEN_REFRESH_RATE(50) |
| 137 | | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 138 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 139 | | MCFG_SCREEN_SIZE(640, 480) |
| 140 | | MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) |
| 141 | | MCFG_VIDEO_START(pmi80) |
| 142 | | MCFG_SCREEN_UPDATE(pmi80) |
| 143 | | MCFG_PALETTE_LENGTH(2) |
| 144 | | MCFG_PALETTE_INIT(black_and_white) |
| 159 | MCFG_DEFAULT_LAYOUT(layout_pmi80) |
| 145 | 160 | MACHINE_CONFIG_END |
| 146 | 161 | |
| 147 | 162 | /* ROM definition */ |
| r12004 | r12005 | |
| 153 | 168 | /* Driver */ |
| 154 | 169 | |
| 155 | 170 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 156 | | COMP( 1982, pmi80, 0, 0, pmi80, pmi80, 0, "Tesla", "PMI-80", GAME_NOT_WORKING | GAME_NO_SOUND_HW) |
| 171 | COMP( 1982, pmi80, 0, 0, pmi80, pmi80, 0, "Tesla", "PMI-80", GAME_NO_SOUND_HW) |