src/mess/machine/special.c
| r14879 | r14880 | |
| 8 | 8 | ****************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | |
| 11 | | #include "emu.h" |
| 12 | | #include "cpu/i8085/i8085.h" |
| 13 | | #include "sound/dac.h" |
| 14 | | #include "imagedev/cassette.h" |
| 15 | | #include "machine/i8255.h" |
| 16 | | #include "machine/pit8253.h" |
| 17 | | #include "machine/wd17xx.h" |
| 11 | |
| 18 | 12 | #include "includes/special.h" |
| 19 | | #include "machine/ram.h" |
| 20 | | #include "imagedev/flopdrv.h" |
| 21 | 13 | |
| 22 | 14 | |
| 23 | | |
| 24 | 15 | /* Driver initialization */ |
| 25 | 16 | DRIVER_INIT(special) |
| 26 | 17 | { |
| r14879 | r14880 | |
| 31 | 22 | memory_configure_bank(machine, "bank1", 0, 2, RAM, 0xc000); |
| 32 | 23 | } |
| 33 | 24 | |
| 34 | | static READ8_DEVICE_HANDLER (specialist_8255_porta_r ) |
| 25 | READ8_MEMBER( special_state::specialist_8255_porta_r ) |
| 35 | 26 | { |
| 36 | | if (input_port_read(device->machine(), "LINE0")!=0xff) return 0xfe; |
| 37 | | if (input_port_read(device->machine(), "LINE1")!=0xff) return 0xfd; |
| 38 | | if (input_port_read(device->machine(), "LINE2")!=0xff) return 0xfb; |
| 39 | | if (input_port_read(device->machine(), "LINE3")!=0xff) return 0xf7; |
| 40 | | if (input_port_read(device->machine(), "LINE4")!=0xff) return 0xef; |
| 41 | | if (input_port_read(device->machine(), "LINE5")!=0xff) return 0xdf; |
| 42 | | if (input_port_read(device->machine(), "LINE6")!=0xff) return 0xbf; |
| 43 | | if (input_port_read(device->machine(), "LINE7")!=0xff) return 0x7f; |
| 27 | if (input_port_read(machine(), "LINE0")!=0xff) return 0xfe; |
| 28 | if (input_port_read(machine(), "LINE1")!=0xff) return 0xfd; |
| 29 | if (input_port_read(machine(), "LINE2")!=0xff) return 0xfb; |
| 30 | if (input_port_read(machine(), "LINE3")!=0xff) return 0xf7; |
| 31 | if (input_port_read(machine(), "LINE4")!=0xff) return 0xef; |
| 32 | if (input_port_read(machine(), "LINE5")!=0xff) return 0xdf; |
| 33 | if (input_port_read(machine(), "LINE6")!=0xff) return 0xbf; |
| 34 | if (input_port_read(machine(), "LINE7")!=0xff) return 0x7f; |
| 44 | 35 | return 0xff; |
| 45 | 36 | } |
| 46 | 37 | |
| 47 | | static READ8_DEVICE_HANDLER (specialist_8255_portb_r ) |
| 38 | READ8_MEMBER( special_state::specialist_8255_portb_r ) |
| 48 | 39 | { |
| 49 | | special_state *state = device->machine().driver_data<special_state>(); |
| 50 | | |
| 51 | | int dat = 0; |
| 40 | UINT8 dat = 0; |
| 52 | 41 | double level; |
| 53 | 42 | |
| 54 | | if ((state->m_specialist_8255_porta & 0x01)==0) dat ^= (input_port_read(device->machine(), "LINE0") ^ 0xff); |
| 55 | | if ((state->m_specialist_8255_porta & 0x02)==0) dat ^= (input_port_read(device->machine(), "LINE1") ^ 0xff); |
| 56 | | if ((state->m_specialist_8255_porta & 0x04)==0) dat ^= (input_port_read(device->machine(), "LINE2") ^ 0xff); |
| 57 | | if ((state->m_specialist_8255_porta & 0x08)==0) dat ^= (input_port_read(device->machine(), "LINE3") ^ 0xff); |
| 58 | | if ((state->m_specialist_8255_porta & 0x10)==0) dat ^= (input_port_read(device->machine(), "LINE4") ^ 0xff); |
| 59 | | if ((state->m_specialist_8255_porta & 0x20)==0) dat ^= (input_port_read(device->machine(), "LINE5") ^ 0xff); |
| 60 | | if ((state->m_specialist_8255_porta & 0x40)==0) dat ^= (input_port_read(device->machine(), "LINE6") ^ 0xff); |
| 61 | | if ((state->m_specialist_8255_porta & 0x80)==0) dat ^= (input_port_read(device->machine(), "LINE7") ^ 0xff); |
| 62 | | if ((state->m_specialist_8255_portc & 0x01)==0) dat ^= (input_port_read(device->machine(), "LINE8") ^ 0xff); |
| 63 | | if ((state->m_specialist_8255_portc & 0x02)==0) dat ^= (input_port_read(device->machine(), "LINE9") ^ 0xff); |
| 64 | | if ((state->m_specialist_8255_portc & 0x04)==0) dat ^= (input_port_read(device->machine(), "LINE10") ^ 0xff); |
| 65 | | if ((state->m_specialist_8255_portc & 0x08)==0) dat ^= (input_port_read(device->machine(), "LINE11") ^ 0xff); |
| 43 | if ((m_specialist_8255_porta & 0x01)==0) dat ^= (input_port_read(machine(), "LINE0") ^ 0xff); |
| 44 | if ((m_specialist_8255_porta & 0x02)==0) dat ^= (input_port_read(machine(), "LINE1") ^ 0xff); |
| 45 | if ((m_specialist_8255_porta & 0x04)==0) dat ^= (input_port_read(machine(), "LINE2") ^ 0xff); |
| 46 | if ((m_specialist_8255_porta & 0x08)==0) dat ^= (input_port_read(machine(), "LINE3") ^ 0xff); |
| 47 | if ((m_specialist_8255_porta & 0x10)==0) dat ^= (input_port_read(machine(), "LINE4") ^ 0xff); |
| 48 | if ((m_specialist_8255_porta & 0x20)==0) dat ^= (input_port_read(machine(), "LINE5") ^ 0xff); |
| 49 | if ((m_specialist_8255_porta & 0x40)==0) dat ^= (input_port_read(machine(), "LINE6") ^ 0xff); |
| 50 | if ((m_specialist_8255_porta & 0x80)==0) dat ^= (input_port_read(machine(), "LINE7") ^ 0xff); |
| 51 | if ((m_specialist_8255_portc & 0x01)==0) dat ^= (input_port_read(machine(), "LINE8") ^ 0xff); |
| 52 | if ((m_specialist_8255_portc & 0x02)==0) dat ^= (input_port_read(machine(), "LINE9") ^ 0xff); |
| 53 | if ((m_specialist_8255_portc & 0x04)==0) dat ^= (input_port_read(machine(), "LINE10") ^ 0xff); |
| 54 | if ((m_specialist_8255_portc & 0x08)==0) dat ^= (input_port_read(machine(), "LINE11") ^ 0xff); |
| 66 | 55 | |
| 67 | 56 | dat = (dat << 2) ^0xff; |
| 68 | | if (input_port_read(device->machine(), "LINE12")!=0xff) dat ^= 0x02; |
| 57 | if (input_port_read(machine(), "LINE12")!=0xff) dat ^= 0x02; |
| 69 | 58 | |
| 70 | | level = (device->machine().device<cassette_image_device>(CASSETTE_TAG)->input()); |
| 59 | level = m_cass->input(); |
| 71 | 60 | if (level >= 0) |
| 72 | | { |
| 73 | 61 | dat ^= 0x01; |
| 74 | | } |
| 75 | | return dat & 0xff; |
| 62 | |
| 63 | return dat; |
| 76 | 64 | } |
| 77 | 65 | |
| 78 | | static READ8_DEVICE_HANDLER (specialist_8255_portc_r ) |
| 66 | READ8_MEMBER( special_state::specialist_8255_portc_r ) |
| 79 | 67 | { |
| 80 | | if (input_port_read(device->machine(), "LINE8")!=0xff) return 0x0e; |
| 81 | | if (input_port_read(device->machine(), "LINE9")!=0xff) return 0x0d; |
| 82 | | if (input_port_read(device->machine(), "LINE10")!=0xff) return 0x0b; |
| 83 | | if (input_port_read(device->machine(), "LINE11")!=0xff) return 0x07; |
| 68 | if (input_port_read(machine(), "LINE8")!=0xff) return 0x0e; |
| 69 | if (input_port_read(machine(), "LINE9")!=0xff) return 0x0d; |
| 70 | if (input_port_read(machine(), "LINE10")!=0xff) return 0x0b; |
| 71 | if (input_port_read(machine(), "LINE11")!=0xff) return 0x07; |
| 84 | 72 | return 0x0f; |
| 85 | 73 | } |
| 86 | 74 | |
| 87 | | static WRITE8_DEVICE_HANDLER (specialist_8255_porta_w ) |
| 75 | WRITE8_MEMBER( special_state::specialist_8255_porta_w ) |
| 88 | 76 | { |
| 89 | | special_state *state = device->machine().driver_data<special_state>(); |
| 90 | | state->m_specialist_8255_porta = data; |
| 77 | m_specialist_8255_porta = data; |
| 91 | 78 | } |
| 92 | 79 | |
| 93 | | static WRITE8_DEVICE_HANDLER (specialist_8255_portb_w ) |
| 80 | WRITE8_MEMBER( special_state::specialist_8255_portb_w ) |
| 94 | 81 | { |
| 95 | | special_state *state = device->machine().driver_data<special_state>(); |
| 96 | | state->m_specialist_8255_portb = data; |
| 82 | m_specialist_8255_portb = data; |
| 97 | 83 | } |
| 98 | | static WRITE8_DEVICE_HANDLER (specialist_8255_portc_w ) |
| 84 | |
| 85 | WRITE8_MEMBER( special_state::specialist_8255_portc_w ) |
| 99 | 86 | { |
| 100 | | special_state *state = device->machine().driver_data<special_state>(); |
| 101 | | device_t *dac_device = device->machine().device("dac"); |
| 87 | m_specialist_8255_portc = data; |
| 102 | 88 | |
| 103 | | state->m_specialist_8255_portc = data; |
| 89 | m_cass->output(BIT(data, 7) ? 1 : -1); |
| 104 | 90 | |
| 105 | | device->machine().device<cassette_image_device>(CASSETTE_TAG)->output(data & 0x80 ? 1 : -1); |
| 106 | | |
| 107 | | dac_data_w(dac_device, data & 0x20); //beeper |
| 108 | | |
| 91 | dac_data_w(m_dac, BIT(data, 5)); //beeper |
| 109 | 92 | } |
| 110 | 93 | |
| 111 | 94 | I8255_INTERFACE( specialist_ppi8255_interface ) |
| 112 | 95 | { |
| 113 | | DEVCB_HANDLER(specialist_8255_porta_r), |
| 114 | | DEVCB_HANDLER(specialist_8255_porta_w), |
| 115 | | DEVCB_HANDLER(specialist_8255_portb_r), |
| 116 | | DEVCB_HANDLER(specialist_8255_portb_w), |
| 117 | | DEVCB_HANDLER(specialist_8255_portc_r), |
| 118 | | DEVCB_HANDLER(specialist_8255_portc_w) |
| 96 | DEVCB_DRIVER_MEMBER(special_state, specialist_8255_porta_r), |
| 97 | DEVCB_DRIVER_MEMBER(special_state, specialist_8255_porta_w), |
| 98 | DEVCB_DRIVER_MEMBER(special_state, specialist_8255_portb_r), |
| 99 | DEVCB_DRIVER_MEMBER(special_state, specialist_8255_portb_w), |
| 100 | DEVCB_DRIVER_MEMBER(special_state, specialist_8255_portc_r), |
| 101 | DEVCB_DRIVER_MEMBER(special_state, specialist_8255_portc_w) |
| 119 | 102 | }; |
| 120 | 103 | |
| 121 | 104 | static TIMER_CALLBACK( special_reset ) |
| r14879 | r14880 | |
| 134 | 117 | /* |
| 135 | 118 | Specialist MX |
| 136 | 119 | */ |
| 137 | | |
| 138 | | static WRITE8_HANDLER( video_memory_w ) |
| 120 | WRITE8_MEMBER( special_state::video_memory_w ) |
| 139 | 121 | { |
| 140 | | special_state *state = space->machine().driver_data<special_state>(); |
| 141 | | space->machine().device<ram_device>(RAM_TAG)->pointer()[0x9000 + offset] = data; |
| 142 | | state->m_specimx_colorram[offset] = state->m_specimx_color; |
| 122 | machine().device<ram_device>(RAM_TAG)->pointer()[0x9000 + offset] = data; |
| 123 | m_specimx_colorram[offset] = m_specimx_color; |
| 143 | 124 | } |
| 144 | 125 | |
| 145 | | WRITE8_HANDLER (specimx_video_color_w ) |
| 126 | WRITE8_MEMBER( special_state::specimx_video_color_w ) |
| 146 | 127 | { |
| 147 | | special_state *state = space->machine().driver_data<special_state>(); |
| 148 | | state->m_specimx_color = data; |
| 128 | m_specimx_color = data; |
| 149 | 129 | } |
| 150 | 130 | |
| 151 | | READ8_HANDLER (specimx_video_color_r ) |
| 131 | READ8_MEMBER( special_state::specimx_video_color_r ) |
| 152 | 132 | { |
| 153 | | special_state *state = space->machine().driver_data<special_state>(); |
| 154 | | return state->m_specimx_color; |
| 133 | return m_specimx_color; |
| 155 | 134 | } |
| 156 | 135 | |
| 157 | | static void specimx_set_bank(running_machine &machine, int i,int data) |
| 136 | void special_state::specimx_set_bank(offs_t i, UINT8 data) |
| 158 | 137 | { |
| 159 | | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 160 | | UINT8 *ram = machine.device<ram_device>(RAM_TAG)->pointer(); |
| 138 | address_space *space = m_maincpu->memory().space(AS_PROGRAM); |
| 139 | UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer(); |
| 161 | 140 | |
| 162 | 141 | space->install_write_bank(0xc000, 0xffbf, "bank3"); |
| 163 | 142 | space->install_write_bank(0xffc0, 0xffdf, "bank4"); |
| 164 | | memory_set_bankptr(machine, "bank4", ram + 0xffc0); |
| 143 | memory_set_bankptr(machine(), "bank4", ram + 0xffc0); |
| 165 | 144 | switch(i) |
| 166 | 145 | { |
| 167 | 146 | case 0 : |
| 168 | | space->install_write_bank(0x0000, 0x8fff, "bank1"); |
| 169 | | space->install_legacy_write_handler(0x9000, 0xbfff, FUNC(video_memory_w)); |
| 147 | space->install_write_bank(0x0000, 0x8fff, "bank1"); |
| 148 | //space->install_legacy_write_handler(0x9000, 0xbfff, FUNC(video_memory_w)); |
| 149 | space->install_write_handler(0x9000, 0xbfff, write8_delegate(FUNC(special_state::video_memory_w), this)); |
| 170 | 150 | |
| 171 | | memory_set_bankptr(machine, "bank1", ram); |
| 172 | | memory_set_bankptr(machine, "bank2", ram + 0x9000); |
| 173 | | memory_set_bankptr(machine, "bank3", ram + 0xc000); |
| 174 | | break; |
| 151 | memory_set_bankptr(machine(), "bank1", ram); |
| 152 | memory_set_bankptr(machine(), "bank2", ram + 0x9000); |
| 153 | memory_set_bankptr(machine(), "bank3", ram + 0xc000); |
| 154 | break; |
| 175 | 155 | case 1 : |
| 176 | | space->install_write_bank(0x0000, 0x8fff, "bank1"); |
| 177 | | space->install_write_bank(0x9000, 0xbfff, "bank2"); |
| 156 | space->install_write_bank(0x0000, 0x8fff, "bank1"); |
| 157 | space->install_write_bank(0x9000, 0xbfff, "bank2"); |
| 178 | 158 | |
| 179 | | memory_set_bankptr(machine, "bank1", ram + 0x10000); |
| 180 | | memory_set_bankptr(machine, "bank2", ram + 0x19000); |
| 181 | | memory_set_bankptr(machine, "bank3", ram + 0x1c000); |
| 182 | | break; |
| 159 | memory_set_bankptr(machine(), "bank1", ram + 0x10000); |
| 160 | memory_set_bankptr(machine(), "bank2", ram + 0x19000); |
| 161 | memory_set_bankptr(machine(), "bank3", ram + 0x1c000); |
| 162 | break; |
| 183 | 163 | case 2 : |
| 184 | | space->unmap_write(0x0000, 0x8fff); |
| 185 | | space->unmap_write(0x9000, 0xbfff); |
| 164 | space->unmap_write(0x0000, 0x8fff); |
| 165 | space->unmap_write(0x9000, 0xbfff); |
| 186 | 166 | |
| 187 | | memory_set_bankptr(machine, "bank1", machine.region("maincpu")->base() + 0x10000); |
| 188 | | memory_set_bankptr(machine, "bank2", machine.region("maincpu")->base() + 0x19000); |
| 189 | | if (data & 0x80) |
| 190 | | { |
| 191 | | memory_set_bankptr(machine, "bank3", ram + 0x1c000); |
| 192 | | } |
| 193 | | else |
| 194 | | { |
| 195 | | memory_set_bankptr(machine, "bank3", ram + 0xc000); |
| 196 | | } |
| 197 | | break; |
| 167 | memory_set_bankptr(machine(), "bank1", machine().region("maincpu")->base() + 0x10000); |
| 168 | memory_set_bankptr(machine(), "bank2", machine().region("maincpu")->base() + 0x19000); |
| 169 | |
| 170 | if (data & 0x80) |
| 171 | memory_set_bankptr(machine(), "bank3", ram + 0x1c000); |
| 172 | else |
| 173 | memory_set_bankptr(machine(), "bank3", ram + 0xc000); |
| 174 | |
| 175 | break; |
| 198 | 176 | } |
| 199 | 177 | } |
| 200 | | WRITE8_HANDLER( specimx_select_bank ) |
| 178 | |
| 179 | WRITE8_MEMBER( special_state::specimx_select_bank ) |
| 201 | 180 | { |
| 202 | | specimx_set_bank(space->machine(), offset, data); |
| 181 | specimx_set_bank(offset, data); |
| 203 | 182 | } |
| 204 | 183 | |
| 205 | | static WRITE_LINE_DEVICE_HANDLER( specimx_pit8253_out0_changed ) |
| 184 | WRITE_LINE_MEMBER( special_state::specimx_pit8253_out0_changed ) |
| 206 | 185 | { |
| 207 | | special_state *drvstate = device->machine().driver_data<special_state>(); |
| 208 | | specimx_set_input( drvstate->m_specimx_audio, 0, state ); |
| 186 | specimx_set_input( m_specimx_audio, 0, state ); |
| 209 | 187 | } |
| 210 | 188 | |
| 211 | | |
| 212 | | |
| 213 | | static WRITE_LINE_DEVICE_HANDLER(specimx_pit8253_out1_changed) |
| 189 | WRITE_LINE_MEMBER( special_state::specimx_pit8253_out1_changed ) |
| 214 | 190 | { |
| 215 | | special_state *drvstate = device->machine().driver_data<special_state>(); |
| 216 | | specimx_set_input( drvstate->m_specimx_audio, 1, state ); |
| 191 | specimx_set_input( m_specimx_audio, 1, state ); |
| 217 | 192 | } |
| 218 | 193 | |
| 219 | | |
| 220 | | |
| 221 | | static WRITE_LINE_DEVICE_HANDLER(specimx_pit8253_out2_changed) |
| 194 | WRITE_LINE_MEMBER( special_state::specimx_pit8253_out2_changed ) |
| 222 | 195 | { |
| 223 | | special_state *drvstate = device->machine().driver_data<special_state>(); |
| 224 | | specimx_set_input( drvstate->m_specimx_audio, 2, state ); |
| 196 | specimx_set_input( m_specimx_audio, 2, state ); |
| 225 | 197 | } |
| 226 | 198 | |
| 227 | 199 | |
| r14879 | r14880 | |
| 232 | 204 | { |
| 233 | 205 | 2000000, |
| 234 | 206 | DEVCB_NULL, |
| 235 | | DEVCB_LINE(specimx_pit8253_out0_changed) |
| 207 | DEVCB_DRIVER_LINE_MEMBER(special_state, specimx_pit8253_out0_changed) |
| 236 | 208 | }, |
| 237 | 209 | { |
| 238 | 210 | 2000000, |
| 239 | 211 | DEVCB_NULL, |
| 240 | | DEVCB_LINE(specimx_pit8253_out1_changed) |
| 212 | DEVCB_DRIVER_LINE_MEMBER(special_state, specimx_pit8253_out1_changed) |
| 241 | 213 | }, |
| 242 | 214 | { |
| 243 | 215 | 2000000, |
| 244 | 216 | DEVCB_NULL, |
| 245 | | DEVCB_LINE(specimx_pit8253_out2_changed) |
| 217 | DEVCB_DRIVER_LINE_MEMBER(special_state, specimx_pit8253_out2_changed) |
| 246 | 218 | } |
| 247 | 219 | } |
| 248 | 220 | }; |
| r14879 | r14880 | |
| 265 | 237 | MACHINE_RESET( specimx ) |
| 266 | 238 | { |
| 267 | 239 | special_state *state = machine.driver_data<special_state>(); |
| 268 | | specimx_set_bank(machine, 2,0x00); // Initiali load ROM disk |
| 240 | state->specimx_set_bank(2, 0); // Initiali load ROM disk |
| 269 | 241 | state->m_specimx_color = 0x70; |
| 270 | 242 | machine.scheduler().timer_set(attotime::zero, FUNC(setup_pit8253_gates)); |
| 271 | 243 | device_t *fdc = machine.device("wd1793"); |
| r14879 | r14880 | |
| 273 | 245 | wd17xx_dden_w(fdc, 0); |
| 274 | 246 | } |
| 275 | 247 | |
| 276 | | READ8_HANDLER ( specimx_disk_ctrl_r ) |
| 248 | READ8_MEMBER( special_state::specimx_disk_ctrl_r ) |
| 277 | 249 | { |
| 278 | 250 | return 0xff; |
| 279 | 251 | } |
| 280 | 252 | |
| 281 | | WRITE8_HANDLER( specimx_disk_ctrl_w ) |
| 253 | WRITE8_MEMBER( special_state::specimx_disk_ctrl_w ) |
| 282 | 254 | { |
| 283 | | device_t *fdc = space->machine().device("wd1793"); |
| 284 | | |
| 285 | 255 | switch(offset) |
| 286 | 256 | { |
| 287 | 257 | case 2 : |
| 288 | | wd17xx_set_side(fdc,data & 1); |
| 258 | wd17xx_set_side(m_fdc, data & 1); |
| 289 | 259 | break; |
| 290 | 260 | case 3 : |
| 291 | | wd17xx_set_drive(fdc,data & 1); |
| 261 | wd17xx_set_drive(m_fdc, data & 1); |
| 292 | 262 | break; |
| 293 | | |
| 294 | 263 | } |
| 295 | 264 | } |
| 296 | 265 | |
| r14879 | r14880 | |
| 298 | 267 | Erik |
| 299 | 268 | */ |
| 300 | 269 | |
| 301 | | static void erik_set_bank(running_machine &machine) |
| 270 | void special_state::erik_set_bank() |
| 302 | 271 | { |
| 303 | | special_state *state = machine.driver_data<special_state>(); |
| 304 | | UINT8 bank1 = (state->m_RR_register & 3); |
| 305 | | UINT8 bank2 = ((state->m_RR_register >> 2) & 3); |
| 306 | | UINT8 bank3 = ((state->m_RR_register >> 4) & 3); |
| 307 | | UINT8 bank4 = ((state->m_RR_register >> 6) & 3); |
| 308 | | UINT8 *mem = machine.region("maincpu")->base(); |
| 309 | | UINT8 *ram = machine.device<ram_device>(RAM_TAG)->pointer(); |
| 310 | | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 272 | UINT8 bank1 = m_RR_register & 3; |
| 273 | UINT8 bank2 = (m_RR_register >> 2) & 3; |
| 274 | UINT8 bank3 = (m_RR_register >> 4) & 3; |
| 275 | UINT8 bank4 = (m_RR_register >> 6) & 3; |
| 276 | UINT8 *mem = machine().region("maincpu")->base(); |
| 277 | UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer(); |
| 278 | address_space *space = m_maincpu->memory().space(AS_PROGRAM); |
| 311 | 279 | |
| 312 | 280 | space->install_write_bank(0x0000, 0x3fff, "bank1"); |
| 313 | 281 | space->install_write_bank(0x4000, 0x8fff, "bank2"); |
| r14879 | r14880 | |
| 321 | 289 | case 1: |
| 322 | 290 | case 2: |
| 323 | 291 | case 3: |
| 324 | | memory_set_bankptr(machine, "bank1", ram + 0x10000*(bank1-1)); |
| 325 | | break; |
| 292 | memory_set_bankptr(machine(), "bank1", ram + 0x10000*(bank1-1)); |
| 293 | break; |
| 326 | 294 | case 0: |
| 327 | | space->unmap_write(0x0000, 0x3fff); |
| 328 | | memory_set_bankptr(machine, "bank1", mem + 0x10000); |
| 329 | | break; |
| 295 | space->unmap_write(0x0000, 0x3fff); |
| 296 | memory_set_bankptr(machine(), "bank1", mem + 0x10000); |
| 297 | break; |
| 330 | 298 | } |
| 331 | 299 | switch(bank2) |
| 332 | 300 | { |
| 333 | 301 | case 1: |
| 334 | 302 | case 2: |
| 335 | 303 | case 3: |
| 336 | | memory_set_bankptr(machine, "bank2", ram + 0x10000*(bank2-1) + 0x4000); |
| 337 | | break; |
| 304 | memory_set_bankptr(machine(), "bank2", ram + 0x10000*(bank2-1) + 0x4000); |
| 305 | break; |
| 338 | 306 | case 0: |
| 339 | | space->unmap_write(0x4000, 0x8fff); |
| 340 | | memory_set_bankptr(machine, "bank2", mem + 0x14000); |
| 341 | | break; |
| 307 | space->unmap_write(0x4000, 0x8fff); |
| 308 | memory_set_bankptr(machine(), "bank2", mem + 0x14000); |
| 309 | break; |
| 342 | 310 | } |
| 343 | 311 | switch(bank3) |
| 344 | 312 | { |
| 345 | 313 | case 1: |
| 346 | 314 | case 2: |
| 347 | 315 | case 3: |
| 348 | | memory_set_bankptr(machine, "bank3", ram + 0x10000*(bank3-1) + 0x9000); |
| 349 | | break; |
| 316 | memory_set_bankptr(machine(), "bank3", ram + 0x10000*(bank3-1) + 0x9000); |
| 317 | break; |
| 350 | 318 | case 0: |
| 351 | | space->unmap_write(0x9000, 0xbfff); |
| 352 | | memory_set_bankptr(machine, "bank3", mem + 0x19000); |
| 353 | | break; |
| 319 | space->unmap_write(0x9000, 0xbfff); |
| 320 | memory_set_bankptr(machine(), "bank3", mem + 0x19000); |
| 321 | break; |
| 354 | 322 | } |
| 355 | 323 | switch(bank4) |
| 356 | 324 | { |
| 357 | 325 | case 1: |
| 358 | 326 | case 2: |
| 359 | 327 | case 3: |
| 360 | | memory_set_bankptr(machine, "bank4", ram + 0x10000*(bank4-1) + 0x0c000); |
| 361 | | memory_set_bankptr(machine, "bank5", ram + 0x10000*(bank4-1) + 0x0f000); |
| 362 | | memory_set_bankptr(machine, "bank6", ram + 0x10000*(bank4-1) + 0x0f800); |
| 363 | | break; |
| 328 | memory_set_bankptr(machine(), "bank4", ram + 0x10000*(bank4-1) + 0x0c000); |
| 329 | memory_set_bankptr(machine(), "bank5", ram + 0x10000*(bank4-1) + 0x0f000); |
| 330 | memory_set_bankptr(machine(), "bank6", ram + 0x10000*(bank4-1) + 0x0f800); |
| 331 | break; |
| 364 | 332 | case 0: |
| 365 | | space->unmap_write(0xc000, 0xefff); |
| 366 | | memory_set_bankptr(machine, "bank4", mem + 0x1c000); |
| 367 | | space->unmap_write(0xf000, 0xf7ff); |
| 368 | | space->nop_read(0xf000, 0xf7ff); |
| 369 | | i8255_device *ppi = machine.device<i8255_device>("ppi8255"); |
| 370 | | space->install_readwrite_handler(0xf800, 0xf803, 0, 0x7fc, read8_delegate(FUNC(i8255_device::read), (i8255_device*)ppi), write8_delegate(FUNC(i8255_device::write), (i8255_device*)ppi)); |
| 371 | | break; |
| 333 | space->unmap_write(0xc000, 0xefff); |
| 334 | memory_set_bankptr(machine(), "bank4", mem + 0x1c000); |
| 335 | space->unmap_write(0xf000, 0xf7ff); |
| 336 | space->nop_read(0xf000, 0xf7ff); |
| 337 | space->install_readwrite_handler(0xf800, 0xf803, 0, 0x7fc, read8_delegate(FUNC(i8255_device::read), (i8255_device*)m_ppi), write8_delegate(FUNC(i8255_device::write), (i8255_device*)m_ppi)); |
| 338 | break; |
| 372 | 339 | } |
| 373 | 340 | } |
| 374 | 341 | |
| r14879 | r14880 | |
| 385 | 352 | special_state *state = machine.driver_data<special_state>(); |
| 386 | 353 | state->m_RR_register = 0x00; |
| 387 | 354 | state->m_RC_register = 0x00; |
| 388 | | erik_set_bank(machine); |
| 355 | state->erik_set_bank(); |
| 389 | 356 | } |
| 390 | 357 | |
| 391 | | READ8_HANDLER ( erik_rr_reg_r ) |
| 358 | READ8_MEMBER( special_state::erik_rr_reg_r ) |
| 392 | 359 | { |
| 393 | | special_state *state = space->machine().driver_data<special_state>(); |
| 394 | | return state->m_RR_register; |
| 360 | return m_RR_register; |
| 395 | 361 | } |
| 396 | | WRITE8_HANDLER( erik_rr_reg_w ) |
| 362 | |
| 363 | WRITE8_MEMBER( special_state::erik_rr_reg_w ) |
| 397 | 364 | { |
| 398 | | special_state *state = space->machine().driver_data<special_state>(); |
| 399 | | state->m_RR_register = data; |
| 400 | | erik_set_bank(space->machine()); |
| 365 | m_RR_register = data; |
| 366 | erik_set_bank(); |
| 401 | 367 | } |
| 402 | 368 | |
| 403 | | READ8_HANDLER ( erik_rc_reg_r ) |
| 369 | READ8_MEMBER( special_state::erik_rc_reg_r ) |
| 404 | 370 | { |
| 405 | | special_state *state = space->machine().driver_data<special_state>(); |
| 406 | | return state->m_RC_register; |
| 371 | return m_RC_register; |
| 407 | 372 | } |
| 408 | 373 | |
| 409 | | |
| 410 | | WRITE8_HANDLER( erik_rc_reg_w ) |
| 374 | WRITE8_MEMBER( special_state::erik_rc_reg_w ) |
| 411 | 375 | { |
| 412 | | special_state *state = space->machine().driver_data<special_state>(); |
| 413 | | state->m_RC_register = data; |
| 414 | | state->m_erik_color_1 = state->m_RC_register & 7; |
| 415 | | state->m_erik_color_2 = (state->m_RC_register >> 3) & 7; |
| 416 | | state->m_erik_background = ((state->m_RC_register >> 6 ) & 1) + ((state->m_RC_register >> 7 ) & 1) * 4; |
| 376 | m_RC_register = data; |
| 377 | m_erik_color_1 = m_RC_register & 7; |
| 378 | m_erik_color_2 = (m_RC_register >> 3) & 7; |
| 379 | m_erik_background = BIT(m_RC_register, 6) + BIT(m_RC_register, 7) * 4; |
| 417 | 380 | } |
| 418 | 381 | |
| 419 | | READ8_HANDLER ( erik_disk_reg_r ) |
| 382 | READ8_MEMBER( special_state::erik_disk_reg_r ) |
| 420 | 383 | { |
| 421 | 384 | return 0xff; |
| 422 | 385 | } |
| 423 | 386 | |
| 424 | | WRITE8_HANDLER( erik_disk_reg_w ) |
| 387 | WRITE8_MEMBER( special_state::erik_disk_reg_w ) |
| 425 | 388 | { |
| 426 | | device_t *fdc = space->machine().device("wd1793"); |
| 427 | | |
| 428 | | wd17xx_set_side (fdc,data & 1); |
| 429 | | wd17xx_set_drive(fdc,(data >> 1) & 1); |
| 430 | | wd17xx_dden_w(fdc, BIT(data, 2)); |
| 431 | | floppy_mon_w(floppy_get_device(space->machine(), (data >> 1) & 1), 0); |
| 432 | | floppy_mon_w(floppy_get_device(space->machine(), ((data >> 1) & 1) ? 0 : 1), 1); |
| 433 | | floppy_drive_set_ready_state(floppy_get_device(space->machine(), (data >> 1) & 1), 1, 1); |
| 434 | | |
| 389 | wd17xx_set_side (m_fdc,data & 1); |
| 390 | wd17xx_set_drive(m_fdc,(data >> 1) & 1); |
| 391 | wd17xx_dden_w(m_fdc, BIT(data, 2)); |
| 392 | floppy_mon_w(floppy_get_device(machine(), BIT(data, 1)), 0); |
| 393 | floppy_mon_w(floppy_get_device(machine(), BIT(data, 1) ^ 1), 1); |
| 394 | floppy_drive_set_ready_state(floppy_get_device(machine(), BIT(data, 1)), 1, 1); |
| 435 | 395 | } |
src/mess/drivers/special.c
| r14879 | r14880 | |
| 8 | 8 | ****************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | |
| 11 | | #include "emu.h" |
| 12 | | #include "cpu/z80/z80.h" |
| 13 | | #include "cpu/i8085/i8085.h" |
| 14 | | #include "sound/dac.h" |
| 15 | | #include "sound/wave.h" |
| 16 | 11 | #include "includes/special.h" |
| 17 | | #include "machine/i8255.h" |
| 18 | | #include "machine/pit8253.h" |
| 19 | | #include "imagedev/cassette.h" |
| 20 | | #include "imagedev/flopdrv.h" |
| 21 | | #include "formats/basicdsk.h" |
| 22 | | #include "formats/rk_cas.h" |
| 23 | | #include "formats/smx_dsk.h" |
| 24 | | #include "machine/wd17xx.h" |
| 25 | | #include "machine/ram.h" |
| 26 | 12 | |
| 13 | |
| 27 | 14 | /* Address maps */ |
| 28 | 15 | static ADDRESS_MAP_START(specialist_mem, AS_PROGRAM, 8, special_state ) |
| 29 | 16 | AM_RANGE( 0x0000, 0x2fff ) AM_RAMBANK("bank1") // First bank |
| 30 | | AM_RANGE( 0x3000, 0x8fff ) AM_RAM // RAM |
| 31 | | AM_RANGE( 0x9000, 0xbfff ) AM_RAM AM_BASE(m_specialist_video_ram) // Video RAM |
| 32 | | AM_RANGE( 0xc000, 0xf000 ) AM_ROM // System ROM |
| 33 | | AM_RANGE( 0xf000, 0xf700 ) AM_NOP |
| 34 | | AM_RANGE( 0xf800, 0xf803 ) AM_MIRROR(0x7fc) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 17 | AM_RANGE( 0x3000, 0x8fff ) AM_RAM // RAM |
| 18 | AM_RANGE( 0x9000, 0xbfff ) AM_RAM AM_BASE(m_p_videoram) // Video RAM |
| 19 | AM_RANGE( 0xc000, 0xf000 ) AM_ROM // System ROM |
| 20 | AM_RANGE( 0xf000, 0xf700 ) AM_NOP |
| 21 | AM_RANGE( 0xf800, 0xf803 ) AM_MIRROR(0x7fc) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 35 | 22 | ADDRESS_MAP_END |
| 36 | 23 | |
| 37 | 24 | static ADDRESS_MAP_START(specialp_mem, AS_PROGRAM, 8, special_state ) |
| 38 | 25 | AM_RANGE( 0x0000, 0x2fff ) AM_RAMBANK("bank1") // First bank |
| 39 | | AM_RANGE( 0x3000, 0x7fff ) AM_RAM // RAM |
| 40 | | AM_RANGE( 0x8000, 0xbfff ) AM_RAM AM_BASE(m_specialist_video_ram) // Video RAM |
| 41 | | AM_RANGE( 0xc000, 0xf000 ) AM_ROM // System ROM |
| 42 | | AM_RANGE( 0xf000, 0xf700 ) AM_NOP |
| 43 | | AM_RANGE( 0xf800, 0xf803 ) AM_MIRROR(0x7fc) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 26 | AM_RANGE( 0x3000, 0x7fff ) AM_RAM // RAM |
| 27 | AM_RANGE( 0x8000, 0xbfff ) AM_RAM AM_BASE(m_p_videoram) // Video RAM |
| 28 | AM_RANGE( 0xc000, 0xf000 ) AM_ROM // System ROM |
| 29 | AM_RANGE( 0xf000, 0xf700 ) AM_NOP |
| 30 | AM_RANGE( 0xf800, 0xf803 ) AM_MIRROR(0x7fc) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 44 | 31 | ADDRESS_MAP_END |
| 45 | 32 | |
| 46 | 33 | static ADDRESS_MAP_START(erik_mem, AS_PROGRAM, 8, special_state ) |
| 47 | | AM_RANGE( 0x0000, 0x3fff ) AM_RAMBANK("bank1") |
| 48 | | AM_RANGE( 0x4000, 0x8fff ) AM_RAMBANK("bank2") |
| 49 | | AM_RANGE( 0x9000, 0xbfff ) AM_RAMBANK("bank3") |
| 50 | | AM_RANGE( 0xc000, 0xefff ) AM_RAMBANK("bank4") |
| 51 | | AM_RANGE( 0xf000, 0xf7ff ) AM_RAMBANK("bank5") |
| 52 | | AM_RANGE( 0xf800, 0xffff ) AM_RAMBANK("bank6") |
| 34 | AM_RANGE( 0x0000, 0x3fff ) AM_RAMBANK("bank1") |
| 35 | AM_RANGE( 0x4000, 0x8fff ) AM_RAMBANK("bank2") |
| 36 | AM_RANGE( 0x9000, 0xbfff ) AM_RAMBANK("bank3") |
| 37 | AM_RANGE( 0xc000, 0xefff ) AM_RAMBANK("bank4") |
| 38 | AM_RANGE( 0xf000, 0xf7ff ) AM_RAMBANK("bank5") |
| 39 | AM_RANGE( 0xf800, 0xffff ) AM_RAMBANK("bank6") |
| 53 | 40 | ADDRESS_MAP_END |
| 54 | 41 | |
| 55 | 42 | static ADDRESS_MAP_START( erik_io_map, AS_IO, 8, special_state ) |
| 56 | 43 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 57 | | AM_RANGE(0xf1, 0xf1) AM_READWRITE_LEGACY(erik_rr_reg_r, erik_rr_reg_w) |
| 58 | | AM_RANGE(0xf2, 0xf2) AM_READWRITE_LEGACY(erik_rc_reg_r, erik_rc_reg_w) |
| 59 | | AM_RANGE(0xf3, 0xf3) AM_READWRITE_LEGACY(erik_disk_reg_r, erik_disk_reg_w) |
| 44 | AM_RANGE(0xf1, 0xf1) AM_READWRITE(erik_rr_reg_r, erik_rr_reg_w) |
| 45 | AM_RANGE(0xf2, 0xf2) AM_READWRITE(erik_rc_reg_r, erik_rc_reg_w) |
| 46 | AM_RANGE(0xf3, 0xf3) AM_READWRITE(erik_disk_reg_r, erik_disk_reg_w) |
| 60 | 47 | AM_RANGE(0xf4, 0xf4) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_status_r, wd17xx_command_w) |
| 61 | 48 | AM_RANGE(0xf5, 0xf5) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_track_r, wd17xx_track_w) |
| 62 | 49 | AM_RANGE(0xf6, 0xf6) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_sector_r, wd17xx_sector_w) |
| r14879 | r14880 | |
| 65 | 52 | |
| 66 | 53 | static ADDRESS_MAP_START(specimx_mem, AS_PROGRAM, 8, special_state ) |
| 67 | 54 | ADDRESS_MAP_UNMAP_HIGH |
| 68 | | AM_RANGE( 0x0000, 0x8fff ) AM_RAMBANK("bank1") |
| 55 | AM_RANGE( 0x0000, 0x8fff ) AM_RAMBANK("bank1") |
| 69 | 56 | AM_RANGE( 0x9000, 0xbfff ) AM_RAMBANK("bank2") |
| 70 | 57 | AM_RANGE( 0xc000, 0xffbf ) AM_RAMBANK("bank3") |
| 71 | | AM_RANGE( 0xffc0, 0xffdf ) AM_RAMBANK("bank4") |
| 72 | | AM_RANGE( 0xffe0, 0xffe3 ) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 73 | | AM_RANGE( 0xffe4, 0xffe7 ) AM_RAM //external 8255 |
| 74 | | AM_RANGE( 0xffe8, 0xffe8 ) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_status_r,wd17xx_command_w) |
| 75 | | AM_RANGE( 0xffe9, 0xffe9 ) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_track_r,wd17xx_track_w) |
| 76 | | AM_RANGE( 0xffea, 0xffea ) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_sector_r,wd17xx_sector_w) |
| 77 | | AM_RANGE( 0xffea, 0xffeb ) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_data_r,wd17xx_data_w) |
| 78 | | AM_RANGE( 0xffec, 0xffef ) AM_DEVREADWRITE_LEGACY("pit8253", pit8253_r, pit8253_w) |
| 79 | | AM_RANGE( 0xfff0, 0xfff3 ) AM_READWRITE_LEGACY(specimx_disk_ctrl_r, specimx_disk_ctrl_w) |
| 80 | | AM_RANGE( 0xfff8, 0xfff8 ) AM_READWRITE_LEGACY(specimx_video_color_r,specimx_video_color_w) |
| 81 | | AM_RANGE( 0xfffc, 0xfffe ) AM_WRITE_LEGACY(specimx_select_bank) |
| 58 | AM_RANGE( 0xffc0, 0xffdf ) AM_RAMBANK("bank4") |
| 59 | AM_RANGE( 0xffe0, 0xffe3 ) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 60 | AM_RANGE( 0xffe4, 0xffe7 ) AM_RAM //external 8255 |
| 61 | AM_RANGE( 0xffe8, 0xffe8 ) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_status_r,wd17xx_command_w) |
| 62 | AM_RANGE( 0xffe9, 0xffe9 ) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_track_r,wd17xx_track_w) |
| 63 | AM_RANGE( 0xffea, 0xffea ) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_sector_r,wd17xx_sector_w) |
| 64 | AM_RANGE( 0xffea, 0xffeb ) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_data_r,wd17xx_data_w) |
| 65 | AM_RANGE( 0xffec, 0xffef ) AM_DEVREADWRITE_LEGACY("pit8253", pit8253_r, pit8253_w) |
| 66 | AM_RANGE( 0xfff0, 0xfff3 ) AM_READWRITE(specimx_disk_ctrl_r, specimx_disk_ctrl_w) |
| 67 | AM_RANGE( 0xfff8, 0xfff8 ) AM_READWRITE(specimx_video_color_r,specimx_video_color_w) |
| 68 | AM_RANGE( 0xfffc, 0xfffe ) AM_WRITE(specimx_select_bank) |
| 82 | 69 | ADDRESS_MAP_END |
| 83 | 70 | |
| 84 | 71 | /* Input ports */ |
| r14879 | r14880 | |
| 413 | 400 | |
| 414 | 401 | /* Machine driver */ |
| 415 | 402 | static MACHINE_CONFIG_START( special, special_state ) |
| 416 | | /* basic machine hardware */ |
| 417 | | MCFG_CPU_ADD("maincpu", I8080, 2000000) |
| 418 | | MCFG_CPU_PROGRAM_MAP(specialist_mem) |
| 419 | | MCFG_MACHINE_RESET( special ) |
| 403 | /* basic machine hardware */ |
| 404 | MCFG_CPU_ADD("maincpu", I8080, 2000000) |
| 405 | MCFG_CPU_PROGRAM_MAP(specialist_mem) |
| 406 | MCFG_MACHINE_RESET( special ) |
| 420 | 407 | |
| 421 | | MCFG_PIT8253_ADD( "pit8253", specimx_pit8253_intf ) |
| 422 | | |
| 423 | | MCFG_I8255_ADD( "ppi8255", specialist_ppi8255_interface ) |
| 424 | | |
| 425 | | /* video hardware */ |
| 408 | /* video hardware */ |
| 426 | 409 | MCFG_SCREEN_ADD("screen", RASTER) |
| 427 | 410 | MCFG_SCREEN_REFRESH_RATE(50) |
| 428 | 411 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 429 | 412 | MCFG_SCREEN_SIZE(384, 256) |
| 430 | 413 | MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 256-1) |
| 431 | | MCFG_SCREEN_UPDATE_STATIC(special) |
| 432 | | |
| 414 | MCFG_VIDEO_START(special) |
| 415 | MCFG_SCREEN_UPDATE_STATIC(special) |
| 433 | 416 | MCFG_PALETTE_LENGTH(2) |
| 434 | 417 | MCFG_PALETTE_INIT(black_and_white) |
| 435 | 418 | |
| 436 | | MCFG_VIDEO_START(special) |
| 437 | | |
| 438 | | /* audio hardware */ |
| 419 | /* audio hardware */ |
| 439 | 420 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 440 | 421 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 441 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 422 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 442 | 423 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 443 | 424 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 444 | 425 | |
| 426 | /* Devices */ |
| 445 | 427 | MCFG_CASSETTE_ADD( CASSETTE_TAG, special_cassette_interface ) |
| 446 | | |
| 428 | MCFG_PIT8253_ADD( "pit8253", specimx_pit8253_intf ) |
| 429 | MCFG_I8255_ADD( "ppi8255", specialist_ppi8255_interface ) |
| 447 | 430 | MACHINE_CONFIG_END |
| 448 | 431 | |
| 449 | 432 | static MACHINE_CONFIG_DERIVED( specialp, special ) |
| 450 | | |
| 451 | 433 | /* basic machine hardware */ |
| 452 | | MCFG_CPU_MODIFY("maincpu") |
| 453 | | MCFG_CPU_PROGRAM_MAP(specialp_mem) |
| 434 | MCFG_CPU_MODIFY("maincpu") |
| 435 | MCFG_CPU_PROGRAM_MAP(specialp_mem) |
| 454 | 436 | |
| 455 | | MCFG_SCREEN_MODIFY("screen") |
| 456 | | MCFG_SCREEN_UPDATE_STATIC(specialp) |
| 437 | MCFG_SCREEN_MODIFY("screen") |
| 438 | MCFG_SCREEN_UPDATE_STATIC(specialp) |
| 457 | 439 | MCFG_SCREEN_SIZE(512, 256) |
| 458 | 440 | MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1) |
| 459 | | |
| 460 | | MCFG_VIDEO_START(specialp) |
| 441 | MCFG_VIDEO_START(specialp) |
| 461 | 442 | MACHINE_CONFIG_END |
| 462 | 443 | |
| 463 | 444 | static MACHINE_CONFIG_DERIVED( specimx, special ) |
| 464 | | MCFG_CPU_MODIFY("maincpu") |
| 445 | MCFG_CPU_MODIFY("maincpu") |
| 465 | 446 | MCFG_CPU_PROGRAM_MAP(specimx_mem) |
| 466 | 447 | |
| 467 | 448 | MCFG_MACHINE_START ( specimx ) |
| 468 | 449 | MCFG_MACHINE_RESET ( specimx ) |
| 469 | 450 | |
| 470 | | /* video hardware */ |
| 451 | /* video hardware */ |
| 471 | 452 | MCFG_SCREEN_MODIFY("screen") |
| 472 | 453 | MCFG_SCREEN_UPDATE_STATIC(specimx) |
| 473 | | |
| 474 | 454 | MCFG_VIDEO_START(specimx) |
| 475 | | |
| 476 | 455 | MCFG_PALETTE_LENGTH(16) |
| 477 | 456 | MCFG_PALETTE_INIT( specimx ) |
| 478 | 457 | |
| 479 | | /* audio hardware */ |
| 458 | /* audio hardware */ |
| 480 | 459 | MCFG_SOUND_ADD("custom", SPECIMX, 0) |
| 481 | 460 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 482 | 461 | |
| 462 | /* Devices */ |
| 483 | 463 | MCFG_FD1793_ADD("wd1793", default_wd17xx_interface_2_drives ) |
| 484 | | |
| 485 | 464 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(specimx_floppy_interface) |
| 486 | 465 | |
| 487 | 466 | /* internal ram */ |
| r14879 | r14880 | |
| 491 | 470 | MACHINE_CONFIG_END |
| 492 | 471 | |
| 493 | 472 | static MACHINE_CONFIG_START( erik, special_state ) |
| 494 | | /* basic machine hardware */ |
| 495 | | MCFG_CPU_ADD("maincpu", Z80, 4000000) |
| 496 | | MCFG_CPU_PROGRAM_MAP(erik_mem) |
| 497 | | MCFG_CPU_IO_MAP(erik_io_map) |
| 473 | /* basic machine hardware */ |
| 474 | MCFG_CPU_ADD("maincpu", Z80, 4000000) |
| 475 | MCFG_CPU_PROGRAM_MAP(erik_mem) |
| 476 | MCFG_CPU_IO_MAP(erik_io_map) |
| 477 | MCFG_MACHINE_RESET( erik ) |
| 498 | 478 | |
| 499 | | MCFG_MACHINE_RESET( erik ) |
| 500 | | |
| 501 | | MCFG_I8255_ADD( "ppi8255", specialist_ppi8255_interface ) |
| 502 | | |
| 503 | | /* video hardware */ |
| 479 | /* video hardware */ |
| 504 | 480 | MCFG_SCREEN_ADD("screen", RASTER) |
| 505 | 481 | MCFG_SCREEN_REFRESH_RATE(50) |
| 506 | 482 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 507 | 483 | MCFG_SCREEN_SIZE(384, 256) |
| 508 | 484 | MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 256-1) |
| 509 | | MCFG_SCREEN_UPDATE_STATIC(erik) |
| 510 | | |
| 485 | MCFG_VIDEO_START(erik) |
| 486 | MCFG_SCREEN_UPDATE_STATIC(erik) |
| 511 | 487 | MCFG_PALETTE_LENGTH(8) |
| 512 | 488 | MCFG_PALETTE_INIT(erik) |
| 513 | 489 | |
| 514 | | MCFG_VIDEO_START(erik) |
| 515 | | /* audio hardware */ |
| 490 | /* audio hardware */ |
| 516 | 491 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 517 | 492 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 518 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 493 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 519 | 494 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 520 | 495 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 521 | 496 | |
| 497 | /* Devices */ |
| 522 | 498 | MCFG_CASSETTE_ADD( CASSETTE_TAG, special_cassette_interface ) |
| 523 | | |
| 524 | 499 | MCFG_FD1793_ADD("wd1793", default_wd17xx_interface_2_drives ) |
| 525 | | |
| 526 | 500 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(specimx_floppy_interface) |
| 501 | MCFG_I8255_ADD( "ppi8255", specialist_ppi8255_interface ) |
| 527 | 502 | |
| 528 | 503 | /* internal ram */ |
| 529 | 504 | MCFG_RAM_ADD(RAM_TAG) |
| r14879 | r14880 | |
| 533 | 508 | |
| 534 | 509 | /* ROM definition */ |
| 535 | 510 | ROM_START( special ) |
| 536 | | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 511 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 537 | 512 | ROM_SYSTEM_BIOS(0, "2nd", "2nd rev.") |
| 538 | 513 | ROMX_LOAD( "monitor2_1.rom", 0xc000, 0x0800, CRC(52abde77) SHA1(66ba2ef9eac14a5c0df510224ea25fd5745399cd), ROM_BIOS(1)) |
| 539 | 514 | ROMX_LOAD( "monitor2_2.rom", 0xc800, 0x0800, CRC(c425f719) SHA1(1c322591b4e5c8b01b81362c6801aa6fd9fc1492), ROM_BIOS(1)) |
| r14879 | r14880 | |
| 549 | 524 | ROMX_LOAD( "pzu4.rom", 0xd800, 0x0800, CRC(6793ba23) SHA1(3a27b5dbc6561ea7af5fb30513dc83ec64f1d94c), ROM_BIOS(3)) |
| 550 | 525 | ROMX_LOAD( "pzu5.rom", 0xe000, 0x0800, CRC(13a1a0dc) SHA1(3a0818cb8f36c2c5a9b9916669538ad1702a7710), ROM_BIOS(3)) |
| 551 | 526 | ROM_SYSTEM_BIOS(3, "1st", "1st rev.") |
| 552 | | ROMX_LOAD( "special1.rom", 0xc000, 0x1000, CRC(217414BD) SHA1(345cd1410fbca8f75421d12d1419f27f81cd35d6), ROM_BIOS(4)) |
| 527 | ROMX_LOAD( "special1.rom", 0xc000, 0x1000, CRC(217414BD) SHA1(345cd1410fbca8f75421d12d1419f27f81cd35d6), ROM_BIOS(4)) |
| 553 | 528 | ROM_SYSTEM_BIOS(4, "2col", "2nd rev. color") |
| 554 | 529 | ROMX_LOAD( "col_mon2.rom", 0xc000, 0x0800, CRC(8cebb1b5) SHA1(0c912a25220de8c5135e16c443e4796e6bb6f805), ROM_BIOS(5)) |
| 555 | 530 | ROMX_LOAD( "monitor2_2.rom", 0xc800, 0x0800, CRC(c425f719) SHA1(1c322591b4e5c8b01b81362c6801aa6fd9fc1492), ROM_BIOS(5)) |
| r14879 | r14880 | |
| 557 | 532 | ROM_END |
| 558 | 533 | |
| 559 | 534 | ROM_START( specialm ) |
| 560 | | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 535 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 561 | 536 | ROM_LOAD( "pzu1-m.rom", 0xc000, 0x0800, CRC(61e94485) SHA1(dbe212dcd377cb8cd16000516cd4b3b760ce779e)) |
| 562 | 537 | ROM_LOAD( "pzu2-m.rom", 0xc800, 0x0800, CRC(83d76815) SHA1(9d139eaa6ca6b241fa9fac94ede72abb56d83674)) |
| 563 | 538 | ROM_LOAD( "pzu3-m.rom", 0xd000, 0x0800, CRC(2121ad65) SHA1(b43811d058d818f8c1cee59b405b515f96958656)) |
| r14879 | r14880 | |
| 565 | 540 | ROM_END |
| 566 | 541 | |
| 567 | 542 | ROM_START( specialp ) |
| 568 | | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 569 | | ROM_LOAD( "special6.rom", 0xc000, 0x1000, CRC(f0c5a0ac) SHA1(50b53bd7c05117930aa84653a9ea0fc0c6f0f496) ) |
| 543 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 544 | ROM_LOAD( "special6.rom", 0xc000, 0x1000, CRC(f0c5a0ac) SHA1(50b53bd7c05117930aa84653a9ea0fc0c6f0f496) ) |
| 570 | 545 | ROM_END |
| 571 | 546 | |
| 572 | 547 | ROM_START( lik ) |
| 573 | | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 574 | | ROM_SYSTEM_BIOS(0, "1st", "1st rev.") |
| 575 | | ROMX_LOAD( "lik.rom", 0xc000, 0x3000, CRC(705BB3A0) SHA1(f90b009ec9d3303bbda228714dd24de057e744b6), ROM_BIOS(1)) |
| 576 | | ROM_SYSTEM_BIOS(1, "2nd", "2nd rev.") |
| 577 | | ROMX_LOAD( "lik2.rom", 0xc000, 0x3000, CRC(71820E43) SHA1(a85b4fc33b1ea96a1b8fe0c791f1aab8e967bb44), ROM_BIOS(2)) |
| 548 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 549 | ROM_SYSTEM_BIOS(0, "1st", "1st rev.") |
| 550 | ROMX_LOAD( "lik.rom", 0xc000, 0x3000, CRC(705BB3A0) SHA1(f90b009ec9d3303bbda228714dd24de057e744b6), ROM_BIOS(1)) |
| 551 | ROM_SYSTEM_BIOS(1, "2nd", "2nd rev.") |
| 552 | ROMX_LOAD( "lik2.rom", 0xc000, 0x3000, CRC(71820E43) SHA1(a85b4fc33b1ea96a1b8fe0c791f1aab8e967bb44), ROM_BIOS(2)) |
| 578 | 553 | ROM_END |
| 579 | 554 | |
| 580 | 555 | ROM_START( specimx ) |
| 581 | | ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF ) |
| 582 | | ROM_SYSTEM_BIOS(0, "FOS", "ROM FOS") |
| 583 | | ROMX_LOAD( "specimx.rom", 0x10000, 0xb800, CRC(DB68F9B1) SHA1(c79888449f8a605267ec3e10dcc8e6e6f43b3a95), ROM_BIOS(1)) |
| 584 | | ROM_SYSTEM_BIOS(1, "NC", "NC") |
| 585 | | ROMX_LOAD( "ncrdy.rom", 0x10000, 0x10000, CRC(5D04C522) SHA1(d7daa7fe14cd8e0c6f87fd6453ec3e94ea2c259f) ,ROM_BIOS(2)) |
| 556 | ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF ) |
| 557 | ROM_SYSTEM_BIOS(0, "FOS", "ROM FOS") |
| 558 | ROMX_LOAD( "specimx.rom", 0x10000, 0xb800, CRC(DB68F9B1) SHA1(c79888449f8a605267ec3e10dcc8e6e6f43b3a95), ROM_BIOS(1)) |
| 559 | ROM_SYSTEM_BIOS(1, "NC", "NC") |
| 560 | ROMX_LOAD( "ncrdy.rom", 0x10000, 0x10000, CRC(5D04C522) SHA1(d7daa7fe14cd8e0c6f87fd6453ec3e94ea2c259f) ,ROM_BIOS(2)) |
| 586 | 561 | ROM_SYSTEM_BIOS(2, "RAMFOS", "RAMFOS") |
| 587 | 562 | ROMX_LOAD( "ramfos.rom", 0x10000, 0x3000, CRC(83e19df4) SHA1(20e5e53eb45729a24c1c7c63e114dbd14e3c4184) ,ROM_BIOS(3)) |
| 588 | 563 | ROM_END |
| 589 | 564 | |
| 590 | 565 | ROM_START( erik ) |
| 591 | | ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF ) |
| 592 | | ROM_LOAD( "erik.bin", 0x10000, 0x10000, CRC(6F3208F4) SHA1(41f6e2763ef60d3c7214c98893e580d25346fa2d)) |
| 566 | ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF ) |
| 567 | ROM_LOAD( "erik.bin", 0x10000, 0x10000, CRC(6F3208F4) SHA1(41f6e2763ef60d3c7214c98893e580d25346fa2d)) |
| 593 | 568 | ROM_END |
| 594 | 569 | |
| 595 | 570 | ROM_START( pioner ) |
| 596 | 571 | // Ukranian clone with 16KB RAM |
| 597 | | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 572 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 598 | 573 | ROM_LOAD( "pioner.rf2", 0xc000, 0x0800, CRC(d6250ab2) SHA1(b953517d883c64857e63139fed52436f77d371cb)) |
| 599 | 574 | ROM_END |
| 600 | 575 | |
| 601 | 576 | /* Driver */ |
| 602 | 577 | |
| 603 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 604 | | COMP( 1985, special, 0, 0, special, special, special, "<unknown>", "Specialist", 0) |
| 605 | | COMP( 1985, specialm, special,0, special, special, special, "<unknown>", "Specialist M", 0) |
| 606 | | COMP( 1985, pioner, special,0, special, special, special, "<unknown>", "Pioner", 0) |
| 607 | | COMP( 1985, specialp, special,0, specialp, specialp, special, "<unknown>", "Specialist + hires graph", 0) |
| 608 | | COMP( 1985, lik, special,0, special, lik, special, "<unknown>", "Lik", 0) |
| 609 | | COMP( 1985, specimx, special,0, specimx, specimx, 0, "<unknown>", "Specialist MX", 0) |
| 610 | | COMP( 1994, erik, special,0, erik, special, erik, "<unknown>", "Erik", 0) |
| 578 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 579 | COMP( 1985, special, 0, 0, special, special, special, "<unknown>", "Specialist", GAME_NOT_WORKING ) |
| 580 | COMP( 1985, specialm, special, 0, special, special, special, "<unknown>", "Specialist M", GAME_NOT_WORKING ) |
| 581 | COMP( 1985, pioner, special, 0, special, special, special, "<unknown>", "Pioner", GAME_NOT_WORKING ) |
| 582 | COMP( 1985, specialp, special, 0, specialp, specialp, special, "<unknown>", "Specialist + hires graph", GAME_NOT_WORKING ) |
| 583 | COMP( 1985, lik, special, 0, special, lik, special, "<unknown>", "Lik", GAME_NOT_WORKING ) |
| 584 | COMP( 1985, specimx, special, 0, specimx, specimx, 0, "<unknown>", "Specialist MX", 0) |
| 585 | COMP( 1994, erik, special, 0, erik, special, erik, "<unknown>", "Erik", GAME_NOT_WORKING ) |