src/mess/drivers/mikro80.c
| r2923 | r2924 | |
| 12 | 12 | #include "machine/8255ppi.h" |
| 13 | 13 | #include "includes/mikro80.h" |
| 14 | 14 | #include "devices/cassette.h" |
| 15 | #include "devices/cartslot.h" |
| 15 | 16 | #include "formats/rk_cas.h" |
| 17 | #include "sound/dac.h" |
| 16 | 18 | |
| 17 | 19 | /* Address maps */ |
| 18 | 20 | static ADDRESS_MAP_START(mikro80_mem, ADDRESS_SPACE_PROGRAM, 8) |
| r2923 | r2924 | |
| 25 | 27 | ADDRESS_MAP_END |
| 26 | 28 | |
| 27 | 29 | static ADDRESS_MAP_START( mikro80_io , ADDRESS_SPACE_IO, 8) |
| 30 | ADDRESS_MAP_UNMAP_HIGH |
| 28 | 31 | AM_RANGE( 0x01, 0x01) AM_READWRITE ( mikro80_tape_r, mikro80_tape_w ) |
| 29 | 32 | AM_RANGE( 0x04, 0x07) AM_DEVREADWRITE ( PPI8255, "ppi8255", mikro80_keyboard_r, mikro80_keyboard_w ) |
| 30 | 33 | ADDRESS_MAP_END |
| 31 | 34 | |
| 35 | static ADDRESS_MAP_START( radio99_io , ADDRESS_SPACE_IO, 8) |
| 36 | ADDRESS_MAP_UNMAP_HIGH |
| 37 | AM_RANGE( 0x01, 0x01) AM_READWRITE ( mikro80_tape_r, mikro80_tape_w ) |
| 38 | AM_RANGE( 0x04, 0x04) AM_WRITE ( DAC_0_data_w ) |
| 39 | AM_RANGE( 0x05, 0x05) AM_READWRITE ( mikro80_8255_portc_r, mikro80_8255_portc_w ) |
| 40 | AM_RANGE( 0x06, 0x06) AM_READ ( mikro80_8255_portb_r) |
| 41 | AM_RANGE( 0x07, 0x07) AM_WRITE ( mikro80_8255_porta_w) |
| 42 | ADDRESS_MAP_END |
| 43 | |
| 32 | 44 | /* Input ports */ |
| 33 | 45 | static INPUT_PORTS_START( mikro80 ) |
| 34 | 46 | PORT_START_TAG("LINE0") |
| r2923 | r2924 | |
| 39 | 51 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 40 | 52 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 41 | 53 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 42 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 54 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 43 | 55 | PORT_START_TAG("LINE1") |
| 44 | 56 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 45 | 57 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| r2923 | r2924 | |
| 48 | 60 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) |
| 49 | 61 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 50 | 62 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_EQUALS) |
| 51 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 63 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 52 | 64 | PORT_START_TAG("LINE2") |
| 53 | 65 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 54 | 66 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) |
| r2923 | r2924 | |
| 57 | 69 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 58 | 70 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 59 | 71 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 60 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 72 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 61 | 73 | PORT_START_TAG("LINE3") |
| 62 | 74 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 63 | 75 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| r2923 | r2924 | |
| 66 | 78 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 67 | 79 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 68 | 80 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 69 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 81 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 70 | 82 | PORT_START_TAG("LINE4") |
| 71 | 83 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 72 | 84 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| r2923 | r2924 | |
| 75 | 87 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 76 | 88 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 77 | 89 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 78 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 90 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 79 | 91 | PORT_START_TAG("LINE5") |
| 80 | 92 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 81 | 93 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| r2923 | r2924 | |
| 84 | 96 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 85 | 97 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 86 | 98 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 87 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 99 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 88 | 100 | PORT_START_TAG("LINE6") |
| 89 | 101 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 90 | 102 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) |
| r2923 | r2924 | |
| 93 | 105 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE) |
| 94 | 106 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<>") PORT_CODE(KEYCODE_MINUS) |
| 95 | 107 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 96 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 108 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 97 | 109 | PORT_START_TAG("LINE7") |
| 98 | 110 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 99 | 111 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| r2923 | r2924 | |
| 102 | 114 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 103 | 115 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 104 | 116 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
| 105 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 117 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 106 | 118 | PORT_START_TAG("LINE8") |
| 107 | 119 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) |
| 108 | 120 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) |
| 109 | 121 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) |
| 110 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 111 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 112 | | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 113 | | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 114 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 122 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 123 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) |
| 124 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) |
| 125 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 126 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 115 | 127 | INPUT_PORTS_END |
| 116 | 128 | |
| 117 | 129 | /* Machine driver */ |
| 118 | 130 | static MACHINE_DRIVER_START( mikro80 ) |
| 119 | 131 | /* basic machine hardware */ |
| 120 | | MDRV_CPU_ADD(8080, 2000000) |
| 132 | MDRV_CPU_ADD_TAG("main",8080, 2000000) |
| 121 | 133 | MDRV_CPU_PROGRAM_MAP(mikro80_mem, 0) |
| 122 | 134 | MDRV_CPU_IO_MAP(mikro80_io, 0) |
| 123 | 135 | MDRV_MACHINE_RESET( mikro80 ) |
| r2923 | r2924 | |
| 144 | 156 | |
| 145 | 157 | MACHINE_DRIVER_END |
| 146 | 158 | |
| 159 | static MACHINE_DRIVER_START( radio99 ) |
| 160 | /* basic machine hardware */ |
| 161 | MDRV_IMPORT_FROM(mikro80) |
| 162 | MDRV_CPU_MODIFY("main") |
| 163 | MDRV_CPU_IO_MAP(radio99_io, 0) |
| 164 | |
| 165 | MDRV_SOUND_ADD(DAC, 0) |
| 166 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 16.00) |
| 167 | MACHINE_DRIVER_END |
| 168 | |
| 147 | 169 | static void mikro80_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 148 | 170 | { |
| 149 | 171 | /* cassette */ |
| r2923 | r2924 | |
| 159 | 181 | } |
| 160 | 182 | |
| 161 | 183 | static SYSTEM_CONFIG_START(mikro80) |
| 162 | | CONFIG_DEVICE(mikro80_cassette_getinfo) |
| 184 | CONFIG_DEVICE(mikro80_cassette_getinfo) |
| 163 | 185 | SYSTEM_CONFIG_END |
| 164 | 186 | |
| 165 | 187 | /* ROM definition */ |
| 166 | 188 | |
| 167 | 189 | ROM_START( mikro80 ) |
| 168 | 190 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 169 | | ROM_LOAD( "mikro80.rom", 0xf800, 0x0800, CRC(63a4b72a) SHA1(6bd3e396539a15e2ccffa7486cae06ef6ddd1d03) ) |
| 191 | ROM_LOAD( "mikro80.rom", 0xf800, 0x0800, CRC(63a4b72a) SHA1(6bd3e396539a15e2ccffa7486cae06ef6ddd1d03)) |
| 170 | 192 | ROM_REGION(0x0800, REGION_GFX1,0) |
| 171 | 193 | ROM_LOAD ("mikro80.fnt", 0x0000, 0x0800, CRC(43eb72bb) SHA1(761319cc6747661b33e84aa449cec83800543b5b) ) |
| 172 | 194 | ROM_END |
| 173 | 195 | |
| 196 | ROM_START( radio99 ) |
| 197 | ROM_REGION( 0x20000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 198 | ROM_LOAD( "monrk88.bin", 0xf800, 0x0800, CRC(5415D847)) |
| 199 | ROM_REGION(0x0800, REGION_GFX1,0) |
| 200 | ROM_LOAD ("mikro80.fnt", 0x0000, 0x0800, CRC(43eb72bb) SHA1(761319cc6747661b33e84aa449cec83800543b5b) ) |
| 201 | ROM_END |
| 202 | |
| 203 | |
| 174 | 204 | /* Driver */ |
| 175 | 205 | |
| 176 | 206 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 177 | 207 | COMP( 1983, mikro80, 0, 0, mikro80, mikro80, mikro80, mikro80, "", "Mikro-80", 0) |
| 208 | COMP( 1993, radio99, mikro80, 0, radio99, mikro80, radio99, mikro80, "", "Radio-99DM", 0) |