src/mess/drivers/mpf1.c
| r5906 | r5907 | |
| 10 | 10 | * Sound: Speaker * |
| 11 | 11 | * * |
| 12 | 12 | * TODO: * |
| 13 | | * Cassette storage emulation * |
| 14 | | * Sound * |
| 13 | * CRT board * |
| 14 | * Speech board * |
| 15 | 15 | * I/O board * |
| 16 | 16 | * MONI/INTR key interrupts * |
| 17 | 17 | * PIO/CTC + interrupt daisy chain * |
| r5906 | r5907 | |
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | 28 | #include "driver.h" |
| 29 | | #include "machine/i8255a.h" |
| 30 | 29 | #include "cpu/z80/z80.h" |
| 30 | #include "machine/i8255a.h" |
| 31 | 31 | #include "machine/z80ctc.h" |
| 32 | 32 | #include "machine/z80pio.h" |
| 33 | 33 | #include "machine/z80sio.h" |
| 34 | | #include "sound/dac.h" |
| 34 | #include "sound/speaker.h" |
| 35 | #include "devices/cassette.h" |
| 35 | 36 | #include "mpf1.lh" |
| 36 | 37 | |
| 37 | 38 | |
| 38 | | #define VERBOSE_LEVEL ( 0 ) |
| 39 | /*************************************************************************** |
| 40 | GLOBAL VARIABLES |
| 41 | ***************************************************************************/ |
| 39 | 42 | |
| 40 | | INLINE void ATTR_PRINTF(2,3) verboselog( int n_level, const char *s_fmt, ... ) |
| 41 | | { |
| 42 | | if( VERBOSE_LEVEL >= n_level ) |
| 43 | | { |
| 44 | | va_list v; |
| 45 | | char buf[ 32768 ]; |
| 46 | | va_start( v, s_fmt ); |
| 47 | | vsprintf( buf, s_fmt, v ); |
| 48 | | va_end( v ); |
| 49 | | // logerror( "%08x: %s", cpu_get_pc(space->cpu), buf ); |
| 50 | | } |
| 51 | | } |
| 52 | | |
| 53 | | |
| 54 | 43 | static emu_timer *led_refresh_timer; |
| 55 | | static INT8 lednum; |
| 56 | | static int led_tone; |
| 57 | | static int led_halt; |
| 58 | | static INT8 keycol; |
| 59 | | static UINT8 kbdlatch; |
| 44 | static UINT8 lednum; |
| 60 | 45 | |
| 61 | 46 | |
| 62 | | static TIMER_CALLBACK( check_halt_callback ) |
| 63 | | { |
| 64 | | // halt-LED; the red one, is turned on when the processor is halted |
| 65 | | // TODO: processor seems to halt, but restarts(?) at 0x0000 after a while -> fix |
| 66 | | led_halt = (UINT8) devtag_get_info_int(machine, "maincpu", CPUINFO_INT_REGISTER + Z80_HALT); |
| 67 | | set_led_status(1, led_tone); |
| 68 | | } |
| 47 | /*************************************************************************** |
| 48 | ADDRESS MAPS |
| 49 | ***************************************************************************/ |
| 69 | 50 | |
| 70 | | |
| 71 | | /* Memory Maps */ |
| 72 | | |
| 73 | 51 | static ADDRESS_MAP_START( mpf1_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 74 | 52 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 75 | 53 | AM_RANGE(0x1000, 0x1fff) AM_RAM |
| r5906 | r5907 | |
| 88 | 66 | AM_RANGE(0x80, 0x83) AM_MIRROR(0x3c) AM_DEVREADWRITE("z80pio", z80pio_r, z80pio_w) |
| 89 | 67 | ADDRESS_MAP_END |
| 90 | 68 | |
| 91 | | /* Input Ports */ |
| 92 | 69 | |
| 93 | | #define KEY_UNUSED( bit ) \ |
| 94 | | PORT_BIT( bit, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 70 | /*************************************************************************** |
| 71 | INPUT PORTS |
| 72 | ***************************************************************************/ |
| 95 | 73 | |
| 96 | 74 | static INPUT_PORTS_START( mpf1 ) |
| 97 | | PORT_START("LINE0") // column 0 |
| 98 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 HL") PORT_CODE(KEYCODE_3) |
| 99 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 HL'") PORT_CODE(KEYCODE_7) |
| 100 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B I*IF") PORT_CODE(KEYCODE_B) |
| 101 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F *PNC'") PORT_CODE(KEYCODE_F) |
| 102 | | KEY_UNUSED( 0x10 ) |
| 103 | | KEY_UNUSED( 0x20 ) |
| 104 | | KEY_UNUSED( 0x40 ) |
| 105 | | KEY_UNUSED( 0x80 ) |
| 75 | PORT_START("row_0") |
| 76 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 HL") PORT_CODE(KEYCODE_3) |
| 77 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 HL'") PORT_CODE(KEYCODE_7) |
| 78 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B I*IF") PORT_CODE(KEYCODE_B) |
| 79 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F *PNC'") PORT_CODE(KEYCODE_F) |
| 80 | PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 106 | 81 | |
| 107 | | PORT_START("LINE1") // column 1 |
| 108 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 DE") PORT_CODE(KEYCODE_2) |
| 109 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 DE'") PORT_CODE(KEYCODE_6) |
| 110 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A SP") PORT_CODE(KEYCODE_A) |
| 111 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E SZ*H'") PORT_CODE(KEYCODE_E) |
| 112 | | KEY_UNUSED( 0x10 ) |
| 113 | | KEY_UNUSED( 0x20 ) |
| 114 | | KEY_UNUSED( 0x40 ) |
| 115 | | KEY_UNUSED( 0x80 ) |
| 82 | PORT_START("row_1") |
| 83 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 DE") PORT_CODE(KEYCODE_2) |
| 84 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 DE'") PORT_CODE(KEYCODE_6) |
| 85 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A SP") PORT_CODE(KEYCODE_A) |
| 86 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E SZ*H'") PORT_CODE(KEYCODE_E) |
| 87 | PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 116 | 88 | |
| 117 | | PORT_START("LINE2") // column 2 |
| 118 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 BC") PORT_CODE(KEYCODE_1) |
| 119 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 BC'") PORT_CODE(KEYCODE_5) |
| 120 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 IY") PORT_CODE(KEYCODE_9) |
| 121 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D *PNC") PORT_CODE(KEYCODE_D) |
| 122 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("STEP") PORT_CODE(KEYCODE_F1) |
| 123 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAPE RD") PORT_CODE(KEYCODE_F5) |
| 124 | | KEY_UNUSED( 0x40 ) |
| 125 | | KEY_UNUSED( 0x80 ) |
| 89 | PORT_START("row_2") |
| 90 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 BC") PORT_CODE(KEYCODE_1) |
| 91 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 BC'") PORT_CODE(KEYCODE_5) |
| 92 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 IY") PORT_CODE(KEYCODE_9) |
| 93 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D *PNC") PORT_CODE(KEYCODE_D) |
| 94 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("STEP") PORT_CODE(KEYCODE_F1) |
| 95 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAPE RD") PORT_CODE(KEYCODE_F5) |
| 96 | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 126 | 97 | |
| 127 | | PORT_START("LINE3") // column 3 |
| 128 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 AF") PORT_CODE(KEYCODE_0) |
| 129 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 AF'") PORT_CODE(KEYCODE_4) |
| 130 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 IX") PORT_CODE(KEYCODE_8) |
| 131 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C SZ*H") PORT_CODE(KEYCODE_C) |
| 132 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GO") PORT_CODE(KEYCODE_F2) |
| 133 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAPE WR") PORT_CODE(KEYCODE_F6) |
| 134 | | KEY_UNUSED( 0x40 ) |
| 135 | | KEY_UNUSED( 0x80 ) |
| 98 | PORT_START("row_3") |
| 99 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 AF") PORT_CODE(KEYCODE_0) |
| 100 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 AF'") PORT_CODE(KEYCODE_4) |
| 101 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 IX") PORT_CODE(KEYCODE_8) |
| 102 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C SZ*H") PORT_CODE(KEYCODE_C) |
| 103 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GO") PORT_CODE(KEYCODE_F2) |
| 104 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAPE WR") PORT_CODE(KEYCODE_F6) |
| 105 | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 136 | 106 | |
| 137 | | PORT_START("LINE4") // column 4 |
| 138 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CBR") PORT_CODE(KEYCODE_N) |
| 139 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PC") PORT_CODE(KEYCODE_M) |
| 140 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("REG") PORT_CODE(KEYCODE_COMMA) |
| 141 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ADR") PORT_CODE(KEYCODE_STOP) |
| 142 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_SLASH) |
| 143 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RELA") PORT_CODE(KEYCODE_RCONTROL) |
| 144 | | KEY_UNUSED( 0x40 ) |
| 145 | | KEY_UNUSED( 0x80 ) |
| 107 | PORT_START("row_4") |
| 108 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CBR") PORT_CODE(KEYCODE_N) |
| 109 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PC") PORT_CODE(KEYCODE_M) |
| 110 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("REG") PORT_CODE(KEYCODE_COMMA) |
| 111 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ADR") PORT_CODE(KEYCODE_STOP) |
| 112 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_SLASH) |
| 113 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RELA") PORT_CODE(KEYCODE_RCONTROL) |
| 114 | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 146 | 115 | |
| 147 | | PORT_START("LINE5") // column 5 |
| 148 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SBR") PORT_CODE(KEYCODE_H) |
| 149 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_J) |
| 150 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DATA") PORT_CODE(KEYCODE_K) |
| 151 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("+") PORT_CODE(KEYCODE_L) |
| 152 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INS") PORT_CODE(KEYCODE_COLON) |
| 153 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MOVE") PORT_CODE(KEYCODE_QUOTE) |
| 154 | | KEY_UNUSED( 0x40 ) |
| 155 | | KEY_UNUSED( 0x80 ) |
| 116 | PORT_START("row_5") |
| 117 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SBR") PORT_CODE(KEYCODE_H) |
| 118 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_J) |
| 119 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DATA") PORT_CODE(KEYCODE_K) |
| 120 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("+") PORT_CODE(KEYCODE_L) |
| 121 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INS") PORT_CODE(KEYCODE_COLON) |
| 122 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MOVE") PORT_CODE(KEYCODE_QUOTE) |
| 123 | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 156 | 124 | |
| 157 | | PORT_START("LINE6") // column 6 |
| 158 | | KEY_UNUSED( 0x01 ) |
| 159 | | KEY_UNUSED( 0x02 ) |
| 160 | | KEY_UNUSED( 0x04 ) |
| 161 | | KEY_UNUSED( 0x08 ) |
| 162 | | KEY_UNUSED( 0x10 ) |
| 163 | | KEY_UNUSED( 0x20 ) |
| 164 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("USER KEY") PORT_CODE(KEYCODE_U) |
| 165 | | KEY_UNUSED( 0x80 ) |
| 125 | PORT_START("user") |
| 126 | PORT_BIT(0x3f, IP_ACTIVE_LOW, IPT_UNUSED) |
| 127 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("USER KEY") PORT_CODE(KEYCODE_U) |
| 128 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 166 | 129 | |
| 167 | | PORT_START("EXTRA") // interrupt keys |
| 168 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MONI") PORT_CODE(KEYCODE_M) // causes NMI ? |
| 169 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INTR") PORT_CODE(KEYCODE_I) // causes INT |
| 130 | PORT_START("extra") // interrupt keys |
| 131 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MONI") PORT_CODE(KEYCODE_M) // causes NMI ? |
| 132 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INTR") PORT_CODE(KEYCODE_I) // causes INT |
| 170 | 133 | INPUT_PORTS_END |
| 171 | 134 | |
| 172 | 135 | static INPUT_PORTS_START( mpf1b ) |
| 173 | | PORT_START("LINE0") // column 0 |
| 174 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 /") PORT_CODE(KEYCODE_3) |
| 175 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 >") PORT_CODE(KEYCODE_7) |
| 176 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B STOP") PORT_CODE(KEYCODE_B) |
| 177 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F LET") PORT_CODE(KEYCODE_F) |
| 178 | | KEY_UNUSED( 0x10 ) |
| 179 | | KEY_UNUSED( 0x20 ) |
| 180 | | KEY_UNUSED( 0x40 ) |
| 181 | | KEY_UNUSED( 0x80 ) |
| 136 | PORT_START("row_0") |
| 137 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 /") PORT_CODE(KEYCODE_3) |
| 138 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 >") PORT_CODE(KEYCODE_7) |
| 139 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B STOP") PORT_CODE(KEYCODE_B) |
| 140 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F LET") PORT_CODE(KEYCODE_F) |
| 141 | PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 182 | 142 | |
| 183 | | PORT_START("LINE1") // column 1 |
| 184 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 *") PORT_CODE(KEYCODE_2) |
| 185 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 <") PORT_CODE(KEYCODE_6) |
| 186 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A CALL") PORT_CODE(KEYCODE_A) |
| 187 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E INPUT") PORT_CODE(KEYCODE_E) |
| 188 | | KEY_UNUSED( 0x10 ) |
| 189 | | KEY_UNUSED( 0x20 ) |
| 190 | | KEY_UNUSED( 0x40 ) |
| 191 | | KEY_UNUSED( 0x80 ) |
| 143 | PORT_START("row_1") |
| 144 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 *") PORT_CODE(KEYCODE_2) |
| 145 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 <") PORT_CODE(KEYCODE_6) |
| 146 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A CALL") PORT_CODE(KEYCODE_A) |
| 147 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E INPUT") PORT_CODE(KEYCODE_E) |
| 148 | PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 192 | 149 | |
| 193 | | PORT_START("LINE2") // column 2 |
| 194 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 -") PORT_CODE(KEYCODE_1) |
| 195 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 =") PORT_CODE(KEYCODE_5) |
| 196 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 P") PORT_CODE(KEYCODE_9) |
| 197 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D PRINT") PORT_CODE(KEYCODE_D) |
| 198 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CONT") PORT_CODE(KEYCODE_F1) |
| 199 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LOAD") PORT_CODE(KEYCODE_F5) |
| 200 | | KEY_UNUSED( 0x40 ) |
| 201 | | KEY_UNUSED( 0x80 ) |
| 150 | PORT_START("row_2") |
| 151 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 -") PORT_CODE(KEYCODE_1) |
| 152 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 =") PORT_CODE(KEYCODE_5) |
| 153 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 P") PORT_CODE(KEYCODE_9) |
| 154 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D PRINT") PORT_CODE(KEYCODE_D) |
| 155 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CONT") PORT_CODE(KEYCODE_F1) |
| 156 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LOAD") PORT_CODE(KEYCODE_F5) |
| 157 | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 202 | 158 | |
| 203 | | PORT_START("LINE3") // column 3 |
| 204 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 +") PORT_CODE(KEYCODE_0) |
| 205 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 * *") PORT_CODE(KEYCODE_4) |
| 206 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 M") PORT_CODE(KEYCODE_8) |
| 207 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C NEXT") PORT_CODE(KEYCODE_C) |
| 208 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RUN") PORT_CODE(KEYCODE_F2) |
| 209 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SAVE") PORT_CODE(KEYCODE_F6) |
| 210 | | KEY_UNUSED( 0x40 ) |
| 211 | | KEY_UNUSED( 0x80 ) |
| 159 | PORT_START("row_3") |
| 160 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 +") PORT_CODE(KEYCODE_0) |
| 161 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 * *") PORT_CODE(KEYCODE_4) |
| 162 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 M") PORT_CODE(KEYCODE_8) |
| 163 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C NEXT") PORT_CODE(KEYCODE_C) |
| 164 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RUN") PORT_CODE(KEYCODE_F2) |
| 165 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SAVE") PORT_CODE(KEYCODE_F6) |
| 166 | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 212 | 167 | |
| 213 | | PORT_START("LINE4") // column 4 |
| 214 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("IF/pgup") PORT_CODE(KEYCODE_PGUP) |
| 215 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TO/down") PORT_CODE(KEYCODE_T) PORT_CODE(KEYCODE_DOWN) |
| 216 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("THEN/pgdn") PORT_CODE(KEYCODE_PGDN) |
| 217 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GOTO") PORT_CODE(KEYCODE_G) |
| 218 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RET/~") PORT_CODE(KEYCODE_R) |
| 219 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GOSUB") PORT_CODE(KEYCODE_O) |
| 220 | | KEY_UNUSED( 0x40 ) |
| 221 | | KEY_UNUSED( 0x80 ) |
| 168 | PORT_START("row_4") |
| 169 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("IF/pgup") PORT_CODE(KEYCODE_PGUP) |
| 170 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TO/down") PORT_CODE(KEYCODE_T) PORT_CODE(KEYCODE_DOWN) |
| 171 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("THEN/pgdn") PORT_CODE(KEYCODE_PGDN) |
| 172 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GOTO") PORT_CODE(KEYCODE_G) |
| 173 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RET/~") PORT_CODE(KEYCODE_R) |
| 174 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GOSUB") PORT_CODE(KEYCODE_O) |
| 175 | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 222 | 176 | |
| 223 | | PORT_START("LINE5") // column 5 |
| 224 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FOR/up") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_UP) |
| 225 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LIST") PORT_CODE(KEYCODE_L) |
| 226 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NEW") PORT_CODE(KEYCODE_N) |
| 227 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) |
| 228 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLR/right") PORT_CODE(KEYCODE_INSERT) PORT_CODE(KEYCODE_RIGHT) |
| 229 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL/left") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_LEFT) |
| 230 | | KEY_UNUSED( 0x40 ) |
| 231 | | KEY_UNUSED( 0x80 ) |
| 177 | PORT_START("row_5") |
| 178 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FOR/up") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_UP) |
| 179 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LIST") PORT_CODE(KEYCODE_L) |
| 180 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NEW") PORT_CODE(KEYCODE_N) |
| 181 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) |
| 182 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLR/right") PORT_CODE(KEYCODE_INSERT) PORT_CODE(KEYCODE_RIGHT) |
| 183 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL/left") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_LEFT) |
| 184 | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 232 | 185 | |
| 233 | | PORT_START("LINE6") // column 6 |
| 234 | | KEY_UNUSED( 0x01 ) |
| 235 | | KEY_UNUSED( 0x02 ) |
| 236 | | KEY_UNUSED( 0x04 ) |
| 237 | | KEY_UNUSED( 0x08 ) |
| 238 | | KEY_UNUSED( 0x10 ) |
| 239 | | KEY_UNUSED( 0x20 ) |
| 240 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) |
| 241 | | KEY_UNUSED( 0x80 ) |
| 186 | PORT_START("user") |
| 187 | PORT_BIT(0x3f, IP_ACTIVE_LOW, IPT_UNUSED) |
| 188 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) |
| 189 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 242 | 190 | |
| 243 | | PORT_START("EXTRA") // interrupt keys |
| 244 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MONI") PORT_CODE(KEYCODE_M) // causes NMI ? |
| 245 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INTR") PORT_CODE(KEYCODE_I) // causes INT |
| 191 | PORT_START("extra") // interrupt keys |
| 192 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MONI") PORT_CODE(KEYCODE_M) // causes NMI ? |
| 193 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INTR") PORT_CODE(KEYCODE_I) // causes INT |
| 246 | 194 | INPUT_PORTS_END |
| 247 | 195 | |
| 248 | | /* Z80 PIO Interface */ |
| 249 | 196 | |
| 197 | /*************************************************************************** |
| 198 | Z80 PIO |
| 199 | ***************************************************************************/ |
| 200 | |
| 250 | 201 | static void mpf1_pio_interrupt(const device_config *device, int state) |
| 251 | 202 | { |
| 252 | 203 | logerror("pio irq state: %02x\n",state); |
| 253 | 204 | } |
| 254 | 205 | |
| 255 | | static const z80pio_interface mpf1_pio_intf = |
| 256 | | { |
| 257 | | DEVCB_LINE(mpf1_pio_interrupt), |
| 258 | | DEVCB_NULL, |
| 259 | | DEVCB_NULL, |
| 260 | | DEVCB_NULL, |
| 261 | | DEVCB_NULL, |
| 262 | | DEVCB_NULL, |
| 263 | | DEVCB_NULL |
| 264 | | }; |
| 265 | 206 | |
| 266 | | /* Z80 CTC Interface */ |
| 207 | /*************************************************************************** |
| 208 | 8255 PPI |
| 209 | ***************************************************************************/ |
| 267 | 210 | |
| 268 | | /* PPI8255 Interface */ |
| 269 | | |
| 270 | | // PA7 = tape EAR = INPUT, meant to be connected to the earphone jacket of a taperecorder |
| 271 | | // ~PC7 = tape MIC = OUTPUT, meant to be connected to the microphone jacket of a taperecorder |
| 272 | | |
| 273 | 211 | static READ8_DEVICE_HANDLER( mpf1_porta_r ) |
| 274 | 212 | { |
| 275 | | static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5" }; |
| 213 | const device_config *cassette = devtag_get_device(device->machine, "cassette"); |
| 214 | UINT8 result = 0x7f; |
| 276 | 215 | |
| 277 | | UINT8 retval; |
| 278 | | for(keycol = 0; keycol < 6; keycol++) |
| 279 | | { |
| 280 | | if( kbdlatch & 0x01 ) break; |
| 281 | | kbdlatch >>= 1; |
| 282 | | } |
| 283 | | verboselog( 0, "Key column for kbd read: %02x\n", keycol ); |
| 284 | | if( keycol != 6 ) |
| 285 | | { |
| 286 | | retval = input_port_read(device->machine, keynames[keycol]); |
| 287 | | } |
| 288 | | else |
| 289 | | { |
| 290 | | retval = 0; |
| 291 | | } |
| 292 | | verboselog( 0, "PPI port A read: %02x\n", retval ); |
| 293 | | return retval; |
| 294 | | } |
| 216 | /* bit 0 to 5, keyboard rows 0 to 5 */ |
| 217 | if (!BIT(lednum, 0)) result &= input_port_read(device->machine, "row_0"); |
| 218 | if (!BIT(lednum, 1)) result &= input_port_read(device->machine, "row_1"); |
| 219 | if (!BIT(lednum, 2)) result &= input_port_read(device->machine, "row_2"); |
| 220 | if (!BIT(lednum, 3)) result &= input_port_read(device->machine, "row_3"); |
| 221 | if (!BIT(lednum, 4)) result &= input_port_read(device->machine, "row_4"); |
| 222 | if (!BIT(lednum, 5)) result &= input_port_read(device->machine, "row_5"); |
| 295 | 223 | |
| 224 | /* bit 6, user key */ |
| 225 | result &= input_port_read(device->machine, "user"); |
| 296 | 226 | |
| 227 | /* bit 7, tape input */ |
| 228 | result |= (cassette_input(cassette) > 0 ? 1 : 0) << 7; |
| 229 | |
| 230 | return result; |
| 231 | } |
| 232 | |
| 297 | 233 | static TIMER_CALLBACK( led_refresh ) |
| 298 | 234 | { |
| 299 | 235 | if (BIT(lednum, 5)) output_set_digit_value(0, param); |
| r5906 | r5907 | |
| 311 | 247 | |
| 312 | 248 | /* timer to update segments */ |
| 313 | 249 | timer_adjust_oneshot(led_refresh_timer, ATTOTIME_IN_USEC(70), led_data); |
| 314 | | |
| 315 | | verboselog(1, "PPI port B (LED Data) write: %02x\n", data); |
| 316 | 250 | } |
| 317 | 251 | |
| 318 | | |
| 319 | 252 | static WRITE8_DEVICE_HANDLER( mpf1_portc_w ) |
| 320 | 253 | { |
| 321 | | const device_config *dac_device = devtag_get_device(device->machine, "dac"); |
| 254 | const device_config *speaker = devtag_get_device(device->machine, "speaker"); |
| 255 | const device_config *cassette = devtag_get_device(device->machine, "cassette"); |
| 322 | 256 | |
| 323 | | kbdlatch = ~data; |
| 324 | | |
| 325 | | /* bits 0-5, led select */ |
| 257 | /* bits 0-5, led select and keyboard latch */ |
| 326 | 258 | lednum = data & 0x3f; |
| 327 | 259 | timer_adjust_oneshot(led_refresh_timer, attotime_never, 0); |
| 328 | 260 | |
| 329 | | data = ~kbdlatch; |
| 261 | /* bit 6, monitor break control */ |
| 330 | 262 | |
| 331 | | // watchdog reset |
| 332 | | watchdog_reset(device->machine); |
| 333 | | |
| 334 | | // TONE led & speaker |
| 335 | | led_tone = (~data & 0x80) >> 7; |
| 336 | | set_led_status(0, led_tone); |
| 337 | | |
| 338 | | // speaker |
| 339 | | dac_data_w(dac_device, 0xFF * led_tone); |
| 340 | | |
| 341 | | verboselog( 1, "PPI port C (LED/Kbd Col select) write: %02x\n", data ); |
| 263 | /* bit 7, tape output, tone and led */ |
| 264 | set_led_status(0, !BIT(data, 7)); |
| 265 | speaker_level_w(speaker, BIT(data, 7)); |
| 266 | cassette_output(cassette, BIT(data, 7)); |
| 342 | 267 | } |
| 343 | 268 | |
| 344 | 269 | |
| 270 | /*************************************************************************** |
| 271 | MACHINE INITIALIZATION |
| 272 | ***************************************************************************/ |
| 345 | 273 | |
| 346 | | static I8255A_INTERFACE( ppi8255_intf ) |
| 274 | static TIMER_CALLBACK( check_halt_callback ) |
| 347 | 275 | { |
| 348 | | DEVCB_HANDLER(mpf1_porta_r), /* Port A read */ |
| 349 | | DEVCB_NULL, /* Port B read */ |
| 350 | | DEVCB_NULL, /* Port C read */ |
| 351 | | DEVCB_NULL, /* Port A write */ |
| 352 | | DEVCB_HANDLER(mpf1_portb_w), /* Port B write */ |
| 353 | | DEVCB_HANDLER(mpf1_portc_w), /* Port C write */ |
| 354 | | }; |
| 276 | // halt-LED; the red one, is turned on when the processor is halted |
| 277 | // TODO: processor seems to halt, but restarts(?) at 0x0000 after a while -> fix |
| 278 | INT64 led_halt = devtag_get_info_int(machine, "maincpu", CPUINFO_INT_REGISTER + Z80_HALT); |
| 279 | set_led_status(1, led_halt); |
| 280 | } |
| 355 | 281 | |
| 356 | | /* Machine Initialization */ |
| 357 | | |
| 358 | 282 | static TIMER_CALLBACK( irq0_callback ) |
| 359 | 283 | { |
| 360 | 284 | irq0_line_hold( cputag_get_cpu(machine, "maincpu") ); |
| r5906 | r5907 | |
| 373 | 297 | timer_pulse(machine, ATTOTIME_IN_HZ(60), NULL, 0, irq0_callback ); |
| 374 | 298 | } |
| 375 | 299 | |
| 376 | | /* Machine Drivers */ |
| 377 | 300 | |
| 301 | /*************************************************************************** |
| 302 | MACHINE DRIVERS |
| 303 | ***************************************************************************/ |
| 304 | |
| 305 | static const cassette_config mpf1_cassette_config = |
| 306 | { |
| 307 | cassette_default_formats, |
| 308 | NULL, |
| 309 | CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED |
| 310 | }; |
| 311 | |
| 312 | static I8255A_INTERFACE( ppi8255_intf ) |
| 313 | { |
| 314 | DEVCB_HANDLER(mpf1_porta_r), |
| 315 | DEVCB_NULL, |
| 316 | DEVCB_NULL, |
| 317 | DEVCB_NULL, |
| 318 | DEVCB_HANDLER(mpf1_portb_w), |
| 319 | DEVCB_HANDLER(mpf1_portc_w), |
| 320 | }; |
| 321 | |
| 378 | 322 | static const z80ctc_interface mpf1_ctc_intf = |
| 379 | 323 | { |
| 380 | 324 | 0, |
| r5906 | r5907 | |
| 384 | 328 | 0 |
| 385 | 329 | }; |
| 386 | 330 | |
| 331 | static const z80pio_interface mpf1_pio_intf = |
| 332 | { |
| 333 | DEVCB_LINE(mpf1_pio_interrupt), |
| 334 | DEVCB_NULL, |
| 335 | DEVCB_NULL, |
| 336 | DEVCB_NULL, |
| 337 | DEVCB_NULL, |
| 338 | DEVCB_NULL, |
| 339 | DEVCB_NULL |
| 340 | }; |
| 341 | |
| 387 | 342 | static MACHINE_DRIVER_START( mpf1 ) |
| 388 | | // basic machine hardware |
| 389 | | MDRV_CPU_ADD("maincpu", Z80, 3579500/2) // 1.79 MHz |
| 343 | /* basic machine hardware */ |
| 344 | MDRV_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz / 2) |
| 390 | 345 | MDRV_CPU_PROGRAM_MAP(mpf1_map) |
| 391 | 346 | MDRV_CPU_IO_MAP(mpf1_io_map) |
| 392 | 347 | |
| 393 | 348 | MDRV_MACHINE_START( mpf1 ) |
| 394 | 349 | MDRV_MACHINE_RESET( mpf1 ) |
| 395 | 350 | |
| 396 | | MDRV_Z80PIO_ADD("z80pio", mpf1_pio_intf) |
| 397 | | MDRV_Z80CTC_ADD("z80ctc", 3579500/2, mpf1_ctc_intf) |
| 398 | | MDRV_I8255A_ADD("ppi8255", ppi8255_intf) |
| 351 | /* video hardware */ |
| 352 | MDRV_DEFAULT_LAYOUT(layout_mpf1) |
| 399 | 353 | |
| 400 | | // sound hardware |
| 354 | /* sound hardware */ |
| 401 | 355 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 402 | | MDRV_SOUND_ADD("dac", DAC, 0) |
| 356 | MDRV_SOUND_ADD("speaker", SPEAKER, 0) |
| 403 | 357 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 404 | 358 | |
| 405 | | MDRV_DEFAULT_LAYOUT( layout_mpf1 ) |
| 359 | /* internal devices */ |
| 360 | MDRV_Z80PIO_ADD("z80pio", mpf1_pio_intf) |
| 361 | MDRV_Z80CTC_ADD("z80ctc", XTAL_3_579545MHz / 2, mpf1_ctc_intf) |
| 362 | MDRV_I8255A_ADD("ppi8255", ppi8255_intf) |
| 363 | |
| 364 | MDRV_CASSETTE_ADD("cassette", mpf1_cassette_config) |
| 406 | 365 | MACHINE_DRIVER_END |
| 407 | 366 | |
| 408 | 367 | static MACHINE_DRIVER_START( mpf1p ) |
| 409 | | // basic machine hardware |
| 368 | /* basic machine hardware */ |
| 410 | 369 | MDRV_CPU_ADD("maincpu", Z80, 2500000) |
| 411 | 370 | MDRV_CPU_PROGRAM_MAP(mpf1p_map) |
| 412 | 371 | MDRV_CPU_IO_MAP(mpf1_io_map) |
| 413 | 372 | |
| 414 | 373 | MDRV_MACHINE_RESET( mpf1 ) |
| 415 | 374 | |
| 375 | /* video hardware */ |
| 376 | MDRV_DEFAULT_LAYOUT(layout_mpf1) |
| 377 | |
| 378 | /* internal devices */ |
| 416 | 379 | MDRV_Z80PIO_ADD("z80pio", mpf1_pio_intf) |
| 417 | 380 | MDRV_Z80CTC_ADD("z80ctc", 3579500/2, mpf1_ctc_intf) |
| 418 | 381 | MDRV_I8255A_ADD("ppi8255", ppi8255_intf) |
| 419 | 382 | |
| 420 | | // sound hardware |
| 383 | /* sound hardware */ |
| 421 | 384 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 422 | | MDRV_SOUND_ADD("dac", DAC, 0) |
| 385 | MDRV_SOUND_ADD("speaker", SPEAKER, 0) |
| 423 | 386 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 424 | 387 | |
| 425 | | MDRV_DEFAULT_LAYOUT( layout_mpf1 ) |
| 388 | MDRV_CASSETTE_ADD("cassette", mpf1_cassette_config) |
| 426 | 389 | MACHINE_DRIVER_END |
| 427 | 390 | |
| 428 | | /* ROMs */ |
| 429 | 391 | |
| 392 | /*************************************************************************** |
| 393 | ROM DEFINITIONS |
| 394 | ***************************************************************************/ |
| 395 | |
| 430 | 396 | ROM_START( mpf1 ) |
| 431 | | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 432 | | ROM_LOAD( "mpf.u6", 0x0000, 0x1000, CRC(b60249ce) SHA1(78e0e8874d1497fabfdd6378266d041175e3797f) ) |
| 397 | ROM_REGION(0x10000, "maincpu", 0) |
| 398 | ROM_LOAD("mpf.u6", 0x0000, 0x1000, CRC(b60249ce) SHA1(78e0e8874d1497fabfdd6378266d041175e3797f)) |
| 433 | 399 | ROM_END |
| 434 | 400 | |
| 435 | 401 | ROM_START( mpf1b ) |
| 436 | | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 437 | | ROM_LOAD( "c55167.u6", 0x0000, 0x1000, CRC(28b06dac) SHA1(99cfbab739d71a914c39302d384d77bddc4b705b) ) |
| 438 | | ROM_LOAD( "basic.u7", 0x2000, 0x1000, CRC(d276ed6b) SHA1(a45fb98961be5e5396988498c6ed589a35398dcf) ) |
| 402 | ROM_REGION(0x10000, "maincpu", 0) |
| 403 | ROM_LOAD("c55167.u6", 0x0000, 0x1000, CRC(28b06dac) SHA1(99cfbab739d71a914c39302d384d77bddc4b705b)) |
| 404 | ROM_LOAD("basic.u7", 0x2000, 0x1000, CRC(d276ed6b) SHA1(a45fb98961be5e5396988498c6ed589a35398dcf)) |
| 439 | 405 | ROM_END |
| 440 | 406 | |
| 441 | 407 | ROM_START( mpf1p ) |
| 442 | | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 443 | | ROM_LOAD( "mpf1pmon.bin", 0x0000, 0x2000, CRC(91ace7d3) SHA1(22e3c16a81ac09f37741ad1b526a4456b2ba9493)) |
| 408 | ROM_REGION(0x10000, "maincpu", 0) |
| 409 | ROM_LOAD("mpf1pmon.bin", 0x0000, 0x2000, CRC(91ace7d3) SHA1(22e3c16a81ac09f37741ad1b526a4456b2ba9493)) |
| 444 | 410 | ROM_END |
| 445 | | /* System Configuration */ |
| 446 | 411 | |
| 447 | | static SYSTEM_CONFIG_START(mpf1) |
| 448 | | CONFIG_RAM_DEFAULT(4 * 1024) |
| 449 | | SYSTEM_CONFIG_END |
| 450 | 412 | |
| 451 | | /* System Drivers */ |
| 413 | /*************************************************************************** |
| 414 | GAME DRIVERS |
| 415 | ***************************************************************************/ |
| 452 | 416 | |
| 453 | | COMP( 1979, mpf1, 0, 0, mpf1, mpf1, 0, mpf1, "Multitech", "Micro Professor 1" , 0) |
| 454 | | COMP( 1979, mpf1b, mpf1, 0, mpf1, mpf1b, 0, mpf1, "Multitech", "Micro Professor 1B" , 0) |
| 455 | | COMP( 1982, mpf1p, mpf1, 0, mpf1p,mpf1b, 0, mpf1, "Multitech", "Micro Professor 1 Plus" , GAME_NOT_WORKING) |
| 417 | COMP( 1979, mpf1, 0, 0, mpf1, mpf1, 0, 0, "Multitech", "Micro Professor 1", 0) |
| 418 | COMP( 1979, mpf1b, mpf1, 0, mpf1, mpf1b, 0, 0, "Multitech", "Micro Professor 1B", 0) |
| 419 | COMP( 1982, mpf1p, mpf1, 0, mpf1p,mpf1b, 0, 0, "Multitech", "Micro Professor 1 Plus", GAME_NOT_WORKING) |