src/mame/audio/mcr.c
| r14963 | r14964 | |
| 1 | | /*************************************************************************** |
| 2 | | |
| 3 | | audio/mcr.c |
| 4 | | |
| 5 | | Functions to emulate general the various MCR sound cards. |
| 6 | | |
| 7 | | ***************************************************************************/ |
| 8 | | |
| 9 | | #include "emu.h" |
| 10 | | #include "cpu/z80/z80.h" |
| 11 | | #include "cpu/m68000/m68000.h" |
| 12 | | #include "cpu/m6800/m6800.h" |
| 13 | | #include "cpu/m6809/m6809.h" |
| 14 | | #include "sound/tms5220.h" |
| 15 | | #include "sound/ay8910.h" |
| 16 | | #include "sound/dac.h" |
| 17 | | #include "audio/williams.h" |
| 18 | | #include "includes/mcr.h" |
| 19 | | #include "audio/mcr.h" |
| 20 | | |
| 21 | | |
| 22 | | |
| 23 | | /************************************* |
| 24 | | * |
| 25 | | * Constants |
| 26 | | * |
| 27 | | *************************************/ |
| 28 | | |
| 29 | | #define SSIO_CLOCK XTAL_16MHz |
| 30 | | #define CSDELUXE_CLOCK XTAL_16MHz |
| 31 | | #define SOUNDSGOOD_CLOCK XTAL_16MHz |
| 32 | | #define TURBOCS_CLOCK XTAL_8MHz |
| 33 | | #define SQUAWKTALK_CLOCK XTAL_3_579545MHz |
| 34 | | |
| 35 | | |
| 36 | | |
| 37 | | /************************************* |
| 38 | | * |
| 39 | | * Global variables |
| 40 | | * |
| 41 | | *************************************/ |
| 42 | | |
| 43 | | static UINT8 mcr_sound_config; |
| 44 | | |
| 45 | | |
| 46 | | |
| 47 | | /************************************* |
| 48 | | * |
| 49 | | * Statics |
| 50 | | * |
| 51 | | *************************************/ |
| 52 | | |
| 53 | | static UINT16 dacval; |
| 54 | | |
| 55 | | /* SSIO-specific globals */ |
| 56 | | static device_t *ssio_sound_cpu; |
| 57 | | static UINT8 ssio_data[4]; |
| 58 | | static UINT8 ssio_status; |
| 59 | | static UINT8 ssio_14024_count; |
| 60 | | static UINT8 ssio_mute; |
| 61 | | static UINT8 ssio_overall[2]; |
| 62 | | static UINT8 ssio_duty_cycle[2][3]; |
| 63 | | static UINT8 ssio_ayvolume_lookup[16]; |
| 64 | | static UINT8 ssio_custom_input_mask[5]; |
| 65 | | static UINT8 ssio_custom_output_mask[2]; |
| 66 | | static read8_delegate ssio_custom_input[5]; |
| 67 | | static write8_delegate ssio_custom_output[2]; |
| 68 | | |
| 69 | | /* Chip Squeak Deluxe-specific globals */ |
| 70 | | static device_t *csdeluxe_sound_cpu; |
| 71 | | static UINT8 csdeluxe_status; |
| 72 | | |
| 73 | | /* Turbo Chip Squeak-specific globals */ |
| 74 | | static device_t *turbocs_sound_cpu; |
| 75 | | static UINT8 turbocs_status; |
| 76 | | |
| 77 | | /* Sounds Good-specific globals */ |
| 78 | | static device_t *soundsgood_sound_cpu; |
| 79 | | static UINT8 soundsgood_status; |
| 80 | | |
| 81 | | /* Squawk n' Talk-specific globals */ |
| 82 | | static device_t *squawkntalk_sound_cpu; |
| 83 | | static UINT8 squawkntalk_tms_command; |
| 84 | | static UINT8 squawkntalk_tms_strobes; |
| 85 | | |
| 86 | | |
| 87 | | |
| 88 | | /************************************* |
| 89 | | * |
| 90 | | * Prototypes |
| 91 | | * |
| 92 | | *************************************/ |
| 93 | | |
| 94 | | static void ssio_compute_ay8910_modulation(running_machine &machine); |
| 95 | | |
| 96 | | |
| 97 | | |
| 98 | | /************************************* |
| 99 | | * |
| 100 | | * Generic MCR sound initialization |
| 101 | | * |
| 102 | | *************************************/ |
| 103 | | |
| 104 | | void mcr_sound_init(running_machine &machine, UINT8 config) |
| 105 | | { |
| 106 | | mcr_sound_config = config; |
| 107 | | |
| 108 | | /* SSIO */ |
| 109 | | if (mcr_sound_config & MCR_SSIO) |
| 110 | | { |
| 111 | | ssio_sound_cpu = machine.device("ssiocpu"); |
| 112 | | ssio_compute_ay8910_modulation(machine); |
| 113 | | state_save_register_global_array(machine, ssio_data); |
| 114 | | state_save_register_global(machine, ssio_status); |
| 115 | | state_save_register_global(machine, ssio_14024_count); |
| 116 | | state_save_register_global(machine, ssio_mute); |
| 117 | | state_save_register_global_array(machine, ssio_overall); |
| 118 | | state_save_register_global_2d_array(machine, ssio_duty_cycle); |
| 119 | | } |
| 120 | | |
| 121 | | /* Turbo Chip Squeak */ |
| 122 | | if (mcr_sound_config & MCR_TURBO_CHIP_SQUEAK) |
| 123 | | { |
| 124 | | turbocs_sound_cpu = machine.device("tcscpu"); |
| 125 | | state_save_register_global(machine, turbocs_status); |
| 126 | | } |
| 127 | | |
| 128 | | /* Chip Squeak Deluxe */ |
| 129 | | if (mcr_sound_config & MCR_CHIP_SQUEAK_DELUXE) |
| 130 | | { |
| 131 | | csdeluxe_sound_cpu = machine.device("csdcpu"); |
| 132 | | state_save_register_global(machine, csdeluxe_status); |
| 133 | | } |
| 134 | | |
| 135 | | /* Sounds Good */ |
| 136 | | if (mcr_sound_config & MCR_SOUNDS_GOOD) |
| 137 | | { |
| 138 | | soundsgood_sound_cpu = machine.device("sgcpu"); |
| 139 | | state_save_register_global(machine, soundsgood_status); |
| 140 | | } |
| 141 | | |
| 142 | | /* Squawk n Talk */ |
| 143 | | if (mcr_sound_config & MCR_SQUAWK_N_TALK) |
| 144 | | { |
| 145 | | squawkntalk_sound_cpu = machine.device("sntcpu"); |
| 146 | | state_save_register_global(machine, squawkntalk_tms_command); |
| 147 | | state_save_register_global(machine, squawkntalk_tms_strobes); |
| 148 | | } |
| 149 | | |
| 150 | | /* Advanced Audio */ |
| 151 | | if (mcr_sound_config & MCR_WILLIAMS_SOUND) |
| 152 | | williams_cvsd_init(machine); |
| 153 | | } |
| 154 | | |
| 155 | | |
| 156 | | void mcr_sound_reset(running_machine &machine) |
| 157 | | { |
| 158 | | /* SSIO */ |
| 159 | | if (mcr_sound_config & MCR_SSIO) |
| 160 | | { |
| 161 | | ssio_reset_w(machine, 1); |
| 162 | | ssio_reset_w(machine, 0); |
| 163 | | } |
| 164 | | |
| 165 | | /* Turbo Chip Squeak */ |
| 166 | | if (mcr_sound_config & MCR_TURBO_CHIP_SQUEAK) |
| 167 | | { |
| 168 | | turbocs_reset_w(machine, 1); |
| 169 | | turbocs_reset_w(machine, 0); |
| 170 | | } |
| 171 | | |
| 172 | | /* Chip Squeak Deluxe */ |
| 173 | | if (mcr_sound_config & MCR_CHIP_SQUEAK_DELUXE) |
| 174 | | { |
| 175 | | csdeluxe_reset_w(machine, 1); |
| 176 | | csdeluxe_reset_w(machine, 0); |
| 177 | | } |
| 178 | | |
| 179 | | /* Sounds Good */ |
| 180 | | if (mcr_sound_config & MCR_SOUNDS_GOOD) |
| 181 | | { |
| 182 | | soundsgood_reset_w(machine, 1); |
| 183 | | soundsgood_reset_w(machine, 0); |
| 184 | | } |
| 185 | | |
| 186 | | /* Squawk n Talk */ |
| 187 | | if (mcr_sound_config & MCR_SQUAWK_N_TALK) |
| 188 | | { |
| 189 | | squawkntalk_reset_w(machine, 1); |
| 190 | | squawkntalk_reset_w(machine, 0); |
| 191 | | } |
| 192 | | |
| 193 | | /* Advanced Audio */ |
| 194 | | if (mcr_sound_config & MCR_WILLIAMS_SOUND) |
| 195 | | { |
| 196 | | williams_cvsd_reset_w(machine, 1); |
| 197 | | williams_cvsd_reset_w(machine, 0); |
| 198 | | } |
| 199 | | } |
| 200 | | |
| 201 | | |
| 202 | | |
| 203 | | /************************************* |
| 204 | | * |
| 205 | | * MCR SSIO communications |
| 206 | | * |
| 207 | | * Z80, 2 AY-8910 |
| 208 | | * |
| 209 | | *************************************/ |
| 210 | | |
| 211 | | /* |
| 212 | | AY-8910 modulation: |
| 213 | | |
| 214 | | Starts with a 16MHz oscillator |
| 215 | | /2 via 7474 flip-flip @ F11 |
| 216 | | |
| 217 | | This signal clocks the binary counter @ E11 which |
| 218 | | cascades into the decade counter @ D11. This combo |
| 219 | | effectively counts from 0-159 and then wraps. The |
| 220 | | value from these counters is input to an 82S123 PROM, |
| 221 | | which appears to be standard on all games. |
| 222 | | |
| 223 | | One bit at a time from this PROM is clocked at a time |
| 224 | | and the resulting inverted signal becomes a clock for |
| 225 | | the down counters at F3, F4, F5, F8, F9, and F10. The |
| 226 | | value in these down counters are reloaded after the 160 |
| 227 | | counts from the binary/decade counter combination. |
| 228 | | |
| 229 | | When these down counters are loaded, the TC signal is |
| 230 | | clear, which mutes the voice. When the down counters |
| 231 | | cross through 0, the TC signal goes high and the 4016 |
| 232 | | multiplexers allow the AY-8910 voice to go through. |
| 233 | | Thus, writing a 0 to the counters will enable the |
| 234 | | voice for the longest period of time, while writing |
| 235 | | a 15 enables it for the shortest period of time. |
| 236 | | This creates an effective duty cycle for the voice. |
| 237 | | |
| 238 | | Given that the down counters are reset 50000 times per |
| 239 | | second (SSIO_CLOCK/2/160), which is above the typical |
| 240 | | frequency of sound output. So we simply apply a volume |
| 241 | | adjustment to each voice according to the duty cycle. |
| 242 | | */ |
| 243 | | static void ssio_compute_ay8910_modulation(running_machine &machine) |
| 244 | | { |
| 245 | | UINT8 *prom = machine.region("proms")->base(); |
| 246 | | int volval; |
| 247 | | |
| 248 | | /* loop over all possible values of the duty cycle */ |
| 249 | | for (volval = 0; volval < 16; volval++) |
| 250 | | { |
| 251 | | int remaining_clocks = volval; |
| 252 | | int clock, cur = 0, prev = 1; |
| 253 | | |
| 254 | | /* loop over all the clocks until we run out; look up in the PROM */ |
| 255 | | /* to find out when the next clock should fire */ |
| 256 | | for (clock = 0; clock < 160 && remaining_clocks; clock++) |
| 257 | | { |
| 258 | | cur = prom[clock / 8] & (0x80 >> (clock % 8)); |
| 259 | | |
| 260 | | /* check for a high -> low transition */ |
| 261 | | if (cur == 0 && prev != 0) |
| 262 | | remaining_clocks--; |
| 263 | | |
| 264 | | prev = cur; |
| 265 | | } |
| 266 | | |
| 267 | | /* treat the duty cycle as a volume */ |
| 268 | | ssio_ayvolume_lookup[15-volval] = clock * 100 / 160; |
| 269 | | } |
| 270 | | } |
| 271 | | |
| 272 | | /********* internal interfaces ***********/ |
| 273 | | static INTERRUPT_GEN( ssio_14024_clock ) |
| 274 | | { |
| 275 | | /* |
| 276 | | /SINT is generated as follows: |
| 277 | | |
| 278 | | Starts with a 16MHz oscillator |
| 279 | | /2 via 7474 flip-flop @ F11 |
| 280 | | /16 via 74161 binary counter @ E11 |
| 281 | | /10 via 74190 decade counter @ D11 |
| 282 | | |
| 283 | | Bit 3 of the decade counter clocks a 14024 7-bit async counter @ C12. |
| 284 | | This routine is called to clock this 7-bit counter. |
| 285 | | Bit 6 of the output is inverted and connected to /SINT. |
| 286 | | */ |
| 287 | | ssio_14024_count = (ssio_14024_count + 1) & 0x7f; |
| 288 | | |
| 289 | | /* if the low 5 bits clocked to 0, bit 6 has changed state */ |
| 290 | | if ((ssio_14024_count & 0x3f) == 0) |
| 291 | | device_set_input_line(device, 0, (ssio_14024_count & 0x40) ? ASSERT_LINE : CLEAR_LINE); |
| 292 | | } |
| 293 | | |
| 294 | | READ8_MEMBER(mcr_state::ssio_irq_clear) |
| 295 | | { |
| 296 | | /* a read here asynchronously resets the 14024 count, clearing /SINT */ |
| 297 | | ssio_14024_count = 0; |
| 298 | | device_set_input_line(ssio_sound_cpu, 0, CLEAR_LINE); |
| 299 | | return 0xff; |
| 300 | | } |
| 301 | | |
| 302 | | WRITE8_MEMBER(mcr_state::ssio_status_w) |
| 303 | | { |
| 304 | | ssio_status = data; |
| 305 | | } |
| 306 | | |
| 307 | | READ8_MEMBER(mcr_state::ssio_data_r) |
| 308 | | { |
| 309 | | return ssio_data[offset]; |
| 310 | | } |
| 311 | | |
| 312 | | static TIMER_CALLBACK( ssio_delayed_data_w ) |
| 313 | | { |
| 314 | | ssio_data[param >> 8] = param & 0xff; |
| 315 | | } |
| 316 | | |
| 317 | | static void ssio_update_volumes(running_machine &machine) |
| 318 | | { |
| 319 | | device_t *ay0 = machine.device("ssio.1"); |
| 320 | | device_t *ay1 = machine.device("ssio.2"); |
| 321 | | ay8910_set_volume(ay0, 0, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[0][0]]); |
| 322 | | ay8910_set_volume(ay0, 1, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[0][1]]); |
| 323 | | ay8910_set_volume(ay0, 2, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[0][2]]); |
| 324 | | ay8910_set_volume(ay1, 0, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[1][0]]); |
| 325 | | ay8910_set_volume(ay1, 1, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[1][1]]); |
| 326 | | ay8910_set_volume(ay1, 2, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[1][2]]); |
| 327 | | } |
| 328 | | |
| 329 | | static WRITE8_DEVICE_HANDLER( ssio_porta0_w ) |
| 330 | | { |
| 331 | | ssio_duty_cycle[0][0] = data & 15; |
| 332 | | ssio_duty_cycle[0][1] = data >> 4; |
| 333 | | ssio_update_volumes(device->machine()); |
| 334 | | } |
| 335 | | |
| 336 | | static WRITE8_DEVICE_HANDLER( ssio_portb0_w ) |
| 337 | | { |
| 338 | | ssio_duty_cycle[0][2] = data & 15; |
| 339 | | ssio_overall[0] = (data >> 4) & 7; |
| 340 | | ssio_update_volumes(device->machine()); |
| 341 | | } |
| 342 | | |
| 343 | | static WRITE8_DEVICE_HANDLER( ssio_porta1_w ) |
| 344 | | { |
| 345 | | ssio_duty_cycle[1][0] = data & 15; |
| 346 | | ssio_duty_cycle[1][1] = data >> 4; |
| 347 | | ssio_update_volumes(device->machine()); |
| 348 | | } |
| 349 | | |
| 350 | | static WRITE8_DEVICE_HANDLER( ssio_portb1_w ) |
| 351 | | { |
| 352 | | ssio_duty_cycle[1][2] = data & 15; |
| 353 | | ssio_overall[1] = (data >> 4) & 7; |
| 354 | | ssio_mute = data & 0x80; |
| 355 | | ssio_update_volumes(device->machine()); |
| 356 | | } |
| 357 | | |
| 358 | | /********* external interfaces ***********/ |
| 359 | | WRITE8_MEMBER(mcr_state::ssio_data_w) |
| 360 | | { |
| 361 | | machine().scheduler().synchronize(FUNC(ssio_delayed_data_w), (offset << 8) | (data & 0xff)); |
| 362 | | } |
| 363 | | |
| 364 | | READ8_MEMBER(mcr_state::ssio_status_r) |
| 365 | | { |
| 366 | | return ssio_status; |
| 367 | | } |
| 368 | | |
| 369 | | void ssio_reset_w(running_machine &machine, int state) |
| 370 | | { |
| 371 | | /* going high halts the CPU */ |
| 372 | | if (state) |
| 373 | | { |
| 374 | | int i; |
| 375 | | |
| 376 | | device_set_input_line(ssio_sound_cpu, INPUT_LINE_RESET, ASSERT_LINE); |
| 377 | | |
| 378 | | /* latches also get reset */ |
| 379 | | for (i = 0; i < 4; i++) |
| 380 | | ssio_data[i] = 0; |
| 381 | | ssio_status = 0; |
| 382 | | ssio_14024_count = 0; |
| 383 | | } |
| 384 | | /* going low resets and reactivates the CPU */ |
| 385 | | else |
| 386 | | device_set_input_line(ssio_sound_cpu, INPUT_LINE_RESET, CLEAR_LINE); |
| 387 | | } |
| 388 | | |
| 389 | | READ8_MEMBER(mcr_state::ssio_input_port_r) |
| 390 | | { |
| 391 | | static const char *const port[] = { "SSIO.IP0", "SSIO.IP1", "SSIO.IP2", "SSIO.IP3", "SSIO.IP4" }; |
| 392 | | UINT8 result = input_port_read_safe(machine(), port[offset], 0xff); |
| 393 | | if (!ssio_custom_input[offset].isnull()) |
| 394 | | result = (result & ~ssio_custom_input_mask[offset]) | |
| 395 | | (ssio_custom_input[offset](*&space, offset, 0xff) & ssio_custom_input_mask[offset]); |
| 396 | | return result; |
| 397 | | } |
| 398 | | |
| 399 | | WRITE8_MEMBER(mcr_state::ssio_output_port_w) |
| 400 | | { |
| 401 | | int which = offset >> 2; |
| 402 | | if (which == 0) |
| 403 | | mcr_control_port_w(*&space, offset, data); |
| 404 | | if (!ssio_custom_output[which].isnull()) |
| 405 | | ssio_custom_output[which](*&space, offset, data & ssio_custom_output_mask[which],0xff); |
| 406 | | } |
| 407 | | |
| 408 | | void ssio_set_custom_input(int which, int mask, read8_delegate handler) |
| 409 | | { |
| 410 | | ssio_custom_input[which] = handler; |
| 411 | | ssio_custom_input_mask[which] = mask; |
| 412 | | } |
| 413 | | |
| 414 | | void ssio_set_custom_output(int which, int mask, write8_delegate handler) |
| 415 | | { |
| 416 | | ssio_custom_output[which/4] = handler; |
| 417 | | ssio_custom_output_mask[which/4] = mask; |
| 418 | | } |
| 419 | | |
| 420 | | |
| 421 | | /********* sound interfaces ***********/ |
| 422 | | static const ay8910_interface ssio_ay8910_interface_1 = |
| 423 | | { |
| 424 | | AY8910_LEGACY_OUTPUT, |
| 425 | | AY8910_DEFAULT_LOADS, |
| 426 | | DEVCB_NULL, |
| 427 | | DEVCB_NULL, |
| 428 | | DEVCB_HANDLER(ssio_porta0_w), |
| 429 | | DEVCB_HANDLER(ssio_portb0_w) |
| 430 | | }; |
| 431 | | |
| 432 | | static const ay8910_interface ssio_ay8910_interface_2 = |
| 433 | | { |
| 434 | | AY8910_LEGACY_OUTPUT, |
| 435 | | AY8910_DEFAULT_LOADS, |
| 436 | | DEVCB_NULL, |
| 437 | | DEVCB_NULL, |
| 438 | | DEVCB_HANDLER(ssio_porta1_w), |
| 439 | | DEVCB_HANDLER(ssio_portb1_w) |
| 440 | | }; |
| 441 | | |
| 442 | | |
| 443 | | /********* memory interfaces ***********/ |
| 444 | | |
| 445 | | /* address map verified from schematics */ |
| 446 | | static ADDRESS_MAP_START( ssio_map, AS_PROGRAM, 8, mcr_state ) |
| 447 | | ADDRESS_MAP_UNMAP_HIGH |
| 448 | | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 449 | | AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_RAM |
| 450 | | AM_RANGE(0x9000, 0x9003) AM_MIRROR(0x0ffc) AM_READ(ssio_data_r) |
| 451 | | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ssio.1", ay8910_address_w) |
| 452 | | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ssio.1", ay8910_r) |
| 453 | | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ssio.1", ay8910_data_w) |
| 454 | | AM_RANGE(0xb000, 0xb000) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ssio.2", ay8910_address_w) |
| 455 | | AM_RANGE(0xb001, 0xb001) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ssio.2", ay8910_r) |
| 456 | | AM_RANGE(0xb002, 0xb002) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ssio.2", ay8910_data_w) |
| 457 | | AM_RANGE(0xc000, 0xcfff) AM_READNOP AM_WRITE(ssio_status_w) |
| 458 | | AM_RANGE(0xd000, 0xdfff) AM_WRITENOP /* low bit controls yellow LED */ |
| 459 | | AM_RANGE(0xe000, 0xefff) AM_READ(ssio_irq_clear) |
| 460 | | AM_RANGE(0xf000, 0xffff) AM_READ_PORT("SSIO.DIP") /* 6 DIP switches */ |
| 461 | | ADDRESS_MAP_END |
| 462 | | |
| 463 | | |
| 464 | | /********* machine driver ***********/ |
| 465 | | MACHINE_CONFIG_FRAGMENT(mcr_ssio) |
| 466 | | MCFG_CPU_ADD("ssiocpu", Z80, SSIO_CLOCK/2/4) |
| 467 | | MCFG_CPU_PROGRAM_MAP(ssio_map) |
| 468 | | MCFG_CPU_PERIODIC_INT(ssio_14024_clock, SSIO_CLOCK/2/16/10) |
| 469 | | |
| 470 | | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 471 | | MCFG_SOUND_ADD("ssio.1", AY8910, SSIO_CLOCK/2/4) |
| 472 | | MCFG_SOUND_CONFIG(ssio_ay8910_interface_1) |
| 473 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.33) |
| 474 | | |
| 475 | | MCFG_SOUND_ADD("ssio.2", AY8910, SSIO_CLOCK/2/4) |
| 476 | | MCFG_SOUND_CONFIG(ssio_ay8910_interface_2) |
| 477 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.33) |
| 478 | | MACHINE_CONFIG_END |
| 479 | | |
| 480 | | |
| 481 | | |
| 482 | | /************************************* |
| 483 | | * |
| 484 | | * Chip Squeak Deluxe communications |
| 485 | | * |
| 486 | | * MC68000, 1 PIA, 10-bit DAC |
| 487 | | * |
| 488 | | *************************************/ |
| 489 | | |
| 490 | | /********* internal interfaces ***********/ |
| 491 | | static WRITE8_DEVICE_HANDLER( csdeluxe_porta_w ) |
| 492 | | { |
| 493 | | dacval = (dacval & ~0x3fc) | (data << 2); |
| 494 | | dac_signed_data_16_w(device->machine().device("csddac"), dacval << 6); |
| 495 | | } |
| 496 | | |
| 497 | | static WRITE8_DEVICE_HANDLER( csdeluxe_portb_w ) |
| 498 | | { |
| 499 | | UINT8 z_mask = downcast<pia6821_device *>(device)->port_b_z_mask(); |
| 500 | | |
| 501 | | dacval = (dacval & ~0x003) | (data >> 6); |
| 502 | | dac_signed_data_16_w(device->machine().device("csddac"), dacval << 6); |
| 503 | | |
| 504 | | if (~z_mask & 0x10) csdeluxe_status = (csdeluxe_status & ~1) | ((data >> 4) & 1); |
| 505 | | if (~z_mask & 0x20) csdeluxe_status = (csdeluxe_status & ~2) | ((data >> 4) & 2); |
| 506 | | } |
| 507 | | |
| 508 | | static WRITE_LINE_DEVICE_HANDLER( csdeluxe_irq ) |
| 509 | | { |
| 510 | | pia6821_device *pia = downcast<pia6821_device *>(device); |
| 511 | | int combined_state = pia->irq_a_state() | pia->irq_b_state(); |
| 512 | | |
| 513 | | device_set_input_line(csdeluxe_sound_cpu, 4, combined_state ? ASSERT_LINE : CLEAR_LINE); |
| 514 | | } |
| 515 | | |
| 516 | | static TIMER_CALLBACK( csdeluxe_delayed_data_w ) |
| 517 | | { |
| 518 | | pia6821_device *pia = machine.device<pia6821_device>("csdpia"); |
| 519 | | |
| 520 | | pia->portb_w(param & 0x0f); |
| 521 | | pia->ca1_w(~param & 0x10); |
| 522 | | |
| 523 | | /* oftentimes games will write one nibble at a time; the sync on this is very */ |
| 524 | | /* important, so we boost the interleave briefly while this happens */ |
| 525 | | machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 526 | | } |
| 527 | | |
| 528 | | static READ16_DEVICE_HANDLER( csdeluxe_pia_r ) |
| 529 | | { |
| 530 | | /* Spy Hunter accesses the MSB; Turbo Tag access via the LSB */ |
| 531 | | /* My guess is that Turbo Tag works through a fluke, whereby the 68000 */ |
| 532 | | /* using the MOVEP instruction outputs the same value on the high and */ |
| 533 | | /* low bytes. */ |
| 534 | | pia6821_device *pia = downcast<pia6821_device *>(device); |
| 535 | | if (ACCESSING_BITS_8_15) |
| 536 | | return pia->read_alt(*device->machine().memory().first_space(), offset) << 8; |
| 537 | | else |
| 538 | | return pia->read_alt(*device->machine().memory().first_space(), offset); |
| 539 | | } |
| 540 | | |
| 541 | | static WRITE16_DEVICE_HANDLER( csdeluxe_pia_w ) |
| 542 | | { |
| 543 | | pia6821_device *pia = downcast<pia6821_device *>(device); |
| 544 | | if (ACCESSING_BITS_8_15) |
| 545 | | pia->write_alt(*device->machine().memory().first_space(), offset, data >> 8); |
| 546 | | else |
| 547 | | pia->write_alt(*device->machine().memory().first_space(), offset, data); |
| 548 | | } |
| 549 | | |
| 550 | | |
| 551 | | /********* external interfaces ***********/ |
| 552 | | WRITE8_MEMBER(mcr_state::csdeluxe_data_w) |
| 553 | | { |
| 554 | | machine().scheduler().synchronize(FUNC(csdeluxe_delayed_data_w), data); |
| 555 | | } |
| 556 | | |
| 557 | | READ8_MEMBER(mcr_state::csdeluxe_status_r) |
| 558 | | { |
| 559 | | return csdeluxe_status; |
| 560 | | } |
| 561 | | |
| 562 | | void csdeluxe_reset_w(running_machine &machine, int state) |
| 563 | | { |
| 564 | | device_set_input_line(csdeluxe_sound_cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); |
| 565 | | } |
| 566 | | |
| 567 | | |
| 568 | | /********* memory interfaces ***********/ |
| 569 | | |
| 570 | | /* address map determined by PAL; not verified */ |
| 571 | | static ADDRESS_MAP_START( csdeluxe_map, AS_PROGRAM, 16, mcr_state ) |
| 572 | | ADDRESS_MAP_UNMAP_HIGH |
| 573 | | ADDRESS_MAP_GLOBAL_MASK(0x1ffff) |
| 574 | | AM_RANGE(0x000000, 0x007fff) AM_ROM |
| 575 | | AM_RANGE(0x018000, 0x018007) AM_DEVREADWRITE_LEGACY("csdpia", csdeluxe_pia_r, csdeluxe_pia_w) |
| 576 | | AM_RANGE(0x01c000, 0x01cfff) AM_RAM |
| 577 | | ADDRESS_MAP_END |
| 578 | | |
| 579 | | |
| 580 | | /********* PIA interfaces ***********/ |
| 581 | | static const pia6821_interface csdeluxe_pia_intf = |
| 582 | | { |
| 583 | | DEVCB_NULL, /* port A in */ |
| 584 | | DEVCB_NULL, /* port B in */ |
| 585 | | DEVCB_NULL, /* line CA1 in */ |
| 586 | | DEVCB_NULL, /* line CB1 in */ |
| 587 | | DEVCB_NULL, /* line CA2 in */ |
| 588 | | DEVCB_NULL, /* line CB2 in */ |
| 589 | | DEVCB_HANDLER(csdeluxe_porta_w), /* port A out */ |
| 590 | | DEVCB_HANDLER(csdeluxe_portb_w), /* port B out */ |
| 591 | | DEVCB_NULL, /* line CA2 out */ |
| 592 | | DEVCB_NULL, /* port CB2 out */ |
| 593 | | DEVCB_LINE(csdeluxe_irq), /* IRQA */ |
| 594 | | DEVCB_LINE(csdeluxe_irq) /* IRQB */ |
| 595 | | }; |
| 596 | | |
| 597 | | |
| 598 | | /********* machine driver ***********/ |
| 599 | | MACHINE_CONFIG_FRAGMENT(chip_squeak_deluxe) |
| 600 | | MCFG_CPU_ADD("csdcpu", M68000, CSDELUXE_CLOCK/2) |
| 601 | | MCFG_CPU_PROGRAM_MAP(csdeluxe_map) |
| 602 | | |
| 603 | | MCFG_PIA6821_ADD("csdpia", csdeluxe_pia_intf) |
| 604 | | |
| 605 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 606 | | MCFG_SOUND_ADD("csddac", DAC, 0) |
| 607 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 608 | | MACHINE_CONFIG_END |
| 609 | | |
| 610 | | MACHINE_CONFIG_FRAGMENT(chip_squeak_deluxe_stereo) |
| 611 | | MCFG_CPU_ADD("csdcpu", M68000, CSDELUXE_CLOCK/2) |
| 612 | | MCFG_CPU_PROGRAM_MAP(csdeluxe_map) |
| 613 | | |
| 614 | | MCFG_PIA6821_ADD("csdpia", csdeluxe_pia_intf) |
| 615 | | |
| 616 | | MCFG_SOUND_ADD("csddac", DAC, 0) |
| 617 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) |
| 618 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) |
| 619 | | MACHINE_CONFIG_END |
| 620 | | |
| 621 | | |
| 622 | | |
| 623 | | /************************************* |
| 624 | | * |
| 625 | | * MCR Sounds Good communications |
| 626 | | * |
| 627 | | * MC68000, 1 PIA, 10-bit DAC |
| 628 | | * |
| 629 | | *************************************/ |
| 630 | | |
| 631 | | /********* internal interfaces ***********/ |
| 632 | | static WRITE8_DEVICE_HANDLER( soundsgood_porta_w ) |
| 633 | | { |
| 634 | | dacval = (dacval & ~0x3fc) | (data << 2); |
| 635 | | dac_signed_data_16_w(device->machine().device("sgdac"), dacval << 6); |
| 636 | | } |
| 637 | | |
| 638 | | static WRITE8_DEVICE_HANDLER( soundsgood_portb_w ) |
| 639 | | { |
| 640 | | UINT8 z_mask = downcast<pia6821_device *>(device)->port_b_z_mask(); |
| 641 | | |
| 642 | | dacval = (dacval & ~0x003) | (data >> 6); |
| 643 | | dac_signed_data_16_w(device->machine().device("sgdac"), dacval << 6); |
| 644 | | |
| 645 | | if (~z_mask & 0x10) soundsgood_status = (soundsgood_status & ~1) | ((data >> 4) & 1); |
| 646 | | if (~z_mask & 0x20) soundsgood_status = (soundsgood_status & ~2) | ((data >> 4) & 2); |
| 647 | | } |
| 648 | | |
| 649 | | static WRITE_LINE_DEVICE_HANDLER( soundsgood_irq ) |
| 650 | | { |
| 651 | | pia6821_device *pia = downcast<pia6821_device *>(device); |
| 652 | | int combined_state = pia->irq_a_state() | pia->irq_b_state(); |
| 653 | | |
| 654 | | device_set_input_line(soundsgood_sound_cpu, 4, combined_state ? ASSERT_LINE : CLEAR_LINE); |
| 655 | | } |
| 656 | | |
| 657 | | static TIMER_CALLBACK( soundsgood_delayed_data_w ) |
| 658 | | { |
| 659 | | pia6821_device *pia = machine.device<pia6821_device>("sgpia"); |
| 660 | | |
| 661 | | pia->portb_w((param >> 1) & 0x0f); |
| 662 | | pia->ca1_w(~param & 0x01); |
| 663 | | |
| 664 | | /* oftentimes games will write one nibble at a time; the sync on this is very */ |
| 665 | | /* important, so we boost the interleave briefly while this happens */ |
| 666 | | machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(250)); |
| 667 | | } |
| 668 | | |
| 669 | | |
| 670 | | /********* external interfaces ***********/ |
| 671 | | WRITE8_MEMBER(mcr_state::soundsgood_data_w) |
| 672 | | { |
| 673 | | machine().scheduler().synchronize(FUNC(soundsgood_delayed_data_w), data); |
| 674 | | } |
| 675 | | |
| 676 | | READ8_MEMBER(mcr_state::soundsgood_status_r) |
| 677 | | { |
| 678 | | return soundsgood_status; |
| 679 | | } |
| 680 | | |
| 681 | | void soundsgood_reset_w(running_machine &machine, int state) |
| 682 | | { |
| 683 | | //if (state) mame_printf_debug("SG Reset\n"); |
| 684 | | device_set_input_line(soundsgood_sound_cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); |
| 685 | | } |
| 686 | | |
| 687 | | |
| 688 | | /********* memory interfaces ***********/ |
| 689 | | |
| 690 | | /* address map determined by PAL; not verified */ |
| 691 | | static ADDRESS_MAP_START( soundsgood_map, AS_PROGRAM, 16, mcr_state ) |
| 692 | | ADDRESS_MAP_UNMAP_HIGH |
| 693 | | ADDRESS_MAP_GLOBAL_MASK(0x7ffff) |
| 694 | | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 695 | | AM_RANGE(0x060000, 0x060007) AM_DEVREADWRITE8("sgpia", pia6821_device, read_alt, write_alt, 0xff00) |
| 696 | | AM_RANGE(0x070000, 0x070fff) AM_RAM |
| 697 | | ADDRESS_MAP_END |
| 698 | | |
| 699 | | |
| 700 | | /********* PIA interfaces ***********/ |
| 701 | | static const pia6821_interface soundsgood_pia_intf = |
| 702 | | { |
| 703 | | DEVCB_NULL, /* port A in */ |
| 704 | | DEVCB_NULL, /* port B in */ |
| 705 | | DEVCB_NULL, /* line CA1 in */ |
| 706 | | DEVCB_NULL, /* line CB1 in */ |
| 707 | | DEVCB_NULL, /* line CA2 in */ |
| 708 | | DEVCB_NULL, /* line CB2 in */ |
| 709 | | DEVCB_HANDLER(soundsgood_porta_w), /* port A out */ |
| 710 | | DEVCB_HANDLER(soundsgood_portb_w), /* port B out */ |
| 711 | | DEVCB_NULL, /* line CA2 out */ |
| 712 | | DEVCB_NULL, /* port CB2 out */ |
| 713 | | DEVCB_LINE(soundsgood_irq), /* IRQA */ |
| 714 | | DEVCB_LINE(soundsgood_irq) /* IRQB */ |
| 715 | | }; |
| 716 | | |
| 717 | | |
| 718 | | /********* machine driver ***********/ |
| 719 | | MACHINE_CONFIG_FRAGMENT(sounds_good) |
| 720 | | MCFG_CPU_ADD("sgcpu", M68000, SOUNDSGOOD_CLOCK/2) |
| 721 | | MCFG_CPU_PROGRAM_MAP(soundsgood_map) |
| 722 | | |
| 723 | | MCFG_PIA6821_ADD("sgpia", soundsgood_pia_intf) |
| 724 | | |
| 725 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 726 | | MCFG_SOUND_ADD("sgdac", DAC, 0) |
| 727 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 728 | | MACHINE_CONFIG_END |
| 729 | | |
| 730 | | |
| 731 | | |
| 732 | | /************************************* |
| 733 | | * |
| 734 | | * MCR Turbo Chip Squeak communications |
| 735 | | * |
| 736 | | * MC6809, 1 PIA, 10-bit DAC |
| 737 | | * |
| 738 | | *************************************/ |
| 739 | | |
| 740 | | /********* internal interfaces ***********/ |
| 741 | | static WRITE8_DEVICE_HANDLER( turbocs_porta_w ) |
| 742 | | { |
| 743 | | dacval = (dacval & ~0x3fc) | (data << 2); |
| 744 | | dac_signed_data_16_w(device->machine().device("tcsdac"), dacval << 6); |
| 745 | | } |
| 746 | | |
| 747 | | static WRITE8_DEVICE_HANDLER( turbocs_portb_w ) |
| 748 | | { |
| 749 | | dacval = (dacval & ~0x003) | (data >> 6); |
| 750 | | dac_signed_data_16_w(device->machine().device("tcsdac"), dacval << 6); |
| 751 | | turbocs_status = (data >> 4) & 3; |
| 752 | | } |
| 753 | | |
| 754 | | static WRITE_LINE_DEVICE_HANDLER( turbocs_irq ) |
| 755 | | { |
| 756 | | pia6821_device *pia = downcast<pia6821_device *>(device); |
| 757 | | int combined_state = pia->irq_a_state() | pia->irq_b_state(); |
| 758 | | |
| 759 | | device_set_input_line(turbocs_sound_cpu, M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); |
| 760 | | } |
| 761 | | |
| 762 | | static TIMER_CALLBACK( turbocs_delayed_data_w ) |
| 763 | | { |
| 764 | | pia6821_device *pia = machine.device<pia6821_device>("tcspia"); |
| 765 | | |
| 766 | | pia->portb_w((param >> 1) & 0x0f); |
| 767 | | pia->ca1_w(~param & 0x01); |
| 768 | | |
| 769 | | /* oftentimes games will write one nibble at a time; the sync on this is very */ |
| 770 | | /* important, so we boost the interleave briefly while this happens */ |
| 771 | | machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 772 | | } |
| 773 | | |
| 774 | | |
| 775 | | /********* external interfaces ***********/ |
| 776 | | WRITE8_MEMBER(mcr_state::turbocs_data_w) |
| 777 | | { |
| 778 | | machine().scheduler().synchronize(FUNC(turbocs_delayed_data_w), data); |
| 779 | | } |
| 780 | | |
| 781 | | READ8_MEMBER(mcr_state::turbocs_status_r) |
| 782 | | { |
| 783 | | return turbocs_status; |
| 784 | | } |
| 785 | | |
| 786 | | void turbocs_reset_w(running_machine &machine, int state) |
| 787 | | { |
| 788 | | device_set_input_line(turbocs_sound_cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); |
| 789 | | } |
| 790 | | |
| 791 | | |
| 792 | | /********* memory interfaces ***********/ |
| 793 | | |
| 794 | | /* address map verified from schematics */ |
| 795 | | static ADDRESS_MAP_START( turbocs_map, AS_PROGRAM, 8, mcr_state ) |
| 796 | | ADDRESS_MAP_UNMAP_HIGH |
| 797 | | AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x3800) AM_RAM |
| 798 | | AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x3ffc) AM_DEVREADWRITE("tcspia", pia6821_device, read_alt, write_alt) |
| 799 | | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 800 | | ADDRESS_MAP_END |
| 801 | | |
| 802 | | |
| 803 | | /********* PIA interfaces ***********/ |
| 804 | | static const pia6821_interface turbocs_pia_intf = |
| 805 | | { |
| 806 | | DEVCB_NULL, /* port A in */ |
| 807 | | DEVCB_NULL, /* port B in */ |
| 808 | | DEVCB_NULL, /* line CA1 in */ |
| 809 | | DEVCB_NULL, /* line CB1 in */ |
| 810 | | DEVCB_NULL, /* line CA2 in */ |
| 811 | | DEVCB_NULL, /* line CB2 in */ |
| 812 | | DEVCB_HANDLER(turbocs_porta_w), /* port A out */ |
| 813 | | DEVCB_HANDLER(turbocs_portb_w), /* port B out */ |
| 814 | | DEVCB_NULL, /* line CA2 out */ |
| 815 | | DEVCB_NULL, /* port CB2 out */ |
| 816 | | DEVCB_LINE(turbocs_irq), /* IRQA */ |
| 817 | | DEVCB_LINE(turbocs_irq) /* IRQB */ |
| 818 | | }; |
| 819 | | |
| 820 | | |
| 821 | | /********* machine driver ***********/ |
| 822 | | MACHINE_CONFIG_FRAGMENT(turbo_chip_squeak) |
| 823 | | MCFG_CPU_ADD("tcscpu", M6809E, TURBOCS_CLOCK) |
| 824 | | MCFG_CPU_PROGRAM_MAP(turbocs_map) |
| 825 | | |
| 826 | | MCFG_PIA6821_ADD("tcspia", turbocs_pia_intf) |
| 827 | | |
| 828 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 829 | | MCFG_SOUND_ADD("tcsdac", DAC, 0) |
| 830 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 831 | | MACHINE_CONFIG_END |
| 832 | | |
| 833 | | |
| 834 | | |
| 835 | | /************************************* |
| 836 | | * |
| 837 | | * MCR Squawk n Talk communications |
| 838 | | * |
| 839 | | * MC6802, 2 PIAs, TMS5200, AY8912 (not used), 8-bit DAC (not used) |
| 840 | | * |
| 841 | | *************************************/ |
| 842 | | |
| 843 | | /********* internal interfaces ***********/ |
| 844 | | static WRITE8_DEVICE_HANDLER( squawkntalk_porta1_w ) |
| 845 | | { |
| 846 | | logerror("Write to AY-8912 = %02X\n", data); |
| 847 | | } |
| 848 | | |
| 849 | | WRITE8_MEMBER(mcr_state::squawkntalk_dac_w) |
| 850 | | { |
| 851 | | logerror("Write to DAC = %02X\n", data); |
| 852 | | } |
| 853 | | |
| 854 | | static WRITE8_DEVICE_HANDLER( squawkntalk_porta2_w ) |
| 855 | | { |
| 856 | | squawkntalk_tms_command = data; |
| 857 | | } |
| 858 | | |
| 859 | | static WRITE8_DEVICE_HANDLER( squawkntalk_portb2_w ) |
| 860 | | { |
| 861 | | device_t *tms = device->machine().device("sntspeech"); |
| 862 | | pia6821_device *pia = downcast<pia6821_device *>(device); |
| 863 | | |
| 864 | | /* bits 0-1 select read/write strobes on the TMS5200 */ |
| 865 | | data &= 0x03; |
| 866 | | |
| 867 | | /* write strobe -- pass the current command to the TMS5200 */ |
| 868 | | if (((data ^ squawkntalk_tms_strobes) & 0x02) && !(data & 0x02)) |
| 869 | | { |
| 870 | | tms5220_data_w(tms, offset, squawkntalk_tms_command); |
| 871 | | |
| 872 | | /* DoT expects the ready line to transition on a command/write here, so we oblige */ |
| 873 | | pia->ca2_w(1); |
| 874 | | pia->ca2_w(0); |
| 875 | | } |
| 876 | | |
| 877 | | /* read strobe -- read the current status from the TMS5200 */ |
| 878 | | else if (((data ^ squawkntalk_tms_strobes) & 0x01) && !(data & 0x01)) |
| 879 | | { |
| 880 | | pia->porta_w(tms5220_status_r(tms, offset)); |
| 881 | | |
| 882 | | /* DoT expects the ready line to transition on a command/write here, so we oblige */ |
| 883 | | pia->ca2_w(1); |
| 884 | | pia->ca2_w(0); |
| 885 | | } |
| 886 | | |
| 887 | | /* remember the state */ |
| 888 | | squawkntalk_tms_strobes = data; |
| 889 | | } |
| 890 | | |
| 891 | | static WRITE_LINE_DEVICE_HANDLER( squawkntalk_irq ) |
| 892 | | { |
| 893 | | pia6821_device *pia0 = device->machine().device<pia6821_device>("sntpia0"); |
| 894 | | pia6821_device *pia1 = device->machine().device<pia6821_device>("sntpia1"); |
| 895 | | int combined_state = pia0->irq_a_state() | pia0->irq_b_state() | pia1->irq_a_state() | pia1->irq_b_state(); |
| 896 | | |
| 897 | | device_set_input_line(squawkntalk_sound_cpu, M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); |
| 898 | | } |
| 899 | | |
| 900 | | static TIMER_CALLBACK( squawkntalk_delayed_data_w ) |
| 901 | | { |
| 902 | | pia6821_device *pia0 = machine.device<pia6821_device>("sntpia0"); |
| 903 | | |
| 904 | | pia0->porta_w(~param & 0x0f); |
| 905 | | pia0->cb1_w(~param & 0x10); |
| 906 | | } |
| 907 | | |
| 908 | | |
| 909 | | /********* external interfaces ***********/ |
| 910 | | WRITE8_MEMBER(mcr_state::squawkntalk_data_w) |
| 911 | | { |
| 912 | | machine().scheduler().synchronize(FUNC(squawkntalk_delayed_data_w), data); |
| 913 | | } |
| 914 | | |
| 915 | | void squawkntalk_reset_w(running_machine &machine, int state) |
| 916 | | { |
| 917 | | device_set_input_line(squawkntalk_sound_cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); |
| 918 | | } |
| 919 | | |
| 920 | | |
| 921 | | /********* memory interfaces ***********/ |
| 922 | | |
| 923 | | /* address map verified from schematics */ |
| 924 | | /* note that jumpers control the ROM sizes; if these are changed, use the alternate */ |
| 925 | | /* address map below */ |
| 926 | | static ADDRESS_MAP_START( squawkntalk_map, AS_PROGRAM, 8, mcr_state ) |
| 927 | | ADDRESS_MAP_UNMAP_HIGH |
| 928 | | AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */ |
| 929 | | AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("sntpia0", pia6821_device, read, write) |
| 930 | | AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("sntpia1", pia6821_device, read, write) |
| 931 | | AM_RANGE(0x1000, 0x1fff) AM_MIRROR(0x4000) AM_WRITE(squawkntalk_dac_w) |
| 932 | | AM_RANGE(0x8000, 0xbfff) AM_MIRROR(0x4000) AM_ROM |
| 933 | | ADDRESS_MAP_END |
| 934 | | |
| 935 | | /* alternate address map if the ROM jumpers are changed to support a smaller */ |
| 936 | | /* ROM size of 2k */ |
| 937 | | #ifdef UNUSED_FUNCTION |
| 938 | | ADDRESS_MAP_START( squawkntalk_alt_map, AS_PROGRAM, 8, mcr_state ) |
| 939 | | ADDRESS_MAP_UNMAP_HIGH |
| 940 | | AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */ |
| 941 | | AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x676c) AM_DEVREADWRITE("sntpia0", pia6821_device, read, write) |
| 942 | | AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x676c) AM_DEVREADWRITE("sntpia1", pia6821_device, read, write) |
| 943 | | AM_RANGE(0x0800, 0x0fff) AM_MIRROR(0x6000) AM_WRITE(squawkntalk_dac_w) |
| 944 | | AM_RANGE(0x8000, 0x9fff) AM_MIRROR(0x6000) AM_ROM |
| 945 | | ADDRESS_MAP_END |
| 946 | | #endif |
| 947 | | |
| 948 | | |
| 949 | | /********* PIA interfaces ***********/ |
| 950 | | static const pia6821_interface squawkntalk_pia0_intf = |
| 951 | | { |
| 952 | | DEVCB_NULL, /* port A in */ |
| 953 | | DEVCB_NULL, /* port B in */ |
| 954 | | DEVCB_NULL, /* line CA1 in */ |
| 955 | | DEVCB_NULL, /* line CB1 in */ |
| 956 | | DEVCB_NULL, /* line CA2 in */ |
| 957 | | DEVCB_NULL, /* line CB2 in */ |
| 958 | | DEVCB_HANDLER(squawkntalk_porta1_w), /* port A out */ |
| 959 | | DEVCB_NULL, /* port B out */ |
| 960 | | DEVCB_NULL, /* line CA2 out */ |
| 961 | | DEVCB_NULL, /* port CB2 out */ |
| 962 | | DEVCB_LINE(squawkntalk_irq), /* IRQA */ |
| 963 | | DEVCB_LINE(squawkntalk_irq) /* IRQB */ |
| 964 | | }; |
| 965 | | |
| 966 | | static const pia6821_interface squawkntalk_pia1_intf = |
| 967 | | { |
| 968 | | DEVCB_NULL, /* port A in */ |
| 969 | | DEVCB_NULL, /* port B in */ |
| 970 | | DEVCB_NULL, /* line CA1 in */ |
| 971 | | DEVCB_NULL, /* line CB1 in */ |
| 972 | | DEVCB_NULL, /* line CA2 in */ |
| 973 | | DEVCB_NULL, /* line CB2 in */ |
| 974 | | DEVCB_HANDLER(squawkntalk_porta2_w), /* port A out */ |
| 975 | | DEVCB_HANDLER(squawkntalk_portb2_w), /* port B out */ |
| 976 | | DEVCB_NULL, /* line CA2 out */ |
| 977 | | DEVCB_NULL, /* port CB2 out */ |
| 978 | | DEVCB_LINE(squawkntalk_irq), /* IRQA */ |
| 979 | | DEVCB_LINE(squawkntalk_irq) /* IRQB */ |
| 980 | | }; |
| 981 | | |
| 982 | | |
| 983 | | /********* machine driver ***********/ |
| 984 | | MACHINE_CONFIG_FRAGMENT(squawk_n_talk) |
| 985 | | MCFG_CPU_ADD("sntcpu", M6802, SQUAWKTALK_CLOCK) |
| 986 | | MCFG_CPU_PROGRAM_MAP(squawkntalk_map) |
| 987 | | |
| 988 | | MCFG_PIA6821_ADD("sntpia0", squawkntalk_pia0_intf) |
| 989 | | MCFG_PIA6821_ADD("sntpia1", squawkntalk_pia1_intf) |
| 990 | | |
| 991 | | /* only used on Discs of Tron, which is stereo */ |
| 992 | | MCFG_SOUND_ADD("sntspeech", TMS5200, 640000) |
| 993 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.60) |
| 994 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.60) |
| 995 | | |
| 996 | | /* the board also supports an AY-8912 and/or an 8-bit DAC, neither of */ |
| 997 | | /* which are populated on the Discs of Tron board */ |
| 998 | | MACHINE_CONFIG_END |
src/mame/audio/midway.c
| r0 | r14964 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | audio/mcr.c |
| 4 | |
| 5 | Functions to emulate general the various Midway sound cards. |
| 6 | |
| 7 | **************************************************************************** |
| 8 | |
| 9 | Copyright Aaron Giles |
| 10 | All rights reserved. |
| 11 | |
| 12 | Redistribution and use in source and binary forms, with or without |
| 13 | modification, are permitted provided that the following conditions are |
| 14 | met: |
| 15 | |
| 16 | * Redistributions of source code must retain the above copyright |
| 17 | notice, this list of conditions and the following disclaimer. |
| 18 | * Redistributions in binary form must reproduce the above copyright |
| 19 | notice, this list of conditions and the following disclaimer in |
| 20 | the documentation and/or other materials provided with the |
| 21 | distribution. |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be |
| 23 | used to endorse or promote products derived from this software |
| 24 | without specific prior written permission. |
| 25 | |
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 36 | POSSIBILITY OF SUCH DAMAGE. |
| 37 | |
| 38 | ***************************************************************************/ |
| 39 | |
| 40 | #include "emu.h" |
| 41 | #include "audio/williams.h" |
| 42 | #include "includes/mcr.h" |
| 43 | #include "audio/midway.h" |
| 44 | |
| 45 | |
| 46 | |
| 47 | //************************************************************************** |
| 48 | // CONSTANTS |
| 49 | //************************************************************************** |
| 50 | |
| 51 | #define SSIO_CLOCK XTAL_16MHz |
| 52 | #define CSDELUXE_CLOCK XTAL_16MHz |
| 53 | #define SOUNDSGOOD_CLOCK XTAL_16MHz |
| 54 | #define TURBOCS_CLOCK XTAL_8MHz |
| 55 | #define SQUAWKTALK_CLOCK XTAL_3_579545MHz |
| 56 | |
| 57 | |
| 58 | |
| 59 | //************************************************************************** |
| 60 | // GLOBAL VARIABLES |
| 61 | //************************************************************************** |
| 62 | |
| 63 | extern const device_type MIDWAY_SSIO = &device_creator<midway_ssio_device>; |
| 64 | extern const device_type MIDWAY_CHIP_SQUEAK_DELUXE = &device_creator<midway_chip_squeak_deluxe_device>; |
| 65 | extern const device_type MIDWAY_SOUNDS_GOOD = &device_creator<midway_sounds_good_device>; |
| 66 | extern const device_type MIDWAY_TURBO_CHIP_SQUEAK = &device_creator<midway_turbo_chip_squeak_device>; |
| 67 | extern const device_type MIDWAY_SQUAWK_N_TALK = &device_creator<midway_squawk_n_talk_device>; |
| 68 | |
| 69 | |
| 70 | |
| 71 | //************************************************************************** |
| 72 | // SUPER SOUND I/O BOARD (SSIO) |
| 73 | //************************************************************************** |
| 74 | |
| 75 | //------------------------------------------------- |
| 76 | // midway_ssio_device - constructor |
| 77 | //------------------------------------------------- |
| 78 | |
| 79 | midway_ssio_device::midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 80 | : device_t(mconfig, MIDWAY_SSIO, "Midway SSIO Sound Board", "midssio", tag, owner, clock), |
| 81 | device_mixer_interface(mconfig, *this, 2), |
| 82 | m_cpu(*this, "cpu"), |
| 83 | m_ay0(*this, "ay0"), |
| 84 | m_ay1(*this, "ay1"), |
| 85 | m_status(0), |
| 86 | m_14024_count(0), |
| 87 | m_mute(0) |
| 88 | { |
| 89 | memset(m_data, 0, sizeof(m_data)); |
| 90 | memset(m_overall, 0, sizeof(m_overall)); |
| 91 | memset(m_duty_cycle, 0, sizeof(m_duty_cycle)); |
| 92 | memset(m_ayvolume_lookup, 0, sizeof(m_ayvolume_lookup)); |
| 93 | memset(m_custom_input_mask, 0, sizeof(m_custom_input_mask)); |
| 94 | memset(m_custom_output_mask, 0, sizeof(m_custom_output_mask)); |
| 95 | } |
| 96 | |
| 97 | |
| 98 | //------------------------------------------------- |
| 99 | // read - return the status value |
| 100 | //------------------------------------------------- |
| 101 | |
| 102 | READ8_MEMBER(midway_ssio_device::read) |
| 103 | { |
| 104 | return m_status; |
| 105 | } |
| 106 | |
| 107 | |
| 108 | //------------------------------------------------- |
| 109 | // write - handle an external write to one of the |
| 110 | // input latches |
| 111 | //------------------------------------------------- |
| 112 | |
| 113 | WRITE8_MEMBER(midway_ssio_device::write) |
| 114 | { |
| 115 | synchronize(0, (offset << 8) | (data & 0xff)); |
| 116 | } |
| 117 | |
| 118 | |
| 119 | //------------------------------------------------- |
| 120 | // reset_write - write to the reset line |
| 121 | //------------------------------------------------- |
| 122 | |
| 123 | WRITE_LINE_MEMBER(midway_ssio_device::reset_write) |
| 124 | { |
| 125 | // going high halts the CPU |
| 126 | if (state) |
| 127 | { |
| 128 | device_reset(); |
| 129 | m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 130 | } |
| 131 | |
| 132 | // going low resets and reactivates the CPU |
| 133 | else |
| 134 | m_cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 135 | } |
| 136 | |
| 137 | |
| 138 | //------------------------------------------------- |
| 139 | // ioport_read - read from one of the I/O ports |
| 140 | // on the device |
| 141 | //------------------------------------------------- |
| 142 | |
| 143 | READ8_MEMBER(midway_ssio_device::ioport_read) |
| 144 | { |
| 145 | static const char *const port[] = { "IP0", "IP1", "IP2", "IP3", "IP4" }; |
| 146 | astring tempstr; |
| 147 | UINT8 result = input_port_read_safe(machine(), subtag(tempstr, port[offset]), 0xff); |
| 148 | if (!m_custom_input[offset].isnull()) |
| 149 | result = (result & ~m_custom_input_mask[offset]) | |
| 150 | (m_custom_input[offset](space, offset, 0xff) & m_custom_input_mask[offset]); |
| 151 | return result; |
| 152 | } |
| 153 | |
| 154 | |
| 155 | //------------------------------------------------- |
| 156 | // ioport_write - write to one of the I/O ports |
| 157 | // on the device |
| 158 | //------------------------------------------------- |
| 159 | |
| 160 | WRITE8_MEMBER(midway_ssio_device::ioport_write) |
| 161 | { |
| 162 | int which = offset >> 2; |
| 163 | if (!m_custom_output[which].isnull()) |
| 164 | m_custom_output[which](space, offset, data & m_custom_output_mask[which], 0xff); |
| 165 | } |
| 166 | |
| 167 | |
| 168 | //------------------------------------------------- |
| 169 | // set_custom_input - configure a custom port |
| 170 | // reader |
| 171 | //------------------------------------------------- |
| 172 | |
| 173 | void midway_ssio_device::set_custom_input(int which, UINT8 mask, read8_delegate handler) |
| 174 | { |
| 175 | m_custom_input[which] = handler; |
| 176 | m_custom_input_mask[which] = mask; |
| 177 | } |
| 178 | |
| 179 | |
| 180 | //------------------------------------------------- |
| 181 | // set_custom_output - configure a custom port |
| 182 | // writer |
| 183 | //------------------------------------------------- |
| 184 | |
| 185 | void midway_ssio_device::set_custom_output(int which, UINT8 mask, write8_delegate handler) |
| 186 | { |
| 187 | m_custom_output[which/4] = handler; |
| 188 | m_custom_output_mask[which/4] = mask; |
| 189 | } |
| 190 | |
| 191 | |
| 192 | //------------------------------------------------- |
| 193 | // compute_ay8910_modulation - precompute |
| 194 | // volume modulation tables based on the duty |
| 195 | // cycle described by the PROMs |
| 196 | //------------------------------------------------- |
| 197 | |
| 198 | void midway_ssio_device::compute_ay8910_modulation() |
| 199 | { |
| 200 | // |
| 201 | // AY-8910 modulation: |
| 202 | // |
| 203 | // Starts with a 16MHz oscillator |
| 204 | // /2 via 7474 flip-flip @ F11 |
| 205 | // |
| 206 | // This signal clocks the binary counter @ E11 which |
| 207 | // cascades into the decade counter @ D11. This combo |
| 208 | // effectively counts from 0-159 and then wraps. The |
| 209 | // value from these counters is input to an 82S123 PROM, |
| 210 | // which appears to be standard on all games. |
| 211 | // |
| 212 | // One bit at a time from this PROM is clocked at a time |
| 213 | // and the resulting inverted signal becomes a clock for |
| 214 | // the down counters at F3, F4, F5, F8, F9, and F10. The |
| 215 | // value in these down counters are reloaded after the 160 |
| 216 | // counts from the binary/decade counter combination. |
| 217 | // |
| 218 | // When these down counters are loaded, the TC signal is |
| 219 | // clear, which mutes the voice. When the down counters |
| 220 | // cross through 0, the TC signal goes high and the 4016 |
| 221 | // multiplexers allow the AY-8910 voice to go through. |
| 222 | // Thus, writing a 0 to the counters will enable the |
| 223 | // voice for the longest period of time, while writing |
| 224 | // a 15 enables it for the shortest period of time. |
| 225 | // This creates an effective duty cycle for the voice. |
| 226 | // |
| 227 | // Given that the down counters are reset 50000 times per |
| 228 | // second (SSIO_CLOCK/2/160), which is above the typical |
| 229 | // frequency of sound output. So we simply apply a volume |
| 230 | // adjustment to each voice according to the duty cycle. |
| 231 | // |
| 232 | |
| 233 | // loop over all possible values of the duty cycle |
| 234 | UINT8 *prom = machine().region("proms")->base(); |
| 235 | for (int volval = 0; volval < 16; volval++) |
| 236 | { |
| 237 | // loop over all the clocks until we run out; look up in the PROM |
| 238 | // to find out when the next clock should fire |
| 239 | int remaining_clocks = volval; |
| 240 | int cur = 0, prev = 1; |
| 241 | int curclock; |
| 242 | for (curclock = 0; curclock < 160 && remaining_clocks; curclock++) |
| 243 | { |
| 244 | cur = prom[curclock / 8] & (0x80 >> (curclock % 8)); |
| 245 | |
| 246 | // check for a high -> low transition |
| 247 | if (cur == 0 && prev != 0) |
| 248 | remaining_clocks--; |
| 249 | |
| 250 | prev = cur; |
| 251 | } |
| 252 | |
| 253 | // treat the duty cycle as a volume |
| 254 | m_ayvolume_lookup[15 - volval] = curclock * 100 / 160; |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | |
| 259 | //------------------------------------------------- |
| 260 | // clock_14024 - periodic timer to clock the |
| 261 | // 7-bit async counter at C12 |
| 262 | //------------------------------------------------- |
| 263 | |
| 264 | INTERRUPT_GEN_MEMBER(midway_ssio_device::clock_14024) |
| 265 | { |
| 266 | // |
| 267 | // /SINT is generated as follows: |
| 268 | // |
| 269 | // Starts with a 16MHz oscillator |
| 270 | // /2 via 7474 flip-flop @ F11 |
| 271 | // /16 via 74161 binary counter @ E11 |
| 272 | // /10 via 74190 decade counter @ D11 |
| 273 | // |
| 274 | // Bit 3 of the decade counter clocks a 14024 7-bit async counter @ C12. |
| 275 | // This routine is called to clock this 7-bit counter. |
| 276 | // Bit 6 of the output is inverted and connected to /SINT. |
| 277 | // |
| 278 | m_14024_count = (m_14024_count + 1) & 0x7f; |
| 279 | |
| 280 | // if the low 5 bits clocked to 0, bit 6 has changed state |
| 281 | if ((m_14024_count & 0x3f) == 0) |
| 282 | m_cpu->set_input_line(0, (m_14024_count & 0x40) ? ASSERT_LINE : CLEAR_LINE); |
| 283 | } |
| 284 | |
| 285 | |
| 286 | //------------------------------------------------- |
| 287 | // irq_clear - reset the IRQ state and 14024 count |
| 288 | //------------------------------------------------- |
| 289 | |
| 290 | READ8_MEMBER(midway_ssio_device::irq_clear) |
| 291 | { |
| 292 | // a read here asynchronously resets the 14024 count, clearing /SINT |
| 293 | m_14024_count = 0; |
| 294 | m_cpu->set_input_line(0, CLEAR_LINE); |
| 295 | return 0xff; |
| 296 | } |
| 297 | |
| 298 | |
| 299 | //------------------------------------------------- |
| 300 | // status_w - set the outgoing status value |
| 301 | //------------------------------------------------- |
| 302 | |
| 303 | WRITE8_MEMBER(midway_ssio_device::status_w) |
| 304 | { |
| 305 | m_status = data; |
| 306 | } |
| 307 | |
| 308 | |
| 309 | //------------------------------------------------- |
| 310 | // data_r - read incoming data latches |
| 311 | //------------------------------------------------- |
| 312 | |
| 313 | READ8_MEMBER(midway_ssio_device::data_r) |
| 314 | { |
| 315 | return m_data[offset]; |
| 316 | } |
| 317 | |
| 318 | |
| 319 | //------------------------------------------------- |
| 320 | // porta0_w - handle writes to AY-8910 #0 port A |
| 321 | //------------------------------------------------- |
| 322 | |
| 323 | WRITE8_MEMBER(midway_ssio_device::porta0_w) |
| 324 | { |
| 325 | m_duty_cycle[0][0] = data & 15; |
| 326 | m_duty_cycle[0][1] = data >> 4; |
| 327 | update_volumes(); |
| 328 | } |
| 329 | |
| 330 | |
| 331 | //------------------------------------------------- |
| 332 | // portb0_w - handle writes to AY-8910 #0 port B |
| 333 | //------------------------------------------------- |
| 334 | |
| 335 | WRITE8_MEMBER(midway_ssio_device::portb0_w) |
| 336 | { |
| 337 | m_duty_cycle[0][2] = data & 15; |
| 338 | m_overall[0] = (data >> 4) & 7; |
| 339 | update_volumes(); |
| 340 | } |
| 341 | |
| 342 | |
| 343 | //------------------------------------------------- |
| 344 | // porta1_w - handle writes to AY-8910 #1 port A |
| 345 | //------------------------------------------------- |
| 346 | |
| 347 | WRITE8_MEMBER(midway_ssio_device::porta1_w) |
| 348 | { |
| 349 | m_duty_cycle[1][0] = data & 15; |
| 350 | m_duty_cycle[1][1] = data >> 4; |
| 351 | update_volumes(); |
| 352 | } |
| 353 | |
| 354 | |
| 355 | //------------------------------------------------- |
| 356 | // portb1_w - handle writes to AY-8910 #1 port B |
| 357 | //------------------------------------------------- |
| 358 | |
| 359 | WRITE8_MEMBER(midway_ssio_device::portb1_w) |
| 360 | { |
| 361 | m_duty_cycle[1][2] = data & 15; |
| 362 | m_overall[1] = (data >> 4) & 7; |
| 363 | m_mute = data & 0x80; |
| 364 | update_volumes(); |
| 365 | } |
| 366 | |
| 367 | |
| 368 | //------------------------------------------------- |
| 369 | // update_volumes - update the volumes of each |
| 370 | // AY-8910 channel based on modulation and mute |
| 371 | //------------------------------------------------- |
| 372 | |
| 373 | void midway_ssio_device::update_volumes() |
| 374 | { |
| 375 | ay8910_set_volume(m_ay0, 0, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[0][0]]); |
| 376 | ay8910_set_volume(m_ay0, 1, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[0][1]]); |
| 377 | ay8910_set_volume(m_ay0, 2, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[0][2]]); |
| 378 | ay8910_set_volume(m_ay1, 0, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[1][0]]); |
| 379 | ay8910_set_volume(m_ay1, 1, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[1][1]]); |
| 380 | ay8910_set_volume(m_ay1, 2, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[1][2]]); |
| 381 | } |
| 382 | |
| 383 | |
| 384 | //------------------------------------------------- |
| 385 | // AY-8910 interfaces |
| 386 | //------------------------------------------------- |
| 387 | |
| 388 | static const ay8910_interface ssio_ay8910_interface_1 = |
| 389 | { |
| 390 | AY8910_LEGACY_OUTPUT, |
| 391 | AY8910_DEFAULT_LOADS, |
| 392 | DEVCB_NULL, |
| 393 | DEVCB_NULL, |
| 394 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, porta0_w), |
| 395 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, portb0_w) |
| 396 | }; |
| 397 | |
| 398 | static const ay8910_interface ssio_ay8910_interface_2 = |
| 399 | { |
| 400 | AY8910_LEGACY_OUTPUT, |
| 401 | AY8910_DEFAULT_LOADS, |
| 402 | DEVCB_NULL, |
| 403 | DEVCB_NULL, |
| 404 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, porta1_w), |
| 405 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, portb1_w) |
| 406 | }; |
| 407 | |
| 408 | |
| 409 | //------------------------------------------------- |
| 410 | // audio CPU map |
| 411 | //------------------------------------------------- |
| 412 | |
| 413 | // address map verified from schematics |
| 414 | static ADDRESS_MAP_START( ssio_map, AS_PROGRAM, 8, midway_ssio_device ) |
| 415 | ADDRESS_MAP_UNMAP_HIGH |
| 416 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 417 | AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_RAM |
| 418 | AM_RANGE(0x9000, 0x9003) AM_MIRROR(0x0ffc) AM_READ(data_r) |
| 419 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay0", ay8910_address_w) |
| 420 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ay0", ay8910_r) |
| 421 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay0", ay8910_data_w) |
| 422 | AM_RANGE(0xb000, 0xb000) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) |
| 423 | AM_RANGE(0xb001, 0xb001) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ay1", ay8910_r) |
| 424 | AM_RANGE(0xb002, 0xb002) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) |
| 425 | AM_RANGE(0xc000, 0xcfff) AM_READNOP AM_WRITE(status_w) |
| 426 | AM_RANGE(0xd000, 0xdfff) AM_WRITENOP // low bit controls yellow LED |
| 427 | AM_RANGE(0xe000, 0xefff) AM_READ(irq_clear) |
| 428 | AM_RANGE(0xf000, 0xffff) AM_READ_PORT("DIP") // 6 DIP switches |
| 429 | ADDRESS_MAP_END |
| 430 | |
| 431 | |
| 432 | //------------------------------------------------- |
| 433 | // machine configuration |
| 434 | //------------------------------------------------- |
| 435 | |
| 436 | static MACHINE_CONFIG_FRAGMENT( midway_ssio ) |
| 437 | MCFG_CPU_ADD("cpu", Z80, SSIO_CLOCK/2/4) |
| 438 | MCFG_CPU_PROGRAM_MAP(ssio_map) |
| 439 | MCFG_DEVICE_PERIODIC_INT_DEVICE(DEVICE_SELF_OWNER, midway_ssio_device, clock_14024, SSIO_CLOCK/2/16/10) |
| 440 | |
| 441 | MCFG_SOUND_ADD("ay0", AY8910, SSIO_CLOCK/2/4) |
| 442 | MCFG_SOUND_CONFIG(ssio_ay8910_interface_1) |
| 443 | MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.33, 0) |
| 444 | |
| 445 | MCFG_SOUND_ADD("ay1", AY8910, SSIO_CLOCK/2/4) |
| 446 | MCFG_SOUND_CONFIG(ssio_ay8910_interface_2) |
| 447 | MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.33, 1) |
| 448 | MACHINE_CONFIG_END |
| 449 | |
| 450 | |
| 451 | //------------------------------------------------- |
| 452 | // device_mconfig_additions - return a pointer to |
| 453 | // the device's machine fragment |
| 454 | //------------------------------------------------- |
| 455 | |
| 456 | machine_config_constructor midway_ssio_device::device_mconfig_additions() const |
| 457 | { |
| 458 | return MACHINE_CONFIG_NAME( midway_ssio ); |
| 459 | } |
| 460 | |
| 461 | |
| 462 | //------------------------------------------------- |
| 463 | // device_input_ports - return a pointer to |
| 464 | // the device's I/O ports |
| 465 | //------------------------------------------------- |
| 466 | |
| 467 | ioport_constructor midway_ssio_device::device_input_ports() const |
| 468 | { |
| 469 | return NULL; |
| 470 | // return INPUT_PORTS_NAME( midway_ssio ); |
| 471 | } |
| 472 | |
| 473 | |
| 474 | //------------------------------------------------- |
| 475 | // device_start - device-specific startup |
| 476 | //------------------------------------------------- |
| 477 | |
| 478 | void midway_ssio_device::device_start() |
| 479 | { |
| 480 | compute_ay8910_modulation(); |
| 481 | save_item(NAME(m_data)); |
| 482 | save_item(NAME(m_status)); |
| 483 | save_item(NAME(m_14024_count)); |
| 484 | save_item(NAME(m_mute)); |
| 485 | save_item(NAME(m_overall)); |
| 486 | save_item(NAME(m_duty_cycle)); |
| 487 | } |
| 488 | |
| 489 | |
| 490 | //------------------------------------------------- |
| 491 | // device_reset - device-specific reset |
| 492 | //------------------------------------------------- |
| 493 | |
| 494 | void midway_ssio_device::device_reset() |
| 495 | { |
| 496 | // latches also get reset |
| 497 | memset(m_data, 0, sizeof(m_data)); |
| 498 | m_status = 0; |
| 499 | m_14024_count = 0; |
| 500 | } |
| 501 | |
| 502 | |
| 503 | //------------------------------------------------- |
| 504 | // device_timer - timer callbacks |
| 505 | //------------------------------------------------- |
| 506 | |
| 507 | void midway_ssio_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 508 | { |
| 509 | m_data[param >> 8] = param & 0xff; |
| 510 | } |
| 511 | |
| 512 | |
| 513 | |
| 514 | //************************************************************************** |
| 515 | // CHIP SQUEAK DELUXE BOARD |
| 516 | //************************************************************************** |
| 517 | |
| 518 | //------------------------------------------------- |
| 519 | // midway_chip_squeak_deluxe_device - constructor |
| 520 | //------------------------------------------------- |
| 521 | |
| 522 | midway_chip_squeak_deluxe_device::midway_chip_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 523 | : device_t(mconfig, MIDWAY_CHIP_SQUEAK_DELUXE, "Midway Chip Squeak Deluxe Sound Board", "midcsd", tag, owner, clock), |
| 524 | device_mixer_interface(mconfig, *this), |
| 525 | m_cpu(*this, "cpu"), |
| 526 | m_pia(*this, "pia"), |
| 527 | m_dac(*this, "dac"), |
| 528 | m_status(0), |
| 529 | m_dacval(0) |
| 530 | { |
| 531 | } |
| 532 | |
| 533 | |
| 534 | //------------------------------------------------- |
| 535 | // read - return the status value |
| 536 | //------------------------------------------------- |
| 537 | |
| 538 | READ8_MEMBER(midway_chip_squeak_deluxe_device::read) |
| 539 | { |
| 540 | return m_status; |
| 541 | } |
| 542 | |
| 543 | |
| 544 | //------------------------------------------------- |
| 545 | // write - handle an external write to the input |
| 546 | // latch |
| 547 | //------------------------------------------------- |
| 548 | |
| 549 | WRITE8_MEMBER(midway_chip_squeak_deluxe_device::write) |
| 550 | { |
| 551 | synchronize(0, data); |
| 552 | } |
| 553 | |
| 554 | |
| 555 | //------------------------------------------------- |
| 556 | // reset_write - write to the reset line |
| 557 | //------------------------------------------------- |
| 558 | |
| 559 | WRITE_LINE_MEMBER(midway_chip_squeak_deluxe_device::reset_write) |
| 560 | { |
| 561 | m_cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); |
| 562 | } |
| 563 | |
| 564 | |
| 565 | //------------------------------------------------- |
| 566 | // porta_w - PIA port A writes |
| 567 | //------------------------------------------------- |
| 568 | |
| 569 | WRITE8_MEMBER(midway_chip_squeak_deluxe_device::porta_w) |
| 570 | { |
| 571 | m_dacval = (m_dacval & ~0x3fc) | (data << 2); |
| 572 | dac_signed_data_16_w(m_dac, m_dacval << 6); |
| 573 | } |
| 574 | |
| 575 | |
| 576 | //------------------------------------------------- |
| 577 | // portb_w - PIA port B writes |
| 578 | //------------------------------------------------- |
| 579 | |
| 580 | WRITE8_MEMBER(midway_chip_squeak_deluxe_device::portb_w) |
| 581 | { |
| 582 | m_dacval = (m_dacval & ~0x003) | (data >> 6); |
| 583 | dac_signed_data_16_w(m_dac, m_dacval << 6); |
| 584 | |
| 585 | UINT8 z_mask = m_pia->port_b_z_mask(); |
| 586 | if (~z_mask & 0x10) m_status = (m_status & ~1) | ((data >> 4) & 1); |
| 587 | if (~z_mask & 0x20) m_status = (m_status & ~2) | ((data >> 4) & 2); |
| 588 | } |
| 589 | |
| 590 | |
| 591 | //------------------------------------------------- |
| 592 | // irq_w - IRQ line state changes |
| 593 | //------------------------------------------------- |
| 594 | |
| 595 | WRITE_LINE_MEMBER(midway_chip_squeak_deluxe_device::irq_w) |
| 596 | { |
| 597 | int combined_state = m_pia->irq_a_state() | m_pia->irq_b_state(); |
| 598 | m_cpu->set_input_line(4, combined_state ? ASSERT_LINE : CLEAR_LINE); |
| 599 | } |
| 600 | |
| 601 | |
| 602 | //------------------------------------------------- |
| 603 | // pia_r - PIA read access |
| 604 | //------------------------------------------------- |
| 605 | |
| 606 | READ16_MEMBER(midway_chip_squeak_deluxe_device::pia_r) |
| 607 | { |
| 608 | // Spy Hunter accesses the MSB; Turbo Tag access via the LSB |
| 609 | // My guess is that Turbo Tag works through a fluke, whereby the 68000 |
| 610 | // using the MOVEP instruction outputs the same value on the high and |
| 611 | // low bytes. |
| 612 | if (ACCESSING_BITS_8_15) |
| 613 | return m_pia->read_alt(space, offset) << 8; |
| 614 | else |
| 615 | return m_pia->read_alt(space, offset); |
| 616 | } |
| 617 | |
| 618 | |
| 619 | //------------------------------------------------- |
| 620 | // pia_w - PIA write access |
| 621 | //------------------------------------------------- |
| 622 | |
| 623 | WRITE16_MEMBER(midway_chip_squeak_deluxe_device::pia_w) |
| 624 | { |
| 625 | if (ACCESSING_BITS_8_15) |
| 626 | m_pia->write_alt(space, offset, data >> 8); |
| 627 | else |
| 628 | m_pia->write_alt(space, offset, data); |
| 629 | } |
| 630 | |
| 631 | |
| 632 | //------------------------------------------------- |
| 633 | // audio CPU map |
| 634 | //------------------------------------------------- |
| 635 | |
| 636 | // address map determined by PAL; not verified |
| 637 | static ADDRESS_MAP_START( csdeluxe_map, AS_PROGRAM, 16, midway_chip_squeak_deluxe_device ) |
| 638 | ADDRESS_MAP_UNMAP_HIGH |
| 639 | ADDRESS_MAP_GLOBAL_MASK(0x1ffff) |
| 640 | AM_RANGE(0x000000, 0x007fff) AM_ROM |
| 641 | AM_RANGE(0x018000, 0x018007) AM_READWRITE(pia_r, pia_w) |
| 642 | AM_RANGE(0x01c000, 0x01cfff) AM_RAM |
| 643 | ADDRESS_MAP_END |
| 644 | |
| 645 | |
| 646 | //------------------------------------------------- |
| 647 | // 6821 PIA interface |
| 648 | //------------------------------------------------- |
| 649 | |
| 650 | static const pia6821_interface csdeluxe_pia_intf = |
| 651 | { |
| 652 | DEVCB_NULL, // port A in |
| 653 | DEVCB_NULL, // port B in |
| 654 | DEVCB_NULL, // line CA1 in |
| 655 | DEVCB_NULL, // line CB1 in |
| 656 | DEVCB_NULL, // line CA2 in |
| 657 | DEVCB_NULL, // line CB2 in |
| 658 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_chip_squeak_deluxe_device, porta_w), // port A out |
| 659 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_chip_squeak_deluxe_device, portb_w), // port B out |
| 660 | DEVCB_NULL, // line CA2 out |
| 661 | DEVCB_NULL, // port CB2 out |
| 662 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_chip_squeak_deluxe_device, irq_w), // IRQA |
| 663 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_chip_squeak_deluxe_device, irq_w) // IRQB |
| 664 | }; |
| 665 | |
| 666 | |
| 667 | //------------------------------------------------- |
| 668 | // machine configuration |
| 669 | //------------------------------------------------- |
| 670 | |
| 671 | static MACHINE_CONFIG_FRAGMENT(midway_chip_squeak_deluxe) |
| 672 | MCFG_CPU_ADD("cpu", M68000, CSDELUXE_CLOCK/2) |
| 673 | MCFG_CPU_PROGRAM_MAP(csdeluxe_map) |
| 674 | |
| 675 | MCFG_PIA6821_ADD("pia", csdeluxe_pia_intf) |
| 676 | |
| 677 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 678 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) |
| 679 | MACHINE_CONFIG_END |
| 680 | |
| 681 | |
| 682 | //------------------------------------------------- |
| 683 | // device_mconfig_additions - return a pointer to |
| 684 | // the device's machine fragment |
| 685 | //------------------------------------------------- |
| 686 | |
| 687 | machine_config_constructor midway_chip_squeak_deluxe_device::device_mconfig_additions() const |
| 688 | { |
| 689 | return MACHINE_CONFIG_NAME( midway_chip_squeak_deluxe ); |
| 690 | } |
| 691 | |
| 692 | |
| 693 | //------------------------------------------------- |
| 694 | // device_start - device-specific startup |
| 695 | //------------------------------------------------- |
| 696 | |
| 697 | void midway_chip_squeak_deluxe_device::device_start() |
| 698 | { |
| 699 | save_item(NAME(m_status)); |
| 700 | save_item(NAME(m_dacval)); |
| 701 | } |
| 702 | |
| 703 | |
| 704 | //------------------------------------------------- |
| 705 | // device_reset - device-specific reset |
| 706 | //------------------------------------------------- |
| 707 | |
| 708 | void midway_chip_squeak_deluxe_device::device_reset() |
| 709 | { |
| 710 | } |
| 711 | |
| 712 | |
| 713 | //------------------------------------------------- |
| 714 | // device_timer - timer callbacks |
| 715 | //------------------------------------------------- |
| 716 | |
| 717 | void midway_chip_squeak_deluxe_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 718 | { |
| 719 | m_pia->portb_w(param & 0x0f); |
| 720 | m_pia->ca1_w(~param & 0x10); |
| 721 | |
| 722 | // oftentimes games will write one nibble at a time; the sync on this is very |
| 723 | // important, so we boost the interleave briefly while this happens |
| 724 | machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 725 | } |
| 726 | |
| 727 | |
| 728 | |
| 729 | //************************************************************************** |
| 730 | // SOUNDS GOOD BOARD |
| 731 | //************************************************************************** |
| 732 | |
| 733 | //------------------------------------------------- |
| 734 | // midway_sounds_good_device - constructor |
| 735 | //------------------------------------------------- |
| 736 | |
| 737 | midway_sounds_good_device::midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 738 | : device_t(mconfig, MIDWAY_SOUNDS_GOOD, "Midway Sounds Good Sound Board", "midsg", tag, owner, clock), |
| 739 | device_mixer_interface(mconfig, *this), |
| 740 | m_cpu(*this, "cpu"), |
| 741 | m_pia(*this, "pia"), |
| 742 | m_dac(*this, "dac"), |
| 743 | m_status(0), |
| 744 | m_dacval(0) |
| 745 | { |
| 746 | } |
| 747 | |
| 748 | |
| 749 | //------------------------------------------------- |
| 750 | // read - return the status value |
| 751 | //------------------------------------------------- |
| 752 | |
| 753 | READ8_MEMBER(midway_sounds_good_device::read) |
| 754 | { |
| 755 | return m_status; |
| 756 | } |
| 757 | |
| 758 | |
| 759 | //------------------------------------------------- |
| 760 | // write - handle an external write to the input |
| 761 | // latch |
| 762 | //------------------------------------------------- |
| 763 | |
| 764 | WRITE8_MEMBER(midway_sounds_good_device::write) |
| 765 | { |
| 766 | synchronize(0, data); |
| 767 | } |
| 768 | |
| 769 | |
| 770 | //------------------------------------------------- |
| 771 | // reset_write - write to the reset line |
| 772 | //------------------------------------------------- |
| 773 | |
| 774 | WRITE_LINE_MEMBER(midway_sounds_good_device::reset_write) |
| 775 | { |
| 776 | //if (state) mame_printf_debug("SG Reset\n"); |
| 777 | m_cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); |
| 778 | } |
| 779 | |
| 780 | |
| 781 | //------------------------------------------------- |
| 782 | // porta_w - PIA port A writes |
| 783 | //------------------------------------------------- |
| 784 | |
| 785 | WRITE8_MEMBER(midway_sounds_good_device::porta_w) |
| 786 | { |
| 787 | m_dacval = (m_dacval & ~0x3fc) | (data << 2); |
| 788 | dac_signed_data_16_w(m_dac, m_dacval << 6); |
| 789 | } |
| 790 | |
| 791 | |
| 792 | //------------------------------------------------- |
| 793 | // portb_w - PIA port B writes |
| 794 | //------------------------------------------------- |
| 795 | |
| 796 | WRITE8_MEMBER(midway_sounds_good_device::portb_w) |
| 797 | { |
| 798 | UINT8 z_mask = m_pia->port_b_z_mask(); |
| 799 | |
| 800 | m_dacval = (m_dacval & ~0x003) | (data >> 6); |
| 801 | dac_signed_data_16_w(m_dac, m_dacval << 6); |
| 802 | |
| 803 | if (~z_mask & 0x10) m_status = (m_status & ~1) | ((data >> 4) & 1); |
| 804 | if (~z_mask & 0x20) m_status = (m_status & ~2) | ((data >> 4) & 2); |
| 805 | } |
| 806 | |
| 807 | |
| 808 | //------------------------------------------------- |
| 809 | // irq_w - IRQ line state changes |
| 810 | //------------------------------------------------- |
| 811 | |
| 812 | WRITE_LINE_MEMBER(midway_sounds_good_device::irq_w) |
| 813 | { |
| 814 | int combined_state = m_pia->irq_a_state() | m_pia->irq_b_state(); |
| 815 | m_cpu->set_input_line(4, combined_state ? ASSERT_LINE : CLEAR_LINE); |
| 816 | } |
| 817 | |
| 818 | |
| 819 | //------------------------------------------------- |
| 820 | // audio CPU map |
| 821 | //------------------------------------------------- |
| 822 | |
| 823 | // address map determined by PAL; not verified |
| 824 | static ADDRESS_MAP_START( soundsgood_map, AS_PROGRAM, 16, midway_sounds_good_device ) |
| 825 | ADDRESS_MAP_UNMAP_HIGH |
| 826 | ADDRESS_MAP_GLOBAL_MASK(0x7ffff) |
| 827 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 828 | AM_RANGE(0x060000, 0x060007) AM_DEVREADWRITE8("pia", pia6821_device, read_alt, write_alt, 0xff00) |
| 829 | AM_RANGE(0x070000, 0x070fff) AM_RAM |
| 830 | ADDRESS_MAP_END |
| 831 | |
| 832 | |
| 833 | //------------------------------------------------- |
| 834 | // 6821 PIA interface |
| 835 | //------------------------------------------------- |
| 836 | |
| 837 | static const pia6821_interface soundsgood_pia_intf = |
| 838 | { |
| 839 | DEVCB_NULL, // port A in |
| 840 | DEVCB_NULL, // port B in |
| 841 | DEVCB_NULL, // line CA1 in |
| 842 | DEVCB_NULL, // line CB1 in |
| 843 | DEVCB_NULL, // line CA2 in |
| 844 | DEVCB_NULL, // line CB2 in |
| 845 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_sounds_good_device, porta_w), // port A out |
| 846 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_sounds_good_device, portb_w), // port B out |
| 847 | DEVCB_NULL, // line CA2 out |
| 848 | DEVCB_NULL, // port CB2 out |
| 849 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_sounds_good_device, irq_w), // IRQA |
| 850 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_sounds_good_device, irq_w) // IRQB |
| 851 | }; |
| 852 | |
| 853 | |
| 854 | //------------------------------------------------- |
| 855 | // machine configuration |
| 856 | //------------------------------------------------- |
| 857 | |
| 858 | static MACHINE_CONFIG_FRAGMENT(midway_sounds_good) |
| 859 | MCFG_CPU_ADD("cpu", M68000, SOUNDSGOOD_CLOCK/2) |
| 860 | MCFG_CPU_PROGRAM_MAP(soundsgood_map) |
| 861 | |
| 862 | MCFG_PIA6821_ADD("pia", soundsgood_pia_intf) |
| 863 | |
| 864 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 865 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) |
| 866 | MACHINE_CONFIG_END |
| 867 | |
| 868 | |
| 869 | //------------------------------------------------- |
| 870 | // device_mconfig_additions - return a pointer to |
| 871 | // the device's machine fragment |
| 872 | //------------------------------------------------- |
| 873 | |
| 874 | machine_config_constructor midway_sounds_good_device::device_mconfig_additions() const |
| 875 | { |
| 876 | return MACHINE_CONFIG_NAME( midway_sounds_good ); |
| 877 | } |
| 878 | |
| 879 | |
| 880 | //------------------------------------------------- |
| 881 | // device_start - device-specific startup |
| 882 | //------------------------------------------------- |
| 883 | |
| 884 | void midway_sounds_good_device::device_start() |
| 885 | { |
| 886 | save_item(NAME(m_status)); |
| 887 | save_item(NAME(m_dacval)); |
| 888 | } |
| 889 | |
| 890 | |
| 891 | //------------------------------------------------- |
| 892 | // device_reset - device-specific reset |
| 893 | //------------------------------------------------- |
| 894 | |
| 895 | void midway_sounds_good_device::device_reset() |
| 896 | { |
| 897 | } |
| 898 | |
| 899 | |
| 900 | //------------------------------------------------- |
| 901 | // device_timer - timer callbacks |
| 902 | //------------------------------------------------- |
| 903 | |
| 904 | void midway_sounds_good_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 905 | { |
| 906 | m_pia->portb_w((param >> 1) & 0x0f); |
| 907 | m_pia->ca1_w(~param & 0x01); |
| 908 | |
| 909 | // oftentimes games will write one nibble at a time; the sync on this is very |
| 910 | // important, so we boost the interleave briefly while this happens |
| 911 | machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250)); |
| 912 | } |
| 913 | |
| 914 | |
| 915 | |
| 916 | //************************************************************************** |
| 917 | // TURBO CHIP SQUEAK BOARD |
| 918 | //************************************************************************** |
| 919 | |
| 920 | //------------------------------------------------- |
| 921 | // midway_turbo_chip_squeak_device - constructor |
| 922 | //------------------------------------------------- |
| 923 | |
| 924 | midway_turbo_chip_squeak_device::midway_turbo_chip_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 925 | : device_t(mconfig, MIDWAY_TURBO_CHIP_SQUEAK, "Midway Turbo Chip Squeak Sound Board", "midtcs", tag, owner, clock), |
| 926 | device_mixer_interface(mconfig, *this), |
| 927 | m_cpu(*this, "cpu"), |
| 928 | m_pia(*this, "pia"), |
| 929 | m_dac(*this, "dac"), |
| 930 | m_status(0), |
| 931 | m_dacval(0) |
| 932 | { |
| 933 | } |
| 934 | |
| 935 | |
| 936 | //------------------------------------------------- |
| 937 | // read - return the status value |
| 938 | //------------------------------------------------- |
| 939 | |
| 940 | READ8_MEMBER(midway_turbo_chip_squeak_device::read) |
| 941 | { |
| 942 | return m_status; |
| 943 | } |
| 944 | |
| 945 | |
| 946 | //------------------------------------------------- |
| 947 | // write - handle an external write to the input |
| 948 | // latch |
| 949 | //------------------------------------------------- |
| 950 | |
| 951 | WRITE8_MEMBER(midway_turbo_chip_squeak_device::write) |
| 952 | { |
| 953 | synchronize(0, data); |
| 954 | } |
| 955 | |
| 956 | |
| 957 | //------------------------------------------------- |
| 958 | // reset_write - write to the reset line |
| 959 | //------------------------------------------------- |
| 960 | |
| 961 | WRITE_LINE_MEMBER(midway_turbo_chip_squeak_device::reset_write) |
| 962 | { |
| 963 | m_cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); |
| 964 | } |
| 965 | |
| 966 | |
| 967 | //------------------------------------------------- |
| 968 | // porta_w - PIA port A writes |
| 969 | //------------------------------------------------- |
| 970 | |
| 971 | WRITE8_MEMBER(midway_turbo_chip_squeak_device::porta_w) |
| 972 | { |
| 973 | m_dacval = (m_dacval & ~0x3fc) | (data << 2); |
| 974 | dac_signed_data_16_w(m_dac, m_dacval << 6); |
| 975 | } |
| 976 | |
| 977 | |
| 978 | //------------------------------------------------- |
| 979 | // portb_w - PIA port B writes |
| 980 | //------------------------------------------------- |
| 981 | |
| 982 | WRITE8_MEMBER(midway_turbo_chip_squeak_device::portb_w) |
| 983 | { |
| 984 | m_dacval = (m_dacval & ~0x003) | (data >> 6); |
| 985 | dac_signed_data_16_w(m_dac, m_dacval << 6); |
| 986 | m_status = (data >> 4) & 3; |
| 987 | } |
| 988 | |
| 989 | |
| 990 | //------------------------------------------------- |
| 991 | // irq_w - IRQ line state changes |
| 992 | //------------------------------------------------- |
| 993 | |
| 994 | WRITE_LINE_MEMBER(midway_turbo_chip_squeak_device::irq_w) |
| 995 | { |
| 996 | int combined_state = m_pia->irq_a_state() | m_pia->irq_b_state(); |
| 997 | m_cpu->set_input_line(M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); |
| 998 | } |
| 999 | |
| 1000 | |
| 1001 | //------------------------------------------------- |
| 1002 | // audio CPU map |
| 1003 | //------------------------------------------------- |
| 1004 | |
| 1005 | // address map verified from schematics |
| 1006 | static ADDRESS_MAP_START( turbocs_map, AS_PROGRAM, 8, midway_turbo_chip_squeak_device ) |
| 1007 | ADDRESS_MAP_UNMAP_HIGH |
| 1008 | AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x3800) AM_RAM |
| 1009 | AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x3ffc) AM_DEVREADWRITE("pia", pia6821_device, read_alt, write_alt) |
| 1010 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 1011 | ADDRESS_MAP_END |
| 1012 | |
| 1013 | |
| 1014 | //------------------------------------------------- |
| 1015 | // 6821 PIA interface |
| 1016 | //------------------------------------------------- |
| 1017 | |
| 1018 | static const pia6821_interface turbocs_pia_intf = |
| 1019 | { |
| 1020 | DEVCB_NULL, // port A in |
| 1021 | DEVCB_NULL, // port B in |
| 1022 | DEVCB_NULL, // line CA1 in |
| 1023 | DEVCB_NULL, // line CB1 in |
| 1024 | DEVCB_NULL, // line CA2 in |
| 1025 | DEVCB_NULL, // line CB2 in |
| 1026 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_turbo_chip_squeak_device, porta_w), // port A out |
| 1027 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_turbo_chip_squeak_device, portb_w), // port B out |
| 1028 | DEVCB_NULL, // line CA2 out |
| 1029 | DEVCB_NULL, // port CB2 out |
| 1030 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_turbo_chip_squeak_device, irq_w), // IRQA |
| 1031 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_turbo_chip_squeak_device, irq_w) // IRQB |
| 1032 | }; |
| 1033 | |
| 1034 | |
| 1035 | //------------------------------------------------- |
| 1036 | // machine configuration |
| 1037 | //------------------------------------------------- |
| 1038 | |
| 1039 | static MACHINE_CONFIG_FRAGMENT(midway_turbo_chip_squeak) |
| 1040 | MCFG_CPU_ADD("cpu", M6809E, TURBOCS_CLOCK) |
| 1041 | MCFG_CPU_PROGRAM_MAP(turbocs_map) |
| 1042 | |
| 1043 | MCFG_PIA6821_ADD("pia", turbocs_pia_intf) |
| 1044 | |
| 1045 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 1046 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) |
| 1047 | MACHINE_CONFIG_END |
| 1048 | |
| 1049 | |
| 1050 | //------------------------------------------------- |
| 1051 | // device_mconfig_additions - return a pointer to |
| 1052 | // the device's machine fragment |
| 1053 | //------------------------------------------------- |
| 1054 | |
| 1055 | machine_config_constructor midway_turbo_chip_squeak_device::device_mconfig_additions() const |
| 1056 | { |
| 1057 | return MACHINE_CONFIG_NAME( midway_turbo_chip_squeak ); |
| 1058 | } |
| 1059 | |
| 1060 | |
| 1061 | //------------------------------------------------- |
| 1062 | // device_start - device-specific startup |
| 1063 | //------------------------------------------------- |
| 1064 | |
| 1065 | void midway_turbo_chip_squeak_device::device_start() |
| 1066 | { |
| 1067 | save_item(NAME(m_status)); |
| 1068 | save_item(NAME(m_dacval)); |
| 1069 | } |
| 1070 | |
| 1071 | |
| 1072 | //------------------------------------------------- |
| 1073 | // device_reset - device-specific reset |
| 1074 | //------------------------------------------------- |
| 1075 | |
| 1076 | void midway_turbo_chip_squeak_device::device_reset() |
| 1077 | { |
| 1078 | } |
| 1079 | |
| 1080 | |
| 1081 | //------------------------------------------------- |
| 1082 | // device_timer - timer callbacks |
| 1083 | //------------------------------------------------- |
| 1084 | |
| 1085 | void midway_turbo_chip_squeak_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 1086 | { |
| 1087 | m_pia->portb_w((param >> 1) & 0x0f); |
| 1088 | m_pia->ca1_w(~param & 0x01); |
| 1089 | |
| 1090 | // oftentimes games will write one nibble at a time; the sync on this is very |
| 1091 | // important, so we boost the interleave briefly while this happens |
| 1092 | machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 1093 | } |
| 1094 | |
| 1095 | |
| 1096 | //************************************************************************** |
| 1097 | // SQUAWK 'N' TALK BOARD |
| 1098 | //************************************************************************** |
| 1099 | |
| 1100 | //------------------------------------------------- |
| 1101 | // midway_squawk_n_talk_device - constructor |
| 1102 | //------------------------------------------------- |
| 1103 | |
| 1104 | midway_squawk_n_talk_device::midway_squawk_n_talk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1105 | : device_t(mconfig, MIDWAY_SQUAWK_N_TALK, "Midway Squawk 'n' Talk Sound Board", "midsnt", tag, owner, clock), |
| 1106 | device_mixer_interface(mconfig, *this), |
| 1107 | m_cpu(*this, "cpu"), |
| 1108 | m_pia0(*this, "pia0"), |
| 1109 | m_pia1(*this, "pia1"), |
| 1110 | m_tms5200(*this, "tms5200"), |
| 1111 | m_tms_command(0), |
| 1112 | m_tms_strobes(0) |
| 1113 | { |
| 1114 | } |
| 1115 | |
| 1116 | |
| 1117 | //------------------------------------------------- |
| 1118 | // write - handle an external write to the input |
| 1119 | // latch |
| 1120 | //------------------------------------------------- |
| 1121 | |
| 1122 | WRITE8_MEMBER(midway_squawk_n_talk_device::write) |
| 1123 | { |
| 1124 | synchronize(0, data); |
| 1125 | } |
| 1126 | |
| 1127 | |
| 1128 | //------------------------------------------------- |
| 1129 | // reset_write - write to the reset line |
| 1130 | //------------------------------------------------- |
| 1131 | |
| 1132 | WRITE_LINE_MEMBER(midway_squawk_n_talk_device::reset_write) |
| 1133 | { |
| 1134 | m_cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); |
| 1135 | } |
| 1136 | |
| 1137 | |
| 1138 | //------------------------------------------------- |
| 1139 | // porta1_w - PIA #1 port A writes |
| 1140 | //------------------------------------------------- |
| 1141 | |
| 1142 | WRITE8_MEMBER(midway_squawk_n_talk_device::porta1_w ) |
| 1143 | { |
| 1144 | logerror("Write to AY-8912 = %02X\n", data); |
| 1145 | } |
| 1146 | |
| 1147 | |
| 1148 | //------------------------------------------------- |
| 1149 | // dac_w - DAC data writes |
| 1150 | //------------------------------------------------- |
| 1151 | |
| 1152 | WRITE8_MEMBER(midway_squawk_n_talk_device::dac_w) |
| 1153 | { |
| 1154 | logerror("Write to DAC = %02X\n", data); |
| 1155 | } |
| 1156 | |
| 1157 | |
| 1158 | //------------------------------------------------- |
| 1159 | // porta2_w - PIA #2 port A writes |
| 1160 | //------------------------------------------------- |
| 1161 | |
| 1162 | WRITE8_MEMBER(midway_squawk_n_talk_device::porta2_w) |
| 1163 | { |
| 1164 | m_tms_command = data; |
| 1165 | } |
| 1166 | |
| 1167 | |
| 1168 | //------------------------------------------------- |
| 1169 | // portb2_w - PIA #2 port B writes |
| 1170 | //------------------------------------------------- |
| 1171 | |
| 1172 | WRITE8_MEMBER(midway_squawk_n_talk_device::portb2_w) |
| 1173 | { |
| 1174 | // bits 0-1 select read/write strobes on the TMS5200 |
| 1175 | data &= 0x03; |
| 1176 | |
| 1177 | // write strobe -- pass the current command to the TMS5200 |
| 1178 | if (((data ^ m_tms_strobes) & 0x02) && !(data & 0x02)) |
| 1179 | { |
| 1180 | tms5220_data_w(m_tms5200, offset, m_tms_command); |
| 1181 | |
| 1182 | // DoT expects the ready line to transition on a command/write here, so we oblige |
| 1183 | m_pia1->ca2_w(1); |
| 1184 | m_pia1->ca2_w(0); |
| 1185 | } |
| 1186 | |
| 1187 | // read strobe -- read the current status from the TMS5200 |
| 1188 | else if (((data ^ m_tms_strobes) & 0x01) && !(data & 0x01)) |
| 1189 | { |
| 1190 | m_pia1->porta_w(tms5220_status_r(m_tms5200, offset)); |
| 1191 | |
| 1192 | // DoT expects the ready line to transition on a command/write here, so we oblige |
| 1193 | m_pia1->ca2_w(1); |
| 1194 | m_pia1->ca2_w(0); |
| 1195 | } |
| 1196 | |
| 1197 | // remember the state |
| 1198 | m_tms_strobes = data; |
| 1199 | } |
| 1200 | |
| 1201 | |
| 1202 | //------------------------------------------------- |
| 1203 | // irq_w - IRQ line state changes |
| 1204 | //------------------------------------------------- |
| 1205 | |
| 1206 | WRITE_LINE_MEMBER(midway_squawk_n_talk_device::irq_w) |
| 1207 | { |
| 1208 | int combined_state = m_pia0->irq_a_state() | m_pia0->irq_b_state() | m_pia1->irq_a_state() | m_pia1->irq_b_state(); |
| 1209 | m_cpu->set_input_line(M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); |
| 1210 | } |
| 1211 | |
| 1212 | |
| 1213 | //------------------------------------------------- |
| 1214 | // audio CPU map |
| 1215 | //------------------------------------------------- |
| 1216 | |
| 1217 | // address map verified from schematics |
| 1218 | // note that jumpers control the ROM sizes; if these are changed, use the alternate |
| 1219 | // address map below |
| 1220 | static ADDRESS_MAP_START( squawkntalk_map, AS_PROGRAM, 8, midway_squawk_n_talk_device ) |
| 1221 | ADDRESS_MAP_UNMAP_HIGH |
| 1222 | AM_RANGE(0x0000, 0x007f) AM_RAM // internal RAM |
| 1223 | AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| 1224 | AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("pia1", pia6821_device, read, write) |
| 1225 | AM_RANGE(0x1000, 0x1fff) AM_MIRROR(0x4000) AM_WRITE(dac_w) |
| 1226 | AM_RANGE(0x8000, 0xbfff) AM_MIRROR(0x4000) AM_ROM |
| 1227 | ADDRESS_MAP_END |
| 1228 | |
| 1229 | // alternate address map if the ROM jumpers are changed to support a smaller |
| 1230 | // ROM size of 2k |
| 1231 | #ifdef UNUSED_FUNCTION |
| 1232 | static ADDRESS_MAP_START( squawkntalk_alt_map, AS_PROGRAM, 8, midway_squawk_n_talk_device ) |
| 1233 | ADDRESS_MAP_UNMAP_HIGH |
| 1234 | AM_RANGE(0x0000, 0x007f) AM_RAM // internal RAM |
| 1235 | AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x676c) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| 1236 | AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x676c) AM_DEVREADWRITE("pia1", pia6821_device, read, write) |
| 1237 | AM_RANGE(0x0800, 0x0fff) AM_MIRROR(0x6000) AM_WRITE(dac_w) |
| 1238 | AM_RANGE(0x8000, 0x9fff) AM_MIRROR(0x6000) AM_ROM |
| 1239 | ADDRESS_MAP_END |
| 1240 | #endif |
| 1241 | |
| 1242 | |
| 1243 | //------------------------------------------------- |
| 1244 | // 6821 PIA interfaces |
| 1245 | //------------------------------------------------- |
| 1246 | |
| 1247 | static const pia6821_interface squawkntalk_pia0_intf = |
| 1248 | { |
| 1249 | DEVCB_NULL, // port A in |
| 1250 | DEVCB_NULL, // port B in |
| 1251 | DEVCB_NULL, // line CA1 in |
| 1252 | DEVCB_NULL, // line CB1 in |
| 1253 | DEVCB_NULL, // line CA2 in |
| 1254 | DEVCB_NULL, // line CB2 in |
| 1255 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, porta1_w), // port A out |
| 1256 | DEVCB_NULL, // port B out |
| 1257 | DEVCB_NULL, // line CA2 out |
| 1258 | DEVCB_NULL, // port CB2 out |
| 1259 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, irq_w), // IRQA |
| 1260 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, irq_w) // IRQB |
| 1261 | }; |
| 1262 | |
| 1263 | static const pia6821_interface squawkntalk_pia1_intf = |
| 1264 | { |
| 1265 | DEVCB_NULL, // port A in |
| 1266 | DEVCB_NULL, // port B in |
| 1267 | DEVCB_NULL, // line CA1 in |
| 1268 | DEVCB_NULL, // line CB1 in |
| 1269 | DEVCB_NULL, // line CA2 in |
| 1270 | DEVCB_NULL, // line CB2 in |
| 1271 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, porta2_w), // port A out |
| 1272 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, portb2_w), // port B out |
| 1273 | DEVCB_NULL, // line CA2 out |
| 1274 | DEVCB_NULL, // port CB2 out |
| 1275 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, irq_w), // IRQA |
| 1276 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, irq_w) // IRQB |
| 1277 | }; |
| 1278 | |
| 1279 | |
| 1280 | //------------------------------------------------- |
| 1281 | // machine configuration |
| 1282 | //------------------------------------------------- |
| 1283 | |
| 1284 | static MACHINE_CONFIG_FRAGMENT(midway_squawk_n_talk) |
| 1285 | MCFG_CPU_ADD("cpu", M6802, SQUAWKTALK_CLOCK) |
| 1286 | MCFG_CPU_PROGRAM_MAP(squawkntalk_map) |
| 1287 | |
| 1288 | MCFG_PIA6821_ADD("pia0", squawkntalk_pia0_intf) |
| 1289 | MCFG_PIA6821_ADD("pia1", squawkntalk_pia1_intf) |
| 1290 | |
| 1291 | // only used on Discs of Tron, which is stereo |
| 1292 | MCFG_SOUND_ADD("tms5200", TMS5200, 640000) |
| 1293 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60) |
| 1294 | |
| 1295 | // the board also supports an AY-8912 and/or an 8-bit DAC, neither of |
| 1296 | // which are populated on the Discs of Tron board |
| 1297 | MACHINE_CONFIG_END |
| 1298 | |
| 1299 | |
| 1300 | //------------------------------------------------- |
| 1301 | // device_mconfig_additions - return a pointer to |
| 1302 | // the device's machine fragment |
| 1303 | //------------------------------------------------- |
| 1304 | |
| 1305 | machine_config_constructor midway_squawk_n_talk_device::device_mconfig_additions() const |
| 1306 | { |
| 1307 | return MACHINE_CONFIG_NAME( midway_squawk_n_talk ); |
| 1308 | } |
| 1309 | |
| 1310 | |
| 1311 | //------------------------------------------------- |
| 1312 | // device_start - device-specific startup |
| 1313 | //------------------------------------------------- |
| 1314 | |
| 1315 | void midway_squawk_n_talk_device::device_start() |
| 1316 | { |
| 1317 | save_item(NAME(m_tms_command)); |
| 1318 | save_item(NAME(m_tms_strobes)); |
| 1319 | } |
| 1320 | |
| 1321 | |
| 1322 | //------------------------------------------------- |
| 1323 | // device_reset - device-specific reset |
| 1324 | //------------------------------------------------- |
| 1325 | |
| 1326 | void midway_squawk_n_talk_device::device_reset() |
| 1327 | { |
| 1328 | } |
| 1329 | |
| 1330 | |
| 1331 | //------------------------------------------------- |
| 1332 | // device_timer - timer callbacks |
| 1333 | //------------------------------------------------- |
| 1334 | |
| 1335 | void midway_squawk_n_talk_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 1336 | { |
| 1337 | m_pia0->porta_w(~param & 0x0f); |
| 1338 | m_pia0->cb1_w(~param & 0x10); |
| 1339 | } |
src/mame/audio/williams.c
| r14963 | r14964 | |
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | audio/williams.h |
| 4 | |
| 5 | Functions to emulate general the various Williams/Midway sound cards. |
| 6 | |
| 7 | **************************************************************************** |
| 8 | |
| 9 | Copyright Aaron Giles |
| 10 | All rights reserved. |
| 11 | |
| 12 | Redistribution and use in source and binary forms, with or without |
| 13 | modification, are permitted provided that the following conditions are |
| 14 | met: |
| 15 | |
| 16 | * Redistributions of source code must retain the above copyright |
| 17 | notice, this list of conditions and the following disclaimer. |
| 18 | * Redistributions in binary form must reproduce the above copyright |
| 19 | notice, this list of conditions and the following disclaimer in |
| 20 | the documentation and/or other materials provided with the |
| 21 | distribution. |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be |
| 23 | used to endorse or promote products derived from this software |
| 24 | without specific prior written permission. |
| 25 | |
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 36 | POSSIBILITY OF SUCH DAMAGE. |
| 37 | |
| 38 | **************************************************************************** |
| 39 | |
| 3 | 40 | Midway/Williams Audio Boards |
| 4 | 41 | ---------------------------- |
| 5 | 42 | |
| r14963 | r14964 | |
| 43 | 80 | |
| 44 | 81 | |
| 45 | 82 | |
| 46 | | /*************************************************************************** |
| 47 | | STATIC GLOBALS |
| 48 | | ****************************************************************************/ |
| 83 | //************************************************************************** |
| 84 | // GLOBAL VARIABLES |
| 85 | //************************************************************************** |
| 49 | 86 | |
| 50 | | typedef struct _williams_audio_state williams_audio_state; |
| 51 | | struct _williams_audio_state |
| 52 | | { |
| 53 | | UINT8 sound_int_state; |
| 87 | extern const device_type WILLIAMS_NARC_SOUND = &device_creator<williams_narc_sound_device>; |
| 88 | extern const device_type WILLIAMS_CVSD_SOUND = &device_creator<williams_cvsd_sound_device>; |
| 89 | extern const device_type WILLIAMS_ADPCM_SOUND = &device_creator<williams_adpcm_sound_device>; |
| 54 | 90 | |
| 55 | | UINT8 audio_talkback; |
| 56 | | UINT8 audio_sync; |
| 57 | 91 | |
| 58 | | device_t *sound_cpu; |
| 59 | | device_t *soundalt_cpu; |
| 60 | | }; |
| 61 | 92 | |
| 62 | | static williams_audio_state audio; |
| 93 | //************************************************************************** |
| 94 | // CVSD SOUND BOARD |
| 95 | //************************************************************************** |
| 63 | 96 | |
| 64 | | /*************************************************************************** |
| 65 | | FUNCTION PROTOTYPES |
| 66 | | ****************************************************************************/ |
| 97 | //------------------------------------------------- |
| 98 | // williams_cvsd_sound_device - constructor |
| 99 | //------------------------------------------------- |
| 67 | 100 | |
| 68 | | static void init_audio_state(running_machine &machine); |
| 101 | williams_cvsd_sound_device::williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 102 | : device_t(mconfig, WILLIAMS_CVSD_SOUND, "Williams CVSD Sound Board", "wmscvsd", tag, owner, clock), |
| 103 | device_mixer_interface(mconfig, *this), |
| 104 | m_cpu(*this, "cpu"), |
| 105 | m_pia(*this, "pia"), |
| 106 | m_hc55516(*this, "cvsd"), |
| 107 | m_talkback(0) |
| 108 | { |
| 109 | } |
| 69 | 110 | |
| 70 | | static void cvsd_ym2151_irq(device_t *device, int state); |
| 71 | | static void adpcm_ym2151_irq(device_t *device, int state); |
| 72 | | static WRITE_LINE_DEVICE_HANDLER( cvsd_irqa ); |
| 73 | | static WRITE_LINE_DEVICE_HANDLER( cvsd_irqb ); |
| 74 | 111 | |
| 75 | | static WRITE8_HANDLER( cvsd_bank_select_w ); |
| 76 | | static WRITE8_DEVICE_HANDLER( cvsd_talkback_w ); |
| 77 | | static WRITE8_DEVICE_HANDLER( cvsd_digit_clock_clear_w ); |
| 78 | | static WRITE8_DEVICE_HANDLER( cvsd_clock_set_w ); |
| 112 | //------------------------------------------------- |
| 113 | // write - handle an external write to the input |
| 114 | // latch |
| 115 | //------------------------------------------------- |
| 79 | 116 | |
| 80 | | static READ8_HANDLER( adpcm_command_r ); |
| 81 | | static WRITE8_HANDLER( adpcm_bank_select_w ); |
| 82 | | static WRITE8_DEVICE_HANDLER( adpcm_6295_bank_select_w ); |
| 83 | | static WRITE8_HANDLER( adpcm_talkback_w ); |
| 117 | WRITE16_MEMBER(williams_cvsd_sound_device::write) |
| 118 | { |
| 119 | synchronize(0, data); |
| 120 | } |
| 84 | 121 | |
| 85 | | static READ8_HANDLER( narc_command_r ); |
| 86 | | static READ8_HANDLER( narc_command2_r ); |
| 87 | | static WRITE8_HANDLER( narc_command2_w ); |
| 88 | | static WRITE8_HANDLER( narc_master_bank_select_w ); |
| 89 | | static WRITE8_HANDLER( narc_slave_bank_select_w ); |
| 90 | | static WRITE8_HANDLER( narc_master_talkback_w ); |
| 91 | | static WRITE8_HANDLER( narc_master_sync_w ); |
| 92 | | static WRITE8_HANDLER( narc_slave_talkback_w ); |
| 93 | | static WRITE8_HANDLER( narc_slave_sync_w ); |
| 94 | 122 | |
| 123 | //------------------------------------------------- |
| 124 | // reset_write - write to the reset line |
| 125 | //------------------------------------------------- |
| 95 | 126 | |
| 127 | WRITE_LINE_MEMBER(williams_cvsd_sound_device::reset_write) |
| 128 | { |
| 129 | // going high halts the CPU |
| 130 | if (state) |
| 131 | { |
| 132 | bank_select_w(*m_cpu->space(), 0, 0); |
| 133 | device_reset(); |
| 134 | m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 135 | } |
| 96 | 136 | |
| 97 | | /*************************************************************************** |
| 98 | | PROCESSOR STRUCTURES |
| 99 | | ****************************************************************************/ |
| 137 | // going low resets and reactivates the CPU |
| 138 | else |
| 139 | m_cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 140 | } |
| 100 | 141 | |
| 101 | | /* CVSD readmem/writemem structures */ |
| 102 | | static ADDRESS_MAP_START( williams_cvsd_map, AS_PROGRAM, 8, driver_device ) |
| 103 | | AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x1800) AM_RAM |
| 104 | | AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x1ffe) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) |
| 105 | | AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x1ffc) AM_DEVREADWRITE("cvsdpia", pia6821_device, read, write) |
| 106 | | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x07ff) AM_DEVWRITE_LEGACY("cvsd", cvsd_digit_clock_clear_w) |
| 107 | | AM_RANGE(0x6800, 0x6800) AM_MIRROR(0x07ff) AM_DEVWRITE_LEGACY("cvsd", cvsd_clock_set_w) |
| 108 | | AM_RANGE(0x7800, 0x7800) AM_MIRROR(0x07ff) AM_WRITE_LEGACY(cvsd_bank_select_w) |
| 109 | | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank5") |
| 110 | | ADDRESS_MAP_END |
| 111 | 142 | |
| 143 | //------------------------------------------------- |
| 144 | // bank_select_w - change memory banks |
| 145 | //------------------------------------------------- |
| 112 | 146 | |
| 113 | | /* NARC master readmem/writemem structures */ |
| 114 | | static ADDRESS_MAP_START( williams_narc_master_map, AS_PROGRAM, 8, driver_device ) |
| 115 | | AM_RANGE(0x0000, 0x1fff) AM_RAM |
| 116 | | AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x03fe) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) |
| 117 | | AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_WRITE_LEGACY(narc_master_talkback_w) |
| 118 | | AM_RANGE(0x2c00, 0x2c00) AM_MIRROR(0x03ff) AM_WRITE_LEGACY(narc_command2_w) |
| 119 | | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE_LEGACY("dac1", dac_w) |
| 120 | | AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_READ_LEGACY(narc_command_r) |
| 121 | | AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x03ff) AM_WRITE_LEGACY(narc_master_bank_select_w) |
| 122 | | AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE_LEGACY(narc_master_sync_w) |
| 123 | | AM_RANGE(0x4000, 0xbfff) AM_ROMBANK("bank5") |
| 124 | | AM_RANGE(0xc000, 0xffff) AM_ROMBANK("bank6") |
| 125 | | ADDRESS_MAP_END |
| 147 | WRITE8_MEMBER(williams_cvsd_sound_device::bank_select_w) |
| 148 | { |
| 149 | subbank("rombank")->set_entry(data & 0x0f); |
| 150 | } |
| 126 | 151 | |
| 127 | | /* NARC slave readmem/writemem structures */ |
| 128 | | static ADDRESS_MAP_START( williams_narc_slave_map, AS_PROGRAM, 8, driver_device ) |
| 129 | | AM_RANGE(0x0000, 0x1fff) AM_RAM |
| 130 | | AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x03ff) AM_DEVWRITE_LEGACY("cvsd", cvsd_clock_set_w) |
| 131 | | AM_RANGE(0x2400, 0x2400) AM_MIRROR(0x03ff) AM_DEVWRITE_LEGACY("cvsd", cvsd_digit_clock_clear_w) |
| 132 | | AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_WRITE_LEGACY(narc_slave_talkback_w) |
| 133 | | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE_LEGACY("dac2", dac_w) |
| 134 | | AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_READ_LEGACY(narc_command2_r) |
| 135 | | AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x03ff) AM_WRITE_LEGACY(narc_slave_bank_select_w) |
| 136 | | AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE_LEGACY(narc_slave_sync_w) |
| 137 | | AM_RANGE(0x4000, 0xbfff) AM_ROMBANK("bank7") |
| 138 | | AM_RANGE(0xc000, 0xffff) AM_ROMBANK("bank8") |
| 139 | | ADDRESS_MAP_END |
| 140 | 152 | |
| 153 | //------------------------------------------------- |
| 154 | // talkback_w - write to the talkback latch |
| 155 | //------------------------------------------------- |
| 141 | 156 | |
| 142 | | /* ADPCM readmem/writemem structures */ |
| 143 | | static ADDRESS_MAP_START( williams_adpcm_map, AS_PROGRAM, 8, driver_device ) |
| 144 | | AM_RANGE(0x0000, 0x1fff) AM_RAM |
| 145 | | AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x03ff) AM_WRITE_LEGACY(adpcm_bank_select_w) |
| 146 | | AM_RANGE(0x2400, 0x2401) AM_MIRROR(0x03fe) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) |
| 147 | | AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_DEVWRITE_LEGACY("dac", dac_w) |
| 148 | | AM_RANGE(0x2c00, 0x2c00) AM_MIRROR(0x03ff) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 149 | | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_READ_LEGACY(adpcm_command_r) |
| 150 | | AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_DEVWRITE_LEGACY("oki", adpcm_6295_bank_select_w) |
| 151 | | AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE_LEGACY(adpcm_talkback_w) |
| 152 | | AM_RANGE(0x4000, 0xbfff) AM_ROMBANK("bank5") |
| 153 | | AM_RANGE(0xc000, 0xffff) AM_ROMBANK("bank6") |
| 154 | | ADDRESS_MAP_END |
| 157 | WRITE8_MEMBER(williams_cvsd_sound_device::talkback_w) |
| 158 | { |
| 159 | m_talkback = data; |
| 160 | logerror("CVSD Talkback = %02X\n", data); |
| 161 | } |
| 155 | 162 | |
| 156 | 163 | |
| 164 | //------------------------------------------------- |
| 165 | // cvsd_digit_clock_clear_w - clear the clock on |
| 166 | // the HC55516 and clock the data |
| 167 | //------------------------------------------------- |
| 157 | 168 | |
| 158 | | /* PIA structure */ |
| 159 | | static const pia6821_interface cvsd_pia_intf = |
| 169 | WRITE8_MEMBER(williams_cvsd_sound_device::cvsd_digit_clock_clear_w) |
| 160 | 170 | { |
| 161 | | DEVCB_NULL, /* port A in */ |
| 162 | | DEVCB_NULL, /* port B in */ |
| 163 | | DEVCB_NULL, /* line CA1 in */ |
| 164 | | DEVCB_NULL, /* line CB1 in */ |
| 165 | | DEVCB_NULL, /* line CA2 in */ |
| 166 | | DEVCB_NULL, /* line CB2 in */ |
| 167 | | DEVCB_DEVICE_HANDLER("dac", dac_w), /* port A out */ |
| 168 | | DEVCB_HANDLER(cvsd_talkback_w), /* port B out */ |
| 169 | | DEVCB_NULL, /* line CA2 out */ |
| 170 | | DEVCB_NULL, /* port CB2 out */ |
| 171 | | DEVCB_LINE(cvsd_irqa), /* IRQA */ |
| 172 | | DEVCB_LINE(cvsd_irqb) /* IRQB */ |
| 173 | | }; |
| 171 | hc55516_digit_w(m_hc55516, data); |
| 172 | hc55516_clock_w(m_hc55516, 0); |
| 173 | } |
| 174 | 174 | |
| 175 | 175 | |
| 176 | //------------------------------------------------- |
| 177 | // cvsd_clock_set_w - set the clock on the HC55516 |
| 178 | //------------------------------------------------- |
| 176 | 179 | |
| 177 | | /*************************************************************************** |
| 178 | | AUDIO STRUCTURES |
| 179 | | ****************************************************************************/ |
| 180 | | |
| 181 | | /* YM2151 structure (CVSD variant) */ |
| 182 | | static const ym2151_interface cvsd_ym2151_interface = |
| 180 | WRITE8_MEMBER(williams_cvsd_sound_device::cvsd_clock_set_w) |
| 183 | 181 | { |
| 184 | | cvsd_ym2151_irq |
| 185 | | }; |
| 182 | hc55516_clock_w(m_hc55516, 1); |
| 183 | } |
| 186 | 184 | |
| 187 | 185 | |
| 188 | | /* YM2151 structure (ADPCM variant) */ |
| 189 | | static const ym2151_interface adpcm_ym2151_interface = |
| 186 | //------------------------------------------------- |
| 187 | // ym2151_irq_w - process IRQ signal changes from |
| 188 | // the YM2151 |
| 189 | //------------------------------------------------- |
| 190 | |
| 191 | WRITE_LINE_MEMBER(williams_cvsd_sound_device::ym2151_irq_w) |
| 190 | 192 | { |
| 191 | | adpcm_ym2151_irq |
| 192 | | }; |
| 193 | m_pia->ca1_w(!state); |
| 194 | } |
| 193 | 195 | |
| 194 | 196 | |
| 197 | //------------------------------------------------- |
| 198 | // pia_irqa - process IRQ A signal changes from |
| 199 | // the 6821 |
| 200 | //------------------------------------------------- |
| 195 | 201 | |
| 196 | | /*************************************************************************** |
| 197 | | MACHINE DRIVERS |
| 198 | | ****************************************************************************/ |
| 202 | WRITE_LINE_MEMBER(williams_cvsd_sound_device::pia_irqa) |
| 203 | { |
| 204 | m_cpu->set_input_line(M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); |
| 205 | } |
| 199 | 206 | |
| 200 | | MACHINE_CONFIG_FRAGMENT( williams_cvsd_sound ) |
| 201 | | MCFG_CPU_ADD("cvsdcpu", M6809E, CVSD_MASTER_CLOCK) |
| 202 | | MCFG_CPU_PROGRAM_MAP(williams_cvsd_map) |
| 203 | 207 | |
| 204 | | MCFG_PIA6821_ADD("cvsdpia", cvsd_pia_intf) |
| 208 | //------------------------------------------------- |
| 209 | // pia_irqb - process IRQ B signal changes from |
| 210 | // the 6821 |
| 211 | //------------------------------------------------- |
| 205 | 212 | |
| 206 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 213 | WRITE_LINE_MEMBER(williams_cvsd_sound_device::pia_irqb) |
| 214 | { |
| 215 | m_cpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); |
| 216 | } |
| 207 | 217 | |
| 208 | | MCFG_SOUND_ADD("ymsnd", YM2151, CVSD_FM_CLOCK) |
| 209 | | MCFG_SOUND_CONFIG(cvsd_ym2151_interface) |
| 210 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) |
| 211 | 218 | |
| 212 | | MCFG_SOUND_ADD("dac", DAC, 0) |
| 213 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 219 | //------------------------------------------------- |
| 220 | // audio CPU map |
| 221 | //------------------------------------------------- |
| 214 | 222 | |
| 215 | | MCFG_SOUND_ADD("cvsd", HC55516, 0) |
| 216 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) |
| 217 | | MACHINE_CONFIG_END |
| 223 | static ADDRESS_MAP_START( williams_cvsd_map, AS_PROGRAM, 8, williams_cvsd_sound_device ) |
| 224 | AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x1800) AM_RAM |
| 225 | AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x1ffe) AM_DEVREADWRITE_LEGACY("ym2151", ym2151_r, ym2151_w) |
| 226 | AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x1ffc) AM_DEVREADWRITE("pia", pia6821_device, read, write) |
| 227 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x07ff) AM_WRITE(cvsd_digit_clock_clear_w) |
| 228 | AM_RANGE(0x6800, 0x6800) AM_MIRROR(0x07ff) AM_WRITE(cvsd_clock_set_w) |
| 229 | AM_RANGE(0x7800, 0x7800) AM_MIRROR(0x07ff) AM_WRITE(bank_select_w) |
| 230 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("rombank") |
| 231 | ADDRESS_MAP_END |
| 218 | 232 | |
| 219 | 233 | |
| 220 | | MACHINE_CONFIG_FRAGMENT( williams_narc_sound ) |
| 221 | | MCFG_CPU_ADD("narc1cpu", M6809E, NARC_MASTER_CLOCK) |
| 222 | | MCFG_CPU_PROGRAM_MAP(williams_narc_master_map) |
| 234 | //------------------------------------------------- |
| 235 | // 6821 PIA interface |
| 236 | //------------------------------------------------- |
| 223 | 237 | |
| 224 | | MCFG_CPU_ADD("narc2cpu", M6809E, NARC_MASTER_CLOCK) |
| 225 | | MCFG_CPU_PROGRAM_MAP(williams_narc_slave_map) |
| 238 | static const pia6821_interface cvsd_pia_intf = |
| 239 | { |
| 240 | DEVCB_NULL, // port A in |
| 241 | DEVCB_NULL, // port B in |
| 242 | DEVCB_NULL, // line CA1 in |
| 243 | DEVCB_NULL, // line CB1 in |
| 244 | DEVCB_NULL, // line CA2 in |
| 245 | DEVCB_NULL, // line CB2 in |
| 246 | DEVCB_DEVICE_HANDLER("dac", dac_w), // port A out |
| 247 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, williams_cvsd_sound_device, talkback_w), // port B out |
| 248 | DEVCB_NULL, // line CA2 out |
| 249 | DEVCB_NULL, // port CB2 out |
| 250 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, williams_cvsd_sound_device, pia_irqa), // IRQA |
| 251 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, williams_cvsd_sound_device, pia_irqb) // IRQB |
| 252 | }; |
| 226 | 253 | |
| 227 | | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 228 | 254 | |
| 229 | | MCFG_SOUND_ADD("ymsnd", YM2151, NARC_FM_CLOCK) |
| 230 | | MCFG_SOUND_CONFIG(adpcm_ym2151_interface) |
| 231 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.10) |
| 232 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.10) |
| 255 | //------------------------------------------------- |
| 256 | // YM2151 configuration |
| 257 | //------------------------------------------------- |
| 233 | 258 | |
| 234 | | MCFG_SOUND_ADD("dac1", DAC, 0) |
| 235 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50) |
| 236 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50) |
| 259 | static const ym2151_interface cvsd_ym2151_interface = |
| 260 | { |
| 261 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, williams_cvsd_sound_device, ym2151_irq_w) |
| 262 | }; |
| 237 | 263 | |
| 238 | | MCFG_SOUND_ADD("dac2", DAC, 0) |
| 239 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50) |
| 240 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50) |
| 241 | 264 | |
| 242 | | MCFG_SOUND_ADD("cvsd", HC55516, 0) |
| 243 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.60) |
| 244 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.60) |
| 245 | | MACHINE_CONFIG_END |
| 265 | //------------------------------------------------- |
| 266 | // machine configuration |
| 267 | //------------------------------------------------- |
| 246 | 268 | |
| 269 | static MACHINE_CONFIG_FRAGMENT( williams_cvsd_sound ) |
| 270 | MCFG_CPU_ADD("cpu", M6809E, CVSD_MASTER_CLOCK) |
| 271 | MCFG_CPU_PROGRAM_MAP(williams_cvsd_map) |
| 247 | 272 | |
| 248 | | MACHINE_CONFIG_FRAGMENT( williams_adpcm_sound ) |
| 249 | | MCFG_CPU_ADD("adpcm", M6809E, ADPCM_MASTER_CLOCK) |
| 250 | | MCFG_CPU_PROGRAM_MAP(williams_adpcm_map) |
| 273 | MCFG_PIA6821_ADD("pia", cvsd_pia_intf) |
| 251 | 274 | |
| 252 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 275 | MCFG_SOUND_ADD("ym2151", YM2151, CVSD_FM_CLOCK) |
| 276 | MCFG_SOUND_CONFIG(cvsd_ym2151_interface) |
| 277 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10) |
| 253 | 278 | |
| 254 | | MCFG_SOUND_ADD("ymsnd", YM2151, ADPCM_FM_CLOCK) |
| 255 | | MCFG_SOUND_CONFIG(adpcm_ym2151_interface) |
| 256 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) |
| 257 | | |
| 258 | 279 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 259 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 280 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50) |
| 260 | 281 | |
| 261 | | MCFG_OKIM6295_ADD("oki", ADPCM_MASTER_CLOCK/8, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified |
| 262 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 282 | MCFG_SOUND_ADD("cvsd", HC55516, 0) |
| 283 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60) |
| 263 | 284 | MACHINE_CONFIG_END |
| 264 | 285 | |
| 265 | 286 | |
| 287 | //------------------------------------------------- |
| 288 | // device_mconfig_additions - return a pointer to |
| 289 | // the device's machine fragment |
| 290 | //------------------------------------------------- |
| 266 | 291 | |
| 267 | | /*************************************************************************** |
| 268 | | INITIALIZATION |
| 269 | | ****************************************************************************/ |
| 270 | | |
| 271 | | void williams_cvsd_init(running_machine &machine) |
| 292 | machine_config_constructor williams_cvsd_sound_device::device_mconfig_additions() const |
| 272 | 293 | { |
| 273 | | williams_audio_state *state = &audio; |
| 274 | | UINT8 *ROM; |
| 275 | | int bank; |
| 294 | return MACHINE_CONFIG_NAME( williams_cvsd_sound ); |
| 295 | } |
| 276 | 296 | |
| 277 | | /* configure the CPU */ |
| 278 | | state->sound_cpu = machine.device("cvsdcpu"); |
| 279 | | state->soundalt_cpu = NULL; |
| 280 | 297 | |
| 281 | | /* configure master CPU banks */ |
| 282 | | ROM = machine.region("cvsdcpu")->base(); |
| 283 | | for (bank = 0; bank < 16; bank++) |
| 298 | //------------------------------------------------- |
| 299 | // device_start - device-specific startup |
| 300 | //------------------------------------------------- |
| 301 | |
| 302 | void williams_cvsd_sound_device::device_start() |
| 303 | { |
| 304 | // configure master CPU banks |
| 305 | UINT8 *rom = subregion("cpu")->base(); |
| 306 | for (int bank = 0; bank < 16; bank++) |
| 284 | 307 | { |
| 285 | | /* |
| 286 | | D0/D1 -> selects: 0=U4 1=U19 2=U20 3=n/c |
| 287 | | D2 -> A15 |
| 288 | | D3 -> A16 |
| 289 | | */ |
| 308 | // |
| 309 | // D0/D1 -> selects: 0=U4 1=U19 2=U20 3=n/c |
| 310 | // D2 -> A15 |
| 311 | // D3 -> A16 |
| 312 | // |
| 290 | 313 | offs_t offset = 0x8000 * ((bank >> 2) & 3) + 0x20000 * (bank & 3); |
| 291 | | memory_configure_bank(machine, "bank5", bank, 1, &ROM[0x10000 + offset], 0); |
| 314 | subbank("rombank")->configure_entry(bank, &rom[0x10000 + offset]); |
| 292 | 315 | } |
| 293 | | memory_set_bank(machine, "bank5", 0); |
| 316 | subbank("rombank")->set_entry(0); |
| 294 | 317 | |
| 295 | | /* reset the IRQ state */ |
| 296 | | machine.device<pia6821_device>("cvsdpia")->ca1_w(1); |
| 318 | // reset the IRQ state |
| 319 | m_pia->ca1_w(1); |
| 297 | 320 | |
| 298 | | /* register for save states */ |
| 299 | | state_save_register_global(machine, state->sound_int_state); |
| 300 | | state_save_register_global(machine, state->audio_talkback); |
| 321 | // register for save states |
| 322 | save_item(NAME(m_talkback)); |
| 301 | 323 | } |
| 302 | 324 | |
| 303 | 325 | |
| 304 | | void williams_narc_init(running_machine &machine) |
| 326 | //------------------------------------------------- |
| 327 | // device_reset - device-specific reset |
| 328 | //------------------------------------------------- |
| 329 | |
| 330 | void williams_cvsd_sound_device::device_reset() |
| 305 | 331 | { |
| 306 | | williams_audio_state *state = &audio; |
| 307 | | UINT8 *ROM; |
| 308 | | int bank; |
| 332 | // reset interrupt states |
| 333 | m_cpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); |
| 334 | m_cpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); |
| 335 | m_cpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); |
| 336 | } |
| 309 | 337 | |
| 310 | | /* configure the CPU */ |
| 311 | | state->sound_cpu = machine.device("narc1cpu"); |
| 312 | | state->soundalt_cpu = machine.device("narc2cpu"); |
| 313 | 338 | |
| 314 | | /* configure master CPU banks */ |
| 315 | | ROM = machine.region("narc1cpu")->base(); |
| 316 | | for (bank = 0; bank < 16; bank++) |
| 317 | | { |
| 318 | | /* |
| 319 | | D0 -> A15 |
| 320 | | D1/D2 -> selects: 0=n/c 1=U3 2=U4 3=U5 |
| 321 | | D3 -> A16 |
| 322 | | */ |
| 323 | | offs_t offset = 0x8000 * (bank & 1) + 0x10000 * ((bank >> 3) & 1) + 0x20000 * ((bank >> 1) & 3); |
| 324 | | memory_configure_bank(machine, "bank5", bank, 1, &ROM[0x10000 + offset], 0); |
| 325 | | } |
| 326 | | memory_set_bankptr(machine, "bank6", &ROM[0x10000 + 0x4000 + 0x8000 + 0x10000 + 0x20000 * 3]); |
| 339 | //------------------------------------------------- |
| 340 | // device_timer - timer callbacks |
| 341 | //------------------------------------------------- |
| 327 | 342 | |
| 328 | | /* configure slave CPU banks */ |
| 329 | | ROM = machine.region("narc2cpu")->base(); |
| 330 | | for (bank = 0; bank < 16; bank++) |
| 331 | | { |
| 332 | | /* |
| 333 | | D0 -> A15 |
| 334 | | D1/D2 -> selects: 0=U35 1=U36 2=U37 3=U38 |
| 335 | | D3 -> A16 |
| 336 | | */ |
| 337 | | offs_t offset = 0x8000 * (bank & 1) + 0x10000 * ((bank >> 3) & 1) + 0x20000 * ((bank >> 1) & 3); |
| 338 | | memory_configure_bank(machine, "bank7", bank, 1, &ROM[0x10000 + offset], 0); |
| 339 | | } |
| 340 | | memory_set_bankptr(machine, "bank8", &ROM[0x10000 + 0x4000 + 0x8000 + 0x10000 + 0x20000 * 3]); |
| 341 | | |
| 342 | | /* register for save states */ |
| 343 | | state_save_register_global(machine, state->sound_int_state); |
| 344 | | state_save_register_global(machine, state->audio_talkback); |
| 345 | | state_save_register_global(machine, state->audio_sync); |
| 343 | void williams_cvsd_sound_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 344 | { |
| 345 | // process incoming data write |
| 346 | m_pia->portb_w(param & 0xff); |
| 347 | m_pia->cb1_w((param >> 8) & 1); |
| 348 | m_pia->cb2_w((param >> 9) & 1); |
| 346 | 349 | } |
| 347 | 350 | |
| 348 | 351 | |
| 349 | | void williams_adpcm_init(running_machine &machine) |
| 350 | | { |
| 351 | | williams_audio_state *state = &audio; |
| 352 | | UINT8 *ROM; |
| 353 | 352 | |
| 354 | | /* configure the CPU */ |
| 355 | | state->sound_cpu = machine.device("adpcm"); |
| 356 | | state->soundalt_cpu = NULL; |
| 353 | //************************************************************************** |
| 354 | // NARC SOUND BOARD |
| 355 | //************************************************************************** |
| 357 | 356 | |
| 358 | | /* configure banks */ |
| 359 | | ROM = machine.region("adpcm")->base(); |
| 360 | | memory_configure_bank(machine, "bank5", 0, 8, &ROM[0x10000], 0x8000); |
| 361 | | memory_set_bankptr(machine, "bank6", &ROM[0x10000 + 0x4000 + 7 * 0x8000]); |
| 357 | //------------------------------------------------- |
| 358 | // williams_narc_sound_device - constructor |
| 359 | //------------------------------------------------- |
| 362 | 360 | |
| 363 | | /* expand ADPCM data */ |
| 364 | | /* it is assumed that U12 is loaded @ 0x00000 and U13 is loaded @ 0x40000 */ |
| 365 | | ROM = machine.region("oki")->base(); |
| 366 | | memcpy(ROM + 0x1c0000, ROM + 0x080000, 0x20000); /* expand individual banks */ |
| 367 | | memcpy(ROM + 0x180000, ROM + 0x0a0000, 0x20000); |
| 368 | | memcpy(ROM + 0x140000, ROM + 0x0c0000, 0x20000); |
| 369 | | memcpy(ROM + 0x100000, ROM + 0x0e0000, 0x20000); |
| 370 | | memcpy(ROM + 0x0c0000, ROM + 0x000000, 0x20000); |
| 371 | | memcpy(ROM + 0x000000, ROM + 0x040000, 0x20000); |
| 372 | | memcpy(ROM + 0x080000, ROM + 0x020000, 0x20000); |
| 361 | williams_narc_sound_device::williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 362 | : device_t(mconfig, WILLIAMS_NARC_SOUND, "Williams NARC Sound Board", "wmsnarc", tag, owner, clock), |
| 363 | device_mixer_interface(mconfig, *this), |
| 364 | m_cpu0(*this, "cpu0"), |
| 365 | m_cpu1(*this, "cpu1"), |
| 366 | m_hc55516(*this, "cvsd"), |
| 367 | m_latch(0), |
| 368 | m_latch2(0), |
| 369 | m_talkback(0), |
| 370 | m_audio_sync(0), |
| 371 | m_sound_int_state(0) |
| 372 | { |
| 373 | } |
| 373 | 374 | |
| 374 | | memcpy(ROM + 0x1e0000, ROM + 0x060000, 0x20000); /* copy common bank */ |
| 375 | | memcpy(ROM + 0x1a0000, ROM + 0x060000, 0x20000); |
| 376 | | memcpy(ROM + 0x160000, ROM + 0x060000, 0x20000); |
| 377 | | memcpy(ROM + 0x120000, ROM + 0x060000, 0x20000); |
| 378 | | memcpy(ROM + 0x0e0000, ROM + 0x060000, 0x20000); |
| 379 | | memcpy(ROM + 0x0a0000, ROM + 0x060000, 0x20000); |
| 380 | | memcpy(ROM + 0x020000, ROM + 0x060000, 0x20000); |
| 381 | 375 | |
| 382 | | /* register for save states */ |
| 383 | | state_save_register_global(machine, state->sound_int_state); |
| 384 | | state_save_register_global(machine, state->audio_talkback); |
| 376 | //------------------------------------------------- |
| 377 | // read - return the talkback register with the |
| 378 | // SYNC bits in bits 8 and 9 |
| 379 | //------------------------------------------------- |
| 380 | |
| 381 | READ16_MEMBER(williams_narc_sound_device::read) |
| 382 | { |
| 383 | return m_talkback | (m_audio_sync << 8); |
| 385 | 384 | } |
| 386 | 385 | |
| 387 | 386 | |
| 388 | | static void init_audio_state(running_machine &machine) |
| 387 | //------------------------------------------------- |
| 388 | // write - handle an external write to the input |
| 389 | // latch |
| 390 | //------------------------------------------------- |
| 391 | |
| 392 | WRITE16_MEMBER(williams_narc_sound_device::write) |
| 389 | 393 | { |
| 390 | | williams_audio_state *state = &audio; |
| 391 | | device_t *sound_cpu = state->sound_cpu; |
| 392 | | device_t *soundalt_cpu = state->soundalt_cpu; |
| 394 | synchronize(TID_MASTER_COMMAND, data); |
| 395 | } |
| 393 | 396 | |
| 394 | | /* reset the YM2151 state */ |
| 395 | | devtag_reset(machine, "ymsnd"); |
| 396 | 397 | |
| 397 | | /* clear all the interrupts */ |
| 398 | | state->sound_int_state = 0; |
| 399 | | if (sound_cpu != NULL) |
| 398 | //------------------------------------------------- |
| 399 | // reset_write - write to the reset line |
| 400 | //------------------------------------------------- |
| 401 | |
| 402 | WRITE_LINE_MEMBER(williams_narc_sound_device::reset_write) |
| 403 | { |
| 404 | // going high halts the CPU |
| 405 | if (state) |
| 400 | 406 | { |
| 401 | | device_set_input_line(sound_cpu, M6809_FIRQ_LINE, CLEAR_LINE); |
| 402 | | device_set_input_line(sound_cpu, M6809_IRQ_LINE, CLEAR_LINE); |
| 403 | | device_set_input_line(sound_cpu, INPUT_LINE_NMI, CLEAR_LINE); |
| 407 | master_bank_select_w(*m_cpu0->space(), 0, 0); |
| 408 | slave_bank_select_w(*m_cpu1->space(), 0, 0); |
| 409 | device_reset(); |
| 410 | m_cpu0->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 411 | m_cpu1->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 404 | 412 | } |
| 405 | | if (soundalt_cpu != NULL) |
| 413 | |
| 414 | // going low resets and reactivates the CPU |
| 415 | else |
| 406 | 416 | { |
| 407 | | device_set_input_line(soundalt_cpu, M6809_FIRQ_LINE, CLEAR_LINE); |
| 408 | | device_set_input_line(soundalt_cpu, M6809_IRQ_LINE, CLEAR_LINE); |
| 409 | | device_set_input_line(soundalt_cpu, INPUT_LINE_NMI, CLEAR_LINE); |
| 417 | m_cpu0->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 418 | m_cpu1->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 410 | 419 | } |
| 411 | 420 | } |
| 412 | 421 | |
| 413 | 422 | |
| 423 | //------------------------------------------------- |
| 424 | // master_bank_select_w - select the bank for the |
| 425 | // master CPU |
| 426 | //------------------------------------------------- |
| 414 | 427 | |
| 415 | | /*************************************************************************** |
| 416 | | CVSD IRQ GENERATION CALLBACKS |
| 417 | | ****************************************************************************/ |
| 418 | | |
| 419 | | static void cvsd_ym2151_irq(device_t *device, int state) |
| 428 | WRITE8_MEMBER(williams_narc_sound_device::master_bank_select_w) |
| 420 | 429 | { |
| 421 | | device->machine().device<pia6821_device>("cvsdpia")->ca1_w(!state); |
| 430 | subbank("masterbank")->set_entry(data & 0x0f); |
| 422 | 431 | } |
| 423 | 432 | |
| 424 | 433 | |
| 425 | | static WRITE_LINE_DEVICE_HANDLER( cvsd_irqa ) |
| 434 | //------------------------------------------------- |
| 435 | // slave_bank_select_w - select the bank for the |
| 436 | // slave CPU |
| 437 | //------------------------------------------------- |
| 438 | |
| 439 | WRITE8_MEMBER(williams_narc_sound_device::slave_bank_select_w) |
| 426 | 440 | { |
| 427 | | williams_audio_state *sndstate = &audio; |
| 428 | | |
| 429 | | device_set_input_line(sndstate->sound_cpu, M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); |
| 441 | subbank("slavebank")->set_entry(data & 0x0f); |
| 430 | 442 | } |
| 431 | 443 | |
| 432 | 444 | |
| 433 | | static WRITE_LINE_DEVICE_HANDLER( cvsd_irqb ) |
| 445 | //------------------------------------------------- |
| 446 | // command_r - read command written by external |
| 447 | // agent |
| 448 | //------------------------------------------------- |
| 449 | |
| 450 | READ8_MEMBER(williams_narc_sound_device::command_r) |
| 434 | 451 | { |
| 435 | | williams_audio_state *sndstate = &audio; |
| 436 | | |
| 437 | | device_set_input_line(sndstate->sound_cpu, INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); |
| 452 | m_cpu0->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); |
| 453 | m_sound_int_state = 0; |
| 454 | return m_latch; |
| 438 | 455 | } |
| 439 | 456 | |
| 440 | 457 | |
| 458 | //------------------------------------------------- |
| 459 | // command2_w - write command from master CPU to |
| 460 | // slave CPU |
| 461 | //------------------------------------------------- |
| 441 | 462 | |
| 442 | | /*************************************************************************** |
| 443 | | ADPCM IRQ GENERATION CALLBACKS |
| 444 | | ****************************************************************************/ |
| 445 | | |
| 446 | | static void adpcm_ym2151_irq(device_t *device, int state) |
| 463 | WRITE8_MEMBER(williams_narc_sound_device::command2_w) |
| 447 | 464 | { |
| 448 | | williams_audio_state *sndstate = &audio; |
| 449 | | |
| 450 | | device_set_input_line(sndstate->sound_cpu, M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); |
| 465 | synchronize(TID_SLAVE_COMMAND, data); |
| 451 | 466 | } |
| 452 | 467 | |
| 453 | 468 | |
| 469 | //------------------------------------------------- |
| 470 | // command2_r - read command written by master |
| 471 | // CPU |
| 472 | //------------------------------------------------- |
| 454 | 473 | |
| 455 | | /*************************************************************************** |
| 456 | | CVSD READ/WRITE HANDLERS |
| 457 | | ****************************************************************************/ |
| 458 | | |
| 459 | | static WRITE8_HANDLER( cvsd_bank_select_w ) |
| 474 | READ8_MEMBER(williams_narc_sound_device::command2_r) |
| 460 | 475 | { |
| 461 | | memory_set_bank(space->machine(), "bank5", data & 0x0f); |
| 476 | m_cpu1->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); |
| 477 | return m_latch2; |
| 462 | 478 | } |
| 463 | 479 | |
| 464 | 480 | |
| 465 | | static WRITE8_DEVICE_HANDLER( cvsd_talkback_w ) |
| 481 | //------------------------------------------------- |
| 482 | // master_talkback_w - handle writes to the |
| 483 | // talkback latch from the master CPU |
| 484 | //------------------------------------------------- |
| 485 | |
| 486 | WRITE8_MEMBER(williams_narc_sound_device::master_talkback_w) |
| 466 | 487 | { |
| 467 | | williams_audio_state *state = &audio; |
| 468 | | |
| 469 | | state->audio_talkback = data; |
| 470 | | logerror("CVSD Talkback = %02X\n", data); |
| 488 | m_talkback = data; |
| 489 | logerror("Master Talkback = %02X\n", data); |
| 471 | 490 | } |
| 472 | 491 | |
| 473 | 492 | |
| 474 | | static WRITE8_DEVICE_HANDLER( cvsd_digit_clock_clear_w ) |
| 493 | //------------------------------------------------- |
| 494 | // master_sync_w - handle writes to the master |
| 495 | // SYNC register |
| 496 | //------------------------------------------------- |
| 497 | |
| 498 | WRITE8_MEMBER(williams_narc_sound_device::master_sync_w) |
| 475 | 499 | { |
| 476 | | hc55516_digit_w(device, data); |
| 477 | | hc55516_clock_w(device, 0); |
| 500 | timer_set(attotime::from_double(TIME_OF_74LS123(180000, 0.000001)), TID_SYNC_CLEAR, 0x01); |
| 501 | m_audio_sync |= 0x01; |
| 502 | logerror("Master sync = %02X\n", data); |
| 478 | 503 | } |
| 479 | 504 | |
| 480 | 505 | |
| 481 | | static WRITE8_DEVICE_HANDLER( cvsd_clock_set_w ) |
| 506 | //------------------------------------------------- |
| 507 | // slave_talkback_w - handle writes to the |
| 508 | // talkback latch from the slave CPU |
| 509 | //------------------------------------------------- |
| 510 | |
| 511 | WRITE8_MEMBER(williams_narc_sound_device::slave_talkback_w) |
| 482 | 512 | { |
| 483 | | hc55516_clock_w(device, 1); |
| 513 | logerror("Slave Talkback = %02X\n", data); |
| 484 | 514 | } |
| 485 | 515 | |
| 486 | 516 | |
| 487 | | /*************************************************************************** |
| 488 | | CVSD COMMUNICATIONS |
| 489 | | ****************************************************************************/ |
| 517 | //------------------------------------------------- |
| 518 | // slave_sync_w - handle writes to the slave |
| 519 | // SYNC register |
| 520 | //------------------------------------------------- |
| 490 | 521 | |
| 491 | | static TIMER_CALLBACK( williams_cvsd_delayed_data_w ) |
| 522 | WRITE8_MEMBER(williams_narc_sound_device::slave_sync_w) |
| 492 | 523 | { |
| 493 | | pia6821_device *pia = machine.device<pia6821_device>("cvsdpia"); |
| 494 | | pia->portb_w(param & 0xff); |
| 495 | | pia->cb1_w((param >> 8) & 1); |
| 496 | | pia->cb2_w((param >> 9) & 1); |
| 524 | timer_set(attotime::from_double(TIME_OF_74LS123(180000, 0.000001)), TID_SYNC_CLEAR, 0x02); |
| 525 | m_audio_sync |= 0x02; |
| 526 | logerror("Slave sync = %02X\n", data); |
| 497 | 527 | } |
| 498 | 528 | |
| 499 | 529 | |
| 500 | | void williams_cvsd_data_w(running_machine &machine, int data) |
| 530 | //------------------------------------------------- |
| 531 | // cvsd_digit_clock_clear_w - clear the clock on |
| 532 | // the HC55516 and clock the data |
| 533 | //------------------------------------------------- |
| 534 | |
| 535 | WRITE8_MEMBER(williams_narc_sound_device::cvsd_digit_clock_clear_w) |
| 501 | 536 | { |
| 502 | | machine.scheduler().synchronize(FUNC(williams_cvsd_delayed_data_w), data); |
| 537 | hc55516_digit_w(m_hc55516, data); |
| 538 | hc55516_clock_w(m_hc55516, 0); |
| 503 | 539 | } |
| 504 | 540 | |
| 505 | 541 | |
| 506 | | void williams_cvsd_reset_w(running_machine &machine, int state) |
| 542 | //------------------------------------------------- |
| 543 | // cvsd_clock_set_w - set the clock on the HC55516 |
| 544 | //------------------------------------------------- |
| 545 | |
| 546 | WRITE8_MEMBER(williams_narc_sound_device::cvsd_clock_set_w) |
| 507 | 547 | { |
| 508 | | williams_audio_state *sndstate = &audio; |
| 509 | | address_space *space = sndstate->sound_cpu->memory().space(AS_PROGRAM); |
| 510 | | |
| 511 | | /* going high halts the CPU */ |
| 512 | | if (state) |
| 513 | | { |
| 514 | | cvsd_bank_select_w(space, 0, 0); |
| 515 | | init_audio_state(space->machine()); |
| 516 | | device_set_input_line(&space->device(), INPUT_LINE_RESET, ASSERT_LINE); |
| 517 | | } |
| 518 | | /* going low resets and reactivates the CPU */ |
| 519 | | else |
| 520 | | device_set_input_line(&space->device(), INPUT_LINE_RESET, CLEAR_LINE); |
| 548 | hc55516_clock_w(m_hc55516, 1); |
| 521 | 549 | } |
| 522 | 550 | |
| 523 | 551 | |
| 552 | //------------------------------------------------- |
| 553 | // ym2151_irq_w - handle line changes on the |
| 554 | // YM2151 IRQ line |
| 555 | //------------------------------------------------- |
| 524 | 556 | |
| 525 | | /*************************************************************************** |
| 526 | | NARC READ/WRITE HANDLERS |
| 527 | | ****************************************************************************/ |
| 528 | | |
| 529 | | static WRITE8_HANDLER( narc_master_bank_select_w ) |
| 557 | WRITE_LINE_MEMBER(williams_narc_sound_device::ym2151_irq_w) |
| 530 | 558 | { |
| 531 | | memory_set_bank(space->machine(), "bank5", data & 0x0f); |
| 559 | m_cpu0->set_input_line(M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); |
| 532 | 560 | } |
| 533 | 561 | |
| 534 | 562 | |
| 535 | | static WRITE8_HANDLER( narc_slave_bank_select_w ) |
| 536 | | { |
| 537 | | memory_set_bank(space->machine(), "bank7", data & 0x0f); |
| 538 | | } |
| 563 | //------------------------------------------------- |
| 564 | // master CPU map |
| 565 | //------------------------------------------------- |
| 539 | 566 | |
| 567 | static ADDRESS_MAP_START( williams_narc_master_map, AS_PROGRAM, 8, williams_narc_sound_device ) |
| 568 | AM_RANGE(0x0000, 0x1fff) AM_RAM |
| 569 | AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x03fe) AM_DEVREADWRITE_LEGACY("ym2151", ym2151_r, ym2151_w) |
| 570 | AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_WRITE(master_talkback_w) |
| 571 | AM_RANGE(0x2c00, 0x2c00) AM_MIRROR(0x03ff) AM_WRITE(command2_w) |
| 572 | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE_LEGACY("dac1", dac_w) |
| 573 | AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_READ(command_r) |
| 574 | AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x03ff) AM_WRITE(master_bank_select_w) |
| 575 | AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE(master_sync_w) |
| 576 | AM_RANGE(0x4000, 0xbfff) AM_ROMBANK("masterbank") |
| 577 | AM_RANGE(0xc000, 0xffff) AM_ROMBANK("masterupper") |
| 578 | ADDRESS_MAP_END |
| 540 | 579 | |
| 541 | | static READ8_HANDLER( narc_command_r ) |
| 542 | | { |
| 543 | | williams_audio_state *state = &audio; |
| 544 | | driver_device *drvstate = space->machine().driver_data<driver_device>(); |
| 545 | | device_set_input_line(state->sound_cpu, M6809_IRQ_LINE, CLEAR_LINE); |
| 546 | | state->sound_int_state = 0; |
| 547 | | return drvstate->soundlatch_byte_r(*space, 0); |
| 548 | | } |
| 549 | 580 | |
| 581 | //------------------------------------------------- |
| 582 | // slave CPU map |
| 583 | //------------------------------------------------- |
| 550 | 584 | |
| 551 | | static WRITE8_HANDLER( narc_command2_w ) |
| 552 | | { |
| 553 | | williams_audio_state *state = &audio; |
| 554 | | driver_device *drvstate = space->machine().driver_data<driver_device>(); |
| 555 | | drvstate->soundlatch2_byte_w(*space, 0, data & 0xff); |
| 556 | | device_set_input_line(state->soundalt_cpu, M6809_FIRQ_LINE, ASSERT_LINE); |
| 557 | | } |
| 585 | static ADDRESS_MAP_START( williams_narc_slave_map, AS_PROGRAM, 8, williams_narc_sound_device ) |
| 586 | AM_RANGE(0x0000, 0x1fff) AM_RAM |
| 587 | AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x03ff) AM_WRITE(cvsd_clock_set_w) |
| 588 | AM_RANGE(0x2400, 0x2400) AM_MIRROR(0x03ff) AM_WRITE(cvsd_digit_clock_clear_w) |
| 589 | AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_WRITE(slave_talkback_w) |
| 590 | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE_LEGACY("dac2", dac_w) |
| 591 | AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_READ(command2_r) |
| 592 | AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x03ff) AM_WRITE(slave_bank_select_w) |
| 593 | AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE(slave_sync_w) |
| 594 | AM_RANGE(0x4000, 0xbfff) AM_ROMBANK("slavebank") |
| 595 | AM_RANGE(0xc000, 0xffff) AM_ROMBANK("slaveupper") |
| 596 | ADDRESS_MAP_END |
| 558 | 597 | |
| 559 | 598 | |
| 560 | | static READ8_HANDLER( narc_command2_r ) |
| 599 | //------------------------------------------------- |
| 600 | // YM2151 configuration |
| 601 | //------------------------------------------------- |
| 602 | |
| 603 | static const ym2151_interface narc_ym2151_interface = |
| 561 | 604 | { |
| 562 | | williams_audio_state *state = &audio; |
| 563 | | driver_device *drvstate = space->machine().driver_data<driver_device>(); |
| 564 | | device_set_input_line(state->soundalt_cpu, M6809_FIRQ_LINE, CLEAR_LINE); |
| 565 | | return drvstate->soundlatch2_byte_r(*space, 0); |
| 566 | | } |
| 605 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, williams_narc_sound_device, ym2151_irq_w) |
| 606 | }; |
| 567 | 607 | |
| 568 | 608 | |
| 569 | | static WRITE8_HANDLER( narc_master_talkback_w ) |
| 570 | | { |
| 571 | | williams_audio_state *state = &audio; |
| 609 | //------------------------------------------------- |
| 610 | // machine configuration |
| 611 | //------------------------------------------------- |
| 572 | 612 | |
| 573 | | state->audio_talkback = data; |
| 574 | | logerror("Master Talkback = %02X\n", data); |
| 575 | | } |
| 613 | static MACHINE_CONFIG_FRAGMENT( williams_narc_sound ) |
| 614 | MCFG_CPU_ADD("cpu0", M6809E, NARC_MASTER_CLOCK) |
| 615 | MCFG_CPU_PROGRAM_MAP(williams_narc_master_map) |
| 576 | 616 | |
| 617 | MCFG_CPU_ADD("cpu1", M6809E, NARC_MASTER_CLOCK) |
| 618 | MCFG_CPU_PROGRAM_MAP(williams_narc_slave_map) |
| 577 | 619 | |
| 578 | | static TIMER_CALLBACK( narc_sync_clear ) |
| 579 | | { |
| 580 | | williams_audio_state *state = &audio; |
| 620 | MCFG_SOUND_ADD("ym2151", YM2151, NARC_FM_CLOCK) |
| 621 | MCFG_SOUND_CONFIG(narc_ym2151_interface) |
| 622 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10) |
| 581 | 623 | |
| 582 | | state->audio_sync &= ~param; |
| 583 | | } |
| 624 | MCFG_SOUND_ADD("dac1", DAC, 0) |
| 625 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50) |
| 584 | 626 | |
| 585 | | static WRITE8_HANDLER( narc_master_sync_w ) |
| 586 | | { |
| 587 | | williams_audio_state *state = &audio; |
| 627 | MCFG_SOUND_ADD("dac2", DAC, 0) |
| 628 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50) |
| 588 | 629 | |
| 589 | | space->machine().scheduler().timer_set(attotime::from_double(TIME_OF_74LS123(180000, 0.000001)), FUNC(narc_sync_clear), 0x01); |
| 590 | | state->audio_sync |= 0x01; |
| 591 | | logerror("Master sync = %02X\n", data); |
| 592 | | } |
| 630 | MCFG_SOUND_ADD("cvsd", HC55516, 0) |
| 631 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60) |
| 632 | MACHINE_CONFIG_END |
| 593 | 633 | |
| 594 | 634 | |
| 595 | | static WRITE8_HANDLER( narc_slave_talkback_w ) |
| 635 | //------------------------------------------------- |
| 636 | // device_mconfig_additions - return a pointer to |
| 637 | // the device's machine fragment |
| 638 | //------------------------------------------------- |
| 639 | |
| 640 | machine_config_constructor williams_narc_sound_device::device_mconfig_additions() const |
| 596 | 641 | { |
| 597 | | logerror("Slave Talkback = %02X\n", data); |
| 642 | return MACHINE_CONFIG_NAME( williams_narc_sound ); |
| 598 | 643 | } |
| 599 | 644 | |
| 600 | 645 | |
| 601 | | static WRITE8_HANDLER( narc_slave_sync_w ) |
| 646 | //------------------------------------------------- |
| 647 | // device_start - device-specific startup |
| 648 | //------------------------------------------------- |
| 649 | |
| 650 | void williams_narc_sound_device::device_start() |
| 602 | 651 | { |
| 603 | | williams_audio_state *state = &audio; |
| 652 | // configure master CPU banks |
| 653 | UINT8 *rom = subregion("cpu0")->base(); |
| 654 | for (int bank = 0; bank < 16; bank++) |
| 655 | { |
| 656 | // |
| 657 | // D0 -> A15 |
| 658 | // D1/D2 -> selects: 0=n/c 1=U3 2=U4 3=U5 |
| 659 | // D3 -> A16 |
| 660 | // |
| 661 | offs_t offset = 0x8000 * (bank & 1) + 0x10000 * ((bank >> 3) & 1) + 0x20000 * ((bank >> 1) & 3); |
| 662 | subbank("masterbank")->configure_entry(bank, &rom[0x10000 + offset]); |
| 663 | } |
| 664 | subbank("masterupper")->set_base(&rom[0x10000 + 0x4000 + 0x8000 + 0x10000 + 0x20000 * 3]); |
| 604 | 665 | |
| 605 | | space->machine().scheduler().timer_set(attotime::from_double(TIME_OF_74LS123(180000, 0.000001)), FUNC(narc_sync_clear), 0x02); |
| 606 | | state->audio_sync |= 0x02; |
| 607 | | logerror("Slave sync = %02X\n", data); |
| 666 | // configure slave CPU banks |
| 667 | rom = subregion("cpu1")->base(); |
| 668 | for (int bank = 0; bank < 16; bank++) |
| 669 | { |
| 670 | // |
| 671 | // D0 -> A15 |
| 672 | // D1/D2 -> selects: 0=U35 1=U36 2=U37 3=U38 |
| 673 | // D3 -> A16 |
| 674 | // |
| 675 | offs_t offset = 0x8000 * (bank & 1) + 0x10000 * ((bank >> 3) & 1) + 0x20000 * ((bank >> 1) & 3); |
| 676 | subbank("slavebank")->configure_entry(bank, &rom[0x10000 + offset]); |
| 677 | } |
| 678 | subbank("slaveupper")->set_base(&rom[0x10000 + 0x4000 + 0x8000 + 0x10000 + 0x20000 * 3]); |
| 679 | |
| 680 | // register for save states |
| 681 | save_item(NAME(m_latch)); |
| 682 | save_item(NAME(m_latch2)); |
| 683 | save_item(NAME(m_talkback)); |
| 684 | save_item(NAME(m_audio_sync)); |
| 685 | save_item(NAME(m_sound_int_state)); |
| 608 | 686 | } |
| 609 | 687 | |
| 610 | 688 | |
| 689 | //------------------------------------------------- |
| 690 | // device_reset - device-specific reset |
| 691 | //------------------------------------------------- |
| 611 | 692 | |
| 612 | | /*************************************************************************** |
| 613 | | NARC COMMUNICATIONS |
| 614 | | ****************************************************************************/ |
| 693 | void williams_narc_sound_device::device_reset() |
| 694 | { |
| 695 | // reset interrupt states |
| 696 | m_sound_int_state = 0; |
| 697 | m_cpu0->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); |
| 698 | m_cpu0->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); |
| 699 | m_cpu0->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); |
| 700 | m_cpu1->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); |
| 701 | m_cpu1->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); |
| 702 | m_cpu1->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); |
| 703 | } |
| 615 | 704 | |
| 616 | | void williams_narc_data_w(running_machine &machine, int data) |
| 705 | |
| 706 | //------------------------------------------------- |
| 707 | // device_timer - timer callbacks |
| 708 | //------------------------------------------------- |
| 709 | |
| 710 | void williams_narc_sound_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 617 | 711 | { |
| 618 | | williams_audio_state *state = &audio; |
| 619 | | device_t *sound_cpu = state->sound_cpu; |
| 620 | | address_space *space = sound_cpu->memory().space(AS_PROGRAM); |
| 621 | | driver_device *drvstate = space->machine().driver_data<driver_device>(); |
| 622 | | drvstate->soundlatch_byte_w(*space, 0, data & 0xff); |
| 623 | | device_set_input_line(sound_cpu, INPUT_LINE_NMI, (data & 0x100) ? CLEAR_LINE : ASSERT_LINE); |
| 624 | | if (!(data & 0x200)) |
| 712 | switch (id) |
| 625 | 713 | { |
| 626 | | device_set_input_line(sound_cpu, M6809_IRQ_LINE, ASSERT_LINE); |
| 627 | | state->sound_int_state = 1; |
| 714 | case TID_MASTER_COMMAND: |
| 715 | m_latch = param & 0xff; |
| 716 | m_cpu0->set_input_line(INPUT_LINE_NMI, (param & 0x100) ? CLEAR_LINE : ASSERT_LINE); |
| 717 | if ((param & 0x200) == 0) |
| 718 | { |
| 719 | m_cpu0->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); |
| 720 | m_sound_int_state = 1; |
| 721 | } |
| 722 | break; |
| 723 | |
| 724 | case TID_SLAVE_COMMAND: |
| 725 | m_latch2 = param & 0xff; |
| 726 | m_cpu1->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); |
| 727 | break; |
| 728 | |
| 729 | case TID_SYNC_CLEAR: |
| 730 | m_audio_sync &= ~param; |
| 731 | break; |
| 628 | 732 | } |
| 629 | 733 | } |
| 630 | 734 | |
| 631 | 735 | |
| 632 | | void williams_narc_reset_w(running_machine &machine, int state) |
| 736 | //************************************************************************** |
| 737 | // ADPCM SOUND BOARD |
| 738 | //************************************************************************** |
| 739 | |
| 740 | //------------------------------------------------- |
| 741 | // williams_adpcm_sound_device - constructor |
| 742 | //------------------------------------------------- |
| 743 | |
| 744 | williams_adpcm_sound_device::williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 745 | : device_t(mconfig, WILLIAMS_ADPCM_SOUND, "Williams ADPCM Sound Board", "wmsadpcm", tag, owner, clock), |
| 746 | device_mixer_interface(mconfig, *this), |
| 747 | m_cpu(*this, "cpu"), |
| 748 | m_latch(0), |
| 749 | m_talkback(0), |
| 750 | m_sound_int_state(0) |
| 633 | 751 | { |
| 634 | | williams_audio_state *sndstate = &audio; |
| 635 | | device_t *sound_cpu = sndstate->sound_cpu; |
| 636 | | device_t *soundalt_cpu = sndstate->soundalt_cpu; |
| 752 | } |
| 637 | 753 | |
| 638 | | /* going high halts the CPU */ |
| 754 | |
| 755 | //------------------------------------------------- |
| 756 | // write - handle an external write to the input |
| 757 | // latch |
| 758 | //------------------------------------------------- |
| 759 | |
| 760 | WRITE16_MEMBER(williams_adpcm_sound_device::write) |
| 761 | { |
| 762 | synchronize(TID_COMMAND, data); |
| 763 | } |
| 764 | |
| 765 | |
| 766 | //------------------------------------------------- |
| 767 | // reset_write - write to the reset line |
| 768 | //------------------------------------------------- |
| 769 | |
| 770 | WRITE_LINE_MEMBER(williams_adpcm_sound_device::reset_write) |
| 771 | { |
| 772 | // going high halts the CPU |
| 639 | 773 | if (state) |
| 640 | 774 | { |
| 641 | | address_space *space = sound_cpu->memory().space(AS_PROGRAM); |
| 642 | | narc_master_bank_select_w(space, 0, 0); |
| 643 | | narc_slave_bank_select_w(space, 0, 0); |
| 644 | | init_audio_state(space->machine()); |
| 645 | | device_set_input_line(sound_cpu, INPUT_LINE_RESET, ASSERT_LINE); |
| 646 | | device_set_input_line(soundalt_cpu, INPUT_LINE_RESET, ASSERT_LINE); |
| 775 | bank_select_w(*m_cpu->space(), 0, 0); |
| 776 | device_reset(); |
| 777 | m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 647 | 778 | } |
| 648 | | /* going low resets and reactivates the CPU */ |
| 779 | |
| 780 | // going low resets and reactivates the CPU |
| 649 | 781 | else |
| 650 | | { |
| 651 | | device_set_input_line(sound_cpu, INPUT_LINE_RESET, CLEAR_LINE); |
| 652 | | device_set_input_line(soundalt_cpu, INPUT_LINE_RESET, CLEAR_LINE); |
| 653 | | } |
| 782 | m_cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 654 | 783 | } |
| 655 | 784 | |
| 656 | 785 | |
| 657 | | int williams_narc_talkback_r(running_machine &machine) |
| 786 | //------------------------------------------------- |
| 787 | // irq_read - read the sound IRQ state |
| 788 | //------------------------------------------------- |
| 789 | |
| 790 | READ_LINE_MEMBER(williams_adpcm_sound_device::irq_read) |
| 658 | 791 | { |
| 659 | | williams_audio_state *state = &audio; |
| 660 | | |
| 661 | | return state->audio_talkback | (state->audio_sync << 8); |
| 792 | return m_sound_int_state; |
| 662 | 793 | } |
| 663 | 794 | |
| 664 | 795 | |
| 796 | //------------------------------------------------- |
| 797 | // bank_select_w - select the sound CPU memory |
| 798 | // bank |
| 799 | //------------------------------------------------- |
| 665 | 800 | |
| 666 | | /*************************************************************************** |
| 667 | | ADPCM READ/WRITE HANDLERS |
| 668 | | ****************************************************************************/ |
| 669 | | |
| 670 | | static WRITE8_HANDLER( adpcm_bank_select_w ) |
| 801 | WRITE8_MEMBER(williams_adpcm_sound_device::bank_select_w) |
| 671 | 802 | { |
| 672 | | memory_set_bank(space->machine(), "bank5", data & 0x07); |
| 803 | subbank("rombank")->set_entry(data & 0x07); |
| 673 | 804 | } |
| 674 | 805 | |
| 675 | 806 | |
| 676 | | static WRITE8_DEVICE_HANDLER( adpcm_6295_bank_select_w ) |
| 807 | //------------------------------------------------- |
| 808 | // bank_select_w - select the OKI6295 memory |
| 809 | // bank |
| 810 | //------------------------------------------------- |
| 811 | |
| 812 | WRITE8_MEMBER(williams_adpcm_sound_device::oki6295_bank_select_w) |
| 677 | 813 | { |
| 678 | | downcast<okim6295_device *>(device)->set_bank_base((data & 7) * 0x40000); |
| 814 | subbank("okibank")->set_entry(data & 7); |
| 679 | 815 | } |
| 680 | 816 | |
| 681 | 817 | |
| 682 | | static TIMER_CALLBACK( clear_irq_state ) |
| 818 | //------------------------------------------------- |
| 819 | // command_r - read the command from the external |
| 820 | // latch |
| 821 | //------------------------------------------------- |
| 822 | |
| 823 | READ8_MEMBER(williams_adpcm_sound_device::command_r) |
| 683 | 824 | { |
| 684 | | williams_audio_state *state = &audio; |
| 825 | m_cpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); |
| 685 | 826 | |
| 686 | | state->sound_int_state = 0; |
| 827 | // don't clear the external IRQ state for a short while; this allows the |
| 828 | // self-tests to pass |
| 829 | timer_set(attotime::from_usec(10), TID_IRQ_CLEAR); |
| 830 | return m_latch; |
| 687 | 831 | } |
| 688 | 832 | |
| 689 | 833 | |
| 690 | | static READ8_HANDLER( adpcm_command_r ) |
| 834 | //------------------------------------------------- |
| 835 | // talkback_w - write to the talkback latch |
| 836 | //------------------------------------------------- |
| 837 | |
| 838 | WRITE8_MEMBER(williams_adpcm_sound_device::talkback_w) |
| 691 | 839 | { |
| 692 | | williams_audio_state *state = &audio; |
| 693 | | device_t *sound_cpu = state->sound_cpu; |
| 694 | | device_set_input_line(sound_cpu, M6809_IRQ_LINE, CLEAR_LINE); |
| 695 | | |
| 696 | | /* don't clear the external IRQ state for a short while; this allows the |
| 697 | | self-tests to pass */ |
| 698 | | space->machine().scheduler().timer_set(attotime::from_usec(10), FUNC(clear_irq_state)); |
| 699 | | driver_device *drvstate = space->machine().driver_data<driver_device>(); |
| 700 | | return drvstate->soundlatch_byte_r(*space, 0); |
| 840 | m_talkback = data; |
| 841 | logerror("ADPCM Talkback = %02X\n", data); |
| 701 | 842 | } |
| 702 | 843 | |
| 703 | 844 | |
| 704 | | static WRITE8_HANDLER( adpcm_talkback_w ) |
| 845 | //------------------------------------------------- |
| 846 | // talkback_w - write to the talkback latch |
| 847 | //------------------------------------------------- |
| 848 | |
| 849 | WRITE_LINE_MEMBER(williams_adpcm_sound_device::ym2151_irq_w) |
| 705 | 850 | { |
| 706 | | williams_audio_state *state = &audio; |
| 707 | | state->audio_talkback = data; |
| 708 | | logerror("ADPCM Talkback = %02X\n", data); |
| 851 | m_cpu->set_input_line(M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); |
| 709 | 852 | } |
| 710 | 853 | |
| 711 | 854 | |
| 855 | //------------------------------------------------- |
| 856 | // audio CPU map |
| 857 | //------------------------------------------------- |
| 712 | 858 | |
| 713 | | /*************************************************************************** |
| 714 | | ADPCM COMMUNICATIONS |
| 715 | | ****************************************************************************/ |
| 859 | static ADDRESS_MAP_START( williams_adpcm_map, AS_PROGRAM, 8, williams_adpcm_sound_device ) |
| 860 | AM_RANGE(0x0000, 0x1fff) AM_RAM |
| 861 | AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x03ff) AM_WRITE(bank_select_w) |
| 862 | AM_RANGE(0x2400, 0x2401) AM_MIRROR(0x03fe) AM_DEVREADWRITE_LEGACY("ym2151", ym2151_r, ym2151_w) |
| 863 | AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_DEVWRITE_LEGACY("dac", dac_w) |
| 864 | AM_RANGE(0x2c00, 0x2c00) AM_MIRROR(0x03ff) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 865 | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_READ(command_r) |
| 866 | AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_WRITE(oki6295_bank_select_w) |
| 867 | AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE(talkback_w) |
| 868 | AM_RANGE(0x4000, 0xbfff) AM_ROMBANK("rombank") |
| 869 | AM_RANGE(0xc000, 0xffff) AM_ROMBANK("romupper") |
| 870 | ADDRESS_MAP_END |
| 716 | 871 | |
| 717 | | void williams_adpcm_data_w(running_machine &machine, int data) |
| 872 | |
| 873 | //------------------------------------------------- |
| 874 | // OKI6295 map |
| 875 | //------------------------------------------------- |
| 876 | |
| 877 | static ADDRESS_MAP_START( williams_adpcm_oki_map, AS_0, 8, williams_adpcm_sound_device ) |
| 878 | AM_RANGE(0x00000, 0x1ffff) AM_ROMBANK("okibank") |
| 879 | AM_RANGE(0x20000, 0x3ffff) AM_ROM AM_REGION("oki", 0x60000) |
| 880 | ADDRESS_MAP_END |
| 881 | |
| 882 | |
| 883 | //------------------------------------------------- |
| 884 | // YM2151 configuration |
| 885 | //------------------------------------------------- |
| 886 | |
| 887 | static const ym2151_interface adpcm_ym2151_interface = |
| 718 | 888 | { |
| 719 | | williams_audio_state *state = &audio; |
| 720 | | device_t *sound_cpu = state->sound_cpu; |
| 721 | | address_space *space = sound_cpu->memory().space(AS_PROGRAM); |
| 722 | | driver_device *drvstate = space->machine().driver_data<driver_device>(); |
| 723 | | drvstate->soundlatch_byte_w(*space, 0, data & 0xff); |
| 724 | | if (!(data & 0x200)) |
| 725 | | { |
| 726 | | device_set_input_line(sound_cpu, M6809_IRQ_LINE, ASSERT_LINE); |
| 727 | | state->sound_int_state = 1; |
| 728 | | space->machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 729 | | } |
| 889 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, williams_adpcm_sound_device, ym2151_irq_w) |
| 890 | }; |
| 891 | |
| 892 | |
| 893 | //------------------------------------------------- |
| 894 | // machine configuration |
| 895 | //------------------------------------------------- |
| 896 | |
| 897 | static MACHINE_CONFIG_FRAGMENT( williams_adpcm_sound ) |
| 898 | MCFG_CPU_ADD("cpu", M6809E, ADPCM_MASTER_CLOCK) |
| 899 | MCFG_CPU_PROGRAM_MAP(williams_adpcm_map) |
| 900 | |
| 901 | MCFG_SOUND_ADD("ym2151", YM2151, ADPCM_FM_CLOCK) |
| 902 | MCFG_SOUND_CONFIG(adpcm_ym2151_interface) |
| 903 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10) |
| 904 | |
| 905 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 906 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50) |
| 907 | |
| 908 | MCFG_OKIM6295_ADD("oki", ADPCM_MASTER_CLOCK/8, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified |
| 909 | MCFG_DEVICE_ADDRESS_MAP(AS_0, williams_adpcm_oki_map) |
| 910 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50) |
| 911 | MACHINE_CONFIG_END |
| 912 | |
| 913 | |
| 914 | //------------------------------------------------- |
| 915 | // device_mconfig_additions - return a pointer to |
| 916 | // the device's machine fragment |
| 917 | //------------------------------------------------- |
| 918 | |
| 919 | machine_config_constructor williams_adpcm_sound_device::device_mconfig_additions() const |
| 920 | { |
| 921 | return MACHINE_CONFIG_NAME( williams_adpcm_sound ); |
| 730 | 922 | } |
| 731 | 923 | |
| 732 | 924 | |
| 733 | | void williams_adpcm_reset_w(running_machine &machine, int state) |
| 925 | //------------------------------------------------- |
| 926 | // device_start - device-specific startup |
| 927 | //------------------------------------------------- |
| 928 | |
| 929 | void williams_adpcm_sound_device::device_start() |
| 734 | 930 | { |
| 735 | | williams_audio_state *sndstate = &audio; |
| 736 | | device_t *sound_cpu = sndstate->sound_cpu; |
| 931 | // configure banks |
| 932 | UINT8 *rom = subregion("cpu")->base(); |
| 933 | subbank("rombank")->configure_entries(0, 8, &rom[0x10000], 0x8000); |
| 934 | subbank("romupper")->set_base(&rom[0x10000 + 0x4000 + 7 * 0x8000]); |
| 737 | 935 | |
| 738 | | /* going high halts the CPU */ |
| 739 | | if (state) |
| 740 | | { |
| 741 | | address_space *space = sound_cpu->memory().space(AS_PROGRAM); |
| 742 | | adpcm_bank_select_w(space, 0, 0); |
| 743 | | init_audio_state(space->machine()); |
| 744 | | device_set_input_line(sound_cpu, INPUT_LINE_RESET, ASSERT_LINE); |
| 745 | | } |
| 746 | | /* going low resets and reactivates the CPU */ |
| 747 | | else |
| 748 | | device_set_input_line(sound_cpu, INPUT_LINE_RESET, CLEAR_LINE); |
| 936 | // expand ADPCM data |
| 937 | rom = subregion("oki")->base(); |
| 938 | // it is assumed that U12 is loaded @ 0x00000 and U13 is loaded @ 0x40000 |
| 939 | subbank("okibank")->configure_entry(0, &rom[0x40000]); |
| 940 | subbank("okibank")->configure_entry(1, &rom[0x40000]); |
| 941 | subbank("okibank")->configure_entry(2, &rom[0x20000]); |
| 942 | subbank("okibank")->configure_entry(3, &rom[0x00000]); |
| 943 | subbank("okibank")->configure_entry(4, &rom[0xe0000]); |
| 944 | subbank("okibank")->configure_entry(5, &rom[0xc0000]); |
| 945 | subbank("okibank")->configure_entry(6, &rom[0xa0000]); |
| 946 | subbank("okibank")->configure_entry(7, &rom[0x80000]); |
| 947 | |
| 948 | // register for save states |
| 949 | save_item(NAME(m_latch)); |
| 950 | save_item(NAME(m_talkback)); |
| 951 | save_item(NAME(m_sound_int_state)); |
| 749 | 952 | } |
| 750 | 953 | |
| 751 | 954 | |
| 752 | | int williams_adpcm_sound_irq_r(running_machine &machine) |
| 955 | //------------------------------------------------- |
| 956 | // device_reset - device-specific reset |
| 957 | //------------------------------------------------- |
| 958 | |
| 959 | void williams_adpcm_sound_device::device_reset() |
| 753 | 960 | { |
| 754 | | williams_audio_state *state = &audio; |
| 755 | | return state->sound_int_state; |
| 961 | // reset interrupt states |
| 962 | m_sound_int_state = 0; |
| 963 | m_cpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); |
| 964 | m_cpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); |
| 965 | m_cpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); |
| 756 | 966 | } |
| 967 | |
| 968 | |
| 969 | //------------------------------------------------- |
| 970 | // device_timer - timer callbacks |
| 971 | //------------------------------------------------- |
| 972 | |
| 973 | void williams_adpcm_sound_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 974 | { |
| 975 | switch (id) |
| 976 | { |
| 977 | case TID_COMMAND: |
| 978 | m_latch = param & 0xff; |
| 979 | if (!(param & 0x200)) |
| 980 | { |
| 981 | m_cpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); |
| 982 | m_sound_int_state = 1; |
| 983 | machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 984 | } |
| 985 | break; |
| 986 | |
| 987 | case TID_IRQ_CLEAR: |
| 988 | m_sound_int_state = 0; |
| 989 | break; |
| 990 | } |
| 991 | } |
src/mame/layout/bfm_sc4.lay
| r14963 | r14964 | |
| 1 | 1 | <?xml version="1.0"?>
|
| 2 | 2 | <mamelayout version="2">
|
| 3 | <element name="matrixlamp">
|
| 4 | <rect state ="0">
|
| 5 | <bounds x="0" y="0" width="7" height="7" />
|
| 6 | <color red="0.7" green="0.7" blue="0.7" />
|
| 7 | </rect>
|
| 8 | <rect state ="1">
|
| 9 | <bounds x="0" y="0" width="7" height="7" />
|
| 10 | <color red="0.0" green="0.0" blue="1.0" />
|
| 11 | </rect>
|
| 12 | <rect state ="2">
|
| 13 | <bounds x="0" y="0" width="7" height="7" />
|
| 14 | <color red="0.0" green="1.0" blue="0.0" />
|
| 15 | </rect>
|
| 16 | </element>
|
| 17 | <element name="Steppers" defstate="96">
|
| 18 | <text string="00" state="0">
|
| 19 | <color red="1.0" green="1.0" blue="1.0" />
|
| 20 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 21 | </text>
|
| 22 | <text string="01" state="1">
|
| 23 | <color red="1.0" green="1.0" blue="1.0" />
|
| 24 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 25 | </text>
|
| 26 | <text string="02" state="2">
|
| 27 | <color red="1.0" green="1.0" blue="1.0" />
|
| 28 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 29 | </text>
|
| 30 | <text string="03" state="3">
|
| 31 | <color red="1.0" green="1.0" blue="1.0" />
|
| 32 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 33 | </text>
|
| 34 | <text string="04" state="4">
|
| 35 | <color red="1.0" green="1.0" blue="1.0" />
|
| 36 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 37 | </text>
|
| 38 | <text string="05" state="5">
|
| 39 | <color red="1.0" green="1.0" blue="1.0" />
|
| 40 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 41 | </text>
|
| 42 | <text string="06" state="6">
|
| 43 | <color red="1.0" green="1.0" blue="1.0" />
|
| 44 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 45 | </text>
|
| 46 | <text string="07" state="7">
|
| 47 | <color red="1.0" green="1.0" blue="1.0" />
|
| 48 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 49 | </text>
|
| 50 | <text string="08" state="8">
|
| 51 | <color red="1.0" green="1.0" blue="1.0" />
|
| 52 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 53 | </text>
|
| 54 | <text string="09" state="9">
|
| 55 | <color red="1.0" green="1.0" blue="1.0" />
|
| 56 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 57 | </text>
|
| 58 | <text string="10" state="10">
|
| 59 | <color red="1.0" green="1.0" blue="1.0" />
|
| 60 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 61 | </text>
|
| 62 | <text string="11" state="11">
|
| 63 | <color red="1.0" green="1.0" blue="1.0" />
|
| 64 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 65 | </text>
|
| 66 | <text string="12" state="12">
|
| 67 | <color red="1.0" green="1.0" blue="1.0" />
|
| 68 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 69 | </text>
|
| 70 | <text string="13" state="13">
|
| 71 | <color red="1.0" green="1.0" blue="1.0" />
|
| 72 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 73 | </text>
|
| 74 | <text string="14" state="14">
|
| 75 | <color red="1.0" green="1.0" blue="1.0" />
|
| 76 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 77 | </text>
|
| 78 | <text string="15" state="15">
|
| 79 | <color red="1.0" green="1.0" blue="1.0" />
|
| 80 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 81 | </text>
|
| 82 | <text string="16" state="16">
|
| 83 | <color red="1.0" green="1.0" blue="1.0" />
|
| 84 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 85 | </text>
|
| 86 | <text string="17" state="17">
|
| 87 | <color red="1.0" green="1.0" blue="1.0" />
|
| 88 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 89 | </text>
|
| 90 | <text string="18" state="18">
|
| 91 | <color red="1.0" green="1.0" blue="1.0" />
|
| 92 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 93 | </text>
|
| 94 | <text string="19" state="19">
|
| 95 | <color red="1.0" green="1.0" blue="1.0" />
|
| 96 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 97 | </text>
|
| 98 | <text string="20" state="20">
|
| 99 | <color red="1.0" green="1.0" blue="1.0" />
|
| 100 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 101 | </text>
|
| 102 | <text string="21" state="21">
|
| 103 | <color red="1.0" green="1.0" blue="1.0" />
|
| 104 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 105 | </text>
|
| 106 | <text string="22" state="22">
|
| 107 | <color red="1.0" green="1.0" blue="1.0" />
|
| 108 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 109 | </text>
|
| 110 | <text string="23" state="23">
|
| 111 | <color red="1.0" green="1.0" blue="1.0" />
|
| 112 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 113 | </text>
|
| 114 | <text string="24" state="24">
|
| 115 | <color red="1.0" green="1.0" blue="1.0" />
|
| 116 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 117 | </text>
|
| 118 | <text string="25" state="25">
|
| 119 | <color red="1.0" green="1.0" blue="1.0" />
|
| 120 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 121 | </text>
|
| 122 | |
| 123 | <text string="26" state="26">
|
| 124 | <color red="1.0" green="1.0" blue="1.0" />
|
| 125 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 126 | </text>
|
| 127 | <text string="27" state="27">
|
| 128 | <color red="1.0" green="1.0" blue="1.0" />
|
| 129 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 130 | </text>
|
| 131 | <text string="28" state="28">
|
| 132 | <color red="1.0" green="1.0" blue="1.0" />
|
| 133 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 134 | </text>
|
| 135 | <text string="29" state="29">
|
| 136 | <color red="1.0" green="1.0" blue="1.0" />
|
| 137 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 138 | </text>
|
| 139 | <text string="30" state="30">
|
| 140 | <color red="1.0" green="1.0" blue="1.0" />
|
| 141 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 142 | </text>
|
| 143 | <text string="31" state="31">
|
| 144 | <color red="1.0" green="1.0" blue="1.0" />
|
| 145 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 146 | </text>
|
| 147 | <text string="32" state="32">
|
| 148 | <color red="1.0" green="1.0" blue="1.0" />
|
| 149 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 150 | </text>
|
| 151 | <text string="33" state="33">
|
| 152 | <color red="1.0" green="1.0" blue="1.0" />
|
| 153 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 154 | </text>
|
| 155 | <text string="34" state="34">
|
| 156 | <color red="1.0" green="1.0" blue="1.0" />
|
| 157 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 158 | </text>
|
| 159 | <text string="35" state="35">
|
| 160 | <color red="1.0" green="1.0" blue="1.0" />
|
| 161 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 162 | </text>
|
| 163 | <text string="36" state="36">
|
| 164 | <color red="1.0" green="1.0" blue="1.0" />
|
| 165 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 166 | </text>
|
| 167 | <text string="37" state="37">
|
| 168 | <color red="1.0" green="1.0" blue="1.0" />
|
| 169 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 170 | </text>
|
| 171 | <text string="38" state="38">
|
| 172 | <color red="1.0" green="1.0" blue="1.0" />
|
| 173 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 174 | </text>
|
| 175 | <text string="39" state="39">
|
| 176 | <color red="1.0" green="1.0" blue="1.0" />
|
| 177 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 178 | </text>
|
| 179 | <text string="40" state="40">
|
| 180 | <color red="1.0" green="1.0" blue="1.0" />
|
| 181 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 182 | </text>
|
| 183 | <text string="41" state="41">
|
| 184 | <color red="1.0" green="1.0" blue="1.0" />
|
| 185 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 186 | </text>
|
| 187 | <text string="42" state="42">
|
| 188 | <color red="1.0" green="1.0" blue="1.0" />
|
| 189 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 190 | </text>
|
| 191 | <text string="43" state="43">
|
| 192 | <color red="1.0" green="1.0" blue="1.0" />
|
| 193 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 194 | </text>
|
| 195 | <text string="44" state="44">
|
| 196 | <color red="1.0" green="1.0" blue="1.0" />
|
| 197 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 198 | </text>
|
| 199 | <text string="45" state="45">
|
| 200 | <color red="1.0" green="1.0" blue="1.0" />
|
| 201 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 202 | </text>
|
| 203 | <text string="46" state="46">
|
| 204 | <color red="1.0" green="1.0" blue="1.0" />
|
| 205 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 206 | </text>
|
| 207 | <text string="47" state="47">
|
| 208 | <color red="1.0" green="1.0" blue="1.0" />
|
| 209 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 210 | </text>
|
| 211 | <text string="48" state="48">
|
| 212 | <color red="1.0" green="1.0" blue="1.0" />
|
| 213 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 214 | </text>
|
| 215 | <text string="49" state="49">
|
| 216 | <color red="1.0" green="1.0" blue="1.0" />
|
| 217 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 218 | </text>
|
| 219 | <text string="50" state="50">
|
| 220 | <color red="1.0" green="1.0" blue="1.0" />
|
| 221 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 222 | </text>
|
| 223 | <text string="51" state="51">
|
| 224 | <color red="1.0" green="1.0" blue="1.0" />
|
| 225 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 226 | </text>
|
| 227 | <text string="52" state="52">
|
| 228 | <color red="1.0" green="1.0" blue="1.0" />
|
| 229 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 230 | </text>
|
| 231 | <text string="53" state="53">
|
| 232 | <color red="1.0" green="1.0" blue="1.0" />
|
| 233 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 234 | </text>
|
| 235 | <text string="54" state="54">
|
| 236 | <color red="1.0" green="1.0" blue="1.0" />
|
| 237 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 238 | </text>
|
| 239 | <text string="55" state="55">
|
| 240 | <color red="1.0" green="1.0" blue="1.0" />
|
| 241 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 242 | </text>
|
| 243 | <text string="56" state="56">
|
| 244 | <color red="1.0" green="1.0" blue="1.0" />
|
| 245 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 246 | </text>
|
| 247 | <text string="57" state="57">
|
| 248 | <color red="1.0" green="1.0" blue="1.0" />
|
| 249 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 250 | </text>
|
| 251 | <text string="58" state="58">
|
| 252 | <color red="1.0" green="1.0" blue="1.0" />
|
| 253 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 254 | </text>
|
| 255 | <text string="59" state="59">
|
| 256 | <color red="1.0" green="1.0" blue="1.0" />
|
| 257 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 258 | </text>
|
| 259 | <text string="60" state="60">
|
| 260 | <color red="1.0" green="1.0" blue="1.0" />
|
| 261 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 262 | </text>
|
| 263 | <text string="61" state="61">
|
| 264 | <color red="1.0" green="1.0" blue="1.0" />
|
| 265 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 266 | </text>
|
| 267 | <text string="62" state="62">
|
| 268 | <color red="1.0" green="1.0" blue="1.0" />
|
| 269 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 270 | </text>
|
| 271 | <text string="63" state="63">
|
| 272 | <color red="1.0" green="1.0" blue="1.0" />
|
| 273 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 274 | </text>
|
| 275 | <text string="64" state="64">
|
| 276 | <color red="1.0" green="1.0" blue="1.0" />
|
| 277 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 278 | </text>
|
| 279 | <text string="65" state="65">
|
| 280 | <color red="1.0" green="1.0" blue="1.0" />
|
| 281 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 282 | </text>
|
| 283 | <text string="66" state="66">
|
| 284 | <color red="1.0" green="1.0" blue="1.0" />
|
| 285 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 286 | </text>
|
| 287 | <text string="67" state="67">
|
| 288 | <color red="1.0" green="1.0" blue="1.0" />
|
| 289 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 290 | </text>
|
| 291 | <text string="68" state="68">
|
| 292 | <color red="1.0" green="1.0" blue="1.0" />
|
| 293 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 294 | </text>
|
| 295 | <text string="69" state="69">
|
| 296 | <color red="1.0" green="1.0" blue="1.0" />
|
| 297 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 298 | </text>
|
| 299 | <text string="70" state="70">
|
| 300 | <color red="1.0" green="1.0" blue="1.0" />
|
| 301 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 302 | </text>
|
| 303 | <text string="71" state="71">
|
| 304 | <color red="1.0" green="1.0" blue="1.0" />
|
| 305 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 306 | </text>
|
| 307 | <text string="72" state="72">
|
| 308 | <color red="1.0" green="1.0" blue="1.0" />
|
| 309 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 310 | </text>
|
| 311 | <text string="73" state="73">
|
| 312 | <color red="1.0" green="1.0" blue="1.0" />
|
| 313 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 314 | </text>
|
| 315 | <text string="74" state="74">
|
| 316 | <color red="1.0" green="1.0" blue="1.0" />
|
| 317 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 318 | </text>
|
| 319 | <text string="75" state="75">
|
| 320 | <color red="1.0" green="1.0" blue="1.0" />
|
| 321 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 322 | </text>
|
| 323 | <text string="76" state="76">
|
| 324 | <color red="1.0" green="1.0" blue="1.0" />
|
| 325 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 326 | </text>
|
| 327 | <text string="77" state="77">
|
| 328 | <color red="1.0" green="1.0" blue="1.0" />
|
| 329 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 330 | </text>
|
| 331 | <text string="78" state="78">
|
| 332 | <color red="1.0" green="1.0" blue="1.0" />
|
| 333 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 334 | </text>
|
| 335 | <text string="79" state="79">
|
| 336 | <color red="1.0" green="1.0" blue="1.0" />
|
| 337 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 338 | </text>
|
| 339 | <text string="80" state="80">
|
| 340 | <color red="1.0" green="1.0" blue="1.0" />
|
| 341 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 342 | </text>
|
| 343 | <text string="81" state="81">
|
| 344 | <color red="1.0" green="1.0" blue="1.0" />
|
| 345 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 346 | </text>
|
| 347 | <text string="82" state="82">
|
| 348 | <color red="1.0" green="1.0" blue="1.0" />
|
| 349 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 350 | </text>
|
| 351 | <text string="83" state="83">
|
| 352 | <color red="1.0" green="1.0" blue="1.0" />
|
| 353 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 354 | </text>
|
| 355 | <text string="84" state="84">
|
| 356 | <color red="1.0" green="1.0" blue="1.0" />
|
| 357 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 358 | </text>
|
| 359 | <text string="85" state="85">
|
| 360 | <color red="1.0" green="1.0" blue="1.0" />
|
| 361 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 362 | </text>
|
| 363 | <text string="86" state="86">
|
| 364 | <color red="1.0" green="1.0" blue="1.0" />
|
| 365 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 366 | </text>
|
| 367 | <text string="87" state="87">
|
| 368 | <color red="1.0" green="1.0" blue="1.0" />
|
| 369 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 370 | </text>
|
| 371 | <text string="88" state="88">
|
| 372 | <color red="1.0" green="1.0" blue="1.0" />
|
| 373 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 374 | </text>
|
| 375 | <text string="89" state="89">
|
| 376 | <color red="1.0" green="1.0" blue="1.0" />
|
| 377 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 378 | </text>
|
| 379 | <text string="90" state="90">
|
| 380 | <color red="1.0" green="1.0" blue="1.0" />
|
| 381 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 382 | </text>
|
| 383 | <text string="91" state="91">
|
| 384 | <color red="1.0" green="1.0" blue="1.0" />
|
| 385 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 386 | </text>
|
| 387 | <text string="92" state="92">
|
| 388 | <color red="1.0" green="1.0" blue="1.0" />
|
| 389 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 390 | </text>
|
| 391 | <text string="93" state="93">
|
| 392 | <color red="1.0" green="1.0" blue="1.0" />
|
| 393 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 394 | </text>
|
| 395 | <text string="94" state="94">
|
| 396 | <color red="1.0" green="1.0" blue="1.0" />
|
| 397 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 398 | </text>
|
| 399 | <text string="95" state="95">
|
| 400 | <color red="1.0" green="1.0" blue="1.0" />
|
| 401 | <bounds x="0" y="0.1" width="1" height="1" />
|
| 402 | </text>
|
| 403 | </element>
|
| 3 | 404 | <element name="vfd0">
|
| 4 | 405 | <led14segsc>
|
| 5 | 406 | <color red="0" green="0.6" blue="1.0" />
|
| 6 | 407 | </led14segsc>
|
| 7 | | </element>
|
| 408 | </element>
|
| 409 | <element name="digit" defstate="10">
|
| 410 | <led7seg>
|
| 411 | <color red="1.0" green="0.3" blue="0.0" />
|
| 412 | </led7seg>
|
| 413 | </element>
|
| 414 | |
| 415 | <view name="AWP Simulated Video (No Artwork)">
|
| 416 | <backdrop name="vfd0" element="vfd0" state="0">
|
| 417 | <bounds x="210" y="200" width="9" height="17"/>
|
| 418 | </backdrop>
|
| 419 | <backdrop name="vfd1" element="vfd0" state="0">
|
| 420 | <bounds x="219" y="200" width="9" height="17"/>
|
| 421 | </backdrop>
|
| 422 | <backdrop name="vfd2" element="vfd0" state="0">
|
| 423 | <bounds x="228" y="200" width="9" height="17"/>
|
| 424 | </backdrop>
|
| 425 | <backdrop name="vfd3" element="vfd0" state="0">
|
| 426 | <bounds x="237" y="200" width="9" height="17"/>
|
| 427 | </backdrop>
|
| 428 | <backdrop name="vfd4" element="vfd0" state="0">
|
| 429 | <bounds x="246" y="200" width="9" height="17"/>
|
| 430 | </backdrop>
|
| 431 | <backdrop name="vfd5" element="vfd0" state="0">
|
| 432 | <bounds x="255" y="200" width="9" height="17"/>
|
| 433 | </backdrop>
|
| 434 | <backdrop name="vfd6" element="vfd0" state="0">
|
| 435 | <bounds x="264" y="200" width="9" height="17"/>
|
| 436 | </backdrop>
|
| 437 | <backdrop name="vfd7" element="vfd0" state="0">
|
| 438 | <bounds x="273" y="200" width="9" height="17"/>
|
| 439 | </backdrop>
|
| 440 | <backdrop name="vfd8" element="vfd0" state="0">
|
| 441 | <bounds x="282" y="200" width="9" height="17"/>
|
| 442 | </backdrop>
|
| 443 | <backdrop name="vfd9" element="vfd0" state="0">
|
| 444 | <bounds x="291" y="200" width="9" height="17"/>
|
| 445 | </backdrop>
|
| 446 | <backdrop name="vfd10" element="vfd0" state="0">
|
| 447 | <bounds x="300" y="200" width="9" height="17"/>
|
| 448 | </backdrop>
|
| 449 | <backdrop name="vfd11" element="vfd0" state="0">
|
| 450 | <bounds x="309" y="200" width="9" height="17"/>
|
| 451 | </backdrop>
|
| 452 | <backdrop name="vfd12" element="vfd0" state="0">
|
| 453 | <bounds x="318" y="200" width="9" height="17"/>
|
| 454 | </backdrop>
|
| 455 | <backdrop name="vfd13" element="vfd0" state="0">
|
| 456 | <bounds x="327" y="200" width="9" height="17"/>
|
| 457 | </backdrop>
|
| 458 | <backdrop name="vfd14" element="vfd0" state="0">
|
| 459 | <bounds x="336" y="200" width="9" height="17"/>
|
| 460 | </backdrop>
|
| 461 | <backdrop name="vfd15" element="vfd0" state="0">
|
| 462 | <bounds x="345" y="200" width="9" height="17"/>
|
| 463 | </backdrop>
|
| 464 | <backdrop name="reel1" element="Steppers" state="0">
|
| 465 | <bounds x="210" y="300" width="50" height="50"/>
|
| 466 | </backdrop>
|
| 467 | <backdrop name="reel2" element="Steppers" state="0">
|
| 468 | <bounds x="260" y="300" width="50" height="50"/>
|
| 469 | </backdrop>
|
| 470 | <backdrop name="reel3" element="Steppers" state="0">
|
| 471 | <bounds x="310" y="300" width="50" height="50"/>
|
| 472 | </backdrop>
|
| 473 | <backdrop name="reel4" element="Steppers" state="0">
|
| 474 | <bounds x="210" y="360" width="50" height="50"/>
|
| 475 | </backdrop>
|
| 476 | <backdrop name="reel5" element="Steppers" state="0">
|
| 477 | <bounds x="260" y="360" width="50" height="50"/>
|
| 478 | </backdrop>
|
| 479 | <backdrop name="reel6" element="Steppers" state="0">
|
| 480 | <bounds x="310" y="360" width="50" height="50"/>
|
| 481 | </backdrop>
|
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | <backdrop name="lamp0" element="matrixlamp" state="0">
|
| 487 | <bounds x="0" y="0" width="7" height="7"/>
|
| 488 | </backdrop>
|
| 489 | <backdrop name="lamp1" element="matrixlamp" state="0">
|
| 490 | <bounds x="8" y="0" width="7" height="7"/>
|
| 491 | </backdrop>
|
| 492 | <backdrop name="lamp2" element="matrixlamp" state="0">
|
| 493 | <bounds x="16" y="0" width="7" height="7"/>
|
| 494 | </backdrop>
|
| 495 | <backdrop name="lamp3" element="matrixlamp" state="0">
|
| 496 | <bounds x="24" y="0" width="7" height="7"/>
|
| 497 | </backdrop>
|
| 498 | <backdrop name="lamp4" element="matrixlamp" state="0">
|
| 499 | <bounds x="32" y="0" width="7" height="7"/>
|
| 500 | </backdrop>
|
| 501 | <backdrop name="lamp5" element="matrixlamp" state="0">
|
| 502 | <bounds x="40" y="0" width="7" height="7"/>
|
| 503 | </backdrop>
|
| 504 | <backdrop name="lamp6" element="matrixlamp" state="0">
|
| 505 | <bounds x="48" y="0" width="7" height="7"/>
|
| 506 | </backdrop>
|
| 507 | <backdrop name="lamp7" element="matrixlamp" state="0">
|
| 508 | <bounds x="56" y="0" width="7" height="7"/>
|
| 509 | </backdrop>
|
| 510 | <backdrop name="lamp8" element="matrixlamp" state="0">
|
| 511 | <bounds x="64" y="0" width="7" height="7"/>
|
| 512 | </backdrop>
|
| 513 | <backdrop name="lamp9" element="matrixlamp" state="0">
|
| 514 | <bounds x="72" y="0" width="7" height="7"/>
|
| 515 | </backdrop>
|
| 516 | <backdrop name="lamp10" element="matrixlamp" state="0">
|
| 517 | <bounds x="80" y="0" width="7" height="7"/>
|
| 518 | </backdrop>
|
| 519 | <backdrop name="lamp11" element="matrixlamp" state="0">
|
| 520 | <bounds x="88" y="0" width="7" height="7"/>
|
| 521 | </backdrop>
|
| 522 | <backdrop name="lamp12" element="matrixlamp" state="0">
|
| 523 | <bounds x="96" y="0" width="7" height="7"/>
|
| 524 | </backdrop>
|
| 8 | 525 | |
| 9 | | <view name="VFD">
|
| 526 | <backdrop name="lamp13" element="matrixlamp" state="0">
|
| 527 | <bounds x="104" y="0" width="7" height="7"/>
|
| 528 | </backdrop>
|
| 529 | <backdrop name="lamp14" element="matrixlamp" state="0">
|
| 530 | <bounds x="112" y="0" width="7" height="7"/>
|
| 531 | </backdrop>
|
| 532 | <backdrop name="lamp15" element="matrixlamp" state="0">
|
| 533 | <bounds x="120" y="0" width="7" height="7"/>
|
| 534 | </backdrop>
|
| 535 | <backdrop name="lamp16" element="matrixlamp" state="0">
|
| 536 | <bounds x="0" y="8" width="7" height="7"/>
|
| 537 | </backdrop>
|
| 538 | <backdrop name="lamp17" element="matrixlamp" state="0">
|
| 539 | <bounds x="8" y="8" width="7" height="7"/>
|
| 540 | </backdrop>
|
| 541 | <backdrop name="lamp18" element="matrixlamp" state="0">
|
| 542 | <bounds x="16" y="8" width="7" height="7"/>
|
| 543 | </backdrop>
|
| 544 | <backdrop name="lamp19" element="matrixlamp" state="0">
|
| 545 | <bounds x="24" y="8" width="7" height="7"/>
|
| 546 | </backdrop>
|
| 547 | <backdrop name="lamp20" element="matrixlamp" state="0">
|
| 548 | <bounds x="32" y="8" width="7" height="7"/>
|
| 549 | </backdrop>
|
| 550 | <backdrop name="lamp21" element="matrixlamp" state="0">
|
| 551 | <bounds x="40" y="8" width="7" height="7"/>
|
| 552 | </backdrop>
|
| 553 | <backdrop name="lamp22" element="matrixlamp" state="0">
|
| 554 | <bounds x="48" y="8" width="7" height="7"/>
|
| 555 | </backdrop>
|
| 556 | <backdrop name="lamp23" element="matrixlamp" state="0">
|
| 557 | <bounds x="56" y="8" width="7" height="7"/>
|
| 558 | </backdrop>
|
| 559 | <backdrop name="lamp24" element="matrixlamp" state="0">
|
| 560 | <bounds x="64" y="8" width="7" height="7"/>
|
| 561 | </backdrop>
|
| 562 | <backdrop name="lamp25" element="matrixlamp" state="0">
|
| 563 | <bounds x="72" y="8" width="7" height="7"/>
|
| 564 | </backdrop>
|
| 565 | <backdrop name="lamp26" element="matrixlamp" state="0">
|
| 566 | <bounds x="80" y="8" width="7" height="7"/>
|
| 567 | </backdrop>
|
| 568 | <backdrop name="lamp27" element="matrixlamp" state="0">
|
| 569 | <bounds x="88" y="8" width="7" height="7"/>
|
| 570 | </backdrop>
|
| 571 | <backdrop name="lamp28" element="matrixlamp" state="0">
|
| 572 | <bounds x="96" y="8" width="7" height="7"/>
|
| 573 | </backdrop>
|
| 574 | <backdrop name="lamp29" element="matrixlamp" state="0">
|
| 575 | <bounds x="104" y="8" width="7" height="7"/>
|
| 576 | </backdrop>
|
| 577 | <backdrop name="lamp30" element="matrixlamp" state="0">
|
| 578 | <bounds x="112" y="8" width="7" height="7"/>
|
| 579 | </backdrop>
|
| 580 | <backdrop name="lamp31" element="matrixlamp" state="0">
|
| 581 | <bounds x="120" y="8" width="7" height="7"/>
|
| 582 | </backdrop>
|
| 583 | <backdrop name="lamp32" element="matrixlamp" state="0">
|
| 584 | <bounds x="0" y="16" width="7" height="7"/>
|
| 585 | </backdrop>
|
| 586 | <backdrop name="lamp33" element="matrixlamp" state="0">
|
| 587 | <bounds x="8" y="16" width="7" height="7"/>
|
| 588 | </backdrop>
|
| 589 | <backdrop name="lamp34" element="matrixlamp" state="0">
|
| 590 | <bounds x="16" y="16" width="7" height="7"/>
|
| 591 | </backdrop>
|
| 592 | <backdrop name="lamp35" element="matrixlamp" state="0">
|
| 593 | <bounds x="24" y="16" width="7" height="7"/>
|
| 594 | </backdrop>
|
| 595 | <backdrop name="lamp36" element="matrixlamp" state="0">
|
| 596 | <bounds x="32" y="16" width="7" height="7"/>
|
| 597 | </backdrop>
|
| 598 | <backdrop name="lamp37" element="matrixlamp" state="0">
|
| 599 | <bounds x="40" y="16" width="7" height="7"/>
|
| 600 | </backdrop>
|
| 601 | <backdrop name="lamp38" element="matrixlamp" state="0">
|
| 602 | <bounds x="48" y="16" width="7" height="7"/>
|
| 603 | </backdrop>
|
| 604 | <backdrop name="lamp39" element="matrixlamp" state="0">
|
| 605 | <bounds x="56" y="16" width="7" height="7"/>
|
| 606 | </backdrop>
|
| 607 | <backdrop name="lamp40" element="matrixlamp" state="0">
|
| 608 | <bounds x="64" y="16" width="7" height="7"/>
|
| 609 | </backdrop>
|
| 610 | <backdrop name="lamp41" element="matrixlamp" state="0">
|
| 611 | <bounds x="72" y="16" width="7" height="7"/>
|
| 612 | </backdrop>
|
| 613 | <backdrop name="lamp42" element="matrixlamp" state="0">
|
| 614 | <bounds x="80" y="16" width="7" height="7"/>
|
| 615 | </backdrop>
|
| 616 | <backdrop name="lamp43" element="matrixlamp" state="0">
|
| 617 | <bounds x="88" y="16" width="7" height="7"/>
|
| 618 | </backdrop>
|
| 619 | <backdrop name="lamp44" element="matrixlamp" state="0">
|
| 620 | <bounds x="96" y="16" width="7" height="7"/>
|
| 621 | </backdrop>
|
| 622 | <backdrop name="lamp45" element="matrixlamp" state="0">
|
| 623 | <bounds x="104" y="16" width="7" height="7"/>
|
| 624 | </backdrop>
|
| 625 | <backdrop name="lamp46" element="matrixlamp" state="0">
|
| 626 | <bounds x="112" y="16" width="7" height="7"/>
|
| 627 | </backdrop>
|
| 628 | <backdrop name="lamp47" element="matrixlamp" state="0">
|
| 629 | <bounds x="120" y="16" width="7" height="7"/>
|
| 630 | </backdrop>
|
| 631 | <backdrop name="lamp48" element="matrixlamp" state="0">
|
| 632 | <bounds x="0" y="24" width="7" height="7"/>
|
| 633 | </backdrop>
|
| 634 | <backdrop name="lamp49" element="matrixlamp" state="0">
|
| 635 | <bounds x="8" y="24" width="7" height="7"/>
|
| 636 | </backdrop>
|
| 637 | <backdrop name="lamp50" element="matrixlamp" state="0">
|
| 638 | <bounds x="16" y="24" width="7" height="7"/>
|
| 639 | </backdrop>
|
| 640 | <backdrop name="lamp51" element="matrixlamp" state="0">
|
| 641 | <bounds x="24" y="24" width="7" height="7"/>
|
| 642 | </backdrop>
|
| 643 | <backdrop name="lamp52" element="matrixlamp" state="0">
|
| 644 | <bounds x="32" y="24" width="7" height="7"/>
|
| 645 | </backdrop>
|
| 646 | <backdrop name="lamp53" element="matrixlamp" state="0">
|
| 647 | <bounds x="40" y="24" width="7" height="7"/>
|
| 648 | </backdrop>
|
| 649 | <backdrop name="lamp54" element="matrixlamp" state="0">
|
| 650 | <bounds x="48" y="24" width="7" height="7"/>
|
| 651 | </backdrop>
|
| 652 | <backdrop name="lamp55" element="matrixlamp" state="0">
|
| 653 | <bounds x="56" y="24" width="7" height="7"/>
|
| 654 | </backdrop>
|
| 655 | <backdrop name="lamp56" element="matrixlamp" state="0">
|
| 656 | <bounds x="64" y="24" width="7" height="7"/>
|
| 657 | </backdrop>
|
| 658 | <backdrop name="lamp57" element="matrixlamp" state="0">
|
| 659 | <bounds x="72" y="24" width="7" height="7"/>
|
| 660 | </backdrop>
|
| 661 | <backdrop name="lamp58" element="matrixlamp" state="0">
|
| 662 | <bounds x="80" y="24" width="7" height="7"/>
|
| 663 | </backdrop>
|
| 664 | <backdrop name="lamp59" element="matrixlamp" state="0">
|
| 665 | <bounds x="88" y="24" width="7" height="7"/>
|
| 666 | </backdrop>
|
| 667 | <backdrop name="lamp60" element="matrixlamp" state="0">
|
| 668 | <bounds x="96" y="24" width="7" height="7"/>
|
| 669 | </backdrop>
|
| 670 | <backdrop name="lamp61" element="matrixlamp" state="0">
|
| 671 | <bounds x="104" y="24" width="7" height="7"/>
|
| 672 | </backdrop>
|
| 673 | <backdrop name="lamp62" element="matrixlamp" state="0">
|
| 674 | <bounds x="112" y="24" width="7" height="7"/>
|
| 675 | </backdrop>
|
| 676 | <backdrop name="lamp63" element="matrixlamp" state="0">
|
| 677 | <bounds x="120" y="24" width="7" height="7"/>
|
| 678 | </backdrop>
|
| 679 | <backdrop name="lamp64" element="matrixlamp" state="0">
|
| 680 | <bounds x="0" y="32" width="7" height="7"/>
|
| 681 | </backdrop>
|
| 682 | <backdrop name="lamp65" element="matrixlamp" state="0">
|
| 683 | <bounds x="8" y="32" width="7" height="7"/>
|
| 684 | </backdrop>
|
| 685 | <backdrop name="lamp66" element="matrixlamp" state="0">
|
| 686 | <bounds x="16" y="32" width="7" height="7"/>
|
| 687 | </backdrop>
|
| 688 | <backdrop name="lamp67" element="matrixlamp" state="0">
|
| 689 | <bounds x="24" y="32" width="7" height="7"/>
|
| 690 | </backdrop>
|
| 691 | <backdrop name="lamp68" element="matrixlamp" state="0">
|
| 692 | <bounds x="32" y="32" width="7" height="7"/>
|
| 693 | </backdrop>
|
| 694 | <backdrop name="lamp69" element="matrixlamp" state="0">
|
| 695 | <bounds x="40" y="32" width="7" height="7"/>
|
| 696 | </backdrop>
|
| 697 | <backdrop name="lamp70" element="matrixlamp" state="0">
|
| 698 | <bounds x="48" y="32" width="7" height="7"/>
|
| 699 | </backdrop>
|
| 700 | <backdrop name="lamp71" element="matrixlamp" state="0">
|
| 701 | <bounds x="56" y="32" width="7" height="7"/>
|
| 702 | </backdrop>
|
| 703 | <backdrop name="lamp72" element="matrixlamp" state="0">
|
| 704 | <bounds x="64" y="32" width="7" height="7"/>
|
| 705 | </backdrop>
|
| 706 | <backdrop name="lamp73" element="matrixlamp" state="0">
|
| 707 | <bounds x="72" y="32" width="7" height="7"/>
|
| 708 | </backdrop>
|
| 709 | <backdrop name="lamp74" element="matrixlamp" state="0">
|
| 710 | <bounds x="80" y="32" width="7" height="7"/>
|
| 711 | </backdrop>
|
| 712 | <backdrop name="lamp75" element="matrixlamp" state="0">
|
| 713 | <bounds x="88" y="32" width="7" height="7"/>
|
| 714 | </backdrop>
|
| 715 | <backdrop name="lamp76" element="matrixlamp" state="0">
|
| 716 | <bounds x="96" y="32" width="7" height="7"/>
|
| 717 | </backdrop>
|
| 718 | <backdrop name="lamp77" element="matrixlamp" state="0">
|
| 719 | <bounds x="104" y="32" width="7" height="7"/>
|
| 720 | </backdrop>
|
| 721 | <backdrop name="lamp78" element="matrixlamp" state="0">
|
| 722 | <bounds x="112" y="32" width="7" height="7"/>
|
| 723 | </backdrop>
|
| 724 | <backdrop name="lamp79" element="matrixlamp" state="0">
|
| 725 | <bounds x="120" y="32" width="7" height="7"/>
|
| 726 | </backdrop>
|
| 727 | <backdrop name="lamp80" element="matrixlamp" state="0">
|
| 728 | <bounds x="0" y="40" width="7" height="7"/>
|
| 729 | </backdrop>
|
| 730 | <backdrop name="lamp81" element="matrixlamp" state="0">
|
| 731 | <bounds x="8" y="40" width="7" height="7"/>
|
| 732 | </backdrop>
|
| 733 | <backdrop name="lamp82" element="matrixlamp" state="0">
|
| 734 | <bounds x="16" y="40" width="7" height="7"/>
|
| 735 | </backdrop>
|
| 736 | <backdrop name="lamp83" element="matrixlamp" state="0">
|
| 737 | <bounds x="24" y="40" width="7" height="7"/>
|
| 738 | </backdrop>
|
| 739 | <backdrop name="lamp84" element="matrixlamp" state="0">
|
| 740 | <bounds x="32" y="40" width="7" height="7"/>
|
| 741 | </backdrop>
|
| 742 | <backdrop name="lamp85" element="matrixlamp" state="0">
|
| 743 | <bounds x="40" y="40" width="7" height="7"/>
|
| 744 | </backdrop>
|
| 745 | <backdrop name="lamp86" element="matrixlamp" state="0">
|
| 746 | <bounds x="48" y="40" width="7" height="7"/>
|
| 747 | </backdrop>
|
| 748 | <backdrop name="lamp87" element="matrixlamp" state="0">
|
| 749 | <bounds x="56" y="40" width="7" height="7"/>
|
| 750 | </backdrop>
|
| 751 | <backdrop name="lamp88" element="matrixlamp" state="0">
|
| 752 | <bounds x="64" y="40" width="7" height="7"/>
|
| 753 | </backdrop>
|
| 754 | <backdrop name="lamp89" element="matrixlamp" state="0">
|
| 755 | <bounds x="72" y="40" width="7" height="7"/>
|
| 756 | </backdrop>
|
| 757 | <backdrop name="lamp90" element="matrixlamp" state="0">
|
| 758 | <bounds x="80" y="40" width="7" height="7"/>
|
| 759 | </backdrop>
|
| 760 | <backdrop name="lamp91" element="matrixlamp" state="0">
|
| 761 | <bounds x="88" y="40" width="7" height="7"/>
|
| 762 | </backdrop>
|
| 763 | <backdrop name="lamp92" element="matrixlamp" state="0">
|
| 764 | <bounds x="96" y="40" width="7" height="7"/>
|
| 765 | </backdrop>
|
| 766 | <backdrop name="lamp93" element="matrixlamp" state="0">
|
| 767 | <bounds x="104" y="40" width="7" height="7"/>
|
| 768 | </backdrop>
|
| 769 | <backdrop name="lamp94" element="matrixlamp" state="0">
|
| 770 | <bounds x="112" y="40" width="7" height="7"/>
|
| 771 | </backdrop>
|
| 772 | <backdrop name="lamp95" element="matrixlamp" state="0">
|
| 773 | <bounds x="120" y="40" width="7" height="7"/>
|
| 774 | </backdrop>
|
| 775 | <backdrop name="lamp96" element="matrixlamp" state="0">
|
| 776 | <bounds x="0" y="48" width="7" height="7"/>
|
| 777 | </backdrop>
|
| 778 | <backdrop name="lamp97" element="matrixlamp" state="0">
|
| 779 | <bounds x="8" y="48" width="7" height="7"/>
|
| 780 | </backdrop>
|
| 781 | <backdrop name="lamp98" element="matrixlamp" state="0">
|
| 782 | <bounds x="16" y="48" width="7" height="7"/>
|
| 783 | </backdrop>
|
| 784 | <backdrop name="lamp99" element="matrixlamp" state="0">
|
| 785 | <bounds x="24" y="48" width="7" height="7"/>
|
| 786 | </backdrop>
|
| 787 | <backdrop name="lamp100" element="matrixlamp" state="0">
|
| 788 | <bounds x="32" y="48" width="7" height="7"/>
|
| 789 | </backdrop>
|
| 790 | <backdrop name="lamp101" element="matrixlamp" state="0">
|
| 791 | <bounds x="40" y="48" width="7" height="7"/>
|
| 792 | </backdrop>
|
| 793 | <backdrop name="lamp102" element="matrixlamp" state="0">
|
| 794 | <bounds x="48" y="48" width="7" height="7"/>
|
| 795 | </backdrop>
|
| 796 | <backdrop name="lamp103" element="matrixlamp" state="0">
|
| 797 | <bounds x="56" y="48" width="7" height="7"/>
|
| 798 | </backdrop>
|
| 799 | <backdrop name="lamp104" element="matrixlamp" state="0">
|
| 800 | <bounds x="64" y="48" width="7" height="7"/>
|
| 801 | </backdrop>
|
| 802 | <backdrop name="lamp105" element="matrixlamp" state="0">
|
| 803 | <bounds x="72" y="48" width="7" height="7"/>
|
| 804 | </backdrop>
|
| 805 | <backdrop name="lamp106" element="matrixlamp" state="0">
|
| 806 | <bounds x="80" y="48" width="7" height="7"/>
|
| 807 | </backdrop>
|
| 808 | <backdrop name="lamp107" element="matrixlamp" state="0">
|
| 809 | <bounds x="88" y="48" width="7" height="7"/>
|
| 810 | </backdrop>
|
| 811 | <backdrop name="lamp108" element="matrixlamp" state="0">
|
| 812 | <bounds x="96" y="48" width="7" height="7"/>
|
| 813 | </backdrop>
|
| 814 | <backdrop name="lamp109" element="matrixlamp" state="0">
|
| 815 | <bounds x="104" y="48" width="7" height="7"/>
|
| 816 | </backdrop>
|
| 817 | <backdrop name="lamp110" element="matrixlamp" state="0">
|
| 818 | <bounds x="112" y="48" width="7" height="7"/>
|
| 819 | </backdrop>
|
| 820 | <backdrop name="lamp111" element="matrixlamp" state="0">
|
| 821 | <bounds x="120" y="48" width="7" height="7"/>
|
| 822 | </backdrop>
|
| 823 | <backdrop name="lamp112" element="matrixlamp" state="0">
|
| 824 | <bounds x="0" y="56" width="7" height="7"/>
|
| 825 | </backdrop>
|
| 826 | <backdrop name="lamp113" element="matrixlamp" state="0">
|
| 827 | <bounds x="8" y="56" width="7" height="7"/>
|
| 828 | </backdrop>
|
| 829 | <backdrop name="lamp114" element="matrixlamp" state="0">
|
| 830 | <bounds x="16" y="56" width="7" height="7"/>
|
| 831 | </backdrop>
|
| 832 | <backdrop name="lamp115" element="matrixlamp" state="0">
|
| 833 | <bounds x="24" y="56" width="7" height="7"/>
|
| 834 | </backdrop>
|
| 835 | <backdrop name="lamp116" element="matrixlamp" state="0">
|
| 836 | <bounds x="32" y="56" width="7" height="7"/>
|
| 837 | </backdrop>
|
| 838 | <backdrop name="lamp117" element="matrixlamp" state="0">
|
| 839 | <bounds x="40" y="56" width="7" height="7"/>
|
| 840 | </backdrop>
|
| 841 | <backdrop name="lamp118" element="matrixlamp" state="0">
|
| 842 | <bounds x="48" y="56" width="7" height="7"/>
|
| 843 | </backdrop>
|
| 844 | <backdrop name="lamp119" element="matrixlamp" state="0">
|
| 845 | <bounds x="56" y="56" width="7" height="7"/>
|
| 846 | </backdrop>
|
| 847 | <backdrop name="lamp120" element="matrixlamp" state="0">
|
| 848 | <bounds x="64" y="56" width="7" height="7"/>
|
| 849 | </backdrop>
|
| 850 | <backdrop name="lamp121" element="matrixlamp" state="0">
|
| 851 | <bounds x="72" y="56" width="7" height="7"/>
|
| 852 | </backdrop>
|
| 853 | <backdrop name="lamp122" element="matrixlamp" state="0">
|
| 854 | <bounds x="80" y="56" width="7" height="7"/>
|
| 855 | </backdrop>
|
| 856 | <backdrop name="lamp123" element="matrixlamp" state="0">
|
| 857 | <bounds x="88" y="56" width="7" height="7"/>
|
| 858 | </backdrop>
|
| 859 | <backdrop name="lamp124" element="matrixlamp" state="0">
|
| 860 | <bounds x="96" y="56" width="7" height="7"/>
|
| 861 | </backdrop>
|
| 862 | <backdrop name="lamp125" element="matrixlamp" state="0">
|
| 863 | <bounds x="104" y="56" width="7" height="7"/>
|
| 864 | </backdrop>
|
| 865 | <backdrop name="lamp126" element="matrixlamp" state="0">
|
| 866 | <bounds x="112" y="56" width="7" height="7"/>
|
| 867 | </backdrop>
|
| 868 | <backdrop name="lamp127" element="matrixlamp" state="0">
|
| 869 | <bounds x="120" y="56" width="7" height="7"/>
|
| 870 | </backdrop>
|
| 871 | <backdrop name="lamp128" element="matrixlamp" state="0">
|
| 872 | <bounds x="0" y="64" width="7" height="7"/>
|
| 873 | </backdrop>
|
| 874 | <backdrop name="lamp129" element="matrixlamp" state="0">
|
| 875 | <bounds x="8" y="64" width="7" height="7"/>
|
| 876 | </backdrop>
|
| 877 | <backdrop name="lamp130" element="matrixlamp" state="0">
|
| 878 | <bounds x="16" y="64" width="7" height="7"/>
|
| 879 | </backdrop>
|
| 880 | <backdrop name="lamp131" element="matrixlamp" state="0">
|
| 881 | <bounds x="24" y="64" width="7" height="7"/>
|
| 882 | </backdrop>
|
| 883 | <backdrop name="lamp132" element="matrixlamp" state="0">
|
| 884 | <bounds x="32" y="64" width="7" height="7"/>
|
| 885 | </backdrop>
|
| 886 | <backdrop name="lamp133" element="matrixlamp" state="0">
|
| 887 | <bounds x="40" y="64" width="7" height="7"/>
|
| 888 | </backdrop>
|
| 889 | <backdrop name="lamp134" element="matrixlamp" state="0">
|
| 890 | <bounds x="48" y="64" width="7" height="7"/>
|
| 891 | </backdrop>
|
| 892 | <backdrop name="lamp135" element="matrixlamp" state="0">
|
| 893 | <bounds x="56" y="64" width="7" height="7"/>
|
| 894 | </backdrop>
|
| 895 | <backdrop name="lamp136" element="matrixlamp" state="0">
|
| 896 | <bounds x="64" y="64" width="7" height="7"/>
|
| 897 | </backdrop>
|
| 898 | <backdrop name="lamp137" element="matrixlamp" state="0">
|
| 899 | <bounds x="72" y="64" width="7" height="7"/>
|
| 900 | </backdrop>
|
| 901 | <backdrop name="lamp138" element="matrixlamp" state="0">
|
| 902 | <bounds x="80" y="64" width="7" height="7"/>
|
| 903 | </backdrop>
|
| 904 | <backdrop name="lamp139" element="matrixlamp" state="0">
|
| 905 | <bounds x="88" y="64" width="7" height="7"/>
|
| 906 | </backdrop>
|
| 907 | <backdrop name="lamp140" element="matrixlamp" state="0">
|
| 908 | <bounds x="96" y="64" width="7" height="7"/>
|
| 909 | </backdrop>
|
| 910 | <backdrop name="lamp141" element="matrixlamp" state="0">
|
| 911 | <bounds x="104" y="64" width="7" height="7"/>
|
| 912 | </backdrop>
|
| 913 | <backdrop name="lamp142" element="matrixlamp" state="0">
|
| 914 | <bounds x="112" y="64" width="7" height="7"/>
|
| 915 | </backdrop>
|
| 916 | <backdrop name="lamp143" element="matrixlamp" state="0">
|
| 917 | <bounds x="120" y="64" width="7" height="7"/>
|
| 918 | </backdrop>
|
| 919 | <backdrop name="lamp144" element="matrixlamp" state="0">
|
| 920 | <bounds x="0" y="72" width="7" height="7"/>
|
| 921 | </backdrop>
|
| 922 | <backdrop name="lamp145" element="matrixlamp" state="0">
|
| 923 | <bounds x="8" y="72" width="7" height="7"/>
|
| 924 | </backdrop>
|
| 925 | <backdrop name="lamp146" element="matrixlamp" state="0">
|
| 926 | <bounds x="16" y="72" width="7" height="7"/>
|
| 927 | </backdrop>
|
| 928 | <backdrop name="lamp147" element="matrixlamp" state="0">
|
| 929 | <bounds x="24" y="72" width="7" height="7"/>
|
| 930 | </backdrop>
|
| 931 | <backdrop name="lamp148" element="matrixlamp" state="0">
|
| 932 | <bounds x="32" y="72" width="7" height="7"/>
|
| 933 | </backdrop>
|
| 934 | <backdrop name="lamp149" element="matrixlamp" state="0">
|
| 935 | <bounds x="40" y="72" width="7" height="7"/>
|
| 936 | </backdrop>
|
| 937 | <backdrop name="lamp150" element="matrixlamp" state="0">
|
| 938 | <bounds x="48" y="72" width="7" height="7"/>
|
| 939 | </backdrop>
|
| 940 | <backdrop name="lamp151" element="matrixlamp" state="0">
|
| 941 | <bounds x="56" y="72" width="7" height="7"/>
|
| 942 | </backdrop>
|
| 943 | <backdrop name="lamp152" element="matrixlamp" state="0">
|
| 944 | <bounds x="64" y="72" width="7" height="7"/>
|
| 945 | </backdrop>
|
| 946 | <backdrop name="lamp153" element="matrixlamp" state="0">
|
| 947 | <bounds x="72" y="72" width="7" height="7"/>
|
| 948 | </backdrop>
|
| 949 | <backdrop name="lamp154" element="matrixlamp" state="0">
|
| 950 | <bounds x="80" y="72" width="7" height="7"/>
|
| 951 | </backdrop>
|
| 952 | <backdrop name="lamp155" element="matrixlamp" state="0">
|
| 953 | <bounds x="88" y="72" width="7" height="7"/>
|
| 954 | </backdrop>
|
| 955 | <backdrop name="lamp156" element="matrixlamp" state="0">
|
| 956 | <bounds x="96" y="72" width="7" height="7"/>
|
| 957 | </backdrop>
|
| 958 | <backdrop name="lamp157" element="matrixlamp" state="0">
|
| 959 | <bounds x="104" y="72" width="7" height="7"/>
|
| 960 | </backdrop>
|
| 961 | <backdrop name="lamp158" element="matrixlamp" state="0">
|
| 962 | <bounds x="112" y="72" width="7" height="7"/>
|
| 963 | </backdrop>
|
| 964 | <backdrop name="lamp159" element="matrixlamp" state="0">
|
| 965 | <bounds x="120" y="72" width="7" height="7"/>
|
| 966 | </backdrop>
|
| 967 | <backdrop name="lamp160" element="matrixlamp" state="0">
|
| 968 | <bounds x="0" y="80" width="7" height="7"/>
|
| 969 | </backdrop>
|
| 970 | <backdrop name="lamp161" element="matrixlamp" state="0">
|
| 971 | <bounds x="8" y="80" width="7" height="7"/>
|
| 972 | </backdrop>
|
| 973 | <backdrop name="lamp162" element="matrixlamp" state="0">
|
| 974 | <bounds x="16" y="80" width="7" height="7"/>
|
| 975 | </backdrop>
|
| 976 | <backdrop name="lamp163" element="matrixlamp" state="0">
|
| 977 | <bounds x="24" y="80" width="7" height="7"/>
|
| 978 | </backdrop>
|
| 979 | <backdrop name="lamp164" element="matrixlamp" state="0">
|
| 980 | <bounds x="32" y="80" width="7" height="7"/>
|
| 981 | </backdrop>
|
| 982 | <backdrop name="lamp165" element="matrixlamp" state="0">
|
| 983 | <bounds x="40" y="80" width="7" height="7"/>
|
| 984 | </backdrop>
|
| 985 | <backdrop name="lamp166" element="matrixlamp" state="0">
|
| 986 | <bounds x="48" y="80" width="7" height="7"/>
|
| 987 | </backdrop>
|
| 988 | <backdrop name="lamp167" element="matrixlamp" state="0">
|
| 989 | <bounds x="56" y="80" width="7" height="7"/>
|
| 990 | </backdrop>
|
| 991 | <backdrop name="lamp168" element="matrixlamp" state="0">
|
| 992 | <bounds x="64" y="80" width="7" height="7"/>
|
| 993 | </backdrop>
|
| 994 | <backdrop name="lamp169" element="matrixlamp" state="0">
|
| 995 | <bounds x="72" y="80" width="7" height="7"/>
|
| 996 | </backdrop>
|
| 997 | <backdrop name="lamp170" element="matrixlamp" state="0">
|
| 998 | <bounds x="80" y="80" width="7" height="7"/>
|
| 999 | </backdrop>
|
| 1000 | <backdrop name="lamp171" element="matrixlamp" state="0">
|
| 1001 | <bounds x="88" y="80" width="7" height="7"/>
|
| 1002 | </backdrop>
|
| 1003 | <backdrop name="lamp172" element="matrixlamp" state="0">
|
| 1004 | <bounds x="96" y="80" width="7" height="7"/>
|
| 1005 | </backdrop>
|
| 1006 | <backdrop name="lamp173" element="matrixlamp" state="0">
|
| 1007 | <bounds x="104" y="80" width="7" height="7"/>
|
| 1008 | </backdrop>
|
| 1009 | <backdrop name="lamp174" element="matrixlamp" state="0">
|
| 1010 | <bounds x="112" y="80" width="7" height="7"/>
|
| 1011 | </backdrop>
|
| 1012 | <backdrop name="lamp175" element="matrixlamp" state="0">
|
| 1013 | <bounds x="120" y="80" width="7" height="7"/>
|
| 1014 | </backdrop>
|
| 1015 | <backdrop name="lamp176" element="matrixlamp" state="0">
|
| 1016 | <bounds x="0" y="88" width="7" height="7"/>
|
| 1017 | </backdrop>
|
| 1018 | <backdrop name="lamp177" element="matrixlamp" state="0">
|
| 1019 | <bounds x="8" y="88" width="7" height="7"/>
|
| 1020 | </backdrop>
|
| 1021 | <backdrop name="lamp178" element="matrixlamp" state="0">
|
| 1022 | <bounds x="16" y="88" width="7" height="7"/>
|
| 1023 | </backdrop>
|
| 1024 | <backdrop name="lamp179" element="matrixlamp" state="0">
|
| 1025 | <bounds x="24" y="88" width="7" height="7"/>
|
| 1026 | </backdrop>
|
| 1027 | <backdrop name="lamp180" element="matrixlamp" state="0">
|
| 1028 | <bounds x="32" y="88" width="7" height="7"/>
|
| 1029 | </backdrop>
|
| 1030 | <backdrop name="lamp181" element="matrixlamp" state="0">
|
| 1031 | <bounds x="40" y="88" width="7" height="7"/>
|
| 1032 | </backdrop>
|
| 1033 | <backdrop name="lamp182" element="matrixlamp" state="0">
|
| 1034 | <bounds x="48" y="88" width="7" height="7"/>
|
| 1035 | </backdrop>
|
| 1036 | <backdrop name="lamp183" element="matrixlamp" state="0">
|
| 1037 | <bounds x="56" y="88" width="7" height="7"/>
|
| 1038 | </backdrop>
|
| 1039 | <backdrop name="lamp184" element="matrixlamp" state="0">
|
| 1040 | <bounds x="64" y="88" width="7" height="7"/>
|
| 1041 | </backdrop>
|
| 1042 | <backdrop name="lamp185" element="matrixlamp" state="0">
|
| 1043 | <bounds x="72" y="88" width="7" height="7"/>
|
| 1044 | </backdrop>
|
| 1045 | <backdrop name="lamp186" element="matrixlamp" state="0">
|
| 1046 | <bounds x="80" y="88" width="7" height="7"/>
|
| 1047 | </backdrop>
|
| 1048 | <backdrop name="lamp187" element="matrixlamp" state="0">
|
| 1049 | <bounds x="88" y="88" width="7" height="7"/>
|
| 1050 | </backdrop>
|
| 1051 | <backdrop name="lamp188" element="matrixlamp" state="0">
|
| 1052 | <bounds x="96" y="88" width="7" height="7"/>
|
| 1053 | </backdrop>
|
| 1054 | <backdrop name="lamp189" element="matrixlamp" state="0">
|
| 1055 | <bounds x="104" y="88" width="7" height="7"/>
|
| 1056 | </backdrop>
|
| 1057 | <backdrop name="lamp190" element="matrixlamp" state="0">
|
| 1058 | <bounds x="112" y="88" width="7" height="7"/>
|
| 1059 | </backdrop>
|
| 1060 | <backdrop name="lamp191" element="matrixlamp" state="0">
|
| 1061 | <bounds x="120" y="88" width="7" height="7"/>
|
| 1062 | </backdrop>
|
| 1063 | <backdrop name="lamp192" element="matrixlamp" state="0">
|
| 1064 | <bounds x="0" y="96" width="7" height="7"/>
|
| 1065 | </backdrop>
|
| 1066 | <backdrop name="lamp193" element="matrixlamp" state="0">
|
| 1067 | <bounds x="8" y="96" width="7" height="7"/>
|
| 1068 | </backdrop>
|
| 1069 | <backdrop name="lamp194" element="matrixlamp" state="0">
|
| 1070 | <bounds x="16" y="96" width="7" height="7"/>
|
| 1071 | </backdrop>
|
| 1072 | <backdrop name="lamp195" element="matrixlamp" state="0">
|
| 1073 | <bounds x="24" y="96" width="7" height="7"/>
|
| 1074 | </backdrop>
|
| 1075 | <backdrop name="lamp196" element="matrixlamp" state="0">
|
| 1076 | <bounds x="32" y="96" width="7" height="7"/>
|
| 1077 | </backdrop>
|
| 1078 | <backdrop name="lamp197" element="matrixlamp" state="0">
|
| 1079 | <bounds x="40" y="96" width="7" height="7"/>
|
| 1080 | </backdrop>
|
| 1081 | <backdrop name="lamp198" element="matrixlamp" state="0">
|
| 1082 | <bounds x="48" y="96" width="7" height="7"/>
|
| 1083 | </backdrop>
|
| 1084 | <backdrop name="lamp199" element="matrixlamp" state="0">
|
| 1085 | <bounds x="56" y="96" width="7" height="7"/>
|
| 1086 | </backdrop>
|
| 1087 | <backdrop name="lamp200" element="matrixlamp" state="0">
|
| 1088 | <bounds x="64" y="96" width="7" height="7"/>
|
| 1089 | </backdrop>
|
| 1090 | <backdrop name="lamp201" element="matrixlamp" state="0">
|
| 1091 | <bounds x="72" y="96" width="7" height="7"/>
|
| 1092 | </backdrop>
|
| 1093 | <backdrop name="lamp202" element="matrixlamp" state="0">
|
| 1094 | <bounds x="80" y="96" width="7" height="7"/>
|
| 1095 | </backdrop>
|
| 1096 | <backdrop name="lamp203" element="matrixlamp" state="0">
|
| 1097 | <bounds x="88" y="96" width="7" height="7"/>
|
| 1098 | </backdrop>
|
| 1099 | <backdrop name="lamp204" element="matrixlamp" state="0">
|
| 1100 | <bounds x="96" y="96" width="7" height="7"/>
|
| 1101 | </backdrop>
|
| 1102 | <backdrop name="lamp205" element="matrixlamp" state="0">
|
| 1103 | <bounds x="104" y="96" width="7" height="7"/>
|
| 1104 | </backdrop>
|
| 1105 | <backdrop name="lamp206" element="matrixlamp" state="0">
|
| 1106 | <bounds x="112" y="96" width="7" height="7"/>
|
| 1107 | </backdrop>
|
| 1108 | <backdrop name="lamp207" element="matrixlamp" state="0">
|
| 1109 | <bounds x="120" y="96" width="7" height="7"/>
|
| 1110 | </backdrop>
|
| 1111 | <backdrop name="lamp208" element="matrixlamp" state="0">
|
| 1112 | <bounds x="0" y="104" width="7" height="7"/>
|
| 1113 | </backdrop>
|
| 1114 | <backdrop name="lamp209" element="matrixlamp" state="0">
|
| 1115 | <bounds x="8" y="104" width="7" height="7"/>
|
| 1116 | </backdrop>
|
| 1117 | <backdrop name="lamp210" element="matrixlamp" state="0">
|
| 1118 | <bounds x="16" y="104" width="7" height="7"/>
|
| 1119 | </backdrop>
|
| 1120 | <backdrop name="lamp211" element="matrixlamp" state="0">
|
| 1121 | <bounds x="24" y="104" width="7" height="7"/>
|
| 1122 | </backdrop>
|
| 1123 | <backdrop name="lamp212" element="matrixlamp" state="0">
|
| 1124 | <bounds x="32" y="104" width="7" height="7"/>
|
| 1125 | </backdrop>
|
| 1126 | <backdrop name="lamp213" element="matrixlamp" state="0">
|
| 1127 | <bounds x="40" y="104" width="7" height="7"/>
|
| 1128 | </backdrop>
|
| 1129 | <backdrop name="lamp214" element="matrixlamp" state="0">
|
| 1130 | <bounds x="48" y="104" width="7" height="7"/>
|
| 1131 | </backdrop>
|
| 1132 | <backdrop name="lamp215" element="matrixlamp" state="0">
|
| 1133 | <bounds x="56" y="104" width="7" height="7"/>
|
| 1134 | </backdrop>
|
| 1135 | <backdrop name="lamp216" element="matrixlamp" state="0">
|
| 1136 | <bounds x="64" y="104" width="7" height="7"/>
|
| 1137 | </backdrop>
|
| 1138 | <backdrop name="lamp217" element="matrixlamp" state="0">
|
| 1139 | <bounds x="72" y="104" width="7" height="7"/>
|
| 1140 | </backdrop>
|
| 1141 | <backdrop name="lamp218" element="matrixlamp" state="0">
|
| 1142 | <bounds x="80" y="104" width="7" height="7"/>
|
| 1143 | </backdrop>
|
| 1144 | <backdrop name="lamp219" element="matrixlamp" state="0">
|
| 1145 | <bounds x="88" y="104" width="7" height="7"/>
|
| 1146 | </backdrop>
|
| 1147 | <backdrop name="lamp220" element="matrixlamp" state="0">
|
| 1148 | <bounds x="96" y="104" width="7" height="7"/>
|
| 1149 | </backdrop>
|
| 1150 | <backdrop name="lamp221" element="matrixlamp" state="0">
|
| 1151 | <bounds x="104" y="104" width="7" height="7"/>
|
| 1152 | </backdrop>
|
| 1153 | <backdrop name="lamp222" element="matrixlamp" state="0">
|
| 1154 | <bounds x="112" y="104" width="7" height="7"/>
|
| 1155 | </backdrop>
|
| 1156 | <backdrop name="lamp223" element="matrixlamp" state="0">
|
| 1157 | <bounds x="120" y="104" width="7" height="7"/>
|
| 1158 | </backdrop>
|
| 1159 | <backdrop name="lamp224" element="matrixlamp" state="0">
|
| 1160 | <bounds x="0" y="112" width="7" height="7"/>
|
| 1161 | </backdrop>
|
| 1162 | <backdrop name="lamp225" element="matrixlamp" state="0">
|
| 1163 | <bounds x="8" y="112" width="7" height="7"/>
|
| 1164 | </backdrop>
|
| 1165 | <backdrop name="lamp226" element="matrixlamp" state="0">
|
| 1166 | <bounds x="16" y="112" width="7" height="7"/>
|
| 1167 | </backdrop>
|
| 1168 | <backdrop name="lamp227" element="matrixlamp" state="0">
|
| 1169 | <bounds x="24" y="112" width="7" height="7"/>
|
| 1170 | </backdrop>
|
| 1171 | <backdrop name="lamp228" element="matrixlamp" state="0">
|
| 1172 | <bounds x="32" y="112" width="7" height="7"/>
|
| 1173 | </backdrop>
|
| 1174 | <backdrop name="lamp229" element="matrixlamp" state="0">
|
| 1175 | <bounds x="40" y="112" width="7" height="7"/>
|
| 1176 | </backdrop>
|
| 1177 | <backdrop name="lamp230" element="matrixlamp" state="0">
|
| 1178 | <bounds x="48" y="112" width="7" height="7"/>
|
| 1179 | </backdrop>
|
| 1180 | <backdrop name="lamp231" element="matrixlamp" state="0">
|
| 1181 | <bounds x="56" y="112" width="7" height="7"/>
|
| 1182 | </backdrop>
|
| 1183 | <backdrop name="lamp232" element="matrixlamp" state="0">
|
| 1184 | <bounds x="64" y="112" width="7" height="7"/>
|
| 1185 | </backdrop>
|
| 1186 | <backdrop name="lamp233" element="matrixlamp" state="0">
|
| 1187 | <bounds x="72" y="112" width="7" height="7"/>
|
| 1188 | </backdrop>
|
| 1189 | <backdrop name="lamp234" element="matrixlamp" state="0">
|
| 1190 | <bounds x="80" y="112" width="7" height="7"/>
|
| 1191 | </backdrop>
|
| 1192 | <backdrop name="lamp235" element="matrixlamp" state="0">
|
| 1193 | <bounds x="88" y="112" width="7" height="7"/>
|
| 1194 | </backdrop>
|
| 1195 | <backdrop name="lamp236" element="matrixlamp" state="0">
|
| 1196 | <bounds x="96" y="112" width="7" height="7"/>
|
| 1197 | </backdrop>
|
| 1198 | <backdrop name="lamp237" element="matrixlamp" state="0">
|
| 1199 | <bounds x="104" y="112" width="7" height="7"/>
|
| 1200 | </backdrop>
|
| 1201 | <backdrop name="lamp238" element="matrixlamp" state="0">
|
| 1202 | <bounds x="112" y="112" width="7" height="7"/>
|
| 1203 | </backdrop>
|
| 1204 | <backdrop name="lamp239" element="matrixlamp" state="0">
|
| 1205 | <bounds x="120" y="112" width="7" height="7"/>
|
| 1206 | </backdrop>
|
| 1207 | <backdrop name="lamp240" element="matrixlamp" state="0">
|
| 1208 | <bounds x="0" y="120" width="7" height="7"/>
|
| 1209 | </backdrop>
|
| 1210 | <backdrop name="lamp241" element="matrixlamp" state="0">
|
| 1211 | <bounds x="8" y="120" width="7" height="7"/>
|
| 1212 | </backdrop>
|
| 1213 | <backdrop name="lamp242" element="matrixlamp" state="0">
|
| 1214 | <bounds x="16" y="120" width="7" height="7"/>
|
| 1215 | </backdrop>
|
| 1216 | <backdrop name="lamp243" element="matrixlamp" state="0">
|
| 1217 | <bounds x="24" y="120" width="7" height="7"/>
|
| 1218 | </backdrop>
|
| 1219 | <backdrop name="lamp244" element="matrixlamp" state="0">
|
| 1220 | <bounds x="32" y="120" width="7" height="7"/>
|
| 1221 | </backdrop>
|
| 1222 | <backdrop name="lamp245" element="matrixlamp" state="0">
|
| 1223 | <bounds x="40" y="120" width="7" height="7"/>
|
| 1224 | </backdrop>
|
| 1225 | <backdrop name="lamp246" element="matrixlamp" state="0">
|
| 1226 | <bounds x="48" y="120" width="7" height="7"/>
|
| 1227 | </backdrop>
|
| 1228 | <backdrop name="lamp247" element="matrixlamp" state="0">
|
| 1229 | <bounds x="56" y="120" width="7" height="7"/>
|
| 1230 | </backdrop>
|
| 1231 | <backdrop name="lamp248" element="matrixlamp" state="0">
|
| 1232 | <bounds x="64" y="120" width="7" height="7"/>
|
| 1233 | </backdrop>
|
| 1234 | <backdrop name="lamp249" element="matrixlamp" state="0">
|
| 1235 | <bounds x="72" y="120" width="7" height="7"/>
|
| 1236 | </backdrop>
|
| 1237 | <backdrop name="lamp250" element="matrixlamp" state="0">
|
| 1238 | <bounds x="80" y="120" width="7" height="7"/>
|
| 1239 | </backdrop>
|
| 1240 | <backdrop name="lamp251" element="matrixlamp" state="0">
|
| 1241 | <bounds x="88" y="120" width="7" height="7"/>
|
| 1242 | </backdrop>
|
| 1243 | <backdrop name="lamp252" element="matrixlamp" state="0">
|
| 1244 | <bounds x="96" y="120" width="7" height="7"/>
|
| 1245 | </backdrop>
|
| 1246 | <backdrop name="lamp253" element="matrixlamp" state="0">
|
| 1247 | <bounds x="104" y="120" width="7" height="7"/>
|
| 1248 | </backdrop>
|
| 1249 | <backdrop name="lamp254" element="matrixlamp" state="0">
|
| 1250 | <bounds x="112" y="120" width="7" height="7"/>
|
| 1251 | </backdrop>
|
| 1252 | <backdrop name="lamp255" element="matrixlamp" state="0">
|
| 1253 | <bounds x="120" y="120" width="7" height="7"/>
|
| 1254 | </backdrop>
|
| 1255 | |
| 1256 | |
| 1257 | |
| 1258 | |
| 1259 | <backdrop name="matrix0" element="matrixlamp" state="0">
|
| 1260 | <bounds y="0" x="180" width="3" height="3"/>
|
| 1261 | </backdrop>
|
| 1262 | <backdrop name="matrix1" element="matrixlamp" state="0">
|
| 1263 | <bounds y="4" x="180" width="3" height="3"/>
|
| 1264 | </backdrop>
|
| 1265 | <backdrop name="matrix2" element="matrixlamp" state="0">
|
| 1266 | <bounds y="8" x="180" width="3" height="3"/>
|
| 1267 | </backdrop>
|
| 1268 | <backdrop name="matrix3" element="matrixlamp" state="0">
|
| 1269 | <bounds y="12" x="180" width="3" height="3"/>
|
| 1270 | </backdrop>
|
| 1271 | <backdrop name="matrix4" element="matrixlamp" state="0">
|
| 1272 | <bounds y="16" x="180" width="3" height="3"/>
|
| 1273 | </backdrop>
|
| 1274 | <backdrop name="matrix5" element="matrixlamp" state="0">
|
| 1275 | <bounds y="20" x="180" width="3" height="3"/>
|
| 1276 | </backdrop>
|
| 1277 | <backdrop name="matrix6" element="matrixlamp" state="0">
|
| 1278 | <bounds y="24" x="180" width="3" height="3"/>
|
| 1279 | </backdrop>
|
| 1280 | <backdrop name="matrix7" element="matrixlamp" state="0">
|
| 1281 | <bounds y="28" x="180" width="3" height="3"/>
|
| 1282 | </backdrop>
|
| 1283 | <backdrop name="matrix8" element="matrixlamp" state="0">
|
| 1284 | <bounds y="0" x="184" width="3" height="3"/>
|
| 1285 | </backdrop>
|
| 1286 | <backdrop name="matrix9" element="matrixlamp" state="0">
|
| 1287 | <bounds y="4" x="184" width="3" height="3"/>
|
| 1288 | </backdrop>
|
| 1289 | <backdrop name="matrix10" element="matrixlamp" state="0">
|
| 1290 | <bounds y="8" x="184" width="3" height="3"/>
|
| 1291 | </backdrop>
|
| 1292 | <backdrop name="matrix11" element="matrixlamp" state="0">
|
| 1293 | <bounds y="12" x="184" width="3" height="3"/>
|
| 1294 | </backdrop>
|
| 1295 | <backdrop name="matrix12" element="matrixlamp" state="0">
|
| 1296 | <bounds y="16" x="184" width="3" height="3"/>
|
| 1297 | </backdrop>
|
| 1298 | <backdrop name="matrix13" element="matrixlamp" state="0">
|
| 1299 | <bounds y="20" x="184" width="3" height="3"/>
|
| 1300 | </backdrop>
|
| 1301 | <backdrop name="matrix14" element="matrixlamp" state="0">
|
| 1302 | <bounds y="24" x="184" width="3" height="3"/>
|
| 1303 | </backdrop>
|
| 1304 | <backdrop name="matrix15" element="matrixlamp" state="0">
|
| 1305 | <bounds y="28" x="184" width="3" height="3"/>
|
| 1306 | </backdrop>
|
| 1307 | <backdrop name="matrix16" element="matrixlamp" state="0">
|
| 1308 | <bounds y="0" x="188" width="3" height="3"/>
|
| 1309 | </backdrop>
|
| 1310 | <backdrop name="matrix17" element="matrixlamp" state="0">
|
| 1311 | <bounds y="4" x="188" width="3" height="3"/>
|
| 1312 | </backdrop>
|
| 1313 | <backdrop name="matrix18" element="matrixlamp" state="0">
|
| 1314 | <bounds y="8" x="188" width="3" height="3"/>
|
| 1315 | </backdrop>
|
| 1316 | <backdrop name="matrix19" element="matrixlamp" state="0">
|
| 1317 | <bounds y="12" x="188" width="3" height="3"/>
|
| 1318 | </backdrop>
|
| 1319 | <backdrop name="matrix20" element="matrixlamp" state="0">
|
| 1320 | <bounds y="16" x="188" width="3" height="3"/>
|
| 1321 | </backdrop>
|
| 1322 | <backdrop name="matrix21" element="matrixlamp" state="0">
|
| 1323 | <bounds y="20" x="188" width="3" height="3"/>
|
| 1324 | </backdrop>
|
| 1325 | <backdrop name="matrix22" element="matrixlamp" state="0">
|
| 1326 | <bounds y="24" x="188" width="3" height="3"/>
|
| 1327 | </backdrop>
|
| 1328 | <backdrop name="matrix23" element="matrixlamp" state="0">
|
| 1329 | <bounds y="28" x="188" width="3" height="3"/>
|
| 1330 | </backdrop>
|
| 1331 | <backdrop name="matrix24" element="matrixlamp" state="0">
|
| 1332 | <bounds y="0" x="192" width="3" height="3"/>
|
| 1333 | </backdrop>
|
| 1334 | <backdrop name="matrix25" element="matrixlamp" state="0">
|
| 1335 | <bounds y="4" x="192" width="3" height="3"/>
|
| 1336 | </backdrop>
|
| 1337 | <backdrop name="matrix26" element="matrixlamp" state="0">
|
| 1338 | <bounds y="8" x="192" width="3" height="3"/>
|
| 1339 | </backdrop>
|
| 1340 | <backdrop name="matrix27" element="matrixlamp" state="0">
|
| 1341 | <bounds y="12" x="192" width="3" height="3"/>
|
| 1342 | </backdrop>
|
| 1343 | <backdrop name="matrix28" element="matrixlamp" state="0">
|
| 1344 | <bounds y="16" x="192" width="3" height="3"/>
|
| 1345 | </backdrop>
|
| 1346 | <backdrop name="matrix29" element="matrixlamp" state="0">
|
| 1347 | <bounds y="20" x="192" width="3" height="3"/>
|
| 1348 | </backdrop>
|
| 1349 | <backdrop name="matrix30" element="matrixlamp" state="0">
|
| 1350 | <bounds y="24" x="192" width="3" height="3"/>
|
| 1351 | </backdrop>
|
| 1352 | <backdrop name="matrix31" element="matrixlamp" state="0">
|
| 1353 | <bounds y="28" x="192" width="3" height="3"/>
|
| 1354 | </backdrop>
|
| 1355 | <backdrop name="matrix32" element="matrixlamp" state="0">
|
| 1356 | <bounds y="0" x="196" width="3" height="3"/>
|
| 1357 | </backdrop>
|
| 1358 | <backdrop name="matrix33" element="matrixlamp" state="0">
|
| 1359 | <bounds y="4" x="196" width="3" height="3"/>
|
| 1360 | </backdrop>
|
| 1361 | <backdrop name="matrix34" element="matrixlamp" state="0">
|
| 1362 | <bounds y="8" x="196" width="3" height="3"/>
|
| 1363 | </backdrop>
|
| 1364 | <backdrop name="matrix35" element="matrixlamp" state="0">
|
| 1365 | <bounds y="12" x="196" width="3" height="3"/>
|
| 1366 | </backdrop>
|
| 1367 | <backdrop name="matrix36" element="matrixlamp" state="0">
|
| 1368 | <bounds y="16" x="196" width="3" height="3"/>
|
| 1369 | </backdrop>
|
| 1370 | <backdrop name="matrix37" element="matrixlamp" state="0">
|
| 1371 | <bounds y="20" x="196" width="3" height="3"/>
|
| 1372 | </backdrop>
|
| 1373 | <backdrop name="matrix38" element="matrixlamp" state="0">
|
| 1374 | <bounds y="24" x="196" width="3" height="3"/>
|
| 1375 | </backdrop>
|
| 1376 | <backdrop name="matrix39" element="matrixlamp" state="0">
|
| 1377 | <bounds y="28" x="196" width="3" height="3"/>
|
| 1378 | </backdrop>
|
| 1379 |
|
| 1380 | |
| 1381 | <backdrop name="matrix40" element="matrixlamp" state="0">
|
| 1382 | <bounds y="0" x="202" width="3" height="3"/>
|
| 1383 | </backdrop>
|
| 1384 | <backdrop name="matrix41" element="matrixlamp" state="0">
|
| 1385 | <bounds y="4" x="202" width="3" height="3"/>
|
| 1386 | </backdrop>
|
| 1387 | <backdrop name="matrix42" element="matrixlamp" state="0">
|
| 1388 | <bounds y="8" x="202" width="3" height="3"/>
|
| 1389 | </backdrop>
|
| 1390 | <backdrop name="matrix43" element="matrixlamp" state="0">
|
| 1391 | <bounds y="12" x="202" width="3" height="3"/>
|
| 1392 | </backdrop>
|
| 1393 | <backdrop name="matrix44" element="matrixlamp" state="0">
|
| 1394 | <bounds y="16" x="202" width="3" height="3"/>
|
| 1395 | </backdrop>
|
| 1396 | <backdrop name="matrix45" element="matrixlamp" state="0">
|
| 1397 | <bounds y="20" x="202" width="3" height="3"/>
|
| 1398 | </backdrop>
|
| 1399 | <backdrop name="matrix46" element="matrixlamp" state="0">
|
| 1400 | <bounds y="24" x="202" width="3" height="3"/>
|
| 1401 | </backdrop>
|
| 1402 | <backdrop name="matrix47" element="matrixlamp" state="0">
|
| 1403 | <bounds y="28" x="202" width="3" height="3"/>
|
| 1404 | </backdrop>
|
| 1405 | <backdrop name="matrix48" element="matrixlamp" state="0">
|
| 1406 | <bounds y="0" x="206" width="3" height="3"/>
|
| 1407 | </backdrop>
|
| 1408 | <backdrop name="matrix49" element="matrixlamp" state="0">
|
| 1409 | <bounds y="4" x="206" width="3" height="3"/>
|
| 1410 | </backdrop>
|
| 1411 | <backdrop name="matrix50" element="matrixlamp" state="0">
|
| 1412 | <bounds y="8" x="206" width="3" height="3"/>
|
| 1413 | </backdrop>
|
| 1414 | <backdrop name="matrix51" element="matrixlamp" state="0">
|
| 1415 | <bounds y="12" x="206" width="3" height="3"/>
|
| 1416 | </backdrop>
|
| 1417 | <backdrop name="matrix52" element="matrixlamp" state="0">
|
| 1418 | <bounds y="16" x="206" width="3" height="3"/>
|
| 1419 | </backdrop>
|
| 1420 | <backdrop name="matrix53" element="matrixlamp" state="0">
|
| 1421 | <bounds y="20" x="206" width="3" height="3"/>
|
| 1422 | </backdrop>
|
| 1423 | <backdrop name="matrix54" element="matrixlamp" state="0">
|
| 1424 | <bounds y="24" x="206" width="3" height="3"/>
|
| 1425 | </backdrop>
|
| 1426 | <backdrop name="matrix55" element="matrixlamp" state="0">
|
| 1427 | <bounds y="28" x="206" width="3" height="3"/>
|
| 1428 | </backdrop>
|
| 1429 | <backdrop name="matrix56" element="matrixlamp" state="0">
|
| 1430 | <bounds y="0" x="210" width="3" height="3"/>
|
| 1431 | </backdrop>
|
| 1432 | <backdrop name="matrix57" element="matrixlamp" state="0">
|
| 1433 | <bounds y="4" x="210" width="3" height="3"/>
|
| 1434 | </backdrop>
|
| 1435 | <backdrop name="matrix58" element="matrixlamp" state="0">
|
| 1436 | <bounds y="8" x="210" width="3" height="3"/>
|
| 1437 | </backdrop>
|
| 1438 | <backdrop name="matrix59" element="matrixlamp" state="0">
|
| 1439 | <bounds y="12" x="210" width="3" height="3"/>
|
| 1440 | </backdrop>
|
| 1441 | <backdrop name="matrix60" element="matrixlamp" state="0">
|
| 1442 | <bounds y="16" x="210" width="3" height="3"/>
|
| 1443 | </backdrop>
|
| 1444 | <backdrop name="matrix61" element="matrixlamp" state="0">
|
| 1445 | <bounds y="20" x="210" width="3" height="3"/>
|
| 1446 | </backdrop>
|
| 1447 | <backdrop name="matrix62" element="matrixlamp" state="0">
|
| 1448 | <bounds y="24" x="210" width="3" height="3"/>
|
| 1449 | </backdrop>
|
| 1450 | <backdrop name="matrix63" element="matrixlamp" state="0">
|
| 1451 | <bounds y="28" x="210" width="3" height="3"/>
|
| 1452 | </backdrop>
|
| 1453 | <backdrop name="matrix64" element="matrixlamp" state="0">
|
| 1454 | <bounds y="0" x="214" width="3" height="3"/>
|
| 1455 | </backdrop>
|
| 1456 | <backdrop name="matrix65" element="matrixlamp" state="0">
|
| 1457 | <bounds y="4" x="214" width="3" height="3"/>
|
| 1458 | </backdrop>
|
| 1459 | <backdrop name="matrix66" element="matrixlamp" state="0">
|
| 1460 | <bounds y="8" x="214" width="3" height="3"/>
|
| 1461 | </backdrop>
|
| 1462 | <backdrop name="matrix67" element="matrixlamp" state="0">
|
| 1463 | <bounds y="12" x="214" width="3" height="3"/>
|
| 1464 | </backdrop>
|
| 1465 | <backdrop name="matrix68" element="matrixlamp" state="0">
|
| 1466 | <bounds y="16" x="214" width="3" height="3"/>
|
| 1467 | </backdrop>
|
| 1468 | <backdrop name="matrix69" element="matrixlamp" state="0">
|
| 1469 | <bounds y="20" x="214" width="3" height="3"/>
|
| 1470 | </backdrop>
|
| 1471 | <backdrop name="matrix70" element="matrixlamp" state="0">
|
| 1472 | <bounds y="24" x="214" width="3" height="3"/>
|
| 1473 | </backdrop>
|
| 1474 | <backdrop name="matrix71" element="matrixlamp" state="0">
|
| 1475 | <bounds y="28" x="214" width="3" height="3"/>
|
| 1476 | </backdrop>
|
| 1477 | <backdrop name="matrix72" element="matrixlamp" state="0">
|
| 1478 | <bounds y="0" x="218" width="3" height="3"/>
|
| 1479 | </backdrop>
|
| 1480 | <backdrop name="matrix73" element="matrixlamp" state="0">
|
| 1481 | <bounds y="4" x="218" width="3" height="3"/>
|
| 1482 | </backdrop>
|
| 1483 | <backdrop name="matrix74" element="matrixlamp" state="0">
|
| 1484 | <bounds y="8" x="218" width="3" height="3"/>
|
| 1485 | </backdrop>
|
| 1486 | <backdrop name="matrix75" element="matrixlamp" state="0">
|
| 1487 | <bounds y="12" x="218" width="3" height="3"/>
|
| 1488 | </backdrop>
|
| 1489 | <backdrop name="matrix76" element="matrixlamp" state="0">
|
| 1490 | <bounds y="16" x="218" width="3" height="3"/>
|
| 1491 | </backdrop>
|
| 1492 | <backdrop name="matrix77" element="matrixlamp" state="0">
|
| 1493 | <bounds y="20" x="218" width="3" height="3"/>
|
| 1494 | </backdrop>
|
| 1495 | <backdrop name="matrix78" element="matrixlamp" state="0">
|
| 1496 | <bounds y="24" x="218" width="3" height="3"/>
|
| 1497 | </backdrop>
|
| 1498 | <backdrop name="matrix79" element="matrixlamp" state="0">
|
| 1499 | <bounds y="28" x="218" width="3" height="3"/>
|
| 1500 | </backdrop>
|
| 1501 | |
| 1502 | |
| 1503 | <backdrop name="matrix80" element="matrixlamp" state="0">
|
| 1504 | <bounds y="0" x="224" width="3" height="3"/>
|
| 1505 | </backdrop>
|
| 1506 | <backdrop name="matrix81" element="matrixlamp" state="0">
|
| 1507 | <bounds y="4" x="224" width="3" height="3"/>
|
| 1508 | </backdrop>
|
| 1509 | <backdrop name="matrix82" element="matrixlamp" state="0">
|
| 1510 | <bounds y="8" x="224" width="3" height="3"/>
|
| 1511 | </backdrop>
|
| 1512 | <backdrop name="matrix83" element="matrixlamp" state="0">
|
| 1513 | <bounds y="12" x="224" width="3" height="3"/>
|
| 1514 | </backdrop>
|
| 1515 | <backdrop name="matrix84" element="matrixlamp" state="0">
|
| 1516 | <bounds y="16" x="224" width="3" height="3"/>
|
| 1517 | </backdrop>
|
| 1518 | <backdrop name="matrix85" element="matrixlamp" state="0">
|
| 1519 | <bounds y="20" x="224" width="3" height="3"/>
|
| 1520 | </backdrop>
|
| 1521 | <backdrop name="matrix86" element="matrixlamp" state="0">
|
| 1522 | <bounds y="24" x="224" width="3" height="3"/>
|
| 1523 | </backdrop>
|
| 1524 | <backdrop name="matrix87" element="matrixlamp" state="0">
|
| 1525 | <bounds y="28" x="224" width="3" height="3"/>
|
| 1526 | </backdrop>
|
| 1527 | <backdrop name="matrix88" element="matrixlamp" state="0">
|
| 1528 | <bounds y="0" x="228" width="3" height="3"/>
|
| 1529 | </backdrop>
|
| 1530 | <backdrop name="matrix89" element="matrixlamp" state="0">
|
| 1531 | <bounds y="4" x="228" width="3" height="3"/>
|
| 1532 | </backdrop>
|
| 1533 | <backdrop name="matrix90" element="matrixlamp" state="0">
|
| 1534 | <bounds y="8" x="228" width="3" height="3"/>
|
| 1535 | </backdrop>
|
| 1536 | <backdrop name="matrix91" element="matrixlamp" state="0">
|
| 1537 | <bounds y="12" x="228" width="3" height="3"/>
|
| 1538 | </backdrop>
|
| 1539 | <backdrop name="matrix92" element="matrixlamp" state="0">
|
| 1540 | <bounds y="16" x="228" width="3" height="3"/>
|
| 1541 | </backdrop>
|
| 1542 | <backdrop name="matrix93" element="matrixlamp" state="0">
|
| 1543 | <bounds y="20" x="228" width="3" height="3"/>
|
| 1544 | </backdrop>
|
| 1545 | <backdrop name="matrix94" element="matrixlamp" state="0">
|
| 1546 | <bounds y="24" x="228" width="3" height="3"/>
|
| 1547 | </backdrop>
|
| 1548 | <backdrop name="matrix95" element="matrixlamp" state="0">
|
| 1549 | <bounds y="28" x="228" width="3" height="3"/>
|
| 1550 | </backdrop>
|
| 1551 | <backdrop name="matrix96" element="matrixlamp" state="0">
|
| 1552 | <bounds y="0" x="232" width="3" height="3"/>
|
| 1553 | </backdrop>
|
| 1554 | <backdrop name="matrix97" element="matrixlamp" state="0">
|
| 1555 | <bounds y="4" x="232" width="3" height="3"/>
|
| 1556 | </backdrop>
|
| 1557 | <backdrop name="matrix98" element="matrixlamp" state="0">
|
| 1558 | <bounds y="8" x="232" width="3" height="3"/>
|
| 1559 | </backdrop>
|
| 1560 | <backdrop name="matrix99" element="matrixlamp" state="0">
|
| 1561 | <bounds y="12" x="232" width="3" height="3"/>
|
| 1562 | </backdrop>
|
| 1563 | <backdrop name="matrix100" element="matrixlamp" state="0">
|
| 1564 | <bounds y="16" x="232" width="3" height="3"/>
|
| 1565 | </backdrop>
|
| 1566 | <backdrop name="matrix101" element="matrixlamp" state="0">
|
| 1567 | <bounds y="20" x="232" width="3" height="3"/>
|
| 1568 | </backdrop>
|
| 1569 | <backdrop name="matrix102" element="matrixlamp" state="0">
|
| 1570 | <bounds y="24" x="232" width="3" height="3"/>
|
| 1571 | </backdrop>
|
| 1572 | <backdrop name="matrix103" element="matrixlamp" state="0">
|
| 1573 | <bounds y="28" x="232" width="3" height="3"/>
|
| 1574 | </backdrop>
|
| 1575 | <backdrop name="matrix104" element="matrixlamp" state="0">
|
| 1576 | <bounds y="0" x="236" width="3" height="3"/>
|
| 1577 | </backdrop>
|
| 1578 | <backdrop name="matrix105" element="matrixlamp" state="0">
|
| 1579 | <bounds y="4" x="236" width="3" height="3"/>
|
| 1580 | </backdrop>
|
| 1581 | <backdrop name="matrix106" element="matrixlamp" state="0">
|
| 1582 | <bounds y="8" x="236" width="3" height="3"/>
|
| 1583 | </backdrop>
|
| 1584 | <backdrop name="matrix107" element="matrixlamp" state="0">
|
| 1585 | <bounds y="12" x="236" width="3" height="3"/>
|
| 1586 | </backdrop>
|
| 1587 | <backdrop name="matrix108" element="matrixlamp" state="0">
|
| 1588 | <bounds y="16" x="236" width="3" height="3"/>
|
| 1589 | </backdrop>
|
| 1590 | <backdrop name="matrix109" element="matrixlamp" state="0">
|
| 1591 | <bounds y="20" x="236" width="3" height="3"/>
|
| 1592 | </backdrop>
|
| 1593 | <backdrop name="matrix110" element="matrixlamp" state="0">
|
| 1594 | <bounds y="24" x="236" width="3" height="3"/>
|
| 1595 | </backdrop>
|
| 1596 | <backdrop name="matrix111" element="matrixlamp" state="0">
|
| 1597 | <bounds y="28" x="236" width="3" height="3"/>
|
| 1598 | </backdrop>
|
| 1599 | <backdrop name="matrix112" element="matrixlamp" state="0">
|
| 1600 | <bounds y="0" x="240" width="3" height="3"/>
|
| 1601 | </backdrop>
|
| 1602 | <backdrop name="matrix113" element="matrixlamp" state="0">
|
| 1603 | <bounds y="4" x="240" width="3" height="3"/>
|
| 1604 | </backdrop>
|
| 1605 | <backdrop name="matrix114" element="matrixlamp" state="0">
|
| 1606 | <bounds y="8" x="240" width="3" height="3"/>
|
| 1607 | </backdrop>
|
| 1608 | <backdrop name="matrix115" element="matrixlamp" state="0">
|
| 1609 | <bounds y="12" x="240" width="3" height="3"/>
|
| 1610 | </backdrop>
|
| 1611 | <backdrop name="matrix116" element="matrixlamp" state="0">
|
| 1612 | <bounds y="16" x="240" width="3" height="3"/>
|
| 1613 | </backdrop>
|
| 1614 | <backdrop name="matrix117" element="matrixlamp" state="0">
|
| 1615 | <bounds y="20" x="240" width="3" height="3"/>
|
| 1616 | </backdrop>
|
| 1617 | <backdrop name="matrix118" element="matrixlamp" state="0">
|
| 1618 | <bounds y="24" x="240" width="3" height="3"/>
|
| 1619 | </backdrop>
|
| 1620 | <backdrop name="matrix119" element="matrixlamp" state="0">
|
| 1621 | <bounds y="28" x="240" width="3" height="3"/>
|
| 1622 | </backdrop>
|
| 1623 | |
| 1624 | |
| 1625 | <backdrop name="matrix120" element="matrixlamp" state="0">
|
| 1626 | <bounds y="0" x="246" width="3" height="3"/>
|
| 1627 | </backdrop>
|
| 1628 | <backdrop name="matrix121" element="matrixlamp" state="0">
|
| 1629 | <bounds y="4" x="246" width="3" height="3"/>
|
| 1630 | </backdrop>
|
| 1631 | <backdrop name="matrix122" element="matrixlamp" state="0">
|
| 1632 | <bounds y="8" x="246" width="3" height="3"/>
|
| 1633 | </backdrop>
|
| 1634 | <backdrop name="matrix123" element="matrixlamp" state="0">
|
| 1635 | <bounds y="12" x="246" width="3" height="3"/>
|
| 1636 | </backdrop>
|
| 1637 | <backdrop name="matrix124" element="matrixlamp" state="0">
|
| 1638 | <bounds y="16" x="246" width="3" height="3"/>
|
| 1639 | </backdrop>
|
| 1640 | <backdrop name="matrix125" element="matrixlamp" state="0">
|
| 1641 | <bounds y="20" x="246" width="3" height="3"/>
|
| 1642 | </backdrop>
|
| 1643 | <backdrop name="matrix126" element="matrixlamp" state="0">
|
| 1644 | <bounds y="24" x="246" width="3" height="3"/>
|
| 1645 | </backdrop>
|
| 1646 | <backdrop name="matrix127" element="matrixlamp" state="0">
|
| 1647 | <bounds y="28" x="246" width="3" height="3"/>
|
| 1648 | </backdrop>
|
| 1649 | <backdrop name="matrix128" element="matrixlamp" state="0">
|
| 1650 | <bounds y="0" x="250" width="3" height="3"/>
|
| 1651 | </backdrop>
|
| 1652 | <backdrop name="matrix129" element="matrixlamp" state="0">
|
| 1653 | <bounds y="4" x="250" width="3" height="3"/>
|
| 1654 | </backdrop>
|
| 1655 | <backdrop name="matrix130" element="matrixlamp" state="0">
|
| 1656 | <bounds y="8" x="250" width="3" height="3"/>
|
| 1657 | </backdrop>
|
| 1658 | <backdrop name="matrix131" element="matrixlamp" state="0">
|
| 1659 | <bounds y="12" x="250" width="3" height="3"/>
|
| 1660 | </backdrop>
|
| 1661 | <backdrop name="matrix132" element="matrixlamp" state="0">
|
| 1662 | <bounds y="16" x="250" width="3" height="3"/>
|
| 1663 | </backdrop>
|
| 1664 | <backdrop name="matrix133" element="matrixlamp" state="0">
|
| 1665 | <bounds y="20" x="250" width="3" height="3"/>
|
| 1666 | </backdrop>
|
| 1667 | <backdrop name="matrix134" element="matrixlamp" state="0">
|
| 1668 | <bounds y="24" x="250" width="3" height="3"/>
|
| 1669 | </backdrop>
|
| 1670 | <backdrop name="matrix135" element="matrixlamp" state="0">
|
| 1671 | <bounds y="28" x="250" width="3" height="3"/>
|
| 1672 | </backdrop>
|
| 1673 | <backdrop name="matrix136" element="matrixlamp" state="0">
|
| 1674 | <bounds y="0" x="254" width="3" height="3"/>
|
| 1675 | </backdrop>
|
| 1676 | <backdrop name="matrix137" element="matrixlamp" state="0">
|
| 1677 | <bounds y="4" x="254" width="3" height="3"/>
|
| 1678 | </backdrop>
|
| 1679 | <backdrop name="matrix138" element="matrixlamp" state="0">
|
| 1680 | <bounds y="8" x="254" width="3" height="3"/>
|
| 1681 | </backdrop>
|
| 1682 | <backdrop name="matrix139" element="matrixlamp" state="0">
|
| 1683 | <bounds y="12" x="254" width="3" height="3"/>
|
| 1684 | </backdrop>
|
| 1685 | <backdrop name="matrix140" element="matrixlamp" state="0">
|
| 1686 | <bounds y="16" x="254" width="3" height="3"/>
|
| 1687 | </backdrop>
|
| 1688 | <backdrop name="matrix141" element="matrixlamp" state="0">
|
| 1689 | <bounds y="20" x="254" width="3" height="3"/>
|
| 1690 | </backdrop>
|
| 1691 | <backdrop name="matrix142" element="matrixlamp" state="0">
|
| 1692 | <bounds y="24" x="254" width="3" height="3"/>
|
| 1693 | </backdrop>
|
| 1694 | <backdrop name="matrix143" element="matrixlamp" state="0">
|
| 1695 | <bounds y="28" x="254" width="3" height="3"/>
|
| 1696 | </backdrop>
|
| 1697 | <backdrop name="matrix144" element="matrixlamp" state="0">
|
| 1698 | <bounds y="0" x="258" width="3" height="3"/>
|
| 1699 | </backdrop>
|
| 1700 | <backdrop name="matrix145" element="matrixlamp" state="0">
|
| 1701 | <bounds y="4" x="258" width="3" height="3"/>
|
| 1702 | </backdrop>
|
| 1703 | <backdrop name="matrix146" element="matrixlamp" state="0">
|
| 1704 | <bounds y="8" x="258" width="3" height="3"/>
|
| 1705 | </backdrop>
|
| 1706 | <backdrop name="matrix147" element="matrixlamp" state="0">
|
| 1707 | <bounds y="12" x="258" width="3" height="3"/>
|
| 1708 | </backdrop>
|
| 1709 | <backdrop name="matrix148" element="matrixlamp" state="0">
|
| 1710 | <bounds y="16" x="258" width="3" height="3"/>
|
| 1711 | </backdrop>
|
| 1712 | <backdrop name="matrix149" element="matrixlamp" state="0">
|
| 1713 | <bounds y="20" x="258" width="3" height="3"/>
|
| 1714 | </backdrop>
|
| 1715 | <backdrop name="matrix150" element="matrixlamp" state="0">
|
| 1716 | <bounds y="24" x="258" width="3" height="3"/>
|
| 1717 | </backdrop>
|
| 1718 | <backdrop name="matrix151" element="matrixlamp" state="0">
|
| 1719 | <bounds y="28" x="258" width="3" height="3"/>
|
| 1720 | </backdrop>
|
| 1721 | <backdrop name="matrix152" element="matrixlamp" state="0">
|
| 1722 | <bounds y="0" x="262" width="3" height="3"/>
|
| 1723 | </backdrop>
|
| 1724 | <backdrop name="matrix153" element="matrixlamp" state="0">
|
| 1725 | <bounds y="4" x="262" width="3" height="3"/>
|
| 1726 | </backdrop>
|
| 1727 | <backdrop name="matrix154" element="matrixlamp" state="0">
|
| 1728 | <bounds y="8" x="262" width="3" height="3"/>
|
| 1729 | </backdrop>
|
| 1730 | <backdrop name="matrix155" element="matrixlamp" state="0">
|
| 1731 | <bounds y="12" x="262" width="3" height="3"/>
|
| 1732 | </backdrop>
|
| 1733 | <backdrop name="matrix156" element="matrixlamp" state="0">
|
| 1734 | <bounds y="16" x="262" width="3" height="3"/>
|
| 1735 | </backdrop>
|
| 1736 | <backdrop name="matrix157" element="matrixlamp" state="0">
|
| 1737 | <bounds y="20" x="262" width="3" height="3"/>
|
| 1738 | </backdrop>
|
| 1739 | <backdrop name="matrix158" element="matrixlamp" state="0">
|
| 1740 | <bounds y="24" x="262" width="3" height="3"/>
|
| 1741 | </backdrop>
|
| 1742 | <backdrop name="matrix159" element="matrixlamp" state="0">
|
| 1743 | <bounds y="28" x="262" width="3" height="3"/>
|
| 1744 | </backdrop>
|
| 1745 | |
| 1746 | <!-- the rest of the elements tend to be used for 7-segs |
| 1747 | so render them as both -->
|
| 1748 | <backdrop name="matrix160" element="matrixlamp" state="0">
|
| 1749 | <bounds y="0" x="280" width="3" height="3"/>
|
| 1750 | </backdrop>
|
| 1751 | <backdrop name="matrix161" element="matrixlamp" state="0">
|
| 1752 | <bounds y="4" x="280" width="3" height="3"/>
|
| 1753 | </backdrop>
|
| 1754 | <backdrop name="matrix162" element="matrixlamp" state="0">
|
| 1755 | <bounds y="8" x="280" width="3" height="3"/>
|
| 1756 | </backdrop>
|
| 1757 | <backdrop name="matrix163" element="matrixlamp" state="0">
|
| 1758 | <bounds y="12" x="280" width="3" height="3"/>
|
| 1759 | </backdrop>
|
| 1760 | <backdrop name="matrix164" element="matrixlamp" state="0">
|
| 1761 | <bounds y="16" x="280" width="3" height="3"/>
|
| 1762 | </backdrop>
|
| 1763 | <backdrop name="matrix165" element="matrixlamp" state="0">
|
| 1764 | <bounds y="20" x="280" width="3" height="3"/>
|
| 1765 | </backdrop>
|
| 1766 | <backdrop name="matrix166" element="matrixlamp" state="0">
|
| 1767 | <bounds y="24" x="280" width="3" height="3"/>
|
| 1768 | </backdrop>
|
| 1769 | <backdrop name="matrix167" element="matrixlamp" state="0">
|
| 1770 | <bounds y="28" x="280" width="3" height="3"/>
|
| 1771 | </backdrop>
|
| 1772 | <backdrop name="matrix168" element="matrixlamp" state="0">
|
| 1773 | <bounds y="0" x="284" width="3" height="3"/>
|
| 1774 | </backdrop>
|
| 1775 | <backdrop name="matrix169" element="matrixlamp" state="0">
|
| 1776 | <bounds y="4" x="284" width="3" height="3"/>
|
| 1777 | </backdrop>
|
| 1778 | <backdrop name="matrix170" element="matrixlamp" state="0">
|
| 1779 | <bounds y="8" x="284" width="3" height="3"/>
|
| 1780 | </backdrop>
|
| 1781 | <backdrop name="matrix171" element="matrixlamp" state="0">
|
| 1782 | <bounds y="12" x="284" width="3" height="3"/>
|
| 1783 | </backdrop>
|
| 1784 | <backdrop name="matrix172" element="matrixlamp" state="0">
|
| 1785 | <bounds y="16" x="284" width="3" height="3"/>
|
| 1786 | </backdrop>
|
| 1787 | <backdrop name="matrix173" element="matrixlamp" state="0">
|
| 1788 | <bounds y="20" x="284" width="3" height="3"/>
|
| 1789 | </backdrop>
|
| 1790 | <backdrop name="matrix174" element="matrixlamp" state="0">
|
| 1791 | <bounds y="24" x="284" width="3" height="3"/>
|
| 1792 | </backdrop>
|
| 1793 | <backdrop name="matrix175" element="matrixlamp" state="0">
|
| 1794 | <bounds y="28" x="284" width="3" height="3"/>
|
| 1795 | </backdrop>
|
| 1796 | <backdrop name="matrix176" element="matrixlamp" state="0">
|
| 1797 | <bounds y="0" x="288" width="3" height="3"/>
|
| 1798 | </backdrop>
|
| 1799 | <backdrop name="matrix177" element="matrixlamp" state="0">
|
| 1800 | <bounds y="4" x="288" width="3" height="3"/>
|
| 1801 | </backdrop>
|
| 1802 | <backdrop name="matrix178" element="matrixlamp" state="0">
|
| 1803 | <bounds y="8" x="288" width="3" height="3"/>
|
| 1804 | </backdrop>
|
| 1805 | <backdrop name="matrix179" element="matrixlamp" state="0">
|
| 1806 | <bounds y="12" x="288" width="3" height="3"/>
|
| 1807 | </backdrop>
|
| 1808 | <backdrop name="matrix180" element="matrixlamp" state="0">
|
| 1809 | <bounds y="16" x="288" width="3" height="3"/>
|
| 1810 | </backdrop>
|
| 1811 | <backdrop name="matrix181" element="matrixlamp" state="0">
|
| 1812 | <bounds y="20" x="288" width="3" height="3"/>
|
| 1813 | </backdrop>
|
| 1814 | <backdrop name="matrix182" element="matrixlamp" state="0">
|
| 1815 | <bounds y="24" x="288" width="3" height="3"/>
|
| 1816 | </backdrop>
|
| 1817 | <backdrop name="matrix183" element="matrixlamp" state="0">
|
| 1818 | <bounds y="28" x="288" width="3" height="3"/>
|
| 1819 | </backdrop>
|
| 1820 | <backdrop name="matrix184" element="matrixlamp" state="0">
|
| 1821 | <bounds y="0" x="292" width="3" height="3"/>
|
| 1822 | </backdrop>
|
| 1823 | <backdrop name="matrix185" element="matrixlamp" state="0">
|
| 1824 | <bounds y="4" x="292" width="3" height="3"/>
|
| 1825 | </backdrop>
|
| 1826 | <backdrop name="matrix186" element="matrixlamp" state="0">
|
| 1827 | <bounds y="8" x="292" width="3" height="3"/>
|
| 1828 | </backdrop>
|
| 1829 | <backdrop name="matrix187" element="matrixlamp" state="0">
|
| 1830 | <bounds y="12" x="292" width="3" height="3"/>
|
| 1831 | </backdrop>
|
| 1832 | <backdrop name="matrix188" element="matrixlamp" state="0">
|
| 1833 | <bounds y="16" x="292" width="3" height="3"/>
|
| 1834 | </backdrop>
|
| 1835 | <backdrop name="matrix189" element="matrixlamp" state="0">
|
| 1836 | <bounds y="20" x="292" width="3" height="3"/>
|
| 1837 | </backdrop>
|
| 1838 | <backdrop name="matrix190" element="matrixlamp" state="0">
|
| 1839 | <bounds y="24" x="292" width="3" height="3"/>
|
| 1840 | </backdrop>
|
| 1841 | <backdrop name="matrix191" element="matrixlamp" state="0">
|
| 1842 | <bounds y="28" x="292" width="3" height="3"/>
|
| 1843 | </backdrop>
|
| 1844 | <backdrop name="matrix192" element="matrixlamp" state="0">
|
| 1845 | <bounds y="0" x="296" width="3" height="3"/>
|
| 1846 | </backdrop>
|
| 1847 | <backdrop name="matrix193" element="matrixlamp" state="0">
|
| 1848 | <bounds y="4" x="296" width="3" height="3"/>
|
| 1849 | </backdrop>
|
| 1850 | <backdrop name="matrix194" element="matrixlamp" state="0">
|
| 1851 | <bounds y="8" x="296" width="3" height="3"/>
|
| 1852 | </backdrop>
|
| 1853 | <backdrop name="matrix195" element="matrixlamp" state="0">
|
| 1854 | <bounds y="12" x="296" width="3" height="3"/>
|
| 1855 | </backdrop>
|
| 1856 | <backdrop name="matrix196" element="matrixlamp" state="0">
|
| 1857 | <bounds y="16" x="296" width="3" height="3"/>
|
| 1858 | </backdrop>
|
| 1859 | <backdrop name="matrix197" element="matrixlamp" state="0">
|
| 1860 | <bounds y="20" x="296" width="3" height="3"/>
|
| 1861 | </backdrop>
|
| 1862 | <backdrop name="matrix198" element="matrixlamp" state="0">
|
| 1863 | <bounds y="24" x="296" width="3" height="3"/>
|
| 1864 | </backdrop>
|
| 1865 | <backdrop name="matrix199" element="matrixlamp" state="0">
|
| 1866 | <bounds y="28" x="296" width="3" height="3"/>
|
| 1867 | </backdrop>
|
| 1868 | <backdrop name="matrix200" element="matrixlamp" state="0">
|
| 1869 | <bounds y="0" x="300" width="3" height="3"/>
|
| 1870 | </backdrop>
|
| 1871 | <backdrop name="matrix201" element="matrixlamp" state="0">
|
| 1872 | <bounds y="4" x="300" width="3" height="3"/>
|
| 1873 | </backdrop>
|
| 1874 | <backdrop name="matrix202" element="matrixlamp" state="0">
|
| 1875 | <bounds y="8" x="300" width="3" height="3"/>
|
| 1876 | </backdrop>
|
| 1877 | <backdrop name="matrix203" element="matrixlamp" state="0">
|
| 1878 | <bounds y="12" x="300" width="3" height="3"/>
|
| 1879 | </backdrop>
|
| 1880 | <backdrop name="matrix204" element="matrixlamp" state="0">
|
| 1881 | <bounds y="16" x="300" width="3" height="3"/>
|
| 1882 | </backdrop>
|
| 1883 | <backdrop name="matrix205" element="matrixlamp" state="0">
|
| 1884 | <bounds y="20" x="300" width="3" height="3"/>
|
| 1885 | </backdrop>
|
| 1886 | <backdrop name="matrix206" element="matrixlamp" state="0">
|
| 1887 | <bounds y="24" x="300" width="3" height="3"/>
|
| 1888 | </backdrop>
|
| 1889 | <backdrop name="matrix207" element="matrixlamp" state="0">
|
| 1890 | <bounds y="28" x="300" width="3" height="3"/>
|
| 1891 | </backdrop>
|
| 1892 | <backdrop name="matrix208" element="matrixlamp" state="0">
|
| 1893 | <bounds y="0" x="304" width="3" height="3"/>
|
| 1894 | </backdrop>
|
| 1895 | <backdrop name="matrix209" element="matrixlamp" state="0">
|
| 1896 | <bounds y="4" x="304" width="3" height="3"/>
|
| 1897 | </backdrop>
|
| 1898 | <backdrop name="matrix210" element="matrixlamp" state="0">
|
| 1899 | <bounds y="8" x="304" width="3" height="3"/>
|
| 1900 | </backdrop>
|
| 1901 | <backdrop name="matrix211" element="matrixlamp" state="0">
|
| 1902 | <bounds y="12" x="304" width="3" height="3"/>
|
| 1903 | </backdrop>
|
| 1904 | <backdrop name="matrix212" element="matrixlamp" state="0">
|
| 1905 | <bounds y="16" x="304" width="3" height="3"/>
|
| 1906 | </backdrop>
|
| 1907 | <backdrop name="matrix213" element="matrixlamp" state="0">
|
| 1908 | <bounds y="20" x="304" width="3" height="3"/>
|
| 1909 | </backdrop>
|
| 1910 | <backdrop name="matrix214" element="matrixlamp" state="0">
|
| 1911 | <bounds y="24" x="304" width="3" height="3"/>
|
| 1912 | </backdrop>
|
| 1913 | <backdrop name="matrix215" element="matrixlamp" state="0">
|
| 1914 | <bounds y="28" x="304" width="3" height="3"/>
|
| 1915 | </backdrop>
|
| 1916 | <backdrop name="matrix216" element="matrixlamp" state="0">
|
| 1917 | <bounds y="0" x="308" width="3" height="3"/>
|
| 1918 | </backdrop>
|
| 1919 | <backdrop name="matrix217" element="matrixlamp" state="0">
|
| 1920 | <bounds y="4" x="308" width="3" height="3"/>
|
| 1921 | </backdrop>
|
| 1922 | <backdrop name="matrix218" element="matrixlamp" state="0">
|
| 1923 | <bounds y="8" x="308" width="3" height="3"/>
|
| 1924 | </backdrop>
|
| 1925 | <backdrop name="matrix219" element="matrixlamp" state="0">
|
| 1926 | <bounds y="12" x="308" width="3" height="3"/>
|
| 1927 | </backdrop>
|
| 1928 | <backdrop name="matrix220" element="matrixlamp" state="0">
|
| 1929 | <bounds y="16" x="308" width="3" height="3"/>
|
| 1930 | </backdrop>
|
| 1931 | <backdrop name="matrix221" element="matrixlamp" state="0">
|
| 1932 | <bounds y="20" x="308" width="3" height="3"/>
|
| 1933 | </backdrop>
|
| 1934 | <backdrop name="matrix222" element="matrixlamp" state="0">
|
| 1935 | <bounds y="24" x="308" width="3" height="3"/>
|
| 1936 | </backdrop>
|
| 1937 | <backdrop name="matrix223" element="matrixlamp" state="0">
|
| 1938 | <bounds y="28" x="308" width="3" height="3"/>
|
| 1939 | </backdrop>
|
| 1940 | <backdrop name="matrix224" element="matrixlamp" state="0">
|
| 1941 | <bounds y="0" x="312" width="3" height="3"/>
|
| 1942 | </backdrop>
|
| 1943 | <backdrop name="matrix225" element="matrixlamp" state="0">
|
| 1944 | <bounds y="4" x="312" width="3" height="3"/>
|
| 1945 | </backdrop>
|
| 1946 | <backdrop name="matrix226" element="matrixlamp" state="0">
|
| 1947 | <bounds y="8" x="312" width="3" height="3"/>
|
| 1948 | </backdrop>
|
| 1949 | <backdrop name="matrix227" element="matrixlamp" state="0">
|
| 1950 | <bounds y="12" x="312" width="3" height="3"/>
|
| 1951 | </backdrop>
|
| 1952 | <backdrop name="matrix228" element="matrixlamp" state="0">
|
| 1953 | <bounds y="16" x="312" width="3" height="3"/>
|
| 1954 | </backdrop>
|
| 1955 | <backdrop name="matrix229" element="matrixlamp" state="0">
|
| 1956 | <bounds y="20" x="312" width="3" height="3"/>
|
| 1957 | </backdrop>
|
| 1958 | <backdrop name="matrix230" element="matrixlamp" state="0">
|
| 1959 | <bounds y="24" x="312" width="3" height="3"/>
|
| 1960 | </backdrop>
|
| 1961 | <backdrop name="matrix231" element="matrixlamp" state="0">
|
| 1962 | <bounds y="28" x="312" width="3" height="3"/>
|
| 1963 | </backdrop>
|
| 1964 | <backdrop name="matrix232" element="matrixlamp" state="0">
|
| 1965 | <bounds y="0" x="316" width="3" height="3"/>
|
| 1966 | </backdrop>
|
| 1967 | <backdrop name="matrix233" element="matrixlamp" state="0">
|
| 1968 | <bounds y="4" x="316" width="3" height="3"/>
|
| 1969 | </backdrop>
|
| 1970 | <backdrop name="matrix234" element="matrixlamp" state="0">
|
| 1971 | <bounds y="8" x="316" width="3" height="3"/>
|
| 1972 | </backdrop>
|
| 1973 | <backdrop name="matrix235" element="matrixlamp" state="0">
|
| 1974 | <bounds y="12" x="316" width="3" height="3"/>
|
| 1975 | </backdrop>
|
| 1976 | <backdrop name="matrix236" element="matrixlamp" state="0">
|
| 1977 | <bounds y="16" x="316" width="3" height="3"/>
|
| 1978 | </backdrop>
|
| 1979 | <backdrop name="matrix237" element="matrixlamp" state="0">
|
| 1980 | <bounds y="20" x="316" width="3" height="3"/>
|
| 1981 | </backdrop>
|
| 1982 | <backdrop name="matrix238" element="matrixlamp" state="0">
|
| 1983 | <bounds y="24" x="316" width="3" height="3"/>
|
| 1984 | </backdrop>
|
| 1985 | <backdrop name="matrix239" element="matrixlamp" state="0">
|
| 1986 | <bounds y="28" x="316" width="3" height="3"/>
|
| 1987 | </backdrop>
|
| 1988 | <backdrop name="matrix240" element="matrixlamp" state="0">
|
| 1989 | <bounds y="0" x="320" width="3" height="3"/>
|
| 1990 | </backdrop>
|
| 1991 | <backdrop name="matrix241" element="matrixlamp" state="0">
|
| 1992 | <bounds y="4" x="320" width="3" height="3"/>
|
| 1993 | </backdrop>
|
| 1994 | <backdrop name="matrix242" element="matrixlamp" state="0">
|
| 1995 | <bounds y="8" x="320" width="3" height="3"/>
|
| 1996 | </backdrop>
|
| 1997 | <backdrop name="matrix243" element="matrixlamp" state="0">
|
| 1998 | <bounds y="12" x="320" width="3" height="3"/>
|
| 1999 | </backdrop>
|
| 2000 | <backdrop name="matrix244" element="matrixlamp" state="0">
|
| 2001 | <bounds y="16" x="320" width="3" height="3"/>
|
| 2002 | </backdrop>
|
| 2003 | <backdrop name="matrix245" element="matrixlamp" state="0">
|
| 2004 | <bounds y="20" x="320" width="3" height="3"/>
|
| 2005 | </backdrop>
|
| 2006 | <backdrop name="matrix246" element="matrixlamp" state="0">
|
| 2007 | <bounds y="24" x="320" width="3" height="3"/>
|
| 2008 | </backdrop>
|
| 2009 | <backdrop name="matrix247" element="matrixlamp" state="0">
|
| 2010 | <bounds y="28" x="320" width="3" height="3"/>
|
| 2011 | </backdrop>
|
| 2012 | <backdrop name="matrix248" element="matrixlamp" state="0">
|
| 2013 | <bounds y="0" x="324" width="3" height="3"/>
|
| 2014 | </backdrop>
|
| 2015 | <backdrop name="matrix249" element="matrixlamp" state="0">
|
| 2016 | <bounds y="4" x="324" width="3" height="3"/>
|
| 2017 | </backdrop>
|
| 2018 | <backdrop name="matrix250" element="matrixlamp" state="0">
|
| 2019 | <bounds y="8" x="324" width="3" height="3"/>
|
| 2020 | </backdrop>
|
| 2021 | <backdrop name="matrix251" element="matrixlamp" state="0">
|
| 2022 | <bounds y="12" x="324" width="3" height="3"/>
|
| 2023 | </backdrop>
|
| 2024 | <backdrop name="matrix252" element="matrixlamp" state="0">
|
| 2025 | <bounds y="16" x="324" width="3" height="3"/>
|
| 2026 | </backdrop>
|
| 2027 | <backdrop name="matrix253" element="matrixlamp" state="0">
|
| 2028 | <bounds y="20" x="324" width="3" height="3"/>
|
| 2029 | </backdrop>
|
| 2030 | <backdrop name="matrix254" element="matrixlamp" state="0">
|
| 2031 | <bounds y="24" x="324" width="3" height="3"/>
|
| 2032 | </backdrop>
|
| 2033 | <backdrop name="matrix255" element="matrixlamp" state="0">
|
| 2034 | <bounds y="28" x="324" width="3" height="3"/>
|
| 2035 | </backdrop>
|
| 2036 | |
| 2037 | <backdrop name="digit0" element="digit" state="0">
|
| 2038 | <bounds x="180" y="64" width="18" height="34"/>
|
| 2039 | </backdrop>
|
| 2040 | <backdrop name="digit1" element="digit" state="0">
|
| 2041 | <bounds x="200" y="64" width="18" height="34"/>
|
| 2042 | </backdrop>
|
| 2043 | <backdrop name="digit2" element="digit" state="0">
|
| 2044 | <bounds x="220" y="64" width="18" height="34"/>
|
| 2045 | </backdrop>
|
| 2046 | <backdrop name="digit3" element="digit" state="0">
|
| 2047 | <bounds x="240" y="64" width="18" height="34"/>
|
| 2048 | </backdrop>
|
| 2049 | <backdrop name="digit4" element="digit" state="0">
|
| 2050 | <bounds x="260" y="64" width="18" height="34"/>
|
| 2051 | </backdrop>
|
| 2052 | <backdrop name="digit5" element="digit" state="0">
|
| 2053 | <bounds x="280" y="64" width="18" height="34"/>
|
| 2054 | </backdrop>
|
| 2055 | <backdrop name="digit6" element="digit" state="0">
|
| 2056 | <bounds x="300" y="64" width="18" height="34"/>
|
| 2057 | </backdrop>
|
| 2058 | <backdrop name="digit7" element="digit" state="0">
|
| 2059 | <bounds x="320" y="64" width="18" height="34"/>
|
| 2060 | </backdrop>
|
| 2061 | <backdrop name="digit8" element="digit" state="0">
|
| 2062 | <bounds x="340" y="64" width="18" height="34"/>
|
| 2063 | </backdrop>
|
| 2064 | <backdrop name="digit9" element="digit" state="0">
|
| 2065 | <bounds x="360" y="64" width="18" height="34"/>
|
| 2066 | </backdrop>
|
| 2067 | <backdrop name="digit10" element="digit" state="0">
|
| 2068 | <bounds x="380" y="64" width="18" height="34"/>
|
| 2069 | </backdrop>
|
| 2070 | <backdrop name="digit11" element="digit" state="0">
|
| 2071 | <bounds x="400" y="64" width="18" height="34"/>
|
| 2072 | </backdrop>
|
| 2073 | |
| 2074 | |
| 2075 | |
| 2076 | </view>
|
| 2077 | <view name="VFD Display Output Only">
|
| 10 | 2078 | <backdrop name="vfd0" element="vfd0" state="0">
|
| 11 | | <bounds x="0" y="280" width="9" height="14"/>
|
| 2079 | <bounds x="10" y="200" width="9" height="17"/>
|
| 12 | 2080 | </backdrop>
|
| 13 | 2081 | <backdrop name="vfd1" element="vfd0" state="0">
|
| 14 | | <bounds x="9" y="280" width="9" height="14"/>
|
| 2082 | <bounds x="19" y="200" width="9" height="17"/>
|
| 15 | 2083 | </backdrop>
|
| 16 | 2084 | <backdrop name="vfd2" element="vfd0" state="0">
|
| 17 | | <bounds x="18" y="280" width="9" height="14"/>
|
| 2085 | <bounds x="28" y="200" width="9" height="17"/>
|
| 18 | 2086 | </backdrop>
|
| 19 | 2087 | <backdrop name="vfd3" element="vfd0" state="0">
|
| 20 | | <bounds x="27" y="280" width="9" height="14"/>
|
| 2088 | <bounds x="37" y="200" width="9" height="17"/>
|
| 21 | 2089 | </backdrop>
|
| 22 | 2090 | <backdrop name="vfd4" element="vfd0" state="0">
|
| 23 | | <bounds x="36" y="280" width="9" height="14"/>
|
| 2091 | <bounds x="46" y="200" width="9" height="17"/>
|
| 24 | 2092 | </backdrop>
|
| 25 | 2093 | <backdrop name="vfd5" element="vfd0" state="0">
|
| 26 | | <bounds x="45" y="280" width="9" height="14"/>
|
| 2094 | <bounds x="55" y="200" width="9" height="17"/>
|
| 27 | 2095 | </backdrop>
|
| 28 | 2096 | <backdrop name="vfd6" element="vfd0" state="0">
|
| 29 | | <bounds x="54" y="280" width="9" height="14"/>
|
| 2097 | <bounds x="64" y="200" width="9" height="17"/>
|
| 30 | 2098 | </backdrop>
|
| 31 | 2099 | <backdrop name="vfd7" element="vfd0" state="0">
|
| 32 | | <bounds x="63" y="280" width="9" height="14"/>
|
| 2100 | <bounds x="73" y="200" width="9" height="17"/>
|
| 33 | 2101 | </backdrop>
|
| 34 | 2102 | <backdrop name="vfd8" element="vfd0" state="0">
|
| 35 | | <bounds x="72" y="280" width="9" height="14"/>
|
| 2103 | <bounds x="82" y="200" width="9" height="17"/>
|
| 36 | 2104 | </backdrop>
|
| 37 | 2105 | <backdrop name="vfd9" element="vfd0" state="0">
|
| 38 | | <bounds x="81" y="280" width="9" height="14"/>
|
| 2106 | <bounds x="91" y="200" width="9" height="17"/>
|
| 39 | 2107 | </backdrop>
|
| 40 | 2108 | <backdrop name="vfd10" element="vfd0" state="0">
|
| 41 | | <bounds x="90" y="280" width="9" height="14"/>
|
| 2109 | <bounds x="100" y="200" width="9" height="17"/>
|
| 42 | 2110 | </backdrop>
|
| 43 | 2111 | <backdrop name="vfd11" element="vfd0" state="0">
|
| 44 | | <bounds x="99" y="280" width="9" height="14"/>
|
| 2112 | <bounds x="109" y="200" width="9" height="17"/>
|
| 45 | 2113 | </backdrop>
|
| 46 | 2114 | <backdrop name="vfd12" element="vfd0" state="0">
|
| 47 | | <bounds x="108" y="280" width="9" height="14"/>
|
| 2115 | <bounds x="118" y="200" width="9" height="17"/>
|
| 48 | 2116 | </backdrop>
|
| 49 | 2117 | <backdrop name="vfd13" element="vfd0" state="0">
|
| 50 | | <bounds x="117" y="280" width="9" height="14"/>
|
| 2118 | <bounds x="127" y="200" width="9" height="17"/>
|
| 51 | 2119 | </backdrop>
|
| 52 | 2120 | <backdrop name="vfd14" element="vfd0" state="0">
|
| 53 | | <bounds x="126" y="280" width="9" height="14"/>
|
| 2121 | <bounds x="136" y="200" width="9" height="17"/>
|
| 54 | 2122 | </backdrop>
|
| 55 | 2123 | <backdrop name="vfd15" element="vfd0" state="0">
|
| 56 | | <bounds x="135" y="280" width="9" height="14"/>
|
| 2124 | <bounds x="145" y="200" width="9" height="17"/>
|
| 57 | 2125 | </backdrop>
|
| 58 | 2126 | </view>
|
| 2127 | </mamelayout>
|
| 59 | 2128 | |
| 60 | | </mamelayout>
|
src/mame/drivers/mcr3.c
| r14963 | r14964 | |
| 104 | 104 | #include "emu.h" |
| 105 | 105 | #include "cpu/z80/z80.h" |
| 106 | 106 | #include "machine/z80ctc.h" |
| 107 | | #include "audio/mcr.h" |
| 107 | #include "audio/midway.h" |
| 108 | 108 | #include "machine/nvram.h" |
| 109 | 109 | #include "includes/mcr.h" |
| 110 | 110 | #include "includes/mcr3.h" |
| r14963 | r14964 | |
| 162 | 162 | if (data & 0x40) m_input_mux = 1; |
| 163 | 163 | |
| 164 | 164 | /* low 5 bits control the turbo CS */ |
| 165 | | turbocs_data_w(space, offset, data); |
| 165 | m_turbo_chip_squeak->write(space, offset, data); |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | |
| r14963 | r14964 | |
| 265 | 265 | m_maxrpm_adc_select = (m_maxrpm_adc_control >> 1) & 3; |
| 266 | 266 | |
| 267 | 267 | /* low 5 bits control the turbo CS */ |
| 268 | | turbocs_data_w(space, offset, data); |
| 268 | m_turbo_chip_squeak->write(space, offset, data); |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | |
| r14963 | r14964 | |
| 278 | 278 | |
| 279 | 279 | READ8_MEMBER(mcr3_state::rampage_ip4_r) |
| 280 | 280 | { |
| 281 | | return input_port_read(machine(), "MONO.IP4") | (soundsgood_status_r(space,0) << 7); |
| 281 | return input_port_read(machine(), "MONO.IP4") | (m_sounds_good->read(space,0) << 7); |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | |
| 285 | 285 | WRITE8_MEMBER(mcr3_state::rampage_op6_w) |
| 286 | 286 | { |
| 287 | 287 | /* bit 5 controls reset of the Sounds Good board */ |
| 288 | | soundsgood_reset_w(machine(), (~data >> 5) & 1); |
| 288 | m_sounds_good->reset_write((~data >> 5) & 1); |
| 289 | 289 | |
| 290 | 290 | /* low 5 bits go directly to the Sounds Good board */ |
| 291 | | soundsgood_data_w(space, offset, data); |
| 291 | m_sounds_good->write(space, offset, data); |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | |
| r14963 | r14964 | |
| 301 | 301 | |
| 302 | 302 | READ8_MEMBER(mcr3_state::powerdrv_ip2_r) |
| 303 | 303 | { |
| 304 | | return input_port_read(machine(), "MONO.IP2") | (soundsgood_status_r(space, 0) << 7); |
| 304 | return input_port_read(machine(), "MONO.IP2") | (m_sounds_good->read(space, 0) << 7); |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | |
| r14963 | r14964 | |
| 329 | 329 | WRITE8_MEMBER(mcr3_state::powerdrv_op6_w) |
| 330 | 330 | { |
| 331 | 331 | /* bit 5 controls reset of the Sounds Good board */ |
| 332 | | soundsgood_reset_w(machine(), (~data >> 5) & 1); |
| 332 | m_sounds_good->reset_write((~data >> 5) & 1); |
| 333 | 333 | |
| 334 | 334 | /* low 5 bits go directly to the Sounds Good board */ |
| 335 | | soundsgood_data_w(space, offset, data); |
| 335 | m_sounds_good->write(space, offset, data); |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | |
| r14963 | r14964 | |
| 348 | 348 | UINT8 result = input_port_read(machine(), "MONO.IP0"); |
| 349 | 349 | if (m_input_mux) |
| 350 | 350 | result = (result & ~0x0a) | (input_port_read(machine(), "MONO.IP0.ALT") & 0x0a); |
| 351 | | return (result & ~0x10) | ((soundsgood_status_r(space, 0) << 4) & 0x10); |
| 351 | return (result & ~0x10) | ((m_sounds_good->read(space, 0) << 4) & 0x10); |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | 354 | |
| r14963 | r14964 | |
| 372 | 372 | WRITE8_MEMBER(mcr3_state::stargrds_op6_w) |
| 373 | 373 | { |
| 374 | 374 | /* bit 6 controls reset of the Sounds Good board */ |
| 375 | | soundsgood_reset_w(machine(), (~data >> 6) & 1); |
| 375 | m_sounds_good->reset_write((~data >> 6) & 1); |
| 376 | 376 | |
| 377 | 377 | /* unline the other games, the STROBE is in the high bit instead of the low bit */ |
| 378 | | soundsgood_data_w(space, offset, (data << 1) | (data >> 7)); |
| 378 | m_sounds_good->write(space, offset, (data << 1) | (data >> 7)); |
| 379 | 379 | } |
| 380 | 380 | |
| 381 | 381 | |
| r14963 | r14964 | |
| 388 | 388 | |
| 389 | 389 | READ8_MEMBER(mcr3_state::spyhunt_ip1_r) |
| 390 | 390 | { |
| 391 | | return input_port_read(machine(), "SSIO.IP1") | (csdeluxe_status_r(space, 0) << 5); |
| 391 | return input_port_read(machine(), "ssio:IP1") | (m_chip_squeak_deluxe->read(space, 0) << 5); |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | |
| 395 | 395 | READ8_MEMBER(mcr3_state::spyhunt_ip2_r) |
| 396 | 396 | { |
| 397 | 397 | /* multiplexed steering wheel/gas pedal */ |
| 398 | | return input_port_read(machine(), m_input_mux ? "SSIO.IP2.ALT" : "SSIO.IP2"); |
| 398 | return input_port_read(machine(), m_input_mux ? "ssio:IP2.ALT" : "ssio:IP2"); |
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | |
| r14963 | r14964 | |
| 432 | 432 | m_last_op4 = data; |
| 433 | 433 | |
| 434 | 434 | /* low 5 bits go to control the Chip Squeak Deluxe */ |
| 435 | | csdeluxe_data_w(space, offset, data); |
| 435 | m_chip_squeak_deluxe->write(space, offset, data); |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | |
| r14963 | r14964 | |
| 447 | 447 | { |
| 448 | 448 | /* multiplexed steering wheel/gas pedal */ |
| 449 | 449 | if (m_input_mux) |
| 450 | | return input_port_read(machine(), "SSIO.IP2.ALT"); |
| 450 | return input_port_read(machine(), "ssio:IP2.ALT"); |
| 451 | 451 | |
| 452 | | return input_port_read(machine(), "SSIO.IP2") + 5 * (machine().primary_screen->frame_number() & 1); |
| 452 | return input_port_read(machine(), "ssio:IP2") + 5 * (machine().primary_screen->frame_number() & 1); |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | |
| r14963 | r14964 | |
| 523 | 523 | static ADDRESS_MAP_START( spyhunt_portmap, AS_IO, 8, mcr3_state ) |
| 524 | 524 | ADDRESS_MAP_UNMAP_HIGH |
| 525 | 525 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 526 | | SSIO_INPUT_PORTS |
| 526 | SSIO_INPUT_PORTS("ssio") |
| 527 | 527 | AM_RANGE(0x84, 0x86) AM_WRITE(spyhunt_scroll_value_w) |
| 528 | 528 | AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) |
| 529 | 529 | AM_RANGE(0xe8, 0xe8) AM_WRITENOP |
| r14963 | r14964 | |
| 886 | 886 | |
| 887 | 887 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 888 | 888 | static INPUT_PORTS_START( spyhunt ) |
| 889 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 889 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 890 | 890 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 891 | 891 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 892 | 892 | PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14963 | r14964 | |
| 895 | 895 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 896 | 896 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 897 | 897 | |
| 898 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 898 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 899 | 899 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Oil Slick") |
| 900 | 900 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Missiles") |
| 901 | 901 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Weapon Truck") |
| r14963 | r14964 | |
| 904 | 904 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from CS deluxe, never read */ |
| 905 | 905 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 906 | 906 | |
| 907 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 907 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 908 | 908 | PORT_BIT( 0xff, 0x30, IPT_PEDAL ) PORT_MINMAX(0x30,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 909 | 909 | |
| 910 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 910 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 911 | 911 | PORT_DIPNAME( 0x01, 0x01, "Game Timer" ) |
| 912 | 912 | PORT_DIPSETTING( 0x00, "1:00" ) |
| 913 | 913 | PORT_DIPSETTING( 0x01, "1:30" ) |
| r14963 | r14964 | |
| 918 | 918 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 919 | 919 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 920 | 920 | |
| 921 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 921 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 922 | 922 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 923 | 923 | |
| 924 | | PORT_START("SSIO.DIP") |
| 924 | PORT_START("ssio:DIP") |
| 925 | 925 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 926 | 926 | |
| 927 | | PORT_START("SSIO.IP2.ALT") |
| 927 | PORT_START("ssio:IP2.ALT") |
| 928 | 928 | PORT_BIT( 0xff, 0x74, IPT_PADDLE ) PORT_MINMAX(0x34,0xb4) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) |
| 929 | 929 | INPUT_PORTS_END |
| 930 | 930 | |
| 931 | 931 | |
| 932 | 932 | /* not verified, no manual found */ |
| 933 | 933 | static INPUT_PORTS_START( crater ) |
| 934 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 934 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 935 | 935 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 936 | 936 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 937 | 937 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 941 | 941 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 942 | 942 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 943 | 943 | |
| 944 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 944 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 945 | 945 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE |
| 946 | 946 | |
| 947 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 947 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 948 | 948 | PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 949 | 949 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_2WAY |
| 950 | 950 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_2WAY |
| r14963 | r14964 | |
| 953 | 953 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 954 | 954 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 955 | 955 | |
| 956 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 956 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 957 | 957 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 958 | 958 | |
| 959 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 959 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 960 | 960 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 961 | 961 | |
| 962 | | PORT_START("SSIO.DIP") |
| 962 | PORT_START("ssio:DIP") |
| 963 | 963 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 964 | 964 | INPUT_PORTS_END |
| 965 | 965 | |
| 966 | 966 | |
| 967 | 967 | /* not verified, no manual found */ |
| 968 | 968 | static INPUT_PORTS_START( turbotag ) |
| 969 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 969 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 970 | 970 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 971 | 971 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 972 | 972 | PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14963 | r14964 | |
| 975 | 975 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 976 | 976 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 977 | 977 | |
| 978 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 978 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 979 | 979 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Left Button") |
| 980 | 980 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Left Trigger") |
| 981 | 981 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Center Button") |
| r14963 | r14964 | |
| 984 | 984 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from CS deluxe, never read */ |
| 985 | 985 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 986 | 986 | |
| 987 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 987 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 988 | 988 | PORT_BIT( 0xff, 0x3c, IPT_PEDAL ) PORT_MINMAX(60,180) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 989 | 989 | |
| 990 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 990 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 991 | 991 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 992 | 992 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) |
| 993 | 993 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| r14963 | r14964 | |
| 996 | 996 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 997 | 997 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 998 | 998 | |
| 999 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 999 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1000 | 1000 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1001 | 1001 | |
| 1002 | | PORT_START("SSIO.DIP") |
| 1002 | PORT_START("ssio:DIP") |
| 1003 | 1003 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1004 | 1004 | |
| 1005 | | PORT_START("SSIO.IP2.ALT") |
| 1005 | PORT_START("ssio:IP2.ALT") |
| 1006 | 1006 | PORT_BIT( 0xff, 0x60, IPT_PADDLE ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) |
| 1007 | 1007 | INPUT_PORTS_END |
| 1008 | 1008 | |
| r14963 | r14964 | |
| 1089 | 1089 | MCFG_MACHINE_START(mcr) |
| 1090 | 1090 | MCFG_MACHINE_RESET(mcr) |
| 1091 | 1091 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 1092 | |
| 1093 | // sound hardware |
| 1094 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 1092 | 1095 | |
| 1093 | 1096 | /* video hardware */ |
| 1094 | 1097 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| r14963 | r14964 | |
| 1114 | 1117 | static MACHINE_CONFIG_DERIVED( mono_tcs, mcrmono ) |
| 1115 | 1118 | |
| 1116 | 1119 | /* basic machine hardware */ |
| 1117 | | MCFG_FRAGMENT_ADD(turbo_chip_squeak) |
| 1120 | MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD("tcs") |
| 1121 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) |
| 1122 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) |
| 1118 | 1123 | MACHINE_CONFIG_END |
| 1119 | 1124 | |
| 1120 | 1125 | |
| r14963 | r14964 | |
| 1122 | 1127 | static MACHINE_CONFIG_DERIVED( mono_sg, mcrmono ) |
| 1123 | 1128 | |
| 1124 | 1129 | /* basic machine hardware */ |
| 1125 | | MCFG_FRAGMENT_ADD(sounds_good) |
| 1130 | MCFG_MIDWAY_SOUNDS_GOOD_ADD("sg") |
| 1131 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) |
| 1132 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) |
| 1126 | 1133 | MACHINE_CONFIG_END |
| 1127 | 1134 | |
| 1128 | 1135 | |
| r14963 | r14964 | |
| 1133 | 1140 | static MACHINE_CONFIG_DERIVED( mcrscroll, mcrmono ) |
| 1134 | 1141 | |
| 1135 | 1142 | /* basic machine hardware */ |
| 1136 | | MCFG_FRAGMENT_ADD(mcr_ssio) |
| 1143 | MCFG_MIDWAY_SSIO_ADD("ssio") |
| 1144 | MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) |
| 1145 | MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) |
| 1137 | 1146 | |
| 1138 | 1147 | MCFG_CPU_MODIFY("maincpu") |
| 1139 | 1148 | MCFG_CPU_PROGRAM_MAP(spyhunt_map) |
| r14963 | r14964 | |
| 1156 | 1165 | static MACHINE_CONFIG_DERIVED( mcrsc_csd, mcrscroll ) |
| 1157 | 1166 | |
| 1158 | 1167 | /* basic machine hardware */ |
| 1159 | | MCFG_FRAGMENT_ADD(chip_squeak_deluxe_stereo) |
| 1168 | MCFG_MIDWAY_CHIP_SQUEAK_DELUXE_ADD("csd") |
| 1169 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) |
| 1170 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) |
| 1160 | 1171 | MACHINE_CONFIG_END |
| 1161 | 1172 | |
| 1162 | 1173 | |
| r14963 | r14964 | |
| 1173 | 1184 | ROM_LOAD( "pro1.5b", 0x08000, 0x8000, CRC(034c00fc) SHA1(0f0e8f123a34c330021bce76ed7f38bcb2e9af4e) ) |
| 1174 | 1185 | ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ |
| 1175 | 1186 | |
| 1176 | | ROM_REGION( 0x10000, "tcscpu", 0 ) /* 64k for the Turbo Cheap Squeak */ |
| 1187 | ROM_REGION( 0x10000, "tcs:cpu", 0 ) /* 64k for the Turbo Cheap Squeak */ |
| 1177 | 1188 | ROM_LOAD( "tcs_u5.bin", 0x0c000, 0x2000, CRC(eca33b2c) SHA1(938b021ea3b0f23aed7a98a930a58af371a02303) ) |
| 1178 | 1189 | ROM_LOAD( "tcs_u4.bin", 0x0e000, 0x2000, CRC(3490289a) SHA1(a9d56ea60bb901267da41ab408f8e1ed3742b0ac) ) |
| 1179 | 1190 | |
| r14963 | r14964 | |
| 1199 | 1210 | ROM_LOAD( "cpu_5b.bin", 0x08000, 0x8000, CRC(6800e746) SHA1(018c2b622b3654530ebc2c299b3f745777163d4b) ) |
| 1200 | 1211 | ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ |
| 1201 | 1212 | |
| 1202 | | ROM_REGION( 0x10000, "tcscpu", 0 ) /* 64k for the Turbo Cheap Squeak */ |
| 1213 | ROM_REGION( 0x10000, "tcs:cpu", 0 ) /* 64k for the Turbo Cheap Squeak */ |
| 1203 | 1214 | ROM_LOAD( "tcs_u5.bin", 0xc000, 0x2000, CRC(a894ef8a) SHA1(7f53927fc185fff8ba1b1747f0d565e089d879e6) ) |
| 1204 | 1215 | ROM_LOAD( "tcs_u4.bin", 0xe000, 0x2000, CRC(6ca6faf3) SHA1(4647e633dd11f55a65c3acf81adeb3af93624991) ) |
| 1205 | 1216 | |
| r14963 | r14964 | |
| 1230 | 1241 | ROM_LOAD( "pro.1", 0x08000, 0x8000, CRC(f628bb30) SHA1(0514906b9764a7f02a730a610affea4d42a4510d) ) |
| 1231 | 1242 | ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ |
| 1232 | 1243 | |
| 1233 | | ROM_REGION( 0x10000, "tcscpu", 0 ) /* 64k for the Turbo Cheap Squeak */ |
| 1244 | ROM_REGION( 0x10000, "tcs:cpu", 0 ) /* 64k for the Turbo Cheap Squeak */ |
| 1234 | 1245 | ROM_LOAD( "turbskwk.u5", 0x8000, 0x4000, CRC(55c3b759) SHA1(89d690a007a996e9c7df7b365942e4da755d15d7) ) |
| 1235 | 1246 | ROM_LOAD( "turbskwk.u4", 0xc000, 0x4000, CRC(31a2da2e) SHA1(582434b5d6bc8e84f39191976d8aa0ef9245f253) ) |
| 1236 | 1247 | |
| r14963 | r14964 | |
| 1252 | 1263 | ROM_LOAD( "pro1rev3.5b", 0x08000, 0x8000, CRC(d89bd9a4) SHA1(3531464ffe49dfaf2755d9e2dc1aea23819b3a5d) ) |
| 1253 | 1264 | ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ |
| 1254 | 1265 | |
| 1255 | | ROM_REGION( 0x40000, "sgcpu", 0 ) /* 256k for the Sounds Good board */ |
| 1266 | ROM_REGION( 0x40000, "sg:cpu", 0 ) /* 256k for the Sounds Good board */ |
| 1256 | 1267 | ROM_LOAD16_BYTE( "ramp_u7.snd", 0x00000, 0x8000, CRC(cffd7fa5) SHA1(7c5cecce1d428f847fea37d53eb09c6f62055c6f) ) /* these are Revision 2 sound ROMs */ |
| 1257 | 1268 | ROM_LOAD16_BYTE( "ramp_u17.snd", 0x00001, 0x8000, CRC(e92c596b) SHA1(4e2d87398f2e7b637cbad6cb16d832dfa8f8288c) ) |
| 1258 | 1269 | ROM_LOAD16_BYTE( "ramp_u8.snd", 0x10000, 0x8000, CRC(11f787e4) SHA1(1fa195bf9169608099d17be5801738a4e17bec3d) ) |
| r14963 | r14964 | |
| 1276 | 1287 | ROM_LOAD( "pro1rev2.5b", 0x08000, 0x8000, CRC(58523d75) SHA1(5cd512864568ec7793bda0164f21e7d72a7ea817) ) |
| 1277 | 1288 | ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ |
| 1278 | 1289 | |
| 1279 | | ROM_REGION( 0x40000, "sgcpu", 0 ) /* 256k for the Sounds Good board */ |
| 1290 | ROM_REGION( 0x40000, "sg:cpu", 0 ) /* 256k for the Sounds Good board */ |
| 1280 | 1291 | ROM_LOAD16_BYTE( "ramp_u7.snd", 0x00000, 0x8000, CRC(cffd7fa5) SHA1(7c5cecce1d428f847fea37d53eb09c6f62055c6f) ) /* these are Revision 2 sound ROMs */ |
| 1281 | 1292 | ROM_LOAD16_BYTE( "ramp_u17.snd", 0x00001, 0x8000, CRC(e92c596b) SHA1(4e2d87398f2e7b637cbad6cb16d832dfa8f8288c) ) |
| 1282 | 1293 | ROM_LOAD16_BYTE( "ramp_u8.snd", 0x10000, 0x8000, CRC(11f787e4) SHA1(1fa195bf9169608099d17be5801738a4e17bec3d) ) |
| r14963 | r14964 | |
| 1300 | 1311 | ROM_LOAD( "pdrv5b.bin", 0x08000, 0x8000, CRC(fa0544ad) SHA1(55a9cf8c8648761443e4a5a3b214f4d6236cbaff) ) |
| 1301 | 1312 | ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ |
| 1302 | 1313 | |
| 1303 | | ROM_REGION( 0x40000, "sgcpu", 0 ) /* 256k for the Sounds Good board */ |
| 1314 | ROM_REGION( 0x40000, "sg:cpu", 0 ) /* 256k for the Sounds Good board */ |
| 1304 | 1315 | ROM_LOAD16_BYTE( "pdsndu7.bin", 0x00000, 0x8000, CRC(78713e78) SHA1(11382c024536f743e051ba208ae02d0f5e07cf5e) ) |
| 1305 | 1316 | ROM_LOAD16_BYTE( "pdsndu17.bin", 0x00001, 0x8000, CRC(c41de6e4) SHA1(0391afd96ee80dd1d4a34e661e5df1e01fbbd57a) ) |
| 1306 | 1317 | ROM_LOAD16_BYTE( "pdsndu8.bin", 0x10000, 0x8000, CRC(15714036) SHA1(77ca5f703eb7f146e13d9c01f4427f6aaa31df39) ) |
| r14963 | r14964 | |
| 1324 | 1335 | ROM_LOAD( "pro-1.5b", 0x08000, 0x8000, CRC(dba428b0) SHA1(72efa2f02e95f05a5503ced136fbdf3fcdf57554) ) |
| 1325 | 1336 | ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ |
| 1326 | 1337 | |
| 1327 | | ROM_REGION( 0x40000, "sgcpu", 0 ) /* 256k for the Sounds Good board */ |
| 1338 | ROM_REGION( 0x40000, "sg:cpu", 0 ) /* 256k for the Sounds Good board */ |
| 1328 | 1339 | ROM_LOAD16_BYTE( "snd0.u7", 0x00000, 0x8000, CRC(7755a493) SHA1(a888fba45a2a31de5b3082bfc5ccef94dafc4d16) ) |
| 1329 | 1340 | ROM_LOAD16_BYTE( "snd1.u17", 0x00001, 0x8000, CRC(d98d14ae) SHA1(51dbb97655ab8a389ca67f0e796ab57894f5bb32) ) |
| 1330 | 1341 | |
| r14963 | r14964 | |
| 1349 | 1360 | ROM_LOAD( "cpu_pg4.10d", 0x8000, 0x2000, CRC(a3033c15) SHA1(e9811450a7c952561912777d679fe45a6b5a794a) ) |
| 1350 | 1361 | ROM_LOAD( "cpu_pg5.11d", 0xa000, 0x4000, CRC(53a4f7cd) SHA1(051b07ae993e14b329507710c0f7cadaa952f9ae) ) |
| 1351 | 1362 | |
| 1352 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 1363 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 1353 | 1364 | ROM_LOAD( "snd_0sd.a8", 0x0000, 0x1000, CRC(c95cf31e) SHA1(d1b0e299a27e306ddbc0654fd3a9d981c92afe8c) ) |
| 1354 | 1365 | ROM_LOAD( "snd_1sd.a7", 0x1000, 0x1000, CRC(12aaa48e) SHA1(c6b835fc45e4484a4d52b682ce015caa242c8b4f) ) |
| 1355 | 1366 | |
| 1356 | | ROM_REGION( 0x8000, "csdcpu", 0 ) /* 32k for the Chip Squeak Deluxe */ |
| 1367 | ROM_REGION( 0x8000, "csd:cpu", 0 ) /* 32k for the Chip Squeak Deluxe */ |
| 1357 | 1368 | ROM_LOAD16_BYTE( "csd_u7a.u7", 0x00000, 0x2000, CRC(6e689fe7) SHA1(38ad2e9f12b9d389fb2568ebcb32c8bd1ac6879e) ) |
| 1358 | 1369 | ROM_LOAD16_BYTE( "csd_u17b.u17", 0x00001, 0x2000, CRC(0d9ddce6) SHA1(d955c0e67fc78b517cc229601ab4023cc5a644c2) ) |
| 1359 | 1370 | ROM_LOAD16_BYTE( "csd_u8c.u8", 0x04000, 0x2000, CRC(35563cd0) SHA1(5708d374dd56758194c95118f096ea51bf12bf64) ) |
| r14963 | r14964 | |
| 1392 | 1403 | ROM_LOAD( "sh_mb_6.bin", 0x8000, 0x2000, CRC(8cbf04d8) SHA1(e45cb36935367e46ea41de0177b3453cd8bdce85) ) |
| 1393 | 1404 | ROM_LOAD( "cpu_pg5.11d", 0xa000, 0x4000, CRC(53a4f7cd) SHA1(051b07ae993e14b329507710c0f7cadaa952f9ae) ) |
| 1394 | 1405 | |
| 1395 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 1406 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 1396 | 1407 | ROM_LOAD( "snd_0sd.a8", 0x0000, 0x1000, CRC(c95cf31e) SHA1(d1b0e299a27e306ddbc0654fd3a9d981c92afe8c) ) |
| 1397 | 1408 | ROM_LOAD( "snd_1sd.a7", 0x1000, 0x1000, CRC(12aaa48e) SHA1(c6b835fc45e4484a4d52b682ce015caa242c8b4f) ) |
| 1398 | 1409 | |
| 1399 | | ROM_REGION( 0x8000, "csdcpu", 0 ) /* 32k for the Chip Squeak Deluxe */ |
| 1410 | ROM_REGION( 0x8000, "csd:cpu", 0 ) /* 32k for the Chip Squeak Deluxe */ |
| 1400 | 1411 | ROM_LOAD16_BYTE( "csd_u7a.u7", 0x00000, 0x2000, CRC(6e689fe7) SHA1(38ad2e9f12b9d389fb2568ebcb32c8bd1ac6879e) ) |
| 1401 | 1412 | ROM_LOAD16_BYTE( "csd_u17b.u17", 0x00001, 0x2000, CRC(0d9ddce6) SHA1(d955c0e67fc78b517cc229601ab4023cc5a644c2) ) |
| 1402 | 1413 | ROM_LOAD16_BYTE( "csd_u8c.u8", 0x04000, 0x2000, CRC(35563cd0) SHA1(5708d374dd56758194c95118f096ea51bf12bf64) ) |
| r14963 | r14964 | |
| 1434 | 1445 | ROM_LOAD( "crcpu.9d", 0x6000, 0x2000, CRC(a03c4b11) SHA1(6a442a0828942dc51dbe0d3f19be855a52c12f39) ) |
| 1435 | 1446 | ROM_LOAD( "crcpu.10d", 0x8000, 0x2000, CRC(44ae4cbd) SHA1(2188bf697f1b3fcbb2ad6cbd4d9098e3b8d56a95) ) |
| 1436 | 1447 | |
| 1437 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 1448 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 1438 | 1449 | ROM_LOAD( "crsnd4.a7", 0x0000, 0x1000, CRC(fd666cb5) SHA1(257174266e264db8ac9af5f2296fd0a22847f85f) ) |
| 1439 | 1450 | ROM_LOAD( "crsnd1.a8", 0x1000, 0x1000, CRC(90bf2c4c) SHA1(7adfbf2251b5d46043d614554320e2fe544cc570) ) |
| 1440 | 1451 | ROM_LOAD( "crsnd2.a9", 0x2000, 0x1000, CRC(3b8deef1) SHA1(a14186a33a7b5ca07086ce44fb1c8c64900654d0) ) |
| r14963 | r14964 | |
| 1474 | 1485 | ROM_LOAD( "ttprog5.bin", 0xa000, 0x2000, CRC(11e62fe4) SHA1(72897702c61486b654e4b4a3f6560c144c862e1f) ) |
| 1475 | 1486 | ROM_RELOAD( 0xc000, 0x2000 ) |
| 1476 | 1487 | |
| 1477 | | ROM_REGION( 0x10000, "ssiocpu", ROMREGION_ERASE00 ) |
| 1488 | ROM_REGION( 0x10000, "ssio:cpu", ROMREGION_ERASE00 ) |
| 1478 | 1489 | |
| 1479 | | ROM_REGION( 0x8000, "csdcpu", 0 ) /* 32k for the Chip Squeak Deluxe */ |
| 1490 | ROM_REGION( 0x8000, "csd:cpu", 0 ) /* 32k for the Chip Squeak Deluxe */ |
| 1480 | 1491 | ROM_LOAD16_BYTE( "ttu7.bin", 0x00000, 0x2000, CRC(8ebb3302) SHA1(c516abdae6eea524a6d2a039ed9bd7dff72ab986) ) |
| 1481 | 1492 | ROM_LOAD16_BYTE( "ttu17.bin", 0x00001, 0x2000, CRC(605d6c74) SHA1(a6c2bc95cca372fa823ab256c9dd1f92b6ba45fd) ) |
| 1482 | 1493 | ROM_LOAD16_BYTE( "ttu8.bin", 0x04000, 0x2000, CRC(6bfcb22a) SHA1(7b895e3ae1e99f195bb32b052f801b58c63a401c) ) |
| r14963 | r14964 | |
| 1513 | 1524 | * |
| 1514 | 1525 | *************************************/ |
| 1515 | 1526 | |
| 1516 | | static void mcr_common_init(running_machine &machine, int sound_board) |
| 1527 | static void mcr_common_init(running_machine &machine) |
| 1517 | 1528 | { |
| 1518 | 1529 | mcr3_state *state = machine.driver_data<mcr3_state>(); |
| 1519 | | mcr_sound_init(machine, sound_board); |
| 1520 | 1530 | |
| 1521 | 1531 | state_save_register_global(machine, state->m_input_mux); |
| 1522 | 1532 | state_save_register_global(machine, state->m_latched_input); |
| r14963 | r14964 | |
| 1526 | 1536 | |
| 1527 | 1537 | static DRIVER_INIT( demoderm ) |
| 1528 | 1538 | { |
| 1529 | | mcr_common_init(machine, MCR_TURBO_CHIP_SQUEAK); |
| 1539 | mcr_common_init(machine); |
| 1530 | 1540 | mcr3_state *state = machine.driver_data<mcr3_state>(); |
| 1531 | 1541 | machine.device("maincpu")->memory().space(AS_IO)->install_read_handler(0x01, 0x01, read8_delegate(FUNC(mcr3_state::demoderm_ip1_r),state)); |
| 1532 | 1542 | machine.device("maincpu")->memory().space(AS_IO)->install_read_handler(0x02, 0x02, read8_delegate(FUNC(mcr3_state::demoderm_ip2_r),state)); |
| r14963 | r14964 | |
| 1537 | 1547 | static DRIVER_INIT( sarge ) |
| 1538 | 1548 | { |
| 1539 | 1549 | mcr3_state *state = machine.driver_data<mcr3_state>(); |
| 1540 | | mcr_common_init(machine, MCR_TURBO_CHIP_SQUEAK); |
| 1541 | | machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x06, 0x06, write8_delegate(FUNC(mcr3_state::turbocs_data_w),state)); |
| 1550 | mcr_common_init(machine); |
| 1551 | machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x06, 0x06, write8_delegate(FUNC(midway_turbo_chip_squeak_device::write),state->m_turbo_chip_squeak.target())); |
| 1542 | 1552 | } |
| 1543 | 1553 | |
| 1544 | 1554 | |
| 1545 | 1555 | static DRIVER_INIT( maxrpm ) |
| 1546 | 1556 | { |
| 1547 | 1557 | mcr3_state *state = machine.driver_data<mcr3_state>(); |
| 1548 | | mcr_common_init(machine, MCR_TURBO_CHIP_SQUEAK); |
| 1558 | mcr_common_init(machine); |
| 1549 | 1559 | machine.device("maincpu")->memory().space(AS_IO)->install_read_handler(0x01, 0x01, read8_delegate(FUNC(mcr3_state::maxrpm_ip1_r),state)); |
| 1550 | 1560 | machine.device("maincpu")->memory().space(AS_IO)->install_read_handler(0x02, 0x02, read8_delegate(FUNC(mcr3_state::maxrpm_ip2_r),state)); |
| 1551 | 1561 | machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x05, 0x05, write8_delegate(FUNC(mcr3_state::maxrpm_op5_w),state)); |
| r14963 | r14964 | |
| 1562 | 1572 | static DRIVER_INIT( rampage ) |
| 1563 | 1573 | { |
| 1564 | 1574 | mcr3_state *state = machine.driver_data<mcr3_state>(); |
| 1565 | | mcr_common_init(machine, MCR_SOUNDS_GOOD); |
| 1575 | mcr_common_init(machine); |
| 1566 | 1576 | machine.device("maincpu")->memory().space(AS_IO)->install_read_handler(0x04, 0x04, read8_delegate(FUNC(mcr3_state::rampage_ip4_r),state)); |
| 1567 | 1577 | machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x06, 0x06, write8_delegate(FUNC(mcr3_state::rampage_op6_w),state)); |
| 1568 | 1578 | } |
| r14963 | r14964 | |
| 1571 | 1581 | static DRIVER_INIT( powerdrv ) |
| 1572 | 1582 | { |
| 1573 | 1583 | mcr3_state *state = machine.driver_data<mcr3_state>(); |
| 1574 | | mcr_common_init(machine, MCR_SOUNDS_GOOD); |
| 1584 | mcr_common_init(machine); |
| 1575 | 1585 | machine.device("maincpu")->memory().space(AS_IO)->install_read_handler(0x02, 0x02, read8_delegate(FUNC(mcr3_state::powerdrv_ip2_r),state)); |
| 1576 | 1586 | machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x05, 0x05, write8_delegate(FUNC(mcr3_state::powerdrv_op5_w),state)); |
| 1577 | 1587 | machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x06, 0x06, write8_delegate(FUNC(mcr3_state::powerdrv_op6_w),state)); |
| r14963 | r14964 | |
| 1581 | 1591 | static DRIVER_INIT( stargrds ) |
| 1582 | 1592 | { |
| 1583 | 1593 | mcr3_state *state = machine.driver_data<mcr3_state>(); |
| 1584 | | mcr_common_init(machine, MCR_SOUNDS_GOOD); |
| 1594 | mcr_common_init(machine); |
| 1585 | 1595 | machine.device("maincpu")->memory().space(AS_IO)->install_read_handler(0x00, 0x00, read8_delegate(FUNC(mcr3_state::stargrds_ip0_r),state)); |
| 1586 | 1596 | machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x05, 0x05, write8_delegate(FUNC(mcr3_state::stargrds_op5_w),state)); |
| 1587 | 1597 | machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x06, 0x06, write8_delegate(FUNC(mcr3_state::stargrds_op6_w),state)); |
| r14963 | r14964 | |
| 1591 | 1601 | static DRIVER_INIT( spyhunt ) |
| 1592 | 1602 | { |
| 1593 | 1603 | mcr3_state *state = machine.driver_data<mcr3_state>(); |
| 1594 | | mcr_common_init(machine, MCR_SSIO | MCR_CHIP_SQUEAK_DELUXE); |
| 1595 | | ssio_set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),state)); |
| 1596 | | ssio_set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::spyhunt_ip2_r),state)); |
| 1597 | | ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr3_state::spyhunt_op4_w),state)); |
| 1604 | mcr_common_init(machine); |
| 1605 | machine.device<midway_ssio_device>("ssio")->set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),state)); |
| 1606 | machine.device<midway_ssio_device>("ssio")->set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::spyhunt_ip2_r),state)); |
| 1607 | machine.device<midway_ssio_device>("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr3_state::spyhunt_op4_w),state)); |
| 1598 | 1608 | |
| 1599 | 1609 | state->m_spyhunt_sprite_color_mask = 0x00; |
| 1600 | 1610 | state->m_spyhunt_scroll_offset = 16; |
| r14963 | r14964 | |
| 1604 | 1614 | static DRIVER_INIT( crater ) |
| 1605 | 1615 | { |
| 1606 | 1616 | mcr3_state *state = machine.driver_data<mcr3_state>(); |
| 1607 | | mcr_common_init(machine, MCR_SSIO); |
| 1617 | mcr_common_init(machine); |
| 1608 | 1618 | |
| 1609 | 1619 | state->m_spyhunt_sprite_color_mask = 0x03; |
| 1610 | 1620 | state->m_spyhunt_scroll_offset = 96; |
| r14963 | r14964 | |
| 1614 | 1624 | static DRIVER_INIT( turbotag ) |
| 1615 | 1625 | { |
| 1616 | 1626 | mcr3_state *state = machine.driver_data<mcr3_state>(); |
| 1617 | | mcr_common_init(machine, MCR_SSIO | MCR_CHIP_SQUEAK_DELUXE); |
| 1618 | | ssio_set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),state)); |
| 1619 | | ssio_set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::turbotag_ip2_r),state)); |
| 1620 | | ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr3_state::spyhunt_op4_w),state)); |
| 1627 | mcr_common_init(machine); |
| 1628 | machine.device<midway_ssio_device>("ssio")->set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),state)); |
| 1629 | machine.device<midway_ssio_device>("ssio")->set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::turbotag_ip2_r),state)); |
| 1630 | machine.device<midway_ssio_device>("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr3_state::spyhunt_op4_w),state)); |
| 1621 | 1631 | |
| 1622 | 1632 | state->m_spyhunt_sprite_color_mask = 0x00; |
| 1623 | 1633 | state->m_spyhunt_scroll_offset = 88; |
| 1624 | 1634 | |
| 1625 | 1635 | /* the SSIO Z80 doesn't have any program to execute */ |
| 1626 | | machine.device<cpu_device>("csdcpu")->suspend(SUSPEND_REASON_DISABLE, 1); |
| 1636 | machine.device<cpu_device>("csd:cpu")->suspend(SUSPEND_REASON_DISABLE, 1); |
| 1627 | 1637 | |
| 1628 | 1638 | /* kludge for bad ROM read */ |
| 1629 | 1639 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x0b53, 0x0b53, read8_delegate(FUNC(mcr3_state::turbotag_kludge_r),state)); |
src/mame/drivers/mcr.c
| r14963 | r14964 | |
| 283 | 283 | |
| 284 | 284 | |
| 285 | 285 | #include "emu.h" |
| 286 | | #include "audio/mcr.h" |
| 286 | #include "audio/midway.h" |
| 287 | 287 | #include "sound/samples.h" |
| 288 | 288 | #include "machine/nvram.h" |
| 289 | 289 | #include "includes/mcr.h" |
| r14963 | r14964 | |
| 302 | 302 | |
| 303 | 303 | |
| 304 | 304 | |
| 305 | WRITE8_MEMBER(mcr_state::mcr_control_port_w) |
| 306 | { |
| 307 | /* |
| 308 | Bit layout is as follows: |
| 309 | D7 = n/c |
| 310 | D6 = cocktail flip |
| 311 | D5 = red LED |
| 312 | D4 = green LED |
| 313 | D3 = n/c |
| 314 | D2 = coin meter 3 |
| 315 | D1 = coin meter 2 |
| 316 | D0 = coin meter 1 |
| 317 | */ |
| 318 | |
| 319 | coin_counter_w(machine(), 0, (data >> 0) & 1); |
| 320 | coin_counter_w(machine(), 1, (data >> 1) & 1); |
| 321 | coin_counter_w(machine(), 2, (data >> 2) & 1); |
| 322 | mcr_cocktail_flip = (data >> 6) & 1; |
| 323 | } |
| 324 | |
| 325 | |
| 305 | 326 | /************************************* |
| 306 | 327 | * |
| 307 | 328 | * Solar Fox input ports |
| r14963 | r14964 | |
| 316 | 337 | /* game in cocktail mode, they don't work at all. So we fake-mux */ |
| 317 | 338 | /* the controls through player 1's ports */ |
| 318 | 339 | if (mcr_cocktail_flip) |
| 319 | | return input_port_read(machine(), "SSIO.IP0") | 0x08; |
| 340 | return input_port_read(machine(), "ssio:IP0") | 0x08; |
| 320 | 341 | else |
| 321 | | return ((input_port_read(machine(), "SSIO.IP0") & ~0x14) | 0x08) | ((input_port_read(machine(), "SSIO.IP0") & 0x08) >> 1) | ((input_port_read(machine(), "SSIO.IP2") & 0x01) << 4); |
| 342 | return ((input_port_read(machine(), "ssio:IP0") & ~0x14) | 0x08) | ((input_port_read(machine(), "ssio:IP0") & 0x08) >> 1) | ((input_port_read(machine(), "ssio:IP2") & 0x01) << 4); |
| 322 | 343 | } |
| 323 | 344 | |
| 324 | 345 | |
| r14963 | r14964 | |
| 326 | 347 | { |
| 327 | 348 | /* same deal as above */ |
| 328 | 349 | if (mcr_cocktail_flip) |
| 329 | | return input_port_read(machine(), "SSIO.IP1") | 0xf0; |
| 350 | return input_port_read(machine(), "ssio:IP1") | 0xf0; |
| 330 | 351 | else |
| 331 | | return (input_port_read(machine(), "SSIO.IP1") >> 4) | 0xf0; |
| 352 | return (input_port_read(machine(), "ssio:IP1") >> 4) | 0xf0; |
| 332 | 353 | } |
| 333 | 354 | |
| 334 | 355 | |
| r14963 | r14964 | |
| 361 | 382 | READ8_MEMBER(mcr_state::wacko_ip1_r) |
| 362 | 383 | { |
| 363 | 384 | if (!input_mux) |
| 364 | | return input_port_read(machine(), "SSIO.IP1"); |
| 385 | return input_port_read(machine(), "ssio:IP1"); |
| 365 | 386 | else |
| 366 | | return input_port_read(machine(), "SSIO.IP1.ALT"); |
| 387 | return input_port_read(machine(), "ssio:IP1.ALT"); |
| 367 | 388 | } |
| 368 | 389 | |
| 369 | 390 | |
| 370 | 391 | READ8_MEMBER(mcr_state::wacko_ip2_r) |
| 371 | 392 | { |
| 372 | 393 | if (!input_mux) |
| 373 | | return input_port_read(machine(), "SSIO.IP2"); |
| 394 | return input_port_read(machine(), "ssio:IP2"); |
| 374 | 395 | else |
| 375 | | return input_port_read(machine(), "SSIO.IP2.ALT"); |
| 396 | return input_port_read(machine(), "ssio:IP2.ALT"); |
| 376 | 397 | } |
| 377 | 398 | |
| 378 | 399 | |
| r14963 | r14964 | |
| 512 | 533 | |
| 513 | 534 | /* bit 4 = SEL0 (J1-8) on squawk n talk board */ |
| 514 | 535 | /* bits 3-0 = MD3-0 connected to squawk n talk (J1-4,3,2,1) */ |
| 515 | | squawkntalk_data_w(space, offset, data); |
| 536 | m_squawk_n_talk->write(space, offset, data); |
| 516 | 537 | } |
| 517 | 538 | |
| 518 | 539 | |
| r14963 | r14964 | |
| 595 | 616 | |
| 596 | 617 | /* bit 4 = SEL0 (J1-8) on squawk n talk board */ |
| 597 | 618 | /* bits 3-0 = MD3-0 connected to squawk n talk (J1-4,3,2,1) */ |
| 598 | | squawkntalk_data_w(space, offset, data); |
| 619 | m_squawk_n_talk->write(space, offset, data); |
| 599 | 620 | } |
| 600 | 621 | |
| 601 | 622 | |
| r14963 | r14964 | |
| 608 | 629 | |
| 609 | 630 | READ8_MEMBER(mcr_state::demoderb_ip1_r) |
| 610 | 631 | { |
| 611 | | return input_port_read(machine(), "SSIO.IP1") | |
| 612 | | (input_port_read(machine(), input_mux ? "SSIO.IP1.ALT2" : "SSIO.IP1.ALT1") << 2); |
| 632 | return input_port_read(machine(), "ssio:IP1") | |
| 633 | (input_port_read(machine(), input_mux ? "ssio:IP1.ALT2" : "ssio:IP1.ALT1") << 2); |
| 613 | 634 | } |
| 614 | 635 | |
| 615 | 636 | |
| 616 | 637 | READ8_MEMBER(mcr_state::demoderb_ip2_r) |
| 617 | 638 | { |
| 618 | | return input_port_read(machine(), "SSIO.IP2") | |
| 619 | | (input_port_read(machine(), input_mux ? "SSIO.IP2.ALT2" : "SSIO.IP2.ALT1") << 2); |
| 639 | return input_port_read(machine(), "ssio:IP2") | |
| 640 | (input_port_read(machine(), input_mux ? "ssio:IP2.ALT2" : "ssio:IP2.ALT1") << 2); |
| 620 | 641 | } |
| 621 | 642 | |
| 622 | 643 | |
| r14963 | r14964 | |
| 624 | 645 | { |
| 625 | 646 | if (data & 0x40) input_mux = 1; |
| 626 | 647 | if (data & 0x80) input_mux = 0; |
| 627 | | turbocs_data_w(space, offset, data); |
| 648 | m_turbo_chip_squeak->write(space, offset, data); |
| 628 | 649 | } |
| 629 | 650 | |
| 630 | 651 | |
| r14963 | r14964 | |
| 650 | 671 | static ADDRESS_MAP_START( cpu_90009_portmap, AS_IO, 8, mcr_state ) |
| 651 | 672 | ADDRESS_MAP_UNMAP_HIGH |
| 652 | 673 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 653 | | SSIO_INPUT_PORTS |
| 674 | SSIO_INPUT_PORTS("ssio") |
| 654 | 675 | AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) |
| 655 | 676 | AM_RANGE(0xe8, 0xe8) AM_WRITENOP |
| 656 | 677 | AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE_LEGACY("ctc", z80ctc_r, z80ctc_w) |
| r14963 | r14964 | |
| 677 | 698 | static ADDRESS_MAP_START( cpu_90010_portmap, AS_IO, 8, mcr_state ) |
| 678 | 699 | ADDRESS_MAP_UNMAP_HIGH |
| 679 | 700 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 680 | | SSIO_INPUT_PORTS |
| 701 | SSIO_INPUT_PORTS("ssio") |
| 681 | 702 | AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) |
| 682 | 703 | AM_RANGE(0xe8, 0xe8) AM_WRITENOP |
| 683 | 704 | AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE_LEGACY("ctc", z80ctc_r, z80ctc_w) |
| r14963 | r14964 | |
| 705 | 726 | static ADDRESS_MAP_START( cpu_91490_portmap, AS_IO, 8, mcr_state ) |
| 706 | 727 | ADDRESS_MAP_UNMAP_HIGH |
| 707 | 728 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 708 | | SSIO_INPUT_PORTS |
| 729 | SSIO_INPUT_PORTS("ssio") |
| 709 | 730 | AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) |
| 710 | 731 | AM_RANGE(0xe8, 0xe8) AM_WRITENOP |
| 711 | 732 | AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE_LEGACY("ctc", z80ctc_r, z80ctc_w) |
| r14963 | r14964 | |
| 748 | 769 | |
| 749 | 770 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 750 | 771 | static INPUT_PORTS_START( solarfox ) |
| 751 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 772 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 752 | 773 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 753 | 774 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 754 | 775 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| r14963 | r14964 | |
| 758 | 779 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 759 | 780 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 760 | 781 | |
| 761 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 782 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 762 | 783 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 763 | 784 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 764 | 785 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| r14963 | r14964 | |
| 768 | 789 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL |
| 769 | 790 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| 770 | 791 | |
| 771 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 792 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 772 | 793 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 773 | 794 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 774 | 795 | |
| 775 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 796 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 776 | 797 | PORT_DIPNAME( 0x03, 0x03, "Bonus" ) |
| 777 | 798 | PORT_DIPSETTING( 0x02, DEF_STR( None ) ) |
| 778 | 799 | PORT_DIPSETTING( 0x03, "After 10 racks" ) |
| r14963 | r14964 | |
| 789 | 810 | PORT_DIPSETTING( 0x80, DEF_STR( Upright )) |
| 790 | 811 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail )) |
| 791 | 812 | |
| 792 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 813 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 793 | 814 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 794 | 815 | |
| 795 | | PORT_START("SSIO.DIP") |
| 816 | PORT_START("ssio:DIP") |
| 796 | 817 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 797 | 818 | INPUT_PORTS_END |
| 798 | 819 | |
| 799 | 820 | |
| 800 | 821 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 801 | 822 | static INPUT_PORTS_START( kick ) |
| 802 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 823 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 803 | 824 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 804 | 825 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 805 | 826 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 809 | 830 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 810 | 831 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 811 | 832 | |
| 812 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 833 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 813 | 834 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(3) PORT_KEYDELTA(50) PORT_REVERSE |
| 814 | 835 | |
| 815 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 836 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 816 | 837 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 817 | 838 | |
| 818 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 839 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 819 | 840 | PORT_DIPNAME( 0x01, 0x00, "Music" ) |
| 820 | 841 | PORT_DIPSETTING( 0x01, DEF_STR( Off )) |
| 821 | 842 | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| 822 | 843 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 823 | 844 | |
| 824 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 845 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 825 | 846 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 826 | 847 | |
| 827 | | PORT_START("SSIO.DIP") |
| 848 | PORT_START("ssio:DIP") |
| 828 | 849 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 829 | 850 | |
| 830 | 851 | PORT_START("DIAL2") |
| r14963 | r14964 | |
| 834 | 855 | |
| 835 | 856 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 836 | 857 | static INPUT_PORTS_START( kickc ) |
| 837 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 858 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 838 | 859 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 839 | 860 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 840 | 861 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 844 | 865 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 845 | 866 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 846 | 867 | |
| 847 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 868 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 848 | 869 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(3) PORT_KEYDELTA(50) PORT_REVERSE |
| 849 | 870 | |
| 850 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 871 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 851 | 872 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 852 | 873 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 853 | 874 | |
| 854 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 875 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 855 | 876 | PORT_DIPNAME( 0x01, 0x00, "Music" ) |
| 856 | 877 | PORT_DIPSETTING( 0x01, DEF_STR( Off )) |
| 857 | 878 | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| r14963 | r14964 | |
| 861 | 882 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail )) |
| 862 | 883 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 863 | 884 | |
| 864 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 885 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 865 | 886 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 866 | 887 | |
| 867 | | PORT_START("SSIO.DIP") |
| 888 | PORT_START("ssio:DIP") |
| 868 | 889 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 869 | 890 | |
| 870 | 891 | PORT_START("DIAL2") |
| r14963 | r14964 | |
| 874 | 895 | |
| 875 | 896 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 876 | 897 | static INPUT_PORTS_START( shollow ) |
| 877 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 898 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 878 | 899 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 879 | 900 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 880 | 901 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 884 | 905 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 885 | 906 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 886 | 907 | |
| 887 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 908 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 888 | 909 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 889 | 910 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 890 | 911 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| r14963 | r14964 | |
| 894 | 915 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 895 | 916 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 896 | 917 | |
| 897 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 918 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 898 | 919 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 899 | 920 | |
| 900 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 921 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 901 | 922 | PORT_DIPNAME( 0x01, 0x01, "Coin Meters" ) |
| 902 | 923 | PORT_DIPSETTING( 0x01, "1" ) |
| 903 | 924 | PORT_DIPSETTING( 0x00, "2" ) |
| r14963 | r14964 | |
| 906 | 927 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) |
| 907 | 928 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 908 | 929 | |
| 909 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 930 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 910 | 931 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 911 | 932 | |
| 912 | | PORT_START("SSIO.DIP") |
| 933 | PORT_START("ssio:DIP") |
| 913 | 934 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 914 | 935 | INPUT_PORTS_END |
| 915 | 936 | |
| 916 | 937 | |
| 917 | 938 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 918 | 939 | static INPUT_PORTS_START( tron ) |
| 919 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 940 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 920 | 941 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 921 | 942 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 922 | 943 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 926 | 947 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 927 | 948 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 928 | 949 | |
| 929 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 950 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 930 | 951 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE |
| 931 | 952 | |
| 932 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 953 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 933 | 954 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 934 | 955 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 935 | 956 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r14963 | r14964 | |
| 939 | 960 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 940 | 961 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 941 | 962 | |
| 942 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 963 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 943 | 964 | PORT_DIPNAME( 0x01, 0x00, "Coin Meters" ) PORT_DIPLOCATION("SW1:1") |
| 944 | 965 | PORT_DIPSETTING( 0x01, "1" ) |
| 945 | 966 | PORT_DIPSETTING( 0x00, "2" ) |
| r14963 | r14964 | |
| 958 | 979 | // According to the manual, SW1 is a bank of *10* switches (9 is unused and 10 is freeze) |
| 959 | 980 | // Where are the values for the other two bits read? |
| 960 | 981 | |
| 961 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 982 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 962 | 983 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL |
| 963 | 984 | |
| 964 | | PORT_START("SSIO.DIP") |
| 985 | PORT_START("ssio:DIP") |
| 965 | 986 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 966 | 987 | |
| 967 | 988 | INPUT_PORTS_END |
| 968 | 989 | |
| 969 | 990 | static INPUT_PORTS_START( tron3 ) |
| 970 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 991 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 971 | 992 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 972 | 993 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 973 | 994 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 977 | 998 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 978 | 999 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 979 | 1000 | |
| 980 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1001 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 981 | 1002 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE |
| 982 | 1003 | |
| 983 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1004 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 984 | 1005 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 985 | 1006 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 986 | 1007 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r14963 | r14964 | |
| 990 | 1011 | // PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 991 | 1012 | // PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 992 | 1013 | |
| 993 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1014 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 994 | 1015 | PORT_DIPNAME( 0x01, 0x00, "Coin Meters" ) PORT_DIPLOCATION("SW1:1") |
| 995 | 1016 | PORT_DIPSETTING( 0x01, "1" ) |
| 996 | 1017 | PORT_DIPSETTING( 0x00, "2" ) |
| r14963 | r14964 | |
| 1009 | 1030 | // According to the manual, SW1 is a bank of *10* switches (9 is unused and 10 is freeze) |
| 1010 | 1031 | // Where are the values for the other two bits read? |
| 1011 | 1032 | |
| 1012 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1033 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1013 | 1034 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1014 | 1035 | // PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL |
| 1015 | 1036 | |
| 1016 | | PORT_START("SSIO.DIP") |
| 1037 | PORT_START("ssio:DIP") |
| 1017 | 1038 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1018 | 1039 | |
| 1019 | 1040 | INPUT_PORTS_END |
| r14963 | r14964 | |
| 1022 | 1043 | |
| 1023 | 1044 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 1024 | 1045 | static INPUT_PORTS_START( kroozr ) |
| 1025 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1046 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1026 | 1047 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1027 | 1048 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1028 | 1049 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 1032 | 1053 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1033 | 1054 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 1034 | 1055 | |
| 1035 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1056 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 1036 | 1057 | PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* low 3 bits of spinner */ |
| 1037 | 1058 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* sensor J1-10 */ |
| 1038 | 1059 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* sensor J1-9 */ |
| r14963 | r14964 | |
| 1040 | 1061 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* upper 1 bit of spinner */ |
| 1041 | 1062 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 1042 | 1063 | |
| 1043 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1064 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 1044 | 1065 | PORT_BIT( 0xff, 0x64, IPT_AD_STICK_X ) PORT_MINMAX(48,152) PORT_SENSITIVITY(100) PORT_KEYDELTA(52) |
| 1045 | 1066 | |
| 1046 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1067 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1047 | 1068 | PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1048 | 1069 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) |
| 1049 | 1070 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1050 | 1071 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) |
| 1051 | 1072 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1052 | 1073 | |
| 1053 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1074 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1054 | 1075 | PORT_BIT( 0xff, 0x64, IPT_AD_STICK_Y ) PORT_MINMAX(48,152) PORT_SENSITIVITY(100) PORT_KEYDELTA(52) |
| 1055 | 1076 | |
| 1056 | | PORT_START("SSIO.DIP") |
| 1077 | PORT_START("ssio:DIP") |
| 1057 | 1078 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1058 | 1079 | |
| 1059 | 1080 | PORT_START("DIAL") |
| r14963 | r14964 | |
| 1063 | 1084 | |
| 1064 | 1085 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 1065 | 1086 | static INPUT_PORTS_START( domino ) |
| 1066 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1087 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1067 | 1088 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1068 | 1089 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1069 | 1090 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 1073 | 1094 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1074 | 1095 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 1075 | 1096 | |
| 1076 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1097 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 1077 | 1098 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 1078 | 1099 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1079 | 1100 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY |
| 1080 | 1101 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| 1081 | 1102 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1082 | 1103 | |
| 1083 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1104 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 1084 | 1105 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL |
| 1085 | 1106 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 1086 | 1107 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| r14963 | r14964 | |
| 1088 | 1109 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1089 | 1110 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1090 | 1111 | |
| 1091 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1112 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1092 | 1113 | PORT_DIPNAME( 0x01, 0x00, "Music" ) |
| 1093 | 1114 | PORT_DIPSETTING( 0x01, DEF_STR( Off )) |
| 1094 | 1115 | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| r14963 | r14964 | |
| 1103 | 1124 | PORT_DIPSETTING( 0x80, "1" ) |
| 1104 | 1125 | PORT_DIPSETTING( 0x00, "2" ) |
| 1105 | 1126 | |
| 1106 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1127 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1107 | 1128 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1108 | 1129 | |
| 1109 | | PORT_START("SSIO.DIP") |
| 1130 | PORT_START("ssio:DIP") |
| 1110 | 1131 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1111 | 1132 | INPUT_PORTS_END |
| 1112 | 1133 | |
| 1113 | 1134 | |
| 1114 | 1135 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 1115 | 1136 | static INPUT_PORTS_START( journey ) |
| 1116 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1137 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1117 | 1138 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1118 | 1139 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1119 | 1140 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 1123 | 1144 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1124 | 1145 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 1125 | 1146 | |
| 1126 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1147 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 1127 | 1148 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 1128 | 1149 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1129 | 1150 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY |
| 1130 | 1151 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| 1131 | 1152 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1132 | 1153 | |
| 1133 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1154 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 1134 | 1155 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL |
| 1135 | 1156 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 1136 | 1157 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| r14963 | r14964 | |
| 1138 | 1159 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1139 | 1160 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1140 | 1161 | |
| 1141 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1162 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1142 | 1163 | PORT_DIPNAME( 0x01, 0x01, "Coin Meters" ) |
| 1143 | 1164 | PORT_DIPSETTING( 0x01, "1" ) |
| 1144 | 1165 | PORT_DIPSETTING( 0x00, "2" ) |
| r14963 | r14964 | |
| 1147 | 1168 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) |
| 1148 | 1169 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1149 | 1170 | |
| 1150 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1171 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1151 | 1172 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1152 | 1173 | |
| 1153 | | PORT_START("SSIO.DIP") |
| 1174 | PORT_START("ssio:DIP") |
| 1154 | 1175 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1155 | 1176 | INPUT_PORTS_END |
| 1156 | 1177 | |
| 1157 | 1178 | |
| 1158 | 1179 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 1159 | 1180 | static INPUT_PORTS_START( wacko ) |
| 1160 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1181 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1161 | 1182 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1162 | 1183 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1163 | 1184 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 1167 | 1188 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1168 | 1189 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 1169 | 1190 | |
| 1170 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1191 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 1171 | 1192 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) |
| 1172 | 1193 | |
| 1173 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1194 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 1174 | 1195 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE |
| 1175 | 1196 | |
| 1176 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1197 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1177 | 1198 | PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1178 | 1199 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) |
| 1179 | 1200 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| r14963 | r14964 | |
| 1182 | 1203 | PORT_DIPSETTING( 0x80, "1" ) |
| 1183 | 1204 | PORT_DIPSETTING( 0x00, "2" ) |
| 1184 | 1205 | |
| 1185 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1206 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1186 | 1207 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_4WAY |
| 1187 | 1208 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_4WAY |
| 1188 | 1209 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_4WAY |
| r14963 | r14964 | |
| 1192 | 1213 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_4WAY PORT_COCKTAIL |
| 1193 | 1214 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_4WAY PORT_COCKTAIL |
| 1194 | 1215 | |
| 1195 | | PORT_START("SSIO.DIP") |
| 1216 | PORT_START("ssio:DIP") |
| 1196 | 1217 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1197 | 1218 | |
| 1198 | | PORT_START("SSIO.IP1.ALT") |
| 1219 | PORT_START("ssio:IP1.ALT") |
| 1199 | 1220 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_COCKTAIL |
| 1200 | 1221 | |
| 1201 | | PORT_START("SSIO.IP2.ALT") |
| 1222 | PORT_START("ssio:IP2.ALT") |
| 1202 | 1223 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL |
| 1203 | 1224 | INPUT_PORTS_END |
| 1204 | 1225 | |
| 1205 | 1226 | |
| 1206 | 1227 | /* not verified, no manual found */ |
| 1207 | 1228 | static INPUT_PORTS_START( twotiger ) |
| 1208 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1229 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1209 | 1230 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1210 | 1231 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1211 | 1232 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| r14963 | r14964 | |
| 1215 | 1236 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1216 | 1237 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 1217 | 1238 | |
| 1218 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1239 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 1219 | 1240 | PORT_BIT( 0xff, 0x67, IPT_AD_STICK_X ) PORT_MINMAX(0, 206) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) |
| 1220 | 1241 | |
| 1221 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1242 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 1222 | 1243 | PORT_BIT( 0xff, 0x67, IPT_AD_STICK_X ) PORT_MINMAX(0, 206) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 1223 | 1244 | |
| 1224 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1245 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1225 | 1246 | PORT_DIPNAME( 0x01, 0x00, "Shot Speed" ) |
| 1226 | 1247 | PORT_DIPSETTING( 0x01, "Fast" ) |
| 1227 | 1248 | PORT_DIPSETTING( 0x00, "Slow" ) |
| r14963 | r14964 | |
| 1230 | 1251 | PORT_DIPSETTING( 0x02, "2 Credits" ) |
| 1231 | 1252 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1232 | 1253 | |
| 1233 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1254 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1234 | 1255 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 1235 | 1256 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 1236 | 1257 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r14963 | r14964 | |
| 1239 | 1260 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 1240 | 1261 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1241 | 1262 | |
| 1242 | | PORT_START("SSIO.DIP") |
| 1263 | PORT_START("ssio:DIP") |
| 1243 | 1264 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1244 | 1265 | INPUT_PORTS_END |
| 1245 | 1266 | |
| 1246 | 1267 | |
| 1247 | 1268 | /* not verified, no manual found */ |
| 1248 | 1269 | static INPUT_PORTS_START( twotigrc ) |
| 1249 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1270 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1250 | 1271 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1251 | 1272 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1252 | 1273 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 1256 | 1277 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1257 | 1278 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 1258 | 1279 | |
| 1259 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1280 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 1260 | 1281 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(10) PORT_KEYDELTA(10) PORT_REVERSE |
| 1261 | 1282 | |
| 1262 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1283 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 1263 | 1284 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1264 | 1285 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 1265 | 1286 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 1266 | 1287 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 1267 | 1288 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1268 | 1289 | |
| 1269 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1290 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1270 | 1291 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1271 | 1292 | |
| 1272 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1293 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1273 | 1294 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(10) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2) |
| 1274 | 1295 | |
| 1275 | | PORT_START("SSIO.DIP") |
| 1296 | PORT_START("ssio:DIP") |
| 1276 | 1297 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1277 | 1298 | INPUT_PORTS_END |
| 1278 | 1299 | |
| 1279 | 1300 | |
| 1280 | 1301 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 1281 | 1302 | static INPUT_PORTS_START( tapper ) |
| 1282 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1303 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1283 | 1304 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1284 | 1305 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1285 | 1306 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 1289 | 1310 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1290 | 1311 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 1291 | 1312 | |
| 1292 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1313 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 1293 | 1314 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1294 | 1315 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 1295 | 1316 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| r14963 | r14964 | |
| 1297 | 1318 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1298 | 1319 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1299 | 1320 | |
| 1300 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1321 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 1301 | 1322 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 1302 | 1323 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL |
| 1303 | 1324 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL |
| r14963 | r14964 | |
| 1305 | 1326 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1306 | 1327 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1307 | 1328 | |
| 1308 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1329 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1309 | 1330 | PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1310 | 1331 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) |
| 1311 | 1332 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| r14963 | r14964 | |
| 1318 | 1339 | PORT_DIPSETTING( 0x80, "1" ) |
| 1319 | 1340 | PORT_DIPSETTING( 0x00, "2" ) |
| 1320 | 1341 | |
| 1321 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1342 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1322 | 1343 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1323 | 1344 | |
| 1324 | | PORT_START("SSIO.DIP") |
| 1345 | PORT_START("ssio:DIP") |
| 1325 | 1346 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1326 | 1347 | INPUT_PORTS_END |
| 1327 | 1348 | |
| 1328 | 1349 | |
| 1329 | 1350 | /* not verified, no manual found */ |
| 1330 | 1351 | static INPUT_PORTS_START( timber ) |
| 1331 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1352 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1332 | 1353 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1333 | 1354 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1334 | 1355 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 1338 | 1359 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1339 | 1360 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 1340 | 1361 | |
| 1341 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1362 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 1342 | 1363 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) |
| 1343 | 1364 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) |
| 1344 | 1365 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) |
| r14963 | r14964 | |
| 1347 | 1368 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 1348 | 1369 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1349 | 1370 | |
| 1350 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1371 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 1351 | 1372 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) |
| 1352 | 1373 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) |
| 1353 | 1374 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) |
| r14963 | r14964 | |
| 1356 | 1377 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 1357 | 1378 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1358 | 1379 | |
| 1359 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1380 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1360 | 1381 | PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1361 | 1382 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) |
| 1362 | 1383 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| r14963 | r14964 | |
| 1369 | 1390 | PORT_DIPSETTING( 0x80, "1" ) |
| 1370 | 1391 | PORT_DIPSETTING( 0x00, "2" ) |
| 1371 | 1392 | |
| 1372 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1393 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1373 | 1394 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1374 | 1395 | |
| 1375 | | PORT_START("SSIO.DIP") |
| 1396 | PORT_START("ssio:DIP") |
| 1376 | 1397 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1377 | 1398 | INPUT_PORTS_END |
| 1378 | 1399 | |
| 1379 | 1400 | |
| 1380 | 1401 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 1381 | 1402 | static INPUT_PORTS_START( dotron ) |
| 1382 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1403 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1383 | 1404 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1384 | 1405 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1385 | 1406 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 1389 | 1410 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1390 | 1411 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 1391 | 1412 | |
| 1392 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1413 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 1393 | 1414 | PORT_BIT( 0x7f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE |
| 1394 | 1415 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1395 | 1416 | |
| 1396 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1417 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 1397 | 1418 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 1398 | 1419 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 1399 | 1420 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r14963 | r14964 | |
| 1405 | 1426 | PORT_DIPSETTING( 0x00, "Environmental" ) |
| 1406 | 1427 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) |
| 1407 | 1428 | |
| 1408 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1429 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1409 | 1430 | PORT_DIPNAME( 0x01, 0x01, "Coin Meters" ) |
| 1410 | 1431 | PORT_DIPSETTING( 0x01, "1" ) |
| 1411 | 1432 | PORT_DIPSETTING( 0x00, "2" ) |
| 1412 | 1433 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1413 | 1434 | |
| 1414 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1435 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1415 | 1436 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1416 | 1437 | |
| 1417 | | PORT_START("SSIO.DIP") |
| 1438 | PORT_START("ssio:DIP") |
| 1418 | 1439 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1419 | 1440 | |
| 1420 | 1441 | PORT_START("FAKE") /* fake port to make aiming up & down easier */ |
| r14963 | r14964 | |
| 1424 | 1445 | static INPUT_PORTS_START( dotrone ) |
| 1425 | 1446 | PORT_INCLUDE(dotron) |
| 1426 | 1447 | |
| 1427 | | PORT_MODIFY("SSIO.IP2") |
| 1448 | PORT_MODIFY("ssio:IP2") |
| 1428 | 1449 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) |
| 1429 | 1450 | PORT_DIPSETTING( 0x00, "Environmental" ) |
| 1430 | 1451 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) |
| r14963 | r14964 | |
| 1433 | 1454 | |
| 1434 | 1455 | /* verified from wiring diagram, plus DIP switches from manual */ |
| 1435 | 1456 | static INPUT_PORTS_START( nflfoot ) |
| 1436 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1457 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1437 | 1458 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1438 | 1459 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BILL1 ) |
| 1439 | 1460 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) /* continue game */ |
| r14963 | r14964 | |
| 1443 | 1464 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1444 | 1465 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 1445 | 1466 | |
| 1446 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ |
| 1467 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ |
| 1447 | 1468 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* left engage */ |
| 1448 | 1469 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* left select #1 play */ |
| 1449 | 1470 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* left select #2 play */ |
| r14963 | r14964 | |
| 1453 | 1474 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) /* select one player */ |
| 1454 | 1475 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1455 | 1476 | |
| 1456 | | PORT_START("SSIO.IP2") /* J5 1-8 */ |
| 1477 | PORT_START("ssio:IP2") /* J5 1-8 */ |
| 1457 | 1478 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* right engage */ |
| 1458 | 1479 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* right select #1 play */ |
| 1459 | 1480 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* right select #2 play */ |
| r14963 | r14964 | |
| 1463 | 1484 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) /* select two player */ |
| 1464 | 1485 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) /* connects to IPU board */ |
| 1465 | 1486 | |
| 1466 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1487 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1467 | 1488 | PORT_DIPNAME( 0x01, 0x01, "Coin Meters" ) |
| 1468 | 1489 | PORT_DIPSETTING( 0x01, "1" ) |
| 1469 | 1490 | PORT_DIPSETTING( 0x00, "2" ) |
| 1470 | 1491 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1471 | 1492 | |
| 1472 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1493 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1473 | 1494 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1474 | 1495 | |
| 1475 | | PORT_START("SSIO.DIP") |
| 1496 | PORT_START("ssio:DIP") |
| 1476 | 1497 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1477 | 1498 | INPUT_PORTS_END |
| 1478 | 1499 | |
| r14963 | r14964 | |
| 1480 | 1501 | /* "wiring diagram was not available at time of publication" according to the manual */ |
| 1481 | 1502 | /* DIPs verified from the manual */ |
| 1482 | 1503 | static INPUT_PORTS_START( demoderb ) |
| 1483 | | PORT_START("SSIO.IP0") /* J4 1-8 */ |
| 1504 | PORT_START("ssio:IP0") /* J4 1-8 */ |
| 1484 | 1505 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1485 | 1506 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1486 | 1507 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r14963 | r14964 | |
| 1490 | 1511 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) |
| 1491 | 1512 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1492 | 1513 | |
| 1493 | | PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ /* The high 6 bits contain the steering wheel value */ |
| 1514 | PORT_START("ssio:IP1") /* J4 10-13,15-18 */ /* The high 6 bits contain the steering wheel value */ |
| 1494 | 1515 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 1495 | 1516 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 1496 | 1517 | |
| 1497 | | PORT_START("SSIO.IP1.ALT1") /* J4 10-13,15-18 */ /* The high 6 bits contain the steering wheel value */ |
| 1518 | PORT_START("ssio:IP1.ALT1") /* J4 10-13,15-18 */ /* The high 6 bits contain the steering wheel value */ |
| 1498 | 1519 | PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(1) |
| 1499 | 1520 | |
| 1500 | | PORT_START("SSIO.IP1.ALT2") /* IN1 (muxed) -- the high 6 bits contain the steering wheel value */ |
| 1521 | PORT_START("ssio:IP1.ALT2") /* IN1 (muxed) -- the high 6 bits contain the steering wheel value */ |
| 1501 | 1522 | PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(3) |
| 1502 | 1523 | |
| 1503 | | PORT_START("SSIO.IP2") /* J5 1-8 */ /* The high 6 bits contain the steering wheel value */ |
| 1524 | PORT_START("ssio:IP2") /* J5 1-8 */ /* The high 6 bits contain the steering wheel value */ |
| 1504 | 1525 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 1505 | 1526 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 1506 | 1527 | |
| 1507 | | PORT_START("SSIO.IP2.ALT1") /* J5 1-8 */ /* The high 6 bits contain the steering wheel value */ |
| 1528 | PORT_START("ssio:IP2.ALT1") /* J5 1-8 */ /* The high 6 bits contain the steering wheel value */ |
| 1508 | 1529 | PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2) |
| 1509 | 1530 | |
| 1510 | | PORT_START("SSIO.IP2.ALT2") /* IN2 (muxed) -- the high 6 bits contain the steering wheel value */ |
| 1531 | PORT_START("ssio:IP2.ALT2") /* IN2 (muxed) -- the high 6 bits contain the steering wheel value */ |
| 1511 | 1532 | PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(4) |
| 1512 | 1533 | |
| 1513 | | PORT_START("SSIO.IP3") /* DIPSW @ B3 */ |
| 1534 | PORT_START("ssio:IP3") /* DIPSW @ B3 */ |
| 1514 | 1535 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) |
| 1515 | 1536 | PORT_DIPSETTING( 0x01, "2P Upright" ) |
| 1516 | 1537 | PORT_DIPSETTING( 0x00, "4P Cocktail" ) |
| r14963 | r14964 | |
| 1530 | 1551 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) |
| 1531 | 1552 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1532 | 1553 | |
| 1533 | | PORT_START("SSIO.IP4") /* J6 1-8 */ |
| 1554 | PORT_START("ssio:IP4") /* J6 1-8 */ |
| 1534 | 1555 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 1535 | 1556 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 1536 | 1557 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START3 ) |
| r14963 | r14964 | |
| 1540 | 1561 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) |
| 1541 | 1562 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) |
| 1542 | 1563 | |
| 1543 | | PORT_START("SSIO.DIP") |
| 1564 | PORT_START("ssio:DIP") |
| 1544 | 1565 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1545 | 1566 | |
| 1546 | 1567 | INPUT_PORTS_END |
| r14963 | r14964 | |
| 1635 | 1656 | MCFG_VIDEO_START(mcr) |
| 1636 | 1657 | |
| 1637 | 1658 | /* sound hardware */ |
| 1638 | | MCFG_FRAGMENT_ADD(mcr_ssio) |
| 1659 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 1660 | MCFG_MIDWAY_SSIO_ADD("ssio") |
| 1661 | MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) |
| 1662 | MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) |
| 1639 | 1663 | MACHINE_CONFIG_END |
| 1640 | 1664 | |
| 1641 | 1665 | |
| r14963 | r14964 | |
| 1693 | 1717 | static MACHINE_CONFIG_DERIVED( mcr_91490_snt, mcr_91490 ) |
| 1694 | 1718 | |
| 1695 | 1719 | /* basic machine hardware */ |
| 1696 | | MCFG_FRAGMENT_ADD(squawk_n_talk) |
| 1720 | MCFG_MIDWAY_SQUAWK_N_TALK_ADD("snt") |
| 1721 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) |
| 1722 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) |
| 1697 | 1723 | MACHINE_CONFIG_END |
| 1698 | 1724 | |
| 1699 | 1725 | |
| r14963 | r14964 | |
| 1721 | 1747 | static MACHINE_CONFIG_DERIVED( mcr_91490_tcs, mcr_91490 ) |
| 1722 | 1748 | |
| 1723 | 1749 | /* basic machine hardware */ |
| 1724 | | MCFG_FRAGMENT_ADD(turbo_chip_squeak) |
| 1750 | MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD("tcs") |
| 1751 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) |
| 1752 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) |
| 1725 | 1753 | MACHINE_CONFIG_END |
| 1726 | 1754 | |
| 1727 | 1755 | |
| r14963 | r14964 | |
| 1742 | 1770 | ROM_LOAD( "sfcpu.6d", 0x5000, 0x1000, CRC(bd993cd9) SHA1(c074a6a40d0b9c0f4bf3fc5982263c89549fb338) ) |
| 1743 | 1771 | ROM_LOAD( "sfcpu.7d", 0x6000, 0x1000, CRC(8ad8731d) SHA1(ffd19c3fbad3c5a240ab27963812cc300f3d7b89) ) |
| 1744 | 1772 | |
| 1745 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 1773 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 1746 | 1774 | ROM_LOAD( "sfsnd.7a", 0x0000, 0x1000, CRC(cdecf83a) SHA1(5acd2709e214408d756b39916bb98cd4ecda7988) ) |
| 1747 | 1775 | ROM_LOAD( "sfsnd.8a", 0x1000, 0x1000, CRC(cb7788cb) SHA1(9e86f9131a6f0fc96dd436e21baf45e215ee65f4) ) |
| 1748 | 1776 | ROM_LOAD( "sfsnd.9a", 0x2000, 0x1000, CRC(304896ce) SHA1(00ff640eab50022da980cdc5ce8cedebaaebc9cf) ) |
| r14963 | r14964 | |
| 1771 | 1799 | ROM_LOAD( "1600e-v2.d5", 0x4000, 0x1000, CRC(1d2834c0) SHA1(176fad90ab14c922a575c3d12a2c8a339d1518d4) ) |
| 1772 | 1800 | ROM_LOAD( "1700f-v2.d6", 0x5000, 0x1000, CRC(ddf84ce1) SHA1(6f80b9a5cbd75b6e4af569ca4bcfcde7daaad64f) ) |
| 1773 | 1801 | |
| 1774 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 1802 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 1775 | 1803 | ROM_LOAD( "4200-a.a7", 0x0000, 0x1000, CRC(9e35c02e) SHA1(92afd0126dcfb2d4401927b2cf261090e186b6fa) ) |
| 1776 | 1804 | ROM_LOAD( "4300-b.a8", 0x1000, 0x1000, CRC(ca2b7c28) SHA1(fdcca3b755822c045c3c321cccc3f58112e2ad11) ) |
| 1777 | 1805 | ROM_LOAD( "4400-c.a9", 0x2000, 0x1000, CRC(d1901551) SHA1(fd7d6059f8ac59f95ae6f8ef12fbfce7ed16ec12) ) |
| r14963 | r14964 | |
| 1800 | 1828 | ROM_LOAD( "1600-e-ur.d5", 0x4000, 0x1000, CRC(f24bc0d7) SHA1(31dc996898c01f3427403e396a47444732904674) ) |
| 1801 | 1829 | ROM_LOAD( "1700-f-ur.d6", 0x5000, 0x1000, CRC(672361fc) SHA1(010029460c25935f2156eb64c9109c26ce40b752) ) |
| 1802 | 1830 | |
| 1803 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 1831 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 1804 | 1832 | ROM_LOAD( "4200-a.a7", 0x0000, 0x1000, CRC(9e35c02e) SHA1(92afd0126dcfb2d4401927b2cf261090e186b6fa) ) |
| 1805 | 1833 | ROM_LOAD( "4300-b.a8", 0x1000, 0x1000, CRC(ca2b7c28) SHA1(fdcca3b755822c045c3c321cccc3f58112e2ad11) ) |
| 1806 | 1834 | ROM_LOAD( "4400-c.a9", 0x2000, 0x1000, CRC(d1901551) SHA1(fd7d6059f8ac59f95ae6f8ef12fbfce7ed16ec12) ) |
| r14963 | r14964 | |
| 1829 | 1857 | ROM_LOAD( "1600-e.d5", 0x4000, 0x1000, CRC(eaaa78a7) SHA1(3c057d486f3938561fb9947e0463b1255ae04ef9) ) |
| 1830 | 1858 | ROM_LOAD( "1700-f.d6", 0x5000, 0x1000, CRC(c06c880f) SHA1(d5ac5682de316b9cb09d433e2c02746efadd2a81) ) |
| 1831 | 1859 | |
| 1832 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 1860 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 1833 | 1861 | ROM_LOAD( "4200-a.a7", 0x0000, 0x1000, CRC(9e35c02e) SHA1(92afd0126dcfb2d4401927b2cf261090e186b6fa) ) |
| 1834 | 1862 | ROM_LOAD( "4300-b.a8", 0x1000, 0x1000, CRC(ca2b7c28) SHA1(fdcca3b755822c045c3c321cccc3f58112e2ad11) ) |
| 1835 | 1863 | ROM_LOAD( "4400-c.a9", 0x2000, 0x1000, CRC(d1901551) SHA1(fd7d6059f8ac59f95ae6f8ef12fbfce7ed16ec12) ) |
| r14963 | r14964 | |
| 1859 | 1887 | ROM_LOAD( "sh-pro.04", 0x8000, 0x2000, CRC(22fa9175) SHA1(fd8ea76b3a7ffaf48fc11dd3b7c58e548e3e57c5) ) |
| 1860 | 1888 | ROM_LOAD( "sh-pro.05", 0xa000, 0x2000, CRC(1716e2bb) SHA1(771e4c20d63e4e1d99723e6355db67064a278ae5) ) |
| 1861 | 1889 | |
| 1862 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 1890 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 1863 | 1891 | ROM_LOAD( "sh-snd.01", 0x0000, 0x1000, CRC(55a297cc) SHA1(b34f37fca61cdba26b5671feee991d133b8697a4) ) |
| 1864 | 1892 | ROM_LOAD( "sh-snd.02", 0x1000, 0x1000, CRC(46fc31f6) SHA1(9b1a56962b2d210b1013bc35de780c6d5b3eb4bc) ) |
| 1865 | 1893 | ROM_LOAD( "sh-snd.03", 0x2000, 0x1000, CRC(b1f4a6a8) SHA1(ba724f9cc0cc35dd31d4ad8b36a51da9d6cbfbcf) ) |
| r14963 | r14964 | |
| 1887 | 1915 | ROM_LOAD( "sh-pro.04", 0x8000, 0x2000, CRC(22fa9175) SHA1(fd8ea76b3a7ffaf48fc11dd3b7c58e548e3e57c5) ) |
| 1888 | 1916 | ROM_LOAD( "sh-pro.05", 0xa000, 0x2000, CRC(1716e2bb) SHA1(771e4c20d63e4e1d99723e6355db67064a278ae5) ) |
| 1889 | 1917 | |
| 1890 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 1918 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 1891 | 1919 | ROM_LOAD( "snd-0.a7", 0x0000, 0x1000, CRC(9d815bb3) SHA1(51af797e08dbe3921e11ce70c3d0da50979336a4) ) |
| 1892 | 1920 | ROM_LOAD( "snd-1.a8", 0x1000, 0x1000, CRC(9f253412) SHA1(a526e864073a2f9e67e2cbe53ab17fe726336241) ) |
| 1893 | 1921 | ROM_LOAD( "snd-2.a9", 0x2000, 0x1000, CRC(7783d6c6) SHA1(1fb2117532e7da28afdb9837bcb6848165cf8173) ) |
| r14963 | r14964 | |
| 1919 | 1947 | ROM_LOAD( "scpu_pge.d6", 0x8000, 0x2000, CRC(24c185d8) SHA1(45ac7c53f6f4eba5c7bf3fc6559cddd3821eddad) ) |
| 1920 | 1948 | ROM_LOAD( "scpu_pgf.d7", 0xA000, 0x2000, CRC(38c4bbaf) SHA1(a7cd496ce75199b8279ea963520cf70d5f562bb2) ) |
| 1921 | 1949 | |
| 1922 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ |
| 1950 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ |
| 1923 | 1951 | ROM_LOAD( "ssi_0a.a7", 0x0000, 0x1000, CRC(765e6eba) SHA1(42efeefc8571dfc237c0be3368248f1e56add92e) ) |
| 1924 | 1952 | ROM_LOAD( "ssi_0b.a8", 0x1000, 0x1000, CRC(1b90ccdd) SHA1(0876e5eeaa63bb8cc97f3634a6ddd8a29a9b012f) ) |
| 1925 | 1953 | ROM_LOAD( "ssi_0c.a9", 0x2000, 0x1000, CRC(3a4bc629) SHA1(ce8452a99a313ae7429de471bbea39de08c9fd4b) ) |
| r14963 | r14964 | |
| 1958 | 1986 | ROM_LOAD( "scpu_pge.d6", 0x8000, 0x2000, CRC(24c185d8) SHA1(45ac7c53f6f4eba5c7bf3fc6559cddd3821eddad) ) |
| 1959 | 1987 | ROM_LOAD( "scpu_pgf.d7", 0xa000, 0x2000, CRC(38c4bbaf) SHA1(a7cd496ce75199b8279ea963520cf70d5f562bb2) ) |
| 1960 | 1988 | |
| 1961 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ |
| 1989 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ |
| 1962 | 1990 | ROM_LOAD( "ssi_0a.a7", 0x0000, 0x1000, CRC(765e6eba) SHA1(42efeefc8571dfc237c0be3368248f1e56add92e) ) |
| 1963 | 1991 | ROM_LOAD( "ssi_0b.a8", 0x1000, 0x1000, CRC(1b90ccdd) SHA1(0876e5eeaa63bb8cc97f3634a6ddd8a29a9b012f) ) |
| 1964 | 1992 | ROM_LOAD( "ssi_0c.a9", 0x2000, 0x1000, CRC(3a4bc629) SHA1(ce8452a99a313ae7429de471bbea39de08c9fd4b) ) |
| r14963 | r14964 | |
| 1997 | 2025 | ROM_LOAD( "scpu_pge(__0617).d6", 0x8000, 0x2000, CRC(ea198fa8) SHA1(d8c97ea87d504e77edc38c87c2953c8c4f1a405b) ) |
| 1998 | 2026 | ROM_LOAD( "scpu_pgf(__0617).d7", 0xa000, 0x2000, CRC(4325fb08) SHA1(70727aa37354425315d8a8b3ca07bbe91f7e8f08) ) |
| 1999 | 2027 | |
| 2000 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ |
| 2028 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ |
| 2001 | 2029 | ROM_LOAD( "ssi_0a.a7", 0x0000, 0x1000, CRC(765e6eba) SHA1(42efeefc8571dfc237c0be3368248f1e56add92e) ) |
| 2002 | 2030 | ROM_LOAD( "ssi_0b.a8", 0x1000, 0x1000, CRC(1b90ccdd) SHA1(0876e5eeaa63bb8cc97f3634a6ddd8a29a9b012f) ) |
| 2003 | 2031 | ROM_LOAD( "ssi_0c.a9", 0x2000, 0x1000, CRC(3a4bc629) SHA1(ce8452a99a313ae7429de471bbea39de08c9fd4b) ) |
| r14963 | r14964 | |
| 2036 | 2064 | ROM_LOAD( "pge-615.d6", 0x8000, 0x2000, CRC(ea198fa8) SHA1(d8c97ea87d504e77edc38c87c2953c8c4f1a405b) ) |
| 2037 | 2065 | ROM_LOAD( "pgf-615.d7", 0xa000, 0x2000, CRC(790ee743) SHA1(14dc84b2bbaab22772e0579f11fe0bf136a0ddab) ) |
| 2038 | 2066 | |
| 2039 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ |
| 2067 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ |
| 2040 | 2068 | ROM_LOAD( "ssi_oa.a7", 0x0000, 0x1000, CRC(2cbb332b) SHA1(48d1cbb336733588af728a3d0e02c8613d2b5fb2) ) |
| 2041 | 2069 | ROM_LOAD( "ssi_ob.a8", 0x1000, 0x1000, CRC(1355b7e6) SHA1(61ed045212da67cd449910ae601058cf209b37e5) ) |
| 2042 | 2070 | ROM_LOAD( "ssi_oc.a9", 0x2000, 0x1000, CRC(6dd4b7c9) SHA1(1ce78c242d1a7d9a4524a663a42fc8bc2870053a) ) |
| r14963 | r14964 | |
| 2071 | 2099 | ROM_LOAD( "kozmkcpu.5d", 0x6000, 0x2000, CRC(a0ec38c1) SHA1(adf3ef36355d255e4ebc0d4dc86b9d7910e26b03) ) |
| 2072 | 2100 | ROM_LOAD( "kozmkcpu.6d", 0x8000, 0x2000, CRC(7044f2b6) SHA1(55b64c9233fe0c8b351688fab29aad049d49faf2) ) |
| 2073 | 2101 | |
| 2074 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2102 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2075 | 2103 | ROM_LOAD( "kozmksnd.7a", 0x0000, 0x1000, CRC(6736e433) SHA1(d43216ef34a67f047b7c35001767d838386add7d) ) |
| 2076 | 2104 | ROM_LOAD( "kozmksnd.8a", 0x1000, 0x1000, CRC(ea9cd919) SHA1(a1533b2857c881c83adce2c7bbfaa4a3148ead8e) ) |
| 2077 | 2105 | ROM_LOAD( "kozmksnd.9a", 0x2000, 0x1000, CRC(9dfa7994) SHA1(0a2d824e9fe1d48c43027f5f10f4c43476f08e07) ) |
| r14963 | r14964 | |
| 2098 | 2126 | ROM_LOAD( "dmanpg2.bin", 0x4000, 0x2000, CRC(7dd2177a) SHA1(b4b17e2580679fbe340d8b8d8cb7171c49ae0a21) ) |
| 2099 | 2127 | ROM_LOAD( "dmanpg3.bin", 0x6000, 0x2000, CRC(f2e0aa44) SHA1(2f04dc74c69dfe3847d5e4330e560b0a9f18c33a) ) |
| 2100 | 2128 | |
| 2101 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2129 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2102 | 2130 | ROM_LOAD( "dm-a7.snd", 0x0000, 0x1000, CRC(fa982dcc) SHA1(970340bfa0ac13ad8c2bf5adc21d7ca7aa9e525a) ) |
| 2103 | 2131 | ROM_LOAD( "dm-a8.snd", 0x1000, 0x1000, CRC(72839019) SHA1(4aa278cfb00fac76cba88600bb300ee88ec3f7ee) ) |
| 2104 | 2132 | ROM_LOAD( "dm-a9.snd", 0x2000, 0x1000, CRC(ad760da7) SHA1(024fce0f5d46e82b66c4283925556130735b863e) ) |
| r14963 | r14964 | |
| 2126 | 2154 | ROM_LOAD( "wackocpu.4d", 0x4000, 0x2000, CRC(515edff7) SHA1(9288cb5efb51086ef8610eecf8e3feae1da9fc2a) ) |
| 2127 | 2155 | ROM_LOAD( "wackocpu.5d", 0x6000, 0x2000, CRC(9b01bf32) SHA1(d209ba2503d7b54786f74107bb399313a08a09ba) ) |
| 2128 | 2156 | |
| 2129 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2157 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2130 | 2158 | ROM_LOAD( "wackosnd.7a", 0x0000, 0x1000, CRC(1a58763f) SHA1(37f0870d67d52c86ae2d188e9beaa56a3a8fa130) ) |
| 2131 | 2159 | ROM_LOAD( "wackosnd.8a", 0x1000, 0x1000, CRC(a4e3c771) SHA1(fe677090423e1d80cde07d2e74be8380d8c55e95) ) |
| 2132 | 2160 | ROM_LOAD( "wackosnd.9a", 0x2000, 0x1000, CRC(155ba3dd) SHA1(51aaeeb68b2b7eb8238c7c3b06e84dcf44683ee9) ) |
| r14963 | r14964 | |
| 2153 | 2181 | ROM_LOAD( "cpu_d4", 0x4000, 0x2000, CRC(f1ab8c4d) SHA1(0c410ddd2e1cd8a19c73bc0c7aca70d8c4308eeb) ) |
| 2154 | 2182 | ROM_LOAD( "cpu_d5", 0x6000, 0x2000, CRC(d7129900) SHA1(af5093082cfbc9fa4b42cfc74e62adbf9b6c63db) ) |
| 2155 | 2183 | |
| 2156 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2184 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2157 | 2185 | ROM_LOAD( "ssio_a7", 0x0000, 0x1000, CRC(64ddc16c) SHA1(e119e1702ea00ffb86d413ed8e68b4e9dfefa79e) ) |
| 2158 | 2186 | ROM_LOAD( "ssio_a8", 0x1000, 0x1000, CRC(c3467612) SHA1(c968776d9561a7ac67e95a987b6d826ec2dc748e) ) |
| 2159 | 2187 | ROM_LOAD( "ssio_a9", 0x2000, 0x1000, CRC(c50f7b2d) SHA1(0f4779d4955d500c50b544d945fa78a5428b86ce) ) |
| r14963 | r14964 | |
| 2179 | 2207 | ROM_LOAD( "2tgrpg2.bin", 0x4000, 0x2000, CRC(b5ca3f17) SHA1(ac51eefe9ff49bc358daf58525e529070684ed1b) ) |
| 2180 | 2208 | ROM_LOAD( "2tgrpg3.bin", 0x6000, 0x2000, CRC(8aa82049) SHA1(6e42d082d29986f5c0698ae39750fb8f9eb1e6cd) ) |
| 2181 | 2209 | |
| 2182 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2210 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2183 | 2211 | ROM_LOAD( "2tgra7.bin", 0x0000, 0x1000, CRC(4620d970) SHA1(2c2c1da84199b846575a6291dc235f30539959fa) ) |
| 2184 | 2212 | ROM_LOAD( "2tgra8.bin", 0x1000, 0x1000, CRC(e95d8cfe) SHA1(846d5543596bb86cf08f998056c1fc695cb4f62c) ) |
| 2185 | 2213 | ROM_LOAD( "2tgra9.bin", 0x2000, 0x1000, CRC(81e6ce0e) SHA1(77e145e150763bfe5760ac3e4f68218a65b9bfe0) ) |
| r14963 | r14964 | |
| 2207 | 2235 | ROM_LOAD( "d5", 0x6000, 0x2000, CRC(c3023931) SHA1(e591a18c5fc8befcd9f2b93d9131374c572cdbcd) ) |
| 2208 | 2236 | ROM_LOAD( "d6", 0x8000, 0x2000, CRC(5d445c99) SHA1(df2bce203f510b4bda42bb7114b79eb0b2b4e2e0) ) |
| 2209 | 2237 | |
| 2210 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2238 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2211 | 2239 | ROM_LOAD( "a", 0x0000, 0x1000, CRC(2524a2aa) SHA1(4bd78b4fb42c2506fa6734419b42cbbe4c240e94) ) |
| 2212 | 2240 | ROM_LOAD( "b", 0x1000, 0x1000, CRC(b8e35814) SHA1(379308431d1204d6cb5ae8a13e378ec7b3fab0a9) ) |
| 2213 | 2241 | ROM_LOAD( "c", 0x2000, 0x1000, CRC(09c488cf) SHA1(7aa3321db748f2612693f8348e590369e8d48140) ) |
| r14963 | r14964 | |
| 2239 | 2267 | ROM_LOAD( "tappg2.bin", 0x08000, 0x4000, CRC(3a1f8778) SHA1(cb46a2248289ced7282b1463f433dcb970c42c1a) ) |
| 2240 | 2268 | ROM_LOAD( "tappg3.bin", 0x0c000, 0x2000, CRC(e8dcdaa4) SHA1(45bf1571a2418c7dc00ccc7061a3e04e65cb6bff) ) |
| 2241 | 2269 | |
| 2242 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2270 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2243 | 2271 | ROM_LOAD( "tapsnda7.bin", 0x0000, 0x1000, CRC(0e8bb9d5) SHA1(9e281c340b7702523c86d56317efad9e3688e585) ) |
| 2244 | 2272 | ROM_LOAD( "tapsnda8.bin", 0x1000, 0x1000, CRC(0cf0e29b) SHA1(14334b9d2bfece3fe5bda0cbd53158ead8d27e53) ) |
| 2245 | 2273 | ROM_LOAD( "tapsnda9.bin", 0x2000, 0x1000, CRC(31eb6dc6) SHA1(b38bba5f12516d899e023f99147868e3402fbd7b) ) |
| r14963 | r14964 | |
| 2270 | 2298 | ROM_LOAD( "pr02_3c.128", 0x08000, 0x4000, CRC(b3755d41) SHA1(434d3c27b9f1e43def081d79b9f56dbce93a9207) ) |
| 2271 | 2299 | ROM_LOAD( "pr03_4c.64", 0x0c000, 0x2000, CRC(77273096) SHA1(5e4e2dc1703b39f588ba374f6a610f273d710532) ) |
| 2272 | 2300 | |
| 2273 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2301 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2274 | 2302 | ROM_LOAD( "tapsnda7.bin", 0x0000, 0x1000, CRC(0e8bb9d5) SHA1(9e281c340b7702523c86d56317efad9e3688e585) ) |
| 2275 | 2303 | ROM_LOAD( "tapsnda8.bin", 0x1000, 0x1000, CRC(0cf0e29b) SHA1(14334b9d2bfece3fe5bda0cbd53158ead8d27e53) ) |
| 2276 | 2304 | ROM_LOAD( "tapsnda9.bin", 0x2000, 0x1000, CRC(31eb6dc6) SHA1(b38bba5f12516d899e023f99147868e3402fbd7b) ) |
| r14963 | r14964 | |
| 2301 | 2329 | ROM_LOAD( "5793", 0x8000, 0x4000, CRC(fecbf683) SHA1(de365f4e567d93a9ed9672fabbc739a3a0d47d59) ) |
| 2302 | 2330 | ROM_LOAD( "5794", 0xc000, 0x2000, CRC(5bdc1916) SHA1(ee038443ae55598568bd1a53c0a671a2828d3949) ) |
| 2303 | 2331 | |
| 2304 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2332 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2305 | 2333 | ROM_LOAD( "5788", 0x00000, 0x1000, CRC(5c1d0982) SHA1(c2c94ab26ebce30ce4efc239e555c6368794d265) ) |
| 2306 | 2334 | ROM_LOAD( "5787", 0x01000, 0x1000, CRC(09e74ed8) SHA1(f5c8585d443bca67d4065314a06431d1f104c553) ) |
| 2307 | 2335 | ROM_LOAD( "5786", 0x02000, 0x1000, CRC(c3e98284) SHA1(2a4dc0deca48f4d2ac9fe673ecb9548415c996a9) ) |
| r14963 | r14964 | |
| 2332 | 2360 | ROM_LOAD( "rbtpg2.bin", 0x08000, 0x4000, CRC(0b332c97) SHA1(b9878c8a61a98e787e547bb6ab81c809875891f3) ) |
| 2333 | 2361 | ROM_LOAD( "rbtpg3.bin", 0x0c000, 0x2000, CRC(698c06f2) SHA1(ddb21e39ede2222cb2286ec9dba06341fe1c9db7) ) |
| 2334 | 2362 | |
| 2335 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2363 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2336 | 2364 | ROM_LOAD( "5788", 0x00000, 0x1000, CRC(5c1d0982) SHA1(c2c94ab26ebce30ce4efc239e555c6368794d265) ) |
| 2337 | 2365 | ROM_LOAD( "5787", 0x01000, 0x1000, CRC(09e74ed8) SHA1(f5c8585d443bca67d4065314a06431d1f104c553) ) |
| 2338 | 2366 | ROM_LOAD( "5786", 0x02000, 0x1000, CRC(c3e98284) SHA1(2a4dc0deca48f4d2ac9fe673ecb9548415c996a9) ) |
| r14963 | r14964 | |
| 2364 | 2392 | ROM_LOAD( "timpg2.bin", 0x08000, 0x4000, CRC(632989f9) SHA1(9e9dc343746299bb0dc7ada206211366c5a05075) ) |
| 2365 | 2393 | ROM_LOAD( "timpg3.bin", 0x0c000, 0x2000, CRC(dae8a0dc) SHA1(f065fa3184efa6524d4f950616f3fbae4ea17513) ) |
| 2366 | 2394 | |
| 2367 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2395 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2368 | 2396 | ROM_LOAD( "tima7.bin", 0x00000, 0x1000, CRC(c615dc3e) SHA1(664d5e3ac3936fd04a855ee0c88f1c1b4d1dea5b) ) |
| 2369 | 2397 | ROM_LOAD( "tima8.bin", 0x01000, 0x1000, CRC(83841c87) SHA1(bd5a2e567e015e10e45651e15b42ffb3b69d2305) ) |
| 2370 | 2398 | ROM_LOAD( "tima9.bin", 0x02000, 0x1000, CRC(22bcdcd3) SHA1(69cedc8cec52ca310f828dfe73d7de04729b06d3) ) |
| r14963 | r14964 | |
| 2395 | 2423 | ROM_LOAD( "loc-pg2.3c", 0x08000, 0x4000, CRC(ab0b3800) SHA1(457a18bd98a3c4a9f893a3704dbc7d0fde4ef8ba) ) |
| 2396 | 2424 | ROM_LOAD( "loc-pg1.4c", 0x0c000, 0x2000, CRC(f98c9f8e) SHA1(a215f0fd6cd9e8cacbe06cb7bfe4e2cced150c86) ) |
| 2397 | 2425 | |
| 2398 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2426 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2399 | 2427 | ROM_LOAD( "sound0.a7", 0x00000, 0x1000, CRC(6d39bf19) SHA1(3d27466fcb6d41133f16119cddb815833c8b4eda) ) |
| 2400 | 2428 | ROM_LOAD( "sound1.a8", 0x01000, 0x1000, CRC(ac872e1d) SHA1(c2833b20e124c505be3d5be2c885b9cf9927ca4c) ) |
| 2401 | 2429 | ROM_LOAD( "sound2.a9", 0x02000, 0x1000, CRC(e8ef6519) SHA1(261b0463a73b403bc46df3e04f3d12173787d6e7) ) |
| r14963 | r14964 | |
| 2426 | 2454 | ROM_LOAD( "aloc-pg2.3c", 0x08000, 0x4000, CRC(cb89c9be) SHA1(c773a68891fbf94808a2ee0036928c0c48d6673d) ) |
| 2427 | 2455 | ROM_LOAD( "aloc-pg1.4c", 0x0c000, 0x2000, CRC(5098faf4) SHA1(9f861f99cb170513b68aee48bbfd60ee439d7fa9) ) |
| 2428 | 2456 | |
| 2429 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2457 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2430 | 2458 | ROM_LOAD( "asound0.a7", 0x00000, 0x1000, CRC(7fb54293) SHA1(6d538a3e48f98e269623850f1f6774848a89fd59) ) |
| 2431 | 2459 | ROM_LOAD( "asound1.a8", 0x01000, 0x1000, CRC(edef7326) SHA1(5c9a64604252eea0628bf9d6221e8add82f66abe) ) |
| 2432 | 2460 | ROM_LOAD( "sound2.a9", 0x02000, 0x1000, CRC(e8ef6519) SHA1(261b0463a73b403bc46df3e04f3d12173787d6e7) ) |
| r14963 | r14964 | |
| 2457 | 2485 | ROM_LOAD( "loc-cpu3", 0x08000, 0x4000, CRC(94bb1a0e) SHA1(af4769fac39e67eff840675bf93cc4304f2875fd) ) |
| 2458 | 2486 | ROM_LOAD( "loc-cpu4", 0x0c000, 0x2000, CRC(c137383c) SHA1(ccf7cf9c7c0528aa819cfca34c1c0e89ab2d586a) ) |
| 2459 | 2487 | |
| 2460 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2488 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2461 | 2489 | ROM_LOAD( "loc-a", 0x00000, 0x1000, CRC(2de6a8a8) SHA1(6bba00daed8836297f3189db4e4fe8e158adc465) ) |
| 2462 | 2490 | ROM_LOAD( "loc-b", 0x01000, 0x1000, CRC(4097663e) SHA1(afb5224529550cec378415a5cd81b47f6c6c101b) ) |
| 2463 | 2491 | ROM_LOAD( "loc-c", 0x02000, 0x1000, CRC(f576b9e7) SHA1(4ff39c46c390aa93d900f5f7a0b35fa71f066863) ) |
| 2464 | 2492 | ROM_LOAD( "loc-d", 0x03000, 0x1000, CRC(74b0059e) SHA1(1fe393721446538036fb6110fdc3920959ebd596) ) |
| 2465 | 2493 | |
| 2466 | | ROM_REGION( 0x10000, "sntcpu", 0 ) |
| 2494 | ROM_REGION( 0x10000, "snt:cpu", 0 ) |
| 2467 | 2495 | ROM_LOAD( "pre.u3", 0x09000, 0x1000, CRC(c3d0f762) SHA1(a1857641c35b5bcb33f29fe79a1a581c4cbf129b) ) |
| 2468 | 2496 | ROM_LOAD( "pre.u4", 0x0a000, 0x1000, CRC(7ca79b43) SHA1(c995e1e67d70706a090eb777e9fec0f1ba03f82d) ) |
| 2469 | 2497 | ROM_LOAD( "pre.u5", 0x0b000, 0x1000, CRC(24e9618e) SHA1(eb245ff381a76b314a0ed3519e140444afae341c) ) |
| r14963 | r14964 | |
| 2494 | 2522 | ROM_LOAD( "nflcpupg.2c", 0x04000, 0x4000, CRC(2aa76168) SHA1(608df883f5e960153a963404d5cc4b4ce4ec435d) ) |
| 2495 | 2523 | ROM_LOAD( "nflcpupg.3c", 0x08000, 0x4000, CRC(5ec01e09) SHA1(2bf60ab7d47f53583b677195976d6f6a9e90c55c) ) |
| 2496 | 2524 | |
| 2497 | | ROM_REGION( 0x10000, "ssiocpu", 0 ) |
| 2525 | ROM_REGION( 0x10000, "ssio:cpu", 0 ) |
| 2498 | 2526 | ROM_LOAD( "nflsnd.a7", 0x0000, 0x1000, CRC(1339be2e) SHA1(5c1743f4d20f94053eb306d3749057608df4a6a2) ) |
| 2499 | 2527 | ROM_LOAD( "nflsnd.a8", 0x1000, 0x1000, CRC(8630b560) SHA1(0c537f48184d3a7a9ee51c30d7c33dc39c46e823) ) |
| 2500 | 2528 | ROM_LOAD( "nflsnd.a9", 0x2000, 0x1000, CRC(1e0fe4c8) SHA1(718dfaced2d8d84dab4c32265bed422e07af0f9e) ) |
| 2501 | 2529 | |
| 2502 | | ROM_REGION( 0x10000, "sntcpu", 0 ) |
| 2530 | ROM_REGION( 0x10000, "snt:cpu", 0 ) |
| 2503 | 2531 | ROM_LOAD( "nfl-sqtk-11-15-83.u2", 0x08000, 0x1000, CRC(aeddda31) SHA1(8ebe9d8606c4328b1b3f4633db30d7636acf210b) ) |
| 2504 | 2532 | ROM_LOAD( "nfl-sqtk-11-15-83.u3", 0x09000, 0x1000, CRC(36229d13) SHA1(d174098ce1e4bc89ded15a08db37933ab9532f2b) ) |
| 2505 | 2533 | ROM_LOAD( "nfl-sqtk-11-15-83.u4", 0x0a000, 0x1000, CRC(b202439b) SHA1(b09e94b0b176f80b12fb4cefa6efd5b2cccb6192) ) |
| r14963 | r14964 | |
| 2534 | 2562 | ROM_LOAD( "dd_pro1", 0x04000, 0x4000, CRC(4c713bfe) SHA1(493b6ba01e86e7586ad123c53cf7f0a0c191d670) ) |
| 2535 | 2563 | ROM_LOAD( "dd_pro2", 0x08000, 0x4000, CRC(c2cbd2a4) SHA1(fa642b2f61ff5529ab688a43c1dc14357a4eba6f) ) |
| 2536 | 2564 | |
| 2537 | | ROM_REGION( 0x10000, "ssiocpu", ROMREGION_ERASE00 ) /* 64k for the audio CPU, not populated */ |
| 2565 | ROM_REGION( 0x10000, "ssio:cpu", ROMREGION_ERASE00 ) /* 64k for the audio CPU, not populated */ |
| 2538 | 2566 | |
| 2539 | | ROM_REGION( 0x10000, "tcscpu", 0 ) /* 64k for the Turbo Cheap Squeak */ |
| 2567 | ROM_REGION( 0x10000, "tcs:cpu", 0 ) /* 64k for the Turbo Cheap Squeak */ |
| 2540 | 2568 | ROM_LOAD( "tcs_u5.bin", 0x0c000, 0x2000, CRC(eca33b2c) SHA1(938b021ea3b0f23aed7a98a930a58af371a02303) ) |
| 2541 | 2569 | ROM_LOAD( "tcs_u4.bin", 0x0e000, 0x2000, CRC(3490289a) SHA1(a9d56ea60bb901267da41ab408f8e1ed3742b0ac) ) |
| 2542 | 2570 | |
| r14963 | r14964 | |
| 2576 | 2604 | |
| 2577 | 2605 | state_save_register_global(machine, input_mux); |
| 2578 | 2606 | state_save_register_global(machine, last_op4); |
| 2607 | |
| 2608 | midway_ssio_device *ssio = machine.device<midway_ssio_device>("ssio"); |
| 2609 | if (ssio != NULL) |
| 2610 | { |
| 2611 | mcr_state *state = machine.driver_data<mcr_state>(); |
| 2612 | ssio->set_custom_output(0, 0xff, write8_delegate(FUNC(mcr_state::mcr_control_port_w), state)); |
| 2613 | } |
| 2579 | 2614 | } |
| 2580 | 2615 | |
| 2581 | 2616 | |
| 2582 | 2617 | static DRIVER_INIT( solarfox ) |
| 2583 | 2618 | { |
| 2584 | 2619 | mcr_init(machine, 90009, 91399, 90908); |
| 2585 | | mcr_sound_init(machine, MCR_SSIO); |
| 2586 | 2620 | |
| 2587 | 2621 | mcr_state *state = machine.driver_data<mcr_state>(); |
| 2588 | | ssio_set_custom_input(0, 0x1c, read8_delegate(FUNC(mcr_state::solarfox_ip0_r),state)); |
| 2589 | | ssio_set_custom_input(1, 0xff, read8_delegate(FUNC(mcr_state::solarfox_ip1_r),state)); |
| 2622 | machine.device<midway_ssio_device>("ssio")->set_custom_input(0, 0x1c, read8_delegate(FUNC(mcr_state::solarfox_ip0_r),state)); |
| 2623 | machine.device<midway_ssio_device>("ssio")->set_custom_input(1, 0xff, read8_delegate(FUNC(mcr_state::solarfox_ip1_r),state)); |
| 2590 | 2624 | |
| 2591 | 2625 | mcr12_sprite_xoffs = 16; |
| 2592 | 2626 | } |
| r14963 | r14964 | |
| 2595 | 2629 | static DRIVER_INIT( kick ) |
| 2596 | 2630 | { |
| 2597 | 2631 | mcr_init(machine, 90009, 91399, 90908); |
| 2598 | | mcr_sound_init(machine, MCR_SSIO); |
| 2599 | 2632 | |
| 2600 | 2633 | mcr_state *state = machine.driver_data<mcr_state>(); |
| 2601 | | ssio_set_custom_input(1, 0xf0, read8_delegate(FUNC(mcr_state::kick_ip1_r),state)); |
| 2634 | machine.device<midway_ssio_device>("ssio")->set_custom_input(1, 0xf0, read8_delegate(FUNC(mcr_state::kick_ip1_r),state)); |
| 2602 | 2635 | |
| 2603 | 2636 | mcr12_sprite_xoffs_flip = 16; |
| 2604 | 2637 | } |
| r14963 | r14964 | |
| 2607 | 2640 | static DRIVER_INIT( mcr_90010 ) |
| 2608 | 2641 | { |
| 2609 | 2642 | mcr_init(machine, 90010, 91399, 90913); |
| 2610 | | mcr_sound_init(machine, MCR_SSIO); |
| 2611 | 2643 | } |
| 2612 | 2644 | |
| 2613 | 2645 | |
| 2614 | 2646 | static DRIVER_INIT( wacko ) |
| 2615 | 2647 | { |
| 2616 | 2648 | mcr_init(machine, 90010, 91399, 90913); |
| 2617 | | mcr_sound_init(machine, MCR_SSIO); |
| 2618 | 2649 | |
| 2619 | 2650 | mcr_state *state = machine.driver_data<mcr_state>(); |
| 2620 | | ssio_set_custom_input(1, 0xff, read8_delegate(FUNC(mcr_state::wacko_ip1_r),state)); |
| 2621 | | ssio_set_custom_input(2, 0xff, read8_delegate(FUNC(mcr_state::wacko_ip2_r),state)); |
| 2622 | | ssio_set_custom_output(4, 0x01, write8_delegate(FUNC(mcr_state::wacko_op4_w),state)); |
| 2651 | machine.device<midway_ssio_device>("ssio")->set_custom_input(1, 0xff, read8_delegate(FUNC(mcr_state::wacko_ip1_r),state)); |
| 2652 | machine.device<midway_ssio_device>("ssio")->set_custom_input(2, 0xff, read8_delegate(FUNC(mcr_state::wacko_ip2_r),state)); |
| 2653 | machine.device<midway_ssio_device>("ssio")->set_custom_output(4, 0x01, write8_delegate(FUNC(mcr_state::wacko_op4_w),state)); |
| 2623 | 2654 | } |
| 2624 | 2655 | |
| 2625 | 2656 | |
| 2626 | 2657 | static DRIVER_INIT( twotiger ) |
| 2627 | 2658 | { |
| 2628 | 2659 | mcr_init(machine, 90010, 91399, 90913); |
| 2629 | | mcr_sound_init(machine, MCR_SSIO); |
| 2630 | 2660 | |
| 2631 | 2661 | mcr_state *state = machine.driver_data<mcr_state>(); |
| 2632 | | ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::twotiger_op4_w),state)); |
| 2662 | machine.device<midway_ssio_device>("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::twotiger_op4_w),state)); |
| 2633 | 2663 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_readwrite_handler(0xe800, 0xefff, 0, 0x1000, read8_delegate(FUNC(mcr_state::twotiger_videoram_r),state), write8_delegate(FUNC(mcr_state::twotiger_videoram_w),state)); |
| 2634 | 2664 | } |
| 2635 | 2665 | |
| r14963 | r14964 | |
| 2637 | 2667 | static DRIVER_INIT( kroozr ) |
| 2638 | 2668 | { |
| 2639 | 2669 | mcr_init(machine, 90010, 91399, 91483); |
| 2640 | | mcr_sound_init(machine, MCR_SSIO); |
| 2641 | 2670 | |
| 2642 | 2671 | mcr_state *state = machine.driver_data<mcr_state>(); |
| 2643 | | ssio_set_custom_input(1, 0x47, read8_delegate(FUNC(mcr_state::kroozr_ip1_r),state)); |
| 2644 | | ssio_set_custom_output(4, 0x34, write8_delegate(FUNC(mcr_state::kroozr_op4_w),state)); |
| 2672 | machine.device<midway_ssio_device>("ssio")->set_custom_input(1, 0x47, read8_delegate(FUNC(mcr_state::kroozr_ip1_r),state)); |
| 2673 | machine.device<midway_ssio_device>("ssio")->set_custom_output(4, 0x34, write8_delegate(FUNC(mcr_state::kroozr_op4_w),state)); |
| 2645 | 2674 | } |
| 2646 | 2675 | |
| 2647 | 2676 | |
| 2648 | 2677 | static DRIVER_INIT( journey ) |
| 2649 | 2678 | { |
| 2650 | 2679 | mcr_init(machine, 91475, 91464, 90913); |
| 2651 | | mcr_sound_init(machine, MCR_SSIO); |
| 2652 | 2680 | |
| 2653 | 2681 | mcr_state *state = machine.driver_data<mcr_state>(); |
| 2654 | | ssio_set_custom_output(4, 0x01, write8_delegate(FUNC(mcr_state::journey_op4_w),state)); |
| 2682 | machine.device<midway_ssio_device>("ssio")->set_custom_output(4, 0x01, write8_delegate(FUNC(mcr_state::journey_op4_w),state)); |
| 2655 | 2683 | } |
| 2656 | 2684 | |
| 2657 | 2685 | |
| 2658 | 2686 | static DRIVER_INIT( mcr_91490 ) |
| 2659 | 2687 | { |
| 2660 | 2688 | mcr_init(machine, 91490, 91464, 90913); |
| 2661 | | mcr_sound_init(machine, MCR_SSIO); |
| 2662 | 2689 | } |
| 2663 | 2690 | |
| 2664 | 2691 | |
| 2665 | 2692 | static DRIVER_INIT( dotrone ) |
| 2666 | 2693 | { |
| 2667 | 2694 | mcr_init(machine, 91490, 91464, 91657); |
| 2668 | | mcr_sound_init(machine, MCR_SSIO | MCR_SQUAWK_N_TALK); |
| 2669 | 2695 | |
| 2670 | 2696 | mcr_state *state = machine.driver_data<mcr_state>(); |
| 2671 | | ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::dotron_op4_w),state)); |
| 2697 | machine.device<midway_ssio_device>("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::dotron_op4_w),state)); |
| 2672 | 2698 | } |
| 2673 | 2699 | |
| 2674 | 2700 | |
| 2675 | 2701 | static DRIVER_INIT( nflfoot ) |
| 2676 | 2702 | { |
| 2677 | 2703 | mcr_init(machine, 91490, 91464, 91657); |
| 2678 | | mcr_sound_init(machine, MCR_SSIO | MCR_SQUAWK_N_TALK); |
| 2679 | 2704 | |
| 2680 | 2705 | mcr_state *state = machine.driver_data<mcr_state>(); |
| 2681 | | ssio_set_custom_input(2, 0x80, read8_delegate(FUNC(mcr_state::nflfoot_ip2_r),state)); |
| 2682 | | ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::nflfoot_op4_w),state)); |
| 2706 | machine.device<midway_ssio_device>("ssio")->set_custom_input(2, 0x80, read8_delegate(FUNC(mcr_state::nflfoot_ip2_r),state)); |
| 2707 | machine.device<midway_ssio_device>("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::nflfoot_op4_w),state)); |
| 2683 | 2708 | |
| 2684 | 2709 | nflfoot_serial_out_active = FALSE; |
| 2685 | 2710 | nflfoot_serial_in_active = FALSE; |
| r14963 | r14964 | |
| 2696 | 2721 | static DRIVER_INIT( demoderb ) |
| 2697 | 2722 | { |
| 2698 | 2723 | mcr_init(machine, 91490, 91464, 90913); |
| 2699 | | mcr_sound_init(machine, MCR_SSIO | MCR_TURBO_CHIP_SQUEAK); |
| 2700 | 2724 | |
| 2701 | 2725 | mcr_state *state = machine.driver_data<mcr_state>(); |
| 2702 | | ssio_set_custom_input(1, 0xfc, read8_delegate(FUNC(mcr_state::demoderb_ip1_r),state)); |
| 2703 | | ssio_set_custom_input(2, 0xfc, read8_delegate(FUNC(mcr_state::demoderb_ip2_r),state)); |
| 2704 | | ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::demoderb_op4_w),state)); |
| 2726 | machine.device<midway_ssio_device>("ssio")->set_custom_input(1, 0xfc, read8_delegate(FUNC(mcr_state::demoderb_ip1_r),state)); |
| 2727 | machine.device<midway_ssio_device>("ssio")->set_custom_input(2, 0xfc, read8_delegate(FUNC(mcr_state::demoderb_ip2_r),state)); |
| 2728 | machine.device<midway_ssio_device>("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::demoderb_op4_w),state)); |
| 2705 | 2729 | |
| 2706 | 2730 | /* the SSIO Z80 doesn't have any program to execute */ |
| 2707 | | machine.device<cpu_device>("tcscpu")->suspend(SUSPEND_REASON_DISABLE, 1); |
| 2731 | machine.device<cpu_device>("ssio:cpu")->suspend(SUSPEND_REASON_DISABLE, 1); |
| 2708 | 2732 | } |
| 2709 | 2733 | |
| 2710 | 2734 | |
src/mame/drivers/midyunit.c
| r14963 | r14964 | |
| 114 | 114 | #include "emu.h" |
| 115 | 115 | #include "cpu/z80/z80.h" |
| 116 | 116 | #include "cpu/tms34010/tms34010.h" |
| 117 | | #include "audio/williams.h" |
| 118 | 117 | #include "sound/okim6295.h" |
| 119 | 118 | #include "includes/midyunit.h" |
| 120 | 119 | |
| r14963 | r14964 | |
| 152 | 151 | |
| 153 | 152 | CUSTOM_INPUT_MEMBER(midyunit_state::narc_talkback_strobe_r) |
| 154 | 153 | { |
| 155 | | return (williams_narc_talkback_r(machine()) >> 8) & 1; |
| 154 | return (m_narc_sound->read(*machine().memory().first_space(), 0) >> 8) & 1; |
| 156 | 155 | } |
| 157 | 156 | |
| 158 | 157 | |
| 159 | 158 | CUSTOM_INPUT_MEMBER(midyunit_state::narc_talkback_data_r) |
| 160 | 159 | { |
| 161 | | return williams_narc_talkback_r(machine()) & 0xff; |
| 160 | return m_narc_sound->read(*machine().memory().first_space(), 0) & 0xff; |
| 162 | 161 | } |
| 163 | 162 | |
| 164 | 163 | |
| 165 | 164 | CUSTOM_INPUT_MEMBER(midyunit_state::adpcm_irq_state_r) |
| 166 | 165 | { |
| 167 | | return williams_adpcm_sound_irq_r(machine()) & 1; |
| 166 | return m_adpcm_sound->irq_read() & 1; |
| 168 | 167 | } |
| 169 | 168 | |
| 170 | 169 | |
| r14963 | r14964 | |
| 1018 | 1017 | MCFG_VIDEO_START(midzunit) |
| 1019 | 1018 | |
| 1020 | 1019 | /* sound hardware */ |
| 1021 | | MCFG_FRAGMENT_ADD(williams_narc_sound) |
| 1020 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 1021 | MCFG_WILLIAMS_NARC_SOUND_ADD("narcsnd") |
| 1022 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) |
| 1023 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) |
| 1022 | 1024 | MACHINE_CONFIG_END |
| 1023 | 1025 | |
| 1024 | 1026 | |
| r14963 | r14964 | |
| 1046 | 1048 | MCFG_SCREEN_ADD("screen", RASTER) |
| 1047 | 1049 | MCFG_SCREEN_RAW_PARAMS(STDRES_PIXEL_CLOCK*2, 505, 0, 399, 289, 0, 253) |
| 1048 | 1050 | MCFG_SCREEN_UPDATE_STATIC(tms340x0_ind16) |
| 1051 | |
| 1052 | /* sound hardware */ |
| 1053 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1049 | 1054 | MACHINE_CONFIG_END |
| 1050 | 1055 | |
| 1051 | 1056 | |
| 1052 | 1057 | static MACHINE_CONFIG_DERIVED( yunit_cvsd_4bit_slow, yunit_core ) |
| 1053 | 1058 | |
| 1054 | 1059 | /* basic machine hardware */ |
| 1055 | | MCFG_FRAGMENT_ADD(williams_cvsd_sound) |
| 1060 | MCFG_WILLIAMS_CVSD_SOUND_ADD("cvsd") |
| 1061 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1056 | 1062 | |
| 1057 | 1063 | /* video hardware */ |
| 1058 | 1064 | MCFG_PALETTE_LENGTH(256) |
| r14963 | r14964 | |
| 1065 | 1071 | /* basic machine hardware */ |
| 1066 | 1072 | MCFG_CPU_MODIFY("maincpu") |
| 1067 | 1073 | MCFG_CPU_CLOCK(FAST_MASTER_CLOCK) |
| 1068 | | MCFG_FRAGMENT_ADD(williams_cvsd_sound) |
| 1074 | |
| 1075 | MCFG_WILLIAMS_CVSD_SOUND_ADD("cvsd") |
| 1076 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1069 | 1077 | |
| 1070 | 1078 | /* video hardware */ |
| 1071 | 1079 | MCFG_PALETTE_LENGTH(256) |
| r14963 | r14964 | |
| 1076 | 1084 | static MACHINE_CONFIG_DERIVED( yunit_cvsd_6bit_slow, yunit_core ) |
| 1077 | 1085 | |
| 1078 | 1086 | /* basic machine hardware */ |
| 1079 | | MCFG_FRAGMENT_ADD(williams_cvsd_sound) |
| 1087 | MCFG_WILLIAMS_CVSD_SOUND_ADD("cvsd") |
| 1088 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1080 | 1089 | |
| 1081 | 1090 | /* video hardware */ |
| 1082 | 1091 | MCFG_PALETTE_LENGTH(4096) |
| r14963 | r14964 | |
| 1089 | 1098 | /* basic machine hardware */ |
| 1090 | 1099 | MCFG_CPU_MODIFY("maincpu") |
| 1091 | 1100 | MCFG_CPU_CLOCK(FAST_MASTER_CLOCK) |
| 1092 | | MCFG_FRAGMENT_ADD(williams_adpcm_sound) |
| 1101 | |
| 1102 | MCFG_WILLIAMS_ADPCM_SOUND_ADD("adpcm") |
| 1103 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1093 | 1104 | |
| 1094 | 1105 | /* video hardware */ |
| 1095 | 1106 | MCFG_PALETTE_LENGTH(4096) |
| r14963 | r14964 | |
| 1102 | 1113 | /* basic machine hardware */ |
| 1103 | 1114 | MCFG_CPU_MODIFY("maincpu") |
| 1104 | 1115 | MCFG_CPU_CLOCK(FASTER_MASTER_CLOCK) |
| 1105 | | MCFG_FRAGMENT_ADD(williams_adpcm_sound) |
| 1116 | |
| 1117 | MCFG_WILLIAMS_ADPCM_SOUND_ADD("adpcm") |
| 1118 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1106 | 1119 | |
| 1107 | 1120 | /* video hardware */ |
| 1108 | 1121 | MCFG_PALETTE_LENGTH(4096) |
| r14963 | r14964 | |
| 1122 | 1135 | MCFG_VIDEO_START(mkyawdim) |
| 1123 | 1136 | |
| 1124 | 1137 | /* sound hardware */ |
| 1125 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1126 | | |
| 1127 | 1138 | MCFG_OKIM6295_ADD("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified |
| 1128 | 1139 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1129 | 1140 | MACHINE_CONFIG_END |
| r14963 | r14964 | |
| 1137 | 1148 | *************************************/ |
| 1138 | 1149 | |
| 1139 | 1150 | ROM_START( narc ) |
| 1140 | | ROM_REGION( 0x90000, "narc1cpu", 0 ) /* sound CPU */ |
| 1151 | ROM_REGION( 0x90000, "narcsnd:cpu0", 0 ) /* sound CPU */ |
| 1141 | 1152 | ROM_LOAD( "narcrev2.u4", 0x50000, 0x10000, CRC(450a591a) SHA1(bbda8061262738e5866f2707f69483a0a51d2910) ) |
| 1142 | 1153 | ROM_RELOAD( 0x60000, 0x10000 ) |
| 1143 | 1154 | ROM_LOAD( "narcrev2.u5", 0x70000, 0x10000, CRC(e551e5e3) SHA1(c8b4f53dbd4c534abb77d4dc07c4d12653b79894) ) |
| 1144 | 1155 | ROM_RELOAD( 0x80000, 0x10000 ) |
| 1145 | 1156 | |
| 1146 | | ROM_REGION( 0x90000, "narc2cpu", 0 ) /* slave sound CPU */ |
| 1157 | ROM_REGION( 0x90000, "narcsnd:cpu1", 0 ) /* slave sound CPU */ |
| 1147 | 1158 | ROM_LOAD( "narcrev2.u35", 0x10000, 0x10000, CRC(81295892) SHA1(159664e5ee03c88d6e940e70e87e2150dc5b8b25) ) |
| 1148 | 1159 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1149 | 1160 | ROM_LOAD( "narcrev2.u36", 0x30000, 0x10000, CRC(16cdbb13) SHA1(2dfd961a5d909c1804f4fda34de33ee2664c4bc6) ) |
| r14963 | r14964 | |
| 1227 | 1238 | |
| 1228 | 1239 | |
| 1229 | 1240 | ROM_START( narc3 ) |
| 1230 | | ROM_REGION( 0x90000, "narc1cpu", 0 ) /* sound CPU */ |
| 1241 | ROM_REGION( 0x90000, "narcsnd:cpu0", 0 ) /* sound CPU */ |
| 1231 | 1242 | ROM_LOAD( "narcrev2.u4", 0x50000, 0x10000, CRC(450a591a) SHA1(bbda8061262738e5866f2707f69483a0a51d2910) ) |
| 1232 | 1243 | ROM_RELOAD( 0x60000, 0x10000 ) |
| 1233 | 1244 | ROM_LOAD( "narcrev2.u5", 0x70000, 0x10000, CRC(e551e5e3) SHA1(c8b4f53dbd4c534abb77d4dc07c4d12653b79894) ) |
| 1234 | 1245 | ROM_RELOAD( 0x80000, 0x10000 ) |
| 1235 | 1246 | |
| 1236 | | ROM_REGION( 0x90000, "narc2cpu", 0 ) /* slave sound CPU */ |
| 1247 | ROM_REGION( 0x90000, "narcsnd:cpu1", 0 ) /* slave sound CPU */ |
| 1237 | 1248 | ROM_LOAD( "narcrev2.u35", 0x10000, 0x10000, CRC(81295892) SHA1(159664e5ee03c88d6e940e70e87e2150dc5b8b25) ) |
| 1238 | 1249 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1239 | 1250 | ROM_LOAD( "narcrev2.u36", 0x30000, 0x10000, CRC(16cdbb13) SHA1(2dfd961a5d909c1804f4fda34de33ee2664c4bc6) ) |
| r14963 | r14964 | |
| 1328 | 1339 | ROM_END |
| 1329 | 1340 | |
| 1330 | 1341 | ROM_START( narc2 ) |
| 1331 | | ROM_REGION( 0x90000, "narc1cpu", 0 ) /* sound CPU */ |
| 1342 | ROM_REGION( 0x90000, "narcsnd:cpu0", 0 ) /* sound CPU */ |
| 1332 | 1343 | ROM_LOAD( "narcrev2.u4", 0x50000, 0x10000, CRC(450a591a) SHA1(bbda8061262738e5866f2707f69483a0a51d2910) ) |
| 1333 | 1344 | ROM_RELOAD( 0x60000, 0x10000 ) |
| 1334 | 1345 | ROM_LOAD( "narcrev2.u5", 0x70000, 0x10000, CRC(e551e5e3) SHA1(c8b4f53dbd4c534abb77d4dc07c4d12653b79894) ) |
| 1335 | 1346 | ROM_RELOAD( 0x80000, 0x10000 ) |
| 1336 | 1347 | |
| 1337 | | ROM_REGION( 0x90000, "narc2cpu", 0 ) /* slave sound CPU */ |
| 1348 | ROM_REGION( 0x90000, "narcsnd:cpu1", 0 ) /* slave sound CPU */ |
| 1338 | 1349 | ROM_LOAD( "narcrev2.u35", 0x10000, 0x10000, CRC(81295892) SHA1(159664e5ee03c88d6e940e70e87e2150dc5b8b25) ) |
| 1339 | 1350 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1340 | 1351 | ROM_LOAD( "narcrev2.u36", 0x30000, 0x10000, CRC(16cdbb13) SHA1(2dfd961a5d909c1804f4fda34de33ee2664c4bc6) ) |
| r14963 | r14964 | |
| 1430 | 1441 | |
| 1431 | 1442 | |
| 1432 | 1443 | ROM_START( trog ) |
| 1433 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1444 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1434 | 1445 | ROM_LOAD ( "trogu4.bin", 0x10000, 0x10000, CRC(759d0bf4) SHA1(c4c3fa51c43cf7fd241ac1f33d7d220aa9f9edb3) ) |
| 1435 | 1446 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1436 | 1447 | ROM_LOAD ( "trogu19.bin", 0x30000, 0x10000, CRC(960c333d) SHA1(da8ce8dfffffe7a2d60b3f75cc5aa88e5e2be659) ) |
| r14963 | r14964 | |
| 1460 | 1471 | |
| 1461 | 1472 | |
| 1462 | 1473 | ROM_START( trog4 ) |
| 1463 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1474 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1464 | 1475 | ROM_LOAD ( "trogu4.bin", 0x10000, 0x10000, CRC(759d0bf4) SHA1(c4c3fa51c43cf7fd241ac1f33d7d220aa9f9edb3) ) |
| 1465 | 1476 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1466 | 1477 | ROM_LOAD ( "trogu19.bin", 0x30000, 0x10000, CRC(960c333d) SHA1(da8ce8dfffffe7a2d60b3f75cc5aa88e5e2be659) ) |
| r14963 | r14964 | |
| 1490 | 1501 | |
| 1491 | 1502 | |
| 1492 | 1503 | ROM_START( trog3 ) |
| 1493 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1504 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1494 | 1505 | ROM_LOAD ( "trogu4.bin", 0x10000, 0x10000, CRC(759d0bf4) SHA1(c4c3fa51c43cf7fd241ac1f33d7d220aa9f9edb3) ) |
| 1495 | 1506 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1496 | 1507 | ROM_LOAD ( "trogu19.bin", 0x30000, 0x10000, CRC(960c333d) SHA1(da8ce8dfffffe7a2d60b3f75cc5aa88e5e2be659) ) |
| r14963 | r14964 | |
| 1520 | 1531 | |
| 1521 | 1532 | |
| 1522 | 1533 | ROM_START( trogpa6 ) |
| 1523 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1534 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1524 | 1535 | ROM_LOAD ( "trogu4.bin", 0x10000, 0x10000, CRC(759d0bf4) SHA1(c4c3fa51c43cf7fd241ac1f33d7d220aa9f9edb3) ) |
| 1525 | 1536 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1526 | 1537 | ROM_LOAD ( "trogu19.bin", 0x30000, 0x10000, CRC(960c333d) SHA1(da8ce8dfffffe7a2d60b3f75cc5aa88e5e2be659) ) |
| r14963 | r14964 | |
| 1550 | 1561 | |
| 1551 | 1562 | |
| 1552 | 1563 | ROM_START( trogpa4 ) |
| 1553 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1564 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1554 | 1565 | ROM_LOAD ( "trogu4.bin", 0x10000, 0x10000, CRC(759d0bf4) SHA1(c4c3fa51c43cf7fd241ac1f33d7d220aa9f9edb3) ) |
| 1555 | 1566 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1556 | 1567 | ROM_LOAD ( "trogu19.bin", 0x30000, 0x10000, CRC(960c333d) SHA1(da8ce8dfffffe7a2d60b3f75cc5aa88e5e2be659) ) |
| r14963 | r14964 | |
| 1580 | 1591 | |
| 1581 | 1592 | |
| 1582 | 1593 | ROM_START( smashtv ) |
| 1583 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1594 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1584 | 1595 | ROM_LOAD ( "sl2.u4", 0x10000, 0x10000, CRC(29d3f6c8) SHA1(8a90cdff54f59ddb7dba521504d880515a59df08) ) |
| 1585 | 1596 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1586 | 1597 | ROM_LOAD ( "sl2.u19", 0x30000, 0x10000, CRC(ac5a402a) SHA1(c476018062126dc3936caa2c328de490737165ec) ) |
| r14963 | r14964 | |
| 1608 | 1619 | |
| 1609 | 1620 | |
| 1610 | 1621 | ROM_START( smashtv6 ) |
| 1611 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1622 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1612 | 1623 | ROM_LOAD ( "sl2.u4", 0x10000, 0x10000, CRC(29d3f6c8) SHA1(8a90cdff54f59ddb7dba521504d880515a59df08) ) |
| 1613 | 1624 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1614 | 1625 | ROM_LOAD ( "sl2.u19", 0x30000, 0x10000, CRC(ac5a402a) SHA1(c476018062126dc3936caa2c328de490737165ec) ) |
| r14963 | r14964 | |
| 1636 | 1647 | |
| 1637 | 1648 | |
| 1638 | 1649 | ROM_START( smashtv5 ) |
| 1639 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1650 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1640 | 1651 | ROM_LOAD ( "sl2.u4", 0x10000, 0x10000, CRC(29d3f6c8) SHA1(8a90cdff54f59ddb7dba521504d880515a59df08) ) |
| 1641 | 1652 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1642 | 1653 | ROM_LOAD ( "sl2.u19", 0x30000, 0x10000, CRC(ac5a402a) SHA1(c476018062126dc3936caa2c328de490737165ec) ) |
| r14963 | r14964 | |
| 1664 | 1675 | |
| 1665 | 1676 | |
| 1666 | 1677 | ROM_START( smashtv4 ) |
| 1667 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1678 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1668 | 1679 | ROM_LOAD ( "sl2.u4", 0x10000, 0x10000, CRC(29d3f6c8) SHA1(8a90cdff54f59ddb7dba521504d880515a59df08) ) |
| 1669 | 1680 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1670 | 1681 | ROM_LOAD ( "sl2.u19", 0x30000, 0x10000, CRC(ac5a402a) SHA1(c476018062126dc3936caa2c328de490737165ec) ) |
| r14963 | r14964 | |
| 1692 | 1703 | |
| 1693 | 1704 | |
| 1694 | 1705 | ROM_START( smashtv3 ) |
| 1695 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1706 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1696 | 1707 | ROM_LOAD ( "sl2.u4", 0x10000, 0x10000, CRC(29d3f6c8) SHA1(8a90cdff54f59ddb7dba521504d880515a59df08) ) |
| 1697 | 1708 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 1698 | 1709 | ROM_LOAD ( "sl2.u19", 0x30000, 0x10000, CRC(ac5a402a) SHA1(c476018062126dc3936caa2c328de490737165ec) ) |
| r14963 | r14964 | |
| 1720 | 1731 | |
| 1721 | 1732 | |
| 1722 | 1733 | ROM_START( hiimpact ) |
| 1723 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1734 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1724 | 1735 | ROM_LOAD ( "sl1u4.bin", 0x10000, 0x20000, CRC(28effd6a) SHA1(4a839f15e1b453a22fdef7b1801b8cc5cfdf3c29) ) |
| 1725 | 1736 | ROM_LOAD ( "sl1u19.bin", 0x30000, 0x20000, CRC(0ea22c89) SHA1(6d4579f6b10cac685be01348451b3537a0626034) ) |
| 1726 | 1737 | ROM_LOAD ( "sl1u20.bin", 0x50000, 0x20000, CRC(4e747ab5) SHA1(82040f40aac7dae577376a742eadaaa9644500c1) ) |
| r14963 | r14964 | |
| 1755 | 1766 | |
| 1756 | 1767 | |
| 1757 | 1768 | ROM_START( hiimpact4 ) |
| 1758 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1769 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1759 | 1770 | ROM_LOAD ( "sl1u4.bin", 0x10000, 0x20000, CRC(28effd6a) SHA1(4a839f15e1b453a22fdef7b1801b8cc5cfdf3c29) ) |
| 1760 | 1771 | ROM_LOAD ( "sl1u19.bin", 0x30000, 0x20000, CRC(0ea22c89) SHA1(6d4579f6b10cac685be01348451b3537a0626034) ) |
| 1761 | 1772 | ROM_LOAD ( "sl1u20.bin", 0x50000, 0x20000, CRC(4e747ab5) SHA1(82040f40aac7dae577376a742eadaaa9644500c1) ) |
| r14963 | r14964 | |
| 1790 | 1801 | |
| 1791 | 1802 | |
| 1792 | 1803 | ROM_START( hiimpact3 ) |
| 1793 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1804 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1794 | 1805 | ROM_LOAD ( "sl1u4.bin", 0x10000, 0x20000, CRC(28effd6a) SHA1(4a839f15e1b453a22fdef7b1801b8cc5cfdf3c29) ) |
| 1795 | 1806 | ROM_LOAD ( "sl1u19.bin", 0x30000, 0x20000, CRC(0ea22c89) SHA1(6d4579f6b10cac685be01348451b3537a0626034) ) |
| 1796 | 1807 | ROM_LOAD ( "sl1u20.bin", 0x50000, 0x20000, CRC(4e747ab5) SHA1(82040f40aac7dae577376a742eadaaa9644500c1) ) |
| r14963 | r14964 | |
| 1825 | 1836 | |
| 1826 | 1837 | |
| 1827 | 1838 | ROM_START( hiimpact2 ) |
| 1828 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1839 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1829 | 1840 | ROM_LOAD ( "sl1u4.bin", 0x10000, 0x20000, CRC(28effd6a) SHA1(4a839f15e1b453a22fdef7b1801b8cc5cfdf3c29) ) |
| 1830 | 1841 | ROM_LOAD ( "sl1u19.bin", 0x30000, 0x20000, CRC(0ea22c89) SHA1(6d4579f6b10cac685be01348451b3537a0626034) ) |
| 1831 | 1842 | ROM_LOAD ( "sl1u20.bin", 0x50000, 0x20000, CRC(4e747ab5) SHA1(82040f40aac7dae577376a742eadaaa9644500c1) ) |
| r14963 | r14964 | |
| 1860 | 1871 | |
| 1861 | 1872 | |
| 1862 | 1873 | ROM_START( hiimpact1 ) |
| 1863 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1874 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1864 | 1875 | ROM_LOAD ( "sl1u4.bin", 0x10000, 0x20000, CRC(28effd6a) SHA1(4a839f15e1b453a22fdef7b1801b8cc5cfdf3c29) ) |
| 1865 | 1876 | ROM_LOAD ( "sl1u19.bin", 0x30000, 0x20000, CRC(0ea22c89) SHA1(6d4579f6b10cac685be01348451b3537a0626034) ) |
| 1866 | 1877 | ROM_LOAD ( "sl1u20.bin", 0x50000, 0x20000, CRC(4e747ab5) SHA1(82040f40aac7dae577376a742eadaaa9644500c1) ) |
| r14963 | r14964 | |
| 1895 | 1906 | |
| 1896 | 1907 | |
| 1897 | 1908 | ROM_START( hiimpactp ) |
| 1898 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1909 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1899 | 1910 | ROM_LOAD ( "sl1u4.bin", 0x10000, 0x20000, CRC(28effd6a) SHA1(4a839f15e1b453a22fdef7b1801b8cc5cfdf3c29) ) |
| 1900 | 1911 | ROM_LOAD ( "sl1u19.bin", 0x30000, 0x20000, CRC(0ea22c89) SHA1(6d4579f6b10cac685be01348451b3537a0626034) ) |
| 1901 | 1912 | ROM_LOAD ( "sl1u20.bin", 0x50000, 0x20000, CRC(4e747ab5) SHA1(82040f40aac7dae577376a742eadaaa9644500c1) ) |
| r14963 | r14964 | |
| 1930 | 1941 | |
| 1931 | 1942 | |
| 1932 | 1943 | ROM_START( shimpact ) |
| 1933 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1944 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1934 | 1945 | ROM_LOAD ( "shiu4.bin", 0x10000, 0x20000, CRC(1e5a012c) SHA1(4077fc266799a01738b7f88e867535f1fbacd557) ) |
| 1935 | 1946 | ROM_LOAD ( "shiu19.bin", 0x30000, 0x20000, CRC(10f9684e) SHA1(1fdc5364f87fb65f4f2a438841e0fe847f765aaf) ) |
| 1936 | 1947 | ROM_LOAD ( "shiu20.bin", 0x50000, 0x20000, CRC(1b4a71c1) SHA1(74b7b4ae76ebe65f1f46b2117970bfefefbb5344) ) |
| r14963 | r14964 | |
| 1958 | 1969 | |
| 1959 | 1970 | |
| 1960 | 1971 | ROM_START( shimpactp6 ) |
| 1961 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1972 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1962 | 1973 | ROM_LOAD ( "shiu4.bin", 0x10000, 0x20000, CRC(1e5a012c) SHA1(4077fc266799a01738b7f88e867535f1fbacd557) ) |
| 1963 | 1974 | ROM_LOAD ( "shiu19.bin", 0x30000, 0x20000, CRC(10f9684e) SHA1(1fdc5364f87fb65f4f2a438841e0fe847f765aaf) ) |
| 1964 | 1975 | ROM_LOAD ( "shiu20.bin", 0x50000, 0x20000, CRC(1b4a71c1) SHA1(74b7b4ae76ebe65f1f46b2117970bfefefbb5344) ) |
| r14963 | r14964 | |
| 1986 | 1997 | |
| 1987 | 1998 | |
| 1988 | 1999 | ROM_START( shimpactp5 ) |
| 1989 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 2000 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 1990 | 2001 | ROM_LOAD ( "shiu4.bin", 0x10000, 0x20000, CRC(1e5a012c) SHA1(4077fc266799a01738b7f88e867535f1fbacd557) ) |
| 1991 | 2002 | ROM_LOAD ( "shiu19.bin", 0x30000, 0x20000, CRC(10f9684e) SHA1(1fdc5364f87fb65f4f2a438841e0fe847f765aaf) ) |
| 1992 | 2003 | ROM_LOAD ( "shiu20.bin", 0x50000, 0x20000, CRC(1b4a71c1) SHA1(74b7b4ae76ebe65f1f46b2117970bfefefbb5344) ) |
| r14963 | r14964 | |
| 2014 | 2025 | |
| 2015 | 2026 | |
| 2016 | 2027 | ROM_START( shimpactp4 ) /* You must manualy reset the high score table or game will hang after initial demo screen, it's best to do a "Full Factory Restore" */ |
| 2017 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 2028 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 2018 | 2029 | ROM_LOAD ( "shiu4.bin", 0x10000, 0x20000, CRC(1e5a012c) SHA1(4077fc266799a01738b7f88e867535f1fbacd557) ) |
| 2019 | 2030 | ROM_LOAD ( "shiu19.bin", 0x30000, 0x20000, CRC(10f9684e) SHA1(1fdc5364f87fb65f4f2a438841e0fe847f765aaf) ) |
| 2020 | 2031 | ROM_LOAD ( "shiu20.bin", 0x50000, 0x20000, CRC(1b4a71c1) SHA1(74b7b4ae76ebe65f1f46b2117970bfefefbb5344) ) |
| r14963 | r14964 | |
| 2042 | 2053 | |
| 2043 | 2054 | |
| 2044 | 2055 | ROM_START( strkforc ) |
| 2045 | | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 2056 | ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ |
| 2046 | 2057 | ROM_LOAD ( "sfu4.bin", 0x10000, 0x10000, CRC(8f747312) SHA1(729929c209741e72eb83b407cf95d7709ec1b5ae) ) |
| 2047 | 2058 | ROM_RELOAD( 0x20000, 0x10000 ) |
| 2048 | 2059 | ROM_LOAD ( "sfu19.bin", 0x30000, 0x10000, CRC(afb29926) SHA1(ad904c0968a90b8187cc87d6c171fbc021d2f66f) ) |
| r14963 | r14964 | |
| 2074 | 2085 | |
| 2075 | 2086 | |
| 2076 | 2087 | ROM_START( mkla4 ) |
| 2077 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2088 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2078 | 2089 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2079 | 2090 | |
| 2080 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2091 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2081 | 2092 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2082 | 2093 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2083 | 2094 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2106 | 2117 | |
| 2107 | 2118 | |
| 2108 | 2119 | ROM_START( mkla3 ) |
| 2109 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2120 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2110 | 2121 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2111 | 2122 | |
| 2112 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2123 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2113 | 2124 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2114 | 2125 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2115 | 2126 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2138 | 2149 | |
| 2139 | 2150 | |
| 2140 | 2151 | ROM_START( mkla2 ) |
| 2141 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2152 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2142 | 2153 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2143 | 2154 | |
| 2144 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2155 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2145 | 2156 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2146 | 2157 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2147 | 2158 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2170 | 2181 | |
| 2171 | 2182 | |
| 2172 | 2183 | ROM_START( mkla1 ) |
| 2173 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2184 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2174 | 2185 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2175 | 2186 | |
| 2176 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2187 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2177 | 2188 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2178 | 2189 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2179 | 2190 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2202 | 2213 | |
| 2203 | 2214 | |
| 2204 | 2215 | ROM_START( mkprot9 ) |
| 2205 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2216 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2206 | 2217 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2207 | 2218 | |
| 2208 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2219 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2209 | 2220 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2210 | 2221 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2211 | 2222 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2234 | 2245 | |
| 2235 | 2246 | |
| 2236 | 2247 | ROM_START( mkprot8 ) |
| 2237 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2248 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2238 | 2249 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2239 | 2250 | |
| 2240 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2251 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2241 | 2252 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2242 | 2253 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2243 | 2254 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2265 | 2276 | ROM_END |
| 2266 | 2277 | |
| 2267 | 2278 | ROM_START( mkprot4 ) |
| 2268 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2279 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2269 | 2280 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2270 | 2281 | |
| 2271 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2282 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2272 | 2283 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2273 | 2284 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2274 | 2285 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2296 | 2307 | ROM_END |
| 2297 | 2308 | |
| 2298 | 2309 | ROM_START( mkyturbo ) |
| 2299 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2310 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2300 | 2311 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2301 | 2312 | |
| 2302 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2313 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2303 | 2314 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2304 | 2315 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2305 | 2316 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2328 | 2339 | ROM_END |
| 2329 | 2340 | |
| 2330 | 2341 | ROM_START( mkyturboe ) |
| 2331 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2342 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2332 | 2343 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2333 | 2344 | |
| 2334 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2345 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2335 | 2346 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2336 | 2347 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2337 | 2348 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2359 | 2370 | ROM_END |
| 2360 | 2371 | |
| 2361 | 2372 | ROM_START( mknifty ) |
| 2362 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2373 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2363 | 2374 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2364 | 2375 | |
| 2365 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2376 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2366 | 2377 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2367 | 2378 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2368 | 2379 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2390 | 2401 | ROM_END |
| 2391 | 2402 | |
| 2392 | 2403 | ROM_START( mknifty666 ) |
| 2393 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2404 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2394 | 2405 | ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) ) |
| 2395 | 2406 | |
| 2396 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2407 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2397 | 2408 | ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) ) |
| 2398 | 2409 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2399 | 2410 | ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) ) |
| r14963 | r14964 | |
| 2486 | 2497 | |
| 2487 | 2498 | |
| 2488 | 2499 | ROM_START( term2 ) |
| 2489 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2500 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2490 | 2501 | ROM_LOAD ( "t2_snd.3", 0x10000, 0x20000, CRC(73c3f5c4) SHA1(978dd974590e77294dbe9a647aebd3d24af6397f) ) |
| 2491 | 2502 | ROM_RELOAD ( 0x30000, 0x20000 ) |
| 2492 | 2503 | |
| 2493 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2504 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2494 | 2505 | ROM_LOAD ( "t2_snd.12", 0x00000, 0x40000, CRC(e192a40d) SHA1(1f7a0e282c0c8eb66cbe514128bd104433e53b7a) ) |
| 2495 | 2506 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2496 | 2507 | ROM_LOAD ( "t2_snd.13", 0x80000, 0x40000, CRC(956fa80b) SHA1(02ab504627f4b25a394fa4192bb134138cbf6a4f) ) |
| r14963 | r14964 | |
| 2519 | 2530 | |
| 2520 | 2531 | |
| 2521 | 2532 | ROM_START( term2la3 ) |
| 2522 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2533 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2523 | 2534 | ROM_LOAD ( "t2_snd.3", 0x10000, 0x20000, CRC(73c3f5c4) SHA1(978dd974590e77294dbe9a647aebd3d24af6397f) ) |
| 2524 | 2535 | ROM_RELOAD ( 0x30000, 0x20000 ) |
| 2525 | 2536 | |
| 2526 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2537 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2527 | 2538 | ROM_LOAD ( "t2_snd.12", 0x00000, 0x40000, CRC(e192a40d) SHA1(1f7a0e282c0c8eb66cbe514128bd104433e53b7a) ) |
| 2528 | 2539 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2529 | 2540 | ROM_LOAD ( "t2_snd.13", 0x80000, 0x40000, CRC(956fa80b) SHA1(02ab504627f4b25a394fa4192bb134138cbf6a4f) ) |
| r14963 | r14964 | |
| 2552 | 2563 | |
| 2553 | 2564 | |
| 2554 | 2565 | ROM_START( term2la2 ) |
| 2555 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2566 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2556 | 2567 | ROM_LOAD ( "t2_snd.3", 0x10000, 0x20000, CRC(73c3f5c4) SHA1(978dd974590e77294dbe9a647aebd3d24af6397f) ) |
| 2557 | 2568 | ROM_RELOAD ( 0x30000, 0x20000 ) |
| 2558 | 2569 | |
| 2559 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2570 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2560 | 2571 | ROM_LOAD ( "t2_snd.12", 0x00000, 0x40000, CRC(e192a40d) SHA1(1f7a0e282c0c8eb66cbe514128bd104433e53b7a) ) |
| 2561 | 2572 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2562 | 2573 | ROM_LOAD ( "t2_snd.13", 0x80000, 0x40000, CRC(956fa80b) SHA1(02ab504627f4b25a394fa4192bb134138cbf6a4f) ) |
| r14963 | r14964 | |
| 2585 | 2596 | |
| 2586 | 2597 | |
| 2587 | 2598 | ROM_START( term2la1 ) |
| 2588 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2599 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2589 | 2600 | ROM_LOAD ( "t2_snd.3", 0x10000, 0x20000, CRC(73c3f5c4) SHA1(978dd974590e77294dbe9a647aebd3d24af6397f) ) |
| 2590 | 2601 | ROM_RELOAD ( 0x30000, 0x20000 ) |
| 2591 | 2602 | |
| 2592 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2603 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2593 | 2604 | ROM_LOAD ( "t2_snd.12", 0x00000, 0x40000, CRC(e192a40d) SHA1(1f7a0e282c0c8eb66cbe514128bd104433e53b7a) ) |
| 2594 | 2605 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2595 | 2606 | ROM_LOAD ( "t2_snd.13", 0x80000, 0x40000, CRC(956fa80b) SHA1(02ab504627f4b25a394fa4192bb134138cbf6a4f) ) |
| r14963 | r14964 | |
| 2618 | 2629 | |
| 2619 | 2630 | |
| 2620 | 2631 | ROM_START( totcarn ) |
| 2621 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2632 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2622 | 2633 | ROM_LOAD ( "tcu3.bin", 0x10000, 0x20000, CRC(5bdb4665) SHA1(c6b90b914785b8703790957cc4bb4983a332fba6) ) |
| 2623 | 2634 | ROM_RELOAD ( 0x30000, 0x20000 ) |
| 2624 | 2635 | |
| 2625 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2636 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2626 | 2637 | ROM_LOAD ( "tcu12.bin", 0x00000, 0x40000, CRC(d0000ac7) SHA1(2d476c7727462623feb2f1a23fb797eaeed5ce30) ) |
| 2627 | 2638 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2628 | 2639 | ROM_LOAD ( "tcu13.bin", 0x80000, 0x40000, CRC(e48e6f0c) SHA1(bf7d548b6b1901966f99c815129ea160ef36f024) ) |
| r14963 | r14964 | |
| 2651 | 2662 | |
| 2652 | 2663 | |
| 2653 | 2664 | ROM_START( totcarnp ) |
| 2654 | | ROM_REGION( 0x50000, "adpcm", 0 ) /* sound CPU */ |
| 2665 | ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ |
| 2655 | 2666 | ROM_LOAD ( "tcu3.bin", 0x10000, 0x20000, CRC(5bdb4665) SHA1(c6b90b914785b8703790957cc4bb4983a332fba6) ) |
| 2656 | 2667 | ROM_RELOAD ( 0x30000, 0x20000 ) |
| 2657 | 2668 | |
| 2658 | | ROM_REGION( 0x200000, "oki", 0 ) /* ADPCM */ |
| 2669 | ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ |
| 2659 | 2670 | ROM_LOAD ( "tcu12.bin", 0x00000, 0x40000, CRC(d0000ac7) SHA1(2d476c7727462623feb2f1a23fb797eaeed5ce30) ) |
| 2660 | 2671 | ROM_RELOAD( 0x40000, 0x40000 ) |
| 2661 | 2672 | ROM_LOAD ( "tcu13.bin", 0x80000, 0x40000, CRC(e48e6f0c) SHA1(bf7d548b6b1901966f99c815129ea160ef36f024) ) |
src/mame/drivers/bfm_sc4.c
| r14963 | r14964 | |
| 11 | 11 | This file contains the set lists only, for the actual hardware |
| 12 | 12 | emulation see bfm_sc4h.c |
| 13 | 13 | |
| 14 | |
| 15 | note: default Jackpot keys are set to whatever value the game |
| 16 | mentions it should be using with none present, many |
| 17 | games accept multiple keys |
| 18 | |
| 14 | 19 | */ |
| 15 | 20 | |
| 16 | 21 | #include "emu.h" |
| r14963 | r14964 | |
| 9941 | 9946 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 9942 | 9947 | ROM_LOAD16_BYTE( "95400861.lo", 0x00001, 0x080000, CRC(e4949979) SHA1(a00bcd8c839b14b9e1e4b21a8c78a9be789e0cf7) ) |
| 9943 | 9948 | ROM_LOAD16_BYTE( "95400862.hi", 0x00000, 0x080000, CRC(b1cd18f0) SHA1(b34a7d5595d3abad45e0cd027c217ac5b2bb3088) ) |
| 9944 | | sc_pacmn_others |
| 9949 | PACMAN_SOUNDS |
| 9945 | 9950 | ROM_END |
| 9946 | 9951 | |
| 9947 | 9952 | ROM_START( sc4pacmna ) |
| 9948 | 9953 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 9949 | 9954 | ROM_LOAD16_BYTE( "95402111.lo", 0x00001, 0x080000, CRC(e88b337a) SHA1(ecf7c3fb5e68fba9cbccada502022ae942992699) ) |
| 9950 | 9955 | ROM_LOAD16_BYTE( "95402112.hi", 0x00000, 0x080000, CRC(1f17de1d) SHA1(6576f40cf4dc8fd3de1fd121d5a4c19536da87c5) ) |
| 9951 | | sc_pacmn_others |
| 9956 | PACMAN_SOUNDS |
| 9952 | 9957 | ROM_END |
| 9953 | 9958 | |
| 9954 | 9959 | ROM_START( sc4pacmnb ) |
| 9955 | 9960 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 9956 | 9961 | ROM_LOAD16_BYTE( "95403111.lo", 0x00001, 0x080000, CRC(259141c0) SHA1(4bb6d8614696548f1f81f6c2045bde45d4316927) ) |
| 9957 | 9962 | ROM_LOAD16_BYTE( "95403112.hi", 0x00000, 0x080000, CRC(26c12768) SHA1(41dbde2bbc7df5bb9e50d9380f8199345ae1989c) ) |
| 9958 | | sc_pacmn_others |
| 9963 | PACMAN_SOUNDS |
| 9959 | 9964 | ROM_END |
| 9960 | 9965 | |
| 9961 | | ROM_START( sc4pacmnc ) |
| 9966 | ROM_START( sc4pacqp ) |
| 9962 | 9967 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 9963 | 9968 | ROM_LOAD16_BYTE( "96000001.lo", 0x00001, 0x080000, CRC(250b6446) SHA1(d4aaaf1f0eb6833fb90bdfcc46100853db007c98) ) |
| 9964 | 9969 | ROM_LOAD16_BYTE( "96000002.hi", 0x00000, 0x080000, CRC(85aded4d) SHA1(a087e3e82664806858f2b36917a56d5326c79544) ) |
| 9965 | | sc_pacmn_others |
| 9970 | QPS_PACP_SOUNDS |
| 9966 | 9971 | ROM_END |
| 9967 | 9972 | |
| 9968 | | ROM_START( sc4pacmnd ) |
| 9973 | ROM_START( sc4pacqpa ) |
| 9969 | 9974 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 9970 | 9975 | ROM_LOAD16_BYTE( "96000016.odd", 0x00001, 0x080000, CRC(4e1d764e) SHA1(9c2a5ae820a95448558ed12cbe87a9353c054d44) ) |
| 9971 | 9976 | ROM_LOAD16_BYTE( "96000017.evn", 0x00000, 0x080000, CRC(eaf93528) SHA1(d4464eae9cd015e33f305d0458086e845199b8cd) ) |
| 9972 | | sc_pacmn_others |
| 9977 | QPS_PACP_SOUNDS |
| 9973 | 9978 | ROM_END |
| 9974 | 9979 | |
| 9975 | | ROM_START( sc4pacmne ) |
| 9980 | ROM_START( sc4pacqpb ) |
| 9976 | 9981 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 9977 | 9982 | ROM_LOAD16_BYTE( "96003001.lo", 0x00001, 0x080000, CRC(70e21196) SHA1(0b7098da61df73f72ba459b1e8e9b6e92aef07d8) ) |
| 9978 | 9983 | ROM_LOAD16_BYTE( "96003002.hi", 0x00000, 0x080000, CRC(4ebbe216) SHA1(aca58b3a2d8368014b738ce15d677dbcca885cc5) ) |
| 9979 | | sc_pacmn_others |
| 9984 | QPS_PACP_SOUNDS |
| 9980 | 9985 | ROM_END |
| 9981 | 9986 | |
| 9982 | 9987 | |
| r14963 | r14964 | |
| 10255 | 10260 | sc_pgold_others |
| 10256 | 10261 | ROM_END |
| 10257 | 10262 | |
| 10258 | | ROM_START( sc4pglcs ) |
| 10259 | | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 10260 | | ROM_LOAD16_BYTE( "95406734.lo", 0x00001, 0x080000, CRC(e983d8db) SHA1(045c1f73cacfdcbdfbea74ed23287120433e3341) ) |
| 10261 | | ROM_LOAD16_BYTE( "95406735.hi", 0x00000, 0x080000, CRC(c082ae45) SHA1(5985b87924d44155f55806772e406d3dcaf6b506) ) |
| 10262 | | sc_pgold_others |
| 10263 | | ROM_END |
| 10264 | 10263 | |
| 10265 | 10264 | ROM_START( sc4pgoldf ) |
| 10266 | 10265 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| r14963 | r14964 | |
| 10269 | 10268 | sc_pgold_others |
| 10270 | 10269 | ROM_END |
| 10271 | 10270 | |
| 10271 | ROM_START( sc4pglcs ) |
| 10272 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 10273 | ROM_LOAD16_BYTE( "95406734.lo", 0x00001, 0x080000, CRC(e983d8db) SHA1(045c1f73cacfdcbdfbea74ed23287120433e3341) ) |
| 10274 | ROM_LOAD16_BYTE( "95406735.hi", 0x00000, 0x080000, CRC(c082ae45) SHA1(5985b87924d44155f55806772e406d3dcaf6b506) ) |
| 10275 | SC4_95004316_CAS_PHAR_GOLD_PR1261 |
| 10276 | ROM_END |
| 10277 | |
| 10272 | 10278 | ROM_START( sc4pglcsa ) |
| 10273 | 10279 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 10274 | 10280 | ROM_LOAD16_BYTE( "95408068.lo", 0x00001, 0x080000, CRC(8932a906) SHA1(eca4706dd62e089ad9ce781b2ede0759dbe44bd9) ) |
| 10275 | 10281 | ROM_LOAD16_BYTE( "95408069.hi", 0x00000, 0x080000, CRC(f56fff18) SHA1(e123bd7f1af75218dbbef82b33e7c21d882f8105) ) |
| 10276 | | sc_pgold_others |
| 10282 | SC4_95004316_CAS_PHAR_GOLD_PR1261 |
| 10277 | 10283 | ROM_END |
| 10278 | 10284 | |
| 10279 | 10285 | ROM_START( sc4pglcsb ) |
| 10280 | 10286 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 10281 | 10287 | ROM_LOAD16_BYTE( "95408144.lo", 0x00001, 0x080000, CRC(ee67e3d6) SHA1(963160426e1b2d4399132ff0df9662dc1d46c121) ) |
| 10282 | 10288 | ROM_LOAD16_BYTE( "95408145.hi", 0x00000, 0x080000, CRC(b6e8a6d8) SHA1(d443aac2967229de4d6feae634efae9f3cd2f361) ) |
| 10283 | | sc_pgold_others |
| 10289 | SC4_95004316_CAS_PHAR_GOLD_PR1261 |
| 10284 | 10290 | ROM_END |
| 10285 | 10291 | |
| 10286 | 10292 | |
| r14963 | r14964 | |
| 18303 | 18309 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18304 | 18310 | ROM_LOAD16_BYTE( "95404206.lo", 0x00001, 0x080000, CRC(bb853407) SHA1(498aad2cf2948d7fbef673186823af6a7dbefd95) ) |
| 18305 | 18311 | ROM_LOAD16_BYTE( "95404207.hi", 0x00000, 0x080000, CRC(e4e3f4e0) SHA1(ab8a8eeb5661d6cd3ba5d25f2082c06ac8c343ac) ) |
| 18306 | | sc_gball_pthers |
| 18312 | PR1034_GOLDEN_BALLS_SOUNDS11 |
| 18307 | 18313 | ROM_END |
| 18308 | 18314 | |
| 18309 | 18315 | ROM_START( sc4gbcasa ) |
| 18310 | 18316 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18311 | 18317 | ROM_LOAD16_BYTE( "95404208.lo", 0x00001, 0x080000, CRC(fc080cdf) SHA1(86084d70e6a68afe3f788661b78cfb8df3bb8104) ) |
| 18312 | 18318 | ROM_LOAD16_BYTE( "95404209.hi", 0x00000, 0x080000, CRC(6e4d776f) SHA1(0e09b78e138215ceb693bc86a3fe6d7320da9431) ) |
| 18313 | | sc_gball_pthers |
| 18319 | PR1034_GOLDEN_BALLS_SOUNDS11 |
| 18314 | 18320 | ROM_END |
| 18315 | 18321 | |
| 18316 | 18322 | ROM_START( sc4gbcasb ) |
| 18317 | 18323 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18318 | 18324 | ROM_LOAD16_BYTE( "95405206.lo", 0x00001, 0x080000, CRC(79f07bc2) SHA1(e85ddf4c18573894ecd51fec283cc46becb8aacc) ) |
| 18319 | 18325 | ROM_LOAD16_BYTE( "95405207.hi", 0x00000, 0x080000, CRC(2c295913) SHA1(a8bf658c6ec248e7f53485ce778e9679eae62504) ) |
| 18320 | | sc_gball_pthers |
| 18326 | PR1034_GOLDEN_BALLS_SOUNDS11 |
| 18321 | 18327 | ROM_END |
| 18322 | 18328 | |
| 18323 | 18329 | ROM_START( sc4gbcasc ) |
| 18324 | 18330 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18325 | 18331 | ROM_LOAD16_BYTE( "95405208.lo", 0x00001, 0x080000, CRC(3e7d431a) SHA1(b7975bbbf369d2eb6b8fad5c7200e0007ce2365b) ) |
| 18326 | 18332 | ROM_LOAD16_BYTE( "95405209.hi", 0x00000, 0x080000, CRC(a687da9c) SHA1(99cbc48fe2c9c28fb3b68107402af10c2a7f39fa) ) |
| 18327 | | sc_gball_pthers |
| 18333 | PR1034_GOLDEN_BALLS_SOUNDS11 |
| 18328 | 18334 | ROM_END |
| 18329 | 18335 | |
| 18330 | 18336 | ROM_START( sc4gball ) |
| r14963 | r14964 | |
| 18356 | 18362 | ROM_END |
| 18357 | 18363 | |
| 18358 | 18364 | |
| 18359 | | ROM_START( sc4ggame ) |
| 18365 | ROM_START( sc4ggtb ) |
| 18360 | 18366 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18361 | 18367 | ROM_LOAD16_BYTE( "95404762.lo", 0x00001, 0x080000, CRC(613941b4) SHA1(4cc1441b94913d597aa88e973f4514f7278a7cc9) ) |
| 18362 | 18368 | ROM_LOAD16_BYTE( "95404763.hi", 0x00000, 0x080000, CRC(dbec56ec) SHA1(bb8f2395afe8d5193320d627ef722c1105b02826) ) |
| 18363 | 18369 | sc_ggame_others |
| 18364 | 18370 | ROM_END |
| 18365 | 18371 | |
| 18372 | ROM_START( sc4ggtba ) |
| 18373 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18374 | ROM_LOAD16_BYTE( "95408086.lo", 0x00001, 0x080000, CRC(cd0b1ea9) SHA1(ebb5023afa24876d97417db50aa675ec29c0351b) ) |
| 18375 | ROM_LOAD16_BYTE( "95408087.hi", 0x00000, 0x080000, CRC(0a21efb4) SHA1(5765431cfc61521d55e00d7fdd2e08f0ef37d12c) ) |
| 18376 | sc_ggame_others |
| 18377 | ROM_END |
| 18378 | |
| 18379 | ROM_START( sc4ggtbb ) |
| 18380 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18381 | ROM_LOAD16_BYTE( "95414970.lo", 0x00001, 0x080000, CRC(ab09550b) SHA1(004f858e5bcda93653efa511f66d33cbe20a44d1) ) |
| 18382 | ROM_LOAD16_BYTE( "95414971.hi", 0x00000, 0x080000, CRC(e137aff0) SHA1(50a2a6819034ca5b04c704da7cfaf029bdc031b2) ) |
| 18383 | sc_ggame_others |
| 18384 | ROM_END |
| 18385 | |
| 18386 | |
| 18387 | |
| 18366 | 18388 | ROM_START( sc4ggamea ) |
| 18367 | 18389 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18368 | 18390 | ROM_LOAD16_BYTE( "95406768.lo", 0x00001, 0x080000, CRC(dec1db93) SHA1(b22b874e5ff5da46e2783544781d7387f98dd4fc) ) |
| r14963 | r14964 | |
| 18391 | 18413 | sc_ggame_others |
| 18392 | 18414 | ROM_END |
| 18393 | 18415 | |
| 18394 | | ROM_START( sc4ggamee ) |
| 18395 | | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18396 | | ROM_LOAD16_BYTE( "95408086.lo", 0x00001, 0x080000, CRC(cd0b1ea9) SHA1(ebb5023afa24876d97417db50aa675ec29c0351b) ) |
| 18397 | | ROM_LOAD16_BYTE( "95408087.hi", 0x00000, 0x080000, CRC(0a21efb4) SHA1(5765431cfc61521d55e00d7fdd2e08f0ef37d12c) ) |
| 18398 | | sc_ggame_others |
| 18399 | | ROM_END |
| 18400 | 18416 | |
| 18401 | 18417 | ROM_START( sc4ggamef ) |
| 18402 | 18418 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| r14963 | r14964 | |
| 18412 | 18428 | sc_ggame_others |
| 18413 | 18429 | ROM_END |
| 18414 | 18430 | |
| 18415 | | ROM_START( sc4ggameh ) |
| 18431 | ROM_START( sc4ggame ) |
| 18416 | 18432 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18417 | 18433 | ROM_LOAD16_BYTE( "95414396.lo", 0x00001, 0x080000, CRC(1160d686) SHA1(b531823f970e09c808e2efb284951c79091b44b1) ) |
| 18418 | 18434 | ROM_LOAD16_BYTE( "95414397.hi", 0x00000, 0x080000, CRC(886f6d1f) SHA1(532f53d2c9956212ea0086b92c1dad38b417ad9e) ) |
| r14963 | r14964 | |
| 18463 | 18479 | |
| 18464 | 18480 | |
| 18465 | 18481 | |
| 18466 | | ROM_START( sc4ggameo ) |
| 18467 | | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18468 | | ROM_LOAD16_BYTE( "95414970.lo", 0x00001, 0x080000, CRC(ab09550b) SHA1(004f858e5bcda93653efa511f66d33cbe20a44d1) ) |
| 18469 | | ROM_LOAD16_BYTE( "95414971.hi", 0x00000, 0x080000, CRC(e137aff0) SHA1(50a2a6819034ca5b04c704da7cfaf029bdc031b2) ) |
| 18470 | | sc_ggame_others |
| 18471 | | ROM_END |
| 18472 | 18482 | |
| 18473 | 18483 | |
| 18474 | 18484 | ROM_START( sc4ggamep ) |
| r14963 | r14964 | |
| 18716 | 18726 | |
| 18717 | 18727 | |
| 18718 | 18728 | |
| 18719 | | ROM_START( sc4ggg ) |
| 18729 | ROM_START( sc4gggtb ) |
| 18720 | 18730 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18721 | 18731 | ROM_LOAD16_BYTE( "95420668.lo", 0x00001, 0x080000, CRC(afef1626) SHA1(00d676d0ed36ddf4255d26779b3319f61319a9cb) ) |
| 18722 | 18732 | ROM_LOAD16_BYTE( "95420669.hi", 0x00000, 0x080000, CRC(6e273bf4) SHA1(35ba48892d9ea3ebcb00fe33c75ee8e7949ab421) ) |
| 18723 | 18733 | sc_ggg_others |
| 18724 | 18734 | ROM_END |
| 18725 | 18735 | |
| 18726 | | ROM_START( sc4ggga ) |
| 18736 | ROM_START( sc4gggtba ) |
| 18727 | 18737 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18738 | ROM_LOAD16_BYTE( "95421668.lo", 0x00001, 0x080000, CRC(6f4964c8) SHA1(14948920079694791a66dfd1f07b22badb37bc57) ) |
| 18739 | ROM_LOAD16_BYTE( "95421669.hi", 0x00000, 0x080000, CRC(23e030cf) SHA1(85c70ee8f906b48fb75692ec9e58e9072b1a731d) ) |
| 18740 | sc_ggg_others |
| 18741 | ROM_END |
| 18742 | |
| 18743 | ROM_START( sc4ggg ) |
| 18744 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18728 | 18745 | ROM_LOAD16_BYTE( "95420672.lo", 0x00001, 0x080000, CRC(88dd2622) SHA1(dc30308638d602b76e828cf6c98605a9fb7589b6) ) |
| 18729 | 18746 | ROM_LOAD16_BYTE( "95420673.hi", 0x00000, 0x080000, CRC(309a5f9c) SHA1(8592127022c84bc6c36b744d8fa0d44a1bc38ea0) ) |
| 18730 | 18747 | sc_ggg_others |
| r14963 | r14964 | |
| 18787 | 18804 | sc_ggg_others |
| 18788 | 18805 | ROM_END |
| 18789 | 18806 | |
| 18790 | | ROM_START( sc4gggj ) |
| 18791 | | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18792 | | ROM_LOAD16_BYTE( "95421668.lo", 0x00001, 0x080000, CRC(6f4964c8) SHA1(14948920079694791a66dfd1f07b22badb37bc57) ) |
| 18793 | | ROM_LOAD16_BYTE( "95421669.hi", 0x00000, 0x080000, CRC(23e030cf) SHA1(85c70ee8f906b48fb75692ec9e58e9072b1a731d) ) |
| 18794 | | sc_ggg_others |
| 18795 | | ROM_END |
| 18796 | 18807 | |
| 18808 | |
| 18797 | 18809 | ROM_START( sc4gggk ) |
| 18798 | 18810 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18799 | 18811 | ROM_LOAD16_BYTE( "95421672.lo", 0x00001, 0x080000, CRC(297c1a93) SHA1(7d0f8c6998f2970e1cce94a71fa4327edc66e07e) ) |
| r14963 | r14964 | |
| 18930 | 18942 | sc_hapnt_others |
| 18931 | 18943 | ROM_END |
| 18932 | 18944 | |
| 18933 | | ROM_START( sc4hntcs ) |
| 18934 | | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18935 | | ROM_LOAD16_BYTE( "95410960.lo", 0x00001, 0x080000, CRC(09417c00) SHA1(6d10896bf290c58b6fdb5d735b423a9d2d7db5d7) ) |
| 18936 | | ROM_LOAD16_BYTE( "95410961.hi", 0x00000, 0x080000, CRC(1611d748) SHA1(b5ae00a1e1adaf7af912b3f21fb0cb7b414996b3) ) |
| 18937 | | sc_hapnt_others |
| 18938 | | ROM_END |
| 18939 | 18945 | |
| 18940 | | ROM_START( sc4hntcsa ) |
| 18941 | | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18942 | | ROM_LOAD16_BYTE( "95410962.lo", 0x00001, 0x080000, CRC(64cecf4d) SHA1(63f9f5fda15e99a249ea869105461c6d1db0a01a) ) |
| 18943 | | ROM_LOAD16_BYTE( "95410963.hi", 0x00000, 0x080000, CRC(758108b0) SHA1(4de01d82d5ff01adfa3907adb46d666dd9979734) ) |
| 18944 | | sc_hapnt_others |
| 18945 | | ROM_END |
| 18946 | | |
| 18947 | | ROM_START( sc4hntcsb ) |
| 18948 | | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18949 | | ROM_LOAD16_BYTE( "95410964.lo", 0x00001, 0x080000, CRC(fbf06b79) SHA1(8130b8e9f5f18399963db8206f0d6c9ed0312fce) ) |
| 18950 | | ROM_LOAD16_BYTE( "95410965.hi", 0x00000, 0x080000, CRC(a91e7166) SHA1(accaa8c05fe6754b4ac1cf6eee5713de239968ce) ) |
| 18951 | | sc_hapnt_others |
| 18952 | | ROM_END |
| 18953 | | |
| 18954 | | ROM_START( sc4hntcsc ) |
| 18955 | | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18956 | | ROM_LOAD16_BYTE( "95411960.lo", 0x00001, 0x080000, CRC(e4f6033a) SHA1(4bde8c65639e952e4120c9a538d709a88e2a7982) ) |
| 18957 | | ROM_LOAD16_BYTE( "95411961.hi", 0x00000, 0x080000, CRC(f17e876d) SHA1(d90123e04cbf6935ee9cb62abbfa5cabed83c5b5) ) |
| 18958 | | sc_hapnt_others |
| 18959 | | ROM_END |
| 18960 | | |
| 18961 | 18946 | ROM_START( sc4hapntb ) |
| 18962 | 18947 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18963 | 18948 | ROM_LOAD16_BYTE( "p1306p12.hi", 0x00000, 0x080000, CRC(ea9c501d) SHA1(31f912906f562a04053f58ebed3c7bd0ee864434) ) |
| r14963 | r14964 | |
| 18986 | 18971 | sc_hapnt_others |
| 18987 | 18972 | ROM_END |
| 18988 | 18973 | |
| 18974 | |
| 18975 | ROM_START( sc4hntcs ) |
| 18976 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18977 | ROM_LOAD16_BYTE( "95410960.lo", 0x00001, 0x080000, CRC(09417c00) SHA1(6d10896bf290c58b6fdb5d735b423a9d2d7db5d7) ) |
| 18978 | ROM_LOAD16_BYTE( "95410961.hi", 0x00000, 0x080000, CRC(1611d748) SHA1(b5ae00a1e1adaf7af912b3f21fb0cb7b414996b3) ) |
| 18979 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 18980 | ROM_END |
| 18981 | |
| 18982 | ROM_START( sc4hntcsa ) |
| 18983 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18984 | ROM_LOAD16_BYTE( "95410962.lo", 0x00001, 0x080000, CRC(64cecf4d) SHA1(63f9f5fda15e99a249ea869105461c6d1db0a01a) ) |
| 18985 | ROM_LOAD16_BYTE( "95410963.hi", 0x00000, 0x080000, CRC(758108b0) SHA1(4de01d82d5ff01adfa3907adb46d666dd9979734) ) |
| 18986 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 18987 | ROM_END |
| 18988 | |
| 18989 | ROM_START( sc4hntcsb ) |
| 18990 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18991 | ROM_LOAD16_BYTE( "95410964.lo", 0x00001, 0x080000, CRC(fbf06b79) SHA1(8130b8e9f5f18399963db8206f0d6c9ed0312fce) ) |
| 18992 | ROM_LOAD16_BYTE( "95410965.hi", 0x00000, 0x080000, CRC(a91e7166) SHA1(accaa8c05fe6754b4ac1cf6eee5713de239968ce) ) |
| 18993 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 18994 | ROM_END |
| 18995 | |
| 18996 | ROM_START( sc4hntcsc ) |
| 18997 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18998 | ROM_LOAD16_BYTE( "95411960.lo", 0x00001, 0x080000, CRC(e4f6033a) SHA1(4bde8c65639e952e4120c9a538d709a88e2a7982) ) |
| 18999 | ROM_LOAD16_BYTE( "95411961.hi", 0x00000, 0x080000, CRC(f17e876d) SHA1(d90123e04cbf6935ee9cb62abbfa5cabed83c5b5) ) |
| 19000 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19001 | ROM_END |
| 19002 | |
| 18989 | 19003 | ROM_START( sc4hntcsd ) |
| 18990 | 19004 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18991 | 19005 | ROM_LOAD16_BYTE( "p1327p12.hi", 0x00000, 0x080000, CRC(734e60a9) SHA1(911f6c78654020c03b3e906aaf37ce3751f1cd85) ) |
| 18992 | 19006 | ROM_LOAD16_BYTE( "p1327p12.lo", 0x00001, 0x080000, CRC(d1d169e0) SHA1(41540cee7ca0fbe2c93a1c55f0f9e9c933ed3f3b) ) |
| 18993 | | sc_hapnt_others |
| 19007 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 18994 | 19008 | ROM_END |
| 18995 | 19009 | |
| 18996 | 19010 | ROM_START( sc4hntcse ) |
| 18997 | 19011 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 18998 | 19012 | ROM_LOAD16_BYTE( "p1327p13.hi", 0x00000, 0x080000, CRC(d3141aff) SHA1(7c75e47e1a36979177c220edacc5256342c3405c) ) |
| 18999 | 19013 | ROM_LOAD16_BYTE( "p1327p13.lo", 0x00001, 0x080000, CRC(b80f3b5f) SHA1(8b1a3daadb67b2d147184ab7213abe9c29791c6e) ) |
| 19000 | | sc_hapnt_others |
| 19014 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19001 | 19015 | ROM_END |
| 19002 | 19016 | |
| 19003 | 19017 | ROM_START( sc4hntcsf ) |
| 19004 | 19018 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19005 | 19019 | ROM_LOAD16_BYTE( "p1327p41.hi", 0x00000, 0x080000, CRC(0a0305da) SHA1(c4ed571484d13fed4adc83d96efabe060a6452a5) ) |
| 19006 | 19020 | ROM_LOAD16_BYTE( "p1327p41.lo", 0x00001, 0x080000, CRC(f0001712) SHA1(5be70eaedca55c4098f236763206cf32bb1c2f4d) ) |
| 19007 | | sc_hapnt_others |
| 19021 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19008 | 19022 | ROM_END |
| 19009 | 19023 | |
| 19010 | 19024 | ROM_START( sc4hntcsg ) |
| 19011 | 19025 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19012 | 19026 | ROM_LOAD16_BYTE( "p1327p42.hi", 0x00000, 0x080000, CRC(c6e34460) SHA1(63ae0930b7b0c104edee067a0e13c0a90c2d027c) ) |
| 19013 | 19027 | ROM_LOAD16_BYTE( "p1327p42.lo", 0x00001, 0x080000, CRC(5e055385) SHA1(e42d7a0668bd1069c20bd519c37c1fcacabffca2) ) |
| 19014 | | sc_hapnt_others |
| 19028 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19015 | 19029 | ROM_END |
| 19016 | 19030 | |
| 19017 | 19031 | ROM_START( sc4hntcsh ) |
| 19018 | 19032 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19019 | 19033 | ROM_LOAD16_BYTE( "p1327p61.hi", 0x00000, 0x080000, CRC(27a9e9a7) SHA1(9489bc73a3c806de974a82397c0d9907bcb3b9e5) ) |
| 19020 | 19034 | ROM_LOAD16_BYTE( "p1327p61.lo", 0x00001, 0x080000, CRC(13e3aa1e) SHA1(8bd97ebaa6b56e7c846cde2f0b61173c0332c120) ) |
| 19021 | | sc_hapnt_others |
| 19035 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19022 | 19036 | ROM_END |
| 19023 | 19037 | |
| 19024 | 19038 | ROM_START( sc4hntcsi ) |
| 19025 | 19039 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19026 | 19040 | ROM_LOAD16_BYTE( "p1327p71.hi", 0x00000, 0x080000, CRC(d9dd087b) SHA1(872a52bcb42df863407ecb796c8768a02d3614d9) ) |
| 19027 | 19041 | ROM_LOAD16_BYTE( "p1327p71.lo", 0x00001, 0x080000, CRC(6cbef7a3) SHA1(11b6dfd24595fd10ce31e3f6361c6e9a7880c6c9) ) |
| 19028 | | sc_hapnt_others |
| 19042 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19029 | 19043 | ROM_END |
| 19030 | 19044 | |
| 19031 | 19045 | ROM_START( sc4hntcsj ) |
| 19032 | 19046 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19033 | 19047 | ROM_LOAD16_BYTE( "p1327s12.hi", 0x00000, 0x080000, CRC(9aae872b) SHA1(fbd5e402d76bfc2b6e99667b6c97f851fc482abb) ) |
| 19034 | 19048 | ROM_LOAD16_BYTE( "p1327s12.lo", 0x00001, 0x080000, CRC(c964b987) SHA1(422b59e1ca2f3105ab28b33f4e95314ee525882f) ) |
| 19035 | | sc_hapnt_others |
| 19049 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19036 | 19050 | ROM_END |
| 19037 | 19051 | |
| 19038 | 19052 | ROM_START( sc4hntcsk ) |
| 19039 | 19053 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19040 | 19054 | ROM_LOAD16_BYTE( "p1327s13.hi", 0x00000, 0x080000, CRC(fc9dcc8a) SHA1(20605e20cdb643384f6c268d9e52b362d7369786) ) |
| 19041 | 19055 | ROM_LOAD16_BYTE( "p1327s13.lo", 0x00001, 0x080000, CRC(e2327afa) SHA1(bd1c0334fbc5ae4c386ad389c0ec619344c26656) ) |
| 19042 | | sc_hapnt_others |
| 19056 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19043 | 19057 | ROM_END |
| 19044 | 19058 | |
| 19045 | 19059 | ROM_START( sc4hntcsl ) |
| 19046 | 19060 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19047 | 19061 | ROM_LOAD16_BYTE( "p1327s41.hi", 0x00000, 0x080000, CRC(cd03727a) SHA1(fcc802a62d60bb084ea3451730bc685212510320) ) |
| 19048 | 19062 | ROM_LOAD16_BYTE( "p1327s41.lo", 0x00001, 0x080000, CRC(346db912) SHA1(83435a6bb3e557a04040cd221474df23c39aa507) ) |
| 19049 | | sc_hapnt_others |
| 19063 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19050 | 19064 | ROM_END |
| 19051 | 19065 | |
| 19052 | 19066 | ROM_START( sc4hntcsm ) |
| 19053 | 19067 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19054 | 19068 | ROM_LOAD16_BYTE( "p1327s42.hi", 0x00000, 0x080000, CRC(2e737e11) SHA1(d1447129e4e1c888527371f1c5625d3e33d9d187) ) |
| 19055 | 19069 | ROM_LOAD16_BYTE( "p1327s42.lo", 0x00001, 0x080000, CRC(3916863f) SHA1(d0949fcc6414f42d292a04bd0d056cc51a10371c) ) |
| 19056 | | sc_hapnt_others |
| 19070 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19057 | 19071 | ROM_END |
| 19058 | 19072 | |
| 19059 | 19073 | ROM_START( sc4hntcsn ) |
| 19060 | 19074 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19061 | 19075 | ROM_LOAD16_BYTE( "p1327s61.hi", 0x00000, 0x080000, CRC(d3429de9) SHA1(4e5f6df4a557dd0aa061a0b7c4d30b8f01f1d958) ) |
| 19062 | 19076 | ROM_LOAD16_BYTE( "p1327s61.lo", 0x00001, 0x080000, CRC(76e3c418) SHA1(1ec77288096715894e0e179024205fa9dfaf3909) ) |
| 19063 | | sc_hapnt_others |
| 19077 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19064 | 19078 | ROM_END |
| 19065 | 19079 | |
| 19066 | 19080 | ROM_START( sc4hntcso ) |
| 19067 | 19081 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19068 | 19082 | ROM_LOAD16_BYTE( "p1327s71.hi", 0x00000, 0x080000, CRC(2d367c35) SHA1(547ba184d465d90296150595f35a5c4b012108c6) ) |
| 19069 | 19083 | ROM_LOAD16_BYTE( "p1327s71.lo", 0x00001, 0x080000, CRC(09be99a5) SHA1(d9ad6f8e4487c7fdf129478ac967d4c0aa96a0f9) ) |
| 19070 | | sc_hapnt_others |
| 19084 | PR1327_CAS_HAPPY_NOTES_SOUNDS11 |
| 19071 | 19085 | ROM_END |
| 19072 | 19086 | |
| 19073 | 19087 | |
| r14963 | r14964 | |
| 19076 | 19090 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 19077 | 19091 | ROM_LOAD16_BYTE( "95406678.lo", 0x00001, 0x080000, CRC(82fa3872) SHA1(c1de9c35998c710f22eb95283a5a21d8e22c3c30) ) |
| 19078 | 19092 | ROM_LOAD16_BYTE( "95406679.hi", 0x00000, 0x080000, CRC(5b0767c6) SHA1(3a0245ba5822ab3faa74a1f06a3c1648fa97ee40) ) |
| 19079 | | sc_hellb_others |
| 19093 | SC4_95004211_HELLS_BELLS_PR6945 |
| 19080 | 19094 | ROM_END |
| 19081 | 19095 | |
| 19082 | 19096 | ROM_START( sc4hellba ) |
| r14963 | r14964 | |
| 22452 | 22466 | ROM_END |
| 22453 | 22467 | |
| 22454 | 22468 | |
| 22455 | | ROM_START( sc4mowowd ) |
| 22469 | ROM_START( sc4mwwtb ) |
| 22456 | 22470 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 22457 | | ROM_LOAD16_BYTE( "95418078.lo", 0x00001, 0x080000, CRC(73044155) SHA1(f86e25c7c02f65e2f99b3e7b3b7192d2b5fc0b54) ) |
| 22458 | | ROM_LOAD16_BYTE( "95418079.hi", 0x00000, 0x080000, CRC(1d260113) SHA1(834fec1e07e9a2f59adbb052e51dc03493dcee9e) ) |
| 22459 | | sc_mowow_others |
| 22460 | | ROM_END |
| 22461 | | |
| 22462 | | ROM_START( sc4mowowe ) |
| 22463 | | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 22464 | | ROM_LOAD16_BYTE( "95419078.lo", 0x00001, 0x080000, CRC(9205e5fb) SHA1(e77062edcc51e44612c558ee593028934835a41d) ) |
| 22465 | | ROM_LOAD16_BYTE( "95419079.hi", 0x00000, 0x080000, CRC(f80fae88) SHA1(c483f89204489775458112d7ed34ad778d3c9e71) ) |
| 22466 | | sc_mowow_others |
| 22467 | | ROM_END |
| 22468 | | |
| 22469 | | ROM_START( sc4mowowf ) |
| 22470 | | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 22471 | 22471 | ROM_LOAD16_BYTE( "95424056.lo", 0x00001, 0x080000, CRC(255586e1) SHA1(caa32b86ab5f726174bb45402a015e2ae1b6ff68) ) |
| 22472 | 22472 | ROM_LOAD16_BYTE( "95424057.hi", 0x00000, 0x080000, CRC(be45b2b1) SHA1(5d17963f705f8bcaa7a93af2c2621677a57ef039) ) |
| 22473 | | sc_mowow_others |
| 22473 | WHEEL_OF_WEALTH_WOWT_SOUNDS |
| 22474 | 22474 | ROM_END |
| 22475 | 22475 | |
| 22476 | | ROM_START( sc4mowowg ) |
| 22476 | ROM_START( sc4mwwtba ) |
| 22477 | 22477 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 22478 | 22478 | ROM_LOAD16_BYTE( "95424214.lo", 0x00001, 0x080000, CRC(a8b93c99) SHA1(83e6fa6751634f64d285ba6f93b8d52690c17d4a) ) |
| 22479 | 22479 | ROM_LOAD16_BYTE( "95424215.hi", 0x00000, 0x080000, CRC(05c523d6) SHA1(558031df5270567ca2bd88a389b33cfae34b7967) ) |
| 22480 | | sc_mowow_others |
| 22480 | WHEEL_OF_WEALTH_WOWT_SOUNDS |
| 22481 | 22481 | ROM_END |
| 22482 | 22482 | |
| 22483 | | ROM_START( sc4mowowh ) |
| 22483 | ROM_START( sc4mwwtbb ) |
| 22484 | 22484 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 22485 | 22485 | ROM_LOAD16_BYTE( "95424512.lo", 0x00001, 0x080000, CRC(14b7ef71) SHA1(675345c95d2a68d1b3092d564a9c6192a7390486) ) |
| 22486 | 22486 | ROM_LOAD16_BYTE( "95424513.hi", 0x00000, 0x080000, CRC(dd7c5383) SHA1(fad0cbba52a5c2746d325f437f9d85bee5776201) ) |
| 22487 | | sc_mowow_others |
| 22487 | WHEEL_OF_WEALTH_WOWT_SOUNDS |
| 22488 | 22488 | ROM_END |
| 22489 | 22489 | |
| 22490 | | ROM_START( sc4mowowi ) |
| 22490 | ROM_START( sc4mwwtbc ) |
| 22491 | 22491 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 22492 | 22492 | ROM_LOAD16_BYTE( "95425056.lo", 0x00001, 0x080000, CRC(b2c7fe92) SHA1(00e27916482a5fcabde46da8e139b49f789837a8) ) |
| 22493 | 22493 | ROM_LOAD16_BYTE( "95425057.hi", 0x00000, 0x080000, CRC(8946e5d6) SHA1(1426c7ea7ded18b03bab7b08d0d13021bc8aa75b) ) |
| 22494 | | sc_mowow_others |
| 22494 | WHEEL_OF_WEALTH_WOWT_SOUNDS |
| 22495 | 22495 | ROM_END |
| 22496 | 22496 | |
| 22497 | | ROM_START( sc4mowowj ) // these were in the dnd perfect game set |
| 22497 | ROM_START( sc4mwwtbd ) // these were in the dnd perfect game set |
| 22498 | 22498 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 22499 | 22499 | ROM_LOAD16_BYTE( "95425512.lo", 0x00001, 0x080000, CRC(1e66031a) SHA1(b149806fe7c0a996dfda4abcd00aa7ae9b126a7b) ) |
| 22500 | 22500 | ROM_LOAD16_BYTE( "95425513.hi", 0x00000, 0x080000, CRC(a668aaae) SHA1(593f846687aa7d851fb38e62046c6174dfa088f5) ) |
| 22501 | | sc_mowow_others |
| 22501 | WHEEL_OF_WEALTH_WOWT_SOUNDS |
| 22502 | 22502 | ROM_END |
| 22503 | 22503 | |
| 22504 | 22504 | |
| 22505 | 22505 | |
| 22506 | ROM_START( sc4bwow ) |
| 22507 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 22508 | ROM_LOAD16_BYTE( "95418078.lo", 0x00001, 0x080000, CRC(73044155) SHA1(f86e25c7c02f65e2f99b3e7b3b7192d2b5fc0b54) ) |
| 22509 | ROM_LOAD16_BYTE( "95418079.hi", 0x00000, 0x080000, CRC(1d260113) SHA1(834fec1e07e9a2f59adbb052e51dc03493dcee9e) ) |
| 22510 | PR1706_WHEEL_OF_WEALTH_SOUNDS11 |
| 22511 | ROM_END |
| 22506 | 22512 | |
| 22513 | ROM_START( sc4bwowa ) |
| 22514 | ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) |
| 22515 | ROM_LOAD16_BYTE( "95419078.lo", 0x00001, 0x080000, CRC(9205e5fb) SHA1(e77062edcc51e44612c558ee593028934835a41d) ) |
| 22516 | ROM_LOAD16_BYTE( "95419079.hi", 0x00000, 0x080000, CRC(f80fae88) SHA1(c483f89204489775458112d7ed34ad778d3c9e71) ) |
| 22517 | PR1706_WHEEL_OF_WEALTH_SOUNDS11 |
| 22518 | ROM_END |
| 22507 | 22519 | |
| 22508 | 22520 | |
| 22509 | 22521 | |
| r14963 | r14964 | |
| 24330 | 24342 | GAME( 200?, sc4outlwc ,sc4outlw, sc4, sc4, sc4, ROT0, "BFM","Outlaw (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 24331 | 24343 | |
| 24332 | 24344 | |
| 24345 | // PR7072 PAC MAN PACP SOUNDS PAC-MAN |
| 24346 | GAME( 200?, sc4pacqp ,0, sc4, sc4, sc4, ROT0, "QPS","Pac Man (PR7072) (QPS) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 24347 | GAME( 200?, sc4pacqpa ,sc4pacqp, sc4, sc4, sc4, ROT0, "QPS","Pac Man (PR7072) (QPS) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 24348 | GAME( 200?, sc4pacqpb ,sc4pacqp, sc4, sc4, sc4, ROT0, "QPS","Pac Man (PR7072) (QPS) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 24349 | |
| 24333 | 24350 | // PR7026 PACMAN PACMAN SOUNDS |
| 24334 | | GAME( 200?, sc4pacmn ,0, sc4, sc4, sc4, ROT0, "Mazooma","Pac Man (PR7026) (Mazooma) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 24351 | GAME( 200?, sc4pacmn ,0, sc4, sc4, sc4, ROT0, "Mazooma","Pac Man (PR7026) (Mazooma) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) // this set doesn't start, CPU ends up dead? |
| 24335 | 24352 | GAME( 200?, sc4pacmna ,sc4pacmn, sc4, sc4, sc4, ROT0, "Mazooma","Pac Man (PR7026) (Mazooma) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 24336 | 24353 | GAME( 200?, sc4pacmnb ,sc4pacmn, sc4, sc4, sc4, ROT0, "Mazooma","Pac Man (PR7026) (Mazooma) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 24337 | | // PR7072 PAC MAN PACP SOUNDS PAC-MAN |
| 24338 | | GAME( 200?, sc4pacmnc ,sc4pacmn, sc4, sc4, sc4, ROT0, "Mazooma","Pac Man (PR7072) (Mazooma) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 24339 | | GAME( 200?, sc4pacmnd ,sc4pacmn, sc4, sc4, sc4, ROT0, "Mazooma","Pac Man (PR7072) (Mazooma) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 24340 | | GAME( 200?, sc4pacmne ,sc4pacmn, sc4, sc4, sc4, ROT0, "Mazooma","Pac Man (PR7072) (Mazooma) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 24341 | 24354 | |
| 24355 | |
| 24342 | 24356 | // PR7049CASINO PACMAN PACMAN SOUNDS |
| 24343 | 24357 | GAME( 200?, sc4paccs ,0, sc4, sc4, sc4, ROT0, "Mazooma","Pac Man Casino (Mazooma) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 24344 | 24358 | GAME( 200?, sc4paccsa ,sc4paccs, sc4, sc4, sc4, ROT0, "Mazooma","Pac Man Casino (Mazooma) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| r14963 | r14964 | |
| 24381 | 24395 | // PR1205 PAY TIME 95004224 PAYTIME PR7156 PAY TIME |
| 24382 | 24396 | GAME( 200?, sc4paytm ,0, sc4, sc4, sc4, ROT0, "BFM","Pay Time (Bellfruit) (Scorpion 4)", GAME_IS_SKELETON_MECHANICAL ) // Not English |
| 24383 | 24397 | |
| 24398 | const stepper_interface* sc4pgold_reel_configs[6] = |
| 24399 | { |
| 24400 | &starpoint_interface_48step, |
| 24401 | &starpoint_interface_48step, |
| 24402 | &starpoint_interface_48step, |
| 24403 | &starpoint_interface_48step, |
| 24404 | &starpoint_interface_200step_reel, |
| 24405 | 0, |
| 24406 | }; |
| 24407 | |
| 24408 | static DRIVER_INIT( sc4pgold ) |
| 24409 | { |
| 24410 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 24411 | DRIVER_INIT_CALL( sc4mbus ); |
| 24412 | state->m_reel_setup = sc4pgold_reel_configs; |
| 24413 | } |
| 24414 | |
| 24384 | 24415 | // PR1012 PHARAOH'S GOLD PR1012 PHARAOHS GOLD SOUNDS11 |
| 24385 | | GAME( 200?, sc4pgold ,0, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 24386 | | GAME( 200?, sc4pgolda ,sc4pgold, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 24387 | | GAME( 200?, sc4pgoldb ,sc4pgold, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 24388 | | GAME( 200?, sc4pgoldc ,sc4pgold, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 24389 | | GAME( 200?, sc4pgoldd ,sc4pgold, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 24390 | | GAME( 200?, sc4pgoldf ,sc4pgold, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 24416 | GAME( 200?, sc4pgold ,0, sc4, sc4, sc4pgold, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 24417 | GAME( 200?, sc4pgolda ,sc4pgold, sc4, sc4, sc4pgold, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 24418 | GAME( 200?, sc4pgoldb ,sc4pgold, sc4, sc4, sc4pgold, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 24419 | GAME( 200?, sc4pgoldc ,sc4pgold, sc4, sc4, sc4pgold, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 24420 | GAME( 200?, sc4pgoldd ,sc4pgold, sc4, sc4, sc4pgold, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 24421 | GAME( 200?, sc4pgoldf ,sc4pgold, sc4, sc4, sc4pgold, ROT0, "BFM","Pharaoh's Gold (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 24391 | 24422 | |
| 24423 | |
| 24424 | // same name, but a different game? (Less reels..) |
| 24392 | 24425 | // PR1261 PHARAOH'S GOLD 95004316 CAS PHAR GOLD PR1261 |
| 24393 | | GAME( 200?, sc4pglcs ,0, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold Casino (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 24394 | | GAME( 200?, sc4pglcsa ,sc4pglcs, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold Casino (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 24395 | | GAME( 200?, sc4pglcsb ,sc4pglcs, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold Casino (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 24426 | GAME( 200?, sc4pglcs ,0, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold Casino (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) // Not English |
| 24427 | GAME( 200?, sc4pglcsa ,sc4pglcs, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold Casino (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) // Not English |
| 24428 | GAME( 200?, sc4pglcsb ,sc4pglcs, sc4, sc4, sc4, ROT0, "BFM","Pharaoh's Gold Casino (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) // Not English |
| 24396 | 24429 | |
| 24397 | 24430 | |
| 24398 | 24431 | |
| r14963 | r14964 | |
| 24671 | 24704 | GAME( 200?, sc4rbankc ,sc4rbank, sc4, sc4, sc4, ROT0, "BFM","Royle Banker (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 24672 | 24705 | |
| 24673 | 24706 | |
| 24707 | const stepper_interface* sc4royle_reel_configs[6] = |
| 24708 | { |
| 24709 | &starpoint_interface_48step, |
| 24710 | &starpoint_interface_48step, |
| 24711 | &starpoint_interface_48step, |
| 24712 | 0, |
| 24713 | &starpoint_interface_200step_reel, |
| 24714 | 0, |
| 24715 | }; |
| 24674 | 24716 | |
| 24717 | static DRIVER_INIT( sc4royle ) |
| 24718 | { |
| 24719 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 24720 | DRIVER_INIT_CALL( sc4mbus ); |
| 24721 | state->m_reel_setup = sc4royle_reel_configs; |
| 24722 | } |
| 24723 | |
| 24675 | 24724 | // PR1102 ROYLEFAMILY PR1102 ROYLEFAMILY SOUNDS11 |
| 24676 | | GAME( 200?, sc4royle ,0, sc4, sc4, sc4, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 24677 | | GAME( 200?, sc4roylea ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 24678 | | GAME( 200?, sc4royleb ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 24679 | | GAME( 200?, sc4roylec ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 24680 | | GAME( 200?, sc4royled ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 24681 | | GAME( 200?, sc4roylee ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 24682 | | GAME( 200?, sc4royleh ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 24683 | | GAME( 200?, sc4roylei ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 24725 | GAME( 200?, sc4royle ,0, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 24726 | GAME( 200?, sc4roylea ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 24727 | GAME( 200?, sc4royleb ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 24728 | GAME( 200?, sc4roylec ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 24729 | GAME( 200?, sc4royled ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 24730 | GAME( 200?, sc4roylee ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 24731 | GAME( 200?, sc4royleh ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 24732 | GAME( 200?, sc4roylei ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (Bellfruit) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 24684 | 24733 | // PR1102 ROYLEFAMILY REV2 PR1102 ROYLEFAMILY SOUNDS11 |
| 24685 | | GAME( 200?, sc4roylef ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 24686 | | GAME( 200?, sc4royleg ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 24687 | | GAME( 200?, sc4roylej ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 24688 | | GAME( 200?, sc4roylek ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 24689 | | GAME( 200?, sc4roylel ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 24690 | | GAME( 200?, sc4roylem ,sc4royle, sc4, sc4, sc4, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 24734 | GAME( 200?, sc4roylef ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 24735 | GAME( 200?, sc4royleg ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 24736 | GAME( 200?, sc4roylej ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 24737 | GAME( 200?, sc4roylek ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 24738 | GAME( 200?, sc4roylel ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 24739 | GAME( 200?, sc4roylem ,sc4royle, sc4, sc4, sc4royle, ROT0, "BFM","Royle Family (REV 2) (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 24691 | 24740 | |
| 24692 | 24741 | // PR7141 SHAKE RATTLE ROLL LINE SOUNDS * SHAKE RATT ROLL |
| 24693 | 24742 | GAME( 200?, sc4srrmz ,0, sc4, sc4, sc4, ROT0, "Mazooma","Shake Rattle Roll (Mazooma) (Scorpion 4) (set 1, Top Box)", GAME_IS_SKELETON_MECHANICAL ) |
| r14963 | r14964 | |
| 25478 | 25527 | GAME( 200?, sc4bobh ,sc4bob, sc4, sc4, sc4, ROT0, "Mazooma","Bobby Dazzler (Mazooma) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) |
| 25479 | 25528 | GAME( 200?, sc4bobi ,sc4bob, sc4, sc4, sc4, ROT0, "Mazooma","Bobby Dazzler (Mazooma) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL ) |
| 25480 | 25529 | |
| 25530 | const stepper_interface* sc4bull_reel_configs[6] = |
| 25531 | { |
| 25532 | &starpoint_interface_48step, |
| 25533 | &starpoint_interface_48step, |
| 25534 | &starpoint_interface_48step, |
| 25535 | 0, |
| 25536 | &starpoint_interface_200step_reel, |
| 25537 | 0, |
| 25538 | }; |
| 25539 | |
| 25540 | static DRIVER_INIT( sc4bull ) |
| 25541 | { |
| 25542 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 25543 | DRIVER_INIT_CALL( sc4mbus ); |
| 25544 | state->m_reel_setup = sc4bull_reel_configs; |
| 25545 | } |
| 25546 | |
| 25481 | 25547 | // PR1722 AWP BULLSEYE SCORP4 PR1702 BULLSEYE SOUNDS11 BULLSEYE S.SITE |
| 25482 | | GAME( 200?, sc4bull ,0, sc4, sc4, sc4mbus, ROT0, "BFM","Bullseye (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 25483 | | GAME( 200?, sc4bulla ,sc4bull, sc4, sc4, sc4mbus, ROT0, "BFM","Bullseye (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 25484 | | GAME( 200?, sc4bullb ,sc4bull, sc4, sc4, sc4mbus, ROT0, "BFM","Bullseye (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 25485 | | GAME( 200?, sc4bullc ,sc4bull, sc4, sc4, sc4mbus, ROT0, "BFM","Bullseye (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 25548 | GAME( 200?, sc4bull ,0, sc4, sc4, sc4bull, ROT0, "BFM","Bullseye (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 25549 | GAME( 200?, sc4bulla ,sc4bull, sc4, sc4, sc4bull, ROT0, "BFM","Bullseye (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 25550 | GAME( 200?, sc4bullb ,sc4bull, sc4, sc4, sc4bull, ROT0, "BFM","Bullseye (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 25551 | GAME( 200?, sc4bullc ,sc4bull, sc4, sc4, sc4bull, ROT0, "BFM","Bullseye (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 25486 | 25552 | |
| 25487 | 25553 | // PR1740 AWP BULLSEYE CLASSIC SCORP4 PR1702 BULLSEYE SOUNDS11 BULLSEYE CLASSIC S.SITE |
| 25488 | 25554 | GAME( 200?, sc4bulcs ,0, sc4, sc4, sc4mbus, ROT0, "BFM","Bullseye Classic (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| r14963 | r14964 | |
| 26616 | 26682 | GAME( 200?, sc4gladf ,sc4glad, sc4, sc4, sc4, ROT0, "Mazooma","Gladiator (Mazooma) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 26617 | 26683 | GAME( 200?, sc4gladg ,sc4glad, sc4, sc4, sc4, ROT0, "Mazooma","Gladiator (Mazooma) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 26618 | 26684 | |
| 26685 | const stepper_interface* sc4gd_reel_configs[6] = |
| 26686 | { |
| 26687 | &starpoint_interface_48step, |
| 26688 | &starpoint_interface_48step, |
| 26689 | &starpoint_interface_48step, |
| 26690 | &starpoint_interface_48step, |
| 26691 | &starpoint_interface_200step_reel, |
| 26692 | 0, |
| 26693 | }; |
| 26694 | |
| 26695 | static DRIVER_INIT( sc4gd ) |
| 26696 | { |
| 26697 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 26698 | DRIVER_INIT_CALL( sc4 ); |
| 26699 | state->m_reel_setup = sc4gd_reel_configs; |
| 26700 | } |
| 26701 | |
| 26619 | 26702 | // PR1016 GOLD DIGGER PR1016 GOLD DIGGER SOUNDS11 |
| 26620 | | GAME( 200?, sc4gd ,0, sc4, sc4, sc4, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26621 | | GAME( 200?, sc4gda ,sc4gd, sc4, sc4, sc4, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26622 | | GAME( 200?, sc4gdb ,sc4gd, sc4, sc4, sc4, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26623 | | GAME( 200?, sc4gdc ,sc4gd, sc4, sc4, sc4, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26624 | | GAME( 200?, sc4gdd ,sc4gd, sc4, sc4, sc4, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 26625 | | GAME( 200?, sc4gde ,sc4gd, sc4, sc4, sc4, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 26626 | | GAME( 200?, sc4gdf ,sc4gd, sc4, sc4, sc4, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 26627 | | GAME( 200?, sc4gdg ,sc4gd, sc4, sc4, sc4, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 26703 | GAME( 200?, sc4gd ,0, sc4, sc4, sc4gd, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26704 | GAME( 200?, sc4gda ,sc4gd, sc4, sc4, sc4gd, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26705 | GAME( 200?, sc4gdb ,sc4gd, sc4, sc4, sc4gd, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26706 | GAME( 200?, sc4gdc ,sc4gd, sc4, sc4, sc4gd, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26707 | GAME( 200?, sc4gdd ,sc4gd, sc4, sc4, sc4gd, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 26708 | GAME( 200?, sc4gde ,sc4gd, sc4, sc4, sc4gd, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 26709 | GAME( 200?, sc4gdf ,sc4gd, sc4, sc4, sc4gd, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 26710 | GAME( 200?, sc4gdg ,sc4gd, sc4, sc4, sc4gd, ROT0, "BFM","Gold Digger (Bellfruit) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 26628 | 26711 | |
| 26629 | 26712 | // PR2056 GOLDEN X BARX SOUNDS GOLDEN X (are these really Gold Diggers?) |
| 26630 | 26713 | GAME( 200?, sc4gdmz ,0, sc4, sc4, sc4, ROT0, "Mazooma","Gold Diggers? / Golden X Game (Mazooma) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26631 | 26714 | GAME( 200?, sc4gdmza ,sc4gdmz, sc4, sc4, sc4, ROT0, "Mazooma","Gold Diggers? / Golden X Game (Mazooma) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26632 | 26715 | |
| 26716 | const stepper_interface* sc4gdclb_reel_configs[6] = |
| 26717 | { |
| 26718 | &starpoint_interface_48step, |
| 26719 | &starpoint_interface_48step, |
| 26720 | &starpoint_interface_48step, |
| 26721 | &starpoint_interface_48step, |
| 26722 | &starpoint_interface_48step, |
| 26723 | &starpoint_interface_200step_reel, |
| 26724 | }; |
| 26725 | |
| 26726 | static DRIVER_INIT( sc4gdclb ) |
| 26727 | { |
| 26728 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 26729 | DRIVER_INIT_CALL( sc4 ); |
| 26730 | state->m_reel_setup = sc4gdclb_reel_configs; |
| 26731 | } |
| 26732 | |
| 26733 | |
| 26633 | 26734 | // PR1137 CLUB GOLD DIGGER PR1137 GOLDD CL SOUNDS11 |
| 26634 | | GAME( 200?, sc4gdclb ,0, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26635 | | GAME( 200?, sc4gdclba ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26636 | | GAME( 200?, sc4gdclbb ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26637 | | GAME( 200?, sc4gdclbc ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26638 | | GAME( 200?, sc4gdclbd ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 26639 | | GAME( 200?, sc4gdclbe ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 26640 | | GAME( 200?, sc4gdclbf ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 26641 | | GAME( 200?, sc4gdclbg ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 26642 | | GAME( 200?, sc4gdclbh ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) |
| 26643 | | GAME( 200?, sc4gdclbi ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL ) |
| 26644 | | GAME( 200?, sc4gdclbj ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 11)", GAME_IS_SKELETON_MECHANICAL ) |
| 26645 | | GAME( 200?, sc4gdclbk ,sc4gdclb, sc4, sc4, sc4, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 12)", GAME_IS_SKELETON_MECHANICAL ) |
| 26735 | GAME( 200?, sc4gdclb ,0, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26736 | GAME( 200?, sc4gdclba ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26737 | GAME( 200?, sc4gdclbb ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26738 | GAME( 200?, sc4gdclbc ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26739 | GAME( 200?, sc4gdclbd ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 26740 | GAME( 200?, sc4gdclbe ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 26741 | GAME( 200?, sc4gdclbf ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 26742 | GAME( 200?, sc4gdclbg ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 26743 | GAME( 200?, sc4gdclbh ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) |
| 26744 | GAME( 200?, sc4gdclbi ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL ) |
| 26745 | GAME( 200?, sc4gdclbj ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 11)", GAME_IS_SKELETON_MECHANICAL ) |
| 26746 | GAME( 200?, sc4gdclbk ,sc4gdclb, sc4, sc4, sc4gdclb, ROT0, "BFM","Gold Digger Club (Bellfruit) (Scorpion 4) (set 12)", GAME_IS_SKELETON_MECHANICAL ) |
| 26646 | 26747 | |
| 26748 | const stepper_interface* sc4gbcas_reel_configs[6] = |
| 26749 | { |
| 26750 | &starpoint_interface_48step, |
| 26751 | &starpoint_interface_48step, |
| 26752 | &starpoint_interface_48step, |
| 26753 | &starpoint_interface_200step_reel, |
| 26754 | 0, |
| 26755 | 0, |
| 26756 | }; |
| 26757 | |
| 26758 | static DRIVER_INIT( sc4gbcas ) |
| 26759 | { |
| 26760 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 26761 | DRIVER_INIT_CALL( sc4 ); |
| 26762 | state->m_reel_setup = sc4gbcas_reel_configs; |
| 26763 | } |
| 26764 | |
| 26765 | // this one is a variation of lucky balls |
| 26647 | 26766 | // PR1034 CASINO GOLDEN BALLS PR1034 GOLDEN BALLS SOUNDS11 |
| 26648 | | GAME( 200?, sc4gbcas ,0, sc4, sc4, sc4, ROT0, "BFM","Golden Balls Casino (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26649 | | GAME( 200?, sc4gbcasa ,sc4gbcas, sc4, sc4, sc4, ROT0, "BFM","Golden Balls Casino (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26650 | | GAME( 200?, sc4gbcasb ,sc4gbcas, sc4, sc4, sc4, ROT0, "BFM","Golden Balls Casino (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26651 | | GAME( 200?, sc4gbcasc ,sc4gbcas, sc4, sc4, sc4, ROT0, "BFM","Golden Balls Casino (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26767 | GAME( 200?, sc4gbcas ,0, sc4, sc4, sc4gbcas, ROT0, "BFM","Golden Balls Casino (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26768 | GAME( 200?, sc4gbcasa ,sc4gbcas, sc4, sc4, sc4gbcas, ROT0, "BFM","Golden Balls Casino (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26769 | GAME( 200?, sc4gbcasb ,sc4gbcas, sc4, sc4, sc4gbcas, ROT0, "BFM","Golden Balls Casino (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26770 | GAME( 200?, sc4gbcasc ,sc4gbcas, sc4, sc4, sc4gbcas, ROT0, "BFM","Golden Balls Casino (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26652 | 26771 | |
| 26772 | |
| 26773 | const stepper_interface* sc4gball_reel_configs[6] = |
| 26774 | { |
| 26775 | &starpoint_interface_48step, |
| 26776 | &starpoint_interface_48step, |
| 26777 | &starpoint_interface_48step, |
| 26778 | 0, |
| 26779 | &starpoint_interface_48step, |
| 26780 | 0, |
| 26781 | }; |
| 26782 | |
| 26783 | static DRIVER_INIT( sc4gball ) |
| 26784 | { |
| 26785 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 26786 | DRIVER_INIT_CALL( sc4 ); |
| 26787 | state->m_reel_setup = sc4gball_reel_configs; |
| 26788 | } |
| 26789 | |
| 26790 | // this is a football themed game... |
| 26653 | 26791 | // PR1604 AWP GOLDEN BALLS PR1604 GOLDEN BALLS SOUNDS12 GOLDEN BALLS S.SITE |
| 26654 | | GAME( 200?, sc4gball ,0, sc4, sc4, sc4, ROT0, "BFM","Golden Balls (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26655 | | GAME( 200?, sc4gballa ,sc4gball, sc4, sc4, sc4, ROT0, "BFM","Golden Balls (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26656 | | GAME( 200?, sc4gballb ,sc4gball, sc4, sc4, sc4, ROT0, "BFM","Golden Balls (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26657 | | GAME( 200?, sc4gballc ,sc4gball, sc4, sc4, sc4, ROT0, "BFM","Golden Balls (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26792 | GAME( 200?, sc4gball ,0, sc4, sc4, sc4gball, ROT0, "BFM","Golden Balls (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26793 | GAME( 200?, sc4gballa ,sc4gball, sc4, sc4, sc4gball, ROT0, "BFM","Golden Balls (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26794 | GAME( 200?, sc4gballb ,sc4gball, sc4, sc4, sc4gball, ROT0, "BFM","Golden Balls (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26795 | GAME( 200?, sc4gballc ,sc4gball, sc4, sc4, sc4gball, ROT0, "BFM","Golden Balls (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26658 | 26796 | |
| 26797 | const stepper_interface* sc4gunp_reel_configs[6] = |
| 26798 | { |
| 26799 | &starpoint_interface_48step, |
| 26800 | &starpoint_interface_48step, |
| 26801 | &starpoint_interface_48step, |
| 26802 | 0, |
| 26803 | &starpoint_interface_48step, |
| 26804 | &starpoint_interface_48step, |
| 26805 | }; |
| 26806 | |
| 26807 | static DRIVER_INIT( sc4gunp ) |
| 26808 | { |
| 26809 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 26810 | DRIVER_INIT_CALL( sc4mbus ); |
| 26811 | state->m_reel_setup = sc4gunp_reel_configs; |
| 26812 | } |
| 26813 | |
| 26659 | 26814 | // PR3046 AWP THE GUNPOWDER SLOT S4 PR3016 GUNPOWDER SLOT SOUNDS11 GUNPOWDER SLOT S.SITE |
| 26660 | | GAME( 200?, sc4gunp ,0, sc4, sc4, sc4mbus, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26661 | | GAME( 200?, sc4gunpa ,sc4gunp, sc4, sc4, sc4mbus, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26662 | | GAME( 200?, sc4gunpb ,sc4gunp, sc4, sc4, sc4mbus, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26663 | | GAME( 200?, sc4gunpc ,sc4gunp, sc4, sc4, sc4mbus, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26664 | | GAME( 200?, sc4gunpd ,sc4gunp, sc4, sc4, sc4mbus, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 26665 | | GAME( 200?, sc4gunpe ,sc4gunp, sc4, sc4, sc4mbus, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 26666 | | GAME( 200?, sc4gunpf ,sc4gunp, sc4, sc4, sc4mbus, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 26667 | | GAME( 200?, sc4gunpg ,sc4gunp, sc4, sc4, sc4mbus, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 26815 | GAME( 200?, sc4gunp ,0, sc4, sc4, sc4gunp, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26816 | GAME( 200?, sc4gunpa ,sc4gunp, sc4, sc4, sc4gunp, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26817 | GAME( 200?, sc4gunpb ,sc4gunp, sc4, sc4, sc4gunp, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26818 | GAME( 200?, sc4gunpc ,sc4gunp, sc4, sc4, sc4gunp, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26819 | GAME( 200?, sc4gunpd ,sc4gunp, sc4, sc4, sc4gunp, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 26820 | GAME( 200?, sc4gunpe ,sc4gunp, sc4, sc4, sc4gunp, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 26821 | GAME( 200?, sc4gunpf ,sc4gunp, sc4, sc4, sc4gunp, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 26822 | GAME( 200?, sc4gunpg ,sc4gunp, sc4, sc4, sc4gunp, ROT0, "BFM","Gunpowder Slot (Bellfruit) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 26668 | 26823 | |
| 26824 | const stepper_interface* sc4hapnt_reel_configs[6] = |
| 26825 | { |
| 26826 | &starpoint_interface_48step, |
| 26827 | &starpoint_interface_48step, |
| 26828 | &starpoint_interface_48step, |
| 26829 | 0, |
| 26830 | &starpoint_interface_48step, |
| 26831 | 0, |
| 26832 | }; |
| 26669 | 26833 | |
| 26834 | static DRIVER_INIT( sc4hapnt ) |
| 26835 | { |
| 26836 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 26837 | DRIVER_INIT_CALL( sc4mbus ); |
| 26838 | state->m_reel_setup = sc4hapnt_reel_configs; |
| 26839 | } |
| 26670 | 26840 | |
| 26671 | 26841 | // PR1306 AWP HAPPY NOTES PR1306 HAPPY NOTES SOUNDS11 |
| 26672 | | GAME( 200?, sc4hapnt ,0, sc4, sc4, sc4, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26673 | | GAME( 200?, sc4hapnta ,sc4hapnt, sc4, sc4, sc4, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26674 | | GAME( 200?, sc4hapntb ,sc4hapnt, sc4, sc4, sc4, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26675 | | GAME( 200?, sc4hapntc ,sc4hapnt, sc4, sc4, sc4, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26676 | | GAME( 200?, sc4hapntd ,sc4hapnt, sc4, sc4, sc4, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 26677 | | GAME( 200?, sc4hapnte ,sc4hapnt, sc4, sc4, sc4, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 26842 | GAME( 200?, sc4hapnt ,0, sc4, sc4, sc4hapnt, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26843 | GAME( 200?, sc4hapnta ,sc4hapnt, sc4, sc4, sc4hapnt, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26844 | GAME( 200?, sc4hapntb ,sc4hapnt, sc4, sc4, sc4hapnt, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26845 | GAME( 200?, sc4hapntc ,sc4hapnt, sc4, sc4, sc4hapnt, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26846 | GAME( 200?, sc4hapntd ,sc4hapnt, sc4, sc4, sc4hapnt, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 26847 | GAME( 200?, sc4hapnte ,sc4hapnt, sc4, sc4, sc4hapnt, ROT0, "BFM","Happy Notes (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 26848 | |
| 26849 | const stepper_interface* sc4hntcs_reel_configs[6] = |
| 26850 | { |
| 26851 | &starpoint_interface_48step, |
| 26852 | &starpoint_interface_48step, |
| 26853 | &starpoint_interface_48step, |
| 26854 | &starpoint_interface_48step, |
| 26855 | 0, |
| 26856 | 0, |
| 26857 | }; |
| 26858 | |
| 26859 | static DRIVER_INIT( sc4hntcsm ) |
| 26860 | { |
| 26861 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 26862 | DRIVER_INIT_CALL( sc4mbus ); |
| 26863 | state->m_reel_setup = sc4hntcs_reel_configs; |
| 26864 | } |
| 26865 | |
| 26866 | |
| 26867 | static DRIVER_INIT( sc4hntcs ) |
| 26868 | { |
| 26869 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 26870 | DRIVER_INIT_CALL( sc4 ); |
| 26871 | state->m_reel_setup = sc4hntcs_reel_configs; |
| 26872 | } |
| 26873 | |
| 26678 | 26874 | // PR1327 CASINO HAPPY NOTES HAPPY NOTES S.SITE PR1327 CAS_HAPPY_NOTES SOUNDS11 |
| 26679 | | GAME( 200?, sc4hntcs ,0, sc4, sc4, sc4mbus, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26680 | | GAME( 200?, sc4hntcsa ,sc4hntcs, sc4, sc4, sc4mbus, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26681 | | GAME( 200?, sc4hntcsb ,sc4hntcs, sc4, sc4, sc4mbus, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26682 | | GAME( 200?, sc4hntcsc ,sc4hntcs, sc4, sc4, sc4mbus, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26875 | GAME( 200?, sc4hntcs ,0, sc4, sc4, sc4hntcsm, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26876 | GAME( 200?, sc4hntcsa ,sc4hntcs, sc4, sc4, sc4hntcsm, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26877 | GAME( 200?, sc4hntcsb ,sc4hntcs, sc4, sc4, sc4hntcsm, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 26878 | GAME( 200?, sc4hntcsc ,sc4hntcs, sc4, sc4, sc4hntcsm, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 26683 | 26879 | // PR1327 CASINO HAPPY NOTES PR1327 CAS_HAPPY_NOTES SOUNDS11 |
| 26684 | | GAME( 200?, sc4hntcsd ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 26685 | | GAME( 200?, sc4hntcse ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 26686 | | GAME( 200?, sc4hntcsf ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 26687 | | GAME( 200?, sc4hntcsg ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 26688 | | GAME( 200?, sc4hntcsh ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) |
| 26689 | | GAME( 200?, sc4hntcsi ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL ) |
| 26690 | | GAME( 200?, sc4hntcsj ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 11)", GAME_IS_SKELETON_MECHANICAL ) |
| 26691 | | GAME( 200?, sc4hntcsk ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 12)", GAME_IS_SKELETON_MECHANICAL ) |
| 26692 | | GAME( 200?, sc4hntcsl ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 13)", GAME_IS_SKELETON_MECHANICAL ) |
| 26693 | | GAME( 200?, sc4hntcsm ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 14)", GAME_IS_SKELETON_MECHANICAL ) |
| 26694 | | GAME( 200?, sc4hntcsn ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 15)", GAME_IS_SKELETON_MECHANICAL ) |
| 26695 | | GAME( 200?, sc4hntcso ,sc4hntcs, sc4, sc4, sc4, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 16)", GAME_IS_SKELETON_MECHANICAL ) |
| 26880 | GAME( 200?, sc4hntcsd ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 26881 | GAME( 200?, sc4hntcse ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 26882 | GAME( 200?, sc4hntcsf ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 26883 | GAME( 200?, sc4hntcsg ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) |
| 26884 | GAME( 200?, sc4hntcsh ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) |
| 26885 | GAME( 200?, sc4hntcsi ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL ) |
| 26886 | GAME( 200?, sc4hntcsj ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 11)", GAME_IS_SKELETON_MECHANICAL ) |
| 26887 | GAME( 200?, sc4hntcsk ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 12)", GAME_IS_SKELETON_MECHANICAL ) |
| 26888 | GAME( 200?, sc4hntcsl ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 13)", GAME_IS_SKELETON_MECHANICAL ) |
| 26889 | GAME( 200?, sc4hntcsm ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 14)", GAME_IS_SKELETON_MECHANICAL ) |
| 26890 | GAME( 200?, sc4hntcsn ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 15)", GAME_IS_SKELETON_MECHANICAL ) |
| 26891 | GAME( 200?, sc4hntcso ,sc4hntcs, sc4, sc4, sc4hntcs, ROT0, "BFM","Happy Notes Casino (Bellfruit) (Scorpion 4) (set 16)", GAME_IS_SKELETON_MECHANICAL ) |
| 26696 | 26892 | |
| 26697 | 26893 | |
| 26698 | 26894 | |
| 26699 | 26895 | |
| 26700 | 26896 | // PR1201 HELLS BELLS 95004211 HELLS BELLS PR6945 HELLS BELLS (non english?) |
| 26701 | | GAME( 200?, sc4hellb ,0, sc4, sc4, sc4, ROT0, "BFM","Hells Bells (PR1201) (Dutch?) (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26897 | GAME( 200?, sc4hellb ,0, sc4, sc4, sc4, ROT0, "BFM / Eurocoin","Hells Bells (PR1201) (Dutch?) (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26702 | 26898 | // PR1419 AWP HELLS BELLS PR1402 HELLS BELLS SOUNDS11 |
| 26703 | 26899 | GAME( 200?, sc4hellba ,sc4hellb, sc4, sc4, sc4, ROT0, "BFM","Hells Bells (PR1419) (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26704 | 26900 | GAME( 200?, sc4hellbb ,sc4hellb, sc4, sc4, sc4, ROT0, "BFM","Hells Bells (PR1419) (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| r14963 | r14964 | |
| 26712 | 26908 | GAME( 200?, sc4hellbi ,sc4hellb, sc4, sc4, sc4mbus, ROT0, "BFM","Hells Bells (PR1419) (Bellfruit) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) |
| 26713 | 26909 | GAME( 200?, sc4hellbj ,sc4hellb, sc4, sc4, sc4mbus, ROT0, "BFM","Hells Bells (PR1419) (Bellfruit) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL ) |
| 26714 | 26910 | |
| 26911 | const stepper_interface* sc4hill_reel_configs[6] = |
| 26912 | { |
| 26913 | &starpoint_interface_48step, |
| 26914 | &starpoint_interface_48step, |
| 26915 | &starpoint_interface_48step, |
| 26916 | 0, |
| 26917 | &starpoint_interface_200step_reel, |
| 26918 | 0, |
| 26919 | }; |
| 26920 | |
| 26921 | static DRIVER_INIT( sc4hill ) |
| 26922 | { |
| 26923 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 26924 | DRIVER_INIT_CALL( sc4mbus ); |
| 26925 | state->m_reel_setup = sc4hill_reel_configs; |
| 26926 | } |
| 26927 | |
| 26715 | 26928 | // PR1643 AWP HILLBILLIONAIRE SCORP4 PR1613 HILLBILLIONAIRE SOUNDS11 HILLBILLIONAIRE S.SITE |
| 26716 | | GAME( 200?, sc4hill ,0, sc4, sc4, sc4, ROT0, "BFM","Hill Billionaire (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26717 | | GAME( 200?, sc4hilla ,sc4hill, sc4, sc4, sc4, ROT0, "BFM","Hill Billionaire (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26929 | GAME( 200?, sc4hill ,0, sc4, sc4, sc4hill, ROT0, "BFM","Hill Billionaire (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 26930 | GAME( 200?, sc4hilla ,sc4hill, sc4, sc4, sc4hill, ROT0, "BFM","Hill Billionaire (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 26718 | 26931 | |
| 26719 | 26932 | // PR2176 HISSING QUID VIPA SOUNDS HISSING QUID |
| 26720 | 26933 | GAME( 200?, sc4hiss ,0, sc4, sc4, sc4, ROT0, "Qps","Hissing Quid (Qps) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| r14963 | r14964 | |
| 27313 | 27526 | GAME( 200?, sc4copsrh ,sc4copsr, sc4, sc4, sc4, ROT0, "BFM","Cops 'n' Robbers (Bellfruit) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) |
| 27314 | 27527 | GAME( 200?, sc4copsri ,sc4copsr, sc4, sc4, sc4, ROT0, "BFM","Cops 'n' Robbers (Bellfruit) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL ) |
| 27315 | 27528 | |
| 27529 | /* wrong sound roms */ |
| 27530 | GAME( 200?, sc4mowow ,0, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (PR2118) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) // PR2118 MONOPOLY WOTW WOTW SOUNDS MONOPOLY WOTW 8P |
| 27531 | GAME( 200?, sc4mowowa ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (PR2118) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27532 | GAME( 200?, sc4mowowb ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (PR2118) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27533 | GAME( 200?, sc4mowowc ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (PR2118) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27316 | 27534 | |
| 27317 | | GAME( 200?, sc4mowow ,0, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) // PR2118 MONOPOLY WOTW WOTW SOUNDS MONOPOLY WOTW 8P |
| 27318 | | GAME( 200?, sc4mowowa ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27319 | | GAME( 200?, sc4mowowb ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27320 | | GAME( 200?, sc4mowowc ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27321 | | GAME( 200?, sc4mowowd ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) // PR1726 AWP WHEEL OF WEALTH PR1706 WHEEL OF WEALTH SOUNDS11 WHEEL OF WEALTH S.SITE |
| 27322 | | GAME( 200?, sc4mowowe ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27323 | | GAME( 200?, sc4mowowf ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) // PR2389 WHEEL OF WEALTH WOWT SOUNDS WHEEL OF WEAL |
| 27324 | | GAME( 200?, sc4mowowg ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27325 | | GAME( 200?, sc4mowowh ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27326 | | GAME( 200?, sc4mowowi ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27327 | | GAME( 200?, sc4mowowj ,sc4mowow, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (Scorpion 4) (set 11)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27535 | GAME( 200?, sc4mwwtb ,0, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (PR2389, Top Box) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) // PR2389 WHEEL OF WEALTH WOWT SOUNDS WHEEL OF WEAL |
| 27536 | GAME( 200?, sc4mwwtba ,sc4mwwtb, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (PR2389, Top Box) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27537 | GAME( 200?, sc4mwwtbb ,sc4mwwtb, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (PR2389, Top Box) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27538 | GAME( 200?, sc4mwwtbc ,sc4mwwtb, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (PR2389, Top Box) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27539 | GAME( 200?, sc4mwwtbd ,sc4mwwtb, sc4, sc4, sc4, ROT0, "Mazooma","Monopoly Wheel Of Wealth (Mazooma) (PR2389, Top Box) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27328 | 27540 | |
| 27541 | |
| 27542 | const stepper_interface* sc4bwow_reel_configs[6] = |
| 27543 | { |
| 27544 | &starpoint_interface_48step, |
| 27545 | &starpoint_interface_48step, |
| 27546 | &starpoint_interface_48step, |
| 27547 | 0, |
| 27548 | &starpoint_interface_48step, |
| 27549 | &starpoint_interface_200step_reel, |
| 27550 | }; |
| 27551 | |
| 27552 | static DRIVER_INIT( sc4bwow ) |
| 27553 | { |
| 27554 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 27555 | DRIVER_INIT_CALL( sc4mbus ); |
| 27556 | state->m_reel_setup = sc4bwow_reel_configs; |
| 27557 | } |
| 27558 | |
| 27559 | GAME( 200?, sc4bwow ,0, sc4, sc4, sc4bwow, ROT0, "BFM","Wheel Of Wealth (Bellfruit) (PR1726) (Scorpion 4) (WHEL013, set 1)", GAME_IS_SKELETON_MECHANICAL ) // PR1726 AWP WHEEL OF WEALTH PR1706 WHEEL OF WEALTH SOUNDS11 WHEEL OF WEALTH S.SITE |
| 27560 | GAME( 200?, sc4bwowa ,sc4bwow, sc4, sc4, sc4bwow, ROT0, "BFM","Wheel Of Wealth (Bellfruit) (PR1726) (Scorpion 4) (WHEL013, set 2)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27561 | |
| 27562 | |
| 27329 | 27563 | // PR2166 NUN N ROSES NANR SOUNDS NUNS N ROSES |
| 27330 | 27564 | GAME( 200?, sc4nunsm ,0, sc4, sc4, sc4, ROT0, "Mazooma","Nuns 'n' Roses (Mazooma) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 27331 | 27565 | GAME( 200?, sc4nunsmb ,sc4nunsm, sc4, sc4, sc4, ROT0, "Mazooma","Nuns 'n' Roses (Mazooma) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| r14963 | r14964 | |
| 27357 | 27591 | GAME( 200?, sc4gncd ,sc4gnc, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game Club (Mazooma) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) |
| 27358 | 27592 | GAME( 200?, sc4gnce ,sc4gnc, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game Club (Mazooma) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) |
| 27359 | 27593 | |
| 27360 | | GAME( 200?, sc4ggame ,0, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) // PR2056 GOLD X TRIPLE BARX SOUNDS GOLD X TRIPLE |
| 27361 | | GAME( 200?, sc4ggamee ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27362 | | GAME( 200?, sc4ggameo ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 16)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27363 | | GAME( 200?, sc4ggameh ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) // PR2056 GOLDEN X GOLDEN GAME ARCADE BARX SOUNDS GOLDEN X |
| 27364 | | GAME( 200?, sc4ggamei ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27365 | | GAME( 200?, sc4ggamel ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 13)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27366 | | GAME( 200?, sc4ggamem ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 14)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27367 | | GAME( 200?, sc4ggamep ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 17)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27368 | | GAME( 200?, sc4ggameq ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 18)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27369 | | GAME( 200?, sc4ggamer ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 19)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27370 | | GAME( 200?, sc4ggamew ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 24)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27371 | | GAME( 200?, sc4ggamex ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 25)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27372 | | GAME( 200?, sc4ggamey ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 26)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27373 | | GAME( 200?, sc4ggamez ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 27)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27374 | | GAME( 200?, sc4ggame1 ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 29)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27375 | | GAME( 200?, sc4ggame2 ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 30)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27376 | | GAME( 200?, sc4ggame7 ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 35)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27377 | | GAME( 200?, sc4ggame8 ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 36)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27378 | | GAME( 200?, sc4ggame9 ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 37)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27379 | | GAME( 200?, sc4ggameaa ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 38)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27380 | | GAME( 200?, sc4ggameab ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 39)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27381 | | GAME( 200?, sc4ggameac ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 40)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27382 | | GAME( 200?, sc4ggamead ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 41)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27383 | | GAME( 200?, sc4ggameae ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 42)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27384 | | GAME( 200?, sc4ggamea ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) // PR2056 GOLDEN X BARX SOUNDS GOLDEN X |
| 27385 | | GAME( 200?, sc4ggameb ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27386 | | GAME( 200?, sc4ggamec ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27387 | | GAME( 200?, sc4ggamed ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27388 | | GAME( 200?, sc4ggamef ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27389 | | GAME( 200?, sc4ggameg ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27390 | | GAME( 200?, sc4ggamej ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 11)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27391 | | GAME( 200?, sc4ggamek ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 12)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27392 | | GAME( 200?, sc4ggamen ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 15)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27393 | | GAME( 200?, sc4ggames ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 20)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27394 | | GAME( 200?, sc4ggamet ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 21)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27395 | | GAME( 200?, sc4ggameu ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 22)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27396 | | GAME( 200?, sc4ggamev ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 23)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27397 | | GAME( 200?, sc4ggame0 ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 28)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27398 | | GAME( 200?, sc4ggame3 ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 31)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27399 | | GAME( 200?, sc4ggame4 ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 32)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27400 | | GAME( 200?, sc4ggame5 ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 33)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27401 | | GAME( 200?, sc4ggame6 ,sc4ggame, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (Scorpion 4) (set 34)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27594 | GAME( 200?, sc4ggtb ,0, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, Top Box) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) // PR2056 GOLD X TRIPLE BARX SOUNDS GOLD X TRIPLE |
| 27595 | GAME( 200?, sc4ggtba ,sc4ggtb, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, Top Box) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27596 | GAME( 200?, sc4ggtbb ,sc4ggtb, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, Top Box) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27402 | 27597 | |
| 27598 | const stepper_interface* sc4ggame_reel_configs[6] = |
| 27599 | { |
| 27600 | &starpoint_interface_200step_reel, |
| 27601 | &starpoint_interface_200step_reel, |
| 27602 | &starpoint_interface_200step_reel, |
| 27603 | 0, |
| 27604 | 0, |
| 27605 | 0, |
| 27606 | }; |
| 27607 | |
| 27608 | static DRIVER_INIT( sc4ggamem ) |
| 27609 | { |
| 27610 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 27611 | DRIVER_INIT_CALL( sc4mbus ); |
| 27612 | state->m_reel_setup = sc4ggame_reel_configs; |
| 27613 | } |
| 27614 | |
| 27615 | static DRIVER_INIT( sc4ggame ) |
| 27616 | { |
| 27617 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 27618 | DRIVER_INIT_CALL( sc4 ); |
| 27619 | state->m_reel_setup = sc4ggame_reel_configs; |
| 27620 | } |
| 27621 | |
| 27622 | // 25GBP sets |
| 27623 | // PR2056 GOLDEN X GOLDEN GAME ARCADE BARX SOUNDS GOLDEN X |
| 27624 | GAME( 200?, sc4ggame ,0, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 25GBP, set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 27625 | GAME( 200?, sc4ggamei ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 25GBP, set 2)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27626 | GAME( 200?, sc4ggamep ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 25GBP, set 3)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27627 | GAME( 200?, sc4ggameq ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 25GBP, set 4)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27628 | GAME( 200?, sc4ggamer ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 25GBP, set 5)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27629 | // 35GBP sets |
| 27630 | GAME( 200?, sc4ggame7 ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 35GBP, set 1)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27631 | GAME( 200?, sc4ggame8 ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 35GBP, set 2)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27632 | GAME( 200?, sc4ggame9 ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 35GBP, set 3)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27633 | GAME( 200?, sc4ggameaa ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 35GBP, set 4)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27634 | GAME( 200?, sc4ggameab ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 35GBP, set 5)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27635 | GAME( 200?, sc4ggameac ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 35GBP, set 6)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27636 | GAME( 200?, sc4ggamead ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 35GBP, set 7)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27637 | GAME( 200?, sc4ggameae ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (GLDX, 35GBP, set 8)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27638 | // pay unit error |
| 27639 | GAME( 200?, sc4ggamel ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27640 | GAME( 200?, sc4ggamem ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27641 | GAME( 200?, sc4ggamew ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27642 | GAME( 200?, sc4ggamex ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27643 | GAME( 200?, sc4ggamey ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27644 | GAME( 200?, sc4ggamez ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27645 | GAME( 200?, sc4ggame1 ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27646 | GAME( 200?, sc4ggame2 ,sc4ggame, sc4, sc4, sc4ggamem, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056, newer?) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27647 | // 25GBP, no 41 check |
| 27648 | // PR2056 GOLDEN X BARX SOUNDS GOLDEN X |
| 27649 | GAME( 200?, sc4ggamea ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 25GBP, set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 27650 | GAME( 200?, sc4ggameb ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 25GBP, set 2)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27651 | GAME( 200?, sc4ggamec ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 25GBP, set 3)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27652 | GAME( 200?, sc4ggamed ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 25GBP, set 4)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27653 | GAME( 200?, sc4ggames ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 25GBP, set 5)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27654 | GAME( 200?, sc4ggamet ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 25GBP, set 6)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27655 | GAME( 200?, sc4ggameu ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 25GBP, set 7)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27656 | // 30GBP, no 41 check |
| 27657 | GAME( 200?, sc4ggamef ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 30GBP, set 1)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27658 | GAME( 200?, sc4ggameg ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 30GBP, set 2)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27659 | GAME( 200?, sc4ggamej ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 30GBP, set 3)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27660 | GAME( 200?, sc4ggamek ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 30GBP, set 4)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27661 | GAME( 200?, sc4ggamev ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 30GBP, set 5)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27662 | GAME( 200?, sc4ggame3 ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 30GBP, set 6)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27663 | GAME( 200?, sc4ggame4 ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 30GBP, set 7)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27664 | GAME( 200?, sc4ggame5 ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 30GBP, set 8)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27665 | GAME( 200?, sc4ggame6 ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (GLDX, 30GBP, set 9)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27666 | // pay unit error |
| 27667 | GAME( 200?, sc4ggamen ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27668 | GAME( 200?, sc4ggame0 ,sc4ggame, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game (Mazooma) (PR2056) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27669 | |
| 27670 | |
| 27403 | 27671 | // these were in the above sets |
| 27404 | | GAME( 200?, sc4ggdlx ,0, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL )// PR2201 GOLDEN X GOLDEN GAME MAZ GXDX SOUNDS GOLDEN GAME DLX |
| 27405 | | GAME( 200?, sc4ggdlxc ,sc4ggdlx, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27406 | | GAME( 200?, sc4ggdlxa ,sc4ggdlx, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL )// PR2201 GOLDEN X GOLDEN GAME DLX MAZ GXDX SOUNDS GOLDEN X |
| 27407 | | GAME( 200?, sc4ggdlxb ,sc4ggdlx, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27408 | | GAME( 200?, sc4ggdlxd ,sc4ggdlx, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27409 | | GAME( 200?, sc4ggdlxe ,sc4ggdlx, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27410 | | GAME( 200?, sc4ggdlxf ,sc4ggdlx, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL )// PR2201 GOLDEN GAME DELUXE GOLDEN GAME MAZ GXDX SOUNDS GOLDEN GAME DLX |
| 27411 | | GAME( 200?, sc4ggdlxg ,sc4ggdlx, sc4, sc4, sc4, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27672 | // PR2201 GOLDEN X GOLDEN GAME MAZ GXDX SOUNDS GOLDEN GAME DLX |
| 27673 | GAME( 200?, sc4ggdlx ,0, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (PR2201) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 27674 | GAME( 200?, sc4ggdlxc ,sc4ggdlx, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (PR2201) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27675 | // PR2201 GOLDEN X GOLDEN GAME DLX MAZ GXDX SOUNDS GOLDEN X |
| 27676 | GAME( 200?, sc4ggdlxa ,sc4ggdlx, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (PR2201) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 27677 | GAME( 200?, sc4ggdlxb ,sc4ggdlx, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (PR2201) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27678 | GAME( 200?, sc4ggdlxd ,sc4ggdlx, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (PR2201) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27679 | GAME( 200?, sc4ggdlxe ,sc4ggdlx, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (PR2201) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27680 | // PR2201 GOLDEN GAME DELUXE GOLDEN GAME MAZ GXDX SOUNDS GOLDEN GAME DLX |
| 27681 | GAME( 200?, sc4ggdlxf ,sc4ggdlx, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (PR2201) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) |
| 27682 | GAME( 200?, sc4ggdlxg ,sc4ggdlx, sc4, sc4, sc4ggame, ROT0, "Mazooma","Golden Game Deluxe (Mazooma) (PR2201) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27683 | |
| 27684 | const stepper_interface* sc4gggtb_reel_configs[6] = |
| 27685 | { |
| 27686 | &starpoint_interface_48step, |
| 27687 | &starpoint_interface_48step, |
| 27688 | &starpoint_interface_48step, |
| 27689 | &starpoint_interface_48step, |
| 27690 | &starpoint_interface_48step, |
| 27691 | &starpoint_interface_48step, |
| 27692 | }; |
| 27693 | |
| 27694 | static DRIVER_INIT( sc4gggtb ) |
| 27695 | { |
| 27696 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 27697 | DRIVER_INIT_CALL( sc4 ); |
| 27698 | state->m_reel_setup = sc4gggtb_reel_configs; |
| 27699 | } |
| 27700 | |
| 27412 | 27701 | // most of these look similar |
| 27413 | | GAME( 200?, sc4ggg ,0, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) // PR2056 GOLD X TRIPLE BARX SOUNDS GOLD X TRIPLE |
| 27414 | | GAME( 200?, sc4gggj ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 11)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27415 | | GAME( 200?, sc4ggga ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) // PR2056 GOLDEN X GOLDEN GAME ARCADE BARX SOUNDS GOLDEN X |
| 27416 | | GAME( 200?, sc4gggb ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27417 | | GAME( 200?, sc4gggc ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27418 | | GAME( 200?, sc4gggd ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 5)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27419 | | GAME( 200?, sc4ggge ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 6)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27420 | | GAME( 200?, sc4gggf ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 7)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27421 | | GAME( 200?, sc4gggk ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 12)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27422 | | GAME( 200?, sc4gggl ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 13)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27423 | | GAME( 200?, sc4gggm ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 14)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27424 | | GAME( 200?, sc4gggn ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 15)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27425 | | GAME( 200?, sc4gggo ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 16)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27426 | | GAME( 200?, sc4gggp ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 17)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27427 | | GAME( 200?, sc4gggg ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 8)", GAME_IS_SKELETON_MECHANICAL ) // PR2353 GRAND GOLDEN GAME GRAND GOLDEN GAME MAZ BARX SOUNDS GOLDEN GAME |
| 27428 | | GAME( 200?, sc4gggh ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 9)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27429 | | GAME( 200?, sc4gggi ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 10)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27430 | | GAME( 200?, sc4gggq ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 18)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27431 | | GAME( 200?, sc4gggr ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 19)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27432 | | GAME( 200?, sc4gggs ,sc4ggg, sc4, sc4, sc4, ROT0, "Mazooma","Grand Golden Game (Mazooma) (Scorpion 4) (set 20)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27702 | GAME( 200?, sc4gggtb ,0, sc4, sc4, sc4gggtb, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056, Top Box) (Scorpion 4) (GGGT, set 1)", GAME_IS_SKELETON_MECHANICAL ) // PR2056 GOLD X TRIPLE BARX SOUNDS GOLD X TRIPLE |
| 27703 | GAME( 200?, sc4gggtba ,sc4ggg, sc4, sc4, sc4gggtb, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056, Top Box) (Scorpion 4) (GGGT, set 2)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27433 | 27704 | |
| 27434 | 27705 | |
| 27706 | const stepper_interface* sc4ggg_reel_configs[6] = |
| 27707 | { |
| 27708 | &starpoint_interface_200step_reel, |
| 27709 | &starpoint_interface_200step_reel, |
| 27710 | &starpoint_interface_200step_reel, |
| 27711 | 0, |
| 27712 | 0, |
| 27713 | 0, |
| 27714 | }; |
| 27715 | |
| 27716 | static DRIVER_INIT( sc4ggg ) |
| 27717 | { |
| 27718 | sc4_state *state = machine.driver_data<sc4_state>(); |
| 27719 | DRIVER_INIT_CALL( sc4 ); |
| 27720 | state->m_reel_setup = sc4ggg_reel_configs; |
| 27721 | } |
| 27722 | |
| 27723 | // do these sets have the wrong project name / ID strings? they boot at GGGB (Grand Golden Game) but their product ID in the header suggests standard Golden Game |
| 27724 | // PR2056 GOLDEN X GOLDEN GAME ARCADE BARX SOUNDS GOLDEN X |
| 27725 | GAME( 200?, sc4ggg ,0, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 27726 | GAME( 200?, sc4gggb ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 2)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27727 | GAME( 200?, sc4gggc ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 3)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27728 | GAME( 200?, sc4gggd ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 4)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27729 | GAME( 200?, sc4ggge ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 5)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27730 | GAME( 200?, sc4gggf ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 6)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27731 | GAME( 200?, sc4gggk ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 7)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27732 | GAME( 200?, sc4gggl ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 8)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27733 | GAME( 200?, sc4gggm ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 9)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27734 | GAME( 200?, sc4gggn ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 10)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27735 | GAME( 200?, sc4gggo ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 11)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27736 | GAME( 200?, sc4gggp ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 12)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27737 | GAME( 200?, sc4gggg ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2056) (Scorpion 4) (GGGB, 35GBP, set 13)", GAME_IS_SKELETON_MECHANICAL ) |
| 27738 | // PR2353 GRAND GOLDEN GAME GRAND GOLDEN GAME MAZ BARX SOUNDS GOLDEN GAME |
| 27739 | GAME( 200?, sc4gggh ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2353) (Scorpion 4) (GGGB, 35GBP, set 1)", GAME_IS_SKELETON_MECHANICAL ) // ^^ |
| 27740 | GAME( 200?, sc4gggi ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2353) (Scorpion 4) (GGGB, 35GBP, set 2)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27741 | GAME( 200?, sc4gggq ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2353) (Scorpion 4) (GGGB, 35GBP, set 3)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27742 | GAME( 200?, sc4gggr ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2353) (Scorpion 4) (GGGB, 35GBP, set 4)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27743 | GAME( 200?, sc4gggs ,sc4ggg, sc4, sc4, sc4ggg, ROT0, "Mazooma","Grand Golden Game (Mazooma) (PR2353) (Scorpion 4) (GGGB, 35GBP, set 5)", GAME_IS_SKELETON_MECHANICAL )// ^^ |
| 27744 | |
| 27745 | |
| 27435 | 27746 | // PR1227 4PLAY ART13 95004313 4PLAY PR1227 |
| 27436 | 27747 | GAME( 200?, sc4ivply ,0, sc4, sc4, sc4, ROT0, "BFM","4 Play (Bellfruit) (Scorpion 4)", GAME_IS_SKELETON_MECHANICAL ) // not english |
| 27437 | 27748 | |
| r14963 | r14964 | |
| 27615 | 27926 | GAME( 200?, sc4ctlcl ,0, sc4, sc4, sc4, ROT0, "BFM","Cop The Lot Club (Bellfruit) (Scorpion 4) (set 1)", GAME_IS_SKELETON_MECHANICAL ) |
| 27616 | 27927 | GAME( 200?, sc4ctlcla ,sc4ctlcl, sc4, sc4, sc4, ROT0, "BFM","Cop The Lot Club (Bellfruit) (Scorpion 4) (set 2)", GAME_IS_SKELETON_MECHANICAL ) |
| 27617 | 27928 | // PR1036 CLUB COP THE LOT COP THE LOT CLUB PR1036 CLOT SOUNDS11 COP THE LOT |
| 27929 | // shows nothing, but alarms, do these go with the ad4 video roms? |
| 27618 | 27930 | GAME( 200?, sc4ctlclb ,sc4ctlcl, sc4, sc4, sc4, ROT0, "BFM","Cop The Lot Club (Bellfruit) (Scorpion 4) (set 3)", GAME_IS_SKELETON_MECHANICAL ) |
| 27619 | 27931 | GAME( 200?, sc4ctlclc ,sc4ctlcl, sc4, sc4, sc4, ROT0, "BFM","Cop The Lot Club (Bellfruit) (Scorpion 4) (set 4)", GAME_IS_SKELETON_MECHANICAL ) |
| 27620 | 27932 | |
src/mess/machine/gb.c
| r14963 | r14964 | |
| 66 | 66 | #define CGB_START_VRAM_BANKS 0x0000 |
| 67 | 67 | #define CGB_START_RAM_BANKS ( 2 * 8 * 1024 ) |
| 68 | 68 | |
| 69 | | #define JOYPAD state->m_gb_io[0x00] /* Joystick: 1.1.P15.P14.P13.P12.P11.P10 */ |
| 70 | | #define SIODATA state->m_gb_io[0x01] /* Serial IO data buffer */ |
| 71 | | #define SIOCONT state->m_gb_io[0x02] /* Serial IO control register */ |
| 72 | | #define DIVREG state->m_gb_io[0x04] /* Divider register (???) */ |
| 73 | | #define TIMECNT state->m_gb_io[0x05] /* Timer counter. Gen. int. when it overflows */ |
| 74 | | #define TIMEMOD state->m_gb_io[0x06] /* New value of TimeCount after it overflows */ |
| 75 | | #define TIMEFRQ state->m_gb_io[0x07] /* Timer frequency and start/stop switch */ |
| 69 | #define JOYPAD m_gb_io[0x00] /* Joystick: 1.1.P15.P14.P13.P12.P11.P10 */ |
| 70 | #define SIODATA m_gb_io[0x01] /* Serial IO data buffer */ |
| 71 | #define SIOCONT m_gb_io[0x02] /* Serial IO control register */ |
| 72 | #define DIVREG m_gb_io[0x04] /* Divider register (???) */ |
| 73 | #define TIMECNT m_gb_io[0x05] /* Timer counter. Gen. int. when it overflows */ |
| 74 | #define TIMEMOD m_gb_io[0x06] /* New value of TimeCount after it overflows */ |
| 75 | #define TIMEFRQ m_gb_io[0x07] /* Timer frequency and start/stop switch */ |
| 76 | 76 | |
| 77 | 77 | |
| 78 | 78 | |
| r14963 | r14964 | |
| 82 | 82 | |
| 83 | 83 | static TIMER_CALLBACK(gb_serial_timer_proc); |
| 84 | 84 | static void gb_machine_stop(running_machine &machine); |
| 85 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc1 ); |
| 86 | | static WRITE8_HANDLER( gb_ram_bank_select_mbc1 ); |
| 87 | | static WRITE8_HANDLER( gb_mem_mode_select_mbc1 ); |
| 88 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc2 ); |
| 89 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc3 ); |
| 90 | | static WRITE8_HANDLER( gb_ram_bank_select_mbc3 ); |
| 91 | | static WRITE8_HANDLER( gb_mem_mode_select_mbc3 ); |
| 92 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc5 ); |
| 93 | | static WRITE8_HANDLER( gb_ram_bank_select_mbc5 ); |
| 94 | | static WRITE8_HANDLER( gb_ram_bank_select_mbc6 ); |
| 95 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc6_1 ); |
| 96 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc6_2 ); |
| 97 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc7 ); |
| 98 | | static WRITE8_HANDLER( gb_rom_bank_unknown_mbc7 ); |
| 99 | | static WRITE8_HANDLER( gb_ram_tama5 ); |
| 100 | | static WRITE8_HANDLER( gb_rom_bank_select_wisdom ); |
| 101 | | static WRITE8_HANDLER( gb_rom_bank_mmm01_0000_w ); |
| 102 | | static WRITE8_HANDLER( gb_rom_bank_mmm01_2000_w ); |
| 103 | | static WRITE8_HANDLER( gb_rom_bank_mmm01_4000_w ); |
| 104 | | static WRITE8_HANDLER( gb_rom_bank_mmm01_6000_w ); |
| 105 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc1_kor ); |
| 106 | | static WRITE8_HANDLER( gb_ram_bank_select_mbc1_kor ); |
| 107 | | static WRITE8_HANDLER( gb_mem_mode_select_mbc1_kor ); |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | 108 | static void gb_timer_increment( running_machine &machine ); |
| 109 | 109 | |
| 110 | 110 | #ifdef MAME_DEBUG |
| r14963 | r14964 | |
| 116 | 116 | { |
| 117 | 117 | gb_state *state = machine.driver_data<gb_state>(); |
| 118 | 118 | /* Initialize the registers */ |
| 119 | | SIODATA = 0x00; |
| 120 | | SIOCONT = 0x7E; |
| 119 | state->SIODATA = 0x00; |
| 120 | state->SIOCONT = 0x7E; |
| 121 | 121 | |
| 122 | | gb_io_w( machine.device("maincpu")->memory().space(AS_PROGRAM ), 0x05, 0x00 ); /* TIMECNT */ |
| 123 | | gb_io_w( machine.device("maincpu")->memory().space(AS_PROGRAM ), 0x06, 0x00 ); /* TIMEMOD */ |
| 122 | state->gb_io_w( *machine.device("maincpu")->memory().space(AS_PROGRAM ), 0x05, 0x00 ); /* TIMECNT */ |
| 123 | state->gb_io_w( *machine.device("maincpu")->memory().space(AS_PROGRAM ), 0x06, 0x00 ); /* TIMEMOD */ |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | static void gb_rom16_0000( running_machine &machine, UINT8 *addr ) |
| r14963 | r14964 | |
| 178 | 178 | case MBC_NONE: |
| 179 | 179 | break; |
| 180 | 180 | case MBC_MMM01: |
| 181 | | space->install_legacy_write_handler( 0x0000, 0x1fff, FUNC(gb_rom_bank_mmm01_0000_w) ); |
| 182 | | space->install_legacy_write_handler( 0x2000, 0x3fff, FUNC(gb_rom_bank_mmm01_2000_w)); |
| 183 | | space->install_legacy_write_handler( 0x4000, 0x5fff, FUNC(gb_rom_bank_mmm01_4000_w)); |
| 184 | | space->install_legacy_write_handler( 0x6000, 0x7fff, FUNC(gb_rom_bank_mmm01_6000_w)); |
| 181 | space->install_write_handler( 0x0000, 0x1fff, write8_delegate(FUNC(gb_state::gb_rom_bank_mmm01_0000_w),state) ); |
| 182 | space->install_write_handler( 0x2000, 0x3fff, write8_delegate(FUNC(gb_state::gb_rom_bank_mmm01_2000_w),state)); |
| 183 | space->install_write_handler( 0x4000, 0x5fff, write8_delegate(FUNC(gb_state::gb_rom_bank_mmm01_4000_w),state)); |
| 184 | space->install_write_handler( 0x6000, 0x7fff, write8_delegate(FUNC(gb_state::gb_rom_bank_mmm01_6000_w),state)); |
| 185 | 185 | break; |
| 186 | 186 | case MBC_MBC1: |
| 187 | | space->install_legacy_write_handler( 0x0000, 0x1fff, FUNC(gb_ram_enable) ); /* We don't emulate RAM enable yet */ |
| 188 | | space->install_legacy_write_handler( 0x2000, 0x3fff, FUNC(gb_rom_bank_select_mbc1) ); |
| 189 | | space->install_legacy_write_handler( 0x4000, 0x5fff, FUNC(gb_ram_bank_select_mbc1) ); |
| 190 | | space->install_legacy_write_handler( 0x6000, 0x7fff, FUNC(gb_mem_mode_select_mbc1) ); |
| 187 | space->install_write_handler( 0x0000, 0x1fff, write8_delegate(FUNC(gb_state::gb_ram_enable),state) ); /* We don't emulate RAM enable yet */ |
| 188 | space->install_write_handler( 0x2000, 0x3fff, write8_delegate(FUNC(gb_state::gb_rom_bank_select_mbc1),state) ); |
| 189 | space->install_write_handler( 0x4000, 0x5fff, write8_delegate(FUNC(gb_state::gb_ram_bank_select_mbc1),state) ); |
| 190 | space->install_write_handler( 0x6000, 0x7fff, write8_delegate(FUNC(gb_state::gb_mem_mode_select_mbc1),state) ); |
| 191 | 191 | break; |
| 192 | 192 | case MBC_MBC2: |
| 193 | | space->install_legacy_write_handler( 0x2000, 0x3fff, FUNC(gb_rom_bank_select_mbc2) ); |
| 193 | space->install_write_handler( 0x2000, 0x3fff, write8_delegate(FUNC(gb_state::gb_rom_bank_select_mbc2),state) ); |
| 194 | 194 | break; |
| 195 | 195 | case MBC_MBC3: |
| 196 | 196 | case MBC_HUC1: /* Possibly wrong */ |
| 197 | 197 | case MBC_HUC3: /* Possibly wrong */ |
| 198 | | space->install_legacy_write_handler( 0x0000, 0x1fff, FUNC(gb_ram_enable) ); /* We don't emulate RAM enable yet */ |
| 199 | | space->install_legacy_write_handler( 0x2000, 0x3fff, FUNC(gb_rom_bank_select_mbc3) ); |
| 200 | | space->install_legacy_write_handler( 0x4000, 0x5fff, FUNC(gb_ram_bank_select_mbc3) ); |
| 201 | | space->install_legacy_write_handler( 0x6000, 0x7fff, FUNC(gb_mem_mode_select_mbc3) ); |
| 198 | space->install_write_handler( 0x0000, 0x1fff, write8_delegate(FUNC(gb_state::gb_ram_enable),state) ); /* We don't emulate RAM enable yet */ |
| 199 | space->install_write_handler( 0x2000, 0x3fff, write8_delegate(FUNC(gb_state::gb_rom_bank_select_mbc3),state) ); |
| 200 | space->install_write_handler( 0x4000, 0x5fff, write8_delegate(FUNC(gb_state::gb_ram_bank_select_mbc3),state) ); |
| 201 | space->install_write_handler( 0x6000, 0x7fff, write8_delegate(FUNC(gb_state::gb_mem_mode_select_mbc3),state) ); |
| 202 | 202 | break; |
| 203 | 203 | case MBC_MBC5: |
| 204 | | space->install_legacy_write_handler( 0x0000, 0x1fff, FUNC(gb_ram_enable) ); |
| 205 | | space->install_legacy_write_handler( 0x2000, 0x3fff, FUNC(gb_rom_bank_select_mbc5) ); |
| 206 | | space->install_legacy_write_handler( 0x4000, 0x5fff, FUNC(gb_ram_bank_select_mbc5) ); |
| 204 | space->install_write_handler( 0x0000, 0x1fff, write8_delegate(FUNC(gb_state::gb_ram_enable),state) ); |
| 205 | space->install_write_handler( 0x2000, 0x3fff, write8_delegate(FUNC(gb_state::gb_rom_bank_select_mbc5),state) ); |
| 206 | space->install_write_handler( 0x4000, 0x5fff, write8_delegate(FUNC(gb_state::gb_ram_bank_select_mbc5),state) ); |
| 207 | 207 | break; |
| 208 | 208 | case MBC_MBC6: |
| 209 | | space->install_legacy_write_handler( 0x0000, 0x1fff, FUNC(gb_ram_bank_select_mbc6) ); |
| 210 | | space->install_legacy_write_handler( 0x2000, 0x2fff, FUNC(gb_rom_bank_select_mbc6_1) ); |
| 211 | | space->install_legacy_write_handler( 0x3000, 0x3fff, FUNC(gb_rom_bank_select_mbc6_2) ); |
| 209 | space->install_write_handler( 0x0000, 0x1fff, write8_delegate(FUNC(gb_state::gb_ram_bank_select_mbc6),state) ); |
| 210 | space->install_write_handler( 0x2000, 0x2fff, write8_delegate(FUNC(gb_state::gb_rom_bank_select_mbc6_1),state) ); |
| 211 | space->install_write_handler( 0x3000, 0x3fff, write8_delegate(FUNC(gb_state::gb_rom_bank_select_mbc6_2),state) ); |
| 212 | 212 | break; |
| 213 | 213 | case MBC_MBC7: |
| 214 | | space->install_legacy_write_handler( 0x0000, 0x1fff, FUNC(gb_ram_enable) ); |
| 215 | | space->install_legacy_write_handler( 0x2000, 0x2fff, FUNC(gb_rom_bank_select_mbc7) ); |
| 216 | | space->install_legacy_write_handler( 0x3000, 0x7fff, FUNC(gb_rom_bank_unknown_mbc7) ); |
| 214 | space->install_write_handler( 0x0000, 0x1fff, write8_delegate(FUNC(gb_state::gb_ram_enable),state) ); |
| 215 | space->install_write_handler( 0x2000, 0x2fff, write8_delegate(FUNC(gb_state::gb_rom_bank_select_mbc7),state) ); |
| 216 | space->install_write_handler( 0x3000, 0x7fff, write8_delegate(FUNC(gb_state::gb_rom_bank_unknown_mbc7),state) ); |
| 217 | 217 | break; |
| 218 | 218 | case MBC_TAMA5: |
| 219 | | space->install_legacy_write_handler( 0xA000, 0xBFFF, FUNC(gb_ram_tama5) ); |
| 219 | space->install_write_handler( 0xA000, 0xBFFF, write8_delegate(FUNC(gb_state::gb_ram_tama5),state) ); |
| 220 | 220 | break; |
| 221 | 221 | case MBC_WISDOM: |
| 222 | | space->install_legacy_write_handler( 0x0000, 0x3fff, FUNC(gb_rom_bank_select_wisdom) ); |
| 222 | space->install_write_handler( 0x0000, 0x3fff, write8_delegate(FUNC(gb_state::gb_rom_bank_select_wisdom),state) ); |
| 223 | 223 | break; |
| 224 | 224 | case MBC_MBC1_KOR: |
| 225 | | space->install_legacy_write_handler( 0x0000, 0x1fff, FUNC(gb_ram_enable) ); /* We don't emulate RAM enable yet */ |
| 226 | | space->install_legacy_write_handler( 0x2000, 0x3fff, FUNC(gb_rom_bank_select_mbc1_kor) ); |
| 227 | | space->install_legacy_write_handler( 0x4000, 0x5fff, FUNC(gb_ram_bank_select_mbc1_kor) ); |
| 228 | | space->install_legacy_write_handler( 0x6000, 0x7fff, FUNC(gb_mem_mode_select_mbc1_kor) ); |
| 225 | space->install_write_handler( 0x0000, 0x1fff, write8_delegate(FUNC(gb_state::gb_ram_enable),state) ); /* We don't emulate RAM enable yet */ |
| 226 | space->install_write_handler( 0x2000, 0x3fff, write8_delegate(FUNC(gb_state::gb_rom_bank_select_mbc1_kor),state) ); |
| 227 | space->install_write_handler( 0x4000, 0x5fff, write8_delegate(FUNC(gb_state::gb_ram_bank_select_mbc1_kor),state) ); |
| 228 | space->install_write_handler( 0x6000, 0x7fff, write8_delegate(FUNC(gb_state::gb_mem_mode_select_mbc1_kor),state) ); |
| 229 | 229 | break; |
| 230 | 230 | |
| 231 | 231 | case MBC_MEGADUCK: |
| 232 | | space->install_legacy_write_handler( 0x0001, 0x0001, FUNC(megaduck_rom_bank_select_type1) ); |
| 233 | | space->install_legacy_write_handler( 0xB000, 0xB000, FUNC(megaduck_rom_bank_select_type2) ); |
| 232 | space->install_write_handler( 0x0001, 0x0001, write8_delegate(FUNC(gb_state::megaduck_rom_bank_select_type1),state) ); |
| 233 | space->install_write_handler( 0xB000, 0xB000, write8_delegate(FUNC(gb_state::megaduck_rom_bank_select_type2),state) ); |
| 234 | 234 | break; |
| 235 | 235 | } |
| 236 | 236 | |
| r14963 | r14964 | |
| 398 | 398 | memory_set_bankptr( machine, "bank2", state->m_RAMMap[ state->m_MBC1Mode ? ( state->m_ROMBank >> 5 ) : 0 ] ); |
| 399 | 399 | } |
| 400 | 400 | |
| 401 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc1 ) |
| 401 | WRITE8_MEMBER(gb_state::gb_rom_bank_select_mbc1) |
| 402 | 402 | { |
| 403 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 404 | 403 | data &= 0x1F; /* Only uses lower 5 bits */ |
| 405 | 404 | /* Selecting bank 0 == selecting bank 1 */ |
| 406 | 405 | if( data == 0 ) |
| 407 | 406 | data = 1; |
| 408 | 407 | |
| 409 | | state->m_ROMBank = ( state->m_ROMBank & 0x01E0 ) | data; |
| 408 | m_ROMBank = ( m_ROMBank & 0x01E0 ) | data; |
| 410 | 409 | /* Switch banks */ |
| 411 | | gb_set_mbc1_banks(space->machine()); |
| 410 | gb_set_mbc1_banks(machine()); |
| 412 | 411 | } |
| 413 | 412 | |
| 414 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc2 ) |
| 413 | WRITE8_MEMBER(gb_state::gb_rom_bank_select_mbc2) |
| 415 | 414 | { |
| 416 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 417 | 415 | data &= 0x0F; /* Only uses lower 4 bits */ |
| 418 | 416 | /* Selecting bank 0 == selecting bank 1 */ |
| 419 | 417 | if( data == 0 ) |
| r14963 | r14964 | |
| 421 | 419 | |
| 422 | 420 | /* The least significant bit of the upper address byte must be 1 */ |
| 423 | 421 | if( offset & 0x0100 ) |
| 424 | | state->m_ROMBank = ( state->m_ROMBank & 0x100 ) | data; |
| 422 | m_ROMBank = ( m_ROMBank & 0x100 ) | data; |
| 425 | 423 | /* Switch banks */ |
| 426 | | gb_rom16_4000( space->machine(), state->m_ROMMap[state->m_ROMBank] ); |
| 424 | gb_rom16_4000( machine(), m_ROMMap[m_ROMBank] ); |
| 427 | 425 | } |
| 428 | 426 | |
| 429 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc3 ) |
| 427 | WRITE8_MEMBER(gb_state::gb_rom_bank_select_mbc3) |
| 430 | 428 | { |
| 431 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 432 | | logerror( "0x%04X: write to mbc3 rom bank select register 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), offset, data ); |
| 429 | logerror( "0x%04X: write to mbc3 rom bank select register 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), offset, data ); |
| 433 | 430 | data &= 0x7F; /* Only uses lower 7 bits */ |
| 434 | 431 | /* Selecting bank 0 == selecting bank 1 */ |
| 435 | 432 | if( data == 0 ) |
| 436 | 433 | data = 1; |
| 437 | 434 | |
| 438 | | state->m_ROMBank = ( state->m_ROMBank & 0x0100 ) | data; |
| 435 | m_ROMBank = ( m_ROMBank & 0x0100 ) | data; |
| 439 | 436 | /* Switch banks */ |
| 440 | | gb_rom16_4000( space->machine(), state->m_ROMMap[state->m_ROMBank] ); |
| 437 | gb_rom16_4000( machine(), m_ROMMap[m_ROMBank] ); |
| 441 | 438 | } |
| 442 | 439 | |
| 443 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc5 ) |
| 440 | WRITE8_MEMBER(gb_state::gb_rom_bank_select_mbc5) |
| 444 | 441 | { |
| 445 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 446 | 442 | /* MBC5 has a 9 bit bank select |
| 447 | 443 | Writing into 2000-2FFF sets the lower 8 bits |
| 448 | 444 | Writing into 3000-3FFF sets the 9th bit |
| 449 | 445 | */ |
| 450 | | logerror( "0x%04X: MBC5 ROM Bank select write 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), offset, data ); |
| 446 | logerror( "0x%04X: MBC5 ROM Bank select write 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), offset, data ); |
| 451 | 447 | if( offset & 0x1000 ) |
| 452 | 448 | { |
| 453 | | state->m_ROMBank = (state->m_ROMBank & 0xFF ) | ( ( data & 0x01 ) << 8 ); |
| 449 | m_ROMBank = (m_ROMBank & 0xFF ) | ( ( data & 0x01 ) << 8 ); |
| 454 | 450 | } |
| 455 | 451 | else |
| 456 | 452 | { |
| 457 | | state->m_ROMBank = (state->m_ROMBank & 0x100 ) | data; |
| 453 | m_ROMBank = (m_ROMBank & 0x100 ) | data; |
| 458 | 454 | } |
| 459 | 455 | /* Switch banks */ |
| 460 | | gb_rom16_4000( space->machine(), state->m_ROMMap[state->m_ROMBank] ); |
| 456 | gb_rom16_4000( machine(), m_ROMMap[m_ROMBank] ); |
| 461 | 457 | } |
| 462 | 458 | |
| 463 | | static WRITE8_HANDLER( gb_ram_bank_select_mbc6 ) |
| 459 | WRITE8_MEMBER(gb_state::gb_ram_bank_select_mbc6) |
| 464 | 460 | { |
| 465 | | logerror( "0x%04X: write to mbc6 ram enable area: %04X <- 0x%02X\n", cpu_get_pc( &space->device() ), offset, data ); |
| 461 | logerror( "0x%04X: write to mbc6 ram enable area: %04X <- 0x%02X\n", cpu_get_pc( &space.device() ), offset, data ); |
| 466 | 462 | } |
| 467 | 463 | |
| 468 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc6_1 ) |
| 464 | WRITE8_MEMBER(gb_state::gb_rom_bank_select_mbc6_1) |
| 469 | 465 | { |
| 470 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 471 | | logerror( "0x%04X: write to mbc6 rom area: 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), 0x2000 + offset, data ); |
| 466 | logerror( "0x%04X: write to mbc6 rom area: 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), 0x2000 + offset, data ); |
| 472 | 467 | if ( offset & 0x0800 ) |
| 473 | 468 | { |
| 474 | 469 | if ( data == 0x00 ) |
| 475 | 470 | { |
| 476 | | gb_rom8_4000( space->machine(), state->m_ROMMap[state->m_ROMBank>>1] + ( ( state->m_ROMBank & 0x01 ) ? 0x2000 : 0x0000 ) ); |
| 471 | gb_rom8_4000( machine(), m_ROMMap[m_ROMBank>>1] + ( ( m_ROMBank & 0x01 ) ? 0x2000 : 0x0000 ) ); |
| 477 | 472 | } |
| 478 | 473 | } |
| 479 | 474 | else |
| 480 | 475 | { |
| 481 | | state->m_ROMBank = data; |
| 476 | m_ROMBank = data; |
| 482 | 477 | } |
| 483 | 478 | } |
| 484 | 479 | |
| 485 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc6_2 ) |
| 480 | WRITE8_MEMBER(gb_state::gb_rom_bank_select_mbc6_2) |
| 486 | 481 | { |
| 487 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 488 | | logerror( "0x%04X: write to mbc6 rom area: 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), 0x3000 + offset, data ); |
| 482 | logerror( "0x%04X: write to mbc6 rom area: 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), 0x3000 + offset, data ); |
| 489 | 483 | if ( offset & 0x0800 ) |
| 490 | 484 | { |
| 491 | 485 | if ( data == 0x00 ) |
| 492 | 486 | { |
| 493 | | gb_rom8_6000( space->machine(), state->m_ROMMap[state->m_ROMBank00>>1] + ( ( state->m_ROMBank00 & 0x01 ) ? 0x2000 : 0x0000 ) ); |
| 487 | gb_rom8_6000( machine(), m_ROMMap[m_ROMBank00>>1] + ( ( m_ROMBank00 & 0x01 ) ? 0x2000 : 0x0000 ) ); |
| 494 | 488 | } |
| 495 | 489 | } |
| 496 | 490 | else |
| 497 | 491 | { |
| 498 | | state->m_ROMBank00 = data; |
| 492 | m_ROMBank00 = data; |
| 499 | 493 | } |
| 500 | 494 | } |
| 501 | 495 | |
| 502 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc7 ) |
| 496 | WRITE8_MEMBER(gb_state::gb_rom_bank_select_mbc7) |
| 503 | 497 | { |
| 504 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 505 | | logerror( "0x%04X: write to mbc7 rom select register: 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), 0x2000 + offset, data ); |
| 498 | logerror( "0x%04X: write to mbc7 rom select register: 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), 0x2000 + offset, data ); |
| 506 | 499 | /* Bit 12 must be set for writing to the mbc register */ |
| 507 | 500 | if ( offset & 0x0100 ) |
| 508 | 501 | { |
| 509 | | state->m_ROMBank = data; |
| 510 | | gb_rom16_4000( space->machine(), state->m_ROMMap[state->m_ROMBank] ); |
| 502 | m_ROMBank = data; |
| 503 | gb_rom16_4000( machine(), m_ROMMap[m_ROMBank] ); |
| 511 | 504 | } |
| 512 | 505 | } |
| 513 | 506 | |
| 514 | | static WRITE8_HANDLER( gb_rom_bank_unknown_mbc7 ) |
| 507 | WRITE8_MEMBER(gb_state::gb_rom_bank_unknown_mbc7) |
| 515 | 508 | { |
| 516 | | logerror( "0x%04X: write to mbc7 rom area: 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), 0x3000 + offset, data ); |
| 509 | logerror( "0x%04X: write to mbc7 rom area: 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), 0x3000 + offset, data ); |
| 517 | 510 | /* Bit 12 must be set for writing to the mbc register */ |
| 518 | 511 | if ( offset & 0x0100 ) |
| 519 | 512 | { |
| r14963 | r14964 | |
| 529 | 522 | } |
| 530 | 523 | } |
| 531 | 524 | |
| 532 | | static WRITE8_HANDLER( gb_rom_bank_select_wisdom ) |
| 525 | WRITE8_MEMBER(gb_state::gb_rom_bank_select_wisdom) |
| 533 | 526 | { |
| 534 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 535 | | logerror( "0x%04X: wisdom tree mapper write to address 0x%04X\n", cpu_get_pc( &space->device() ), offset ); |
| 527 | logerror( "0x%04X: wisdom tree mapper write to address 0x%04X\n", cpu_get_pc( &space.device() ), offset ); |
| 536 | 528 | /* The address determines the bank to select */ |
| 537 | | state->m_ROMBank = ( offset << 1 ) & 0x1FF; |
| 538 | | memory_set_bankptr( space->machine(), "bank5", state->m_ROMMap[ state->m_ROMBank ] ); |
| 539 | | memory_set_bankptr( space->machine(), "bank10", state->m_ROMMap[ state->m_ROMBank ] + 0x0100 ); |
| 540 | | gb_rom16_4000( space->machine(), state->m_ROMMap[ state->m_ROMBank + 1 ] ); |
| 529 | m_ROMBank = ( offset << 1 ) & 0x1FF; |
| 530 | memory_set_bankptr( machine(), "bank5", m_ROMMap[ m_ROMBank ] ); |
| 531 | memory_set_bankptr( machine(), "bank10", m_ROMMap[ m_ROMBank ] + 0x0100 ); |
| 532 | gb_rom16_4000( machine(), m_ROMMap[ m_ROMBank + 1 ] ); |
| 541 | 533 | } |
| 542 | 534 | |
| 543 | | static WRITE8_HANDLER( gb_ram_bank_select_mbc1 ) |
| 535 | WRITE8_MEMBER(gb_state::gb_ram_bank_select_mbc1) |
| 544 | 536 | { |
| 545 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 546 | 537 | data &= 0x3; /* Only uses the lower 2 bits */ |
| 547 | 538 | |
| 548 | 539 | /* Select the upper bits of the ROMMask */ |
| 549 | | state->m_ROMBank = ( state->m_ROMBank & 0x1F ) | ( data << 5 ); |
| 540 | m_ROMBank = ( m_ROMBank & 0x1F ) | ( data << 5 ); |
| 550 | 541 | |
| 551 | 542 | /* Switch banks */ |
| 552 | | gb_set_mbc1_banks(space->machine()); |
| 543 | gb_set_mbc1_banks(machine()); |
| 553 | 544 | } |
| 554 | 545 | |
| 555 | | static WRITE8_HANDLER( gb_ram_bank_select_mbc3 ) |
| 546 | WRITE8_MEMBER(gb_state::gb_ram_bank_select_mbc3) |
| 556 | 547 | { |
| 557 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 558 | | logerror( "0x%04X: write mbc3 ram bank select register 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), offset, data ); |
| 548 | logerror( "0x%04X: write mbc3 ram bank select register 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), offset, data ); |
| 559 | 549 | if( data & 0x8 ) |
| 560 | 550 | { /* RTC banks */ |
| 561 | | if ( state->m_CartType & TIMER ) |
| 551 | if ( m_CartType & TIMER ) |
| 562 | 552 | { |
| 563 | | state->m_MBC3RTCBank = data & 0x07; |
| 553 | m_MBC3RTCBank = data & 0x07; |
| 564 | 554 | if ( data < 5 ) |
| 565 | 555 | { |
| 566 | | memset( state->m_MBC3RTCData, state->m_MBC3RTCMap[state->m_MBC3RTCBank], 0x2000 ); |
| 567 | | memory_set_bankptr( space->machine(), "bank2", state->m_MBC3RTCData ); |
| 556 | memset( m_MBC3RTCData, m_MBC3RTCMap[m_MBC3RTCBank], 0x2000 ); |
| 557 | memory_set_bankptr( machine(), "bank2", m_MBC3RTCData ); |
| 568 | 558 | } |
| 569 | 559 | } |
| 570 | 560 | } |
| 571 | 561 | else |
| 572 | 562 | { /* RAM banks */ |
| 573 | | state->m_RAMBank = data & 0x3; |
| 574 | | state->m_MBC3RTCBank = 0xFF; |
| 563 | m_RAMBank = data & 0x3; |
| 564 | m_MBC3RTCBank = 0xFF; |
| 575 | 565 | /* Switch banks */ |
| 576 | | memory_set_bankptr( space->machine(), "bank2", state->m_RAMMap[state->m_RAMBank] ); |
| 566 | memory_set_bankptr( machine(), "bank2", m_RAMMap[m_RAMBank] ); |
| 577 | 567 | } |
| 578 | 568 | } |
| 579 | 569 | |
| 580 | | static WRITE8_HANDLER( gb_ram_bank_select_mbc5 ) |
| 570 | WRITE8_MEMBER(gb_state::gb_ram_bank_select_mbc5) |
| 581 | 571 | { |
| 582 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 583 | | logerror( "0x%04X: MBC5 RAM Bank select write 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), offset, data ); |
| 572 | logerror( "0x%04X: MBC5 RAM Bank select write 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), offset, data ); |
| 584 | 573 | data &= 0x0F; |
| 585 | | if( state->m_CartType & RUMBLE ) |
| 574 | if( m_CartType & RUMBLE ) |
| 586 | 575 | { |
| 587 | 576 | data &= 0x7; |
| 588 | 577 | } |
| 589 | | state->m_RAMBank = data; |
| 578 | m_RAMBank = data; |
| 590 | 579 | /* Switch banks */ |
| 591 | | memory_set_bankptr (space->machine(), "bank2", state->m_RAMMap[state->m_RAMBank] ); |
| 580 | memory_set_bankptr (machine(), "bank2", m_RAMMap[m_RAMBank] ); |
| 592 | 581 | } |
| 593 | 582 | |
| 594 | | WRITE8_HANDLER ( gb_ram_enable ) |
| 583 | WRITE8_MEMBER(gb_state::gb_ram_enable) |
| 595 | 584 | { |
| 596 | 585 | /* FIXME: Currently we don't handle this, but a value of 0xA will enable |
| 597 | 586 | * writing to the cart's RAM banks */ |
| 598 | | logerror( "0x%04X: Write to ram enable register 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), offset, data ); |
| 587 | logerror( "0x%04X: Write to ram enable register 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), offset, data ); |
| 599 | 588 | } |
| 600 | 589 | |
| 601 | | static WRITE8_HANDLER( gb_mem_mode_select_mbc1 ) |
| 590 | WRITE8_MEMBER(gb_state::gb_mem_mode_select_mbc1) |
| 602 | 591 | { |
| 603 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 604 | | state->m_MBC1Mode = data & 0x1; |
| 605 | | gb_set_mbc1_banks(space->machine()); |
| 592 | m_MBC1Mode = data & 0x1; |
| 593 | gb_set_mbc1_banks(machine()); |
| 606 | 594 | } |
| 607 | 595 | |
| 608 | | static WRITE8_HANDLER( gb_mem_mode_select_mbc3 ) |
| 596 | WRITE8_MEMBER(gb_state::gb_mem_mode_select_mbc3) |
| 609 | 597 | { |
| 610 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 611 | | logerror( "0x%04X: Write to mbc3 mem mode select register 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), offset, data ); |
| 612 | | if( state->m_CartType & TIMER ) |
| 598 | logerror( "0x%04X: Write to mbc3 mem mode select register 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), offset, data ); |
| 599 | if( m_CartType & TIMER ) |
| 613 | 600 | { |
| 614 | 601 | /* FIXME: RTC Latch goes here */ |
| 615 | | state->m_MBC3RTCMap[0] = 50; /* Seconds */ |
| 616 | | state->m_MBC3RTCMap[1] = 40; /* Minutes */ |
| 617 | | state->m_MBC3RTCMap[2] = 15; /* Hours */ |
| 618 | | state->m_MBC3RTCMap[3] = 25; /* Day counter lowest 8 bits */ |
| 619 | | state->m_MBC3RTCMap[4] = 0x01; /* Day counter upper bit, timer off, no day overflow occurred (bit7) */ |
| 602 | m_MBC3RTCMap[0] = 50; /* Seconds */ |
| 603 | m_MBC3RTCMap[1] = 40; /* Minutes */ |
| 604 | m_MBC3RTCMap[2] = 15; /* Hours */ |
| 605 | m_MBC3RTCMap[3] = 25; /* Day counter lowest 8 bits */ |
| 606 | m_MBC3RTCMap[4] = 0x01; /* Day counter upper bit, timer off, no day overflow occurred (bit7) */ |
| 620 | 607 | } |
| 621 | 608 | } |
| 622 | 609 | |
| 623 | | static WRITE8_HANDLER( gb_ram_tama5 ) |
| 610 | WRITE8_MEMBER(gb_state::gb_ram_tama5) |
| 624 | 611 | { |
| 625 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 626 | | logerror( "0x%04X: TAMA5 write 0x%04X <- 0x%02X\n", cpu_get_pc( &space->device() ), 0xA000 + offset, data ); |
| 612 | logerror( "0x%04X: TAMA5 write 0x%04X <- 0x%02X\n", cpu_get_pc( &space.device() ), 0xA000 + offset, data ); |
| 627 | 613 | switch( offset & 0x0001 ) |
| 628 | 614 | { |
| 629 | 615 | case 0x0000: /* Write to data register */ |
| 630 | | switch( state->m_gbLastTama5Command ) |
| 616 | switch( m_gbLastTama5Command ) |
| 631 | 617 | { |
| 632 | 618 | case 0x00: /* Bits 0-3 for rom bank selection */ |
| 633 | | state->m_ROMBank = ( state->m_ROMBank & 0xF0 ) | ( data & 0x0F ); |
| 634 | | gb_rom16_4000( space->machine(), state->m_ROMMap[state->m_ROMBank] ); |
| 619 | m_ROMBank = ( m_ROMBank & 0xF0 ) | ( data & 0x0F ); |
| 620 | gb_rom16_4000( machine(), m_ROMMap[m_ROMBank] ); |
| 635 | 621 | break; |
| 636 | 622 | case 0x01: /* Bit 4(-7?) for rom bank selection */ |
| 637 | | state->m_ROMBank = ( state->m_ROMBank & 0x0F ) | ( ( data & 0x0F ) << 4 ); |
| 638 | | gb_rom16_4000( space->machine(), state->m_ROMMap[state->m_ROMBank] ); |
| 623 | m_ROMBank = ( m_ROMBank & 0x0F ) | ( ( data & 0x0F ) << 4 ); |
| 624 | gb_rom16_4000( machine(), m_ROMMap[m_ROMBank] ); |
| 639 | 625 | break; |
| 640 | 626 | case 0x04: /* Data to write lo */ |
| 641 | | state->m_gbTama5Byte = ( state->m_gbTama5Byte & 0xF0 ) | ( data & 0x0F ); |
| 627 | m_gbTama5Byte = ( m_gbTama5Byte & 0xF0 ) | ( data & 0x0F ); |
| 642 | 628 | break; |
| 643 | 629 | case 0x05: /* Data to write hi */ |
| 644 | | state->m_gbTama5Byte = ( state->m_gbTama5Byte & 0x0F ) | ( ( data & 0x0F ) << 4 ); |
| 630 | m_gbTama5Byte = ( m_gbTama5Byte & 0x0F ) | ( ( data & 0x0F ) << 4 ); |
| 645 | 631 | break; |
| 646 | 632 | case 0x06: /* Address selection hi */ |
| 647 | | state->m_gbTama5Address = ( state->m_gbTama5Address & 0x0F ) | ( ( data & 0x0F ) << 4 ); |
| 633 | m_gbTama5Address = ( m_gbTama5Address & 0x0F ) | ( ( data & 0x0F ) << 4 ); |
| 648 | 634 | break; |
| 649 | 635 | case 0x07: /* Address selection lo */ |
| 650 | 636 | /* This address always seems to written last, so we'll just |
| 651 | 637 | execute the command here */ |
| 652 | | state->m_gbTama5Address = ( state->m_gbTama5Address & 0xF0 ) | ( data & 0x0F ); |
| 653 | | switch ( state->m_gbTama5Address & 0xE0 ) |
| 638 | m_gbTama5Address = ( m_gbTama5Address & 0xF0 ) | ( data & 0x0F ); |
| 639 | switch ( m_gbTama5Address & 0xE0 ) |
| 654 | 640 | { |
| 655 | 641 | case 0x00: /* Write memory */ |
| 656 | | logerror( "Write tama5 memory 0x%02X <- 0x%02X\n", state->m_gbTama5Address & 0x1F, state->m_gbTama5Byte ); |
| 657 | | state->m_gbTama5Memory[ state->m_gbTama5Address & 0x1F ] = state->m_gbTama5Byte; |
| 642 | logerror( "Write tama5 memory 0x%02X <- 0x%02X\n", m_gbTama5Address & 0x1F, m_gbTama5Byte ); |
| 643 | m_gbTama5Memory[ m_gbTama5Address & 0x1F ] = m_gbTama5Byte; |
| 658 | 644 | break; |
| 659 | 645 | case 0x20: /* Read memory */ |
| 660 | | logerror( "Read tama5 memory 0x%02X\n", state->m_gbTama5Address & 0x1F ); |
| 661 | | state->m_gbTama5Byte = state->m_gbTama5Memory[ state->m_gbTama5Address & 0x1F ]; |
| 646 | logerror( "Read tama5 memory 0x%02X\n", m_gbTama5Address & 0x1F ); |
| 647 | m_gbTama5Byte = m_gbTama5Memory[ m_gbTama5Address & 0x1F ]; |
| 662 | 648 | break; |
| 663 | 649 | case 0x40: /* Unknown, some kind of read */ |
| 664 | | if ( ( state->m_gbTama5Address & 0x1F ) == 0x12 ) |
| 650 | if ( ( m_gbTama5Address & 0x1F ) == 0x12 ) |
| 665 | 651 | { |
| 666 | | state->m_gbTama5Byte = 0xFF; |
| 652 | m_gbTama5Byte = 0xFF; |
| 667 | 653 | } |
| 668 | 654 | case 0x80: /* Unknown, some kind of read (when 07=01)/write (when 07=00/02) */ |
| 669 | 655 | default: |
| 670 | | logerror( "0x%04X: Unknown addressing mode\n", cpu_get_pc( &space->device() ) ); |
| 656 | logerror( "0x%04X: Unknown addressing mode\n", cpu_get_pc( &space.device() ) ); |
| 671 | 657 | break; |
| 672 | 658 | } |
| 673 | 659 | break; |
| r14963 | r14964 | |
| 684 | 670 | case 0x07: /* Address register lo */ |
| 685 | 671 | break; |
| 686 | 672 | case 0x0A: /* Are we ready for the next command? */ |
| 687 | | state->m_MBC3RTCData[0] = 0x01; |
| 688 | | memory_set_bankptr( space->machine(), "bank2", state->m_MBC3RTCData ); |
| 673 | m_MBC3RTCData[0] = 0x01; |
| 674 | memory_set_bankptr( machine(), "bank2", m_MBC3RTCData ); |
| 689 | 675 | break; |
| 690 | 676 | case 0x0C: /* Data read register lo */ |
| 691 | | state->m_MBC3RTCData[0] = state->m_gbTama5Byte & 0x0F; |
| 677 | m_MBC3RTCData[0] = m_gbTama5Byte & 0x0F; |
| 692 | 678 | break; |
| 693 | 679 | case 0x0D: /* Data read register hi */ |
| 694 | | state->m_MBC3RTCData[0] = ( state->m_gbTama5Byte & 0xF0 ) >> 4; |
| 680 | m_MBC3RTCData[0] = ( m_gbTama5Byte & 0xF0 ) >> 4; |
| 695 | 681 | break; |
| 696 | 682 | default: |
| 697 | | logerror( "0x%04X: Unknown tama5 command 0x%02X\n", cpu_get_pc( &space->device() ), data ); |
| 683 | logerror( "0x%04X: Unknown tama5 command 0x%02X\n", cpu_get_pc( &space.device() ), data ); |
| 698 | 684 | break; |
| 699 | 685 | } |
| 700 | | state->m_gbLastTama5Command = data; |
| 686 | m_gbLastTama5Command = data; |
| 701 | 687 | break; |
| 702 | 688 | } |
| 703 | 689 | } |
| r14963 | r14964 | |
| 705 | 691 | /* This mmm01 implementation is mostly guess work, no clue how correct it all is */ |
| 706 | 692 | |
| 707 | 693 | |
| 708 | | static WRITE8_HANDLER( gb_rom_bank_mmm01_0000_w ) |
| 694 | WRITE8_MEMBER(gb_state::gb_rom_bank_mmm01_0000_w) |
| 709 | 695 | { |
| 710 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 711 | | logerror( "0x%04X: write 0x%02X to 0x%04X\n", cpu_get_pc( &space->device() ), data, offset+0x000 ); |
| 696 | logerror( "0x%04X: write 0x%02X to 0x%04X\n", cpu_get_pc( &space.device() ), data, offset+0x000 ); |
| 712 | 697 | if ( data & 0x40 ) |
| 713 | 698 | { |
| 714 | | state->m_mmm01_bank_offset = state->m_mmm01_reg1; |
| 715 | | memory_set_bankptr( space->machine(), "bank5", state->m_ROMMap[ state->m_mmm01_bank_offset ] ); |
| 716 | | memory_set_bankptr( space->machine(), "bank10", state->m_ROMMap[ state->m_mmm01_bank_offset ] + 0x0100 ); |
| 717 | | gb_rom16_4000( space->machine(), state->m_ROMMap[ state->m_mmm01_bank_offset + state->m_mmm01_bank ] ); |
| 699 | m_mmm01_bank_offset = m_mmm01_reg1; |
| 700 | memory_set_bankptr( machine(), "bank5", m_ROMMap[ m_mmm01_bank_offset ] ); |
| 701 | memory_set_bankptr( machine(), "bank10", m_ROMMap[ m_mmm01_bank_offset ] + 0x0100 ); |
| 702 | gb_rom16_4000( machine(), m_ROMMap[ m_mmm01_bank_offset + m_mmm01_bank ] ); |
| 718 | 703 | } |
| 719 | 704 | } |
| 720 | 705 | |
| 721 | | static WRITE8_HANDLER( gb_rom_bank_mmm01_2000_w ) |
| 706 | WRITE8_MEMBER(gb_state::gb_rom_bank_mmm01_2000_w) |
| 722 | 707 | { |
| 723 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 724 | | logerror( "0x%04X: write 0x%02X to 0x%04X\n", cpu_get_pc( &space->device() ), data, offset+0x2000 ); |
| 708 | logerror( "0x%04X: write 0x%02X to 0x%04X\n", cpu_get_pc( &space.device() ), data, offset+0x2000 ); |
| 725 | 709 | |
| 726 | | state->m_mmm01_reg1 = data & state->m_ROMMask; |
| 727 | | state->m_mmm01_bank = state->m_mmm01_reg1 & state->m_mmm01_bank_mask; |
| 728 | | if ( state->m_mmm01_bank == 0 ) |
| 710 | m_mmm01_reg1 = data & m_ROMMask; |
| 711 | m_mmm01_bank = m_mmm01_reg1 & m_mmm01_bank_mask; |
| 712 | if ( m_mmm01_bank == 0 ) |
| 729 | 713 | { |
| 730 | | state->m_mmm01_bank = 1; |
| 714 | m_mmm01_bank = 1; |
| 731 | 715 | } |
| 732 | | gb_rom16_4000( space->machine(), state->m_ROMMap[ state->m_mmm01_bank_offset + state->m_mmm01_bank ] ); |
| 716 | gb_rom16_4000( machine(), m_ROMMap[ m_mmm01_bank_offset + m_mmm01_bank ] ); |
| 733 | 717 | } |
| 734 | 718 | |
| 735 | | static WRITE8_HANDLER( gb_rom_bank_mmm01_4000_w ) |
| 719 | WRITE8_MEMBER(gb_state::gb_rom_bank_mmm01_4000_w) |
| 736 | 720 | { |
| 737 | | logerror( "0x%04X: write 0x%02X to 0x%04X\n", cpu_get_pc( &space->device() ), data, offset+0x4000 ); |
| 721 | logerror( "0x%04X: write 0x%02X to 0x%04X\n", cpu_get_pc( &space.device() ), data, offset+0x4000 ); |
| 738 | 722 | } |
| 739 | 723 | |
| 740 | | static WRITE8_HANDLER( gb_rom_bank_mmm01_6000_w ) |
| 724 | WRITE8_MEMBER(gb_state::gb_rom_bank_mmm01_6000_w) |
| 741 | 725 | { |
| 742 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 743 | | logerror( "0x%04X: write 0x%02X to 0x%04X\n", cpu_get_pc( &space->device() ), data, offset+0x6000 ); |
| 726 | logerror( "0x%04X: write 0x%02X to 0x%04X\n", cpu_get_pc( &space.device() ), data, offset+0x6000 ); |
| 744 | 727 | /* Not sure if this is correct, Taito Variety Pack sets these values */ |
| 745 | 728 | /* Momotarou Collection 2 writes 01 and 21 here */ |
| 746 | 729 | switch( data ) |
| 747 | 730 | { |
| 748 | | case 0x30: state->m_mmm01_bank_mask = 0x07; break; |
| 749 | | case 0x38: state->m_mmm01_bank_mask = 0x03; break; |
| 750 | | default: state->m_mmm01_bank_mask = 0xFF; break; |
| 731 | case 0x30: m_mmm01_bank_mask = 0x07; break; |
| 732 | case 0x38: m_mmm01_bank_mask = 0x03; break; |
| 733 | default: m_mmm01_bank_mask = 0xFF; break; |
| 751 | 734 | } |
| 752 | 735 | } |
| 753 | 736 | |
| r14963 | r14964 | |
| 764 | 747 | memory_set_bankptr( machine, "bank2", state->m_RAMMap[ state->m_MBC1Mode ? ( state->m_ROMBank >> 5 ) : 0 ] ); |
| 765 | 748 | } |
| 766 | 749 | |
| 767 | | static WRITE8_HANDLER( gb_rom_bank_select_mbc1_kor ) |
| 750 | WRITE8_MEMBER(gb_state::gb_rom_bank_select_mbc1_kor) |
| 768 | 751 | { |
| 769 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 770 | 752 | data &= 0x0F; /* Only uses lower 5 bits */ |
| 771 | 753 | /* Selecting bank 0 == selecting bank 1 */ |
| 772 | 754 | if( data == 0 ) |
| 773 | 755 | data = 1; |
| 774 | 756 | |
| 775 | | state->m_ROMBank = ( state->m_ROMBank & 0x01F0 ) | data; |
| 757 | m_ROMBank = ( m_ROMBank & 0x01F0 ) | data; |
| 776 | 758 | /* Switch banks */ |
| 777 | | gb_set_mbc1_kor_banks(space->machine()); |
| 759 | gb_set_mbc1_kor_banks(machine()); |
| 778 | 760 | } |
| 779 | 761 | |
| 780 | | static WRITE8_HANDLER( gb_ram_bank_select_mbc1_kor ) |
| 762 | WRITE8_MEMBER(gb_state::gb_ram_bank_select_mbc1_kor) |
| 781 | 763 | { |
| 782 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 783 | 764 | data &= 0x3; /* Only uses the lower 2 bits */ |
| 784 | 765 | |
| 785 | 766 | /* Select the upper bits of the ROMMask */ |
| 786 | | state->m_ROMBank = ( state->m_ROMBank & 0x0F ) | ( data << 4 ); |
| 767 | m_ROMBank = ( m_ROMBank & 0x0F ) | ( data << 4 ); |
| 787 | 768 | |
| 788 | 769 | /* Switch banks */ |
| 789 | | gb_set_mbc1_kor_banks(space->machine()); |
| 770 | gb_set_mbc1_kor_banks(machine()); |
| 790 | 771 | } |
| 791 | 772 | |
| 792 | | static WRITE8_HANDLER( gb_mem_mode_select_mbc1_kor ) |
| 773 | WRITE8_MEMBER(gb_state::gb_mem_mode_select_mbc1_kor) |
| 793 | 774 | { |
| 794 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 795 | | state->m_MBC1Mode = data & 0x1; |
| 796 | | gb_set_mbc1_kor_banks(space->machine()); |
| 775 | m_MBC1Mode = data & 0x1; |
| 776 | gb_set_mbc1_kor_banks(machine()); |
| 797 | 777 | } |
| 798 | 778 | |
| 799 | | WRITE8_HANDLER ( gb_io_w ) |
| 779 | WRITE8_MEMBER(gb_state::gb_io_w) |
| 800 | 780 | { |
| 801 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 802 | 781 | static const UINT8 timer_shifts[4] = {10, 4, 6, 8}; |
| 803 | 782 | |
| 804 | 783 | switch (offset) |
| r14963 | r14964 | |
| 806 | 785 | case 0x00: /* JOYP - Joypad */ |
| 807 | 786 | JOYPAD = 0xCF | data; |
| 808 | 787 | if (!(data & 0x20)) |
| 809 | | JOYPAD &= (input_port_read(space->machine(), "INPUTS") >> 4) | 0xF0; |
| 788 | JOYPAD &= (input_port_read(machine(), "INPUTS") >> 4) | 0xF0; |
| 810 | 789 | if (!(data & 0x10)) |
| 811 | | JOYPAD &= input_port_read(space->machine(), "INPUTS") | 0xF0; |
| 790 | JOYPAD &= input_port_read(machine(), "INPUTS") | 0xF0; |
| 812 | 791 | return; |
| 813 | 792 | case 0x01: /* SB - Serial transfer data */ |
| 814 | 793 | break; |
| r14963 | r14964 | |
| 818 | 797 | case 0x00: |
| 819 | 798 | case 0x01: |
| 820 | 799 | case 0x80: /* enabled & external clock */ |
| 821 | | state->m_SIOCount = 0; |
| 800 | m_SIOCount = 0; |
| 822 | 801 | break; |
| 823 | 802 | case 0x81: /* enabled & internal clock */ |
| 824 | 803 | SIODATA = 0xFF; |
| 825 | | state->m_SIOCount = 8; |
| 826 | | state->m_gb_serial_timer->adjust(space->machine().device<cpu_device>("maincpu")->cycles_to_attotime(512), 0, space->machine().device<cpu_device>("maincpu")->cycles_to_attotime(512)); |
| 827 | | state->m_gb_serial_timer->enable( 1 ); |
| 804 | m_SIOCount = 8; |
| 805 | m_gb_serial_timer->adjust(machine().device<cpu_device>("maincpu")->cycles_to_attotime(512), 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(512)); |
| 806 | m_gb_serial_timer->enable( 1 ); |
| 828 | 807 | break; |
| 829 | 808 | } |
| 830 | 809 | break; |
| 831 | 810 | case 0x04: /* DIV - Divider register */ |
| 832 | 811 | /* Force increment of TIMECNT register */ |
| 833 | | if ( state->m_divcount >= 16 ) |
| 834 | | gb_timer_increment(space->machine()); |
| 835 | | state->m_divcount = 0; |
| 812 | if ( m_divcount >= 16 ) |
| 813 | gb_timer_increment(machine()); |
| 814 | m_divcount = 0; |
| 836 | 815 | return; |
| 837 | 816 | case 0x05: /* TIMA - Timer counter */ |
| 838 | 817 | /* Check if the counter is being reloaded in this cycle */ |
| 839 | | if ( state->m_reloading && ( state->m_divcount & ( state->m_shift_cycles - 1 ) ) == 4 ) |
| 818 | if ( m_reloading && ( m_divcount & ( m_shift_cycles - 1 ) ) == 4 ) |
| 840 | 819 | { |
| 841 | 820 | data = TIMECNT; |
| 842 | 821 | } |
| 843 | 822 | break; |
| 844 | 823 | case 0x06: /* TMA - Timer module */ |
| 845 | 824 | /* Check if the counter is being reloaded in this cycle */ |
| 846 | | if ( state->m_reloading && ( state->m_divcount & ( state->m_shift_cycles - 1 ) ) == 4 ) |
| 825 | if ( m_reloading && ( m_divcount & ( m_shift_cycles - 1 ) ) == 4 ) |
| 847 | 826 | { |
| 848 | 827 | TIMECNT = data; |
| 849 | 828 | } |
| r14963 | r14964 | |
| 854 | 833 | if ( ( ! ( data & 0x04 ) && ( TIMEFRQ & 0x04 ) ) || ( ( data & 0x04 ) && ( TIMEFRQ & 0x04 ) && ( data & 0x03 ) != ( TIMEFRQ & 0x03 ) ) ) |
| 855 | 834 | { |
| 856 | 835 | /* Check if TIMECNT should be incremented */ |
| 857 | | if ( ( state->m_divcount & ( state->m_shift_cycles - 1 ) ) >= ( state->m_shift_cycles >> 1 ) ) |
| 836 | if ( ( m_divcount & ( m_shift_cycles - 1 ) ) >= ( m_shift_cycles >> 1 ) ) |
| 858 | 837 | { |
| 859 | | gb_timer_increment(space->machine()); |
| 838 | gb_timer_increment(machine()); |
| 860 | 839 | } |
| 861 | 840 | } |
| 862 | | state->m_shift = timer_shifts[data & 0x03]; |
| 863 | | state->m_shift_cycles = 1 << state->m_shift; |
| 841 | m_shift = timer_shifts[data & 0x03]; |
| 842 | m_shift_cycles = 1 << m_shift; |
| 864 | 843 | break; |
| 865 | 844 | case 0x0F: /* IF - Interrupt flag */ |
| 866 | 845 | data &= 0x1F; |
| 867 | | space->machine().device<lr35902_cpu_device>(":maincpu")->set_if( data ); |
| 846 | machine().device<lr35902_cpu_device>(":maincpu")->set_if( data ); |
| 868 | 847 | break; |
| 869 | 848 | } |
| 870 | 849 | |
| 871 | | state->m_gb_io[offset] = data; |
| 850 | m_gb_io[offset] = data; |
| 872 | 851 | } |
| 873 | 852 | |
| 874 | | WRITE8_HANDLER ( gb_io2_w ) |
| 853 | WRITE8_MEMBER(gb_state::gb_io2_w) |
| 875 | 854 | { |
| 876 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 877 | 855 | if ( offset == 0x10 ) |
| 878 | 856 | { |
| 879 | 857 | /* disable BIOS ROM */ |
| 880 | | gb_rom16_0000( space->machine(), state->m_ROMMap[state->m_ROMBank00] ); |
| 858 | gb_rom16_0000( machine(), m_ROMMap[m_ROMBank00] ); |
| 881 | 859 | } |
| 882 | 860 | else |
| 883 | 861 | { |
| r14963 | r14964 | |
| 917 | 895 | }; |
| 918 | 896 | #endif |
| 919 | 897 | |
| 920 | | WRITE8_HANDLER ( sgb_io_w ) |
| 898 | WRITE8_MEMBER(gb_state::sgb_io_w) |
| 921 | 899 | { |
| 922 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 923 | | UINT8 *sgb_data = state->m_sgb_data; |
| 900 | UINT8 *sgb_data = m_sgb_data; |
| 924 | 901 | |
| 925 | 902 | switch( offset ) |
| 926 | 903 | { |
| r14963 | r14964 | |
| 928 | 905 | switch (data & 0x30) |
| 929 | 906 | { |
| 930 | 907 | case 0x00: /* start condition */ |
| 931 | | if (state->m_sgb_start) |
| 908 | if (m_sgb_start) |
| 932 | 909 | logerror("SGB: Start condition before end of transfer ??\n"); |
| 933 | | state->m_sgb_bitcount = 0; |
| 934 | | state->m_sgb_start = 1; |
| 935 | | state->m_sgb_rest = 0; |
| 936 | | JOYPAD = 0x0F & ((input_port_read(space->machine(), "INPUTS") >> 4) | input_port_read(space->machine(), "INPUTS") | 0xF0); |
| 910 | m_sgb_bitcount = 0; |
| 911 | m_sgb_start = 1; |
| 912 | m_sgb_rest = 0; |
| 913 | JOYPAD = 0x0F & ((input_port_read(machine(), "INPUTS") >> 4) | input_port_read(machine(), "INPUTS") | 0xF0); |
| 937 | 914 | break; |
| 938 | 915 | case 0x10: /* data true */ |
| 939 | | if (state->m_sgb_rest) |
| 916 | if (m_sgb_rest) |
| 940 | 917 | { |
| 941 | 918 | /* We should test for this case , but the code below won't |
| 942 | 919 | work with the current setup */ |
| 943 | 920 | #if 0 |
| 944 | | if (state->m_sgb_bytecount == 16) |
| 921 | if (m_sgb_bytecount == 16) |
| 945 | 922 | { |
| 946 | 923 | logerror("SGB: end of block is not zero!"); |
| 947 | | state->m_sgb_start = 0; |
| 924 | m_sgb_start = 0; |
| 948 | 925 | } |
| 949 | 926 | #endif |
| 950 | | sgb_data[state->m_sgb_bytecount] >>= 1; |
| 951 | | sgb_data[state->m_sgb_bytecount] |= 0x80; |
| 952 | | state->m_sgb_bitcount++; |
| 953 | | if (state->m_sgb_bitcount == 8) |
| 927 | sgb_data[m_sgb_bytecount] >>= 1; |
| 928 | sgb_data[m_sgb_bytecount] |= 0x80; |
| 929 | m_sgb_bitcount++; |
| 930 | if (m_sgb_bitcount == 8) |
| 954 | 931 | { |
| 955 | | state->m_sgb_bitcount = 0; |
| 956 | | state->m_sgb_bytecount++; |
| 932 | m_sgb_bitcount = 0; |
| 933 | m_sgb_bytecount++; |
| 957 | 934 | } |
| 958 | | state->m_sgb_rest = 0; |
| 935 | m_sgb_rest = 0; |
| 959 | 936 | } |
| 960 | | JOYPAD = 0x1F & ((input_port_read(space->machine(), "INPUTS") >> 4) | 0xF0); |
| 937 | JOYPAD = 0x1F & ((input_port_read(machine(), "INPUTS") >> 4) | 0xF0); |
| 961 | 938 | break; |
| 962 | 939 | case 0x20: /* data false */ |
| 963 | | if (state->m_sgb_rest) |
| 940 | if (m_sgb_rest) |
| 964 | 941 | { |
| 965 | | if( state->m_sgb_bytecount == 16 && state->m_sgb_packets == -1 ) |
| 942 | if( m_sgb_bytecount == 16 && m_sgb_packets == -1 ) |
| 966 | 943 | { |
| 967 | 944 | #ifdef MAME_DEBUG |
| 968 | 945 | logerror("SGB: %s (%02X) pkts: %d data: %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", |
| r14963 | r14964 | |
| 971 | 948 | sgb_data[8], sgb_data[9], sgb_data[10], sgb_data[11], |
| 972 | 949 | sgb_data[12], sgb_data[13], sgb_data[14], sgb_data[15]); |
| 973 | 950 | #endif |
| 974 | | state->m_sgb_packets = sgb_data[0] & 0x07; |
| 975 | | state->m_sgb_start = 0; |
| 951 | m_sgb_packets = sgb_data[0] & 0x07; |
| 952 | m_sgb_start = 0; |
| 976 | 953 | } |
| 977 | | if (state->m_sgb_bytecount == (state->m_sgb_packets << 4) ) |
| 954 | if (m_sgb_bytecount == (m_sgb_packets << 4) ) |
| 978 | 955 | { |
| 979 | 956 | switch( sgb_data[0] >> 3 ) |
| 980 | 957 | { |
| 981 | 958 | case 0x00: /* PAL01 */ |
| 982 | | state->m_sgb_pal[0*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 983 | | state->m_sgb_pal[0*4 + 1] = sgb_data[3] | (sgb_data[4] << 8); |
| 984 | | state->m_sgb_pal[0*4 + 2] = sgb_data[5] | (sgb_data[6] << 8); |
| 985 | | state->m_sgb_pal[0*4 + 3] = sgb_data[7] | (sgb_data[8] << 8); |
| 986 | | state->m_sgb_pal[1*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 987 | | state->m_sgb_pal[1*4 + 1] = sgb_data[9] | (sgb_data[10] << 8); |
| 988 | | state->m_sgb_pal[1*4 + 2] = sgb_data[11] | (sgb_data[12] << 8); |
| 989 | | state->m_sgb_pal[1*4 + 3] = sgb_data[13] | (sgb_data[14] << 8); |
| 959 | m_sgb_pal[0*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 960 | m_sgb_pal[0*4 + 1] = sgb_data[3] | (sgb_data[4] << 8); |
| 961 | m_sgb_pal[0*4 + 2] = sgb_data[5] | (sgb_data[6] << 8); |
| 962 | m_sgb_pal[0*4 + 3] = sgb_data[7] | (sgb_data[8] << 8); |
| 963 | m_sgb_pal[1*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 964 | m_sgb_pal[1*4 + 1] = sgb_data[9] | (sgb_data[10] << 8); |
| 965 | m_sgb_pal[1*4 + 2] = sgb_data[11] | (sgb_data[12] << 8); |
| 966 | m_sgb_pal[1*4 + 3] = sgb_data[13] | (sgb_data[14] << 8); |
| 990 | 967 | break; |
| 991 | 968 | case 0x01: /* PAL23 */ |
| 992 | | state->m_sgb_pal[2*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 993 | | state->m_sgb_pal[2*4 + 1] = sgb_data[3] | (sgb_data[4] << 8); |
| 994 | | state->m_sgb_pal[2*4 + 2] = sgb_data[5] | (sgb_data[6] << 8); |
| 995 | | state->m_sgb_pal[2*4 + 3] = sgb_data[7] | (sgb_data[8] << 8); |
| 996 | | state->m_sgb_pal[3*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 997 | | state->m_sgb_pal[3*4 + 1] = sgb_data[9] | (sgb_data[10] << 8); |
| 998 | | state->m_sgb_pal[3*4 + 2] = sgb_data[11] | (sgb_data[12] << 8); |
| 999 | | state->m_sgb_pal[3*4 + 3] = sgb_data[13] | (sgb_data[14] << 8); |
| 969 | m_sgb_pal[2*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 970 | m_sgb_pal[2*4 + 1] = sgb_data[3] | (sgb_data[4] << 8); |
| 971 | m_sgb_pal[2*4 + 2] = sgb_data[5] | (sgb_data[6] << 8); |
| 972 | m_sgb_pal[2*4 + 3] = sgb_data[7] | (sgb_data[8] << 8); |
| 973 | m_sgb_pal[3*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 974 | m_sgb_pal[3*4 + 1] = sgb_data[9] | (sgb_data[10] << 8); |
| 975 | m_sgb_pal[3*4 + 2] = sgb_data[11] | (sgb_data[12] << 8); |
| 976 | m_sgb_pal[3*4 + 3] = sgb_data[13] | (sgb_data[14] << 8); |
| 1000 | 977 | break; |
| 1001 | 978 | case 0x02: /* PAL03 */ |
| 1002 | | state->m_sgb_pal[0*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 1003 | | state->m_sgb_pal[0*4 + 1] = sgb_data[3] | (sgb_data[4] << 8); |
| 1004 | | state->m_sgb_pal[0*4 + 2] = sgb_data[5] | (sgb_data[6] << 8); |
| 1005 | | state->m_sgb_pal[0*4 + 3] = sgb_data[7] | (sgb_data[8] << 8); |
| 1006 | | state->m_sgb_pal[3*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 1007 | | state->m_sgb_pal[3*4 + 1] = sgb_data[9] | (sgb_data[10] << 8); |
| 1008 | | state->m_sgb_pal[3*4 + 2] = sgb_data[11] | (sgb_data[12] << 8); |
| 1009 | | state->m_sgb_pal[3*4 + 3] = sgb_data[13] | (sgb_data[14] << 8); |
| 979 | m_sgb_pal[0*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 980 | m_sgb_pal[0*4 + 1] = sgb_data[3] | (sgb_data[4] << 8); |
| 981 | m_sgb_pal[0*4 + 2] = sgb_data[5] | (sgb_data[6] << 8); |
| 982 | m_sgb_pal[0*4 + 3] = sgb_data[7] | (sgb_data[8] << 8); |
| 983 | m_sgb_pal[3*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 984 | m_sgb_pal[3*4 + 1] = sgb_data[9] | (sgb_data[10] << 8); |
| 985 | m_sgb_pal[3*4 + 2] = sgb_data[11] | (sgb_data[12] << 8); |
| 986 | m_sgb_pal[3*4 + 3] = sgb_data[13] | (sgb_data[14] << 8); |
| 1010 | 987 | break; |
| 1011 | 988 | case 0x03: /* PAL12 */ |
| 1012 | | state->m_sgb_pal[1*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 1013 | | state->m_sgb_pal[1*4 + 1] = sgb_data[3] | (sgb_data[4] << 8); |
| 1014 | | state->m_sgb_pal[1*4 + 2] = sgb_data[5] | (sgb_data[6] << 8); |
| 1015 | | state->m_sgb_pal[1*4 + 3] = sgb_data[7] | (sgb_data[8] << 8); |
| 1016 | | state->m_sgb_pal[2*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 1017 | | state->m_sgb_pal[2*4 + 1] = sgb_data[9] | (sgb_data[10] << 8); |
| 1018 | | state->m_sgb_pal[2*4 + 2] = sgb_data[11] | (sgb_data[12] << 8); |
| 1019 | | state->m_sgb_pal[2*4 + 3] = sgb_data[13] | (sgb_data[14] << 8); |
| 989 | m_sgb_pal[1*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 990 | m_sgb_pal[1*4 + 1] = sgb_data[3] | (sgb_data[4] << 8); |
| 991 | m_sgb_pal[1*4 + 2] = sgb_data[5] | (sgb_data[6] << 8); |
| 992 | m_sgb_pal[1*4 + 3] = sgb_data[7] | (sgb_data[8] << 8); |
| 993 | m_sgb_pal[2*4 + 0] = sgb_data[1] | (sgb_data[2] << 8); |
| 994 | m_sgb_pal[2*4 + 1] = sgb_data[9] | (sgb_data[10] << 8); |
| 995 | m_sgb_pal[2*4 + 2] = sgb_data[11] | (sgb_data[12] << 8); |
| 996 | m_sgb_pal[2*4 + 3] = sgb_data[13] | (sgb_data[14] << 8); |
| 1020 | 997 | break; |
| 1021 | 998 | case 0x04: /* ATTR_BLK */ |
| 1022 | 999 | { |
| r14963 | r14964 | |
| 1030 | 1007 | { |
| 1031 | 1008 | for( J = sgb_data[o + 5]; J <= sgb_data[o + 7]; J++ ) |
| 1032 | 1009 | { |
| 1033 | | state->m_sgb_pal_map[I][J] = sgb_data[o + 3] & 0x3; |
| 1010 | m_sgb_pal_map[I][J] = sgb_data[o + 3] & 0x3; |
| 1034 | 1011 | } |
| 1035 | 1012 | } |
| 1036 | 1013 | } |
| r14963 | r14964 | |
| 1048 | 1025 | { |
| 1049 | 1026 | for( J = 0; J < 20; J++ ) |
| 1050 | 1027 | { |
| 1051 | | state->m_sgb_pal_map[J][sgb_data[K + 1] & 0x1f] = (sgb_data[K + 1] & 0x60) >> 5; |
| 1028 | m_sgb_pal_map[J][sgb_data[K + 1] & 0x1f] = (sgb_data[K + 1] & 0x60) >> 5; |
| 1052 | 1029 | } |
| 1053 | 1030 | } |
| 1054 | 1031 | else |
| 1055 | 1032 | { |
| 1056 | 1033 | for( J = 0; J < 18; J++ ) |
| 1057 | 1034 | { |
| 1058 | | state->m_sgb_pal_map[sgb_data[K + 1] & 0x1f][J] = (sgb_data[K + 1] & 0x60) >> 5; |
| 1035 | m_sgb_pal_map[sgb_data[K + 1] & 0x1f][J] = (sgb_data[K + 1] & 0x60) >> 5; |
| 1059 | 1036 | } |
| 1060 | 1037 | } |
| 1061 | 1038 | } |
| r14963 | r14964 | |
| 1070 | 1047 | { |
| 1071 | 1048 | for( J = 0; J < 20; J++ ) |
| 1072 | 1049 | { |
| 1073 | | state->m_sgb_pal_map[J][I] = (sgb_data[1] & 0xC) >> 2; |
| 1050 | m_sgb_pal_map[J][I] = (sgb_data[1] & 0xC) >> 2; |
| 1074 | 1051 | } |
| 1075 | 1052 | } |
| 1076 | 1053 | for( J = 0; J < 20; J++ ) |
| 1077 | 1054 | { |
| 1078 | | state->m_sgb_pal_map[J][sgb_data[2]] = (sgb_data[1] & 0x30) >> 4; |
| 1055 | m_sgb_pal_map[J][sgb_data[2]] = (sgb_data[1] & 0x30) >> 4; |
| 1079 | 1056 | } |
| 1080 | 1057 | for( I = sgb_data[2] + 1; I < 18; I++ ) |
| 1081 | 1058 | { |
| 1082 | 1059 | for( J = 0; J < 20; J++ ) |
| 1083 | 1060 | { |
| 1084 | | state->m_sgb_pal_map[J][I] = sgb_data[1] & 0x3; |
| 1061 | m_sgb_pal_map[J][I] = sgb_data[1] & 0x3; |
| 1085 | 1062 | } |
| 1086 | 1063 | } |
| 1087 | 1064 | } |
| r14963 | r14964 | |
| 1091 | 1068 | { |
| 1092 | 1069 | for( J = 0; J < 18; J++ ) |
| 1093 | 1070 | { |
| 1094 | | state->m_sgb_pal_map[I][J] = (sgb_data[1] & 0xC) >> 2; |
| 1071 | m_sgb_pal_map[I][J] = (sgb_data[1] & 0xC) >> 2; |
| 1095 | 1072 | } |
| 1096 | 1073 | } |
| 1097 | 1074 | for( J = 0; J < 18; J++ ) |
| 1098 | 1075 | { |
| 1099 | | state->m_sgb_pal_map[sgb_data[2]][J] = (sgb_data[1] & 0x30) >> 4; |
| 1076 | m_sgb_pal_map[sgb_data[2]][J] = (sgb_data[1] & 0x30) >> 4; |
| 1100 | 1077 | } |
| 1101 | 1078 | for( I = sgb_data[2] + 1; I < 20; I++ ) |
| 1102 | 1079 | { |
| 1103 | 1080 | for( J = 0; J < 18; J++ ) |
| 1104 | 1081 | { |
| 1105 | | state->m_sgb_pal_map[I][J] = sgb_data[1] & 0x3; |
| 1082 | m_sgb_pal_map[I][J] = sgb_data[1] & 0x3; |
| 1106 | 1083 | } |
| 1107 | 1084 | } |
| 1108 | 1085 | } |
| r14963 | r14964 | |
| 1123 | 1100 | { |
| 1124 | 1101 | for( I = 6; I < sets; I++ ) |
| 1125 | 1102 | { |
| 1126 | | state->m_sgb_pal_map[x][y++] = (sgb_data[I] & 0xC0) >> 6; |
| 1103 | m_sgb_pal_map[x][y++] = (sgb_data[I] & 0xC0) >> 6; |
| 1127 | 1104 | if( y > 17 ) |
| 1128 | 1105 | { |
| 1129 | 1106 | y = 0; |
| r14963 | r14964 | |
| 1132 | 1109 | x = 0; |
| 1133 | 1110 | } |
| 1134 | 1111 | |
| 1135 | | state->m_sgb_pal_map[x][y++] = (sgb_data[I] & 0x30) >> 4; |
| 1112 | m_sgb_pal_map[x][y++] = (sgb_data[I] & 0x30) >> 4; |
| 1136 | 1113 | if( y > 17 ) |
| 1137 | 1114 | { |
| 1138 | 1115 | y = 0; |
| r14963 | r14964 | |
| 1141 | 1118 | x = 0; |
| 1142 | 1119 | } |
| 1143 | 1120 | |
| 1144 | | state->m_sgb_pal_map[x][y++] = (sgb_data[I] & 0xC) >> 2; |
| 1121 | m_sgb_pal_map[x][y++] = (sgb_data[I] & 0xC) >> 2; |
| 1145 | 1122 | if( y > 17 ) |
| 1146 | 1123 | { |
| 1147 | 1124 | y = 0; |
| r14963 | r14964 | |
| 1150 | 1127 | x = 0; |
| 1151 | 1128 | } |
| 1152 | 1129 | |
| 1153 | | state->m_sgb_pal_map[x][y++] = sgb_data[I] & 0x3; |
| 1130 | m_sgb_pal_map[x][y++] = sgb_data[I] & 0x3; |
| 1154 | 1131 | if( y > 17 ) |
| 1155 | 1132 | { |
| 1156 | 1133 | y = 0; |
| r14963 | r14964 | |
| 1164 | 1141 | { |
| 1165 | 1142 | for( I = 6; I < sets; I++ ) |
| 1166 | 1143 | { |
| 1167 | | state->m_sgb_pal_map[x++][y] = (sgb_data[I] & 0xC0) >> 6; |
| 1144 | m_sgb_pal_map[x++][y] = (sgb_data[I] & 0xC0) >> 6; |
| 1168 | 1145 | if( x > 19 ) |
| 1169 | 1146 | { |
| 1170 | 1147 | x = 0; |
| r14963 | r14964 | |
| 1173 | 1150 | y = 0; |
| 1174 | 1151 | } |
| 1175 | 1152 | |
| 1176 | | state->m_sgb_pal_map[x++][y] = (sgb_data[I] & 0x30) >> 4; |
| 1153 | m_sgb_pal_map[x++][y] = (sgb_data[I] & 0x30) >> 4; |
| 1177 | 1154 | if( x > 19 ) |
| 1178 | 1155 | { |
| 1179 | 1156 | x = 0; |
| r14963 | r14964 | |
| 1182 | 1159 | y = 0; |
| 1183 | 1160 | } |
| 1184 | 1161 | |
| 1185 | | state->m_sgb_pal_map[x++][y] = (sgb_data[I] & 0xC) >> 2; |
| 1162 | m_sgb_pal_map[x++][y] = (sgb_data[I] & 0xC) >> 2; |
| 1186 | 1163 | if( x > 19 ) |
| 1187 | 1164 | { |
| 1188 | 1165 | x = 0; |
| r14963 | r14964 | |
| 1191 | 1168 | y = 0; |
| 1192 | 1169 | } |
| 1193 | 1170 | |
| 1194 | | state->m_sgb_pal_map[x++][y] = sgb_data[I] & 0x3; |
| 1171 | m_sgb_pal_map[x++][y] = sgb_data[I] & 0x3; |
| 1195 | 1172 | if( x > 19 ) |
| 1196 | 1173 | { |
| 1197 | 1174 | x = 0; |
| r14963 | r14964 | |
| 1218 | 1195 | |
| 1219 | 1196 | /* Palette 0 */ |
| 1220 | 1197 | index_ = (UINT16)(sgb_data[1] | (sgb_data[2] << 8)) * 4; |
| 1221 | | state->m_sgb_pal[0] = state->m_sgb_pal_data[index_]; |
| 1222 | | state->m_sgb_pal[1] = state->m_sgb_pal_data[index_ + 1]; |
| 1223 | | state->m_sgb_pal[2] = state->m_sgb_pal_data[index_ + 2]; |
| 1224 | | state->m_sgb_pal[3] = state->m_sgb_pal_data[index_ + 3]; |
| 1198 | m_sgb_pal[0] = m_sgb_pal_data[index_]; |
| 1199 | m_sgb_pal[1] = m_sgb_pal_data[index_ + 1]; |
| 1200 | m_sgb_pal[2] = m_sgb_pal_data[index_ + 2]; |
| 1201 | m_sgb_pal[3] = m_sgb_pal_data[index_ + 3]; |
| 1225 | 1202 | /* Palette 1 */ |
| 1226 | 1203 | index_ = (UINT16)(sgb_data[3] | (sgb_data[4] << 8)) * 4; |
| 1227 | | state->m_sgb_pal[4] = state->m_sgb_pal_data[index_]; |
| 1228 | | state->m_sgb_pal[5] = state->m_sgb_pal_data[index_ + 1]; |
| 1229 | | state->m_sgb_pal[6] = state->m_sgb_pal_data[index_ + 2]; |
| 1230 | | state->m_sgb_pal[7] = state->m_sgb_pal_data[index_ + 3]; |
| 1204 | m_sgb_pal[4] = m_sgb_pal_data[index_]; |
| 1205 | m_sgb_pal[5] = m_sgb_pal_data[index_ + 1]; |
| 1206 | m_sgb_pal[6] = m_sgb_pal_data[index_ + 2]; |
| 1207 | m_sgb_pal[7] = m_sgb_pal_data[index_ + 3]; |
| 1231 | 1208 | /* Palette 2 */ |
| 1232 | 1209 | index_ = (UINT16)(sgb_data[5] | (sgb_data[6] << 8)) * 4; |
| 1233 | | state->m_sgb_pal[8] = state->m_sgb_pal_data[index_]; |
| 1234 | | state->m_sgb_pal[9] = state->m_sgb_pal_data[index_ + 1]; |
| 1235 | | state->m_sgb_pal[10] = state->m_sgb_pal_data[index_ + 2]; |
| 1236 | | state->m_sgb_pal[11] = state->m_sgb_pal_data[index_ + 3]; |
| 1210 | m_sgb_pal[8] = m_sgb_pal_data[index_]; |
| 1211 | m_sgb_pal[9] = m_sgb_pal_data[index_ + 1]; |
| 1212 | m_sgb_pal[10] = m_sgb_pal_data[index_ + 2]; |
| 1213 | m_sgb_pal[11] = m_sgb_pal_data[index_ + 3]; |
| 1237 | 1214 | /* Palette 3 */ |
| 1238 | 1215 | index_ = (UINT16)(sgb_data[7] | (sgb_data[8] << 8)) * 4; |
| 1239 | | state->m_sgb_pal[12] = state->m_sgb_pal_data[index_]; |
| 1240 | | state->m_sgb_pal[13] = state->m_sgb_pal_data[index_ + 1]; |
| 1241 | | state->m_sgb_pal[14] = state->m_sgb_pal_data[index_ + 2]; |
| 1242 | | state->m_sgb_pal[15] = state->m_sgb_pal_data[index_ + 3]; |
| 1216 | m_sgb_pal[12] = m_sgb_pal_data[index_]; |
| 1217 | m_sgb_pal[13] = m_sgb_pal_data[index_ + 1]; |
| 1218 | m_sgb_pal[14] = m_sgb_pal_data[index_ + 2]; |
| 1219 | m_sgb_pal[15] = m_sgb_pal_data[index_ + 3]; |
| 1243 | 1220 | /* Attribute File */ |
| 1244 | 1221 | if( sgb_data[9] & 0x40 ) |
| 1245 | | state->m_sgb_window_mask = 0; |
| 1246 | | state->m_sgb_atf = (sgb_data[9] & 0x3f) * (18 * 5); |
| 1222 | m_sgb_window_mask = 0; |
| 1223 | m_sgb_atf = (sgb_data[9] & 0x3f) * (18 * 5); |
| 1247 | 1224 | if( sgb_data[9] & 0x80 ) |
| 1248 | 1225 | { |
| 1249 | 1226 | for( J = 0; J < 18; J++ ) |
| 1250 | 1227 | { |
| 1251 | 1228 | for( I = 0; I < 5; I++ ) |
| 1252 | 1229 | { |
| 1253 | | state->m_sgb_pal_map[I * 4][J] = (state->m_sgb_atf_data[(J * 5) + state->m_sgb_atf + I] & 0xC0) >> 6; |
| 1254 | | state->m_sgb_pal_map[(I * 4) + 1][J] = (state->m_sgb_atf_data[(J * 5) + state->m_sgb_atf + I] & 0x30) >> 4; |
| 1255 | | state->m_sgb_pal_map[(I * 4) + 2][J] = (state->m_sgb_atf_data[(J * 5) + state->m_sgb_atf + I] & 0xC) >> 2; |
| 1256 | | state->m_sgb_pal_map[(I * 4) + 3][J] = state->m_sgb_atf_data[(J * 5) + state->m_sgb_atf + I] & 0x3; |
| 1230 | m_sgb_pal_map[I * 4][J] = (m_sgb_atf_data[(J * 5) + m_sgb_atf + I] & 0xC0) >> 6; |
| 1231 | m_sgb_pal_map[(I * 4) + 1][J] = (m_sgb_atf_data[(J * 5) + m_sgb_atf + I] & 0x30) >> 4; |
| 1232 | m_sgb_pal_map[(I * 4) + 2][J] = (m_sgb_atf_data[(J * 5) + m_sgb_atf + I] & 0xC) >> 2; |
| 1233 | m_sgb_pal_map[(I * 4) + 3][J] = m_sgb_atf_data[(J * 5) + m_sgb_atf + I] & 0x3; |
| 1257 | 1234 | } |
| 1258 | 1235 | } |
| 1259 | 1236 | } |
| r14963 | r14964 | |
| 1261 | 1238 | break; |
| 1262 | 1239 | case 0x0B: /* PAL_TRN */ |
| 1263 | 1240 | { |
| 1264 | | UINT8 *gb_vram = gb_get_vram_ptr(space->machine()); |
| 1241 | UINT8 *gb_vram = gb_get_vram_ptr(machine()); |
| 1265 | 1242 | UINT16 I, col; |
| 1266 | 1243 | |
| 1267 | 1244 | for( I = 0; I < 2048; I++ ) |
| 1268 | 1245 | { |
| 1269 | 1246 | col = ( gb_vram[ 0x0800 + (I*2) + 1 ] << 8 ) | gb_vram[ 0x0800 + (I*2) ]; |
| 1270 | | state->m_sgb_pal_data[I] = col; |
| 1247 | m_sgb_pal_data[I] = col; |
| 1271 | 1248 | } |
| 1272 | 1249 | } |
| 1273 | 1250 | break; |
| r14963 | r14964 | |
| 1288 | 1265 | break; |
| 1289 | 1266 | case 0x11: /* MLT_REQ - Multi controller request */ |
| 1290 | 1267 | if (sgb_data[1] == 0x00) |
| 1291 | | state->m_sgb_controller_mode = 0; |
| 1268 | m_sgb_controller_mode = 0; |
| 1292 | 1269 | else if (sgb_data[1] == 0x01) |
| 1293 | | state->m_sgb_controller_mode = 2; |
| 1270 | m_sgb_controller_mode = 2; |
| 1294 | 1271 | break; |
| 1295 | 1272 | case 0x12: /* JUMP */ |
| 1296 | 1273 | /* Not Implemented */ |
| 1297 | 1274 | break; |
| 1298 | 1275 | case 0x13: /* CHR_TRN */ |
| 1299 | 1276 | if( sgb_data[1] & 0x1 ) |
| 1300 | | memcpy( state->m_sgb_tile_data + 4096, gb_get_vram_ptr(space->machine()) + 0x0800, 4096 ); |
| 1277 | memcpy( m_sgb_tile_data + 4096, gb_get_vram_ptr(machine()) + 0x0800, 4096 ); |
| 1301 | 1278 | else |
| 1302 | | memcpy( state->m_sgb_tile_data, gb_get_vram_ptr(space->machine()) + 0x0800, 4096 ); |
| 1279 | memcpy( m_sgb_tile_data, gb_get_vram_ptr(machine()) + 0x0800, 4096 ); |
| 1303 | 1280 | break; |
| 1304 | 1281 | case 0x14: /* PCT_TRN */ |
| 1305 | 1282 | { |
| 1306 | 1283 | int I; |
| 1307 | 1284 | UINT16 col; |
| 1308 | | UINT8 *gb_vram = gb_get_vram_ptr(space->machine()); |
| 1309 | | if( state->m_sgb_hack ) |
| 1285 | UINT8 *gb_vram = gb_get_vram_ptr(machine()); |
| 1286 | if( m_sgb_hack ) |
| 1310 | 1287 | { |
| 1311 | | memcpy( state->m_sgb_tile_map, gb_vram + 0x1000, 2048 ); |
| 1288 | memcpy( m_sgb_tile_map, gb_vram + 0x1000, 2048 ); |
| 1312 | 1289 | for( I = 0; I < 64; I++ ) |
| 1313 | 1290 | { |
| 1314 | 1291 | col = ( gb_vram[ 0x0800 + (I*2) + 1 ] << 8 ) | gb_vram[ 0x0800 + (I*2) ]; |
| 1315 | | state->m_sgb_pal[SGB_BORDER_PAL_OFFSET + I] = col; |
| 1292 | m_sgb_pal[SGB_BORDER_PAL_OFFSET + I] = col; |
| 1316 | 1293 | } |
| 1317 | 1294 | } |
| 1318 | 1295 | else /* Do things normally */ |
| 1319 | 1296 | { |
| 1320 | | memcpy( state->m_sgb_tile_map, gb_vram + 0x0800, 2048 ); |
| 1297 | memcpy( m_sgb_tile_map, gb_vram + 0x0800, 2048 ); |
| 1321 | 1298 | for( I = 0; I < 64; I++ ) |
| 1322 | 1299 | { |
| 1323 | 1300 | col = ( gb_vram[ 0x1000 + (I*2) + 1 ] << 8 ) | gb_vram[ 0x1000 + (I*2) ]; |
| 1324 | | state->m_sgb_pal[SGB_BORDER_PAL_OFFSET + I] = col; |
| 1301 | m_sgb_pal[SGB_BORDER_PAL_OFFSET + I] = col; |
| 1325 | 1302 | } |
| 1326 | 1303 | } |
| 1327 | 1304 | } |
| 1328 | 1305 | break; |
| 1329 | 1306 | case 0x15: /* ATTR_TRN */ |
| 1330 | | memcpy( state->m_sgb_atf_data, gb_get_vram_ptr(space->machine()) + 0x0800, 4050 ); |
| 1307 | memcpy( m_sgb_atf_data, gb_get_vram_ptr(machine()) + 0x0800, 4050 ); |
| 1331 | 1308 | break; |
| 1332 | 1309 | case 0x16: /* ATTR_SET */ |
| 1333 | 1310 | { |
| r14963 | r14964 | |
| 1335 | 1312 | |
| 1336 | 1313 | /* Attribute File */ |
| 1337 | 1314 | if( sgb_data[1] & 0x40 ) |
| 1338 | | state->m_sgb_window_mask = 0; |
| 1339 | | state->m_sgb_atf = (sgb_data[1] & 0x3f) * (18 * 5); |
| 1315 | m_sgb_window_mask = 0; |
| 1316 | m_sgb_atf = (sgb_data[1] & 0x3f) * (18 * 5); |
| 1340 | 1317 | for( J = 0; J < 18; J++ ) |
| 1341 | 1318 | { |
| 1342 | 1319 | for( I = 0; I < 5; I++ ) |
| 1343 | 1320 | { |
| 1344 | | state->m_sgb_pal_map[I * 4][J] = (state->m_sgb_atf_data[(J * 5) + state->m_sgb_atf + I] & 0xC0) >> 6; |
| 1345 | | state->m_sgb_pal_map[(I * 4) + 1][J] = (state->m_sgb_atf_data[(J * 5) + state->m_sgb_atf + I] & 0x30) >> 4; |
| 1346 | | state->m_sgb_pal_map[(I * 4) + 2][J] = (state->m_sgb_atf_data[(J * 5) + state->m_sgb_atf + I] & 0xC) >> 2; |
| 1347 | | state->m_sgb_pal_map[(I * 4) + 3][J] = state->m_sgb_atf_data[(J * 5) + state->m_sgb_atf + I] & 0x3; |
| 1321 | m_sgb_pal_map[I * 4][J] = (m_sgb_atf_data[(J * 5) + m_sgb_atf + I] & 0xC0) >> 6; |
| 1322 | m_sgb_pal_map[(I * 4) + 1][J] = (m_sgb_atf_data[(J * 5) + m_sgb_atf + I] & 0x30) >> 4; |
| 1323 | m_sgb_pal_map[(I * 4) + 2][J] = (m_sgb_atf_data[(J * 5) + m_sgb_atf + I] & 0xC) >> 2; |
| 1324 | m_sgb_pal_map[(I * 4) + 3][J] = m_sgb_atf_data[(J * 5) + m_sgb_atf + I] & 0x3; |
| 1348 | 1325 | } |
| 1349 | 1326 | } |
| 1350 | 1327 | } |
| 1351 | 1328 | break; |
| 1352 | 1329 | case 0x17: /* MASK_EN */ |
| 1353 | | state->m_sgb_window_mask = sgb_data[1]; |
| 1330 | m_sgb_window_mask = sgb_data[1]; |
| 1354 | 1331 | break; |
| 1355 | 1332 | case 0x18: /* OBJ_TRN */ |
| 1356 | 1333 | /* Not Implemnted */ |
| r14963 | r14964 | |
| 1368 | 1345 | logerror( "SGB: Unknown Command 0x%02x!\n", sgb_data[0] >> 3 ); |
| 1369 | 1346 | } |
| 1370 | 1347 | |
| 1371 | | state->m_sgb_start = 0; |
| 1372 | | state->m_sgb_bytecount = 0; |
| 1373 | | state->m_sgb_packets = -1; |
| 1348 | m_sgb_start = 0; |
| 1349 | m_sgb_bytecount = 0; |
| 1350 | m_sgb_packets = -1; |
| 1374 | 1351 | } |
| 1375 | | if( state->m_sgb_start ) |
| 1352 | if( m_sgb_start ) |
| 1376 | 1353 | { |
| 1377 | | sgb_data[state->m_sgb_bytecount] >>= 1; |
| 1378 | | state->m_sgb_bitcount++; |
| 1379 | | if (state->m_sgb_bitcount == 8) |
| 1354 | sgb_data[m_sgb_bytecount] >>= 1; |
| 1355 | m_sgb_bitcount++; |
| 1356 | if (m_sgb_bitcount == 8) |
| 1380 | 1357 | { |
| 1381 | | state->m_sgb_bitcount = 0; |
| 1382 | | state->m_sgb_bytecount++; |
| 1358 | m_sgb_bitcount = 0; |
| 1359 | m_sgb_bytecount++; |
| 1383 | 1360 | } |
| 1384 | 1361 | } |
| 1385 | | state->m_sgb_rest = 0; |
| 1362 | m_sgb_rest = 0; |
| 1386 | 1363 | } |
| 1387 | | JOYPAD = 0x2F & (input_port_read(space->machine(), "INPUTS") | 0xF0); |
| 1364 | JOYPAD = 0x2F & (input_port_read(machine(), "INPUTS") | 0xF0); |
| 1388 | 1365 | break; |
| 1389 | 1366 | case 0x30: /* rest condition */ |
| 1390 | | if (state->m_sgb_start) |
| 1391 | | state->m_sgb_rest = 1; |
| 1392 | | if (state->m_sgb_controller_mode) |
| 1367 | if (m_sgb_start) |
| 1368 | m_sgb_rest = 1; |
| 1369 | if (m_sgb_controller_mode) |
| 1393 | 1370 | { |
| 1394 | | state->m_sgb_controller_no++; |
| 1395 | | if (state->m_sgb_controller_no == state->m_sgb_controller_mode) |
| 1396 | | state->m_sgb_controller_no = 0; |
| 1397 | | JOYPAD = 0x3F - state->m_sgb_controller_no; |
| 1371 | m_sgb_controller_no++; |
| 1372 | if (m_sgb_controller_no == m_sgb_controller_mode) |
| 1373 | m_sgb_controller_no = 0; |
| 1374 | JOYPAD = 0x3F - m_sgb_controller_no; |
| 1398 | 1375 | } |
| 1399 | 1376 | else |
| 1400 | 1377 | JOYPAD = 0x3F; |
| r14963 | r14964 | |
| 1411 | 1388 | return; |
| 1412 | 1389 | } |
| 1413 | 1390 | |
| 1414 | | state->m_gb_io[offset] = data; |
| 1391 | m_gb_io[offset] = data; |
| 1415 | 1392 | } |
| 1416 | 1393 | |
| 1417 | 1394 | /* Interrupt Enable register */ |
| 1418 | | READ8_HANDLER( gb_ie_r ) |
| 1395 | READ8_MEMBER(gb_state::gb_ie_r) |
| 1419 | 1396 | { |
| 1420 | | return space->machine().device<lr35902_cpu_device>(":maincpu")->get_ie(); |
| 1397 | return machine().device<lr35902_cpu_device>(":maincpu")->get_ie(); |
| 1421 | 1398 | } |
| 1422 | 1399 | |
| 1423 | | WRITE8_HANDLER ( gb_ie_w ) |
| 1400 | WRITE8_MEMBER(gb_state::gb_ie_w) |
| 1424 | 1401 | { |
| 1425 | | space->machine().device<lr35902_cpu_device>(":maincpu")->set_ie( data & 0x1F ); |
| 1402 | machine().device<lr35902_cpu_device>(":maincpu")->set_ie( data & 0x1F ); |
| 1426 | 1403 | } |
| 1427 | 1404 | |
| 1428 | 1405 | /* IO read */ |
| 1429 | | READ8_HANDLER ( gb_io_r ) |
| 1406 | READ8_MEMBER(gb_state::gb_io_r) |
| 1430 | 1407 | { |
| 1431 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 1432 | 1408 | switch(offset) |
| 1433 | 1409 | { |
| 1434 | 1410 | case 0x04: |
| 1435 | | return ( state->m_divcount >> 8 ) & 0xFF; |
| 1411 | return ( m_divcount >> 8 ) & 0xFF; |
| 1436 | 1412 | case 0x00: |
| 1437 | 1413 | case 0x01: |
| 1438 | 1414 | case 0x02: |
| r14963 | r14964 | |
| 1440 | 1416 | case 0x05: |
| 1441 | 1417 | case 0x06: |
| 1442 | 1418 | case 0x07: |
| 1443 | | return state->m_gb_io[offset]; |
| 1419 | return m_gb_io[offset]; |
| 1444 | 1420 | case 0x0F: |
| 1445 | 1421 | /* Make sure the internal states are up to date */ |
| 1446 | | return 0xE0 | space->machine().device<lr35902_cpu_device>(":maincpu")->get_if(); |
| 1422 | return 0xE0 | machine().device<lr35902_cpu_device>(":maincpu")->get_if(); |
| 1447 | 1423 | default: |
| 1448 | 1424 | /* It seems unsupported registers return 0xFF */ |
| 1449 | 1425 | return 0xFF; |
| r14963 | r14964 | |
| 1927 | 1903 | { |
| 1928 | 1904 | gb_state *state = machine.driver_data<gb_state>(); |
| 1929 | 1905 | /* Shift in a received bit */ |
| 1930 | | SIODATA = (SIODATA << 1) | 0x01; |
| 1906 | state->SIODATA = (state->SIODATA << 1) | 0x01; |
| 1931 | 1907 | /* Decrement number of handled bits */ |
| 1932 | 1908 | state->m_SIOCount--; |
| 1933 | 1909 | /* If all bits done, stop timer and trigger interrupt */ |
| 1934 | 1910 | if ( ! state->m_SIOCount ) |
| 1935 | 1911 | { |
| 1936 | | SIOCONT &= 0x7F; |
| 1912 | state->SIOCONT &= 0x7F; |
| 1937 | 1913 | state->m_gb_serial_timer->enable( 0 ); |
| 1938 | 1914 | cputag_set_input_line(machine, "maincpu", SIO_INT, ASSERT_LINE); |
| 1939 | 1915 | } |
| r14963 | r14964 | |
| 1946 | 1922 | if ( state->m_triggering_irq ) |
| 1947 | 1923 | { |
| 1948 | 1924 | state->m_triggering_irq = 0; |
| 1949 | | if ( TIMECNT == 0 ) |
| 1925 | if ( state->TIMECNT == 0 ) |
| 1950 | 1926 | { |
| 1951 | | TIMECNT = TIMEMOD; |
| 1927 | state->TIMECNT = state->TIMEMOD; |
| 1952 | 1928 | cputag_set_input_line(machine, "maincpu", TIM_INT, ASSERT_LINE ); |
| 1953 | 1929 | state->m_reloading = 1; |
| 1954 | 1930 | } |
| r14963 | r14964 | |
| 1960 | 1936 | gb_state *state = machine.driver_data<gb_state>(); |
| 1961 | 1937 | gb_timer_check_irq(machine); |
| 1962 | 1938 | |
| 1963 | | TIMECNT += 1; |
| 1964 | | if ( TIMECNT == 0 ) |
| 1939 | state->TIMECNT += 1; |
| 1940 | if ( state->TIMECNT == 0 ) |
| 1965 | 1941 | { |
| 1966 | 1942 | state->m_triggering_irq = 1; |
| 1967 | 1943 | } |
| r14963 | r14964 | |
| 1975 | 1951 | |
| 1976 | 1952 | gb_timer_check_irq(device->machine()); |
| 1977 | 1953 | |
| 1978 | | if ( TIMEFRQ & 0x04 ) |
| 1954 | if ( state->TIMEFRQ & 0x04 ) |
| 1979 | 1955 | { |
| 1980 | 1956 | UINT16 old_count = old_gb_divcount >> state->m_shift; |
| 1981 | 1957 | UINT16 new_count = state->m_divcount >> state->m_shift; |
| r14963 | r14964 | |
| 1995 | 1971 | } |
| 1996 | 1972 | } |
| 1997 | 1973 | |
| 1998 | | WRITE8_HANDLER ( gbc_io2_w ) |
| 1974 | WRITE8_MEMBER(gb_state::gbc_io2_w) |
| 1999 | 1975 | { |
| 2000 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 2001 | 1976 | switch( offset ) |
| 2002 | 1977 | { |
| 2003 | 1978 | case 0x0D: /* KEY1 - Prepare speed switch */ |
| 2004 | | space->machine().device<lr35902_cpu_device>(":maincpu")->set_speed( data ); |
| 1979 | machine().device<lr35902_cpu_device>(":maincpu")->set_speed( data ); |
| 2005 | 1980 | return; |
| 2006 | 1981 | case 0x10: /* BFF - Bios disable */ |
| 2007 | | gb_rom16_0000( space->machine(), state->m_ROMMap[state->m_ROMBank00] ); |
| 1982 | gb_rom16_0000( machine(), m_ROMMap[m_ROMBank00] ); |
| 2008 | 1983 | return; |
| 2009 | 1984 | case 0x16: /* RP - Infrared port */ |
| 2010 | 1985 | break; |
| 2011 | 1986 | case 0x30: /* SVBK - RAM bank select */ |
| 2012 | | state->m_GBC_RAMBank = data & 0x7; |
| 2013 | | if ( ! state->m_GBC_RAMBank ) |
| 2014 | | state->m_GBC_RAMBank = 1; |
| 2015 | | memory_set_bankptr (space->machine(), "bank3", state->m_GBC_RAMMap[state->m_GBC_RAMBank]); |
| 1987 | m_GBC_RAMBank = data & 0x7; |
| 1988 | if ( ! m_GBC_RAMBank ) |
| 1989 | m_GBC_RAMBank = 1; |
| 1990 | memory_set_bankptr (machine(), "bank3", m_GBC_RAMMap[m_GBC_RAMBank]); |
| 2016 | 1991 | break; |
| 2017 | 1992 | default: |
| 2018 | 1993 | break; |
| r14963 | r14964 | |
| 2020 | 1995 | gbc_video_w( space, offset, data ); |
| 2021 | 1996 | } |
| 2022 | 1997 | |
| 2023 | | READ8_HANDLER( gbc_io2_r ) |
| 1998 | READ8_MEMBER(gb_state::gbc_io2_r) |
| 2024 | 1999 | { |
| 2025 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 2026 | 2000 | switch( offset ) |
| 2027 | 2001 | { |
| 2028 | 2002 | case 0x0D: /* KEY1 */ |
| 2029 | | space->machine().device<lr35902_cpu_device>(":maincpu")->get_speed(); |
| 2003 | machine().device<lr35902_cpu_device>(":maincpu")->get_speed(); |
| 2030 | 2004 | case 0x16: /* RP - Infrared port */ |
| 2031 | 2005 | break; |
| 2032 | 2006 | case 0x30: /* SVBK - RAM bank select */ |
| 2033 | | return state->m_GBC_RAMBank; |
| 2007 | return m_GBC_RAMBank; |
| 2034 | 2008 | default: |
| 2035 | 2009 | break; |
| 2036 | 2010 | } |
| r14963 | r14964 | |
| 2097 | 2071 | |
| 2098 | 2072 | **************/ |
| 2099 | 2073 | |
| 2100 | | READ8_HANDLER( megaduck_video_r ) |
| 2074 | READ8_MEMBER(gb_state::megaduck_video_r) |
| 2101 | 2075 | { |
| 2102 | 2076 | UINT8 data; |
| 2103 | 2077 | |
| r14963 | r14964 | |
| 2111 | 2085 | return BITSWAP8(data,7,0,5,4,6,3,2,1); |
| 2112 | 2086 | } |
| 2113 | 2087 | |
| 2114 | | WRITE8_HANDLER ( megaduck_video_w ) |
| 2088 | WRITE8_MEMBER(gb_state::megaduck_video_w) |
| 2115 | 2089 | { |
| 2116 | 2090 | if ( !offset ) |
| 2117 | 2091 | { |
| r14963 | r14964 | |
| 2128 | 2102 | |
| 2129 | 2103 | static const UINT8 megaduck_sound_offsets[16] = { 0, 2, 1, 3, 4, 6, 5, 7, 8, 9, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }; |
| 2130 | 2104 | |
| 2131 | | WRITE8_HANDLER( megaduck_sound_w1 ) |
| 2105 | WRITE8_MEMBER(gb_state::megaduck_sound_w1) |
| 2132 | 2106 | { |
| 2133 | | gb_sound_w(space->machine().device("custom"), megaduck_sound_offsets[offset], data ); |
| 2107 | gb_sound_w(machine().device("custom"), megaduck_sound_offsets[offset], data ); |
| 2134 | 2108 | } |
| 2135 | 2109 | |
| 2136 | | READ8_HANDLER( megaduck_sound_r1 ) |
| 2110 | READ8_MEMBER(gb_state::megaduck_sound_r1) |
| 2137 | 2111 | { |
| 2138 | | return gb_sound_r( space->machine().device("custom"), megaduck_sound_offsets[offset] ); |
| 2112 | return gb_sound_r( machine().device("custom"), megaduck_sound_offsets[offset] ); |
| 2139 | 2113 | } |
| 2140 | 2114 | |
| 2141 | | WRITE8_HANDLER( megaduck_sound_w2 ) |
| 2115 | WRITE8_MEMBER(gb_state::megaduck_sound_w2) |
| 2142 | 2116 | { |
| 2143 | 2117 | switch(offset) |
| 2144 | 2118 | { |
| 2145 | | case 0x00: gb_sound_w(space->machine().device("custom"), 0x10, data ); break; |
| 2146 | | case 0x01: gb_sound_w(space->machine().device("custom"), 0x12, data ); break; |
| 2147 | | case 0x02: gb_sound_w(space->machine().device("custom"), 0x11, data ); break; |
| 2148 | | case 0x03: gb_sound_w(space->machine().device("custom"), 0x13, data ); break; |
| 2149 | | case 0x04: gb_sound_w(space->machine().device("custom"), 0x14, data ); break; |
| 2150 | | case 0x05: gb_sound_w(space->machine().device("custom"), 0x16, data ); break; |
| 2151 | | case 0x06: gb_sound_w(space->machine().device("custom"), 0x15, data ); break; |
| 2119 | case 0x00: gb_sound_w(machine().device("custom"), 0x10, data ); break; |
| 2120 | case 0x01: gb_sound_w(machine().device("custom"), 0x12, data ); break; |
| 2121 | case 0x02: gb_sound_w(machine().device("custom"), 0x11, data ); break; |
| 2122 | case 0x03: gb_sound_w(machine().device("custom"), 0x13, data ); break; |
| 2123 | case 0x04: gb_sound_w(machine().device("custom"), 0x14, data ); break; |
| 2124 | case 0x05: gb_sound_w(machine().device("custom"), 0x16, data ); break; |
| 2125 | case 0x06: gb_sound_w(machine().device("custom"), 0x15, data ); break; |
| 2152 | 2126 | case 0x07: |
| 2153 | 2127 | case 0x08: |
| 2154 | 2128 | case 0x09: |
| r14963 | r14964 | |
| 2162 | 2136 | } |
| 2163 | 2137 | } |
| 2164 | 2138 | |
| 2165 | | READ8_HANDLER( megaduck_sound_r2 ) |
| 2139 | READ8_MEMBER(gb_state::megaduck_sound_r2) |
| 2166 | 2140 | { |
| 2167 | | return gb_sound_r(space->machine().device("custom"), 0x10 + megaduck_sound_offsets[offset]); |
| 2141 | return gb_sound_r(machine().device("custom"), 0x10 + megaduck_sound_offsets[offset]); |
| 2168 | 2142 | } |
| 2169 | 2143 | |
| 2170 | | WRITE8_HANDLER( megaduck_rom_bank_select_type1 ) |
| 2144 | WRITE8_MEMBER(gb_state::megaduck_rom_bank_select_type1) |
| 2171 | 2145 | { |
| 2172 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 2173 | | if( state->m_ROMMask ) |
| 2146 | if( m_ROMMask ) |
| 2174 | 2147 | { |
| 2175 | | state->m_ROMBank = data & state->m_ROMMask; |
| 2148 | m_ROMBank = data & m_ROMMask; |
| 2176 | 2149 | |
| 2177 | 2150 | /* Switch banks */ |
| 2178 | | memory_set_bankptr (space->machine(), "bank1", state->m_ROMMap[state->m_ROMBank]); |
| 2151 | memory_set_bankptr (machine(), "bank1", m_ROMMap[m_ROMBank]); |
| 2179 | 2152 | } |
| 2180 | 2153 | } |
| 2181 | 2154 | |
| 2182 | | WRITE8_HANDLER( megaduck_rom_bank_select_type2 ) |
| 2155 | WRITE8_MEMBER(gb_state::megaduck_rom_bank_select_type2) |
| 2183 | 2156 | { |
| 2184 | | gb_state *state = space->machine().driver_data<gb_state>(); |
| 2185 | | if( state->m_ROMMask ) |
| 2157 | if( m_ROMMask ) |
| 2186 | 2158 | { |
| 2187 | | state->m_ROMBank = (data << 1) & state->m_ROMMask; |
| 2159 | m_ROMBank = (data << 1) & m_ROMMask; |
| 2188 | 2160 | |
| 2189 | 2161 | /* Switch banks */ |
| 2190 | | memory_set_bankptr( space->machine(), "bank10", state->m_ROMMap[state->m_ROMBank]); |
| 2191 | | memory_set_bankptr( space->machine(), "bank1", state->m_ROMMap[state->m_ROMBank + 1]); |
| 2162 | memory_set_bankptr( machine(), "bank10", m_ROMMap[m_ROMBank]); |
| 2163 | memory_set_bankptr( machine(), "bank1", m_ROMMap[m_ROMBank + 1]); |
| 2192 | 2164 | } |
| 2193 | 2165 | } |
| 2194 | 2166 | |
src/mess/machine/sms.c
| r14963 | r14964 | |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | |
| 236 | | static WRITE8_HANDLER( sms_input_write ) |
| 236 | WRITE8_MEMBER(sms_state::sms_input_write) |
| 237 | 237 | { |
| 238 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 239 | 238 | |
| 240 | 239 | switch (offset) |
| 241 | 240 | { |
| 242 | 241 | case 0: |
| 243 | | switch (input_port_read_safe(space->machine(), "CTRLSEL", 0x00) & 0x0f) |
| 242 | switch (input_port_read_safe(machine(), "CTRLSEL", 0x00) & 0x0f) |
| 244 | 243 | { |
| 245 | 244 | case 0x04: /* Sports Pad */ |
| 246 | | if (data != state->m_sports_pad_last_data_1) |
| 245 | if (data != m_sports_pad_last_data_1) |
| 247 | 246 | { |
| 248 | | UINT32 cpu_cycles = downcast<cpu_device *>(&space->device())->total_cycles(); |
| 247 | UINT32 cpu_cycles = downcast<cpu_device *>(&space.device())->total_cycles(); |
| 249 | 248 | |
| 250 | | state->m_sports_pad_last_data_1 = data; |
| 251 | | if (cpu_cycles - state->m_last_sports_pad_time_1 > 512) |
| 249 | m_sports_pad_last_data_1 = data; |
| 250 | if (cpu_cycles - m_last_sports_pad_time_1 > 512) |
| 252 | 251 | { |
| 253 | | state->m_sports_pad_state_1 = 3; |
| 254 | | state->m_sports_pad_1_x = input_port_read(space->machine(), "SPORT0"); |
| 255 | | state->m_sports_pad_1_y = input_port_read(space->machine(), "SPORT1"); |
| 252 | m_sports_pad_state_1 = 3; |
| 253 | m_sports_pad_1_x = input_port_read(machine(), "SPORT0"); |
| 254 | m_sports_pad_1_y = input_port_read(machine(), "SPORT1"); |
| 256 | 255 | } |
| 257 | | state->m_last_sports_pad_time_1 = cpu_cycles; |
| 258 | | state->m_sports_pad_state_1 = (state->m_sports_pad_state_1 + 1) & 3; |
| 256 | m_last_sports_pad_time_1 = cpu_cycles; |
| 257 | m_sports_pad_state_1 = (m_sports_pad_state_1 + 1) & 3; |
| 259 | 258 | } |
| 260 | 259 | break; |
| 261 | 260 | } |
| 262 | 261 | break; |
| 263 | 262 | |
| 264 | 263 | case 1: |
| 265 | | switch (input_port_read_safe(space->machine(), "CTRLSEL", 0x00) & 0xf0) |
| 264 | switch (input_port_read_safe(machine(), "CTRLSEL", 0x00) & 0xf0) |
| 266 | 265 | { |
| 267 | 266 | case 0x40: /* Sports Pad */ |
| 268 | | if (data != state->m_sports_pad_last_data_2) |
| 267 | if (data != m_sports_pad_last_data_2) |
| 269 | 268 | { |
| 270 | | UINT32 cpu_cycles = downcast<cpu_device *>(&space->device())->total_cycles(); |
| 269 | UINT32 cpu_cycles = downcast<cpu_device *>(&space.device())->total_cycles(); |
| 271 | 270 | |
| 272 | | state->m_sports_pad_last_data_2 = data; |
| 273 | | if (cpu_cycles - state->m_last_sports_pad_time_2 > 2048) |
| 271 | m_sports_pad_last_data_2 = data; |
| 272 | if (cpu_cycles - m_last_sports_pad_time_2 > 2048) |
| 274 | 273 | { |
| 275 | | state->m_sports_pad_state_2 = 3; |
| 276 | | state->m_sports_pad_2_x = input_port_read(space->machine(), "SPORT2"); |
| 277 | | state->m_sports_pad_2_y = input_port_read(space->machine(), "SPORT3"); |
| 274 | m_sports_pad_state_2 = 3; |
| 275 | m_sports_pad_2_x = input_port_read(machine(), "SPORT2"); |
| 276 | m_sports_pad_2_y = input_port_read(machine(), "SPORT3"); |
| 278 | 277 | } |
| 279 | | state->m_last_sports_pad_time_2 = cpu_cycles; |
| 280 | | state->m_sports_pad_state_2 = (state->m_sports_pad_state_2 + 1) & 3; |
| 278 | m_last_sports_pad_time_2 = cpu_cycles; |
| 279 | m_sports_pad_state_2 = (m_sports_pad_state_2 + 1) & 3; |
| 281 | 280 | } |
| 282 | 281 | break; |
| 283 | 282 | } |
| r14963 | r14964 | |
| 700 | 699 | } |
| 701 | 700 | |
| 702 | 701 | |
| 703 | | WRITE8_HANDLER( sms_fm_detect_w ) |
| 702 | WRITE8_MEMBER(sms_state::sms_fm_detect_w) |
| 704 | 703 | { |
| 705 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 706 | 704 | |
| 707 | | if (state->m_has_fm) |
| 708 | | state->m_fm_detect = (data & 0x01); |
| 705 | if (m_has_fm) |
| 706 | m_fm_detect = (data & 0x01); |
| 709 | 707 | } |
| 710 | 708 | |
| 711 | 709 | |
| 712 | | READ8_HANDLER( sms_fm_detect_r ) |
| 710 | READ8_MEMBER(sms_state::sms_fm_detect_r) |
| 713 | 711 | { |
| 714 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 715 | 712 | |
| 716 | | if (state->m_has_fm) |
| 713 | if (m_has_fm) |
| 717 | 714 | { |
| 718 | | return state->m_fm_detect; |
| 715 | return m_fm_detect; |
| 719 | 716 | } |
| 720 | 717 | else |
| 721 | 718 | { |
| 722 | | if (state->m_bios_port & IO_CHIP) |
| 719 | if (m_bios_port & IO_CHIP) |
| 723 | 720 | { |
| 724 | 721 | return 0xff; |
| 725 | 722 | } |
| 726 | 723 | else |
| 727 | 724 | { |
| 728 | | sms_get_inputs(space); |
| 729 | | return state->m_input_port0; |
| 725 | sms_get_inputs(&space); |
| 726 | return m_input_port0; |
| 730 | 727 | } |
| 731 | 728 | } |
| 732 | 729 | } |
| 733 | 730 | |
| 734 | | WRITE8_HANDLER( sms_io_control_w ) |
| 731 | WRITE8_MEMBER(sms_state::sms_io_control_w) |
| 735 | 732 | { |
| 736 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 737 | 733 | bool hcount_latch = false; |
| 738 | 734 | |
| 739 | 735 | if (data & 0x08) |
| 740 | 736 | { |
| 741 | 737 | /* check if TH pin level is high (1) and was low last time */ |
| 742 | | if (data & 0x80 && !(state->m_ctrl_reg & 0x80)) |
| 738 | if (data & 0x80 && !(m_ctrl_reg & 0x80)) |
| 743 | 739 | { |
| 744 | 740 | hcount_latch = true; |
| 745 | 741 | } |
| r14963 | r14964 | |
| 748 | 744 | |
| 749 | 745 | if (data & 0x02) |
| 750 | 746 | { |
| 751 | | if (data & 0x20 && !(state->m_ctrl_reg & 0x20)) |
| 747 | if (data & 0x20 && !(m_ctrl_reg & 0x20)) |
| 752 | 748 | { |
| 753 | 749 | hcount_latch = true; |
| 754 | 750 | } |
| r14963 | r14964 | |
| 757 | 753 | |
| 758 | 754 | if (hcount_latch) |
| 759 | 755 | { |
| 760 | | sms_vdp_hcount_latch(space); |
| 756 | sms_vdp_hcount_latch(&space); |
| 761 | 757 | } |
| 762 | 758 | |
| 763 | | state->m_ctrl_reg = data; |
| 759 | m_ctrl_reg = data; |
| 764 | 760 | } |
| 765 | 761 | |
| 766 | 762 | |
| 767 | | READ8_HANDLER( sms_count_r ) |
| 763 | READ8_MEMBER(sms_state::sms_count_r) |
| 768 | 764 | { |
| 769 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 770 | 765 | |
| 771 | 766 | if (offset & 0x01) |
| 772 | | return state->m_vdp->hcount_latch_read(*state->m_space, offset); |
| 767 | return m_vdp->hcount_latch_read(*m_space, offset); |
| 773 | 768 | else |
| 774 | | return state->m_vdp->vcount_read(*state->m_space, offset); |
| 769 | return m_vdp->vcount_read(*m_space, offset); |
| 775 | 770 | } |
| 776 | 771 | |
| 777 | 772 | |
| r14963 | r14964 | |
| 804 | 799 | driver_state->m_lphaser_2_latch = 0; |
| 805 | 800 | } |
| 806 | 801 | |
| 807 | | READ8_HANDLER( sms_input_port_0_r ) |
| 802 | READ8_MEMBER(sms_state::sms_input_port_0_r) |
| 808 | 803 | { |
| 809 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 810 | 804 | |
| 811 | | if (state->m_bios_port & IO_CHIP) |
| 805 | if (m_bios_port & IO_CHIP) |
| 812 | 806 | { |
| 813 | 807 | return 0xff; |
| 814 | 808 | } |
| 815 | 809 | else |
| 816 | 810 | { |
| 817 | | sms_get_inputs(space); |
| 818 | | return state->m_input_port0; |
| 811 | sms_get_inputs(&space); |
| 812 | return m_input_port0; |
| 819 | 813 | } |
| 820 | 814 | } |
| 821 | 815 | |
| 822 | 816 | |
| 823 | | READ8_HANDLER( sms_input_port_1_r ) |
| 817 | READ8_MEMBER(sms_state::sms_input_port_1_r) |
| 824 | 818 | { |
| 825 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 826 | 819 | |
| 827 | | if (state->m_bios_port & IO_CHIP) |
| 820 | if (m_bios_port & IO_CHIP) |
| 828 | 821 | return 0xff; |
| 829 | 822 | |
| 830 | | sms_get_inputs(space); |
| 823 | sms_get_inputs(&space); |
| 831 | 824 | |
| 832 | 825 | /* Reset Button */ |
| 833 | | state->m_input_port1 = (state->m_input_port1 & 0xef) | (input_port_read_safe(space->machine(), "RESET", 0x01) & 0x01) << 4; |
| 826 | m_input_port1 = (m_input_port1 & 0xef) | (input_port_read_safe(machine(), "RESET", 0x01) & 0x01) << 4; |
| 834 | 827 | |
| 835 | 828 | /* Do region detection if TH of ports A and B are set to output (0) */ |
| 836 | | if (!(state->m_ctrl_reg & 0x0a)) |
| 829 | if (!(m_ctrl_reg & 0x0a)) |
| 837 | 830 | { |
| 838 | 831 | /* Move bits 7,5 of IO control port into bits 7, 6 */ |
| 839 | | state->m_input_port1 = (state->m_input_port1 & 0x3f) | (state->m_ctrl_reg & 0x80) | (state->m_ctrl_reg & 0x20) << 1; |
| 832 | m_input_port1 = (m_input_port1 & 0x3f) | (m_ctrl_reg & 0x80) | (m_ctrl_reg & 0x20) << 1; |
| 840 | 833 | |
| 841 | 834 | /* Inverse region detect value for Japanese machines */ |
| 842 | | if (state->m_is_region_japan) |
| 843 | | state->m_input_port1 ^= 0xc0; |
| 835 | if (m_is_region_japan) |
| 836 | m_input_port1 ^= 0xc0; |
| 844 | 837 | } |
| 845 | 838 | else |
| 846 | 839 | { |
| 847 | | if (state->m_ctrl_reg & 0x02 && state->m_lphaser_1_latch) |
| 840 | if (m_ctrl_reg & 0x02 && m_lphaser_1_latch) |
| 848 | 841 | { |
| 849 | | state->m_input_port1 &= ~0x40; |
| 850 | | state->m_lphaser_1_latch = 0; |
| 842 | m_input_port1 &= ~0x40; |
| 843 | m_lphaser_1_latch = 0; |
| 851 | 844 | } |
| 852 | 845 | |
| 853 | | if (state->m_ctrl_reg & 0x08 && state->m_lphaser_2_latch) |
| 846 | if (m_ctrl_reg & 0x08 && m_lphaser_2_latch) |
| 854 | 847 | { |
| 855 | | state->m_input_port1 &= ~0x80; |
| 856 | | state->m_lphaser_2_latch = 0; |
| 848 | m_input_port1 &= ~0x80; |
| 849 | m_lphaser_2_latch = 0; |
| 857 | 850 | } |
| 858 | 851 | } |
| 859 | 852 | |
| 860 | | return state->m_input_port1; |
| 853 | return m_input_port1; |
| 861 | 854 | } |
| 862 | 855 | |
| 863 | 856 | |
| 864 | 857 | |
| 865 | | WRITE8_HANDLER( sms_ym2413_register_port_0_w ) |
| 858 | WRITE8_MEMBER(sms_state::sms_ym2413_register_port_0_w) |
| 866 | 859 | { |
| 867 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 868 | 860 | |
| 869 | | if (state->m_has_fm) |
| 870 | | ym2413_w(state->m_ym, 0, (data & 0x3f)); |
| 861 | if (m_has_fm) |
| 862 | ym2413_w(m_ym, 0, (data & 0x3f)); |
| 871 | 863 | } |
| 872 | 864 | |
| 873 | 865 | |
| 874 | | WRITE8_HANDLER( sms_ym2413_data_port_0_w ) |
| 866 | WRITE8_MEMBER(sms_state::sms_ym2413_data_port_0_w) |
| 875 | 867 | { |
| 876 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 877 | 868 | |
| 878 | | if (state->m_has_fm) |
| 869 | if (m_has_fm) |
| 879 | 870 | { |
| 880 | 871 | logerror("data_port_0_w %x %x\n", offset, data); |
| 881 | | ym2413_w(state->m_ym, 1, data); |
| 872 | ym2413_w(m_ym, 1, data); |
| 882 | 873 | } |
| 883 | 874 | } |
| 884 | 875 | |
| 885 | 876 | |
| 886 | | READ8_HANDLER( gg_input_port_2_r ) |
| 877 | READ8_MEMBER(sms_state::gg_input_port_2_r) |
| 887 | 878 | { |
| 888 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 889 | 879 | |
| 890 | | //logerror("joy 2 read, val: %02x, pc: %04x\n", ((state->m_is_region_japan ? 0x00 : 0x40) | (input_port_read(machine, "START") & 0x80)), activecpu_get_pc()); |
| 891 | | return ((state->m_is_region_japan ? 0x00 : 0x40) | (input_port_read(space->machine(), "START") & 0x80)); |
| 880 | //logerror("joy 2 read, val: %02x, pc: %04x\n", ((m_is_region_japan ? 0x00 : 0x40) | (input_port_read(machine, "START") & 0x80)), activecpu_get_pc()); |
| 881 | return ((m_is_region_japan ? 0x00 : 0x40) | (input_port_read(machine(), "START") & 0x80)); |
| 892 | 882 | } |
| 893 | 883 | |
| 894 | 884 | |
| 895 | | READ8_HANDLER( sms_sscope_r ) |
| 885 | READ8_MEMBER(sms_state::sms_sscope_r) |
| 896 | 886 | { |
| 897 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 898 | | return state->m_sscope_state; |
| 887 | return m_sscope_state; |
| 899 | 888 | } |
| 900 | 889 | |
| 901 | 890 | |
| 902 | | WRITE8_HANDLER( sms_sscope_w ) |
| 891 | WRITE8_MEMBER(sms_state::sms_sscope_w) |
| 903 | 892 | { |
| 904 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 905 | | state->m_sscope_state = data; |
| 893 | m_sscope_state = data; |
| 906 | 894 | } |
| 907 | 895 | |
| 908 | 896 | |
| 909 | | READ8_HANDLER( sms_mapper_r ) |
| 897 | READ8_MEMBER(sms_state::sms_mapper_r) |
| 910 | 898 | { |
| 911 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 912 | | return state->m_mapper[offset]; |
| 899 | return m_mapper[offset]; |
| 913 | 900 | } |
| 914 | 901 | |
| 915 | 902 | /* Terebi Oekaki */ |
| 916 | 903 | /* The following code comes from sg1000.c. We should eventually merge these TV Draw implementations */ |
| 917 | | static WRITE8_HANDLER( sms_tvdraw_axis_w ) |
| 904 | WRITE8_MEMBER(sms_state::sms_tvdraw_axis_w) |
| 918 | 905 | { |
| 919 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 920 | | UINT8 tvboard_on = input_port_read_safe(space->machine(), "TVDRAW", 0x00); |
| 906 | UINT8 tvboard_on = input_port_read_safe(machine(), "TVDRAW", 0x00); |
| 921 | 907 | |
| 922 | 908 | if (data & 0x01) |
| 923 | 909 | { |
| 924 | | state->m_cartridge[state->m_current_cartridge].m_tvdraw_data = tvboard_on ? input_port_read(space->machine(), "TVDRAW_X") : 0x80; |
| 910 | m_cartridge[m_current_cartridge].m_tvdraw_data = tvboard_on ? input_port_read(machine(), "TVDRAW_X") : 0x80; |
| 925 | 911 | |
| 926 | | if (state->m_cartridge[state->m_current_cartridge].m_tvdraw_data < 4) state->m_cartridge[state->m_current_cartridge].m_tvdraw_data = 4; |
| 927 | | if (state->m_cartridge[state->m_current_cartridge].m_tvdraw_data > 251) state->m_cartridge[state->m_current_cartridge].m_tvdraw_data = 251; |
| 912 | if (m_cartridge[m_current_cartridge].m_tvdraw_data < 4) m_cartridge[m_current_cartridge].m_tvdraw_data = 4; |
| 913 | if (m_cartridge[m_current_cartridge].m_tvdraw_data > 251) m_cartridge[m_current_cartridge].m_tvdraw_data = 251; |
| 928 | 914 | } |
| 929 | 915 | else |
| 930 | 916 | { |
| 931 | | state->m_cartridge[state->m_current_cartridge].m_tvdraw_data = tvboard_on ? input_port_read(space->machine(), "TVDRAW_Y") + 0x20 : 0x80; |
| 917 | m_cartridge[m_current_cartridge].m_tvdraw_data = tvboard_on ? input_port_read(machine(), "TVDRAW_Y") + 0x20 : 0x80; |
| 932 | 918 | } |
| 933 | 919 | } |
| 934 | 920 | |
| 935 | | static READ8_HANDLER( sms_tvdraw_status_r ) |
| 921 | READ8_MEMBER(sms_state::sms_tvdraw_status_r) |
| 936 | 922 | { |
| 937 | | UINT8 tvboard_on = input_port_read_safe(space->machine(), "TVDRAW", 0x00); |
| 938 | | return tvboard_on ? input_port_read(space->machine(), "TVDRAW_PEN") : 0x01; |
| 923 | UINT8 tvboard_on = input_port_read_safe(machine(), "TVDRAW", 0x00); |
| 924 | return tvboard_on ? input_port_read(machine(), "TVDRAW_PEN") : 0x01; |
| 939 | 925 | } |
| 940 | 926 | |
| 941 | | static READ8_HANDLER( sms_tvdraw_data_r ) |
| 927 | READ8_MEMBER(sms_state::sms_tvdraw_data_r) |
| 942 | 928 | { |
| 943 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 944 | | return state->m_cartridge[state->m_current_cartridge].m_tvdraw_data; |
| 929 | return m_cartridge[m_current_cartridge].m_tvdraw_data; |
| 945 | 930 | } |
| 946 | 931 | |
| 947 | 932 | |
| 948 | | static WRITE8_HANDLER( sms_93c46_w ) |
| 933 | WRITE8_MEMBER(sms_state::sms_93c46_w) |
| 949 | 934 | { |
| 950 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 951 | 935 | |
| 952 | | if ( state->m_cartridge[state->m_current_cartridge].m_93c46_enabled ) |
| 936 | if ( m_cartridge[m_current_cartridge].m_93c46_enabled ) |
| 953 | 937 | { |
| 954 | | state->m_cartridge[state->m_current_cartridge].m_93c46_lines = data; |
| 938 | m_cartridge[m_current_cartridge].m_93c46_lines = data; |
| 955 | 939 | |
| 956 | 940 | logerror( "sms_93c46_w: setting eeprom lines: DI=%s CLK=%s CS=%s\n", data & 0x01 ? "1" : "0", data & 0x02 ? "1" : "0", data & 0x04 ? "1" : "0" ); |
| 957 | | state->m_eeprom->write_bit( ( data & 0x01 ) ? ASSERT_LINE : CLEAR_LINE ); |
| 958 | | state->m_eeprom->set_cs_line( !( data & 0x04 ) ? ASSERT_LINE : CLEAR_LINE ); |
| 959 | | state->m_eeprom->set_clock_line( ( data & 0x02 ) ? ASSERT_LINE : CLEAR_LINE ); |
| 941 | m_eeprom->write_bit( ( data & 0x01 ) ? ASSERT_LINE : CLEAR_LINE ); |
| 942 | m_eeprom->set_cs_line( !( data & 0x04 ) ? ASSERT_LINE : CLEAR_LINE ); |
| 943 | m_eeprom->set_clock_line( ( data & 0x02 ) ? ASSERT_LINE : CLEAR_LINE ); |
| 960 | 944 | } |
| 961 | 945 | } |
| 962 | 946 | |
| 963 | 947 | |
| 964 | | static READ8_HANDLER( sms_93c46_r ) |
| 948 | READ8_MEMBER(sms_state::sms_93c46_r) |
| 965 | 949 | { |
| 966 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 967 | | UINT8 data = state->m_banking_cart[5][0]; |
| 950 | UINT8 data = m_banking_cart[5][0]; |
| 968 | 951 | |
| 969 | | if ( state->m_cartridge[state->m_current_cartridge].m_93c46_enabled ) |
| 952 | if ( m_cartridge[m_current_cartridge].m_93c46_enabled ) |
| 970 | 953 | { |
| 971 | | data = ( state->m_cartridge[state->m_current_cartridge].m_93c46_lines & 0xFC ) | 0x02; |
| 972 | | data |= state->m_eeprom->read_bit() ? 1 : 0; |
| 954 | data = ( m_cartridge[m_current_cartridge].m_93c46_lines & 0xFC ) | 0x02; |
| 955 | data |= m_eeprom->read_bit() ? 1 : 0; |
| 973 | 956 | } |
| 974 | 957 | |
| 975 | 958 | return data; |
| 976 | 959 | } |
| 977 | 960 | |
| 978 | 961 | |
| 979 | | WRITE8_HANDLER( sms_mapper_w ) |
| 962 | WRITE8_MEMBER(sms_state::sms_mapper_w) |
| 980 | 963 | { |
| 981 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 982 | 964 | bool bios_selected = false; |
| 983 | 965 | bool cartridge_selected = false; |
| 984 | 966 | |
| 985 | 967 | offset &= 3; |
| 986 | 968 | |
| 987 | | state->m_mapper[offset] = data; |
| 988 | | state->m_mapper_ram[offset] = data; |
| 969 | m_mapper[offset] = data; |
| 970 | m_mapper_ram[offset] = data; |
| 989 | 971 | |
| 990 | | if (state->m_bios_port & IO_BIOS_ROM || (state->m_is_gamegear && state->m_BIOS == NULL)) |
| 972 | if (m_bios_port & IO_BIOS_ROM || (m_is_gamegear && m_BIOS == NULL)) |
| 991 | 973 | { |
| 992 | | if (!(state->m_bios_port & IO_CARTRIDGE) || (state->m_is_gamegear && state->m_BIOS == NULL)) |
| 974 | if (!(m_bios_port & IO_CARTRIDGE) || (m_is_gamegear && m_BIOS == NULL)) |
| 993 | 975 | { |
| 994 | | if (!state->m_cartridge[state->m_current_cartridge].ROM) |
| 976 | if (!m_cartridge[m_current_cartridge].ROM) |
| 995 | 977 | return; |
| 996 | 978 | cartridge_selected = true; |
| 997 | 979 | } |
| r14963 | r14964 | |
| 1003 | 985 | } |
| 1004 | 986 | else |
| 1005 | 987 | { |
| 1006 | | if (!state->m_BIOS) |
| 988 | if (!m_BIOS) |
| 1007 | 989 | return; |
| 1008 | 990 | bios_selected = true; |
| 1009 | 991 | } |
| r14963 | r14964 | |
| 1014 | 996 | /* Is it ram or rom? */ |
| 1015 | 997 | if (data & 0x08) /* it's ram */ |
| 1016 | 998 | { |
| 1017 | | if ( state->m_cartridge[state->m_current_cartridge].features & CF_93C46_EEPROM ) |
| 999 | if ( m_cartridge[m_current_cartridge].features & CF_93C46_EEPROM ) |
| 1018 | 1000 | { |
| 1019 | 1001 | if ( data & 0x80 ) |
| 1020 | 1002 | { |
| 1021 | | state->m_eeprom->reset(); |
| 1003 | m_eeprom->reset(); |
| 1022 | 1004 | logerror("sms_mapper_w: eeprom CS=1\n"); |
| 1023 | | state->m_eeprom->set_cs_line( ASSERT_LINE ); |
| 1005 | m_eeprom->set_cs_line( ASSERT_LINE ); |
| 1024 | 1006 | } |
| 1025 | 1007 | logerror("sms_mapper_w: eeprom enabled\n"); |
| 1026 | | state->m_cartridge[state->m_current_cartridge].m_93c46_enabled = true; |
| 1008 | m_cartridge[m_current_cartridge].m_93c46_enabled = true; |
| 1027 | 1009 | } |
| 1028 | 1010 | else |
| 1029 | 1011 | { |
| 1030 | 1012 | UINT8 *sram = NULL; |
| 1031 | | state->m_cartridge[state->m_current_cartridge].sram_save = 1; /* SRAM should be saved on exit. */ |
| 1013 | m_cartridge[m_current_cartridge].sram_save = 1; /* SRAM should be saved on exit. */ |
| 1032 | 1014 | if (data & 0x04) |
| 1033 | 1015 | { |
| 1034 | | sram = state->m_cartridge[state->m_current_cartridge].cartSRAM + 0x4000; |
| 1016 | sram = m_cartridge[m_current_cartridge].cartSRAM + 0x4000; |
| 1035 | 1017 | } |
| 1036 | 1018 | else |
| 1037 | 1019 | { |
| 1038 | | sram = state->m_cartridge[state->m_current_cartridge].cartSRAM; |
| 1020 | sram = m_cartridge[m_current_cartridge].cartSRAM; |
| 1039 | 1021 | } |
| 1040 | | memory_set_bankptr(space->machine(), "bank5", sram); |
| 1041 | | memory_set_bankptr(space->machine(), "bank6", sram + 0x2000); |
| 1022 | memory_set_bankptr(machine(), "bank5", sram); |
| 1023 | memory_set_bankptr(machine(), "bank6", sram + 0x2000); |
| 1042 | 1024 | } |
| 1043 | 1025 | } |
| 1044 | 1026 | else /* it's rom */ |
| 1045 | 1027 | { |
| 1046 | | if (state->m_bios_port & IO_BIOS_ROM || ! state->m_has_bios) |
| 1028 | if (m_bios_port & IO_BIOS_ROM || ! m_has_bios) |
| 1047 | 1029 | { |
| 1048 | | if ( ! ( state->m_cartridge[state->m_current_cartridge].features & ( CF_KOREAN_NOBANK_MAPPER | CF_KOREAN_ZEMINA_MAPPER ) ) ) |
| 1030 | if ( ! ( m_cartridge[m_current_cartridge].features & ( CF_KOREAN_NOBANK_MAPPER | CF_KOREAN_ZEMINA_MAPPER ) ) ) |
| 1049 | 1031 | { |
| 1050 | | if ( state->m_cartridge[state->m_current_cartridge].features & CF_93C46_EEPROM ) |
| 1032 | if ( m_cartridge[m_current_cartridge].features & CF_93C46_EEPROM ) |
| 1051 | 1033 | { |
| 1052 | 1034 | if ( data & 0x80 ) |
| 1053 | 1035 | { |
| 1054 | | state->m_eeprom->reset(); |
| 1036 | m_eeprom->reset(); |
| 1055 | 1037 | logerror("sms_mapper_w: eeprom CS=1\n"); |
| 1056 | | state->m_eeprom->set_cs_line( ASSERT_LINE ); |
| 1038 | m_eeprom->set_cs_line( ASSERT_LINE ); |
| 1057 | 1039 | } |
| 1058 | 1040 | logerror("sms_mapper_w: eeprom disabled\n"); |
| 1059 | | state->m_cartridge[state->m_current_cartridge].m_93c46_enabled = false; |
| 1041 | m_cartridge[m_current_cartridge].m_93c46_enabled = false; |
| 1060 | 1042 | } |
| 1061 | 1043 | else |
| 1062 | 1044 | { |
| 1063 | | state->map_cart_16k( 0x8000, state->m_mapper[3] ); |
| 1045 | map_cart_16k( 0x8000, m_mapper[3] ); |
| 1064 | 1046 | } |
| 1065 | 1047 | } |
| 1066 | 1048 | } |
| 1067 | 1049 | else |
| 1068 | 1050 | { |
| 1069 | | state->map_bios_16k( 0x8000, state->m_mapper[3] ); |
| 1051 | map_bios_16k( 0x8000, m_mapper[3] ); |
| 1070 | 1052 | } |
| 1071 | 1053 | } |
| 1072 | 1054 | break; |
| 1073 | 1055 | |
| 1074 | 1056 | case 1: /* Select 16k ROM bank for 0400-3FFF */ |
| 1075 | | if ( cartridge_selected || state->m_is_gamegear ) |
| 1057 | if ( cartridge_selected || m_is_gamegear ) |
| 1076 | 1058 | { |
| 1077 | | if ( ! ( state->m_cartridge[state->m_current_cartridge].features & ( CF_KOREAN_NOBANK_MAPPER | CF_KOREAN_ZEMINA_MAPPER ) ) ) |
| 1059 | if ( ! ( m_cartridge[m_current_cartridge].features & ( CF_KOREAN_NOBANK_MAPPER | CF_KOREAN_ZEMINA_MAPPER ) ) ) |
| 1078 | 1060 | { |
| 1079 | | state->map_cart_16k( 0x400, data ); |
| 1061 | map_cart_16k( 0x400, data ); |
| 1080 | 1062 | } |
| 1081 | 1063 | } |
| 1082 | 1064 | if ( bios_selected ) |
| 1083 | 1065 | { |
| 1084 | | state->map_bios_16k( 0x400, data ); |
| 1066 | map_bios_16k( 0x400, data ); |
| 1085 | 1067 | } |
| 1086 | 1068 | break; |
| 1087 | 1069 | |
| 1088 | 1070 | case 2: /* Select 16k ROM bank for 4000-7FFF */ |
| 1089 | | if ( cartridge_selected || state->m_is_gamegear ) |
| 1071 | if ( cartridge_selected || m_is_gamegear ) |
| 1090 | 1072 | { |
| 1091 | | if ( ! ( state->m_cartridge[state->m_current_cartridge].features & ( CF_KOREAN_NOBANK_MAPPER | CF_KOREAN_ZEMINA_MAPPER ) ) ) |
| 1073 | if ( ! ( m_cartridge[m_current_cartridge].features & ( CF_KOREAN_NOBANK_MAPPER | CF_KOREAN_ZEMINA_MAPPER ) ) ) |
| 1092 | 1074 | { |
| 1093 | | state->map_cart_16k( 0x4000, data ); |
| 1075 | map_cart_16k( 0x4000, data ); |
| 1094 | 1076 | } |
| 1095 | 1077 | } |
| 1096 | 1078 | if ( bios_selected ) |
| 1097 | 1079 | { |
| 1098 | | state->map_bios_16k( 0x4000, data ); |
| 1080 | map_bios_16k( 0x4000, data ); |
| 1099 | 1081 | } |
| 1100 | 1082 | break; |
| 1101 | 1083 | |
| 1102 | 1084 | case 3: /* Select 16k ROM bank for 8000-BFFF */ |
| 1103 | | if ( cartridge_selected || state->m_is_gamegear ) |
| 1085 | if ( cartridge_selected || m_is_gamegear ) |
| 1104 | 1086 | { |
| 1105 | | if ( state->m_cartridge[state->m_current_cartridge].features & CF_CODEMASTERS_MAPPER) |
| 1087 | if ( m_cartridge[m_current_cartridge].features & CF_CODEMASTERS_MAPPER) |
| 1106 | 1088 | { |
| 1107 | 1089 | return; |
| 1108 | 1090 | } |
| 1109 | 1091 | |
| 1110 | | if ( ! ( state->m_mapper[0] & 0x08 ) ) // Is RAM disabled |
| 1092 | if ( ! ( m_mapper[0] & 0x08 ) ) // Is RAM disabled |
| 1111 | 1093 | { |
| 1112 | | if ( ! ( state->m_cartridge[state->m_current_cartridge].features & ( CF_KOREAN_NOBANK_MAPPER | CF_KOREAN_ZEMINA_MAPPER ) ) ) |
| 1094 | if ( ! ( m_cartridge[m_current_cartridge].features & ( CF_KOREAN_NOBANK_MAPPER | CF_KOREAN_ZEMINA_MAPPER ) ) ) |
| 1113 | 1095 | { |
| 1114 | | state->map_cart_16k( 0x8000, data ); |
| 1096 | map_cart_16k( 0x8000, data ); |
| 1115 | 1097 | } |
| 1116 | 1098 | } |
| 1117 | 1099 | } |
| 1118 | 1100 | |
| 1119 | 1101 | if ( bios_selected ) |
| 1120 | 1102 | { |
| 1121 | | if ( ! ( state->m_mapper[0] & 0x08 ) ) // Is RAM disabled |
| 1103 | if ( ! ( m_mapper[0] & 0x08 ) ) // Is RAM disabled |
| 1122 | 1104 | { |
| 1123 | | state->map_bios_16k( 0x8000, data ); |
| 1105 | map_bios_16k( 0x8000, data ); |
| 1124 | 1106 | } |
| 1125 | 1107 | } |
| 1126 | 1108 | break; |
| 1127 | 1109 | } |
| 1128 | 1110 | } |
| 1129 | 1111 | |
| 1130 | | static WRITE8_HANDLER( sms_korean_zemina_banksw_w ) |
| 1112 | WRITE8_MEMBER(sms_state::sms_korean_zemina_banksw_w) |
| 1131 | 1113 | { |
| 1132 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1133 | 1114 | |
| 1134 | | if (state->m_cartridge[state->m_current_cartridge].features & CF_KOREAN_ZEMINA_MAPPER) |
| 1115 | if (m_cartridge[m_current_cartridge].features & CF_KOREAN_ZEMINA_MAPPER) |
| 1135 | 1116 | { |
| 1136 | | if (!state->m_cartridge[state->m_current_cartridge].ROM) |
| 1117 | if (!m_cartridge[m_current_cartridge].ROM) |
| 1137 | 1118 | return; |
| 1138 | 1119 | |
| 1139 | 1120 | switch (offset & 3) |
| 1140 | 1121 | { |
| 1141 | 1122 | case 0: |
| 1142 | | state->map_cart_8k( 0x8000, data ); |
| 1123 | map_cart_8k( 0x8000, data ); |
| 1143 | 1124 | break; |
| 1144 | 1125 | case 1: |
| 1145 | | state->map_cart_8k( 0xA000, data ); |
| 1126 | map_cart_8k( 0xA000, data ); |
| 1146 | 1127 | break; |
| 1147 | 1128 | case 2: |
| 1148 | | state->map_cart_8k( 0x4000, data ); |
| 1129 | map_cart_8k( 0x4000, data ); |
| 1149 | 1130 | break; |
| 1150 | 1131 | case 3: |
| 1151 | | state->map_cart_8k( 0x6000, data ); |
| 1132 | map_cart_8k( 0x6000, data ); |
| 1152 | 1133 | break; |
| 1153 | 1134 | } |
| 1154 | 1135 | LOG(("Zemina mapper write: offset %x data %x.\n", offset, data)); |
| 1155 | 1136 | } |
| 1156 | 1137 | } |
| 1157 | 1138 | |
| 1158 | | static WRITE8_HANDLER( sms_codemasters_page0_w ) |
| 1139 | WRITE8_MEMBER(sms_state::sms_codemasters_page0_w) |
| 1159 | 1140 | { |
| 1160 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1161 | 1141 | |
| 1162 | | if (state->m_cartridge[state->m_current_cartridge].ROM && state->m_cartridge[state->m_current_cartridge].features & CF_CODEMASTERS_MAPPER) |
| 1142 | if (m_cartridge[m_current_cartridge].ROM && m_cartridge[m_current_cartridge].features & CF_CODEMASTERS_MAPPER) |
| 1163 | 1143 | { |
| 1164 | | state->map_cart_16k( 0x0000, data ); |
| 1144 | map_cart_16k( 0x0000, data ); |
| 1165 | 1145 | } |
| 1166 | 1146 | } |
| 1167 | 1147 | |
| 1168 | 1148 | |
| 1169 | | static WRITE8_HANDLER( sms_codemasters_page1_w ) |
| 1149 | WRITE8_MEMBER(sms_state::sms_codemasters_page1_w) |
| 1170 | 1150 | { |
| 1171 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1172 | 1151 | |
| 1173 | | if (state->m_cartridge[state->m_current_cartridge].ROM && state->m_cartridge[state->m_current_cartridge].features & CF_CODEMASTERS_MAPPER) |
| 1152 | if (m_cartridge[m_current_cartridge].ROM && m_cartridge[m_current_cartridge].features & CF_CODEMASTERS_MAPPER) |
| 1174 | 1153 | { |
| 1175 | 1154 | /* Check if we need to switch in some RAM */ |
| 1176 | 1155 | if (data & 0x80) |
| 1177 | 1156 | { |
| 1178 | | state->m_cartridge[state->m_current_cartridge].ram_page = data & 0x07; |
| 1179 | | memory_set_bankptr(space->machine(), "bank6", state->m_cartridge[state->m_current_cartridge].cartRAM + state->m_cartridge[state->m_current_cartridge].ram_page * 0x2000); |
| 1157 | m_cartridge[m_current_cartridge].ram_page = data & 0x07; |
| 1158 | memory_set_bankptr(machine(), "bank6", m_cartridge[m_current_cartridge].cartRAM + m_cartridge[m_current_cartridge].ram_page * 0x2000); |
| 1180 | 1159 | } |
| 1181 | 1160 | else |
| 1182 | 1161 | { |
| 1183 | | state->map_cart_16k( 0x4000, data ); |
| 1184 | | memory_set_bankptr(space->machine(), "bank6", state->m_banking_cart[5] + 0x2000); |
| 1162 | map_cart_16k( 0x4000, data ); |
| 1163 | memory_set_bankptr(machine(), "bank6", m_banking_cart[5] + 0x2000); |
| 1185 | 1164 | } |
| 1186 | 1165 | } |
| 1187 | 1166 | } |
| 1188 | 1167 | |
| 1189 | 1168 | |
| 1190 | | WRITE8_HANDLER( sms_4pak_page0_w ) |
| 1169 | WRITE8_MEMBER(sms_state::sms_4pak_page0_w) |
| 1191 | 1170 | { |
| 1192 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1193 | 1171 | |
| 1194 | | state->m_cartridge[state->m_current_cartridge].m_4pak_page0 = data; |
| 1172 | m_cartridge[m_current_cartridge].m_4pak_page0 = data; |
| 1195 | 1173 | |
| 1196 | | state->map_cart_16k( 0x0000, data ); |
| 1197 | | state->map_cart_16k( 0x8000, ( state->m_cartridge[state->m_current_cartridge].m_4pak_page0 & 0x30 ) + state->m_cartridge[state->m_current_cartridge].m_4pak_page2 ); |
| 1174 | map_cart_16k( 0x0000, data ); |
| 1175 | map_cart_16k( 0x8000, ( m_cartridge[m_current_cartridge].m_4pak_page0 & 0x30 ) + m_cartridge[m_current_cartridge].m_4pak_page2 ); |
| 1198 | 1176 | } |
| 1199 | 1177 | |
| 1200 | 1178 | |
| 1201 | | WRITE8_HANDLER( sms_4pak_page1_w ) |
| 1179 | WRITE8_MEMBER(sms_state::sms_4pak_page1_w) |
| 1202 | 1180 | { |
| 1203 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1204 | 1181 | |
| 1205 | | state->m_cartridge[state->m_current_cartridge].m_4pak_page1 = data; |
| 1182 | m_cartridge[m_current_cartridge].m_4pak_page1 = data; |
| 1206 | 1183 | |
| 1207 | | state->map_cart_16k( 0x4000, data ); |
| 1184 | map_cart_16k( 0x4000, data ); |
| 1208 | 1185 | } |
| 1209 | 1186 | |
| 1210 | 1187 | |
| 1211 | | WRITE8_HANDLER( sms_4pak_page2_w ) |
| 1188 | WRITE8_MEMBER(sms_state::sms_4pak_page2_w) |
| 1212 | 1189 | { |
| 1213 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1214 | 1190 | |
| 1215 | | state->m_cartridge[state->m_current_cartridge].m_4pak_page2 = data; |
| 1191 | m_cartridge[m_current_cartridge].m_4pak_page2 = data; |
| 1216 | 1192 | |
| 1217 | | state->map_cart_16k( 0x8000, ( state->m_cartridge[state->m_current_cartridge].m_4pak_page0 & 0x30 ) + state->m_cartridge[state->m_current_cartridge].m_4pak_page2 ); |
| 1193 | map_cart_16k( 0x8000, ( m_cartridge[m_current_cartridge].m_4pak_page0 & 0x30 ) + m_cartridge[m_current_cartridge].m_4pak_page2 ); |
| 1218 | 1194 | } |
| 1219 | 1195 | |
| 1220 | 1196 | |
| 1221 | | WRITE8_HANDLER( sms_janggun_bank0_w ) |
| 1197 | WRITE8_MEMBER(sms_state::sms_janggun_bank0_w) |
| 1222 | 1198 | { |
| 1223 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1224 | 1199 | |
| 1225 | | state->map_cart_8k( 0x4000, data ); |
| 1200 | map_cart_8k( 0x4000, data ); |
| 1226 | 1201 | } |
| 1227 | 1202 | |
| 1228 | 1203 | |
| 1229 | | WRITE8_HANDLER( sms_janggun_bank1_w ) |
| 1204 | WRITE8_MEMBER(sms_state::sms_janggun_bank1_w) |
| 1230 | 1205 | { |
| 1231 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1232 | 1206 | |
| 1233 | | state->map_cart_8k( 0x6000, data ); |
| 1207 | map_cart_8k( 0x6000, data ); |
| 1234 | 1208 | } |
| 1235 | 1209 | |
| 1236 | 1210 | |
| 1237 | | WRITE8_HANDLER( sms_janggun_bank2_w ) |
| 1211 | WRITE8_MEMBER(sms_state::sms_janggun_bank2_w) |
| 1238 | 1212 | { |
| 1239 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1240 | 1213 | |
| 1241 | | state->map_cart_8k( 0x8000, data ); |
| 1214 | map_cart_8k( 0x8000, data ); |
| 1242 | 1215 | } |
| 1243 | 1216 | |
| 1244 | 1217 | |
| 1245 | | WRITE8_HANDLER( sms_janggun_bank3_w ) |
| 1218 | WRITE8_MEMBER(sms_state::sms_janggun_bank3_w) |
| 1246 | 1219 | { |
| 1247 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1248 | 1220 | |
| 1249 | | state->map_cart_8k( 0xA000, data ); |
| 1221 | map_cart_8k( 0xA000, data ); |
| 1250 | 1222 | } |
| 1251 | 1223 | |
| 1252 | 1224 | |
| 1253 | | WRITE8_HANDLER( sms_bios_w ) |
| 1225 | WRITE8_MEMBER(sms_state::sms_bios_w) |
| 1254 | 1226 | { |
| 1255 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1256 | | state->m_bios_port = data; |
| 1227 | m_bios_port = data; |
| 1257 | 1228 | |
| 1258 | | logerror("bios write %02x, pc: %04x\n", data, cpu_get_pc(&space->device())); |
| 1229 | logerror("bios write %02x, pc: %04x\n", data, cpu_get_pc(&space.device())); |
| 1259 | 1230 | |
| 1260 | | setup_rom(space); |
| 1231 | setup_rom(&space); |
| 1261 | 1232 | } |
| 1262 | 1233 | |
| 1263 | 1234 | |
| 1264 | | WRITE8_HANDLER( sms_cartram2_w ) |
| 1235 | WRITE8_MEMBER(sms_state::sms_cartram2_w) |
| 1265 | 1236 | { |
| 1266 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1267 | 1237 | |
| 1268 | | if (state->m_mapper[0] & 0x08) |
| 1238 | if (m_mapper[0] & 0x08) |
| 1269 | 1239 | { |
| 1270 | 1240 | logerror("write %02X to cartram at offset #%04X\n", data, offset + 0x2000); |
| 1271 | | if (state->m_mapper[0] & 0x04) |
| 1241 | if (m_mapper[0] & 0x04) |
| 1272 | 1242 | { |
| 1273 | | state->m_cartridge[state->m_current_cartridge].cartSRAM[offset + 0x6000] = data; |
| 1243 | m_cartridge[m_current_cartridge].cartSRAM[offset + 0x6000] = data; |
| 1274 | 1244 | } |
| 1275 | 1245 | else |
| 1276 | 1246 | { |
| 1277 | | state->m_cartridge[state->m_current_cartridge].cartSRAM[offset + 0x2000] = data; |
| 1247 | m_cartridge[m_current_cartridge].cartSRAM[offset + 0x2000] = data; |
| 1278 | 1248 | } |
| 1279 | 1249 | } |
| 1280 | 1250 | |
| 1281 | | if (state->m_cartridge[state->m_current_cartridge].features & CF_CODEMASTERS_MAPPER) |
| 1251 | if (m_cartridge[m_current_cartridge].features & CF_CODEMASTERS_MAPPER) |
| 1282 | 1252 | { |
| 1283 | | state->m_cartridge[state->m_current_cartridge].cartRAM[state->m_cartridge[state->m_current_cartridge].ram_page * 0x2000 + offset] = data; |
| 1253 | m_cartridge[m_current_cartridge].cartRAM[m_cartridge[m_current_cartridge].ram_page * 0x2000 + offset] = data; |
| 1284 | 1254 | } |
| 1285 | 1255 | |
| 1286 | | if (state->m_cartridge[state->m_current_cartridge].features & CF_KOREAN_MAPPER && offset == 0) /* Dodgeball King mapper */ |
| 1256 | if (m_cartridge[m_current_cartridge].features & CF_KOREAN_MAPPER && offset == 0) /* Dodgeball King mapper */ |
| 1287 | 1257 | { |
| 1288 | | state->map_cart_16k( 0x8000, data ); |
| 1258 | map_cart_16k( 0x8000, data ); |
| 1289 | 1259 | } |
| 1290 | 1260 | } |
| 1291 | 1261 | |
| 1292 | 1262 | |
| 1293 | | WRITE8_HANDLER( sms_cartram_w ) |
| 1263 | WRITE8_MEMBER(sms_state::sms_cartram_w) |
| 1294 | 1264 | { |
| 1295 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1296 | 1265 | int page; |
| 1297 | 1266 | |
| 1298 | | if (state->m_mapper[0] & 0x08) |
| 1267 | if (m_mapper[0] & 0x08) |
| 1299 | 1268 | { |
| 1300 | 1269 | logerror("write %02X to cartram at offset #%04X\n", data, offset); |
| 1301 | | if (state->m_mapper[0] & 0x04) |
| 1270 | if (m_mapper[0] & 0x04) |
| 1302 | 1271 | { |
| 1303 | | state->m_cartridge[state->m_current_cartridge].cartSRAM[offset + 0x4000] = data; |
| 1272 | m_cartridge[m_current_cartridge].cartSRAM[offset + 0x4000] = data; |
| 1304 | 1273 | } |
| 1305 | 1274 | else |
| 1306 | 1275 | { |
| 1307 | | state->m_cartridge[state->m_current_cartridge].cartSRAM[offset] = data; |
| 1276 | m_cartridge[m_current_cartridge].cartSRAM[offset] = data; |
| 1308 | 1277 | } |
| 1309 | 1278 | } |
| 1310 | 1279 | else |
| 1311 | 1280 | { |
| 1312 | | if (state->m_cartridge[state->m_current_cartridge].features & CF_CODEMASTERS_MAPPER && offset == 0) /* Codemasters mapper */ |
| 1281 | if (m_cartridge[m_current_cartridge].features & CF_CODEMASTERS_MAPPER && offset == 0) /* Codemasters mapper */ |
| 1313 | 1282 | { |
| 1314 | | UINT8 rom_page_count = state->m_cartridge[state->m_current_cartridge].size / 0x4000; |
| 1283 | UINT8 rom_page_count = m_cartridge[m_current_cartridge].size / 0x4000; |
| 1315 | 1284 | page = (rom_page_count > 0) ? data % rom_page_count : 0; |
| 1316 | | if (!state->m_cartridge[state->m_current_cartridge].ROM) |
| 1285 | if (!m_cartridge[m_current_cartridge].ROM) |
| 1317 | 1286 | return; |
| 1318 | | state->m_banking_cart[5] = state->m_cartridge[state->m_current_cartridge].ROM + page * 0x4000; |
| 1319 | | memory_set_bankptr(space->machine(), "bank5", state->m_banking_cart[5]); |
| 1320 | | memory_set_bankptr(space->machine(), "bank6", state->m_banking_cart[5] + 0x2000); |
| 1287 | m_banking_cart[5] = m_cartridge[m_current_cartridge].ROM + page * 0x4000; |
| 1288 | memory_set_bankptr(machine(), "bank5", m_banking_cart[5]); |
| 1289 | memory_set_bankptr(machine(), "bank6", m_banking_cart[5] + 0x2000); |
| 1321 | 1290 | LOG(("rom 2 paged in %x (Codemasters mapper).\n", page)); |
| 1322 | 1291 | } |
| 1323 | | else if (state->m_cartridge[state->m_current_cartridge].features & CF_ONCART_RAM) |
| 1292 | else if (m_cartridge[m_current_cartridge].features & CF_ONCART_RAM) |
| 1324 | 1293 | { |
| 1325 | | state->m_cartridge[state->m_current_cartridge].cartRAM[offset & (state->m_cartridge[state->m_current_cartridge].ram_size - 1)] = data; |
| 1294 | m_cartridge[m_current_cartridge].cartRAM[offset & (m_cartridge[m_current_cartridge].ram_size - 1)] = data; |
| 1326 | 1295 | } |
| 1327 | 1296 | else |
| 1328 | 1297 | { |
| r14963 | r14964 | |
| 1332 | 1301 | } |
| 1333 | 1302 | |
| 1334 | 1303 | |
| 1335 | | WRITE8_HANDLER( gg_sio_w ) |
| 1304 | WRITE8_MEMBER(sms_state::gg_sio_w) |
| 1336 | 1305 | { |
| 1337 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1338 | 1306 | logerror("*** write %02X to SIO register #%d\n", data, offset); |
| 1339 | 1307 | |
| 1340 | | state->m_gg_sio[offset & 0x07] = data; |
| 1308 | m_gg_sio[offset & 0x07] = data; |
| 1341 | 1309 | switch (offset & 7) |
| 1342 | 1310 | { |
| 1343 | 1311 | case 0x00: /* Parallel Data */ |
| r14963 | r14964 | |
| 1358 | 1326 | } |
| 1359 | 1327 | |
| 1360 | 1328 | |
| 1361 | | READ8_HANDLER( gg_sio_r ) |
| 1329 | READ8_MEMBER(sms_state::gg_sio_r) |
| 1362 | 1330 | { |
| 1363 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 1364 | 1331 | logerror("*** read SIO register #%d\n", offset); |
| 1365 | 1332 | |
| 1366 | 1333 | switch (offset & 7) |
| r14963 | r14964 | |
| 1381 | 1348 | break; |
| 1382 | 1349 | } |
| 1383 | 1350 | |
| 1384 | | return state->m_gg_sio[offset]; |
| 1351 | return m_gg_sio[offset]; |
| 1385 | 1352 | } |
| 1386 | 1353 | |
| 1387 | 1354 | static void sms_machine_stop( running_machine &machine ) |
| r14963 | r14964 | |
| 1999 | 1966 | if ( state->m_cartridge[state->m_current_cartridge].features & CF_CODEMASTERS_MAPPER ) |
| 2000 | 1967 | { |
| 2001 | 1968 | /* Install special memory handlers */ |
| 2002 | | space->install_legacy_write_handler(0x0000, 0x0000, FUNC(sms_codemasters_page0_w)); |
| 2003 | | space->install_legacy_write_handler(0x4000, 0x4000, FUNC(sms_codemasters_page1_w)); |
| 1969 | space->install_write_handler(0x0000, 0x0000, write8_delegate(FUNC(sms_state::sms_codemasters_page0_w),state)); |
| 1970 | space->install_write_handler(0x4000, 0x4000, write8_delegate(FUNC(sms_state::sms_codemasters_page1_w),state)); |
| 2004 | 1971 | } |
| 2005 | 1972 | |
| 2006 | 1973 | if ( state->m_cartridge[state->m_current_cartridge].features & CF_KOREAN_ZEMINA_MAPPER ) |
| 2007 | 1974 | { |
| 2008 | | space->install_legacy_write_handler(0x0000, 0x0003, FUNC(sms_korean_zemina_banksw_w)); |
| 1975 | space->install_write_handler(0x0000, 0x0003, write8_delegate(FUNC(sms_state::sms_korean_zemina_banksw_w),state)); |
| 2009 | 1976 | } |
| 2010 | 1977 | |
| 2011 | 1978 | if ( state->m_cartridge[state->m_current_cartridge].features & CF_JANGGUN_MAPPER ) |
| 2012 | 1979 | { |
| 2013 | | space->install_legacy_write_handler(0x4000, 0x4000, FUNC(sms_janggun_bank0_w)); |
| 2014 | | space->install_legacy_write_handler(0x6000, 0x6000, FUNC(sms_janggun_bank1_w)); |
| 2015 | | space->install_legacy_write_handler(0x8000, 0x8000, FUNC(sms_janggun_bank2_w)); |
| 2016 | | space->install_legacy_write_handler(0xA000, 0xA000, FUNC(sms_janggun_bank3_w)); |
| 1980 | space->install_write_handler(0x4000, 0x4000, write8_delegate(FUNC(sms_state::sms_janggun_bank0_w),state)); |
| 1981 | space->install_write_handler(0x6000, 0x6000, write8_delegate(FUNC(sms_state::sms_janggun_bank1_w),state)); |
| 1982 | space->install_write_handler(0x8000, 0x8000, write8_delegate(FUNC(sms_state::sms_janggun_bank2_w),state)); |
| 1983 | space->install_write_handler(0xA000, 0xA000,write8_delegate(FUNC(sms_state::sms_janggun_bank3_w),state)); |
| 2017 | 1984 | } |
| 2018 | 1985 | |
| 2019 | 1986 | if ( state->m_cartridge[state->m_current_cartridge].features & CF_4PAK_MAPPER ) |
| 2020 | 1987 | { |
| 2021 | | space->install_legacy_write_handler(0x3ffe, 0x3ffe, FUNC(sms_4pak_page0_w)); |
| 2022 | | space->install_legacy_write_handler(0x7fff, 0x7fff, FUNC(sms_4pak_page1_w)); |
| 2023 | | space->install_legacy_write_handler(0xbfff, 0xbfff, FUNC(sms_4pak_page2_w)); |
| 1988 | space->install_write_handler(0x3ffe, 0x3ffe, write8_delegate(FUNC(sms_state::sms_4pak_page0_w),state)); |
| 1989 | space->install_write_handler(0x7fff, 0x7fff, write8_delegate(FUNC(sms_state::sms_4pak_page1_w),state)); |
| 1990 | space->install_write_handler(0xbfff, 0xbfff, write8_delegate(FUNC(sms_state::sms_4pak_page2_w),state)); |
| 2024 | 1991 | } |
| 2025 | 1992 | |
| 2026 | 1993 | if ( state->m_cartridge[state->m_current_cartridge].features & CF_TVDRAW ) |
| 2027 | 1994 | { |
| 2028 | | space->install_legacy_write_handler(0x6000, 0x6000, FUNC(sms_tvdraw_axis_w)); |
| 2029 | | space->install_legacy_read_handler(0x8000, 0x8000, FUNC(sms_tvdraw_status_r)); |
| 2030 | | space->install_legacy_read_handler(0xa000, 0xa000, FUNC(sms_tvdraw_data_r)); |
| 1995 | space->install_write_handler(0x6000, 0x6000, write8_delegate(FUNC(sms_state::sms_tvdraw_axis_w),state)); |
| 1996 | space->install_read_handler(0x8000, 0x8000, read8_delegate(FUNC(sms_state::sms_tvdraw_status_r),state)); |
| 1997 | space->install_read_handler(0xa000, 0xa000, read8_delegate(FUNC(sms_state::sms_tvdraw_data_r),state)); |
| 2031 | 1998 | space->nop_write(0xa000, 0xa000); |
| 2032 | 1999 | state->m_cartridge[state->m_current_cartridge].m_tvdraw_data = 0; |
| 2033 | 2000 | } |
| 2034 | 2001 | |
| 2035 | 2002 | if ( state->m_cartridge[state->m_current_cartridge].features & CF_93C46_EEPROM ) |
| 2036 | 2003 | { |
| 2037 | | space->install_legacy_write_handler(0x8000,0x8000, FUNC(sms_93c46_w)); |
| 2038 | | space->install_legacy_read_handler(0x8000,0x8000, FUNC(sms_93c46_r)); |
| 2004 | space->install_write_handler(0x8000,0x8000, write8_delegate(FUNC(sms_state::sms_93c46_w),state)); |
| 2005 | space->install_read_handler(0x8000,0x8000, read8_delegate(FUNC(sms_state::sms_93c46_r),state)); |
| 2039 | 2006 | } |
| 2040 | 2007 | |
| 2041 | 2008 | if (state->m_cartridge[state->m_current_cartridge].features & CF_GG_SMS_MODE) |
| r14963 | r14964 | |
| 2079 | 2046 | state->m_sscope_state = 0; |
| 2080 | 2047 | } |
| 2081 | 2048 | |
| 2082 | | READ8_HANDLER( sms_store_cart_select_r ) |
| 2049 | READ8_MEMBER(sms_state::sms_store_cart_select_r) |
| 2083 | 2050 | { |
| 2084 | 2051 | return 0xff; |
| 2085 | 2052 | } |
| 2086 | 2053 | |
| 2087 | 2054 | |
| 2088 | | WRITE8_HANDLER( sms_store_cart_select_w ) |
| 2055 | WRITE8_MEMBER(sms_state::sms_store_cart_select_w) |
| 2089 | 2056 | { |
| 2090 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 2091 | 2057 | UINT8 slot = data >> 4; |
| 2092 | 2058 | UINT8 slottype = data & 0x08; |
| 2093 | 2059 | |
| 2094 | 2060 | logerror("switching in part of %s slot #%d\n", slottype ? "card" : "cartridge", slot ); |
| 2095 | 2061 | /* cartridge? slot #0 */ |
| 2096 | 2062 | if (slottype == 0) |
| 2097 | | state->m_current_cartridge = slot; |
| 2063 | m_current_cartridge = slot; |
| 2098 | 2064 | |
| 2099 | | setup_cart_banks(space->machine()); |
| 2100 | | memory_set_bankptr(space->machine(), "bank10", state->m_banking_cart[3] + 0x2000); |
| 2101 | | setup_rom(space); |
| 2065 | setup_cart_banks(machine()); |
| 2066 | memory_set_bankptr(machine(), "bank10", m_banking_cart[3] + 0x2000); |
| 2067 | setup_rom(&space); |
| 2102 | 2068 | } |
| 2103 | 2069 | |
| 2104 | 2070 | |
| 2105 | | READ8_HANDLER( sms_store_select1 ) |
| 2071 | READ8_MEMBER(sms_state::sms_store_select1) |
| 2106 | 2072 | { |
| 2107 | 2073 | return 0xff; |
| 2108 | 2074 | } |
| 2109 | 2075 | |
| 2110 | 2076 | |
| 2111 | | READ8_HANDLER( sms_store_select2 ) |
| 2077 | READ8_MEMBER(sms_state::sms_store_select2) |
| 2112 | 2078 | { |
| 2113 | 2079 | return 0xff; |
| 2114 | 2080 | } |
| 2115 | 2081 | |
| 2116 | 2082 | |
| 2117 | | READ8_HANDLER( sms_store_control_r ) |
| 2083 | READ8_MEMBER(sms_state::sms_store_control_r) |
| 2118 | 2084 | { |
| 2119 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 2120 | | return state->m_store_control; |
| 2085 | return m_store_control; |
| 2121 | 2086 | } |
| 2122 | 2087 | |
| 2123 | 2088 | |
| 2124 | | WRITE8_HANDLER( sms_store_control_w ) |
| 2089 | WRITE8_MEMBER(sms_state::sms_store_control_w) |
| 2125 | 2090 | { |
| 2126 | | sms_state *state = space->machine().driver_data<sms_state>(); |
| 2127 | | logerror("0x%04X: sms_store_control write 0x%02X\n", cpu_get_pc(&space->device()), data); |
| 2091 | logerror("0x%04X: sms_store_control write 0x%02X\n", cpu_get_pc(&space.device()), data); |
| 2128 | 2092 | if (data & 0x02) |
| 2129 | 2093 | { |
| 2130 | | space->machine().device<cpu_device>("maincpu")->resume(SUSPEND_REASON_HALT); |
| 2094 | machine().device<cpu_device>("maincpu")->resume(SUSPEND_REASON_HALT); |
| 2131 | 2095 | } |
| 2132 | 2096 | else |
| 2133 | 2097 | { |
| 2134 | 2098 | /* Pull reset line of CPU #0 low */ |
| 2135 | | space->machine().device("maincpu")->reset(); |
| 2136 | | space->machine().device<cpu_device>("maincpu")->suspend(SUSPEND_REASON_HALT, 1); |
| 2099 | machine().device("maincpu")->reset(); |
| 2100 | machine().device<cpu_device>("maincpu")->suspend(SUSPEND_REASON_HALT, 1); |
| 2137 | 2101 | } |
| 2138 | | state->m_store_control = data; |
| 2102 | m_store_control = data; |
| 2139 | 2103 | } |
| 2140 | 2104 | |
| 2141 | 2105 | WRITE_LINE_DEVICE_HANDLER( sms_store_int_callback ) |
src/mess/machine/lynx.c
| r14963 | r14964 | |
| 826 | 826 | - in divide, the remainder will have 2 possible errors, depending on its actual value (no further |
| 827 | 827 | notes on these errors available) */ |
| 828 | 828 | |
| 829 | | static void lynx_divide( lynx_state *state ) |
| 829 | void lynx_state::lynx_divide() |
| 830 | 830 | { |
| 831 | 831 | UINT32 left; |
| 832 | 832 | UINT16 right; |
| r14963 | r14964 | |
| 840 | 840 | Remainder (JK)LM |
| 841 | 841 | */ |
| 842 | 842 | |
| 843 | | left = state->m_suzy.data[MATH_H] | (state->m_suzy.data[MATH_G] << 8) | (state->m_suzy.data[MATH_F] << 16) | (state->m_suzy.data[MATH_E] << 24); |
| 844 | | right = state->m_suzy.data[MATH_P] | (state->m_suzy.data[MATH_N] << 8); |
| 843 | left = m_suzy.data[MATH_H] | (m_suzy.data[MATH_G] << 8) | (m_suzy.data[MATH_F] << 16) | (m_suzy.data[MATH_E] << 24); |
| 844 | right = m_suzy.data[MATH_P] | (m_suzy.data[MATH_N] << 8); |
| 845 | 845 | |
| 846 | | state->m_suzy.accumulate_overflow = FALSE; |
| 846 | m_suzy.accumulate_overflow = FALSE; |
| 847 | 847 | if (right == 0) |
| 848 | 848 | { |
| 849 | | state->m_suzy.accumulate_overflow = TRUE; /* during divisions, this bit is used to detect denominator = 0 */ |
| 849 | m_suzy.accumulate_overflow = TRUE; /* during divisions, this bit is used to detect denominator = 0 */ |
| 850 | 850 | res = 0xffffffff; |
| 851 | 851 | mod = 0; //? |
| 852 | 852 | } |
| r14963 | r14964 | |
| 856 | 856 | mod = left % right; |
| 857 | 857 | } |
| 858 | 858 | // logerror("coprocessor %8x / %8x = %4x\n", left, right, res); |
| 859 | | state->m_suzy.data[MATH_D] = res & 0xff; |
| 860 | | state->m_suzy.data[MATH_C] = res >> 8; |
| 861 | | state->m_suzy.data[MATH_B] = res >> 16; |
| 862 | | state->m_suzy.data[MATH_A] = res >> 24; |
| 859 | m_suzy.data[MATH_D] = res & 0xff; |
| 860 | m_suzy.data[MATH_C] = res >> 8; |
| 861 | m_suzy.data[MATH_B] = res >> 16; |
| 862 | m_suzy.data[MATH_A] = res >> 24; |
| 863 | 863 | |
| 864 | | state->m_suzy.data[MATH_M] = mod & 0xff; |
| 865 | | state->m_suzy.data[MATH_L] = mod >> 8; |
| 866 | | state->m_suzy.data[MATH_K] = 0; // documentation states the hardware sets these to zero on divides |
| 867 | | state->m_suzy.data[MATH_J] = 0; |
| 864 | m_suzy.data[MATH_M] = mod & 0xff; |
| 865 | m_suzy.data[MATH_L] = mod >> 8; |
| 866 | m_suzy.data[MATH_K] = 0; // documentation states the hardware sets these to zero on divides |
| 867 | m_suzy.data[MATH_J] = 0; |
| 868 | 868 | } |
| 869 | 869 | |
| 870 | | static void lynx_multiply( lynx_state *state ) |
| 870 | void lynx_state::lynx_multiply() |
| 871 | 871 | { |
| 872 | 872 | UINT16 left, right; |
| 873 | 873 | UINT32 res, accu; |
| r14963 | r14964 | |
| 879 | 879 | EFGH |
| 880 | 880 | Accumulate JKLM |
| 881 | 881 | */ |
| 882 | | state->m_suzy.accumulate_overflow = FALSE; |
| 882 | m_suzy.accumulate_overflow = FALSE; |
| 883 | 883 | |
| 884 | | left = state->m_suzy.data[MATH_B] | (state->m_suzy.data[MATH_A] << 8); |
| 885 | | right = state->m_suzy.data[MATH_D] | (state->m_suzy.data[MATH_C] << 8); |
| 884 | left = m_suzy.data[MATH_B] | (m_suzy.data[MATH_A] << 8); |
| 885 | right = m_suzy.data[MATH_D] | (m_suzy.data[MATH_C] << 8); |
| 886 | 886 | |
| 887 | 887 | res = left * right; |
| 888 | 888 | |
| 889 | | if (state->m_suzy.signed_math) |
| 889 | if (m_suzy.signed_math) |
| 890 | 890 | { |
| 891 | | if (!(state->m_sign_AB + state->m_sign_CD)) /* different signs */ |
| 891 | if (!(m_sign_AB + m_sign_CD)) /* different signs */ |
| 892 | 892 | res = (res ^ 0xffffffff) + 1; |
| 893 | 893 | } |
| 894 | 894 | |
| 895 | | state->m_suzy.data[MATH_H] = res & 0xff; |
| 896 | | state->m_suzy.data[MATH_G] = res >> 8; |
| 897 | | state->m_suzy.data[MATH_F] = res >> 16; |
| 898 | | state->m_suzy.data[MATH_E] = res >> 24; |
| 895 | m_suzy.data[MATH_H] = res & 0xff; |
| 896 | m_suzy.data[MATH_G] = res >> 8; |
| 897 | m_suzy.data[MATH_F] = res >> 16; |
| 898 | m_suzy.data[MATH_E] = res >> 24; |
| 899 | 899 | |
| 900 | | if (state->m_suzy.accumulate) |
| 900 | if (m_suzy.accumulate) |
| 901 | 901 | { |
| 902 | | accu = state->m_suzy.data[MATH_M] | state->m_suzy.data[MATH_L] << 8 | state->m_suzy.data[MATH_K] << 16 | state->m_suzy.data[MATH_J] << 24; |
| 902 | accu = m_suzy.data[MATH_M] | m_suzy.data[MATH_L] << 8 | m_suzy.data[MATH_K] << 16 | m_suzy.data[MATH_J] << 24; |
| 903 | 903 | accu += res; |
| 904 | 904 | |
| 905 | 905 | if (accu < res) |
| 906 | | state->m_suzy.accumulate_overflow = TRUE; |
| 906 | m_suzy.accumulate_overflow = TRUE; |
| 907 | 907 | |
| 908 | | state->m_suzy.data[MATH_M] = accu; |
| 909 | | state->m_suzy.data[MATH_L] = accu >> 8; |
| 910 | | state->m_suzy.data[MATH_K] = accu >> 16; |
| 911 | | state->m_suzy.data[MATH_J] = accu >> 24; |
| 908 | m_suzy.data[MATH_M] = accu; |
| 909 | m_suzy.data[MATH_L] = accu >> 8; |
| 910 | m_suzy.data[MATH_K] = accu >> 16; |
| 911 | m_suzy.data[MATH_J] = accu >> 24; |
| 912 | 912 | } |
| 913 | 913 | } |
| 914 | 914 | |
| 915 | | static READ8_HANDLER( suzy_read ) |
| 915 | READ8_MEMBER(lynx_state::suzy_read) |
| 916 | 916 | { |
| 917 | | lynx_state *state = space->machine().driver_data<lynx_state>(); |
| 918 | 917 | UINT8 value = 0, input; |
| 919 | 918 | |
| 920 | 919 | switch (offset) |
| 921 | 920 | { |
| 922 | 921 | case TILTACUML: |
| 923 | | return state->m_blitter.tilt_accumulator & 0xff; |
| 922 | return m_blitter.tilt_accumulator & 0xff; |
| 924 | 923 | case TILTACUMH: |
| 925 | | return state->m_blitter.tilt_accumulator>>8; |
| 924 | return m_blitter.tilt_accumulator>>8; |
| 926 | 925 | case HOFFL: |
| 927 | | return state->m_blitter.xoff & 0xff; |
| 926 | return m_blitter.xoff & 0xff; |
| 928 | 927 | case HOFFH: |
| 929 | | return state->m_blitter.xoff>>8; |
| 928 | return m_blitter.xoff>>8; |
| 930 | 929 | case VOFFL: |
| 931 | | return state->m_blitter.yoff & 0xff; |
| 930 | return m_blitter.yoff & 0xff; |
| 932 | 931 | case VOFFH: |
| 933 | | return state->m_blitter.yoff>>8; |
| 932 | return m_blitter.yoff>>8; |
| 934 | 933 | case VIDBASL: |
| 935 | | return state->m_blitter.screen & 0xff; |
| 934 | return m_blitter.screen & 0xff; |
| 936 | 935 | case VIDBASH: |
| 937 | | return state->m_blitter.screen>>8; |
| 936 | return m_blitter.screen>>8; |
| 938 | 937 | case COLLBASL: |
| 939 | | return state->m_blitter.colbuf & 0xff; |
| 938 | return m_blitter.colbuf & 0xff; |
| 940 | 939 | case COLLBASH: |
| 941 | | return state->m_blitter.colbuf>>8; |
| 940 | return m_blitter.colbuf>>8; |
| 942 | 941 | case SCBNEXTL: |
| 943 | | return state->m_blitter.scb_next & 0xff; |
| 942 | return m_blitter.scb_next & 0xff; |
| 944 | 943 | case SCBNEXTH: |
| 945 | | return state->m_blitter.scb_next>>8; |
| 944 | return m_blitter.scb_next>>8; |
| 946 | 945 | case SPRDLINEL: |
| 947 | | return state->m_blitter.bitmap & 0xff; |
| 946 | return m_blitter.bitmap & 0xff; |
| 948 | 947 | case SPRDLINEH: |
| 949 | | return state->m_blitter.bitmap>>8; |
| 948 | return m_blitter.bitmap>>8; |
| 950 | 949 | case HPOSSTRTL: |
| 951 | | return state->m_blitter.x_pos & 0xff; |
| 950 | return m_blitter.x_pos & 0xff; |
| 952 | 951 | case HPOSSTRTH: |
| 953 | | return state->m_blitter.x_pos>>8; |
| 952 | return m_blitter.x_pos>>8; |
| 954 | 953 | case VPOSSTRTL: |
| 955 | | return state->m_blitter.y_pos & 0xff; |
| 954 | return m_blitter.y_pos & 0xff; |
| 956 | 955 | case VPOSSTRTH: |
| 957 | | return state->m_blitter.y_pos>>8; |
| 956 | return m_blitter.y_pos>>8; |
| 958 | 957 | case SPRHSIZL: |
| 959 | | return state->m_blitter.width & 0xff; |
| 958 | return m_blitter.width & 0xff; |
| 960 | 959 | case SPRHSIZH: |
| 961 | | return state->m_blitter.width>>8; |
| 960 | return m_blitter.width>>8; |
| 962 | 961 | case SPRVSIZL: |
| 963 | | return state->m_blitter.height & 0xff; |
| 962 | return m_blitter.height & 0xff; |
| 964 | 963 | case SPRVSIZH: |
| 965 | | return state->m_blitter.height>>8; |
| 964 | return m_blitter.height>>8; |
| 966 | 965 | case STRETCHL: |
| 967 | | return state->m_blitter.stretch & 0xff; |
| 966 | return m_blitter.stretch & 0xff; |
| 968 | 967 | case STRETCHH: |
| 969 | | return state->m_blitter.stretch>>8; |
| 968 | return m_blitter.stretch>>8; |
| 970 | 969 | case TILTL: |
| 971 | | return state->m_blitter.tilt & 0xff; |
| 970 | return m_blitter.tilt & 0xff; |
| 972 | 971 | case TILTH: |
| 973 | | return state->m_blitter.tilt>>8; |
| 972 | return m_blitter.tilt>>8; |
| 974 | 973 | // case SPRDOFFL: |
| 975 | 974 | // case SPRVPOSL: |
| 976 | 975 | // case COLLOFFL: |
| 977 | 976 | case VSIZACUML: |
| 978 | | return state->m_blitter.height_accumulator & 0xff; |
| 977 | return m_blitter.height_accumulator & 0xff; |
| 979 | 978 | case VSIZACUMH: |
| 980 | | return state->m_blitter.height_accumulator>>8; |
| 979 | return m_blitter.height_accumulator>>8; |
| 981 | 980 | case HSIZOFFL: |
| 982 | | return state->m_blitter.width_offset & 0xff; |
| 981 | return m_blitter.width_offset & 0xff; |
| 983 | 982 | case HSIZOFFH: |
| 984 | | return state->m_blitter.width_offset>>8; |
| 983 | return m_blitter.width_offset>>8; |
| 985 | 984 | case VSIZOFFL: |
| 986 | | return state->m_blitter.height_offset & 0xff; |
| 985 | return m_blitter.height_offset & 0xff; |
| 987 | 986 | case VSIZOFFH: |
| 988 | | return state->m_blitter.height_offset>>8; |
| 987 | return m_blitter.height_offset>>8; |
| 989 | 988 | case SCBADRL: |
| 990 | | return state->m_blitter.scb & 0xff; |
| 989 | return m_blitter.scb & 0xff; |
| 991 | 990 | case SCBADRH: |
| 992 | | return state->m_blitter.scb>>8; |
| 991 | return m_blitter.scb>>8; |
| 993 | 992 | //case PROCADRL: |
| 994 | 993 | case SUZYHREV: |
| 995 | 994 | return 0x01; // must not be 0 for correct power up |
| 996 | 995 | case SPRSYS: |
| 997 | 996 | // math busy, last carry, unsafe access, and stop on current sprite bits not implemented. |
| 998 | | if (state->m_suzy.accumulate_overflow) |
| 997 | if (m_suzy.accumulate_overflow) |
| 999 | 998 | value |= 0x40; |
| 1000 | | if (state->m_blitter.vstretch) |
| 999 | if (m_blitter.vstretch) |
| 1001 | 1000 | value |= 0x10; |
| 1002 | | if (state->m_blitter.lefthanded) |
| 1001 | if (m_blitter.lefthanded) |
| 1003 | 1002 | value |= 0x08; |
| 1004 | | if (state->m_blitter.busy) |
| 1003 | if (m_blitter.busy) |
| 1005 | 1004 | value |= 0x01; |
| 1006 | 1005 | break; |
| 1007 | 1006 | case JOYSTICK: |
| 1008 | | input = input_port_read(space->machine(), "JOY"); |
| 1009 | | switch (state->m_rotate) |
| 1007 | input = input_port_read(machine(), "JOY"); |
| 1008 | switch (m_rotate) |
| 1010 | 1009 | { |
| 1011 | 1010 | case 1: |
| 1012 | 1011 | value = input; |
| r14963 | r14964 | |
| 1025 | 1024 | if (value & PAD_LEFT) input |= PAD_UP; |
| 1026 | 1025 | break; |
| 1027 | 1026 | } |
| 1028 | | if (state->m_blitter.lefthanded) |
| 1027 | if (m_blitter.lefthanded) |
| 1029 | 1028 | { |
| 1030 | 1029 | value = input & 0x0f; |
| 1031 | 1030 | if (input & PAD_UP) value |= PAD_DOWN; |
| r14963 | r14964 | |
| 1037 | 1036 | value = input; |
| 1038 | 1037 | break; |
| 1039 | 1038 | case SWITCHES: |
| 1040 | | value = input_port_read(space->machine(), "PAUSE"); |
| 1039 | value = input_port_read(machine(), "PAUSE"); |
| 1041 | 1040 | break; |
| 1042 | 1041 | case RCART: |
| 1043 | | value = *(space->machine().region("user1")->base() + (state->m_suzy.high * state->m_granularity) + state->m_suzy.low); |
| 1044 | | state->m_suzy.low = (state->m_suzy.low + 1) & (state->m_granularity - 1); |
| 1042 | value = *(machine().region("user1")->base() + (m_suzy.high * m_granularity) + m_suzy.low); |
| 1043 | m_suzy.low = (m_suzy.low + 1) & (m_granularity - 1); |
| 1045 | 1044 | break; |
| 1046 | 1045 | //case RCART_BANK1: /* we need bank 1 emulation!!! */ |
| 1047 | 1046 | case SPRCTL0: |
| r14963 | r14964 | |
| 1054 | 1053 | value = 0; |
| 1055 | 1054 | break; |
| 1056 | 1055 | default: |
| 1057 | | value = state->m_suzy.data[offset]; |
| 1056 | value = m_suzy.data[offset]; |
| 1058 | 1057 | } |
| 1059 | 1058 | //logerror("suzy read %.2x %.2x\n",offset,value); |
| 1060 | 1059 | return value; |
| 1061 | 1060 | } |
| 1062 | 1061 | |
| 1063 | | static WRITE8_HANDLER( suzy_write ) |
| 1062 | WRITE8_MEMBER(lynx_state::suzy_write) |
| 1064 | 1063 | { |
| 1065 | | lynx_state *state = space->machine().driver_data<lynx_state>(); |
| 1066 | | state->m_suzy.data[offset] = data; |
| 1064 | m_suzy.data[offset] = data; |
| 1067 | 1065 | //logerror("suzy write %.2x %.2x\n",offset,data); |
| 1068 | 1066 | /* Additional effects of a write */ |
| 1069 | 1067 | /* Even addresses are the LSB. Any CPU write to an LSB in 0x00-0x7f will set the MSB to 0. */ |
| r14963 | r14964 | |
| 1071 | 1069 | F (0x62), H (0x60), K (0x6e) or M (0x6c) will force a '0' to be written to A (0x55), |
| 1072 | 1070 | C (0x53), E (0x63), G (0x61), J (0x6f) or L (0x6d) respectively */ |
| 1073 | 1071 | if ((offset < 0x80) && !(offset & 0x01)) |
| 1074 | | state->m_suzy.data[offset + 1] = 0; |
| 1072 | m_suzy.data[offset + 1] = 0; |
| 1075 | 1073 | |
| 1076 | 1074 | switch(offset) |
| 1077 | 1075 | { |
| 1078 | 1076 | //case TMPADRL: |
| 1079 | 1077 | //case TMPADRH: |
| 1080 | 1078 | case TILTACUML: |
| 1081 | | state->m_blitter.tilt_accumulator = data; // upper byte forced to zero see above. |
| 1079 | m_blitter.tilt_accumulator = data; // upper byte forced to zero see above. |
| 1082 | 1080 | break; |
| 1083 | 1081 | case TILTACUMH: |
| 1084 | | state->m_blitter.tilt_accumulator &= 0xff; |
| 1085 | | state->m_blitter.tilt_accumulator |= data<<8; |
| 1082 | m_blitter.tilt_accumulator &= 0xff; |
| 1083 | m_blitter.tilt_accumulator |= data<<8; |
| 1086 | 1084 | break; |
| 1087 | 1085 | case HOFFL: |
| 1088 | | state->m_blitter.xoff = data; |
| 1086 | m_blitter.xoff = data; |
| 1089 | 1087 | break; |
| 1090 | 1088 | case HOFFH: |
| 1091 | | state->m_blitter.xoff &= 0xff; |
| 1092 | | state->m_blitter.xoff |= data<<8; |
| 1089 | m_blitter.xoff &= 0xff; |
| 1090 | m_blitter.xoff |= data<<8; |
| 1093 | 1091 | break; |
| 1094 | 1092 | case VOFFL: |
| 1095 | | state->m_blitter.yoff = data; |
| 1093 | m_blitter.yoff = data; |
| 1096 | 1094 | break; |
| 1097 | 1095 | case VOFFH: |
| 1098 | | state->m_blitter.yoff &= 0xff; |
| 1099 | | state->m_blitter.yoff |= data<<8; |
| 1096 | m_blitter.yoff &= 0xff; |
| 1097 | m_blitter.yoff |= data<<8; |
| 1100 | 1098 | break; |
| 1101 | 1099 | case VIDBASL: |
| 1102 | | state->m_blitter.screen = data; |
| 1100 | m_blitter.screen = data; |
| 1103 | 1101 | break; |
| 1104 | 1102 | case VIDBASH: |
| 1105 | | state->m_blitter.screen &= 0xff; |
| 1106 | | state->m_blitter.screen |= data<<8; |
| 1103 | m_blitter.screen &= 0xff; |
| 1104 | m_blitter.screen |= data<<8; |
| 1107 | 1105 | break; |
| 1108 | 1106 | case COLLBASL: |
| 1109 | | state->m_blitter.colbuf = data; |
| 1107 | m_blitter.colbuf = data; |
| 1110 | 1108 | break; |
| 1111 | 1109 | case COLLBASH: |
| 1112 | | state->m_blitter.colbuf &= 0xff; |
| 1113 | | state->m_blitter.colbuf |= data<<8; |
| 1110 | m_blitter.colbuf &= 0xff; |
| 1111 | m_blitter.colbuf |= data<<8; |
| 1114 | 1112 | break; |
| 1115 | 1113 | case SCBNEXTL: |
| 1116 | | state->m_blitter.scb_next = data; |
| 1114 | m_blitter.scb_next = data; |
| 1117 | 1115 | break; |
| 1118 | 1116 | case SCBNEXTH: |
| 1119 | | state->m_blitter.scb_next &= 0xff; |
| 1120 | | state->m_blitter.scb_next |= data<<8; |
| 1117 | m_blitter.scb_next &= 0xff; |
| 1118 | m_blitter.scb_next |= data<<8; |
| 1121 | 1119 | break; |
| 1122 | 1120 | case SPRDLINEL: |
| 1123 | | state->m_blitter.bitmap = data; |
| 1121 | m_blitter.bitmap = data; |
| 1124 | 1122 | break; |
| 1125 | 1123 | case SPRDLINEH: |
| 1126 | | state->m_blitter.bitmap &= 0xff; |
| 1127 | | state->m_blitter.bitmap |= data<<8; |
| 1124 | m_blitter.bitmap &= 0xff; |
| 1125 | m_blitter.bitmap |= data<<8; |
| 1128 | 1126 | break; |
| 1129 | 1127 | case HPOSSTRTL: |
| 1130 | | state->m_blitter.x_pos = data; |
| 1128 | m_blitter.x_pos = data; |
| 1131 | 1129 | case HPOSSTRTH: |
| 1132 | | state->m_blitter.x_pos &= 0xff; |
| 1133 | | state->m_blitter.x_pos |= data<<8; |
| 1130 | m_blitter.x_pos &= 0xff; |
| 1131 | m_blitter.x_pos |= data<<8; |
| 1134 | 1132 | case VPOSSTRTL: |
| 1135 | | state->m_blitter.y_pos = data; |
| 1133 | m_blitter.y_pos = data; |
| 1136 | 1134 | case VPOSSTRTH: |
| 1137 | | state->m_blitter.y_pos &= 0xff; |
| 1138 | | state->m_blitter.y_pos |= data<<8; |
| 1135 | m_blitter.y_pos &= 0xff; |
| 1136 | m_blitter.y_pos |= data<<8; |
| 1139 | 1137 | case SPRHSIZL: |
| 1140 | | state->m_blitter.width = data; |
| 1138 | m_blitter.width = data; |
| 1141 | 1139 | break; |
| 1142 | 1140 | case SPRHSIZH: |
| 1143 | | state->m_blitter.width &= 0xff; |
| 1144 | | state->m_blitter.width |= data<<8; |
| 1141 | m_blitter.width &= 0xff; |
| 1142 | m_blitter.width |= data<<8; |
| 1145 | 1143 | break; |
| 1146 | 1144 | case SPRVSIZL: |
| 1147 | | state->m_blitter.height = data; |
| 1145 | m_blitter.height = data; |
| 1148 | 1146 | break; |
| 1149 | 1147 | case SPRVSIZH: |
| 1150 | | state->m_blitter.height &= 0xff; |
| 1151 | | state->m_blitter.height |= data<<8; |
| 1148 | m_blitter.height &= 0xff; |
| 1149 | m_blitter.height |= data<<8; |
| 1152 | 1150 | break; |
| 1153 | 1151 | case STRETCHL: |
| 1154 | | state->m_blitter.stretch = data; |
| 1152 | m_blitter.stretch = data; |
| 1155 | 1153 | break; |
| 1156 | 1154 | case STRETCHH: |
| 1157 | | state->m_blitter.stretch &= 0xff; |
| 1158 | | state->m_blitter.stretch |= data<<8; |
| 1155 | m_blitter.stretch &= 0xff; |
| 1156 | m_blitter.stretch |= data<<8; |
| 1159 | 1157 | break; |
| 1160 | 1158 | case TILTL: |
| 1161 | | state->m_blitter.tilt = data; |
| 1159 | m_blitter.tilt = data; |
| 1162 | 1160 | break; |
| 1163 | 1161 | case TILTH: |
| 1164 | | state->m_blitter.tilt &= 0xff; |
| 1165 | | state->m_blitter.tilt |= data<<8; |
| 1162 | m_blitter.tilt &= 0xff; |
| 1163 | m_blitter.tilt |= data<<8; |
| 1166 | 1164 | break; |
| 1167 | 1165 | // case SPRDOFFL: |
| 1168 | 1166 | // case SPRVPOSL: |
| 1169 | 1167 | // case COLLOFFL: |
| 1170 | 1168 | case VSIZACUML: |
| 1171 | | state->m_blitter.height_accumulator = data; |
| 1169 | m_blitter.height_accumulator = data; |
| 1172 | 1170 | break; |
| 1173 | 1171 | case VSIZACUMH: |
| 1174 | | state->m_blitter.height_accumulator &= 0xff; |
| 1175 | | state->m_blitter.height_accumulator |= data<<8; |
| 1172 | m_blitter.height_accumulator &= 0xff; |
| 1173 | m_blitter.height_accumulator |= data<<8; |
| 1176 | 1174 | break; |
| 1177 | 1175 | case HSIZOFFL: |
| 1178 | | state->m_blitter.width_offset = data; |
| 1176 | m_blitter.width_offset = data; |
| 1179 | 1177 | break; |
| 1180 | 1178 | case HSIZOFFH: |
| 1181 | | state->m_blitter.width_offset &= 0xff; |
| 1182 | | state->m_blitter.width_offset |= data<<8; |
| 1179 | m_blitter.width_offset &= 0xff; |
| 1180 | m_blitter.width_offset |= data<<8; |
| 1183 | 1181 | break; |
| 1184 | 1182 | case VSIZOFFL: |
| 1185 | | state->m_blitter.height_offset = data; |
| 1183 | m_blitter.height_offset = data; |
| 1186 | 1184 | break; |
| 1187 | 1185 | case VSIZOFFH: |
| 1188 | | state->m_blitter.height_offset &= 0xff; |
| 1189 | | state->m_blitter.height_offset |= data<<8; |
| 1186 | m_blitter.height_offset &= 0xff; |
| 1187 | m_blitter.height_offset |= data<<8; |
| 1190 | 1188 | break; |
| 1191 | 1189 | case SCBADRL: |
| 1192 | | state->m_blitter.scb = data; |
| 1190 | m_blitter.scb = data; |
| 1193 | 1191 | break; |
| 1194 | 1192 | case SCBADRH: |
| 1195 | | state->m_blitter.scb &= 0xff; |
| 1196 | | state->m_blitter.scb |= data<<8; |
| 1193 | m_blitter.scb &= 0xff; |
| 1194 | m_blitter.scb |= data<<8; |
| 1197 | 1195 | break; |
| 1198 | 1196 | //case PROCADRL: |
| 1199 | 1197 | |
| 1200 | 1198 | /* Writing to M (0x6c) will also clear the accumulator overflow bit */ |
| 1201 | 1199 | case MATH_M: |
| 1202 | | state->m_suzy.accumulate_overflow = FALSE; |
| 1200 | m_suzy.accumulate_overflow = FALSE; |
| 1203 | 1201 | break; |
| 1204 | 1202 | case MATH_C: |
| 1205 | 1203 | /* If we are going to perform a signed multiplication, we store the sign and convert the number |
| 1206 | 1204 | to an unsigned one */ |
| 1207 | | if (state->m_suzy.signed_math) |
| 1205 | if (m_suzy.signed_math) |
| 1208 | 1206 | { |
| 1209 | 1207 | UINT16 factor, temp; |
| 1210 | | factor = state->m_suzy.data[MATH_D] | (state->m_suzy.data[MATH_C] << 8); |
| 1208 | factor = m_suzy.data[MATH_D] | (m_suzy.data[MATH_C] << 8); |
| 1211 | 1209 | if ((factor - 1) & 0x8000) /* here we use -1 to cover the math bugs on the sign of 0 and 0x8000 */ |
| 1212 | 1210 | { |
| 1213 | 1211 | temp = (factor ^ 0xffff) + 1; |
| 1214 | | state->m_sign_CD = - 1; |
| 1215 | | state->m_suzy.data[MATH_D] = temp & 0xff; |
| 1216 | | state->m_suzy.data[MATH_C] = temp >> 8; |
| 1212 | m_sign_CD = - 1; |
| 1213 | m_suzy.data[MATH_D] = temp & 0xff; |
| 1214 | m_suzy.data[MATH_C] = temp >> 8; |
| 1217 | 1215 | } |
| 1218 | 1216 | else |
| 1219 | | state->m_sign_CD = 1; |
| 1217 | m_sign_CD = 1; |
| 1220 | 1218 | } |
| 1221 | 1219 | break; |
| 1222 | 1220 | case MATH_D: |
| r14963 | r14964 | |
| 1225 | 1223 | Either the sign error in the docs is not as described or writing to the lower byte does update the sign flag. |
| 1226 | 1224 | Here I assume the sign flag gets updated. */ |
| 1227 | 1225 | if (data) |
| 1228 | | state->m_sign_CD = 1; |
| 1226 | m_sign_CD = 1; |
| 1229 | 1227 | break; |
| 1230 | 1228 | /* Writing to A will start a 16 bit multiply */ |
| 1231 | 1229 | /* If we are going to perform a signed multiplication, we also store the sign and convert the |
| 1232 | 1230 | number to an unsigned one */ |
| 1233 | 1231 | case MATH_A: |
| 1234 | | if (state->m_suzy.signed_math) |
| 1232 | if (m_suzy.signed_math) |
| 1235 | 1233 | { |
| 1236 | 1234 | UINT16 factor, temp; |
| 1237 | | factor = state->m_suzy.data[MATH_B] | (state->m_suzy.data[MATH_A] << 8); |
| 1235 | factor = m_suzy.data[MATH_B] | (m_suzy.data[MATH_A] << 8); |
| 1238 | 1236 | if ((factor - 1) & 0x8000) /* here we use -1 to cover the math bugs on the sign of 0 and 0x8000 */ |
| 1239 | 1237 | { |
| 1240 | 1238 | temp = (factor ^ 0xffff) + 1; |
| 1241 | | state->m_sign_AB = - 1; |
| 1242 | | state->m_suzy.data[MATH_B] = temp & 0xff; |
| 1243 | | state->m_suzy.data[MATH_A] = temp >> 8; |
| 1239 | m_sign_AB = - 1; |
| 1240 | m_suzy.data[MATH_B] = temp & 0xff; |
| 1241 | m_suzy.data[MATH_A] = temp >> 8; |
| 1244 | 1242 | } |
| 1245 | 1243 | else |
| 1246 | | state->m_sign_AB = 1; |
| 1244 | m_sign_AB = 1; |
| 1247 | 1245 | } |
| 1248 | | lynx_multiply(state); |
| 1246 | lynx_multiply(); |
| 1249 | 1247 | break; |
| 1250 | 1248 | /* Writing to E will start a 16 bit divide */ |
| 1251 | 1249 | case MATH_E: |
| 1252 | | lynx_divide(state); |
| 1250 | lynx_divide(); |
| 1253 | 1251 | break; |
| 1254 | 1252 | case SPRCTL0: |
| 1255 | | state->m_blitter.spr_ctl0 = data; |
| 1253 | m_blitter.spr_ctl0 = data; |
| 1256 | 1254 | break; |
| 1257 | 1255 | case SPRCTL1: |
| 1258 | | state->m_blitter.spr_ctl1 = data; |
| 1256 | m_blitter.spr_ctl1 = data; |
| 1259 | 1257 | break; |
| 1260 | 1258 | case SPRCOLL: |
| 1261 | | state->m_blitter.spr_coll = data; |
| 1259 | m_blitter.spr_coll = data; |
| 1262 | 1260 | break; |
| 1263 | 1261 | case SUZYBUSEN: |
| 1264 | 1262 | logerror("write to SUSYBUSEN %x \n", data); |
| 1265 | 1263 | break; |
| 1266 | 1264 | case SPRSYS: |
| 1267 | | state->m_suzy.signed_math = (data & 0x80) ? 1:0; |
| 1268 | | state->m_suzy.accumulate = (data & 0x40) ? 1:0; |
| 1269 | | state->m_blitter.no_collide = (data & 0x20) ? 1:0; |
| 1270 | | state->m_blitter.vstretch = (data & 0x10) ? 1:0; |
| 1271 | | state->m_blitter.lefthanded = (data & 0x08) ? 1:0; |
| 1265 | m_suzy.signed_math = (data & 0x80) ? 1:0; |
| 1266 | m_suzy.accumulate = (data & 0x40) ? 1:0; |
| 1267 | m_blitter.no_collide = (data & 0x20) ? 1:0; |
| 1268 | m_blitter.vstretch = (data & 0x10) ? 1:0; |
| 1269 | m_blitter.lefthanded = (data & 0x08) ? 1:0; |
| 1272 | 1270 | // unsafe access clear and sprite engine stop request are not enabled |
| 1273 | 1271 | if (data & 0x02) logerror("sprite engine stop request\n"); |
| 1274 | 1272 | break; |
| 1275 | 1273 | case SPRGO: |
| 1276 | | if ((data & 0x01) && state->m_suzy.data[SUZYBUSEN]) |
| 1274 | if ((data & 0x01) && m_suzy.data[SUZYBUSEN]) |
| 1277 | 1275 | { |
| 1278 | | //state->m_blitter.time = space->machine().time(); |
| 1279 | | lynx_blitter(space->machine()); |
| 1276 | //m_blitter.time = machine().time(); |
| 1277 | lynx_blitter(machine()); |
| 1280 | 1278 | } |
| 1281 | 1279 | break; |
| 1282 | 1280 | case JOYSTICK: |
| r14963 | r14964 | |
| 1524 | 1522 | } |
| 1525 | 1523 | } |
| 1526 | 1524 | |
| 1527 | | static UINT8 lynx_timer_read(lynx_state *state, int which, int offset) |
| 1525 | UINT8 lynx_state::lynx_timer_read(int which, int offset) |
| 1528 | 1526 | { |
| 1529 | 1527 | UINT8 value = 0; |
| 1530 | 1528 | |
| 1531 | 1529 | switch (offset) |
| 1532 | 1530 | { |
| 1533 | 1531 | case 0: |
| 1534 | | value = state->m_timer[which].bakup; |
| 1532 | value = m_timer[which].bakup; |
| 1535 | 1533 | break; |
| 1536 | 1534 | case 1: |
| 1537 | | value = state->m_timer[which].cntrl1; |
| 1535 | value = m_timer[which].cntrl1; |
| 1538 | 1536 | break; |
| 1539 | 1537 | case 2: |
| 1540 | | if ((state->m_timer[which].cntrl1 & 0x07) == 0x07) // linked timer |
| 1538 | if ((m_timer[which].cntrl1 & 0x07) == 0x07) // linked timer |
| 1541 | 1539 | { |
| 1542 | | value = state->m_timer[which].counter; |
| 1540 | value = m_timer[which].counter; |
| 1543 | 1541 | } |
| 1544 | 1542 | else |
| 1545 | 1543 | { |
| 1546 | | if ( state->m_timer[which].timer_active ) |
| 1544 | if ( m_timer[which].timer_active ) |
| 1547 | 1545 | { |
| 1548 | | value = (UINT8) (state->m_timer[which].timer->remaining().as_ticks(1000000>>(state->m_timer[which].cntrl1 & 0x07))); |
| 1546 | value = (UINT8) (m_timer[which].timer->remaining().as_ticks(1000000>>(m_timer[which].cntrl1 & 0x07))); |
| 1549 | 1547 | value -= value ? 1 : 0; |
| 1550 | 1548 | } |
| 1551 | 1549 | } |
| 1552 | 1550 | break; |
| 1553 | 1551 | |
| 1554 | 1552 | case 3: |
| 1555 | | value = state->m_timer[which].cntrl2; |
| 1553 | value = m_timer[which].cntrl2; |
| 1556 | 1554 | break; |
| 1557 | 1555 | } |
| 1558 | 1556 | // logerror("timer %d read %x %.2x\n", which, offset, value); |
| 1559 | 1557 | return value; |
| 1560 | 1558 | } |
| 1561 | 1559 | |
| 1562 | | static void lynx_timer_write(lynx_state *state, int which, int offset, UINT8 data) |
| 1560 | void lynx_state::lynx_timer_write(int which, int offset, UINT8 data) |
| 1563 | 1561 | { |
| 1564 | 1562 | //logerror("timer %d write %x %.2x\n", which, offset, data); |
| 1565 | 1563 | attotime t; |
| 1566 | 1564 | |
| 1567 | | if ( state->m_timer[which].timer_active && ((state->m_timer[which].cntrl1 & 0x07) != 0x07)) |
| 1565 | if ( m_timer[which].timer_active && ((m_timer[which].cntrl1 & 0x07) != 0x07)) |
| 1568 | 1566 | { |
| 1569 | | state->m_timer[which].counter = (UINT8) (state->m_timer[which].timer->remaining().as_ticks(1000000>>(state->m_timer[which].cntrl1 & 0x07))); |
| 1570 | | state->m_timer[which].counter -= (state->m_timer[which].counter) ? 1 : 0; |
| 1567 | m_timer[which].counter = (UINT8) (m_timer[which].timer->remaining().as_ticks(1000000>>(m_timer[which].cntrl1 & 0x07))); |
| 1568 | m_timer[which].counter -= (m_timer[which].counter) ? 1 : 0; |
| 1571 | 1569 | } |
| 1572 | 1570 | |
| 1573 | 1571 | switch (offset) |
| 1574 | 1572 | { |
| 1575 | 1573 | case 0: |
| 1576 | | state->m_timer[which].bakup = data; |
| 1574 | m_timer[which].bakup = data; |
| 1577 | 1575 | break; |
| 1578 | 1576 | case 1: |
| 1579 | | state->m_timer[which].cntrl1 = data; |
| 1577 | m_timer[which].cntrl1 = data; |
| 1580 | 1578 | if (data & 0x40) // reset timer done |
| 1581 | | state->m_timer[which].cntrl2 &= ~0x08; |
| 1579 | m_timer[which].cntrl2 &= ~0x08; |
| 1582 | 1580 | break; |
| 1583 | 1581 | case 2: |
| 1584 | | state->m_timer[which].counter = data; |
| 1582 | m_timer[which].counter = data; |
| 1585 | 1583 | break; |
| 1586 | 1584 | case 3: |
| 1587 | | state->m_timer[which].cntrl2 = (state->m_timer[which].cntrl2 & ~0x08) | (data & 0x08); |
| 1585 | m_timer[which].cntrl2 = (m_timer[which].cntrl2 & ~0x08) | (data & 0x08); |
| 1588 | 1586 | break; |
| 1589 | 1587 | } |
| 1590 | 1588 | |
| 1591 | 1589 | /* Update timers */ |
| 1592 | 1590 | //if ( offset < 3 ) |
| 1593 | 1591 | //{ |
| 1594 | | state->m_timer[which].timer->reset(); |
| 1595 | | state->m_timer[which].timer_active = 0; |
| 1596 | | if ((state->m_timer[which].cntrl1 & 0x08) && !(state->m_timer[which].cntrl2 & 0x08)) // if enable count |
| 1592 | m_timer[which].timer->reset(); |
| 1593 | m_timer[which].timer_active = 0; |
| 1594 | if ((m_timer[which].cntrl1 & 0x08) && !(m_timer[which].cntrl2 & 0x08)) // if enable count |
| 1597 | 1595 | { |
| 1598 | | if ((state->m_timer[which].cntrl1 & 0x07) != 0x07) // if not set to link mode |
| 1596 | if ((m_timer[which].cntrl1 & 0x07) != 0x07) // if not set to link mode |
| 1599 | 1597 | { |
| 1600 | | t = (attotime::from_hz(lynx_time_factor(state->m_timer[which].cntrl1 & 0x07)) * (state->m_timer[which].counter + 1)); |
| 1601 | | state->m_timer[which].timer->adjust(t, which); |
| 1602 | | state->m_timer[which].timer_active = 1; |
| 1598 | t = (attotime::from_hz(lynx_time_factor(m_timer[which].cntrl1 & 0x07)) * (m_timer[which].counter + 1)); |
| 1599 | m_timer[which].timer->adjust(t, which); |
| 1600 | m_timer[which].timer_active = 1; |
| 1603 | 1601 | } |
| 1604 | 1602 | } |
| 1605 | 1603 | //} |
| r14963 | r14964 | |
| 1678 | 1676 | return value; |
| 1679 | 1677 | } |
| 1680 | 1678 | |
| 1681 | | static WRITE8_HANDLER(lynx_uart_w) |
| 1679 | WRITE8_MEMBER(lynx_state::lynx_uart_w) |
| 1682 | 1680 | { |
| 1683 | | lynx_state *state = space->machine().driver_data<lynx_state>(); |
| 1684 | 1681 | logerror("uart write %.2x %.2x\n", offset, data); |
| 1685 | 1682 | switch (offset) |
| 1686 | 1683 | { |
| 1687 | 1684 | case 0x8c: |
| 1688 | | state->m_uart.serctl = data; |
| 1685 | m_uart.serctl = data; |
| 1689 | 1686 | break; |
| 1690 | 1687 | |
| 1691 | 1688 | case 0x8d: |
| 1692 | | if (state->m_uart.sending) |
| 1689 | if (m_uart.sending) |
| 1693 | 1690 | { |
| 1694 | | state->m_uart.buffer = data; |
| 1695 | | state->m_uart.buffer_loaded = TRUE; |
| 1691 | m_uart.buffer = data; |
| 1692 | m_uart.buffer_loaded = TRUE; |
| 1696 | 1693 | } |
| 1697 | 1694 | else |
| 1698 | 1695 | { |
| 1699 | | state->m_uart.sending = TRUE; |
| 1700 | | state->m_uart.data_to_send = data; |
| 1696 | m_uart.sending = TRUE; |
| 1697 | m_uart.data_to_send = data; |
| 1701 | 1698 | // timing not accurate, baude rate should be calculated from timer 4 backup value and clock rate |
| 1702 | | space->machine().scheduler().timer_set(attotime::from_usec(11*16), FUNC(lynx_uart_timer)); |
| 1699 | machine().scheduler().timer_set(attotime::from_usec(11*16), FUNC(lynx_uart_timer)); |
| 1703 | 1700 | } |
| 1704 | 1701 | break; |
| 1705 | 1702 | } |
| r14963 | r14964 | |
| 1713 | 1710 | ****************************************/ |
| 1714 | 1711 | |
| 1715 | 1712 | |
| 1716 | | static READ8_HANDLER( mikey_read ) |
| 1713 | READ8_MEMBER(lynx_state::mikey_read) |
| 1717 | 1714 | { |
| 1718 | | lynx_state *state = space->machine().driver_data<lynx_state>(); |
| 1719 | 1715 | UINT8 direction, value = 0x00; |
| 1720 | 1716 | |
| 1721 | 1717 | switch (offset) |
| r14963 | r14964 | |
| 1728 | 1724 | case 0x14: case 0x15: case 0x16: case 0x17: |
| 1729 | 1725 | case 0x18: case 0x19: case 0x1a: case 0x1b: |
| 1730 | 1726 | case 0x1c: case 0x1d: case 0x1e: case 0x1f: |
| 1731 | | value = lynx_timer_read(state, offset >> 2, offset & 0x03); |
| 1727 | value = lynx_timer_read(offset >> 2, offset & 0x03); |
| 1732 | 1728 | break; |
| 1733 | 1729 | |
| 1734 | 1730 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: |
| r14963 | r14964 | |
| 1736 | 1732 | case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: |
| 1737 | 1733 | case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: |
| 1738 | 1734 | case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x50: |
| 1739 | | value = lynx_audio_read(state->m_audio, offset); |
| 1735 | value = lynx_audio_read(m_audio, offset); |
| 1740 | 1736 | break; |
| 1741 | 1737 | |
| 1742 | 1738 | case 0x80: |
| 1743 | 1739 | case 0x81: |
| 1744 | | value = state->m_mikey.data[0x81]; // both registers access the same interupt status byte |
| 1740 | value = m_mikey.data[0x81]; // both registers access the same interupt status byte |
| 1745 | 1741 | // logerror( "mikey read %.2x %.2x\n", offset, value ); |
| 1746 | 1742 | break; |
| 1747 | 1743 | |
| r14963 | r14964 | |
| 1759 | 1755 | break; |
| 1760 | 1756 | |
| 1761 | 1757 | case 0x8b: |
| 1762 | | direction = state->m_mikey.data[0x8a]; |
| 1763 | | value |= (direction & 0x01) ? (state->m_mikey.data[offset] & 0x01) : 0x01; // External Power input |
| 1764 | | value |= (direction & 0x02) ? (state->m_mikey.data[offset] & 0x02) : 0x00; // Cart Address Data output (0 turns cart power on) |
| 1765 | | value |= (direction & 0x04) ? (state->m_mikey.data[offset] & 0x04) : 0x04; // noexp input |
| 1758 | direction = m_mikey.data[0x8a]; |
| 1759 | value |= (direction & 0x01) ? (m_mikey.data[offset] & 0x01) : 0x01; // External Power input |
| 1760 | value |= (direction & 0x02) ? (m_mikey.data[offset] & 0x02) : 0x00; // Cart Address Data output (0 turns cart power on) |
| 1761 | value |= (direction & 0x04) ? (m_mikey.data[offset] & 0x04) : 0x04; // noexp input |
| 1766 | 1762 | // REST read returns actual rest state anded with rest output bit |
| 1767 | | value |= (direction & 0x08) ? (((state->m_mikey.data[offset] & 0x08) && (state->m_mikey.vb_rest)) ? 0x00 : 0x08) : 0x00; // rest output |
| 1768 | | value |= (direction & 0x10) ? (state->m_mikey.data[offset] & 0x10) : 0x10; // audin input |
| 1763 | value |= (direction & 0x08) ? (((m_mikey.data[offset] & 0x08) && (m_mikey.vb_rest)) ? 0x00 : 0x08) : 0x00; // rest output |
| 1764 | value |= (direction & 0x10) ? (m_mikey.data[offset] & 0x10) : 0x10; // audin input |
| 1769 | 1765 | /* Hack: we disable COMLynx */ |
| 1770 | 1766 | value |= 0x04; |
| 1771 | 1767 | /* B5, B6 & B7 are not used */ |
| r14963 | r14964 | |
| 1773 | 1769 | |
| 1774 | 1770 | case 0x8c: |
| 1775 | 1771 | case 0x8d: |
| 1776 | | value = lynx_uart_r(space, offset); |
| 1772 | value = lynx_uart_r(&space, offset); |
| 1777 | 1773 | break; |
| 1778 | 1774 | |
| 1779 | 1775 | default: |
| 1780 | | value = state->m_mikey.data[offset]; |
| 1776 | value = m_mikey.data[offset]; |
| 1781 | 1777 | //logerror( "mikey read %.2x %.2x\n", offset, value ); |
| 1782 | 1778 | } |
| 1783 | 1779 | return value; |
| 1784 | 1780 | } |
| 1785 | 1781 | |
| 1786 | | static WRITE8_HANDLER( mikey_write ) |
| 1782 | WRITE8_MEMBER(lynx_state::mikey_write) |
| 1787 | 1783 | { |
| 1788 | | lynx_state *state = space->machine().driver_data<lynx_state>(); |
| 1789 | 1784 | switch (offset) |
| 1790 | 1785 | { |
| 1791 | 1786 | case 0x00: case 0x01: case 0x02: case 0x03: |
| r14963 | r14964 | |
| 1796 | 1791 | case 0x14: case 0x15: case 0x16: case 0x17: |
| 1797 | 1792 | case 0x18: case 0x19: case 0x1a: case 0x1b: |
| 1798 | 1793 | case 0x1c: case 0x1d: case 0x1e: case 0x1f: |
| 1799 | | lynx_timer_write(state, offset >> 2, offset & 3, data); |
| 1794 | lynx_timer_write(offset >> 2, offset & 3, data); |
| 1800 | 1795 | return; |
| 1801 | 1796 | |
| 1802 | 1797 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: |
| r14963 | r14964 | |
| 1804 | 1799 | case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: |
| 1805 | 1800 | case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: |
| 1806 | 1801 | case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x50: |
| 1807 | | lynx_audio_write(state->m_audio, offset, data); |
| 1802 | lynx_audio_write(m_audio, offset, data); |
| 1808 | 1803 | return; |
| 1809 | 1804 | |
| 1810 | 1805 | case 0x80: |
| 1811 | | state->m_mikey.data[0x81] &= ~data; // clear interrupt source |
| 1806 | m_mikey.data[0x81] &= ~data; // clear interrupt source |
| 1812 | 1807 | // logerror("mikey write %.2x %.2x\n", offset, data); |
| 1813 | | if (!state->m_mikey.data[0x81]) |
| 1814 | | cputag_set_input_line(space->machine(), "maincpu", M65SC02_IRQ_LINE, CLEAR_LINE); |
| 1808 | if (!m_mikey.data[0x81]) |
| 1809 | cputag_set_input_line(machine(), "maincpu", M65SC02_IRQ_LINE, CLEAR_LINE); |
| 1815 | 1810 | break; |
| 1816 | 1811 | |
| 1817 | 1812 | /* Is this correct? */ // Notes say writing to register will result in interupt being triggered. |
| 1818 | 1813 | case 0x81: |
| 1819 | | state->m_mikey.data[0x81] |= data; |
| 1814 | m_mikey.data[0x81] |= data; |
| 1820 | 1815 | if (data) |
| 1821 | 1816 | { |
| 1822 | | cputag_set_input_line(space->machine(), "maincpu", INPUT_LINE_HALT, CLEAR_LINE); |
| 1823 | | cputag_set_input_line(space->machine(), "maincpu", M65SC02_IRQ_LINE, ASSERT_LINE); |
| 1817 | cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, CLEAR_LINE); |
| 1818 | cputag_set_input_line(machine(), "maincpu", M65SC02_IRQ_LINE, ASSERT_LINE); |
| 1824 | 1819 | logerror("direct write to interupt register\n"); |
| 1825 | 1820 | } |
| 1826 | 1821 | break; |
| 1827 | 1822 | |
| 1828 | 1823 | case 0x87: |
| 1829 | | state->m_mikey.data[offset] = data; |
| 1824 | m_mikey.data[offset] = data; |
| 1830 | 1825 | if (data & 0x02) // Power (1 = on) |
| 1831 | 1826 | { |
| 1832 | 1827 | if (data & 0x01) // Cart Address Strobe |
| 1833 | 1828 | { |
| 1834 | | state->m_suzy.high <<= 1; |
| 1835 | | if (state->m_mikey.data[0x8b] & 0x02) |
| 1836 | | state->m_suzy.high |= 1; |
| 1837 | | state->m_suzy.high &= 0xff; |
| 1838 | | state->m_suzy.low = 0; |
| 1829 | m_suzy.high <<= 1; |
| 1830 | if (m_mikey.data[0x8b] & 0x02) |
| 1831 | m_suzy.high |= 1; |
| 1832 | m_suzy.high &= 0xff; |
| 1833 | m_suzy.low = 0; |
| 1839 | 1834 | } |
| 1840 | 1835 | } |
| 1841 | 1836 | else |
| 1842 | 1837 | { |
| 1843 | | state->m_suzy.high = 0; |
| 1844 | | state->m_suzy.low = 0; |
| 1838 | m_suzy.high = 0; |
| 1839 | m_suzy.low = 0; |
| 1845 | 1840 | } |
| 1846 | 1841 | break; |
| 1847 | 1842 | |
| r14963 | r14964 | |
| 1853 | 1848 | case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: |
| 1854 | 1849 | case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: |
| 1855 | 1850 | case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: |
| 1856 | | state->m_mikey.data[offset] = data; |
| 1851 | m_mikey.data[offset] = data; |
| 1857 | 1852 | |
| 1858 | 1853 | /* RED = 0xb- & 0x0f, GREEN = 0xa- & 0x0f, BLUE = (0xb- & 0xf0) >> 4 */ |
| 1859 | | state->m_palette[offset & 0x0f] = space->machine().pens[ |
| 1860 | | ((state->m_mikey.data[0xb0 + (offset & 0x0f)] & 0x0f)) | |
| 1861 | | ((state->m_mikey.data[0xa0 + (offset & 0x0f)] & 0x0f) << 4) | |
| 1862 | | ((state->m_mikey.data[0xb0 + (offset & 0x0f)] & 0xf0) << 4)]; |
| 1854 | m_palette[offset & 0x0f] = machine().pens[ |
| 1855 | ((m_mikey.data[0xb0 + (offset & 0x0f)] & 0x0f)) | |
| 1856 | ((m_mikey.data[0xa0 + (offset & 0x0f)] & 0x0f) << 4) | |
| 1857 | ((m_mikey.data[0xb0 + (offset & 0x0f)] & 0xf0) << 4)]; |
| 1863 | 1858 | break; |
| 1864 | 1859 | |
| 1865 | 1860 | /* TODO: properly implement these writes */ |
| 1866 | 1861 | case 0x8b: |
| 1867 | | state->m_mikey.data[offset] = data; |
| 1868 | | if (state->m_mikey.data[0x8a] & 0x10) |
| 1869 | | logerror("Trying to enable bank 1 write. %d\n", state->m_mikey.data[offset] & 0x10); |
| 1862 | m_mikey.data[offset] = data; |
| 1863 | if (m_mikey.data[0x8a] & 0x10) |
| 1864 | logerror("Trying to enable bank 1 write. %d\n", m_mikey.data[offset] & 0x10); |
| 1870 | 1865 | break; |
| 1871 | 1866 | |
| 1872 | 1867 | //case 0x90: // SDONEACK - Suzy Done Acknowledge |
| 1873 | 1868 | case 0x91: // CPUSLEEP - CPU Bus Request Disable |
| 1874 | | state->m_mikey.data[offset] = data; |
| 1875 | | if (!data && state->m_blitter.busy) |
| 1869 | m_mikey.data[offset] = data; |
| 1870 | if (!data && m_blitter.busy) |
| 1876 | 1871 | { |
| 1877 | | cputag_set_input_line(space->machine(), "maincpu", INPUT_LINE_HALT, ASSERT_LINE); |
| 1872 | cputag_set_input_line(machine(), "maincpu", INPUT_LINE_HALT, ASSERT_LINE); |
| 1878 | 1873 | /* A write of '0' to this address will reset the CPU bus request flip flop */ |
| 1879 | 1874 | } |
| 1880 | 1875 | break; |
| 1881 | 1876 | case 0x94: case 0x95: |
| 1882 | | state->m_mikey.data[offset]=data; |
| 1877 | m_mikey.data[offset]=data; |
| 1883 | 1878 | break; |
| 1884 | 1879 | case 0x9c: case 0x9d: case 0x9e: |
| 1885 | | state->m_mikey.data[offset]=data; |
| 1880 | m_mikey.data[offset]=data; |
| 1886 | 1881 | logerror("Mtest%d write: %x\n", offset&0x3, data); |
| 1887 | 1882 | break; |
| 1888 | 1883 | |
| 1889 | 1884 | default: |
| 1890 | | state->m_mikey.data[offset]=data; |
| 1885 | m_mikey.data[offset]=data; |
| 1891 | 1886 | //logerror("mikey write %.2x %.2x\n",offset,data); |
| 1892 | 1887 | break; |
| 1893 | 1888 | } |
| r14963 | r14964 | |
| 1899 | 1894 | |
| 1900 | 1895 | ****************************************/ |
| 1901 | 1896 | |
| 1902 | | READ8_HANDLER( lynx_memory_config_r ) |
| 1897 | READ8_MEMBER(lynx_state::lynx_memory_config_r) |
| 1903 | 1898 | { |
| 1904 | | lynx_state *state = space->machine().driver_data<lynx_state>(); |
| 1905 | | return state->m_memory_config; |
| 1899 | return m_memory_config; |
| 1906 | 1900 | } |
| 1907 | 1901 | |
| 1908 | | WRITE8_HANDLER( lynx_memory_config_w ) |
| 1902 | WRITE8_MEMBER(lynx_state::lynx_memory_config_w) |
| 1909 | 1903 | { |
| 1910 | | lynx_state *state = space->machine().driver_data<lynx_state>(); |
| 1911 | 1904 | /* bit 7: hispeed, uses page mode accesses (4 instead of 5 cycles ) |
| 1912 | 1905 | * when these are safe in the cpu */ |
| 1913 | | state->m_memory_config = data; |
| 1906 | m_memory_config = data; |
| 1914 | 1907 | |
| 1915 | 1908 | if (data & 1) { |
| 1916 | | space->install_readwrite_bank(0xfc00, 0xfcff, "bank1"); |
| 1909 | space.install_readwrite_bank(0xfc00, 0xfcff, "bank1"); |
| 1917 | 1910 | } else { |
| 1918 | | space->install_legacy_readwrite_handler(0xfc00, 0xfcff, FUNC(suzy_read), FUNC(suzy_write)); |
| 1911 | space.install_readwrite_handler(0xfc00, 0xfcff, read8_delegate(FUNC(lynx_state::suzy_read),this), write8_delegate(FUNC(lynx_state::suzy_write),this)); |
| 1919 | 1912 | } |
| 1920 | 1913 | if (data & 2) { |
| 1921 | | space->install_readwrite_bank(0xfd00, 0xfdff, "bank2"); |
| 1914 | space.install_readwrite_bank(0xfd00, 0xfdff, "bank2"); |
| 1922 | 1915 | } else { |
| 1923 | | space->install_legacy_readwrite_handler(0xfd00, 0xfdff, FUNC(mikey_read), FUNC(mikey_write)); |
| 1916 | space.install_readwrite_handler(0xfd00, 0xfdff, read8_delegate(FUNC(lynx_state::mikey_read),this), write8_delegate(FUNC(lynx_state::mikey_write),this)); |
| 1924 | 1917 | } |
| 1925 | 1918 | |
| 1926 | 1919 | if (data & 1) |
| 1927 | | memory_set_bankptr(space->machine(), "bank1", state->m_mem_fc00); |
| 1920 | memory_set_bankptr(machine(), "bank1", m_mem_fc00); |
| 1928 | 1921 | if (data & 2) |
| 1929 | | memory_set_bankptr(space->machine(), "bank2", state->m_mem_fd00); |
| 1930 | | memory_set_bank(space->machine(), "bank3", (data & 4) ? 1 : 0); |
| 1931 | | memory_set_bank(space->machine(), "bank4", (data & 8) ? 1 : 0); |
| 1922 | memory_set_bankptr(machine(), "bank2", m_mem_fd00); |
| 1923 | memory_set_bank(machine(), "bank3", (data & 4) ? 1 : 0); |
| 1924 | memory_set_bank(machine(), "bank4", (data & 8) ? 1 : 0); |
| 1932 | 1925 | } |
| 1933 | 1926 | |
| 1934 | 1927 | static void lynx_reset(running_machine &machine) |
| 1935 | 1928 | { |
| 1936 | 1929 | lynx_state *state = machine.driver_data<lynx_state>(); |
| 1937 | | lynx_memory_config_w(machine.device("maincpu")->memory().space(AS_PROGRAM), 0, 0); |
| 1930 | state->lynx_memory_config_w(*machine.device("maincpu")->memory().space(AS_PROGRAM), 0, 0); |
| 1938 | 1931 | |
| 1939 | 1932 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, CLEAR_LINE); |
| 1940 | 1933 | cputag_set_input_line(machine, "maincpu", M65SC02_IRQ_LINE, CLEAR_LINE); |
| r14963 | r14964 | |
| 1966 | 1959 | |
| 1967 | 1960 | static void lynx_postload(lynx_state *state) |
| 1968 | 1961 | { |
| 1969 | | lynx_memory_config_w( state->machine().device("maincpu")->memory().space(AS_PROGRAM), 0, state->m_memory_config); |
| 1962 | state->lynx_memory_config_w( *state->machine().device("maincpu")->memory().space(AS_PROGRAM), 0, state->m_memory_config); |
| 1970 | 1963 | } |
| 1971 | 1964 | |
| 1972 | 1965 | MACHINE_START( lynx ) |
src/mess/machine/rmnimbus.c
| r14963 | r14964 | |
| 854 | 854 | logerror("CPU reset done\n"); |
| 855 | 855 | } |
| 856 | 856 | |
| 857 | | READ16_HANDLER( nimbus_i186_internal_port_r ) |
| 857 | READ16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_r) |
| 858 | 858 | { |
| 859 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 860 | 859 | int temp, which; |
| 861 | 860 | |
| 862 | 861 | switch (offset) |
| 863 | 862 | { |
| 864 | 863 | case 0x11: |
| 865 | | logerror("%05X:ERROR - read from 80186 EOI\n", cpu_get_pc(&space->device())); |
| 864 | logerror("%05X:ERROR - read from 80186 EOI\n", cpu_get_pc(&space.device())); |
| 866 | 865 | break; |
| 867 | 866 | |
| 868 | 867 | case 0x12: |
| 869 | | if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll\n", cpu_get_pc(&space->device())); |
| 870 | | if (state->m_i186.intr.poll_status & 0x8000) |
| 871 | | int_callback(space->machine().device(MAINCPU_TAG), 0); |
| 872 | | return state->m_i186.intr.poll_status; |
| 868 | if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll\n", cpu_get_pc(&space.device())); |
| 869 | if (m_i186.intr.poll_status & 0x8000) |
| 870 | int_callback(machine().device(MAINCPU_TAG), 0); |
| 871 | return m_i186.intr.poll_status; |
| 873 | 872 | |
| 874 | 873 | case 0x13: |
| 875 | | if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll status\n", cpu_get_pc(&space->device())); |
| 876 | | return state->m_i186.intr.poll_status; |
| 874 | if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll status\n", cpu_get_pc(&space.device())); |
| 875 | return m_i186.intr.poll_status; |
| 877 | 876 | |
| 878 | 877 | case 0x14: |
| 879 | | if (LOG_PORTS) logerror("%05X:read 80186 interrupt mask\n", cpu_get_pc(&space->device())); |
| 880 | | temp = (state->m_i186.intr.timer >> 3) & 0x01; |
| 881 | | temp |= (state->m_i186.intr.dma[0] >> 1) & 0x04; |
| 882 | | temp |= (state->m_i186.intr.dma[1] >> 0) & 0x08; |
| 883 | | temp |= (state->m_i186.intr.ext[0] << 1) & 0x10; |
| 884 | | temp |= (state->m_i186.intr.ext[1] << 2) & 0x20; |
| 885 | | temp |= (state->m_i186.intr.ext[2] << 3) & 0x40; |
| 886 | | temp |= (state->m_i186.intr.ext[3] << 4) & 0x80; |
| 878 | if (LOG_PORTS) logerror("%05X:read 80186 interrupt mask\n", cpu_get_pc(&space.device())); |
| 879 | temp = (m_i186.intr.timer >> 3) & 0x01; |
| 880 | temp |= (m_i186.intr.dma[0] >> 1) & 0x04; |
| 881 | temp |= (m_i186.intr.dma[1] >> 0) & 0x08; |
| 882 | temp |= (m_i186.intr.ext[0] << 1) & 0x10; |
| 883 | temp |= (m_i186.intr.ext[1] << 2) & 0x20; |
| 884 | temp |= (m_i186.intr.ext[2] << 3) & 0x40; |
| 885 | temp |= (m_i186.intr.ext[3] << 4) & 0x80; |
| 887 | 886 | return temp; |
| 888 | 887 | |
| 889 | 888 | case 0x15: |
| 890 | | if (LOG_PORTS) logerror("%05X:read 80186 interrupt priority mask\n", cpu_get_pc(&space->device())); |
| 891 | | return state->m_i186.intr.priority_mask; |
| 889 | if (LOG_PORTS) logerror("%05X:read 80186 interrupt priority mask\n", cpu_get_pc(&space.device())); |
| 890 | return m_i186.intr.priority_mask; |
| 892 | 891 | |
| 893 | 892 | case 0x16: |
| 894 | | if (LOG_PORTS) logerror("%05X:read 80186 interrupt in-service\n", cpu_get_pc(&space->device())); |
| 895 | | return state->m_i186.intr.in_service; |
| 893 | if (LOG_PORTS) logerror("%05X:read 80186 interrupt in-service\n", cpu_get_pc(&space.device())); |
| 894 | return m_i186.intr.in_service; |
| 896 | 895 | |
| 897 | 896 | case 0x17: |
| 898 | | if (LOG_PORTS) logerror("%05X:read 80186 interrupt request\n", cpu_get_pc(&space->device())); |
| 899 | | temp = state->m_i186.intr.request & ~0x0001; |
| 900 | | if (state->m_i186.intr.status & 0x0007) |
| 897 | if (LOG_PORTS) logerror("%05X:read 80186 interrupt request\n", cpu_get_pc(&space.device())); |
| 898 | temp = m_i186.intr.request & ~0x0001; |
| 899 | if (m_i186.intr.status & 0x0007) |
| 901 | 900 | temp |= 1; |
| 902 | 901 | return temp; |
| 903 | 902 | |
| 904 | 903 | case 0x18: |
| 905 | | if (LOG_PORTS) logerror("%05X:read 80186 interrupt status\n", cpu_get_pc(&space->device())); |
| 906 | | return state->m_i186.intr.status; |
| 904 | if (LOG_PORTS) logerror("%05X:read 80186 interrupt status\n", cpu_get_pc(&space.device())); |
| 905 | return m_i186.intr.status; |
| 907 | 906 | |
| 908 | 907 | case 0x19: |
| 909 | | if (LOG_PORTS) logerror("%05X:read 80186 timer interrupt control\n", cpu_get_pc(&space->device())); |
| 910 | | return state->m_i186.intr.timer; |
| 908 | if (LOG_PORTS) logerror("%05X:read 80186 timer interrupt control\n", cpu_get_pc(&space.device())); |
| 909 | return m_i186.intr.timer; |
| 911 | 910 | |
| 912 | 911 | case 0x1a: |
| 913 | | if (LOG_PORTS) logerror("%05X:read 80186 DMA 0 interrupt control\n", cpu_get_pc(&space->device())); |
| 914 | | return state->m_i186.intr.dma[0]; |
| 912 | if (LOG_PORTS) logerror("%05X:read 80186 DMA 0 interrupt control\n", cpu_get_pc(&space.device())); |
| 913 | return m_i186.intr.dma[0]; |
| 915 | 914 | |
| 916 | 915 | case 0x1b: |
| 917 | | if (LOG_PORTS) logerror("%05X:read 80186 DMA 1 interrupt control\n", cpu_get_pc(&space->device())); |
| 918 | | return state->m_i186.intr.dma[1]; |
| 916 | if (LOG_PORTS) logerror("%05X:read 80186 DMA 1 interrupt control\n", cpu_get_pc(&space.device())); |
| 917 | return m_i186.intr.dma[1]; |
| 919 | 918 | |
| 920 | 919 | case 0x1c: |
| 921 | | if (LOG_PORTS) logerror("%05X:read 80186 INT 0 interrupt control\n", cpu_get_pc(&space->device())); |
| 922 | | return state->m_i186.intr.ext[0]; |
| 920 | if (LOG_PORTS) logerror("%05X:read 80186 INT 0 interrupt control\n", cpu_get_pc(&space.device())); |
| 921 | return m_i186.intr.ext[0]; |
| 923 | 922 | |
| 924 | 923 | case 0x1d: |
| 925 | | if (LOG_PORTS) logerror("%05X:read 80186 INT 1 interrupt control\n", cpu_get_pc(&space->device())); |
| 926 | | return state->m_i186.intr.ext[1]; |
| 924 | if (LOG_PORTS) logerror("%05X:read 80186 INT 1 interrupt control\n", cpu_get_pc(&space.device())); |
| 925 | return m_i186.intr.ext[1]; |
| 927 | 926 | |
| 928 | 927 | case 0x1e: |
| 929 | | if (LOG_PORTS) logerror("%05X:read 80186 INT 2 interrupt control\n", cpu_get_pc(&space->device())); |
| 930 | | return state->m_i186.intr.ext[2]; |
| 928 | if (LOG_PORTS) logerror("%05X:read 80186 INT 2 interrupt control\n", cpu_get_pc(&space.device())); |
| 929 | return m_i186.intr.ext[2]; |
| 931 | 930 | |
| 932 | 931 | case 0x1f: |
| 933 | | if (LOG_PORTS) logerror("%05X:read 80186 INT 3 interrupt control\n", cpu_get_pc(&space->device())); |
| 934 | | return state->m_i186.intr.ext[3]; |
| 932 | if (LOG_PORTS) logerror("%05X:read 80186 INT 3 interrupt control\n", cpu_get_pc(&space.device())); |
| 933 | return m_i186.intr.ext[3]; |
| 935 | 934 | |
| 936 | 935 | case 0x28: |
| 937 | 936 | case 0x2c: |
| 938 | 937 | case 0x30: |
| 939 | | if (LOG_PORTS) logerror("%05X:read 80186 Timer %d count\n", cpu_get_pc(&space->device()), (offset - 0x28) / 4); |
| 938 | if (LOG_PORTS) logerror("%05X:read 80186 Timer %d count\n", cpu_get_pc(&space.device()), (offset - 0x28) / 4); |
| 940 | 939 | which = (offset - 0x28) / 4; |
| 941 | 940 | if (!(offset & 1)) |
| 942 | | internal_timer_sync(space->machine(), which); |
| 943 | | return state->m_i186.timer[which].count; |
| 941 | internal_timer_sync(machine(), which); |
| 942 | return m_i186.timer[which].count; |
| 944 | 943 | |
| 945 | 944 | case 0x29: |
| 946 | 945 | case 0x2d: |
| 947 | 946 | case 0x31: |
| 948 | | if (LOG_PORTS) logerror("%05X:read 80186 Timer %d max A\n", cpu_get_pc(&space->device()), (offset - 0x29) / 4); |
| 947 | if (LOG_PORTS) logerror("%05X:read 80186 Timer %d max A\n", cpu_get_pc(&space.device()), (offset - 0x29) / 4); |
| 949 | 948 | which = (offset - 0x29) / 4; |
| 950 | | return state->m_i186.timer[which].maxA; |
| 949 | return m_i186.timer[which].maxA; |
| 951 | 950 | |
| 952 | 951 | case 0x2a: |
| 953 | 952 | case 0x2e: |
| 954 | | logerror("%05X:read 80186 Timer %d max B\n", cpu_get_pc(&space->device()), (offset - 0x2a) / 4); |
| 953 | logerror("%05X:read 80186 Timer %d max B\n", cpu_get_pc(&space.device()), (offset - 0x2a) / 4); |
| 955 | 954 | which = (offset - 0x2a) / 4; |
| 956 | | return state->m_i186.timer[which].maxB; |
| 955 | return m_i186.timer[which].maxB; |
| 957 | 956 | |
| 958 | 957 | case 0x2b: |
| 959 | 958 | case 0x2f: |
| 960 | 959 | case 0x33: |
| 961 | | if (LOG_PORTS) logerror("%05X:read 80186 Timer %d control\n", cpu_get_pc(&space->device()), (offset - 0x2b) / 4); |
| 960 | if (LOG_PORTS) logerror("%05X:read 80186 Timer %d control\n", cpu_get_pc(&space.device()), (offset - 0x2b) / 4); |
| 962 | 961 | which = (offset - 0x2b) / 4; |
| 963 | | return state->m_i186.timer[which].control; |
| 962 | return m_i186.timer[which].control; |
| 964 | 963 | |
| 965 | 964 | case 0x50: |
| 966 | | if (LOG_PORTS) logerror("%05X:read 80186 upper chip select\n", cpu_get_pc(&space->device())); |
| 967 | | return state->m_i186.mem.upper; |
| 965 | if (LOG_PORTS) logerror("%05X:read 80186 upper chip select\n", cpu_get_pc(&space.device())); |
| 966 | return m_i186.mem.upper; |
| 968 | 967 | |
| 969 | 968 | case 0x51: |
| 970 | | if (LOG_PORTS) logerror("%05X:read 80186 lower chip select\n", cpu_get_pc(&space->device())); |
| 971 | | return state->m_i186.mem.lower; |
| 969 | if (LOG_PORTS) logerror("%05X:read 80186 lower chip select\n", cpu_get_pc(&space.device())); |
| 970 | return m_i186.mem.lower; |
| 972 | 971 | |
| 973 | 972 | case 0x52: |
| 974 | | if (LOG_PORTS) logerror("%05X:read 80186 peripheral chip select\n", cpu_get_pc(&space->device())); |
| 975 | | return state->m_i186.mem.peripheral; |
| 973 | if (LOG_PORTS) logerror("%05X:read 80186 peripheral chip select\n", cpu_get_pc(&space.device())); |
| 974 | return m_i186.mem.peripheral; |
| 976 | 975 | |
| 977 | 976 | case 0x53: |
| 978 | | if (LOG_PORTS) logerror("%05X:read 80186 middle chip select\n", cpu_get_pc(&space->device())); |
| 979 | | return state->m_i186.mem.middle; |
| 977 | if (LOG_PORTS) logerror("%05X:read 80186 middle chip select\n", cpu_get_pc(&space.device())); |
| 978 | return m_i186.mem.middle; |
| 980 | 979 | |
| 981 | 980 | case 0x54: |
| 982 | | if (LOG_PORTS) logerror("%05X:read 80186 middle P chip select\n", cpu_get_pc(&space->device())); |
| 983 | | return state->m_i186.mem.middle_size; |
| 981 | if (LOG_PORTS) logerror("%05X:read 80186 middle P chip select\n", cpu_get_pc(&space.device())); |
| 982 | return m_i186.mem.middle_size; |
| 984 | 983 | |
| 985 | 984 | case 0x60: |
| 986 | 985 | case 0x68: |
| 987 | | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d lower source address\n", cpu_get_pc(&space->device()), (offset - 0x60) / 8); |
| 986 | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d lower source address\n", cpu_get_pc(&space.device()), (offset - 0x60) / 8); |
| 988 | 987 | which = (offset - 0x60) / 8; |
| 989 | | return state->m_i186.dma[which].source; |
| 988 | return m_i186.dma[which].source; |
| 990 | 989 | |
| 991 | 990 | case 0x61: |
| 992 | 991 | case 0x69: |
| 993 | | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d upper source address\n", cpu_get_pc(&space->device()), (offset - 0x61) / 8); |
| 992 | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d upper source address\n", cpu_get_pc(&space.device()), (offset - 0x61) / 8); |
| 994 | 993 | which = (offset - 0x61) / 8; |
| 995 | | return state->m_i186.dma[which].source >> 16; |
| 994 | return m_i186.dma[which].source >> 16; |
| 996 | 995 | |
| 997 | 996 | case 0x62: |
| 998 | 997 | case 0x6a: |
| 999 | | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d lower dest address\n", cpu_get_pc(&space->device()), (offset - 0x62) / 8); |
| 998 | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d lower dest address\n", cpu_get_pc(&space.device()), (offset - 0x62) / 8); |
| 1000 | 999 | which = (offset - 0x62) / 8; |
| 1001 | | return state->m_i186.dma[which].dest; |
| 1000 | return m_i186.dma[which].dest; |
| 1002 | 1001 | |
| 1003 | 1002 | case 0x63: |
| 1004 | 1003 | case 0x6b: |
| 1005 | | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d upper dest address\n", cpu_get_pc(&space->device()), (offset - 0x63) / 8); |
| 1004 | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d upper dest address\n", cpu_get_pc(&space.device()), (offset - 0x63) / 8); |
| 1006 | 1005 | which = (offset - 0x63) / 8; |
| 1007 | | return state->m_i186.dma[which].dest >> 16; |
| 1006 | return m_i186.dma[which].dest >> 16; |
| 1008 | 1007 | |
| 1009 | 1008 | case 0x64: |
| 1010 | 1009 | case 0x6c: |
| 1011 | | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d transfer count\n", cpu_get_pc(&space->device()), (offset - 0x64) / 8); |
| 1010 | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d transfer count\n", cpu_get_pc(&space.device()), (offset - 0x64) / 8); |
| 1012 | 1011 | which = (offset - 0x64) / 8; |
| 1013 | | return state->m_i186.dma[which].count; |
| 1012 | return m_i186.dma[which].count; |
| 1014 | 1013 | |
| 1015 | 1014 | case 0x65: |
| 1016 | 1015 | case 0x6d: |
| 1017 | | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d control\n", cpu_get_pc(&space->device()), (offset - 0x65) / 8); |
| 1016 | if (LOG_PORTS) logerror("%05X:read 80186 DMA%d control\n", cpu_get_pc(&space.device()), (offset - 0x65) / 8); |
| 1018 | 1017 | which = (offset - 0x65) / 8; |
| 1019 | | return state->m_i186.dma[which].control; |
| 1018 | return m_i186.dma[which].control; |
| 1020 | 1019 | |
| 1021 | 1020 | default: |
| 1022 | | logerror("%05X:read 80186 port %02X\n", cpu_get_pc(&space->device()), offset); |
| 1021 | logerror("%05X:read 80186 port %02X\n", cpu_get_pc(&space.device()), offset); |
| 1023 | 1022 | break; |
| 1024 | 1023 | } |
| 1025 | 1024 | return 0x00; |
| r14963 | r14964 | |
| 1031 | 1030 | * |
| 1032 | 1031 | *************************************/ |
| 1033 | 1032 | |
| 1034 | | WRITE16_HANDLER( nimbus_i186_internal_port_w ) |
| 1033 | WRITE16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_w) |
| 1035 | 1034 | { |
| 1036 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 1037 | 1035 | int temp, which, data16 = data; |
| 1038 | 1036 | |
| 1039 | 1037 | switch (offset) |
| 1040 | 1038 | { |
| 1041 | 1039 | case 0x11: |
| 1042 | | if (LOG_PORTS) logerror("%05X:80186 EOI = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1043 | | handle_eoi(space->machine(),0x8000); |
| 1044 | | update_interrupt_state(space->machine()); |
| 1040 | if (LOG_PORTS) logerror("%05X:80186 EOI = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1041 | handle_eoi(machine(),0x8000); |
| 1042 | update_interrupt_state(machine()); |
| 1045 | 1043 | break; |
| 1046 | 1044 | |
| 1047 | 1045 | case 0x12: |
| 1048 | | logerror("%05X:ERROR - write to 80186 interrupt poll = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1046 | logerror("%05X:ERROR - write to 80186 interrupt poll = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1049 | 1047 | break; |
| 1050 | 1048 | |
| 1051 | 1049 | case 0x13: |
| 1052 | | logerror("%05X:ERROR - write to 80186 interrupt poll status = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1050 | logerror("%05X:ERROR - write to 80186 interrupt poll status = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1053 | 1051 | break; |
| 1054 | 1052 | |
| 1055 | 1053 | case 0x14: |
| 1056 | | if (LOG_PORTS) logerror("%05X:80186 interrupt mask = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1057 | | state->m_i186.intr.timer = (state->m_i186.intr.timer & ~0x08) | ((data16 << 3) & 0x08); |
| 1058 | | state->m_i186.intr.dma[0] = (state->m_i186.intr.dma[0] & ~0x08) | ((data16 << 1) & 0x08); |
| 1059 | | state->m_i186.intr.dma[1] = (state->m_i186.intr.dma[1] & ~0x08) | ((data16 << 0) & 0x08); |
| 1060 | | state->m_i186.intr.ext[0] = (state->m_i186.intr.ext[0] & ~0x08) | ((data16 >> 1) & 0x08); |
| 1061 | | state->m_i186.intr.ext[1] = (state->m_i186.intr.ext[1] & ~0x08) | ((data16 >> 2) & 0x08); |
| 1062 | | state->m_i186.intr.ext[2] = (state->m_i186.intr.ext[2] & ~0x08) | ((data16 >> 3) & 0x08); |
| 1063 | | state->m_i186.intr.ext[3] = (state->m_i186.intr.ext[3] & ~0x08) | ((data16 >> 4) & 0x08); |
| 1064 | | update_interrupt_state(space->machine()); |
| 1054 | if (LOG_PORTS) logerror("%05X:80186 interrupt mask = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1055 | m_i186.intr.timer = (m_i186.intr.timer & ~0x08) | ((data16 << 3) & 0x08); |
| 1056 | m_i186.intr.dma[0] = (m_i186.intr.dma[0] & ~0x08) | ((data16 << 1) & 0x08); |
| 1057 | m_i186.intr.dma[1] = (m_i186.intr.dma[1] & ~0x08) | ((data16 << 0) & 0x08); |
| 1058 | m_i186.intr.ext[0] = (m_i186.intr.ext[0] & ~0x08) | ((data16 >> 1) & 0x08); |
| 1059 | m_i186.intr.ext[1] = (m_i186.intr.ext[1] & ~0x08) | ((data16 >> 2) & 0x08); |
| 1060 | m_i186.intr.ext[2] = (m_i186.intr.ext[2] & ~0x08) | ((data16 >> 3) & 0x08); |
| 1061 | m_i186.intr.ext[3] = (m_i186.intr.ext[3] & ~0x08) | ((data16 >> 4) & 0x08); |
| 1062 | update_interrupt_state(machine()); |
| 1065 | 1063 | break; |
| 1066 | 1064 | |
| 1067 | 1065 | case 0x15: |
| 1068 | | if (LOG_PORTS) logerror("%05X:80186 interrupt priority mask = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1069 | | state->m_i186.intr.priority_mask = data16 & 0x0007; |
| 1070 | | update_interrupt_state(space->machine()); |
| 1066 | if (LOG_PORTS) logerror("%05X:80186 interrupt priority mask = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1067 | m_i186.intr.priority_mask = data16 & 0x0007; |
| 1068 | update_interrupt_state(machine()); |
| 1071 | 1069 | break; |
| 1072 | 1070 | |
| 1073 | 1071 | case 0x16: |
| 1074 | | if (LOG_PORTS) logerror("%05X:80186 interrupt in-service = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1075 | | state->m_i186.intr.in_service = data16 & 0x00ff; |
| 1076 | | update_interrupt_state(space->machine()); |
| 1072 | if (LOG_PORTS) logerror("%05X:80186 interrupt in-service = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1073 | m_i186.intr.in_service = data16 & 0x00ff; |
| 1074 | update_interrupt_state(machine()); |
| 1077 | 1075 | break; |
| 1078 | 1076 | |
| 1079 | 1077 | case 0x17: |
| 1080 | | if (LOG_PORTS) logerror("%05X:80186 interrupt request = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1081 | | state->m_i186.intr.request = (state->m_i186.intr.request & ~0x00c0) | (data16 & 0x00c0); |
| 1082 | | update_interrupt_state(space->machine()); |
| 1078 | if (LOG_PORTS) logerror("%05X:80186 interrupt request = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1079 | m_i186.intr.request = (m_i186.intr.request & ~0x00c0) | (data16 & 0x00c0); |
| 1080 | update_interrupt_state(machine()); |
| 1083 | 1081 | break; |
| 1084 | 1082 | |
| 1085 | 1083 | case 0x18: |
| 1086 | | if (LOG_PORTS) logerror("%05X:WARNING - wrote to 80186 interrupt status = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1087 | | state->m_i186.intr.status = (state->m_i186.intr.status & ~0x8007) | (data16 & 0x8007); |
| 1088 | | update_interrupt_state(space->machine()); |
| 1084 | if (LOG_PORTS) logerror("%05X:WARNING - wrote to 80186 interrupt status = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1085 | m_i186.intr.status = (m_i186.intr.status & ~0x8007) | (data16 & 0x8007); |
| 1086 | update_interrupt_state(machine()); |
| 1089 | 1087 | break; |
| 1090 | 1088 | |
| 1091 | 1089 | case 0x19: |
| 1092 | | if (LOG_PORTS) logerror("%05X:80186 timer interrupt contol = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1093 | | state->m_i186.intr.timer = data16 & 0x000f; |
| 1090 | if (LOG_PORTS) logerror("%05X:80186 timer interrupt contol = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1091 | m_i186.intr.timer = data16 & 0x000f; |
| 1094 | 1092 | break; |
| 1095 | 1093 | |
| 1096 | 1094 | case 0x1a: |
| 1097 | | if (LOG_PORTS) logerror("%05X:80186 DMA 0 interrupt control = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1098 | | state->m_i186.intr.dma[0] = data16 & 0x000f; |
| 1095 | if (LOG_PORTS) logerror("%05X:80186 DMA 0 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1096 | m_i186.intr.dma[0] = data16 & 0x000f; |
| 1099 | 1097 | break; |
| 1100 | 1098 | |
| 1101 | 1099 | case 0x1b: |
| 1102 | | if (LOG_PORTS) logerror("%05X:80186 DMA 1 interrupt control = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1103 | | state->m_i186.intr.dma[1] = data16 & 0x000f; |
| 1100 | if (LOG_PORTS) logerror("%05X:80186 DMA 1 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1101 | m_i186.intr.dma[1] = data16 & 0x000f; |
| 1104 | 1102 | break; |
| 1105 | 1103 | |
| 1106 | 1104 | case 0x1c: |
| 1107 | | if (LOG_PORTS) logerror("%05X:80186 INT 0 interrupt control = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1108 | | state->m_i186.intr.ext[0] = data16 & 0x007f; |
| 1105 | if (LOG_PORTS) logerror("%05X:80186 INT 0 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1106 | m_i186.intr.ext[0] = data16 & 0x007f; |
| 1109 | 1107 | break; |
| 1110 | 1108 | |
| 1111 | 1109 | case 0x1d: |
| 1112 | | if (LOG_PORTS) logerror("%05X:80186 INT 1 interrupt control = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1113 | | state->m_i186.intr.ext[1] = data16 & 0x007f; |
| 1110 | if (LOG_PORTS) logerror("%05X:80186 INT 1 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1111 | m_i186.intr.ext[1] = data16 & 0x007f; |
| 1114 | 1112 | break; |
| 1115 | 1113 | |
| 1116 | 1114 | case 0x1e: |
| 1117 | | if (LOG_PORTS) logerror("%05X:80186 INT 2 interrupt control = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1118 | | state->m_i186.intr.ext[2] = data16 & 0x001f; |
| 1115 | if (LOG_PORTS) logerror("%05X:80186 INT 2 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1116 | m_i186.intr.ext[2] = data16 & 0x001f; |
| 1119 | 1117 | break; |
| 1120 | 1118 | |
| 1121 | 1119 | case 0x1f: |
| 1122 | | if (LOG_PORTS) logerror("%05X:80186 INT 3 interrupt control = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1123 | | state->m_i186.intr.ext[3] = data16 & 0x001f; |
| 1120 | if (LOG_PORTS) logerror("%05X:80186 INT 3 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1121 | m_i186.intr.ext[3] = data16 & 0x001f; |
| 1124 | 1122 | break; |
| 1125 | 1123 | |
| 1126 | 1124 | case 0x28: |
| 1127 | 1125 | case 0x2c: |
| 1128 | 1126 | case 0x30: |
| 1129 | | if (LOG_PORTS) logerror("%05X:80186 Timer %d count = %04X\n", cpu_get_pc(&space->device()), (offset - 0x28) / 4, data16); |
| 1127 | if (LOG_PORTS) logerror("%05X:80186 Timer %d count = %04X\n", cpu_get_pc(&space.device()), (offset - 0x28) / 4, data16); |
| 1130 | 1128 | which = (offset - 0x28) / 4; |
| 1131 | | internal_timer_update(space->machine(),which, data16, -1, -1, -1); |
| 1129 | internal_timer_update(machine(),which, data16, -1, -1, -1); |
| 1132 | 1130 | break; |
| 1133 | 1131 | |
| 1134 | 1132 | case 0x29: |
| 1135 | 1133 | case 0x2d: |
| 1136 | 1134 | case 0x31: |
| 1137 | | if (LOG_PORTS) logerror("%05X:80186 Timer %d max A = %04X\n", cpu_get_pc(&space->device()), (offset - 0x29) / 4, data16); |
| 1135 | if (LOG_PORTS) logerror("%05X:80186 Timer %d max A = %04X\n", cpu_get_pc(&space.device()), (offset - 0x29) / 4, data16); |
| 1138 | 1136 | which = (offset - 0x29) / 4; |
| 1139 | | internal_timer_update(space->machine(),which, -1, data16, -1, -1); |
| 1137 | internal_timer_update(machine(),which, -1, data16, -1, -1); |
| 1140 | 1138 | break; |
| 1141 | 1139 | |
| 1142 | 1140 | case 0x2a: |
| 1143 | 1141 | case 0x2e: |
| 1144 | | if (LOG_PORTS) logerror("%05X:80186 Timer %d max B = %04X\n", cpu_get_pc(&space->device()), (offset - 0x2a) / 4, data16); |
| 1142 | if (LOG_PORTS) logerror("%05X:80186 Timer %d max B = %04X\n", cpu_get_pc(&space.device()), (offset - 0x2a) / 4, data16); |
| 1145 | 1143 | which = (offset - 0x2a) / 4; |
| 1146 | | internal_timer_update(space->machine(),which, -1, -1, data16, -1); |
| 1144 | internal_timer_update(machine(),which, -1, -1, data16, -1); |
| 1147 | 1145 | break; |
| 1148 | 1146 | |
| 1149 | 1147 | case 0x2b: |
| 1150 | 1148 | case 0x2f: |
| 1151 | 1149 | case 0x33: |
| 1152 | | if (LOG_PORTS) logerror("%05X:80186 Timer %d control = %04X\n", cpu_get_pc(&space->device()), (offset - 0x2b) / 4, data16); |
| 1150 | if (LOG_PORTS) logerror("%05X:80186 Timer %d control = %04X\n", cpu_get_pc(&space.device()), (offset - 0x2b) / 4, data16); |
| 1153 | 1151 | which = (offset - 0x2b) / 4; |
| 1154 | | internal_timer_update(space->machine(),which, -1, -1, -1, data16); |
| 1152 | internal_timer_update(machine(),which, -1, -1, -1, data16); |
| 1155 | 1153 | break; |
| 1156 | 1154 | |
| 1157 | 1155 | case 0x50: |
| 1158 | | if (LOG_PORTS) logerror("%05X:80186 upper chip select = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1159 | | state->m_i186.mem.upper = data16 | 0xc038; |
| 1156 | if (LOG_PORTS) logerror("%05X:80186 upper chip select = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1157 | m_i186.mem.upper = data16 | 0xc038; |
| 1160 | 1158 | break; |
| 1161 | 1159 | |
| 1162 | 1160 | case 0x51: |
| 1163 | | if (LOG_PORTS) logerror("%05X:80186 lower chip select = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1164 | | state->m_i186.mem.lower = (data16 & 0x3fff) | 0x0038; printf("%X",state->m_i186.mem.lower); |
| 1161 | if (LOG_PORTS) logerror("%05X:80186 lower chip select = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1162 | m_i186.mem.lower = (data16 & 0x3fff) | 0x0038; printf("%X",m_i186.mem.lower); |
| 1165 | 1163 | break; |
| 1166 | 1164 | |
| 1167 | 1165 | case 0x52: |
| 1168 | | if (LOG_PORTS) logerror("%05X:80186 peripheral chip select = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1169 | | state->m_i186.mem.peripheral = data16 | 0x0038; |
| 1166 | if (LOG_PORTS) logerror("%05X:80186 peripheral chip select = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1167 | m_i186.mem.peripheral = data16 | 0x0038; |
| 1170 | 1168 | break; |
| 1171 | 1169 | |
| 1172 | 1170 | case 0x53: |
| 1173 | | if (LOG_PORTS) logerror("%05X:80186 middle chip select = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1174 | | state->m_i186.mem.middle = data16 | 0x01f8; |
| 1171 | if (LOG_PORTS) logerror("%05X:80186 middle chip select = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1172 | m_i186.mem.middle = data16 | 0x01f8; |
| 1175 | 1173 | break; |
| 1176 | 1174 | |
| 1177 | 1175 | case 0x54: |
| 1178 | | if (LOG_PORTS) logerror("%05X:80186 middle P chip select = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1179 | | state->m_i186.mem.middle_size = data16 | 0x8038; |
| 1176 | if (LOG_PORTS) logerror("%05X:80186 middle P chip select = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1177 | m_i186.mem.middle_size = data16 | 0x8038; |
| 1180 | 1178 | |
| 1181 | 1179 | /* we need to do this at a time when the I86 context is swapped in */ |
| 1182 | 1180 | /* this register is generally set once at startup and never again, so it's a good */ |
| 1183 | 1181 | /* time to set it up */ |
| 1184 | | device_set_irq_callback(&space->device(), int_callback); |
| 1182 | device_set_irq_callback(&space.device(), int_callback); |
| 1185 | 1183 | break; |
| 1186 | 1184 | |
| 1187 | 1185 | case 0x60: |
| 1188 | 1186 | case 0x68: |
| 1189 | | if (LOG_PORTS) logerror("%05X:80186 DMA%d lower source address = %04X\n", cpu_get_pc(&space->device()), (offset - 0x60) / 8, data16); |
| 1187 | if (LOG_PORTS) logerror("%05X:80186 DMA%d lower source address = %04X\n", cpu_get_pc(&space.device()), (offset - 0x60) / 8, data16); |
| 1190 | 1188 | which = (offset - 0x60) / 8; |
| 1191 | | state->m_i186.dma[which].source = (state->m_i186.dma[which].source & ~0x0ffff) | (data16 & 0x0ffff); |
| 1189 | m_i186.dma[which].source = (m_i186.dma[which].source & ~0x0ffff) | (data16 & 0x0ffff); |
| 1192 | 1190 | break; |
| 1193 | 1191 | |
| 1194 | 1192 | case 0x61: |
| 1195 | 1193 | case 0x69: |
| 1196 | | if (LOG_PORTS) logerror("%05X:80186 DMA%d upper source address = %04X\n", cpu_get_pc(&space->device()), (offset - 0x61) / 8, data16); |
| 1194 | if (LOG_PORTS) logerror("%05X:80186 DMA%d upper source address = %04X\n", cpu_get_pc(&space.device()), (offset - 0x61) / 8, data16); |
| 1197 | 1195 | which = (offset - 0x61) / 8; |
| 1198 | | state->m_i186.dma[which].source = (state->m_i186.dma[which].source & ~0xf0000) | ((data16 << 16) & 0xf0000); |
| 1196 | m_i186.dma[which].source = (m_i186.dma[which].source & ~0xf0000) | ((data16 << 16) & 0xf0000); |
| 1199 | 1197 | break; |
| 1200 | 1198 | |
| 1201 | 1199 | case 0x62: |
| 1202 | 1200 | case 0x6a: |
| 1203 | | if (LOG_PORTS) logerror("%05X:80186 DMA%d lower dest address = %04X\n", cpu_get_pc(&space->device()), (offset - 0x62) / 8, data16); |
| 1201 | if (LOG_PORTS) logerror("%05X:80186 DMA%d lower dest address = %04X\n", cpu_get_pc(&space.device()), (offset - 0x62) / 8, data16); |
| 1204 | 1202 | which = (offset - 0x62) / 8; |
| 1205 | | state->m_i186.dma[which].dest = (state->m_i186.dma[which].dest & ~0x0ffff) | (data16 & 0x0ffff); |
| 1203 | m_i186.dma[which].dest = (m_i186.dma[which].dest & ~0x0ffff) | (data16 & 0x0ffff); |
| 1206 | 1204 | break; |
| 1207 | 1205 | |
| 1208 | 1206 | case 0x63: |
| 1209 | 1207 | case 0x6b: |
| 1210 | | if (LOG_PORTS) logerror("%05X:80186 DMA%d upper dest address = %04X\n", cpu_get_pc(&space->device()), (offset - 0x63) / 8, data16); |
| 1208 | if (LOG_PORTS) logerror("%05X:80186 DMA%d upper dest address = %04X\n", cpu_get_pc(&space.device()), (offset - 0x63) / 8, data16); |
| 1211 | 1209 | which = (offset - 0x63) / 8; |
| 1212 | | state->m_i186.dma[which].dest = (state->m_i186.dma[which].dest & ~0xf0000) | ((data16 << 16) & 0xf0000); |
| 1210 | m_i186.dma[which].dest = (m_i186.dma[which].dest & ~0xf0000) | ((data16 << 16) & 0xf0000); |
| 1213 | 1211 | break; |
| 1214 | 1212 | |
| 1215 | 1213 | case 0x64: |
| 1216 | 1214 | case 0x6c: |
| 1217 | | if (LOG_PORTS) logerror("%05X:80186 DMA%d transfer count = %04X\n", cpu_get_pc(&space->device()), (offset - 0x64) / 8, data16); |
| 1215 | if (LOG_PORTS) logerror("%05X:80186 DMA%d transfer count = %04X\n", cpu_get_pc(&space.device()), (offset - 0x64) / 8, data16); |
| 1218 | 1216 | which = (offset - 0x64) / 8; |
| 1219 | | state->m_i186.dma[which].count = data16; |
| 1217 | m_i186.dma[which].count = data16; |
| 1220 | 1218 | break; |
| 1221 | 1219 | |
| 1222 | 1220 | case 0x65: |
| 1223 | 1221 | case 0x6d: |
| 1224 | | if (LOG_PORTS) logerror("%05X:80186 DMA%d control = %04X\n", cpu_get_pc(&space->device()), (offset - 0x65) / 8, data16); |
| 1222 | if (LOG_PORTS) logerror("%05X:80186 DMA%d control = %04X\n", cpu_get_pc(&space.device()), (offset - 0x65) / 8, data16); |
| 1225 | 1223 | which = (offset - 0x65) / 8; |
| 1226 | | update_dma_control(space->machine(), which, data16); |
| 1224 | update_dma_control(machine(), which, data16); |
| 1227 | 1225 | break; |
| 1228 | 1226 | |
| 1229 | 1227 | case 0x7f: |
| 1230 | | if (LOG_PORTS) logerror("%05X:80186 relocation register = %04X\n", cpu_get_pc(&space->device()), data16); |
| 1228 | if (LOG_PORTS) logerror("%05X:80186 relocation register = %04X\n", cpu_get_pc(&space.device()), data16); |
| 1231 | 1229 | |
| 1232 | 1230 | /* we assume here there that this doesn't happen too often */ |
| 1233 | 1231 | /* plus, we can't really remove the old memory range, so we also assume that it's */ |
| r14963 | r14964 | |
| 1235 | 1233 | temp = (data16 & 0x0fff) << 8; |
| 1236 | 1234 | if (data16 & 0x1000) |
| 1237 | 1235 | { |
| 1238 | | space->machine().device(MAINCPU_TAG)->memory().space(AS_PROGRAM)->install_legacy_read_handler(temp, temp + 0xff, FUNC(nimbus_i186_internal_port_r)); |
| 1239 | | space->machine().device(MAINCPU_TAG)->memory().space(AS_PROGRAM)->install_legacy_write_handler(temp, temp + 0xff, FUNC(nimbus_i186_internal_port_w)); |
| 1236 | machine().device(MAINCPU_TAG)->memory().space(AS_PROGRAM)->install_read_handler(temp, temp + 0xff, read16_delegate(FUNC(rmnimbus_state::nimbus_i186_internal_port_r),this)); |
| 1237 | machine().device(MAINCPU_TAG)->memory().space(AS_PROGRAM)->install_write_handler(temp, temp + 0xff, write16_delegate(FUNC(rmnimbus_state::nimbus_i186_internal_port_w),this)); |
| 1240 | 1238 | } |
| 1241 | 1239 | else |
| 1242 | 1240 | { |
| 1243 | 1241 | temp &= 0xffff; |
| 1244 | | space->machine().device(MAINCPU_TAG)->memory().space(AS_IO)->install_legacy_read_handler(temp, temp + 0xff, FUNC(nimbus_i186_internal_port_r)); |
| 1245 | | space->machine().device(MAINCPU_TAG)->memory().space(AS_IO)->install_legacy_write_handler(temp, temp + 0xff, FUNC(nimbus_i186_internal_port_w)); |
| 1242 | machine().device(MAINCPU_TAG)->memory().space(AS_IO)->install_read_handler(temp, temp + 0xff, read16_delegate(FUNC(rmnimbus_state::nimbus_i186_internal_port_r),this)); |
| 1243 | machine().device(MAINCPU_TAG)->memory().space(AS_IO)->install_write_handler(temp, temp + 0xff, write16_delegate(FUNC(rmnimbus_state::nimbus_i186_internal_port_w),this)); |
| 1246 | 1244 | } |
| 1247 | 1245 | break; |
| 1248 | 1246 | |
| 1249 | 1247 | default: |
| 1250 | | logerror("%05X:80186 port %02X = %04X\n", cpu_get_pc(&space->device()), offset, data16); |
| 1248 | logerror("%05X:80186 port %02X = %04X\n", cpu_get_pc(&space.device()), offset, data16); |
| 1251 | 1249 | break; |
| 1252 | 1250 | } |
| 1253 | 1251 | } |
| r14963 | r14964 | |
| 2064 | 2062 | } |
| 2065 | 2063 | } |
| 2066 | 2064 | |
| 2067 | | READ8_HANDLER( nimbus_mcu_r ) |
| 2065 | READ8_MEMBER(rmnimbus_state::nimbus_mcu_r) |
| 2068 | 2066 | { |
| 2069 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2070 | | return state->m_mcu_reg080; |
| 2067 | return m_mcu_reg080; |
| 2071 | 2068 | } |
| 2072 | 2069 | |
| 2073 | | WRITE8_HANDLER( nimbus_mcu_w ) |
| 2070 | WRITE8_MEMBER(rmnimbus_state::nimbus_mcu_w) |
| 2074 | 2071 | { |
| 2075 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2076 | | state->m_mcu_reg080=data; |
| 2072 | m_mcu_reg080=data; |
| 2077 | 2073 | |
| 2078 | | nimbus_bank_memory(space->machine()); |
| 2074 | nimbus_bank_memory(machine()); |
| 2079 | 2075 | } |
| 2080 | 2076 | |
| 2081 | 2077 | static void memory_reset(running_machine &machine) |
| r14963 | r14964 | |
| 2085 | 2081 | nimbus_bank_memory(machine); |
| 2086 | 2082 | } |
| 2087 | 2083 | |
| 2088 | | READ16_HANDLER( nimbus_io_r ) |
| 2084 | READ16_MEMBER(rmnimbus_state::nimbus_io_r) |
| 2089 | 2085 | { |
| 2090 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2091 | | int pc=cpu_get_pc(&space->device()); |
| 2086 | int pc=cpu_get_pc(&space.device()); |
| 2092 | 2087 | |
| 2093 | | logerror("Nimbus IOR at pc=%08X from %04X mask=%04X, data=%04X\n",pc,(offset*2)+0x30,mem_mask,state->m_IOPorts[offset]); |
| 2088 | logerror("Nimbus IOR at pc=%08X from %04X mask=%04X, data=%04X\n",pc,(offset*2)+0x30,mem_mask,m_IOPorts[offset]); |
| 2094 | 2089 | |
| 2095 | 2090 | switch (offset*2) |
| 2096 | 2091 | { |
| 2097 | | default : return state->m_IOPorts[offset]; |
| 2092 | default : return m_IOPorts[offset]; |
| 2098 | 2093 | } |
| 2099 | 2094 | return 0; |
| 2100 | 2095 | } |
| 2101 | 2096 | |
| 2102 | | WRITE16_HANDLER( nimbus_io_w ) |
| 2097 | WRITE16_MEMBER(rmnimbus_state::nimbus_io_w) |
| 2103 | 2098 | { |
| 2104 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2105 | | int pc=cpu_get_pc(&space->device()); |
| 2099 | int pc=cpu_get_pc(&space.device()); |
| 2106 | 2100 | |
| 2107 | 2101 | logerror("Nimbus IOW at %08X write of %04X to %04X mask=%04X\n",pc,data,(offset*2)+0x30,mem_mask); |
| 2108 | 2102 | |
| 2109 | 2103 | switch (offset*2) |
| 2110 | 2104 | { |
| 2111 | | default : COMBINE_DATA(&state->m_IOPorts[offset]); break; |
| 2105 | default : COMBINE_DATA(&m_IOPorts[offset]); break; |
| 2112 | 2106 | } |
| 2113 | 2107 | } |
| 2114 | 2108 | |
| r14963 | r14964 | |
| 2299 | 2293 | 7 !REQ from HDD |
| 2300 | 2294 | */ |
| 2301 | 2295 | |
| 2302 | | READ8_HANDLER( nimbus_disk_r ) |
| 2296 | READ8_MEMBER(rmnimbus_state::nimbus_disk_r) |
| 2303 | 2297 | { |
| 2304 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2305 | 2298 | int result = 0; |
| 2306 | | device_t *fdc = space->machine().device(FDC_TAG); |
| 2307 | | device_t *hdc = space->machine().device(SCSIBUS_TAG); |
| 2299 | device_t *fdc = machine().device(FDC_TAG); |
| 2300 | device_t *hdc = machine().device(SCSIBUS_TAG); |
| 2308 | 2301 | |
| 2309 | | int pc=cpu_get_pc(&space->device()); |
| 2310 | | device_t *drive = space->machine().device(nimbus_wd17xx_interface.floppy_drive_tags[FDC_DRIVE()]); |
| 2302 | int pc=cpu_get_pc(&space.device()); |
| 2303 | rmnimbus_state *state = machine().driver_data<rmnimbus_state>(); |
| 2304 | device_t *drive = machine().device(nimbus_wd17xx_interface.floppy_drive_tags[FDC_DRIVE()]); |
| 2311 | 2305 | |
| 2312 | 2306 | switch(offset*2) |
| 2313 | 2307 | { |
| r14963 | r14964 | |
| 2325 | 2319 | result = wd17xx_data_r(fdc, 0); |
| 2326 | 2320 | break; |
| 2327 | 2321 | case 0x10 : |
| 2328 | | state->m_nimbus_drives.reg410_in &= ~FDC_BITS_410; |
| 2329 | | state->m_nimbus_drives.reg410_in |= (FDC_MOTOR() ? FDC_MOTOR_MASKI : 0x00); |
| 2330 | | state->m_nimbus_drives.reg410_in |= (floppy_drive_get_flag_state(drive, FLOPPY_DRIVE_INDEX) ? 0x00 : FDC_INDEX_MASK); |
| 2331 | | state->m_nimbus_drives.reg410_in |= (floppy_drive_get_flag_state(drive, FLOPPY_DRIVE_READY) ? FDC_READY_MASK : 0x00); |
| 2322 | m_nimbus_drives.reg410_in &= ~FDC_BITS_410; |
| 2323 | m_nimbus_drives.reg410_in |= (FDC_MOTOR() ? FDC_MOTOR_MASKI : 0x00); |
| 2324 | m_nimbus_drives.reg410_in |= (floppy_drive_get_flag_state(drive, FLOPPY_DRIVE_INDEX) ? 0x00 : FDC_INDEX_MASK); |
| 2325 | m_nimbus_drives.reg410_in |= (floppy_drive_get_flag_state(drive, FLOPPY_DRIVE_READY) ? FDC_READY_MASK : 0x00); |
| 2332 | 2326 | |
| 2333 | 2327 | // Flip inverted bits |
| 2334 | | result=state->m_nimbus_drives.reg410_in ^ INV_BITS_410; |
| 2328 | result=m_nimbus_drives.reg410_in ^ INV_BITS_410; |
| 2335 | 2329 | break; |
| 2336 | 2330 | case 0x18 : |
| 2337 | 2331 | result = scsi_data_r(hdc); |
| 2338 | | hdc_post_rw(space->machine()); |
| 2332 | hdc_post_rw(machine()); |
| 2339 | 2333 | default: |
| 2340 | 2334 | break; |
| 2341 | 2335 | } |
| r14963 | r14964 | |
| 2368 | 2362 | 2 SCSI IRQ Enable |
| 2369 | 2363 | */ |
| 2370 | 2364 | |
| 2371 | | WRITE8_HANDLER( nimbus_disk_w ) |
| 2365 | WRITE8_MEMBER(rmnimbus_state::nimbus_disk_w) |
| 2372 | 2366 | { |
| 2373 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2374 | | device_t *fdc = space->machine().device(FDC_TAG); |
| 2375 | | device_t *hdc = space->machine().device(SCSIBUS_TAG); |
| 2376 | | int pc=cpu_get_pc(&space->device()); |
| 2377 | | UINT8 reg400_old = state->m_nimbus_drives.reg400; |
| 2367 | device_t *fdc = machine().device(FDC_TAG); |
| 2368 | device_t *hdc = machine().device(SCSIBUS_TAG); |
| 2369 | int pc=cpu_get_pc(&space.device()); |
| 2370 | UINT8 reg400_old = m_nimbus_drives.reg400; |
| 2378 | 2371 | |
| 2379 | 2372 | if(LOG_DISK_FDD && ((offset*2)<=0x10)) |
| 2380 | 2373 | logerror("Nimbus FDCW at %05X write of %02X to %04X\n",pc,data,(offset*2)+0x400); |
| r14963 | r14964 | |
| 2382 | 2375 | if((LOG_DISK_HDD) && (((offset*2)>=0x10) || (offset==0))) |
| 2383 | 2376 | logerror("Nimbus HDCW at %05X write of %02X to %04X\n",pc,data,(offset*2)+0x400); |
| 2384 | 2377 | |
| 2378 | rmnimbus_state *state = machine().driver_data<rmnimbus_state>(); |
| 2385 | 2379 | switch(offset*2) |
| 2386 | 2380 | { |
| 2387 | 2381 | case 0x00 : |
| 2388 | | state->m_nimbus_drives.reg400=data; |
| 2389 | | |
| 2382 | m_nimbus_drives.reg400=data; |
| 2390 | 2383 | wd17xx_set_drive(fdc,FDC_DRIVE()); |
| 2391 | 2384 | wd17xx_set_side(fdc, FDC_SIDE()); |
| 2392 | 2385 | |
| r14963 | r14964 | |
| 2395 | 2388 | |
| 2396 | 2389 | // if we enable hdc drq with a pending condition, act on it |
| 2397 | 2390 | if((data & HDC_DRQ_MASK) && (~reg400_old & HDC_DRQ_MASK)) |
| 2398 | | hdc_drq(space->machine()); |
| 2391 | hdc_drq(machine()); |
| 2399 | 2392 | |
| 2400 | 2393 | break; |
| 2401 | 2394 | case 0x08 : |
| r14963 | r14964 | |
| 2411 | 2404 | wd17xx_data_w(fdc, 0, data); |
| 2412 | 2405 | break; |
| 2413 | 2406 | case 0x10 : |
| 2414 | | hdc_ctrl_write(space->machine(),data); |
| 2407 | hdc_ctrl_write(machine(),data); |
| 2415 | 2408 | break; |
| 2416 | 2409 | |
| 2417 | 2410 | case 0x18 : |
| 2418 | 2411 | scsi_data_w(hdc, data); |
| 2419 | | hdc_post_rw(space->machine()); |
| 2412 | hdc_post_rw(machine()); |
| 2420 | 2413 | break; |
| 2421 | 2414 | } |
| 2422 | 2415 | } |
| r14963 | r14964 | |
| 2544 | 2537 | } |
| 2545 | 2538 | #endif |
| 2546 | 2539 | |
| 2547 | | READ8_HANDLER( nimbus_pc8031_r ) |
| 2540 | READ8_MEMBER(rmnimbus_state::nimbus_pc8031_r) |
| 2548 | 2541 | { |
| 2549 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2550 | | int pc=cpu_get_pc(&space->device()); |
| 2542 | int pc=cpu_get_pc(&space.device()); |
| 2551 | 2543 | UINT8 result; |
| 2552 | 2544 | |
| 2553 | 2545 | switch(offset*2) |
| 2554 | 2546 | { |
| 2555 | | case 0x00 : result=state->m_ipc_interface.ipc_out; |
| 2556 | | state->m_ipc_interface.status_in &= ~IPC_IN_READ_PEND; |
| 2557 | | state->m_ipc_interface.status_out &= ~IPC_OUT_BYTE_AVAIL; |
| 2547 | case 0x00 : result=m_ipc_interface.ipc_out; |
| 2548 | m_ipc_interface.status_in &= ~IPC_IN_READ_PEND; |
| 2549 | m_ipc_interface.status_out &= ~IPC_OUT_BYTE_AVAIL; |
| 2558 | 2550 | break; |
| 2559 | 2551 | |
| 2560 | | case 0x02 : result=state->m_ipc_interface.status_out; |
| 2552 | case 0x02 : result=m_ipc_interface.status_out; |
| 2561 | 2553 | break; |
| 2562 | 2554 | |
| 2563 | 2555 | default : result=0; break; |
| r14963 | r14964 | |
| 2569 | 2561 | return result; |
| 2570 | 2562 | } |
| 2571 | 2563 | |
| 2572 | | WRITE8_HANDLER( nimbus_pc8031_w ) |
| 2564 | WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_w) |
| 2573 | 2565 | { |
| 2574 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2575 | | int pc=cpu_get_pc(&space->device()); |
| 2566 | int pc=cpu_get_pc(&space.device()); |
| 2576 | 2567 | |
| 2577 | 2568 | switch(offset*2) |
| 2578 | 2569 | { |
| 2579 | | case 0x00 : state->m_ipc_interface.ipc_in=data; |
| 2580 | | state->m_ipc_interface.status_in |= IPC_IN_BYTE_AVAIL; |
| 2581 | | state->m_ipc_interface.status_in &= ~IPC_IN_ADDR; |
| 2582 | | state->m_ipc_interface.status_out |= IPC_OUT_READ_PEND; |
| 2570 | case 0x00 : m_ipc_interface.ipc_in=data; |
| 2571 | m_ipc_interface.status_in |= IPC_IN_BYTE_AVAIL; |
| 2572 | m_ipc_interface.status_in &= ~IPC_IN_ADDR; |
| 2573 | m_ipc_interface.status_out |= IPC_OUT_READ_PEND; |
| 2583 | 2574 | break; |
| 2584 | 2575 | |
| 2585 | | case 0x02 : state->m_ipc_interface.ipc_in=data; |
| 2586 | | state->m_ipc_interface.status_in |= IPC_IN_BYTE_AVAIL; |
| 2587 | | state->m_ipc_interface.status_in |= IPC_IN_ADDR; |
| 2588 | | state->m_ipc_interface.status_out |= IPC_OUT_READ_PEND; |
| 2576 | case 0x02 : m_ipc_interface.ipc_in=data; |
| 2577 | m_ipc_interface.status_in |= IPC_IN_BYTE_AVAIL; |
| 2578 | m_ipc_interface.status_in |= IPC_IN_ADDR; |
| 2579 | m_ipc_interface.status_out |= IPC_OUT_READ_PEND; |
| 2589 | 2580 | break; |
| 2590 | 2581 | } |
| 2591 | 2582 | |
| r14963 | r14964 | |
| 2596 | 2587 | |
| 2597 | 2588 | /* 8031/8051 Peripheral controler 8031/8051 side */ |
| 2598 | 2589 | |
| 2599 | | READ8_HANDLER( nimbus_pc8031_iou_r ) |
| 2590 | READ8_MEMBER(rmnimbus_state::nimbus_pc8031_iou_r) |
| 2600 | 2591 | { |
| 2601 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2602 | | int pc=cpu_get_pc(&space->device()); |
| 2592 | int pc=cpu_get_pc(&space.device()); |
| 2603 | 2593 | UINT8 result = 0; |
| 2604 | 2594 | |
| 2605 | 2595 | switch (offset & 0x01) |
| 2606 | 2596 | { |
| 2607 | | case 0x00 : result=state->m_ipc_interface.ipc_in; |
| 2608 | | state->m_ipc_interface.status_out &= ~IPC_OUT_READ_PEND; |
| 2609 | | state->m_ipc_interface.status_in &= ~IPC_IN_BYTE_AVAIL; |
| 2597 | case 0x00 : result=m_ipc_interface.ipc_in; |
| 2598 | m_ipc_interface.status_out &= ~IPC_OUT_READ_PEND; |
| 2599 | m_ipc_interface.status_in &= ~IPC_IN_BYTE_AVAIL; |
| 2610 | 2600 | break; |
| 2611 | 2601 | |
| 2612 | | case 0x01 : result=state->m_ipc_interface.status_in; |
| 2602 | case 0x01 : result=m_ipc_interface.status_in; |
| 2613 | 2603 | break; |
| 2614 | 2604 | } |
| 2615 | 2605 | |
| 2616 | | if(((offset==2) || (offset==3)) && (state->m_iou_reg092 & PC8031_INT_ENABLE)) |
| 2617 | | external_int(space->machine(),0,EXTERNAL_INT_PC8031_8C); |
| 2606 | if(((offset==2) || (offset==3)) && (m_iou_reg092 & PC8031_INT_ENABLE)) |
| 2607 | external_int(machine(),0,EXTERNAL_INT_PC8031_8C); |
| 2618 | 2608 | |
| 2619 | 2609 | if(LOG_PC8031) |
| 2620 | 2610 | logerror("8031: PCIOR %04X read of %04X returns %02X\n",pc,offset,result); |
| r14963 | r14964 | |
| 2622 | 2612 | return result; |
| 2623 | 2613 | } |
| 2624 | 2614 | |
| 2625 | | WRITE8_HANDLER( nimbus_pc8031_iou_w ) |
| 2615 | WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_iou_w) |
| 2626 | 2616 | { |
| 2627 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2628 | | int pc=cpu_get_pc(&space->device()); |
| 2617 | int pc=cpu_get_pc(&space.device()); |
| 2629 | 2618 | |
| 2630 | 2619 | if(LOG_PC8031) |
| 2631 | 2620 | logerror("8031 PCIOW %04X write of %02X to %04X\n",pc,data,offset); |
| 2632 | 2621 | |
| 2633 | 2622 | switch(offset & 0x03) |
| 2634 | 2623 | { |
| 2635 | | case 0x00 : state->m_ipc_interface.ipc_out=data; |
| 2636 | | state->m_ipc_interface.status_out |= IPC_OUT_BYTE_AVAIL; |
| 2637 | | state->m_ipc_interface.status_out &= ~IPC_OUT_ADDR; |
| 2638 | | state->m_ipc_interface.status_in |= IPC_IN_READ_PEND; |
| 2624 | case 0x00 : m_ipc_interface.ipc_out=data; |
| 2625 | m_ipc_interface.status_out |= IPC_OUT_BYTE_AVAIL; |
| 2626 | m_ipc_interface.status_out &= ~IPC_OUT_ADDR; |
| 2627 | m_ipc_interface.status_in |= IPC_IN_READ_PEND; |
| 2639 | 2628 | break; |
| 2640 | 2629 | |
| 2641 | | case 0x01 : state->m_ipc_interface.ipc_out=data; |
| 2642 | | state->m_ipc_interface.status_out |= IPC_OUT_BYTE_AVAIL; |
| 2643 | | state->m_ipc_interface.status_out |= IPC_OUT_ADDR; |
| 2644 | | state->m_ipc_interface.status_in |= IPC_IN_READ_PEND; |
| 2630 | case 0x01 : m_ipc_interface.ipc_out=data; |
| 2631 | m_ipc_interface.status_out |= IPC_OUT_BYTE_AVAIL; |
| 2632 | m_ipc_interface.status_out |= IPC_OUT_ADDR; |
| 2633 | m_ipc_interface.status_in |= IPC_IN_READ_PEND; |
| 2645 | 2634 | break; |
| 2646 | 2635 | |
| 2647 | | case 0x02 : state->m_ipc_interface.ipc_out=data; |
| 2648 | | state->m_ipc_interface.status_out |= IPC_OUT_BYTE_AVAIL; |
| 2649 | | state->m_ipc_interface.status_out &= ~IPC_OUT_ADDR; |
| 2650 | | state->m_ipc_interface.status_in |= IPC_IN_READ_PEND; |
| 2651 | | if(state->m_iou_reg092 & PC8031_INT_ENABLE) |
| 2652 | | external_int(space->machine(),0,EXTERNAL_INT_PC8031_8F); |
| 2636 | case 0x02 : m_ipc_interface.ipc_out=data; |
| 2637 | m_ipc_interface.status_out |= IPC_OUT_BYTE_AVAIL; |
| 2638 | m_ipc_interface.status_out &= ~IPC_OUT_ADDR; |
| 2639 | m_ipc_interface.status_in |= IPC_IN_READ_PEND; |
| 2640 | if(m_iou_reg092 & PC8031_INT_ENABLE) |
| 2641 | external_int(machine(),0,EXTERNAL_INT_PC8031_8F); |
| 2653 | 2642 | break; |
| 2654 | 2643 | |
| 2655 | | case 0x03 : state->m_ipc_interface.ipc_out=data; |
| 2656 | | //state->m_ipc_interface.status_out |= IPC_OUT_BYTE_AVAIL; |
| 2657 | | state->m_ipc_interface.status_out |= IPC_OUT_ADDR; |
| 2658 | | state->m_ipc_interface.status_in |= IPC_IN_READ_PEND; |
| 2659 | | if(state->m_iou_reg092 & PC8031_INT_ENABLE) |
| 2660 | | external_int(space->machine(),0,EXTERNAL_INT_PC8031_8E); |
| 2644 | case 0x03 : m_ipc_interface.ipc_out=data; |
| 2645 | //m_ipc_interface.status_out |= IPC_OUT_BYTE_AVAIL; |
| 2646 | m_ipc_interface.status_out |= IPC_OUT_ADDR; |
| 2647 | m_ipc_interface.status_in |= IPC_IN_READ_PEND; |
| 2648 | if(m_iou_reg092 & PC8031_INT_ENABLE) |
| 2649 | external_int(machine(),0,EXTERNAL_INT_PC8031_8E); |
| 2661 | 2650 | break; |
| 2662 | 2651 | } |
| 2663 | 2652 | } |
| 2664 | 2653 | |
| 2665 | | READ8_HANDLER( nimbus_pc8031_port_r ) |
| 2654 | READ8_MEMBER(rmnimbus_state::nimbus_pc8031_port_r) |
| 2666 | 2655 | { |
| 2667 | | device_t *er59256 = space->machine().device(ER59256_TAG); |
| 2668 | | int pc=cpu_get_pc(&space->device()); |
| 2656 | device_t *er59256 = machine().device(ER59256_TAG); |
| 2657 | int pc=cpu_get_pc(&space.device()); |
| 2669 | 2658 | UINT8 result = 0; |
| 2670 | 2659 | |
| 2671 | 2660 | if(LOG_PC8031_PORT) |
| r14963 | r14964 | |
| 2679 | 2668 | return result; |
| 2680 | 2669 | } |
| 2681 | 2670 | |
| 2682 | | WRITE8_HANDLER( nimbus_pc8031_port_w ) |
| 2671 | WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_port_w) |
| 2683 | 2672 | { |
| 2684 | | device_t *er59256 = space->machine().device(ER59256_TAG); |
| 2685 | | int pc=cpu_get_pc(&space->device()); |
| 2673 | device_t *er59256 = machine().device(ER59256_TAG); |
| 2674 | int pc=cpu_get_pc(&space.device()); |
| 2686 | 2675 | |
| 2687 | 2676 | switch (offset) |
| 2688 | 2677 | { |
| r14963 | r14964 | |
| 2696 | 2685 | |
| 2697 | 2686 | |
| 2698 | 2687 | /* IO Unit */ |
| 2699 | | READ8_HANDLER( nimbus_iou_r ) |
| 2688 | READ8_MEMBER(rmnimbus_state::nimbus_iou_r) |
| 2700 | 2689 | { |
| 2701 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2702 | | int pc=cpu_get_pc(&space->device()); |
| 2690 | int pc=cpu_get_pc(&space.device()); |
| 2703 | 2691 | UINT8 result=0; |
| 2704 | 2692 | |
| 2705 | 2693 | if(offset==0) |
| 2706 | 2694 | { |
| 2707 | | result=state->m_iou_reg092; |
| 2695 | result=m_iou_reg092; |
| 2708 | 2696 | } |
| 2709 | 2697 | |
| 2710 | 2698 | if(LOG_IOU) |
| r14963 | r14964 | |
| 2713 | 2701 | return result; |
| 2714 | 2702 | } |
| 2715 | 2703 | |
| 2716 | | WRITE8_HANDLER( nimbus_iou_w ) |
| 2704 | WRITE8_MEMBER(rmnimbus_state::nimbus_iou_w) |
| 2717 | 2705 | { |
| 2718 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2719 | | int pc=cpu_get_pc(&space->device()); |
| 2720 | | device_t *msm5205 = space->machine().device(MSM5205_TAG); |
| 2706 | int pc=cpu_get_pc(&space.device()); |
| 2707 | device_t *msm5205 = machine().device(MSM5205_TAG); |
| 2721 | 2708 | |
| 2722 | 2709 | if(LOG_IOU) |
| 2723 | 2710 | logerror("Nimbus IOUW %08X write of %02X to %04X\n",pc,data,(offset*2)+0x92); |
| 2724 | 2711 | |
| 2725 | 2712 | if(offset==0) |
| 2726 | 2713 | { |
| 2727 | | state->m_iou_reg092=data; |
| 2714 | m_iou_reg092=data; |
| 2728 | 2715 | msm5205_reset_w(msm5205, (data & MSM5205_INT_ENABLE) ? 0 : 1); |
| 2729 | 2716 | } |
| 2730 | 2717 | } |
| r14963 | r14964 | |
| 2764 | 2751 | state->m_ay8910_a=0; |
| 2765 | 2752 | } |
| 2766 | 2753 | |
| 2767 | | READ8_HANDLER( nimbus_sound_ay8910_r ) |
| 2754 | READ8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_r) |
| 2768 | 2755 | { |
| 2769 | | device_t *ay8910 = space->machine().device(AY8910_TAG); |
| 2756 | device_t *ay8910 = machine().device(AY8910_TAG); |
| 2770 | 2757 | UINT8 result=0; |
| 2771 | 2758 | |
| 2772 | 2759 | if ((offset*2)==0) |
| r14963 | r14964 | |
| 2775 | 2762 | return result; |
| 2776 | 2763 | } |
| 2777 | 2764 | |
| 2778 | | WRITE8_HANDLER( nimbus_sound_ay8910_w ) |
| 2765 | WRITE8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_w) |
| 2779 | 2766 | { |
| 2780 | | int pc=cpu_get_pc(&space->device()); |
| 2781 | | device_t *ay8910 = space->machine().device(AY8910_TAG); |
| 2767 | int pc=cpu_get_pc(&space.device()); |
| 2768 | device_t *ay8910 = machine().device(AY8910_TAG); |
| 2782 | 2769 | |
| 2783 | 2770 | if(LOG_SOUND) |
| 2784 | 2771 | logerror("Nimbus SoundW %05X write of %02X to %04X\n",pc,data,(offset*2)+0xE0); |
| r14963 | r14964 | |
| 2791 | 2778 | |
| 2792 | 2779 | } |
| 2793 | 2780 | |
| 2794 | | WRITE8_HANDLER( nimbus_sound_ay8910_porta_w ) |
| 2781 | WRITE8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_porta_w) |
| 2795 | 2782 | { |
| 2796 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2797 | | device_t *msm5205 = space->machine().device(MSM5205_TAG); |
| 2783 | device_t *msm5205 = machine().device(MSM5205_TAG); |
| 2798 | 2784 | |
| 2799 | 2785 | msm5205_data_w(msm5205, data); |
| 2800 | 2786 | |
| 2801 | 2787 | // Mouse code needs a copy of this. |
| 2802 | | state->m_ay8910_a=data; |
| 2788 | m_ay8910_a=data; |
| 2803 | 2789 | } |
| 2804 | 2790 | |
| 2805 | | WRITE8_HANDLER( nimbus_sound_ay8910_portb_w ) |
| 2791 | WRITE8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_portb_w) |
| 2806 | 2792 | { |
| 2807 | | rmnimbus_state *state = space->machine().driver_data<rmnimbus_state>(); |
| 2808 | | device_t *msm5205 = space->machine().device(MSM5205_TAG); |
| 2793 | device_t *msm5205 = machine().device(MSM5205_TAG); |
| 2809 | 2794 | |
| 2810 | | if((data & 0x07)!=state->m_last_playmode) |
| 2795 | if((data & 0x07)!=m_last_playmode) |
| 2811 | 2796 | { |
| 2812 | | state->m_last_playmode=(data & 0x07); |
| 2813 | | msm5205_playmode_w(msm5205, state->m_last_playmode); |
| 2797 | m_last_playmode=(data & 0x07); |
| 2798 | msm5205_playmode_w(msm5205, m_last_playmode); |
| 2814 | 2799 | } |
| 2815 | 2800 | } |
| 2816 | 2801 | |
| r14963 | r14964 | |
| 2980 | 2965 | state->m_intstate_y=intstate_y; |
| 2981 | 2966 | } |
| 2982 | 2967 | |
| 2983 | | READ8_HANDLER( nimbus_mouse_js_r ) |
| 2968 | READ8_MEMBER(rmnimbus_state::nimbus_mouse_js_r) |
| 2984 | 2969 | { |
| 2985 | | rmnimbus_state *drvstate = space->machine().driver_data<rmnimbus_state>(); |
| 2986 | 2970 | /* |
| 2987 | 2971 | |
| 2988 | 2972 | bit description |
| r14963 | r14964 | |
| 2998 | 2982 | |
| 2999 | 2983 | */ |
| 3000 | 2984 | UINT8 result; |
| 3001 | | //int pc=cpu_get_pc(space->machine().device(MAINCPU_TAG)); |
| 2985 | //int pc=cpu_get_pc(machine().device(MAINCPU_TAG)); |
| 2986 | _mouse_joy_state *state = &m_nimbus_mouse; |
| 3002 | 2987 | |
| 3003 | | _mouse_joy_state *state = &drvstate->m_nimbus_mouse; |
| 3004 | | |
| 3005 | | if (input_port_read(space->machine(), "config") & 0x01) |
| 2988 | if (input_port_read(machine(), "config") & 0x01) |
| 3006 | 2989 | { |
| 3007 | 2990 | result=state->m_reg0a4; |
| 3008 | 2991 | //logerror("mouse_js_r: pc=%05X, result=%02X\n",pc,result); |
| 3009 | 2992 | } |
| 3010 | 2993 | else |
| 3011 | 2994 | { |
| 3012 | | result=input_port_read_safe(space->machine(), JOYSTICK0_TAG, 0xff); |
| 2995 | result=input_port_read_safe(machine(), JOYSTICK0_TAG, 0xff); |
| 3013 | 2996 | } |
| 3014 | 2997 | |
| 3015 | 2998 | return result; |
| 3016 | 2999 | } |
| 3017 | 3000 | |
| 3018 | | WRITE8_HANDLER( nimbus_mouse_js_w ) |
| 3001 | WRITE8_MEMBER(rmnimbus_state::nimbus_mouse_js_w) |
| 3019 | 3002 | { |
| 3020 | 3003 | } |
| 3021 | 3004 | |
src/mess/machine/pk8020.c
| r14963 | r14964 | |
| 18 | 18 | static void pk8020_set_bank(running_machine &machine,UINT8 data); |
| 19 | 19 | |
| 20 | 20 | |
| 21 | | static READ8_HANDLER( keyboard_r ) |
| 21 | READ8_MEMBER(pk8020_state::keyboard_r) |
| 22 | 22 | { |
| 23 | 23 | static const char *const keynames[] = { |
| 24 | 24 | "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", |
| r14963 | r14964 | |
| 28 | 28 | UINT8 line = 0; |
| 29 | 29 | if (offset & 0x100) line=8; |
| 30 | 30 | |
| 31 | | if (offset & 0x0001) retVal|=input_port_read(space->machine(),keynames[line]); |
| 31 | if (offset & 0x0001) retVal|=input_port_read(machine(),keynames[line]); |
| 32 | 32 | line++; |
| 33 | | if (offset & 0x0002) retVal|=input_port_read(space->machine(),keynames[line]); |
| 33 | if (offset & 0x0002) retVal|=input_port_read(machine(),keynames[line]); |
| 34 | 34 | line++; |
| 35 | | if (offset & 0x0004) retVal|=input_port_read(space->machine(),keynames[line]); |
| 35 | if (offset & 0x0004) retVal|=input_port_read(machine(),keynames[line]); |
| 36 | 36 | line++; |
| 37 | | if (offset & 0x0008) retVal|=input_port_read(space->machine(),keynames[line]); |
| 37 | if (offset & 0x0008) retVal|=input_port_read(machine(),keynames[line]); |
| 38 | 38 | line++; |
| 39 | | if (offset & 0x0010) retVal|=input_port_read(space->machine(),keynames[line]); |
| 39 | if (offset & 0x0010) retVal|=input_port_read(machine(),keynames[line]); |
| 40 | 40 | line++; |
| 41 | | if (offset & 0x0020) retVal|=input_port_read(space->machine(),keynames[line]); |
| 41 | if (offset & 0x0020) retVal|=input_port_read(machine(),keynames[line]); |
| 42 | 42 | line++; |
| 43 | | if (offset & 0x0040) retVal|=input_port_read(space->machine(),keynames[line]); |
| 43 | if (offset & 0x0040) retVal|=input_port_read(machine(),keynames[line]); |
| 44 | 44 | line++; |
| 45 | | if (offset & 0x0080) retVal|=input_port_read(space->machine(),keynames[line]); |
| 45 | if (offset & 0x0080) retVal|=input_port_read(machine(),keynames[line]); |
| 46 | 46 | line++; |
| 47 | 47 | |
| 48 | 48 | return retVal; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | | static READ8_HANDLER(sysreg_r) |
| 51 | READ8_MEMBER(pk8020_state::sysreg_r) |
| 52 | 52 | { |
| 53 | | return space->machine().device<ram_device>(RAM_TAG)->pointer()[offset]; |
| 53 | return machine().device<ram_device>(RAM_TAG)->pointer()[offset]; |
| 54 | 54 | } |
| 55 | | static WRITE8_HANDLER(sysreg_w) |
| 55 | WRITE8_MEMBER(pk8020_state::sysreg_w) |
| 56 | 56 | { |
| 57 | | pk8020_state *state = space->machine().driver_data<pk8020_state>(); |
| 58 | 57 | if (BIT(offset,7)==0) { |
| 59 | | pk8020_set_bank(space->machine(),data >> 2); |
| 58 | pk8020_set_bank(machine(),data >> 2); |
| 60 | 59 | } else if (BIT(offset,6)==0) { |
| 61 | 60 | // Color |
| 62 | | state->m_color = data; |
| 61 | m_color = data; |
| 63 | 62 | } else if (BIT(offset,2)==0) { |
| 64 | 63 | // Palette set |
| 65 | 64 | UINT8 number = data & 0x0f; |
| r14963 | r14964 | |
| 68 | 67 | UINT8 r = ((color & 0x04) ? 0xC0 : 0) + i; |
| 69 | 68 | UINT8 g = ((color & 0x02) ? 0xC0 : 0) + i; |
| 70 | 69 | UINT8 b = ((color & 0x01) ? 0xC0 : 0) + i; |
| 71 | | palette_set_color( space->machine(), number, MAKE_RGB(r,g,b) ); |
| 70 | palette_set_color( machine(), number, MAKE_RGB(r,g,b) ); |
| 72 | 71 | } |
| 73 | 72 | } |
| 74 | 73 | |
| 75 | | static READ8_HANDLER(text_r) |
| 74 | READ8_MEMBER(pk8020_state::text_r) |
| 76 | 75 | { |
| 77 | | pk8020_state *state = space->machine().driver_data<pk8020_state>(); |
| 78 | | if (state->m_attr == 3) state->m_text_attr=space->machine().device<ram_device>(RAM_TAG)->pointer()[0x40400+offset]; |
| 79 | | return space->machine().device<ram_device>(RAM_TAG)->pointer()[0x40000+offset]; |
| 76 | if (m_attr == 3) m_text_attr=machine().device<ram_device>(RAM_TAG)->pointer()[0x40400+offset]; |
| 77 | return machine().device<ram_device>(RAM_TAG)->pointer()[0x40000+offset]; |
| 80 | 78 | } |
| 81 | 79 | |
| 82 | | static WRITE8_HANDLER(text_w) |
| 80 | WRITE8_MEMBER(pk8020_state::text_w) |
| 83 | 81 | { |
| 84 | | pk8020_state *state = space->machine().driver_data<pk8020_state>(); |
| 85 | | UINT8 *ram = space->machine().device<ram_device>(RAM_TAG)->pointer(); |
| 82 | UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer(); |
| 86 | 83 | ram[0x40000+offset] = data; |
| 87 | | switch (state->m_attr) { |
| 84 | switch (m_attr) { |
| 88 | 85 | case 0: break; |
| 89 | 86 | case 1: ram[0x40400+offset]=0x01;break; |
| 90 | 87 | case 2: ram[0x40400+offset]=0x00;break; |
| 91 | | case 3: ram[0x40400+offset]=state->m_text_attr;break; |
| 88 | case 3: ram[0x40400+offset]=m_text_attr;break; |
| 92 | 89 | } |
| 93 | 90 | } |
| 94 | 91 | |
| 95 | | static READ8_HANDLER(gzu_r) |
| 92 | READ8_MEMBER(pk8020_state::gzu_r) |
| 96 | 93 | { |
| 97 | | pk8020_state *state = space->machine().driver_data<pk8020_state>(); |
| 98 | | UINT8 *addr = space->machine().device<ram_device>(RAM_TAG)->pointer() + 0x10000 + (state->m_video_page_access * 0xC000); |
| 94 | UINT8 *addr = machine().device<ram_device>(RAM_TAG)->pointer() + 0x10000 + (m_video_page_access * 0xC000); |
| 99 | 95 | UINT8 p0 = addr[offset]; |
| 100 | 96 | UINT8 p1 = addr[offset + 0x4000]; |
| 101 | 97 | UINT8 p2 = addr[offset + 0x8000]; |
| 102 | 98 | UINT8 retVal = 0; |
| 103 | | if(state->m_color & 0x80) { |
| 99 | if(m_color & 0x80) { |
| 104 | 100 | // Color mode |
| 105 | | if (!(state->m_color & 0x10)) { |
| 101 | if (!(m_color & 0x10)) { |
| 106 | 102 | p0 ^= 0xff; |
| 107 | 103 | } |
| 108 | | if (!(state->m_color & 0x20)) { |
| 104 | if (!(m_color & 0x20)) { |
| 109 | 105 | p1 ^= 0xff; |
| 110 | 106 | } |
| 111 | | if (!(state->m_color & 0x40)) { |
| 107 | if (!(m_color & 0x40)) { |
| 112 | 108 | p2 ^= 0xff; |
| 113 | 109 | } |
| 114 | 110 | retVal = (p0 & p1 & p2) ^ 0xff; |
| 115 | 111 | } else { |
| 116 | 112 | // Plane mode |
| 117 | | if (state->m_color & 0x10) { |
| 113 | if (m_color & 0x10) { |
| 118 | 114 | retVal |= p0; |
| 119 | 115 | } |
| 120 | | if (state->m_color & 0x20) { |
| 116 | if (m_color & 0x20) { |
| 121 | 117 | retVal |= p1; |
| 122 | 118 | } |
| 123 | | if (state->m_color & 0x40) { |
| 119 | if (m_color & 0x40) { |
| 124 | 120 | retVal |= p2; |
| 125 | 121 | } |
| 126 | 122 | } |
| 127 | 123 | return retVal; |
| 128 | 124 | } |
| 129 | 125 | |
| 130 | | static WRITE8_HANDLER(gzu_w) |
| 126 | WRITE8_MEMBER(pk8020_state::gzu_w) |
| 131 | 127 | { |
| 132 | | pk8020_state *state = space->machine().driver_data<pk8020_state>(); |
| 133 | | UINT8 *addr = space->machine().device<ram_device>(RAM_TAG)->pointer() + 0x10000 + (state->m_video_page_access * 0xC000); |
| 128 | UINT8 *addr = machine().device<ram_device>(RAM_TAG)->pointer() + 0x10000 + (m_video_page_access * 0xC000); |
| 134 | 129 | UINT8 *plane_0 = addr; |
| 135 | 130 | UINT8 *plane_1 = addr + 0x4000; |
| 136 | 131 | UINT8 *plane_2 = addr + 0x8000; |
| 137 | 132 | |
| 138 | | if(state->m_color & 0x80) |
| 133 | if(m_color & 0x80) |
| 139 | 134 | { |
| 140 | 135 | // Color mode |
| 141 | | plane_0[offset] = (plane_0[offset] & ~data) | ((state->m_color & 2) ? data : 0); |
| 142 | | plane_1[offset] = (plane_1[offset] & ~data) | ((state->m_color & 4) ? data : 0); |
| 143 | | plane_2[offset] = (plane_2[offset] & ~data) | ((state->m_color & 8) ? data : 0); |
| 136 | plane_0[offset] = (plane_0[offset] & ~data) | ((m_color & 2) ? data : 0); |
| 137 | plane_1[offset] = (plane_1[offset] & ~data) | ((m_color & 4) ? data : 0); |
| 138 | plane_2[offset] = (plane_2[offset] & ~data) | ((m_color & 8) ? data : 0); |
| 144 | 139 | } else { |
| 145 | 140 | // Plane mode |
| 146 | | UINT8 mask = (state->m_color & 1) ? data : 0; |
| 147 | | if (!(state->m_color & 0x02)) { |
| 141 | UINT8 mask = (m_color & 1) ? data : 0; |
| 142 | if (!(m_color & 0x02)) { |
| 148 | 143 | plane_0[offset] = (plane_0[offset] & ~data) | mask; |
| 149 | 144 | } |
| 150 | | if (!(state->m_color & 0x04)) { |
| 145 | if (!(m_color & 0x04)) { |
| 151 | 146 | plane_1[offset] = (plane_1[offset] & ~data) | mask; |
| 152 | 147 | } |
| 153 | | if (!(state->m_color & 0x08)) { |
| 148 | if (!(m_color & 0x08)) { |
| 154 | 149 | plane_2[offset] = (plane_2[offset] & ~data) | mask; |
| 155 | 150 | } |
| 156 | 151 | } |
| 157 | 152 | } |
| 158 | 153 | |
| 159 | | static READ8_HANDLER(devices_r) |
| 154 | READ8_MEMBER(pk8020_state::devices_r) |
| 160 | 155 | { |
| 161 | | i8255_device *ppi1 = space->machine().device<i8255_device>("ppi8255_1"); |
| 162 | | i8255_device *ppi2 = space->machine().device<i8255_device>("ppi8255_2"); |
| 163 | | i8255_device *ppi3 = space->machine().device<i8255_device>("ppi8255_3"); |
| 164 | | device_t *pit = space->machine().device("pit8253"); |
| 165 | | device_t *pic = space->machine().device("pic8259"); |
| 166 | | i8251_device *rs232 = space->machine().device<i8251_device>("rs232"); |
| 167 | | i8251_device *lan = space->machine().device<i8251_device>("lan"); |
| 168 | | device_t *fdc = space->machine().device("wd1793"); |
| 156 | i8255_device *ppi1 = machine().device<i8255_device>("ppi8255_1"); |
| 157 | i8255_device *ppi2 = machine().device<i8255_device>("ppi8255_2"); |
| 158 | i8255_device *ppi3 = machine().device<i8255_device>("ppi8255_3"); |
| 159 | device_t *pit = machine().device("pit8253"); |
| 160 | device_t *pic = machine().device("pic8259"); |
| 161 | i8251_device *rs232 = machine().device<i8251_device>("rs232"); |
| 162 | i8251_device *lan = machine().device<i8251_device>("lan"); |
| 163 | device_t *fdc = machine().device("wd1793"); |
| 169 | 164 | |
| 170 | 165 | switch(offset & 0x38) |
| 171 | 166 | { |
| 172 | 167 | case 0x00: return pit8253_r(pit,offset & 3); |
| 173 | | case 0x08: return ppi3->read(*space,offset & 3); |
| 168 | case 0x08: return ppi3->read(space,offset & 3); |
| 174 | 169 | case 0x10: switch(offset & 1) { |
| 175 | | case 0 : return rs232->data_r(*space,0); |
| 176 | | case 1 : return rs232->status_r(*space,0); |
| 170 | case 0 : return rs232->data_r(space,0); |
| 171 | case 1 : return rs232->status_r(space,0); |
| 177 | 172 | } |
| 178 | 173 | break; |
| 179 | 174 | case 0x18: switch(offset & 3) { |
| r14963 | r14964 | |
| 184 | 179 | } |
| 185 | 180 | break; |
| 186 | 181 | case 0x20: switch(offset & 1) { |
| 187 | | case 0 : return lan->data_r(*space,0); |
| 188 | | case 1 : return lan->status_r(*space,0); |
| 182 | case 0 : return lan->data_r(space,0); |
| 183 | case 1 : return lan->status_r(space,0); |
| 189 | 184 | } |
| 190 | 185 | break; |
| 191 | 186 | case 0x28: return pic8259_r(pic,offset & 1); |
| 192 | | case 0x30: return ppi2->read(*space,offset & 3); |
| 193 | | case 0x38: return ppi1->read(*space,offset & 3); |
| 187 | case 0x30: return ppi2->read(space,offset & 3); |
| 188 | case 0x38: return ppi1->read(space,offset & 3); |
| 194 | 189 | } |
| 195 | 190 | return 0xff; |
| 196 | 191 | } |
| 197 | 192 | |
| 198 | | static WRITE8_HANDLER(devices_w) |
| 193 | WRITE8_MEMBER(pk8020_state::devices_w) |
| 199 | 194 | { |
| 200 | | i8255_device *ppi1 = space->machine().device<i8255_device>("ppi8255_1"); |
| 201 | | i8255_device *ppi2 = space->machine().device<i8255_device>("ppi8255_2"); |
| 202 | | i8255_device *ppi3 = space->machine().device<i8255_device>("ppi8255_3"); |
| 203 | | device_t *pit = space->machine().device("pit8253"); |
| 204 | | device_t *pic = space->machine().device("pic8259"); |
| 205 | | i8251_device *rs232 = space->machine().device<i8251_device>("rs232"); |
| 206 | | i8251_device *lan = space->machine().device<i8251_device>("lan"); |
| 207 | | device_t *fdc = space->machine().device("wd1793"); |
| 195 | i8255_device *ppi1 = machine().device<i8255_device>("ppi8255_1"); |
| 196 | i8255_device *ppi2 = machine().device<i8255_device>("ppi8255_2"); |
| 197 | i8255_device *ppi3 = machine().device<i8255_device>("ppi8255_3"); |
| 198 | device_t *pit = machine().device("pit8253"); |
| 199 | device_t *pic = machine().device("pic8259"); |
| 200 | i8251_device *rs232 = machine().device<i8251_device>("rs232"); |
| 201 | i8251_device *lan = machine().device<i8251_device>("lan"); |
| 202 | device_t *fdc = machine().device("wd1793"); |
| 208 | 203 | |
| 209 | 204 | switch(offset & 0x38) |
| 210 | 205 | { |
| 211 | 206 | case 0x00: pit8253_w(pit,offset & 3,data); break; |
| 212 | | case 0x08: ppi3->write(*space,offset & 3,data); break; |
| 207 | case 0x08: ppi3->write(space,offset & 3,data); break; |
| 213 | 208 | case 0x10: switch(offset & 1) { |
| 214 | | case 0 : rs232->data_w(*space,0,data); break; |
| 215 | | case 1 : rs232->control_w(*space,0,data); break; |
| 209 | case 0 : rs232->data_w(space,0,data); break; |
| 210 | case 1 : rs232->control_w(space,0,data); break; |
| 216 | 211 | } |
| 217 | 212 | break; |
| 218 | 213 | case 0x18: switch(offset & 3) { |
| r14963 | r14964 | |
| 223 | 218 | } |
| 224 | 219 | break; |
| 225 | 220 | case 0x20: switch(offset & 1) { |
| 226 | | case 0 : lan->data_w(*space,0,data); break; |
| 227 | | case 1 : lan->control_w(*space,0,data); break; |
| 221 | case 0 : lan->data_w(space,0,data); break; |
| 222 | case 1 : lan->control_w(space,0,data); break; |
| 228 | 223 | } |
| 229 | 224 | break; |
| 230 | 225 | case 0x28: pic8259_w(pic,offset & 1,data);break; |
| 231 | | case 0x30: ppi2->write(*space,offset & 3,data); break; |
| 232 | | case 0x38: ppi1->write(*space,offset & 3,data); break; |
| 226 | case 0x30: ppi2->write(space,offset & 3,data); break; |
| 227 | case 0x38: ppi1->write(space,offset & 3,data); break; |
| 233 | 228 | } |
| 234 | 229 | } |
| 235 | 230 | |
| 236 | 231 | static void pk8020_set_bank(running_machine &machine,UINT8 data) |
| 237 | 232 | { |
| 233 | pk8020_state *state = machine.driver_data<pk8020_state>(); |
| 238 | 234 | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 239 | 235 | UINT8 *mem = machine.region("maincpu")->base(); |
| 240 | 236 | UINT8 *ram = machine.device<ram_device>(RAM_TAG)->pointer(); |
| r14963 | r14964 | |
| 248 | 244 | memory_set_bankptr(machine, "bank1", mem + 0x10000); |
| 249 | 245 | memory_set_bankptr(machine, "bank2", ram + 0x0000); |
| 250 | 246 | // Keyboard |
| 251 | | space->install_legacy_read_handler (0x3800, 0x39ff, FUNC(keyboard_r)); |
| 247 | space->install_read_handler (0x3800, 0x39ff, read8_delegate(FUNC(pk8020_state::keyboard_r),state)); |
| 252 | 248 | space->install_write_bank(0x3800, 0x39ff, "bank3"); |
| 253 | 249 | memory_set_bankptr(machine, "bank3", ram + 0x3800); |
| 254 | 250 | // System reg |
| 255 | | space->install_legacy_read_handler (0x3a00, 0x3aff, FUNC(sysreg_r)); |
| 256 | | space->install_legacy_write_handler(0x3a00, 0x3aff, FUNC(sysreg_w)); |
| 251 | space->install_read_handler (0x3a00, 0x3aff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 252 | space->install_write_handler(0x3a00, 0x3aff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 257 | 253 | // Devices |
| 258 | | space->install_legacy_read_handler (0x3b00, 0x3bff, FUNC(devices_r)); |
| 259 | | space->install_legacy_write_handler(0x3b00, 0x3bff, FUNC(devices_w)); |
| 254 | space->install_read_handler (0x3b00, 0x3bff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 255 | space->install_write_handler(0x3b00, 0x3bff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 260 | 256 | // Text Video Memory |
| 261 | | space->install_legacy_read_handler (0x3c00, 0x3fff, FUNC(text_r)); |
| 262 | | space->install_legacy_write_handler(0x3c00, 0x3fff, FUNC(text_w)); |
| 257 | space->install_read_handler (0x3c00, 0x3fff, read8_delegate(FUNC(pk8020_state::text_r),state)); |
| 258 | space->install_write_handler(0x3c00, 0x3fff, write8_delegate(FUNC(pk8020_state::text_w),state)); |
| 263 | 259 | // RAM |
| 264 | 260 | space->install_read_bank (0x4000, 0xffff, "bank4"); |
| 265 | 261 | space->install_write_bank(0x4000, 0xffff, "bank5"); |
| r14963 | r14964 | |
| 315 | 311 | memory_set_bankptr(machine, "bank3", ram + 0x2000); |
| 316 | 312 | memory_set_bankptr(machine, "bank4", ram + 0x2000); |
| 317 | 313 | // Keyboard |
| 318 | | space->install_legacy_read_handler (0xf800, 0xf9ff, FUNC(keyboard_r)); |
| 314 | space->install_read_handler (0xf800, 0xf9ff, read8_delegate(FUNC(pk8020_state::keyboard_r),state)); |
| 319 | 315 | space->install_write_bank(0xf800, 0xf9ff, "bank5"); |
| 320 | 316 | memory_set_bankptr(machine, "bank5", ram + 0xf800); |
| 321 | 317 | // System reg |
| 322 | | space->install_legacy_read_handler (0xfa00, 0xfaff, FUNC(sysreg_r)); |
| 323 | | space->install_legacy_write_handler(0xfa00, 0xfaff, FUNC(sysreg_w)); |
| 318 | space->install_read_handler (0xfa00, 0xfaff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 319 | space->install_write_handler(0xfa00, 0xfaff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 324 | 320 | // Devices |
| 325 | | space->install_legacy_read_handler (0xfb00, 0xfbff, FUNC(devices_r)); |
| 326 | | space->install_legacy_write_handler(0xfb00, 0xfbff, FUNC(devices_w)); |
| 321 | space->install_read_handler (0xfb00, 0xfbff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 322 | space->install_write_handler(0xfb00, 0xfbff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 327 | 323 | // Text Video Memory |
| 328 | | space->install_legacy_read_handler (0xfc00, 0xffff, FUNC(text_r)); |
| 329 | | space->install_legacy_write_handler(0xfc00, 0xffff, FUNC(text_w)); |
| 324 | space->install_read_handler (0xfc00, 0xffff, read8_delegate(FUNC(pk8020_state::text_r),state)); |
| 325 | space->install_write_handler(0xfc00, 0xffff, write8_delegate(FUNC(pk8020_state::text_w),state)); |
| 330 | 326 | } |
| 331 | 327 | break; |
| 332 | 328 | case 0x06 : |
| r14963 | r14964 | |
| 342 | 338 | memory_set_bankptr(machine, "bank3", ram + 0x4000); |
| 343 | 339 | memory_set_bankptr(machine, "bank4", ram + 0x4000); |
| 344 | 340 | // Keyboard |
| 345 | | space->install_legacy_read_handler (0xf800, 0xf9ff, FUNC(keyboard_r)); |
| 341 | space->install_read_handler (0xf800, 0xf9ff, read8_delegate(FUNC(pk8020_state::keyboard_r),state)); |
| 346 | 342 | space->install_write_bank(0xf800, 0xf9ff, "bank5"); |
| 347 | 343 | memory_set_bankptr(machine, "bank5", ram + 0xf800); |
| 348 | 344 | // System reg |
| 349 | | space->install_legacy_read_handler (0xfa00, 0xfaff, FUNC(sysreg_r)); |
| 350 | | space->install_legacy_write_handler(0xfa00, 0xfaff, FUNC(sysreg_w)); |
| 345 | space->install_read_handler (0xfa00, 0xfaff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 346 | space->install_write_handler(0xfa00, 0xfaff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 351 | 347 | // Devices |
| 352 | | space->install_legacy_read_handler (0xfb00, 0xfbff, FUNC(devices_r)); |
| 353 | | space->install_legacy_write_handler(0xfb00, 0xfbff, FUNC(devices_w)); |
| 348 | space->install_read_handler (0xfb00, 0xfbff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 349 | space->install_write_handler(0xfb00, 0xfbff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 354 | 350 | // Text Video Memory |
| 355 | | space->install_legacy_read_handler (0xfc00, 0xffff, FUNC(text_r)); |
| 356 | | space->install_legacy_write_handler(0xfc00, 0xffff, FUNC(text_w)); |
| 351 | space->install_read_handler (0xfc00, 0xffff, read8_delegate(FUNC(pk8020_state::text_r),state)); |
| 352 | space->install_write_handler(0xfc00, 0xffff, write8_delegate(FUNC(pk8020_state::text_w),state)); |
| 357 | 353 | } |
| 358 | 354 | break; |
| 359 | 355 | case 0x07 : |
| r14963 | r14964 | |
| 364 | 360 | memory_set_bankptr(machine, "bank1", ram); |
| 365 | 361 | memory_set_bankptr(machine, "bank2", ram); |
| 366 | 362 | // Keyboard |
| 367 | | space->install_legacy_read_handler (0xf800, 0xf9ff, FUNC(keyboard_r)); |
| 363 | space->install_read_handler (0xf800, 0xf9ff, read8_delegate(FUNC(pk8020_state::keyboard_r),state)); |
| 368 | 364 | space->install_write_bank(0xf800, 0xf9ff, "bank3"); |
| 369 | 365 | memory_set_bankptr(machine, "bank3", ram + 0xf800); |
| 370 | 366 | // System reg |
| 371 | | space->install_legacy_read_handler (0xfa00, 0xfaff, FUNC(sysreg_r)); |
| 372 | | space->install_legacy_write_handler(0xfa00, 0xfaff, FUNC(sysreg_w)); |
| 367 | space->install_read_handler (0xfa00, 0xfaff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 368 | space->install_write_handler(0xfa00, 0xfaff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 373 | 369 | // Devices |
| 374 | | space->install_legacy_read_handler (0xfb00, 0xfbff, FUNC(devices_r)); |
| 375 | | space->install_legacy_write_handler(0xfb00, 0xfbff, FUNC(devices_w)); |
| 370 | space->install_read_handler (0xfb00, 0xfbff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 371 | space->install_write_handler(0xfb00, 0xfbff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 376 | 372 | // Text Video Memory |
| 377 | | space->install_legacy_read_handler (0xfc00, 0xffff, FUNC(text_r)); |
| 378 | | space->install_legacy_write_handler(0xfc00, 0xffff, FUNC(text_w)); |
| 373 | space->install_read_handler (0xfc00, 0xffff, read8_delegate(FUNC(pk8020_state::text_r),state)); |
| 374 | space->install_write_handler(0xfc00, 0xffff, write8_delegate(FUNC(pk8020_state::text_w),state)); |
| 379 | 375 | } |
| 380 | 376 | break; |
| 381 | 377 | case 0x08 : |
| r14963 | r14964 | |
| 386 | 382 | memory_set_bankptr(machine, "bank1", mem + 0x10000); |
| 387 | 383 | memory_set_bankptr(machine, "bank2", ram + 0x0000); |
| 388 | 384 | // Keyboard |
| 389 | | space->install_legacy_read_handler (0x3800, 0x39ff, FUNC(keyboard_r)); |
| 385 | space->install_read_handler (0x3800, 0x39ff, read8_delegate(FUNC(pk8020_state::keyboard_r),state)); |
| 390 | 386 | space->install_write_bank(0x3800, 0x39ff, "bank3"); |
| 391 | 387 | memory_set_bankptr(machine, "bank3", ram + 0x3800); |
| 392 | 388 | // System reg |
| 393 | | space->install_legacy_read_handler (0x3a00, 0x3aff, FUNC(sysreg_r)); |
| 394 | | space->install_legacy_write_handler(0x3a00, 0x3aff, FUNC(sysreg_w)); |
| 389 | space->install_read_handler (0x3a00, 0x3aff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 390 | space->install_write_handler(0x3a00, 0x3aff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 395 | 391 | // Devices |
| 396 | | space->install_legacy_read_handler (0x3b00, 0x3bff, FUNC(devices_r)); |
| 397 | | space->install_legacy_write_handler(0x3b00, 0x3bff, FUNC(devices_w)); |
| 392 | space->install_read_handler (0x3b00, 0x3bff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 393 | space->install_write_handler(0x3b00, 0x3bff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 398 | 394 | // Text Video Memory |
| 399 | | space->install_legacy_read_handler (0x3c00, 0x3fff, FUNC(text_r)); |
| 400 | | space->install_legacy_write_handler(0x3c00, 0x3fff, FUNC(text_w)); |
| 395 | space->install_read_handler (0x3c00, 0x3fff, read8_delegate(FUNC(pk8020_state::text_r),state)); |
| 396 | space->install_write_handler(0x3c00, 0x3fff, write8_delegate(FUNC(pk8020_state::text_w),state)); |
| 401 | 397 | // RAM |
| 402 | 398 | space->install_read_bank (0x4000, 0xbfff, "bank4"); |
| 403 | 399 | space->install_write_bank(0x4000, 0xbfff, "bank5"); |
| 404 | 400 | memory_set_bankptr(machine, "bank4", ram + 0x4000); |
| 405 | 401 | memory_set_bankptr(machine, "bank5", ram + 0x4000); |
| 406 | 402 | // Video RAM |
| 407 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 408 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 403 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 404 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 409 | 405 | |
| 410 | 406 | } |
| 411 | 407 | break; |
| r14963 | r14964 | |
| 422 | 418 | memory_set_bankptr(machine, "bank3", ram + 0x2000); |
| 423 | 419 | memory_set_bankptr(machine, "bank4", ram + 0x2000); |
| 424 | 420 | // Video RAM |
| 425 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 426 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 421 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 422 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 427 | 423 | } |
| 428 | 424 | break; |
| 429 | 425 | case 0x0A : |
| r14963 | r14964 | |
| 439 | 435 | memory_set_bankptr(machine, "bank3", ram + 0x4000); |
| 440 | 436 | memory_set_bankptr(machine, "bank4", ram + 0x4000); |
| 441 | 437 | // Video RAM |
| 442 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 443 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 438 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 439 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 444 | 440 | } |
| 445 | 441 | break; |
| 446 | 442 | case 0x0B : |
| r14963 | r14964 | |
| 451 | 447 | memory_set_bankptr(machine, "bank1", ram + 0x0000); |
| 452 | 448 | memory_set_bankptr(machine, "bank2", ram + 0x0000); |
| 453 | 449 | // Video RAM |
| 454 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 455 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 450 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 451 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 456 | 452 | } |
| 457 | 453 | break; |
| 458 | 454 | case 0x0C : |
| r14963 | r14964 | |
| 469 | 465 | memory_set_bankptr(machine, "bank3", ram + 0x2000); |
| 470 | 466 | memory_set_bankptr(machine, "bank4", ram + 0x2000); |
| 471 | 467 | // Video RAM |
| 472 | | space->install_legacy_read_handler (0x4000, 0x7fff, FUNC(gzu_r)); |
| 473 | | space->install_legacy_write_handler(0x4000, 0x7fff, FUNC(gzu_w)); |
| 468 | space->install_read_handler (0x4000, 0x7fff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 469 | space->install_write_handler(0x4000, 0x7fff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 474 | 470 | // RAM |
| 475 | 471 | space->install_read_bank (0x8000, 0xfdff, "bank5"); |
| 476 | 472 | space->install_write_bank(0x8000, 0xfdff, "bank6"); |
| 477 | 473 | memory_set_bankptr(machine, "bank5", ram + 0x8000); |
| 478 | 474 | memory_set_bankptr(machine, "bank6", ram + 0x8000); |
| 479 | 475 | // Devices |
| 480 | | space->install_legacy_read_handler (0xfe00, 0xfeff, FUNC(devices_r)); |
| 481 | | space->install_legacy_write_handler(0xfe00, 0xfeff, FUNC(devices_w)); |
| 476 | space->install_read_handler (0xfe00, 0xfeff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 477 | space->install_write_handler(0xfe00, 0xfeff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 482 | 478 | // System reg |
| 483 | | space->install_legacy_read_handler (0xff00, 0xffff, FUNC(sysreg_r)); |
| 484 | | space->install_legacy_write_handler(0xff00, 0xffff, FUNC(sysreg_w)); |
| 479 | space->install_read_handler (0xff00, 0xffff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 480 | space->install_write_handler(0xff00, 0xffff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 485 | 481 | } |
| 486 | 482 | break; |
| 487 | 483 | case 0x0E : |
| r14963 | r14964 | |
| 492 | 488 | memory_set_bankptr(machine, "bank1", mem + 0x10000); |
| 493 | 489 | memory_set_bankptr(machine, "bank2", ram + 0x0000); |
| 494 | 490 | // Video RAM |
| 495 | | space->install_legacy_read_handler (0x4000, 0x7fff, FUNC(gzu_r)); |
| 496 | | space->install_legacy_write_handler(0x4000, 0x7fff, FUNC(gzu_w)); |
| 491 | space->install_read_handler (0x4000, 0x7fff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 492 | space->install_write_handler(0x4000, 0x7fff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 497 | 493 | // RAM |
| 498 | 494 | space->install_read_bank (0x8000, 0xfdff, "bank5"); |
| 499 | 495 | space->install_write_bank(0x8000, 0xfdff, "bank6"); |
| 500 | 496 | memory_set_bankptr(machine, "bank5", ram + 0x8000); |
| 501 | 497 | memory_set_bankptr(machine, "bank6", ram + 0x8000); |
| 502 | 498 | // Devices |
| 503 | | space->install_legacy_read_handler (0xfe00, 0xfeff, FUNC(devices_r)); |
| 504 | | space->install_legacy_write_handler(0xfe00, 0xfeff, FUNC(devices_w)); |
| 499 | space->install_read_handler (0xfe00, 0xfeff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 500 | space->install_write_handler(0xfe00, 0xfeff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 505 | 501 | // System reg |
| 506 | | space->install_legacy_read_handler (0xff00, 0xffff, FUNC(sysreg_r)); |
| 507 | | space->install_legacy_write_handler(0xff00, 0xffff, FUNC(sysreg_w)); |
| 502 | space->install_read_handler (0xff00, 0xffff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 503 | space->install_write_handler(0xff00, 0xffff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 508 | 504 | } |
| 509 | 505 | break; |
| 510 | 506 | case 0x0F : |
| r14963 | r14964 | |
| 515 | 511 | memory_set_bankptr(machine, "bank1", ram + 0x0000); |
| 516 | 512 | memory_set_bankptr(machine, "bank2", ram + 0x0000); |
| 517 | 513 | // Video RAM |
| 518 | | space->install_legacy_read_handler (0x4000, 0x7fff, FUNC(gzu_r)); |
| 519 | | space->install_legacy_write_handler(0x4000, 0x7fff, FUNC(gzu_w)); |
| 514 | space->install_read_handler (0x4000, 0x7fff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 515 | space->install_write_handler(0x4000, 0x7fff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 520 | 516 | // RAM |
| 521 | 517 | space->install_read_bank (0x8000, 0xfdff, "bank3"); |
| 522 | 518 | space->install_write_bank(0x8000, 0xfdff, "bank4"); |
| 523 | 519 | memory_set_bankptr(machine, "bank3", ram + 0x8000); |
| 524 | 520 | memory_set_bankptr(machine, "bank4", ram + 0x8000); |
| 525 | 521 | // Devices |
| 526 | | space->install_legacy_read_handler (0xfe00, 0xfeff, FUNC(devices_r)); |
| 527 | | space->install_legacy_write_handler(0xfe00, 0xfeff, FUNC(devices_w)); |
| 522 | space->install_read_handler (0xfe00, 0xfeff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 523 | space->install_write_handler(0xfe00, 0xfeff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 528 | 524 | // System reg |
| 529 | | space->install_legacy_read_handler (0xff00, 0xffff, FUNC(sysreg_r)); |
| 530 | | space->install_legacy_write_handler(0xff00, 0xffff, FUNC(sysreg_w)); |
| 525 | space->install_read_handler (0xff00, 0xffff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 526 | space->install_write_handler(0xff00, 0xffff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 531 | 527 | } |
| 532 | 528 | break; |
| 533 | 529 | case 0x10 : |
| r14963 | r14964 | |
| 543 | 539 | memory_set_bankptr(machine, "bank3", ram + 0x6000); |
| 544 | 540 | memory_set_bankptr(machine, "bank4", ram + 0x6000); |
| 545 | 541 | // Keyboard |
| 546 | | space->install_legacy_read_handler (0xf800, 0xf9ff, FUNC(keyboard_r)); |
| 542 | space->install_read_handler (0xf800, 0xf9ff, read8_delegate(FUNC(pk8020_state::keyboard_r),state)); |
| 547 | 543 | space->install_write_bank(0xf800, 0xf9ff, "bank5"); |
| 548 | 544 | memory_set_bankptr(machine, "bank5", ram + 0xf800); |
| 549 | 545 | // System reg |
| 550 | | space->install_legacy_read_handler (0xfa00, 0xfaff, FUNC(sysreg_r)); |
| 551 | | space->install_legacy_write_handler(0xfa00, 0xfaff, FUNC(sysreg_w)); |
| 546 | space->install_read_handler (0xfa00, 0xfaff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 547 | space->install_write_handler(0xfa00, 0xfaff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 552 | 548 | // Devices |
| 553 | | space->install_legacy_read_handler (0xfb00, 0xfbff, FUNC(devices_r)); |
| 554 | | space->install_legacy_write_handler(0xfb00, 0xfbff, FUNC(devices_w)); |
| 549 | space->install_read_handler (0xfb00, 0xfbff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 550 | space->install_write_handler(0xfb00, 0xfbff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 555 | 551 | // Text Video Memory |
| 556 | | space->install_legacy_read_handler (0xfc00, 0xffff, FUNC(text_r)); |
| 557 | | space->install_legacy_write_handler(0xfc00, 0xffff, FUNC(text_w)); |
| 552 | space->install_read_handler (0xfc00, 0xffff, read8_delegate(FUNC(pk8020_state::text_r),state)); |
| 553 | space->install_write_handler(0xfc00, 0xffff, write8_delegate(FUNC(pk8020_state::text_w),state)); |
| 558 | 554 | } |
| 559 | 555 | break; |
| 560 | 556 | case 0x11 : |
| r14963 | r14964 | |
| 570 | 566 | memory_set_bankptr(machine, "bank3", ram + 0x2000); |
| 571 | 567 | memory_set_bankptr(machine, "bank4", ram + 0x2000); |
| 572 | 568 | // Keyboard |
| 573 | | space->install_legacy_read_handler (0xf800, 0xf9ff, FUNC(keyboard_r)); |
| 569 | space->install_read_handler (0xf800, 0xf9ff, read8_delegate(FUNC(pk8020_state::keyboard_r),state)); |
| 574 | 570 | space->install_write_bank(0xf800, 0xf9ff, "bank5"); |
| 575 | 571 | memory_set_bankptr(machine, "bank5", ram + 0xf800); |
| 576 | 572 | // System reg |
| 577 | | space->install_legacy_read_handler (0xfa00, 0xfaff, FUNC(sysreg_r)); |
| 578 | | space->install_legacy_write_handler(0xfa00, 0xfaff, FUNC(sysreg_w)); |
| 573 | space->install_read_handler (0xfa00, 0xfaff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 574 | space->install_write_handler(0xfa00, 0xfaff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 579 | 575 | // Devices |
| 580 | | space->install_legacy_read_handler (0xfb00, 0xfbff, FUNC(devices_r)); |
| 581 | | space->install_legacy_write_handler(0xfb00, 0xfbff, FUNC(devices_w)); |
| 576 | space->install_read_handler (0xfb00, 0xfbff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 577 | space->install_write_handler(0xfb00, 0xfbff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 582 | 578 | // Text Video Memory |
| 583 | | space->install_legacy_read_handler (0xfc00, 0xffff, FUNC(text_r)); |
| 584 | | space->install_legacy_write_handler(0xfc00, 0xffff, FUNC(text_w)); |
| 579 | space->install_read_handler (0xfc00, 0xffff, read8_delegate(FUNC(pk8020_state::text_r),state)); |
| 580 | space->install_write_handler(0xfc00, 0xffff, write8_delegate(FUNC(pk8020_state::text_w),state)); |
| 585 | 581 | } |
| 586 | 582 | break; |
| 587 | 583 | case 0x12 : |
| r14963 | r14964 | |
| 597 | 593 | memory_set_bankptr(machine, "bank3", ram + 0x4000); |
| 598 | 594 | memory_set_bankptr(machine, "bank4", ram + 0x4000); |
| 599 | 595 | // Keyboard |
| 600 | | space->install_legacy_read_handler (0xf800, 0xf9ff, FUNC(keyboard_r)); |
| 596 | space->install_read_handler (0xf800, 0xf9ff, read8_delegate(FUNC(pk8020_state::keyboard_r),state)); |
| 601 | 597 | space->install_write_bank(0xf800, 0xf9ff, "bank5"); |
| 602 | 598 | memory_set_bankptr(machine, "bank5", ram + 0xf800); |
| 603 | 599 | // System reg |
| 604 | | space->install_legacy_read_handler (0xfa00, 0xfaff, FUNC(sysreg_r)); |
| 605 | | space->install_legacy_write_handler(0xfa00, 0xfaff, FUNC(sysreg_w)); |
| 600 | space->install_read_handler (0xfa00, 0xfaff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 601 | space->install_write_handler(0xfa00, 0xfaff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 606 | 602 | // Devices |
| 607 | | space->install_legacy_read_handler (0xfb00, 0xfbff, FUNC(devices_r)); |
| 608 | | space->install_legacy_write_handler(0xfb00, 0xfbff, FUNC(devices_w)); |
| 603 | space->install_read_handler (0xfb00, 0xfbff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 604 | space->install_write_handler(0xfb00, 0xfbff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 609 | 605 | // Text Video Memory |
| 610 | | space->install_legacy_read_handler (0xfc00, 0xffff, FUNC(text_r)); |
| 611 | | space->install_legacy_write_handler(0xfc00, 0xffff, FUNC(text_w)); |
| 606 | space->install_read_handler (0xfc00, 0xffff, read8_delegate(FUNC(pk8020_state::text_r),state)); |
| 607 | space->install_write_handler(0xfc00, 0xffff, write8_delegate(FUNC(pk8020_state::text_w),state)); |
| 612 | 608 | } |
| 613 | 609 | break; |
| 614 | 610 | case 0x13 : |
| r14963 | r14964 | |
| 619 | 615 | memory_set_bankptr(machine, "bank1", ram + 0x0000); |
| 620 | 616 | memory_set_bankptr(machine, "bank2", ram + 0x0000); |
| 621 | 617 | // Keyboard |
| 622 | | space->install_legacy_read_handler (0xf800, 0xf9ff, FUNC(keyboard_r)); |
| 618 | space->install_read_handler (0xf800, 0xf9ff, read8_delegate(FUNC(pk8020_state::keyboard_r),state)); |
| 623 | 619 | space->install_write_bank(0xf800, 0xf9ff, "bank3"); |
| 624 | 620 | memory_set_bankptr(machine, "bank3", ram + 0xf800); |
| 625 | 621 | // System reg |
| 626 | | space->install_legacy_read_handler (0xfa00, 0xfaff, FUNC(sysreg_r)); |
| 627 | | space->install_legacy_write_handler(0xfa00, 0xfaff, FUNC(sysreg_w)); |
| 622 | space->install_read_handler (0xfa00, 0xfaff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 623 | space->install_write_handler(0xfa00, 0xfaff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 628 | 624 | // Devices |
| 629 | | space->install_legacy_read_handler (0xfb00, 0xfbff, FUNC(devices_r)); |
| 630 | | space->install_legacy_write_handler(0xfb00, 0xfbff, FUNC(devices_w)); |
| 625 | space->install_read_handler (0xfb00, 0xfbff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 626 | space->install_write_handler(0xfb00, 0xfbff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 631 | 627 | // Text Video Memory |
| 632 | | space->install_legacy_read_handler (0xfc00, 0xffff, FUNC(text_r)); |
| 633 | | space->install_legacy_write_handler(0xfc00, 0xffff, FUNC(text_w)); |
| 628 | space->install_read_handler (0xfc00, 0xffff, read8_delegate(FUNC(pk8020_state::text_r),state)); |
| 629 | space->install_write_handler(0xfc00, 0xffff, write8_delegate(FUNC(pk8020_state::text_w),state)); |
| 634 | 630 | } |
| 635 | 631 | break; |
| 636 | 632 | case 0x14 : |
| r14963 | r14964 | |
| 646 | 642 | memory_set_bankptr(machine, "bank3", ram + 0x6000); |
| 647 | 643 | memory_set_bankptr(machine, "bank4", ram + 0x6000); |
| 648 | 644 | // Devices |
| 649 | | space->install_legacy_read_handler (0xfe00, 0xfeff, FUNC(devices_r)); |
| 650 | | space->install_legacy_write_handler(0xfe00, 0xfeff, FUNC(devices_w)); |
| 645 | space->install_read_handler (0xfe00, 0xfeff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 646 | space->install_write_handler(0xfe00, 0xfeff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 651 | 647 | // System reg |
| 652 | | space->install_legacy_read_handler (0xff00, 0xffff, FUNC(sysreg_r)); |
| 653 | | space->install_legacy_write_handler(0xff00, 0xffff, FUNC(sysreg_w)); |
| 648 | space->install_read_handler (0xff00, 0xffff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 649 | space->install_write_handler(0xff00, 0xffff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 654 | 650 | } |
| 655 | 651 | break; |
| 656 | 652 | case 0x15 : |
| r14963 | r14964 | |
| 666 | 662 | memory_set_bankptr(machine, "bank3", ram + 0x2000); |
| 667 | 663 | memory_set_bankptr(machine, "bank4", ram + 0x2000); |
| 668 | 664 | // Devices |
| 669 | | space->install_legacy_read_handler (0xfe00, 0xfeff, FUNC(devices_r)); |
| 670 | | space->install_legacy_write_handler(0xfe00, 0xfeff, FUNC(devices_w)); |
| 665 | space->install_read_handler (0xfe00, 0xfeff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 666 | space->install_write_handler(0xfe00, 0xfeff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 671 | 667 | // System reg |
| 672 | | space->install_legacy_read_handler (0xff00, 0xffff, FUNC(sysreg_r)); |
| 673 | | space->install_legacy_write_handler(0xff00, 0xffff, FUNC(sysreg_w)); |
| 668 | space->install_read_handler (0xff00, 0xffff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 669 | space->install_write_handler(0xff00, 0xffff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 674 | 670 | } |
| 675 | 671 | break; |
| 676 | 672 | case 0x16 : |
| r14963 | r14964 | |
| 686 | 682 | memory_set_bankptr(machine, "bank3", ram + 0x4000); |
| 687 | 683 | memory_set_bankptr(machine, "bank4", ram + 0x4000); |
| 688 | 684 | // Devices |
| 689 | | space->install_legacy_read_handler (0xfe00, 0xfeff, FUNC(devices_r)); |
| 690 | | space->install_legacy_write_handler(0xfe00, 0xfeff, FUNC(devices_w)); |
| 685 | space->install_read_handler (0xfe00, 0xfeff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 686 | space->install_write_handler(0xfe00, 0xfeff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 691 | 687 | // System reg |
| 692 | | space->install_legacy_read_handler (0xff00, 0xffff, FUNC(sysreg_r)); |
| 693 | | space->install_legacy_write_handler(0xff00, 0xffff, FUNC(sysreg_w)); |
| 688 | space->install_read_handler (0xff00, 0xffff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 689 | space->install_write_handler(0xff00, 0xffff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 694 | 690 | } |
| 695 | 691 | break; |
| 696 | 692 | case 0x17 : |
| r14963 | r14964 | |
| 701 | 697 | memory_set_bankptr(machine, "bank1", ram); |
| 702 | 698 | memory_set_bankptr(machine, "bank2", ram); |
| 703 | 699 | // Devices |
| 704 | | space->install_legacy_read_handler (0xfe00, 0xfeff, FUNC(devices_r)); |
| 705 | | space->install_legacy_write_handler(0xfe00, 0xfeff, FUNC(devices_w)); |
| 700 | space->install_read_handler (0xfe00, 0xfeff, read8_delegate(FUNC(pk8020_state::devices_r),state)); |
| 701 | space->install_write_handler(0xfe00, 0xfeff, write8_delegate(FUNC(pk8020_state::devices_w),state)); |
| 706 | 702 | // System reg |
| 707 | | space->install_legacy_read_handler (0xff00, 0xffff, FUNC(sysreg_r)); |
| 708 | | space->install_legacy_write_handler(0xff00, 0xffff, FUNC(sysreg_w)); |
| 703 | space->install_read_handler (0xff00, 0xffff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 704 | space->install_write_handler(0xff00, 0xffff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 709 | 705 | } |
| 710 | 706 | break; |
| 711 | 707 | case 0x18 : |
| r14963 | r14964 | |
| 721 | 717 | memory_set_bankptr(machine, "bank3", ram + 0x6000); |
| 722 | 718 | memory_set_bankptr(machine, "bank4", ram + 0x6000); |
| 723 | 719 | // System reg |
| 724 | | space->install_legacy_read_handler (0xbf00, 0xbfff, FUNC(sysreg_r)); |
| 725 | | space->install_legacy_write_handler(0xbf00, 0xbfff, FUNC(sysreg_w)); |
| 720 | space->install_read_handler (0xbf00, 0xbfff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 721 | space->install_write_handler(0xbf00, 0xbfff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 726 | 722 | // Video RAM |
| 727 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 728 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 723 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 724 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 729 | 725 | } |
| 730 | 726 | break; |
| 731 | 727 | case 0x19 : |
| r14963 | r14964 | |
| 741 | 737 | memory_set_bankptr(machine, "bank3", ram + 0x2000); |
| 742 | 738 | memory_set_bankptr(machine, "bank4", ram + 0x2000); |
| 743 | 739 | // System reg |
| 744 | | space->install_legacy_read_handler (0xbf00, 0xbfff, FUNC(sysreg_r)); |
| 745 | | space->install_legacy_write_handler(0xbf00, 0xbfff, FUNC(sysreg_w)); |
| 740 | space->install_read_handler (0xbf00, 0xbfff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 741 | space->install_write_handler(0xbf00, 0xbfff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 746 | 742 | // Video RAM |
| 747 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 748 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 743 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 744 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 749 | 745 | } |
| 750 | 746 | break; |
| 751 | 747 | case 0x1A : |
| r14963 | r14964 | |
| 761 | 757 | memory_set_bankptr(machine, "bank3", ram + 0x4000); |
| 762 | 758 | memory_set_bankptr(machine, "bank4", ram + 0x4000); |
| 763 | 759 | // System reg |
| 764 | | space->install_legacy_read_handler (0xbf00, 0xbfff, FUNC(sysreg_r)); |
| 765 | | space->install_legacy_write_handler(0xbf00, 0xbfff, FUNC(sysreg_w)); |
| 760 | space->install_read_handler (0xbf00, 0xbfff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 761 | space->install_write_handler(0xbf00, 0xbfff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 766 | 762 | // Video RAM |
| 767 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 768 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 763 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 764 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 769 | 765 | } |
| 770 | 766 | break; |
| 771 | 767 | case 0x1B : |
| r14963 | r14964 | |
| 776 | 772 | memory_set_bankptr(machine, "bank1", ram); |
| 777 | 773 | memory_set_bankptr(machine, "bank2", ram); |
| 778 | 774 | // System reg |
| 779 | | space->install_legacy_read_handler (0xbf00, 0xbfff, FUNC(sysreg_r)); |
| 780 | | space->install_legacy_write_handler(0xbf00, 0xbfff, FUNC(sysreg_w)); |
| 775 | space->install_read_handler (0xbf00, 0xbfff, read8_delegate(FUNC(pk8020_state::sysreg_r),state)); |
| 776 | space->install_write_handler(0xbf00, 0xbfff, write8_delegate(FUNC(pk8020_state::sysreg_w),state)); |
| 781 | 777 | // Video RAM |
| 782 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 783 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 778 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 779 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 784 | 780 | } |
| 785 | 781 | break; |
| 786 | 782 | case 0x1C : |
| r14963 | r14964 | |
| 796 | 792 | memory_set_bankptr(machine, "bank3", ram + 0x6000); |
| 797 | 793 | memory_set_bankptr(machine, "bank4", ram + 0x6000); |
| 798 | 794 | // Video RAM |
| 799 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 800 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 795 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 796 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 801 | 797 | } |
| 802 | 798 | break; |
| 803 | 799 | case 0x1D : |
| r14963 | r14964 | |
| 813 | 809 | memory_set_bankptr(machine, "bank3", ram + 0x2000); |
| 814 | 810 | memory_set_bankptr(machine, "bank4", ram + 0x2000); |
| 815 | 811 | // Video RAM |
| 816 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 817 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 812 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 813 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 818 | 814 | } |
| 819 | 815 | break; |
| 820 | 816 | case 0x1E : |
| r14963 | r14964 | |
| 830 | 826 | memory_set_bankptr(machine, "bank3", ram + 0x4000); |
| 831 | 827 | memory_set_bankptr(machine, "bank4", ram + 0x4000); |
| 832 | 828 | // Video RAM |
| 833 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 834 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 829 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 830 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 835 | 831 | } |
| 836 | 832 | break; |
| 837 | 833 | case 0x1F : |
| r14963 | r14964 | |
| 842 | 838 | memory_set_bankptr(machine, "bank1", ram); |
| 843 | 839 | memory_set_bankptr(machine, "bank2", ram); |
| 844 | 840 | // Video RAM |
| 845 | | space->install_legacy_read_handler (0xc000, 0xffff, FUNC(gzu_r)); |
| 846 | | space->install_legacy_write_handler(0xc000, 0xffff, FUNC(gzu_w)); |
| 841 | space->install_read_handler (0xc000, 0xffff, read8_delegate(FUNC(pk8020_state::gzu_r),state)); |
| 842 | space->install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(pk8020_state::gzu_w),state)); |
| 847 | 843 | } |
| 848 | 844 | break; |
| 849 | 845 | |
src/mess/video/fm7.c
| r14963 | r14964 | |
| 20 | 20 | * bit 6: Sub-CPU cancel IRQ |
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | | READ8_HANDLER( fm7_subintf_r ) |
| 23 | READ8_MEMBER(fm7_state::fm7_subintf_r) |
| 24 | 24 | { |
| 25 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 26 | 25 | UINT8 ret = 0x00; |
| 27 | 26 | |
| 28 | | if(state->m_video.sub_busy != 0 || state->m_video.sub_halt != 0) |
| 27 | if(m_video.sub_busy != 0 || m_video.sub_halt != 0) |
| 29 | 28 | ret |= 0x80; |
| 30 | 29 | |
| 31 | 30 | ret |= 0x7e; |
| r14963 | r14964 | |
| 34 | 33 | return ret; |
| 35 | 34 | } |
| 36 | 35 | |
| 37 | | WRITE8_HANDLER( fm7_subintf_w ) |
| 36 | WRITE8_MEMBER(fm7_state::fm7_subintf_w) |
| 38 | 37 | { |
| 39 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 40 | | state->m_video.sub_halt = data & 0x80; |
| 38 | m_video.sub_halt = data & 0x80; |
| 41 | 39 | if(data & 0x80) |
| 42 | | state->m_video.sub_busy = data & 0x80; |
| 40 | m_video.sub_busy = data & 0x80; |
| 43 | 41 | |
| 44 | | cputag_set_input_line(space->machine(),"sub",INPUT_LINE_HALT,(data & 0x80) ? ASSERT_LINE : CLEAR_LINE); |
| 42 | cputag_set_input_line(machine(),"sub",INPUT_LINE_HALT,(data & 0x80) ? ASSERT_LINE : CLEAR_LINE); |
| 45 | 43 | if(data & 0x40) |
| 46 | | cputag_set_input_line(space->machine(),"sub",M6809_IRQ_LINE,ASSERT_LINE); |
| 44 | cputag_set_input_line(machine(),"sub",M6809_IRQ_LINE,ASSERT_LINE); |
| 47 | 45 | //popmessage("Sub CPU Interface write: %02x\n",data); |
| 48 | 46 | } |
| 49 | 47 | |
| 50 | | READ8_HANDLER( fm7_sub_busyflag_r ) |
| 48 | READ8_MEMBER(fm7_state::fm7_sub_busyflag_r) |
| 51 | 49 | { |
| 52 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 53 | | if(state->m_video.sub_halt == 0) |
| 54 | | state->m_video.sub_busy = 0x00; |
| 50 | if(m_video.sub_halt == 0) |
| 51 | m_video.sub_busy = 0x00; |
| 55 | 52 | return 0x00; |
| 56 | 53 | } |
| 57 | 54 | |
| 58 | | WRITE8_HANDLER( fm7_sub_busyflag_w ) |
| 55 | WRITE8_MEMBER(fm7_state::fm7_sub_busyflag_w) |
| 59 | 56 | { |
| 60 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 61 | | state->m_video.sub_busy = 0x80; |
| 57 | m_video.sub_busy = 0x80; |
| 62 | 58 | } |
| 63 | 59 | |
| 64 | 60 | /* |
| 65 | 61 | * Sub-CPU port 0xd402 |
| 66 | 62 | * Read-only: Acknowledge Cancel IRQ |
| 67 | 63 | */ |
| 68 | | READ8_HANDLER( fm7_cancel_ack ) |
| 64 | READ8_MEMBER(fm7_state::fm7_cancel_ack) |
| 69 | 65 | { |
| 70 | | cputag_set_input_line(space->machine(),"sub",M6809_IRQ_LINE,CLEAR_LINE); |
| 66 | cputag_set_input_line(machine(),"sub",M6809_IRQ_LINE,CLEAR_LINE); |
| 71 | 67 | return 0x00; |
| 72 | 68 | } |
| 73 | 69 | |
| 74 | 70 | /* |
| 75 | 71 | * Reading from 0xd404 (sub-CPU) causes an "Attention" FIRQ on the main CPU |
| 76 | 72 | */ |
| 77 | | READ8_HANDLER( fm7_attn_irq_r ) |
| 73 | READ8_MEMBER(fm7_state::fm7_attn_irq_r) |
| 78 | 74 | { |
| 79 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 80 | | state->m_video.attn_irq = 1; |
| 81 | | cputag_set_input_line(space->machine(),"maincpu",M6809_FIRQ_LINE,ASSERT_LINE); |
| 75 | m_video.attn_irq = 1; |
| 76 | cputag_set_input_line(machine(),"maincpu",M6809_FIRQ_LINE,ASSERT_LINE); |
| 82 | 77 | return 0xff; |
| 83 | 78 | } |
| 84 | 79 | |
| r14963 | r14964 | |
| 88 | 83 | * On read, enables VRAM access |
| 89 | 84 | * On write, disables VRAM access |
| 90 | 85 | */ |
| 91 | | READ8_HANDLER( fm7_vram_access_r ) |
| 86 | READ8_MEMBER(fm7_state::fm7_vram_access_r) |
| 92 | 87 | { |
| 93 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 94 | | state->m_video.vram_access = 1; |
| 88 | m_video.vram_access = 1; |
| 95 | 89 | return 0xff; |
| 96 | 90 | } |
| 97 | 91 | |
| 98 | | WRITE8_HANDLER( fm7_vram_access_w ) |
| 92 | WRITE8_MEMBER(fm7_state::fm7_vram_access_w) |
| 99 | 93 | { |
| 100 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 101 | | state->m_video.vram_access = 0; |
| 94 | m_video.vram_access = 0; |
| 102 | 95 | } |
| 103 | 96 | |
| 104 | 97 | static TIMER_CALLBACK( fm77av_alu_task_end ) |
| r14963 | r14964 | |
| 638 | 631 | machine.scheduler().timer_set(attotime::from_usec(byte_count/16), FUNC(fm77av_alu_task_end)); |
| 639 | 632 | } |
| 640 | 633 | |
| 641 | | READ8_HANDLER( fm7_vram_r ) |
| 634 | READ8_MEMBER(fm7_state::fm7_vram_r) |
| 642 | 635 | { |
| 643 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 644 | 636 | int offs; |
| 645 | 637 | UINT16 page = 0x0000; |
| 646 | 638 | |
| 647 | | if(state->m_video.active_video_page != 0) |
| 639 | if(m_video.active_video_page != 0) |
| 648 | 640 | page = 0xc000; |
| 649 | 641 | |
| 650 | | if(offset < 0x4000 && (state->m_video.multi_page & 0x01)) |
| 642 | if(offset < 0x4000 && (m_video.multi_page & 0x01)) |
| 651 | 643 | return 0xff; |
| 652 | | if((offset < 0x8000 && offset >=0x4000) && (state->m_video.multi_page & 0x02)) |
| 644 | if((offset < 0x8000 && offset >=0x4000) && (m_video.multi_page & 0x02)) |
| 653 | 645 | return 0xff; |
| 654 | | if((offset < 0xc000 && offset >=0x8000) && (state->m_video.multi_page & 0x04)) |
| 646 | if((offset < 0xc000 && offset >=0x8000) && (m_video.multi_page & 0x04)) |
| 655 | 647 | return 0xff; |
| 656 | 648 | |
| 657 | | if(state->m_alu.command & 0x80) // ALU active, writes to VRAM even when reading it (go figure) |
| 649 | if(m_alu.command & 0x80) // ALU active, writes to VRAM even when reading it (go figure) |
| 658 | 650 | { |
| 651 | fm7_state *state = machine().driver_data<fm7_state>(); |
| 659 | 652 | fm7_alu_function(state, offset+page); |
| 660 | 653 | } |
| 661 | 654 | |
| 662 | | if(state->m_video.modestatus & 0x40) |
| 655 | if(m_video.modestatus & 0x40) |
| 663 | 656 | { |
| 664 | | if(state->m_video.active_video_page != 0) |
| 665 | | offs = (offset & 0xe000) | ((offset + state->m_video.vram_offset2) & 0x1fff); |
| 657 | if(m_video.active_video_page != 0) |
| 658 | offs = (offset & 0xe000) | ((offset + m_video.vram_offset2) & 0x1fff); |
| 666 | 659 | else |
| 667 | | offs = (offset & 0xe000) | ((offset + state->m_video.vram_offset) & 0x1fff); |
| 660 | offs = (offset & 0xe000) | ((offset + m_video.vram_offset) & 0x1fff); |
| 668 | 661 | } |
| 669 | 662 | else |
| 670 | 663 | { |
| 671 | | if(state->m_video.active_video_page != 0) |
| 672 | | offs = (offset & 0xc000) | ((offset + state->m_video.vram_offset2) & 0x3fff); |
| 664 | if(m_video.active_video_page != 0) |
| 665 | offs = (offset & 0xc000) | ((offset + m_video.vram_offset2) & 0x3fff); |
| 673 | 666 | else |
| 674 | | offs = (offset & 0xc000) | ((offset + state->m_video.vram_offset) & 0x3fff); |
| 667 | offs = (offset & 0xc000) | ((offset + m_video.vram_offset) & 0x3fff); |
| 675 | 668 | } |
| 676 | | return state->m_video_ram[offs + page]; |
| 669 | return m_video_ram[offs + page]; |
| 677 | 670 | } |
| 678 | 671 | |
| 679 | | WRITE8_HANDLER( fm7_vram_w ) |
| 672 | WRITE8_MEMBER(fm7_state::fm7_vram_w) |
| 680 | 673 | { |
| 681 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 682 | 674 | int offs; |
| 683 | 675 | UINT16 page = 0x0000; |
| 684 | 676 | |
| 685 | | if(state->m_video.active_video_page != 0) |
| 677 | if(m_video.active_video_page != 0) |
| 686 | 678 | page = 0xc000; |
| 687 | 679 | |
| 688 | | if(offset < 0x4000 && (state->m_video.multi_page & 0x01)) |
| 680 | if(offset < 0x4000 && (m_video.multi_page & 0x01)) |
| 689 | 681 | return; |
| 690 | | if((offset < 0x8000 && offset >=0x4000) && (state->m_video.multi_page & 0x02)) |
| 682 | if((offset < 0x8000 && offset >=0x4000) && (m_video.multi_page & 0x02)) |
| 691 | 683 | return; |
| 692 | | if((offset < 0xc000 && offset >=0x8000) && (state->m_video.multi_page & 0x04)) |
| 684 | if((offset < 0xc000 && offset >=0x8000) && (m_video.multi_page & 0x04)) |
| 693 | 685 | return; |
| 694 | 686 | |
| 695 | | if(state->m_alu.command & 0x80) // ALU active |
| 687 | if(m_alu.command & 0x80) // ALU active |
| 696 | 688 | { |
| 689 | fm7_state *state = machine().driver_data<fm7_state>(); |
| 697 | 690 | fm7_alu_function(state, offset+page); |
| 698 | 691 | return; |
| 699 | 692 | } |
| 700 | 693 | |
| 701 | | if(state->m_video.modestatus & 0x40) |
| 694 | if(m_video.modestatus & 0x40) |
| 702 | 695 | { |
| 703 | | if(state->m_video.active_video_page != 0) |
| 704 | | offs = (offset & 0xe000) | ((offset + state->m_video.vram_offset2) & 0x1fff); |
| 696 | if(m_video.active_video_page != 0) |
| 697 | offs = (offset & 0xe000) | ((offset + m_video.vram_offset2) & 0x1fff); |
| 705 | 698 | else |
| 706 | | offs = (offset & 0xe000) | ((offset + state->m_video.vram_offset) & 0x1fff); |
| 699 | offs = (offset & 0xe000) | ((offset + m_video.vram_offset) & 0x1fff); |
| 707 | 700 | } |
| 708 | 701 | else |
| 709 | 702 | { |
| 710 | | if(state->m_video.active_video_page != 0) |
| 711 | | offs = (offset & 0xc000) | ((offset + state->m_video.vram_offset2) & 0x3fff); |
| 703 | if(m_video.active_video_page != 0) |
| 704 | offs = (offset & 0xc000) | ((offset + m_video.vram_offset2) & 0x3fff); |
| 712 | 705 | else |
| 713 | | offs = (offset & 0xc000) | ((offset + state->m_video.vram_offset) & 0x3fff); |
| 706 | offs = (offset & 0xc000) | ((offset + m_video.vram_offset) & 0x3fff); |
| 714 | 707 | } |
| 715 | | // if(state->m_video.vram_access != 0) |
| 716 | | state->m_video_ram[offs+page] = data; |
| 708 | // if(m_video.vram_access != 0) |
| 709 | m_video_ram[offs+page] = data; |
| 717 | 710 | } |
| 718 | 711 | |
| 719 | 712 | // not pretty, but it should work. |
| 720 | | static WRITE8_HANDLER( fm7_vram_banked_w ) |
| 713 | WRITE8_MEMBER(fm7_state::fm7_vram_banked_w) |
| 721 | 714 | { |
| 722 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 723 | 715 | int offs; |
| 724 | 716 | UINT16 page = 0x0000; |
| 725 | 717 | |
| 726 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 718 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 727 | 719 | return; |
| 728 | 720 | |
| 729 | | if(state->m_video.active_video_page != 0) |
| 721 | if(m_video.active_video_page != 0) |
| 730 | 722 | page = 0xc000; |
| 731 | 723 | |
| 732 | | if(offset < 0x4000 && (state->m_video.multi_page & 0x01)) |
| 724 | if(offset < 0x4000 && (m_video.multi_page & 0x01)) |
| 733 | 725 | return; |
| 734 | | if((offset < 0x8000 && offset >=0x4000) && (state->m_video.multi_page & 0x02)) |
| 726 | if((offset < 0x8000 && offset >=0x4000) && (m_video.multi_page & 0x02)) |
| 735 | 727 | return; |
| 736 | | if((offset < 0xc000 && offset >=0x8000) && (state->m_video.multi_page & 0x04)) |
| 728 | if((offset < 0xc000 && offset >=0x8000) && (m_video.multi_page & 0x04)) |
| 737 | 729 | return; |
| 738 | 730 | |
| 739 | | if(state->m_alu.command & 0x80) // ALU active |
| 731 | if(m_alu.command & 0x80) // ALU active |
| 740 | 732 | { |
| 733 | fm7_state *state = machine().driver_data<fm7_state>(); |
| 741 | 734 | fm7_alu_function(state, offset+page); |
| 742 | 735 | return; |
| 743 | 736 | } |
| 744 | 737 | |
| 745 | | if(state->m_video.modestatus & 0x40) |
| 738 | if(m_video.modestatus & 0x40) |
| 746 | 739 | { |
| 747 | | if(state->m_video.active_video_page != 0) |
| 748 | | offs = (offset & 0xe000) | ((offset + state->m_video.vram_offset2) & 0x1fff); |
| 740 | if(m_video.active_video_page != 0) |
| 741 | offs = (offset & 0xe000) | ((offset + m_video.vram_offset2) & 0x1fff); |
| 749 | 742 | else |
| 750 | | offs = (offset & 0xe000) | ((offset + state->m_video.vram_offset) & 0x1fff); |
| 743 | offs = (offset & 0xe000) | ((offset + m_video.vram_offset) & 0x1fff); |
| 751 | 744 | } |
| 752 | 745 | else |
| 753 | 746 | { |
| 754 | | if(state->m_video.active_video_page != 0) |
| 755 | | offs = (offset & 0xc000) | ((offset + state->m_video.vram_offset2) & 0x3fff); |
| 747 | if(m_video.active_video_page != 0) |
| 748 | offs = (offset & 0xc000) | ((offset + m_video.vram_offset2) & 0x3fff); |
| 756 | 749 | else |
| 757 | | offs = (offset & 0xc000) | ((offset + state->m_video.vram_offset) & 0x3fff); |
| 750 | offs = (offset & 0xc000) | ((offset + m_video.vram_offset) & 0x3fff); |
| 758 | 751 | } |
| 759 | | state->m_video_ram[offs+page] = data; |
| 752 | m_video_ram[offs+page] = data; |
| 760 | 753 | } |
| 761 | 754 | |
| 762 | | READ8_HANDLER( fm7_vram0_r ) |
| 755 | READ8_MEMBER(fm7_state::fm7_vram0_r) |
| 763 | 756 | { |
| 764 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 765 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 757 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 766 | 758 | return 0xff; |
| 767 | 759 | return fm7_vram_r(space,offset); |
| 768 | 760 | } |
| 769 | 761 | |
| 770 | | READ8_HANDLER( fm7_vram1_r ) |
| 762 | READ8_MEMBER(fm7_state::fm7_vram1_r) |
| 771 | 763 | { |
| 772 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 773 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 764 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 774 | 765 | return 0xff; |
| 775 | 766 | return fm7_vram_r(space,offset+0x1000); |
| 776 | 767 | } |
| 777 | 768 | |
| 778 | | READ8_HANDLER( fm7_vram2_r ) |
| 769 | READ8_MEMBER(fm7_state::fm7_vram2_r) |
| 779 | 770 | { |
| 780 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 781 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 771 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 782 | 772 | return 0xff; |
| 783 | 773 | return fm7_vram_r(space,offset+0x2000); |
| 784 | 774 | } |
| 785 | 775 | |
| 786 | | READ8_HANDLER( fm7_vram3_r ) |
| 776 | READ8_MEMBER(fm7_state::fm7_vram3_r) |
| 787 | 777 | { |
| 788 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 789 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 778 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 790 | 779 | return 0xff; |
| 791 | 780 | return fm7_vram_r(space,offset+0x3000); |
| 792 | 781 | } |
| 793 | 782 | |
| 794 | | READ8_HANDLER( fm7_vram4_r ) |
| 783 | READ8_MEMBER(fm7_state::fm7_vram4_r) |
| 795 | 784 | { |
| 796 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 797 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 785 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 798 | 786 | return 0xff; |
| 799 | 787 | return fm7_vram_r(space,offset+0x4000); |
| 800 | 788 | } |
| 801 | 789 | |
| 802 | | READ8_HANDLER( fm7_vram5_r ) |
| 790 | READ8_MEMBER(fm7_state::fm7_vram5_r) |
| 803 | 791 | { |
| 804 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 805 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 792 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 806 | 793 | return 0xff; |
| 807 | 794 | return fm7_vram_r(space,offset+0x5000); |
| 808 | 795 | } |
| 809 | 796 | |
| 810 | | READ8_HANDLER( fm7_vram6_r ) |
| 797 | READ8_MEMBER(fm7_state::fm7_vram6_r) |
| 811 | 798 | { |
| 812 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 813 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 799 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 814 | 800 | return 0xff; |
| 815 | 801 | return fm7_vram_r(space,offset+0x6000); |
| 816 | 802 | } |
| 817 | 803 | |
| 818 | | READ8_HANDLER( fm7_vram7_r ) |
| 804 | READ8_MEMBER(fm7_state::fm7_vram7_r) |
| 819 | 805 | { |
| 820 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 821 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 806 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 822 | 807 | return 0xff; |
| 823 | 808 | return fm7_vram_r(space,offset+0x7000); |
| 824 | 809 | } |
| 825 | 810 | |
| 826 | | READ8_HANDLER( fm7_vram8_r ) |
| 811 | READ8_MEMBER(fm7_state::fm7_vram8_r) |
| 827 | 812 | { |
| 828 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 829 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 813 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 830 | 814 | return 0xff; |
| 831 | 815 | return fm7_vram_r(space,offset+0x8000); |
| 832 | 816 | } |
| 833 | 817 | |
| 834 | | READ8_HANDLER( fm7_vram9_r ) |
| 818 | READ8_MEMBER(fm7_state::fm7_vram9_r) |
| 835 | 819 | { |
| 836 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 837 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 820 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 838 | 821 | return 0xff; |
| 839 | 822 | return fm7_vram_r(space,offset+0x9000); |
| 840 | 823 | } |
| 841 | 824 | |
| 842 | | READ8_HANDLER( fm7_vramA_r ) |
| 825 | READ8_MEMBER(fm7_state::fm7_vramA_r) |
| 843 | 826 | { |
| 844 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 845 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 827 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 846 | 828 | return 0xff; |
| 847 | 829 | return fm7_vram_r(space,offset+0xa000); |
| 848 | 830 | } |
| 849 | 831 | |
| 850 | | READ8_HANDLER( fm7_vramB_r ) |
| 832 | READ8_MEMBER(fm7_state::fm7_vramB_r) |
| 851 | 833 | { |
| 852 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 853 | | if(!state->m_video.sub_halt) // no access if sub CPU is not halted. |
| 834 | if(!m_video.sub_halt) // no access if sub CPU is not halted. |
| 854 | 835 | return 0xff; |
| 855 | 836 | return fm7_vram_r(space,offset+0xb000); |
| 856 | 837 | } |
| 857 | 838 | |
| 858 | | WRITE8_HANDLER( fm7_vram0_w ) |
| 839 | WRITE8_MEMBER(fm7_state::fm7_vram0_w) |
| 859 | 840 | { |
| 860 | 841 | fm7_vram_banked_w(space,offset,data); |
| 861 | 842 | } |
| 862 | 843 | |
| 863 | | WRITE8_HANDLER( fm7_vram1_w ) |
| 844 | WRITE8_MEMBER(fm7_state::fm7_vram1_w) |
| 864 | 845 | { |
| 865 | 846 | fm7_vram_banked_w(space,offset+0x1000,data); |
| 866 | 847 | } |
| 867 | 848 | |
| 868 | | WRITE8_HANDLER( fm7_vram2_w ) |
| 849 | WRITE8_MEMBER(fm7_state::fm7_vram2_w) |
| 869 | 850 | { |
| 870 | 851 | fm7_vram_banked_w(space,offset+0x2000,data); |
| 871 | 852 | } |
| 872 | 853 | |
| 873 | | WRITE8_HANDLER( fm7_vram3_w ) |
| 854 | WRITE8_MEMBER(fm7_state::fm7_vram3_w) |
| 874 | 855 | { |
| 875 | 856 | fm7_vram_banked_w(space,offset+0x3000,data); |
| 876 | 857 | } |
| 877 | 858 | |
| 878 | | WRITE8_HANDLER( fm7_vram4_w ) |
| 859 | WRITE8_MEMBER(fm7_state::fm7_vram4_w) |
| 879 | 860 | { |
| 880 | 861 | fm7_vram_banked_w(space,offset+0x4000,data); |
| 881 | 862 | } |
| 882 | 863 | |
| 883 | | WRITE8_HANDLER( fm7_vram5_w ) |
| 864 | WRITE8_MEMBER(fm7_state::fm7_vram5_w) |
| 884 | 865 | { |
| 885 | 866 | fm7_vram_banked_w(space,offset+0x5000,data); |
| 886 | 867 | } |
| 887 | 868 | |
| 888 | | WRITE8_HANDLER( fm7_vram6_w ) |
| 869 | WRITE8_MEMBER(fm7_state::fm7_vram6_w) |
| 889 | 870 | { |
| 890 | 871 | fm7_vram_banked_w(space,offset+0x6000,data); |
| 891 | 872 | } |
| 892 | 873 | |
| 893 | | WRITE8_HANDLER( fm7_vram7_w ) |
| 874 | WRITE8_MEMBER(fm7_state::fm7_vram7_w) |
| 894 | 875 | { |
| 895 | 876 | fm7_vram_banked_w(space,offset+0x7000,data); |
| 896 | 877 | } |
| 897 | 878 | |
| 898 | | WRITE8_HANDLER( fm7_vram8_w ) |
| 879 | WRITE8_MEMBER(fm7_state::fm7_vram8_w) |
| 899 | 880 | { |
| 900 | 881 | fm7_vram_banked_w(space,offset+0x8000,data); |
| 901 | 882 | } |
| 902 | 883 | |
| 903 | | WRITE8_HANDLER( fm7_vram9_w ) |
| 884 | WRITE8_MEMBER(fm7_state::fm7_vram9_w) |
| 904 | 885 | { |
| 905 | 886 | fm7_vram_banked_w(space,offset+0x9000,data); |
| 906 | 887 | } |
| 907 | 888 | |
| 908 | | WRITE8_HANDLER( fm7_vramA_w ) |
| 889 | WRITE8_MEMBER(fm7_state::fm7_vramA_w) |
| 909 | 890 | { |
| 910 | 891 | fm7_vram_banked_w(space,offset+0xa000,data); |
| 911 | 892 | } |
| 912 | 893 | |
| 913 | | WRITE8_HANDLER( fm7_vramB_w ) |
| 894 | WRITE8_MEMBER(fm7_state::fm7_vramB_w) |
| 914 | 895 | { |
| 915 | 896 | fm7_vram_banked_w(space,offset+0xb000,data); |
| 916 | 897 | } |
| r14963 | r14964 | |
| 921 | 902 | * On read, enables the CRT display |
| 922 | 903 | * On write, disables the CRT display |
| 923 | 904 | */ |
| 924 | | READ8_HANDLER( fm7_crt_r ) |
| 905 | READ8_MEMBER(fm7_state::fm7_crt_r) |
| 925 | 906 | { |
| 926 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 927 | | state->m_video.crt_enable = 1; |
| 907 | m_video.crt_enable = 1; |
| 928 | 908 | return 0xff; |
| 929 | 909 | } |
| 930 | 910 | |
| 931 | | WRITE8_HANDLER( fm7_crt_w ) |
| 911 | WRITE8_MEMBER(fm7_state::fm7_crt_w) |
| 932 | 912 | { |
| 933 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 934 | | state->m_video.crt_enable = 0; |
| 913 | m_video.crt_enable = 0; |
| 935 | 914 | } |
| 936 | 915 | |
| 937 | 916 | /* |
| r14963 | r14964 | |
| 940 | 919 | * 0xd40e: bits 0-6 - offset in bytes (high byte) (bit 6 is used for 400 line video only) |
| 941 | 920 | * 0xd40f: bits 0-7 - offset in bytes (low byte) |
| 942 | 921 | */ |
| 943 | | WRITE8_HANDLER( fm7_vram_offset_w ) |
| 922 | WRITE8_MEMBER(fm7_state::fm7_vram_offset_w) |
| 944 | 923 | { |
| 945 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 946 | 924 | UINT16 new_offset = 0; |
| 947 | 925 | |
| 948 | 926 | switch(offset) |
| 949 | 927 | { |
| 950 | 928 | case 0: |
| 951 | | if(state->m_video.active_video_page != 0) |
| 952 | | new_offset = ((data & 0x3f) << 8) | (state->m_video.vram_offset2 & 0x00ff); |
| 929 | if(m_video.active_video_page != 0) |
| 930 | new_offset = ((data & 0x3f) << 8) | (m_video.vram_offset2 & 0x00ff); |
| 953 | 931 | else |
| 954 | | new_offset = ((data & 0x3f) << 8) | (state->m_video.vram_offset & 0x00ff); |
| 932 | new_offset = ((data & 0x3f) << 8) | (m_video.vram_offset & 0x00ff); |
| 955 | 933 | break; |
| 956 | 934 | case 1: // low 5 bits are used on FM-77AV and later only |
| 957 | | if(state->m_type == SYS_FM7) |
| 958 | | new_offset = (state->m_video.vram_offset & 0xff00) | (data & 0xe0); |
| 935 | if(m_type == SYS_FM7) |
| 936 | new_offset = (m_video.vram_offset & 0xff00) | (data & 0xe0); |
| 959 | 937 | else |
| 960 | 938 | { |
| 961 | | if(state->m_video.active_video_page != 0) |
| 939 | if(m_video.active_video_page != 0) |
| 962 | 940 | { |
| 963 | | if(state->m_video.fine_offset != 0) |
| 964 | | new_offset = (state->m_video.vram_offset2 & 0xff00) | (data & 0xff); |
| 941 | if(m_video.fine_offset != 0) |
| 942 | new_offset = (m_video.vram_offset2 & 0xff00) | (data & 0xff); |
| 965 | 943 | else |
| 966 | | new_offset = (state->m_video.vram_offset2 & 0xff00) | (data & 0xe0); |
| 944 | new_offset = (m_video.vram_offset2 & 0xff00) | (data & 0xe0); |
| 967 | 945 | } |
| 968 | 946 | else |
| 969 | 947 | { |
| 970 | | if(state->m_video.fine_offset != 0) |
| 971 | | new_offset = (state->m_video.vram_offset & 0xff00) | (data & 0xff); |
| 948 | if(m_video.fine_offset != 0) |
| 949 | new_offset = (m_video.vram_offset & 0xff00) | (data & 0xff); |
| 972 | 950 | else |
| 973 | | new_offset = (state->m_video.vram_offset & 0xff00) | (data & 0xe0); |
| 951 | new_offset = (m_video.vram_offset & 0xff00) | (data & 0xe0); |
| 974 | 952 | } |
| 975 | 953 | } |
| 976 | 954 | break; |
| 977 | 955 | } |
| 978 | | if(state->m_video.active_video_page != 0) |
| 979 | | state->m_video.vram_offset2 = new_offset; |
| 956 | if(m_video.active_video_page != 0) |
| 957 | m_video.vram_offset2 = new_offset; |
| 980 | 958 | else |
| 981 | | state->m_video.vram_offset = new_offset; |
| 959 | m_video.vram_offset = new_offset; |
| 982 | 960 | } |
| 983 | 961 | |
| 984 | 962 | /* |
| r14963 | r14964 | |
| 989 | 967 | * bits 6-4: VRAM planes to display (G,R,B) (1=disable) |
| 990 | 968 | * bits 2-0: VRAM CPU access (G,R,B) (1=disable) |
| 991 | 969 | */ |
| 992 | | WRITE8_HANDLER( fm7_multipage_w ) |
| 970 | WRITE8_MEMBER(fm7_state::fm7_multipage_w) |
| 993 | 971 | { |
| 994 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 995 | | state->m_video.multi_page = data & 0x77; |
| 972 | m_video.multi_page = data & 0x77; |
| 996 | 973 | } |
| 997 | 974 | |
| 998 | 975 | /* |
| r14963 | r14964 | |
| 1003 | 980 | * bit 1 = Red |
| 1004 | 981 | * bit 0 = Blue |
| 1005 | 982 | */ |
| 1006 | | READ8_HANDLER( fm7_palette_r ) |
| 983 | READ8_MEMBER(fm7_state::fm7_palette_r) |
| 1007 | 984 | { |
| 1008 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1009 | | return state->m_video.fm7_pal[offset]; |
| 985 | return m_video.fm7_pal[offset]; |
| 1010 | 986 | } |
| 1011 | 987 | |
| 1012 | | WRITE8_HANDLER( fm7_palette_w ) |
| 988 | WRITE8_MEMBER(fm7_state::fm7_palette_w) |
| 1013 | 989 | { |
| 1014 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1015 | 990 | UINT8 r = 0,g = 0,b = 0; |
| 1016 | 991 | |
| 1017 | 992 | if(data & 0x04) |
| r14963 | r14964 | |
| 1021 | 996 | if(data & 0x01) |
| 1022 | 997 | b = 0xff; |
| 1023 | 998 | |
| 1024 | | palette_set_color(space->machine(),offset,MAKE_RGB(r,g,b)); |
| 1025 | | state->m_video.fm7_pal[offset] = data & 0x07; |
| 999 | palette_set_color(machine(),offset,MAKE_RGB(r,g,b)); |
| 1000 | m_video.fm7_pal[offset] = data & 0x07; |
| 1026 | 1001 | } |
| 1027 | 1002 | |
| 1028 | 1003 | /* |
| r14963 | r14964 | |
| 1036 | 1011 | * fd33: red level (4 bits) |
| 1037 | 1012 | * fd34: green level (4 bits) |
| 1038 | 1013 | */ |
| 1039 | | WRITE8_HANDLER( fm77av_analog_palette_w ) |
| 1014 | WRITE8_MEMBER(fm7_state::fm77av_analog_palette_w) |
| 1040 | 1015 | { |
| 1041 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1042 | 1016 | int val; |
| 1043 | 1017 | |
| 1044 | 1018 | switch(offset) |
| 1045 | 1019 | { |
| 1046 | 1020 | case 0: |
| 1047 | | val = ((data & 0x0f) << 8) | (state->m_video.fm77av_pal_selected & 0x00ff); |
| 1048 | | state->m_video.fm77av_pal_selected = val; |
| 1021 | val = ((data & 0x0f) << 8) | (m_video.fm77av_pal_selected & 0x00ff); |
| 1022 | m_video.fm77av_pal_selected = val; |
| 1049 | 1023 | break; |
| 1050 | 1024 | case 1: |
| 1051 | | val = data | (state->m_video.fm77av_pal_selected & 0x0f00); |
| 1052 | | state->m_video.fm77av_pal_selected = val; |
| 1025 | val = data | (m_video.fm77av_pal_selected & 0x0f00); |
| 1026 | m_video.fm77av_pal_selected = val; |
| 1053 | 1027 | break; |
| 1054 | 1028 | case 2: |
| 1055 | | state->m_video.fm77av_pal_b[state->m_video.fm77av_pal_selected] = (data & 0x0f) << 4; |
| 1056 | | palette_set_color(space->machine(),state->m_video.fm77av_pal_selected+8, |
| 1057 | | MAKE_RGB(state->m_video.fm77av_pal_r[state->m_video.fm77av_pal_selected], |
| 1058 | | state->m_video.fm77av_pal_g[state->m_video.fm77av_pal_selected], |
| 1059 | | state->m_video.fm77av_pal_b[state->m_video.fm77av_pal_selected])); |
| 1029 | m_video.fm77av_pal_b[m_video.fm77av_pal_selected] = (data & 0x0f) << 4; |
| 1030 | palette_set_color(machine(),m_video.fm77av_pal_selected+8, |
| 1031 | MAKE_RGB(m_video.fm77av_pal_r[m_video.fm77av_pal_selected], |
| 1032 | m_video.fm77av_pal_g[m_video.fm77av_pal_selected], |
| 1033 | m_video.fm77av_pal_b[m_video.fm77av_pal_selected])); |
| 1060 | 1034 | break; |
| 1061 | 1035 | case 3: |
| 1062 | | state->m_video.fm77av_pal_r[state->m_video.fm77av_pal_selected] = (data & 0x0f) << 4; |
| 1063 | | palette_set_color(space->machine(),state->m_video.fm77av_pal_selected+8, |
| 1064 | | MAKE_RGB(state->m_video.fm77av_pal_r[state->m_video.fm77av_pal_selected], |
| 1065 | | state->m_video.fm77av_pal_g[state->m_video.fm77av_pal_selected], |
| 1066 | | state->m_video.fm77av_pal_b[state->m_video.fm77av_pal_selected])); |
| 1036 | m_video.fm77av_pal_r[m_video.fm77av_pal_selected] = (data & 0x0f) << 4; |
| 1037 | palette_set_color(machine(),m_video.fm77av_pal_selected+8, |
| 1038 | MAKE_RGB(m_video.fm77av_pal_r[m_video.fm77av_pal_selected], |
| 1039 | m_video.fm77av_pal_g[m_video.fm77av_pal_selected], |
| 1040 | m_video.fm77av_pal_b[m_video.fm77av_pal_selected])); |
| 1067 | 1041 | break; |
| 1068 | 1042 | case 4: |
| 1069 | | state->m_video.fm77av_pal_g[state->m_video.fm77av_pal_selected] = (data & 0x0f) << 4; |
| 1070 | | palette_set_color(space->machine(),state->m_video.fm77av_pal_selected+8, |
| 1071 | | MAKE_RGB(state->m_video.fm77av_pal_r[state->m_video.fm77av_pal_selected], |
| 1072 | | state->m_video.fm77av_pal_g[state->m_video.fm77av_pal_selected], |
| 1073 | | state->m_video.fm77av_pal_b[state->m_video.fm77av_pal_selected])); |
| 1043 | m_video.fm77av_pal_g[m_video.fm77av_pal_selected] = (data & 0x0f) << 4; |
| 1044 | palette_set_color(machine(),m_video.fm77av_pal_selected+8, |
| 1045 | MAKE_RGB(m_video.fm77av_pal_r[m_video.fm77av_pal_selected], |
| 1046 | m_video.fm77av_pal_g[m_video.fm77av_pal_selected], |
| 1047 | m_video.fm77av_pal_b[m_video.fm77av_pal_selected])); |
| 1074 | 1048 | break; |
| 1075 | 1049 | } |
| 1076 | 1050 | } |
| r14963 | r14964 | |
| 1090 | 1064 | * bit 6 - display VRAM page |
| 1091 | 1065 | * bit 7 - NMI mask register (1=mask) |
| 1092 | 1066 | */ |
| 1093 | | READ8_HANDLER( fm77av_video_flags_r ) |
| 1067 | READ8_MEMBER(fm7_state::fm77av_video_flags_r) |
| 1094 | 1068 | { |
| 1095 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1096 | 1069 | UINT8 ret = 0xff; |
| 1097 | 1070 | |
| 1098 | | if(space->machine().primary_screen->vblank()) |
| 1071 | if(machine().primary_screen->vblank()) |
| 1099 | 1072 | ret &= ~0x80; |
| 1100 | 1073 | |
| 1101 | | if(state->m_alu.busy != 0) |
| 1074 | if(m_alu.busy != 0) |
| 1102 | 1075 | ret &= ~0x10; |
| 1103 | 1076 | |
| 1104 | | if(state->m_video.vsync_flag == 0) |
| 1077 | if(m_video.vsync_flag == 0) |
| 1105 | 1078 | ret &= ~0x04; |
| 1106 | 1079 | |
| 1107 | | if(!state->m_video.sub_reset) |
| 1080 | if(!m_video.sub_reset) |
| 1108 | 1081 | ret &= ~0x01; |
| 1109 | 1082 | |
| 1110 | 1083 | return ret; |
| 1111 | 1084 | } |
| 1112 | 1085 | |
| 1113 | | WRITE8_HANDLER( fm77av_video_flags_w ) |
| 1086 | WRITE8_MEMBER(fm7_state::fm77av_video_flags_w) |
| 1114 | 1087 | { |
| 1115 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1116 | | UINT8* RAM = space->machine().region("subsyscg")->base(); |
| 1088 | UINT8* RAM = machine().region("subsyscg")->base(); |
| 1117 | 1089 | |
| 1118 | | state->m_video.cgrom = data & 0x03; |
| 1119 | | memory_set_bankptr(space->machine(),"bank20",RAM+(state->m_video.cgrom*0x800)); |
| 1120 | | state->m_video.fine_offset = data & 0x04; |
| 1121 | | state->m_video.active_video_page = data & 0x20; |
| 1122 | | state->m_video.display_video_page = data & 0x40; |
| 1123 | | state->m_video.nmi_mask = data & 0x80; |
| 1090 | m_video.cgrom = data & 0x03; |
| 1091 | memory_set_bankptr(machine(),"bank20",RAM+(m_video.cgrom*0x800)); |
| 1092 | m_video.fine_offset = data & 0x04; |
| 1093 | m_video.active_video_page = data & 0x20; |
| 1094 | m_video.display_video_page = data & 0x40; |
| 1095 | m_video.nmi_mask = data & 0x80; |
| 1124 | 1096 | } |
| 1125 | 1097 | |
| 1126 | 1098 | /* |
| r14963 | r14964 | |
| 1130 | 1102 | * bit 1 (R/O) - DISPTMG status (0=blank) |
| 1131 | 1103 | * bit 0 (R/O) - VSync status (1=sync?) |
| 1132 | 1104 | */ |
| 1133 | | READ8_HANDLER( fm77av_sub_modestatus_r ) |
| 1105 | READ8_MEMBER(fm7_state::fm77av_sub_modestatus_r) |
| 1134 | 1106 | { |
| 1135 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1136 | 1107 | UINT8 ret = 0x00; |
| 1137 | 1108 | |
| 1138 | 1109 | ret |= 0xbc; |
| 1139 | | ret |= (state->m_video.modestatus & 0x40); |
| 1110 | ret |= (m_video.modestatus & 0x40); |
| 1140 | 1111 | |
| 1141 | | if(!space->machine().primary_screen->vblank()) |
| 1112 | if(!machine().primary_screen->vblank()) |
| 1142 | 1113 | ret |= 0x02; |
| 1143 | 1114 | |
| 1144 | | if(state->m_video.vsync_flag != 0) |
| 1115 | if(m_video.vsync_flag != 0) |
| 1145 | 1116 | ret |= 0x01; |
| 1146 | 1117 | |
| 1147 | 1118 | return ret; |
| 1148 | 1119 | } |
| 1149 | 1120 | |
| 1150 | | WRITE8_HANDLER( fm77av_sub_modestatus_w ) |
| 1121 | WRITE8_MEMBER(fm7_state::fm77av_sub_modestatus_w) |
| 1151 | 1122 | { |
| 1152 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1153 | | state->m_video.modestatus = data & 0x40; |
| 1123 | m_video.modestatus = data & 0x40; |
| 1154 | 1124 | if(data & 0x40) |
| 1155 | 1125 | { |
| 1156 | 1126 | rectangle rect(0, 320-1, 0, 200-1); |
| 1157 | | space->machine().primary_screen->configure(320,200,rect,HZ_TO_ATTOSECONDS(60)); |
| 1127 | machine().primary_screen->configure(320,200,rect,HZ_TO_ATTOSECONDS(60)); |
| 1158 | 1128 | } |
| 1159 | 1129 | else |
| 1160 | 1130 | { |
| 1161 | 1131 | rectangle rect(0, 640-1, 0, 200-1); |
| 1162 | | space->machine().primary_screen->configure(640,200,rect,HZ_TO_ATTOSECONDS(60)); |
| 1132 | machine().primary_screen->configure(640,200,rect,HZ_TO_ATTOSECONDS(60)); |
| 1163 | 1133 | } |
| 1164 | 1134 | } |
| 1165 | 1135 | |
| r14963 | r14964 | |
| 1170 | 1140 | * bits 1 and 0 select which subsys ROM to be banked into sub CPU space |
| 1171 | 1141 | * on the FM-77AV40 and later, bit 2 can also selected to bank in sub monitor RAM. |
| 1172 | 1142 | */ |
| 1173 | | WRITE8_HANDLER( fm77av_sub_bank_w ) |
| 1143 | WRITE8_MEMBER(fm7_state::fm77av_sub_bank_w) |
| 1174 | 1144 | { |
| 1175 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1176 | | // UINT8* RAM = space->machine().region("sub")->base(); |
| 1145 | // UINT8* RAM = machine().region("sub")->base(); |
| 1177 | 1146 | UINT8* ROM; |
| 1178 | 1147 | |
| 1179 | | if((data & 0x03) == (state->m_sb_prev & 0x03)) |
| 1148 | if((data & 0x03) == (m_sb_prev & 0x03)) |
| 1180 | 1149 | return; |
| 1181 | 1150 | |
| 1182 | | state->m_video.subrom = data & 0x03; |
| 1151 | m_video.subrom = data & 0x03; |
| 1183 | 1152 | switch (data & 0x03) |
| 1184 | 1153 | { |
| 1185 | 1154 | case 0x00: // Type C, 640x200 (as used on the FM-7) |
| 1186 | | ROM = space->machine().region("subsys_c")->base(); |
| 1187 | | // memory_set_bankptr(space->machine(),20,ROM); |
| 1188 | | memory_set_bankptr(space->machine(),"bank21",ROM+0x800); |
| 1155 | ROM = machine().region("subsys_c")->base(); |
| 1156 | // memory_set_bankptr(machine(),20,ROM); |
| 1157 | memory_set_bankptr(machine(),"bank21",ROM+0x800); |
| 1189 | 1158 | logerror("VID: Sub ROM Type C selected\n"); |
| 1190 | 1159 | break; |
| 1191 | 1160 | case 0x01: // Type A, 640x200 |
| 1192 | | ROM = space->machine().region("subsys_a")->base(); |
| 1193 | | // memory_set_bankptr(space->machine(),20,RAM+0xd800); |
| 1194 | | memory_set_bankptr(space->machine(),"bank21",ROM); |
| 1161 | ROM = machine().region("subsys_a")->base(); |
| 1162 | // memory_set_bankptr(machine(),20,RAM+0xd800); |
| 1163 | memory_set_bankptr(machine(),"bank21",ROM); |
| 1195 | 1164 | logerror("VID: Sub ROM Type A selected\n"); |
| 1196 | 1165 | break; |
| 1197 | 1166 | case 0x02: // Type B, 320x200 |
| 1198 | | ROM = space->machine().region("subsys_b")->base(); |
| 1199 | | // memory_set_bankptr(space->machine(),20,RAM+0xd800); |
| 1200 | | memory_set_bankptr(space->machine(),"bank21",ROM); |
| 1167 | ROM = machine().region("subsys_b")->base(); |
| 1168 | // memory_set_bankptr(machine(),20,RAM+0xd800); |
| 1169 | memory_set_bankptr(machine(),"bank21",ROM); |
| 1201 | 1170 | logerror("VID: Sub ROM Type B selected\n"); |
| 1202 | 1171 | break; |
| 1203 | 1172 | case 0x03: // CG Font? |
| 1204 | | ROM = space->machine().region("subsyscg")->base(); |
| 1205 | | // memory_set_bankptr(space->machine(),20,RAM+0xd800); |
| 1206 | | memory_set_bankptr(space->machine(),"bank21",ROM); |
| 1173 | ROM = machine().region("subsyscg")->base(); |
| 1174 | // memory_set_bankptr(machine(),20,RAM+0xd800); |
| 1175 | memory_set_bankptr(machine(),"bank21",ROM); |
| 1207 | 1176 | logerror("VID: Sub ROM CG selected\n"); |
| 1208 | 1177 | break; |
| 1209 | 1178 | } |
| 1210 | 1179 | // reset sub CPU, set busy flag, set reset flag |
| 1211 | | cputag_set_input_line(space->machine(),"sub",INPUT_LINE_RESET,PULSE_LINE); |
| 1212 | | state->m_video.sub_busy = 0x80; |
| 1213 | | state->m_video.sub_halt = 0; |
| 1214 | | state->m_video.sub_reset = 1; |
| 1215 | | state->m_sb_prev = data; |
| 1180 | cputag_set_input_line(machine(),"sub",INPUT_LINE_RESET,PULSE_LINE); |
| 1181 | m_video.sub_busy = 0x80; |
| 1182 | m_video.sub_halt = 0; |
| 1183 | m_video.sub_reset = 1; |
| 1184 | m_sb_prev = data; |
| 1216 | 1185 | } |
| 1217 | 1186 | |
| 1218 | 1187 | /* |
| r14963 | r14964 | |
| 1243 | 1212 | * 0xd428-29(W): Line X1 (High-Low, X9-X0) |
| 1244 | 1213 | * 0xd42a-2b(W): Line Y1 (High-Low, Y8-Y0) |
| 1245 | 1214 | */ |
| 1246 | | READ8_HANDLER( fm77av_alu_r ) |
| 1215 | READ8_MEMBER(fm7_state::fm77av_alu_r) |
| 1247 | 1216 | { |
| 1248 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1249 | 1217 | switch(offset) |
| 1250 | 1218 | { |
| 1251 | 1219 | case 0x00: |
| 1252 | | logerror("ALU: read from command register (%02x)\n",state->m_alu.command); |
| 1253 | | return state->m_alu.command; |
| 1220 | logerror("ALU: read from command register (%02x)\n",m_alu.command); |
| 1221 | return m_alu.command; |
| 1254 | 1222 | case 0x01: |
| 1255 | 1223 | logerror("ALU: read from logical colour\n"); |
| 1256 | | return state->m_alu.lcolour; |
| 1224 | return m_alu.lcolour; |
| 1257 | 1225 | case 0x02: |
| 1258 | 1226 | logerror("ALU: read from mask register\n"); |
| 1259 | | return state->m_alu.mask; |
| 1227 | return m_alu.mask; |
| 1260 | 1228 | case 0x03: |
| 1261 | | logerror("ALU: read from compare data register (%02x)\n",state->m_alu.compare_data); |
| 1262 | | return state->m_alu.compare_data; |
| 1229 | logerror("ALU: read from compare data register (%02x)\n",m_alu.compare_data); |
| 1230 | return m_alu.compare_data; |
| 1263 | 1231 | case 0x0b: |
| 1264 | 1232 | logerror("ALU: read from bank disable register\n"); |
| 1265 | | return 0xf7 | state->m_alu.bank_disable; |
| 1233 | return 0xf7 | m_alu.bank_disable; |
| 1266 | 1234 | default: |
| 1267 | 1235 | logerror("ALU: read from invalid register 0x%02x\n",offset); |
| 1268 | 1236 | return 0xff; |
| r14963 | r14964 | |
| 1270 | 1238 | return 0xff; |
| 1271 | 1239 | } |
| 1272 | 1240 | |
| 1273 | | WRITE8_HANDLER( fm77av_alu_w ) |
| 1241 | WRITE8_MEMBER(fm7_state::fm77av_alu_w) |
| 1274 | 1242 | { |
| 1275 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1276 | 1243 | UINT16 dat; |
| 1277 | 1244 | |
| 1278 | 1245 | switch(offset) |
| 1279 | 1246 | { |
| 1280 | 1247 | case 0x00: |
| 1281 | | state->m_alu.command = data; |
| 1248 | m_alu.command = data; |
| 1282 | 1249 | logerror("ALU: write to command register - %02x\n",data); |
| 1283 | 1250 | break; |
| 1284 | 1251 | case 0x01: |
| 1285 | | state->m_alu.lcolour = data & 0x07; |
| 1252 | m_alu.lcolour = data & 0x07; |
| 1286 | 1253 | logerror("ALU: write to logical colour - %02x\n",data); |
| 1287 | 1254 | break; |
| 1288 | 1255 | case 0x02: |
| 1289 | | state->m_alu.mask = data; |
| 1256 | m_alu.mask = data; |
| 1290 | 1257 | logerror("ALU: write to mask register - %02x\n",data); |
| 1291 | 1258 | break; |
| 1292 | 1259 | case 0x03: |
| r14963 | r14964 | |
| 1297 | 1264 | case 0x08: |
| 1298 | 1265 | case 0x09: |
| 1299 | 1266 | case 0x0a: |
| 1300 | | state->m_alu.compare[offset-3] = data; |
| 1267 | m_alu.compare[offset-3] = data; |
| 1301 | 1268 | logerror("ALU: write to compare register %i - %02x\n",offset-3,data); |
| 1302 | 1269 | break; |
| 1303 | 1270 | case 0x0b: |
| 1304 | | state->m_alu.bank_disable = data & 0x03; |
| 1271 | m_alu.bank_disable = data & 0x03; |
| 1305 | 1272 | // logerror("ALU: write to bank disable register - %02x\n",data); |
| 1306 | 1273 | break; |
| 1307 | 1274 | case 0x0c: |
| 1308 | | state->m_alu.tilepaint_b = data; |
| 1275 | m_alu.tilepaint_b = data; |
| 1309 | 1276 | // logerror("ALU: write to tilepaint (blue) register - %02x\n",data); |
| 1310 | 1277 | break; |
| 1311 | 1278 | case 0x0d: |
| 1312 | | state->m_alu.tilepaint_r = data; |
| 1279 | m_alu.tilepaint_r = data; |
| 1313 | 1280 | // logerror("ALU: write to tilepaint (red) register - %02x\n",data); |
| 1314 | 1281 | break; |
| 1315 | 1282 | case 0x0e: |
| 1316 | | state->m_alu.tilepaint_g = data; |
| 1283 | m_alu.tilepaint_g = data; |
| 1317 | 1284 | // logerror("ALU: write to tilepaint (green) register - %02x\n",data); |
| 1318 | 1285 | break; |
| 1319 | 1286 | case 0x10: |
| 1320 | | dat = ((data & 0x1f) << 8) | (state->m_alu.addr_offset & 0x00ff); |
| 1321 | | state->m_alu.addr_offset = dat; |
| 1322 | | // logerror("ALU: write to address offset (high) register - %02x (%04x)\n",data,state->m_alu.addr_offset); |
| 1287 | dat = ((data & 0x1f) << 8) | (m_alu.addr_offset & 0x00ff); |
| 1288 | m_alu.addr_offset = dat; |
| 1289 | // logerror("ALU: write to address offset (high) register - %02x (%04x)\n",data,m_alu.addr_offset); |
| 1323 | 1290 | break; |
| 1324 | 1291 | case 0x11: |
| 1325 | | dat = (state->m_alu.addr_offset & 0xff00) | data; |
| 1326 | | state->m_alu.addr_offset = dat; |
| 1327 | | // logerror("ALU: write to address offset (low) register - %02x (%04x)\n",data,state->m_alu.addr_offset); |
| 1292 | dat = (m_alu.addr_offset & 0xff00) | data; |
| 1293 | m_alu.addr_offset = dat; |
| 1294 | // logerror("ALU: write to address offset (low) register - %02x (%04x)\n",data,m_alu.addr_offset); |
| 1328 | 1295 | break; |
| 1329 | 1296 | case 0x12: |
| 1330 | | dat = (data << 8) | (state->m_alu.line_style & 0x00ff); |
| 1331 | | state->m_alu.line_style = dat; |
| 1332 | | // logerror("ALU: write to line style (high) register - %02x (%04x)\n",data,state->m_alu.line_style); |
| 1297 | dat = (data << 8) | (m_alu.line_style & 0x00ff); |
| 1298 | m_alu.line_style = dat; |
| 1299 | // logerror("ALU: write to line style (high) register - %02x (%04x)\n",data,m_alu.line_style); |
| 1333 | 1300 | break; |
| 1334 | 1301 | case 0x13: |
| 1335 | | dat = (state->m_alu.line_style & 0xff00) | data; |
| 1336 | | state->m_alu.line_style = dat; |
| 1337 | | // logerror("ALU: write to line style (low) register - %02x (%04x)\n",data,state->m_alu.line_style); |
| 1302 | dat = (m_alu.line_style & 0xff00) | data; |
| 1303 | m_alu.line_style = dat; |
| 1304 | // logerror("ALU: write to line style (low) register - %02x (%04x)\n",data,m_alu.line_style); |
| 1338 | 1305 | break; |
| 1339 | 1306 | case 0x14: |
| 1340 | | dat = ((data & 0x03) << 8) | (state->m_alu.x0 & 0x00ff); |
| 1341 | | state->m_alu.x0 = dat; |
| 1342 | | // logerror("ALU: write to X0 (high) register - %02x (%04x)\n",data,state->m_alu.x0); |
| 1307 | dat = ((data & 0x03) << 8) | (m_alu.x0 & 0x00ff); |
| 1308 | m_alu.x0 = dat; |
| 1309 | // logerror("ALU: write to X0 (high) register - %02x (%04x)\n",data,m_alu.x0); |
| 1343 | 1310 | break; |
| 1344 | 1311 | case 0x15: |
| 1345 | | dat = (state->m_alu.x0 & 0xff00) | data; |
| 1346 | | state->m_alu.x0 = dat; |
| 1347 | | // logerror("ALU: write to X0 (low) register - %02x (%04x)\n",data,state->m_alu.x0); |
| 1312 | dat = (m_alu.x0 & 0xff00) | data; |
| 1313 | m_alu.x0 = dat; |
| 1314 | // logerror("ALU: write to X0 (low) register - %02x (%04x)\n",data,m_alu.x0); |
| 1348 | 1315 | break; |
| 1349 | 1316 | case 0x16: |
| 1350 | | dat = ((data & 0x01) << 8) | (state->m_alu.y0 & 0x00ff); |
| 1351 | | state->m_alu.y0 = dat; |
| 1352 | | // logerror("ALU: write to Y0 (high) register - %02x (%04x)\n",data,state->m_alu.y0); |
| 1317 | dat = ((data & 0x01) << 8) | (m_alu.y0 & 0x00ff); |
| 1318 | m_alu.y0 = dat; |
| 1319 | // logerror("ALU: write to Y0 (high) register - %02x (%04x)\n",data,m_alu.y0); |
| 1353 | 1320 | break; |
| 1354 | 1321 | case 0x17: |
| 1355 | | dat = (state->m_alu.y0 & 0xff00) | data; |
| 1356 | | state->m_alu.y0 = dat; |
| 1357 | | // logerror("ALU: write to Y0 (low) register - %02x (%04x)\n",data,state->m_alu.y0); |
| 1322 | dat = (m_alu.y0 & 0xff00) | data; |
| 1323 | m_alu.y0 = dat; |
| 1324 | // logerror("ALU: write to Y0 (low) register - %02x (%04x)\n",data,m_alu.y0); |
| 1358 | 1325 | break; |
| 1359 | 1326 | case 0x18: |
| 1360 | | dat = ((data & 0x03) << 8) | (state->m_alu.x1 & 0x00ff); |
| 1361 | | state->m_alu.x1 = dat; |
| 1362 | | // logerror("ALU: write to X1 (high) register - %02x (%04x)\n",data,state->m_alu.x1); |
| 1327 | dat = ((data & 0x03) << 8) | (m_alu.x1 & 0x00ff); |
| 1328 | m_alu.x1 = dat; |
| 1329 | // logerror("ALU: write to X1 (high) register - %02x (%04x)\n",data,m_alu.x1); |
| 1363 | 1330 | break; |
| 1364 | 1331 | case 0x19: |
| 1365 | | dat = (state->m_alu.x1 & 0xff00) | data; |
| 1366 | | state->m_alu.x1 = dat; |
| 1367 | | // logerror("ALU: write to X1 (low) register - %02x (%04x)\n",data,state->m_alu.x1); |
| 1332 | dat = (m_alu.x1 & 0xff00) | data; |
| 1333 | m_alu.x1 = dat; |
| 1334 | // logerror("ALU: write to X1 (low) register - %02x (%04x)\n",data,m_alu.x1); |
| 1368 | 1335 | break; |
| 1369 | 1336 | case 0x1a: |
| 1370 | | dat = ((data & 0x01) << 8) | (state->m_alu.y1 & 0x00ff); |
| 1371 | | state->m_alu.y1 = dat; |
| 1372 | | // logerror("ALU: write to Y1 (high) register - %02x (%04x)\n",data,state->m_alu.y1); |
| 1337 | dat = ((data & 0x01) << 8) | (m_alu.y1 & 0x00ff); |
| 1338 | m_alu.y1 = dat; |
| 1339 | // logerror("ALU: write to Y1 (high) register - %02x (%04x)\n",data,m_alu.y1); |
| 1373 | 1340 | break; |
| 1374 | 1341 | case 0x1b: |
| 1375 | | dat = (state->m_alu.y1 & 0xff00) | data; |
| 1376 | | state->m_alu.y1 = dat; |
| 1342 | dat = (m_alu.y1 & 0xff00) | data; |
| 1343 | m_alu.y1 = dat; |
| 1377 | 1344 | // draw line |
| 1378 | | fm77av_line_draw(space->machine()); |
| 1379 | | // logerror("ALU: write to Y1 (low) register - %02x (%04x)\n",data,state->m_alu.y1); |
| 1345 | fm77av_line_draw(machine()); |
| 1346 | // logerror("ALU: write to Y1 (low) register - %02x (%04x)\n",data,m_alu.y1); |
| 1380 | 1347 | break; |
| 1381 | 1348 | default: |
| 1382 | 1349 | logerror("ALU: write 0x%02x to invalid register 0x%02x\n",data,offset); |
| r14963 | r14964 | |
| 1399 | 1366 | } |
| 1400 | 1367 | |
| 1401 | 1368 | // called when banked into main CPU space by the MMR, available only if sub CPU is halted |
| 1402 | | READ8_HANDLER( fm7_sub_ram_ports_banked_r ) |
| 1369 | READ8_MEMBER(fm7_state::fm7_sub_ram_ports_banked_r) |
| 1403 | 1370 | { |
| 1404 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1405 | | UINT8* RAM = space->machine().region("maincpu")->base(); |
| 1371 | UINT8* RAM = machine().region("maincpu")->base(); |
| 1406 | 1372 | UINT8* ROM; |
| 1407 | 1373 | |
| 1408 | | if(!state->m_video.sub_halt) |
| 1374 | if(!m_video.sub_halt) |
| 1409 | 1375 | return 0xff; |
| 1410 | 1376 | |
| 1411 | 1377 | if(offset < 0x380) // work RAM |
| 1412 | 1378 | return RAM[0x1d000+offset]; |
| 1413 | 1379 | if(offset >= 0x380 && offset < 0x400) // shared RAM |
| 1414 | | return state->m_shared_ram[offset-0x380]; |
| 1380 | return m_shared_ram[offset-0x380]; |
| 1415 | 1381 | if(offset >= 0x500 && offset < 0x800) // work RAM |
| 1416 | 1382 | return RAM[0x1d000+offset]; |
| 1417 | 1383 | if(offset > 0x800) // CGROM |
| 1418 | 1384 | { |
| 1419 | | ROM = space->machine().region("subsyscg")->base(); |
| 1420 | | return ROM[(state->m_video.cgrom*0x800)+(offset-0x800)]; |
| 1385 | ROM = machine().region("subsyscg")->base(); |
| 1386 | return ROM[(m_video.cgrom*0x800)+(offset-0x800)]; |
| 1421 | 1387 | } |
| 1422 | 1388 | |
| 1423 | 1389 | if(offset >= 0x410 && offset <= 0x42b) |
| r14963 | r14964 | |
| 1452 | 1418 | return 0xff; |
| 1453 | 1419 | } |
| 1454 | 1420 | |
| 1455 | | WRITE8_HANDLER( fm7_sub_ram_ports_banked_w ) |
| 1421 | WRITE8_MEMBER(fm7_state::fm7_sub_ram_ports_banked_w) |
| 1456 | 1422 | { |
| 1457 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1458 | | UINT8* RAM = space->machine().region("maincpu")->base(); |
| 1423 | UINT8* RAM = machine().region("maincpu")->base(); |
| 1459 | 1424 | |
| 1460 | | if(!state->m_video.sub_halt) |
| 1425 | if(!m_video.sub_halt) |
| 1461 | 1426 | return; |
| 1462 | 1427 | |
| 1463 | 1428 | if(offset < 0x380) // work RAM |
| r14963 | r14964 | |
| 1467 | 1432 | } |
| 1468 | 1433 | if(offset >= 0x380 && offset < 0x400) // shared RAM |
| 1469 | 1434 | { |
| 1470 | | state->m_shared_ram[offset-0x380] = data; |
| 1435 | m_shared_ram[offset-0x380] = data; |
| 1471 | 1436 | return; |
| 1472 | 1437 | } |
| 1473 | 1438 | if(offset >= 0x500 && offset < 0x800) // work RAM |
| r14963 | r14964 | |
| 1509 | 1474 | } |
| 1510 | 1475 | } |
| 1511 | 1476 | |
| 1512 | | READ8_HANDLER( fm7_console_ram_banked_r ) |
| 1477 | READ8_MEMBER(fm7_state::fm7_console_ram_banked_r) |
| 1513 | 1478 | { |
| 1514 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1515 | | UINT8* RAM = space->machine().region("maincpu")->base(); |
| 1479 | UINT8* RAM = machine().region("maincpu")->base(); |
| 1516 | 1480 | |
| 1517 | | if(!state->m_video.sub_halt) |
| 1481 | if(!m_video.sub_halt) |
| 1518 | 1482 | return 0xff; |
| 1519 | 1483 | |
| 1520 | 1484 | return RAM[0x1c000+offset]; |
| 1521 | 1485 | } |
| 1522 | 1486 | |
| 1523 | | WRITE8_HANDLER( fm7_console_ram_banked_w ) |
| 1487 | WRITE8_MEMBER(fm7_state::fm7_console_ram_banked_w) |
| 1524 | 1488 | { |
| 1525 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1526 | | UINT8* RAM = space->machine().region("maincpu")->base(); |
| 1489 | UINT8* RAM = machine().region("maincpu")->base(); |
| 1527 | 1490 | |
| 1528 | | if(!state->m_video.sub_halt) |
| 1491 | if(!m_video.sub_halt) |
| 1529 | 1492 | return; |
| 1530 | 1493 | |
| 1531 | 1494 | RAM[0x1c000+offset] = data; |
src/mess/drivers/ip22.c
| r14963 | r14964 | |
| 108 | 108 | PBUS_DMA_t m_PBUS_DMA; |
| 109 | 109 | UINT32 m_nIntCounter; |
| 110 | 110 | UINT8 m_dma_buffer[4096]; |
| 111 | DECLARE_READ32_MEMBER(hpc3_pbus6_r); |
| 112 | DECLARE_WRITE32_MEMBER(hpc3_pbus6_w); |
| 113 | DECLARE_READ32_MEMBER(hpc3_hd_enet_r); |
| 114 | DECLARE_WRITE32_MEMBER(hpc3_hd_enet_w); |
| 115 | DECLARE_READ32_MEMBER(hpc3_hd0_r); |
| 116 | DECLARE_WRITE32_MEMBER(hpc3_hd0_w); |
| 117 | DECLARE_READ32_MEMBER(hpc3_pbus4_r); |
| 118 | DECLARE_WRITE32_MEMBER(hpc3_pbus4_w); |
| 119 | DECLARE_READ32_MEMBER(rtc_r); |
| 120 | DECLARE_WRITE32_MEMBER(rtc_w); |
| 121 | DECLARE_WRITE32_MEMBER(ip22_write_ram); |
| 122 | DECLARE_READ32_MEMBER(hal2_r); |
| 123 | DECLARE_WRITE32_MEMBER(hal2_w); |
| 124 | DECLARE_READ32_MEMBER(hpc3_pbusdma_r); |
| 125 | DECLARE_WRITE32_MEMBER(hpc3_pbusdma_w); |
| 126 | DECLARE_READ32_MEMBER(hpc3_unkpbus0_r); |
| 127 | DECLARE_WRITE32_MEMBER(hpc3_unkpbus0_w); |
| 111 | 128 | }; |
| 112 | 129 | |
| 113 | 130 | |
| r14963 | r14964 | |
| 216 | 233 | } |
| 217 | 234 | #endif |
| 218 | 235 | |
| 219 | | static READ32_HANDLER( hpc3_pbus6_r ) |
| 236 | READ32_MEMBER(ip22_state::hpc3_pbus6_r) |
| 220 | 237 | { |
| 221 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 222 | | device_t *lpt = space->machine().device("lpt_0"); |
| 238 | device_t *lpt = machine().device("lpt_0"); |
| 223 | 239 | UINT8 ret8; |
| 224 | | running_machine &machine = space->machine(); |
| 225 | | |
| 226 | 240 | switch( offset ) |
| 227 | 241 | { |
| 228 | 242 | case 0x004/4: |
| r14963 | r14964 | |
| 235 | 249 | return ret8; |
| 236 | 250 | case 0x030/4: |
| 237 | 251 | //verboselog(( machine, 2, "Serial 1 Command Transfer Read, 0x1fbd9830: %02x\n", 0x04 ); |
| 238 | | switch(cpu_get_pc(&space->device())) |
| 252 | switch(cpu_get_pc(&space.device())) |
| 239 | 253 | { |
| 240 | 254 | case 0x9fc1d9e4: // interpreter (ip244415) |
| 241 | 255 | case 0x9fc1d9e0: // DRC (ip244415) |
| r14963 | r14964 | |
| 250 | 264 | //verboselog(( machine, 2, "Serial 2 Command Transfer Read, 0x1fbd9838: %02x\n", 0x04 ); |
| 251 | 265 | return 0x00000004; |
| 252 | 266 | case 0x40/4: |
| 253 | | return kbdc8042_8_r(space, 0); |
| 267 | return kbdc8042_8_r(&space, 0); |
| 254 | 268 | case 0x44/4: |
| 255 | | return kbdc8042_8_r(space, 4); |
| 269 | return kbdc8042_8_r(&space, 4); |
| 256 | 270 | case 0x58/4: |
| 257 | 271 | return 0x20; // chip rev 1, board rev 0, "Guinness" (Indy) => 0x01 for "Full House" (Indigo2) |
| 258 | 272 | case 0x80/4: |
| r14963 | r14964 | |
| 268 | 282 | case 0xa8/4: |
| 269 | 283 | case 0xac/4: |
| 270 | 284 | // mame_printf_info("INT3: r @ %x mask %08x (PC=%x)\n", offset*4, mem_mask, activecpu_get_pc()); |
| 271 | | return state->m_int3_regs[offset-0x80/4]; |
| 285 | return m_int3_regs[offset-0x80/4]; |
| 272 | 286 | case 0xb0/4: |
| 273 | | ret8 = pit8253_r(machine.device("pit8254"), 0); |
| 287 | ret8 = pit8253_r(machine().device("pit8254"), 0); |
| 274 | 288 | //verboselog(( machine, 0, "HPC PBUS6 IOC4 Timer Counter 0 Register Read: 0x%02x (%08x)\n", ret8, mem_mask ); |
| 275 | 289 | return ret8; |
| 276 | 290 | case 0xb4/4: |
| 277 | | ret8 = pit8253_r(machine.device("pit8254"), 1); |
| 291 | ret8 = pit8253_r(machine().device("pit8254"), 1); |
| 278 | 292 | //verboselog(( machine, 0, "HPC PBUS6 IOC4 Timer Counter 1 Register Read: 0x%02x (%08x)\n", ret8, mem_mask ); |
| 279 | 293 | return ret8; |
| 280 | 294 | case 0xb8/4: |
| 281 | | ret8 = pit8253_r(machine.device("pit8254"), 2); |
| 295 | ret8 = pit8253_r(machine().device("pit8254"), 2); |
| 282 | 296 | //verboselog(( machine, 0, "HPC PBUS6 IOC4 Timer Counter 2 Register Read: 0x%02x (%08x)\n", ret8, mem_mask ); |
| 283 | 297 | return ret8; |
| 284 | 298 | case 0xbc/4: |
| 285 | | ret8 = pit8253_r(machine.device("pit8254"), 3); |
| 299 | ret8 = pit8253_r(machine().device("pit8254"), 3); |
| 286 | 300 | //verboselog(( machine, 0, "HPC PBUS6 IOC4 Timer Control Word Register Read: 0x%02x (%08x)\n", ret8, mem_mask ); |
| 287 | 301 | return ret8; |
| 288 | 302 | default: |
| r14963 | r14964 | |
| 292 | 306 | return 0; |
| 293 | 307 | } |
| 294 | 308 | |
| 295 | | static WRITE32_HANDLER( hpc3_pbus6_w ) |
| 309 | WRITE32_MEMBER(ip22_state::hpc3_pbus6_w) |
| 296 | 310 | { |
| 297 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 298 | | device_t *lpt = space->machine().device("lpt_0"); |
| 311 | device_t *lpt = machine().device("lpt_0"); |
| 299 | 312 | char cChar; |
| 300 | | running_machine &machine = space->machine(); |
| 301 | 313 | |
| 302 | 314 | switch( offset ) |
| 303 | 315 | { |
| 304 | 316 | case 0x004/4: |
| 305 | 317 | //verboselog(( machine, 0, "Parallel Control Write: %08x\n", data ); |
| 306 | 318 | pc_lpt_control_w(lpt, 0, data ^ 0x0d); |
| 307 | | //state->m_nIOC_ParCntl = data; |
| 319 | //m_nIOC_ParCntl = data; |
| 308 | 320 | break; |
| 309 | 321 | case 0x030/4: |
| 310 | 322 | if( ( data & 0x000000ff ) >= 0x20 ) |
| r14963 | r14964 | |
| 337 | 349 | } |
| 338 | 350 | break; |
| 339 | 351 | case 0x40/4: |
| 340 | | kbdc8042_8_w(space, 0, data); |
| 352 | kbdc8042_8_w(&space, 0, data); |
| 341 | 353 | break; |
| 342 | 354 | case 0x44/4: |
| 343 | | kbdc8042_8_w(space, 4, data); |
| 355 | kbdc8042_8_w(&space, 4, data); |
| 344 | 356 | break; |
| 345 | 357 | case 0x80/4: |
| 346 | 358 | case 0x84/4: |
| r14963 | r14964 | |
| 353 | 365 | case 0xa0/4: |
| 354 | 366 | case 0xa4/4: |
| 355 | 367 | // mame_printf_info("INT3: w %x to %x (reg %d) mask %08x (PC=%x)\n", data, offset*4, offset-0x80/4, mem_mask, activecpu_get_pc()); |
| 356 | | state->m_int3_regs[offset-0x80/4] = data; |
| 368 | m_int3_regs[offset-0x80/4] = data; |
| 357 | 369 | |
| 358 | 370 | // if no local0 interrupts now, clear the input to the CPU |
| 359 | | if ((state->m_int3_regs[0] & state->m_int3_regs[1]) == 0) |
| 371 | if ((m_int3_regs[0] & m_int3_regs[1]) == 0) |
| 360 | 372 | { |
| 361 | | cputag_set_input_line(machine, "maincpu", MIPS3_IRQ0, CLEAR_LINE); |
| 373 | cputag_set_input_line(machine(), "maincpu", MIPS3_IRQ0, CLEAR_LINE); |
| 362 | 374 | } |
| 363 | 375 | else |
| 364 | 376 | { |
| 365 | | cputag_set_input_line(machine, "maincpu", MIPS3_IRQ0, ASSERT_LINE); |
| 377 | cputag_set_input_line(machine(), "maincpu", MIPS3_IRQ0, ASSERT_LINE); |
| 366 | 378 | } |
| 367 | 379 | |
| 368 | 380 | // if no local1 interrupts now, clear the input to the CPU |
| 369 | | if ((state->m_int3_regs[2] & state->m_int3_regs[3]) == 0) |
| 381 | if ((m_int3_regs[2] & m_int3_regs[3]) == 0) |
| 370 | 382 | { |
| 371 | | cputag_set_input_line(machine, "maincpu", MIPS3_IRQ1, CLEAR_LINE); |
| 383 | cputag_set_input_line(machine(), "maincpu", MIPS3_IRQ1, CLEAR_LINE); |
| 372 | 384 | } |
| 373 | 385 | else |
| 374 | 386 | { |
| 375 | | cputag_set_input_line(machine, "maincpu", MIPS3_IRQ1, ASSERT_LINE); |
| 387 | cputag_set_input_line(machine(), "maincpu", MIPS3_IRQ1, ASSERT_LINE); |
| 376 | 388 | } |
| 377 | 389 | break; |
| 378 | 390 | case 0xb0/4: |
| 379 | 391 | //verboselog(( machine, 0, "HPC PBUS6 IOC4 Timer Counter 0 Register Write: 0x%08x (%08x)\n", data, mem_mask ); |
| 380 | | pit8253_w(machine.device("pit8254"), 0, data & 0x000000ff); |
| 392 | pit8253_w(machine().device("pit8254"), 0, data & 0x000000ff); |
| 381 | 393 | return; |
| 382 | 394 | case 0xb4/4: |
| 383 | 395 | //verboselog(( machine, 0, "HPC PBUS6 IOC4 Timer Counter 1 Register Write: 0x%08x (%08x)\n", data, mem_mask ); |
| 384 | | pit8253_w(machine.device("pit8254"), 1, data & 0x000000ff); |
| 396 | pit8253_w(machine().device("pit8254"), 1, data & 0x000000ff); |
| 385 | 397 | return; |
| 386 | 398 | case 0xb8/4: |
| 387 | 399 | //verboselog(( machine, 0, "HPC PBUS6 IOC4 Timer Counter 2 Register Write: 0x%08x (%08x)\n", data, mem_mask ); |
| 388 | | pit8253_w(machine.device("pit8254"), 2, data & 0x000000ff); |
| 400 | pit8253_w(machine().device("pit8254"), 2, data & 0x000000ff); |
| 389 | 401 | return; |
| 390 | 402 | case 0xbc/4: |
| 391 | 403 | //verboselog(( machine, 0, "HPC PBUS6 IOC4 Timer Control Word Register Write: 0x%08x (%08x)\n", data, mem_mask ); |
| 392 | | pit8253_w(machine.device("pit8254"), 3, data & 0x000000ff); |
| 404 | pit8253_w(machine().device("pit8254"), 3, data & 0x000000ff); |
| 393 | 405 | return; |
| 394 | 406 | default: |
| 395 | 407 | //verboselog(( machine, 0, "Unknown HPC PBUS6 Write: 0x%08x: 0x%08x (%08x)\n", 0x1fbd9800 + ( offset << 2 ), data, mem_mask ); |
| r14963 | r14964 | |
| 401 | 413 | //UINT32 nHPC3_hd0_regs[0x20]; |
| 402 | 414 | //UINT32 nHPC3_hd1_regs[0x20]; |
| 403 | 415 | |
| 404 | | static READ32_HANDLER( hpc3_hd_enet_r ) |
| 416 | READ32_MEMBER(ip22_state::hpc3_hd_enet_r) |
| 405 | 417 | { |
| 406 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 407 | | //running_machine &machine = space->machine(); |
| 418 | //running_machine &machine = machine(); |
| 408 | 419 | |
| 409 | 420 | switch( offset ) |
| 410 | 421 | { |
| 411 | 422 | case 0x0004/4: |
| 412 | | //verboselog((machine, 0, "HPC3 SCSI0DESC Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, state->m_HPC3.nSCSI0Descriptor ); |
| 413 | | return state->m_HPC3.nSCSI0Descriptor; |
| 423 | //verboselog((machine, 0, "HPC3 SCSI0DESC Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_HPC3.nSCSI0Descriptor ); |
| 424 | return m_HPC3.nSCSI0Descriptor; |
| 414 | 425 | case 0x1004/4: |
| 415 | | //verboselog((machine, 0, "HPC3 SCSI0DMACTRL Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, state->m_HPC3.nSCSI0DMACtrl ); |
| 416 | | return state->m_HPC3.nSCSI0DMACtrl; |
| 426 | //verboselog((machine, 0, "HPC3 SCSI0DMACTRL Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_HPC3.nSCSI0DMACtrl ); |
| 427 | return m_HPC3.nSCSI0DMACtrl; |
| 417 | 428 | case 0x4000/4: |
| 418 | | //verboselog((machine, 2, "HPC3 ENETR CBP Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, state->m_HPC3.nenetr_nbdp ); |
| 419 | | return state->m_HPC3.nenetr_cbp; |
| 429 | //verboselog((machine, 2, "HPC3 ENETR CBP Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_HPC3.nenetr_nbdp ); |
| 430 | return m_HPC3.nenetr_cbp; |
| 420 | 431 | case 0x4004/4: |
| 421 | | //verboselog((machine, 2, "HPC3 ENETR NBDP Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, state->m_HPC3.nenetr_nbdp ); |
| 422 | | return state->m_HPC3.nenetr_nbdp; |
| 432 | //verboselog((machine, 2, "HPC3 ENETR NBDP Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_HPC3.nenetr_nbdp ); |
| 433 | return m_HPC3.nenetr_nbdp; |
| 423 | 434 | default: |
| 424 | 435 | //verboselog((machine, 0, "Unknown HPC3 ENET/HDx Read: %08x (%08x)\n", 0x1fb90000 + ( offset << 2 ), mem_mask ); |
| 425 | 436 | return 0; |
| r14963 | r14964 | |
| 427 | 438 | return 0; |
| 428 | 439 | } |
| 429 | 440 | |
| 430 | | static WRITE32_HANDLER( hpc3_hd_enet_w ) |
| 441 | WRITE32_MEMBER(ip22_state::hpc3_hd_enet_w) |
| 431 | 442 | { |
| 432 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 433 | | //running_machine &machine = space->machine(); |
| 443 | //running_machine &machine = machine(); |
| 434 | 444 | |
| 435 | 445 | switch( offset ) |
| 436 | 446 | { |
| 437 | 447 | case 0x0004/4: |
| 438 | 448 | //verboselog((machine, 2, "HPC3 SCSI0DESC Write: %08x\n", data ); |
| 439 | | state->m_HPC3.nSCSI0Descriptor = data; |
| 449 | m_HPC3.nSCSI0Descriptor = data; |
| 440 | 450 | break; |
| 441 | 451 | case 0x1004/4: |
| 442 | 452 | //verboselog((machine, 2, "HPC3 SCSI0DMACTRL Write: %08x\n", data ); |
| 443 | | state->m_HPC3.nSCSI0DMACtrl = data; |
| 453 | m_HPC3.nSCSI0DMACtrl = data; |
| 444 | 454 | break; |
| 445 | 455 | case 0x4000/4: |
| 446 | 456 | //verboselog((machine, 2, "HPC3 ENETR CBP Write: %08x\n", data ); |
| 447 | | state->m_HPC3.nenetr_cbp = data; |
| 457 | m_HPC3.nenetr_cbp = data; |
| 448 | 458 | break; |
| 449 | 459 | case 0x4004/4: |
| 450 | 460 | //verboselog((machine, 2, "HPC3 ENETR NBDP Write: %08x\n", data ); |
| 451 | | state->m_HPC3.nenetr_nbdp = data; |
| 461 | m_HPC3.nenetr_nbdp = data; |
| 452 | 462 | break; |
| 453 | 463 | default: |
| 454 | 464 | //verboselog((machine, 0, "Unknown HPC3 ENET/HDx write: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2 ), mem_mask, data ); |
| r14963 | r14964 | |
| 456 | 466 | } |
| 457 | 467 | } |
| 458 | 468 | |
| 459 | | static READ32_HANDLER( hpc3_hd0_r ) |
| 469 | READ32_MEMBER(ip22_state::hpc3_hd0_r) |
| 460 | 470 | { |
| 461 | | //running_machine &machine = space->machine(); |
| 471 | //running_machine &machine = machine(); |
| 462 | 472 | |
| 463 | 473 | switch( offset ) |
| 464 | 474 | { |
| r14963 | r14964 | |
| 467 | 477 | // //verboselog((machine, 2, "HPC3 HD0 Status Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, nHPC3_hd0_regs[0x17] ); |
| 468 | 478 | if (ACCESSING_BITS_0_7) |
| 469 | 479 | { |
| 470 | | return wd33c93_r( space, 0 ); |
| 480 | return wd33c93_r( &space, 0 ); |
| 471 | 481 | } |
| 472 | 482 | else |
| 473 | 483 | { |
| r14963 | r14964 | |
| 478 | 488 | // //verboselog((machine, 2, "HPC3 HD0 Register Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, nHPC3_hd0_regs[nHPC3_hd0_register] ); |
| 479 | 489 | if (ACCESSING_BITS_0_7) |
| 480 | 490 | { |
| 481 | | return wd33c93_r( space, 1 ); |
| 491 | return wd33c93_r( &space, 1 ); |
| 482 | 492 | } |
| 483 | 493 | else |
| 484 | 494 | { |
| 485 | 495 | return 0; |
| 486 | 496 | } |
| 487 | 497 | default: |
| 488 | | //verboselog((machine, 0, "Unknown HPC3 HD0 Read: %08x (%08x) [%x] PC=%x\n", 0x1fbc0000 + ( offset << 2 ), mem_mask, offset, cpu_get_pc(&space->device()) ); |
| 498 | //verboselog((machine, 0, "Unknown HPC3 HD0 Read: %08x (%08x) [%x] PC=%x\n", 0x1fbc0000 + ( offset << 2 ), mem_mask, offset, cpu_get_pc(&space.device()) ); |
| 489 | 499 | return 0; |
| 490 | 500 | } |
| 491 | 501 | return 0; |
| 492 | 502 | } |
| 493 | 503 | |
| 494 | | static WRITE32_HANDLER( hpc3_hd0_w ) |
| 504 | WRITE32_MEMBER(ip22_state::hpc3_hd0_w) |
| 495 | 505 | { |
| 496 | | //running_machine &machine = space->machine(); |
| 506 | //running_machine &machine = machine(); |
| 497 | 507 | |
| 498 | 508 | switch( offset ) |
| 499 | 509 | { |
| r14963 | r14964 | |
| 502 | 512 | // //verboselog((machine, 2, "HPC3 HD0 Register Select Write: %08x\n", data ); |
| 503 | 513 | if (ACCESSING_BITS_0_7) |
| 504 | 514 | { |
| 505 | | wd33c93_w( space, 0, data & 0x000000ff ); |
| 515 | wd33c93_w( &space, 0, data & 0x000000ff ); |
| 506 | 516 | } |
| 507 | 517 | break; |
| 508 | 518 | case 0x0004/4: |
| r14963 | r14964 | |
| 510 | 520 | // //verboselog((machine, 2, "HPC3 HD0 Register %d Write: %08x\n", nHPC3_hd0_register, data ); |
| 511 | 521 | if (ACCESSING_BITS_0_7) |
| 512 | 522 | { |
| 513 | | wd33c93_w( space, 1, data & 0x000000ff ); |
| 523 | wd33c93_w( &space, 1, data & 0x000000ff ); |
| 514 | 524 | } |
| 515 | 525 | break; |
| 516 | 526 | default: |
| r14963 | r14964 | |
| 520 | 530 | } |
| 521 | 531 | |
| 522 | 532 | |
| 523 | | static READ32_HANDLER( hpc3_pbus4_r ) |
| 533 | READ32_MEMBER(ip22_state::hpc3_pbus4_r) |
| 524 | 534 | { |
| 525 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 526 | | //running_machine &machine = space->machine(); |
| 535 | //running_machine &machine = machine(); |
| 527 | 536 | |
| 528 | 537 | switch( offset ) |
| 529 | 538 | { |
| 530 | 539 | case 0x0004/4: |
| 531 | | //verboselog((machine, 2, "HPC3 PBUS4 Unknown 0 Read: (%08x): %08x\n", mem_mask, state->m_HPC3.nunk0 ); |
| 532 | | return state->m_HPC3.nunk0; |
| 540 | //verboselog((machine, 2, "HPC3 PBUS4 Unknown 0 Read: (%08x): %08x\n", mem_mask, m_HPC3.nunk0 ); |
| 541 | return m_HPC3.nunk0; |
| 533 | 542 | case 0x000c/4: |
| 534 | | //verboselog((machine, 2, "Interrupt Controller(?) Read: (%08x): %08x\n", mem_mask, state->m_HPC3.nIC_Unk0 ); |
| 535 | | return state->m_HPC3.nIC_Unk0; |
| 543 | //verboselog((machine, 2, "Interrupt Controller(?) Read: (%08x): %08x\n", mem_mask, m_HPC3.nIC_Unk0 ); |
| 544 | return m_HPC3.nIC_Unk0; |
| 536 | 545 | case 0x0014/4: |
| 537 | | //verboselog((machine, 2, "HPC3 PBUS4 Unknown 1 Read: (%08x): %08x\n", mem_mask, state->m_HPC3.nunk1 ); |
| 538 | | return state->m_HPC3.nunk1; |
| 546 | //verboselog((machine, 2, "HPC3 PBUS4 Unknown 1 Read: (%08x): %08x\n", mem_mask, m_HPC3.nunk1 ); |
| 547 | return m_HPC3.nunk1; |
| 539 | 548 | default: |
| 540 | 549 | //verboselog((machine, 0, "Unknown HPC3 PBUS4 Read: %08x (%08x)\n", 0x1fbd9000 + ( offset << 2 ), mem_mask ); |
| 541 | 550 | return 0; |
| r14963 | r14964 | |
| 543 | 552 | return 0; |
| 544 | 553 | } |
| 545 | 554 | |
| 546 | | static WRITE32_HANDLER( hpc3_pbus4_w ) |
| 555 | WRITE32_MEMBER(ip22_state::hpc3_pbus4_w) |
| 547 | 556 | { |
| 548 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 549 | | //running_machine &machine = space->machine(); |
| 557 | //running_machine &machine = machine(); |
| 550 | 558 | |
| 551 | 559 | switch( offset ) |
| 552 | 560 | { |
| 553 | 561 | case 0x0004/4: |
| 554 | 562 | //verboselog((machine, 2, "HPC3 PBUS4 Unknown 0 Write: %08x (%08x)\n", data, mem_mask ); |
| 555 | | state->m_HPC3.nunk0 = data; |
| 563 | m_HPC3.nunk0 = data; |
| 556 | 564 | break; |
| 557 | 565 | case 0x000c/4: |
| 558 | 566 | //verboselog((machine, 2, "Interrupt Controller(?) Write: (%08x): %08x\n", mem_mask, data ); |
| 559 | | state->m_HPC3.nIC_Unk0 = data; |
| 567 | m_HPC3.nIC_Unk0 = data; |
| 560 | 568 | break; |
| 561 | 569 | case 0x0014/4: |
| 562 | 570 | //verboselog((machine, 2, "HPC3 PBUS4 Unknown 1 Write: %08x (%08x)\n", data, mem_mask ); |
| 563 | | state->m_HPC3.nunk1 = data; |
| 571 | m_HPC3.nunk1 = data; |
| 564 | 572 | break; |
| 565 | 573 | default: |
| 566 | 574 | //verboselog((machine, 0, "Unknown HPC3 PBUS4 Write: %08x (%08x): %08x\n", 0x1fbd9000 + ( offset << 2 ), mem_mask, data ); |
| r14963 | r14964 | |
| 600 | 608 | #define RTC_RAMMSB state->m_RTC.nRegs[0x51] |
| 601 | 609 | #define RTC_WRITECNT state->m_RTC.nRegs[0x5e] |
| 602 | 610 | |
| 603 | | static READ32_HANDLER( rtc_r ) |
| 611 | READ32_MEMBER(ip22_state::rtc_r) |
| 604 | 612 | { |
| 605 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 606 | | //running_machine &machine = space->machine(); |
| 613 | ip22_state *state = machine().driver_data<ip22_state>(); |
| 607 | 614 | |
| 608 | | // mame_printf_info("RTC_R: offset %x = %x (PC=%x)\n", offset, state->m_RTC.nRegs[offset], activecpu_get_pc()); |
| 615 | // mame_printf_info("RTC_R: offset %x = %x (PC=%x)\n", offset, m_RTC.nRegs[offset], activecpu_get_pc()); |
| 609 | 616 | |
| 610 | 617 | if( offset <= 0x0d ) |
| 611 | 618 | { |
| r14963 | r14964 | |
| 660 | 667 | } |
| 661 | 668 | if( offset >= 0x0e && offset < 0x40 ) |
| 662 | 669 | { |
| 663 | | return state->m_RTC.nRegs[offset]; |
| 670 | return m_RTC.nRegs[offset]; |
| 664 | 671 | } |
| 665 | 672 | if( offset >= 0x40 && offset < 0x80 && !( RTC_REGISTERA & 0x10 ) ) |
| 666 | 673 | { |
| 667 | | return state->m_RTC.nUserRAM[offset - 0x40]; |
| 674 | return m_RTC.nUserRAM[offset - 0x40]; |
| 668 | 675 | } |
| 669 | 676 | if( offset >= 0x40 && offset < 0x80 && ( RTC_REGISTERA & 0x10 ) ) |
| 670 | 677 | { |
| r14963 | r14964 | |
| 719 | 726 | //verboselog((machine, 3, "RTC RAM MSB Read: %02x \n", RTC_RAMMSB ); |
| 720 | 727 | return RTC_RAMMSB; |
| 721 | 728 | case 0x0053: |
| 722 | | return state->m_RTC.nRAM[ ( RTC_RAMMSB << 8 ) | RTC_RAMLSB ]; |
| 729 | return m_RTC.nRAM[ ( RTC_RAMMSB << 8 ) | RTC_RAMLSB ]; |
| 723 | 730 | case 0x005e: |
| 724 | 731 | return RTC_WRITECNT; |
| 725 | 732 | default: |
| r14963 | r14964 | |
| 729 | 736 | } |
| 730 | 737 | if( offset >= 0x80 ) |
| 731 | 738 | { |
| 732 | | return state->m_RTC.nUserRAM[ offset - 0x80 ]; |
| 739 | return m_RTC.nUserRAM[ offset - 0x80 ]; |
| 733 | 740 | } |
| 734 | 741 | return 0; |
| 735 | 742 | } |
| 736 | 743 | |
| 737 | | static WRITE32_HANDLER( rtc_w ) |
| 744 | WRITE32_MEMBER(ip22_state::rtc_w) |
| 738 | 745 | { |
| 739 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 740 | | //running_machine &machine = space->machine(); |
| 741 | | |
| 746 | //running_machine &machine = machine(); |
| 747 | ip22_state *state = machine().driver_data<ip22_state>(); |
| 742 | 748 | RTC_WRITECNT++; |
| 743 | 749 | |
| 744 | 750 | // mame_printf_info("RTC_W: offset %x => %x (PC=%x)\n", data, offset, activecpu_get_pc()); |
| r14963 | r14964 | |
| 808 | 814 | } |
| 809 | 815 | if( offset >= 0x0e && offset < 0x40 ) |
| 810 | 816 | { |
| 811 | | state->m_RTC.nRegs[offset] = data; |
| 817 | m_RTC.nRegs[offset] = data; |
| 812 | 818 | return; |
| 813 | 819 | } |
| 814 | 820 | if( offset >= 0x40 && offset < 0x80 && !( RTC_REGISTERA & 0x10 ) ) |
| 815 | 821 | { |
| 816 | | state->m_RTC.nUserRAM[offset - 0x40] = data; |
| 822 | m_RTC.nUserRAM[offset - 0x40] = data; |
| 817 | 823 | return; |
| 818 | 824 | } |
| 819 | 825 | if( offset >= 0x40 && offset < 0x80 && ( RTC_REGISTERA & 0x10 ) ) |
| r14963 | r14964 | |
| 866 | 872 | RTC_RAMMSB = data; |
| 867 | 873 | break; |
| 868 | 874 | case 0x0053: |
| 869 | | state->m_RTC.nRAM[ ( RTC_RAMMSB << 8 ) | RTC_RAMLSB ] = data; |
| 875 | m_RTC.nRAM[ ( RTC_RAMMSB << 8 ) | RTC_RAMLSB ] = data; |
| 870 | 876 | break; |
| 871 | 877 | default: |
| 872 | 878 | //verboselog((machine, 3, "Unknown RTC Ext. Reg. Write: %02x: %02x\n", offset, data ); |
| r14963 | r14964 | |
| 875 | 881 | } |
| 876 | 882 | if( offset >= 0x80 ) |
| 877 | 883 | { |
| 878 | | state->m_RTC.nUserRAM[ offset - 0x80 ] = data; |
| 884 | m_RTC.nUserRAM[ offset - 0x80 ] = data; |
| 879 | 885 | } |
| 880 | 886 | } |
| 881 | 887 | |
| 882 | 888 | // a bit hackish, but makes the memory detection work properly and allows a big cleanup of the mapping |
| 883 | | static WRITE32_HANDLER( ip22_write_ram ) |
| 889 | WRITE32_MEMBER(ip22_state::ip22_write_ram) |
| 884 | 890 | { |
| 885 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 886 | 891 | // if banks 2 or 3 are enabled, do nothing, we don't support that much memory |
| 887 | | if (sgi_mc_r(space, 0xc8/4, 0xffffffff) & 0x10001000) |
| 892 | if (sgi_mc_r(&space, 0xc8/4, 0xffffffff) & 0x10001000) |
| 888 | 893 | { |
| 889 | 894 | // a random perturbation so the memory test fails |
| 890 | 895 | data ^= 0xffffffff; |
| 891 | 896 | } |
| 892 | 897 | |
| 893 | 898 | // if banks 0 or 1 have 2 subbanks, also kill it, we only want 128 MB |
| 894 | | if (sgi_mc_r(space, 0xc0/4, 0xffffffff) & 0x40004000) |
| 899 | if (sgi_mc_r(&space, 0xc0/4, 0xffffffff) & 0x40004000) |
| 895 | 900 | { |
| 896 | 901 | // a random perturbation so the memory test fails |
| 897 | 902 | data ^= 0xffffffff; |
| 898 | 903 | } |
| 899 | | COMBINE_DATA(&state->m_mainram[offset]); |
| 904 | COMBINE_DATA(&m_mainram[offset]); |
| 900 | 905 | } |
| 901 | 906 | |
| 902 | 907 | |
| r14963 | r14964 | |
| 912 | 917 | #define H2_ISR_GLOBAL_RESET 0x08 |
| 913 | 918 | #define H2_ISR_CODEC_RESET 0x10 |
| 914 | 919 | |
| 915 | | static READ32_HANDLER( hal2_r ) |
| 920 | READ32_MEMBER(ip22_state::hal2_r) |
| 916 | 921 | { |
| 917 | | //running_machine &machine = space->machine(); |
| 922 | //running_machine &machine = machine(); |
| 918 | 923 | |
| 919 | 924 | switch( offset ) |
| 920 | 925 | { |
| r14963 | r14964 | |
| 929 | 934 | return 0; |
| 930 | 935 | } |
| 931 | 936 | |
| 932 | | static WRITE32_HANDLER( hal2_w ) |
| 937 | WRITE32_MEMBER(ip22_state::hal2_w) |
| 933 | 938 | { |
| 934 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 935 | | //running_machine &machine = space->machine(); |
| 939 | //running_machine &machine = machine(); |
| 936 | 940 | |
| 937 | 941 | switch( offset ) |
| 938 | 942 | { |
| r14963 | r14964 | |
| 949 | 953 | break; |
| 950 | 954 | case 0x0030/4: |
| 951 | 955 | //verboselog((machine, 0, "HAL2 Indirect Address Register Write: 0x%08x (%08x)\n", data, mem_mask ); |
| 952 | | state->m_HAL2.nIAR = data; |
| 956 | m_HAL2.nIAR = data; |
| 953 | 957 | switch( data & H2_IAR_TYPE ) |
| 954 | 958 | { |
| 955 | 959 | case 0x1000: |
| r14963 | r14964 | |
| 1026 | 1030 | break; |
| 1027 | 1031 | case 0x0040/4: |
| 1028 | 1032 | //verboselog((machine, 0, "HAL2 Indirect Data Register 0 Write: 0x%08x (%08x)\n", data, mem_mask ); |
| 1029 | | state->m_HAL2.nIDR[0] = data; |
| 1033 | m_HAL2.nIDR[0] = data; |
| 1030 | 1034 | return; |
| 1031 | 1035 | case 0x0050/4: |
| 1032 | 1036 | //verboselog((machine, 0, "HAL2 Indirect Data Register 1 Write: 0x%08x (%08x)\n", data, mem_mask ); |
| 1033 | | state->m_HAL2.nIDR[1] = data; |
| 1037 | m_HAL2.nIDR[1] = data; |
| 1034 | 1038 | return; |
| 1035 | 1039 | case 0x0060/4: |
| 1036 | 1040 | //verboselog((machine, 0, "HAL2 Indirect Data Register 2 Write: 0x%08x (%08x)\n", data, mem_mask ); |
| 1037 | | state->m_HAL2.nIDR[2] = data; |
| 1041 | m_HAL2.nIDR[2] = data; |
| 1038 | 1042 | return; |
| 1039 | 1043 | case 0x0070/4: |
| 1040 | 1044 | //verboselog((machine, 0, "HAL2 Indirect Data Register 3 Write: 0x%08x (%08x)\n", data, mem_mask ); |
| 1041 | | state->m_HAL2.nIDR[3] = data; |
| 1045 | m_HAL2.nIDR[3] = data; |
| 1042 | 1046 | return; |
| 1043 | 1047 | } |
| 1044 | 1048 | //verboselog((machine, 0, "Unknown HAL2 write: 0x%08x: 0x%08x (%08x)\n", 0x1fbd8000 + offset*4, data, mem_mask ); |
| r14963 | r14964 | |
| 1097 | 1101 | #endif |
| 1098 | 1102 | } |
| 1099 | 1103 | |
| 1100 | | static READ32_HANDLER( hpc3_pbusdma_r ) |
| 1104 | READ32_MEMBER(ip22_state::hpc3_pbusdma_r) |
| 1101 | 1105 | { |
| 1102 | 1106 | //UINT32 channel = offset / (0x2000/4); |
| 1103 | | //verboselog((space->machine(), 0, "PBUS DMA Channel %d Read: 0x%08x (%08x)\n", channel, 0x1fb80000 + offset*4, mem_mask ); |
| 1107 | //verboselog((machine(), 0, "PBUS DMA Channel %d Read: 0x%08x (%08x)\n", channel, 0x1fb80000 + offset*4, mem_mask ); |
| 1104 | 1108 | return 0; |
| 1105 | 1109 | } |
| 1106 | 1110 | |
| 1107 | | static WRITE32_HANDLER( hpc3_pbusdma_w ) |
| 1111 | WRITE32_MEMBER(ip22_state::hpc3_pbusdma_w) |
| 1108 | 1112 | { |
| 1109 | | ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 1110 | 1113 | UINT32 channel = offset / (0x2000/4); |
| 1111 | | running_machine &machine = space->machine(); |
| 1112 | 1114 | |
| 1113 | 1115 | switch( offset & 0x07ff ) |
| 1114 | 1116 | { |
| r14963 | r14964 | |
| 1119 | 1121 | //verboselog((machine, 0, "PBUS DMA Channel %d Descriptor Pointer Write: 0x%08x\n", channel, data ); |
| 1120 | 1122 | if( channel == 1 ) |
| 1121 | 1123 | { |
| 1122 | | state->m_PBUS_DMA.nDescPtr = data; |
| 1123 | | state->m_PBUS_DMA.nCurPtr = state->m_mainram[(state->m_PBUS_DMA.nDescPtr - 0x08000000)/4]; |
| 1124 | | state->m_PBUS_DMA.nWordsLeft = state->m_mainram[(state->m_PBUS_DMA.nDescPtr - 0x08000000)/4+1]; |
| 1125 | | state->m_PBUS_DMA.nNextPtr = state->m_mainram[(state->m_PBUS_DMA.nDescPtr - 0x08000000)/4+2]; |
| 1126 | | //verboselog((machine, 0, "nPBUS_DMA_DescPtr = %08x\n", state->m_PBUS_DMA.nDescPtr ); |
| 1127 | | //verboselog((machine, 0, "nPBUS_DMA_CurPtr = %08x\n", state->m_PBUS_DMA.nCurPtr ); |
| 1128 | | //verboselog((machine, 0, "nPBUS_DMA_WordsLeft = %08x\n", state->m_PBUS_DMA.nWordsLeft ); |
| 1129 | | //verboselog((machine, 0, "nPBUS_DMA_NextPtr = %08x\n", state->m_PBUS_DMA.nNextPtr ); |
| 1124 | m_PBUS_DMA.nDescPtr = data; |
| 1125 | m_PBUS_DMA.nCurPtr = m_mainram[(m_PBUS_DMA.nDescPtr - 0x08000000)/4]; |
| 1126 | m_PBUS_DMA.nWordsLeft = m_mainram[(m_PBUS_DMA.nDescPtr - 0x08000000)/4+1]; |
| 1127 | m_PBUS_DMA.nNextPtr = m_mainram[(m_PBUS_DMA.nDescPtr - 0x08000000)/4+2]; |
| 1128 | //verboselog((machine, 0, "nPBUS_DMA_DescPtr = %08x\n", m_PBUS_DMA.nDescPtr ); |
| 1129 | //verboselog((machine, 0, "nPBUS_DMA_CurPtr = %08x\n", m_PBUS_DMA.nCurPtr ); |
| 1130 | //verboselog((machine, 0, "nPBUS_DMA_WordsLeft = %08x\n", m_PBUS_DMA.nWordsLeft ); |
| 1131 | //verboselog((machine, 0, "nPBUS_DMA_NextPtr = %08x\n", m_PBUS_DMA.nNextPtr ); |
| 1130 | 1132 | } |
| 1131 | 1133 | return; |
| 1132 | 1134 | case 0x1000/4: |
| r14963 | r14964 | |
| 1164 | 1166 | //verboselog((machine, 0, " FIFO End: Rowe %04x\n", ( data & PBUS_CTRL_FIFO_END ) >> 24 ); |
| 1165 | 1167 | if( ( data & PBUS_CTRL_DMASTART ) || ( data & PBUS_CTRL_LOAD_EN ) ) |
| 1166 | 1168 | { |
| 1167 | | machine.scheduler().timer_set(attotime::from_hz(44100), FUNC(ip22_dma)); |
| 1168 | | state->m_PBUS_DMA.nActive = 1; |
| 1169 | machine().scheduler().timer_set(attotime::from_hz(44100), FUNC(ip22_dma)); |
| 1170 | m_PBUS_DMA.nActive = 1; |
| 1169 | 1171 | } |
| 1170 | 1172 | return; |
| 1171 | 1173 | } |
| 1172 | 1174 | //verboselog((machine, 0, "Unknown PBUS DMA Channel %d Write: 0x%08x: 0x%08x (%08x)\n", channel, 0x1fb80000 + offset*4, data, mem_mask ); |
| 1173 | 1175 | } |
| 1174 | 1176 | |
| 1175 | | static READ32_HANDLER( hpc3_unkpbus0_r ) |
| 1177 | READ32_MEMBER(ip22_state::hpc3_unkpbus0_r) |
| 1176 | 1178 | { |
| 1177 | | //ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 1178 | 1179 | return 0; |
| 1179 | | ////verboselog((space->machine(), 0, "Unknown PBUS Read: 0x%08x (%08x)\n", 0x1fbc8000 + offset*4, mem_mask ); |
| 1180 | | //return state->m_unkpbus0[offset]; |
| 1180 | ////verboselog((machine(), 0, "Unknown PBUS Read: 0x%08x (%08x)\n", 0x1fbc8000 + offset*4, mem_mask ); |
| 1181 | //return m_unkpbus0[offset]; |
| 1181 | 1182 | } |
| 1182 | 1183 | |
| 1183 | | static WRITE32_HANDLER( hpc3_unkpbus0_w ) |
| 1184 | WRITE32_MEMBER(ip22_state::hpc3_unkpbus0_w) |
| 1184 | 1185 | { |
| 1185 | | //ip22_state *state = space->machine().driver_data<ip22_state>(); |
| 1186 | | ////verboselog((space->machine(), 0, "Unknown PBUS Write: 0x%08x = 0x%08x (%08x)\n", 0x1fbc8000 + offset*4, data, mem_mask ); |
| 1187 | | //COMBINE_DATA(&state->m_unkpbus0[offset]); |
| 1186 | ////verboselog((machine(), 0, "Unknown PBUS Write: 0x%08x = 0x%08x (%08x)\n", 0x1fbc8000 + offset*4, data, mem_mask ); |
| 1187 | //COMBINE_DATA(&m_unkpbus0[offset]); |
| 1188 | 1188 | } |
| 1189 | 1189 | |
| 1190 | 1190 | static ADDRESS_MAP_START( ip225015_map, AS_PROGRAM, 32, ip22_state ) |
| 1191 | 1191 | AM_RANGE( 0x00000000, 0x0007ffff ) AM_RAMBANK( "bank1" ) /* mirror of first 512k of main RAM */ |
| 1192 | | AM_RANGE( 0x08000000, 0x0fffffff ) AM_SHARE("share1") AM_SHARE("mainram") AM_RAM_WRITE_LEGACY(ip22_write_ram) /* 128 MB of main RAM */ |
| 1192 | AM_RANGE( 0x08000000, 0x0fffffff ) AM_SHARE("share1") AM_SHARE("mainram") AM_RAM_WRITE(ip22_write_ram) /* 128 MB of main RAM */ |
| 1193 | 1193 | AM_RANGE( 0x1f0f0000, 0x1f0f1fff ) AM_READWRITE_LEGACY(newport_rex3_r, newport_rex3_w ) |
| 1194 | 1194 | AM_RANGE( 0x1fa00000, 0x1fa1ffff ) AM_READWRITE_LEGACY(sgi_mc_r, sgi_mc_w ) |
| 1195 | | AM_RANGE( 0x1fb90000, 0x1fb9ffff ) AM_READWRITE_LEGACY(hpc3_hd_enet_r, hpc3_hd_enet_w ) |
| 1195 | AM_RANGE( 0x1fb90000, 0x1fb9ffff ) AM_READWRITE(hpc3_hd_enet_r, hpc3_hd_enet_w ) |
| 1196 | 1196 | AM_RANGE( 0x1fbb0000, 0x1fbb0003 ) AM_RAM /* unknown, but read a lot and discarded */ |
| 1197 | | AM_RANGE( 0x1fbc0000, 0x1fbc7fff ) AM_READWRITE_LEGACY(hpc3_hd0_r, hpc3_hd0_w ) |
| 1198 | | AM_RANGE( 0x1fbc8000, 0x1fbcffff ) AM_READWRITE_LEGACY(hpc3_unkpbus0_r, hpc3_unkpbus0_w ) AM_SHARE("unkpbus0") |
| 1199 | | AM_RANGE( 0x1fb80000, 0x1fb8ffff ) AM_READWRITE_LEGACY(hpc3_pbusdma_r, hpc3_pbusdma_w ) |
| 1200 | | AM_RANGE( 0x1fbd8000, 0x1fbd83ff ) AM_READWRITE_LEGACY(hal2_r, hal2_w ) |
| 1197 | AM_RANGE( 0x1fbc0000, 0x1fbc7fff ) AM_READWRITE(hpc3_hd0_r, hpc3_hd0_w ) |
| 1198 | AM_RANGE( 0x1fbc8000, 0x1fbcffff ) AM_READWRITE(hpc3_unkpbus0_r, hpc3_unkpbus0_w ) AM_SHARE("unkpbus0") |
| 1199 | AM_RANGE( 0x1fb80000, 0x1fb8ffff ) AM_READWRITE(hpc3_pbusdma_r, hpc3_pbusdma_w ) |
| 1200 | AM_RANGE( 0x1fbd8000, 0x1fbd83ff ) AM_READWRITE(hal2_r, hal2_w ) |
| 1201 | 1201 | AM_RANGE( 0x1fbd8400, 0x1fbd87ff ) AM_RAM /* hack */ |
| 1202 | | AM_RANGE( 0x1fbd9000, 0x1fbd93ff ) AM_READWRITE_LEGACY(hpc3_pbus4_r, hpc3_pbus4_w ) |
| 1203 | | AM_RANGE( 0x1fbd9800, 0x1fbd9bff ) AM_READWRITE_LEGACY(hpc3_pbus6_r, hpc3_pbus6_w ) |
| 1202 | AM_RANGE( 0x1fbd9000, 0x1fbd93ff ) AM_READWRITE(hpc3_pbus4_r, hpc3_pbus4_w ) |
| 1203 | AM_RANGE( 0x1fbd9800, 0x1fbd9bff ) AM_READWRITE(hpc3_pbus6_r, hpc3_pbus6_w ) |
| 1204 | 1204 | AM_RANGE( 0x1fbdc000, 0x1fbdc7ff ) AM_RAM |
| 1205 | 1205 | AM_RANGE( 0x1fbdd000, 0x1fbdd3ff ) AM_RAM |
| 1206 | | AM_RANGE( 0x1fbe0000, 0x1fbe04ff ) AM_READWRITE_LEGACY(rtc_r, rtc_w ) |
| 1206 | AM_RANGE( 0x1fbe0000, 0x1fbe04ff ) AM_READWRITE(rtc_r, rtc_w ) |
| 1207 | 1207 | AM_RANGE( 0x1fc00000, 0x1fc7ffff ) AM_ROM AM_REGION( "user1", 0 ) |
| 1208 | | AM_RANGE( 0x20000000, 0x27ffffff ) AM_SHARE("share1") AM_RAM_WRITE_LEGACY(ip22_write_ram) |
| 1208 | AM_RANGE( 0x20000000, 0x27ffffff ) AM_SHARE("share1") AM_RAM_WRITE(ip22_write_ram) |
| 1209 | 1209 | ADDRESS_MAP_END |
| 1210 | 1210 | |
| 1211 | 1211 | |
src/mess/drivers/a2600.c
| r14963 | r14964 | |
| 73 | 73 | DECLARE_DIRECT_UPDATE_MEMBER(modeSS_opbase); |
| 74 | 74 | DECLARE_DIRECT_UPDATE_MEMBER(modeDPC_opbase_handler); |
| 75 | 75 | DECLARE_DIRECT_UPDATE_MEMBER(modeFE_opbase_handler); |
| 76 | DECLARE_READ8_MEMBER(modeF8_switch_r); |
| 77 | DECLARE_READ8_MEMBER(modeFA_switch_r); |
| 78 | DECLARE_READ8_MEMBER(modeF6_switch_r); |
| 79 | DECLARE_READ8_MEMBER(modeF4_switch_r); |
| 80 | DECLARE_READ8_MEMBER(modeE0_switch_r); |
| 81 | DECLARE_READ8_MEMBER(modeE7_switch_r); |
| 82 | DECLARE_READ8_MEMBER(modeE7_RAM_switch_r); |
| 83 | DECLARE_READ8_MEMBER(modeUA_switch_r); |
| 84 | DECLARE_READ8_MEMBER(modeDC_switch_r); |
| 85 | DECLARE_READ8_MEMBER(modeFV_switch_r); |
| 86 | DECLARE_READ8_MEMBER(modeJVP_switch_r); |
| 87 | DECLARE_WRITE8_MEMBER(modeF8_switch_w); |
| 88 | DECLARE_WRITE8_MEMBER(modeFA_switch_w); |
| 89 | DECLARE_WRITE8_MEMBER(modeF6_switch_w); |
| 90 | DECLARE_WRITE8_MEMBER(modeF4_switch_w); |
| 91 | DECLARE_WRITE8_MEMBER(modeE0_switch_w); |
| 92 | DECLARE_WRITE8_MEMBER(modeE7_switch_w); |
| 93 | DECLARE_WRITE8_MEMBER(modeE7_RAM_switch_w); |
| 94 | DECLARE_WRITE8_MEMBER(mode3F_switch_w); |
| 95 | DECLARE_WRITE8_MEMBER(modeUA_switch_w); |
| 96 | DECLARE_WRITE8_MEMBER(modeDC_switch_w); |
| 97 | DECLARE_WRITE8_MEMBER(mode3E_switch_w); |
| 98 | DECLARE_WRITE8_MEMBER(mode3E_RAM_switch_w); |
| 99 | DECLARE_WRITE8_MEMBER(mode3E_RAM_w); |
| 100 | DECLARE_WRITE8_MEMBER(modeFV_switch_w); |
| 101 | DECLARE_WRITE8_MEMBER(modeJVP_switch_w); |
| 102 | DECLARE_READ8_MEMBER(modeSS_r); |
| 103 | DECLARE_READ8_MEMBER(modeDPC_r); |
| 104 | DECLARE_WRITE8_MEMBER(modeDPC_w); |
| 105 | DECLARE_READ8_MEMBER(modeFE_switch_r); |
| 106 | DECLARE_WRITE8_MEMBER(modeFE_switch_w); |
| 107 | DECLARE_READ8_MEMBER(current_bank_r); |
| 108 | DECLARE_READ16_MEMBER(a2600_read_input_port); |
| 109 | DECLARE_READ8_MEMBER(a2600_get_databus_contents); |
| 110 | DECLARE_WRITE16_MEMBER(a2600_tia_vsync_callback); |
| 111 | DECLARE_WRITE16_MEMBER(a2600_tia_vsync_callback_pal); |
| 112 | void modeDPC_check_flag(UINT8 data_fetcher); |
| 113 | void modeDPC_decrement_counter(UINT8 data_fetcher); |
| 76 | 114 | }; |
| 77 | 115 | |
| 78 | 116 | |
| r14963 | r14964 | |
| 644 | 682 | |
| 645 | 683 | |
| 646 | 684 | /* These read handlers will return the byte from the new bank */ |
| 647 | | static READ8_HANDLER(modeF8_switch_r) |
| 685 | READ8_MEMBER(a2600_state::modeF8_switch_r) |
| 648 | 686 | { |
| 649 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 650 | | modeF8_switch(space->machine(), offset, 0); |
| 651 | | return state->m_bank_base[1][0xff8 + offset]; |
| 687 | modeF8_switch(machine(), offset, 0); |
| 688 | return m_bank_base[1][0xff8 + offset]; |
| 652 | 689 | } |
| 653 | 690 | |
| 654 | | static READ8_HANDLER(modeFA_switch_r) |
| 691 | READ8_MEMBER(a2600_state::modeFA_switch_r) |
| 655 | 692 | { |
| 656 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 657 | | modeFA_switch(space->machine(), offset, 0); |
| 658 | | return state->m_bank_base[1][0xff8 + offset]; |
| 693 | modeFA_switch(machine(), offset, 0); |
| 694 | return m_bank_base[1][0xff8 + offset]; |
| 659 | 695 | } |
| 660 | 696 | |
| 661 | | static READ8_HANDLER(modeF6_switch_r) |
| 697 | READ8_MEMBER(a2600_state::modeF6_switch_r) |
| 662 | 698 | { |
| 663 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 664 | | modeF6_switch(space->machine(), offset, 0); |
| 665 | | return state->m_bank_base[1][0xff6 + offset]; |
| 699 | modeF6_switch(machine(), offset, 0); |
| 700 | return m_bank_base[1][0xff6 + offset]; |
| 666 | 701 | } |
| 667 | 702 | |
| 668 | | static READ8_HANDLER(modeF4_switch_r) |
| 703 | READ8_MEMBER(a2600_state::modeF4_switch_r) |
| 669 | 704 | { |
| 670 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 671 | | modeF4_switch(space->machine(), offset, 0); |
| 672 | | return state->m_bank_base[1][0xff4 + offset]; |
| 705 | modeF4_switch(machine(), offset, 0); |
| 706 | return m_bank_base[1][0xff4 + offset]; |
| 673 | 707 | } |
| 674 | 708 | |
| 675 | | static READ8_HANDLER(modeE0_switch_r) |
| 709 | READ8_MEMBER(a2600_state::modeE0_switch_r) |
| 676 | 710 | { |
| 677 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 678 | | modeE0_switch(space->machine(), offset, 0); |
| 679 | | return state->m_bank_base[4][0x3e0 + offset]; |
| 711 | modeE0_switch(machine(), offset, 0); |
| 712 | return m_bank_base[4][0x3e0 + offset]; |
| 680 | 713 | } |
| 681 | 714 | |
| 682 | | static READ8_HANDLER(modeE7_switch_r) |
| 715 | READ8_MEMBER(a2600_state::modeE7_switch_r) |
| 683 | 716 | { |
| 684 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 685 | | modeE7_switch(space->machine(), offset, 0); |
| 686 | | return state->m_bank_base[1][0xfe0 + offset]; |
| 717 | modeE7_switch(machine(), offset, 0); |
| 718 | return m_bank_base[1][0xfe0 + offset]; |
| 687 | 719 | } |
| 688 | 720 | |
| 689 | | static READ8_HANDLER(modeE7_RAM_switch_r) |
| 721 | READ8_MEMBER(a2600_state::modeE7_RAM_switch_r) |
| 690 | 722 | { |
| 691 | | modeE7_RAM_switch(space->machine(), offset, 0); |
| 723 | modeE7_RAM_switch(machine(), offset, 0); |
| 692 | 724 | return 0; |
| 693 | 725 | } |
| 694 | 726 | |
| 695 | | static READ8_HANDLER(modeUA_switch_r) |
| 727 | READ8_MEMBER(a2600_state::modeUA_switch_r) |
| 696 | 728 | { |
| 697 | | modeUA_switch(space->machine(), offset, 0); |
| 729 | modeUA_switch(machine(), offset, 0); |
| 698 | 730 | return 0; |
| 699 | 731 | } |
| 700 | 732 | |
| 701 | | static READ8_HANDLER(modeDC_switch_r) |
| 733 | READ8_MEMBER(a2600_state::modeDC_switch_r) |
| 702 | 734 | { |
| 703 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 704 | | modeDC_switch(space->machine(), offset, 0); |
| 705 | | return state->m_bank_base[1][0xff0 + offset]; |
| 735 | modeDC_switch(machine(), offset, 0); |
| 736 | return m_bank_base[1][0xff0 + offset]; |
| 706 | 737 | } |
| 707 | 738 | |
| 708 | | static READ8_HANDLER(modeFV_switch_r) |
| 739 | READ8_MEMBER(a2600_state::modeFV_switch_r) |
| 709 | 740 | { |
| 710 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 711 | | modeFV_switch(space->machine(), offset, 0); |
| 712 | | return state->m_bank_base[1][0xfd0 + offset]; |
| 741 | modeFV_switch(machine(), offset, 0); |
| 742 | return m_bank_base[1][0xfd0 + offset]; |
| 713 | 743 | } |
| 714 | 744 | |
| 715 | | static READ8_HANDLER(modeJVP_switch_r) |
| 745 | READ8_MEMBER(a2600_state::modeJVP_switch_r) |
| 716 | 746 | { |
| 717 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 718 | | modeJVP_switch(space->machine(), offset, 0); |
| 719 | | return state->m_riot_ram[ 0x20 + offset ]; |
| 747 | modeJVP_switch(machine(), offset, 0); |
| 748 | return m_riot_ram[ 0x20 + offset ]; |
| 720 | 749 | } |
| 721 | 750 | |
| 722 | 751 | |
| 723 | | static WRITE8_HANDLER(modeF8_switch_w) { modeF8_switch(space->machine(), offset, data); } |
| 724 | | static WRITE8_HANDLER(modeFA_switch_w) { modeFA_switch(space->machine(), offset, data); } |
| 725 | | static WRITE8_HANDLER(modeF6_switch_w) { modeF6_switch(space->machine(), offset, data); } |
| 726 | | static WRITE8_HANDLER(modeF4_switch_w) { modeF4_switch(space->machine(), offset, data); } |
| 727 | | static WRITE8_HANDLER(modeE0_switch_w) { modeE0_switch(space->machine(), offset, data); } |
| 728 | | static WRITE8_HANDLER(modeE7_switch_w) { modeE7_switch(space->machine(), offset, data); } |
| 729 | | static WRITE8_HANDLER(modeE7_RAM_switch_w) { modeE7_RAM_switch(space->machine(), offset, data); } |
| 730 | | static WRITE8_HANDLER(mode3F_switch_w) { mode3F_switch(space->machine(), offset, data); } |
| 731 | | static WRITE8_HANDLER(modeUA_switch_w) { modeUA_switch(space->machine(), offset, data); } |
| 732 | | static WRITE8_HANDLER(modeDC_switch_w) { modeDC_switch(space->machine(), offset, data); } |
| 733 | | static WRITE8_HANDLER(mode3E_switch_w) { mode3E_switch(space->machine(), offset, data); } |
| 734 | | static WRITE8_HANDLER(mode3E_RAM_switch_w) { mode3E_RAM_switch(space->machine(), offset, data); } |
| 735 | | static WRITE8_HANDLER(mode3E_RAM_w) |
| 752 | WRITE8_MEMBER(a2600_state::modeF8_switch_w){ modeF8_switch(machine(), offset, data); } |
| 753 | WRITE8_MEMBER(a2600_state::modeFA_switch_w){ modeFA_switch(machine(), offset, data); } |
| 754 | WRITE8_MEMBER(a2600_state::modeF6_switch_w){ modeF6_switch(machine(), offset, data); } |
| 755 | WRITE8_MEMBER(a2600_state::modeF4_switch_w){ modeF4_switch(machine(), offset, data); } |
| 756 | WRITE8_MEMBER(a2600_state::modeE0_switch_w){ modeE0_switch(machine(), offset, data); } |
| 757 | WRITE8_MEMBER(a2600_state::modeE7_switch_w){ modeE7_switch(machine(), offset, data); } |
| 758 | WRITE8_MEMBER(a2600_state::modeE7_RAM_switch_w){ modeE7_RAM_switch(machine(), offset, data); } |
| 759 | WRITE8_MEMBER(a2600_state::mode3F_switch_w){ mode3F_switch(machine(), offset, data); } |
| 760 | WRITE8_MEMBER(a2600_state::modeUA_switch_w){ modeUA_switch(machine(), offset, data); } |
| 761 | WRITE8_MEMBER(a2600_state::modeDC_switch_w){ modeDC_switch(machine(), offset, data); } |
| 762 | WRITE8_MEMBER(a2600_state::mode3E_switch_w){ mode3E_switch(machine(), offset, data); } |
| 763 | WRITE8_MEMBER(a2600_state::mode3E_RAM_switch_w){ mode3E_RAM_switch(machine(), offset, data); } |
| 764 | WRITE8_MEMBER(a2600_state::mode3E_RAM_w) |
| 736 | 765 | { |
| 737 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 738 | | if ( state->m_mode3E_ram_enabled ) |
| 766 | if ( m_mode3E_ram_enabled ) |
| 739 | 767 | { |
| 740 | | state->m_ram_base[offset] = data; |
| 768 | m_ram_base[offset] = data; |
| 741 | 769 | } |
| 742 | 770 | } |
| 743 | | static WRITE8_HANDLER(modeFV_switch_w) { modeFV_switch(space->machine(), offset, data); } |
| 744 | | static WRITE8_HANDLER(modeJVP_switch_w) |
| 771 | WRITE8_MEMBER(a2600_state::modeFV_switch_w){ modeFV_switch(machine(), offset, data); } |
| 772 | WRITE8_MEMBER(a2600_state::modeJVP_switch_w) |
| 745 | 773 | { |
| 746 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 747 | | modeJVP_switch(space->machine(), offset, data); state->m_riot_ram[ 0x20 + offset ] = data; |
| 774 | modeJVP_switch(machine(), offset, data); m_riot_ram[ 0x20 + offset ] = data; |
| 748 | 775 | } |
| 749 | 776 | |
| 750 | 777 | |
| r14963 | r14964 | |
| 752 | 779 | { |
| 753 | 780 | if ( ( address & 0x1FFF ) >= 0x1FF6 && ( address & 0x1FFF ) <= 0x1FF9 ) |
| 754 | 781 | { |
| 755 | | modeF6_switch_w( machine().device("maincpu")->memory().space(AS_PROGRAM), ( address & 0x1FFF ) - 0x1FF6, 0 ); |
| 782 | modeF6_switch_w(*machine().device("maincpu")->memory().space(AS_PROGRAM), ( address & 0x1FFF ) - 0x1FF6, 0 ); |
| 756 | 783 | } |
| 757 | 784 | return address; |
| 758 | 785 | } |
| r14963 | r14964 | |
| 774 | 801 | return address; |
| 775 | 802 | } |
| 776 | 803 | |
| 777 | | static READ8_HANDLER(modeSS_r) |
| 804 | READ8_MEMBER(a2600_state::modeSS_r) |
| 778 | 805 | { |
| 779 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 780 | | UINT8 data = ( offset & 0x800 ) ? state->m_bank_base[2][offset & 0x7FF] : state->m_bank_base[1][offset]; |
| 806 | UINT8 data = ( offset & 0x800 ) ? m_bank_base[2][offset & 0x7FF] : m_bank_base[1][offset]; |
| 781 | 807 | |
| 782 | | //logerror("%04X: read from modeSS area offset = %04X\n", cpu_get_pc(space->machine().device("maincpu")), offset); |
| 808 | //logerror("%04X: read from modeSS area offset = %04X\n", cpu_get_pc(machine().device("maincpu")), offset); |
| 783 | 809 | /* Check for control register "write" */ |
| 784 | 810 | if ( offset == 0xFF8 ) |
| 785 | 811 | { |
| 786 | | //logerror("%04X: write to modeSS control register data = %02X\n", cpu_get_pc(space->machine().device("maincpu")), state->m_modeSS_byte); |
| 787 | | state->m_modeSS_write_enabled = state->m_modeSS_byte & 0x02; |
| 788 | | state->m_modeSS_write_delay = state->m_modeSS_byte >> 5; |
| 789 | | switch ( state->m_modeSS_byte & 0x1C ) |
| 812 | //logerror("%04X: write to modeSS control register data = %02X\n", cpu_get_pc(machine().device("maincpu")), m_modeSS_byte); |
| 813 | m_modeSS_write_enabled = m_modeSS_byte & 0x02; |
| 814 | m_modeSS_write_delay = m_modeSS_byte >> 5; |
| 815 | switch ( m_modeSS_byte & 0x1C ) |
| 790 | 816 | { |
| 791 | 817 | case 0x00: |
| 792 | | state->m_bank_base[1] = state->m_extra_RAM->base() + 2 * 0x800; |
| 793 | | state->m_bank_base[2] = ( state->m_modeSS_byte & 0x01 ) ? space->machine().region("maincpu")->base() + 0x1800 : space->machine().region("user1")->base(); |
| 794 | | state->m_modeSS_high_ram_enabled = 0; |
| 818 | m_bank_base[1] = m_extra_RAM->base() + 2 * 0x800; |
| 819 | m_bank_base[2] = ( m_modeSS_byte & 0x01 ) ? machine().region("maincpu")->base() + 0x1800 : machine().region("user1")->base(); |
| 820 | m_modeSS_high_ram_enabled = 0; |
| 795 | 821 | break; |
| 796 | 822 | case 0x04: |
| 797 | | state->m_bank_base[1] = state->m_extra_RAM->base(); |
| 798 | | state->m_bank_base[2] = ( state->m_modeSS_byte & 0x01 ) ? space->machine().region("maincpu")->base() + 0x1800 : space->machine().region("user1")->base(); |
| 799 | | state->m_modeSS_high_ram_enabled = 0; |
| 823 | m_bank_base[1] = m_extra_RAM->base(); |
| 824 | m_bank_base[2] = ( m_modeSS_byte & 0x01 ) ? machine().region("maincpu")->base() + 0x1800 : machine().region("user1")->base(); |
| 825 | m_modeSS_high_ram_enabled = 0; |
| 800 | 826 | break; |
| 801 | 827 | case 0x08: |
| 802 | | state->m_bank_base[1] = state->m_extra_RAM->base() + 2 * 0x800; |
| 803 | | state->m_bank_base[2] = state->m_extra_RAM->base(); |
| 804 | | state->m_modeSS_high_ram_enabled = 1; |
| 828 | m_bank_base[1] = m_extra_RAM->base() + 2 * 0x800; |
| 829 | m_bank_base[2] = m_extra_RAM->base(); |
| 830 | m_modeSS_high_ram_enabled = 1; |
| 805 | 831 | break; |
| 806 | 832 | case 0x0C: |
| 807 | | state->m_bank_base[1] = state->m_extra_RAM->base(); |
| 808 | | state->m_bank_base[2] = state->m_extra_RAM->base() + 2 * 0x800; |
| 809 | | state->m_modeSS_high_ram_enabled = 1; |
| 833 | m_bank_base[1] = m_extra_RAM->base(); |
| 834 | m_bank_base[2] = m_extra_RAM->base() + 2 * 0x800; |
| 835 | m_modeSS_high_ram_enabled = 1; |
| 810 | 836 | break; |
| 811 | 837 | case 0x10: |
| 812 | | state->m_bank_base[1] = state->m_extra_RAM->base() + 2 * 0x800; |
| 813 | | state->m_bank_base[2] = ( state->m_modeSS_byte & 0x01 ) ? space->machine().region("maincpu")->base() + 0x1800 : space->machine().region("user1")->base(); |
| 814 | | state->m_modeSS_high_ram_enabled = 0; |
| 838 | m_bank_base[1] = m_extra_RAM->base() + 2 * 0x800; |
| 839 | m_bank_base[2] = ( m_modeSS_byte & 0x01 ) ? machine().region("maincpu")->base() + 0x1800 : machine().region("user1")->base(); |
| 840 | m_modeSS_high_ram_enabled = 0; |
| 815 | 841 | break; |
| 816 | 842 | case 0x14: |
| 817 | | state->m_bank_base[1] = state->m_extra_RAM->base() + 0x800; |
| 818 | | state->m_bank_base[2] = ( state->m_modeSS_byte & 0x01 ) ? space->machine().region("maincpu")->base() + 0x1800 : space->machine().region("user1")->base(); |
| 819 | | state->m_modeSS_high_ram_enabled = 0; |
| 843 | m_bank_base[1] = m_extra_RAM->base() + 0x800; |
| 844 | m_bank_base[2] = ( m_modeSS_byte & 0x01 ) ? machine().region("maincpu")->base() + 0x1800 : machine().region("user1")->base(); |
| 845 | m_modeSS_high_ram_enabled = 0; |
| 820 | 846 | break; |
| 821 | 847 | case 0x18: |
| 822 | | state->m_bank_base[1] = state->m_extra_RAM->base() + 2 * 0x800; |
| 823 | | state->m_bank_base[2] = state->m_extra_RAM->base() + 0x800; |
| 824 | | state->m_modeSS_high_ram_enabled = 1; |
| 848 | m_bank_base[1] = m_extra_RAM->base() + 2 * 0x800; |
| 849 | m_bank_base[2] = m_extra_RAM->base() + 0x800; |
| 850 | m_modeSS_high_ram_enabled = 1; |
| 825 | 851 | break; |
| 826 | 852 | case 0x1C: |
| 827 | | state->m_bank_base[1] = state->m_extra_RAM->base() + 0x800; |
| 828 | | state->m_bank_base[2] = state->m_extra_RAM->base() + 2 * 0x800; |
| 829 | | state->m_modeSS_high_ram_enabled = 1; |
| 853 | m_bank_base[1] = m_extra_RAM->base() + 0x800; |
| 854 | m_bank_base[2] = m_extra_RAM->base() + 2 * 0x800; |
| 855 | m_modeSS_high_ram_enabled = 1; |
| 830 | 856 | break; |
| 831 | 857 | } |
| 832 | | memory_set_bankptr(space->machine(), "bank1", state->m_bank_base[1] ); |
| 833 | | memory_set_bankptr(space->machine(), "bank2", state->m_bank_base[2] ); |
| 858 | memory_set_bankptr(machine(), "bank1", m_bank_base[1] ); |
| 859 | memory_set_bankptr(machine(), "bank2", m_bank_base[2] ); |
| 834 | 860 | } |
| 835 | 861 | else if ( offset == 0xFF9 ) |
| 836 | 862 | { |
| 837 | 863 | /* Cassette port read */ |
| 838 | | double tap_val = space->machine().device<cassette_image_device>(CASSETTE_TAG)->input(); |
| 839 | | //logerror("%04X: Cassette port read, tap_val = %f\n", cpu_get_pc(space->machine().device("maincpu")), tap_val); |
| 864 | double tap_val = machine().device<cassette_image_device>(CASSETTE_TAG)->input(); |
| 865 | //logerror("%04X: Cassette port read, tap_val = %f\n", cpu_get_pc(machine().device("maincpu")), tap_val); |
| 840 | 866 | if ( tap_val < 0 ) |
| 841 | 867 | { |
| 842 | 868 | data = 0x00; |
| r14963 | r14964 | |
| 849 | 875 | else |
| 850 | 876 | { |
| 851 | 877 | /* Possible RAM write */ |
| 852 | | if ( state->m_modeSS_write_enabled ) |
| 878 | if ( m_modeSS_write_enabled ) |
| 853 | 879 | { |
| 854 | | int diff = space->machine().device<cpu_device>("maincpu")->total_cycles() - state->m_modeSS_byte_started; |
| 855 | | //logerror("%04X: offset = %04X, %d\n", cpu_get_pc(space->machine().device("maincpu")), offset, diff); |
| 856 | | if ( diff - state->m_modeSS_diff_adjust == 5 ) |
| 880 | int diff = machine().device<cpu_device>("maincpu")->total_cycles() - m_modeSS_byte_started; |
| 881 | //logerror("%04X: offset = %04X, %d\n", cpu_get_pc(machine().device("maincpu")), offset, diff); |
| 882 | if ( diff - m_modeSS_diff_adjust == 5 ) |
| 857 | 883 | { |
| 858 | | //logerror("%04X: RAM write offset = %04X, data = %02X\n", cpu_get_pc(space->machine().device("maincpu")), offset, state->m_modeSS_byte ); |
| 884 | //logerror("%04X: RAM write offset = %04X, data = %02X\n", cpu_get_pc(machine().device("maincpu")), offset, m_modeSS_byte ); |
| 859 | 885 | if ( offset & 0x800 ) |
| 860 | 886 | { |
| 861 | | if ( state->m_modeSS_high_ram_enabled ) |
| 887 | if ( m_modeSS_high_ram_enabled ) |
| 862 | 888 | { |
| 863 | | state->m_bank_base[2][offset & 0x7FF] = state->m_modeSS_byte; |
| 864 | | data = state->m_modeSS_byte; |
| 889 | m_bank_base[2][offset & 0x7FF] = m_modeSS_byte; |
| 890 | data = m_modeSS_byte; |
| 865 | 891 | } |
| 866 | 892 | } |
| 867 | 893 | else |
| 868 | 894 | { |
| 869 | | state->m_bank_base[1][offset] = state->m_modeSS_byte; |
| 870 | | data = state->m_modeSS_byte; |
| 895 | m_bank_base[1][offset] = m_modeSS_byte; |
| 896 | data = m_modeSS_byte; |
| 871 | 897 | } |
| 872 | 898 | } |
| 873 | 899 | else if ( offset < 0x0100 ) |
| 874 | 900 | { |
| 875 | | state->m_modeSS_byte = offset; |
| 876 | | state->m_modeSS_byte_started = space->machine().device<cpu_device>("maincpu")->total_cycles(); |
| 901 | m_modeSS_byte = offset; |
| 902 | m_modeSS_byte_started = machine().device<cpu_device>("maincpu")->total_cycles(); |
| 877 | 903 | } |
| 878 | 904 | /* Check for dummy read from same address */ |
| 879 | 905 | if ( diff == 2 ) |
| 880 | 906 | { |
| 881 | | state->m_modeSS_diff_adjust = 1; |
| 907 | m_modeSS_diff_adjust = 1; |
| 882 | 908 | } |
| 883 | 909 | else |
| 884 | 910 | { |
| 885 | | state->m_modeSS_diff_adjust = 0; |
| 911 | m_modeSS_diff_adjust = 0; |
| 886 | 912 | } |
| 887 | 913 | } |
| 888 | 914 | else if ( offset < 0x0100 ) |
| 889 | 915 | { |
| 890 | | state->m_modeSS_byte = offset; |
| 891 | | state->m_modeSS_byte_started = space->machine().device<cpu_device>("maincpu")->total_cycles(); |
| 916 | m_modeSS_byte = offset; |
| 917 | m_modeSS_byte_started = machine().device<cpu_device>("maincpu")->total_cycles(); |
| 892 | 918 | } |
| 893 | 919 | } |
| 894 | 920 | /* Because the mame core caches opcode data and doesn't perform reads like normal */ |
| 895 | 921 | /* we have to put in this little hack here to get Suicide Mission to work. */ |
| 896 | | if ( offset != 0xFF8 && ( cpu_get_pc(space->machine().device("maincpu")) & 0x1FFF ) == 0x1FF8 ) |
| 922 | if ( offset != 0xFF8 && ( cpu_get_pc(machine().device("maincpu")) & 0x1FFF ) == 0x1FF8 ) |
| 897 | 923 | { |
| 898 | 924 | modeSS_r( space, 0xFF8 ); |
| 899 | 925 | } |
| 900 | 926 | return data; |
| 901 | 927 | } |
| 902 | 928 | |
| 903 | | INLINE void modeDPC_check_flag(a2600_state *state, UINT8 data_fetcher) |
| 929 | void a2600_state::modeDPC_check_flag(UINT8 data_fetcher) |
| 904 | 930 | { |
| 905 | 931 | /* Set flag when low counter equals top */ |
| 906 | | if ( state->m_dpc.df[data_fetcher].low == state->m_dpc.df[data_fetcher].top ) |
| 932 | if ( m_dpc.df[data_fetcher].low == m_dpc.df[data_fetcher].top ) |
| 907 | 933 | { |
| 908 | | state->m_dpc.df[data_fetcher].flag = 1; |
| 934 | m_dpc.df[data_fetcher].flag = 1; |
| 909 | 935 | } |
| 910 | 936 | /* Reset flag when low counter equals bottom */ |
| 911 | | if ( state->m_dpc.df[data_fetcher].low == state->m_dpc.df[data_fetcher].bottom ) |
| 937 | if ( m_dpc.df[data_fetcher].low == m_dpc.df[data_fetcher].bottom ) |
| 912 | 938 | { |
| 913 | | state->m_dpc.df[data_fetcher].flag = 0; |
| 939 | m_dpc.df[data_fetcher].flag = 0; |
| 914 | 940 | } |
| 915 | 941 | } |
| 916 | 942 | |
| 917 | | INLINE void modeDPC_decrement_counter(a2600_state *state, UINT8 data_fetcher) |
| 943 | void a2600_state::modeDPC_decrement_counter(UINT8 data_fetcher) |
| 918 | 944 | { |
| 919 | | state->m_dpc.df[data_fetcher].low -= 1; |
| 920 | | if ( state->m_dpc.df[data_fetcher].low == 0xFF ) |
| 945 | m_dpc.df[data_fetcher].low -= 1; |
| 946 | if ( m_dpc.df[data_fetcher].low == 0xFF ) |
| 921 | 947 | { |
| 922 | | state->m_dpc.df[data_fetcher].high -= 1; |
| 923 | | if ( data_fetcher > 4 && state->m_dpc.df[data_fetcher].music_mode ) |
| 948 | m_dpc.df[data_fetcher].high -= 1; |
| 949 | if ( data_fetcher > 4 && m_dpc.df[data_fetcher].music_mode ) |
| 924 | 950 | { |
| 925 | | state->m_dpc.df[data_fetcher].low = state->m_dpc.df[data_fetcher].top; |
| 951 | m_dpc.df[data_fetcher].low = m_dpc.df[data_fetcher].top; |
| 926 | 952 | } |
| 927 | 953 | } |
| 928 | 954 | |
| 929 | | modeDPC_check_flag( state, data_fetcher ); |
| 955 | modeDPC_check_flag(data_fetcher ); |
| 930 | 956 | } |
| 931 | 957 | |
| 932 | 958 | static TIMER_CALLBACK(modeDPC_timer_callback) |
| r14963 | r14964 | |
| 937 | 963 | { |
| 938 | 964 | if ( state->m_dpc.df[data_fetcher].osc_clk ) |
| 939 | 965 | { |
| 940 | | modeDPC_decrement_counter( state, data_fetcher ); |
| 966 | state->modeDPC_decrement_counter(data_fetcher ); |
| 941 | 967 | } |
| 942 | 968 | } |
| 943 | 969 | } |
| r14963 | r14964 | |
| 952 | 978 | return address; |
| 953 | 979 | } |
| 954 | 980 | |
| 955 | | static READ8_HANDLER(modeDPC_r) |
| 981 | READ8_MEMBER(a2600_state::modeDPC_r) |
| 956 | 982 | { |
| 957 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 958 | 983 | static const UINT8 dpc_amplitude[8] = { 0x00, 0x04, 0x05, 0x09, 0x06, 0x0A, 0x0B, 0x0F }; |
| 959 | 984 | UINT8 data_fetcher = offset & 0x07; |
| 960 | 985 | UINT8 data = 0xFF; |
| 961 | 986 | |
| 962 | | logerror("%04X: Read from DPC offset $%02X\n", cpu_get_pc(space->machine().device("maincpu")), offset); |
| 987 | logerror("%04X: Read from DPC offset $%02X\n", cpu_get_pc(machine().device("maincpu")), offset); |
| 963 | 988 | if ( offset < 0x08 ) |
| 964 | 989 | { |
| 965 | 990 | switch( offset & 0x06 ) |
| 966 | 991 | { |
| 967 | 992 | case 0x00: /* Random number generator */ |
| 968 | 993 | case 0x02: |
| 969 | | return state->m_dpc.shift_reg; |
| 994 | return m_dpc.shift_reg; |
| 970 | 995 | case 0x04: /* Sound value, MOVAMT value AND'd with Draw Line Carry; with Draw Line Add */ |
| 971 | | state->m_dpc.latch_62 = state->m_dpc.latch_64; |
| 996 | m_dpc.latch_62 = m_dpc.latch_64; |
| 972 | 997 | case 0x06: /* Sound value, MOVAMT value AND'd with Draw Line Carry; without Draw Line Add */ |
| 973 | | state->m_dpc.latch_64 = state->m_dpc.latch_62 + state->m_dpc.df[4].top; |
| 974 | | state->m_dpc.dlc = ( state->m_dpc.latch_62 + state->m_dpc.df[4].top > 0xFF ) ? 1 : 0; |
| 998 | m_dpc.latch_64 = m_dpc.latch_62 + m_dpc.df[4].top; |
| 999 | m_dpc.dlc = ( m_dpc.latch_62 + m_dpc.df[4].top > 0xFF ) ? 1 : 0; |
| 975 | 1000 | data = 0; |
| 976 | | if ( state->m_dpc.df[5].music_mode && state->m_dpc.df[5].flag ) |
| 1001 | if ( m_dpc.df[5].music_mode && m_dpc.df[5].flag ) |
| 977 | 1002 | { |
| 978 | 1003 | data |= 0x01; |
| 979 | 1004 | } |
| 980 | | if ( state->m_dpc.df[6].music_mode && state->m_dpc.df[6].flag ) |
| 1005 | if ( m_dpc.df[6].music_mode && m_dpc.df[6].flag ) |
| 981 | 1006 | { |
| 982 | 1007 | data |= 0x02; |
| 983 | 1008 | } |
| 984 | | if ( state->m_dpc.df[7].music_mode && state->m_dpc.df[7].flag ) |
| 1009 | if ( m_dpc.df[7].music_mode && m_dpc.df[7].flag ) |
| 985 | 1010 | { |
| 986 | 1011 | data |= 0x04; |
| 987 | 1012 | } |
| 988 | | return ( state->m_dpc.dlc ? state->m_dpc.movamt & 0xF0 : 0 ) | dpc_amplitude[data]; |
| 1013 | return ( m_dpc.dlc ? m_dpc.movamt & 0xF0 : 0 ) | dpc_amplitude[data]; |
| 989 | 1014 | } |
| 990 | 1015 | } |
| 991 | 1016 | else |
| 992 | 1017 | { |
| 993 | | UINT8 display_data = space->machine().region("user1")->base()[0x2000 + ( ~ ( ( state->m_dpc.df[data_fetcher].low | ( state->m_dpc.df[data_fetcher].high << 8 ) ) ) & 0x7FF ) ]; |
| 1018 | UINT8 display_data = machine().region("user1")->base()[0x2000 + ( ~ ( ( m_dpc.df[data_fetcher].low | ( m_dpc.df[data_fetcher].high << 8 ) ) ) & 0x7FF ) ]; |
| 994 | 1019 | |
| 995 | 1020 | switch( offset & 0x38 ) |
| 996 | 1021 | { |
| r14963 | r14964 | |
| 998 | 1023 | data = display_data; |
| 999 | 1024 | break; |
| 1000 | 1025 | case 0x10: /* display data AND'd w/flag */ |
| 1001 | | data = state->m_dpc.df[data_fetcher].flag ? display_data : 0x00; |
| 1026 | data = m_dpc.df[data_fetcher].flag ? display_data : 0x00; |
| 1002 | 1027 | break; |
| 1003 | 1028 | case 0x18: /* display data AND'd w/flag, nibbles swapped */ |
| 1004 | | data = state->m_dpc.df[data_fetcher].flag ? BITSWAP8(display_data,3,2,1,0,7,6,5,4) : 0x00; |
| 1029 | data = m_dpc.df[data_fetcher].flag ? BITSWAP8(display_data,3,2,1,0,7,6,5,4) : 0x00; |
| 1005 | 1030 | break; |
| 1006 | 1031 | case 0x20: /* display data AND'd w/flag, byte reversed */ |
| 1007 | | data = state->m_dpc.df[data_fetcher].flag ? BITSWAP8(display_data,0,1,2,3,4,5,6,7) : 0x00; |
| 1032 | data = m_dpc.df[data_fetcher].flag ? BITSWAP8(display_data,0,1,2,3,4,5,6,7) : 0x00; |
| 1008 | 1033 | break; |
| 1009 | 1034 | case 0x28: /* display data AND'd w/flag, rotated right */ |
| 1010 | | data = state->m_dpc.df[data_fetcher].flag ? ( display_data >> 1 ) : 0x00; |
| 1035 | data = m_dpc.df[data_fetcher].flag ? ( display_data >> 1 ) : 0x00; |
| 1011 | 1036 | break; |
| 1012 | 1037 | case 0x30: /* display data AND'd w/flag, rotated left */ |
| 1013 | | data = state->m_dpc.df[data_fetcher].flag ? ( display_data << 1 ) : 0x00; |
| 1038 | data = m_dpc.df[data_fetcher].flag ? ( display_data << 1 ) : 0x00; |
| 1014 | 1039 | break; |
| 1015 | 1040 | case 0x38: /* flag */ |
| 1016 | | data = state->m_dpc.df[data_fetcher].flag ? 0xFF : 0x00; |
| 1041 | data = m_dpc.df[data_fetcher].flag ? 0xFF : 0x00; |
| 1017 | 1042 | break; |
| 1018 | 1043 | } |
| 1019 | 1044 | |
| 1020 | | if ( data_fetcher < 5 || ! state->m_dpc.df[data_fetcher].osc_clk ) |
| 1045 | if ( data_fetcher < 5 || ! m_dpc.df[data_fetcher].osc_clk ) |
| 1021 | 1046 | { |
| 1022 | | modeDPC_decrement_counter( state, data_fetcher ); |
| 1047 | modeDPC_decrement_counter(data_fetcher ); |
| 1023 | 1048 | } |
| 1024 | 1049 | } |
| 1025 | 1050 | return data; |
| 1026 | 1051 | } |
| 1027 | 1052 | |
| 1028 | | static WRITE8_HANDLER(modeDPC_w) |
| 1053 | WRITE8_MEMBER(a2600_state::modeDPC_w) |
| 1029 | 1054 | { |
| 1030 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 1031 | 1055 | UINT8 data_fetcher = offset & 0x07; |
| 1032 | 1056 | |
| 1033 | 1057 | switch( offset & 0x38 ) |
| 1034 | 1058 | { |
| 1035 | 1059 | case 0x00: /* Top count */ |
| 1036 | | state->m_dpc.df[data_fetcher].top = data; |
| 1037 | | state->m_dpc.df[data_fetcher].flag = 0; |
| 1038 | | modeDPC_check_flag( state, data_fetcher ); |
| 1060 | m_dpc.df[data_fetcher].top = data; |
| 1061 | m_dpc.df[data_fetcher].flag = 0; |
| 1062 | modeDPC_check_flag(data_fetcher ); |
| 1039 | 1063 | break; |
| 1040 | 1064 | case 0x08: /* Bottom count */ |
| 1041 | | state->m_dpc.df[data_fetcher].bottom = data; |
| 1042 | | modeDPC_check_flag( state, data_fetcher ); |
| 1065 | m_dpc.df[data_fetcher].bottom = data; |
| 1066 | modeDPC_check_flag(data_fetcher ); |
| 1043 | 1067 | break; |
| 1044 | 1068 | case 0x10: /* Counter low */ |
| 1045 | | state->m_dpc.df[data_fetcher].low = data; |
| 1069 | m_dpc.df[data_fetcher].low = data; |
| 1046 | 1070 | if ( data_fetcher == 4 ) |
| 1047 | 1071 | { |
| 1048 | | state->m_dpc.latch_64 = data; |
| 1072 | m_dpc.latch_64 = data; |
| 1049 | 1073 | } |
| 1050 | | if ( data_fetcher > 4 && state->m_dpc.df[data_fetcher].music_mode ) |
| 1074 | if ( data_fetcher > 4 && m_dpc.df[data_fetcher].music_mode ) |
| 1051 | 1075 | { |
| 1052 | | state->m_dpc.df[data_fetcher].low = state->m_dpc.df[data_fetcher].top; |
| 1076 | m_dpc.df[data_fetcher].low = m_dpc.df[data_fetcher].top; |
| 1053 | 1077 | } |
| 1054 | | modeDPC_check_flag( state, data_fetcher ); |
| 1078 | modeDPC_check_flag(data_fetcher ); |
| 1055 | 1079 | break; |
| 1056 | 1080 | case 0x18: /* Counter high */ |
| 1057 | | state->m_dpc.df[data_fetcher].high = data; |
| 1058 | | state->m_dpc.df[data_fetcher].music_mode = data & 0x10; |
| 1059 | | state->m_dpc.df[data_fetcher].osc_clk = data & 0x20; |
| 1060 | | if ( data_fetcher > 4 && state->m_dpc.df[data_fetcher].music_mode && state->m_dpc.df[data_fetcher].low == 0xFF ) |
| 1081 | m_dpc.df[data_fetcher].high = data; |
| 1082 | m_dpc.df[data_fetcher].music_mode = data & 0x10; |
| 1083 | m_dpc.df[data_fetcher].osc_clk = data & 0x20; |
| 1084 | if ( data_fetcher > 4 && m_dpc.df[data_fetcher].music_mode && m_dpc.df[data_fetcher].low == 0xFF ) |
| 1061 | 1085 | { |
| 1062 | | state->m_dpc.df[data_fetcher].low = state->m_dpc.df[data_fetcher].top; |
| 1063 | | modeDPC_check_flag( state, data_fetcher ); |
| 1086 | m_dpc.df[data_fetcher].low = m_dpc.df[data_fetcher].top; |
| 1087 | modeDPC_check_flag(data_fetcher ); |
| 1064 | 1088 | } |
| 1065 | 1089 | break; |
| 1066 | 1090 | case 0x20: /* Draw line movement value / MOVAMT */ |
| 1067 | | state->m_dpc.movamt = data; |
| 1091 | m_dpc.movamt = data; |
| 1068 | 1092 | break; |
| 1069 | 1093 | case 0x28: /* Not used */ |
| 1070 | | logerror("%04X: Write to unused DPC register $%02X, data $%02X\n", cpu_get_pc(space->machine().device("maincpu")), offset, data); |
| 1094 | logerror("%04X: Write to unused DPC register $%02X, data $%02X\n", cpu_get_pc(machine().device("maincpu")), offset, data); |
| 1071 | 1095 | break; |
| 1072 | 1096 | case 0x30: /* Random number generator reset */ |
| 1073 | | state->m_dpc.shift_reg = 0; |
| 1097 | m_dpc.shift_reg = 0; |
| 1074 | 1098 | break; |
| 1075 | 1099 | case 0x38: /* Not used */ |
| 1076 | | logerror("%04X: Write to unused DPC register $%02X, data $%02X\n", cpu_get_pc(space->machine().device("maincpu")), offset, data); |
| 1100 | logerror("%04X: Write to unused DPC register $%02X, data $%02X\n", cpu_get_pc(machine().device("maincpu")), offset, data); |
| 1077 | 1101 | break; |
| 1078 | 1102 | } |
| 1079 | 1103 | } |
| r14963 | r14964 | |
| 1122 | 1146 | state->m_FE_old_opbase_handler = space->set_direct_update_handler(direct_update_delegate(FUNC(a2600_state::modeFE_opbase_handler), state)); |
| 1123 | 1147 | } |
| 1124 | 1148 | |
| 1125 | | static READ8_HANDLER(modeFE_switch_r) |
| 1149 | READ8_MEMBER(a2600_state::modeFE_switch_r) |
| 1126 | 1150 | { |
| 1127 | | modeFE_switch(space->machine(),offset, 0 ); |
| 1128 | | return space->read_byte(0xFE ); |
| 1151 | modeFE_switch(machine(),offset, 0 ); |
| 1152 | return space.read_byte(0xFE ); |
| 1129 | 1153 | } |
| 1130 | 1154 | |
| 1131 | | static WRITE8_HANDLER(modeFE_switch_w) |
| 1155 | WRITE8_MEMBER(a2600_state::modeFE_switch_w) |
| 1132 | 1156 | { |
| 1133 | | space->write_byte(0xFE, data ); |
| 1134 | | modeFE_switch(space->machine(),offset, 0 ); |
| 1157 | space.write_byte(0xFE, data ); |
| 1158 | modeFE_switch(machine(),offset, 0 ); |
| 1135 | 1159 | } |
| 1136 | 1160 | |
| 1137 | | static READ8_HANDLER(current_bank_r) |
| 1161 | READ8_MEMBER(a2600_state::current_bank_r) |
| 1138 | 1162 | { |
| 1139 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 1140 | | return state->m_current_bank; |
| 1163 | return m_current_bank; |
| 1141 | 1164 | } |
| 1142 | 1165 | |
| 1143 | 1166 | static ADDRESS_MAP_START(a2600_mem, AS_PROGRAM, 8, a2600_state ) |
| 1144 | 1167 | ADDRESS_MAP_GLOBAL_MASK(0x1fff) |
| 1145 | | AM_RANGE(0x0000, 0x007F) AM_MIRROR(0x0F00) AM_READWRITE_LEGACY(tia_r, tia_w) |
| 1168 | AM_RANGE(0x0000, 0x007F) AM_MIRROR(0x0F00) AM_DEVREADWRITE("tia_video", tia_video_device, read, write) |
| 1146 | 1169 | AM_RANGE(0x0080, 0x00FF) AM_MIRROR(0x0D00) AM_RAM AM_SHARE("riot_ram") |
| 1147 | 1170 | AM_RANGE(0x0280, 0x029F) AM_MIRROR(0x0D00) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w) |
| 1148 | 1171 | AM_RANGE(0x1000, 0x1FFF) AM_ROMBANK("bank1") |
| r14963 | r14964 | |
| 1272 | 1295 | } |
| 1273 | 1296 | } |
| 1274 | 1297 | |
| 1275 | | static READ16_HANDLER(a2600_read_input_port) |
| 1298 | READ16_MEMBER(a2600_state::a2600_read_input_port) |
| 1276 | 1299 | { |
| 1277 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 1278 | 1300 | int i; |
| 1279 | 1301 | |
| 1280 | 1302 | switch( offset ) |
| 1281 | 1303 | { |
| 1282 | 1304 | case 0: /* Left controller port PIN 5 */ |
| 1283 | | switch ( input_port_read(space->machine(), "CONTROLLERS") / CATEGORY_SELECT ) |
| 1305 | switch ( input_port_read(machine(), "CONTROLLERS") / CATEGORY_SELECT ) |
| 1284 | 1306 | { |
| 1285 | 1307 | case 0x00: /* Joystick */ |
| 1286 | 1308 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1287 | 1309 | case 0x01: /* Paddle */ |
| 1288 | | return input_port_read(space->machine(), "PADDLE1"); |
| 1310 | return input_port_read(machine(), "PADDLE1"); |
| 1289 | 1311 | case 0x03: /* Keypad */ |
| 1290 | 1312 | for ( i = 0; i < 4; i++ ) |
| 1291 | 1313 | { |
| 1292 | | if ( ! ( ( state->m_keypad_left_column >> i ) & 0x01 ) ) |
| 1314 | if ( ! ( ( m_keypad_left_column >> i ) & 0x01 ) ) |
| 1293 | 1315 | { |
| 1294 | | if ( ( input_port_read(space->machine(), "KEYPAD_L") >> 3*i ) & 0x01 ) |
| 1316 | if ( ( input_port_read(machine(), "KEYPAD_L") >> 3*i ) & 0x01 ) |
| 1295 | 1317 | { |
| 1296 | 1318 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1297 | 1319 | } |
| r14963 | r14964 | |
| 1303 | 1325 | } |
| 1304 | 1326 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1305 | 1327 | case 0x05: /* Boostergrip joystick */ |
| 1306 | | return ( input_port_read(space->machine(), "BUTTONS_L") & 0x40 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON; |
| 1328 | return ( input_port_read(machine(), "BUTTONS_L") & 0x40 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON; |
| 1307 | 1329 | default: |
| 1308 | 1330 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1309 | 1331 | } |
| 1310 | 1332 | break; |
| 1311 | 1333 | case 1: /* Right controller port PIN 5 */ |
| 1312 | | switch ( input_port_read(space->machine(), "CONTROLLERS") / CATEGORY_SELECT ) |
| 1334 | switch ( input_port_read(machine(), "CONTROLLERS") / CATEGORY_SELECT ) |
| 1313 | 1335 | { |
| 1314 | 1336 | case 0x00: /* Joystick */ |
| 1315 | 1337 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1316 | 1338 | case 0x01: /* Paddle */ |
| 1317 | | return input_port_read(space->machine(), "PADDLE3"); |
| 1339 | return input_port_read(machine(), "PADDLE3"); |
| 1318 | 1340 | case 0x03: /* Keypad */ |
| 1319 | 1341 | for ( i = 0; i < 4; i++ ) |
| 1320 | 1342 | { |
| 1321 | | if ( ! ( ( state->m_keypad_left_column >> i ) & 0x01 ) ) |
| 1343 | if ( ! ( ( m_keypad_left_column >> i ) & 0x01 ) ) |
| 1322 | 1344 | { |
| 1323 | | if ( ( input_port_read(space->machine(), "KEYPAD_L") >> 3*i ) & 0x02 ) |
| 1345 | if ( ( input_port_read(machine(), "KEYPAD_L") >> 3*i ) & 0x02 ) |
| 1324 | 1346 | { |
| 1325 | 1347 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1326 | 1348 | } |
| r14963 | r14964 | |
| 1332 | 1354 | } |
| 1333 | 1355 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1334 | 1356 | case 0x05: /* Joystick w/Boostergrip */ |
| 1335 | | return ( input_port_read(space->machine(), "BUTTONS_L") & 0x20 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON; |
| 1357 | return ( input_port_read(machine(), "BUTTONS_L") & 0x20 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON; |
| 1336 | 1358 | default: |
| 1337 | 1359 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1338 | 1360 | } |
| 1339 | 1361 | break; |
| 1340 | 1362 | case 2: /* Left controller port PIN 9 */ |
| 1341 | | switch ( input_port_read(space->machine(), "CONTROLLERS") % CATEGORY_SELECT ) |
| 1363 | switch ( input_port_read(machine(), "CONTROLLERS") % CATEGORY_SELECT ) |
| 1342 | 1364 | { |
| 1343 | 1365 | case 0x00: /* Joystick */ |
| 1344 | 1366 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1345 | 1367 | case 0x01: /* Paddle */ |
| 1346 | | return input_port_read(space->machine(), "PADDLE2"); |
| 1368 | return input_port_read(machine(), "PADDLE2"); |
| 1347 | 1369 | case 0x03: /* Keypad */ |
| 1348 | 1370 | for ( i = 0; i < 4; i++ ) |
| 1349 | 1371 | { |
| 1350 | | if ( ! ( ( state->m_keypad_right_column >> i ) & 0x01 ) ) |
| 1372 | if ( ! ( ( m_keypad_right_column >> i ) & 0x01 ) ) |
| 1351 | 1373 | { |
| 1352 | | if ( ( input_port_read(space->machine(), "KEYPAD_R") >> 3*i ) & 0x01 ) |
| 1374 | if ( ( input_port_read(machine(), "KEYPAD_R") >> 3*i ) & 0x01 ) |
| 1353 | 1375 | { |
| 1354 | 1376 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1355 | 1377 | } |
| r14963 | r14964 | |
| 1361 | 1383 | } |
| 1362 | 1384 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1363 | 1385 | case 0x05: /* Joystick w/Boostergrip */ |
| 1364 | | return ( input_port_read(space->machine(), "BUTTONS_R") & 0x40 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON; |
| 1386 | return ( input_port_read(machine(), "BUTTONS_R") & 0x40 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON; |
| 1365 | 1387 | default: |
| 1366 | 1388 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1367 | 1389 | } |
| 1368 | 1390 | break; |
| 1369 | 1391 | case 3: /* Right controller port PIN 9 */ |
| 1370 | | switch ( input_port_read(space->machine(), "CONTROLLERS") % CATEGORY_SELECT ) |
| 1392 | switch ( input_port_read(machine(), "CONTROLLERS") % CATEGORY_SELECT ) |
| 1371 | 1393 | { |
| 1372 | 1394 | case 0x00: /* Joystick */ |
| 1373 | 1395 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1374 | 1396 | case 0x01: /* Paddle */ |
| 1375 | | return input_port_read(space->machine(), "PADDLE4"); |
| 1397 | return input_port_read(machine(), "PADDLE4"); |
| 1376 | 1398 | case 0x03: /* Keypad */ |
| 1377 | 1399 | for ( i = 0; i < 4; i++ ) |
| 1378 | 1400 | { |
| 1379 | | if ( ! ( ( state->m_keypad_right_column >> i ) & 0x01 ) ) |
| 1401 | if ( ! ( ( m_keypad_right_column >> i ) & 0x01 ) ) |
| 1380 | 1402 | { |
| 1381 | | if ( ( input_port_read(space->machine(), "KEYPAD_R") >> 3*i ) & 0x02 ) |
| 1403 | if ( ( input_port_read(machine(), "KEYPAD_R") >> 3*i ) & 0x02 ) |
| 1382 | 1404 | { |
| 1383 | 1405 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1384 | 1406 | } |
| r14963 | r14964 | |
| 1390 | 1412 | } |
| 1391 | 1413 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1392 | 1414 | case 0x05: /* Joystick w/Boostergrip */ |
| 1393 | | return ( input_port_read(space->machine(), "BUTTONS_R") & 0x20 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON; |
| 1415 | return ( input_port_read(machine(), "BUTTONS_R") & 0x20 ) ? TIA_INPUT_PORT_ALWAYS_OFF : TIA_INPUT_PORT_ALWAYS_ON; |
| 1394 | 1416 | default: |
| 1395 | 1417 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1396 | 1418 | } |
| 1397 | 1419 | break; |
| 1398 | 1420 | case 4: /* Left controller port PIN 6 */ |
| 1399 | | switch ( input_port_read(space->machine(), "CONTROLLERS") / CATEGORY_SELECT ) |
| 1421 | switch ( input_port_read(machine(), "CONTROLLERS") / CATEGORY_SELECT ) |
| 1400 | 1422 | { |
| 1401 | 1423 | case 0x00: /* Joystick */ |
| 1402 | 1424 | case 0x05: /* Joystick w/Boostergrip */ |
| 1403 | | return input_port_read(space->machine(), "BUTTONS_L"); |
| 1425 | return input_port_read(machine(), "BUTTONS_L"); |
| 1404 | 1426 | case 0x01: /* Paddle */ |
| 1405 | 1427 | return 0xff; |
| 1406 | 1428 | case 0x02: /* Driving */ |
| 1407 | | return input_port_read(space->machine(), "BUTTONS_L") << 3; |
| 1429 | return input_port_read(machine(), "BUTTONS_L") << 3; |
| 1408 | 1430 | case 0x03: /* Keypad */ |
| 1409 | 1431 | for ( i = 0; i < 4; i++ ) |
| 1410 | 1432 | { |
| 1411 | | if ( ! ( ( state->m_keypad_left_column >> i ) & 0x01 ) ) |
| 1433 | if ( ! ( ( m_keypad_left_column >> i ) & 0x01 ) ) |
| 1412 | 1434 | { |
| 1413 | | if ( ( input_port_read(space->machine(), "KEYPAD_L") >> 3*i ) & 0x04 ) |
| 1435 | if ( ( input_port_read(machine(), "KEYPAD_L") >> 3*i ) & 0x04 ) |
| 1414 | 1436 | { |
| 1415 | 1437 | return 0xff; |
| 1416 | 1438 | } |
| r14963 | r14964 | |
| 1422 | 1444 | } |
| 1423 | 1445 | return 0xff; |
| 1424 | 1446 | case 0x06: /* Trakball CX-22 */ |
| 1425 | | return input_port_read(space->machine(), "BUTTONS_L") << 4; |
| 1447 | return input_port_read(machine(), "BUTTONS_L") << 4; |
| 1426 | 1448 | default: |
| 1427 | 1449 | return 0xff; |
| 1428 | 1450 | } |
| 1429 | 1451 | break; |
| 1430 | 1452 | case 5: /* Right controller port PIN 6 */ |
| 1431 | | switch ( input_port_read(space->machine(), "CONTROLLERS") % CATEGORY_SELECT ) |
| 1453 | switch ( input_port_read(machine(), "CONTROLLERS") % CATEGORY_SELECT ) |
| 1432 | 1454 | { |
| 1433 | 1455 | case 0x00: /* Joystick */ |
| 1434 | 1456 | case 0x05: /* Joystick w/Boostergrip */ |
| 1435 | | return input_port_read(space->machine(), "BUTTONS_R"); |
| 1457 | return input_port_read(machine(), "BUTTONS_R"); |
| 1436 | 1458 | case 0x01: /* Paddle */ |
| 1437 | 1459 | return 0xff; |
| 1438 | 1460 | case 0x02: /* Driving */ |
| 1439 | | return input_port_read(space->machine(), "BUTTONS_R") << 3; |
| 1461 | return input_port_read(machine(), "BUTTONS_R") << 3; |
| 1440 | 1462 | case 0x03: /* Keypad */ |
| 1441 | 1463 | for ( i = 0; i < 4; i++ ) |
| 1442 | 1464 | { |
| 1443 | | if ( ! ( ( state->m_keypad_right_column >> i ) & 0x01 ) ) |
| 1465 | if ( ! ( ( m_keypad_right_column >> i ) & 0x01 ) ) |
| 1444 | 1466 | { |
| 1445 | | if ( ( input_port_read(space->machine(), "KEYPAD_R") >> 3*i ) & 0x04 ) |
| 1467 | if ( ( input_port_read(machine(), "KEYPAD_R") >> 3*i ) & 0x04 ) |
| 1446 | 1468 | { |
| 1447 | 1469 | return 0xff; |
| 1448 | 1470 | } |
| r14963 | r14964 | |
| 1454 | 1476 | } |
| 1455 | 1477 | return 0xff; |
| 1456 | 1478 | case 0x06: /* Trakball CX-22 */ |
| 1457 | | return input_port_read(space->machine(), "BUTTONS_R") << 4; |
| 1479 | return input_port_read(machine(), "BUTTONS_R") << 4; |
| 1458 | 1480 | default: |
| 1459 | 1481 | return 0xff; |
| 1460 | 1482 | } |
| r14963 | r14964 | |
| 1471 | 1493 | Q-Bert's Qubes (NTSC,F6) at 0x1594 |
| 1472 | 1494 | Berzerk at 0xF093. |
| 1473 | 1495 | */ |
| 1474 | | static READ8_HANDLER(a2600_get_databus_contents) |
| 1496 | READ8_MEMBER(a2600_state::a2600_get_databus_contents) |
| 1475 | 1497 | { |
| 1476 | 1498 | UINT16 last_address, prev_address; |
| 1477 | 1499 | UINT8 last_byte, prev_byte; |
| 1478 | 1500 | |
| 1479 | | last_address = cpu_get_pc(space->machine().device("maincpu")) - 1; |
| 1501 | last_address = cpu_get_pc(machine().device("maincpu")) - 1; |
| 1480 | 1502 | if ( ! ( last_address & 0x1080 ) ) |
| 1481 | 1503 | { |
| 1482 | 1504 | return offset; |
| 1483 | 1505 | } |
| 1484 | | last_byte = space->read_byte(last_address ); |
| 1506 | last_byte = space.read_byte(last_address ); |
| 1485 | 1507 | if ( last_byte < 0x80 || last_byte == 0xFF ) |
| 1486 | 1508 | { |
| 1487 | 1509 | return last_byte; |
| r14963 | r14964 | |
| 1491 | 1513 | { |
| 1492 | 1514 | return last_byte; |
| 1493 | 1515 | } |
| 1494 | | prev_byte = space->read_byte(prev_address ); |
| 1516 | prev_byte = space.read_byte(prev_address ); |
| 1495 | 1517 | if ( prev_byte == 0xB1 ) |
| 1496 | 1518 | { /* LDA (XX),Y */ |
| 1497 | | return space->read_byte(last_byte + 1 ); |
| 1519 | return space.read_byte(last_byte + 1 ); |
| 1498 | 1520 | } |
| 1499 | 1521 | return last_byte; |
| 1500 | 1522 | } |
| r14963 | r14964 | |
| 1508 | 1530 | }; |
| 1509 | 1531 | #endif |
| 1510 | 1532 | |
| 1511 | | static WRITE16_HANDLER( a2600_tia_vsync_callback ) |
| 1533 | WRITE16_MEMBER(a2600_state::a2600_tia_vsync_callback) |
| 1512 | 1534 | { |
| 1513 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 1514 | 1535 | int i; |
| 1515 | 1536 | |
| 1516 | 1537 | for ( i = 0; i < ARRAY_LENGTH(supported_screen_heights); i++ ) |
| 1517 | 1538 | { |
| 1518 | 1539 | if ( data >= supported_screen_heights[i] - 3 && data <= supported_screen_heights[i] + 3 ) |
| 1519 | 1540 | { |
| 1520 | | if ( supported_screen_heights[i] != state->m_current_screen_height ) |
| 1541 | if ( supported_screen_heights[i] != m_current_screen_height ) |
| 1521 | 1542 | { |
| 1522 | | state->m_current_screen_height = supported_screen_heights[i]; |
| 1523 | | // machine.primary_screen->configure(228, state->m_current_screen_height, &visarea[i], HZ_TO_ATTOSECONDS( MASTER_CLOCK_NTSC ) * 228 * state->m_current_screen_height ); |
| 1543 | m_current_screen_height = supported_screen_heights[i]; |
| 1544 | // machine.primary_screen->configure(228, m_current_screen_height, &visarea[i], HZ_TO_ATTOSECONDS( MASTER_CLOCK_NTSC ) * 228 * m_current_screen_height ); |
| 1524 | 1545 | } |
| 1525 | 1546 | } |
| 1526 | 1547 | } |
| 1527 | 1548 | } |
| 1528 | 1549 | |
| 1529 | | static WRITE16_HANDLER( a2600_tia_vsync_callback_pal ) |
| 1550 | WRITE16_MEMBER(a2600_state::a2600_tia_vsync_callback_pal) |
| 1530 | 1551 | { |
| 1531 | | a2600_state *state = space->machine().driver_data<a2600_state>(); |
| 1532 | 1552 | int i; |
| 1533 | 1553 | |
| 1534 | 1554 | for ( i = 0; i < ARRAY_LENGTH(supported_screen_heights); i++ ) |
| 1535 | 1555 | { |
| 1536 | 1556 | if ( data >= supported_screen_heights[i] - 3 && data <= supported_screen_heights[i] + 3 ) |
| 1537 | 1557 | { |
| 1538 | | if ( supported_screen_heights[i] != state->m_current_screen_height ) |
| 1558 | if ( supported_screen_heights[i] != m_current_screen_height ) |
| 1539 | 1559 | { |
| 1540 | | state->m_current_screen_height = supported_screen_heights[i]; |
| 1541 | | // machine.primary_screen->configure(228, state->m_current_screen_height, &visarea[i], HZ_TO_ATTOSECONDS( MASTER_CLOCK_PAL ) * 228 * state->m_current_screen_height ); |
| 1560 | m_current_screen_height = supported_screen_heights[i]; |
| 1561 | // machine.primary_screen->configure(228, m_current_screen_height, &visarea[i], HZ_TO_ATTOSECONDS( MASTER_CLOCK_PAL ) * 228 * m_current_screen_height ); |
| 1542 | 1562 | } |
| 1543 | 1563 | } |
| 1544 | 1564 | } |
| 1545 | 1565 | } |
| 1546 | 1566 | |
| 1547 | | static const struct tia_interface tia_interface = |
| 1567 | static const tia_interface a2600_tia_interface = |
| 1548 | 1568 | { |
| 1549 | | a2600_read_input_port, |
| 1550 | | a2600_get_databus_contents, |
| 1551 | | a2600_tia_vsync_callback |
| 1569 | DEVCB_NULL,//DEVCB_DRIVER_MEMBER(a2600_state, a2600_read_input_port), |
| 1570 | DEVCB_DRIVER_MEMBER(a2600_state, a2600_get_databus_contents), |
| 1571 | DEVCB_NULL,//DEVCB_DRIVER_MEMBER(a2600_state, a2600_tia_vsync_callback) |
| 1552 | 1572 | }; |
| 1553 | 1573 | |
| 1554 | | static const struct tia_interface tia_interface_pal = |
| 1574 | static const tia_interface a2600_tia_interface_pal = |
| 1555 | 1575 | { |
| 1556 | | a2600_read_input_port, |
| 1557 | | a2600_get_databus_contents, |
| 1558 | | a2600_tia_vsync_callback_pal |
| 1576 | DEVCB_NULL,//DEVCB_DRIVER_MEMBER(a2600_state, a2600_read_input_port), |
| 1577 | DEVCB_DRIVER_MEMBER(a2600_state, a2600_get_databus_contents), |
| 1578 | DEVCB_NULL,//DEVCB_DRIVER_MEMBER(a2600_state, a2600_tia_vsync_callback_pal) |
| 1559 | 1579 | }; |
| 1560 | 1580 | |
| 1561 | 1581 | |
| r14963 | r14964 | |
| 1573 | 1593 | static MACHINE_START( a2600 ) |
| 1574 | 1594 | { |
| 1575 | 1595 | common_init(machine); |
| 1576 | | tia_init( machine, &tia_interface ); |
| 1577 | 1596 | } |
| 1578 | 1597 | |
| 1579 | 1598 | static MACHINE_START( a2600p ) |
| 1580 | 1599 | { |
| 1581 | 1600 | common_init(machine); |
| 1582 | | tia_init( machine, &tia_interface_pal ); |
| 1583 | 1601 | } |
| 1584 | 1602 | |
| 1585 | 1603 | #ifdef UNUSED_FUNCTIONS |
| r14963 | r14964 | |
| 1890 | 1908 | |
| 1891 | 1909 | if (state->m_banking_mode == modeDC) |
| 1892 | 1910 | { |
| 1893 | | space->install_legacy_read_handler(0x1fec, 0x1fec, FUNC(current_bank_r)); |
| 1911 | space->install_read_handler(0x1fec, 0x1fec, read8_delegate(FUNC(a2600_state::current_bank_r),state)); |
| 1894 | 1912 | } |
| 1895 | 1913 | |
| 1896 | 1914 | /* set up bank switch registers */ |
| r14963 | r14964 | |
| 1898 | 1916 | switch (state->m_banking_mode) |
| 1899 | 1917 | { |
| 1900 | 1918 | case modeF8: |
| 1901 | | space->install_legacy_write_handler(0x1ff8, 0x1ff9, FUNC(modeF8_switch_w)); |
| 1902 | | space->install_legacy_read_handler(0x1ff8, 0x1ff9, FUNC(modeF8_switch_r)); |
| 1919 | space->install_write_handler(0x1ff8, 0x1ff9, write8_delegate(FUNC(a2600_state::modeF8_switch_w),state)); |
| 1920 | space->install_read_handler(0x1ff8, 0x1ff9, read8_delegate(FUNC(a2600_state::modeF8_switch_r),state)); |
| 1903 | 1921 | break; |
| 1904 | 1922 | |
| 1905 | 1923 | case modeFA: |
| 1906 | | space->install_legacy_write_handler(0x1ff8, 0x1ffa, FUNC(modeFA_switch_w)); |
| 1907 | | space->install_legacy_read_handler(0x1ff8, 0x1ffa, FUNC(modeFA_switch_r)); |
| 1924 | space->install_write_handler(0x1ff8, 0x1ffa, write8_delegate(FUNC(a2600_state::modeFA_switch_w),state)); |
| 1925 | space->install_read_handler(0x1ff8, 0x1ffa, read8_delegate(FUNC(a2600_state::modeFA_switch_r),state)); |
| 1908 | 1926 | break; |
| 1909 | 1927 | |
| 1910 | 1928 | case modeF6: |
| 1911 | | space->install_legacy_write_handler(0x1ff6, 0x1ff9, FUNC(modeF6_switch_w)); |
| 1912 | | space->install_legacy_read_handler(0x1ff6, 0x1ff9, FUNC(modeF6_switch_r)); |
| 1929 | space->install_write_handler(0x1ff6, 0x1ff9, write8_delegate(FUNC(a2600_state::modeF6_switch_w),state)); |
| 1930 | space->install_read_handler(0x1ff6, 0x1ff9, read8_delegate(FUNC(a2600_state::modeF6_switch_r),state)); |
| 1913 | 1931 | space->set_direct_update_handler(direct_update_delegate(FUNC(a2600_state::modeF6_opbase), state)); |
| 1914 | 1932 | break; |
| 1915 | 1933 | |
| 1916 | 1934 | case modeF4: |
| 1917 | | space->install_legacy_write_handler(0x1ff4, 0x1ffb, FUNC(modeF4_switch_w)); |
| 1918 | | space->install_legacy_read_handler(0x1ff4, 0x1ffb, FUNC(modeF4_switch_r)); |
| 1935 | space->install_write_handler(0x1ff4, 0x1ffb, write8_delegate(FUNC(a2600_state::modeF4_switch_w),state)); |
| 1936 | space->install_read_handler(0x1ff4, 0x1ffb, read8_delegate(FUNC(a2600_state::modeF4_switch_r),state)); |
| 1919 | 1937 | break; |
| 1920 | 1938 | |
| 1921 | 1939 | case modeE0: |
| 1922 | | space->install_legacy_write_handler(0x1fe0, 0x1ff8, FUNC(modeE0_switch_w)); |
| 1923 | | space->install_legacy_read_handler(0x1fe0, 0x1ff8, FUNC(modeE0_switch_r)); |
| 1940 | space->install_write_handler(0x1fe0, 0x1ff8, write8_delegate(FUNC(a2600_state::modeE0_switch_w),state)); |
| 1941 | space->install_read_handler(0x1fe0, 0x1ff8, read8_delegate(FUNC(a2600_state::modeE0_switch_r),state)); |
| 1924 | 1942 | break; |
| 1925 | 1943 | |
| 1926 | 1944 | case mode3F: |
| 1927 | | space->install_legacy_write_handler(0x00, 0x3f, FUNC(mode3F_switch_w)); |
| 1945 | space->install_write_handler(0x00, 0x3f, write8_delegate(FUNC(a2600_state::mode3F_switch_w),state)); |
| 1928 | 1946 | break; |
| 1929 | 1947 | |
| 1930 | 1948 | case modeUA: |
| 1931 | | space->install_legacy_write_handler(0x200, 0x27f, FUNC(modeUA_switch_w)); |
| 1932 | | space->install_legacy_read_handler(0x200, 0x27f, FUNC(modeUA_switch_r)); |
| 1949 | space->install_write_handler(0x200, 0x27f, write8_delegate(FUNC(a2600_state::modeUA_switch_w),state)); |
| 1950 | space->install_read_handler(0x200, 0x27f, read8_delegate(FUNC(a2600_state::modeUA_switch_r),state)); |
| 1933 | 1951 | break; |
| 1934 | 1952 | |
| 1935 | 1953 | case modeE7: |
| 1936 | | space->install_legacy_write_handler(0x1fe0, 0x1fe7, FUNC(modeE7_switch_w)); |
| 1937 | | space->install_legacy_read_handler(0x1fe0, 0x1fe7, FUNC(modeE7_switch_r)); |
| 1938 | | space->install_legacy_write_handler(0x1fe8, 0x1feb, FUNC(modeE7_RAM_switch_w)); |
| 1939 | | space->install_legacy_read_handler(0x1fe8, 0x1feb, FUNC(modeE7_RAM_switch_r)); |
| 1954 | space->install_write_handler(0x1fe0, 0x1fe7, write8_delegate(FUNC(a2600_state::modeE7_switch_w),state)); |
| 1955 | space->install_read_handler(0x1fe0, 0x1fe7, read8_delegate(FUNC(a2600_state::modeE7_switch_r),state)); |
| 1956 | space->install_write_handler(0x1fe8, 0x1feb, write8_delegate(FUNC(a2600_state::modeE7_RAM_switch_w),state)); |
| 1957 | space->install_read_handler(0x1fe8, 0x1feb, read8_delegate(FUNC(a2600_state::modeE7_RAM_switch_r),state)); |
| 1940 | 1958 | space->install_readwrite_bank(0x1800, 0x18ff, "bank9"); |
| 1941 | 1959 | memory_set_bankptr(machine, "bank9", state->m_extra_RAM->base() + 4 * 256 ); |
| 1942 | 1960 | break; |
| 1943 | 1961 | |
| 1944 | 1962 | case modeDC: |
| 1945 | | space->install_legacy_write_handler(0x1ff0, 0x1ff0, FUNC(modeDC_switch_w)); |
| 1946 | | space->install_legacy_read_handler(0x1ff0, 0x1ff0, FUNC(modeDC_switch_r)); |
| 1963 | space->install_write_handler(0x1ff0, 0x1ff0, write8_delegate(FUNC(a2600_state::modeDC_switch_w),state)); |
| 1964 | space->install_read_handler(0x1ff0, 0x1ff0, read8_delegate(FUNC(a2600_state::modeDC_switch_r),state)); |
| 1947 | 1965 | break; |
| 1948 | 1966 | |
| 1949 | 1967 | case modeFE: |
| 1950 | | space->install_legacy_write_handler(0x01fe, 0x01fe, FUNC(modeFE_switch_w)); |
| 1951 | | space->install_legacy_read_handler(0x01fe, 0x01fe, FUNC(modeFE_switch_r)); |
| 1968 | space->install_write_handler(0x01fe, 0x01fe, write8_delegate(FUNC(a2600_state::modeFE_switch_w),state)); |
| 1969 | space->install_read_handler(0x01fe, 0x01fe, read8_delegate(FUNC(a2600_state::modeFE_switch_r),state)); |
| 1952 | 1970 | break; |
| 1953 | 1971 | |
| 1954 | 1972 | case mode3E: |
| 1955 | | space->install_legacy_write_handler(0x3e, 0x3e, FUNC(mode3E_RAM_switch_w)); |
| 1956 | | space->install_legacy_write_handler(0x3f, 0x3f, FUNC(mode3E_switch_w)); |
| 1957 | | space->install_legacy_write_handler(0x1400, 0x15ff, FUNC(mode3E_RAM_w)); |
| 1973 | space->install_write_handler(0x3e, 0x3e, write8_delegate(FUNC(a2600_state::mode3E_RAM_switch_w),state)); |
| 1974 | space->install_write_handler(0x3f, 0x3f, write8_delegate(FUNC(a2600_state::mode3E_switch_w),state)); |
| 1975 | space->install_write_handler(0x1400, 0x15ff, write8_delegate(FUNC(a2600_state::mode3E_RAM_w),state)); |
| 1958 | 1976 | break; |
| 1959 | 1977 | |
| 1960 | 1978 | case modeSS: |
| 1961 | | space->install_legacy_read_handler(0x1000, 0x1fff, FUNC(modeSS_r)); |
| 1979 | space->install_read_handler(0x1000, 0x1fff, read8_delegate(FUNC(a2600_state::modeSS_r),state)); |
| 1962 | 1980 | state->m_bank_base[1] = state->m_extra_RAM->base() + 2 * 0x800; |
| 1963 | 1981 | state->m_bank_base[2] = CART; |
| 1964 | 1982 | memory_set_bankptr(machine, "bank1", state->m_bank_base[1] ); |
| r14963 | r14964 | |
| 1971 | 1989 | break; |
| 1972 | 1990 | |
| 1973 | 1991 | case modeFV: |
| 1974 | | space->install_legacy_write_handler(0x1fd0, 0x1fd0, FUNC(modeFV_switch_w)); |
| 1975 | | space->install_legacy_read_handler(0x1fd0, 0x1fd0, FUNC(modeFV_switch_r)); |
| 1992 | space->install_write_handler(0x1fd0, 0x1fd0, write8_delegate(FUNC(a2600_state::modeFV_switch_w),state)); |
| 1993 | space->install_read_handler(0x1fd0, 0x1fd0, read8_delegate(FUNC(a2600_state::modeFV_switch_r),state)); |
| 1976 | 1994 | break; |
| 1977 | 1995 | |
| 1978 | 1996 | case modeDPC: |
| 1979 | | space->install_legacy_read_handler(0x1000, 0x103f, FUNC(modeDPC_r)); |
| 1980 | | space->install_legacy_write_handler(0x1040, 0x107f, FUNC(modeDPC_w)); |
| 1981 | | space->install_legacy_write_handler(0x1ff8, 0x1ff9, FUNC(modeF8_switch_w)); |
| 1982 | | space->install_legacy_read_handler(0x1ff8, 0x1ff9, FUNC(modeF8_switch_r)); |
| 1997 | space->install_read_handler(0x1000, 0x103f, read8_delegate(FUNC(a2600_state::modeDPC_r),state)); |
| 1998 | space->install_write_handler(0x1040, 0x107f, write8_delegate(FUNC(a2600_state::modeDPC_w),state)); |
| 1999 | space->install_write_handler(0x1ff8, 0x1ff9, write8_delegate(FUNC(a2600_state::modeF8_switch_w),state)); |
| 2000 | space->install_read_handler(0x1ff8, 0x1ff9, read8_delegate(FUNC(a2600_state::modeF8_switch_r),state)); |
| 1983 | 2001 | space->set_direct_update_handler(direct_update_delegate(FUNC(a2600_state::modeDPC_opbase_handler), state)); |
| 1984 | 2002 | { |
| 1985 | 2003 | int data_fetcher; |
| r14963 | r14964 | |
| 1999 | 2017 | break; |
| 2000 | 2018 | |
| 2001 | 2019 | case modeJVP: |
| 2002 | | space->install_legacy_read_handler(0x0FA0, 0x0FC0, FUNC(modeJVP_switch_r)); |
| 2003 | | space->install_legacy_write_handler(0x0FA0, 0x0FC0, FUNC(modeJVP_switch_w)); |
| 2020 | space->install_read_handler(0x0FA0, 0x0FC0, read8_delegate(FUNC(a2600_state::modeJVP_switch_r),state)); |
| 2021 | space->install_write_handler(0x0FA0, 0x0FC0, write8_delegate(FUNC(a2600_state::modeJVP_switch_w),state)); |
| 2004 | 2022 | break; |
| 2005 | 2023 | } |
| 2006 | 2024 | |
| r14963 | r14964 | |
| 2218 | 2236 | MCFG_MACHINE_RESET(a2600) |
| 2219 | 2237 | |
| 2220 | 2238 | /* video hardware */ |
| 2239 | MCFG_TIA_VIDEO_ADD("tia_video", a2600_tia_interface) |
| 2240 | |
| 2221 | 2241 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2222 | 2242 | MCFG_SCREEN_RAW_PARAMS( MASTER_CLOCK_NTSC, 228, 26, 26 + 160 + 16, 262, 24 , 24 + 192 + 31 ) |
| 2223 | | MCFG_SCREEN_UPDATE_STATIC(tia) |
| 2243 | MCFG_SCREEN_UPDATE_DEVICE("tia_video", tia_video_device, screen_update) |
| 2224 | 2244 | |
| 2225 | 2245 | MCFG_PALETTE_LENGTH( TIA_PALETTE_LENGTH ) |
| 2226 | 2246 | MCFG_PALETTE_INIT(tia_NTSC) |
| 2227 | 2247 | |
| 2228 | | MCFG_VIDEO_START(tia) |
| 2229 | | |
| 2230 | 2248 | /* sound hardware */ |
| 2231 | 2249 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2232 | 2250 | MCFG_SOUND_ADD("tia", TIA, MASTER_CLOCK_NTSC/114) |
| r14963 | r14964 | |
| 2251 | 2269 | MCFG_MACHINE_RESET(a2600) |
| 2252 | 2270 | |
| 2253 | 2271 | /* video hardware */ |
| 2272 | MCFG_DEVICE_REMOVE("tia_video") |
| 2273 | MCFG_TIA_VIDEO_ADD("tia_video", a2600_tia_interface_pal) |
| 2274 | |
| 2254 | 2275 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2255 | 2276 | MCFG_SCREEN_RAW_PARAMS( MASTER_CLOCK_PAL, 228, 26, 26 + 160 + 16, 312, 32, 32 + 228 + 31 ) |
| 2256 | | MCFG_SCREEN_UPDATE_STATIC(tia) |
| 2277 | MCFG_SCREEN_UPDATE_DEVICE("tia_video", tia_video_device, screen_update) |
| 2257 | 2278 | |
| 2258 | 2279 | MCFG_PALETTE_LENGTH( TIA_PALETTE_LENGTH ) |
| 2259 | 2280 | MCFG_PALETTE_INIT(tia_PAL) |
| 2260 | 2281 | |
| 2261 | | MCFG_VIDEO_START(tia) |
| 2262 | | |
| 2263 | 2282 | /* sound hardware */ |
| 2264 | 2283 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2265 | 2284 | MCFG_SOUND_ADD("tia", TIA, MASTER_CLOCK_PAL/114) |
src/mess/drivers/ng_aes.c
| r14963 | r14964 | |
| 61 | 61 | |
| 62 | 62 | UINT8 *m_memcard_data; |
| 63 | 63 | neocd_ctrl_t m_neocd_ctrl; |
| 64 | DECLARE_WRITE8_MEMBER(audio_cpu_clear_nmi_w); |
| 65 | DECLARE_WRITE16_MEMBER(io_control_w); |
| 66 | DECLARE_WRITE16_MEMBER(save_ram_w); |
| 67 | DECLARE_READ16_MEMBER(memcard_r); |
| 68 | DECLARE_WRITE16_MEMBER(memcard_w); |
| 69 | DECLARE_READ16_MEMBER(neocd_memcard_r); |
| 70 | DECLARE_WRITE16_MEMBER(neocd_memcard_w); |
| 71 | DECLARE_WRITE16_MEMBER(audio_command_w); |
| 72 | DECLARE_READ8_MEMBER(audio_command_r); |
| 73 | DECLARE_WRITE8_MEMBER(audio_result_w); |
| 74 | DECLARE_WRITE16_MEMBER(main_cpu_bank_select_w); |
| 75 | DECLARE_READ8_MEMBER(audio_cpu_bank_select_f000_f7ff_r); |
| 76 | DECLARE_READ8_MEMBER(audio_cpu_bank_select_e000_efff_r); |
| 77 | DECLARE_READ8_MEMBER(audio_cpu_bank_select_c000_dfff_r); |
| 78 | DECLARE_READ8_MEMBER(audio_cpu_bank_select_8000_bfff_r); |
| 79 | DECLARE_WRITE16_MEMBER(system_control_w); |
| 80 | DECLARE_READ16_MEMBER(neocd_control_r); |
| 81 | DECLARE_WRITE16_MEMBER(neocd_control_w); |
| 82 | DECLARE_READ16_MEMBER(neocd_transfer_r); |
| 83 | DECLARE_WRITE16_MEMBER(neocd_transfer_w); |
| 84 | DECLARE_READ16_MEMBER(aes_in0_r); |
| 85 | DECLARE_READ16_MEMBER(aes_in1_r); |
| 86 | DECLARE_READ16_MEMBER(aes_in2_r); |
| 64 | 87 | }; |
| 65 | 88 | |
| 66 | 89 | |
| r14963 | r14964 | |
| 232 | 255 | } |
| 233 | 256 | |
| 234 | 257 | |
| 235 | | static WRITE8_HANDLER( audio_cpu_clear_nmi_w ) |
| 258 | WRITE8_MEMBER(ng_aes_state::audio_cpu_clear_nmi_w) |
| 236 | 259 | { |
| 237 | | neogeo_state *state = space->machine().driver_data<neogeo_state>(); |
| 238 | | device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE); |
| 260 | device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE); |
| 239 | 261 | } |
| 240 | 262 | |
| 241 | 263 | |
| r14963 | r14964 | |
| 293 | 315 | |
| 294 | 316 | #endif |
| 295 | 317 | |
| 296 | | static WRITE16_HANDLER( io_control_w ) |
| 318 | WRITE16_MEMBER(ng_aes_state::io_control_w) |
| 297 | 319 | { |
| 298 | | neogeo_state *state = space->machine().driver_data<neogeo_state>(); |
| 299 | 320 | switch (offset) |
| 300 | 321 | { |
| 301 | | case 0x00: select_controller(space->machine(), data & 0x00ff); break; |
| 302 | | // case 0x18: set_output_latch(space->machine(), data & 0x00ff); break; |
| 303 | | // case 0x20: set_output_data(space->machine(), data & 0x00ff); break; |
| 304 | | case 0x28: upd4990a_control_16_w(state->m_upd4990a, 0, data, mem_mask); break; |
| 322 | case 0x00: select_controller(machine(), data & 0x00ff); break; |
| 323 | // case 0x18: set_output_latch(machine(), data & 0x00ff); break; |
| 324 | // case 0x20: set_output_data(machine(), data & 0x00ff); break; |
| 325 | case 0x28: upd4990a_control_16_w(m_upd4990a, 0, data, mem_mask); break; |
| 305 | 326 | // case 0x30: break; // coin counters |
| 306 | 327 | // case 0x31: break; // coin counters |
| 307 | 328 | // case 0x32: break; // coin lockout |
| 308 | 329 | // case 0x33: break; // coui lockout |
| 309 | 330 | |
| 310 | 331 | default: |
| 311 | | logerror("PC: %x Unmapped I/O control write. Offset: %x Data: %x\n", cpu_get_pc(&space->device()), offset, data); |
| 332 | logerror("PC: %x Unmapped I/O control write. Offset: %x Data: %x\n", cpu_get_pc(&space.device()), offset, data); |
| 312 | 333 | break; |
| 313 | 334 | } |
| 314 | 335 | } |
| r14963 | r14964 | |
| 384 | 405 | } |
| 385 | 406 | |
| 386 | 407 | |
| 387 | | static WRITE16_HANDLER( save_ram_w ) |
| 408 | WRITE16_MEMBER(ng_aes_state::save_ram_w) |
| 388 | 409 | { |
| 389 | | neogeo_state *state = space->machine().driver_data<neogeo_state>(); |
| 390 | 410 | |
| 391 | | if (state->m_save_ram_unlocked) |
| 411 | if (m_save_ram_unlocked) |
| 392 | 412 | COMBINE_DATA(&save_ram[offset]); |
| 393 | 413 | } |
| 394 | 414 | #endif |
| r14963 | r14964 | |
| 412 | 432 | return (memcard_present(field.machine()) == -1) ? 0x07 : 0x00; |
| 413 | 433 | } |
| 414 | 434 | |
| 415 | | static READ16_HANDLER( memcard_r ) |
| 435 | READ16_MEMBER(ng_aes_state::memcard_r) |
| 416 | 436 | { |
| 417 | | ng_aes_state *state = space->machine().driver_data<ng_aes_state>(); |
| 418 | 437 | UINT16 ret; |
| 419 | 438 | |
| 420 | | if (memcard_present(space->machine()) != -1) |
| 421 | | ret = state->m_memcard_data[offset] | 0xff00; |
| 439 | if (memcard_present(machine()) != -1) |
| 440 | ret = m_memcard_data[offset] | 0xff00; |
| 422 | 441 | else |
| 423 | 442 | ret = 0xffff; |
| 424 | 443 | |
| r14963 | r14964 | |
| 426 | 445 | } |
| 427 | 446 | |
| 428 | 447 | |
| 429 | | static WRITE16_HANDLER( memcard_w ) |
| 448 | WRITE16_MEMBER(ng_aes_state::memcard_w) |
| 430 | 449 | { |
| 431 | | ng_aes_state *state = space->machine().driver_data<ng_aes_state>(); |
| 432 | 450 | if (ACCESSING_BITS_0_7) |
| 433 | 451 | { |
| 434 | | if (memcard_present(space->machine()) != -1) |
| 435 | | state->m_memcard_data[offset] = data; |
| 452 | if (memcard_present(machine()) != -1) |
| 453 | m_memcard_data[offset] = data; |
| 436 | 454 | } |
| 437 | 455 | } |
| 438 | 456 | |
| 439 | 457 | /* The NeoCD has an 8kB internal memory card, instead of memcard slots like the MVS and AES */ |
| 440 | | static READ16_HANDLER( neocd_memcard_r ) |
| 458 | READ16_MEMBER(ng_aes_state::neocd_memcard_r) |
| 441 | 459 | { |
| 442 | | ng_aes_state *state = space->machine().driver_data<ng_aes_state>(); |
| 443 | | return state->m_memcard_data[offset] | 0xff00; |
| 460 | return m_memcard_data[offset] | 0xff00; |
| 444 | 461 | } |
| 445 | 462 | |
| 446 | 463 | |
| 447 | | static WRITE16_HANDLER( neocd_memcard_w ) |
| 464 | WRITE16_MEMBER(ng_aes_state::neocd_memcard_w) |
| 448 | 465 | { |
| 449 | | ng_aes_state *state = space->machine().driver_data<ng_aes_state>(); |
| 450 | 466 | if (ACCESSING_BITS_0_7) |
| 451 | 467 | { |
| 452 | | state->m_memcard_data[offset] = data; |
| 468 | m_memcard_data[offset] = data; |
| 453 | 469 | } |
| 454 | 470 | } |
| 455 | 471 | |
| r14963 | r14964 | |
| 481 | 497 | * |
| 482 | 498 | *************************************/ |
| 483 | 499 | |
| 484 | | static WRITE16_HANDLER( audio_command_w ) |
| 500 | WRITE16_MEMBER(ng_aes_state::audio_command_w) |
| 485 | 501 | { |
| 486 | | ng_aes_state *state = space->machine().driver_data<ng_aes_state>(); |
| 487 | 502 | /* accessing the LSB only is not mapped */ |
| 488 | 503 | if (mem_mask != 0x00ff) |
| 489 | 504 | { |
| 490 | | state->soundlatch_byte_w(*space, 0, data >> 8); |
| 505 | soundlatch_byte_w(space, 0, data >> 8); |
| 491 | 506 | |
| 492 | | audio_cpu_assert_nmi(space->machine()); |
| 507 | audio_cpu_assert_nmi(machine()); |
| 493 | 508 | |
| 494 | 509 | /* boost the interleave to let the audio CPU read the command */ |
| 495 | | space->machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50)); |
| 510 | machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50)); |
| 496 | 511 | |
| 497 | | if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_command_w %04x - %04x\n", cpu_get_pc(&space->device()), data, mem_mask); |
| 512 | if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_command_w %04x - %04x\n", cpu_get_pc(&space.device()), data, mem_mask); |
| 498 | 513 | } |
| 499 | 514 | } |
| 500 | 515 | |
| 501 | 516 | |
| 502 | | static READ8_HANDLER( audio_command_r ) |
| 517 | READ8_MEMBER(ng_aes_state::audio_command_r) |
| 503 | 518 | { |
| 504 | | ng_aes_state *state = space->machine().driver_data<ng_aes_state>(); |
| 505 | | UINT8 ret = state->soundlatch_byte_r(*space, 0); |
| 519 | UINT8 ret = soundlatch_byte_r(space, 0); |
| 506 | 520 | |
| 507 | | if (LOG_CPU_COMM) logerror(" AUD CPU PC %04x: audio_command_r %02x\n", cpu_get_pc(&space->device()), ret); |
| 521 | if (LOG_CPU_COMM) logerror(" AUD CPU PC %04x: audio_command_r %02x\n", cpu_get_pc(&space.device()), ret); |
| 508 | 522 | |
| 509 | 523 | /* this is a guess */ |
| 510 | 524 | audio_cpu_clear_nmi_w(space, 0, 0); |
| r14963 | r14964 | |
| 513 | 527 | } |
| 514 | 528 | |
| 515 | 529 | |
| 516 | | static WRITE8_HANDLER( audio_result_w ) |
| 530 | WRITE8_MEMBER(ng_aes_state::audio_result_w) |
| 517 | 531 | { |
| 518 | | neogeo_state *state = space->machine().driver_data<neogeo_state>(); |
| 519 | 532 | |
| 520 | | if (LOG_CPU_COMM && (state->m_audio_result != data)) logerror(" AUD CPU PC %04x: audio_result_w %02x\n", cpu_get_pc(&space->device()), data); |
| 533 | if (LOG_CPU_COMM && (m_audio_result != data)) logerror(" AUD CPU PC %04x: audio_result_w %02x\n", cpu_get_pc(&space.device()), data); |
| 521 | 534 | |
| 522 | | state->m_audio_result = data; |
| 535 | m_audio_result = data; |
| 523 | 536 | } |
| 524 | 537 | |
| 525 | 538 | |
| r14963 | r14964 | |
| 565 | 578 | |
| 566 | 579 | |
| 567 | 580 | |
| 568 | | static WRITE16_HANDLER( main_cpu_bank_select_w ) |
| 581 | WRITE16_MEMBER(ng_aes_state::main_cpu_bank_select_w) |
| 569 | 582 | { |
| 570 | 583 | UINT32 bank_address; |
| 571 | | UINT32 len = space->machine().region("maincpu")->bytes(); |
| 584 | UINT32 len = machine().region("maincpu")->bytes(); |
| 572 | 585 | |
| 573 | 586 | if ((len <= 0x100000) && (data & 0x07)) |
| 574 | | logerror("PC %06x: warning: bankswitch to %02x but no banks available\n", cpu_get_pc(&space->device()), data); |
| 587 | logerror("PC %06x: warning: bankswitch to %02x but no banks available\n", cpu_get_pc(&space.device()), data); |
| 575 | 588 | else |
| 576 | 589 | { |
| 577 | 590 | bank_address = ((data & 0x07) + 1) * 0x100000; |
| 578 | 591 | |
| 579 | 592 | if (bank_address >= len) |
| 580 | 593 | { |
| 581 | | logerror("PC %06x: warning: bankswitch to empty bank %02x\n", cpu_get_pc(&space->device()), data); |
| 594 | logerror("PC %06x: warning: bankswitch to empty bank %02x\n", cpu_get_pc(&space.device()), data); |
| 582 | 595 | bank_address = 0x100000; |
| 583 | 596 | } |
| 584 | 597 | |
| 585 | | neogeo_set_main_cpu_bank_address(space, bank_address); |
| 598 | neogeo_set_main_cpu_bank_address(&space, bank_address); |
| 586 | 599 | } |
| 587 | 600 | } |
| 588 | 601 | |
| r14963 | r14964 | |
| 632 | 645 | } |
| 633 | 646 | |
| 634 | 647 | |
| 635 | | static READ8_HANDLER( audio_cpu_bank_select_f000_f7ff_r ) |
| 648 | READ8_MEMBER(ng_aes_state::audio_cpu_bank_select_f000_f7ff_r) |
| 636 | 649 | { |
| 637 | | audio_cpu_bank_select(space, 0, offset >> 8); |
| 650 | audio_cpu_bank_select(&space, 0, offset >> 8); |
| 638 | 651 | |
| 639 | 652 | return 0; |
| 640 | 653 | } |
| 641 | 654 | |
| 642 | 655 | |
| 643 | | static READ8_HANDLER( audio_cpu_bank_select_e000_efff_r ) |
| 656 | READ8_MEMBER(ng_aes_state::audio_cpu_bank_select_e000_efff_r) |
| 644 | 657 | { |
| 645 | | audio_cpu_bank_select(space, 1, offset >> 8); |
| 658 | audio_cpu_bank_select(&space, 1, offset >> 8); |
| 646 | 659 | |
| 647 | 660 | return 0; |
| 648 | 661 | } |
| 649 | 662 | |
| 650 | 663 | |
| 651 | | static READ8_HANDLER( audio_cpu_bank_select_c000_dfff_r ) |
| 664 | READ8_MEMBER(ng_aes_state::audio_cpu_bank_select_c000_dfff_r) |
| 652 | 665 | { |
| 653 | | audio_cpu_bank_select(space, 2, offset >> 8); |
| 666 | audio_cpu_bank_select(&space, 2, offset >> 8); |
| 654 | 667 | |
| 655 | 668 | return 0; |
| 656 | 669 | } |
| 657 | 670 | |
| 658 | 671 | |
| 659 | | static READ8_HANDLER( audio_cpu_bank_select_8000_bfff_r ) |
| 672 | READ8_MEMBER(ng_aes_state::audio_cpu_bank_select_8000_bfff_r) |
| 660 | 673 | { |
| 661 | | audio_cpu_bank_select(space, 3, offset >> 8); |
| 674 | audio_cpu_bank_select(&space, 3, offset >> 8); |
| 662 | 675 | |
| 663 | 676 | return 0; |
| 664 | 677 | } |
| r14963 | r14964 | |
| 741 | 754 | * |
| 742 | 755 | *************************************/ |
| 743 | 756 | |
| 744 | | static WRITE16_HANDLER( system_control_w ) |
| 757 | WRITE16_MEMBER(ng_aes_state::system_control_w) |
| 745 | 758 | { |
| 746 | 759 | if (ACCESSING_BITS_0_7) |
| 747 | 760 | { |
| r14963 | r14964 | |
| 750 | 763 | switch (offset & 0x07) |
| 751 | 764 | { |
| 752 | 765 | default: |
| 753 | | case 0x00: neogeo_set_screen_dark(space->machine(), bit); break; |
| 754 | | case 0x01: set_main_cpu_vector_table_source(space->machine(), bit); |
| 755 | | set_audio_cpu_rom_source(space, bit); /* this is a guess */ |
| 766 | case 0x00: neogeo_set_screen_dark(machine(), bit); break; |
| 767 | case 0x01: set_main_cpu_vector_table_source(machine(), bit); |
| 768 | set_audio_cpu_rom_source(&space, bit); /* this is a guess */ |
| 756 | 769 | break; |
| 757 | | case 0x05: neogeo_set_fixed_layer_source(space->machine(), bit); break; |
| 758 | | // case 0x06: set_save_ram_unlock(space->machine(), bit); break; |
| 759 | | case 0x07: neogeo_set_palette_bank(space->machine(), bit); break; |
| 770 | case 0x05: neogeo_set_fixed_layer_source(machine(), bit); break; |
| 771 | // case 0x06: set_save_ram_unlock(machine(), bit); break; |
| 772 | case 0x07: neogeo_set_palette_bank(machine(), bit); break; |
| 760 | 773 | |
| 761 | 774 | case 0x02: /* unknown - HC32 middle pin 1 */ |
| 762 | 775 | case 0x03: /* unknown - uPD4990 pin ? */ |
| 763 | 776 | case 0x04: /* unknown - HC32 middle pin 10 */ |
| 764 | | logerror("PC: %x Unmapped system control write. Offset: %x Data: %x\n", cpu_get_pc(&space->device()), offset & 0x07, bit); |
| 777 | logerror("PC: %x Unmapped system control write. Offset: %x Data: %x\n", cpu_get_pc(&space.device()), offset & 0x07, bit); |
| 765 | 778 | break; |
| 766 | 779 | } |
| 767 | 780 | |
| 768 | | if (LOG_VIDEO_SYSTEM && ((offset & 0x07) != 0x06)) logerror("PC: %x System control write. Offset: %x Data: %x\n", cpu_get_pc(&space->device()), offset & 0x07, bit); |
| 781 | if (LOG_VIDEO_SYSTEM && ((offset & 0x07) != 0x06)) logerror("PC: %x System control write. Offset: %x Data: %x\n", cpu_get_pc(&space.device()), offset & 0x07, bit); |
| 769 | 782 | } |
| 770 | 783 | } |
| 771 | 784 | |
| r14963 | r14964 | |
| 856 | 869 | } |
| 857 | 870 | } |
| 858 | 871 | |
| 859 | | static READ16_HANDLER( neocd_control_r ) |
| 872 | READ16_MEMBER(ng_aes_state::neocd_control_r) |
| 860 | 873 | { |
| 861 | | ng_aes_state *state = space->machine().driver_data<ng_aes_state>(); |
| 862 | 874 | |
| 863 | 875 | switch(offset) |
| 864 | 876 | { |
| 865 | 877 | case 0x64/2: // source address, high word |
| 866 | | return (state->m_neocd_ctrl.addr_source >> 16) & 0xffff; |
| 878 | return (m_neocd_ctrl.addr_source >> 16) & 0xffff; |
| 867 | 879 | case 0x66/2: // source address, low word |
| 868 | | return state->m_neocd_ctrl.addr_source & 0xffff; |
| 880 | return m_neocd_ctrl.addr_source & 0xffff; |
| 869 | 881 | case 0x68/2: // target address, high word |
| 870 | | return (state->m_neocd_ctrl.addr_target >> 16) & 0xffff; |
| 882 | return (m_neocd_ctrl.addr_target >> 16) & 0xffff; |
| 871 | 883 | case 0x6a/2: // target address, low word |
| 872 | | return state->m_neocd_ctrl.addr_target & 0xffff; |
| 884 | return m_neocd_ctrl.addr_target & 0xffff; |
| 873 | 885 | case 0x6c/2: // fill word |
| 874 | | return state->m_neocd_ctrl.fill_word; |
| 886 | return m_neocd_ctrl.fill_word; |
| 875 | 887 | case 0x70/2: // word count |
| 876 | | return (state->m_neocd_ctrl.word_count >> 16) & 0xffff; |
| 888 | return (m_neocd_ctrl.word_count >> 16) & 0xffff; |
| 877 | 889 | case 0x72/2: |
| 878 | | return state->m_neocd_ctrl.word_count & 0xffff; |
| 890 | return m_neocd_ctrl.word_count & 0xffff; |
| 879 | 891 | case 0x7e/2: // DMA parameters |
| 880 | 892 | case 0x80/2: |
| 881 | 893 | case 0x82/2: |
| r14963 | r14964 | |
| 885 | 897 | case 0x8a/2: |
| 886 | 898 | case 0x8c/2: |
| 887 | 899 | case 0x8e/2: |
| 888 | | return state->m_neocd_ctrl.dma_mode[offset-(0x7e/2)]; |
| 900 | return m_neocd_ctrl.dma_mode[offset-(0x7e/2)]; |
| 889 | 901 | break; |
| 890 | 902 | case 0x105/2: |
| 891 | | return state->m_neocd_ctrl.area_sel; |
| 903 | return m_neocd_ctrl.area_sel; |
| 892 | 904 | case 0x11c/2: |
| 893 | 905 | logerror("CTRL: Read region code.\n"); |
| 894 | 906 | return 0x0600; // we'll just force USA region for now |
| 895 | 907 | case 0x1a0/2: |
| 896 | | return state->m_neocd_ctrl.spr_bank_sel; |
| 908 | return m_neocd_ctrl.spr_bank_sel; |
| 897 | 909 | break; |
| 898 | 910 | case 0x1a2/2: |
| 899 | | return state->m_neocd_ctrl.pcm_bank_sel; |
| 911 | return m_neocd_ctrl.pcm_bank_sel; |
| 900 | 912 | break; |
| 901 | 913 | default: |
| 902 | 914 | logerror("CTRL: Read offset %04x\n",offset); |
| r14963 | r14964 | |
| 905 | 917 | return 0; |
| 906 | 918 | } |
| 907 | 919 | |
| 908 | | static WRITE16_HANDLER( neocd_control_w ) |
| 920 | WRITE16_MEMBER(ng_aes_state::neocd_control_w) |
| 909 | 921 | { |
| 910 | | ng_aes_state *state = space->machine().driver_data<ng_aes_state>(); |
| 911 | 922 | switch(offset) |
| 912 | 923 | { |
| 913 | 924 | case 0x60/2: // Start DMA transfer |
| 914 | 925 | if((data & 0xff) == 0x40) |
| 915 | | neocd_do_dma(space); |
| 926 | neocd_do_dma(&space); |
| 916 | 927 | break; |
| 917 | 928 | case 0x64/2: // source address, high word |
| 918 | | state->m_neocd_ctrl.addr_source = (state->m_neocd_ctrl.addr_source & 0x0000ffff) | (data << 16); |
| 919 | | logerror("CTRL: Set source address to %08x\n",state->m_neocd_ctrl.addr_source); |
| 929 | m_neocd_ctrl.addr_source = (m_neocd_ctrl.addr_source & 0x0000ffff) | (data << 16); |
| 930 | logerror("CTRL: Set source address to %08x\n",m_neocd_ctrl.addr_source); |
| 920 | 931 | break; |
| 921 | 932 | case 0x66/2: // source address, low word |
| 922 | | state->m_neocd_ctrl.addr_source = (state->m_neocd_ctrl.addr_source & 0xffff0000) | data; |
| 923 | | logerror("CTRL: Set source address to %08x\n",state->m_neocd_ctrl.addr_source); |
| 933 | m_neocd_ctrl.addr_source = (m_neocd_ctrl.addr_source & 0xffff0000) | data; |
| 934 | logerror("CTRL: Set source address to %08x\n",m_neocd_ctrl.addr_source); |
| 924 | 935 | break; |
| 925 | 936 | case 0x68/2: // target address, high word |
| 926 | | state->m_neocd_ctrl.addr_target = (state->m_neocd_ctrl.addr_target & 0x0000ffff) | (data << 16); |
| 927 | | logerror("CTRL: Set target address to %08x\n",state->m_neocd_ctrl.addr_target); |
| 937 | m_neocd_ctrl.addr_target = (m_neocd_ctrl.addr_target & 0x0000ffff) | (data << 16); |
| 938 | logerror("CTRL: Set target address to %08x\n",m_neocd_ctrl.addr_target); |
| 928 | 939 | break; |
| 929 | 940 | case 0x6a/2: // target address, low word |
| 930 | | state->m_neocd_ctrl.addr_target = (state->m_neocd_ctrl.addr_target & 0xffff0000) | data; |
| 931 | | logerror("CTRL: Set target address to %08x\n",state->m_neocd_ctrl.addr_target); |
| 941 | m_neocd_ctrl.addr_target = (m_neocd_ctrl.addr_target & 0xffff0000) | data; |
| 942 | logerror("CTRL: Set target address to %08x\n",m_neocd_ctrl.addr_target); |
| 932 | 943 | break; |
| 933 | 944 | case 0x6c/2: // fill word |
| 934 | | state->m_neocd_ctrl.fill_word = data; |
| 945 | m_neocd_ctrl.fill_word = data; |
| 935 | 946 | logerror("CTRL: Set fill word to %04x\n",data); |
| 936 | 947 | break; |
| 937 | 948 | case 0x70/2: // word count |
| 938 | | state->m_neocd_ctrl.word_count = (state->m_neocd_ctrl.word_count & 0x0000ffff) | (data << 16); |
| 939 | | logerror("CTRL: Set word count to %i\n",state->m_neocd_ctrl.word_count); |
| 949 | m_neocd_ctrl.word_count = (m_neocd_ctrl.word_count & 0x0000ffff) | (data << 16); |
| 950 | logerror("CTRL: Set word count to %i\n",m_neocd_ctrl.word_count); |
| 940 | 951 | break; |
| 941 | 952 | case 0x72/2: // word count (low word) |
| 942 | | state->m_neocd_ctrl.word_count = (state->m_neocd_ctrl.word_count & 0xffff0000) | data; |
| 943 | | logerror("CTRL: Set word count to %i\n",state->m_neocd_ctrl.word_count); |
| 953 | m_neocd_ctrl.word_count = (m_neocd_ctrl.word_count & 0xffff0000) | data; |
| 954 | logerror("CTRL: Set word count to %i\n",m_neocd_ctrl.word_count); |
| 944 | 955 | break; |
| 945 | 956 | case 0x7e/2: // DMA parameters |
| 946 | 957 | case 0x80/2: |
| r14963 | r14964 | |
| 951 | 962 | case 0x8a/2: |
| 952 | 963 | case 0x8c/2: |
| 953 | 964 | case 0x8e/2: |
| 954 | | state->m_neocd_ctrl.dma_mode[offset-(0x7e/2)] = data; |
| 965 | m_neocd_ctrl.dma_mode[offset-(0x7e/2)] = data; |
| 955 | 966 | logerror("CTRL: DMA parameter %i set to %04x\n",offset-(0x7e/2),data); |
| 956 | 967 | break; |
| 957 | 968 | case 0x104/2: |
| 958 | | state->m_neocd_ctrl.area_sel = data & 0x00ff; |
| 969 | m_neocd_ctrl.area_sel = data & 0x00ff; |
| 959 | 970 | logerror("CTRL: 0xExxxxx set to area %i\n",data & 0xff); |
| 960 | 971 | break; |
| 961 | 972 | case 0x140/2: // end sprite transfer |
| 962 | | video_reset_neogeo(space->machine()); |
| 973 | video_reset_neogeo(machine()); |
| 963 | 974 | break; |
| 964 | 975 | case 0x142/2: // end PCM transfer |
| 965 | 976 | break; |
| 966 | 977 | case 0x146/2: // end Z80 transfer |
| 967 | | cputag_set_input_line(space->machine(),"audiocpu",INPUT_LINE_RESET,PULSE_LINE); |
| 978 | cputag_set_input_line(machine(),"audiocpu",INPUT_LINE_RESET,PULSE_LINE); |
| 968 | 979 | break; |
| 969 | 980 | case 0x148/2: // end FIX transfer |
| 970 | | video_reset_neogeo(space->machine()); |
| 981 | video_reset_neogeo(machine()); |
| 971 | 982 | break; |
| 972 | 983 | case 0x1a0/2: |
| 973 | | state->m_neocd_ctrl.spr_bank_sel = data & 0xff; |
| 984 | m_neocd_ctrl.spr_bank_sel = data & 0xff; |
| 974 | 985 | logerror("CTRL: Sprite area set to bank %i\n",data & 0xff); |
| 975 | 986 | break; |
| 976 | 987 | case 0x1a2/2: |
| 977 | | state->m_neocd_ctrl.pcm_bank_sel = data & 0xff; |
| 988 | m_neocd_ctrl.pcm_bank_sel = data & 0xff; |
| 978 | 989 | logerror("CTRL: PCM area set to bank %i\n",data & 0xff); |
| 979 | 990 | break; |
| 980 | 991 | default: |
| r14963 | r14964 | |
| 987 | 998 | * When the Z80 space is banked in to 0xe00000, only the low byte of each word is used |
| 988 | 999 | */ |
| 989 | 1000 | |
| 990 | | static READ16_HANDLER(neocd_transfer_r) |
| 1001 | READ16_MEMBER(ng_aes_state::neocd_transfer_r) |
| 991 | 1002 | { |
| 992 | | ng_aes_state *state = space->machine().driver_data<ng_aes_state>(); |
| 993 | 1003 | UINT16 ret = 0x0000; |
| 994 | | UINT8* Z80 = space->machine().region("audiocpu")->base(); |
| 995 | | UINT8* PCM = space->machine().region("ymsnd")->base(); |
| 996 | | UINT8* FIX = space->machine().region("fixed")->base(); |
| 997 | | UINT16* SPR = (UINT16*)(*space->machine().region("sprites")); |
| 1004 | UINT8* Z80 = machine().region("audiocpu")->base(); |
| 1005 | UINT8* PCM = machine().region("ymsnd")->base(); |
| 1006 | UINT8* FIX = machine().region("fixed")->base(); |
| 1007 | UINT16* SPR = (UINT16*)(*machine().region("sprites")); |
| 998 | 1008 | |
| 999 | | switch(state->m_neocd_ctrl.area_sel) |
| 1009 | switch(m_neocd_ctrl.area_sel) |
| 1000 | 1010 | { |
| 1001 | 1011 | case NEOCD_AREA_AUDIO: |
| 1002 | 1012 | ret = Z80[offset & 0xffff] | 0xff00; |
| 1003 | 1013 | break; |
| 1004 | 1014 | case NEOCD_AREA_PCM: |
| 1005 | | ret = PCM[offset + (0x100000*state->m_neocd_ctrl.pcm_bank_sel)] | 0xff00; |
| 1015 | ret = PCM[offset + (0x100000*m_neocd_ctrl.pcm_bank_sel)] | 0xff00; |
| 1006 | 1016 | break; |
| 1007 | 1017 | case NEOCD_AREA_SPR: |
| 1008 | | ret = SPR[offset + (0x80000*state->m_neocd_ctrl.spr_bank_sel)]; |
| 1018 | ret = SPR[offset + (0x80000*m_neocd_ctrl.spr_bank_sel)]; |
| 1009 | 1019 | break; |
| 1010 | 1020 | case NEOCD_AREA_FIX: |
| 1011 | 1021 | ret = FIX[offset & 0x1ffff] | 0xff00; |
| r14963 | r14964 | |
| 1015 | 1025 | return ret; |
| 1016 | 1026 | } |
| 1017 | 1027 | |
| 1018 | | static WRITE16_HANDLER(neocd_transfer_w) |
| 1028 | WRITE16_MEMBER(ng_aes_state::neocd_transfer_w) |
| 1019 | 1029 | { |
| 1020 | | ng_aes_state *state = space->machine().driver_data<ng_aes_state>(); |
| 1021 | | UINT8* Z80 = space->machine().region("audiocpu")->base(); |
| 1022 | | UINT8* PCM = space->machine().region("ymsnd")->base(); |
| 1023 | | UINT8* FIX = space->machine().region("fixed")->base(); |
| 1024 | | UINT16* SPR = (UINT16*)(*space->machine().region("sprites")); |
| 1030 | UINT8* Z80 = machine().region("audiocpu")->base(); |
| 1031 | UINT8* PCM = machine().region("ymsnd")->base(); |
| 1032 | UINT8* FIX = machine().region("fixed")->base(); |
| 1033 | UINT16* SPR = (UINT16*)(*machine().region("sprites")); |
| 1025 | 1034 | |
| 1026 | | switch(state->m_neocd_ctrl.area_sel) |
| 1035 | switch(m_neocd_ctrl.area_sel) |
| 1027 | 1036 | { |
| 1028 | 1037 | case NEOCD_AREA_AUDIO: |
| 1029 | 1038 | Z80[offset & 0xffff] = data & 0xff; |
| 1030 | 1039 | break; |
| 1031 | 1040 | case NEOCD_AREA_PCM: |
| 1032 | | PCM[offset + (0x100000*state->m_neocd_ctrl.pcm_bank_sel)] = data & 0xff; |
| 1041 | PCM[offset + (0x100000*m_neocd_ctrl.pcm_bank_sel)] = data & 0xff; |
| 1033 | 1042 | break; |
| 1034 | 1043 | case NEOCD_AREA_SPR: |
| 1035 | | COMBINE_DATA(SPR+(offset + (0x80000*state->m_neocd_ctrl.spr_bank_sel))); |
| 1044 | COMBINE_DATA(SPR+(offset + (0x80000*m_neocd_ctrl.spr_bank_sel))); |
| 1036 | 1045 | break; |
| 1037 | 1046 | case NEOCD_AREA_FIX: |
| 1038 | 1047 | FIX[offset & 0x1ffff] = data & 0xff; |
| r14963 | r14964 | |
| 1045 | 1054 | * Handling selectable controller types |
| 1046 | 1055 | */ |
| 1047 | 1056 | |
| 1048 | | static READ16_HANDLER( aes_in0_r ) |
| 1057 | READ16_MEMBER(ng_aes_state::aes_in0_r) |
| 1049 | 1058 | { |
| 1050 | | neogeo_state *state = space->machine().driver_data<neogeo_state>(); |
| 1051 | 1059 | UINT32 ret = 0xffff; |
| 1052 | | UINT32 ctrl = input_port_read(space->machine(),"CTRLSEL"); |
| 1060 | UINT32 ctrl = input_port_read(machine(),"CTRLSEL"); |
| 1053 | 1061 | |
| 1054 | 1062 | switch(ctrl & 0x0f) |
| 1055 | 1063 | { |
| r14963 | r14964 | |
| 1057 | 1065 | ret = 0xffff; |
| 1058 | 1066 | break; |
| 1059 | 1067 | case 0x01: |
| 1060 | | ret = input_port_read(space->machine(),"IN0"); |
| 1068 | ret = input_port_read(machine(),"IN0"); |
| 1061 | 1069 | break; |
| 1062 | 1070 | case 0x02: |
| 1063 | | switch (state->m_controller_select) |
| 1071 | switch (m_controller_select) |
| 1064 | 1072 | { |
| 1065 | | case 0x09: ret = input_port_read(space->machine(), "MJ01_P1"); break; |
| 1066 | | case 0x12: ret = input_port_read(space->machine(), "MJ02_P1"); break; |
| 1067 | | case 0x1b: ret = input_port_read(space->machine(), "MJ03_P1"); break; /* player 1 normal inputs? */ |
| 1068 | | case 0x24: ret = input_port_read(space->machine(), "MJ04_P1"); break; |
| 1073 | case 0x09: ret = input_port_read(machine(), "MJ01_P1"); break; |
| 1074 | case 0x12: ret = input_port_read(machine(), "MJ02_P1"); break; |
| 1075 | case 0x1b: ret = input_port_read(machine(), "MJ03_P1"); break; /* player 1 normal inputs? */ |
| 1076 | case 0x24: ret = input_port_read(machine(), "MJ04_P1"); break; |
| 1069 | 1077 | default: |
| 1070 | | ret = input_port_read(space->machine(),"IN0"); |
| 1078 | ret = input_port_read(machine(),"IN0"); |
| 1071 | 1079 | break; |
| 1072 | 1080 | } |
| 1073 | 1081 | break; |
| r14963 | r14964 | |
| 1076 | 1084 | return ret; |
| 1077 | 1085 | } |
| 1078 | 1086 | |
| 1079 | | static READ16_HANDLER( aes_in1_r ) |
| 1087 | READ16_MEMBER(ng_aes_state::aes_in1_r) |
| 1080 | 1088 | { |
| 1081 | | neogeo_state *state = space->machine().driver_data<neogeo_state>(); |
| 1082 | 1089 | UINT32 ret = 0xffff; |
| 1083 | | UINT32 ctrl = input_port_read(space->machine(),"CTRLSEL"); |
| 1090 | UINT32 ctrl = input_port_read(machine(),"CTRLSEL"); |
| 1084 | 1091 | |
| 1085 | 1092 | switch(ctrl & 0xf0) |
| 1086 | 1093 | { |
| r14963 | r14964 | |
| 1088 | 1095 | ret = 0xffff; |
| 1089 | 1096 | break; |
| 1090 | 1097 | case 0x10: |
| 1091 | | ret = input_port_read(space->machine(),"IN1"); |
| 1098 | ret = input_port_read(machine(),"IN1"); |
| 1092 | 1099 | break; |
| 1093 | 1100 | case 0x20: |
| 1094 | | switch (state->m_controller_select) |
| 1101 | switch (m_controller_select) |
| 1095 | 1102 | { |
| 1096 | | case 0x09: ret = input_port_read(space->machine(), "MJ01_P2"); break; |
| 1097 | | case 0x12: ret = input_port_read(space->machine(), "MJ02_P2"); break; |
| 1098 | | case 0x1b: ret = input_port_read(space->machine(), "MJ03_P2"); break; /* player 2 normal inputs? */ |
| 1099 | | case 0x24: ret = input_port_read(space->machine(), "MJ04_P2"); break; |
| 1103 | case 0x09: ret = input_port_read(machine(), "MJ01_P2"); break; |
| 1104 | case 0x12: ret = input_port_read(machine(), "MJ02_P2"); break; |
| 1105 | case 0x1b: ret = input_port_read(machine(), "MJ03_P2"); break; /* player 2 normal inputs? */ |
| 1106 | case 0x24: ret = input_port_read(machine(), "MJ04_P2"); break; |
| 1100 | 1107 | default: |
| 1101 | | ret = input_port_read(space->machine(),"IN1"); |
| 1108 | ret = input_port_read(machine(),"IN1"); |
| 1102 | 1109 | break; |
| 1103 | 1110 | } |
| 1104 | 1111 | break; |
| r14963 | r14964 | |
| 1108 | 1115 | } |
| 1109 | 1116 | |
| 1110 | 1117 | |
| 1111 | | static READ16_HANDLER(aes_in2_r) |
| 1118 | READ16_MEMBER(ng_aes_state::aes_in2_r) |
| 1112 | 1119 | { |
| 1113 | | UINT32 in2 = input_port_read(space->machine(),"IN2"); |
| 1120 | UINT32 in2 = input_port_read(machine(),"IN2"); |
| 1114 | 1121 | UINT32 ret = in2; |
| 1115 | | UINT32 sel = input_port_read(space->machine(),"CTRLSEL"); |
| 1116 | | neogeo_state *state = space->machine().driver_data<neogeo_state>(); |
| 1122 | UINT32 sel = input_port_read(machine(),"CTRLSEL"); |
| 1117 | 1123 | |
| 1118 | | if((sel & 0x02) && (state->m_controller_select == 0x24)) |
| 1124 | if((sel & 0x02) && (m_controller_select == 0x24)) |
| 1119 | 1125 | ret ^= 0x0200; |
| 1120 | 1126 | |
| 1121 | | if((sel & 0x20) && (state->m_controller_select == 0x24)) |
| 1127 | if((sel & 0x20) && (m_controller_select == 0x24)) |
| 1122 | 1128 | ret ^= 0x0800; |
| 1123 | 1129 | |
| 1124 | 1130 | return ret; |
| r14963 | r14964 | |
| 1248 | 1254 | |
| 1249 | 1255 | /* reset system control registers */ |
| 1250 | 1256 | for (offs = 0; offs < 8; offs++) |
| 1251 | | system_control_w(space, offs, 0, 0x00ff); |
| 1257 | state->system_control_w(*space, offs, 0, 0x00ff); |
| 1252 | 1258 | |
| 1253 | 1259 | machine.device("maincpu")->reset(); |
| 1254 | 1260 | |
| r14963 | r14964 | |
| 1279 | 1285 | AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x0f0000) AM_RAM |
| 1280 | 1286 | /* some games have protection devices in the 0x200000 region, it appears to map to cart space, not surprising, the ROM is read here too */ |
| 1281 | 1287 | AM_RANGE(0x200000, 0x2fffff) AM_ROMBANK(NEOGEO_BANK_CARTRIDGE) |
| 1282 | | AM_RANGE(0x2ffff0, 0x2fffff) AM_WRITE_LEGACY(main_cpu_bank_select_w) |
| 1283 | | AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ff7e) AM_READ_LEGACY(aes_in0_r) |
| 1288 | AM_RANGE(0x2ffff0, 0x2fffff) AM_WRITE(main_cpu_bank_select_w) |
| 1289 | AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ff7e) AM_READ(aes_in0_r) |
| 1284 | 1290 | AM_RANGE(0x300080, 0x300081) AM_MIRROR(0x01ff7e) AM_READ_PORT("IN4") |
| 1285 | 1291 | AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITENOP // AES has no watchdog |
| 1286 | | AM_RANGE(0x320000, 0x320001) AM_MIRROR(0x01fffe) AM_READ_PORT("IN3") AM_WRITE_LEGACY(audio_command_w) |
| 1287 | | AM_RANGE(0x340000, 0x340001) AM_MIRROR(0x01fffe) AM_READ_LEGACY(aes_in1_r) |
| 1292 | AM_RANGE(0x320000, 0x320001) AM_MIRROR(0x01fffe) AM_READ_PORT("IN3") AM_WRITE(audio_command_w) |
| 1293 | AM_RANGE(0x340000, 0x340001) AM_MIRROR(0x01fffe) AM_READ(aes_in1_r) |
| 1288 | 1294 | AM_RANGE(0x360000, 0x37ffff) AM_READ(neogeo_unmapped_r) |
| 1289 | | AM_RANGE(0x380000, 0x380001) AM_MIRROR(0x01fffe) AM_READ_LEGACY(aes_in2_r) |
| 1290 | | AM_RANGE(0x380000, 0x38007f) AM_MIRROR(0x01ff80) AM_WRITE_LEGACY(io_control_w) |
| 1291 | | AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITE_LEGACY(system_control_w) |
| 1295 | AM_RANGE(0x380000, 0x380001) AM_MIRROR(0x01fffe) AM_READ(aes_in2_r) |
| 1296 | AM_RANGE(0x380000, 0x38007f) AM_MIRROR(0x01ff80) AM_WRITE(io_control_w) |
| 1297 | AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITE(system_control_w) |
| 1292 | 1298 | AM_RANGE(0x3c0000, 0x3c0007) AM_MIRROR(0x01fff8) AM_READ(neogeo_video_register_r) |
| 1293 | 1299 | AM_RANGE(0x3c0000, 0x3c000f) AM_MIRROR(0x01fff0) AM_WRITE(neogeo_video_register_w) |
| 1294 | 1300 | AM_RANGE(0x3e0000, 0x3fffff) AM_READ(neogeo_unmapped_r) |
| 1295 | 1301 | AM_RANGE(0x400000, 0x401fff) AM_MIRROR(0x3fe000) AM_READWRITE(neogeo_paletteram_r, neogeo_paletteram_w) |
| 1296 | | AM_RANGE(0x800000, 0x800fff) AM_READWRITE_LEGACY(memcard_r, memcard_w) |
| 1302 | AM_RANGE(0x800000, 0x800fff) AM_READWRITE(memcard_r, memcard_w) |
| 1297 | 1303 | AM_RANGE(0xc00000, 0xc1ffff) AM_MIRROR(0x0e0000) AM_ROMBANK(NEOGEO_BANK_BIOS) |
| 1298 | | AM_RANGE(0xd00000, 0xd0ffff) AM_MIRROR(0x0f0000) AM_READ(neogeo_unmapped_r) //AM_RAM_WRITE_LEGACY(save_ram_w) AM_BASE_LEGACY(&save_ram) |
| 1304 | AM_RANGE(0xd00000, 0xd0ffff) AM_MIRROR(0x0f0000) AM_READ(neogeo_unmapped_r) //AM_RAM_WRITE(save_ram_w) AM_BASE_LEGACY(&save_ram) |
| 1299 | 1305 | AM_RANGE(0xe00000, 0xffffff) AM_READ(neogeo_unmapped_r) |
| 1300 | 1306 | ADDRESS_MAP_END |
| 1301 | 1307 | |
| r14963 | r14964 | |
| 1305 | 1311 | AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x0f0000) AM_RAM AM_BASE_LEGACY(&neocd_work_ram) |
| 1306 | 1312 | /* some games have protection devices in the 0x200000 region, it appears to map to cart space, not surprising, the ROM is read here too */ |
| 1307 | 1313 | AM_RANGE(0x200000, 0x2fffff) AM_ROMBANK(NEOGEO_BANK_CARTRIDGE) |
| 1308 | | AM_RANGE(0x2ffff0, 0x2fffff) AM_WRITE_LEGACY(main_cpu_bank_select_w) |
| 1309 | | AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ff7e) AM_READ_LEGACY(aes_in0_r) |
| 1314 | AM_RANGE(0x2ffff0, 0x2fffff) AM_WRITE(main_cpu_bank_select_w) |
| 1315 | AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ff7e) AM_READ(aes_in0_r) |
| 1310 | 1316 | AM_RANGE(0x300080, 0x300081) AM_MIRROR(0x01ff7e) AM_READ_PORT("IN4") |
| 1311 | 1317 | AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITENOP // AES has no watchdog |
| 1312 | | AM_RANGE(0x320000, 0x320001) AM_MIRROR(0x01fffe) AM_READ_PORT("IN3") AM_WRITE_LEGACY(audio_command_w) |
| 1313 | | AM_RANGE(0x340000, 0x340001) AM_MIRROR(0x01fffe) AM_READ_LEGACY(aes_in1_r) |
| 1318 | AM_RANGE(0x320000, 0x320001) AM_MIRROR(0x01fffe) AM_READ_PORT("IN3") AM_WRITE(audio_command_w) |
| 1319 | AM_RANGE(0x340000, 0x340001) AM_MIRROR(0x01fffe) AM_READ(aes_in1_r) |
| 1314 | 1320 | AM_RANGE(0x360000, 0x37ffff) AM_READ(neogeo_unmapped_r) |
| 1315 | | AM_RANGE(0x380000, 0x380001) AM_MIRROR(0x01fffe) AM_READ_LEGACY(aes_in2_r) |
| 1316 | | AM_RANGE(0x380000, 0x38007f) AM_MIRROR(0x01ff80) AM_WRITE_LEGACY(io_control_w) |
| 1317 | | AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITE_LEGACY(system_control_w) |
| 1321 | AM_RANGE(0x380000, 0x380001) AM_MIRROR(0x01fffe) AM_READ(aes_in2_r) |
| 1322 | AM_RANGE(0x380000, 0x38007f) AM_MIRROR(0x01ff80) AM_WRITE(io_control_w) |
| 1323 | AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITE(system_control_w) |
| 1318 | 1324 | AM_RANGE(0x3c0000, 0x3c0007) AM_MIRROR(0x01fff8) AM_READ(neogeo_video_register_r) |
| 1319 | 1325 | AM_RANGE(0x3c0000, 0x3c000f) AM_MIRROR(0x01fff0) AM_WRITE(neogeo_video_register_w) |
| 1320 | 1326 | AM_RANGE(0x3e0000, 0x3fffff) AM_READ(neogeo_unmapped_r) |
| 1321 | 1327 | AM_RANGE(0x400000, 0x401fff) AM_MIRROR(0x3fe000) AM_READWRITE(neogeo_paletteram_r, neogeo_paletteram_w) |
| 1322 | | AM_RANGE(0x800000, 0x803fff) AM_READWRITE_LEGACY(neocd_memcard_r, neocd_memcard_w) |
| 1328 | AM_RANGE(0x800000, 0x803fff) AM_READWRITE(neocd_memcard_r, neocd_memcard_w) |
| 1323 | 1329 | AM_RANGE(0xc00000, 0xcfffff) AM_ROMBANK(NEOGEO_BANK_BIOS) |
| 1324 | | AM_RANGE(0xd00000, 0xd0ffff) AM_MIRROR(0x0f0000) AM_READ(neogeo_unmapped_r) //AM_RAM_WRITE_LEGACY(save_ram_w) AM_BASE_LEGACY(&save_ram) |
| 1325 | | AM_RANGE(0xe00000, 0xefffff) AM_READWRITE_LEGACY(neocd_transfer_r,neocd_transfer_w) |
| 1330 | AM_RANGE(0xd00000, 0xd0ffff) AM_MIRROR(0x0f0000) AM_READ(neogeo_unmapped_r) //AM_RAM_WRITE(save_ram_w) AM_BASE_LEGACY(&save_ram) |
| 1331 | AM_RANGE(0xe00000, 0xefffff) AM_READWRITE(neocd_transfer_r,neocd_transfer_w) |
| 1326 | 1332 | AM_RANGE(0xf00000, 0xfeffff) AM_READ(neogeo_unmapped_r) |
| 1327 | | AM_RANGE(0xff0000, 0xff01ff) AM_READWRITE_LEGACY(neocd_control_r, neocd_control_w) // CDROM / DMA |
| 1333 | AM_RANGE(0xff0000, 0xff01ff) AM_READWRITE(neocd_control_r, neocd_control_w) // CDROM / DMA |
| 1328 | 1334 | AM_RANGE(0xff0200, 0xffffff) AM_READ(neogeo_unmapped_r) |
| 1329 | 1335 | ADDRESS_MAP_END |
| 1330 | 1336 | |
| r14963 | r14964 | |
| 1353 | 1359 | *************************************/ |
| 1354 | 1360 | |
| 1355 | 1361 | static ADDRESS_MAP_START( audio_io_map, AS_IO, 8, ng_aes_state ) |
| 1356 | | /*AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READWRITE_LEGACY(audio_command_r, audio_cpu_clear_nmi_w);*/ /* may not and NMI clear */ |
| 1357 | | AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READ_LEGACY(audio_command_r) |
| 1362 | /*AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READWRITE(audio_command_r, audio_cpu_clear_nmi_w);*/ /* may not and NMI clear */ |
| 1363 | AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READ(audio_command_r) |
| 1358 | 1364 | AM_RANGE(0x04, 0x07) AM_MIRROR(0xff00) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) |
| 1359 | 1365 | AM_RANGE(0x08, 0x08) AM_MIRROR(0xff00) /* write - NMI enable / acknowledge? (the data written doesn't matter) */ |
| 1360 | | AM_RANGE(0x08, 0x08) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ_LEGACY(audio_cpu_bank_select_f000_f7ff_r) |
| 1361 | | AM_RANGE(0x09, 0x09) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ_LEGACY(audio_cpu_bank_select_e000_efff_r) |
| 1362 | | AM_RANGE(0x0a, 0x0a) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ_LEGACY(audio_cpu_bank_select_c000_dfff_r) |
| 1363 | | AM_RANGE(0x0b, 0x0b) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ_LEGACY(audio_cpu_bank_select_8000_bfff_r) |
| 1364 | | AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xff00) AM_WRITE_LEGACY(audio_result_w) |
| 1366 | AM_RANGE(0x08, 0x08) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_f000_f7ff_r) |
| 1367 | AM_RANGE(0x09, 0x09) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_e000_efff_r) |
| 1368 | AM_RANGE(0x0a, 0x0a) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_c000_dfff_r) |
| 1369 | AM_RANGE(0x0b, 0x0b) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_8000_bfff_r) |
| 1370 | AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xff00) AM_WRITE(audio_result_w) |
| 1365 | 1371 | AM_RANGE(0x18, 0x18) AM_MIRROR(0xff00) /* write - NMI disable? (the data written doesn't matter) */ |
| 1366 | 1372 | ADDRESS_MAP_END |
| 1367 | 1373 | |
src/mess/drivers/fm7.c
| r14963 | r14964 | |
| 199 | 199 | * bit 7 - SYNDET |
| 200 | 200 | * |
| 201 | 201 | */ |
| 202 | | static WRITE8_HANDLER( fm7_irq_mask_w ) |
| 202 | WRITE8_MEMBER(fm7_state::fm7_irq_mask_w) |
| 203 | 203 | { |
| 204 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 205 | | state->m_irq_mask = data; |
| 206 | | logerror("IRQ mask set: 0x%02x\n",state->m_irq_mask); |
| 204 | m_irq_mask = data; |
| 205 | logerror("IRQ mask set: 0x%02x\n",m_irq_mask); |
| 207 | 206 | } |
| 208 | 207 | |
| 209 | 208 | /* |
| r14963 | r14964 | |
| 219 | 218 | * bit 6 - buzzer on for 205ms |
| 220 | 219 | * bit 7 - buzzer on/off |
| 221 | 220 | */ |
| 222 | | static READ8_HANDLER( fm7_irq_cause_r ) |
| 221 | READ8_MEMBER(fm7_state::fm7_irq_cause_r) |
| 223 | 222 | { |
| 224 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 225 | | UINT8 ret = ~state->m_irq_flags; |
| 223 | UINT8 ret = ~m_irq_flags; |
| 226 | 224 | |
| 227 | 225 | // Timer and Printer IRQ flags are cleared when this port is read |
| 228 | 226 | // Keyboard IRQ flag is cleared when the scancode is read from |
| 229 | 227 | // either keyboard data port (main CPU 0xfd01 or sub CPU 0xd401) |
| 230 | | if(state->m_irq_flags & 0x04) |
| 231 | | main_irq_clear_flag(space->machine(),IRQ_FLAG_TIMER); |
| 232 | | if(state->m_irq_flags & 0x02) |
| 233 | | main_irq_clear_flag(space->machine(),IRQ_FLAG_PRINTER); |
| 228 | if(m_irq_flags & 0x04) |
| 229 | main_irq_clear_flag(machine(),IRQ_FLAG_TIMER); |
| 230 | if(m_irq_flags & 0x02) |
| 231 | main_irq_clear_flag(machine(),IRQ_FLAG_PRINTER); |
| 234 | 232 | |
| 235 | 233 | logerror("IRQ flags read: 0x%02x\n",ret); |
| 236 | 234 | return ret; |
| r14963 | r14964 | |
| 242 | 240 | logerror("timed beeper off\n"); |
| 243 | 241 | } |
| 244 | 242 | |
| 245 | | static WRITE8_HANDLER( fm7_beeper_w ) |
| 243 | WRITE8_MEMBER(fm7_state::fm7_beeper_w) |
| 246 | 244 | { |
| 247 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 248 | | state->m_speaker_active = data & 0x01; |
| 245 | m_speaker_active = data & 0x01; |
| 249 | 246 | |
| 250 | | if(!state->m_speaker_active) // speaker not active, disable all beeper sound |
| 247 | if(!m_speaker_active) // speaker not active, disable all beeper sound |
| 251 | 248 | { |
| 252 | | beep_set_state(space->machine().device(BEEPER_TAG),0); |
| 249 | beep_set_state(machine().device(BEEPER_TAG),0); |
| 253 | 250 | return; |
| 254 | 251 | } |
| 255 | 252 | |
| 256 | 253 | if(data & 0x80) |
| 257 | 254 | { |
| 258 | | if(state->m_speaker_active) |
| 259 | | beep_set_state(space->machine().device(BEEPER_TAG),1); |
| 255 | if(m_speaker_active) |
| 256 | beep_set_state(machine().device(BEEPER_TAG),1); |
| 260 | 257 | } |
| 261 | 258 | else |
| 262 | | beep_set_state(space->machine().device(BEEPER_TAG),0); |
| 259 | beep_set_state(machine().device(BEEPER_TAG),0); |
| 263 | 260 | |
| 264 | 261 | if(data & 0x40) |
| 265 | 262 | { |
| 266 | | if(state->m_speaker_active) |
| 263 | if(m_speaker_active) |
| 267 | 264 | { |
| 268 | | beep_set_state(space->machine().device(BEEPER_TAG),1); |
| 265 | beep_set_state(machine().device(BEEPER_TAG),1); |
| 269 | 266 | logerror("timed beeper on\n"); |
| 270 | | space->machine().scheduler().timer_set(attotime::from_msec(205), FUNC(fm7_beeper_off)); |
| 267 | machine().scheduler().timer_set(attotime::from_msec(205), FUNC(fm7_beeper_off)); |
| 271 | 268 | } |
| 272 | 269 | } |
| 273 | 270 | logerror("beeper state: %02x\n",data); |
| r14963 | r14964 | |
| 278 | 275 | * Sub CPU: port 0xd403 (read-only) |
| 279 | 276 | * On read: timed buzzer sound |
| 280 | 277 | */ |
| 281 | | READ8_HANDLER( fm7_sub_beeper_r ) |
| 278 | READ8_MEMBER(fm7_state::fm7_sub_beeper_r) |
| 282 | 279 | { |
| 283 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 284 | | if(state->m_speaker_active) |
| 280 | if(m_speaker_active) |
| 285 | 281 | { |
| 286 | | beep_set_state(space->machine().device(BEEPER_TAG),1); |
| 282 | beep_set_state(machine().device(BEEPER_TAG),1); |
| 287 | 283 | logerror("timed beeper on\n"); |
| 288 | | space->machine().scheduler().timer_set(attotime::from_msec(205), FUNC(fm7_beeper_off)); |
| 284 | machine().scheduler().timer_set(attotime::from_msec(205), FUNC(fm7_beeper_off)); |
| 289 | 285 | } |
| 290 | 286 | return 0xff; |
| 291 | 287 | } |
| 292 | 288 | |
| 293 | | static READ8_HANDLER( vector_r ) |
| 289 | READ8_MEMBER(fm7_state::vector_r) |
| 294 | 290 | { |
| 295 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 296 | | UINT8* RAM = space->machine().region("maincpu")->base(); |
| 297 | | UINT8* ROM = space->machine().region("init")->base(); |
| 291 | UINT8* RAM = machine().region("maincpu")->base(); |
| 292 | UINT8* ROM = machine().region("init")->base(); |
| 298 | 293 | |
| 299 | | if(state->m_init_rom_en) |
| 294 | if(m_init_rom_en) |
| 300 | 295 | return ROM[0x1ff0+offset]; |
| 301 | 296 | else |
| 302 | 297 | { |
| 303 | | if(state->m_type == SYS_FM7) |
| 298 | if(m_type == SYS_FM7) |
| 304 | 299 | return RAM[0xfff0+offset]; |
| 305 | 300 | else |
| 306 | 301 | return RAM[0x3fff0+offset]; |
| 307 | 302 | } |
| 308 | 303 | } |
| 309 | 304 | |
| 310 | | static WRITE8_HANDLER( vector_w ) |
| 305 | WRITE8_MEMBER(fm7_state::vector_w) |
| 311 | 306 | { |
| 312 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 313 | | UINT8* RAM = space->machine().region("maincpu")->base(); |
| 307 | UINT8* RAM = machine().region("maincpu")->base(); |
| 314 | 308 | |
| 315 | | if(state->m_type == SYS_FM7) |
| 309 | if(m_type == SYS_FM7) |
| 316 | 310 | RAM[0xfff0+offset] = data; |
| 317 | 311 | else |
| 318 | 312 | RAM[0x3fff0+offset] = data; |
| r14963 | r14964 | |
| 324 | 318 | * bit 0 - attention IRQ active, clears flag when read. |
| 325 | 319 | * bit 1 - break key active |
| 326 | 320 | */ |
| 327 | | static READ8_HANDLER( fm7_fd04_r ) |
| 321 | READ8_MEMBER(fm7_state::fm7_fd04_r) |
| 328 | 322 | { |
| 329 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 330 | 323 | UINT8 ret = 0xff; |
| 331 | 324 | |
| 332 | | if(state->m_video.attn_irq != 0) |
| 325 | if(m_video.attn_irq != 0) |
| 333 | 326 | { |
| 334 | 327 | ret &= ~0x01; |
| 335 | | state->m_video.attn_irq = 0; |
| 328 | m_video.attn_irq = 0; |
| 336 | 329 | } |
| 337 | | if(state->m_break_flag != 0) |
| 330 | if(m_break_flag != 0) |
| 338 | 331 | { |
| 339 | 332 | ret &= ~0x02; |
| 340 | 333 | } |
| r14963 | r14964 | |
| 347 | 340 | * On read, enables BASIC ROM at 0x8000 (default) |
| 348 | 341 | * On write, disables BASIC ROM, enables RAM (if more than 32kB) |
| 349 | 342 | */ |
| 350 | | static READ8_HANDLER( fm7_rom_en_r ) |
| 343 | READ8_MEMBER(fm7_state::fm7_rom_en_r) |
| 351 | 344 | { |
| 352 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 353 | | UINT8* RAM = space->machine().region("maincpu")->base(); |
| 345 | UINT8* RAM = machine().region("maincpu")->base(); |
| 354 | 346 | |
| 355 | | state->m_basic_rom_en = 1; |
| 356 | | if(state->m_type == SYS_FM7) |
| 347 | m_basic_rom_en = 1; |
| 348 | if(m_type == SYS_FM7) |
| 357 | 349 | { |
| 358 | | space->install_read_bank(0x8000,0xfbff,"bank1"); |
| 359 | | space->nop_write(0x8000,0xfbff); |
| 360 | | memory_set_bankptr(space->machine(),"bank1",RAM+0x38000); |
| 350 | space.install_read_bank(0x8000,0xfbff,"bank1"); |
| 351 | space.nop_write(0x8000,0xfbff); |
| 352 | memory_set_bankptr(machine(),"bank1",RAM+0x38000); |
| 361 | 353 | } |
| 362 | 354 | else |
| 363 | | fm7_mmr_refresh(space); |
| 355 | fm7_mmr_refresh(&space); |
| 364 | 356 | logerror("BASIC ROM enabled\n"); |
| 365 | 357 | return 0x00; |
| 366 | 358 | } |
| 367 | 359 | |
| 368 | | static WRITE8_HANDLER( fm7_rom_en_w ) |
| 360 | WRITE8_MEMBER(fm7_state::fm7_rom_en_w) |
| 369 | 361 | { |
| 370 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 371 | | UINT8* RAM = space->machine().region("maincpu")->base(); |
| 362 | UINT8* RAM = machine().region("maincpu")->base(); |
| 372 | 363 | |
| 373 | | state->m_basic_rom_en = 0; |
| 374 | | if(state->m_type == SYS_FM7) |
| 364 | m_basic_rom_en = 0; |
| 365 | if(m_type == SYS_FM7) |
| 375 | 366 | { |
| 376 | | space->install_readwrite_bank(0x8000,0xfbff,"bank1"); |
| 377 | | memory_set_bankptr(space->machine(),"bank1",RAM+0x8000); |
| 367 | space.install_readwrite_bank(0x8000,0xfbff,"bank1"); |
| 368 | memory_set_bankptr(machine(),"bank1",RAM+0x8000); |
| 378 | 369 | } |
| 379 | 370 | else |
| 380 | | fm7_mmr_refresh(space); |
| 371 | fm7_mmr_refresh(&space); |
| 381 | 372 | logerror("BASIC ROM disabled\n"); |
| 382 | 373 | } |
| 383 | 374 | |
| r14963 | r14964 | |
| 387 | 378 | * Port is write-only. Initiate ROM is on by default. |
| 388 | 379 | * |
| 389 | 380 | */ |
| 390 | | static WRITE8_HANDLER( fm7_init_en_w ) |
| 381 | WRITE8_MEMBER(fm7_state::fm7_init_en_w) |
| 391 | 382 | { |
| 392 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 393 | 383 | if(data & 0x02) |
| 394 | 384 | { |
| 395 | | state->m_init_rom_en = 0; |
| 396 | | fm7_mmr_refresh(space); |
| 385 | m_init_rom_en = 0; |
| 386 | fm7_mmr_refresh(&space); |
| 397 | 387 | } |
| 398 | 388 | else |
| 399 | 389 | { |
| 400 | | state->m_init_rom_en = 1; |
| 401 | | fm7_mmr_refresh(space); |
| 390 | m_init_rom_en = 1; |
| 391 | fm7_mmr_refresh(&space); |
| 402 | 392 | } |
| 403 | 393 | } |
| 404 | 394 | |
| r14963 | r14964 | |
| 418 | 408 | drvstate->m_fdc_drq_flag = state; |
| 419 | 409 | } |
| 420 | 410 | |
| 421 | | static READ8_HANDLER( fm7_fdc_r ) |
| 411 | READ8_MEMBER(fm7_state::fm7_fdc_r) |
| 422 | 412 | { |
| 423 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 424 | | device_t* dev = space->machine().device("fdc"); |
| 413 | device_t* dev = machine().device("fdc"); |
| 425 | 414 | UINT8 ret = 0; |
| 426 | 415 | |
| 427 | 416 | switch(offset) |
| r14963 | r14964 | |
| 435 | 424 | case 3: |
| 436 | 425 | return wd17xx_data_r(dev,offset); |
| 437 | 426 | case 4: |
| 438 | | return state->m_fdc_side | 0xfe; |
| 427 | return m_fdc_side | 0xfe; |
| 439 | 428 | case 5: |
| 440 | | return state->m_fdc_drive; |
| 429 | return m_fdc_drive; |
| 441 | 430 | case 6: |
| 442 | 431 | // FM-7 always returns 0xff for this register |
| 443 | 432 | return 0xff; |
| 444 | 433 | case 7: |
| 445 | | if(state->m_fdc_irq_flag != 0) |
| 434 | if(m_fdc_irq_flag != 0) |
| 446 | 435 | ret |= 0x40; |
| 447 | | if(state->m_fdc_drq_flag != 0) |
| 436 | if(m_fdc_drq_flag != 0) |
| 448 | 437 | ret |= 0x80; |
| 449 | 438 | return ret; |
| 450 | 439 | } |
| r14963 | r14964 | |
| 453 | 442 | return 0x00; |
| 454 | 443 | } |
| 455 | 444 | |
| 456 | | static WRITE8_HANDLER( fm7_fdc_w ) |
| 445 | WRITE8_MEMBER(fm7_state::fm7_fdc_w) |
| 457 | 446 | { |
| 458 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 459 | | device_t* dev = space->machine().device("fdc"); |
| 447 | device_t* dev = machine().device("fdc"); |
| 460 | 448 | switch(offset) |
| 461 | 449 | { |
| 462 | 450 | case 0: |
| r14963 | r14964 | |
| 472 | 460 | wd17xx_data_w(dev,offset,data); |
| 473 | 461 | break; |
| 474 | 462 | case 4: |
| 475 | | state->m_fdc_side = data & 0x01; |
| 463 | m_fdc_side = data & 0x01; |
| 476 | 464 | wd17xx_set_side(dev,data & 0x01); |
| 477 | 465 | logerror("FDC: wrote %02x to 0x%04x (side)\n",data,offset+0xfd18); |
| 478 | 466 | break; |
| 479 | 467 | case 5: |
| 480 | | state->m_fdc_drive = data; |
| 468 | m_fdc_drive = data; |
| 481 | 469 | if((data & 0x03) > 0x01) |
| 482 | 470 | { |
| 483 | | state->m_fdc_drive = 0; |
| 471 | m_fdc_drive = 0; |
| 484 | 472 | } |
| 485 | 473 | else |
| 486 | 474 | { |
| 487 | 475 | wd17xx_set_drive(dev,data & 0x03); |
| 488 | | floppy_mon_w(floppy_get_device(space->machine(), data & 0x03), !BIT(data, 7)); |
| 489 | | floppy_drive_set_ready_state(floppy_get_device(space->machine(), data & 0x03), data & 0x80,0); |
| 476 | floppy_mon_w(floppy_get_device(machine(), data & 0x03), !BIT(data, 7)); |
| 477 | floppy_drive_set_ready_state(floppy_get_device(machine(), data & 0x03), data & 0x80,0); |
| 490 | 478 | logerror("FDC: wrote %02x to 0x%04x (drive)\n",data,offset+0xfd18); |
| 491 | 479 | } |
| 492 | 480 | break; |
| r14963 | r14964 | |
| 510 | 498 | * CPU clock speed in bit 0 (0 = 1.2MHz, 1 = 2MHz) |
| 511 | 499 | * Clears keyboard IRQ flag |
| 512 | 500 | */ |
| 513 | | static READ8_HANDLER( fm7_keyboard_r ) |
| 501 | READ8_MEMBER(fm7_state::fm7_keyboard_r) |
| 514 | 502 | { |
| 515 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 516 | 503 | UINT8 ret; |
| 517 | 504 | switch(offset) |
| 518 | 505 | { |
| 519 | 506 | case 0: |
| 520 | | ret = (state->m_current_scancode >> 1) & 0x80; |
| 507 | ret = (m_current_scancode >> 1) & 0x80; |
| 521 | 508 | ret |= 0x01; // 1 = 2MHz, 0 = 1.2MHz |
| 522 | 509 | return ret; |
| 523 | 510 | case 1: |
| 524 | | main_irq_clear_flag(space->machine(),IRQ_FLAG_KEY); |
| 525 | | return state->m_current_scancode & 0xff; |
| 511 | main_irq_clear_flag(machine(),IRQ_FLAG_KEY); |
| 512 | return m_current_scancode & 0xff; |
| 526 | 513 | default: |
| 527 | 514 | return 0x00; |
| 528 | 515 | } |
| 529 | 516 | } |
| 530 | 517 | |
| 531 | | READ8_HANDLER( fm7_sub_keyboard_r ) |
| 518 | READ8_MEMBER(fm7_state::fm7_sub_keyboard_r) |
| 532 | 519 | { |
| 533 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 534 | 520 | UINT8 ret; |
| 535 | 521 | switch(offset) |
| 536 | 522 | { |
| 537 | 523 | case 0: |
| 538 | | ret = (state->m_current_scancode >> 1) & 0x80; |
| 524 | ret = (m_current_scancode >> 1) & 0x80; |
| 539 | 525 | return ret; |
| 540 | 526 | case 1: |
| 541 | | main_irq_clear_flag(space->machine(),IRQ_FLAG_KEY); |
| 542 | | return state->m_current_scancode & 0xff; |
| 527 | main_irq_clear_flag(machine(),IRQ_FLAG_KEY); |
| 528 | return m_current_scancode & 0xff; |
| 543 | 529 | default: |
| 544 | 530 | return 0x00; |
| 545 | 531 | } |
| r14963 | r14964 | |
| 570 | 556 | * |
| 571 | 557 | * ACK is received after 5us. |
| 572 | 558 | */ |
| 573 | | READ8_HANDLER( fm77av_key_encoder_r ) |
| 559 | READ8_MEMBER(fm7_state::fm77av_key_encoder_r) |
| 574 | 560 | { |
| 575 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 576 | 561 | UINT8 ret = 0xff; |
| 577 | 562 | switch(offset) |
| 578 | 563 | { |
| 579 | 564 | case 0x00: // data register |
| 580 | | if(state->m_encoder.rx_count > 0) |
| 565 | if(m_encoder.rx_count > 0) |
| 581 | 566 | { |
| 582 | | ret = state->m_encoder.buffer[state->m_encoder.position]; |
| 583 | | state->m_encoder.position++; |
| 584 | | state->m_encoder.rx_count--; |
| 585 | | state->m_encoder.latch = 0; |
| 567 | ret = m_encoder.buffer[m_encoder.position]; |
| 568 | m_encoder.position++; |
| 569 | m_encoder.rx_count--; |
| 570 | m_encoder.latch = 0; |
| 586 | 571 | } |
| 587 | | if(state->m_encoder.rx_count > 0) |
| 588 | | state->m_encoder.latch = 1; // more data to receive |
| 572 | if(m_encoder.rx_count > 0) |
| 573 | m_encoder.latch = 1; // more data to receive |
| 589 | 574 | break; |
| 590 | 575 | case 0x01: // status register |
| 591 | | if(state->m_encoder.latch != 0) |
| 576 | if(m_encoder.latch != 0) |
| 592 | 577 | ret &= ~0x80; |
| 593 | | if(state->m_encoder.ack == 0) |
| 578 | if(m_encoder.ack == 0) |
| 594 | 579 | ret &= ~0x01; |
| 595 | 580 | break; |
| 596 | 581 | } |
| r14963 | r14964 | |
| 598 | 583 | return ret; |
| 599 | 584 | } |
| 600 | 585 | |
| 601 | | static void fm77av_encoder_setup_command(fm7_state *state) |
| 586 | void fm7_state::fm77av_encoder_setup_command() |
| 602 | 587 | { |
| 603 | | switch(state->m_encoder.buffer[0]) |
| 588 | switch(m_encoder.buffer[0]) |
| 604 | 589 | { |
| 605 | 590 | case 0: // set scancode format |
| 606 | | state->m_encoder.tx_count = 2; |
| 591 | m_encoder.tx_count = 2; |
| 607 | 592 | break; |
| 608 | 593 | case 1: // get scancode format |
| 609 | | state->m_encoder.tx_count = 1; |
| 594 | m_encoder.tx_count = 1; |
| 610 | 595 | break; |
| 611 | 596 | case 2: // set LED |
| 612 | | state->m_encoder.tx_count = 2; |
| 597 | m_encoder.tx_count = 2; |
| 613 | 598 | break; |
| 614 | 599 | case 3: // get LED |
| 615 | | state->m_encoder.tx_count = 1; |
| 600 | m_encoder.tx_count = 1; |
| 616 | 601 | break; |
| 617 | 602 | case 4: // enable repeat |
| 618 | | state->m_encoder.tx_count = 2; |
| 603 | m_encoder.tx_count = 2; |
| 619 | 604 | break; |
| 620 | 605 | case 5: // set repeat rate |
| 621 | | state->m_encoder.tx_count = 3; |
| 606 | m_encoder.tx_count = 3; |
| 622 | 607 | break; |
| 623 | 608 | case 0x80: // get/set RTC (at least two bytes, 9 if byte two = 0x01) |
| 624 | | state->m_encoder.tx_count = 2; |
| 609 | m_encoder.tx_count = 2; |
| 625 | 610 | break; |
| 626 | 611 | case 0x81: // digitise |
| 627 | | state->m_encoder.tx_count = 2; |
| 612 | m_encoder.tx_count = 2; |
| 628 | 613 | break; |
| 629 | 614 | case 0x82: // set screen mode |
| 630 | | state->m_encoder.tx_count = 2; |
| 615 | m_encoder.tx_count = 2; |
| 631 | 616 | break; |
| 632 | 617 | case 0x83: // get screen mode |
| 633 | | state->m_encoder.tx_count = 1; |
| 618 | m_encoder.tx_count = 1; |
| 634 | 619 | break; |
| 635 | 620 | case 0x84: // set monitor brightness |
| 636 | | state->m_encoder.tx_count = 2; |
| 621 | m_encoder.tx_count = 2; |
| 637 | 622 | break; |
| 638 | 623 | default: |
| 639 | | state->m_encoder.tx_count = 0; |
| 640 | | state->m_encoder.rx_count = 0; |
| 641 | | state->m_encoder.position = 0; |
| 642 | | logerror("ENC: Unknown command 0x%02x sent, ignoring\n",state->m_encoder.buffer[0]); |
| 624 | m_encoder.tx_count = 0; |
| 625 | m_encoder.rx_count = 0; |
| 626 | m_encoder.position = 0; |
| 627 | logerror("ENC: Unknown command 0x%02x sent, ignoring\n",m_encoder.buffer[0]); |
| 643 | 628 | } |
| 644 | 629 | } |
| 645 | 630 | |
| r14963 | r14964 | |
| 649 | 634 | state->m_encoder.ack = 1; |
| 650 | 635 | } |
| 651 | 636 | |
| 652 | | static void fm77av_encoder_handle_command(fm7_state *state) |
| 637 | void fm7_state::fm77av_encoder_handle_command() |
| 653 | 638 | { |
| 654 | | switch(state->m_encoder.buffer[0]) |
| 639 | switch(m_encoder.buffer[0]) |
| 655 | 640 | { |
| 656 | 641 | case 0: // set keyboard scancode mode |
| 657 | | state->m_key_scan_mode = state->m_encoder.buffer[1]; |
| 658 | | state->m_encoder.rx_count = 0; |
| 659 | | logerror("ENC: Keyboard set to mode %i\n",state->m_encoder.buffer[1]); |
| 642 | m_key_scan_mode = m_encoder.buffer[1]; |
| 643 | m_encoder.rx_count = 0; |
| 644 | logerror("ENC: Keyboard set to mode %i\n",m_encoder.buffer[1]); |
| 660 | 645 | break; |
| 661 | 646 | case 1: // get keyboard scancode mode |
| 662 | | state->m_encoder.buffer[0] = state->m_key_scan_mode; |
| 663 | | state->m_encoder.rx_count = 1; |
| 664 | | logerror("ENC: Command %02x received\n",state->m_encoder.buffer[0]); |
| 647 | m_encoder.buffer[0] = m_key_scan_mode; |
| 648 | m_encoder.rx_count = 1; |
| 649 | logerror("ENC: Command %02x received\n",m_encoder.buffer[0]); |
| 665 | 650 | break; |
| 666 | 651 | case 2: // set LEDs |
| 667 | | state->m_encoder.rx_count = 0; |
| 668 | | logerror("ENC: Command %02x received\n",state->m_encoder.buffer[0]); |
| 652 | m_encoder.rx_count = 0; |
| 653 | logerror("ENC: Command %02x received\n",m_encoder.buffer[0]); |
| 669 | 654 | break; |
| 670 | 655 | case 3: // get LEDs |
| 671 | | state->m_encoder.rx_count = 1; |
| 672 | | logerror("ENC: Command %02x received\n",state->m_encoder.buffer[0]); |
| 656 | m_encoder.rx_count = 1; |
| 657 | logerror("ENC: Command %02x received\n",m_encoder.buffer[0]); |
| 673 | 658 | break; |
| 674 | 659 | case 4: // enable key repeat |
| 675 | | state->m_encoder.rx_count = 0; |
| 676 | | logerror("ENC: Command %02x received\n",state->m_encoder.buffer[0]); |
| 660 | m_encoder.rx_count = 0; |
| 661 | logerror("ENC: Command %02x received\n",m_encoder.buffer[0]); |
| 677 | 662 | break; |
| 678 | 663 | case 5: // set key repeat rate |
| 679 | | state->m_key_repeat = state->m_encoder.buffer[2] * 10; |
| 680 | | state->m_key_delay = state->m_encoder.buffer[1] * 10; |
| 681 | | state->m_encoder.rx_count = 0; |
| 682 | | logerror("ENC: Keyboard repeat rate set to %i/%i\n",state->m_encoder.buffer[1],state->m_encoder.buffer[2]); |
| 664 | m_key_repeat = m_encoder.buffer[2] * 10; |
| 665 | m_key_delay = m_encoder.buffer[1] * 10; |
| 666 | m_encoder.rx_count = 0; |
| 667 | logerror("ENC: Keyboard repeat rate set to %i/%i\n",m_encoder.buffer[1],m_encoder.buffer[2]); |
| 683 | 668 | break; |
| 684 | 669 | case 0x80: // get/set RTC |
| 685 | | if(state->m_encoder.buffer[1] == 0x01) |
| 686 | | state->m_encoder.rx_count = 0; |
| 670 | if(m_encoder.buffer[1] == 0x01) |
| 671 | m_encoder.rx_count = 0; |
| 687 | 672 | else |
| 688 | | state->m_encoder.rx_count = 7; |
| 689 | | logerror("ENC: Command %02x %02x received\n",state->m_encoder.buffer[0],state->m_encoder.buffer[1]); |
| 673 | m_encoder.rx_count = 7; |
| 674 | logerror("ENC: Command %02x %02x received\n",m_encoder.buffer[0],m_encoder.buffer[1]); |
| 690 | 675 | break; |
| 691 | 676 | case 0x81: // digitise |
| 692 | | state->m_encoder.rx_count = 0; |
| 693 | | logerror("ENC: Command %02x received\n",state->m_encoder.buffer[0]); |
| 677 | m_encoder.rx_count = 0; |
| 678 | logerror("ENC: Command %02x received\n",m_encoder.buffer[0]); |
| 694 | 679 | break; |
| 695 | 680 | case 0x82: // set screen mode |
| 696 | | state->m_encoder.rx_count = 0; |
| 697 | | logerror("ENC: Command %02x received\n",state->m_encoder.buffer[0]); |
| 681 | m_encoder.rx_count = 0; |
| 682 | logerror("ENC: Command %02x received\n",m_encoder.buffer[0]); |
| 698 | 683 | break; |
| 699 | 684 | case 0x83: // get screen mode |
| 700 | | state->m_encoder.rx_count = 1; |
| 701 | | logerror("ENC: Command %02x received\n",state->m_encoder.buffer[0]); |
| 685 | m_encoder.rx_count = 1; |
| 686 | logerror("ENC: Command %02x received\n",m_encoder.buffer[0]); |
| 702 | 687 | break; |
| 703 | 688 | case 0x84: // set monitor brightness |
| 704 | | state->m_encoder.rx_count = 0; |
| 705 | | logerror("ENC: Command %02x received\n",state->m_encoder.buffer[0]); |
| 689 | m_encoder.rx_count = 0; |
| 690 | logerror("ENC: Command %02x received\n",m_encoder.buffer[0]); |
| 706 | 691 | break; |
| 707 | 692 | } |
| 708 | | state->m_encoder.position = 0; |
| 693 | m_encoder.position = 0; |
| 709 | 694 | } |
| 710 | 695 | |
| 711 | | WRITE8_HANDLER( fm77av_key_encoder_w ) |
| 696 | WRITE8_MEMBER(fm7_state::fm77av_key_encoder_w) |
| 712 | 697 | { |
| 713 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 714 | | state->m_encoder.ack = 0; |
| 698 | m_encoder.ack = 0; |
| 715 | 699 | if(offset == 0) // data register |
| 716 | 700 | { |
| 717 | | if(state->m_encoder.position == 0) // first byte |
| 701 | if(m_encoder.position == 0) // first byte |
| 718 | 702 | { |
| 719 | | fm77av_encoder_setup_command(state); |
| 703 | fm77av_encoder_setup_command(); |
| 720 | 704 | } |
| 721 | | if(state->m_encoder.position == 1) // second byte |
| 705 | if(m_encoder.position == 1) // second byte |
| 722 | 706 | { |
| 723 | | if(state->m_encoder.buffer[0] == 0x80 || state->m_encoder.buffer[1] == 0x01) |
| 707 | if(m_encoder.buffer[0] == 0x80 || m_encoder.buffer[1] == 0x01) |
| 724 | 708 | { |
| 725 | | state->m_encoder.tx_count = 8; // 80 01 command is 9 bytes |
| 709 | m_encoder.tx_count = 8; // 80 01 command is 9 bytes |
| 726 | 710 | } |
| 727 | 711 | } |
| 728 | | state->m_encoder.buffer[state->m_encoder.position] = data; |
| 729 | | state->m_encoder.position++; |
| 730 | | state->m_encoder.tx_count--; |
| 731 | | if(state->m_encoder.tx_count == 0) // last byte |
| 732 | | fm77av_encoder_handle_command(state); |
| 712 | m_encoder.buffer[m_encoder.position] = data; |
| 713 | m_encoder.position++; |
| 714 | m_encoder.tx_count--; |
| 715 | if(m_encoder.tx_count == 0) // last byte |
| 716 | fm77av_encoder_handle_command(); |
| 733 | 717 | |
| 734 | 718 | // wait 5us to set ACK flag |
| 735 | | space->machine().scheduler().timer_set(attotime::from_usec(5), FUNC(fm77av_encoder_ack)); |
| 719 | machine().scheduler().timer_set(attotime::from_usec(5), FUNC(fm77av_encoder_ack)); |
| 736 | 720 | |
| 737 | | //logerror("ENC: write 0x%02x to data register, moved to pos %i\n",data,state->m_encoder.position); |
| 721 | //logerror("ENC: write 0x%02x to data register, moved to pos %i\n",data,m_encoder.position); |
| 738 | 722 | } |
| 739 | 723 | } |
| 740 | 724 | |
| 741 | | static READ8_HANDLER( fm7_cassette_printer_r ) |
| 725 | READ8_MEMBER(fm7_state::fm7_cassette_printer_r) |
| 742 | 726 | { |
| 743 | 727 | // bit 7: cassette input |
| 744 | 728 | // bit 5: printer DET2 |
| r14963 | r14964 | |
| 748 | 732 | // bit 1: printer error |
| 749 | 733 | // bit 0: printer busy |
| 750 | 734 | UINT8 ret = 0x00; |
| 751 | | double data = (space->machine().device<cassette_image_device>(CASSETTE_TAG)->input()); |
| 752 | | centronics_device* centronics = space->machine().device<centronics_device>("lpt"); |
| 735 | double data = (machine().device<cassette_image_device>(CASSETTE_TAG)->input()); |
| 736 | centronics_device* centronics = machine().device<centronics_device>("lpt"); |
| 753 | 737 | UINT8 pdata; |
| 754 | 738 | int x; |
| 755 | 739 | |
| 756 | 740 | if(data > 0.03) |
| 757 | 741 | ret |= 0x80; |
| 758 | 742 | |
| 759 | | if(space->machine().device<cassette_image_device>(CASSETTE_TAG)->get_state() & CASSETTE_MOTOR_DISABLED) |
| 743 | if(machine().device<cassette_image_device>(CASSETTE_TAG)->get_state() & CASSETTE_MOTOR_DISABLED) |
| 760 | 744 | ret |= 0x80; // cassette input is high when not in use. |
| 761 | 745 | |
| 762 | 746 | ret |= 0x70; |
| 763 | 747 | |
| 764 | | if(input_port_read(space->machine(),"config") & 0x01) |
| 748 | if(input_port_read(machine(),"config") & 0x01) |
| 765 | 749 | { |
| 766 | 750 | ret |= 0x0f; |
| 767 | | pdata = centronics->read(*space, 0); |
| 751 | pdata = centronics->read(space, 0); |
| 768 | 752 | for(x=0;x<6;x++) |
| 769 | 753 | { |
| 770 | 754 | if(~pdata & (1<<x)) |
| 771 | | if(input_port_read(space->machine(),"lptjoy") & (1 << x)) |
| 755 | if(input_port_read(machine(),"lptjoy") & (1 << x)) |
| 772 | 756 | ret &= ~0x08; |
| 773 | 757 | } |
| 774 | 758 | } |
| 775 | 759 | else |
| 776 | 760 | { |
| 777 | | device_image_interface *image = dynamic_cast<device_image_interface *>(space->machine().device("lpt:printer:printer")); |
| 761 | device_image_interface *image = dynamic_cast<device_image_interface *>(machine().device("lpt:printer:printer")); |
| 778 | 762 | if(image->exists()) |
| 779 | 763 | { |
| 780 | 764 | if(centronics->pe_r()) |
| r14963 | r14964 | |
| 792 | 776 | return ret; |
| 793 | 777 | } |
| 794 | 778 | |
| 795 | | static WRITE8_HANDLER( fm7_cassette_printer_w ) |
| 779 | WRITE8_MEMBER(fm7_state::fm7_cassette_printer_w) |
| 796 | 780 | { |
| 797 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 798 | | centronics_device* centronics = space->machine().device<centronics_device>("lpt"); |
| 781 | centronics_device* centronics = machine().device<centronics_device>("lpt"); |
| 799 | 782 | switch(offset) |
| 800 | 783 | { |
| 801 | 784 | case 0: |
| r14963 | r14964 | |
| 803 | 786 | // bit 6: printer strobe |
| 804 | 787 | // bit 1: cassette motor |
| 805 | 788 | // bit 0: cassette output |
| 806 | | if((data & 0x01) != (state->m_cp_prev & 0x01)) |
| 807 | | space->machine().device<cassette_image_device>(CASSETTE_TAG)->output((data & 0x01) ? +1.0 : -1.0); |
| 808 | | if((data & 0x02) != (state->m_cp_prev & 0x02)) |
| 809 | | space->machine().device<cassette_image_device>(CASSETTE_TAG)->change_state((data & 0x02) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR); |
| 789 | if((data & 0x01) != (m_cp_prev & 0x01)) |
| 790 | machine().device<cassette_image_device>(CASSETTE_TAG)->output((data & 0x01) ? +1.0 : -1.0); |
| 791 | if((data & 0x02) != (m_cp_prev & 0x02)) |
| 792 | machine().device<cassette_image_device>(CASSETTE_TAG)->change_state((data & 0x02) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR); |
| 810 | 793 | centronics->strobe_w(!(data & 0x40)); |
| 811 | | state->m_cp_prev = data; |
| 794 | m_cp_prev = data; |
| 812 | 795 | break; |
| 813 | 796 | case 1: |
| 814 | 797 | // Printer data |
| 815 | | centronics->write(*space,0,data); |
| 798 | centronics->write(space,0,data); |
| 816 | 799 | break; |
| 817 | 800 | } |
| 818 | 801 | } |
| r14963 | r14964 | |
| 821 | 804 | * Main CPU: 0xfd0b |
| 822 | 805 | * - bit 0: Boot mode: 0=BASIC, 1=DOS |
| 823 | 806 | */ |
| 824 | | static READ8_HANDLER( fm77av_boot_mode_r ) |
| 807 | READ8_MEMBER(fm7_state::fm77av_boot_mode_r) |
| 825 | 808 | { |
| 826 | 809 | UINT8 ret = 0xff; |
| 827 | 810 | |
| 828 | | if(input_port_read(space->machine(),"DSW") & 0x02) |
| 811 | if(input_port_read(machine(),"DSW") & 0x02) |
| 829 | 812 | ret &= ~0x01; |
| 830 | 813 | |
| 831 | 814 | return 0xff; |
| r14963 | r14964 | |
| 897 | 880 | } |
| 898 | 881 | } |
| 899 | 882 | |
| 900 | | static READ8_HANDLER( fm7_psg_select_r ) |
| 883 | READ8_MEMBER(fm7_state::fm7_psg_select_r) |
| 901 | 884 | { |
| 902 | 885 | return 0xff; |
| 903 | 886 | } |
| 904 | 887 | |
| 905 | | static WRITE8_HANDLER( fm7_psg_select_w ) |
| 888 | WRITE8_MEMBER(fm7_state::fm7_psg_select_w) |
| 906 | 889 | { |
| 907 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 908 | | state->m_psg_regsel = data & 0x03; |
| 909 | | fm7_update_psg(space->machine()); |
| 890 | m_psg_regsel = data & 0x03; |
| 891 | fm7_update_psg(machine()); |
| 910 | 892 | } |
| 911 | 893 | |
| 912 | | static WRITE8_HANDLER( fm77av_ym_select_w ) |
| 894 | WRITE8_MEMBER(fm7_state::fm77av_ym_select_w) |
| 913 | 895 | { |
| 914 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 915 | | state->m_psg_regsel = data & 0x0f; |
| 916 | | fm7_update_psg(space->machine()); |
| 896 | m_psg_regsel = data & 0x0f; |
| 897 | fm7_update_psg(machine()); |
| 917 | 898 | } |
| 918 | 899 | |
| 919 | | static READ8_HANDLER( fm7_psg_data_r ) |
| 900 | READ8_MEMBER(fm7_state::fm7_psg_data_r) |
| 920 | 901 | { |
| 921 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 922 | | // fm7_update_psg(space->machine()); |
| 923 | | return state->m_psg_data; |
| 902 | // fm7_update_psg(machine()); |
| 903 | return m_psg_data; |
| 924 | 904 | } |
| 925 | 905 | |
| 926 | | static WRITE8_HANDLER( fm7_psg_data_w ) |
| 906 | WRITE8_MEMBER(fm7_state::fm7_psg_data_w) |
| 927 | 907 | { |
| 928 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 929 | | state->m_psg_data = data; |
| 930 | | // fm7_update_psg(space->machine()); |
| 908 | m_psg_data = data; |
| 909 | // fm7_update_psg(machine()); |
| 931 | 910 | } |
| 932 | 911 | |
| 933 | | static WRITE8_HANDLER( fm77av_bootram_w ) |
| 912 | WRITE8_MEMBER(fm7_state::fm77av_bootram_w) |
| 934 | 913 | { |
| 935 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 936 | | if(!(state->m_mmr.mode & 0x01)) |
| 914 | if(!(m_mmr.mode & 0x01)) |
| 937 | 915 | return; |
| 938 | | state->m_boot_ram[offset] = data; |
| 916 | m_boot_ram[offset] = data; |
| 939 | 917 | } |
| 940 | 918 | |
| 941 | 919 | // Shared RAM is only usable on the main CPU if the sub CPU is halted |
| 942 | | static READ8_HANDLER( fm7_main_shared_r ) |
| 920 | READ8_MEMBER(fm7_state::fm7_main_shared_r) |
| 943 | 921 | { |
| 944 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 945 | | if(state->m_video.sub_halt != 0) |
| 946 | | return state->m_shared_ram[offset]; |
| 922 | if(m_video.sub_halt != 0) |
| 923 | return m_shared_ram[offset]; |
| 947 | 924 | else |
| 948 | 925 | return 0xff; |
| 949 | 926 | } |
| 950 | 927 | |
| 951 | | static WRITE8_HANDLER( fm7_main_shared_w ) |
| 928 | WRITE8_MEMBER(fm7_state::fm7_main_shared_w) |
| 952 | 929 | { |
| 953 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 954 | | if(state->m_video.sub_halt != 0) |
| 955 | | state->m_shared_ram[offset] = data; |
| 930 | if(m_video.sub_halt != 0) |
| 931 | m_shared_ram[offset] = data; |
| 956 | 932 | } |
| 957 | 933 | |
| 958 | | static READ8_HANDLER( fm7_fmirq_r ) |
| 934 | READ8_MEMBER(fm7_state::fm7_fmirq_r) |
| 959 | 935 | { |
| 960 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 961 | 936 | UINT8 ret = 0xff; |
| 962 | 937 | |
| 963 | | if(state->m_fm77av_ym_irq != 0) |
| 938 | if(m_fm77av_ym_irq != 0) |
| 964 | 939 | ret &= ~0x08; |
| 965 | 940 | |
| 966 | 941 | return ret; |
| r14963 | r14964 | |
| 976 | 951 | return input_port_read(device->machine(),"joy2"); |
| 977 | 952 | } |
| 978 | 953 | |
| 979 | | static READ8_HANDLER( fm7_unknown_r ) |
| 954 | READ8_MEMBER(fm7_state::fm7_unknown_r) |
| 980 | 955 | { |
| 981 | 956 | // Port 0xFDFC is read by Dig Dug. Controller port, perhaps? |
| 982 | 957 | // Must return 0xff for it to read the keyboard. |
| r14963 | r14964 | |
| 999 | 974 | * - bit 0: boot RAM read-write/read-only |
| 1000 | 975 | * |
| 1001 | 976 | */ |
| 1002 | | static READ8_HANDLER( fm7_mmr_r ) |
| 977 | READ8_MEMBER(fm7_state::fm7_mmr_r) |
| 1003 | 978 | { |
| 1004 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1005 | 979 | if(offset < 0x10) |
| 1006 | 980 | { |
| 1007 | | return state->m_mmr.bank_addr[state->m_mmr.segment][offset]; |
| 981 | return m_mmr.bank_addr[m_mmr.segment][offset]; |
| 1008 | 982 | } |
| 1009 | 983 | if(offset == 0x13) |
| 1010 | | return state->m_mmr.mode; |
| 984 | return m_mmr.mode; |
| 1011 | 985 | return 0xff; |
| 1012 | 986 | } |
| 1013 | 987 | |
| r14963 | r14964 | |
| 1028 | 1002 | switch(physical) |
| 1029 | 1003 | { |
| 1030 | 1004 | case 0x10: |
| 1031 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vram0_r),FUNC(fm7_vram0_w)); |
| 1005 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vram0_r),state),write8_delegate(FUNC(fm7_state::fm7_vram0_w),state)); |
| 1032 | 1006 | break; |
| 1033 | 1007 | case 0x11: |
| 1034 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vram1_r),FUNC(fm7_vram1_w)); |
| 1008 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vram1_r),state),write8_delegate(FUNC(fm7_state::fm7_vram1_w),state)); |
| 1035 | 1009 | break; |
| 1036 | 1010 | case 0x12: |
| 1037 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vram2_r),FUNC(fm7_vram2_w)); |
| 1011 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vram2_r),state),write8_delegate(FUNC(fm7_state::fm7_vram2_w),state)); |
| 1038 | 1012 | break; |
| 1039 | 1013 | case 0x13: |
| 1040 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vram3_r),FUNC(fm7_vram3_w)); |
| 1014 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vram3_r),state),write8_delegate(FUNC(fm7_state::fm7_vram3_w),state)); |
| 1041 | 1015 | break; |
| 1042 | 1016 | case 0x14: |
| 1043 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vram4_r),FUNC(fm7_vram4_w)); |
| 1017 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vram4_r),state),write8_delegate(FUNC(fm7_state::fm7_vram4_w),state)); |
| 1044 | 1018 | break; |
| 1045 | 1019 | case 0x15: |
| 1046 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vram5_r),FUNC(fm7_vram5_w)); |
| 1020 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vram5_r),state),write8_delegate(FUNC(fm7_state::fm7_vram5_w),state)); |
| 1047 | 1021 | break; |
| 1048 | 1022 | case 0x16: |
| 1049 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vram6_r),FUNC(fm7_vram6_w)); |
| 1023 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vram6_r),state),write8_delegate(FUNC(fm7_state::fm7_vram6_w),state)); |
| 1050 | 1024 | break; |
| 1051 | 1025 | case 0x17: |
| 1052 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vram7_r),FUNC(fm7_vram7_w)); |
| 1026 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vram7_r),state),write8_delegate(FUNC(fm7_state::fm7_vram7_w),state)); |
| 1053 | 1027 | break; |
| 1054 | 1028 | case 0x18: |
| 1055 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vram8_r),FUNC(fm7_vram8_w)); |
| 1029 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vram8_r),state),write8_delegate(FUNC(fm7_state::fm7_vram8_w),state)); |
| 1056 | 1030 | break; |
| 1057 | 1031 | case 0x19: |
| 1058 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vram9_r),FUNC(fm7_vram9_w)); |
| 1032 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vram9_r),state),write8_delegate(FUNC(fm7_state::fm7_vram9_w),state)); |
| 1059 | 1033 | break; |
| 1060 | 1034 | case 0x1a: |
| 1061 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vramA_r),FUNC(fm7_vramA_w)); |
| 1035 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vramA_r),state),write8_delegate(FUNC(fm7_state::fm7_vramA_w),state)); |
| 1062 | 1036 | break; |
| 1063 | 1037 | case 0x1b: |
| 1064 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_vramB_r),FUNC(fm7_vramB_w)); |
| 1038 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_vramB_r),state),write8_delegate(FUNC(fm7_state::fm7_vramB_w),state)); |
| 1065 | 1039 | break; |
| 1066 | 1040 | } |
| 1067 | 1041 | // memory_set_bankptr(space->machine(),bank+1,RAM+(physical<<12)-0x10000); |
| r14963 | r14964 | |
| 1069 | 1043 | } |
| 1070 | 1044 | if(physical == 0x1c) |
| 1071 | 1045 | { |
| 1072 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_console_ram_banked_r),FUNC(fm7_console_ram_banked_w)); |
| 1046 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_console_ram_banked_r),state),write8_delegate(FUNC(fm7_state::fm7_console_ram_banked_w),state)); |
| 1073 | 1047 | return; |
| 1074 | 1048 | } |
| 1075 | 1049 | if(physical == 0x1d) |
| 1076 | 1050 | { |
| 1077 | | space->install_legacy_readwrite_handler(bank*0x1000,(bank*0x1000)+size,FUNC(fm7_sub_ram_ports_banked_r),FUNC(fm7_sub_ram_ports_banked_w)); |
| 1051 | space->install_readwrite_handler(bank*0x1000,(bank*0x1000)+size,read8_delegate(FUNC(fm7_state::fm7_sub_ram_ports_banked_r),state),write8_delegate(FUNC(fm7_state::fm7_sub_ram_ports_banked_w),state)); |
| 1078 | 1052 | return; |
| 1079 | 1053 | } |
| 1080 | 1054 | if(physical == 0x35) |
| r14963 | r14964 | |
| 1147 | 1121 | } |
| 1148 | 1122 | } |
| 1149 | 1123 | |
| 1150 | | static WRITE8_HANDLER( fm7_mmr_w ) |
| 1124 | WRITE8_MEMBER(fm7_state::fm7_mmr_w) |
| 1151 | 1125 | { |
| 1152 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1153 | 1126 | if(offset < 0x10) |
| 1154 | 1127 | { |
| 1155 | | state->m_mmr.bank_addr[state->m_mmr.segment][offset] = data; |
| 1156 | | if(state->m_mmr.enabled) |
| 1157 | | fm7_update_bank(space,offset,data); |
| 1158 | | logerror("MMR: Segment %i, bank %i, set to 0x%02x\n",state->m_mmr.segment,offset,data); |
| 1128 | m_mmr.bank_addr[m_mmr.segment][offset] = data; |
| 1129 | if(m_mmr.enabled) |
| 1130 | fm7_update_bank(&space,offset,data); |
| 1131 | logerror("MMR: Segment %i, bank %i, set to 0x%02x\n",m_mmr.segment,offset,data); |
| 1159 | 1132 | return; |
| 1160 | 1133 | } |
| 1161 | 1134 | switch(offset) |
| 1162 | 1135 | { |
| 1163 | 1136 | case 0x10: |
| 1164 | | state->m_mmr.segment = data & 0x07; |
| 1165 | | fm7_mmr_refresh(space); |
| 1166 | | logerror("MMR: Active segment set to %i\n",state->m_mmr.segment); |
| 1137 | m_mmr.segment = data & 0x07; |
| 1138 | fm7_mmr_refresh(&space); |
| 1139 | logerror("MMR: Active segment set to %i\n",m_mmr.segment); |
| 1167 | 1140 | break; |
| 1168 | 1141 | case 0x12: |
| 1169 | | state->m_mmr.window_offset = data; |
| 1170 | | fm7_mmr_refresh(space); |
| 1142 | m_mmr.window_offset = data; |
| 1143 | fm7_mmr_refresh(&space); |
| 1171 | 1144 | logerror("MMR: Window offset set to %02x\n",data); |
| 1172 | 1145 | break; |
| 1173 | 1146 | case 0x13: |
| 1174 | | state->m_mmr.mode = data; |
| 1175 | | state->m_mmr.enabled = data & 0x80; |
| 1176 | | fm7_mmr_refresh(space); |
| 1147 | m_mmr.mode = data; |
| 1148 | m_mmr.enabled = data & 0x80; |
| 1149 | fm7_mmr_refresh(&space); |
| 1177 | 1150 | logerror("MMR: Mode register set to %02x\n",data); |
| 1178 | 1151 | break; |
| 1179 | 1152 | } |
| r14963 | r14964 | |
| 1189 | 1162 | * |
| 1190 | 1163 | * Kanji ROM is visible at 0x20000 (first half only?) |
| 1191 | 1164 | */ |
| 1192 | | static READ8_HANDLER( fm7_kanji_r ) |
| 1165 | READ8_MEMBER(fm7_state::fm7_kanji_r) |
| 1193 | 1166 | { |
| 1194 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1195 | | UINT8* KROM = space->machine().region("kanji1")->base(); |
| 1196 | | UINT32 addr = state->m_kanji_address << 1; |
| 1167 | UINT8* KROM = machine().region("kanji1")->base(); |
| 1168 | UINT32 addr = m_kanji_address << 1; |
| 1197 | 1169 | |
| 1198 | 1170 | switch(offset) |
| 1199 | 1171 | { |
| r14963 | r14964 | |
| 1211 | 1183 | } |
| 1212 | 1184 | } |
| 1213 | 1185 | |
| 1214 | | static WRITE8_HANDLER( fm7_kanji_w ) |
| 1186 | WRITE8_MEMBER(fm7_state::fm7_kanji_w) |
| 1215 | 1187 | { |
| 1216 | | fm7_state *state = space->machine().driver_data<fm7_state>(); |
| 1217 | 1188 | UINT16 addr; |
| 1218 | 1189 | |
| 1219 | 1190 | switch(offset) |
| 1220 | 1191 | { |
| 1221 | 1192 | case 0: |
| 1222 | | addr = ((data & 0xff) << 8) | (state->m_kanji_address & 0x00ff); |
| 1223 | | state->m_kanji_address = addr; |
| 1193 | addr = ((data & 0xff) << 8) | (m_kanji_address & 0x00ff); |
| 1194 | m_kanji_address = addr; |
| 1224 | 1195 | break; |
| 1225 | 1196 | case 1: |
| 1226 | | addr = (data & 0xff) | (state->m_kanji_address & 0xff00); |
| 1227 | | state->m_kanji_address = addr; |
| 1197 | addr = (data & 0xff) | (m_kanji_address & 0xff00); |
| 1198 | m_kanji_address = addr; |
| 1228 | 1199 | break; |
| 1229 | 1200 | case 2: |
| 1230 | 1201 | case 3: |
| r14963 | r14964 | |
| 1416 | 1387 | AM_RANGE(0x0000,0x7fff) AM_RAM |
| 1417 | 1388 | AM_RANGE(0x8000,0xfbff) AM_ROMBANK("bank1") // also F-BASIC ROM, when enabled |
| 1418 | 1389 | AM_RANGE(0xfc00,0xfc7f) AM_RAM |
| 1419 | | AM_RANGE(0xfc80,0xfcff) AM_READWRITE_LEGACY(fm7_main_shared_r,fm7_main_shared_w) |
| 1390 | AM_RANGE(0xfc80,0xfcff) AM_READWRITE(fm7_main_shared_r,fm7_main_shared_w) |
| 1420 | 1391 | // I/O space (FD00-FDFF) |
| 1421 | | AM_RANGE(0xfd00,0xfd01) AM_READWRITE_LEGACY(fm7_keyboard_r,fm7_cassette_printer_w) |
| 1422 | | AM_RANGE(0xfd02,0xfd02) AM_READWRITE_LEGACY(fm7_cassette_printer_r,fm7_irq_mask_w) // IRQ mask |
| 1423 | | AM_RANGE(0xfd03,0xfd03) AM_READWRITE_LEGACY(fm7_irq_cause_r,fm7_beeper_w) // IRQ flags |
| 1424 | | AM_RANGE(0xfd04,0xfd04) AM_READ_LEGACY(fm7_fd04_r) |
| 1425 | | AM_RANGE(0xfd05,0xfd05) AM_READWRITE_LEGACY(fm7_subintf_r,fm7_subintf_w) |
| 1426 | | AM_RANGE(0xfd06,0xfd0c) AM_READ_LEGACY(fm7_unknown_r) |
| 1427 | | AM_RANGE(0xfd0d,0xfd0d) AM_READWRITE_LEGACY(fm7_psg_select_r,fm7_psg_select_w) |
| 1428 | | AM_RANGE(0xfd0e,0xfd0e) AM_READWRITE_LEGACY(fm7_psg_data_r, fm7_psg_data_w) |
| 1429 | | AM_RANGE(0xfd0f,0xfd0f) AM_READWRITE_LEGACY(fm7_rom_en_r,fm7_rom_en_w) |
| 1430 | | AM_RANGE(0xfd10,0xfd17) AM_READ_LEGACY(fm7_unknown_r) |
| 1431 | | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE_LEGACY(fm7_fdc_r,fm7_fdc_w) |
| 1432 | | AM_RANGE(0xfd20,0xfd23) AM_READWRITE_LEGACY(fm7_kanji_r,fm7_kanji_w) |
| 1433 | | AM_RANGE(0xfd24,0xfd36) AM_READ_LEGACY(fm7_unknown_r) |
| 1434 | | AM_RANGE(0xfd37,0xfd37) AM_WRITE_LEGACY(fm7_multipage_w) |
| 1435 | | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE_LEGACY(fm7_palette_r,fm7_palette_w) |
| 1436 | | AM_RANGE(0xfd40,0xfdff) AM_READ_LEGACY(fm7_unknown_r) |
| 1392 | AM_RANGE(0xfd00,0xfd01) AM_READWRITE(fm7_keyboard_r,fm7_cassette_printer_w) |
| 1393 | AM_RANGE(0xfd02,0xfd02) AM_READWRITE(fm7_cassette_printer_r,fm7_irq_mask_w) // IRQ mask |
| 1394 | AM_RANGE(0xfd03,0xfd03) AM_READWRITE(fm7_irq_cause_r,fm7_beeper_w) // IRQ flags |
| 1395 | AM_RANGE(0xfd04,0xfd04) AM_READ(fm7_fd04_r) |
| 1396 | AM_RANGE(0xfd05,0xfd05) AM_READWRITE(fm7_subintf_r,fm7_subintf_w) |
| 1397 | AM_RANGE(0xfd06,0xfd0c) AM_READ(fm7_unknown_r) |
| 1398 | AM_RANGE(0xfd0d,0xfd0d) AM_READWRITE(fm7_psg_select_r,fm7_psg_select_w) |
| 1399 | AM_RANGE(0xfd0e,0xfd0e) AM_READWRITE(fm7_psg_data_r, fm7_psg_data_w) |
| 1400 | AM_RANGE(0xfd0f,0xfd0f) AM_READWRITE(fm7_rom_en_r,fm7_rom_en_w) |
| 1401 | AM_RANGE(0xfd10,0xfd17) AM_READ(fm7_unknown_r) |
| 1402 | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE(fm7_fdc_r,fm7_fdc_w) |
| 1403 | AM_RANGE(0xfd20,0xfd23) AM_READWRITE(fm7_kanji_r,fm7_kanji_w) |
| 1404 | AM_RANGE(0xfd24,0xfd36) AM_READ(fm7_unknown_r) |
| 1405 | AM_RANGE(0xfd37,0xfd37) AM_WRITE(fm7_multipage_w) |
| 1406 | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE(fm7_palette_r,fm7_palette_w) |
| 1407 | AM_RANGE(0xfd40,0xfdff) AM_READ(fm7_unknown_r) |
| 1437 | 1408 | // Boot ROM |
| 1438 | 1409 | AM_RANGE(0xfe00,0xffdf) AM_ROMBANK("bank17") |
| 1439 | 1410 | AM_RANGE(0xffe0,0xffef) AM_RAM |
| 1440 | | AM_RANGE(0xfff0,0xffff) AM_READWRITE_LEGACY(vector_r,vector_w) |
| 1411 | AM_RANGE(0xfff0,0xffff) AM_READWRITE(vector_r,vector_w) |
| 1441 | 1412 | ADDRESS_MAP_END |
| 1442 | 1413 | |
| 1443 | 1414 | static ADDRESS_MAP_START( fm8_mem, AS_PROGRAM, 8, fm7_state ) |
| 1444 | 1415 | AM_RANGE(0x0000,0x7fff) AM_RAM |
| 1445 | 1416 | AM_RANGE(0x8000,0xfbff) AM_ROMBANK("bank1") // also F-BASIC ROM, when enabled |
| 1446 | 1417 | AM_RANGE(0xfc00,0xfc7f) AM_RAM |
| 1447 | | AM_RANGE(0xfc80,0xfcff) AM_READWRITE_LEGACY(fm7_main_shared_r,fm7_main_shared_w) |
| 1418 | AM_RANGE(0xfc80,0xfcff) AM_READWRITE(fm7_main_shared_r,fm7_main_shared_w) |
| 1448 | 1419 | // I/O space (FD00-FDFF) |
| 1449 | | AM_RANGE(0xfd00,0xfd01) AM_READWRITE_LEGACY(fm7_keyboard_r,fm7_cassette_printer_w) |
| 1450 | | AM_RANGE(0xfd02,0xfd02) AM_READWRITE_LEGACY(fm7_cassette_printer_r,fm7_irq_mask_w) // IRQ mask |
| 1451 | | AM_RANGE(0xfd03,0xfd03) AM_READWRITE_LEGACY(fm7_irq_cause_r,fm7_beeper_w) // IRQ flags |
| 1452 | | AM_RANGE(0xfd04,0xfd04) AM_READ_LEGACY(fm7_fd04_r) |
| 1453 | | AM_RANGE(0xfd05,0xfd05) AM_READWRITE_LEGACY(fm7_subintf_r,fm7_subintf_w) |
| 1454 | | AM_RANGE(0xfd06,0xfd0c) AM_READ_LEGACY(fm7_unknown_r) |
| 1455 | | AM_RANGE(0xfd0f,0xfd0f) AM_READWRITE_LEGACY(fm7_rom_en_r,fm7_rom_en_w) |
| 1456 | | AM_RANGE(0xfd10,0xfd17) AM_READ_LEGACY(fm7_unknown_r) |
| 1457 | | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE_LEGACY(fm7_fdc_r,fm7_fdc_w) |
| 1458 | | AM_RANGE(0xfd20,0xfd23) AM_READWRITE_LEGACY(fm7_kanji_r,fm7_kanji_w) |
| 1459 | | AM_RANGE(0xfd24,0xfd36) AM_READ_LEGACY(fm7_unknown_r) |
| 1460 | | AM_RANGE(0xfd37,0xfd37) AM_WRITE_LEGACY(fm7_multipage_w) |
| 1461 | | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE_LEGACY(fm7_palette_r,fm7_palette_w) |
| 1462 | | AM_RANGE(0xfd40,0xfdff) AM_READ_LEGACY(fm7_unknown_r) |
| 1420 | AM_RANGE(0xfd00,0xfd01) AM_READWRITE(fm7_keyboard_r,fm7_cassette_printer_w) |
| 1421 | AM_RANGE(0xfd02,0xfd02) AM_READWRITE(fm7_cassette_printer_r,fm7_irq_mask_w) // IRQ mask |
| 1422 | AM_RANGE(0xfd03,0xfd03) AM_READWRITE(fm7_irq_cause_r,fm7_beeper_w) // IRQ flags |
| 1423 | AM_RANGE(0xfd04,0xfd04) AM_READ(fm7_fd04_r) |
| 1424 | AM_RANGE(0xfd05,0xfd05) AM_READWRITE(fm7_subintf_r,fm7_subintf_w) |
| 1425 | AM_RANGE(0xfd06,0xfd0c) AM_READ(fm7_unknown_r) |
| 1426 | AM_RANGE(0xfd0f,0xfd0f) AM_READWRITE(fm7_rom_en_r,fm7_rom_en_w) |
| 1427 | AM_RANGE(0xfd10,0xfd17) AM_READ(fm7_unknown_r) |
| 1428 | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE(fm7_fdc_r,fm7_fdc_w) |
| 1429 | AM_RANGE(0xfd20,0xfd23) AM_READWRITE(fm7_kanji_r,fm7_kanji_w) |
| 1430 | AM_RANGE(0xfd24,0xfd36) AM_READ(fm7_unknown_r) |
| 1431 | AM_RANGE(0xfd37,0xfd37) AM_WRITE(fm7_multipage_w) |
| 1432 | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE(fm7_palette_r,fm7_palette_w) |
| 1433 | AM_RANGE(0xfd40,0xfdff) AM_READ(fm7_unknown_r) |
| 1463 | 1434 | // Boot ROM |
| 1464 | 1435 | AM_RANGE(0xfe00,0xffdf) AM_ROMBANK("bank17") |
| 1465 | 1436 | AM_RANGE(0xffe0,0xffef) AM_RAM |
| 1466 | | AM_RANGE(0xfff0,0xffff) AM_READWRITE_LEGACY(vector_r,vector_w) |
| 1437 | AM_RANGE(0xfff0,0xffff) AM_READWRITE(vector_r,vector_w) |
| 1467 | 1438 | ADDRESS_MAP_END |
| 1468 | 1439 | |
| 1469 | 1440 | /* |
| r14963 | r14964 | |
| 1478 | 1449 | */ |
| 1479 | 1450 | |
| 1480 | 1451 | static ADDRESS_MAP_START( fm7_sub_mem, AS_PROGRAM, 8, fm7_state ) |
| 1481 | | AM_RANGE(0x0000,0xbfff) AM_READWRITE_LEGACY(fm7_vram_r,fm7_vram_w) // VRAM |
| 1452 | AM_RANGE(0x0000,0xbfff) AM_READWRITE(fm7_vram_r,fm7_vram_w) // VRAM |
| 1482 | 1453 | AM_RANGE(0xc000,0xcfff) AM_RAM // Console RAM |
| 1483 | 1454 | AM_RANGE(0xd000,0xd37f) AM_RAM // Work RAM |
| 1484 | 1455 | AM_RANGE(0xd380,0xd3ff) AM_RAM AM_SHARE("shared_ram") |
| 1485 | 1456 | // I/O space (D400-D4FF) |
| 1486 | | AM_RANGE(0xd400,0xd401) AM_READ_LEGACY(fm7_sub_keyboard_r) |
| 1487 | | AM_RANGE(0xd402,0xd402) AM_READ_LEGACY(fm7_cancel_ack) |
| 1488 | | AM_RANGE(0xd403,0xd403) AM_READ_LEGACY(fm7_sub_beeper_r) |
| 1489 | | AM_RANGE(0xd404,0xd404) AM_READ_LEGACY(fm7_attn_irq_r) |
| 1490 | | AM_RANGE(0xd408,0xd408) AM_READWRITE_LEGACY(fm7_crt_r,fm7_crt_w) |
| 1491 | | AM_RANGE(0xd409,0xd409) AM_READWRITE_LEGACY(fm7_vram_access_r,fm7_vram_access_w) |
| 1492 | | AM_RANGE(0xd40a,0xd40a) AM_READWRITE_LEGACY(fm7_sub_busyflag_r,fm7_sub_busyflag_w) |
| 1493 | | AM_RANGE(0xd40e,0xd40f) AM_WRITE_LEGACY(fm7_vram_offset_w) |
| 1457 | AM_RANGE(0xd400,0xd401) AM_READ(fm7_sub_keyboard_r) |
| 1458 | AM_RANGE(0xd402,0xd402) AM_READ(fm7_cancel_ack) |
| 1459 | AM_RANGE(0xd403,0xd403) AM_READ(fm7_sub_beeper_r) |
| 1460 | AM_RANGE(0xd404,0xd404) AM_READ(fm7_attn_irq_r) |
| 1461 | AM_RANGE(0xd408,0xd408) AM_READWRITE(fm7_crt_r,fm7_crt_w) |
| 1462 | AM_RANGE(0xd409,0xd409) AM_READWRITE(fm7_vram_access_r,fm7_vram_access_w) |
| 1463 | AM_RANGE(0xd40a,0xd40a) AM_READWRITE(fm7_sub_busyflag_r,fm7_sub_busyflag_w) |
| 1464 | AM_RANGE(0xd40e,0xd40f) AM_WRITE(fm7_vram_offset_w) |
| 1494 | 1465 | AM_RANGE(0xd800,0xffff) AM_ROM |
| 1495 | 1466 | ADDRESS_MAP_END |
| 1496 | 1467 | |
| r14963 | r14964 | |
| 1512 | 1483 | AM_RANGE(0xe000,0xefff) AM_RAMBANK("bank15") |
| 1513 | 1484 | AM_RANGE(0xf000,0xfbff) AM_RAMBANK("bank16") |
| 1514 | 1485 | AM_RANGE(0xfc00,0xfc7f) AM_RAM |
| 1515 | | AM_RANGE(0xfc80,0xfcff) AM_READWRITE_LEGACY(fm7_main_shared_r,fm7_main_shared_w) |
| 1486 | AM_RANGE(0xfc80,0xfcff) AM_READWRITE(fm7_main_shared_r,fm7_main_shared_w) |
| 1516 | 1487 | // I/O space (FD00-FDFF) |
| 1517 | | AM_RANGE(0xfd00,0xfd01) AM_READWRITE_LEGACY(fm7_keyboard_r,fm7_cassette_printer_w) |
| 1518 | | AM_RANGE(0xfd02,0xfd02) AM_READWRITE_LEGACY(fm7_cassette_printer_r,fm7_irq_mask_w) // IRQ mask |
| 1519 | | AM_RANGE(0xfd03,0xfd03) AM_READWRITE_LEGACY(fm7_irq_cause_r,fm7_beeper_w) // IRQ flags |
| 1520 | | AM_RANGE(0xfd04,0xfd04) AM_READ_LEGACY(fm7_fd04_r) |
| 1521 | | AM_RANGE(0xfd05,0xfd05) AM_READWRITE_LEGACY(fm7_subintf_r,fm7_subintf_w) |
| 1522 | | AM_RANGE(0xfd06,0xfd0a) AM_READ_LEGACY(fm7_unknown_r) |
| 1523 | | AM_RANGE(0xfd0b,0xfd0b) AM_READ_LEGACY(fm77av_boot_mode_r) |
| 1524 | | AM_RANGE(0xfd0c,0xfd0c) AM_READ_LEGACY(fm7_unknown_r) |
| 1525 | | AM_RANGE(0xfd0f,0xfd0f) AM_READWRITE_LEGACY(fm7_rom_en_r,fm7_rom_en_w) |
| 1526 | | AM_RANGE(0xfd10,0xfd10) AM_WRITE_LEGACY(fm7_init_en_w) |
| 1527 | | AM_RANGE(0xfd11,0xfd11) AM_READ_LEGACY(fm7_unknown_r) |
| 1528 | | AM_RANGE(0xfd12,0xfd12) AM_READWRITE_LEGACY(fm77av_sub_modestatus_r,fm77av_sub_modestatus_w) |
| 1529 | | AM_RANGE(0xfd13,0xfd13) AM_WRITE_LEGACY(fm77av_sub_bank_w) |
| 1530 | | AM_RANGE(0xfd14,0xfd14) AM_READ_LEGACY(fm7_unknown_r) |
| 1531 | | AM_RANGE(0xfd17,0xfd17) AM_READ_LEGACY(fm7_fmirq_r) |
| 1532 | | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE_LEGACY(fm7_fdc_r,fm7_fdc_w) |
| 1533 | | AM_RANGE(0xfd20,0xfd23) AM_READWRITE_LEGACY(fm7_kanji_r,fm7_kanji_w) |
| 1534 | | AM_RANGE(0xfd24,0xfd2b) AM_READ_LEGACY(fm7_unknown_r) |
| 1535 | | AM_RANGE(0xfd30,0xfd34) AM_WRITE_LEGACY(fm77av_analog_palette_w) |
| 1536 | | AM_RANGE(0xfd35,0xfd36) AM_READ_LEGACY(fm7_unknown_r) |
| 1537 | | AM_RANGE(0xfd37,0xfd37) AM_WRITE_LEGACY(fm7_multipage_w) |
| 1538 | | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE_LEGACY(fm7_palette_r,fm7_palette_w) |
| 1539 | | AM_RANGE(0xfd40,0xfd7f) AM_READ_LEGACY(fm7_unknown_r) |
| 1540 | | AM_RANGE(0xfd80,0xfd93) AM_READWRITE_LEGACY(fm7_mmr_r,fm7_mmr_w) |
| 1541 | | AM_RANGE(0xfd94,0xfdff) AM_READ_LEGACY(fm7_unknown_r) |
| 1542 | | AM_RANGE(0xfe00,0xffdf) AM_RAM_WRITE_LEGACY(fm77av_bootram_w) AM_SHARE("boot_ram") |
| 1488 | AM_RANGE(0xfd00,0xfd01) AM_READWRITE(fm7_keyboard_r,fm7_cassette_printer_w) |
| 1489 | AM_RANGE(0xfd02,0xfd02) AM_READWRITE(fm7_cassette_printer_r,fm7_irq_mask_w) // IRQ mask |
| 1490 | AM_RANGE(0xfd03,0xfd03) AM_READWRITE(fm7_irq_cause_r,fm7_beeper_w) // IRQ flags |
| 1491 | AM_RANGE(0xfd04,0xfd04) AM_READ(fm7_fd04_r) |
| 1492 | AM_RANGE(0xfd05,0xfd05) AM_READWRITE(fm7_subintf_r,fm7_subintf_w) |
| 1493 | AM_RANGE(0xfd06,0xfd0a) AM_READ(fm7_unknown_r) |
| 1494 | AM_RANGE(0xfd0b,0xfd0b) AM_READ(fm77av_boot_mode_r) |
| 1495 | AM_RANGE(0xfd0c,0xfd0c) AM_READ(fm7_unknown_r) |
| 1496 | AM_RANGE(0xfd0f,0xfd0f) AM_READWRITE(fm7_rom_en_r,fm7_rom_en_w) |
| 1497 | AM_RANGE(0xfd10,0xfd10) AM_WRITE(fm7_init_en_w) |
| 1498 | AM_RANGE(0xfd11,0xfd11) AM_READ(fm7_unknown_r) |
| 1499 | AM_RANGE(0xfd12,0xfd12) AM_READWRITE(fm77av_sub_modestatus_r,fm77av_sub_modestatus_w) |
| 1500 | AM_RANGE(0xfd13,0xfd13) AM_WRITE(fm77av_sub_bank_w) |
| 1501 | AM_RANGE(0xfd14,0xfd14) AM_READ(fm7_unknown_r) |
| 1502 | AM_RANGE(0xfd17,0xfd17) AM_READ(fm7_fmirq_r) |
| 1503 | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE(fm7_fdc_r,fm7_fdc_w) |
| 1504 | AM_RANGE(0xfd20,0xfd23) AM_READWRITE(fm7_kanji_r,fm7_kanji_w) |
| 1505 | AM_RANGE(0xfd24,0xfd2b) AM_READ(fm7_unknown_r) |
| 1506 | AM_RANGE(0xfd30,0xfd34) AM_WRITE(fm77av_analog_palette_w) |
| 1507 | AM_RANGE(0xfd35,0xfd36) AM_READ(fm7_unknown_r) |
| 1508 | AM_RANGE(0xfd37,0xfd37) AM_WRITE(fm7_multipage_w) |
| 1509 | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE(fm7_palette_r,fm7_palette_w) |
| 1510 | AM_RANGE(0xfd40,0xfd7f) AM_READ(fm7_unknown_r) |
| 1511 | AM_RANGE(0xfd80,0xfd93) AM_READWRITE(fm7_mmr_r,fm7_mmr_w) |
| 1512 | AM_RANGE(0xfd94,0xfdff) AM_READ(fm7_unknown_r) |
| 1513 | AM_RANGE(0xfe00,0xffdf) AM_RAM_WRITE(fm77av_bootram_w) AM_SHARE("boot_ram") |
| 1543 | 1514 | AM_RANGE(0xffe0,0xffef) AM_RAM |
| 1544 | | AM_RANGE(0xfff0,0xffff) AM_READWRITE_LEGACY(vector_r,vector_w) |
| 1515 | AM_RANGE(0xfff0,0xffff) AM_READWRITE(vector_r,vector_w) |
| 1545 | 1516 | ADDRESS_MAP_END |
| 1546 | 1517 | |
| 1547 | 1518 | // Much of this is guesswork at the moment |
| 1548 | 1519 | static ADDRESS_MAP_START( fm11_sub_mem, AS_PROGRAM, 8, fm7_state ) |
| 1549 | | AM_RANGE(0x0000,0x7fff) AM_READWRITE_LEGACY(fm7_vram_r,fm7_vram_w) // VRAM |
| 1520 | AM_RANGE(0x0000,0x7fff) AM_READWRITE(fm7_vram_r,fm7_vram_w) // VRAM |
| 1550 | 1521 | AM_RANGE(0x8000,0x8fff) AM_RAM // Console RAM(?) |
| 1551 | 1522 | AM_RANGE(0x9000,0x9f7f) AM_RAM // Work RAM(?) |
| 1552 | 1523 | AM_RANGE(0x9f80,0x9fff) AM_RAM AM_SHARE("shared_ram") |
| 1553 | | AM_RANGE(0xafe4,0xafe4) AM_READWRITE_LEGACY(fm7_sub_busyflag_r,fm7_sub_busyflag_w) |
| 1554 | | AM_RANGE(0xafe6,0xafe6) AM_READWRITE_LEGACY(fm77av_video_flags_r,fm77av_video_flags_w) |
| 1524 | AM_RANGE(0xafe4,0xafe4) AM_READWRITE(fm7_sub_busyflag_r,fm7_sub_busyflag_w) |
| 1525 | AM_RANGE(0xafe6,0xafe6) AM_READWRITE(fm77av_video_flags_r,fm77av_video_flags_w) |
| 1555 | 1526 | AM_RANGE(0xc000,0xffff) AM_ROM // sybsystem ROM |
| 1556 | 1527 | ADDRESS_MAP_END |
| 1557 | 1528 | |
| r14963 | r14964 | |
| 1562 | 1533 | ADDRESS_MAP_END |
| 1563 | 1534 | |
| 1564 | 1535 | static ADDRESS_MAP_START( fm11_x86_io, AS_IO, 8, fm7_state ) |
| 1565 | | AM_RANGE(0xfd00,0xfd01) AM_READWRITE_LEGACY(fm7_keyboard_r,fm7_cassette_printer_w) |
| 1566 | | AM_RANGE(0xfd02,0xfd02) AM_READWRITE_LEGACY(fm7_cassette_printer_r,fm7_irq_mask_w) // IRQ mask |
| 1567 | | AM_RANGE(0xfd03,0xfd03) AM_READWRITE_LEGACY(fm7_irq_cause_r,fm7_beeper_w) // IRQ flags |
| 1568 | | AM_RANGE(0xfd04,0xfd04) AM_READ_LEGACY(fm7_fd04_r) |
| 1569 | | AM_RANGE(0xfd05,0xfd05) AM_READWRITE_LEGACY(fm7_subintf_r,fm7_subintf_w) |
| 1570 | | AM_RANGE(0xfd06,0xfd0c) AM_READ_LEGACY(fm7_unknown_r) |
| 1571 | | AM_RANGE(0xfd0f,0xfd0f) AM_READWRITE_LEGACY(fm7_rom_en_r,fm7_rom_en_w) |
| 1572 | | AM_RANGE(0xfd10,0xfd17) AM_READ_LEGACY(fm7_unknown_r) |
| 1573 | | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE_LEGACY(fm7_fdc_r,fm7_fdc_w) |
| 1574 | | AM_RANGE(0xfd20,0xfd23) AM_READWRITE_LEGACY(fm7_kanji_r,fm7_kanji_w) |
| 1575 | | AM_RANGE(0xfd24,0xfd36) AM_READ_LEGACY(fm7_unknown_r) |
| 1576 | | AM_RANGE(0xfd37,0xfd37) AM_WRITE_LEGACY(fm7_multipage_w) |
| 1577 | | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE_LEGACY(fm7_palette_r,fm7_palette_w) |
| 1578 | | AM_RANGE(0xfd40,0xfdff) AM_READ_LEGACY(fm7_unknown_r) |
| 1536 | AM_RANGE(0xfd00,0xfd01) AM_READWRITE(fm7_keyboard_r,fm7_cassette_printer_w) |
| 1537 | AM_RANGE(0xfd02,0xfd02) AM_READWRITE(fm7_cassette_printer_r,fm7_irq_mask_w) // IRQ mask |
| 1538 | AM_RANGE(0xfd03,0xfd03) AM_READWRITE(fm7_irq_cause_r,fm7_beeper_w) // IRQ flags |
| 1539 | AM_RANGE(0xfd04,0xfd04) AM_READ(fm7_fd04_r) |
| 1540 | AM_RANGE(0xfd05,0xfd05) AM_READWRITE(fm7_subintf_r,fm7_subintf_w) |
| 1541 | AM_RANGE(0xfd06,0xfd0c) AM_READ(fm7_unknown_r) |
| 1542 | AM_RANGE(0xfd0f,0xfd0f) AM_READWRITE(fm7_rom_en_r,fm7_rom_en_w) |
| 1543 | AM_RANGE(0xfd10,0xfd17) AM_READ(fm7_unknown_r) |
| 1544 | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE(fm7_fdc_r,fm7_fdc_w) |
| 1545 | AM_RANGE(0xfd20,0xfd23) AM_READWRITE(fm7_kanji_r,fm7_kanji_w) |
| 1546 | AM_RANGE(0xfd24,0xfd36) AM_READ(fm7_unknown_r) |
| 1547 | AM_RANGE(0xfd37,0xfd37) AM_WRITE(fm7_multipage_w) |
| 1548 | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE(fm7_palette_r,fm7_palette_w) |
| 1549 | AM_RANGE(0xfd40,0xfdff) AM_READ(fm7_unknown_r) |
| 1579 | 1550 | ADDRESS_MAP_END |
| 1580 | 1551 | |
| 1581 | 1552 | static ADDRESS_MAP_START( fm16_mem, AS_PROGRAM, 16, fm7_state ) |
| r14963 | r14964 | |
| 1584 | 1555 | ADDRESS_MAP_END |
| 1585 | 1556 | |
| 1586 | 1557 | static ADDRESS_MAP_START( fm16_io, AS_IO, 16, fm7_state ) |
| 1587 | | AM_RANGE(0xfd00,0xfd01) AM_READWRITE8_LEGACY(fm7_keyboard_r,fm7_cassette_printer_w,0xffff) |
| 1588 | | AM_RANGE(0xfd02,0xfd03) AM_READWRITE8_LEGACY(fm7_cassette_printer_r,fm7_irq_mask_w,0x00ff) // IRQ mask |
| 1589 | | AM_RANGE(0xfd02,0xfd03) AM_READWRITE8_LEGACY(fm7_irq_cause_r,fm7_beeper_w,0xff00) // IRQ flags |
| 1590 | | AM_RANGE(0xfd04,0xfd05) AM_READ8_LEGACY(fm7_fd04_r,0x00ff) |
| 1591 | | AM_RANGE(0xfd04,0xfd05) AM_READWRITE8_LEGACY(fm7_subintf_r,fm7_subintf_w,0xff00) |
| 1592 | | // AM_RANGE(0xfd06,0xfd0c) AM_READ8_LEGACY(fm7_unknown_r,0xffff) |
| 1593 | | AM_RANGE(0xfd0e,0xfd0f) AM_READWRITE8_LEGACY(fm7_rom_en_r,fm7_rom_en_w,0xff00) |
| 1594 | | // AM_RANGE(0xfd10,0xfd17) AM_READ8_LEGACY(fm7_unknown_r,0xffff) |
| 1595 | | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE8_LEGACY(fm7_fdc_r,fm7_fdc_w,0xffff) |
| 1596 | | AM_RANGE(0xfd20,0xfd23) AM_READWRITE8_LEGACY(fm7_kanji_r,fm7_kanji_w,0xffff) |
| 1597 | | // AM_RANGE(0xfd24,0xfd36) AM_READ8_LEGACY(fm7_unknown_r,0xffff) |
| 1598 | | AM_RANGE(0xfd36,0xfd37) AM_WRITE8_LEGACY(fm7_multipage_w,0xff00) |
| 1599 | | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE8_LEGACY(fm7_palette_r,fm7_palette_w,0xffff) |
| 1600 | | // AM_RANGE(0xfd40,0xfdff) AM_READ8_LEGACY(fm7_unknown_r,0xffff) |
| 1558 | AM_RANGE(0xfd00,0xfd01) AM_READWRITE8(fm7_keyboard_r,fm7_cassette_printer_w,0xffff) |
| 1559 | AM_RANGE(0xfd02,0xfd03) AM_READWRITE8(fm7_cassette_printer_r,fm7_irq_mask_w,0x00ff) // IRQ mask |
| 1560 | AM_RANGE(0xfd02,0xfd03) AM_READWRITE8(fm7_irq_cause_r,fm7_beeper_w,0xff00) // IRQ flags |
| 1561 | AM_RANGE(0xfd04,0xfd05) AM_READ8(fm7_fd04_r,0x00ff) |
| 1562 | AM_RANGE(0xfd04,0xfd05) AM_READWRITE8(fm7_subintf_r,fm7_subintf_w,0xff00) |
| 1563 | // AM_RANGE(0xfd06,0xfd0c) AM_READ8(fm7_unknown_r,0xffff) |
| 1564 | AM_RANGE(0xfd0e,0xfd0f) AM_READWRITE8(fm7_rom_en_r,fm7_rom_en_w,0xff00) |
| 1565 | // AM_RANGE(0xfd10,0xfd17) AM_READ8(fm7_unknown_r,0xffff) |
| 1566 | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE8(fm7_fdc_r,fm7_fdc_w,0xffff) |
| 1567 | AM_RANGE(0xfd20,0xfd23) AM_READWRITE8(fm7_kanji_r,fm7_kanji_w,0xffff) |
| 1568 | // AM_RANGE(0xfd24,0xfd36) AM_READ8(fm7_unknown_r,0xffff) |
| 1569 | AM_RANGE(0xfd36,0xfd37) AM_WRITE8(fm7_multipage_w,0xff00) |
| 1570 | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE8(fm7_palette_r,fm7_palette_w,0xffff) |
| 1571 | // AM_RANGE(0xfd40,0xfdff) AM_READ8(fm7_unknown_r,0xffff) |
| 1601 | 1572 | ADDRESS_MAP_END |
| 1602 | 1573 | |
| 1603 | 1574 | static ADDRESS_MAP_START( fm16_sub_mem, AS_PROGRAM, 8, fm7_state ) |
| 1604 | | AM_RANGE(0x0000,0xafff) AM_READWRITE_LEGACY(fm7_vram_r,fm7_vram_w) // VRAM |
| 1575 | AM_RANGE(0x0000,0xafff) AM_READWRITE(fm7_vram_r,fm7_vram_w) // VRAM |
| 1605 | 1576 | AM_RANGE(0xb000,0xffff) AM_ROM // subsystem ROM |
| 1606 | 1577 | ADDRESS_MAP_END |
| 1607 | 1578 | |
| r14963 | r14964 | |
| 1623 | 1594 | AM_RANGE(0xe000,0xefff) AM_RAMBANK("bank15") |
| 1624 | 1595 | AM_RANGE(0xf000,0xfbff) AM_RAMBANK("bank16") |
| 1625 | 1596 | AM_RANGE(0xfc00,0xfc7f) AM_RAM |
| 1626 | | AM_RANGE(0xfc80,0xfcff) AM_READWRITE_LEGACY(fm7_main_shared_r,fm7_main_shared_w) |
| 1597 | AM_RANGE(0xfc80,0xfcff) AM_READWRITE(fm7_main_shared_r,fm7_main_shared_w) |
| 1627 | 1598 | // I/O space (FD00-FDFF) |
| 1628 | | AM_RANGE(0xfd00,0xfd01) AM_READWRITE_LEGACY(fm7_keyboard_r,fm7_cassette_printer_w) |
| 1629 | | AM_RANGE(0xfd02,0xfd02) AM_READWRITE_LEGACY(fm7_cassette_printer_r,fm7_irq_mask_w) // IRQ mask |
| 1630 | | AM_RANGE(0xfd03,0xfd03) AM_READWRITE_LEGACY(fm7_irq_cause_r,fm7_beeper_w) // IRQ flags |
| 1631 | | AM_RANGE(0xfd04,0xfd04) AM_READ_LEGACY(fm7_fd04_r) |
| 1632 | | AM_RANGE(0xfd05,0xfd05) AM_READWRITE_LEGACY(fm7_subintf_r,fm7_subintf_w) |
| 1633 | | AM_RANGE(0xfd06,0xfd0a) AM_READ_LEGACY(fm7_unknown_r) |
| 1634 | | AM_RANGE(0xfd0b,0xfd0b) AM_READ_LEGACY(fm77av_boot_mode_r) |
| 1635 | | AM_RANGE(0xfd0c,0xfd0c) AM_READ_LEGACY(fm7_unknown_r) |
| 1636 | | AM_RANGE(0xfd0d,0xfd0d) AM_READWRITE_LEGACY(fm7_psg_select_r,fm7_psg_select_w) |
| 1637 | | AM_RANGE(0xfd0e,0xfd0e) AM_READWRITE_LEGACY(fm7_psg_data_r, fm7_psg_data_w) |
| 1638 | | AM_RANGE(0xfd0f,0xfd0f) AM_READWRITE_LEGACY(fm7_rom_en_r,fm7_rom_en_w) |
| 1639 | | AM_RANGE(0xfd10,0xfd10) AM_WRITE_LEGACY(fm7_init_en_w) |
| 1640 | | AM_RANGE(0xfd11,0xfd11) AM_READ_LEGACY(fm7_unknown_r) |
| 1641 | | AM_RANGE(0xfd12,0xfd12) AM_READWRITE_LEGACY(fm77av_sub_modestatus_r,fm77av_sub_modestatus_w) |
| 1642 | | AM_RANGE(0xfd13,0xfd13) AM_WRITE_LEGACY(fm77av_sub_bank_w) |
| 1643 | | AM_RANGE(0xfd14,0xfd14) AM_READ_LEGACY(fm7_unknown_r) |
| 1644 | | AM_RANGE(0xfd15,0xfd15) AM_READWRITE_LEGACY(fm7_psg_select_r,fm77av_ym_select_w) |
| 1645 | | AM_RANGE(0xfd16,0xfd16) AM_READWRITE_LEGACY(fm7_psg_data_r,fm7_psg_data_w) |
| 1646 | | AM_RANGE(0xfd17,0xfd17) AM_READ_LEGACY(fm7_fmirq_r) |
| 1647 | | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE_LEGACY(fm7_fdc_r,fm7_fdc_w) |
| 1648 | | AM_RANGE(0xfd20,0xfd23) AM_READWRITE_LEGACY(fm7_kanji_r,fm7_kanji_w) |
| 1649 | | AM_RANGE(0xfd24,0xfd2b) AM_READ_LEGACY(fm7_unknown_r) |
| 1650 | | AM_RANGE(0xfd30,0xfd34) AM_WRITE_LEGACY(fm77av_analog_palette_w) |
| 1651 | | AM_RANGE(0xfd35,0xfd36) AM_READ_LEGACY(fm7_unknown_r) |
| 1652 | | AM_RANGE(0xfd37,0xfd37) AM_WRITE_LEGACY(fm7_multipage_w) |
| 1653 | | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE_LEGACY(fm7_palette_r,fm7_palette_w) |
| 1654 | | AM_RANGE(0xfd40,0xfd7f) AM_READ_LEGACY(fm7_unknown_r) |
| 1655 | | AM_RANGE(0xfd80,0xfd93) AM_READWRITE_LEGACY(fm7_mmr_r,fm7_mmr_w) |
| 1656 | | AM_RANGE(0xfd94,0xfdff) AM_READ_LEGACY(fm7_unknown_r) |
| 1599 | AM_RANGE(0xfd00,0xfd01) AM_READWRITE(fm7_keyboard_r,fm7_cassette_printer_w) |
| 1600 | AM_RANGE(0xfd02,0xfd02) AM_READWRITE(fm7_cassette_printer_r,fm7_irq_mask_w) // IRQ mask |
| 1601 | AM_RANGE(0xfd03,0xfd03) AM_READWRITE(fm7_irq_cause_r,fm7_beeper_w) // IRQ flags |
| 1602 | AM_RANGE(0xfd04,0xfd04) AM_READ(fm7_fd04_r) |
| 1603 | AM_RANGE(0xfd05,0xfd05) AM_READWRITE(fm7_subintf_r,fm7_subintf_w) |
| 1604 | AM_RANGE(0xfd06,0xfd0a) AM_READ(fm7_unknown_r) |
| 1605 | AM_RANGE(0xfd0b,0xfd0b) AM_READ(fm77av_boot_mode_r) |
| 1606 | AM_RANGE(0xfd0c,0xfd0c) AM_READ(fm7_unknown_r) |
| 1607 | AM_RANGE(0xfd0d,0xfd0d) AM_READWRITE(fm7_psg_select_r,fm7_psg_select_w) |
| 1608 | AM_RANGE(0xfd0e,0xfd0e) AM_READWRITE(fm7_psg_data_r, fm7_psg_data_w) |
| 1609 | AM_RANGE(0xfd0f,0xfd0f) AM_READWRITE(fm7_rom_en_r,fm7_rom_en_w) |
| 1610 | AM_RANGE(0xfd10,0xfd10) AM_WRITE(fm7_init_en_w) |
| 1611 | AM_RANGE(0xfd11,0xfd11) AM_READ(fm7_unknown_r) |
| 1612 | AM_RANGE(0xfd12,0xfd12) AM_READWRITE(fm77av_sub_modestatus_r,fm77av_sub_modestatus_w) |
| 1613 | AM_RANGE(0xfd13,0xfd13) AM_WRITE(fm77av_sub_bank_w) |
| 1614 | AM_RANGE(0xfd14,0xfd14) AM_READ(fm7_unknown_r) |
| 1615 | AM_RANGE(0xfd15,0xfd15) AM_READWRITE(fm7_psg_select_r,fm77av_ym_select_w) |
| 1616 | AM_RANGE(0xfd16,0xfd16) AM_READWRITE(fm7_psg_data_r,fm7_psg_data_w) |
| 1617 | AM_RANGE(0xfd17,0xfd17) AM_READ(fm7_fmirq_r) |
| 1618 | AM_RANGE(0xfd18,0xfd1f) AM_READWRITE(fm7_fdc_r,fm7_fdc_w) |
| 1619 | AM_RANGE(0xfd20,0xfd23) AM_READWRITE(fm7_kanji_r,fm7_kanji_w) |
| 1620 | AM_RANGE(0xfd24,0xfd2b) AM_READ(fm7_unknown_r) |
| 1621 | AM_RANGE(0xfd30,0xfd34) AM_WRITE(fm77av_analog_palette_w) |
| 1622 | AM_RANGE(0xfd35,0xfd36) AM_READ(fm7_unknown_r) |
| 1623 | AM_RANGE(0xfd37,0xfd37) AM_WRITE(fm7_multipage_w) |
| 1624 | AM_RANGE(0xfd38,0xfd3f) AM_READWRITE(fm7_palette_r,fm7_palette_w) |
| 1625 | AM_RANGE(0xfd40,0xfd7f) AM_READ(fm7_unknown_r) |
| 1626 | AM_RANGE(0xfd80,0xfd93) AM_READWRITE(fm7_mmr_r,fm7_mmr_w) |
| 1627 | AM_RANGE(0xfd94,0xfdff) AM_READ(fm7_unknown_r) |
| 1657 | 1628 | // Boot ROM (RAM on FM77AV and later) |
| 1658 | | AM_RANGE(0xfe00,0xffdf) AM_RAM_WRITE_LEGACY(fm77av_bootram_w) AM_SHARE("boot_ram") |
| 1629 | AM_RANGE(0xfe00,0xffdf) AM_RAM_WRITE(fm77av_bootram_w) AM_SHARE("boot_ram") |
| 1659 | 1630 | AM_RANGE(0xffe0,0xffef) AM_RAM |
| 1660 | | AM_RANGE(0xfff0,0xffff) AM_READWRITE_LEGACY(vector_r,vector_w) |
| 1631 | AM_RANGE(0xfff0,0xffff) AM_READWRITE(vector_r,vector_w) |
| 1661 | 1632 | ADDRESS_MAP_END |
| 1662 | 1633 | |
| 1663 | 1634 | static ADDRESS_MAP_START( fm77av_sub_mem, AS_PROGRAM, 8, fm7_state ) |
| 1664 | | AM_RANGE(0x0000,0xbfff) AM_READWRITE_LEGACY(fm7_vram_r,fm7_vram_w) // VRAM |
| 1635 | AM_RANGE(0x0000,0xbfff) AM_READWRITE(fm7_vram_r,fm7_vram_w) // VRAM |
| 1665 | 1636 | AM_RANGE(0xc000,0xcfff) AM_RAM AM_REGION("maincpu",0x1c000) // Console RAM |
| 1666 | 1637 | AM_RANGE(0xd000,0xd37f) AM_RAM AM_REGION("maincpu",0x1d000) // Work RAM |
| 1667 | 1638 | AM_RANGE(0xd380,0xd3ff) AM_RAM AM_SHARE("shared_ram") |
| 1668 | 1639 | // I/O space (D400-D4FF) |
| 1669 | | AM_RANGE(0xd400,0xd401) AM_READ_LEGACY(fm7_sub_keyboard_r) |
| 1670 | | AM_RANGE(0xd402,0xd402) AM_READ_LEGACY(fm7_cancel_ack) |
| 1671 | | AM_RANGE(0xd403,0xd403) AM_READ_LEGACY(fm7_sub_beeper_r) |
| 1672 | | AM_RANGE(0xd404,0xd404) AM_READ_LEGACY(fm7_attn_irq_r) |
| 1673 | | AM_RANGE(0xd408,0xd408) AM_READWRITE_LEGACY(fm7_crt_r,fm7_crt_w) |
| 1674 | | AM_RANGE(0xd409,0xd409) AM_READWRITE_LEGACY(fm7_vram_access_r,fm7_vram_access_w) |
| 1675 | | AM_RANGE(0xd40a,0xd40a) AM_READWRITE_LEGACY(fm7_sub_busyflag_r,fm7_sub_busyflag_w) |
| 1676 | | AM_RANGE(0xd40e,0xd40f) AM_WRITE_LEGACY(fm7_vram_offset_w) |
| 1677 | | AM_RANGE(0xd410,0xd42b) AM_READWRITE_LEGACY(fm77av_alu_r, fm77av_alu_w) |
| 1678 | | AM_RANGE(0xd430,0xd430) AM_READWRITE_LEGACY(fm77av_video_flags_r,fm77av_video_flags_w) |
| 1679 | | AM_RANGE(0xd431,0xd432) AM_READWRITE_LEGACY(fm77av_key_encoder_r,fm77av_key_encoder_w) |
| 1640 | AM_RANGE(0xd400,0xd401) AM_READ(fm7_sub_keyboard_r) |
| 1641 | AM_RANGE(0xd402,0xd402) AM_READ(fm7_cancel_ack) |
| 1642 | AM_RANGE(0xd403,0xd403) AM_READ(fm7_sub_beeper_r) |
| 1643 | AM_RANGE(0xd404,0xd404) AM_READ(fm7_attn_irq_r) |
| 1644 | AM_RANGE(0xd408,0xd408) AM_READWRITE(fm7_crt_r,fm7_crt_w) |
| 1645 | AM_RANGE(0xd409,0xd409) AM_READWRITE(fm7_vram_access_r,fm7_vram_access_w) |
| 1646 | AM_RANGE(0xd40a,0xd40a) AM_READWRITE(fm7_sub_busyflag_r,fm7_sub_busyflag_w) |
| 1647 | AM_RANGE(0xd40e,0xd40f) AM_WRITE(fm7_vram_offset_w) |
| 1648 | AM_RANGE(0xd410,0xd42b) AM_READWRITE(fm77av_alu_r, fm77av_alu_w) |
| 1649 | AM_RANGE(0xd430,0xd430) AM_READWRITE(fm77av_video_flags_r,fm77av_video_flags_w) |
| 1650 | AM_RANGE(0xd431,0xd432) AM_READWRITE(fm77av_key_encoder_r,fm77av_key_encoder_w) |
| 1680 | 1651 | AM_RANGE(0xd500,0xd7ff) AM_RAM AM_REGION("maincpu",0x1d500) // Work RAM |
| 1681 | 1652 | AM_RANGE(0xd800,0xdfff) AM_ROMBANK("bank20") |
| 1682 | 1653 | AM_RANGE(0xe000,0xffff) AM_ROMBANK("bank21") |
src/mess/drivers/apollo.c
| r14963 | r14964 | |
| 297 | 297 | DN3500 Cache Control/Status Register at 0x10200 |
| 298 | 298 | ***************************************************************************/ |
| 299 | 299 | |
| 300 | | static WRITE8_HANDLER(cache_control_register_w ) { |
| 300 | WRITE8_MEMBER(apollo_state::cache_control_register_w){ |
| 301 | 301 | if (apollo_is_dn5500()) |
| 302 | 302 | { |
| 303 | 303 | SLOG1(("Error: writing DN5500 Cache Status Register at offset %02x = %02x", offset, data)); |
| r14963 | r14964 | |
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | | static READ8_HANDLER( cache_status_register_r ) { |
| 313 | READ8_MEMBER(apollo_state::cache_status_register_r){ |
| 314 | 314 | UINT8 data = cache_status_register; |
| 315 | 315 | |
| 316 | 316 | if (apollo_is_dn5500()) { |
| r14963 | r14964 | |
| 336 | 336 | DN3500 Task Alias Register at 0x10300 |
| 337 | 337 | ***************************************************************************/ |
| 338 | 338 | |
| 339 | | static WRITE8_HANDLER(task_alias_register_w ) { |
| 339 | WRITE8_MEMBER(apollo_state::task_alias_register_w){ |
| 340 | 340 | task_alias_register = data; |
| 341 | 341 | apollo_set_cache_status_register(0x07, data); |
| 342 | 342 | SLOG(("writing Task Alias Register at offset %02x = %02x",offset, data)); |
| 343 | 343 | } |
| 344 | 344 | |
| 345 | | static READ8_HANDLER( task_alias_register_r ) { |
| 345 | READ8_MEMBER(apollo_state::task_alias_register_r){ |
| 346 | 346 | UINT8 data = 0xff; |
| 347 | 347 | SLOG(("reading Task Alias Register at offset %02x = %02x", offset, data)); |
| 348 | 348 | return data; |
| r14963 | r14964 | |
| 352 | 352 | DN3000/DN3500 Node Id PROM at 0x9600/0x11200 |
| 353 | 353 | ***************************************************************************/ |
| 354 | 354 | |
| 355 | | static WRITE16_HANDLER(apollo_node_id_w ) { |
| 355 | WRITE16_MEMBER(apollo_state::apollo_node_id_w){ |
| 356 | 356 | SLOG1(("Error: writing node id ROM at offset %02x = %04x & %04x", offset, data, mem_mask)); |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | | static READ16_HANDLER( apollo_node_id_r ) { |
| 359 | READ16_MEMBER(apollo_state::apollo_node_id_r){ |
| 360 | 360 | UINT16 data; |
| 361 | 361 | switch (offset & 0x0f) { |
| 362 | 362 | case 1: // msb |
| r14963 | r14964 | |
| 384 | 384 | DN3000/DN3500 Latch Page on Parity Error Register at 0x9300/0x11300 |
| 385 | 385 | ***************************************************************************/ |
| 386 | 386 | |
| 387 | | static WRITE16_HANDLER(latch_page_on_parity_error_register_w ) { |
| 387 | WRITE16_MEMBER(apollo_state::latch_page_on_parity_error_register_w){ |
| 388 | 388 | latch_page_on_parity_error_register = data; |
| 389 | 389 | SLOG1(("writing Latch Page on Error Parity Register at offset %02x = %04x", offset*2, data)); |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | | static READ16_HANDLER( latch_page_on_parity_error_register_r ) { |
| 392 | READ16_MEMBER(apollo_state::latch_page_on_parity_error_register_r){ |
| 393 | 393 | UINT16 data = latch_page_on_parity_error_register; |
| 394 | 394 | SLOG2(("reading Latch Page on Error Parity Register at offset %02x = %04x", offset*2, data)); |
| 395 | 395 | return data; |
| r14963 | r14964 | |
| 399 | 399 | DN3500 Master REQ Register at 0x11600 |
| 400 | 400 | ***************************************************************************/ |
| 401 | 401 | |
| 402 | | static WRITE8_HANDLER(master_req_register_w ) { |
| 402 | WRITE8_MEMBER(apollo_state::master_req_register_w){ |
| 403 | 403 | master_req_register = data; |
| 404 | 404 | SLOG2(("writing Master REQ Register at offset %02x = %02x", offset, data)); |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | | static READ8_HANDLER( master_req_register_r ) { |
| 407 | READ8_MEMBER(apollo_state::master_req_register_r){ |
| 408 | 408 | UINT8 data = 0xff; |
| 409 | 409 | SLOG1(("reading Master REQ Register at offset %02x = %02x", offset, data)); |
| 410 | 410 | return data; |
| r14963 | r14964 | |
| 414 | 414 | DN3500 Selective Clear Locations at 0x11600 |
| 415 | 415 | ***************************************************************************/ |
| 416 | 416 | |
| 417 | | static WRITE16_HANDLER(selective_clear_locations_w ) { |
| 417 | WRITE16_MEMBER(apollo_state::selective_clear_locations_w){ |
| 418 | 418 | SLOG2(("writing Selective Clear Locations at offset %02x = %02x", offset*2, data)); |
| 419 | 419 | switch (offset * 2) { |
| 420 | 420 | case 0x00: // Clear All |
| r14963 | r14964 | |
| 434 | 434 | } |
| 435 | 435 | } |
| 436 | 436 | |
| 437 | | static READ16_HANDLER(selective_clear_locations_r ) { |
| 437 | READ16_MEMBER(apollo_state::selective_clear_locations_r){ |
| 438 | 438 | UINT16 data = 0xffff; |
| 439 | 439 | SLOG1(("reading Selective Clear Locations at offset %02x = %02x", offset*2, data)); |
| 440 | 440 | return data; |
| r14963 | r14964 | |
| 444 | 444 | DN3000/DN3500 RAM with parity (and null proc loop delay for DomainOS) |
| 445 | 445 | ***************************************************************************/ |
| 446 | 446 | |
| 447 | | static READ32_HANDLER( ram_with_parity_r ) { |
| 447 | READ32_MEMBER(apollo_state::ram_with_parity_r){ |
| 448 | 448 | UINT32 data = messram_ptr.u32[parity_error_offset+offset]; |
| 449 | 449 | |
| 450 | 450 | SLOG2(("memory dword read with parity error at %08x = %08x & %08x parity_byte=%04x", |
| r14963 | r14964 | |
| 457 | 457 | |
| 458 | 458 | if (apollo_csr_get_control_register() & APOLLO_CSR_CR_INTERRUPT_ENABLE) { |
| 459 | 459 | // force parity error (if NMI is enabled) |
| 460 | | // cpu_set_input_line_and_vector(&space->device(), 7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 461 | | cputag_set_input_line_and_vector(space->machine(), MAINCPU, 7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 460 | // cpu_set_input_line_and_vector(&space.device(), 7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 461 | cputag_set_input_line_and_vector(machine(), MAINCPU, 7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 462 | 462 | |
| 463 | 463 | } |
| 464 | 464 | } |
| 465 | 465 | return data; |
| 466 | 466 | } |
| 467 | 467 | |
| 468 | | static WRITE32_HANDLER( ram_with_parity_w ) { |
| 468 | WRITE32_MEMBER(apollo_state::ram_with_parity_w){ |
| 469 | 469 | |
| 470 | 470 | COMBINE_DATA(messram_ptr.u32+offset); |
| 471 | 471 | |
| r14963 | r14964 | |
| 486 | 486 | // no more than 192 read/write handlers may be used |
| 487 | 487 | // see table_assign_handler in memory.c |
| 488 | 488 | if (parity_error_handler_install_counter < 40) { |
| 489 | | //memory_install_read32_handler(space, ram_base_address+offset*4, ram_base_address+offset*4+3, 0xffffffff, 0, ram_with_parity_r); |
| 490 | | space->install_legacy_read_handler(ram_base_address+offset*4, ram_base_address+offset*4+3, 0xffffffff,0,FUNC(ram_with_parity_r)); |
| 489 | //memory_install_read32_handler(&space, ram_base_address+offset*4, ram_base_address+offset*4+3, 0xffffffff, 0, ram_with_parity_r); |
| 490 | space.install_read_handler(ram_base_address+offset*4, ram_base_address+offset*4+3, 0xffffffff,0,read32_delegate(FUNC(apollo_state::ram_with_parity_r),this)); |
| 491 | 491 | parity_error_handler_is_installed = 1; |
| 492 | 492 | parity_error_handler_install_counter++; |
| 493 | 493 | } |
| r14963 | r14964 | |
| 498 | 498 | |
| 499 | 499 | // uninstall not supported, reinstall previous read handler instead |
| 500 | 500 | |
| 501 | | // memory_install_rom(space, ram_base_address, ram_end_address, 0xffffffff, 0, messram_ptr.v); |
| 502 | | space->install_rom(ram_base_address,ram_end_address,0xffffffff,0,messram_ptr.v); |
| 501 | // memory_install_rom(&space, ram_base_address, ram_end_address, 0xffffffff, 0, messram_ptr.v); |
| 502 | space.install_rom(ram_base_address,ram_end_address,0xffffffff,0,messram_ptr.v); |
| 503 | 503 | |
| 504 | 504 | parity_error_handler_is_installed = 0; |
| 505 | 505 | parity_error_byte_mask = 0; |
| r14963 | r14964 | |
| 510 | 510 | DN3000/DN3500 unmapped memory |
| 511 | 511 | ***************************************************************************/ |
| 512 | 512 | |
| 513 | | static READ32_HANDLER( apollo_unmapped_r ) |
| 513 | READ32_MEMBER(apollo_state::apollo_unmapped_r) |
| 514 | 514 | { |
| 515 | 515 | offs_t address = offset * 4; |
| 516 | 516 | |
| 517 | | m68ki_cpu_core *m68k = (m68ki_cpu_core *) downcast<legacy_cpu_device *>(&space->device())->token(); |
| 517 | m68ki_cpu_core *m68k = (m68ki_cpu_core *) downcast<legacy_cpu_device *>(&space.device())->token(); |
| 518 | 518 | |
| 519 | 519 | if ((address & 0xfff00000) == 0xfa800000 && VERBOSE < 2) { |
| 520 | 520 | // ? |
| 521 | 521 | } else if ((address & 0xfff00ff7) == 0xfd800000 && VERBOSE < 2) { |
| 522 | | // omit logging for memory sizing in FPA address space |
| 522 | // omit logging for memory sizing in FPA address &space |
| 523 | 523 | // strange: MD seems to search for the 3C505 Boot ROM |
| 524 | | // note (6.10.2010): might be color7 address space (!?!) |
| 524 | // note (6.10.2010): might be color7 address &space (!?!) |
| 525 | 525 | } else if ((address & 0xfc03ffff) == 0x00000000 && VERBOSE < 2) { |
| 526 | 526 | // omit logging for memory sizing in standalone utilities |
| 527 | 527 | } else if (address == 0xfff90000 && VERBOSE < 2) { |
| r14963 | r14964 | |
| 535 | 535 | } |
| 536 | 536 | |
| 537 | 537 | /* unmapped; access causes a bus error */ |
| 538 | | apollo_bus_error(space->machine()); |
| 538 | apollo_bus_error(machine()); |
| 539 | 539 | return 0xffffffff; |
| 540 | 540 | } |
| 541 | 541 | |
| 542 | | static WRITE32_HANDLER( apollo_unmapped_w ) |
| 542 | WRITE32_MEMBER(apollo_state::apollo_unmapped_w) |
| 543 | 543 | { |
| 544 | 544 | SLOG(("unmapped memory dword write to %08x = %08x & %08x", offset * 4, data, mem_mask)); |
| 545 | 545 | |
| 546 | 546 | /* unmapped; access causes a bus error */ |
| 547 | | apollo_bus_error(space->machine()); |
| 547 | apollo_bus_error(machine()); |
| 548 | 548 | } |
| 549 | 549 | |
| 550 | 550 | /*************************************************************************** |
| 551 | 551 | DN3000/DN3500 ROM write |
| 552 | 552 | ***************************************************************************/ |
| 553 | 553 | |
| 554 | | static WRITE32_HANDLER( apollo_rom_w ) |
| 554 | WRITE32_MEMBER(apollo_state::apollo_rom_w) |
| 555 | 555 | { |
| 556 | 556 | offs_t address = offset * 4; |
| 557 | | offs_t pc = cpu_get_previouspc(&space->device()); |
| 557 | offs_t pc = cpu_get_previouspc(&space.device()); |
| 558 | 558 | |
| 559 | 559 | if (pc == 0x00002c1c && address == 0x00000004 && VERBOSE < 2) { |
| 560 | 560 | // don't log invalid code in 3500_boot_12191_7.bin |
| r14963 | r14964 | |
| 567 | 567 | DN3000/DN3500 AT Bus I/O space |
| 568 | 568 | ***************************************************************************/ |
| 569 | 569 | |
| 570 | | static READ16_HANDLER( apollo_atbus_io_r ) { |
| 570 | READ16_MEMBER(apollo_state::apollo_atbus_io_r){ |
| 571 | 571 | UINT16 data = 0xffff; |
| 572 | 572 | offs_t address = ATBUS_IO_BASE + offset * 2; |
| 573 | 573 | |
| r14963 | r14964 | |
| 600 | 600 | return data; |
| 601 | 601 | } |
| 602 | 602 | |
| 603 | | static WRITE16_HANDLER( apollo_atbus_io_w ) { |
| 603 | WRITE16_MEMBER(apollo_state::apollo_atbus_io_w){ |
| 604 | 604 | offs_t address = ATBUS_IO_BASE + offset * 2; |
| 605 | 605 | |
| 606 | 606 | switch (address & ~7) { |
| r14963 | r14964 | |
| 635 | 635 | DN3000/DN3500 AT Bus memory space |
| 636 | 636 | ***************************************************************************/ |
| 637 | 637 | |
| 638 | | static READ32_HANDLER( apollo_atbus_memory_r ) { |
| 638 | READ32_MEMBER(apollo_state::apollo_atbus_memory_r){ |
| 639 | 639 | UINT32 data = 0xffffffff; |
| 640 | 640 | offs_t address = ATBUS_MEMORY_BASE + offset * 4; |
| 641 | 641 | if (VERBOSE < 2 && (address & 0xfff) == 0 && address >= 0x80000 && address < 0x1000000) { |
| r14963 | r14964 | |
| 651 | 651 | return data; |
| 652 | 652 | } |
| 653 | 653 | |
| 654 | | static WRITE32_HANDLER( apollo_atbus_memory_w ) { |
| 654 | WRITE32_MEMBER(apollo_state::apollo_atbus_memory_w){ |
| 655 | 655 | SLOG1(("AT Bus memory dword write to %08x = %08x & %08x ", |
| 656 | 656 | ATBUS_MEMORY_BASE+offset * 4, data, mem_mask)); |
| 657 | 657 | |
| r14963 | r14964 | |
| 665 | 665 | Strange: documented but not used |
| 666 | 666 | ***************************************************************************/ |
| 667 | 667 | |
| 668 | | static WRITE8_HANDLER( dn5500_memory_present_register_w ) { |
| 668 | WRITE8_MEMBER(apollo_state::dn5500_memory_present_register_w){ |
| 669 | 669 | SLOG(("Error: writing DN5500 Memory Present Register at offset %02x = %02x", offset, data)); |
| 670 | 670 | } |
| 671 | 671 | |
| 672 | | static READ8_HANDLER( dn5500_memory_present_register_r ) { |
| 672 | READ8_MEMBER(apollo_state::dn5500_memory_present_register_r){ |
| 673 | 673 | UINT8 data = DN5500_MEM_PRESENT_BYTE; |
| 674 | 674 | SLOG(("reading DN5500 Memory Present Register at offset %02x = %02x", offset, data)); |
| 675 | 675 | return data; |
| r14963 | r14964 | |
| 679 | 679 | DN5500 11500 Registers at 0x11500-0x115ff (undocumented, what does it do?) |
| 680 | 680 | ***************************************************************************/ |
| 681 | 681 | |
| 682 | | static WRITE8_HANDLER( dn5500_11500_w ) { |
| 682 | WRITE8_MEMBER(apollo_state::dn5500_11500_w){ |
| 683 | 683 | SLOG1(("writing DN5500 11500 at offset %02x = %02x", offset, data)); |
| 684 | 684 | } |
| 685 | 685 | |
| 686 | | static READ8_HANDLER( dn5500_11500_r ) { |
| 686 | READ8_MEMBER(apollo_state::dn5500_11500_r){ |
| 687 | 687 | UINT8 data = 0xff; |
| 688 | 688 | SLOG1(("reading DN5500 11500 at offset %02x = %02x", offset, data)); |
| 689 | 689 | return data; |
| r14963 | r14964 | |
| 693 | 693 | DN5500 I/O Protection Map at 0x7000000-0x700FFFF |
| 694 | 694 | ***************************************************************************/ |
| 695 | 695 | |
| 696 | | static WRITE8_HANDLER(dn5500_io_protection_map_w ) { |
| 696 | WRITE8_MEMBER(apollo_state::dn5500_io_protection_map_w){ |
| 697 | 697 | // TODO |
| 698 | 698 | SLOG1(("writing DN5500 I/O Protection Map at offset %02x = %02x", offset, data)); |
| 699 | 699 | } |
| 700 | 700 | |
| 701 | | static READ8_HANDLER( dn5500_io_protection_map_r ) { |
| 701 | READ8_MEMBER(apollo_state::dn5500_io_protection_map_r){ |
| 702 | 702 | UINT8 data = 0xff; |
| 703 | 703 | SLOG1(("reading DN5500 I/O Protection Map at offset %02x = %02x", offset, data)); |
| 704 | 704 | return data; |
| r14963 | r14964 | |
| 709 | 709 | DN3000/DN3500 at f8000000 - ffffffff (used by fpa and/or color7?) |
| 710 | 710 | ***************************************************************************/ |
| 711 | 711 | |
| 712 | | static READ32_HANDLER( apollo_f8_r ) { |
| 712 | READ32_MEMBER(apollo_state::apollo_f8_r){ |
| 713 | 713 | offs_t address = 0xf8000000 + offset * 4; |
| 714 | 714 | UINT32 data = 0xffffffff; |
| 715 | 715 | SLOG2(("unexpected memory dword read from %08x = %08x & %08x", |
| r14963 | r14964 | |
| 717 | 717 | return data; |
| 718 | 718 | } |
| 719 | 719 | |
| 720 | | static WRITE32_HANDLER( apollo_f8_w ) { |
| 720 | WRITE32_MEMBER(apollo_state::apollo_f8_w){ |
| 721 | 721 | offs_t address = 0xf8000000 +offset * 4; |
| 722 | 722 | |
| 723 | 723 | SLOG2(("unexpected memory dword write to %08x = %08x & %08x", |
| r14963 | r14964 | |
| 731 | 731 | |
| 732 | 732 | static ADDRESS_MAP_START(dn3500_map, AS_PROGRAM, 32, apollo_state ) |
| 733 | 733 | AM_RANGE(0x000000, 0x00ffff) AM_ROM /* boot ROM */ |
| 734 | | AM_RANGE(0x000000, 0x00ffff) AM_WRITE_LEGACY(apollo_rom_w) |
| 735 | | AM_RANGE(0x010000, 0x0100ff) AM_READWRITE16_LEGACY(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 736 | | AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16_LEGACY(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 737 | | AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8_LEGACY(cache_status_register_r, cache_control_register_w, 0xffffffff ) |
| 738 | | AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8_LEGACY(task_alias_register_r , task_alias_register_w , 0xffffffff ) |
| 734 | AM_RANGE(0x000000, 0x00ffff) AM_WRITE(apollo_rom_w) |
| 735 | AM_RANGE(0x010000, 0x0100ff) AM_READWRITE16(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 736 | AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 737 | AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8(cache_status_register_r, cache_control_register_w, 0xffffffff ) |
| 738 | AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8(task_alias_register_r , task_alias_register_w , 0xffffffff ) |
| 739 | 739 | AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8_LEGACY(APOLLO_SIO_TAG, apollo_sio_r, apollo_sio_w, 0xffffffff ) |
| 740 | 740 | AM_RANGE(0x010500, 0x0105ff) AM_DEVREADWRITE8_LEGACY(APOLLO_SIO2_TAG, apollo_sio2_r, apollo_sio2_w, 0xffffffff ) |
| 741 | 741 | AM_RANGE(0x010800, 0x0108ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PTM_TAG, apollo_ptm_r, apollo_ptm_w, 0xffffffff ) |
| 742 | | AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8_LEGACY(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 743 | | AM_RANGE(0x010c00, 0x010cff) AM_READWRITE8_LEGACY(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 744 | | AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8_LEGACY(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 742 | AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 743 | AM_RANGE(0x010c00, 0x010cff) AM_READWRITE8(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 744 | AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 745 | 745 | AM_RANGE(0x011000, 0x0110ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC1_TAG, apollo_pic8259_master_r, apollo_pic8259_master_w, 0xffffffff) |
| 746 | 746 | AM_RANGE(0x011100, 0x0111ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC2_TAG, apollo_pic8259_slave_r, apollo_pic8259_slave_w, 0xffffffff) |
| 747 | | AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16_LEGACY(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 748 | | AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16_LEGACY(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 749 | | AM_RANGE(0x011600, 0x0116ff) AM_READWRITE8_LEGACY(master_req_register_r, master_req_register_w, 0xffffffff) |
| 747 | AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 748 | AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 749 | AM_RANGE(0x011600, 0x0116ff) AM_READWRITE8(master_req_register_r, master_req_register_w, 0xffffffff) |
| 750 | 750 | |
| 751 | | AM_RANGE(0x016400, 0x0164ff) AM_READWRITE16_LEGACY(selective_clear_locations_r, selective_clear_locations_w, 0xffffffff ) |
| 752 | | AM_RANGE(0x017000, 0x017fff) AM_READWRITE16_LEGACY(apollo_address_translation_map_r, apollo_address_translation_map_w, 0xffffffff ) |
| 751 | AM_RANGE(0x016400, 0x0164ff) AM_READWRITE16(selective_clear_locations_r, selective_clear_locations_w, 0xffffffff ) |
| 752 | AM_RANGE(0x017000, 0x017fff) AM_READWRITE16(apollo_address_translation_map_r, apollo_address_translation_map_w, 0xffffffff ) |
| 753 | 753 | |
| 754 | 754 | AM_RANGE(0x04D000, 0x04D007) AM_DEVREADWRITE16_LEGACY(APOLLO_WDC_TAG, omti8621_r, omti8621_w, 0xffffffff) |
| 755 | 755 | AM_RANGE(0x050000, 0x050007) AM_DEVREADWRITE8_LEGACY(APOLLO_CTAPE_TAG, sc499_r, sc499_w, 0xffffffff) |
| 756 | 756 | AM_RANGE(0x058000, 0x058007) AM_DEVREADWRITE8_LEGACY(APOLLO_ETH_TAG, threecom3c505_r, threecom3c505_w, 0xffffffff) |
| 757 | | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8_LEGACY(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 757 | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 758 | 758 | |
| 759 | 759 | AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff) |
| 760 | 760 | AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff) |
| 761 | 761 | |
| 762 | | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16_LEGACY(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 762 | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 763 | 763 | |
| 764 | 764 | AM_RANGE(0x080000, 0x081fff) AM_ROM /* 3C505 boot ROM */ |
| 765 | 765 | |
| 766 | 766 | // FIXME: must match with RAM size in driver/apollo_sio.c |
| 767 | 767 | // AM_RANGE(DN3500_RAM_BASE, DN3500_RAM_END) AM_RAM AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) /* 8MB RAM */ |
| 768 | | AM_RANGE(DN3500_RAM_BASE, DN3500_RAM_END) AM_RAM_WRITE_LEGACY(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 768 | AM_RANGE(DN3500_RAM_BASE, DN3500_RAM_END) AM_RAM_WRITE(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 769 | 769 | |
| 770 | | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE_LEGACY(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 770 | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 771 | 771 | |
| 772 | 772 | // AM_RANGE(0x03020000, 0x0303ffff) Cache Tag Store (DN4500 only) |
| 773 | 773 | // AM_RANGE(0x04000000, 0x0400ffff) Cache Tag Data (DN4500 only) |
| 774 | 774 | // AM_RANGE(0x0e000000, 0x0fffffff) FPA address space |
| 775 | 775 | |
| 776 | | // AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE_LEGACY(apollo_f8_r, apollo_f8_w) |
| 777 | | AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE_LEGACY(apollo_unmapped_r, apollo_unmapped_w) |
| 776 | // AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w) |
| 777 | AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(apollo_unmapped_r, apollo_unmapped_w) |
| 778 | 778 | ADDRESS_MAP_END |
| 779 | 779 | |
| 780 | 780 | static ADDRESS_MAP_START(dsp3500_map, AS_PROGRAM, 32, apollo_state ) |
| 781 | 781 | AM_RANGE(0x000000, 0x00ffff) AM_ROM /* boot ROM */ |
| 782 | | AM_RANGE(0x000000, 0x00ffff) AM_WRITE_LEGACY(apollo_rom_w) |
| 783 | | AM_RANGE(0x010000, 0x0100ff) AM_READWRITE16_LEGACY(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 784 | | AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16_LEGACY(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 785 | | AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8_LEGACY(cache_status_register_r, cache_control_register_w, 0xffffffff ) |
| 786 | | AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8_LEGACY(task_alias_register_r , task_alias_register_w , 0xffffffff ) |
| 782 | AM_RANGE(0x000000, 0x00ffff) AM_WRITE(apollo_rom_w) |
| 783 | AM_RANGE(0x010000, 0x0100ff) AM_READWRITE16(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 784 | AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 785 | AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8(cache_status_register_r, cache_control_register_w, 0xffffffff ) |
| 786 | AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8(task_alias_register_r , task_alias_register_w , 0xffffffff ) |
| 787 | 787 | AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8_LEGACY(APOLLO_SIO_TAG, apollo_sio_r, apollo_sio_w, 0xffffffff ) |
| 788 | 788 | AM_RANGE(0x010500, 0x0105ff) AM_DEVREADWRITE8_LEGACY(APOLLO_SIO2_TAG, apollo_sio2_r, apollo_sio2_w, 0xffffffff ) |
| 789 | 789 | AM_RANGE(0x010800, 0x0108ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PTM_TAG, apollo_ptm_r, apollo_ptm_w, 0xffffffff ) |
| 790 | | AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8_LEGACY(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 791 | | AM_RANGE(0x010c00, 0x010cff) AM_READWRITE8_LEGACY(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 792 | | AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8_LEGACY(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 790 | AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 791 | AM_RANGE(0x010c00, 0x010cff) AM_READWRITE8(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 792 | AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 793 | 793 | AM_RANGE(0x011000, 0x0110ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC1_TAG, apollo_pic8259_master_r, apollo_pic8259_master_w, 0xffffffff) |
| 794 | 794 | AM_RANGE(0x011100, 0x0111ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC2_TAG, apollo_pic8259_slave_r, apollo_pic8259_slave_w, 0xffffffff) |
| 795 | | AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16_LEGACY(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 796 | | AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16_LEGACY(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 797 | | AM_RANGE(0x011600, 0x0116ff) AM_READWRITE8_LEGACY(master_req_register_r, master_req_register_w, 0xffffffff) |
| 795 | AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 796 | AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 797 | AM_RANGE(0x011600, 0x0116ff) AM_READWRITE8(master_req_register_r, master_req_register_w, 0xffffffff) |
| 798 | 798 | |
| 799 | | AM_RANGE(0x016400, 0x0164ff) AM_READWRITE16_LEGACY(selective_clear_locations_r, selective_clear_locations_w, 0xffffffff ) |
| 800 | | AM_RANGE(0x017000, 0x017fff) AM_READWRITE16_LEGACY(apollo_address_translation_map_r, apollo_address_translation_map_w, 0xffffffff ) |
| 799 | AM_RANGE(0x016400, 0x0164ff) AM_READWRITE16(selective_clear_locations_r, selective_clear_locations_w, 0xffffffff ) |
| 800 | AM_RANGE(0x017000, 0x017fff) AM_READWRITE16(apollo_address_translation_map_r, apollo_address_translation_map_w, 0xffffffff ) |
| 801 | 801 | |
| 802 | 802 | AM_RANGE(0x04D000, 0x04D007) AM_DEVREADWRITE16_LEGACY(APOLLO_WDC_TAG, omti8621_r, omti8621_w, 0xffffffff) |
| 803 | 803 | AM_RANGE(0x050000, 0x050007) AM_DEVREADWRITE8_LEGACY(APOLLO_CTAPE_TAG, sc499_r, sc499_w, 0xffffffff) |
| 804 | 804 | AM_RANGE(0x058000, 0x058007) AM_DEVREADWRITE8_LEGACY(APOLLO_ETH_TAG, threecom3c505_r, threecom3c505_w, 0xffffffff) |
| 805 | | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8_LEGACY(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 805 | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 806 | 806 | |
| 807 | 807 | // AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff) |
| 808 | 808 | // AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff) |
| 809 | 809 | |
| 810 | | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16_LEGACY(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 810 | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 811 | 811 | |
| 812 | 812 | AM_RANGE(0x080000, 0x081fff) AM_ROM /* 3C505 boot ROM */ |
| 813 | 813 | |
| 814 | 814 | // FIXME: must match with RAM size in driver/apollo_sio.c |
| 815 | 815 | // AM_RANGE(DN3500_RAM_BASE, DN3500_RAM_END) AM_RAM AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) /* 8MB RAM */ |
| 816 | | AM_RANGE(DN3500_RAM_BASE, DN3500_RAM_END) AM_RAM_WRITE_LEGACY(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 816 | AM_RANGE(DN3500_RAM_BASE, DN3500_RAM_END) AM_RAM_WRITE(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 817 | 817 | |
| 818 | | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE_LEGACY(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 818 | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 819 | 819 | |
| 820 | | // AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE_LEGACY(apollo_f8_r, apollo_f8_w) |
| 821 | | AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE_LEGACY(apollo_unmapped_r, apollo_unmapped_w) |
| 820 | // AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w) |
| 821 | AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(apollo_unmapped_r, apollo_unmapped_w) |
| 822 | 822 | ADDRESS_MAP_END |
| 823 | 823 | |
| 824 | 824 | static ADDRESS_MAP_START(dn3000_map, AS_PROGRAM, 32, apollo_state ) |
| 825 | 825 | AM_RANGE(0x000000, 0x007fff) AM_ROM /* boot ROM */ |
| 826 | | AM_RANGE(0x000000, 0x007fff) AM_WRITE_LEGACY(apollo_rom_w) |
| 827 | | AM_RANGE(0x008000, 0x0080ff) AM_READWRITE16_LEGACY(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 828 | | AM_RANGE(0x008100, 0x0081ff) AM_READWRITE16_LEGACY(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 826 | AM_RANGE(0x000000, 0x007fff) AM_WRITE(apollo_rom_w) |
| 827 | AM_RANGE(0x008000, 0x0080ff) AM_READWRITE16(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 828 | AM_RANGE(0x008100, 0x0081ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 829 | 829 | AM_RANGE(0x008400, 0x0087ff) AM_DEVREADWRITE8_LEGACY(APOLLO_SIO_TAG, apollo_sio_r, apollo_sio_w, 0xffffffff ) |
| 830 | 830 | AM_RANGE(0x008800, 0x0088ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PTM_TAG, apollo_ptm_r, apollo_ptm_w, 0xffffffff ) |
| 831 | | AM_RANGE(0x008900, 0x0089ff) AM_READWRITE8_LEGACY(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 831 | AM_RANGE(0x008900, 0x0089ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 832 | 832 | |
| 833 | | AM_RANGE(0x009000, 0x0090ff) AM_READWRITE8_LEGACY(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 834 | | AM_RANGE(0x009100, 0x0091ff) AM_READWRITE8_LEGACY(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 835 | | AM_RANGE(0x009200, 0x0092ff) AM_READWRITE8_LEGACY(apollo_dma_page_register_r, apollo_dma_page_register_w, 0xffffffff ) |
| 836 | | AM_RANGE(0x009300, 0x0093ff) AM_READWRITE16_LEGACY(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 833 | AM_RANGE(0x009000, 0x0090ff) AM_READWRITE8(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 834 | AM_RANGE(0x009100, 0x0091ff) AM_READWRITE8(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 835 | AM_RANGE(0x009200, 0x0092ff) AM_READWRITE8(apollo_dma_page_register_r, apollo_dma_page_register_w, 0xffffffff ) |
| 836 | AM_RANGE(0x009300, 0x0093ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 837 | 837 | AM_RANGE(0x009400, 0x0094ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC1_TAG, apollo_pic8259_master_r, apollo_pic8259_master_w, 0xffffffff) |
| 838 | 838 | AM_RANGE(0x009500, 0x0095ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC2_TAG, apollo_pic8259_slave_r, apollo_pic8259_slave_w, 0xffffffff) |
| 839 | | AM_RANGE(0x009600, 0x0096ff) AM_READWRITE16_LEGACY(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 839 | AM_RANGE(0x009600, 0x0096ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 840 | 840 | |
| 841 | 841 | AM_RANGE(0x04D000, 0x04D007) AM_DEVREADWRITE16_LEGACY(APOLLO_WDC_TAG, omti8621_r, omti8621_w, 0xffffffff) |
| 842 | 842 | AM_RANGE(0x050000, 0x050007) AM_DEVREADWRITE8_LEGACY(APOLLO_CTAPE_TAG, sc499_r, sc499_w, 0xffffffff) |
| 843 | 843 | AM_RANGE(0x058000, 0x058007) AM_DEVREADWRITE8_LEGACY(APOLLO_ETH_TAG, threecom3c505_r, threecom3c505_w, 0xffffffff) |
| 844 | | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8_LEGACY(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 844 | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 845 | 845 | |
| 846 | 846 | AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff) |
| 847 | 847 | AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff) |
| 848 | 848 | |
| 849 | | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16_LEGACY(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 849 | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 850 | 850 | |
| 851 | 851 | AM_RANGE(0x080000, 0x081fff) AM_ROM /* 3C505 boot ROM */ |
| 852 | 852 | |
| 853 | 853 | // FIXME: must match with RAM size in driver/apollo_sio.c |
| 854 | 854 | // AM_RANGE(DN3000_RAM_BASE, DN3000_RAM_END) AM_RAM AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) /* 8MB RAM */ |
| 855 | | AM_RANGE(DN3000_RAM_BASE, DN3000_RAM_END) AM_RAM_WRITE_LEGACY(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 855 | AM_RANGE(DN3000_RAM_BASE, DN3000_RAM_END) AM_RAM_WRITE(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 856 | 856 | |
| 857 | | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE_LEGACY(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 857 | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 858 | 858 | |
| 859 | | AM_RANGE(0x000000, 0xffffff) AM_READWRITE_LEGACY(apollo_unmapped_r, apollo_unmapped_w) |
| 859 | AM_RANGE(0x000000, 0xffffff) AM_READWRITE(apollo_unmapped_r, apollo_unmapped_w) |
| 860 | 860 | ADDRESS_MAP_END |
| 861 | 861 | |
| 862 | 862 | static ADDRESS_MAP_START(dsp3000_map, AS_PROGRAM, 32, apollo_state ) |
| 863 | 863 | AM_RANGE(0x000000, 0x007fff) AM_ROM /* boot ROM */ |
| 864 | | AM_RANGE(0x000000, 0x007fff) AM_WRITE_LEGACY(apollo_rom_w) |
| 865 | | AM_RANGE(0x008000, 0x0080ff) AM_READWRITE16_LEGACY(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 866 | | AM_RANGE(0x008100, 0x0081ff) AM_READWRITE16_LEGACY(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 864 | AM_RANGE(0x000000, 0x007fff) AM_WRITE(apollo_rom_w) |
| 865 | AM_RANGE(0x008000, 0x0080ff) AM_READWRITE16(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 866 | AM_RANGE(0x008100, 0x0081ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 867 | 867 | AM_RANGE(0x008400, 0x0087ff) AM_DEVREADWRITE8_LEGACY(APOLLO_SIO_TAG, apollo_sio_r, apollo_sio_w, 0xffffffff ) |
| 868 | 868 | AM_RANGE(0x008800, 0x0088ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PTM_TAG, apollo_ptm_r, apollo_ptm_w, 0xffffffff ) |
| 869 | | AM_RANGE(0x008900, 0x0089ff) AM_READWRITE8_LEGACY(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 869 | AM_RANGE(0x008900, 0x0089ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 870 | 870 | |
| 871 | | AM_RANGE(0x009000, 0x0090ff) AM_READWRITE8_LEGACY(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 872 | | AM_RANGE(0x009100, 0x0091ff) AM_READWRITE8_LEGACY(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 873 | | AM_RANGE(0x009200, 0x0092ff) AM_READWRITE8_LEGACY(apollo_dma_page_register_r, apollo_dma_page_register_w, 0xffffffff ) |
| 874 | | AM_RANGE(0x009300, 0x0093ff) AM_READWRITE16_LEGACY(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 871 | AM_RANGE(0x009000, 0x0090ff) AM_READWRITE8(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 872 | AM_RANGE(0x009100, 0x0091ff) AM_READWRITE8(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 873 | AM_RANGE(0x009200, 0x0092ff) AM_READWRITE8(apollo_dma_page_register_r, apollo_dma_page_register_w, 0xffffffff ) |
| 874 | AM_RANGE(0x009300, 0x0093ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 875 | 875 | AM_RANGE(0x009400, 0x0094ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC1_TAG, apollo_pic8259_master_r, apollo_pic8259_master_w, 0xffffffff) |
| 876 | 876 | AM_RANGE(0x009500, 0x0095ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC2_TAG, apollo_pic8259_slave_r, apollo_pic8259_slave_w, 0xffffffff) |
| 877 | | AM_RANGE(0x009600, 0x0096ff) AM_READWRITE16_LEGACY(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 877 | AM_RANGE(0x009600, 0x0096ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 878 | 878 | |
| 879 | 879 | AM_RANGE(0x04D000, 0x04D007) AM_DEVREADWRITE16_LEGACY(APOLLO_WDC_TAG, omti8621_r, omti8621_w, 0xffffffff) |
| 880 | 880 | AM_RANGE(0x050000, 0x050007) AM_DEVREADWRITE8_LEGACY(APOLLO_CTAPE_TAG, sc499_r, sc499_w, 0xffffffff) |
| 881 | 881 | AM_RANGE(0x058000, 0x058007) AM_DEVREADWRITE8_LEGACY(APOLLO_ETH_TAG, threecom3c505_r, threecom3c505_w, 0xffffffff) |
| 882 | | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8_LEGACY(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 882 | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 883 | 883 | |
| 884 | 884 | // AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff) |
| 885 | 885 | // AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff) |
| 886 | 886 | |
| 887 | | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16_LEGACY(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 887 | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 888 | 888 | |
| 889 | 889 | AM_RANGE(0x080000, 0x081fff) AM_ROM /* 3C505 boot ROM */ |
| 890 | 890 | |
| 891 | 891 | // FIXME: must match with RAM size in driver/apollo_sio.c |
| 892 | 892 | // AM_RANGE(DN3000_RAM_BASE, DN3000_RAM_END) AM_RAM AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) /* 8MB RAM */ |
| 893 | | AM_RANGE(DN3000_RAM_BASE, DN3000_RAM_END) AM_RAM_WRITE_LEGACY(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 893 | AM_RANGE(DN3000_RAM_BASE, DN3000_RAM_END) AM_RAM_WRITE(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 894 | 894 | |
| 895 | | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE_LEGACY(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 895 | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 896 | 896 | |
| 897 | | AM_RANGE(0x000000, 0xffffff) AM_READWRITE_LEGACY(apollo_unmapped_r, apollo_unmapped_w) |
| 897 | AM_RANGE(0x000000, 0xffffff) AM_READWRITE(apollo_unmapped_r, apollo_unmapped_w) |
| 898 | 898 | ADDRESS_MAP_END |
| 899 | 899 | |
| 900 | 900 | |
| 901 | 901 | static ADDRESS_MAP_START(dn5500_map, AS_PROGRAM, 32, apollo_state ) |
| 902 | 902 | AM_RANGE(0x000000, 0x00ffff) AM_ROM /* boot ROM */ |
| 903 | | AM_RANGE(0x000000, 0x00ffff) AM_WRITE_LEGACY(apollo_rom_w) |
| 904 | | AM_RANGE(0x010000, 0x0100ff) AM_READWRITE16_LEGACY(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 905 | | AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16_LEGACY(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 906 | | AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8_LEGACY(cache_status_register_r, cache_control_register_w, 0xffffffff ) |
| 907 | | AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8_LEGACY(task_alias_register_r , task_alias_register_w , 0xffffffff ) |
| 903 | AM_RANGE(0x000000, 0x00ffff) AM_WRITE(apollo_rom_w) |
| 904 | AM_RANGE(0x010000, 0x0100ff) AM_READWRITE16(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 905 | AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 906 | AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8(cache_status_register_r, cache_control_register_w, 0xffffffff ) |
| 907 | AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8(task_alias_register_r , task_alias_register_w , 0xffffffff ) |
| 908 | 908 | AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8_LEGACY(APOLLO_SIO_TAG, apollo_sio_r, apollo_sio_w, 0xffffffff ) |
| 909 | 909 | AM_RANGE(0x010500, 0x0105ff) AM_DEVREADWRITE8_LEGACY(APOLLO_SIO2_TAG, apollo_sio2_r, apollo_sio2_w, 0xffffffff ) |
| 910 | 910 | AM_RANGE(0x010800, 0x0108ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PTM_TAG, apollo_ptm_r, apollo_ptm_w, 0xffffffff ) |
| 911 | | AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8_LEGACY(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 912 | | AM_RANGE(0x010c00, 0x010cff) AM_READWRITE8_LEGACY(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 913 | | AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8_LEGACY(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 911 | AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 912 | AM_RANGE(0x010c00, 0x010cff) AM_READWRITE8(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 913 | AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 914 | 914 | AM_RANGE(0x011000, 0x0110ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC1_TAG, apollo_pic8259_master_r, apollo_pic8259_master_w, 0xffffffff) |
| 915 | 915 | AM_RANGE(0x011100, 0x0111ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC2_TAG, apollo_pic8259_slave_r, apollo_pic8259_slave_w, 0xffffffff) |
| 916 | | AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16_LEGACY(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 917 | | AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16_LEGACY(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 918 | | AM_RANGE(0x011400, 0x0114ff) AM_READWRITE8_LEGACY(dn5500_memory_present_register_r, dn5500_memory_present_register_w, 0xffffffff ) |
| 919 | | AM_RANGE(0x011500, 0x0115ff) AM_READWRITE8_LEGACY(dn5500_11500_r, dn5500_11500_w, 0xffffffff ) |
| 920 | | AM_RANGE(0x011600, 0x0116ff) AM_READWRITE8_LEGACY(master_req_register_r, master_req_register_w, 0xffffffff) |
| 916 | AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 917 | AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 918 | AM_RANGE(0x011400, 0x0114ff) AM_READWRITE8(dn5500_memory_present_register_r, dn5500_memory_present_register_w, 0xffffffff ) |
| 919 | AM_RANGE(0x011500, 0x0115ff) AM_READWRITE8(dn5500_11500_r, dn5500_11500_w, 0xffffffff ) |
| 920 | AM_RANGE(0x011600, 0x0116ff) AM_READWRITE8(master_req_register_r, master_req_register_w, 0xffffffff) |
| 921 | 921 | |
| 922 | | AM_RANGE(0x016400, 0x0164ff) AM_READWRITE16_LEGACY(selective_clear_locations_r, selective_clear_locations_w, 0xffffffff ) |
| 923 | | AM_RANGE(0x017000, 0x017fff) AM_READWRITE16_LEGACY(apollo_address_translation_map_r, apollo_address_translation_map_w, 0xffffffff ) |
| 922 | AM_RANGE(0x016400, 0x0164ff) AM_READWRITE16(selective_clear_locations_r, selective_clear_locations_w, 0xffffffff ) |
| 923 | AM_RANGE(0x017000, 0x017fff) AM_READWRITE16(apollo_address_translation_map_r, apollo_address_translation_map_w, 0xffffffff ) |
| 924 | 924 | |
| 925 | 925 | AM_RANGE(0x04D000, 0x04D007) AM_DEVREADWRITE16_LEGACY(APOLLO_WDC_TAG, omti8621_r, omti8621_w, 0xffffffff) |
| 926 | 926 | AM_RANGE(0x050000, 0x050007) AM_DEVREADWRITE8_LEGACY(APOLLO_CTAPE_TAG, sc499_r, sc499_w, 0xffffffff) |
| 927 | 927 | AM_RANGE(0x058000, 0x058007) AM_DEVREADWRITE8_LEGACY(APOLLO_ETH_TAG, threecom3c505_r, threecom3c505_w, 0xffffffff) |
| 928 | | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8_LEGACY(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 928 | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 929 | 929 | |
| 930 | 930 | AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff) |
| 931 | 931 | AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff) |
| 932 | 932 | |
| 933 | | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16_LEGACY(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 933 | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 934 | 934 | |
| 935 | 935 | AM_RANGE(0x080000, 0x081fff) AM_ROM /* 3C505 boot ROM */ |
| 936 | 936 | |
| 937 | 937 | // FIXME: must match with RAM size in driver/apollo_sio.c |
| 938 | 938 | // AM_RANGE(DN3500_RAM_BASE, DN3500_RAM_END) AM_RAM AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) /* 8MB RAM */ |
| 939 | | AM_RANGE(DN5500_RAM_BASE, DN5500_RAM_END) AM_RAM_WRITE_LEGACY(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 939 | AM_RANGE(DN5500_RAM_BASE, DN5500_RAM_END) AM_RAM_WRITE(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 940 | 940 | |
| 941 | | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE_LEGACY(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 941 | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 942 | 942 | |
| 943 | 943 | // AM_RANGE(0x03020000, 0x0303ffff) Cache Tag Store (DN4500 only) |
| 944 | 944 | // AM_RANGE(0x04000000, 0x0400ffff) Cache Tag Data (DN4500 only) |
| 945 | | AM_RANGE(0x07000000, 0x0700FFFF) AM_READWRITE8_LEGACY(dn5500_io_protection_map_r, dn5500_io_protection_map_w, 0xffffffff ) |
| 945 | AM_RANGE(0x07000000, 0x0700FFFF) AM_READWRITE8(dn5500_io_protection_map_r, dn5500_io_protection_map_w, 0xffffffff ) |
| 946 | 946 | // AM_RANGE(0x0e000000, 0x0fffffff) FPA address space |
| 947 | 947 | |
| 948 | | // AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE_LEGACY(apollo_f8_r, apollo_f8_w) |
| 949 | | AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE_LEGACY(apollo_unmapped_r, apollo_unmapped_w) |
| 948 | // AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w) |
| 949 | AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(apollo_unmapped_r, apollo_unmapped_w) |
| 950 | 950 | ADDRESS_MAP_END |
| 951 | 951 | |
| 952 | 952 | |
| 953 | 953 | static ADDRESS_MAP_START(dsp5500_map, AS_PROGRAM, 32, apollo_state ) |
| 954 | 954 | AM_RANGE(0x000000, 0x00ffff) AM_ROM /* boot ROM */ |
| 955 | | AM_RANGE(0x000000, 0x00ffff) AM_WRITE_LEGACY(apollo_rom_w) |
| 956 | | AM_RANGE(0x010000, 0x0100ff) AM_READWRITE16_LEGACY(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 957 | | AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16_LEGACY(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 958 | | AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8_LEGACY(cache_status_register_r, cache_control_register_w, 0xffffffff ) |
| 959 | | AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8_LEGACY(task_alias_register_r , task_alias_register_w , 0xffffffff ) |
| 955 | AM_RANGE(0x000000, 0x00ffff) AM_WRITE(apollo_rom_w) |
| 956 | AM_RANGE(0x010000, 0x0100ff) AM_READWRITE16(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff) |
| 957 | AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff) |
| 958 | AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8(cache_status_register_r, cache_control_register_w, 0xffffffff ) |
| 959 | AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8(task_alias_register_r , task_alias_register_w , 0xffffffff ) |
| 960 | 960 | AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8_LEGACY(APOLLO_SIO_TAG, apollo_sio_r, apollo_sio_w, 0xffffffff ) |
| 961 | 961 | AM_RANGE(0x010500, 0x0105ff) AM_DEVREADWRITE8_LEGACY(APOLLO_SIO2_TAG, apollo_sio2_r, apollo_sio2_w, 0xffffffff ) |
| 962 | 962 | AM_RANGE(0x010800, 0x0108ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PTM_TAG, apollo_ptm_r, apollo_ptm_w, 0xffffffff ) |
| 963 | | AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8_LEGACY(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 964 | | AM_RANGE(0x010c00, 0x010cff) AM_READWRITE8_LEGACY(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 965 | | AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8_LEGACY(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 963 | AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff ) |
| 964 | AM_RANGE(0x010c00, 0x010cff) AM_READWRITE8(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff ) |
| 965 | AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) |
| 966 | 966 | AM_RANGE(0x011000, 0x0110ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC1_TAG, apollo_pic8259_master_r, apollo_pic8259_master_w, 0xffffffff) |
| 967 | 967 | AM_RANGE(0x011100, 0x0111ff) AM_DEVREADWRITE8_LEGACY(APOLLO_PIC2_TAG, apollo_pic8259_slave_r, apollo_pic8259_slave_w, 0xffffffff) |
| 968 | | AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16_LEGACY(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 969 | | AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16_LEGACY(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 970 | | AM_RANGE(0x011400, 0x0114ff) AM_READWRITE8_LEGACY(dn5500_memory_present_register_r, dn5500_memory_present_register_w, 0xffffffff ) |
| 971 | | AM_RANGE(0x011500, 0x0115ff) AM_READWRITE8_LEGACY(dn5500_11500_r, dn5500_11500_w, 0xffffffff ) |
| 972 | | AM_RANGE(0x011600, 0x0116ff) AM_READWRITE8_LEGACY(master_req_register_r, master_req_register_w, 0xffffffff) |
| 968 | AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) |
| 969 | AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) |
| 970 | AM_RANGE(0x011400, 0x0114ff) AM_READWRITE8(dn5500_memory_present_register_r, dn5500_memory_present_register_w, 0xffffffff ) |
| 971 | AM_RANGE(0x011500, 0x0115ff) AM_READWRITE8(dn5500_11500_r, dn5500_11500_w, 0xffffffff ) |
| 972 | AM_RANGE(0x011600, 0x0116ff) AM_READWRITE8(master_req_register_r, master_req_register_w, 0xffffffff) |
| 973 | 973 | |
| 974 | | AM_RANGE(0x016400, 0x0164ff) AM_READWRITE16_LEGACY(selective_clear_locations_r, selective_clear_locations_w, 0xffffffff ) |
| 975 | | AM_RANGE(0x017000, 0x017fff) AM_READWRITE16_LEGACY(apollo_address_translation_map_r, apollo_address_translation_map_w, 0xffffffff ) |
| 974 | AM_RANGE(0x016400, 0x0164ff) AM_READWRITE16(selective_clear_locations_r, selective_clear_locations_w, 0xffffffff ) |
| 975 | AM_RANGE(0x017000, 0x017fff) AM_READWRITE16(apollo_address_translation_map_r, apollo_address_translation_map_w, 0xffffffff ) |
| 976 | 976 | |
| 977 | 977 | AM_RANGE(0x04D000, 0x04D007) AM_DEVREADWRITE16_LEGACY(APOLLO_WDC_TAG, omti8621_r, omti8621_w, 0xffffffff) |
| 978 | 978 | AM_RANGE(0x050000, 0x050007) AM_DEVREADWRITE8_LEGACY(APOLLO_CTAPE_TAG, sc499_r, sc499_w, 0xffffffff) |
| 979 | 979 | AM_RANGE(0x058000, 0x058007) AM_DEVREADWRITE8_LEGACY(APOLLO_ETH_TAG, threecom3c505_r, threecom3c505_w, 0xffffffff) |
| 980 | | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8_LEGACY(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 980 | AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8(apollo_fdc_r, apollo_fdc_w, 0xffffffff) |
| 981 | 981 | |
| 982 | 982 | // AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff) |
| 983 | 983 | // AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16_LEGACY(APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff) |
| 984 | 984 | |
| 985 | | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16_LEGACY(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 985 | AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) |
| 986 | 986 | |
| 987 | 987 | AM_RANGE(0x080000, 0x081fff) AM_ROM /* 3C505 boot ROM */ |
| 988 | 988 | |
| 989 | 989 | // FIXME: must match with RAM size in driver/apollo_sio.c |
| 990 | | AM_RANGE(DN5500_RAM_BASE, DN5500_RAM_END) AM_RAM_WRITE_LEGACY(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 990 | AM_RANGE(DN5500_RAM_BASE, DN5500_RAM_END) AM_RAM_WRITE(ram_with_parity_w) AM_BASE_LEGACY(&messram_ptr.u32) AM_SIZE_LEGACY(&messram_size) |
| 991 | 991 | |
| 992 | | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE_LEGACY(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 992 | AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE(apollo_atbus_memory_r, apollo_atbus_memory_w) |
| 993 | 993 | |
| 994 | | AM_RANGE(0x07000000, 0x0700FFFF) AM_READWRITE8_LEGACY(dn5500_io_protection_map_r, dn5500_io_protection_map_w, 0xffffffff ) |
| 995 | | // AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE_LEGACY(apollo_f8_r, apollo_f8_w) |
| 996 | | AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE_LEGACY(apollo_unmapped_r, apollo_unmapped_w) |
| 994 | AM_RANGE(0x07000000, 0x0700FFFF) AM_READWRITE8(dn5500_io_protection_map_r, dn5500_io_protection_map_w, 0xffffffff ) |
| 995 | // AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w) |
| 996 | AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(apollo_unmapped_r, apollo_unmapped_w) |
| 997 | 997 | ADDRESS_MAP_END |
| 998 | 998 | |
| 999 | 999 | /*************************************************************************** |
src/mess/drivers/gp32.c
| r14963 | r14964 | |
| 300 | 300 | return 0; |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | | static READ32_HANDLER( s3c240x_lcd_r ) |
| 303 | READ32_MEMBER(gp32_state::s3c240x_lcd_r) |
| 304 | 304 | { |
| 305 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 306 | | running_machine &machine = space->machine(); |
| 307 | | UINT32 data = state->m_s3c240x_lcd_regs[offset]; |
| 305 | UINT32 data = m_s3c240x_lcd_regs[offset]; |
| 308 | 306 | switch (offset) |
| 309 | 307 | { |
| 310 | 308 | // LCDCON1 |
| 311 | 309 | case 0x00 / 4 : |
| 312 | 310 | { |
| 313 | 311 | // make sure line counter is going |
| 314 | | UINT32 lineval = BITS( state->m_s3c240x_lcd_regs[1], 23, 14); |
| 315 | | data = (data & ~0xFFFC0000) | ((lineval - machine.primary_screen->vpos()) << 18); |
| 312 | UINT32 lineval = BITS( m_s3c240x_lcd_regs[1], 23, 14); |
| 313 | data = (data & ~0xFFFC0000) | ((lineval - machine().primary_screen->vpos()) << 18); |
| 316 | 314 | } |
| 317 | 315 | break; |
| 318 | 316 | } |
| 319 | | verboselog( machine, 9, "(LCD) %08X -> %08X (PC %08X)\n", 0x14A00000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 317 | verboselog( machine(), 9, "(LCD) %08X -> %08X (PC %08X)\n", 0x14A00000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 320 | 318 | return data; |
| 321 | 319 | } |
| 322 | 320 | |
| r14963 | r14964 | |
| 377 | 375 | } |
| 378 | 376 | } |
| 379 | 377 | |
| 380 | | static WRITE32_HANDLER( s3c240x_lcd_w ) |
| 378 | WRITE32_MEMBER(gp32_state::s3c240x_lcd_w) |
| 381 | 379 | { |
| 382 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 383 | | running_machine &machine = space->machine(); |
| 384 | | UINT32 old_value = state->m_s3c240x_lcd_regs[offset]; |
| 385 | | verboselog( machine, 9, "(LCD) %08X <- %08X (PC %08X)\n", 0x14A00000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 386 | | COMBINE_DATA(&state->m_s3c240x_lcd_regs[offset]); |
| 380 | UINT32 old_value = m_s3c240x_lcd_regs[offset]; |
| 381 | verboselog( machine(), 9, "(LCD) %08X <- %08X (PC %08X)\n", 0x14A00000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 382 | COMBINE_DATA(&m_s3c240x_lcd_regs[offset]); |
| 387 | 383 | switch (offset) |
| 388 | 384 | { |
| 389 | 385 | // LCDCON1 |
| r14963 | r14964 | |
| 391 | 387 | { |
| 392 | 388 | if ((old_value & 1) != (data & 1)) |
| 393 | 389 | { |
| 394 | | s3c240x_lcd_recalc( machine); |
| 390 | s3c240x_lcd_recalc( machine()); |
| 395 | 391 | } |
| 396 | 392 | } |
| 397 | 393 | break; |
| r14963 | r14964 | |
| 401 | 397 | // LCD PALETTE |
| 402 | 398 | |
| 403 | 399 | |
| 404 | | static READ32_HANDLER( s3c240x_lcd_palette_r ) |
| 400 | READ32_MEMBER(gp32_state::s3c240x_lcd_palette_r) |
| 405 | 401 | { |
| 406 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 407 | | running_machine &machine = space->machine(); |
| 408 | | UINT32 data = state->m_s3c240x_lcd_palette[offset]; |
| 409 | | verboselog( machine, 9, "(LCD) %08X -> %08X (PC %08X)\n", 0x14A00400 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 402 | UINT32 data = m_s3c240x_lcd_palette[offset]; |
| 403 | verboselog( machine(), 9, "(LCD) %08X -> %08X (PC %08X)\n", 0x14A00400 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 410 | 404 | return data; |
| 411 | 405 | } |
| 412 | 406 | |
| 413 | | static WRITE32_HANDLER( s3c240x_lcd_palette_w ) |
| 407 | WRITE32_MEMBER(gp32_state::s3c240x_lcd_palette_w) |
| 414 | 408 | { |
| 415 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 416 | | running_machine &machine = space->machine(); |
| 417 | | verboselog( machine, 9, "(LCD) %08X <- %08X (PC %08X)\n", 0x14A00400 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 418 | | COMBINE_DATA(&state->m_s3c240x_lcd_palette[offset]); |
| 409 | verboselog( machine(), 9, "(LCD) %08X <- %08X (PC %08X)\n", 0x14A00400 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 410 | COMBINE_DATA(&m_s3c240x_lcd_palette[offset]); |
| 419 | 411 | if (mem_mask != 0xffffffff) |
| 420 | 412 | { |
| 421 | | verboselog( machine, 0, "s3c240x_lcd_palette_w: unknown mask %08x\n", mem_mask); |
| 413 | verboselog( machine(), 0, "s3c240x_lcd_palette_w: unknown mask %08x\n", mem_mask); |
| 422 | 414 | } |
| 423 | | palette_set_color( machine, offset, s3c240x_get_color_5551( data & 0xFFFF)); |
| 415 | palette_set_color( machine(), offset, s3c240x_get_color_5551( data & 0xFFFF)); |
| 424 | 416 | } |
| 425 | 417 | |
| 426 | 418 | // CLOCK & POWER MANAGEMENT |
| r14963 | r14964 | |
| 460 | 452 | return 0; |
| 461 | 453 | } |
| 462 | 454 | |
| 463 | | static READ32_HANDLER( s3c240x_clkpow_r ) |
| 455 | READ32_MEMBER(gp32_state::s3c240x_clkpow_r) |
| 464 | 456 | { |
| 465 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 466 | | running_machine &machine = space->machine(); |
| 467 | | UINT32 data = state->m_s3c240x_clkpow_regs[offset]; |
| 468 | | verboselog( machine, 9, "(CLKPOW) %08X -> %08X (PC %08X)\n", 0x14800000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 457 | UINT32 data = m_s3c240x_clkpow_regs[offset]; |
| 458 | verboselog( machine(), 9, "(CLKPOW) %08X -> %08X (PC %08X)\n", 0x14800000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 469 | 459 | return data; |
| 470 | 460 | } |
| 471 | 461 | |
| 472 | | static WRITE32_HANDLER( s3c240x_clkpow_w ) |
| 462 | WRITE32_MEMBER(gp32_state::s3c240x_clkpow_w) |
| 473 | 463 | { |
| 474 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 475 | | running_machine &machine = space->machine(); |
| 476 | | verboselog( machine, 9, "(CLKPOW) %08X <- %08X (PC %08X)\n", 0x14800000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 477 | | COMBINE_DATA(&state->m_s3c240x_clkpow_regs[offset]); |
| 464 | verboselog( machine(), 9, "(CLKPOW) %08X <- %08X (PC %08X)\n", 0x14800000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 465 | COMBINE_DATA(&m_s3c240x_clkpow_regs[offset]); |
| 478 | 466 | switch (offset) |
| 479 | 467 | { |
| 480 | 468 | // MPLLCON |
| 481 | 469 | case 0x04 / 4 : |
| 482 | 470 | { |
| 483 | | machine.device("maincpu")->set_unscaled_clock(s3c240x_get_fclk(state, MPLLCON) * CLOCK_MULTIPLIER); |
| 471 | gp32_state *state = machine().driver_data<gp32_state>(); |
| 472 | machine().device("maincpu")->set_unscaled_clock(s3c240x_get_fclk(state, MPLLCON) * CLOCK_MULTIPLIER); |
| 484 | 473 | } |
| 485 | 474 | break; |
| 486 | 475 | } |
| r14963 | r14964 | |
| 530 | 519 | } |
| 531 | 520 | |
| 532 | 521 | |
| 533 | | static READ32_HANDLER( s3c240x_irq_r ) |
| 522 | READ32_MEMBER(gp32_state::s3c240x_irq_r) |
| 534 | 523 | { |
| 535 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 536 | | running_machine &machine = space->machine(); |
| 537 | | UINT32 data = state->m_s3c240x_irq_regs[offset]; |
| 538 | | verboselog( machine, 9, "(IRQ) %08X -> %08X (PC %08X)\n", 0x14400000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 524 | UINT32 data = m_s3c240x_irq_regs[offset]; |
| 525 | verboselog( machine(), 9, "(IRQ) %08X -> %08X (PC %08X)\n", 0x14400000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 539 | 526 | return data; |
| 540 | 527 | } |
| 541 | 528 | |
| 542 | | static WRITE32_HANDLER( s3c240x_irq_w ) |
| 529 | WRITE32_MEMBER(gp32_state::s3c240x_irq_w) |
| 543 | 530 | { |
| 544 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 545 | | running_machine &machine = space->machine(); |
| 546 | | UINT32 old_value = state->m_s3c240x_irq_regs[offset]; |
| 547 | | verboselog( machine, 9, "(IRQ) %08X <- %08X (PC %08X)\n", 0x14400000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 548 | | COMBINE_DATA(&state->m_s3c240x_irq_regs[offset]); |
| 531 | UINT32 old_value = m_s3c240x_irq_regs[offset]; |
| 532 | verboselog( machine(), 9, "(IRQ) %08X <- %08X (PC %08X)\n", 0x14400000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 533 | COMBINE_DATA(&m_s3c240x_irq_regs[offset]); |
| 549 | 534 | switch (offset) |
| 550 | 535 | { |
| 551 | 536 | // SRCPND |
| 552 | 537 | case 0x00 / 4 : |
| 553 | 538 | { |
| 554 | | state->m_s3c240x_irq_regs[0] = (old_value & ~data); // clear only the bit positions of SRCPND corresponding to those set to one in the data |
| 555 | | s3c240x_check_pending_irq( machine); |
| 539 | m_s3c240x_irq_regs[0] = (old_value & ~data); // clear only the bit positions of SRCPND corresponding to those set to one in the data |
| 540 | s3c240x_check_pending_irq( machine()); |
| 556 | 541 | } |
| 557 | 542 | break; |
| 558 | 543 | // INTPND |
| 559 | 544 | case 0x10 / 4 : |
| 560 | 545 | { |
| 561 | | state->m_s3c240x_irq_regs[4] = (old_value & ~data); // clear only the bit positions of INTPND corresponding to those set to one in the data |
| 546 | m_s3c240x_irq_regs[4] = (old_value & ~data); // clear only the bit positions of INTPND corresponding to those set to one in the data |
| 562 | 547 | } |
| 563 | 548 | break; |
| 564 | 549 | } |
| r14963 | r14964 | |
| 591 | 576 | #endif |
| 592 | 577 | |
| 593 | 578 | |
| 594 | | static READ32_HANDLER( s3c240x_pwm_r ) |
| 579 | READ32_MEMBER(gp32_state::s3c240x_pwm_r) |
| 595 | 580 | { |
| 596 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 597 | | running_machine &machine = space->machine(); |
| 598 | | UINT32 data = state->m_s3c240x_pwm_regs[offset]; |
| 599 | | verboselog( machine, 9, "(PWM) %08X -> %08X (PC %08X)\n", 0x15100000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 581 | UINT32 data = m_s3c240x_pwm_regs[offset]; |
| 582 | verboselog( machine(), 9, "(PWM) %08X -> %08X (PC %08X)\n", 0x15100000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 600 | 583 | return data; |
| 601 | 584 | } |
| 602 | 585 | |
| r14963 | r14964 | |
| 658 | 641 | } |
| 659 | 642 | } |
| 660 | 643 | |
| 661 | | static WRITE32_HANDLER( s3c240x_pwm_w ) |
| 644 | WRITE32_MEMBER(gp32_state::s3c240x_pwm_w) |
| 662 | 645 | { |
| 663 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 664 | | running_machine &machine = space->machine(); |
| 665 | | UINT32 old_value = state->m_s3c240x_pwm_regs[offset]; |
| 666 | | verboselog( machine, 9, "(PWM) %08X <- %08X (PC %08X)\n", 0x15100000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 667 | | COMBINE_DATA(&state->m_s3c240x_pwm_regs[offset]); |
| 646 | UINT32 old_value = m_s3c240x_pwm_regs[offset]; |
| 647 | verboselog( machine(), 9, "(PWM) %08X <- %08X (PC %08X)\n", 0x15100000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 648 | COMBINE_DATA(&m_s3c240x_pwm_regs[offset]); |
| 668 | 649 | switch (offset) |
| 669 | 650 | { |
| 670 | 651 | // TCON |
| r14963 | r14964 | |
| 672 | 653 | { |
| 673 | 654 | if ((data & 1) != (old_value & 1)) |
| 674 | 655 | { |
| 675 | | s3c240x_pwm_recalc( machine, 0); |
| 656 | s3c240x_pwm_recalc( machine(), 0); |
| 676 | 657 | } |
| 677 | 658 | if ((data & 0x100) != (old_value & 0x100)) |
| 678 | 659 | { |
| 679 | | s3c240x_pwm_recalc( machine, 1); |
| 660 | s3c240x_pwm_recalc( machine(), 1); |
| 680 | 661 | } |
| 681 | 662 | if ((data & 0x1000) != (old_value & 0x1000)) |
| 682 | 663 | { |
| 683 | | s3c240x_pwm_recalc( machine, 2); |
| 664 | s3c240x_pwm_recalc( machine(), 2); |
| 684 | 665 | } |
| 685 | 666 | if ((data & 0x10000) != (old_value & 0x10000)) |
| 686 | 667 | { |
| 687 | | s3c240x_pwm_recalc( machine, 3); |
| 668 | s3c240x_pwm_recalc( machine(), 3); |
| 688 | 669 | } |
| 689 | 670 | if ((data & 0x100000) != (old_value & 0x100000)) |
| 690 | 671 | { |
| 691 | | s3c240x_pwm_recalc( machine, 4); |
| 672 | s3c240x_pwm_recalc( machine(), 4); |
| 692 | 673 | } |
| 693 | 674 | } |
| 694 | 675 | } |
| r14963 | r14964 | |
| 855 | 836 | } |
| 856 | 837 | } |
| 857 | 838 | |
| 858 | | static READ32_HANDLER( s3c240x_dma_r ) |
| 839 | READ32_MEMBER(gp32_state::s3c240x_dma_r) |
| 859 | 840 | { |
| 860 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 861 | | running_machine &machine = space->machine(); |
| 862 | | UINT32 data = state->m_s3c240x_dma_regs[offset]; |
| 863 | | verboselog( machine, 9, "(DMA) %08X -> %08X (PC %08X)\n", 0x14600000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 841 | UINT32 data = m_s3c240x_dma_regs[offset]; |
| 842 | verboselog( machine(), 9, "(DMA) %08X -> %08X (PC %08X)\n", 0x14600000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 864 | 843 | return data; |
| 865 | 844 | } |
| 866 | 845 | |
| 867 | | static WRITE32_HANDLER( s3c240x_dma_w ) |
| 846 | WRITE32_MEMBER(gp32_state::s3c240x_dma_w) |
| 868 | 847 | { |
| 869 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 870 | | running_machine &machine = space->machine(); |
| 871 | | UINT32 old_value = state->m_s3c240x_dma_regs[offset]; |
| 872 | | verboselog( machine, 9, "(DMA) %08X <- %08X (PC %08X)\n", 0x14600000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 873 | | COMBINE_DATA(&state->m_s3c240x_dma_regs[offset]); |
| 848 | UINT32 old_value = m_s3c240x_dma_regs[offset]; |
| 849 | verboselog( machine(), 9, "(DMA) %08X <- %08X (PC %08X)\n", 0x14600000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 850 | COMBINE_DATA(&m_s3c240x_dma_regs[offset]); |
| 874 | 851 | switch (offset) |
| 875 | 852 | { |
| 876 | 853 | // DCON0 |
| r14963 | r14964 | |
| 878 | 855 | { |
| 879 | 856 | if (((data >> 22) & 1) != 0) // reload |
| 880 | 857 | { |
| 881 | | state->m_s3c240x_dma_regs[0x18/4] &= ~(1 << 1); // clear on/off |
| 858 | m_s3c240x_dma_regs[0x18/4] &= ~(1 << 1); // clear on/off |
| 882 | 859 | } |
| 883 | 860 | } |
| 884 | 861 | break; |
| 885 | 862 | // DMASKTRIG0 |
| 886 | 863 | case 0x18 / 4 : |
| 887 | 864 | { |
| 888 | | if ((old_value & 2) != (data & 2)) s3c240x_dma_recalc( machine, 0); |
| 865 | if ((old_value & 2) != (data & 2)) s3c240x_dma_recalc( machine(), 0); |
| 889 | 866 | } |
| 890 | 867 | break; |
| 891 | 868 | // DCON1 |
| r14963 | r14964 | |
| 893 | 870 | { |
| 894 | 871 | if (((data >> 22) & 1) != 0) // reload |
| 895 | 872 | { |
| 896 | | state->m_s3c240x_dma_regs[0x38/4] &= ~(1 << 1); // clear on/off |
| 873 | m_s3c240x_dma_regs[0x38/4] &= ~(1 << 1); // clear on/off |
| 897 | 874 | } |
| 898 | 875 | } |
| 899 | 876 | break; |
| 900 | 877 | // DMASKTRIG1 |
| 901 | 878 | case 0x38 / 4 : |
| 902 | 879 | { |
| 903 | | if ((old_value & 2) != (data & 2)) s3c240x_dma_recalc( machine, 1); |
| 880 | if ((old_value & 2) != (data & 2)) s3c240x_dma_recalc( machine(), 1); |
| 904 | 881 | } |
| 905 | 882 | break; |
| 906 | 883 | // DCON2 |
| r14963 | r14964 | |
| 908 | 885 | { |
| 909 | 886 | if (((data >> 22) & 1) != 0) // reload |
| 910 | 887 | { |
| 911 | | state->m_s3c240x_dma_regs[0x58/4] &= ~(1 << 1); // clear on/off |
| 888 | m_s3c240x_dma_regs[0x58/4] &= ~(1 << 1); // clear on/off |
| 912 | 889 | } |
| 913 | 890 | } |
| 914 | 891 | break; |
| 915 | 892 | // DMASKTRIG2 |
| 916 | 893 | case 0x58 / 4 : |
| 917 | 894 | { |
| 918 | | if ((old_value & 2) != (data & 2)) s3c240x_dma_recalc( machine, 2); |
| 895 | if ((old_value & 2) != (data & 2)) s3c240x_dma_recalc( machine(), 2); |
| 919 | 896 | } |
| 920 | 897 | break; |
| 921 | 898 | // DCON3 |
| r14963 | r14964 | |
| 923 | 900 | { |
| 924 | 901 | if (((data >> 22) & 1) != 0) // reload |
| 925 | 902 | { |
| 926 | | state->m_s3c240x_dma_regs[0x78/4] &= ~(1 << 1); // clear on/off |
| 903 | m_s3c240x_dma_regs[0x78/4] &= ~(1 << 1); // clear on/off |
| 927 | 904 | } |
| 928 | 905 | } |
| 929 | 906 | break; |
| 930 | 907 | // DMASKTRIG3 |
| 931 | 908 | case 0x78 / 4 : |
| 932 | 909 | { |
| 933 | | if ((old_value & 2) != (data & 2)) s3c240x_dma_recalc( machine, 3); |
| 910 | if ((old_value & 2) != (data & 2)) s3c240x_dma_recalc( machine(), 3); |
| 934 | 911 | } |
| 935 | 912 | break; |
| 936 | 913 | } |
| r14963 | r14964 | |
| 1077 | 1054 | // I/O PORT |
| 1078 | 1055 | |
| 1079 | 1056 | |
| 1080 | | static READ32_HANDLER( s3c240x_gpio_r ) |
| 1057 | READ32_MEMBER(gp32_state::s3c240x_gpio_r) |
| 1081 | 1058 | { |
| 1082 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1083 | | running_machine &machine = space->machine(); |
| 1084 | | UINT32 data = state->m_s3c240x_gpio[offset]; |
| 1059 | UINT32 data = m_s3c240x_gpio[offset]; |
| 1085 | 1060 | switch (offset) |
| 1086 | 1061 | { |
| 1087 | 1062 | // PBCON |
| r14963 | r14964 | |
| 1089 | 1064 | { |
| 1090 | 1065 | // smartmedia |
| 1091 | 1066 | data = (data & ~0x00000001); |
| 1092 | | if (!state->m_smc.read) data = data | 0x00000001; |
| 1067 | if (!m_smc.read) data = data | 0x00000001; |
| 1093 | 1068 | } |
| 1094 | 1069 | break; |
| 1095 | 1070 | // PBDAT |
| 1096 | 1071 | case 0x0C / 4 : |
| 1097 | 1072 | { |
| 1098 | 1073 | // smartmedia |
| 1099 | | data = (data & ~0x000000FF) | (state->m_smc.datarx & 0xFF); |
| 1074 | data = (data & ~0x000000FF) | (m_smc.datarx & 0xFF); |
| 1100 | 1075 | // buttons |
| 1101 | | data = (data & ~0x0000FF00) | (input_port_read( machine, "IN0") & 0x0000FF00); |
| 1076 | data = (data & ~0x0000FF00) | (input_port_read( machine(), "IN0") & 0x0000FF00); |
| 1102 | 1077 | } |
| 1103 | 1078 | break; |
| 1104 | 1079 | // PDDAT |
| 1105 | 1080 | case 0x24 / 4 : |
| 1106 | 1081 | { |
| 1107 | | smartmedia_image_device *smartmedia = machine.device<smartmedia_image_device>( "smartmedia"); |
| 1082 | smartmedia_image_device *smartmedia = machine().device<smartmedia_image_device>( "smartmedia"); |
| 1108 | 1083 | // smartmedia |
| 1109 | 1084 | data = (data & ~0x000003C0); |
| 1110 | | if (!state->m_smc.busy) data = data | 0x00000200; |
| 1111 | | if (!state->m_smc.do_read) data = data | 0x00000100; |
| 1112 | | if (!state->m_smc.chip) data = data | 0x00000080; |
| 1085 | if (!m_smc.busy) data = data | 0x00000200; |
| 1086 | if (!m_smc.do_read) data = data | 0x00000100; |
| 1087 | if (!m_smc.chip) data = data | 0x00000080; |
| 1113 | 1088 | if (!smartmedia->is_protected()) data = data | 0x00000040; |
| 1114 | 1089 | } |
| 1115 | 1090 | break; |
| 1116 | 1091 | // PEDAT |
| 1117 | 1092 | case 0x30 / 4 : |
| 1118 | 1093 | { |
| 1119 | | smartmedia_image_device *smartmedia = machine.device<smartmedia_image_device>( "smartmedia"); |
| 1094 | smartmedia_image_device *smartmedia = machine().device<smartmedia_image_device>( "smartmedia"); |
| 1120 | 1095 | // smartmedia |
| 1121 | 1096 | data = (data & ~0x0000003C); |
| 1122 | | if (state->m_smc.cmd_latch) data = data | 0x00000020; |
| 1123 | | if (state->m_smc.add_latch) data = data | 0x00000010; |
| 1124 | | if (!state->m_smc.do_write) data = data | 0x00000008; |
| 1097 | if (m_smc.cmd_latch) data = data | 0x00000020; |
| 1098 | if (m_smc.add_latch) data = data | 0x00000010; |
| 1099 | if (!m_smc.do_write) data = data | 0x00000008; |
| 1125 | 1100 | if (!smartmedia->is_present()) data = data | 0x00000004; |
| 1126 | 1101 | // buttons |
| 1127 | | data = (data & ~0x000000C0) | (input_port_read( machine, "IN1") & 0x000000C0); |
| 1102 | data = (data & ~0x000000C0) | (input_port_read( machine(), "IN1") & 0x000000C0); |
| 1128 | 1103 | } |
| 1129 | 1104 | break; |
| 1130 | 1105 | } |
| 1131 | | verboselog( machine, 9, "(GPIO) %08X -> %08X (PC %08X)\n", 0x15600000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1106 | verboselog( machine(), 9, "(GPIO) %08X -> %08X (PC %08X)\n", 0x15600000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1132 | 1107 | return data; |
| 1133 | 1108 | } |
| 1134 | 1109 | |
| 1135 | | static WRITE32_HANDLER( s3c240x_gpio_w ) |
| 1110 | WRITE32_MEMBER(gp32_state::s3c240x_gpio_w) |
| 1136 | 1111 | { |
| 1137 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1138 | | running_machine &machine = space->machine(); |
| 1139 | | COMBINE_DATA(&state->m_s3c240x_gpio[offset]); |
| 1140 | | verboselog( machine, 9, "(GPIO) %08X <- %08X (PC %08X)\n", 0x15600000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1112 | COMBINE_DATA(&m_s3c240x_gpio[offset]); |
| 1113 | verboselog( machine(), 9, "(GPIO) %08X <- %08X (PC %08X)\n", 0x15600000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1141 | 1114 | switch (offset) |
| 1142 | 1115 | { |
| 1143 | 1116 | // PBCON |
| 1144 | 1117 | case 0x08 / 4 : |
| 1145 | 1118 | { |
| 1146 | 1119 | // smartmedia |
| 1147 | | state->m_smc.read = ((data & 0x00000001) == 0); |
| 1148 | | smc_update( machine); |
| 1120 | m_smc.read = ((data & 0x00000001) == 0); |
| 1121 | smc_update( machine()); |
| 1149 | 1122 | } |
| 1150 | 1123 | break; |
| 1151 | 1124 | // PBDAT |
| 1152 | 1125 | case 0x0C / 4 : |
| 1153 | 1126 | { |
| 1154 | 1127 | // smartmedia |
| 1155 | | state->m_smc.datatx = data & 0xFF; |
| 1128 | m_smc.datatx = data & 0xFF; |
| 1156 | 1129 | } |
| 1157 | 1130 | break; |
| 1158 | 1131 | // PDDAT |
| 1159 | 1132 | case 0x24 / 4 : |
| 1160 | 1133 | { |
| 1161 | 1134 | // smartmedia |
| 1162 | | state->m_smc.do_read = ((data & 0x00000100) == 0); |
| 1163 | | state->m_smc.chip = ((data & 0x00000080) == 0); |
| 1164 | | state->m_smc.wp = ((data & 0x00000040) == 0); |
| 1165 | | smc_update( machine); |
| 1135 | m_smc.do_read = ((data & 0x00000100) == 0); |
| 1136 | m_smc.chip = ((data & 0x00000080) == 0); |
| 1137 | m_smc.wp = ((data & 0x00000040) == 0); |
| 1138 | smc_update( machine()); |
| 1166 | 1139 | } |
| 1167 | 1140 | break; |
| 1168 | 1141 | // PEDAT |
| 1169 | 1142 | case 0x30 / 4 : |
| 1170 | 1143 | { |
| 1171 | 1144 | // smartmedia |
| 1172 | | state->m_smc.cmd_latch = ((data & 0x00000020) != 0); |
| 1173 | | state->m_smc.add_latch = ((data & 0x00000010) != 0); |
| 1174 | | state->m_smc.do_write = ((data & 0x00000008) == 0); |
| 1175 | | smc_update( machine); |
| 1145 | m_smc.cmd_latch = ((data & 0x00000020) != 0); |
| 1146 | m_smc.add_latch = ((data & 0x00000010) != 0); |
| 1147 | m_smc.do_write = ((data & 0x00000008) == 0); |
| 1148 | smc_update( machine()); |
| 1176 | 1149 | // sound |
| 1177 | | i2s_write( machine, I2S_L3D, (data & 0x00000800) ? 1 : 0); |
| 1178 | | i2s_write( machine, I2S_L3M, (data & 0x00000400) ? 1 : 0); |
| 1179 | | i2s_write( machine, I2S_L3C, (data & 0x00000200) ? 1 : 0); |
| 1150 | i2s_write( machine(), I2S_L3D, (data & 0x00000800) ? 1 : 0); |
| 1151 | i2s_write( machine(), I2S_L3M, (data & 0x00000400) ? 1 : 0); |
| 1152 | i2s_write( machine(), I2S_L3C, (data & 0x00000200) ? 1 : 0); |
| 1180 | 1153 | } |
| 1181 | 1154 | break; |
| 1182 | 1155 | #if 0 |
| r14963 | r14964 | |
| 1194 | 1167 | // MEMORY CONTROLLER |
| 1195 | 1168 | |
| 1196 | 1169 | |
| 1197 | | static READ32_HANDLER( s3c240x_memcon_r ) |
| 1170 | READ32_MEMBER(gp32_state::s3c240x_memcon_r) |
| 1198 | 1171 | { |
| 1199 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1200 | | running_machine &machine = space->machine(); |
| 1201 | | UINT32 data = state->m_s3c240x_memcon_regs[offset]; |
| 1202 | | verboselog( machine, 9, "(MEMCON) %08X -> %08X (PC %08X)\n", 0x14000000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1172 | UINT32 data = m_s3c240x_memcon_regs[offset]; |
| 1173 | verboselog( machine(), 9, "(MEMCON) %08X -> %08X (PC %08X)\n", 0x14000000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1203 | 1174 | return data; |
| 1204 | 1175 | } |
| 1205 | 1176 | |
| 1206 | | static WRITE32_HANDLER( s3c240x_memcon_w ) |
| 1177 | WRITE32_MEMBER(gp32_state::s3c240x_memcon_w) |
| 1207 | 1178 | { |
| 1208 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1209 | | running_machine &machine = space->machine(); |
| 1210 | | verboselog( machine, 9, "(MEMCON) %08X <- %08X (PC %08X)\n", 0x14000000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1211 | | COMBINE_DATA(&state->m_s3c240x_memcon_regs[offset]); |
| 1179 | verboselog( machine(), 9, "(MEMCON) %08X <- %08X (PC %08X)\n", 0x14000000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1180 | COMBINE_DATA(&m_s3c240x_memcon_regs[offset]); |
| 1212 | 1181 | } |
| 1213 | 1182 | |
| 1214 | 1183 | // USB HOST CONTROLLER |
| 1215 | 1184 | |
| 1216 | 1185 | |
| 1217 | | static READ32_HANDLER( s3c240x_usb_host_r ) |
| 1186 | READ32_MEMBER(gp32_state::s3c240x_usb_host_r) |
| 1218 | 1187 | { |
| 1219 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1220 | | running_machine &machine = space->machine(); |
| 1221 | | UINT32 data = state->m_s3c240x_usb_host_regs[offset]; |
| 1222 | | verboselog( machine, 9, "(USB H) %08X -> %08X (PC %08X)\n", 0x14200000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1188 | UINT32 data = m_s3c240x_usb_host_regs[offset]; |
| 1189 | verboselog( machine(), 9, "(USB H) %08X -> %08X (PC %08X)\n", 0x14200000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1223 | 1190 | return data; |
| 1224 | 1191 | } |
| 1225 | 1192 | |
| 1226 | | static WRITE32_HANDLER( s3c240x_usb_host_w ) |
| 1193 | WRITE32_MEMBER(gp32_state::s3c240x_usb_host_w) |
| 1227 | 1194 | { |
| 1228 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1229 | | running_machine &machine = space->machine(); |
| 1230 | | verboselog( machine, 9, "(USB H) %08X <- %08X (PC %08X)\n", 0x14200000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1231 | | COMBINE_DATA(&state->m_s3c240x_usb_host_regs[offset]); |
| 1195 | verboselog( machine(), 9, "(USB H) %08X <- %08X (PC %08X)\n", 0x14200000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1196 | COMBINE_DATA(&m_s3c240x_usb_host_regs[offset]); |
| 1232 | 1197 | } |
| 1233 | 1198 | |
| 1234 | 1199 | // UART 0 |
| 1235 | 1200 | |
| 1236 | 1201 | |
| 1237 | | static READ32_HANDLER( s3c240x_uart_0_r ) |
| 1202 | READ32_MEMBER(gp32_state::s3c240x_uart_0_r) |
| 1238 | 1203 | { |
| 1239 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1240 | | running_machine &machine = space->machine(); |
| 1241 | | UINT32 data = state->m_s3c240x_uart_0_regs[offset]; |
| 1204 | UINT32 data = m_s3c240x_uart_0_regs[offset]; |
| 1242 | 1205 | switch (offset) |
| 1243 | 1206 | { |
| 1244 | 1207 | // UTRSTAT0 |
| r14963 | r14964 | |
| 1248 | 1211 | } |
| 1249 | 1212 | break; |
| 1250 | 1213 | } |
| 1251 | | verboselog( machine, 9, "(UART 0) %08X -> %08X (PC %08X)\n", 0x15000000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1214 | verboselog( machine(), 9, "(UART 0) %08X -> %08X (PC %08X)\n", 0x15000000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1252 | 1215 | return data; |
| 1253 | 1216 | } |
| 1254 | 1217 | |
| 1255 | | static WRITE32_HANDLER( s3c240x_uart_0_w ) |
| 1218 | WRITE32_MEMBER(gp32_state::s3c240x_uart_0_w) |
| 1256 | 1219 | { |
| 1257 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1258 | | running_machine &machine = space->machine(); |
| 1259 | | verboselog( machine, 9, "(UART 0) %08X <- %08X (PC %08X)\n", 0x15000000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1260 | | COMBINE_DATA(&state->m_s3c240x_uart_0_regs[offset]); |
| 1220 | verboselog( machine(), 9, "(UART 0) %08X <- %08X (PC %08X)\n", 0x15000000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1221 | COMBINE_DATA(&m_s3c240x_uart_0_regs[offset]); |
| 1261 | 1222 | } |
| 1262 | 1223 | |
| 1263 | 1224 | // UART 1 |
| 1264 | 1225 | |
| 1265 | 1226 | |
| 1266 | | static READ32_HANDLER( s3c240x_uart_1_r ) |
| 1227 | READ32_MEMBER(gp32_state::s3c240x_uart_1_r) |
| 1267 | 1228 | { |
| 1268 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1269 | | running_machine &machine = space->machine(); |
| 1270 | | UINT32 data = state->m_s3c240x_uart_1_regs[offset]; |
| 1229 | UINT32 data = m_s3c240x_uart_1_regs[offset]; |
| 1271 | 1230 | switch (offset) |
| 1272 | 1231 | { |
| 1273 | 1232 | // UTRSTAT1 |
| r14963 | r14964 | |
| 1277 | 1236 | } |
| 1278 | 1237 | break; |
| 1279 | 1238 | } |
| 1280 | | verboselog( machine, 9, "(UART 1) %08X -> %08X (PC %08X)\n", 0x15004000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1239 | verboselog( machine(), 9, "(UART 1) %08X -> %08X (PC %08X)\n", 0x15004000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1281 | 1240 | return data; |
| 1282 | 1241 | } |
| 1283 | 1242 | |
| 1284 | | static WRITE32_HANDLER( s3c240x_uart_1_w ) |
| 1243 | WRITE32_MEMBER(gp32_state::s3c240x_uart_1_w) |
| 1285 | 1244 | { |
| 1286 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1287 | | running_machine &machine = space->machine(); |
| 1288 | | verboselog( machine, 9, "(UART 1) %08X <- %08X (PC %08X)\n", 0x15004000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1289 | | COMBINE_DATA(&state->m_s3c240x_uart_1_regs[offset]); |
| 1245 | verboselog( machine(), 9, "(UART 1) %08X <- %08X (PC %08X)\n", 0x15004000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1246 | COMBINE_DATA(&m_s3c240x_uart_1_regs[offset]); |
| 1290 | 1247 | } |
| 1291 | 1248 | |
| 1292 | 1249 | // USB DEVICE |
| 1293 | 1250 | |
| 1294 | 1251 | |
| 1295 | | static READ32_HANDLER( s3c240x_usb_device_r ) |
| 1252 | READ32_MEMBER(gp32_state::s3c240x_usb_device_r) |
| 1296 | 1253 | { |
| 1297 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1298 | | running_machine &machine = space->machine(); |
| 1299 | | UINT32 data = state->m_s3c240x_usb_device_regs[offset]; |
| 1300 | | verboselog( machine, 9, "(USB D) %08X -> %08X (PC %08X)\n", 0x15200140 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1254 | UINT32 data = m_s3c240x_usb_device_regs[offset]; |
| 1255 | verboselog( machine(), 9, "(USB D) %08X -> %08X (PC %08X)\n", 0x15200140 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1301 | 1256 | return data; |
| 1302 | 1257 | } |
| 1303 | 1258 | |
| 1304 | | static WRITE32_HANDLER( s3c240x_usb_device_w ) |
| 1259 | WRITE32_MEMBER(gp32_state::s3c240x_usb_device_w) |
| 1305 | 1260 | { |
| 1306 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1307 | | running_machine &machine = space->machine(); |
| 1308 | | verboselog( machine, 9, "(USB D) %08X <- %08X (PC %08X)\n", 0x15200140 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1309 | | COMBINE_DATA(&state->m_s3c240x_usb_device_regs[offset]); |
| 1261 | verboselog( machine(), 9, "(USB D) %08X <- %08X (PC %08X)\n", 0x15200140 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1262 | COMBINE_DATA(&m_s3c240x_usb_device_regs[offset]); |
| 1310 | 1263 | } |
| 1311 | 1264 | |
| 1312 | 1265 | // WATCHDOG TIMER |
| 1313 | 1266 | |
| 1314 | 1267 | |
| 1315 | | static READ32_HANDLER( s3c240x_watchdog_r ) |
| 1268 | READ32_MEMBER(gp32_state::s3c240x_watchdog_r) |
| 1316 | 1269 | { |
| 1317 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1318 | | running_machine &machine = space->machine(); |
| 1319 | | UINT32 data = state->m_s3c240x_watchdog_regs[offset]; |
| 1320 | | verboselog( machine, 9, "(WDOG) %08X -> %08X (PC %08X)\n", 0x15300000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1270 | UINT32 data = m_s3c240x_watchdog_regs[offset]; |
| 1271 | verboselog( machine(), 9, "(WDOG) %08X -> %08X (PC %08X)\n", 0x15300000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1321 | 1272 | return data; |
| 1322 | 1273 | } |
| 1323 | 1274 | |
| 1324 | | static WRITE32_HANDLER( s3c240x_watchdog_w ) |
| 1275 | WRITE32_MEMBER(gp32_state::s3c240x_watchdog_w) |
| 1325 | 1276 | { |
| 1326 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1327 | | running_machine &machine = space->machine(); |
| 1328 | | verboselog( machine, 9, "(WDOG) %08X <- %08X (PC %08X)\n", 0x15300000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1329 | | COMBINE_DATA(&state->m_s3c240x_watchdog_regs[offset]); |
| 1277 | verboselog( machine(), 9, "(WDOG) %08X <- %08X (PC %08X)\n", 0x15300000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1278 | COMBINE_DATA(&m_s3c240x_watchdog_regs[offset]); |
| 1330 | 1279 | } |
| 1331 | 1280 | |
| 1332 | 1281 | // EEPROM |
| r14963 | r14964 | |
| 1427 | 1376 | state->m_s3c240x_iic_timer->adjust( attotime::from_msec( 1)); |
| 1428 | 1377 | } |
| 1429 | 1378 | |
| 1430 | | static READ32_HANDLER( s3c240x_iic_r ) |
| 1379 | READ32_MEMBER(gp32_state::s3c240x_iic_r) |
| 1431 | 1380 | { |
| 1432 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1433 | | running_machine &machine = space->machine(); |
| 1434 | | UINT32 data = state->m_s3c240x_iic_regs[offset]; |
| 1381 | UINT32 data = m_s3c240x_iic_regs[offset]; |
| 1435 | 1382 | switch (offset) |
| 1436 | 1383 | { |
| 1437 | 1384 | // IICSTAT |
| r14963 | r14964 | |
| 1441 | 1388 | } |
| 1442 | 1389 | break; |
| 1443 | 1390 | } |
| 1444 | | verboselog( machine, 9, "(IIC) %08X -> %08X (PC %08X)\n", 0x15400000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1391 | verboselog( machine(), 9, "(IIC) %08X -> %08X (PC %08X)\n", 0x15400000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1445 | 1392 | return data; |
| 1446 | 1393 | } |
| 1447 | 1394 | |
| 1448 | | static WRITE32_HANDLER( s3c240x_iic_w ) |
| 1395 | WRITE32_MEMBER(gp32_state::s3c240x_iic_w) |
| 1449 | 1396 | { |
| 1450 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1451 | | running_machine &machine = space->machine(); |
| 1452 | | verboselog( machine, 9, "(IIC) %08X <- %08X (PC %08X)\n", 0x15400000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1453 | | COMBINE_DATA(&state->m_s3c240x_iic_regs[offset]); |
| 1397 | verboselog( machine(), 9, "(IIC) %08X <- %08X (PC %08X)\n", 0x15400000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1398 | COMBINE_DATA(&m_s3c240x_iic_regs[offset]); |
| 1454 | 1399 | switch (offset) |
| 1455 | 1400 | { |
| 1456 | 1401 | // ADDR_IICCON |
| r14963 | r14964 | |
| 1470 | 1415 | if (interrupt_pending_flag == 0) |
| 1471 | 1416 | { |
| 1472 | 1417 | int start_stop_condition; |
| 1473 | | start_stop_condition = BIT( state->m_s3c240x_iic_regs[1], 5); |
| 1418 | start_stop_condition = BIT( m_s3c240x_iic_regs[1], 5); |
| 1474 | 1419 | if (start_stop_condition != 0) |
| 1475 | 1420 | { |
| 1476 | | iic_resume( machine); |
| 1421 | iic_resume( machine()); |
| 1477 | 1422 | } |
| 1478 | 1423 | } |
| 1479 | 1424 | } |
| r14963 | r14964 | |
| 1485 | 1430 | start_stop_condition = BIT( data, 5); |
| 1486 | 1431 | if (start_stop_condition != 0) |
| 1487 | 1432 | { |
| 1488 | | iic_start( machine); |
| 1433 | iic_start( machine()); |
| 1489 | 1434 | } |
| 1490 | 1435 | else |
| 1491 | 1436 | { |
| 1492 | | iic_stop( machine); |
| 1437 | iic_stop( machine()); |
| 1493 | 1438 | } |
| 1494 | 1439 | } |
| 1495 | 1440 | break; |
| r14963 | r14964 | |
| 1583 | 1528 | } |
| 1584 | 1529 | } |
| 1585 | 1530 | |
| 1586 | | static READ32_HANDLER( s3c240x_iis_r ) |
| 1531 | READ32_MEMBER(gp32_state::s3c240x_iis_r) |
| 1587 | 1532 | { |
| 1588 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1589 | | running_machine &machine = space->machine(); |
| 1590 | | UINT32 data = state->m_s3c240x_iis_regs[offset]; |
| 1533 | UINT32 data = m_s3c240x_iis_regs[offset]; |
| 1591 | 1534 | #if 0 |
| 1592 | 1535 | switch (offset) |
| 1593 | 1536 | { |
| r14963 | r14964 | |
| 1599 | 1542 | break; |
| 1600 | 1543 | } |
| 1601 | 1544 | #endif |
| 1602 | | verboselog( machine, 9, "(IIS) %08X -> %08X (PC %08X)\n", 0x15508000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1545 | verboselog( machine(), 9, "(IIS) %08X -> %08X (PC %08X)\n", 0x15508000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1603 | 1546 | return data; |
| 1604 | 1547 | } |
| 1605 | 1548 | |
| 1606 | | static WRITE32_HANDLER( s3c240x_iis_w ) |
| 1549 | WRITE32_MEMBER(gp32_state::s3c240x_iis_w) |
| 1607 | 1550 | { |
| 1608 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1609 | | running_machine &machine = space->machine(); |
| 1610 | | UINT32 old_value = state->m_s3c240x_iis_regs[offset]; |
| 1611 | | verboselog( machine, 9, "(IIS) %08X <- %08X (PC %08X)\n", 0x15508000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1612 | | COMBINE_DATA(&state->m_s3c240x_iis_regs[offset]); |
| 1551 | UINT32 old_value = m_s3c240x_iis_regs[offset]; |
| 1552 | verboselog( machine(), 9, "(IIS) %08X <- %08X (PC %08X)\n", 0x15508000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1553 | COMBINE_DATA(&m_s3c240x_iis_regs[offset]); |
| 1613 | 1554 | switch (offset) |
| 1614 | 1555 | { |
| 1615 | 1556 | // IISCON |
| 1616 | 1557 | case 0x00 / 4 : |
| 1617 | 1558 | { |
| 1618 | | if ((old_value & 1) != (data & 1)) s3c240x_iis_recalc( machine); |
| 1559 | if ((old_value & 1) != (data & 1)) s3c240x_iis_recalc( machine()); |
| 1619 | 1560 | } |
| 1620 | 1561 | break; |
| 1621 | 1562 | // IISFIF |
| r14963 | r14964 | |
| 1623 | 1564 | { |
| 1624 | 1565 | if (ACCESSING_BITS_16_31) |
| 1625 | 1566 | { |
| 1626 | | state->m_s3c240x_iis.fifo[state->m_s3c240x_iis.fifo_index++] = BITS( data, 31, 16); |
| 1567 | m_s3c240x_iis.fifo[m_s3c240x_iis.fifo_index++] = BITS( data, 31, 16); |
| 1627 | 1568 | } |
| 1628 | 1569 | if (ACCESSING_BITS_0_15) |
| 1629 | 1570 | { |
| 1630 | | state->m_s3c240x_iis.fifo[state->m_s3c240x_iis.fifo_index++] = BITS( data, 15, 0); |
| 1571 | m_s3c240x_iis.fifo[m_s3c240x_iis.fifo_index++] = BITS( data, 15, 0); |
| 1631 | 1572 | } |
| 1632 | | if (state->m_s3c240x_iis.fifo_index == 2) |
| 1573 | if (m_s3c240x_iis.fifo_index == 2) |
| 1633 | 1574 | { |
| 1634 | 1575 | device_t *dac[2]; |
| 1635 | | dac[0] = machine.device( "dac1"); |
| 1636 | | dac[1] = machine.device( "dac2"); |
| 1637 | | state->m_s3c240x_iis.fifo_index = 0; |
| 1638 | | dac_signed_data_16_w( dac[0], state->m_s3c240x_iis.fifo[0] + 0x8000); |
| 1639 | | dac_signed_data_16_w( dac[1], state->m_s3c240x_iis.fifo[1] + 0x8000); |
| 1576 | dac[0] = machine().device( "dac1"); |
| 1577 | dac[1] = machine().device( "dac2"); |
| 1578 | m_s3c240x_iis.fifo_index = 0; |
| 1579 | dac_signed_data_16_w( dac[0], m_s3c240x_iis.fifo[0] + 0x8000); |
| 1580 | dac_signed_data_16_w( dac[1], m_s3c240x_iis.fifo[1] + 0x8000); |
| 1640 | 1581 | } |
| 1641 | 1582 | } |
| 1642 | 1583 | break; |
| r14963 | r14964 | |
| 1652 | 1593 | // RTC |
| 1653 | 1594 | |
| 1654 | 1595 | |
| 1655 | | static READ32_HANDLER( s3c240x_rtc_r ) |
| 1596 | READ32_MEMBER(gp32_state::s3c240x_rtc_r) |
| 1656 | 1597 | { |
| 1657 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1658 | | running_machine &machine = space->machine(); |
| 1659 | | UINT32 data = state->m_s3c240x_rtc_regs[offset]; |
| 1660 | | verboselog( machine, 9, "(RTC) %08X -> %08X (PC %08X)\n", 0x15700040 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1598 | UINT32 data = m_s3c240x_rtc_regs[offset]; |
| 1599 | verboselog( machine(), 9, "(RTC) %08X -> %08X (PC %08X)\n", 0x15700040 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1661 | 1600 | return data; |
| 1662 | 1601 | } |
| 1663 | 1602 | |
| 1664 | | static WRITE32_HANDLER( s3c240x_rtc_w ) |
| 1603 | WRITE32_MEMBER(gp32_state::s3c240x_rtc_w) |
| 1665 | 1604 | { |
| 1666 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1667 | | running_machine &machine = space->machine(); |
| 1668 | | verboselog( machine, 9, "(RTC) %08X <- %08X (PC %08X)\n", 0x15700040 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1669 | | COMBINE_DATA(&state->m_s3c240x_rtc_regs[offset]); |
| 1605 | verboselog( machine(), 9, "(RTC) %08X <- %08X (PC %08X)\n", 0x15700040 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1606 | COMBINE_DATA(&m_s3c240x_rtc_regs[offset]); |
| 1670 | 1607 | } |
| 1671 | 1608 | |
| 1672 | 1609 | // A/D CONVERTER |
| 1673 | 1610 | |
| 1674 | 1611 | |
| 1675 | | static READ32_HANDLER( s3c240x_adc_r ) |
| 1612 | READ32_MEMBER(gp32_state::s3c240x_adc_r) |
| 1676 | 1613 | { |
| 1677 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1678 | | running_machine &machine = space->machine(); |
| 1679 | | UINT32 data = state->m_s3c240x_adc_regs[offset]; |
| 1680 | | verboselog( machine, 9, "(ADC) %08X -> %08X (PC %08X)\n", 0x15800000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1614 | UINT32 data = m_s3c240x_adc_regs[offset]; |
| 1615 | verboselog( machine(), 9, "(ADC) %08X -> %08X (PC %08X)\n", 0x15800000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1681 | 1616 | return data; |
| 1682 | 1617 | } |
| 1683 | 1618 | |
| 1684 | | static WRITE32_HANDLER( s3c240x_adc_w ) |
| 1619 | WRITE32_MEMBER(gp32_state::s3c240x_adc_w) |
| 1685 | 1620 | { |
| 1686 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1687 | | running_machine &machine = space->machine(); |
| 1688 | | verboselog( machine, 9, "(ADC) %08X <- %08X (PC %08X)\n", 0x15800000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1689 | | COMBINE_DATA(&state->m_s3c240x_adc_regs[offset]); |
| 1621 | verboselog( machine(), 9, "(ADC) %08X <- %08X (PC %08X)\n", 0x15800000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1622 | COMBINE_DATA(&m_s3c240x_adc_regs[offset]); |
| 1690 | 1623 | } |
| 1691 | 1624 | |
| 1692 | 1625 | // SPI |
| 1693 | 1626 | |
| 1694 | 1627 | |
| 1695 | | static READ32_HANDLER( s3c240x_spi_r ) |
| 1628 | READ32_MEMBER(gp32_state::s3c240x_spi_r) |
| 1696 | 1629 | { |
| 1697 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1698 | | running_machine &machine = space->machine(); |
| 1699 | | UINT32 data = state->m_s3c240x_spi_regs[offset]; |
| 1700 | | verboselog( machine, 9, "(SPI) %08X -> %08X (PC %08X)\n", 0x15900000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1630 | UINT32 data = m_s3c240x_spi_regs[offset]; |
| 1631 | verboselog( machine(), 9, "(SPI) %08X -> %08X (PC %08X)\n", 0x15900000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1701 | 1632 | return data; |
| 1702 | 1633 | } |
| 1703 | 1634 | |
| 1704 | | static WRITE32_HANDLER( s3c240x_spi_w ) |
| 1635 | WRITE32_MEMBER(gp32_state::s3c240x_spi_w) |
| 1705 | 1636 | { |
| 1706 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1707 | | running_machine &machine = space->machine(); |
| 1708 | | verboselog( machine, 9, "(SPI) %08X <- %08X (PC %08X)\n", 0x15900000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1709 | | COMBINE_DATA(&state->m_s3c240x_spi_regs[offset]); |
| 1637 | verboselog( machine(), 9, "(SPI) %08X <- %08X (PC %08X)\n", 0x15900000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1638 | COMBINE_DATA(&m_s3c240x_spi_regs[offset]); |
| 1710 | 1639 | } |
| 1711 | 1640 | |
| 1712 | 1641 | // MMC INTERFACE |
| 1713 | 1642 | |
| 1714 | 1643 | |
| 1715 | | static READ32_HANDLER( s3c240x_mmc_r ) |
| 1644 | READ32_MEMBER(gp32_state::s3c240x_mmc_r) |
| 1716 | 1645 | { |
| 1717 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1718 | | running_machine &machine = space->machine(); |
| 1719 | | UINT32 data = state->m_s3c240x_mmc_regs[offset]; |
| 1720 | | verboselog( machine, 9, "(MMC) %08X -> %08X (PC %08X)\n", 0x15A00000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1646 | UINT32 data = m_s3c240x_mmc_regs[offset]; |
| 1647 | verboselog( machine(), 9, "(MMC) %08X -> %08X (PC %08X)\n", 0x15A00000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1721 | 1648 | return data; |
| 1722 | 1649 | } |
| 1723 | 1650 | |
| 1724 | | static WRITE32_HANDLER( s3c240x_mmc_w ) |
| 1651 | WRITE32_MEMBER(gp32_state::s3c240x_mmc_w) |
| 1725 | 1652 | { |
| 1726 | | gp32_state *state = space->machine().driver_data<gp32_state>(); |
| 1727 | | running_machine &machine = space->machine(); |
| 1728 | | verboselog( machine, 9, "(MMC) %08X <- %08X (PC %08X)\n", 0x15A00000 + (offset << 2), data, cpu_get_pc( &space->device())); |
| 1729 | | COMBINE_DATA(&state->m_s3c240x_mmc_regs[offset]); |
| 1653 | verboselog( machine(), 9, "(MMC) %08X <- %08X (PC %08X)\n", 0x15A00000 + (offset << 2), data, cpu_get_pc( &space.device())); |
| 1654 | COMBINE_DATA(&m_s3c240x_mmc_regs[offset]); |
| 1730 | 1655 | } |
| 1731 | 1656 | |
| 1732 | 1657 | // ... |
| r14963 | r14964 | |
| 1764 | 1689 | static ADDRESS_MAP_START( gp32_map, AS_PROGRAM, 32, gp32_state ) |
| 1765 | 1690 | AM_RANGE(0x00000000, 0x0007ffff) AM_ROM |
| 1766 | 1691 | AM_RANGE(0x0c000000, 0x0c7fffff) AM_RAM AM_SHARE("s3c240x_ram") |
| 1767 | | AM_RANGE(0x14000000, 0x1400003b) AM_READWRITE_LEGACY(s3c240x_memcon_r, s3c240x_memcon_w) |
| 1768 | | AM_RANGE(0x14200000, 0x1420005b) AM_READWRITE_LEGACY(s3c240x_usb_host_r, s3c240x_usb_host_w) |
| 1769 | | AM_RANGE(0x14400000, 0x14400017) AM_READWRITE_LEGACY(s3c240x_irq_r, s3c240x_irq_w) |
| 1770 | | AM_RANGE(0x14600000, 0x1460007b) AM_READWRITE_LEGACY(s3c240x_dma_r, s3c240x_dma_w) |
| 1771 | | AM_RANGE(0x14800000, 0x14800017) AM_READWRITE_LEGACY(s3c240x_clkpow_r, s3c240x_clkpow_w) |
| 1772 | | AM_RANGE(0x14a00000, 0x14a003ff) AM_READWRITE_LEGACY(s3c240x_lcd_r, s3c240x_lcd_w) |
| 1773 | | AM_RANGE(0x14a00400, 0x14a007ff) AM_READWRITE_LEGACY(s3c240x_lcd_palette_r, s3c240x_lcd_palette_w) |
| 1774 | | AM_RANGE(0x15000000, 0x1500002b) AM_READWRITE_LEGACY(s3c240x_uart_0_r, s3c240x_uart_0_w) |
| 1775 | | AM_RANGE(0x15004000, 0x1500402b) AM_READWRITE_LEGACY(s3c240x_uart_1_r, s3c240x_uart_1_w) |
| 1776 | | AM_RANGE(0x15100000, 0x15100043) AM_READWRITE_LEGACY(s3c240x_pwm_r, s3c240x_pwm_w) |
| 1777 | | AM_RANGE(0x15200140, 0x152001fb) AM_READWRITE_LEGACY(s3c240x_usb_device_r, s3c240x_usb_device_w) |
| 1778 | | AM_RANGE(0x15300000, 0x1530000b) AM_READWRITE_LEGACY(s3c240x_watchdog_r, s3c240x_watchdog_w) |
| 1779 | | AM_RANGE(0x15400000, 0x1540000f) AM_READWRITE_LEGACY(s3c240x_iic_r, s3c240x_iic_w) |
| 1780 | | AM_RANGE(0x15508000, 0x15508013) AM_READWRITE_LEGACY(s3c240x_iis_r, s3c240x_iis_w) |
| 1781 | | AM_RANGE(0x15600000, 0x1560005b) AM_READWRITE_LEGACY(s3c240x_gpio_r, s3c240x_gpio_w) |
| 1782 | | AM_RANGE(0x15700040, 0x1570008b) AM_READWRITE_LEGACY(s3c240x_rtc_r, s3c240x_rtc_w) |
| 1783 | | AM_RANGE(0x15800000, 0x15800007) AM_READWRITE_LEGACY(s3c240x_adc_r, s3c240x_adc_w) |
| 1784 | | AM_RANGE(0x15900000, 0x15900017) AM_READWRITE_LEGACY(s3c240x_spi_r, s3c240x_spi_w) |
| 1785 | | AM_RANGE(0x15a00000, 0x15a0003f) AM_READWRITE_LEGACY(s3c240x_mmc_r, s3c240x_mmc_w) |
| 1692 | AM_RANGE(0x14000000, 0x1400003b) AM_READWRITE(s3c240x_memcon_r, s3c240x_memcon_w) |
| 1693 | AM_RANGE(0x14200000, 0x1420005b) AM_READWRITE(s3c240x_usb_host_r, s3c240x_usb_host_w) |
| 1694 | AM_RANGE(0x14400000, 0x14400017) AM_READWRITE(s3c240x_irq_r, s3c240x_irq_w) |
| 1695 | AM_RANGE(0x14600000, 0x1460007b) AM_READWRITE(s3c240x_dma_r, s3c240x_dma_w) |
| 1696 | AM_RANGE(0x14800000, 0x14800017) AM_READWRITE(s3c240x_clkpow_r, s3c240x_clkpow_w) |
| 1697 | AM_RANGE(0x14a00000, 0x14a003ff) AM_READWRITE(s3c240x_lcd_r, s3c240x_lcd_w) |
| 1698 | AM_RANGE(0x14a00400, 0x14a007ff) AM_READWRITE(s3c240x_lcd_palette_r, s3c240x_lcd_palette_w) |
| 1699 | AM_RANGE(0x15000000, 0x1500002b) AM_READWRITE(s3c240x_uart_0_r, s3c240x_uart_0_w) |
| 1700 | AM_RANGE(0x15004000, 0x1500402b) AM_READWRITE(s3c240x_uart_1_r, s3c240x_uart_1_w) |
| 1701 | AM_RANGE(0x15100000, 0x15100043) AM_READWRITE(s3c240x_pwm_r, s3c240x_pwm_w) |
| 1702 | AM_RANGE(0x15200140, 0x152001fb) AM_READWRITE(s3c240x_usb_device_r, s3c240x_usb_device_w) |
| 1703 | AM_RANGE(0x15300000, 0x1530000b) AM_READWRITE(s3c240x_watchdog_r, s3c240x_watchdog_w) |
| 1704 | AM_RANGE(0x15400000, 0x1540000f) AM_READWRITE(s3c240x_iic_r, s3c240x_iic_w) |
| 1705 | AM_RANGE(0x15508000, 0x15508013) AM_READWRITE(s3c240x_iis_r, s3c240x_iis_w) |
| 1706 | AM_RANGE(0x15600000, 0x1560005b) AM_READWRITE(s3c240x_gpio_r, s3c240x_gpio_w) |
| 1707 | AM_RANGE(0x15700040, 0x1570008b) AM_READWRITE(s3c240x_rtc_r, s3c240x_rtc_w) |
| 1708 | AM_RANGE(0x15800000, 0x15800007) AM_READWRITE(s3c240x_adc_r, s3c240x_adc_w) |
| 1709 | AM_RANGE(0x15900000, 0x15900017) AM_READWRITE(s3c240x_spi_r, s3c240x_spi_w) |
| 1710 | AM_RANGE(0x15a00000, 0x15a0003f) AM_READWRITE(s3c240x_mmc_r, s3c240x_mmc_w) |
| 1786 | 1711 | ADDRESS_MAP_END |
| 1787 | 1712 | |
| 1788 | 1713 | static INPUT_PORTS_START( gp32 ) |
src/mess/drivers/gba.c
| r14963 | r14964 | |
| 522 | 522 | state->m_irq_timer->adjust(attotime::never); |
| 523 | 523 | } |
| 524 | 524 | |
| 525 | | static READ32_HANDLER( gba_io_r ) |
| 525 | READ32_MEMBER(gba_state::gba_io_r) |
| 526 | 526 | { |
| 527 | 527 | UINT32 retval = 0; |
| 528 | | running_machine &machine = space->machine(); |
| 529 | | device_t *gb_device = space->machine().device("custom"); |
| 530 | | gba_state *state = machine.driver_data<gba_state>(); |
| 528 | device_t *gb_device = machine().device("custom"); |
| 531 | 529 | |
| 532 | 530 | switch( offset ) |
| 533 | 531 | { |
| 534 | 532 | case 0x0000/4: |
| 535 | 533 | if( (mem_mask) & 0x0000ffff ) |
| 536 | 534 | { |
| 537 | | verboselog(machine, 2, "GBA IO Register Read: DISPCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_DISPCNT ); |
| 538 | | retval |= state->m_DISPCNT; |
| 535 | verboselog(machine(), 2, "GBA IO Register Read: DISPCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_DISPCNT ); |
| 536 | retval |= m_DISPCNT; |
| 539 | 537 | } |
| 540 | 538 | if( (mem_mask) & 0xffff0000 ) |
| 541 | 539 | { |
| 542 | | verboselog(machine, 2, "GBA IO Register Read: Green Swap (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_GRNSWAP ); |
| 543 | | retval |= state->m_GRNSWAP << 16; |
| 540 | verboselog(machine(), 2, "GBA IO Register Read: Green Swap (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_GRNSWAP ); |
| 541 | retval |= m_GRNSWAP << 16; |
| 544 | 542 | } |
| 545 | 543 | break; |
| 546 | 544 | case 0x0004/4: |
| 547 | | retval = (state->m_DISPSTAT & 0xffff) | (machine.primary_screen->vpos()<<16); |
| 545 | retval = (m_DISPSTAT & 0xffff) | (machine().primary_screen->vpos()<<16); |
| 548 | 546 | break; |
| 549 | 547 | case 0x0008/4: |
| 550 | 548 | if( (mem_mask) & 0x0000ffff ) |
| 551 | 549 | { |
| 552 | | verboselog(machine, 2, "GBA IO Register Read: BG0CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_BG0CNT ); |
| 553 | | retval |= state->m_BG0CNT; |
| 550 | verboselog(machine(), 2, "GBA IO Register Read: BG0CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BG0CNT ); |
| 551 | retval |= m_BG0CNT; |
| 554 | 552 | } |
| 555 | 553 | if( (mem_mask) & 0xffff0000 ) |
| 556 | 554 | { |
| 557 | | verboselog(machine, 2, "GBA IO Register Read: BG1CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_BG1CNT ); |
| 558 | | retval |= state->m_BG1CNT << 16; |
| 555 | verboselog(machine(), 2, "GBA IO Register Read: BG1CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_BG1CNT ); |
| 556 | retval |= m_BG1CNT << 16; |
| 559 | 557 | } |
| 560 | 558 | break; |
| 561 | 559 | case 0x000c/4: |
| 562 | 560 | if( (mem_mask) & 0x0000ffff ) |
| 563 | 561 | { |
| 564 | | verboselog(machine, 2, "GBA IO Register Read: BG2CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_BG2CNT ); |
| 565 | | retval |= state->m_BG2CNT; |
| 562 | verboselog(machine(), 2, "GBA IO Register Read: BG2CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BG2CNT ); |
| 563 | retval |= m_BG2CNT; |
| 566 | 564 | } |
| 567 | 565 | if( (mem_mask) & 0xffff0000 ) |
| 568 | 566 | { |
| 569 | | verboselog(machine, 2, "GBA IO Register Read: BG3CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_BG3CNT ); |
| 570 | | retval |= state->m_BG3CNT << 16; |
| 567 | verboselog(machine(), 2, "GBA IO Register Read: BG3CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_BG3CNT ); |
| 568 | retval |= m_BG3CNT << 16; |
| 571 | 569 | } |
| 572 | 570 | break; |
| 573 | 571 | case 0x0010/4: |
| 574 | 572 | if( (mem_mask) & 0x0000ffff ) |
| 575 | 573 | { |
| 576 | | verboselog(machine, 2, "GBA IO Register Read: BG0HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 574 | verboselog(machine(), 2, "GBA IO Register Read: BG0HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 577 | 575 | } |
| 578 | 576 | if( (mem_mask) & 0xffff0000 ) |
| 579 | 577 | { |
| 580 | | verboselog(machine, 2, "GBA IO Register Read: BG0VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 578 | verboselog(machine(), 2, "GBA IO Register Read: BG0VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 581 | 579 | } |
| 582 | 580 | break; |
| 583 | 581 | case 0x0014/4: |
| 584 | 582 | if( (mem_mask) & 0x0000ffff ) |
| 585 | 583 | { |
| 586 | | verboselog(machine, 2, "GBA IO Register Read: BG1HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 584 | verboselog(machine(), 2, "GBA IO Register Read: BG1HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 587 | 585 | } |
| 588 | 586 | if( (mem_mask) & 0xffff0000 ) |
| 589 | 587 | { |
| 590 | | verboselog(machine, 2, "GBA IO Register Read: BG1VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 588 | verboselog(machine(), 2, "GBA IO Register Read: BG1VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 591 | 589 | } |
| 592 | 590 | break; |
| 593 | 591 | case 0x0018/4: |
| 594 | 592 | if( (mem_mask) & 0x0000ffff ) |
| 595 | 593 | { |
| 596 | | verboselog(machine, 2, "GBA IO Register Read: BG2HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 594 | verboselog(machine(), 2, "GBA IO Register Read: BG2HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 597 | 595 | } |
| 598 | 596 | if( (mem_mask) & 0xffff0000 ) |
| 599 | 597 | { |
| 600 | | verboselog(machine, 2, "GBA IO Register Read: BG2VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 598 | verboselog(machine(), 2, "GBA IO Register Read: BG2VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 601 | 599 | } |
| 602 | 600 | break; |
| 603 | 601 | case 0x001c/4: |
| 604 | 602 | if( (mem_mask) & 0x0000ffff ) |
| 605 | 603 | { |
| 606 | | verboselog(machine, 2, "GBA IO Register Read: BG3HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 604 | verboselog(machine(), 2, "GBA IO Register Read: BG3HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 607 | 605 | } |
| 608 | 606 | if( (mem_mask) & 0xffff0000 ) |
| 609 | 607 | { |
| 610 | | verboselog(machine, 2, "GBA IO Register Read: BG3VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 608 | verboselog(machine(), 2, "GBA IO Register Read: BG3VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 611 | 609 | } |
| 612 | 610 | break; |
| 613 | 611 | case 0x0020/4: |
| 614 | 612 | if( (mem_mask) & 0x0000ffff ) |
| 615 | 613 | { |
| 616 | | verboselog(machine, 2, "GBA IO Register Read: BG2PA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 614 | verboselog(machine(), 2, "GBA IO Register Read: BG2PA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 617 | 615 | } |
| 618 | 616 | if( (mem_mask) & 0xffff0000 ) |
| 619 | 617 | { |
| 620 | | verboselog(machine, 2, "GBA IO Register Read: BG2PB (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 618 | verboselog(machine(), 2, "GBA IO Register Read: BG2PB (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 621 | 619 | } |
| 622 | 620 | break; |
| 623 | 621 | case 0x0024/4: |
| 624 | 622 | if( (mem_mask) & 0x0000ffff ) |
| 625 | 623 | { |
| 626 | | verboselog(machine, 2, "GBA IO Register Read: BG2PC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 624 | verboselog(machine(), 2, "GBA IO Register Read: BG2PC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 627 | 625 | } |
| 628 | 626 | if( (mem_mask) & 0xffff0000 ) |
| 629 | 627 | { |
| 630 | | verboselog(machine, 2, "GBA IO Register Read: BG2PD (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 628 | verboselog(machine(), 2, "GBA IO Register Read: BG2PD (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 631 | 629 | } |
| 632 | 630 | break; |
| 633 | 631 | case 0x0028/4: |
| 634 | 632 | if( (mem_mask) & 0x0000ffff ) |
| 635 | 633 | { |
| 636 | | verboselog(machine, 2, "GBA IO Register Read: BG2X_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 634 | verboselog(machine(), 2, "GBA IO Register Read: BG2X_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 637 | 635 | } |
| 638 | 636 | if( (mem_mask) & 0xffff0000 ) |
| 639 | 637 | { |
| 640 | | verboselog(machine, 2, "GBA IO Register Read: BG2X_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 638 | verboselog(machine(), 2, "GBA IO Register Read: BG2X_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 641 | 639 | } |
| 642 | 640 | break; |
| 643 | 641 | case 0x002c/4: |
| 644 | 642 | if( (mem_mask) & 0x0000ffff ) |
| 645 | 643 | { |
| 646 | | verboselog(machine, 2, "GBA IO Register Read: BG2Y_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 644 | verboselog(machine(), 2, "GBA IO Register Read: BG2Y_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 647 | 645 | } |
| 648 | 646 | if( (mem_mask) & 0xffff0000 ) |
| 649 | 647 | { |
| 650 | | verboselog(machine, 2, "GBA IO Register Read: BG2Y_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 648 | verboselog(machine(), 2, "GBA IO Register Read: BG2Y_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 651 | 649 | } |
| 652 | 650 | break; |
| 653 | 651 | case 0x0030/4: |
| 654 | 652 | if( (mem_mask) & 0x0000ffff ) |
| 655 | 653 | { |
| 656 | | verboselog(machine, 2, "GBA IO Register Read: BG3PA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 654 | verboselog(machine(), 2, "GBA IO Register Read: BG3PA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 657 | 655 | } |
| 658 | 656 | if( (mem_mask) & 0xffff0000 ) |
| 659 | 657 | { |
| 660 | | verboselog(machine, 2, "GBA IO Register Read: BG3PB (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 658 | verboselog(machine(), 2, "GBA IO Register Read: BG3PB (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 661 | 659 | } |
| 662 | 660 | break; |
| 663 | 661 | case 0x0034/4: |
| 664 | 662 | if( (mem_mask) & 0x0000ffff ) |
| 665 | 663 | { |
| 666 | | verboselog(machine, 2, "GBA IO Register Read: BG3PC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 664 | verboselog(machine(), 2, "GBA IO Register Read: BG3PC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 667 | 665 | } |
| 668 | 666 | if( (mem_mask) & 0xffff0000 ) |
| 669 | 667 | { |
| 670 | | verboselog(machine, 2, "GBA IO Register Read: BG3PD (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 668 | verboselog(machine(), 2, "GBA IO Register Read: BG3PD (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 671 | 669 | } |
| 672 | 670 | break; |
| 673 | 671 | case 0x0038/4: |
| 674 | 672 | if( (mem_mask) & 0x0000ffff ) |
| 675 | 673 | { |
| 676 | | verboselog(machine, 2, "GBA IO Register Read: BG3X_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 674 | verboselog(machine(), 2, "GBA IO Register Read: BG3X_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 677 | 675 | } |
| 678 | 676 | if( (mem_mask) & 0xffff0000 ) |
| 679 | 677 | { |
| 680 | | verboselog(machine, 2, "GBA IO Register Read: BG3X_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 678 | verboselog(machine(), 2, "GBA IO Register Read: BG3X_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 681 | 679 | } |
| 682 | 680 | break; |
| 683 | 681 | case 0x003c/4: |
| 684 | 682 | if( (mem_mask) & 0x0000ffff ) |
| 685 | 683 | { |
| 686 | | verboselog(machine, 2, "GBA IO Register Read: BG3Y_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 684 | verboselog(machine(), 2, "GBA IO Register Read: BG3Y_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 687 | 685 | } |
| 688 | 686 | if( (mem_mask) & 0xffff0000 ) |
| 689 | 687 | { |
| 690 | | verboselog(machine, 2, "GBA IO Register Read: BG3Y_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 688 | verboselog(machine(), 2, "GBA IO Register Read: BG3Y_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 691 | 689 | } |
| 692 | 690 | break; |
| 693 | 691 | case 0x0040/4: |
| 694 | 692 | if( (mem_mask) & 0x0000ffff ) |
| 695 | 693 | { |
| 696 | | verboselog(machine, 2, "GBA IO Register Read: WIN0H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 694 | verboselog(machine(), 2, "GBA IO Register Read: WIN0H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 697 | 695 | } |
| 698 | 696 | if( (mem_mask) & 0xffff0000 ) |
| 699 | 697 | { |
| 700 | | verboselog(machine, 2, "GBA IO Register Read: WIN1H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 698 | verboselog(machine(), 2, "GBA IO Register Read: WIN1H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 701 | 699 | } |
| 702 | 700 | break; |
| 703 | 701 | case 0x0044/4: |
| 704 | 702 | if( (mem_mask) & 0x0000ffff ) |
| 705 | 703 | { |
| 706 | | verboselog(machine, 2, "GBA IO Register Read: WIN0V (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 704 | verboselog(machine(), 2, "GBA IO Register Read: WIN0V (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 707 | 705 | } |
| 708 | 706 | if( (mem_mask) & 0xffff0000 ) |
| 709 | 707 | { |
| 710 | | verboselog(machine, 2, "GBA IO Register Read: WIN1V (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 708 | verboselog(machine(), 2, "GBA IO Register Read: WIN1V (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 711 | 709 | } |
| 712 | 710 | break; |
| 713 | 711 | case 0x0048/4: |
| 714 | 712 | if( (mem_mask) & 0x0000ffff ) |
| 715 | 713 | { |
| 716 | | verboselog(machine, 2, "GBA IO Register Read: WININ (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_WININ ); |
| 717 | | retval |= state->m_WININ; |
| 714 | verboselog(machine(), 2, "GBA IO Register Read: WININ (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_WININ ); |
| 715 | retval |= m_WININ; |
| 718 | 716 | } |
| 719 | 717 | if( (mem_mask) & 0xffff0000 ) |
| 720 | 718 | { |
| 721 | | verboselog(machine, 2, "GBA IO Register Read: WINOUT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_WINOUT ); |
| 722 | | retval |= state->m_WINOUT << 16; |
| 719 | verboselog(machine(), 2, "GBA IO Register Read: WINOUT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_WINOUT ); |
| 720 | retval |= m_WINOUT << 16; |
| 723 | 721 | } |
| 724 | 722 | break; |
| 725 | 723 | case 0x004c/4: |
| 726 | 724 | if( (mem_mask) & 0x0000ffff ) |
| 727 | 725 | { |
| 728 | | verboselog(machine, 2, "GBA IO Register Read: MOSAIC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 726 | verboselog(machine(), 2, "GBA IO Register Read: MOSAIC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 729 | 727 | } |
| 730 | 728 | if( (mem_mask) & 0xffff0000 ) |
| 731 | 729 | { |
| 732 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 730 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 733 | 731 | } |
| 734 | 732 | break; |
| 735 | 733 | case 0x0050/4: |
| 736 | 734 | if( (mem_mask) & 0x0000ffff ) |
| 737 | 735 | { |
| 738 | | verboselog(machine, 2, "GBA IO Register Read: BLDCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_BLDCNT ); |
| 739 | | retval |= state->m_BLDCNT; |
| 736 | verboselog(machine(), 2, "GBA IO Register Read: BLDCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BLDCNT ); |
| 737 | retval |= m_BLDCNT; |
| 740 | 738 | } |
| 741 | 739 | if( (mem_mask) & 0xffff0000 ) |
| 742 | 740 | { |
| 743 | | verboselog(machine, 2, "GBA IO Register Read: BLDALPHA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_BLDALPHA ); |
| 744 | | retval |= state->m_BLDALPHA << 16; |
| 741 | verboselog(machine(), 2, "GBA IO Register Read: BLDALPHA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_BLDALPHA ); |
| 742 | retval |= m_BLDALPHA << 16; |
| 745 | 743 | } |
| 746 | 744 | break; |
| 747 | 745 | case 0x0054/4: |
| 748 | 746 | if( (mem_mask) & 0x0000ffff ) |
| 749 | 747 | { |
| 750 | | verboselog(machine, 2, "GBA IO Register Read: BLDY (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 748 | verboselog(machine(), 2, "GBA IO Register Read: BLDY (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 751 | 749 | } |
| 752 | 750 | if( (mem_mask) & 0xffff0000 ) |
| 753 | 751 | { |
| 754 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 752 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 755 | 753 | } |
| 756 | 754 | break; |
| 757 | 755 | case 0x0058/4: |
| 758 | 756 | if( (mem_mask) & 0x0000ffff ) |
| 759 | 757 | { |
| 760 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 758 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 761 | 759 | } |
| 762 | 760 | if( (mem_mask) & 0xffff0000 ) |
| 763 | 761 | { |
| 764 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 762 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 765 | 763 | } |
| 766 | 764 | break; |
| 767 | 765 | case 0x005c/4: |
| 768 | 766 | if( (mem_mask) & 0x0000ffff ) |
| 769 | 767 | { |
| 770 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 768 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); |
| 771 | 769 | } |
| 772 | 770 | if( (mem_mask) & 0xffff0000 ) |
| 773 | 771 | { |
| 774 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 772 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 775 | 773 | } |
| 776 | 774 | break; |
| 777 | 775 | case 0x0060/4: |
| r14963 | r14964 | |
| 802 | 800 | retval = gb_sound_r(gb_device, 0x14) | gb_sound_r(gb_device, 0x15)<<8; |
| 803 | 801 | if( (mem_mask) & 0xffff0000 ) |
| 804 | 802 | { |
| 805 | | verboselog(machine, 2, "GBA IO Register Read: SOUNDCNT_H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_SOUNDCNT_H ); |
| 806 | | retval |= state->m_SOUNDCNT_H << 16; |
| 803 | verboselog(machine(), 2, "GBA IO Register Read: SOUNDCNT_H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SOUNDCNT_H ); |
| 804 | retval |= m_SOUNDCNT_H << 16; |
| 807 | 805 | } |
| 808 | 806 | break; |
| 809 | 807 | case 0x0084/4: |
| r14963 | r14964 | |
| 812 | 810 | case 0x0088/4: |
| 813 | 811 | if( (mem_mask) & 0x0000ffff ) |
| 814 | 812 | { |
| 815 | | verboselog(machine, 2, "GBA IO Register Read: SOUNDBIAS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_SOUNDBIAS ); |
| 816 | | retval |= state->m_SOUNDBIAS; |
| 813 | verboselog(machine(), 2, "GBA IO Register Read: SOUNDBIAS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SOUNDBIAS ); |
| 814 | retval |= m_SOUNDBIAS; |
| 817 | 815 | } |
| 818 | 816 | if( (mem_mask) & 0xffff0000 ) |
| 819 | 817 | { |
| 820 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 818 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 821 | 819 | } |
| 822 | 820 | break; |
| 823 | 821 | case 0x0090/4: |
| r14963 | r14964 | |
| 854 | 852 | #if 0 |
| 855 | 853 | if (((offset-0xb0/4) % 3) == 2) |
| 856 | 854 | { |
| 857 | | return state->m_dma_regs[offset-(0xb0/4)] & 0xff000000; |
| 855 | return m_dma_regs[offset-(0xb0/4)] & 0xff000000; |
| 858 | 856 | } |
| 859 | 857 | #endif |
| 860 | 858 | |
| 861 | | return state->m_dma_regs[offset-(0xb0/4)]; |
| 859 | return m_dma_regs[offset-(0xb0/4)]; |
| 862 | 860 | } |
| 863 | 861 | break; |
| 864 | 862 | case 0x0100/4: |
| r14963 | r14964 | |
| 870 | 868 | double time, ticks; |
| 871 | 869 | int timer = offset-(0x100/4); |
| 872 | 870 | |
| 873 | | // printf("Read timer reg %x (PC=%x)\n", timer, cpu_get_pc(&space->device())); |
| 871 | // printf("Read timer reg %x (PC=%x)\n", timer, cpu_get_pc(&space.device())); |
| 874 | 872 | |
| 875 | 873 | // update times for |
| 876 | | if (state->m_timer_regs[timer] & 0x800000) |
| 874 | if (m_timer_regs[timer] & 0x800000) |
| 877 | 875 | { |
| 878 | | if (state->m_timer_regs[timer] & 0x00040000) |
| 876 | if (m_timer_regs[timer] & 0x00040000) |
| 879 | 877 | { |
| 880 | | elapsed = state->m_timer_regs[timer] & 0xffff; |
| 878 | elapsed = m_timer_regs[timer] & 0xffff; |
| 881 | 879 | } |
| 882 | 880 | else |
| 883 | 881 | { |
| 884 | 882 | |
| 885 | | time = state->m_tmr_timer[timer]->elapsed().as_double(); |
| 883 | time = m_tmr_timer[timer]->elapsed().as_double(); |
| 886 | 884 | |
| 887 | | ticks = (double)(0x10000 - (state->m_timer_regs[timer] & 0xffff)); |
| 885 | ticks = (double)(0x10000 - (m_timer_regs[timer] & 0xffff)); |
| 888 | 886 | |
| 889 | | // printf("time %f ticks %f 1/hz %f\n", time, ticks, 1.0 / state->m_timer_hz[timer]); |
| 887 | // printf("time %f ticks %f 1/hz %f\n", time, ticks, 1.0 / m_timer_hz[timer]); |
| 890 | 888 | |
| 891 | 889 | time *= ticks; |
| 892 | | time /= (1.0 / state->m_timer_hz[timer]); |
| 890 | time /= (1.0 / m_timer_hz[timer]); |
| 893 | 891 | |
| 894 | 892 | elapsed = (UINT32)time; |
| 895 | 893 | |
| r14963 | r14964 | |
| 903 | 901 | elapsed = 0; |
| 904 | 902 | } |
| 905 | 903 | |
| 906 | | return (state->m_timer_regs[timer] & 0xffff0000) | (elapsed & 0xffff); |
| 904 | return (m_timer_regs[timer] & 0xffff0000) | (elapsed & 0xffff); |
| 907 | 905 | } |
| 908 | 906 | break; |
| 909 | 907 | case 0x0120/4: |
| 910 | 908 | if( (mem_mask) & 0x0000ffff ) |
| 911 | 909 | { |
| 912 | | verboselog(machine, 2, "GBA IO Register Read: SIOMULTI0 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_SIOMULTI0 ); |
| 913 | | retval |= state->m_SIOMULTI0; |
| 910 | verboselog(machine(), 2, "GBA IO Register Read: SIOMULTI0 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOMULTI0 ); |
| 911 | retval |= m_SIOMULTI0; |
| 914 | 912 | } |
| 915 | 913 | if( (mem_mask) & 0xffff0000 ) |
| 916 | 914 | { |
| 917 | | verboselog(machine, 2, "GBA IO Register Read: SIOMULTI1 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_SIOMULTI1 ); |
| 918 | | retval |= state->m_SIOMULTI1 << 16; |
| 915 | verboselog(machine(), 2, "GBA IO Register Read: SIOMULTI1 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SIOMULTI1 ); |
| 916 | retval |= m_SIOMULTI1 << 16; |
| 919 | 917 | } |
| 920 | 918 | break; |
| 921 | 919 | case 0x0124/4: |
| 922 | 920 | if( (mem_mask) & 0x0000ffff ) |
| 923 | 921 | { |
| 924 | | verboselog(machine, 2, "GBA IO Register Read: SIOMULTI2 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_SIOMULTI2 ); |
| 925 | | retval |= state->m_SIOMULTI2; |
| 922 | verboselog(machine(), 2, "GBA IO Register Read: SIOMULTI2 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOMULTI2 ); |
| 923 | retval |= m_SIOMULTI2; |
| 926 | 924 | } |
| 927 | 925 | if( (mem_mask) & 0xffff0000 ) |
| 928 | 926 | { |
| 929 | | verboselog(machine, 2, "GBA IO Register Read: SIOMULTI3 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_SIOMULTI3 ); |
| 930 | | retval |= state->m_SIOMULTI3 << 16; |
| 927 | verboselog(machine(), 2, "GBA IO Register Read: SIOMULTI3 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SIOMULTI3 ); |
| 928 | retval |= m_SIOMULTI3 << 16; |
| 931 | 929 | } |
| 932 | 930 | break; |
| 933 | 931 | case 0x0128/4: |
| 934 | 932 | if( (mem_mask) & 0x0000ffff ) |
| 935 | 933 | { |
| 936 | | verboselog(machine, 2, "GBA IO Register Read: SIOCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_SIOCNT ); |
| 937 | | retval |= state->m_SIOCNT; |
| 934 | verboselog(machine(), 2, "GBA IO Register Read: SIOCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOCNT ); |
| 935 | retval |= m_SIOCNT; |
| 938 | 936 | } |
| 939 | 937 | if( (mem_mask) & 0xffff0000 ) |
| 940 | 938 | { |
| 941 | | verboselog(machine, 2, "GBA IO Register Read: SIODATA8 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_SIODATA8 ); |
| 942 | | retval |= state->m_SIODATA8 << 16; |
| 939 | verboselog(machine(), 2, "GBA IO Register Read: SIODATA8 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SIODATA8 ); |
| 940 | retval |= m_SIODATA8 << 16; |
| 943 | 941 | } |
| 944 | 942 | break; |
| 945 | 943 | case 0x0130/4: |
| 946 | 944 | if( (mem_mask) & 0x0000ffff ) // KEYINPUT |
| 947 | 945 | { |
| 948 | | return input_port_read(machine, "IN0"); |
| 946 | return input_port_read(machine(), "IN0"); |
| 949 | 947 | } |
| 950 | 948 | if( (mem_mask) & 0xffff0000 ) |
| 951 | 949 | { |
| 952 | | verboselog(machine, 2, "GBA IO Register Read: KEYCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_KEYCNT ); |
| 953 | | retval |= state->m_KEYCNT << 16; |
| 950 | verboselog(machine(), 2, "GBA IO Register Read: KEYCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_KEYCNT ); |
| 951 | retval |= m_KEYCNT << 16; |
| 954 | 952 | } |
| 955 | 953 | break; |
| 956 | 954 | case 0x0134/4: |
| 957 | 955 | if( (mem_mask) & 0x0000ffff ) |
| 958 | 956 | { |
| 959 | | verboselog(machine, 2, "GBA IO Register Read: RCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_RCNT ); |
| 960 | | retval |= state->m_RCNT; |
| 957 | verboselog(machine(), 2, "GBA IO Register Read: RCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_RCNT ); |
| 958 | retval |= m_RCNT; |
| 961 | 959 | } |
| 962 | 960 | if( (mem_mask) & 0xffff0000 ) |
| 963 | 961 | { |
| 964 | | verboselog(machine, 2, "GBA IO Register Read: IR (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 962 | verboselog(machine(), 2, "GBA IO Register Read: IR (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 965 | 963 | } |
| 966 | 964 | break; |
| 967 | 965 | case 0x0140/4: |
| 968 | 966 | if( (mem_mask) & 0x0000ffff ) |
| 969 | 967 | { |
| 970 | | verboselog(machine, 2, "GBA IO Register Read: JOYCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_JOYCNT ); |
| 971 | | retval |= state->m_JOYCNT; |
| 968 | verboselog(machine(), 2, "GBA IO Register Read: JOYCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOYCNT ); |
| 969 | retval |= m_JOYCNT; |
| 972 | 970 | } |
| 973 | 971 | if( (mem_mask) & 0xffff0000 ) |
| 974 | 972 | { |
| 975 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 973 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 976 | 974 | } |
| 977 | 975 | break; |
| 978 | 976 | case 0x0150/4: |
| 979 | 977 | if( (mem_mask) & 0x0000ffff ) |
| 980 | 978 | { |
| 981 | | verboselog(machine, 2, "GBA IO Register Read: JOY_RECV_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_JOY_RECV & 0x0000ffff ); |
| 982 | | retval |= state->m_JOY_RECV & 0x0000ffff; |
| 979 | verboselog(machine(), 2, "GBA IO Register Read: JOY_RECV_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOY_RECV & 0x0000ffff ); |
| 980 | retval |= m_JOY_RECV & 0x0000ffff; |
| 983 | 981 | } |
| 984 | 982 | if( (mem_mask) & 0xffff0000 ) |
| 985 | 983 | { |
| 986 | | verboselog(machine, 2, "GBA IO Register Read: JOY_RECV_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, ( state->m_JOY_RECV & 0xffff0000 ) >> 16 ); |
| 987 | | retval |= state->m_JOY_RECV & 0xffff0000; |
| 984 | verboselog(machine(), 2, "GBA IO Register Read: JOY_RECV_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, ( m_JOY_RECV & 0xffff0000 ) >> 16 ); |
| 985 | retval |= m_JOY_RECV & 0xffff0000; |
| 988 | 986 | } |
| 989 | 987 | break; |
| 990 | 988 | case 0x0154/4: |
| 991 | 989 | if( (mem_mask) & 0x0000ffff ) |
| 992 | 990 | { |
| 993 | | verboselog(machine, 2, "GBA IO Register Read: JOY_TRANS_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_JOY_TRANS & 0x0000ffff ); |
| 994 | | retval |= state->m_JOY_TRANS & 0x0000ffff; |
| 991 | verboselog(machine(), 2, "GBA IO Register Read: JOY_TRANS_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOY_TRANS & 0x0000ffff ); |
| 992 | retval |= m_JOY_TRANS & 0x0000ffff; |
| 995 | 993 | } |
| 996 | 994 | if( (mem_mask) & 0xffff0000 ) |
| 997 | 995 | { |
| 998 | | verboselog(machine, 2, "GBA IO Register Read: JOY_TRANS_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, ( state->m_JOY_TRANS & 0xffff0000 ) >> 16 ); |
| 999 | | retval |= state->m_JOY_TRANS & 0xffff0000; |
| 996 | verboselog(machine(), 2, "GBA IO Register Read: JOY_TRANS_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, ( m_JOY_TRANS & 0xffff0000 ) >> 16 ); |
| 997 | retval |= m_JOY_TRANS & 0xffff0000; |
| 1000 | 998 | } |
| 1001 | 999 | break; |
| 1002 | 1000 | case 0x0158/4: |
| 1003 | 1001 | if( (mem_mask) & 0x0000ffff ) |
| 1004 | 1002 | { |
| 1005 | | verboselog(machine, 2, "GBA IO Register Read: JOYSTAT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_JOYSTAT ); |
| 1006 | | retval |= state->m_JOYSTAT; |
| 1003 | verboselog(machine(), 2, "GBA IO Register Read: JOYSTAT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOYSTAT ); |
| 1004 | retval |= m_JOYSTAT; |
| 1007 | 1005 | } |
| 1008 | 1006 | if( (mem_mask) & 0xffff0000 ) |
| 1009 | 1007 | { |
| 1010 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 1008 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 1011 | 1009 | } |
| 1012 | 1010 | break; |
| 1013 | 1011 | case 0x0200/4: |
| 1014 | 1012 | if( (mem_mask) & 0x0000ffff ) |
| 1015 | 1013 | { |
| 1016 | | // printf("Read: IE (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_IE ); |
| 1014 | // printf("Read: IE (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_IE ); |
| 1017 | 1015 | } |
| 1018 | 1016 | if( (mem_mask) & 0xffff0000 ) |
| 1019 | 1017 | { |
| 1020 | | verboselog(machine, 2, "GBA IO Register Read: IF (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, state->m_IF ); |
| 1018 | verboselog(machine(), 2, "GBA IO Register Read: IF (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_IF ); |
| 1021 | 1019 | } |
| 1022 | 1020 | |
| 1023 | | retval = state->m_IE | (state->m_IF<<16); |
| 1021 | retval = m_IE | (m_IF<<16); |
| 1024 | 1022 | break; |
| 1025 | 1023 | case 0x0204/4: |
| 1026 | 1024 | if( (mem_mask) & 0x0000ffff ) |
| 1027 | 1025 | { |
| 1028 | | verboselog(machine, 2, "GBA IO Register Read: WAITCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_WAITCNT ); |
| 1029 | | retval |= state->m_WAITCNT; |
| 1026 | verboselog(machine(), 2, "GBA IO Register Read: WAITCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_WAITCNT ); |
| 1027 | retval |= m_WAITCNT; |
| 1030 | 1028 | } |
| 1031 | 1029 | if( (mem_mask) & 0xffff0000 ) |
| 1032 | 1030 | { |
| 1033 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 1031 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 1034 | 1032 | } |
| 1035 | 1033 | break; |
| 1036 | 1034 | case 0x0208/4: |
| 1037 | 1035 | if( (mem_mask) & 0x0000ffff ) |
| 1038 | 1036 | { |
| 1039 | | verboselog(machine, 2, "GBA IO Register Read: IME (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), state->m_IME ); |
| 1040 | | retval |= state->m_IME; |
| 1037 | verboselog(machine(), 2, "GBA IO Register Read: IME (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_IME ); |
| 1038 | retval |= m_IME; |
| 1041 | 1039 | } |
| 1042 | 1040 | if( (mem_mask) & 0xffff0000 ) |
| 1043 | 1041 | { |
| 1044 | | verboselog(machine, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 1042 | verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); |
| 1045 | 1043 | } |
| 1046 | 1044 | break; |
| 1047 | 1045 | case 0x0300/4: |
| 1048 | | retval = state->m_HALTCNT << 8; |
| 1046 | retval = m_HALTCNT << 8; |
| 1049 | 1047 | break; |
| 1050 | 1048 | default: |
| 1051 | | // verboselog(machine, 0, "Unknown GBA I/O register Read: %08x (%08x)\n", 0x04000000 + ( offset << 2 ), ~mem_mask ); |
| 1049 | // verboselog(machine(), 0, "Unknown GBA I/O register Read: %08x (%08x)\n", 0x04000000 + ( offset << 2 ), ~mem_mask ); |
| 1052 | 1050 | break; |
| 1053 | 1051 | } |
| 1054 | 1052 | return retval; |
| 1055 | 1053 | } |
| 1056 | 1054 | |
| 1057 | | static WRITE32_HANDLER( gba_io_w ) |
| 1055 | WRITE32_MEMBER(gba_state::gba_io_w) |
| 1058 | 1056 | { |
| 1059 | | running_machine &machine = space->machine(); |
| 1060 | | device_t *gb_device = space->machine().device("custom"); |
| 1061 | | gba_state *state = machine.driver_data<gba_state>(); |
| 1062 | | |
| 1057 | device_t *gb_device = machine().device("custom"); |
| 1063 | 1058 | switch( offset ) |
| 1064 | 1059 | { |
| 1065 | 1060 | case 0x0000/4: |
| 1066 | 1061 | if( (mem_mask) & 0x0000ffff ) |
| 1067 | 1062 | { |
| 1068 | | verboselog(machine, 2, "GBA IO Register Write: DISPCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1069 | | state->m_DISPCNT = ( state->m_DISPCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1070 | | if(state->m_DISPCNT & (DISPCNT_WIN0_EN | DISPCNT_WIN1_EN)) |
| 1063 | verboselog(machine(), 2, "GBA IO Register Write: DISPCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1064 | m_DISPCNT = ( m_DISPCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1065 | if(m_DISPCNT & (DISPCNT_WIN0_EN | DISPCNT_WIN1_EN)) |
| 1071 | 1066 | { |
| 1072 | | state->m_windowOn = 1; |
| 1067 | m_windowOn = 1; |
| 1073 | 1068 | } |
| 1074 | 1069 | else |
| 1075 | 1070 | { |
| 1076 | | state->m_windowOn = 0; |
| 1071 | m_windowOn = 0; |
| 1077 | 1072 | } |
| 1078 | 1073 | } |
| 1079 | 1074 | if( (mem_mask) & 0xffff0000 ) |
| 1080 | 1075 | { |
| 1081 | | verboselog(machine, 2, "GBA IO Register Write: Green Swap (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1082 | | state->m_GRNSWAP = ( state->m_GRNSWAP & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1076 | verboselog(machine(), 2, "GBA IO Register Write: Green Swap (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1077 | m_GRNSWAP = ( m_GRNSWAP & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1083 | 1078 | } |
| 1084 | 1079 | break; |
| 1085 | 1080 | case 0x0004/4: |
| 1086 | | COMBINE_DATA(&state->m_DISPSTAT); |
| 1081 | COMBINE_DATA(&m_DISPSTAT); |
| 1087 | 1082 | break; |
| 1088 | 1083 | case 0x0008/4: |
| 1089 | 1084 | if( (mem_mask) & 0x0000ffff ) |
| 1090 | 1085 | { |
| 1091 | | verboselog(machine, 2, "GBA IO Register Write: BG0CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1092 | | state->m_BG0CNT = ( state->m_BG0CNT & ~mem_mask ) | ( data & mem_mask ); |
| 1086 | verboselog(machine(), 2, "GBA IO Register Write: BG0CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1087 | m_BG0CNT = ( m_BG0CNT & ~mem_mask ) | ( data & mem_mask ); |
| 1093 | 1088 | } |
| 1094 | 1089 | if( (mem_mask) & 0xffff0000 ) |
| 1095 | 1090 | { |
| 1096 | | verboselog(machine, 2, "GBA IO Register Write: BG1CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1097 | | state->m_BG1CNT = ( state->m_BG1CNT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1091 | verboselog(machine(), 2, "GBA IO Register Write: BG1CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1092 | m_BG1CNT = ( m_BG1CNT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1098 | 1093 | } |
| 1099 | 1094 | break; |
| 1100 | 1095 | case 0x000c/4: |
| 1101 | 1096 | if( (mem_mask) & 0x0000ffff ) |
| 1102 | 1097 | { |
| 1103 | | verboselog(machine, 2, "GBA IO Register Write: BG2CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1104 | | state->m_BG2CNT = ( state->m_BG2CNT & ~mem_mask ) | ( data & mem_mask ); |
| 1098 | verboselog(machine(), 2, "GBA IO Register Write: BG2CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1099 | m_BG2CNT = ( m_BG2CNT & ~mem_mask ) | ( data & mem_mask ); |
| 1105 | 1100 | } |
| 1106 | 1101 | if( (mem_mask) & 0xffff0000 ) |
| 1107 | 1102 | { |
| 1108 | | verboselog(machine, 2, "GBA IO Register Write: BG3CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1109 | | state->m_BG3CNT = ( state->m_BG3CNT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1103 | verboselog(machine(), 2, "GBA IO Register Write: BG3CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1104 | m_BG3CNT = ( m_BG3CNT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1110 | 1105 | } |
| 1111 | 1106 | break; |
| 1112 | 1107 | case 0x0010/4: |
| 1113 | 1108 | if( (mem_mask) & 0x0000ffff ) |
| 1114 | 1109 | { |
| 1115 | | verboselog(machine, 2, "GBA IO Register Write: BG0HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1116 | | state->m_BG0HOFS = ( state->m_BG0HOFS & ~mem_mask ) | ( data & mem_mask ); |
| 1110 | verboselog(machine(), 2, "GBA IO Register Write: BG0HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1111 | m_BG0HOFS = ( m_BG0HOFS & ~mem_mask ) | ( data & mem_mask ); |
| 1117 | 1112 | } |
| 1118 | 1113 | if( (mem_mask) & 0xffff0000 ) |
| 1119 | 1114 | { |
| 1120 | | verboselog(machine, 2, "GBA IO Register Write: BG0VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1121 | | state->m_BG0VOFS = ( state->m_BG0VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1115 | verboselog(machine(), 2, "GBA IO Register Write: BG0VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1116 | m_BG0VOFS = ( m_BG0VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1122 | 1117 | } |
| 1123 | 1118 | break; |
| 1124 | 1119 | case 0x0014/4: |
| 1125 | 1120 | if( (mem_mask) & 0x0000ffff ) |
| 1126 | 1121 | { |
| 1127 | | verboselog(machine, 2, "GBA IO Register Write: BG1HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1128 | | state->m_BG1HOFS = ( state->m_BG1HOFS & ~mem_mask ) | ( data & mem_mask ); |
| 1122 | verboselog(machine(), 2, "GBA IO Register Write: BG1HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1123 | m_BG1HOFS = ( m_BG1HOFS & ~mem_mask ) | ( data & mem_mask ); |
| 1129 | 1124 | } |
| 1130 | 1125 | if( (mem_mask) & 0xffff0000 ) |
| 1131 | 1126 | { |
| 1132 | | verboselog(machine, 2, "GBA IO Register Write: BG1VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1133 | | state->m_BG1VOFS = ( state->m_BG1VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1127 | verboselog(machine(), 2, "GBA IO Register Write: BG1VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1128 | m_BG1VOFS = ( m_BG1VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1134 | 1129 | } |
| 1135 | 1130 | break; |
| 1136 | 1131 | case 0x0018/4: |
| 1137 | 1132 | if( (mem_mask) & 0x0000ffff ) |
| 1138 | 1133 | { |
| 1139 | | verboselog(machine, 2, "GBA IO Register Write: BG2HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1140 | | state->m_BG2HOFS = ( state->m_BG2HOFS & ~mem_mask ) | ( data & mem_mask ); |
| 1134 | verboselog(machine(), 2, "GBA IO Register Write: BG2HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1135 | m_BG2HOFS = ( m_BG2HOFS & ~mem_mask ) | ( data & mem_mask ); |
| 1141 | 1136 | } |
| 1142 | 1137 | if( (mem_mask) & 0xffff0000 ) |
| 1143 | 1138 | { |
| 1144 | | verboselog(machine, 2, "GBA IO Register Write: BG2VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1145 | | state->m_BG2VOFS = ( state->m_BG2VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1139 | verboselog(machine(), 2, "GBA IO Register Write: BG2VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1140 | m_BG2VOFS = ( m_BG2VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1146 | 1141 | } |
| 1147 | 1142 | break; |
| 1148 | 1143 | case 0x001c/4: |
| 1149 | 1144 | if( (mem_mask) & 0x0000ffff ) |
| 1150 | 1145 | { |
| 1151 | | verboselog(machine, 2, "GBA IO Register Write: BG3HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1152 | | state->m_BG3HOFS = ( state->m_BG3HOFS & ~mem_mask ) | ( data & mem_mask ); |
| 1146 | verboselog(machine(), 2, "GBA IO Register Write: BG3HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1147 | m_BG3HOFS = ( m_BG3HOFS & ~mem_mask ) | ( data & mem_mask ); |
| 1153 | 1148 | } |
| 1154 | 1149 | if( (mem_mask) & 0xffff0000 ) |
| 1155 | 1150 | { |
| 1156 | | verboselog(machine, 2, "GBA IO Register Write: BG3VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1157 | | state->m_BG3VOFS = ( state->m_BG3VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1151 | verboselog(machine(), 2, "GBA IO Register Write: BG3VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1152 | m_BG3VOFS = ( m_BG3VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1158 | 1153 | } |
| 1159 | 1154 | break; |
| 1160 | 1155 | case 0x0020/4: |
| 1161 | 1156 | if( (mem_mask) & 0x0000ffff ) |
| 1162 | 1157 | { |
| 1163 | | verboselog(machine, 2, "GBA IO Register Write: BG2PA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1164 | | state->m_BG2PA = ( state->m_BG2PA & ~mem_mask ) | ( data & mem_mask ); |
| 1158 | verboselog(machine(), 2, "GBA IO Register Write: BG2PA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1159 | m_BG2PA = ( m_BG2PA & ~mem_mask ) | ( data & mem_mask ); |
| 1165 | 1160 | } |
| 1166 | 1161 | if( (mem_mask) & 0xffff0000 ) |
| 1167 | 1162 | { |
| 1168 | | verboselog(machine, 2, "GBA IO Register Write: BG2PB (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1169 | | state->m_BG2PB = ( state->m_BG2PB & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1163 | verboselog(machine(), 2, "GBA IO Register Write: BG2PB (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1164 | m_BG2PB = ( m_BG2PB & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1170 | 1165 | } |
| 1171 | 1166 | break; |
| 1172 | 1167 | case 0x0024/4: |
| 1173 | 1168 | if( (mem_mask) & 0x0000ffff ) |
| 1174 | 1169 | { |
| 1175 | | verboselog(machine, 2, "GBA IO Register Write: BG2PC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1176 | | state->m_BG2PC = ( state->m_BG2PC & ~mem_mask ) | ( data & mem_mask ); |
| 1170 | verboselog(machine(), 2, "GBA IO Register Write: BG2PC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1171 | m_BG2PC = ( m_BG2PC & ~mem_mask ) | ( data & mem_mask ); |
| 1177 | 1172 | } |
| 1178 | 1173 | if( (mem_mask) & 0xffff0000 ) |
| 1179 | 1174 | { |
| 1180 | | verboselog(machine, 2, "GBA IO Register Write: BG2PD (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1181 | | state->m_BG2PD = ( state->m_BG2PD & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1175 | verboselog(machine(), 2, "GBA IO Register Write: BG2PD (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1176 | m_BG2PD = ( m_BG2PD & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1182 | 1177 | } |
| 1183 | 1178 | break; |
| 1184 | 1179 | case 0x0028/4: |
| 1185 | 1180 | if( (mem_mask) & 0x0000ffff ) |
| 1186 | 1181 | { |
| 1187 | | verboselog(machine, 2, "GBA IO Register Write: BG2X_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1182 | verboselog(machine(), 2, "GBA IO Register Write: BG2X_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1188 | 1183 | } |
| 1189 | 1184 | if( (mem_mask) & 0xffff0000 ) |
| 1190 | 1185 | { |
| 1191 | | verboselog(machine, 2, "GBA IO Register Write: BG2X_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1186 | verboselog(machine(), 2, "GBA IO Register Write: BG2X_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1192 | 1187 | } |
| 1193 | | COMBINE_DATA(&state->m_BG2X); |
| 1194 | | state->m_gfxBG2Changed |= 1; |
| 1188 | COMBINE_DATA(&m_BG2X); |
| 1189 | m_gfxBG2Changed |= 1; |
| 1195 | 1190 | break; |
| 1196 | 1191 | case 0x002c/4: |
| 1197 | 1192 | if( (mem_mask) & 0x0000ffff ) |
| 1198 | 1193 | { |
| 1199 | | verboselog(machine, 2, "GBA IO Register Write: BG2Y_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1194 | verboselog(machine(), 2, "GBA IO Register Write: BG2Y_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1200 | 1195 | } |
| 1201 | 1196 | if( (mem_mask) & 0xffff0000 ) |
| 1202 | 1197 | { |
| 1203 | | verboselog(machine, 2, "GBA IO Register Write: BG2Y_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1198 | verboselog(machine(), 2, "GBA IO Register Write: BG2Y_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1204 | 1199 | } |
| 1205 | | COMBINE_DATA(&state->m_BG2Y); |
| 1206 | | state->m_gfxBG2Changed |= 2; |
| 1200 | COMBINE_DATA(&m_BG2Y); |
| 1201 | m_gfxBG2Changed |= 2; |
| 1207 | 1202 | break; |
| 1208 | 1203 | case 0x0030/4: |
| 1209 | 1204 | if( (mem_mask) & 0x0000ffff ) |
| 1210 | 1205 | { |
| 1211 | | verboselog(machine, 2, "GBA IO Register Write: BG3PA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1212 | | state->m_BG3PA = ( state->m_BG3PA & ~mem_mask ) | ( data & mem_mask ); |
| 1206 | verboselog(machine(), 2, "GBA IO Register Write: BG3PA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1207 | m_BG3PA = ( m_BG3PA & ~mem_mask ) | ( data & mem_mask ); |
| 1213 | 1208 | } |
| 1214 | 1209 | if( (mem_mask) & 0xffff0000 ) |
| 1215 | 1210 | { |
| 1216 | | verboselog(machine, 2, "GBA IO Register Write: BG3PB (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1217 | | state->m_BG3PB = ( state->m_BG3PB & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1211 | verboselog(machine(), 2, "GBA IO Register Write: BG3PB (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1212 | m_BG3PB = ( m_BG3PB & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1218 | 1213 | } |
| 1219 | 1214 | break; |
| 1220 | 1215 | case 0x0034/4: |
| 1221 | 1216 | if( (mem_mask) & 0x0000ffff ) |
| 1222 | 1217 | { |
| 1223 | | verboselog(machine, 2, "GBA IO Register Write: BG3PC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1224 | | state->m_BG3PC = ( state->m_BG3PC & ~mem_mask ) | ( data & mem_mask ); |
| 1218 | verboselog(machine(), 2, "GBA IO Register Write: BG3PC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1219 | m_BG3PC = ( m_BG3PC & ~mem_mask ) | ( data & mem_mask ); |
| 1225 | 1220 | } |
| 1226 | 1221 | if( (mem_mask) & 0xffff0000 ) |
| 1227 | 1222 | { |
| 1228 | | verboselog(machine, 2, "GBA IO Register Write: BG3PD (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1229 | | state->m_BG3PD = ( state->m_BG3PD & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1223 | verboselog(machine(), 2, "GBA IO Register Write: BG3PD (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1224 | m_BG3PD = ( m_BG3PD & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1230 | 1225 | } |
| 1231 | 1226 | break; |
| 1232 | 1227 | case 0x0038/4: |
| 1233 | 1228 | if( (mem_mask) & 0x0000ffff ) |
| 1234 | 1229 | { |
| 1235 | | verboselog(machine, 2, "GBA IO Register Write: BG3X_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1230 | verboselog(machine(), 2, "GBA IO Register Write: BG3X_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1236 | 1231 | } |
| 1237 | 1232 | if( (mem_mask) & 0xffff0000 ) |
| 1238 | 1233 | { |
| 1239 | | verboselog(machine, 2, "GBA IO Register Write: BG3X_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1234 | verboselog(machine(), 2, "GBA IO Register Write: BG3X_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1240 | 1235 | } |
| 1241 | | COMBINE_DATA(&state->m_BG3X); |
| 1242 | | state->m_gfxBG3Changed |= 1; |
| 1236 | COMBINE_DATA(&m_BG3X); |
| 1237 | m_gfxBG3Changed |= 1; |
| 1243 | 1238 | break; |
| 1244 | 1239 | case 0x003c/4: |
| 1245 | 1240 | if( (mem_mask) & 0x0000ffff ) |
| 1246 | 1241 | { |
| 1247 | | verboselog(machine, 2, "GBA IO Register Write: BG3Y_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1242 | verboselog(machine(), 2, "GBA IO Register Write: BG3Y_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1248 | 1243 | } |
| 1249 | 1244 | if( (mem_mask) & 0xffff0000 ) |
| 1250 | 1245 | { |
| 1251 | | verboselog(machine, 2, "GBA IO Register Write: BG3Y_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1246 | verboselog(machine(), 2, "GBA IO Register Write: BG3Y_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1252 | 1247 | } |
| 1253 | | COMBINE_DATA(&state->m_BG3Y); |
| 1254 | | state->m_gfxBG3Changed |= 2; |
| 1248 | COMBINE_DATA(&m_BG3Y); |
| 1249 | m_gfxBG3Changed |= 2; |
| 1255 | 1250 | break; |
| 1256 | 1251 | case 0x0040/4: |
| 1257 | 1252 | if( (mem_mask) & 0x0000ffff ) |
| 1258 | 1253 | { |
| 1259 | | verboselog(machine, 2, "GBA IO Register Write: WIN0H (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1260 | | state->m_WIN0H = ( state->m_WIN0H & ~mem_mask ) | ( data & mem_mask ); |
| 1254 | verboselog(machine(), 2, "GBA IO Register Write: WIN0H (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1255 | m_WIN0H = ( m_WIN0H & ~mem_mask ) | ( data & mem_mask ); |
| 1261 | 1256 | } |
| 1262 | 1257 | if( (mem_mask) & 0xffff0000 ) |
| 1263 | 1258 | { |
| 1264 | | verboselog(machine, 2, "GBA IO Register Write: WIN1H (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1265 | | state->m_WIN1H = ( state->m_WIN1H & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1259 | verboselog(machine(), 2, "GBA IO Register Write: WIN1H (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1260 | m_WIN1H = ( m_WIN1H & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1266 | 1261 | } |
| 1267 | 1262 | break; |
| 1268 | 1263 | case 0x0044/4: |
| 1269 | 1264 | if( (mem_mask) & 0x0000ffff ) |
| 1270 | 1265 | { |
| 1271 | | verboselog(machine, 2, "GBA IO Register Write: WIN0V (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1272 | | state->m_WIN0V = ( state->m_WIN0V & ~mem_mask ) | ( data & mem_mask ); |
| 1266 | verboselog(machine(), 2, "GBA IO Register Write: WIN0V (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1267 | m_WIN0V = ( m_WIN0V & ~mem_mask ) | ( data & mem_mask ); |
| 1273 | 1268 | } |
| 1274 | 1269 | if( (mem_mask) & 0xffff0000 ) |
| 1275 | 1270 | { |
| 1276 | | verboselog(machine, 2, "GBA IO Register Write: WIN1V (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1277 | | state->m_WIN1V = ( state->m_WIN1V & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1271 | verboselog(machine(), 2, "GBA IO Register Write: WIN1V (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1272 | m_WIN1V = ( m_WIN1V & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1278 | 1273 | } |
| 1279 | 1274 | break; |
| 1280 | 1275 | case 0x0048/4: |
| 1281 | 1276 | if( (mem_mask) & 0x0000ffff ) |
| 1282 | 1277 | { |
| 1283 | | verboselog(machine, 2, "GBA IO Register Write: WININ (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1284 | | state->m_WININ = ( state->m_WININ & ~mem_mask ) | ( data & mem_mask ); |
| 1278 | verboselog(machine(), 2, "GBA IO Register Write: WININ (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1279 | m_WININ = ( m_WININ & ~mem_mask ) | ( data & mem_mask ); |
| 1285 | 1280 | } |
| 1286 | 1281 | if( (mem_mask) & 0xffff0000 ) |
| 1287 | 1282 | { |
| 1288 | | verboselog(machine, 2, "GBA IO Register Write: WINOUT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1289 | | state->m_WINOUT = ( state->m_WINOUT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1283 | verboselog(machine(), 2, "GBA IO Register Write: WINOUT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1284 | m_WINOUT = ( m_WINOUT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1290 | 1285 | } |
| 1291 | 1286 | break; |
| 1292 | 1287 | case 0x004c/4: |
| 1293 | 1288 | if( (mem_mask) & 0x0000ffff ) |
| 1294 | 1289 | { |
| 1295 | | verboselog(machine, 2, "GBA IO Register Write: MOSAIC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1296 | | state->m_MOSAIC = ( state->m_MOSAIC & ~mem_mask ) | ( data & mem_mask ); |
| 1290 | verboselog(machine(), 2, "GBA IO Register Write: MOSAIC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1291 | m_MOSAIC = ( m_MOSAIC & ~mem_mask ) | ( data & mem_mask ); |
| 1297 | 1292 | } |
| 1298 | 1293 | if( (mem_mask) & 0xffff0000 ) |
| 1299 | 1294 | { |
| 1300 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1295 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1301 | 1296 | } |
| 1302 | 1297 | break; |
| 1303 | 1298 | case 0x0050/4: |
| 1304 | 1299 | if( (mem_mask) & 0x0000ffff ) |
| 1305 | 1300 | { |
| 1306 | | verboselog(machine, 2, "GBA IO Register Write: BLDCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1307 | | state->m_BLDCNT = ( state->m_BLDCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1308 | | if(state->m_BLDCNT & BLDCNT_SFX) |
| 1301 | verboselog(machine(), 2, "GBA IO Register Write: BLDCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1302 | m_BLDCNT = ( m_BLDCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1303 | if(m_BLDCNT & BLDCNT_SFX) |
| 1309 | 1304 | { |
| 1310 | | state->m_fxOn = 1; |
| 1305 | m_fxOn = 1; |
| 1311 | 1306 | } |
| 1312 | 1307 | else |
| 1313 | 1308 | { |
| 1314 | | state->m_fxOn = 0; |
| 1309 | m_fxOn = 0; |
| 1315 | 1310 | } |
| 1316 | 1311 | } |
| 1317 | 1312 | if( (mem_mask) & 0xffff0000 ) |
| 1318 | 1313 | { |
| 1319 | | verboselog(machine, 2, "GBA IO Register Write: BLDALPHA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1320 | | state->m_BLDALPHA = ( state->m_BLDALPHA & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1314 | verboselog(machine(), 2, "GBA IO Register Write: BLDALPHA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1315 | m_BLDALPHA = ( m_BLDALPHA & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1321 | 1316 | } |
| 1322 | 1317 | break; |
| 1323 | 1318 | case 0x0054/4: |
| 1324 | 1319 | if( (mem_mask) & 0x0000ffff ) |
| 1325 | 1320 | { |
| 1326 | | verboselog(machine, 2, "GBA IO Register Write: BLDY (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1327 | | state->m_BLDY = ( state->m_BLDY & ~mem_mask ) | ( data & mem_mask ); |
| 1321 | verboselog(machine(), 2, "GBA IO Register Write: BLDY (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1322 | m_BLDY = ( m_BLDY & ~mem_mask ) | ( data & mem_mask ); |
| 1328 | 1323 | } |
| 1329 | 1324 | if( (mem_mask) & 0xffff0000 ) |
| 1330 | 1325 | { |
| 1331 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1326 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1332 | 1327 | } |
| 1333 | 1328 | break; |
| 1334 | 1329 | case 0x0058/4: |
| 1335 | 1330 | if( (mem_mask) & 0x0000ffff ) |
| 1336 | 1331 | { |
| 1337 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1332 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1338 | 1333 | } |
| 1339 | 1334 | if( (mem_mask) & 0xffff0000 ) |
| 1340 | 1335 | { |
| 1341 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1336 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1342 | 1337 | } |
| 1343 | 1338 | break; |
| 1344 | 1339 | case 0x005c/4: |
| 1345 | 1340 | if( (mem_mask) & 0x0000ffff ) |
| 1346 | 1341 | { |
| 1347 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1342 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1348 | 1343 | } |
| 1349 | 1344 | if( (mem_mask) & 0xffff0000 ) |
| 1350 | 1345 | { |
| 1351 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1346 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1352 | 1347 | } |
| 1353 | 1348 | break; |
| 1354 | 1349 | case 0x0060/4: |
| r14963 | r14964 | |
| 1452 | 1447 | if ((mem_mask) & 0xffff0000) |
| 1453 | 1448 | { |
| 1454 | 1449 | data >>= 16; |
| 1455 | | state->m_SOUNDCNT_H = data; |
| 1450 | m_SOUNDCNT_H = data; |
| 1456 | 1451 | |
| 1457 | 1452 | // DAC A reset? |
| 1458 | 1453 | if (data & 0x0800) |
| 1459 | 1454 | { |
| 1460 | | device_t *gb_a_l = machine.device("direct_a_left"); |
| 1461 | | device_t *gb_a_r = machine.device("direct_a_right"); |
| 1455 | device_t *gb_a_l = machine().device("direct_a_left"); |
| 1456 | device_t *gb_a_r = machine().device("direct_a_right"); |
| 1462 | 1457 | |
| 1463 | | state->m_fifo_a_ptr = 17; |
| 1464 | | state->m_fifo_a_in = 17; |
| 1458 | m_fifo_a_ptr = 17; |
| 1459 | m_fifo_a_in = 17; |
| 1465 | 1460 | dac_signed_data_w(gb_a_l, 0x80); |
| 1466 | 1461 | dac_signed_data_w(gb_a_r, 0x80); |
| 1467 | 1462 | } |
| r14963 | r14964 | |
| 1469 | 1464 | // DAC B reset? |
| 1470 | 1465 | if (data & 0x8000) |
| 1471 | 1466 | { |
| 1472 | | device_t *gb_b_l = machine.device("direct_b_left"); |
| 1473 | | device_t *gb_b_r = machine.device("direct_b_right"); |
| 1467 | device_t *gb_b_l = machine().device("direct_b_left"); |
| 1468 | device_t *gb_b_r = machine().device("direct_b_right"); |
| 1474 | 1469 | |
| 1475 | | state->m_fifo_b_ptr = 17; |
| 1476 | | state->m_fifo_b_in = 17; |
| 1470 | m_fifo_b_ptr = 17; |
| 1471 | m_fifo_b_in = 17; |
| 1477 | 1472 | dac_signed_data_w(gb_b_l, 0x80); |
| 1478 | 1473 | dac_signed_data_w(gb_b_r, 0x80); |
| 1479 | 1474 | } |
| r14963 | r14964 | |
| 1482 | 1477 | case 0x0084/4: |
| 1483 | 1478 | if( (mem_mask) & 0x000000ff ) |
| 1484 | 1479 | { |
| 1485 | | device_t *gb_a_l = machine.device("direct_a_left"); |
| 1486 | | device_t *gb_a_r = machine.device("direct_a_right"); |
| 1487 | | device_t *gb_b_l = machine.device("direct_b_left"); |
| 1488 | | device_t *gb_b_r = machine.device("direct_b_right"); |
| 1480 | device_t *gb_a_l = machine().device("direct_a_left"); |
| 1481 | device_t *gb_a_r = machine().device("direct_a_right"); |
| 1482 | device_t *gb_b_l = machine().device("direct_b_left"); |
| 1483 | device_t *gb_b_r = machine().device("direct_b_right"); |
| 1489 | 1484 | |
| 1490 | 1485 | gb_sound_w(gb_device, 0x16, data); |
| 1491 | | if ((data & 0x80) && !(state->m_SOUNDCNT_X & 0x80)) |
| 1486 | if ((data & 0x80) && !(m_SOUNDCNT_X & 0x80)) |
| 1492 | 1487 | { |
| 1493 | | state->m_fifo_a_ptr = state->m_fifo_a_in = 17; |
| 1494 | | state->m_fifo_b_ptr = state->m_fifo_b_in = 17; |
| 1488 | m_fifo_a_ptr = m_fifo_a_in = 17; |
| 1489 | m_fifo_b_ptr = m_fifo_b_in = 17; |
| 1495 | 1490 | dac_signed_data_w(gb_a_l, 0x80); |
| 1496 | 1491 | dac_signed_data_w(gb_a_r, 0x80); |
| 1497 | 1492 | dac_signed_data_w(gb_b_l, 0x80); |
| 1498 | 1493 | dac_signed_data_w(gb_b_r, 0x80); |
| 1499 | 1494 | } |
| 1500 | | state->m_SOUNDCNT_X = data; |
| 1495 | m_SOUNDCNT_X = data; |
| 1501 | 1496 | } |
| 1502 | 1497 | break; |
| 1503 | 1498 | case 0x0088/4: |
| 1504 | 1499 | if( (mem_mask) & 0x0000ffff ) |
| 1505 | 1500 | { |
| 1506 | | verboselog(machine, 2, "GBA IO Register Write: SOUNDBIAS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1507 | | state->m_SOUNDBIAS = ( state->m_SOUNDBIAS & ~mem_mask ) | ( data & mem_mask ); |
| 1501 | verboselog(machine(), 2, "GBA IO Register Write: SOUNDBIAS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); |
| 1502 | m_SOUNDBIAS = ( m_SOUNDBIAS & ~mem_mask ) | ( data & mem_mask ); |
| 1508 | 1503 | } |
| 1509 | 1504 | if( (mem_mask) & 0xffff0000 ) |
| 1510 | 1505 | { |
| 1511 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1506 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1512 | 1507 | } |
| 1513 | 1508 | break; |
| 1514 | 1509 | case 0x0090/4: |
| r14963 | r14964 | |
| 1584 | 1579 | } |
| 1585 | 1580 | break; |
| 1586 | 1581 | case 0x00a0/4: |
| 1587 | | state->m_fifo_a_in %= 17; |
| 1588 | | state->m_fifo_a[state->m_fifo_a_in++] = (data)&0xff; |
| 1589 | | state->m_fifo_a_in %= 17; |
| 1590 | | state->m_fifo_a[state->m_fifo_a_in++] = (data>>8)&0xff; |
| 1591 | | state->m_fifo_a_in %= 17; |
| 1592 | | state->m_fifo_a[state->m_fifo_a_in++] = (data>>16)&0xff; |
| 1593 | | state->m_fifo_a_in %= 17; |
| 1594 | | state->m_fifo_a[state->m_fifo_a_in++] = (data>>24)&0xff; |
| 1582 | m_fifo_a_in %= 17; |
| 1583 | m_fifo_a[m_fifo_a_in++] = (data)&0xff; |
| 1584 | m_fifo_a_in %= 17; |
| 1585 | m_fifo_a[m_fifo_a_in++] = (data>>8)&0xff; |
| 1586 | m_fifo_a_in %= 17; |
| 1587 | m_fifo_a[m_fifo_a_in++] = (data>>16)&0xff; |
| 1588 | m_fifo_a_in %= 17; |
| 1589 | m_fifo_a[m_fifo_a_in++] = (data>>24)&0xff; |
| 1595 | 1590 | break; |
| 1596 | 1591 | case 0x00a4/4: |
| 1597 | | state->m_fifo_b_in %= 17; |
| 1598 | | state->m_fifo_b[state->m_fifo_b_in++] = (data)&0xff; |
| 1599 | | state->m_fifo_b_in %= 17; |
| 1600 | | state->m_fifo_b[state->m_fifo_b_in++] = (data>>8)&0xff; |
| 1601 | | state->m_fifo_b_in %= 17; |
| 1602 | | state->m_fifo_b[state->m_fifo_b_in++] = (data>>16)&0xff; |
| 1603 | | state->m_fifo_b_in %= 17; |
| 1604 | | state->m_fifo_b[state->m_fifo_b_in++] = (data>>24)&0xff; |
| 1592 | m_fifo_b_in %= 17; |
| 1593 | m_fifo_b[m_fifo_b_in++] = (data)&0xff; |
| 1594 | m_fifo_b_in %= 17; |
| 1595 | m_fifo_b[m_fifo_b_in++] = (data>>8)&0xff; |
| 1596 | m_fifo_b_in %= 17; |
| 1597 | m_fifo_b[m_fifo_b_in++] = (data>>16)&0xff; |
| 1598 | m_fifo_b_in %= 17; |
| 1599 | m_fifo_b[m_fifo_b_in++] = (data>>24)&0xff; |
| 1605 | 1600 | break; |
| 1606 | 1601 | case 0x00b0/4: |
| 1607 | 1602 | case 0x00b4/4: |
| r14963 | r14964 | |
| 1638 | 1633 | |
| 1639 | 1634 | // retrigger/restart on a rising edge. |
| 1640 | 1635 | // also reload internal regs |
| 1641 | | if ((ctrl & 0x8000) && !(state->m_dma_regs[offset] & 0x80000000)) |
| 1636 | if ((ctrl & 0x8000) && !(m_dma_regs[offset] & 0x80000000)) |
| 1642 | 1637 | { |
| 1643 | | state->m_dma_src[ch] = state->m_dma_regs[(ch*3)+0]; |
| 1644 | | state->m_dma_dst[ch] = state->m_dma_regs[(ch*3)+1]; |
| 1645 | | state->m_dma_srcadd[ch] = (ctrl>>7)&3; |
| 1646 | | state->m_dma_dstadd[ch] = (ctrl>>5)&3; |
| 1638 | m_dma_src[ch] = m_dma_regs[(ch*3)+0]; |
| 1639 | m_dma_dst[ch] = m_dma_regs[(ch*3)+1]; |
| 1640 | m_dma_srcadd[ch] = (ctrl>>7)&3; |
| 1641 | m_dma_dstadd[ch] = (ctrl>>5)&3; |
| 1647 | 1642 | |
| 1648 | | COMBINE_DATA(&state->m_dma_regs[offset]); |
| 1649 | | state->m_dma_cnt[ch] = state->m_dma_regs[(ch*3)+2]&0xffff; |
| 1643 | COMBINE_DATA(&m_dma_regs[offset]); |
| 1644 | m_dma_cnt[ch] = m_dma_regs[(ch*3)+2]&0xffff; |
| 1650 | 1645 | |
| 1651 | 1646 | // immediate start |
| 1652 | 1647 | if ((ctrl & 0x3000) == 0) |
| 1653 | 1648 | { |
| 1654 | | dma_exec(machine, ch); |
| 1649 | dma_exec(machine(), ch); |
| 1655 | 1650 | return; |
| 1656 | 1651 | } |
| 1657 | 1652 | } |
| 1658 | 1653 | } |
| 1659 | 1654 | |
| 1660 | | COMBINE_DATA(&state->m_dma_regs[offset]); |
| 1655 | COMBINE_DATA(&m_dma_regs[offset]); |
| 1661 | 1656 | } |
| 1662 | 1657 | break; |
| 1663 | 1658 | case 0x0100/4: |
| r14963 | r14964 | |
| 1670 | 1665 | |
| 1671 | 1666 | offset -= (0x100/4); |
| 1672 | 1667 | |
| 1673 | | old_timer_regs = state->m_timer_regs[offset]; |
| 1668 | old_timer_regs = m_timer_regs[offset]; |
| 1674 | 1669 | |
| 1675 | | state->m_timer_regs[offset] = (state->m_timer_regs[offset] & ~(mem_mask & 0xFFFF0000)) | (data & (mem_mask & 0xFFFF0000)); |
| 1670 | m_timer_regs[offset] = (m_timer_regs[offset] & ~(mem_mask & 0xFFFF0000)) | (data & (mem_mask & 0xFFFF0000)); |
| 1676 | 1671 | |
| 1677 | | // printf("%x to timer %d (mask %x PC %x)\n", data, offset, ~mem_mask, cpu_get_pc(&space->device())); |
| 1672 | // printf("%x to timer %d (mask %x PC %x)\n", data, offset, ~mem_mask, cpu_get_pc(&space.device())); |
| 1678 | 1673 | |
| 1679 | 1674 | if (ACCESSING_BITS_0_15) |
| 1680 | 1675 | { |
| 1681 | | state->m_timer_reload[offset] = ((state->m_timer_reload[offset] & ~mem_mask) | (data & mem_mask)) & 0x0000FFFF; |
| 1682 | | state->m_timer_recalc[offset] = 1; |
| 1676 | m_timer_reload[offset] = ((m_timer_reload[offset] & ~mem_mask) | (data & mem_mask)) & 0x0000FFFF; |
| 1677 | m_timer_recalc[offset] = 1; |
| 1683 | 1678 | } |
| 1684 | 1679 | |
| 1685 | 1680 | // enabling this timer? |
| r14963 | r14964 | |
| 1689 | 1684 | |
| 1690 | 1685 | if ((old_timer_regs & 0x00800000) == 0) // start bit 0 -> 1 |
| 1691 | 1686 | { |
| 1692 | | state->m_timer_regs[offset] = (state->m_timer_regs[offset] & 0xFFFF0000) | (state->m_timer_reload[offset] & 0x0000FFFF); |
| 1687 | m_timer_regs[offset] = (m_timer_regs[offset] & 0xFFFF0000) | (m_timer_reload[offset] & 0x0000FFFF); |
| 1693 | 1688 | } |
| 1694 | 1689 | |
| 1695 | | rate = 0x10000 - (state->m_timer_regs[offset] & 0xffff); |
| 1690 | rate = 0x10000 - (m_timer_regs[offset] & 0xffff); |
| 1696 | 1691 | |
| 1697 | | clocksel = timer_clks[(state->m_timer_regs[offset] >> 16) & 3]; |
| 1692 | clocksel = timer_clks[(m_timer_regs[offset] >> 16) & 3]; |
| 1698 | 1693 | |
| 1699 | 1694 | final = clocksel / rate; |
| 1700 | 1695 | |
| 1701 | | state->m_timer_hz[offset] = final; |
| 1696 | m_timer_hz[offset] = final; |
| 1702 | 1697 | |
| 1703 | | state->m_timer_recalc[offset] = 0; |
| 1698 | m_timer_recalc[offset] = 0; |
| 1704 | 1699 | |
| 1705 | 1700 | // printf("Enabling timer %d @ %f Hz\n", offset, final); |
| 1706 | 1701 | |
| r14963 | r14964 | |
| 1709 | 1704 | { |
| 1710 | 1705 | attotime time = attotime::from_hz(final); |
| 1711 | 1706 | GBA_ATTOTIME_NORMALIZE(time); |
| 1712 | | state->m_tmr_timer[offset]->adjust(time, offset, time); |
| 1707 | m_tmr_timer[offset]->adjust(time, offset, time); |
| 1713 | 1708 | } |
| 1714 | 1709 | } |
| 1715 | 1710 | } |
| r14963 | r14964 | |
| 1717 | 1712 | case 0x0120/4: |
| 1718 | 1713 | if( (mem_mask) & 0x0000ffff ) |
| 1719 | 1714 | { |
| 1720 | | verboselog(machine, 2, "GBA IO Register Write: SIOMULTI0 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1721 | | state->m_SIOMULTI0 = ( state->m_SIOMULTI0 & ~mem_mask ) | ( data & mem_mask ); |
| 1715 | verboselog(machine(), 2, "GBA IO Register Write: SIOMULTI0 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1716 | m_SIOMULTI0 = ( m_SIOMULTI0 & ~mem_mask ) | ( data & mem_mask ); |
| 1722 | 1717 | } |
| 1723 | 1718 | if( (mem_mask) & 0xffff0000 ) |
| 1724 | 1719 | { |
| 1725 | | verboselog(machine, 2, "GBA IO Register Write: SIOMULTI1 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1726 | | state->m_SIOMULTI1 = ( state->m_SIOMULTI1 & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1720 | verboselog(machine(), 2, "GBA IO Register Write: SIOMULTI1 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1721 | m_SIOMULTI1 = ( m_SIOMULTI1 & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1727 | 1722 | } |
| 1728 | 1723 | break; |
| 1729 | 1724 | case 0x0124/4: |
| 1730 | 1725 | if( (mem_mask) & 0x0000ffff ) |
| 1731 | 1726 | { |
| 1732 | | verboselog(machine, 2, "GBA IO Register Write: SIOMULTI2 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1733 | | state->m_SIOMULTI2 = ( state->m_SIOMULTI2 & ~mem_mask ) | ( data & mem_mask ); |
| 1727 | verboselog(machine(), 2, "GBA IO Register Write: SIOMULTI2 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1728 | m_SIOMULTI2 = ( m_SIOMULTI2 & ~mem_mask ) | ( data & mem_mask ); |
| 1734 | 1729 | } |
| 1735 | 1730 | if( (mem_mask) & 0xffff0000 ) |
| 1736 | 1731 | { |
| 1737 | | verboselog(machine, 2, "GBA IO Register Write: SIOMULTI3 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1738 | | state->m_SIOMULTI3 = ( state->m_SIOMULTI3 & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1732 | verboselog(machine(), 2, "GBA IO Register Write: SIOMULTI3 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1733 | m_SIOMULTI3 = ( m_SIOMULTI3 & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1739 | 1734 | } |
| 1740 | 1735 | break; |
| 1741 | 1736 | case 0x0128/4: |
| 1742 | 1737 | if( (mem_mask) & 0x0000ffff ) |
| 1743 | 1738 | { |
| 1744 | | verboselog(machine, 2, "GBA IO Register Write: SIOCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1739 | verboselog(machine(), 2, "GBA IO Register Write: SIOCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1745 | 1740 | // normal mode ? |
| 1746 | | if (((state->m_RCNT & 0x8000) == 0) && ((data & 0x2000) == 0)) |
| 1741 | if (((m_RCNT & 0x8000) == 0) && ((data & 0x2000) == 0)) |
| 1747 | 1742 | { |
| 1748 | 1743 | // start ? |
| 1749 | | if (((state->m_SIOCNT & 0x0080) == 0) && ((data & 0x0080) != 0)) |
| 1744 | if (((m_SIOCNT & 0x0080) == 0) && ((data & 0x0080) != 0)) |
| 1750 | 1745 | { |
| 1751 | 1746 | data &= ~0x0080; |
| 1752 | 1747 | // request interrupt ? |
| 1753 | 1748 | if (data & 0x4000) |
| 1754 | 1749 | { |
| 1755 | | gba_request_irq( machine, INT_SIO); |
| 1750 | gba_request_irq( machine(), INT_SIO); |
| 1756 | 1751 | } |
| 1757 | 1752 | } |
| 1758 | 1753 | } |
| 1759 | | state->m_SIOCNT = ( state->m_SIOCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1754 | m_SIOCNT = ( m_SIOCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1760 | 1755 | } |
| 1761 | 1756 | if( (mem_mask) & 0xffff0000 ) |
| 1762 | 1757 | { |
| 1763 | | verboselog(machine, 2, "GBA IO Register Write: SIODATA8 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1764 | | state->m_SIODATA8 = ( state->m_SIODATA8 & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1758 | verboselog(machine(), 2, "GBA IO Register Write: SIODATA8 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1759 | m_SIODATA8 = ( m_SIODATA8 & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1765 | 1760 | } |
| 1766 | 1761 | break; |
| 1767 | 1762 | case 0x0130/4: |
| 1768 | 1763 | if( (mem_mask) & 0xffff0000 ) |
| 1769 | 1764 | { |
| 1770 | 1765 | // printf("KEYCNT = %04x\n", data>>16); |
| 1771 | | verboselog(machine, 2, "GBA IO Register Write: KEYCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1772 | | state->m_KEYCNT = ( state->m_KEYCNT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1766 | verboselog(machine(), 2, "GBA IO Register Write: KEYCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1767 | m_KEYCNT = ( m_KEYCNT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1773 | 1768 | } |
| 1774 | 1769 | break; |
| 1775 | 1770 | case 0x0134/4: |
| 1776 | 1771 | if( (mem_mask) & 0x0000ffff ) |
| 1777 | 1772 | { |
| 1778 | | verboselog(machine, 2, "GBA IO Register Write: RCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1779 | | state->m_RCNT = ( state->m_RCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1773 | verboselog(machine(), 2, "GBA IO Register Write: RCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1774 | m_RCNT = ( m_RCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1780 | 1775 | } |
| 1781 | 1776 | if( (mem_mask) & 0xffff0000 ) |
| 1782 | 1777 | { |
| 1783 | | verboselog(machine, 2, "GBA IO Register Write: IR (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1784 | | state->m_IR = ( state->m_IR & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1778 | verboselog(machine(), 2, "GBA IO Register Write: IR (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1779 | m_IR = ( m_IR & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1785 | 1780 | } |
| 1786 | 1781 | break; |
| 1787 | 1782 | case 0x0140/4: |
| 1788 | 1783 | if( (mem_mask) & 0x0000ffff ) |
| 1789 | 1784 | { |
| 1790 | | verboselog(machine, 2, "GBA IO Register Write: JOYCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1791 | | state->m_JOYCNT = ( state->m_JOYCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1785 | verboselog(machine(), 2, "GBA IO Register Write: JOYCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1786 | m_JOYCNT = ( m_JOYCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1792 | 1787 | } |
| 1793 | 1788 | if( (mem_mask) & 0xffff0000 ) |
| 1794 | 1789 | { |
| 1795 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1790 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1796 | 1791 | } |
| 1797 | 1792 | break; |
| 1798 | 1793 | case 0x0150/4: |
| 1799 | 1794 | if( (mem_mask) & 0x0000ffff ) |
| 1800 | 1795 | { |
| 1801 | | verboselog(machine, 2, "GBA IO Register Write: JOY_RECV_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1802 | | state->m_JOY_RECV = ( state->m_JOY_RECV & ~mem_mask ) | ( data & mem_mask ); |
| 1796 | verboselog(machine(), 2, "GBA IO Register Write: JOY_RECV_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1797 | m_JOY_RECV = ( m_JOY_RECV & ~mem_mask ) | ( data & mem_mask ); |
| 1803 | 1798 | } |
| 1804 | 1799 | if( (mem_mask) & 0xffff0000 ) |
| 1805 | 1800 | { |
| 1806 | | verboselog(machine, 2, "GBA IO Register Write: JOY_RECV_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1807 | | state->m_JOY_RECV = ( state->m_JOY_RECV & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1801 | verboselog(machine(), 2, "GBA IO Register Write: JOY_RECV_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1802 | m_JOY_RECV = ( m_JOY_RECV & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1808 | 1803 | } |
| 1809 | 1804 | break; |
| 1810 | 1805 | case 0x0154/4: |
| 1811 | 1806 | if( (mem_mask) & 0x0000ffff ) |
| 1812 | 1807 | { |
| 1813 | | verboselog(machine, 2, "GBA IO Register Write: JOY_TRANS_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1814 | | state->m_JOY_TRANS = ( state->m_JOY_TRANS & ~mem_mask ) | ( data & mem_mask ); |
| 1808 | verboselog(machine(), 2, "GBA IO Register Write: JOY_TRANS_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1809 | m_JOY_TRANS = ( m_JOY_TRANS & ~mem_mask ) | ( data & mem_mask ); |
| 1815 | 1810 | } |
| 1816 | 1811 | if( (mem_mask) & 0xffff0000 ) |
| 1817 | 1812 | { |
| 1818 | | verboselog(machine, 2, "GBA IO Register Write: JOY_TRANS_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1819 | | state->m_JOY_TRANS = ( state->m_JOY_TRANS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1813 | verboselog(machine(), 2, "GBA IO Register Write: JOY_TRANS_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1814 | m_JOY_TRANS = ( m_JOY_TRANS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); |
| 1820 | 1815 | } |
| 1821 | 1816 | break; |
| 1822 | 1817 | case 0x0158/4: |
| 1823 | 1818 | if( (mem_mask) & 0x0000ffff ) |
| 1824 | 1819 | { |
| 1825 | | verboselog(machine, 2, "GBA IO Register Write: JOYSTAT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1826 | | state->m_JOYSTAT = ( state->m_JOYSTAT & ~mem_mask ) | ( data & mem_mask ); |
| 1820 | verboselog(machine(), 2, "GBA IO Register Write: JOYSTAT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1821 | m_JOYSTAT = ( m_JOYSTAT & ~mem_mask ) | ( data & mem_mask ); |
| 1827 | 1822 | } |
| 1828 | 1823 | if( (mem_mask) & 0xffff0000 ) |
| 1829 | 1824 | { |
| 1830 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1825 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1831 | 1826 | } |
| 1832 | 1827 | break; |
| 1833 | 1828 | case 0x0200/4: |
| 1834 | 1829 | if( (mem_mask) & 0x0000ffff ) |
| 1835 | 1830 | { |
| 1836 | | // printf("IE (%08x) = %04x raw %x (%08x) (scan %d PC %x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, data, ~mem_mask, machine.primary_screen->vpos(), cpu_get_pc(&space->device())); |
| 1837 | | state->m_IE = ( state->m_IE & ~mem_mask ) | ( data & mem_mask ); |
| 1831 | // printf("IE (%08x) = %04x raw %x (%08x) (scan %d PC %x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, data, ~mem_mask, machine.primary_screen->vpos(), cpu_get_pc(&space.device())); |
| 1832 | m_IE = ( m_IE & ~mem_mask ) | ( data & mem_mask ); |
| 1838 | 1833 | #if 0 |
| 1839 | | if (state->m_IE & state->m_IF) |
| 1834 | if (m_IE & m_IF) |
| 1840 | 1835 | { |
| 1841 | | gba_request_irq(machine, state->m_IF); |
| 1836 | gba_request_irq(machine(), m_IF); |
| 1842 | 1837 | } |
| 1843 | 1838 | #endif |
| 1844 | 1839 | } |
| 1845 | 1840 | if( (mem_mask) & 0xffff0000 ) |
| 1846 | 1841 | { |
| 1847 | | verboselog(machine, 2, "GBA IO Register Write: IF (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ) + 2, ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1848 | | state->m_IF &= ~( ( data & mem_mask ) >> 16 ); |
| 1842 | verboselog(machine(), 2, "GBA IO Register Write: IF (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ) + 2, ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1843 | m_IF &= ~( ( data & mem_mask ) >> 16 ); |
| 1849 | 1844 | |
| 1850 | 1845 | // if we still have interrupts, yank the IRQ line again |
| 1851 | | if (state->m_IF) |
| 1846 | if (m_IF) |
| 1852 | 1847 | { |
| 1853 | | state->m_irq_timer->adjust(machine.device<cpu_device>("maincpu")->clocks_to_attotime(120)); |
| 1848 | m_irq_timer->adjust(machine().device<cpu_device>("maincpu")->clocks_to_attotime(120)); |
| 1854 | 1849 | } |
| 1855 | 1850 | } |
| 1856 | 1851 | break; |
| 1857 | 1852 | case 0x0204/4: |
| 1858 | 1853 | if( (mem_mask) & 0x0000ffff ) |
| 1859 | 1854 | { |
| 1860 | | verboselog(machine, 2, "GBA IO Register Write: WAITCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1861 | | state->m_WAITCNT = ( state->m_WAITCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1855 | verboselog(machine(), 2, "GBA IO Register Write: WAITCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1856 | m_WAITCNT = ( m_WAITCNT & ~mem_mask ) | ( data & mem_mask ); |
| 1862 | 1857 | } |
| 1863 | 1858 | if( (mem_mask) & 0xffff0000 ) |
| 1864 | 1859 | { |
| 1865 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1860 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1866 | 1861 | } |
| 1867 | 1862 | break; |
| 1868 | 1863 | case 0x0208/4: |
| 1869 | 1864 | if( (mem_mask) & 0x0000ffff ) |
| 1870 | 1865 | { |
| 1871 | | verboselog(machine, 3, "GBA IO Register Write: IME (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1872 | | state->m_IME = ( state->m_IME & ~mem_mask ) | ( data & mem_mask ); |
| 1873 | | if (state->m_IF) |
| 1866 | verboselog(machine(), 3, "GBA IO Register Write: IME (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); |
| 1867 | m_IME = ( m_IME & ~mem_mask ) | ( data & mem_mask ); |
| 1868 | if (m_IF) |
| 1874 | 1869 | { |
| 1875 | | state->m_irq_timer->adjust(attotime::zero); |
| 1870 | m_irq_timer->adjust(attotime::zero); |
| 1876 | 1871 | } |
| 1877 | 1872 | } |
| 1878 | 1873 | if( (mem_mask) & 0xffff0000 ) |
| 1879 | 1874 | { |
| 1880 | | verboselog(machine, 3, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1875 | verboselog(machine(), 3, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); |
| 1881 | 1876 | } |
| 1882 | 1877 | break; |
| 1883 | 1878 | case 0x0300/4: |
| r14963 | r14964 | |
| 1885 | 1880 | { |
| 1886 | 1881 | if( (mem_mask) & 0x000000ff ) |
| 1887 | 1882 | { |
| 1888 | | verboselog(machine, 2, "GBA IO Register Write: POSTFLG (%08x) = %02x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x000000ff, ~mem_mask ); |
| 1889 | | state->m_POSTFLG = data & 0x000000ff; |
| 1883 | verboselog(machine(), 2, "GBA IO Register Write: POSTFLG (%08x) = %02x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x000000ff, ~mem_mask ); |
| 1884 | m_POSTFLG = data & 0x000000ff; |
| 1890 | 1885 | } |
| 1891 | 1886 | else |
| 1892 | 1887 | { |
| 1893 | | state->m_HALTCNT = data & 0x000000ff; |
| 1888 | m_HALTCNT = data & 0x000000ff; |
| 1894 | 1889 | |
| 1895 | 1890 | // either way, wait for an IRQ |
| 1896 | | device_spin_until_interrupt(machine.device("maincpu")); |
| 1891 | device_spin_until_interrupt(machine().device("maincpu")); |
| 1897 | 1892 | } |
| 1898 | 1893 | } |
| 1899 | 1894 | if( (mem_mask) & 0xffff0000 ) |
| 1900 | 1895 | { |
| 1901 | | verboselog(machine, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1896 | verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); |
| 1902 | 1897 | } |
| 1903 | 1898 | break; |
| 1904 | 1899 | default: |
| r14963 | r14964 | |
| 1934 | 1929 | return prev; |
| 1935 | 1930 | } |
| 1936 | 1931 | |
| 1937 | | static WRITE32_HANDLER(gba_pram_w) |
| 1932 | WRITE32_MEMBER(gba_state::gba_pram_w) |
| 1938 | 1933 | { |
| 1939 | | running_machine &machine = space->machine(); |
| 1940 | | gba_state *state = machine.driver_data<gba_state>(); |
| 1941 | | |
| 1942 | | state->m_gba_pram[offset] = COMBINE_DATA32_16(state->m_gba_pram[offset], data, mem_mask); |
| 1934 | m_gba_pram[offset] = COMBINE_DATA32_16(m_gba_pram[offset], data, mem_mask); |
| 1943 | 1935 | } |
| 1944 | 1936 | |
| 1945 | | static WRITE32_HANDLER(gba_vram_w) |
| 1937 | WRITE32_MEMBER(gba_state::gba_vram_w) |
| 1946 | 1938 | { |
| 1947 | | running_machine &machine = space->machine(); |
| 1948 | | gba_state *state = machine.driver_data<gba_state>(); |
| 1949 | | |
| 1950 | | state->m_gba_vram[offset] = COMBINE_DATA32_16(state->m_gba_vram[offset], data, mem_mask); |
| 1939 | m_gba_vram[offset] = COMBINE_DATA32_16(m_gba_vram[offset], data, mem_mask); |
| 1951 | 1940 | } |
| 1952 | 1941 | |
| 1953 | | static WRITE32_HANDLER(gba_oam_w) |
| 1942 | WRITE32_MEMBER(gba_state::gba_oam_w) |
| 1954 | 1943 | { |
| 1955 | | running_machine &machine = space->machine(); |
| 1956 | | gba_state *state = machine.driver_data<gba_state>(); |
| 1957 | | |
| 1958 | | state->m_gba_oam[offset] = COMBINE_DATA32_16(state->m_gba_oam[offset], data, mem_mask); |
| 1944 | m_gba_oam[offset] = COMBINE_DATA32_16(m_gba_oam[offset], data, mem_mask); |
| 1959 | 1945 | } |
| 1960 | 1946 | |
| 1961 | | static READ32_HANDLER(gba_bios_r) |
| 1947 | READ32_MEMBER(gba_state::gba_bios_r) |
| 1962 | 1948 | { |
| 1963 | | running_machine &machine = space->machine(); |
| 1964 | | gba_state *state = machine.driver_data<gba_state>(); |
| 1965 | | UINT32 *rom = (UINT32 *)(*space->machine().region("maincpu")); |
| 1966 | | if (state->m_bios_protected != 0) |
| 1949 | UINT32 *rom = (UINT32 *)(*machine().region("maincpu")); |
| 1950 | if (m_bios_protected != 0) |
| 1967 | 1951 | { |
| 1968 | | offset = (state->m_bios_last_address + 8) / 4; |
| 1952 | offset = (m_bios_last_address + 8) / 4; |
| 1969 | 1953 | } |
| 1970 | 1954 | return rom[offset&0x3fff]; |
| 1971 | 1955 | } |
| 1972 | 1956 | |
| 1973 | | static READ32_HANDLER(gba_10000000_r) |
| 1957 | READ32_MEMBER(gba_state::gba_10000000_r) |
| 1974 | 1958 | { |
| 1975 | 1959 | UINT32 data, cpsr, pc; |
| 1976 | | cpu_device *cpu = downcast<cpu_device *>(space->machine().device( "maincpu")); |
| 1960 | cpu_device *cpu = downcast<cpu_device *>(machine().device( "maincpu")); |
| 1977 | 1961 | pc = cpu_get_reg( cpu, ARM7_PC); |
| 1978 | 1962 | cpsr = cpu_get_reg( cpu, ARM7_CPSR); |
| 1979 | 1963 | if (T_IS_SET( cpsr)) |
| 1980 | 1964 | { |
| 1981 | | data = space->read_dword( pc + 8); |
| 1965 | data = space.read_dword( pc + 8); |
| 1982 | 1966 | } |
| 1983 | 1967 | else |
| 1984 | 1968 | { |
| 1985 | | UINT16 insn = space->read_word( pc + 4); |
| 1969 | UINT16 insn = space.read_word( pc + 4); |
| 1986 | 1970 | data = (insn << 16) | (insn << 0); |
| 1987 | 1971 | } |
| 1988 | | logerror( "%s: unmapped program memory read from %08X = %08X & %08X\n", space->machine().describe_context( ), 0x10000000 + (offset << 2), data, mem_mask); |
| 1972 | logerror( "%s: unmapped program memory read from %08X = %08X & %08X\n", machine().describe_context( ), 0x10000000 + (offset << 2), data, mem_mask); |
| 1989 | 1973 | return data; |
| 1990 | 1974 | } |
| 1991 | 1975 | |
| 1992 | 1976 | static ADDRESS_MAP_START( gbadvance_map, AS_PROGRAM, 32, gba_state ) |
| 1993 | 1977 | ADDRESS_MAP_UNMAP_HIGH // for "Fruit Mura no Doubutsu Tachi" and "Classic NES Series" |
| 1994 | | AM_RANGE(0x00000000, 0x00003fff) AM_ROM AM_READ_LEGACY(gba_bios_r) |
| 1978 | AM_RANGE(0x00000000, 0x00003fff) AM_ROM AM_READ(gba_bios_r) |
| 1995 | 1979 | AM_RANGE(0x02000000, 0x0203ffff) AM_RAM AM_MIRROR(0xfc0000) |
| 1996 | 1980 | AM_RANGE(0x03000000, 0x03007fff) AM_RAM AM_MIRROR(0xff8000) |
| 1997 | | AM_RANGE(0x04000000, 0x040003ff) AM_READWRITE_LEGACY(gba_io_r, gba_io_w ) |
| 1998 | | AM_RANGE(0x05000000, 0x050003ff) AM_RAM_WRITE_LEGACY(gba_pram_w) AM_SHARE("gba_pram") // Palette RAM |
| 1999 | | AM_RANGE(0x06000000, 0x06017fff) AM_RAM_WRITE_LEGACY(gba_vram_w) AM_SHARE("gba_vram") // VRAM |
| 2000 | | AM_RANGE(0x07000000, 0x070003ff) AM_RAM_WRITE_LEGACY(gba_oam_w) AM_SHARE("gba_oam") // OAM |
| 1981 | AM_RANGE(0x04000000, 0x040003ff) AM_READWRITE(gba_io_r, gba_io_w ) |
| 1982 | AM_RANGE(0x05000000, 0x050003ff) AM_RAM_WRITE(gba_pram_w) AM_SHARE("gba_pram") // Palette RAM |
| 1983 | AM_RANGE(0x06000000, 0x06017fff) AM_RAM_WRITE(gba_vram_w) AM_SHARE("gba_vram") // VRAM |
| 1984 | AM_RANGE(0x07000000, 0x070003ff) AM_RAM_WRITE(gba_oam_w) AM_SHARE("gba_oam") // OAM |
| 2001 | 1985 | AM_RANGE(0x08000000, 0x09ffffff) AM_ROM AM_REGION("cartridge", 0) // cartridge ROM (mirror 0) |
| 2002 | 1986 | AM_RANGE(0x0a000000, 0x0bffffff) AM_ROM AM_REGION("cartridge", 0) // cartridge ROM (mirror 1) |
| 2003 | 1987 | AM_RANGE(0x0c000000, 0x0cffffff) AM_ROM AM_REGION("cartridge", 0) // final mirror |
| 2004 | | AM_RANGE(0x10000000, 0xffffffff) AM_READ_LEGACY(gba_10000000_r) // for "Justice League Chronicles" (game bug) |
| 1988 | AM_RANGE(0x10000000, 0xffffffff) AM_READ(gba_10000000_r) // for "Justice League Chronicles" (game bug) |
| 2005 | 1989 | ADDRESS_MAP_END |
| 2006 | 1990 | |
| 2007 | 1991 | static INPUT_PORTS_START( gbadv ) |
| r14963 | r14964 | |
| 2233 | 2217 | ROM_REGION( 0x2000000, "cartridge", ROMREGION_ERASEFF ) |
| 2234 | 2218 | ROM_END |
| 2235 | 2219 | |
| 2236 | | static READ32_HANDLER( sram_r ) |
| 2220 | READ32_MEMBER(gba_state::sram_r) |
| 2237 | 2221 | { |
| 2238 | | gba_state *state = space->machine().driver_data<gba_state>(); |
| 2239 | 2222 | |
| 2240 | | return state->m_gba_sram[offset]; |
| 2223 | return m_gba_sram[offset]; |
| 2241 | 2224 | } |
| 2242 | 2225 | |
| 2243 | | static WRITE32_HANDLER( sram_w ) |
| 2226 | WRITE32_MEMBER(gba_state::sram_w) |
| 2244 | 2227 | { |
| 2245 | | gba_state *state = space->machine().driver_data<gba_state>(); |
| 2246 | 2228 | |
| 2247 | | COMBINE_DATA(&state->m_gba_sram[offset]); |
| 2229 | COMBINE_DATA(&m_gba_sram[offset]); |
| 2248 | 2230 | } |
| 2249 | 2231 | |
| 2250 | | static READ32_HANDLER( flash_r ) |
| 2232 | READ32_MEMBER(gba_state::flash_r) |
| 2251 | 2233 | { |
| 2252 | | gba_state *state = space->machine().driver_data<gba_state>(); |
| 2253 | 2234 | UINT32 rv; |
| 2254 | 2235 | |
| 2255 | 2236 | rv = 0; |
| 2256 | | offset &= state->m_flash_mask; |
| 2257 | | if (mem_mask & 0xff) rv |= state->m_mFlashDev->read(offset*4); |
| 2258 | | if (mem_mask & 0xff00) rv |= state->m_mFlashDev->read((offset*4)+1)<<8; |
| 2259 | | if (mem_mask & 0xff0000) rv |= state->m_mFlashDev->read((offset*4)+2)<<16; |
| 2260 | | if (mem_mask & 0xff000000) rv |= state->m_mFlashDev->read((offset*4)+3)<<24; |
| 2237 | offset &= m_flash_mask; |
| 2238 | if (mem_mask & 0xff) rv |= m_mFlashDev->read(offset*4); |
| 2239 | if (mem_mask & 0xff00) rv |= m_mFlashDev->read((offset*4)+1)<<8; |
| 2240 | if (mem_mask & 0xff0000) rv |= m_mFlashDev->read((offset*4)+2)<<16; |
| 2241 | if (mem_mask & 0xff000000) rv |= m_mFlashDev->read((offset*4)+3)<<24; |
| 2261 | 2242 | |
| 2262 | 2243 | return rv; |
| 2263 | 2244 | } |
| 2264 | 2245 | |
| 2265 | | static WRITE32_HANDLER( flash_w ) |
| 2246 | WRITE32_MEMBER(gba_state::flash_w) |
| 2266 | 2247 | { |
| 2267 | | gba_state *state = space->machine().driver_data<gba_state>(); |
| 2268 | 2248 | |
| 2269 | | offset &= state->m_flash_mask; |
| 2249 | offset &= m_flash_mask; |
| 2270 | 2250 | switch (mem_mask) |
| 2271 | 2251 | { |
| 2272 | 2252 | case 0xff: |
| 2273 | | state->m_mFlashDev->write(offset*4, data&0xff); |
| 2253 | m_mFlashDev->write(offset*4, data&0xff); |
| 2274 | 2254 | break; |
| 2275 | 2255 | case 0xff00: |
| 2276 | | state->m_mFlashDev->write((offset*4)+1, (data>>8)&0xff); |
| 2256 | m_mFlashDev->write((offset*4)+1, (data>>8)&0xff); |
| 2277 | 2257 | break; |
| 2278 | 2258 | case 0xff0000: |
| 2279 | | state->m_mFlashDev->write((offset*4)+2, (data>>16)&0xff); |
| 2259 | m_mFlashDev->write((offset*4)+2, (data>>16)&0xff); |
| 2280 | 2260 | break; |
| 2281 | 2261 | case 0xff000000: |
| 2282 | | state->m_mFlashDev->write((offset*4)+3, (data>>24)&0xff); |
| 2262 | m_mFlashDev->write((offset*4)+3, (data>>24)&0xff); |
| 2283 | 2263 | break; |
| 2284 | 2264 | default: |
| 2285 | 2265 | fatalerror("Unknown mem_mask for GBA flash_w %x\n", mem_mask); |
| r14963 | r14964 | |
| 2287 | 2267 | } |
| 2288 | 2268 | } |
| 2289 | 2269 | |
| 2290 | | static READ32_HANDLER( eeprom_r ) |
| 2270 | READ32_MEMBER(gba_state::eeprom_r) |
| 2291 | 2271 | { |
| 2292 | 2272 | UINT32 out; |
| 2293 | | gba_state *state = space->machine().driver_data<gba_state>(); |
| 2294 | 2273 | |
| 2295 | | switch (state->m_eeprom_state) |
| 2274 | switch (m_eeprom_state) |
| 2296 | 2275 | { |
| 2297 | 2276 | case EEP_IDLE: |
| 2298 | | // printf("eeprom_r: @ %x, mask %08x (state %d) (PC=%x) = %d\n", offset, ~mem_mask, state->m_eeprom_state, activecpu_get_pc(), 1); |
| 2277 | // printf("eeprom_r: @ %x, mask %08x (state %d) (PC=%x) = %d\n", offset, ~mem_mask, m_eeprom_state, activecpu_get_pc(), 1); |
| 2299 | 2278 | return 0x00010001; // "ready" |
| 2300 | 2279 | |
| 2301 | 2280 | case EEP_READFIRST: |
| 2302 | | state->m_eeprom_count--; |
| 2281 | m_eeprom_count--; |
| 2303 | 2282 | |
| 2304 | | if (!state->m_eeprom_count) |
| 2283 | if (!m_eeprom_count) |
| 2305 | 2284 | { |
| 2306 | | state->m_eeprom_count = 64; |
| 2307 | | state->m_eeprom_bits = 0; |
| 2308 | | state->m_eep_data = 0; |
| 2309 | | state->m_eeprom_state = EEP_READ; |
| 2285 | m_eeprom_count = 64; |
| 2286 | m_eeprom_bits = 0; |
| 2287 | m_eep_data = 0; |
| 2288 | m_eeprom_state = EEP_READ; |
| 2310 | 2289 | } |
| 2311 | 2290 | break; |
| 2312 | 2291 | case EEP_READ: |
| 2313 | | if ((state->m_eeprom_bits == 0) && (state->m_eeprom_count)) |
| 2292 | if ((m_eeprom_bits == 0) && (m_eeprom_count)) |
| 2314 | 2293 | { |
| 2315 | | if (state->m_eeprom_addr >= sizeof( state->m_gba_eeprom)) |
| 2294 | if (m_eeprom_addr >= sizeof( m_gba_eeprom)) |
| 2316 | 2295 | { |
| 2317 | | fatalerror( "eeprom: invalid address (%x)", state->m_eeprom_addr); |
| 2296 | fatalerror( "eeprom: invalid address (%x)", m_eeprom_addr); |
| 2318 | 2297 | } |
| 2319 | | state->m_eep_data = state->m_gba_eeprom[state->m_eeprom_addr]; |
| 2320 | | //printf("EEPROM read @ %x = %x (%x)\n", state->m_eeprom_addr, state->m_eep_data, (state->m_eep_data & 0x80) ? 1 : 0); |
| 2321 | | state->m_eeprom_addr++; |
| 2322 | | state->m_eeprom_bits = 8; |
| 2298 | m_eep_data = m_gba_eeprom[m_eeprom_addr]; |
| 2299 | //printf("EEPROM read @ %x = %x (%x)\n", m_eeprom_addr, m_eep_data, (m_eep_data & 0x80) ? 1 : 0); |
| 2300 | m_eeprom_addr++; |
| 2301 | m_eeprom_bits = 8; |
| 2323 | 2302 | } |
| 2324 | 2303 | |
| 2325 | | out = (state->m_eep_data & 0x80) ? 1 : 0; |
| 2304 | out = (m_eep_data & 0x80) ? 1 : 0; |
| 2326 | 2305 | out |= (out<<16); |
| 2327 | | state->m_eep_data <<= 1; |
| 2306 | m_eep_data <<= 1; |
| 2328 | 2307 | |
| 2329 | | state->m_eeprom_bits--; |
| 2330 | | state->m_eeprom_count--; |
| 2308 | m_eeprom_bits--; |
| 2309 | m_eeprom_count--; |
| 2331 | 2310 | |
| 2332 | | if (!state->m_eeprom_count) |
| 2311 | if (!m_eeprom_count) |
| 2333 | 2312 | { |
| 2334 | | state->m_eeprom_state = EEP_IDLE; |
| 2313 | m_eeprom_state = EEP_IDLE; |
| 2335 | 2314 | } |
| 2336 | 2315 | |
| 2337 | 2316 | // printf("out = %08x\n", out); |
| 2338 | | // printf("eeprom_r: @ %x, mask %08x (state %d) (PC=%x) = %08x\n", offset, ~mem_mask, state->m_eeprom_state, activecpu_get_pc(), out); |
| 2317 | // printf("eeprom_r: @ %x, mask %08x (state %d) (PC=%x) = %08x\n", offset, ~mem_mask, m_eeprom_state, activecpu_get_pc(), out); |
| 2339 | 2318 | return out; |
| 2340 | 2319 | } |
| 2341 | | // printf("eeprom_r: @ %x, mask %08x (state %d) (PC=%x) = %d\n", offset, ~mem_mask, state->m_eeprom_state, cpu_get_pc(&space->device()), 0); |
| 2320 | // printf("eeprom_r: @ %x, mask %08x (state %d) (PC=%x) = %d\n", offset, ~mem_mask, m_eeprom_state, cpu_get_pc(&space.device()), 0); |
| 2342 | 2321 | return 0; |
| 2343 | 2322 | } |
| 2344 | 2323 | |
| 2345 | | static WRITE32_HANDLER( eeprom_w ) |
| 2324 | WRITE32_MEMBER(gba_state::eeprom_w) |
| 2346 | 2325 | { |
| 2347 | | gba_state *state = space->machine().driver_data<gba_state>(); |
| 2348 | 2326 | |
| 2349 | 2327 | if (~mem_mask == 0x0000ffff) |
| 2350 | 2328 | { |
| 2351 | 2329 | data >>= 16; |
| 2352 | 2330 | } |
| 2353 | 2331 | |
| 2354 | | // printf("eeprom_w: %x @ %x (state %d) (PC=%x)\n", data, offset, state->m_eeprom_state, cpu_get_pc(&space->device())); |
| 2332 | // printf("eeprom_w: %x @ %x (state %d) (PC=%x)\n", data, offset, m_eeprom_state, cpu_get_pc(&space.device())); |
| 2355 | 2333 | |
| 2356 | | switch (state->m_eeprom_state) |
| 2334 | switch (m_eeprom_state) |
| 2357 | 2335 | { |
| 2358 | 2336 | case EEP_IDLE: |
| 2359 | 2337 | if (data == 1) |
| 2360 | 2338 | { |
| 2361 | | state->m_eeprom_state++; |
| 2339 | m_eeprom_state++; |
| 2362 | 2340 | } |
| 2363 | 2341 | break; |
| 2364 | 2342 | |
| 2365 | 2343 | case EEP_COMMAND: |
| 2366 | 2344 | if (data == 1) |
| 2367 | 2345 | { |
| 2368 | | state->m_eeprom_command = EEP_READFIRST; |
| 2346 | m_eeprom_command = EEP_READFIRST; |
| 2369 | 2347 | } |
| 2370 | 2348 | else |
| 2371 | 2349 | { |
| 2372 | | state->m_eeprom_command = EEP_WRITE; |
| 2350 | m_eeprom_command = EEP_WRITE; |
| 2373 | 2351 | } |
| 2374 | | state->m_eeprom_state = EEP_ADDR; |
| 2375 | | state->m_eeprom_count = state->m_eeprom_addr_bits; |
| 2376 | | state->m_eeprom_addr = 0; |
| 2352 | m_eeprom_state = EEP_ADDR; |
| 2353 | m_eeprom_count = m_eeprom_addr_bits; |
| 2354 | m_eeprom_addr = 0; |
| 2377 | 2355 | break; |
| 2378 | 2356 | |
| 2379 | 2357 | case EEP_ADDR: |
| 2380 | | state->m_eeprom_addr <<= 1; |
| 2381 | | state->m_eeprom_addr |= (data & 1); |
| 2382 | | state->m_eeprom_count--; |
| 2383 | | if (!state->m_eeprom_count) |
| 2358 | m_eeprom_addr <<= 1; |
| 2359 | m_eeprom_addr |= (data & 1); |
| 2360 | m_eeprom_count--; |
| 2361 | if (!m_eeprom_count) |
| 2384 | 2362 | { |
| 2385 | | state->m_eeprom_addr *= 8; // each address points to 8 bytes |
| 2386 | | if (state->m_eeprom_command == EEP_READFIRST) |
| 2363 | m_eeprom_addr *= 8; // each address points to 8 bytes |
| 2364 | if (m_eeprom_command == EEP_READFIRST) |
| 2387 | 2365 | { |
| 2388 | | state->m_eeprom_state = EEP_AFTERADDR; |
| 2366 | m_eeprom_state = EEP_AFTERADDR; |
| 2389 | 2367 | } |
| 2390 | 2368 | else |
| 2391 | 2369 | { |
| 2392 | | state->m_eeprom_count = 64; |
| 2393 | | state->m_eeprom_bits = 8; |
| 2394 | | state->m_eeprom_state = EEP_WRITE; |
| 2395 | | state->m_eep_data = 0; |
| 2370 | m_eeprom_count = 64; |
| 2371 | m_eeprom_bits = 8; |
| 2372 | m_eeprom_state = EEP_WRITE; |
| 2373 | m_eep_data = 0; |
| 2396 | 2374 | } |
| 2397 | 2375 | } |
| 2398 | 2376 | break; |
| 2399 | 2377 | |
| 2400 | 2378 | case EEP_AFTERADDR: |
| 2401 | | state->m_eeprom_state = state->m_eeprom_command; |
| 2402 | | state->m_eeprom_count = 64; |
| 2403 | | state->m_eeprom_bits = 0; |
| 2404 | | state->m_eep_data = 0; |
| 2405 | | if( state->m_eeprom_state == EEP_READFIRST ) |
| 2379 | m_eeprom_state = m_eeprom_command; |
| 2380 | m_eeprom_count = 64; |
| 2381 | m_eeprom_bits = 0; |
| 2382 | m_eep_data = 0; |
| 2383 | if( m_eeprom_state == EEP_READFIRST ) |
| 2406 | 2384 | { |
| 2407 | | state->m_eeprom_count = 4; |
| 2385 | m_eeprom_count = 4; |
| 2408 | 2386 | } |
| 2409 | 2387 | break; |
| 2410 | 2388 | |
| 2411 | 2389 | case EEP_WRITE: |
| 2412 | | state->m_eep_data<<= 1; |
| 2413 | | state->m_eep_data |= (data & 1); |
| 2414 | | state->m_eeprom_bits--; |
| 2415 | | state->m_eeprom_count--; |
| 2390 | m_eep_data<<= 1; |
| 2391 | m_eep_data |= (data & 1); |
| 2392 | m_eeprom_bits--; |
| 2393 | m_eeprom_count--; |
| 2416 | 2394 | |
| 2417 | | if (state->m_eeprom_bits == 0) |
| 2395 | if (m_eeprom_bits == 0) |
| 2418 | 2396 | { |
| 2419 | | mame_printf_verbose("%08x: EEPROM: %02x to %x\n", cpu_get_pc(space->machine().device("maincpu")), state->m_eep_data, state->m_eeprom_addr ); |
| 2420 | | if (state->m_eeprom_addr >= sizeof( state->m_gba_eeprom)) |
| 2397 | mame_printf_verbose("%08x: EEPROM: %02x to %x\n", cpu_get_pc(machine().device("maincpu")), m_eep_data, m_eeprom_addr ); |
| 2398 | if (m_eeprom_addr >= sizeof( m_gba_eeprom)) |
| 2421 | 2399 | { |
| 2422 | | fatalerror( "eeprom: invalid address (%x)", state->m_eeprom_addr); |
| 2400 | fatalerror( "eeprom: invalid address (%x)", m_eeprom_addr); |
| 2423 | 2401 | } |
| 2424 | | state->m_gba_eeprom[state->m_eeprom_addr] = state->m_eep_data; |
| 2425 | | state->m_eeprom_addr++; |
| 2426 | | state->m_eep_data = 0; |
| 2427 | | state->m_eeprom_bits = 8; |
| 2402 | m_gba_eeprom[m_eeprom_addr] = m_eep_data; |
| 2403 | m_eeprom_addr++; |
| 2404 | m_eep_data = 0; |
| 2405 | m_eeprom_bits = 8; |
| 2428 | 2406 | } |
| 2429 | 2407 | |
| 2430 | | if (!state->m_eeprom_count) |
| 2408 | if (!m_eeprom_count) |
| 2431 | 2409 | { |
| 2432 | | state->m_eeprom_state = EEP_AFTERWRITE; |
| 2410 | m_eeprom_state = EEP_AFTERWRITE; |
| 2433 | 2411 | } |
| 2434 | 2412 | break; |
| 2435 | 2413 | |
| 2436 | 2414 | case EEP_AFTERWRITE: |
| 2437 | | state->m_eeprom_state = EEP_IDLE; |
| 2415 | m_eeprom_state = EEP_IDLE; |
| 2438 | 2416 | break; |
| 2439 | 2417 | } |
| 2440 | 2418 | } |
| r14963 | r14964 | |
| 3085 | 3063 | |
| 3086 | 3064 | if (cart_size <= (16 * 1024 * 1024)) |
| 3087 | 3065 | { |
| 3088 | | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xd000000, 0xdffffff, FUNC(eeprom_r)); |
| 3089 | | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xd000000, 0xdffffff, FUNC(eeprom_w)); |
| 3066 | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0xd000000, 0xdffffff, read32_delegate(FUNC(gba_state::eeprom_r),state)); |
| 3067 | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0xd000000, 0xdffffff, write32_delegate(FUNC(gba_state::eeprom_w),state)); |
| 3090 | 3068 | } |
| 3091 | 3069 | else |
| 3092 | 3070 | { |
| 3093 | | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xdffff00, 0xdffffff, FUNC(eeprom_r)); |
| 3094 | | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xdffff00, 0xdffffff, FUNC(eeprom_w)); |
| 3071 | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0xdffff00, 0xdffffff, read32_delegate(FUNC(gba_state::eeprom_r),state)); |
| 3072 | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0xdffff00, 0xdffffff, write32_delegate(FUNC(gba_state::eeprom_w),state)); |
| 3095 | 3073 | } |
| 3096 | 3074 | } |
| 3097 | 3075 | |
| r14963 | r14964 | |
| 3100 | 3078 | state->m_nvptr = (UINT8 *)&state->m_gba_sram; |
| 3101 | 3079 | state->m_nvsize = 0x10000; |
| 3102 | 3080 | |
| 3103 | | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xe000000, 0xe00ffff, FUNC(sram_r)); |
| 3104 | | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xe000000, 0xe00ffff, FUNC(sram_w)); |
| 3081 | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0xe000000, 0xe00ffff, read32_delegate(FUNC(gba_state::sram_r),state)); |
| 3082 | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0xe000000, 0xe00ffff, write32_delegate(FUNC(gba_state::sram_w),state)); |
| 3105 | 3083 | } |
| 3106 | 3084 | |
| 3107 | 3085 | if (chip & GBA_CHIP_FLASH_1M) |
| r14963 | r14964 | |
| 3111 | 3089 | state->m_flash_size = 0x20000; |
| 3112 | 3090 | state->m_flash_mask = 0x1ffff/4; |
| 3113 | 3091 | |
| 3114 | | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xe000000, 0xe01ffff, FUNC(flash_r)); |
| 3115 | | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xe000000, 0xe01ffff, FUNC(flash_w)); |
| 3092 | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0xe000000, 0xe01ffff, read32_delegate(FUNC(gba_state::flash_r),state)); |
| 3093 | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0xe000000, 0xe01ffff, write32_delegate(FUNC(gba_state::flash_w),state)); |
| 3116 | 3094 | } |
| 3117 | 3095 | |
| 3118 | 3096 | if ((chip & GBA_CHIP_FLASH) || (chip & GBA_CHIP_FLASH_512)) |
| r14963 | r14964 | |
| 3122 | 3100 | state->m_flash_size = 0x10000; |
| 3123 | 3101 | state->m_flash_mask = 0xffff/4; |
| 3124 | 3102 | |
| 3125 | | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xe000000, 0xe00ffff, FUNC(flash_r)); |
| 3126 | | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xe000000, 0xe00ffff, FUNC(flash_w)); |
| 3103 | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0xe000000, 0xe00ffff, read32_delegate(FUNC(gba_state::flash_r),state)); |
| 3104 | image.device().machine().device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0xe000000, 0xe00ffff, write32_delegate(FUNC(gba_state::flash_w),state)); |
| 3127 | 3105 | } |
| 3128 | 3106 | |
| 3129 | 3107 | if (chip & GBA_CHIP_RTC) |