| Previous | 15994 Revisions | Next |
| r3374 Friday 3rd October, 2008 at 04:37:45 UTC by Nathan Woods |
|---|
| Updated to MAME 0.127u6 core |
| [docs] | messnew.txt |
| [src/emu] | cpuint.c crsshair.c emupal.h inptport.h inpttype.h render.c render.h rendfont.c tilemap.c tilemap.h ui.c uigfx.c uimenu.c video.c |
| [src/emu/cpu/cubeqcpu] | cubeqcpu.c |
| [src/emu/cpu/dsp56k] | dsp56def.h dsp56k.c dsp56mem.c dsp56ops.c dsp56pcu.c |
| [src/emu/cpu/m68000] | m68kcpu.c m68kcpu.h |
| [src/emu/cpu/z80] | z80daisy.c |
| [src/emu/machine] | 8255ppi.c 8255ppi.h ldcore.c ldv1000.c |
| [src/emu/video] | tms9928a.c |
| [src/lib/util] | aviio.c palette.c palette.h vbiparse.c |
| [src/mame] | mamedriv.c |
| [src/mame/audio] | cchasm.c cinemat.c scramble.c segag80r.c senjyo.c turbo.c zaxxon.c |
| [src/mame/drivers] | 20pacgal.c 8080bw.c alg.c astinvad.c astrocde.c cchasm.c chqflag.c clayshoo.c cliffhgr.c couple.c cps2.c cubeqst.c dlair.c dribling.c epos.c esh.c expro02.c filetto.c findout.c firefox.c freekick.c galaxian.c gatron.c getrivia.c gpworld.c homerun.c igs_180.c imolagp.c iqblock.c istellar.c lgp.c lordgun.c lucky74.c mcr.c mcr3.c merit.c meritm.c mwarr.c nbmj9195.c neodrvr.c niyanpai.c othunder.c paradise.c pipeline.c psikyo4.c sbasketb.c scobra.c scramble.c segag80r.c segahang.c segald.c segaorun.c segas16a.c segaxbd.c seibuspi.c senjyo.c sg1000a.c shadfrce.c smstrv.c superdq.c system1.c taxidrvr.c tcl.c turbo.c tx1.c vroulet.c warpwarp.c zaccaria.c zaxxon.c |
| [src/mame/includes] | galaxold.h mcr.h neogeo.h segag80r.h turbo.h zaxxon.h |
| [src/mame/machine] | cps2crpt.c mcr.c neoboot.c neocrypt.c scramble.c snes.c |
| [src/mame/video] | gottlieb.c itech32.c kaneko16.c taito_f3.c tmnt.c toobin.c |
| [src/mess/drivers] | amstrad.c bw2.c mpf1.c sg1000.c sord.c x68k.c |
| [src/mess/includes] | atom.h |
| [src/mess/machine] | atom.c b2m.c compis.c irisha.c lviv.c mikro80.c msx.c mz700.c orion.c pc.c pc8801.c pmd85.c radio86.c special.c svi318.c ut88.c vector06.c |
| [src/mess/tools/messtest] | testmess.c |
| [src/mess/video] | hd66421.c |
| [src/osd/windows] | window.c |
| [src/tools] | ldverify.c |
| r3373 | r3374 | |
|---|---|---|
| 13 | 13 | #include "sound/dac.h" |
| 14 | 14 | |
| 15 | 15 | static int sound_flags; |
| 16 | static const device_config *ctc; | |
| 16 | 17 | |
| 17 | 18 | READ8_HANDLER( cchasm_snd_io_r ) |
| 18 | 19 | { |
| r3373 | r3374 | |
| 36 | 37 | |
| 37 | 38 | case 0x41: |
| 38 | 39 | sound_flags &= ~0x80; |
| 39 | z80ctc_ | |
| 40 | z80ctc_ | |
| 40 | 41 | return soundlatch2_r (machine, offset); |
| 41 | 42 | default: |
| 42 | 43 | logerror("Read from unmapped internal IO device at 0x%x\n", offset + 0x6000); |
| r3373 | r3374 | |
| 75 | 76 | break; |
| 76 | 77 | |
| 77 | 78 | case 0x61: |
| 78 | z80ctc_ | |
| 79 | z80ctc_ | |
| 79 | 80 | break; |
| 80 | 81 | |
| 81 | 82 | default: |
| r3373 | r3374 | |
| 98 | 99 | case 1: |
| 99 | 100 | sound_flags |= 0x80; |
| 100 | 101 | soundlatch2_w (machine, offset, data); |
| 101 | z80ctc_ | |
| 102 | z80ctc_ | |
| 102 | 103 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); |
| 103 | 104 | break; |
| 104 | 105 | case 2: |
| r3373 | r3374 | |
| 131 | 132 | static int channel_active[2]; |
| 132 | 133 | static int output[2]; |
| 133 | 134 | |
| 134 | static void ctc_interrupt ( | |
| 135 | static void ctc_interrupt (const device_ | |
| 135 | 136 | { |
| 136 | cpunum_set_input_line(machine, 1, 0, state); | |
| 137 | cpunum_set_input_line(device->machine, 1, 0, state); | |
| 137 | 138 | } |
| 138 | 139 | |
| 139 | static WRITE8_HANDLER( ctc_timer_1_w ) | |
| 140 | static WRITE8_DEVICE_HANDLER( ctc_timer_1_w ) | |
| 140 | 141 | { |
| 141 | 142 | if (data) /* rising edge */ |
| 142 | 143 | { |
| r3373 | r3374 | |
| 146 | 147 | } |
| 147 | 148 | } |
| 148 | 149 | |
| 149 | static WRITE8_HANDLER( ctc_timer_2_w ) | |
| 150 | static WRITE8_DEVICE_HANDLER( ctc_timer_2_w ) | |
| 150 | 151 | { |
| 151 | 152 | if (data) /* rising edge */ |
| 152 | 153 | { |
| r3373 | r3374 | |
| 156 | 157 | } |
| 157 | 158 | } |
| 158 | 159 | |
| 159 | ||
| 160 | ||
| 160 | 161 | { |
| 162 | "audio", /* clock from the audio CPU */ | |
| 161 | 163 | 0, /* clock (filled in from the CPU 0 clock */ |
| 162 | 164 | 0, /* timer disables */ |
| 163 | 165 | ctc_interrupt, /* interrupt handler */ |
| r3373 | r3374 | |
| 169 | 171 | static TIMER_CALLBACK( cchasm_sh_update ) |
| 170 | 172 | { |
| 171 | 173 | if ((input_port_read(machine, "IN3") & 0x70) != 0x70) |
| 172 | z80ctc_ | |
| 174 | z80ctc_ | |
| 173 | 175 | } |
| 174 | 176 | |
| 175 | 177 | SOUND_START( cchasm ) |
| r3373 | r3374 | |
| 177 | 179 | sound_flags = 0; |
| 178 | 180 | output[0] = 0; output[1] = 0; |
| 179 | 181 | |
| 180 | ctc_intf.baseclock = cpunum_get_clock(1); | |
| 181 | z80ctc_init (0, &ctc_intf); | |
| 182 | ctc = devtag_get_device(machine, Z80CTC, "ctc"); | |
| 182 | 183 | |
| 183 | 184 | timer_pulse(video_screen_get_frame_period(machine->primary_screen), NULL, 0, cchasm_sh_update); |
| 184 | 185 | } |
| r3373 | r3374 | |
|---|---|---|
| 1490 | 1490 | }; |
| 1491 | 1491 | |
| 1492 | 1492 | |
| 1493 | static void ctc_interrupt( | |
| 1493 | static void ctc_interrupt(const device_ | |
| 1494 | 1494 | { |
| 1495 | cpunum_set_input_line(machine, 1, 0, state); | |
| 1495 | cpunum_set_input_line(device->machine, 1, 0, state); | |
| 1496 | 1496 | } |
| 1497 | 1497 | |
| 1498 | 1498 | |
| 1499 | 1499 | static z80ctc_interface demon_z80ctc_interface = |
| 1500 | 1500 | { |
| 1501 | "audio", /* clocked from the audio CPU */ | |
| 1501 | 1502 | 0, /* clock (filled in from the CPU clock) */ |
| 1502 | 1503 | 0, /* timer disables */ |
| 1503 | 1504 | ctc_interrupt, /* interrupt handler */ |
| r3373 | r3374 | |
| 1512 | 1513 | /* generic init */ |
| 1513 | 1514 | generic_init(machine, demon_sound_w); |
| 1514 | 1515 | |
| 1515 | /* initialize the CTC interface */ | |
| 1516 | demon_z80ctc_interface.baseclock = cpunum_get_clock(1); | |
| 1517 | z80ctc_init(0, &demon_z80ctc_interface); | |
| 1518 | ||
| 1519 | 1516 | /* reset the FIFO */ |
| 1520 | 1517 | sound_fifo_in = sound_fifo_out = 0; |
| 1521 | 1518 | last_portb_write = 0xff; |
| r3373 | r3374 | |
| 1543 | 1540 | |
| 1544 | 1541 | static ADDRESS_MAP_START( demon_sound_ports, ADDRESS_SPACE_IO, 8 ) |
| 1545 | 1542 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1546 | AM_RANGE(0x00, 0x03) AM_WRITE(z80ctc_0_w) | |
| 1547 | AM_RANGE(0x1c, 0x1f) AM_WRITE(z80ctc_0_w) | |
| 1543 | AM_RANGE(0x00, 0x03) AM_DEVWRITE(Z80CTC, "ctc", z80ctc_w) | |
| 1544 | AM_RANGE(0x1c, 0x1f) AM_DEVWRITE(Z80CTC, "ctc", z80ctc_w) | |
| 1548 | 1545 | ADDRESS_MAP_END |
| 1549 | 1546 | |
| 1550 | 1547 | |
| 1551 | static const | |
| 1548 | static const | |
| 1552 | 1549 | { |
| 1553 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, | |
| 1554 | { 0,0,0,0,-1 } | |
| 1550 | { Z80CTC, "ctc" }, | |
| 1551 | { NULL } | |
| 1555 | 1552 | }; |
| 1556 | 1553 | |
| 1557 | 1554 | |
| r3373 | r3374 | |
| 1563 | 1560 | MDRV_CPU_PROGRAM_MAP(demon_sound_map,0) |
| 1564 | 1561 | MDRV_CPU_IO_MAP(demon_sound_ports,0) |
| 1565 | 1562 | |
| 1563 | MDRV_Z80CTC_ADD("ctc", demon_z80ctc_interface) | |
| 1564 | ||
| 1566 | 1565 | MDRV_MACHINE_RESET(demon_sound) |
| 1567 | 1566 | |
| 1568 | 1567 | /* sound hardware */ |
| r3373 | r3374 | |
|---|---|---|
| 121 | 121 | * |
| 122 | 122 | *************************************/ |
| 123 | 123 | |
| 124 | WRITE8_HANDLER( zaxxon_sound_a_w ) | |
| 124 | WRITE8_DEVICE_HANDLER( zaxxon_sound_a_w ) | |
| 125 | 125 | { |
| 126 | 126 | UINT8 diff = data ^ sound_state[0]; |
| 127 | 127 | sound_state[0] = data; |
| r3373 | r3374 | |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | |
| 158 | WRITE8_HANDLER( zaxxon_sound_b_w ) | |
| 158 | WRITE8_DEVICE_HANDLER( zaxxon_sound_b_w ) | |
| 159 | 159 | { |
| 160 | 160 | UINT8 diff = data ^ sound_state[1]; |
| 161 | 161 | sound_state[1] = data; |
| r3373 | r3374 | |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | |
| 174 | WRITE8_HANDLER( zaxxon_sound_c_w ) | |
| 174 | WRITE8_DEVICE_HANDLER( zaxxon_sound_c_w ) | |
| 175 | 175 | { |
| 176 | 176 | UINT8 diff = data ^ sound_state[2]; |
| 177 | 177 | sound_state[2] = data; |
| r3373 | r3374 | |
| 227 | 227 | * |
| 228 | 228 | *************************************/ |
| 229 | 229 | |
| 230 | WRITE8_HANDLER( congo_sound_b_w ) | |
| 230 | WRITE8_DEVICE_HANDLER( congo_sound_b_w ) | |
| 231 | 231 | { |
| 232 | 232 | UINT8 diff = data ^ sound_state[1]; |
| 233 | 233 | sound_state[1] = data; |
| r3373 | r3374 | |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | |
| 242 | WRITE8_HANDLER( congo_sound_c_w ) | |
| 242 | WRITE8_DEVICE_HANDLER( congo_sound_c_w ) | |
| 243 | 243 | { |
| 244 | 244 | UINT8 diff = data ^ sound_state[2]; |
| 245 | 245 | sound_state[2] = data; |
| r3373 | r3374 | |
|---|---|---|
| 69 | 69 | * |
| 70 | 70 | *************************************/ |
| 71 | 71 | |
| 72 | WRITE8_HANDLER( turbo_sound_a_w ) | |
| 72 | WRITE8_DEVICE_HANDLER( turbo_sound_a_w ) | |
| 73 | 73 | { |
| 74 | turbo_state *state = machine->driver_data; | |
| 74 | turbo_state *state = device->machine->driver_data; | |
| 75 | 75 | UINT8 diff = data ^ state->sound_state[0]; |
| 76 | 76 | state->sound_state[0] = data; |
| 77 | 77 | |
| r3373 | r3374 | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | |
| 120 | WRITE8_HANDLER( turbo_sound_b_w ) | |
| 120 | WRITE8_DEVICE_HANDLER( turbo_sound_b_w ) | |
| 121 | 121 | { |
| 122 | turbo_state *state = machine->driver_data; | |
| 122 | turbo_state *state = device->machine->driver_data; | |
| 123 | 123 | UINT8 diff = data ^ state->sound_state[1]; |
| 124 | 124 | state->sound_state[1] = data; |
| 125 | 125 | |
| r3373 | r3374 | |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | |
| 142 | WRITE8_HANDLER( turbo_sound_c_w ) | |
| 142 | WRITE8_DEVICE_HANDLER( turbo_sound_c_w ) | |
| 143 | 143 | { |
| 144 | turbo_state *state = machine->driver_data; | |
| 144 | turbo_state *state = device->machine->driver_data; | |
| 145 | 145 | |
| 146 | 146 | /* OSEL1-2 */ |
| 147 | 147 | state->turbo_osel = (state->turbo_osel & 1) | ((data & 3) << 1); |
| r3373 | r3374 | |
| 289 | 289 | * |
| 290 | 290 | *************************************/ |
| 291 | 291 | |
| 292 | WRITE8_HANDLER( subroc3d_sound_a_w ) | |
| 292 | WRITE8_DEVICE_HANDLER( subroc3d_sound_a_w ) | |
| 293 | 293 | { |
| 294 | turbo_state *state = machine->driver_data; | |
| 294 | turbo_state *state = device->machine->driver_data; | |
| 295 | 295 | state->sound_state[0] = data; |
| 296 | 296 | |
| 297 | 297 | /* DIS0-3 contained in bits 0-3 */ |
| r3373 | r3374 | |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | |
| 322 | WRITE8_HANDLER( subroc3d_sound_b_w ) | |
| 322 | WRITE8_DEVICE_HANDLER( subroc3d_sound_b_w ) | |
| 323 | 323 | { |
| 324 | turbo_state *state = machine->driver_data; | |
| 324 | turbo_state *state = device->machine->driver_data; | |
| 325 | 325 | UINT8 diff = data ^ state->sound_state[1]; |
| 326 | 326 | state->sound_state[1] = data; |
| 327 | 327 | |
| r3373 | r3374 | |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | |
| 377 | WRITE8_HANDLER( subroc3d_sound_c_w ) | |
| 377 | WRITE8_DEVICE_HANDLER( subroc3d_sound_c_w ) | |
| 378 | 378 | { |
| 379 | turbo_state *state = machine->driver_data; | |
| 379 | turbo_state *state = device->machine->driver_data; | |
| 380 | 380 | UINT8 diff = data ^ state->sound_state[2]; |
| 381 | 381 | state->sound_state[2] = data; |
| 382 | 382 | |
| r3373 | r3374 | |
| 498 | 498 | } |
| 499 | 499 | |
| 500 | 500 | |
| 501 | WRITE8_HANDLER( buckrog_sound_a_w ) | |
| 501 | WRITE8_DEVICE_HANDLER( buckrog_sound_a_w ) | |
| 502 | 502 | { |
| 503 | turbo_state *state = machine->driver_data; | |
| 503 | turbo_state *state = device->machine->driver_data; | |
| 504 | 504 | UINT8 diff = data ^ state->sound_state[0]; |
| 505 | 505 | state->sound_state[0] = data; |
| 506 | 506 | |
| r3373 | r3374 | |
| 523 | 523 | } |
| 524 | 524 | |
| 525 | 525 | |
| 526 | WRITE8_HANDLER( buckrog_sound_b_w ) | |
| 526 | WRITE8_DEVICE_HANDLER( buckrog_sound_b_w ) | |
| 527 | 527 | { |
| 528 | turbo_state *state = machine->driver_data; | |
| 528 | turbo_state *state = device->machine->driver_data; | |
| 529 | 529 | UINT8 diff = data ^ state->sound_state[1]; |
| 530 | 530 | state->sound_state[1] = data; |
| 531 | 531 |
| r3373 | r3374 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | 2 | #include "deprecat.h" |
| 3 | #include "cpu/z80/z80daisy.h" | |
| 3 | 4 | #include "machine/z80pio.h" |
| 4 | 5 | #include "machine/z80ctc.h" |
| 5 | 6 | #include "sound/samples.h" |
| 6 | 7 | |
| 7 | 8 | |
| 9 | /* single tone generator */ | |
| 10 | #define SINGLE_LENGTH 10000 | |
| 11 | #define SINGLE_DIVIDER 8 | |
| 12 | ||
| 13 | static INT16 *_single; | |
| 14 | static int single_rate = 1000; | |
| 15 | static int single_volume = 0; | |
| 16 | ||
| 17 | ||
| 18 | const z80_daisy_chain senjyo_daisy_chain[] = | |
| 19 | { | |
| 20 | { Z80CTC, "z80ctc" }, | |
| 21 | { Z80PIO, "z80pio" }, | |
| 22 | { NULL } | |
| 23 | }; | |
| 24 | ||
| 25 | ||
| 8 | 26 | /* z80 pio */ |
| 9 | static void | |
| 27 | static void daisy_interrupt(const device_ | |
| 10 | 28 | { |
| 11 | cpu | |
| 29 | cputag_set_input_line(device->machine, "sub", 0, state); | |
| 12 | 30 | } |
| 13 | 31 | |
| 14 | ||
| 32 | ||
| 15 | 33 | { |
| 16 | pio_interrupt, | |
| 17 | 0, | |
| 18 | 0 | |
| 34 | daisy_interrupt, | |
| 35 | NULL, | |
| 36 | NULL, | |
| 37 | NULL, | |
| 38 | NULL, | |
| 39 | NULL, | |
| 40 | NULL | |
| 19 | 41 | }; |
| 20 | 42 | |
| 21 | 43 | /* z80 ctc */ |
| 22 | st | |
| 44 | const | |
| 23 | 45 | { |
| 24 | cpunum_set_input_line(machine, 1, 0, state); | |
| 25 | } | |
| 26 | ||
| 27 | static z80ctc_interface ctc_intf = | |
| 28 | { | |
| 46 | "sub", /* clock from sub CPU */ | |
| 29 | 47 | 0, /* clock (filled in from the CPU 0 clock */ |
| 30 | 48 | NOTIMER_2, /* timer disables */ |
| 31 | ctc_interrupt, /* interrupt handler */ | |
| 32 | z80ctc_0_trg1_w, /* ZC/TO0 callback */ | |
| 49 | daisy_interrupt, /* interrupt handler */ | |
| 50 | z80ctc_trg1_w, /* ZC/TO0 callback */ | |
| 33 | 51 | 0, /* ZC/TO1 callback */ |
| 34 | 52 | 0 /* ZC/TO2 callback */ |
| 35 | 53 | }; |
| 36 | 54 | |
| 37 | 55 | |
| 38 | /* single tone generator */ | |
| 39 | #define SINGLE_LENGTH 10000 | |
| 40 | #define SINGLE_DIVIDER 8 | |
| 41 | ||
| 42 | static INT16 *_single; | |
| 43 | static int single_rate = 1000; | |
| 44 | static int single_volume = 0; | |
| 45 | ||
| 46 | ||
| 47 | 56 | WRITE8_HANDLER( senjyo_volume_w ) |
| 48 | 57 | { |
| 49 | 58 | single_volume = data & 0x0f; |
| r3373 | r3374 | |
| 54 | 63 | static TIMER_CALLBACK( senjyo_sh_update ) |
| 55 | 64 | { |
| 56 | 65 | /* ctc2 timer single tone generator frequency */ |
| 57 | attotime period = z80ctc_getperiod (0, 2); | |
| 66 | attotime period = z80ctc_getperiod (devtag_get_device(machine, Z80CTC, "z80ctc"), 2); | |
| 58 | 67 | if (attotime_compare(period, attotime_zero) != 0 ) |
| 59 | 68 | single_rate = ATTOSECONDS_TO_HZ(period.attoseconds); |
| 60 | 69 | else |
| r3373 | r3374 | |
| 68 | 77 | { |
| 69 | 78 | int i; |
| 70 | 79 | |
| 71 | /* z80 ctc init */ | |
| 72 | ctc_intf.baseclock = cpunum_get_clock(1); | |
| 73 | z80ctc_init (0, &ctc_intf); | |
| 74 | ||
| 75 | /* z80 pio init */ | |
| 76 | z80pio_init (0, &pio_intf); | |
| 77 | ||
| 78 | 80 | _single = (INT16 *)auto_malloc(SINGLE_LENGTH*2); |
| 79 | 81 | |
| 80 | 82 | for (i = 0;i < SINGLE_LENGTH;i++) /* freq = ctc2 zco / 8 */ |
| r3373 | r3374 | |
|---|---|---|
| 342 | 342 | static void *sega005_custom_start(int clock, const custom_sound_interface *config); |
| 343 | 343 | static void sega005_stream_update(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples); |
| 344 | 344 | static TIMER_CALLBACK( sega005_auto_timer ); |
| 345 | static WRITE8_DEVICE_HANDLER( sega005_sound_a_w ); | |
| 346 | static WRITE8_DEVICE_HANDLER( sega005_sound_b_w ); | |
| 345 | 347 | |
| 346 | 348 | /* |
| 347 | 349 | 005 |
| r3373 | r3374 | |
| 438 | 440 | |
| 439 | 441 | MACHINE_DRIVER_START( 005_sound_board ) |
| 440 | 442 | |
| 441 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 442 | MDRV_DEVICE_CONFIG( ppi8255_005_intf ) | |
| 443 | MDRV_PPI8255_ADD( "ppi8255", ppi8255_005_intf ) | |
| 443 | 444 | |
| 444 | 445 | /* sound hardware */ |
| 445 | 446 | MDRV_SOUND_START(005) |
| r3373 | r3374 | |
| 478 | 479 | * |
| 479 | 480 | *************************************/ |
| 480 | 481 | |
| 481 | WRITE8_HANDLER( sega005_sound_a_w ) | |
| 482 | static WRITE8_DEVICE_HANDLER( sega005_sound_a_w ) | |
| 482 | 483 | { |
| 483 | 484 | UINT8 diff = data ^ sound_state[0]; |
| 484 | 485 | sound_state[0] = data; |
| r3373 | r3374 | |
| 534 | 535 | } |
| 535 | 536 | |
| 536 | 537 | |
| 537 | WRITE8_HANDLER( sega005_sound_b_w ) | |
| 538 | static WRITE8_DEVICE_HANDLER( sega005_sound_b_w ) | |
| 538 | 539 | { |
| 539 | 540 | /* |
| 540 | 541 | D6: manual timer clock (0->1) |
| r3373 | r3374 | |
| 565 | 566 | sound_addr = (sound_addr & 0x780) | ((sound_addr + 1) & 0x07f); |
| 566 | 567 | |
| 567 | 568 | /* update the sound data */ |
| 568 | sega005_update_sound_data(machine); | |
| 569 | sega005_update_sound_data(device->machine); | |
| 569 | 570 | } |
| 570 | 571 | |
| 571 | 572 | |
| r3373 | r3374 | |
| 747 | 748 | *************************************/ |
| 748 | 749 | |
| 749 | 750 | static SOUND_START( monsterb ); |
| 750 | static WRITE8_HANDLER( monsterb_sound_a_w ); | |
| 751 | static WRITE8_HANDLER( monsterb_sound_b_w ); | |
| 752 | static READ8_HANDLER( n7751_status_r ); | |
| 753 | static WRITE8_HANDLER( n7751_command_w ); | |
| 751 | static WRITE8_DEVICE_HANDLER( monsterb_sound_a_w ); | |
| 752 | static WRITE8_DEVICE_HANDLER( monsterb_sound_b_w ); | |
| 753 | static READ8_DEVICE_HANDLER( n7751_status_r ); | |
| 754 | static WRITE8_DEVICE_HANDLER( n7751_command_w ); | |
| 754 | 755 | static WRITE8_HANDLER( n7751_rom_offset_w ); |
| 755 | 756 | static WRITE8_HANDLER( n7751_rom_select_w ); |
| 756 | 757 | static READ8_HANDLER( n7751_rom_r ); |
| r3373 | r3374 | |
| 830 | 831 | |
| 831 | 832 | MACHINE_DRIVER_START( monsterb_sound_board ) |
| 832 | 833 | |
| 833 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 834 | MDRV_DEVICE_CONFIG( monsterb_ppi_intf ) | |
| 834 | MDRV_PPI8255_ADD( "ppi8255", monsterb_ppi_intf ) | |
| 835 | 835 | |
| 836 | 836 | /* basic machine hardware */ |
| 837 | 837 | MDRV_CPU_ADD("audio", N7751, 6000000) |
| r3373 | r3374 | |
| 876 | 876 | * |
| 877 | 877 | *************************************/ |
| 878 | 878 | |
| 879 | static WRITE8_HANDLER( monsterb_sound_a_w ) | |
| 879 | static WRITE8_DEVICE_HANDLER( monsterb_sound_a_w ) | |
| 880 | 880 | { |
| 881 | 881 | int enable_val; |
| 882 | 882 | |
| r3373 | r3374 | |
| 884 | 884 | tms36xx_note_w(0, 0, data & 15); |
| 885 | 885 | |
| 886 | 886 | /* Top four data lines address an 82S123 ROM that enables/disables voices */ |
| 887 | enable_val = memory_region(machine, "prom")[(data & 0xF0) >> 4]; | |
| 887 | enable_val = memory_region(device->machine, "prom")[(data & 0xF0) >> 4]; | |
| 888 | 888 | tms3617_enable_w(0, enable_val >> 2); |
| 889 | 889 | } |
| 890 | 890 | |
| r3373 | r3374 | |
| 896 | 896 | * |
| 897 | 897 | *************************************/ |
| 898 | 898 | |
| 899 | static WRITE8_HANDLER( monsterb_sound_b_w ) | |
| 899 | static WRITE8_DEVICE_HANDLER( monsterb_sound_b_w ) | |
| 900 | 900 | { |
| 901 | 901 | UINT8 diff = data ^ sound_state[1]; |
| 902 | 902 | sound_state[1] = data; |
| r3373 | r3374 | |
| 918 | 918 | * |
| 919 | 919 | *************************************/ |
| 920 | 920 | |
| 921 | static READ8_HANDLER( n7751_status_r ) | |
| 921 | static READ8_DEVICE_HANDLER( n7751_status_r ) | |
| 922 | 922 | { |
| 923 | 923 | return n7751_busy << 4; |
| 924 | 924 | } |
| 925 | 925 | |
| 926 | 926 | |
| 927 | static WRITE8_HANDLER( n7751_command_w ) | |
| 927 | static WRITE8_DEVICE_HANDLER( n7751_command_w ) | |
| 928 | 928 | { |
| 929 | 929 | /* |
| 930 | 930 | Z80 7751 control port |
| r3373 | r3374 | |
| 933 | 933 | D3 = /INT line |
| 934 | 934 | */ |
| 935 | 935 | n7751_command = data & 0x07; |
| 936 | cpunum_set_input_line(machine, 1, 0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE); | |
| 936 | cpunum_set_input_line(device->machine, 1, 0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE); | |
| 937 | 937 | cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100)); |
| 938 | 938 | } |
| 939 | 939 |
| r3373 | r3374 | |
|---|---|---|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | |
| 83 | WRITE8_HANDLER( scramble_sh_irqtrigger_w ) | |
| 83 | WRITE8_DEVICE_HANDLER( scramble_sh_irqtrigger_w ) | |
| 84 | 84 | { |
| 85 | 85 | /* the complement of bit 3 is connected to the flip-flop's clock */ |
| 86 | 86 | TTL7474_clock_w(2, ~data & 0x08); |
| r3373 | r3374 | |
| 97 | 97 | TTL7474_update(3); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | WRITE8_HANDLER( mrkougar_sh_irqtrigger_w ) | |
| 100 | WRITE8_DEVICE_HANDLER( mrkougar_sh_irqtrigger_w ) | |
| 101 | 101 | { |
| 102 | 102 | /* the complement of bit 3 is connected to the flip-flop's clock */ |
| 103 | 103 | TTL7474_clock_w(2, ~data & 0x08); |
| r3373 | r3374 | |
|---|---|---|
| 998 | 998 | free( buf ); |
| 999 | 999 | } |
| 1000 | 1000 | |
| 1001 | void samsh5bl_vx_decrypt( running_machine *machine ) | |
| 1002 | { | |
| 1003 | int vx_size = memory_region_length( machine, "ym" ); | |
| 1004 | UINT8 *rom = memory_region( machine, "ym" ); | |
| 1005 | int i; | |
| 1001 | 1006 | |
| 1007 | for( i = 0; i < vx_size; i++ ) | |
| 1008 | rom[ i ] = BITSWAP8( rom[ i ], 0, 1, 5, 4, 3, 2, 6, 7 ); | |
| 1009 | } | |
| 1010 |
| r3373 | r3374 | |
|---|---|---|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | |
| 66 | ||
| 66 | CUSTOM | |
| 67 | 67 | { |
| 68 | 68 | static const UINT8 remap[] = {0x03, 0x02, 0x00, 0x01, 0x21, 0x20, 0x22, 0x23, |
| 69 | 69 | 0x33, 0x32, 0x30, 0x31, 0x11, 0x10, 0x12, 0x13, |
| r3373 | r3374 | |
| 73 | 73 | 0x2b, 0x2a, 0x28, 0x29, 0x09, 0x08, 0x0a, 0x0b, |
| 74 | 74 | 0x0f, 0x0e, 0x0c, 0x0d, 0x2d, 0x2c, 0x2e, 0x2f, |
| 75 | 75 | 0x27, 0x26, 0x24, 0x25, 0x05, 0x04, 0x06, 0x07 }; |
| 76 | UINT8 val; | |
| 76 | UINT8 val = input_port_read(field->port->machine, param); | |
| 77 | 77 | |
| 78 | val = input_port_read(machine, "IN1"); | |
| 79 | ||
| 80 | return ((val & 0x03) | (remap[val >> 2] << 2)); | |
| 78 | return remap[val >> 2]; | |
| 81 | 79 | } |
| 82 | 80 | |
| 83 | 81 | /* state of the security PAL (6J) */ |
| 84 | 82 | static UINT8 xb; |
| 85 | 83 | |
| 86 | static WRITE8_HANDLER( scramble_protection_w ) | |
| 84 | static WRITE8_DEVICE_HANDLER( scramble_protection_w ) | |
| 87 | 85 | { |
| 88 | 86 | xb = data; |
| 89 | 87 | } |
| 90 | 88 | |
| 91 | static READ8_HANDLER( scramble_protection_r ) | |
| 89 | static READ8_DEVICE_HANDLER( scramble_protection_r ) | |
| 92 | 90 | { |
| 93 | 91 | switch (activecpu_get_pc()) |
| 94 | 92 | { |
| r3373 | r3374 | |
| 150 | 148 | cavelon_banksw(); |
| 151 | 149 | |
| 152 | 150 | if ((offset >= 0x0100) && (offset <= 0x0103)) |
| 153 | return ppi8255_r((device_config*)dev | |
| 151 | return ppi8255_r((device_config*)devtag_ge | |
| 154 | 152 | else if ((offset >= 0x0200) && (offset <= 0x0203)) |
| 155 | return ppi8255_r((device_config*)dev | |
| 153 | return ppi8255_r((device_config*)devtag_ge | |
| 156 | 154 | |
| 157 | 155 | return 0xff; |
| 158 | 156 | } |
| r3373 | r3374 | |
| 162 | 160 | cavelon_banksw(); |
| 163 | 161 | |
| 164 | 162 | if ((offset >= 0x0100) && (offset <= 0x0103)) |
| 165 | ppi8255_w( | |
| 163 | ppi8255_w( | |
| 166 | 164 | else if ((offset >= 0x0200) && (offset <= 0x0203)) |
| 167 | ppi8255_w( | |
| 165 | ppi8255_w( | |
| 168 | 166 | } |
| 169 | 167 | |
| 170 | 168 | |
| r3373 | r3374 | |
| 178 | 176 | program_write_byte(0x1000+offset,data); |
| 179 | 177 | } |
| 180 | 178 | |
| 179 | static WRITE8_DEVICE_HANDLER( sound_latch_w ) { soundlatch_w(device->machine, offset, data); } | |
| 181 | 180 | |
| 182 | const ppi8255_interface scramble_ppi_ | |
| 181 | const ppi8255_interface scramble_ppi_0 | |
| 183 | 182 | { |
| 184 | { | |
| 185 | input_port_0_r, /* Port A read */ | |
| 186 | input_port_1_r, /* Port B read */ | |
| 187 | input_port_2_r, /* Port C read */ | |
| 188 | NULL, /* Port A write */ | |
| 189 | NULL, /* Port B write */ | |
| 190 | NULL /* Port C write */ | |
| 191 | }, | |
| 192 | { | |
| 193 | NULL, /* Port A read */ | |
| 194 | NULL, /* Port B read */ | |
| 195 | NULL, /* Port C read */ | |
| 196 | soundlatch_w, /* Port A write */ | |
| 197 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 198 | NULL /* Port C write */ | |
| 199 | } | |
| 183 | DEVICE8_PORT("IN0"), /* Port A read */ | |
| 184 | DEVICE8_PORT("IN1"), /* Port B read */ | |
| 185 | DEVICE8_PORT("IN2"), /* Port C read */ | |
| 186 | NULL, /* Port A write */ | |
| 187 | NULL, /* Port B write */ | |
| 188 | NULL /* Port C write */ | |
| 200 | 189 | }; |
| 201 | 190 | |
| 202 | ||
| 203 | const ppi8255_interface stratgyx_ppi8255_intf[2] = | |
| 191 | const ppi8255_interface scramble_ppi_1_intf = | |
| 204 | 192 | { |
| 205 | { | |
| 206 | input_port_0_r, /* Port A read */ | |
| 207 | input_port_1_r, /* Port B read */ | |
| 208 | input_port_2_r, /* Port C read */ | |
| 209 | NULL, /* Port A write */ | |
| 210 | NULL, /* Port B write */ | |
| 211 | NULL /* Port C write */ | |
| 212 | }, | |
| 213 | { | |
| 214 | NULL, /* Port A read */ | |
| 215 | NULL, /* Port B read */ | |
| 216 | input_port_3_r, /* Port C read */ | |
| 217 | soundlatch_w, /* Port A write */ | |
| 218 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 219 | NULL /* Port C write */ | |
| 220 | } | |
| 193 | NULL, /* Port A read */ | |
| 194 | NULL, /* Port B read */ | |
| 195 | NULL, /* Port C read */ | |
| 196 | sound_latch_w, /* Port A write */ | |
| 197 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 198 | NULL /* Port C write */ | |
| 221 | 199 | }; |
| 222 | 200 | |
| 223 | 201 | |
| 224 | const ppi8255_interface | |
| 202 | const ppi8255_interface stra | |
| 225 | 203 | { |
| 226 | { | |
| 227 | input_port_0_r, /* Port A read */ | |
| 228 | darkplnt_input_port_1_r, /* Port B read */ | |
| 229 | input_port_2_r, /* Port C read */ | |
| 230 | NULL, /* Port A write */ | |
| 231 | NULL, /* Port B write */ | |
| 232 | NULL /* Port C write */ | |
| 233 | }, | |
| 234 | { | |
| 235 | NULL, /* Port A read */ | |
| 236 | NULL, /* Port B read */ | |
| 237 | NULL, /* Port C read */ | |
| 238 | soundlatch_w, /* Port A write */ | |
| 239 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 240 | NULL /* Port C write */ | |
| 241 | } | |
| 204 | NULL, /* Port A read */ | |
| 205 | NULL, /* Port B read */ | |
| 206 | DEVICE8_PORT("IN3"), /* Port C read */ | |
| 207 | sound_latch_w, /* Port A write */ | |
| 208 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 209 | NULL /* Port C write */ | |
| 242 | 210 | }; |
| 243 | 211 | |
| 244 | 212 | |
| 245 | const ppi8255_interface scramble_ppi | |
| 213 | const ppi8255_interface scramble_protection_ppi | |
| 246 | 214 | { |
| 247 | { | |
| 248 | input_port_0_r, /* Port A read */ | |
| 249 | input_port_1_r, /* Port B read */ | |
| 250 | input_port_2_r, /* Port C read */ | |
| 251 | NULL, /* Port A write */ | |
| 252 | NULL, /* Port B write */ | |
| 253 | NULL /* Port C write */ | |
| 254 | }, | |
| 255 | { | |
| 256 | NULL, /* Port A read */ | |
| 257 | NULL, /* Port B read */ | |
| 258 | scramble_protection_r, /* Port C read */ | |
| 259 | soundlatch_w, /* Port A write */ | |
| 260 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 261 | scramble_protection_w /* Port C write */ | |
| 262 | } | |
| 215 | NULL, /* Port A read */ | |
| 216 | NULL, /* Port B read */ | |
| 217 | scramble_protection_r, /* Port C read */ | |
| 218 | sound_latch_w, /* Port A write */ | |
| 219 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 220 | scramble_protection_w /* Port C write */ | |
| 263 | 221 | }; |
| 264 | 222 | |
| 265 | 223 | |
| 266 | const ppi8255_interface | |
| 224 | const ppi8255_interface mrkougar_ppi | |
| 267 | 225 | { |
| 268 | { | |
| 269 | input_port_0_r, /* Port A read */ | |
| 270 | input_port_1_r, /* Port B read */ | |
| 271 | input_port_2_r, /* Port C read */ | |
| 272 | NULL, /* Port A write */ | |
| 273 | NULL, /* Port B write */ | |
| 274 | NULL /* Port C write */ | |
| 275 | }, | |
| 276 | { | |
| 277 | NULL, /* Port A read */ | |
| 278 | NULL, /* Port B read */ | |
| 279 | NULL, /* Port C read */ | |
| 280 | soundlatch_w, /* Port A write */ | |
| 281 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 282 | NULL /* Port C write */ | |
| 283 | } | |
| 226 | NULL, /* Port A read */ | |
| 227 | NULL, /* Port B read */ | |
| 228 | NULL, /* Port C read */ | |
| 229 | sound_latch_w, /* Port A write */ | |
| 230 | mrkougar_sh_irqtrigger_w, /* Port B write */ | |
| 231 | NULL /* Port C write */ | |
| 284 | 232 | }; |
| 285 | 233 | |
| 286 | 234 | |
| 287 | const ppi8255_interface mars_ppi8255_intf[2] = | |
| 288 | { | |
| 289 | { | |
| 290 | input_port_0_r, /* Port A read */ | |
| 291 | input_port_1_r, /* Port B read */ | |
| 292 | input_port_2_r, /* Port C read */ | |
| 293 | NULL, /* Port A write */ | |
| 294 | NULL, /* Port B write */ | |
| 295 | NULL /* Port C write */ | |
| 296 | }, | |
| 297 | { | |
| 298 | NULL, /* Port A read */ | |
| 299 | NULL, /* Port B read */ | |
| 300 | input_port_3_r, /* Port C read */ | |
| 301 | soundlatch_w, /* Port A write */ | |
| 302 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 303 | NULL /* Port C write */ | |
| 304 | } | |
| 305 | }; | |
| 306 | ||
| 307 | ||
| 308 | const ppi8255_interface mrkougar_ppi8255_intf[2] = | |
| 309 | { | |
| 310 | { | |
| 311 | input_port_0_r, /* Port A read */ | |
| 312 | input_port_1_r, /* Port B read */ | |
| 313 | input_port_2_r, /* Port C read */ | |
| 314 | NULL, /* Port A write */ | |
| 315 | NULL, /* Port B write */ | |
| 316 | NULL /* Port C write */ | |
| 317 | }, | |
| 318 | { | |
| 319 | NULL, /* Port A read */ | |
| 320 | NULL, /* Port B read */ | |
| 321 | NULL, /* Port C read */ | |
| 322 | soundlatch_w, /* Port A write */ | |
| 323 | mrkougar_sh_irqtrigger_w, /* Port B write */ | |
| 324 | NULL /* Port C write */ | |
| 325 | } | |
| 326 | }; | |
| 327 | ||
| 328 | ||
| 329 | 235 | DRIVER_INIT( scramble_ppi ) |
| 330 | 236 | { |
| 331 | 237 | } |
| r3373 | r3374 | |
|---|---|---|
| 60 | 60 | |
| 61 | 61 | /************************************* |
| 62 | 62 | |
| 63 | ||
| 63 | Timers | |
| 64 | 64 | |
| 65 | 65 | *************************************/ |
| 66 | 66 | |
| r3373 | r3374 | |
| 278 | 278 | |
| 279 | 279 | /************************************* |
| 280 | 280 | |
| 281 | ||
| 281 | Input Handlers | |
| 282 | 282 | |
| 283 | 283 | *************************************/ |
| 284 | 284 | |
| r3373 | r3374 | |
| 1090 | 1090 | |
| 1091 | 1091 | /************************************* |
| 1092 | 1092 | |
| 1093 | ||
| 1093 | Memory Handlers | |
| 1094 | 1094 | |
| 1095 | 1095 | *************************************/ |
| 1096 | 1096 | |
| 1097 | 1097 | /* |
| 1098 | 1098 | There are at least 4 different kind of boards for SNES carts, which we denote with |
| 1099 | mode_20, mode_21, mode_22 and mode_25. Below is a layout of the memory for each of | |
| 1099 | mode_20, mode_21, mode_22 and mode_25. Below is a layout of the memory for each of | |
| 1100 | 1100 | them, as described on the SNES dev manual. Notice we mirror ROM at loading time |
| 1101 | 1101 | where necessary (e.g. banks 0x80 to 0xff at address 0x8000 for mode_20). |
| 1102 | 1102 | |
| r3373 | r3374 | |
| 1105 | 1105 | address | | | | | | | | |
| 1106 | 1106 | 0xffff ------------------------------------------------------------------------------| |
| 1107 | 1107 | ROM | ROM / | ROM | ROM | ROM / | | 0x00 | 0x40 | |
| 1108 | ||
| 1108 | | DSP | | | SRAM? | | to | to | | |
| 1109 | 1109 | 0x8000 ----------------------------------------------------------| | 0x3f | 0x7f | |
| 1110 | 1110 | Reserv | | | | W | | | |
| 1111 | ||
| 1111 | | | | S | R | m | m | | |
| 1112 | 1112 | 0x6000 ----------------------------| | DSP / | R | A | i | i | |
| 1113 | 1113 | I/O | Reserv | | A | M | r | r | |
| 1114 | 1114 | 0x2000 ----------------------------| | Reserv | M | | r | r | |
| 1115 | Low RAM (from 0x7e) | | | | | o | o | | |
| 1116 | | | | | | r | r | | |
| 1115 | Low RAM (from 0x7e) | | | | | o | o | | |
| 1116 | | | | | | r | r | | |
| 1117 | 1117 | 0x0000 ------------------------------------------------------------------------------- |
| 1118 | 1118 | |
| 1119 | 1119 | MODE_22 is the same, but banks 0x40 to 0x7e at address 0x000 to 0x7fff contain ROM (of |
| 1120 | 1120 | course mirrored also at 0xc0 to 0xff). Mode 22 is quite similar to the board SHVC-2P3B |
| 1121 | 1121 | shown on SNES Dev manual. It is used also in SDD-1 games (only for the first blocks of |
| 1122 | data). DSP data & status can be either at banks 0x20 to 0x40 at address 0x8000 or at | |
| 1122 | data). DSP data & status can be either at banks 0x20 to 0x40 at address 0x8000 or at | |
| 1123 | 1123 | banks 0x60 to 0x6f at address 0x0000. |
| 1124 | 1124 | |
| 1125 | 1125 | |
| r3373 | r3374 | |
| 1128 | 1128 | address | | | | | | | |
| 1129 | 1129 | 0xffff --------------------------------------------------------------------| |
| 1130 | 1130 | mirror | 0xc0 | | mirror | | |
| 1131 | upper half ROM | to | | up half | | | |
| 1132 | from 0xc0 to 0xff | 0xff | | ROM | | | |
| 1131 | upper half ROM | to | | up half | | | |
| 1132 | from 0xc0 to 0xff | 0xff | | ROM | | | |
| 1133 | 1133 | 0x8000 --------------------------------------| | |---------| | |
| 1134 | 1134 | DSP / | Reserv | SRAM | | W | | | |
| 1135 | ||
| 1135 | Reserv | | | m | R | 0x00 | R | | |
| 1136 | 1136 | 0x6000 --------------------------------------| i | A | to | O | |
| 1137 | ||
| 1137 | I/O | r | M | 0x3f | M | | |
| 1138 | 1138 | 0x2000 --------------------------------------| r | | mirror | | |
| 1139 | Low RAM (from 0x7e) | o | | | | | |
| 1140 | | r | | | | | |
| 1139 | Low RAM (from 0x7e) | o | | | | | |
| 1140 | | r | | | | | |
| 1141 | 1141 | 0x0000 --------------------------------------------------------------------- |
| 1142 | 1142 | |
| 1143 | 1143 | |
| r3373 | r3374 | |
| 1147 | 1147 | banks 0x00 0x20 0x3e 0x40 0x7e 0x80 0xb0 0xc0 0xff |
| 1148 | 1148 | address | | | | | | | | |
| 1149 | 1149 | 0xffff ----------------------------------------------------------------------------| |
| 1150 | mirror | Last | | | ROM | | | |
| 1151 | upper half ROM | 0.5Mbits | | | mirror | | | |
| 1152 | from 0x40 to 0x7e | ROM | ROM | | up half | ROM | | |
| 1150 | mirror | Last | | | ROM | | | |
| 1151 | upper half ROM | 0.5Mbits | | | mirror | | | |
| 1152 | from 0x40 to 0x7e | ROM | ROM | | up half | ROM | | |
| 1153 | 1153 | 0x8000 -----------------------------------| | |------------------| | |
| 1154 | 1154 | DSP / | Reserv | next | W | Reserv | SRAM | first | |
| 1155 | ||
| 1155 | Reserv | | | R | | | | | |
| 1156 | 1156 | 0x6000 -----------------------------------| 31 | A |------------------| 32 | |
| 1157 | ||
| 1157 | I/O | Mbits | M | 0x00 | Mbits | | |
| 1158 | 1158 | 0x2000 -----------------------------------| | | to | | |
| 1159 | Low RAM (from 0x7e) | | | 0x3f | | | |
| 1160 | | | | mirror | | | |
| 1159 | Low RAM (from 0x7e) | | | 0x3f | | | |
| 1160 | | | | mirror | | | |
| 1161 | 1161 | 0x0000 ----------------------------------------------------------------------------- |
| 1162 | 1162 | |
| 1163 | 1163 | |
| r3373 | r3374 | |
| 1241 | 1241 | /* 0x600000 - 0x6fffff */ |
| 1242 | 1242 | READ8_HANDLER( snes_r_bank4 ) |
| 1243 | 1243 | { |
| 1244 | UINT8 value = 0 | |
| 1244 | UINT8 value = 0 | |
| 1245 | 1245 | UINT16 address = offset & 0xffff; |
| 1246 | 1246 | |
| 1247 | 1247 | if (snes_cart.mode & 5) /* Mode 20 & 22 */ |
| r3373 | r3374 | |
| 1373 | 1373 | } |
| 1374 | 1374 | else |
| 1375 | 1375 | logerror("Attempt to write to reserved address: %X\n", offset + 0x300000); |
| 1376 | } | |
| 1376 | } | |
| 1377 | 1377 | /* some dsp1 games use these banks 0x30 to 0x3f at address 0x8000 */ |
| 1378 | 1378 | else if ((snes_cart.mode == SNES_MODE_20) && has_dsp1) |
| 1379 | 1379 | DSP1_setDr(data); |
| r3373 | r3374 | |
| 1430 | 1430 | { |
| 1431 | 1431 | if (offset < 0x300000) |
| 1432 | 1432 | snes_w_bank1(machine, offset, data); |
| 1433 | else | |
| 1433 | else | |
| 1434 | 1434 | snes_w_bank2(machine, offset - 0x300000, data); |
| 1435 | 1435 | } |
| 1436 | 1436 | else /* Mode 25 has SRAM not mirrored from lower banks */ |
| r3373 | r3374 | |
| 1439 | 1439 | { |
| 1440 | 1440 | if (offset < 0x300000) |
| 1441 | 1441 | snes_w_bank1(machine, offset, data); |
| 1442 | else | |
| 1442 | else | |
| 1443 | 1443 | snes_w_bank2(machine, offset - 0x300000, data); |
| 1444 | 1444 | } |
| 1445 | 1445 | else if ((offset >= 0x300000) && (snes_cart.sram > 0)) |
| r3373 | r3374 | |
| 1449 | 1449 | snes_ram[0xb06000 + (offset & mask)] = data; |
| 1450 | 1450 | } |
| 1451 | 1451 | else /* Area in 0x6000-0x8000 && offset < 0x300000 is Reserved! */ |
| 1452 | logerror("Attempt to write to reserved address: %X\n", offset + 0x800000); | |
| 1452 | logerror("Attempt to write to reserved address: %X\n", offset + 0x800000); | |
| 1453 | 1453 | } |
| 1454 | 1454 | } |
| 1455 | 1455 | else |
| r3373 | r3374 | |
| 1483 | 1483 | |
| 1484 | 1484 | /************************************* |
| 1485 | 1485 | |
| 1486 | ||
| 1486 | Driver Init | |
| 1487 | 1487 | |
| 1488 | 1488 | *************************************/ |
| 1489 | 1489 | |
| r3373 | r3374 | |
| 1643 | 1643 | total_blocks = (memory_region_length(machine, "user3") / 0x8000); |
| 1644 | 1644 | read_blocks = 0; |
| 1645 | 1645 | |
| 1646 | /* Loading all the data blocks from cart, we only partially cover banks 0x00 to 0x7f. Therefore, we | |
| 1647 | * have to mirror the blocks until we reach the end. E.g. for a 11Mbits image (44 blocks), we proceed | |
| 1648 | * as follows: | |
| 1649 | * 11 Mbits = 8 Mbits (blocks 1->32) + 2 Mbits (blocks 33->40) + 1 Mbit (blocks 41->44). | |
| 1650 | * Hence, we fill memory up to 16 Mbits (banks 0x00 to 0x3f) mirroring the final part: | |
| 1651 | * 8 Mbits (blocks 1->32) + 2 Mbits (blocks 33->40) + 1 Mbit (blocks 41->44) + 1 Mbit (blocks 41->44) | |
| 1652 | * + 2 Mbits (blocks 33->40) + 1 Mbit (blocks 41->44) + 1 Mbit (blocks 41->44). | |
| 1653 | * And we repeat the same blocks in the second half of the banks (banks 0x40 to 0x7f). | |
| 1654 | * This is likely what happens in the real SNES as well, because the unit cannot be aware of the exact | |
| 1655 | * size of data in the cart (procedure confirmed by byuu) | |
| 1656 | */ | |
| 1646 | /* Loading all the data blocks from cart, we only partially cover banks 0x00 to 0x7f. Therefore, we | |
| 1647 | * have to mirror the blocks until we reach the end. E.g. for a 11Mbits image (44 blocks), we proceed | |
| 1648 | * as follows: | |
| 1649 | * 11 Mbits = 8 Mbits (blocks 1->32) + 2 Mbits (blocks 33->40) + 1 Mbit (blocks 41->44). | |
| 1650 | * Hence, we fill memory up to 16 Mbits (banks 0x00 to 0x3f) mirroring the final part: | |
| 1651 | * 8 Mbits (blocks 1->32) + 2 Mbits (blocks 33->40) + 1 Mbit (blocks 41->44) + 1 Mbit (blocks 41->44) | |
| 1652 | * + 2 Mbits (blocks 33->40) + 1 Mbit (blocks 41->44) + 1 Mbit (blocks 41->44). | |
| 1653 | * And we repeat the same blocks in the second half of the banks (banks 0x40 to 0x7f). | |
| 1654 | * This is likely what happens in the real SNES as well, because the unit cannot be aware of the exact | |
| 1655 | * size of data in the cart (procedure confirmed by byuu) | |
| 1656 | */ | |
| 1657 | 1657 | |
| 1658 | /* LoROM carts load data in banks 0x00 to 0x7f at address 0x8000 (actually up to 0x7d, because 0x7e and | |
| 1659 | * 0x7f are overwritten by WRAM). Each block is also mirrored in banks 0x80 to 0xff (up to 0xff for real) | |
| 1660 | */ | |
| 1658 | /* LoROM carts load data in banks 0x00 to 0x7f at address 0x8000 (actually up to 0x7d, because 0x7e and | |
| 1659 | * 0x7f are overwritten by WRAM). Each block is also mirrored in banks 0x80 to 0xff (up to 0xff for real) | |
| 1660 | */ | |
| 1661 | 1661 | while (read_blocks < 128 && read_blocks < total_blocks) |
| 1662 | 1662 | { |
| 1663 | 1663 | /* Loading data */ |
| r3373 | r3374 | |
| 1708 | 1708 | |
| 1709 | 1709 | /* See above for details about the way we fill banks 0x00 to 0x7f */ |
| 1710 | 1710 | |
| 1711 | /* HiROM carts load data in banks 0xc0 to 0xff. Each bank is fully mirrored in banks 0x40 to 0x7f | |
| 1712 | * (actually up to 0x7d, because 0x7e and 0x7f are overwritten by WRAM). The top half (address | |
| 1713 | * range 0x8000 - 0xffff) of each bank is also mirrored in banks 0x00 to 0x3f and 0x80 to 0xbf. | |
| 1714 | */ | |
| 1711 | /* HiROM carts load data in banks 0xc0 to 0xff. Each bank is fully mirrored in banks 0x40 to 0x7f | |
| 1712 | * (actually up to 0x7d, because 0x7e and 0x7f are overwritten by WRAM). The top half (address | |
| 1713 | * range 0x8000 - 0xffff) of each bank is also mirrored in banks 0x00 to 0x3f and 0x80 to 0xbf. | |
| 1714 | */ | |
| 1715 | 1715 | while (read_blocks < 64 && read_blocks < total_blocks) |
| 1716 | 1716 | { |
| 1717 | 1717 | /* Loading data */ |
| r3373 | r3374 | |
| 1750 | 1750 | |
| 1751 | 1751 | /************************************* |
| 1752 | 1752 | |
| 1753 | ||
| 1753 | HDMA | |
| 1754 | 1754 | |
| 1755 | 1755 | *************************************/ |
| 1756 | 1756 |
| r3373 | r3374 | |
|---|---|---|
| 1246 | 1246 | } |
| 1247 | 1247 | |
| 1248 | 1248 | |
| 1249 | void kof2003h_decrypt_68k(running_machine *machine) | |
| 1250 | { | |
| 1251 | static const UINT8 xor1[0x20] = { 0xc2, 0x4b, 0x74, 0xfd, 0x0b, 0x34, 0xeb, 0xd7, 0x10, 0x6d, 0xf9, 0xce, 0x5d, 0xd5, 0x61, 0x29, 0xf5, 0xbe, 0x0d, 0x82, 0x72, 0x45, 0x0f, 0x24, 0xb3, 0x34, 0x1b, 0x99, 0xea, 0x09, 0xf3, 0x03 }; | |
| 1252 | static const UINT8 xor2[0x20] = { 0x2b, 0x09, 0xd0, 0x7f, 0x51, 0x0b, 0x10, 0x4c, 0x5b, 0x07, 0x70, 0x9d, 0x3e, 0x0b, 0xb0, 0xb6, 0x54, 0x09, 0xe0, 0xcc, 0x3d, 0x0d, 0x80, 0x99, 0x87, 0x03, 0x90, 0x82, 0xfe, 0x04, 0x20, 0x18 }; | |
| 1253 | int i; | |
| 1254 | int ofst; | |
| 1255 | int rom_size = 0x900000; | |
| 1256 | UINT8 *rom = memory_region( machine, "main" ); | |
| 1257 | UINT8 *buf = malloc_or_die( rom_size ); | |
| 1258 | ||
| 1259 | for (i = 0; i < 0x100000; i++) | |
| 1260 | { | |
| 1261 | rom[ 0x800000 + i ] ^= rom[ 0x100002 | BYTE_XOR_LE(i) ]; | |
| 1262 | } | |
| 1263 | for( i = 0; i < 0x100000; i++) | |
| 1264 | { | |
| 1265 | rom[ i ] ^= xor1[ (BYTE_XOR_LE(i) % 0x20) ]; | |
| 1266 | } | |
| 1267 | for( i = 0x100000; i < 0x800000; i++) | |
| 1268 | { | |
| 1269 | rom[ i ] ^= xor2[ (BYTE_XOR_LE(i) % 0x20) ]; | |
| 1270 | } | |
| 1271 | for( i = 0x100000; i < 0x800000; i += 4) | |
| 1272 | { | |
| 1273 | UINT16 rom16; | |
| 1274 | rom16 = rom[BYTE_XOR_LE(i+1)] | rom[BYTE_XOR_LE(i+2)]<<8; | |
| 1275 | rom16 = BITSWAP16( rom16, 15, 14, 13, 12, 10, 11, 8, 9, 6, 7, 4, 5, 3, 2, 1, 0 ); | |
| 1276 | rom[BYTE_XOR_LE(i+1)] = rom16&0xff; | |
| 1277 | rom[BYTE_XOR_LE(i+2)] = rom16>>8; | |
| 1278 | } | |
| 1279 | for( i = 0; i < 0x0100000 / 0x10000; i++ ) | |
| 1280 | { | |
| 1281 | ofst = (i & 0xf0) + BITSWAP8((i & 0x0f), 7, 6, 5, 4, 1, 0, 3, 2); | |
| 1282 | memcpy( &buf[ i * 0x10000 ], &rom[ ofst * 0x10000 ], 0x10000 ); | |
| 1283 | } | |
| 1284 | for( i = 0x100000; i < 0x900000; i += 0x100) | |
| 1285 | { | |
| 1286 | ofst = (i & 0xf000ff) + ((i & 0x000f00) ^ 0x00400) + (BITSWAP8( ((i & 0x0ff000) >> 12), 6, 7, 4, 5, 0, 1, 2, 3 ) << 12); | |
| 1287 | memcpy( &buf[ i ], &rom[ ofst ], 0x100 ); | |
| 1288 | } | |
| 1289 | memcpy (&rom[0x000000], &buf[0x000000], 0x100000); | |
| 1290 | memcpy (&rom[0x100000], &buf[0x800000], 0x100000); | |
| 1291 | memcpy (&rom[0x200000], &buf[0x100000], 0x700000); | |
| 1292 | free( buf ); | |
| 1293 | } | |
| 1294 | ||
| 1295 | ||
| 1249 | 1296 | void kof2003biosdecode(running_machine *machine) |
| 1250 | 1297 | { |
| 1251 | 1298 | static const UINT8 address[0x80]={ |
| r3373 | r3374 | |
| 1405 | 1452 | }; |
| 1406 | 1453 | |
| 1407 | 1454 | |
| 1408 | int m1_address_scramble_inv(int address, UINT16 key) | |
| 1409 | { | |
| 1410 | int block; | |
| 1411 | int aux; | |
| 1412 | ||
| 1413 | const int p1[8][16] = { | |
| 1414 | {8,4,5,6,15,14,12,3,7,13,2,10,9,11,1,0}, | |
| 1415 | {13,1,6,7,10,8,14,0,2,5,12,3,15,9,11,4}, | |
| 1416 | {9,7,10,3,8,11,1,5,0,15,4,13,14,12,2,6}, | |
| 1417 | {10,12,0,4,5,15,9,7,1,3,11,6,13,8,14,2}, | |
| 1418 | {14,0,13,5,9,12,2,10,6,8,7,15,11,1,4,3}, | |
| 1419 | {5,11,7,2,3,13,8,4,12,6,14,0,10,15,9,1}, | |
| 1420 | {11,6,15,10,14,1,4,13,3,9,0,8,12,2,7,5}, | |
| 1421 | {3,14,4,1,6,10,15,2,11,0,9,7,5,13,8,12}, | |
| 1422 | }; | |
| 1423 | ||
| 1424 | block = (address>>16)&7; | |
| 1425 | aux = address&0xffff; | |
| 1426 | ||
| 1427 | aux = BITSWAP16(aux, 14,13,10,9,7,5,3,1,15,12,11,8,6,4,2,0); | |
| 1428 | aux ^= m1_address_8_15_xor[aux&0xff]<<8; | |
| 1429 | aux ^= m1_address_0_7_xor[(aux>>8)&0xff]; | |
| 1430 | aux = BITSWAP16(aux, | |
| 1431 | p1[block][15],p1[block][14],p1[block][13],p1[block][12], | |
| 1432 | p1[block][11],p1[block][10],p1[block][9],p1[block][8], | |
| 1433 | p1[block][7],p1[block][6],p1[block][5],p1[block][4], | |
| 1434 | p1[block][3],p1[block][2],p1[block][1],p1[block][0]); | |
| 1435 | aux ^= key; | |
| 1436 | ||
| 1437 | return (block<<16)|aux; | |
| 1438 | } | |
| 1439 | ||
| 1440 | ||
| 1441 | 1455 | /* The CMC50 hardware does a checksum of the first 64kb of the M1 rom, |
| 1442 | 1456 | ,and uses this checksum as the basis of the key with which to decrypt |
| 1443 | 1457 | the rom */ |
| r3373 | r3374 | |
|---|---|---|
| 72 | 72 | static emu_timer *ipu_watchdog_timer; |
| 73 | 73 | |
| 74 | 74 | |
| 75 | ||
| 76 | 75 | /************************************* |
| 77 | 76 | * |
| 78 | 77 | * Function prototypes |
| r3373 | r3374 | |
| 92 | 91 | static void reload_count(int counter); |
| 93 | 92 | static TIMER_CALLBACK( counter_fired_callback ); |
| 94 | 93 | static TIMER_CALLBACK( ipu_watchdog_reset ); |
| 95 | static WRITE8_HANDLER( ipu_break_changed ); | |
| 94 | static WRITE8_DEVICE_HANDLER( ipu_break_changed ); | |
| 96 | 95 | |
| 97 | 96 | |
| 98 | 97 | |
| r3373 | r3374 | |
| 188 | 187 | * |
| 189 | 188 | *************************************/ |
| 190 | 189 | |
| 191 | static void ctc_interrupt( | |
| 190 | static void ctc_interrupt(const device_ | |
| 192 | 191 | { |
| 193 | cpu | |
| 192 | cputag_set_input_line(device->machine, "main", 0, state); | |
| 194 | 193 | } |
| 195 | 194 | |
| 196 | 195 | |
| 197 | static void ipu_ctc_interrupt( | |
| 196 | static void ipu_ctc_interrupt(const device_ | |
| 198 | 197 | { |
| 199 | cpu | |
| 198 | cputag_set_input_line(device->machine, "ipu", 0, state); | |
| 200 | 199 | } |
| 201 | 200 | |
| 202 | 201 | |
| 203 | const | |
| 202 | const | |
| 204 | 203 | { |
| 205 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */ | |
| 206 | { 0, 0, 0, 0, -1 } /* end mark */ | |
| 204 | { Z80CTC, "ctc" }, | |
| 205 | { NULL } | |
| 207 | 206 | }; |
| 208 | 207 | |
| 209 | 208 | |
| 210 | const | |
| 209 | const | |
| 211 | 210 | { |
| 212 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 1 }, /* CTC number 1 */ | |
| 213 | { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti, 1 }, /* PIO number 1 */ | |
| 214 | { z80sio_reset, z80sio_irq_state, z80sio_irq_ack, z80sio_irq_reti, 0 }, /* SIO number 0 */ | |
| 215 | { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti, 0 }, /* PIO number 0 */ | |
| 216 | { 0, 0, 0, 0, -1 } /* end mark */ | |
| 211 | { Z80CTC, "ipu_ctc" }, | |
| 212 | { Z80PIO, "ipu_pio1" }, | |
| 213 | { Z80SIO, "ipu_sio" }, | |
| 214 | { Z80PIO, "ipu_pio0" }, | |
| 215 | { NULL } | |
| 217 | 216 | }; |
| 218 | 217 | |
| 219 | 218 | |
| 220 | st | |
| 219 | const | |
| 221 | 220 | { |
| 221 | "main", /* clock from the main CPU */ | |
| 222 | 222 | 0, /* clock (filled in from the CPU 0 clock) */ |
| 223 | 223 | 0, /* timer disables */ |
| 224 | 224 | ctc_interrupt, /* interrupt handler */ |
| 225 | z80ctc_ | |
| 225 | z80ctc_ | |
| 226 | 226 | 0, /* ZC/TO1 callback */ |
| 227 | 227 | 0 /* ZC/TO2 callback */ |
| 228 | 228 | }; |
| 229 | 229 | |
| 230 | 230 | |
| 231 | st | |
| 231 | const | |
| 232 | 232 | { |
| 233 | "ipu", /* clock from the IPU cpu */ | |
| 233 | 234 | 0, /* clock (filled in from the CPU 3 clock) */ |
| 234 | 235 | 0, /* timer disables */ |
| 235 | 236 | ipu_ctc_interrupt, /* interrupt handler */ |
| r3373 | r3374 | |
| 239 | 240 | }; |
| 240 | 241 | |
| 241 | 242 | |
| 242 | ||
| 243 | ||
| 243 | 244 | { |
| 244 | 245 | ipu_ctc_interrupt, |
| 245 | 0, | |
| 246 | 0 | |
| 246 | NULL, | |
| 247 | NULL, | |
| 248 | NULL, | |
| 249 | NULL, | |
| 250 | NULL, | |
| 251 | NULL | |
| 247 | 252 | }; |
| 248 | 253 | |
| 249 | 254 | |
| 250 | st | |
| 255 | const | |
| 251 | 256 | { |
| 257 | "ipu", /* clock from the IPU cpu */ | |
| 252 | 258 | 0, /* clock (filled in from the CPU 3 clock) */ |
| 253 | 259 | ipu_ctc_interrupt, /* interrupt handler */ |
| 254 | 260 | 0, /* DTR changed handler */ |
| r3373 | r3374 | |
| 267 | 273 | |
| 268 | 274 | MACHINE_START( mcr ) |
| 269 | 275 | { |
| 270 | /* initialize the CTC */ | |
| 271 | ctc_intf.baseclock = cpunum_get_clock(0); | |
| 272 | z80ctc_init(0, &ctc_intf); | |
| 273 | ||
| 274 | 276 | state_save_register_global(mcr_cocktail_flip); |
| 275 | 277 | } |
| 276 | 278 | |
| 277 | 279 | |
| 278 | 280 | MACHINE_START( nflfoot ) |
| 279 | 281 | { |
| 280 | /* initialize the CTC */ | |
| 281 | ctc_intf.baseclock = cpunum_get_clock(0); | |
| 282 | z80ctc_init(0, &ctc_intf); | |
| 283 | ||
| 284 | nflfoot_ctc_intf.baseclock = cpunum_get_clock(3); | |
| 285 | z80ctc_init(1, &nflfoot_ctc_intf); | |
| 286 | ||
| 287 | z80pio_init(0, &nflfoot_pio_intf); | |
| 288 | z80pio_init(1, &nflfoot_pio_intf); | |
| 289 | ||
| 290 | nflfoot_sio_intf.baseclock = cpunum_get_clock(3); | |
| 291 | z80sio_init(0, &nflfoot_sio_intf); | |
| 292 | ||
| 293 | 282 | /* allocate a timer for the IPU watchdog */ |
| 294 | 283 | ipu_watchdog_timer = timer_alloc(ipu_watchdog_reset, NULL); |
| 295 | 284 | } |
| r3373 | r3374 | |
| 422 | 411 | |
| 423 | 412 | INTERRUPT_GEN( mcr_interrupt ) |
| 424 | 413 | { |
| 414 | const device_config *ctc = devtag_get_device(machine, Z80CTC, "ctc"); | |
| 415 | ||
| 425 | 416 | /* CTC line 2 is connected to VBLANK, which is once every 1/2 frame */ |
| 426 | 417 | /* for the 30Hz interlaced display */ |
| 427 | z80ctc_0_trg2_w(machine, 0, 1); | |
| 428 | z80ctc_0_trg2_w(machine, 0, 0); | |
| 418 | z80ctc_trg2_w(ctc, 0, 1); | |
| 419 | z80ctc_trg2_w(ctc, 0, 0); | |
| 429 | 420 | |
| 430 | 421 | /* CTC line 3 is connected to 493, which is signalled once every */ |
| 431 | 422 | /* frame at 30Hz */ |
| 432 | 423 | if (cpu_getiloops() == 0) |
| 433 | 424 | { |
| 434 | z80ctc_0_trg3_w(machine, 0, 1); | |
| 435 | z80ctc_0_trg3_w(machine, 0, 0); | |
| 425 | z80ctc_trg3_w(ctc, 0, 1); | |
| 426 | z80ctc_trg3_w(ctc, 0, 0); | |
| 436 | 427 | } |
| 437 | 428 | } |
| 438 | 429 | |
| 439 | 430 | |
| 440 | 431 | INTERRUPT_GEN( mcr_ipu_interrupt ) |
| 441 | 432 | { |
| 433 | const device_config *ctc = devtag_get_device(machine, Z80CTC, "ipu_ctc"); | |
| 434 | ||
| 442 | 435 | /* CTC line 3 is connected to 493, which is signalled once every */ |
| 443 | 436 | /* frame at 30Hz */ |
| 444 | 437 | if (cpu_getiloops() == 0) |
| 445 | 438 | { |
| 446 | z80ctc_1_trg3_w(machine, 0, 1); | |
| 447 | z80ctc_1_trg3_w(machine, 0, 0); | |
| 439 | z80ctc_trg3_w(ctc, 0, 1); | |
| 440 | z80ctc_trg3_w(ctc, 0, 0); | |
| 448 | 441 | } |
| 449 | 442 | } |
| 450 | 443 | |
| r3373 | r3374 | |
| 922 | 915 | * |
| 923 | 916 | *************************************/ |
| 924 | 917 | |
| 925 | static WRITE8_HANDLER( ipu_break_changed ) | |
| 918 | static WRITE8_DEVICE_HANDLER( ipu_break_changed ) | |
| 926 | 919 | { |
| 927 | 920 | /* channel B is connected to the CED player */ |
| 928 | 921 | if (offset == 1) |
| 929 | 922 | { |
| 930 | 923 | logerror("DTR changed -> %d\n", data); |
| 931 | 924 | if (data == 1) |
| 932 | z80sio_receive_data( | |
| 925 | z80sio_receive_data(device, 1, 0); | |
| 933 | 926 | } |
| 934 | 927 | } |
| 935 | 928 | |
| 936 | 929 | |
| 937 | READ8_HANDLER( mcr_ipu_ | |
| 930 | READ8_DEVICE_HANDLER( mcr_ipu_sio | |
| 938 | 931 | { |
| 939 | return (offset & 2) ? z80 | |
| 932 | return (offset & 2) ? z80sio_c_r(device, offset & 1) : z80sio_d_r(dev | |
| 940 | 933 | } |
| 941 | 934 | |
| 942 | 935 | |
| 943 | RE | |
| 936 | WRITE | |
| 944 | 937 | { |
| 945 | return (offset & 2) ? z80pio_c_r(1, offset & 1) : z80pio_d_r(machine, 1, offset & 1); | |
| 946 | } | |
| 947 | ||
| 948 | ||
| 949 | READ8_HANDLER( mcr_ipu_sio_r ) | |
| 950 | { | |
| 951 | return (offset & 2) ? z80sio_c_r(0, offset & 1) : z80sio_d_r(machine, 0, offset & 1); | |
| 952 | } | |
| 953 | ||
| 954 | ||
| 955 | WRITE8_HANDLER( mcr_ipu_pio_0_w ) | |
| 956 | { | |
| 957 | 938 | if (offset & 2) |
| 958 | z80 | |
| 939 | z80sio_c_w(dev | |
| 959 | 940 | else |
| 960 | z80 | |
| 941 | z80sio_d_w(dev | |
| 961 | 942 | } |
| 962 | 943 | |
| 963 | 944 | |
| 964 | WRITE8_HANDLER( mcr_ipu_pio_1_w ) | |
| 965 | { | |
| 966 | if (offset & 2) | |
| 967 | z80pio_c_w(machine, 1, offset & 1, data); | |
| 968 | else | |
| 969 | z80pio_d_w(machine, 1, offset & 1, data); | |
| 970 | } | |
| 971 | ||
| 972 | ||
| 973 | WRITE8_HANDLER( mcr_ipu_sio_w ) | |
| 974 | { | |
| 975 | if (offset & 2) | |
| 976 | z80sio_c_w(machine, 0, offset & 1, data); | |
| 977 | else | |
| 978 | z80sio_d_w(machine, 0, offset & 1, data); | |
| 979 | } | |
| 980 | ||
| 981 | ||
| 982 | 945 | WRITE8_HANDLER( mcr_ipu_laserdisk_w ) |
| 983 | 946 | { |
| 984 | 947 | /* bit 3 enables (1) LD video regardless of PIX SW */ |
| r3373 | r3374 | |
| 993 | 956 | static TIMER_CALLBACK( ipu_watchdog_reset ) |
| 994 | 957 | { |
| 995 | 958 | logerror("ipu_watchdog_reset\n"); |
| 996 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, PULSE_LINE); | |
| 997 | z80ctc_reset(1); | |
| 998 | z80pio_reset(0); | |
| 999 | z80pio_reset(1); | |
| 1000 | z80sio_reset(0); | |
| 959 | cputag_set_input_line(machine, "ipu", INPUT_LINE_RESET, PULSE_LINE); | |
| 960 | devtag_reset(machine, Z80CTC, "ipu_ctc"); | |
| 961 | devtag_reset(machine, Z80PIO, "ipu_pio0"); | |
| 962 | devtag_reset(machine, Z80PIO, "ipu_pio1"); | |
| 963 | devtag_reset(machine, Z80SIO, "ipu_sio"); | |
| 1001 | 964 | } |
| 1002 | 965 | |
| 1003 | 966 |
| r3373 | r3374 | |
|---|---|---|
| 888 | 888 | { "batcira", { 0x1e5d80cb,0x98882ec7 }, 0x200000 }, // 0C81 0097 0131 cmpi.l #$00970131,D1 |
| 889 | 889 | { "batcirj", { 0x00ff4dd8,0x000008e8 }, 0x200000 }, // 0C81 0097 0131 cmpi.l #$00970131,D1 |
| 890 | 890 | { "csclub", { 0x662e9fa0,0x4210e7c1 }, 0x200000 }, // 0C81 0097 0310 cmpi.l #$00970310,D1 |
| 891 | { "csclub1", { 0x662e9fa0,0x4210e7c1 }, 0x200000 }, // 0C81 0097 0310 cmpi.l #$00970310,D1 | |
| 891 | 892 | { "cscluba", { 0x1366de2a,0x9ab42937 }, 0x200000 }, // 0C81 0097 0310 cmpi.l #$00970310,D1 |
| 892 | 893 | { "csclubj", { 0x4a2d0be5,0x56c013c0 }, 0x200000 }, // 0C81 0097 0310 cmpi.l #$00970310,D1 |
| 893 | 894 | { "csclubh", { 0xf014a8a7,0x2e7794d0 }, 0x200000 }, // 0C81 0097 0310 cmpi.l #$00970310,D1 |
| r3373 | r3374 | |
|---|---|---|
| 869 | 869 | DRIVER( finfrl2j ) /* (c) 1999 */ |
| 870 | 870 | |
| 871 | 871 | /* Misc Namco games */ |
| 872 | DRIVER( 20pacgal ) /* (c) 2000 */ | |
| 872 | DRIVER( 20pacgal ) /* (c) 2000 Ver 1.04 */ | |
| 873 | DRIVER( 20pacgaa ) /* (c) 2000 Ver 1.01 */ | |
| 873 | 874 | |
| 874 | 875 | /* Universal games */ |
| 875 | 876 | DRIVER( cosmicg ) /* 7907 (c) 1979 */ |
| r3373 | r3374 | |
| 2681 | 2682 | DRIVER( mshvsfa1 ) /* 20/06/1997 (c) 1997 (Asia) */ |
| 2682 | 2683 | DRIVER( mshvsfb ) /* 27/08/1997 (c) 1997 (Brazil) */ |
| 2683 | 2684 | DRIVER( mshvsfb1 ) /* 25/06/1997 (c) 1997 (Brazil) */ |
| 2684 | DRIVER( csclub ) /* 22/07/1997 (c) 1997 (Euro) */ | |
| 2685 | DRIVER( csclub ) /* 17/10/1997 (c) 1997 (Euro) */ | |
| 2686 | DRIVER( csclub1 ) /* 22/07/1997 (c) 1997 (Euro) */ | |
| 2685 | 2687 | DRIVER( csclubj ) /* 22/07/1997 (c) 1997 (Japan) */ |
| 2686 | 2688 | DRIVER( cscluba ) /* 22/07/1997 (c) 1997 (Asia) */ |
| 2687 | 2689 | DRIVER( csclubh ) /* 22/07/1997 (c) 1997 (Hispanic) */ |
| r3373 | r3374 | |
| 5668 | 5670 | DRIVER( pbobblen ) /* 0083 (c) 1994 Taito */ |
| 5669 | 5671 | DRIVER( pbobblna ) /* 0083 (c) 1994 Taito */ |
| 5670 | 5672 | DRIVER( kof95 ) /* 0084 (c) 1995 SNK */ |
| 5671 | DRIVER( kof95 | |
| 5673 | DRIVER( kof95h ) /* 0084 (c) 1995 SNK */ | |
| 5672 | 5674 | /* 0085 Shinsetsu Samurai Spirits Bushidoretsuden / Samurai Shodown RPG (CD only) */ |
| 5673 | 5675 | DRIVER( tws96 ) /* 0086 (c) 1996 Tecmo */ |
| 5674 | 5676 | DRIVER( samsho3 ) /* 0087 (c) 1995 SNK */ |
| 5675 | DRIVER( samsho3 | |
| 5677 | DRIVER( samsho3h ) /* 0087 (c) 1995 SNK */ | |
| 5676 | 5678 | DRIVER( fswords ) /* Korean hack of samsho3 */ |
| 5677 | 5679 | DRIVER( stakwin ) /* 0088 (c) 1995 Saurus */ |
| 5678 | 5680 | DRIVER( pulstar ) /* 0089 (c) 1995 Aicom */ |
| r3373 | r3374 | |
| 5810 | 5812 | DRIVER( samsho5b ) /* bootleg */ |
| 5811 | 5813 | DRIVER( kf2k3pcb ) /* 0271 (c) 2003 Playmore - JAMMA PCB */ |
| 5812 | 5814 | DRIVER( kof2003 ) /* 0271 (c) 2003 Playmore */ |
| 5815 | DRIVER( kof2003h ) /* 0271 (c) 2003 Playmore */ | |
| 5813 | 5816 | DRIVER( kf2k3bl ) /* bootleg */ |
| 5814 | 5817 | DRIVER( kf2k3bla ) /* bootleg */ |
| 5815 | 5818 | DRIVER( kf2k3pl ) /* bootleg */ |
| r3373 | r3374 | |
|---|---|---|
| 71 | 71 | MACHINE_DRIVER_EXTERN( subroc3d_samples ); |
| 72 | 72 | MACHINE_DRIVER_EXTERN( buckrog_samples ); |
| 73 | 73 | |
| 74 | WRITE8_HANDLER( turbo_sound_a_w ); | |
| 75 | WRITE8_HANDLER( turbo_sound_b_w ); | |
| 76 | WRITE8_HANDLER( turbo_sound_c_w ); | |
| 74 | WRITE8_DEVICE_HANDLER( turbo_sound_a_w ); | |
| 75 | WRITE8_DEVICE_HANDLER( turbo_sound_b_w ); | |
| 76 | WRITE8_DEVICE_HANDLER( turbo_sound_c_w ); | |
| 77 | 77 | |
| 78 | WRITE8_HANDLER( subroc3d_sound_a_w ); | |
| 79 | WRITE8_HANDLER( subroc3d_sound_b_w ); | |
| 80 | WRITE8_HANDLER( subroc3d_sound_c_w ); | |
| 78 | WRITE8_DEVICE_HANDLER( subroc3d_sound_a_w ); | |
| 79 | WRITE8_DEVICE_HANDLER( subroc3d_sound_b_w ); | |
| 80 | WRITE8_DEVICE_HANDLER( subroc3d_sound_c_w ); | |
| 81 | 81 | |
| 82 | WRITE8_HANDLER( buckrog_sound_a_w ); | |
| 83 | WRITE8_HANDLER( buckrog_sound_b_w ); | |
| 82 | WRITE8_DEVICE_HANDLER( buckrog_sound_a_w ); | |
| 83 | WRITE8_DEVICE_HANDLER( buckrog_sound_b_w ); | |
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | /*----------- defined in video/turbo.c -----------*/ |
| r3373 | r3374 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | /*----------- defined in audio/zaxxon.c -----------*/ |
| 8 | 8 | |
| 9 | WRITE8_HANDLER( zaxxon_sound_a_w ); | |
| 10 | WRITE8_HANDLER( zaxxon_sound_b_w ); | |
| 11 | WRITE8_HANDLER( zaxxon_sound_c_w ); | |
| 9 | WRITE8_DEVICE_HANDLER( zaxxon_sound_a_w ); | |
| 10 | WRITE8_DEVICE_HANDLER( zaxxon_sound_b_w ); | |
| 11 | WRITE8_DEVICE_HANDLER( zaxxon_sound_c_w ); | |
| 12 | 12 | |
| 13 | WRITE8_HANDLER( congo_sound_b_w ); | |
| 14 | WRITE8_HANDLER( congo_sound_c_w ); | |
| 13 | WRITE8_DEVICE_HANDLER( congo_sound_b_w ); | |
| 14 | WRITE8_DEVICE_HANDLER( congo_sound_c_w ); | |
| 15 | 15 | |
| 16 | 16 | MACHINE_DRIVER_EXTERN( zaxxon_samples ); |
| 17 | 17 | MACHINE_DRIVER_EXTERN( congo_samples ); |
| r3373 | r3374 | |
|---|---|---|
| 61 | 61 | void kf2k3pcb_decrypt_68k(running_machine *machine); |
| 62 | 62 | void kf2k3pcb_decrypt_s1data(running_machine *machine); |
| 63 | 63 | void kof2003_decrypt_68k(running_machine *machine); |
| 64 | void kof2003h_decrypt_68k(running_machine *machine); | |
| 64 | 65 | void kof2003biosdecode(running_machine *machine); |
| 65 | 66 | void samsh5p_decrypt_68k(running_machine *machine); |
| 66 | 67 | |
| r3373 | r3374 | |
| 117 | 118 | void kof2k3up_install_protection(running_machine *machine); |
| 118 | 119 | void kf2k3pl_install_protection(running_machine *machine); |
| 119 | 120 | void samsh5bl_px_decrypt(running_machine *machine); |
| 121 | void samsh5bl_vx_decrypt(running_machine *machine); | |
| 120 | 122 | |
| 121 | 123 | |
| 122 | 124 | /*----------- defined in video/neogeo.c -----------*/ |
| r3373 | r3374 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | WRITE8_HANDLER( astrob_sound_w ); |
| 22 | 22 | |
| 23 | WRITE8_HANDLER( sega005_sound_a_w ); | |
| 24 | WRITE8_HANDLER( sega005_sound_b_w ); | |
| 25 | ||
| 26 | 23 | WRITE8_HANDLER( spaceod_sound_w ); |
| 27 | 24 | |
| 28 | 25 |
| r3373 | r3374 | |
|---|---|---|
| 5 | 5 | **************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "cpu/z80/z80daisy.h" |
| 8 | #include "machine/z80ctc.h" | |
| 9 | #include "machine/z80pio.h" | |
| 10 | #include "machine/z80sio.h" | |
| 8 | 11 | |
| 9 | 12 | /* constants */ |
| 10 | 13 | #define MAIN_OSC_MCR_I XTAL_19_968MHz |
| r3373 | r3374 | |
| 12 | 15 | |
| 13 | 16 | /*----------- defined in drivers/mcr.c -----------*/ |
| 14 | 17 | |
| 15 | WRITE8_HANDLER( mcr_ipu_sio_transmit ); | |
| 18 | WRITE8_DEVICE_HANDLER( mcr_ipu_sio_transmit ); | |
| 16 | 19 | |
| 17 | 20 | |
| 18 | 21 | |
| r3373 | r3374 | |
| 20 | 23 | |
| 21 | 24 | extern attotime mcr68_timing_factor; |
| 22 | 25 | |
| 23 | extern const struct z80_irq_daisy_chain mcr_daisy_chain[]; | |
| 24 | extern const struct z80_irq_daisy_chain mcr_ipu_daisy_chain[]; | |
| 26 | extern const z80_daisy_chain mcr_daisy_chain[]; | |
| 27 | extern const z80_daisy_chain mcr_ipu_daisy_chain[]; | |
| 28 | extern const z80ctc_interface mcr_ctc_intf; | |
| 29 | extern const z80ctc_interface nflfoot_ctc_intf; | |
| 30 | extern const z80pio_interface nflfoot_pio_intf; | |
| 31 | extern const z80sio_interface nflfoot_sio_intf; | |
| 25 | 32 | extern UINT8 mcr_cocktail_flip; |
| 26 | 33 | |
| 27 | 34 | extern const gfx_layout mcr_bg_layout; |
| r3373 | r3374 | |
| 52 | 59 | READ16_HANDLER( mcr68_6840_upper_r ); |
| 53 | 60 | READ16_HANDLER( mcr68_6840_lower_r ); |
| 54 | 61 | |
| 55 | READ8_HANDLER( mcr_ipu_pio_0_r ); | |
| 56 | READ8_HANDLER( mcr_ipu_pio_1_r ); | |
| 57 | READ8_HANDLER( mcr_ipu_sio_r ); | |
| 58 | WRITE8_HANDLER( mcr_ipu_pio_0_w ); | |
| 59 | WRITE8_HANDLER( mcr_ipu_pio_1_w ); | |
| 60 | WRITE8_HANDLER( mcr_ipu_sio_w ); | |
| 62 | READ8_DEVICE_HANDLER( mcr_ipu_sio_r ); | |
| 63 | WRITE8_DEVICE_HANDLER( mcr_ipu_sio_w ); | |
| 61 | 64 | WRITE8_HANDLER( mcr_ipu_laserdisk_w ); |
| 62 | 65 | READ8_HANDLER( mcr_ipu_watchdog_r ); |
| 63 | 66 | WRITE8_HANDLER( mcr_ipu_watchdog_w ); |
| r3373 | r3374 | |
|---|---|---|
| 146 | 146 | |
| 147 | 147 | /*----------- defined in machine/scramble.c -----------*/ |
| 148 | 148 | |
| 149 | extern const ppi8255_interface scramble_ppi_ppi8255_intf[2]; | |
| 150 | extern const ppi8255_interface stratgyx_ppi8255_intf[2]; | |
| 151 | extern const ppi8255_interface darkplnt_ppi8255_intf[2]; | |
| 152 | extern const ppi8255_interface scramble_ppi8255_intf[2]; | |
| 153 | extern const ppi8255_interface ckongs_ppi8255_intf[2]; | |
| 154 | extern const ppi8255_interface mars_ppi8255_intf[2]; | |
| 155 | extern const ppi8255_interface mrkougar_ppi8255_intf[2]; | |
| 149 | extern const ppi8255_interface scramble_ppi_0_intf; | |
| 150 | extern const ppi8255_interface scramble_ppi_1_intf; | |
| 151 | extern const ppi8255_interface stratgyx_ppi_1_intf; | |
| 152 | extern const ppi8255_interface scramble_protection_ppi_1_intf; | |
| 153 | extern const ppi8255_interface mrkougar_ppi_1_intf; | |
| 156 | 154 | |
| 157 | 155 | |
| 158 | 156 | DRIVER_INIT( scramble_ppi ); |
| r3373 | r3374 | |
| 195 | 193 | READ8_HANDLER( hunchbks_mirror_r ); |
| 196 | 194 | WRITE8_HANDLER( hunchbks_mirror_w ); |
| 197 | 195 | |
| 196 | CUSTOM_INPUT( darkplnt_custom_r ); | |
| 198 | 197 | |
| 198 | ||
| 199 | 199 | /*----------- defined in audio/scramble.c -----------*/ |
| 200 | 200 | |
| 201 | 201 | void scramble_sh_init(void); |
| r3373 | r3374 | |
| 209 | 209 | |
| 210 | 210 | READ8_HANDLER( hotshock_soundlatch_r ); |
| 211 | 211 | |
| 212 | WRITE8_HANDLER( scramble_sh_irqtrigger_w ); | |
| 212 | WRITE8_DEVICE_HANDLER( scramble_sh_irqtrigger_w ); | |
| 213 | 213 | WRITE8_HANDLER( sfx_sh_irqtrigger_w ); |
| 214 | WRITE8_HANDLER( mrkougar_sh_irqtrigger_w ); | |
| 214 | WRITE8_DEVICE_HANDLER( mrkougar_sh_irqtrigger_w ); | |
| 215 | 215 | WRITE8_HANDLER( froggrmc_sh_irqtrigger_w ); |
| 216 | 216 | WRITE8_HANDLER( hotshock_sh_irqtrigger_w ); |
| 217 | 217 |
| r3373 | r3374 | |
|---|---|---|
| 271 | 271 | double intensity = (double)(data & 0xff) / (double)0x60; |
| 272 | 272 | int i; |
| 273 | 273 | for (i = 0; i < 8192; i++) |
| 274 | palette_set_ | |
| 274 | palette_set_p | |
| 275 | 275 | } |
| 276 | 276 | } |
| 277 | 277 |
| r3373 | r3374 | |
|---|---|---|
| 290 | 290 | |
| 291 | 291 | VIDEO_START( galsnew ) |
| 292 | 292 | { |
| 293 | VIDEO_START_CALL(kaneko16_1xVIEW2); | |
| 293 | VIDEO_START_CALL(kaneko16_sprites); | |
| 294 | ||
| 295 | kaneko16_tmap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, | |
| 296 | 16,16, 0x20,0x20 ); | |
| 297 | kaneko16_tmap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, | |
| 298 | 16,16, 0x20,0x20 ); | |
| 299 | ||
| 300 | kaneko16_tmap_2 = 0; | |
| 301 | ||
| 302 | kaneko16_tmap_3 = 0; | |
| 303 | ||
| 304 | sprites_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen); | |
| 305 | ||
| 306 | { | |
| 307 | int dx = 0x5b, dy = 8; | |
| 308 | ||
| 309 | int xdim = video_screen_get_width(machine->primary_screen); | |
| 310 | int ydim = video_screen_get_height(machine->primary_screen); | |
| 311 | ||
| 312 | tilemap_set_scrolldx( kaneko16_tmap_0, -dx, xdim + dx -1 ); | |
| 313 | tilemap_set_scrolldx( kaneko16_tmap_1, -(dx+2), xdim + (dx + 2) - 1 ); | |
| 314 | ||
| 315 | tilemap_set_scrolldy( kaneko16_tmap_0, -dy, ydim + dy -1 ); | |
| 316 | tilemap_set_scrolldy( kaneko16_tmap_1, -dy, ydim + dy -1 ); | |
| 317 | ||
| 318 | tilemap_set_transparent_pen(kaneko16_tmap_0, 0); | |
| 319 | tilemap_set_transparent_pen(kaneko16_tmap_1, 0); | |
| 320 | ||
| 321 | tilemap_set_scroll_rows(kaneko16_tmap_0, 0x200); // Line Scroll | |
| 322 | tilemap_set_scroll_rows(kaneko16_tmap_1, 0x200); | |
| 323 | } | |
| 294 | 324 | } |
| 295 | 325 | |
| 296 | 326 | /*************************************************************************** |
| r3373 | r3374 | |
|---|---|---|
| 756 | 756 | |
| 757 | 757 | // dim all colors before it |
| 758 | 758 | for (i=0; i<cb; i++) |
| 759 | palette_set_ | |
| 759 | palette_set_p | |
| 760 | 760 | |
| 761 | 761 | // reset all colors in range |
| 762 | 762 | for (i=cb; i<ce; i++) |
| 763 | palette_set_ | |
| 763 | palette_set_p | |
| 764 | 764 | |
| 765 | 765 | // dim all colors after it |
| 766 | 766 | for (i=ce; i<2048; i++) |
| 767 | palette_set_ | |
| 767 | palette_set_p | |
| 768 | 768 | |
| 769 | 769 | // toggle shadow/highlight |
| 770 | 770 | if (~dim_c & 0x10) |
| r3373 | r3374 | |
|---|---|---|
| 129 | 129 | |
| 130 | 130 | palette_set_color(machine, offset & 0x3ff, MAKE_RGB(red, green, blue)); |
| 131 | 131 | if (!(newword & 0x8000)) |
| 132 | palette_set_ | |
| 132 | palette_set_p | |
| 133 | 133 | else |
| 134 | palette_set_ | |
| 134 | palette_set_p | |
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
| r3373 | r3374 | |
| 146 | 146 | |
| 147 | 147 | for (i = 0; i < 0x400; i++) |
| 148 | 148 | if (!(paletteram16[i] & 0x8000)) |
| 149 | palette_set_ | |
| 149 | palette_set_p | |
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 |
| r3373 | r3374 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | static UINT8 background_priority = 0; |
| 18 | 18 | static UINT8 spritebank; |
| 19 | static UINT8 transparent0; | |
| 19 | 20 | |
| 20 | 21 | static tilemap *bg_tilemap; |
| 21 | 22 | static double weights[4]; |
| r3373 | r3374 | |
| 29 | 30 | |
| 30 | 31 | WRITE8_HANDLER( gottlieb_paletteram_w ) |
| 31 | 32 | { |
| 32 | int r, g, b, val; | |
| 33 | int r, g, b, a, val; | |
| 33 | 34 | |
| 34 | 35 | paletteram[offset] = data; |
| 35 | 36 | |
| r3373 | r3374 | |
| 42 | 43 | val = paletteram[offset | 1]; |
| 43 | 44 | r = combine_4_weights(weights, (val >> 0) & 1, (val >> 1) & 1, (val >> 2) & 1, (val >> 3) & 1); |
| 44 | 45 | |
| 45 | palette_set_color(machine, offset / 2, MAKE_ARGB(((offset & ~1) == 0) ? 0x00 : 0xff, r, g, b)); | |
| 46 | /* alpha is set to 0 if laserdisc video is enabled */ | |
| 47 | a = (transparent0 && offset / 2 == 0) ? 0 : 255; | |
| 48 | palette_set_color(machine, offset / 2, MAKE_ARGB(a, r, g, b)); | |
| 46 | 49 | } |
| 47 | 50 | |
| 48 | 51 | |
| r3373 | r3374 | |
| 94 | 97 | laserdisc_overlay_enable(laserdisc, (data & 0x04) ? TRUE : FALSE); |
| 95 | 98 | laserdisc_video_enable(laserdisc, ((data & 0x0c) == 0x0c) ? TRUE : FALSE); |
| 96 | 99 | |
| 97 | render_container_set_palette_alpha(render_container_get_screen(machine->primary_screen), 0, (data & 0x08) ? 0x00 : 0xff); | |
| 100 | /* configure the palette if the laserdisc is enabled */ | |
| 101 | transparent0 = (data >> 3) & 1; | |
| 102 | gottlieb_paletteram_w(machine, 0, paletteram[0]); | |
| 98 | 103 | } |
| 99 | 104 | |
| 100 | 105 | |
| r3373 | r3374 | |
| 151 | 156 | 4, resistances, weights, 180, 0, |
| 152 | 157 | 4, resistances, weights, 180, 0, |
| 153 | 158 | 4, resistances, weights, 180, 0); |
| 159 | transparent0 = FALSE; | |
| 154 | 160 | |
| 155 | 161 | /* configure the background tilemap */ |
| 156 | 162 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); |
| r3373 | r3374 | |
| 160 | 166 | /* save some state */ |
| 161 | 167 | state_save_register_global(background_priority); |
| 162 | 168 | state_save_register_global(spritebank); |
| 169 | state_save_register_global(transparent0); | |
| 163 | 170 | } |
| 164 | 171 | |
| 165 | 172 |
| r3373 | r3374 | |
|---|---|---|
| 198 | 198 | Playfield tile info: |
| 199 | 199 | 0xc000 0000 - X/Y Flip |
| 200 | 200 | 0x3000 ffff - Tile index |
| 201 | 0x0 | |
| 201 | 0x0c00 0000 - Ext | |
| 202 | 202 | 0x0200 0000 - Alpha blend mode |
| 203 | 0x01ff 0000 - Colour | |
| 203 | 204 | |
| 204 | 205 | ***************************************************************************/ |
| 205 | 206 | |
| r3373 | r3374 | |
| 219 | 220 | static UINT32 f3_control_0[8]; |
| 220 | 221 | static UINT32 f3_control_1[8]; |
| 221 | 222 | static int flipscreen; |
| 223 | static UINT8 sprite_extra_planes; | |
| 224 | static UINT8 sprite_pen_mask; | |
| 222 | 225 | |
| 223 | 226 | static UINT8 *pivot_dirty; |
| 224 | 227 | |
| r3373 | r3374 | |
| 236 | 239 | int name; |
| 237 | 240 | int extend; |
| 238 | 241 | int sprite_lag; |
| 239 | int sprite_bpp; | |
| 240 | int tile_bpp; | |
| 241 | 242 | }; |
| 242 | 243 | |
| 243 | 244 | static const struct F3config *f3_game_config; |
| 244 | 245 | |
| 245 | 246 | static const struct F3config f3_config_table[] = |
| 246 | 247 | { |
| 247 | /* Name Extend Lag Bpp */ | |
| 248 | { RINGRAGE, 0, 2, 4, 4 }, | |
| 249 | { ARABIANM, 0, 2, 5, 5 }, /* sprites 1200-120F contain 6bpp pixels but this seems to be a data error */ | |
| 250 | { RIDINGF, 1, 1, 4, 4 }, | |
| 251 | { GSEEKER, 0, 1, 4, 4 }, | |
| 252 | { COMMANDW, 1, 1, 5, 5 }, | |
| 253 | { SCFINALS, 0, 1, 5, 5 }, | |
| 254 | { TRSTAR, 1, 0, 5, 5 }, | |
| 255 | { GUNLOCK, 1, 2, 5, 5 }, | |
| 256 | { LIGHTBR, 1, 2, 5, 5 }, | |
| 257 | { KAISERKN, 0, 2, 5, 5 }, | |
| 258 | { DARIUSG, 0, 2, 5, 5 }, | |
| 259 | { BUBSYMPH, 1, 1, 5, 5 }, | |
| 260 | { SPCINVDX, 1, 1, 4, 4 }, | |
| 261 | { HTHERO95, 0, 1, 6, 6 }, | |
| 262 | { QTHEATER, 1, 1, 4, 4 }, | |
| 263 | { EACTION2, 1, 2, 5, 5 }, | |
| 264 | { RECALH, 1, 1, 4, 4 }, | |
| 265 | { SPCINV95, 0, 1, 5, 5 }, | |
| 266 | { TWINQIX, 1, 1, 4, 6 }, | |
| 267 | { QUIZHUHU, 1, 1, 6, 6 }, | |
| 268 | { PBOBBLE2, 0, 1, 4, 6 }, | |
| 269 | { GEKIRIDO, 0, 1, 5, 5 }, | |
| 270 | { KTIGER2, 0, 0, 4, 4 }, | |
| 271 | { BUBBLEM, 1, 1, 4, 5 }, | |
| 272 | { CLEOPATR, 0, 1, 4, 6 }, | |
| 273 | { PBOBBLE3, 0, 1, 4, 4 }, | |
| 274 | { ARKRETRN, 1, 1, 5, 6 }, | |
| 275 | { KIRAMEKI, 0, 1, 5, 6 }, | |
| 276 | { PUCHICAR, 1, 1, 5, 6 }, | |
| 277 | { PBOBBLE4, 0, 1, 4, 4 }, | |
| 278 | { POPNPOP, 1, 1, 6, 6 }, | |
| 279 | { LANDMAKR, 1, 1, 5, 6 }, | |
| 248 | /* Name Extend Lag */ | |
| 249 | { RINGRAGE, 0, 2 }, | |
| 250 | { ARABIANM, 0, 2 }, | |
| 251 | { RIDINGF, 1, 1 }, | |
| 252 | { GSEEKER, 0, 1 }, | |
| 253 | { COMMANDW, 1, 1 }, | |
| 254 | { SCFINALS, 0, 1 }, | |
| 255 | { TRSTAR, 1, 0 }, | |
| 256 | { GUNLOCK, 1, 2 }, | |
| 257 | { LIGHTBR, 1, 2 }, | |
| 258 | { KAISERKN, 0, 2 }, | |
| 259 | { DARIUSG, 0, 2 }, | |
| 260 | { BUBSYMPH, 1, 1 }, | |
| 261 | { SPCINVDX, 1, 1 }, | |
| 262 | { HTHERO95, 0, 1 }, | |
| 263 | { QTHEATER, 1, 1 }, | |
| 264 | { EACTION2, 1, 2 }, | |
| 265 | { RECALH, 1, 1 }, | |
| 266 | { SPCINV95, 0, 1 }, | |
| 267 | { TWINQIX, 1, 1 }, | |
| 268 | { QUIZHUHU, 1, 1 }, | |
| 269 | { PBOBBLE2, 0, 1 }, | |
| 270 | { GEKIRIDO, 0, 1 }, | |
| 271 | { KTIGER2, 0, 0 }, | |
| 272 | { BUBBLEM, 1, 1 }, | |
| 273 | { CLEOPATR, 0, 1 }, | |
| 274 | { PBOBBLE3, 0, 1 }, | |
| 275 | { ARKRETRN, 1, 1 }, | |
| 276 | { KIRAMEKI, 0, 1 }, | |
| 277 | { PUCHICAR, 1, 1 }, | |
| 278 | { PBOBBLE4, 0, 1 }, | |
| 279 | { POPNPOP, 1, 1 }, | |
| 280 | { LANDMAKR, 1, 1 }, | |
| 280 | 281 | {0} |
| 281 | 282 | }; |
| 282 | 283 | |
| r3373 | r3374 | |
| 491 | 492 | INLINE void get_tile_info(running_machine *machine, tile_data *tileinfo, int tile_index, UINT32 *gfx_base) |
| 492 | 493 | { |
| 493 | 494 | UINT32 tile=gfx_base[tile_index]; |
| 494 | UINT8 abtype=(tile>>(16+9))&0x1f; | |
| 495 | int color_mask; | |
| 496 | ||
| 495 | UINT8 abtype=(tile>>(16+9)) & 1; | |
| 496 | // tiles can be configured to use 4, 5, or 6 bpp data. | |
| 497 | 497 | // if tiles use more than 4bpp, the bottom bits of the color code must be masked out. |
| 498 | 498 | // This fixes (at least) the rain in round 6 of Arabian Magic. |
| 499 | | |
| 499 | UINT8 extra_planes | |
| 500 | 500 | |
| 501 | 501 | SET_TILE_INFO( |
| 502 | 502 | 1, |
| 503 | 503 | tile&0xffff, |
| 504 | (tile>>16) & 0x1ff & | |
| 504 | (tile>>16) & 0x1ff & (~extra_planes), | |
| 505 | 505 | TILE_FLIPYX( tile >> 30 )); |
| 506 | 506 | tileinfo->category = abtype&1; /* alpha blending type */ |
| 507 | tileinfo->pen_mask = (extra_planes << 4) | 0x0f; | |
| 507 | 508 | } |
| 508 | 509 | |
| 509 | 510 | static TILE_GET_INFO( get_tile_info1 ) |
| r3373 | r3374 | |
| 695 | 696 | machine->gfx[1]->color_granularity=16; |
| 696 | 697 | machine->gfx[2]->color_granularity=16; |
| 697 | 698 | |
| 698 | assert(f3_game_config->tile_bpp >= 4 && f3_game_config->tile_bpp <= 6); | |
| 699 | assert(f3_game_config->sprite_bpp >= 4 && f3_game_config->sprite_bpp <= 6); | |
| 700 | ||
| 701 | 699 | flipscreen = 0; |
| 702 | 700 | memset(spriteram32_buffered,0,spriteram_size); |
| 703 | 701 | memset(spriteram32,0,spriteram_size); |
| r3373 | r3374 | |
| 719 | 717 | { |
| 720 | 718 | const gfx_element *sprite_gfx = machine->gfx[2]; |
| 721 | 719 | int c; |
| 722 | int bpp_mask = (1 << f3_game_config->sprite_bpp) - 1; | |
| 723 | 720 | |
| 724 | 721 | for (c = 0;c < sprite_gfx->total_elements;c++) |
| 725 | 722 | { |
| r3373 | r3374 | |
| 730 | 727 | { |
| 731 | 728 | for (x = 0;x < sprite_gfx->width;x++) |
| 732 | 729 | { |
| 733 | // clear unused top bits from gfx data | |
| 734 | dp[x] &= bpp_mask; | |
| 735 | ||
| 736 | 730 | if(!dp[x]) chk_trans_or_opa|=2; |
| 737 | 731 | else chk_trans_or_opa|=1; |
| 738 | 732 | } |
| r3373 | r3374 | |
| 747 | 741 | { |
| 748 | 742 | const gfx_element *pf_gfx = machine->gfx[1]; |
| 749 | 743 | int c; |
| 750 | int bpp_mask = (1 << f3_game_config->tile_bpp) - 1; | |
| 751 | 744 | |
| 752 | 745 | for (c = 0;c < pf_gfx->total_elements;c++) |
| 753 | 746 | { |
| r3373 | r3374 | |
| 758 | 751 | { |
| 759 | 752 | for (x = 0;x < pf_gfx->width;x++) |
| 760 | 753 | { |
| 761 | // clear unused top bits from gfx data | |
| 762 | dp[x] &= bpp_mask; | |
| 763 | ||
| 764 | 754 | if(!dp[x]) chk_trans_or_opa|=2; |
| 765 | 755 | else chk_trans_or_opa|=1; |
| 766 | 756 | } |
| r3373 | r3374 | |
| 2608 | 2598 | /******************************************************************************/ |
| 2609 | 2599 | |
| 2610 | 2600 | #define PSET_T \ |
| 2611 | c = *source; | |
| 2601 | c = *source & sprite_pen_mask; | |
| 2612 | 2602 | if(c) \ |
| 2613 | 2603 | { \ |
| 2614 | 2604 | p=*pri; \ |
| r3373 | r3374 | |
| 2623 | 2613 | p=*pri; \ |
| 2624 | 2614 | if(!p || p==0xff) \ |
| 2625 | 2615 | { \ |
| 2626 | *dest = pal[*source]; \ | |
| 2616 | *dest = pal[*source & sprite_pen_mask]; \ | |
| 2627 | 2617 | *pri = pri_dst; \ |
| 2628 | 2618 | } |
| 2629 | 2619 | |
| r3373 | r3374 | |
| 2904 | 2894 | int x, x_index = x_index_base; |
| 2905 | 2895 | for( x=sx; x<ex; x++ ) |
| 2906 | 2896 | { |
| 2907 | int c = source[x_index>>16]; | |
| 2897 | int c = source[x_index>>16] & sprite_pen_mask; | |
| 2908 | 2898 | if(c) |
| 2909 | 2899 | { |
| 2910 | 2900 | UINT8 p=pri[x]; |
| r3373 | r3374 | |
| 2982 | 2972 | cntrl&0x0020 = ??? |
| 2983 | 2973 | */ |
| 2984 | 2974 | |
| 2975 | sprite_extra_planes = (cntrl & 0x0300) >> 8; // 0 = 4bpp, 1 = 5bpp, 2 = unused?, 3 = 6bpp | |
| 2976 | sprite_pen_mask = (sprite_extra_planes << 4) | 0x0f; | |
| 2977 | ||
| 2985 | 2978 | /* Sprite bank select */ |
| 2986 | 2979 | if (cntrl&1) { |
| 2987 | 2980 | offs=offs|0x2000; |
| r3373 | r3374 | |
| 3200 | 3193 | { |
| 3201 | 3194 | const struct tempsprite *sprite_ptr; |
| 3202 | 3195 | const gfx_element *sprite_gfx = machine->gfx[2]; |
| 3203 | int color_mask; | |
| 3204 | 3196 | |
| 3205 | 3197 | sprite_ptr = sprite_end; |
| 3206 | 3198 | sprite_pri_usage=0; |
| 3207 | 3199 | |
| 3208 | 3200 | // if sprites use more than 4bpp, the bottom bits of the color code must be masked out. |
| 3209 | 3201 | // This fixes (at least) stage 1 battle ships and attract mode explosions in Ray Force. |
| 3210 | color_mask = ~((1 << (f3_game_config->sprite_bpp - 4)) - 1); | |
| 3211 | 3202 | |
| 3212 | 3203 | while (sprite_ptr != spritelist) |
| 3213 | 3204 | { |
| r3373 | r3374 | |
| 3221 | 3212 | f3_drawgfx(machine, |
| 3222 | 3213 | bitmap,sprite_gfx, |
| 3223 | 3214 | sprite_ptr->code, |
| 3224 | sprite_ptr->color & | |
| 3215 | sprite_ptr->color & (~sprite_extra_planes), | |
| 3225 | 3216 | sprite_ptr->flipx,sprite_ptr->flipy, |
| 3226 | 3217 | sprite_ptr->x,sprite_ptr->y, |
| 3227 | 3218 | cliprect, |
| r3373 | r3374 | |
| 3230 | 3221 | f3_drawgfxzoom(machine, |
| 3231 | 3222 | bitmap,sprite_gfx, |
| 3232 | 3223 | sprite_ptr->code, |
| 3233 | sprite_ptr->color & | |
| 3224 | sprite_ptr->color & (~sprite_extra_planes), | |
| 3234 | 3225 | sprite_ptr->flipx,sprite_ptr->flipy, |
| 3235 | 3226 | sprite_ptr->x,sprite_ptr->y, |
| 3236 | 3227 | cliprect, |
| r3373 | r3374 | |
|---|---|---|
| 1 | /* Kaneko EXPRO-02 board | |
| 2 | - used by the newer revisions of Gals Panic | |
| 1 | /* | |
| 3 | 2 | |
| 3 | Kaneko EXPRO-02 board | |
| 4 | ||
| 5 | Used by the newer revisions of Gals Panic | |
| 6 | ||
| 4 | 7 | Notes: |
| 5 | Tile GFX seem to be encrypted / scrambled? I can't decode them | |
| 6 | Dipswitches are wrong for these sets | |
| 8 | - In gfx data banking function, some strange gfx are shown. Timing issue? | |
| 7 | 9 | |
| 8 | 10 | |
| 9 | 11 | Gals Panic |
| r3373 | r3374 | |
| 136 | 138 | #include "sound/okim6295.h" |
| 137 | 139 | |
| 138 | 140 | static INPUT_PORTS_START( galsnew ) |
| 139 | PORT_START("DSW1/P1") | |
| 141 | PORT_START("DSW1") | |
| 142 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) | |
| 143 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) | |
| 144 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) | |
| 145 | PORT_DIPSETTING( 0x0001, DEF_STR( Hard ) ) | |
| 146 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) | |
| 147 | PORT_DIPNAME( 0x000C, 0x000C, DEF_STR( Lives ) ) | |
| 148 | PORT_DIPSETTING( 0x0004, "2" ) | |
| 149 | PORT_DIPSETTING( 0x000C, "3" ) | |
| 150 | PORT_DIPSETTING( 0x0008, "4" ) | |
| 151 | PORT_DIPSETTING( 0x0000, "5" ) | |
| 152 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Demo_Sounds ) ) | |
| 153 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) | |
| 154 | PORT_DIPSETTING( 0x0010, DEF_STR( On ) ) | |
| 155 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 156 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 157 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 158 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 159 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 160 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 161 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 162 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 163 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 164 | ||
| 165 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1) | |
| 166 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) | |
| 167 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) | |
| 168 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) | |
| 169 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 170 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 171 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 172 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 173 | ||
| 174 | PORT_START("DSW2") | |
| 140 | 175 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unused ) ) |
| 141 | 176 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 142 | 177 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 143 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( | |
| 178 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) ) /* flip screen? */ | |
| 144 | 179 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) |
| 145 | 180 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 146 | PORT_SERVICE( 0x0004, IP_ACTIVE_LOW ) | |
| 147 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unused ) ) | |
| 148 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 181 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Test ) ) | |
| 182 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 149 | 183 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 150 | /* Coinage - World (0x03ffff.b = 03) */ | |
| 151 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) | |
| 152 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) | |
| 153 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) | |
| 154 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) | |
| 155 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) | |
| 156 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) | |
| 157 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) | |
| 158 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) | |
| 159 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) | |
| 160 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) | |
| 184 | PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_A ) ) | |
| 185 | PORT_DIPSETTING( 0x0028, DEF_STR( 2C_1C ) ) | |
| 186 | PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) ) | |
| 187 | PORT_DIPSETTING( 0x0018, DEF_STR( 1C_2C ) ) | |
| 188 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) | |
| 189 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) | |
| 190 | PORT_DIPSETTING( 0x0008, DEF_STR( 1C_6C ) ) | |
| 191 | PORT_DIPNAME( 0x0040, 0x0040, "Coin B-1" ) | |
| 192 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 193 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 194 | PORT_DIPNAME( 0x0080, 0x0080, "Coin B-2" ) | |
| 195 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 196 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 161 | 197 | /* Coinage - Japan (0x03ffff.b = 01) and US (0x03ffff.b = 02) |
| 162 | 198 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) |
| 163 | 199 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) |
| r3373 | r3374 | |
| 170 | 206 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) |
| 171 | 207 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) |
| 172 | 208 | */ |
| 173 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1) | |
| 174 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) | |
| 175 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) | |
| 176 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) | |
| 177 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 178 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* "Shot2" in "test mode" */ | |
| 209 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) | |
| 210 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) | |
| 211 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) | |
| 212 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) | |
| 213 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 214 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* "Shot2" in "test mode" */ | |
| 179 | 215 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 180 | 216 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 181 | 217 | |
| 182 | PORT_START("DSW2/P2") | |
| 218 | PORT_START("DSW3") | |
| 219 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 220 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 221 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 222 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 223 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 224 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 225 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 226 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 227 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 228 | INPUT_PORTS_END | |
| 229 | ||
| 230 | ||
| 231 | static INPUT_PORTS_START( galsnewa ) | |
| 232 | PORT_START("DSW1") | |
| 183 | 233 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) |
| 184 | 234 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) |
| 185 | 235 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) |
| 186 | 236 | PORT_DIPSETTING( 0x0001, DEF_STR( Hard ) ) |
| 187 | 237 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) |
| 188 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unused ) ) | |
| 189 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 190 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 191 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unused ) ) | |
| 192 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 193 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 238 | PORT_BIT( 0x000C, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 194 | 239 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) ) |
| 195 | 240 | PORT_DIPSETTING( 0x0010, "2" ) |
| 196 | 241 | PORT_DIPSETTING( 0x0030, "3" ) |
| 197 | 242 | PORT_DIPSETTING( 0x0020, "4" ) |
| 198 | 243 | PORT_DIPSETTING( 0x0000, "5" ) |
| 199 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) /* demo sounds? - see notes */ | |
| 244 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Demo_Sounds ) ) | |
| 245 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) | |
| 246 | PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) | |
| 247 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unused ) ) | |
| 248 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 249 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 250 | ||
| 251 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1) | |
| 252 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) | |
| 253 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) | |
| 254 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) | |
| 255 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 256 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 257 | PORT_BIT( 0xC000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 258 | ||
| 259 | PORT_START("DSW2") | |
| 260 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 261 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) ) /* flip screen? */ | |
| 262 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 263 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 264 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Test ) ) | |
| 265 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 266 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 267 | PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_A ) ) | |
| 268 | PORT_DIPSETTING( 0x0028, DEF_STR( 2C_1C ) ) | |
| 269 | PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) ) | |
| 270 | PORT_DIPSETTING( 0x0018, DEF_STR( 1C_2C ) ) | |
| 271 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) | |
| 272 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) | |
| 273 | PORT_DIPSETTING( 0x0008, DEF_STR( 1C_6C ) ) | |
| 274 | PORT_DIPNAME( 0x0040, 0x0040, "Coin B-1" ) | |
| 200 | 275 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) |
| 201 | 276 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 202 | PORT_DIPNAME( 0x0080, 0x0080, "C | |
| 277 | PORT_DIPNAME( 0x0080, 0x0080, "Coin | |
| 203 | 278 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) |
| 204 | 279 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 205 | ||
| 280 | /* Coinage - Japan (0x03ffff.b = 01) and US (0x03ffff.b = 02) | |
| 281 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) | |
| 282 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) | |
| 283 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) | |
| 284 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) | |
| 285 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) | |
| 286 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) | |
| 287 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) | |
| 288 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) | |
| 289 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) | |
| 290 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) | |
| 291 | */ | |
| 206 | 292 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) |
| 207 | 293 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) |
| 208 | 294 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) |
| 209 | 295 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) |
| 210 | 296 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 211 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 297 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 212 | 298 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 213 | 299 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 214 | 300 | |
| 215 | PORT_START("S | |
| 301 | PORT_START("DSW3 | |
| 216 | 302 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 217 | 303 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| 218 | 304 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| r3373 | r3374 | |
| 224 | 310 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 225 | 311 | INPUT_PORTS_END |
| 226 | 312 | |
| 227 | ||
| 228 | 313 | static WRITE16_HANDLER( galsnew_paletteram_w ) |
| 229 | 314 | { |
| 230 | 315 | data = COMBINE_DATA(&paletteram16[offset]); |
| r3373 | r3374 | |
| 240 | 325 | } |
| 241 | 326 | } |
| 242 | 327 | |
| 328 | static UINT16 vram_0_bank_num = 0, vram_1_bank_num = 0; | |
| 329 | ||
| 330 | WRITE16_HANDLER(galsnew_vram_0_bank_w) | |
| 331 | { | |
| 332 | int i; | |
| 333 | if(vram_0_bank_num != data) | |
| 334 | { | |
| 335 | for(i = 0; i < 0x1000 / 2; i += 2) | |
| 336 | { | |
| 337 | if(kaneko16_vram_0[i]) | |
| 338 | { | |
| 339 | kaneko16_vram_0_w(machine, i+1, data << 8, 0xFF00); | |
| 340 | } | |
| 341 | } | |
| 342 | vram_0_bank_num = data; | |
| 343 | } | |
| 344 | } | |
| 345 | ||
| 346 | WRITE16_HANDLER(galsnew_vram_1_bank_w) | |
| 347 | { | |
| 348 | int i; | |
| 349 | if(vram_1_bank_num != data) | |
| 350 | { | |
| 351 | for(i = 0; i < 0x1000 / 2; i += 2) | |
| 352 | { | |
| 353 | if(kaneko16_vram_1[i]) | |
| 354 | { | |
| 355 | kaneko16_vram_1_w(machine, i+1, data << 8, 0xFF00); | |
| 356 | } | |
| 357 | } | |
| 358 | vram_1_bank_num = data; | |
| 359 | } | |
| 360 | } | |
| 361 | ||
| 243 | 362 | static ADDRESS_MAP_START( galsnew, ADDRESS_SPACE_PROGRAM, 16 ) |
| 244 | 363 | AM_RANGE(0x000000, 0x03ffff) AM_ROM // main program |
| 245 | 364 | AM_RANGE(0x080000, 0x0fffff) AM_ROM AM_REGION("user2",0) // other data |
| r3373 | r3374 | |
| 261 | 380 | |
| 262 | 381 | AM_RANGE(0x700000, 0x700fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) // sprites? 0x72f words tested |
| 263 | 382 | |
| 264 | AM_RANGE(0x780000, 0x78001f) AM_READWRITE(SMH_RAM,kaneko16_sprites_regs_w) AM_BASE(&kaneko16_sprites_regs | |
| 383 | AM_RANGE(0x780000, 0x78001f) AM_READWRITE(SMH_RAM,kaneko16_sprites_regs_w) AM_BASE(&kaneko16_sprites_regs | |
| 265 | 384 | |
| 266 | AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1/P1") | |
| 267 | AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2/P2") | |
| 268 | AM_RANGE(0x800004, 0x800005) AM_READ_PORT("SYSTEM") | |
| 385 | AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1") | |
| 386 | AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2") | |
| 387 | AM_RANGE(0x800004, 0x800005) AM_READ_PORT("DSW3") | |
| 269 | 388 | |
| 270 | 389 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galsnew_6295_bankswitch_w) |
| 271 | 390 | |
| 272 | AM_RANGE(0xa00000, 0xa00001) AM_WRITE | |
| 391 | AM_RANGE(0xa00000, 0xa00001) AM_WRITE | |
| 273 | 392 | |
| 274 | 393 | AM_RANGE(0xc80000, 0xc8ffff) AM_RAM |
| 275 | 394 | |
| 276 | AM_RANGE(0xd80000, 0xd80001) AM_WRITE( | |
| 395 | AM_RANGE(0xd80000, 0xd80001) AM_WRITE(galsnew_vram_1_bank_w) /* ??? */ | |
| 277 | 396 | |
| 278 | 397 | AM_RANGE(0xe00000, 0xe00015) AM_READWRITE(galpanib_calc_r,galpanib_calc_w) /* CALC1 MCU interaction (simulated) */ |
| 279 | 398 | |
| 280 | AM_RANGE(0xe80000, 0xe80001) AM_WRITE( | |
| 399 | AM_RANGE(0xe80000, 0xe80001) AM_WRITE(galsnew_vram_0_bank_w) /* ??? */ | |
| 281 | 400 | ADDRESS_MAP_END |
| 282 | 401 | |
| 283 | 402 | |
| r3373 | r3374 | |
| 314 | 433 | |
| 315 | 434 | static GFXDECODE_START( 1x4bit_1x4bit ) |
| 316 | 435 | GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x4, 0x100, 0x40 ) // [0] Sprites |
| 317 | GFXDECODE_ENTRY( "gfx2", 0, layout_16x16x4, 0, | |
| 436 | GFXDECODE_ENTRY( "gfx2", 0, layout_16x16x4, 0x400, | |
| 318 | 437 | GFXDECODE_END |
| 319 | 438 | |
| 320 | 439 | static MACHINE_DRIVER_START( galsnew ) |
| r3373 | r3374 | |
| 354 | 473 | MACHINE_DRIVER_END |
| 355 | 474 | |
| 356 | 475 | /* the tile roms seem lineswapped.. but I don't know how to descramble them yet */ |
| 357 | ||
| 476 | ||
| 358 | 477 | { |
| 359 | UINT8 *src = memory_region ( machine, "gfx3" ); | |
| 360 | UINT8 *dst = memory_region ( machine, "gfx2" ); | |
| 361 | int x; | |
| 478 | UINT32 *src = (UINT32 *)memory_region(machine, "gfx3" ); | |
| 479 | UINT32 *dst = (UINT32 *)memory_region(machine, "gfx2" ); | |
| 480 | int x, source, offset,inv; | |
| 362 | 481 | |
| 363 | for (x=0; x<0x | |
| 482 | for (x=0; x<0x8 | |
| 364 | 483 | { |
| 365 | UINT32 y; | |
| 484 | inv = ~x; | |
| 485 | offset = x ^ (0xC30 | (inv >> 1 & 0x10200)); | |
| 486 | offset = (offset & ~0x07) | ((0x02 - (offset & 0x07)) & 0x07); | |
| 487 | if(x&0x0010) | |
| 488 | offset = (offset & ~0x60) | (((offset & 0x60) + 0x20) & 0x60); | |
| 489 | if((x&((inv >> 1 & 0x10000) | 0x2000)) == 0x02000) | |
| 490 | offset ^= 0x1000; | |
| 491 | if(!(x&(0x1000 | (x >> 4 & 0x2000)))) | |
| 492 | { | |
| 493 | offset ^= 0x100; | |
| 494 | if(!(x&0x20000) && (x&0x12000) == 0x02000) | |
| 495 | { | |
| 496 | offset = (offset & ~0x180) | (((offset & 0x180) + 0x180) & 0x180); | |
| 497 | if((x&0x180) == 0x100) | |
| 498 | { | |
| 499 | offset ^= 0x400; | |
| 500 | if((x&0x480) == 0x400) | |
| 501 | offset ^= 0x200; | |
| 502 | } | |
| 503 | } | |
| 504 | } | |
| 505 | else | |
| 506 | { | |
| 507 | offset = (offset & ~0x180) | (((offset & 0x180) + 0x80) & 0x180); | |
| 508 | if((x&0x180) == 0x100) | |
| 509 | { | |
| 510 | offset ^= 0x400; | |
| 511 | if((x&0x480) == 0x400) | |
| 512 | offset ^= 0x200; | |
| 513 | } | |
| 514 | } | |
| 515 | if((x&0x7) < 0x03) | |
| 516 | { | |
| 517 | if(!(x&0x800)) | |
| 518 | { | |
| 519 | offset ^= 0x4000; | |
| 520 | if(x&0x4000) | |
| 521 | { | |
| 522 | offset ^= 0x08; | |
| 523 | if(x&0x08) | |
| 524 | offset = (offset & ~0x70) | (((offset & 0x70) + 0x10) & 0x70); | |
| 525 | } | |
| 526 | } | |
| 527 | offset ^= 0x800; | |
| 528 | } | |
| 529 | if((x & 0x30000) == 0x10000) | |
| 530 | source = x; | |
| 531 | else | |
| 532 | source = x ^ 0x2000; | |
| 366 | 533 | |
| 367 | y = BITSWAP24(x, 23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 ); | |
| 368 | y = x ^ 12; | |
| 369 | dst[y] = src[x]; | |
| 370 | ||
| 534 | dst[source] = (src[offset] << 4 & 0xF0F0F0F0) | (src[offset] >> 4 & 0x0F0F0F0F); | |
| 371 | 535 | } |
| 372 | ||
| 373 | 536 | } |
| 374 | 537 | |
| 375 | ||
| 376 | 538 | ROM_START( galsnew ) /* EXPRO-02 PCB */ |
| 377 | 539 | ROM_REGION( 0x40000, "main", 0 ) /* 68000 code */ |
| 378 | 540 | ROM_LOAD16_BYTE( "pm110u_u87-01.u87", 0x000000, 0x20000, CRC(b793a57d) SHA1(12d57b2b4add532f0d0453c25b30d34b3449d717) ) /* US region */ |
| r3373 | r3374 | |
| 398 | 560 | |
| 399 | 561 | ROM_REGION( 0x200000, "gfx2", ROMREGION_DISPOSE ) /* sprites */ |
| 400 | 562 | |
| 401 | ROM_REGION( 0x200000, "gfx3", ROMREGION_DISPOSE ) /* sprites - encrypted? */ | |
| 402 | ROM_LOAD( "pm013e.u89", 0x180000, 0x080000, CRC(10f27b05) SHA1(0f8ade713f6b430b5a23370a17326d53229951de) ) | |
| 403 | ROM_LOAD( "pm014e.u90", 0x100000, 0x080000, CRC(2f367106) SHA1(1cd16e286e77e8e1b7668bbb6f2978101656b720) ) | |
| 404 | ROM_LOAD( "pm015e.u91", 0x080000, 0x080000, CRC(a563f8ef) SHA1(6e4171746e4d401992bf3a7619d5bed0063d57e5) ) | |
| 405 | ROM_LOAD( "pm016e.u92", 0x000000, 0x080000, CRC(c0b9494c) SHA1(f0b066dd78eb9fcf947da90ddb6c7b62299c5743) ) | |
| 563 | ROM_REGION( 0x200000, "gfx3", ROMREGION_DISPOSE ) /* sprites - encrypted */ | |
| 564 | ROM_LOAD( "pm013e.u89", 0x000000, 0x080000, CRC(10f27b05) SHA1(0f8ade713f6b430b5a23370a17326d53229951de) ) | |
| 565 | ROM_LOAD( "pm014e.u90", 0x080000, 0x080000, CRC(2f367106) SHA1(1cd16e286e77e8e1b7668bbb6f2978101656b720) ) | |
| 566 | ROM_LOAD( "pm015e.u91", 0x100000, 0x080000, CRC(a563f8ef) SHA1(6e4171746e4d401992bf3a7619d5bed0063d57e5) ) | |
| 567 | ROM_LOAD( "pm016e.u92", 0x180000, 0x080000, CRC(c0b9494c) SHA1(f0b066dd78eb9fcf947da90ddb6c7b62299c5743) ) | |
| 406 | 568 | |
| 407 | 569 | |
| 408 | 570 | ROM_REGION( 0x140000, "oki", 0 ) /* OKIM6295 samples */ |
| r3373 | r3374 | |
| 438 | 600 | |
| 439 | 601 | ROM_REGION( 0x200000, "gfx2", ROMREGION_DISPOSE ) /* sprites */ |
| 440 | 602 | |
| 441 | ROM_REGION( 0x200000, "gfx3", ROMREGION_DISPOSE ) /* tiles - encrypted? */ | |
| 442 | ROM_LOAD( "pm013e.u89", 0x180000, 0x080000, CRC(10f27b05) SHA1(0f8ade713f6b430b5a23370a17326d53229951de) ) | |
| 443 | ROM_LOAD( "pm014e.u90", 0x100000, 0x080000, CRC(2f367106) SHA1(1cd16e286e77e8e1b7668bbb6f2978101656b720) ) | |
| 444 | ROM_LOAD( "pm015e.u91", 0x080000, 0x080000, CRC(a563f8ef) SHA1(6e4171746e4d401992bf3a7619d5bed0063d57e5) ) | |
| 445 | ROM_LOAD( "pm016e.u92", 0x000000, 0x080000, CRC(c0b9494c) SHA1(f0b066dd78eb9fcf947da90ddb6c7b62299c5743) ) | |
| 603 | ROM_REGION( 0x200000, "gfx3", ROMREGION_DISPOSE ) /* tiles - encrypted */ | |
| 604 | ROM_LOAD( "pm013e.u89", 0x000000, 0x080000, CRC(10f27b05) SHA1(0f8ade713f6b430b5a23370a17326d53229951de) ) | |
| 605 | ROM_LOAD( "pm014e.u90", 0x080000, 0x080000, CRC(2f367106) SHA1(1cd16e286e77e8e1b7668bbb6f2978101656b720) ) | |
| 606 | ROM_LOAD( "pm015e.u91", 0x100000, 0x080000, CRC(a563f8ef) SHA1(6e4171746e4d401992bf3a7619d5bed0063d57e5) ) | |
| 607 | ROM_LOAD( "pm016e.u92", 0x180000, 0x080000, CRC(c0b9494c) SHA1(f0b066dd78eb9fcf947da90ddb6c7b62299c5743) ) | |
| 446 | 608 | |
| 447 | 609 | ROM_REGION( 0x140000, "oki", 0 ) /* OKIM6295 samples */ |
| 448 | 610 | /* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */ |
| r3373 | r3374 | |
| 477 | 639 | |
| 478 | 640 | ROM_REGION( 0x200000, "gfx2", ROMREGION_DISPOSE ) /* sprites */ |
| 479 | 641 | |
| 480 | ROM_REGION( 0x200000, "gfx3", ROMREGION_DISPOSE ) /* tiles - encrypted? */ | |
| 481 | ROM_LOAD( "pm013e.u89", 0x180000, 0x080000, CRC(10f27b05) SHA1(0f8ade713f6b430b5a23370a17326d53229951de) ) | |
| 482 | ROM_LOAD( "pm014e.u90", 0x100000, 0x080000, CRC(2f367106) SHA1(1cd16e286e77e8e1b7668bbb6f2978101656b720) ) | |
| 483 | ROM_LOAD( "pm015e.u91", 0x080000, 0x080000, CRC(a563f8ef) SHA1(6e4171746e4d401992bf3a7619d5bed0063d57e5) ) | |
| 484 | ROM_LOAD( "pm016e.u92", 0x000000, 0x080000, CRC(c0b9494c) SHA1(f0b066dd78eb9fcf947da90ddb6c7b62299c5743) ) | |
| 642 | ROM_REGION( 0x200000, "gfx3", ROMREGION_DISPOSE ) /* tiles - encrypted */ | |
| 643 | ROM_LOAD( "pm013e.u89", 0x000000, 0x080000, CRC(10f27b05) SHA1(0f8ade713f6b430b5a23370a17326d53229951de) ) | |
| 644 | ROM_LOAD( "pm014e.u90", 0x080000, 0x080000, CRC(2f367106) SHA1(1cd16e286e77e8e1b7668bbb6f2978101656b720) ) | |
| 645 | ROM_LOAD( "pm015e.u91", 0x100000, 0x080000, CRC(a563f8ef) SHA1(6e4171746e4d401992bf3a7619d5bed0063d57e5) ) | |
| 646 | ROM_LOAD( "pm016e.u92", 0x180000, 0x080000, CRC(c0b9494c) SHA1(f0b066dd78eb9fcf947da90ddb6c7b62299c5743) ) | |
| 485 | 647 | |
| 486 | 648 | ROM_REGION( 0x140000, "oki", 0 ) /* OKIM6295 samples */ |
| 487 | 649 | /* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */ |
| r3373 | r3374 | |
| 491 | 653 | ROM_END |
| 492 | 654 | |
| 493 | 655 | |
| 494 | GAME( 1990, galsnew, 0, galsnew, galsnew, galsnew, ROT90, "Kaneko", "Gals Panic (US, EXPRO-02 PCB)", GAME_NOT_WORKING ) | |
| 495 | GAME( 1990, galsnewa, galsnew, galsnew, galsnew, galsnew, ROT90, "Kaneko", "Gals Panic (Export, EXPRO-02 PCB)", GAME_NOT_WORKING ) | |
| 496 | GAME( 1990, galsnewj, galsnew, galsnew, galsnew, galsnew, ROT90, "Kaneko (Taito license)", "Gals Panic (Japan, EXPRO-02 PCB)", GAME_NOT_WORKING ) | |
| 656 | GAME( 1990, galsnew, 0, galsnew, galsnew, galsnew, ROT90, "Kaneko", "Gals Panic (US, EXPRO-02 PCB)", 0 ) | |
| 657 | GAME( 1990, galsnewa, galsnew, galsnew, galsnewa, galsnew, ROT90, "Kaneko", "Gals Panic (Export, EXPRO-02 PCB)", 0 ) | |
| 658 | GAME( 1990, galsnewj, galsnew, galsnew, galsnewa, galsnew, ROT90, "Kaneko (Taito license)", "Gals Panic (Japan, EXPRO-02 PCB)", 0 ) |
| r3373 | r3374 | |
|---|---|---|
| 97 | 97 | VIDEO_UPDATE( senjyo ); |
| 98 | 98 | extern int is_senjyo, senjyo_scrollhack; |
| 99 | 99 | |
| 100 | /* in audio/senjyo.c */ | |
| 101 | extern const z80_daisy_chain senjyo_daisy_chain[]; | |
| 102 | extern const z80pio_interface senjyo_pio_intf; | |
| 100 | 103 | void senjyo_sh_start(void); |
| 101 | 104 | |
| 102 | WRITE8_HANDLER( senjyo_sh_0_w ); | |
| 103 | WRITE8_HANDLER( senjyo_sh_1_w ); | |
| 104 | WRITE8_HANDLER( senjyo_sh_2_w ); | |
| 105 | ||
| 106 | WRITE8_HANDLER( starforc_pio_w ); | |
| 107 | READ8_HANDLER( starforc_pio_r ); | |
| 108 | ||
| 109 | 105 | WRITE8_HANDLER( senjyo_volume_w ); |
| 110 | 106 | |
| 111 | 107 | |
| r3373 | r3374 | |
| 199 | 195 | AM_RANGE(0xb000, 0xb7ff) AM_WRITE(senjyo_bg1videoram_w) AM_BASE(&senjyo_bg1videoram) |
| 200 | 196 | AM_RANGE(0xb800, 0xbbff) AM_WRITE(SMH_RAM) AM_BASE(&senjyo_radarram) |
| 201 | 197 | AM_RANGE(0xd000, 0xd000) AM_WRITE(flip_screen_w) |
| 202 | AM_RANGE(0xd004, 0xd004) AM_WRITE(z80pio | |
| 198 | AM_RANGE(0xd004, 0xd004) AM_DEVWRITE(Z80PIO, "z80pio", z80pio_p_w) | |
| 203 | 199 | ADDRESS_MAP_END |
| 204 | 200 | |
| 205 | 201 | |
| r3373 | r3374 | |
| 257 | 253 | AM_RANGE(0xb000, 0xb7ff) AM_WRITE(senjyo_bg1videoram_w) AM_BASE(&senjyo_bg1videoram) |
| 258 | 254 | AM_RANGE(0xb800, 0xbbff) AM_WRITE(SMH_RAM) AM_BASE(&senjyo_radarram) |
| 259 | 255 | AM_RANGE(0xd000, 0xd000) AM_WRITE(flip_screen_w) |
| 260 | AM_RANGE(0xd004, 0xd004) AM_WRITE(z80pio | |
| 256 | AM_RANGE(0xd004, 0xd004) AM_DEVWRITE(Z80PIO, "z80pio", z80pio_p_w) | |
| 261 | 257 | |
| 262 | 258 | /* these aren't used / written, left here to make sure memory is allocated */ |
| 263 | 259 | AM_RANGE(0xfe00, 0xfe1f) AM_WRITE(SMH_RAM) AM_BASE(&senjyo_fgscroll) |
| r3373 | r3374 | |
| 288 | 284 | AM_RANGE(0xf000, 0xffff) AM_WRITE(SMH_RAM) |
| 289 | 285 | ADDRESS_MAP_END |
| 290 | 286 | |
| 291 | static WRITE8_HANDLER( pio_w ) | |
| 287 | static WRITE8_DEVICE_HANDLER( pio_w ) | |
| 292 | 288 | { |
| 293 | 289 | if (offset & 1) |
| 294 | z80pio_c_w( | |
| 290 | z80pio_c_w(dev | |
| 295 | 291 | else |
| 296 | z80pio_d_w( | |
| 292 | z80pio_d_w(dev | |
| 297 | 293 | } |
| 298 | 294 | |
| 299 | static READ8_HANDLER( pio_r ) | |
| 295 | static READ8_DEVICE_HANDLER( pio_r ) | |
| 300 | 296 | { |
| 301 | return (offset & 1) ? z80pio_c_r( | |
| 297 | return (offset & 1) ? z80pio_c_r(device, (offset >> 1) & 1) : z80pio_d_r(dev | |
| 302 | 298 | } |
| 303 | 299 | |
| 304 | 300 | static ADDRESS_MAP_START( sound_io_map, ADDRESS_SPACE_IO, 8 ) |
| 305 | 301 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 306 | AM_RANGE(0x00, 0x03) AM_READWRITE(pio_r, pio_w) | |
| 307 | AM_RANGE(0x08, 0x0b) AM_READWRITE(z80ctc_0_r, z80ctc_0_w) | |
| 302 | AM_RANGE(0x00, 0x03) AM_DEVREADWRITE(Z80PIO, "z80pio", pio_r, pio_w) | |
| 303 | AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE(Z80CTC, "z80ctc", z80ctc_r, z80ctc_w) | |
| 308 | 304 | ADDRESS_MAP_END |
| 309 | 305 | |
| 310 | 306 | |
| r3373 | r3374 | |
| 619 | 615 | |
| 620 | 616 | |
| 621 | 617 | |
| 622 | static const struct z80_irq_daisy_chain daisy_chain[] = | |
| 623 | { | |
| 624 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti , 0 }, /* device 0 = CTC_0 , high priority */ | |
| 625 | { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti , 0 }, /* device 1 = PIO_0 , low priority */ | |
| 626 | { 0,0,0,0,-1} /* end mark */ | |
| 627 | }; | |
| 628 | ||
| 629 | ||
| 630 | ||
| 631 | 618 | static const samples_interface senjyo_samples_interface = |
| 632 | 619 | { |
| 633 | 620 | 1, |
| r3373 | r3374 | |
| 636 | 623 | }; |
| 637 | 624 | |
| 638 | 625 | |
| 626 | extern const z80ctc_interface senjyo_ctc_intf; | |
| 639 | 627 | |
| 640 | 628 | static MACHINE_DRIVER_START( senjyo ) |
| 641 | 629 | |
| r3373 | r3374 | |
| 645 | 633 | MDRV_CPU_VBLANK_INT("main", senjyo_interrupt) |
| 646 | 634 | |
| 647 | 635 | MDRV_CPU_ADD("sub", Z80, 2000000) /* 2 MHz? */ |
| 648 | MDRV_CPU_CONFIG(daisy_chain) | |
| 636 | MDRV_CPU_CONFIG(senjyo_daisy_chain) | |
| 649 | 637 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 650 | 638 | MDRV_CPU_IO_MAP(sound_io_map,0) |
| 651 | 639 | |
| 652 | 640 | MDRV_MACHINE_RESET(senjyo) |
| 653 | 641 | |
| 642 | MDRV_Z80PIO_ADD( "z80pio", senjyo_pio_intf ) | |
| 643 | MDRV_Z80CTC_ADD( "z80ctc", senjyo_ctc_intf ) | |
| 644 | ||
| 654 | 645 | /* video hardware */ |
| 655 | 646 | MDRV_SCREEN_ADD("main", RASTER) |
| 656 | 647 | MDRV_SCREEN_REFRESH_RATE(60) |
| r3373 | r3374 | |
|---|---|---|
| 86 | 86 | |
| 87 | 87 | static void update_main_irqs(running_machine *machine) |
| 88 | 88 | { |
| 89 | cpunum_set_input_line(machine, 0, 2, timer_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 90 | cpunum_set_input_line(machine, 0, 4, vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 89 | int irq = 0; | |
| 91 | 90 | |
| 92 | if(!gprider_hack) | |
| 93 | cpunum_set_input_line(machine, 0, 6, timer_irq_state && vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 91 | if (timer_irq_state) | |
| 92 | irq |= 2; | |
| 93 | else | |
| 94 | cpunum_set_input_line(machine, 0, 2, CLEAR_LINE); | |
| 94 | 95 | |
| 95 | if(timer_irq_state || vblank_irq_state) | |
| 96 | if (vblank_irq_state) | |
| 97 | irq |= 4; | |
| 98 | else | |
| 99 | cpunum_set_input_line(machine, 0, 4, CLEAR_LINE); | |
| 100 | ||
| 101 | if (gprider_hack && irq > 4) | |
| 102 | irq = 4; | |
| 103 | ||
| 104 | if (!(irq==6)) | |
| 105 | cpunum_set_input_line(machine, 0, 6, CLEAR_LINE); | |
| 106 | ||
| 107 | if (irq) | |
| 108 | { | |
| 109 | cpunum_set_input_line(machine, 0, irq, ASSERT_LINE); | |
| 96 | 110 | cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100)); |
| 111 | } | |
| 97 | 112 | } |
| 98 | 113 | |
| 99 | 114 |
| r3373 | r3374 | |
|---|---|---|
| 489 | 489 | static WRITE8_HANDLER( tmpz84c011_1_dir_pe_w ) { pio_dir[9] = data; } |
| 490 | 490 | |
| 491 | 491 | |
| 492 | static void ctc0_interrupt( | |
| 492 | static void ctc0_interrupt(const device_ | |
| 493 | 493 | { |
| 494 | cpunum_set_input_line(machine, 0, 0, state); | |
| 494 | cpunum_set_input_line(device->machine, 0, 0, state); | |
| 495 | 495 | } |
| 496 | 496 | |
| 497 | static void ctc1_interrupt( | |
| 497 | static void ctc1_interrupt(const device_ | |
| 498 | 498 | { |
| 499 | cpunum_set_input_line(machine, 1, 0, state); | |
| 499 | cpunum_set_input_line(device->machine, 1, 0, state); | |
| 500 | 500 | } |
| 501 | 501 | |
| 502 | 502 | /* CTC of main cpu, ch0 trigger is vblank */ |
| 503 | 503 | static INTERRUPT_GEN( ctc0_trg1 ) |
| 504 | 504 | { |
| 505 | z80ctc_0_trg1_w(machine, 0, 1); | |
| 506 | z80ctc_0_trg1_w(machine, 0, 0); | |
| 505 | const device_config *ctc = devtag_get_device(machine, Z80CTC, "main_ctc"); | |
| 506 | z80ctc_trg1_w(ctc, 0, 1); | |
| 507 | z80ctc_trg1_w(ctc, 0, 0); | |
| 507 | 508 | } |
| 508 | 509 | |
| 509 | static z80ctc_interface ctc_intf_ | |
| 510 | static z80ctc_interface ctc_intf_main = | |
| 510 | 511 | { |
| 512 | "main", /* clock from main CPU */ | |
| 511 | 513 | 0, /* clock */ |
| 512 | 514 | 0, /* timer disables */ |
| 513 | 515 | ctc0_interrupt, /* interrupt handler */ |
| r3373 | r3374 | |
| 516 | 518 | 0, /* ZC/TO2 callback */ |
| 517 | 519 | }; |
| 518 | 520 | |
| 519 | static z80ctc_interface ctc_intf_ | |
| 521 | static z80ctc_interface ctc_intf_audio = | |
| 520 | 522 | { |
| 521 | 1, /* clock */ | |
| 523 | "audio", /* clock from audio CPU */ | |
| 524 | 0, /* clock */ | |
| 522 | 525 | 0, /* timer disables */ |
| 523 | 526 | ctc1_interrupt, /* interrupt handler */ |
| 524 | z80ctc_ | |
| 527 | z80ctc_ | |
| 525 | 528 | 0, /* ZC/TO1 callback */ |
| 526 | 529 | 0 /* ZC/TO2 callback */ |
| 527 | 530 | }; |
| 528 | 531 | |
| 529 | static void tmpz84c011_init(running_machine *machine) | |
| 530 | { | |
| 531 | // initialize the CTC | |
| 532 | ctc_intf_1.baseclock = cpunum_get_clock(0); | |
| 533 | ctc_intf_2.baseclock = cpunum_get_clock(1); | |
| 534 | z80ctc_init(0, &ctc_intf_1); | |
| 535 | z80ctc_init(1, &ctc_intf_2); | |
| 536 | } | |
| 537 | ||
| 538 | 532 | static MACHINE_RESET( sailorws ) |
| 539 | 533 | { |
| 540 | 534 | int i; |
| r3373 | r3374 | |
| 554 | 548 | // sound program patch |
| 555 | 549 | ROM[0x0213] = 0x00; // DI -> NOP |
| 556 | 550 | |
| 557 | // initialize TMPZ84C011 PIO and CTC | |
| 558 | tmpz84c011_init(machine); | |
| 559 | ||
| 560 | 551 | // initialize sound rom bank |
| 561 | 552 | nbmj9195_soundbank_w(machine, 0); |
| 562 | 553 | } |
| r3373 | r3374 | |
| 656 | 647 | |
| 657 | 648 | static ADDRESS_MAP_START( readport_mjuraden, ADDRESS_SPACE_IO, 8 ) |
| 658 | 649 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 659 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 650 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 660 | 651 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 661 | 652 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 662 | 653 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 673 | 664 | |
| 674 | 665 | static ADDRESS_MAP_START( writeport_mjuraden, ADDRESS_SPACE_IO, 8 ) |
| 675 | 666 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 676 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 667 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 677 | 668 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 678 | 669 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 679 | 670 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 698 | 689 | |
| 699 | 690 | static ADDRESS_MAP_START( readport_koinomp, ADDRESS_SPACE_IO, 8 ) |
| 700 | 691 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 701 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 692 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 702 | 693 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 703 | 694 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 704 | 695 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 716 | 707 | |
| 717 | 708 | static ADDRESS_MAP_START( writeport_koinomp, ADDRESS_SPACE_IO, 8 ) |
| 718 | 709 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 719 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 710 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 720 | 711 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 721 | 712 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 722 | 713 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 744 | 735 | |
| 745 | 736 | static ADDRESS_MAP_START( readport_patimono, ADDRESS_SPACE_IO, 8 ) |
| 746 | 737 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 747 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 738 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 748 | 739 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 749 | 740 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 750 | 741 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 762 | 753 | |
| 763 | 754 | static ADDRESS_MAP_START( writeport_patimono, ADDRESS_SPACE_IO, 8 ) |
| 764 | 755 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 765 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 756 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 766 | 757 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 767 | 758 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 768 | 759 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 789 | 780 | |
| 790 | 781 | static ADDRESS_MAP_START( readport_mmehyou, ADDRESS_SPACE_IO, 8 ) |
| 791 | 782 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 792 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 783 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 793 | 784 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 794 | 785 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 795 | 786 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 806 | 797 | |
| 807 | 798 | static ADDRESS_MAP_START( writeport_mmehyou, ADDRESS_SPACE_IO, 8 ) |
| 808 | 799 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 809 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 800 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 810 | 801 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 811 | 802 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 812 | 803 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 831 | 822 | |
| 832 | 823 | static ADDRESS_MAP_START( readport_gal10ren, ADDRESS_SPACE_IO, 8 ) |
| 833 | 824 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 834 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 825 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 835 | 826 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 836 | 827 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 837 | 828 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 849 | 840 | |
| 850 | 841 | static ADDRESS_MAP_START( writeport_gal10ren, ADDRESS_SPACE_IO, 8 ) |
| 851 | 842 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 852 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 843 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 853 | 844 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 854 | 845 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 855 | 846 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 876 | 867 | |
| 877 | 868 | static ADDRESS_MAP_START( readport_renaiclb, ADDRESS_SPACE_IO, 8 ) |
| 878 | 869 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 879 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 870 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 880 | 871 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 881 | 872 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 882 | 873 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 894 | 885 | |
| 895 | 886 | static ADDRESS_MAP_START( writeport_renaiclb, ADDRESS_SPACE_IO, 8 ) |
| 896 | 887 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 897 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 888 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 898 | 889 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 899 | 890 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 900 | 891 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 921 | 912 | |
| 922 | 913 | static ADDRESS_MAP_START( readport_mjlaman, ADDRESS_SPACE_IO, 8 ) |
| 923 | 914 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 924 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 915 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 925 | 916 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 926 | 917 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 927 | 918 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 939 | 930 | |
| 940 | 931 | static ADDRESS_MAP_START( writeport_mjlaman, ADDRESS_SPACE_IO, 8 ) |
| 941 | 932 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 942 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 933 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 943 | 934 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 944 | 935 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 945 | 936 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 966 | 957 | |
| 967 | 958 | static ADDRESS_MAP_START( readport_mkeibaou, ADDRESS_SPACE_IO, 8 ) |
| 968 | 959 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 969 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 960 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 970 | 961 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 971 | 962 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 972 | 963 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 984 | 975 | |
| 985 | 976 | static ADDRESS_MAP_START( writeport_mkeibaou, ADDRESS_SPACE_IO, 8 ) |
| 986 | 977 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 987 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 978 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 988 | 979 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 989 | 980 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 990 | 981 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1011 | 1002 | |
| 1012 | 1003 | static ADDRESS_MAP_START( readport_pachiten, ADDRESS_SPACE_IO, 8 ) |
| 1013 | 1004 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1014 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1005 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1015 | 1006 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1016 | 1007 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1017 | 1008 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1029 | 1020 | |
| 1030 | 1021 | static ADDRESS_MAP_START( writeport_pachiten, ADDRESS_SPACE_IO, 8 ) |
| 1031 | 1022 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1032 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1023 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1033 | 1024 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1034 | 1025 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1035 | 1026 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1056 | 1047 | |
| 1057 | 1048 | static ADDRESS_MAP_START( readport_sailorws, ADDRESS_SPACE_IO, 8 ) |
| 1058 | 1049 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1059 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1050 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1060 | 1051 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1061 | 1052 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1062 | 1053 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1074 | 1065 | |
| 1075 | 1066 | static ADDRESS_MAP_START( writeport_sailorws, ADDRESS_SPACE_IO, 8 ) |
| 1076 | 1067 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1077 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1068 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1078 | 1069 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1079 | 1070 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1080 | 1071 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1101 | 1092 | |
| 1102 | 1093 | static ADDRESS_MAP_START( readport_sailorwr, ADDRESS_SPACE_IO, 8 ) |
| 1103 | 1094 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1104 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1095 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1105 | 1096 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1106 | 1097 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1107 | 1098 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1119 | 1110 | |
| 1120 | 1111 | static ADDRESS_MAP_START( writeport_sailorwr, ADDRESS_SPACE_IO, 8 ) |
| 1121 | 1112 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1122 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1113 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1123 | 1114 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1124 | 1115 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1125 | 1116 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1146 | 1137 | |
| 1147 | 1138 | static ADDRESS_MAP_START( readport_psailor1, ADDRESS_SPACE_IO, 8 ) |
| 1148 | 1139 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1149 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1140 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1150 | 1141 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1151 | 1142 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1152 | 1143 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1164 | 1155 | |
| 1165 | 1156 | static ADDRESS_MAP_START( writeport_psailor1, ADDRESS_SPACE_IO, 8 ) |
| 1166 | 1157 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1167 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1158 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1168 | 1159 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1169 | 1160 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1170 | 1161 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1191 | 1182 | |
| 1192 | 1183 | static ADDRESS_MAP_START( readport_psailor2, ADDRESS_SPACE_IO, 8 ) |
| 1193 | 1184 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1194 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1185 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1195 | 1186 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1196 | 1187 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1197 | 1188 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1209 | 1200 | |
| 1210 | 1201 | static ADDRESS_MAP_START( writeport_psailor2, ADDRESS_SPACE_IO, 8 ) |
| 1211 | 1202 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1212 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1203 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1213 | 1204 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1214 | 1205 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1215 | 1206 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1236 | 1227 | |
| 1237 | 1228 | static ADDRESS_MAP_START( readport_otatidai, ADDRESS_SPACE_IO, 8 ) |
| 1238 | 1229 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1239 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1230 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1240 | 1231 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1241 | 1232 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1242 | 1233 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1254 | 1245 | |
| 1255 | 1246 | static ADDRESS_MAP_START( writeport_otatidai, ADDRESS_SPACE_IO, 8 ) |
| 1256 | 1247 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1257 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1248 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1258 | 1249 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1259 | 1250 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1260 | 1251 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1281 | 1272 | |
| 1282 | 1273 | static ADDRESS_MAP_START( readport_yosimoto, ADDRESS_SPACE_IO, 8 ) |
| 1283 | 1274 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1284 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1275 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1285 | 1276 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1286 | 1277 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1287 | 1278 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1299 | 1290 | |
| 1300 | 1291 | static ADDRESS_MAP_START( writeport_yosimoto, ADDRESS_SPACE_IO, 8 ) |
| 1301 | 1292 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1302 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1293 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1303 | 1294 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1304 | 1295 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1305 | 1296 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1326 | 1317 | |
| 1327 | 1318 | static ADDRESS_MAP_START( readport_jituroku, ADDRESS_SPACE_IO, 8 ) |
| 1328 | 1319 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1329 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1320 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1330 | 1321 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1331 | 1322 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1332 | 1323 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1344 | 1335 | |
| 1345 | 1336 | static ADDRESS_MAP_START( writeport_jituroku, ADDRESS_SPACE_IO, 8 ) |
| 1346 | 1337 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1347 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1338 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1348 | 1339 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1349 | 1340 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1350 | 1341 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1371 | 1362 | |
| 1372 | 1363 | static ADDRESS_MAP_START( readport_ngpgal, ADDRESS_SPACE_IO, 8 ) |
| 1373 | 1364 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1374 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1365 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1375 | 1366 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1376 | 1367 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1377 | 1368 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1388 | 1379 | |
| 1389 | 1380 | static ADDRESS_MAP_START( writeport_ngpgal, ADDRESS_SPACE_IO, 8 ) |
| 1390 | 1381 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1391 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1382 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1392 | 1383 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1393 | 1384 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1394 | 1385 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1413 | 1404 | |
| 1414 | 1405 | static ADDRESS_MAP_START( readport_mjgottsu, ADDRESS_SPACE_IO, 8 ) |
| 1415 | 1406 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1416 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1407 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1417 | 1408 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1418 | 1409 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1419 | 1410 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1430 | 1421 | |
| 1431 | 1422 | static ADDRESS_MAP_START( writeport_mjgottsu, ADDRESS_SPACE_IO, 8 ) |
| 1432 | 1423 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1433 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1424 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1434 | 1425 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1435 | 1426 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1436 | 1427 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1455 | 1446 | |
| 1456 | 1447 | static ADDRESS_MAP_START( readport_cmehyou, ADDRESS_SPACE_IO, 8 ) |
| 1457 | 1448 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1458 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1449 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1459 | 1450 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1460 | 1451 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1461 | 1452 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1472 | 1463 | |
| 1473 | 1464 | static ADDRESS_MAP_START( writeport_cmehyou, ADDRESS_SPACE_IO, 8 ) |
| 1474 | 1465 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1475 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1466 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1476 | 1467 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1477 | 1468 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1478 | 1469 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1497 | 1488 | |
| 1498 | 1489 | static ADDRESS_MAP_START( readport_mjkoiura, ADDRESS_SPACE_IO, 8 ) |
| 1499 | 1490 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1500 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1491 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1501 | 1492 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1502 | 1493 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1503 | 1494 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1514 | 1505 | |
| 1515 | 1506 | static ADDRESS_MAP_START( writeport_mjkoiura, ADDRESS_SPACE_IO, 8 ) |
| 1516 | 1507 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1517 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1508 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1518 | 1509 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1519 | 1510 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1520 | 1511 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1539 | 1530 | |
| 1540 | 1531 | static ADDRESS_MAP_START( readport_mkoiuraa, ADDRESS_SPACE_IO, 8 ) |
| 1541 | 1532 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1542 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1533 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1543 | 1534 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1544 | 1535 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1545 | 1536 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1556 | 1547 | |
| 1557 | 1548 | static ADDRESS_MAP_START( writeport_mkoiuraa, ADDRESS_SPACE_IO, 8 ) |
| 1558 | 1549 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1559 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1550 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1560 | 1551 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1561 | 1552 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1562 | 1553 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1581 | 1572 | |
| 1582 | 1573 | static ADDRESS_MAP_START( readport_mscoutm, ADDRESS_SPACE_IO, 8 ) |
| 1583 | 1574 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1584 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1575 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1585 | 1576 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1586 | 1577 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1587 | 1578 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1602 | 1593 | |
| 1603 | 1594 | static ADDRESS_MAP_START( writeport_mscoutm, ADDRESS_SPACE_IO, 8 ) |
| 1604 | 1595 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1605 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1596 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1606 | 1597 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1607 | 1598 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1608 | 1599 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1628 | 1619 | |
| 1629 | 1620 | static ADDRESS_MAP_START( readport_imekura, ADDRESS_SPACE_IO, 8 ) |
| 1630 | 1621 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1631 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1622 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1632 | 1623 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1633 | 1624 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1634 | 1625 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1649 | 1640 | |
| 1650 | 1641 | static ADDRESS_MAP_START( writeport_imekura, ADDRESS_SPACE_IO, 8 ) |
| 1651 | 1642 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1652 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1643 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1653 | 1644 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1654 | 1645 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1655 | 1646 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1675 | 1666 | |
| 1676 | 1667 | static ADDRESS_MAP_START( readport_mjegolf, ADDRESS_SPACE_IO, 8 ) |
| 1677 | 1668 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1678 | AM_RANGE(0x10, 0x13) AM_READ( | |
| 1669 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "main_ctc", z80ctc_r) | |
| 1679 | 1670 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) |
| 1680 | 1671 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) |
| 1681 | 1672 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) |
| r3373 | r3374 | |
| 1696 | 1687 | |
| 1697 | 1688 | static ADDRESS_MAP_START( writeport_mjegolf, ADDRESS_SPACE_IO, 8 ) |
| 1698 | 1689 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1699 | AM_RANGE(0x10, 0x13) AM_WRITE( | |
| 1690 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "main_ctc", z80ctc_w) | |
| 1700 | 1691 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) |
| 1701 | 1692 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) |
| 1702 | 1693 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 1722 | 1713 | |
| 1723 | 1714 | static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 ) |
| 1724 | 1715 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1725 | AM_RANGE(0x10, 0x13) AM_READ(z80ctc | |
| 1716 | AM_RANGE(0x10, 0x13) AM_DEVREAD(Z80CTC, "audio_ctc", z80ctc | |
| 1726 | 1717 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_1_pa_r) |
| 1727 | 1718 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_1_pb_r) |
| 1728 | 1719 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_1_pc_r) |
| r3373 | r3374 | |
| 1737 | 1728 | |
| 1738 | 1729 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) |
| 1739 | 1730 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1740 | AM_RANGE(0x10, 0x13) AM_WRITE(z80ctc | |
| 1731 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(Z80CTC, "audio_ctc", z80ctc | |
| 1741 | 1732 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_1_pa_w) |
| 1742 | 1733 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_1_pb_w) |
| 1743 | 1734 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_1_pc_w) |
| r3373 | r3374 | |
| 3639 | 3630 | INPUT_PORTS_END |
| 3640 | 3631 | |
| 3641 | 3632 | |
| 3642 | static const | |
| 3633 | static const | |
| 3643 | 3634 | { |
| 3644 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* device 0 = CTC_0 */ | |
| 3645 | { 0, 0, 0, 0, -1 } /* end mark */ | |
| 3635 | { Z80CTC, "main_ctc" }, | |
| 3636 | { NULL } | |
| 3646 | 3637 | }; |
| 3647 | 3638 | |
| 3648 | static const | |
| 3639 | static const | |
| 3649 | 3640 | { |
| 3650 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 1 }, /* device 0 = CTC_1 */ | |
| 3651 | { 0, 0, 0, 0, -1 } /* end mark */ | |
| 3641 | { Z80CTC, "audio_ctc" }, | |
| 3642 | { NULL } | |
| 3652 | 3643 | }; |
| 3653 | 3644 | |
| 3654 | 3645 | |
| r3373 | r3374 | |
| 3666 | 3657 | MDRV_CPU_PROGRAM_MAP(sound_readmem, sound_writemem) |
| 3667 | 3658 | MDRV_CPU_IO_MAP(sound_readport, sound_writeport) |
| 3668 | 3659 | |
| 3660 | MDRV_Z80CTC_ADD("main_ctc", ctc_intf_main) | |
| 3661 | MDRV_Z80CTC_ADD("audio_ctc", ctc_intf_audio) | |
| 3662 | ||
| 3669 | 3663 | MDRV_MACHINE_RESET(sailorws) |
| 3670 | 3664 | |
| 3671 | 3665 | /* video hardware */ |
| r3373 | r3374 | |
|---|---|---|
| 83 | 83 | { |
| 84 | 84 | int charx, chary; |
| 85 | 85 | |
| 86 | render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00); | |
| 86 | /* make color 0 transparent */ | |
| 87 | palette_set_color(screen->machine, 0, MAKE_ARGB(0,0,0,0)); | |
| 87 | 88 | |
| 88 | 89 | /* clear */ |
| 89 | 90 | fillbitmap(bitmap, 0, cliprect); |
| r3373 | r3374 | |
|---|---|---|
| 147 | 147 | int overlay = ( data & 0x10 ) ? 1 : 0; |
| 148 | 148 | |
| 149 | 149 | /* configure pen 0 and 1 as transparent in the renderer and use it as the compositing color */ |
| 150 | render_container_set_palette_alpha(render_container_get_screen(machine->primary_screen), 0, overlay ? 0x00 : 0xff ); | |
| 151 | render_container_set_palette_alpha(render_container_get_screen(machine->primary_screen), 1, overlay ? 0x00 : 0xff ); | |
| 150 | if (overlay) | |
| 151 | { | |
| 152 | palette_set_color(machine, 0, palette_get_color(machine, 0) & MAKE_ARGB(0,255,255,255)); | |
| 153 | palette_set_color(machine, 1, palette_get_color(machine, 1) & MAKE_ARGB(0,255,255,255)); | |
| 154 | } | |
| 155 | else | |
| 156 | { | |
| 157 | palette_set_color(machine, 0, palette_get_color(machine, 0) | MAKE_ARGB(255,0,0,0)); | |
| 158 | palette_set_color(machine, 1, palette_get_color(machine, 1) | MAKE_ARGB(255,0,0,0)); | |
| 159 | } | |
| 152 | 160 | |
| 153 | 161 | /* audio */ |
| 154 | 162 | discrete_sound_w(machine, CLIFF_ENABLE_SND_1, sound&1); |
| 155 | 163 | discrete_sound_w(machine, CLIFF_ENABLE_SND_2, (sound>>1)&1); |
| 156 | 164 | } |
| 157 | 165 | |
| 158 | #ifdef UNUSED_FUNCTION | |
| 159 | static WRITE8_HANDLER( cliff_irqack_w ) | |
| 160 | { | |
| 161 | phillips_code = 0; | |
| 162 | } | |
| 163 | #endif | |
| 164 | ||
| 165 | 166 | static WRITE8_HANDLER( cliff_ldwire_w ) |
| 166 | 167 | { |
| 167 | 168 | laserdisc_line_w(laserdisc,LASERDISC_LINE_CONTROL,(data&1) ? ASSERT_LINE : CLEAR_LINE ); |
| r3373 | r3374 | |
|---|---|---|
| 1194 | 1194 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Coin") PORT_CODE(KEYCODE_7) |
| 1195 | 1195 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1196 | 1196 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1197 | PORT_BIT( 0x000000c0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1197 | PORT_BIT( 0x00000040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) | |
| 1198 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1198 | 1199 | PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1199 | 1200 | |
| 1200 | 1201 | PORT_START("JP1") |
| r3373 | r3374 | |
|---|---|---|
| 123 | 123 | brightness = (double)(data & 0xff); |
| 124 | 124 | for (i=0;i<0x800;i++) |
| 125 | 125 | { |
| 126 | palette_set_ | |
| 126 | palette_set_p | |
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 |
| r3373 | r3374 | |
|---|---|---|
| 230 | 230 | |
| 231 | 231 | /* PPI8255 Interface */ |
| 232 | 232 | |
| 233 | static WRITE8_HANDLER( ppi8255_a_w ){}// watchdog ? | |
| 234 | static WRITE8_HANDLER( ppi8255_b_w ){}// lamps ? | |
| 235 | static WRITE8_HANDLER( ppi8255_c_w ){} | |
| 233 | static WRITE8_DEVICE_HANDLER( ppi8255_a_w ){}// watchdog ? | |
| 234 | static WRITE8_DEVICE_HANDLER( ppi8255_b_w ){}// lamps ? | |
| 235 | static WRITE8_DEVICE_HANDLER( ppi8255_c_w ){} | |
| 236 | 236 | |
| 237 | 237 | static const ppi8255_interface ppi8255_intf[2] = |
| 238 | 238 | { |
| 239 | 239 | { |
| 240 | input_port_0_r, // Port A read | |
| 241 | input_port_1_r, // Port B read | |
| 242 | input_port_2_r, // Port C read | |
| 240 | DEVICE8_PORT("IN0"), // Port A read | |
| 241 | DEVICE8_PORT("IN1"), // Port B read | |
| 242 | DEVICE8_PORT("IN2"), // Port C read | |
| 243 | 243 | NULL, // Port A write |
| 244 | 244 | NULL, // Port B write |
| 245 | 245 | NULL // Port C write |
| r3373 | r3374 | |
| 265 | 265 | |
| 266 | 266 | MDRV_NVRAM_HANDLER(generic_1fill) |
| 267 | 267 | |
| 268 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 269 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 268 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 269 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 270 | 270 | |
| 271 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 272 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 273 | ||
| 274 | 271 | // video hardware |
| 275 | 272 | |
| 276 | 273 | MDRV_SCREEN_ADD("main", RASTER) |
| r3373 | r3374 | |
|---|---|---|
| 433 | 433 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 434 | 434 | |
| 435 | 435 | PORT_START("DSW1") |
| 436 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SWB:1" ) | |
| 436 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1") | |
| 437 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 438 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 437 | 439 | PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SWB:2" ) |
| 438 | 440 | PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SWB:3" ) |
| 439 | 441 | PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SWB:4" ) |
| r3373 | r3374 | |
| 441 | 443 | PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SWB:6" ) |
| 442 | 444 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SWB:7" ) |
| 443 | 445 | /* If you don't like the description, feel free to change it */ |
| 444 | PORT_DIPNAME( 0x80, 0x80, "SW 0 Read From" ) | |
| 446 | PORT_DIPNAME( 0x80, 0x80, "SW 0 Read From" ) PORT_DIPLOCATION("SWB:8") | |
| 445 | 447 | PORT_DIPSETTING( 0x80, "Port $0D" ) |
| 446 | 448 | PORT_DIPSETTING( 0x00, "Port $10" ) |
| 447 | 449 | |
| 448 | 450 | PORT_START("DSW2") |
| 449 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) | |
| 451 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2,3,4") | |
| 450 | 452 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) |
| 451 | 453 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) |
| 452 | 454 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) |
| r3373 | r3374 | |
| 463 | 465 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) |
| 464 | 466 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 465 | 467 | /* PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) Not allowed by mame coinage sorting, but valid */ |
| 466 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) | |
| 468 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:5,6,7,8") | |
| 467 | 469 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) |
| 468 | 470 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) |
| 469 | 471 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) |
| r3373 | r3374 | |
| 492 | 494 | PORT_INCLUDE( system1_generic ) |
| 493 | 495 | |
| 494 | 496 | PORT_MODIFY("DSW1") |
| 495 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 496 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 497 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 498 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) | |
| 497 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:2,3") | |
| 499 | 498 | PORT_DIPSETTING( 0x06, "3" ) |
| 500 | 499 | PORT_DIPSETTING( 0x04, "4" ) |
| 501 | 500 | PORT_DIPSETTING( 0x02, "5" ) |
| 502 | 501 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 503 | PORT_DIPNAME( 0x38, 0x30, DEF_STR (Bonus_Life ) ) | |
| 502 | PORT_DIPNAME( 0x38, 0x30, DEF_STR (Bonus_Life ) ) PORT_DIPLOCATION("SWB:4,5,6") | |
| 504 | 503 | PORT_DIPSETTING( 0x38, "Every 20k" ) |
| 505 | 504 | PORT_DIPSETTING( 0x28, "Every 30k" ) |
| 506 | 505 | PORT_DIPSETTING( 0x18, "Every 40k" ) |
| r3373 | r3374 | |
| 509 | 508 | PORT_DIPSETTING( 0x20, "30k, then every 40k" ) |
| 510 | 509 | PORT_DIPSETTING( 0x10, "40k, then every 50k" ) |
| 511 | 510 | PORT_DIPSETTING( 0x00, "50k, then every 60k" ) |
| 512 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) | |
| 511 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8") | |
| 513 | 512 | PORT_DIPSETTING( 0xc0, DEF_STR( Easy ) ) |
| 514 | 513 | PORT_DIPSETTING( 0x80, DEF_STR( Medium ) ) |
| 515 | 514 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) |
| r3373 | r3374 | |
| 520 | 519 | PORT_INCLUDE( starjack ) |
| 521 | 520 | |
| 522 | 521 | PORT_MODIFY("DSW1") |
| 523 | PORT_DIPNAME( 0x08, 0x08, "Ship" ) | |
| 522 | PORT_DIPNAME( 0x08, 0x08, "Ship" ) PORT_DIPLOCATION("SWB:4") | |
| 524 | 523 | PORT_DIPSETTING( 0x08, DEF_STR( Single ) ) |
| 525 | 524 | PORT_DIPSETTING( 0x00, "Multi" ) |
| 526 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 525 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 527 | 526 | PORT_DIPSETTING( 0x30, "30k, then every 40k" ) |
| 528 | 527 | PORT_DIPSETTING( 0x20, "40k, then every 50k" ) |
| 529 | 528 | PORT_DIPSETTING( 0x10, "50k, then every 60k" ) |
| r3373 | r3374 | |
| 534 | 533 | PORT_INCLUDE( system1_generic ) |
| 535 | 534 | |
| 536 | 535 | PORT_MODIFY("DSW1") |
| 537 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 538 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 539 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 540 | PORT_DIPNAME( 0x02, 0x02, "Unused SW 0-1" ) | |
| 541 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 542 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 543 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 536 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 544 | 537 | PORT_DIPSETTING( 0x0c, "3" ) |
| 545 | 538 | PORT_DIPSETTING( 0x08, "4" ) |
| 546 | 539 | PORT_DIPSETTING( 0x04, "5" ) |
| 547 | 540 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 548 | PORT_DIPNAME( 0x10, 0x10, "Unused SW 0-4" ) | |
| 549 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 550 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 551 | PORT_DIPNAME( 0x20, 0x20, "Unused SW 0-5" ) | |
| 552 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 553 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 554 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 541 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 555 | 542 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 556 | 543 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 557 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) | |
| 544 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWB:8") | |
| 558 | 545 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) |
| 559 | 546 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 560 | 547 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 564 | 551 | PORT_INCLUDE( regulus ) |
| 565 | 552 | |
| 566 | 553 | PORT_MODIFY("DSW1") |
| 567 | PORT_DIPNAME( 0x80, 0x80, "Unused SW 0-7" ) | |
| 568 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 569 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 554 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SWB:8" ) | |
| 570 | 555 | INPUT_PORTS_END |
| 571 | 556 | |
| 572 | 557 | static INPUT_PORTS_START( upndown ) |
| r3373 | r3374 | |
| 579 | 564 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no button 2 */ |
| 580 | 565 | |
| 581 | 566 | PORT_MODIFY("DSW1") |
| 582 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 583 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 584 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 585 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) | |
| 567 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:2,3") | |
| 586 | 568 | PORT_DIPSETTING( 0x06, "3" ) |
| 587 | 569 | PORT_DIPSETTING( 0x04, "4" ) |
| 588 | 570 | PORT_DIPSETTING( 0x02, "5" ) |
| 589 | 571 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 590 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Bonus_Life ) ) | |
| 572 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:4,5,6") | |
| 591 | 573 | PORT_DIPSETTING( 0x38, "10000" ) |
| 592 | 574 | PORT_DIPSETTING( 0x30, "20000" ) |
| 593 | 575 | PORT_DIPSETTING( 0x28, "30000" ) |
| r3373 | r3374 | |
| 596 | 578 | PORT_DIPSETTING( 0x10, "60000" ) |
| 597 | 579 | PORT_DIPSETTING( 0x08, "70000" ) |
| 598 | 580 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 599 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) | |
| 581 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8") | |
| 600 | 582 | PORT_DIPSETTING( 0xc0, DEF_STR( Easy ) ) |
| 601 | 583 | PORT_DIPSETTING( 0x80, DEF_STR( Medium ) ) |
| 602 | 584 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) |
| r3373 | r3374 | |
| 615 | 597 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 616 | 598 | |
| 617 | 599 | PORT_MODIFY("DSW1") |
| 618 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 619 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 620 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 621 | PORT_DIPNAME( 0x02, 0x00, "Maximum Credits" ) | |
| 600 | PORT_DIPNAME( 0x02, 0x00, "Maximum Credits" ) PORT_DIPLOCATION("SWB:2") | |
| 622 | 601 | PORT_DIPSETTING( 0x02, "9" ) |
| 623 | 602 | PORT_DIPSETTING( 0x00, "99" ) |
| 624 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 603 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 625 | 604 | PORT_DIPSETTING( 0x0c, "3" ) |
| 626 | 605 | PORT_DIPSETTING( 0x08, "4" ) |
| 627 | 606 | PORT_DIPSETTING( 0x04, "5" ) |
| 628 | 607 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 629 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 608 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 630 | 609 | PORT_DIPSETTING( 0x30, "10k, 30k then every 30k" ) |
| 631 | 610 | PORT_DIPSETTING( 0x20, "20k, 40k then every 30k" ) |
| 632 | 611 | PORT_DIPSETTING( 0x10, "30k, then every 30k" ) |
| 633 | 612 | PORT_DIPSETTING( 0x00, "40k, then every 30k" ) |
| 634 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 613 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 635 | 614 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 636 | 615 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 637 | 616 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 642 | 621 | PORT_INCLUDE( mrviking ) |
| 643 | 622 | |
| 644 | 623 | PORT_MODIFY("DSW1") |
| 645 | PORT_DIPNAME( 0x02, 0x02, "Unused SW 0-1" ) | |
| 646 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 647 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 648 | PORT_DIPNAME( 0x40, 0x40, "Unused SW 0-6" ) | |
| 649 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 650 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 651 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Difficulty ) ) | |
| 624 | PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SWB:2" ) | |
| 625 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SWB:7" ) | |
| 626 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:8") | |
| 652 | 627 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) |
| 653 | 628 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 654 | 629 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 657 | 632 | PORT_INCLUDE( system1_generic ) |
| 658 | 633 | |
| 659 | 634 | PORT_MODIFY("DSW1") |
| 660 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 661 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 662 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 663 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) | |
| 635 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:2,3") | |
| 664 | 636 | PORT_DIPSETTING( 0x06, "3" ) |
| 665 | 637 | PORT_DIPSETTING( 0x04, "4" ) |
| 666 | 638 | PORT_DIPSETTING( 0x02, "5" ) |
| 667 | 639 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 668 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Bonus_Life ) ) | |
| 640 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:4,5,6") | |
| 669 | 641 | PORT_DIPSETTING( 0x38, "30000" ) |
| 670 | 642 | PORT_DIPSETTING( 0x30, "40000" ) |
| 671 | 643 | PORT_DIPSETTING( 0x28, "50000" ) |
| r3373 | r3374 | |
| 674 | 646 | PORT_DIPSETTING( 0x10, "80000" ) |
| 675 | 647 | PORT_DIPSETTING( 0x08, "90000" ) |
| 676 | 648 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 677 | PORT_DIPNAME( 0x40, 0x40, "Unused SW 0-6" ) | |
| 678 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 679 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 680 | PORT_DIPNAME( 0x80, 0x80, "Unused SW 0-7" ) | |
| 681 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 682 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 649 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SWB:8" ) | |
| 683 | 650 | INPUT_PORTS_END |
| 684 | 651 | |
| 685 | 652 | static INPUT_PORTS_START( flicky ) |
| r3373 | r3374 | |
| 700 | 667 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL |
| 701 | 668 | |
| 702 | 669 | PORT_MODIFY("DSW1") |
| 703 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 704 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 705 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 706 | PORT_DIPNAME( 0x02, 0x02, "Unused SW 0-1" ) | |
| 707 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 708 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 709 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 670 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 710 | 671 | PORT_DIPSETTING( 0x0c, "3" ) |
| 711 | 672 | PORT_DIPSETTING( 0x08, "4" ) |
| 712 | 673 | PORT_DIPSETTING( 0x04, "5" ) |
| 713 | 674 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 714 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 675 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 715 | 676 | PORT_DIPSETTING( 0x30, "30000 80000 160000" ) |
| 716 | 677 | PORT_DIPSETTING( 0x20, "30000 100000 200000" ) |
| 717 | 678 | PORT_DIPSETTING( 0x10, "40000 120000 240000" ) |
| 718 | 679 | PORT_DIPSETTING( 0x00, "40000 140000 280000" ) |
| 719 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 680 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 720 | 681 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 721 | 682 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 722 | 683 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 749 | 710 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL /* TURN P2 */ |
| 750 | 711 | |
| 751 | 712 | PORT_MODIFY("DSW1") |
| 752 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 753 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 754 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 755 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 713 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 756 | 714 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 757 | 715 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 758 | PORT_DIPNAME( 0x0c, 0x0c, "Time" ) | |
| 716 | PORT_DIPNAME( 0x0c, 0x0c, "Time" ) PORT_DIPLOCATION("SWB:3,4") | |
| 759 | 717 | PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) |
| 760 | 718 | PORT_DIPSETTING( 0x08, "Fast" ) |
| 761 | 719 | PORT_DIPSETTING( 0x04, "Faster" ) |
| 762 | 720 | PORT_DIPSETTING( 0x00, "Fastest" ) |
| 763 | PORT_DIPNAME( 0x10, 0x10, "Unused SW 0-4" ) | |
| 764 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 765 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 766 | PORT_DIPNAME( 0x20, 0x20, "Unused SW 0-5" ) | |
| 767 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 768 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 769 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 721 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 770 | 722 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 771 | 723 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 772 | 724 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 775 | 727 | PORT_INCLUDE( system1_generic ) |
| 776 | 728 | |
| 777 | 729 | PORT_MODIFY("DSW1") |
| 778 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 779 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 780 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 781 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 730 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 782 | 731 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 783 | 732 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 784 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 733 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 785 | 734 | PORT_DIPSETTING( 0x0c, "3" ) |
| 786 | 735 | PORT_DIPSETTING( 0x08, "4" ) |
| 787 | 736 | PORT_DIPSETTING( 0x04, "5" ) |
| 788 | 737 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 789 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 738 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 790 | 739 | PORT_DIPSETTING( 0x30, "30000" ) |
| 791 | 740 | PORT_DIPSETTING( 0x20, "50000" ) |
| 792 | 741 | PORT_DIPSETTING( 0x10, "70000" ) |
| r3373 | r3374 | |
| 797 | 746 | PORT_INCLUDE( system1_generic ) |
| 798 | 747 | |
| 799 | 748 | PORT_MODIFY("DSW1") |
| 800 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 801 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 802 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 803 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 749 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 804 | 750 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 805 | 751 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 806 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 752 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 807 | 753 | PORT_DIPSETTING( 0x08, "2" ) |
| 808 | 754 | PORT_DIPSETTING( 0x0c, "3" ) |
| 809 | 755 | PORT_DIPSETTING( 0x04, "4" ) |
| 810 | 756 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 811 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 757 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 812 | 758 | PORT_DIPSETTING( 0x30, "40k, 120k and 480k" ) |
| 813 | 759 | PORT_DIPSETTING( 0x20, "50k and 200k" ) |
| 814 | 760 | PORT_DIPSETTING( 0x10, "100k only" ) |
| 815 | 761 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 816 | PORT_DIPNAME( 0x40, 0x40, "Reset Timer/Objects On Life Loss" ) | |
| 762 | PORT_DIPNAME( 0x40, 0x40, "Reset Timer/Objects On Life Loss" ) PORT_DIPLOCATION("SWB:7") | |
| 817 | 763 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) |
| 818 | 764 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 819 | 765 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 822 | 768 | PORT_INCLUDE( system1_generic ) |
| 823 | 769 | |
| 824 | 770 | PORT_MODIFY("DSW1") |
| 825 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 826 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 827 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 828 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 771 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 829 | 772 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 830 | 773 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 831 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 774 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 832 | 775 | PORT_DIPSETTING( 0x0c, "3" ) |
| 833 | 776 | PORT_DIPSETTING( 0x08, "4" ) |
| 834 | 777 | PORT_DIPSETTING( 0x04, "5" ) |
| 835 | 778 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 836 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) | |
| 779 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5") | |
| 837 | 780 | PORT_DIPSETTING( 0x10, "20000 50000" ) |
| 838 | 781 | PORT_DIPSETTING( 0x00, "30000 70000" ) |
| 839 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Allow_Continue ) ) | |
| 782 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWB:6") | |
| 840 | 783 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) |
| 841 | 784 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 842 | PORT_DIPNAME( 0x40, 0x40, "Time" ) | |
| 785 | PORT_DIPNAME( 0x40, 0x40, "Time" ) PORT_DIPLOCATION("SWB:7") | |
| 843 | 786 | PORT_DIPSETTING( 0x00, "2 Minutes" ) |
| 844 | 787 | PORT_DIPSETTING( 0x40, "3 Minutes" ) |
| 845 | PORT_DIPNAME( 0x80, 0x80, "Unused SW 0-7" ) | |
| 846 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 847 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 788 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SWB:8" ) | |
| 848 | 789 | INPUT_PORTS_END |
| 849 | 790 | |
| 850 | 791 | static INPUT_PORTS_START( pitfallu ) |
| 851 | 792 | PORT_INCLUDE( pitfall2 ) |
| 852 | 793 | |
| 853 | 794 | PORT_MODIFY("DSW1") |
| 854 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) | |
| 795 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:2,3") | |
| 855 | 796 | PORT_DIPSETTING( 0x06, "3" ) |
| 856 | 797 | PORT_DIPSETTING( 0x04, "4" ) |
| 857 | 798 | PORT_DIPSETTING( 0x02, "5" ) |
| 858 | 799 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 859 | PORT_DIPNAME( 0x18, 0x18, "Starting Stage" ) | |
| 800 | PORT_DIPNAME( 0x18, 0x18, "Starting Stage" ) PORT_DIPLOCATION("SWB:4,5") | |
| 860 | 801 | PORT_DIPSETTING( 0x18, "1" ) |
| 861 | 802 | PORT_DIPSETTING( 0x10, "2" ) |
| 862 | 803 | PORT_DIPSETTING( 0x08, "3" ) |
| r3373 | r3374 | |
| 873 | 814 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL |
| 874 | 815 | |
| 875 | 816 | PORT_MODIFY("DSW1") |
| 876 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 877 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 878 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 879 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 817 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 880 | 818 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 881 | 819 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 882 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 820 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 883 | 821 | PORT_DIPSETTING( 0x08, "2" ) |
| 884 | 822 | PORT_DIPSETTING( 0x0c, "3" ) |
| 885 | 823 | PORT_DIPSETTING( 0x04, "4" ) |
| 886 | 824 | PORT_DIPSETTING( 0x00, "240" ) |
| 887 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) | |
| 825 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5") | |
| 888 | 826 | PORT_DIPSETTING( 0x10, "20k 70k 120k 170k" ) |
| 889 | 827 | PORT_DIPSETTING( 0x00, "50k 100k 150k 200k" ) |
| 890 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Allow_Continue ) ) | |
| 828 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWB:6") | |
| 891 | 829 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) |
| 892 | 830 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 893 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 831 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 894 | 832 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 895 | 833 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 896 | 834 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 899 | 837 | PORT_INCLUDE( system1_generic ) |
| 900 | 838 | |
| 901 | 839 | PORT_MODIFY("DSW1") |
| 902 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 903 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 904 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 905 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 840 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 906 | 841 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 907 | 842 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 908 | PORT_DIPNAME( 0x0C, 0x0C, DEF_STR( Lives ) ) | |
| 843 | PORT_DIPNAME( 0x0C, 0x0C, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 909 | 844 | PORT_DIPSETTING( 0x0C, "3" ) |
| 910 | 845 | PORT_DIPSETTING( 0x08, "4" ) |
| 911 | 846 | PORT_DIPSETTING( 0x04, "5" ) |
| 912 | 847 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 913 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 848 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 914 | 849 | PORT_DIPSETTING( 0x30, "30000" ) |
| 915 | 850 | PORT_DIPSETTING( 0x20, "40000" ) |
| 916 | 851 | PORT_DIPSETTING( 0x10, "50000" ) |
| 917 | 852 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 918 | PORT_DIPNAME( 0x40, 0x40, "Unused SW 0-6" ) | |
| 919 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 920 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 921 | 853 | INPUT_PORTS_END |
| 922 | 854 | |
| 923 | 855 | static INPUT_PORTS_START( teddybb ) |
| r3373 | r3374 | |
| 932 | 864 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 933 | 865 | |
| 934 | 866 | PORT_MODIFY("DSW1") |
| 935 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 936 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 937 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 938 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) | |
| 867 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 939 | 868 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 940 | 869 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 941 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 870 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 942 | 871 | PORT_DIPSETTING( 0x08, "2" ) |
| 943 | 872 | PORT_DIPSETTING( 0x0c, "3" ) |
| 944 | 873 | PORT_DIPSETTING( 0x04, "4" ) |
| 945 | 874 | PORT_DIPSETTING( 0x00, "252" ) |
| 946 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 875 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 947 | 876 | PORT_DIPSETTING( 0x30, "100k 400k" ) |
| 948 | 877 | PORT_DIPSETTING( 0x20, "200k 600k" ) |
| 949 | 878 | PORT_DIPSETTING( 0x10, "400k 800k" ) |
| 950 | 879 | PORT_DIPSETTING( 0x00, "600k" ) |
| 951 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 880 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 952 | 881 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 953 | 882 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 954 | 883 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 965 | 894 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 966 | 895 | |
| 967 | 896 | PORT_MODIFY("DSW1") |
| 968 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 969 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 970 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 971 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 897 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 972 | 898 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 973 | 899 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 974 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 900 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 975 | 901 | PORT_DIPSETTING( 0x0c, "3" ) |
| 976 | 902 | PORT_DIPSETTING( 0x08, "4" ) |
| 977 | 903 | PORT_DIPSETTING( 0x04, "5" ) |
| 978 | 904 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 979 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 905 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 980 | 906 | PORT_DIPSETTING( 0x30, "50000 100000" ) |
| 981 | 907 | PORT_DIPSETTING( 0x20, "60000 120000" ) |
| 982 | 908 | PORT_DIPSETTING( 0x10, "70000 150000" ) |
| 983 | 909 | PORT_DIPSETTING( 0x00, "100000" ) |
| 984 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 910 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 985 | 911 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 986 | 912 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 987 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) | |
| 913 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWB:8") | |
| 988 | 914 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) |
| 989 | 915 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 990 | 916 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 1001 | 927 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 1002 | 928 | |
| 1003 | 929 | PORT_MODIFY("DSW1") |
| 1004 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1005 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1006 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1007 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 930 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 1008 | 931 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1009 | 932 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1010 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 933 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1011 | 934 | PORT_DIPSETTING( 0x0c, "3" ) |
| 1012 | 935 | PORT_DIPSETTING( 0x08, "4" ) |
| 1013 | 936 | PORT_DIPSETTING( 0x04, "5" ) |
| 1014 | 937 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 1015 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 938 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 1016 | 939 | PORT_DIPSETTING( 0x30, "30000" ) |
| 1017 | 940 | PORT_DIPSETTING( 0x20, "50000" ) |
| 1018 | 941 | PORT_DIPSETTING( 0x10, "70000" ) |
| 1019 | 942 | PORT_DIPSETTING( 0x00, "90000" ) |
| 1020 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 943 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 1021 | 944 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 1022 | 945 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 1023 | 946 | INPUT_PORTS_END |
| 1024 | 947 | |
| 1025 | static INPUT_PORTS_START( chplft ) | |
| 1026 | PORT_INCLUDE( system1_generic ) | |
| 1027 | ||
| 1028 | PORT_MODIFY("DSW1") | |
| 1029 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2,3,4") | |
| 1030 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) | |
| 1031 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 1032 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) | |
| 1033 | PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" ) | |
| 1034 | PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" ) | |
| 1035 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 1036 | PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" ) | |
| 1037 | PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" ) | |
| 1038 | PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" ) | |
| 1039 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) | |
| 1040 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 1041 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 1042 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 1043 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 1044 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 1045 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:5,6,7,8") | |
| 1046 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) | |
| 1047 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) | |
| 1048 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) | |
| 1049 | PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" ) | |
| 1050 | PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" ) | |
| 1051 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 1052 | PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" ) | |
| 1053 | PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" ) | |
| 1054 | PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" ) | |
| 1055 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) | |
| 1056 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 1057 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 1058 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 1059 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 1060 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 1061 | ||
| 1062 | PORT_MODIFY("DSW2") | |
| 1063 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1") | |
| 1064 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1065 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1066 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 1067 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1068 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1069 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1070 | PORT_DIPSETTING( 0x08, "2" ) | |
| 1071 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1072 | PORT_DIPSETTING( 0x04, "4" ) | |
| 1073 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 1074 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5") | |
| 1075 | PORT_DIPSETTING( 0x10, "20k 70k 120k 170k" ) | |
| 1076 | PORT_DIPSETTING( 0x00, "50k 100k 150k 200k" ) | |
| 1077 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:6") | |
| 1078 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 1079 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 1080 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:7") | |
| 1081 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1082 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1083 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWB:8") | |
| 1084 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1085 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1086 | INPUT_PORTS_END | |
| 1087 | ||
| 1088 | static INPUT_PORTS_START( shtngmst ) | |
| 1089 | PORT_INCLUDE( chplft ) | |
| 1090 | ||
| 1091 | PORT_MODIFY("P1") | |
| 1092 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1093 | ||
| 1094 | PORT_MODIFY("P2") | |
| 1095 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1096 | ||
| 1097 | PORT_MODIFY("DSW2") | |
| 1098 | PORT_DIPNAME( 0x01, 0x01, "DSW2" ) | |
| 1099 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1100 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1101 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 1102 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1103 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1104 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 1105 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1106 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1107 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 1108 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1109 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1110 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 1111 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 1112 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1113 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 1114 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1115 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1116 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 1117 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1118 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1119 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 1120 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1121 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1122 | ||
| 1123 | PORT_START("TRIGGER") /* trigger is in here */ | |
| 1124 | PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1125 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1126 | ||
| 1127 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 1128 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1129 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1130 | ||
| 1131 | PORT_START("GUNX") /* 1c */ | |
| 1132 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) | |
| 1133 | ||
| 1134 | PORT_START("GUNY") /* 1d */ | |
| 1135 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_REVERSE | |
| 1136 | ||
| 1137 | PORT_START("18") /* 18 */ | |
| 1138 | /* what is this? check the game code... */ | |
| 1139 | PORT_DIPNAME( 0x01, 0x01, "port 18" ) | |
| 1140 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1141 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1142 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 1143 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1144 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1145 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 1146 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1147 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1148 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 1149 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1150 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1151 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 1152 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 1153 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1154 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 1155 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1156 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1157 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 1158 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1159 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1160 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 1161 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1162 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1163 | INPUT_PORTS_END | |
| 1164 | ||
| 1165 | 948 | static INPUT_PORTS_START( 4dwarrio ) |
| 1166 | 949 | PORT_INCLUDE( system1_generic ) |
| 1167 | 950 | |
| 1168 | 951 | PORT_MODIFY("DSW1") |
| 1169 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1170 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1171 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1172 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) | |
| 952 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:2,3") | |
| 1173 | 953 | PORT_DIPSETTING( 0x06, "3" ) |
| 1174 | 954 | PORT_DIPSETTING( 0x04, "4" ) |
| 1175 | 955 | PORT_DIPSETTING( 0x02, "5" ) |
| 1176 | 956 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 1177 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Bonus_Life ) ) | |
| 957 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:4,5,6") | |
| 1178 | 958 | PORT_DIPSETTING( 0x38, "30000" ) |
| 1179 | 959 | PORT_DIPSETTING( 0x30, "40000" ) |
| 1180 | 960 | PORT_DIPSETTING( 0x28, "50000" ) |
| r3373 | r3374 | |
| 1183 | 963 | PORT_DIPSETTING( 0x10, "80000" ) |
| 1184 | 964 | PORT_DIPSETTING( 0x08, "90000" ) |
| 1185 | 965 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 1186 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 966 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 1187 | 967 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 1188 | 968 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 1189 | 969 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 1192 | 972 | PORT_INCLUDE( system1_generic ) |
| 1193 | 973 | |
| 1194 | 974 | PORT_MODIFY("DSW1") |
| 1195 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1196 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1197 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1198 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 975 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 1199 | 976 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1200 | 977 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1201 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 978 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1202 | 979 | PORT_DIPSETTING( 0x0c, "3" ) |
| 1203 | 980 | PORT_DIPSETTING( 0x08, "4" ) |
| 1204 | 981 | PORT_DIPSETTING( 0x04, "5" ) |
| 1205 | 982 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 1206 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 983 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:5") | |
| 1207 | 984 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 1208 | 985 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1209 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 986 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:6") | |
| 1210 | 987 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1211 | 988 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1212 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 989 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:7") | |
| 1213 | 990 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1214 | 991 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1215 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 992 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:8") | |
| 1216 | 993 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1217 | 994 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1218 | 995 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 1221 | 998 | PORT_INCLUDE( system1_generic ) |
| 1222 | 999 | |
| 1223 | 1000 | PORT_MODIFY("DSW1") |
| 1224 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1225 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1226 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1227 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 1228 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1229 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1230 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 1231 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1232 | PORT_DIPSETTING( 0x08, "4" ) | |
| 1233 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1234 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) | |
| 1235 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 1236 | PORT_DIPSETTING( 0x30, "5k, 20k and 30k" ) | |
| 1237 | PORT_DIPSETTING( 0x20, "10k, 25k and 50k" ) | |
| 1238 | PORT_DIPSETTING( 0x10, "15k, 30k and 60k" ) | |
| 1239 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1240 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 1241 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) | |
| 1242 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 1243 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) /* Manual states "Always On" */ | |
| 1244 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1245 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1001 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 1002 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1003 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1004 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1005 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1006 | PORT_DIPSETTING( 0x08, "4" ) | |
| 1007 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1008 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) | |
| 1009 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 1010 | PORT_DIPSETTING( 0x30, "5k, 20k and 30k" ) | |
| 1011 | PORT_DIPSETTING( 0x20, "10k, 25k and 50k" ) | |
| 1012 | PORT_DIPSETTING( 0x10, "15k, 30k and 60k" ) | |
| 1013 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1014 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 1015 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) | |
| 1016 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 1017 | /* Manual states "Always On" */ | |
| 1018 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:8") | |
| 1019 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1020 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1246 | 1021 | INPUT_PORTS_END |
| 1247 | 1022 | |
| 1248 | 1023 | static INPUT_PORTS_START( raflesia ) |
| 1249 | 1024 | PORT_INCLUDE( system1_generic ) |
| 1250 | 1025 | |
| 1251 | 1026 | PORT_MODIFY("DSW1") |
| 1252 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1253 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1254 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1255 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 1027 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 1256 | 1028 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1257 | 1029 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1258 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 1030 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1259 | 1031 | PORT_DIPSETTING( 0x0c, "3" ) |
| 1260 | 1032 | PORT_DIPSETTING( 0x08, "4" ) |
| 1261 | 1033 | PORT_DIPSETTING( 0x04, "5" ) |
| 1262 | 1034 | PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) |
| 1263 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 1035 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5,6") | |
| 1264 | 1036 | PORT_DIPSETTING( 0x30, "20k, 70k and 120k" ) |
| 1265 | 1037 | PORT_DIPSETTING( 0x20, "30k, 80k and 150k" ) |
| 1266 | 1038 | PORT_DIPSETTING( 0x10, "50k, 100k and 200k" ) |
| 1267 | 1039 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 1268 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) /* Manual lists this dip as "Unused" */ | |
| 1269 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1270 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1271 | 1040 | INPUT_PORTS_END |
| 1272 | 1041 | |
| 1273 | 1042 | static INPUT_PORTS_START( wboy ) |
| r3373 | r3374 | |
| 1290 | 1059 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL |
| 1291 | 1060 | |
| 1292 | 1061 | PORT_MODIFY("DSW1") |
| 1293 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW B:1") | |
| 1294 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1295 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1296 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW B:2") | |
| 1062 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 1297 | 1063 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1298 | 1064 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1299 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 1065 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW | |
| 1300 | 1066 | PORT_DIPSETTING( 0x0c, "3" ) |
| 1301 | 1067 | PORT_DIPSETTING( 0x08, "4" ) |
| 1302 | 1068 | PORT_DIPSETTING( 0x04, "5" ) |
| 1303 | 1069 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 1304 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Bonus_Life ) ) | |
| 1070 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW | |
| 1305 | 1071 | PORT_DIPSETTING( 0x10, "30k 100k 170k 240k" ) |
| 1306 | 1072 | PORT_DIPSETTING( 0x00, "30k 120k 210k 300k" ) |
| 1307 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Allow_Continue ) ) | |
| 1073 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW | |
| 1308 | 1074 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 1309 | 1075 | PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) |
| 1310 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 1076 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW | |
| 1311 | 1077 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 1312 | 1078 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 1313 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW B:8") | |
| 1314 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1315 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1079 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SWB:8" ) | |
| 1316 | 1080 | INPUT_PORTS_END |
| 1317 | 1081 | |
| 1318 | 1082 | static INPUT_PORTS_START( wboy3 ) |
| 1319 | 1083 | PORT_INCLUDE( wboy ) |
| 1320 | 1084 | |
| 1321 | 1085 | PORT_MODIFY("DSW1") /* DSW0 */ |
| 1322 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 1086 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW | |
| 1323 | 1087 | PORT_DIPSETTING( 0x0c, "1" ) |
| 1324 | 1088 | PORT_DIPSETTING( 0x08, "2" ) |
| 1325 | 1089 | PORT_DIPSETTING( 0x04, "3" ) |
| 1326 | 1090 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 1327 | 1091 | INPUT_PORTS_END |
| 1328 | 1092 | |
| 1329 | static INPUT_PORTS_START( wboysys2 ) | |
| 1330 | PORT_INCLUDE( chplft ) | |
| 1331 | ||
| 1332 | PORT_MODIFY("P1") | |
| 1333 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1334 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1335 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ | |
| 1336 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ | |
| 1337 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 1338 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 1339 | ||
| 1340 | PORT_MODIFY("P2") | |
| 1341 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1342 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 1343 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ | |
| 1344 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ | |
| 1345 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 1346 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 1347 | ||
| 1348 | PORT_MODIFY("DSW2") | |
| 1349 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW B:1") | |
| 1350 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1351 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1352 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW B:2") | |
| 1353 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1354 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1355 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW B:3,4") | |
| 1356 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1357 | PORT_DIPSETTING( 0x08, "4" ) | |
| 1358 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1359 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 1360 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW B:5") | |
| 1361 | PORT_DIPSETTING( 0x10, "30k 100k 170k 240k" ) | |
| 1362 | PORT_DIPSETTING( 0x00, "30k 120k 210k 300k" ) | |
| 1363 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW B:6") | |
| 1364 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 1365 | PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) | |
| 1366 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW B:7") | |
| 1367 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) | |
| 1368 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 1369 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW B:8") | |
| 1370 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1371 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1372 | INPUT_PORTS_END | |
| 1373 | ||
| 1374 | 1093 | /* same as wboy, additional Energy Consumption switch */ |
| 1375 | 1094 | static INPUT_PORTS_START( wbdeluxe ) |
| 1376 | 1095 | PORT_INCLUDE( wboy ) |
| 1377 | 1096 | |
| 1378 | 1097 | PORT_MODIFY("P1") |
| 1379 | 1098 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Has to be 0 otherwise the game resets */ |
| 1380 | | |
| 1099 | | |
| 1381 | 1100 | PORT_MODIFY("DSW1") |
| 1382 | PORT_DIPNAME( 0x80, 0x00, "Energy Consumption" ) | |
| 1101 | PORT_DIPNAME( 0x80, 0x00, "Energy Consumption" ) PORT_DIPLOCATION("SW | |
| 1383 | 1102 | PORT_DIPSETTING( 0x00, "Slow" ) |
| 1384 | 1103 | PORT_DIPSETTING( 0x80, "Fast" ) |
| 1385 | 1104 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 1388 | 1107 | PORT_INCLUDE( wboy ) |
| 1389 | 1108 | |
| 1390 | 1109 | PORT_MODIFY("DSW2") |
| 1391 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1110 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1") | |
| 1392 | 1111 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1393 | 1112 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1394 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) | |
| 1113 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:2,3") | |
| 1395 | 1114 | PORT_DIPSETTING( 0x00, "2" ) |
| 1396 | 1115 | PORT_DIPSETTING( 0x06, "3" ) |
| 1397 | 1116 | PORT_DIPSETTING( 0x04, "4" ) |
| 1398 | 1117 | PORT_DIPSETTING( 0x02, "5" ) |
| 1399 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 1118 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:4") | |
| 1400 | 1119 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1401 | 1120 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1402 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 1121 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:5") | |
| 1403 | 1122 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 1404 | 1123 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1405 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 1124 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:6") | |
| 1406 | 1125 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1407 | 1126 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1408 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 1127 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:7") | |
| 1409 | 1128 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1410 | 1129 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1411 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 1130 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:8") | |
| 1412 | 1131 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1413 | 1132 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1414 | 1133 | |
| 1415 | 1134 | PORT_MODIFY("DSW1") |
| 1416 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) | |
| 1135 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SWA:1,2,3") | |
| 1417 | 1136 | PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) ) |
| 1418 | 1137 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) |
| 1419 | 1138 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_2C ) ) |
| r3373 | r3374 | |
| 1422 | 1141 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_2C ) ) |
| 1423 | 1142 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) |
| 1424 | 1143 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) ) |
| 1425 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 1144 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWA:4") | |
| 1426 | 1145 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1427 | 1146 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1428 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Allow_Continue ) ) | |
| 1147 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWA:5") | |
| 1429 | 1148 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 1430 | 1149 | PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) |
| 1431 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 1150 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWA:6") | |
| 1432 | 1151 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1433 | 1152 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1434 | PORT_DIPNAME( 0xc0, 0xc0, "Mode" ) | |
| 1153 | PORT_DIPNAME( 0xc0, 0xc0, "Mode" ) PORT_DIPLOCATION("SWA:7,8") | |
| 1435 | 1154 | PORT_DIPSETTING( 0xc0, "Normal Game" ) |
| 1436 | 1155 | PORT_DIPSETTING( 0x80, DEF_STR( Free_Play ) ) |
| 1437 | 1156 | PORT_DIPSETTING( 0x40, "Test Mode" ) |
| 1438 | 1157 | PORT_DIPSETTING( 0x00, "Endless Game" ) |
| 1439 | 1158 | INPUT_PORTS_END |
| 1440 | 1159 | |
| 1160 | static INPUT_PORTS_START( noboranb ) | |
| 1161 | PORT_INCLUDE( system1_generic ) | |
| 1162 | ||
| 1163 | PORT_MODIFY("P1") | |
| 1164 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) // shot | |
| 1165 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) // fly | |
| 1166 | ||
| 1167 | PORT_MODIFY("P2") | |
| 1168 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // shot | |
| 1169 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL // fly | |
| 1170 | ||
| 1171 | PORT_MODIFY("DSW2") | |
| 1172 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2") | |
| 1173 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) | |
| 1174 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) | |
| 1175 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) | |
| 1176 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) | |
| 1177 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:3,4") | |
| 1178 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) | |
| 1179 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) | |
| 1180 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) | |
| 1181 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) | |
| 1182 | PORT_DIPNAME( 0x30, 0x20, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWA:5,6") | |
| 1183 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 1184 | PORT_DIPSETTING( 0x30, DEF_STR( Medium ) ) | |
| 1185 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 1186 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1187 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWA:7") | |
| 1188 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1189 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) | |
| 1190 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWA:8") | |
| 1191 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1192 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1193 | ||
| 1194 | PORT_MODIFY("DSW1") | |
| 1195 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:1,2") | |
| 1196 | PORT_DIPSETTING( 0x02, "2" ) | |
| 1197 | PORT_DIPSETTING( 0x03, "3" ) | |
| 1198 | PORT_DIPSETTING( 0x01, "5" ) | |
| 1199 | PORT_DIPSETTING( 0x00, "99" ) | |
| 1200 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1201 | PORT_DIPSETTING( 0x08, "40k, 80k, 120k and 160k" ) | |
| 1202 | PORT_DIPSETTING( 0x0c, "50k, 100k and 150k" ) | |
| 1203 | PORT_DIPSETTING( 0x04, "60k, 120k and 180k" ) | |
| 1204 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1205 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWB:5") | |
| 1206 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 1207 | PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) | |
| 1208 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SWB:6") | |
| 1209 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1210 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1211 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SWB:8" ) | |
| 1212 | INPUT_PORTS_END | |
| 1213 | ||
| 1214 | static INPUT_PORTS_START( chplft ) | |
| 1215 | PORT_INCLUDE( system1_generic ) | |
| 1216 | ||
| 1217 | PORT_MODIFY("DSW1") | |
| 1218 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2,3,4") | |
| 1219 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) | |
| 1220 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 1221 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) | |
| 1222 | PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" ) | |
| 1223 | PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" ) | |
| 1224 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 1225 | PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" ) | |
| 1226 | PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" ) | |
| 1227 | PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" ) | |
| 1228 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) | |
| 1229 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 1230 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 1231 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 1232 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 1233 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 1234 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:5,6,7,8") | |
| 1235 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) | |
| 1236 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) | |
| 1237 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) | |
| 1238 | PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" ) | |
| 1239 | PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" ) | |
| 1240 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 1241 | PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" ) | |
| 1242 | PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" ) | |
| 1243 | PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" ) | |
| 1244 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) | |
| 1245 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 1246 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 1247 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 1248 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 1249 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 1250 | ||
| 1251 | PORT_MODIFY("DSW2") | |
| 1252 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1") | |
| 1253 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1254 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1255 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 1256 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1257 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1258 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1259 | PORT_DIPSETTING( 0x08, "2" ) | |
| 1260 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1261 | PORT_DIPSETTING( 0x04, "4" ) | |
| 1262 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 1263 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5") | |
| 1264 | PORT_DIPSETTING( 0x10, "20k 70k 120k 170k" ) | |
| 1265 | PORT_DIPSETTING( 0x00, "50k 100k 150k 200k" ) | |
| 1266 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:6") | |
| 1267 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 1268 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 1269 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SWB:7" ) | |
| 1270 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SWB:8" ) | |
| 1271 | INPUT_PORTS_END | |
| 1272 | ||
| 1273 | static INPUT_PORTS_START( shtngmst ) | |
| 1274 | PORT_INCLUDE( chplft ) | |
| 1275 | ||
| 1276 | PORT_MODIFY("P1") | |
| 1277 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1278 | ||
| 1279 | PORT_MODIFY("P2") | |
| 1280 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1281 | ||
| 1282 | PORT_MODIFY("DSW2") | |
| 1283 | PORT_DIPNAME( 0x01, 0x01, "DSW2" ) PORT_DIPLOCATION("SWB:1") | |
| 1284 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1285 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1286 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:2") | |
| 1287 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1288 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1289 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:3") | |
| 1290 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1291 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1292 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:4") | |
| 1293 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1294 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1295 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:5") | |
| 1296 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 1297 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1298 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:6") | |
| 1299 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1300 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1301 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:7") | |
| 1302 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1303 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1304 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:8") | |
| 1305 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1306 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1307 | ||
| 1308 | PORT_START("TRIGGER") /* trigger is in here */ | |
| 1309 | PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1310 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1311 | ||
| 1312 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 1313 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1314 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1315 | ||
| 1316 | PORT_START("GUNX") /* 1c */ | |
| 1317 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) | |
| 1318 | ||
| 1319 | PORT_START("GUNY") /* 1d */ | |
| 1320 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_REVERSE | |
| 1321 | ||
| 1322 | PORT_START("18") /* 18 */ | |
| 1323 | /* what is this? check the game code... */ | |
| 1324 | PORT_DIPNAME( 0x01, 0x01, "port 18" ) | |
| 1325 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1326 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1327 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 1328 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1329 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1330 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 1331 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1332 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1333 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 1334 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1335 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1336 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 1337 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 1338 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1339 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 1340 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1341 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1342 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 1343 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1344 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1345 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 1346 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1347 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1348 | INPUT_PORTS_END | |
| 1349 | ||
| 1350 | static INPUT_PORTS_START( wboysys2 ) | |
| 1351 | PORT_INCLUDE( chplft ) | |
| 1352 | ||
| 1353 | PORT_MODIFY("P1") | |
| 1354 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1355 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1356 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ | |
| 1357 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ | |
| 1358 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 1359 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 1360 | ||
| 1361 | PORT_MODIFY("P2") | |
| 1362 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1363 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 1364 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ | |
| 1365 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ | |
| 1366 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 1367 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 1368 | ||
| 1369 | PORT_MODIFY("DSW2") | |
| 1370 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1371 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1372 | PORT_DIPSETTING( 0x08, "4" ) | |
| 1373 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1374 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 1375 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5") | |
| 1376 | PORT_DIPSETTING( 0x10, "30k 100k 170k 240k" ) | |
| 1377 | PORT_DIPSETTING( 0x00, "30k 120k 210k 300k" ) | |
| 1378 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWB:6") | |
| 1379 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 1380 | PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) | |
| 1381 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7") | |
| 1382 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) | |
| 1383 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 1384 | INPUT_PORTS_END | |
| 1385 | ||
| 1441 | 1386 | /* Notes about the bootleg version (as this is the only "working" one) : |
| 1442 | 1387 | |
| 1443 | 1388 | Coinage is almost the same as the other Sega games. |
| r3373 | r3374 | |
| 1493 | 1438 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(60) PORT_KEYDELTA(15) PORT_REVERSE PORT_COCKTAIL |
| 1494 | 1439 | |
| 1495 | 1440 | PORT_MODIFY("SYSTEM") |
| 1441 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1496 | 1442 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1497 | 1443 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1498 | 1444 | |
| 1499 | 1445 | PORT_MODIFY("DSW2") |
| 1500 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1501 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1502 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1503 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) | |
| 1446 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 1504 | 1447 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1505 | 1448 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 1506 | PORT_DIPNAME( 0x04, 0x04, "Unused SW 0-2" ) | |
| 1507 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1508 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1509 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Lives ) ) | |
| 1449 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:4") | |
| 1510 | 1450 | PORT_DIPSETTING( 0x08, "2" ) |
| 1511 | 1451 | PORT_DIPSETTING( 0x00, "3" ) |
| 1512 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) | |
| 1452 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5") | |
| 1513 | 1453 | PORT_DIPSETTING( 0x10, "10k 30k 60k 100k 150k" ) |
| 1514 | 1454 | PORT_DIPSETTING( 0x00, "30k 50k 100k 200k 300k" ) |
| 1515 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Allow_Continue ) ) | |
| 1455 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWB:6") | |
| 1516 | 1456 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) |
| 1517 | 1457 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 1518 | PORT_DIPNAME( 0x40, 0x40, "Unused SW 0-6" ) | |
| 1519 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1520 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1521 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) | |
| 1458 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SWB:8" ) | |
| 1522 | 1459 | INPUT_PORTS_END |
| 1523 | 1460 | |
| 1524 | 1461 | static INPUT_PORTS_START( tokisens ) |
| 1525 | 1462 | PORT_INCLUDE( chplft ) |
| 1526 | 1463 | |
| 1527 | 1464 | PORT_MODIFY("DSW2") |
| 1528 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1529 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1530 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1531 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) | |
| 1465 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 1532 | 1466 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1533 | 1467 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 1534 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 1468 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1535 | 1469 | PORT_DIPSETTING( 0x00, "1" ) |
| 1536 | 1470 | PORT_DIPSETTING( 0x08, "2" ) |
| 1537 | 1471 | PORT_DIPSETTING( 0x0c, "3" ) |
| 1538 | 1472 | PORT_DIPSETTING( 0x04, "4" ) |
| 1539 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 1473 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:5") | |
| 1540 | 1474 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 1541 | 1475 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1542 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 1476 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:6") | |
| 1543 | 1477 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1544 | 1478 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1545 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 1479 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:7") | |
| 1546 | 1480 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1547 | 1481 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1548 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 1482 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:8") | |
| 1549 | 1483 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1550 | 1484 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1551 | 1485 | INPUT_PORTS_END |
| r3373 | r3374 | |
| 1554 | 1488 | PORT_INCLUDE( chplft ) |
| 1555 | 1489 | |
| 1556 | 1490 | PORT_MODIFY("DSW2") |
| 1557 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1558 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1559 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1560 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) | |
| 1491 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2") | |
| 1561 | 1492 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1562 | 1493 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 1563 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 1494 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1564 | 1495 | PORT_DIPSETTING( 0x04, "3" ) |
| 1565 | 1496 | PORT_DIPSETTING( 0x0c, "4" ) |
| 1566 | 1497 | PORT_DIPSETTING( 0x08, "5" ) |
| 1567 | 1498 | /* 0x00 gives 4 lives */ |
| 1568 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) | |
| 1499 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:5") | |
| 1569 | 1500 | PORT_DIPSETTING( 0x10, "30000 100000 200000" ) |
| 1570 | 1501 | PORT_DIPSETTING( 0x00, "50000 150000 250000" ) |
| 1571 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Difficulty ) ) | |
| 1502 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:6") | |
| 1572 | 1503 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) |
| 1573 | 1504 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 1574 | PORT_DIPNAME( 0x40, 0x40, "Test Mode" ) | |
| 1505 | PORT_DIPNAME( 0x40, 0x40, "Test Mode" ) PORT_DIPLOCATION("SWB:7") | |
| 1575 | 1506 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1576 | 1507 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1577 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 1508 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:8") | |
| 1578 | 1509 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1579 | 1510 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1580 | 1511 | INPUT_PORTS_END |
| 1581 | 1512 | |
| 1582 | static INPUT_PORTS_START( noboranb ) | |
| 1583 | PORT_INCLUDE( system1_generic ) | |
| 1584 | ||
| 1585 | PORT_MODIFY("P1") | |
| 1586 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) // shot | |
| 1587 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) // fly | |
| 1588 | ||
| 1589 | PORT_MODIFY("P2") | |
| 1590 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // shot | |
| 1591 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL // fly | |
| 1592 | ||
| 1593 | PORT_MODIFY("DSW2") | |
| 1594 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) | |
| 1595 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) | |
| 1596 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) | |
| 1597 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) | |
| 1598 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) | |
| 1599 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) | |
| 1600 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) | |
| 1601 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) | |
| 1602 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) | |
| 1603 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) | |
| 1604 | PORT_DIPNAME( 0x30, 0x20, DEF_STR( Difficulty ) ) | |
| 1605 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 1606 | PORT_DIPSETTING( 0x30, DEF_STR( Medium ) ) | |
| 1607 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 1608 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1609 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) | |
| 1610 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1611 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) | |
| 1612 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) | |
| 1613 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1614 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1615 | ||
| 1616 | PORT_MODIFY("DSW1") | |
| 1617 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) | |
| 1618 | PORT_DIPSETTING( 0x02, "2" ) | |
| 1619 | PORT_DIPSETTING( 0x03, "3" ) | |
| 1620 | PORT_DIPSETTING( 0x01, "5" ) | |
| 1621 | PORT_DIPSETTING( 0x00, "99" ) | |
| 1622 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 1623 | PORT_DIPSETTING( 0x08, "40k, 80k, 120k and 160k" ) | |
| 1624 | PORT_DIPSETTING( 0x0c, "50k, 100k and 150k" ) | |
| 1625 | PORT_DIPSETTING( 0x04, "60k, 120k and 180k" ) | |
| 1626 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1627 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Allow_Continue ) ) | |
| 1628 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 1629 | PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) | |
| 1630 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Free_Play ) ) | |
| 1631 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1632 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1633 | PORT_DIPNAME( 0x40, 0x40, "Unused SW 0-6" ) | |
| 1634 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1635 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1636 | PORT_DIPNAME( 0x80, 0x80, "Unused SW 0-7" ) | |
| 1637 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1638 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1639 | INPUT_PORTS_END | |
| 1640 | ||
| 1641 | 1513 | /* |
| 1642 | 1514 | |
| 1643 | 1515 | To enter Test Mode all DIP Switches in DSW1 must be ON (example Difficulty = Easy) |
| r3373 | r3374 | |
| 1654 | 1526 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL |
| 1655 | 1527 | |
| 1656 | 1528 | PORT_MODIFY("DSW2") |
| 1657 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Difficulty ) ) | |
| 1529 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:1,2") | |
| 1658 | 1530 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| 1659 | 1531 | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) |
| 1660 | 1532 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) |
| 1661 | 1533 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) |
| 1662 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 1534 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:3,4") | |
| 1663 | 1535 | PORT_DIPSETTING( 0x0c, "3" ) |
| 1664 | 1536 | PORT_DIPSETTING( 0x04, "4" ) |
| 1665 | 1537 | // PORT_DIPSETTING( 0x08, "4" ) |
| 1666 | 1538 | PORT_DIPSETTING( 0x00, "5" ) |
| 1667 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) | |
| 1539 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:5") | |
| 1668 | 1540 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1669 | 1541 | PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) |
| 1670 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Allow_Continue ) ) | |
| 1542 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWB:6") | |
| 1671 | 1543 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) |
| 1672 | 1544 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 1673 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 1545 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:7") | |
| 1674 | 1546 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1675 | 1547 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1676 | PORT_DIPNAME( 0x80, 0x80, "Invulnerability" ) | |
| 1548 | PORT_DIPNAME( 0x80, 0x80, "Invulnerability" ) PORT_DIPLOCATION("SWB:8") | |
| 1677 | 1549 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1678 | 1550 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1679 | 1551 | INPUT_PORTS_END |
| r3373 | r3374 | |
|---|---|---|
| 184 | 184 | static WRITE8_HANDLER( tmpz84c011_0_dir_pe_w ) { pio_dir[4] = data; } |
| 185 | 185 | |
| 186 | 186 | |
| 187 | static void ctc0_interrupt( | |
| 187 | static void ctc0_interrupt(const device_ | |
| 188 | 188 | { |
| 189 | cpu | |
| 189 | cputag_set_input_line(device->machine, "audio", 0, state); | |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | static z80ctc_interface ctc_intf = |
| 193 | 193 | { |
| 194 | 1, /* clock */ | |
| 194 | "audio", /* clock from the audio CPU */ | |
| 195 | 0, /* clock */ | |
| 195 | 196 | 0, /* timer disables */ |
| 196 | 197 | ctc0_interrupt, /* interrupt handler */ |
| 197 | z80ctc_ | |
| 198 | z80ctc_ | |
| 198 | 199 | 0, /* ZC/TO1 callback */ |
| 199 | 200 | 0, /* ZC/TO2 callback */ |
| 200 | 201 | }; |
| 201 | 202 | |
| 202 | static void tmpz84c011_init(running_machine *machine) | |
| 203 | { | |
| 204 | // initialize the CTC | |
| 205 | ctc_intf.baseclock = cpunum_get_clock(1); | |
| 206 | z80ctc_init(0, &ctc_intf); | |
| 207 | } | |
| 208 | ||
| 209 | 203 | static MACHINE_RESET( niyanpai ) |
| 210 | 204 | { |
| 211 | 205 | int i; |
| r3373 | r3374 | |
| 232 | 226 | // sound program patch |
| 233 | 227 | SNDROM[0x0213] = 0x00; // DI -> NOP |
| 234 | 228 | |
| 235 | // initialize TMPZ84C011 PIO and CTC | |
| 236 | tmpz84c011_init(machine); | |
| 237 | ||
| 238 | 229 | // initialize sound rom bank |
| 239 | 230 | niyanpai_soundbank_w(machine, 0); |
| 240 | 231 | |
| r3373 | r3374 | |
| 494 | 485 | |
| 495 | 486 | static ADDRESS_MAP_START( sound_io_map, ADDRESS_SPACE_IO, 8 ) |
| 496 | 487 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 497 | AM_RANGE(0x10, 0x13) AM_READWRITE(z80ctc_ | |
| 488 | AM_RANGE(0x10, 0x13) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_ | |
| 498 | 489 | AM_RANGE(0x50, 0x50) AM_READWRITE(tmpz84c011_0_pa_r, tmpz84c011_0_pa_w) |
| 499 | 490 | AM_RANGE(0x51, 0x51) AM_READWRITE(tmpz84c011_0_pb_r, tmpz84c011_0_pb_w) |
| 500 | 491 | AM_RANGE(0x52, 0x52) AM_READWRITE(tmpz84c011_0_pc_r, tmpz84c011_0_pc_w) |
| r3373 | r3374 | |
| 866 | 857 | cpunum_set_input_line(machine, 0, 1, HOLD_LINE); |
| 867 | 858 | } |
| 868 | 859 | |
| 869 | static const | |
| 860 | static const | |
| 870 | 861 | { |
| 871 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* device 0 = CTC_1 */ | |
| 872 | { 0, 0, 0, 0, -1 } /* end mark */ | |
| 862 | { Z80CTC, "ctc" }, | |
| 863 | { NULL } | |
| 873 | 864 | }; |
| 874 | 865 | |
| 875 | 866 | |
| r3373 | r3374 | |
| 885 | 876 | MDRV_CPU_PROGRAM_MAP(sound_readmem, sound_writemem) |
| 886 | 877 | MDRV_CPU_IO_MAP(sound_io_map,0) |
| 887 | 878 | |
| 879 | MDRV_Z80CTC_ADD("ctc", ctc_intf) | |
| 880 | ||
| 888 | 881 | MDRV_MACHINE_RESET(niyanpai) |
| 889 | 882 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 890 | 883 |
| r3373 | r3374 | |
|---|---|---|
| 714 | 714 | |
| 715 | 715 | ROM_REGION( 0x100000, "gfx3", ROMREGION_DISPOSE | ROMREGION_INVERT) /* 8x8x8 Foreground */ |
| 716 | 716 | ROM_LOAD( "pdx2_u092.bin", 0x00000, 0x80000, CRC(d6797812) SHA1(b2d463b5932501382abcbbd911c492b6671c3cf7) ) |
| 717 | ROM_LOAD( "pdx2_u093.bin", 0x | |
| 717 | ROM_LOAD( "pdx2_u093.bin", 0x80000, 0x80000, | |
| 718 | 718 | |
| 719 | 719 | ROM_REGION( 0x40000, "gfx4", ROMREGION_DISPOSE | ROMREGION_INVERT) /* 8x8x8 Midground */ |
| 720 | 720 | ROM_LOAD( "pdx2_u110.bin", 0x00000, 0x20000, CRC(59e828d1) SHA1(fd76c5a74e1be22bde52bcfbce179dc73591bec3) ) |
| r3373 | r3374 | |
|---|---|---|
| 66 | 66 | * |
| 67 | 67 | *************************************/ |
| 68 | 68 | |
| 69 | static READ8_HANDLER( dsr_r ) | |
| 69 | static READ8_DEVICE_HANDLER( dsr_r ) | |
| 70 | 70 | { |
| 71 | 71 | /* return DSR0-7 */ |
| 72 | 72 | return (ds << sh) | (dr >> (8 - sh)); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | |
| 76 | static READ8_HANDLER( input_mux0_r ) | |
| 76 | static READ8_DEVICE_HANDLER( input_mux0_r ) | |
| 77 | 77 | { |
| 78 | 78 | /* low value in the given bit selects */ |
| 79 | 79 | if (!(input_mux & 0x01)) |
| 80 | return input_port_read(machine, "MUX0"); | |
| 80 | return input_port_read(device->machine, "MUX0"); | |
| 81 | 81 | else if (!(input_mux & 0x02)) |
| 82 | return input_port_read(machine, "MUX1"); | |
| 82 | return input_port_read(device->machine, "MUX1"); | |
| 83 | 83 | else if (!(input_mux & 0x04)) |
| 84 | return input_port_read(machine, "MUX2"); | |
| 84 | return input_port_read(device->machine, "MUX2"); | |
| 85 | 85 | return 0xff; |
| 86 | 86 | } |
| 87 | 87 | |
| r3373 | r3374 | |
| 93 | 93 | * |
| 94 | 94 | *************************************/ |
| 95 | 95 | |
| 96 | static WRITE8_HANDLER( misc_w ) | |
| 96 | static WRITE8_DEVICE_HANDLER( misc_w ) | |
| 97 | 97 | { |
| 98 | 98 | /* bit 7 = di */ |
| 99 | 99 | di = (data >> 7) & 1; |
| 100 | 100 | if (!di) |
| 101 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 101 | cpunum_set_input_line(device->machine, 0, 0, CLEAR_LINE); | |
| 102 | 102 | |
| 103 | 103 | /* bit 6 = parata */ |
| 104 | 104 | |
| r3373 | r3374 | |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | |
| 119 | static WRITE8_HANDLER( sound_w ) | |
| 119 | static WRITE8_DEVICE_HANDLER( sound_w ) | |
| 120 | 120 | { |
| 121 | 121 | /* bit 7 = stop palla */ |
| 122 | 122 | /* bit 6 = contrasto */ |
| r3373 | r3374 | |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | |
| 133 | static WRITE8_HANDLER( pb_w ) | |
| 133 | static WRITE8_DEVICE_HANDLER( pb_w ) | |
| 134 | 134 | { |
| 135 | 135 | /* write PB0-7 */ |
| 136 | 136 | logerror("%04X:pb_w(%02X)\n", activecpu_get_previouspc(), data); |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | |
| 140 | static WRITE8_HANDLER( shr_w ) | |
| 140 | static WRITE8_DEVICE_HANDLER( shr_w ) | |
| 141 | 141 | { |
| 142 | 142 | /* bit 3 = watchdog */ |
| 143 | 143 | if (data & 0x08) |
| 144 | watchdog_reset(machine); | |
| 144 | watchdog_reset(device->machine); | |
| 145 | 145 | |
| 146 | 146 | /* bit 2-0 = SH0-2 */ |
| 147 | 147 | sh = data & 0x07; |
| r3373 | r3374 | |
| 158 | 158 | static READ8_HANDLER( ioread ) |
| 159 | 159 | { |
| 160 | 160 | if (offset & 0x08) |
| 161 | return ppi8255_r(dev | |
| 161 | return ppi8255_r(devtag_ge | |
| 162 | 162 | else if (offset & 0x10) |
| 163 | return ppi8255_r(dev | |
| 163 | return ppi8255_r(devtag_ge | |
| 164 | 164 | return 0xff; |
| 165 | 165 | } |
| 166 | 166 | |
| r3373 | r3374 | |
| 168 | 168 | static WRITE8_HANDLER( iowrite ) |
| 169 | 169 | { |
| 170 | 170 | if (offset & 0x08) |
| 171 | ppi8255_w(dev | |
| 171 | ppi8255_w(devtag_ge | |
| 172 | 172 | else if (offset & 0x10) |
| 173 | ppi8255_w(dev | |
| 173 | ppi8255_w(devtag_ge | |
| 174 | 174 | else if (offset & 0x40) |
| 175 | 175 | { |
| 176 | 176 | dr = ds; |
| r3373 | r3374 | |
| 199 | 199 | { |
| 200 | 200 | NULL, |
| 201 | 201 | NULL, |
| 202 | | |
| 202 | DEVICE8_PORT("IN0"), | |
| 203 | 203 | sound_w, |
| 204 | 204 | pb_w, |
| 205 | 205 | shr_w |
| r3373 | r3374 | |
| 300 | 300 | MDRV_CPU_IO_MAP(io_map,0) |
| 301 | 301 | MDRV_CPU_VBLANK_INT("main", dribling_irq_gen) |
| 302 | 302 | |
| 303 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 304 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 303 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 304 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 305 | 305 | |
| 306 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 307 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 308 | ||
| 309 | 306 | /* video hardware */ |
| 310 | 307 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| 311 | 308 |
| r3373 | r3374 | |
|---|---|---|
| 420 | 420 | static UINT8 port_b_data; |
| 421 | 421 | static UINT8 wss1_data,wss2_data; |
| 422 | 422 | |
| 423 | static READ8_HANDLER( port_a_r ) | |
| 423 | static READ8_DEVICE_HANDLER( port_a_r ) | |
| 424 | 424 | { |
| 425 | 425 | if(!(port_b_data & 0x80))//??? |
| 426 | 426 | { |
| r3373 | r3374 | |
| 436 | 436 | } |
| 437 | 437 | else//keyboard emulation |
| 438 | 438 | { |
| 439 | cpunum_set_input_line(machine, 0,1,PULSE_LINE); | |
| 439 | cpunum_set_input_line(device->machine, 0,1,PULSE_LINE); | |
| 440 | 440 | return 0x00;//Keyboard is disconnected |
| 441 | 441 | //return 0xaa;//Keyboard code |
| 442 | 442 | } |
| 443 | 443 | } |
| 444 | 444 | |
| 445 | static READ8_HANDLER( port_b_r ) | |
| 445 | static READ8_DEVICE_HANDLER( port_b_r ) | |
| 446 | 446 | { |
| 447 | 447 | return port_b_data; |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | static READ8_HANDLER( port_c_r ) | |
| 450 | static READ8_DEVICE_HANDLER( port_c_r ) | |
| 451 | 451 | { |
| 452 | 452 | return wss2_data;//??? |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | static WRITE8_HANDLER( port_b_w ) | |
| 455 | static WRITE8_DEVICE_HANDLER( port_b_w ) | |
| 456 | 456 | { |
| 457 | 457 | port_b_data = data; |
| 458 | 458 | } |
| 459 | 459 | |
| 460 | static WRITE8_HANDLER( wss_1_w ) | |
| 460 | static WRITE8_DEVICE_HANDLER( wss_1_w ) | |
| 461 | 461 | { |
| 462 | 462 | wss1_data = data; |
| 463 | 463 | } |
| 464 | 464 | |
| 465 | static WRITE8_HANDLER( wss_2_w ) | |
| 465 | static WRITE8_DEVICE_HANDLER( wss_2_w ) | |
| 466 | 466 | { |
| 467 | 467 | wss2_data = data; |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | static WRITE8_HANDLER( sys_reset_w ) | |
| 470 | static WRITE8_DEVICE_HANDLER( sys_reset_w ) | |
| 471 | 471 | { |
| 472 | cpunum_set_input_line(machine, 0,INPUT_LINE_RESET,PULSE_LINE); | |
| 472 | cpunum_set_input_line(device->machine, 0,INPUT_LINE_RESET,PULSE_LINE); | |
| 473 | 473 | } |
| 474 | 474 | |
| 475 | 475 | |
| r3373 | r3374 | |
| 752 | 752 | MDRV_DEVICE_ADD( "pit8253", PIT8253 ) |
| 753 | 753 | MDRV_DEVICE_CONFIG( pc_pit8253_config ) |
| 754 | 754 | |
| 755 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 756 | MDRV_DEVICE_CONFIG( filetto_ppi8255_intf[0] ) | |
| 755 | MDRV_PPI8255_ADD( "ppi8255_0", filetto_ppi8255_intf[0] ) | |
| 756 | MDRV_PPI8255_ADD( "ppi8255_1", filetto_ppi8255_intf[1] ) | |
| 757 | 757 | |
| 758 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 759 | MDRV_DEVICE_CONFIG( filetto_ppi8255_intf[1] ) | |
| 760 | ||
| 761 | 758 | MDRV_GFXDECODE(filetto) |
| 762 | 759 | |
| 763 | 760 | MDRV_SCREEN_ADD("main", RASTER) |
| r3373 | r3374 | |
|---|---|---|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | |
| 62 | static READ8_HANDLER( portC_r ) | |
| 62 | static READ8_DEVICE_HANDLER( portC_r ) | |
| 63 | 63 | { |
| 64 | 64 | return 4; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | static READ8_HANDLER( port1_r ) | |
| 67 | static READ8_DEVICE_HANDLER( port1_r ) | |
| 68 | 68 | { |
| 69 | return input_port_read(machine, "IN0") | (ticket_dispenser_0_r(machine, 0) >> 5); | |
| 69 | return input_port_read(device->machine, "IN0") | (ticket_dispenser_0_r(device->machine, 0) >> 5); | |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | static WRITE8_HANDLER( lamps_w ) | |
| 72 | static WRITE8_DEVICE_HANDLER( lamps_w ) | |
| 73 | 73 | { |
| 74 | 74 | /* 5 button lamps */ |
| 75 | 75 | set_led_status(0,data & 0x01); |
| r3373 | r3374 | |
| 83 | 83 | set_led_status(7,data & 0x80); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | static WRITE8_HANDLER( sound_w ) | |
| 86 | static WRITE8_DEVICE_HANDLER( sound_w ) | |
| 87 | 87 | { |
| 88 | 88 | /* bit 3 - coin lockout (lamp6 in test modes, set to lamp 10 as in getrivia.c) */ |
| 89 | 89 | coin_lockout_global_w(~data & 0x08); |
| 90 | 90 | set_led_status(9,data & 0x08); |
| 91 | 91 | |
| 92 | 92 | /* bit 5 - ticket out in trivia games */ |
| 93 | ticket_dispenser_w(machine, 0, (data & 0x20)<< 2); | |
| 93 | ticket_dispenser_w(device->machine, 0, (data & 0x20)<< 2); | |
| 94 | 94 | |
| 95 | 95 | /* bit 6 enables NMI */ |
| 96 | interrupt_enable_w(machine, 0,data & 0x40); | |
| 96 | interrupt_enable_w(device->machine, 0,data & 0x40); | |
| 97 | 97 | |
| 98 | 98 | /* bit 7 goes directly to the sound amplifier */ |
| 99 | 99 | dac_data_w(0,((data & 0x80) >> 7) * 255); |
| r3373 | r3374 | |
| 105 | 105 | static const ppi8255_interface ppi8255_intf[2] = |
| 106 | 106 | { |
| 107 | 107 | { |
| 108 | | |
| 108 | DEVICE8_PORT("DSWA"), | |
| 109 | 109 | port1_r, /* Port B read */ |
| 110 | 110 | NULL, /* Port C read */ |
| 111 | 111 | NULL, /* Port A write */ |
| r3373 | r3374 | |
| 113 | 113 | sound_w, /* Port C write */ |
| 114 | 114 | }, |
| 115 | 115 | { |
| 116 | | |
| 116 | DEVICE8_PORT("IN1"), | |
| 117 | 117 | NULL, /* Port B read */ |
| 118 | 118 | portC_r, /* Port C read */ |
| 119 | 119 | NULL, /* Port A write */ |
| r3373 | r3374 | |
| 471 | 471 | MDRV_VIDEO_START(generic_bitmapped) |
| 472 | 472 | MDRV_VIDEO_UPDATE(generic_bitmapped) |
| 473 | 473 | |
| 474 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 475 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 474 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 475 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 476 | 476 | |
| 477 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 478 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 479 | ||
| 480 | 477 | /* sound hardware */ |
| 481 | 478 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 482 | 479 |
| r3373 | r3374 | |
|---|---|---|
| 48 | 48 | |
| 49 | 49 | static VIDEO_UPDATE( superdq ) |
| 50 | 50 | { |
| 51 | render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00); | |
| 52 | ||
| 53 | 51 | tilemap_draw(bitmap,cliprect,superdq_tilemap,0,0); |
| 54 | 52 | |
| 55 | 53 | return 0; |
| r3373 | r3374 | |
| 142 | 140 | |
| 143 | 141 | superdq_color_bank = ( data & 2 ) ? 1 : 0; |
| 144 | 142 | |
| 145 | for( i = 0; i < sizeof( black_color_entries ); i++ ) | |
| 146 | render_container_set_palette_alpha(render_container_get_screen(machine->primary_screen), black_color_entries[i], (data&0x80) ? 0x00 : 0xff ); | |
| 143 | for( i = 0; i < ARRAY_LENGTH( black_color_entries ); i++ ) | |
| 144 | { | |
| 145 | int index = black_color_entries[i]; | |
| 146 | if (data & 0x80) | |
| 147 | palette_set_color(machine, index, palette_get_color(machine, index) & MAKE_ARGB(0,255,255,255)); | |
| 148 | else | |
| 149 | palette_set_color(machine, index, palette_get_color(machine, index) | MAKE_ARGB(255,0,0,0)); | |
| 150 | } | |
| 147 | 151 | |
| 148 | 152 | /* |
| 149 | 153 | bit 5 = DISP1? |
| r3373 | r3374 | |
|---|---|---|
| 933 | 933 | }; |
| 934 | 934 | |
| 935 | 935 | |
| 936 | static READ8_DEVICE_HANDLER( sound_latch_r ) { return soundlatch_r(device->machine, offset); } | |
| 937 | ||
| 936 | 938 | static const ppi8255_interface congo_ppi_intf = |
| 937 | 939 | { |
| 938 | soundlatch_r, | |
| 940 | sound_latch_r, | |
| 939 | 941 | NULL, |
| 940 | 942 | NULL, |
| 941 | 943 | NULL, |
| r3373 | r3374 | |
| 990 | 992 | |
| 991 | 993 | MDRV_MACHINE_START(zaxxon) |
| 992 | 994 | |
| 993 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 994 | MDRV_DEVICE_CONFIG( zaxxon_ppi_intf ) | |
| 995 | MDRV_PPI8255_ADD( "ppi8255", zaxxon_ppi_intf ) | |
| 995 | 996 | |
| 996 | 997 | /* video hardware */ |
| 997 | 998 | MDRV_GFXDECODE(zaxxon) |
| r3373 | r3374 | |
| 1049 | 1050 | MDRV_CPU_MODIFY("main") |
| 1050 | 1051 | MDRV_CPU_PROGRAM_MAP(congo_map, 0) |
| 1051 | 1052 | |
| 1052 | MDRV_DEVICE_MODIFY( "ppi8255", PPI8255 ) | |
| 1053 | MDRV_DEVICE_CONFIG( congo_ppi_intf ) | |
| 1053 | MDRV_PPI8255_RECONFIG( "ppi8255", congo_ppi_intf ) | |
| 1054 | 1054 | |
| 1055 | 1055 | MDRV_CPU_ADD("audio", Z80, SOUND_CLOCK) |
| 1056 | 1056 | MDRV_CPU_PROGRAM_MAP(congo_sound_map,0) |
| r3373 | r3374 | |
|---|---|---|
| 60 | 60 | static READ16_HANDLER( misc_io_r ); |
| 61 | 61 | static WRITE16_HANDLER( misc_io_w ); |
| 62 | 62 | |
| 63 | static READ8_HANDLER( unknown_porta_r ); | |
| 64 | static READ8_HANDLER( unknown_portb_r ); | |
| 65 | static READ8_HANDLER( unknown_portc_r ); | |
| 66 | static WRITE8_HANDLER( unknown_porta_w ); | |
| 67 | static WRITE8_HANDLER( unknown_portb_w ); | |
| 68 | static WRITE8_HANDLER( video_control_w ); | |
| 63 | static READ8_DEVICE_HANDLER( unknown_porta_r ); | |
| 64 | static READ8_DEVICE_HANDLER( unknown_portb_r ); | |
| 65 | static READ8_DEVICE_HANDLER( unknown_portc_r ); | |
| 66 | static WRITE8_DEVICE_HANDLER( unknown_porta_w ); | |
| 67 | static WRITE8_DEVICE_HANDLER( unknown_portb_w ); | |
| 68 | static WRITE8_DEVICE_HANDLER( video_control_w ); | |
| 69 | 69 | |
| 70 | 70 | |
| 71 | 71 | |
| r3373 | r3374 | |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | |
| 290 | static READ8_HANDLER( unknown_porta_r ) | |
| 290 | static READ8_DEVICE_HANDLER( unknown_porta_r ) | |
| 291 | 291 | { |
| 292 | 292 | log_unknown_ppi_read(0); |
| 293 | 293 | return 0; |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | |
| 297 | static READ8_HANDLER( unknown_portb_r ) | |
| 297 | static READ8_DEVICE_HANDLER( unknown_portb_r ) | |
| 298 | 298 | { |
| 299 | 299 | log_unknown_ppi_read(1); |
| 300 | 300 | return 0; |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | |
| 304 | static READ8_HANDLER( unknown_portc_r ) | |
| 304 | static READ8_DEVICE_HANDLER( unknown_portc_r ) | |
| 305 | 305 | { |
| 306 | 306 | log_unknown_ppi_read(2); |
| 307 | 307 | return 0; |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | |
| 311 | static WRITE8_HANDLER( unknown_porta_w ) | |
| 311 | static WRITE8_DEVICE_HANDLER( unknown_porta_w ) | |
| 312 | 312 | { |
| 313 | 313 | log_unknown_ppi_write(0, data); |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | |
| 317 | static WRITE8_HANDLER( unknown_portb_w ) | |
| 317 | static WRITE8_DEVICE_HANDLER( unknown_portb_w ) | |
| 318 | 318 | { |
| 319 | 319 | log_unknown_ppi_write(1, data); |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | |
| 323 | static WRITE8_HANDLER( video_control_w ) | |
| 323 | static WRITE8_DEVICE_HANDLER( video_control_w ) | |
| 324 | 324 | { |
| 325 | 325 | /* Output port: |
| 326 | 326 | D7: SG1 -- connects to sprite chip |
| r3373 | r3374 | |
| 330 | 330 | D1: (CONT) - affects sprite hardware |
| 331 | 331 | D0: Sound section reset (1= normal operation, 0= reset) |
| 332 | 332 | */ |
| 333 | segaic16_set_display_enable(machine, data & 0x20); | |
| 333 | segaic16_set_display_enable(device->machine, data & 0x20); | |
| 334 | 334 | adc_select = (data >> 2) & 7; |
| 335 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); | |
| 335 | cpunum_set_input_line(device->machine, 2, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); | |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | |
| r3373 | r3374 | |
| 369 | 369 | switch (offset & 0x70/2) |
| 370 | 370 | { |
| 371 | 371 | case 0x00/2: |
| 372 | return ppi8255_r(dev | |
| 372 | return ppi8255_r(devtag_ge | |
| 373 | 373 | |
| 374 | 374 | case 0x10/2: |
| 375 | 375 | { |
| r3373 | r3374 | |
| 399 | 399 | { |
| 400 | 400 | case 0x00/2: |
| 401 | 401 | if (ACCESSING_BITS_0_7) |
| 402 | ppi8255_w(dev | |
| 402 | ppi8255_w(devtag_ge | |
| 403 | 403 | return; |
| 404 | 404 | |
| 405 | 405 | case 0x20/2: |
| r3373 | r3374 | |
| 818 | 818 | MDRV_MACHINE_RESET(outrun) |
| 819 | 819 | MDRV_INTERLEAVE(100) |
| 820 | 820 | |
| 821 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 822 | MDRV_DEVICE_CONFIG( single_ppi_intf ) | |
| 821 | MDRV_PPI8255_ADD( "ppi8255", single_ppi_intf ) | |
| 823 | 822 | |
| 824 | 823 | /* video hardware */ |
| 825 | 824 | MDRV_GFXDECODE(segaorun) |
| r3373 | r3374 | |
|---|---|---|
| 31 | 31 | the Z180, but the cpu core doesn't support that yet. |
| 32 | 32 | * Is the clock divide 3 or 4? |
| 33 | 33 | |
| 34 | Versions known to exist but not dumped: v1.03 | |
| 34 | Versions known to exist but not dumped: v1.03 | |
| 35 | 35 | |
| 36 | 36 | ***************************************************************************/ |
| 37 | 37 | |
| r3373 | r3374 | |
| 324 | 324 | * |
| 325 | 325 | *************************************/ |
| 326 | 326 | |
| 327 | ROM_START( 20pacgal ) /* Version 1.0 | |
| 327 | ROM_START( 20pacgal ) /* Version 1.04 */ | |
| 328 | 328 | ROM_REGION( 0x100000, "main", 0 ) |
| 329 | ROM_LOAD( "20th_104.u13", 0x00000, 0x40000, CRC(6c474d2d) SHA1(5a150fc9d2ed0e908385b9f9d532aa33cf80dba4) ) | |
| 330 | ||
| 331 | ROM_REGION( 0x8000, "proms", 0 ) /* palette */ | |
| 332 | ROM_LOAD( "20th_101.u14", 0x0000, 0x8000, CRC(c19d9ad0) SHA1(002581fbc2c32cdf7cfb0b0f64061591a462ec14) ) | |
| 333 | ROM_END | |
| 334 | ||
| 335 | ROM_START( 20pacgaa ) /* Version 1.01 */ | |
| 336 | ROM_REGION( 0x100000, "main", 0 ) | |
| 329 | 337 | ROM_LOAD( "20th_101.u13", 0x00000, 0x40000, CRC(77159582) SHA1(c05e005a941cbdc806dcd76b315069362c792a72) ) |
| 330 | 338 | |
| 331 | 339 | ROM_REGION( 0x8000, "proms", 0 ) /* palette */ |
| r3373 | r3374 | |
| 340 | 348 | * |
| 341 | 349 | *************************************/ |
| 342 | 350 | |
| 343 | GAME( 2000, 20pacgal, 0, 20pacgal, 20pacgal, 0, ROT90, "Namco", "Ms. Pac-Man/Galaga - 20 Year Reunion", GAME_IMPERFECT_GRAPHICS ) | |
| 351 | GAME( 2000, 20pacgal, 0, 20pacgal, 20pacgal, 0, ROT90, "Namco", "Ms. Pac-Man/Galaga - 20 Year Reunion (V1.04)", GAME_IMPERFECT_GRAPHICS ) | |
| 352 | GAME( 2000, 20pacgaa, 20pacgal, 20pacgal, 20pacgal, 0, ROT90, "Namco", "Ms. Pac-Man/Galaga - 20 Year Reunion (V1.01)", GAME_IMPERFECT_GRAPHICS ) |
| r3373 | r3374 | |
|---|---|---|
| 470 | 470 | AM_RANGE(0x04, 0x04) AM_MIRROR(0x78) AM_READ_PORT("MONO.IP4") |
| 471 | 471 | AM_RANGE(0x05, 0x05) AM_MIRROR(0x78) AM_WRITE(mcrmono_control_port_w) |
| 472 | 472 | AM_RANGE(0x07, 0x07) AM_MIRROR(0x78) AM_WRITE(watchdog_reset_w) |
| 473 | AM_RANGE(0xf0, 0xf3) AM_MIRROR(0x0c) AM_READWRITE(z80ctc_ | |
| 473 | AM_RANGE(0xf0, 0xf3) AM_MIRROR(0x0c) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_ | |
| 474 | 474 | ADDRESS_MAP_END |
| 475 | 475 | |
| 476 | 476 | |
| r3373 | r3374 | |
| 500 | 500 | AM_RANGE(0x84, 0x86) AM_WRITE(mcr_scroll_value_w) |
| 501 | 501 | AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) |
| 502 | 502 | AM_RANGE(0xe8, 0xe8) AM_WRITE(SMH_NOP) |
| 503 | AM_RANGE(0xf0, 0xf3) AM_READWRITE(z80ctc_ | |
| 503 | AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_ | |
| 504 | 504 | ADDRESS_MAP_END |
| 505 | 505 | |
| 506 | 506 | |
| r3373 | r3374 | |
| 1056 | 1056 | MDRV_CPU_CONFIG(mcr_daisy_chain) |
| 1057 | 1057 | MDRV_CPU_VBLANK_INT_HACK(mcr_interrupt,2) |
| 1058 | 1058 | |
| 1059 | MDRV_Z80CTC_ADD("ctc", mcr_ctc_intf) | |
| 1060 | ||
| 1059 | 1061 | MDRV_WATCHDOG_VBLANK_INIT(16) |
| 1060 | 1062 | MDRV_MACHINE_START(mcr) |
| 1061 | 1063 | MDRV_MACHINE_RESET(mcr) |
| r3373 | r3374 | |
|---|---|---|
| 168 | 168 | |
| 169 | 169 | INPUT_PORTS_END |
| 170 | 170 | |
| 171 | static WRITE8_HANDLER(vidctrl_w) | |
| 171 | static WRITE8_DEVICE_HANDLER(vidctrl_w) | |
| 172 | 172 | { |
| 173 | 173 | vidctrl=data; |
| 174 | 174 | } |
| r3373 | r3374 | |
| 197 | 197 | vram1[offset]=data; |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | static READ8_HANDLER(protection_r) | |
| 200 | static READ8_DEVICE_HANDLER(protection_r) | |
| 201 | 201 | { |
| 202 | 202 | return fromMCU; |
| 203 | 203 | } |
| r3373 | r3374 | |
| 207 | 207 | toMCU = param; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | static WRITE8_HANDLER(protection_w) | |
| 210 | static WRITE8_DEVICE_HANDLER(protection_w) | |
| 211 | 211 | { |
| 212 | 212 | timer_call_after_resynch(NULL, data, protection_deferred_w); |
| 213 | 213 | cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100)); |
| r3373 | r3374 | |
| 232 | 232 | |
| 233 | 233 | static ADDRESS_MAP_START( sound_port, ADDRESS_SPACE_IO, 8 ) |
| 234 | 234 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 235 | AM_RANGE(0x00, 0x03) AM_READ(z80ctc_ | |
| 235 | AM_RANGE(0x00, 0x03) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_ | |
| 236 | 236 | AM_RANGE(0x06, 0x07) AM_NOP |
| 237 | 237 | ADDRESS_MAP_END |
| 238 | 238 | |
| r3373 | r3374 | |
| 285 | 285 | GFXDECODE_ENTRY( "gfx2", 0, layout_8x8x3, 0x100, 32 ) // 3bpp tiles |
| 286 | 286 | GFXDECODE_END |
| 287 | 287 | |
| 288 | static void ctc0_interrupt( | |
| 288 | static void ctc0_interrupt(const device_ | |
| 289 | 289 | { |
| 290 | cpu | |
| 290 | cputag_set_input_line(device->machine, "audio", 0, state); | |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | static z80ctc_interface ctc_intf = | |
| 293 | static const z80ctc_interface ctc_intf = | |
| 294 | 294 | { |
| 295 | 1, // clock | |
| 295 | "audio", // clock from audio CPU | |
| 296 | 0, // clock | |
| 296 | 297 | 0, // timer disables |
| 297 | 298 | ctc0_interrupt, // interrupt handler |
| 298 | 299 | 0, // ZC/TO0 callback |
| r3373 | r3374 | |
| 300 | 301 | 0, // ZC/TO2 callback |
| 301 | 302 | }; |
| 302 | 303 | |
| 303 | static const | |
| 304 | static const | |
| 304 | 305 | { |
| 305 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* device 0 = CTC_1 */ | |
| 306 | { 0, 0, 0, 0, -1 } /* end mark */ | |
| 306 | { Z80CTC, "ctc" }, | |
| 307 | { NULL } | |
| 307 | 308 | }; |
| 308 | 309 | |
| 309 | 310 | static const ppi8255_interface ppi8255_intf[3] = |
| 310 | 311 | { |
| 311 | 312 | { |
| 312 | | |
| 313 | DEVICE8_PORT("P1"), | |
| 313 | 314 | NULL, /* Port B read */ |
| 314 | 315 | NULL, /* Port C read */ |
| 315 | 316 | NULL, /* Port A write */ |
| r3373 | r3374 | |
| 317 | 318 | vidctrl_w /* Port C write */ |
| 318 | 319 | }, |
| 319 | 320 | { |
| 320 | input_port_1_r, /* Port A read */ | |
| 321 | input_port_2_r, /* Port B read */ | |
| 321 | DEVICE8_PORT("DSW1"), /* Port A read */ | |
| 322 | DEVICE8_PORT("DSW2"), /* Port B read */ | |
| 322 | 323 | protection_r, /* Port C read */ |
| 323 | 324 | NULL, /* Port A write */ |
| 324 | 325 | NULL, /* Port B write */ |
| r3373 | r3374 | |
| 363 | 364 | } |
| 364 | 365 | } |
| 365 | 366 | |
| 366 | static MACHINE_RESET( pipeline ) | |
| 367 | { | |
| 368 | ctc_intf.baseclock = cpunum_get_clock(0); | |
| 369 | z80ctc_init(0, &ctc_intf); | |
| 370 | } | |
| 371 | ||
| 372 | 367 | static MACHINE_DRIVER_START( pipeline ) |
| 373 | 368 | /* basic machine hardware */ |
| 374 | 369 | |
| r3373 | r3374 | |
| 384 | 379 | MDRV_CPU_ADD("mcu", M68705, 7372800/2) |
| 385 | 380 | MDRV_CPU_PROGRAM_MAP(mcu_mem, 0) |
| 386 | 381 | |
| 387 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 388 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 382 | MDRV_Z80CTC_ADD( "ctc", ctc_intf ) | |
| 389 | 383 | |
| 390 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 391 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 384 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 385 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 386 | MDRV_PPI8255_ADD( "ppi8255_2", ppi8255_intf[2] ) | |
| 392 | 387 | |
| 393 | MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) | |
| 394 | MDRV_DEVICE_CONFIG( ppi8255_intf[2] ) | |
| 395 | ||
| 396 | 388 | /* video hardware */ |
| 397 | 389 | MDRV_SCREEN_ADD("main", RASTER) |
| 398 | 390 | MDRV_SCREEN_REFRESH_RATE(60) |
| r3373 | r3374 | |
| 403 | 395 | |
| 404 | 396 | MDRV_GFXDECODE(pipeline) |
| 405 | 397 | |
| 406 | MDRV_MACHINE_RESET(pipeline) | |
| 407 | ||
| 408 | 398 | MDRV_PALETTE_INIT(pipeline) |
| 409 | 399 | MDRV_PALETTE_LENGTH(0x100+0x100) |
| 410 | 400 |
| r3373 | r3374 | |
|---|---|---|
| 592 | 592 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) |
| 593 | 593 | PORT_DIPSETTING( 0x00, "3" ) |
| 594 | 594 | PORT_DIPSETTING( 0x02, "5" ) |
| 595 | PORT_BIT( 0xfc, 0x00, IPT_ | |
| 595 | PORT_BIT( 0xfc, 0x00, IPT_SPECIAL ) PORT_CUS | |
| 596 | 596 | |
| 597 | 597 | PORT_START("IN2") |
| 598 | 598 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r3373 | r3374 | |
| 608 | 608 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 609 | 609 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 610 | 610 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 611 | ||
| 612 | PORT_START("DIAL") | |
| 613 | PORT_BIT( 0xfc, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) /* scrambled dial */ | |
| 611 | 614 | INPUT_PORTS_END |
| 612 | 615 | |
| 613 | 616 | static INPUT_PORTS_START( tazmania ) |
| r3373 | r3374 | |
| 1091 | 1094 | |
| 1092 | 1095 | MDRV_MACHINE_RESET(scramble) |
| 1093 | 1096 | |
| 1094 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1095 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[0] ) | |
| 1097 | MDRV_PPI8255_ADD( "ppi8255_0", scramble_ppi_0_intf ) | |
| 1098 | MDRV_PPI8255_ADD( "ppi8255_1", scramble_ppi_1_intf ) | |
| 1096 | 1099 | |
| 1097 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1098 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[1] ) | |
| 1099 | ||
| 1100 | 1100 | /* video hardware */ |
| 1101 | 1101 | MDRV_SCREEN_ADD("main", RASTER) |
| 1102 | 1102 | MDRV_SCREEN_REFRESH_RATE(16000.0/132/2) |
| r3373 | r3374 | |
| 1183 | 1183 | MDRV_IMPORT_FROM(type2) |
| 1184 | 1184 | |
| 1185 | 1185 | /* device config overrides */ |
| 1186 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 1187 | MDRV_DEVICE_CONFIG( stratgyx_ppi8255_intf[0] ) | |
| 1186 | MDRV_PPI8255_RECONFIG( "ppi8255_1", stratgyx_ppi_1_intf ) | |
| 1188 | 1187 | |
| 1189 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 1190 | MDRV_DEVICE_CONFIG( stratgyx_ppi8255_intf[1] ) | |
| 1191 | ||
| 1192 | 1188 | /* video hardware */ |
| 1193 | 1189 | MDRV_PALETTE_LENGTH(32+64+2+8) /* 32 for characters, 64 for stars, 2 for bullets, 8 for background */ |
| 1194 | 1190 | |
| r3373 | r3374 | |
| 1202 | 1198 | /* basic machine hardware */ |
| 1203 | 1199 | MDRV_IMPORT_FROM(type2) |
| 1204 | 1200 | |
| 1205 | /* device config overrides */ | |
| 1206 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 1207 | MDRV_DEVICE_CONFIG( darkplnt_ppi8255_intf[0] ) | |
| 1208 | ||
| 1209 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 1210 | MDRV_DEVICE_CONFIG( darkplnt_ppi8255_intf[1] ) | |
| 1211 | ||
| 1212 | 1201 | /* video hardware */ |
| 1213 | 1202 | MDRV_PALETTE_LENGTH(32+64+2) /* 32 for characters, 64 (buffer) for stars, 2 for bullets */ |
| 1214 | 1203 | |
| r3373 | r3374 | |
| 1230 | 1219 | MDRV_MACHINE_RESET(scramble) |
| 1231 | 1220 | |
| 1232 | 1221 | /* device config overrides */ |
| 1233 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1234 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[0] ) | |
| 1222 | MDRV_PPI8255_ADD( "ppi8255_0", scramble_ppi_0_intf ) | |
| 1223 | MDRV_PPI8255_ADD( "ppi8255_1", scramble_ppi_1_intf ) | |
| 1235 | 1224 | |
| 1236 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1237 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[1] ) | |
| 1238 | ||
| 1239 | 1225 | /* video hardware */ |
| 1240 | 1226 | MDRV_SCREEN_ADD("main", RASTER) |
| 1241 | 1227 | MDRV_SCREEN_REFRESH_RATE(16000.0/132/2) |
| r3373 | r3374 | |
|---|---|---|
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | |
| 321 | static WRITE8_HANDLER( konami_sound_control_w ) | |
| 321 | static WRITE8_DEVICE_HANDLER( konami_sound_control_w ) | |
| 322 | 322 | { |
| 323 | 323 | UINT8 old = konami_sound_control; |
| 324 | 324 | konami_sound_control = data; |
| r3373 | r3374 | |
| 326 | 326 | /* the inverse of bit 3 clocks the flip flop to signal an INT */ |
| 327 | 327 | /* it is automatically cleared on the acknowledge */ |
| 328 | 328 | if ((old & 0x08) && !(data & 0x08)) |
| 329 | cpunum_set_input_line(machine, 1, 0, HOLD_LINE); | |
| 329 | cpunum_set_input_line(device->machine, 1, 0, HOLD_LINE); | |
| 330 | 330 | |
| 331 | 331 | /* bit 4 is sound disable */ |
| 332 | 332 | sound_global_enable(~data & 0x10); |
| r3373 | r3374 | |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | |
| 389 | static RE | |
| 389 | static WRITE | |
| 390 | 390 | { |
| 391 | // logerror("%04X:ppi0_porta_r\n", activecpu_get_pc()); | |
| 392 | return input_port_read(machine, "IN0"); | |
| 391 | logerror("%04X:ppi0_portc_w = %02X\n", activecpu_get_pc(), data); | |
| 393 | 392 | } |
| 394 | 393 | |
| 395 | 394 | |
| 396 | static RE | |
| 395 | static WRITE | |
| 397 | 396 | { |
| 398 | // logerror("%04X:ppi0_portb_r\n", activecpu_get_pc()); | |
| 399 | return input_port_read(machine, "IN1"); | |
| 397 | logerror("%04X:ppi1_portc_w = %02X\n", activecpu_get_pc(), data); | |
| 400 | 398 | } |
| 401 | 399 | |
| 402 | 400 | |
| 403 | static RE | |
| 401 | static WRITE | |
| 404 | 402 | { |
| 405 | logerror("%04X:ppi0_portc_r\n", activecpu_get_pc()); | |
| 406 | return input_port_read(machine, "IN2"); | |
| 403 | soundlatch_w(device->machine, offset, data); | |
| 407 | 404 | } |
| 408 | 405 | |
| 409 | 406 | |
| 410 | static | |
| 407 | static const ppi8255_interface konami_ppi8255_0_intf = | |
| 411 | 408 | { |
| 412 | logerror("%04X:ppi1_portc_r\n", activecpu_get_pc()); | |
| 413 | return input_port_read(machine, "IN3"); | |
| 414 | } | |
| 409 | DEVICE8_PORT("IN0"), /* Port A read */ | |
| 410 | DEVICE8_PORT("IN1"), /* Port B read */ | |
| 411 | DEVICE8_PORT("IN2"), /* Port C read */ | |
| 412 | NULL, /* Port A write */ | |
| 413 | NULL, /* Port B write */ | |
| 414 | konami_portc_0_w /* Port C write */ | |
| 415 | }; | |
| 415 | 416 | |
| 416 | 417 | |
| 417 | static | |
| 418 | static const ppi8255_interface konami_ppi8255_1_intf = | |
| 418 | 419 | { |
| 419 | logerror("%04X:ppi0_portc_w = %02X\n", activecpu_get_pc(), data); | |
| 420 | } | |
| 421 | ||
| 422 | ||
| 423 | static WRITE8_HANDLER( konami_portc_1_w ) | |
| 424 | { | |
| 425 | logerror("%04X:ppi1_portc_w = %02X\n", activecpu_get_pc(), data); | |
| 426 | } | |
| 427 | ||
| 428 | ||
| 429 | static const ppi8255_interface konami_ppi8255_intf[2] = | |
| 430 | { | |
| 431 | { | |
| 432 | konami_porta_0_r, /* Port A read */ | |
| 433 | konami_portb_0_r, /* Port B read */ | |
| 434 | konami_portc_0_r, /* Port C read */ | |
| 435 | NULL, /* Port A write */ | |
| 436 | NULL, /* Port B write */ | |
| 437 | konami_portc_0_w /* Port C write */ | |
| 438 | }, | |
| 439 | { | |
| 440 | NULL, /* Port A read */ | |
| 441 | NULL, /* Port B read */ | |
| 442 | konami_portc_1_r, /* Port C read */ | |
| 443 | soundlatch_w, /* Port A write */ | |
| 444 | konami_sound_control_w, /* Port B write */ | |
| 445 | konami_portc_1_w /* Port C write */ | |
| 446 | } | |
| 420 | NULL, /* Port A read */ | |
| 421 | NULL, /* Port B read */ | |
| 422 | DEVICE8_PORT("IN3"), /* Port C read */ | |
| 423 | sound_latch_w, /* Port A write */ | |
| 424 | konami_sound_control_w, /* Port B write */ | |
| 425 | konami_portc_1_w /* Port C write */ | |
| 447 | 426 | }; |
| 448 | 427 | |
| 449 | 428 | |
| r3373 | r3374 | |
| 458 | 437 | { |
| 459 | 438 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 460 | 439 | UINT8 result = 0xff; |
| 461 | if (offset & 0x0100) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), offset & 3); | |
| 462 | if (offset & 0x0200) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), offset & 3); | |
| 440 | if (offset & 0x0100) result &= ppi8255_r(devtag_get_device(machine, PPI8255, "ppi8255_0"), offset & 3); | |
| 441 | if (offset & 0x0200) result &= ppi8255_r(devtag_get_device(machine, PPI8255, "ppi8255_1"), offset & 3); | |
| 463 | 442 | return result; |
| 464 | 443 | } |
| 465 | 444 | |
| r3373 | r3374 | |
| 467 | 446 | static WRITE8_HANDLER( theend_ppi8255_w ) |
| 468 | 447 | { |
| 469 | 448 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 470 | if (offset & 0x0100) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), offset & 3, data); | |
| 471 | if (offset & 0x0200) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), offset & 3, data); | |
| 449 | if (offset & 0x0100) ppi8255_w(devtag_get_device(machine, PPI8255, "ppi8255_0"), offset & 3, data); | |
| 450 | if (offset & 0x0200) ppi8255_w(devtag_get_device(machine, PPI8255, "ppi8255_1"), offset & 3, data); | |
| 472 | 451 | } |
| 473 | 452 | |
| 474 | 453 | |
| 475 | static WRITE8_HANDLER( theend_coin_counter_w ) | |
| 454 | static WRITE8_DEVICE_HANDLER( theend_coin_counter_w ) | |
| 476 | 455 | { |
| 477 | 456 | coin_counter_w(0, data & 0x80); |
| 478 | 457 | } |
| 479 | 458 | |
| 480 | 459 | |
| 481 | static const ppi8255_interface theend_ppi8255_intf | |
| 460 | static const ppi8255_interface theend_ppi8255_0_intf | |
| 482 | 461 | { |
| 483 | { | |
| 484 | konami_porta_0_r, /* Port A read */ | |
| 485 | konami_portb_0_r, /* Port B read */ | |
| 486 | konami_portc_0_r, /* Port C read */ | |
| 487 | NULL, /* Port A write */ | |
| 488 | NULL, /* Port B write */ | |
| 489 | theend_coin_counter_w /* Port C write */ | |
| 490 | }, | |
| 491 | { | |
| 492 | NULL, /* Port A read */ | |
| 493 | NULL, /* Port B read */ | |
| 494 | konami_portc_1_r, /* Port C read */ | |
| 495 | soundlatch_w, /* Port A write */ | |
| 496 | konami_sound_control_w, /* Port B write */ | |
| 497 | konami_portc_1_w /* Port C write */ | |
| 498 | } | |
| 462 | DEVICE8_PORT("IN0"), /* Port A read */ | |
| 463 | DEVICE8_PORT("IN1"), /* Port B read */ | |
| 464 | DEVICE8_PORT("IN2"), /* Port C read */ | |
| 465 | NULL, /* Port A write */ | |
| 466 | NULL, /* Port B write */ | |
| 467 | theend_coin_counter_w /* Port C write */ | |
| 499 | 468 | }; |
| 500 | 469 | |
| 501 | 470 | |
| r3373 | r3374 | |
| 506 | 475 | * |
| 507 | 476 | *************************************/ |
| 508 | 477 | |
| 509 | static WRITE8_HANDLER( scramble_protection_w ) | |
| 478 | static WRITE8_DEVICE_HANDLER( scramble_protection_w ) | |
| 510 | 479 | { |
| 511 | 480 | /* |
| 512 | 481 | This is not fully understood; the low 4 bits of port C are |
| r3373 | r3374 | |
| 530 | 499 | } |
| 531 | 500 | |
| 532 | 501 | |
| 533 | static READ8_HANDLER( scramble_protection_r ) | |
| 502 | static READ8_DEVICE_HANDLER( scramble_protection_r ) | |
| 534 | 503 | { |
| 535 | 504 | return protection_result; |
| 536 | 505 | } |
| r3373 | r3374 | |
| 547 | 516 | } |
| 548 | 517 | |
| 549 | 518 | |
| 550 | static const ppi8255_interface scramble_ppi8255_intf | |
| 519 | static const ppi8255_interface scramble_ppi8255_1_intf | |
| 551 | 520 | { |
| 552 | { | |
| 553 | konami_porta_0_r, /* Port A read */ | |
| 554 | konami_portb_0_r, /* Port B read */ | |
| 555 | konami_portc_0_r, /* Port C read */ | |
| 556 | NULL, /* Port A write */ | |
| 557 | NULL, /* Port B write */ | |
| 558 | konami_portc_0_w /* Port C write */ | |
| 559 | }, | |
| 560 | { | |
| 561 | NULL, /* Port A read */ | |
| 562 | NULL, /* Port B read */ | |
| 563 | scramble_protection_r, /* Port C read */ | |
| 564 | soundlatch_w, /* Port A write */ | |
| 565 | konami_sound_control_w, /* Port B write */ | |
| 566 | scramble_protection_w /* Port C write */ | |
| 567 | } | |
| 521 | NULL, /* Port A read */ | |
| 522 | NULL, /* Port B read */ | |
| 523 | scramble_protection_r, /* Port C read */ | |
| 524 | sound_latch_w, /* Port A write */ | |
| 525 | konami_sound_control_w, /* Port B write */ | |
| 526 | scramble_protection_w /* Port C write */ | |
| 568 | 527 | }; |
| 569 | 528 | |
| 570 | 529 | |
| 530 | ||
| 571 | 531 | /************************************* |
| 572 | 532 | * |
| 573 | 533 | * Explorer I/O |
| r3373 | r3374 | |
| 598 | 558 | { |
| 599 | 559 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 600 | 560 | UINT8 result = 0xff; |
| 601 | if (offset & 0x04) result &= ppi8255_r(dev | |
| 561 | if (offset & 0x04) result &= ppi8255_r(devtag_ge | |
| 602 | 562 | return result; |
| 603 | 563 | } |
| 604 | 564 | |
| r3373 | r3374 | |
| 606 | 566 | static WRITE8_HANDLER( sfx_sample_io_w ) |
| 607 | 567 | { |
| 608 | 568 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 609 | if (offset & 0x04) ppi8255_w(dev | |
| 569 | if (offset & 0x04) ppi8255_w(devtag_ge | |
| 610 | 570 | if (offset & 0x10) dac_0_signed_data_w(machine, offset, data); |
| 611 | 571 | } |
| 612 | 572 | |
| r3373 | r3374 | |
| 623 | 583 | } |
| 624 | 584 | |
| 625 | 585 | |
| 626 | static | |
| 586 | static READ | |
| 627 | 587 | { |
| 628 | { | |
| 629 | konami_porta_0_r, /* Port A read */ | |
| 630 | konami_portb_0_r, /* Port B read */ | |
| 631 | konami_portc_0_r, /* Port C read */ | |
| 632 | NULL, /* Port A write */ | |
| 633 | NULL, /* Port B write */ | |
| 634 | konami_portc_0_w /* Port C write */ | |
| 635 | }, | |
| 636 | { | |
| 637 | NULL, /* Port A read */ | |
| 638 | NULL, /* Port B read */ | |
| 639 | konami_portc_1_r, /* Port C read */ | |
| 640 | soundlatch_w, /* Port A write */ | |
| 641 | konami_sound_control_w, /* Port B write */ | |
| 642 | konami_portc_1_w /* Port C write */ | |
| 643 | }, | |
| 644 | { | |
| 645 | soundlatch2_r, /* Port A read */ | |
| 646 | NULL, /* Port B read */ | |
| 647 | NULL, /* Port C read */ | |
| 648 | NULL, /* Port A write */ | |
| 649 | NULL, /* Port B write */ | |
| 650 | NULL /* Port C write */ | |
| 651 | } | |
| 588 | return soundlatch2_r(device->machine, offset); | |
| 589 | } | |
| 590 | ||
| 591 | ||
| 592 | static const ppi8255_interface sfx_ppi8255_2_intf = | |
| 593 | { | |
| 594 | sound_data2_r, /* Port A read */ | |
| 595 | NULL, /* Port B read */ | |
| 596 | NULL, /* Port C read */ | |
| 597 | NULL, /* Port A write */ | |
| 598 | NULL, /* Port B write */ | |
| 599 | NULL /* Port C write */ | |
| 652 | 600 | }; |
| 653 | 601 | |
| 654 | 602 | |
| r3373 | r3374 | |
| 663 | 611 | { |
| 664 | 612 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 665 | 613 | UINT8 result = 0xff; |
| 666 | if (offset & 0x1000) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 1) & 3); | |
| 667 | if (offset & 0x2000) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 1) & 3); | |
| 614 | if (offset & 0x1000) result &= ppi8255_r(devtag_get_device(machine, PPI8255, "ppi8255_1"), (offset >> 1) & 3); | |
| 615 | if (offset & 0x2000) result &= ppi8255_r(devtag_get_device(machine, PPI8255, "ppi8255_0"), (offset >> 1) & 3); | |
| 668 | 616 | return result; |
| 669 | 617 | } |
| 670 | 618 | |
| r3373 | r3374 | |
| 672 | 620 | static WRITE8_HANDLER( frogger_ppi8255_w ) |
| 673 | 621 | { |
| 674 | 622 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 675 | if (offset & 0x1000) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 1) & 3, data); | |
| 676 | if (offset & 0x2000) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 1) & 3, data); | |
| 623 | if (offset & 0x1000) ppi8255_w(devtag_get_device(machine, PPI8255, "ppi8255_1"), (offset >> 1) & 3, data); | |
| 624 | if (offset & 0x2000) ppi8255_w(devtag_get_device(machine, PPI8255, "ppi8255_0"), (offset >> 1) & 3, data); | |
| 677 | 625 | } |
| 678 | 626 | |
| 679 | 627 | |
| r3373 | r3374 | |
| 721 | 669 | { |
| 722 | 670 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 723 | 671 | UINT8 result = 0xff; |
| 724 | if (offset & 0x1000) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 3) & 3); | |
| 725 | if (offset & 0x2000) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 3) & 3); | |
| 672 | if (offset & 0x1000) result &= ppi8255_r(devtag_get_device(machine, PPI8255, "ppi8255_0"), (offset >> 3) & 3); | |
| 673 | if (offset & 0x2000) result &= ppi8255_r(devtag_get_device(machine, PPI8255, "ppi8255_1"), (offset >> 3) & 3); | |
| 726 | 674 | return result; |
| 727 | 675 | } |
| 728 | 676 | |
| r3373 | r3374 | |
| 730 | 678 | static WRITE8_HANDLER( frogf_ppi8255_w ) |
| 731 | 679 | { |
| 732 | 680 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 733 | if (offset & 0x1000) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 3) & 3, data); | |
| 734 | if (offset & 0x2000) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 3) & 3, data); | |
| 681 | if (offset & 0x1000) ppi8255_w(devtag_get_device(machine, PPI8255, "ppi8255_0"), (offset >> 3) & 3, data); | |
| 682 | if (offset & 0x2000) ppi8255_w(devtag_get_device(machine, PPI8255, "ppi8255_1"), (offset >> 3) & 3, data); | |
| 735 | 683 | } |
| 736 | 684 | |
| 737 | 685 | |
| r3373 | r3374 | |
| 742 | 690 | * |
| 743 | 691 | *************************************/ |
| 744 | 692 | |
| 745 | static READ8_HANDLER( turtles_ppi8255_0_r ) { return ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 4) & 3); } | |
| 746 | static READ8_HANDLER( turtles_ppi8255_1_r ) { return ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 4) & 3); } | |
| 747 | static WRITE8_HANDLER( turtles_ppi8255_0_w ) { ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 4) & 3, data); } | |
| 748 | static WRITE8_HANDLER( turtles_ppi8255_1_w ) { ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 4) & 3, data); } | |
| 693 | static READ8_HANDLER( turtles_ppi8255_0_r ) { return ppi8255_r(devtag_get_device(machine, PPI8255, "ppi8255_0"), (offset >> 4) & 3); } | |
| 694 | static READ8_HANDLER( turtles_ppi8255_1_r ) { return ppi8255_r(devtag_get_device(machine, PPI8255, "ppi8255_1"), (offset >> 4) & 3); } | |
| 695 | static WRITE8_HANDLER( turtles_ppi8255_0_w ) { ppi8255_w(devtag_get_device(machine, PPI8255, "ppi8255_0"), (offset >> 4) & 3, data); } | |
| 696 | static WRITE8_HANDLER( turtles_ppi8255_1_w ) { ppi8255_w(devtag_get_device(machine, PPI8255, "ppi8255_1"), (offset >> 4) & 3, data); } | |
| 749 | 697 | |
| 750 | 698 | |
| 751 | 699 | |
| r3373 | r3374 | |
| 778 | 726 | } |
| 779 | 727 | |
| 780 | 728 | |
| 781 | static READ8_HANDLER( scorpion_protection_r ) | |
| 729 | static READ8_DEVICE_HANDLER( scorpion_protection_r ) | |
| 782 | 730 | { |
| 783 | 731 | UINT16 paritybits; |
| 784 | 732 | UINT8 parity = 0; |
| r3373 | r3374 | |
| 793 | 741 | } |
| 794 | 742 | |
| 795 | 743 | |
| 796 | static WRITE8_HANDLER( scorpion_protection_w ) | |
| 744 | static WRITE8_DEVICE_HANDLER( scorpion_protection_w ) | |
| 797 | 745 | { |
| 798 | 746 | /* bit 5 low is a reset */ |
| 799 | 747 | if (!(data & 0x20)) |
| r3373 | r3374 | |
| 803 | 751 | if (!(data & 0x10)) |
| 804 | 752 | { |
| 805 | 753 | /* each clock shifts left one bit and ORs in the inverse of the parity */ |
| 806 | protection_state = (protection_state << 1) | (~scorpion_protection_r( | |
| 754 | protection_state = (protection_state << 1) | (~scorpion_protection_r(dev | |
| 807 | 755 | } |
| 808 | 756 | } |
| 809 | 757 | |
| r3373 | r3374 | |
| 830 | 778 | } |
| 831 | 779 | |
| 832 | 780 | |
| 833 | static const ppi8255_interface scorpion_ppi8255_intf | |
| 781 | static const ppi8255_interface scorpion_ppi8255_1_intf | |
| 834 | 782 | { |
| 835 | { | |
| 836 | konami_porta_0_r, /* Port A read */ | |
| 837 | konami_portb_0_r, /* Port B read */ | |
| 838 | konami_portc_0_r, /* Port C read */ | |
| 839 | NULL, /* Port A write */ | |
| 840 | NULL, /* Port B write */ | |
| 841 | konami_portc_0_w /* Port C write */ | |
| 842 | }, | |
| 843 | { | |
| 844 | NULL, /* Port A read */ | |
| 845 | NULL, /* Port B read */ | |
| 846 | scorpion_protection_r, /* Port C read */ | |
| 847 | soundlatch_w, /* Port A write */ | |
| 848 | konami_sound_control_w, /* Port B write */ | |
| 849 | scorpion_protection_w /* Port C write */ | |
| 850 | } | |
| 783 | NULL, /* Port A read */ | |
| 784 | NULL, /* Port B read */ | |
| 785 | scorpion_protection_r, /* Port C read */ | |
| 786 | sound_latch_w, /* Port A write */ | |
| 787 | konami_sound_control_w, /* Port B write */ | |
| 788 | scorpion_protection_w /* Port C write */ | |
| 851 | 789 | }; |
| 852 | 790 | |
| 853 | 791 | |
| r3373 | r3374 | |
| 1114 | 1052 | * |
| 1115 | 1053 | *************************************/ |
| 1116 | 1054 | |
| 1117 | static WRITE8_HANDLER( moonwar_port_select_w ) | |
| 1055 | static WRITE8_DEVICE_HANDLER( moonwar_port_select_w ) | |
| 1118 | 1056 | { |
| 1119 | 1057 | moonwar_port_select = data & 0x10; |
| 1120 | 1058 | } |
| 1121 | 1059 | |
| 1122 | 1060 | |
| 1123 | static READ8_HANDLER( moonwar_input_port_0_r ) | |
| 1061 | static READ8_DEVICE_HANDLER( moonwar_input_port_0_r ) | |
| 1124 | 1062 | { |
| 1125 | 1063 | UINT8 sign; |
| 1126 | 1064 | UINT8 delta; |
| 1127 | 1065 | |
| 1128 | delta = (moonwar_port_select ? input_port_read(machine, "IN3") : input_port_read(machine, "IN4")); | |
| 1066 | delta = (moonwar_port_select ? input_port_read(device->machine, "IN3") : input_port_read(device->machine, "IN4")); | |
| 1129 | 1067 | |
| 1130 | 1068 | sign = (delta & 0x80) >> 3; |
| 1131 | 1069 | delta &= 0x0f; |
| 1132 | 1070 | |
| 1133 | return ((input_port_read(machine, "IN0") & 0xe0) | delta | sign ); | |
| 1071 | return ((input_port_read(device->machine, "IN0") & 0xe0) | delta | sign ); | |
| 1134 | 1072 | } |
| 1135 | 1073 | |
| 1136 | 1074 | |
| 1137 | static const ppi8255_interface moonwar_ppi8255_intf | |
| 1075 | static const ppi8255_interface moonwar_ppi8255_0_intf | |
| 1138 | 1076 | { |
| 1139 | { | |
| 1140 | moonwar_input_port_0_r, /* Port A read */ | |
| 1141 | konami_portb_0_r, /* Port B read */ | |
| 1142 | konami_portc_0_r, /* Port C read */ | |
| 1143 | NULL, /* Port A write */ | |
| 1144 | NULL, /* Port B write */ | |
| 1145 | moonwar_port_select_w /* Port C write */ | |
| 1146 | }, | |
| 1147 | { | |
| 1148 | NULL, /* Port A read */ | |
| 1149 | NULL, /* Port B read */ | |
| 1150 | konami_portc_1_r, /* Port C read */ | |
| 1151 | soundlatch_w, /* Port A write */ | |
| 1152 | konami_sound_control_w, /* Port B write */ | |
| 1153 | konami_portc_1_w /* Port C write */ | |
| 1154 | } | |
| 1077 | moonwar_input_port_0_r, /* Port A read */ | |
| 1078 | DEVICE8_PORT("IN1"), /* Port B read */ | |
| 1079 | DEVICE8_PORT("IN2"), /* Port C read */ | |
| 1080 | NULL, /* Port A write */ | |
| 1081 | NULL, /* Port B write */ | |
| 1082 | moonwar_port_select_w /* Port C write */ | |
| 1155 | 1083 | }; |
| 1156 | 1084 | |
| 1085 | ||
| 1086 | ||
| 1157 | 1087 | /************************************* |
| 1158 | 1088 | * |
| 1159 | 1089 | * Memory maps |
| r3373 | r3374 | |
| 1786 | 1716 | static MACHINE_DRIVER_START( konami_base ) |
| 1787 | 1717 | MDRV_IMPORT_FROM( galaxian_base ) |
| 1788 | 1718 | |
| 1789 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1790 | MDRV_DEVICE_CONFIG( konami_ppi8255_intf[0] ) | |
| 1791 | ||
| 1792 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1793 | MDRV_DEVICE_CONFIG( konami_ppi8255_intf[1] ) | |
| 1719 | MDRV_PPI8255_ADD( "ppi8255_0", konami_ppi8255_0_intf ) | |
| 1720 | MDRV_PPI8255_ADD( "ppi8255_1", konami_ppi8255_1_intf ) | |
| 1794 | 1721 | MACHINE_DRIVER_END |
| 1795 | 1722 | |
| 1796 | 1723 | |
| r3373 | r3374 | |
| 2028 | 1955 | MDRV_CPU_MODIFY("main") |
| 2029 | 1956 | MDRV_CPU_PROGRAM_MAP(theend_map,0) |
| 2030 | 1957 | |
| 2031 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 2032 | MDRV_DEVICE_CONFIG( theend_ppi8255_intf[0] ) | |
| 2033 | ||
| 2034 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 2035 | MDRV_DEVICE_CONFIG( theend_ppi8255_intf[1] ) | |
| 1958 | MDRV_PPI8255_ADD( "ppi8255_0", theend_ppi8255_0_intf ) | |
| 1959 | MDRV_PPI8255_ADD( "ppi8255_1", konami_ppi8255_1_intf ) | |
| 2036 | 1960 | MACHINE_DRIVER_END |
| 2037 | 1961 | |
| 2038 | 1962 | |
| r3373 | r3374 | |
| 2044 | 1968 | MDRV_CPU_MODIFY("main") |
| 2045 | 1969 | MDRV_CPU_PROGRAM_MAP(theend_map,0) |
| 2046 | 1970 | |
| 2047 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 2048 | MDRV_DEVICE_CONFIG( scramble_ppi8255_intf[0] ) | |
| 2049 | ||
| 2050 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 2051 | MDRV_DEVICE_CONFIG( scramble_ppi8255_intf[1] ) | |
| 1971 | MDRV_PPI8255_ADD( "ppi8255_0", konami_ppi8255_0_intf ) | |
| 1972 | MDRV_PPI8255_ADD( "ppi8255_1", scramble_ppi8255_1_intf ) | |
| 2052 | 1973 | MACHINE_DRIVER_END |
| 2053 | 1974 | |
| 2054 | 1975 | |
| r3373 | r3374 | |
| 2078 | 1999 | static MACHINE_DRIVER_START( scorpion ) |
| 2079 | 2000 | MDRV_IMPORT_FROM(theend) |
| 2080 | 2001 | |
| 2081 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 2082 | MDRV_DEVICE_CONFIG( scorpion_ppi8255_intf[0] ) | |
| 2002 | MDRV_PPI8255_RECONFIG( "ppi8255_0", konami_ppi8255_0_intf ) | |
| 2003 | MDRV_PPI8255_RECONFIG( "ppi8255_1", scorpion_ppi8255_1_intf ) | |
| 2083 | 2004 | |
| 2084 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 2085 | MDRV_DEVICE_CONFIG( scorpion_ppi8255_intf[1] ) | |
| 2086 | ||
| 2087 | 2005 | /* extra AY8910 with I/O ports */ |
| 2088 | 2006 | MDRV_SOUND_ADD("8910.2", AY8910, KONAMI_SOUND_CLOCK/8) |
| 2089 | 2007 | MDRV_SOUND_CONFIG(scorpion_ay8910_interface) |
| r3373 | r3374 | |
| 2106 | 2024 | MDRV_CPU_PROGRAM_MAP(sfx_sample_map,0) |
| 2107 | 2025 | MDRV_CPU_IO_MAP(sfx_sample_portmap,0) |
| 2108 | 2026 | |
| 2109 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 2110 | MDRV_DEVICE_CONFIG( sfx_ppi8255_intf[0] ) | |
| 2027 | MDRV_PPI8255_ADD( "ppi8255_0", konami_ppi8255_0_intf ) | |
| 2028 | MDRV_PPI8255_ADD( "ppi8255_1", konami_ppi8255_1_intf ) | |
| 2029 | MDRV_PPI8255_ADD( "ppi8255_2", sfx_ppi8255_2_intf ) | |
| 2111 | 2030 | |
| 2112 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 2113 | MDRV_DEVICE_CONFIG( sfx_ppi8255_intf[1] ) | |
| 2114 | ||
| 2115 | MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) | |
| 2116 | MDRV_DEVICE_CONFIG( sfx_ppi8255_intf[2] ) | |
| 2117 | ||
| 2118 | 2031 | /* port on 1st 8910 is used for communication */ |
| 2119 | 2032 | MDRV_SOUND_MODIFY("8910.0") |
| 2120 | 2033 | MDRV_SOUND_CONFIG(sfx_ay8910_interface) |
| r3373 | r3374 | |
| 2150 | 2063 | MDRV_IMPORT_FROM(scobra) |
| 2151 | 2064 | |
| 2152 | 2065 | /* device config overrides */ |
| 2153 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 2154 | MDRV_DEVICE_CONFIG( moonwar_ppi8255_intf[0] ) | |
| 2066 | MDRV_PPI8255_RECONFIG( "ppi8255_0", moonwar_ppi8255_0_intf ) | |
| 2067 | MDRV_PPI8255_RECONFIG( "ppi8255_1", konami_ppi8255_1_intf ) | |
| 2155 | 2068 | |
| 2156 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 2157 | MDRV_DEVICE_CONFIG( moonwar_ppi8255_intf[1] ) | |
| 2158 | ||
| 2159 | 2069 | MDRV_PALETTE_INIT(moonwar) |
| 2160 | 2070 | MACHINE_DRIVER_END |
| 2161 | 2071 |
| r3373 | r3374 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | |
| 14 | static WRITE8_HANDLER( p2a_w ) { taxidrvr_spritectrl_w(machine,0,data); } | |
| 15 | static WRITE8_HANDLER( p2b_w ) { taxidrvr_spritectrl_w(machine,1,data); } | |
| 16 | static WRITE8_HANDLER( p2c_w ) { taxidrvr_spritectrl_w(machine,2,data); } | |
| 17 | static WRITE8_HANDLER( p3a_w ) { taxidrvr_spritectrl_w(machine,3,data); } | |
| 18 | static WRITE8_HANDLER( p3b_w ) { taxidrvr_spritectrl_w(machine,4,data); } | |
| 19 | static WRITE8_HANDLER( p3c_w ) { taxidrvr_spritectrl_w(machine,5,data); } | |
| 20 | static WRITE8_HANDLER( p4a_w ) { taxidrvr_spritectrl_w(machine,6,data); } | |
| 21 | static WRITE8_HANDLER( p4b_w ) { taxidrvr_spritectrl_w(machine,7,data); } | |
| 22 | static WRITE8_HANDLER( p4c_w ) { taxidrvr_spritectrl_w(machine,8,data); } | |
| 14 | static WRITE8_DEVICE_HANDLER( p2a_w ) { taxidrvr_spritectrl_w(device->machine,0,data); } | |
| 15 | static WRITE8_DEVICE_HANDLER( p2b_w ) { taxidrvr_spritectrl_w(device->machine,1,data); } | |
| 16 | static WRITE8_DEVICE_HANDLER( p2c_w ) { taxidrvr_spritectrl_w(device->machine,2,data); } | |
| 17 | static WRITE8_DEVICE_HANDLER( p3a_w ) { taxidrvr_spritectrl_w(device->machine,3,data); } | |
| 18 | static WRITE8_DEVICE_HANDLER( p3b_w ) { taxidrvr_spritectrl_w(device->machine,4,data); } | |
| 19 | static WRITE8_DEVICE_HANDLER( p3c_w ) { taxidrvr_spritectrl_w(device->machine,5,data); } | |
| 20 | static WRITE8_DEVICE_HANDLER( p4a_w ) { taxidrvr_spritectrl_w(device->machine,6,data); } | |
| 21 | static WRITE8_DEVICE_HANDLER( p4b_w ) { taxidrvr_spritectrl_w(device->machine,7,data); } | |
| 22 | static WRITE8_DEVICE_HANDLER( p4c_w ) { taxidrvr_spritectrl_w(device->machine,8,data); } | |
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | static int s1,s2,s3,s4,latchA,latchB; |
| 28 | 28 | |
| 29 | static READ8_HANDLER( p0a_r ) | |
| 29 | static READ8_DEVICE_HANDLER( p0a_r ) | |
| 30 | 30 | { |
| 31 | 31 | return latchA; |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | static READ8_HANDLER( p0c_r ) | |
| 34 | static READ8_DEVICE_HANDLER( p0c_r ) | |
| 35 | 35 | { |
| 36 | 36 | return (s1 << 7); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | static WRITE8_HANDLER( p0b_w ) | |
| 39 | static WRITE8_DEVICE_HANDLER( p0b_w ) | |
| 40 | 40 | { |
| 41 | 41 | latchB = data; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | static WRITE8_HANDLER( p0c_w ) | |
| 44 | static WRITE8_DEVICE_HANDLER( p0c_w ) | |
| 45 | 45 | { |
| 46 | 46 | s2 = data & 1; |
| 47 | 47 | |
| r3373 | r3374 | |
| 54 | 54 | // popmessage("%02x",data&0x0f); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | static READ8_HANDLER( p1b_r ) | |
| 57 | static READ8_DEVICE_HANDLER( p1b_r ) | |
| 58 | 58 | { |
| 59 | 59 | return latchB; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | static READ8_HANDLER( p1c_r ) | |
| 62 | static READ8_DEVICE_HANDLER( p1c_r ) | |
| 63 | 63 | { |
| 64 | return (s2 << 7) | (s4 << 6) | ((input_port_read(machine, "SERVCOIN") & 1) << 4); | |
| 64 | return (s2 << 7) | (s4 << 6) | ((input_port_read(device->machine, "SERVCOIN") & 1) << 4); | |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | static WRITE8_HANDLER( p1a_w ) | |
| 67 | static WRITE8_DEVICE_HANDLER( p1a_w ) | |
| 68 | 68 | { |
| 69 | 69 | latchA = data; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | static WRITE8_HANDLER( p1c_w ) | |
| 72 | static WRITE8_DEVICE_HANDLER( p1c_w ) | |
| 73 | 73 | { |
| 74 | 74 | s1 = data & 1; |
| 75 | 75 | s3 = (data & 2) >> 1; |
| r3373 | r3374 | |
| 376 | 376 | MDRV_INTERLEAVE(100) /* 100 CPU slices per frame - an high value to ensure proper */ |
| 377 | 377 | /* synchronization of the CPUs */ |
| 378 | 378 | |
| 379 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 380 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 379 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 380 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 381 | MDRV_PPI8255_ADD( "ppi8255_2", ppi8255_intf[2] ) | |
| 382 | MDRV_PPI8255_ADD( "ppi8255_3", ppi8255_intf[3] ) | |
| 383 | MDRV_PPI8255_ADD( "ppi8255_4", ppi8255_intf[4] ) | |
| 381 | 384 | |
| 382 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 383 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 384 | ||
| 385 | MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) | |
| 386 | MDRV_DEVICE_CONFIG( ppi8255_intf[2] ) | |
| 387 | ||
| 388 | MDRV_DEVICE_ADD( "ppi8255_3", PPI8255 ) | |
| 389 | MDRV_DEVICE_CONFIG( ppi8255_intf[3] ) | |
| 390 | ||
| 391 | MDRV_DEVICE_ADD( "ppi8255_4", PPI8255 ) | |
| 392 | MDRV_DEVICE_CONFIG( ppi8255_intf[4] ) | |
| 393 | ||
| 394 | 385 | /* video hardware */ |
| 395 | 386 | MDRV_SCREEN_ADD("main", RASTER) |
| 396 | 387 | MDRV_SCREEN_REFRESH_RATE(60) |
| r3373 | r3374 | |
|---|---|---|
| 1940 | 1940 | |
| 1941 | 1941 | ROM_START( csclub ) |
| 1942 | 1942 | ROM_REGION( CODE_SIZE, "main", 0 ) /* 68000 code */ |
| 1943 | ROM_LOAD16_WORD_SWAP( "csc03a", 0x000000, 0x80000, CRC(824082be) SHA1(a44e7e17d73e089b4e7784317f2387d135d01482) ) | |
| 1944 | ROM_LOAD16_WORD_SWAP( "csc04a", 0x080000, 0x80000, CRC(74e6a4fe) SHA1(2a732a6e57088885e77256eb17ddd3ae523db09f) ) | |
| 1945 | ROM_LOAD16_WORD_SWAP( "csc05a", 0x100000, 0x80000, CRC(8ae0df19) SHA1(88e7bf1ee0e18d74748cecd875cb96524dfa01cf) ) | |
| 1946 | ROM_LOAD16_WORD_SWAP( "csc06a", 0x180000, 0x80000, CRC(51f2f0d3) SHA1(067a0bded69767b9f30073012ad62f4608b7610a) ) | |
| 1947 | ROM_LOAD16_WORD_SWAP( "csc07a", 0x200000, 0x80000, CRC(003968fd) SHA1(95f59a29a404a1c1e86d5f43526a80aa97f25621) ) | |
| 1948 | ||
| 1949 | ROM_REGION( 0x1000000, "gfx", 0 ) | |
| 1950 | ROM_FILL( 0x000000, 0x800000, 0 ) | |
| 1951 | ROMX_LOAD( "csc73", 0x800000, 0x080000, CRC(335f07c3) SHA1(44e0385120e2c81fd1072e19b7e3ff05d42be226) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1952 | ROMX_LOAD( "csc74", 0xa00000, 0x080000, CRC(ab215357) SHA1(c2600b5ba62a570f8a32de9c06f93ea8ae6cd854) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1953 | ROMX_LOAD( "csc75", 0xc00000, 0x080000, CRC(a2367381) SHA1(49d562be42c10cdf4e55e3b76c388f0b0121a967) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1954 | ROMX_LOAD( "csc76", 0xe00000, 0x080000, CRC(728aac1f) SHA1(2d04e8803f41af2372fc342fcd8a076c14338198) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1955 | ROMX_LOAD( "csc63", 0x800002, 0x080000, CRC(3711b8ca) SHA1(ff7ba4f73d227212377327f4fcbe8f555ac4b9c9) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1956 | ROMX_LOAD( "csc64", 0xa00002, 0x080000, CRC(828a06d8) SHA1(ce1d147f1d747fcd90d93f7dcca0cdd24c85a971) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1957 | ROMX_LOAD( "csc65", 0xc00002, 0x080000, CRC(86ee4569) SHA1(725d82a1669f6f78fb4ef8756ceac8b444dcbd43) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1958 | ROMX_LOAD( "csc66", 0xe00002, 0x080000, CRC(c24f577f) SHA1(d3b97091e1f0171e087feb9d497c94a48872cd21) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1959 | ROMX_LOAD( "csc83", 0x800004, 0x080000, CRC(0750d12a) SHA1(4c36cba88c58bdbfed923f56a6d489f42a4d0f6e) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1960 | ROMX_LOAD( "csc84", 0xa00004, 0x080000, CRC(90a92f39) SHA1(75bef2440147bac417b48d61ff64b71ed5b9eb67) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1961 | ROMX_LOAD( "csc85", 0xc00004, 0x080000, CRC(d08ab012) SHA1(7f2e71b6bd85c6a3efbd417977261c21f3d6cb7c) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1962 | ROMX_LOAD( "csc86", 0xe00004, 0x080000, CRC(41652583) SHA1(7132647dc9a29ce98866f489140703c5ed3d6051) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1963 | ROMX_LOAD( "csc93", 0x800006, 0x080000, CRC(a756c7f7) SHA1(d0f44f8ded12291d5c79282eac45d088cb365b09) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1964 | ROMX_LOAD( "csc94", 0xa00006, 0x080000, CRC(fb7ccc73) SHA1(763e6fe1baf73341747c74d89df9443561fca4fa) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1965 | ROMX_LOAD( "csc95", 0xc00006, 0x080000, CRC(4d014297) SHA1(df172a3723793b9955ff1f65e76fe5c20fc37b89) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1966 | ROMX_LOAD( "csc96", 0xe00006, 0x080000, CRC(6754b1ef) SHA1(ab5d62056b19999ccecd0eeec7b7c5869ca8fea8) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 1967 | ||
| 1968 | ROM_REGION( QSOUND_SIZE, "audio", 0 ) /* 64k for the audio CPU (+banks) */ | |
| 1969 | ROM_LOAD( "csc.01", 0x00000, 0x08000, CRC(ee162111) SHA1(ce8d4bd32bb10ee8b0274ba6fcef05a583b39d48) ) | |
| 1970 | ROM_CONTINUE( 0x10000, 0x18000 ) | |
| 1971 | ||
| 1972 | ROM_REGION( 0x400000, "qsound", 0 ) /* QSound samples */ | |
| 1973 | ROM_LOAD16_WORD_SWAP( "csc51", 0x000000, 0x080000, CRC(5a52afd5) SHA1(ab873ec556933b75be82ba249357cceb01a7a0bd) ) | |
| 1974 | ROM_LOAD16_WORD_SWAP( "csc52", 0x080000, 0x080000, CRC(1408a811) SHA1(1d31e3cd505245b5ff4d3c55d5fa7017c0f1e168) ) | |
| 1975 | ROM_LOAD16_WORD_SWAP( "csc53", 0x100000, 0x080000, CRC(4fb9f57c) SHA1(093e8e3a03b62783a84fe4ae239e9eb46cbfd71e) ) | |
| 1976 | ROM_LOAD16_WORD_SWAP( "csc54", 0x180000, 0x080000, CRC(9a8f40ec) SHA1(c8db1ecfd6b08e9c83ae53a1d25c1387ab95535c) ) | |
| 1977 | ROM_LOAD16_WORD_SWAP( "csc55", 0x200000, 0x080000, CRC(91529a91) SHA1(183569100ae98e17688e0e25932850e73a41eb88) ) | |
| 1978 | ROM_LOAD16_WORD_SWAP( "csc56", 0x280000, 0x080000, CRC(9a345334) SHA1(330291400a73215c9797457507a86c90ba415247)) | |
| 1979 | ROM_LOAD16_WORD_SWAP( "csc57", 0x300000, 0x080000, CRC(aedc27f2) SHA1(55137f0f22c4823558e6a8ba76011695579a4f1f) ) | |
| 1980 | ROM_LOAD16_WORD_SWAP( "csc58", 0x380000, 0x080000, CRC(2300b7b3) SHA1(f5ecbb45c24f7de1c1aa435870695551d4e343ca) ) | |
| 1981 | ROM_END | |
| 1982 | ||
| 1983 | ||
| 1984 | ROM_START( csclub1 ) | |
| 1985 | ROM_REGION( CODE_SIZE, "main", 0 ) /* 68000 code */ | |
| 1943 | 1986 | ROM_LOAD16_WORD_SWAP( "csce.03", 0x000000, 0x80000, CRC(f2c852ef) SHA1(bc2d403958640d7ab0785d01a3df79ec31d0c239) ) |
| 1944 | 1987 | ROM_LOAD16_WORD_SWAP( "csce.04", 0x080000, 0x80000, CRC(1184530f) SHA1(18565f6a06e6078fc20dd9cf70802ac1da60c67a) ) |
| 1945 | 1988 | ROM_LOAD16_WORD_SWAP( "csce.05", 0x100000, 0x80000, CRC(804e2b6b) SHA1(e638f73442e3165ace84cdb1bd2a9d419e2d8c41) ) |
| r3373 | r3374 | |
| 7401 | 7444 | GAME( 1997, mshvsfa1, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Asia 970620)", 0 ) |
| 7402 | 7445 | GAME( 1997, mshvsfb, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Brazil 970827)", 0 ) |
| 7403 | 7446 | GAME( 1997, mshvsfb1, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Brazil 970625)", 0 ) |
| 7404 | GAME( 1997, csclub, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Euro 970722)", 0 ) | |
| 7447 | GAME( 1997, csclub, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Euro 971017)", 0 ) | |
| 7448 | GAME( 1997, csclub1, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Euro 970722)", 0 ) | |
| 7405 | 7449 | GAME( 1997, cscluba, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Asia 970722)", 0 ) |
| 7406 | 7450 | GAME( 1997, csclubj, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Japan 970722)", 0 ) |
| 7407 | 7451 | GAME( 1997, csclubh, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Hispanic 970722)", 0 ) |
| r3373 | r3374 | |
|---|---|---|
| 100 | 100 | |
| 101 | 101 | ***************************************************************************/ |
| 102 | 102 | |
| 103 | static WRITE8_HANDLER(fake_w) | |
| 103 | static WRITE8_DEVICE_HANDLER(fake_w) | |
| 104 | 104 | { |
| 105 | 105 | } |
| 106 | static WRITE8_HANDLER(fake2_w) | |
| 106 | static WRITE8_DEVICE_HANDLER(fake2_w) | |
| 107 | 107 | { |
| 108 | 108 | // popmessage("%02x",data); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | static RE | |
| 111 | static WRITE | |
| 112 | 112 | { |
| 113 | return input_port_read(machine, "IN0"); | |
| 114 | } | |
| 115 | ||
| 116 | static WRITE8_HANDLER( lordgun_eeprom_w ) | |
| 117 | { | |
| 118 | 113 | static UINT8 old; |
| 119 | 114 | int i; |
| 120 | 115 | |
| r3373 | r3374 | |
| 129 | 124 | // Update light guns positions |
| 130 | 125 | for (i = 0; i < 2; i++) |
| 131 | 126 | if ( (data & (0x04 << i)) && !(old & (0x04 << i)) ) |
| 132 | lordgun_update_gun(machine, i); | |
| 127 | lordgun_update_gun(device->machine, i); | |
| 133 | 128 | |
| 134 | 129 | // latch the bit |
| 135 | 130 | eeprom_write_bit(data & 0x40); |
| r3373 | r3374 | |
| 409 | 404 | static const ppi8255_interface ppi8255_intf[2] = |
| 410 | 405 | { |
| 411 | 406 | { |
| 412 | | |
| 407 | DEVICE8_PORT("IN0"), | |
| 413 | 408 | NULL, // Port B read |
| 414 | | |
| 409 | DEVICE8_PORT("IN3"), | |
| 415 | 410 | fake_w, // Port A write |
| 416 | 411 | lordgun_eeprom_w, // Port B write |
| 417 | 412 | fake2_w // Port C write |
| 418 | 413 | }, |
| 419 | 414 | { |
| 420 | input_port_1_r, // Port A read | |
| 421 | input_port_2_r, // Port B read | |
| 422 | input_port_4_r, // Port C read | |
| 415 | DEVICE8_PORT("IN1"), // Port A read | |
| 416 | DEVICE8_PORT("IN2"), // Port B read | |
| 417 | DEVICE8_PORT("IN4"), // Port C read | |
| 423 | 418 | fake_w, // Port A write |
| 424 | 419 | fake_w, // Port B write |
| 425 | 420 | fake_w // Port C write |
| r3373 | r3374 | |
| 445 | 440 | MDRV_CPU_PROGRAM_MAP(lordgun_soundmem_map,0) |
| 446 | 441 | MDRV_CPU_IO_MAP(lordgun_soundio_map,0) |
| 447 | 442 | |
| 448 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 449 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 443 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 444 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 450 | 445 | |
| 451 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 452 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 453 | ||
| 454 | 446 | MDRV_NVRAM_HANDLER(93C46) |
| 455 | 447 | |
| 456 | 448 | MDRV_GFXDECODE(lordgun) |
| r3373 | r3374 | |
|---|---|---|
| 300 | 300 | * |
| 301 | 301 | *************************************/ |
| 302 | 302 | |
| 303 | static RE | |
| 303 | static WRITE | |
| 304 | 304 | { |
| 305 | return input_port_read(machine, "FC"); | |
| 306 | } | |
| 307 | ||
| 308 | ||
| 309 | static WRITE8_HANDLER( sindbadm_soundport_w ) | |
| 310 | { | |
| 311 | soundlatch_w(machine,0,data); | |
| 312 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 305 | soundlatch_w(device->machine,0,data); | |
| 306 | cpunum_set_input_line(device->machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 313 | 307 | cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(50)); |
| 314 | 308 | } |
| 315 | 309 | |
| 316 | 310 | |
| 317 | static WRITE8_HANDLER( sindbadm_misc_w ) | |
| 311 | static WRITE8_DEVICE_HANDLER( sindbadm_misc_w ) | |
| 318 | 312 | { |
| 319 | 313 | coin_counter_w(0, data & 0x02); |
| 320 | 314 | // mame_printf_debug("Unknown = %02X\n", data); |
| r3373 | r3374 | |
| 344 | 338 | static const ppi8255_interface sindbadm_ppi_intf = |
| 345 | 339 | { |
| 346 | 340 | NULL, |
| 347 | | |
| 341 | DEVICE8 | |
| 348 | 342 | NULL, |
| 349 | 343 | sindbadm_soundport_w, |
| 350 | 344 | NULL, |
| r3373 | r3374 | |
| 954 | 948 | MDRV_CPU_IO_MAP(sindbadm_portmap,0) |
| 955 | 949 | MDRV_CPU_VBLANK_INT("main", sindbadm_vblank_start) |
| 956 | 950 | |
| 957 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 958 | MDRV_DEVICE_CONFIG( sindbadm_ppi_intf ) | |
| 951 | MDRV_PPI8255_ADD( "ppi8255", sindbadm_ppi_intf ) | |
| 959 | 952 | |
| 960 | 953 | /* video hardware */ |
| 961 | 954 | MDRV_GFXDECODE(monsterb) |
| r3373 | r3374 | |
|---|---|---|
| 1853 | 1853 | |
| 1854 | 1854 | MDRV_MACHINE_RESET(scramble) |
| 1855 | 1855 | |
| 1856 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1857 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[0] ) | |
| 1856 | MDRV_PPI8255_ADD( "ppi8255_0", scramble_ppi_0_intf ) | |
| 1857 | MDRV_PPI8255_ADD( "ppi8255_1", scramble_ppi_1_intf ) | |
| 1858 | 1858 | |
| 1859 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1860 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[1] ) | |
| 1861 | ||
| 1862 | 1859 | /* video hardware */ |
| 1863 | 1860 | MDRV_SCREEN_ADD("main", RASTER) |
| 1864 | 1861 | MDRV_SCREEN_REFRESH_RATE(16000.0/132/2) |
| r3373 | r3374 | |
| 1953 | 1950 | MDRV_CPU_MODIFY("main") |
| 1954 | 1951 | MDRV_CPU_PROGRAM_MAP(mars_readmem,mars_writemem) |
| 1955 | 1952 | |
| 1956 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 1957 | MDRV_DEVICE_CONFIG( mars_ppi8255_intf[0] ) | |
| 1958 | ||
| 1959 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 1960 | MDRV_DEVICE_CONFIG( mars_ppi8255_intf[1] ) | |
| 1961 | ||
| 1962 | 1953 | /* video hardware */ |
| 1963 | 1954 | MDRV_PALETTE_LENGTH(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ |
| 1964 | 1955 | MDRV_PALETTE_INIT(galaxold) |
| r3373 | r3374 | |
| 1984 | 1975 | MDRV_CPU_MODIFY("main") |
| 1985 | 1976 | MDRV_CPU_PROGRAM_MAP(newsin7_readmem,newsin7_writemem) |
| 1986 | 1977 | |
| 1987 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 1988 | MDRV_DEVICE_CONFIG( mars_ppi8255_intf[0] ) | |
| 1989 | ||
| 1990 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 1991 | MDRV_DEVICE_CONFIG( mars_ppi8255_intf[1] ) | |
| 1992 | ||
| 1993 | 1978 | /* video hardware */ |
| 1994 | 1979 | MDRV_GFXDECODE(newsin7) |
| 1995 | 1980 | MDRV_PALETTE_LENGTH(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ |
| r3373 | r3374 | |
| 2004 | 1989 | MDRV_CPU_MODIFY("main") |
| 2005 | 1990 | MDRV_CPU_PROGRAM_MAP(mars_readmem,mrkougar_writemem) |
| 2006 | 1991 | |
| 2007 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 2008 | MDRV_DEVICE_CONFIG( mrkougar_ppi8255_intf[0] ) | |
| 1992 | MDRV_PPI8255_RECONFIG( "ppi8255_1", mrkougar_ppi_1_intf ) | |
| 2009 | 1993 | |
| 2010 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 2011 | MDRV_DEVICE_CONFIG( mrkougar_ppi8255_intf[1] ) | |
| 2012 | ||
| 2013 | 1994 | /* video hardware */ |
| 2014 | 1995 | MDRV_GFXDECODE(mrkougar) |
| 2015 | 1996 | MDRV_PALETTE_LENGTH(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ |
| r3373 | r3374 | |
| 2023 | 2004 | MDRV_CPU_MODIFY("main") |
| 2024 | 2005 | MDRV_CPU_PROGRAM_MAP(mars_readmem,mrkougar_writemem) |
| 2025 | 2006 | |
| 2026 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 2027 | MDRV_DEVICE_CONFIG( mrkougar_ppi8255_intf[0] ) | |
| 2007 | MDRV_PPI8255_RECONFIG( "ppi8255_1", mrkougar_ppi_1_intf ) | |
| 2028 | 2008 | |
| 2029 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 2030 | MDRV_DEVICE_CONFIG( mrkougar_ppi8255_intf[1] ) | |
| 2031 | ||
| 2032 | 2009 | /* video hardware */ |
| 2033 | 2010 | MDRV_PALETTE_LENGTH(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ |
| 2034 | 2011 | MDRV_PALETTE_INIT(galaxold) |
| r3373 | r3374 | |
| 2041 | 2018 | MDRV_CPU_MODIFY("main") |
| 2042 | 2019 | MDRV_CPU_PROGRAM_MAP(ckongs_readmem,ckongs_writemem) |
| 2043 | 2020 | |
| 2044 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 2045 | MDRV_DEVICE_CONFIG( ckongs_ppi8255_intf[0] ) | |
| 2046 | ||
| 2047 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 2048 | MDRV_DEVICE_CONFIG( ckongs_ppi8255_intf[1] ) | |
| 2049 | ||
| 2050 | 2021 | /* video hardware */ |
| 2051 | 2022 | MDRV_PALETTE_LENGTH(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ |
| 2052 | 2023 | MDRV_PALETTE_INIT(galaxold) |
| r3373 | r3374 | |
| 2060 | 2031 | MDRV_CPU_MODIFY("main") |
| 2061 | 2032 | MDRV_CPU_PROGRAM_MAP(hotshock_readmem,hotshock_writemem) |
| 2062 | 2033 | |
| 2063 | MDRV_DEVICE_REMOVE( "ppi8255_0", PPI8255 ) | |
| 2064 | MDRV_DEVICE_REMOVE( "ppi8255_1", PPI8255 ) | |
| 2034 | MDRV_PPI8255_REMOVE( "ppi8255_0" ) | |
| 2035 | MDRV_PPI8255_REMOVE( "ppi8255_1" ) | |
| 2065 | 2036 | |
| 2066 | 2037 | MDRV_CPU_MODIFY("audio") |
| 2067 | 2038 | MDRV_CPU_IO_MAP(hotshock_sound_io_map,0) |
| r3373 | r3374 | |
|---|---|---|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | |
| 95 | static WRITE8_HANDLER( port_C_w ) | |
| 95 | static WRITE8_DEVICE_HANDLER( port_C_w ) | |
| 96 | 96 | { |
| 97 | 97 | /* bit 4 unknown; it is pulsed at the end of every NMI */ |
| 98 | 98 | |
| r3373 | r3374 | |
| 107 | 107 | |
| 108 | 108 | static const ppi8255_interface ppi8255_intf = |
| 109 | 109 | { |
| 110 | input_port_0_r, /* Port A read */ | |
| 111 | input_port_1_r, /* Port B read */ | |
| 112 | input_port_2_r, /* Port C read */ | |
| 110 | DEVICE8_PORT("P1"), /* Port A read */ | |
| 111 | DEVICE8_PORT("P2"), /* Port B read */ | |
| 112 | DEVICE8_PORT("EXTRA"), /* Port C read */ | |
| 113 | 113 | NULL, /* Port A write */ |
| 114 | 114 | NULL, /* Port B write */ |
| 115 | 115 | port_C_w /* Port C write */ |
| r3373 | r3374 | |
| 276 | 276 | MDRV_CPU_IO_MAP(main_portmap,0) |
| 277 | 277 | MDRV_CPU_VBLANK_INT_HACK(iqblock_interrupt,16) |
| 278 | 278 | |
| 279 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 280 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 279 | MDRV_PPI8255_ADD( "ppi8255", ppi8255_intf ) | |
| 281 | 280 | |
| 282 | 281 | /* video hardware */ |
| 283 | 282 | MDRV_SCREEN_ADD("main", RASTER) |
| r3373 | r3374 | |
| 308 | 307 | MDRV_CPU_IO_MAP(main_portmap,0) |
| 309 | 308 | MDRV_CPU_VBLANK_INT_HACK(iqblock_interrupt,16) |
| 310 | 309 | |
| 311 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 312 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 310 | MDRV_PPI8255_ADD( "ppi8255", ppi8255_intf ) | |
| 313 | 311 | |
| 314 | 312 | /* video hardware */ |
| 315 | 313 | MDRV_SCREEN_ADD("main", RASTER) |
| r3373 | r3374 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | static ADDRESS_MAP_START( sound_portmap, ADDRESS_SPACE_IO, 8 ) |
| 56 | 56 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 57 | AM_RANGE(0x00, 0x03) AM_READWRITE(z80ctc_ | |
| 57 | AM_RANGE(0x00, 0x03) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_ | |
| 58 | 58 | ADDRESS_MAP_END |
| 59 | 59 | |
| 60 | 60 | static void cchasm_6840_irq(running_machine *machine, int state) |
| r3373 | r3374 | |
| 134 | 134 | * |
| 135 | 135 | *************************************/ |
| 136 | 136 | |
| 137 | static const | |
| 137 | static const | |
| 138 | 138 | { |
| 139 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */ | |
| 140 | { 0,0,0,0,-1 } /* end mark */ | |
| 139 | { Z80CTC, "ctc" }, | |
| 140 | { NULL } | |
| 141 | 141 | }; |
| 142 | 142 | |
| 143 | 143 | |
| r3373 | r3374 | |
| 148 | 148 | * |
| 149 | 149 | *************************************/ |
| 150 | 150 | |
| 151 | extern z80ctc_interface cchasm_ctc_intf; | |
| 152 | ||
| 151 | 153 | static MACHINE_DRIVER_START( cchasm ) |
| 152 | 154 | |
| 153 | MDRV_MACHINE_START(cchasm) | |
| 154 | 155 | /* basic machine hardware */ |
| 155 | 156 | MDRV_CPU_ADD("main", M68000,CCHASM_68K_CLOCK) /* 8 MHz (from schematics) */ |
| 156 | 157 | MDRV_CPU_PROGRAM_MAP(memmap,0) |
| r3373 | r3374 | |
| 160 | 161 | MDRV_CPU_PROGRAM_MAP(sound_memmap,0) |
| 161 | 162 | MDRV_CPU_IO_MAP(sound_portmap,0) |
| 162 | 163 | |
| 164 | MDRV_Z80CTC_ADD("ctc", cchasm_ctc_intf) | |
| 165 | ||
| 166 | MDRV_MACHINE_START(cchasm) | |
| 167 | ||
| 163 | 168 | /* video hardware */ |
| 164 | 169 | MDRV_SCREEN_ADD("main", VECTOR) |
| 165 | 170 | MDRV_SCREEN_REFRESH_RATE(40) |
| r3373 | r3374 | |
|---|---|---|
| 82 | 82 | AM_RANGE(0x3e01, 0x3e01) AM_READ_PORT("P1") |
| 83 | 83 | AM_RANGE(0x3e02, 0x3e02) AM_READ_PORT("P2") |
| 84 | 84 | AM_RANGE(0x3e03, 0x3e03) AM_READ(SMH_NOP) |
| 85 | AM_RANGE(0x3e80, 0x3e80) AM_READ_PORT("DSW1") | |
| 86 | AM_RANGE(0x3f00, 0x3f00) AM_READ_PORT("DSW2") | |
| 85 | AM_RANGE(0x3e80, 0x3e80) AM_READ_PORT("DSW2") | |
| 86 | AM_RANGE(0x3f00, 0x3f00) AM_READ_PORT("DSW1") | |
| 87 | 87 | AM_RANGE(0x6000, 0xffff) AM_READ(SMH_ROM) |
| 88 | 88 | ADDRESS_MAP_END |
| 89 | 89 |
| r3373 | r3374 | |
|---|---|---|
| 92 | 92 | INPUT_PORTS_EXTERN(ettrivia); |
| 93 | 93 | |
| 94 | 94 | |
| 95 | static READ8_HANDLER( r1 ) | |
| 95 | static READ8_DEVICE_HANDLER( r1 ) | |
| 96 | 96 | { |
| 97 | 97 | int pc = activecpu_get_pc(); |
| 98 | 98 | if(pc != 0x81cb) |
| 99 | 99 | printf("r1 @ %X\n",activecpu_get_pc()); |
| 100 | return mame_rand(machine); | |
| 100 | return mame_rand(device->machine); | |
| 101 | 101 | } |
| 102 | static READ8_HANDLER( r2 ) | |
| 102 | static READ8_DEVICE_HANDLER( r2 ) | |
| 103 | 103 | { |
| 104 | 104 | int pc = activecpu_get_pc(); |
| 105 | 105 | if(pc != 0x81cb) |
| 106 | 106 | printf("r2 @ %X\n",activecpu_get_pc()); |
| 107 | return mame_rand(machine); | |
| 107 | return mame_rand(device->machine); | |
| 108 | 108 | } |
| 109 | static READ8_HANDLER( r3 ) | |
| 109 | static READ8_DEVICE_HANDLER( r3 ) | |
| 110 | 110 | { |
| 111 | 111 | int pc = activecpu_get_pc(); |
| 112 | 112 | if(pc != 0x81cb && pc != 0x90fa && pc != 0x911b && pc != 0x90d3 && pc != 0x90c4) |
| 113 | 113 | printf("r3 @ %X\n",activecpu_get_pc()); |
| 114 | return mame_rand(machine) & ~1; //with 1 jumps back (infinite loop): a status ready for something? | |
| 114 | return mame_rand(device->machine) & ~1; //with 1 jumps back (infinite loop): a status ready for something? | |
| 115 | 115 | } |
| 116 | static READ8_HANDLER( r4 ) | |
| 116 | static READ8_DEVICE_HANDLER( r4 ) | |
| 117 | 117 | { |
| 118 | 118 | int pc = activecpu_get_pc(); |
| 119 | 119 | if(pc != 0x81cb) |
| 120 | 120 | printf("r4 @ %X\n",activecpu_get_pc()); |
| 121 | return mame_rand(machine); | |
| 121 | return mame_rand(device->machine); | |
| 122 | 122 | } |
| 123 | static READ8_HANDLER( r5 ) | |
| 123 | static READ8_DEVICE_HANDLER( r5 ) | |
| 124 | 124 | { |
| 125 | 125 | int pc = activecpu_get_pc(); |
| 126 | 126 | if(pc != 0x81cb) |
| 127 | 127 | printf("r5 @ %X\n",activecpu_get_pc()); |
| 128 | return mame_rand(machine); | |
| 128 | return mame_rand(device->machine); | |
| 129 | 129 | } |
| 130 | static READ8_HANDLER( r6 ) | |
| 130 | static READ8_DEVICE_HANDLER( r6 ) | |
| 131 | 131 | { |
| 132 | 132 | int pc = activecpu_get_pc(); |
| 133 | 133 | if(pc != 0x81cb) |
| 134 | 134 | printf("r6 @ %X\n",activecpu_get_pc()); |
| 135 | 135 | |
| 136 | return mame_rand(machine); | |
| 136 | return mame_rand(device->machine); | |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | static WRITE8_HANDLER( w1 ) | |
| 139 | static WRITE8_DEVICE_HANDLER( w1 ) | |
| 140 | 140 | { |
| 141 | 141 | /* |
| 142 | 142 | static int old = 0; |
| r3373 | r3374 | |
| 144 | 144 | printf("w1 = %02X\n",old=data); |
| 145 | 145 | */ |
| 146 | 146 | } |
| 147 | static WRITE8_HANDLER( w2 ) | |
| 147 | static WRITE8_DEVICE_HANDLER( w2 ) | |
| 148 | 148 | { |
| 149 | 149 | /* |
| 150 | 150 | static int old = 0; |
| r3373 | r3374 | |
| 152 | 152 | printf("w2 = %02X\n",old=data); |
| 153 | 153 | */ |
| 154 | 154 | } |
| 155 | static WRITE8_HANDLER( w3 ) | |
| 155 | static WRITE8_DEVICE_HANDLER( w3 ) | |
| 156 | 156 | { |
| 157 | 157 | /* |
| 158 | 158 | static int old = 0; |
| r3373 | r3374 | |
| 160 | 160 | printf("w3 = %02X\n",old=data); |
| 161 | 161 | */ |
| 162 | 162 | } |
| 163 | static WRITE8_HANDLER( w4 ) | |
| 163 | static WRITE8_DEVICE_HANDLER( w4 ) | |
| 164 | 164 | { |
| 165 | 165 | /* |
| 166 | 166 | static int old = 0; |
| r3373 | r3374 | |
| 168 | 168 | printf("w4 = %02X\n",old=data); |
| 169 | 169 | */ |
| 170 | 170 | } |
| 171 | static WRITE8_HANDLER( w5 ) | |
| 171 | static WRITE8_DEVICE_HANDLER( w5 ) | |
| 172 | 172 | { |
| 173 | 173 | /* |
| 174 | 174 | static int old = 0; |
| r3373 | r3374 | |
| 176 | 176 | printf("w5 = %02X\n",old=data); |
| 177 | 177 | */ |
| 178 | 178 | } |
| 179 | static WRITE8_HANDLER( w6 ) | |
| 179 | static WRITE8_DEVICE_HANDLER( w6 ) | |
| 180 | 180 | { |
| 181 | 181 | /* |
| 182 | 182 | static int old = 0; |
| r3373 | r3374 | |
| 233 | 233 | |
| 234 | 234 | // MDRV_NVRAM_HANDLER(generic_0fill) |
| 235 | 235 | |
| 236 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 237 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 236 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 237 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 238 | 238 | |
| 239 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 240 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 241 | ||
| 242 | 239 | /* video hardware */ |
| 243 | 240 | MDRV_SCREEN_ADD("main", RASTER) |
| 244 | 241 | MDRV_SCREEN_REFRESH_RATE(60) |
| r3373 | r3374 | |
|---|---|---|
| 113 | 113 | There's a separate ROM check for banked U04 at 30F3. |
| 114 | 114 | It looks like dealer/revenger uses ppi8255 to control bankswitching. |
| 115 | 115 | */ |
| 116 | static WRITE8_HANDLER( write_prtc ) | |
| 116 | static WRITE8_DEVICE_HANDLER( write_prtc ) | |
| 117 | 117 | { |
| 118 | UINT8 *rom = memory_region(machine, "main"); | |
| 118 | UINT8 *rom = memory_region(device->machine, "main"); | |
| 119 | 119 | memory_set_bankptr(2, rom + 0x6000 + (0x1000 * (data & 1))); |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | static const ppi8255_interface ppi8255_intf = |
| 123 | 123 | { |
| 124 | | |
| 124 | DEVICE8_PORT("INPUTS"), /* Port A read */ | |
| 125 | 125 | NULL, /* Port B read */ |
| 126 | 126 | NULL, /* Port C read */ |
| 127 | 127 | NULL, /* Port A write */ |
| r3373 | r3374 | |
| 409 | 409 | MDRV_CPU_IO_MAP(dealer_io_map,0) |
| 410 | 410 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 411 | 411 | |
| 412 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 413 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 412 | MDRV_PPI8255_ADD( "ppi8255", ppi8255_intf ) | |
| 414 | 413 | |
| 415 | 414 | /* video hardware */ |
| 416 | 415 | MDRV_VIDEO_UPDATE(epos) |
| r3373 | r3374 | |
|---|---|---|
| 128 | 128 | static const ppi8255_interface ppi8255_intf[2] = |
| 129 | 129 | { |
| 130 | 130 | { |
| 131 | input_port_0_r, /* Port A read */ | |
| 132 | input_port_2_r, /* Port B read */ | |
| 131 | DEVICE8_PORT("P1"), /* Port A read */ | |
| 132 | DEVICE8_PORT("SYSTEM"), /* Port B read */ | |
| 133 | 133 | NULL, /* Port C read */ |
| 134 | 134 | NULL, /* Port A write */ |
| 135 | 135 | NULL, /* Port B write */ |
| 136 | 136 | NULL /* Port C write */ |
| 137 | 137 | }, |
| 138 | 138 | { |
| 139 | input_port_1_r, /* Port A read */ | |
| 140 | input_port_3_r, /* Port B read */ | |
| 141 | input_port_4_r, /* Port C read */ | |
| 139 | DEVICE8_PORT("DSW"), /* Port A read */ | |
| 140 | DEVICE8_PORT("IN3"), /* Port B read */ | |
| 141 | DEVICE8_PORT("IN4"), /* Port C read */ | |
| 142 | 142 | NULL, /* Port A write */ |
| 143 | 143 | NULL, /* Port B write */ |
| 144 | 144 | NULL /* Port C write */ |
| r3373 | r3374 | |
| 360 | 360 | MDRV_CPU_IO_MAP(merit_io,0) |
| 361 | 361 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 362 | 362 | |
| 363 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 364 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 363 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 364 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 365 | 365 | |
| 366 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 367 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 368 | ||
| 369 | 366 | /* video hardware */ |
| 370 | 367 | MDRV_SCREEN_ADD("main", RASTER) |
| 371 | 368 | MDRV_SCREEN_REFRESH_RATE(60) |
| r3373 | r3374 | |
|---|---|---|
| 127 | 127 | MDRV_VIDEO_START(tcl) |
| 128 | 128 | MDRV_VIDEO_UPDATE(tcl) |
| 129 | 129 | |
| 130 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 131 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 130 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 131 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 132 | 132 | |
| 133 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 134 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 135 | ||
| 136 | 133 | /* sound hardware */ |
| 137 | 134 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 138 | 135 |
| r3373 | r3374 | |
|---|---|---|
| 550 | 550 | * |
| 551 | 551 | *************************************/ |
| 552 | 552 | |
| 553 | static WRITE8_HANDLER( snd_rom_addr_l_w ) | |
| 553 | static WRITE8_DEVICE_HANDLER( snd_rom_addr_l_w ) | |
| 554 | 554 | { |
| 555 | 555 | romaddr = (romaddr & 0xff00) | data; |
| 556 | 556 | } |
| 557 | 557 | |
| 558 | static WRITE8_HANDLER( snd_rom_addr_h_w ) | |
| 558 | static WRITE8_DEVICE_HANDLER( snd_rom_addr_h_w ) | |
| 559 | 559 | { |
| 560 | 560 | romaddr = (romaddr & 0x00ff) | (data << 8); |
| 561 | 561 | } |
| 562 | 562 | |
| 563 | static READ8_HANDLER( snd_rom_r ) | |
| 563 | static READ8_DEVICE_HANDLER( snd_rom_r ) | |
| 564 | 564 | { |
| 565 | return memory_region(machine, "user1")[romaddr & 0x7fff]; | |
| 565 | return memory_region(device->machine, "user1")[romaddr & 0x7fff]; | |
| 566 | 566 | } |
| 567 | 567 | |
| 568 | 568 | static const ppi8255_interface ppi8255_intf[2] = |
| r3373 | r3374 | |
| 576 | 576 | NULL /* Port C write */ |
| 577 | 577 | }, |
| 578 | 578 | { |
| 579 | input_port_0_r, /* Port A read */ | |
| 580 | input_port_1_r, /* Port B read */ | |
| 581 | input_port_2_r, /* Port C read */ | |
| 579 | DEVICE8_PORT("DSW1"), /* Port A read */ | |
| 580 | DEVICE8_PORT("DSW2"), /* Port B read */ | |
| 581 | DEVICE8_PORT("DSW3"), /* Port C read */ | |
| 582 | 582 | NULL, /* Port A write */ |
| 583 | 583 | NULL, /* Port B write */ |
| 584 | 584 | NULL /* Port C write */ |
| r3373 | r3374 | |
| 681 | 681 | MDRV_CPU_PROGRAM_MAP(freekckb_readmem,freekckb_writemem) |
| 682 | 682 | MDRV_CPU_IO_MAP(freekckb_io_map,0) |
| 683 | 683 | |
| 684 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 685 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 684 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 685 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 686 | 686 | |
| 687 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 688 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 689 | ||
| 690 | 687 | MDRV_VIDEO_UPDATE(freekick) |
| 691 | 688 | MACHINE_DRIVER_END |
| 692 | 689 |
| r3373 | r3374 | |
|---|---|---|
| 119 | 119 | if (mask & 0x01) *BITMAP_ADDR16(tmpbitmap, sy, sx+7) = (bits & 0x01) ? fg : bg; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | static RE | |
| 122 | static WRITE | |
| 123 | 123 | { |
| 124 | return input_port_read(machine, "IN0") | (ticket_dispenser_0_r(machine, 0) >> 5); | |
| 125 | } | |
| 126 | ||
| 127 | static WRITE8_HANDLER( lamps_w ) | |
| 128 | { | |
| 129 | 124 | /* 5 button lamps */ |
| 130 | 125 | set_led_status(0,data & 0x01); |
| 131 | 126 | set_led_status(1,data & 0x02); |
| r3373 | r3374 | |
| 140 | 135 | set_led_status(6,data & 0x80); |
| 141 | 136 | } |
| 142 | 137 | |
| 143 | static WRITE8_HANDLER( sound_w ) | |
| 138 | static WRITE8_DEVICE_HANDLER( sound_w ) | |
| 144 | 139 | { |
| 145 | 140 | /* bit 3 - coin lockout, lamp10 in poker / lamp6 in trivia test modes */ |
| 146 | 141 | coin_lockout_global_w(~data & 0x08); |
| 147 | 142 | set_led_status(9,data & 0x08); |
| 148 | 143 | |
| 149 | 144 | /* bit 5 - ticket out in trivia games */ |
| 150 | ticket_dispenser_w(machine,0, (data & 0x20)<< 2); | |
| 145 | ticket_dispenser_w(device->machine,0, (data & 0x20)<< 2); | |
| 151 | 146 | |
| 152 | 147 | /* bit 6 enables NMI */ |
| 153 | interrupt_enable_w(machine,0,data & 0x40); | |
| 148 | interrupt_enable_w(device->machine,0,data & 0x40); | |
| 154 | 149 | |
| 155 | 150 | /* bit 7 goes directly to the sound amplifier */ |
| 156 | 151 | dac_data_w(0,((data & 0x80) >> 7) * 255); |
| 157 | 152 | } |
| 158 | 153 | |
| 159 | static WRITE8_HANDLER( sound2_w ) | |
| 154 | static WRITE8_DEVICE_HANDLER( sound2_w ) | |
| 160 | 155 | { |
| 161 | 156 | /* bit 3,6 - coin lockout, lamp10+11 in selection test mode */ |
| 162 | 157 | coin_lockout_w(0, ~data & 0x08); |
| r3373 | r3374 | |
| 173 | 168 | dac_data_w(0,((data & 0x80) >> 7) * 255); |
| 174 | 169 | } |
| 175 | 170 | |
| 176 | static WRITE8_HANDLER( lamps2_w ) | |
| 171 | static WRITE8_DEVICE_HANDLER( lamps2_w ) | |
| 177 | 172 | { |
| 178 | 173 | /* bit 4 - play/raise button lamp, lamp 9 in poker test mode */ |
| 179 | 174 | set_led_status(8,data & 0x10); |
| 180 | 175 | } |
| 181 | 176 | |
| 182 | static WRITE8_HANDLER( nmi_w ) | |
| 177 | static WRITE8_DEVICE_HANDLER( nmi_w ) | |
| 183 | 178 | { |
| 184 | 179 | /* bit 4 - play/raise button lamp, lamp 9 in selection test mode */ |
| 185 | 180 | set_led_status(8,data & 0x10); |
| 186 | 181 | |
| 187 | 182 | /* bit 6 enables NMI */ |
| 188 | interrupt_enable_w(machine,0,data & 0x40); | |
| 183 | interrupt_enable_w(device->machine,0,data & 0x40); | |
| 189 | 184 | } |
| 190 | 185 | |
| 191 | 186 | static WRITE8_HANDLER( banksel_1_1_w ) |
| r3373 | r3374 | |
| 390 | 385 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x00) PORT_NAME ("Start in no coins mode") |
| 391 | 386 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x40) |
| 392 | 387 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x00) |
| 393 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* ticket status */ | |
| 388 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ticket_dispenser_0_port_r, 0) /* ticket status */ | |
| 394 | 389 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 395 | 390 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 396 | 391 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r3373 | r3374 | |
| 417 | 412 | INPUT_PORTS_END |
| 418 | 413 | |
| 419 | 414 | |
| 420 | ||
| 421 | 415 | static const ppi8255_interface getrivia_ppi8255_intf[2] = |
| 422 | 416 | { |
| 423 | 417 | { |
| 424 | input_port_0_r, /* Port A read */ | |
| 425 | port1_r, /* Port B read */ | |
| 418 | DEVICE8_PORT("DSWA"), /* Port A read */ | |
| 419 | DEVICE8_PORT("IN0"), /* Port B read */ | |
| 426 | 420 | NULL, /* Port C read */ |
| 427 | 421 | NULL, /* Port A write */ |
| 428 | 422 | NULL, /* Port B write */ |
| 429 | 423 | sound_w /* Port C write */ |
| 430 | 424 | }, |
| 431 | 425 | { |
| 432 | | |
| 426 | DEVICE8_PORT("IN1"), | |
| 433 | 427 | NULL, /* Port B read */ |
| 434 | 428 | NULL, /* Port C read */ |
| 435 | 429 | NULL, /* Port A write */ |
| r3373 | r3374 | |
| 441 | 435 | static const ppi8255_interface gselect_ppi8255_intf[2] = |
| 442 | 436 | { |
| 443 | 437 | { |
| 444 | input_port_0_r, /* Port A read */ | |
| 445 | input_port_1_r, /* Port B read */ | |
| 438 | DEVICE8_PORT("DSWA"), /* Port A read */ | |
| 439 | DEVICE8_PORT("IN0"), /* Port B read */ | |
| 446 | 440 | NULL, /* Port C read */ |
| 447 | 441 | NULL, /* Port A write */ |
| 448 | 442 | NULL, /* Port B write */ |
| 449 | 443 | sound2_w /* Port C write */ |
| 450 | 444 | }, |
| 451 | 445 | { |
| 452 | | |
| 446 | DEVICE8_PORT("IN1"), | |
| 453 | 447 | NULL, /* Port B read */ |
| 454 | | |
| 448 | DEVICE8_PORT("IN2"), | |
| 455 | 449 | NULL, /* Port A write */ |
| 456 | 450 | lamps_w, /* Port B write */ |
| 457 | 451 | nmi_w /* Port C write */ |
| r3373 | r3374 | |
| 488 | 482 | MDRV_VIDEO_START(generic_bitmapped) |
| 489 | 483 | MDRV_VIDEO_UPDATE(generic_bitmapped) |
| 490 | 484 | |
| 491 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 492 | MDRV_DEVICE_CONFIG( getrivia_ppi8255_intf[0] ) | |
| 485 | MDRV_PPI8255_ADD( "ppi8255_0", getrivia_ppi8255_intf[0] ) | |
| 486 | MDRV_PPI8255_ADD( "ppi8255_1", getrivia_ppi8255_intf[1] ) | |
| 493 | 487 | |
| 494 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 495 | MDRV_DEVICE_CONFIG( getrivia_ppi8255_intf[1] ) | |
| 496 | ||
| 497 | 488 | /* sound hardware */ |
| 498 | 489 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 499 | 490 | |
| r3373 | r3374 | |
| 511 | 502 | |
| 512 | 503 | MDRV_MACHINE_RESET(gselect) |
| 513 | 504 | |
| 514 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 515 | MDRV_DEVICE_CONFIG( gselect_ppi8255_intf[0] ) | |
| 516 | ||
| 517 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 518 | MDRV_DEVICE_CONFIG( gselect_ppi8255_intf[1] ) | |
| 505 | MDRV_PPI8255_RECONFIG( "ppi8255_0", gselect_ppi8255_intf[0] ) | |
| 506 | MDRV_PPI8255_RECONFIG( "ppi8255_1", gselect_ppi8255_intf[1] ) | |
| 519 | 507 | MACHINE_DRIVER_END |
| 520 | 508 | |
| 521 | 509 | static MACHINE_DRIVER_START( amuse ) |
| r3373 | r3374 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | static int dsw; |
| 56 | 56 | |
| 57 | static WRITE8_HANDLER( zaccaria_dsw_sel_w ) | |
| 57 | static WRITE8_DEVICE_HANDLER( zaccaria_dsw_sel_w ) | |
| 58 | 58 | { |
| 59 | 59 | switch (data & 0xf0) |
| 60 | 60 | { |
| r3373 | r3374 | |
| 233 | 233 | |
| 234 | 234 | static const ppi8255_interface ppi8255_intf = |
| 235 | 235 | { |
| 236 | input_port_3_r, /* Port A read */ | |
| 237 | input_port_4_r, /* Port B read */ | |
| 238 | input_port_5_r, /* Port C read */ | |
| 236 | DEVICE8_PORT("P1"), /* Port A read */ | |
| 237 | DEVICE8_PORT("P2"), /* Port B read */ | |
| 238 | DEVICE8_PORT("SYSTEM"), /* Port C read */ | |
| 239 | 239 | NULL, /* Port A write */ |
| 240 | 240 | NULL, /* Port B write */ |
| 241 | 241 | zaccaria_dsw_sel_w, /* Port C write */ |
| r3373 | r3374 | |
| 580 | 580 | MDRV_MACHINE_START(zaccaria) |
| 581 | 581 | MDRV_MACHINE_RESET(zaccaria) |
| 582 | 582 | |
| 583 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 584 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 583 | MDRV_PPI8255_ADD( "ppi8255", ppi8255_intf ) | |
| 585 | 584 | |
| 586 | 585 | /* video hardware */ |
| 587 | 586 | MDRV_SCREEN_ADD("main", RASTER) |
| r3373 | r3374 | |
|---|---|---|
| 225 | 225 | double brt = (data & 0xff) / 255.0; |
| 226 | 226 | |
| 227 | 227 | for (i = 0; i < 0x4000; i++) |
| 228 | palette_set_ | |
| 228 | palette_set_p | |
| 229 | 229 | } |
| 230 | 230 | } |
| 231 | 231 |
| r3373 | r3374 | |
|---|---|---|
| 33 | 33 | * |
| 34 | 34 | *************************************/ |
| 35 | 35 | |
| 36 | static WRITE8_HANDLER( input_port_select_w ) | |
| 36 | static WRITE8_DEVICE_HANDLER( input_port_select_w ) | |
| 37 | 37 | { |
| 38 | 38 | input_port_select = data; |
| 39 | 39 | } |
| r3373 | r3374 | |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | |
| 60 | static READ8_HANDLER( input_port_r ) | |
| 60 | static READ8_DEVICE_HANDLER( input_port_r ) | |
| 61 | 61 | { |
| 62 | 62 | UINT8 ret = 0; |
| 63 | 63 | |
| 64 | 64 | switch (input_port_select) |
| 65 | 65 | { |
| 66 | case 0x01: ret = input_port_read(machine, "IN0"); break; | |
| 67 | case 0x02: ret = input_port_read(machine, "IN1"); break; | |
| 68 | case 0x04: ret = (input_port_read(machine, "IN2") & 0xf0) | | |
| 69 | difficulty_input_port_r(machine, 0) | | |
| 70 | (difficulty_input_port_r(machine, 3) << 2); break; | |
| 71 | case 0x08: ret = input_port_read(machine, "IN3"); break; | |
| 66 | case 0x01: ret = input_port_read(device->machine, "IN0"); break; | |
| 67 | case 0x02: ret = input_port_read(device->machine, "IN1"); break; | |
| 68 | case 0x04: ret = (input_port_read(device->machine, "IN2") & 0xf0) | | |
| 69 | difficulty_input_port_r(device->machine, 0) | | |
| 70 | (difficulty_input_port_r(device->machine, 3) << 2); break; | |
| 71 | case 0x08: ret = input_port_read(device->machine, "IN3"); break; | |
| 72 | 72 | case 0x10: |
| 73 | 73 | case 0x20: break; /* these two are not really used */ |
| 74 | 74 | default: logerror("Unexpected port read: %02X\n", input_port_select); |
| r3373 | r3374 | |
| 320 | 320 | MDRV_SCREEN_REFRESH_RATE(60) |
| 321 | 321 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 322 | 322 | |
| 323 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 324 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 325 | ||
| 326 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 327 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 323 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 324 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 328 | 325 | MACHINE_DRIVER_END |
| 329 | 326 | |
| 330 | 327 |
| r3373 | r3374 | |
|---|---|---|
| 198 | 198 | coin_counter_w(0,data & 1); |
| 199 | 199 | break; |
| 200 | 200 | case 4: |
| 201 | coin_lockout_global_w(~data & 1); | |
| 201 | if (strcmp(machine->gamedrv->name, "geebeeb")) | |
| 202 | coin_lockout_global_w(~data & 1); | |
| 202 | 203 | break; |
| 203 | 204 | case 5: |
| 204 | 205 | if( geebee_bgw != (data & 1) ) |
| r3373 | r3374 | |
| 357 | 358 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 358 | 359 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 359 | 360 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail) ) |
| 360 | PORT_DIPNAME( 0x32, 0x10, "Lives/Bonus Life" ) | |
| 361 | PORT_DIPSETTING( 0x10, "3/40k 80k" ) | |
| 362 | PORT_DIPSETTING( 0x20, "3/70k 140k" ) | |
| 363 | PORT_DIPSETTING( 0x30, "3/100k 200k" ) | |
| 364 | PORT_DIPSETTING( 0x00, "3/None" ) | |
| 365 | PORT_DIPSETTING( 0x12, "5/60k 120k" ) | |
| 366 | PORT_DIPSETTING( 0x22, "5/100k 200k" ) | |
| 367 | PORT_DIPSETTING( 0x32, "5/150k 300k" ) | |
| 368 | PORT_DIPSETTING( 0x02, "5/None" ) | |
| 361 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) | |
| 362 | PORT_DIPSETTING( 0x00, "3" ) | |
| 363 | PORT_DIPSETTING( 0x02, "5" ) | |
| 369 | 364 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) |
| 370 | 365 | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) |
| 371 | 366 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 372 | 367 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 373 | 368 | PORT_DIPSETTING( 0x0c, DEF_STR( Free_Play ) ) |
| 369 | PORT_DIPNAME( 0x30, 0x10, "Replay" ) // awards 1 credit | |
| 370 | PORT_DIPSETTING( 0x10, "40k 80k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 371 | PORT_DIPSETTING( 0x20, "70k 140k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 372 | PORT_DIPSETTING( 0x30, "100k 200k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 373 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 374 | PORT_DIPSETTING( 0x10, "60k 120k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 375 | PORT_DIPSETTING( 0x20, "100k 200k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 376 | PORT_DIPSETTING( 0x30, "150k 300k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 377 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 374 | 378 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 375 | 379 | |
| 376 | 380 | PORT_START("IN1") |
| r3373 | r3374 | |
| 380 | 384 | PORT_BIT( 0xff, 0x58, IPT_PADDLE ) PORT_MINMAX(0x10,0xa0) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_CENTERDELTA(0) PORT_REVERSE PORT_COCKTAIL |
| 381 | 385 | INPUT_PORTS_END |
| 382 | 386 | |
| 387 | static INPUT_PORTS_START( geebeeb ) | |
| 388 | PORT_INCLUDE( geebee ) | |
| 389 | ||
| 390 | PORT_MODIFY("DSW2") | |
| 391 | PORT_DIPNAME( 0x30, 0x10, "Replay" ) // awards 1 credit | |
| 392 | PORT_DIPSETTING( 0x10, "40k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 393 | PORT_DIPSETTING( 0x20, "70k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 394 | PORT_DIPSETTING( 0x30, "100k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 395 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 396 | PORT_DIPSETTING( 0x10, "60k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 397 | PORT_DIPSETTING( 0x20, "100k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 398 | PORT_DIPSETTING( 0x30, "150k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 399 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 400 | INPUT_PORTS_END | |
| 401 | ||
| 383 | 402 | static INPUT_PORTS_START( navarone ) |
| 384 | 403 | PORT_START("SW0") |
| 385 | 404 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r3373 | r3374 | |
| 397 | 416 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 398 | 417 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 399 | 418 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail) ) |
| 400 | PORT_DIPNAME( 0x0e, 0x06, "Lives/Bonus Life" ) | |
| 401 | PORT_DIPSETTING( 0x04, "2/5000" ) | |
| 402 | PORT_DIPSETTING( 0x08, "2/6000" ) | |
| 403 | PORT_DIPSETTING( 0x0c, "2/7000" ) | |
| 404 | PORT_DIPSETTING( 0x00, "2/None" ) | |
| 405 | PORT_DIPSETTING( 0x06, "3/6000" ) | |
| 406 | PORT_DIPSETTING( 0x0a, "3/7000" ) | |
| 407 | PORT_DIPSETTING( 0x0e, "3/8000" ) | |
| 408 | PORT_DIPSETTING( 0x02, "3/None" ) | |
| 419 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Lives ) ) | |
| 420 | PORT_DIPSETTING( 0x00, "2" ) | |
| 421 | PORT_DIPSETTING( 0x02, "3" ) | |
| 422 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Bonus_Life ) ) | |
| 423 | PORT_DIPSETTING( 0x04, "5000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 424 | PORT_DIPSETTING( 0x08, "6000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 425 | PORT_DIPSETTING( 0x0c, "7000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 426 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 427 | PORT_DIPSETTING( 0x04, "6000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 428 | PORT_DIPSETTING( 0x08, "7000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 429 | PORT_DIPSETTING( 0x0c, "8000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 430 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 409 | 431 | PORT_DIPNAME( 0x30, 0x10, DEF_STR( Coinage ) ) |
| 410 | 432 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_1C ) ) |
| 411 | 433 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) |
| r3373 | r3374 | |
| 630 | 652 | PORT_DIPSETTING( 0x04, "3" ) |
| 631 | 653 | PORT_DIPSETTING( 0x08, "4" ) |
| 632 | 654 | PORT_DIPSETTING( 0x0c, "5" ) |
| 633 | /* Bonus Lives when "Lives" Dip Switch is set to "2", "3" or "4" */ | |
| 634 | 655 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) |
| 635 | PORT_DIPSETTING( 0x00, "8000 30000" ) | |
| 636 | PORT_DIPSETTING( 0x10, "10000 40000" ) | |
| 637 | PORT_DIPSETTING( 0x20, "15000 60000" ) | |
| 638 | PORT_DIPSETTING( 0x30, DEF_STR( None ) ) | |
| 639 | /* Bonus Lives when "Lives" Dip Switch is set to "5" | |
| 640 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) | |
| 641 | PORT_DIPSETTING( 0x00, "30000" ) | |
| 642 | PORT_DIPSETTING( 0x10, "40000" ) | |
| 643 | PORT_DIPSETTING( 0x20, "60000" ) | |
| 644 | PORT_DIPSETTING( 0x30, DEF_STR( None ) ) | |
| 645 | */ | |
| 656 | PORT_DIPSETTING( 0x00, "8k 30k 30k+" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_NOTEQUALS, 0x0c) | |
| 657 | PORT_DIPSETTING( 0x10, "10k 40k 40k+" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_NOTEQUALS, 0x0c) | |
| 658 | PORT_DIPSETTING( 0x20, "15k 60k 60k+" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_NOTEQUALS, 0x0c) | |
| 659 | PORT_DIPSETTING( 0x30, DEF_STR( None ) ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_NOTEQUALS, 0x0c) | |
| 660 | PORT_DIPSETTING( 0x00, "30k" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_EQUALS, 0x0c) | |
| 661 | PORT_DIPSETTING( 0x10, "40k" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_EQUALS, 0x0c) | |
| 662 | PORT_DIPSETTING( 0x20, "60k" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_EQUALS, 0x0c) | |
| 663 | PORT_DIPSETTING( 0x30, DEF_STR( None ) ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_EQUALS, 0x0c) | |
| 646 | 664 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) |
| 647 | 665 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 648 | 666 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r3373 | r3374 | |
| 990 | 1008 | |
| 991 | 1009 | /* B & W games */ |
| 992 | 1010 | GAMEL(1978, geebee, 0, geebee, geebee, geebee, ROT90, "Namco", "Gee Bee", 0, layout_geebee ) |
| 993 | GAMEL(1978, geebeeb, geebee, geebee, geebee, | |
| 1011 | GAMEL(1978, geebeeb, geebee, geebee, geebeeb, | |
| 994 | 1012 | GAMEL(1978, geebeeg, geebee, geebee, geebee, geebee, ROT90, "[Namco] (Gremlin license)", "Gee Bee (Gremlin)", 0, layout_geebee ) |
| 995 | 1013 | GAME( 1980, navarone, 0, navarone, navarone, navarone, ROT90, "Namco", "Navarone", GAME_IMPERFECT_SOUND ) |
| 996 | 1014 | GAME( 1980, kaitei, 0, navarone, kaitei, kaitei, ROT90, "Namco", "Kaitei Takara Sagashi", 0 ) |
| r3373 | r3374 | |
|---|---|---|
| 176 | 176 | |
| 177 | 177 | |
| 178 | 178 | |
| 179 | static READ8_HANDLER( turbo_analog_r ); | |
| 179 | static READ8_DEVICE_HANDLER( turbo_analog_r ); | |
| 180 | 180 | |
| 181 | 181 | |
| 182 | 182 | |
| r3373 | r3374 | |
| 208 | 208 | 3 = IC6 - CPU Board, Sheet 5, D7 |
| 209 | 209 | */ |
| 210 | 210 | |
| 211 | static WRITE8_HANDLER( turbo_ppi0a_w ) | |
| 211 | static WRITE8_DEVICE_HANDLER( turbo_ppi0a_w ) | |
| 212 | 212 | { |
| 213 | 213 | /* bit0-7 = 0PA0-7 */ |
| 214 | turbo_state *state = machine->driver_data; | |
| 214 | turbo_state *state = device->machine->driver_data; | |
| 215 | 215 | state->turbo_opa = data; |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | |
| 219 | static WRITE8_HANDLER( turbo_ppi0b_w ) | |
| 219 | static WRITE8_DEVICE_HANDLER( turbo_ppi0b_w ) | |
| 220 | 220 | { |
| 221 | 221 | /* bit0-7 = 0PB0-7 */ |
| 222 | turbo_state *state = machine->driver_data; | |
| 222 | turbo_state *state = device->machine->driver_data; | |
| 223 | 223 | state->turbo_opb = data; |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | |
| 227 | static WRITE8_HANDLER( turbo_ppi0c_w ) | |
| 227 | static WRITE8_DEVICE_HANDLER( turbo_ppi0c_w ) | |
| 228 | 228 | { |
| 229 | 229 | /* bit0-7 = 0PC0-7 */ |
| 230 | turbo_state *state = machine->driver_data; | |
| 230 | turbo_state *state = device->machine->driver_data; | |
| 231 | 231 | state->turbo_opc = data; |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | |
| 235 | static WRITE8_HANDLER( turbo_ppi1a_w ) | |
| 235 | static WRITE8_DEVICE_HANDLER( turbo_ppi1a_w ) | |
| 236 | 236 | { |
| 237 | 237 | /* bit0-7 = 1PA0-7 */ |
| 238 | turbo_state *state = machine->driver_data; | |
| 238 | turbo_state *state = device->machine->driver_data; | |
| 239 | 239 | state->turbo_ipa = data; |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | |
| 243 | static WRITE8_HANDLER( turbo_ppi1b_w ) | |
| 243 | static WRITE8_DEVICE_HANDLER( turbo_ppi1b_w ) | |
| 244 | 244 | { |
| 245 | 245 | /* bit0-7 = 1PB0-7 */ |
| 246 | turbo_state *state = machine->driver_data; | |
| 246 | turbo_state *state = device->machine->driver_data; | |
| 247 | 247 | state->turbo_ipb = data; |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | |
| 251 | static WRITE8_HANDLER( turbo_ppi1c_w ) | |
| 251 | static WRITE8_DEVICE_HANDLER( turbo_ppi1c_w ) | |
| 252 | 252 | { |
| 253 | 253 | /* bit0-7 = 1PC0-7 */ |
| 254 | turbo_state *state = machine->driver_data; | |
| 254 | turbo_state *state = device->machine->driver_data; | |
| 255 | 255 | state->turbo_ipc = data; |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | |
| 259 | static WRITE8_HANDLER( turbo_ppi3c_w ) | |
| 259 | static WRITE8_DEVICE_HANDLER( turbo_ppi3c_w ) | |
| 260 | 260 | { |
| 261 | 261 | /* bit 0-3 = PLA0-3 */ |
| 262 | 262 | /* bit 4-6 = COL0-2 */ |
| 263 | 263 | /* bit 7 = n/c */ |
| 264 | turbo_state *state = machine->driver_data; | |
| 264 | turbo_state *state = device->machine->driver_data; | |
| 265 | 265 | state->turbo_fbpla = data & 0x0f; |
| 266 | 266 | state->turbo_fbcol = (data >> 4) & 0x07; |
| 267 | 267 | } |
| r3373 | r3374 | |
| 295 | 295 | }, |
| 296 | 296 | { |
| 297 | 297 | turbo_analog_r, |
| 298 | | |
| 298 | DEVICE8_PORT("DSW2"), | |
| 299 | 299 | NULL, |
| 300 | 300 | NULL, |
| 301 | 301 | NULL, |
| r3373 | r3374 | |
| 317 | 317 | 1 = IC119 - CPU Board, Sheet 3, A5 |
| 318 | 318 | */ |
| 319 | 319 | |
| 320 | static WRITE8_HANDLER( subroc3d_ppi0a_w ) | |
| 320 | static WRITE8_DEVICE_HANDLER( subroc3d_ppi0a_w ) | |
| 321 | 321 | { |
| 322 | 322 | /* bit 0-3 = PLY0-3 */ |
| 323 | 323 | /* bit 4-7 = n/c */ |
| 324 | turbo_state *state = machine->driver_data; | |
| 324 | turbo_state *state = device->machine->driver_data; | |
| 325 | 325 | state->subroc3d_ply = data & 0x0f; |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | |
| 329 | static WRITE8_HANDLER( subroc3d_ppi0c_w ) | |
| 329 | static WRITE8_DEVICE_HANDLER( subroc3d_ppi0c_w ) | |
| 330 | 330 | { |
| 331 | 331 | /* bit 0-3 = COL0-3 */ |
| 332 | turbo_state *state = machine->driver_data; | |
| 332 | turbo_state *state = device->machine->driver_data; | |
| 333 | 333 | state->subroc3d_col = data & 0x0f; |
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | |
| 337 | static WRITE8_HANDLER( subroc3d_ppi0b_w ) | |
| 337 | static WRITE8_DEVICE_HANDLER( subroc3d_ppi0b_w ) | |
| 338 | 338 | { |
| 339 | 339 | /* bit 0 = COM1 (COIN METER 1) */ |
| 340 | 340 | /* bit 1 = COM2 (COIN METER 2) */ |
| 341 | 341 | /* bit 2 = STLA (START LAMP) */ |
| 342 | 342 | /* bit 3 = NOUSE (n/c) */ |
| 343 | 343 | /* bit 4 = FLIP (not really flip, just offset) */ |
| 344 | turbo_state *state = machine->driver_data; | |
| 344 | turbo_state *state = device->machine->driver_data; | |
| 345 | 345 | coin_counter_w(0, data & 0x01); |
| 346 | 346 | coin_counter_w(1, data & 0x02); |
| 347 | 347 | set_led_status(0, data & 0x04); |
| r3373 | r3374 | |
| 377 | 377 | * |
| 378 | 378 | *************************************/ |
| 379 | 379 | |
| 380 | static WRITE8_HANDLER( buckrog_ppi0a_w ) | |
| 380 | static WRITE8_DEVICE_HANDLER( buckrog_ppi0a_w ) | |
| 381 | 381 | { |
| 382 | 382 | /* bit 0-7 = data to be read on the /IOREQ */ |
| 383 | turbo_state *state = machine->driver_data; | |
| 383 | turbo_state *state = device->machine->driver_data; | |
| 384 | 384 | state->buckrog_command = data; |
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | |
| 388 | static WRITE8_HANDLER( buckrog_ppi0b_w ) | |
| 388 | static WRITE8_DEVICE_HANDLER( buckrog_ppi0b_w ) | |
| 389 | 389 | { |
| 390 | 390 | /* bit 0-5 = MOV0-5 */ |
| 391 | 391 | /* bit 6-7 = n/c */ |
| 392 | turbo_state *state = machine->driver_data; | |
| 392 | turbo_state *state = device->machine->driver_data; | |
| 393 | 393 | state->buckrog_mov = data & 0x3f; |
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | |
| 397 | static WRITE8_HANDLER( buckrog_ppi0c_w ) | |
| 397 | static WRITE8_DEVICE_HANDLER( buckrog_ppi0c_w ) | |
| 398 | 398 | { |
| 399 | 399 | /* bit 0-2 = FCHG0 */ |
| 400 | 400 | /* bit 3-5 = n/c */ |
| 401 | 401 | /* bit 6 = /IOREQ on the 2nd CPU */ |
| 402 | 402 | /* bit 7 = /INT on the 2nd CPU */ |
| 403 | turbo_state *state = machine->driver_data; | |
| 403 | turbo_state *state = device->machine->driver_data; | |
| 404 | 404 | state->buckrog_fchg = data & 0x07; |
| 405 | cpunum_set_input_line(machine, 1, 0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 405 | cpunum_set_input_line(device->machine, 1, 0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 406 | 406 | } |
| 407 | 407 | |
| 408 | 408 | |
| 409 | static WRITE8_HANDLER( buckrog_ppi1c_w ) | |
| 409 | static WRITE8_DEVICE_HANDLER( buckrog_ppi1c_w ) | |
| 410 | 410 | { |
| 411 | 411 | /* bit 0-2 = OBCH0-2 */ |
| 412 | 412 | /* bit 3 = n/c */ |
| r3373 | r3374 | |
| 414 | 414 | /* bit 5 = COM2 (COIN METER 2) */ |
| 415 | 415 | /* bit 6 = STLA (START LAMP) */ |
| 416 | 416 | /* bit 7 = NOUSE (BODY SONIC) */ |
| 417 | turbo_state *state = machine->driver_data; | |
| 417 | turbo_state *state = device->machine->driver_data; | |
| 418 | 418 | state->buckrog_obch = data & 0x07; |
| 419 | 419 | coin_counter_w(0, data & 0x10); |
| 420 | 420 | coin_counter_w(1, data & 0x20); |
| r3373 | r3374 | |
| 637 | 637 | } |
| 638 | 638 | |
| 639 | 639 | |
| 640 | static READ8_HANDLER( turbo_analog_r ) | |
| 640 | static READ8_DEVICE_HANDLER( turbo_analog_r ) | |
| 641 | 641 | { |
| 642 | turbo_state *state = machine->driver_data; | |
| 643 | return input_port_read(machine, "DIAL") - state->turbo_last_analog; | |
| 642 | turbo_state *state = device->machine->driver_data; | |
| 643 | return input_port_read(device->machine, "DIAL") - state->turbo_last_analog; | |
| 644 | 644 | } |
| 645 | 645 | |
| 646 | 646 | |
| r3373 | r3374 | |
| 679 | 679 | { |
| 680 | 680 | /* assert ACK */ |
| 681 | 681 | turbo_state *state = machine->driver_data; |
| 682 | ppi8255_set_port | |
| 682 | ppi8255_set_port_c(devtag_ge | |
| 683 | 683 | return state->buckrog_command; |
| 684 | 684 | } |
| 685 | 685 | |
| r3373 | r3374 | |
| 718 | 718 | |
| 719 | 719 | static TIMER_CALLBACK( delayed_ppi8255_w ) |
| 720 | 720 | { |
| 721 | ppi8255_w(dev | |
| 721 | ppi8255_w(devtag_ge | |
| 722 | 722 | } |
| 723 | 723 | |
| 724 | 724 | |
| r3373 | r3374 | |
| 1081 | 1081 | MDRV_CPU_PROGRAM_MAP(turbo_map,0) |
| 1082 | 1082 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 1083 | 1083 | |
| 1084 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1085 | MDRV_DEVICE_CONFIG( turbo_8255_intf[0] ) | |
| 1084 | MDRV_PPI8255_ADD( "ppi8255_0", turbo_8255_intf[0] ) | |
| 1085 | MDRV_PPI8255_ADD( "ppi8255_1", turbo_8255_intf[1] ) | |
| 1086 | MDRV_PPI8255_ADD( "ppi8255_2", turbo_8255_intf[2] ) | |
| 1087 | MDRV_PPI8255_ADD( "ppi8255_3", turbo_8255_intf[3] ) | |
| 1086 | 1088 | |
| 1087 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1088 | MDRV_DEVICE_CONFIG( turbo_8255_intf[1] ) | |
| 1089 | ||
| 1090 | MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) | |
| 1091 | MDRV_DEVICE_CONFIG( turbo_8255_intf[2] ) | |
| 1092 | ||
| 1093 | MDRV_DEVICE_ADD( "ppi8255_3", PPI8255 ) | |
| 1094 | MDRV_DEVICE_CONFIG( turbo_8255_intf[3] ) | |
| 1095 | ||
| 1096 | 1089 | /* video hardware */ |
| 1097 | 1090 | MDRV_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) |
| 1098 | 1091 | MDRV_GFXDECODE(turbo) |
| r3373 | r3374 | |
| 1119 | 1112 | MDRV_CPU_PROGRAM_MAP(subroc3d_map,0) |
| 1120 | 1113 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 1121 | 1114 | |
| 1122 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1123 | MDRV_DEVICE_CONFIG( subroc3d_8255_intf[0] ) | |
| 1115 | MDRV_PPI8255_ADD( "ppi8255_0", subroc3d_8255_intf[0] ) | |
| 1116 | MDRV_PPI8255_ADD( "ppi8255_1", subroc3d_8255_intf[1] ) | |
| 1124 | 1117 | |
| 1125 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1126 | MDRV_DEVICE_CONFIG( subroc3d_8255_intf[1] ) | |
| 1127 | ||
| 1128 | 1118 | /* video hardware */ |
| 1129 | 1119 | MDRV_GFXDECODE(turbo) |
| 1130 | 1120 | MDRV_PALETTE_LENGTH(256) |
| r3373 | r3374 | |
| 1157 | 1147 | MDRV_INTERLEAVE(10) |
| 1158 | 1148 | MDRV_MACHINE_RESET(buckrog) |
| 1159 | 1149 | |
| 1160 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1161 | MDRV_DEVICE_CONFIG( buckrog_8255_intf[0] ) | |
| 1150 | MDRV_PPI8255_ADD( "ppi8255_0", buckrog_8255_intf[0] ) | |
| 1151 | MDRV_PPI8255_ADD( "ppi8255_1", buckrog_8255_intf[1] ) | |
| 1162 | 1152 | |
| 1163 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1164 | MDRV_DEVICE_CONFIG( buckrog_8255_intf[1] ) | |
| 1165 | ||
| 1166 | 1153 | /* video hardware */ |
| 1167 | 1154 | MDRV_GFXDECODE(turbo) |
| 1168 | 1155 | MDRV_PALETTE_LENGTH(1024) |
| r3373 | r3374 | |
|---|---|---|
| 71 | 71 | VIDEO_START_CALL(amiga); |
| 72 | 72 | |
| 73 | 73 | /* configure pen 4096 as transparent in the renderer and use it for the genlock color */ |
| 74 | | |
| 74 | | |
| 75 | 75 | amiga_set_genlock_color(4096); |
| 76 | 76 | } |
| 77 | 77 |
| r3373 | r3374 | |
|---|---|---|
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | |
| 300 | static WRITE8_HANDLER( output_port_1_w ) | |
| 300 | static WRITE8_DEVICE_HANDLER( output_port_1_w ) | |
| 301 | 301 | { |
| 302 | 302 | /* ---------------- |
| 303 | 303 | Lamps & Counters |
| r3373 | r3374 | |
| 323 | 323 | |
| 324 | 324 | static const ppi8255_interface ppi8255_intf = |
| 325 | 325 | { |
| 326 | input_port_0_r, /* Port A read */ | |
| 327 | input_port_1_r, /* Port B read */ | |
| 326 | DEVICE8_PORT("IN0"),/* Port A read */ | |
| 327 | DEVICE8_PORT("IN1"),/* Port B read */ | |
| 328 | 328 | NULL, /* Port C read */ |
| 329 | 329 | NULL, /* Port A write */ |
| 330 | 330 | NULL, /* Port B write */ |
| r3373 | r3374 | |
| 441 | 441 | |
| 442 | 442 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 443 | 443 | |
| 444 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 445 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 444 | MDRV_PPI8255_ADD( "ppi8255", ppi8255_intf ) | |
| 446 | 445 | |
| 447 | 446 | /* video hardware */ |
| 448 | 447 | MDRV_SCREEN_ADD("main", RASTER) |
| r3373 | r3374 | |
|---|---|---|
| 153 | 153 | int sprite; |
| 154 | 154 | int gfxtop = video_screen_get_visible_area(screen)->min_y; |
| 155 | 155 | |
| 156 | fillbitmap( bitmap, 256, cliprect ); | |
| 156 | fillbitmap( bitmap, palette_get_color(screen->machine, 256), cliprect ); | |
| 157 | 157 | |
| 158 | 158 | for( y = 0; y < 64; y++ ) |
| 159 | 159 | { |
| r3373 | r3374 | |
| 203 | 203 | int b = palette_ram[ index + 512 ]; |
| 204 | 204 | int a = ( b & 3 ) * 0x55; |
| 205 | 205 | |
| 206 | palette_set_color( machine, start + index, MAKE_RGB( r, g, b ) ); | |
| 207 | render_container_set_palette_alpha(render_container_get_screen(machine->primary_screen), start + index, a); | |
| 206 | palette_set_color( machine, start + index, MAKE_ARGB( a, r, g, b ) ); | |
| 208 | 207 | } |
| 209 | 208 | |
| 210 | 209 | static WRITE8_HANDLER( tile_palette_w ) |
| r3373 | r3374 | |
| 654 | 653 | MDRV_WATCHDOG_TIME_INIT(UINT64_ATTOTIME_IN_HZ((double)MASTER_XTAL/8/16/16/16/16)) |
| 655 | 654 | |
| 656 | 655 | /* video hardware */ |
| 657 | MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_ | |
| 656 | MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_RGB32 | |
| 658 | 657 | |
| 659 | 658 | MDRV_GFXDECODE(firefox) |
| 660 | 659 | MDRV_PALETTE_LENGTH(512) |
| 661 | 660 | |
| 662 | 661 | MDRV_LASERDISC_ADD("laserdisc", PHILLIPS_22VP931, "main", "ldsound") |
| 663 | MDRV_LASERDISC_OVERLAY(firefox, 64*8, 525, BITMAP_FORMAT_ | |
| 662 | MDRV_LASERDISC_OVERLAY(firefox, 64*8, 525, BITMAP_FORMAT_RGB32 | |
| 664 | 663 | MDRV_LASERDISC_OVERLAY_CLIP(7*8, 53*8-1, 44, 480+44) |
| 665 | 664 | |
| 666 | 665 | MDRV_DEVICE_ADD("nvram_1c",X2212) |
| r3373 | r3374 | |
|---|---|---|
| 490 | 490 | * |
| 491 | 491 | *************************************/ |
| 492 | 492 | |
| 493 | static void ctc_interrupt( | |
| 493 | static void ctc_interrupt(const device_ | |
| 494 | 494 | { |
| 495 | cpu | |
| 495 | cputag_set_input_line(device->machine, "sub", 0, state); | |
| 496 | 496 | } |
| 497 | 497 | |
| 498 | 498 | |
| 499 | 499 | static z80ctc_interface ctc_intf = |
| 500 | 500 | { |
| 501 | "sub", /* clock comes from sub CPU */ | |
| 501 | 502 | 0, /* clock (filled in from the CPU 0 clock) */ |
| 502 | 503 | 0, /* timer disables */ |
| 503 | 504 | ctc_interrupt, /* interrupt handler */ |
| r3373 | r3374 | |
| 518 | 519 | }; |
| 519 | 520 | |
| 520 | 521 | |
| 521 | static MACHINE_START( tenpindx ) | |
| 522 | { | |
| 523 | /* initialize the CTC */ | |
| 524 | ctc_intf.baseclock = cpunum_get_clock(0); | |
| 525 | z80ctc_init(0, &ctc_intf); | |
| 526 | MACHINE_START_CALL(astrocde); | |
| 527 | } | |
| 528 | ||
| 529 | ||
| 530 | 522 | static WRITE8_HANDLER( tenpindx_sound_w ) |
| 531 | 523 | { |
| 532 | 524 | soundlatch_w(machine, offset, data); |
| 533 | cpu | |
| 525 | cputag_set_input_line(machine, "sub", INPUT_LINE_NMI, PULSE_LINE); | |
| 534 | 526 | } |
| 535 | 527 | |
| 536 | 528 | |
| r3373 | r3374 | |
| 714 | 706 | |
| 715 | 707 | static ADDRESS_MAP_START( tenpin_sub_io_map, ADDRESS_SPACE_IO, 8 ) |
| 716 | 708 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 717 | AM_RANGE(0x90, 0x93) AM_READWRITE(z80ctc_ | |
| 709 | AM_RANGE(0x90, 0x93) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_ | |
| 718 | 710 | AM_RANGE(0x97, 0x97) AM_READ(soundlatch_r) |
| 719 | 711 | AM_RANGE(0x98, 0x98) AM_WRITE(ay8910_control_port_0_w) |
| 720 | 712 | AM_RANGE(0x98, 0x98) AM_READ(ay8910_read_port_0_r) |
| r3373 | r3374 | |
| 1243 | 1235 | * |
| 1244 | 1236 | *************************************/ |
| 1245 | 1237 | |
| 1246 | static const | |
| 1238 | static const | |
| 1247 | 1239 | { |
| 1248 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */ | |
| 1249 | { 0, 0, 0, 0, -1 } /* end mark */ | |
| 1240 | { Z80CTC, "ctc" }, | |
| 1241 | { NULL } | |
| 1250 | 1242 | }; |
| 1251 | 1243 | |
| 1252 | 1244 | |
| r3373 | r3374 | |
| 1470 | 1462 | MDRV_CPU_PROGRAM_MAP(tenpin_sub_map,0) |
| 1471 | 1463 | MDRV_CPU_IO_MAP(tenpin_sub_io_map,0) |
| 1472 | 1464 | |
| 1473 | MDRV_ | |
| 1465 | MDRV_Z80C | |
| 1474 | 1466 | |
| 1475 | 1467 | /* sound hardware */ |
| 1476 | 1468 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r3373 | r3374 | |
|---|---|---|
| 241 | 241 | vdp_interrupt |
| 242 | 242 | }; |
| 243 | 243 | |
| 244 | static WRITE8_HANDLER( sg1000a_coin_counter_w ) | |
| 244 | static WRITE8_DEVICE_HANDLER( sg1000a_coin_counter_w ) | |
| 245 | 245 | { |
| 246 | 246 | coin_counter_w(0, data & 0x01); |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | static const ppi8255_interface ppi8255_intf = |
| 250 | 250 | { |
| 251 | input_port_0_r, | |
| 252 | input_port_1_r, | |
| 253 | input_port_2_r, | |
| 251 | DEVICE8_PORT("P1"), | |
| 252 | DEVICE8_PORT("P2"), | |
| 253 | DEVICE8_PORT("DSW"), | |
| 254 | 254 | NULL, |
| 255 | 255 | NULL, |
| 256 | 256 | sg1000a_coin_counter_w |
| r3373 | r3374 | |
| 269 | 269 | MDRV_CPU_IO_MAP(io_map, 0) |
| 270 | 270 | MDRV_CPU_VBLANK_INT("main", sg1000a_interrupt) |
| 271 | 271 | |
| 272 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 273 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 272 | MDRV_PPI8255_ADD( "ppi8255", ppi8255_intf ) | |
| 274 | 273 | |
| 275 | 274 | /* video hardware */ |
| 276 | 275 | MDRV_IMPORT_FROM(tms9928a) |
| r3373 | r3374 | |
|---|---|---|
| 44 | 44 | { |
| 45 | 45 | int charx, chary; |
| 46 | 46 | |
| 47 | render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00); | |
| 48 | ||
| 49 | 47 | /* clear */ |
| 50 | 48 | fillbitmap(bitmap, 0, cliprect); |
| 51 | 49 | |
| r3373 | r3374 | |
| 291 | 289 | |
| 292 | 290 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); |
| 293 | 291 | } |
| 292 | ||
| 293 | /* make color 0 transparent */ | |
| 294 | palette_set_color(machine, 0, MAKE_ARGB(0,0,0,0)); | |
| 294 | 295 | } |
| 295 | 296 | |
| 296 | 297 | static const gfx_layout istellar_gfx_layout = |
| r3373 | r3374 | |
|---|---|---|
| 229 | 229 | MDRV_CPU_MODIFY("main") |
| 230 | 230 | MDRV_CPU_IO_MAP(invadpt2_io_map,0) |
| 231 | 231 | |
| 232 | /* 60 Hz signal clocks two LS161. Ripple carry will */ | |
| 233 | /* reset circuit, if LS161 not cleared before. */ | |
| 234 | MDRV_WATCHDOG_VBLANK_INIT(255) | |
| 235 | ||
| 232 | 236 | /* video hardware */ |
| 233 | 237 | MDRV_VIDEO_UPDATE(invadpt2) |
| 234 | 238 |
| r3373 | r3374 | |
|---|---|---|
| 247 | 247 | INTERRUPTS |
| 248 | 248 | ***********************************************************/ |
| 249 | 249 | |
| 250 | static int vblank_irq, ad_irq | |
| 250 | static int vblank_irq, ad_irq | |
| 251 | 251 | |
| 252 | 252 | static MACHINE_RESET( othunder ) |
| 253 | 253 | { |
| 254 | 254 | vblank_irq = 0; |
| 255 | 255 | ad_irq = 0; |
| 256 | last_irq_level = 0; | |
| 257 | 256 | } |
| 258 | 257 | |
| 259 | 258 | static void update_irq(running_machine *machine) |
| 260 | 259 | { |
| 261 | int curr_level; | |
| 262 | ||
| 263 | if (ad_irq) | |
| 264 | curr_level = 6; | |
| 265 | else if (vblank_irq) | |
| 266 | curr_level = 5; | |
| 267 | else | |
| 268 | curr_level = 0; | |
| 269 | ||
| 270 | if (curr_level != last_irq_level) | |
| 271 | { | |
| 272 | cpunum_set_input_line(machine, 0,curr_level,curr_level ? ASSERT_LINE : CLEAR_LINE); | |
| 273 | last_irq_level = curr_level; | |
| 274 | } | |
| 260 | cpunum_set_input_line(machine, 0, 6, ad_irq ? ASSERT_LINE : CLEAR_LINE); | |
| 261 | cpunum_set_input_line(machine, 0, 5, vblank_irq ? ASSERT_LINE : CLEAR_LINE); | |
| 275 | 262 | } |
| 276 | 263 | |
| 277 | 264 | static WRITE16_HANDLER( irq_ack_w ) |
| r3373 | r3374 | |
|---|---|---|
| 93 | 93 | #define UART_CLK XTAL_18_432MHz |
| 94 | 94 | |
| 95 | 95 | static UINT8* meritm_ram; |
| 96 | static const device_config *meritm_z80pio[2]; | |
| 96 | 97 | |
| 98 | ||
| 97 | 99 | /************************************* |
| 98 | 100 | * |
| 99 | 101 | * DS1204 Electronic Key |
| r3373 | r3374 | |
| 297 | 299 | meritm_vint |= 0x08; |
| 298 | 300 | |
| 299 | 301 | if(i) |
| 300 | z80pio_p_w(m | |
| 302 | z80pio_p_w(m | |
| 301 | 303 | } |
| 302 | 304 | } |
| 303 | 305 | |
| r3373 | r3374 | |
| 312 | 314 | meritm_vint |= 0x10; |
| 313 | 315 | |
| 314 | 316 | if(i) |
| 315 | z80pio_p_w(m | |
| 317 | z80pio_p_w(m | |
| 316 | 318 | } |
| 317 | 319 | } |
| 318 | 320 | |
| r3373 | r3374 | |
| 556 | 558 | AM_RANGE(0x22, 0x22) AM_WRITE(v9938_1_palette_w) |
| 557 | 559 | AM_RANGE(0x23, 0x23) AM_WRITE(v9938_1_register_w) |
| 558 | 560 | AM_RANGE(0x30, 0x33) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_r, ppi8255_w) |
| 559 | AM_RANGE(0x40, 0x43) AM_READWRITE(z80pio_0_r, z80pio_0_w) | |
| 560 | AM_RANGE(0x50, 0x53) AM_READWRITE(z80pio_1_r, z80pio_1_w) | |
| 561 | AM_RANGE(0x40, 0x43) AM_DEVREADWRITE(Z80PIO, "z80pio_0", z80pio_r, z80pio_w) | |
| 562 | AM_RANGE(0x50, 0x53) AM_DEVREADWRITE(Z80PIO, "z80pio_1", z80pio_r, z80pio_w) | |
| 561 | 563 | AM_RANGE(0x80, 0x80) AM_READWRITE(ay8910_read_port_0_r, ay8910_control_port_0_w) |
| 562 | 564 | AM_RANGE(0x81, 0x81) AM_WRITE(ay8910_write_port_0_w) |
| 563 | 565 | AM_RANGE(0xff, 0xff) AM_WRITE(meritm_crt250_bank_w) |
| r3373 | r3374 | |
| 582 | 584 | AM_RANGE(0x22, 0x22) AM_WRITE(v9938_1_palette_w) |
| 583 | 585 | AM_RANGE(0x23, 0x23) AM_WRITE(v9938_1_register_w) |
| 584 | 586 | AM_RANGE(0x30, 0x33) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_r, ppi8255_w) |
| 585 | AM_RANGE(0x40, 0x43) AM_READWRITE(z80pio_0_r, z80pio_0_w) | |
| 586 | AM_RANGE(0x50, 0x53) AM_READWRITE(z80pio_1_r, z80pio_1_w) | |
| 587 | AM_RANGE(0x40, 0x43) AM_DEVREADWRITE(Z80PIO, "z80pio_0", z80pio_r, z80pio_w) | |
| 588 | AM_RANGE(0x50, 0x53) AM_DEVREADWRITE(Z80PIO, "z80pio_1", z80pio_r, z80pio_w) | |
| 587 | 589 | AM_RANGE(0x60, 0x67) AM_READWRITE(pc16552d_0_r,pc16552d_0_w) |
| 588 | 590 | AM_RANGE(0x80, 0x80) AM_READWRITE(ay8910_read_port_0_r, ay8910_control_port_0_w) |
| 589 | 591 | AM_RANGE(0x81, 0x81) AM_WRITE(ay8910_write_port_0_w) |
| r3373 | r3374 | |
| 670 | 672 | * |
| 671 | 673 | *************************************/ |
| 672 | 674 | |
| 673 | static READ8_HANDLER(meritm_8255_port_c_r) | |
| 675 | static READ8_DEVICE_HANDLER(meritm_8255_port_c_r) | |
| 674 | 676 | { |
| 675 | 677 | //logerror( "8255 port C read\n" ); |
| 676 | 678 | return 0xff; |
| 677 | 679 | }; |
| 678 | 680 | |
| 679 | static WRITE8_HANDLER(meritm_crt250_port_b_w) | |
| 681 | static WRITE8_DEVICE_HANDLER(meritm_crt250_port_b_w) | |
| 680 | 682 | { |
| 681 | 683 | //popmessage("Lamps: %d %d %d %d %d %d %d", BIT(data,0), BIT(data,1), BIT(data,2), BIT(data,3), BIT(data,4), BIT(data,5), BIT(data,6) ); |
| 682 | 684 | output_set_value("P1 DISC 1 LAMP", !BIT(data,0)); |
| r3373 | r3374 | |
| 745 | 747 | * |
| 746 | 748 | *************************************/ |
| 747 | 749 | |
| 748 | static void meritm_audio_pio_interrupt( | |
| 750 | static void meritm_audio_pio_interrupt(const device_ | |
| 749 | 751 | { |
| 750 | 752 | //logerror( "PIO(0) interrupt line: %d, V = %d, H = %d\n", state, video_screen_get_vpos(0), video_screen_get_hpos(0) ); |
| 751 | cpunum_set_input_line(machine, 0, 0, state); | |
| 753 | cpunum_set_input_line(device->machine, 0, 0, state); | |
| 752 | 754 | } |
| 753 | 755 | |
| 754 | static void meritm_io_pio_interrupt( | |
| 756 | static void meritm_io_pio_interrupt(const device_ | |
| 755 | 757 | { |
| 756 | 758 | //logerror( "PIO(1) interrupt line: %d, V = %d, H = %d\n", state, video_screen_get_vpos(0), video_screen_get_hpos(0) ); |
| 757 | cpunum_set_input_line(machine, 0, 0, state); | |
| 759 | cpunum_set_input_line(device->machine, 0, 0, state); | |
| 758 | 760 | } |
| 759 | 761 | |
| 760 | 762 | |
| 761 | static READ8_HANDLER(meritm_audio_pio_port_a_r) | |
| 763 | static READ8_DEVICE_HANDLER(meritm_audio_pio_port_a_r) | |
| 762 | 764 | { |
| 763 | 765 | return meritm_vint; |
| 764 | 766 | }; |
| 765 | 767 | |
| 766 | static READ8_HANDLER(meritm_audio_pio_port_b_r) | |
| 768 | static READ8_DEVICE_HANDLER(meritm_audio_pio_port_b_r) | |
| 767 | 769 | { |
| 768 | 770 | return ds1204_r(); |
| 769 | 771 | }; |
| 770 | 772 | |
| 771 | static WRITE8_HANDLER(meritm_audio_pio_port_a_w) | |
| 773 | static WRITE8_DEVICE_HANDLER(meritm_audio_pio_port_a_w) | |
| 772 | 774 | { |
| 773 | 775 | meritm_bank = (data & 7) | ((data >> 2) & 0x18); |
| 774 | 776 | //logerror("Writing BANK with %x (raw = %x)\n", meritm_bank, data); |
| 775 | 777 | }; |
| 776 | 778 | |
| 777 | static WRITE8_HANDLER(meritm_audio_pio_port_b_w) | |
| 779 | static WRITE8_DEVICE_HANDLER(meritm_audio_pio_port_b_w) | |
| 778 | 780 | { |
| 779 | 781 | ds1204_w((data & 0x4) >> 2, (data & 0x2) >> 1, data & 0x01); |
| 780 | 782 | }; |
| 781 | 783 | |
| 782 | static READ8_HANDLER(meritm_io_pio_port_a_r) | |
| 784 | static READ8_DEVICE_HANDLER(meritm_io_pio_port_a_r) | |
| 783 | 785 | { |
| 784 | return input_port_read(machine, "PIO1_PORTA"); | |
| 786 | return input_port_read(device->machine, "PIO1_PORTA"); | |
| 785 | 787 | }; |
| 786 | 788 | |
| 787 | static READ8_HANDLER(meritm_io_pio_port_b_r) | |
| 789 | static READ8_DEVICE_HANDLER(meritm_io_pio_port_b_r) | |
| 788 | 790 | { |
| 789 | return input_port_read(machine, "PIO1_PORTB"); | |
| 791 | return input_port_read(device->machine, "PIO1_PORTB"); | |
| 790 | 792 | }; |
| 791 | 793 | |
| 792 | static WRITE8_HANDLER(meritm_io_pio_port_a_w) | |
| 794 | static WRITE8_DEVICE_HANDLER(meritm_io_pio_port_a_w) | |
| 793 | 795 | { |
| 794 | 796 | }; |
| 795 | 797 | |
| 796 | static WRITE8_HANDLER(meritm_io_pio_port_b_w) | |
| 798 | static WRITE8_DEVICE_HANDLER(meritm_io_pio_port_b_w) | |
| 797 | 799 | { |
| 798 | 800 | }; |
| 799 | 801 | |
| r3373 | r3374 | |
| 826 | 828 | } |
| 827 | 829 | #endif |
| 828 | 830 | |
| 829 | static const | |
| 831 | static const | |
| 830 | 832 | { |
| 831 | { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti, 1 }, /* PIO number 1 */ | |
| 832 | { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti, 0 }, /* PIO number 0 */ | |
| 833 | { 0, 0, 0, 0, -1 } /* end mark */ | |
| 833 | { Z80PIO, "z80pio_1" }, | |
| 834 | { Z80PIO, "z80pio_0" }, | |
| 835 | { NULL } | |
| 834 | 836 | }; |
| 835 | 837 | |
| 836 | 838 | static MACHINE_START(merit_common) |
| 837 | 839 | { |
| 838 | z80pio_init(0, &meritm_audio_pio_intf); | |
| 839 | z80pio_init(1, &meritm_io_pio_intf); | |
| 840 | meritm_z80pio[0] = devtag_get_device( machine, Z80PIO, "z80pio_0" ); | |
| 841 | meritm_z80pio[1] = devtag_get_device( machine, Z80PIO, "z80pio_1" ); | |
| 840 | 842 | //input_port_set_changed_callback(port_tag_to_index("PIO1_PORTB"), 0xff, meritm_pio1_portb_input_changed_callback, NULL); |
| 841 | 843 | |
| 842 | 844 | }; |
| r3373 | r3374 | |
| 904 | 906 | |
| 905 | 907 | MDRV_MACHINE_START(meritm_crt250) |
| 906 | 908 | |
| 907 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 908 | MDRV_DEVICE_CONFIG( crt250_ppi8255_intf ) | |
| 909 | MDRV_PPI8255_ADD( "ppi8255", crt250_ppi8255_intf ) | |
| 909 | 910 | |
| 911 | MDRV_Z80PIO_ADD( "z80pio_0", meritm_audio_pio_intf ) | |
| 912 | MDRV_Z80PIO_ADD( "z80pio_1", meritm_io_pio_intf ) | |
| 913 | ||
| 910 | 914 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 911 | 915 | |
| 912 | 916 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| r3373 | r3374 | |
| 945 | 949 | MDRV_CPU_PROGRAM_MAP(meritm_map,0) |
| 946 | 950 | MDRV_CPU_IO_MAP(meritm_io_map,0) |
| 947 | 951 | |
| 948 | MDRV_DEVICE_MODIFY( "ppi8255", PPI8255 ) | |
| 949 | MDRV_DEVICE_CONFIG( crt260_ppi8255_intf ) | |
| 952 | MDRV_PPI8255_RECONFIG( "ppi8255", crt260_ppi8255_intf ) | |
| 950 | 953 | |
| 951 | 954 | MDRV_WATCHDOG_TIME_INIT(UINT64_ATTOTIME_IN_MSEC(1200)) // DS1232, TD connected to VCC |
| 952 | 955 | MDRV_MACHINE_START(meritm_crt260) |
| r3373 | r3374 | |
|---|---|---|
| 755 | 755 | * Lamps * |
| 756 | 756 | **************/ |
| 757 | 757 | |
| 758 | static WRITE8_HANDLER(lamps_a_w) | |
| 758 | static WRITE8_DEVICE_HANDLER(lamps_a_w) | |
| 759 | 759 | { |
| 760 | 760 | /* LAMPSA: |
| 761 | 761 | |
| r3373 | r3374 | |
| 770 | 770 | output_set_lamp_value(11, (data >> 3) & 1); /* SMALL */ |
| 771 | 771 | } |
| 772 | 772 | |
| 773 | static WRITE8_HANDLER(lamps_b_w) | |
| 773 | static WRITE8_DEVICE_HANDLER(lamps_b_w) | |
| 774 | 774 | { |
| 775 | 775 | /* LAMPSB: |
| 776 | 776 | |
| r3373 | r3374 | |
| 1173 | 1173 | static const ppi8255_interface ppi8255_intf[4] = |
| 1174 | 1174 | { |
| 1175 | 1175 | { /* A & B set as input */ |
| 1176 | input_port_0_r, /* Port A read, IN0 */ | |
| 1177 | input_port_1_r, /* Port B read, IN1 */ | |
| 1176 | DEVICE8_PORT("IN0"), /* Port A read, IN0 */ | |
| 1177 | DEVICE8_PORT("IN1"), /* Port B read, IN1 */ | |
| 1178 | 1178 | NULL, /* Port C read */ |
| 1179 | 1179 | NULL, /* Port A write */ |
| 1180 | 1180 | NULL, /* Port B write */ |
| 1181 | 1181 | NULL /* Port C writes: 0x00 after reset, 0xff during game, and 0xfd when tap F2 for percentage and run count */ |
| 1182 | 1182 | }, |
| 1183 | 1183 | { /* A & C set as input */ |
| 1184 | | |
| 1184 | DEVICE8_PORT("IN2"), | |
| 1185 | 1185 | NULL, /* Port B read */ |
| 1186 | | |
| 1186 | DEVICE8_PORT("IN4"), | |
| 1187 | 1187 | NULL, /* Port A write */ |
| 1188 | 1188 | NULL, /* Port B write */ |
| 1189 | 1189 | NULL /* Port C write */ |
| 1190 | 1190 | }, |
| 1191 | 1191 | { /* A, B & C set as input */ |
| 1192 | input_port_5_r, /* Port A read, DSW1 */ | |
| 1193 | input_port_6_r, /* Port B read, DSW2 */ | |
| 1194 | input_port_7_r, /* Port C read, DSW3 */ | |
| 1192 | DEVICE8_PORT("DSW1"), /* Port A read, DSW1 */ | |
| 1193 | DEVICE8_PORT("DSW2"), /* Port B read, DSW2 */ | |
| 1194 | DEVICE8_PORT("DSW3"), /* Port C read, DSW3 */ | |
| 1195 | 1195 | NULL, /* Port A write */ |
| 1196 | 1196 | NULL, /* Port B write */ |
| 1197 | 1197 | NULL /* Port C write */ |
| 1198 | 1198 | }, |
| 1199 | 1199 | { /* A set as input */ |
| 1200 | | |
| 1200 | DEVICE | |
| 1201 | 1201 | NULL, /* Port B read */ |
| 1202 | 1202 | NULL, /* Port C read */ |
| 1203 | 1203 | NULL, /* Port A write */ |
| r3373 | r3374 | |
| 1244 | 1244 | |
| 1245 | 1245 | MDRV_SOUND_START(lucky74) |
| 1246 | 1246 | |
| 1247 | ||
| 1248 | 1247 | /* 2x 82c255 (4x 8255) */ |
| 1249 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1250 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 1248 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 1249 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 1250 | MDRV_PPI8255_ADD( "ppi8255_2", ppi8255_intf[2] ) | |
| 1251 | MDRV_PPI8255_ADD( "ppi8255_3", ppi8255_intf[3] ) | |
| 1251 | 1252 | |
| 1252 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1253 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 1254 | ||
| 1255 | MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) | |
| 1256 | MDRV_DEVICE_CONFIG( ppi8255_intf[2] ) | |
| 1257 | ||
| 1258 | MDRV_DEVICE_ADD( "ppi8255_3", PPI8255 ) | |
| 1259 | MDRV_DEVICE_CONFIG( ppi8255_intf[3] ) | |
| 1260 | ||
| 1261 | 1253 | /* video hardware */ |
| 1262 | 1254 | MDRV_SCREEN_ADD("main", RASTER) |
| 1263 | 1255 | MDRV_SCREEN_REFRESH_RATE(60) |
| r3373 | r3374 | |
|---|---|---|
| 299 | 299 | int i; |
| 300 | 300 | |
| 301 | 301 | for (i = 0; i < 0x800; i++) |
| 302 | palette_set_ | |
| 302 | palette_set_p | |
| 303 | 303 | |
| 304 | 304 | oldbrt1 = brt1; |
| 305 | 305 | } |
| r3373 | r3374 | |
| 326 | 326 | int i; |
| 327 | 327 | |
| 328 | 328 | for (i = 0x800; i < 0x1000; i++) |
| 329 | palette_set_ | |
| 329 | palette_set_p | |
| 330 | 330 | |
| 331 | 331 | oldbrt2 = brt2; |
| 332 | 332 | } |
| r3373 | r3374 | |
|---|---|---|
| 414 | 414 | return z80_ram[offset]; |
| 415 | 415 | } |
| 416 | 416 | |
| 417 | static WRITE8_HANDLER( tx1_coin_cnt ) | |
| 417 | static WRITE8_DEVICE_HANDLER( tx1_coin_cnt ) | |
| 418 | 418 | { |
| 419 | 419 | coin_counter_w(0, data & 0x80); |
| 420 | 420 | coin_counter_w(1, data & 0x40); |
| r3373 | r3374 | |
| 426 | 426 | tx1_ppi_latch_b = input_port_read(machine, "AN_STEERING"); |
| 427 | 427 | } |
| 428 | 428 | |
| 429 | static READ8_HANDLER( tx1_ppi_porta_r ) | |
| 429 | static READ8_DEVICE_HANDLER( tx1_ppi_porta_r ) | |
| 430 | 430 | { |
| 431 | 431 | return tx1_ppi_latch_a; |
| 432 | 432 | } |
| 433 | 433 | |
| 434 | static READ8_HANDLER( tx1_ppi_portb_r ) | |
| 434 | static READ8_DEVICE_HANDLER( tx1_ppi_portb_r ) | |
| 435 | 435 | { |
| 436 | return input_port_read(machine, "PPI_PORTD") | tx1_ppi_latch_b; | |
| 436 | return input_port_read(device->machine, "PPI_PORTD") | tx1_ppi_latch_b; | |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | /* TODO */ |
| r3373 | r3374 | |
| 463 | 463 | /* Buggy Boy uses an 8255 PPI instead of YM2149 ports for inputs! */ |
| 464 | 464 | static const ppi8255_interface buggyboy_ppi8255_intf = |
| 465 | 465 | { |
| 466 | | |
| 466 | DEVICE8_PORT("PPI_PORTA"), | |
| 467 | 467 | NULL, |
| 468 | | |
| 468 | DEVICE8_PORT("PPI_PORTC"), | |
| 469 | 469 | NULL, |
| 470 | 470 | NULL, |
| 471 | 471 | NULL |
| r3373 | r3374 | |
| 476 | 476 | { |
| 477 | 477 | tx1_ppi_porta_r, |
| 478 | 478 | tx1_ppi_portb_r, |
| 479 | | |
| 479 | DEVICE8_PORT("PPI_PORTC"), | |
| 480 | 480 | NULL, |
| 481 | 481 | NULL, |
| 482 | 482 | tx1_coin_cnt |
| r3373 | r3374 | |
| 695 | 695 | MDRV_MACHINE_START(tx1) |
| 696 | 696 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 697 | 697 | |
| 698 | MDRV_DEVICE_ADD("ppi8255", PPI8255) | |
| 699 | MDRV_DEVICE_CONFIG(tx1_ppi8255_intf) | |
| 698 | MDRV_PPI8255_ADD("ppi8255", tx1_ppi8255_intf) | |
| 700 | 699 | |
| 701 | 700 | MDRV_PALETTE_LENGTH(256) |
| 702 | 701 | MDRV_PALETTE_INIT(tx1) |
| r3373 | r3374 | |
| 751 | 750 | MDRV_MACHINE_START(buggyboy) |
| 752 | 751 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 753 | 752 | |
| 754 | MDRV_DEVICE_ADD("ppi8255", PPI8255) | |
| 755 | MDRV_DEVICE_CONFIG(buggyboy_ppi8255_intf) | |
| 753 | MDRV_PPI8255_ADD("ppi8255", buggyboy_ppi8255_intf) | |
| 756 | 754 | |
| 757 | 755 | MDRV_DEFAULT_LAYOUT(layout_triphsxs) |
| 758 | 756 |
| r3373 | r3374 | |
|---|---|---|
| 8 | 8 | - Some other missing categories romsets and new / old revision |
| 9 | 9 | |
| 10 | 10 | TODO: |
| 11 | - finish video emulation (colors and flipped tiles?) | |
| 11 | - add flipscreen according to schematics | |
| 12 | - pitboss: dip switches | |
| 13 | - general - add named output notifiers | |
| 12 | 14 | |
| 13 | 15 | Notes: it's important that "user1" is 0xa0000 bytes with empty space filled |
| 14 | 16 | with 0xff, because the built-in roms test checks how many question roms |
| r3373 | r3374 | |
| 33 | 35 | #include "driver.h" |
| 34 | 36 | #include "machine/8255ppi.h" |
| 35 | 37 | #include "sound/ay8910.h" |
| 38 | #include "video/mc6845.h" | |
| 36 | 39 | |
| 37 | static tilemap *bg_tilemap; | |
| 38 | static UINT8 *phrcraze_attr; | |
| 40 | #define MASTER_CLOCK (XTAL_10MHz) | |
| 41 | #define CPU_CLOCK (MASTER_CLOCK / 4) | |
| 42 | #define PIXEL_CLOCK (MASTER_CLOCK / 1) | |
| 43 | #define CRTC_CLOCK (MASTER_CLOCK / 8) | |
| 39 | 44 | |
| 45 | #define NUM_PENS (16) | |
| 46 | #define RAM_PALETTE_SIZE (1024) | |
| 47 | ||
| 48 | static pen_t pens[NUM_PENS]; | |
| 49 | ||
| 50 | static UINT8 *ram_attr; | |
| 51 | static UINT8 *ram_video; | |
| 52 | ||
| 53 | static UINT8 *ram_palette; | |
| 54 | ||
| 55 | static UINT8 lscnblk; | |
| 40 | 56 | static int extra_video_bank_bit; |
| 41 | 57 | |
| 42 | static int question_address | |
| 58 | static int question_address | |
| 43 | 59 | static int decryption_key; |
| 44 | 60 | |
| 61 | static MACHINE_START(merit) | |
| 62 | { | |
| 63 | question_address = 0; | |
| 64 | ram_palette = auto_malloc(RAM_PALETTE_SIZE); | |
| 65 | ||
| 66 | state_save_register_global_pointer(ram_palette, RAM_PALETTE_SIZE); | |
| 67 | state_save_register_global(lscnblk); | |
| 68 | state_save_register_global(extra_video_bank_bit); | |
| 69 | state_save_register_global(question_address); | |
| 70 | state_save_register_global(decryption_key); | |
| 71 | } | |
| 72 | ||
| 73 | ||
| 45 | 74 | static READ8_HANDLER( questions_r ) |
| 46 | 75 | { |
| 47 | 76 | UINT8 *questions = memory_region(machine, "user1"); |
| r3373 | r3374 | |
| 79 | 108 | case 0x18: address = 0x90000; |
| 80 | 109 | break; |
| 81 | 110 | |
| 82 | // not used? only 10 roms are tested in service mode | |
| 83 | // b0 b1 b2 b3 b4 b5 b6 b7 a8 98 | |
| 84 | // case 0xb0: address = 0xa0000; | |
| 85 | // break; | |
| 111 | /* not used? only 10 roms are tested in service mode | |
| 112 | * b0 b1 b2 b3 b4 b5 b6 b7 a8 98 | |
| 113 | * case 0xb0: address = 0xa0000; | |
| 114 | * break; | |
| 115 | */ | |
| 86 | 116 | |
| 87 | 117 | default: logerror("read unknown question rom: %02X\n",question_address >> 16); |
| 88 | 118 | return 0xff; |
| r3373 | r3374 | |
| 113 | 143 | question_address = (question_address & 0x00ffff) | (offset << 16); |
| 114 | 144 | } |
| 115 | 145 | |
| 116 | static | |
| 146 | static | |
| 117 | 147 | { |
| 118 | phrcraze_attr[offset] = data; | |
| 119 | tilemap_mark_tile_dirty(bg_tilemap,offset); | |
| 148 | int co; | |
| 149 | ||
| 150 | co = ((ram_attr[offset] & 0x7F) << 3) | (offset & 0x07); | |
| 151 | return ram_palette[co]; | |
| 120 | 152 | } |
| 121 | 153 | |
| 122 | static WRITE8_HANDLER( p | |
| 154 | static WRITE8_HANDLER( p | |
| 123 | 155 | { |
| 124 | videoram[offset] = data; | |
| 125 | tilemap_mark_tile_dirty(bg_tilemap,offset); | |
| 156 | int co; | |
| 157 | ||
| 158 | video_screen_update_now(machine->primary_screen); | |
| 159 | data &= 0x0f; | |
| 160 | ||
| 161 | co = ((ram_attr[offset] & 0x7F) << 3) | (offset & 0x07); | |
| 162 | ram_palette[co] = data; | |
| 163 | ||
| 126 | 164 | } |
| 127 | 165 | |
| 128 | // I think this looks more like a colortable than a palette | |
| 129 | static WRITE8_HANDLER( palette_w ) | |
| 166 | ||
| 167 | static MC6845_BEGIN_UPDATE( begin_update ) | |
| 130 | 168 | { |
| 131 | 169 | int i; |
| 170 | int dim, bit0, bit1, bit2; | |
| 132 | 171 | |
| 133 | paletteram[offset] = data & 0x0f; | |
| 134 | for (i = 0; i < 0x100; i++) | |
| 172 | for (i=0; i < NUM_PENS; i++) | |
| 135 | 173 | { |
| 136 | // int bit = (i & 0x300)>>8; | |
| 137 | offset = ((i & 0x7f)<<3) | ((i & 0x80) >> 5); | |
| 174 | dim = BIT(i,3) ? 255 : 127; | |
| 175 | bit0 = BIT(i,0); | |
| 176 | bit1 = BIT(i,1); | |
| 177 | bit2 = BIT(i,2); | |
| 178 | pens[i] = MAKE_RGB(dim*bit0, dim*bit1, dim*bit2); | |
| 179 | } | |
| 138 | 180 | |
| 139 | palette_set_color_rgb(machine,i, | |
| 140 | pal4bit(BIT(paletteram[offset],0)*0x1 + BIT(paletteram[offset+1],0)*0x2 + BIT(paletteram[offset+2],0)*0x4 + BIT(paletteram[offset+3],0)*0x8), | |
| 141 | pal4bit(BIT(paletteram[offset],1)*0x1 + BIT(paletteram[offset+1],1)*0x2 + BIT(paletteram[offset+2],1)*0x4 + BIT(paletteram[offset+3],1)*0x8), | |
| 142 | pal4bit(BIT(paletteram[offset],2)*0x1 + BIT(paletteram[offset+1],2)*0x2 + BIT(paletteram[offset+2],2)*0x4 + BIT(paletteram[offset+3],2)*0x8)); | |
| 181 | return pens; | |
| 182 | } | |
| 183 | ||
| 184 | ||
| 185 | static MC6845_UPDATE_ROW( update_row ) | |
| 186 | { | |
| 187 | UINT8 cx; | |
| 188 | ||
| 189 | pen_t *pens = (pen_t *)param; | |
| 190 | UINT8 *gfx[2]; | |
| 191 | UINT16 x = 0; | |
| 192 | int rlen; | |
| 193 | ||
| 194 | gfx[0] = memory_region(device->machine, "gfx1"); | |
| 195 | gfx[1] = memory_region(device->machine, "gfx2"); | |
| 196 | rlen = memory_region_length(device->machine, "gfx2"); | |
| 197 | ||
| 198 | //ma = ma ^ 0x7ff; | |
| 199 | for (cx = 0; cx < x_count; cx++) | |
| 200 | { | |
| 201 | int i; | |
| 202 | int attr = ram_attr[ma]; | |
| 203 | int region = (attr & 0x40) >> 6; | |
| 204 | int addr = ((ram_video[ma] | ((attr & 0x80) << 1) | (extra_video_bank_bit)) << 4) | (ra & 0x0f); | |
| 205 | int colour = (attr & 0x7f) << 3; | |
| 206 | UINT8 *data; | |
| 207 | ||
| 208 | addr &= (rlen-1); | |
| 209 | data = gfx[region]; | |
| 210 | ||
| 211 | for (i = 7; i>=0; i--) | |
| 212 | { | |
| 213 | int col = colour; | |
| 214 | ||
| 215 | col |= (BIT(data[0x0000 | addr],i)<<2); | |
| 216 | if (region==0) | |
| 217 | { | |
| 218 | col |= (BIT(data[rlen | addr],i)<<1); | |
| 219 | col |= (BIT(data[rlen<<1 | addr],i)<<0); | |
| 220 | } | |
| 221 | else | |
| 222 | col |= 0x03; | |
| 223 | ||
| 224 | col = ram_palette[col & 0x3ff]; | |
| 225 | *BITMAP_ADDR32(bitmap, y, x) = pens[col ? col : (lscnblk ? 8 : 0)]; | |
| 226 | ||
| 227 | x++; | |
| 228 | } | |
| 229 | ma++; | |
| 143 | 230 | } |
| 144 | 231 | } |
| 145 | 232 | |
| 146 | static WRITE8_HANDLER( led1_w ) | |
| 233 | ||
| 234 | MC6845_ON_HSYNC_CHANGED(hsync_changed) | |
| 147 | 235 | { |
| 236 | /* update any video up to the current scanline */ | |
| 237 | video_screen_update_now(device->machine->primary_screen); | |
| 238 | } | |
| 239 | ||
| 240 | MC6845_ON_VSYNC_CHANGED(vsync_changed) | |
| 241 | { | |
| 242 | cpunum_set_input_line(device->machine, 0, 0, vsync ? ASSERT_LINE : CLEAR_LINE); | |
| 243 | } | |
| 244 | ||
| 245 | static const mc6845_interface mc6845_intf = | |
| 246 | { | |
| 247 | "main", /* screen we are acting on */ | |
| 248 | CRTC_CLOCK, /* the clock (pin 21) of the chip */ | |
| 249 | 8, /* number of pixels per video memory address */ | |
| 250 | begin_update, /* before pixel update callback */ | |
| 251 | update_row, /* row update callback */ | |
| 252 | 0, /* after pixel update callback */ | |
| 253 | 0, /* callback for display state changes */ | |
| 254 | hsync_changed, /* HSYNC callback */ | |
| 255 | vsync_changed /* VSYNC callback */ | |
| 256 | }; | |
| 257 | ||
| 258 | static WRITE8_DEVICE_HANDLER( led1_w ) | |
| 259 | { | |
| 148 | 260 | /* 5 button lamps player 1 */ |
| 149 | 261 | set_led_status(0,~data & 0x01); |
| 150 | 262 | set_led_status(1,~data & 0x02); |
| r3373 | r3374 | |
| 166 | 278 | coin_counter_w(0,0x80-(data & 0x80)); |
| 167 | 279 | } |
| 168 | 280 | |
| 169 | static WRITE8_HANDLER( misc_w ) | |
| 281 | static WRITE8_DEVICE_HANDLER( misc_w ) | |
| 170 | 282 | { |
| 171 | 283 | flip_screen_set(~data & 0x10); |
| 172 | 284 | extra_video_bank_bit = (data & 2) << 8; |
| 285 | lscnblk = (data >> 3) & 1; | |
| 173 | 286 | |
| 174 | / | |
| 287 | /* other bits unknown */ | |
| 175 | 288 | } |
| 176 | 289 | |
| 177 | 290 | static ADDRESS_MAP_START( pitboss_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 178 | 291 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 179 | AM_RANGE(0x6000, 0x67ff) AM_RAM | |
| 292 | AM_RANGE(0x6000, 0x67ff) AM_RAM | |
| 180 | 293 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN1") |
| 181 | 294 | AM_RANGE(0xa001, 0xa001) AM_READ_PORT("IN0") |
| 182 | AM_RANGE(0xa002, 0xa002) AM_NOP //dips ? | |
| 183 | // AM_RANGE(0xc000, 0xc002) AM_NOP | |
| 184 | AM_RANGE(0xe000, 0xe001) AM_WRITENOP // 6845 crt | |
| 185 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(phrcraze_attr_w) AM_BASE(&phrcraze_attr) | |
| 186 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(phrcraze_bg_w) AM_BASE(&videoram) | |
| 187 | AM_RANGE(0xf800, 0xfbff) AM_WRITE(palette_w) AM_BASE(&paletteram) | |
| 295 | AM_RANGE(0xa002, 0xa002) AM_NOP /* dips ? */ | |
| 296 | /* AM_RANGE(0xc000, 0xc002) AM_NOP */ | |
| 297 | AM_RANGE(0xe000, 0xe000) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) | |
| 298 | AM_RANGE(0xe001, 0xe001) AM_DEVWRITE(MC6845, "crtc", mc6845_register_w) | |
| 299 | AM_RANGE(0xe800, 0xefff) AM_RAM AM_BASE(&ram_attr) | |
| 300 | AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE(&ram_video) | |
| 301 | AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w) | |
| 188 | 302 | ADDRESS_MAP_END |
| 189 | 303 | |
| 190 | 304 | static ADDRESS_MAP_START( bigappg_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 191 | 305 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 192 | AM_RANGE(0xa000, 0xafff) AM_RAM | |
| 306 | AM_RANGE(0xa000, 0xafff) AM_RAM | |
| 193 | 307 | AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) |
| 194 | 308 | AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) |
| 195 | AM_RANGE(0xe000, 0xe001) AM_WRITENOP // 6845 crt | |
| 196 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(phrcraze_attr_w) AM_BASE(&phrcraze_attr) | |
| 197 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(phrcraze_bg_w) AM_BASE(&videoram) | |
| 198 | AM_RANGE(0xf800, 0xfbff) AM_WRITE(palette_w) AM_BASE(&paletteram) | |
| 309 | AM_RANGE(0xe000, 0xe000) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) | |
| 310 | AM_RANGE(0xe001, 0xe001) AM_DEVWRITE(MC6845, "crtc", mc6845_register_w) | |
| 311 | AM_RANGE(0xe800, 0xefff) AM_RAM AM_BASE(&ram_attr) | |
| 312 | AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE(&ram_video) | |
| 313 | AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w) | |
| 199 | 314 | ADDRESS_MAP_END |
| 200 | 315 | |
| 201 | 316 | |
| r3373 | r3374 | |
| 204 | 319 | AM_RANGE(0x4c00, 0x4cff) AM_READWRITE(questions_r, high_offset_w) |
| 205 | 320 | AM_RANGE(0x5400, 0x54ff) AM_WRITE(low_offset_w) |
| 206 | 321 | AM_RANGE(0x5800, 0x58ff) AM_WRITE(med_offset_w) |
| 207 | AM_RANGE(0x6000, 0x67ff) AM_RAM | |
| 322 | AM_RANGE(0x6000, 0x67ff) AM_RAM | |
| 208 | 323 | AM_RANGE(0xa000, 0xa003) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) |
| 209 | 324 | AM_RANGE(0xc000, 0xc003) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) |
| 210 | AM_RANGE(0xe000, 0xe001) AM_WRITENOP // 6845 crt | |
| 211 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(phrcraze_attr_w) AM_BASE(&phrcraze_attr) | |
| 212 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(phrcraze_bg_w) AM_BASE(&videoram) | |
| 213 | AM_RANGE(0xf800, 0xfbff) AM_WRITE(palette_w) AM_BASE(&paletteram) | |
| 325 | AM_RANGE(0xe000, 0xe000) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) | |
| 326 | AM_RANGE(0xe001, 0xe001) AM_DEVWRITE(MC6845, "crtc", mc6845_register_w) | |
| 327 | AM_RANGE(0xe800, 0xefff) AM_RAM AM_BASE(&ram_attr) | |
| 328 | AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE(&ram_video) | |
| 329 | AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w) | |
| 214 | 330 | ADDRESS_MAP_END |
| 215 | 331 | |
| 216 | 332 | static ADDRESS_MAP_START( trvwhiz_io_map, ADDRESS_SPACE_IO, 8 ) |
| r3373 | r3374 | |
| 221 | 337 | |
| 222 | 338 | static ADDRESS_MAP_START( phrcraze_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 223 | 339 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 224 | AM_RANGE(0xa000, 0xbfff) AM_RAM | |
| 340 | AM_RANGE(0xa000, 0xbfff) AM_RAM | |
| 225 | 341 | AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) |
| 226 | 342 | AM_RANGE(0xc00c, 0xc00f) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) |
| 227 | 343 | AM_RANGE(0xce00, 0xceff) AM_READWRITE(questions_r, high_offset_w) |
| 228 | 344 | AM_RANGE(0xd600, 0xd6ff) AM_WRITE(low_offset_w) |
| 229 | 345 | AM_RANGE(0xda00, 0xdaff) AM_WRITE(med_offset_w) |
| 230 | AM_RANGE(0xe000, 0xe001) AM_WRITENOP // 6845 crt | |
| 231 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(phrcraze_attr_w) AM_BASE(&phrcraze_attr) | |
| 232 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(phrcraze_bg_w) AM_BASE(&videoram) | |
| 233 | AM_RANGE(0xf800, 0xfbff) AM_WRITE(palette_w) AM_BASE(&paletteram) | |
| 346 | AM_RANGE(0xe000, 0xe000) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) | |
| 347 | AM_RANGE(0xe001, 0xe001) AM_DEVWRITE(MC6845, "crtc", mc6845_register_w) | |
| 348 | AM_RANGE(0xe800, 0xefff) AM_RAM AM_BASE(&ram_attr) | |
| 349 | AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE(&ram_video) | |
| 350 | AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w) | |
| 234 | 351 | ADDRESS_MAP_END |
| 235 | 352 | |
| 236 | 353 | static ADDRESS_MAP_START( phrcraze_io_map, ADDRESS_SPACE_IO, 8 ) |
| r3373 | r3374 | |
| 241 | 358 | |
| 242 | 359 | static ADDRESS_MAP_START( tictac_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 243 | 360 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 244 | AM_RANGE(0x8000, 0x9fff) AM_RAM | |
| 361 | AM_RANGE(0x8000, 0x9fff) AM_RAM | |
| 245 | 362 | AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) |
| 246 | 363 | AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) |
| 247 | 364 | AM_RANGE(0xce00, 0xceff) AM_READWRITE(questions_r, high_offset_w) |
| 248 | 365 | AM_RANGE(0xd600, 0xd6ff) AM_WRITE(low_offset_w) |
| 249 | 366 | AM_RANGE(0xda00, 0xdaff) AM_WRITE(med_offset_w) |
| 250 | AM_RANGE(0xe000, 0xe001) AM_WRITENOP // 6845 crt | |
| 251 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(phrcraze_attr_w) AM_BASE(&phrcraze_attr) | |
| 252 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(phrcraze_bg_w) AM_BASE(&videoram) | |
| 253 | AM_RANGE(0xf800, 0xfbff) AM_WRITE(palette_w) AM_BASE(&paletteram) | |
| 367 | AM_RANGE(0xe000, 0xe000) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) | |
| 368 | AM_RANGE(0xe001, 0xe001) AM_DEVWRITE(MC6845, "crtc", mc6845_register_w) | |
| 369 | AM_RANGE(0xe800, 0xefff) AM_RAM AM_BASE(&ram_attr) | |
| 370 | AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE(&ram_video) | |
| 371 | AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w) | |
| 254 | 372 | ADDRESS_MAP_END |
| 255 | 373 | |
| 256 | 374 | static ADDRESS_MAP_START( tictac_io_map, ADDRESS_SPACE_IO, 8 ) |
| r3373 | r3374 | |
| 261 | 379 | |
| 262 | 380 | static ADDRESS_MAP_START( trvwhziv_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 263 | 381 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 264 | AM_RANGE(0xa000, 0xbfff) AM_RAM | |
| 382 | AM_RANGE(0xa000, 0xbfff) AM_RAM | |
| 265 | 383 | AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) |
| 266 | 384 | AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) |
| 267 | 385 | AM_RANGE(0xce00, 0xceff) AM_READWRITE(questions_r, high_offset_w) |
| 268 | 386 | AM_RANGE(0xd600, 0xd6ff) AM_WRITE(low_offset_w) |
| 269 | 387 | AM_RANGE(0xda00, 0xdaff) AM_WRITE(med_offset_w) |
| 270 | AM_RANGE(0xe000, 0xe001) AM_WRITENOP // 6845 crt | |
| 271 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(phrcraze_attr_w) AM_BASE(&phrcraze_attr) | |
| 272 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(phrcraze_bg_w) AM_BASE(&videoram) | |
| 273 | AM_RANGE(0xf800, 0xfbff) AM_WRITE(palette_w) AM_BASE(&paletteram) | |
| 388 | AM_RANGE(0xe000, 0xe000) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) | |
| 389 | AM_RANGE(0xe001, 0xe001) AM_DEVWRITE(MC6845, "crtc", mc6845_register_w) | |
| 390 | AM_RANGE(0xe800, 0xefff) AM_RAM AM_BASE(&ram_attr) | |
| 391 | AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE(&ram_video) | |
| 392 | AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w) | |
| 274 | 393 | ADDRESS_MAP_END |
| 275 | 394 | |
| 276 | 395 | |
| 277 | 396 | |
| 278 | // in service mode: | |
| 279 | // keep service test button pressed to clear the coin counter. | |
| 280 | // keep it pressed for 10 seconds to clear all the memory. | |
| 281 | // to enter hidden test mode enable "Enable Test Mode", enable "Reset High Scores" | |
| 397 | /* in service mode: | |
| 398 | * keep service test button pressed to clear the coin counter. | |
| 399 | * keep it pressed for 10 seconds to clear all the memory. | |
| 400 | * to enter hidden test mode enable "Enable Test Mode", enable "Reset High Scores" | |
| 401 | */ | |
| 282 | 402 | static INPUT_PORTS_START( phrcraze ) |
| 283 | 403 | PORT_START("IN0") |
| 284 | 404 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r3373 | r3374 | |
| 345 | 465 | PORT_DIPSETTING( 0xc0, "Upright 1 Player" ) |
| 346 | 466 | PORT_DIPSETTING( 0x00, "Upright 2 Players" ) |
| 347 | 467 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 348 | / | |
| 468 | /* PORT_DIPSETTING( 0x40, "Upright 1 Player" ) */ | |
| 349 | 469 | INPUT_PORTS_END |
| 350 | 470 | |
| 351 | // in service mode: | |
| 352 | // keep service test button pressed to clear the coin counter. | |
| 353 | // keep it pressed for 10 seconds to clear all the memory. | |
| 354 | // to enter hidden test mode enable "Enable Test Mode", enable "Reset High Scores" | |
| 471 | /* in service mode: | |
| 472 | * keep service test button pressed to clear the coin counter. | |
| 473 | * keep it pressed for 10 seconds to clear all the memory. | |
| 474 | * to enter hidden test mode enable "Enable Test Mode", enable "Reset High Scores" | |
| 475 | */ | |
| 355 | 476 | static INPUT_PORTS_START( phrcrazs ) |
| 356 | 477 | PORT_START("IN0") |
| 357 | 478 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r3373 | r3374 | |
| 416 | 537 | PORT_DIPSETTING( 0xc0, "Upright 1 Player" ) |
| 417 | 538 | PORT_DIPSETTING( 0x00, "Upright 2 Players" ) |
| 418 | 539 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 419 | / | |
| 540 | /* | |
| 420 | 541 | INPUT_PORTS_END |
| 421 | 542 | |
| 422 | // keep service test button pressed to clear the coin counter. | |
| 423 | // To enter hidden test-mode in service mode: | |
| 424 | // enable "Reset High Scores" then press "Service Mode" | |
| 543 | /* keep service test button pressed to clear the coin counter. | |
| 544 | * To enter hidden test-mode in service mode: | |
| 545 | * enable "Reset High Scores" then press "Service Mode" | |
| 546 | */ | |
| 425 | 547 | static INPUT_PORTS_START( tictac ) |
| 426 | 548 | PORT_START("IN0") |
| 427 | 549 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r3373 | r3374 | |
| 486 | 608 | PORT_DIPSETTING( 0xc0, "Upright 1 Player" ) |
| 487 | 609 | PORT_DIPSETTING( 0x00, "Upright 2 Players" ) |
| 488 | 610 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 489 | / | |
| 611 | /* PORT_DIPSETTING( 0x40, "Upright 1 Player" ) */ | |
| 490 | 612 | INPUT_PORTS_END |
| 491 | 613 | |
| 492 | 614 | static INPUT_PORTS_START( trivia ) |
| r3373 | r3374 | |
| 557 | 679 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 558 | 680 | INPUT_PORTS_END |
| 559 | 681 | |
| 560 | // in service mode: | |
| 561 | // keep service test button pressed to clear the coin counter. | |
| 562 | // keep it pressed for 10 seconds to clear all the memory. | |
| 563 | // to enter hidden test mode enable "Enable Test Mode", enable "Reset High Scores" | |
| 682 | /* in service mode: | |
| 683 | * keep service test button pressed to clear the coin counter. | |
| 684 | * keep it pressed for 10 seconds to clear all the memory. | |
| 685 | * to enter hidden test mode enable "Enable Test Mode", enable "Reset High Scores" | |
| 686 | */ | |
| 564 | 687 | static INPUT_PORTS_START( trvwhziv ) |
| 565 | 688 | PORT_INCLUDE( trivia ) |
| 566 | 689 | |
| r3373 | r3374 | |
| 596 | 719 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 597 | 720 | |
| 598 | 721 | PORT_START("IN1") |
| 599 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) //z | |
| 600 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) //x | |
| 601 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON7 ) //c | |
| 602 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON8 ) //v | |
| 603 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) //b | |
| 722 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) /* z */ | |
| 723 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) /* x */ | |
| 724 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON7 ) /* c */ | |
| 725 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON8 ) /* v */ | |
| 726 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) /* b */ | |
| 604 | 727 | |
| 605 | 728 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) |
| 606 | 729 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| r3373 | r3374 | |
| 716 | 839 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 717 | 840 | INPUT_PORTS_END |
| 718 | 841 | |
| 719 | static | |
| 842 | static VIDEO_UPDATE | |
| 720 | 843 | { |
| 721 | int attr = phrcraze_attr[tile_index]; | |
| 722 | int region = (attr & 0x40) >> 6; | |
| 723 | int code = videoram[tile_index] | ((attr & 0x80) << 1); | |
| 844 | const device_config *mc6845 = device_list_find_by_tag(screen->machine->config->devicelist, MC6845, "crtc"); | |
| 845 | mc6845_update(mc6845, bitmap, cliprect); | |
| 724 | 846 | |
| 725 | if(region == 0) | |
| 726 | code |= extra_video_bank_bit; | |
| 727 | ||
| 728 | SET_TILE_INFO(region, code, 0, 0); | |
| 729 | } | |
| 730 | ||
| 731 | ||
| 732 | static VIDEO_START( merit ) | |
| 733 | { | |
| 734 | bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows,8,8,64,32); | |
| 735 | } | |
| 736 | ||
| 737 | static VIDEO_UPDATE( merit ) | |
| 738 | { | |
| 739 | tilemap_draw(bitmap,cliprect,bg_tilemap,0,0); | |
| 740 | 847 | return 0; |
| 741 | 848 | } |
| 742 | 849 | |
| 743 | static const gfx_layout tiles8x8x3_layout = | |
| 744 | { | |
| 745 | 8,8, | |
| 746 | RGN_FRAC(1,3), | |
| 747 | 3, | |
| 748 | { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) }, | |
| 749 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 750 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 751 | 16*8 | |
| 752 | }; | |
| 753 | ||
| 754 | static const gfx_layout tiles8x8x1_layout = | |
| 755 | { | |
| 756 | 8,8, | |
| 757 | RGN_FRAC(1,1), | |
| 758 | 1, | |
| 759 | { 0 }, | |
| 760 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 761 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 762 | 16*8 | |
| 763 | }; | |
| 764 | ||
| 765 | static GFXDECODE_START( merit ) | |
| 766 | GFXDECODE_ENTRY( "gfx1", 0, tiles8x8x3_layout, 0, 32 ) | |
| 767 | GFXDECODE_ENTRY( "gfx2", 0, tiles8x8x1_layout, 0, 128 ) | |
| 768 | GFXDECODE_ENTRY( "gfx1", 8, tiles8x8x3_layout, 0, 32 ) // flipped tiles | |
| 769 | GFXDECODE_ENTRY( "gfx2", 8, tiles8x8x1_layout, 0, 128 ) // flipped tiles | |
| 770 | GFXDECODE_END | |
| 771 | ||
| 772 | 850 | static const ppi8255_interface ppi8255_intf[2] = |
| 773 | 851 | { |
| 774 | 852 | { |
| 775 | input_port_0_r, /* Port A read */ | |
| 776 | input_port_1_r, /* Port B read */ | |
| 777 | input_port_2_r, /* Port C read */ | |
| 853 | DEVICE8_PORT("IN0"), /* Port A read */ | |
| 854 | DEVICE8_PORT("IN1"), /* Port B read */ | |
| 855 | DEVICE8_PORT("IN2"), /* Port C read */ | |
| 778 | 856 | NULL, /* Port A write */ |
| 779 | 857 | NULL, /* Port B write */ |
| 780 | 858 | NULL /* Port C write */ |
| 781 | 859 | }, |
| 782 | 860 | { |
| 783 | | |
| 861 | DEVICE8_PORT("IN3"), | |
| 784 | 862 | NULL, /* Port B read */ |
| 785 | 863 | NULL, /* Port C read */ |
| 786 | 864 | NULL, /* Port A write */ |
| r3373 | r3374 | |
| 799 | 877 | |
| 800 | 878 | |
| 801 | 879 | static MACHINE_DRIVER_START( pitboss ) |
| 802 | MDRV_CPU_ADD("main",Z80, | |
| 880 | MDRV_CPU_ADD("main",Z80, | |
| 803 | 881 | MDRV_CPU_PROGRAM_MAP(pitboss_map,0) |
| 804 | 882 | MDRV_CPU_IO_MAP(trvwhiz_io_map,0) |
| 805 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) | |
| 806 | 883 | |
| 807 | MDRV_NVRAM_HANDLER(generic_0fill) | |
| 884 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 885 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 808 | 886 | |
| 809 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 810 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 887 | MDRV_MACHINE_START(merit) | |
| 888 | /* video hardware */ | |
| 811 | 889 | |
| 812 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 813 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 814 | ||
| 815 | /* video hardware */ | |
| 816 | 890 | MDRV_SCREEN_ADD("main", RASTER) |
| 817 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 818 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 819 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 820 | MDRV_SCREEN_SIZE(64*8, 32*8) | |
| 821 | MDRV_SCREEN_VISIBLE_AREA(0, 64*8-1, 1*8, 32*8-1) | |
| 891 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 892 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 512, 0, 512, 256, 0, 256) /* temporary, CRTC will configure screen */ | |
| 822 | 893 | |
| 823 | MDRV_GFXDECODE(merit) | |
| 824 | MDRV_PALETTE_LENGTH(0x100) | |
| 894 | MDRV_DEVICE_ADD("crtc", MC6845) | |
| 895 | MDRV_DEVICE_CONFIG(mc6845_intf) | |
| 825 | 896 | |
| 826 | MDRV_VIDEO_START(merit) | |
| 827 | 897 | MDRV_VIDEO_UPDATE(merit) |
| 828 | 898 | |
| 829 | 899 | /* sound hardware */ |
| 830 | 900 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 831 | 901 | |
| 832 | MDRV_SOUND_ADD("ay", AY8910, | |
| 902 | MDRV_SOUND_ADD("ay", AY8910, CRTC_CLOCK) | |
| 833 | 903 | MDRV_SOUND_CONFIG(merit_ay8912_interface) |
| 834 | 904 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) |
| 835 | 905 | MACHINE_DRIVER_END |
| r3373 | r3374 | |
| 931 | 1001 | ROM_REGION( 0x2000, "gfx2", 0 ) |
| 932 | 1002 | ROM_LOAD( "trivia.u40", 0x0000, 0x2000, CRC(cea7319f) SHA1(663cd18a4699dfd5ad1d3357094eff247e9b4a47) ) |
| 933 | 1003 | |
| 934 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) / | |
| 1004 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) /* questions */ | |
| 935 | 1005 | ROM_LOAD( "trivia.ent", 0x08000, 0x8000, CRC(ff45d92b) SHA1(10356bc6a04b2c53ecaf76cb0cba3ec70b4ba612) ) |
| 936 | 1006 | ROM_LOAD( "trivia1.ent", 0x18000, 0x8000, CRC(902e26f7) SHA1(f13b816bfc507fb429fb3f44531de346a82c780d) ) |
| 937 | 1007 | ROM_LOAD( "trivia.gen", 0x28000, 0x8000, CRC(1d8d353f) SHA1(6bd0cc5c67da81a48737f32bc49cbf235648c4c6) ) |
| r3373 | r3374 | |
| 953 | 1023 | ROM_REGION( 0x2000, "gfx2", 0 ) |
| 954 | 1024 | ROM_LOAD( "trivia.u40", 0x0000, 0x2000, CRC(cea7319f) SHA1(663cd18a4699dfd5ad1d3357094eff247e9b4a47) ) |
| 955 | 1025 | |
| 956 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) / | |
| 1026 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) /* questions */ | |
| 957 | 1027 | ROM_LOAD( "trivia.spo", 0x08000, 0x8000, CRC(64181d34) SHA1(f84e28fc589b86ca6a596815871ed26602bcc095) ) |
| 958 | 1028 | ROM_LOAD( "trivia1.spo", 0x18000, 0x8000, CRC(ae111429) SHA1(ff551d7ac7ad367338e908805aeb78c59a747919) ) |
| 959 | 1029 | ROM_LOAD( "trivia2.spo", 0x28000, 0x8000, CRC(ee9263b3) SHA1(1644ab01f17e3af1e193e509d64dcbb243d3eb80) ) |
| r3373 | r3374 | |
| 972 | 1042 | ROM_REGION( 0x2000, "gfx2", 0 ) |
| 973 | 1043 | ROM_LOAD( "u40.bin", 0x0000, 0x2000, CRC(1f0ff6e0) SHA1(5a31afde34aeb6f851389d093bb426e5cfdedbf2) ) |
| 974 | 1044 | |
| 975 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) / | |
| 1045 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) /* questions */ | |
| 976 | 1046 | ROM_LOAD( "ent_001_01.bin", 0x08000, 0x8000, CRC(c68ce954) SHA1(bf70fe64f095d5cfcf5347d83651b78c6c8bf05f) ) |
| 977 | 1047 | ROM_LOAD( "ent_001_02.bin", 0x18000, 0x8000, CRC(aac4ff63) SHA1(d68c4408b4dad976e317a33f2a4eaee39d90dbed) ) |
| 978 | 1048 | ROM_LOAD( "gen_001_01.bin", 0x28000, 0x8000, CRC(5deb1900) SHA1(b7e9407c37481ef8953e8283d45949d951302e92) ) |
| r3373 | r3374 | |
| 994 | 1064 | ROM_REGION( 0x2000, "gfx2", 0 ) |
| 995 | 1065 | ROM_LOAD( "u40.bin", 0x0000, 0x2000, CRC(1f0ff6e0) SHA1(5a31afde34aeb6f851389d093bb426e5cfdedbf2) ) |
| 996 | 1066 | |
| 997 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) / | |
| 1067 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) /* questions */ | |
| 998 | 1068 | ROM_LOAD( "spo_001_01.bin", 0x08000, 0x8000, CRC(7b56315d) SHA1(4c8c63b80176bfac9594958a7043627012baada3) ) |
| 999 | 1069 | ROM_LOAD( "spo_001_02.bin", 0x18000, 0x8000, CRC(148b63ee) SHA1(9f3b222d979f23b313f379cbc06cc00d88d08c56) ) |
| 1000 | 1070 | ROM_LOAD( "spo_001_03.bin", 0x28000, 0x8000, CRC(a6af8e41) SHA1(64f672bfa5fb2c0575103614986e53e238c5984f) ) |
| r3373 | r3374 | |
| 1013 | 1083 | ROM_REGION( 0x2000, "gfx2", 0 ) |
| 1014 | 1084 | ROM_LOAD( "u40a", 0x0000, 0x2000, CRC(fbfae092) SHA1(b8569819952a5c805f11b6854d64b3ae9c857f97) ) |
| 1015 | 1085 | |
| 1016 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) / | |
| 1086 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) /* questions */ | |
| 1017 | 1087 | ROM_LOAD( "ent_101.01a", 0x08000, 0x8000, CRC(3825ac47) SHA1(d0da047c4d30a26f496b3663cfda77c229279be8) ) |
| 1018 | 1088 | ROM_LOAD( "ent_101.02a", 0x18000, 0x8000, CRC(a0153407) SHA1(e669957a5d4775bfa2c16960a2a909a3505c078b) ) |
| 1019 | 1089 | ROM_LOAD( "ent_101.03a", 0x28000, 0x8000, CRC(755b16ab) SHA1(277ea4110479ecdb2c772299ea04f4918cf7f561) ) |
| r3373 | r3374 | |
| 1039 | 1109 | ROM_REGION( 0x2000, "gfx2", 0 ) |
| 1040 | 1110 | ROM_LOAD( "u40", 0x0000, 0x2000, CRC(e829473f) SHA1(ba754d9377d955b409970494e1a14dbe1d359ee5) ) |
| 1041 | 1111 | |
| 1042 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) / | |
| 1112 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) /* questions */ | |
| 1043 | 1113 | ROM_LOAD( "7", 0x08000, 0x8000, CRC(974dca96) SHA1(eb4a745c84307a1bbb220659877f97c28cd515ac) ) |
| 1044 | 1114 | ROM_LOAD( "8", 0x18000, 0x8000, CRC(e15ef8d0) SHA1(51c946311ffe507aa9031044bc34e5ae8d3473ab) ) |
| 1045 | 1115 | ROM_LOAD( "9", 0x28000, 0x8000, CRC(503115a1) SHA1(5e6630191465b3d2a590fab08b4f47f7408ecc44) ) |
| r3373 | r3374 | |
| 1064 | 1134 | ROM_REGION( 0x2000, "gfx2", 0 ) |
| 1065 | 1135 | ROM_LOAD( "u40", 0x0000, 0x2000, CRC(fbfae092) SHA1(b8569819952a5c805f11b6854d64b3ae9c857f97) ) |
| 1066 | 1136 | |
| 1067 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) / | |
| 1137 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) /* questions */ | |
| 1068 | 1138 | ROM_LOAD( "10", 0x08000, 0x8000, CRC(15d16703) SHA1(9184f63669e9ec93e88276777e1b7f209543c3e3) ) |
| 1069 | 1139 | ROM_LOAD( "8", 0x18000, 0x8000, CRC(647f3394) SHA1(636647ae620fd2f985b82e3516451e3bffd44040) ) |
| 1070 | 1140 | ROM_LOAD( "7", 0x28000, 0x8000, CRC(974dca96) SHA1(eb4a745c84307a1bbb220659877f97c28cd515ac) ) |
| r3373 | r3374 | |
| 1089 | 1159 | ROM_REGION( 0x2000, "gfx2", 0 ) |
| 1090 | 1160 | ROM_LOAD( "u40.bin", 0x0000, 0x2000, CRC(fbfae092) SHA1(b8569819952a5c805f11b6854d64b3ae9c857f97) ) |
| 1091 | 1161 | |
| 1092 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) / | |
| 1162 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) /* questions */ | |
| 1093 | 1163 | ROM_LOAD( "ent_4_1.bin", 0x08000, 0x8000, CRC(1b317149) SHA1(94e882e9cc041ac8f292136c1ce2d21340ac5e7f) ) |
| 1094 | 1164 | ROM_LOAD( "ent_4_2.bin", 0x18000, 0x8000, CRC(43d51697) SHA1(7af3f16f9519184ae63d8818bbc52a2ba897f275) ) |
| 1095 | 1165 | ROM_LOAD( "rnp_4_1.bin", 0x28000, 0x8000, CRC(e54fc4bc) SHA1(4607974ed2bf83c475396fc1cbb1e09ad084ace8) ) |
| r3373 | r3374 | |
| 1137 | 1207 | ROM_REGION( 0x2000, "gfx2", 0 ) |
| 1138 | 1208 | ROM_LOAD( "merit.u40", 0x00000, 0x2000, CRC(ab0088eb) SHA1(23a05a4dc11a8497f4fc7e4a76085af15ff89cea) ) |
| 1139 | 1209 | |
| 1140 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) / | |
| 1210 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) /* questions */ | |
| 1141 | 1211 | ROM_LOAD( "merit.pb1", 0x08000, 0x8000, CRC(d1584173) SHA1(7a2190203f478f446cc70c473c345e7cc332e049) ) |
| 1142 | 1212 | ROM_LOAD( "merit.pb2", 0x18000, 0x8000, CRC(d00ab1fd) SHA1(c94269c8a478e88f71aeca94c6f20fc05a9c62bd) ) |
| 1143 | 1213 | ROM_LOAD( "merit.pb3", 0x28000, 0x8000, CRC(71b398a9) SHA1(5ea07c409afd52c7d08592b30ff0ff3b72c3f8c3) ) |
| r3373 | r3374 | |
| 1154 | 1224 | ROM_REGION( 0x10000, "main", 0 ) |
| 1155 | 1225 | ROM_LOAD( "phrz.11", 0x00000, 0x8000, CRC(ccd33a0c) SHA1(869b66af4369f3b4bc19336ca2b8104c7f652de7) ) |
| 1156 | 1226 | |
| 1157 | // probably over-dumped | |
| 1227 | // probably over-dumped, 1st and 2nd half identical | |
| 1158 | 1228 | ROM_REGION( 0x18000, "gfx1", 0 ) |
| 1159 | ROM_LOAD( "phrz.10", 0x00000, 0x8000, CRC(bfa78b67) SHA1(1b51c0e00240f798fe717624e706cb15700bc2f9) ) | |
| 1160 | ROM_LOAD( "phrz.8", 0x08000, 0x8000, CRC(9ce22cb3) SHA1(b653afb8f13decd993e434aaad69a6e09ab65f83) ) | |
| 1161 | ROM_LOAD( "phrz.7", 0x10000, 0x8000, CRC(237e221a) SHA1(7aa69375c2b9a9e73e0e4ed207bf595368b2deb2) ) | |
| 1229 | ROM_LOAD( "phrz.7", 0x00000, 0x8000, CRC(237e221a) SHA1(7aa69375c2b9a9e73e0e4ed207bf595368b2deb2) ) | |
| 1230 | ROM_LOAD( "phrz.10", 0x08000, 0x8000, CRC(bfa78b67) SHA1(1b51c0e00240f798fe717624e706cb15700bc2f9) ) | |
| 1231 | ROM_LOAD( "phrz.8", 0x10000, 0x8000, CRC(9ce22cb3) SHA1(b653afb8f13decd993e434aaad69a6e09ab65f83) ) | |
| 1162 | 1232 | |
| 1163 | 1233 | // probably over-dumped |
| 1164 | ROM_REGION( 0x8000, "gfx2", 0 ) | |
| 1234 | ROM_REGION( 0x08000, "gfx2", 0 ) | |
| 1165 | 1235 | ROM_LOAD( "phrz.9", 0x00000, 0x8000, CRC(17dcddd4) SHA1(51682bdbfb67cd0ccf20b97e8fa12d72f0fe82ed) ) |
| 1166 | 1236 | |
| 1167 | 1237 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) // questions |
| r3373 | r3374 | |
| 1178 | 1248 | ROM_LOAD( "u5.bin", 0x00000, 0x8000, CRC(6122b5bb) SHA1(9952b14334287a992eefefbdc887b9a9215304ef) ) |
| 1179 | 1249 | |
| 1180 | 1250 | ROM_REGION( 0xc000, "gfx1", 0 ) |
| 1181 | ROM_LOAD( "u39.bin", 0x00000, 0x4000, CRC(adbd2cdc) SHA1(a1e9481bd6ee0f8915cea43eaad3ebdd54438eed) ) | |
| 1182 | ROM_LOAD( "u38.bin", 0x04000, 0x4000, CRC(3578f00d) SHA1(c6780a6ee1b5eb00258a89bceabbbe380d79d299) ) | |
| 1183 | ROM_LOAD( "u37.bin", 0x08000, 0x4000, CRC(962f18a3) SHA1(ec1c3e470c59905c0f56fce2703f6ff586849512) ) | |
| 1251 | ROM_LOAD( "u39.bin", 0x00000, 0x4000, BAD_DUMP CRC(adbd2cdc) SHA1(a1e9481bd6ee0f8915cea43eaad3ebdd54438eed) ) | |
| 1252 | ROM_LOAD( "u38.bin", 0x04000, 0x4000, BAD_DUMP CRC(3578f00d) SHA1(c6780a6ee1b5eb00258a89bceabbbe380d79d299) ) | |
| 1253 | ROM_LOAD( "u37.bin", 0x08000, 0x4000, BAD_DUMP CRC(962f18a3) SHA1(ec1c3e470c59905c0f56fce2703f6ff586849512) ) | |
| 1184 | 1254 | |
| 1185 | 1255 | ROM_REGION( 0x4000, "gfx2", 0 ) |
| 1186 | ROM_LOAD( "u40.bin", 0x00000, 0x4000, CRC(493172c8) SHA1(a76ff5d0d3dd56b0ee4352f03c9ce92f107d34ec) ) | |
| 1256 | ROM_LOAD( "u40.bin", 0x00000, 0x4000, BAD_DUMP CRC(493172c8) SHA1(a76ff5d0d3dd56b0ee4352f03c9ce92f107d34ec) ) | |
| 1187 | 1257 | |
| 1188 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) / | |
| 1258 | ROM_REGION( 0xa0000, "user1", ROMREGION_ERASEFF ) /* questions */ | |
| 1189 | 1259 | ROM_LOAD( "std1.bin", 0x00000, 0x8000, CRC(0a016c5e) SHA1(1a24ecd7fe59b08c75a1b4575c7fe467cc7f0cf8) ) |
| 1190 | 1260 | ROM_LOAD( "std2.bin", 0x10000, 0x8000, CRC(e67dc49e) SHA1(5265af228531dc16db7f7ee78da6e51ef9a1d772) ) |
| 1191 | 1261 | ROM_LOAD( "std3.bin", 0x20000, 0x8000, CRC(5c79a653) SHA1(85a904465b347564e937074e2b18159604c83e51) ) |
| r3373 | r3374 | |
| 1193 | 1263 | ROM_LOAD( "std5.bin", 0x40000, 0x8000, CRC(dc9d8682) SHA1(46973da4298d0ed149c651498527c91b8ba57e0a) ) |
| 1194 | 1264 | ROM_LOAD( "std6.bin", 0x50000, 0x8000, CRC(48e24f17) SHA1(f50c85505f6ab2360f0885494001f174224f8575) ) |
| 1195 | 1265 | /* empty space as per instructions for other "sex" category roms */ |
| 1196 | / | |
| 1266 | /* "Sex" questions revision A */ | |
| 1197 | 1267 | ROM_LOAD( "sex1_2a.bin", 0x80000, 0x8000, CRC(7ef3bca7) SHA1(f25cd01f996882a500e1a800d924759cd1de255d) ) |
| 1198 | 1268 | ROM_LOAD( "sex1_1a.bin", 0x90000, 0x8000, CRC(ed7604b8) SHA1(b1e841b50b8ef6ae95fafac1c34b6d0337a05d18) ) |
| 1199 | 1269 | ROM_END |
| r3373 | r3374 | |
| 1212 | 1282 | ROM_LOAD( "dodge.u38", 0x08000, 0x8000, CRC(654d5b00) SHA1(9e16330b2dc8821fc20a39eb42176fda23085bfc) ) |
| 1213 | 1283 | ROM_LOAD( "dodge.u37", 0x10000, 0x8000, CRC(bc9e63d4) SHA1(2320f5a0545f18e1e42a3a45fedce912c36fbe13) ) |
| 1214 | 1284 | |
| 1215 | ROM_REGION( 0x | |
| 1285 | ROM_REGION( 0x8000, "gfx2", ROMREGION_ERASEFF ) | |
| 1216 | 1286 | /* socket at position u40 is unpopulated */ |
| 1217 | 1287 | ROM_END |
| 1218 | 1288 | |
| r3373 | r3374 | |
| 1243 | 1313 | decryption_key = 7; |
| 1244 | 1314 | } |
| 1245 | 1315 | |
| 1246 | GAME( 1983, pitboss, 0, pitboss, pitboss, 0, ROT0, "Merit", "Pit Boss", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) | |
| 1247 | GAME( 1983, casino5, 0, pitboss, pitboss, 0, ROT0, "Merit", "Casino 5", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) | |
| 1248 | GAME( 1985, trvwzh, 0, trvwhiz, trivia, key_0, ROT0, "Merit", "Trivia ? Whiz (Horizontal - Question set 1)", GAME_WRONG_COLORS ) | |
| 1249 | GAME( 1985, trvwzha, trvwzh, trvwhiz, trivia, key_0, ROT0, "Merit", "Trivia ? Whiz (Horizontal - Question set 2)", GAME_WRONG_COLORS ) | |
| 1250 | GAME( 1985, trvwzv, 0, trvwhiz, trivia, key_0, ROT90, "Merit", "Trivia ? Whiz (Vertical - Question set 1)", GAME_WRONG_COLORS ) | |
| 1251 | GAME( 1985, trvwzva, trvwzv, trvwhiz, trivia, key_0, ROT90, "Merit", "Trivia ? Whiz (Vertical - Question set 2)", GAME_WRONG_COLORS ) | |
| 1252 | GAME( 1985, trvwz2, 0, trvwhiz, trivia, key_2, ROT90, "Merit", "Trivia ? Whiz (Edition 2)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) | |
| 1253 | GAME( 1985, trvwz3h, 0, trvwhiz, trivia, key_0, ROT0, "Merit", "Trivia ? Whiz (Edition 3 - Horizontal)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) | |
| 1254 | GAME( 1985, trvwz3v, 0, trvwhiz, trivia, key_0, ROT90, "Merit", "Trivia ? Whiz (Edition 3 - Vertical)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) | |
| 1255 | GAME( 1985, trvwz4, 0, trvwhziv, trvwhziv, key_5, ROT90, "Merit", "Trivia ? Whiz (Edition 4)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) | |
| 1256 | GAME( 1985, tictac, 0, tictac, tictac, key_4, ROT0, "Merit", "Tic Tac Trivia", GAME_WRONG_COLORS ) | |
| 1257 | GAME( 1986, phrcraze, 0, phrcraze, phrcraze, key_7, ROT0, "Merit", "Phraze Craze", GAME_WRONG_COLORS ) | |
| 1258 | GAME( 1986, phrcrazs, 0, phrcraze, phrcrazs, key_7, ROT90, "Merit", "Phraze Craze (Sex Kit)", GAME_WRONG_COLORS ) | |
| 1259 | GAME( 1986, bigappg, 0, bigappg, bigappg, 0, ROT0, "Merit", "Big Apple Games ?", GAME_WRONG_COLORS | GAME_NOT_WORKING ) | |
| 1260 | GAME( 1986, dodge, 0, bigappg, bigappg, 0, ROT0, "Merit", "Dodge City", GAME_WRONG_COLORS | GAME_NOT_WORKING ) | |
| 1316 | GAME( 1983, pitboss, 0, pitboss, pitboss, 0, ROT0, "Merit", "Pit Boss", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS ) | |
| 1317 | GAME( 1983, casino5, 0, pitboss, pitboss, 0, ROT0, "Merit", "Casino 5", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) | |
| 1318 | GAME( 1985, trvwzh, 0, trvwhiz, trivia, key_0, ROT0, "Merit", "Trivia ? Whiz (Horizontal - Question set 1)", GAME_SUPPORTS_SAVE ) | |
| 1319 | GAME( 1985, trvwzha, trvwzh, trvwhiz, trivia, key_0, ROT0, "Merit", "Trivia ? Whiz (Horizontal - Question set 2)", GAME_SUPPORTS_SAVE ) | |
| 1320 | GAME( 1985, trvwzv, 0, trvwhiz, trivia, key_0, ROT90, "Merit", "Trivia ? Whiz (Vertical - Question set 1)", GAME_SUPPORTS_SAVE ) | |
| 1321 | GAME( 1985, trvwzva, trvwzv, trvwhiz, trivia, key_0, ROT90, "Merit", "Trivia ? Whiz (Vertical - Question set 2)", GAME_SUPPORTS_SAVE ) | |
| 1322 | GAME( 1985, trvwz2, 0, trvwhiz, trivia, key_2, ROT90, "Merit", "Trivia ? Whiz (Edition 2)", GAME_SUPPORTS_SAVE ) | |
| 1323 | GAME( 1985, trvwz3h, 0, trvwhiz, trivia, key_0, ROT0, "Merit", "Trivia ? Whiz (Edition 3 - Horizontal)", GAME_SUPPORTS_SAVE ) | |
| 1324 | GAME( 1985, trvwz3v, 0, trvwhiz, trivia, key_0, ROT90, "Merit", "Trivia ? Whiz (Edition 3 - Vertical)", GAME_SUPPORTS_SAVE ) | |
| 1325 | GAME( 1985, trvwz4, 0, trvwhziv, trvwhziv, key_5, ROT90, "Merit", "Trivia ? Whiz (Edition 4)", GAME_SUPPORTS_SAVE ) | |
| 1326 | GAME( 1985, tictac, 0, tictac, tictac, key_4, ROT0, "Merit", "Tic Tac Trivia", GAME_SUPPORTS_SAVE ) | |
| 1327 | GAME( 1986, phrcraze, 0, phrcraze, phrcraze, key_7, ROT0, "Merit", "Phraze Craze", GAME_SUPPORTS_SAVE ) | |
| 1328 | GAME( 1986, phrcrazs, 0, phrcraze, phrcrazs, key_7, ROT90, "Merit", "Phraze Craze (Sex Kit)", GAME_SUPPORTS_SAVE ) | |
| 1329 | GAME( 1986, bigappg, 0, bigappg, bigappg, 0, ROT0, "Merit", "Big Apple Games ?", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) | |
| 1330 | GAME( 1986, dodge, 0, bigappg, bigappg, 0, ROT0, "Merit", "Dodge City", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| r3373 | r3374 | |
|---|---|---|
| 669 | 669 | // Dips are read through the 8255 |
| 670 | 670 | static const ppi8255_interface ppi8255_intf = |
| 671 | 671 | { |
| 672 | input_port_0_r, // Port A read | |
| 673 | input_port_1_r, // Port B read | |
| 674 | input_port_2_r, // Port C read | |
| 672 | DEVICE8_PORT("DSW0"), // Port A read | |
| 673 | DEVICE8_PORT("DSW1"), // Port B read | |
| 674 | DEVICE8_PORT("DSW2"), // Port C read | |
| 675 | 675 | 0, // Port A write |
| 676 | 676 | 0, // Port B write |
| 677 | 677 | 0, // Port C write |
| r3373 | r3374 | |
| 691 | 691 | MDRV_CPU_IO_MAP(igs_180_portmap,0) |
| 692 | 692 | MDRV_CPU_VBLANK_INT_HACK(igs_180_interrupt,2) |
| 693 | 693 | |
| 694 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 695 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 694 | MDRV_PPI8255_ADD( "ppi8255", ppi8255_intf ) | |
| 696 | 695 | |
| 697 | 696 | MDRV_MACHINE_RESET(igs_180) |
| 698 | 697 |
| r3373 | r3374 | |
|---|---|---|
| 62 | 62 | * |
| 63 | 63 | *************************************/ |
| 64 | 64 | |
| 65 | static WRITE8_HANDLER( astinvad_sound1_w ); | |
| 66 | static WRITE8_HANDLER( astinvad_sound2_w ); | |
| 65 | static WRITE8_DEVICE_HANDLER( astinvad_sound1_w ); | |
| 66 | static WRITE8_DEVICE_HANDLER( astinvad_sound2_w ); | |
| 67 | 67 | |
| 68 | 68 | static const ppi8255_interface ppi8255_intf[2] = |
| 69 | 69 | { |
| 70 | 70 | { |
| 71 | input_port_0_r, | |
| 72 | input_port_1_r, | |
| 73 | input_port_2_r, | |
| 71 | DEVICE8_PORT("IN0"), | |
| 72 | DEVICE8_PORT("IN1"), | |
| 73 | DEVICE8_PORT("IN2"), | |
| 74 | 74 | NULL, |
| 75 | 75 | NULL, |
| 76 | 76 | NULL |
| 77 | 77 | }, |
| 78 | 78 | { |
| 79 | 79 | NULL, |
| 80 | | |
| 80 | DEVICE8_PORT("CABINET"), | |
| 81 | 81 | NULL, |
| 82 | 82 | astinvad_sound1_w, |
| 83 | 83 | astinvad_sound2_w, |
| r3373 | r3374 | |
| 230 | 230 | |
| 231 | 231 | /* the address lines are used for /CS; yes, they can overlap! */ |
| 232 | 232 | if (!(offset & 4)) |
| 233 | result &= ppi8255_r(dev | |
| 233 | result &= ppi8255_r(devtag_ge | |
| 234 | 234 | if (!(offset & 8)) |
| 235 | result &= ppi8255_r(dev | |
| 235 | result &= ppi8255_r(devtag_ge | |
| 236 | 236 | return result; |
| 237 | 237 | } |
| 238 | 238 | |
| r3373 | r3374 | |
| 241 | 241 | { |
| 242 | 242 | /* the address lines are used for /CS; yes, they can overlap! */ |
| 243 | 243 | if (!(offset & 4)) |
| 244 | ppi8255_w(dev | |
| 244 | ppi8255_w(devtag_ge | |
| 245 | 245 | if (!(offset & 8)) |
| 246 | ppi8255_w(dev | |
| 246 | ppi8255_w(devtag_ge | |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | |
| r3373 | r3374 | |
| 254 | 254 | * |
| 255 | 255 | *************************************/ |
| 256 | 256 | |
| 257 | static WRITE8_HANDLER( astinvad_sound1_w ) | |
| 257 | static WRITE8_DEVICE_HANDLER( astinvad_sound1_w ) | |
| 258 | 258 | { |
| 259 | 259 | int bits_gone_hi = data & ~sound_state[0]; |
| 260 | 260 | sound_state[0] = data; |
| r3373 | r3374 | |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | |
| 273 | static WRITE8_HANDLER( astinvad_sound2_w ) | |
| 273 | static WRITE8_DEVICE_HANDLER( astinvad_sound2_w ) | |
| 274 | 274 | { |
| 275 | 275 | int bits_gone_hi = data & ~sound_state[1]; |
| 276 | 276 | sound_state[1] = data; |
| r3373 | r3374 | |
| 281 | 281 | if (bits_gone_hi & 0x08) sample_start(5, SND_FLEET4, 0); |
| 282 | 282 | if (bits_gone_hi & 0x10) sample_start(4, SND_UFOHIT, 0); |
| 283 | 283 | |
| 284 | screen_flip = (input_port_read(machine, "CABINET") & data & 0x20) ? 0xff : 0x00; | |
| 284 | screen_flip = (input_port_read(device->machine, "CABINET") & data & 0x20) ? 0xff : 0x00; | |
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | |
| r3373 | r3374 | |
| 514 | 514 | |
| 515 | 515 | MDRV_MACHINE_START(kamikaze) |
| 516 | 516 | |
| 517 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 518 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 517 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 518 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 519 | 519 | |
| 520 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 521 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 522 | ||
| 523 | 520 | /* video hardware */ |
| 524 | 521 | MDRV_VIDEO_UPDATE(astinvad) |
| 525 | 522 |
| r3373 | r3374 | |
|---|---|---|
| 42 | 42 | { |
| 43 | 43 | int charx, chary; |
| 44 | 44 | |
| 45 | render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00); | |
| 46 | ||
| 47 | 45 | /* clear */ |
| 48 | 46 | fillbitmap(bitmap, 0, cliprect); |
| 49 | 47 | |
| r3373 | r3374 | |
| 239 | 237 | |
| 240 | 238 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); |
| 241 | 239 | } |
| 240 | ||
| 241 | /* make color 0 transparent */ | |
| 242 | palette_set_color(machine, 0, MAKE_ARGB(0,0,0,0)); | |
| 242 | 243 | } |
| 243 | 244 | |
| 244 | 245 | static const gfx_layout esh_gfx_layout = |
| r3373 | r3374 | |
|---|---|---|
| 25 | 25 | INPUT_PORTS_END |
| 26 | 26 | |
| 27 | 27 | |
| 28 | static INPUT_PORTS_START( ms5pcb ) | |
| 29 | STANDARD_IN0 | |
| 30 | ||
| 31 | STANDARD_IN1 | |
| 32 | ||
| 33 | STANDARD_IN2 | |
| 34 | ||
| 35 | STANDARD_IN3 | |
| 36 | ||
| 37 | STANDARD_IN4 | |
| 38 | ||
| 39 | /* the rom banking is tied directly to the dipswitch?, or is there a bank write somewhere? */ | |
| 40 | PORT_START("HARDDIP") | |
| 41 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Region ) ) PORT_DIPLOCATION("HARDDIP:3") | |
| 42 | PORT_DIPSETTING( 0x00, DEF_STR( Asia ) ) | |
| 43 | PORT_DIPSETTING( 0x01, DEF_STR( Japan ) ) | |
| 44 | INPUT_PORTS_END | |
| 45 | ||
| 46 | ||
| 28 | 47 | static INPUT_PORTS_START( kog ) |
| 29 | 48 | STANDARD_IN0 |
| 30 | 49 | |
| r3373 | r3374 | |
| 323 | 342 | /* note you'll have to modify the last for lines of each block to use the extra bios roms, |
| 324 | 343 | they're hacks / homebrew / console bios roms so MAME doesn't list them by default */ |
| 325 | 344 | |
| 345 | /****************************************************************************** | |
| 326 | 346 | |
| 347 | The current Neo-Geo MVS system set (SFIX/SM1/000-LO) used is from a NEO-MVH MV1FS board. | |
| 348 | Other boards (MV1xx / MV2x / MV4 /MV6) other system sets? | |
| 349 | ||
| 350 | Zoom ROM (LO) 128K TC531000CP 1x 128Kx8 Zoom look-up table ROM | |
| 351 | Fix ROM (SFIX) 128K 27C1000 1x 128Kx8 Text layer graphics ROM | |
| 352 | Sound ROM (SM1) 128K 27C1000/23C1000 1x 128Kx8 Z80 program ROM | |
| 353 | ||
| 354 | ******************************************************************************/ | |
| 355 | ||
| 327 | 356 | #define NEO_BIOS_AUDIO_64K(name, hash) \ |
| 328 | 357 | NEOGEO_BIOS \ |
| 329 | 358 | \ |
| 330 | 359 | ROM_REGION( 0x20000, "audiobios", 0 ) \ |
| 331 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 360 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 332 | 361 | \ |
| 333 | 362 | ROM_REGION( 0x20000, "audio", 0 ) \ |
| 334 | 363 | ROM_LOAD( name, 0x00000, 0x10000, hash ) \ |
| r3373 | r3374 | |
| 339 | 368 | NEOGEO_BIOS \ |
| 340 | 369 | \ |
| 341 | 370 | ROM_REGION( 0x20000, "audiobios", 0 ) \ |
| 342 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 371 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 343 | 372 | \ |
| 344 | 373 | ROM_REGION( 0x30000, "audio", 0 ) \ |
| 345 | 374 | ROM_LOAD( name, 0x00000, 0x20000, hash ) \ |
| r3373 | r3374 | |
| 350 | 379 | NEOGEO_BIOS \ |
| 351 | 380 | \ |
| 352 | 381 | ROM_REGION( 0x20000, "audiobios", 0 ) \ |
| 353 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 382 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 354 | 383 | \ |
| 355 | 384 | ROM_REGION( 0x50000, "audio", 0 ) \ |
| 356 | 385 | ROM_LOAD( name, 0x00000, 0x40000, hash ) \ |
| r3373 | r3374 | |
| 361 | 390 | NEOGEO_BIOS \ |
| 362 | 391 | \ |
| 363 | 392 | ROM_REGION( 0x20000, "audiobios", 0 ) \ |
| 364 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 393 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 365 | 394 | \ |
| 366 | 395 | ROM_REGION( 0x90000, "audio", 0 ) \ |
| 367 | 396 | ROM_LOAD( name, 0x00000, 0x80000, hash ) \ |
| r3373 | r3374 | |
| 370 | 399 | #define NEO_BIOS_AUDIO_ENCRYPTED_512K(name, hash) \ |
| 371 | 400 | NEOGEO_BIOS \ |
| 372 | 401 | ROM_REGION( 0x20000, "audiobios", 0 ) \ |
| 373 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 402 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 374 | 403 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) \ |
| 375 | 404 | ROM_REGION( 0x80000, "audiocrypt", 0 ) \ |
| 376 | 405 | ROM_LOAD( name, 0x00000, 0x80000, hash ) \ |
| r3373 | r3374 | |
| 378 | 407 | #define NEO_BIOS_AUDIO_ENCRYPTED_256K(name, hash) \ |
| 379 | 408 | NEOGEO_BIOS \ |
| 380 | 409 | ROM_REGION( 0x20000, "audiobios", 0 ) \ |
| 381 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 410 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 382 | 411 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) \ |
| 383 | 412 | ROM_REGION( 0x80000, "audiocrypt", 0 ) \ |
| 384 | 413 | ROM_LOAD( name, 0x00000, 0x40000, hash ) \ |
| r3373 | r3374 | |
| 386 | 415 | #define NEO_BIOS_AUDIO_ENCRYPTED_128K(name, hash) \ |
| 387 | 416 | NEOGEO_BIOS \ |
| 388 | 417 | ROM_REGION( 0x20000, "audiobios", 0 ) \ |
| 389 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 418 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 390 | 419 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) \ |
| 391 | 420 | ROM_REGION( 0x80000, "audiocrypt", 0 ) \ |
| 392 | 421 | ROM_LOAD( name, 0x00000, 0x20000, hash ) \ |
| r3373 | r3374 | |
| 400 | 429 | ROM_LOAD( name, 0x000000, 0x08000, hash ) \ |
| 401 | 430 | \ |
| 402 | 431 | ROM_REGION( 0x20000, "fixedbios", 0 ) \ |
| 403 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 432 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 404 | 433 | \ |
| 405 | 434 | ROM_Y_ZOOM |
| 406 | 435 | |
| r3373 | r3374 | |
| 410 | 439 | ROM_LOAD( name, 0x000000, 0x10000, hash ) \ |
| 411 | 440 | \ |
| 412 | 441 | ROM_REGION( 0x20000, "fixedbios", 0 ) \ |
| 413 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 442 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 414 | 443 | \ |
| 415 | 444 | ROM_Y_ZOOM |
| 416 | 445 | |
| r3373 | r3374 | |
| 420 | 449 | ROM_LOAD( name, 0x000000, 0x20000, hash ) \ |
| 421 | 450 | \ |
| 422 | 451 | ROM_REGION( 0x20000, "fixedbios", 0 ) \ |
| 423 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 452 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 424 | 453 | \ |
| 425 | 454 | ROM_Y_ZOOM |
| 426 | 455 | |
| 427 | 456 | |
| 428 | 457 | #define ROM_Y_ZOOM \ |
| 429 | ROM_REGION( 0x10000, "zoomy", 0 ) \ | |
| 430 | ROM_LOAD( "000-lo.lo", 0x00000, 0x10000, CRC(e09e253c) SHA1(2b1c719531dac9bb503f22644e6e4236b91e7cfc) ) | |
| 458 | ROM_REGION( 0x20000, "zoomy", 0 ) \ | |
| 459 | ROM_LOAD( "000-lo.lo", 0x00000, 0x20000, CRC(5a86cff2) SHA1(5992277debadeb64d1c1c64b0a92d9293eaf7e4a) ) | |
| 431 | 460 | |
| 432 | 461 | /*************************************************************************** |
| 433 | 462 | |
| r3373 | r3374 | |
| 452 | 481 | . SNK-9201 |
| 453 | 482 | |
| 454 | 483 | PROG: |
| 455 | . ALTERA | |
| 484 | . 0103 (QFP144) | |
| 485 | . ALTERA (EPM7128SQC100-15) | |
| 456 | 486 | . NEO-COMA |
| 457 | 487 | . NEO-PCM2 (SNK 1999) |
| 458 | 488 | . NEO-PCM2 (PLAYMORE 2002) |
| r3373 | r3374 | |
| 497 | 527 | . NEO-MVS PROG 4096 |
| 498 | 528 | . NEO-MVS PROG 4096 B |
| 499 | 529 | . NEO-MVS PROGGSC |
| 500 | . NEO-MVS PROGGS3 | |
| 530 | . NEO-MVS PROGSM | |
| 531 | . NEO-MVS PROGSS3 | |
| 501 | 532 | . NEO-MVS PROGTOP |
| 502 | 533 | . NEO-MVS PROGSF1 (1998.6.17) |
| 503 | 534 | . NEO-MVS PROGEOP (1999.2.2) |
| r3373 | r3374 | |
| 555 | 586 | . NEO-AEG PROGBK2 (2002.4.1) |
| 556 | 587 | -- SNKPLAYMORE -- |
| 557 | 588 | . NEO-AEG PROGBK3R (2003.8.29) - NEO-HYCS (2003.9.29) |
| 589 | . NEO-AEG PROGBK2S (2003.10.16) | |
| 558 | 590 | |
| 559 | 591 | |
| 560 | 592 | Cartridge colours: |
| r3373 | r3374 | |
| 564 | 596 | |
| 565 | 597 | Known cartridge colours: |
| 566 | 598 | . Black |
| 599 | . Blue | |
| 567 | 600 | . Green |
| 568 | 601 | . Grey |
| 602 | . Red | |
| 569 | 603 | . Transparent |
| 570 | 604 | . Transparent Blue |
| 571 | 605 | . Transparent Green |
| r3373 | r3374 | |
| 575 | 609 | The above listed only covers SNK / PLAYMORE / SNKPLAYMORE pcb's. There also exists a |
| 576 | 610 | wide range of 'bootleg' pcb's. |
| 577 | 611 | |
| 612 | ||
| 578 | 613 | Neo-Geo game pcb infos by Johnboy |
| 579 | 614 | |
| 580 | 615 | ****************************************************************************/ |
| r3373 | r3374 | |
| 1316 | 1351 | ROM_LOAD16_BYTE( "030-c4.bin", 0x200001, 0x100000, CRC(780d1c4e) SHA1(2e2cf9de828e3b48642dd2203637103438c62142) ) /* Plane 2,3 */ |
| 1317 | 1352 | ROM_END |
| 1318 | 1353 | |
| 1319 | ROM_START( 2020bba ) /* AES VERSION */ | |
| 1354 | ROM_START( 2020bba ) /* MVS AND AES VERSION */ | |
| 1320 | 1355 | ROM_REGION( 0x100000, "main", 0 ) |
| 1321 | 1356 | ROM_LOAD16_WORD_SWAP( "030-epr.p1", 0x000000, 0x080000, CRC(c59be3dd) SHA1(4fbd462c1c18e85a252c58b04b54fd3b82b46cb0) ) |
| 1322 | 1357 | /* P1 on eprom, correct chip label unknown */ |
| r3373 | r3374 | |
| 2489 | 2524 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 2490 | 2525 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 2491 | 2526 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 2492 | ROM_LOAD( "sfix.sfx", | |
| 2527 | ROM_LOAD( "sfix.sfix", | |
| 2493 | 2528 | |
| 2494 | 2529 | NEO_BIOS_AUDIO_128K( "070-m1.bin", CRC(5a3b3191) SHA1(fa9a9930e18c64e598841fb344c4471d3d2c1964) ) |
| 2495 | 2530 | |
| r3373 | r3374 | |
| 2558 | 2593 | |
| 2559 | 2594 | NEO_BIOS_AUDIO_128K( "075-m1.bin", CRC(bb828df1) SHA1(eab8e2868173bdaac7c7ed97305a9aa1033fd303) ) |
| 2560 | 2595 | |
| 2561 | ROM_REGION( 0x | |
| 2596 | ROM_REGION( 0x300000, "ym", 0 ) | |
| 2562 | 2597 | ROM_LOAD( "075-v1.bin", 0x000000, 0x200000, CRC(7577e949) SHA1(3ba9f11094dd0cf519f33a16016cfae0d2c6629c) ) |
| 2563 | ROM_LOAD( "075-v2.bin", 0x200000, 0x0 | |
| 2598 | ROM_LOAD( "075-v2.bin", 0x200000, 0x10 | |
| 2564 | 2599 | |
| 2565 | 2600 | NO_DELTAT_REGION |
| 2566 | 2601 | |
| r3373 | r3374 | |
| 2765 | 2800 | |
| 2766 | 2801 | ROM_START( kof95 ) |
| 2767 | 2802 | ROM_REGION( 0x200000, "main", 0 ) |
| 2768 | ROM_LOAD16_WORD_SWAP( "084-p1.bin", | |
| 2803 | ROM_LOAD16_WORD_SWAP( "084-p1.bin", | |
| 2769 | 2804 | ROM_CONTINUE( 0x000000, 0x100000 ) |
| 2770 | 2805 | |
| 2771 | 2806 | NEO_SFIX_128K( "084-s1.bin", CRC(de716f8a) SHA1(f7386454a943ed5caf625f67ee1d0197b1c6fa13) ) |
| r3373 | r3374 | |
| 2773 | 2808 | NEO_BIOS_AUDIO_128K( "084-m1.bin", CRC(6f2d7429) SHA1(6f8462e4f07af82a5ca3197895d5dcbb67bdaa61) ) |
| 2774 | 2809 | |
| 2775 | 2810 | ROM_REGION( 0x900000, "ym", 0 ) |
| 2776 | // ROM_LOAD( "084-v1.bin", 0x000000, 0x400000, CRC(21469561) SHA1(f35c72d31f026efc9e74bc4f198a123999ab3fc3) ) // bad old rom ? | |
| 2777 | ROM_LOAD( "084-v1.bin", 0x000000, 0x400000, CRC(84861b56) SHA1(1b6c91ddaed01f45eb9b7e49d9c2b9b479d50da6) ) | |
| 2811 | ROM_LOAD( "084-v1.bin", 0x000000, 0x400000, CRC(84861b56) SHA1(1b6c91ddaed01f45eb9b7e49d9c2b9b479d50da6) ) | |
| 2778 | 2812 | ROM_LOAD( "084-v2.bin", 0x400000, 0x200000, CRC(b38a2803) SHA1(dbc2c8606ca09ed7ff20906b022da3cf053b2f09) ) |
| 2779 | 2813 | /* 600000-7fffff empty */ |
| 2780 | 2814 | ROM_LOAD( "084-v3.bin", 0x800000, 0x100000, CRC(d683a338) SHA1(eb9866b4b286edc09963cb96c43ce0a8fb09adbb) ) |
| r3373 | r3374 | |
| 2782 | 2816 | NO_DELTAT_REGION |
| 2783 | 2817 | |
| 2784 | 2818 | ROM_REGION( 0x1a00000, "sprites", ROMREGION_DISPOSE ) |
| 2785 | /* old set had the roms like this */ | |
| 2786 | #if 0 | |
| 2787 | ROM_LOAD16_BYTE( "084-c1.bin", 0x0400000, 0x200000, CRC(33bf8657) SHA1(79b0f0eb4e5c172f36c296ccabeb474804f7645a) ) /* Plane 0,1 */ | |
| 2788 | ROM_CONTINUE( 0x0000000, 0x200000 ) | |
| 2789 | ROM_LOAD16_BYTE( "084-c2.bin", 0x0400001, 0x200000, CRC(f21908a4) SHA1(a0bec5961396e62af553ba5293b1007cdf9fbf62) ) /* Plane 2,3 */ | |
| 2790 | ROM_CONTINUE( 0x0000001, 0x200000 ) | |
| 2791 | ROM_LOAD16_BYTE( "084-c3.bin", 0x0c00000, 0x200000, CRC(0cee1ddb) SHA1(f63c05020c5bee37c2598fd235d76157baea6c68) ) /* Plane 0,1 */ | |
| 2792 | ROM_CONTINUE( 0x0800000, 0x200000 ) | |
| 2793 | ROM_LOAD16_BYTE( "084-c4.bin", 0x0c00001, 0x200000, CRC(729db15d) SHA1(6167a601463d7aaba1c8d470b346a82e9aef8bb5) ) /* Plane 2,3 */ | |
| 2794 | ROM_CONTINUE( 0x0800001, 0x200000 ) | |
| 2795 | #endif | |
| 2796 | ROM_LOAD16_BYTE( "084-c1.bin", 0x0000000, 0x400000, CRC(fe087e32) SHA1(e8e89faa616027e4fb9b8a865c1a67f409c93bdf) ) /* Plane 0,1 */ | |
| 2797 | ROM_LOAD16_BYTE( "084-c2.bin", 0x0000001, 0x400000, CRC(07864e09) SHA1(0817fcfd75d0735fd8ff27561eaec371e4ff5829) ) /* Plane 2,3 */ | |
| 2798 | ROM_LOAD16_BYTE( "084-c3.bin", 0x0800000, 0x400000, CRC(a4e65d1b) SHA1(740a405b40b3a4b324697d2652cae29ffe0ac0bd) ) /* Plane 0,1 */ | |
| 2799 | ROM_LOAD16_BYTE( "084-c4.bin", 0x0800001, 0x400000, CRC(c1ace468) SHA1(74ea2a3cfd7b744f0988a05baaff10016ca8f625) ) /* Plane 2,3 */ | |
| 2800 | ||
| 2819 | ROM_LOAD16_BYTE( "084-c1.bin", 0x0000000, 0x400000, CRC(fe087e32) SHA1(e8e89faa616027e4fb9b8a865c1a67f409c93bdf) ) /* Plane 0,1 */ | |
| 2820 | ROM_LOAD16_BYTE( "084-c2.bin", 0x0000001, 0x400000, CRC(07864e09) SHA1(0817fcfd75d0735fd8ff27561eaec371e4ff5829) ) /* Plane 2,3 */ | |
| 2821 | ROM_LOAD16_BYTE( "084-c3.bin", 0x0800000, 0x400000, CRC(a4e65d1b) SHA1(740a405b40b3a4b324697d2652cae29ffe0ac0bd) ) /* Plane 0,1 */ | |
| 2822 | ROM_LOAD16_BYTE( "084-c4.bin", 0x0800001, 0x400000, CRC(c1ace468) SHA1(74ea2a3cfd7b744f0988a05baaff10016ca8f625) ) /* Plane 2,3 */ | |
| 2801 | 2823 | ROM_LOAD16_BYTE( "084-c5.bin", 0x1000000, 0x200000, CRC(8a2c1edc) SHA1(67866651bc0ce27122285a66b0aab108acf3d065) ) /* Plane 0,1 */ |
| 2802 | 2824 | ROM_LOAD16_BYTE( "084-c6.bin", 0x1000001, 0x200000, CRC(f593ac35) SHA1(302c92c63f092a8d49429c3331e5e5678f0ea48d) ) /* Plane 2,3 */ |
| 2803 | 2825 | /* 1400000-17fffff empty */ |
| r3373 | r3374 | |
| 2805 | 2827 | ROM_LOAD16_BYTE( "084-c8.bin", 0x1800001, 0x100000, CRC(78eb0f9b) SHA1(2925ea21ed2ce167f08a25589e94f28643379034) ) /* Plane 2,3 */ |
| 2806 | 2828 | ROM_END |
| 2807 | 2829 | |
| 2808 | ROM_START( kof95a ) | |
| 2830 | ROM_START( kof95h ) /* MVS AND AES VERSION */ | |
| 2831 | /* There also exists a MVS version with 4x eprom (EP1~EP4); board used is NEO-MVS PROGSM */ | |
| 2809 | 2832 | ROM_REGION( 0x200000, "main", 0 ) |
| 2810 | ||
| 2833 | ||
| 2811 | 2834 | ROM_CONTINUE( 0x000000, 0x100000 ) |
| 2812 | 2835 | |
| 2813 | 2836 | NEO_SFIX_128K( "084-s1.bin", CRC(de716f8a) SHA1(f7386454a943ed5caf625f67ee1d0197b1c6fa13) ) |
| r3373 | r3374 | |
| 2815 | 2838 | NEO_BIOS_AUDIO_128K( "084-m1.bin", CRC(6f2d7429) SHA1(6f8462e4f07af82a5ca3197895d5dcbb67bdaa61) ) |
| 2816 | 2839 | |
| 2817 | 2840 | ROM_REGION( 0x900000, "ym", 0 ) |
| 2818 | ||
| 2841 | ||
| 2819 | 2842 | ROM_LOAD( "084-v2.bin", 0x400000, 0x200000, CRC(b38a2803) SHA1(dbc2c8606ca09ed7ff20906b022da3cf053b2f09) ) |
| 2820 | 2843 | /* 600000-7fffff empty */ |
| 2821 | 2844 | ROM_LOAD( "084-v3.bin", 0x800000, 0x100000, CRC(d683a338) SHA1(eb9866b4b286edc09963cb96c43ce0a8fb09adbb) ) |
| r3373 | r3374 | |
| 2823 | 2846 | NO_DELTAT_REGION |
| 2824 | 2847 | |
| 2825 | 2848 | ROM_REGION( 0x1a00000, "sprites", ROMREGION_DISPOSE ) |
| 2826 | ROM_LOAD16_BYTE( "084-c1.bin", 0x0000000, 0x400000, CRC(fe087e32) SHA1(e8e89faa616027e4fb9b8a865c1a67f409c93bdf) ) /* Plane 0,1 */ | |
| 2827 | ROM_LOAD16_BYTE( "084-c2.bin", 0x0000001, 0x400000, CRC(07864e09) SHA1(0817fcfd75d0735fd8ff27561eaec371e4ff5829) ) /* Plane 2,3 */ | |
| 2828 | ROM_LOAD16_BYTE( "084-c3.bin", 0x0800000, 0x400000, CRC(a4e65d1b) SHA1(740a405b40b3a4b324697d2652cae29ffe0ac0bd) ) /* Plane 0,1 */ | |
| 2829 | ROM_LOAD16_BYTE( "084-c4.bin", 0x0800001, 0x400000, CRC(c1ace468) SHA1(74ea2a3cfd7b744f0988a05baaff10016ca8f625) ) /* Plane 2,3 */ | |
| 2849 | ROM_LOAD16_BYTE( "084-c1.bin", 0x0000000, 0x400000, CRC(fe087e32) SHA1(e8e89faa616027e4fb9b8a865c1a67f409c93bdf) ) /* Plane 0,1 */ | |
| 2850 | ROM_LOAD16_BYTE( "084-c2.bin", 0x0000001, 0x400000, CRC(07864e09) SHA1(0817fcfd75d0735fd8ff27561eaec371e4ff5829) ) /* Plane 2,3 */ | |
| 2851 | ROM_LOAD16_BYTE( "084-c3.bin", 0x0800000, 0x400000, CRC(a4e65d1b) SHA1(740a405b40b3a4b324697d2652cae29ffe0ac0bd) ) /* Plane 0,1 */ | |
| 2852 | ROM_LOAD16_BYTE( "084-c4.bin", 0x0800001, 0x400000, CRC(c1ace468) SHA1(74ea2a3cfd7b744f0988a05baaff10016ca8f625) ) /* Plane 2,3 */ | |
| 2830 | 2853 | ROM_LOAD16_BYTE( "084-c5.bin", 0x1000000, 0x200000, CRC(8a2c1edc) SHA1(67866651bc0ce27122285a66b0aab108acf3d065) ) /* Plane 0,1 */ |
| 2831 | 2854 | ROM_LOAD16_BYTE( "084-c6.bin", 0x1000001, 0x200000, CRC(f593ac35) SHA1(302c92c63f092a8d49429c3331e5e5678f0ea48d) ) /* Plane 2,3 */ |
| 2832 | 2855 | /* 1400000-17fffff empty */ |
| r3373 | r3374 | |
| 2855 | 2878 | ROM_LOAD16_BYTE( "086-c4.bin", 0x800001, 0x100000, CRC(7a6e7d82) SHA1(b1bb82cec3d68367d5e01e63c44c11b67e577411) ) /* Plane 2,3 */ |
| 2856 | 2879 | ROM_END |
| 2857 | 2880 | |
| 2858 | ROM_START( samsho3 ) | |
| 2881 | ROM_START( samsho3 ) /* MVS VERSION */ | |
| 2859 | 2882 | ROM_REGION( 0x300000, "main", 0 ) |
| 2860 | ROM_LOAD16_WORD_SWAP( "087-p1.bin", 0x000000, 0x100000, CRC(282a336e) SHA1(e062f1939d36a45f185b5dbd726cdd833dc7c28c) ) | |
| 2861 | ROM_LOAD16_WORD_SWAP( "087-p2.bin", 0x100000, 0x200000, CRC(9bbe27e0) SHA1(b18117102159903c8e8f4e4226e1cc91a400e816) ) | |
| 2883 | ROM_LOAD16_WORD_SWAP( "087-ep1.bin", 0x000000, 0x080000, CRC(23e09bb8) SHA1(79da99fa50a639fce9d1266699b5e53c9ac55642) ) | |
| 2884 | ROM_LOAD16_WORD_SWAP( "087-ep2.bin", 0x080000, 0x080000, CRC(256f5302) SHA1(e2d21b413a6059194a994b7902b2a7df98a15151) ) | |
| 2885 | ROM_LOAD16_WORD_SWAP( "087-ep3.bin", 0x100000, 0x080000, CRC(bf2db5dd) SHA1(b4fa1dc1eccc9eb1ce74f0a06992ef89b1cbc732) ) | |
| 2886 | ROM_LOAD16_WORD_SWAP( "087-ep4.bin", 0x180000, 0x080000, CRC(53e60c58) SHA1(f975e81cab6322d3260348402721c673023259fa) ) | |
| 2887 | ROM_LOAD16_WORD_SWAP( "087-p5.bin", 0x200000, 0x100000, CRC(e86ca4af) SHA1(5246acbab77ac2f232b88b8522187764ff0872f0) ) | |
| 2862 | 2888 | |
| 2863 | 2889 | NEO_SFIX_128K( "087-s1.bin", CRC(74ec7d9f) SHA1(d79c479838a7ca51735a44f91f1968ec5b3c6b91) ) |
| 2864 | 2890 | |
| r3373 | r3374 | |
| 2881 | 2907 | ROM_LOAD16_BYTE( "087-c8.bin", 0x1800001, 0x100000, CRC(a9e82717) SHA1(e39ee15d5140dbe7f06eea945cce9984a5e8b06a) ) /* Plane 2,3 */ |
| 2882 | 2908 | ROM_END |
| 2883 | 2909 | |
| 2884 | ROM_START( samsho3 | |
| 2910 | ROM_START( samsho3h ) /* AES VERSION */ | |
| 2885 | 2911 | ROM_REGION( 0x300000, "main", 0 ) |
| 2886 | ROM_LOAD16_WORD_SWAP( "087-ep1.bin", 0x000000, 0x080000, CRC(23e09bb8) SHA1(79da99fa50a639fce9d1266699b5e53c9ac55642) ) | |
| 2887 | ROM_LOAD16_WORD_SWAP( "087-ep2.bin", 0x080000, 0x080000, CRC(256f5302) SHA1(e2d21b413a6059194a994b7902b2a7df98a15151) ) | |
| 2888 | ROM_LOAD16_WORD_SWAP( "087-ep3.bin", 0x100000, 0x080000, CRC(bf2db5dd) SHA1(b4fa1dc1eccc9eb1ce74f0a06992ef89b1cbc732) ) | |
| 2889 | ROM_LOAD16_WORD_SWAP( "087-ep4.bin", 0x180000, 0x080000, CRC(53e60c58) SHA1(f975e81cab6322d3260348402721c673023259fa) ) | |
| 2890 | ROM_LOAD16_WORD_SWAP( "087-p5.bin", 0x200000, 0x100000, CRC(e86ca4af) SHA1(5246acbab77ac2f232b88b8522187764ff0872f0) ) | |
| 2912 | ROM_LOAD16_WORD_SWAP( "087-pg1.bin", 0x000000, 0x100000, CRC(282a336e) SHA1(e062f1939d36a45f185b5dbd726cdd833dc7c28c) ) | |
| 2913 | ROM_LOAD16_WORD_SWAP( "087-p2.bin", 0x100000, 0x200000, CRC(9bbe27e0) SHA1(b18117102159903c8e8f4e4226e1cc91a400e816) ) | |
| 2891 | 2914 | |
| 2892 | 2915 | NEO_SFIX_128K( "087-s1.bin", CRC(74ec7d9f) SHA1(d79c479838a7ca51735a44f91f1968ec5b3c6b91) ) |
| 2893 | 2916 | |
| r3373 | r3374 | |
| 3833 | 3856 | ROM_LOAD16_BYTE( "231-c4.bin", 0x400001, 0x080000, CRC(1694f171) SHA1(a6af5d3f1e0b3f73da275e04d4434c6c9c7b9208) ) /* Plane 2,3 */ |
| 3834 | 3857 | ROM_END |
| 3835 | 3858 | |
| 3836 | ROM_START( kof97 ) | |
| 3859 | ROM_START( kof97 ) /* MVS VERSION */ | |
| 3837 | 3860 | ROM_REGION( 0x500000, "main", 0 ) |
| 3838 | 3861 | ROM_LOAD16_WORD_SWAP( "232-p1.bin", 0x000000, 0x100000, CRC(7db81ad9) SHA1(8bc42be872fd497eb198ca13bf004852b88eb1dc) ) |
| 3839 | 3862 | ROM_LOAD16_WORD_SWAP( "232-p2.bin", 0x100000, 0x400000, CRC(158b23f6) SHA1(9744620a70513490aaf9c5eda33e5ec31222be19) ) |
| r3373 | r3374 | |
| 4036 | 4059 | ROM_LOAD16_WORD_SWAP("236-bios.bin", 0x00000, 0x020000, CRC(853e6b96) SHA1(de369cb4a7df147b55168fa7aaf0b98c753b735e) ) |
| 4037 | 4060 | |
| 4038 | 4061 | ROM_REGION( 0x20000, "audiobios", 0 ) |
| 4039 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 4062 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 4040 | 4063 | |
| 4041 | 4064 | ROM_REGION( 0x50000, "audio", 0 ) |
| 4042 | 4065 | ROM_LOAD( "236-m1.bin", 0x00000, 0x20000, CRC(880a1abd) SHA1(905afa157aba700e798243b842792e50729b19a0) ) /* so overwrite it with the real thing */ |
| r3373 | r3374 | |
| 4154 | 4177 | ROM_LOAD16_WORD_SWAP( "240-p1.bin", 0x000000, 0x100000, CRC(80e41205) SHA1(8f83eb8ff54be4ec40f8a0dd2cbe56c54908d00a) ) |
| 4155 | 4178 | ROM_LOAD16_WORD_SWAP( "240-p2.bin", 0x100000, 0x400000, CRC(960aa88d) SHA1(3d9e785891871af90313f178dca2724633406674) ) |
| 4156 | 4179 | |
| 4157 | NEO_SFIX_128K( "240-s1.bin", | |
| 4180 | NEO_SFIX_128K( "240-s1.bin", | |
| 4158 | 4181 | |
| 4182 | /* TC532000DP */ | |
| 4159 | 4183 | NEO_BIOS_AUDIO_256K( "240-m1.bin", CRC(ed482791) SHA1(1f54a45967cb7842c33aa24be322c9f33ff75ac3) ) |
| 4160 | 4184 | |
| 4161 | 4185 | ROM_REGION( 0x0e00000, "ym", 0 ) |
| r3373 | r3374 | |
| 4179 | 4203 | ROM_START( rbff2h ) /* AES VERSION */ |
| 4180 | 4204 | ROM_REGION( 0x500000, "main", 0 ) |
| 4181 | 4205 | ROM_LOAD16_WORD_SWAP( "240-pg1.bin", 0x000000, 0x100000, CRC(b6969780) SHA1(e3373d18e0f0724d69efb8024a27cca121f1b5b2) ) |
| 4182 | ROM_LOAD16_WORD_SWAP( "240-p2.bin", 0x100000, 0x400000, CRC(960aa88d) SHA1(3d9e785891871af90313f178dca2724633406674) ) | |
| 4206 | ROM_LOAD16_WORD_SWAP( "240-p2.bin", 0x100000, 0x400000, CRC(960aa88d) SHA1(3d9e785891871af90313f178dca2724633406674) ) | |
| 4183 | 4207 | |
| 4184 | NEO_SFIX_128K( "240-s1.bin", | |
| 4208 | NEO_SFIX_128K( "240-s1.bin", | |
| 4185 | 4209 | |
| 4210 | /* TC532000DP */ | |
| 4186 | 4211 | NEO_BIOS_AUDIO_256K( "240-m1.bin", CRC(ed482791) SHA1(1f54a45967cb7842c33aa24be322c9f33ff75ac3) ) |
| 4187 | 4212 | |
| 4188 | 4213 | ROM_REGION( 0x0e00000, "ym", 0 ) |
| r3373 | r3374 | |
| 4203 | 4228 | ROM_LOAD16_BYTE( "240-c6.bin", 0x2000001, 0x800000, CRC(4609e507) SHA1(bb17f50a377dddb77c1eeda5944a7bcbf0cca5f7) ) /* Plane 2,3 */ |
| 4204 | 4229 | ROM_END |
| 4205 | 4230 | |
| 4206 | ROM_START( rbff2k ) | |
| 4231 | ROM_START( rbff2k ) /* KOREAN VERSION */ | |
| 4207 | 4232 | ROM_REGION( 0x500000, "main", 0 ) |
| 4208 | 4233 | ROM_LOAD16_WORD_SWAP( "140-p1k.bin", 0x000000, 0x100000, CRC(965edee1) SHA1(7f4b947b19ccfee32fc73e4fd89645eb313b5c77) ) |
| 4209 | ROM_LOAD16_WORD_SWAP( "240-p2.bin", 0x100000, 0x400000, CRC(960aa88d) SHA1(3d9e785891871af90313f178dca2724633406674) ) | |
| 4234 | ROM_LOAD16_WORD_SWAP( "240-p2.bin", 0x100000, 0x400000, CRC(960aa88d) SHA1(3d9e785891871af90313f178dca2724633406674) ) | |
| 4210 | 4235 | |
| 4211 | NEO_SFIX_128K( "240-s1.bin", | |
| 4236 | NEO_SFIX_128K( "240-s1.bin", | |
| 4212 | 4237 | |
| 4238 | /* TC532000DP */ | |
| 4213 | 4239 | NEO_BIOS_AUDIO_256K( "240-m1.bin", CRC(ed482791) SHA1(1f54a45967cb7842c33aa24be322c9f33ff75ac3) ) |
| 4214 | 4240 | |
| 4215 | 4241 | ROM_REGION( 0x0e00000, "ym", 0 ) |
| r3373 | r3374 | |
| 4259 | 4285 | |
| 4260 | 4286 | NEO_SFIX_128K( "242-s1.bin", CRC(7f7b4805) SHA1(80ee6e5d0ece9c34ebca54b043a7cb33f9ff6b92) ) |
| 4261 | 4287 | |
| 4262 | NEO_BIOS_AUDIO_256K( "242-m1a.bin", CRC(4ef7016b) SHA1(4182235e963bd70d398a79abeb54ab4d62887c48) ) | |
| 4288 | /* TC532000DP */ | |
| 4289 | NEO_BIOS_AUDIO_256K( "242-m1.bin", CRC(4ef7016b) SHA1(4182235e963bd70d398a79abeb54ab4d62887c48) ) | |
| 4263 | 4290 | |
| 4264 | 4291 | ROM_REGION( 0x1000000, "ym", 0 ) |
| 4265 | 4292 | ROM_LOAD( "242-v1.bin", 0x000000, 0x400000, CRC(b9ea8051) SHA1(49606f64eb249263b3341b4f50cc1763c390b2af) ) |
| r3373 | r3374 | |
| 4287 | 4314 | |
| 4288 | 4315 | NEO_SFIX_128K( "242-s1.bin", CRC(7f7b4805) SHA1(80ee6e5d0ece9c34ebca54b043a7cb33f9ff6b92) ) |
| 4289 | 4316 | |
| 4317 | /* Correct chip label */ | |
| 4290 | 4318 | NEO_BIOS_AUDIO_256K( "242-m1k.bin", CRC(ce12da0c) SHA1(e7c01dae2852d543d1a58d55735239f6a5aa05a5) ) |
| 4291 | 4319 | |
| 4292 | 4320 | ROM_REGION( 0x1000000, "ym", 0 ) |
| r3373 | r3374 | |
| 4311 | 4339 | ROM_START( kof98n ) |
| 4312 | 4340 | ROM_REGION( 0x500000, "main", 0 ) |
| 4313 | 4341 | ROM_LOAD16_WORD_SWAP( "242-pn1.bin", 0x000000, 0x100000, CRC(61ac868a) SHA1(26577264aa72d6af272952a876fcd3775f53e3fa) ) |
| 4314 | ROM_LOAD16_WORD_SWAP( "242-p2.bin", 0x100000, 0x400000, CRC(980aba4c) SHA1(5e735929ec6c3ca5b2efae3c7de47bcbb8ade2c5) ) | |
| 4342 | ROM_LOAD16_WORD_SWAP( "242-p2.bin", 0x100000, 0x400000, CRC(980aba4c) SHA1(5e735929ec6c3ca5b2efae3c7de47bcbb8ade2c5) ) | |
| 4315 | 4343 | |
| 4316 | 4344 | NEO_SFIX_128K( "242-s1.bin", CRC(7f7b4805) SHA1(80ee6e5d0ece9c34ebca54b043a7cb33f9ff6b92) ) |
| 4317 | 4345 | |
| 4318 | NEO_BIOS_AUDIO_256K( "242-m1.bin", CRC(4e7a6b1b) SHA1(b54d08f88713ed0271aa06f9f7c9c572ef555b1a) ) | |
| 4346 | /* TC532000DP */ | |
| 4347 | NEO_BIOS_AUDIO_256K( "242-mg1.bin", CRC(4e7a6b1b) SHA1(b54d08f88713ed0271aa06f9f7c9c572ef555b1a) ) | |
| 4319 | 4348 | |
| 4320 | 4349 | ROM_REGION( 0x1000000, "ym", 0 ) |
| 4321 | 4350 | ROM_LOAD( "242-v1.bin", 0x000000, 0x400000, CRC(b9ea8051) SHA1(49606f64eb249263b3341b4f50cc1763c390b2af) ) |
| r3373 | r3374 | |
| 4553 | 4582 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 4554 | 4583 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4555 | 4584 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4556 | ROM_LOAD( "sfix.sfx", | |
| 4585 | ROM_LOAD( "sfix.sfix", | |
| 4557 | 4586 | |
| 4558 | 4587 | NEO_BIOS_AUDIO_128K( "251-m1.bin", CRC(5e74539c) SHA1(6f49a9343cbd026b2c6720ff3fa2e5b1f85e80da) ) |
| 4559 | 4588 | |
| r3373 | r3374 | |
| 4589 | 4618 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 4590 | 4619 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4591 | 4620 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4592 | ROM_LOAD( "sfix.sfx", | |
| 4621 | ROM_LOAD( "sfix.sfix", | |
| 4593 | 4622 | |
| 4594 | 4623 | NEO_BIOS_AUDIO_128K( "251-m1.bin", CRC(5e74539c) SHA1(6f49a9343cbd026b2c6720ff3fa2e5b1f85e80da) ) |
| 4595 | 4624 | |
| r3373 | r3374 | |
| 4627 | 4656 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 4628 | 4657 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4629 | 4658 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4630 | ROM_LOAD( "sfix.sfx", | |
| 4659 | ROM_LOAD( "sfix.sfix", | |
| 4631 | 4660 | |
| 4632 | 4661 | NEO_BIOS_AUDIO_128K( "251-m1.bin", CRC(5e74539c) SHA1(6f49a9343cbd026b2c6720ff3fa2e5b1f85e80da) ) |
| 4633 | 4662 | |
| r3373 | r3374 | |
| 4663 | 4692 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 4664 | 4693 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4665 | 4694 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4666 | ROM_LOAD( "sfix.sfx", | |
| 4695 | ROM_LOAD( "sfix.sfix", | |
| 4667 | 4696 | |
| 4668 | 4697 | NEO_BIOS_AUDIO_128K( "251-m1.bin", CRC(5e74539c) SHA1(6f49a9343cbd026b2c6720ff3fa2e5b1f85e80da) ) |
| 4669 | 4698 | |
| r3373 | r3374 | |
| 4729 | 4758 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 4730 | 4759 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4731 | 4760 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4732 | ROM_LOAD( "sfix.sfx", | |
| 4761 | ROM_LOAD( "sfix.sfix", | |
| 4733 | 4762 | |
| 4734 | 4763 | NEO_BIOS_AUDIO_128K( "252-m1.bin", CRC(30cc4099) SHA1(46453b7aac41855a92724a785372f8daf931d8d4) ) |
| 4735 | 4764 | |
| r3373 | r3374 | |
| 4758 | 4787 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ |
| 4759 | 4788 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4760 | 4789 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4761 | ROM_LOAD( "sfix.sfx", | |
| 4790 | ROM_LOAD( "sfix.sfix", | |
| 4762 | 4791 | |
| 4763 | 4792 | NEO_BIOS_AUDIO_256K( "253-m1.bin", CRC(36a806be) SHA1(90fb44dc0c3fb57946a0f35716056abb84a0f191) ) |
| 4764 | 4793 | |
| r3373 | r3374 | |
| 4794 | 4823 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ |
| 4795 | 4824 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4796 | 4825 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4797 | ROM_LOAD( "sfix.sfx", | |
| 4826 | ROM_LOAD( "sfix.sfix", | |
| 4798 | 4827 | |
| 4799 | 4828 | NEO_BIOS_AUDIO_256K( "253-m1.bin", CRC(36a806be) SHA1(90fb44dc0c3fb57946a0f35716056abb84a0f191) ) |
| 4800 | 4829 | |
| r3373 | r3374 | |
| 4882 | 4911 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 4883 | 4912 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4884 | 4913 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4885 | ROM_LOAD( "sfix.sfx", | |
| 4914 | ROM_LOAD( "sfix.sfix", | |
| 4886 | 4915 | |
| 4887 | 4916 | NEO_BIOS_AUDIO_128K( "254-m1.bin", CRC(994b4487) SHA1(a4e645a3ababa48a8325980ff022e04a8b51b017) ) |
| 4888 | 4917 | |
| r3373 | r3374 | |
| 4916 | 4945 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 4917 | 4946 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4918 | 4947 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4919 | ROM_LOAD( "sfix.sfx", | |
| 4948 | ROM_LOAD( "sfix.sfix", | |
| 4920 | 4949 | |
| 4921 | 4950 | NEO_BIOS_AUDIO_128K( "255-m1.bin", CRC(8efd4014) SHA1(5b73809b6e4e49264d281ef3e5004ac8a9de296d) ) |
| 4922 | 4951 | |
| r3373 | r3374 | |
| 4948 | 4977 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ |
| 4949 | 4978 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4950 | 4979 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4951 | ROM_LOAD( "sfix.sfx", | |
| 4980 | ROM_LOAD( "sfix.sfix", | |
| 4952 | 4981 | |
| 4953 | 4982 | NEO_BIOS_AUDIO_512K( "256-m1.bin", CRC(eaeec116) SHA1(54419dbb21edc8c4b37eaac2e7ad9496d2de037a) ) |
| 4954 | 4983 | |
| r3373 | r3374 | |
| 4983 | 5012 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ |
| 4984 | 5013 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 4985 | 5014 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 4986 | ROM_LOAD( "sfix.sfx", | |
| 5015 | ROM_LOAD( "sfix.sfix", | |
| 4987 | 5016 | |
| 4988 | 5017 | NEO_BIOS_AUDIO_512K( "256-m1.bin", CRC(eaeec116) SHA1(54419dbb21edc8c4b37eaac2e7ad9496d2de037a) ) |
| 4989 | 5018 | |
| r3373 | r3374 | |
| 5020 | 5049 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ |
| 5021 | 5050 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5022 | 5051 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5023 | ROM_LOAD( "sfix.sfx", | |
| 5052 | ROM_LOAD( "sfix.sfix", | |
| 5024 | 5053 | |
| 5025 | 5054 | /* Encrypted */ |
| 5026 | 5055 | NEO_BIOS_AUDIO_ENCRYPTED_256K( "257-m1.bin", CRC(4b749113) SHA1(2af2361146edd0ce3966614d90165a5c1afb8de4) ) |
| r3373 | r3374 | |
| 5055 | 5084 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ |
| 5056 | 5085 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5057 | 5086 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5058 | ROM_LOAD( "sfix.sfx", | |
| 5087 | ROM_LOAD( "sfix.sfix", | |
| 5059 | 5088 | |
| 5060 | 5089 | /* Encrypted */ |
| 5061 | 5090 | NEO_BIOS_AUDIO_ENCRYPTED_256K( "257-m1.bin", CRC(4b749113) SHA1(2af2361146edd0ce3966614d90165a5c1afb8de4) ) |
| r3373 | r3374 | |
| 5090 | 5119 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5091 | 5120 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5092 | 5121 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5093 | ROM_LOAD( "sfix.sfx", | |
| 5122 | ROM_LOAD( "sfix.sfix", | |
| 5094 | 5123 | |
| 5095 | 5124 | NEO_BIOS_AUDIO_128K( "259-m1.bin", CRC(85668ee9) SHA1(7d3f51710cf90c097cd3faaeeef10ceb85cbb3e8) ) |
| 5096 | 5125 | |
| r3373 | r3374 | |
| 5143 | 5172 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5144 | 5173 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5145 | 5174 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5146 | ROM_LOAD( "sfix.sfx", | |
| 5175 | ROM_LOAD( "sfix.sfix", | |
| 5147 | 5176 | |
| 5148 | 5177 | NEO_BIOS_AUDIO_512K( "260-m1.bin", CRC(6407c5e5) SHA1(d273e154cc905b63205a17a1a6d419cac3485a92) ) |
| 5149 | 5178 | |
| r3373 | r3374 | |
| 5192 | 5221 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5193 | 5222 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5194 | 5223 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5195 | ROM_LOAD( "sfix.sfx", | |
| 5224 | ROM_LOAD( "sfix.sfix", | |
| 5196 | 5225 | |
| 5197 | 5226 | NEO_BIOS_AUDIO_128K( "261-m1.bin", CRC(36ed9cdd) SHA1(78a7d755e9e9f52255ac6228d9d402fd6a02c126) ) |
| 5198 | 5227 | |
| r3373 | r3374 | |
| 5222 | 5251 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5223 | 5252 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5224 | 5253 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5225 | ROM_LOAD( "sfix.sfx", | |
| 5254 | ROM_LOAD( "sfix.sfix", | |
| 5226 | 5255 | |
| 5227 | 5256 | /* Encrypted */ |
| 5228 | 5257 | NEO_BIOS_AUDIO_ENCRYPTED_256K( "265-262-m1.bin", CRC(a7f8119f) SHA1(71805b39b8b09c32425cf39f9de59b2f755976c2) ) /* yes it really does have a strange name */ |
| r3373 | r3374 | |
| 5258 | 5287 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5259 | 5288 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5260 | 5289 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5261 | ROM_LOAD( "sfix.sfx", | |
| 5290 | ROM_LOAD( "sfix.sfix", | |
| 5262 | 5291 | |
| 5263 | 5292 | /* Encrypted */ |
| 5264 | 5293 | NEO_BIOS_AUDIO_ENCRYPTED_256K( "265-262-m1.bin", CRC(a7f8119f) SHA1(71805b39b8b09c32425cf39f9de59b2f755976c2) ) /* yes it really does have a strange name */ |
| r3373 | r3374 | |
| 5294 | 5323 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ |
| 5295 | 5324 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5296 | 5325 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5297 | ROM_LOAD( "sfix.sfx", | |
| 5326 | ROM_LOAD( "sfix.sfix", | |
| 5298 | 5327 | |
| 5299 | 5328 | /* Encrypted */ |
| 5300 | 5329 | NEO_BIOS_AUDIO_ENCRYPTED_128K( "263-m1.bin", CRC(46ac8228) SHA1(5aeea221050c98e4bb0f16489ce772bf1c80f787) ) |
| r3373 | r3374 | |
| 5353 | 5382 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5354 | 5383 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5355 | 5384 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5356 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 5385 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 5357 | 5386 | |
| 5358 | 5387 | /* Encrypted */ |
| 5359 | 5388 | NEO_BIOS_AUDIO_ENCRYPTED_128K( "264-m1.bin", CRC(4dbd7b43) SHA1(6b63756b0d2d30bbf13fbd219833c81fd060ef96) ) |
| r3373 | r3374 | |
| 5388 | 5417 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5389 | 5418 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5390 | 5419 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5391 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 5420 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 5392 | 5421 | |
| 5393 | 5422 | /* Encrypted */ |
| 5394 | 5423 | NEO_BIOS_AUDIO_ENCRYPTED_128K( "265-m1.bin", CRC(85aaa632) SHA1(744fba4ca3bc3a5873838af886efb97a8a316104) ) |
| r3373 | r3374 | |
| 5535 | 5564 | ROM_REGION( 0x80000, "fixed", 0 ) |
| 5536 | 5565 | ROM_FILL( 0x000000, 0x80000, 0 ) |
| 5537 | 5566 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5538 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 5567 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 5539 | 5568 | |
| 5540 | 5569 | /* Encrypted */ |
| 5541 | 5570 | NEO_BIOS_AUDIO_ENCRYPTED_128K( "266-m1.bin", CRC(456c3e6c) SHA1(5a07d0186198a18d2dda1331093cf29b0b9b2984) ) |
| r3373 | r3374 | |
| 5569 | 5598 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5570 | 5599 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5571 | 5600 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5572 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 5601 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 5573 | 5602 | |
| 5574 | 5603 | /* Encrypted */ |
| 5575 | 5604 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "267-m1.bin", CRC(c7853ccd) SHA1(1b7a4c5093cf0fe3861ce44fd1d3b30c71ad0abe) ) |
| r3373 | r3374 | |
| 5597 | 5626 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5598 | 5627 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5599 | 5628 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5600 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 5629 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 5601 | 5630 | |
| 5602 | 5631 | /* Encrypted */ |
| 5603 | 5632 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "268-m1.bin", CRC(4a5a6e0e) SHA1(df0f660f2465e1db7be5adfcaf5e88ad61a74a42) ) |
| r3373 | r3374 | |
| 5632 | 5661 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5633 | 5662 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 5634 | 5663 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5635 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 5664 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 5636 | 5665 | |
| 5637 | 5666 | /* Encrypted */ |
| 5638 | 5667 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "268-m1h.bin", CRC(4a5a6e0e) SHA1(df0f660f2465e1db7be5adfcaf5e88ad61a74a42) ) /* Same as MVS above, but different label */ |
| r3373 | r3374 | |
| 5656 | 5685 | ROM_LOAD16_BYTE( "268-c8c.bin", 0x3000001, 0x800000, CRC(551d720e) SHA1(ebf69e334fcaba0fda6fd432fd0970283a365d12) ) /* Plane 2,3 */ |
| 5657 | 5686 | ROM_END |
| 5658 | 5687 | |
| 5659 | /* program roms are the same on the PCB version, GFX roms etc. are different arrangement */ | |
| 5660 | ROM_START( ms5pcb ) /* Encrypted Set */ | |
| 5661 | ROM_REGION( 0x800000, "main", 0 ) | |
| 5662 | ROM_LOAD32_WORD_SWAP( "268-p1.bin", 0x000000, 0x400000, CRC(d0466792) SHA1(880819933d997fab398f91061e9dbccb959ae8a1) ) | |
| 5663 | ROM_LOAD32_WORD_SWAP( "268-p2.bin", 0x000002, 0x400000, CRC(fbf6b61e) SHA1(9ec743d5988b5e3183f37f8edf45c72a8c0c893e) ) | |
| 5664 | ||
| 5665 | /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */ | |
| 5666 | ROM_REGION( 0x20000, "fixed", 0 ) | |
| 5667 | ROM_FILL( 0x000000, 0x20000, 0 ) | |
| 5668 | ROM_REGION( 0x20000, "fixedbios", 0 ) | |
| 5669 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) ) | |
| 5670 | ||
| 5671 | ROM_REGION16_BE( 0x80000, "mainbios", 0 ) | |
| 5672 | /* this contains both an ASIA and JAPAN bios, HARDDIP3 on the PCB selects which to use */ | |
| 5673 | ROM_LOAD16_WORD_SWAP( "268-bios.bin", 0x00000, 0x80000, CRC(b4590283) SHA1(47047ed5b6062babc0a0bebcc30e4b3f021e115a) ) | |
| 5674 | ||
| 5675 | ||
| 5676 | /* Encrypted */ | |
| 5677 | ROM_REGION( 0x80000, "audiocrypt", 0 ) | |
| 5678 | ROM_LOAD( "268-m1.bin", 0x00000, 0x80000, CRC(4a5a6e0e) SHA1(df0f660f2465e1db7be5adfcaf5e88ad61a74a42) ) | |
| 5679 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) | |
| 5680 | ||
| 5681 | ||
| 5682 | /* Encrypted */ | |
| 5683 | ||
| 5684 | ROM_Y_ZOOM | |
| 5685 | ||
| 5686 | ROM_REGION( 0x1000000, "ym", 0 ) | |
| 5687 | /* Encrypted */ | |
| 5688 | ROM_LOAD( "268-v1.bin", 0x000000, 0x1000000, CRC(8458afe5) SHA1(62b4c6e7db763e9ff2697bbcdb43dc5a56b48c68) ) | |
| 5689 | ||
| 5690 | NO_DELTAT_REGION | |
| 5691 | ||
| 5692 | ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE ) | |
| 5693 | /* Encrypted */ | |
| 5694 | ROM_LOAD32_WORD( "268-c1.bin", 0x0000000, 0x1000000, CRC(802042e8) SHA1(ff028b65f60f0b51b255a380cc47ec19fdc0c0cf) ) /* Plane 0,1 */ | |
| 5695 | ROM_LOAD32_WORD( "268-c2.bin", 0x0000002, 0x1000000, CRC(3b89fb9f) SHA1(cbc0729aae961f683b105ec3e1cda58b3f985abc) ) /* Plane 2,3 */ | |
| 5696 | ROM_LOAD32_WORD( "268-c3.bin", 0x2000000, 0x1000000, CRC(0f3f59e3) SHA1(8cc751dc7d4e94864a9ce3346f23b8f011082fcc) ) /* Plane 0,1 */ | |
| 5697 | ROM_LOAD32_WORD( "268-c4.bin", 0x2000002, 0x1000000, CRC(3ad8435a) SHA1(b333c8993c9b4c4ea59450ad0a3560e0b28056bc) ) /* Plane 2,3 */ | |
| 5698 | ROM_END | |
| 5699 | ||
| 5700 | 5688 | ROM_START( ms5plus ) |
| 5701 | 5689 | ROM_REGION( 0x500000, "main", 0 ) |
| 5702 | 5690 | ROM_LOAD16_WORD_SWAP( "268-p1p.bin", 0x000000, 0x100000, CRC(106b276f) SHA1(0e840df95f3813145e5043573483c7610d2d3e68) ) |
| r3373 | r3374 | |
| 5708 | 5696 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 5709 | 5697 | ROM_LOAD("268-s1p.bin", 0x000000, 0x20000, CRC(21e04432) SHA1(10057a2aa487087f7143d1d69fdad978a6bef0f7) ) |
| 5710 | 5698 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5711 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 5699 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 5712 | 5700 | |
| 5713 | 5701 | /* Correct to use Decrypted Rom? */ |
| 5714 | 5702 | NEO_BIOS_AUDIO_64K( "268-m1_bootleg.bin", CRC(3c0655a7) SHA1(ae839d4c2b87a7aa3dd8e5caddc43eb75ee9b732) ) /* not a 100% match for encrypted version */ |
| r3373 | r3374 | |
| 5732 | 5720 | ROM_LOAD16_BYTE( "268-c8c.bin", 0x3000001, 0x800000, CRC(551d720e) SHA1(ebf69e334fcaba0fda6fd432fd0970283a365d12) ) /* Plane 2,3 */ |
| 5733 | 5721 | ROM_END |
| 5734 | 5722 | |
| 5735 | ROM_START( svcpcb ) /* Encrypted Set, JAMMA PCB */ | |
| 5736 | ROM_REGION( 0x2000000, "main", 0 ) | |
| 5737 | ROM_LOAD16_WORD_SWAP( "269-p1.bin", 0x000000, 0x2000000, CRC(432cfdfc) SHA1(19b40d32188a8bace6d2d570c6cf3d2f1e31e379) ) | |
| 5738 | ||
| 5739 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ | |
| 5740 | ROM_FILL( 0x000000, 0x80000, 0 ) | |
| 5741 | ROM_REGION( 0x20000, "fixedbios", 0 ) | |
| 5742 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) ) | |
| 5743 | ||
| 5744 | ROM_REGION16_BE( 0x80000, "mainbios", 0 ) | |
| 5745 | /* this contains both an ASIA and JAPAN bios, HARDDIP3 on the PCB selects which to use */ | |
| 5746 | ROM_LOAD16_WORD_SWAP( "sp-4x.sp1", 0x00000, 0x80000, CRC(b4590283) SHA1(47047ed5b6062babc0a0bebcc30e4b3f021e115a) ) | |
| 5747 | ||
| 5748 | /* Encrypted */ | |
| 5749 | ROM_REGION( 0x80000, "audiocrypt", 0 ) | |
| 5750 | ROM_LOAD( "269-m1.bin", 0x00000, 0x80000, CRC(f6819d00) SHA1(d3bbe09df502464f104e53501708ac6e2c1832c6) ) | |
| 5751 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) | |
| 5752 | ||
| 5753 | ROM_Y_ZOOM | |
| 5754 | ||
| 5755 | ROM_REGION( 0x1000000, "ym", 0 ) | |
| 5756 | /* Encrypted */ | |
| 5757 | ROM_LOAD( "269-v1.bin", 0x000000, 0x800000, CRC(c659b34c) SHA1(1931e8111ef43946f68699f8707334c96f753a1e) ) | |
| 5758 | ROM_LOAD( "269-v2.bin", 0x800000, 0x800000, CRC(dd903835) SHA1(e58d38950a7a8697bb22a1cc7a371ae6664ae8f9) ) | |
| 5759 | ||
| 5760 | ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE ) | |
| 5761 | /* Encrypted */ | |
| 5762 | ROM_LOAD( "269-c1.bin", 0x0000000, 0x2000000, CRC(1b608f9c) SHA1(4e70ad182da2ca18815bd3936efb04a06ebce01e) ) /* Plane 0,1 */ | |
| 5763 | ROM_LOAD( "269-c2.bin", 0x2000000, 0x2000000, CRC(5a95f294) SHA1(6123cc7b20b494076185d27c2ffea910e124b195) ) /* Plane 0,1 */ | |
| 5764 | ROM_END | |
| 5765 | ||
| 5766 | /* alt PCB version, this one has the same program roms as the MVS set, and different GFX / Sound rom arrangements */ | |
| 5767 | ROM_START( svcpcba ) /* Encrypted Set, JAMMA PCB */ | |
| 5768 | ROM_REGION( 0x800000, "main", 0 ) | |
| 5769 | ROM_LOAD32_WORD_SWAP( "269-p1a.bin", 0x000000, 0x400000, CRC(38e2005e) SHA1(1b902905916a30969282f1399a756e32ff069097) ) | |
| 5770 | ROM_LOAD32_WORD_SWAP( "269-p2a.bin", 0x000002, 0x400000, CRC(6d13797c) SHA1(3cb71a95cea6b006b44cac0f547df88aec0007b7) ) | |
| 5771 | ||
| 5772 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ | |
| 5773 | ROM_FILL( 0x000000, 0x80000, 0 ) | |
| 5774 | ROM_REGION( 0x20000, "fixedbios", 0 ) | |
| 5775 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) ) | |
| 5776 | ||
| 5777 | ROM_REGION16_BE( 0x80000, "mainbios", 0 ) | |
| 5778 | /* this contains both an ASIA and JAPAN bios, HARDDIP3 on the PCB selects which to use */ | |
| 5779 | ROM_LOAD16_WORD_SWAP( "sp-4x.sp1", 0x00000, 0x80000, CRC(b4590283) SHA1(47047ed5b6062babc0a0bebcc30e4b3f021e115a) ) | |
| 5780 | ||
| 5781 | /* Encrypted */ | |
| 5782 | ROM_REGION( 0x80000, "audiocrypt", 0 ) | |
| 5783 | ROM_LOAD( "269-m1.bin", 0x00000, 0x80000, CRC(f6819d00) SHA1(d3bbe09df502464f104e53501708ac6e2c1832c6) ) | |
| 5784 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) | |
| 5785 | ||
| 5786 | ROM_Y_ZOOM | |
| 5787 | ||
| 5788 | ROM_REGION( 0x1000000, "ym", 0 ) | |
| 5789 | /* Encrypted */ | |
| 5790 | ROM_LOAD( "269-v1a.bin", 0x000000, 0x1000000, CRC(a6af4753) SHA1(ec4f61a526b707a7faec4653b773beb3bf3a17ba) ) | |
| 5791 | ||
| 5792 | ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE ) | |
| 5793 | /* Encrypted */ | |
| 5794 | ROM_LOAD32_WORD( "269-c1a.bin", 0x0000000, 0x1000000, CRC(e64d2b0c) SHA1(0714198c400e5c273181e4c6f906b49e35fef75d) ) /* Plane 0,1 */ | |
| 5795 | ROM_LOAD32_WORD( "269-c2a.bin", 0x0000002, 0x1000000, CRC(249089c2) SHA1(1c0ca19e330efe1a74b2d35a1a9a8d61481e16a9) ) /* Plane 2,3 */ | |
| 5796 | ROM_LOAD32_WORD( "269-c3a.bin", 0x2000000, 0x1000000, CRC(d32f2fab) SHA1(273d58cb3c9075075b1ca39a3b247a2cd545fbe7) ) /* Plane 0,1 */ | |
| 5797 | ROM_LOAD32_WORD( "269-c4a.bin", 0x2000002, 0x1000000, CRC(bf77e878) SHA1(e6e76f8eed0d04ee9ad39bf38ce305930b10e2c1) ) /* Plane 2,3 */ | |
| 5798 | ROM_END | |
| 5799 | ||
| 5800 | 5723 | ROM_START( svc ) /* Encrypted Set */ /* MVS AND AES VERSION */ |
| 5801 | 5724 | ROM_REGION( 0x800000, "main", 0 ) |
| 5802 | 5725 | ROM_LOAD32_WORD_SWAP( "269-p1.bin", 0x000000, 0x400000, CRC(38e2005e) SHA1(1b902905916a30969282f1399a756e32ff069097) ) |
| r3373 | r3374 | |
| 5808 | 5731 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ |
| 5809 | 5732 | ROM_FILL( 0x000000, 0x80000, 0 ) |
| 5810 | 5733 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5811 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 5734 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 5812 | 5735 | |
| 5813 | 5736 | /* Encrypted */ |
| 5814 | 5737 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "269-m1.bin", CRC(f6819d00) SHA1(d3bbe09df502464f104e53501708ac6e2c1832c6) ) |
| r3373 | r3374 | |
| 5838 | 5761 | ROM_LOAD( "svc-s1.bin", 0x10000, 0x10000, CRC(70b44df1) SHA1(52ae3f264d7b33e94e770e6b2d0cf35a64e7dda4) ) |
| 5839 | 5762 | ROM_CONTINUE( 0x00000, 0x10000 ) |
| 5840 | 5763 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5841 | ROM_LOAD( "sfix.sfx", | |
| 5764 | ROM_LOAD( "sfix.sfix", | |
| 5842 | 5765 | |
| 5843 | 5766 | NEOGEO_BIOS |
| 5844 | 5767 | |
| 5845 | 5768 | ROM_REGION( 0x20000, "audiobios", 0 ) |
| 5846 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 5769 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 5847 | 5770 | |
| 5848 | 5771 | ROM_REGION( 0x50000, "audio", 0 ) |
| 5849 | 5772 | ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) ) |
| r3373 | r3374 | |
| 5882 | 5805 | NEOGEO_BIOS |
| 5883 | 5806 | |
| 5884 | 5807 | ROM_REGION( 0x20000, "audiobios", 0 ) |
| 5885 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 5808 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 5886 | 5809 | |
| 5887 | 5810 | ROM_REGION( 0x50000, "audio", 0 ) |
| 5888 | 5811 | ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) ) |
| r3373 | r3374 | |
| 5917 | 5840 | ROM_LOAD( "svc-s1pl.bin", 0x10000, 0x10000, CRC(ca3c735e) SHA1(aebd15253c90432a2e0a4c40f37110c1e2176ee4) ) |
| 5918 | 5841 | ROM_CONTINUE( 0x00000, 0x10000 ) |
| 5919 | 5842 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 5920 | ROM_LOAD( "sfix.sfx", | |
| 5843 | ROM_LOAD( "sfix.sfix", | |
| 5921 | 5844 | |
| 5922 | 5845 | NEOGEO_BIOS |
| 5923 | 5846 | |
| 5924 | 5847 | ROM_REGION( 0x20000, "audiobios", 0 ) |
| 5925 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 5848 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 5926 | 5849 | |
| 5927 | 5850 | ROM_REGION( 0x50000, "audio", 0 ) |
| 5928 | 5851 | ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) ) |
| r3373 | r3374 | |
| 5960 | 5883 | NEOGEO_BIOS |
| 5961 | 5884 | |
| 5962 | 5885 | ROM_REGION( 0x20000, "audiobios", 0 ) |
| 5963 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 5886 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 5964 | 5887 | |
| 5965 | 5888 | ROM_REGION( 0x50000, "audio", 0 ) |
| 5966 | 5889 | ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) ) |
| r3373 | r3374 | |
| 5994 | 5917 | ROM_Y_ZOOM |
| 5995 | 5918 | |
| 5996 | 5919 | /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */ |
| 5997 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ | |
| 5998 | ROM_FILL( 0x000000, 0x80000, 0 ) | |
| 5920 | ROM_REGION( 0x20000, "fixed", 0 ) | |
| 5921 | ROM_FILL( 0x000000, 0x20000, 0 ) | |
| 5999 | 5922 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6000 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 5923 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 6001 | 5924 | |
| 6002 | 5925 | /* Encrypted */ |
| 6003 | 5926 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "270-m1.bin", CRC(49c9901a) SHA1(2623e9765a0eba58fee2de72851e9dc502344a3d) ) |
| r3373 | r3374 | |
| 6021 | 5944 | ROM_LOAD16_BYTE( "270-c8.bin", 0x3000001, 0x800000, CRC(02c530a6) SHA1(7a3fafa6075506c6ef78cc4ec2cb72118ec83cb9) ) /* Plane 2,3 */ |
| 6022 | 5945 | ROM_END |
| 6023 | 5946 | |
| 6024 | ROM_START( samsho5h ) /* Encrypted Set, Alternate Set */ | |
| 5947 | ROM_START( samsho5h ) /* Encrypted Set, Alternate Set */ /* AES VERSION */ | |
| 6025 | 5948 | ROM_REGION( 0x800000, "main", 0 ) |
| 6026 | 5949 | ROM_LOAD16_WORD_SWAP( "270-p1c.bin", 0x000000, 0x400000, CRC(bf956089) SHA1(c538289069bf338b9fa7ecc5c9143763dbb776a8) ) |
| 6027 | 5950 | ROM_LOAD16_WORD_SWAP( "270-p2c.bin", 0x400000, 0x400000, CRC(943a6b1d) SHA1(12bd02fc197456da6ee86f066086094cef0f4bf9) ) |
| r3373 | r3374 | |
| 6029 | 5952 | ROM_Y_ZOOM |
| 6030 | 5953 | |
| 6031 | 5954 | /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */ |
| 6032 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ | |
| 6033 | ROM_FILL( 0x000000, 0x80000, 0 ) | |
| 5955 | ROM_REGION( 0x20000, "fixed", 0 ) | |
| 5956 | ROM_FILL( 0x000000, 0x20000, 0 ) | |
| 6034 | 5957 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6035 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 5958 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 6036 | 5959 | |
| 6037 | 5960 | /* Encrypted */ |
| 6038 | 5961 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "270-m1.bin", CRC(49c9901a) SHA1(2623e9765a0eba58fee2de72851e9dc502344a3d) ) |
| r3373 | r3374 | |
| 6058 | 5981 | |
| 6059 | 5982 | ROM_START( samsho5b ) /* bootleg */ |
| 6060 | 5983 | ROM_REGION( 0x800000, "main", 0 ) |
| 6061 | ROM_LOAD16_WORD_SWAP( "270-p2bl.bin", 0x000000, 0x400000, CRC(5023067f) SHA1(b1d682fa7d158f19664356a919da6572e8cfeee0) ) | |
| 6062 | ROM_LOAD16_WORD_SWAP( "270-p1bl.bin", 0x400000, 0x400000, CRC(b6cbe386) SHA1(99c2407361116c2b2c5fe72df53e05c5f99163c1) ) | |
| 5984 | ROM_LOAD16_WORD_SWAP( "ssv-p2.bin", 0x000000, 0x400000, CRC(5023067f) SHA1(b1d682fa7d158f19664356a919da6572e8cfeee0) ) | |
| 5985 | ROM_LOAD16_WORD_SWAP( "ssv-p1.bin", 0x400000, 0x400000, CRC(b6cbe386) SHA1(99c2407361116c2b2c5fe72df53e05c5f99163c1) ) | |
| 6063 | 5986 | |
| 6064 | | |
| 5987 | NEO | |
| 6065 | 5988 | |
| 6066 | /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */ | |
| 6067 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ | |
| 6068 | ROM_FILL( 0x000000, 0x80000, 0 ) | |
| 6069 | ROM_REGION( 0x20000, "fixedbios", 0 ) | |
| 6070 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) ) | |
| 5989 | NEO_BIOS_AUDIO_128K( "ssv-m1.bin", CRC(18114fb1) SHA1(016dc2f328340f3637a9bff373a20973df29f6b8) ) | |
| 6071 | 5990 | |
| 6072 | /* 0xf800 area doesn't match encrypted rom */ | |
| 6073 | NEO_BIOS_AUDIO_256K( "270-m1_bootleg.bin", CRC(e94a5e2b) SHA1(53ef2ad6583060af69fdde73576e09ba88affa55) ) /* not a 100% match for encrypted version */ | |
| 6074 | ||
| 6075 | /* should this set use decrypted roms? */ | |
| 6076 | ||
| 6077 | 5991 | ROM_REGION( 0x1000000, "ym", 0 ) |
| 6078 | /* Encrypted */ | |
| 6079 | ROM_LOAD( "270-v1.bin", 0x000000, 0x800000, CRC(62e434eb) SHA1(1985f5e88f8e866f9683b6cea901aa28c04b80bf) ) | |
| 6080 | ROM_LOAD( "270-v2.bin", 0x800000, 0x800000, CRC(180f3c9a) SHA1(6d7dc2605ead6e78704efa127e7e0dfe621e2c54) ) | |
| 5992 | ROM_LOAD( "ssv-v1.bin", 0x000000, 0x400000, CRC(a3609761) SHA1(6dce1dbfd228c739b3716ae1cf08fd7f925d8650) ) | |
| 5993 | ROM_LOAD( "ssv-v2.bin", 0x400000, 0x400000, CRC(cbd6ebd5) SHA1(00211be3fa32035b0947ac65920ea8acae7bfae2) ) | |
| 5994 | ROM_LOAD( "ssv-v3.bin", 0x800000, 0x400000, CRC(6f1c2703) SHA1(8015df3d788cb7926ebbcda64a96964fe102ba27) ) | |
| 5995 | ROM_LOAD( "ssv-v4.bin", 0xc00000, 0x400000, CRC(5020c055) SHA1(bd1e68d1b0a47b0e2b365159e210048f8b22823a) ) | |
| 6081 | 5996 | |
| 6082 | 5997 | NO_DELTAT_REGION |
| 6083 | 5998 | |
| 6084 | 5999 | ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE ) |
| 6085 | /* Encrypted */ | |
| 6086 | ROM_LOAD16_BYTE( "270-c1.bin", 0x0000000, 0x800000, CRC(14ffffac) SHA1(2ccebfdd0c7907679ae95bf6eca85b8d322441e2) ) /* Plane 0,1 */ | |
| 6087 | ROM_LOAD16_BYTE( "270-c2.bin", 0x0000001, 0x800000, CRC(401f7299) SHA1(94e48cdf1682b1250f53c59f3f71d995e928d17b) ) /* Plane 2,3 */ | |
| 6088 | ROM_LOAD16_BYTE( "270-c3.bin", 0x1000000, 0x800000, CRC(838f0260) SHA1(d5c8d3c6e7221d04e0b20882a847752e5ba95635) ) /* Plane 0,1 */ | |
| 6089 | ROM_LOAD16_BYTE( "270-c4.bin", 0x1000001, 0x800000, CRC(041560a5) SHA1(d165e533699f15b1e079c82f97db3542b3a7dd66) ) /* Plane 2,3 */ | |
| 6090 | ROM_LOAD16_BYTE( "270-c5.bin", 0x2000000, 0x800000, CRC(bd30b52d) SHA1(9f8282e684415b4045218cf764ef7d75a70e3240) ) /* Plane 0,1 */ | |
| 6091 | ROM_LOAD16_BYTE( "270-c6.bin", 0x2000001, 0x800000, CRC(86a69c70) SHA1(526732cdb408cf680af9da39057bce6a4dfb5e13) ) /* Plane 2,3 */ | |
| 6092 | ROM_LOAD16_BYTE( "270-c7.bin", 0x3000000, 0x800000, CRC(d28fbc3c) SHA1(a82a6ba6760fad14d9309f9147cb7d80bd6f70fc) ) /* Plane 0,1 */ | |
| 6093 | ROM_LOAD16_BYTE( "270-c8.bin", 0x3000001, 0x800000, CRC(02c530a6) SHA1(7a3fafa6075506c6ef78cc4ec2cb72118ec83cb9) ) /* Plane 2,3 */ | |
| 6000 | ROM_LOAD16_BYTE( "ssv-c1.bin", 0x0000000, 0x1000000, CRC(9c564a01) SHA1(99dc8900fd8f56ae04fff72b34ddcaa8abe4c1be) ) /* Plane 0,1 */ | |
| 6001 | ROM_LOAD16_BYTE( "ssv-c2.bin", 0x0000001, 0x1000000, CRC(4b73b8da) SHA1(a8b626de74cf57bbd8c222e8e24c953c9e8680f4) ) /* Plane 0,1 */ | |
| 6002 | ROM_LOAD16_BYTE( "ssv-c3.bin", 0x2000000, 0x1000000, CRC(029f9bb5) SHA1(6296c879aa0bbd22383ceeeac0326805cbc8b4ec) ) /* Plane 2,3 */ | |
| 6003 | ROM_LOAD16_BYTE( "ssv-c4.bin", 0x2000001, 0x1000000, CRC(75722430) SHA1(30594c30a167e75463670249df7744755e39e75b) ) /* Plane 2,3 */ | |
| 6094 | 6004 | ROM_END |
| 6095 | 6005 | |
| 6096 | ROM_START( kf2 | |
| 6006 | ROM_START( kof2003 | |
| 6097 | 6007 | ROM_REGION( 0x900000, "main", 0 ) |
| 6098 | ROM_LOAD32_WORD_SWAP( "271-p1.bin", 0x000000, 0x400000, CRC(b9da070c) SHA1(1a26325af142a4dd221c336061761468598c4634) ) | |
| 6099 | ROM_LOAD32_WORD_SWAP( "271-p2.bin", 0x000002, 0x400000, CRC(da3118c4) SHA1(582e4f44f03276adecb7b2848d3b96bf6da57f1e) ) | |
| 6100 | ROM_LOAD16_WORD_SWAP( "271-p3.bin", 0x800000, 0x100000, CRC(5cefd0d2) SHA1(cddc3164629fed4b6f715e12b109ad35d1009355) ) | |
| 6008 | ROM_LOAD32_WORD_SWAP( "271-p1c.bin", 0x000000, 0x400000, CRC(530ecc14) SHA1(812cf7e9902af3f5e9e330b7c05c2171b139ad2b) ) | |
| 6009 | ROM_LOAD32_WORD_SWAP( "271-p2c.bin", 0x000002, 0x400000, CRC(fd568da9) SHA1(46364906a1e81dc251117e91a1a7b43af1373ada) ) | |
| 6010 | ROM_LOAD16_WORD_SWAP( "271-p3c.bin", 0x800000, 0x100000, CRC(aec5b4a9) SHA1(74087f785590eda5898ce146029818f86ced42b6) ) // Encrypted | |
| 6101 | 6011 | |
| 6102 | ROM_REGION( 0x100000, "fixed", 0 ) /* larger char set */ | |
| 6103 | ROM_FILL( 0x000000, 0x100000, 0 ) | |
| 6012 | ROM_Y_ZOOM | |
| 6013 | ||
| 6014 | /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */ | |
| 6015 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ | |
| 6016 | ROM_FILL( 0x000000, 0x80000, 0 ) | |
| 6104 | 6017 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6105 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 6018 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 6106 | 6019 | |
| 6107 | ROM_REGION16_BE( 0x80000, "mainbios", 0 ) | |
| 6108 | ROM_LOAD16_WORD_SWAP( "271-bios.bin", 0x00000, 0x080000, CRC(148dd727) SHA1(2cf592a16c7157de02a989675d47965f2b3a44dd) ) // encrypted | |
| 6109 | ||
| 6110 | 6020 | /* Encrypted */ |
| 6111 | ROM_REGION( 0x80000, "audiocrypt", 0 ) | |
| 6112 | ROM_LOAD( "271-m1.bin", 0x00000, 0x80000, CRC(d6bcf2bc) SHA1(df78bc95990eb8e8f3638dde6e1876354df7fe84) ) | |
| 6113 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) | |
| 6021 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "271-m1c.bin", CRC(f5515629) SHA1(7516bf1b0207a3c8d41dc30c478f8d8b1f71304b) ) | |
| 6114 | 6022 | |
| 6115 | ROM_Y_ZOOM | |
| 6116 | ||
| 6117 | 6023 | ROM_REGION( 0x1000000, "ym", 0 ) |
| 6118 | 6024 | /* Encrypted */ |
| 6119 | ROM_LOAD( "271-v1.bin", 0x000000, 0x1000000, CRC(1d96154b) SHA1(1d4e262b0d30cee79a4edc83bb9706023c736668) ) | |
| 6025 | ROM_LOAD( "271-v1c.bin", 0x000000, 0x800000, CRC(ffa3f8c7) SHA1(7cf4a933973ca23b7f87c81151d8659e6ec4bd20) ) | |
| 6026 | ROM_LOAD( "271-v2c.bin", 0x800000, 0x800000, CRC(5382c7d1) SHA1(1bf999705eda80ba1e7b0d6bdd010d9bfb18bd76) ) | |
| 6120 | 6027 | |
| 6121 | 6028 | NO_DELTAT_REGION |
| 6122 | 6029 | |
| 6123 | ROM_REGION( 0x | |
| 6030 | ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE ) | |
| 6124 | 6031 | /* Encrypted */ |
| 6125 | ROM_LOAD32_WORD( "271-c1.bin", 0x0000000, 0x1000000, CRC(f5ebb327) SHA1(e4f799a54b09adcca13b1b0cf95971a1f4291b61) ) /* Plane 0,1 */ | |
| 6126 | ROM_LOAD32_WORD( "271-c2.bin", 0x0000002, 0x1000000, CRC(2be21620) SHA1(872c658f53bbc558e90f18d5db9cbaa82e748a6a) ) /* Plane 2,3 */ | |
| 6127 | ROM_LOAD32_WORD( "271-c3.bin", 0x2000000, 0x1000000, CRC(ddded4ff) SHA1(ff7b356125bc9e6637b164f5e81b13eabeb8d804) ) /* Plane 0,1 */ | |
| 6128 | ROM_LOAD32_WORD( "271-c4.bin", 0x2000002, 0x1000000, CRC(d85521e6) SHA1(62278fa8690972ed32aca07a4f7f97e7203d9f3a) ) /* Plane 2,3 */ | |
| 6129 | ROM_LOAD32_WORD( "271-c5.bin", 0x4000000, 0x1000000, CRC(18aa3540) SHA1(15e0a8c4e0927b1f7eb9bee8f532acea6818d5eb) ) /* Plane 0,1 */ | |
| 6130 | ROM_LOAD32_WORD( "271-c6.bin", 0x4000002, 0x1000000, CRC(1c40de87) SHA1(8d6425aed43ff6a96c88194e203df6a783286373) ) /* Plane 2,3 */ | |
| 6032 | ROM_LOAD16_BYTE( "271-c1c.bin", 0x0000000, 0x800000, CRC(b1dc25d0) SHA1(50adc3c60d5b4b3abd10a49db2267306c6dbd772) ) /* Plane 0,1 */ | |
| 6033 | ROM_LOAD16_BYTE( "271-c2c.bin", 0x0000001, 0x800000, CRC(d5362437) SHA1(66db36522dc09106388c707252df9fe1c88b4856) ) /* Plane 2,3 */ | |
| 6034 | ROM_LOAD16_BYTE( "271-c3c.bin", 0x1000000, 0x800000, CRC(0a1fbeab) SHA1(9fe30d36ba98d00fda010832ff2f27783dd577c1) ) /* Plane 0,1 */ | |
| 6035 | ROM_LOAD16_BYTE( "271-c4c.bin", 0x1000001, 0x800000, CRC(87b19a0c) SHA1(b72a8e7d9124ce859b5149bb4381ba481c161ea5) ) /* Plane 2,3 */ | |
| 6036 | ROM_LOAD16_BYTE( "271-c5c.bin", 0x2000000, 0x800000, CRC(704ea371) SHA1(e75b80422f0d72eac826f8ffadf79efeccaab124) ) /* Plane 0,1 */ | |
| 6037 | ROM_LOAD16_BYTE( "271-c6c.bin", 0x2000001, 0x800000, CRC(20a1164c) SHA1(c9843b37612a16fc95f6851793b1cfb5d49d811d) ) /* Plane 2,3 */ | |
| 6038 | ROM_LOAD16_BYTE( "271-c7c.bin", 0x3000000, 0x800000, CRC(189aba7f) SHA1(7152195a57ad36b28290810fe87ed8c206262ba9) ) /* Plane 0,1 */ | |
| 6039 | ROM_LOAD16_BYTE( "271-c8c.bin", 0x3000001, 0x800000, CRC(20ec4fdc) SHA1(deb5f7ec5a090e419b9d1a6a74877bee081198e2) ) /* Plane 2,3 */ | |
| 6131 | 6040 | ROM_END |
| 6132 | 6041 | |
| 6133 | ROM_START( kof2003 ) /* Encrypted Code + Sound + GFX Roms | |
| 6042 | ROM_START( kof2003h ) /* Encrypted Code + Sound + GFX Roms | |
| 6134 | 6043 | ROM_REGION( 0x900000, "main", 0 ) |
| 6135 | ROM_LOAD32_WORD_SWAP( "271-p1c.bin", 0x000000, 0x400000, CRC(530ecc14) SHA1(812cf7e9902af3f5e9e330b7c05c2171b139ad2b) ) | |
| 6136 | ROM_LOAD32_WORD_SWAP( "271-p2c.bin", 0x000002, 0x400000, CRC(fd568da9) SHA1(46364906a1e81dc251117e91a1a7b43af1373ada) ) | |
| 6137 | ROM_LOAD16_WORD_SWAP( "271-p3c.bin", 0x800000, 0x100000, CRC(aec5b4a9) SHA1(74087f785590eda5898ce146029818f86ced42b6) ) // Encrypted | |
| 6044 | ROM_LOAD32_WORD_SWAP( "271-p1k.bin", 0x000000, 0x400000, CRC(d0d0ae3e) SHA1(538d054ac50c91694fbbfefcce548b063713e14e) ) | |
| 6045 | ROM_LOAD32_WORD_SWAP( "271-p2k.bin", 0x000002, 0x400000, CRC(fb3f79d9) SHA1(f253d10e732d6e23ae82d74ac9269d21f69ddb4d) ) | |
| 6046 | ROM_LOAD16_WORD_SWAP( "271-p3k.bin", 0x800000, 0x100000, CRC(232702ad) SHA1(6045046027dac1cbd4cbd14b5c1ece522bc6197f) ) // Encrypted | |
| 6138 | 6047 | |
| 6139 | 6048 | ROM_Y_ZOOM |
| 6140 | 6049 | |
| r3373 | r3374 | |
| 6142 | 6051 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ |
| 6143 | 6052 | ROM_FILL( 0x000000, 0x80000, 0 ) |
| 6144 | 6053 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6145 | ROM_LOAD( "sfix.sfx", | |
| 6054 | ROM_LOAD( "sfix.sfix", | |
| 6146 | 6055 | |
| 6147 | 6056 | /* Encrypted */ |
| 6148 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "271-m1 | |
| 6057 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "271-m1k.bin", CRC(48d | |
| 6149 | 6058 | |
| 6150 | 6059 | ROM_REGION( 0x1000000, "ym", 0 ) |
| 6151 | 6060 | /* Encrypted */ |
| r3373 | r3374 | |
| 6156 | 6065 | |
| 6157 | 6066 | ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE ) |
| 6158 | 6067 | /* Encrypted */ |
| 6159 | ROM_LOAD16_BYTE( "271-c1c.bin", 0x0000000, 0x800000, CRC(b1dc25d0) SHA1(50adc3c60d5b4b3abd10a49db2267306c6dbd772) ) /* Plane 0,1 */ | |
| 6160 | ROM_LOAD16_BYTE( "271-c2c.bin", 0x0000001, 0x800000, CRC(d5362437) SHA1(66db36522dc09106388c707252df9fe1c88b4856) ) /* Plane 2,3 */ | |
| 6161 | ROM_LOAD16_BYTE( "271-c3c.bin", 0x1000000, 0x800000, CRC(0a1fbeab) SHA1(9fe30d36ba98d00fda010832ff2f27783dd577c1) ) /* Plane 0,1 */ | |
| 6162 | ROM_LOAD16_BYTE( "271-c4c.bin", 0x1000001, 0x800000, CRC(87b19a0c) SHA1(b72a8e7d9124ce859b5149bb4381ba481c161ea5) ) /* Plane 2,3 */ | |
| 6163 | ROM_LOAD16_BYTE( "271-c5c.bin", 0x2000000, 0x800000, CRC(704ea371) SHA1(e75b80422f0d72eac826f8ffadf79efeccaab124) ) /* Plane 0,1 */ | |
| 6164 | ROM_LOAD16_BYTE( "271-c6c.bin", 0x2000001, 0x800000, CRC(20a1164c) SHA1(c9843b37612a16fc95f6851793b1cfb5d49d811d) ) /* Plane 2,3 */ | |
| 6165 | ROM_LOAD16_BYTE( "271-c7c.bin", 0x3000000, 0x800000, CRC(189aba7f) SHA1(7152195a57ad36b28290810fe87ed8c206262ba9) ) /* Plane 0,1 */ | |
| 6166 | ROM_LOAD16_BYTE( "271-c8c.bin", 0x3000001, 0x800000, CRC(20ec4fdc) SHA1(deb5f7ec5a090e419b9d1a6a74877bee081198e2) ) /* Plane 2,3 */ | |
| 6068 | ROM_LOAD16_BYTE( "271-c1k.bin", 0x0000000, 0x800000, CRC(efb9dd24) SHA1(1c6fe10fdbfc3306c3b7321c731f28ffdbfb15b8) ) /* Plane 0,1 */ | |
| 6069 | ROM_LOAD16_BYTE( "271-c2k.bin", 0x0000001, 0x800000, CRC(3fb90447) SHA1(04d196de7c54c77bc75eba56d3060d46efc2d406) ) /* Plane 2,3 */ | |
| 6070 | ROM_LOAD16_BYTE( "271-c3k.bin", 0x1000000, 0x800000, CRC(27950f28) SHA1(924f4de61c86b9efde6f1104b986886f1117055d) ) /* Plane 0,1 */ | |
| 6071 | ROM_LOAD16_BYTE( "271-c4k.bin", 0x1000001, 0x800000, CRC(735177f8) SHA1(c95da1bc256995a7f44c9cc3312879ab6cbc15d6) ) /* Plane 2,3 */ | |
| 6072 | ROM_LOAD16_BYTE( "271-c5k.bin", 0x2000000, 0x800000, CRC(a51b7c0f) SHA1(53dcf692b35b8d32abe5962ac799b8d641f04710) ) /* Plane 0,1 */ | |
| 6073 | ROM_LOAD16_BYTE( "271-c6k.bin", 0x2000001, 0x800000, CRC(d5cae4e0) SHA1(248cd9eaac7a04d6b5d80c7534de90b057d566d7) ) /* Plane 2,3 */ | |
| 6074 | ROM_LOAD16_BYTE( "271-c7k.bin", 0x3000000, 0x800000, CRC(e65ae2d0) SHA1(39744e10697d7ac539ecfcfa597e75597f321955) ) /* Plane 0,1 */ | |
| 6075 | ROM_LOAD16_BYTE( "271-c8k.bin", 0x3000001, 0x800000, CRC(312f528c) SHA1(b4ad75f54f730ada6cb00112b74022250f055725) ) /* Plane 2,3 */ | |
| 6167 | 6076 | ROM_END |
| 6168 | 6077 | |
| 6169 | 6078 | ROM_START( kf2k3bl ) /* bootleg */ |
| r3373 | r3374 | |
| 6294 | 6203 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 6295 | 6204 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 6296 | 6205 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6297 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 6206 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 6298 | 6207 | |
| 6299 | 6208 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "272-m1.bin", CRC(adeebf40) SHA1(8cbd63dda3fff4de38060405bf70cd9308c9e66e) ) |
| 6300 | 6209 | |
| r3373 | r3374 | |
| 6328 | 6237 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 6329 | 6238 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 6330 | 6239 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6331 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 6240 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 6332 | 6241 | |
| 6333 | 6242 | /* Encrypted */ |
| 6334 | 6243 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "272-m1.bin", CRC(adeebf40) SHA1(8cbd63dda3fff4de38060405bf70cd9308c9e66e) ) |
| r3373 | r3374 | |
| 6363 | 6272 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 6364 | 6273 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 6365 | 6274 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6366 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 6275 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 6367 | 6276 | |
| 6368 | 6277 | /* Encrypted */ |
| 6369 | 6278 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "272-m1.bin", CRC(adeebf40) SHA1(8cbd63dda3fff4de38060405bf70cd9308c9e66e) ) |
| r3373 | r3374 | |
| 6398 | 6307 | ROM_REGION( 0x20000, "fixed", 0 ) |
| 6399 | 6308 | ROM_FILL( 0x000000, 0x20000, 0 ) |
| 6400 | 6309 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6401 | ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC( | |
| 6310 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c | |
| 6402 | 6311 | |
| 6403 | 6312 | /* Encrypted */ |
| 6404 | 6313 | NEO_BIOS_AUDIO_ENCRYPTED_512K( "jgp-m1.bin", CRC(d163c690) SHA1(1dfd04d20c5985037f07cd01000d0b04f3a8f4f4) ) |
| r3373 | r3374 | |
| 6448 | 6357 | ROM_LOAD16_BYTE( "vl_c2.rom", 0x000001, 0x80000, CRC(efe9b33e) SHA1(910c651aadce9bf59e51c338ceef62287756d2e8) ) /* Plane 2,3 */ |
| 6449 | 6358 | ROM_END |
| 6450 | 6359 | |
| 6360 | /* Jamma PCB sets */ | |
| 6361 | ||
| 6362 | /****************************************************************************** | |
| 6363 | The following Jamma PCB boards are known: | |
| 6364 | ||
| 6365 | SNK vs. CAPCOM SVC CHAOS (svcpcb) | |
| 6366 | NEO-MVH MVO 2003.6.5 | |
| 6367 | ||
| 6368 | SNK vs. CAPCOM SVC CHAOS (svcpcba) | |
| 6369 | NEO-MVH MVOB 2003.7.9 | |
| 6370 | ||
| 6371 | Metal Slug 5 | |
| 6372 | NEO-MVH MVOBR 2003.8.4 | |
| 6373 | ||
| 6374 | The King of Fighters 2003 | |
| 6375 | NEO-MVH MVOC 2003.11.3 | |
| 6376 | ******************************************************************************/ | |
| 6377 | ||
| 6378 | ||
| 6379 | /* comlete redump required */ | |
| 6380 | ROM_START( ms5pcb ) /* Encrypted Set */ | |
| 6381 | ROM_REGION( 0x800000, "main", 0 ) | |
| 6382 | ROM_LOAD32_WORD_SWAP( "268-p1r.bin", 0x000000, 0x400000, NO_DUMP ) | |
| 6383 | ROM_LOAD32_WORD_SWAP( "268-p2r.bin", 0x000002, 0x400000, NO_DUMP ) | |
| 6384 | ||
| 6385 | /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */ | |
| 6386 | ROM_REGION( 0x20000, "fixed", 0 ) | |
| 6387 | ROM_FILL( 0x000000, 0x20000, 0 ) | |
| 6388 | ROM_REGION( 0x20000, "fixedbios", 0 ) | |
| 6389 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) ) | |
| 6390 | ||
| 6391 | ROM_REGION16_BE( 0x80000, "mainbios", 0 ) | |
| 6392 | /* this contains both an ASIA and JAPAN bios, HARDDIP3 on the PCB selects which to use */ | |
| 6393 | ROM_LOAD16_WORD_SWAP( "sp-4x.sp1", 0x00000, 0x80000, CRC(b4590283) SHA1(47047ed5b6062babc0a0bebcc30e4b3f021e115a) ) | |
| 6394 | ||
| 6395 | /* Encrypted */ | |
| 6396 | ROM_REGION( 0x80000, "audiocrypt", 0 ) | |
| 6397 | ROM_LOAD( "268-m1.bin", 0x00000, 0x80000, CRC(4a5a6e0e) SHA1(df0f660f2465e1db7be5adfcaf5e88ad61a74a42) ) | |
| 6398 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) | |
| 6399 | ||
| 6400 | /* Encrypted */ | |
| 6401 | ||
| 6402 | ROM_Y_ZOOM | |
| 6403 | ||
| 6404 | ROM_REGION( 0x1000000, "ym", 0 ) | |
| 6405 | /* Encrypted */ | |
| 6406 | ROM_LOAD( "268-v1.bin", 0x000000, 0x1000000, CRC(8458afe5) SHA1(62b4c6e7db763e9ff2697bbcdb43dc5a56b48c68) ) | |
| 6407 | ||
| 6408 | NO_DELTAT_REGION | |
| 6409 | ||
| 6410 | ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE ) | |
| 6411 | /* Encrypted */ | |
| 6412 | ROM_LOAD32_WORD( "268-c1.bin", 0x0000000, 0x1000000, CRC(802042e8) SHA1(ff028b65f60f0b51b255a380cc47ec19fdc0c0cf) ) /* Plane 0,1 */ | |
| 6413 | ROM_LOAD32_WORD( "268-c2.bin", 0x0000002, 0x1000000, CRC(3b89fb9f) SHA1(cbc0729aae961f683b105ec3e1cda58b3f985abc) ) /* Plane 2,3 */ | |
| 6414 | ROM_LOAD32_WORD( "268-c3.bin", 0x2000000, 0x1000000, CRC(0f3f59e3) SHA1(8cc751dc7d4e94864a9ce3346f23b8f011082fcc) ) /* Plane 0,1 */ | |
| 6415 | ROM_LOAD32_WORD( "268-c4.bin", 0x2000002, 0x1000000, CRC(3ad8435a) SHA1(b333c8993c9b4c4ea59450ad0a3560e0b28056bc) ) /* Plane 2,3 */ | |
| 6416 | ROM_END | |
| 6417 | ||
| 6418 | ROM_START( svcpcb ) /* Encrypted Set, JAMMA PCB */ | |
| 6419 | ROM_REGION( 0x2000000, "main", 0 ) | |
| 6420 | ROM_LOAD16_WORD_SWAP( "269-p1.bin", 0x000000, 0x2000000, CRC(432cfdfc) SHA1(19b40d32188a8bace6d2d570c6cf3d2f1e31e379) ) | |
| 6421 | ||
| 6422 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ | |
| 6423 | ROM_FILL( 0x000000, 0x80000, 0 ) | |
| 6424 | ROM_REGION( 0x20000, "fixedbios", 0 ) | |
| 6425 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) ) | |
| 6426 | ||
| 6427 | ROM_REGION16_BE( 0x80000, "mainbios", 0 ) | |
| 6428 | /* this contains both an ASIA and JAPAN bios, HARDDIP3 on the PCB selects which to use */ | |
| 6429 | ROM_LOAD16_WORD_SWAP( "sp-4x.sp1", 0x00000, 0x80000, CRC(b4590283) SHA1(47047ed5b6062babc0a0bebcc30e4b3f021e115a) ) | |
| 6430 | ||
| 6431 | /* Encrypted */ | |
| 6432 | ROM_REGION( 0x80000, "audiocrypt", 0 ) | |
| 6433 | ROM_LOAD( "269-m1.bin", 0x00000, 0x80000, CRC(f6819d00) SHA1(d3bbe09df502464f104e53501708ac6e2c1832c6) ) | |
| 6434 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) | |
| 6435 | ||
| 6436 | ROM_Y_ZOOM | |
| 6437 | ||
| 6438 | ROM_REGION( 0x1000000, "ym", 0 ) | |
| 6439 | /* Encrypted */ | |
| 6440 | ROM_LOAD( "269-v1.bin", 0x000000, 0x800000, CRC(c659b34c) SHA1(1931e8111ef43946f68699f8707334c96f753a1e) ) | |
| 6441 | ROM_LOAD( "269-v2.bin", 0x800000, 0x800000, CRC(dd903835) SHA1(e58d38950a7a8697bb22a1cc7a371ae6664ae8f9) ) | |
| 6442 | ||
| 6443 | ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE ) | |
| 6444 | /* Encrypted */ | |
| 6445 | ROM_LOAD( "269-c1.bin", 0x0000000, 0x2000000, CRC(1b608f9c) SHA1(4e70ad182da2ca18815bd3936efb04a06ebce01e) ) /* Plane 0,1 */ | |
| 6446 | ROM_LOAD( "269-c2.bin", 0x2000000, 0x2000000, CRC(5a95f294) SHA1(6123cc7b20b494076185d27c2ffea910e124b195) ) /* Plane 0,1 */ | |
| 6447 | ROM_END | |
| 6448 | ||
| 6449 | /* alt PCB version, this one has the same program roms as the MVS set, and different GFX / Sound rom arrangements */ | |
| 6450 | ROM_START( svcpcba ) /* Encrypted Set, JAMMA PCB */ | |
| 6451 | ROM_REGION( 0x800000, "main", 0 ) | |
| 6452 | ROM_LOAD32_WORD_SWAP( "269-p1a.bin", 0x000000, 0x400000, CRC(38e2005e) SHA1(1b902905916a30969282f1399a756e32ff069097) ) | |
| 6453 | ROM_LOAD32_WORD_SWAP( "269-p2a.bin", 0x000002, 0x400000, CRC(6d13797c) SHA1(3cb71a95cea6b006b44cac0f547df88aec0007b7) ) | |
| 6454 | ||
| 6455 | ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */ | |
| 6456 | ROM_FILL( 0x000000, 0x80000, 0 ) | |
| 6457 | ROM_REGION( 0x20000, "fixedbios", 0 ) | |
| 6458 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) ) | |
| 6459 | ||
| 6460 | ROM_REGION16_BE( 0x80000, "mainbios", 0 ) | |
| 6461 | /* this contains both an ASIA and JAPAN bios, HARDDIP3 on the PCB selects which to use */ | |
| 6462 | ROM_LOAD16_WORD_SWAP( "sp-4x.sp1", 0x00000, 0x80000, CRC(b4590283) SHA1(47047ed5b6062babc0a0bebcc30e4b3f021e115a) ) | |
| 6463 | ||
| 6464 | /* Encrypted */ | |
| 6465 | ROM_REGION( 0x80000, "audiocrypt", 0 ) | |
| 6466 | ROM_LOAD( "269-m1.bin", 0x00000, 0x80000, CRC(f6819d00) SHA1(d3bbe09df502464f104e53501708ac6e2c1832c6) ) | |
| 6467 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) | |
| 6468 | ||
| 6469 | ROM_Y_ZOOM | |
| 6470 | ||
| 6471 | ROM_REGION( 0x1000000, "ym", 0 ) | |
| 6472 | /* Encrypted */ | |
| 6473 | ROM_LOAD( "269-v1a.bin", 0x000000, 0x1000000, CRC(a6af4753) SHA1(ec4f61a526b707a7faec4653b773beb3bf3a17ba) ) | |
| 6474 | ||
| 6475 | ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE ) | |
| 6476 | /* Encrypted */ | |
| 6477 | ROM_LOAD32_WORD( "269-c1a.bin", 0x0000000, 0x1000000, CRC(e64d2b0c) SHA1(0714198c400e5c273181e4c6f906b49e35fef75d) ) /* Plane 0,1 */ | |
| 6478 | ROM_LOAD32_WORD( "269-c2a.bin", 0x0000002, 0x1000000, CRC(249089c2) SHA1(1c0ca19e330efe1a74b2d35a1a9a8d61481e16a9) ) /* Plane 2,3 */ | |
| 6479 | ROM_LOAD32_WORD( "269-c3a.bin", 0x2000000, 0x1000000, CRC(d32f2fab) SHA1(273d58cb3c9075075b1ca39a3b247a2cd545fbe7) ) /* Plane 0,1 */ | |
| 6480 | ROM_LOAD32_WORD( "269-c4a.bin", 0x2000002, 0x1000000, CRC(bf77e878) SHA1(e6e76f8eed0d04ee9ad39bf38ce305930b10e2c1) ) /* Plane 2,3 */ | |
| 6481 | ROM_END | |
| 6482 | ||
| 6483 | ROM_START( kf2k3pcb ) /* Encrypted Set, JAMMA PCB */ | |
| 6484 | ROM_REGION( 0x900000, "main", 0 ) | |
| 6485 | ROM_LOAD32_WORD_SWAP( "271-p1.bin", 0x000000, 0x400000, CRC(b9da070c) SHA1(1a26325af142a4dd221c336061761468598c4634) ) | |
| 6486 | ROM_LOAD32_WORD_SWAP( "271-p2.bin", 0x000002, 0x400000, CRC(da3118c4) SHA1(582e4f44f03276adecb7b2848d3b96bf6da57f1e) ) | |
| 6487 | ROM_LOAD16_WORD_SWAP( "271-p3.bin", 0x800000, 0x100000, CRC(5cefd0d2) SHA1(cddc3164629fed4b6f715e12b109ad35d1009355) ) | |
| 6488 | ||
| 6489 | ROM_REGION( 0x100000, "fixed", 0 ) /* larger char set */ | |
| 6490 | ROM_FILL( 0x000000, 0x100000, 0 ) | |
| 6491 | ROM_REGION( 0x20000, "fixedbios", 0 ) | |
| 6492 | ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) ) | |
| 6493 | ||
| 6494 | ROM_REGION16_BE( 0x80000, "mainbios", 0 ) | |
| 6495 | ROM_LOAD16_WORD_SWAP( "271-bios.bin", 0x00000, 0x080000, CRC(148dd727) SHA1(2cf592a16c7157de02a989675d47965f2b3a44dd) ) // encrypted | |
| 6496 | ||
| 6497 | /* Encrypted */ | |
| 6498 | ROM_REGION( 0x80000, "audiocrypt", 0 ) | |
| 6499 | ROM_LOAD( "271-m1.bin", 0x00000, 0x80000, CRC(d6bcf2bc) SHA1(df78bc95990eb8e8f3638dde6e1876354df7fe84) ) | |
| 6500 | ROM_REGION( 0x90000, "audio", ROMREGION_ERASEFF ) | |
| 6501 | ||
| 6502 | ROM_Y_ZOOM | |
| 6503 | ||
| 6504 | ROM_REGION( 0x1000000, "ym", 0 ) | |
| 6505 | /* Encrypted */ | |
| 6506 | ROM_LOAD( "271-v1.bin", 0x000000, 0x1000000, CRC(1d96154b) SHA1(1d4e262b0d30cee79a4edc83bb9706023c736668) ) | |
| 6507 | ||
| 6508 | NO_DELTAT_REGION | |
| 6509 | ||
| 6510 | ROM_REGION( 0x6000000, "sprites", ROMREGION_DISPOSE ) | |
| 6511 | /* Encrypted */ | |
| 6512 | ROM_LOAD32_WORD( "271-c1.bin", 0x0000000, 0x1000000, CRC(f5ebb327) SHA1(e4f799a54b09adcca13b1b0cf95971a1f4291b61) ) /* Plane 0,1 */ | |
| 6513 | ROM_LOAD32_WORD( "271-c2.bin", 0x0000002, 0x1000000, CRC(2be21620) SHA1(872c658f53bbc558e90f18d5db9cbaa82e748a6a) ) /* Plane 2,3 */ | |
| 6514 | ROM_LOAD32_WORD( "271-c3.bin", 0x2000000, 0x1000000, CRC(ddded4ff) SHA1(ff7b356125bc9e6637b164f5e81b13eabeb8d804) ) /* Plane 0,1 */ | |
| 6515 | ROM_LOAD32_WORD( "271-c4.bin", 0x2000002, 0x1000000, CRC(d85521e6) SHA1(62278fa8690972ed32aca07a4f7f97e7203d9f3a) ) /* Plane 2,3 */ | |
| 6516 | ROM_LOAD32_WORD( "271-c5.bin", 0x4000000, 0x1000000, CRC(18aa3540) SHA1(15e0a8c4e0927b1f7eb9bee8f532acea6818d5eb) ) /* Plane 0,1 */ | |
| 6517 | ROM_LOAD32_WORD( "271-c6.bin", 0x4000002, 0x1000000, CRC(1c40de87) SHA1(8d6425aed43ff6a96c88194e203df6a783286373) ) /* Plane 2,3 */ | |
| 6518 | ROM_END | |
| 6519 | ||
| 6451 | 6520 | /* Various Bootlegs */ |
| 6452 | 6521 | |
| 6453 | 6522 | ROM_START( kog ) |
| r3373 | r3374 | |
| 6513 | 6582 | ROM_REGION( 0x40000, "fixed", 0 ) |
| 6514 | 6583 | ROM_LOAD( "5003-s1sp.bin", 0x00000, 0x40000, CRC(6c355ab4) SHA1(71ac2bcd3dbda8402baecc56dabc2297b148a900) ) |
| 6515 | 6584 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6516 | ROM_LOAD( "sfix.sfx", | |
| 6585 | ROM_LOAD( "sfix.sfix", | |
| 6517 | 6586 | |
| 6518 | 6587 | NEO_BIOS_AUDIO_128K( "5003-m1.bin", CRC(1a8c274b) SHA1(5f6f9c533f4a296a18c741ce59a69cf6f5c836b9) ) |
| 6519 | 6588 | |
| r3373 | r3374 | |
| 6549 | 6618 | ROM_LOAD( "5003-s1sa.bin", 0x00000, 0x20000, CRC(4e1f7eae) SHA1(3302ad290804272447ccd2e8edd3ce968f043db1) ) |
| 6550 | 6619 | /* S1 needs redump, correct? */ |
| 6551 | 6620 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6552 | ROM_LOAD( "sfix.sfx", | |
| 6621 | ROM_LOAD( "sfix.sfix", | |
| 6553 | 6622 | |
| 6554 | 6623 | NEO_BIOS_AUDIO_128K( "5003-m1.bin", CRC(1a8c274b) SHA1(5f6f9c533f4a296a18c741ce59a69cf6f5c836b9) ) |
| 6555 | 6624 | |
| r3373 | r3374 | |
| 6610 | 6679 | ROM_REGION( 0x40000, "fixed", 0 ) // modified |
| 6611 | 6680 | ROM_FILL( 0x000000, 0x40000, 0 ) // modified |
| 6612 | 6681 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6613 | ROM_LOAD( "sfix.sfx", | |
| 6682 | ROM_LOAD( "sfix.sfix", | |
| 6614 | 6683 | |
| 6615 | 6684 | NEO_BIOS_AUDIO_128K( "kf10-m1.bin", CRC(f6fab859) SHA1(0184aa1394b9f9946d610278b53b846020dd88dc) ) |
| 6616 | 6685 | |
| r3373 | r3374 | |
| 6767 | 6836 | ROM_REGION( 0x100000, "main", ROMREGION_ERASEFF ) |
| 6768 | 6837 | |
| 6769 | 6838 | ROM_REGION( 0x20000, "audiobios", 0 ) |
| 6770 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 6839 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 6771 | 6840 | |
| 6772 | 6841 | ROM_REGION( 0x50000, "audio", 0 ) |
| 6773 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(97 | |
| 6842 | ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67 | |
| 6774 | 6843 | |
| 6775 | 6844 | ROM_Y_ZOOM |
| 6776 | 6845 | |
| 6777 | 6846 | ROM_REGION( 0x20000, "fixed", ROMREGION_ERASEFF ) |
| 6778 | 6847 | |
| 6779 | 6848 | ROM_REGION( 0x20000, "fixedbios", 0 ) |
| 6780 | ROM_LOAD( "sfix.sfx", | |
| 6849 | ROM_LOAD( "sfix.sfix", | |
| 6781 | 6850 | |
| 6782 | 6851 | ROM_REGION( 0x10000, "ym", ROMREGION_ERASEFF ) |
| 6783 | 6852 | |
| r3373 | r3374 | |
| 6967 | 7036 | neo_pcm2_swap(machine, 0); |
| 6968 | 7037 | neogeo_cmc50_m1_decrypt(machine); |
| 6969 | 7038 | kof2000_neogeo_gfx_decrypt(machine, 0xec); |
| 6970 | ||
| 6971 | ||
| 6972 | ||
| 6973 | ||
| 6974 | 7039 | DRIVER_INIT_CALL(neogeo); |
| 6975 | 7040 | } |
| 6976 | 7041 | |
| r3373 | r3374 | |
| 7034 | 7099 | install_pvc_protection(machine); |
| 7035 | 7100 | } |
| 7036 | 7101 | |
| 7102 | static TIMER_CALLBACK( ms5pcb_bios_timer_callback ) | |
| 7103 | { | |
| 7104 | int harddip3 = input_port_read(machine, "HARDDIP") & 1; | |
| 7105 | memory_set_bankptr(NEOGEO_BANK_BIOS, memory_region(machine, "mainbios")+0x20000+harddip3*0x20000); | |
| 7106 | } | |
| 7107 | ||
| 7037 | 7108 | static DRIVER_INIT( ms5pcb ) |
| 7038 | 7109 | { |
| 7110 | /* start a timer that will check the BIOS select DIP every second */ | |
| 7111 | timer_set(attotime_zero, NULL, 0, ms5pcb_bios_timer_callback); | |
| 7112 | timer_pulse(ATTOTIME_IN_MSEC(1000), NULL, 0, ms5pcb_bios_timer_callback); | |
| 7113 | ||
| 7039 | 7114 | mslug5_decrypt_68k(machine); |
| 7040 | 7115 | svcpcb_gfx_decrypt(machine); |
| 7041 | 7116 | neogeo_cmc50_m1_decrypt(machine); |
| r3373 | r3374 | |
| 7147 | 7222 | |
| 7148 | 7223 | static DRIVER_INIT( samsho5b ) |
| 7149 | 7224 | { |
| 7150 | neo_pcm2_swap(machine, 4); | |
| 7151 | neogeo_fixed_layer_bank_type = 1; | |
| 7152 | kof2000_neogeo_gfx_decrypt(machine, 0x0f); | |
| 7153 | 7225 | samsh5bl_px_decrypt(machine); |
| 7226 | samsh5bl_vx_decrypt(machine); | |
| 7227 | neogeo_bootleg_sx_decrypt(machine, 1); | |
| 7228 | neogeo_bootleg_cx_decrypt(machine); | |
| 7154 | 7229 | DRIVER_INIT_CALL(neogeo); |
| 7155 | 7230 | } |
| 7156 | 7231 | |
| r3373 | r3374 | |
| 7193 | 7268 | neogeo_fixed_layer_bank_type = 2; |
| 7194 | 7269 | neogeo_cmc50_m1_decrypt(machine); |
| 7195 | 7270 | kof2000_neogeo_gfx_decrypt(machine, 0x9d); |
| 7271 | DRIVER_INIT_CALL(neogeo); | |
| 7272 | install_pvc_protection(machine); | |
| 7273 | } | |
| 7196 | 7274 | |
| 7275 | static DRIVER_INIT( kof2003h ) | |
| 7276 | { | |
| 7277 | kof2003h_decrypt_68k(machine); | |
| 7278 | neo_pcm2_swap(machine, 5); | |
| 7279 | neogeo_fixed_layer_bank_type = 2; | |
| 7280 | neogeo_cmc50_m1_decrypt(machine); | |
| 7281 | kof2000_neogeo_gfx_decrypt(machine, 0x9d); | |
| 7197 | 7282 | DRIVER_INIT_CALL(neogeo); |
| 7198 | 7283 | install_pvc_protection(machine); |
| 7199 | 7284 | } |
| r3373 | r3374 | |
| 7417 | 7502 | GAME( 1995, fatfury3, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Fatal Fury 3 - Road to the Final Victory / Garou Densetsu 3 - haruka-naru tatakai", 0 ) |
| 7418 | 7503 | GAME( 1995, ssideki3, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Super Sidekicks 3 - The Next Glory / Tokuten Ou 3 - eikoue no michi", 0 ) |
| 7419 | 7504 | GAME( 1995, kof95, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '95 (set 1)", 0 ) |
| 7420 | GAME( 1995, kof95 | |
| 7505 | GAME( 1995, kof95h, kof95, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '95 (set 2)", 0 ) | |
| 7421 | 7506 | GAME( 1995, samsho3, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Samurai Shodown III / Samurai Spirits - Zankurou Musouken (set 1)", 0 ) |
| 7422 | GAME( 1995, samsho3 | |
| 7507 | GAME( 1995, samsho3h, samsho3, neogeo, neogeo, neogeo, ROT0, "SNK", "Samurai Shodown III / Samurai Spirits - Zankurou Musouken (set 2)", 0 ) | |
| 7423 | 7508 | GAME( 1995, fswords, samsho3, neogeo, neogeo, neogeo, ROT0, "SNK", "Fighters Swords (Korean release of Samurai Shodown III)", 0 ) |
| 7424 | 7509 | GAME( 1995, rbff1, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Real Bout Fatal Fury / Real Bout Garou Densetsu", 0 ) |
| 7425 | 7510 | GAME( 1995, rbff1a, rbff1, neogeo, neogeo, neogeo, ROT0, "SNK", "Real Bout Fatal Fury / Real Bout Garou Densetsu (bug fix revision)", 0 ) |
| r3373 | r3374 | |
| 7482 | 7567 | GAME( 2004, kof2k4se, kof2002, neogeo, neogeo, kof2k4se, ROT0, "bootleg", "The King of Fighters Special Edition 2004 (The King of Fighters 2002 bootleg)", 0 ) /* Hack / Bootleg of kof2002 */ |
| 7483 | 7568 | GAME( 2003, mslug5, neogeo, neogeo, neogeo, mslug5, ROT0, "SNK Playmore", "Metal Slug 5", 0 ) |
| 7484 | 7569 | GAME( 2003, mslug5h, mslug5, neogeo, neogeo, mslug5, ROT0, "SNK Playmore", "Metal Slug 5 (AES Cart)", 0 ) /* Also found in later MVS carts */ |
| 7485 | GAME( 2003, ms5pcb, 0, neogeo, | |
| 7570 | GAME( 2003, ms5pcb, 0, neogeo, ms5pcb, ms5pcb, ROT0, "SNK Playmore", "Metal Slug 5 (JAMMA PCB)", 0 ) | |
| 7486 | 7571 | GAME( 2003, ms5plus, mslug5, neogeo, neogeo, ms5plus, ROT0, "bootleg", "Metal Slug 5 Plus (bootleg)",0 ) |
| 7487 | 7572 | GAME( 2003, svcpcb, 0, neogeo, svcpcb, svcpcb, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB, set 1)", 0 ) // not a clone of neogeo because it's NOT a neogeo cart. |
| 7488 | 7573 | GAME( 2003, svcpcba, svcpcb, neogeo, svcpcb, svcpcb, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB, set 2)" , 0 ) /* Encrypted Code */ |
| r3373 | r3374 | |
| 7496 | 7581 | GAME( 2003, samsho5b, samsho5, neogeo, neogeo, samsho5b, ROT0, "bootleg", "Samurai Shodown V / Samurai Spirits Zero (bootleg)", 0 ) // different program scrambling |
| 7497 | 7582 | GAME( 2003, kf2k3pcb, 0, neogeo, neogeo, kf2k3pcb, ROT0, "SNK Playmore", "The King of Fighters 2003 (Japan, JAMMA PCB)", 0 ) // not a clone of neogeo because it's NOT a neogeo cart. |
| 7498 | 7583 | GAME( 2003, kof2003, neogeo, neogeo, neogeo, kof2003, ROT0, "SNK Playmore", "The King of Fighters 2003", 0 ) |
| 7584 | GAME( 2003, kof2003h, kof2003, neogeo, neogeo, kof2003h, ROT0, "SNK Playmore", "The King of Fighters 2003 (set 2)", 0 ) | |
| 7499 | 7585 | GAME( 2003, kf2k3bl, kof2003, neogeo, neogeo, kof2003b, ROT0, "bootleg", "The King of Fighters 2003 (bootleg set 1)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart (unless it was a bootleg pcb with the new bios?) |
| 7500 | 7586 | GAME( 2003, kf2k3bla, kof2003, neogeo, neogeo, kof2k3pl, ROT0, "bootleg", "The King of Fighters 2003 (bootleg set 2)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart |
| 7501 | 7587 | GAME( 2003, kf2k3pl, kof2003, neogeo, neogeo, kof2k3pl, ROT0, "bootleg", "The King of Fighters 2004 Plus / Hero (The King of Fighters 2003 bootleg)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart |
| r3373 | r3374 | |
|---|---|---|
| 82 | 82 | * |
| 83 | 83 | *************************************/ |
| 84 | 84 | |
| 85 | static void dleuro_interrupt( | |
| 85 | static void dleuro_interrupt(const device_ | |
| 86 | 86 | { |
| 87 | cpunum_set_input_line(machine, 0, 0, state); | |
| 87 | cpunum_set_input_line(device->machine, 0, 0, state); | |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | |
| 91 | static WRITE8_HANDLER( serial_transmit ) | |
| 91 | static WRITE8_DEVICE_HANDLER( serial_transmit ) | |
| 92 | 92 | { |
| 93 | 93 | laserdisc_data_w(laserdisc, data); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | |
| 97 | static int serial_receive(int ch) | |
| 97 | static int serial_receive(const device_config *device, int channel) | |
| 98 | 98 | { |
| 99 | 99 | /* if we still have data to send, do it now */ |
| 100 | if (ch == 0 && laserdisc_line_r(laserdisc, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE) | |
| 100 | if (channel == 0 && laserdisc_line_r(laserdisc, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE) | |
| 101 | 101 | return laserdisc_data_r(laserdisc); |
| 102 | 102 | |
| 103 | 103 | return -1; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | |
| 107 | static z80ctc_interface ctc_intf = | |
| 107 | static const z80ctc_interface ctc_intf = | |
| 108 | 108 | { |
| 109 | 0, /* clock (filled in from the CPU 0 clock) */ | |
| 109 | "main", /* clock comes from main CPU's clock */ | |
| 110 | 0, /* clock (filled in from the CPU clock) */ | |
| 110 | 111 | 0, /* timer disables */ |
| 111 | 112 | dleuro_interrupt, /* interrupt handler */ |
| 112 | 113 | 0, /* ZC/TO0 callback */ |
| r3373 | r3374 | |
| 115 | 116 | }; |
| 116 | 117 | |
| 117 | 118 | |
| 118 | static z80sio_interface sio_intf = | |
| 119 | static const z80sio_interface sio_intf = | |
| 119 | 120 | { |
| 120 | 0, /* clock (filled in from the CPU 3 clock) */ | |
| 121 | "main", /* clock comes from main CPU's clock */ | |
| 122 | 0, /* clock (filled in from the CPU clock) */ | |
| 121 | 123 | dleuro_interrupt, /* interrupt handler */ |
| 122 | 124 | 0, /* DTR changed handler */ |
| 123 | 125 | 0, /* RTS changed handler */ |
| r3373 | r3374 | |
| 127 | 129 | }; |
| 128 | 130 | |
| 129 | 131 | |
| 130 | static const | |
| 132 | static const | |
| 131 | 133 | { |
| 132 | { z80sio_reset, z80sio_irq_state, z80sio_irq_ack, z80sio_irq_reti, 0 }, | |
| 133 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, | |
| 134 | { 0, 0, 0, 0, -1 } /* end mark */ | |
| 134 | { Z80SIO, "sio" }, | |
| 135 | { Z80CTC, "ctc" }, | |
| 136 | { NULL } | |
| 135 | 137 | }; |
| 136 | 138 | |
| 137 | 139 | |
| r3373 | r3374 | |
| 190 | 192 | } |
| 191 | 193 | |
| 192 | 194 | |
| 193 | static MACHINE_START( dleuro ) | |
| 194 | { | |
| 195 | laserdisc = device_list_find_by_tag(machine->config->devicelist, LASERDISC, "laserdisc"); | |
| 196 | ||
| 197 | /* initialize the CTC and SIO peripherals */ | |
| 198 | ctc_intf.baseclock = cpunum_get_clock(0); | |
| 199 | sio_intf.baseclock = cpunum_get_clock(0); | |
| 200 | z80ctc_init(0, &ctc_intf); | |
| 201 | z80sio_init(0, &sio_intf); | |
| 202 | } | |
| 203 | ||
| 204 | ||
| 205 | 195 | static MACHINE_RESET( dlair ) |
| 206 | 196 | { |
| 207 | 197 | /* determine the laserdisc player from the DIP switches */ |
| r3373 | r3374 | |
| 225 | 215 | /* also update the speaker on the European version */ |
| 226 | 216 | if (sndti_exists(SOUND_BEEP, 0)) |
| 227 | 217 | { |
| 218 | const device_config *ctc = devtag_get_device(machine, Z80CTC, "ctc"); | |
| 228 | 219 | beep_set_state(0, 1); |
| 229 | beep_set_frequency(0, ATTOSECONDS_TO_HZ(z80ctc_getperiod( | |
| 220 | beep_set_frequency(0, ATTOSECONDS_TO_HZ(z80ctc_getperiod(ctc, 0).attoseconds)); | |
| 230 | 221 | } |
| 231 | 222 | } |
| 232 | 223 | |
| r3373 | r3374 | |
| 362 | 353 | * |
| 363 | 354 | *************************************/ |
| 364 | 355 | |
| 365 | static READ8_HANDLER( sio_r ) | |
| 356 | static READ8_DEVICE_HANDLER( sio_r ) | |
| 366 | 357 | { |
| 367 | return (offset & 1) ? z80sio_c_r( | |
| 358 | return (offset & 1) ? z80sio_c_r(device, (offset >> 1) & 1) : z80sio_d_r(dev | |
| 368 | 359 | } |
| 369 | 360 | |
| 370 | 361 | |
| 371 | static WRITE8_HANDLER( sio_w ) | |
| 362 | static WRITE8_DEVICE_HANDLER( sio_w ) | |
| 372 | 363 | { |
| 373 | 364 | if (offset & 1) |
| 374 | z80sio_c_w( | |
| 365 | z80sio_c_w(dev | |
| 375 | 366 | else |
| 376 | z80sio_d_w( | |
| 367 | z80sio_d_w(dev | |
| 377 | 368 | } |
| 378 | 369 | |
| 379 | 370 | |
| r3373 | r3374 | |
| 431 | 422 | /* complete memory map derived from schematics */ |
| 432 | 423 | static ADDRESS_MAP_START( dleuro_io_map, ADDRESS_SPACE_IO, 8 ) |
| 433 | 424 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 434 | AM_RANGE(0x00, 0x03) AM_MIRROR(0x7c) AM_READWRITE(z80ctc_0_r, z80ctc_0_w) | |
| 435 | AM_RANGE(0x80, 0x83) AM_MIRROR(0x7c) AM_READWRITE(sio_r, sio_w) | |
| 425 | AM_RANGE(0x00, 0x03) AM_MIRROR(0x7c) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_r, z80ctc_w) | |
| 426 | AM_RANGE(0x80, 0x83) AM_MIRROR(0x7c) AM_DEVREADWRITE(Z80SIO, "sio", sio_r, sio_w) | |
| 436 | 427 | ADDRESS_MAP_END |
| 437 | 428 | |
| 438 | 429 | |
| r3373 | r3374 | |
| 752 | 743 | MDRV_CPU_IO_MAP(dleuro_io_map,0) |
| 753 | 744 | MDRV_CPU_VBLANK_INT("main", vblank_callback) |
| 754 | 745 | |
| 746 | MDRV_Z80CTC_ADD("ctc", ctc_intf) | |
| 747 | MDRV_Z80SIO_ADD("sio", sio_intf) | |
| 748 | ||
| 755 | 749 | MDRV_WATCHDOG_TIME_INIT(UINT64_ATTOTIME_IN_HZ(MASTER_CLOCK_EURO/(16*16*16*16*16*8))) |
| 756 | 750 | |
| 757 | MDRV_MACHINE_START(dl | |
| 751 | MDRV_MACHINE_START(dlair | |
| 758 | 752 | MDRV_MACHINE_RESET(dlair) |
| 759 | 753 | |
| 760 | 754 | MDRV_LASERDISC_ADD("laserdisc", PHILLIPS_22VP932, "main", "ldsound") |
| r3373 | r3374 | |
|---|---|---|
| 182 | 182 | static READ16_HANDLER( misc_io_r ); |
| 183 | 183 | static WRITE16_HANDLER( misc_io_w ); |
| 184 | 184 | |
| 185 | static WRITE8_HANDLER( video_control_w ); | |
| 186 | static WRITE8_HANDLER( tilemap_sound_w ); | |
| 185 | static WRITE8_DEVICE_HANDLER( sound_latch_w ); | |
| 186 | static WRITE8_DEVICE_HANDLER( video_control_w ); | |
| 187 | static WRITE8_DEVICE_HANDLER( tilemap_sound_w ); | |
| 187 | 188 | |
| 188 | 189 | |
| 189 | 190 | |
| r3373 | r3374 | |
| 198 | 199 | NULL, |
| 199 | 200 | NULL, |
| 200 | 201 | NULL, |
| 201 | soundlatch_w, | |
| 202 | sound_latch_w, | |
| 202 | 203 | video_control_w, |
| 203 | 204 | tilemap_sound_w |
| 204 | 205 | }; |
| r3373 | r3374 | |
| 259 | 260 | |
| 260 | 261 | static TIMER_CALLBACK( delayed_ppi8255_w ) |
| 261 | 262 | { |
| 262 | ppi8255_w(dev | |
| 263 | ppi8255_w(devtag_ge | |
| 263 | 264 | } |
| 264 | 265 | |
| 265 | 266 | |
| r3373 | r3374 | |
| 269 | 270 | switch (offset & (0x3000/2)) |
| 270 | 271 | { |
| 271 | 272 | case 0x0000/2: |
| 272 | return ppi8255_r(dev | |
| 273 | return ppi8255_r(devtag_ge | |
| 273 | 274 | |
| 274 | 275 | case 0x1000/2: |
| 275 | 276 | { |
| r3373 | r3374 | |
| 326 | 327 | * |
| 327 | 328 | *************************************/ |
| 328 | 329 | |
| 329 | static WRITE8_HANDLER( video_control_w ) | |
| 330 | static WRITE8_DEVICE_HANDLER( video_control_w ) | |
| 330 | 331 | { |
| 331 | 332 | /* |
| 332 | 333 | PPI port B |
| r3373 | r3374 | |
| 345 | 346 | video_control = data; |
| 346 | 347 | segaic16_tilemap_set_flip(0, data & 0x80); |
| 347 | 348 | segaic16_sprites_set_flip(0, data & 0x80); |
| 348 | segaic16_set_display_enable(machine, data & 0x10); | |
| 349 | segaic16_set_display_enable(device->machine, data & 0x10); | |
| 349 | 350 | set_led_status(1, data & 0x08); |
| 350 | 351 | set_led_status(0, data & 0x04); |
| 351 | 352 | coin_counter_w(1, data & 0x02); |
| r3373 | r3374 | |
| 360 | 361 | * |
| 361 | 362 | *************************************/ |
| 362 | 363 | |
| 363 | static WRITE8_HANDLER( | |
| 364 | static WRITE8_DEVICE_HANDLER( | |
| 364 | 365 | { |
| 366 | soundlatch_w(device->machine, offset, data); | |
| 367 | } | |
| 368 | ||
| 369 | ||
| 370 | static WRITE8_DEVICE_HANDLER( tilemap_sound_w ) | |
| 371 | { | |
| 365 | 372 | /* |
| 366 | 373 | PPI port C |
| 367 | 374 | |
| r3373 | r3374 | |
| 376 | 383 | 0= Sound is disabled |
| 377 | 384 | 1= sound is enabled |
| 378 | 385 | */ |
| 379 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 386 | cpunum_set_input_line(device->machine, 1, INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 380 | 387 | segaic16_tilemap_set_colscroll(0, ~data & 0x04); |
| 381 | 388 | segaic16_tilemap_set_rowscroll(0, ~data & 0x02); |
| 382 | 389 | } |
| r3373 | r3374 | |
| 392 | 399 | static READ8_HANDLER( sound_data_r ) |
| 393 | 400 | { |
| 394 | 401 | /* assert ACK */ |
| 395 | ppi8255_set_port | |
| 402 | ppi8255_set_port_c(devtag_ge | |
| 396 | 403 | return soundlatch_r(machine, offset); |
| 397 | 404 | } |
| 398 | 405 | |
| r3373 | r3374 | |
| 1780 | 1787 | MDRV_MACHINE_RESET(system16a) |
| 1781 | 1788 | MDRV_NVRAM_HANDLER(system16a) |
| 1782 | 1789 | |
| 1783 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 1784 | MDRV_DEVICE_CONFIG( single_ppi_intf ) | |
| 1790 | MDRV_PPI8255_ADD( "ppi8255", single_ppi_intf ) | |
| 1785 | 1791 | |
| 1786 | 1792 | /* video hardware */ |
| 1787 | 1793 | MDRV_SCREEN_ADD("main", RASTER) |
| r3373 | r3374 | |
|---|---|---|
| 50 | 50 | * |
| 51 | 51 | *************************************/ |
| 52 | 52 | |
| 53 | static WRITE8_HANDLER( video_lamps_w ); | |
| 54 | static WRITE8_HANDLER( tilemap_sound_w ); | |
| 55 | static WRITE8_HANDLER( sub_control_adc_w ); | |
| 53 | static WRITE8_DEVICE_HANDLER( sound_latch_w ); | |
| 54 | static WRITE8_DEVICE_HANDLER( video_lamps_w ); | |
| 55 | static WRITE8_DEVICE_HANDLER( tilemap_sound_w ); | |
| 56 | static WRITE8_DEVICE_HANDLER( sub_control_adc_w ); | |
| 56 | 57 | |
| 57 | static READ8_HANDLER( adc_status_r ); | |
| 58 | static READ8_DEVICE_HANDLER( adc_status_r ); | |
| 58 | 59 | |
| 59 | 60 | |
| 60 | 61 | |
| r3373 | r3374 | |
| 70 | 71 | NULL, |
| 71 | 72 | NULL, |
| 72 | 73 | NULL, |
| 73 | soundlatch_w, | |
| 74 | sound_latch_w, | |
| 74 | 75 | video_lamps_w, |
| 75 | 76 | tilemap_sound_w |
| 76 | 77 | }, |
| r3373 | r3374 | |
| 145 | 146 | |
| 146 | 147 | static TIMER_CALLBACK( delayed_ppi8255_w ) |
| 147 | 148 | { |
| 148 | ppi8255_w(dev | |
| 149 | ppi8255_w(devtag_ge | |
| 149 | 150 | } |
| 150 | 151 | |
| 151 | 152 | |
| r3373 | r3374 | |
| 154 | 155 | switch (offset & 0x3020/2) |
| 155 | 156 | { |
| 156 | 157 | case 0x0000/2: /* PPI @ 4B */ |
| 157 | return ppi8255_r(dev | |
| 158 | return ppi8255_r(devtag_ge | |
| 158 | 159 | |
| 159 | 160 | case 0x1000/2: /* Input ports and DIP switches */ |
| 160 | 161 | { |
| r3373 | r3374 | |
| 163 | 164 | } |
| 164 | 165 | |
| 165 | 166 | case 0x3000/2: /* PPI @ 4C */ |
| 166 | return ppi8255_r(dev | |
| 167 | return ppi8255_r(devtag_ge | |
| 167 | 168 | |
| 168 | 169 | case 0x3020/2: /* ADC0804 data output */ |
| 169 | 170 | { |
| r3373 | r3374 | |
| 189 | 190 | return; |
| 190 | 191 | |
| 191 | 192 | case 0x3000/2: /* PPI @ 4C */ |
| 192 | ppi8255_w(dev | |
| 193 | ppi8255_w(devtag_ge | |
| 193 | 194 | return; |
| 194 | 195 | |
| 195 | 196 | case 0x3020/2: /* ADC0804 */ |
| r3373 | r3374 | |
| 205 | 206 | switch (offset & 0x0030/2) |
| 206 | 207 | { |
| 207 | 208 | case 0x0000/2: |
| 208 | return ppi8255_r(dev | |
| 209 | return ppi8255_r(devtag_ge | |
| 209 | 210 | |
| 210 | 211 | case 0x0010/2: /* Input ports and DIP switches */ |
| 211 | 212 | { |
| r3373 | r3374 | |
| 215 | 216 | |
| 216 | 217 | case 0x0020/2: /* PPI @ 4C */ |
| 217 | 218 | if (offset == 2) return 0; |
| 218 | return ppi8255_r(dev | |
| 219 | return ppi8255_r(devtag_ge | |
| 219 | 220 | |
| 220 | 221 | case 0x0030/2: /* ADC0804 data output */ |
| 221 | 222 | { |
| r3373 | r3374 | |
| 241 | 242 | return; |
| 242 | 243 | |
| 243 | 244 | case 0x0020/2: /* PPI @ 4C */ |
| 244 | ppi8255_w(dev | |
| 245 | ppi8255_w(devtag_ge | |
| 245 | 246 | return; |
| 246 | 247 | |
| 247 | 248 | case 0x0030/2: /* ADC0804 */ |
| r3373 | r3374 | |
| 259 | 260 | * |
| 260 | 261 | *************************************/ |
| 261 | 262 | |
| 262 | static WRITE8_HANDLER( | |
| 263 | static WRITE8_DEVICE_HANDLER( s | |
| 263 | 264 | { |
| 265 | soundlatch_w(device->machine, offset, data); | |
| 266 | } | |
| 267 | ||
| 268 | ||
| 269 | static WRITE8_DEVICE_HANDLER( video_lamps_w ) | |
| 270 | { | |
| 264 | 271 | /* Port B : Miscellaneous outputs */ |
| 265 | 272 | /* D7 : FLIPC (1= flip screen, 0= normal orientation) */ |
| 266 | 273 | /* D6 : SHADE0 (1= highlight, 0= shadow) */ |
| r3373 | r3374 | |
| 272 | 279 | segaic16_tilemap_set_flip(0, data & 0x80); |
| 273 | 280 | segaic16_sprites_set_flip(0, data & 0x80); |
| 274 | 281 | segaic16_sprites_set_shadow(0, ~data & 0x40); |
| 275 | segaic16_set_display_enable(machine, data & 0x10); | |
| 282 | segaic16_set_display_enable(device->machine, data & 0x10); | |
| 276 | 283 | set_led_status(1, data & 0x08); |
| 277 | 284 | set_led_status(0, data & 0x04); |
| 278 | 285 | coin_counter_w(1, data & 0x02); |
| r3373 | r3374 | |
| 280 | 287 | } |
| 281 | 288 | |
| 282 | 289 | |
| 283 | static WRITE8_HANDLER( tilemap_sound_w ) | |
| 290 | static WRITE8_DEVICE_HANDLER( tilemap_sound_w ) | |
| 284 | 291 | { |
| 285 | 292 | /* Port C : Tilemap origin and audio mute */ |
| 286 | 293 | /* D7 : Port A handshaking signal /OBF */ |
| r3373 | r3374 | |
| 291 | 298 | /* D2 : SCONT1 - Tilemap origin bit 1 */ |
| 292 | 299 | /* D1 : SCONT0 - Tilemap origin bit 0 */ |
| 293 | 300 | /* D0 : MUTE (1= audio on, 0= audio off) */ |
| 294 | cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 301 | cpunum_set_input_line(device->machine, 2, INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 295 | 302 | segaic16_tilemap_set_colscroll(0, ~data & 0x04); |
| 296 | 303 | segaic16_tilemap_set_rowscroll(0, ~data & 0x02); |
| 297 | 304 | sound_global_enable(data & 0x01); |
| 298 | 305 | } |
| 299 | 306 | |
| 300 | 307 | |
| 301 | static WRITE8_HANDLER( sub_control_adc_w ) | |
| 308 | static WRITE8_DEVICE_HANDLER( sub_control_adc_w ) | |
| 302 | 309 | { |
| 303 | 310 | /* Port A : S.CPU control and ADC channel select */ |
| 304 | 311 | /* D6 : INTR line on second CPU */ |
| 305 | 312 | /* D5 : RESET line on second CPU */ |
| 306 | 313 | /* D3-D2 : ADC_SELECT */ |
| 307 | cpunum_set_input_line(machine, 1, 4, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); | |
| 308 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); | |
| 314 | cpunum_set_input_line(device->machine, 1, 4, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); | |
| 315 | cpunum_set_input_line(device->machine, 1, INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); | |
| 309 | 316 | adc_select = (data >> 2) & 3; |
| 310 | 317 | } |
| 311 | 318 | |
| 312 | 319 | |
| 313 | static READ8_HANDLER( adc_status_r ) | |
| 320 | static READ8_DEVICE_HANDLER( adc_status_r ) | |
| 314 | 321 | { |
| 315 | 322 | /* D7 = 0 (left open) */ |
| 316 | 323 | /* D6 = /INTR of ADC0804 */ |
| r3373 | r3374 | |
| 365 | 372 | static READ8_HANDLER( sound_data_r ) |
| 366 | 373 | { |
| 367 | 374 | /* assert ACK */ |
| 368 | ppi8255_set_port | |
| 375 | ppi8255_set_port_c(devtag_ge | |
| 369 | 376 | return soundlatch_r(machine, offset); |
| 370 | 377 | } |
| 371 | 378 | |
| r3373 | r3374 | |
| 880 | 887 | MDRV_MACHINE_RESET(hangon) |
| 881 | 888 | MDRV_INTERLEAVE(100) |
| 882 | 889 | |
| 883 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 884 | MDRV_DEVICE_CONFIG( hangon_ppi_intf[0] ) | |
| 890 | MDRV_PPI8255_ADD( "ppi8255_0", hangon_ppi_intf[0] ) | |
| 891 | MDRV_PPI8255_ADD( "ppi8255_1", hangon_ppi_intf[1] ) | |
| 885 | 892 | |
| 886 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 887 | MDRV_DEVICE_CONFIG( hangon_ppi_intf[1] ) | |
| 888 | ||
| 889 | 893 | /* video hardware */ |
| 890 | 894 | MDRV_GFXDECODE(segahang) |
| 891 | 895 | MDRV_PALETTE_LENGTH(2048*3) |
| r3373 | r3374 | |
|---|---|---|
| 203 | 203 | |
| 204 | 204 | static VIDEO_UPDATE( gpworld ) |
| 205 | 205 | { |
| 206 | render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00); | |
| 207 | ||
| 208 | 206 | fillbitmap(bitmap, 0, cliprect); |
| 209 | 207 | |
| 210 | 208 | gpworld_draw_tiles(screen->machine, bitmap, cliprect); |
| r3373 | r3374 | |
| 245 | 243 | static WRITE8_HANDLER( palette_write ) |
| 246 | 244 | { |
| 247 | 245 | /* This is all just a (bad) guess */ |
| 248 | int pal_index, r, g, b; | |
| 246 | int pal_index, r, g, b, a; | |
| 249 | 247 | |
| 250 | 248 | palette_RAM[offset] = data; |
| 251 | 249 | |
| r3373 | r3374 | |
| 255 | 253 | b = (palette_RAM[pal_index] & 0xf0) << 0; |
| 256 | 254 | g = (palette_RAM[pal_index] & 0x0f) << 4; |
| 257 | 255 | r = (palette_RAM[pal_index+1] & 0x0f) << 4; |
| 258 | | |
| 256 | a | |
| 259 | 257 | |
| 260 | 258 | /* logerror("PAL WRITE index : %x rgb : %d %d %d (real %x) at %x\n", pal_index, r,g,b, data, offset); */ |
| 261 | 259 | |
| 262 | palette_set_color(machine, pal_index, MAKE_RGB(r, g, b)); | |
| 260 | palette_set_color(machine, pal_index, MAKE_ARGB(a, r, g, b)); | |
| 263 | 261 | } |
| 264 | 262 | |
| 265 | 263 | /* PROGRAM MAP */ |
| r3373 | r3374 | |
|---|---|---|
| 417 | 417 | |
| 418 | 418 | MDRV_INTERLEAVE(100) |
| 419 | 419 | |
| 420 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 421 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 420 | MDRV_PPI8255_ADD( "ppi8255", ppi8255_intf ) | |
| 422 | 421 | |
| 423 | 422 | MDRV_SCREEN_ADD("main", RASTER) |
| 424 | 423 | MDRV_SCREEN_REFRESH_RATE(60) |
| r3373 | r3374 | |
|---|---|---|
| 80 | 80 | |
| 81 | 81 | static VIDEO_UPDATE( astron ) |
| 82 | 82 | { |
| 83 | render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00); | |
| 84 | ||
| 85 | 83 | fillbitmap(bitmap, 0, cliprect); |
| 86 | 84 | |
| 87 | 85 | astron_draw_characters(screen->machine, bitmap, cliprect); |
| r3373 | r3374 | |
| 178 | 176 | |
| 179 | 177 | static WRITE8_HANDLER( astron_COLOR_write ) |
| 180 | 178 | { |
| 181 | UINT8 r, g, b; | |
| 179 | UINT8 r, g, b, a; | |
| 182 | 180 | UINT8 highBits, lowBits; |
| 183 | 181 | const UINT8 palIndex = offset >> 1; |
| 184 | 182 | |
| r3373 | r3374 | |
| 193 | 191 | r = (lowBits & 0x0f); |
| 194 | 192 | g = (lowBits & 0xf0) >> 4; |
| 195 | 193 | b = (highBits & 0x0f); |
| 194 | a = (highBits & 0x80) ? 0 : 255; | |
| 196 | 195 | |
| 197 | | |
| 196 | | |
| 198 | 197 | logerror("COLOR write : 0x%04x @ 0x%04x [0x%x]\n", data, offset, activecpu_get_pc()); |
| 199 | 198 | } |
| 200 | 199 |
| r3373 | r3374 | |
|---|---|---|
| 30 | 30 | VIDEO_START(homerun); |
| 31 | 31 | VIDEO_UPDATE(homerun); |
| 32 | 32 | |
| 33 | static WRITE8_HANDLER(pa_w){homerun_xpa=data;} | |
| 34 | static WRITE8_HANDLER(pb_w){homerun_xpb=data;} | |
| 35 | static WRITE8_HANDLER(pc_w){homerun_xpc=data;} | |
| 33 | static WRITE8_DEVICE_HANDLER(pa_w){homerun_xpa=data;} | |
| 34 | static WRITE8_DEVICE_HANDLER(pb_w){homerun_xpb=data;} | |
| 35 | static WRITE8_DEVICE_HANDLER(pc_w){homerun_xpc=data;} | |
| 36 | 36 | |
| 37 | 37 | static const ppi8255_interface ppi8255_intf = |
| 38 | 38 | { |
| r3373 | r3374 | |
| 194 | 194 | |
| 195 | 195 | MDRV_MACHINE_RESET(homerun) |
| 196 | 196 | |
| 197 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 198 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 197 | MDRV_PPI8255_ADD( "ppi8255", ppi8255_intf ) | |
| 199 | 198 | |
| 200 | 199 | /* video hardware */ |
| 201 | 200 | MDRV_SCREEN_ADD("main", RASTER) |
| r3373 | r3374 | |
|---|---|---|
| 498 | 498 | * |
| 499 | 499 | *************************************/ |
| 500 | 500 | |
| 501 | WRITE8_HANDLER( mcr_ipu_sio_transmit ) | |
| 501 | WRITE8_DEVICE_HANDLER( mcr_ipu_sio_transmit ) | |
| 502 | 502 | { |
| 503 | 503 | logerror("ipu_sio_transmit: %02X\n", data); |
| 504 | 504 | |
| r3373 | r3374 | |
| 531 | 531 | |
| 532 | 532 | static WRITE8_HANDLER( nflfoot_op4_w ) |
| 533 | 533 | { |
| 534 | const device_config *sio = devtag_get_device(machine, Z80SIO, "ipu_sio"); | |
| 535 | ||
| 534 | 536 | /* bit 7 = J3-7 on IPU board = /RXDA on SIO */ |
| 535 | 537 | logerror("%04X:op4_w(%d%d%d)\n", activecpu_get_pc(), (data >> 7) & 1, (data >> 6) & 1, (data >> 5) & 1); |
| 536 | 538 | |
| r3373 | r3374 | |
| 559 | 561 | { |
| 560 | 562 | logerror(" -- stop bit = %d; final value = %02X\n", (data >> 7) & 1, nflfoot_serial_out_bits); |
| 561 | 563 | nflfoot_serial_out_active = FALSE; |
| 562 | z80sio_receive_data( | |
| 564 | z80sio_receive_data(sio, 0, nflfoot_serial_out_bits); | |
| 563 | 565 | } |
| 564 | 566 | } |
| 565 | 567 | |
| 566 | 568 | /* bit 6 = J3-3 on IPU board = CTSA on SIO */ |
| 567 | z80sio_set_cts( | |
| 569 | z80sio_set_cts(sio, 0, (data >> 6) & 1); | |
| 568 | 570 | |
| 569 | 571 | /* bit 4 = SEL0 (J1-8) on squawk n talk board */ |
| 570 | 572 | /* bits 3-0 = MD3-0 connected to squawk n talk (J1-4,3,2,1) */ |
| r3373 | r3374 | |
| 624 | 626 | SSIO_INPUT_PORTS |
| 625 | 627 | AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) |
| 626 | 628 | AM_RANGE(0xe8, 0xe8) AM_WRITE(SMH_NOP) |
| 627 | AM_RANGE(0xf0, 0xf3) AM_READWRITE(z80ctc_ | |
| 629 | AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_ | |
| 628 | 630 | ADDRESS_MAP_END |
| 629 | 631 | |
| 630 | 632 | |
| r3373 | r3374 | |
| 651 | 653 | SSIO_INPUT_PORTS |
| 652 | 654 | AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) |
| 653 | 655 | AM_RANGE(0xe8, 0xe8) AM_WRITE(SMH_NOP) |
| 654 | AM_RANGE(0xf0, 0xf3) AM_READWRITE(z80ctc_ | |
| 656 | AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_ | |
| 655 | 657 | ADDRESS_MAP_END |
| 656 | 658 | |
| 657 | 659 | |
| r3373 | r3374 | |
| 679 | 681 | SSIO_INPUT_PORTS |
| 680 | 682 | AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) |
| 681 | 683 | AM_RANGE(0xe8, 0xe8) AM_WRITE(SMH_NOP) |
| 682 | AM_RANGE(0xf0, 0xf3) AM_READWRITE(z80ctc_ | |
| 684 | AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_ | |
| 683 | 685 | ADDRESS_MAP_END |
| 684 | 686 | |
| 685 | 687 | |
| r3373 | r3374 | |
| 701 | 703 | static ADDRESS_MAP_START( ipu_91695_portmap, ADDRESS_SPACE_IO, 8 ) |
| 702 | 704 | ADDRESS_MAP_UNMAP_HIGH |
| 703 | 705 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 704 | AM_RANGE(0x00, 0x03) AM_MIRROR(0xe0) AM_READWRITE(mcr_ipu_pio_0_r, mcr_ipu_pio_0_w) | |
| 705 | AM_RANGE(0x04, 0x07) AM_MIRROR(0xe0) AM_READWRITE(mcr_ipu_sio_r, mcr_ipu_sio_w) | |
| 706 | AM_RANGE(0x08, 0x0b) AM_MIRROR(0xe0) AM_READWRITE(z80ctc_1_r, z80ctc_1_w) | |
| 707 | AM_RANGE(0x0c, 0x0f) AM_MIRROR(0xe0) AM_READWRITE(mcr_ipu_pio_1_r, mcr_ipu_pio_1_w) | |
| 706 | AM_RANGE(0x00, 0x03) AM_MIRROR(0xe0) AM_DEVREADWRITE(Z80PIO, "ipu_pio0", z80pio_r, z80pio_w) | |
| 707 | AM_RANGE(0x04, 0x07) AM_MIRROR(0xe0) AM_DEVREADWRITE(Z80SIO, "ipu_sio", mcr_ipu_sio_r, mcr_ipu_sio_w) | |
| 708 | AM_RANGE(0x08, 0x0b) AM_MIRROR(0xe0) AM_DEVREADWRITE(Z80CTC, "ipu_ctc", z80ctc_r, z80ctc_w) | |
| 709 | AM_RANGE(0x0c, 0x0f) AM_MIRROR(0xe0) AM_DEVREADWRITE(Z80PIO, "ipu_pio1", z80pio_r, z80pio_w) | |
| 708 | 710 | AM_RANGE(0x10, 0x13) AM_MIRROR(0xe0) AM_WRITE(mcr_ipu_laserdisk_w) |
| 709 | 711 | AM_RANGE(0x1c, 0x1f) AM_MIRROR(0xe0) AM_READWRITE(mcr_ipu_watchdog_r, mcr_ipu_watchdog_w) |
| 710 | 712 | ADDRESS_MAP_END |
| r3373 | r3374 | |
| 1514 | 1516 | MDRV_CPU_IO_MAP(cpu_90009_portmap,0) |
| 1515 | 1517 | MDRV_CPU_VBLANK_INT_HACK(mcr_interrupt,2) |
| 1516 | 1518 | |
| 1519 | MDRV_Z80CTC_ADD("ctc", mcr_ctc_intf) | |
| 1520 | ||
| 1517 | 1521 | MDRV_WATCHDOG_VBLANK_INIT(16) |
| 1518 | 1522 | MDRV_MACHINE_START(mcr) |
| 1519 | 1523 | MDRV_MACHINE_RESET(mcr) |
| r3373 | r3374 | |
| 1601 | 1605 | MDRV_CPU_PROGRAM_MAP(ipu_91695_map,0) |
| 1602 | 1606 | MDRV_CPU_IO_MAP(ipu_91695_portmap,0) |
| 1603 | 1607 | MDRV_CPU_VBLANK_INT_HACK(mcr_ipu_interrupt,2) |
| 1608 | ||
| 1609 | MDRV_Z80CTC_ADD("ipu_ctc", nflfoot_ctc_intf) | |
| 1610 | MDRV_Z80PIO_ADD("ipu_pio0", nflfoot_pio_intf) | |
| 1611 | MDRV_Z80PIO_ADD("ipu_pio1", nflfoot_pio_intf) | |
| 1612 | MDRV_Z80SIO_ADD("ipu_sio", nflfoot_sio_intf) | |
| 1604 | 1613 | MACHINE_DRIVER_END |
| 1605 | 1614 | |
| 1606 | 1615 |
| r3373 | r3374 | |
|---|---|---|
| 105 | 105 | |
| 106 | 106 | /* only affect the background */ |
| 107 | 107 | for (i = 512;i < 1024;i++) |
| 108 | palette_set_ | |
| 108 | palette_set_p | |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | //if ((data & 0xf8) && (data & 0xf8) != 0x88) |
| r3373 | r3374 | |
|---|---|---|
| 81 | 81 | { |
| 82 | 82 | video_field = 0; |
| 83 | 83 | depth_buffer = auto_malloc(512); |
| 84 | ||
| 85 | render_container_set_palette_alpha(render_container_get_screen(machine->primary_screen), ALPHA_PEN, 0); | |
| 86 | 84 | } |
| 87 | 85 | |
| 88 | 86 | /* TODO: Use resistor values */ |
| r3373 | r3374 | |
| 101 | 99 | |
| 102 | 100 | palette_set_color_rgb(machine, i, y*r, y*g, y*b); |
| 103 | 101 | } |
| 102 | ||
| 103 | /* use pen 8192 for transparent */ | |
| 104 | palette_set_color(machine, 8192, MAKE_ARGB(0,0,0,0)); | |
| 104 | 105 | } |
| 105 | 106 | |
| 106 | 107 | /* TODO: This is a simplified version of what actually happens */ |
| r3373 | r3374 | |
|---|---|---|
| 47 | 47 | GLOBAL VARIABLES |
| 48 | 48 | ***************************************************************************/ |
| 49 | 49 | |
| 50 | static UINT8 *chdbuffer; | |
| 51 | 50 | static UINT8 chdinterlaced; |
| 52 | 51 | |
| 53 | 52 | static int video_first_whitefield = -1; |
| r3373 | r3374 | |
| 213 | 212 | info->height *= 2; |
| 214 | 213 | } |
| 215 | 214 | |
| 216 | /* allocate a buffer */ | |
| 217 | chdbuffer = malloc(chd_get_header(chd)->hunkbytes); | |
| 218 | if (chdbuffer == NULL) | |
| 219 | { | |
| 220 | fprintf(stderr, "Out of memory allocating chd buffer\n"); | |
| 221 | chd_close(chd); | |
| 222 | return NULL; | |
| 223 | } | |
| 224 | ||
| 225 | 215 | return chd; |
| 226 | 216 | } |
| 227 | 217 | |
| r3373 | r3374 | |
| 232 | 222 | |
| 233 | 223 | static int read_chd(void *file, int frame, bitmap_t *bitmap, INT16 *lsound, INT16 *rsound, int *samples) |
| 234 | 224 | { |
| 225 | av_codec_decompress_config avconfig = { 0 }; | |
| 235 | 226 | int interlace_factor = chdinterlaced ? 2 : 1; |
| 236 | int fieldnum, chnum, sampnum, x, y; | |
| 237 | int channels, width, height; | |
| 227 | bitmap_t fakebitmap; | |
| 228 | UINT32 numsamples; | |
| 238 | 229 | chd_error chderr; |
| 239 | | |
| 230 | int | |
| 240 | 231 | |
| 241 | 232 | /* loop over fields */ |
| 242 | 233 | *samples = 0; |
| 243 | 234 | for (fieldnum = 0; fieldnum < interlace_factor; fieldnum++) |
| 244 | 235 | { |
| 245 | int startsamples = *samples; | |
| 236 | /* make a fake bitmap for this field */ | |
| 237 | fakebitmap = *bitmap; | |
| 238 | fakebitmap.base = BITMAP_ADDR16(&fakebitmap, fieldnum, 0); | |
| 239 | fakebitmap.rowpixels *= interlace_factor; | |
| 240 | fakebitmap.height /= interlace_factor; | |
| 246 | 241 | |
| 242 | /* configure the codec */ | |
| 243 | avconfig.video = &fakebitmap; | |
| 244 | avconfig.maxsamples = 48000; | |
| 245 | avconfig.actsamples = &numsamples; | |
| 246 | avconfig.audio[0] = &lsound[*samples]; | |
| 247 | avconfig.audio[1] = &rsound[*samples]; | |
| 248 | ||
| 249 | /* configure the decompressor for this frame */ | |
| 250 | chd_codec_config(file, AV_CODEC_DECOMPRESS_CONFIG, &avconfig); | |
| 251 | ||
| 247 | 252 | /* read the frame */ |
| 248 | chderr = chd_read(file, frame * interlace_factor + fieldnum, | |
| 253 | chderr = chd_read(file, frame * interlace_factor + fieldnum, NULL | |
| 249 | 254 | if (chderr != CHDERR_NONE) |
| 250 | 255 | return FALSE; |
| 251 | 256 | |
| 252 | /* parse out the info */ | |
| 253 | channels = chdbuffer[5]; | |
| 254 | *samples += (chdbuffer[6] << 8) | chdbuffer[7]; | |
| 255 | width = (chdbuffer[8] << 8) | chdbuffer[9]; | |
| 256 | height = ((chdbuffer[10] << 8) | chdbuffer[11]) & 0x7fff; | |
| 257 | source = chdbuffer + 12 + chdbuffer[4]; | |
| 258 | ||
| 259 | /* make sure the data makes sense */ | |
| 260 | if (width != bitmap->width || height != bitmap->height / interlace_factor) | |
| 261 | { | |
| 262 | fprintf(stderr, "Inconsistent frame width/height!\n"); | |
| 263 | return FALSE; | |
| 264 | } | |
| 265 | ||
| 266 | /* copy in sample data */ | |
| 267 | for (chnum = 0; chnum < channels; chnum++) | |
| 268 | { | |
| 269 | INT16 *dest = (chnum == 0) ? lsound : rsound; | |
| 270 | for (sampnum = startsamples; sampnum < *samples; sampnum++) | |
| 271 | { | |
| 272 | INT16 sample = *source++ << 8; | |
| 273 | dest[sampnum] = sample | *source++; | |
| 274 | } | |
| 275 | } | |
| 276 | ||
| 277 | /* copy in the bitmap data */ | |
| 278 | for (y = fieldnum; y < height * interlace_factor; y += interlace_factor) | |
| 279 | { | |
| 280 | UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0); | |
| 281 | for (x = 0; x < width; x++) | |
| 282 | { | |
| 283 | UINT16 pixel = *source++; | |
| 284 | *dest++ = pixel | (*source++ << 8); | |
| 285 | } | |
| 286 | } | |
| 257 | /* account for samples read */ | |
| 258 | *samples += numsamples; | |
| 287 | 259 | } |
| 288 | 260 | return TRUE; |
| 289 | 261 | } |
| r3373 | r3374 | |
| 295 | 267 | |
| 296 | 268 | static void close_chd(void *file) |
| 297 | 269 | { |
| 298 | if (chdbuffer != NULL) | |
| 299 | free(chdbuffer); | |
| 300 | 270 | chd_close(file); |
| 301 | 271 | } |
| 302 | 272 | |
| r3373 | r3374 | |
| 341 | 311 | } |
| 342 | 312 | |
| 343 | 313 | /* is this a lead-in code? */ |
| 344 | if (metadata.line1718 == | |
| 314 | if (metadata.line1718 == VBI_CODE_LEADIN) | |
| 345 | 315 | { |
| 346 | 316 | /* if we haven't seen lead-in yet, detect it */ |
| 347 | 317 | if (!video_saw_leadin) |
| r3373 | r3374 | |
| 356 | 326 | } |
| 357 | 327 | |
| 358 | 328 | /* is this a lead-out code? */ |
| 359 | if (metadata.line1718 == | |
| 329 | if (metadata.line1718 == VBI_CODE_LEADOUT) | |
| 360 | 330 | { |
| 361 | 331 | /* if we haven't seen lead-in yet, detect it */ |
| 362 | 332 | if (!video_saw_leadout) |
| r3373 | r3374 | |
| 375 | 345 | } |
| 376 | 346 | |
| 377 | 347 | /* is this a frame code? */ |
| 378 | if ((metadata.line1718 & | |
| 348 | if ((metadata.line1718 & VBI_MASK_CAV_PICTURE) == VBI_CODE_CAV_PICTURE) | |
| 379 | 349 | { |
| 380 | int framenum = ( | |
| 350 | int framenum = VBI_CAV_PICTURE( | |
| 381 | 351 | |
| 382 | 352 | /* did we see any leadin? */ |
| 383 | 353 | if (!video_saw_leadin) |
| r3373 | r3374 | |
| 407 | 377 | |
| 408 | 378 | /* remember the frame number */ |
| 409 | 379 | video_last_frame = framenum; |
| 380 | ||
| 381 | /* if we've seen a white flag before, but it's not here, warn */ | |
| 382 | if (video_first_whitefield != -1 && !metadata.white) | |
| 383 | printf("%6d.%d: detected frame number but no white flag (WARNING)\n", frame, fieldnum); | |
| 410 | 384 | } |
| 411 | 385 | |
| 412 | 386 | /* is the whiteflag set? */ |
| r3373 | r3374 | |
| 419 | 393 | printf("%6d.%d: first white flag seen\n", frame, fieldnum); |
| 420 | 394 | } |
| 421 | 395 | |
| 396 | /* if we've seen frame numbers before, but not here, warn */ | |
| 397 | if (video_last_frame != -1 && (metadata.line1718 & VBI_MASK_CAV_PICTURE) != VBI_CODE_CAV_PICTURE) | |
| 398 | printf("%6d.%d: detected white flag but no frame number (WARNING)\n", frame, fieldnum); | |
| 399 | } | |
| 400 | ||
| 401 | /* if this is the start of a frame, handle cadence */ | |
| 402 | if (metadata.white || (metadata.line1718 & VBI_MASK_CAV_PICTURE) == VBI_CODE_CAV_PICTURE) | |
| 403 | { | |
| 422 | 404 | /* if we've seen frames, but we're not yet to the lead-out, check the cadence */ |
| 423 | 405 | if (video_last_frame != -1 && !video_saw_leadout) |
| 424 | 406 | { |
| r3373 | r3374 | |
| 490 | 472 | |
| 491 | 473 | /* remove the top/bottom 0.1% of Y */ |
| 492 | 474 | remaining = pixels / 1000; |
| 493 | for (yminval = 0; remaining >= 0; yminval++) | |
| 494 | remaining -= yhisto[yminval]; | |
| 475 | for (yminval = 0; (remaining -= yhisto[yminval]) >= 0; yminval++) ; | |
| 495 | 476 | remaining = pixels / 1000; |
| 496 | for (ymaxval = 255; remaining >= 0; ymaxval--) | |
| 497 | remaining -= yhisto[ymaxval]; | |
| 477 | for (ymaxval = 255; (remaining -= yhisto[ymaxval]) >= 0; ymaxval--) ; | |
| 498 | 478 | |
| 499 | 479 | /* remove the top/bottom 0.1% of Cb */ |
| 500 | 480 | remaining = pixels / 500; |
| 501 | for (cbminval = 0; remaining >= 0; cbminval++) | |
| 502 | remaining -= cbhisto[cbminval]; | |
| 481 | for (cbminval = 0; (remaining -= cbhisto[cbminval]) >= 0; cbminval++) ; | |
| 503 | 482 | remaining = pixels / 500; |
| 504 | for (cbmaxval = 255; remaining >= 0; cbmaxval--) | |
| 505 | remaining -= cbhisto[cbmaxval]; | |
| 483 | for (cbmaxval = 255; (remaining -= cbhisto[cbmaxval]) >= 0; cbmaxval--) ; | |
| 506 | 484 | |
| 507 | 485 | /* remove the top/bottom 0.1% of Cr */ |
| 508 | 486 | remaining = pixels / 500; |
| 509 | for (crminval = 0; remaining >= 0; crminval++) | |
| 510 | remaining -= crhisto[crminval]; | |
| 487 | for (crminval = 0; (remaining -= crhisto[crminval]) >= 0; crminval++) ; | |
| 511 | 488 | remaining = pixels / 500; |
| 512 | for (crmaxval = 255; remaining >= 0; crmaxval--) | |
| 513 | remaining -= crhisto[crmaxval]; | |
| 489 | for (crmaxval = 255; (remaining -= crhisto[crmaxval]) >= 0; crmaxval--) ; | |
| 514 | 490 | |
| 515 | 491 | /* track blank frames */ |
| 516 | 492 | if (ymaxval - yminval < 10 && cbmaxval - cbminval < 10 && crmaxval - cbmaxval < 10) |
| r3373 | r3374 | |
| 535 | 511 | video_max_overall = MAX(ymaxval, video_max_overall); |
| 536 | 512 | |
| 537 | 513 | /* track low fields */ |
| 538 | if (yminval < | |
| 514 | if (yminval <= 0 | |
| 539 | 515 | { |
| 540 | 516 | if (video_first_low_frame == -1) |
| 541 | 517 | { |
| r3373 | r3374 | |
| 552 | 528 | } |
| 553 | 529 | |
| 554 | 530 | /* track high fields */ |
| 555 | if (ymaxval > 2 | |
| 531 | if (ymaxval >= 255) | |
| 556 | 532 | { |
| 557 | 533 | if (video_first_high_frame == -1) |
| 558 | 534 | { |
| r3373 | r3374 | |
| 582 | 558 | |
| 583 | 559 | /* did we ever see any white flags? */ |
| 584 | 560 | if (video_first_whitefield == -1) |
| 585 | printf("Track %6d.%d: never saw any white flags | |
| 561 | printf("Track %6d.%d: never saw any white flags | |
| 586 | 562 | |
| 587 | 563 | /* did we ever see any lead-out? */ |
| 588 | 564 | if (!video_saw_leadout) |
| r3373 | r3374 | |
|---|---|---|
| 605 | 605 | window->render_lock = osd_lock_alloc(); |
| 606 | 606 | |
| 607 | 607 | // load the layout |
| 608 | window->target = render_target_alloc(NULL, 0); | |
| 608 | window->target = render_target_alloc(machine, NULL, 0); | |
| 609 | 609 | if (window->target == NULL) |
| 610 | 610 | fatalerror("Error creating render target for window %d", index); |
| 611 | 611 |
| r3373 | r3374 | |
|---|---|---|
| 333 | 333 | #define FLAG_INT_MASK m68ki_cpu.int_mask |
| 334 | 334 | |
| 335 | 335 | #define CPU_INT_LEVEL m68ki_cpu.int_level /* ASG: changed from CPU_INTS_PENDING */ |
| 336 | #define CPU_INT_CYCLES m68ki_cpu.int_cycles /* ASG */ | |
| 337 | 336 | #define CPU_STOPPED m68ki_cpu.stopped |
| 338 | 337 | #define CPU_PREF_ADDR m68ki_cpu.pref_addr |
| 339 | 338 | #define CPU_PREF_DATA m68ki_cpu.pref_data |
| r3373 | r3374 | |
| 562 | 561 | if(CPU_STOPPED) \ |
| 563 | 562 | { \ |
| 564 | 563 | SET_CYCLES(0); \ |
| 565 | CPU_INT_CYCLES = 0; \ | |
| 566 | 564 | return m68ki_initial_cycles; \ |
| 567 | 565 | } \ |
| 568 | 566 | } |
| r3373 | r3374 | |
| 877 | 875 | uint c_flag; /* Carry */ |
| 878 | 876 | uint int_mask; /* I0-I2 */ |
| 879 | 877 | uint int_level; /* State of interrupt pins IPL0-IPL2 -- ASG: changed from ints_pending */ |
| 880 | uint int_cycles; /* ASG: extra cycles from generated interrupts */ | |
| 881 | 878 | uint stopped; /* Stopped state */ |
| 882 | 879 | uint pref_addr; /* Last prefetch address */ |
| 883 | 880 | uint pref_data; /* Data in the prefetch queue */ |
| r3373 | r3374 | |
| 899 | 896 | |
| 900 | 897 | /* Virtual IRQ lines state */ |
| 901 | 898 | uint virq_state; |
| 899 | uint nmi_pending; | |
| 902 | 900 | |
| 903 | 901 | const uint8* cyc_instruction; |
| 904 | 902 | const uint8* cyc_exception; |
| r3373 | r3374 | |
| 2026 | 2024 | m68ki_jump(new_pc); |
| 2027 | 2025 | |
| 2028 | 2026 | /* Defer cycle counting until later */ |
| 2029 | | |
| 2027 | | |
| 2030 | 2028 | |
| 2031 | 2029 | #if !M68K_EMULATE_INT_ACK |
| 2032 | 2030 | /* Automatically clear IRQ if we are not using an acknowledge scheme */ |
| r3373 | r3374 | |
| 2038 | 2036 | /* ASG: Check for interrupts */ |
| 2039 | 2037 | INLINE void m68ki_check_interrupts(void) |
| 2040 | 2038 | { |
| 2041 | if(CPU_INT_LEVEL > FLAG_INT_MASK) | |
| 2039 | if(m68ki_cpu.nmi_pending) | |
| 2040 | { | |
| 2041 | m68ki_cpu.nmi_pending = FALSE; | |
| 2042 | m68ki_exception_interrupt(7); | |
| 2043 | } | |
| 2044 | else if(CPU_INT_LEVEL > FLAG_INT_MASK) | |
| 2042 | 2045 | m68ki_exception_interrupt(CPU_INT_LEVEL>>8); |
| 2043 | 2046 | } |
| 2044 | 2047 |
| r3373 | r3374 | |
|---|---|---|
| 783 | 783 | /* ASG: removed per-instruction interrupt checks */ |
| 784 | 784 | int m68k_execute(int num_cycles) |
| 785 | 785 | { |
| 786 | /* Set our pool of clock cycles available */ | |
| 787 | SET_CYCLES(num_cycles); | |
| 788 | m68ki_initial_cycles = num_cycles; | |
| 789 | ||
| 790 | /* See if interrupts came in */ | |
| 791 | m68ki_check_interrupts(); | |
| 792 | ||
| 786 | 793 | /* Make sure we're not stopped */ |
| 787 | 794 | if(!CPU_STOPPED) |
| 788 | 795 | { |
| 789 | /* Set our pool of clock cycles available */ | |
| 790 | SET_CYCLES(num_cycles); | |
| 791 | m68ki_initial_cycles = num_cycles; | |
| 792 | ||
| 793 | /* ASG: update cycles */ | |
| 794 | USE_CYCLES(CPU_INT_CYCLES); | |
| 795 | CPU_INT_CYCLES = 0; | |
| 796 | ||
| 797 | 796 | /* Return point if we had an address error */ |
| 798 | 797 | m68ki_set_address_error_trap(); /* auto-disable (see m68kcpu.h) */ |
| 799 | 798 | |
| r3373 | r3374 | |
| 823 | 822 | |
| 824 | 823 | /* set previous PC to current PC for the next entry into the loop */ |
| 825 | 824 | REG_PPC = REG_PC; |
| 826 | ||
| 827 | /* ASG: update cycles */ | |
| 828 | USE_CYCLES(CPU_INT_CYCLES); | |
| 829 | CPU_INT_CYCLES = 0; | |
| 830 | ||
| 831 | /* return how many clocks we used */ | |
| 832 | return m68ki_initial_cycles - GET_CYCLES(); | |
| 833 | 825 | } |
| 826 | else | |
| 827 | SET_CYCLES(0); | |
| 834 | 828 | |
| 835 | /* We get here if the CPU is stopped or halted */ | |
| 836 | SET_CYCLES(0); | |
| 837 | CPU_INT_CYCLES = 0; | |
| 838 | ||
| 839 | return num_cycles; | |
| 829 | /* return how many clocks we used */ | |
| 830 | return m68ki_initial_cycles - GET_CYCLES(); | |
| 840 | 831 | } |
| 841 | 832 | |
| 842 | 833 | |
| r3373 | r3374 | |
| 877 | 868 | /* A transition from < 7 to 7 always interrupts (NMI) */ |
| 878 | 869 | /* Note: Level 7 can also level trigger like a normal IRQ */ |
| 879 | 870 | if(old_level != 0x0700 && CPU_INT_LEVEL == 0x0700) |
| 880 | m68ki_exception_interrupt(7); /* Edge triggered level 7 (NMI) */ | |
| 881 | else | |
| 882 | m68ki_check_interrupts(); /* Level triggered (IRQ) */ | |
| 871 | m68ki_cpu.nmi_pending = TRUE; | |
| 883 | 872 | } |
| 884 | 873 | |
| 885 | 874 | void m68k_set_virq(unsigned int level, unsigned int active) |
| r3373 | r3374 | |
| 1034 | 1023 | state_save_register_item(type, index, REG_CAAR); |
| 1035 | 1024 | state_save_register_item(type, index, m68k_substate.sr); |
| 1036 | 1025 | state_save_register_item(type, index, CPU_INT_LEVEL); |
| 1037 | state_save_register_item(type, index, CPU_INT_CYCLES); | |
| 1038 | 1026 | state_save_register_item(type, index, m68k_substate.stopped); |
| 1039 | 1027 | state_save_register_item(type, index, m68k_substate.halted); |
| 1040 | 1028 | state_save_register_item(type, index, CPU_PREF_ADDR); |
| r3373 | r3374 | |
|---|---|---|
| 1520 | 1520 | vflag = (((r & 0x7ff) + (s & 0x7ff) + ci) >> 11) ^ cflag; |
| 1521 | 1521 | break; |
| 1522 | 1522 | case SUBR: |
| 1523 | res = | |
| 1523 | res = (r ^ 0x0FFF) + s + ci; | |
| 1524 | 1524 | cflag = (res >> 12) & 1; |
| 1525 | 1525 | vflag = (((s & 0x7ff) + (~r & 0x7ff) + ci) >> 11) ^ cflag; |
| 1526 | 1526 | break; |
| 1527 | 1527 | case SUBS: |
| 1528 | res = r + | |
| 1528 | res = r + (s ^ 0x0FFF) + ci; | |
| 1529 | 1529 | cflag = (res >> 12) & 1; |
| 1530 | 1530 | vflag = (((r & 0x7ff) + (~s & 0x7ff) + ci) >> 11) ^ cflag; |
| 1531 | 1531 | break; |
| r3373 | r3374 | |
|---|---|---|
| 9 | 9 | IPR = value; |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | static INT8 irqa_ipl(void) { return ((IPR & 0x0003) >> 0) - 1; } | |
| 13 | static UINT8 irqa_trigger(void) { return (IPR & 0x0004) >> 2; } | |
| 14 | static INT8 irqb_ipl(void) { return ((IPR & 0x0018) >> 3) - 1; } | |
| 15 | static UINT8 irqb_trigger(void) { return (IPR & 0x0002) >> 5; } | |
| 16 | static INT8 codec_ipl(void) { return ((IPR & 0x00c0) >> 6) - 1; } | |
| 17 | static INT8 host_ipl(void) { return ((IPR & 0x0300) >> 8) - 1; } | |
| 18 | static INT8 ssi0_ipl(void) { return ((IPR & 0x0c00) >> 10) - 1; } | |
| 19 | static INT8 ssi1_ipl(void) { return ((IPR & 0x3000) >> 12) - 1; } | |
| 20 | static INT8 tm_ipl(void) { return ((IPR & 0xc000) >> 14) - 1; } | |
| 12 | static INT8 irqa_ipl(void) { return ((IPR & 0x0003) >> 0) - 1; } | |
| 13 | static UINT8 irqa_trigger(void) { return (IPR & 0x0004) >> 2; } | |
| 14 | static INT8 irqb_ipl(void) { return ((IPR & 0x0018) >> 3) - 1; } | |
| 15 | static UINT8 irqb_trigger(void) { return (IPR & 0x0002) >> 5; } | |
| 16 | static INT8 codec_ipl(void) { return ((IPR & 0x00c0) >> 6) - 1; } | |
| 17 | static INT8 host_ipl(void) { return ((IPR & 0x0300) >> 8) - 1; } | |
| 18 | static INT8 ssi0_ipl(void) { return ((IPR & 0x0c00) >> 10) - 1; } | |
| 19 | static INT8 ssi1_ipl(void) { return ((IPR & 0x3000) >> 12) - 1; } | |
| 20 | static INT8 tm_ipl(void) { return ((IPR & 0xc000) >> 14) - 1; } | |
| 21 | 21 | |
| 22 | 22 | static void mem_reset(void) |
| 23 | 23 | { |
| r3373 | r3374 | |
| 795 | 795 | /* BCR */ |
| 796 | 796 | static void BCR_set(UINT16 value) |
| 797 | 797 | { |
| 798 | RH_bit_set((value & 0x0001) >> 15); | |
| 799 | BS_bit_set((value & 0x0001) >> 14); | |
| 798 | RH_bit_set((value & 0x8000) >> 15); | |
| 799 | BS_bit_set((value & 0x4000) >> 14); | |
| 800 | 800 | external_x_wait_states_set((value & 0x03e0) >> 5); |
| 801 | 801 | external_p_wait_states_set((value & 0x001f) >> 0); |
| 802 | 802 | } |
| r3373 | r3374 | |
| 923 | 923 | |
| 924 | 924 | static void dsp56k_io_reset(void) |
| 925 | 925 | { |
| 926 | /* The BCR */ | |
| 926 | /* The BCR = 0x43ff */ | |
| 927 | 927 | RH_bit_set(0); |
| 928 | 928 | BS_bit_set(1); |
| 929 | 929 | external_x_wait_states_set(0x1f); |
| r3373 | r3374 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | // NOTES For register setting: | |
| 10 | // FM.3-4 : When A2 or B2 is read, the register contents occupy the low-order portion | |
| 11 | // (bits 7-0) of the word; the high-order portion (bits 16-8) is sign-extended. When A2 or B2 | |
| 12 | // is written, the register receives the low-order portion of the word; the high-order portion is not used | |
| 13 | // : ...much more! | |
| 14 | // : ...shifter/limiter/overflow notes too. | |
| 15 | // | |
| 16 | // | |
| 17 | ||
| 9 | 18 | // Helper functions and macros |
| 10 | 19 | #define BITS(CUR,MASK) (Dsp56kOpMask(CUR,MASK)) |
| 11 | 20 | static UINT16 Dsp56kOpMask(UINT16 op, UINT16 mask) ; |
| r3373 | r3374 | |
|---|---|---|
| 76 | 76 | #define ST15 (SS[15].d) |
| 77 | 77 | |
| 78 | 78 | /* 1-25 STATUS REGISTER (SR) BITS */ |
| 79 | /* MR */ | |
| 79 | 80 | static UINT8 LF_bit(void); |
| 80 | 81 | static UINT8 FV_bit(void); |
| 81 | 82 | //static UINT8 S_bits(void); #define s1BIT ((SR & 0x0800) != 0) #define s0BIT ((SR & 0x0400) != 0) |
| 82 | 83 | static UINT8 I_bits(void); |
| 84 | /* CCR */ | |
| 83 | 85 | static UINT8 S_bit(void); |
| 84 | 86 | static UINT8 L_bit(void); |
| 85 | 87 | static UINT8 E_bit(void); |
| r3373 | r3374 | |
| 89 | 91 | static UINT8 V_bit(void); |
| 90 | 92 | static UINT8 C_bit(void); |
| 91 | 93 | |
| 94 | /* MR */ | |
| 92 | 95 | static void LF_bit_set(UINT8 value); |
| 93 | //static void FV_bit_set(UINT8 value); #define fvBIT_CLEAR() (SR &= (~0x4000)) | |
| 94 | //static void S_bits_set(UINT8 value); #define s1BIT_CLEAR() (SR &= (~0x0800)) #define s0BIT_CLEAR() (SR &= (~0x0400)) | |
| 95 | //static void I_bits_set(UINT8 value); | |
| 96 | //static void S_bit_set(UINT8 value); #define sBIT_CLEAR() (SR &= (~0x0080)) | |
| 97 | //static void L_bit_set(UINT8 value); #define lBIT_CLEAR() (SR &= (~0x0040)) | |
| 98 | //static void E_bit_set(UINT8 value); #define eBIT_CLEAR() (SR &= (~0x0020)) | |
| 99 | //static void U_bit_set(UINT8 value); #define uBIT_CLEAR() (SR &= (~0x0010)) | |
| 96 | static void FV_bit_set(UINT8 value); | |
| 97 | static void S_bits_set(UINT8 value); | |
| 98 | static void I_bits_set(UINT8 value); | |
| 99 | /* CCR */ | |
| 100 | static void S_bit_set(UINT8 value); | |
| 101 | static void L_bit_set(UINT8 value); | |
| 102 | static void E_bit_set(UINT8 value); | |
| 103 | static void U_bit_set(UINT8 value); | |
| 100 | 104 | static void N_bit_set(UINT8 value); |
| 101 | 105 | static void Z_bit_set(UINT8 value); |
| 102 | 106 | static void V_bit_set(UINT8 value); |
| r3373 | r3374 | |
| 113 | 117 | static UINT8 MB_bit(void); |
| 114 | 118 | static UINT8 MA_bit(void); |
| 115 | 119 | |
| 116 | //static UINT8 CD_bit_set(UINT8 value); #define cdBIT_CLEAR() (OMR &= (~0x0080)) | |
| 117 | //static UINT8 SD_bit_set(UINT8 value); #define sdBIT_CLEAR() (OMR &= (~0x0040)) | |
| 118 | //static UINT8 R_bit_set(UINT8 value); #define rBIT_CLEAR() (OMR &= (~0x0020)) | |
| 119 | //static UINT8 SA_bit_set(UINT8 value); #define saBIT_CLEAR() (OMR &= (~0x0010)) | |
| 120 | static void CD_bit_set(UINT8 value); | |
| 121 | static void SD_bit_set(UINT8 value); | |
| 122 | static void R_bit_set(UINT8 value); | |
| 123 | static void SA_bit_set(UINT8 value); | |
| 120 | 124 | static void MC_bit_set(UINT8 value); |
| 121 | 125 | static void MB_bit_set(UINT8 value); |
| 122 | 126 | static void MA_bit_set(UINT8 value); |
| r3373 | r3374 | |
| 380 | 384 | |
| 381 | 385 | /* Port C Dtaa Register (PCD) */ |
| 382 | 386 | static void PCD_set(UINT16 value); |
| 387 |
| r3373 | r3374 | |
|---|---|---|
| 18 | 18 | SR &= ~(0x8000); |
| 19 | 19 | SR |= (value << 15); |
| 20 | 20 | } |
| 21 | //static UINT8 I_bits_set(void) { } | |
| 21 | static void FV_bit_set(UINT8 value) | |
| 22 | { | |
| 23 | value = value & 0x01; | |
| 24 | SR &= ~(0x4000); | |
| 25 | SR |= (value << 14); | |
| 26 | } | |
| 27 | static void S_bits_set(UINT8 value) | |
| 28 | { | |
| 29 | value = value & 0x03; | |
| 30 | SR &= ~(0x0c00); | |
| 31 | SR |= (value << 10); | |
| 32 | } | |
| 33 | static void I_bits_set(UINT8 value) | |
| 34 | { | |
| 35 | value = value & 0x03; | |
| 36 | SR &= ~(0x0300); | |
| 37 | SR |= (value << 8); | |
| 38 | } | |
| 39 | static void S_bit_set(UINT8 value) | |
| 40 | { | |
| 41 | value = value & 0x01; | |
| 42 | SR &= ~(0x0080); | |
| 43 | SR |= (value << 7); | |
| 44 | } | |
| 45 | static void L_bit_set(UINT8 value) | |
| 46 | { | |
| 47 | value = value & 0x01; | |
| 48 | SR &= ~(0x0040); | |
| 49 | SR |= (value << 6); | |
| 50 | } | |
| 51 | static void E_bit_set(UINT8 value) | |
| 52 | { | |
| 53 | value = value & 0x01; | |
| 54 | SR &= ~(0x0020); | |
| 55 | SR |= (value << 5); | |
| 56 | } | |
| 57 | static void U_bit_set(UINT8 value) | |
| 58 | { | |
| 59 | value = value & 0x01; | |
| 60 | SR &= ~(0x0010); | |
| 61 | SR |= (value << 4); | |
| 62 | } | |
| 22 | 63 | static void N_bit_set(UINT8 value) |
| 23 | 64 | { |
| 24 | 65 | value = value & 0x01; |
| r3373 | r3374 | |
| 49 | 90 | static UINT8 MB_bit(void) { return ((OMR & 0x0002) != 0); } // #define mbBIT ((OMR & 0x0002) != 0) |
| 50 | 91 | static UINT8 MA_bit(void) { return ((OMR & 0x0001) != 0); } // #define maBIT ((OMR & 0x0001) != 0) |
| 51 | 92 | |
| 52 | static void MC_bit_set(UINT8 value) { if (value) (OMR |= 0x0004); else (OMR &= (~0x0004)); } //#define mcBIT_CLEAR() (OMR &= (~0x0004)) //#define mcBIT_SET() (OMR |= 0x0004) | |
| 53 | static void MB_bit_set(UINT8 value) { if (value) (OMR |= 0x0002); else (OMR &= (~0x0002)); } //#define mbBIT_CLEAR() (OMR &= (~0x0002)) //#define mbBIT_SET() (OMR |= 0x0002) | |
| 54 | static void MA_bit_set(UINT8 value) { if (value) (OMR |= 0x0001); else (OMR &= (~0x0001)); } //#define maBIT_CLEAR() (OMR &= (~0x0001)) //#define maBIT_SET() (OMR |= 0x0001) | |
| 93 | static void CD_bit_set(UINT8 value) { if (value) (OMR |= 0x0080); else (OMR &= (~0x0080)); } | |
| 94 | static void SD_bit_set(UINT8 value) { if (value) (OMR |= 0x0040); else (OMR &= (~0x0040)); } | |
| 95 | static void R_bit_set(UINT8 value) { if (value) (OMR |= 0x0020); else (OMR &= (~0x0020)); } | |
| 96 | static void SA_bit_set(UINT8 value) { if (value) (OMR |= 0x0010); else (OMR &= (~0x0010)); } | |
| 97 | static void MC_bit_set(UINT8 value) { if (value) (OMR |= 0x0004); else (OMR &= (~0x0004)); } | |
| 98 | static void MB_bit_set(UINT8 value) { if (value) (OMR |= 0x0002); else (OMR &= (~0x0002)); } | |
| 99 | static void MA_bit_set(UINT8 value) { if (value) (OMR |= 0x0001); else (OMR &= (~0x0001)); } | |
| 55 | 100 | |
| 56 | 101 | |
| 57 | 102 | /* Stack Pointer */ |
| r3373 | r3374 | |
| 165 | 210 | // 1-17 Clear Interrupt Priority Register (IPR) |
| 166 | 211 | IPR = 0x0000; |
| 167 | 212 | |
| 213 | // FM.5-4 | |
| 214 | // I_bits_set(0x03); This is what the manual says, but i'm dubious! Polygonet's HI interrupt wouldn't happen with the I bits set. | |
| 215 | I_bits_set(0x00); | |
| 216 | S_bits_set(0); | |
| 217 | L_bit_set(0); | |
| 218 | S_bit_set(0); | |
| 219 | FV_bit_set(0); | |
| 220 | ||
| 221 | // FM.7-25 | |
| 222 | E_bit_set(0); | |
| 223 | U_bit_set(0); | |
| 224 | N_bit_set(0); | |
| 225 | V_bit_set(0); | |
| 226 | Z_bit_set(0); | |
| 227 | ||
| 228 | // FM.5-4+ | |
| 229 | C_bit_set(0); | |
| 230 | LF_bit_set(0); | |
| 231 | SP = 0x0000; | |
| 232 | ||
| 233 | // FM.5-14 (OMR) | |
| 234 | SA_bit_set(0); | |
| 235 | R_bit_set(0); | |
| 236 | SD_bit_set(0); | |
| 237 | CD_bit_set(0); | |
| 238 | ||
| 168 | 239 | // Clear out the pending interrupt list |
| 169 | 240 | dsp56k_clear_pending_interrupts(); |
| 170 | 241 | } |
| r3373 | r3374 | |
|---|---|---|
| 125 | 125 | // Used in loop processing |
| 126 | 126 | UINT16 temp; |
| 127 | 127 | |
| 128 | // FM.4-5 - hmmm? | |
| 129 | // UINT8 status; | |
| 130 | ||
| 128 | 131 | // Basics |
| 129 | 132 | } dsp56k_agu; |
| 130 | 133 | |
| r3373 | r3374 | |
| 398 | 401 | //core.irq_callback = irqcallback; |
| 399 | 402 | } |
| 400 | 403 | |
| 404 | static void agu_reset(void) | |
| 405 | { | |
| 406 | // FM.4-3 | |
| 407 | R0 = 0x0000; | |
| 408 | R1 = 0x0000; | |
| 409 | R2 = 0x0000; | |
| 410 | R3 = 0x0000; | |
| 411 | ||
| 412 | N0 = 0x0000; | |
| 413 | N1 = 0x0000; | |
| 414 | N2 = 0x0000; | |
| 415 | N3 = 0x0000; | |
| 416 | ||
| 417 | M0 = 0xffff; | |
| 418 | M1 = 0xffff; | |
| 419 | M2 = 0xffff; | |
| 420 | M3 = 0xffff; | |
| 421 | ||
| 422 | TEMP = 0x0000; | |
| 423 | } | |
| 424 | ||
| 425 | static void alu_reset(void) | |
| 426 | { | |
| 427 | X = 0x00000000; | |
| 428 | Y = 0x00000000; | |
| 429 | A = 0x0000000000; | |
| 430 | B = 0x0000000000; | |
| 431 | } | |
| 432 | ||
| 433 | ||
| 401 | 434 | static void dsp56k_reset(void) |
| 402 | 435 | { |
| 403 | 436 | logerror("Dsp56k reset\n"); |
| r3373 | r3374 | |
| 410 | 443 | |
| 411 | 444 | pcu_reset(); |
| 412 | 445 | mem_reset(); |
| 413 | //agu_reset(); | |
| 414 | //alu_reset(); | |
| 446 | agu_reset(); | |
| 447 | alu_reset(); | |
| 415 | 448 | |
| 416 | 449 | /* HACK - Put a jump to 0x0000 at 0x0000 - this keeps the CPU put in MAME */ |
| 417 | 450 | program_write_word_16le(0x0000, 0x0124); |
| r3373 | r3374 | |
|---|---|---|
| 25 | 25 | z80_daisy_state *head = NULL; |
| 26 | 26 | z80_daisy_state **tailptr = &head; |
| 27 | 27 | |
| 28 | /* create a linked list of devices */ | |
| 28 | /* create a linked list of devices */ | |
| 29 | 29 | for ( ; daisy->devtype != NULL; daisy++) |
| 30 | 30 | { |
| 31 | 31 | *tailptr = auto_malloc(sizeof(**tailptr)); |
| r3373 | r3374 | |
| 36 | 36 | (*tailptr)->irq_reti = (z80_daisy_irq_reti)device_get_info_fct((*tailptr)->device, DEVINFO_FCT_IRQ_RETI); |
| 37 | 37 | tailptr = &(*tailptr)->next; |
| 38 | 38 | } |
| 39 | ||
| 39 | ||
| 40 | 40 | return head; |
| 41 | 41 | } |
| 42 | 42 |
| r3373 | r3374 | |
|---|---|---|
| 702 | 702 | /* allocate new stuff */ |
| 703 | 703 | state->bitmap = bitmap_alloc(cellxpix * xcells, cellypix * ycells, BITMAP_FORMAT_ARGB32); |
| 704 | 704 | state->texture = render_texture_alloc(NULL, NULL); |
| 705 | render_texture_set_bitmap(state->texture, state->bitmap, NULL, | |
| 705 | render_texture_set_bitmap(state->texture, state->bitmap, NULL, | |
| 706 | 706 | |
| 707 | 707 | /* force a redraw */ |
| 708 | 708 | state->bitmap_dirty = TRUE; |
| r3373 | r3374 | |
| 750 | 750 | } |
| 751 | 751 | |
| 752 | 752 | /* reset the texture to force an update */ |
| 753 | render_texture_set_bitmap(state->texture, state->bitmap, NULL, | |
| 753 | render_texture_set_bitmap(state->texture, state->bitmap, NULL, | |
| 754 | 754 | state->bitmap_dirty = FALSE; |
| 755 | 755 | } |
| 756 | 756 | } |
| r3373 | r3374 | |
| 1034 | 1034 | static void tilemap_update_bitmap(running_machine *machine, ui_gfx_state *state, int width, int height) |
| 1035 | 1035 | { |
| 1036 | 1036 | bitmap_format screen_format = video_screen_get_format(machine->primary_screen); |
| 1037 | palette_t *palette = NULL; | |
| 1037 | 1038 | int screen_texformat; |
| 1038 | 1039 | |
| 1039 | 1040 | /* convert the screen format to a texture format */ |
| 1040 | 1041 | switch (screen_format) |
| 1041 | 1042 | { |
| 1042 | case BITMAP_FORMAT_INDEXED16: screen_texformat = TEXFORMAT_PALETTE16; break; | |
| 1043 | case BITMAP_FORMAT_RGB15: screen_texformat = TEXFORMAT_RGB15; break; | |
| 1044 | case BITMAP_FORMAT_RGB32: screen_texformat = TEXFORMAT_RGB32; break; | |
| 1045 | default: fatalerror("Invalid bitmap format!"); break; | |
| 1043 | case BITMAP_FORMAT_INDEXED16: screen_texformat = TEXFORMAT_PALETTE16; palette = machine->palette; break; | |
| 1044 | case BITMAP_FORMAT_RGB15: screen_texformat = TEXFORMAT_RGB15; palette = NULL; break; | |
| 1045 | case BITMAP_FORMAT_RGB32: screen_texformat = TEXFORMAT_RGB32; palette = NULL; break; | |
| 1046 | default: fatalerror("Invalid bitmap format!"); break; | |
| 1046 | 1047 | } |
| 1047 | 1048 | |
| 1048 | 1049 | /* swap the coordinates back if they were talking about a rotated surface */ |
| r3373 | r3374 | |
| 1061 | 1062 | /* allocate new stuff */ |
| 1062 | 1063 | state->bitmap = bitmap_alloc(width, height, screen_format); |
| 1063 | 1064 | state->texture = render_texture_alloc(NULL, NULL); |
| 1064 | render_texture_set_bitmap(state->texture, state->bitmap, NULL, | |
| 1065 | render_texture_set_bitmap(state->texture, state->bitmap, NULL, | |
| 1065 | 1066 | |
| 1066 | 1067 | /* force a redraw */ |
| 1067 | 1068 | state->bitmap_dirty = TRUE; |
| r3373 | r3374 | |
| 1073 | 1074 | tilemap_draw_by_index(state->bitmap, state->tilemap.which, state->tilemap.xoffs, state->tilemap.yoffs); |
| 1074 | 1075 | |
| 1075 | 1076 | /* reset the texture to force an update */ |
| 1076 | render_texture_set_bitmap(state->texture, state->bitmap, NULL, | |
| 1077 | render_texture_set_bitmap(state->texture, state->bitmap, NULL, | |
| 1077 | 1078 | state->bitmap_dirty = FALSE; |
| 1078 | 1079 | } |
| 1079 | 1080 | } |
| r3373 | r3374 | |
|---|---|---|
| 392 | 392 | */ |
| 393 | 393 | VIDEO_UPDATE( tms9928a ) |
| 394 | 394 | { |
| 395 | INT32 BackColour = tms.Regs[7] & 15; if (!BackColour) BackColour=1; | |
| 396 | palette_set_color(screen->machine, 0, TMS9928A_palette[BackColour]); | |
| 395 | INT32 BackColour = tms.Regs[7] & 15; | |
| 396 | rgb_t oldcolor = palette_get_color(screen->machine, 0); | |
| 397 | 397 | |
| 398 | if (!BackColour) BackColour=1; | |
| 399 | /* note we preserve the alpha here; this is so that it can be controlled independently */ | |
| 400 | /* see cliffhgr.c for an example */ | |
| 401 | palette_set_color(screen->machine, 0, (TMS9928A_palette[BackColour] & MAKE_ARGB(0,255,255,255)) | (oldcolor & MAKE_ARGB(255,0,0,0))); | |
| 402 | ||
| 398 | 403 | if (! (tms.Regs[1] & 0x40)) |
| 399 | 404 | fillbitmap(bitmap, screen->machine->pens[BackColour], cliprect); |
| 400 | 405 | else |
| r3373 | r3374 | |
|---|---|---|
| 149 | 149 | /* tile rendering */ |
| 150 | 150 | static void pixmap_update(tilemap *tmap, const rectangle *cliprect); |
| 151 | 151 | static void tile_update(tilemap *tmap, tilemap_logical_index logindex, UINT32 cached_col, UINT32 cached_row); |
| 152 | static UINT8 tile_draw(tilemap *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags); | |
| 152 | static UINT8 tile_draw(tilemap *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags, UINT8 pen_mask); | |
| 153 | 153 | static UINT8 tile_apply_bitmask(tilemap *tmap, const UINT8 *maskdata, UINT32 x0, UINT32 y0, UINT8 category, UINT8 flags); |
| 154 | 154 | |
| 155 | 155 | /* drawing helpers */ |
| r3373 | r3374 | |
| 315 | 315 | /* set up the tile map callbacks */ |
| 316 | 316 | tmap->tile_get_info = tile_get_info; |
| 317 | 317 | |
| 318 | /* set up the default pen mask */ | |
| 319 | tmap->tileinfo.pen_mask = 0xff; | |
| 320 | ||
| 318 | 321 | /* initialize global states */ |
| 319 | 322 | tmap->enable = TRUE; |
| 320 | 323 | tmap->all_tiles_dirty = TRUE; |
| r3373 | r3374 | |
| 1265 | 1268 | flags = tmap->tileinfo.flags ^ (tmap->attributes & 0x03); |
| 1266 | 1269 | |
| 1267 | 1270 | /* draw the tile, using either direct or transparent */ |
| 1268 | tmap->tileflags[logindex] = tile_draw(tmap, tmap->tileinfo.pen_data + tmap->pen_data_offset, x0, y0, tmap->tileinfo.palette_base, tmap->tileinfo.category, tmap->tileinfo.group, flags); | |
| 1271 | tmap->tileflags[logindex] = tile_draw(tmap, tmap->tileinfo.pen_data + tmap->pen_data_offset, x0, y0, | |
| 1272 | tmap->tileinfo.palette_base, tmap->tileinfo.category, tmap->tileinfo.group, flags, tmap->tileinfo.pen_mask); | |
| 1269 | 1273 | |
| 1270 | 1274 | /* if mask data is specified, apply it */ |
| 1271 | 1275 | if ((flags & (TILE_FORCE_LAYER0 | TILE_FORCE_LAYER1 | TILE_FORCE_LAYER2)) == 0 && tmap->tileinfo.mask_data != NULL) |
| r3373 | r3374 | |
| 1282 | 1286 | the palette_base |
| 1283 | 1287 | -------------------------------------------------*/ |
| 1284 | 1288 | |
| 1285 | static UINT8 tile_draw(tilemap *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags) | |
| 1289 | static UINT8 tile_draw(tilemap *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags, UINT8 pen_mask) | |
| 1286 | 1290 | { |
| 1287 | 1291 | const UINT8 *penmap = tmap->pen_to_flags + group * MAX_PEN_TO_FLAGS; |
| 1288 | 1292 | bitmap_t *flagsmap = tmap->flagsmap; |
| r3373 | r3374 | |
| 1332 | 1336 | { |
| 1333 | 1337 | for (tx = 0; tx < width; tx++) |
| 1334 | 1338 | { |
| 1335 | UINT8 pen = *pendata++; | |
| 1339 | UINT8 pen = (*pendata++) & pen_mask; | |
| 1336 | 1340 | UINT8 map = penmap[pen]; |
| 1337 | 1341 | pixptr[xoffs] = palette_base + pen; |
| 1338 | 1342 | flagsptr[xoffs] = map | category; |
| r3373 | r3374 | |
| 1350 | 1354 | UINT8 data = *pendata++; |
| 1351 | 1355 | UINT8 pen, map; |
| 1352 | 1356 | |
| 1353 | pen = data & 0x0f; | |
| 1357 | pen = (data & 0x0f) & pen_mask; | |
| 1354 | 1358 | map = penmap[pen]; |
| 1355 | 1359 | pixptr[xoffs] = palette_base + pen; |
| 1356 | 1360 | flagsptr[xoffs] = map | category; |
| r3373 | r3374 | |
| 1358 | 1362 | ormask |= map; |
| 1359 | 1363 | xoffs += dx0; |
| 1360 | 1364 | |
| 1361 | pen = data >> 4; | |
| 1365 | pen = (data >> 4) & pen_mask; | |
| 1362 | 1366 | map = penmap[pen]; |
| 1363 | 1367 | pixptr[xoffs] = palette_base + pen; |
| 1364 | 1368 | flagsptr[xoffs] = map | category; |
| r3373 | r3374 | |
|---|---|---|
| 390 | 390 | typedef struct _tile_data tile_data; |
| 391 | 391 | struct _tile_data |
| 392 | 392 | { |
| 393 | const UINT8 * pen_data; /* required */ | |
| 394 | const UINT8 * mask_data; /* required */ | |
| 393 | const UINT8* pen_data; /* required */ | |
| 394 | const UINT8* mask_data; /* required */ | |
| 395 | 395 | pen_t palette_base; /* defaults to 0 */ |
| 396 | UINT8 | |
| 396 | UINT8 | |
| 397 | 397 | UINT8 group; /* defaults to 0; range from 0..TILEMAP_NUM_GROUPS */ |
| 398 | UINT8 flags; /* defaults to 0; one or more of TILE_* flags above */ | |
| 398 | UINT8 flags; /* defaults to 0; one or more of TILE_* flags above */ | |
| 399 | UINT8 pen_mask; /* defaults to 0xff; mask to apply to pen_data while rendering the tile */ | |
| 399 | 400 | }; |
| 400 | 401 | |
| 401 | 402 |
| r3373 | r3374 | |
|---|---|---|
| 384 | 384 | *BITMAP_ADDR32(hilight_bitmap, 0, x) = MAKE_ARGB(alpha,0xff,0xff,0xff); |
| 385 | 385 | } |
| 386 | 386 | hilight_texture = render_texture_alloc(NULL, NULL); |
| 387 | render_texture_set_bitmap(hilight_texture, hilight_bitmap, NULL, | |
| 387 | render_texture_set_bitmap(hilight_texture, hilight_bitmap, NULL, | |
| 388 | 388 | |
| 389 | 389 | /* create a texture for arrow icons */ |
| 390 | 390 | arrow_texture = render_texture_alloc(menu_render_triangle, NULL); |
| r3373 | r3374 | |
|---|---|---|
| 356 | 356 | /* the native target is hard-coded to our internal layout and has all options disabled */ |
| 357 | 357 | if (global.snap_native) |
| 358 | 358 | { |
| 359 | global.snap_target = render_target_alloc(layout_snap, RENDER_CREATE_SINGLE_FILE | RENDER_CREATE_HIDDEN); | |
| 359 | global.snap_target = render_target_alloc(machine, layout_snap, RENDER_CREATE_SINGLE_FILE | RENDER_CREATE_HIDDEN); | |
| 360 | 360 | assert(global.snap_target != NULL); |
| 361 | 361 | render_target_set_layer_config(global.snap_target, 0); |
| 362 | 362 | } |
| r3373 | r3374 | |
| 364 | 364 | /* other targets select the specified view and turn off effects */ |
| 365 | 365 | else |
| 366 | 366 | { |
| 367 | global.snap_target = render_target_alloc(NULL, RENDER_CREATE_HIDDEN); | |
| 367 | global.snap_target = render_target_alloc(machine, NULL, RENDER_CREATE_HIDDEN); | |
| 368 | 368 | assert(global.snap_target != NULL); |
| 369 | 369 | render_target_set_view(global.snap_target, video_get_view_for_target(machine, global.snap_target, viewname, 0, 1)); |
| 370 | 370 | render_target_set_layer_config(global.snap_target, render_target_get_layer_config(global.snap_target) & ~LAYER_CONFIG_ENABLE_SCREEN_OVERLAY); |
| r3373 | r3374 | |
| 722 | 722 | if (state->width > curwidth || state->height > curheight) |
| 723 | 723 | { |
| 724 | 724 | bitmap_format screen_format = config->format; |
| 725 | palette_t *palette; | |
| 725 | 726 | |
| 726 | 727 | /* free what we have currently */ |
| 727 | 728 | if (state->texture[0] != NULL) |
| r3373 | r3374 | |
| 740 | 741 | /* choose the texture format - convert the screen format to a texture format */ |
| 741 | 742 | switch (screen_format) |
| 742 | 743 | { |
| 743 | case BITMAP_FORMAT_INDEXED16: state->texture_format = TEXFORMAT_PALETTE16; break; | |
| 744 | case BITMAP_FORMAT_RGB15: state->texture_format = TEXFORMAT_RGB15; break; | |
| 745 | case BITMAP_FORMAT_RGB32: state->texture_format = TEXFORMAT_RGB32; break; | |
| 746 | default: fatalerror("Invalid bitmap format!"); break; | |
| 744 | case BITMAP_FORMAT_INDEXED16: state->texture_format = TEXFORMAT_PALETTE16; palette = screen->machine->palette; break; | |
| 745 | case BITMAP_FORMAT_RGB15: state->texture_format = TEXFORMAT_RGB15; palette = NULL; break; | |
| 746 | case BITMAP_FORMAT_RGB32: state->texture_format = TEXFORMAT_RGB32; palette = NULL; break; | |
| 747 | default: fatalerror("Invalid bitmap format!"); break; | |
| 747 | 748 | } |
| 748 | 749 | |
| 749 | 750 | /* allocate bitmaps */ |
| r3373 | r3374 | |
| 754 | 755 | |
| 755 | 756 | /* allocate textures */ |
| 756 | 757 | state->texture[0] = render_texture_alloc(NULL, NULL); |
| 757 | render_texture_set_bitmap(state->texture[0], state->bitmap[0], &state->visarea, | |
| 758 | render_texture_set_bitmap(state->texture[0], state->bitmap[0], &state->visarea, | |
| 758 | 759 | state->texture[1] = render_texture_alloc(NULL, NULL); |
| 759 | render_texture_set_bitmap(state->texture[1], state->bitmap[1], &state->visarea, | |
| 760 | render_texture_set_bitmap(state->texture[1], state->bitmap[1], &state->visarea, | |
| 760 | 761 | } |
| 761 | 762 | } |
| 762 | 763 | } |
| r3373 | r3374 | |
| 1572 | 1573 | { |
| 1573 | 1574 | bitmap_t *bitmap = state->bitmap[state->curbitmap]; |
| 1574 | 1575 | rectangle fixedvis = *video_screen_get_visible_area(screen); |
| 1576 | palette_t *palette = (state->texture_format == TEXFORMAT_PALETTE16) ? machine->palette : NULL; | |
| 1577 | ||
| 1575 | 1578 | fixedvis.max_x++; |
| 1576 | 1579 | fixedvis.max_y++; |
| 1577 | render_texture_set_bitmap(state->texture[state->curbitmap], bitmap, &fixedvis, | |
| 1580 | render_texture_set_bitmap(state->texture[state->curbitmap], bitmap, &fixedvis, | |
| 1578 | 1581 | state->curtexture = state->curbitmap; |
| 1579 | 1582 | state->curbitmap = 1 - state->curbitmap; |
| 1580 | 1583 | } |
| r3373 | r3374 | |
| 2539 | 2542 | info.video_depth = 24; |
| 2540 | 2543 | |
| 2541 | 2544 | info.audio_format = 0; |
| 2542 | info.audio_timescale = 1; | |
| 2543 | info.audio_sampletime = machine->sample_rate; | |
| 2545 | info.audio_timescale = machine->sample_rate; | |
| 2546 | info.audio_sampletime = 1; | |
| 2544 | 2547 | info.audio_numsamples = 0; |
| 2545 | 2548 | info.audio_channels = 2; |
| 2546 | 2549 | info.audio_samplebits = 16; |
| r3373 | r3374 | |
|---|---|---|
| 276 | 276 | |
| 277 | 277 | /* wrap a texture around the bitmap */ |
| 278 | 278 | ch->texture = render_texture_alloc(render_texture_hq_scale, NULL); |
| 279 | render_texture_set_bitmap(ch->texture, ch->bitmap, NULL, | |
| 279 | render_texture_set_bitmap(ch->texture, ch->bitmap, NULL, | |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 |
| r3373 | r3374 | |
|---|---|---|
| 524 | 524 | |
| 525 | 525 | INPUT_PORT_DIGITAL_TYPE( 0, OTHER, KEYBOARD, "Keyboard", SEQ_DEF_0 ) |
| 526 | 526 | |
| 527 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_ON_SCREEN_DISPLAY,"On Screen Display", SEQ_DEF_1(KEYCODE_TILDE) ) | |
| 528 | 527 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DEBUG_BREAK, "Break in Debugger", SEQ_DEF_1(KEYCODE_TILDE) ) |
| 529 | 528 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_CONFIGURE, "Config Menu", SEQ_DEF_1(KEYCODE_TAB) ) |
| 530 | 529 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAUSE, "Pause", SEQ_DEF_1(KEYCODE_P) ) |
| r3373 | r3374 | |
| 563 | 562 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TOGGLE_DEBUG, "Toggle Debugger", SEQ_DEF_1(KEYCODE_F5) ) |
| 564 | 563 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SAVE_STATE, "Save State", SEQ_DEF_2(KEYCODE_F7, KEYCODE_LSHIFT) ) |
| 565 | 564 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LOAD_STATE, "Load State", SEQ_DEF_3(KEYCODE_F7, SEQCODE_NOT, KEYCODE_LSHIFT) ) |
| 566 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_ADD_CHEAT, "Add Cheat", SEQ_DEF_1(KEYCODE_A) ) | |
| 567 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DELETE_CHEAT, "Delete Cheat", SEQ_DEF_1(KEYCODE_D) ) | |
| 568 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SAVE_CHEAT, "Save Cheat", SEQ_DEF_1(KEYCODE_S) ) | |
| 569 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_WATCH_VALUE, "Watch Value", SEQ_DEF_1(KEYCODE_W) ) | |
| 570 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_EDIT_CHEAT, "Edit Cheat", SEQ_DEF_1(KEYCODE_E) ) | |
| 571 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RELOAD_CHEAT, "Reload Database", SEQ_DEF_1(KEYCODE_L) ) | |
| 572 | 565 | INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TOGGLE_CROSSHAIR, "Toggle Crosshair", SEQ_DEF_1(KEYCODE_F1) ) |
| 573 | 566 | |
| 574 | 567 | INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_1, NULL, SEQ_DEF_0 ) |
| r3373 | r3374 | |
|---|---|---|
| 99 | 99 | { |
| 100 | 100 | const ppi8255_interface *intf; |
| 101 | 101 | |
| 102 | read8_machine_func port_read[3]; | |
| 103 | write8_machine_func port_write[3]; | |
| 102 | read8_device_func port_read[3]; | |
| 103 | write8_device_func port_write[3]; | |
| 104 | 104 | |
| 105 | 105 | /* mode flags */ |
| 106 | UINT8 groupA_mode; | |
| 107 | UINT8 groupB_mode; | |
| 108 | UINT8 portA_dir; | |
| 109 | UINT8 portB_dir; | |
| 110 | UINT8 portCH_dir; | |
| 111 | UINT8 portCL_dir; | |
| 106 | UINT8 group_a_mode; | |
| 107 | UINT8 group_b_mode; | |
| 108 | UINT8 port_a_dir; | |
| 109 | UINT8 port_b_dir; | |
| 110 | UINT8 port_ch_dir; | |
| 111 | UINT8 port_cl_dir; | |
| 112 | 112 | |
| 113 | 113 | /* handshake signals (1=asserted; 0=non-asserted) */ |
| 114 | 114 | UINT8 obf_a; |
| r3373 | r3374 | |
| 144 | 144 | UINT8 mask = 0x00; |
| 145 | 145 | |
| 146 | 146 | /* group A */ |
| 147 | if (ppi8255->group | |
| 147 | if (ppi8255->group_a_mode == 1) | |
| 148 | 148 | { |
| 149 | if (ppi8255->port | |
| 149 | if (ppi8255->port_a_dir) | |
| 150 | 150 | { |
| 151 | 151 | handshake |= ppi8255->ibf_a ? 0x20 : 0x00; |
| 152 | 152 | handshake |= (ppi8255->ibf_a && ppi8255->inte_a) ? 0x08 : 0x00; |
| r3373 | r3374 | |
| 159 | 159 | mask |= 0x88; |
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | else if (ppi8255->group | |
| 162 | else if (ppi8255->group_a_mode == 2) | |
| 163 | 163 | { |
| 164 | 164 | handshake |= ppi8255->inte_a ? 0x08 : 0x00; |
| 165 | 165 | handshake |= ppi8255->obf_a ? 0x00 : 0x80; |
| r3373 | r3374 | |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /* group B */ |
| 171 | if (ppi8255->group | |
| 171 | if (ppi8255->group_b_mode == 1) | |
| 172 | 172 | { |
| 173 | if (ppi8255->port | |
| 173 | if (ppi8255->port_a_dir) | |
| 174 | 174 | { |
| 175 | 175 | handshake |= ppi8255->ibf_b ? 0x02 : 0x00; |
| 176 | 176 | handshake |= (ppi8255->ibf_b && ppi8255->inte_b) ? 0x01 : 0x00; |
| r3373 | r3374 | |
| 200 | 200 | /* port C is special */ |
| 201 | 201 | if (port == 2) |
| 202 | 202 | { |
| 203 | if (((ppi8255->group | |
| 203 | if (((ppi8255->group | |
| 204 | 204 | { |
| 205 | 205 | /* is !ACKA asserted? */ |
| 206 | 206 | if (ppi8255->obf_a && !(data & 0x40)) |
| r3373 | r3374 | |
| 210 | 210 | } |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | if ((ppi8255->group | |
| 213 | if ((ppi8255->group | |
| 214 | 214 | { |
| 215 | 215 | /* is !ACKB asserted? */ |
| 216 | 216 | if (ppi8255->obf_b && !(data & 0x04)) |
| r3373 | r3374 | |
| 234 | 234 | |
| 235 | 235 | if (ppi8255->in_mask[port]) |
| 236 | 236 | { |
| 237 | if (ppi8255->port_read[port]) | |
| 238 | ppi8255_input(device, port, ppi8255->port_read[port](device->machine, 0)); | |
| 237 | if (ppi8255->port_read[port] != NULL) | |
| 238 | ppi8255_input(device, port, CALL_DEVICE8_READ(ppi8255->port_read[port], device, 0)); | |
| 239 | 239 | |
| 240 | 240 | result |= ppi8255->read[port] & ppi8255->in_mask[port]; |
| 241 | 241 | } |
| r3373 | r3374 | |
| 287 | 287 | ppi8255_get_handshake_signals(ppi8255, 0, &write_data); |
| 288 | 288 | |
| 289 | 289 | ppi8255->output[port] = write_data; |
| 290 | if (ppi8255->port_write[port]) | |
| 291 | ppi8255->port_write[port](device->machine, 0, write_data); | |
| 290 | if (ppi8255->port_write[port] != NULL) | |
| 291 | (*ppi8255->port_write[port])(device, 0, write_data); | |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | |
| r3373 | r3374 | |
| 310 | 310 | switch(offset) |
| 311 | 311 | { |
| 312 | 312 | case 0: |
| 313 | if (!ppi8255->port | |
| 313 | if (!ppi8255->port | |
| 314 | 314 | { |
| 315 | 315 | ppi8255->obf_a = 1; |
| 316 | 316 | ppi8255_write_port(device, 2); |
| r3373 | r3374 | |
| 318 | 318 | break; |
| 319 | 319 | |
| 320 | 320 | case 1: |
| 321 | if (!ppi8255->port | |
| 321 | if (!ppi8255->port | |
| 322 | 322 | { |
| 323 | 323 | ppi8255->obf_b = 1; |
| 324 | 324 | ppi8255_write_port(device, 2); |
| r3373 | r3374 | |
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | |
| 354 | void ppi8255_set_port | |
| 354 | void ppi8255_set_port_a_read(const device_config *device, read8_dev | |
| 355 | 355 | { |
| 356 | 356 | ppi8255_t *ppi8255 = get_safe_token(device); |
| 357 | 357 | |
| 358 | ppi8255->port_read[0] = port | |
| 358 | ppi8255->port_read[0] = port_a_read; | |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | void ppi8255_set_port | |
| 361 | void ppi8255_set_port_b_read(const device_config *device, read8_dev | |
| 362 | 362 | { |
| 363 | 363 | ppi8255_t *ppi8255 = get_safe_token(device); |
| 364 | 364 | |
| 365 | ppi8255->port_read[1] = port | |
| 365 | ppi8255->port_read[1] = port_b_read; | |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | void ppi8255_set_port | |
| 368 | void ppi8255_set_port_c_read(const device_config *device, read8_dev | |
| 369 | 369 | { |
| 370 | 370 | ppi8255_t *ppi8255 = get_safe_token(device); |
| 371 | 371 | |
| 372 | ppi8255->port_read[2] = port | |
| 372 | ppi8255->port_read[2] = port_c_read; | |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | |
| 376 | void ppi8255_set_port | |
| 376 | void ppi8255_set_port_a_write(const device_config *device, write8_dev | |
| 377 | 377 | { |
| 378 | 378 | ppi8255_t *ppi8255 = get_safe_token(device); |
| 379 | 379 | |
| 380 | ppi8255->port_write[0] = port | |
| 380 | ppi8255->port_write[0] = port_a_write; | |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | void ppi8255_set_port | |
| 383 | void ppi8255_set_port_b_write(const device_config *device, write8_dev | |
| 384 | 384 | { |
| 385 | 385 | ppi8255_t *ppi8255 = get_safe_token(device); |
| 386 | 386 | |
| 387 | ppi8255->port_write[1] = port | |
| 387 | ppi8255->port_write[1] = port_b_write; | |
| 388 | 388 | } |
| 389 | 389 | |
| 390 | void ppi8255_set_port | |
| 390 | void ppi8255_set_port_c_write(const device_config *device, write8_dev | |
| 391 | 391 | { |
| 392 | 392 | ppi8255_t *ppi8255 = get_safe_token(device); |
| 393 | 393 | |
| 394 | ppi8255->port_write[2] = port | |
| 394 | ppi8255->port_write[2] = port_c_write; | |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | |
| r3373 | r3374 | |
| 401 | 401 | int i; |
| 402 | 402 | |
| 403 | 403 | /* parse out mode */ |
| 404 | ppi8255->groupA_mode = (data >> 5) & 3; | |
| 405 | ppi8255->groupB_mode = (data >> 2) & 1; | |
| 406 | ppi8255->portA_dir = (data >> 4) & 1; | |
| 407 | ppi8255->portB_dir = (data >> 1) & 1; | |
| 408 | ppi8255->portCH_dir = (data >> 3) & 1; | |
| 409 | ppi8255->portCL_dir = (data >> 0) & 1; | |
| 404 | ppi8255->group_a_mode = (data >> 5) & 3; | |
| 405 | ppi8255->group_b_mode = (data >> 2) & 1; | |
| 406 | ppi8255->port_a_dir = (data >> 4) & 1; | |
| 407 | ppi8255->port_b_dir = (data >> 1) & 1; | |
| 408 | ppi8255->port_ch_dir = (data >> 3) & 1; | |
| 409 | ppi8255->port_cl_dir = (data >> 0) & 1; | |
| 410 | 410 | |
| 411 | /* normalize groupA_mode */ | |
| 412 | if (ppi8255->groupA_mode == 3) | |
| 413 | ppi8255->groupA_mode = 2; | |
| 411 | /* normalize group_a_mode */ | |
| 412 | if (ppi8255->group_a_mode == 3) | |
| 413 | ppi8255->group_a_mode = 2; | |
| 414 | 414 | |
| 415 | 415 | /* Port A direction */ |
| 416 | if (ppi8255->port | |
| 416 | if (ppi8255->port_a_dir) | |
| 417 | 417 | ppi8255->in_mask[0] = 0xFF, ppi8255->out_mask[0] = 0x00; /* input */ |
| 418 | 418 | else |
| 419 | 419 | ppi8255->in_mask[0] = 0x00, ppi8255->out_mask[0] = 0xFF; /* output */ |
| 420 | 420 | |
| 421 | 421 | /* Port B direction */ |
| 422 | if (ppi8255->port | |
| 422 | if (ppi8255->port_b_dir) | |
| 423 | 423 | ppi8255->in_mask[1] = 0xFF, ppi8255->out_mask[1] = 0x00; /* input */ |
| 424 | 424 | else |
| 425 | 425 | ppi8255->in_mask[1] = 0x00, ppi8255->out_mask[1] = 0xFF; /* output */ |
| 426 | 426 | |
| 427 | 427 | /* Port C upper direction */ |
| 428 | if (ppi8255->port | |
| 428 | if (ppi8255->port_ch_dir) | |
| 429 | 429 | ppi8255->in_mask[2] = 0xF0, ppi8255->out_mask[2] = 0x00; /* input */ |
| 430 | 430 | else |
| 431 | 431 | ppi8255->in_mask[2] = 0x00, ppi8255->out_mask[2] = 0xF0; /* output */ |
| 432 | 432 | |
| 433 | 433 | /* Port C lower direction */ |
| 434 | if (ppi8255->port | |
| 434 | if (ppi8255->port_cl_dir) | |
| 435 | 435 | ppi8255->in_mask[2] |= 0x0F; /* input */ |
| 436 | 436 | else |
| 437 | 437 | ppi8255->out_mask[2] |= 0x0F; /* output */ |
| 438 | 438 | |
| 439 | 439 | /* now depending on the group modes, certain Port C lines may be replaced |
| 440 | 440 | * with varying control signals */ |
| 441 | switch(ppi8255->group | |
| 441 | switch(ppi8255->group_a_mode) | |
| 442 | 442 | { |
| 443 | 443 | case 0: /* Group A mode 0 */ |
| 444 | 444 | /* no changes */ |
| r3373 | r3374 | |
| 457 | 457 | break; |
| 458 | 458 | } |
| 459 | 459 | |
| 460 | switch(ppi8255->group | |
| 460 | switch(ppi8255->group_b_mode) | |
| 461 | 461 | { |
| 462 | 462 | case 0: /* Group B mode 0 */ |
| 463 | 463 | /* no changes */ |
| r3373 | r3374 | |
| 481 | 481 | } |
| 482 | 482 | |
| 483 | 483 | |
| 484 | void ppi8255_set_portA( const device_config *device, UINT8 data ) { ppi8255_input(device, 0, data); } | |
| 485 | void ppi8255_set_portB( const device_config *device, UINT8 data ) { ppi8255_input(device, 1, data); } | |
| 486 | void ppi8255_set_portC( const device_config *device, UINT8 data ) { ppi8255_input(device, 2, data); } | |
| 484 | void ppi8255_set_port_a( const device_config *device, UINT8 data ) { ppi8255_input(device, 0, data); } | |
| 485 | void ppi8255_set_port_b( const device_config *device, UINT8 data ) { ppi8255_input(device, 1, data); } | |
| 486 | void ppi8255_set_port_c( const device_config *device, UINT8 data ) { ppi8255_input(device, 2, data); } | |
| 487 | 487 | |
| 488 | UINT8 ppi8255_get_port | |
| 488 | UINT8 ppi8255_get_port_a( const device_config *device ) { | |
| 489 | 489 | ppi8255_t *ppi8255 = get_safe_token(device); |
| 490 | 490 | |
| 491 | 491 | return ppi8255->output[0]; |
| 492 | 492 | } |
| 493 | 493 | |
| 494 | UINT8 ppi8255_get_port | |
| 494 | UINT8 ppi8255_get_port_b( const device_config *device ) { | |
| 495 | 495 | ppi8255_t *ppi8255 = get_safe_token(device); |
| 496 | 496 | |
| 497 | 497 | return ppi8255->output[1]; |
| 498 | 498 | } |
| 499 | 499 | |
| 500 | UINT8 ppi8255_get_port | |
| 500 | UINT8 ppi8255_get_port_c( const device_config *device ) { | |
| 501 | 501 | ppi8255_t *ppi8255 = get_safe_token(device); |
| 502 | 502 | |
| 503 | 503 | return ppi8255->output[2]; |
| r3373 | r3374 | |
| 510 | 510 | |
| 511 | 511 | ppi8255->intf = device->static_config; |
| 512 | 512 | |
| 513 | ppi8255->port_read[0] = ppi8255->intf->portAread; | |
| 514 | ppi8255->port_read[1] = ppi8255->intf->portBread; | |
| 515 | ppi8255->port_read[2] = ppi8255->intf->portCread; | |
| 513 | ppi8255->port_read[0] = ppi8255->intf->port_a_read; | |
| 514 | ppi8255->port_read[1] = ppi8255->intf->port_b_read; | |
| 515 | ppi8255->port_read[2] = ppi8255->intf->port_c_read; | |
| 516 | 516 | |
| 517 | ppi8255->port_write[0] = ppi8255->intf->portAwrite; | |
| 518 | ppi8255->port_write[1] = ppi8255->intf->portBwrite; | |
| 519 | ppi8255->port_write[2] = ppi8255->intf->portCwrite; | |
| 517 | ppi8255->port_write[0] = ppi8255->intf->port_a_write; | |
| 518 | ppi8255->port_write[1] = ppi8255->intf->port_b_write; | |
| 519 | ppi8255->port_write[2] = ppi8255->intf->port_c_write; | |
| 520 | 520 | |
| 521 | 521 | /* register for state saving */ |
| 522 | 522 | state_save_combine_module_and_tag(unique_tag, "ppi8255", device->tag); |
| 523 | 523 | |
| 524 | state_save_register_item(unique_tag, 0, ppi8255->groupA_mode); | |
| 525 | state_save_register_item(unique_tag, 0, ppi8255->groupB_mode); | |
| 526 | state_save_register_item(unique_tag, 0, ppi8255->portA_dir); | |
| 527 | state_save_register_item(unique_tag, 0, ppi8255->portB_dir); | |
| 528 | state_save_register_item(unique_tag, 0, ppi8255->portCH_dir); | |
| 529 | state_save_register_item(unique_tag, 0, ppi8255->portCL_dir); | |
| 524 | state_save_register_item(unique_tag, 0, ppi8255->group_a_mode); | |
| 525 | state_save_register_item(unique_tag, 0, ppi8255->group_b_mode); | |
| 526 | state_save_register_item(unique_tag, 0, ppi8255->port_a_dir); | |
| 527 | state_save_register_item(unique_tag, 0, ppi8255->port_b_dir); | |
| 528 | state_save_register_item(unique_tag, 0, ppi8255->port_ch_dir); | |
| 529 | state_save_register_item(unique_tag, 0, ppi8255->port_cl_dir); | |
| 530 | 530 | state_save_register_item(unique_tag, 0, ppi8255->obf_a); |
| 531 | 531 | state_save_register_item(unique_tag, 0, ppi8255->obf_b); |
| 532 | 532 | state_save_register_item(unique_tag, 0, ppi8255->ibf_a); |
| r3373 | r3374 | |
| 546 | 546 | ppi8255_t *ppi8255 = get_safe_token(device); |
| 547 | 547 | int i; |
| 548 | 548 | |
| 549 | ppi8255->groupA_mode = 0; | |
| 550 | ppi8255->groupB_mode = 0; | |
| 551 | ppi8255->portA_dir = 0; | |
| 552 | ppi8255->portB_dir = 0; | |
| 553 | ppi8255->portCH_dir = 0; | |
| 554 | ppi8255->portCL_dir = 0; | |
| 549 | ppi8255->group_a_mode = 0; | |
| 550 | ppi8255->group_b_mode = 0; | |
| 551 | ppi8255->port_a_dir = 0; | |
| 552 | ppi8255->port_b_dir = 0; | |
| 553 | ppi8255->port_ch_dir = 0; | |
| 554 | ppi8255->port_cl_dir = 0; | |
| 555 | 555 | ppi8255->obf_a = ppi8255->ibf_a = ppi8255->inte_a = 0; |
| 556 | 556 | ppi8255->obf_b = ppi8255->ibf_b = ppi8255->inte_b = 0; |
| 557 | 557 |
| r3373 | r3374 | |
|---|---|---|
| 12 | 12 | #define PPI8255 DEVICE_GET_INFO_NAME(ppi8255) |
| 13 | 13 | |
| 14 | 14 | |
| 15 | typedef struct | |
| 15 | /*************************************************************************** | |
| 16 | TYPE DEFINITIONS | |
| 17 | ***************************************************************************/ | |
| 18 | ||
| 19 | typedef struct _ppi8255_interface ppi8255_interface; | |
| 20 | struct _ppi8255_interface | |
| 16 | 21 | { |
| 17 | read8_machine_func portAread; | |
| 18 | read8_machine_func portBread; | |
| 19 | read8_machine_func portCread; | |
| 20 | write8_machine_func portAwrite; | |
| 21 | write8_machine_func portBwrite; | |
| 22 | write8_machine_func portCwrite; | |
| 23 | } ppi8255_interface; | |
| 22 | read8_device_func port_a_read; | |
| 23 | read8_device_func port_b_read; | |
| 24 | read8_device_func port_c_read; | |
| 25 | write8_device_func port_a_write; | |
| 26 | write8_device_func port_b_write; | |
| 27 | write8_device_func port_c_write; | |
| 28 | }; | |
| 24 | 29 | |
| 25 | 30 | |
| 31 | /*************************************************************************** | |
| 32 | DEVICE CONFIGURATION MACROS | |
| 33 | ***************************************************************************/ | |
| 34 | ||
| 35 | #define MDRV_PPI8255_ADD(_tag, _intrf) \ | |
| 36 | MDRV_DEVICE_ADD(_tag, PPI8255) \ | |
| 37 | MDRV_DEVICE_CONFIG(_intrf) | |
| 38 | ||
| 39 | #define MDRV_PPI8255_RECONFIG(_tag, _intrf) \ | |
| 40 | MDRV_DEVICE_MODIFY(_tag, PPI8255) \ | |
| 41 | MDRV_DEVICE_CONFIG(_intrf) | |
| 42 | ||
| 43 | #define MDRV_PPI8255_REMOVE(_tag) \ | |
| 44 | MDRV_DEVICE_REMOVE(_tag, PPI8255) | |
| 45 | ||
| 46 | ||
| 47 | ||
| 26 | 48 | /* device interface */ |
| 27 | 49 | DEVICE_GET_INFO(ppi8255); |
| 28 | 50 | |
| r3373 | r3374 | |
| 30 | 52 | WRITE8_DEVICE_HANDLER( ppi8255_w ); |
| 31 | 53 | |
| 32 | 54 | |
| 33 | void ppi8255_set_portAread( const device_config *device, read8_machine_func portAread ); | |
| 34 | void ppi8255_set_portBread( const device_config *device, read8_machine_func portBread ); | |
| 35 | void ppi8255_set_portCread( const device_config *device, read8_machine_func portCread ); | |
| 55 | void ppi8255_set_port_a_read( const device_config *device, read8_device_func port_a_read ); | |
| 56 | void ppi8255_set_port_b_read( const device_config *device, read8_device_func port_b_read ); | |
| 57 | void ppi8255_set_port_c_read( const device_config *device, read8_device_func port_c_read ); | |
| 36 | 58 | |
| 37 | void ppi8255_set_portAwrite( const device_config *device, write8_machine_func portAwrite ); | |
| 38 | void ppi8255_set_portBwrite( const device_config *device, write8_machine_func portBwrite ); | |
| 39 | void ppi8255_set_portCwrite( const device_config *device, write8_machine_func portCwrite ); | |
| 59 | void ppi8255_set_port_a_write( const device_config *device, write8_device_func port_a_write ); | |
| 60 | void ppi8255_set_port_b_write( const device_config *device, write8_device_func port_b_write ); | |
| 61 | void ppi8255_set_port_c_write( const device_config *device, write8_device_func port_c_write ); | |
| 40 | 62 | |
| 41 | void ppi8255_set_portA( const device_config *device, UINT8 data ); | |
| 42 | void ppi8255_set_portB( const device_config *device, UINT8 data ); | |
| 43 | void ppi8255_set_portC( const device_config *device, UINT8 data ); | |
| 63 | void ppi8255_set_port_a( const device_config *device, UINT8 data ); | |
| 64 | void ppi8255_set_port_b( const device_config *device, UINT8 data ); | |
| 65 | void ppi8255_set_port_c( const device_config *device, UINT8 data ); | |
| 44 | 66 | |
| 45 | UINT8 ppi8255_get_portA( const device_config *device ); | |
| 46 | UINT8 ppi8255_get_portB( const device_config *device ); | |
| 47 | UINT8 ppi8255_get_portC( const device_config *device ); | |
| 67 | UINT8 ppi8255_get_port_a( const device_config *device ); | |
| 68 | UINT8 ppi8255_get_port_b( const device_config *device ); | |
| 69 | UINT8 ppi8255_get_port_c( const device_config *device ); | |
| 48 | 70 | |
| 49 | 71 | #endif /* __8255PPI_H_ */ |
| r3373 | r3374 | |
|---|---|---|
| 107 | 107 | /* video updating */ |
| 108 | 108 | UINT8 videoenable; /* is video enabled? */ |
| 109 | 109 | render_texture * videotex; /* texture for the video */ |
| 110 | palette_t * videopalette; /* palette for the video */ | |
| 110 | 111 | UINT8 overenable; /* is the overlay enabled? */ |
| 111 | 112 | bitmap_t * overbitmap[2]; /* overlay bitmaps */ |
| 112 | 113 | int overindex; /* index of the overlay bitmap */ |
| r3373 | r3374 | |
| 889 | 890 | ldcore_data *ldcore = ld->core; |
| 890 | 891 | UINT32 tracknum = ldcore->curtrack; |
| 891 | 892 | UINT32 fieldnum = ldcore->fieldnum; |
| 892 | | |
| 893 | vb | |
| 893 | 894 | frame_data *frame; |
| 894 | 895 | UINT32 vbiframe; |
| 895 | 896 | UINT32 readhunk; |
| 896 | 897 | INT32 chdtrack; |
| 897 | 898 | |
| 898 | frame = &ldcore->frame[ldcore->videoindex]; | |
| 899 | /* compute the chdhunk number we are going to read */ | |
| 900 | chdtrack = tracknum - 1 - VIRTUAL_LEAD_IN_TRACKS; | |
| 901 | chdtrack = MAX(chdtrack, 0); | |
| 902 | chdtrack = MIN(chdtrack, ldcore->chdtracks - 1); | |
| 903 | readhunk = chdtrack * 2 + fieldnum; | |
| 899 | 904 | |
| 900 | /* special cases for playing forward */ | |
| 901 | if (curfield == frame->lastfield + 1) | |
| 902 | { | |
| 903 | /* if the previous field had a frame number, force the new field to pair with the previous one */ | |
| 904 | if ((ldcore->metadata[fieldnum ^ 1].line1718 & VBI_MASK_CAV_PICTURE) == VBI_CODE_CAV_PICTURE) | |
| 905 | frame->numfields = 1; | |
| 905 | /* cheat and look up the metadata we are about to retrieve */ | |
| 906 | if (ldcore->vbidata != NULL) | |
| 907 | vbi_metadata_unpack(&vbidata, NULL, &ldcore->vbidata[readhunk * VBI_PACKED_BYTES]); | |
| 906 | 908 | |
| 907 | /* if the twice-previous field was a frame number, and we've moved one since then, consider this one done */ | |
| 908 | else if (frame->numfields >= 2 && (ldcore->metadata[fieldnum].line1718 & VBI_MASK_CAV_PICTURE) == VBI_CODE_CAV_PICTURE) | |
| 909 | { | |
| 910 | ldcore->videoindex = (ldcore->videoindex + 1) % ARRAY_LENGTH(ldcore->frame); | |
| 911 | frame = &ldcore->frame[ldcore->videoindex]; | |
| 912 | frame->numfields = 0; | |
| 913 | } | |
| 914 | } | |
| 915 | ||
| 916 | /* all other cases */ | |
| 917 | else | |
| 909 | /* if we're about to read the first field in a frame, advance */ | |
| 910 | frame = &ldcore->frame[ldcore->videoindex]; | |
| 911 | if ((vbidata.line1718 & VBI_MASK_CAV_PICTURE) == VBI_CODE_CAV_PICTURE) | |
| 918 | 912 | { |
| 919 | /* otherwise, keep the frames in sync with the absolute field numbers */ | |
| 920 | if (frame->numfields == 2 && fieldnum != 0) | |
| 921 | frame->numfields--; | |
| 922 | ||
| 923 | /* if we already have both fields on the current videoindex, advance */ | |
| 924 | else if (frame->numfields >= 2) | |
| 925 | { | |
| 913 | if (frame->numfields >= 2) | |
| 926 | 914 | ldcore->videoindex = (ldcore->videoindex + 1) % ARRAY_LENGTH(ldcore->frame); |
| 927 | frame = &ldcore->frame[ldcore->videoindex]; | |
| 928 | frame->numfields = 0; | |
| 929 | } | |
| 915 | frame = &ldcore->frame[ldcore->videoindex]; | |
| 916 | frame->numfields = 0; | |
| 930 | 917 | } |
| 931 | 918 | |
| 932 | 919 | /* if we're squelched, reset the frame counter */ |
| r3373 | r3374 | |
| 962 | 949 | ldcore->avconfig.actsamples = &ldcore->audiocursamples; |
| 963 | 950 | ldcore->audiocursamples = 0; |
| 964 | 951 | |
| 965 | /* compute the chdhunk number we are going to read */ | |
| 966 | chdtrack = tracknum - 1 - VIRTUAL_LEAD_IN_TRACKS; | |
| 967 | chdtrack = MAX(chdtrack, 0); | |
| 968 | chdtrack = MIN(chdtrack, ldcore->chdtracks - 1); | |
| 969 | readhunk = chdtrack * 2 + fieldnum; | |
| 970 | ||
| 971 | 952 | /* set the VBI data for the new field from our precomputed data */ |
| 972 | 953 | if (ldcore->vbidata != NULL) |
| 973 | 954 | vbi_metadata_unpack(&ldcore->metadata[fieldnum], &vbiframe, &ldcore->vbidata[readhunk * VBI_PACKED_BYTES]); |
| r3373 | r3374 | |
| 1363 | 1344 | /* if this is the last update, do the rendering */ |
| 1364 | 1345 | if (cliprect->max_y == visarea->max_y) |
| 1365 | 1346 | { |
| 1366 | float x0, y0, x1, y1; | |
| 1367 | ||
| 1368 | 1347 | /* update the texture with the overlay contents */ |
| 1369 | 1348 | if (overbitmap != NULL) |
| 1370 | 1349 | { |
| 1371 | 1350 | if (overbitmap->format == BITMAP_FORMAT_INDEXED16) |
| 1372 | render_texture_set_bitmap(ldcore->overtex, overbitmap, &ldcore->config.overclip, | |
| 1351 | render_texture_set_bitmap(ldcore->overtex, overbitmap, &ldcore->config.overclip, | |
| 1373 | 1352 | else if (overbitmap->format == BITMAP_FORMAT_RGB32) |
| 1374 | render_texture_set_bitmap(ldcore->overtex, overbitmap, &ldcore->config.overclip, | |
| 1353 | render_texture_set_bitmap(ldcore->overtex, overbitmap, &ldcore->config.overclip, | |
| 1375 | 1354 | } |
| 1376 | 1355 | |
| 1377 | 1356 | /* get the laserdisc video */ |
| 1378 | 1357 | laserdisc_get_video(laserdisc, &vidbitmap); |
| 1379 | 1358 | if (vidbitmap != NULL) |
| 1380 | render_texture_set_bitmap(ldcore->videotex, vidbitmap, NULL, | |
| 1359 | render_texture_set_bitmap(ldcore->videotex, vidbitmap, NULL, | |
| 1381 | 1360 | |
| 1382 | 1361 | /* reset the screen contents */ |
| 1383 | 1362 | render_container_empty(render_container_get_screen(screen)); |
| r3373 | r3374 | |
| 1389 | 1368 | /* add the overlay */ |
| 1390 | 1369 | if (ldcore->overenable && overbitmap != NULL) |
| 1391 | 1370 | { |
| 1392 | x0 = 0.5f - 0.5f * ldcore->config.overscalex + ldcore->config.overposx; | |
| 1393 | y0 = 0.5f - 0.5f * ldcore->config.overscaley + ldcore->config.overposy; | |
| 1394 | x1 = x0 + ldcore->config.overscalex; | |
| 1395 | y1 = y0 + ldcore->config.overscaley; | |
| 1371 | float x0 = 0.5f - 0.5f * ldcore->config.overscalex + ldcore->config.overposx; | |
| 1372 | float y0 = 0.5f - 0.5f * ldcore->config.overscaley + ldcore->config.overposy; | |
| 1373 | float x1 = x0 + ldcore->config.overscalex; | |
| 1374 | float y1 = y0 + ldcore->config.overscaley; | |
| 1396 | 1375 | render_screen_add_quad(screen, x0, y0, x1, y1, MAKE_ARGB(0xff,0xff,0xff,0xff), ldcore->overtex, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1)); |
| 1397 | 1376 | } |
| 1398 | 1377 | |
| r3373 | r3374 | |
| 1542 | 1521 | if (ldcore->videotex == NULL) |
| 1543 | 1522 | fatalerror("Out of memory allocating video texture"); |
| 1544 | 1523 | |
| 1524 | /* allocate palette for applying brightness/contrast/gamma */ | |
| 1525 | ldcore->videopalette = palette_alloc(256, 1); | |
| 1526 | if (ldcore->videopalette == NULL) | |
| 1527 | fatalerror("Out of memory allocating video palette"); | |
| 1528 | for (index = 0; index < 256; index++) | |
| 1529 | palette_entry_set_color(ldcore->videopalette, index, MAKE_RGB(index, index, index)); | |
| 1530 | ||
| 1545 | 1531 | /* allocate overlay */ |
| 1546 | 1532 | if (ldcore->config.overwidth > 0 && ldcore->config.overheight > 0 && ldcore->config.overupdate != NULL) |
| 1547 | 1533 | { |
| r3373 | r3374 | |
| 1662 | 1648 | if (ldcore->disc != NULL) |
| 1663 | 1649 | chd_async_complete(ldcore->disc); |
| 1664 | 1650 | |
| 1665 | /* free any textures */ | |
| 1651 | /* free any textures and palettes */ | |
| 1666 | 1652 | if (ldcore->videotex != NULL) |
| 1667 | 1653 | render_texture_free(ldcore->videotex); |
| 1654 | if (ldcore->videopalette != NULL) | |
| 1655 | palette_deref(ldcore->videopalette); | |
| 1668 | 1656 | if (ldcore->overtex != NULL) |
| 1669 | 1657 | render_texture_free(ldcore->overtex); |
| 1670 | 1658 | } |
| r3373 | r3374 | |
|---|---|---|
| 20 | 20 | #define PRINTF_COMMANDS 1 |
| 21 | 21 | #define CMDPRINTF(x) do { if (PRINTF_COMMANDS) mame_printf_debug x; } while (0) |
| 22 | 22 | |
| 23 | #define EMULATE_ROM 0 | |
| 23 | 24 | |
| 24 | 25 | |
| 26 | ||
| 25 | 27 | /*************************************************************************** |
| 26 | 28 | CONSTANTS |
| 27 | 29 | ***************************************************************************/ |
| r3373 | r3374 | |
| 91 | 93 | |
| 92 | 94 | |
| 93 | 95 | /*************************************************************************** |
| 96 | 22VP931 ROM AND MACHINE INTERFACES | |
| 97 | ***************************************************************************/ | |
| 98 | ||
| 99 | #if EMULATE_ROM | |
| 100 | static WRITE8_HANDLER( ld_controls ) | |
| 101 | { | |
| 102 | switch (offset) | |
| 103 | { | |
| 104 | case 0: | |
| 105 | // write $00 at startup/reject | |
| 106 | break; | |
| 107 | ||
| 108 | case 2: | |
| 109 | // write $06 at startup/reject | |
| 110 | break; | |
| 111 | ||
| 112 | case 3: | |
| 113 | // write $8A at startup | |
| 114 | break; | |
| 115 | ||
| 116 | case 5: | |
| 117 | // write $9F at startup/reject | |
| 118 | break; | |
| 119 | ||
| 120 | case 6: | |
| 121 | // write $C3 at startup/reject | |
| 122 | break; | |
| 123 | ||
| 124 | case 7: | |
| 125 | // write $90 at startup | |
| 126 | break; | |
| 127 | } | |
| 128 | } | |
| 129 | ||
| 130 | ||
| 131 | static READ8_HANDLER( ld_controls ) | |
| 132 | { | |
| 133 | switch (offset) | |
| 134 | { | |
| 135 | case 4: | |
| 136 | ||
| 137 | } | |
| 138 | } | |
| 139 | ||
| 140 | ||
| 141 | static WRITE8_HANDLER( unknown_port_w ) | |
| 142 | { | |
| 143 | // Writes to $00/$02/$00 | |
| 144 | // Values: | |
| 145 | // $04/$09/$0F | |
| 146 | // $04/$0E/$0F | |
| 147 | // $04/ /$0F | |
| 148 | } | |
| 149 | ||
| 150 | ||
| 151 | static ADDRESS_MAP_START( ldv1000_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 152 | AM_RANGE(0x0000, 0x1fff) AM_ROM | |
| 153 | AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x400) AM_RAM | |
| 154 | AM_RANGE(0xc000, 0xc007) AM_READWRITE(ld_controls) | |
| 155 | ADDRESS_MAP_END | |
| 156 | ||
| 157 | ||
| 158 | static ADDRESS_MAP_START( ldv1000_portmap, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 159 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 160 | AM_RANGE(0x00, 0x03) AM_WRITE(unknown_port_w) | |
| 161 | AM_RANGE(0xc0, 0xc3) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_r, z80ctc_w) | |
| 162 | ADDRESS_MAP_END | |
| 163 | ||
| 164 | ||
| 165 | static MACHINE_DRIVER_START( ldv1000 ) | |
| 166 | MDRV_CPU_ADD("ldv1000", Z80, 4000000) | |
| 167 | MDRV_CPU_PROGRAM_MAP(ldv1000_map,0) | |
| 168 | MACHINE_DRIVER_END | |
| 169 | ||
| 170 | ||
| 171 | ROM_START( ldv1000 ) | |
| 172 | ROM_REGION( 0x2000, "ldv1000", ROMREGION_LOADBYNAME ) | |
| 173 | ROM_LOAD( "z03_1001_vyw-053_v1-0.bin", 0x0000, 0x2000, CRC(31ec4687) SHA1(52f91c304a878ba02b2fa1cda1a9489d6dd5a34f) ) | |
| 174 | ROM_END | |
| 175 | #endif | |
| 176 | ||
| 177 | ||
| 178 | ||
| 179 | /*************************************************************************** | |
| 94 | 180 | INTERFACES |
| 95 | 181 | ***************************************************************************/ |
| 96 | 182 | |
| r3373 | r3374 | |
| 99 | 185 | LASERDISC_TYPE_PIONEER_LDV1000, /* type of the player */ |
| 100 | 186 | sizeof(ldplayer_data), /* size of the state */ |
| 101 | 187 | "Pioneer LD-V1000", /* name of the player */ |
| 102 | NULL, /* pointer to ROM region information */ | |
| 103 | NULL, /* pointer to machine configuration */ | |
| 188 | #if EMULATE_ROM | |
| 189 | rom_ldv1000, /* pointer to ROM region information */ | |
| 190 | machine_config_ldv1000, /* pointer to machine configuration */ | |
| 191 | #else | |
| 192 | NULL, | |
| 193 | NULL, | |
| 194 | #endif | |
| 104 | 195 | ldv1000_init, /* initialization callback */ |
| 105 | 196 | NULL, /* vsync callback */ |
| 106 | 197 | ldv1000_update, /* update callback */ |
| r3373 | r3374 | |
|---|---|---|
| 683 | 683 | /* macro for wrapping a default string */ |
| 684 | 684 | #define DEF_STR(str_num) ((const char *)INPUT_STRING_##str_num) |
| 685 | 685 | |
| 686 | /* macros for referencing input ports in place of read handlers */ | |
| 687 | #define HANDLER_PORT(name, type) ((type)("\0\0\0\0" name)) | |
| 688 | #define DEVICE8_PORT(name) HANDLER_PORT(name, read8_device_func) | |
| 689 | #define MACHINE8_PORT(name) HANDLER_PORT(name, read8_machine_func) | |
| 690 | #define IS_HANDLER_PORT(ptr) (((const char *)(ptr))[0] == 0 && ((const char *)(ptr))[1] == 0 && ((const char *)(ptr))[2] == 0 && ((const char *)(ptr))[3] == 0) | |
| 691 | #define CALL_DEVICE8_READ(ptr,d,offs) (IS_HANDLER_PORT(ptr) ? input_port_read((d)->machine, ((const char *)(ptr)) + 4) : (*ptr)(d, offs)) | |
| 692 | #define CALL_MACHINE8_READ(ptr,m,offs) (IS_HANDLER_PORT(ptr) ? input_port_read((m), ((const char *)(ptr)) + 4) : (*ptr)(m, offs)) | |
| 686 | 693 | |
| 687 | 694 | |
| 695 | ||
| 688 | 696 | /*************************************************************************** |
| 689 | 697 | MACROS FOR BUILDING INPUT PORTS |
| 690 | 698 | ***************************************************************************/ |
| r3373 | r3374 | |
|---|---|---|
| 95 | 95 | static slider_state *slider_list; |
| 96 | 96 | static slider_state *slider_current; |
| 97 | 97 | |
| 98 | static int display_rescale_message; | |
| 99 | static int allow_rescale; | |
| 100 | 98 | |
| 101 | 99 | |
| 102 | ||
| 103 | 100 | /*************************************************************************** |
| 104 | 101 | FUNCTION PROTOTYPES |
| 105 | 102 | ***************************************************************************/ |
| 106 | 103 | |
| 107 | 104 | static void ui_exit(running_machine *machine); |
| 108 | static int rescale_notifier(running_machine *machine, int width, int height); | |
| 109 | 105 | |
| 110 | 106 | /* text generators */ |
| 111 | 107 | static astring *disclaimer_string(running_machine *machine, astring *buffer); |
| r3373 | r3374 | |
| 229 | 225 | /* reset globals */ |
| 230 | 226 | single_step = FALSE; |
| 231 | 227 | ui_set_handler(handler_messagebox, 0); |
| 232 | ||
| 233 | /* request callbacks when the renderer does resizing */ | |
| 234 | render_set_rescale_notify(machine, rescale_notifier); | |
| 235 | allow_rescale = 0; | |
| 236 | display_rescale_message = FALSE; | |
| 237 | 228 | return 0; |
| 238 | 229 | } |
| 239 | 230 | |
| r3373 | r3374 | |
| 257 | 248 | |
| 258 | 249 | |
| 259 | 250 | /*------------------------------------------------- |
| 260 | rescale_notifier - notifier to trigger a | |
| 261 | rescale message during long operations | |
| 262 | -------------------------------------------------*/ | |
| 263 | ||
| 264 | static int rescale_notifier(running_machine *machine, int width, int height) | |
| 265 | { | |
| 266 | /* always allow rescaling for a "small" area and for screenless drivers */ | |
| 267 | if (width < 500 || height < 500 || machine->primary_screen == NULL) | |
| 268 | return TRUE; | |
| 269 | ||
| 270 | /* if we've currently disallowed rescaling, turn on a message next frame */ | |
| 271 | if (allow_rescale == 0) | |
| 272 | display_rescale_message = TRUE; | |
| 273 | ||
| 274 | /* only allow rescaling once we're sure the message is visible */ | |
| 275 | return (allow_rescale == 1); | |
| 276 | } | |
| 277 | ||
| 278 | ||
| 279 | /*------------------------------------------------- | |
| 280 | 251 | ui_display_startup_screens - display the |
| 281 | 252 | various startup screens |
| 282 | 253 | -------------------------------------------------*/ |
| r3373 | r3374 | |
| 423 | 394 | /* cancel takes us back to the ingame handler */ |
| 424 | 395 | if (ui_handler_param == UI_HANDLER_CANCEL) |
| 425 | 396 | ui_set_handler(handler_ingame, 0); |
| 426 | ||
| 427 | /* add a message if we are rescaling */ | |
| 428 | if (display_rescale_message) | |
| 429 | { | |
| 430 | display_rescale_message = FALSE; | |
| 431 | if (allow_rescale == 0) | |
| 432 | allow_rescale = 2; | |
| 433 | ui_draw_text_box("Updating Artwork...", JUSTIFY_CENTER, 0.5f, 0.5f, messagebox_backcolor); | |
| 434 | } | |
| 435 | ||
| 436 | /* decrement the frame counter if it is non-zero */ | |
| 437 | else if (allow_rescale != 0) | |
| 438 | allow_rescale--; | |
| 439 | 397 | } |
| 440 | 398 | |
| 441 | 399 |
| r3373 | r3374 | |
|---|---|---|
| 170 | 170 | |
| 171 | 171 | /* create a texture to reference the bitmap */ |
| 172 | 172 | global.texture[player] = render_texture_alloc(render_texture_hq_scale, NULL); |
| 173 | render_texture_set_bitmap(global.texture[player], global.bitmap[player], NULL, | |
| 173 | render_texture_set_bitmap(global.texture[player], global.bitmap[player], NULL, | |
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 |
| r3373 | r3374 | |
|---|---|---|
| 283 | 283 | |
| 284 | 284 | void cpunum_set_input_line_and_vector(running_machine *machine, int cpunum, int line, int state, int vector) |
| 285 | 285 | { |
| 286 | #ifdef MAME_DEBUG | |
| 287 | /* catch errors where people use PULSE_LINE for CPUs that don't support it */ | |
| 288 | if (state == PULSE_LINE && line != INPUT_LINE_NMI && line != INPUT_LINE_RESET) | |
| 289 | { | |
| 290 | switch (machine->config->cpu[cpunum].type) | |
| 291 | { | |
| 292 | case CPU_Z80: | |
| 293 | case CPU_Z180: | |
| 294 | case CPU_M68000: | |
| 295 | case CPU_M68008: | |
| 296 | case CPU_M68010: | |
| 297 | case CPU_M68EC020: | |
| 298 | case CPU_M68020: | |
| 299 | case CPU_M68040: | |
| 300 | case CPU_R4600BE: | |
| 301 | case CPU_R4600LE: | |
| 302 | case CPU_R4650BE: | |
| 303 | case CPU_R4650LE: | |
| 304 | case CPU_R4700BE: | |
| 305 | case CPU_R4700LE: | |
| 306 | case CPU_R5000BE: | |
| 307 | case CPU_R5000LE: | |
| 308 | case CPU_QED5271BE: | |
| 309 | case CPU_QED5271LE: | |
| 310 | case CPU_RM7000BE: | |
| 311 | case CPU_RM7000LE: | |
| 312 | case CPU_PPC403GA: | |
| 313 | case CPU_PPC403GCX: | |
| 314 | case CPU_PPC601: | |
| 315 | case CPU_PPC602: | |
| 316 | case CPU_PPC603: | |
| 317 | case CPU_PPC603E: | |
| 318 | case CPU_PPC603R: | |
| 319 | case CPU_PPC604: | |
| 320 | case CPU_I8035: | |
| 321 | case CPU_I8041: | |
| 322 | case CPU_I8048: | |
| 323 | case CPU_I8648: | |
| 324 | case CPU_I8748: | |
| 325 | case CPU_MB8884: | |
| 326 | case CPU_N7751: | |
| 327 | case CPU_TMS34010: | |
| 328 | case CPU_TMS34020: | |
| 329 | case CPU_TMS32010: | |
| 330 | case CPU_TMS32025: | |
| 331 | case CPU_TMS32026: | |
| 332 | fatalerror("CPU %s: PULSE_LINE used with level-detected IRQ %d\n", machine->config->cpu[cpunum].tag, line); | |
| 333 | break; | |
| 334 | ||
| 335 | default: | |
| 336 | break; | |
| 337 | } | |
| 338 | } | |
| 339 | #endif | |
| 340 | ||
| 286 | 341 | if (line >= 0 && line < MAX_INPUT_LINES) |
| 287 | 342 | { |
| 288 | 343 | INT32 input_event = (state & 0xff) | (vector << 8); |
| r3373 | r3374 | |
|---|---|---|
| 44 | 44 | #include "config.h" |
| 45 | 45 | #include "output.h" |
| 46 | 46 | #include "xmlfile.h" |
| 47 | #include "deprecat.h" | |
| 48 | 47 | |
| 49 | 48 | |
| 50 | 49 | |
| r3373 | r3374 | |
| 55 | 54 | #define MAX_TEXTURE_SCALES 8 |
| 56 | 55 | #define TEXTURE_GROUP_SIZE 256 |
| 57 | 56 | |
| 58 | #define NUM_PRIMLISTS | |
| 57 | #define NUM_PRIMLISTS 3 | |
| 59 | 58 | |
| 60 | 59 | #define MAX_CLEAR_EXTENTS 1000 |
| 61 | 60 | |
| r3373 | r3374 | |
| 133 | 132 | render_texture * base; /* pointer to base of texture group */ |
| 134 | 133 | bitmap_t * bitmap; /* pointer to the original bitmap */ |
| 135 | 134 | rectangle sbounds; /* source bounds within the bitmap */ |
| 136 | | |
| 135 | palette_t * | |
| 137 | 136 | int format; /* format of the texture data */ |
| 138 | 137 | texture_scaler_func scaler; /* scaling callback */ |
| 139 | 138 | void * param; /* scaling callback parameter */ |
| 140 | 139 | UINT32 curseq; /* current sequence number */ |
| 141 | 140 | scaled_texture scaled[MAX_TEXTURE_SCALES]; /* array of scaled variants of this texture */ |
| 141 | rgb_t * bcglookup; /* dynamically allocated B/C/G lookup table */ | |
| 142 | UINT32 bcglookup_entries; /* number of B/C/G lookup entries allocated */ | |
| 142 | 143 | }; |
| 143 | 144 | |
| 144 | 145 | |
| r3373 | r3374 | |
| 146 | 147 | struct _render_target |
| 147 | 148 | { |
| 148 | 149 | render_target * next; /* keep a linked list of targets */ |
| 150 | running_machine * machine; /* pointer to the machine we are connected with */ | |
| 149 | 151 | layout_view * curview; /* current view */ |
| 150 | 152 | layout_file * filelist; /* list of layout files */ |
| 151 | 153 | UINT32 flags; /* creation flags */ |
| r3373 | r3374 | |
| 213 | 215 | static render_target *targetlist; |
| 214 | 216 | static render_target *ui_target; |
| 215 | 217 | |
| 216 | /* notifier callbacks */ | |
| 217 | static int (*rescale_notify)(running_machine *, int, int); | |
| 218 | ||
| 219 | 218 | /* free lists */ |
| 220 | 219 | static render_primitive *render_primitive_free_list; |
| 221 | 220 | static container_item *container_item_free_list; |
| r3373 | r3374 | |
| 270 | 269 | static void invalidate_all_render_ref(void *refptr); |
| 271 | 270 | |
| 272 | 271 | /* render textures */ |
| 273 | static int render_texture_get_scaled(render_texture *texture, UINT32 dwidth, UINT32 dheight, render_texinfo *texinfo, render_ref **reflist); | |
| 272 | static int texture_get_scaled(render_texture *texture, UINT32 dwidth, UINT32 dheight, render_texinfo *texinfo, render_ref **reflist); | |
| 273 | static const rgb_t *texture_get_adjusted_palette(render_texture *texture, render_container *container); | |
| 274 | 274 | |
| 275 | 275 | /* render containers */ |
| 276 | static render_container *render_container_alloc( | |
| 276 | static render_container *render_container_alloc(running_machine *machine); | |
| 277 | 277 | static void render_container_free(render_container *container); |
| 278 | 278 | static container_item *render_container_item_add_generic(render_container *container, UINT8 type, float x0, float y0, float x1, float y1, rgb_t argb); |
| 279 | 279 | static void render_container_overlay_scale(bitmap_t *dest, const bitmap_t *source, const rectangle *sbounds, void *param); |
| r3373 | r3374 | |
| 557 | 557 | ui_target = NULL; |
| 558 | 558 | |
| 559 | 559 | /* create a UI container */ |
| 560 | ui_container = render_container_alloc(); | |
| 560 | ui_container = render_container_alloc(machine); | |
| 561 | 561 | |
| 562 | 562 | /* create a container for each screen and determine its orientation */ |
| 563 | 563 | for (screen = video_screen_first(machine->config); screen != NULL; screen = video_screen_next(screen)) |
| 564 | 564 | { |
| 565 | render_container *screen_container = render_container_alloc(); | |
| 565 | render_container *screen_container = render_container_alloc(machine); | |
| 566 | 566 | render_container **temp = &screen_container->next; |
| 567 | 567 | render_container_user_settings settings; |
| 568 | 568 | |
| r3373 | r3374 | |
| 947 | 947 | |
| 948 | 948 | |
| 949 | 949 | /*------------------------------------------------- |
| 950 | render_set_rescale_notify - set a notifier | |
| 951 | that we call before doing long scaling | |
| 952 | operations | |
| 953 | -------------------------------------------------*/ | |
| 954 | ||
| 955 | void render_set_rescale_notify(running_machine *machine, int (*notifier)(running_machine *, int, int)) | |
| 956 | { | |
| 957 | rescale_notify = notifier; | |
| 958 | } | |
| 959 | ||
| 960 | ||
| 961 | /*------------------------------------------------- | |
| 962 | 950 | render_is_live_screen - return if the screen |
| 963 | 951 | is 'live' |
| 964 | 952 | -------------------------------------------------*/ |
| r3373 | r3374 | |
| 1078 | 1066 | target |
| 1079 | 1067 | -------------------------------------------------*/ |
| 1080 | 1068 | |
| 1081 | render_target *render_target_alloc(const char *layoutfile, UINT32 flags) | |
| 1069 | render_target *render_target_alloc(running_machine *machine, const char *layoutfile, UINT32 flags) | |
| 1082 | 1070 | { |
| 1083 | 1071 | render_target *target; |
| 1084 | 1072 | render_target **nextptr; |
| r3373 | r3374 | |
| 1093 | 1081 | *nextptr = target; |
| 1094 | 1082 | |
| 1095 | 1083 | /* fill in the basics with reasonable defaults */ |
| 1084 | target->machine = machine; | |
| 1096 | 1085 | target->flags = flags; |
| 1097 | 1086 | target->width = 640; |
| 1098 | 1087 | target->height = 480; |
| r3373 | r3374 | |
| 1112 | 1101 | /* determine the base orientation based on options */ |
| 1113 | 1102 | target->orientation = ROT0; |
| 1114 | 1103 | if (!options_get_bool(mame_options(), OPTION_ROTATE)) |
| 1115 | target->base_orientation = orientation_reverse( | |
| 1104 | target->base_orientation = orientation_reverse(machine->gamedrv->flags & ORIENTATION_MASK); | |
| 1116 | 1105 | |
| 1117 | 1106 | /* rotate left/right */ |
| 1118 | if (options_get_bool(mame_options(), OPTION_ROR) || (options_get_bool(mame_options(), OPTION_AUTOROR) && ( | |
| 1107 | if (options_get_bool(mame_options(), OPTION_ROR) || (options_get_bool(mame_options(), OPTION_AUTOROR) && (machine->gamedrv->flags & ORIENTATION_SWAP_XY))) | |
| 1119 | 1108 | target->base_orientation = orientation_add(ROT90, target->base_orientation); |
| 1120 | if (options_get_bool(mame_options(), OPTION_ROL) || (options_get_bool(mame_options(), OPTION_AUTOROL) && ( | |
| 1109 | if (options_get_bool(mame_options(), OPTION_ROL) || (options_get_bool(mame_options(), OPTION_AUTOROL) && (machine->gamedrv->flags & ORIENTATION_SWAP_XY))) | |
| 1121 | 1110 | target->base_orientation = orientation_add(ROT270, target->base_orientation); |
| 1122 | 1111 | |
| 1123 | 1112 | /* flip X/Y */ |
| r3373 | r3374 | |
| 1131 | 1120 | target->layerconfig = target->base_layerconfig; |
| 1132 | 1121 | |
| 1133 | 1122 | /* allocate a lock for the primitive list */ |
| 1134 | for (listnum = 0; listnum < | |
| 1123 | for (listnum = 0; listnum < A | |
| 1135 | 1124 | target->primlist[listnum].lock = osd_lock_alloc(); |
| 1136 | 1125 | |
| 1137 | 1126 | /* load the layout files */ |
| r3373 | r3374 | |
| 1166 | 1155 | *curr = target->next; |
| 1167 | 1156 | |
| 1168 | 1157 | /* free any primitives */ |
| 1169 | for (listnum = 0; listnum < | |
| 1158 | for (listnum = 0; listnum < A | |
| 1170 | 1159 | { |
| 1171 | 1160 | release_render_list(&target->primlist[listnum]); |
| 1172 | 1161 | osd_lock_free(target->primlist[listnum].lock); |
| r3373 | r3374 | |
| 1478 | 1467 | for (item = target->curview->itemlist[layer]; item != NULL; item = item->next) |
| 1479 | 1468 | if (item->element == NULL) |
| 1480 | 1469 | { |
| 1481 | const device_config *screen = device_list_find_by_index( | |
| 1470 | const device_config *screen = device_list_find_by_index(target->machine->config->devicelist, VIDEO_SCREEN, item->index); | |
| 1482 | 1471 | const screen_config *scrconfig = screen->inline_config; |
| 1483 | 1472 | const rectangle vectorvis = { 0, 639, 0, 479 }; |
| 1484 | 1473 | const rectangle *visarea = NULL; |
| r3373 | r3374 | |
| 1486 | 1475 | render_bounds bounds; |
| 1487 | 1476 | float xscale, yscale; |
| 1488 | 1477 | |
| 1489 | /* we may be called very early, before | |
| 1478 | /* we may be called very early, before machine->visible_area is initialized; handle that case */ | |
| 1490 | 1479 | if (scrconfig->type == SCREEN_TYPE_VECTOR) |
| 1491 | 1480 | visarea = &vectorvis; |
| 1492 | 1481 | else if (screen->token != NULL) |
| r3373 | r3374 | |
| 1551 | 1540 | |
| 1552 | 1541 | /* switch to the next primitive list */ |
| 1553 | 1542 | listnum = target->listindex; |
| 1554 | target->listindex = (target->listindex + 1) % | |
| 1543 | target->listindex = (target->listindex + 1) % A | |
| 1555 | 1544 | osd_lock_acquire(target->primlist[listnum].lock); |
| 1556 | 1545 | |
| 1557 | 1546 | /* free any previous primitives */ |
| r3373 | r3374 | |
| 1569 | 1558 | root_xform.orientation = target->orientation; |
| 1570 | 1559 | |
| 1571 | 1560 | /* iterate over layers back-to-front, but only if we're running */ |
| 1572 | if (mame_get_phase( | |
| 1561 | if (mame_get_phase(target->machine) >= MAME_PHASE_RESET) | |
| 1573 | 1562 | for (layernum = 0; layernum < ITEM_LAYER_MAX; layernum++) |
| 1574 | 1563 | { |
| 1575 | 1564 | int blendmode; |
| r3373 | r3374 | |
| 1610 | 1599 | state = output_get_value(item->output_name); |
| 1611 | 1600 | else if (item->input_tag[0] != 0) |
| 1612 | 1601 | { |
| 1613 | const input_field_config *field = input_field_by_tag_and_mask( | |
| 1602 | const input_field_config *field = input_field_by_tag_and_mask(target->machine->portconfig, item->input_tag, item->input_mask); | |
| 1614 | 1603 | if (field != NULL) |
| 1615 | state = ((input_port_read_safe( | |
| 1604 | state = ((input_port_read_safe(target->machine, item->input_tag, 0) ^ field->defvalue) & item->input_mask) ? 1 : 0; | |
| 1616 | 1605 | } |
| 1617 | 1606 | add_element_primitives(target, &target->primlist[listnum], &item_xform, item->element, state, blendmode); |
| 1618 | 1607 | } |
| r3373 | r3374 | |
| 1796 | 1785 | /* if there's an explicit file, load that first */ |
| 1797 | 1786 | if (layoutfile != NULL) |
| 1798 | 1787 | { |
| 1799 | *nextfile = layout_file_load( | |
| 1788 | *nextfile = layout_file_load(target->machine->basename, layoutfile); | |
| 1800 | 1789 | if (*nextfile != NULL) |
| 1801 | 1790 | nextfile = &(*nextfile)->next; |
| 1802 | 1791 | } |
| r3373 | r3374 | |
| 1806 | 1795 | return (nextfile == &target->filelist) ? 1 : 0; |
| 1807 | 1796 | |
| 1808 | 1797 | /* try to load a file based on the driver name */ |
| 1809 | *nextfile = layout_file_load( | |
| 1798 | *nextfile = layout_file_load(target->machine->basename, target->machine->gamedrv->name); | |
| 1810 | 1799 | if (*nextfile == NULL) |
| 1811 | *nextfile = layout_file_load( | |
| 1800 | *nextfile = layout_file_load(target->machine->basename, "default"); | |
| 1812 | 1801 | if (*nextfile != NULL) |
| 1813 | 1802 | nextfile = &(*nextfile)->next; |
| 1814 | 1803 | |
| 1815 | 1804 | /* if a default view has been specified, use that as a fallback */ |
| 1816 | if ( | |
| 1805 | if (target->machine->gamedrv->default_layout != NULL) | |
| 1817 | 1806 | { |
| 1818 | *nextfile = layout_file_load(NULL, | |
| 1807 | *nextfile = layout_file_load(NULL, target->machine->gamedrv->default_layout); | |
| 1819 | 1808 | if (*nextfile != NULL) |
| 1820 | 1809 | nextfile = &(*nextfile)->next; |
| 1821 | 1810 | } |
| 1822 | if ( | |
| 1811 | if (target->machine->config->default_layout != NULL) | |
| 1823 | 1812 | { |
| 1824 | *nextfile = layout_file_load(NULL, | |
| 1813 | *nextfile = layout_file_load(NULL, target->machine->config->default_layout); | |
| 1825 | 1814 | if (*nextfile != NULL) |
| 1826 | 1815 | nextfile = &(*nextfile)->next; |
| 1827 | 1816 | } |
| 1828 | 1817 | |
| 1829 | 1818 | /* try to load another file based on the parent driver name */ |
| 1830 | cloneof = driver_get_clone( | |
| 1819 | cloneof = driver_get_clone(target->machine->gamedrv); | |
| 1831 | 1820 | if (cloneof != NULL) |
| 1832 | 1821 | { |
| 1833 | 1822 | *nextfile = layout_file_load(cloneof->name, cloneof->name); |
| r3373 | r3374 | |
| 1838 | 1827 | } |
| 1839 | 1828 | |
| 1840 | 1829 | /* now do the built-in layouts for single-screen games */ |
| 1841 | if (video_screen_count( | |
| 1830 | if (video_screen_count(target->machine->config) == 1) | |
| 1842 | 1831 | { |
| 1843 | if ( | |
| 1832 | if (target->machine->gamedrv->flags & ORIENTATION_SWAP_XY) | |
| 1844 | 1833 | *nextfile = layout_file_load(NULL, layout_vertical); |
| 1845 | 1834 | else |
| 1846 | 1835 | *nextfile = layout_file_load(NULL, layout_horizont); |
| r3373 | r3374 | |
| 1992 | 1981 | height = (finalorient & ORIENTATION_SWAP_XY) ? (prim->bounds.x1 - prim->bounds.x0) : (prim->bounds.y1 - prim->bounds.y0); |
| 1993 | 1982 | width = MIN(width, target->maxtexwidth); |
| 1994 | 1983 | height = MIN(height, target->maxtexheight); |
| 1995 | if ( | |
| 1984 | if ( | |
| 1996 | 1985 | { |
| 1997 | /* override the palette with our adjusted palette */ | |
| 1998 | switch (item->texture->format) | |
| 1999 | { | |
| 2000 | case TEXFORMAT_PALETTE16: prim->texture.palette = &container->bcglookup[prim->texture.palette - palette_entry_list_adjusted(Machine->palette)]; break; | |
| 2001 | case TEXFORMAT_PALETTEA16: prim->texture.palette = &container->bcglookup[prim->texture.palette - palette_entry_list_adjusted(Machine->palette)]; break; | |
| 2002 | case TEXFORMAT_RGB15: prim->texture.palette = &container->bcglookup32[0]; break; | |
| 2003 | case TEXFORMAT_RGB32: prim->texture.palette = &container->bcglookup256[0]; break; | |
| 2004 | case TEXFORMAT_ARGB32: prim->texture.palette = &container->bcglookup256[0]; break; | |
| 2005 | case TEXFORMAT_YUY16: prim->texture.palette = &container->bcglookup256[0]; break; | |
| 2006 | default: assert(FALSE); | |
| 2007 | } | |
| 1986 | /* set the palette */ | |
| 1987 | prim->texture.palette = texture_get_adjusted_palette(item->texture, container); | |
| 2008 | 1988 | |
| 2009 | 1989 | /* determine UV coordinates and apply clipping */ |
| 2010 | 1990 | prim->texcoords = oriented_texcoords[finalorient]; |
| r3373 | r3374 | |
| 2055 | 2035 | prim->color = container_xform.color; |
| 2056 | 2036 | width = render_round_nearest(prim->bounds.x1) - render_round_nearest(prim->bounds.x0); |
| 2057 | 2037 | height = render_round_nearest(prim->bounds.y1) - render_round_nearest(prim->bounds.y0); |
| 2058 | if ( | |
| 2038 | if ( | |
| 2059 | 2039 | (container_xform.orientation & ORIENTATION_SWAP_XY) ? height : width, |
| 2060 | 2040 | (container_xform.orientation & ORIENTATION_SWAP_XY) ? width : height, &prim->texture, &list->reflist)) |
| 2061 | 2041 | { |
| r3373 | r3374 | |
| 2111 | 2091 | height = MIN(height, target->maxtexheight); |
| 2112 | 2092 | |
| 2113 | 2093 | /* get the scaled texture and append it */ |
| 2114 | if ( | |
| 2094 | if ( | |
| 2115 | 2095 | { |
| 2116 | 2096 | /* compute the clip rect */ |
| 2117 | 2097 | cliprect.x0 = render_round_nearest(xform->xoffs); |
| r3373 | r3374 | |
| 2419 | 2399 | |
| 2420 | 2400 | /* loop over targets */ |
| 2421 | 2401 | for (target = targetlist; target != NULL; target = target->next) |
| 2422 | for (listnum = 0; listnum < | |
| 2402 | for (listnum = 0; listnum < A | |
| 2423 | 2403 | { |
| 2424 | 2404 | render_primitive_list *list = &target->primlist[listnum]; |
| 2425 | 2405 | osd_lock_acquire(list->lock); |
| r3373 | r3374 | |
| 2495 | 2475 | if (texture->bitmap != NULL) |
| 2496 | 2476 | invalidate_all_render_ref(texture->bitmap); |
| 2497 | 2477 | |
| 2478 | /* release palette references */ | |
| 2479 | if (texture->palette != NULL) | |
| 2480 | palette_deref(texture->palette); | |
| 2481 | ||
| 2482 | /* free any B/C/G lookup tables */ | |
| 2483 | if (texture->bcglookup != NULL) | |
| 2484 | free(texture->bcglookup); | |
| 2485 | ||
| 2498 | 2486 | /* add ourself back to the free list */ |
| 2499 | 2487 | base_save = texture->base; |
| 2500 | 2488 | memset(texture, 0, sizeof(*texture)); |
| r3373 | r3374 | |
| 2509 | 2497 | bitmap |
| 2510 | 2498 | -------------------------------------------------*/ |
| 2511 | 2499 | |
| 2512 | void render_texture_set_bitmap(render_texture *texture, bitmap_t *bitmap, const rectangle *sbounds, | |
| 2500 | void render_texture_set_bitmap(render_texture *texture, bitmap_t *bitmap, const rectangle *sbounds, int | |
| 2513 | 2501 | { |
| 2514 | 2502 | int scalenum; |
| 2515 | 2503 | |
| 2504 | /* ensure we have a valid palette for palettized modes */ | |
| 2505 | if (format == TEXFORMAT_PALETTE16 || format == TEXFORMAT_PALETTEA16) | |
| 2506 | assert(palette != NULL); | |
| 2507 | ||
| 2516 | 2508 | /* invalidate references to the old bitmap */ |
| 2517 | 2509 | if (bitmap != texture->bitmap && texture->bitmap != NULL) |
| 2518 | 2510 | invalidate_all_render_ref(texture->bitmap); |
| 2519 | 2511 | |
| 2512 | /* if the palette is different, adjust references */ | |
| 2513 | if (palette != texture->palette) | |
| 2514 | { | |
| 2515 | if (texture->palette != NULL) | |
| 2516 | palette_deref(texture->palette); | |
| 2517 | if (palette != NULL) | |
| 2518 | palette_ref(palette); | |
| 2519 | } | |
| 2520 | ||
| 2520 | 2521 | /* set the new bitmap/palette */ |
| 2521 | 2522 | texture->bitmap = bitmap; |
| 2522 | 2523 | texture->sbounds.min_x = (sbounds != NULL) ? sbounds->min_x : 0; |
| 2523 | 2524 | texture->sbounds.min_y = (sbounds != NULL) ? sbounds->min_y : 0; |
| 2524 | 2525 | texture->sbounds.max_x = (sbounds != NULL) ? sbounds->max_x : (bitmap != NULL) ? bitmap->width : 1000; |
| 2525 | 2526 | texture->sbounds.max_y = (sbounds != NULL) ? sbounds->max_y : (bitmap != NULL) ? bitmap->height : 1000; |
| 2526 | texture->palette | |
| 2527 | texture->palette | |
| 2527 | 2528 | texture->format = format; |
| 2528 | 2529 | |
| 2529 | 2530 | /* invalidate all scaled versions */ |
| r3373 | r3374 | |
| 2541 | 2542 | |
| 2542 | 2543 | |
| 2543 | 2544 | /*------------------------------------------------- |
| 2544 | | |
| 2545 | | |
| 2545 | 2546 | bitmap (if we can) |
| 2546 | 2547 | -------------------------------------------------*/ |
| 2547 | 2548 | |
| 2548 | static int | |
| 2549 | static int | |
| 2549 | 2550 | { |
| 2550 | 2551 | UINT8 bpp = (texture->format == TEXFORMAT_PALETTE16 || texture->format == TEXFORMAT_PALETTEA16 || texture->format == TEXFORMAT_RGB15 || texture->format == TEXFORMAT_YUY16) ? 16 : 32; |
| 2551 | const rgb_t *palbase = (texture->format == TEXFORMAT_PALETTE16 || texture->format == TEXFORMAT_PALETTEA16) ? palette_entry_list_adjusted( | |
| 2552 | const rgb_t *palbase = (texture->format == TEXFORMAT_PALETTE16 || texture->format == TEXFORMAT_PALETTEA16) ? palette_entry_list_adjusted( | |
| 2552 | 2553 | scaled_texture *scaled = NULL; |
| 2553 | 2554 | int swidth, sheight; |
| 2554 | 2555 | int scalenum; |
| r3373 | r3374 | |
| 2590 | 2591 | { |
| 2591 | 2592 | int lowest = -1; |
| 2592 | 2593 | |
| 2593 | /* ask our notifier if we can scale now */ | |
| 2594 | if (rescale_notify != NULL && !(*rescale_notify)(Machine, dwidth, dheight)) | |
| 2595 | return FALSE; | |
| 2596 | ||
| 2597 | 2594 | /* didn't find one -- take the entry with the lowest seqnum */ |
| 2598 | 2595 | for (scalenum = 0; scalenum < ARRAY_LENGTH(texture->scaled); scalenum++) |
| 2599 | 2596 | if ((lowest == -1 || texture->scaled[scalenum].seqid < texture->scaled[lowest].seqid) && !has_render_ref(*reflist, texture->scaled[scalenum].bitmap)) |
| r3373 | r3374 | |
| 2640 | 2637 | } |
| 2641 | 2638 | |
| 2642 | 2639 | |
| 2640 | /*------------------------------------------------- | |
| 2641 | texture_get_adjusted_palette - return the | |
| 2642 | adjusted palette for a texture | |
| 2643 | -------------------------------------------------*/ | |
| 2643 | 2644 | |
| 2645 | static const rgb_t *texture_get_adjusted_palette(render_texture *texture, render_container *container) | |
| 2646 | { | |
| 2647 | const rgb_t *adjusted; | |
| 2648 | int numentries; | |
| 2649 | int index; | |
| 2650 | ||
| 2651 | /* override the palette with our adjusted palette */ | |
| 2652 | switch (texture->format) | |
| 2653 | { | |
| 2654 | case TEXFORMAT_PALETTE16: | |
| 2655 | case TEXFORMAT_PALETTEA16: | |
| 2656 | ||
| 2657 | /* if no adjustment necessary, return the raw palette */ | |
| 2658 | assert(texture->palette != NULL); | |
| 2659 | adjusted = palette_entry_list_adjusted(texture->palette); | |
| 2660 | if (container->brightness == 1.0f && container->contrast == 1.0f && container->gamma == 1.0f) | |
| 2661 | return adjusted; | |
| 2662 | ||
| 2663 | /* if this is the machine palette, return our precomputed adjusted palette */ | |
| 2664 | if (container->palclient != NULL && palette_client_get_palette(container->palclient) == texture->palette) | |
| 2665 | return container->bcglookup; | |
| 2666 | ||
| 2667 | /* otherwise, ensure we have memory allocated and compute the adjusted result ourself */ | |
| 2668 | numentries = palette_get_num_colors(texture->palette) * palette_get_num_groups(texture->palette); | |
| 2669 | if (texture->bcglookup == NULL || texture->bcglookup_entries < numentries) | |
| 2670 | { | |
| 2671 | texture->bcglookup = realloc(texture->bcglookup, numentries * sizeof(*texture->bcglookup)); | |
| 2672 | texture->bcglookup_entries = numentries; | |
| 2673 | } | |
| 2674 | for (index = 0; index < numentries; index++) | |
| 2675 | { | |
| 2676 | UINT8 r = apply_brightness_contrast_gamma(RGB_RED(adjusted[index]), container->brightness, container->contrast, container->gamma); | |
| 2677 | UINT8 g = apply_brightness_contrast_gamma(RGB_GREEN(adjusted[index]), container->brightness, container->contrast, container->gamma); | |
| 2678 | UINT8 b = apply_brightness_contrast_gamma(RGB_BLUE(adjusted[index]), container->brightness, container->contrast, container->gamma); | |
| 2679 | texture->bcglookup[index] = MAKE_ARGB(RGB_ALPHA(adjusted[index]), r, g, b); | |
| 2680 | } | |
| 2681 | return texture->bcglookup; | |
| 2682 | ||
| 2683 | case TEXFORMAT_RGB15: | |
| 2684 | ||
| 2685 | /* if no adjustment necessary, return NULL */ | |
| 2686 | if (container->brightness == 1.0f && container->contrast == 1.0f && container->gamma == 1.0f && texture->palette == NULL) | |
| 2687 | return NULL; | |
| 2688 | ||
| 2689 | /* if no palette, return the standard lookups */ | |
| 2690 | if (texture->palette == NULL) | |
| 2691 | return container->bcglookup32; | |
| 2692 | ||
| 2693 | /* otherwise, ensure we have memory allocated and compute the adjusted result ourself */ | |
| 2694 | assert(palette_get_num_colors(texture->palette) == 32); | |
| 2695 | adjusted = palette_entry_list_adjusted(texture->palette); | |
| 2696 | if (texture->bcglookup == NULL || texture->bcglookup_entries < 4 * 32) | |
| 2697 | { | |
| 2698 | texture->bcglookup = realloc(texture->bcglookup, 4 * 32 * sizeof(*texture->bcglookup)); | |
| 2699 | texture->bcglookup_entries = 4 * 32; | |
| 2700 | } | |
| 2701 | ||
| 2702 | /* otherwise, return the 32-entry BCG lookups */ | |
| 2703 | for (index = 0; index < 32; index++) | |
| 2704 | { | |
| 2705 | UINT8 val = apply_brightness_contrast_gamma(RGB_GREEN(adjusted[index]), container->brightness, container->contrast, container->gamma); | |
| 2706 | texture->bcglookup[0x00 + index] = val << 0; | |
| 2707 | texture->bcglookup[0x20 + index] = val << 8; | |
| 2708 | texture->bcglookup[0x40 + index] = val << 16; | |
| 2709 | texture->bcglookup[0x60 + index] = val << 24; | |
| 2710 | } | |
| 2711 | return texture->bcglookup; | |
| 2712 | ||
| 2713 | case TEXFORMAT_RGB32: | |
| 2714 | case TEXFORMAT_ARGB32: | |
| 2715 | case TEXFORMAT_YUY16: | |
| 2716 | ||
| 2717 | /* if no adjustment necessary, return NULL */ | |
| 2718 | if (container->brightness == 1.0f && container->contrast == 1.0f && container->gamma == 1.0f && texture->palette == NULL) | |
| 2719 | return NULL; | |
| 2720 | ||
| 2721 | /* if no palette, return the standard lookups */ | |
| 2722 | if (texture->palette == NULL) | |
| 2723 | return container->bcglookup256; | |
| 2724 | ||
| 2725 | /* otherwise, ensure we have memory allocated and compute the adjusted result ourself */ | |
| 2726 | assert(palette_get_num_colors(texture->palette) == 256); | |
| 2727 | adjusted = palette_entry_list_adjusted(texture->palette); | |
| 2728 | if (texture->bcglookup == NULL || texture->bcglookup_entries < 4 * 256) | |
| 2729 | { | |
| 2730 | texture->bcglookup = realloc(texture->bcglookup, 4 * 256 * sizeof(*texture->bcglookup)); | |
| 2731 | texture->bcglookup_entries = 4 * 256; | |
| 2732 | } | |
| 2733 | ||
| 2734 | /* otherwise, return the 32-entry BCG lookups */ | |
| 2735 | for (index = 0; index < 256; index++) | |
| 2736 | { | |
| 2737 | UINT8 val = apply_brightness_contrast_gamma(RGB_GREEN(adjusted[index]), container->brightness, container->contrast, container->gamma); | |
| 2738 | texture->bcglookup[0x000 + index] = val << 0; | |
| 2739 | texture->bcglookup[0x100 + index] = val << 8; | |
| 2740 | texture->bcglookup[0x200 + index] = val << 16; | |
| 2741 | texture->bcglookup[0x300 + index] = val << 24; | |
| 2742 | } | |
| 2743 | return texture->bcglookup; | |
| 2744 | ||
| 2745 | default: | |
| 2746 | assert(FALSE); | |
| 2747 | } | |
| 2748 | ||
| 2749 | return NULL; | |
| 2750 | } | |
| 2751 | ||
| 2752 | ||
| 2753 | ||
| 2644 | 2754 | /*************************************************************************** |
| 2645 | 2755 | RENDER CONTAINERS |
| 2646 | 2756 | ***************************************************************************/ |
| r3373 | r3374 | |
| 2650 | 2760 | container |
| 2651 | 2761 | -------------------------------------------------*/ |
| 2652 | 2762 | |
| 2653 | static render_container *render_container_alloc( | |
| 2763 | static render_container *render_container_alloc(running_machine *machine) | |
| 2654 | 2764 | { |
| 2655 | 2765 | render_container *container; |
| 2656 | 2766 | int color; |
| r3373 | r3374 | |
| 2674 | 2784 | render_container_empty(container); |
| 2675 | 2785 | |
| 2676 | 2786 | /* allocate a client to the main palette */ |
| 2677 | if (Machine->palette != NULL) | |
| 2678 | container->palclient = palette_client_alloc(Machine->palette); | |
| 2787 | if (machine->palette != NULL) | |
| 2788 | container->palclient = palette_client_alloc(machine->palette); | |
| 2679 | 2789 | render_container_recompute_lookups(container); |
| 2680 | 2790 | return container; |
| 2681 | 2791 | } |
| r3373 | r3374 | |
| 2788 | 2898 | if (container->overlaybitmap != NULL) |
| 2789 | 2899 | { |
| 2790 | 2900 | container->overlaytexture = render_texture_alloc(render_container_overlay_scale, NULL); |
| 2791 | render_texture_set_bitmap(container->overlaytexture, bitmap, NULL, | |
| 2901 | render_texture_set_bitmap(container->overlaytexture, bitmap, NULL, | |
| 2792 | 2902 | } |
| 2793 | 2903 | } |
| 2794 | 2904 | |
| r3373 | r3374 | |
| 2827 | 2937 | |
| 2828 | 2938 | |
| 2829 | 2939 | /*------------------------------------------------- |
| 2830 | render_container_set_palette_alpha - set the | |
| 2831 | opacity of a given palette entry | |
| 2832 | -------------------------------------------------*/ | |
| 2833 | ||
| 2834 | void render_container_set_palette_alpha(render_container *container, UINT32 entry, UINT8 alpha) | |
| 2835 | { | |
| 2836 | assert(entry < ARRAY_LENGTH(container->bcglookup)); | |
| 2837 | container->bcglookup[entry] = (alpha << 24) | (container->bcglookup[entry] & 0x00ffffff); | |
| 2838 | } | |
| 2839 | ||
| 2840 | ||
| 2841 | /*------------------------------------------------- | |
| 2842 | 2940 | render_container_item_add_generic - add a |
| 2843 | 2941 | generic item to a container |
| 2844 | 2942 | -------------------------------------------------*/ |
| r3373 | r3374 | |
| 2984 | 3082 | for (i = 0; i < colors; i++) |
| 2985 | 3083 | { |
| 2986 | 3084 | pen_t newval = adjusted_palette[i]; |
| 2987 | container->bcglookup[i] = ( | |
| 3085 | container->bcglookup[i] = ( | |
| 2988 | 3086 | container->bcglookup256[0x200 + RGB_RED(newval)] | |
| 2989 | 3087 | container->bcglookup256[0x100 + RGB_GREEN(newval)] | |
| 2990 | 3088 | container->bcglookup256[0x000 + RGB_BLUE(newval)]; |
| r3373 | r3374 | |
| 3029 | 3127 | { |
| 3030 | 3128 | UINT32 finalentry = entry32 * 32 + entry; |
| 3031 | 3129 | rgb_t newval = adjusted_palette[finalentry]; |
| 3032 | container->bcglookup[finalentry] = ( | |
| 3130 | container->bcglookup[finalentry] = ( | |
| 3033 | 3131 | container->bcglookup256[0x200 + RGB_RED(newval)] | |
| 3034 | 3132 | container->bcglookup256[0x100 + RGB_GREEN(newval)] | |
| 3035 | 3133 | container->bcglookup256[0x000 + RGB_BLUE(newval)]; |
| r3373 | r3374 | |
|---|---|---|
| 88 | 88 | /* texture formats */ |
| 89 | 89 | enum |
| 90 | 90 | { |
| 91 | TEXFORMAT_UNDEFINED = 0, /* require a format to be specified */ | |
| 92 | TEXFORMAT_PALETTE16, /* 16bpp palettized, alpha ignored */ | |
| 93 | TEXFORMAT_PALETTEA16, /* 16bpp palettized, alpha respected */ | |
| 94 | TEXFORMAT_RGB15, /* 16bpp 5-5-5 RGB */ | |
| 95 | TEXFORMAT_RGB32, /* 32bpp 8-8-8 RGB */ | |
| 96 | TEXFORMAT_ARGB32, /* 32bpp 8-8-8-8 ARGB */ | |
| 97 | TEXFORMAT_YUY16 /* 16bpp 8-8 Y/Cb, Y/Cr in sequence */ | |
| 91 | TEXFORMAT_UNDEFINED = 0, /* require a format to be specified */ | |
| 92 | TEXFORMAT_PALETTE16, /* 16bpp palettized, alpha ignored */ | |
| 93 | TEXFORMAT_PALETTEA16, /* 16bpp palettized, alpha respected */ | |
| 94 | TEXFORMAT_RGB15, /* 16bpp 5-5-5 RGB */ | |
| 95 | TEXFORMAT_RGB32, /* 32bpp 8-8-8 RGB */ | |
| 96 | TEXFORMAT_ARGB32, /* 32bpp 8-8-8-8 ARGB */ | |
| 97 | TEXFORMAT_YUY16 /* 16bpp 8-8 Y/Cb, Y/Cr in sequence */ | |
| 98 | 98 | }; |
| 99 | 99 | |
| 100 | 100 | /* blending modes */ |
| 101 | 101 | enum |
| 102 | 102 | { |
| 103 | BLENDMODE_NONE = 0, /* no blending */ | |
| 104 | BLENDMODE_ALPHA, /* standard alpha blend */ | |
| 105 | BLENDMODE_RGB_MULTIPLY, /* apply source alpha to source pix, then multiply RGB values */ | |
| 106 | BLENDMODE_ADD /* apply source alpha to source pix, then add to destination */ | |
| 103 | BLENDMODE_NONE = 0, /* no blending */ | |
| 104 | BLENDMODE_ALPHA, /* standard alpha blend */ | |
| 105 | BLENDMODE_RGB_MULTIPLY, /* apply source alpha to source pix, then multiply RGB values */ | |
| 106 | BLENDMODE_ADD /* apply source alpha to source pix, then add to destination */ | |
| 107 | 107 | }; |
| 108 | 108 | |
| 109 | 109 | |
| r3373 | r3374 | |
| 350 | 350 | /* ----- render target management ----- */ |
| 351 | 351 | |
| 352 | 352 | /* allocate a new render target */ |
| 353 | render_target *render_target_alloc(const char *layout, UINT32 flags); | |
| 353 | render_target *render_target_alloc(running_machine *machine, const char *layout, UINT32 flags); | |
| 354 | 354 | |
| 355 | 355 | /* free memory for a render target */ |
| 356 | 356 | void render_target_free(render_target *target); |
| r3373 | r3374 | |
| 424 | 424 | void render_texture_free(render_texture *texture); |
| 425 | 425 | |
| 426 | 426 | /* set a new source bitmap */ |
| 427 | void render_texture_set_bitmap(render_texture *texture, bitmap_t *bitmap, const rectangle *sbounds, | |
| 427 | void render_texture_set_bitmap(render_texture *texture, bitmap_t *bitmap, const rectangle *sbounds, int | |
| 428 | 428 | |
| 429 | 429 | /* generic high quality resampling scaler */ |
| 430 | 430 | void render_texture_hq_scale(bitmap_t *dest, const bitmap_t *source, const rectangle *sbounds, void *param); |
| r3373 | r3374 | |
| 454 | 454 | /* return a pointer to the container for the given screen */ |
| 455 | 455 | render_container *render_container_get_screen(const device_config *screen); |
| 456 | 456 | |
| 457 | /* set the opacity of a given palette entry */ | |
| 458 | void render_container_set_palette_alpha(render_container *container, UINT32 entry, UINT8 alpha); | |
| 459 | ||
| 460 | 457 | /* add a line item to the specified container */ |
| 461 | 458 | void render_container_add_line(render_container *container, float x0, float y0, float x1, float y1, float width, rgb_t argb, UINT32 flags); |
| 462 | 459 |
| r3373 | r3374 | |
|---|---|---|
| 225 | 225 | |
| 226 | 226 | |
| 227 | 227 | /*------------------------------------------------- |
| 228 | palette_set_brightness - set the per-pen | |
| 229 | brightness factor | |
| 228 | palette_set_pen_contrast - set the per-pen | |
| 229 | contrast factor | |
| 230 | 230 | -------------------------------------------------*/ |
| 231 | 231 | |
| 232 | INLINE void palette_set_ | |
| 232 | INLINE void palette_set_p | |
| 233 | 233 | { |
| 234 | 234 | palette_entry_set_contrast(machine->palette, pen, bright); |
| 235 | 235 | } |
| r3373 | r3374 | |
|---|---|---|
| 10 | 10 | ******************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "palette.h" |
| 13 | #include <math.h> | |
| 13 | 14 | |
| 14 | 15 | |
| 15 | 16 | |
| r3373 | r3374 | |
| 44 | 45 | UINT32 numcolors; /* number of colors in the palette */ |
| 45 | 46 | UINT32 numgroups; /* number of groups in the palette */ |
| 46 | 47 | |
| 48 | float brightness; /* overall brightness value */ | |
| 49 | float contrast; /* overall contrast value */ | |
| 50 | float gamma; /* overall gamma value */ | |
| 51 | UINT8 gamma_map[256]; /* gamma map */ | |
| 52 | ||
| 47 | 53 | rgb_t * entry_color; /* array of raw colors */ |
| 48 | 54 | float * entry_contrast; /* contrast value for each entry */ |
| 49 | 55 | rgb_t * adjusted_color; /* array of adjusted colors */ |
| r3373 | r3374 | |
| 75 | 81 | entry for brightness |
| 76 | 82 | -------------------------------------------------*/ |
| 77 | 83 | |
| 78 | INLINE rgb_t adjust_palette_entry(rgb_t entry, float brightness, float contrast) | |
| 84 | INLINE rgb_t adjust_palette_entry(rgb_t entry, float brightness, float contrast, const UINT8 *gamma_map) | |
| 79 | 85 | { |
| 80 | int r = rgb_clamp((float)RGB_RED(entry) * contrast + brightness); | |
| 81 | int g = rgb_clamp((float)RGB_GREEN(entry) * contrast + brightness); | |
| 82 | int b = rgb_clamp((float)RGB_BLUE(entry) * contrast + brightness); | |
| 83 | return MAKE_RGB(r,g,b); | |
| 86 | int r = rgb_clamp((float)gamma_map[RGB_RED(entry)] * contrast + brightness); | |
| 87 | int g = rgb_clamp((float)gamma_map[RGB_GREEN(entry)] * contrast + brightness); | |
| 88 | int b = rgb_clamp((float)gamma_map[RGB_BLUE(entry)] * contrast + brightness); | |
| 89 | int a = RGB_ALPHA(entry); | |
| 90 | return MAKE_ARGB(a,r,g,b); | |
| 84 | 91 | } |
| 85 | 92 | |
| 86 | 93 | |
| r3373 | r3374 | |
| 105 | 112 | goto error; |
| 106 | 113 | memset(palette, 0, sizeof(*palette)); |
| 107 | 114 | |
| 115 | /* initialize overall controls */ | |
| 116 | palette->brightness = 0.0f; | |
| 117 | palette->contrast = 1.0f; | |
| 118 | palette->gamma = 1.0f; | |
| 119 | for (index = 0; index < 256; index++) | |
| 120 | palette->gamma_map[index] = index; | |
| 121 | ||
| 108 | 122 | /* allocate an array of palette entries and individual contrasts for each */ |
| 109 | 123 | palette->entry_color = malloc(sizeof(*palette->entry_color) * numcolors); |
| 110 | 124 | palette->entry_contrast = malloc(sizeof(*palette->entry_contrast) * numcolors); |
| r3373 | r3374 | |
| 461 | 475 | ***************************************************************************/ |
| 462 | 476 | |
| 463 | 477 | /*------------------------------------------------- |
| 478 | palette_set_brightness - set the overall | |
| 479 | brightness for the palette | |
| 480 | -------------------------------------------------*/ | |
| 481 | ||
| 482 | void palette_set_brightness(palette_t *palette, float brightness) | |
| 483 | { | |
| 484 | int groupnum, index; | |
| 485 | ||
| 486 | /* convert incoming value to normalized result */ | |
| 487 | brightness = (brightness - 1.0f) * 256.0f; | |
| 488 | ||
| 489 | /* set the global brightness if changed */ | |
| 490 | if (palette->brightness == brightness) | |
| 491 | return; | |
| 492 | palette->brightness = brightness; | |
| 493 | ||
| 494 | /* update across all indices in all groups */ | |
| 495 | for (groupnum = 0; groupnum < palette->numgroups; groupnum++) | |
| 496 | for (index = 0; index < palette->numcolors; index++) | |
| 497 | update_adjusted_color(palette, groupnum, index); | |
| 498 | } | |
| 499 | ||
| 500 | ||
| 501 | /*------------------------------------------------- | |
| 502 | palette_set_contrast - set the overall | |
| 503 | contrast for the palette | |
| 504 | -------------------------------------------------*/ | |
| 505 | ||
| 506 | void palette_set_contrast(palette_t *palette, float contrast) | |
| 507 | { | |
| 508 | int groupnum, index; | |
| 509 | ||
| 510 | /* set the global contrast if changed */ | |
| 511 | if (palette->contrast == contrast) | |
| 512 | return; | |
| 513 | palette->contrast = contrast; | |
| 514 | ||
| 515 | /* update across all indices in all groups */ | |
| 516 | for (groupnum = 0; groupnum < palette->numgroups; groupnum++) | |
| 517 | for (index = 0; index < palette->numcolors; index++) | |
| 518 | update_adjusted_color(palette, groupnum, index); | |
| 519 | } | |
| 520 | ||
| 521 | ||
| 522 | /*------------------------------------------------- | |
| 523 | palette_set_gamma - set the overall | |
| 524 | gamma for the palette | |
| 525 | -------------------------------------------------*/ | |
| 526 | ||
| 527 | void palette_set_gamma(palette_t *palette, float gamma) | |
| 528 | { | |
| 529 | int groupnum, index; | |
| 530 | ||
| 531 | /* set the global gamma if changed */ | |
| 532 | if (palette->gamma == gamma) | |
| 533 | return; | |
| 534 | palette->gamma = gamma; | |
| 535 | ||
| 536 | /* recompute the gamma map */ | |
| 537 | gamma = 1.0f / gamma; | |
| 538 | for (index = 0; index < 256; index++) | |
| 539 | { | |
| 540 | float fval = (float)index * (1.0f / 255.0f); | |
| 541 | float fresult = pow(fval, gamma); | |
| 542 | palette->gamma_map[index] = rgb_clamp(255.0f * fresult); | |
| 543 | } | |
| 544 | ||
| 545 | /* update across all indices in all groups */ | |
| 546 | for (groupnum = 0; groupnum < palette->numgroups; groupnum++) | |
| 547 | for (index = 0; index < palette->numcolors; index++) | |
| 548 | update_adjusted_color(palette, groupnum, index); | |
| 549 | } | |
| 550 | ||
| 551 | ||
| 552 | /*------------------------------------------------- | |
| 464 | 553 | palette_entry_set_contrast - set the contrast |
| 465 | 554 | adjustment for a single palette index |
| 466 | 555 | -------------------------------------------------*/ |
| r3373 | r3374 | |
| 502 | 591 | { |
| 503 | 592 | int index; |
| 504 | 593 | |
| 594 | /* convert incoming value to normalized result */ | |
| 595 | brightness = (brightness - 1.0f) * 256.0f; | |
| 596 | ||
| 505 | 597 | /* if out of range, or unchanged, ignore */ |
| 506 | 598 | if (group >= palette->numgroups || palette->group_bright[group] == brightness) |
| 507 | 599 | return; |
| r3373 | r3374 | |
| 631 | 723 | rgb_t adjusted; |
| 632 | 724 | |
| 633 | 725 | /* compute the adjusted value */ |
| 634 | adjusted = adjust_palette_entry(palette->entry_color[index], palette->group_bright[group], palette->group_contrast[group] * palette->entry_contrast[index]); | |
| 726 | adjusted = adjust_palette_entry(palette->entry_color[index], | |
| 727 | palette->group_bright[group] + palette->brightness, | |
| 728 | palette->group_contrast[group] * palette->entry_contrast[index] * palette->contrast, | |
| 729 | palette->gamma_map); | |
| 635 | 730 | |
| 636 | 731 | /* if not different, ignore */ |
| 637 | 732 | if (palette->adjusted_color[finalindex] == adjusted) |
| r3373 | r3374 | |
|---|---|---|
| 40 | 40 | ***************************************************************************/ |
| 41 | 41 | |
| 42 | 42 | /* macros to assemble rgb_t values */ |
| 43 | #define MAKE_RGB(r,g,b) ((((rgb_t)(r) & 0xff) << 16) | (((rgb_t)(g) & 0xff) << 8) | ((rgb_t)(b) & 0xff)) | |
| 44 | #define MAKE_ARGB(a,r,g,b) (MAKE_RGB(r,g,b) | (((rgb_t)(a) & 0xff) << 24)) | |
| 43 | #define MAKE_ARGB(a,r,g,b) ((((rgb_t)(a) & 0xff) << 24) | (((rgb_t)(r) & 0xff) << 16) | (((rgb_t)(g) & 0xff) << 8) | ((rgb_t)(b) & 0xff)) | |
| 44 | #define MAKE_RGB(r,g,b) (MAKE_ARGB(255,r,g,b)) | |
| 45 | 45 | |
| 46 | 46 | /* macros to extract components from rgb_t values */ |
| 47 | 47 | #define RGB_ALPHA(rgb) (((rgb) >> 24) & 0xff) |
| r3373 | r3374 | |
| 50 | 50 | #define RGB_BLUE(rgb) ((rgb) & 0xff) |
| 51 | 51 | |
| 52 | 52 | /* common colors */ |
| 53 | #define RGB_BLACK (MAKE_RGB(0,0,0)) | |
| 54 | #define RGB_WHITE (MAKE_RGB(255,255,255)) | |
| 53 | #define RGB_BLACK (MAKE_ARGB(255,0,0,0)) | |
| 54 | #define RGB_WHITE (MAKE_ARGB(255,255,255,255)) | |
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | |
| r3373 | r3374 | |
| 129 | 129 | |
| 130 | 130 | /* ----- palette adjustments ----- */ |
| 131 | 131 | |
| 132 | /* set the overall brightness for the palette */ | |
| 133 | void palette_set_brightness(palette_t *palette, float brightness); | |
| 134 | ||
| 135 | /* set the overall contrast for the palette */ | |
| 136 | void palette_set_contrast(palette_t *palette, float contrast); | |
| 137 | ||
| 138 | /* set the overall gamma for the palette */ | |
| 139 | void palette_set_gamma(palette_t *palette, float gamma); | |
| 140 | ||
| 132 | 141 | /* set the contrast adjustment for a single palette index */ |
| 133 | 142 | void palette_entry_set_contrast(palette_t *palette, UINT32 index, float contrast); |
| 134 | 143 |
| r3373 | r3374 | |
|---|---|---|
| 643 | 643 | if (avierr == AVIERR_NONE && file->riffbase == 0) |
| 644 | 644 | avierr = write_idx1_chunk(file); |
| 645 | 645 | |
| 646 | /* close the RIFF chunk */ | |
| 647 | if (avierr == AVIERR_NONE) | |
| 648 | avierr = chunk_close(file); | |
| 649 | ||
| 650 | /* update the avih chunk */ | |
| 651 | if (avierr == AVIERR_NONE) | |
| 652 | avierr = write_avih_chunk(file, FALSE); | |
| 653 | ||
| 654 | 646 | /* update the strh and indx chunks for each stream */ |
| 655 | 647 | for (strnum = 0; strnum < file->streams; strnum++) |
| 656 | 648 | { |
| r3373 | r3374 | |
| 659 | 651 | if (avierr == AVIERR_NONE) |
| 660 | 652 | avierr = write_indx_chunk(file, &file->stream[strnum], FALSE); |
| 661 | 653 | } |
| 654 | ||
| 655 | /* update the avih chunk */ | |
| 656 | if (avierr == AVIERR_NONE) | |
| 657 | avierr = write_avih_chunk(file, FALSE); | |
| 658 | ||
| 659 | /* close the RIFF chunk */ | |
| 660 | if (avierr == AVIERR_NONE) | |
| 661 | avierr = chunk_close(file); | |
| 662 | 662 | } |
| 663 | 663 | |
| 664 | 664 | /* close the file */ |
| r3373 | r3374 | |
| 1716 | 1716 | { |
| 1717 | 1717 | file_error filerr; |
| 1718 | 1718 | avi_error avierr; |
| 1719 | UINT32 idxreserve; | |
| 1719 | 1720 | UINT32 written; |
| 1720 | 1721 | |
| 1722 | /* if we are the first RIFF, we must reserve enough space for the IDX chunk */ | |
| 1723 | idxreserve = 0; | |
| 1724 | if (file->riffbase == 0 && type != CHUNKTYPE_IDX1) | |
| 1725 | idxreserve = compute_idx1_size(file); | |
| 1726 | ||
| 1721 | 1727 | /* if we are getting too big, split the RIFF */ |
| 1722 | 1728 | /* note that we ignore writes before the current RIFF base, as those are assumed to be |
| 1723 | 1729 | overwrites of a chunk from the previous RIFF */ |
| 1724 | if ((file->riffbase == 0 && file->writeoffs + length + compute_idx1_size(file) >= MAX_RIFF_SIZE) || | |
| 1725 | (file->writeoffs >= file->riffbase && file->writeoffs + length - file->riffbase >= MAX_RIFF_SIZE)) | |
| 1730 | if (file->writeoffs >= file->riffbase && file->writeoffs + length + idxreserve - file->riffbase >= MAX_RIFF_SIZE) | |
| 1726 | 1731 | { |
| 1727 | 1732 | /* close the movi list */ |
| 1728 | 1733 | avierr = chunk_close(file); |
| r3373 | r3374 | |
|---|---|---|
| 367 | 367 | |
| 368 | 368 | void vbi_metadata_unpack(vbi_metadata *vbi, UINT32 *framenum, const UINT8 *source) |
| 369 | 369 | { |
| 370 | *framenum = (source[0] << 16) | (source[1] << 8) | source[2]; | |
| 370 | if (framenum != NULL) | |
| 371 | *framenum = (source[0] << 16) | (source[1] << 8) | source[2]; | |
| 371 | 372 | vbi->white = source[3]; |
| 372 | 373 | vbi->line16 = (source[4] << 16) | (source[5] << 8) | source[6]; |
| 373 | 374 | vbi->line17 = (source[7] << 16) | (source[8] << 8) | source[9]; |
| r3373 | r3374 | |
|---|---|---|
| 438 | 438 | void osd_init(running_machine *machine) |
| 439 | 439 | { |
| 440 | 440 | add_exit_callback(machine, testmess_exit); |
| 441 | target = render_target_alloc(NULL, 0); | |
| 441 | target = render_target_alloc(machine, NULL, 0); | |
| 442 | 442 | render_target_set_orientation(target, 0); |
| 443 | 443 | } |
| 444 | 444 |
| r3373 | r3374 | |
|---|---|---|
| 108 | 108 | { |
| 109 | 109 | palette_set_color( machine, i, RGB_WHITE); |
| 110 | 110 | #ifndef BRIGHTNESS_DOES_NOT_WORK |
| 111 | palette_set_ | |
| 111 | palette_set_p | |
| 112 | 112 | #endif |
| 113 | 113 | } |
| 114 | 114 | } |
| r3373 | r3374 | |
| 148 | 148 | #ifdef BRIGHTNESS_DOES_NOT_WORK |
| 149 | 149 | palette_set_color( screen->machine, pen[i], 255 * bright, 255 * bright, 255 * bright); |
| 150 | 150 | #else |
| 151 | palette_set_ | |
| 151 | palette_set_p | |
| 152 | 152 | #endif |
| 153 | 153 | } |
| 154 | 154 | // draw bitmap (bottom to top) |
| r3373 | r3374 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | MACHINE_RESET( atom ); |
| 22 | 22 | QUICKLOAD_LOAD( atom ); |
| 23 | READ8_HANDLER (atom_8255_porta_r); | |
| 24 | READ8_HANDLER (atom_8255_portb_r); | |
| 25 | READ8_HANDLER (atom_8255_portc_r); | |
| 26 | WRITE8_HANDLER (atom_8255_porta_w ); | |
| 27 | WRITE8_HANDLER (atom_8255_portb_w ); | |
| 28 | WRITE8_HANDLER (atom_8255_portc_w ); | |
| 23 | READ8_DEVICE_HANDLER (atom_8255_porta_r); | |
| 24 | READ8_DEVICE_HANDLER (atom_8255_portb_r); | |
| 25 | READ8_DEVICE_HANDLER (atom_8255_portc_r); | |
| 26 | WRITE8_DEVICE_HANDLER (atom_8255_porta_w ); | |
| 27 | WRITE8_DEVICE_HANDLER (atom_8255_portb_w ); | |
| 28 | WRITE8_DEVICE_HANDLER (atom_8255_portc_w ); | |
| 29 | 29 | |
| 30 | 30 | /* for floppy disc interface */ |
| 31 | 31 | READ8_HANDLER (atom_8271_r); |
| r3373 | r3374 | |
|---|---|---|
| 43 | 43 | radio_ram_disk = auto_malloc(0x20000); |
| 44 | 44 | memset(radio_ram_disk,0,0x20000); |
| 45 | 45 | } |
| 46 | static READ8_HANDLER (radio86_8255_portb_r2 ) | |
| 46 | static READ8_DEVICE_HANDLER (radio86_8255_portb_r2 ) | |
| 47 | 47 | { |
| 48 | 48 | UINT8 key = 0xff; |
| 49 | if ((radio86_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"LINE0"); } | |
| 50 | if ((radio86_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"LINE1"); } | |
| 51 | if ((radio86_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"LINE2"); } | |
| 52 | if ((radio86_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"LINE3"); } | |
| 53 | if ((radio86_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"LINE4"); } | |
| 54 | if ((radio86_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"LINE5"); } | |
| 55 | if ((radio86_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"LINE6"); } | |
| 56 | if ((radio86_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"LINE7"); } | |
| 49 | if ((radio86_keyboard_mask & 0x01)!=0) { key &= input_port_read(device->machine,"LINE0"); } | |
| 50 | if ((radio86_keyboard_mask & 0x02)!=0) { key &= input_port_read(device->machine,"LINE1"); } | |
| 51 | if ((radio86_keyboard_mask & 0x04)!=0) { key &= input_port_read(device->machine,"LINE2"); } | |
| 52 | if ((radio86_keyboard_mask & 0x08)!=0) { key &= input_port_read(device->machine,"LINE3"); } | |
| 53 | if ((radio86_keyboard_mask & 0x10)!=0) { key &= input_port_read(device->machine,"LINE4"); } | |
| 54 | if ((radio86_keyboard_mask & 0x20)!=0) { key &= input_port_read(device->machine,"LINE5"); } | |
| 55 | if ((radio86_keyboard_mask & 0x40)!=0) { key &= input_port_read(device->machine,"LINE6"); } | |
| 56 | if ((radio86_keyboard_mask & 0x80)!=0) { key &= input_port_read(device->machine,"LINE7"); } | |
| 57 | 57 | return key; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | static READ8_HANDLER (radio86_8255_portc_r2 ) | |
| 60 | static READ8_DEVICE_HANDLER (radio86_8255_portc_r2 ) | |
| 61 | 61 | { |
| 62 | double level = cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )); | |
| 63 | UINT8 dat = input_port_read(machine,"LINE8"); | |
| 62 | double level = cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" )); | |
| 63 | UINT8 dat = input_port_read(device->machine, "LINE8"); | |
| 64 | 64 | if (level < 0) { |
| 65 | 65 | dat ^= radio86_tape_value; |
| 66 | 66 | } |
| 67 | 67 | return dat; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | static WRITE8_HANDLER (radio86_8255_porta_w2 ) | |
| 70 | static WRITE8_DEVICE_HANDLER (radio86_8255_porta_w2 ) | |
| 71 | 71 | { |
| 72 | 72 | radio86_keyboard_mask = data ^ 0xff; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | static WRITE8_HANDLER (radio86_8255_portc_w2 ) | |
| 75 | static WRITE8_DEVICE_HANDLER (radio86_8255_portc_w2 ) | |
| 76 | 76 | { |
| 77 | cassette_output(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ),data & 0x01 ? 1 : -1); | |
| 77 | cassette_output(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ),data & 0x01 ? 1 : -1); | |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | |
| r3373 | r3374 | |
| 100 | 100 | |
| 101 | 101 | |
| 102 | 102 | |
| 103 | static READ8_HANDLER (rk7007_8255_portc_r ) | |
| 103 | static READ8_DEVICE_HANDLER (rk7007_8255_portc_r ) | |
| 104 | 104 | { |
| 105 | double level = cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )); | |
| 105 | double level = cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" )); | |
| 106 | 106 | UINT8 key = 0xff; |
| 107 | if ((radio86_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"CLINE0"); } | |
| 108 | if ((radio86_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"CLINE1"); } | |
| 109 | if ((radio86_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"CLINE2"); } | |
| 110 | if ((radio86_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"CLINE3"); } | |
| 111 | if ((radio86_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"CLINE4"); } | |
| 112 | if ((radio86_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"CLINE5"); } | |
| 113 | if ((radio86_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"CLINE6"); } | |
| 114 | if ((radio86_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"CLINE7"); } | |
| 107 | if ((radio86_keyboard_mask & 0x01)!=0) { key &= input_port_read(device->machine,"CLINE0"); } | |
| 108 | if ((radio86_keyboard_mask & 0x02)!=0) { key &= input_port_read(device->machine,"CLINE1"); } | |
| 109 | if ((radio86_keyboard_mask & 0x04)!=0) { key &= input_port_read(device->machine,"CLINE2"); } | |
| 110 | if ((radio86_keyboard_mask & 0x08)!=0) { key &= input_port_read(device->machine,"CLINE3"); } | |
| 111 | if ((radio86_keyboard_mask & 0x10)!=0) { key &= input_port_read(device->machine,"CLINE4"); } | |
| 112 | if ((radio86_keyboard_mask & 0x20)!=0) { key &= input_port_read(device->machine,"CLINE5"); } | |
| 113 | if ((radio86_keyboard_mask & 0x40)!=0) { key &= input_port_read(device->machine,"CLINE6"); } | |
| 114 | if ((radio86_keyboard_mask & 0x80)!=0) { key &= input_port_read(device->machine,"CLINE7"); } | |
| 115 | 115 | key &= 0xe0; |
| 116 | 116 | if (level < 0) { |
| 117 | 117 | key ^= radio86_tape_value; |
| r3373 | r3374 | |
| 198 | 198 | disk_sel = data; |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | static READ8_HANDLER (radio86_romdisk_porta_r ) | |
| 201 | static READ8_DEVICE_HANDLER (radio86_romdisk_porta_r ) | |
| 202 | 202 | { |
| 203 | UINT8 *romdisk = memory_region(machine, "main") + 0x10000; | |
| 203 | UINT8 *romdisk = memory_region(device->machine, "main") + 0x10000; | |
| 204 | 204 | if ((disk_sel & 0x0f) ==0) { |
| 205 | 205 | return romdisk[romdisk_msb*256+romdisk_lsb]; |
| 206 | 206 | } else { |
| r3373 | r3374 | |
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | static WRITE8_HANDLER (radio86_romdisk_portb_w ) | |
| 215 | static WRITE8_DEVICE_HANDLER (radio86_romdisk_portb_w ) | |
| 216 | 216 | { |
| 217 | 217 | romdisk_lsb = data; |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | static WRITE8_HANDLER (radio86_romdisk_portc_w ) | |
| 220 | static WRITE8_DEVICE_HANDLER (radio86_romdisk_portc_w ) | |
| 221 | 221 | { |
| 222 | 222 | romdisk_msb = data; |
| 223 | 223 | } |
| r3373 | r3374 | |
| 232 | 232 | radio86_romdisk_portc_w |
| 233 | 233 | }; |
| 234 | 234 | |
| 235 | static WRITE8_HANDLER (mikrosha_8255_font_page_w ) | |
| 235 | static WRITE8_DEVICE_HANDLER (mikrosha_8255_font_page_w ) | |
| 236 | 236 | { |
| 237 | 237 | mikrosha_font_page = (data > 7) & 1; |
| 238 | 238 | } |
| r3373 | r3374 | |
|---|---|---|
| 197 | 197 | } |
| 198 | 198 | }; |
| 199 | 199 | |
| 200 | static WRITE8_HANDLER (b2m_8255_porta_w ) | |
| 200 | static WRITE8_DEVICE_HANDLER (b2m_8255_porta_w ) | |
| 201 | 201 | { |
| 202 | 202 | b2m_8255_porta = data; |
| 203 | 203 | } |
| 204 | static WRITE8_HANDLER (b2m_8255_portb_w ) | |
| 204 | static WRITE8_DEVICE_HANDLER (b2m_8255_portb_w ) | |
| 205 | 205 | { |
| 206 | 206 | b2m_video_scroll = data; |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | static WRITE8_HANDLER (b2m_8255_portc_w ) | |
| 209 | static WRITE8_DEVICE_HANDLER (b2m_8255_portc_w ) | |
| 210 | 210 | { |
| 211 | 211 | b2m_8255_portc = data; |
| 212 | b2m_set_bank(machine,b2m_8255_portc & 7); | |
| 212 | b2m_set_bank(device->machine, b2m_8255_portc & 7); | |
| 213 | 213 | b2m_video_page = (b2m_8255_portc >> 7) & 1; |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | static READ8_HANDLER (b2m_8255_porta_r ) | |
| 216 | static READ8_DEVICE_HANDLER (b2m_8255_porta_r ) | |
| 217 | 217 | { |
| 218 | 218 | return 0xff; |
| 219 | 219 | } |
| 220 | static READ8_HANDLER (b2m_8255_portb_r ) | |
| 220 | static READ8_DEVICE_HANDLER (b2m_8255_portb_r ) | |
| 221 | 221 | { |
| 222 | 222 | return b2m_video_scroll; |
| 223 | 223 | } |
| 224 | static READ8_HANDLER (b2m_8255_portc_r ) | |
| 224 | static READ8_DEVICE_HANDLER (b2m_8255_portc_r ) | |
| 225 | 225 | { |
| 226 | 226 | return 0xff; |
| 227 | 227 | } |
| r3373 | r3374 | |
| 236 | 236 | }; |
| 237 | 237 | |
| 238 | 238 | |
| 239 | static WRITE8_HANDLER (b2m_ext_8255_porta_w ) | |
| 239 | static WRITE8_DEVICE_HANDLER (b2m_ext_8255_porta_w ) | |
| 240 | 240 | { |
| 241 | 241 | } |
| 242 | static WRITE8_HANDLER (b2m_ext_8255_portb_w ) | |
| 242 | static WRITE8_DEVICE_HANDLER (b2m_ext_8255_portb_w ) | |
| 243 | 243 | { |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | static WRITE8_HANDLER (b2m_ext_8255_portc_w ) | |
| 246 | static WRITE8_DEVICE_HANDLER (b2m_ext_8255_portc_w ) | |
| 247 | 247 | { |
| 248 | 248 | UINT8 drive = ((data >> 1) & 1) ^ 1; |
| 249 | 249 | UINT8 side = (data & 1) ^ 1; |
| r3373 | r3374 | |
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | static READ8_HANDLER (b2m_ext_8255_porta_r ) | |
| 261 | static READ8_DEVICE_HANDLER (b2m_ext_8255_porta_r ) | |
| 262 | 262 | { |
| 263 | 263 | return 0xff; |
| 264 | 264 | } |
| 265 | static READ8_HANDLER (b2m_ext_8255_portb_r ) | |
| 265 | static READ8_DEVICE_HANDLER (b2m_ext_8255_portb_r ) | |
| 266 | 266 | { |
| 267 | 267 | return 0xff; |
| 268 | 268 | } |
| 269 | static READ8_HANDLER (b2m_ext_8255_portc_r ) | |
| 269 | static READ8_DEVICE_HANDLER (b2m_ext_8255_portc_r ) | |
| 270 | 270 | { |
| 271 | 271 | return 0xff; |
| 272 | 272 | } |
| r3373 | r3374 | |
| 281 | 281 | b2m_ext_8255_portc_w |
| 282 | 282 | }; |
| 283 | 283 | |
| 284 | static READ8_HANDLER (b2m_romdisk_porta_r ) | |
| 284 | static READ8_DEVICE_HANDLER (b2m_romdisk_porta_r ) | |
| 285 | 285 | { |
| 286 | UINT8 *romdisk = memory_region(machine, "main") + 0x12000; | |
| 286 | UINT8 *romdisk = memory_region(device->machine, "main") + 0x12000; | |
| 287 | 287 | return romdisk[b2m_romdisk_msb*256+b2m_romdisk_lsb]; |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | static WRITE8_HANDLER (b2m_romdisk_portb_w ) | |
| 290 | static WRITE8_DEVICE_HANDLER (b2m_romdisk_portb_w ) | |
| 291 | 291 | { |
| 292 | 292 | b2m_romdisk_lsb = data; |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | static WRITE8_HANDLER (b2m_romdisk_portc_w ) | |
| 295 | static WRITE8_DEVICE_HANDLER (b2m_romdisk_portc_w ) | |
| 296 | 296 | { |
| 297 | 297 | b2m_romdisk_msb = data & 0x7f; |
| 298 | 298 | } |
| r3373 | r3374 | |
|---|---|---|
| 224 | 224 | |
| 225 | 225 | *******************************************************************************/ |
| 226 | 226 | |
| 227 | static READ8_HANDLER ( pmd85_ppi_0_porta_r ) | |
| 227 | static READ8_DEVICE_HANDLER ( pmd85_ppi_0_porta_r ) | |
| 228 | 228 | { |
| 229 | 229 | return 0xff; |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | static READ8_HANDLER ( pmd85_ppi_0_portb_r ) | |
| 232 | static READ8_DEVICE_HANDLER ( pmd85_ppi_0_portb_r ) | |
| 233 | 233 | { |
| 234 | 234 | static const char *keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7", |
| 235 | 235 | "KEY8", "KEY9", "KEY10", "KEY11", "KEY12", "KEY13", "KEY14", "KEY15" }; |
| 236 | 236 | |
| 237 | return input_port_read(machine, keynames[(pmd85_ppi_port_outputs[0][0] & 0x0f)]) & input_port_read(machine, "KEY15"); | |
| 237 | return input_port_read(device->machine, keynames[(pmd85_ppi_port_outputs[0][0] & 0x0f)]) & input_port_read(device->machine, "KEY15"); | |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | static READ8_HANDLER ( pmd85_ppi_0_portc_r ) | |
| 240 | static READ8_DEVICE_HANDLER ( pmd85_ppi_0_portc_r ) | |
| 241 | 241 | { |
| 242 | 242 | return 0xff; |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | static WRITE8_HANDLER ( pmd85_ppi_0_porta_w ) | |
| 245 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_0_porta_w ) | |
| 246 | 246 | { |
| 247 | 247 | pmd85_ppi_port_outputs[0][0] = data; |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | static WRITE8_HANDLER ( pmd85_ppi_0_portb_w ) | |
| 250 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_0_portb_w ) | |
| 251 | 251 | { |
| 252 | 252 | pmd85_ppi_port_outputs[0][1] = data; |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | static WRITE8_HANDLER ( pmd85_ppi_0_portc_w ) | |
| 255 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_0_portc_w ) | |
| 256 | 256 | { |
| 257 | 257 | pmd85_ppi_port_outputs[0][2] = data; |
| 258 | 258 | set_led_status(PMD85_LED_2, (data & 0x08) ? 1 : 0); |
| r3373 | r3374 | |
| 267 | 267 | |
| 268 | 268 | *******************************************************************************/ |
| 269 | 269 | |
| 270 | static READ8_HANDLER ( mato_ppi_0_portb_r ) | |
| 270 | static READ8_DEVICE_HANDLER ( mato_ppi_0_portb_r ) | |
| 271 | 271 | { |
| 272 | 272 | int i; |
| 273 | 273 | UINT8 data = 0xff; |
| r3373 | r3374 | |
| 276 | 276 | for (i = 0; i < 8; i++) |
| 277 | 277 | { |
| 278 | 278 | if (!(pmd85_ppi_port_outputs[0][0] & (1 << i))) |
| 279 | data &= input_port_read(machine, keynames[i]); | |
| 279 | data &= input_port_read(device->machine, keynames[i]); | |
| 280 | 280 | } |
| 281 | 281 | return data; |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | static READ8_HANDLER ( mato_ppi_0_portc_r ) | |
| 284 | static READ8_DEVICE_HANDLER ( mato_ppi_0_portc_r ) | |
| 285 | 285 | { |
| 286 | return input_port_read(machine, "KEY8") | 0x8f; | |
| 286 | return input_port_read(device->machine, "KEY8") | 0x8f; | |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | static WRITE8_HANDLER ( mato_ppi_0_portc_w ) | |
| 289 | static WRITE8_DEVICE_HANDLER ( mato_ppi_0_portc_w ) | |
| 290 | 290 | { |
| 291 | 291 | pmd85_ppi_port_outputs[0][2] = data; |
| 292 | 292 | set_led_status(PMD85_LED_2, (data & 0x08) ? 1 : 0); |
| r3373 | r3374 | |
| 301 | 301 | |
| 302 | 302 | *******************************************************************************/ |
| 303 | 303 | |
| 304 | static | |
| 304 | static | |
| 305 | 305 | { |
| 306 | 306 | return 0xff; |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | static | |
| 309 | static | |
| 310 | 310 | { |
| 311 | 311 | return 0xff; |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | static | |
| 314 | static | |
| 315 | 315 | { |
| 316 | 316 | return 0xff; |
| 317 | 317 | } |
| 318 | 318 | |
| 319 | static WRITE8_HANDLER ( pmd85_ppi_1_porta_w ) | |
| 319 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_1_porta_w ) | |
| 320 | 320 | { |
| 321 | 321 | pmd85_ppi_port_outputs[1][0] = data; |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | static WRITE8_HANDLER ( pmd85_ppi_1_portb_w ) | |
| 324 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_1_portb_w ) | |
| 325 | 325 | { |
| 326 | 326 | pmd85_ppi_port_outputs[1][1] = data; |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | static WRITE8_HANDLER ( pmd85_ppi_1_portc_w ) | |
| 329 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_1_portc_w ) | |
| 330 | 330 | { |
| 331 | 331 | pmd85_ppi_port_outputs[1][2] = data; |
| 332 | 332 | } |
| r3373 | r3374 | |
| 343 | 343 | |
| 344 | 344 | *******************************************************************************/ |
| 345 | 345 | |
| 346 | static | |
| 346 | static | |
| 347 | 347 | { |
| 348 | 348 | return 0xff; |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | static | |
| 351 | static | |
| 352 | 352 | { |
| 353 | 353 | return 0xff; |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | static | |
| 356 | static | |
| 357 | 357 | { |
| 358 | 358 | return 0xff; |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | static WRITE8_HANDLER ( pmd85_ppi_2_porta_w ) | |
| 361 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_2_porta_w ) | |
| 362 | 362 | { |
| 363 | 363 | pmd85_ppi_port_outputs[2][0] = data; |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | static WRITE8_HANDLER ( pmd85_ppi_2_portb_w ) | |
| 366 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_2_portb_w ) | |
| 367 | 367 | { |
| 368 | 368 | pmd85_ppi_port_outputs[2][1] = data; |
| 369 | 369 | } |
| 370 | 370 | |
| 371 | static WRITE8_HANDLER ( pmd85_ppi_2_portc_w ) | |
| 371 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_2_portc_w ) | |
| 372 | 372 | { |
| 373 | 373 | pmd85_ppi_port_outputs[2][2] = data; |
| 374 | 374 | } |
| r3373 | r3374 | |
| 435 | 435 | |
| 436 | 436 | *******************************************************************************/ |
| 437 | 437 | |
| 438 | static | |
| 438 | static | |
| 439 | 439 | { |
| 440 | return memory_region(machine, "user1")[pmd85_ppi_port_outputs[3][1]|(pmd85_ppi_port_outputs[3][2]<<8)]; | |
| 440 | return memory_region(device->machine, "user1")[pmd85_ppi_port_outputs[3][1]|(pmd85_ppi_port_outputs[3][2]<<8)]; | |
| 441 | 441 | } |
| 442 | 442 | |
| 443 | static | |
| 443 | static | |
| 444 | 444 | { |
| 445 | 445 | return 0xff; |
| 446 | 446 | } |
| 447 | 447 | |
| 448 | static | |
| 448 | static | |
| 449 | 449 | { |
| 450 | 450 | return 0xff; |
| 451 | 451 | } |
| 452 | 452 | |
| 453 | static WRITE8_HANDLER ( pmd85_ppi_3_porta_w ) | |
| 453 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_3_porta_w ) | |
| 454 | 454 | { |
| 455 | 455 | pmd85_ppi_port_outputs[3][0] = data; |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | static WRITE8_HANDLER ( pmd85_ppi_3_portb_w ) | |
| 458 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_3_portb_w ) | |
| 459 | 459 | { |
| 460 | 460 | pmd85_ppi_port_outputs[3][1] = data; |
| 461 | 461 | } |
| 462 | 462 | |
| 463 | static WRITE8_HANDLER ( pmd85_ppi_3_portc_w ) | |
| 463 | static WRITE8_DEVICE_HANDLER ( pmd85_ppi_3_portc_w ) | |
| 464 | 464 | { |
| 465 | 465 | pmd85_ppi_port_outputs[3][2] = data; |
| 466 | 466 | } |
| r3373 | r3374 | |
|---|---|---|
| 21 | 21 | memset(mess_ram,0,64*1024); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | READ8_HANDLER (vector06_8255_portb_r ) | |
| 24 | READ8_DEVICE_HANDLER (vector06_8255_portb_r ) | |
| 25 | 25 | { |
| 26 | 26 | UINT8 key = 0xff; |
| 27 | if ((vector06_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"LINE0"); } | |
| 28 | if ((vector06_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"LINE1"); } | |
| 29 | if ((vector06_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"LINE2"); } | |
| 30 | if ((vector06_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"LINE3"); } | |
| 31 | if ((vector06_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"LINE4"); } | |
| 32 | if ((vector06_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"LINE5"); } | |
| 33 | if ((vector06_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"LINE6"); } | |
| 34 | if ((vector06_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"LINE7"); } | |
| 27 | if ((vector06_keyboard_mask & 0x01)!=0) { key &= input_port_read(device->machine,"LINE0"); } | |
| 28 | if ((vector06_keyboard_mask & 0x02)!=0) { key &= input_port_read(device->machine,"LINE1"); } | |
| 29 | if ((vector06_keyboard_mask & 0x04)!=0) { key &= input_port_read(device->machine,"LINE2"); } | |
| 30 | if ((vector06_keyboard_mask & 0x08)!=0) { key &= input_port_read(device->machine,"LINE3"); } | |
| 31 | if ((vector06_keyboard_mask & 0x10)!=0) { key &= input_port_read(device->machine,"LINE4"); } | |
| 32 | if ((vector06_keyboard_mask & 0x20)!=0) { key &= input_port_read(device->machine,"LINE5"); } | |
| 33 | if ((vector06_keyboard_mask & 0x40)!=0) { key &= input_port_read(device->machine,"LINE6"); } | |
| 34 | if ((vector06_keyboard_mask & 0x80)!=0) { key &= input_port_read(device->machine,"LINE7"); } | |
| 35 | 35 | return key; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | READ8_HANDLER (vector06_8255_portc_r ) | |
| 38 | READ8_DEVICE_HANDLER (vector06_8255_portc_r ) | |
| 39 | 39 | { |
| 40 | return input_port_read(machine,"LINE8"); | |
| 40 | return input_port_read(device->machine, "LINE8"); | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | WRITE8_HANDLER (vector06_8255_porta_w ) | |
| 43 | WRITE8_DEVICE_HANDLER (vector06_8255_porta_w ) | |
| 44 | 44 | { |
| 45 | 45 | vector06_keyboard_mask = data ^ 0xff; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | WRITE8_HANDLER (vector06_8255_portb_w ) | |
| 48 | WRITE8_DEVICE_HANDLER (vector06_8255_portb_w ) | |
| 49 | 49 | { |
| 50 | 50 | vector_color_index = data; |
| 51 | 51 | } |
| r3373 | r3374 | |
|---|---|---|
| 44 | 44 | "LINE4", "LINE5", "LINE6", "LINE7", |
| 45 | 45 | "LINE8", "LINE9"}; |
| 46 | 46 | |
| 47 | READ8_HANDLER (irisha_8255_portb_r ) | |
| 47 | READ8_DEVICE_HANDLER (irisha_8255_portb_r ) | |
| 48 | 48 | { |
| 49 | 49 | if (irisha_keypressed==1) { |
| 50 | 50 | irisha_keypressed =0; |
| r3373 | r3374 | |
| 54 | 54 | return 0x00; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | READ8_HANDLER (irisha_8255_portc_r ) | |
| 57 | READ8_DEVICE_HANDLER (irisha_8255_portc_r ) | |
| 58 | 58 | { |
| 59 | 59 | logerror("irisha_8255_portc_r\n"); |
| 60 | 60 | return 0; |
| r3373 | r3374 | |
| 72 | 72 | return keycode; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | WRITE8_HANDLER (irisha_8255_porta_w ) | |
| 75 | WRITE8_DEVICE_HANDLER (irisha_8255_porta_w ) | |
| 76 | 76 | { |
| 77 | 77 | logerror("irisha_8255_porta_w %02x\n",data); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | WRITE8_HANDLER (irisha_8255_portb_w ) | |
| 80 | WRITE8_DEVICE_HANDLER (irisha_8255_portb_w ) | |
| 81 | 81 | { |
| 82 | 82 | logerror("irisha_8255_portb_w %02x\n",data); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | WRITE8_HANDLER (irisha_8255_portc_w ) | |
| 85 | WRITE8_DEVICE_HANDLER (irisha_8255_portc_w ) | |
| 86 | 86 | { |
| 87 | 87 | //logerror("irisha_8255_portc_w %02x\n",data); |
| 88 | 88 | } |
| r3373 | r3374 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | UINT8 orion_video_mode_mask; |
| 38 | 38 | |
| 39 | static READ8_HANDLER (orion_romdisk_porta_r ) | |
| 39 | static READ8_DEVICE_HANDLER (orion_romdisk_porta_r ) | |
| 40 | 40 | { |
| 41 | UINT8 *romdisk = memory_region(machine, "main") + 0x10000; | |
| 41 | UINT8 *romdisk = memory_region(device->machine, "main") + 0x10000; | |
| 42 | 42 | return romdisk[romdisk_msb*256+romdisk_lsb]; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | static WRITE8_HANDLER (orion_romdisk_portb_w ) | |
| 45 | static WRITE8_DEVICE_HANDLER (orion_romdisk_portb_w ) | |
| 46 | 46 | { |
| 47 | 47 | romdisk_lsb = data; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | static WRITE8_HANDLER (orion_romdisk_portc_w ) | |
| 50 | static WRITE8_DEVICE_HANDLER (orion_romdisk_portc_w ) | |
| 51 | 51 | { |
| 52 | 52 | romdisk_msb = data; |
| 53 | 53 | } |
| r3373 | r3374 | |
|---|---|---|
| 165 | 165 | 8 CASR Cassette, Read data |
| 166 | 166 | */ |
| 167 | 167 | |
| 168 | static READ8_HANDLER ( svi318_ppi_port_a_r ) | |
| 168 | static READ8_DEVICE_HANDLER ( svi318_ppi_port_a_r ) | |
| 169 | 169 | { |
| 170 | 170 | int data = 0x0f; |
| 171 | 171 | |
| 172 | if (cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) > 0.0038) | |
| 172 | if (cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" )) > 0.0038) | |
| 173 | 173 | data |= 0x80; |
| 174 | 174 | if (!svi318_cassette_present(0)) |
| 175 | 175 | data |= 0x40; |
| 176 | data |= input_port_read(machine, "BUTTONS") & 0x30; | |
| 176 | data |= input_port_read(device->machine, "BUTTONS") & 0x30; | |
| 177 | 177 | |
| 178 | 178 | return data; |
| 179 | 179 | } |
| r3373 | r3374 | |
| 191 | 191 | 8 IN7 Keyboard, Column status of selected line |
| 192 | 192 | */ |
| 193 | 193 | |
| 194 | static | |
| 194 | static | |
| 195 | 195 | { |
| 196 | 196 | int row; |
| 197 | 197 | static const char *keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", |
| r3373 | r3374 | |
| 199 | 199 | |
| 200 | 200 | row = svi.keyboard_row; |
| 201 | 201 | if (row <= 10) |
| 202 | return input_port_read(machine, keynames[row]); | |
| 202 | return input_port_read(device->machine, keynames[row]); | |
| 203 | 203 | |
| 204 | 204 | return 0xff; |
| 205 | 205 | } |
| r3373 | r3374 | |
| 217 | 217 | 8 SOUND Keyboard, Click sound bit (pulse) |
| 218 | 218 | */ |
| 219 | 219 | |
| 220 | static WRITE8_HANDLER ( svi318_ppi_port_c_w ) | |
| 220 | static WRITE8_DEVICE_HANDLER ( svi318_ppi_port_c_w ) | |
| 221 | 221 | { |
| 222 | 222 | int val; |
| 223 | 223 | |
| r3373 | r3374 | |
| 230 | 230 | if (svi318_cassette_present(0)) |
| 231 | 231 | { |
| 232 | 232 | cassette_change_state( |
| 233 | device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), | |
| 233 | device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), | |
| 234 | 234 | (data & 0x10) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, |
| 235 | 235 | CASSETTE_MOTOR_DISABLED); |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | /* cassette signal write */ |
| 239 | cassette_output(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), (data & 0x20) ? -1.0 : +1.0); | |
| 239 | cassette_output(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), (data & 0x20) ? -1.0 : +1.0); | |
| 240 | 240 | |
| 241 | 241 | svi.keyboard_row = data & 0x0F; |
| 242 | 242 | } |
| r3373 | r3374 | |
|---|---|---|
| 396 | 396 | /* Bit 6: J7-8 Centronics D6 */ |
| 397 | 397 | /* Bit 7: J7-9 Centronics D7 */ |
| 398 | 398 | /*-------------------------------------------------------------------------*/ |
| 399 | static WRITE8_HANDLER ( compis_ppi_port_a_w ) | |
| 399 | static WRITE8_DEVICE_HANDLER ( compis_ppi_port_a_w ) | |
| 400 | 400 | { |
| 401 | 401 | compis.printer.data = data; |
| 402 | 402 | } |
| r3373 | r3374 | |
| 410 | 410 | /* Bit 6: J7-13 Centronics SELECT */ |
| 411 | 411 | /* Bit 7: Tmr0 */ |
| 412 | 412 | /*-------------------------------------------------------------------------*/ |
| 413 | static READ8_HANDLER ( compis_ppi_port_b_r ) | |
| 413 | static READ8_DEVICE_HANDLER ( compis_ppi_port_b_r ) | |
| 414 | 414 | { |
| 415 | 415 | UINT8 data; |
| 416 | 416 | |
| 417 | 417 | /* DIP switch - Test mode */ |
| 418 | data = input_port_read(machine, "DSW0"); | |
| 418 | data = input_port_read(device->machine, "DSW0"); | |
| 419 | 419 | |
| 420 | 420 | /* Centronics busy */ |
| 421 | if (!printer_is_ready(printer_device(machine))) | |
| 421 | if (!printer_is_ready(printer_device(device->machine))) | |
| 422 | 422 | data |= 0x20; |
| 423 | 423 | |
| 424 | 424 | return data; |
| r3373 | r3374 | |
| 433 | 433 | /* Bit 6: V2-4 Floppy Soft reset */ |
| 434 | 434 | /* Bit 7: V2-3 Floppy Terminal count */ |
| 435 | 435 | /*-------------------------------------------------------------------------*/ |
| 436 | static WRITE8_HANDLER ( compis_ppi_port_c_w ) | |
| 436 | static WRITE8_DEVICE_HANDLER ( compis_ppi_port_c_w ) | |
| 437 | 437 | { |
| 438 | 438 | /* Centronics Strobe */ |
| 439 | 439 | if ((compis.printer.strobe) && !(data & 0x20)) |
| 440 | printer_output(printer_device(machine), compis.printer.data); | |
| 440 | printer_output(printer_device(device->machine), compis.printer.data); | |
| 441 | 441 | compis.printer.strobe = ((data & 0x20)?1:0); |
| 442 | 442 | |
| 443 | 443 | /* FDC Reset */ |
| 444 | 444 | if (data & 0x40) |
| 445 | compis_fdc_reset(machine); | |
| 445 | compis_fdc_reset(device->machine); | |
| 446 | 446 | |
| 447 | 447 | /* FDC Terminal count */ |
| 448 | compis_fdc_tc(machine, (data & 0x80)?1:0); | |
| 448 | compis_fdc_tc(device->machine, (data & 0x80)?1:0); | |
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | const ppi8255_interface compis_ppi_interface = |
| r3373 | r3374 | |
|---|---|---|
| 322 | 322 | msx_ch_reset_core (machine); |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | static WRITE8_HANDLER ( msx_ppi_port_a_w ); | |
| 326 | static WRITE8_HANDLER ( msx_ppi_port_c_w ); | |
| 327 | static READ8_HANDLER (msx_ppi_port_b_r ); | |
| 325 | static WRITE8_DEVICE_HANDLER ( msx_ppi_port_a_w ); | |
| 326 | static WRITE8_DEVICE_HANDLER ( msx_ppi_port_c_w ); | |
| 327 | static READ8_DEVICE_HANDLER (msx_ppi_port_b_r ); | |
| 328 | 328 | |
| 329 | 329 | const ppi8255_interface msx_ppi8255_interface = |
| 330 | 330 | { |
| r3373 | r3374 | |
| 691 | 691 | ** The PPI functions |
| 692 | 692 | */ |
| 693 | 693 | |
| 694 | static WRITE8_HANDLER ( msx_ppi_port_a_w ) | |
| 694 | static WRITE8_DEVICE_HANDLER ( msx_ppi_port_a_w ) | |
| 695 | 695 | { |
| 696 | 696 | msx1.primary_slot = data; |
| 697 | 697 | |
| 698 | 698 | if (VERBOSE) |
| 699 | 699 | logerror ("write to primary slot select: %02x\n", msx1.primary_slot); |
| 700 | msx_memory_map_all (machine); | |
| 700 | msx_memory_map_all (device->machine); | |
| 701 | 701 | } |
| 702 | 702 | |
| 703 | static WRITE8_HANDLER ( msx_ppi_port_c_w ) | |
| 703 | static WRITE8_DEVICE_HANDLER ( msx_ppi_port_c_w ) | |
| 704 | 704 | { |
| 705 | 705 | static int old_val = 0xff; |
| 706 | 706 | |
| r3373 | r3374 | |
| 714 | 714 | |
| 715 | 715 | /* cassette motor on/off */ |
| 716 | 716 | if ( (old_val ^ data) & 0x10) |
| 717 | cassette_change_state(cassette_device_image(machine), | |
| 717 | cassette_change_state(cassette_device_image(device->machine), | |
| 718 | 718 | (data & 0x10) ? CASSETTE_MOTOR_DISABLED : |
| 719 | 719 | CASSETTE_MOTOR_ENABLED, |
| 720 | 720 | CASSETTE_MASK_MOTOR); |
| 721 | 721 | |
| 722 | 722 | /* cassette signal write */ |
| 723 | 723 | if ( (old_val ^ data) & 0x20) |
| 724 | cassette_output(cassette_device_image(machine), (data & 0x20) ? -1.0 : 1.0); | |
| 724 | cassette_output(cassette_device_image(device->machine), (data & 0x20) ? -1.0 : 1.0); | |
| 725 | 725 | |
| 726 | 726 | old_val = data; |
| 727 | 727 | } |
| 728 | 728 | |
| 729 | static READ8_HANDLER( msx_ppi_port_b_r ) | |
| 729 | static READ8_DEVICE_HANDLER( msx_ppi_port_b_r ) | |
| 730 | 730 | { |
| 731 | 731 | UINT8 result = 0xff; |
| 732 | 732 | int row, data; |
| 733 | 733 | static const char *keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5" }; |
| 734 | 734 | |
| 735 | row = ppi8255_r( | |
| 735 | row = ppi8255_r( | |
| 736 | 736 | if (row <= 10) |
| 737 | 737 | { |
| 738 | data = input_port_read(machine, keynames[row / 2]); | |
| 738 | data = input_port_read(device->machine, keynames[row / 2]); | |
| 739 | 739 | |
| 740 | 740 | if (row & 1) |
| 741 | 741 | data >>= 8; |
| r3373 | r3374 | |
|---|---|---|
| 38 | 38 | |
| 39 | 39 | static UINT8 mz700_motor_on = 0; /* cassette motor key (play key) */ |
| 40 | 40 | |
| 41 | static READ8_HANDLER ( pio_port_a_r ); | |
| 42 | static READ8_HANDLER ( pio_port_b_r ); | |
| 43 | static READ8_HANDLER ( pio_port_c_r ); | |
| 44 | static WRITE8_HANDLER ( pio_port_a_w ); | |
| 45 | static WRITE8_HANDLER ( pio_port_b_w ); | |
| 46 | static WRITE8_HANDLER ( pio_port_c_w ); | |
| 41 | static READ8_DEVICE_HANDLER ( pio_port_a_r ); | |
| 42 | static READ8_DEVICE_HANDLER ( pio_port_b_r ); | |
| 43 | static READ8_DEVICE_HANDLER ( pio_port_c_r ); | |
| 44 | static WRITE8_DEVICE_HANDLER ( pio_port_a_w ); | |
| 45 | static WRITE8_DEVICE_HANDLER ( pio_port_b_w ); | |
| 46 | static WRITE8_DEVICE_HANDLER ( pio_port_c_w ); | |
| 47 | 47 | |
| 48 | 48 | const ppi8255_interface mz700_ppi8255_interface = { |
| 49 | 49 | pio_port_a_r, |
| r3373 | r3374 | |
| 127 | 127 | |
| 128 | 128 | /************************ PIO ************************************************/ |
| 129 | 129 | |
| 130 | static | |
| 130 | static | |
| 131 | 131 | { |
| 132 | 132 | UINT8 data = pio_port_a_output; |
| 133 | 133 | LOG(2,"mz700_pio_port_a_r",("%02X\n", data)); |
| r3373 | r3374 | |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /* read keyboard row - indexed by a demux LS145 which is connected to PA0-3 */ |
| 138 | static | |
| 138 | static | |
| 139 | 139 | { |
| 140 | 140 | UINT8 demux_LS145, data = 0xff; |
| 141 | 141 | static const char *keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", |
| 142 | 142 | "ROW6", "ROW7", "ROW8", "ROW9", "ROW10" }; |
| 143 | 143 | |
| 144 | 144 | demux_LS145 = pio_port_a_output & 15; |
| 145 | data = input_port_read(machine, keynames[demux_LS145]); | |
| 145 | data = input_port_read(device->machine, keynames[demux_LS145]); | |
| 146 | 146 | LOG(2,"mz700_pio_port_b_r",("%02X\n", data)); |
| 147 | 147 | |
| 148 | 148 | return data; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | static READ8_HANDLER (pio_port_c_r ) | |
| 151 | static READ8_DEVICE_HANDLER (pio_port_c_r ) | |
| 152 | 152 | { |
| 153 | 153 | UINT8 data = pio_port_c_output & 0x0f; |
| 154 | 154 | |
| r3373 | r3374 | |
| 161 | 161 | if (mz700_motor_on) |
| 162 | 162 | data |= 0x10; |
| 163 | 163 | |
| 164 | if (cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) > 0.0038) | |
| 164 | if (cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" )) > 0.0038) | |
| 165 | 165 | data |= 0x20; /* set the RDATA status */ |
| 166 | 166 | |
| 167 | 167 | if (ne556_out[0]) |
| 168 | 168 | data |= 0x40; /* set the 556OUT status */ |
| 169 | 169 | |
| 170 | data |= input_port_read(machine, "STATUS"); /* get VBLANK in bit 7 */ | |
| 170 | data |= input_port_read(device->machine, "STATUS"); /* get VBLANK in bit 7 */ | |
| 171 | 171 | |
| 172 | 172 | LOG(2,"mz700_pio_port_c_r",("%02X\n", data)); |
| 173 | 173 | |
| 174 | 174 | return data; |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | static WRITE8_HANDLER (pio_port_a_w ) | |
| 177 | static WRITE8_DEVICE_HANDLER (pio_port_a_w ) | |
| 178 | 178 | { |
| 179 | 179 | LOG(2,"mz700_pio_port_a_w",("%02X\n", data)); |
| 180 | 180 | pio_port_a_output = data; |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | static WRITE8_HANDLER ( pio_port_b_w ) | |
| 183 | static WRITE8_DEVICE_HANDLER ( pio_port_b_w ) | |
| 184 | 184 | { |
| 185 | 185 | /* |
| 186 | 186 | * bit 7 NE556 reset |
| r3373 | r3374 | |
| 198 | 198 | timer_enable(ne556_timer[0], (data & 0x80) ? 0 : 1); |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | static WRITE8_HANDLER ( pio_port_c_w ) | |
| 201 | static WRITE8_DEVICE_HANDLER ( pio_port_c_w ) | |
| 202 | 202 | { |
| 203 | 203 | /* |
| 204 | 204 | * bit 3 out motor control (0 = on) |
| r3373 | r3374 | |
| 210 | 210 | pio_port_c_output = data; |
| 211 | 211 | |
| 212 | 212 | cassette_change_state( |
| 213 | device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), | |
| 213 | device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), | |
| 214 | 214 | ((data & 0x08) && mz700_motor_on) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, |
| 215 | 215 | CASSETTE_MOTOR_DISABLED); |
| 216 | 216 | |
| 217 | cassette_output(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), (data & 0x02) ? +1.0 : -1.0); | |
| 217 | cassette_output(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), (data & 0x02) ? +1.0 : -1.0); | |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | /************************ MMIO ***********************************************/ |
| r3373 | r3374 | |
|---|---|---|
| 53 | 53 | return address; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | static | |
| 56 | static | |
| 57 | 57 | { |
| 58 | 58 | return 0xff; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | static | |
| 61 | static | |
| 62 | 62 | { |
| 63 | 63 | return 0xff; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | static | |
| 66 | static | |
| 67 | 67 | { |
| 68 | 68 | UINT8 data = lviv_ppi_port_outputs[0][2] & 0x0f; |
| 69 | if (cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) > 0.038) | |
| 69 | if (cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" )) > 0.038) | |
| 70 | 70 | data |= 0x10; |
| 71 | if (lviv_ppi_port_outputs[0][0] & input_port_read(machine, "JOY")) | |
| 71 | if (lviv_ppi_port_outputs[0][0] & input_port_read(device->machine, "JOY")) | |
| 72 | 72 | data |= 0x80; |
| 73 | 73 | return data; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | static WRITE8_HANDLER ( lviv_ppi_0_porta_w ) | |
| 76 | static WRITE8_DEVICE_HANDLER ( lviv_ppi_0_porta_w ) | |
| 77 | 77 | { |
| 78 | 78 | lviv_ppi_port_outputs[0][0] = data; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | static WRITE8_HANDLER ( lviv_ppi_0_portb_w ) | |
| 81 | static WRITE8_DEVICE_HANDLER ( lviv_ppi_0_portb_w ) | |
| 82 | 82 | { |
| 83 | 83 | lviv_ppi_port_outputs[0][1] = data; |
| 84 | 84 | lviv_update_palette (data&0x7f); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | static WRITE8_HANDLER ( lviv_ppi_0_portc_w ) /* tape in/out, video memory on/off */ | |
| 87 | static WRITE8_DEVICE_HANDLER ( lviv_ppi_0_portc_w ) /* tape in/out, video memory on/off */ | |
| 88 | 88 | { |
| 89 | 89 | lviv_ppi_port_outputs[0][2] = data; |
| 90 | 90 | if (lviv_ppi_port_outputs[0][1]&0x80) |
| 91 | 91 | speaker_level_w(0, data&0x01); |
| 92 | cassette_output(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), (data & 0x01) ? -1.0 : 1.0); | |
| 92 | cassette_output(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), (data & 0x01) ? -1.0 : 1.0); | |
| 93 | 93 | lviv_update_memory(); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | static | |
| 96 | static | |
| 97 | 97 | { |
| 98 | 98 | return 0xff; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | static | |
| 101 | static | |
| 102 | 102 | { |
| 103 | return ((lviv_ppi_port_outputs[1][0] & 0x01) ? 0xff : input_port_read(machine, "KEY0")) & | |
| 104 | ((lviv_ppi_port_outputs[1][0] & 0x02) ? 0xff : input_port_read(machine, "KEY1")) & | |
| 105 | ((lviv_ppi_port_outputs[1][0] & 0x04) ? 0xff : input_port_read(machine, "KEY2")) & | |
| 106 | ((lviv_ppi_port_outputs[1][0] & 0x08) ? 0xff : input_port_read(machine, "KEY3")) & | |
| 107 | ((lviv_ppi_port_outputs[1][0] & 0x10) ? 0xff : input_port_read(machine, "KEY4")) & | |
| 108 | ((lviv_ppi_port_outputs[1][0] & 0x20) ? 0xff : input_port_read(machine, "KEY5")) & | |
| 109 | ((lviv_ppi_port_outputs[1][0] & 0x40) ? 0xff : input_port_read(machine, "KEY6")) & | |
| 110 | ((lviv_ppi_port_outputs[1][0] & 0x80) ? 0xff : input_port_read(machine, "KEY7")); | |
| 103 | return ((lviv_ppi_port_outputs[1][0] & 0x01) ? 0xff : input_port_read(device->machine, "KEY0")) & | |
| 104 | ((lviv_ppi_port_outputs[1][0] & 0x02) ? 0xff : input_port_read(device->machine, "KEY1")) & | |
| 105 | ((lviv_ppi_port_outputs[1][0] & 0x04) ? 0xff : input_port_read(device->machine, "KEY2")) & | |
| 106 | ((lviv_ppi_port_outputs[1][0] & 0x08) ? 0xff : input_port_read(device->machine, "KEY3")) & | |
| 107 | ((lviv_ppi_port_outputs[1][0] & 0x10) ? 0xff : input_port_read(device->machine, "KEY4")) & | |
| 108 | ((lviv_ppi_port_outputs[1][0] & 0x20) ? 0xff : input_port_read(device->machine, "KEY5")) & | |
| 109 | ((lviv_ppi_port_outputs[1][0] & 0x40) ? 0xff : input_port_read(device->machine, "KEY6")) & | |
| 110 | ((lviv_ppi_port_outputs[1][0] & 0x80) ? 0xff : input_port_read(device->machine, "KEY7")); | |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | static | |
| 113 | static | |
| 114 | 114 | { |
| 115 | return ((lviv_ppi_port_outputs[1][2] & 0x01) ? 0xff : input_port_read(machine, "KEY8")) & | |
| 116 | ((lviv_ppi_port_outputs[1][2] & 0x02) ? 0xff : input_port_read(machine, "KEY9" )) & | |
| 117 | ((lviv_ppi_port_outputs[1][2] & 0x04) ? 0xff : input_port_read(machine, "KEY10")) & | |
| 118 | ((lviv_ppi_port_outputs[1][2] & 0x08) ? 0xff : input_port_read(machine, "KEY11")); | |
| 115 | return ((lviv_ppi_port_outputs[1][2] & 0x01) ? 0xff : input_port_read(device->machine, "KEY8")) & | |
| 116 | ((lviv_ppi_port_outputs[1][2] & 0x02) ? 0xff : input_port_read(device->machine, "KEY9" )) & | |
| 117 | ((lviv_ppi_port_outputs[1][2] & 0x04) ? 0xff : input_port_read(device->machine, "KEY10")) & | |
| 118 | ((lviv_ppi_port_outputs[1][2] & 0x08) ? 0xff : input_port_read(device->machine, "KEY11")); | |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | static WRITE8_HANDLER ( lviv_ppi_1_porta_w ) /* kayboard scaning */ | |
| 121 | static WRITE8_DEVICE_HANDLER ( lviv_ppi_1_porta_w ) /* kayboard scaning */ | |
| 122 | 122 | { |
| 123 | 123 | lviv_ppi_port_outputs[1][0] = data; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | static WRITE8_HANDLER ( lviv_ppi_1_portb_w ) | |
| 126 | static WRITE8_DEVICE_HANDLER ( lviv_ppi_1_portb_w ) | |
| 127 | 127 | { |
| 128 | 128 | lviv_ppi_port_outputs[1][1] = data; |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | static WRITE8_HANDLER ( lviv_ppi_1_portc_w ) /* kayboard scaning */ | |
| 131 | static WRITE8_DEVICE_HANDLER ( lviv_ppi_1_portc_w ) /* kayboard scaning */ | |
| 132 | 132 | { |
| 133 | 133 | lviv_ppi_port_outputs[1][2] = data; |
| 134 | 134 | } |
| r3373 | r3374 | |
|---|---|---|
| 724 | 724 | |
| 725 | 725 | static UINT8 load_8255_A(running_machine *machine, int chip) |
| 726 | 726 | { |
| 727 | return use_5FD ? ppi8255_get_port | |
| 727 | return use_5FD ? ppi8255_get_port_b((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, chip ? "ppi8255_0" : "ppi8255_1" ) ) : 0xff; | |
| 728 | 728 | } |
| 729 | 729 | |
| 730 | 730 | static UINT8 load_8255_B(running_machine *machine, int chip) |
| 731 | 731 | { |
| 732 | return use_5FD ? ppi8255_get_port | |
| 732 | return use_5FD ? ppi8255_get_port_a((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, chip ? "ppi8255_0" : "ppi8255_1" ) ) : 0xff; | |
| 733 | 733 | } |
| 734 | 734 | |
| 735 | 735 | static UINT8 load_8255_C(running_machine *machine, int chip) |
| r3373 | r3374 | |
| 739 | 739 | |
| 740 | 740 | if (use_5FD) |
| 741 | 741 | { |
| 742 | port_c = ppi8255_get_port | |
| 742 | port_c = ppi8255_get_port_c((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, chip ? "ppi8255_0" : "ppi8255_1" ) ); | |
| 743 | 743 | result = ((port_c >> 4) & 0x0F) | ((port_c << 4) & 0xF0); |
| 744 | 744 | } |
| 745 | 745 | |
| r3373 | r3374 | |
| 766 | 766 | return result; |
| 767 | 767 | } |
| 768 | 768 | |
| 769 | static READ8_HANDLER( load_8255_chip0_A ) { return load_8255_A(machine, 0); } | |
| 770 | static READ8_HANDLER( load_8255_chip1_A ) { return load_8255_A(machine, 1); } | |
| 771 | static READ8_HANDLER( load_8255_chip0_B ) { return load_8255_B(machine, 0); } | |
| 772 | static READ8_HANDLER( load_8255_chip1_B ) { return load_8255_B(machine, 1); } | |
| 773 | static READ8_HANDLER( load_8255_chip0_C ) { return load_8255_C(machine, 0); } | |
| 774 | static READ8_HANDLER( load_8255_chip1_C ) { return load_8255_C(machine, 1); } | |
| 769 | static READ8_DEVICE_HANDLER( load_8255_chip0_A ) { return load_8255_A(device->machine, 0); } | |
| 770 | static READ8_DEVICE_HANDLER( load_8255_chip1_A ) { return load_8255_A(device->machine, 1); } | |
| 771 | static READ8_DEVICE_HANDLER( load_8255_chip0_B ) { return load_8255_B(device->machine, 0); } | |
| 772 | static READ8_DEVICE_HANDLER( load_8255_chip1_B ) { return load_8255_B(device->machine, 1); } | |
| 773 | static READ8_DEVICE_HANDLER( load_8255_chip0_C ) { return load_8255_C(device->machine, 0); } | |
| 774 | static READ8_DEVICE_HANDLER( load_8255_chip1_C ) { return load_8255_C(device->machine, 1); } | |
| 775 | 775 | |
| 776 | 776 | |
| 777 | 777 | const ppi8255_interface pc8801_8255_config_0 = |
| r3373 | r3374 | |
|---|---|---|
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | |
| 350 | ||
| 350 | ||
| 351 | 351 | { |
| 352 | 352 | /* logerror("8255: Read port a\n"); */ |
| 353 | 353 | return (atom_8255_porta); |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | ||
| 356 | ||
| 357 | 357 | { |
| 358 | 358 | int row; |
| 359 | 359 | static const char *keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", |
| r3373 | r3374 | |
| 362 | 362 | row = atom_8255_porta & 0x0f; |
| 363 | 363 | /* logerror("8255: Read port b: %02X %02X\n", input_port_read(machine, port), |
| 364 | 364 | input_port_read(machine, "KEY10") & 0xc0); */ |
| 365 | return ((input_port_read(machine, keynames[row]) & 0x3f) | (input_port_read(machine, "KEY10") & 0xc0)); | |
| 365 | return ((input_port_read(device->machine, keynames[row]) & 0x3f) | (input_port_read(device->machine, "KEY10") & 0xc0)); | |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | READ8_HANDLER ( atom_8255_portc_r ) | |
| 368 | READ8_DEVICE_HANDLER ( atom_8255_portc_r ) | |
| 369 | 369 | { |
| 370 | 370 | atom_8255_portc &= 0x0f; |
| 371 | 371 | |
| 372 | 372 | /* cassette input */ |
| 373 | if (cassette_input(cassette_device_image(machine)) > 0.0) | |
| 373 | if (cassette_input(cassette_device_image(device->machine)) > 0.0) | |
| 374 | 374 | { |
| 375 | 375 | atom_8255_portc |= (1<<5); |
| 376 | 376 | } |
| r3373 | r3374 | |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | atom_8255_portc |= (m6847_get_field_sync() ? 0x00 : 0x80); |
| 385 | atom_8255_portc |= (input_port_read(machine, "KEY11") & 0x40); | |
| 385 | atom_8255_portc |= (input_port_read(device->machine, "KEY11") & 0x40); | |
| 386 | 386 | /* logerror("8255: Read port c (%02X)\n",atom_8255.atom_8255_portc); */ |
| 387 | 387 | return (atom_8255_portc); |
| 388 | 388 | } |
| r3373 | r3374 | |
| 401 | 401 | |
| 402 | 402 | */ |
| 403 | 403 | |
| 404 | WRITE8_HANDLER ( atom_8255_porta_w ) | |
| 404 | WRITE8_DEVICE_HANDLER ( atom_8255_porta_w ) | |
| 405 | 405 | { |
| 406 | 406 | atom_8255_porta = data; |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | WRITE8_HANDLER ( atom_8255_portb_w ) | |
| 409 | WRITE8_DEVICE_HANDLER ( atom_8255_portb_w ) | |
| 410 | 410 | { |
| 411 | 411 | atom_8255_portb = data; |
| 412 | 412 | } |
| 413 | 413 | |
| 414 | WRITE8_HANDLER (atom_8255_portc_w) | |
| 414 | WRITE8_DEVICE_HANDLER (atom_8255_portc_w) | |
| 415 | 415 | { |
| 416 | 416 | atom_8255_portc = data; |
| 417 | 417 | speaker_level_w(0, (data & 0x04) >> 2); |
| r3373 | r3374 | |
| 419 | 419 | |
| 420 | 420 | |
| 421 | 421 | /* KT- I've assumed that the atom 8271 is linked in exactly the same way as on the bbc */ |
| 422 | ||
| 422 | ||
| 423 | 423 | { |
| 424 | 424 | switch (offset) |
| 425 | 425 | { |
| r3373 | r3374 | |
|---|---|---|
| 35 | 35 | memory_configure_bank(1, 0, 2, RAM, 0xc000); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | static READ8_HANDLER (specialist_8255_porta_r ) | |
| 38 | static READ8_DEVICE_HANDLER (specialist_8255_porta_r ) | |
| 39 | 39 | { |
| 40 | if (input_port_read(machine, "LINE0")!=0xff) return 0xfe; | |
| 41 | if (input_port_read(machine, "LINE1")!=0xff) return 0xfd; | |
| 42 | if (input_port_read(machine, "LINE2")!=0xff) return 0xfb; | |
| 43 | if (input_port_read(machine, "LINE3")!=0xff) return 0xf7; | |
| 44 | if (input_port_read(machine, "LINE4")!=0xff) return 0xef; | |
| 45 | if (input_port_read(machine, "LINE5")!=0xff) return 0xdf; | |
| 46 | if (input_port_read(machine, "LINE6")!=0xff) return 0xbf; | |
| 47 | if (input_port_read(machine, "LINE7")!=0xff) return 0x7f; | |
| 40 | if (input_port_read(device->machine, "LINE0")!=0xff) return 0xfe; | |
| 41 | if (input_port_read(device->machine, "LINE1")!=0xff) return 0xfd; | |
| 42 | if (input_port_read(device->machine, "LINE2")!=0xff) return 0xfb; | |
| 43 | if (input_port_read(device->machine, "LINE3")!=0xff) return 0xf7; | |
| 44 | if (input_port_read(device->machine, "LINE4")!=0xff) return 0xef; | |
| 45 | if (input_port_read(device->machine, "LINE5")!=0xff) return 0xdf; | |
| 46 | if (input_port_read(device->machine, "LINE6")!=0xff) return 0xbf; | |
| 47 | if (input_port_read(device->machine, "LINE7")!=0xff) return 0x7f; | |
| 48 | 48 | return 0xff; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | static READ8_HANDLER (specialist_8255_portb_r ) | |
| 51 | static READ8_DEVICE_HANDLER (specialist_8255_portb_r ) | |
| 52 | 52 | { |
| 53 | 53 | |
| 54 | 54 | int dat = 0; |
| 55 | 55 | double level; |
| 56 | ||
| 57 | if ((specialist_8255_porta & 0x01)==0) dat ^= (input_port_read(machine, "LINE0") ^ 0xff); | |
| 58 | if ((specialist_8255_porta & 0x02)==0) dat ^= (input_port_read(machine, "LINE1") ^ 0xff); | |
| 59 | if ((specialist_8255_porta & 0x04)==0) dat ^= (input_port_read(machine, "LINE2") ^ 0xff); | |
| 60 | if ((specialist_8255_porta & 0x08)==0) dat ^= (input_port_read(machine, "LINE3") ^ 0xff); | |
| 61 | if ((specialist_8255_porta & 0x10)==0) dat ^= (input_port_read(machine, "LINE4") ^ 0xff); | |
| 62 | if ((specialist_8255_porta & 0x20)==0) dat ^= (input_port_read(machine, "LINE5") ^ 0xff); | |
| 63 | if ((specialist_8255_porta & 0x40)==0) dat ^= (input_port_read(machine, "LINE6") ^ 0xff); | |
| 64 | if ((specialist_8255_porta & 0x80)==0) dat ^= (input_port_read(machine, "LINE7") ^ 0xff); | |
| 65 | if ((specialist_8255_portc & 0x01)==0) dat ^= (input_port_read(machine, "LINE8") ^ 0xff); | |
| 66 | if ((specialist_8255_portc & 0x02)==0) dat ^= (input_port_read(machine, "LINE9") ^ 0xff); | |
| 67 | if ((specialist_8255_portc & 0x04)==0) dat ^= (input_port_read(machine, "LINE10") ^ 0xff); | |
| 68 | if ((specialist_8255_portc & 0x08)==0) dat ^= (input_port_read(machine, "LINE11") ^ 0xff); | |
| 56 | ||
| 57 | if ((specialist_8255_porta & 0x01)==0) dat ^= (input_port_read(device->machine, "LINE0") ^ 0xff); | |
| 58 | if ((specialist_8255_porta & 0x02)==0) dat ^= (input_port_read(device->machine, "LINE1") ^ 0xff); | |
| 59 | if ((specialist_8255_porta & 0x04)==0) dat ^= (input_port_read(device->machine, "LINE2") ^ 0xff); | |
| 60 | if ((specialist_8255_porta & 0x08)==0) dat ^= (input_port_read(device->machine, "LINE3") ^ 0xff); | |
| 61 | if ((specialist_8255_porta & 0x10)==0) dat ^= (input_port_read(device->machine, "LINE4") ^ 0xff); | |
| 62 | if ((specialist_8255_porta & 0x20)==0) dat ^= (input_port_read(device->machine, "LINE5") ^ 0xff); | |
| 63 | if ((specialist_8255_porta & 0x40)==0) dat ^= (input_port_read(device->machine, "LINE6") ^ 0xff); | |
| 64 | if ((specialist_8255_porta & 0x80)==0) dat ^= (input_port_read(device->machine, "LINE7") ^ 0xff); | |
| 65 | if ((specialist_8255_portc & 0x01)==0) dat ^= (input_port_read(device->machine, "LINE8") ^ 0xff); | |
| 66 | if ((specialist_8255_portc & 0x02)==0) dat ^= (input_port_read(device->machine, "LINE9") ^ 0xff); | |
| 67 | if ((specialist_8255_portc & 0x04)==0) dat ^= (input_port_read(device->machine, "LINE10") ^ 0xff); | |
| 68 | if ((specialist_8255_portc & 0x08)==0) dat ^= (input_port_read(device->machine, "LINE11") ^ 0xff); | |
| 69 | 69 | |
| 70 | 70 | dat = (dat << 2) ^0xff; |
| 71 | if (input_port_read(machine, "LINE12")!=0xff) dat ^= 0x02; | |
| 71 | if (input_port_read(device->machine, "LINE12")!=0xff) dat ^= 0x02; | |
| 72 | 72 | |
| 73 | level = cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )); | |
| 73 | level = cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" )); | |
| 74 | 74 | if (level >= 0) { |
| 75 | 75 | dat ^= 0x01; |
| 76 | 76 | } |
| 77 | 77 | return dat & 0xff; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | static READ8_HANDLER (specialist_8255_portc_r ) | |
| 80 | static READ8_DEVICE_HANDLER (specialist_8255_portc_r ) | |
| 81 | 81 | { |
| 82 | if (input_port_read(machine, "LINE8")!=0xff) return 0x0e; | |
| 83 | if (input_port_read(machine, "LINE9")!=0xff) return 0x0d; | |
| 84 | if (input_port_read(machine, "LINE10")!=0xff) return 0x0b; | |
| 85 | if (input_port_read(machine, "LINE11")!=0xff) return 0x07; | |
| 82 | if (input_port_read(device->machine, "LINE8")!=0xff) return 0x0e; | |
| 83 | if (input_port_read(device->machine, "LINE9")!=0xff) return 0x0d; | |
| 84 | if (input_port_read(device->machine, "LINE10")!=0xff) return 0x0b; | |
| 85 | if (input_port_read(device->machine, "LINE11")!=0xff) return 0x07; | |
| 86 | 86 | return 0x0f; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | static WRITE8_HANDLER (specialist_8255_porta_w ) | |
| 89 | static WRITE8_DEVICE_HANDLER (specialist_8255_porta_w ) | |
| 90 | 90 | { |
| 91 | 91 | specialist_8255_porta = data; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | static WRITE8_HANDLER (specialist_8255_portb_w ) | |
| 94 | static WRITE8_DEVICE_HANDLER (specialist_8255_portb_w ) | |
| 95 | 95 | { |
| 96 | 96 | specialist_8255_portb = data; |
| 97 | 97 | } |
| 98 | static WRITE8_HANDLER (specialist_8255_portc_w ) | |
| 98 | static WRITE8_DEVICE_HANDLER (specialist_8255_portc_w ) | |
| 99 | 99 | { |
| 100 | 100 | specialist_8255_portc = data; |
| 101 | 101 | |
| 102 | cassette_output(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ),data & 0x80 ? 1 : -1); | |
| 102 | cassette_output(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ),data & 0x80 ? 1 : -1); | |
| 103 | 103 | |
| 104 | 104 | dac_data_w(0,data & 0x20); //beeper |
| 105 | 105 |
| r3373 | r3374 | |
|---|---|---|
| 60 | 60 | { |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | static READ8_DEVICE_HANDLER( mikro80_8255_portb_device_r ) { return mikro80_8255_portb_r(device->machine, offset); } | |
| 64 | static READ8_DEVICE_HANDLER( mikro80_8255_portc_device_r ) { return mikro80_8255_portc_r(device->machine, offset); } | |
| 65 | static WRITE8_DEVICE_HANDLER( mikro80_8255_porta_device_w ) { mikro80_8255_porta_w(device->machine, offset, data); } | |
| 66 | ||
| 63 | 67 | const ppi8255_interface mikro80_ppi8255_interface = |
| 64 | 68 | { |
| 65 | 69 | NULL, |
| 66 | mikro80_8255_portb_r, | |
| 67 | mikro80_8255_portc_r, | |
| 68 | mikro80_8255_porta_w, | |
| 70 | mikro80_8255_portb_device_r, | |
| 71 | mikro80_8255_portc_device_r, | |
| 72 | mikro80_8255_porta_device_w, | |
| 69 | 73 | NULL, |
| 70 | 74 | NULL, |
| 71 | 75 | }; |
| r3373 | r3374 | |
|---|---|---|
| 26 | 26 | memory_configure_bank(1, 0, 2, RAM, 0xf800); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | static READ8_HANDLER (ut88_8255_portb_r ) | |
| 29 | static READ8_DEVICE_HANDLER (ut88_8255_portb_r ) | |
| 30 | 30 | { |
| 31 | 31 | UINT8 key = 0xff; |
| 32 | if ((ut88_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"LINE0"); } | |
| 33 | if ((ut88_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"LINE1"); } | |
| 34 | if ((ut88_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"LINE2"); } | |
| 35 | if ((ut88_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"LINE3"); } | |
| 36 | if ((ut88_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"LINE4"); } | |
| 37 | if ((ut88_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"LINE5"); } | |
| 38 | if ((ut88_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"LINE6"); } | |
| 39 | if ((ut88_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"LINE7"); } | |
| 32 | if ((ut88_keyboard_mask & 0x01)!=0) { key &= input_port_read(device->machine,"LINE0"); } | |
| 33 | if ((ut88_keyboard_mask & 0x02)!=0) { key &= input_port_read(device->machine,"LINE1"); } | |
| 34 | if ((ut88_keyboard_mask & 0x04)!=0) { key &= input_port_read(device->machine,"LINE2"); } | |
| 35 | if ((ut88_keyboard_mask & 0x08)!=0) { key &= input_port_read(device->machine,"LINE3"); } | |
| 36 | if ((ut88_keyboard_mask & 0x10)!=0) { key &= input_port_read(device->machine,"LINE4"); } | |
| 37 | if ((ut88_keyboard_mask & 0x20)!=0) { key &= input_port_read(device->machine,"LINE5"); } | |
| 38 | if ((ut88_keyboard_mask & 0x40)!=0) { key &= input_port_read(device->machine,"LINE6"); } | |
| 39 | if ((ut88_keyboard_mask & 0x80)!=0) { key &= input_port_read(device->machine,"LINE7"); } | |
| 40 | 40 | return key; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | static READ8_HANDLER (ut88_8255_portc_r ) | |
| 43 | static READ8_DEVICE_HANDLER (ut88_8255_portc_r ) | |
| 44 | 44 | { |
| 45 | return input_port_read(machine, "LINE8"); | |
| 45 | return input_port_read(device->machine, "LINE8"); | |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | static WRITE8_HANDLER (ut88_8255_porta_w ) | |
| 48 | static WRITE8_DEVICE_HANDLER (ut88_8255_porta_w ) | |
| 49 | 49 | { |
| 50 | 50 | ut88_keyboard_mask = data ^ 0xff; |
| 51 | 51 | } |
| r3373 | r3374 | |
|---|---|---|
| 629 | 629 | } pc_ppi={ 0 }; |
| 630 | 630 | |
| 631 | 631 | |
| 632 | static READ8_HANDLER (ibm5150_ppi_porta_r) | |
| 632 | static READ8_DEVICE_HANDLER (ibm5150_ppi_porta_r) | |
| 633 | 633 | { |
| 634 | 634 | int data = 0xFF; |
| 635 | 635 | |
| r3373 | r3374 | |
| 645 | 645 | * 01 - color 40x25 |
| 646 | 646 | * 6-7 The number of floppy disk drives |
| 647 | 647 | */ |
| 648 | data = input_port_read(machine, "DSW0"); | |
| 648 | data = input_port_read(device->machine, "DSW0"); | |
| 649 | 649 | } |
| 650 | 650 | else |
| 651 | 651 | { |
| r3373 | r3374 | |
| 656 | 656 | } |
| 657 | 657 | |
| 658 | 658 | |
| 659 | static READ8_HANDLER (ibm5150_ppi_portb_r ) | |
| 659 | static READ8_DEVICE_HANDLER (ibm5150_ppi_portb_r ) | |
| 660 | 660 | { |
| 661 | 661 | int data; |
| 662 | 662 | |
| r3373 | r3374 | |
| 666 | 666 | } |
| 667 | 667 | |
| 668 | 668 | |
| 669 | static READ8_HANDLER ( ibm5150_ppi_portc_r ) | |
| 669 | static READ8_DEVICE_HANDLER ( ibm5150_ppi_portc_r ) | |
| 670 | 670 | { |
| 671 | 671 | int timer2_output = pit8253_get_output( pc_devices.pit8253, 2 ); |
| 672 | 672 | int data=0xff; |
| r3373 | r3374 | |
| 677 | 677 | if (pc_ppi.portc_switch_high) |
| 678 | 678 | { |
| 679 | 679 | /* read hi nibble of S2 */ |
| 680 | data = (data & 0xf0) | ((input_port_read(machine, "DSW0") >> 4) & 0x0f); | |
| 680 | data = (data & 0xf0) | ((input_port_read(device->machine, "DSW0") >> 4) & 0x0f); | |
| 681 | 681 | PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data)); |
| 682 | 682 | } |
| 683 | 683 | else |
| 684 | 684 | { |
| 685 | 685 | /* read lo nibble of S2 */ |
| 686 | data = (data & 0xf0) | (input_port_read(machine, "DSW0") & 0x0f); | |
| 686 | data = (data & 0xf0) | (input_port_read(device->machine, "DSW0") & 0x0f); | |
| 687 | 687 | PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data)); |
| 688 | 688 | } |
| 689 | 689 | |
| 690 | 690 | if ( ! ( pc_ppi.portb & 0x08 ) ) |
| 691 | 691 | { |
| 692 | double tap_val = cassette_input( device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ) ); | |
| 692 | double tap_val = cassette_input( device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ) ); | |
| 693 | 693 | |
| 694 | 694 | if ( tap_val < 0 ) |
| 695 | 695 | { |
| r3373 | r3374 | |
| 713 | 713 | } |
| 714 | 714 | |
| 715 | 715 | |
| 716 | static WRITE8_HANDLER ( ibm5150_ppi_porta_w ) | |
| 716 | static WRITE8_DEVICE_HANDLER ( ibm5150_ppi_porta_w ) | |
| 717 | 717 | { |
| 718 | 718 | /* KB controller port A */ |
| 719 | 719 | PIO_LOG(1,"PIO_A_w",("$%02x\n", data)); |
| 720 | 720 | } |
| 721 | 721 | |
| 722 | 722 | |
| 723 | static WRITE8_HANDLER ( ibm5150_ppi_portb_w ) | |
| 723 | static WRITE8_DEVICE_HANDLER ( ibm5150_ppi_portb_w ) | |
| 724 | 724 | { |
| 725 | 725 | /* KB controller port B */ |
| 726 | 726 | pc_ppi.portb = data; |
| r3373 | r3374 | |
| 730 | 730 | pit8253_gate_w( pc_devices.pit8253, 2, data & 1); |
| 731 | 731 | pc_speaker_set_spkrdata( data & 0x02 ); |
| 732 | 732 | |
| 733 | cassette_change_state( device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), ( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); | |
| 733 | cassette_change_state( device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), ( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); | |
| 734 | 734 | |
| 735 | 735 | pc_ppi.clock_signal = ( pc_ppi.keyb_clock ) ? 1 : 0; |
| 736 | 736 | |
| 737 | pc_ppi.clock_callback( machine, 0, pc_ppi.clock_signal ); | |
| 737 | pc_ppi.clock_callback( device->machine, 0, pc_ppi.clock_signal ); | |
| 738 | 738 | |
| 739 | 739 | /* If PB7 is set clear the shift register and reset the IRQ line */ |
| 740 | 740 | if ( pc_ppi.keyboard_clear ) |
| r3373 | r3374 | |
| 746 | 746 | } |
| 747 | 747 | |
| 748 | 748 | |
| 749 | static WRITE8_HANDLER ( ibm5150_ppi_portc_w ) | |
| 749 | static WRITE8_DEVICE_HANDLER ( ibm5150_ppi_portc_w ) | |
| 750 | 750 | { |
| 751 | 751 | /* KB controller port C */ |
| 752 | 752 | PIO_LOG(1,"PIO_C_w",("$%02x\n", data)); |
| r3373 | r3374 | |
| 812 | 812 | }; |
| 813 | 813 | |
| 814 | 814 | |
| 815 | static READ8_HANDLER (ibm5160_ppi_porta_r) | |
| 815 | static READ8_DEVICE_HANDLER (ibm5160_ppi_porta_r) | |
| 816 | 816 | { |
| 817 | 817 | int data = 0xFF; |
| 818 | 818 | |
| r3373 | r3374 | |
| 828 | 828 | * 01 - color 40x25 |
| 829 | 829 | * 6-7 The number of floppy disk drives |
| 830 | 830 | */ |
| 831 | data = input_port_read(machine, "DSW0"); | |
| 831 | data = input_port_read(device->machine, "DSW0"); | |
| 832 | 832 | } |
| 833 | 833 | else |
| 834 | 834 | { |
| r3373 | r3374 | |
| 842 | 842 | } |
| 843 | 843 | |
| 844 | 844 | |
| 845 | static READ8_HANDLER ( ibm5160_ppi_portc_r ) | |
| 845 | static READ8_DEVICE_HANDLER ( ibm5160_ppi_portc_r ) | |
| 846 | 846 | { |
| 847 | 847 | int timer2_output = pit8253_get_output( pc_devices.pit8253, 2 ); |
| 848 | 848 | int data=0xff; |
| r3373 | r3374 | |
| 854 | 854 | if (pc_ppi.portc_switch_high) |
| 855 | 855 | { |
| 856 | 856 | /* read hi nibble of S2 */ |
| 857 | data = (data & 0xf0) | ((input_port_read(machine, "DSW0") >> 4) & 0x0f); | |
| 857 | data = (data & 0xf0) | ((input_port_read(device->machine, "DSW0") >> 4) & 0x0f); | |
| 858 | 858 | PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data)); |
| 859 | 859 | } |
| 860 | 860 | else |
| 861 | 861 | { |
| 862 | 862 | /* read lo nibble of S2 */ |
| 863 | data = (data & 0xf0) | (input_port_read(machine, "DSW0") & 0x0f); | |
| 863 | data = (data & 0xf0) | (input_port_read(device->machine, "DSW0") & 0x0f); | |
| 864 | 864 | PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data)); |
| 865 | 865 | } |
| 866 | 866 | |
| r3373 | r3374 | |
| 874 | 874 | } |
| 875 | 875 | |
| 876 | 876 | |
| 877 | static WRITE8_HANDLER( ibm5160_ppi_portb_w ) | |
| 877 | static WRITE8_DEVICE_HANDLER( ibm5160_ppi_portb_w ) | |
| 878 | 878 | { |
| 879 | 879 | pc_ppi.portb = data; |
| 880 | 880 | pc_ppi.portc_switch_high = data & 0x08; |
| r3373 | r3374 | |
| 900 | 900 | }; |
| 901 | 901 | |
| 902 | 902 | |
| 903 | static WRITE8_HANDLER ( pcjr_ppi_portb_w ) | |
| 903 | static WRITE8_DEVICE_HANDLER ( pcjr_ppi_portb_w ) | |
| 904 | 904 | { |
| 905 | 905 | /* KB controller port B */ |
| 906 | 906 | pc_ppi.portb = data; |
| 907 | 907 | pc_ppi.portc_switch_high = data & 0x08; |
| 908 | pit8253_gate_w( device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2, data & 1); | |
| 908 | pit8253_gate_w( device_list_find_by_tag( device->machine->config->devicelist, PIT8253, "pit8253" ), 2, data & 1); | |
| 909 | 909 | pc_speaker_set_spkrdata( data & 0x02 ); |
| 910 | 910 | |
| 911 | cassette_change_state( device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), ( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); | |
| 911 | cassette_change_state( device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), ( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); | |
| 912 | 912 | } |
| 913 | 913 | |
| 914 | 914 | |
| 915 | 915 | /* |
| 916 | 916 | * On a PCJR none of the port A bits are connected. |
| 917 | 917 | */ |
| 918 | static READ8_HANDLER (pcjr_ppi_porta_r ) | |
| 918 | static READ8_DEVICE_HANDLER (pcjr_ppi_porta_r ) | |
| 919 | 919 | { |
| 920 | 920 | int data; |
| 921 | 921 | |
| r3373 | r3374 | |
| 936 | 936 | * PC6 - KYBD IN |
| 937 | 937 | * PC7 - (keyboard) CABLE CONNECTED |
| 938 | 938 | */ |
| 939 | static READ8_HANDLER ( pcjr_ppi_portc_r ) | |
| 939 | static READ8_DEVICE_HANDLER ( pcjr_ppi_portc_r ) | |
| 940 | 940 | { |
| 941 | int timer2_output = pit8253_get_output( device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2 ); | |
| 941 | int timer2_output = pit8253_get_output( device_list_find_by_tag( device->machine->config->devicelist, PIT8253, "pit8253" ), 2 ); | |
| 942 | 942 | int data=0xff; |
| 943 | 943 | |
| 944 | 944 | data&=~0x80; |
| r3373 | r3374 | |
| 946 | 946 | data = ( data & ~0x01 ) | ( pcjr_keyb.latch ? 0x01: 0x00 ); |
| 947 | 947 | if ( ! ( pc_ppi.portb & 0x08 ) ) |
| 948 | 948 | { |
| 949 | double tap_val = cassette_input( device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ) ); | |
| 949 | double tap_val = cassette_input( device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ) ); | |
| 950 | 950 | |
| 951 | 951 | if ( tap_val < 0 ) |
| 952 | 952 | { |
| r3373 | r3374 | |
|---|---|---|
| 93 | 93 | |
| 94 | 94 | LOG(("fd5 0x010 r: %02x %04x\n",fd5_databus,activecpu_get_pc())); |
| 95 | 95 | |
| 96 | ppi8255_set_portC((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x50); | |
| 97 | ppi8255_set_portC((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x10); | |
| 98 | ppi8255_set_portC((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x50); | |
| 96 | ppi8255_set_port_c((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x50); | |
| 97 | ppi8255_set_port_c((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x10); | |
| 98 | ppi8255_set_port_c((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x50); | |
| 99 | 99 | |
| 100 | 100 | return fd5_databus; |
| 101 | 101 | } |
| r3373 | r3374 | |
| 107 | 107 | fd5_databus = data; |
| 108 | 108 | |
| 109 | 109 | /* set stb on data write */ |
| 110 | ppi8255_set_portC((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x50); | |
| 111 | ppi8255_set_portC((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x40); | |
| 112 | ppi8255_set_portC((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x50); | |
| 110 | ppi8255_set_port_c((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x50); | |
| 111 | ppi8255_set_port_c((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x40); | |
| 112 | ppi8255_set_port_c((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x50); | |
| 113 | 113 | |
| 114 | 114 | cpu_yield(); |
| 115 | 115 | } |
| r3373 | r3374 | |
| 182 | 182 | floppy_drive_set_geometry(image_from_devtype_and_index(IO_FLOPPY, 1), FLOPPY_DRIVE_SS_40); |
| 183 | 183 | sord_fd5_init(machine); |
| 184 | 184 | MACHINE_RESET_CALL(sord_m5); |
| 185 | ppi8255_set_port | |
| 185 | ppi8255_set_port_c((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x50); | |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | |
| r3373 | r3374 | |
| 194 | 194 | /*********************************************************************************************/ |
| 195 | 195 | /* PI-5 */ |
| 196 | 196 | |
| 197 | static | |
| 197 | static | |
| 198 | 198 | { |
| 199 | 199 | cpu_yield(); |
| 200 | 200 | |
| 201 | 201 | return fd5_databus; |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | static | |
| 204 | static | |
| 205 | 205 | { |
| 206 | 206 | cpu_yield(); |
| 207 | 207 | |
| r3373 | r3374 | |
| 210 | 210 | return 0x0ff; |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | static | |
| 213 | static | |
| 214 | 214 | { |
| 215 | 215 | cpu_yield(); |
| 216 | 216 | |
| r3373 | r3374 | |
| 241 | 241 | ); |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | static WRITE8_HANDLER(sord_ppi_porta_w) | |
| 244 | static WRITE8_DEVICE_HANDLER(sord_ppi_porta_w) | |
| 245 | 245 | { |
| 246 | 246 | cpu_yield(); |
| 247 | 247 | |
| 248 | 248 | fd5_databus = data; |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | static WRITE8_HANDLER(sord_ppi_portb_w) | |
| 251 | static WRITE8_DEVICE_HANDLER(sord_ppi_portb_w) | |
| 252 | 252 | { |
| 253 | 253 | cpu_yield(); |
| 254 | 254 | |
| r3373 | r3374 | |
| 258 | 258 | |
| 259 | 259 | if (data==0x0f0) |
| 260 | 260 | { |
| 261 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 262 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 261 | cpunum_set_input_line(device->machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 262 | cpunum_set_input_line(device->machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 263 | 263 | } |
| 264 | 264 | LOG(("m5 write to pi5 port b: %02x %04x\n",data,activecpu_get_pc())); |
| 265 | 265 | } |
| r3373 | r3374 | |
| 270 | 270 | /* C,H,N */ |
| 271 | 271 | |
| 272 | 272 | |
| 273 | static WRITE8_HANDLER(sord_ppi_portc_w) | |
| 273 | static WRITE8_DEVICE_HANDLER(sord_ppi_portc_w) | |
| 274 | 274 | { |
| 275 | 275 | obfa = (data & 0x80) ? 1 : 0; |
| 276 | 276 | intra = (data & 0x08) ? 1 : 0; |
| r3373 | r3374 | |
|---|---|---|
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | // Judging from the XM6 source code, PPI ports A and B are joystick inputs |
| 657 | static READ8_HANDLER( ppi_port_a_r ) | |
| 657 | static READ8_DEVICE_HANDLER( ppi_port_a_r ) | |
| 658 | 658 | { |
| 659 | 659 | // Joystick 1 |
| 660 | 660 | if(sys.joy.joy1_enable == 0) |
| 661 | return input_port_read(machine, "joy1"); | |
| 661 | return input_port_read(device->machine, "joy1"); | |
| 662 | 662 | else |
| 663 | 663 | return 0xff; |
| 664 | 664 | } |
| 665 | 665 | |
| 666 | static READ8_HANDLER( ppi_port_b_r ) | |
| 666 | static READ8_DEVICE_HANDLER( ppi_port_b_r ) | |
| 667 | 667 | { |
| 668 | 668 | // Joystick 2 |
| 669 | 669 | if(sys.joy.joy2_enable == 0) |
| 670 | return input_port_read(machine, "joy2"); | |
| 670 | return input_port_read(device->machine, "joy2"); | |
| 671 | 671 | else |
| 672 | 672 | return 0xff; |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | static READ8_HANDLER( ppi_port_c_r ) | |
| 675 | static READ8_DEVICE_HANDLER( ppi_port_c_r ) | |
| 676 | 676 | { |
| 677 | 677 | return ppi_port[2]; |
| 678 | 678 | } |
| 679 | 679 | |
| 680 | #ifdef UNUSED_FUNCTION | |
| 681 | WRITE8_HANDLER( ppi_port_a_w ) | |
| 682 | { | |
| 683 | ppi_port[0] = data; | |
| 684 | } | |
| 685 | ||
| 686 | WRITE8_HANDLER( ppi_port_b_w ) | |
| 687 | { | |
| 688 | ppi_port[1] = data; | |
| 689 | } | |
| 690 | #endif | |
| 691 | ||
| 692 | 680 | /* PPI port C (Joystick control, R/W) |
| 693 | 681 | bit 7 - IOC7 - Function B operation of joystick 1 (?) |
| 694 | 682 | bit 6 - IOC6 - Function A operation of joystick 1 (?) |
| r3373 | r3374 | |
| 697 | 685 | bits 3,2 - ADPCM Sample rate |
| 698 | 686 | bits 1,0 - ADPCM Pan |
| 699 | 687 | */ |
| 700 | static WRITE8_HANDLER( ppi_port_c_w ) | |
| 688 | static WRITE8_DEVICE_HANDLER( ppi_port_c_w ) | |
| 701 | 689 | { |
| 702 | 690 | // ADPCM / Joystick control |
| 703 | 691 | ppi_port[2] = data; |
| r3373 | r3374 | |
|---|---|---|
| 390 | 390 | // PA7 = tape EAR = INPUT, meant to be connected to the earphone jacket of a taperecorder |
| 391 | 391 | // ~PC7 = tape MIC = OUTPUT, meant to be connected to the microphone jacket of a taperecorder |
| 392 | 392 | |
| 393 | static | |
| 393 | static | |
| 394 | 394 | { |
| 395 | 395 | static const char *keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5" }; |
| 396 | 396 | |
| r3373 | r3374 | |
| 403 | 403 | verboselog( 0, "Key column for kbd read: %02x\n", keycol ); |
| 404 | 404 | if( keycol != 6 ) |
| 405 | 405 | { |
| 406 | retval = input_port_read(machine, keynames[keycol]); | |
| 406 | retval = input_port_read(device->machine, keynames[keycol]); | |
| 407 | 407 | } |
| 408 | 408 | else |
| 409 | 409 | { |
| r3373 | r3374 | |
| 415 | 415 | |
| 416 | 416 | |
| 417 | 417 | |
| 418 | static | |
| 418 | static | |
| 419 | 419 | { |
| 420 | 420 | verboselog( 0, "PPI port B read\n" ); |
| 421 | 421 | return 0; |
| r3373 | r3374 | |
| 423 | 423 | |
| 424 | 424 | |
| 425 | 425 | |
| 426 | static | |
| 426 | static | |
| 427 | 427 | { |
| 428 | 428 | verboselog( 0, "PPI port C read\n" ); |
| 429 | 429 | return 0; |
| r3373 | r3374 | |
| 431 | 431 | |
| 432 | 432 | |
| 433 | 433 | |
| 434 | static WRITE8_HANDLER( mpf1_porta_w ) | |
| 434 | static WRITE8_DEVICE_HANDLER( mpf1_porta_w ) | |
| 435 | 435 | { |
| 436 | 436 | verboselog( 0, "PPI port A write: %02x\n", data ); |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | |
| 440 | 440 | |
| 441 | static WRITE8_HANDLER( mpf1_portb_w ) | |
| 441 | static WRITE8_DEVICE_HANDLER( mpf1_portb_w ) | |
| 442 | 442 | { |
| 443 | 443 | //int i; |
| 444 | 444 | /* A 0x08 |
| r3373 | r3374 | |
| 475 | 475 | |
| 476 | 476 | |
| 477 | 477 | |
| 478 | static WRITE8_HANDLER( mpf1_portc_w ) | |
| 478 | static WRITE8_DEVICE_HANDLER( mpf1_portc_w ) | |
| 479 | 479 | { |
| 480 | 480 | kbdlatch = ~data; |
| 481 | 481 | |
| r3373 | r3374 | |
| 493 | 493 | data = ~kbdlatch; |
| 494 | 494 | |
| 495 | 495 | // watchdog reset |
| 496 | watchdog_reset(machine); | |
| 496 | watchdog_reset(device->machine); | |
| 497 | 497 | |
| 498 | 498 | // TONE led & speaker |
| 499 | 499 | led_tone = (~data & 0x80) >> 7; |
| r3373 | r3374 | |
|---|---|---|
| 481 | 481 | |
| 482 | 482 | static int keylatch; |
| 483 | 483 | |
| 484 | static READ8_HANDLER( sc3000_ppi8255_a_r ) | |
| 484 | static READ8_DEVICE_HANDLER( sc3000_ppi8255_a_r ) | |
| 485 | 485 | { |
| 486 | 486 | static const char *keynames[] = { "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7" }; |
| 487 | 487 | |
| r3373 | r3374 | |
| 498 | 498 | PA7 Keyboard input |
| 499 | 499 | */ |
| 500 | 500 | |
| 501 | return input_port_read(machine, keynames[keylatch]); | |
| 501 | return input_port_read(device->machine, keynames[keylatch]); | |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | static READ8_HANDLER( sc3000_ppi8255_b_r ) | |
| 504 | static READ8_DEVICE_HANDLER( sc3000_ppi8255_b_r ) | |
| 505 | 505 | { |
| 506 | 506 | static const char *keynames[] = { "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7" }; |
| 507 | 507 | |
| r3373 | r3374 | |
| 519 | 519 | */ |
| 520 | 520 | |
| 521 | 521 | /* keyboard */ |
| 522 | UINT8 data = input_port_read(machine, keynames[keylatch]); | |
| 522 | UINT8 data = input_port_read(device->machine, keynames[keylatch]); | |
| 523 | 523 | |
| 524 | 524 | /* cartridge contact */ |
| 525 | 525 | data |= 0x10; |
| r3373 | r3374 | |
| 528 | 528 | data |= 0x60; |
| 529 | 529 | |
| 530 | 530 | /* tape input */ |
| 531 | if (cassette_input(cassette_device_image(machine)) > +0.0) data |= 0x80; | |
| 531 | if (cassette_input(cassette_device_image(device->machine)) > +0.0) data |= 0x80; | |
| 532 | 532 | |
| 533 | 533 | return data; |
| 534 | 534 | } |
| 535 | 535 | |
| 536 | static WRITE8_HANDLER( sc3000_ppi8255_c_w ) | |
| 536 | static WRITE8_DEVICE_HANDLER( sc3000_ppi8255_c_w ) | |
| 537 | 537 | { |
| 538 | 538 | /* |
| 539 | 539 | Signal Description |
| r3373 | r3374 | |
| 552 | 552 | keylatch = data & 0x07; |
| 553 | 553 | |
| 554 | 554 | /* cassette */ |
| 555 | cassette_output(cassette_device_image(machine), BIT(data, 4) ? +1.0 : -1.0); | |
| 555 | cassette_output(cassette_device_image(device->machine), BIT(data, 4) ? +1.0 : -1.0); | |
| 556 | 556 | |
| 557 | 557 | /* printer */ |
| 558 | 558 | } |
| r3373 | r3374 | |
| 585 | 585 | static int sf7000_fdc_int; |
| 586 | 586 | static int sf7000_fdc_index; |
| 587 | 587 | |
| 588 | static READ8_HANDLER( sf7000_ppi8255_a_r ) | |
| 588 | static READ8_DEVICE_HANDLER( sf7000_ppi8255_a_r ) | |
| 589 | 589 | { |
| 590 | 590 | /* |
| 591 | 591 | Signal Description |
| r3373 | r3374 | |
| 611 | 611 | return (sf7000_fdc_index << 2) | busy | sf7000_fdc_int; |
| 612 | 612 | } |
| 613 | 613 | |
| 614 | static WRITE8_HANDLER( sf7000_ppi8255_b_w ) | |
| 614 | static WRITE8_DEVICE_HANDLER( sf7000_ppi8255_b_w ) | |
| 615 | 615 | { |
| 616 | 616 | /* |
| 617 | 617 | Signal Description |
| r3373 | r3374 | |
| 629 | 629 | centronics_write_data(1, data); |
| 630 | 630 | } |
| 631 | 631 | |
| 632 | static WRITE8_HANDLER( sf7000_ppi8255_c_w ) | |
| 632 | static WRITE8_DEVICE_HANDLER( sf7000_ppi8255_c_w ) | |
| 633 | 633 | { |
| 634 | 634 | /* |
| 635 | 635 | Signal Description |
| r3373 | r3374 | |
| 649 | 649 | floppy_drive_set_ready_state(image_from_devtype_and_index(IO_FLOPPY, 0), 1, 0); |
| 650 | 650 | |
| 651 | 651 | /* FDC terminal count */ |
| 652 | nec765_set_tc_state(machine, data & 0x04); | |
| 652 | nec765_set_tc_state(device->machine, data & 0x04); | |
| 653 | 653 | |
| 654 | 654 | /* FDC reset */ |
| 655 | 655 | if (data & 0x08) |
| 656 | 656 | { |
| 657 | nec765_reset(machine, 0); | |
| 657 | nec765_reset(device->machine, 0); | |
| 658 | 658 | } |
| 659 | 659 | |
| 660 | 660 | /* ROM selection */ |
| r3373 | r3374 | |
|---|---|---|
| 386 | 386 | |
| 387 | 387 | /* PPI */ |
| 388 | 388 | |
| 389 | static WRITE8_HANDLER( bw2_ppi8255_a_w ) | |
| 389 | static WRITE8_DEVICE_HANDLER( bw2_ppi8255_a_w ) | |
| 390 | 390 | { |
| 391 | 391 | /* |
| 392 | 392 | |
| r3373 | r3374 | |
| 420 | 420 | centronics_write_handshake(0, BIT(data, 7) ? 0 : CENTRONICS_STROBE, CENTRONICS_STROBE); |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | static READ8_HANDLER( bw2_ppi8255_b_r ) | |
| 423 | static READ8_DEVICE_HANDLER( bw2_ppi8255_b_r ) | |
| 424 | 424 | { |
| 425 | 425 | /* |
| 426 | 426 | |
| r3373 | r3374 | |
| 441 | 441 | row = keyboard_row; |
| 442 | 442 | |
| 443 | 443 | if (row <= 9) |
| 444 | return input_port_read(machine, rownames[row]); | |
| 444 | return input_port_read(device->machine, rownames[row]); | |
| 445 | 445 | |
| 446 | 446 | return 0xff; |
| 447 | 447 | } |
| 448 | 448 | |
| 449 | static WRITE8_HANDLER( bw2_ppi8255_c_w ) | |
| 449 | static WRITE8_DEVICE_HANDLER( bw2_ppi8255_c_w ) | |
| 450 | 450 | { |
| 451 | 451 | /* |
| 452 | 452 | |
| r3373 | r3374 | |
| 457 | 457 | |
| 458 | 458 | */ |
| 459 | 459 | |
| 460 | if (get_ramdisk_size(machine) > 0) | |
| 460 | if (get_ramdisk_size(device->machine) > 0) | |
| 461 | 461 | { |
| 462 | ramcard_set_banks(machine, data & 0x07); | |
| 462 | ramcard_set_banks(device->machine, data & 0x07); | |
| 463 | 463 | } |
| 464 | 464 | else |
| 465 | 465 | { |
| 466 | bw2_set_banks(machine, data & 0x07); | |
| 466 | bw2_set_banks(device->machine, data & 0x07); | |
| 467 | 467 | } |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | static READ8_HANDLER( bw2_ppi8255_c_r ) | |
| 470 | static READ8_DEVICE_HANDLER( bw2_ppi8255_c_r ) | |
| 471 | 471 | { |
| 472 | 472 | /* |
| 473 | 473 |
| r3373 | r3374 | |
|---|---|---|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | /* Read/Write 8255 PPI port A (connected to AY-3-8912 databus) */ |
| 288 | static READ8_HANDLER ( amstrad_ppi_porta_r ) | |
| 288 | static READ8_DEVICE_HANDLER ( amstrad_ppi_porta_r ) | |
| 289 | 289 | { |
| 290 | update_psg(machine); | |
| 290 | update_psg(device->machine); | |
| 291 | 291 | return ppi_port_inputs[amstrad_ppi_PortA]; |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | static WRITE8_HANDLER ( amstrad_ppi_porta_w ) | |
| 294 | static WRITE8_DEVICE_HANDLER ( amstrad_ppi_porta_w ) | |
| 295 | 295 | { |
| 296 | 296 | ppi_port_outputs[amstrad_ppi_PortA] = data; |
| 297 | update_psg(machine); | |
| 297 | update_psg(device->machine); | |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | 300 | /* - Read PPI Port B - |
| r3373 | r3374 | |
| 322 | 322 | On the CPC this can be used by a expansion device to report it's presence. "1" = device connected, "0" = device not connected. This is not always used by all expansion devices. |
| 323 | 323 | */ |
| 324 | 324 | |
| 325 | static READ8_HANDLER (amstrad_ppi_portb_r) | |
| 325 | static READ8_DEVICE_HANDLER (amstrad_ppi_portb_r) | |
| 326 | 326 | { |
| 327 | 327 | int data = 0; |
| 328 | 328 | /* Set b7 with cassette tape input */ |
| 329 | 329 | if(amstrad_system_type != SYSTEM_GX4000) |
| 330 | 330 | { |
| 331 | if (cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) > 0.03) { | |
| 331 | if (cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" )) > 0.03) { | |
| 332 | 332 | data |= (1<<7); |
| 333 | 333 | } |
| 334 | 334 | } |
| 335 | 335 | /* Set b6 with Parallel/Printer port ready */ |
| 336 | 336 | if(amstrad_system_type != SYSTEM_GX4000) |
| 337 | 337 | { |
| 338 | if (printer_is_ready(printer_device(machine))==0 ) { | |
| 338 | if (printer_is_ready(printer_device(device->machine))==0 ) { | |
| 339 | 339 | data |= (1<<6); |
| 340 | 340 | } |
| 341 | 341 | } |
| r3373 | r3374 | |
| 371 | 371 | /* previous_ppi_portc_w value */ |
| 372 | 372 | static int previous_ppi_portc_w; |
| 373 | 373 | |
| 374 | static WRITE8_HANDLER ( amstrad_ppi_portc_w ) | |
| 374 | static WRITE8_DEVICE_HANDLER ( amstrad_ppi_portc_w ) | |
| 375 | 375 | { |
| 376 | 376 | int changed_data; |
| 377 | 377 | |
| r3373 | r3374 | |
| 388 | 388 | aleste_rtc_function = data & 0x07; |
| 389 | 389 | |
| 390 | 390 | /* Perform PSG function */ |
| 391 | update_psg(machine); | |
| 391 | update_psg(device->machine); | |
| 392 | 392 | |
| 393 | 393 | /* b5 Cassette Write data */ |
| 394 | 394 | if(amstrad_system_type != SYSTEM_GX4000) |
| 395 | 395 | { |
| 396 | 396 | if ((changed_data & 0x20) != 0) { |
| 397 | cassette_output(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), | |
| 397 | cassette_output(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), | |
| 398 | 398 | ((data & 0x20) ? -1.0 : +1.0)); |
| 399 | 399 | } |
| 400 | 400 | } |
| r3373 | r3374 | |
| 403 | 403 | if(amstrad_system_type != SYSTEM_GX4000) |
| 404 | 404 | { |
| 405 | 405 | if ((changed_data & 0x10) != 0) { |
| 406 | cassette_change_state(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), | |
| 406 | cassette_change_state(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), | |
| 407 | 407 | ((data & 0x10) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED), |
| 408 | 408 | CASSETTE_MASK_MOTOR); |
| 409 | 409 | } |
| r3373 | r3374 | |
|---|---|---|
| 33 | 33 | - Yamaha CX5M/CX5M-128/CX5MII/YIS303/YIS503/YIS503II/YIS503M [Miodrag Milanovic] |
| 34 | 34 | - Yashica YC-64 [Miodrag Milanovic] |
| 35 | 35 | |
| 36 | ||
| 37 | ||
| 36 | 38 | System Driver Changes: |
| 37 | 39 | ---------------------- |
| 38 | 40 | |
| r3373 | r3374 | |
| 186 | 188 | |
| 187 | 189 | - BIOS selection from MESSUI is now possible. (bug #1681) [Curt Coder] |
| 188 | 190 | |
| 191 | ||
| 192 | ||
| 189 | 193 | Imgtool Changes: |
| 190 | 194 | ---------------- |
| 191 | 195 | (none) |
| r3373 | r3374 | |
| 194 | 198 | |
| 195 | 199 | Source Changes: |
| 196 | 200 | ---------------- |
| 197 | - The core is based on MAME 0.127u | |
| 201 | - The core is based on MAME 0.127u6. This incorporates all features of the | |
| 198 | 202 | update to this core. [MAME team] |
| 199 | 203 | |
| 200 | 204 | - Refactored ZIP path code out of src/mess/image.c, made more testable. [Nate |
| Previous | 15994 Revisions | Next |