| Previous | 15994 Revisions | Next |
| r7554 Friday 12th March, 2010 at 04:52:33 UTC by Nathan Woods |
|---|
| Updating to MAME 0.137; does not compile yet |
| [ROOT] | whatsnew.txt |
| [docs] | messnew.txt |
| [src/emu] | clifront.c cpuexec.c cpuintrf.h devcb.c devintrf.c devintrf.h info.c memory.c profiler.c render.c rendlay.c romload.c sound.c state.h ui.c validity.c video.c |
| [src/emu/cpu/avr8] | avr8.c |
| [src/emu/cpu/cdp1802] | cdp1802.c |
| [src/emu/cpu/h83002] | h8_8.c h8periph.c |
| [src/emu/cpu/hd6309] | hd6309.c |
| [src/emu/cpu/i860] | i860dec.c |
| [src/emu/cpu/m6502] | m4510.c m6502.c m6509.c m65ce02.c ops02.h opsce02.h |
| [src/emu/cpu/m6800] | m6800.c |
| [src/emu/cpu/m68000] | m68000.h m68k_in.c m68kcpu.c m68kdasm.c |
| [src/emu/cpu/m6809] | m6809.c |
| [src/emu/cpu/mcs51] | mcs51.c mcs51ops.c |
| [src/emu/cpu/saturn] | satops.c sattable.c saturn.c |
| [src/emu/cpu/sh2] | sh2comn.c |
| [src/emu/cpu/sh4] | sh4comn.c |
| [src/emu/cpu/tms32031] | tms32031.c |
| [src/emu/cpu/tms34010] | tms34010.c |
| [src/emu/cpu/tms7000] | tms7000.c |
| [src/emu/cpu/unsp] | unsp.c unspdasm.c |
| [src/emu/cpu/upd7810] | 7810ops.c |
| [src/emu/cpu/z180] | z180.c z180dd.c z180ed.c z180op.c z180ops.h |
| [src/emu/cpu/z80] | z80.c |
| [src/emu/cpu/z8000] | z8000.c z8000ops.c |
| [src/emu/debug] | debugcmd.c debugcmt.c debugcpu.c debugvw.c |
| [src/emu/machine] | 6522via.c 6526cia.c 6532riot.c 6821pia.c 6840ptm.c 68681.c 74123.c adc083x.c eeprom.c i8255a.c idectrl.c ins8154.c latch8.c ldcore.c pci.c z80dart.c z80dma.c z80pio.c z80sti.c |
| [src/emu/sound] | 2610intf.c ay8910.c c6280.c digitalk.c disc_sys.c discrete.c es8712.c msm5205.c okim6295.c okim6376.c pokey.c saa1099.c scsp.c sn76477.c |
| [src/emu/video] | voodoo.c |
| [src/mame] | mame.mak mamedriv.c |
| [src/mame/drivers] | 39in1.c 5clown.c* aristmk4.c asterix.c btime.c cclimber.c chinagat.c chsuper.c cps1.c cybertnk.c ddragon.c ddragon3.c deco_mlc.c esd16.c funworld.c galaga.c galaxold.c galdrvr.c galpani2.c galpani3.c gijoe.c goldstar.c gticlub.c hornet.c jchan.c kingdrby.c konamigx.c konamim2.c laserbat.c legionna.c lethal.c merit.c midyunit.c model3.c moo.c munchmo.c mystwarr.c namcos23.c opwolf.c plygonet.c pzletime.c rabbit.c route16.c rungun.c segas24.c simpsons.c spdodgeb.c stv.c taito_f3.c tbowl.c terracre.c tmnt.c toaplan1.c vcombat.c vendetta.c williams.c xexex.c xmen.c zr107.c |
| [src/mame/includes] | goldstar.h munchmo.h snes.h toaplan1.h |
| [src/mame/machine] | atari_vg.c atarigen.c decocass.c kaneko16.c mathbox.c namco06.c namcos1.c naomibd.c segas24.c snes.c toaplan1.c |
| [src/mame/video] | cps1.c goldstar.c hng64.c konamigx.c n64.c ppu2c0x.c rdpacvg.c rdpblend.c rdpfb.c rdpfetch.c rdpfrect.c rdpmask.c rdpspn16.c rdptpipe.c rdptrect.c rdptri.c snes.c stvvdp1.c stvvdp2.c |
| [src/osd/sdl] | video.c |
| r7553 | r7554 | |
|---|---|---|
| 59 | 59 | WRITE8_HANDLER( decocass_sound_command_w ) |
| 60 | 60 | { |
| 61 | 61 | decocass_state *state = (decocass_state *)space->machine->driver_data; |
| 62 | LOG(2,("CPU %s sound command -> $%02x\n", space->cpu->tag | |
| 62 | LOG(2,("CPU %s sound command -> $%02x\n", space->cpu->tag | |
| 63 | 63 | soundlatch_w(space, 0, data); |
| 64 | 64 | state->sound_ack |= 0x80; |
| 65 | 65 | /* remove snd cpu data ack bit. i don't see it in the schems, but... */ |
| r7553 | r7554 | |
| 70 | 70 | READ8_HANDLER( decocass_sound_data_r ) |
| 71 | 71 | { |
| 72 | 72 | UINT8 data = soundlatch2_r(space, 0); |
| 73 | LOG(2,("CPU %s sound data <- $%02x\n", space->cpu->tag | |
| 73 | LOG(2,("CPU %s sound data <- $%02x\n", space->cpu->tag | |
| 74 | 74 | return data; |
| 75 | 75 | } |
| 76 | 76 | |
| r7553 | r7554 | |
| 78 | 78 | { |
| 79 | 79 | decocass_state *state = (decocass_state *)space->machine->driver_data; |
| 80 | 80 | UINT8 data = state->sound_ack; /* D6+D7 */ |
| 81 | LOG(4,("CPU %s sound ack <- $%02x\n", space->cpu->tag | |
| 81 | LOG(4,("CPU %s sound ack <- $%02x\n", space->cpu->tag | |
| 82 | 82 | return data; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | WRITE8_HANDLER( decocass_sound_data_w ) |
| 86 | 86 | { |
| 87 | 87 | decocass_state *state = (decocass_state *)space->machine->driver_data; |
| 88 | LOG(2,("CPU %s sound data -> $%02x\n", space->cpu->tag | |
| 88 | LOG(2,("CPU %s sound data -> $%02x\n", space->cpu->tag | |
| 89 | 89 | soundlatch2_w(space, 0, data); |
| 90 | 90 | state->sound_ack |= 0x40; |
| 91 | 91 | } |
| r7553 | r7554 | |
| 94 | 94 | { |
| 95 | 95 | decocass_state *state = (decocass_state *)space->machine->driver_data; |
| 96 | 96 | UINT8 data = soundlatch_r(space, 0); |
| 97 | LOG(4,("CPU %s sound command <- $%02x\n", space->cpu->tag | |
| 97 | LOG(4,("CPU %s sound command <- $%02x\n", space->cpu->tag | |
| 98 | 98 | cpu_set_input_line(state->audiocpu, M6502_IRQ_LINE, CLEAR_LINE); |
| 99 | 99 | state->sound_ack &= ~0x80; |
| 100 | 100 | return data; |
| r7553 | r7554 | |
| 127 | 127 | { |
| 128 | 128 | decocass_state *state = (decocass_state *)space->machine->driver_data; |
| 129 | 129 | UINT8 data = 0xff; |
| 130 | LOG(2,("CPU %s sound ack rst <- $%02x\n", space->cpu->tag | |
| 130 | LOG(2,("CPU %s sound ack rst <- $%02x\n", space->cpu->tag | |
| 131 | 131 | state->sound_ack &= ~0x40; |
| 132 | 132 | return data; |
| 133 | 133 | } |
| r7553 | r7554 | |
| 135 | 135 | WRITE8_HANDLER( decocass_sound_data_ack_reset_w ) |
| 136 | 136 | { |
| 137 | 137 | decocass_state *state = (decocass_state *)space->machine->driver_data; |
| 138 | LOG(2,("CPU %s sound ack rst -> $%02x\n", space->cpu->tag | |
| 138 | LOG(2,("CPU %s sound ack rst -> $%02x\n", space->cpu->tag | |
| 139 | 139 | state->sound_ack &= ~0x40; |
| 140 | 140 | } |
| 141 | 141 |
| r7553 | r7554 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | /* validate arguments */ |
| 110 | 110 | assert(device != NULL); |
| 111 | assert(strlen(device->tag) < 20); | |
| 112 | 111 | |
| 113 | 112 | /* set static values */ |
| 114 | 113 | earom->device = device; |
| r7553 | r7554 | |
|---|---|---|
| 122 | 122 | |
| 123 | 123 | if (!cpu_is_suspended(state->nmicpu, SUSPEND_REASON_HALT | SUSPEND_REASON_RESET | SUSPEND_REASON_DISABLE)) |
| 124 | 124 | { |
| 125 | LOG(("NMI cpu '%s'\n",state->nmicpu->tag | |
| 125 | LOG(("NMI cpu '%s'\n",state->nmicpu->tag | |
| 126 | 126 | |
| 127 | 127 | cpu_set_input_line(state->nmicpu, INPUT_LINE_NMI, PULSE_LINE); |
| 128 | 128 | } |
| 129 | 129 | else |
| 130 | LOG(("NMI not generated because cpu '%s' is suspended\n",state->nmicpu->tag | |
| 130 | LOG(("NMI not generated because cpu '%s' is suspended\n",state->nmicpu->tag | |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | |
| r7553 | r7554 | |
| 137 | 137 | UINT8 result = 0xff; |
| 138 | 138 | int devnum; |
| 139 | 139 | |
| 140 | LOG(("%s: 06XX '%s' read offset %d\n",cpuexec_describe_context(device->machine),device->tag | |
| 140 | LOG(("%s: 06XX '%s' read offset %d\n",cpuexec_describe_context(device->machine),device->tag | |
| 141 | 141 | |
| 142 | 142 | if (!(state->control & 0x10)) |
| 143 | 143 | { |
| 144 | logerror("%s: 06XX '%s' read in write mode %02x\n",cpuexec_describe_context(device->machine),device->tag | |
| 144 | logerror("%s: 06XX '%s' read in write mode %02x\n",cpuexec_describe_context(device->machine),device->tag | |
| 145 | 145 | return 0; |
| 146 | 146 | } |
| 147 | 147 | |
| r7553 | r7554 | |
| 158 | 158 | namco_06xx_state *state = get_safe_token(device); |
| 159 | 159 | int devnum; |
| 160 | 160 | |
| 161 | LOG(("%s: 06XX '%s' write offset %d = %02x\n",cpuexec_describe_context(device->machine),device->tag | |
| 161 | LOG(("%s: 06XX '%s' write offset %d = %02x\n",cpuexec_describe_context(device->machine),device->tag | |
| 162 | 162 | |
| 163 | 163 | if (state->control & 0x10) |
| 164 | 164 | { |
| 165 | logerror("%s: 06XX '%s' write in read mode %02x\n",cpuexec_describe_context(device->machine),device->tag | |
| 165 | logerror("%s: 06XX '%s' write in read mode %02x\n",cpuexec_describe_context(device->machine),device->tag | |
| 166 | 166 | return; |
| 167 | 167 | } |
| 168 | 168 | |
| r7553 | r7554 | |
| 175 | 175 | READ8_DEVICE_HANDLER( namco_06xx_ctrl_r ) |
| 176 | 176 | { |
| 177 | 177 | namco_06xx_state *state = get_safe_token(device); |
| 178 | LOG(("%s: 06XX '%s' ctrl_r\n",cpuexec_describe_context(device->machine),device->tag | |
| 178 | LOG(("%s: 06XX '%s' ctrl_r\n",cpuexec_describe_context(device->machine),device->tag | |
| 179 | 179 | return state->control; |
| 180 | 180 | } |
| 181 | 181 | |
| r7553 | r7554 | |
| 184 | 184 | namco_06xx_state *state = get_safe_token(device); |
| 185 | 185 | int devnum; |
| 186 | 186 | |
| 187 | LOG(("%s: 06XX '%s' control %02x\n",cpuexec_describe_context(device->machine),device->tag | |
| 187 | LOG(("%s: 06XX '%s' control %02x\n",cpuexec_describe_context(device->machine),device->tag | |
| 188 | 188 | |
| 189 | 189 | state->control = data; |
| 190 | 190 |
| r7553 | r7554 | |
|---|---|---|
| 49 | 49 | |
| 50 | 50 | READ16_HANDLER ( system24temp_sys16_io_r ) |
| 51 | 51 | { |
| 52 | // logerror("IO read %02x (%s:%x)\n", offset, space->cpu->tag | |
| 52 | // logerror("IO read %02x (%s:%x)\n", offset, space->cpu->tag | |
| 53 | 53 | if(offset < 8) |
| 54 | 54 | return system24temp_sys16_io_io_r ? system24temp_sys16_io_io_r(space->machine,offset) : 0xff; |
| 55 | 55 | else if (offset < 0x20) { |
| r7553 | r7554 | |
| 67 | 67 | case 0xf: |
| 68 | 68 | return system24temp_sys16_io_dir; |
| 69 | 69 | default: |
| 70 | logerror("IO control read %02x (%s:%x)\n", offset, space->cpu->tag | |
| 70 | logerror("IO control read %02x (%s:%x)\n", offset, space->cpu->tag | |
| 71 | 71 | return 0xff; |
| 72 | 72 | } |
| 73 | 73 | } else |
| r7553 | r7554 | |
| 85 | 85 | if(ACCESSING_BITS_0_7) { |
| 86 | 86 | if(offset < 8) { |
| 87 | 87 | if(!(system24temp_sys16_io_dir & (1 << offset))) { |
| 88 | logerror("IO port write on input-only port (%d, [%02x], %02x, %s:%x)\n", offset, system24temp_sys16_io_dir, data & 0xff, space->cpu->tag | |
| 88 | logerror("IO port write on input-only port (%d, [%02x], %02x, %s:%x)\n", offset, system24temp_sys16_io_dir, data & 0xff, space->cpu->tag | |
| 89 | 89 | return; |
| 90 | 90 | } |
| 91 | 91 | if(system24temp_sys16_io_io_w) |
| r7553 | r7554 | |
| 101 | 101 | system24temp_sys16_io_dir = data; |
| 102 | 102 | break; |
| 103 | 103 | default: |
| 104 | logerror("IO control write %02x, %02x (%s:%x)\n", offset, data & 0xff, space->cpu->tag | |
| 104 | logerror("IO control write %02x, %02x (%s:%x)\n", offset, data & 0xff, space->cpu->tag | |
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | } |
| r7553 | r7554 | |
|---|---|---|
| 14 | 14 | #define ASSERT 1 |
| 15 | 15 | |
| 16 | 16 | |
| 17 | /* List of possible regions for coinage (for games with unemulated sound CPU) */ | |
| 18 | enum { | |
| 19 | TOAPLAN1_REGION_JAPAN=0, | |
| 20 | TOAPLAN1_REGION_US, | |
| 21 | TOAPLAN1_REGION_WORLD, | |
| 22 | TOAPLAN1_REGION_OTHER | |
| 23 | }; | |
| 24 | ||
| 25 | static UINT8 toaplan1_coins_for_credit[TOAPLAN1_REGION_OTHER+1][2][4]; | |
| 26 | static UINT8 toaplan1_credits_for_coin[TOAPLAN1_REGION_OTHER+1][2][4]; | |
| 27 | ||
| 28 | ||
| 17 | 29 | static int toaplan1_coin_count; /* coin count increments on startup ? , so dont count it */ |
| 18 | 30 | static int toaplan1_intenable; |
| 19 | static int vimana_credits; | |
| 20 | static int vimana_latch; | |
| 31 | ||
| 21 | 32 | static int demonwld_dsp_on; |
| 22 | 33 | static int demonwld_dsp_BIO; |
| 23 | static int dsp_execute; /* Demon world */ | |
| 24 | static UINT32 dsp_addr_w, main_ram_seg; /* Demon world */ | |
| 34 | static int dsp_execute; /* Demon world */ | |
| 35 | static UINT32 dsp_addr_w, main_ram_seg; /* Demon world */ | |
| 25 | 36 | |
| 37 | static UINT8 vimana_coins[2]; | |
| 38 | static UINT8 vimana_credits; | |
| 39 | static UINT8 vimana_latch; | |
| 40 | ||
| 41 | ||
| 26 | 42 | int toaplan1_unk_reset_port; |
| 27 | 43 | |
| 28 | 44 | UINT8 *toaplan1_sharedram; |
| r7553 | r7554 | |
| 169 | 185 | return (0x80 | input_port_read(space->machine, "TJUMP")) & 0xff; |
| 170 | 186 | } |
| 171 | 187 | |
| 172 | READ16_HANDLER( vimana_ | |
| 188 | READ16_HANDLER ( vimana_sys | |
| 173 | 189 | { |
| 174 | int data, p; | |
| 190 | int data, p, r, d, slot, reg, dsw; | |
| 175 | 191 | |
| 192 | UINT8 vimana_region[16] = { TOAPLAN1_REGION_JAPAN, TOAPLAN1_REGION_US , TOAPLAN1_REGION_WORLD, TOAPLAN1_REGION_JAPAN, | |
| 193 | TOAPLAN1_REGION_JAPAN, TOAPLAN1_REGION_JAPAN, TOAPLAN1_REGION_JAPAN, TOAPLAN1_REGION_US , | |
| 194 | TOAPLAN1_REGION_JAPAN, TOAPLAN1_REGION_OTHER, TOAPLAN1_REGION_OTHER, TOAPLAN1_REGION_OTHER, | |
| 195 | TOAPLAN1_REGION_OTHER, TOAPLAN1_REGION_OTHER, TOAPLAN1_REGION_OTHER, TOAPLAN1_REGION_JAPAN }; | |
| 196 | ||
| 197 | slot = -1; | |
| 198 | d = input_port_read(space->machine, "DSWA"); | |
| 199 | r = input_port_read(space->machine, "TJUMP"); | |
| 176 | 200 | p = input_port_read(space->machine, "SYSTEM"); |
| 177 | 201 | vimana_latch ^= p; |
| 178 | data = (vimana_latch & p | |
| 202 | data = (vimana_latch & p | |
| 179 | 203 | |
| 180 | /* simulate the mcu keeping track of credits */ | |
| 181 | /* latch so it doesn't add more than one */ | |
| 182 | /* credit per keypress */ | |
| 183 | if (data & 0x18) | |
| 204 | /* simulate the mcu keeping track of credits based on region and coinage settings */ | |
| 205 | /* latch so it doesn't add more than one coin per keypress */ | |
| 206 | if (d & 0x04) /* "test mode" ON */ | |
| 184 | 207 | { |
| 185 | vimana_credits++ ; | |
| 208 | vimana_coins[0] = vimana_coins[1] = 0; | |
| 209 | vimana_credits = 0; | |
| 186 | 210 | } |
| 211 | else /* "test mode" OFF */ | |
| 212 | { | |
| 213 | if (data & 0x02) /* TILT */ | |
| 214 | { | |
| 215 | vimana_coins[0] = vimana_coins[1] = 0; | |
| 216 | vimana_credits = 0; | |
| 217 | } | |
| 218 | if (data & 0x01) /* SERVICE1 */ | |
| 219 | { | |
| 220 | vimana_credits++ ; | |
| 221 | } | |
| 222 | if (data & 0x08) /* COIN1 */ | |
| 223 | { | |
| 224 | slot = 0; | |
| 225 | } | |
| 226 | if (data & 0x10) /* COIN2 */ | |
| 227 | { | |
| 228 | slot = 1 ; | |
| 229 | } | |
| 230 | ||
| 231 | if (slot != -1) | |
| 232 | { | |
| 233 | reg = vimana_region[r]; | |
| 234 | dsw = (d & 0xf0) >> (4 + 2 * slot); | |
| 235 | vimana_coins[slot]++; | |
| 236 | if (vimana_coins[slot] >= toaplan1_coins_for_credit[reg][slot][dsw]) | |
| 237 | { | |
| 238 | vimana_credits += toaplan1_credits_for_coin[reg][slot][dsw]; | |
| 239 | vimana_coins[slot] -= toaplan1_coins_for_credit[reg][slot][dsw]; | |
| 240 | } | |
| 241 | coin_counter_w(space->machine, slot, 1); | |
| 242 | coin_counter_w(space->machine, slot, 0); | |
| 243 | } | |
| 244 | ||
| 245 | if (vimana_credits >= 9) | |
| 246 | vimana_credits = 9; | |
| 247 | } | |
| 248 | ||
| 249 | coin_lockout_global_w(space->machine, (vimana_credits >= 9)); | |
| 250 | ||
| 187 | 251 | vimana_latch = p; |
| 188 | 252 | |
| 189 | 253 | return p & 0xffff; |
| r7553 | r7554 | |
| 195 | 259 | switch (offset) |
| 196 | 260 | { |
| 197 | 261 | case 0: data = 0xff; break; |
| 198 | case 1: data = 0; break; | |
| 262 | case 1: data = 0x00; break; | |
| 199 | 263 | case 2: data = vimana_credits; break; |
| 200 | 264 | } |
| 201 | 265 | return data & 0xff; |
| r7553 | r7554 | |
| 205 | 269 | { |
| 206 | 270 | switch (offset) |
| 207 | 271 | { |
| 208 | case 0: break; | |
| 209 | case 1: break; | |
| 210 | case 2: if (ACCESSING_BITS_0_7) vimana_credits = data & 0xff; break; | |
| 272 | case 0: break; | |
| 273 | case 1: break; | |
| 274 | case 2: if (ACCESSING_BITS_0_7) | |
| 275 | { | |
| 276 | vimana_credits = data & 0xff; | |
| 277 | coin_lockout_global_w(space->machine, (vimana_credits >= 9)); | |
| 278 | } | |
| 279 | break; | |
| 211 | 280 | } |
| 212 | 281 | } |
| 213 | 282 | |
| r7553 | r7554 | |
| 297 | 366 | } |
| 298 | 367 | |
| 299 | 368 | |
| 369 | void toaplan1_init_coinage_tables(running_machine *machine) | |
| 370 | { | |
| 371 | /* Japan */ | |
| 372 | toaplan1_coins_for_credit[TOAPLAN1_REGION_JAPAN][0][0] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_JAPAN][0][0] = 1; | |
| 373 | toaplan1_coins_for_credit[TOAPLAN1_REGION_JAPAN][0][1] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_JAPAN][0][1] = 2; | |
| 374 | toaplan1_coins_for_credit[TOAPLAN1_REGION_JAPAN][0][2] = 2; toaplan1_credits_for_coin[TOAPLAN1_REGION_JAPAN][0][2] = 1; | |
| 375 | toaplan1_coins_for_credit[TOAPLAN1_REGION_JAPAN][0][3] = 2; toaplan1_credits_for_coin[TOAPLAN1_REGION_JAPAN][0][3] = 3; | |
| 376 | toaplan1_coins_for_credit[TOAPLAN1_REGION_JAPAN][1][0] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_JAPAN][1][0] = 1; | |
| 377 | toaplan1_coins_for_credit[TOAPLAN1_REGION_JAPAN][1][1] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_JAPAN][1][1] = 2; | |
| 378 | toaplan1_coins_for_credit[TOAPLAN1_REGION_JAPAN][1][2] = 2; toaplan1_credits_for_coin[TOAPLAN1_REGION_JAPAN][1][2] = 1; | |
| 379 | toaplan1_coins_for_credit[TOAPLAN1_REGION_JAPAN][1][3] = 2; toaplan1_credits_for_coin[TOAPLAN1_REGION_JAPAN][1][3] = 3; | |
| 380 | /* US = Japan */ | |
| 381 | toaplan1_coins_for_credit[TOAPLAN1_REGION_US ][0][0] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_US ][0][0] = 1; | |
| 382 | toaplan1_coins_for_credit[TOAPLAN1_REGION_US ][0][1] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_US ][0][1] = 2; | |
| 383 | toaplan1_coins_for_credit[TOAPLAN1_REGION_US ][0][2] = 2; toaplan1_credits_for_coin[TOAPLAN1_REGION_US ][0][2] = 1; | |
| 384 | toaplan1_coins_for_credit[TOAPLAN1_REGION_US ][0][3] = 2; toaplan1_credits_for_coin[TOAPLAN1_REGION_US ][0][3] = 3; | |
| 385 | toaplan1_coins_for_credit[TOAPLAN1_REGION_US ][1][0] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_US ][1][0] = 1; | |
| 386 | toaplan1_coins_for_credit[TOAPLAN1_REGION_US ][1][1] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_US ][1][1] = 2; | |
| 387 | toaplan1_coins_for_credit[TOAPLAN1_REGION_US ][1][2] = 2; toaplan1_credits_for_coin[TOAPLAN1_REGION_US ][1][2] = 1; | |
| 388 | toaplan1_coins_for_credit[TOAPLAN1_REGION_US ][1][3] = 2; toaplan1_credits_for_coin[TOAPLAN1_REGION_US ][1][3] = 3; | |
| 389 | /* World */ | |
| 390 | toaplan1_coins_for_credit[TOAPLAN1_REGION_WORLD][0][0] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_WORLD][0][0] = 1; | |
| 391 | toaplan1_coins_for_credit[TOAPLAN1_REGION_WORLD][0][1] = 2; toaplan1_credits_for_coin[TOAPLAN1_REGION_WORLD][0][1] = 1; | |
| 392 | toaplan1_coins_for_credit[TOAPLAN1_REGION_WORLD][0][2] = 3; toaplan1_credits_for_coin[TOAPLAN1_REGION_WORLD][0][2] = 1; | |
| 393 | toaplan1_coins_for_credit[TOAPLAN1_REGION_WORLD][0][3] = 4; toaplan1_credits_for_coin[TOAPLAN1_REGION_WORLD][0][3] = 1; | |
| 394 | toaplan1_coins_for_credit[TOAPLAN1_REGION_WORLD][1][0] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_WORLD][1][0] = 2; | |
| 395 | toaplan1_coins_for_credit[TOAPLAN1_REGION_WORLD][1][1] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_WORLD][1][1] = 3; | |
| 396 | toaplan1_coins_for_credit[TOAPLAN1_REGION_WORLD][1][2] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_WORLD][1][2] = 4; | |
| 397 | toaplan1_coins_for_credit[TOAPLAN1_REGION_WORLD][1][3] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_WORLD][1][3] = 6; | |
| 398 | /* Other - as it is an unknown or invalid setting, I set everything to 1C_1C */ | |
| 399 | toaplan1_coins_for_credit[TOAPLAN1_REGION_OTHER][0][0] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_OTHER][0][0] = 1; | |
| 400 | toaplan1_coins_for_credit[TOAPLAN1_REGION_OTHER][0][1] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_OTHER][0][1] = 1; | |
| 401 | toaplan1_coins_for_credit[TOAPLAN1_REGION_OTHER][0][2] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_OTHER][0][2] = 1; | |
| 402 | toaplan1_coins_for_credit[TOAPLAN1_REGION_OTHER][0][3] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_OTHER][0][3] = 1; | |
| 403 | toaplan1_coins_for_credit[TOAPLAN1_REGION_OTHER][1][0] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_OTHER][1][0] = 1; | |
| 404 | toaplan1_coins_for_credit[TOAPLAN1_REGION_OTHER][1][1] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_OTHER][1][1] = 1; | |
| 405 | toaplan1_coins_for_credit[TOAPLAN1_REGION_OTHER][1][2] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_OTHER][1][2] = 1; | |
| 406 | toaplan1_coins_for_credit[TOAPLAN1_REGION_OTHER][1][3] = 1; toaplan1_credits_for_coin[TOAPLAN1_REGION_OTHER][1][3] = 1; | |
| 407 | } | |
| 408 | ||
| 300 | 409 | MACHINE_RESET( toaplan1 ) |
| 301 | 410 | { |
| 302 | 411 | toaplan1_intenable = 0; |
| r7553 | r7554 | |
| 337 | 446 | MACHINE_RESET( vimana ) |
| 338 | 447 | { |
| 339 | 448 | MACHINE_RESET_CALL(toaplan1); |
| 449 | toaplan1_init_coinage_tables(machine); | |
| 450 | vimana_coins[0] = vimana_coins[1] = 0; | |
| 340 | 451 | vimana_credits = 0; |
| 341 | 452 | vimana_latch = 0; |
| 342 | 453 | } |
| 343 | 454 | void vimana_driver_savestate(running_machine *machine) |
| 344 | 455 | { |
| 456 | state_save_register_global(machine, vimana_coins[0]); | |
| 457 | state_save_register_global(machine, vimana_coins[1]); | |
| 345 | 458 | state_save_register_global(machine, vimana_credits); |
| 346 | 459 | state_save_register_global(machine, vimana_latch); |
| 347 | 460 | } |
| r7553 | r7554 | |
|---|---|---|
| 99 | 99 | |
| 100 | 100 | static READ8_HANDLER( no_key_r ) |
| 101 | 101 | { |
| 102 | popmessage("CPU %s PC %08x: keychip read %04x\n", space->cpu->tag | |
| 102 | popmessage("CPU %s PC %08x: keychip read %04x\n", space->cpu->tag | |
| 103 | 103 | return 0; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | static WRITE8_HANDLER( no_key_w ) |
| 107 | 107 | { |
| 108 | popmessage("CPU %s PC %08x: keychip write %04x=%02x\n", space->cpu->tag | |
| 108 | popmessage("CPU %s PC %08x: keychip write %04x=%02x\n", space->cpu->tag | |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | |
| r7553 | r7554 | |
| 210 | 210 | */ |
| 211 | 211 | static READ8_HANDLER( key_type1_r ) |
| 212 | 212 | { |
| 213 | // logerror("CPU %s PC %04x: keychip read %04x\n", space->cpu->tag | |
| 213 | // logerror("CPU %s PC %04x: keychip read %04x\n", space->cpu->tag | |
| 214 | 214 | |
| 215 | 215 | if (offset < 3) |
| 216 | 216 | { |
| r7553 | r7554 | |
| 241 | 241 | |
| 242 | 242 | static WRITE8_HANDLER( key_type1_w ) |
| 243 | 243 | { |
| 244 | // logerror("CPU %s PC %04x: keychip write %04x=%02x\n", space->cpu->tag | |
| 244 | // logerror("CPU %s PC %04x: keychip write %04x=%02x\n", space->cpu->tag | |
| 245 | 245 | |
| 246 | 246 | if (offset < 4) |
| 247 | 247 | key[offset] = data; |
| r7553 | r7554 | |
| 393 | 393 | |
| 394 | 394 | static READ8_HANDLER( key_type2_r ) |
| 395 | 395 | { |
| 396 | // logerror("CPU %s PC %04x: keychip read %04x\n", space->cpu->tag | |
| 396 | // logerror("CPU %s PC %04x: keychip read %04x\n", space->cpu->tag | |
| 397 | 397 | |
| 398 | 398 | key_numerator_high_word = 0; |
| 399 | 399 | |
| r7553 | r7554 | |
| 412 | 412 | |
| 413 | 413 | static WRITE8_HANDLER( key_type2_w ) |
| 414 | 414 | { |
| 415 | // logerror("CPU %s PC %04x: keychip write %04x=%02x\n", space->cpu->tag | |
| 415 | // logerror("CPU %s PC %04x: keychip write %04x=%02x\n", space->cpu->tag | |
| 416 | 416 | |
| 417 | 417 | if (offset < 5) |
| 418 | 418 | { |
| r7553 | r7554 | |
| 521 | 521 | { |
| 522 | 522 | int op; |
| 523 | 523 | |
| 524 | // logerror("CPU %s PC %04x: keychip read %04x\n", space->cpu->tag | |
| 524 | // logerror("CPU %s PC %04x: keychip read %04x\n", space->cpu->tag | |
| 525 | 525 | |
| 526 | 526 | /* I need to handle blastoff's read from 0858. The game previously writes to 0858, |
| 527 | 527 | using it as temporary storage, so maybe it expects to act as RAM, however |
| r7553 | r7554 | |
| 537 | 537 | if (op == key_bottom4) return (offset << 4) | (key[key_swap4_arg] & 0x0f); |
| 538 | 538 | if (op == key_top4) return (offset << 4) | (key[key_swap4_arg] >> 4); |
| 539 | 539 | |
| 540 | popmessage("CPU %s PC %08x: keychip read %04x", space->cpu->tag | |
| 540 | popmessage("CPU %s PC %08x: keychip read %04x", space->cpu->tag | |
| 541 | 541 | |
| 542 | 542 | return 0; |
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | static WRITE8_HANDLER( key_type3_w ) |
| 546 | 546 | { |
| 547 | // logerror("CPU %s PC %04x: keychip write %04x=%02x\n", space->cpu->tag | |
| 547 | // logerror("CPU %s PC %04x: keychip write %04x=%02x\n", space->cpu->tag | |
| 548 | 548 | |
| 549 | 549 | key[(offset & 0x70) >> 4] = data; |
| 550 | 550 | } |
| r7553 | r7554 | |
| 647 | 647 | |
| 648 | 648 | static WRITE8_HANDLER( rom_w ) |
| 649 | 649 | { |
| 650 | logerror("CPU %s PC %04x: warning - write %02x to rom address %04x\n", space->cpu->tag | |
| 650 | logerror("CPU %s PC %04x: warning - write %02x to rom address %04x\n", space->cpu->tag | |
| 651 | 651 | } |
| 652 | 652 | |
| 653 | 653 | /* error handlers */ |
| 654 | 654 | static READ8_HANDLER( unknown_r ) |
| 655 | 655 | { |
| 656 | logerror("CPU %s PC %04x: warning - read from unknown chip\n", space->cpu->tag.cstr(), cpu_get_pc(space->cpu) ); | |
| 657 | // popmessage("CPU %s PC %04x: read from unknown chip", space->cpu->tag.cstr(), cpu_get_pc(space->cpu) ); | |
| 656 | logerror("CPU %s PC %04x: warning - read from unknown chip\n", space->cpu->tag(), cpu_get_pc(space->cpu) ); | |
| 657 | // popmessage("CPU %s PC %04x: read from unknown chip", space->cpu->tag(), cpu_get_pc(space->cpu) ); | |
| 658 | 658 | return 0; |
| 659 | 659 | } |
| 660 | 660 | |
| 661 | 661 | static WRITE8_HANDLER( unknown_w ) |
| 662 | 662 | { |
| 663 | logerror("CPU %s PC %04x: warning - wrote to unknown chip\n", space->cpu->tag.cstr(), cpu_get_pc(space->cpu) ); | |
| 664 | // popmessage("CPU %s PC %04x: wrote to unknown chip", space->cpu->tag.cstr(), cpu_get_pc(space->cpu) ); | |
| 663 | logerror("CPU %s PC %04x: warning - wrote to unknown chip\n", space->cpu->tag(), cpu_get_pc(space->cpu) ); | |
| 664 | // popmessage("CPU %s PC %04x: wrote to unknown chip", space->cpu->tag(), cpu_get_pc(space->cpu) ); | |
| 665 | 665 | } |
| 666 | 666 | |
| 667 | 667 | /* Main bankswitching routine */ |
| r7553 | r7554 | |
| 737 | 737 | |
| 738 | 738 | WRITE8_HANDLER( namcos1_bankswitch_w ) |
| 739 | 739 | { |
| 740 | // logerror("cpu %s: namcos1_bankswitch_w offset %04x data %02x\n", space->cpu->tag | |
| 740 | // logerror("cpu %s: namcos1_bankswitch_w offset %04x data %02x\n", space->cpu->tag | |
| 741 | 741 | |
| 742 | 742 | namcos1_bankswitch(space->machine, (space->cpu == devtag_get_device(space->machine, "maincpu")) ? 0 : 1, offset, data); |
| 743 | 743 | } |
| r7553 | r7554 | |
|---|---|---|
| 769 | 769 | { |
| 770 | 770 | case INIDISP: /* Initial settings for screen */ |
| 771 | 771 | if ((snes_ppu.screen_disabled & 0x80) && (!(data & 0x80))) //a 1->0 force blank transition causes a reset OAM address |
| 772 | { | |
| 772 | { | |
| 773 | 773 | memory_write_byte(space, OAMADDL, snes_ppu.oam.saved_address_low); |
| 774 | 774 | memory_write_byte(space, OAMADDH, snes_ppu.oam.saved_address_high); |
| 775 | 775 | } |
| r7553 | r7554 | |
| 809 | 809 | default: |
| 810 | 810 | /* Unknown size so default to 8 & 16 */ |
| 811 | 811 | logerror("Object size unsupported: %d\n", (data & 0xe0) >> 5); |
| 812 | ||
| 812 | ||
| 813 | 813 | snes_ppu.oam.size[0] = 1; |
| 814 | 814 | snes_ppu.oam.size[1] = 2; |
| 815 | 815 | break; |
| r7553 | r7554 | |
|---|---|---|
| 70 | 70 | if (state->screen_timer[i].screen == screen) |
| 71 | 71 | return &state->screen_timer[i]; |
| 72 | 72 | |
| 73 | fatalerror("Unexpected: no atarivc_eof_update_timer for screen '%s'\n", screen->tag | |
| 73 | fatalerror("Unexpected: no atarivc_eof_update_timer for screen '%s'\n", screen->tag | |
| 74 | 74 | return NULL; |
| 75 | 75 | } |
| 76 | 76 |
| r7553 | r7554 | |
|---|---|---|
| 1753 | 1753 | } |
| 1754 | 1754 | |
| 1755 | 1755 | /* set the type */ |
| 1756 | v->index = device->machine->devicelist.index(device->type, device->tag); | |
| 1756 | v->index = device->machine->devicelist.index(device->type, device->tag()); | |
| 1757 | 1757 | v->type = config->type; |
| 1758 | 1758 | |
| 1759 | 1759 | /* initialize some registers */ |
| r7553 | r7554 | |
|---|---|---|
| 320 | 320 | |
| 321 | 321 | /* validate arguments */ |
| 322 | 322 | assert(device != NULL); |
| 323 | assert(strlen(device->tag) < 20); | |
| 324 | 323 | |
| 325 | 324 | /* set static values */ |
| 326 | 325 | mb->device = device; |
| r7553 | r7554 | |
|---|---|---|
| 2425 | 2425 | */ |
| 2426 | 2426 | READ16_HANDLER( toybox_mcu_status_r ) |
| 2427 | 2427 | { |
| 2428 | logerror("CPU %s (PC=%06X) : read MCU status\n", space->cpu->tag | |
| 2428 | logerror("CPU %s (PC=%06X) : read MCU status\n", space->cpu->tag | |
| 2429 | 2429 | return 0; // most games test bit 0 for failure |
| 2430 | 2430 | } |
| 2431 | 2431 |
| r7553 | r7554 | |
|---|---|---|
| 932 | 932 | DRIVER( timecrs2b ) /* (c) 1997 */ |
| 933 | 933 | DRIVER( timecrs2c ) /* (c) 1997 */ |
| 934 | 934 | DRIVER( panicprk ) /* (c) 1998 */ |
| 935 | DRIVER( gunwars ) /* (c) 1998 */ | |
| 935 | 936 | DRIVER( 500gp ) /* (c) 1999 */ |
| 936 | 937 | DRIVER( finfurl2 ) /* (c) 1999 */ |
| 937 | 938 | DRIVER( finfurl2j ) /* (c) 1999 */ |
| r7553 | r7554 | |
| 2693 | 2694 | DRIVER( dinoj ) /* 01/02/1993 (c) 1993 (Japan) (CPS1 + QSound) */ |
| 2694 | 2695 | DRIVER( dinopic ) /* bootleg */ |
| 2695 | 2696 | DRIVER( dinopic2 ) /* bootleg */ |
| 2697 | DRIVER( dinohunt ) /* bootleg */ | |
| 2696 | 2698 | DRIVER( punisher ) /* 22/04/1993 (c) 1993 (World) (CPS1 + QSound) */ |
| 2697 | 2699 | DRIVER( punisheru ) /* 22/04/1993 (c) 1993 (US) (CPS1 + QSound) */ |
| 2698 | 2700 | DRIVER( punisherj ) /* 22/04/1993 (c) 1993 (Japan) (CPS1 + QSound) */ |
| 2699 | 2701 | DRIVER( punipic ) /* bootleg */ |
| 2700 | 2702 | DRIVER( punipic2 ) /* bootleg */ |
| 2701 | 2703 | DRIVER( punipic3 ) /* bootleg */ |
| 2704 | DRIVER( punisherbz )/* bootleg */ | |
| 2702 | 2705 | DRIVER( slammast ) /* 13/07/1993 (c) 1993 (World) (CPS1 + QSound) */ |
| 2703 | 2706 | DRIVER( slammastu ) /* 13/07/1993 (c) 1993 (US) (CPS1 + QSound) */ |
| 2704 | 2707 | DRIVER( mbomberj ) /* 13/07/1993 (c) 1993 (Japan) (CPS1 + QSound) */ |
| r7553 | r7554 | |
| 5171 | 5174 | DRIVER( skullfng ) /* MCH (c) 1996 Data East Corporation (World) */ |
| 5172 | 5175 | DRIVER( skullfngj ) /* MCH (c) 1996 Data East Corporation (Japan) */ |
| 5173 | 5176 | DRIVER( stadhr96 ) /* MCM (c) 1996 Data East */ |
| 5174 | DRIVER( stadhr96 | |
| 5177 | DRIVER( stadhr96j ) /* MCM (c) 1996 Data East */ | |
| 5175 | 5178 | |
| 5176 | 5179 | /* Tehkan / Tecmo games (Tehkan became Tecmo in 1986) */ |
| 5177 | 5180 | DRIVER( senjyo ) /* (c) 1983 Tehkan */ |
| r7553 | r7554 | |
| 5691 | 5694 | DRIVER( windheat ) /* GX677 (c)1996 */ |
| 5692 | 5695 | DRIVER( windheatu ) /* GX677 (c)1996 */ |
| 5693 | 5696 | DRIVER( windheatj ) /* GX677 (c)1996 */ |
| 5694 | DRIVER( | |
| 5697 | DRIVER( | |
| 5695 | 5698 | |
| 5696 | 5699 | /* Konami M2 games */ |
| 5697 | 5700 | DRIVER( polystar ) /* GX623 (c)1997 */ |
| r7553 | r7554 | |
| 6888 | 6891 | DRIVER( smashtv6 ) /* (c) 1990 Williams */ |
| 6889 | 6892 | DRIVER( smashtv5 ) /* (c) 1990 Williams */ |
| 6890 | 6893 | DRIVER( smashtv4 ) /* (c) 1990 Williams */ |
| 6894 | DRIVER( smashtv3 ) /* (c) 1990 Williams */ | |
| 6891 | 6895 | DRIVER( hiimpact ) /* (c) 1990 Williams */ |
| 6892 | 6896 | DRIVER( hiimpact4 ) /* (c) 1990 Williams */ |
| 6893 | 6897 | DRIVER( hiimpact3 ) /* (c) 1990 Williams */ |
| r7553 | r7554 | |
| 8253 | 8257 | DRIVER( stellecu ) /* (c) 1998 */ |
| 8254 | 8258 | DRIVER( iqblock ) /* (c) 1993 */ |
| 8255 | 8259 | DRIVER( grndtour ) /* (c) 1993 */ |
| 8260 | DRIVER( 5clown ) /* (c) IGS 1993 */ | |
| 8261 | DRIVER( 5clowna ) /* (c) IGS 1993 */ | |
| 8262 | DRIVER( 5clownsp ) /* (c) IGS 1993 */ | |
| 8256 | 8263 | |
| 8257 | 8264 | /* IGS005 + IGS006 + IGS007 + IGS008 Games */ |
| 8258 | 8265 | DRIVER( lordgun ) /* (c) 1994 */ |
| r7553 | r7554 | |
| 9072 | 9079 | DRIVER( vegasfte ) /* (c) 1993 Soft Design */ |
| 9073 | 9080 | DRIVER( jolyjokr ) /* (c) 198? Impera */ |
| 9074 | 9081 | DRIVER( jolyjokra ) /* (c) 198? Impera */ |
| 9082 | DRIVER( jolyjokrb ) /* (c) 198? Impera */ | |
| 9075 | 9083 | DRIVER( jokercrd ) /* (c) 1993 Vesely Svet */ |
| 9076 | 9084 | DRIVER( mongolnw ) /* 199? bootleg */ |
| 9077 | 9085 | DRIVER( soccernw ) /* 199? bootleg */ |
| r7553 | r7554 | |
| 9447 | 9455 | DRIVER( cmfun ) /* (c) 1995 Dyna Electronics */ |
| 9448 | 9456 | DRIVER( cmaster ) /* (c) 1991 Dyna Electronics */ |
| 9449 | 9457 | DRIVER( cmasterb ) /* (c) 1991 Dyna Electronics */ |
| 9458 | DRIVER( cmezspin ) /* (c) 1991 Dyna Electronics */ | |
| 9450 | 9459 | DRIVER( cmasterc ) /* (c) 1991 Dyna Electronics */ |
| 9451 | 9460 | DRIVER( cmasterbv ) /* (c) 1991 Dyna Electronics / Gerald Duhamel?*/ |
| 9452 | 9461 | DRIVER( cmasterd ) /* (c) 1991 Dyna Electronics */ |
| r7553 | r7554 | |
| 9454 | 9463 | DRIVER( cmasterf ) /* (c) 1991 Dyna Electronics */ |
| 9455 | 9464 | DRIVER( cmast91 ) /* (c) 1991 Dyna Electronics */ |
| 9456 | 9465 | DRIVER( cmast92 ) /* (c) 1992 Dyna Electronics */ |
| 9466 | ||
| 9467 | DRIVER( jkrmast ) /* (c) 199? unknown */ | |
| 9468 | DRIVER( pkrmast ) /* (c) 199? unknown */ | |
| 9469 | DRIVER( pkrmasta ) /* (c) 199? unknown */ | |
| 9470 | ||
| 9457 | 9471 | DRIVER( cb2001 ) /* (c) 2001 Dyna Electronics */ |
| 9458 | 9472 | DRIVER( scherrym ) /* (c) 2001? Dyna Electronics */ |
| 9459 | 9473 |
| r7553 | r7554 | |
|---|---|---|
| 22 | 22 | UINT8 *reel2_ram; |
| 23 | 23 | UINT8 *reel3_ram; |
| 24 | 24 | |
| 25 | /* reelx_attrram for unkch sets */ | |
| 26 | UINT8 *reel1_attrram; | |
| 27 | UINT8 *reel2_attrram; | |
| 28 | UINT8 *reel3_attrram; | |
| 29 | UINT8 unkch_vidreg; | |
| 30 | ||
| 25 | 31 | tilemap_t *reel1_tilemap; |
| 26 | 32 | tilemap_t *reel2_tilemap; |
| 27 | 33 | tilemap_t *reel3_tilemap; |
| r7553 | r7554 | |
| 32 | 38 | UINT8 cmaster_girl_pal; |
| 33 | 39 | UINT8 cm_enable_reg; |
| 34 | 40 | UINT8 cm_girl_scroll; |
| 41 | UINT8 lucky8_nmi_enable; | |
| 42 | int tile_bank; | |
| 43 | ||
| 35 | 44 | }; |
| 36 | 45 | |
| 37 | 46 | |
| r7553 | r7554 | |
| 41 | 50 | WRITE8_HANDLER( goldstar_reel2_ram_w ); |
| 42 | 51 | WRITE8_HANDLER( goldstar_reel3_ram_w ); |
| 43 | 52 | |
| 53 | WRITE8_HANDLER( unkch_reel1_attrram_w ); | |
| 54 | WRITE8_HANDLER( unkch_reel2_attrram_w ); | |
| 55 | WRITE8_HANDLER( unkch_reel3_attrram_w ); | |
| 56 | ||
| 44 | 57 | WRITE8_HANDLER( goldstar_fg_vidram_w ); |
| 45 | 58 | WRITE8_HANDLER( goldstar_fg_atrram_w ); |
| 46 | 59 | WRITE8_HANDLER( cm_girl_scroll_w ); |
| r7553 | r7554 | |
| 50 | 63 | WRITE8_HANDLER( cm_outport0_w ); |
| 51 | 64 | VIDEO_START( goldstar ); |
| 52 | 65 | VIDEO_START( cherrym ); |
| 66 | VIDEO_START( unkch ); | |
| 67 | VIDEO_START( magical ); | |
| 53 | 68 | VIDEO_UPDATE( goldstar ); |
| 54 | 69 | VIDEO_UPDATE( cmast91 ); |
| 55 | 70 | VIDEO_UPDATE( amcoe1a ); |
| 71 | VIDEO_UPDATE( unkch ); | |
| 72 | VIDEO_UPDATE( magical ); |
| r7553 | r7554 | |
|---|---|---|
| 18 | 18 | WRITE16_HANDLER( demonwld_dsp_ctrl_w ); |
| 19 | 19 | READ16_HANDLER ( demonwld_BIO_r ); |
| 20 | 20 | READ16_HANDLER ( samesame_port_6_word_r ); |
| 21 | READ16_HANDLER ( vimana_system_port_r ); | |
| 21 | 22 | READ16_HANDLER ( vimana_mcu_r ); |
| 22 | 23 | WRITE16_HANDLER( vimana_mcu_w ); |
| 23 | READ16_HANDLER ( vimana_input_port_5_word_r ); | |
| 24 | 24 | |
| 25 | 25 | WRITE8_HANDLER( rallybik_coin_w ); |
| 26 | 26 | WRITE8_HANDLER( toaplan1_coin_w ); |
| r7553 | r7554 | |
|---|---|---|
| 23 | 23 | #define DOTCLK_NTSC (MCLK_NTSC/4) |
| 24 | 24 | #define DOTCLK_PAL (MCLK_PAL/4) |
| 25 | 25 | |
| 26 | #define SNES_LAYER_DEBUG | |
| 26 | #define SNES_LAYER_DEBUG | |
| 27 | 27 | |
| 28 | 28 | /* Debug definitions */ |
| 29 | 29 | #ifdef MAME_DEBUG |
| r7553 | r7554 | |
|---|---|---|
| 27 | 27 | /* misc */ |
| 28 | 28 | int nmi_enable; |
| 29 | 29 | int which; |
| 30 | UINT8 sound_nmi_enable; | |
| 30 | 31 | |
| 31 | 32 | /* devices */ |
| 32 | 33 | running_device *maincpu; |
| r7553 | r7554 | |
|---|---|---|
| 1478 | 1478 | $(DRIVERS)/3super8.o \ |
| 1479 | 1479 | $(DRIVERS)/4enraya.o $(VIDEO)/4enraya.o \ |
| 1480 | 1480 | $(DRIVERS)/4roses.o \ |
| 1481 | $(DRIVERS)/5clown.o \ | |
| 1481 | 1482 | $(DRIVERS)/acefruit.o \ |
| 1482 | 1483 | $(DRIVERS)/adp.o \ |
| 1483 | 1484 | $(DRIVERS)/amaticmg.o \ |
| r7553 | r7554 | |
|---|---|---|
| 192 | 192 | |
| 193 | 193 | // x ^= 0x00020000; |
| 194 | 194 | |
| 195 | logerror ("cpu %s (PC=%08X) VDP1: Read from Registers, Offset %04x\n", space->cpu->tag | |
| 195 | logerror ("cpu %s (PC=%08X) VDP1: Read from Registers, Offset %04x\n", space->cpu->tag | |
| 196 | 196 | // if (offset == 0x04) return x; |
| 197 | 197 | |
| 198 | 198 | return stv_vdp1_regs[offset]; |
| r7553 | r7554 | |
| 348 | 348 | |
| 349 | 349 | // if (((offset * 4) > 0xdf) && ((offset * 4) < 0x140)) |
| 350 | 350 | // { |
| 351 | // logerror("cpu %s (PC=%08X): VRAM dword write to %08X = %08X & %08X\n", space->cpu->tag | |
| 351 | // logerror("cpu %s (PC=%08X): VRAM dword write to %08X = %08X & %08X\n", space->cpu->tag | |
| 352 | 352 | // } |
| 353 | 353 | |
| 354 | 354 | data = stv_vdp1_vram[offset]; |
| r7553 | r7554 | |
|---|---|---|
| 10 | 10 | UINT8* hb = &hidden_bits[fb_address >> 1]; |
| 11 | 11 | |
| 12 | 12 | int index, i, j; |
| 13 | int x1 = rect->xh / 4; | |
| 14 | int x2 = rect->xl / 4; | |
| 15 | int y1 = rect->yh / 4; | |
| 16 | int y2 = rect->yl / 4; | |
| 17 | int clipx1, clipx2, clipy1, clipy2; | |
| 13 | int x1 = rect->xh; | |
| 14 | int x2 = rect->xl; | |
| 15 | int y1 = rect->yh; | |
| 16 | int y2 = rect->yl; | |
| 18 | 17 | UINT16 fill_color1, fill_color2; |
| 19 | 18 | int fill_cvg1; |
| 20 | 19 | int fill_cvg2; |
| r7553 | r7554 | |
| 34 | 33 | fill_cvg1 = (fill_color1 & 1) ? 8 : 1; |
| 35 | 34 | fill_cvg2 = (fill_color2 & 1) ? 8 : 1; |
| 36 | 35 | |
| 37 | clipx1 = clip.xh / 4; | |
| 38 | clipx2 = clip.xl / 4; | |
| 39 | clipy1 = clip.yh / 4; | |
| 40 | clipy2 = clip.yl / 4; | |
| 41 | ||
| 42 | 36 | // clip |
| 43 | if (x1 < clipx | |
| 37 | if (x1 < clip.xh) | |
| 44 | 38 | { |
| 45 | x1 = clipx | |
| 39 | x1 = clip.xh; | |
| 46 | 40 | } |
| 47 | if (y1 < clipy | |
| 41 | if (y1 < clip.yh) | |
| 48 | 42 | { |
| 49 | y1 = clipy | |
| 43 | y1 = clip.yh; | |
| 50 | 44 | } |
| 51 | if (x2 >= clipx | |
| 45 | if (x2 >= clip.xl) | |
| 52 | 46 | { |
| 53 | x2 = clipx | |
| 47 | x2 = clip.xl - 1; | |
| 54 | 48 | } |
| 55 | if (y2 >= clipy | |
| 49 | if (y2 >= clip.yl) | |
| 56 | 50 | { |
| 57 | y2 = clipy | |
| 51 | y2 = clip.yl - 1; | |
| 58 | 52 | } |
| 59 | 53 | |
| 60 | 54 | shade_color.c = 0; // Needed by Command & Conquer menus |
| r7553 | r7554 | |
| 114 | 108 | UINT8* hb = &hidden_bits[fb_address >> 1]; |
| 115 | 109 | |
| 116 | 110 | int index, i, j; |
| 117 | int x1 = rect->xh / 4; | |
| 118 | int x2 = rect->xl / 4; | |
| 119 | int y1 = rect->yh / 4; | |
| 120 | int y2 = rect->yl / 4; | |
| 121 | int clipx1, clipx2, clipy1, clipy2; | |
| 111 | int x1 = rect->xh; | |
| 112 | int x2 = rect->xl; | |
| 113 | int y1 = rect->yh; | |
| 114 | int y2 = rect->yl; | |
| 122 | 115 | UINT16 fill_color1, fill_color2; |
| 123 | 116 | int fill_cvg1; |
| 124 | 117 | int fill_cvg2; |
| r7553 | r7554 | |
| 138 | 131 | fill_cvg1 = (fill_color1 & 1) ? 8 : 1; |
| 139 | 132 | fill_cvg2 = (fill_color2 & 1) ? 8 : 1; |
| 140 | 133 | |
| 141 | clipx1 = clip.xh / 4; | |
| 142 | clipx2 = clip.xl / 4; | |
| 143 | clipy1 = clip.yh / 4; | |
| 144 | clipy2 = clip.yl / 4; | |
| 145 | ||
| 146 | 134 | // clip |
| 147 | if (x1 < clipx | |
| 135 | if (x1 < clip.xh) | |
| 148 | 136 | { |
| 149 | x1 = clipx | |
| 137 | x1 = clip.xh; | |
| 150 | 138 | } |
| 151 | if (y1 < clipy | |
| 139 | if (y1 < clip.yh) | |
| 152 | 140 | { |
| 153 | y1 = clipy | |
| 141 | y1 = clip.yh; | |
| 154 | 142 | } |
| 155 | if (x2 >= clipx | |
| 143 | if (x2 >= clip.xl) | |
| 156 | 144 | { |
| 157 | x2 = clipx | |
| 145 | x2 = clip.xl - 1; | |
| 158 | 146 | } |
| 159 | if (y2 >= clipy | |
| 147 | if (y2 >= clip.yl) | |
| 160 | 148 | { |
| 161 | y2 = clipy | |
| 149 | y2 = clip.yl - 1; | |
| 162 | 150 | } |
| 163 | 151 | |
| 164 | 152 | shade_color.c = 0; // Needed by Command & Conquer menus |
| r7553 | r7554 | |
| 223 | 211 | UINT8* hb = &hidden_bits[fb_address >> 1]; |
| 224 | 212 | |
| 225 | 213 | int index, i, j; |
| 226 | int x1 = rect->xh / 4; | |
| 227 | int x2 = rect->xl / 4; | |
| 228 | int y1 = rect->yh / 4; | |
| 229 | int y2 = rect->yl / 4; | |
| 230 | int clipx1, clipx2, clipy1, clipy2; | |
| 214 | int x1 = rect->xh; | |
| 215 | int x2 = rect->xl; | |
| 216 | int y1 = rect->yh; | |
| 217 | int y2 = rect->yl; | |
| 231 | 218 | UINT16 fill_color1, fill_color2; |
| 232 | 219 | int fill_cvg1; |
| 233 | 220 | int fill_cvg2; |
| r7553 | r7554 | |
| 247 | 234 | fill_cvg1 = (fill_color1 & 1) ? 8 : 1; |
| 248 | 235 | fill_cvg2 = (fill_color2 & 1) ? 8 : 1; |
| 249 | 236 | |
| 250 | clipx1 = clip.xh / 4; | |
| 251 | clipx2 = clip.xl / 4; | |
| 252 | clipy1 = clip.yh / 4; | |
| 253 | clipy2 = clip.yl / 4; | |
| 254 | ||
| 255 | 237 | // clip |
| 256 | if (x1 < clipx | |
| 238 | if (x1 < clip.xh) | |
| 257 | 239 | { |
| 258 | x1 = clipx | |
| 240 | x1 = clip.xh; | |
| 259 | 241 | } |
| 260 | if (y1 < clipy | |
| 242 | if (y1 < clip.yh) | |
| 261 | 243 | { |
| 262 | y1 = clipy | |
| 244 | y1 = clip.yh; | |
| 263 | 245 | } |
| 264 | if (x2 >= clipx | |
| 246 | if (x2 >= clip.xl) | |
| 265 | 247 | { |
| 266 | x2 = clipx | |
| 248 | x2 = clip.xl - 1; | |
| 267 | 249 | } |
| 268 | if (y2 >= clipy | |
| 250 | if (y2 >= clip.yl) | |
| 269 | 251 | { |
| 270 | y2 = clipy | |
| 252 | y2 = clip.yl - 1; | |
| 271 | 253 | } |
| 272 | 254 | |
| 273 | 255 | shade_color.c = 0; // Needed by Command & Conquer menus |
| r7553 | r7554 | |
|---|---|---|
| 5365 | 5365 | h_count = video_screen_get_hpos(space->machine->primary_screen) & 0x3ff; |
| 5366 | 5366 | v_count = video_screen_get_vpos(space->machine->primary_screen) & (STV_VDP2_LSMD == 3 ? 0x7ff : 0x3ff); |
| 5367 | 5367 | stv_vdp2_regs[offset] = (h_count<<16)|(v_count); |
| 5368 | if(LOG_VDP2) logerror("CPU %s PC(%08x) = VDP2: H/V counter read : %08x\n", space->cpu->tag | |
| 5368 | if(LOG_VDP2) logerror("CPU %s PC(%08x) = VDP2: H/V counter read : %08x\n", space->cpu->tag | |
| 5369 | 5369 | break; |
| 5370 | 5370 | } |
| 5371 | 5371 | } |
| r7553 | r7554 | |
|---|---|---|
| 1 | 1 | INLINE UINT32 FETCH_TEXEL_RGBA4_TLUT_EN0(UINT32 s, UINT32 t) |
| 2 | 2 | { |
| 3 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + ((s) / 2)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0)) & 0x7ff; | |
| 4 | UINT32 p = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 3 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + (s / 2)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT)) & 0x7ff; | |
| 4 | UINT32 p = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 5 | 5 | return rgb16_to_32_lut[tlut[((cached_tpal | p) ^ WORD_ADDR_XOR) << 2]]; |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | INLINE UINT32 FETCH_TEXEL_RGBA4_TLUT_EN1(UINT32 s, UINT32 t) |
| 9 | 9 | { |
| 10 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + ((s) / 2)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0)) & 0x7ff; | |
| 11 | UINT32 p = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 10 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + (s / 2)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT)) & 0x7ff; | |
| 11 | UINT32 p = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 12 | 12 | return ia8_to_32_lut[tlut[((cached_tpal | p) ^ WORD_ADDR_XOR) << 2]]; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | INLINE UINT32 FETCH_TEXEL_RGBA4_TLUT_NEN(UINT32 s, UINT32 t) |
| 16 | 16 | { |
| 17 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + ((s) / 2)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0)) & 0x7ff; | |
| 18 | UINT32 p = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 17 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + (s / 2)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT)) & 0x7ff; | |
| 18 | UINT32 p = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 19 | 19 | |
| 20 | 20 | return (cached_tpal | p) * 0x01010101; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | INLINE UINT32 FETCH_TEXEL_RGBA8_TLUT_EN0(UINT32 s, UINT32 t) |
| 24 | 24 | { |
| 25 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 25 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 26 | 26 | return rgb16_to_32_lut[tlut[(TMEM[taddr ^ BYTE_ADDR_XOR] ^ WORD_ADDR_XOR) << 2]]; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | INLINE UINT32 FETCH_TEXEL_RGBA8_TLUT_EN1(UINT32 s, UINT32 t) |
| 30 | 30 | { |
| 31 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 31 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 32 | 32 | return ia8_to_32_lut[tlut[(TMEM[taddr ^ BYTE_ADDR_XOR] ^ WORD_ADDR_XOR) << 2]]; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | INLINE UINT32 FETCH_TEXEL_RGBA8_TLUT_NEN(UINT32 s, UINT32 t) |
| 36 | 36 | { |
| 37 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 37 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 38 | 38 | return TMEM[taddr ^ BYTE_ADDR_XOR] * 0x01010101; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | INLINE UINT32 FETCH_TEXEL_RGBA16_TLUT_EN0(UINT32 s, UINT32 t) |
| 42 | 42 | { |
| 43 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 43 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 44 | 44 | return rgb16_to_32_lut[tlut[(TMEM16[(taddr & 0x7ff) ^ WORD_ADDR_XOR] >> 8) << 2]]; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | INLINE UINT32 FETCH_TEXEL_RGBA16_TLUT_EN1(UINT32 s, UINT32 t) |
| 48 | 48 | { |
| 49 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 49 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 50 | 50 | return ia8_to_32_lut[tlut[(TMEM16[(taddr & 0x7ff) ^ WORD_ADDR_XOR] >> 8) << 2]]; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | INLINE UINT32 FETCH_TEXEL_RGBA16_TLUT_NEN(UINT32 s, UINT32 t) |
| 54 | 54 | { |
| 55 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 55 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 56 | 56 | return rgb16_to_32_lut[TMEM16[(taddr & 0x7ff) ^ WORD_ADDR_XOR]]; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | INLINE UINT32 FETCH_TEXEL_RGBA32_TLUT_EN0(UINT32 s, UINT32 t) |
| 60 | 60 | { |
| 61 | 61 | int xorval = (fb_size == PIXEL_SIZE_16BIT) ? XOR_SWAP_WORD : XOR_SWAP_DWORD; // Conker's Bad Fur Day, Jet Force Gemini, Super Smash Bros., Mickey's Speedway USA, Ogre Battle, Wave Race, Gex 3, South Park Rally |
| 62 | UINT32 taddr = (((cached_tbase >> 2) + ((t) * (cached_twidth >> 1)) + | |
| 62 | UINT32 taddr = (((cached_tbase >> 2) + ((t) * (cached_twidth >> 1)) + | |
| 63 | 63 | |
| 64 | 64 | return rgb16_to_32_lut[tlut[(TMEM32[taddr] >> 24) << 2]]; |
| 65 | 65 | } |
| r7553 | r7554 | |
| 67 | 67 | INLINE UINT32 FETCH_TEXEL_RGBA32_TLUT_EN1(UINT32 s, UINT32 t) |
| 68 | 68 | { |
| 69 | 69 | int xorval = (fb_size == PIXEL_SIZE_16BIT) ? XOR_SWAP_WORD : XOR_SWAP_DWORD; // Conker's Bad Fur Day, Jet Force Gemini, Super Smash Bros., Mickey's Speedway USA, Ogre Battle, Wave Race, Gex 3, South Park Rally |
| 70 | UINT32 taddr = (((cached_tbase >> 2) + ((t) * (cached_twidth >> 1)) + | |
| 70 | UINT32 taddr = (((cached_tbase >> 2) + ((t) * (cached_twidth >> 1)) + | |
| 71 | 71 | |
| 72 | 72 | return ia8_to_32_lut[tlut[(TMEM32[taddr] >> 24) << 2]]; |
| 73 | 73 | } |
| r7553 | r7554 | |
| 75 | 75 | INLINE UINT32 FETCH_TEXEL_RGBA32_TLUT_NEN(UINT32 s, UINT32 t) |
| 76 | 76 | { |
| 77 | 77 | int xorval = (fb_size == PIXEL_SIZE_16BIT) ? XOR_SWAP_WORD : XOR_SWAP_DWORD; // Conker's Bad Fur Day, Jet Force Gemini, Super Smash Bros., Mickey's Speedway USA, Ogre Battle, Wave Race, Gex 3, South Park Rally |
| 78 | UINT32 taddr = (((cached_tbase >> 2) + ((t) * (cached_twidth >> 1)) + | |
| 78 | UINT32 taddr = (((cached_tbase >> 2) + ((t) * (cached_twidth >> 1)) + | |
| 79 | 79 | |
| 80 | 80 | return TMEM32[taddr]; |
| 81 | 81 | } |
| r7553 | r7554 | |
| 85 | 85 | INT32 newr = 0; |
| 86 | 86 | INT32 newg = 0; |
| 87 | 87 | INT32 newb = 0; |
| 88 | UINT32 taddr = ((cached_tbase >> 1) + ((t) * (cached_twidth)) + | |
| 88 | UINT32 taddr = ((cached_tbase >> 1) + ((t) * (cached_twidth)) + | |
| 89 | 89 | UINT32 c1, c2; |
| 90 | 90 | INT32 y; |
| 91 | 91 | INT32 u, v; |
| r7553 | r7554 | |
| 113 | 113 | newg = y + ((k1 * u) >> 8) + ((k2 * v) >> 8); |
| 114 | 114 | newb = y + ((k3 * u) >> 8); |
| 115 | 115 | } |
| 116 | ||
| 116 | 117 | return (((newr < 0) ? 0 : ((newr > 0xff) ? 0xff : newr)) << 24) | |
| 117 | 118 | (((newg < 0) ? 0 : ((newg > 0xff) ? 0xff : newg)) << 16) | |
| 118 | 119 | (((newb < 0) ? 0 : ((newb > 0xff) ? 0xff : newb)) << 8) | |
| r7553 | r7554 | |
| 121 | 122 | |
| 122 | 123 | INLINE UINT32 FETCH_TEXEL_CI4_TLUT_EN0(UINT32 s, UINT32 t) |
| 123 | 124 | { |
| 124 | UINT32 b = TMEM[(((cached_tbase + ((t) * cached_twidth) + ((s) / 2)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0)) & 0x7ff) ^ BYTE_ADDR_XOR]; | |
| 125 | return rgb16_to_32_lut[tlut[(cached_tpal | (((s) & 1) ? (b & 0xf) : (b >> 4))) << 2]]; | |
| 125 | UINT32 b = TMEM[(((cached_tbase + ((t) * cached_twidth) + (s / 2)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT)) & 0x7ff) ^ BYTE_ADDR_XOR]; | |
| 126 | return rgb16_to_32_lut[tlut[(cached_tpal | ((b >> ((s & 1) << 2)) & 0xf)) << 2]]; | |
| 126 | 127 | } |
| 127 | 128 | |
| 128 | 129 | INLINE UINT32 FETCH_TEXEL_CI4_TLUT_EN1(UINT32 s, UINT32 t) |
| 129 | 130 | { |
| 130 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + ((s) / 2)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0)) & 0x7ff; | |
| 131 | UINT32 p = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 131 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + (s / 2)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT)) & 0x7ff; | |
| 132 | UINT32 p = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 132 | 133 | return ia8_to_32_lut[tlut[(cached_tpal | p) << 2]]; |
| 133 | 134 | } |
| 134 | 135 | |
| 135 | 136 | INLINE UINT32 FETCH_TEXEL_CI4_TLUT_NEN(UINT32 s, UINT32 t) |
| 136 | 137 | { |
| 137 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + ((s) / 2)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0)) & 0x7ff; | |
| 138 | UINT32 p = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 138 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + (s / 2)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT)) & 0x7ff; | |
| 139 | UINT32 p = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 139 | 140 | |
| 140 | 141 | return (cached_tpal | p) * 0x01010101; |
| 141 | 142 | } |
| 142 | 143 | |
| 143 | 144 | INLINE UINT32 FETCH_TEXEL_CI8_TLUT_EN0(UINT32 s, UINT32 t) |
| 144 | 145 | { |
| 145 | return rgb16_to_32_lut[tlut[TMEM[(((cached_tbase + ((t) * cached_twidth) + | |
| 146 | return rgb16_to_32_lut[tlut[TMEM[(((cached_tbase + ((t) * cached_twidth) + | |
| 146 | 147 | } |
| 147 | 148 | |
| 148 | 149 | INLINE UINT32 FETCH_TEXEL_CI8_TLUT_EN1(UINT32 s, UINT32 t) |
| 149 | 150 | { |
| 150 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 151 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 151 | 152 | return ia8_to_32_lut[tlut[TMEM[taddr ^ BYTE_ADDR_XOR] << 2]]; |
| 152 | 153 | } |
| 153 | 154 | |
| 154 | 155 | INLINE UINT32 FETCH_TEXEL_CI8_TLUT_NEN(UINT32 s, UINT32 t) |
| 155 | 156 | { |
| 156 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 157 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 157 | 158 | return TMEM[taddr ^ BYTE_ADDR_XOR] * 0x01010101; |
| 158 | 159 | } |
| 159 | 160 | |
| 160 | 161 | INLINE UINT32 FETCH_TEXEL_CI16_TLUT_EN0(UINT32 s, UINT32 t) |
| 161 | 162 | { // 16-bit CI is a "valid" mode; some games use it, it behaves the same as 16-bit RGBA |
| 162 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 163 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 163 | 164 | return rgb16_to_32_lut[tlut[(TMEM16[(taddr & 0x7ff) ^ WORD_ADDR_XOR] >> 8) << 2]]; |
| 164 | 165 | } |
| 165 | 166 | |
| 166 | 167 | INLINE UINT32 FETCH_TEXEL_CI16_TLUT_EN1(UINT32 s, UINT32 t) |
| 167 | 168 | { // 16-bit CI is a "valid" mode; some games use it, it behaves the same as 16-bit RGBA |
| 168 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 169 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 169 | 170 | return ia8_to_32_lut[tlut[(TMEM16[(taddr & 0x7ff) ^ WORD_ADDR_XOR] >> 8) << 2]]; // Beetle Adventure Racing, Mount Mayhem |
| 170 | 171 | } |
| 171 | 172 | |
| 172 | 173 | INLINE UINT32 FETCH_TEXEL_CI16_TLUT_NEN(UINT32 s, UINT32 t) |
| 173 | 174 | { // 16-bit CI is a "valid" mode; some games use it, it behaves the same as 16-bit RGBA |
| 174 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 175 | UINT32 taddr = ((cached_tbase_s1) + ((t) * (cached_twidth_s1)) + | |
| 175 | 176 | return rgb16_to_32_lut[TMEM16[(taddr & 0x7ff) ^ WORD_ADDR_XOR]]; // PGA European Tour (U) |
| 176 | 177 | } |
| 177 | 178 | |
| 178 | 179 | INLINE UINT32 FETCH_TEXEL_IA4_TLUT_EN0(UINT32 s, UINT32 t) |
| 179 | 180 | { |
| 180 | UINT32 taddr = (cached_tbase + ((t) * cached_twidth) + (s >> 1)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0); | |
| 181 | UINT32 p = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 181 | UINT32 taddr = (cached_tbase + ((t) * cached_twidth) + (s >> 1)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT); | |
| 182 | UINT32 p = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 182 | 183 | return rgb16_to_32_lut[tlut[(cached_tpal | p) << 2]]; |
| 183 | 184 | } |
| 184 | 185 | |
| 185 | 186 | INLINE UINT32 FETCH_TEXEL_IA4_TLUT_EN1(UINT32 s, UINT32 t) |
| 186 | 187 | { |
| 187 | UINT32 taddr = (cached_tbase + ((t) * cached_twidth) + (s >> 1)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0); | |
| 188 | UINT32 p = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 188 | UINT32 taddr = (cached_tbase + ((t) * cached_twidth) + (s >> 1)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT); | |
| 189 | UINT32 p = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 189 | 190 | return ia8_to_32_lut[tlut[(cached_tpal | p) << 2]]; |
| 190 | 191 | } |
| 191 | 192 | |
| 192 | 193 | INLINE UINT32 FETCH_TEXEL_IA4_TLUT_NEN(UINT32 s, UINT32 t) |
| 193 | 194 | { |
| 194 | UINT32 taddr = (cached_tbase + ((t) * cached_twidth) + (s >> 1)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0); | |
| 195 | UINT32 p = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 195 | UINT32 taddr = (cached_tbase + ((t) * cached_twidth) + (s >> 1)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT); | |
| 196 | UINT32 p = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 196 | 197 | UINT32 i = ((p & 0xe) << 4) | ((p & 0xe) << 1) | (p & 0xe >> 2); |
| 197 | 198 | |
| 198 | return (i * 0x01010100) | ((p & 0x1) | |
| 199 | return (i * 0x01010100) | ((p & 0x1) & 0xff | |
| 199 | 200 | } |
| 200 | 201 | |
| 201 | 202 | INLINE UINT32 FETCH_TEXEL_IA8_TLUT_EN0(UINT32 s, UINT32 t) |
| 202 | 203 | { |
| 203 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 204 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 204 | 205 | return rgb16_to_32_lut[tlut[TMEM[taddr ^ BYTE_ADDR_XOR] << 2]]; |
| 205 | 206 | } |
| 206 | 207 | |
| 207 | 208 | INLINE UINT32 FETCH_TEXEL_IA8_TLUT_EN1(UINT32 s, UINT32 t) |
| 208 | 209 | { |
| 209 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 210 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 210 | 211 | return ia8_to_32_lut[tlut[TMEM[taddr ^ BYTE_ADDR_XOR] << 2]]; |
| 211 | 212 | } |
| 212 | 213 | |
| 213 | 214 | INLINE UINT32 FETCH_TEXEL_IA8_TLUT_NEN(UINT32 s, UINT32 t) |
| 214 | 215 | { |
| 215 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 216 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 216 | 217 | UINT32 p = TMEM[taddr ^ BYTE_ADDR_XOR]; |
| 217 | 218 | UINT32 i = (p >> 4) | (p & 0xf0); |
| 218 | 219 | |
| r7553 | r7554 | |
| 221 | 222 | |
| 222 | 223 | INLINE UINT32 FETCH_TEXEL_IA16_TLUT_EN0(UINT32 s, UINT32 t) |
| 223 | 224 | { |
| 224 | UINT32 taddr = ((cached_tbase >> 1) + ((t) * (cached_twidth >> 1)) + | |
| 225 | UINT32 taddr = ((cached_tbase >> 1) + ((t) * (cached_twidth >> 1)) + | |
| 225 | 226 | return rgb16_to_32_lut[tlut[(TMEM16[taddr ^ WORD_ADDR_XOR] >> 8) << 2]]; |
| 226 | 227 | } |
| 227 | 228 | |
| 228 | 229 | INLINE UINT32 FETCH_TEXEL_IA16_TLUT_EN1(UINT32 s, UINT32 t) |
| 229 | 230 | { |
| 230 | UINT32 taddr = ((cached_tbase >> 1) + ((t) * (cached_twidth >> 1)) + | |
| 231 | UINT32 taddr = ((cached_tbase >> 1) + ((t) * (cached_twidth >> 1)) + | |
| 231 | 232 | return ia8_to_32_lut[tlut[(TMEM16[taddr ^ WORD_ADDR_XOR] >> 8) << 2]]; |
| 232 | 233 | } |
| 233 | 234 | |
| 234 | 235 | INLINE UINT32 FETCH_TEXEL_IA16_TLUT_NEN(UINT32 s, UINT32 t) |
| 235 | 236 | { |
| 236 | UINT32 taddr = ((cached_tbase >> 1) + ((t) * (cached_twidth >> 1)) + | |
| 237 | UINT32 taddr = ((cached_tbase >> 1) + ((t) * (cached_twidth >> 1)) + | |
| 237 | 238 | UINT32 c = TMEM16[taddr ^ WORD_ADDR_XOR]; |
| 238 | 239 | |
| 239 | 240 | return ((c >> 8) * 0x01010100) | (c & 0xff); |
| r7553 | r7554 | |
| 241 | 242 | |
| 242 | 243 | INLINE UINT32 FETCH_TEXEL_I4_TLUT_EN0(UINT32 s, UINT32 t) |
| 243 | 244 | { |
| 244 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + ((s) / 2)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0)) & 0xfff; | |
| 245 | UINT32 c = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 245 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + (s / 2)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT)) & 0xfff; | |
| 246 | UINT32 c = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 246 | 247 | c |= (c << 4); |
| 247 | 248 | |
| 248 | 249 | return rgb16_to_32_lut[tlut[(cached_tpal | c) << 2]]; |
| r7553 | r7554 | |
| 250 | 251 | |
| 251 | 252 | INLINE UINT32 FETCH_TEXEL_I4_TLUT_EN1(UINT32 s, UINT32 t) |
| 252 | 253 | { |
| 253 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + ((s) / 2)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0)) & 0xfff; | |
| 254 | UINT32 c = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 254 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + (s / 2)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT)) & 0xfff; | |
| 255 | UINT32 c = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 255 | 256 | c |= (c << 4); |
| 256 | 257 | |
| 257 | 258 | return ia8_to_32_lut[tlut[(cached_tpal | c) << 2]]; |
| r7553 | r7554 | |
| 259 | 260 | |
| 260 | 261 | INLINE UINT32 FETCH_TEXEL_I4_TLUT_NEN(UINT32 s, UINT32 t) |
| 261 | 262 | { |
| 262 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + ((s) / 2)) ^ ((t & 1) ? XOR_SWAP_BYTE : 0)) & 0xfff; | |
| 263 | UINT32 c = ((s) & 1) ? (TMEM[taddr ^ BYTE_ADDR_XOR] & 0xf) : (TMEM[taddr ^ BYTE_ADDR_XOR] >> 4); | |
| 263 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + (s / 2)) ^ ((t & 1) << XOR_SWAP_BYTE_SHIFT)) & 0xfff; | |
| 264 | UINT32 c = (TMEM[taddr ^ BYTE_ADDR_XOR] >> ((s & 1) << 2)) & 0xf; | |
| 264 | 265 | c |= (c << 4); |
| 265 | 266 | |
| 266 | 267 | return (c * 0x01010101); |
| r7553 | r7554 | |
| 268 | 269 | |
| 269 | 270 | INLINE UINT32 FETCH_TEXEL_I8_TLUT_EN0(UINT32 s, UINT32 t) |
| 270 | 271 | { |
| 271 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 272 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 272 | 273 | return rgb16_to_32_lut[tlut[TMEM[taddr ^ BYTE_ADDR_XOR] << 2]]; |
| 273 | 274 | } |
| 274 | 275 | |
| 275 | 276 | INLINE UINT32 FETCH_TEXEL_I8_TLUT_EN1(UINT32 s, UINT32 t) |
| 276 | 277 | { |
| 277 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 278 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 278 | 279 | return ia8_to_32_lut[tlut[TMEM[taddr ^ BYTE_ADDR_XOR] << 2]]; |
| 279 | 280 | } |
| 280 | 281 | |
| 281 | 282 | INLINE UINT32 FETCH_TEXEL_I8_TLUT_NEN(UINT32 s, UINT32 t) |
| 282 | 283 | { |
| 283 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 284 | UINT32 taddr = ((cached_tbase + ((t) * cached_twidth) + | |
| 284 | 285 | return TMEM[taddr ^ BYTE_ADDR_XOR] * 0x01010101; |
| 285 | 286 | } |
| 286 | 287 |
| r7553 | r7554 | |
|---|---|---|
| 1 | #define addleft(x) addleftcvg(x,k) | |
| 2 | #define addright(x) addrightcvg(x,k) | |
| 3 | ||
| 4 | #define setvalues() \ | |
| 5 | { \ | |
| 6 | addvalues(); \ | |
| 7 | adjust_attr(); \ | |
| 8 | } | |
| 9 | ||
| 1 | 10 | static void triangle_ns_nt_nz(UINT32 w1, UINT32 w2) |
| 2 | 11 | { |
| 3 | int j; | |
| 4 | int xleft, xright, xleft_inc, xright_inc; | |
| 5 | int xstart, xend; | |
| 6 | int flip = (w1 & 0x800000) ? 1 : 0; | |
| 12 | int flip = (w1 & 0x800000) ? 1 : 0; | |
| 13 | int sign = (w1 & 0x800000) ? -1 : 1; | |
| 14 | int inv_sign = (w1 & 0x800000) ? 1 : -1; | |
| 7 | 15 | |
| 8 | INT32 yl, ym, yh; | |
| 9 | INT32 xl, xm, xh; | |
| 10 | INT32 dxldy, dxhdy, dxmdy; | |
| 11 | UINT32 w3, w4, w5, w6, w7, w8; | |
| 12 | ||
| 13 | int k = 0; | |
| 14 | ||
| 15 | INT32 limcvg = 0; | |
| 16 | INT32 startcvg = 0; | |
| 17 | ||
| 18 | int sign_dxldy = 0; | |
| 19 | int sign_dxmdy = 0; | |
| 20 | int samesign = 0; | |
| 21 | ||
| 22 | int sign_dxhdy = 0; | |
| 23 | ||
| 24 | 16 | int xfrac = 0; |
| 25 | 17 | |
| 26 | int m_inc; | |
| 27 | UINT32 min=0, max=3; | |
| 28 | INT32 maxxmx = 0, minxmx = 0, maxxhx = 0, minxhx = 0; | |
| 18 | INT32 maxxmx = 0; | |
| 19 | INT32 minxmx = 0; | |
| 20 | INT32 maxxhx = 0; | |
| 21 | INT32 minxhx = 0; | |
| 29 | 22 | |
| 30 | int spix = 0; // Current subpixel | |
| 31 | int ycur; | |
| 32 | int ylfar; | |
| 33 | int ldflag; | |
| 34 | int yhpix; | |
| 35 | int ympix; | |
| 36 | int ylpix; | |
| 23 | UINT32 w3 = rdp_cmd_data[rdp_cmd_cur+2]; | |
| 24 | UINT32 w4 = rdp_cmd_data[rdp_cmd_cur+3]; | |
| 25 | UINT32 w5 = rdp_cmd_data[rdp_cmd_cur+4]; | |
| 26 | UINT32 w6 = rdp_cmd_data[rdp_cmd_cur+5]; | |
| 27 | UINT32 w7 = rdp_cmd_data[rdp_cmd_cur+6]; | |
| 28 | UINT32 w8 = rdp_cmd_data[rdp_cmd_cur+7]; | |
| 37 | 29 | |
| 38 | #define addleft(x) addleftcvg(x,k) | |
| 39 | #define addright(x) addrightcvg(x,k) | |
| 40 | ||
| 41 | w3 = rdp_cmd_data[rdp_cmd_cur+2]; | |
| 42 | w4 = rdp_cmd_data[rdp_cmd_cur+3]; | |
| 43 | w5 = rdp_cmd_data[rdp_cmd_cur+4]; | |
| 44 | w6 = rdp_cmd_data[rdp_cmd_cur+5]; | |
| 45 | w7 = rdp_cmd_data[rdp_cmd_cur+6]; | |
| 46 | w8 = rdp_cmd_data[rdp_cmd_cur+7]; | |
| 47 | ||
| 48 | yl = (w1 & 0x3fff); | |
| 49 | ym = ((w2 >> 16) & 0x3fff); | |
| 50 | yh = ((w2 >> 0) & 0x3fff); | |
| 51 | xl = (INT32)(w3 & 0x3fffffff); | |
| 52 | xh = (INT32)(w5 & 0x3fffffff); | |
| 53 | xm = (INT32)(w7 & 0x3fffffff); | |
| 30 | INT32 yl = (w1 & 0x3fff); | |
| 31 | INT32 ym = ((w2 >> 16) & 0x3fff); | |
| 32 | INT32 yh = ((w2 >> 0) & 0x3fff); | |
| 33 | INT32 xl = (INT32)(w3 & 0x3fffffff); | |
| 34 | INT32 xh = (INT32)(w5 & 0x3fffffff); | |
| 35 | INT32 xm = (INT32)(w7 & 0x3fffffff); | |
| 54 | 36 | // Inverse slopes in 16.16 format |
| 55 | dxldy = (INT32)(w4); | |
| 56 | dxhdy = (INT32)(w6); | |
| 57 | dxmdy = (INT32)(w8); | |
| 37 | INT32 dxldy = (INT32)(w4); | |
| 38 | INT32 dxhdy = (INT32)(w6); | |
| 39 | INT32 dxmdy = (INT32)(w8); | |
| 58 | 40 | |
| 59 | 41 | max_level = ((w1 >> 19) & 7); |
| 60 | 42 | |
| r7553 | r7554 | |
| 68 | 50 | |
| 69 | 51 | span[0].dymax = 0; |
| 70 | 52 | |
| 71 | xleft_inc = dxmdy >> 2; | |
| 72 | xright_inc = dxhdy >> 2; | |
| 53 | int xleft_inc = dxmdy >> 2; | |
| 54 | int xright_inc = dxhdy >> 2; | |
| 73 | 55 | |
| 74 | xright = xh; | |
| 75 | xleft = xm; | |
| 56 | int xright = xh; | |
| 57 | int xleft = xm; | |
| 76 | 58 | |
| 77 | limcvg = ((yl>>2) <= 1023) ? (yl>>2) : 1023; // Needed by 40 Winks | |
| 59 | INT32 limcvg = ((yl>>2) <= 1023) ? (yl>>2) : 1023; // Needed by 40 Winks | |
| 78 | 60 | if (limcvg < 0) |
| 79 | 61 | { |
| 80 | 62 | limcvg = 0; |
| 81 | 63 | } |
| 82 | 64 | |
| 83 | startcvg = ((yh>>2)>=0) ? (yh>>2) : 0; | |
| 84 | for (k = startcvg; k <= limcvg; k++) | |
| 65 | INT32 startcvg = ((yh>>2)>=0) ? (yh>>2) : 0; | |
| 66 | for (int k = startcvg; k <= limcvg; k++) | |
| 85 | 67 | { |
| 86 | 68 | memset((void*)&span[k].cvg[0],0,640); |
| 87 | 69 | } |
| 88 | 70 | |
| 89 | sign_dxldy = (dxldy & 0x80000000) ? 1 : 0; | |
| 90 | sign_dxmdy = (dxmdy & 0x80000000) ? 1 : 0; | |
| 91 | samesign = !(sign_dxldy ^ sign_dxmdy); | |
| 71 | int sign_dxhdy = (dxhdy & 0x80000000) ? 1 : 0; | |
| 92 | 72 | |
| 93 | sign_dxhdy = (dxhdy & 0x80000000) ? 1 : 0; | |
| 73 | int ycur = yh & ~3; | |
| 74 | int ylfar = yl | 3; | |
| 75 | int ldflag = (sign_dxhdy ^ flip) ? 0 : 3; | |
| 76 | int yhpix = yh >> 2; | |
| 77 | int ylpix = yl >> 2; | |
| 94 | 78 | |
| 95 | m_inc = flip ? 1 : -1; | |
| 79 | if(ylfar >= 0x1000) | |
| 80 | { | |
| 81 | ylfar = 0x0fff; | |
| 82 | } | |
| 96 | 83 | |
| 97 | ycur = yh & ~3; | |
| 98 | ylfar = yl | 3; | |
| 99 | ldflag = (sign_dxhdy ^ flip) ? 0 : 3; | |
| 100 | yhpix = yh >> 2; | |
| 101 | ympix = ym >> 2; | |
| 102 | ylpix = yl >> 2; | |
| 103 | ||
| 104 | for (k = ycur; k <= ylfar; k++) | |
| 84 | for (int k = ycur; k <= ylfar; k++) | |
| 105 | 85 | { |
| 106 | 86 | if (k == ym) |
| 107 | 87 | { |
| r7553 | r7554 | |
| 109 | 89 | xleft_inc = dxldy >> 2; |
| 110 | 90 | } |
| 111 | 91 | |
| 112 | xstart = xleft >> 16; | |
| 113 | xend = xright >> 16; | |
| 114 | j = k >> 2; | |
| 115 | spix = k & 3; | |
| 92 | int xstart = xleft >> 16; | |
| 93 | int xend = xright >> 16; | |
| 94 | int j = k >> 2; | |
| 95 | int spix = k & 3; | |
| 116 | 96 | |
| 117 | if (k >= 0 && k < 0x1000) | |
| 97 | UINT32 min = 0; | |
| 98 | UINT32 max = 3; | |
| 99 | if (j == yhpix) | |
| 118 | 100 | { |
| 119 | int m = 0; | |
| 120 | int n = 0; | |
| 121 | int length = 0; | |
| 122 | min = 0; max = 3; | |
| 123 | if (j == yhpix) | |
| 101 | min = yh & 3; | |
| 102 | } | |
| 103 | if (j == ylpix) | |
| 104 | { | |
| 105 | max = yl & 3; | |
| 106 | } | |
| 107 | if (spix >= min && spix <= max) | |
| 108 | { | |
| 109 | if (spix == min) | |
| 124 | 110 | { |
| 125 | min = yh & 3; | |
| 111 | minxmx = maxxmx = xstart; | |
| 112 | minxhx = maxxhx = xend; | |
| 126 | 113 | } |
| 127 | | |
| 114 | e | |
| 128 | 115 | { |
| 129 | max = yl & 3; | |
| 116 | minxmx = (xstart < minxmx) ? xstart : minxmx; | |
| 117 | maxxmx = (xstart > maxxmx) ? xstart : maxxmx; | |
| 118 | minxhx = (xend < minxhx) ? xend : minxhx; | |
| 119 | maxxhx = (xend > maxxhx) ? xend : maxxhx; | |
| 130 | 120 | } |
| 131 | if (spix >= min && spix <= max) | |
| 121 | } | |
| 122 | ||
| 123 | if (spix == max) | |
| 124 | { | |
| 125 | if (flip) | |
| 132 | 126 | { |
| 133 | if (spix == min) | |
| 134 | { | |
| 135 | minxmx = maxxmx = xstart; | |
| 136 | minxhx = maxxhx = xend; | |
| 137 | } | |
| 138 | else | |
| 139 | { | |
| 140 | minxmx = (xstart < minxmx) ? xstart : minxmx; | |
| 141 | maxxmx = (xstart > maxxmx) ? xstart : maxxmx; | |
| 142 | minxhx = (xend < minxhx) ? xend : minxhx; | |
| 143 | maxxhx = (xend > maxxhx) ? xend : maxxhx; | |
| 144 | } | |
| 127 | span[j].lx = maxxmx; | |
| 128 | span[j].rx = minxhx; | |
| 145 | 129 | } |
| 130 | else | |
| 131 | { | |
| 132 | span[j].lx = minxmx; | |
| 133 | span[j].rx = maxxhx; | |
| 134 | } | |
| 135 | } | |
| 146 | 136 | |
| 147 | if (spix == max) | |
| 137 | int length = (xend - xstart) * sign; | |
| 138 | ||
| 139 | if (spix == ldflag) | |
| 140 | { | |
| 141 | xfrac = ((xright >> 8) & 0xff); | |
| 142 | } | |
| 143 | ||
| 144 | int m = flip ? (xend+1) : (xend-1); | |
| 145 | ||
| 146 | if (k >= yh && length >= 0 && k <= yl) | |
| 147 | { | |
| 148 | if (xstart>=0 && xstart <1024) | |
| 148 | 149 | { |
| 149 | if (flip) | |
| 150 | if (!flip) | |
| 150 | 151 | { |
| 151 | span[j].lx = maxxmx; | |
| 152 | span[j].rx = minxhx; | |
| 152 | span[j].cvg[xstart] += addleft(xleft); | |
| 153 | 153 | } |
| 154 | 154 | else |
| 155 | 155 | { |
| 156 | span[j].lx = minxmx; | |
| 157 | span[j].rx = maxxhx; | |
| 156 | span[j].cvg[xstart] += addright(xleft); | |
| 158 | 157 | } |
| 159 | 158 | } |
| 160 | ||
| 161 | length = flip ? (xstart - xend) : (xend - xstart); | |
| 162 | ||
| 163 | if (spix == ldflag) | |
| 159 | if (xend>=0 && xend<1024) | |
| 164 | 160 | { |
| 165 | xfrac = ((xright >> 8) & 0xff); | |
| 166 | } | |
| 167 | ||
| 168 | m = flip ? (xend+1) : (xend-1); | |
| 169 | ||
| 170 | if (k >= yh && length >= 0 && k <= yl) | |
| 171 | { | |
| 172 | if (xstart>=0 && xstart <1024) | |
| 161 | if (xstart != xend) | |
| 173 | 162 | { |
| 174 | 163 | if (!flip) |
| 175 | 164 | { |
| 176 | span[j].cvg[x | |
| 165 | span[j].cvg[xend | |
| 177 | 166 | } |
| 178 | 167 | else |
| 179 | 168 | { |
| 180 | span[j].cvg[x | |
| 169 | span[j].cvg[xend | |
| 181 | 170 | } |
| 182 | 171 | } |
| 183 | | |
| 172 | | |
| 184 | 173 | { |
| 185 | if ( | |
| 174 | if ( | |
| 186 | 175 | { |
| 187 | if (!flip) | |
| 188 | { | |
| 189 | span[j].cvg[xend] += addright(xright); | |
| 190 | } | |
| 191 | else | |
| 192 | { | |
| 193 | span[j].cvg[xend] += addleft(xright); | |
| 194 | } | |
| 176 | span[j].cvg[xend] -= (2 - addright(xright)); | |
| 195 | 177 | } |
| 196 | 178 | else |
| 197 | 179 | { |
| 198 | if (!flip) | |
| 199 | { | |
| 200 | span[j].cvg[xend] -= (2 - addright(xright)); | |
| 201 | } | |
| 202 | else | |
| 203 | { | |
| 204 | span[j].cvg[xend] -= (2 - addleft(xright)); | |
| 205 | } | |
| 206 | if (span[j].cvg[xend] > 200) | |
| 207 | { | |
| 208 | span[j].cvg[xend] = 0; | |
| 209 | } | |
| 180 | span[j].cvg[xend] -= (2 - addleft(xright)); | |
| 210 | 181 | } |
| 211 | } | |
| 212 | for (n = 0; n < (length - 1); n++) | |
| 213 | { | |
| 214 | if (m>=0 && m < 640) | |
| 182 | if (span[j].cvg[xend] > 200) | |
| 215 | 183 | { |
| 216 | span[j].cvg[ | |
| 184 | span[j].cvg[xend] | |
| 217 | 185 | } |
| 218 | ||
| 219 | m += m_inc; | |
| 220 | 186 | } |
| 221 | 187 | } |
| 188 | for (int n = 0; n < (length - 1); n++) | |
| 189 | { | |
| 190 | if (m >= 0 && m < 640) | |
| 191 | { | |
| 192 | span[j].cvg[m] += 2; | |
| 193 | } | |
| 194 | ||
| 195 | m += inv_sign; | |
| 196 | } | |
| 222 | 197 | } |
| 223 | 198 | |
| 224 | 199 | xleft += xleft_inc; |
| r7553 | r7554 | |
| 243 | 218 | |
| 244 | 219 | static void triangle_ns_nt_z(UINT32 w1, UINT32 w2) |
| 245 | 220 | { |
| 246 | int j; | |
| 247 | int xleft, xright, xleft_inc, xright_inc; | |
| 248 | int xstart, xend; | |
| 249 | int z = 0; | |
| 250 | int dzdx = 0; | |
| 251 | int dzdy = 0; | |
| 252 | int dzde = 0; | |
| 253 | int tilenum; | |
| 254 | int flip = (w1 & 0x800000) ? 1 : 0; | |
| 221 | int flip = (w1 & 0x800000) ? 1 : 0; | |
| 222 | int sign = (w1 & 0x800000) ? -1 : 1; | |
| 223 | int inv_sign = (w1 & 0x800000) ? 1 : -1; | |
| 255 | 224 | |
| 256 | INT32 yl, ym, yh; | |
| 257 | INT32 xl, xm, xh; | |
| 258 | INT32 dxldy, dxhdy, dxmdy; | |
| 259 | int dzdy_dz, dzdx_dz; | |
| 260 | UINT32 w3, w4, w5, w6, w7, w8; | |
| 261 | ||
| 262 | int k = 0; | |
| 263 | ||
| 264 | INT32 limcvg = 0; | |
| 265 | INT32 startcvg = 0; | |
| 266 | ||
| 267 | int sign_dxldy = 0; | |
| 268 | int sign_dxmdy = 0; | |
| 269 | int samesign = 0; | |
| 270 | ||
| 271 | int dzdiff = 0; | |
| 272 | int sign_dxhdy = 0; | |
| 273 | ||
| 274 | int dzdeh = 0, dzdyh = 0; | |
| 275 | int do_offset = 0; | |
| 276 | ||
| 277 | 225 | int xfrac = 0; |
| 278 | int dzeoff = 0; | |
| 279 | 226 | |
| 280 | int dzdxh = 0; | |
| 281 | ||
| 282 | int m_inc; | |
| 283 | UINT32 min=0, max=3; | |
| 284 | 227 | INT32 maxxmx = 0, minxmx = 0, maxxhx = 0, minxhx = 0; |
| 285 | 228 | |
| 286 | int spix = 0; // Current subpixel | |
| 287 | int ycur; | |
| 288 | int ylfar; | |
| 289 | int ldflag; | |
| 290 | int yhpix; | |
| 291 | int ympix; | |
| 292 | int ylpix; | |
| 293 | ||
| 294 | 229 | int zbuffer_base = rdp_cmd_cur + 8; |
| 295 | 230 | |
| 296 | w3 = rdp_cmd_data[rdp_cmd_cur+2]; | |
| 297 | w4 = rdp_cmd_data[rdp_cmd_cur+3]; | |
| 298 | w5 = rdp_cmd_data[rdp_cmd_cur+4]; | |
| 299 | w6 = rdp_cmd_data[rdp_cmd_cur+5]; | |
| 300 | w7 = rdp_cmd_data[rdp_cmd_cur+6]; | |
| 301 | w8 = rdp_cmd_data[rdp_cmd_cur+7]; | |
| 231 | UINT32 w3 = rdp_cmd_data[rdp_cmd_cur+2]; | |
| 232 | UINT32 w4 = rdp_cmd_data[rdp_cmd_cur+3]; | |
| 233 | UINT32 w5 = rdp_cmd_data[rdp_cmd_cur+4]; | |
| 234 | UINT32 w6 = rdp_cmd_data[rdp_cmd_cur+5]; | |
| 235 | UINT32 w7 = rdp_cmd_data[rdp_cmd_cur+6]; | |
| 236 | UINT32 w8 = rdp_cmd_data[rdp_cmd_cur+7]; | |
| 302 | 237 | |
| 303 | yl = (w1 & 0x3fff); | |
| 304 | ym = ((w2 >> 16) & 0x3fff); | |
| 305 | yh = ((w2 >> 0) & 0x3fff); | |
| 306 | xl = (INT32)(w3 & 0x3fffffff); | |
| 307 | xh = (INT32)(w5 & 0x3fffffff); | |
| 308 | xm = (INT32)(w7 & 0x3fffffff); | |
| 238 | INT32 yl = (w1 & 0x3fff); | |
| 239 | INT32 ym = ((w2 >> 16) & 0x3fff); | |
| 240 | INT32 yh = ((w2 >> 0) & 0x3fff); | |
| 241 | INT32 xl = (INT32)(w3 & 0x3fffffff); | |
| 242 | INT32 xh = (INT32)(w5 & 0x3fffffff); | |
| 243 | INT32 xm = (INT32)(w7 & 0x3fffffff); | |
| 309 | 244 | // Inverse slopes in 16.16 format |
| 310 | dxldy = (INT32)(w4); | |
| 311 | dxhdy = (INT32)(w6); | |
| 312 | dxmdy = (INT32)(w8); | |
| 245 | INT32 dxldy = (INT32)(w4); | |
| 246 | INT32 dxhdy = (INT32)(w6); | |
| 247 | INT32 dxmdy = (INT32)(w8); | |
| 313 | 248 | |
| 314 | 249 | max_level = ((w1 >> 19) & 7); |
| 315 | tilenum = (w1 >> 16) & 0x7; | |
| 250 | int tilenum = (w1 >> 16) & 0x7; | |
| 316 | 251 | |
| 317 | 252 | if (yl & 0x2000) yl |= 0xffffc000; |
| 318 | 253 | if (ym & 0x2000) ym |= 0xffffc000; |
| r7553 | r7554 | |
| 322 | 257 | if (xm & 0x20000000) xm |= 0xc0000000; |
| 323 | 258 | if (xh & 0x20000000) xh |= 0xc0000000; |
| 324 | 259 | |
| 325 | z = rdp_cmd_data[zbuffer_base+0]; | |
| 326 | dzdx = rdp_cmd_data[zbuffer_base+1]; | |
| 327 | dzde = rdp_cmd_data[zbuffer_base+2]; | |
| 328 | dzdy = rdp_cmd_data[zbuffer_base+3]; | |
| 260 | int z = rdp_cmd_data[zbuffer_base+0]; | |
| 261 | int dzdx = rdp_cmd_data[zbuffer_base+1]; | |
| 262 | int dzde = rdp_cmd_data[zbuffer_base+2]; | |
| 263 | int dzdy = rdp_cmd_data[zbuffer_base+3]; | |
| 329 | 264 | |
| 265 | int dzdiff = 0; | |
| 266 | int dzeoff = 0; | |
| 267 | int dzdeh = 0; | |
| 268 | int dzdyh = 0; | |
| 269 | int dzdxh = dzdx >> 8; | |
| 270 | ||
| 271 | int dzdy_dz = (dzdy >> 16) & 0xffff; | |
| 272 | int dzdx_dz = (dzdx >> 16) & 0xffff; | |
| 330 | 273 | span[0].dz.w = dzdx; |
| 331 | dzdy_dz = (dzdy >> 16) & 0xffff; | |
| 332 | dzdx_dz = (dzdx >> 16) & 0xffff; | |
| 333 | 274 | span[0].dzpix = ((dzdy_dz & 0x8000) ? ((~dzdy_dz) & 0x7fff) : dzdy_dz) + ((dzdx_dz & 0x8000) ? ((~dzdx_dz) & 0x7fff) : dzdx_dz); |
| 334 | 275 | span[0].dzpix = normalize_dzpix(span[0].dzpix); |
| 335 | 276 | |
| 336 | xleft_inc = dxmdy >> 2; | |
| 337 | xright_inc = dxhdy >> 2; | |
| 277 | int xleft_inc = dxmdy >> 2; | |
| 278 | int xright_inc = dxhdy >> 2; | |
| 338 | 279 | |
| 339 | xright = xh; | |
| 340 | xleft = xm; | |
| 280 | int xright = xh; | |
| 281 | int xleft = xm; | |
| 341 | 282 | |
| 342 | limcvg = ((yl>>2) <= 1023) ? (yl>>2) : 1023; // Needed by 40 Winks | |
| 283 | INT32 limcvg = ((yl>>2) <= 1023) ? (yl>>2) : 1023; // Needed by 40 Winks | |
| 343 | 284 | if (limcvg < 0) |
| 344 | 285 | { |
| 345 | 286 | limcvg = 0; |
| 346 | 287 | } |
| 347 | 288 | |
| 348 | startcvg = ((yh>>2)>=0) ? (yh>>2) : 0; | |
| 349 | for (k = startcvg; k <= limcvg; k++) | |
| 289 | INT32 startcvg = ((yh>>2)>=0) ? (yh>>2) : 0; | |
| 290 | for (int k = startcvg; k <= limcvg; k++) | |
| 350 | 291 | { |
| 351 | 292 | memset((void*)&span[k].cvg[0],0,640); |
| 352 | 293 | } |
| 353 | 294 | |
| 354 | sign_dxldy = (dxldy & 0x80000000) ? 1 : 0; | |
| 355 | sign_dxmdy = (dxmdy & 0x80000000) ? 1 : 0; | |
| 356 | samesign = !(sign_dxldy ^ sign_dxmdy); | |
| 295 | int sign_dxhdy = (dxhdy & 0x80000000) ? 1 : 0; | |
| 357 | 296 | |
| 358 | sign_dxhdy = (dxhdy & 0x80000000) ? 1 : 0; | |
| 359 | ||
| 360 | do_offset = !(sign_dxhdy ^ (flip)); | |
| 361 | ||
| 362 | if (do_offset) | |
| 297 | if (!(sign_dxhdy ^ (flip))) | |
| 363 | 298 | { |
| 364 | dzdeh = dzde >> 9; dzdyh = dzdy >> 9; | |
| 365 | ||
| 299 | dzdeh = dzde >> 9; | |
| 300 | dzdyh = dzdy >> 9; | |
| 366 | 301 | dzdiff = (dzdeh*3 - dzdyh*3) << 7; |
| 367 | } | |
| 368 | else | |
| 369 | { | |
| 370 | dzdiff = 0; | |
| 371 | } | |
| 372 | ||
| 373 | if (do_offset) | |
| 374 | { | |
| 375 | 302 | dzeoff = (dzdeh*3) << 7; |
| 376 | 303 | } |
| 377 | 304 | else |
| 378 | 305 | { |
| 306 | dzdiff = 0; | |
| 379 | 307 | dzeoff = 0; |
| 380 | 308 | } |
| 381 | 309 | |
| 382 | #define addleft(x) addleftcvg(x,k) | |
| 383 | #define addright(x) addrightcvg(x,k) | |
| 384 | #define setvalues() { \ | |
| 385 | addvalues(); \ | |
| 386 | adjust_attr(); \ | |
| 387 | } | |
| 388 | ||
| 389 | dzdxh = dzdx >> 8; | |
| 390 | ||
| 391 | 310 | #define adjust_attr() \ |
| 392 | 311 | { \ |
| 393 | 312 | span[j].z.w = z + dzdiff - (xfrac * dzdxh); \ |
| r7553 | r7554 | |
| 397 | 316 | z += dzde; \ |
| 398 | 317 | } |
| 399 | 318 | |
| 400 | m_inc = flip ? 1 : -1; | |
| 319 | int ycur = yh & ~3; | |
| 320 | int ylfar = yl | 3; | |
| 321 | int ldflag = (sign_dxhdy ^ flip) ? 0 : 3; | |
| 322 | int yhpix = yh >> 2; | |
| 323 | int ylpix = yl >> 2; | |
| 401 | 324 | |
| 402 | ycur = yh & ~3; | |
| 403 | ylfar = yl | 3; | |
| 404 | ldflag = (sign_dxhdy ^ flip) ? 0 : 3; | |
| 405 | yhpix = yh >> 2; | |
| 406 | ympix = ym >> 2; | |
| 407 | ylpix = yl >> 2; | |
| 325 | if(ylfar >= 0x1000) | |
| 326 | { | |
| 327 | ylfar = 0x0fff; | |
| 328 | } | |
| 408 | 329 | |
| 409 | for (k = ycur; k <= ylfar; k++) | |
| 330 | for (int k = ycur; k <= ylfar; k++) | |
| 410 | 331 | { |
| 411 | 332 | if (k == ym) |
| 412 | 333 | { |
| r7553 | r7554 | |
| 414 | 335 | xleft_inc = dxldy >> 2; |
| 415 | 336 | } |
| 416 | 337 | |
| 417 | xstart = xleft >> 16; | |
| 418 | xend = xright >> 16; | |
| 419 | j = k >> 2; | |
| 420 | spix = k & 3; | |
| 338 | int xstart = xleft >> 16; | |
| 339 | int xend = xright >> 16; | |
| 340 | int j = k >> 2; | |
| 341 | int spix = k & 3; | |
| 421 | 342 | |
| 422 | if (k >= 0 && k < 0x1000) | |
| 343 | //if (k >= 0 && k < 0x1000) | |
| 423 | 344 | { |
| 424 | int m = 0; | |
| 425 | 345 | int n = 0; |
| 426 | int length = 0; | |
| 427 | min = 0; max = 3; | |
| 346 | UINT32 min = 0; | |
| 347 | UINT32 max = 3; | |
| 428 | 348 | if (j == yhpix) |
| 429 | 349 | { |
| 430 | 350 | min = yh & 3; |
| r7553 | r7554 | |
| 463 | 383 | } |
| 464 | 384 | } |
| 465 | 385 | |
| 466 | length = | |
| 386 | int length = | |
| 467 | 387 | |
| 468 | 388 | if (spix == ldflag) |
| 469 | 389 | { |
| r7553 | r7554 | |
| 471 | 391 | adjust_attr(); |
| 472 | 392 | } |
| 473 | 393 | |
| 474 | m = flip ? (xend+1) : (xend-1); | |
| 394 | int m = flip ? (xend+1) : (xend-1); | |
| 475 | 395 | |
| 476 | 396 | if (k >= yh && length >= 0 && k <= yl) |
| 477 | 397 | { |
| r7553 | r7554 | |
| 522 | 442 | span[j].cvg[m] += 2; |
| 523 | 443 | } |
| 524 | 444 | |
| 525 | m += | |
| 445 | m += inv_sign | |
| 526 | 446 | } |
| 527 | 447 | } |
| 528 | 448 | } |
| r7553 | r7554 | |
| 552 | 472 | } |
| 553 | 473 | #undef addvalues |
| 554 | 474 | #undef adjust_attr |
| 555 | #undef addleft | |
| 556 | #undef addright | |
| 557 | #undef setvalues | |
| 558 | 475 | |
| 559 | 476 | static void triangle_ns_t_nz(UINT32 w1, UINT32 w2) |
| 560 | 477 | { |
| r7553 | r7554 | |
| 567 | 484 | int dsde = 0, dtde = 0, dwde = 0; |
| 568 | 485 | int tilenum; |
| 569 | 486 | int flip = (w1 & 0x800000) ? 1 : 0; |
| 487 | int sign = (w1 & 0x800000) ? -1 : 1; | |
| 488 | int inv_sign = (w1 & 0x800000) ? 1 : -1; | |
| 570 | 489 | |
| 571 | 490 | INT32 yl, ym, yh; |
| 572 | 491 | INT32 xl, xm, xh; |
| r7553 | r7554 | |
| 593 | 512 | |
| 594 | 513 | int dsdxh = 0, dtdxh = 0, dwdxh = 0; |
| 595 | 514 | |
| 596 | int m_inc; | |
| 597 | 515 | UINT32 min=0, max=3; |
| 598 | 516 | INT32 maxxmx = 0, minxmx = 0, maxxhx = 0, minxhx = 0; |
| 599 | 517 | |
| r7553 | r7554 | |
| 707 | 625 | dseoff = dteoff = dweoff; |
| 708 | 626 | } |
| 709 | 627 | |
| 710 | #define addleft(x) addleftcvg(x,k) | |
| 711 | #define addright(x) addrightcvg(x,k) | |
| 712 | #define setvalues() { \ | |
| 713 | addvalues(); \ | |
| 714 | adjust_attr(); \ | |
| 715 | } | |
| 716 | ||
| 717 | 628 | dsdxh = dsdx >> 8; |
| 718 | 629 | dtdxh = dtdx >> 8; |
| 719 | 630 | dwdxh = dwdx >> 8; |
| r7553 | r7554 | |
| 731 | 642 | w += dwde; \ |
| 732 | 643 | } |
| 733 | 644 | |
| 734 | m_inc = flip ? 1 : -1; | |
| 735 | ||
| 736 | 645 | ycur = yh & ~3; |
| 737 | 646 | ylfar = yl | 3; |
| 738 | 647 | ldflag = (sign_dxhdy ^ flip) ? 0 : 3; |
| r7553 | r7554 | |
| 740 | 649 | ympix = ym >> 2; |
| 741 | 650 | ylpix = yl >> 2; |
| 742 | 651 | |
| 652 | if(ylfar >= 0x1000) | |
| 653 | { | |
| 654 | ylfar = 0x0fff; | |
| 655 | } | |
| 656 | ||
| 743 | 657 | for (k = ycur; k <= ylfar; k++) |
| 744 | 658 | { |
| 745 | 659 | if (k == ym) |
| r7553 | r7554 | |
| 753 | 667 | j = k >> 2; |
| 754 | 668 | spix = k & 3; |
| 755 | 669 | |
| 756 | if (k >= 0 && k < 0x1000) | |
| 670 | //if (k >= 0 && k < 0x1000) | |
| 757 | 671 | { |
| 758 | 672 | int m = 0; |
| 759 | 673 | int n = 0; |
| 760 | int length = 0; | |
| 761 | 674 | min = 0; max = 3; |
| 762 | 675 | if (j == yhpix) |
| 763 | 676 | { |
| r7553 | r7554 | |
| 797 | 710 | } |
| 798 | 711 | } |
| 799 | 712 | |
| 800 | length = | |
| 713 | int length = | |
| 801 | 714 | |
| 802 | 715 | if (spix == ldflag) |
| 803 | 716 | { |
| r7553 | r7554 | |
| 856 | 769 | span[j].cvg[m] += 2; |
| 857 | 770 | } |
| 858 | 771 | |
| 859 | m += | |
| 772 | m += inv_sign | |
| 860 | 773 | } |
| 861 | 774 | } |
| 862 | 775 | } |
| r7553 | r7554 | |
| 886 | 799 | } |
| 887 | 800 | #undef addvalues |
| 888 | 801 | #undef adjust_attr |
| 889 | #undef addleft | |
| 890 | #undef addright | |
| 891 | #undef setvalues | |
| 892 | 802 | |
| 893 | 803 | static void triangle_ns_t_z(UINT32 w1, UINT32 w2) |
| 894 | 804 | { |
| r7553 | r7554 | |
| 901 | 811 | int dzde = 0, dsde = 0, dtde = 0, dwde = 0; |
| 902 | 812 | int tilenum; |
| 903 | 813 | int flip = (w1 & 0x800000) ? 1 : 0; |
| 814 | int sign = (w1 & 0x800000) ? -1 : 1; | |
| 815 | int inv_sign = (w1 & 0x800000) ? 1 : -1; | |
| 904 | 816 | |
| 905 | 817 | INT32 yl, ym, yh; |
| 906 | 818 | INT32 xl, xm, xh; |
| r7553 | r7554 | |
| 929 | 841 | |
| 930 | 842 | int dsdxh = 0, dtdxh = 0, dwdxh = 0, dzdxh = 0; |
| 931 | 843 | |
| 932 | int m_inc; | |
| 933 | 844 | UINT32 min=0, max=3; |
| 934 | 845 | INT32 maxxmx = 0, minxmx = 0, maxxhx = 0, minxhx = 0; |
| 935 | 846 | |
| r7553 | r7554 | |
| 1070 | 981 | dseoff = dteoff = dweoff = dzeoff = 0; |
| 1071 | 982 | } |
| 1072 | 983 | |
| 1073 | #define addleft(x) addleftcvg(x,k) | |
| 1074 | #define addright(x) addrightcvg(x,k) | |
| 1075 | #define setvalues() { \ | |
| 1076 | addvalues(); \ | |
| 1077 | adjust_attr(); \ | |
| 1078 | } | |
| 1079 | ||
| 1080 | 984 | dsdxh = dsdx >> 8; |
| 1081 | 985 | dtdxh = dtdx >> 8; |
| 1082 | 986 | dwdxh = dwdx >> 8; |
| r7553 | r7554 | |
| 1097 | 1001 | z += dzde; \ |
| 1098 | 1002 | } |
| 1099 | 1003 | |
| 1100 | m_inc = flip ? 1 : -1; | |
| 1101 | ||
| 1102 | 1004 | ycur = yh & ~3; |
| 1103 | 1005 | ylfar = yl | 3; |
| 1104 | 1006 | ldflag = (sign_dxhdy ^ flip) ? 0 : 3; |
| r7553 | r7554 | |
| 1106 | 1008 | ympix = ym >> 2; |
| 1107 | 1009 | ylpix = yl >> 2; |
| 1108 | 1010 | |
| 1011 | if(ylfar >= 0x1000) | |
| 1012 | { | |
| 1013 | ylfar = 0x0fff; | |
| 1014 | } | |
| 1015 | ||
| 1109 | 1016 | for (k = ycur; k <= ylfar; k++) |
| 1110 | 1017 | { |
| 1111 | 1018 | if (k == ym) |
| r7553 | r7554 | |
| 1119 | 1026 | j = k >> 2; |
| 1120 | 1027 | spix = k & 3; |
| 1121 | 1028 | |
| 1122 | if (k >= 0 && k < 0x1000) | |
| 1029 | //if (k >= 0 && k < 0x1000) | |
| 1123 | 1030 | { |
| 1124 | 1031 | int m = 0; |
| 1125 | 1032 | int n = 0; |
| 1126 | int length = 0; | |
| 1127 | 1033 | min = 0; max = 3; |
| 1128 | 1034 | if (j == yhpix) |
| 1129 | 1035 | { |
| r7553 | r7554 | |
| 1163 | 1069 | } |
| 1164 | 1070 | } |
| 1165 | 1071 | |
| 1166 | length = | |
| 1072 | int length = | |
| 1167 | 1073 | |
| 1168 | 1074 | if (spix == ldflag) |
| 1169 | 1075 | { |
| r7553 | r7554 | |
| 1222 | 1128 | span[j].cvg[m] += 2; |
| 1223 | 1129 | } |
| 1224 | 1130 | |
| 1225 | m += | |
| 1131 | m += inv_sign | |
| 1226 | 1132 | } |
| 1227 | 1133 | } |
| 1228 | 1134 | } |
| r7553 | r7554 | |
| 1252 | 1158 | } |
| 1253 | 1159 | #undef addvalues |
| 1254 | 1160 | #undef adjust_attr |
| 1255 | #undef addleft | |
| 1256 | #undef addright | |
| 1257 | #undef setvalues | |
| 1258 | 1161 | |
| 1259 | 1162 | static void triangle_s_nt_nz(UINT32 w1, UINT32 w2) |
| 1260 | 1163 | { |
| r7553 | r7554 | |
| 1268 | 1171 | int drde = 0, dgde = 0, dbde = 0, dade = 0; |
| 1269 | 1172 | int tilenum; |
| 1270 | 1173 | int flip = (w1 & 0x800000) ? 1 : 0; |
| 1174 | int sign = (w1 & 0x800000) ? -1 : 1; | |
| 1175 | int inv_sign = (w1 & 0x800000) ? 1 : -1; | |
| 1271 | 1176 | |
| 1272 | 1177 | INT32 yl, ym, yh; |
| 1273 | 1178 | INT32 xl, xm, xh; |
| r7553 | r7554 | |
| 1294 | 1199 | |
| 1295 | 1200 | int drdxh = 0, dgdxh = 0, dbdxh = 0, dadxh = 0; |
| 1296 | 1201 | |
| 1297 | int m_inc; | |
| 1298 | 1202 | UINT32 min=0, max=3; |
| 1299 | 1203 | INT32 maxxmx = 0, minxmx = 0, maxxhx = 0, minxhx = 0; |
| 1300 | 1204 | |
| r7553 | r7554 | |
| 1416 | 1320 | dreoff = dgeoff = dbeoff = daeoff; |
| 1417 | 1321 | } |
| 1418 | 1322 | |
| 1419 | #define addleft(x) addleftcvg(x,k) | |
| 1420 | #define addright(x) addrightcvg(x,k) | |
| 1421 | #define setvalues() { \ | |
| 1422 | addvalues(); \ | |
| 1423 | adjust_attr(); \ | |
| 1424 | } | |
| 1425 | ||
| 1426 | 1323 | drdxh = drdx >> 8; |
| 1427 | 1324 | dgdxh = dgdx >> 8; |
| 1428 | 1325 | dbdxh = dbdx >> 8; |
| r7553 | r7554 | |
| 1443 | 1340 | a += dade; \ |
| 1444 | 1341 | } |
| 1445 | 1342 | |
| 1446 | m_inc = flip ? 1 : -1; | |
| 1447 | ||
| 1448 | 1343 | ycur = yh & ~3; |
| 1449 | 1344 | ylfar = yl | 3; |
| 1450 | 1345 | ldflag = (sign_dxhdy ^ flip) ? 0 : 3; |
| r7553 | r7554 | |
| 1452 | 1347 | ympix = ym >> 2; |
| 1453 | 1348 | ylpix = yl >> 2; |
| 1454 | 1349 | |
| 1350 | if(ylfar >= 0x1000) | |
| 1351 | { | |
| 1352 | ylfar = 0x0fff; | |
| 1353 | } | |
| 1354 | ||
| 1455 | 1355 | for (k = ycur; k <= ylfar; k++) |
| 1456 | 1356 | { |
| 1457 | 1357 | if (k == ym) |
| r7553 | r7554 | |
| 1465 | 1365 | j = k >> 2; |
| 1466 | 1366 | spix = k & 3; |
| 1467 | 1367 | |
| 1468 | if (k >= 0 && k < 0x1000) | |
| 1368 | //if (k >= 0 && k < 0x1000) | |
| 1469 | 1369 | { |
| 1470 | 1370 | int m = 0; |
| 1471 | 1371 | int n = 0; |
| 1472 | int length = 0; | |
| 1473 | 1372 | min = 0; max = 3; |
| 1474 | 1373 | if (j == yhpix) |
| 1475 | 1374 | { |
| r7553 | r7554 | |
| 1509 | 1408 | } |
| 1510 | 1409 | } |
| 1511 | 1410 | |
| 1512 | length = | |
| 1411 | int length = | |
| 1513 | 1412 | |
| 1514 | 1413 | if (spix == ldflag) |
| 1515 | 1414 | { |
| r7553 | r7554 | |
| 1568 | 1467 | span[j].cvg[m] += 2; |
| 1569 | 1468 | } |
| 1570 | 1469 | |
| 1571 | m += | |
| 1470 | m += inv_sign | |
| 1572 | 1471 | } |
| 1573 | 1472 | } |
| 1574 | 1473 | } |
| r7553 | r7554 | |
| 1598 | 1497 | } |
| 1599 | 1498 | #undef addvalues |
| 1600 | 1499 | #undef adjust_attr |
| 1601 | #undef addleft | |
| 1602 | #undef addright | |
| 1603 | #undef setvalues | |
| 1604 | 1500 | |
| 1605 | 1501 | static void triangle_s_nt_z(UINT32 w1, UINT32 w2) |
| 1606 | 1502 | { |
| r7553 | r7554 | |
| 1614 | 1510 | int drde = 0, dgde = 0, dbde = 0, dade = 0, dzde = 0; |
| 1615 | 1511 | int tilenum; |
| 1616 | 1512 | int flip = (w1 & 0x800000) ? 1 : 0; |
| 1513 | int sign = (w1 & 0x800000) ? -1 : 1; | |
| 1514 | int inv_sign = (w1 & 0x800000) ? 1 : -1; | |
| 1617 | 1515 | |
| 1618 | 1516 | INT32 yl, ym, yh; |
| 1619 | 1517 | INT32 xl, xm, xh; |
| r7553 | r7554 | |
| 1641 | 1539 | |
| 1642 | 1540 | int drdxh = 0, dgdxh = 0, dbdxh = 0, dadxh = 0, dzdxh = 0; |
| 1643 | 1541 | |
| 1644 | int m_inc; | |
| 1645 | 1542 | UINT32 min=0, max=3; |
| 1646 | 1543 | INT32 maxxmx = 0, minxmx = 0, maxxhx = 0, minxhx = 0; |
| 1647 | 1544 | |
| r7553 | r7554 | |
| 1779 | 1676 | dreoff = dgeoff = dbeoff = daeoff = dzeoff = 0; |
| 1780 | 1677 | } |
| 1781 | 1678 | |
| 1782 | #define addleft(x) addleftcvg(x,k) | |
| 1783 | #define addright(x) addrightcvg(x,k) | |
| 1784 | #define setvalues() { \ | |
| 1785 | addvalues(); \ | |
| 1786 | adjust_attr(); \ | |
| 1787 | } | |
| 1788 | ||
| 1789 | 1679 | drdxh = drdx >> 8; |
| 1790 | 1680 | dgdxh = dgdx >> 8; |
| 1791 | 1681 | dbdxh = dbdx >> 8; |
| r7553 | r7554 | |
| 1809 | 1699 | z += dzde; \ |
| 1810 | 1700 | } |
| 1811 | 1701 | |
| 1812 | m_inc = flip ? 1 : -1; | |
| 1813 | ||
| 1814 | 1702 | ycur = yh & ~3; |
| 1815 | 1703 | ylfar = yl | 3; |
| 1816 | 1704 | ldflag = (sign_dxhdy ^ flip) ? 0 : 3; |
| r7553 | r7554 | |
| 1818 | 1706 | ympix = ym >> 2; |
| 1819 | 1707 | ylpix = yl >> 2; |
| 1820 | 1708 | |
| 1709 | if(ylfar >= 0x1000) | |
| 1710 | { | |
| 1711 | ylfar = 0x0fff; | |
| 1712 | } | |
| 1713 | ||
| 1821 | 1714 | for (k = ycur; k <= ylfar; k++) |
| 1822 | 1715 | { |
| 1823 | 1716 | if (k == ym) |
| r7553 | r7554 | |
| 1831 | 1724 | j = k >> 2; |
| 1832 | 1725 | spix = k & 3; |
| 1833 | 1726 | |
| 1834 | if (k >= 0 && k < 0x1000) | |
| 1727 | //if (k >= 0 && k < 0x1000) | |
| 1835 | 1728 | { |
| 1836 | 1729 | int m = 0; |
| 1837 | 1730 | int n = 0; |
| 1838 | int length = 0; | |
| 1839 | 1731 | min = 0; max = 3; |
| 1840 | 1732 | if (j == yhpix) |
| 1841 | 1733 | { |
| r7553 | r7554 | |
| 1875 | 1767 | } |
| 1876 | 1768 | } |
| 1877 | 1769 | |
| 1878 | length = | |
| 1770 | int length = | |
| 1879 | 1771 | |
| 1880 | 1772 | if (spix == ldflag) |
| 1881 | 1773 | { |
| r7553 | r7554 | |
| 1934 | 1826 | span[j].cvg[m] += 2; |
| 1935 | 1827 | } |
| 1936 | 1828 | |
| 1937 | m += | |
| 1829 | m += inv_sign | |
| 1938 | 1830 | } |
| 1939 | 1831 | } |
| 1940 | 1832 | } |
| r7553 | r7554 | |
| 1964 | 1856 | } |
| 1965 | 1857 | #undef addvalues |
| 1966 | 1858 | #undef adjust_attr |
| 1967 | #undef addleft | |
| 1968 | #undef addright | |
| 1969 | #undef setvalues | |
| 1970 | 1859 | |
| 1971 | 1860 | static void triangle_s_t_nz(UINT32 w1, UINT32 w2) |
| 1972 | 1861 | { |
| r7553 | r7554 | |
| 1980 | 1869 | int drde = 0, dgde = 0, dbde = 0, dade = 0, dsde = 0, dtde = 0, dwde = 0; |
| 1981 | 1870 | int tilenum; |
| 1982 | 1871 | int flip = (w1 & 0x800000) ? 1 : 0; |
| 1872 | int sign = (w1 & 0x800000) ? -1 : 1; | |
| 1873 | int inv_sign = (w1 & 0x800000) ? 1 : -1; | |
| 1983 | 1874 | |
| 1984 | 1875 | INT32 yl, ym, yh; |
| 1985 | 1876 | INT32 xl, xm, xh; |
| r7553 | r7554 | |
| 2007 | 1898 | |
| 2008 | 1899 | int dsdxh = 0, dtdxh = 0, dwdxh = 0, drdxh = 0, dgdxh = 0, dbdxh = 0, dadxh = 0; |
| 2009 | 1900 | |
| 2010 | int m_inc; | |
| 2011 | 1901 | UINT32 min=0, max=3; |
| 2012 | 1902 | INT32 maxxmx = 0, minxmx = 0, maxxhx = 0, minxhx = 0; |
| 2013 | 1903 | |
| r7553 | r7554 | |
| 2168 | 2058 | dseoff = dteoff = dweoff = dreoff = dgeoff = dbeoff = daeoff = 0; |
| 2169 | 2059 | } |
| 2170 | 2060 | |
| 2171 | #define addleft(x) addleftcvg(x,k) | |
| 2172 | #define addright(x) addrightcvg(x,k) | |
| 2173 | #define setvalues() { \ | |
| 2174 | addvalues(); \ | |
| 2175 | adjust_attr(); \ | |
| 2176 | } | |
| 2177 | ||
| 2178 | 2061 | dsdxh = dsdx >> 8; |
| 2179 | 2062 | dtdxh = dtdx >> 8; |
| 2180 | 2063 | dwdxh = dwdx >> 8; |
| r7553 | r7554 | |
| 2204 | 2087 | a += dade; \ |
| 2205 | 2088 | } |
| 2206 | 2089 | |
| 2207 | m_inc = flip ? 1 : -1; | |
| 2208 | ||
| 2209 | 2090 | ycur = yh & ~3; |
| 2210 | 2091 | ylfar = yl | 3; |
| 2211 | 2092 | ldflag = (sign_dxhdy ^ flip) ? 0 : 3; |
| r7553 | r7554 | |
| 2213 | 2094 | ympix = ym >> 2; |
| 2214 | 2095 | ylpix = yl >> 2; |
| 2215 | 2096 | |
| 2097 | if(ylfar >= 0x1000) | |
| 2098 | { | |
| 2099 | ylfar = 0x0fff; | |
| 2100 | } | |
| 2101 | ||
| 2216 | 2102 | for (k = ycur; k <= ylfar; k++) |
| 2217 | 2103 | { |
| 2218 | 2104 | if (k == ym) |
| r7553 | r7554 | |
| 2226 | 2112 | j = k >> 2; |
| 2227 | 2113 | spix = k & 3; |
| 2228 | 2114 | |
| 2229 | if (k >= 0 && k < 0x1000) | |
| 2115 | //if (k >= 0 && k < 0x1000) | |
| 2230 | 2116 | { |
| 2231 | 2117 | int m = 0; |
| 2232 | 2118 | int n = 0; |
| 2233 | int length = 0; | |
| 2234 | 2119 | min = 0; max = 3; |
| 2235 | 2120 | if (j == yhpix) |
| 2236 | 2121 | { |
| r7553 | r7554 | |
| 2270 | 2155 | } |
| 2271 | 2156 | } |
| 2272 | 2157 | |
| 2273 | length = | |
| 2158 | int length = | |
| 2274 | 2159 | |
| 2275 | 2160 | if (spix == ldflag) |
| 2276 | 2161 | { |
| r7553 | r7554 | |
| 2329 | 2214 | span[j].cvg[m] += 2; |
| 2330 | 2215 | } |
| 2331 | 2216 | |
| 2332 | m += | |
| 2217 | m += inv_sign | |
| 2333 | 2218 | } |
| 2334 | 2219 | } |
| 2335 | 2220 | } |
| r7553 | r7554 | |
| 2359 | 2244 | } |
| 2360 | 2245 | #undef addvalues |
| 2361 | 2246 | #undef adjust_attr |
| 2362 | #undef addleft | |
| 2363 | #undef addright | |
| 2364 | #undef setvalues | |
| 2365 | 2247 | |
| 2366 | 2248 | static void triangle_s_t_z(UINT32 w1, UINT32 w2) |
| 2367 | 2249 | { |
| r7553 | r7554 | |
| 2375 | 2257 | int drde = 0, dgde = 0, dbde = 0, dade = 0, dzde = 0, dsde = 0, dtde = 0, dwde = 0; |
| 2376 | 2258 | int tilenum; |
| 2377 | 2259 | int flip = (w1 & 0x800000) ? 1 : 0; |
| 2260 | int sign = (w1 & 0x800000) ? -1 : 1; | |
| 2261 | int inv_sign = (w1 & 0x800000) ? 1 : -1; | |
| 2378 | 2262 | |
| 2379 | 2263 | INT32 yl, ym, yh; |
| 2380 | 2264 | INT32 xl, xm, xh; |
| r7553 | r7554 | |
| 2403 | 2287 | |
| 2404 | 2288 | int dsdxh = 0, dtdxh = 0, dwdxh = 0, drdxh = 0, dgdxh = 0, dbdxh = 0, dadxh = 0, dzdxh = 0; |
| 2405 | 2289 | |
| 2406 | int m_inc; | |
| 2407 | 2290 | UINT32 min=0, max=3; |
| 2408 | 2291 | INT32 maxxmx = 0, minxmx = 0, maxxhx = 0, minxhx = 0; |
| 2409 | 2292 | |
| r7553 | r7554 | |
| 2576 | 2459 | dseoff = dteoff = dweoff = dreoff = dgeoff = dbeoff = daeoff = dzeoff = 0; |
| 2577 | 2460 | } |
| 2578 | 2461 | |
| 2579 | #define addleft(x) addleftcvg(x,k) | |
| 2580 | #define addright(x) addrightcvg(x,k) | |
| 2581 | #define setvalues() { \ | |
| 2582 | addvalues(); \ | |
| 2583 | adjust_attr(); \ | |
| 2584 | } | |
| 2585 | ||
| 2586 | 2462 | dsdxh = dsdx >> 8; |
| 2587 | 2463 | dtdxh = dtdx >> 8; |
| 2588 | 2464 | dwdxh = dwdx >> 8; |
| r7553 | r7554 | |
| 2615 | 2491 | z += dzde; \ |
| 2616 | 2492 | } |
| 2617 | 2493 | |
| 2618 | m_inc = flip ? 1 : -1; | |
| 2619 | ||
| 2620 | 2494 | ycur = yh & ~3; |
| 2621 | 2495 | ylfar = yl | 3; |
| 2622 | 2496 | ldflag = (sign_dxhdy ^ flip) ? 0 : 3; |
| r7553 | r7554 | |
| 2624 | 2498 | ympix = ym >> 2; |
| 2625 | 2499 | ylpix = yl >> 2; |
| 2626 | 2500 | |
| 2501 | if(ylfar >= 0x1000) | |
| 2502 | { | |
| 2503 | ylfar = 0x0fff; | |
| 2504 | } | |
| 2505 | ||
| 2627 | 2506 | if(flip) |
| 2628 | 2507 | { |
| 2629 | 2508 | for (k = ycur; k <= ylfar; k++) |
| r7553 | r7554 | |
| 2639 | 2518 | j = k >> 2; |
| 2640 | 2519 | spix = k & 3; |
| 2641 | 2520 | |
| 2642 | if (k >= 0 && k < 0x1000) | |
| 2521 | //if (k >= 0 && k < 0x1000) | |
| 2643 | 2522 | { |
| 2644 | 2523 | int m = 0; |
| 2645 | 2524 | int n = 0; |
| 2646 | int length = 0; | |
| 2647 | 2525 | min = 0; max = 3; |
| 2648 | 2526 | if (j == yhpix) |
| 2649 | 2527 | { |
| r7553 | r7554 | |
| 2675 | 2553 | span[j].rx = minxhx; |
| 2676 | 2554 | } |
| 2677 | 2555 | |
| 2678 | length = xstart | |
| 2556 | int length = (xend - xstart) * sign | |
| 2679 | 2557 | |
| 2680 | 2558 | if (spix == ldflag) |
| 2681 | 2559 | { |
| r7553 | r7554 | |
| 2713 | 2591 | span[j].cvg[m] += 2; |
| 2714 | 2592 | } |
| 2715 | 2593 | |
| 2716 | m += | |
| 2594 | m += inv_sign | |
| 2717 | 2595 | } |
| 2718 | 2596 | } |
| 2719 | 2597 | } |
| r7553 | r7554 | |
| 2745 | 2623 | { |
| 2746 | 2624 | int m = 0; |
| 2747 | 2625 | int n = 0; |
| 2748 | int length = 0; | |
| 2749 | 2626 | min = 0; max = 3; |
| 2750 | 2627 | if (j == yhpix) |
| 2751 | 2628 | { |
| r7553 | r7554 | |
| 2777 | 2654 | span[j].rx = maxxhx; |
| 2778 | 2655 | } |
| 2779 | 2656 | |
| 2780 | length = xend - xstart; | |
| 2657 | int length = (xend - xstart) * sign; | |
| 2781 | 2658 | |
| 2782 | 2659 | if (spix == ldflag) |
| 2783 | 2660 | { |
| r7553 | r7554 | |
| 2815 | 2692 | span[j].cvg[m] += 2; |
| 2816 | 2693 | } |
| 2817 | 2694 | |
| 2818 | m += | |
| 2695 | m += inv_sign | |
| 2819 | 2696 | } |
| 2820 | 2697 | } |
| 2821 | 2698 | } |
| r7553 | r7554 | |
| 2844 | 2721 | default: break; // V-Rally2 does this, fb_size=0 |
| 2845 | 2722 | } |
| 2846 | 2723 | } |
| 2724 | ||
| 2847 | 2725 | #undef addvalues |
| 2848 | 2726 | #undef adjust_attr |
| 2849 | #undef addleft | |
| 2850 | #undef addright | |
| 2851 | #undef setvalues |
| r7553 | r7554 | |
|---|---|---|
| 81 | 81 | #endif |
| 82 | 82 | |
| 83 | 83 | #if defined(COPY) |
| 84 | #define CLAMP_LIGHT(SSS, SST | |
| 84 | #define CLAMP_LIGHT(SSS, SST | |
| 85 | 85 | SSS = (SIGN17(SSS) >> 5) & 0x1fff; \ |
| 86 | 86 | SST = (SIGN17(SST) >> 5) & 0x1fff; |
| 87 | 87 | #else |
| 88 | 88 | #if defined(DOS) && defined(DOT) |
| 89 | #define CLAMP_LIGHT(SSS, SST | |
| 89 | #define CLAMP_LIGHT(SSS, SST | |
| 90 | 90 | if (SSS & 0x10000) \ |
| 91 | 91 | { \ |
| 92 | 92 | SSS = 0; \ |
| r7553 | r7554 | |
| 113 | 113 | SST = (SIGN17(SST) >> 5) & 0x1fff; \ |
| 114 | 114 | } |
| 115 | 115 | #elif defined(DOS) && !defined(DOT) |
| 116 | #define CLAMP_LIGHT(SSS, SST | |
| 116 | #define CLAMP_LIGHT(SSS, SST | |
| 117 | 117 | if (SSS & 0x10000) \ |
| 118 | 118 | { \ |
| 119 | 119 | SSS = 0; \ |
| r7553 | r7554 | |
| 129 | 129 | \ |
| 130 | 130 | SST = (SIGN17(SST) >> 5) & 0x1fff; |
| 131 | 131 | #elif !defined(DOS) && defined(DOT) |
| 132 | #define CLAMP_LIGHT(SSS, SST | |
| 132 | #define CLAMP_LIGHT(SSS, SST | |
| 133 | 133 | SSS = (SIGN17(SSS) >> 5) & 0x1fff; \ |
| 134 | 134 | \ |
| 135 | 135 | if (SST & 0x10000) \ |
| r7553 | r7554 | |
| 145 | 145 | SST = (SIGN17(SST) >> 5) & 0x1fff; \ |
| 146 | 146 | } |
| 147 | 147 | #else |
| 148 | #define CLAMP_LIGHT(SSS, SST | |
| 148 | #define CLAMP_LIGHT(SSS, SST | |
| 149 | 149 | SSS = (SIGN17(SSS) >> 5) & 0x1fff; \ |
| 150 | 150 | SST = (SIGN17(SST) >> 5) & 0x1fff; |
| 151 | 151 | #endif |
| r7553 | r7554 | |
| 336 | 336 | #endif |
| 337 | 337 | { |
| 338 | 338 | INT32 maxs, maxt; |
| 339 | COLOR t0, t1, t2, t3, TEX; | |
| 340 | int sss2, sst2; | |
| 339 | int sss2 = SSS + 32; | |
| 340 | int sst2 = SST + 32; | |
| 341 | 341 | |
| 342 | INT32 SFRAC = 0, TFRAC = 0, INVSF = 0, INVTF = 0; | |
| 343 | INT32 R32, G32, B32, A32; | |
| 344 | INT32 maxs2, maxt2; | |
| 345 | ||
| 346 | 342 | TEXSHIFT(SSS, SST, maxs, maxt) |
| 347 | 343 | |
| 348 | sss2 = SSS + 32; sst2 = SST + 32; | |
| 349 | maxs2 = ((sss2 >> 3) >= tex_tile->sh); | |
| 350 | maxt2 = ((sst2 >> 3) >= tex_tile->th); | |
| 351 | ||
| 352 | 344 | SSS = RELATIVE(SSS, tex_tile->sl); |
| 353 | 345 | SST = RELATIVE(SST, tex_tile->tl); |
| 354 | 346 | sss2 = RELATIVE(sss2, tex_tile->sl); |
| 355 | 347 | sst2 = RELATIVE(sst2, tex_tile->tl); |
| 356 | 348 | |
| 357 | SFRAC = SSS & 0x1f; | |
| 358 | TFRAC = SST & 0x1f; | |
| 349 | INT32 SFRAC = SSS & 0x1f; | |
| 350 | INT32 TFRAC = SST & 0x1f; | |
| 359 | 351 | |
| 360 | 352 | CLAMP(SSS, SST, maxs, maxt) |
| 361 | CLAMP_LIGHT(sss2, sst2 | |
| 353 | CLAMP_LIGHT(sss2, sst2 | |
| 362 | 354 | |
| 363 | 355 | MASK(&SSS, &SST, tex_tile); |
| 364 | 356 | MASK(&sss2, &sst2, tex_tile); |
| 365 | 357 | |
| 366 | t1.c = FETCH_TEXEL(sss2, SST); | |
| 367 | t2.c = FETCH_TEXEL(SSS, sst2); | |
| 358 | COLOR t1 = { { FETCH_TEXEL(sss2, SST) } }; | |
| 359 | COLOR t2 = { { FETCH_TEXEL(SSS, sst2) } }; | |
| 368 | 360 | |
| 361 | COLOR TEX; | |
| 369 | 362 | if ((SFRAC + TFRAC) < 0x20) |
| 370 | 363 | { |
| 371 | t0.c = FETCH_TEXEL(SSS, SST); | |
| 372 | R32 = t0.i.r + ((SFRAC*(t1.i.r - t0.i.r))>>5) + ((TFRAC*(t2.i.r - t0.i.r))>>5); | |
| 364 | COLOR t0 = { { FETCH_TEXEL(SSS, SST) } }; | |
| 365 | INT32 R32 = t0.i.r + ((SFRAC*(t1.i.r - t0.i.r))>>5) + ((TFRAC*(t2.i.r - t0.i.r))>>5); | |
| 366 | INT32 G32 = t0.i.g + ((SFRAC*(t1.i.g - t0.i.g))>>5) + ((TFRAC*(t2.i.g - t0.i.g))>>5); | |
| 367 | INT32 B32 = t0.i.b + ((SFRAC*(t1.i.b - t0.i.b))>>5) + ((TFRAC*(t2.i.b - t0.i.b))>>5); | |
| 368 | INT32 A32 = t0.i.a + ((SFRAC*(t1.i.a - t0.i.a))>>5) + ((TFRAC*(t2.i.a - t0.i.a))>>5); | |
| 373 | 369 | TEX.i.r = (R32 < 0) ? 0 : R32; |
| 374 | G32 = t0.i.g + ((SFRAC*(t1.i.g - t0.i.g))>>5) + ((TFRAC*(t2.i.g - t0.i.g))>>5); | |
| 375 | 370 | TEX.i.g = (G32 < 0) ? 0 : G32; |
| 376 | B32 = t0.i.b + ((SFRAC*(t1.i.b - t0.i.b))>>5) + ((TFRAC*(t2.i.b - t0.i.b))>>5); | |
| 377 | 371 | TEX.i.b = (B32 < 0) ? 0 : B32; |
| 378 | A32 = t0.i.a + ((SFRAC*(t1.i.a - t0.i.a))>>5) + ((TFRAC*(t2.i.a - t0.i.a))>>5); | |
| 379 | 372 | TEX.i.a = (A32 < 0) ? 0 : A32; |
| 380 | 373 | } |
| 381 | 374 | else |
| 382 | 375 | { |
| 383 | INVSF = 0x20 - SFRAC; | |
| 384 | INVTF = 0x20 - TFRAC; | |
| 385 | t3.c = FETCH_TEXEL(sss2, sst2); | |
| 386 | R32 = t3.i.r + ((INVSF*(t2.i.r - t3.i.r))>>5) + ((INVTF*(t1.i.r - t3.i.r))>>5); | |
| 376 | INT32 INVSF = 0x20 - SFRAC; | |
| 377 | INT32 INVTF = 0x20 - TFRAC; | |
| 378 | COLOR t3 = { { FETCH_TEXEL(sss2, sst2) } }; | |
| 379 | INT32 R32 = t3.i.r + ((INVSF*(t2.i.r - t3.i.r))>>5) + ((INVTF*(t1.i.r - t3.i.r))>>5); | |
| 380 | INT32 G32 = t3.i.g + ((INVSF*(t2.i.g - t3.i.g))>>5) + ((INVTF*(t1.i.g - t3.i.g))>>5); | |
| 381 | INT32 B32 = t3.i.b + ((INVSF*(t2.i.b - t3.i.b))>>5) + ((INVTF*(t1.i.b - t3.i.b))>>5); | |
| 382 | INT32 A32 = t3.i.a + ((INVSF*(t2.i.a - t3.i.a))>>5) + ((INVTF*(t1.i.a - t3.i.a))>>5); | |
| 387 | 383 | TEX.i.r = (R32 < 0) ? 0 : R32; |
| 388 | G32 = t3.i.g + ((INVSF*(t2.i.g - t3.i.g))>>5) + ((INVTF*(t1.i.g - t3.i.g))>>5); | |
| 389 | 384 | TEX.i.g = (G32 < 0) ? 0 : G32; |
| 390 | B32 = t3.i.b + ((INVSF*(t2.i.b - t3.i.b))>>5) + ((INVTF*(t1.i.b - t3.i.b))>>5); | |
| 391 | 385 | TEX.i.b = (B32 < 0) ? 0 : B32; |
| 392 | A32 = t3.i.a + ((INVSF*(t2.i.a - t3.i.a))>>5) + ((INVTF*(t1.i.a - t3.i.a))>>5); | |
| 393 | 386 | TEX.i.a = (A32 < 0) ? 0 : A32; |
| 394 | 387 | } |
| 395 | 388 | |
| r7553 | r7554 | |
| 523 | 516 | #endif |
| 524 | 517 | { |
| 525 | 518 | INT32 maxs, maxt; |
| 526 | COLOR t0, t1, t2, t3, TEX; | |
| 527 | 519 | int sss2, sst2; |
| 528 | 520 | |
| 529 | INT32 SFRAC = 0, TFRAC = 0, INVSF = 0, INVTF = 0; | |
| 530 | INT32 R32, G32, B32, A32; | |
| 531 | INT32 maxs2, maxt2; | |
| 532 | ||
| 533 | 521 | TEXSHIFT(SSS, SST, maxs, maxt) |
| 534 | 522 | |
| 535 | 523 | sss2 = SSS + 32; sst2 = SST + 32; |
| 536 | maxs2 = ((sss2 >> 3) >= tex_tile->sh); | |
| 537 | maxt2 = ((sst2 >> 3) >= tex_tile->th); | |
| 538 | 524 | |
| 539 | 525 | SSS = RELATIVE(SSS, tex_tile->sl); |
| 540 | 526 | SST = RELATIVE(SST, tex_tile->tl); |
| 541 | 527 | sss2 = RELATIVE(sss2, tex_tile->sl); |
| 542 | 528 | sst2 = RELATIVE(sst2, tex_tile->tl); |
| 543 | 529 | |
| 544 | SFRAC = SSS & 0x1f; | |
| 545 | TFRAC = SST & 0x1f; | |
| 530 | INT32 SFRAC = SSS & 0x1f; | |
| 531 | INT32 TFRAC = SST & 0x1f; | |
| 546 | 532 | |
| 547 | 533 | CLAMP(SSS, SST, maxs, maxt) |
| 548 | CLAMP_LIGHT(sss2, sst2 | |
| 534 | CLAMP_LIGHT(sss2, sst2 | |
| 549 | 535 | |
| 550 | 536 | MASK(&SSS, &SST, tex_tile); |
| 551 | 537 | MASK(&sss2, &sst2, tex_tile); |
| 552 | 538 | |
| 539 | COLOR t0 = { { FETCH_TEXEL(SSS, SST) } }; | |
| 540 | COLOR t1 = { { FETCH_TEXEL(sss2, SST) } }; | |
| 541 | COLOR t2 = { { FETCH_TEXEL(SSS, sst2) } }; | |
| 542 | COLOR t3 = { { FETCH_TEXEL(sss2, sst2) } }; | |
| 553 | 543 | |
| 554 | t0.c = FETCH_TEXEL(SSS, SST); | |
| 555 | t1.c = FETCH_TEXEL(sss2, SST); | |
| 556 | t2.c = FETCH_TEXEL(SSS, sst2); | |
| 557 | t3.c = FETCH_TEXEL(sss2, sst2); | |
| 558 | ||
| 544 | COLOR TEX; | |
| 559 | 545 | if (SFRAC!= 0x10 || TFRAC != 0x10) |
| 560 | 546 | { |
| 561 | 547 | if ((SFRAC + TFRAC) >= 0x20) |
| 562 | 548 | { |
| 563 | INVSF = 0x20 - SFRAC; | |
| 564 | INVTF = 0x20 - TFRAC; | |
| 565 | R32 = t3.i.r + ((INVSF*(t2.i.r - t3.i.r))>>5) + ((INVTF*(t1.i.r - t3.i.r))>>5); | |
| 549 | INT32 INVSF = 0x20 - SFRAC; | |
| 550 | INT32 INVTF = 0x20 - TFRAC; | |
| 551 | INT32 R32 = t3.i.r + ((INVSF*(t2.i.r - t3.i.r))>>5) + ((INVTF*(t1.i.r - t3.i.r))>>5); | |
| 552 | INT32 G32 = t3.i.g + ((INVSF*(t2.i.g - t3.i.g))>>5) + ((INVTF*(t1.i.g - t3.i.g))>>5); | |
| 553 | INT32 B32 = t3.i.b + ((INVSF*(t2.i.b - t3.i.b))>>5) + ((INVTF*(t1.i.b - t3.i.b))>>5); | |
| 554 | INT32 A32 = t3.i.a + ((INVSF*(t2.i.a - t3.i.a))>>5) + ((INVTF*(t1.i.a - t3.i.a))>>5); | |
| 566 | 555 | TEX.i.r = (R32 < 0) ? 0 : R32; |
| 567 | G32 = t3.i.g + ((INVSF*(t2.i.g - t3.i.g))>>5) + ((INVTF*(t1.i.g - t3.i.g))>>5); | |
| 568 | 556 | TEX.i.g = (G32 < 0) ? 0 : G32; |
| 569 | B32 = t3.i.b + ((INVSF*(t2.i.b - t3.i.b))>>5) + ((INVTF*(t1.i.b - t3.i.b))>>5); | |
| 570 | 557 | TEX.i.b = (B32 < 0) ? 0 : B32; |
| 571 | A32 = t3.i.a + ((INVSF*(t2.i.a - t3.i.a))>>5) + ((INVTF*(t1.i.a - t3.i.a))>>5); | |
| 572 | 558 | TEX.i.a = (A32 < 0) ? 0 : A32; |
| 573 | 559 | } |
| 574 | 560 | else |
| 575 | 561 | { |
| 576 | R32 = t0.i.r + ((SFRAC*(t1.i.r - t0.i.r))>>5) + ((TFRAC*(t2.i.r - t0.i.r))>>5); | |
| 562 | INT32 R32 = t0.i.r + ((SFRAC*(t1.i.r - t0.i.r))>>5) + ((TFRAC*(t2.i.r - t0.i.r))>>5); | |
| 563 | INT32 G32 = t0.i.g + ((SFRAC*(t1.i.g - t0.i.g))>>5) + ((TFRAC*(t2.i.g - t0.i.g))>>5); | |
| 564 | INT32 B32 = t0.i.b + ((SFRAC*(t1.i.b - t0.i.b))>>5) + ((TFRAC*(t2.i.b - t0.i.b))>>5); | |
| 565 | INT32 A32 = t0.i.a + ((SFRAC*(t1.i.a - t0.i.a))>>5) + ((TFRAC*(t2.i.a - t0.i.a))>>5); | |
| 577 | 566 | TEX.i.r = (R32 < 0) ? 0 : R32; |
| 578 | G32 = t0.i.g + ((SFRAC*(t1.i.g - t0.i.g))>>5) + ((TFRAC*(t2.i.g - t0.i.g))>>5); | |
| 579 | 567 | TEX.i.g = (G32 < 0) ? 0 : G32; |
| 580 | B32 = t0.i.b + ((SFRAC*(t1.i.b - t0.i.b))>>5) + ((TFRAC*(t2.i.b - t0.i.b))>>5); | |
| 581 | 568 | TEX.i.b = (B32 < 0) ? 0 : B32; |
| 582 | A32 = t0.i.a + ((SFRAC*(t1.i.a - t0.i.a))>>5) + ((TFRAC*(t2.i.a - t0.i.a))>>5); | |
| 583 | 569 | TEX.i.a = (A32 < 0) ? 0 : A32; |
| 584 | 570 | } |
| 585 | 571 | } |
| r7553 | r7554 | |
|---|---|---|
| 79 | 79 | 0); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | static TILE_GET_INFO( get_magical_fg_tile_info ) | |
| 83 | { | |
| 84 | goldstar_state *state = (goldstar_state *)machine->driver_data; | |
| 85 | int code = state->fg_vidram[tile_index]; | |
| 86 | int attr = state->fg_atrram[tile_index]; | |
| 87 | ||
| 88 | SET_TILE_INFO( | |
| 89 | 0, | |
| 90 | (code | (attr & 0xf0)<<4)+state->tile_bank*0x1000, | |
| 91 | attr&0x0f, | |
| 92 | 0); | |
| 93 | } | |
| 94 | ||
| 95 | ||
| 82 | 96 | // colour / high tile bits are swapped around |
| 83 | 97 | static TILE_GET_INFO( get_cherrym_fg_tile_info ) |
| 84 | 98 | { |
| r7553 | r7554 | |
| 155 | 169 | 0); |
| 156 | 170 | } |
| 157 | 171 | |
| 172 | WRITE8_HANDLER( unkch_reel1_attrram_w ) | |
| 173 | { | |
| 174 | goldstar_state *state = (goldstar_state *)space->machine->driver_data; | |
| 158 | 175 | |
| 176 | state->reel1_attrram[offset] = data; | |
| 177 | tilemap_mark_tile_dirty(state->reel1_tilemap,offset); | |
| 178 | } | |
| 159 | 179 | |
| 180 | WRITE8_HANDLER( unkch_reel2_attrram_w ) | |
| 181 | { | |
| 182 | goldstar_state *state = (goldstar_state *)space->machine->driver_data; | |
| 183 | ||
| 184 | state->reel2_attrram[offset] = data; | |
| 185 | tilemap_mark_tile_dirty(state->reel2_tilemap,offset); | |
| 186 | } | |
| 187 | ||
| 188 | ||
| 189 | WRITE8_HANDLER( unkch_reel3_attrram_w ) | |
| 190 | { | |
| 191 | goldstar_state *state = (goldstar_state *)space->machine->driver_data; | |
| 192 | ||
| 193 | state->reel3_attrram[offset] = data; | |
| 194 | tilemap_mark_tile_dirty(state->reel3_tilemap,offset); | |
| 195 | } | |
| 196 | ||
| 197 | ||
| 198 | static TILE_GET_INFO( get_unkch_reel1_tile_info ) | |
| 199 | { | |
| 200 | goldstar_state *state = (goldstar_state *)machine->driver_data; | |
| 201 | int code = state->reel1_ram[tile_index]; | |
| 202 | int attr = state->reel1_attrram[tile_index]; | |
| 203 | ||
| 204 | SET_TILE_INFO( | |
| 205 | 1, | |
| 206 | code | (attr & 0x0f)<<8, | |
| 207 | (attr&0xf0)>>4, | |
| 208 | 0); | |
| 209 | } | |
| 210 | ||
| 211 | static TILE_GET_INFO( get_unkch_reel2_tile_info ) | |
| 212 | { | |
| 213 | goldstar_state *state = (goldstar_state *)machine->driver_data; | |
| 214 | int code = state->reel2_ram[tile_index]; | |
| 215 | int attr = state->reel2_attrram[tile_index]; | |
| 216 | ||
| 217 | SET_TILE_INFO( | |
| 218 | 1, | |
| 219 | code | (attr & 0x0f)<<8, | |
| 220 | (attr&0xf0)>>4, | |
| 221 | 0); | |
| 222 | } | |
| 223 | ||
| 224 | static TILE_GET_INFO( get_unkch_reel3_tile_info ) | |
| 225 | { | |
| 226 | goldstar_state *state = (goldstar_state *)machine->driver_data; | |
| 227 | int code = state->reel3_ram[tile_index]; | |
| 228 | int attr = state->reel3_attrram[tile_index]; | |
| 229 | ||
| 230 | SET_TILE_INFO( | |
| 231 | 1, | |
| 232 | code | (attr & 0x0f)<<8, | |
| 233 | (attr&0xf0)>>4, | |
| 234 | 0); | |
| 235 | } | |
| 236 | ||
| 237 | ||
| 238 | ||
| 239 | ||
| 160 | 240 | VIDEO_START( goldstar ) |
| 161 | 241 | { |
| 162 | 242 | goldstar_state *state = (goldstar_state *)machine->driver_data; |
| r7553 | r7554 | |
| 176 | 256 | state->cm_enable_reg = 0x0b; |
| 177 | 257 | } |
| 178 | 258 | |
| 259 | VIDEO_START( magical ) | |
| 260 | { | |
| 261 | goldstar_state *state = (goldstar_state *)machine->driver_data; | |
| 262 | ||
| 263 | state->reel1_tilemap = tilemap_create(machine,get_goldstar_reel1_tile_info,tilemap_scan_rows,8,32, 64, 8); | |
| 264 | state->reel2_tilemap = tilemap_create(machine,get_goldstar_reel2_tile_info,tilemap_scan_rows,8,32, 64, 8); | |
| 265 | state->reel3_tilemap = tilemap_create(machine,get_goldstar_reel3_tile_info,tilemap_scan_rows,8,32, 64, 8); | |
| 266 | ||
| 267 | tilemap_set_scroll_cols(state->reel1_tilemap, 32); | |
| 268 | tilemap_set_scroll_cols(state->reel2_tilemap, 32); | |
| 269 | tilemap_set_scroll_cols(state->reel3_tilemap, 32); | |
| 270 | ||
| 271 | state->fg_tilemap = tilemap_create(machine,get_magical_fg_tile_info,tilemap_scan_rows,8,8, 64, 32); | |
| 272 | tilemap_set_transparent_pen(state->fg_tilemap,0); | |
| 273 | ||
| 274 | // is there an enable reg for this game? | |
| 275 | state->cm_enable_reg = 0x0b; | |
| 276 | } | |
| 277 | ||
| 278 | VIDEO_START( unkch ) | |
| 279 | { | |
| 280 | goldstar_state *state = (goldstar_state *)machine->driver_data; | |
| 281 | ||
| 282 | state->reel1_tilemap = tilemap_create(machine,get_unkch_reel1_tile_info,tilemap_scan_rows,8,32, 64, 8); | |
| 283 | state->reel2_tilemap = tilemap_create(machine,get_unkch_reel2_tile_info,tilemap_scan_rows,8,32, 64, 8); | |
| 284 | state->reel3_tilemap = tilemap_create(machine,get_unkch_reel3_tile_info,tilemap_scan_rows,8,32, 64, 8); | |
| 285 | ||
| 286 | tilemap_set_scroll_cols(state->reel1_tilemap, 32); | |
| 287 | tilemap_set_scroll_cols(state->reel2_tilemap, 32); | |
| 288 | tilemap_set_scroll_cols(state->reel3_tilemap, 32); | |
| 289 | ||
| 290 | state->cmaster_girl_num = 0; | |
| 291 | state->cmaster_girl_pal = 0; | |
| 292 | state->unkch_vidreg = 0x00; | |
| 293 | ||
| 294 | state->fg_tilemap = tilemap_create(machine,get_cherrym_fg_tile_info,tilemap_scan_rows,8,8, 64, 32); | |
| 295 | tilemap_set_transparent_pen(state->fg_tilemap,0); | |
| 296 | ||
| 297 | state->cm_enable_reg = 0x0b; | |
| 298 | } | |
| 299 | ||
| 179 | 300 | VIDEO_START( cherrym ) |
| 180 | 301 | { |
| 181 | 302 | goldstar_state *state = (goldstar_state *)machine->driver_data; |
| r7553 | r7554 | |
| 263 | 384 | static const rectangle am1a_visible2 = { 0*8, (14+48)*8-1, 10*8, (10+6)*8-1 }; |
| 264 | 385 | static const rectangle am1a_visible3 = { 0*8, (14+48)*8-1, 16*8, (16+6)*8-1 }; |
| 265 | 386 | |
| 387 | static const rectangle unkch_visible1 = { 0*8, (14+48)*8-1, 3*8, (3+7)*8-1 }; | |
| 388 | static const rectangle unkch_visible2 = { 0*8, (14+48)*8-1, 10*8, (10+7)*8-1 }; | |
| 389 | static const rectangle unkch_visible3 = { 0*8, (14+48)*8-1, 17*8, (17+7)*8-1 }; | |
| 266 | 390 | |
| 391 | static const rectangle magical_visible1 = { 0*8, (14+48)*8-1, 4*8, (4+8)*8-1 }; | |
| 392 | static const rectangle magical_visible2 = { 0*8, (14+48)*8-1, 12*8, (12+8)*8-1 }; | |
| 393 | static const rectangle magical_visible3 = { 0*8, (14+48)*8-1, 20*8, (20+8)*8-1 }; | |
| 394 | ||
| 395 | static const rectangle magical_visible1alt = { 0*8, (16+48)*8-1, 4*8, 16*8-1 }; | |
| 396 | static const rectangle magical_visible2alt = { 0*8, (16+48)*8-1, 16*8, 28*8-1 }; | |
| 397 | ||
| 398 | ||
| 267 | 399 | VIDEO_UPDATE( goldstar ) |
| 268 | 400 | { |
| 269 | 401 | goldstar_state *state = (goldstar_state *)screen->machine->driver_data; |
| r7553 | r7554 | |
| 309 | 441 | return 0; |
| 310 | 442 | } |
| 311 | 443 | |
| 444 | ||
| 445 | VIDEO_UPDATE( magical ) | |
| 446 | { | |
| 447 | goldstar_state *state = (goldstar_state *)screen->machine->driver_data; | |
| 448 | int i; | |
| 449 | ||
| 450 | bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine)); | |
| 451 | ||
| 452 | if (!state->cm_enable_reg &0x01) | |
| 453 | return 0; | |
| 454 | ||
| 455 | if (state->cm_enable_reg &0x08) | |
| 456 | { | |
| 457 | // guess, could be wrong, but different screens clearly need different reel layouts | |
| 458 | if (state->unkch_vidreg & 2) | |
| 459 | { | |
| 460 | for (i= 0;i < 32;i++) | |
| 461 | { | |
| 462 | tilemap_set_scrolly(state->reel1_tilemap, i, state->reel1_scroll[i*2]); | |
| 463 | tilemap_set_scrolly(state->reel2_tilemap, i, state->reel2_scroll[i*2]); | |
| 464 | // tilemap_set_scrolly(state->reel3_tilemap, i, state->reel3_scroll[i*2]); | |
| 465 | } | |
| 466 | ||
| 467 | ||
| 468 | tilemap_draw(bitmap, &magical_visible1alt, state->reel1_tilemap, 0, 0); | |
| 469 | tilemap_draw(bitmap, &magical_visible2alt, state->reel2_tilemap, 0, 0); | |
| 470 | //tilemap_draw(bitmap, &magical_visible3, state->reel3_tilemap, 0, 0); | |
| 471 | } | |
| 472 | else | |
| 473 | { | |
| 474 | for (i= 0;i < 32;i++) | |
| 475 | { | |
| 476 | tilemap_set_scrolly(state->reel1_tilemap, i, state->reel1_scroll[i*2]); | |
| 477 | tilemap_set_scrolly(state->reel2_tilemap, i, state->reel2_scroll[i*2]); | |
| 478 | tilemap_set_scrolly(state->reel3_tilemap, i, state->reel3_scroll[i*2]); | |
| 479 | } | |
| 480 | ||
| 481 | ||
| 482 | tilemap_draw(bitmap, &magical_visible1, state->reel1_tilemap, 0, 0); | |
| 483 | tilemap_draw(bitmap, &magical_visible2, state->reel2_tilemap, 0, 0); | |
| 484 | tilemap_draw(bitmap, &magical_visible3, state->reel3_tilemap, 0, 0); | |
| 485 | } | |
| 486 | } | |
| 487 | ||
| 488 | if (state->cm_enable_reg &0x02) | |
| 489 | { | |
| 490 | tilemap_draw(bitmap,cliprect, state->fg_tilemap, 0, 0); | |
| 491 | } | |
| 492 | ||
| 493 | return 0; | |
| 494 | } | |
| 495 | ||
| 496 | ||
| 497 | VIDEO_UPDATE( unkch ) | |
| 498 | { | |
| 499 | goldstar_state *state = (goldstar_state *)screen->machine->driver_data; | |
| 500 | int i; | |
| 501 | ||
| 502 | bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine)); | |
| 503 | ||
| 504 | if (!state->cm_enable_reg &0x01) | |
| 505 | return 0; | |
| 506 | ||
| 507 | if (state->cm_enable_reg &0x08) | |
| 508 | { | |
| 509 | // guess, this could be something else completely!! | |
| 510 | // only draw the first 'reels' tilemap, but fullscreen, using alt registers? (or no scrolling at all? - doubtful, see girl) | |
| 511 | if (state->unkch_vidreg & 0x40) | |
| 512 | { | |
| 513 | for (i= 0;i < 32;i++) | |
| 514 | { | |
| 515 | tilemap_set_scrolly(state->reel1_tilemap, i, -0x08/*state->reel1_scroll[(i*2)+1]*/); | |
| 516 | // tilemap_set_scrolly(state->reel2_tilemap, i, state->reel2_scroll[(i*2)+1]); | |
| 517 | // tilemap_set_scrolly(state->reel3_tilemap, i, state->reel3_scroll[(i*2)+1]); | |
| 518 | } | |
| 519 | ||
| 520 | tilemap_draw(bitmap, cliprect, state->reel1_tilemap, 0, 0); | |
| 521 | ||
| 522 | } | |
| 523 | // or draw the reels normally? | |
| 524 | else | |
| 525 | { | |
| 526 | for (i= 0;i < 32;i++) | |
| 527 | { | |
| 528 | tilemap_set_scrolly(state->reel1_tilemap, i, state->reel1_scroll[i*2]); | |
| 529 | tilemap_set_scrolly(state->reel2_tilemap, i, state->reel2_scroll[i*2]); | |
| 530 | tilemap_set_scrolly(state->reel3_tilemap, i, state->reel3_scroll[i*2]); | |
| 531 | } | |
| 532 | ||
| 533 | tilemap_draw(bitmap, &unkch_visible1, state->reel1_tilemap, 0, 0); | |
| 534 | tilemap_draw(bitmap, &unkch_visible2, state->reel2_tilemap, 0, 0); | |
| 535 | tilemap_draw(bitmap, &unkch_visible3, state->reel3_tilemap, 0, 0); | |
| 536 | } | |
| 537 | } | |
| 538 | ||
| 539 | if (state->cm_enable_reg &0x02) | |
| 540 | { | |
| 541 | tilemap_draw(bitmap,cliprect, state->fg_tilemap, 0, 0); | |
| 542 | } | |
| 543 | ||
| 544 | return 0; | |
| 545 | } | |
| 546 | ||
| 312 | 547 | VIDEO_UPDATE( cmast91 ) |
| 313 | 548 | { |
| 314 | 549 | goldstar_state *state = (goldstar_state *)screen->machine->driver_data; |
| r7553 | r7554 | |
|---|---|---|
| 1289 | 1289 | {"dinoj", CPS_B_21_QS2, mapper_CD63B }, /* layer enable never used */ |
| 1290 | 1290 | {"dinopic", CPS_B_21_QS2, mapper_CD63B }, /* layer enable never used */ |
| 1291 | 1291 | {"dinopic2", CPS_B_21_QS2, mapper_CD63B }, /* layer enable never used */ |
| 1292 | {"dinohunt", CPS_B_21_DEF, mapper_CD63B }, /* Chinese bootleg */ | |
| 1292 | 1293 | {"punisher", CPS_B_21_QS3, mapper_PS63B }, |
| 1293 | 1294 | {"punisheru",CPS_B_21_QS3, mapper_PS63B }, |
| 1294 | 1295 | {"punisherj",CPS_B_21_QS3, mapper_PS63B }, |
| 1295 | 1296 | {"punipic", CPS_B_21_QS3, mapper_PS63B }, |
| 1296 | 1297 | {"punipic2", CPS_B_21_QS3, mapper_PS63B }, |
| 1297 | 1298 | {"punipic3", CPS_B_21_QS3, mapper_PS63B }, |
| 1299 | {"punisherbz", CPS_B_21_DEF, mapper_PS63B }, /* Chinese bootleg */ | |
| 1298 | 1300 | {"slammast", CPS_B_21_QS4, mapper_MB63B }, |
| 1299 | 1301 | {"slammastu",CPS_B_21_QS4, mapper_MB63B }, |
| 1300 | 1302 | {"mbomberj", CPS_B_21_QS4, mapper_MB63B }, |
| r7553 | r7554 | |
| 1472 | 1474 | if (offset == 0x24 / 2 && state->cps_version == 2) |
| 1473 | 1475 | return; |
| 1474 | 1476 | |
| 1477 | #ifdef MAME_DEBUG | |
| 1475 | 1478 | if (offset > CPS1_VIDEOCONTROL) |
| 1476 | 1479 | popmessage("write to CPS-A register %02x contact MAMEDEV", offset * 2); |
| 1480 | #endif | |
| 1477 | 1481 | } |
| 1478 | 1482 | |
| 1479 | 1483 | |
| r7553 | r7554 | |
| 1514 | 1518 | if (offset == 0x12/2) |
| 1515 | 1519 | return state->cps_b_regs[0x12 / 2]; |
| 1516 | 1520 | } |
| 1517 | ||
| 1521 | #ifdef MAME_DEBUG | |
| 1518 | 1522 | popmessage("CPS-B read port %02x contact MAMEDEV", offset * 2); |
| 1519 | ||
| 1523 | #endif | |
| 1520 | 1524 | return 0xffff; |
| 1521 | 1525 | } |
| 1522 | 1526 | |
| r7553 | r7554 | |
| 1567 | 1571 | } |
| 1568 | 1572 | } |
| 1569 | 1573 | |
| 1570 | ||
| 1574 | #ifdef MAME_DEBUG | |
| 1571 | 1575 | if (offset != state->game_config->cpsb_addr / 2 && // only varth writes here |
| 1572 | 1576 | offset != state->game_config->mult_factor1 / 2 && |
| 1573 | 1577 | offset != state->game_config->mult_factor2 / 2 && |
| r7553 | r7554 | |
| 1583 | 1587 | offset != state->game_config->out2_addr / 2 && |
| 1584 | 1588 | !state->game_config->bootleg_kludge) |
| 1585 | 1589 | popmessage("CPS-B write %04x to port %02x contact MAMEDEV", data, offset * 2); |
| 1590 | #endif | |
| 1586 | 1591 | } |
| 1587 | 1592 | |
| 1588 | 1593 | |
| r7553 | r7554 | |
| 1769 | 1774 | if (state->game_config->layer_enable_mask[1] == state->game_config->layer_enable_mask[2]) |
| 1770 | 1775 | enablemask = state->game_config->layer_enable_mask[1]; |
| 1771 | 1776 | |
| 1777 | #ifdef MAME_DEBUG | |
| 1772 | 1778 | if (enablemask) |
| 1773 | 1779 | { |
| 1774 | 1780 | if (((layercontrol & enablemask) && (layercontrol & enablemask) != enablemask)) |
| 1775 | 1781 | popmessage("layer %02x contact MAMEDEV", layercontrol & 0xc03f); |
| 1776 | 1782 | } |
| 1783 | #endif | |
| 1777 | 1784 | |
| 1778 | 1785 | enablemask = state->game_config->layer_enable_mask[0] | state->game_config->layer_enable_mask[1] |
| 1779 | 1786 | | state->game_config->layer_enable_mask[2] |
| 1780 | 1787 | | state->game_config->layer_enable_mask[3] | state->game_config->layer_enable_mask[4]; |
| 1781 | 1788 | |
| 1789 | #ifdef MAME_DEBUG | |
| 1782 | 1790 | if (((layercontrol & ~enablemask) & 0x003e) != 0) |
| 1783 | 1791 | popmessage("layer %02x contact MAMEDEV", layercontrol & 0xc03f); |
| 1792 | #endif | |
| 1793 | ||
| 1784 | 1794 | } |
| 1785 | 1795 | |
| 1786 | 1796 | } |
| r7553 | r7554 | |
|---|---|---|
| 13 | 13 | #endif |
| 14 | 14 | { |
| 15 | 15 | #if defined(MASK_S) |
| 16 | INT32 swrap; | |
| 17 | #endif | |
| 18 | #if defined(MASK_T) | |
| 19 | INT32 twrap; | |
| 20 | #endif | |
| 21 | ||
| 22 | #if defined(MASK_S) | |
| 23 | swrap = *S >> tex_tile->mask_s; | |
| 16 | INT32 swrap = *S >> tex_tile->mask_s; | |
| 24 | 17 | swrap &= 1; |
| 25 | 18 | if (tex_tile->ms && swrap) |
| 26 | 19 | { |
| r7553 | r7554 | |
| 33 | 26 | #endif |
| 34 | 27 | |
| 35 | 28 | #if defined(MASK_T) |
| 36 | twrap = *T >> tex_tile->mask_t; | |
| 29 | INT32 twrap = *T >> tex_tile->mask_t; | |
| 37 | 30 | twrap &= 1; |
| 38 | 31 | if (tex_tile->mt && twrap) |
| 39 | 32 | { |
| r7553 | r7554 | |
|---|---|---|
| 138 | 138 | |
| 139 | 139 | INLINE void snes_draw_blend( UINT16 offset, UINT16 *colour, UINT8 prevent_color_math, UINT8 black_pen_clip, int switch_screens ) |
| 140 | 140 | { |
| 141 | /* when color math is applied to subscreen pixels, the blending depends on the blending used by the previous mainscreen | |
| 142 | pixel, except for subscreen pixel 0 which has no previous mainscreen pixel, see comments in snes_refresh_scanline */ | |
| 141 | /* when color math is applied to subscreen pixels, the blending depends on the blending used by the previous mainscreen | |
| 142 | pixel, except for subscreen pixel 0 which has no previous mainscreen pixel, see comments in snes_refresh_scanline */ | |
| 143 | 143 | if (switch_screens && offset > 0) |
| 144 | 144 | offset -= 1; |
| 145 | 145 | |
| r7553 | r7554 | |
| 480 | 480 | scanlines[SNES_SUBSCREEN].layer[ii >> 1] = layer; |
| 481 | 481 | } |
| 482 | 482 | } |
| 483 | } | |
| 483 | } | |
| 484 | 484 | } |
| 485 | 485 | } |
| 486 | 486 | } |
| r7553 | r7554 | |
| 1003 | 1003 | |
| 1004 | 1004 | // FIXME: The following functions should be used to create sprite list with |
| 1005 | 1005 | // obsel data from the previous line. Unfortunately, some games are very picky |
| 1006 | // about when you set up sprite attributes (e.g. Super Star Wars - The Empire | |
| 1006 | // about when you set up sprite attributes (e.g. Super Star Wars - The Empire | |
| 1007 | 1007 | // Strikes Back and Super Street Fighter II) and they would freeze if we only build |
| 1008 | 1008 | // part of the sprite attributes at the right moment and part of them later, during |
| 1009 | 1009 | // scanline drawing. Hence, these functions are on hold until more OAM refactoring |
| r7553 | r7554 | |
| 1060 | 1060 | { |
| 1061 | 1061 | case 0: /* 8x8 or 16x16 */ |
| 1062 | 1062 | oam_list[i].width = oam_list[i].size ? 2 : 1; |
| 1063 | oam_list[i].height = oam_list[i].size ? 2 : 1; | |
| 1063 | oam_list[i].height = oam_list[i].size ? 2 : 1; | |
| 1064 | 1064 | break; |
| 1065 | 1065 | case 1: /* 8x8 or 32x32 */ |
| 1066 | 1066 | oam_list[i].width = oam_list[i].size ? 4 : 1; |
| 1067 | oam_list[i].height = oam_list[i].size ? 4 : 1; | |
| 1067 | oam_list[i].height = oam_list[i].size ? 4 : 1; | |
| 1068 | 1068 | break; |
| 1069 | 1069 | case 2: /* 8x8 or 64x64 */ |
| 1070 | 1070 | oam_list[i].width = oam_list[i].size ? 8 : 1; |
| 1071 | oam_list[i].height = oam_list[i].size ? 8 : 1; | |
| 1071 | oam_list[i].height = oam_list[i].size ? 8 : 1; | |
| 1072 | 1072 | break; |
| 1073 | 1073 | case 3: /* 16x16 or 32x32 */ |
| 1074 | 1074 | oam_list[i].width = oam_list[i].size ? 4 : 2; |
| 1075 | oam_list[i].height = oam_list[i].size ? 4 : 2; | |
| 1075 | oam_list[i].height = oam_list[i].size ? 4 : 2; | |
| 1076 | 1076 | break; |
| 1077 | 1077 | case 4: /* 16x16 or 64x64 */ |
| 1078 | 1078 | oam_list[i].width = oam_list[i].size ? 8 : 2; |
| 1079 | oam_list[i].height = oam_list[i].size ? 8 : 2; | |
| 1079 | oam_list[i].height = oam_list[i].size ? 8 : 2; | |
| 1080 | 1080 | break; |
| 1081 | 1081 | case 5: /* 32x32 or 64x64 */ |
| 1082 | 1082 | oam_list[i].width = oam_list[i].size ? 8 : 4; |
| 1083 | oam_list[i].height = oam_list[i].size ? 8 : 4; | |
| 1083 | oam_list[i].height = oam_list[i].size ? 8 : 4; | |
| 1084 | 1084 | break; |
| 1085 | 1085 | case 6: /* undocumented: 16x32 or 32x64 */ |
| 1086 | 1086 | oam_list[i].width = oam_list[i].size ? 4 : 2; |
| 1087 | oam_list[i].height = oam_list[i].size ? 8 : 4; | |
| 1087 | oam_list[i].height = oam_list[i].size ? 8 : 4; | |
| 1088 | 1088 | if (snes_ppu.obj_interlace && !oam_list[i].size) |
| 1089 | 1089 | oam_list[i].height = 2; |
| 1090 | 1090 | break; |
| 1091 | 1091 | case 7: /* undocumented: 16x32 or 32x32 */ |
| 1092 | 1092 | oam_list[i].width = oam_list[i].size ? 4 : 2; |
| 1093 | oam_list[i].height = oam_list[i].size ? 4 : 4; | |
| 1093 | oam_list[i].height = oam_list[i].size ? 4 : 4; | |
| 1094 | 1094 | if (snes_ppu.obj_interlace && !oam_list[i].size) |
| 1095 | 1095 | oam_list[i].height = 2; |
| 1096 | 1096 | break; |
| r7553 | r7554 | |
| 1146 | 1146 | curline *= snes_ppu.obj_interlace; |
| 1147 | 1147 | |
| 1148 | 1148 | charaddr = snes_ppu.oam.next_charmap << 13; |
| 1149 | ||
| 1149 | ||
| 1150 | 1150 | for (i = 128; i > 0; i--) |
| 1151 | 1151 | { |
| 1152 | 1152 | if ((i % 4) == 0) |
| r7553 | r7554 | |
| 1385 | 1385 | case 7: snes_update_mode_7(curline); break; /* Mode 7 - Supports direct colour */ |
| 1386 | 1386 | } |
| 1387 | 1387 | } |
| 1388 | ||
| 1388 | ||
| 1389 | 1389 | /********************************************* |
| 1390 | 1390 | * snes_update_windowmasks() |
| 1391 | 1391 | * |
| r7553 | r7554 | |
| 1580 | 1580 | { |
| 1581 | 1581 | c = scanline2->buffer[x]; |
| 1582 | 1582 | |
| 1583 | /* in hires, subscreen pixels are blended as well: for each subscreen pixel, color math is applied if | |
| 1584 | it had been applied to the previous mainscreen pixel. What happens at subscreen pixel 0 (which has no | |
| 1585 | previous mainscreen pixel) is undocumented. Until more info are discovered, we (arbitrarily) apply to it | |
| 1586 | the same color math as the *next* mainscreen pixel (i.e. mainscreen pixel 0) */ | |
| 1583 | /* in hires, subscreen pixels are blended as well: for each subscreen pixel, color math is applied if | |
| 1584 | it had been applied to the previous mainscreen pixel. What happens at subscreen pixel 0 (which has no | |
| 1585 | previous mainscreen pixel) is undocumented. Until more info are discovered, we (arbitrarily) apply to it | |
| 1586 | the same color math as the *next* mainscreen pixel (i.e. mainscreen pixel 0) */ | |
| 1587 | 1587 | |
| 1588 | 1588 | if (x == 0 && !scanline1->blend_exception[0] && snes_ppu.layer[scanline1->layer[0]].color_math) |
| 1589 | 1589 | snes_draw_blend(0, &c, snes_ppu.prevent_color_math, snes_ppu.clip_to_black, 1); |
| r7553 | r7554 | |
|---|---|---|
| 124 | 124 | #endif |
| 125 | 125 | #endif |
| 126 | 126 | { |
| 127 | int r, g, b; | |
| 128 | int special_bsel = 0; | |
| 129 | 127 | UINT16 mem = *fb; |
| 130 | 128 | #if defined(IMGREAD) |
| 131 | 129 | UINT32 memory_cvg = ((mem & 1) << 2) + (*hb & 3); |
| r7553 | r7554 | |
| 144 | 142 | return 0; |
| 145 | 143 | } |
| 146 | 144 | |
| 145 | int special_bsel = 0; | |
| 147 | 146 | if (blender2b_a[0] == &memory_color.i.a) |
| 148 | 147 | { |
| 149 | 148 | special_bsel = 1; |
| r7553 | r7554 | |
| 163 | 162 | memory_color.i.a = 0xe0; |
| 164 | 163 | #endif |
| 165 | 164 | |
| 165 | int r, g, b; | |
| 166 | 166 | #if defined(ZCOMPARE) |
| 167 | 167 | #if defined(FORCEBLEND) |
| 168 | 168 | inv_pixel_color.i.a = 0xff - *blender1b_a[0]; |
| r7553 | r7554 | |
| 331 | 331 | #endif |
| 332 | 332 | #endif |
| 333 | 333 | { |
| 334 | int r, g, b; | |
| 335 | int special_bsel = 0; | |
| 336 | 334 | UINT16 mem = *fb; |
| 337 | 335 | #if defined(IMGREAD) |
| 338 | 336 | UINT32 memory_cvg = ((mem & 1) << 2) + (*hb & 3); |
| r7553 | r7554 | |
| 351 | 349 | return 0; |
| 352 | 350 | } |
| 353 | 351 | |
| 352 | int special_bsel = 0; | |
| 354 | 353 | if (blender2b_a[0] == &memory_color.i.a) |
| 355 | 354 | { |
| 356 | 355 | special_bsel = 1; |
| r7553 | r7554 | |
| 372 | 371 | |
| 373 | 372 | inv_pixel_color.i.a = 0xff - *blender1b_a[0]; |
| 374 | 373 | |
| 374 | int r, g, b; | |
| 375 | 375 | #if defined(FORCEBLEND) |
| 376 | 376 | BLENDER_EQUATION0_FORCE(&r, &g, &b, special_bsel); |
| 377 | 377 | #else |
| r7553 | r7554 | |
| 496 | 496 | #endif |
| 497 | 497 | #endif |
| 498 | 498 | { |
| 499 | int r, g, b; | |
| 500 | int special_bsel = 0; | |
| 501 | 499 | UINT16 mem = *fb; |
| 502 | 500 | #if defined(IMGREAD) |
| 503 | 501 | UINT32 memory_cvg = ((mem & 1) << 2) + (*hb & 3); |
| r7553 | r7554 | |
| 516 | 514 | return 0; |
| 517 | 515 | } |
| 518 | 516 | |
| 517 | int special_bsel = 0; | |
| 519 | 518 | if (blender2b_a[0] == &memory_color.i.a) |
| 520 | 519 | { |
| 521 | 520 | special_bsel = 1; |
| r7553 | r7554 | |
| 535 | 534 | memory_color.i.a = 0xe0; |
| 536 | 535 | #endif |
| 537 | 536 | |
| 537 | int r, g, b; | |
| 538 | 538 | #if defined(ZCOMPARE) |
| 539 | 539 | #if defined(FORCEBLEND) |
| 540 | 540 | inv_pixel_color.i.a = 0xff - *blender1b_a[0]; |
| r7553 | r7554 | |
| 631 | 631 | #endif |
| 632 | 632 | #endif |
| 633 | 633 | { |
| 634 | int r, g, b; | |
| 635 | int special_bsel = 0; | |
| 636 | 634 | UINT16 mem = *fb; |
| 637 | 635 | #if defined(IMGREAD) |
| 638 | 636 | UINT32 memory_cvg = ((mem & 1) << 2) + (*hb & 3); |
| r7553 | r7554 | |
| 651 | 649 | return 0; |
| 652 | 650 | } |
| 653 | 651 | |
| 652 | int special_bsel = 0; | |
| 654 | 653 | if (blender2b_a[0] == &memory_color.i.a) |
| 655 | 654 | { |
| 656 | 655 | special_bsel = 1; |
| r7553 | r7554 | |
| 672 | 671 | |
| 673 | 672 | inv_pixel_color.i.a = 0xff - *blender1b_a[0]; |
| 674 | 673 | |
| 674 | int r, g, b; | |
| 675 | 675 | #if defined(FORCEBLEND) |
| 676 | 676 | BLENDER_EQUATION0_FORCE(&r, &g, &b, special_bsel); |
| 677 | 677 | #else |
| r7553 | r7554 | |
|---|---|---|
| 769 | 769 | UINT8 *zhb = &hidden_bits[zb_address >> 1]; |
| 770 | 770 | #endif |
| 771 | 771 | |
| 772 | int i, j; | |
| 773 | ||
| 774 | int clipx1, clipx2, clipy1, clipy2; | |
| 775 | ||
| 776 | 772 | #if defined(SHADE) |
| 777 | 773 | SPAN_PARAM dr = span[0].dr; |
| 778 | 774 | SPAN_PARAM dg = span[0].dg; |
| r7553 | r7554 | |
| 828 | 824 | } |
| 829 | 825 | #endif |
| 830 | 826 | |
| 831 | clipx1 = clip.xh / 4; | |
| 832 | clipx2 = clip.xl / 4; | |
| 833 | clipy1 = clip.yh / 4; | |
| 834 | clipy2 = clip.yl / 4; | |
| 835 | ||
| 836 | 827 | #if defined(TEXTURE) |
| 837 | 828 | calculate_clamp_diffs(tex_tile->num); |
| 838 | 829 | |
| r7553 | r7554 | |
| 847 | 838 | } |
| 848 | 839 | #endif |
| 849 | 840 | |
| 850 | if (start < clipy | |
| 841 | if (start < clip.yh) | |
| 851 | 842 | { |
| 852 | start = clipy | |
| 843 | start = clip.yh; | |
| 853 | 844 | } |
| 854 | if (start >= clipy | |
| 845 | if (start >= clip.yl) | |
| 855 | 846 | { |
| 856 | start = clipy | |
| 847 | start = clip.yl - 1; | |
| 857 | 848 | } |
| 858 | if (end < clipy | |
| 849 | if (end < clip.yh) | |
| 859 | 850 | { |
| 860 | end = clipy | |
| 851 | end = clip.yh; | |
| 861 | 852 | } |
| 862 | if (end >= clipy | |
| 853 | if (end >= clip.yl) // Needed by 40 Winks | |
| 863 | 854 | { |
| 864 | end = clipy | |
| 855 | end = clip.yl - 1; | |
| 865 | 856 | } |
| 866 | 857 | |
| 867 | 858 | #if !defined(SHADE) |
| r7553 | r7554 | |
| 870 | 861 | |
| 871 | 862 | CACHE_TEXTURE_PARAMS(tex_tile); |
| 872 | 863 | |
| 873 | for (i = start; i <= end; i++) | |
| 864 | for (int i = start; i <= end; i++) | |
| 874 | 865 | { |
| 875 | int xstart = span[i].lx; | |
| 876 | int xend = span[i].rx; | |
| 866 | int x = span[i].rx; | |
| 877 | 867 | |
| 878 | int x; | |
| 879 | ||
| 880 | 868 | int fb_index = fb_width * i; |
| 881 | int length; | |
| 882 | 869 | |
| 883 | 870 | #if defined(SHADE) |
| 884 | 871 | SPAN_PARAM r = span[i].r; |
| r7553 | r7554 | |
| 895 | 882 | SPAN_PARAM z = span[i].z; |
| 896 | 883 | #endif |
| 897 | 884 | |
| 898 | x = xend; | |
| 899 | ||
| 900 | 885 | #if defined(FLIP) |
| 901 | length = ( | |
| 886 | int length = ( | |
| 902 | 887 | #else |
| 903 | length = ( | |
| 888 | int length = (span[i].rx - | |
| 904 | 889 | #endif |
| 905 | 890 | |
| 906 | for (j = 0; j <= length; j++) | |
| 891 | for (int j = 0; j <= length; j++) | |
| 907 | 892 | { |
| 908 | 893 | #if defined(SHADE) |
| 909 | 894 | int sr = r.h.h; |
| r7553 | r7554 | |
| 931 | 916 | } |
| 932 | 917 | #endif |
| 933 | 918 | |
| 934 | if (x >= clipx | |
| 919 | if (x >= clip.xh && x < clip.xl) | |
| 935 | 920 | { |
| 936 | 921 | #if defined(ZCOMPARE) |
| 937 | 922 | int z_compare_result = 1; |
| r7553 | r7554 | |
| 994 | 979 | #endif |
| 995 | 980 | { |
| 996 | 981 | #if defined(ZUPDATE) |
| 997 | int rendered = 0; | |
| 998 | 982 | #endif |
| 999 | 983 | #if defined(MAGICDITHER) |
| 1000 | 984 | int dith = magic_matrix[(((i) & 3) << 2) + ((x ^ WORD_ADDR_XOR) & 3)]; |
| r7553 | r7554 | |
| 1004 | 988 | |
| 1005 | 989 | #if defined(ZUPDATE) |
| 1006 | 990 | #if defined(MAGICDITHER) || defined(BAYERDITHER) |
| 1007 | rendered = BLENDER1_16_DITH(fbcur, hbcur, c1, dith); | |
| 991 | int rendered = BLENDER1_16_DITH(fbcur, hbcur, c1, dith); | |
| 1008 | 992 | #else |
| 1009 | rendered = BLENDER1_16_NDITH(fbcur, hbcur, c1); | |
| 993 | int rendered = BLENDER1_16_NDITH(fbcur, hbcur, c1); | |
| 1010 | 994 | #endif |
| 1011 | 995 | |
| 1012 | 996 | if (rendered) |
| r7553 | r7554 | |
| 1819 | 1803 | UINT8 *zhb = &hidden_bits[zb_address >> 1]; |
| 1820 | 1804 | #endif |
| 1821 | 1805 | |
| 1822 | int i, j; | |
| 1823 | ||
| 1824 | int clipx1, clipx2, clipy1, clipy2; | |
| 1825 | ||
| 1826 | 1806 | #if defined(SHADE) |
| 1827 | 1807 | SPAN_PARAM dr = span[0].dr; |
| 1828 | 1808 | SPAN_PARAM dg = span[0].dg; |
| r7553 | r7554 | |
| 1847 | 1827 | TILE *tex_tile2 = NULL; |
| 1848 | 1828 | int tilenum; |
| 1849 | 1829 | |
| 1850 | int LOD = 0; | |
| 1851 | INT32 horstep, vertstep; | |
| 1852 | INT32 l_tile; | |
| 1853 | UINT32 magnify = 0; | |
| 1854 | UINT32 distant = 0; | |
| 1830 | int nexts;// = 0; | |
| 1831 | int nextt;// = 0; | |
| 1832 | int nextsw;// = 0; | |
| 1855 | 1833 | |
| 1856 | int nexts, nextt, nextsw; | |
| 1857 | int lodclamp = 0; | |
| 1858 | ||
| 1859 | 1834 | SPAN_PARAM ds = span[0].ds; |
| 1860 | 1835 | SPAN_PARAM dt = span[0].dt; |
| 1861 | 1836 | SPAN_PARAM dw = span[0].dw; |
| r7553 | r7554 | |
| 1900 | 1875 | } |
| 1901 | 1876 | #endif |
| 1902 | 1877 | |
| 1903 | clipx1 = clip.xh / 4; | |
| 1904 | clipx2 = clip.xl / 4; | |
| 1905 | clipy1 = clip.yh / 4; | |
| 1906 | clipy2 = clip.yl / 4; | |
| 1907 | ||
| 1908 | if (start < clipy1) | |
| 1878 | if (start < clip.yh) | |
| 1909 | 1879 | { |
| 1910 | start = clipy | |
| 1880 | start = clip.yh; | |
| 1911 | 1881 | } |
| 1912 | if (start >= clipy | |
| 1882 | if (start >= clip.yl) | |
| 1913 | 1883 | { |
| 1914 | start = clipy | |
| 1884 | start = clip.yl - 1; | |
| 1915 | 1885 | } |
| 1916 | if (end < clipy | |
| 1886 | if (end < clip.yh) | |
| 1917 | 1887 | { |
| 1918 | end = clipy | |
| 1888 | end = clip.yh; | |
| 1919 | 1889 | } |
| 1920 | if (end >= clipy | |
| 1890 | if (end >= clip.yl) // Needed by 40 Winks | |
| 1921 | 1891 | { |
| 1922 | end = clipy | |
| 1892 | end = clip.yl - 1; | |
| 1923 | 1893 | } |
| 1924 | 1894 | |
| 1925 | 1895 | #if !defined(SHADE) |
| 1926 | 1896 | shade_color.c = prim_color.c; |
| 1927 | 1897 | #endif |
| 1928 | 1898 | |
| 1929 | for (i = start; i <= end; i++) | |
| 1899 | for (int i = start; i <= end; i++) | |
| 1930 | 1900 | { |
| 1931 | int xstart = span[i].lx; | |
| 1932 | int xend = span[i].rx; | |
| 1933 | 1901 | #if defined(SHADE) |
| 1934 | 1902 | SPAN_PARAM r = span[i].r; |
| 1935 | 1903 | SPAN_PARAM g = span[i].g; |
| r7553 | r7554 | |
| 1945 | 1913 | SPAN_PARAM z = span[i].z; |
| 1946 | 1914 | #endif |
| 1947 | 1915 | |
| 1948 | int x; | |
| 1949 | ||
| 1950 | 1916 | int fb_index = fb_width * i; |
| 1951 | int | |
| 1917 | int x = span[i].rx; | |
| 1952 | 1918 | |
| 1953 | x = xend; | |
| 1954 | ||
| 1955 | 1919 | #if defined(FLIP) |
| 1956 | length = ( | |
| 1920 | int length = ( | |
| 1957 | 1921 | #else |
| 1958 | length = ( | |
| 1922 | int length = (span[i].rx - | |
| 1959 | 1923 | #endif |
| 1960 | 1924 | |
| 1961 | for (j = 0; j <= length; j++) | |
| 1925 | for (int j = 0; j <= length; j++) | |
| 1962 | 1926 | { |
| 1963 | 1927 | #if defined(SHADE) |
| 1964 | 1928 | int sr = r.h.h; |
| r7553 | r7554 | |
| 1987 | 1951 | } |
| 1988 | 1952 | #endif |
| 1989 | 1953 | |
| 1990 | if (x >= clipx | |
| 1954 | if (x >= clip.xh && x < clip.xl) | |
| 1991 | 1955 | { |
| 1992 | 1956 | #if defined(ZCOMPARE) |
| 1993 | 1957 | int z_compare_result = 1; |
| r7553 | r7554 | |
| 2046 | 2010 | nextt = (t.w + dtinc)>>16; |
| 2047 | 2011 | } |
| 2048 | 2012 | |
| 2049 | lodclamp = 0; | |
| 2013 | int lodclamp = 0; | |
| 2050 | 2014 | |
| 2051 | horstep = SIGN17(nexts & 0x1ffff) - SIGN17(sss & 0x1ffff); | |
| 2052 | vertstep = SIGN17(nextt & 0x1ffff) - SIGN17(sst & 0x1ffff); | |
| 2015 | INT32 horstep = SIGN17(nexts & 0x1ffff) - SIGN17(sss & 0x1ffff); | |
| 2016 | INT32 vertstep = SIGN17(nextt & 0x1ffff) - SIGN17(sst & 0x1ffff); | |
| 2053 | 2017 | if (horstep & 0x20000) |
| 2054 | 2018 | { |
| 2055 | 2019 | horstep = ~horstep & 0x1ffff; |
| r7553 | r7554 | |
| 2058 | 2022 | { |
| 2059 | 2023 | vertstep = ~vertstep & 0x1ffff; |
| 2060 | 2024 | } |
| 2061 | LOD = ((horstep >= vertstep) ? horstep : vertstep); | |
| 2025 | int LOD = ((horstep >= vertstep) ? horstep : vertstep); | |
| 2062 | 2026 | LOD = (LOD >= span[0].dymax) ? LOD : span[0].dymax; |
| 2063 | 2027 | |
| 2064 | 2028 | if ((LOD & 0x1c000) || lodclamp) |
| r7553 | r7554 | |
| 2070 | 2034 | LOD = min_level; |
| 2071 | 2035 | } |
| 2072 | 2036 | |
| 2073 | magnify = (LOD < 32) ? 1: 0; | |
| 2074 | l_tile = getlog2((LOD >> 5) & 0xff); | |
| 2075 | distant = ((LOD & 0x6000) || (l_tile >= max_level)) ? 1 : 0; | |
| 2037 | bool magnify = (LOD < 32); | |
| 2038 | INT32 l_tile = getlog2((LOD >> 5) & 0xff); | |
| 2039 | bool distant = ((LOD & 0x6000) || (l_tile >= max_level)); | |
| 2076 | 2040 | |
| 2077 | 2041 | lod_frac = ((LOD << 3) >> l_tile) & 0xff; |
| 2078 | 2042 |
| r7553 | r7554 | |
|---|---|---|
| 2 | 2 | { |
| 3 | 3 | UINT32 temp = *comb_alpha; |
| 4 | 4 | UINT32 temp2 = curpixel_cvg; |
| 5 | UINT32 temp3 = 0; | |
| 6 | 5 | |
| 7 | temp3 = (temp * temp2) + 4; | |
| 6 | UINT32 temp3 = (temp * temp2) + 4; | |
| 8 | 7 | curpixel_cvg = temp3 >> 8; |
| 9 | 8 | |
| 10 | 9 | temp = (temp3 >> 3); |
| r7553 | r7554 | |
| 21 | 20 | |
| 22 | 21 | INLINE void alpha_cvg_get_ncta_ca(UINT8 *comb_alpha) |
| 23 | 22 | { |
| 24 | UINT32 temp = *comb_alpha; | |
| 25 | 23 | UINT32 temp2 = curpixel_cvg; |
| 24 | UINT32 temp = temp2 << 5; | |
| 26 | 25 | |
| 27 | temp = temp2 << 5; | |
| 28 | ||
| 29 | 26 | if (temp > 0xff) |
| 30 | 27 | { |
| 31 | 28 | *comb_alpha = 0xff; |
| r7553 | r7554 | |
| 40 | 37 | { |
| 41 | 38 | UINT32 temp = *comb_alpha; |
| 42 | 39 | UINT32 temp2 = curpixel_cvg; |
| 43 | UINT32 temp3 = | |
| 40 | UINT32 temp3 = (temp * temp2) + 4; | |
| 44 | 41 | |
| 45 | temp3 = (temp * temp2) + 4; | |
| 46 | 42 | curpixel_cvg = temp3 >> 8; |
| 47 | 43 | |
| 48 | 44 | if (temp > 0xff) |
| r7553 | r7554 | |
|---|---|---|
| 43 | 43 | UINT8 *zhb = &hidden_bits[zb_address >> 1]; |
| 44 | 44 | #endif |
| 45 | 45 | |
| 46 | int i, j; | |
| 47 | int x1, x2, y1, y2; | |
| 48 | int s, t; | |
| 49 | ||
| 50 | int clipx1, clipx2, clipy1, clipy2; | |
| 51 | ||
| 52 | 46 | UINT32 tilenum = rect->tilenum; |
| 53 | 47 | TILE *tex_tile = &tile[rect->tilenum]; |
| 54 | 48 | |
| 55 | x1 = (rect->xh / 4); | |
| 56 | x2 = (rect->xl / 4); | |
| 57 | y1 = (rect->yh / 4); | |
| 58 | y2 = (rect->yl / 4); | |
| 49 | int x1 = rect->xh; | |
| 50 | int x2 = rect->xl; | |
| 51 | int y1 = rect->yh; | |
| 52 | int y2 = rect->yl; | |
| 59 | 53 | |
| 60 | if (x2<=x1) | |
| 54 | if (x2 <= x1) | |
| 61 | 55 | { |
| 62 | 56 | x2 = x1 + 1; |
| 63 | 57 | } |
| 64 | if (y1==y2) | |
| 58 | if (y1 == y2) | |
| 65 | 59 | { |
| 66 | 60 | y2 = y1 + 1; // Needed by Goldeneye |
| 67 | 61 | } |
| r7553 | r7554 | |
| 75 | 69 | y2++; |
| 76 | 70 | } |
| 77 | 71 | |
| 78 | clipx1 = clip.xh / 4; | |
| 79 | clipx2 = clip.xl / 4; | |
| 80 | clipy1 = clip.yh / 4; | |
| 81 | clipy2 = clip.yl / 4; | |
| 82 | ||
| 83 | 72 | calculate_clamp_diffs(tilenum); |
| 84 | 73 | |
| 85 | 74 | shade_color.c = 0; // Needed by Pilotwings 64 |
| 86 | 75 | |
| 87 | 76 | CACHE_TEXTURE_PARAMS(tex_tile); |
| 88 | 77 | |
| 89 | if(y1 < clipy | |
| 78 | if(y1 < clip.yh) | |
| 90 | 79 | { |
| 91 | rect->t += rect->dtdy * (clipy1 - y1); | |
| 92 | y1 = clipy1; | |
| 80 | rect->t += rect->dtdy * (clip.yh - y1); | |
| 81 | y1 = clip.yh; | |
| 93 | 82 | } |
| 94 | if(y2 > clipy | |
| 83 | if(y2 > clip.yl) | |
| 95 | 84 | { |
| 96 | y2 = clipy | |
| 85 | y2 = clip.yl; | |
| 97 | 86 | } |
| 98 | if(x1 < clipx | |
| 87 | if(x1 < clip.xh) | |
| 99 | 88 | { |
| 100 | rect->s += rect->dsdx * (clipx1 - x1); | |
| 101 | x1 = clipx1; | |
| 89 | rect->s += rect->dsdx * (clip.xh - x1); | |
| 90 | x1 = clip.xh; | |
| 102 | 91 | } |
| 103 | if(x2 > clipx | |
| 92 | if(x2 > clip.xl) | |
| 104 | 93 | { |
| 105 | x2 = clipx | |
| 94 | x2 = clip.xl; | |
| 106 | 95 | } |
| 107 | 96 | rect->dsdx >>= 5; |
| 108 | 97 | rect->dtdy >>= 5; |
| 109 | 98 | |
| 110 | t = ((int)(rect->t)); | |
| 99 | int t = ((int)(rect->t)); | |
| 111 | 100 | |
| 112 | 101 | if(rect->flip) |
| 113 | 102 | { |
| 114 | for (j = y1; j < y2; j++) | |
| 103 | for (int j = y1; j < y2; j++) | |
| 115 | 104 | { |
| 116 | 105 | int fb_index = j * fb_width; |
| 117 | 106 | #if defined(MAGICDITHER) || defined(BAYERDITHER) |
| 118 | 107 | int mline = (j & 3) << 2; |
| 119 | 108 | #endif |
| 120 | s = ((int)(rect->s)); | |
| 109 | int s = ((int)(rect->s)); | |
| 121 | 110 | |
| 122 | for (i = x1; i < x2; i++) | |
| 111 | for (int i = x1; i < x2; i++) | |
| 123 | 112 | { |
| 124 | 113 | COLOR c; |
| 125 | 114 | #if defined(ZUPDATE) |
| r7553 | r7554 | |
| 184 | 173 | } |
| 185 | 174 | else |
| 186 | 175 | { |
| 187 | for (j = y1; j < y2; j++) | |
| 176 | for (int j = y1; j < y2; j++) | |
| 188 | 177 | { |
| 189 | 178 | int fb_index = j * fb_width; |
| 190 | 179 | #if defined(MAGICDITHER) || defined(BAYERDITHER) |
| 191 | 180 | int mline = (j & 3) << 2; |
| 192 | 181 | #endif |
| 193 | 182 | |
| 194 | s = ((int)(rect->s)); | |
| 183 | int s = ((int)(rect->s)); | |
| 195 | 184 | |
| 196 | for (i = x1; i < x2; i++) | |
| 185 | for (int i = x1; i < x2; i++) | |
| 197 | 186 | { |
| 198 | 187 | COLOR c; |
| 199 | 188 | #if defined(ZUPDATE) |
| r7553 | r7554 | |
| 308 | 297 | UINT8 *zhb = &hidden_bits[zb_address >> 1]; |
| 309 | 298 | #endif |
| 310 | 299 | |
| 311 | int i, j; | |
| 312 | int x1, x2, y1, y2; | |
| 313 | int s, t; | |
| 314 | ||
| 315 | int clipx1, clipx2, clipy1, clipy2; | |
| 316 | ||
| 317 | 300 | UINT32 tilenum = rect->tilenum; |
| 318 | 301 | UINT32 tilenum2 = 0; |
| 319 | 302 | TILE *tex_tile = &tile[rect->tilenum]; |
| 320 | 303 | TILE *tex_tile2 = NULL; |
| 321 | 304 | |
| 322 | x1 = (rect->xh / 4); | |
| 323 | x2 = (rect->xl / 4); | |
| 324 | y1 = (rect->yh / 4); | |
| 325 | y2 = (rect->yl / 4); | |
| 305 | int x1 = rect->xh; | |
| 306 | int x2 = rect->xl; | |
| 307 | int y1 = rect->yh; | |
| 308 | int y2 = rect->yl; | |
| 326 | 309 | |
| 327 | if (x2<=x1) | |
| 310 | if (x2 <= x1) | |
| 328 | 311 | { |
| 329 | 312 | x2 = x1 + 1; |
| 330 | 313 | } |
| 331 | if (y1==y2) | |
| 314 | if (y1 == y2) | |
| 332 | 315 | { |
| 333 | 316 | y2 = y1 + 1; // Needed by Goldeneye |
| 334 | 317 | } |
| r7553 | r7554 | |
| 342 | 325 | y2++; |
| 343 | 326 | } |
| 344 | 327 | |
| 345 | clipx1 = clip.xh / 4; | |
| 346 | clipx2 = clip.xl / 4; | |
| 347 | clipy1 = clip.yh / 4; | |
| 348 | clipy2 = clip.yl / 4; | |
| 349 | ||
| 350 | 328 | calculate_clamp_diffs(tilenum); |
| 351 | 329 | |
| 352 | 330 | if (!other_modes.tex_lod_en) |
| r7553 | r7554 | |
| 362 | 340 | |
| 363 | 341 | shade_color.c = 0; // Needed by Pilotwings 64 |
| 364 | 342 | |
| 365 | if(y1 < clipy | |
| 343 | if(y1 < clip.yh) | |
| 366 | 344 | { |
| 367 | rect->t += rect->dtdy * (clipy1 - y1); | |
| 368 | y1 = clipy1; | |
| 345 | rect->t += rect->dtdy * (clip.yh - y1); | |
| 346 | y1 = clip.yh; | |
| 369 | 347 | } |
| 370 | if(y2 > clipy | |
| 348 | if(y2 > clip.yl) | |
| 371 | 349 | { |
| 372 | y2 = clipy | |
| 350 | y2 = clip.yl; | |
| 373 | 351 | } |
| 374 | if(x1 < clipx | |
| 352 | if(x1 < clip.xh) | |
| 375 | 353 | { |
| 376 | rect->s += rect->dsdx * (clipx1 - x1); | |
| 377 | x1 = clipx1; | |
| 354 | rect->s += rect->dsdx * (clip.xh - x1); | |
| 355 | x1 = clip.xh; | |
| 378 | 356 | } |
| 379 | if(x2 > clipx | |
| 357 | if(x2 > clip.xl) | |
| 380 | 358 | { |
| 381 | x2 = clipx | |
| 359 | x2 = clip.xl; | |
| 382 | 360 | } |
| 383 | 361 | rect->dsdx >>= 5; |
| 384 | 362 | rect->dtdy >>= 5; |
| 385 | 363 | |
| 386 | t = ((int)(rect->t)); | |
| 364 | int t = ((int)(rect->t)); | |
| 387 | 365 | |
| 388 | 366 | if(rect->flip) |
| 389 | 367 | { |
| 390 | for (j = y1; j < y2; j++) | |
| 368 | for (int j = y1; j < y2; j++) | |
| 391 | 369 | { |
| 392 | //if (j >= clipy1 && j < clipy2) | |
| 393 | 370 | { |
| 394 | 371 | int fb_index = j * fb_width; |
| 395 | 372 | #if defined(MAGICDITHER) || defined(BAYERDITHER) |
| 396 | 373 | int mline = (j & 3) << 2; |
| 397 | 374 | #endif |
| 398 | s = (int)(rect->s); | |
| 375 | int s = (int)(rect->s); | |
| 399 | 376 | |
| 400 | for (i = x1; i < x2; i++) | |
| 377 | for (int i = x1; i < x2; i++) | |
| 401 | 378 | { |
| 402 | //if (i >= clipx1 && i < clipx2) | |
| 403 | 379 | { |
| 404 | 380 | COLOR c1, c2; |
| 405 | 381 | #if defined(ZUPDATE) |
| r7553 | r7554 | |
| 470 | 446 | } |
| 471 | 447 | else |
| 472 | 448 | { |
| 473 | for (j = y1; j < y2; j++) | |
| 449 | for (int j = y1; j < y2; j++) | |
| 474 | 450 | { |
| 475 | //if (j >= clipy1 && j < clipy2) | |
| 476 | 451 | { |
| 477 | 452 | int fb_index = j * fb_width; |
| 478 | 453 | #if defined(MAGICDITHER) || defined(BAYERDITHER) |
| 479 | 454 | int mline = (j & 3) << 2; |
| 480 | 455 | #endif |
| 481 | s = (int)(rect->s); | |
| 456 | int s = (int)(rect->s); | |
| 482 | 457 | |
| 483 | for (i = x1; i < x2; i++) | |
| 458 | for (int i = x1; i < x2; i++) | |
| 484 | 459 | { |
| 485 | //if (i >= clipx1 && i < clipx2) | |
| 486 | 460 | { |
| 487 | 461 | COLOR c1, c2; |
| 488 | 462 | #if defined(ZUPDATE) |
| r7553 | r7554 | |
| 593 | 567 | { |
| 594 | 568 | UINT16 *fb = (UINT16*)&rdram[(fb_address / 4)]; |
| 595 | 569 | |
| 596 | int i, j; | |
| 597 | int x1, x2, y1, y2; | |
| 598 | int s, t; | |
| 599 | ||
| 600 | int clipx1, clipx2, clipy1, clipy2; | |
| 601 | ||
| 602 | 570 | UINT32 tilenum = rect->tilenum; |
| 603 | 571 | TILE *tex_tile = &tile[rect->tilenum]; |
| 604 | 572 | |
| 605 | x1 = (rect->xh / 4); | |
| 606 | x2 = (rect->xl / 4); | |
| 607 | y1 = (rect->yh / 4); | |
| 608 | y2 = (rect->yl / 4); | |
| 573 | int x1 = rect->xh; | |
| 574 | int x2 = rect->xl; | |
| 575 | int y1 = rect->yh; | |
| 576 | int y2 = rect->yl; | |
| 609 | 577 | |
| 610 | if (x2<=x1) | |
| 578 | if (x2 <= x1) | |
| 611 | 579 | { |
| 612 | 580 | x2 = x1 + 1; |
| 613 | 581 | } |
| 614 | if (y1==y2) | |
| 582 | if (y1 == y2) | |
| 615 | 583 | { |
| 616 | 584 | y2 = y1 + 1; // Needed by Goldeneye |
| 617 | 585 | } |
| r7553 | r7554 | |
| 620 | 588 | x2 += 1; |
| 621 | 589 | y2 += 1; |
| 622 | 590 | |
| 623 | clipx1 = clip.xh / 4; | |
| 624 | clipx2 = clip.xl / 4; | |
| 625 | clipy1 = clip.yh / 4; | |
| 626 | clipy2 = clip.yl / 4; | |
| 627 | ||
| 628 | 591 | calculate_clamp_diffs(tilenum); |
| 629 | 592 | |
| 630 | 593 | shade_color.c = 0; // Needed by Pilotwings 64 |
| 631 | 594 | |
| 632 | 595 | CACHE_TEXTURE_PARAMS(tex_tile); |
| 633 | 596 | |
| 634 | if(y1 < clipy | |
| 597 | if(y1 < clip.yh) | |
| 635 | 598 | { |
| 636 | rect->t += rect->dtdy * (clipy1 - y1); | |
| 637 | y1 = clipy1; | |
| 599 | rect->t += rect->dtdy * (clip.yh - y1); | |
| 600 | y1 = clip.yh; | |
| 638 | 601 | } |
| 639 | if(y2 > clipy | |
| 602 | if(y2 > clip.yl) | |
| 640 | 603 | { |
| 641 | y2 = clipy | |
| 604 | y2 = clip.yl; | |
| 642 | 605 | } |
| 643 | if(x1 < clipx | |
| 606 | if(x1 < clip.xh) | |
| 644 | 607 | { |
| 645 | rect->s += rect->dsdx * (clipx1 - x1); | |
| 646 | x1 = clipx1; | |
| 608 | rect->s += rect->dsdx * (clip.xh - x1); | |
| 609 | x1 = clip.xh; | |
| 647 | 610 | } |
| 648 | if(x2 > clipx | |
| 611 | if(x2 > clip.xl) | |
| 649 | 612 | { |
| 650 | x2 = clipx | |
| 613 | x2 = clip.xl; | |
| 651 | 614 | } |
| 652 | 615 | rect->dsdx >>= 5; |
| 653 | 616 | rect->dtdy >>= 5; |
| 654 | 617 | |
| 655 | t = ((int)(rect->t)); | |
| 618 | int t = ((int)(rect->t)); | |
| 656 | 619 | |
| 657 | 620 | if(rect->flip) |
| 658 | 621 | { |
| 659 | for (j = y1; j < y2; j++) | |
| 622 | for (int j = y1; j < y2; j++) | |
| 660 | 623 | { |
| 661 | 624 | int fb_index = j * fb_width; |
| 662 | //if (j >= clipy1 && j < clipy2) | |
| 663 | 625 | { |
| 664 | s = (int)(rect->s); | |
| 626 | int s = (int)(rect->s); | |
| 665 | 627 | |
| 666 | for (i = x1; i < x2; i++) | |
| 628 | for (int i = x1; i < x2; i++) | |
| 667 | 629 | { |
| 668 | //if (i >= clipx1 && i < clipx2) | |
| 669 | 630 | { |
| 670 | 631 | texel0_color.c = TEXTURE_PIPELINE(t, s, tex_tile); |
| 671 | 632 | |
| r7553 | r7554 | |
| 684 | 645 | } |
| 685 | 646 | else |
| 686 | 647 | { |
| 687 | for (j = y1; j < y2; j++) | |
| 648 | for (int j = y1; j < y2; j++) | |
| 688 | 649 | { |
| 689 | 650 | int fb_index = j * fb_width; |
| 690 | //if (j >= clipy1 && j < clipy2) | |
| 691 | 651 | { |
| 692 | s = (int)(rect->s); | |
| 652 | int s = (int)(rect->s); | |
| 693 | 653 | |
| 694 | for (i = x1; i < x2; i++) | |
| 654 | for (int i = x1; i < x2; i++) | |
| 695 | 655 | { |
| 696 | //if (i >= clipx1 && i < clipx2) | |
| 697 | { | |
| 698 | texel0_color.c = TEXTURE_PIPELINE(s, t, tex_tile); | |
| 656 | texel0_color.c = TEXTURE_PIPELINE(s, t, tex_tile); | |
| 699 | 657 | |
| 700 | | |
| 658 | | |
| 701 | 659 | |
| 702 | if ((texel0_color.i.a != 0)||(!other_modes.alpha_compare_en)) | |
| 703 | { | |
| 704 | fb[(fb_index + i) ^ WORD_ADDR_XOR] = ((texel0_color.i.r >> 3) << 11) | ((texel0_color.i.g >> 3) << 6) | ((texel0_color.i.b >> 3) << 1)|1; | |
| 705 | } | |
| 660 | if ((texel0_color.i.a != 0)||(!other_modes.alpha_compare_en)) | |
| 661 | { | |
| 662 | fb[(fb_index + i) ^ WORD_ADDR_XOR] = ((texel0_color.i.r >> 3) << 11) | ((texel0_color.i.g >> 3) << 6) | ((texel0_color.i.b >> 3) << 1)|1; | |
| 706 | 663 | } |
| 707 | 664 | s += rect->dsdx; |
| 708 | 665 | } |
| r7553 | r7554 | |
|---|---|---|
| 5 | 5 | #endif |
| 6 | 6 | { |
| 7 | 7 | #undef CVG_DRAW |
| 8 | UINT16 finalcolor; | |
| 9 | 8 | UINT32 memory_cvg = ((*fb & 1) << 2) + (*hb & 3) + 1; |
| 10 | UINT32 newcvg; | |
| 11 | UINT32 wrapflag; | |
| 12 | UINT32 clampcvg; | |
| 13 | 9 | #ifdef CVG_DRAW |
| 14 | 10 | int covdraw; |
| 15 | 11 | if (curpixel_cvg == 8) |
| r7553 | r7554 | |
| 28 | 24 | curpixel_overlap = 0; |
| 29 | 25 | } |
| 30 | 26 | |
| 31 | newcvg = curpixel_cvg + memory_cvg; | |
| 32 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 27 | UINT32 newcvg = curpixel_cvg + memory_cvg; | |
| 28 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 33 | 29 | |
| 34 | finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 30 | UINT16 finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 35 | 31 | |
| 36 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 32 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 37 | 33 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 38 | 34 | |
| 39 | 35 | curpixel_cvg--; |
| r7553 | r7554 | |
| 71 | 67 | #endif |
| 72 | 68 | { |
| 73 | 69 | #undef CVG_DRAW |
| 74 | UINT16 finalcolor; | |
| 75 | 70 | UINT32 memory_cvg = ((*fb & 1) << 2) + (*hb & 3) + 1; |
| 76 | UINT32 newcvg; | |
| 77 | UINT32 wrapflag; | |
| 78 | UINT32 clampcvg; | |
| 79 | 71 | #ifdef CVG_DRAW |
| 80 | 72 | int covdraw; |
| 81 | 73 | if (curpixel_cvg == 8) |
| r7553 | r7554 | |
| 94 | 86 | curpixel_overlap = 0; |
| 95 | 87 | } |
| 96 | 88 | |
| 97 | newcvg = curpixel_cvg + memory_cvg; | |
| 98 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 89 | UINT32 newcvg = curpixel_cvg + memory_cvg; | |
| 90 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 99 | 91 | |
| 100 | finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 92 | UINT16 finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 101 | 93 | |
| 102 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 94 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 103 | 95 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 104 | 96 | |
| 105 | 97 | curpixel_cvg--; |
| r7553 | r7554 | |
| 129 | 121 | #endif |
| 130 | 122 | { |
| 131 | 123 | #undef CVG_DRAW |
| 132 | UINT16 finalcolor; | |
| 133 | 124 | UINT32 memory_cvg = ((*fb & 1) << 2) + (*hb & 3) + 1; |
| 134 | UINT32 newcvg; | |
| 135 | UINT32 wrapflag; | |
| 136 | UINT32 clampcvg; | |
| 137 | 125 | #ifdef CVG_DRAW |
| 138 | 126 | int covdraw; |
| 139 | 127 | if (curpixel_cvg == 8) |
| r7553 | r7554 | |
| 152 | 140 | curpixel_overlap = 0; |
| 153 | 141 | } |
| 154 | 142 | |
| 155 | newcvg = curpixel_cvg + memory_cvg; | |
| 156 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 143 | UINT32 newcvg = curpixel_cvg + memory_cvg; | |
| 144 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 157 | 145 | |
| 158 | finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 146 | UINT16 finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 159 | 147 | |
| 160 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 148 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 161 | 149 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 162 | 150 | |
| 163 | 151 | curpixel_cvg--; |
| r7553 | r7554 | |
| 187 | 175 | #endif |
| 188 | 176 | { |
| 189 | 177 | #undef CVG_DRAW |
| 190 | UINT16 finalcolor; | |
| 191 | 178 | UINT32 memory_cvg = ((*fb & 1) << 2) + (*hb & 3) + 1; |
| 192 | UINT32 newcvg; | |
| 193 | UINT32 wrapflag; | |
| 194 | UINT32 clampcvg; | |
| 195 | 179 | #ifdef CVG_DRAW |
| 196 | 180 | int covdraw; |
| 197 | 181 | if (curpixel_cvg == 8) |
| r7553 | r7554 | |
| 210 | 194 | curpixel_overlap = 0; |
| 211 | 195 | } |
| 212 | 196 | |
| 213 | newcvg = curpixel_cvg + memory_cvg; | |
| 214 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 197 | UINT32 newcvg = curpixel_cvg + memory_cvg; | |
| 198 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 215 | 199 | |
| 216 | finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 200 | UINT16 finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 217 | 201 | |
| 218 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 202 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 219 | 203 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 220 | 204 | |
| 221 | 205 | curpixel_cvg--; |
| r7553 | r7554 | |
| 245 | 229 | #endif |
| 246 | 230 | { |
| 247 | 231 | #undef CVG_DRAW |
| 248 | UINT16 finalcolor; | |
| 249 | UINT32 newcvg; | |
| 250 | UINT32 wrapflag; | |
| 251 | UINT32 clampcvg; | |
| 252 | 232 | #ifdef CVG_DRAW |
| 253 | 233 | int covdraw; |
| 254 | 234 | if (curpixel_cvg == 8) |
| r7553 | r7554 | |
| 267 | 247 | curpixel_overlap = 0; |
| 268 | 248 | } |
| 269 | 249 | |
| 270 | newcvg = curpixel_cvg + 8; | |
| 271 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 250 | UINT32 newcvg = curpixel_cvg + 8; | |
| 251 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 272 | 252 | |
| 273 | finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 253 | UINT16 finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 274 | 254 | |
| 275 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 255 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 276 | 256 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 277 | 257 | |
| 278 | 258 | curpixel_cvg--; |
| r7553 | r7554 | |
| 309 | 289 | #endif |
| 310 | 290 | { |
| 311 | 291 | #undef CVG_DRAW |
| 312 | UINT16 finalcolor; | |
| 313 | UINT32 newcvg; | |
| 314 | UINT32 wrapflag; | |
| 315 | UINT32 clampcvg; | |
| 316 | 292 | #ifdef CVG_DRAW |
| 317 | 293 | int covdraw; |
| 318 | 294 | if (curpixel_cvg == 8) |
| r7553 | r7554 | |
| 331 | 307 | curpixel_overlap = 0; |
| 332 | 308 | } |
| 333 | 309 | |
| 334 | newcvg = curpixel_cvg + 8; | |
| 335 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 310 | UINT32 newcvg = curpixel_cvg + 8; | |
| 311 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 336 | 312 | |
| 337 | finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 313 | UINT16 finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 338 | 314 | |
| 339 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 315 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 340 | 316 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 341 | 317 | |
| 342 | 318 | curpixel_cvg--; |
| r7553 | r7554 | |
| 365 | 341 | #endif |
| 366 | 342 | { |
| 367 | 343 | #undef CVG_DRAW |
| 368 | UINT16 finalcolor; | |
| 369 | UINT32 newcvg; | |
| 370 | UINT32 wrapflag; | |
| 371 | UINT32 clampcvg; | |
| 372 | 344 | #ifdef CVG_DRAW |
| 373 | 345 | int covdraw; |
| 374 | 346 | if (curpixel_cvg == 8) |
| r7553 | r7554 | |
| 387 | 359 | curpixel_overlap = 0; |
| 388 | 360 | } |
| 389 | 361 | |
| 390 | newcvg = curpixel_cvg + 8; | |
| 391 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 362 | UINT32 newcvg = curpixel_cvg + 8; | |
| 363 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 392 | 364 | |
| 393 | finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 365 | UINT16 finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 394 | 366 | |
| 395 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 367 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 396 | 368 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 397 | 369 | |
| 398 | 370 | curpixel_cvg--; |
| r7553 | r7554 | |
| 421 | 393 | #endif |
| 422 | 394 | { |
| 423 | 395 | #undef CVG_DRAW |
| 424 | UINT16 finalcolor; | |
| 425 | UINT32 newcvg; | |
| 426 | UINT32 wrapflag; | |
| 427 | UINT32 clampcvg; | |
| 428 | 396 | #ifdef CVG_DRAW |
| 429 | 397 | int covdraw; |
| 430 | 398 | if (curpixel_cvg == 8) |
| r7553 | r7554 | |
| 443 | 411 | curpixel_overlap = 0; |
| 444 | 412 | } |
| 445 | 413 | |
| 446 | newcvg = curpixel_cvg + 8; | |
| 447 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 414 | UINT32 newcvg = curpixel_cvg + 8; | |
| 415 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 448 | 416 | |
| 449 | finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 417 | UINT16 finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); | |
| 450 | 418 | |
| 451 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 419 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 452 | 420 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 453 | 421 | |
| 454 | 422 | curpixel_cvg--; |
| r7553 | r7554 | |
| 478 | 446 | { |
| 479 | 447 | UINT32 finalcolor=(r << 24) | (g << 16) | (b << 8); |
| 480 | 448 | UINT32 memory_cvg = ((*fb >>5) & 7) + 1; |
| 481 | UINT32 newcvg; | |
| 482 | UINT32 wrapflag; | |
| 483 | UINT32 clampcvg; | |
| 484 | 449 | |
| 485 | newcvg = curpixel_cvg + memory_cvg; | |
| 486 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 487 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 450 | UINT32 newcvg = curpixel_cvg + memory_cvg; | |
| 451 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 452 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 488 | 453 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 489 | 454 | |
| 490 | 455 | curpixel_cvg--; |
| r7553 | r7554 | |
| 520 | 485 | { |
| 521 | 486 | UINT32 finalcolor=(r << 24) | (g << 16) | (b << 8); |
| 522 | 487 | UINT32 memory_cvg = ((*fb >>5) & 7) + 1; |
| 523 | UINT32 newcvg; | |
| 524 | UINT32 wrapflag; | |
| 525 | UINT32 clampcvg; | |
| 526 | 488 | |
| 527 | newcvg = curpixel_cvg + memory_cvg; | |
| 528 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 529 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 489 | UINT32 newcvg = curpixel_cvg + memory_cvg; | |
| 490 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 491 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 530 | 492 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 531 | 493 | |
| 532 | 494 | curpixel_cvg--; |
| r7553 | r7554 | |
| 555 | 517 | { |
| 556 | 518 | UINT32 finalcolor=(r << 24) | (g << 16) | (b << 8); |
| 557 | 519 | UINT32 memory_cvg = ((*fb >>5) & 7) + 1; |
| 558 | UINT32 newcvg; | |
| 559 | UINT32 wrapflag; | |
| 560 | UINT32 clampcvg; | |
| 561 | 520 | |
| 562 | newcvg = curpixel_cvg + memory_cvg; | |
| 563 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 564 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 521 | UINT32 newcvg = curpixel_cvg + memory_cvg; | |
| 522 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 523 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 565 | 524 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 566 | 525 | |
| 567 | 526 | curpixel_cvg--; |
| r7553 | r7554 | |
| 591 | 550 | UINT32 finalcolor=(r << 24) | (g << 16) | (b << 8); |
| 592 | 551 | UINT32 memory_alphachannel = *fb & 0xff; |
| 593 | 552 | UINT32 memory_cvg = ((*fb >>5) & 7) + 1; |
| 594 | UINT32 newcvg; | |
| 595 | UINT32 wrapflag; | |
| 596 | UINT32 clampcvg; | |
| 597 | 553 | |
| 598 | newcvg = curpixel_cvg + memory_cvg; | |
| 599 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 600 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 554 | UINT32 newcvg = curpixel_cvg + memory_cvg; | |
| 555 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 556 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 601 | 557 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 602 | 558 | |
| 603 | 559 | curpixel_cvg--; |
| r7553 | r7554 | |
| 625 | 581 | #endif |
| 626 | 582 | { |
| 627 | 583 | UINT32 finalcolor=(r << 24) | (g << 16) | (b << 8); |
| 628 | UINT32 newcvg; | |
| 629 | UINT32 wrapflag; | |
| 630 | UINT32 clampcvg; | |
| 631 | 584 | |
| 632 | newcvg = curpixel_cvg + 8; | |
| 633 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 634 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 585 | UINT32 newcvg = curpixel_cvg + 8; | |
| 586 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 587 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 635 | 588 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 636 | 589 | |
| 637 | 590 | curpixel_cvg--; |
| r7553 | r7554 | |
| 665 | 618 | #endif |
| 666 | 619 | { |
| 667 | 620 | UINT32 finalcolor=(r << 24) | (g << 16) | (b << 8); |
| 668 | UINT32 newcvg; | |
| 669 | UINT32 wrapflag; | |
| 670 | UINT32 clampcvg; | |
| 671 | 621 | |
| 672 | newcvg = curpixel_cvg + 8; | |
| 673 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 674 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 622 | UINT32 newcvg = curpixel_cvg + 8; | |
| 623 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 624 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 675 | 625 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 676 | 626 | |
| 677 | 627 | curpixel_cvg--; |
| r7553 | r7554 | |
| 698 | 648 | #endif |
| 699 | 649 | { |
| 700 | 650 | UINT32 finalcolor=(r << 24) | (g << 16) | (b << 8); |
| 701 | UINT32 newcvg; | |
| 702 | UINT32 wrapflag; | |
| 703 | UINT32 clampcvg; | |
| 704 | 651 | |
| 705 | newcvg = curpixel_cvg + 8; | |
| 706 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 707 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 652 | UINT32 newcvg = curpixel_cvg + 8; | |
| 653 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 654 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 708 | 655 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 709 | 656 | |
| 710 | 657 | curpixel_cvg--; |
| r7553 | r7554 | |
| 732 | 679 | { |
| 733 | 680 | UINT32 finalcolor=(r << 24) | (g << 16) | (b << 8); |
| 734 | 681 | UINT32 memory_alphachannel = *fb & 0xff; |
| 735 | UINT32 newcvg; | |
| 736 | UINT32 wrapflag; | |
| 737 | UINT32 clampcvg; | |
| 738 | 682 | |
| 739 | newcvg = curpixel_cvg + 8; | |
| 740 | wrapflag = (newcvg > 8) ? 1 : 0; | |
| 741 | clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 683 | UINT32 newcvg = curpixel_cvg + 8; | |
| 684 | UINT32 wrapflag = (newcvg > 8) ? 1 : 0; | |
| 685 | UINT32 clampcvg = (newcvg > 8) ? 8 : newcvg; | |
| 742 | 686 | newcvg = (wrapflag)? (newcvg - 8) : newcvg; |
| 743 | 687 | |
| 744 | 688 | curpixel_cvg--; |
| r7553 | r7554 | |
|---|---|---|
| 2080 | 2080 | konamigx_mixer_primode(4); |
| 2081 | 2081 | } else |
| 2082 | 2082 | |
| 2083 | if (!strcmp(machine->gamedrv->name,"gokuparo") || !strcmp(machine->gamedrv->name,"fantjour")) | |
| 2083 | if (!strcmp(machine->gamedrv->name,"gokuparo") || !strcmp(machine->gamedrv->name,"fantjour") || !strcmp(machine->gamedrv->name,"fantjoura")) | |
| 2084 | 2084 | { |
| 2085 | 2085 | K053247GP_set_SpriteOffset(-46, -23); |
| 2086 | 2086 | } else |
| r7553 | r7554 | |
|---|---|---|
| 1029 | 1029 | |
| 1030 | 1030 | if (offset >= PPU_MAX_REG) |
| 1031 | 1031 | { |
| 1032 | logerror("PPU %s(r): Attempting to read past the chip\n", device->tag | |
| 1032 | logerror("PPU %s(r): Attempting to read past the chip\n", device->tag | |
| 1033 | 1033 | offset &= PPU_MAX_REG - 1; |
| 1034 | 1034 | } |
| 1035 | 1035 |
| r7553 | r7554 | |
|---|---|---|
| 134 | 134 | typedef struct |
| 135 | 135 | { |
| 136 | 136 | int cycle_type; |
| 137 | int persp_tex_en; | |
| 138 | int detail_tex_en; | |
| 139 | int sharpen_tex_en; | |
| 140 | int tex_lod_en; | |
| 141 | int en_tlut; | |
| 142 | int tlut_type; | |
| 143 | int sample_type; | |
| 144 | int mid_texel; | |
| 145 | int bi_lerp0; | |
| 146 | int bi_lerp1; | |
| 147 | int convert_one; | |
| 148 | int key_en; | |
| 137 | bool persp_tex_en; | |
| 138 | bool detail_tex_en; | |
| 139 | bool sharpen_tex_en; | |
| 140 | bool tex_lod_en; | |
| 141 | bool en_tlut; | |
| 142 | bool tlut_type; | |
| 143 | bool sample_type; | |
| 144 | bool mid_texel; | |
| 145 | bool bi_lerp0; | |
| 146 | bool bi_lerp1; | |
| 147 | bool convert_one; | |
| 148 | bool key_en; | |
| 149 | 149 | int rgb_dither_sel; |
| 150 | 150 | int alpha_dither_sel; |
| 151 | 151 | int blend_m1a_0; |
| r7553 | r7554 | |
| 157 | 157 | int blend_m2b_0; |
| 158 | 158 | int blend_m2b_1; |
| 159 | 159 | int tex_edge; |
| 160 | int force_blend; | |
| 161 | int alpha_cvg_select; | |
| 162 | int cvg_times_alpha; | |
| 160 | bool force_blend; | |
| 161 | bool alpha_cvg_select; | |
| 162 | bool cvg_times_alpha; | |
| 163 | 163 | int z_mode; |
| 164 | 164 | int cvg_dest; |
| 165 | int color_on_cvg; | |
| 166 | int image_read_en; | |
| 167 | int z_update_en; | |
| 168 | int z_compare_en; | |
| 169 | int antialias_en; | |
| 170 | int z_source_sel; | |
| 171 | int dither_alpha_en; | |
| 172 | int alpha_compare_en; | |
| 165 | bool color_on_cvg; | |
| 166 | bool image_read_en; | |
| 167 | bool z_update_en; | |
| 168 | bool z_compare_en; | |
| 169 | bool antialias_en; | |
| 170 | bool z_source_sel; | |
| 171 | bool dither_alpha_en; | |
| 172 | bool alpha_compare_en; | |
| 173 | 173 | } OTHER_MODES; |
| 174 | 174 | |
| 175 | 175 | /*****************************************************************************/ |
| r7553 | r7554 | |
| 318 | 318 | INLINE void z_store(UINT16* zb, UINT8* zhb, UINT32 z, UINT32 deltaz); |
| 319 | 319 | INLINE INT32 normalize_dzpix(INT32 sum); |
| 320 | 320 | INLINE INT32 CLIP(INT32 value,INT32 min,INT32 max); |
| 321 | INLINE void video_filter16(int *out_r, int *out_g, int *out_b, UINT16* vbuff, UINT8* hbuff, UINT32 hres); | |
| 321 | INLINE void video_filter16(int *out_r, int *out_g, int *out_b, UINT16* vbuff, UINT8* hbuff, const UINT32 hres); | |
| 322 | 322 | INLINE void divot_filter16(UINT8* r, UINT8* g, UINT8* b, UINT16* fbuff, UINT32 fbuff_index); |
| 323 | 323 | INLINE void restore_filter16(INT32* r, INT32* g, INT32* b, UINT16* fbuff, UINT32 fbuff_index, UINT32 hres); |
| 324 | 324 | INLINE UINT32 getlog2(UINT32 lod_clamp); |
| r7553 | r7554 | |
| 430 | 430 | |
| 431 | 431 | VIDEO_START(n64) |
| 432 | 432 | { |
| 433 | int i = 0, j = 0; | |
| 434 | 433 | UINT8 *normpoint = memory_region(machine, "normpoint"); |
| 435 | 434 | UINT8 *normslope = memory_region(machine, "normslope"); |
| 436 | 435 | |
| 437 | 436 | if (LOG_RDP_EXECUTION) |
| 437 | { | |
| 438 | 438 | rdp_exec = fopen("rdp_execute.txt", "wt"); |
| 439 | } | |
| 439 | 440 | |
| 440 | 441 | TMEM = auto_alloc_array(machine, UINT8, 0x1004); // 4 guard bytes |
| 441 | 442 | memset(TMEM, 0, 0x1000); |
| r7553 | r7554 | |
| 446 | 447 | one_color.c = 0xffffffff; |
| 447 | 448 | zero_color.c = 0; |
| 448 | 449 | |
| 449 | for(i = 0; i < (1 << 21); i++) | |
| 450 | for(int i = 0; i < (1 << 21); i++) | |
| 450 | 451 | { |
| 451 | 452 | INT32 frac = i >> 16; |
| 452 | 453 | INT32 left = (i >> 8) & 0x000000ff; |
| r7553 | r7554 | |
| 454 | 455 | tex_lerp_lut[i] = (frac*(left - right))>>5; |
| 455 | 456 | } |
| 456 | 457 | |
| 457 | for(i = 0; i < (1 << 24); i++) | |
| 458 | for(int i = 0; i < (1 << 24); i++) | |
| 458 | 459 | { |
| 459 | 460 | UINT8 A = (i >> 16) & 0x000000ff; |
| 460 | 461 | UINT8 B = (i >> 8) & 0x000000ff; |
| r7553 | r7554 | |
| 462 | 463 | cc_lut1[i] = (INT16)((((((INT32)A - (INT32)B) * (INT32)C) + 0x80) >> 8) & 0x0000ffff); |
| 463 | 464 | } |
| 464 | 465 | |
| 465 | for(i = 0; i < (1 << 16); i++) | |
| 466 | for(int i = 0; i < (1 << 16); i++) | |
| 466 | 467 | { |
| 467 | for(j = 0; j < (1 << 8); j++) | |
| 468 | for(int j = 0; j < (1 << 8); j++) | |
| 468 | 469 | { |
| 469 | 470 | INT32 temp = (INT32)((INT16)i) + j; |
| 470 | 471 | if(temp > 255) |
| r7553 | r7554 | |
| 482 | 483 | } |
| 483 | 484 | } |
| 484 | 485 | |
| 485 | for(i = 0; i < (1 << 16); i++) | |
| 486 | for(int i = 0; i < (1 << 16); i++) | |
| 486 | 487 | { |
| 487 | 488 | UINT8 r = ((i >> 8) & 0xf8) | (i >> 13); |
| 488 | 489 | UINT8 g = ((i >> 3) & 0xf8) | ((i >> 8) & 0x07); |
| r7553 | r7554 | |
| 524 | 525 | |
| 525 | 526 | memset(hidden_bits, 3, 4194304); // Hack / fix for letters in Rayman 2 |
| 526 | 527 | |
| 527 | for (i = 0; i < 8; i++) | |
| 528 | for (int i = 0; i < 8; i++) | |
| 528 | 529 | { |
| 529 | 530 | tile[i].num = i; |
| 530 | 531 | } |
| 531 | 532 | |
| 532 | for (i = 0; i < 256; i++) | |
| 533 | for (int i = 0; i < 256; i++) | |
| 533 | 534 | { |
| 534 | 535 | gamma_table[i] = sqrt((float)(i << 6)); |
| 535 | 536 | gamma_table[i] <<= 1; |
| 536 | 537 | } |
| 537 | 538 | |
| 538 | for (i = 0; i < 0x4000; i++) | |
| 539 | for (int i = 0; i < 0x4000; i++) | |
| 539 | 540 | { |
| 540 | 541 | gamma_dither_table[i] = sqrt((float)i); |
| 541 | 542 | gamma_dither_table[i] <<= 1; |
| r7553 | r7554 | |
| 544 | 545 | z_build_com_table(); |
| 545 | 546 | |
| 546 | 547 | maskbits_table[0] = 0x3ff; |
| 547 | for(i = 1; i < 16; i++) | |
| 548 | for(int i = 1; i < 16; i++) | |
| 548 | 549 | { |
| 549 | 550 | maskbits_table[i] = ((UINT16)(0xffff) >> (16 - i)) & 0x3ff; |
| 550 | 551 | } |
| 551 | 552 | |
| 552 | for(i = 0; i < 64; i++) | |
| 553 | for(int i = 0; i < 64; i++) | |
| 553 | 554 | { |
| 554 | 555 | NormPointRom[i] = (normpoint[(i << 1) + 1] << 8) | normpoint[i << 1]; |
| 555 | 556 | NormSlopeRom[i] = (normslope[(i << 1) + 1] << 8) | normslope[i << 1]; |
| r7553 | r7554 | |
| 569 | 570 | |
| 570 | 571 | static void video_update_n64_32(bitmap_t *bitmap) |
| 571 | 572 | { |
| 572 | int i, j; | |
| 573 | 573 | int gamma = (n64_vi_control >> 3) & 1; |
| 574 | 574 | int gamma_dither = (n64_vi_control >> 2) & 1; |
| 575 | 575 | //int vibuffering = ((n64_vi_control & 2) && fsaa && divot); |
| 576 | 576 | |
| 577 | UINT32 *frame_buffer32; | |
| 578 | UINT16 *frame_buffer; | |
| 579 | UINT32 hb; | |
| 580 | UINT8* hidden_buffer; | |
| 577 | UINT32 *frame_buffer32 = (UINT32*)&rdram[(n64_vi_origin & 0xffffff) >> 2]; | |
| 581 | 578 | |
| 582 | int r, g, b; | |
| 583 | int dith = 0; | |
| 584 | ||
| 585 | INT32 hdiff = (n64_vi_hstart & 0x3ff) - ((n64_vi_hstart >> 16) & 0x3ff); | |
| 586 | float hcoeff = ((float)(n64_vi_xscale & 0xfff) / (1 << 10)); | |
| 579 | const INT32 hdiff = (n64_vi_hstart & 0x3ff) - ((n64_vi_hstart >> 16) & 0x3ff); | |
| 580 | const float hcoeff = ((float)(n64_vi_xscale & 0xfff) / (1 << 10)); | |
| 587 | 581 | UINT32 hres = ((float)hdiff * hcoeff); |
| 588 | 582 | INT32 invisiblewidth = n64_vi_width - hres; |
| 589 | 583 | |
| 590 | INT32 vdiff = ((n64_vi_vstart & 0x3ff) - ((n64_vi_vstart >> 16) & 0x3ff)) >> 1; | |
| 591 | float vcoeff = ((float)(n64_vi_yscale & 0xfff) / (1 << 10)); | |
| 592 | UINT32 vres = ((float)vdiff * vcoeff); | |
| 584 | const INT32 vdiff = ((n64_vi_vstart & 0x3ff) - ((n64_vi_vstart >> 16) & 0x3ff)) >> 1; | |
| 585 | const float vcoeff = ((float)(n64_vi_yscale & 0xfff) / (1 << 10)); | |
| 586 | const UINT32 vres = ((float)vdiff * vcoeff); | |
| 593 | 587 | |
| 594 | 588 | if (vdiff <= 0 || hdiff <= 0) |
| 595 | 589 | { |
| 596 | ||
| 597 | 590 | return; |
| 598 | 591 | } |
| 599 | 592 | |
| 600 | frame_buffer = (UINT16*)&rdram[(n64_vi_origin & 0xffffff) >> 2]; | |
| 601 | hb = ((n64_vi_origin & 0xffffff) >> 2) >> 1; | |
| 602 | hidden_buffer = &hidden_bits[hb]; | |
| 603 | ||
| 604 | 593 | if (hres > 640) // Needed by Top Gear Overdrive (E) |
| 605 | 594 | { |
| 606 | 595 | invisiblewidth += (hres - 640); |
| 607 | 596 | hres = 640; |
| 608 | 597 | } |
| 609 | 598 | |
| 610 | frame_buffer32 = (UINT32*)&rdram[(n64_vi_origin & 0xffffff) >> 2]; | |
| 611 | 599 | if (frame_buffer32) |
| 612 | 600 | { |
| 613 | for (j=0; j < vres; j++) | |
| 601 | for (int j = 0; j < vres; j++) | |
| 614 | 602 | { |
| 615 | 603 | UINT32 *d = BITMAP_ADDR32(bitmap, j, 0); |
| 616 | for (i=0; i < hres; i++) | |
| 604 | for (int i = 0; i < hres; i++) | |
| 617 | 605 | { |
| 618 | 606 | UINT32 pix = *frame_buffer32++; |
| 619 | 607 | if (gamma || gamma_dither) |
| 620 | 608 | { |
| 621 | r = (pix >> 24) & 0xff; | |
| 622 | g = (pix >> 16) & 0xff; | |
| 623 | b = (pix >> 8) & 0xff; | |
| 609 | int r = (pix >> 24) & 0xff; | |
| 610 | int g = (pix >> 16) & 0xff; | |
| 611 | int b = (pix >> 8) & 0xff; | |
| 612 | int dith = 0; | |
| 624 | 613 | if (gamma_dither) |
| 625 | 614 | { |
| 626 | 615 | dith = rdp_rand() & 0x3f; |
| r7553 | r7554 | |
| 662 | 651 | |
| 663 | 652 | VIDEO_UPDATE(n64) |
| 664 | 653 | { |
| 665 | int i, j; | |
| 666 | 654 | int fsaa = (((n64_vi_control >> 8) & 3) < 2); |
| 667 | 655 | int divot = (n64_vi_control >> 4) & 1; |
| 668 | 656 | int height = fb_height; |
| 657 | //UINT16 *frame_buffer = (UINT16*)&rdram[(n64_vi_origin & 0xffffff) >> 2]; | |
| 658 | //UINT8 *cvg_buffer = &hidden_bits[((n64_vi_origin & 0xffffff) >> 2) >> 1]; | |
| 669 | 659 | //int vibuffering = ((n64_vi_control & 2) && fsaa && divot); |
| 670 | 660 | |
| 671 | 661 | //vibuffering = 0; // Disabled for now |
| r7553 | r7554 | |
| 681 | 671 | { |
| 682 | 672 | UINT16 pix; |
| 683 | 673 | pix = frame_buffer[pixels ^ WORD_ADDR_XOR]; |
| 684 | curpixel_cvg = ((pix & 1) << 2) | ( | |
| 674 | curpixel_cvg = ((pix & 1) << 2) | (cvg | |
| 685 | 675 | if (curpixel_cvg < 7 && i > 1 && j > 1 && i < (hres - 2) && j < (vres - 2) && fsaa) |
| 686 | 676 | { |
| 687 | newc = video_filter16(&frame_buffer[pixels ^ WORD_ADDR_XOR], & | |
| 677 | newc = video_filter16(&frame_buffer[pixels ^ WORD_ADDR_XOR], &cvg | |
| 688 | 678 | ViBuffer[i][j] = newc; |
| 689 | 679 | } |
| 690 | 680 | else |
| r7553 | r7554 | |
| 704 | 694 | |
| 705 | 695 | if (n64_vi_blank) |
| 706 | 696 | { |
| 707 | for (j=0; j <height; j++) | |
| 697 | for (int j = 0; j <height; j++) | |
| 708 | 698 | { |
| 709 | 699 | UINT32 *d = BITMAP_ADDR32(bitmap, j, 0); |
| 710 | for (i=0; i < fb_width; i++) | |
| 700 | for (int i = 0; i < fb_width; i++) | |
| 711 | 701 | { |
| 712 | 702 | d[BYTE_XOR_BE(i)] = 0; |
| 713 | 703 | } |
| r7553 | r7554 | |
| 949 | 939 | |
| 950 | 940 | /*****************************************************************************/ |
| 951 | 941 | |
| 942 | #define XOR_SWAP_BYTE_SHIFT 2 | |
| 943 | #define XOR_SWAP_WORD_SHIFT 1 | |
| 944 | #define XOR_SWAP_DWORD_SHIFT 0 | |
| 945 | ||
| 952 | 946 | #define XOR_SWAP_BYTE 4 |
| 953 | 947 | #define XOR_SWAP_WORD 2 |
| 954 | 948 | #define XOR_SWAP_DWORD 1 |
| r7553 | r7554 | |
| 980 | 974 | |
| 981 | 975 | INLINE void z_build_com_table(void) // Thanks to angrylion, Gonetz and Orkin |
| 982 | 976 | { |
| 983 | int j = 0; | |
| 984 | for(j = 0; j < 0x40000; j++) | |
| 977 | for(int j = 0; j < 0x40000; j++) | |
| 985 | 978 | { |
| 986 | 979 | UINT32 exponent = 0; |
| 987 | 980 | UINT32 testbit = 0x20000; |
| r7553 | r7554 | |
| 1000 | 993 | INLINE void z_store(UINT16* zb, UINT8* zhb, UINT32 z, UINT32 deltaz) |
| 1001 | 994 | { |
| 1002 | 995 | UINT8 deltazmem = 15; |
| 1003 | int j = 0; | |
| 1004 | 996 | z &= 0x3ffff; |
| 1005 | 997 | deltaz &= 0xffff; |
| 1006 | for(j = 15; j >= 0; j--) | |
| 998 | for(int j = 15; j >= 0; j--) | |
| 1007 | 999 | { |
| 1008 | 1000 | if( (deltaz >> j) == 1 ) |
| 1009 | 1001 | { |
| r7553 | r7554 | |
| 1083 | 1075 | |
| 1084 | 1076 | INLINE INT32 normalize_dzpix(INT32 sum) |
| 1085 | 1077 | { |
| 1086 | int count = 0; | |
| 1087 | 1078 | if (sum & 0xc000) |
| 1088 | 1079 | { |
| 1089 | 1080 | return 0x8000; |
| r7553 | r7554 | |
| 1092 | 1083 | { |
| 1093 | 1084 | return 1; |
| 1094 | 1085 | } |
| 1095 | for(count = 0x2000; count > 0; count >>= 1) | |
| 1086 | for(int count = 0x2000; count > 0; count >>= 1) | |
| 1096 | 1087 | { |
| 1097 | 1088 | if (sum & count) |
| 1098 | 1089 | { |
| r7553 | r7554 | |
| 1118 | 1109 | } |
| 1119 | 1110 | } |
| 1120 | 1111 | |
| 1121 | INLINE void video_filter16(int *out_r, int *out_g, int *out_b, UINT16* vbuff, UINT8* hbuff, UINT32 hres) | |
| 1112 | INLINE void video_filter16(int *out_r, int *out_g, int *out_b, UINT16* vbuff, UINT8* hbuff, const UINT32 hres) | |
| 1122 | 1113 | { |
| 1114 | ||
| 1123 | 1115 | COLOR penumax, penumin, max, min; |
| 1124 | 1116 | UINT16 pix = *vbuff; |
| 1125 | UINT | |
| 1117 | const UINT8 | |
| 1126 | 1118 | UINT32 numoffull = 1; |
| 1127 | 1119 | UINT32 cvg; |
| 1128 | UINT32 r = ((pix >> 8) & 0xf8) | (pix >> 13); | |
| 1129 | UINT32 g = ((pix >> 3) & 0xf8) | ((pix >> 8) & 0x07); | |
| 1130 | UINT32 b = ((pix << 2) & 0xf8) | ((pix >> 3) & 0x07); | |
| 1131 | 1120 | UINT32 backr[7], backg[7], backb[7]; |
| 1132 | 1121 | UINT32 invr[7], invg[7], invb[7]; |
| 1133 | 1122 | INT32 coeff; |
| r7553 | r7554 | |
| 1136 | 1125 | INT32 toleft = -2; |
| 1137 | 1126 | UINT32 colr, colg, colb; |
| 1138 | 1127 | UINT32 enb; |
| 1139 | int i = 0; | |
| 1128 | UINT32 r = ((pix >> 8) & 0xf8) | (pix >> 13); | |
| 1129 | UINT32 g = ((pix >> 3) & 0xf8) | ((pix >> 8) & 0x07); | |
| 1130 | UINT32 b = ((pix << 2) & 0xf8) | ((pix >> 3) & 0x07); | |
| 1140 | 1131 | |
| 1141 | 1132 | *out_r = *out_g = *out_b = 0; |
| 1142 | 1133 | |
| r7553 | r7554 | |
| 1155 | 1146 | return; |
| 1156 | 1147 | } |
| 1157 | 1148 | |
| 1158 | for(i = 0; i < 5; i++) | |
| 1149 | for(int i = 0; i < 5; i++) | |
| 1159 | 1150 | { |
| 1160 | 1151 | pix = vbuff[leftup ^ WORD_ADDR_XOR]; |
| 1161 | 1152 | cvg = hbuff[leftup ^ BYTE_ADDR_XOR] & 3; |
| r7553 | r7554 | |
| 1181 | 1172 | leftup++; |
| 1182 | 1173 | } |
| 1183 | 1174 | |
| 1184 | for(i = 0; i < 5; i++) | |
| 1175 | for(int i = 0; i < 5; i++) | |
| 1185 | 1176 | { |
| 1186 | 1177 | pix = vbuff[leftdown ^ WORD_ADDR_XOR]; |
| 1187 | 1178 | cvg = hbuff[leftdown ^ BYTE_ADDR_XOR] & 3; |
| r7553 | r7554 | |
| 1207 | 1198 | leftdown++; |
| 1208 | 1199 | } |
| 1209 | 1200 | |
| 1210 | for(i = 0; i < 5; i++) | |
| 1201 | for(int i = 0; i < 5; i++) | |
| 1211 | 1202 | { |
| 1212 | 1203 | pix = vbuff[toleft ^ WORD_ADDR_XOR]; |
| 1213 | 1204 | cvg = hbuff[toleft ^ BYTE_ADDR_XOR] & 3; |
| r7553 | r7554 | |
| 1234 | 1225 | } |
| 1235 | 1226 | |
| 1236 | 1227 | video_max(&backr[0], &max.i.r, &enb); |
| 1237 | for(i = 1; i < 7; i++) | |
| 1228 | for(int i = 1; i < 7; i++) | |
| 1238 | 1229 | { |
| 1239 | 1230 | if (!((enb >> i) & 1)) |
| 1240 | 1231 | { |
| r7553 | r7554 | |
| 1242 | 1233 | } |
| 1243 | 1234 | } |
| 1244 | 1235 | video_max(&backg[0], &max.i.g, &enb); |
| 1245 | for (i = 1; i < 7; i++) | |
| 1236 | for (int i = 1; i < 7; i++) | |
| 1246 | 1237 | { |
| 1247 | 1238 | if (!((enb >> i) & 1)) |
| 1248 | 1239 | { |
| r7553 | r7554 | |
| 1250 | 1241 | } |
| 1251 | 1242 | } |
| 1252 | 1243 | video_max(&backb[0], &max.i.b, &enb); |
| 1253 | for (i = 1; i < 7; i++) | |
| 1244 | for (int i = 1; i < 7; i++) | |
| 1254 | 1245 | { |
| 1255 | 1246 | if (!((enb >> i) & 1)) |
| 1256 | 1247 | { |
| r7553 | r7554 | |
| 1258 | 1249 | } |
| 1259 | 1250 | } |
| 1260 | 1251 | video_max(&invr[0], &min.i.r, &enb); |
| 1261 | for (i = 1; i < 7; i++) | |
| 1252 | for (int i = 1; i < 7; i++) | |
| 1262 | 1253 | { |
| 1263 | 1254 | if (!((enb >> i) & 1)) |
| 1264 | 1255 | { |
| r7553 | r7554 | |
| 1266 | 1257 | } |
| 1267 | 1258 | } |
| 1268 | 1259 | video_max(&invg[0], &min.i.g, &enb); |
| 1269 | for (i = 1; i < 7; i++) | |
| 1260 | for (int i = 1; i < 7; i++) | |
| 1270 | 1261 | { |
| 1271 | 1262 | if (!((enb >> i) & 1)) |
| 1272 | 1263 | { |
| r7553 | r7554 | |
| 1274 | 1265 | } |
| 1275 | 1266 | } |
| 1276 | 1267 | video_max(&invb[0], &min.i.b, &enb); |
| 1277 | for (i = 1; i < 7; i++) | |
| 1268 | for (int i = 1; i < 7; i++) | |
| 1278 | 1269 | { |
| 1279 | 1270 | if (!((enb >> i) & 1)) |
| 1280 | 1271 | { |
| r7553 | r7554 | |
| 1283 | 1274 | } |
| 1284 | 1275 | |
| 1285 | 1276 | video_max(&backr[0], &penumax.i.r, &enb); |
| 1286 | i = ge_two(enb); | |
| 1287 | penumax.i.r = i ? max.i.r : penumax.i.r; | |
| 1277 | penumax.i.r = ge_two(enb) ? max.i.r : penumax.i.r; | |
| 1288 | 1278 | |
| 1289 | 1279 | video_max(&backg[0], &penumax.i.g, &enb); |
| 1290 | i = ge_two(enb); | |
| 1291 | penumax.i.g = i ? max.i.g : penumax.i.g; | |
| 1280 | penumax.i.g = ge_two(enb) ? max.i.g : penumax.i.g; | |
| 1292 | 1281 | |
| 1293 | 1282 | video_max(&backb[0], &penumax.i.b, &enb); |
| 1294 | i = ge_two(enb); | |
| 1295 | penumax.i.b = i ? max.i.b : penumax.i.b; | |
| 1283 | penumax.i.b = ge_two(enb) ? max.i.b : penumax.i.b; | |
| 1296 | 1284 | |
| 1297 | 1285 | video_max(&invr[0], &penumin.i.r, &enb); |
| 1298 | i = ge_two(enb); | |
| 1299 | penumin.i.r = i ? min.i.r : penumin.i.r; | |
| 1286 | penumin.i.r = ge_two(enb) ? min.i.r : penumin.i.r; | |
| 1300 | 1287 | |
| 1301 | 1288 | video_max(&invg[0], &penumin.i.g, &enb); |
| 1302 | i = ge_two(enb); | |
| 1303 | penumin.i.g = i ? min.i.g : penumin.i.g; | |
| 1289 | penumin.i.g = ge_two(enb) ? min.i.g : penumin.i.g; | |
| 1304 | 1290 | |
| 1305 | 1291 | video_max(&invb[0], &penumin.i.b, &enb); |
| 1306 | i = ge_two(enb); | |
| 1307 | penumin.i.b = i ? min.i.b : penumin.i.b; | |
| 1292 | penumin.i.b = ge_two(enb) ? min.i.b : penumin.i.b; | |
| 1308 | 1293 | |
| 1309 | 1294 | penumin.i.r = ~penumin.i.r; |
| 1310 | 1295 | penumin.i.g = ~penumin.i.g; |
| r7553 | r7554 | |
| 1313 | 1298 | colr = (UINT32)penumin.i.r + (UINT32)penumax.i.r - (r << 1); |
| 1314 | 1299 | colg = (UINT32)penumin.i.g + (UINT32)penumax.i.g - (g << 1); |
| 1315 | 1300 | colb = (UINT32)penumin.i.b + (UINT32)penumax.i.b - (b << 1); |
| 1316 | coeff = 8 - | |
| 1301 | coeff = 8 - | |
| 1317 | 1302 | colr = (((colr * coeff) + 4) >> 3) + r; |
| 1318 | 1303 | colg = (((colg * coeff) + 4) >> 3) + g; |
| 1319 | 1304 | colb = (((colb * coeff) + 4) >> 3) + b; |
| r7553 | r7554 | |
| 1373 | 1358 | |
| 1374 | 1359 | INLINE void divot_filter16_buffer(int* r, int* g, int* b, COLOR* vibuffer) |
| 1375 | 1360 | { |
| 1376 | UINT32 leftr, leftg, leftb, rightr, rightg, rightb; | |
| 1377 | COLOR leftpix, rightpix, filtered; | |
| 1378 | leftpix = vibuffer[-1]; | |
| 1379 | rightpix = vibuffer[1]; | |
| 1380 | filtered = *vibuffer; | |
| 1361 | COLOR leftpix = vibuffer[-1]; | |
| 1362 | COLOR rightpix = vibuffer[1]; | |
| 1363 | COLOR filtered = *vibuffer; | |
| 1381 | 1364 | |
| 1382 | 1365 | *r = filtered.i.r; |
| 1383 | 1366 | *g = filtered.i.g; |
| 1384 | 1367 | *b = filtered.i.b; |
| 1385 | leftr = leftpix.i.r; | |
| 1386 | leftg = leftpix.i.g; | |
| 1387 | leftb = leftpix.i.b; | |
| 1388 | rightr = rightpix.i.r; | |
| 1389 | rightg = rightpix.i.g; | |
| 1390 | rightb = rightpix.i.b; | |
| 1368 | UINT32 leftr = leftpix.i.r; | |
| 1369 | UINT32 leftg = leftpix.i.g; | |
| 1370 | UINT32 leftb = leftpix.i.b; | |
| 1371 | UINT32 rightr = rightpix.i.r; | |
| 1372 | UINT32 rightg = rightpix.i.g; | |
| 1373 | UINT32 rightb = rightpix.i.b; | |
| 1374 | ||
| 1391 | 1375 | if ((leftr >= *r && rightr >= leftr) || (leftr >= rightr && *r >= leftr)) |
| 1392 | 1376 | { |
| 1393 | 1377 | *r = leftr; //left = median value |
| r7553 | r7554 | |
| 1624 | 1608 | temp |= 1; |
| 1625 | 1609 | } |
| 1626 | 1610 | else if (Pixels[0] < Pixels[pos]) |
| 1611 | { | |
| 1627 | 1612 | temp |= 1; |
| 1613 | } | |
| 1628 | 1614 | |
| 1629 | 1615 | if (Pixels[1] > Pixels[pos]) |
| 1630 | 1616 | { |
| r7553 | r7554 | |
| 1632 | 1618 | pos = 1; |
| 1633 | 1619 | } |
| 1634 | 1620 | else if (Pixels[1] < Pixels[pos]) |
| 1621 | { | |
| 1635 | 1622 | temp |= 2; |
| 1623 | } | |
| 1636 | 1624 | else |
| 1625 | { | |
| 1637 | 1626 | pos = 1; |
| 1627 | } | |
| 1638 | 1628 | |
| 1639 | 1629 | if (Pixels[2] > Pixels[pos]) |
| 1640 | 1630 | { |
| r7553 | r7554 | |
| 1642 | 1632 | pos = 2; |
| 1643 | 1633 | } |
| 1644 | 1634 | else if (Pixels[2] < Pixels[pos]) |
| 1635 | { | |
| 1645 | 1636 | temp |= 4; |
| 1637 | } | |
| 1646 | 1638 | else |
| 1639 | { | |
| 1647 | 1640 | pos = 2; |
| 1641 | } | |
| 1648 | 1642 | |
| 1649 | 1643 | if (Pixels[3] > Pixels[pos]) |
| 1650 | 1644 | { |
| r7553 | r7554 | |
| 1652 | 1646 | pos = 3; |
| 1653 | 1647 | } |
| 1654 | 1648 | else if (Pixels[3] < Pixels[pos]) |
| 1649 | { | |
| 1655 | 1650 | temp |= 8; |
| 1651 | } | |
| 1656 | 1652 | else |
| 1653 | { | |
| 1657 | 1654 | pos = 3; |
| 1655 | } | |
| 1658 | 1656 | |
| 1659 | 1657 | if (Pixels[4] > Pixels[pos]) |
| 1660 | 1658 | { |
| r7553 | r7554 | |
| 1662 | 1660 | pos = 4; |
| 1663 | 1661 | } |
| 1664 | 1662 | else if (Pixels[4] < Pixels[pos]) |
| 1663 | { | |
| 1665 | 1664 | temp |= 16; |
| 1665 | } | |
| 1666 | 1666 | else |
| 1667 | { | |
| 1667 | 1668 | pos = 4; |
| 1669 | } | |
| 1668 | 1670 | |
| 1669 | 1671 | if (Pixels[5] > Pixels[pos]) |
| 1670 | 1672 | { |
| r7553 | r7554 | |
| 1672 | 1674 | pos = 5; |
| 1673 | 1675 | } |
| 1674 | 1676 | else if (Pixels[5] < Pixels[pos]) |
| 1677 | { | |
| 1675 | 1678 | temp |= 32; |
| 1679 | } | |
| 1676 | 1680 | else |
| 1681 | { | |
| 1677 | 1682 | pos = 5; |
| 1683 | } | |
| 1678 | 1684 | |
| 1679 | 1685 | if (Pixels[6] > Pixels[pos]) |
| 1680 | 1686 | { |
| r7553 | r7554 | |
| 1682 | 1688 | pos = 6; |
| 1683 | 1689 | } |
| 1684 | 1690 | else if (Pixels[6] < Pixels[pos]) |
| 1691 | { | |
| 1685 | 1692 | temp |= 64; |
| 1693 | } | |
| 1686 | 1694 | else |
| 1695 | { | |
| 1687 | 1696 | pos = 6; |
| 1697 | } | |
| 1688 | 1698 | |
| 1689 | 1699 | if (Pixels[7] > Pixels[pos]) |
| 1690 | 1700 | { |
| r7553 | r7554 | |
| 1692 | 1702 | pos = 7; |
| 1693 | 1703 | } |
| 1694 | 1704 | else if (Pixels[7] < Pixels[pos]) |
| 1705 | { | |
| 1695 | 1706 | temp |= 128; |
| 1707 | } | |
| 1696 | 1708 | else |
| 1709 | { | |
| 1697 | 1710 | pos = 7; |
| 1711 | } | |
| 1698 | 1712 | |
| 1699 | 1713 | *enb = temp; |
| 1700 | 1714 | *max = Pixels[pos]; |
| 1701 | 1715 | } |
| 1716 | ||
| 1702 | 1717 | /* |
| 1703 | 1718 | INLINE void video_max(UINT32* Pixels, UINT8* max, UINT32* enb) |
| 1704 | 1719 | { |
| r7553 | r7554 | |
| 1858 | 1873 | |
| 1859 | 1874 | INLINE UINT32 getlog2(UINT32 lod_clamp) |
| 1860 | 1875 | { |
| 1861 | int i; | |
| 1862 | 1876 | if (lod_clamp < 2) |
| 1863 | 1877 | { |
| 1864 | 1878 | return 0; |
| 1865 | 1879 | } |
| 1866 | 1880 | else |
| 1867 | 1881 | { |
| 1868 | for (i = 7; i > 0; i--) | |
| 1882 | for (int i = 7; i > 0; i--) | |
| 1869 | 1883 | { |
| 1870 | 1884 | if ((lod_clamp >> i) & 1) |
| 1871 | 1885 | { |
| r7553 | r7554 | |
| 1883 | 1897 | |
| 1884 | 1898 | INLINE void BILERP_AND_WRITE(UINT32* src0, UINT32* src1, UINT32* dest) |
| 1885 | 1899 | { |
| 1886 | UINT32 r1, g1, b1, col0, col1; | |
| 1887 | col0 = *src0; | |
| 1888 | col1 = *src1; | |
| 1889 | r1 = (((col0 >> 16)&0xff) + ((col1 >> 16)&0xff))>>1; | |
| 1890 | g1 = (((col0 >> 8)&0xff) + ((col1 >> 8)&0xff))>>1; | |
| 1891 | b1 = (((col0 >> 0)&0xff) + ((col1 >> 0)&0xff))>>1; | |
| 1900 | UINT32 col0 = *src0; | |
| 1901 | UINT32 col1 = *src1; | |
| 1902 | UINT32 r1 = (((col0 >> 16) & 0xff) + ((col1 >> 16) & 0xff))>>1; | |
| 1903 | UINT32 g1 = (((col0 >> 8) & 0xff) + ((col1 >> 8) & 0xff))>>1; | |
| 1904 | UINT32 b1 = (((col0 >> 0) & 0xff) + ((col1 >> 0) & 0xff))>>1; | |
| 1892 | 1905 | *dest = (r1 << 16) | (g1 << 8) | b1; |
| 1893 | 1906 | } |
| 1894 | 1907 | |
| r7553 | r7554 | |
| 1896 | 1909 | { |
| 1897 | 1910 | int w_carry; |
| 1898 | 1911 | int shift; |
| 1899 | int normout; | |
| 1900 | int wnorm; | |
| 1901 | int tlu_rcp; | |
| 1902 | int shift_value; | |
| 1903 | 1912 | |
| 1904 | 1913 | if (!(sw & 0x7fff)) |
| 1905 | 1914 | { |
| r7553 | r7554 | |
| 1914 | 1923 | for(shift = 1; shift <= 14 && !((sw << shift) & 0x8000); shift++); |
| 1915 | 1924 | shift -= 1; |
| 1916 | 1925 | |
| 1917 | normout = ((sw << shift) & 0x3fff) >> 8; | |
| 1918 | wnorm = ((sw << shift) & 0xff) << 2; | |
| 1926 | int normout = ((sw << shift) & 0x3fff) >> 8; | |
| 1927 | int wnorm = ((sw << shift) & 0xff) << 2; | |
| 1919 | 1928 | |
| 1920 | tlu_rcp = ((-(NormSlopeRom[normout] * wnorm)) >> 10) + NormPointRom[normout]; | |
| 1929 | int tlu_rcp = ((-(NormSlopeRom[normout] * wnorm)) >> 10) + NormPointRom[normout]; | |
| 1921 | 1930 | |
| 1922 | 1931 | if(shift == 14) |
| 1923 | 1932 | { |
| r7553 | r7554 | |
| 1926 | 1935 | } |
| 1927 | 1936 | else |
| 1928 | 1937 | { |
| 1929 | shift_value = 13 - shift; | |
| 1938 | int shift_value = 13 - shift; | |
| 1930 | 1939 | *sss = (SIGN16(ss) * tlu_rcp) >> shift_value; |
| 1931 | 1940 | *sst = (SIGN16(st) * tlu_rcp) >> shift_value; |
| 1932 | 1941 | } |
| r7553 | r7554 | |
| 2084 | 2093 | static void fill_rectangle_32bit(RECTANGLE *rect) |
| 2085 | 2094 | { |
| 2086 | 2095 | UINT32 *fb = (UINT32*)&rdram[(fb_address / 4)]; |
| 2087 | int index, i, j; | |
| 2088 | int x1 = rect->xh / 4; | |
| 2089 | int x2 = rect->xl / 4; | |
| 2090 | int y1 = rect->yh / 4; | |
| 2091 | int y2 = rect->yl / 4; | |
| 2092 | int clipx1, clipx2, clipy1, clipy2; | |
| 2096 | int x1 = rect->xh; | |
| 2097 | int x2 = rect->xl; | |
| 2098 | int y1 = rect->yh; | |
| 2099 | int y2 = rect->yl; | |
| 2093 | 2100 | int fill_cvg = 0; |
| 2094 | 2101 | |
| 2095 | // TODO: clip | |
| 2096 | clipx1 = clip.xh / 4; | |
| 2097 | clipx2 = clip.xl / 4; | |
| 2098 | clipy1 = clip.yh / 4; | |
| 2099 | clipy2 = clip.yl / 4; | |
| 2100 | ||
| 2101 | 2102 | // clip |
| 2102 | if (x1 < clipx | |
| 2103 | if (x1 < clip.xh) | |
| 2103 | 2104 | { |
| 2104 | x1 = clipx | |
| 2105 | x1 = clip.xh; | |
| 2105 | 2106 | } |
| 2106 | if (y1 < clipy | |
| 2107 | if (y1 < clip.yh) | |
| 2107 | 2108 | { |
| 2108 | y1 = clipy | |
| 2109 | y1 = clip.yh; | |
| 2109 | 2110 | } |
| 2110 | if (x2 >= clipx | |
| 2111 | if (x2 >= clip.xl) | |
| 2111 | 2112 | { |
| 2112 | x2 = clipx | |
| 2113 | x2 = clip.xl - 1; | |
| 2113 | 2114 | } |
| 2114 | if (y2 >= clipy | |
| 2115 | if (y2 >= clip.yl) | |
| 2115 | 2116 | { |
| 2116 | y2 = clipy | |
| 2117 | y2 = clip.yl - 1; | |
| 2117 | 2118 | } |
| 2118 | 2119 | |
| 2119 | 2120 | shade_color.c = 0; |
| r7553 | r7554 | |
| 2122 | 2123 | |
| 2123 | 2124 | if (other_modes.cycle_type == CYCLE_TYPE_FILL) |
| 2124 | 2125 | { |
| 2125 | for (j=y1; j <= y2; j++) | |
| 2126 | for (int j = y1; j <= y2; j++) | |
| 2126 | 2127 | { |
| 2127 | index = j * fb_width; | |
| 2128 | int index = j * fb_width; | |
| 2128 | 2129 | |
| 2129 | for (i=x1; i <= x2; i++) | |
| 2130 | for (int i = x1; i <= x2; i++) | |
| 2130 | 2131 | { |
| 2131 | 2132 | fb[(index + i)^1] = fill_color; |
| 2132 | 2133 | } |
| r7553 | r7554 | |
| 2134 | 2135 | } |
| 2135 | 2136 | else if (other_modes.cycle_type == CYCLE_TYPE_1) |
| 2136 | 2137 | { |
| 2137 | for (j=y1; j <= y2; j++) | |
| 2138 | for (int j = y1; j <= y2; j++) | |
| 2138 | 2139 | { |
| 2139 | 2140 | COLOR c; |
| 2140 | index = j * fb_width; | |
| 2141 | for (i=x1; i <= x2; i++) | |
| 2141 | int index = j * fb_width; | |
| 2142 | for (int i = x1; i <= x2; i++) | |
| 2142 | 2143 | { |
| 2143 | 2144 | curpixel_cvg = fill_cvg; |
| 2144 | 2145 | COLOR_COMBINER1(c); |
| r7553 | r7554 | |
| 2148 | 2149 | } |
| 2149 | 2150 | else if (other_modes.cycle_type == CYCLE_TYPE_2) |
| 2150 | 2151 | { |
| 2151 | for (j=y1; j <= y2; j++) | |
| 2152 | for (int j = y1; j <= y2; j++) | |
| 2152 | 2153 | { |
| 2153 | 2154 | COLOR c1, c2; |
| 2154 | index = j * fb_width; | |
| 2155 | for (i=x1; i <= x2; i++) | |
| 2155 | int index = j * fb_width; | |
| 2156 | for (int i = x1; i <= x2; i++) | |
| 2156 | 2157 | { |
| 2157 | 2158 | curpixel_cvg = fill_cvg; |
| 2158 | 2159 | COLOR_COMBINER2_C0(c1); |
| r7553 | r7554 | |
| 2170 | 2171 | INLINE void texture_rectangle_32bit(TEX_RECTANGLE *rect) |
| 2171 | 2172 | { // TODO: Z-compare and Z-update |
| 2172 | 2173 | UINT32 *fb = (UINT32*)&rdram[(fb_address / 4)]; |
| 2173 | int i, j; | |
| 2174 | int x1, x2, y1, y2; | |
| 2175 | int s, t; | |
| 2176 | int ss, st; | |
| 2177 | 2174 | |
| 2178 | int clipx1, clipx2, clipy1, clipy2; | |
| 2179 | ||
| 2180 | 2175 | UINT32 tilenum = rect->tilenum; |
| 2181 | 2176 | UINT32 tilenum2 = 0; |
| 2182 | 2177 | TILE *tex_tile = &tile[rect->tilenum]; |
| 2183 | 2178 | TILE *tex_tile2 = NULL; |
| 2184 | 2179 | |
| 2185 | x1 = (rect->xh / 4); | |
| 2186 | x2 = (rect->xl / 4); | |
| 2187 | y1 = (rect->yh / 4); | |
| 2188 | y2 = (rect->yl / 4); | |
| 2180 | int x1 = rect->xh; | |
| 2181 | int x2 = rect->xl; | |
| 2182 | int y1 = rect->yh; | |
| 2183 | int y2 = rect->yl; | |
| 2189 | 2184 | |
| 2190 | 2185 | if (other_modes.cycle_type == CYCLE_TYPE_FILL || other_modes.cycle_type == CYCLE_TYPE_COPY) |
| 2191 | 2186 | { |
| r7553 | r7554 | |
| 2194 | 2189 | y2 += 1; |
| 2195 | 2190 | } |
| 2196 | 2191 | |
| 2197 | clipx1 = clip.xh / 4; | |
| 2198 | clipx2 = clip.xl / 4; | |
| 2199 | clipy1 = clip.yh / 4; | |
| 2200 | clipy2 = clip.yl / 4; | |
| 2192 | // clip | |
| 2193 | if (x1 < clip.xh) | |
| 2194 | { | |
| 2195 | x1 = clip.xh; | |
| 2196 | } | |
| 2197 | if (y1 < clip.yh) | |
| 2198 | { | |
| 2199 | y1 = clip.yh; | |
| 2200 | } | |
| 2201 | if (x2 >= clip.xl) | |
| 2202 | { | |
| 2203 | x2 = clip.xl - 1; | |
| 2204 | } | |
| 2205 | if (y2 >= clip.yl) | |
| 2206 | { | |
| 2207 | y2 = clip.yl - 1; | |
| 2208 | } | |
| 2201 | 2209 | |
| 2202 | 2210 | calculate_clamp_diffs(tex_tile->num); |
| 2203 | 2211 | |
| r7553 | r7554 | |
| 2217 | 2225 | |
| 2218 | 2226 | shade_color.c = 0; // Needed by Pilotwings 64 |
| 2219 | 2227 | |
| 2220 | t = (int)(rect->t) << 5; | |
| 2228 | int t = (int)(rect->t) << 5; | |
| 2221 | 2229 | |
| 2222 | 2230 | if (other_modes.cycle_type == CYCLE_TYPE_1) |
| 2223 | 2231 | { |
| 2224 | 2232 | CACHE_TEXTURE_PARAMS(tex_tile); |
| 2225 | 2233 | |
| 2226 | for (j = y1; j < y2; j++) | |
| 2234 | for (int j = y1; j < y2; j++) | |
| 2227 | 2235 | { |
| 2228 | 2236 | int fb_index = j * fb_width; |
| 2229 | 2237 | |
| 2230 | s = (int)(rect->s) << 5; | |
| 2238 | int s = (int)(rect->s) << 5; | |
| 2231 | 2239 | |
| 2232 | for (i = x1; i < x2; i++) | |
| 2240 | for (int i = x1; i < x2; i++) | |
| 2233 | 2241 | { |
| 2234 | 2242 | COLOR c; |
| 2235 | curpixel_cvg=8; | |
| 2236 | ss = s >> 5; | |
| 2237 | st = t >> 5; | |
| 2243 | int ss = s >> 5; | |
| 2244 | int st = t >> 5; | |
| 2245 | ||
| 2246 | curpixel_cvg = 8; | |
| 2247 | ||
| 2238 | 2248 | if (rect->flip) |
| 2239 | 2249 | { |
| 2240 | 2250 | texel0_color.c = TEXTURE_PIPELINE(st, ss, tex_tile); |
| r7553 | r7554 | |
| 2256 | 2266 | } |
| 2257 | 2267 | else if (other_modes.cycle_type == CYCLE_TYPE_2) |
| 2258 | 2268 | { |
| 2259 | for (j = y1; j < y2; j++) | |
| 2269 | for (int j = y1; j < y2; j++) | |
| 2260 | 2270 | { |
| 2261 | 2271 | int fb_index = j * fb_width; |
| 2262 | 2272 | |
| 2263 | s = (int)(rect->s) << 5; | |
| 2273 | int s = (int)(rect->s) << 5; | |
| 2264 | 2274 | |
| 2265 | for (i = x1; i < x2; i++) | |
| 2275 | for (int i = x1; i < x2; i++) | |
| 2266 | 2276 | { |
| 2267 | 2277 | COLOR c1, c2; |
| 2278 | int ss = s >> 5; | |
| 2279 | int st = t >> 5; | |
| 2280 | ||
| 2268 | 2281 | curpixel_cvg=8; |
| 2269 | ss = s >> 5; | |
| 2270 | st = t >> 5; | |
| 2282 | ||
| 2271 | 2283 | if (rect->flip) |
| 2272 | 2284 | { |
| 2273 | 2285 | CACHE_TEXTURE_PARAMS(tex_tile); |
| r7553 | r7554 | |
| 2300 | 2312 | { |
| 2301 | 2313 | CACHE_TEXTURE_PARAMS(tex_tile); |
| 2302 | 2314 | |
| 2303 | for (j = y1; j < y2; j++) | |
| 2315 | for (int j = y1; j < y2; j++) | |
| 2304 | 2316 | { |
| 2305 | 2317 | int fb_index = j * fb_width; |
| 2306 | 2318 | |
| 2307 | s = (int)(rect->s) << 5; | |
| 2319 | int s = (int)(rect->s) << 5; | |
| 2308 | 2320 | |
| 2309 | for (i = x1; i < x2; i++) | |
| 2321 | for (int i = x1; i < x2; i++) | |
| 2310 | 2322 | { |
| 2311 | ss = s >> 5; | |
| 2312 | st = t >> 5; | |
| 2323 | int ss = s >> 5; | |
| 2324 | int st = t >> 5; | |
| 2313 | 2325 | if (rect->flip) |
| 2314 | 2326 | { |
| 2315 | 2327 | texel0_color.c = TEXTURE_PIPELINE(st, ss, tex_tile); |
| r7553 | r7554 | |
| 2339 | 2351 | UINT32 *fb = (UINT32*)&rdram[fb_address / 4]; |
| 2340 | 2352 | UINT16 *zb = (UINT16*)&rdram[zb_address / 4]; |
| 2341 | 2353 | UINT8 *zhb = &hidden_bits[zb_address >> 1]; |
| 2342 | int i, j; | |
| 2343 | 2354 | int tilenum = tex_tile->num; |
| 2344 | 2355 | |
| 2345 | int clipx1, clipx2, clipy1, clipy2; | |
| 2346 | ||
| 2347 | 2356 | UINT32 tilenum2 = 0; |
| 2348 | 2357 | TILE *tex_tile2 = NULL; |
| 2349 | 2358 | |
| r7553 | r7554 | |
| 2356 | 2365 | SPAN_PARAM dt = span[0].dt; |
| 2357 | 2366 | SPAN_PARAM dw = span[0].dw; |
| 2358 | 2367 | int dzpix = span[0].dzpix; |
| 2359 | int drinc, dginc, dbinc, dainc, dzinc, dsinc, dtinc, dwinc; | |
| 2360 | 2368 | int xinc = flip ? 1 : -1; |
| 2361 | 2369 | |
| 2362 | 2370 | calculate_clamp_diffs(tilenum); |
| 2363 | 2371 | |
| 2364 | clipx1 = clip.xh / 4; | |
| 2365 | clipx2 = clip.xl / 4; | |
| 2366 | clipy1 = clip.yh / 4; | |
| 2367 | clipy2 = clip.yl / 4; | |
| 2368 | ||
| 2369 | 2372 | if (other_modes.cycle_type == CYCLE_TYPE_2 && texture) |
| 2370 | 2373 | { |
| 2371 | 2374 | if (!other_modes.tex_lod_en) |
| r7553 | r7554 | |
| 2380 | 2383 | } |
| 2381 | 2384 | } |
| 2382 | 2385 | |
| 2383 | if (start < clipy | |
| 2386 | if (start < clip.yh) | |
| 2384 | 2387 | { |
| 2385 | start = clipy | |
| 2388 | start = clip.yh; | |
| 2386 | 2389 | } |
| 2387 | if (start >= clipy | |
| 2390 | if (start >= clip.yl) | |
| 2388 | 2391 | { |
| 2389 | start = clipy | |
| 2392 | start = clip.yl - 1; | |
| 2390 | 2393 | } |
| 2391 | if (end < clipy | |
| 2394 | if (end < clip.yh) | |
| 2392 | 2395 | { |
| 2393 | end = clipy | |
| 2396 | end = clip.yh; | |
| 2394 | 2397 | } |
| 2395 | if (end >= clipy | |
| 2398 | if (end >= clip.yl) | |
| 2396 | 2399 | { |
| 2397 | end = clipy | |
| 2400 | end = clip.yl - 1; | |
| 2398 | 2401 | } |
| 2399 | 2402 | |
| 2400 | drinc = flip ? (dr.w) : -dr.w; | |
| 2401 | dginc = flip ? (dg.w) : -dg.w; | |
| 2402 | dbinc = flip ? (db.w) : -db.w; | |
| 2403 | dainc = flip ? (da.w) : -da.w; | |
| 2404 | dzinc = flip ? (dz.w) : -dz.w; | |
| 2405 | dsinc = flip ? (ds.w) : -ds.w; | |
| 2406 | dtinc = flip ? (dt.w) : -dt.w; | |
| 2407 | dwinc = flip ? (dw.w) : -dw.w; | |
| 2403 | int drinc = flip ? (dr.w) : -dr.w; | |
| 2404 | int dginc = flip ? (dg.w) : -dg.w; | |
| 2405 | int dbinc = flip ? (db.w) : -db.w; | |
| 2406 | int dainc = flip ? (da.w) : -da.w; | |
| 2407 | int dzinc = flip ? (dz.w) : -dz.w; | |
| 2408 | int dsinc = flip ? (ds.w) : -ds.w; | |
| 2409 | int dtinc = flip ? (dt.w) : -dt.w; | |
| 2410 | int dwinc = flip ? (dw.w) : -dw.w; | |
| 2408 | 2411 | |
| 2409 | 2412 | if(!shade) |
| 2410 | 2413 | { |
| r7553 | r7554 | |
| 2413 | 2416 | |
| 2414 | 2417 | CACHE_TEXTURE_PARAMS(tex_tile); |
| 2415 | 2418 | |
| 2416 | for (i = start; i <= end; i++) | |
| 2419 | for (int i = start; i <= end; i++) | |
| 2417 | 2420 | { |
| 2418 | 2421 | int xstart = span[i].lx; |
| 2419 | 2422 | int xend = span[i].rx; |
| r7553 | r7554 | |
| 2426 | 2429 | SPAN_PARAM t = span[i].t; |
| 2427 | 2430 | SPAN_PARAM w = span[i].w; |
| 2428 | 2431 | |
| 2429 | int x; | |
| 2432 | int x = xend; | |
| 2430 | 2433 | int fb_index = fb_width * i; |
| 2431 | int length; | |
| 2434 | int length = flip ? (xstart - xend) : (xend - xstart); | |
| 2432 | 2435 | |
| 2433 | x = xend; | |
| 2434 | ||
| 2435 | length = flip ? (xstart - xend) : (xend - xstart); | |
| 2436 | ||
| 2437 | for (j=0; j <= length; j++) | |
| 2436 | for (int j = 0; j <= length; j++) | |
| 2438 | 2437 | { |
| 2439 | int sr = r.h.h; | |
| 2440 | int sg = g.h.h; | |
| 2441 | int sb = b.h.h; | |
| 2442 | int sa = a.h.h; | |
| 2443 | int ss = s.h.h; | |
| 2444 | int st = t.h.h; | |
| 2445 | int sw = w.h.h; | |
| 2446 | 2438 | UINT32 sz = z.w >> 13; |
| 2447 | int sss = 0, sst = 0; | |
| 2448 | 2439 | if (other_modes.z_source_sel) |
| 2449 | 2440 | { |
| 2450 | 2441 | sz = (((UINT32)primitive_z) << 3) & 0x3ffff; |
| 2451 | 2442 | dzpix = primitive_delta_z; |
| 2452 | 2443 | } |
| 2453 | 2444 | |
| 2454 | if (x >= clipx | |
| 2445 | if (x >= clip.xh && x < clip.xl) | |
| 2455 | 2446 | { |
| 2456 | 2447 | curpixel_cvg = span[i].cvg[x]; |
| 2457 | 2448 | if (curpixel_cvg) |
| r7553 | r7554 | |
| 2467 | 2458 | c1.i.r = c1.i.g = c1.i.b = c1.i.a = 0; |
| 2468 | 2459 | c2.i.r = c2.i.g = c2.i.b = c2.i.a = 0; |
| 2469 | 2460 | |
| 2470 | if (other_modes.persp_tex_en) | |
| 2471 | { | |
| 2472 | tcdiv(ss, st, sw, &sss, &sst); | |
| 2473 | } | |
| 2474 | else | |
| 2475 | { | |
| 2476 | sss = ss; | |
| 2477 | sst = st; | |
| 2478 | } | |
| 2479 | ||
| 2480 | 2461 | if (shade) |
| 2481 | 2462 | { |
| 2463 | int sr = r.h.h; | |
| 2464 | int sg = g.h.h; | |
| 2465 | int sb = b.h.h; | |
| 2466 | int sa = a.h.h; | |
| 2467 | ||
| 2482 | 2468 | // Needed by Superman |
| 2483 | 2469 | if (sr > 0xff) sr = 0xff; |
| 2484 | 2470 | if (sg > 0xff) sg = 0xff; |
| r7553 | r7554 | |
| 2496 | 2482 | |
| 2497 | 2483 | if (texture) |
| 2498 | 2484 | { |
| 2485 | int ss = s.h.h; | |
| 2486 | int st = t.h.h; | |
| 2487 | int sw = w.h.h; | |
| 2488 | int sss = 0; | |
| 2489 | int sst = 0; | |
| 2490 | ||
| 2491 | if (other_modes.persp_tex_en) | |
| 2492 | { | |
| 2493 | tcdiv(ss, st, sw, &sss, &sst); | |
| 2494 | } | |
| 2495 | else | |
| 2496 | { | |
| 2497 | sss = ss; | |
| 2498 | sst = st; | |
| 2499 | } | |
| 2500 | ||
| 2499 | 2501 | if (other_modes.cycle_type == CYCLE_TYPE_1) |
| 2500 | 2502 | { |
| 2501 | 2503 | texel0_color.c = TEXTURE_PIPELINE(sss, sst, tex_tile); |
| r7553 | r7554 | |
| 3469 | 3471 | |
| 3470 | 3472 | static RDP_COMMAND( rdp_tex_rect ) |
| 3471 | 3473 | { |
| 3472 | UINT32 w3, w4; | |
| 3473 | 3474 | TEX_RECTANGLE rect; |
| 3475 | UINT32 w3 = rdp_cmd_data[rdp_cmd_cur+2]; | |
| 3476 | UINT32 w4 = rdp_cmd_data[rdp_cmd_cur+3]; | |
| 3474 | 3477 | |
| 3475 | w3 = rdp_cmd_data[rdp_cmd_cur+2]; | |
| 3476 | w4 = rdp_cmd_data[rdp_cmd_cur+3]; | |
| 3477 | ||
| 3478 | 3478 | rect.tilenum = (w2 >> 24) & 0x7; |
| 3479 | rect.xl = (w1 >> 12) & 0xfff; | |
| 3480 | rect.yl = (w1 >> 0) & 0xfff; | |
| 3481 | rect.xh = (w2 >> 12) & 0xfff; | |
| 3482 | rect.yh = (w2 >> 0) & 0xfff; | |
| 3479 | rect.xl = ((w1 >> 12) & 0xfff) >> 2; | |
| 3480 | rect.yl = ((w1 >> 0) & 0xfff) >> 2; | |
| 3481 | rect.xh = ((w2 >> 12) & 0xfff) >> 2; | |
| 3482 | rect.yh = ((w2 >> 0) & 0xfff) >> 2; | |
| 3483 | 3483 | rect.s = (w3 >> 16) & 0xffff; |
| 3484 | 3484 | rect.t = (w3 >> 0) & 0xffff; |
| 3485 | 3485 | rect.dsdx = (w4 >> 16) & 0xffff; |
| r7553 | r7554 | |
| 3495 | 3495 | |
| 3496 | 3496 | static RDP_COMMAND( rdp_tex_rect_flip ) |
| 3497 | 3497 | { |
| 3498 | UINT32 w3, w4; | |
| 3499 | 3498 | TEX_RECTANGLE rect; |
| 3499 | UINT32 w3 = rdp_cmd_data[rdp_cmd_cur+2]; | |
| 3500 | UINT32 w4 = rdp_cmd_data[rdp_cmd_cur+3]; | |
| 3500 | 3501 | |
| 3501 | w3 = rdp_cmd_data[rdp_cmd_cur+2]; | |
| 3502 | w4 = rdp_cmd_data[rdp_cmd_cur+3]; | |
| 3503 | ||
| 3504 | 3502 | rect.tilenum = (w2 >> 24) & 0x7; |
| 3505 | rect.xl = (w1 >> 12) & 0xfff; | |
| 3506 | rect.yl = (w1 >> 0) & 0xfff; | |
| 3507 | rect.xh = (w2 >> 12) & 0xfff; | |
| 3508 | rect.yh = (w2 >> 0) & 0xfff; | |
| 3503 | rect.xl = ((w1 >> 12) & 0xfff) >> 2; | |
| 3504 | rect.yl = ((w1 >> 0) & 0xfff) >> 2; | |
| 3505 | rect.xh = ((w2 >> 12) & 0xfff) >> 2; | |
| 3506 | rect.yh = (( w2 >> 0) & 0xfff) >> 2; | |
| 3509 | 3507 | rect.t = (w3 >> 16) & 0xffff; |
| 3510 | 3508 | rect.s = (w3 >> 0) & 0xffff; |
| 3511 | 3509 | rect.dtdy = (w4 >> 16) & 0xffff; |
| r7553 | r7554 | |
| 3573 | 3571 | clip.xl = (w2 >> 12) & 0xfff; |
| 3574 | 3572 | clip.yl = (w2 >> 0) & 0xfff; |
| 3575 | 3573 | |
| 3574 | clip.xh >>= 2; | |
| 3575 | clip.yh >>= 2; | |
| 3576 | clip.xl >>= 2; | |
| 3577 | clip.yl >>= 2; | |
| 3578 | ||
| 3576 | 3579 | // TODO: handle f & o? |
| 3577 | 3580 | } |
| 3578 | 3581 | |
| r7553 | r7554 | |
| 3584 | 3587 | |
| 3585 | 3588 | static RDP_COMMAND( rdp_set_other_modes ) |
| 3586 | 3589 | { |
| 3587 | int index; | |
| 3588 | ||
| 3589 | 3590 | other_modes.cycle_type = (w1 >> 20) & 0x3; |
| 3590 | other_modes.persp_tex_en = (w1 & 0x80000) ? 1 : 0; | |
| 3591 | other_modes.detail_tex_en = (w1 & 0x40000) ? 1 : 0; | |
| 3592 | other_modes.sharpen_tex_en = (w1 & 0x20000) ? 1 : 0; | |
| 3593 | other_modes.tex_lod_en = (w1 & 0x10000) ? 1 : 0; | |
| 3594 | other_modes.en_tlut = (w1 & 0x08000) ? 1 : 0; | |
| 3595 | other_modes.tlut_type = (w1 & 0x04000) ? 1 : 0; | |
| 3596 | other_modes.sample_type = (w1 & 0x02000) ? 1 : 0; | |
| 3597 | other_modes.mid_texel = (w1 & 0x01000) ? 1 : 0; | |
| 3598 | other_modes.bi_lerp0 = (w1 & 0x00800) ? 1 : 0; | |
| 3599 | other_modes.bi_lerp1 = (w1 & 0x00400) ? 1 : 0; | |
| 3600 | other_modes.convert_one = (w1 & 0x00200) ? 1 : 0; | |
| 3601 | other_modes.key_en = (w1 & 0x00100) ? 1 : 0; | |
| 3591 | other_modes.persp_tex_en = (w1 & 0x80000) ? true : false; | |
| 3592 | other_modes.detail_tex_en = (w1 & 0x40000) ? true : false; | |
| 3593 | other_modes.sharpen_tex_en = (w1 & 0x20000) ? true : false; | |
| 3594 | other_modes.tex_lod_en = (w1 & 0x10000) ? true : false; | |
| 3595 | other_modes.en_tlut = (w1 & 0x08000) ? true : false; | |
| 3596 | other_modes.tlut_type = (w1 & 0x04000) ? true : false; | |
| 3597 | other_modes.sample_type = (w1 & 0x02000) ? true : false; | |
| 3598 | other_modes.mid_texel = (w1 & 0x01000) ? true : false; | |
| 3599 | other_modes.bi_lerp0 = (w1 & 0x00800) ? true : false; | |
| 3600 | other_modes.bi_lerp1 = (w1 & 0x00400) ? true : false; | |
| 3601 | other_modes.convert_one = (w1 & 0x00200) ? true : false; | |
| 3602 | other_modes.key_en = (w1 & 0x00100) ? true : false; | |
| 3602 | 3603 | other_modes.rgb_dither_sel = (w1 >> 6) & 0x3; |
| 3603 | 3604 | other_modes.alpha_dither_sel = (w1 >> 4) & 0x3; |
| 3604 | 3605 | other_modes.blend_m1a_0 = (w2 >> 30) & 0x3; |
| r7553 | r7554 | |
| 3609 | 3610 | other_modes.blend_m2a_1 = (w2 >> 20) & 0x3; |
| 3610 | 3611 | other_modes.blend_m2b_0 = (w2 >> 18) & 0x3; |
| 3611 | 3612 | other_modes.blend_m2b_1 = (w2 >> 16) & 0x3; |
| 3612 | other_modes.force_blend = (w2 & 0x4000) ? 1 : 0; | |
| 3613 | other_modes.alpha_cvg_select = (w2 & 0x2000) ? 1 : 0; | |
| 3614 | other_modes.cvg_times_alpha = (w2 & 0x1000) ? 1 : 0; | |
| 3613 | other_modes.force_blend = (w2 & 0x4000) ? true : false; | |
| 3614 | other_modes.alpha_cvg_select = (w2 & 0x2000) ? true : false; | |
| 3615 | other_modes.cvg_times_alpha = (w2 & 0x1000) ? true : false; | |
| 3615 | 3616 | other_modes.z_mode = (w2 >> 10) & 0x3; |
| 3616 | 3617 | other_modes.cvg_dest = (w2 >> 8) & 0x3; |
| 3617 | other_modes.color_on_cvg = (w2 & 0x80) ? 1 : 0; | |
| 3618 | other_modes.image_read_en = (w2 & 0x40) ? 1 : 0; | |
| 3619 | other_modes.z_update_en = (w2 & 0x20) ? 1 : 0; | |
| 3620 | other_modes.z_compare_en = (w2 & 0x10) ? 1 : 0; | |
| 3621 | other_modes.antialias_en = (w2 & 0x08) ? 1 : 0; | |
| 3622 | other_modes.z_source_sel = (w2 & 0x04) ? 1 : 0; | |
| 3623 | other_modes.dither_alpha_en = (w2 & 0x02) ? 1 : 0; | |
| 3624 | other_modes.alpha_compare_en = (w2 & 0x01) ? 1 : 0; | |
| 3618 | other_modes.color_on_cvg = (w2 & 0x80) ? true : false; | |
| 3619 | other_modes.image_read_en = (w2 & 0x40) ? true : false; | |
| 3620 | other_modes.z_update_en = (w2 & 0x20) ? true : false; | |
| 3621 | other_modes.z_compare_en = (w2 & 0x10) ? true : false; | |
| 3622 | other_modes.antialias_en = (w2 & 0x08) ? true : false; | |
| 3623 | other_modes.z_source_sel = (w2 & 0x04) ? true : false; | |
| 3624 | other_modes.dither_alpha_en = (w2 & 0x02) ? true : false; | |
| 3625 | other_modes.alpha_compare_en = (w2 & 0x01) ? true : false; | |
| 3625 | 3626 | |
| 3626 | 3627 | texture_rectangle_16bit = rdp_texture_rectangle_16bit_func[((((other_modes.z_update_en | other_modes.z_source_sel) << 3) | ((other_modes.z_compare_en | other_modes.z_source_sel) << 2) | other_modes.cycle_type) << 2) | other_modes.rgb_dither_sel]; |
| 3627 | 3628 | fill_rectangle_16bit = rdp_fill_rectangle_16bit_func[(other_modes.cycle_type << 2) | other_modes.rgb_dither_sel]; |
| r7553 | r7554 | |
| 3649 | 3650 | render_spans_16_s_t_nz_f = rdp_render_spans_16_func[28 + ((other_modes.cycle_type & 1) | (other_modes.z_compare_en << 5) | (other_modes.z_update_en << 6) | (other_modes.rgb_dither_sel << 7))]; |
| 3650 | 3651 | render_spans_16_s_t_z_f = rdp_render_spans_16_func[30 + ((other_modes.cycle_type & 1) | (other_modes.z_compare_en << 5) | (other_modes.z_update_en << 6) | (other_modes.rgb_dither_sel << 7))]; |
| 3651 | 3652 | |
| 3652 | for(index = 0; index < 8; index++) | |
| 3653 | for(int index = 0; index < 8; index++) | |
| 3653 | 3654 | { |
| 3654 | 3655 | tile[index].fetch_index = (tile[index].size << 5) | (tile[index].format << 2) | (other_modes.en_tlut << 1) | other_modes.tlut_type; |
| 3655 | 3656 | } |
| r7553 | r7554 | |
| 3677 | 3678 | |
| 3678 | 3679 | static RDP_COMMAND( rdp_load_tlut ) |
| 3679 | 3680 | { |
| 3680 | int i; | |
| 3681 | int tl, th, sl, sh; | |
| 3682 | int tilenum = (w2 >> 24) & 7; | |
| 3681 | const int tilenum = (w2 >> 24) & 7; | |
| 3683 | 3682 | TILE* tex_tile = &tile[tilenum]; |
| 3684 | 3683 | |
| 3685 | sl = tex_tile->sl = ((w1 >> 12) & 0xfff); | |
| 3686 | tl = tex_tile->tl = w1 & 0xfff; | |
| 3687 | sh = tex_tile->sh = ((w2 >> 12) & 0xfff); | |
| 3688 | th = tex_tile->th = w2 & 0xfff; | |
| 3684 | int sl = tex_tile->sl = ((w1 >> 12) & 0xfff); | |
| 3685 | int tl = tex_tile->tl = w1 & 0xfff; | |
| 3686 | int sh = tex_tile->sh = ((w2 >> 12) & 0xfff); | |
| 3689 | 3687 | |
| 3690 | 3688 | switch (ti_size) |
| 3691 | 3689 | { |
| r7553 | r7554 | |
| 3697 | 3695 | UINT16 *dst = (UINT16*)&TMEM[tex_tile->tmem]; |
| 3698 | 3696 | int count = ((sh >> 2) - (sl >> 2)) + 1; |
| 3699 | 3697 | |
| 3700 | for (i = 0; i < count; i++) | |
| 3698 | for (int i = 0; i < count; i++) | |
| 3701 | 3699 | { |
| 3702 | 3700 | if((i*4) < 0x400) |
| 3703 | 3701 | { |
| r7553 | r7554 | |
| 3737 | 3735 | |
| 3738 | 3736 | static RDP_COMMAND( rdp_load_block ) |
| 3739 | 3737 | { |
| 3740 | int i, width; | |
| 3741 | UINT16 sl, sh, tl, dxt; | |
| 3742 | int tilenum = (w2 >> 24) & 0x7; | |
| 3743 | UINT32 *src, *tc; | |
| 3744 | UINT32 tb; | |
| 3738 | const int tilenum = (w2 >> 24) & 0x7; | |
| 3739 | const UINT32 ti_address2 = ti_address - ((ti_address & 3) ? 4 : 0); | |
| 3745 | 3740 | UINT16 *ram16 = (UINT16*)rdram; |
| 3746 | UINT32 ti_address2 = ti_address - ((ti_address & 3) ? 4 : 0); | |
| 3747 | 3741 | int ti_width2 = ti_width; |
| 3748 | 3742 | int slindwords = 0; |
| 3749 | 3743 | |
| 3750 | tile[tilenum].sl = sl = ((w1 >> 12) & 0xfff); | |
| 3751 | tile[tilenum].tl = tl = ((w1 >> 0) & 0xfff); | |
| 3752 | tile[tilenum].sh = sh = ((w2 >> 12) & 0xfff); | |
| 3753 | dxt = ((w2 >> 0) & 0xfff); | |
| 3744 | UINT32 sl = tile[tilenum].sl = ((w1 >> 12) & 0xfff); | |
| 3745 | UINT32 tl = tile[tilenum].tl = ((w1 >> 0) & 0xfff); | |
| 3746 | UINT32 sh = tile[tilenum].sh = ((w2 >> 12) & 0xfff); | |
| 3747 | UINT32 dxt = ((w2 >> 0) & 0xfff); | |
| 3754 | 3748 | |
| 3755 | width = (sh - sl) + 1; | |
| 3749 | int width = (sh - sl) + 1; | |
| 3756 | 3750 | |
| 3757 | 3751 | if (width > 2048) // Hack for Magical Tetris Challenge |
| 3758 | 3752 | { |
| 3759 | 3753 | width = 2048; |
| 3760 | 3754 | } |
| 3761 | 3755 | |
| 3762 | switch (ti_size) | |
| 3763 | { | |
| 3764 | case PIXEL_SIZE_4BIT: width >>= 1; break; | |
| 3765 | case PIXEL_SIZE_8BIT: break; | |
| 3766 | case PIXEL_SIZE_16BIT: width <<= 1; break; | |
| 3767 | case PIXEL_SIZE_32BIT: width <<= 2; break; | |
| 3768 | } | |
| 3769 | ||
| 3770 | 3756 | if ((ti_address & 3) && (ti_address & 0xffffff00) != 0xf8a00) |
| 3771 | 3757 | { |
| 3772 | 3758 | fatalerror( "load block: unaligned ti_address 0x%x",ti_address ); // Rat Attack, Frogger 2 prototype |
| 3773 | 3759 | } |
| 3774 | 3760 | |
| 3775 | src = (UINT32*)&ram16[ti_address2 >> 1]; | |
| 3776 | tc = (UINT32*)TMEM; | |
| 3777 | tb = tile[tilenum].tmem >> 2; | |
| 3761 | UINT32* src = (UINT32*)&ram16[ti_address2 >> 1]; | |
| 3762 | UINT32* tc = (UINT32*)TMEM; | |
| 3763 | UINT32 tb = tile[tilenum].tmem >> 2; | |
| 3778 | 3764 | |
| 3779 | if ((tb + (width >> 2)) > 0x400) | |
| 3780 | { | |
| 3781 | width = 0x1000 - tb*4; // Hack for Magical Tetris Challenge | |
| 3782 | } | |
| 3765 | slindwords = sl; | |
| 3783 | 3766 | |
| 3784 | switch (ti_size) | |
| 3767 | switch (ti_size) // slindwords Neededby Vigilante 8 | |
| 3785 | 3768 | { |
| 3786 | case PIXEL_SIZE_4BIT: ti_width2 >>= 1; break; | |
| 3787 | case PIXEL_SIZE_8BIT: break; | |
| 3788 | case PIXEL_SIZE_16BIT: ti_width2 <<= 1; break; | |
| 3789 | case PIXEL_SIZE_32BIT: ti_width2 <<= 2; break; | |
| 3769 | case PIXEL_SIZE_4BIT: ti_width2 >>= 1; slindwords >>= 3; width >>= 1; break; | |
| 3770 | case PIXEL_SIZE_8BIT: slindwords >>= 2; break; | |
| 3771 | case PIXEL_SIZE_16BIT: ti_width2 <<= 1; slindwords >>= 1; width <<= 1; break; | |
| 3772 | case PIXEL_SIZE_32BIT: ti_width2 <<= 2; width <<= 2; break; | |
| 3790 | 3773 | } |
| 3791 | 3774 | |
| 3792 | slindwords = sl; | |
| 3793 | switch (ti_size) // Needed by Vigilante 8 | |
| 3775 | if ((tb + (width >> 2)) > 0x400) | |
| 3794 | 3776 | { |
| 3795 | case PIXEL_SIZE_4BIT: slindwords >>= 3; break; | |
| 3796 | case PIXEL_SIZE_8BIT: slindwords >>= 2;break; | |
| 3797 | case PIXEL_SIZE_16BIT: slindwords >>= 1; break; | |
| 3798 | case PIXEL_SIZE_32BIT: break; | |
| 3777 | width = 0x1000 - tb*4; // Hack for Magical Tetris Challenge | |
| 3799 | 3778 | } |
| 3800 | 3779 | |
| 3801 | 3780 | if (width & 7) // Sigh... another Rat Attack-specific thing. |
| r7553 | r7554 | |
| 3805 | 3784 | |
| 3806 | 3785 | if (dxt != 0) |
| 3807 | 3786 | { |
| 3808 | int j= 0; | |
| 3787 | int j = 0; | |
| 3809 | 3788 | int t = 0; |
| 3810 | 3789 | int oldt = 0; |
| 3811 | 3790 | int ptr; |
| 3812 | 3791 | int xorval = (fb_size == PIXEL_SIZE_16BIT && ti_size == PIXEL_SIZE_32BIT ) ? 2 : 1; // Wave Race-specific |
| 3813 | 3792 | UINT32 srcstart = ((tl * ti_width2) >> 2) + slindwords; |
| 3814 | 3793 | src = &src[srcstart]; |
| 3815 | for (i = 0; i < (width >> 2); i += 2) | |
| 3794 | for (int i = 0; i < (width >> 2); i += 2) | |
| 3816 | 3795 | { |
| 3817 | 3796 | oldt = t; |
| 3818 | 3797 | t = ((j >> 11) & 1) ? xorval : 0; |
| r7553 | r7554 | |
| 3837 | 3816 | |
| 3838 | 3817 | static RDP_COMMAND( rdp_load_tile ) |
| 3839 | 3818 | { |
| 3840 | int i, j; | |
| 3841 | UINT16 sl, sh, tl, th; | |
| 3842 | int width, height; | |
| 3843 | int tilenum = (w2 >> 24) & 0x7; | |
| 3819 | const int tilenum = (w2 >> 24) & 0x7; | |
| 3844 | 3820 | TILE *tex_tile = &tile[tilenum]; |
| 3845 | 3821 | int line = tex_tile->line; // Per Ziggy |
| 3846 | int toppad; | |
| 3822 | int toppad = 0; | |
| 3847 | 3823 | |
| 3848 | 3824 | if (!line) |
| 3849 | 3825 | { |
| r7553 | r7554 | |
| 3854 | 3830 | tex_tile->tl = ((w1 >> 0) & 0xfff); |
| 3855 | 3831 | tex_tile->sh = ((w2 >> 12) & 0xfff); |
| 3856 | 3832 | tex_tile->th = ((w2 >> 0) & 0xfff); |
| 3857 | sl = tex_tile->sl / 4; | |
| 3858 | tl = tex_tile->tl / 4; | |
| 3859 | sh = tex_tile->sh / 4; | |
| 3860 | th = tex_tile->th / 4; | |
| 3861 | 3833 | |
| 3862 | width = (sh - sl) + 1; | |
| 3863 | height = (th - tl) + 1; | |
| 3834 | UINT16 sl = tex_tile->sl / 4; | |
| 3835 | UINT16 tl = tex_tile->tl / 4; | |
| 3836 | UINT16 sh = tex_tile->sh / 4; | |
| 3837 | UINT16 th = tex_tile->th / 4; | |
| 3864 | 3838 | |
| 3839 | int width = (sh - sl) + 1; | |
| 3840 | int height = (th - tl) + 1; | |
| 3841 | ||
| 3865 | 3842 | if (ti_size < 3) |
| 3866 | 3843 | { |
| 3867 | 3844 | toppad = (width * ti_size) & 0x7; |
| r7553 | r7554 | |
| 3885 | 3862 | height = (4096 - tb) / line; // Per Ziggy |
| 3886 | 3863 | } |
| 3887 | 3864 | |
| 3888 | for (j=0; j < height; j++) | |
| 3865 | for (int j = 0; j < height; j++) | |
| 3889 | 3866 | { |
| 3890 | 3867 | int tline = tb + (tex_tile->line * j); |
| 3891 | 3868 | int s = ((j + tl) * ti_width) + sl; |
| 3892 | 3869 | #define BYTE_XOR_DWORD_SWAP 7 |
| 3893 | 3870 | int xorval8 = ((j & 1) ? BYTE_XOR_DWORD_SWAP : BYTE_ADDR_XOR); // Per Ziggy |
| 3894 | 3871 | |
| 3895 | for (i=0; i < width; i++) | |
| 3872 | for (int i = 0; i < width; i++) | |
| 3896 | 3873 | { |
| 3897 | 3874 | tc[(tline + i) ^ xorval8] = src[(ti_address + s + i) ^ BYTE_ADDR_XOR]; |
| 3898 | 3875 | } |
| r7553 | r7554 | |
| 3912 | 3889 | height = (2048 - tb) / (line / 2); // Per Ziggy |
| 3913 | 3890 | } |
| 3914 | 3891 | |
| 3915 | for (j = 0; j < height; j++) | |
| 3892 | for (int j = 0; j < height; j++) | |
| 3916 | 3893 | { |
| 3917 | 3894 | int tline = tb + ((tex_tile->line / 2) * j); |
| 3918 | 3895 | int s = 0; |
| r7553 | r7554 | |
| 3925 | 3902 | #define WORD_XOR_DWORD_SWAP 3 |
| 3926 | 3903 | xorval16 = (j & 1) ? WORD_XOR_DWORD_SWAP : WORD_ADDR_XOR; |
| 3927 | 3904 | |
| 3928 | for (i = 0; i < width; i++) | |
| 3905 | for (int i = 0; i < width; i++) | |
| 3929 | 3906 | { |
| 3930 | 3907 | taddr = (tline+i) ^ xorval16; |
| 3931 | 3908 | if (taddr < 2048) // Needed by World Driver Championship |
| r7553 | r7554 | |
| 3952 | 3929 | height = (1024 - tb) / (line/4); // Per Ziggy |
| 3953 | 3930 | } |
| 3954 | 3931 | |
| 3955 | for (j=0; j < height; j++) | |
| 3932 | for (int j = 0; j < height; j++) | |
| 3956 | 3933 | { |
| 3957 | 3934 | int tline = tb + ((tex_tile->line / 2) * j); |
| 3958 | 3935 | int s = ((j + tl) * ti_width) + sl; |
| 3959 | 3936 | int xorval32cur = (j & 1) ? xorval32 : 0; |
| 3960 | for (i=0; i < width; i++) | |
| 3937 | for (int i = 0; i < width; i++) | |
| 3961 | 3938 | { |
| 3962 | 3939 | tc[(tline + i) ^ xorval32cur] = src[s + i]; |
| 3963 | 3940 | } |
| r7553 | r7554 | |
| 3997 | 3974 | static RDP_COMMAND( rdp_fill_rect ) |
| 3998 | 3975 | { |
| 3999 | 3976 | RECTANGLE rect; |
| 4000 | rect.xl = (w1 >> 12) & 0xfff; | |
| 4001 | rect.yl = (w1 >> 0) & 0xfff; | |
| 4002 | rect.xh = (w2 >> 12) & 0xfff; | |
| 4003 | rect.yh = (w2 >> 0) & 0xfff; | |
| 3977 | rect.xl = (w1 >> 14) & 0x3ff; | |
| 3978 | rect.yl = (w1 >> 2) & 0x3ff; | |
| 3979 | rect.xh = (w2 >> 14) & 0x3ff; | |
| 3980 | rect.yh = (w2 >> 2) & 0x3ff; | |
| 4004 | 3981 | |
| 4005 | 3982 | switch (fb_size) |
| 4006 | 3983 | { |
| r7553 | r7554 | |
|---|---|---|
| 1122 | 1122 | // buriki tm1 = roz |
| 1123 | 1123 | |
| 1124 | 1124 | // my life would be easier if the roz we're talking about for complex zoom wasn't setting this as well |
| 1125 | if ((tileregs & 0x | |
| 1125 | if ((tileregs & 0x0800)==0x0000) // floor mode | |
| 1126 | 1126 | { |
| 1127 | 1127 | /* Floor mode - per pixel simple / complex modes? -- every other line? |
| 1128 | 1128 | (there doesn't seem to be enough data in Buriki for every line at least) |
| 1129 | 1129 | */ |
| 1130 | if ((tileregs&0xf000) == 0x1000) | |
| 1130 | //if ((tileregs&0xf000) == 0x1000) | |
| 1131 | //{ | |
| 1132 | // popmessage("Floor is Active"); | |
| 1133 | //} | |
| 1134 | int line; | |
| 1135 | rectangle clip; | |
| 1136 | INT32 xtopleft,xmiddle; | |
| 1137 | INT32 ytopleft,ymiddle; | |
| 1138 | int xinc,yinc; | |
| 1139 | ||
| 1140 | const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen); | |
| 1141 | clip.min_x = visarea->min_x; | |
| 1142 | clip.max_x = visarea->max_x; | |
| 1143 | clip.min_y = visarea->min_y; | |
| 1144 | clip.max_y = visarea->max_y; | |
| 1145 | ||
| 1146 | if (global_tileregs&0x04000000) // globally selects alt scroll register layout??? | |
| 1131 | 1147 | { |
| 1132 | popmessage("Floor is Active"); | |
| 1148 | /* logic would dictate that this should be the 'complex' scroll register layout, | |
| 1149 | but per-line. That doesn't work however. | |
| 1150 | ||
| 1151 | You only have line data for the number of lines on the screen, not enough for | |
| 1152 | the complex register layout | |
| 1153 | ||
| 1154 | HOWEVER, using the code below doesn't work either. This might be because | |
| 1155 | they have mosaic turned on, and it adopts a new meaning in linescroll modes? | |
| 1156 | ||
| 1157 | The code below could also be wrong, and rowscroll simply acts the same in all | |
| 1158 | modes, this is hard to know because ss64_2 barely uses it. | |
| 1159 | ||
| 1160 | */ | |
| 1161 | ||
| 1162 | popmessage("Unhandled rowscroll %02x", tileregs>>12); | |
| 1133 | 1163 | } |
| 1134 | else | |
| 1164 | else // 'simple' mode with linescroll, used in some ss64_2 levels (assumed to be correct, but doesn't do much with it.. so could be wrong) | |
| 1135 | 1165 | { |
| 1136 | popmessage("Unknown Floor/Mosaic combo %04x", tileregs&0xf800); | |
| 1166 | for (line=0;line<448;line++) | |
| 1167 | { | |
| 1168 | clip.min_y = clip.max_y = line; | |
| 1169 | ||
| 1170 | if (hng64_videoregs[0x00]&0x00010000) // disable all scrolling / zoom (test screen) (maybe) | |
| 1171 | { | |
| 1172 | /* If this bit is active the scroll registers don't seem valid at all? | |
| 1173 | It either disables zooming, or disables use of the scroll registers completely | |
| 1174 | - used at startup | |
| 1175 | */ | |
| 1176 | ||
| 1177 | xtopleft = 0; | |
| 1178 | xmiddle = 256<<16; | |
| 1179 | ||
| 1180 | ytopleft = 0; | |
| 1181 | ymiddle = 256<<16; | |
| 1182 | } | |
| 1183 | else | |
| 1184 | { | |
| 1185 | xtopleft = (hng64_videoram[(0x40000+(line*0x10)+(scrollbase<<4))/4]); | |
| 1186 | xmiddle = (hng64_videoram[(0x40004+(line*0x10)+(scrollbase<<4))/4]); // middle screen point | |
| 1187 | ytopleft = (hng64_videoram[(0x40008+(line*0x10)+(scrollbase<<4))/4]); | |
| 1188 | ymiddle = (hng64_videoram[(0x4000c+(line*0x10)+(scrollbase<<4))/4]); // middle screen point | |
| 1189 | } | |
| 1190 | ||
| 1191 | xinc = (xmiddle - xtopleft) / 512; | |
| 1192 | yinc = (ymiddle - ytopleft) / 512; | |
| 1193 | ||
| 1194 | hng64_tilemap_draw_roz(machine, bitmap,&clip,tilemap,xtopleft,ytopleft, | |
| 1195 | xinc<<1,0,0,yinc<<1, | |
| 1196 | 1, | |
| 1197 | 0,0, debug_blend_enabled?HNG64_TILEMAP_ADDITIVE:HNG64_TILEMAP_NORMAL); | |
| 1198 | ||
| 1199 | ||
| 1200 | } | |
| 1137 | 1201 | } |
| 1138 | 1202 | } |
| 1139 | 1203 | else |
| 1140 | 1204 | { |
| 1141 | if ((tileregs&0xf000) | |
| 1205 | if ((tileregs&0xf000) | |
| 1142 | 1206 | popmessage("Tilemap Mosaic? %02x", tileregs>>12); |
| 1143 | 1207 | // 0x1000 is set up the buriki 2nd title screen with rotating logo and in fatal fury at various times? |
| 1144 | 1208 | |
| r7553 | r7554 | |
| 1384 | 1448 | // 0940 - samurai shodown 64 |
| 1385 | 1449 | // 0880 - buriki |
| 1386 | 1450 | |
| 1387 | // mmml dbr? ???? ???? | |
| 1388 | // m = mosaic related? (xrally, l maybe too) | |
| 1389 | // l = floor effects / linescroll enable (buriki on tilemap1, fatal fury on tilemap3) - also enables for rotating logo on buriki ?! | |
| 1451 | // mmmm dbr? ??e? ???? | |
| 1452 | // m = mosaic related? | |
| 1453 | // -- they seem to enable mosaic at the same time as rowscroll in several cases (floor in buriki / ff) | |
| 1454 | // and also on the rotating logo in buriki.. does it cause some kind of aliasing side-effect, or.. ? | |
| 1390 | 1455 | // r = tile size (seems correct) |
| 1391 | 1456 | // b = 4bpp/8bpp (seems correct) (beast busters, samsh64, sasm64 2, xrally switch it for some screens) |
| 1392 | // d = floor / mosaic toggle | |
| 1393 | // when d = 0 then l = floor enable | |
| 1394 | // when d = 1 then l = lower part of mosaic? | |
| 1395 | // (buriki one floor vs. 2nd game logo sequence seems a good example) | |
| 1396 | // could have other meanings too? | |
| 1457 | // d = line (floor) mode - buriki, fatafurwa, some backgrounds in ss64_2 | |
| 1458 | // e = enable according to sams64_2 debug mode, buriki and xrally.. but NOT fatal fury :-( | |
| 1459 | ||
| 1460 | ||
| 1397 | 1461 | */ |
| 1398 | 1462 | |
| 1399 | 1463 | |
| r7553 | r7554 | |
| 1414 | 1478 | UINT16 tileflags0, tileflags1; |
| 1415 | 1479 | UINT16 tileflags2, tileflags3; |
| 1416 | 1480 | |
| 1481 | #if 0 | |
| 1482 | // press in sams64_2 attract mode for a nice debug screen from the game | |
| 1483 | // not sure how functional it is, and it doesn't appear to test everything (rowscroll modes etc.) | |
| 1484 | // but it could be useful | |
| 1485 | if ( input_code_pressed_once(screen->machine, KEYCODE_L) ) | |
| 1486 | { | |
| 1487 | const address_space *space = cputag_get_address_space(screen->machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 1488 | memory_write_byte(space, 0x2f27c8, 0x2); | |
| 1489 | } | |
| 1490 | #endif | |
| 1491 | ||
| 1417 | 1492 | bitmap_fill(bitmap, 0, hng64_tcram[0x50/4] & 0x10000 ? get_black_pen(screen->machine) : screen->machine->pens[0]); //FIXME: Is the register correct? check with HW tests |
| 1418 | 1493 | bitmap_fill(screen->machine->priority_bitmap, cliprect, 0x00); |
| 1419 | 1494 | |
| r7553 | r7554 | |
| 1525 | 1600 | popmessage("%08x %08x TR(%04x %04x %04x %04x) SB(%04x %04x %04x %04x) %08x %08x %08x %08x %08x AA(%08x %08x) %08x %08x", |
| 1526 | 1601 | hng64_videoregs[0x00], |
| 1527 | 1602 | hng64_videoregs[0x01], |
| 1528 | (hng64_videoregs[0x02]>>16)&0xf9ff, // bits we're sure about are masked out | |
| 1529 | (hng64_videoregs[0x02]>>0)&0xf9ff, | |
| 1530 | (hng64_videoregs[0x03]>>16)&0xf9ff, | |
| 1531 | (hng64_videoregs[0x03]>>0)&0xf9ff, | |
| 1603 | (hng64_videoregs[0x02]>>16)&0xf9ff, // ---- bits we're sure about are masked out | |
| 1604 | (hng64_videoregs[0x02]>>0)&0xf9ff, // ss64_2 debug mode indicates that 0x0040 is enable! | |
| 1605 | (hng64_videoregs[0x03]>>16)&0xf9ff, // buriki agrees (debug data on text layer) xrally agress (pink layer) | |
| 1606 | (hng64_videoregs[0x03]>>0)&0xf9ff, // fatal fury doesn't (all backgrounds have it set) joy | |
| 1532 | 1607 | (hng64_videoregs[0x04]>>16)&0xffff, |
| 1533 | 1608 | (hng64_videoregs[0x04]>>0)&0xffff, |
| 1534 | 1609 | (hng64_videoregs[0x05]>>16)&0xffff, |
| r7553 | r7554 | |
| 1554 | 1629 | hng64_tcram[0x00/4], |
| 1555 | 1630 | hng64_tcram[0x04/4], |
| 1556 | 1631 | hng64_tcram[0x08/4], // tilemaps 0/1 ? |
| 1557 | hng64_tcram[0x0c/4], // | |
| 1632 | hng64_tcram[0x0c/4], // ss64_2 debug 04000000 = 'half' on tm1 00000004 = 'half' on tm3 (used in transitions?) | |
| 1558 | 1633 | hng64_tcram[0x10/4], |
| 1559 | 1634 | hng64_tcram[0x14/4], |
| 1560 | 1635 | hng64_tcram[0x18/4], |
| r7553 | r7554 | |
|---|---|---|
| 501 | 501 | ROM_LOAD( "mcg-12.5a", 0x000000, 0x200000, CRC(bef9b28f) SHA1(b7a2a0539ea4d22b48ce3f3eb367017f219da2c1) ) // basic coin sounds etc. |
| 502 | 502 | ROM_LOAD( "mcg-13.9k", 0x200000, 0x200000, CRC(92301551) SHA1(a7891e7a3c8d7f165ca73f5d5a034501df46e9a2) ) // music |
| 503 | 503 | ROM_LOAD( "mcg-14.6a", 0x400000, 0x200000, CRC(c0d8b5f0) SHA1(08eecf6e7d0273e41cda3472709a67e2b16068c9) ) // music |
| 504 | ||
| 505 | ROM_REGION16_BE( 0x80, "eeprom", ROMREGION_ERASE00 ) | |
| 506 | ROM_LOAD( "avengrgs.nv", 0x00, 0x80, CRC(c0e84b4e) SHA1(e7afca68cc5fa69ded32bc0a1dcc6a59fe7f081b) ) | |
| 504 | 507 | ROM_END |
| 505 | 508 | |
| 506 | 509 | ROM_START( avengrgsj ) |
| r7553 | r7554 | |
| 529 | 532 | ROM_LOAD( "mcg-12.5a", 0x000000, 0x200000, CRC(bef9b28f) SHA1(b7a2a0539ea4d22b48ce3f3eb367017f219da2c1) ) // basic coin sounds etc. |
| 530 | 533 | ROM_LOAD( "mcg-13.9k", 0x200000, 0x200000, CRC(92301551) SHA1(a7891e7a3c8d7f165ca73f5d5a034501df46e9a2) ) // music |
| 531 | 534 | ROM_LOAD( "mcg-14.6a", 0x400000, 0x200000, CRC(c0d8b5f0) SHA1(08eecf6e7d0273e41cda3472709a67e2b16068c9) ) // music |
| 535 | ||
| 536 | ROM_REGION16_BE( 0x80, "eeprom", ROMREGION_ERASE00 ) | |
| 537 | ROM_LOAD( "avengrgsj.nv", 0x00, 0x80, CRC(7ea70843) SHA1(f010b77b824e37c5e8c5722d5fff79751118f0b7) ) | |
| 532 | 538 | ROM_END |
| 533 | 539 | |
| 540 | ||
| 534 | 541 | ROM_START( stadhr96 ) |
| 535 | 542 | ROM_REGION( 0x100000, "maincpu", 0 ) |
| 536 | ROM_LOAD32_WORD( "ead00-4.2a", 0x000000, 0x80000, CRC(b0adfc39) SHA1(3094dfb7c7f8fa9d7e10d98dff8fb8aba285d710) ) | |
| 537 | ROM_LOAD32_WORD( "ead01-4.2b", 0x000002, 0x80000, CRC(0b332820) SHA1(28b757fe529250711fcb82424ba63c222a9329b9) ) | |
| 543 | ROM_LOAD32_WORD( "sh-eaj.2a", 0x000000, 0x80000, CRC(10d1496a) SHA1(1dc151547463a38d717159b3dfce7ffd78a943ad) ) | |
| 544 | ROM_LOAD32_WORD( "sh-eaj.2b", 0x000002, 0x80000, CRC(608a9144) SHA1(15e2fa99dc96e8ebd9868713ae7708cb824fc6c5) ) | |
| 538 | 545 | |
| 539 | 546 | ROM_REGION( 0x1800000, "gfx1", 0 ) |
| 540 | 547 | ROM_LOAD16_BYTE( "mcm-00.2e", 0x0000001, 0x400000, CRC(c1919c3c) SHA1(168000ff1512a147d7029ee8878dd70de680fb08) ) |
| r7553 | r7554 | |
| 545 | 552 | ROM_LOAD16_BYTE( "mcm-05.11m",0x1000000, 0x400000, CRC(476f03d7) SHA1(5c58ab4fc0e29f76619827bc27fa64cce2627e48) ) |
| 546 | 553 | |
| 547 | 554 | ROM_REGION( 0x80000, "gfx2", 0 ) |
| 548 | ROM_LOAD( "ea | |
| 555 | ROM_LOAD( "sh-eaf | |
| 549 | 556 | |
| 550 | ROM_REGION( 0x | |
| 557 | ROM_REGION( 0x400000, "ymz", 0 ) | |
| 551 | 558 | ROM_LOAD( "mcm-06.6a", 0x000000, 0x400000, CRC(fbc178f3) SHA1(f44cb913177b6552b30c139505c3284bc445ba13) ) |
| 559 | ||
| 560 | ROM_REGION16_BE( 0x80, "eeprom", ROMREGION_ERASE00 ) | |
| 561 | ROM_LOAD( "eeprom-stadhr96.bin", 0x00, 0x80, CRC(77861793) SHA1(df43b3ee55b7eb840cd6d3e5c5e04c68ce64bb57) ) | |
| 552 | 562 | ROM_END |
| 553 | 563 | |
| 554 | ROM_START( stadhr96 | |
| 564 | ROM_START( stadhr96j ) | |
| 555 | 565 | ROM_REGION( 0x100000, "maincpu", 0 ) |
| 556 | ROM_LOAD32_WORD( "sh-eaj.2a", 0x000000, 0x80000, CRC(10d1496a) SHA1(1dc151547463a38d717159b3dfce7ffd78a943ad) ) | |
| 557 | ROM_LOAD32_WORD( "sh-eaj.2b", 0x000002, 0x80000, CRC(608a9144) SHA1(15e2fa99dc96e8ebd9868713ae7708cb824fc6c5) ) | |
| 566 | ROM_LOAD32_WORD( "ead00-4.2a", 0x000000, 0x80000, CRC(b0adfc39) SHA1(3094dfb7c7f8fa9d7e10d98dff8fb8aba285d710) ) | |
| 567 | ROM_LOAD32_WORD( "ead01-4.2b", 0x000002, 0x80000, CRC(0b332820) SHA1(28b757fe529250711fcb82424ba63c222a9329b9) ) | |
| 558 | 568 | |
| 559 | 569 | ROM_REGION( 0x1800000, "gfx1", 0 ) |
| 560 | 570 | ROM_LOAD16_BYTE( "mcm-00.2e", 0x0000001, 0x400000, CRC(c1919c3c) SHA1(168000ff1512a147d7029ee8878dd70de680fb08) ) |
| r7553 | r7554 | |
| 565 | 575 | ROM_LOAD16_BYTE( "mcm-05.11m",0x1000000, 0x400000, CRC(476f03d7) SHA1(5c58ab4fc0e29f76619827bc27fa64cce2627e48) ) |
| 566 | 576 | |
| 567 | 577 | ROM_REGION( 0x80000, "gfx2", 0 ) |
| 568 | ROM_LOAD( " | |
| 578 | ROM_LOAD( " | |
| 569 | 579 | |
| 570 | ROM_REGION( 0x | |
| 580 | ROM_REGION( 0x800000, "ymz", 0 ) | |
| 571 | 581 | ROM_LOAD( "mcm-06.6a", 0x000000, 0x400000, CRC(fbc178f3) SHA1(f44cb913177b6552b30c139505c3284bc445ba13) ) |
| 582 | ||
| 583 | ROM_REGION16_BE( 0x80, "eeprom", ROMREGION_ERASE00 ) | |
| 584 | ROM_LOAD( "eeprom-stadhr96j.bin", 0x00, 0x80, CRC(cf98098f) SHA1(54fc9bdd1ce9b836dad7b4a9909608e8f9842f71) ) | |
| 572 | 585 | ROM_END |
| 573 | 586 | |
| 587 | ||
| 574 | 588 | ROM_START( hoops96 ) |
| 575 | 589 | ROM_REGION( 0x100000, "maincpu", 0 ) |
| 576 | 590 | ROM_LOAD32_WORD( "sz00-0.2a", 0x000000, 0x80000, CRC(971b4376) SHA1(e60d8d628bd1dc95d7f2b8840b0b188e68905c12) ) |
| r7553 | r7554 | |
| 588 | 602 | |
| 589 | 603 | ROM_REGION( 0x400000, "ymz", 0 ) |
| 590 | 604 | ROM_LOAD( "mce-05.6a", 0x000000, 0x400000, CRC(e7a9355a) SHA1(039b23666e224c33ebb02baa80e496f8bce0514f) ) |
| 605 | ||
| 606 | ROM_REGION16_BE( 0x80, "eeprom", ROMREGION_ERASE00 ) | |
| 607 | ROM_LOAD( "hoops.nv", 0x00, 0x80, CRC(67b18457) SHA1(5d6a0034bfc3d395ecd941ed024c8884b43f2a31) ) | |
| 591 | 608 | ROM_END |
| 592 | 609 | |
| 593 | 610 | ROM_START( hoops95 ) |
| r7553 | r7554 | |
| 607 | 624 | |
| 608 | 625 | ROM_REGION( 0x400000, "ymz", 0 ) |
| 609 | 626 | ROM_LOAD( "mce-05.6a", 0x000000, 0x400000, CRC(e7a9355a) SHA1(039b23666e224c33ebb02baa80e496f8bce0514f) ) |
| 627 | ||
| 628 | ROM_REGION16_BE( 0x80, "eeprom", ROMREGION_ERASE00 ) | |
| 629 | ROM_LOAD( "hoops.nv", 0x00, 0x80, CRC(67b18457) SHA1(5d6a0034bfc3d395ecd941ed024c8884b43f2a31) ) | |
| 610 | 630 | ROM_END |
| 611 | 631 | |
| 612 | 632 | ROM_START( ddream95 ) |
| r7553 | r7554 | |
| 626 | 646 | |
| 627 | 647 | ROM_REGION( 0x400000, "ymz", 0 ) |
| 628 | 648 | ROM_LOAD( "mce-05.6a", 0x000000, 0x400000, CRC(e7a9355a) SHA1(039b23666e224c33ebb02baa80e496f8bce0514f) ) |
| 649 | ||
| 650 | ROM_REGION16_BE( 0x80, "eeprom", ROMREGION_ERASE00 ) | |
| 651 | ROM_LOAD( "hoops.nv", 0x00, 0x80, CRC(67b18457) SHA1(5d6a0034bfc3d395ecd941ed024c8884b43f2a31) ) | |
| 629 | 652 | ROM_END |
| 630 | 653 | |
| 631 | 654 | ROM_START( skullfng ) |
| r7553 | r7554 | |
| 745 | 768 | |
| 746 | 769 | GAME( 1995, avengrgs, 0, avengrgs, mlc, avengrgs, ROT0, "Data East Corporation", "Avengers In Galactic Storm (US)", 0 ) |
| 747 | 770 | GAME( 1995, avengrgsj,avengrgs, avengrgs, mlc, avengrgs, ROT0, "Data East Corporation", "Avengers In Galactic Storm (Japan)", 0 ) |
| 748 | GAME( 1996, stadhr96, 0, mlc_6bpp, mlc, mlc, ROT0, "Data East Corporation", "Stadium Hero 96 (Version EAD)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 749 | GAME( 1996, stadhr96a,stadhr96, mlc_6bpp, mlc, mlc, ROT0, "Data East Corporation", "Stadium Hero 96 (Version EAJ)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 771 | GAME( 1996, stadhr96, 0, mlc_6bpp, mlc, mlc, ROT0, "Data East Corporation", "Stadium Hero 96 (World, EAJ)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) // Rom labels are EAJ ^^ | |
| 772 | GAME( 1996, stadhr96j,stadhr96, mlc_6bpp, mlc, mlc, ROT0, "Data East Corporation", "Stadium Hero 96 (Japan, EAD)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) // Rom labels are EAD (this isn't a Konami region code!) | |
| 750 | 773 | GAME( 1996, skullfng, 0, mlc_6bpp, mlc, mlc, ROT270, "Data East Corporation", "Skull Fang (World)", 0 ) /* Version 1.13, Europe, Master 96.02.19 */ |
| 751 | 774 | GAME( 1996, skullfngj,skullfng, mlc_6bpp, mlc, mlc, ROT270, "Data East Corporation", "Skull Fang (Japan)", 0 ) /* Version 1.09, Japan, Master 96.02.08 */ |
| 752 | 775 | GAME( 1996, hoops96, 0, mlc_5bpp, mlc, mlc, ROT0, "Data East Corporation", "Hoops '96 (Europe/Asia 2.0)", 0 ) |
| 753 | GAME( 1995, ddream95, hoops96, mlc_5bpp, mlc, mlc, ROT0, "Data East Corporation", "Dunk Dream '95 (Japan 1.4 EAM)", 0 ) | |
| 776 | GAME( 1995, ddream95, hoops96, mlc_5bpp, mlc, mlc, ROT0, "Data East Corporation", "Dunk Dream '95 (Japan 1.4, EAM)", 0 ) | |
| 754 | 777 | GAME( 1995, hoops95, hoops96, mlc_5bpp, mlc, mlc, ROT0, "Data East Corporation", "Hoops (Europe/Asia 1.7)", 0 ) |
| r7553 | r7554 | |
|---|---|---|
| 392 | 392 | |
| 393 | 393 | static VIDEO_UPDATE( hornet_2board ) |
| 394 | 394 | { |
| 395 | if (strcmp(screen->tag, "lscreen") == 0) | |
| 395 | if (strcmp(screen->tag(), "lscreen") == 0) | |
| 396 | 396 | { |
| 397 | 397 | running_device *k037122 = devtag_get_device(screen->machine, "k037122_1"); |
| 398 | 398 | running_device *voodoo = devtag_get_device(screen->machine, "voodoo0"); |
| r7553 | r7554 | |
| 401 | 401 | /* TODO: tilemaps per screen */ |
| 402 | 402 | k037122_tile_draw(k037122, bitmap, cliprect); |
| 403 | 403 | } |
| 404 | else if (strcmp(screen->tag, "rscreen") == 0) | |
| 404 | else if (strcmp(screen->tag(), "rscreen") == 0) | |
| 405 | 405 | { |
| 406 | 406 | running_device *k037122 = devtag_get_device(screen->machine, "k037122_2"); |
| 407 | 407 | running_device *voodoo = devtag_get_device(screen->machine, "voodoo1"); |
| r7553 | r7554 | |
|---|---|---|
| 714 | 714 | ROM_LOAD( "30j-2.ic11", 0x100000, 0x80000, CRC(41c6fb08) SHA1(9fb6105bdc9ff8eeaacf378d208cf6d32a09401b) ) |
| 715 | 715 | ROM_LOAD( "30j11-0.ic10", 0x180000, 0x10000, CRC(99195b2a) SHA1(d1c0e1855aed22f169717f94d78bc326e68e3064) ) |
| 716 | 716 | ROM_LOAD( "30j-1.ic13", 0x200000, 0x80000, CRC(67a6f114) SHA1(7d0f3cd6376128ddfcd13f2ec683ec270e95c19c) ) |
| 717 | ROM_LOAD( "30 | |
| 717 | ROM_LOAD( "30j10-0.ic12", 0x280000, 0x10000, CRC(e3879b5d) SHA1(fc87aedb0f4964a8d261d86121fe8544b330bed9) ) | |
| 718 | 718 | ROM_LOAD( "30j-0.ic15", 0x300000, 0x80000, CRC(f15dafbe) SHA1(68049c4542e1c7119bbf1be1fa44e3eea9c11b6e) ) |
| 719 | 719 | ROM_LOAD( "30j9-0.ic14", 0x380000, 0x10000, CRC(2759ae84) SHA1(02c70958259f56174ce2ba2db56040dad72be02b) ) |
| 720 | 720 | |
| r7553 | r7554 | |
| 861 | 861 | |
| 862 | 862 | ROM_START( ctribe1 ) |
| 863 | 863 | ROM_REGION( 0x80000, "maincpu", 0 ) /* 64k for cpu code */ |
| 864 | ROM_LOAD16_BYTE( "28a16-2.ic26", 0x00001, 0x20000, CRC(f00f8443) SHA1(3c099b6bea9956cc60ce4a9a5d790ac2bf7d77bd) ) | |
| 865 | ROM_LOAD16_BYTE( "28a15-2.ic25", 0x00000, 0x20000, CRC(dd70079f) SHA1(321b523fefec2a962d0afa20b33428e7caea8958) ) | |
| 864 | ROM_LOAD16_BYTE( "1_28a16-2.ic26", 0x00001, 0x20000, CRC(f00f8443) SHA1(3c099b6bea9956cc60ce4a9a5d790ac2bf7d77bd) ) | |
| 865 | ROM_LOAD16_BYTE( "1_28a15-2.ic25", 0x00000, 0x20000, CRC(dd70079f) SHA1(321b523fefec2a962d0afa20b33428e7caea8958) ) | |
| 866 | 866 | ROM_LOAD16_BYTE( "28j17-0.104", 0x40001, 0x10000, CRC(8c2c6dbd) SHA1(b99b9be6e0bdc8340fedd258819c4df587926a84) ) |
| 867 | 867 | /* No EVEN rom! */ |
| 868 | 868 |
| r0 | r7554 | |
|---|---|---|
| 1 | /****************************************************************************** | |
| 2 | ||
| 3 | ||
| 4 | FIVE CLOWN HARDWARE | |
| 5 | IGS - International Games System. | |
| 6 | ||
| 7 | Driver by Roberto Fresca & Grull Osgo. | |
| 8 | ||
| 9 | ||
| 10 | Games running on this hardware: | |
| 11 | ||
| 12 | * Five Clown (english, set 1), 1993, IGS. | |
| 13 | * Five Clown (english, set 2), 1993, IGS. | |
| 14 | * Five Clown (spanish hack), 1993, IGS. | |
| 15 | ||
| 16 | ||
| 17 | This hardware seems to be based on Bonanza's Golden Poker, but on steroids... | |
| 18 | Double CPU, FM sounds, samples system, different encryption schemes and other | |
| 19 | complex things mark the difference. | |
| 20 | ||
| 21 | Special Thanks to Iris Falbala that kindly offered herself as beta tester. :) | |
| 22 | ||
| 23 | ||
| 24 | ******************************************************************************* | |
| 25 | ||
| 26 | ||
| 27 | *** Hardware notes *** | |
| 28 | ||
| 29 | ||
| 30 | - CPU: 2x Rockwell R6502P. (u16, u42) | |
| 31 | - CRTC: 1x GoldStar GM68B45S. (u10) | |
| 32 | - I/O: 2x ST EF6821P PIA's. (u9, u15) | |
| 33 | ||
| 34 | - RAM: 1x GM76C28A-10 CMOS SRAM (2048 x 8, DIP). (u45) | |
| 35 | 2x Hitachi 6116. (u1, u36) | |
| 36 | ||
| 37 | - CLK: 1x 10MHz. crystal. | |
| 38 | ||
| 39 | - ROMs: 1x M27C512. (u50) | |
| 40 | 1x M27256. (u34) | |
| 41 | 1x M5L2764. (u35) | |
| 42 | 1x DB (5,6,7). (u2) | |
| 43 | ||
| 44 | - PLDs: 1x PEEL 18CV8P. (u33) | |
| 45 | 1x PALCE22V10H. (u43) | |
| 46 | 2x PALCE16V6Q. (u13, u14) | |
| 47 | ||
| 48 | - PROM: 1x Fairchild Semiconductor DM74S287AN. (u32) | |
| 49 | ||
| 50 | - SOUND: 1x Winbond WF19054 (AY8910 compatible). (u59) | |
| 51 | 1x (unknown) A66 (OKI 6295 compatible). (u51) | |
| 52 | ||
| 53 | 1x NEC Electronics UPC1242H (7W AF Power Amplifier). (u54) | |
| 54 | ||
| 55 | ||
| 56 | Other components: | |
| 57 | ||
| 58 | 3x 8 DIP Switches Banks. (SW1, SW2, SW3) | |
| 59 | 1x 4 DIP Switches Bank. (SW4) | |
| 60 | 1x Reset Switch. (SW5) | |
| 61 | ||
| 62 | 1x 3.6 Battery. | |
| 63 | 1x (2x) 22-pins Edge Connector. | |
| 64 | 1x (2x) 10-pins Edge Connector. | |
| 65 | ||
| 66 | 1x 19 Diodes Matrix (near edge connector) | |
| 67 | ||
| 68 | ||
| 69 | ||
| 70 | PCB Layout: | |
| 71 | ____________________________________________________________________________________________ | |
| 72 | | ________ ________ ________ ________ ____ ___________ ___________ | | |
| 73 | | |DS2003CN| |12345678| |12345678| |12345678| |1234| | | | 27C512 | | | |
| 74 | | |________| |________| |________| |________| |____| | HM-6116 | | ...or DB | | | |
| 75 | | U30 SW1 SW2 SW3 SW4 |___________| |___________| | | |
| 76 | |___ ________ _________ _________ _________ _________ U1 U2 | | |
| 77 | | | 74LS02 | | 74LS245 | | 74LS245 | | 74LS245 | | 74LS138 | _________ _________ | | |
| 78 | | |________| |_________| |_________| |_________| |_________| | 74LS245 | | 74LS245 | | | |
| 79 | | U31 U3 U4 U5 U6 |_________| |_________| | | |
| 80 | ___| ____________________ ____________________ U7 U8 | | |
| 81 | |___ 22x2 | | | | ________ _________ | | |
| 82 | |___ CONN | EF6821P | | GM68B45S | |74LS193?| | 74LS374 | | | |
| 83 | |___ __ |____________________| |____________________| |________| |_________| | | |
| 84 | |___ |__| D U9 U10 U11 U12 | | |
| 85 | |___ |__| I ____________________ ____________________ _________ _________ | | |
| 86 | |___ |__| O | | | | |PALCE16V8| |PALCE16V8| | | |
| 87 | |___ |__| D | EF6821P | | R6502P | |_________| |_________| | | |
| 88 | |___ |__| E |____________________| |____________________| U13 U14 | | |
| 89 | |___ |__| U15 U16 _________ _________ | | |
| 90 | |___ |__| M | 74LS166 | | 74LS245 | | | |
| 91 | |___ |__| A _________ |_________| |_________| | | |
| 92 | |___ |__| T | HD7407P | ________ U17 U18 | | |
| 93 | |___ |__| R |_________| | 74LS04 | ________ ________ _________ _________ | | |
| 94 | |___ |__| I U19 |________| | 74LS86 | | 74LS36?| | 74LS273 | | 74LS166 | | | |
| 95 | |___ |__| X _________ U20 |________| |________| |_________| |_________| | | |
| 96 | |___ |__| | HD7407P | U21 U22 U23 U24 | | |
| 97 | |___ |__| |_________| _______ ___________ _________ _________ | | |
| 98 | |___ |__| U25 | XTAL | | 74LS244 | | 74LS273 | | 74LS166 | | | |
| 99 | |___ |__| _________ | 10MHz | |___________| |_________| |_________| | | |
| 100 | |___ |__| | 74LS174 | |_______| U26 U27 U28 | | |
| 101 | |___ |__| |_________| X1 | | |
| 102 | |___ U29 _____________ _____________ ____________ | | |
| 103 | | __________ __________ | | | | | | | | |
| 104 | | |DM74S287AN| |PEEL18CV8P| | [7] M27256 | | [9] M5L2764 | | HM-6116 | | | |
| 105 | | |__________| |__________| |_____________| |_____________| |____________| | | |
| 106 | | U32 U33 U34 U35 U36 | | |
| 107 | | ___________ _________ __________ ___________________ _________ | | |
| 108 | | | 74LS273 | | 74LS157 | | 74LS273 | | | | 74LS367 | | | |
| 109 | | |___________| |_________| |__________| | R6502P | |_________| | | |
| 110 | | U37 U38 U39 |___________________| U40 | | |
| 111 | | _________ ___________ U42 _________ | | |
| 112 | | | 74LS157 | |PALCE22V10H| ______ | 74LS245 | | | |
| 113 | | _______ ____________ |_________! |___________| | | |_________| | | |
| 114 | ___|| | | U41 U43 | A66 | U44 | | |
| 115 | |___ | 3.6v | GoldStar | _________ _____________ |(6295)| _________ _________ | | |
| 116 | |___ |BATTERY| GM76C28A | | 74LS157 | | | |______|| 74LS04 | | PAL16L8 | | | |
| 117 | |___ | |____________| |_________| | [8] M27C512 | U51 |_________| |_________| | | |
| 118 | |___ |_______| U45 U46 |_____________| U47 U48 | | |
| 119 | |___ _________ _______ _______ U50 __________ | | |
| 120 | |___ | 74LS161 | |(NO IC)|| | ________ | 74LS245 | | | |
| 121 | |___ |_________| | UPC || UPC | | | |__________| | | |
| 122 | |___ U49 | 1241H || 1242H | | GL7805 | U52 | | |
| 123 | |___ 10x2 _________ |_______||_______| |________| _________ _________ | | |
| 124 | |___ CONN | 74HC132 | U53 U54 U55 | 74LS374 | | 74LS174 | | | |
| 125 | | |_________| |_________| |_________| | | |
| 126 | | _|_|_|_ U56 U57 U58 | | |
| 127 | | | | _____________________ | | |
| 128 | ___| | SW5 | | | | | |
| 129 | | |_______| | WF19054 (AY8910) | | | |
| 130 | | |_| |_____________________| | | |
| 131 | | U59 | | |
| 132 | |____________________________________________________________________________________________| | |
| 133 | ||
| 134 | ||
| 135 | U58 = 74LS174 (Quad Latch)..... | |
| 136 | U57 = 74LS374 (Octal Latch)..... Near to AY8910! :) | |
| 137 | ||
| 138 | ||
| 139 | ||
| 140 | DIP Switches Layout: | |
| 141 | ||
| 142 | SW1: SW2: SW3: SW4: | |
| 143 | +-------------------+ +-------------------+ +-------------------+ +-----------+ | |
| 144 | | ON | | ON | | ON | | ON | | |
| 145 | | +---------------+ | | +---------------+ | | +---------------+ | | +-------+ | | |
| 146 | | |_|_|_|_|_|o|o|o| | | |_|o|o|o|o|_|_|_| | | |_|o|_|_|o|_|_|_| | | |_|_|_|_| | | |
| 147 | | |o|o|o|o|o| | | | | | |o| | | | |o|o|o| | | |o| |o|o| |o|o|o| | | |o|o|o|o| | | |
| 148 | | +---------------+ | | +---------------+ | | +---------------+ | | +-------+ | | |
| 149 | | 1 2 3 4 5 6 7 8 | | 1 2 3 4 5 6 7 8 | | 1 2 3 4 5 6 7 8 | | 1 2 3 4 | | |
| 150 | +-------------------+ +-------------------+ +-------------------+ +-----------+ | |
| 151 | ||
| 152 | ||
| 153 | ******************************************************************************* | |
| 154 | ||
| 155 | ||
| 156 | MEMORY MAP | |
| 157 | ---------- | |
| 158 | ||
| 159 | Main CPU: | |
| 160 | ||
| 161 | 0000 - 07FF NVRAM. | |
| 162 | ||
| 163 | 0800 - 0800 MC6845 address. | |
| 164 | 0801 - 0801 MC6845 register. | |
| 165 | ||
| 166 | 0844 - 0847 PIA 0. | |
| 167 | 0848 - 084B PIA 1. | |
| 168 | ||
| 169 | 1000 - 13FF Video RAM (Init'ed at $2042). | |
| 170 | 1800 - 1BFF Color RAM (Init'ed at $2054). | |
| 171 | ||
| 172 | 2000 - 7FFF ROM space. | |
| 173 | ||
| 174 | C048 - C048 Unknown sound related writes. | |
| 175 | D800 - D800 Main/Sound latch. | |
| 176 | ||
| 177 | C400 - C400 DIP Switches bank: SW1. | |
| 178 | CC00 - CC00 DIP Switches bank: SW2. | |
| 179 | D400 - D400 DIP Switches bank: SW3. | |
| 180 | ||
| 181 | E000 - FFFF ROM space. | |
| 182 | ||
| 183 | ||
| 184 | ******************************************************************************* | |
| 185 | ||
| 186 | ||
| 187 | Game Notes | |
| 188 | ---------- | |
| 189 | ||
| 190 | - Checksums. | |
| 191 | ||
| 192 | The checksum routine starts at $FE1D | |
| 193 | Once checksumed the whole range, compares the result with a harcoded value. | |
| 194 | If match, jumps to a subroutine that prints "ROM x ERR". | |
| 195 | If doesn't match, prints "ROM x OK" | |
| 196 | ||
| 197 | So... It's inverted. Seems that someone replaced the BEQ's instructions with | |
| 198 | BNE's, to pass the checksums. | |
| 199 | ||
| 200 | $FE1D ---> checks ROM 5 (4000-5FFF) | |
| 201 | $FE44 ---> checks ROM 6 (2000-3FFF) | |
| 202 | $FE6B ---> checks ROM 7 (E000-FDFF) | |
| 203 | ||
| 204 | ||
| 205 | ******************************************************************************* | |
| 206 | ||
| 207 | ||
| 208 | Game Settings | |
| 209 | ------------- | |
| 210 | ||
| 211 | From a datasheet. Seems to be unaccurate... | |
| 212 | ||
| 213 | ||
| 214 | DIP Switches Settings: | |
| 215 | ||
| 216 | DIP SW.1 Win-Up "7" Rate 1 2 | |
| 217 | Lowest on on | |
| 218 | Low off on | |
| 219 | Medium on off | |
| 220 | High off off | |
| 221 | ||
| 222 | Two Pair 3 | |
| 223 | High on | |
| 224 | Low off | |
| 225 | ||
| 226 | One Joker Rate 5 6 | |
| 227 | Lowest on on | |
| 228 | Low on off | |
| 229 | Medium off on | |
| 230 | High off off | |
| 231 | ||
| 232 | Three of a kind 7 | |
| 233 | High on | |
| 234 | Low off | |
| 235 | ||
| 236 | DIP SW.2 Key In 1 2 | |
| 237 | 10 on on | |
| 238 | 20 on off | |
| 239 | 50 off on | |
| 240 | 100 off off | |
| 241 | ||
| 242 | DIP SW.3 2 Jokers Rate 1 8 | |
| 243 | Lowest on on | |
| 244 | Low on off | |
| 245 | Medium off on | |
| 246 | High off off | |
| 247 | ||
| 248 | 3,4,5 Jokers Rate 2 3 | |
| 249 | Lowest on on | |
| 250 | Low off on | |
| 251 | Medium on off | |
| 252 | High off off | |
| 253 | ||
| 254 | Max Bet 4 5 | |
| 255 | 80 on on | |
| 256 | 40 on off | |
| 257 | 50 off on | |
| 258 | 10 off off | |
| 259 | ||
| 260 | DIP SW.4 "J" Pair 1 | |
| 261 | Win on | |
| 262 | Lose off | |
| 263 | ||
| 264 | Pay Mode 2 | |
| 265 | Key out on | |
| 266 | Coin out off | |
| 267 | ||
| 268 | Coin 3 | |
| 269 | 1 Coin 1 Credit on | |
| 270 | 1 Coin 10 Credit off | |
| 271 | ||
| 272 | ||
| 273 | ||
| 274 | CHANCE SETTINGS | |
| 275 | --------------- | |
| 276 | ||
| 277 | Settings Table: | |
| 278 | ||
| 279 | -----+-----------------+-----------+------------------------------------- | |
| 280 | Loc. | Function | Val.Range | Comment | |
| 281 | -----+-----------------+-----------+------------------------------------- | |
| 282 | A | Five Jokers | 0-8 | If 0 never comes out. | |
| 283 | B | Royal Flush | 0-8 | If 0 never comes out. | |
| 284 | C | Five of a Kind | 0-8 | If 0 never comes out. | |
| 285 | D | Straight Flush | 0-8 | If 0 never comes out. | |
| 286 | E | Four of a Kind | 0-8 | If 0 never comes out. | |
| 287 | F | Full House | 0-8 | 0 Lowest - 8 Highest. | |
| 288 | G | Flush | 0-8 | 0 Lowest - 8 Highest. | |
| 289 | H | Straight | 0-8 | 0 Lowest - 8 Highest. | |
| 290 | I | W-Up | 0-10 | 0 Lowest - 10 Highest. | |
| 291 | J | Bet Limit | 0-1 | 0 Over bet setting never comes out. | |
| 292 | | | | 1 Below bet setting never comes out. | |
| 293 | ||
| 294 | ||
| 295 | Chance Settings Screen: | |
| 296 | ||
| 297 | A B C D E F G H I J | |
| 298 | Value 0 0 4 3 5 6 6 7 10 0 | |
| 299 | Bet Limit 0 0 50 50 50 - - - - - | |
| 300 | ||
| 301 | Bet Range: 1 to 80 Credits. | |
| 302 | ||
| 303 | ||
| 304 | ||
| 305 | Chance Settings Key Function: | |
| 306 | ||
| 307 | BIG: Move left | |
| 308 | SMALL: Move right | |
| 309 | START: Increase value. | |
| 310 | COLLECT: Decrease value. | |
| 311 | HOLD 5: Exit. | |
| 312 | ||
| 313 | ||
| 314 | ||
| 315 | Settings Suggestions | |
| 316 | -------------------- | |
| 317 | ||
| 318 | Suggestion One: | |
| 319 | ||
| 320 | Dip.Sw. Setting | |
| 321 | Dip.Sw. 2 3=On 4=On Others=Off | |
| 322 | Dip.Sw. 3 2=On 4=On Others=Off | |
| 323 | ||
| 324 | Chance Setting | |
| 325 | A B C D E F G H I J | |
| 326 | 1 2 2 4 6 7 8 8 8 0 | |
| 327 | 5 10 20 40 40 - - - - - | |
| 328 | ||
| 329 | ||
| 330 | Suggestion Two: | |
| 331 | ||
| 332 | Dip.Sw. Setting | |
| 333 | Dip.Sw. 2 4=On 7=On Others=Off | |
| 334 | Dip.Sw. 3 2=On 4=On Others=Off | |
| 335 | ||
| 336 | Chance Setting | |
| 337 | A B C D E F G H I J | |
| 338 | 1 2 2 3 5 6 6 7 8 0 | |
| 339 | 5 10 20 40 40 - - - - - | |
| 340 | ||
| 341 | ||
| 342 | ******************************************************************************* | |
| 343 | ||
| 344 | Keyboard Matrix | |
| 345 | --------------- | |
| 346 | ||
| 347 | Com. A Bet Record W-Up Start N/U | |
| 348 | Com. B Payout Keyout Small Big Collect | |
| 349 | Com. C Hold 1 Hold 2 Hold 3 Hold 4 Hold 5 | |
| 350 | Com. D Key In Coin Setting N/U N/U | |
| 351 | ||
| 352 | ||
| 353 | ******************************************************************************* | |
| 354 | ||
| 355 | Findings about the samples encryption | |
| 356 | ------------------------------------- | |
| 357 | ||
| 358 | For every byte, if bit 1 is active is automatically XOR'ed. | |
| 359 | Otherwise bit 1 & bit 5 are XOR'ed. | |
| 360 | ||
| 361 | ||
| 362 | XOR'ing bit 1, I got the following vector table: | |
| 363 | ||
| 364 | 01) 0400-1E67 | |
| 365 | 02) 1E78-06D7 <--- No sense! | |
| 366 | 03) 06C8-2067 | |
| 367 | 04) 2078-3737 | |
| 368 | 05) 3728-3FEF | |
| 369 | 06) 3000-382F | |
| 370 | 07) 3840-49B0 | |
| 371 | 08) 49B1-7671 | |
| 372 | 09) 7662-84D2 | |
| 373 | 10) 84D3-A893 | |
| 374 | 11) A884-C8CC | |
| 375 | 12) C8CD-DEEC | |
| 376 | 13) DEED-D8DC <--- No sense! | |
| 377 | 14) D8DD-DD4C | |
| 378 | ||
| 379 | But... If we involve bit 5 in the changes, vectors are perfect!. | |
| 380 | ||
| 381 | 01) 0400-1E67 ---> 0400-0E77 (ok) | |
| 382 | 02) 1E78-06D7 ---> 0E78-16C7 (ok) | |
| 383 | 03) 06C8-2067 ---> 16C8-2077 (ok) | |
| 384 | 04) 2078-3737 ---> 2078-2727 (ok) | |
| 385 | 05) 3728-3FEF ---> 2728-2FFF (ok) | |
| 386 | 06) 3000-382F ---> 3000-383F (ok) | |
| 387 | 07) 3840-49B0 ---> 3840-49B0 (ok) | |
| 388 | 08) 49B1-7671 ---> 49B1-6671 (ok) | |
| 389 | 09) 7662-84D2 ---> 6672-84C2 (ok) | |
| 390 | 10) 84D3-A893 ---> 84C3-A883 (ok) | |
| 391 | 11) A884-C8CC ---> A884-C8CC (ok) | |
| 392 | 12) C8CD-DEEC ---> C8CD-CEEC (ok) | |
| 393 | 13) DEED-D8DC ---> CEED-D8DC (ok) | |
| 394 | 14) D8DD-DD4C ---> D8DD-DD4C (ok) | |
| 395 | ||
| 396 | ||
| 397 | Happy End! :) | |
| 398 | ||
| 399 | ||
| 400 | ******************************************************************************* | |
| 401 | ||
| 402 | ||
| 403 | Driver updates: | |
| 404 | ||
| 405 | ||
| 406 | [2010-03-08] | |
| 407 | ||
| 408 | - Initial release. | |
| 409 | - Hooked both 6502 CPU's. | |
| 410 | - Hooked the M6845 CRT. | |
| 411 | - Decrypted main program and bulk GFX. | |
| 412 | - Decoded GFX and color PROM. | |
| 413 | - Hooked both PIA's 6821. | |
| 414 | - Worked inputs from the scratch. | |
| 415 | - Hooked DIP Switches banks 2 & 4. | |
| 416 | - Hooked proper interrupts for audio CPU. | |
| 417 | - Hooked the AY8910 latches... | |
| 418 | - Hooked the OKI6295. | |
| 419 | - Hooked DIP switches ports $C400 & $CC00. | |
| 420 | - Found the sound samples decryption algorithm. | |
| 421 | - Added NVRAM support. | |
| 422 | - Added a complete PCB layout. | |
| 423 | - Added game notes. | |
| 424 | - Added technical notes. | |
| 425 | ||
| 426 | ||
| 427 | TODO: | |
| 428 | ||
| 429 | - Proper clock frequencies for CPU, AY8910 & OKI6295. | |
| 430 | - Verify OKI6295 pin 7 (high/low). | |
| 431 | - Try to implement SW5 (Hard Reset + NVRAM clear). | |
| 432 | - Main CPU: 0xC048 - Unknown sound stuff writes (related to ay8910). | |
| 433 | - Audio CPU: 0x2004 - Unknown writes. | |
| 434 | - Audio CPU: 0x2006 - Unknown reads. | |
| 435 | - PIA0: Unknown reads to port B. | |
| 436 | - PIA1: Massive unknown reads to port B. | |
| 437 | - Verify the background color. | |
| 438 | ||
| 439 | ||
| 440 | *******************************************************************************/ | |
| 441 | ||
| 442 | ||
| 443 | #define MASTER_CLOCK XTAL_10MHz | |
| 444 | ||
| 445 | #include "emu.h" | |
| 446 | #include "cpu/m6502/m6502.h" | |
| 447 | #include "video/mc6845.h" | |
| 448 | #include "machine/6821pia.h" | |
| 449 | #include "sound/ay8910.h" | |
| 450 | #include "sound/okim6295.h" | |
| 451 | ||
| 452 | static UINT8 main_latch_d800; | |
| 453 | static UINT8 snd_latch_0800; | |
| 454 | static UINT8 snd_latch_0a02; | |
| 455 | static UINT8 ay8910_addr; | |
| 456 | running_device *ay8910; | |
| 457 | ||
| 458 | ||
| 459 | /************************* | |
| 460 | * Video Hardware * | |
| 461 | *************************/ | |
| 462 | ||
| 463 | static UINT8 *videoram; | |
| 464 | static UINT8 *colorram; | |
| 465 | static tilemap_t *bg_tilemap; | |
| 466 | ||
| 467 | ||
| 468 | static WRITE8_HANDLER( fclown_videoram_w ) | |
| 469 | { | |
| 470 | videoram[offset] = data; | |
| 471 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 472 | } | |
| 473 | ||
| 474 | static WRITE8_HANDLER( fclown_colorram_w ) | |
| 475 | { | |
| 476 | colorram[offset] = data; | |
| 477 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 478 | } | |
| 479 | ||
| 480 | ||
| 481 | static TILE_GET_INFO( get_fclown_tile_info ) | |
| 482 | { | |
| 483 | ||
| 484 | /* - bits - | |
| 485 | 7654 3210 | |
| 486 | ---- ---x Tiles extended address (MSB). | |
| 487 | ---- --x- Tiles bank. | |
| 488 | --xx xx-- Tiles color. | |
| 489 | -x-- ---- Chars extended address. | |
| 490 | x--- ---- Extra color for 7's. | |
| 491 | */ | |
| 492 | ||
| 493 | int attr = colorram[tile_index]; | |
| 494 | int code = ((attr & 0x01) << 8) | ((attr & 0x40) << 2) | videoram[tile_index]; /* bit 8 for extended char set */ | |
| 495 | int bank = (attr & 0x02) >> 1; /* bit 1 switch the gfx banks */ | |
| 496 | int color = (attr & 0x3c) >> 2 | ((attr & 0x80) >> 3); /* bits 2-3-4-5-7 for color */ | |
| 497 | ||
| 498 | SET_TILE_INFO(bank, code, color, 0); | |
| 499 | } | |
| 500 | ||
| 501 | ||
| 502 | static VIDEO_START(fclown) | |
| 503 | { | |
| 504 | bg_tilemap = tilemap_create(machine, get_fclown_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 505 | } | |
| 506 | ||
| 507 | ||
| 508 | static VIDEO_UPDATE( fclown ) | |
| 509 | { | |
| 510 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 511 | return 0; | |
| 512 | } | |
| 513 | ||
| 514 | static PALETTE_INIT( fclown ) | |
| 515 | { | |
| 516 | /* | |
| 517 | 7654 3210 | |
| 518 | ---- ---x RED component. | |
| 519 | ---- --x- GREEN component. | |
| 520 | ---- -x-- BLUE component. | |
| 521 | ---- x--- background killer. | |
| 522 | xxxx ---- unused. | |
| 523 | */ | |
| 524 | int i; | |
| 525 | ||
| 526 | /* 0000KBGR */ | |
| 527 | ||
| 528 | if (color_prom == 0) return; | |
| 529 | ||
| 530 | for (i = 0;i < machine->config->total_colors;i++) | |
| 531 | { | |
| 532 | int bit0, bit1, bit2, bit3, r, g, b, bk; | |
| 533 | ||
| 534 | /* background killer */ | |
| 535 | bit3 = (color_prom[i] >> 3) & 0x01; | |
| 536 | bk = bit3; | |
| 537 | ||
| 538 | /* red component */ | |
| 539 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 540 | r = (bit0 * 0xff); | |
| 541 | ||
| 542 | /* green component */ | |
| 543 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 544 | g = (bit1 * 0xff); | |
| 545 | ||
| 546 | /* blue component */ | |
| 547 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 548 | b = bk * (bit2 * 0xff); | |
| 549 | ||
| 550 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 551 | } | |
| 552 | } | |
| 553 | ||
| 554 | ||
| 555 | /****************************** | |
| 556 | * R/W Handlers * | |
| 557 | ******************************/ | |
| 558 | ||
| 559 | static int mux_data = 0; | |
| 560 | ||
| 561 | /* Inputs (buttons) are multiplexed. | |
| 562 | There are 4 sets of 5 bits each and are connected to PIA0, portA. | |
| 563 | The selector bits are located in PIA1, portB (bits 4-7). | |
| 564 | */ | |
| 565 | static READ8_DEVICE_HANDLER( mux_port_r ) | |
| 566 | { | |
| 567 | switch( mux_data & 0xf0 ) /* bits 4-7 */ | |
| 568 | { | |
| 569 | case 0x10: return input_port_read(device->machine, "IN0-0"); | |
| 570 | case 0x20: return input_port_read(device->machine, "IN0-1"); | |
| 571 | case 0x40: return input_port_read(device->machine, "IN0-2"); | |
| 572 | case 0x80: return input_port_read(device->machine, "IN0-3"); | |
| 573 | } | |
| 574 | ||
| 575 | return 0xff; | |
| 576 | } | |
| 577 | ||
| 578 | ||
| 579 | static WRITE8_DEVICE_HANDLER( mux_w ) | |
| 580 | { | |
| 581 | mux_data = data ^ 0xff; /* Inverted */ | |
| 582 | } | |
| 583 | ||
| 584 | ||
| 585 | static WRITE8_DEVICE_HANDLER( counters_w ) | |
| 586 | { | |
| 587 | /* Counters: | |
| 588 | ||
| 589 | 7654 3210 | |
| 590 | ---- xxxx Unused. | |
| 591 | ---x ---- Key In / Note counter. | |
| 592 | --x- ---- Payout counter. | |
| 593 | -x-- ---- Unknown (increments at start). | |
| 594 | x--- ---- Unknown (increments at start). | |
| 595 | */ | |
| 596 | coin_counter_w(device->machine, 0, data & 0x10); /* Key In */ | |
| 597 | coin_counter_w(device->machine, 1, data & 0x20); /* Payout */ | |
| 598 | coin_counter_w(device->machine, 2, data & 0x40); /* unknown */ | |
| 599 | coin_counter_w(device->machine, 3, data & 0x80); /* unknown */ | |
| 600 | ||
| 601 | } | |
| 602 | ||
| 603 | ||
| 604 | static WRITE8_DEVICE_HANDLER( trigsnd_w ) | |
| 605 | { | |
| 606 | /************ Interrupts trigger ************** | |
| 607 | ||
| 608 | Writes 0x07 & 0x0F each time a sound is triggered through $D800 */ | |
| 609 | ||
| 610 | if ( (data & 0x0f) == 0x07 ) | |
| 611 | { | |
| 612 | cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, ASSERT_LINE ); | |
| 613 | } | |
| 614 | ||
| 615 | else | |
| 616 | { | |
| 617 | cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, CLEAR_LINE ); | |
| 618 | } | |
| 619 | ||
| 620 | } | |
| 621 | ||
| 622 | static READ8_DEVICE_HANDLER( pia0_b_r ) | |
| 623 | { | |
| 624 | /* often read the port */ | |
| 625 | return 0x00; | |
| 626 | } | |
| 627 | ||
| 628 | static READ8_DEVICE_HANDLER( pia1_b_r ) | |
| 629 | { | |
| 630 | /* constantly read the port */ | |
| 631 | return 0x00; /* bit 2 shouldn't be active to allow work the key out system */ | |
| 632 | } | |
| 633 | ||
| 634 | ||
| 635 | /**********************************/ | |
| 636 | ||
| 637 | ||
| 638 | static WRITE8_HANDLER( cpu_c048_w) | |
| 639 | { | |
| 640 | logerror("Main: Write to $C048: %02X\n", data); | |
| 641 | } | |
| 642 | ||
| 643 | static WRITE8_HANDLER( cpu_d800_w ) | |
| 644 | { | |
| 645 | logerror("Main: Write to $D800: %02x\n", data); | |
| 646 | main_latch_d800 = data; | |
| 647 | } | |
| 648 | ||
| 649 | ||
| 650 | /******************************** | |
| 651 | * AY3-8910 R/W Handlers * | |
| 652 | ********************************/ | |
| 653 | ||
| 654 | static WRITE8_DEVICE_HANDLER( fclown_ay8910_w ) | |
| 655 | { | |
| 656 | ay8910_address_w(device, 0, offset); | |
| 657 | ay8910_data_w(device, 0, data); | |
| 658 | } | |
| 659 | ||
| 660 | ||
| 661 | /****************************** | |
| 662 | * SOUND R/W Handlers * | |
| 663 | ******************************/ | |
| 664 | ||
| 665 | static READ8_HANDLER( snd_e06_r ) | |
| 666 | { | |
| 667 | logerror("Sound: Read from $0E06 \n"); | |
| 668 | return main_latch_d800; | |
| 669 | } | |
| 670 | ||
| 671 | static WRITE8_HANDLER( snd_800_w ) | |
| 672 | { | |
| 673 | snd_latch_0800 = data; | |
| 674 | ||
| 675 | if (snd_latch_0a02 == 0xc0) | |
| 676 | { | |
| 677 | ay8910_addr = snd_latch_0800; | |
| 678 | } | |
| 679 | ||
| 680 | if (snd_latch_0a02 == 0x00) | |
| 681 | { | |
| 682 | fclown_ay8910_w( ay8910, ay8910_addr, snd_latch_0800); | |
| 683 | } | |
| 684 | } | |
| 685 | ||
| 686 | static WRITE8_HANDLER( snd_a02_w ) | |
| 687 | { | |
| 688 | snd_latch_0a02 = data & 0xff; | |
| 689 | logerror("Sound: Write to $0A02: %02x\n", snd_latch_0a02); | |
| 690 | } | |
| 691 | ||
| 692 | ||
| 693 | /************************* | |
| 694 | * Memory map information * | |
| 695 | *************************/ | |
| 696 | ||
| 697 | static ADDRESS_MAP_START( fclown_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 698 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) | |
| 699 | AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w) | |
| 700 | AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w) | |
| 701 | AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w) | |
| 702 | AM_RANGE(0x0848, 0x084b) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w) | |
| 703 | AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(fclown_videoram_w) AM_BASE(&videoram) /* Init'ed at $2042 */ | |
| 704 | AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(fclown_colorram_w) AM_BASE(&colorram) /* Init'ed at $2054 */ | |
| 705 | AM_RANGE(0x2000, 0x7fff) AM_ROM /* ROM space */ | |
| 706 | ||
| 707 | AM_RANGE(0xc048, 0xc048) AM_WRITE(cpu_c048_w ) | |
| 708 | AM_RANGE(0xd800, 0xd800) AM_WRITE(cpu_d800_w ) | |
| 709 | ||
| 710 | AM_RANGE(0xc400, 0xc400) AM_READ_PORT("SW1") /* DIP Switches bank */ | |
| 711 | AM_RANGE(0xcc00, 0xcc00) AM_READ_PORT("SW2") /* DIP Switches bank */ | |
| 712 | AM_RANGE(0xd400, 0xd400) AM_READ_PORT("SW3") /* Second DIP Switches bank */ | |
| 713 | ||
| 714 | AM_RANGE(0xe000, 0xffff) AM_ROM /* ROM space */ | |
| 715 | ADDRESS_MAP_END | |
| 716 | ||
| 717 | /* | |
| 718 | ||
| 719 | $C048 & $D800 | |
| 720 | -------------- | |
| 721 | ||
| 722 | $C048: SND Writes. | |
| 723 | ||
| 724 | VAL MEANS | |
| 725 | ----+------- | |
| 726 | 0F | Mute or Ack Command? | |
| 727 | 12 | Hold | |
| 728 | 31 | D-UP | |
| 729 | A6 | D-UP 7's | |
| 730 | ||
| 731 | ||
| 732 | $D800: SND Writes. | |
| 733 | Seems that enumerate the different sounds (from table?) | |
| 734 | After each $D800 write, 0x07 & 0x0F are written to PIA1, port A, | |
| 735 | triggering the needed interrupt for audio CPU. | |
| 736 | ||
| 737 | VAL MEANS | |
| 738 | ----+------- | |
| 739 | 01 | Deal 1 (Coin In) | |
| 740 | 02 | Deal 2 (Key In) | |
| 741 | 03 | Deal 3 (bet, Coin Out) | |
| 742 | 04 | Deal 4 | |
| 743 | 05 | Deal 5 | |
| 744 | 06 | Hold | |
| 745 | 07 | Un-Hold | |
| 746 | 0C | D-UP | |
| 747 | 34 | D-UP | |
| 748 | 13 | Big | |
| 749 | 15 | D-UP 7's | |
| 750 | ||
| 751 | ||
| 752 | WIN seq --> D800: 1B 1B 18 1B 10 1B 1B 1B 19 1D 18 1A 19 1B 10 1C 10 1A 1A 1A 10 1A | |
| 753 | 1D 18 1B 18 1D 18 10 18 19 10 10 10 1B 1B 10 19 1B 1C 3F () 16 () | |
| 754 | ||
| 755 | WIN seq --> C048: 33 () 35 37 35 33 35 37 35 33 35 30 (0F) | |
| 756 | ||
| 757 | Empty parenthesis means switch to the other offset. | |
| 758 | Last value (0x0F) seems to be a kind of mute command. | |
| 759 | ||
| 760 | Example: | |
| 761 | ||
| 762 | Main: Write to $D800: 02 : Sound 2. | |
| 763 | PIA 1: Write to port A: 07 : Trigger audio CPU interrupt. | |
| 764 | PIA 1: Write to port A: 0F : Clear audio CPU interrupt. | |
| 765 | Main: Write to $C048: XX : Writes (to other snd device?) if apply. | |
| 766 | Main: Write to $C048: XX : Writes (to other snd device?) if apply. | |
| 767 | Main: Write to $C048: XX : Writes (to other snd device?) if apply. | |
| 768 | Main: Write to $C048: 0F : Kind of mute or ack command. | |
| 769 | ||
| 770 | */ | |
| 771 | ||
| 772 | static ADDRESS_MAP_START( fcaudio_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 773 | AM_RANGE(0x0000, 0x07ff) AM_RAM | |
| 774 | AM_RANGE(0x0800, 0x0800) AM_WRITE(snd_800_w) | |
| 775 | AM_RANGE(0x0a02, 0x0a02) AM_WRITE(snd_a02_w) | |
| 776 | AM_RANGE(0x0c04, 0x0c04) AM_DEVWRITE("oki6295", okim6295_w) | |
| 777 | AM_RANGE(0x0c06, 0x0c06) AM_DEVREAD("oki6295", okim6295_r) | |
| 778 | AM_RANGE(0x0e06, 0x0e06) AM_READ(snd_e06_r) | |
| 779 | AM_RANGE(0xe000, 0xffff) AM_ROM /* ROM space */ | |
| 780 | ADDRESS_MAP_END | |
| 781 | ||
| 782 | ||
| 783 | /************************* | |
| 784 | * Input ports * | |
| 785 | *************************/ | |
| 786 | ||
| 787 | static INPUT_PORTS_START( fclown ) | |
| 788 | /* Multiplexed - 4x5bits */ | |
| 789 | PORT_START("IN0-0") | |
| 790 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_BET ) | |
| 791 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Record") | |
| 792 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) | |
| 793 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Start") | |
| 794 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* cancel */ | |
| 795 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 796 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 797 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 798 | ||
| 799 | PORT_START("IN0-1") | |
| 800 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) | |
| 801 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) | |
| 802 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_NAME("Collect") | |
| 803 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") | |
| 804 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") | |
| 805 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 806 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 807 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 808 | ||
| 809 | PORT_START("IN0-2") | |
| 810 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) | |
| 811 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) | |
| 812 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) | |
| 813 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) | |
| 814 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) | |
| 815 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 816 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 817 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 818 | ||
| 819 | PORT_START("IN0-3") | |
| 820 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Setting") PORT_CODE(KEYCODE_9) | |
| 821 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 822 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 823 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") | |
| 824 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN) | |
| 825 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 826 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 827 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 828 | ||
| 829 | PORT_START("SW1") | |
| 830 | PORT_DIPNAME( 0x01, 0x01, "SW1-01 (C400)" ) | |
| 831 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 832 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 833 | PORT_DIPNAME( 0x02, 0x02, "SW1-02 (C400)" ) | |
| 834 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 835 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 836 | PORT_DIPNAME( 0x04, 0x04, "SW1-04 (C400)" ) | |
| 837 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 838 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 839 | PORT_DIPNAME( 0x08, 0x08, "SW1-08 (C400)" ) | |
| 840 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 841 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 842 | PORT_DIPNAME( 0x10, 0x10, "SW1-10 (C400)" ) | |
| 843 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 844 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 845 | PORT_DIPNAME( 0x20, 0x20, "SW1-20 (C400)" ) | |
| 846 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 847 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 848 | PORT_DIPNAME( 0x40, 0x40, "SW1-40 (C400)" ) | |
| 849 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 850 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 851 | PORT_DIPNAME( 0x80, 0x80, "SW1-80 (C400)" ) | |
| 852 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 853 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 854 | ||
| 855 | /* SW2 is ok... The remaining bits are checked in unused routines, | |
| 856 | or just NOP'ed... | |
| 857 | */ | |
| 858 | PORT_START("SW2") | |
| 859 | PORT_DIPNAME( 0x01, 0x01, "SW2-01 (CC00)" ) | |
| 860 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 861 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 862 | PORT_DIPNAME( 0x02, 0x02, "SW2-02 (CC00)" ) | |
| 863 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 864 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 865 | PORT_DIPNAME( 0x04, 0x04, "SW2-04 (CC00)" ) | |
| 866 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 867 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 868 | PORT_DIPNAME( 0x08, 0x08, "SW2-08 (CC00)" ) | |
| 869 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 870 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 871 | PORT_DIPNAME( 0x10, 0x00, "SW2-10 (CC00) System Boot" ) /* Should be turned ON to boot */ | |
| 872 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 873 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 874 | PORT_DIPNAME( 0x20, 0x00, "Key In (value)" ) | |
| 875 | PORT_DIPSETTING( 0x20, "1 Pulse / 20 Credits" ) | |
| 876 | PORT_DIPSETTING( 0x00, "1 Pulse / 100 Credits" ) | |
| 877 | PORT_DIPNAME( 0x40, 0x40, "SW2-40 (CC00)" ) | |
| 878 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 879 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 880 | PORT_DIPNAME( 0x80, 0x80, "SW2-80 (CC00)" ) | |
| 881 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 882 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 883 | ||
| 884 | PORT_START("SW3") | |
| 885 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") | |
| 886 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 887 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 888 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:2") | |
| 889 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 890 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 891 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:3") | |
| 892 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 893 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 894 | PORT_DIPNAME( 0x18, 0x10, "Min/Max Bet" ) PORT_DIPLOCATION("SW3:4,5") /* Always 1-40 on screen */ | |
| 895 | PORT_DIPSETTING( 0x00, "Min:10; Max:80" ) | |
| 896 | PORT_DIPSETTING( 0x08, "Min:10; Max:50" ) | |
| 897 | PORT_DIPSETTING( 0x10, "Min:05; Max:40" ) | |
| 898 | PORT_DIPSETTING( 0x18, "Min:05; Max:10" ) | |
| 899 | PORT_DIPNAME( 0x60, 0x40, "Key In (screen)" ) PORT_DIPLOCATION("SW3:6,7") /* Only on screen */ | |
| 900 | PORT_DIPSETTING( 0x60, "20" ) | |
| 901 | PORT_DIPSETTING( 0x40, "100" ) | |
| 902 | PORT_DIPSETTING( 0x20, "120" ) | |
| 903 | PORT_DIPSETTING( 0x00, "130" ) | |
| 904 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:8") | |
| 905 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 906 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 907 | ||
| 908 | PORT_START("SW4") | |
| 909 | /* only bits 4-6-7 are connected here and were routed to SW4 1-4 */ | |
| 910 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 911 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 912 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 913 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 914 | PORT_DIPNAME( 0x10, 0x00, "Jacks or Better" ) PORT_DIPLOCATION("SW4:1") | |
| 915 | PORT_DIPSETTING( 0x10, DEF_STR( No ) ) | |
| 916 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 917 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW4:2") | |
| 918 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 919 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 920 | PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW4:3") | |
| 921 | PORT_DIPSETTING( 0x40, "Manual" ) | |
| 922 | PORT_DIPSETTING( 0x00, "Auto" ) | |
| 923 | PORT_DIPNAME( 0x80, 0x80, "Coin In" ) PORT_DIPLOCATION("SW4:4") | |
| 924 | PORT_DIPSETTING( 0x80, "x10" ) | |
| 925 | PORT_DIPSETTING( 0x00, "x5" ) | |
| 926 | INPUT_PORTS_END | |
| 927 | ||
| 928 | ||
| 929 | /************************* | |
| 930 | * Graphics Layouts * | |
| 931 | *************************/ | |
| 932 | ||
| 933 | static const gfx_layout tilelayout = | |
| 934 | { | |
| 935 | 8, 8, | |
| 936 | RGN_FRAC(1,3), | |
| 937 | 3, | |
| 938 | { 0, RGN_FRAC(1,3), RGN_FRAC(2,3) }, /* bitplanes are separated */ | |
| 939 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 940 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 941 | 8*8 | |
| 942 | }; | |
| 943 | ||
| 944 | ||
| 945 | /****************************** | |
| 946 | * Graphics Decode Information * | |
| 947 | ******************************/ | |
| 948 | ||
| 949 | static GFXDECODE_START( fclown ) | |
| 950 | GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 16 ) | |
| 951 | GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 16 ) | |
| 952 | GFXDECODE_END | |
| 953 | ||
| 954 | ||
| 955 | /*********************** | |
| 956 | * CRTC Interface * | |
| 957 | ***********************/ | |
| 958 | ||
| 959 | static const mc6845_interface mc6845_intf = | |
| 960 | { | |
| 961 | "screen", /* screen we are acting on */ | |
| 962 | 8, /* number of pixels per video memory address */ | |
| 963 | NULL, /* before pixel update callback */ | |
| 964 | NULL, /* row update callback */ | |
| 965 | NULL, /* after pixel update callback */ | |
| 966 | DEVCB_NULL, /* callback for display state changes */ | |
| 967 | DEVCB_NULL, /* callback for cursor state changes */ | |
| 968 | DEVCB_NULL, /* HSYNC callback */ | |
| 969 | DEVCB_NULL, /* VSYNC callback */ | |
| 970 | NULL /* update address callback */ | |
| 971 | }; | |
| 972 | ||
| 973 | ||
| 974 | /*********************** | |
| 975 | * PIA Interfaces * | |
| 976 | ***********************/ | |
| 977 | ||
| 978 | static const pia6821_interface fclown_pia0_intf = | |
| 979 | { | |
| 980 | DEVCB_HANDLER(mux_port_r), /* Port A IN Multiplexed Ports read */ | |
| 981 | DEVCB_HANDLER(pia0_b_r), /* Port B IN unknown (used) */ | |
| 982 | DEVCB_NULL, /* Line CA1 IN */ | |
| 983 | DEVCB_NULL, /* Line CB1 IN */ | |
| 984 | DEVCB_NULL, /* Line CA2 IN */ | |
| 985 | DEVCB_NULL, /* Line CA2 IN */ | |
| 986 | DEVCB_NULL, /* Port A OUT NULL */ | |
| 987 | DEVCB_HANDLER(counters_w), /* Port B OUT Counters */ | |
| 988 | DEVCB_NULL, /* Line CA2 OUT */ | |
| 989 | DEVCB_NULL, /* Line CB2 OUT */ | |
| 990 | DEVCB_NULL, /* IRQA */ | |
| 991 | DEVCB_NULL /* IRQB */ | |
| 992 | }; | |
| 993 | ||
| 994 | static const pia6821_interface fclown_pia1_intf = | |
| 995 | { | |
| 996 | DEVCB_INPUT_PORT("SW4"), /* Port A IN 4th DIP Switchs bank */ | |
| 997 | DEVCB_HANDLER(pia1_b_r), /* Port B IN Check bit 2 to allow key out system to work */ | |
| 998 | DEVCB_NULL, /* Line CA1 IN */ | |
| 999 | DEVCB_NULL, /* Line CB1 IN */ | |
| 1000 | DEVCB_NULL, /* Line CA2 IN */ | |
| 1001 | DEVCB_NULL, /* Line CB2 IN */ | |
| 1002 | DEVCB_HANDLER(trigsnd_w), /* Port A OUT Trigger the audio CPU interrupts */ | |
| 1003 | DEVCB_HANDLER(mux_w), /* Port B OUT Multiplexed Ports selector */ | |
| 1004 | DEVCB_NULL, /* Line CA2 OUT */ | |
| 1005 | DEVCB_NULL, /* Line CB2 OUT */ | |
| 1006 | DEVCB_NULL, /* IRQA */ | |
| 1007 | DEVCB_NULL /* IRQB */ | |
| 1008 | }; | |
| 1009 | ||
| 1010 | ||
| 1011 | /************************* | |
| 1012 | * Sound Interfaces * | |
| 1013 | *************************/ | |
| 1014 | ||
| 1015 | static const ay8910_interface ay8910_config = | |
| 1016 | { | |
| 1017 | AY8910_LEGACY_OUTPUT, | |
| 1018 | AY8910_DEFAULT_LOADS, | |
| 1019 | DEVCB_NULL, | |
| 1020 | DEVCB_NULL, | |
| 1021 | DEVCB_NULL, | |
| 1022 | DEVCB_NULL | |
| 1023 | }; | |
| 1024 | ||
| 1025 | ||
| 1026 | /************************* | |
| 1027 | * Machine Drivers * | |
| 1028 | *************************/ | |
| 1029 | ||
| 1030 | static MACHINE_DRIVER_START( fclown ) | |
| 1031 | ||
| 1032 | /* basic machine hardware */ | |
| 1033 | MDRV_CPU_ADD("maincpu", M6502, MASTER_CLOCK/8) /* guess, seems ok */ | |
| 1034 | MDRV_CPU_PROGRAM_MAP(fclown_map) | |
| 1035 | MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse) | |
| 1036 | ||
| 1037 | MDRV_CPU_ADD("audiocpu", M6502, MASTER_CLOCK/8) /* guess, seems ok */ | |
| 1038 | MDRV_CPU_PROGRAM_MAP(fcaudio_map) | |
| 1039 | ||
| 1040 | MDRV_NVRAM_HANDLER(generic_0fill) | |
| 1041 | ||
| 1042 | MDRV_PIA6821_ADD("pia0", fclown_pia0_intf) | |
| 1043 | MDRV_PIA6821_ADD("pia1", fclown_pia1_intf) | |
| 1044 | ||
| 1045 | /* video hardware */ | |
| 1046 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 1047 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1048 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 1049 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1050 | MDRV_SCREEN_SIZE((39+1)*8, (31+1)*8) | |
| 1051 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) | |
| 1052 | ||
| 1053 | MDRV_GFXDECODE(fclown) | |
| 1054 | MDRV_PALETTE_LENGTH(256) | |
| 1055 | MDRV_PALETTE_INIT(fclown) | |
| 1056 | ||
| 1057 | MDRV_VIDEO_START(fclown) | |
| 1058 | MDRV_VIDEO_UPDATE(fclown) | |
| 1059 | ||
| 1060 | MDRV_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/16, mc6845_intf) /* guess */ | |
| 1061 | ||
| 1062 | /* sound hardware */ | |
| 1063 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1064 | ||
| 1065 | MDRV_SOUND_ADD("ay8910", AY8910, MASTER_CLOCK/8) /* guess, seems ok */ | |
| 1066 | MDRV_SOUND_CONFIG(ay8910_config) | |
| 1067 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) | |
| 1068 | ||
| 1069 | MDRV_SOUND_ADD("oki6295", OKIM6295, MASTER_CLOCK/12) /* guess, seems ok */ | |
| 1070 | MDRV_SOUND_CONFIG(okim6295_interface_pin7low) /* pin7 guessed, seems ok */ | |
| 1071 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.20) | |
| 1072 | ||
| 1073 | MACHINE_DRIVER_END | |
| 1074 | ||
| 1075 | ||
| 1076 | /************************* | |
| 1077 | * Rom Load * | |
| 1078 | *************************/ | |
| 1079 | ||
| 1080 | ROM_START( 5clown ) | |
| 1081 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 1082 | ROM_LOAD( "4.u2", 0x2000, 0x8000, CRC(96e3e8ab) SHA1(fec20b9a8bde5306162f8288cdc9580f445cadf5) ) | |
| 1083 | ROM_COPY( "maincpu", 0x2000, 0x8000, 0x8000 ) | |
| 1084 | ||
| 1085 | ||
| 1086 | ROM_REGION( 0x8000, "gfxbanks", 0 ) | |
| 1087 | ROM_LOAD( "7.u34", 0x0000, 0x8000, CRC(64c9f4ee) SHA1(6e695feee826e319f84d91f6bbf7cfacd443fc8f) ) | |
| 1088 | ||
| 1089 | ROM_REGION( 0x10000, "audiocpu", 0 ) | |
| 1090 | ROM_LOAD( "9.u35", 0xe000, 0x2000, CRC(7e3c3af5) SHA1(ebc09da981dbdf4eac90bcf982e5bc8ede47e81a) ) | |
| 1091 | ||
| 1092 | ROM_REGION( 0x40000, "oki6295", 0 ) | |
| 1093 | ROM_LOAD( "8.u50", 0x0000, 0x10000, CRC(e1e37180) SHA1(e162abcb01952e26deee74ece5719239961e1b69) ) | |
| 1094 | ||
| 1095 | ||
| 1096 | ROM_REGION( 0x3000, "gfx1", 0 ) | |
| 1097 | ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the remaining bitplanes */ | |
| 1098 | ROM_COPY( "gfxbanks", 0x7000, 0x2000, 0x1000 ) | |
| 1099 | ||
| 1100 | ROM_REGION( 0x3000, "gfx2", 0 ) | |
| 1101 | ROM_COPY( "gfxbanks", 0x6000, 0x0000, 0x1000 ) | |
| 1102 | ROM_COPY( "gfxbanks", 0x5000, 0x1000, 0x1000 ) | |
| 1103 | ROM_COPY( "gfxbanks", 0x4000, 0x2000, 0x1000 ) | |
| 1104 | ||
| 1105 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 1106 | ROM_LOAD( "dm74s287an.u32", 0x0000, 0x0100, CRC(2d207266) SHA1(374b4830a0a8ed3001cf0df16daa8dffee503cbe) ) | |
| 1107 | ||
| 1108 | ROM_END | |
| 1109 | ||
| 1110 | ||
| 1111 | ROM_START( 5clowna ) | |
| 1112 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 1113 | ROM_LOAD( "6.u2", 0x2000, 0x2000, BAD_DUMP CRC(15ecca37) SHA1(d8d0a43f559168cccc3a46418557ccfc30c8108e) ) | |
| 1114 | ROM_LOAD( "5.u2", 0x4000, 0x2000, BAD_DUMP CRC(2e962007) SHA1(86599ba5030068c08ff5a19ada7250c410b2ba35) ) | |
| 1115 | ROM_LOAD( "7.u2", 0xe000, 0x2000, BAD_DUMP CRC(308c4771) SHA1(f6ee402c120ff16601347cc994a45a7092511050) ) | |
| 1116 | ||
| 1117 | ||
| 1118 | ROM_REGION( 0x8000, "gfxbanks", 0 ) | |
| 1119 | ROM_LOAD( "7.u34", 0x0000, 0x8000, CRC(64c9f4ee) SHA1(6e695feee826e319f84d91f6bbf7cfacd443fc8f) ) | |
| 1120 | ||
| 1121 | ROM_REGION( 0x10000, "audiocpu", 0 ) | |
| 1122 | ROM_LOAD( "9.u35", 0xe000, 0x2000, CRC(7e3c3af5) SHA1(ebc09da981dbdf4eac90bcf982e5bc8ede47e81a) ) | |
| 1123 | ||
| 1124 | ROM_REGION( 0x40000, "oki6295", 0 ) | |
| 1125 | ROM_LOAD( "8.u50", 0x0000, 0x10000, CRC(e1e37180) SHA1(e162abcb01952e26deee74ece5719239961e1b69) ) | |
| 1126 | ||
| 1127 | ||
| 1128 | ROM_REGION( 0x3000, "gfx1", 0 ) | |
| 1129 | ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the remaining bitplanes */ | |
| 1130 | ROM_COPY( "gfxbanks", 0x7000, 0x2000, 0x1000 ) | |
| 1131 | ||
| 1132 | ROM_REGION( 0x3000, "gfx2", 0 ) | |
| 1133 | ROM_COPY( "gfxbanks", 0x6000, 0x0000, 0x1000 ) | |
| 1134 | ROM_COPY( "gfxbanks", 0x5000, 0x1000, 0x1000 ) | |
| 1135 | ROM_COPY( "gfxbanks", 0x4000, 0x2000, 0x1000 ) | |
| 1136 | ||
| 1137 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 1138 | ROM_LOAD( "dm74s287an.u32", 0x0000, 0x0100, CRC(2d207266) SHA1(374b4830a0a8ed3001cf0df16daa8dffee503cbe) ) | |
| 1139 | ||
| 1140 | ROM_END | |
| 1141 | ||
| 1142 | ||
| 1143 | ROM_START( 5clownsp ) | |
| 1144 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 1145 | ROM_LOAD( "five_clown_sp.u2", 0x2000, 0x8000, CRC(fa18090d) SHA1(47feb5dbc77ae8621fc35b707c24d64a95227a39) ) | |
| 1146 | ROM_COPY( "maincpu", 0x2000, 0x8000, 0x8000 ) | |
| 1147 | ||
| 1148 | ||
| 1149 | ROM_REGION( 0x8000, "gfxbanks", 0 ) | |
| 1150 | ROM_LOAD( "7.u34", 0x0000, 0x8000, CRC(64c9f4ee) SHA1(6e695feee826e319f84d91f6bbf7cfacd443fc8f) ) | |
| 1151 | ||
| 1152 | ROM_REGION( 0x10000, "audiocpu", 0 ) | |
| 1153 | ROM_LOAD( "9.u35", 0xe000, 0x2000, CRC(7e3c3af5) SHA1(ebc09da981dbdf4eac90bcf982e5bc8ede47e81a) ) | |
| 1154 | ||
| 1155 | ROM_REGION( 0x40000, "oki6295", 0 ) | |
| 1156 | ROM_LOAD( "8.u50", 0x0000, 0x10000, CRC(e1e37180) SHA1(e162abcb01952e26deee74ece5719239961e1b69) ) | |
| 1157 | ||
| 1158 | ||
| 1159 | ROM_REGION( 0x3000, "gfx1", 0 ) | |
| 1160 | ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the remaining bitplanes */ | |
| 1161 | ROM_COPY( "gfxbanks", 0x7000, 0x2000, 0x1000 ) | |
| 1162 | ||
| 1163 | ROM_REGION( 0x3000, "gfx2", 0 ) | |
| 1164 | ROM_COPY( "gfxbanks", 0x6000, 0x0000, 0x1000 ) | |
| 1165 | ROM_COPY( "gfxbanks", 0x5000, 0x1000, 0x1000 ) | |
| 1166 | ROM_COPY( "gfxbanks", 0x4000, 0x2000, 0x1000 ) | |
| 1167 | ||
| 1168 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 1169 | ROM_LOAD( "dm74s287an.u32", 0x0000, 0x0100, CRC(2d207266) SHA1(374b4830a0a8ed3001cf0df16daa8dffee503cbe) ) | |
| 1170 | ||
| 1171 | ROM_END | |
| 1172 | ||
| 1173 | ||
| 1174 | /************************* | |
| 1175 | * Driver Init * | |
| 1176 | *************************/ | |
| 1177 | ||
| 1178 | static DRIVER_INIT( fclown ) | |
| 1179 | { | |
| 1180 | /* Decrypting main program */ | |
| 1181 | ||
| 1182 | int x; | |
| 1183 | UINT8 *src = memory_region( machine, "maincpu" ); | |
| 1184 | ||
| 1185 | for (x = 0x0000; x < 0x10000; x++) | |
| 1186 | { | |
| 1187 | src[x] = src[x] ^ 0x20; /* Decrypting byte */ | |
| 1188 | } | |
| 1189 | ||
| 1190 | ||
| 1191 | /* Decrypting GFX by segments */ | |
| 1192 | ||
| 1193 | UINT8 *gfx1_src = memory_region( machine, "gfx1" ); | |
| 1194 | UINT8 *gfx2_src = memory_region( machine, "gfx2" ); | |
| 1195 | ||
| 1196 | for (x = 0x2000; x < 0x3000; x++) | |
| 1197 | { | |
| 1198 | gfx1_src[x] = gfx1_src[x] ^ 0x22; /* Decrypting bulk GFX segment 7000-7fff */ | |
| 1199 | } | |
| 1200 | ||
| 1201 | for (x = 0x0000; x < 0x1000; x++) | |
| 1202 | { | |
| 1203 | gfx2_src[x] = gfx2_src[x] ^ 0x3f; /* Decrypting bulk GFX segment 6000-6fff */ | |
| 1204 | } | |
| 1205 | ||
| 1206 | for (x = 0x2000; x < 0x3000; x++) | |
| 1207 | { | |
| 1208 | gfx2_src[x] = gfx2_src[x] ^ 0x22; /* Decrypting bulk GFX segment 4000-4fff */ | |
| 1209 | } | |
| 1210 | ||
| 1211 | ||
| 1212 | /* Decrypting sound samples */ | |
| 1213 | ||
| 1214 | UINT8 *samples_src = memory_region( machine, "oki6295" ); | |
| 1215 | ||
| 1216 | for (x = 0x0000; x < 0x10000; x++) | |
| 1217 | { | |
| 1218 | if (samples_src[x] & 0x02) /* If bit 1 is active... */ | |
| 1219 | { | |
| 1220 | samples_src[x] = samples_src[x] ^ 0x02; /* Then bit 1 XOR'ed */ | |
| 1221 | } | |
| 1222 | ||
| 1223 | else | |
| 1224 | { | |
| 1225 | samples_src[x] = samples_src[x] ^ 0x12; /* Otherwise bit 1 & 5 XOR'ed */ | |
| 1226 | } | |
| 1227 | } | |
| 1228 | ||
| 1229 | ||
| 1230 | /* Assigning AY-3-8910 sound device */ | |
| 1231 | ||
| 1232 | ay8910 = devtag_get_device(machine, "ay8910"); | |
| 1233 | } | |
| 1234 | ||
| 1235 | ||
| 1236 | /************************* | |
| 1237 | * Game Drivers * | |
| 1238 | *************************/ | |
| 1239 | ||
| 1240 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS... */ | |
| 1241 | GAME( 1993, 5clown, 0, fclown, fclown, fclown, ROT0, "IGS", "Five Clown (english, set 1)", GAME_IMPERFECT_SOUND ) | |
| 1242 | GAME( 1993, 5clowna, 5clown, fclown, fclown, fclown, ROT0, "IGS", "Five Clown (english, set 2)", GAME_IMPERFECT_SOUND ) | |
| 1243 | GAME( 1993, 5clownsp, 5clown, fclown, fclown, fclown, ROT0, "IGS", "Five Clown (spanish hack)", GAME_IMPERFECT_SOUND ) |
| r7553 | r7554 | |
|---|---|---|
| 527 | 527 | |
| 528 | 528 | static READ16_HANDLER( galpani3_mcu_status_r ) |
| 529 | 529 | { |
| 530 | logerror("cpu '%s' (PC=%06X): read mcu status\n", space->cpu->tag | |
| 530 | logerror("cpu '%s' (PC=%06X): read mcu status\n", space->cpu->tag | |
| 531 | 531 | return 0; |
| 532 | 532 | } |
| 533 | 533 | |
| r7553 | r7554 | |
| 549 | 549 | } |
| 550 | 550 | |
| 551 | 551 | default: |
| 552 | logerror("cpu '%s' (PC=%06X): galpani3_regs1_r %02x %04x\n", space->cpu->tag | |
| 552 | logerror("cpu '%s' (PC=%06X): galpani3_regs1_r %02x %04x\n", space->cpu->tag | |
| 553 | 553 | break; |
| 554 | 554 | |
| 555 | 555 | } |
| r7553 | r7554 | |
| 574 | 574 | } |
| 575 | 575 | |
| 576 | 576 | default: |
| 577 | logerror("cpu '%s' (PC=%06X): galpani3_regs2_r %02x %04x\n", space->cpu->tag | |
| 577 | logerror("cpu '%s' (PC=%06X): galpani3_regs2_r %02x %04x\n", space->cpu->tag | |
| 578 | 578 | break; |
| 579 | 579 | |
| 580 | 580 | } |
| r7553 | r7554 | |
| 599 | 599 | } |
| 600 | 600 | |
| 601 | 601 | default: |
| 602 | logerror("cpu '%s' (PC=%06X): galpani3_regs3_r %02x %04x\n", space->cpu->tag | |
| 602 | logerror("cpu '%s' (PC=%06X): galpani3_regs3_r %02x %04x\n", space->cpu->tag | |
| 603 | 603 | break; |
| 604 | 604 | |
| 605 | 605 | } |
| r7553 | r7554 | |
|---|---|---|
| 983 | 983 | ROM_LOAD( "kid_prom.2g", 0x300, 0x100, CRC(4b9be0ed) SHA1(81aa7bb24fe6ea13f5dffdb67ea699adf0b3129a) ) /* clut */ |
| 984 | 984 | |
| 985 | 985 | ROM_REGION( 0x0100, "user1", 0 ) |
| 986 | ROM_LOAD( "kid_prom.4e", 0x000, 0x100, | |
| 986 | ROM_LOAD( "kid_prom.4e", 0x000, 0x100, BAD_DUMP CRC(e4fb54ee) SHA1(aba89d347b24dc6680e6f25b4a6c0d6657bb6a83) ) /* ctable */ | |
| 987 | 987 | ROM_END |
| 988 | 988 | |
| 989 | 989 | static DRIVER_INIT( amazon ) |
| r7553 | r7554 | |
|---|---|---|
| 1423 | 1423 | ROM_LOAD( "ck3.bin", 0x3000, 0x1000, CRC(61122c5e) SHA1(978b6dbec35f3adc651fddf332db17625099a92e) ) |
| 1424 | 1424 | |
| 1425 | 1425 | ROM_REGION( 0x1000, "gfx2", 0 ) |
| 1426 | ROM_LOAD( "ck2.bin", 0x0000, 0x0800, CRC(f67c80f1) SHA1(d1fbcce1b6242f810e106ff50812636e3168ebc1) ) | |
| 1427 | ROM_LOAD( "ck1.bin", 0x0800, 0x0800, CRC(80eb517d) SHA1(fef4111f656c58b28e7eac5aa5b5cc7e07ccb2fd) ) | |
| 1426 | ROM_LOAD( "alc_ck2.bin", 0x0000, 0x0800, CRC(f67c80f1) SHA1(d1fbcce1b6242f810e106ff50812636e3168ebc1) ) | |
| 1427 | ROM_LOAD( "alc_ck1.bin", 0x0800, 0x0800, CRC(80eb517d) SHA1(fef4111f656c58b28e7eac5aa5b5cc7e07ccb2fd) ) | |
| 1428 | 1428 | |
| 1429 | 1429 | ROM_REGION( 0x0060, "proms", 0 ) |
| 1430 | 1430 | ROM_LOAD( "ck6v.bin", 0x0000, 0x0020, CRC(751c3325) SHA1(edce2bc883996c1d72dc6c1c9f62799b162d415a) ) |
| r7553 | r7554 | |
| 1481 | 1481 | ROM_LOAD( "ck3.bin", 0x3000, 0x1000, CRC(61122c5e) SHA1(978b6dbec35f3adc651fddf332db17625099a92e) ) |
| 1482 | 1482 | |
| 1483 | 1483 | ROM_REGION( 0x1000, "gfx2", 0 ) |
| 1484 | ROM_LOAD( "ck2.bin", 0x0000, 0x0800, CRC(f67c80f1) SHA1(d1fbcce1b6242f810e106ff50812636e3168ebc1) ) | |
| 1485 | ROM_LOAD( "ck1.bin", 0x0800, 0x0800, CRC(80eb517d) SHA1(fef4111f656c58b28e7eac5aa5b5cc7e07ccb2fd) ) | |
| 1484 | ROM_LOAD( "md_ck2.bin", 0x0000, 0x0800, CRC(f67c80f1) SHA1(d1fbcce1b6242f810e106ff50812636e3168ebc1) ) | |
| 1485 | ROM_LOAD( "md_ck1.bin", 0x0800, 0x0800, CRC(80eb517d) SHA1(fef4111f656c58b28e7eac5aa5b5cc7e07ccb2fd) ) | |
| 1486 | 1486 | |
| 1487 | 1487 | ROM_REGION( 0x0060, "proms", 0 ) |
| 1488 | 1488 | ROM_LOAD( "ck6v.bin", 0x0000, 0x0020, BAD_DUMP CRC(751c3325) SHA1(edce2bc883996c1d72dc6c1c9f62799b162d415a) ) |
| r7553 | r7554 | |
|---|---|---|
| 740 | 740 | ROM_LOAD( "23ja-0.100", 0x60000, 0x20000, CRC(f678594f) SHA1(4bdcf9407543925f4630a8c7f1f48b85f76343a9) ) /* 0,1 */ |
| 741 | 741 | |
| 742 | 742 | ROM_REGION(0x40000, "gfx3", 0 ) /* Background */ |
| 743 | ROM_LOAD( "a-13", 0x00000, 0x10000, NO_DUMP ) /* Where are */ | |
| 744 | ROM_LOAD( "a-12", 0x10000, 0x10000, NO_DUMP ) /* these on the */ | |
| 745 | ROM_LOAD( "a-15", 0x20000, 0x10000, NO_DUMP ) /* real board ? */ | |
| 746 | ROM_LOAD( "a-14", 0x30000, 0x10000, NO_DUMP ) | |
| 743 | ROM_LOAD( "chinagat_a-13", 0x00000, 0x10000, NO_DUMP ) /* Where are */ | |
| 744 | ROM_LOAD( "chinagat_a-12", 0x10000, 0x10000, NO_DUMP ) /* these on the */ | |
| 745 | ROM_LOAD( "chinagat_a-15", 0x20000, 0x10000, NO_DUMP ) /* real board ? */ | |
| 746 | ROM_LOAD( "chinagat_a-14", 0x30000, 0x10000, NO_DUMP ) | |
| 747 | 747 | |
| 748 | 748 | ROM_REGION(0x40000, "oki", 0 ) /* ADPCM */ |
| 749 | 749 | ROM_LOAD( "23j1-0.53", 0x00000, 0x20000, CRC(f91f1001) SHA1(378402a3c966cabd61e9662ae5decd66672a228b) ) |
| r7553 | r7554 | |
|---|---|---|
| 187 | 187 | static UINT16 *tx_vram,*bg_vram,*fg_vram,*spr_ram; |
| 188 | 188 | static UINT16 *io_ram; |
| 189 | 189 | |
| 190 | #define LOG_UNKNOWN_WRITE logerror("unknown io write CPU '%s':%08x 0x%08x 0x%04x & 0x%04x\n", space->cpu->tag | |
| 190 | #define LOG_UNKNOWN_WRITE logerror("unknown io write CPU '%s':%08x 0x%08x 0x%04x & 0x%04x\n", space->cpu->tag | |
| 191 | 191 | |
| 192 | 192 | static TILE_GET_INFO( get_tx_tile_info ) |
| 193 | 193 | { |
| r7553 | r7554 | |
|---|---|---|
| 250 | 250 | else if (offset == 0x9000) { return; } /* AM_NOP */ |
| 251 | 251 | else if (offset == 0x9002) { audio_command_w(space, 0, data); return; } |
| 252 | 252 | else if (offset >= 0xb000 && offset <= 0xb1ff) ; |
| 253 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 253 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 254 | 254 | |
| 255 | 255 | state->rambase[offset] = data; |
| 256 | 256 | |
| r7553 | r7554 | |
| 270 | 270 | else if (offset == 0x9000) { return; } /* AM_NOP */ |
| 271 | 271 | else if (offset == 0x9002) { audio_command_w(space, 0, data); return; } |
| 272 | 272 | else if (offset >= 0xb000 && offset <= 0xbfff) { mmonkey_protection_w(space, offset - 0xb000, data); return; } |
| 273 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 273 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 274 | 274 | |
| 275 | 275 | state->rambase[offset] = data; |
| 276 | 276 | |
| r7553 | r7554 | |
| 290 | 290 | else if (offset == 0x4002) btime_video_control_w(space, 0, data); |
| 291 | 291 | else if (offset == 0x4003) audio_command_w(space, 0, data); |
| 292 | 292 | else if (offset == 0x4004) bnj_scroll1_w(space, 0, data); |
| 293 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 293 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 294 | 294 | |
| 295 | 295 | state->rambase[offset] = data; |
| 296 | 296 | |
| r7553 | r7554 | |
| 311 | 311 | else if (offset == 0x4004) bnj_scroll1_w(space, 0, data); |
| 312 | 312 | else if (offset == 0x4005) bnj_scroll2_w(space, 0, data); |
| 313 | 313 | // else if (offset == 0x8000) btime_video_control_w(space,0,data); |
| 314 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 314 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 315 | 315 | |
| 316 | 316 | state->rambase[offset] = data; |
| 317 | 317 | |
| r7553 | r7554 | |
| 331 | 331 | else if (offset == 0x9804) bnj_scroll2_w(space, 0, data); |
| 332 | 332 | else if (offset == 0x9805) bnj_scroll1_w(space, 0, data); |
| 333 | 333 | else if (offset == 0x9806) audio_command_w(space, 0, data); |
| 334 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 334 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 335 | 335 | |
| 336 | 336 | state->rambase[offset] = data; |
| 337 | 337 | |
| r7553 | r7554 | |
| 347 | 347 | else if (offset >= 0x8000 && offset <= 0x881f) ; |
| 348 | 348 | else if (offset == 0x9a00) audio_command_w(space, 0, data); |
| 349 | 349 | else if (offset == 0x9c00) disco_video_control_w(space, 0, data); |
| 350 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 350 | else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n", space->cpu->tag | |
| 351 | 351 | |
| 352 | 352 | state->rambase[offset] = data; |
| 353 | 353 |
| r7553 | r7554 | |
|---|---|---|
| 240 | 240 | |
| 241 | 241 | ROM_START( chsuper2 ) |
| 242 | 242 | ROM_REGION( 0x80000, "maincpu", 0 ) |
| 243 | ROM_LOAD( "c.bin", 0x0000, 0x80000, CRC(cbf59e69) SHA1(68e4b167fdf9103fd748cff401f4fe7c1d214552) ) | |
| 243 | ROM_LOAD( "chsuper2-c.bin", 0x0000, 0x80000, CRC(cbf59e69) SHA1(68e4b167fdf9103fd748cff401f4fe7c1d214552) ) | |
| 244 | 244 | |
| 245 | 245 | ROM_REGION( 0x100000, "gfx1", 0 ) |
| 246 | ROM_LOAD( "a.bin", 0x00000, 0x80000, CRC(7caa8ebe) SHA1(440306a208ec8afd570b15f05b5dc542acc98510) ) | |
| 247 | ROM_LOAD( "b.bin", 0x80000, 0x80000, CRC(7bb463d7) SHA1(fb3842ba53e545fa47574c91df7281a9cb417395) ) | |
| 246 | ROM_LOAD( "chsuper2-a.bin", 0x00000, 0x80000, CRC(7caa8ebe) SHA1(440306a208ec8afd570b15f05b5dc542acc98510) ) | |
| 247 | ROM_LOAD( "chsuper2-b.bin", 0x80000, 0x80000, CRC(7bb463d7) SHA1(fb3842ba53e545fa47574c91df7281a9cb417395) ) | |
| 248 | 248 | |
| 249 | 249 | ROM_REGION( 0x10000, "vram", ROMREGION_ERASE00 ) |
| 250 | 250 |
| r7553 | r7554 | |
|---|---|---|
| 54 | 54 | cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | static INTERRUPT_GEN( mnchmobl_sound_irq ) | |
| 58 | { | |
| 59 | munchmo_state *state = (munchmo_state *)device->machine->driver_data; | |
| 60 | ||
| 61 | if (!(state->sound_nmi_enable)) | |
| 62 | cpu_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); | |
| 63 | } | |
| 64 | ||
| 57 | 65 | static WRITE8_HANDLER( mnchmobl_soundlatch_w ) |
| 58 | 66 | { |
| 59 | 67 | munchmo_state *state = (munchmo_state *)space->machine->driver_data; |
| r7553 | r7554 | |
| 62 | 70 | cpu_set_input_line(state->audiocpu, 0, HOLD_LINE ); |
| 63 | 71 | } |
| 64 | 72 | |
| 73 | static WRITE8_HANDLER( sound_nmi_enable_w ) | |
| 74 | { | |
| 75 | munchmo_state *state = (munchmo_state *)space->machine->driver_data; | |
| 76 | state->sound_nmi_enable = data & 1; | |
| 77 | } | |
| 78 | ||
| 79 | ||
| 65 | 80 | static WRITE8_HANDLER( sound_nmi_ack_w ) |
| 66 | 81 | { |
| 67 | 82 | munchmo_state *state = (munchmo_state *)space->machine->driver_data; |
| r7553 | r7554 | |
| 107 | 122 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("ay2", ay8910_data_w) |
| 108 | 123 | AM_RANGE(0x7000, 0x7000) AM_DEVWRITE("ay2", ay8910_address_w) |
| 109 | 124 | AM_RANGE(0x8000, 0x8000) AM_WRITENOP /* ? */ |
| 110 | AM_RANGE(0xa000, 0xa000) AM_WRITE | |
| 125 | AM_RANGE(0xa000, 0xa000) AM_WRITE(sound_nmi_enable_w) | |
| 111 | 126 | AM_RANGE(0xc000, 0xc000) AM_WRITE(sound_nmi_ack_w) |
| 112 | 127 | AM_RANGE(0xe000, 0xe7ff) AM_RAM |
| 113 | 128 | ADDRESS_MAP_END |
| r7553 | r7554 | |
| 325 | 340 | |
| 326 | 341 | MDRV_CPU_ADD("audiocpu", Z80, XTAL_15MHz/4) /* ? */ |
| 327 | 342 | MDRV_CPU_PROGRAM_MAP(sound_map) |
| 328 | MDRV_CPU_VBLANK_INT("screen", nm | |
| 343 | MDRV_CPU_VBLANK_INT("screen", mnchmobl | |
| 329 | 344 | |
| 330 | 345 | MDRV_MACHINE_START(munchmo) |
| 331 | 346 | MDRV_MACHINE_RESET(munchmo) |
| r7553 | r7554 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | Namco System 22.5 and (Super) System 23 | |
| 2 | Namco System 22.5 and (Super) System 23 (Evolution 2) | |
| 3 | 3 | Extremely preliminary driver by R. Belmont, thanks to Phil Stroffolino & Olivier Galibert |
| 4 | 4 | |
| 5 | 5 | Hardware: * R4650 (MIPS III with IDT special instructions) main CPU. |
| 6 | 6 | 133 MHz for Gorgon, 166 MHz for System 23 and Super System 23, and |
| 7 | 200 MHz for Super System 23 Evolution 2. | |
| 7 | 200 MHz for Super System 23 Evolution 2. | |
| 8 | 8 | * H8/3002 MCU for sound/inputs |
| 9 | 9 | * Custom polygon hardware |
| 10 | 10 | * 1 text tilemap |
| r7553 | r7554 | |
| 27 | 27 | Works like this: write to d00004, then read d00004 12 times. Ditto at |
| 28 | 28 | d00006. This gives 24 bits of inputs (?) from the I/O board (?) or guns (?) |
| 29 | 29 | |
| 30 | - The entire 3D subsystem. Is there a DSP living down there? If not, why the 300k | |
| 31 | download on initial startup? | |
| 30 | - The entire 3D subsystem. Is there a DSP living down there? | |
| 32 | 31 | |
| 33 | 32 | - There are currently no differences seen between System 23 (Time Crisis 2) and |
| 34 | 33 | Super System 23 (GP500, Final Furlong 2). These will presumably appear when |
| r7553 | r7554 | |
| 46 | 45 | - read 2 bytes from one rom at a200000a |
| 47 | 46 | - read 2 bytes from one rom at a200000c |
| 48 | 47 | |
| 48 | - Add the sh2 in Gunmen Wars (no rom, controls the camera) | |
| 49 | ||
| 49 | 50 | - Super System 23 tests irqs in the post. timecrs2c's code can |
| 50 | 51 | potentially test 7 sources, but only actually test 5. With each |
| 51 | 52 | source there is code to clear the interrupt and code to raise it. |
| r7553 | r7554 | |
| 95 | 96 | |
| 96 | 97 | /* |
| 97 | 98 | |
| 98 | Namco System 23 and Super System 23 Hardware Overview (last updated | |
| 99 | Namco System 23 and Super System 23 Hardware Overview (last updated | |
| 99 | 100 | Namco, 1997 - 2000 |
| 100 | 101 | |
| 101 | 102 | Note! This document is a Work-In-Progress and will be updated from time to time when more dumps are available. |
| 102 | 103 | |
| 103 | This document covers all the known Namco System 23 / Super System 23 games, including.... | |
| 104 | *Angler King Namco, 1999 System 23 | |
| 104 | This document covers all the known Namco Gorgon / System 23 / Super System 23 games, including.... | |
| 105 | 105 | Final Furlong Namco, 1997 System 22.5/Gorgon |
| 106 | ||
| 106 | R | |
| 107 | 107 | Motocross Go! Namco, 1997 System 23 |
| 108 | Time Crisis II Namco, 1997 System 23 and Super System 23 | |
| 109 | Downhill Bikers Namco, 1997 System 23 | |
| 108 | 110 | Panic Park Namco, 1998 System 23 |
| 109 | Rapid River Namco, 1997 System 22.5/Gorgon | |
| 110 | Time Crisis II Namco, 1997 System 23 | |
| 111 | *Underground King Namco, 1998 System 23 | |
| 112 | Downhill Bikers Namco, 199? System 23 [not dumped, but have] | |
| 111 | *Angler King Namco, 1999 System 23 | |
| 112 | Gunmen Wars Namco, 1998 Super System 23 | |
| 113 | *Race On! Namco, 1998 Super System 23 | |
| 113 | 114 | 500 GP Namco, 1999 Super System 23 |
| 114 | Crisis Zone Namco, 2000 Super System 23 Evolution 2 [not dumped, but have] | |
| 115 | 115 | Final Furlong 2 Namco, 1999 Super System 23 |
| 116 | 116 | *Guitar Jam Namco, 1999 Super System 23 |
| 117 | ||
| 117 | Crisis Zone | |
| 118 | 118 | |
| 119 | * - denotes not dumped yet (and hardware type not confirmed). If you can help with the remaining undumped S22.5/S23/SS23 games, | |
| 120 | please contact me at http://www.mameworld.net/gurudumps/ | |
| 119 | * - denotes not dumped yet (and hardware type not confirmed, they might not be System 23 hardware). | |
| 120 | If you can help with the remaining undumped S22.5/S23/SS23 games, please contact me at http://guru.mameworld.info/ | |
| 121 | 121 | |
| 122 | 122 | The system comprises the following main boards.... |
| 123 | 123 | - EMI PCB Small PCB with some connectors, including power in, video out, network in/out, sound out (to AMP PCB) |
| 124 | 124 | - BASS AMP PCB Power AMP PCB for general sounds and bass |
| 125 | - SYSTEM23 MAIN PCB Main PCB for System 23 \ | |
| 126 | or SystemSuper23 MAIN(1) PCB Main PCB for Super System 23 / Note the 2 main boards are similar, but not exactly the same. | |
| 127 | - MSPM(FRA) PCB A small plug-in daughterboard that holds FLASHROMs containing Main CPU and Sub CPU programs | |
| 128 | - FCA PCB Controls & I/O interface board. Contains mostly transistors, caps, resistors, several connectors and an MCU. | |
| 129 | The MCU is different for EACH game and the FCA PCBs are not interchangeable between different games. | |
| 125 | - SYSTEM23 MAIN PCB Main PCB for System 23 \ | |
| 126 | or SystemSuper23 MAIN(1) PCB Main PCB for Super System 23 / | |
| 127 | or System23Evolution2 PCB Main PCB for System 23 Evolution 2 / Note the 3 main boards are similar, but not exactly the same. | |
| 128 | - MSPM(FR*) PCB A small plug-in daughterboard that holds FLASHROMs containing Main CPU and Sound CPU programs | |
| 129 | - FCA PCB Controls & I/O interface board used with a few Super System 23 games only. Contains mostly transistors, | |
| 130 | caps, resistors, several connectors, an MCU and a PIC16F84. | |
| 131 | The PIC is different for EACH game and the FCA PCBs are not interchangeable between different games. | |
| 130 | 132 | If the FCA PCB is not connected, the game will not advance past the 3rd screen shown below. |
| 133 | - ASCA-3A PCB / ASCA-4A PCB This is the standard I/O board used with most of the S23/SS23 games with support for digital and | |
| 134 | analog controls (buttons/joysticks/pots etc). | |
| 135 | - V185 I/O PCB Gun I/O board used with Time Crisis II | |
| 136 | - V221 MIU PCB Gun I/O board used with Crisis Zone (System 23 Evolution 2) and Time Crisis 3 (on System 246) | |
| 131 | 137 | - SYSTEM23 MEM(M) PCB Holds MASKROMs for GFX/Sound and associated logic |
| 132 | 138 | Note that in Super System23, the MEM(M) PCB is re-used from System23. |
| 133 | On Super System23, there is a sticker over the System23 part labelled 'SystemSuper23' | |
| 139 | On Super System23, there is a sticker over the System23 part labelled 'SystemSuper23' and one | |
| 140 | PAL is not populated. | |
| 141 | - GMEN PCB A large board that sits on top of the main board and the ROM board sits on top of it, containing | |
| 142 | a SH2 CPU, some RAM and a few CPLDs/FPGAs. This controls the camera in Gunmen Wars. | |
| 134 | 143 | |
| 135 | 144 | The metal box housing these PCB's is approximately the same size as Super System 22. However, the box is mostly |
| 136 | 145 | empty. All of the CPU/Video/DSP hardware is located on the main PCB which is the same size as the |
| r7553 | r7554 | |
| 138 | 147 | can be configured for either 32MBit or 64MBit SOP44 MASK ROMs with a maximum capacity of 1664MBits. |
| 139 | 148 | The system also uses a dual pipeline graphics bus similar to Super System 22 and has two copies of the graphics ROMs |
| 140 | 149 | on the PCB. |
| 141 | The System 23 hardware is the first NAMCO system to require an external 3.3V power source. Previously the 3.3volts | |
| 142 | was derived from a 5v to 3.3v regulator on systems such as System10/11/12 etc. | |
| 150 | The System 23 hardware is the first NAMCO system to require an external 3.3V power source. Previously the 3.3V | |
| 151 | was derived from a 5V to 3.3V regulator on systems such as System10/11/12 etc. | |
| 143 | 152 | The KEYCUS chip is the familiar MACH211 PLCC44 IC as used on System12. The sound system is also taken from System12. |
| 144 | 153 | |
| 145 | 154 | On bootup, the following happens (on GP500)... |
| 146 | 155 | |
| 147 | 1st screen - | |
| 156 | 1st screen - Grey | |
| 148 | 157 | "SYSTEM 23 BOOTING " |
| 149 | 158 | "SDRAM CHECKING A0xx000" (xx = slowly counts up to 3F, from 00), then OK ('CHECKING' is in yellow text, 'OK' is in green text) |
| 150 | 159 | As the SDRAM is being checked, the LEDS 1 to 8 turn off in sequence from 8 to 1. |
| 151 | 160 | |
| 152 | 2nd screen - | |
| 161 | 2nd screen - Grey | |
| 153 | 162 | "S.S.23 POWER ON TEST xxxx" (xxxx = numbers count up rapidly from 0000) |
| 154 | 163 | "(C) NAMCO " |
| 155 | 164 | " VER. 1.16" |
| 156 | 165 | As these checks happen, the LEDs 1 to 8 flash on/off |
| 157 | 166 | |
| 158 | 3rd screen - | |
| 167 | 3rd screen - Grey | |
| 159 | 168 | "S.S.23 POWER ON TEST xxxx" (xxxx = numbers count up rapidly from 0000) |
| 160 | 169 | "SUBCPU INITIALIZING .... " |
| 161 | 170 | "SUBCPU PROGRAM Ver. 0211 " |
| 162 | 171 | |
| 163 | 172 | and a PACMAN eating dots along the bottom of the screen from left to right. |
| 164 | 173 | As these checks happen, the LEDs 1 to 8 simultaneously flash on/off in various patterns. |
| 174 | The Sub CPU will initialize before the Pacman reaches half-way across the screen. | |
| 165 | 175 | |
| 166 | - On System23, the bootup sequence is shorter. The screen remains blank while the SDRAM is being checked. LEDS 1-8 turn off in sequence 8-1 | |
| 167 | After that, the bootup sequence is mostly the same as SS23. | |
| 176 | When the SUB-CPU connects there are numerous POST screens that test almost all of the main components. | |
| 168 | 177 | |
| 178 | On System23, the bootup sequence is shorter. The screen remains blank while the SDRAM is being checked. LEDS 1-8 turn off in sequence 8-1 | |
| 179 | The bank of 8 LEDs on the main board cycles from left to right to left repeatedly (almost all S23/SS23 games seem to do this in fact). | |
| 180 | After that, the bootup sequence is mostly the same as SS23. | |
| 181 | When the game is running some games just cycle the 8 LEDs left/right/left etc. Others cycle the LEDs in pairs just one LED position | |
| 182 | left/right/left etc. Those crazy Namco guys *really* like LEDs. | |
| 169 | 183 | |
| 184 | To skip the (long) POST, set DIP switch #2 of the 8-position DIP switch block to ON. As soon as the SUB-CPU connects the game will boot. | |
| 185 | However this only works if the program supports it. Most games just ignore the DIPs. | |
| 186 | ||
| 187 | ||
| 170 | 188 | PCB Layouts |
| 171 | 189 | ----------- |
| 172 | ||
| 173 | SYSTEM23 MAIN PCB 8660962302 8660971105 (8660961105) | |
| 190 | Rev 1 | |
| 191 | SYSTEM23 MAIN PCB 8660961103 (8660971103) This rev has J7/J8/J9/J10/J11 populated | |
| 192 | Rev 2 | |
| 193 | SYSTEM23 MAIN PCB 8660961105 (8660971105) | |
| 174 | 194 | |----------------------------------------------------------------------------| |
| 175 | | J5 | |
| 195 | | J5 J7 J8 | |
| 176 | 196 | | LED1-8 *R4543 *MAX734 ADM485JR | |
| 177 | 197 | | |-------| LED10-11 LC35256 CXA1779P *3414 *3414 | |
| 178 | 198 | | |H8/3002| *2061ASC-1 | |
| r7553 | r7554 | |
| 205 | 225 | | *KM681000 | |
| 206 | 226 | | |----------| |---------| |-------------| | |
| 207 | 227 | | |NKK | | | | | | |
| 208 | | |NR4650-13 | |
| 228 | | |NR4650-13B| | C361 | CY2291 | C412 | | | |
| 209 | 229 | |J14 | | | | | |J15| |
| 210 | 230 | | | | | | 14.31818MHz | | | |
| 211 | 231 | | |----------| |---------| PAL(1) |-------------| | |
| r7553 | r7554 | |
| 226 | 246 | --- |
| 227 | 247 | N341256 - NKK 32k x8 SRAM (x9, SOJ28) |
| 228 | 248 | LC35256 - Sanyo 32k x8 SRAM (SOP28) |
| 229 | KM416S1020 - Samsung 1M | |
| 249 | KM416S1020 - Samsung 16MBit | |
| 230 | 250 | M5M4V4265 - Mitsubishi 256k x16 DRAM (x2, TSOP40/44) |
| 231 | 251 | LC321664 - Sanyo 64k x16 EDO DRAM (SOJ40) |
| 232 | HM5216165 - Hitachi 1M | |
| 252 | HM5216165 - Hitachi 16MBit | |
| 233 | 253 | KM681000 - Samsung 128k x8 SRAM (x2, SOP32) |
| 234 | 254 | CY7C182 - Cypress 8k x9 SRAM (SOJ28) |
| 235 | 255 | |
| r7553 | r7554 | |
| 249 | 269 | |
| 250 | 270 | Other ICs |
| 251 | 271 | --------- |
| 252 | XC95108 - Xilinx XC95108 In-System Programmable CPLD (QFP100, labelled 'S23MA9B') | |
| 272 | XC95108 - Xilinx XC95108 In-System Programmable CPLD (QFP100) | |
| 273 | - labelled 'S23MA9' on Rev 1 | |
| 274 | - labelled 'S23MA9B' on Rev 2 | |
| 253 | 275 | DS8921 - National RS422/423 Differential Line Driver and Receiver Pair (SOIC8) |
| 254 | 276 | CXD1178Q - SONY CXD1178Q 8-bit RGB 3-channel D/A converter (QFP48) |
| 255 | 277 | PAL(1) - PALCE16V8H (PLCC20, stamped 'PAD23') |
| r7553 | r7554 | |
| 270 | 292 | |
| 271 | 293 | Misc |
| 272 | 294 | ---- |
| 273 | J18 - Connector for MSPM(FRA) PCB | |
| 274 | 295 | J5 - Connector for EMI PCB |
| 296 | J7/J8 - 15-pin VGA output connectors -\ | |
| 297 | J9/J10- Red/White Stereo Audio Output RCA connectors \ | |
| 298 | J11 - Standard USB connector (used on Motocross Go!) -/ Not populated on most PCBs | |
| 275 | 299 | J12 - 6-pin connector for In-System Programming of the XC95108 IC |
| 276 | 300 | J14 \ |
| 277 | J15 \ | |
| 278 | J16 \ | |
| 301 | J15 | | |
| 302 | J16 | | |
| 279 | 303 | J17 \ - Connectors for MEM(M) PCB |
| 304 | J18 - Connector for MSPM(FRA) PCB | |
| 280 | 305 | SW2 - 2 position DIP Switch |
| 281 | 306 | SW3 - 2 position DIP Switch |
| 282 | 307 | SW4 - 8 position DIP Switch |
| r7553 | r7554 | |
| 284 | 309 | |
| 285 | 310 | SystemSuper23 MAIN(1) PCB 8672960904 8672960104 (8672970104) |
| 286 | 311 | |----------------------------------------------------------------------------| |
| 287 | | J5 | |
| 312 | | J5 J7 J8 | |
| 288 | 313 | | LED1-8 *R4543 *MAX734 ADM485JR | |
| 289 | 314 | | |-------| LED10-11 LC35256 CXA1779P 3414 3414 | |
| 290 | 315 | | |H8/3002| *2061ASC-1 | |
| r7553 | r7554 | |
| 336 | 361 | |
| 337 | 362 | RAM |
| 338 | 363 | --- |
| 339 | N341256 - NKK 32K x8 SRAM (x5, SOJ28) | |
| 340 | LC35256 - Sanyo 32K x8 SRAM (SOP28) | |
| 341 | KM416S1020 - Samsung 16M SDRAM (x4, TSOP48) | |
| 342 | KM416V2540 - Samsung 256K x16 EDO DRAM (x2, TSOP40/44) | |
| 343 | LC321664 - Sanyo 64K x16 EDO DRAM (SOJ40) | |
| 344 | 71V124 - IDT 128K x8 SRAM (x2, SOJ32) | |
| 345 | CY7C1399 - Cypress 32K x8 SRAM (x4, SOJ28) | |
| 346 | CY7C182 - Cypress 8K x9 SRAM (SOJ28) | |
| 347 | M5M4V4265 - Mitsubishi 256K x16 DRAM (x2, TSOP40/44) | |
| 348 | HM5216165 - Hitachi 1M x16 SDRAM (x2, TSOP48) | |
| 349 | KM681000 - Samsung 128K x8 SRAM (x2, SOP32) | |
| 364 | N341256 - NKK 32k x8 SRAM (x5, SOJ28) | |
| 365 | LC35256 - Sanyo 32k x8 SRAM (SOP28) | |
| 366 | KM416S1020 - Samsung 16MBit SDRAM (x4, TSSOP50) | |
| 367 | KM416V2540 - Samsung 256k x16 EDO DRAM (x2, TSOP40/44) | |
| 368 | LC321664 - Sanyo 64k x16 EDO DRAM (SOJ40) | |
| 369 | 71V124 - IDT 128k x8 SRAM (x2, SOJ32) | |
| 370 | CY7C1399 - Cypress 32k x8 SRAM (x4, SOJ28) | |
| 371 | CY7C182 - Cypress 8k x9 SRAM (SOJ28) | |
| 372 | M5M4V4265 - Mitsubishi 256k x16 DRAM (x2, TSOP40/44) | |
| 350 | 373 | |
| 351 | 374 | Namco Customs |
| 352 | 375 | ------------- |
| 353 | 376 | C352 (QFP100) |
| 354 | 377 | C361 (QFP120) |
| 355 | C403 (QFP136) | |
| 356 | 378 | C404 (QFP208) |
| 357 | C412 (QFP256) | |
| 358 | 379 | C413 (QFP208) |
| 359 | 380 | C416 (QFP176) |
| 360 | 381 | C417 (QFP208) |
| r7553 | r7554 | |
| 366 | 387 | |
| 367 | 388 | Other ICs |
| 368 | 389 | --------- |
| 369 | XC95108 - Xilinx XC95108 In-System Programmable CPLD (QFP100, labelled 'S23MA9B') | |
| 370 | 390 | EPM7064 - Altera MAX EPM7064STC100-10 CPLD (TQFP100, labelled 'SS23MA4A') |
| 371 | 391 | DS8921 - National RS422/423 Differential Line Driver and Receiver Pair (SOIC8) |
| 372 | 392 | CXD1178Q - SONY CXD1178Q 8-bit RGB 3-channel D/A converter (QFP48) |
| 373 | PAL(1) - PALCE16V8H (PLCC20, stamped 'PAD23') | |
| 374 | PAL(2) - PALCE22V10H (PLCC28, stamped 'S23MA5') | |
| 375 | PAL(3) - PALCE22V10H (PLCC28, stamped 'SS23MA6B') | |
| 376 | 393 | PAL(1) - PALCE16V8H (PLCC20, stamped 'SS23MA1B') |
| 377 | 394 | PAL(2) - PALCE22V10H (PLCC28, stamped 'SS23MA2A') |
| 378 | 395 | PAL(3) - PALCE22V10H (PLCC28, stamped 'SS23MA3A') |
| r7553 | r7554 | |
| 387 | 404 | CY2291 - Cypress CY2291 Three-PLL General Purpose EPROM Programmable Clock Generator (SOIC20) |
| 388 | 405 | 2061ASC-1- IC Designs 2061ASC-1 clock generator IC (SOIC16, also found on Namco System 11 PCBs) |
| 389 | 406 | R4543 - EPSON Real Time Clock Module (SOIC14) |
| 390 | IDT7200 - Integrated Devices Technology IDT7200 256 x9 CMOS Asynchronous FIFO | |
| 391 | 407 | |
| 392 | 408 | Misc |
| 393 | 409 | ---- |
| 410 | J5 - Connector for EMI PCB | |
| 411 | J7/J8 - 15-pin VGA output connectors -\ | |
| 412 | J9/J10- Red/White Stereo Audio Output RCA connectors \ | |
| 413 | J11 - Standard USB connector -/ Not populated on most PCBs | |
| 414 | J14 \ | |
| 415 | J15 | | |
| 416 | J16 | | |
| 417 | J17 \ - Connectors for MEM(M) PCB | |
| 394 | 418 | J18 - Connector for MSPM(FRA) PCB |
| 419 | SW2 - 2 position DIP Switch | |
| 420 | SW3 - 2 position DIP Switch | |
| 421 | SW4 - 8 position DIP Switch | |
| 422 | ||
| 423 | ||
| 424 | System23Evolution2 MAIN PCB 8902960103 (8902970103) | |
| 425 | |----------------------------------------------------------------------------| | |
| 426 | | J5 J7 3V_BATT | | |
| 427 | | LED1-8 ADM485 *R4543 | | |
| 428 | | |-------| LED10-11 LC35256 CXD1178Q | | |
| 429 | | |H8/3002| *2061ASC-1 | | |
| 430 | | | | SW4 UDA1320 UDA1320 | | |
| 431 | | |-------| DS8921 | | |
| 432 | |J18 | | |
| 433 | | SW3 14.7456MHz |----| |----| | | |
| 434 | | |------| |----| |---------| |C435| |C435| | | |
| 435 | | N341256 | C452 | |C422| | | |----| |----| | | |
| 436 | | | | |----| | C444 | | | |
| 437 | | N341256 | | | | XILINX XILINX |---------| | | |
| 438 | | |------| | | XC9572XL XC9536XL| | | | |
| 439 | | |----| *PST575 |---------| | C451 | | | |
| 440 | | |C352| CY7C182 | | | | |
| 441 | | |----| LED9 | | | | |
| 442 | | |---------| | | |
| 443 | | KM432S2030 KM416V2540 | | |
| 444 | | | | |
| 445 | |J16 J17| | |
| 446 | | KM432S2030 |---------| |---------| N341256 | | |
| 447 | | IS61LV256 | | | | | | |
| 448 | | | C421 | | C404 | N341256 | | |
| 449 | | |---------| IS61LV256 | | | | | | |
| 450 | | | | | | | | N341256 | | |
| 451 | | | C450 | |---------| |---------| | | |
| 452 | | | | | | |
| 453 | | | | KM416V2540 | | |
| 454 | | |---------| SW2 LC321664 | | |
| 455 | | *PST575 | | |
| 456 | | *KM416S1120 | | |
| 457 | | |----------| |---------| |-------------| | | |
| 458 | | |IDT | | | | | | | |
| 459 | | |NR4650-200| | C361 | CY2291 | C447 | | | |
| 460 | |J14 | | | | | |J15| | |
| 461 | | | | | | 14.31818MHz | | | | |
| 462 | | |----------| |---------| PAL |-------------| | | |
| 463 | | *KM416S1120 | | |
| 464 | | 71V124 71V124 | | |
| 465 | |----------------------------------------------------------------------------| | |
| 466 | Notes: | |
| 467 | * - These parts are underneath the PCB. | |
| 468 | ||
| 469 | Main Parts List: | |
| 470 | ||
| 471 | CPU | |
| 472 | --- | |
| 473 | NKK NR4650 - R4600-based 64bit RISC CPU (Main CPU, QFP208, clock input source = CY2291) | |
| 474 | H8/3002 - Hitachi H8/3002 HD6413002F17 (Sound CPU, QFP100, running at 14.7456MHz) | |
| 475 | ||
| 476 | RAM | |
| 477 | --- | |
| 478 | N341256 - NKK 32k x8 SRAM (x5, SOJ28) | |
| 479 | LC35256 - Sanyo 32k x8 SRAM (SOP28) | |
| 480 | KM432S2030 - Samsung 32MBit SDRAM (x2, TSSOP86) | |
| 481 | KM416S1120 - Samsung 16MBit SDRAM (x2, TSSOP50) | |
| 482 | KM416V2540 - Samsung 256k x16 EDO DRAM (x2, TSOP40/44) | |
| 483 | LC321664 - Sanyo 64k x16 EDO DRAM (SOJ40) | |
| 484 | 71V124 - IDT 128k x8 SRAM (x2, SOJ32) | |
| 485 | ISS61LV256 - ISSI 32k x8 SRAM (x2, SOJ28) | |
| 486 | CY7C182 - Cypress 8k x9 SRAM (SOJ28) | |
| 487 | M5M4V4265 - Mitsubishi 256k x16 DRAM (x2, TSOP40/44) | |
| 488 | ||
| 489 | Namco Customs | |
| 490 | ------------- | |
| 491 | C352 (QFP100) | |
| 492 | C361 (QFP120) | |
| 493 | C404 (QFP208) | |
| 494 | C421 (QFP208) | |
| 495 | C422 (QFP64) | |
| 496 | C435 (x2, QFP144) | |
| 497 | C444 (QFP136) | |
| 498 | C447 (QFP256) | |
| 499 | C450 (BGAxxx) | |
| 500 | C451 (QFP208) | |
| 501 | C452 (QFP176) | |
| 502 | ||
| 503 | Other ICs | |
| 504 | --------- | |
| 505 | XC9536 - XILINX XC9536XL CPLD (TQFP64, labelled 'S23EV2.1') | |
| 506 | XC9572 - XILINX XC9536XL CPLD (TQFP100, labelled 'S23EV2.2') | |
| 507 | DS8921 - National RS422/423 Differential Line Driver and Receiver Pair (SOIC8) | |
| 508 | CXD1178Q - SONY CXD1178Q 8-bit RGB 3-channel D/A converter (QFP48) | |
| 509 | PAL - PALCE16V8H (PLCC20, stamped 'PAD23') | |
| 510 | PST575 - PST575 System Reset IC (SOIC4) | |
| 511 | ADM485 - Analog Devices Low Power EIA RS485 transceiver (SOIC8) | |
| 512 | CY2291 - Cypress CY2291 Three-PLL General Purpose EPROM Programmable Clock Generator (SOIC20) | |
| 513 | 2061ASC-1- IC Designs 2061ASC-1 clock generator IC (SOIC16, also found on Namco System 11 PCBs) | |
| 514 | R4543 - EPSON Real Time Clock Module (SOIC14) | |
| 515 | UDA1320 - Philips UDA1320 Low-cost stereo filter DAC (SOIC16) | |
| 516 | ||
| 517 | Misc | |
| 518 | ---- | |
| 395 | 519 | J5 - Connector for EMI PCB |
| 520 | J7 - 15-pin VGA output connector | |
| 396 | 521 | J14 \ |
| 397 | J15 \ | |
| 398 | J16 \ | |
| 522 | J15 | | |
| 523 | J16 | | |
| 399 | 524 | J17 \ - Connectors for MEM(M) PCB |
| 525 | J18 - Connector for MSPM(FRC) PCB | |
| 400 | 526 | SW2 - 2 position DIP Switch |
| 401 | 527 | SW3 - 2 position DIP Switch |
| 402 | 528 | SW4 - 8 position DIP Switch |
| 403 | 529 | |
| 404 | 530 | |
| 531 | SystemSuper23 Gmen PCB 8672960502 (8672970502) | |
| 532 | Sticker: Gmen (GTR) PCB | |
| 533 | |---------------------------------------------------| | |
| 534 | | J8 LED4 J6 J5 | | |
| 535 | | 20.25MHz 82AF LT1635 | | |
| 536 | | VXP3220A 611_803 24.576MHz | | |
| 537 | | |-----| | | |
| 538 | | |FUJI | | | |
| 539 | | |-----| |MD8402A | | |
| 540 | | |FUJI | |-----| | | |
| 541 | | |MD8412A | | |
| 542 | | |-----| | | |
| 543 | | | | |
| 544 | | | | |
| 545 | | | | |
| 546 | | TSOP48 | | |
| 547 | |------------------------| | | |
| 548 | | N341256 N341256 N341024 | | |
| 549 | | HM5118165 HM5118165 | | |
| 550 | | | | |
| 551 | | |---------| |---(1)--| | | |
| 552 | |J10 | | |ALTERA | N341024 J17| | |
| 553 | | | C446 | |--------| |MAX | | | |
| 554 | | | | |ALTERA | |EPM7064 | | | |
| 555 | | | | |FLEX | |--------| | | |
| 556 | | |---------| |EPM8282 | LED3 |----------| | | |
| 557 | | |--------| |ALTERA | | | |
| 558 | | |FLEX | | | |
| 559 | | |EPM8452 | | | |
| 560 | | | | | | |
| 561 | | |-------| |----------| | | |
| 562 | | | SH2 | LED2 | | |
| 563 | | | | | | |
| 564 | | 28.7MHz |-------| | | |
| 565 | |J11 3771 KM416S1020 N341024 J16| | |
| 566 | | HD63B50 | | |
| 567 | | 40MHz | | |
| 568 | | KM416S1020 SW3 | | |
| 569 | | |--(2)--| N341024 | | |
| 570 | | |ALTERA | | | |
| 571 | | |EPM7064| | | |
| 572 | | |-------| LT1180 LED1 LED5-12 | | |
| 573 | |----------------------------------------------------------------------------| | |
| 574 | Notes: | |
| 575 | This board is used only on Gunmen Wars to control the CCD camera. The main board does it's usual POST | |
| 576 | then the board fires up, LED1 lights red and the LEDs 5-12 go crazy pulsing left to right from the middle outwards. | |
| 577 | The main board uploads a loader program, then the Main SH2 program. After completion LED 3 lights green and then..... | |
| 578 | it doesn't work. LED 2 lights orange for a second then extinguishes, then the main board resets :-/ | |
| 579 | ||
| 580 | SH2 - Hitachi HD6417604 SH2 CPU (QFP144, clock input 28.7MHz) | |
| 581 | N341024 - NKK 128k x8 SRAM (x4, SOP32) | |
| 582 | N341256 - NKK 32k x8 SRAM (x2, SOP28) | |
| 583 | KM416S1020 - Samsung 16MBit SDRAM (x2, TSSOP50). Also compatible with MB811181622 | |
| 584 | HM5118165 - Hitachi 16MBit SDRAM (x2, TSSOP44/50) | |
| 585 | C446 - Namco Custom IC (QFP160) | |
| 586 | TSOP48 - Not-populated position for a 29F400 512k x8 TSOP48 flash ROM | |
| 587 | 3771 - Fujitsu MB3771 System Reset IC (SOIC4) | |
| 588 | MD8402 - Fuji MD8402A IEEE 1394 'Firewire' Physical Channel Interface IC (TQFP100) | |
| 589 | MD8412 - Fuji MD8412A IEEE 1394 'Firewire' Link Layer Controller IC (TQFP100) | |
| 590 | VXP3220A - Micronis Intermetall VXP3220A Video Pixel Decoder IC (PLCC44) | |
| 591 | HD63B50 - Hitachi HD63B50 Asynchronous Communications Interface Adapter IC (SOP24) | |
| 592 | LT1180 - Linear Technology LT1180A Low Power 5V RS232 Dual Driver/Receiver Pair with 0.1mF Capacitors | |
| 593 | EPM7064(1) - Altera MAX EPM7064 CPLD labelled 'SS23GM1A' (TQFP100) | |
| 594 | EPM7064(2) - Altera EPM7064 CPLD labelled 'SS23GM2A' (TQFP44) | |
| 595 | EPM8452 - Altera FLEX EPM8452 CPLD (no label, QFP160) | |
| 596 | EPM8282 - Altera FLEX EPM8282 CPLD (no label, TQFP100) | |
| 597 | 82AF - National 82AF General Purpose EMI Reduction IC (SOIC8) | |
| 598 | LT1635 - Linear Technology LT1635 Micropower Rail-to-Rail Op Amp and Reference Buffer (SOIC8) | |
| 599 | 611_803 - ? (SOIC8) | |
| 600 | J5/J6 - IEEE 1394 'Firewire' connectors | |
| 601 | J8 - Connector for EMI PCB | |
| 602 | J10 - Labelled 'WAVE' \ | |
| 603 | J11 - Labelled 'SYS23BUS' | Connectors for MEM(M) PCB | |
| 604 | J16 - Labelled 'TEXTURE' | i.e. The ROM board sits on top of this board | |
| 605 | J17 - Labelled 'POINT' / | |
| 606 | SW3 - 8 position DIP Switch | |
| 607 | ||
| 608 | ||
| 405 | 609 | Program ROM PCB |
| 406 | 610 | --------------- |
| 407 | ||
| 611 | Type 1: | |
| 408 | 612 | MSPM(FRA) PCB 8699017500 (8699017400) |
| 409 | 613 | |--------------------------| |
| 410 | 614 | | J1 | |
| r7553 | r7554 | |
| 422 | 626 | |
| 423 | 627 | Games that use this PCB include... |
| 424 | 628 | |
| 425 | Game Code and revision | |
| 426 | -------------------------------- | |
| 427 | Time Crisis 2 TSS3 Ver.B | |
| 629 | Game Code and revision | |
| 630 | ---------------------------------- | |
| 631 | Time Crisis 2 TSS2 Ver.B | |
| 632 | Time Crisis 2 TSS3 Ver.B | |
| 633 | Gunmen Wars GM1 Ver.A | |
| 634 | Downhill Bikers DH3 Ver.A | |
| 635 | Motocross Go! MG3 Ver.A | |
| 636 | Panic Park PNP2 Ver.A | |
| 428 | 637 | |
| 429 | ||
| 638 | Type 2: | |
| 430 | 639 | MSPM(FRA) PCB 8699017501 (8699017401) |
| 431 | 640 | |--------------------------| |
| 432 | 641 | | J1 | |
| r7553 | r7554 | |
| 444 | 653 | |
| 445 | 654 | Games that use this PCB include... |
| 446 | 655 | |
| 447 | Game Code and revision | |
| 448 | -------------------------------- | |
| 449 | GP500 5GP3 Ver.C (for Super System 23) | |
| 450 | Time Crisis 2 TSS4 Ver.A (for Super System 23) | |
| 451 | ||
| 452 | Other games dumps with unknown PCB information.... | |
| 453 | ||
| 454 | 656 | Game Code and revision |
| 455 | 657 | ---------------------------------- |
| 658 | GP500 5GP3 Ver.C (for Super System 23) | |
| 659 | Time Crisis 2 TSS4 Ver.A (for Super System 23) | |
| 456 | 660 | Final Furlong 2 FFS1 Ver.? |
| 457 | 661 | Final Furlong 2 FFS2 Ver.? |
| 458 | 662 | |
| 663 | Type 3: | |
| 664 | MSPM(FRC) PCB 8699019800 (8699019700) | |
| 665 | |--------------------------| | |
| 666 | | J1 | | |
| 667 | | | | |
| 668 | | IC1 IC2 IC4 | | |
| 669 | | | | |
| 670 | | | | |
| 671 | | IC3 | | |
| 672 | |--------------------------| | |
| 673 | Notes: | |
| 674 | J1 - Connector to plug into Main PCB | |
| 675 | IC1 - Sound Program (Fujitsu 29F400T 4MBit FlashROM, TSOP48) | |
| 676 | IC3 - a *very tiny* transistor marked 'H5' | |
| 677 | IC2 \ | |
| 678 | IC4 / Main Program (Intel DA28F640J5 64MBit FlashROM, SSOP56) | |
| 459 | 679 | |
| 680 | Games that use this PCB include... | |
| 681 | ||
| 682 | Game Code and revision Notes | |
| 683 | ----------------------------------------------------------------------- | |
| 684 | Crisis Zone CSZO3 Ver.B Serialsed ROMs, IC2 not populated | |
| 685 | ||
| 686 | ||
| 460 | 687 | ROM PCB |
| 461 | 688 | ------- |
| 462 | 689 | |
| 463 | 690 | Printed on the PCB - 8660960601 (8660970601) SYSTEM23 MEM(M) PCB |
| 464 | Sticker ( | |
| 691 | Sticker ( | |
| 465 | 692 | Sticker (Time Crisis 2) - 8660962302 |
| 466 | Sticker ( | |
| 693 | Sticker (Crisis Z | |
| 467 | 694 | |----------------------------------------------------------------------------| |
| 468 | 695 | | KEYCUS MTBH.2M CGLL.4M CGLL.5M CCRL.7M PAL(3) | |
| 469 | 696 | | | |
| r7553 | r7554 | |
| 491 | 718 | |----------------------------------------------------------------------------| |
| 492 | 719 | Notes: |
| 493 | 720 | J1 \ |
| 494 | J2 \ | |
| 495 | J3 \ | |
| 721 | J2 | | |
| 722 | J3 | | |
| 496 | 723 | J4 \ - Connectors to main PCB |
| 497 | 724 | JP1 - ROM size configuration jumper for WAVE ROMs. Set to 64M, alt. setting 32M |
| 498 | 725 | JP2 - ROM size configuration jumper for CG ROMs. Set to 64M, alt. setting 32M |
| r7553 | r7554 | |
| 513 | 740 | Note this PAL is not populated when used on Super System 23 |
| 514 | 741 | |
| 515 | 742 | All ROMs are SOP44 MaskROMs |
| 516 | Note: ROMs at locations 7M, 7K, 5M, 5K, 5J & 5F are not included in the archive since they're copies of | |
| 517 | other ROMs which are included in the archive. However, they are populated on the PCB. | |
| 743 | Note: ROMs at locations 7M, 7K, 5M, 5K, 5J & 5F are copies of identical ROMs on the PCB at locations 7F, 7E, 4M, 4K, 4J, 4F | |
| 518 | 744 | Each ROM is stamped with the Namco Game Code, then the ROM-use code (such as CCRL, CCRH, PT* or MT*). |
| 519 | 745 | |
| 520 | 746 | Game |
| 521 | 747 | Game Code Keycus Notes |
| 522 | --------------------------------------------------------- | |
| 523 | GP500 5GP1 KC029 - | |
| 524 | Time Crisis 2 TSS1 KC010 3A and 3C not populated. i.e. PT3L & PT3H is not used. | |
| 748 | ----------------------------------------------------------------------- | |
| 749 | 500GP 5GP1 KC029 - | |
| 750 | Crisis Zone CSZ1 KC039 - | |
| 751 | Downhill Bikers DH1 KC016 3A, 3C, 2M and 2F not populated. | |
| 525 | 752 | Final Furlong 2 FFS1 KC??? - |
| 753 | Gunmen Wars GM1 KC018 3A, 3C, 4A, 4C, 2A, 2F and 2M not populated. | |
| 754 | Motocross Go! MG1 KC??? 3A, 3C, 4A, 4C, 4F and 7F not populated. | |
| 755 | Panic Park PNP1 KC015 3A, 3C, 4A, 4C, 2M and 2F not populated. | |
| 756 | Time Crisis 2 TSS1 KC010 3A and 3C not populated. | |
| 526 | 757 | |
| 527 | ||
| 528 | 758 | I/O PCBs |
| 529 | 759 | -------- |
| 530 | 760 | |
| 531 | 761 | FCA PCB 8662969102 (8662979102) |
| 532 | (Used with | |
| 762 | (Used with | |
| 533 | 763 | |---------------------------------------------------| |
| 534 | 764 | | J101 J106 | |
| 535 | 765 | | 4.9152MHz | |
| r7553 | r7554 | |
| 549 | 779 | J106 - 30 pin flat cable connector |
| 550 | 780 | JP1 - 3 pin jumper, set to 'NORM'. Alt setting 'WR' |
| 551 | 781 | 3771 - Fujitsu MB3771 System Reset IC (SOIC8) |
| 552 | PIC16F84 - Microchip PIC16F84 Programmable Interrupt Controller stamped 'CAP10' (SOIC20) | |
| 553 | MCU - Fujitsu MB90F574 Microcontroller, stamped 'FCAF10' (QFP120) | |
| 782 | PIC16F84 - Microchip PIC16F84 PIC (SOIC20) | |
| 783 | - For 500 GP stamped 'CAP10' | |
| 784 | - For unknown stamped 'CAP11' | |
| 785 | MCU - Fujitsu MB90F574 Microcontroller (QFP120) | |
| 786 | - For 500 GP stamped 'FCAF10' | |
| 787 | - For unknown stamped 'FCAF11' | |
| 554 | 788 | ADM485 - Analog Devices ADM485 +5V Low Power EIA RS-485 Transceiver (SOIC8) |
| 555 | 789 | |
| 556 | I/O Boards for Gun games | |
| 790 | ||
| 791 | ASCA-3A PCB 8662968301 (8662978301) | |
| 792 | This is used with Motocross Go! | |
| 793 | It's identical to the one shown below (ASCA-4A) but the ROM is a surface mounted | |
| 794 | PLCC32 instead of a socketed DIP32 chip. Everything else is identical. | |
| 795 | ||
| 796 | ASCA-4A PCB 8662968401 (8662978401) | |
| 797 | (Used with most games and [for testing purposes] is able to boot all S23/SS23/Evolution2 games) | |
| 798 | Sticker for Gunmen Wars: ASCA5 PCB 86629615 | |
| 799 | |---------------------------------------------------| | |
| 800 | | PST592 62256 | | |
| 801 | | 14.7460MHz |-------| | | |
| 802 | | | C78 | | | |
| 803 | | LB1235 DSW(4) | | 27C1001 | | |
| 804 | | LB1233 LB1235 |-------| | | |
| 805 | | | | |
| 806 | | |------| ADM485 | | |
| 807 | | |ALTERA| | | |
| 808 | | |EPM7096 | | |
| 809 | | J101 |------| J102 J103 | | |
| 810 | |---------------------------------------------------| | |
| 811 | Notes: | |
| 812 | J101 - 64 pin connector for power + inputs. This joins to another PCB at 90 degrees containing | |
| 813 | a bunch of connectors named 'ASCA 4B PCB 8662968702 (8662978702)'. This is where ALL of the | |
| 814 | inputs/outputs for game control and inter-PCB communication are connected | |
| 815 | PST592 - System Reset IC (SOIC4) | |
| 816 | C78 - Hitachi HD643334 H8/3334 Microcontroller rebadged as 'C78'. Clock input 14.746MHz (PLCC84) | |
| 817 | 27C1001 - 128k x8 EPROM (DIP32) | |
| 818 | - For Downhill Bikers labelled 'ASC3 IO-C' | |
| 819 | - For Panic Park labelled 'ASC3 IO-C' | |
| 820 | - For Gunmen Wars labelled 'ASC5 IO-A' | |
| 821 | 62256 - 32k x8 SRAM (SOP28) | |
| 822 | EPM7096 - Altera EPM7096 CPLD with sticker 'ASCA,DR1' (PLCC68) | |
| 823 | ADM485 - Analog Devices ADM485 +5V Low Power EIA RS-485 Transceiver (SOIC8) | |
| 824 | J102/J103- Standard USB A and B connectors. These are not populated on most games, but are populated for use with Motocross Go! | |
| 825 | ||
| 826 | ||
| 827 | I/O Boards for gun games | |
| 557 | 828 | ------------------------ |
| 558 | 829 | |
| 559 | 830 | Type 1: |
| r7553 | r7554 | |
| 575 | 846 | |-----------------------------------------| |
| 576 | 847 | Notes: |
| 577 | 848 | TSSIOPROG - Atmel AT29C020 EEPROM stamped 'TSSIOP8' (PLCC32) |
| 578 | C78 - Namco Custom C78, actually a rebadged Hitachi HD643334 MCU (PLCC84) | |
| 849 | C78 - Namco Custom C78, actually a rebadged Hitachi HD643334 MCU, clock input 14.746MHz (PLCC84) | |
| 579 | 850 | TSSIOPLD - Altera MAX EPM7128ELC84 CPLD with label 'TSSIOPLD' (PLCC84) |
| 580 | SLA4060 - | |
| 581 | J1 - 12 position connector for power and I/O | |
| 582 | J3 - 12 position connector for buttons and gun connection | |
| 851 | SLA4060 - Sanken Electric SLA4060 NPN general purpose darlington transistor (used to drive the kick-back solenoid in the gun) | |
| 852 | PST592 - System Reset IC (SOIC4) | |
| 853 | J1 - 12 position connector for power and I/O communication | |
| 854 | J3 - 12 position connector for gun connection (trigger/buttons/optical signal/power) | |
| 583 | 855 | J4 - not used? |
| 584 | 856 | J5 - 6 position connector for network |
| 585 | 857 | J601 - not used? |
| r7553 | r7554 | |
| 639 | 911 | |
| 640 | 912 | This board is used on Crisis Zone (System 23 Evolution2) and Time Crisis 3 (System 246) |
| 641 | 913 | Note both games use a CCD camera for the gun sensor. |
| 642 | ||
| 914 | -------------- | |
| 643 | 915 | |
| 644 | /* | |
| 645 | Rapid River | |
| 646 | Namco, 1997 | |
| 647 | 916 | |
| 648 | This game runs on hardware called "GORGON". It appears to be similar to | |
| 649 | System 23 but the PCBs are slightly larger. | |
| 917 | Namco Gorgon-based games | |
| 918 | ------------------------ | |
| 650 | 919 | |
| 920 | Rapid River, Final Furlong (both Namco, 1997) | |
| 921 | ||
| 922 | These games run on hardware called "GORGON". It appears to have similar | |
| 923 | capabilities to System 23 but like Super System 22 has sprites also. | |
| 924 | (System 23 doesn't have sprites). The PCBs are about two times larger | |
| 925 | than System 23. | |
| 926 | ||
| 651 | 927 | The system comprises Main PCB, ROM PCB and I/O PCB all located inside |
| 652 | 928 | a metal box with 3 separate power supplies for 5V, 12V and 3.3V. Main |
| 653 | 929 | input power is 115V. |
| 654 | ||
| 930 | R | |
| 655 | 931 | sideways (moves left/right). |
| 656 | 932 | The rotation action is done with a 5K potentiometer whereby the thrust |
| 657 | 933 | is achieved by moving the pot from full left to full right continuously. |
| r7553 | r7554 | |
| 663 | 939 | a warning if it's not working. Pressing START allows the game to continue |
| 664 | 940 | and function normally without the seat movement. |
| 665 | 941 | |
| 942 | The other game on this system (Final Furlong) and is a horse racing game. | |
| 943 | To control the horse you rock it forwards and backwards continually (it's very tiring | |
| 944 | to play this game). | |
| 945 | This would activate possibly one or two 5K potentiometers inside the horse body. | |
| 946 | Just like a real horse you need to control the speed so your horse lasts the entire race. | |
| 947 | If you rock too much, a message on screen says 'Too Fast'. To steer the horse turn the | |
| 948 | head sideways using the reins. There would be another 5K potentiometer in the head | |
| 949 | to activate the turning direction. | |
| 666 | 950 | |
| 951 | ||
| 667 | 952 | Main PCB |
| 668 | 953 | -------- |
| 669 | 954 | |
| r7553 | r7554 | |
| 703 | 988 | | 2061ASC |C416 | |------| | | | | |---------| |---------| | |
| 704 | 989 | | 14.7456MHz | | |--------| |------| | | |NKK | | |
| 705 | 990 | |PAL |-----| |------| |------| D4516161 | C413 | |NR4650 | | |
| 706 | | |H8/ | |C361 | D4516161 | | |LQF-13 | |
| 991 | | |H8/ | |C361 | D4516161 | | |LQF-13B | | | |
| 707 | 992 | | |3002 | | |LC321664 | | | | | |
| 708 | 993 | | J10 |-----| |------| J8 |---------| |---------| | |
| 709 | 994 | |------------------------------------------------------------------------------------------------------| |
| r7553 | r7554 | |
| 778 | 1063 | |
| 779 | 1064 | Game Code and revision |
| 780 | 1065 | -------------------------------- |
| 1066 | Rapid River RD2 Ver.C | |
| 781 | 1067 | Rapid River RD3 Ver.C |
| 782 | 1068 | Final Furlong FF2 Ver.A |
| 783 | 1069 | |
| r7553 | r7554 | |
| 867 | 1153 | Notes: |
| 868 | 1154 | IC1 - Atmel AT29C020 2MBit EEPROM labelled 'ASCA1 I/O-A' (PLCC32) |
| 869 | 1155 | C78 - Namco Custom MCU, positively identified as a Hitachi H8/3334 (PLCC84) |
| 870 | EPM7064 - Altera EPM7064LC68-15 | |
| 1156 | EPM7064 - Altera EPM7064LC68-15 | |
| 871 | 1157 | PST592 - System Reset IC (SOIC4) |
| 872 | 1158 | ADM485 - Analog Devices +ADM485 5V Low Power EIA RS-485 Transceiver (SOIC8) |
| 873 | 1159 | MB87078 - Fujitsu MB87078 Electronic Volume Control IC (SOIC24) |
| r7553 | r7554 | |
| 876 | 1162 | J102 - 50 pin flat cable connector for filter board |
| 877 | 1163 | J104 - 8 pin power connector (+5V, +12V, +3.3V) |
| 878 | 1164 | J105 - 64 pin connector for connection of Main PCB |
| 1165 | ||
| 879 | 1166 | */ |
| 880 | 1167 | |
| 881 | 1168 | #include "emu.h" |
| 882 | 1169 | #include "cpu/mips/mips3.h" |
| 883 | 1170 | #include "cpu/h83002/h8.h" |
| 1171 | #include "cpu/sh2/sh2.h" | |
| 884 | 1172 | #include "sound/c352.h" |
| 885 | 1173 | |
| 886 | 1174 | #define S23_BUSCLOCK (66664460/2) // 33 MHz CPU bus clock / input, somehow derived from 14.31721 MHz crystal |
| r7553 | r7554 | |
| 891 | 1179 | |
| 892 | 1180 | //static int ss23_vstat = 0, hstat = 0, vstate = 0; |
| 893 | 1181 | static tilemap_t *bgtilemap; |
| 894 | static UINT32 *namcos23_textram, *namcos23_shared_ram; | |
| 1182 | static UINT32 *namcos23_textram, *namcos23_shared_ram, *gmen_sh2_shared; | |
| 895 | 1183 | static UINT32 *namcos23_charram; |
| 896 | 1184 | static UINT8 namcos23_jvssense; |
| 897 | 1185 | static INT32 has_jvsio; |
| r7553 | r7554 | |
| 913 | 1201 | static UINT16 c421_sram[0x8000]; |
| 914 | 1202 | static UINT32 c421_adr = 0; |
| 915 | 1203 | |
| 1204 | static INT16 s23_c422_regs[0x10]; | |
| 1205 | static int s23_subcpu_running; | |
| 916 | 1206 | |
| 917 | 1207 | static UINT16 nthword( const UINT32 *pSource, int offs ) |
| 918 | 1208 | { |
| r7553 | r7554 | |
| 932 | 1222 | SET_TILE_INFO( 0, data&0x03ff, data>>12, TILE_FLIPYX((data&0x0c00)>>10) ); |
| 933 | 1223 | } /* TextTilemapGetInfo */ |
| 934 | 1224 | |
| 935 | static READ32_HANDLER( namcos23_textram_r ) | |
| 936 | { | |
| 937 | return namcos23_textram[offset]; | |
| 938 | } | |
| 939 | ||
| 940 | 1225 | static WRITE32_HANDLER( namcos23_textram_w ) |
| 941 | 1226 | { |
| 942 | 1227 | COMBINE_DATA( &namcos23_textram[offset] ); |
| r7553 | r7554 | |
| 951 | 1236 | tilemap_set_transparent_pen(bgtilemap, 0xf); |
| 952 | 1237 | } |
| 953 | 1238 | |
| 954 | #if 0 | |
| 955 | static double | |
| 956 | Normalize( UINT32 data ) | |
| 957 | { | |
| 958 | data &= 0xffffff; | |
| 959 | if( data&0x800000 ) | |
| 960 | { | |
| 961 | data |= 0xff000000; | |
| 962 | } | |
| 963 | return (INT32)data; | |
| 964 | } | |
| 965 | ||
| 966 | static void | |
| 967 | DrawLine( bitmap_t *bitmap, int x0, int y0, int x1, int y1 ) | |
| 968 | { | |
| 969 | if( x0>=0 && x0<bitmap->width && | |
| 970 | x1>=0 && x1<bitmap->width && | |
| 971 | y0>=0 && y0<bitmap->height && | |
| 972 | y1>=0 && y1<bitmap->height ) | |
| 973 | { | |
| 974 | int sx,sy,dy; | |
| 975 | if( x0>x1 ) | |
| 976 | { | |
| 977 | int temp = x0; | |
| 978 | x0 = x1; | |
| 979 | x1 = temp; | |
| 980 | ||
| 981 | temp = y0; | |
| 982 | y0 = y1; | |
| 983 | y1 = temp; | |
| 984 | } | |
| 985 | ||
| 986 | if( x1>x0 ) | |
| 987 | { | |
| 988 | sy = y0<<16; | |
| 989 | dy = ((y1-y0)<<16)/(x1-x0); | |
| 990 | for( sx=x0; sx<x1; sx++ ) | |
| 991 | { | |
| 992 | UINT16 *pDest = BITMAP_ADDR16(bitmap, sy>>16, 0); | |
| 993 | pDest[sx] = 1; | |
| 994 | sy += dy; | |
| 995 | } | |
| 996 | } | |
| 997 | } | |
| 998 | } /* DrawLine */ | |
| 999 | ||
| 1000 | static void | |
| 1001 | DrawPoly( bitmap_t *bitmap, const UINT32 *pSource, int n, int bNew ) | |
| 1002 | { | |
| 1003 | UINT32 flags = *pSource++; | |
| 1004 | UINT32 unk = *pSource++; | |
| 1005 | UINT32 intensity = *pSource++; | |
| 1006 | double x[4],y[4],z[4]; | |
| 1007 | int i; | |
| 1008 | if( bNew ) | |
| 1009 | { | |
| 1010 | mame_printf_debug( "polydata: 0x%08x 0x%08x 0x%08x\n", flags, unk, intensity ); | |
| 1011 | } | |
| 1012 | for( i=0; i<n; i++ ) | |
| 1013 | { | |
| 1014 | x[i] = Normalize(*pSource++); | |
| 1015 | y[i] = Normalize(*pSource++); | |
| 1016 | z[i] = Normalize(*pSource++); | |
| 1017 | ||
| 1018 | if( bNew ) | |
| 1019 | { | |
| 1020 | mame_printf_debug( "\t(%f,%f,%f)\n", x[i], y[i], z[i] ); | |
| 1021 | } | |
| 1022 | } | |
| 1023 | for( i=0; i<n; i++ ) | |
| 1024 | { | |
| 1025 | #define KDIST 0x400 | |
| 1026 | int j = (i+1)%n; | |
| 1027 | double z0 = z[i]+KDIST; | |
| 1028 | double z1 = z[j]+KDIST; | |
| 1029 | ||
| 1030 | if( z0>0 && z1>0 ) | |
| 1031 | { | |
| 1032 | int x0 = bitmap->width*x[i]/z0 + bitmap->width/2; | |
| 1033 | int y0 = bitmap->width*y[i]/z0 + bitmap->height/2; | |
| 1034 | int x1 = bitmap->width*x[j]/z1 + bitmap->width/2; | |
| 1035 | int y1 = bitmap->width*y[j]/z1 + bitmap->height/2; | |
| 1036 | if( bNew ) | |
| 1037 | { | |
| 1038 | mame_printf_debug( "[%d,%d]..[%d,%d]\n", x0,y0,x1,y1 ); | |
| 1039 | } | |
| 1040 | DrawLine( bitmap, x0,y0,x1,y1 ); | |
| 1041 | } | |
| 1042 | } | |
| 1043 | } | |
| 1044 | #endif | |
| 1045 | ||
| 1046 | 1239 | static VIDEO_UPDATE( ss23 ) |
| 1047 | 1240 | { |
| 1048 | 1241 | bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine)); |
| 1049 | 1242 | bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); |
| 1050 | 1243 | |
| 1051 | 1244 | tilemap_draw( bitmap, cliprect, bgtilemap, 0/*flags*/, 0/*priority*/ ); /* opaque */ |
| 1052 | ||
| 1053 | #if 0 | |
| 1054 | static int bNew = 1; | |
| 1055 | static int code = 0x80; | |
| 1056 | const UINT32 *pSource = (UINT32 *)memory_region(machine, "pointrom"); | |
| 1057 | ||
| 1058 | pSource = pSource + pSource[code]; | |
| 1059 | ||
| 1060 | bitmap_fill( bitmap, 0 , 0); | |
| 1061 | for(;;) | |
| 1062 | { | |
| 1063 | UINT32 opcode = *pSource++; | |
| 1064 | int bDone = (opcode&0x10000); | |
| 1065 | ||
| 1066 | switch( opcode&0x0f00 ) | |
| 1067 | { | |
| 1068 | case 0x0300: | |
| 1069 | DrawPoly( bitmap, pSource, 3, bNew ); | |
| 1070 | pSource += 3 + 3*3; | |
| 1071 | break; | |
| 1072 | ||
| 1073 | case 0x0400: | |
| 1074 | DrawPoly( bitmap, pSource, 4, bNew ); | |
| 1075 | pSource += 3 + 4*3; | |
| 1076 | break; | |
| 1077 | ||
| 1078 | default: | |
| 1079 | mame_printf_debug( "unk opcode: 0x%x\n", opcode ); | |
| 1080 | bDone = 1; | |
| 1081 | break; | |
| 1082 | } | |
| 1083 | ||
| 1084 | ||
| 1085 | if( bDone ) | |
| 1086 | { | |
| 1087 | break; | |
| 1088 | } | |
| 1089 | } | |
| 1090 | ||
| 1091 | bNew = 0; | |
| 1092 | ||
| 1093 | if( keyboard_pressed(KEYCODE_SPACE) ) | |
| 1094 | { | |
| 1095 | while( keyboard_pressed(KEYCODE_SPACE) ){} | |
| 1096 | code++; | |
| 1097 | bNew = 1; | |
| 1098 | } | |
| 1099 | #endif | |
| 1100 | 1245 | return 0; |
| 1101 | 1246 | } |
| 1102 | 1247 | |
| 1103 | static READ32_HANDLER( s23_txtchar_r ) | |
| 1104 | { | |
| 1105 | return namcos23_charram[offset]; | |
| 1106 | } | |
| 1107 | ||
| 1108 | 1248 | static WRITE32_HANDLER( s23_txtchar_w ) |
| 1109 | 1249 | { |
| 1110 | 1250 | COMBINE_DATA(&namcos23_charram[offset]); |
| 1111 | 1251 | gfx_element_mark_dirty(space->machine->gfx[0], offset/32); |
| 1112 | 1252 | } |
| 1113 | #if 0 | |
| 1114 | static READ32_HANDLER( ss23_vstat_r ) | |
| 1115 | { | |
| 1116 | if (offset == 1) | |
| 1117 | { | |
| 1118 | hstat ^= 0xffffffff; | |
| 1119 | return hstat; | |
| 1120 | } | |
| 1121 | 1253 | |
| 1122 | vstate++; | |
| 1123 | if (vstate >= 2) | |
| 1124 | { | |
| 1125 | ss23_vstat ^= 0xffffffff; | |
| 1126 | vstate = 0; | |
| 1127 | } | |
| 1128 | return ss23_vstat; | |
| 1129 | } | |
| 1130 | #endif | |
| 1131 | 1254 | static UINT8 nthbyte( const UINT32 *pSource, int offs ) |
| 1132 | 1255 | { |
| 1133 | 1256 | pSource += offs/4; |
| r7553 | r7554 | |
| 1136 | 1259 | |
| 1137 | 1260 | INLINE void UpdatePalette( running_machine *machine, int entry ) |
| 1138 | 1261 | { |
| 1139 | ||
| 1262 | | |
| 1140 | 1263 | |
| 1141 | 1264 | for( j=0; j<2; j++ ) |
| 1142 | 1265 | { |
| r7553 | r7554 | |
| 1148 | 1271 | } |
| 1149 | 1272 | } |
| 1150 | 1273 | |
| 1151 | static READ32_HANDLER( namcos23_paletteram_r ) | |
| 1152 | { | |
| 1153 | return space->machine->generic.paletteram.u32[offset]; | |
| 1154 | } | |
| 1155 | ||
| 1156 | 1274 | /* each LONGWORD is 2 colors. each OFFSET is 2 colors */ |
| 1157 | 1275 | |
| 1158 | 1276 | static WRITE32_HANDLER( namcos23_paletteram_w ) |
| r7553 | r7554 | |
| 1162 | 1280 | UpdatePalette(space->machine, (offset % (0x10000/4))*2); |
| 1163 | 1281 | } |
| 1164 | 1282 | |
| 1165 | static READ16_HANDLER(s23_c417_ | |
| 1283 | static READ16_HANDLER(s23_c417_ | |
| 1166 | 1284 | { |
| 1167 | 1285 | switch(offset) { |
| 1168 | 1286 | case 0: return 0x8e | (video_screen_get_vblank(space->machine->primary_screen) ? 0x8000 : 0); |
| r7553 | r7554 | |
| 1172 | 1290 | return c417_ram[c417_adr]; |
| 1173 | 1291 | } |
| 1174 | 1292 | |
| 1175 | logerror("c417_ | |
| 1293 | logerror("c417_ | |
| 1176 | 1294 | return 0; |
| 1177 | 1295 | } |
| 1178 | 1296 | |
| 1179 | static WRITE16_HANDLER(s23_c417_ | |
| 1297 | static WRITE16_HANDLER(s23_c417_ | |
| 1180 | 1298 | { |
| 1181 | 1299 | switch(offset) { |
| 1300 | case 0: | |
| 1301 | if (data == 1) | |
| 1302 | { | |
| 1303 | logerror("c417_w: raise IRQ 2\n"); | |
| 1304 | cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ2, ASSERT_LINE); | |
| 1305 | } | |
| 1306 | break; | |
| 1182 | 1307 | case 1: |
| 1183 | 1308 | COMBINE_DATA(&c417_adr); |
| 1184 | 1309 | break; |
| r7553 | r7554 | |
| 1187 | 1312 | // logerror("c417_w %04x = %04x (%08x, %08x)\n", c417_adr, data, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31)); |
| 1188 | 1313 | COMBINE_DATA(c417_ram + c417_adr); |
| 1189 | 1314 | break; |
| 1315 | case 7: | |
| 1316 | logerror("c417_w: ack IRQ 2 (%x)\n", data); | |
| 1317 | cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ2, CLEAR_LINE); | |
| 1318 | break; | |
| 1190 | 1319 | default: |
| 1191 | logerror("c417_ | |
| 1320 | logerror("c417_ | |
| 1192 | 1321 | break; |
| 1193 | 1322 | } |
| 1194 | 1323 | } |
| 1195 | 1324 | |
| 1196 | static READ32_HANDLER(s23_c417_32_r) | |
| 1197 | { | |
| 1198 | UINT32 data = 0; | |
| 1199 | if (ACCESSING_BITS_16_31) | |
| 1200 | data |= s23_c417_16_r(space, offset*2, mem_mask >> 16) << 16; | |
| 1201 | if (ACCESSING_BITS_0_15) | |
| 1202 | data |= s23_c417_16_r(space, offset*2+1, mem_mask); | |
| 1203 | return data; | |
| 1204 | } | |
| 1205 | ||
| 1206 | static WRITE32_HANDLER(s23_c417_32_w) | |
| 1207 | { | |
| 1208 | if (ACCESSING_BITS_16_31) | |
| 1209 | s23_c417_16_w(space, offset*2, data >> 16, mem_mask >> 16); | |
| 1210 | if (ACCESSING_BITS_0_15) | |
| 1211 | s23_c417_16_w(space, offset*2+1, data, mem_mask); | |
| 1212 | } | |
| 1213 | ||
| 1214 | 1325 | static READ16_HANDLER(s23_c412_ram_r) |
| 1215 | 1326 | { |
| 1216 | 1327 | // logerror("c412_ram_r %06x (%08x, %08x)\n", offset, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31)); |
| r7553 | r7554 | |
| 1239 | 1350 | COMBINE_DATA(c412_pczram + (offset & 0x001ff)); |
| 1240 | 1351 | } |
| 1241 | 1352 | |
| 1242 | static READ16_HANDLER(s23_c412_ | |
| 1353 | static READ16_HANDLER(s23_c412_ | |
| 1243 | 1354 | { |
| 1244 | 1355 | switch(offset) { |
| 1245 | 1356 | case 8: return c412_adr; |
| r7553 | r7554 | |
| 1247 | 1358 | case 10: return s23_c412_ram_r(space, c412_adr, mem_mask); |
| 1248 | 1359 | } |
| 1249 | 1360 | |
| 1250 | logerror("c412_ | |
| 1361 | logerror("c412_ | |
| 1251 | 1362 | return 0; |
| 1252 | 1363 | } |
| 1253 | 1364 | |
| 1254 | static WRITE16_HANDLER(s23_c412_ | |
| 1365 | static WRITE16_HANDLER(s23_c412_ | |
| 1255 | 1366 | { |
| 1256 | 1367 | switch(offset) { |
| 1257 | 1368 | case 8: c412_adr = (data & mem_mask) | (c412_adr & (0xffffffff ^ mem_mask)); break; |
| 1258 | 1369 | case 9: c412_adr = ((data & mem_mask) << 16) | (c412_adr & (0xffffffff ^ (mem_mask << 16))); break; |
| 1259 | 1370 | case 10: s23_c412_ram_w(space, c412_adr, data, mem_mask); break; |
| 1260 | 1371 | default: |
| 1261 | logerror("c412_ | |
| 1372 | logerror("c412_ | |
| 1262 | 1373 | break; |
| 1263 | 1374 | } |
| 1264 | 1375 | } |
| 1265 | 1376 | |
| 1266 | static READ32_HANDLER(s23_c412_32_r) | |
| 1267 | { | |
| 1268 | UINT32 data = 0; | |
| 1269 | if (ACCESSING_BITS_16_31) | |
| 1270 | data |= s23_c412_16_r(space, offset*2, mem_mask >> 16) << 16; | |
| 1271 | if (ACCESSING_BITS_0_15) | |
| 1272 | data |= s23_c412_16_r(space, offset*2+1, mem_mask); | |
| 1273 | return data; | |
| 1274 | } | |
| 1275 | ||
| 1276 | static WRITE32_HANDLER(s23_c412_32_w) | |
| 1277 | { | |
| 1278 | if (ACCESSING_BITS_16_31) | |
| 1279 | s23_c412_16_w(space, offset*2, data >> 16, mem_mask >> 16); | |
| 1280 | if (ACCESSING_BITS_0_15) | |
| 1281 | s23_c412_16_w(space, offset*2+1, data, mem_mask); | |
| 1282 | } | |
| 1283 | ||
| 1284 | ||
| 1285 | 1377 | static READ16_HANDLER(s23_c421_ram_r) |
| 1286 | 1378 | { |
| 1287 | 1379 | // logerror("c421_ram_r %06x (%08x, %08x)\n", offset, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31)); |
| r7553 | r7554 | |
| 1306 | 1398 | COMBINE_DATA(c421_sram + (offset & 0x07fff)); |
| 1307 | 1399 | } |
| 1308 | 1400 | |
| 1309 | static READ16_HANDLER(s23_c421_ | |
| 1401 | static READ16_HANDLER(s23_c421_ | |
| 1310 | 1402 | { |
| 1311 | 1403 | switch(offset) { |
| 1312 | 1404 | case 0: return s23_c421_ram_r(space, c421_adr & 0xfffff, mem_mask); |
| r7553 | r7554 | |
| 1314 | 1406 | case 3: return c421_adr; |
| 1315 | 1407 | } |
| 1316 | 1408 | |
| 1317 | logerror("c421_ | |
| 1409 | logerror("c421_ | |
| 1318 | 1410 | return 0; |
| 1319 | 1411 | } |
| 1320 | 1412 | |
| 1321 | static WRITE16_HANDLER(s23_c421_ | |
| 1413 | static WRITE16_HANDLER(s23_c421_ | |
| 1322 | 1414 | { |
| 1323 | 1415 | switch(offset) { |
| 1324 | 1416 | case 0: s23_c421_ram_w(space, c421_adr & 0xfffff, data, mem_mask); break; |
| 1325 | 1417 | case 2: c421_adr = ((data & mem_mask) << 16) | (c421_adr & (0xffffffff ^ (mem_mask << 16))); break; |
| 1326 | 1418 | case 3: c421_adr = (data & mem_mask) | (c421_adr & (0xffffffff ^ mem_mask)); break; |
| 1327 | 1419 | default: |
| 1328 | logerror("c421_ | |
| 1420 | logerror("c421_ | |
| 1329 | 1421 | break; |
| 1330 | 1422 | } |
| 1331 | 1423 | } |
| 1332 | 1424 | |
| 1333 | static RE | |
| 1425 | static WRITE16 | |
| 1334 | 1426 | { |
| 1335 | UINT32 data = 0; | |
| 1336 | if (ACCESSING_BITS_16_31) | |
| 1337 | data |= s23_c421_16_r(space, offset*2, mem_mask >> 16) << 16; | |
| 1338 | if (ACCESSING_BITS_0_15) | |
| 1339 | data |= s23_c421_16_r(space, offset*2+1, mem_mask); | |
| 1340 | return data; | |
| 1341 | } | |
| 1342 | ||
| 1343 | static WRITE32_HANDLER(s23_c421_32_w) | |
| 1344 | { | |
| 1345 | if (ACCESSING_BITS_16_31) | |
| 1346 | s23_c421_16_w(space, offset*2, data >> 16, mem_mask >> 16); | |
| 1347 | if (ACCESSING_BITS_0_15) | |
| 1348 | s23_c421_16_w(space, offset*2+1, data, mem_mask); | |
| 1349 | } | |
| 1350 | ||
| 1351 | static WRITE16_HANDLER(s23_ctl_16_w) | |
| 1352 | { | |
| 1353 | 1427 | switch(offset) { |
| 1354 | 1428 | case 0: { |
| 1355 | 1429 | if(ctl_led != (data & 0xff)) { |
| 1356 | 1430 | ctl_led = data; |
| 1357 | logerror("LEDS %c%c%c%c%c%c%c%c\n", | |
| 1358 | ctl_led & 0x80 ? '.' : '#', | |
| 1359 | ctl_led & 0x40 ? '.' : '#', | |
| 1360 | ctl_led & 0x20 ? '.' : '#', | |
| 1361 | ctl_led & 0x10 ? '.' : '#', | |
| 1362 | ctl_led & 0x08 ? '.' : '#', | |
| 1363 | ctl_led & 0x04 ? '.' : '#', | |
| 1364 | ctl_led & 0x02 ? '.' : '#', | |
| 1365 | ctl_led & 0x01 ? '.' : '#'); | |
| 1431 | /* logerror("LEDS %c%c%c%c%c%c%c%c\n", | |
| 1432 | ctl_led & 0x80 ? '.' : '#', | |
| 1433 | ctl_led & 0x40 ? '.' : '#', | |
| 1434 | ctl_led & 0x20 ? '.' : '#', | |
| 1435 | ctl_led & 0x10 ? '.' : '#', | |
| 1436 | ctl_led & 0x08 ? '.' : '#', | |
| 1437 | ctl_led & 0x04 ? '.' : '#', | |
| 1438 | ctl_led & 0x02 ? '.' : '#', | |
| 1439 | ctl_led & 0x01 ? '.' : '#');*/ | |
| 1366 | 1440 | } |
| 1367 | 1441 | break; |
| 1368 | 1442 | } |
| r7553 | r7554 | |
| 1378 | 1452 | } |
| 1379 | 1453 | break; |
| 1380 | 1454 | |
| 1455 | case 6: // gmen wars spams this heavily with 0 prior to starting the GMEN board test | |
| 1456 | if (data != 0) | |
| 1457 | logerror("ctl_w %x, %04x @ %04x (%08x, %08x)\n", offset, data, mem_mask, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31)); | |
| 1458 | break; | |
| 1459 | ||
| 1381 | 1460 | default: |
| 1382 | 1461 | logerror("ctl_w %x, %04x @ %04x (%08x, %08x)\n", offset, data, mem_mask, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31)); |
| 1383 | 1462 | } |
| 1384 | 1463 | } |
| 1385 | 1464 | |
| 1386 | static READ16_HANDLER(s23_ctl_ | |
| 1465 | static READ16_HANDLER(s23_ctl_ | |
| 1387 | 1466 | { |
| 1388 | 1467 | switch(offset) { |
| 1389 | // dips ? | |
| 1390 | // 0100 set freezes gorgon | |
| 1391 | // 0080 is service mode for gorgon | |
| 1392 | // 0004 unset freezes ss23 at the boot level | |
| 1393 | // 0002 unset skips the post on ss23 | |
| 1394 | case 1: return 0x0004; | |
| 1468 | // 0100 set freezes gorgon (polygon fifo flag) | |
| 1469 | case 1: return 0x0000 | input_port_read(space->machine, "DSW"); | |
| 1395 | 1470 | case 2: case 3: { |
| 1396 | 1471 | UINT16 res = ctl_inp_buffer[offset-2] & 0x800 ? 0xffff : 0x0000; |
| 1397 | 1472 | ctl_inp_buffer[offset-2] = (ctl_inp_buffer[offset-2] << 1) | 1; |
| r7553 | r7554 | |
| 1402 | 1477 | return 0xffff; |
| 1403 | 1478 | } |
| 1404 | 1479 | |
| 1405 | static WRITE | |
| 1480 | static WRITE16_HANDLER(s23_c | |
| 1406 | 1481 | { |
| 1407 | if (ACCESSING_BITS_16_31) | |
| 1408 | s23_ctl_16_w(space, offset*2, data >> 16, mem_mask >> 16); | |
| 1409 | if (ACCESSING_BITS_0_15) | |
| 1410 | s23_ctl_16_w(space, offset*2+1, data, mem_mask); | |
| 1411 | } | |
| 1482 | switch(offset) { | |
| 1483 | case 4: // interrupt control | |
| 1484 | if (data == 0xc8) | |
| 1485 | { | |
| 1486 | logerror("c361_w: raise IRQ 1\n"); | |
| 1487 | cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ1, ASSERT_LINE); | |
| 1488 | } | |
| 1489 | else if (data == 0x1ff) | |
| 1490 | { | |
| 1491 | logerror("c361_w: ack IRQ 1\n"); | |
| 1492 | cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ1, CLEAR_LINE); | |
| 1493 | } | |
| 1494 | else | |
| 1495 | { | |
| 1496 | logerror("c361_w %x, %04x @ %04x (%08x, %08x)\n", offset, data, mem_mask, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31)); | |
| 1497 | } | |
| 1498 | break; | |
| 1412 | 1499 | |
| 1413 | static READ32_HANDLER(s23_ctl_32_r) | |
| 1414 | { | |
| 1415 | UINT32 data = 0; | |
| 1416 | if (ACCESSING_BITS_16_31) | |
| 1417 | data |= s23_ctl_16_r(space, offset*2, mem_mask >> 16) << 16; | |
| 1418 | if (ACCESSING_BITS_0_15) | |
| 1419 | data |= s23_ctl_16_r(space, offset*2+1, mem_mask); | |
| 1420 | return data; | |
| 1421 | } | |
| 1422 | ||
| 1423 | ||
| 1424 | static WRITE16_HANDLER(s23_c361_16_w) | |
| 1425 | { | |
| 1426 | switch(offset) { | |
| 1427 | 1500 | default: |
| 1428 | 1501 | logerror("c361_w %x, %04x @ %04x (%08x, %08x)\n", offset, data, mem_mask, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31)); |
| 1429 | 1502 | } |
| 1430 | 1503 | } |
| 1431 | 1504 | |
| 1432 | static READ16_HANDLER(s23_c361_ | |
| 1505 | static READ16_HANDLER(s23_c361_ | |
| 1433 | 1506 | { |
| 1434 | 1507 | switch(offset) { |
| 1435 | 1508 | case 5: return video_screen_get_vpos(space->machine->primary_screen); |
| r7553 | r7554 | |
| 1439 | 1512 | return 0xffff; |
| 1440 | 1513 | } |
| 1441 | 1514 | |
| 1442 | static | |
| 1515 | static | |
| 1443 | 1516 | { |
| 1444 | if (ACCESSING_BITS_16_31) | |
| 1445 | s23_c361_16_w(space, offset*2, data >> 16, mem_mask >> 16); | |
| 1446 | if (ACCESSING_BITS_0_15) | |
| 1447 | s23_c361_16_w(space, offset*2+1, data, mem_mask); | |
| 1517 | return s23_c422_regs[offset];; | |
| 1448 | 1518 | } |
| 1449 | 1519 | |
| 1450 | static RE | |
| 1520 | static WRITE16 | |
| 1451 | 1521 | { |
| 1452 | UINT32 data = 0; | |
| 1453 | if (ACCESSING_BITS_16_31) | |
| 1454 | data |= s23_c361_16_r(space, offset*2, mem_mask >> 16) << 16; | |
| 1455 | if (ACCESSING_BITS_0_15) | |
| 1456 | data |= s23_c361_16_r(space, offset*2+1, mem_mask); | |
| 1457 | return data; | |
| 1522 | switch (offset) | |
| 1523 | { | |
| 1524 | case 1: | |
| 1525 | if (data == 0xfffb) | |
| 1526 | { | |
| 1527 | logerror("c422_w: raise IRQ 3\n"); | |
| 1528 | cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ3, ASSERT_LINE); | |
| 1529 | } | |
| 1530 | else if (data == 0x000f) | |
| 1531 | { | |
| 1532 | logerror("c422_w: ack IRQ 3\n"); | |
| 1533 | cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ3, CLEAR_LINE); | |
| 1534 | } | |
| 1535 | break; | |
| 1536 | ||
| 1537 | default: | |
| 1538 | logerror("c422_w: %04x @ %x\n", data, offset); | |
| 1539 | break; | |
| 1540 | ||
| 1541 | } | |
| 1542 | ||
| 1543 | COMBINE_DATA(&s23_c422_regs[offset]); | |
| 1458 | 1544 | } |
| 1459 | 1545 | |
| 1460 | 1546 | static INTERRUPT_GEN(s23_interrupt) |
| r7553 | r7554 | |
| 1475 | 1561 | if (data) |
| 1476 | 1562 | { |
| 1477 | 1563 | logerror("S23: booting H8/3002\n"); |
| 1564 | ||
| 1565 | // Panic Park: writing 1 when it's already running means reboot? | |
| 1566 | if (s23_subcpu_running) | |
| 1567 | { | |
| 1568 | cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE); | |
| 1569 | } | |
| 1570 | ||
| 1478 | 1571 | cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, CLEAR_LINE); |
| 1572 | s23_subcpu_running = 1; | |
| 1479 | 1573 | } |
| 1480 | 1574 | else |
| 1481 | 1575 | { |
| 1482 | 1576 | logerror("S23: stopping H8/3002\n"); |
| 1483 | 1577 | cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE); |
| 1578 | s23_subcpu_running = 0; | |
| 1484 | 1579 | } |
| 1485 | 1580 | } |
| 1486 | 1581 | } |
| r7553 | r7554 | |
| 1513 | 1608 | } |
| 1514 | 1609 | } |
| 1515 | 1610 | |
| 1611 | // Panic Park sits in a tight loop waiting for this AND 0002 to be non-zero (at PC=BFC02F00) | |
| 1612 | static READ32_HANDLER( s23_unk_status_r ) | |
| 1613 | { | |
| 1614 | return 0x00020002; | |
| 1615 | } | |
| 1616 | ||
| 1516 | 1617 | static ADDRESS_MAP_START( gorgon_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 1517 | 1618 | AM_RANGE(0x00000000, 0x003fffff) AM_RAM |
| 1518 | 1619 | AM_RANGE(0x01000000, 0x010000ff) AM_READ( gorgon_magic_r ) |
| 1519 | AM_RANGE(0x02000000, 0x0200000f) AM_READWRITE( s23_c417_ | |
| 1620 | AM_RANGE(0x02000000, 0x0200000f) AM_READWRITE16( s23_c417_ | |
| 1520 | 1621 | AM_RANGE(0x04400000, 0x0440ffff) AM_READWRITE( gorgon_sharedram_r, gorgon_sharedram_w ) AM_BASE(&namcos23_shared_ram) |
| 1521 | 1622 | |
| 1522 | 1623 | AM_RANGE(0x04c3ff08, 0x04c3ff0b) AM_WRITE( s23_mcuen_w ) |
| r7553 | r7554 | |
| 1525 | 1626 | AM_RANGE(0x06080000, 0x06081fff) AM_RAM |
| 1526 | 1627 | |
| 1527 | 1628 | AM_RANGE(0x06108000, 0x061087ff) AM_RAM // GAMMA (C404-3S) |
| 1528 | AM_RANGE(0x06110000, 0x0613ffff) AM_READWRITE(namcos23_paletteram_r, namcos23_paletteram_w) AM_BASE_GENERIC(paletteram) | |
| 1529 | AM_RANGE(0x06400000, 0x06403fff) AM_READWRITE( s23_txtchar_r, s23_txtchar_w ) AM_BASE(&namcos23_charram) // text layer characters | |
| 1629 | AM_RANGE(0x06110000, 0x0613ffff) AM_RAM_WRITE( namcos23_paletteram_w ) AM_BASE_GENERIC(paletteram) | |
| 1630 | AM_RANGE(0x06400000, 0x06403fff) AM_RAM_WRITE( s23_txtchar_w ) AM_BASE(&namcos23_charram) // text layer characters | |
| 1530 | 1631 | AM_RANGE(0x06404000, 0x0641dfff) AM_RAM |
| 1531 | AM_RANGE(0x0641e000, 0x0641ffff) AM_R | |
| 1632 | AM_RANGE(0x0641e000, 0x0641ffff) AM_R | |
| 1532 | 1633 | |
| 1533 | 1634 | AM_RANGE(0x08000000, 0x087fffff) AM_ROM AM_REGION("data", 0) // data ROMs |
| 1534 | 1635 | |
| 1535 | 1636 | AM_RANGE(0x0c000000, 0x0c00ffff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // BACKUP |
| 1536 | 1637 | |
| 1537 | AM_RANGE(0x0d000000, 0x0d00000f) AM_READWRITE | |
| 1638 | AM_RANGE(0x0d000000, 0x0d00000f) AM_READWRITE16( s23_ctl_ | |
| 1538 | 1639 | |
| 1640 | AM_RANGE(0x0f000000, 0x0f000003) AM_READ( s23_unk_status_r ) | |
| 1641 | ||
| 1539 | 1642 | AM_RANGE(0x0f200000, 0x0f201fff) AM_RAM |
| 1540 | 1643 | |
| 1541 | 1644 | AM_RANGE(0x0fc00000, 0x0fffffff) AM_WRITENOP AM_ROM AM_REGION("user1", 0) |
| r7553 | r7554 | |
| 1545 | 1648 | static ADDRESS_MAP_START( ss23_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 1546 | 1649 | AM_RANGE(0x00000000, 0x003fffff) AM_RAM |
| 1547 | 1650 | AM_RANGE(0x01000000, 0x010000ff) AM_READ( gorgon_magic_r ) |
| 1548 | AM_RANGE(0x02000000, 0x0200000f) AM_READWRITE( s23_c417_ | |
| 1651 | AM_RANGE(0x02000000, 0x0200000f) AM_READWRITE16( s23_c417_ | |
| 1549 | 1652 | AM_RANGE(0x04400000, 0x0440ffff) AM_RAM AM_BASE(&namcos23_shared_ram) |
| 1550 | 1653 | AM_RANGE(0x04c3ff08, 0x04c3ff0b) AM_WRITE( s23_mcuen_w ) |
| 1551 | 1654 | AM_RANGE(0x04c3ff0c, 0x04c3ff0f) AM_RAM // 3d FIFO |
| 1552 | 1655 | AM_RANGE(0x06000000, 0x0600ffff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // Backup |
| 1553 | 1656 | AM_RANGE(0x06200000, 0x06203fff) AM_RAM // C422 |
| 1554 | AM_RANGE(0x06800000, 0x06807fff) AM_READWRITE( s23_txtchar_r, s23_txtchar_w ) AM_BASE(&namcos23_charram) // text layer characters (shown as CGRAM in POST) | |
| 1657 | AM_RANGE(0x06400000, 0x0640000f) AM_READWRITE16( s23_c422_r, s23_c422_w, 0xffffffff ) // C422 registers | |
| 1658 | AM_RANGE(0x06800000, 0x06807fff) AM_RAM_WRITE( s23_txtchar_w ) AM_BASE(&namcos23_charram) // text layer characters (shown as CGRAM in POST) | |
| 1555 | 1659 | AM_RANGE(0x06804000, 0x0681dfff) AM_RAM |
| 1556 | AM_RANGE(0x0681e000, 0x0681ffff) AM_READWRITE(namcos23_textram_r, namcos23_textram_w) AM_BASE(&namcos23_textram) | |
| 1557 | AM_RANGE(0x06820000, 0x0682000f) AM_READWRITE( s23_c361_32_r, s23_c361_32_w ) // C361 | |
| 1660 | AM_RANGE(0x0681e000, 0x0681ffff) AM_RAM_WRITE( namcos23_textram_w ) AM_BASE(&namcos23_textram) | |
| 1661 | AM_RANGE(0x06820000, 0x0682000f) AM_READWRITE16( s23_c361_r, s23_c361_w, 0xffffffff ) // C361 | |
| 1558 | 1662 | AM_RANGE(0x06a08000, 0x06a0ffff) AM_RAM // GAMMA (C404) |
| 1559 | AM_RANGE(0x06a10000, 0x06a3ffff) AM_R | |
| 1663 | AM_RANGE(0x06a10000, 0x06a3ffff) AM_R | |
| 1560 | 1664 | AM_RANGE(0x08000000, 0x08ffffff) AM_ROM AM_REGION("data", 0x0000000) AM_MIRROR(0x01000000) // data ROMs |
| 1561 | 1665 | AM_RANGE(0x0a000000, 0x0affffff) AM_ROM AM_REGION("data", 0x1000000) AM_MIRROR(0x01000000) |
| 1562 | AM_RANGE(0x0c000000, 0x0c00001f) AM_READWRITE( s23_c412_32_r, s23_c412_32_w ) | |
| 1563 | AM_RANGE(0x0c400000, 0x0c400007) AM_READWRITE( s23_c421_32_r, s23_c421_32_w ) | |
| 1564 | AM_RANGE(0x0d000000, 0x0d00000f) AM_READWRITE( s23_ctl_32_r, s23_ctl_32_w ) | |
| 1666 | AM_RANGE(0x0c000000, 0x0c00001f) AM_READWRITE16( s23_c412_r, s23_c412_w, 0xffffffff ) | |
| 1667 | AM_RANGE(0x0c400000, 0x0c400007) AM_READWRITE16( s23_c421_r, s23_c421_w, 0xffffffff ) | |
| 1668 | AM_RANGE(0x0d000000, 0x0d00000f) AM_READWRITE16( s23_ctl_r, s23_ctl_w, 0xffffffff ) | |
| 1669 | AM_RANGE(0x0e800000, 0x0e800003) AM_READ( s23_unk_status_r ) | |
| 1565 | 1670 | AM_RANGE(0x0fc00000, 0x0fffffff) AM_WRITENOP AM_ROM AM_REGION("user1", 0) |
| 1566 | 1671 | AM_RANGE(0x1fc00000, 0x1fffffff) AM_WRITENOP AM_ROM AM_REGION("user1", 0) |
| 1567 | 1672 | ADDRESS_MAP_END |
| 1568 | 1673 | |
| 1674 | static READ32_HANDLER( gmen_trigger_sh2 ) | |
| 1675 | { | |
| 1676 | logerror("gmen_trigger_sh2: booting SH-2\n"); | |
| 1677 | cputag_set_input_line(space->machine, "gmen", INPUT_LINE_RESET, CLEAR_LINE); | |
| 1678 | ||
| 1679 | return 0; | |
| 1680 | } | |
| 1681 | ||
| 1682 | static READ32_HANDLER( sh2_shared_r ) | |
| 1683 | { | |
| 1684 | return gmen_sh2_shared[offset]; | |
| 1685 | } | |
| 1686 | ||
| 1687 | static WRITE32_HANDLER( sh2_shared_w ) | |
| 1688 | { | |
| 1689 | COMBINE_DATA(&gmen_sh2_shared[offset]); | |
| 1690 | } | |
| 1691 | ||
| 1692 | static ADDRESS_MAP_START( gmen_mips_map, ADDRESS_SPACE_PROGRAM, 32 ) | |
| 1693 | AM_IMPORT_FROM(ss23_map) | |
| 1694 | AM_RANGE(0x0e400000, 0x0e400003) AM_READ( gmen_trigger_sh2 ) | |
| 1695 | AM_RANGE(0x0e700000, 0x0e707fff) AM_READWRITE( sh2_shared_r, sh2_shared_w ) | |
| 1696 | ADDRESS_MAP_END | |
| 1697 | ||
| 1698 | ||
| 1699 | static ADDRESS_MAP_START( gmen_sh2_map, ADDRESS_SPACE_PROGRAM, 32 ) | |
| 1700 | AM_RANGE( 0x00000000, 0x00007fff ) AM_RAM AM_BASE(&gmen_sh2_shared) | |
| 1701 | AM_RANGE( 0x04000000, 0x043fffff ) AM_RAM // SH-2 main work RAM | |
| 1702 | ADDRESS_MAP_END | |
| 1703 | ||
| 1704 | static MACHINE_RESET(gmen) | |
| 1705 | { | |
| 1706 | // halt the SH-2 until we need it | |
| 1707 | cputag_set_input_line(machine, "gmen", INPUT_LINE_RESET, ASSERT_LINE); | |
| 1708 | } | |
| 1709 | ||
| 1569 | 1710 | static WRITE16_HANDLER( sharedram_sub_w ) |
| 1570 | 1711 | { |
| 1571 | 1712 | UINT16 *shared16 = (UINT16 *)namcos23_shared_ram; |
| r7553 | r7554 | |
| 1589 | 1730 | return shared16[BYTE_XOR_BE(offset)]; |
| 1590 | 1731 | } |
| 1591 | 1732 | |
| 1733 | static WRITE16_HANDLER( sub_interrupt_main_w ) | |
| 1734 | { | |
| 1735 | if ((mem_mask == 0xffff) && (data == 0x3170)) | |
| 1736 | { | |
| 1737 | cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ1, ASSERT_LINE); | |
| 1738 | } | |
| 1739 | else | |
| 1740 | { | |
| 1741 | logerror("Unknown write %x to sub_interrupt_main_w!\n", data); | |
| 1742 | } | |
| 1743 | } | |
| 1744 | ||
| 1592 | 1745 | /* H8/3002 MCU stuff */ |
| 1593 | 1746 | static ADDRESS_MAP_START( s23h8rwmap, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1594 | 1747 | AM_RANGE(0x000000, 0x07ffff) AM_ROM |
| r7553 | r7554 | |
| 1596 | 1749 | AM_RANGE(0x280000, 0x287fff) AM_DEVREADWRITE( "c352", c352_r, c352_w ) |
| 1597 | 1750 | AM_RANGE(0x300000, 0x300003) AM_NOP // seems to be more inputs, maybe false leftover code from System 12? |
| 1598 | 1751 | AM_RANGE(0x300010, 0x300011) AM_NOP |
| 1752 | AM_RANGE(0x300020, 0x300021) AM_WRITE( sub_interrupt_main_w ) | |
| 1599 | 1753 | AM_RANGE(0x300030, 0x300031) AM_WRITENOP // timecrs2 writes this when writing to the sync shared ram location, motoxgo doesn't |
| 1600 | 1754 | ADDRESS_MAP_END |
| 1601 | 1755 | |
| r7553 | r7554 | |
| 1747 | 1901 | cputag_set_input_line(space->machine, "ioboard", H8_SCI_0_RX, ASSERT_LINE); |
| 1748 | 1902 | } |
| 1749 | 1903 | |
| 1904 | static INPUT_PORTS_START( gorgon ) | |
| 1905 | PORT_START("H8PORT") | |
| 1906 | ||
| 1907 | // No idea if start is actually there, but we need buttons to pass error screens | |
| 1908 | PORT_START("P1") | |
| 1909 | PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1910 | PORT_BIT( 0xffe, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1911 | ||
| 1912 | PORT_START("P2") | |
| 1913 | PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1914 | PORT_BIT( 0xffe, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1915 | ||
| 1916 | PORT_START("RRP0") | |
| 1917 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1918 | PORT_BIT(0xef, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1919 | ||
| 1920 | PORT_START("RRP1") | |
| 1921 | PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1922 | ||
| 1923 | PORT_START("RRP2") | |
| 1924 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1925 | PORT_BIT(0xf7, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1926 | ||
| 1927 | PORT_START("RRP3") | |
| 1928 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1929 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1930 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 1931 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) | |
| 1932 | PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1933 | ||
| 1934 | PORT_START("DSW") | |
| 1935 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) | |
| 1936 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1937 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1938 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 1939 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1940 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1941 | PORT_DIPNAME( 0x04, 0x04, "Freeze?" ) | |
| 1942 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1943 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1944 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 1945 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1946 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1947 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 1948 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 1949 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1950 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 1951 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1952 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1953 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 1954 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1955 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1956 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Service_Mode ) ) | |
| 1957 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1958 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1959 | INPUT_PORTS_END | |
| 1960 | ||
| 1961 | static INPUT_PORTS_START( s23 ) | |
| 1962 | PORT_START("H8PORT") | |
| 1963 | ||
| 1964 | // No idea if start is actually there, but we need buttons to pass error screens | |
| 1965 | PORT_START("P1") | |
| 1966 | PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1967 | PORT_BIT( 0xffe, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1968 | ||
| 1969 | PORT_START("P2") | |
| 1970 | PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1971 | PORT_BIT( 0xffe, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1972 | ||
| 1973 | PORT_START("TC2P0") | |
| 1974 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1975 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1976 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // this is the "coin acceptor connected" signal | |
| 1977 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1978 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1979 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) | |
| 1980 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) | |
| 1981 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 1982 | ||
| 1983 | PORT_START("TC2P1") | |
| 1984 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // gun trigger | |
| 1985 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) // foot pedal | |
| 1986 | PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1987 | ||
| 1988 | PORT_START("DSW") | |
| 1989 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Service_Mode ) ) | |
| 1990 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1991 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1992 | PORT_DIPNAME( 0x02, 0x02, "Skip POST" ) | |
| 1993 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1994 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1995 | PORT_DIPNAME( 0x04, 0x04, "Freeze?" ) | |
| 1996 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1997 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1998 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 1999 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2000 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2001 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 2002 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2003 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2004 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 2005 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2006 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2007 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 2008 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2009 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2010 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 2011 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2012 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2013 | INPUT_PORTS_END | |
| 2014 | ||
| 1750 | 2015 | static INPUT_PORTS_START( ss23 ) |
| 1751 | 2016 | PORT_START("H8PORT") |
| 1752 | 2017 | |
| r7553 | r7554 | |
| 1773 | 2038 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // gun trigger |
| 1774 | 2039 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) // foot pedal |
| 1775 | 2040 | PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2041 | ||
| 2042 | PORT_START("DSW") | |
| 2043 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Service_Mode ) ) | |
| 2044 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 2045 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2046 | PORT_DIPNAME( 0x02, 0x02, "Skip POST" ) | |
| 2047 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2048 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2049 | PORT_DIPNAME( 0x04, 0x04, "Freeze?" ) | |
| 2050 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 2051 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2052 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 2053 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2054 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2055 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 2056 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2057 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2058 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 2059 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2060 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2061 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 2062 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2063 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2064 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 2065 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2066 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1776 | 2067 | INPUT_PORTS_END |
| 1777 | 2068 | |
| 1778 | 2069 | |
| r7553 | r7554 | |
| 1803 | 2094 | ADDRESS_MAP_END |
| 1804 | 2095 | |
| 1805 | 2096 | // version without serial hookup to I/O board for games where the PIC isn't dumped |
| 1806 | static ADDRESS_MAP_START( s23h8ionoiobmap, ADDRESS_SPACE_IO, 8 ) | |
| 2097 | static ADDRESS_MAP_START( s23h8noiobmap, ADDRESS_SPACE_IO, 8 ) | |
| 2098 | AM_RANGE(H8_PORT_6, H8_PORT_6) AM_READWRITE( s23_mcu_p6_r, s23_mcu_p6_w ) | |
| 1807 | 2099 | AM_RANGE(H8_PORT_7, H8_PORT_7) AM_READ_PORT( "H8PORT" ) |
| 1808 | 2100 | AM_RANGE(H8_PORT_8, H8_PORT_8) AM_READ( s23_mcu_p8_r ) AM_WRITENOP |
| 1809 | 2101 | AM_RANGE(H8_PORT_A, H8_PORT_A) AM_READWRITE( s23_mcu_pa_r, s23_mcu_pa_w ) |
| r7553 | r7554 | |
| 1864 | 2156 | AM_RANGE(0x6000, 0x6000) AM_READ_PORT("TC2P0") // 0-1 = coin 0-3 = coin connect, 0-5 = test 0-6 = down select, 0-7 = up select, 0-8 = enter |
| 1865 | 2157 | AM_RANGE(0x6001, 0x6001) AM_READ_PORT("TC2P1") // 1-1 = gun trigger 1-2 = foot pedal |
| 1866 | 2158 | AM_RANGE(0x6002, 0x6003) AM_READ( iob_r ) |
| 2159 | AM_RANGE(0x6004, 0x6005) AM_WRITENOP | |
| 2160 | AM_RANGE(0x6006, 0x6007) AM_NOP | |
| 1867 | 2161 | AM_RANGE(0x7000, 0x700f) AM_READ( iob_r ) |
| 1868 | 2162 | |
| 1869 | 2163 | AM_RANGE(0xc000, 0xf7ff) AM_RAM |
| 1870 | 2164 | ADDRESS_MAP_END |
| 1871 | 2165 | |
| 2166 | // gorgon map | |
| 2167 | static ADDRESS_MAP_START( gorgoniobrdmap, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 2168 | AM_RANGE(0x0000, 0x1fff) AM_ROM AM_REGION("ioboard", 0) | |
| 2169 | AM_RANGE(0x6000, 0x6000) AM_READ_PORT("RRP0") // 0-5 = start | |
| 2170 | AM_RANGE(0x6001, 0x6001) AM_READ_PORT("RRP1") // | |
| 2171 | AM_RANGE(0x6002, 0x6002) AM_READ_PORT("RRP2") // 0-4 = coin | |
| 2172 | AM_RANGE(0x6003, 0x6003) AM_READ_PORT("RRP3") // 1-1 = button? 1-4 = start? | |
| 2173 | AM_RANGE(0x6004, 0x6005) AM_WRITENOP | |
| 2174 | AM_RANGE(0x6006, 0x6007) AM_NOP | |
| 2175 | AM_RANGE(0x7000, 0x700f) AM_READ( iob_r ) | |
| 2176 | ||
| 2177 | AM_RANGE(0xc000, 0xf7ff) AM_RAM | |
| 2178 | ADDRESS_MAP_END | |
| 2179 | ||
| 1872 | 2180 | /* |
| 1873 | 2181 | port 5 bit 2 = LED to indicate transmitting packet to main |
| 1874 | 2182 | port 4 bit 2 = SENSE line back to main (0 = asserted, 1 = dropped) |
| r7553 | r7554 | |
| 1877 | 2185 | AM_RANGE(H8_PORT_4, H8_PORT_4) AM_READWRITE( s23_iob_p4_r, s23_iob_p4_w ) |
| 1878 | 2186 | AM_RANGE(H8_PORT_5, H8_PORT_5) AM_NOP // status LED in bit 2 |
| 1879 | 2187 | AM_RANGE(H8_PORT_6, H8_PORT_6) AM_NOP // unknown |
| 2188 | AM_RANGE(H8_PORT_8, H8_PORT_8) AM_NOP // unknown - used on ASCA-5 only | |
| 2189 | AM_RANGE(H8_PORT_9, H8_PORT_9) AM_NOP // unknown - used on ASCA-5 only | |
| 1880 | 2190 | AM_RANGE(H8_SERIAL_0, H8_SERIAL_0) AM_READWRITE( s23_iob_mcu_r, s23_iob_mcu_w ) |
| 2191 | AM_RANGE(H8_ADC_0_H, H8_ADC_3_L) AM_NOP | |
| 1881 | 2192 | ADDRESS_MAP_END |
| 1882 | 2193 | |
| 1883 | 2194 | static DRIVER_INIT(ss23) |
| r7553 | r7554 | |
| 1891 | 2202 | memset(s23_settings, 0, sizeof(s23_settings)); |
| 1892 | 2203 | s23_tssio_port_4 = 0; |
| 1893 | 2204 | s23_porta = 0, s23_rtcstate = 0; |
| 2205 | s23_subcpu_running = 1; | |
| 1894 | 2206 | |
| 1895 | 2207 | if ((!strcmp(machine->gamedrv->name, "motoxgo")) || |
| 1896 | 2208 | (!strcmp(machine->gamedrv->name, "panicprk")) || |
| 1897 | 2209 | (!strcmp(machine->gamedrv->name, "rapidrvr")) || |
| 1898 | 2210 | (!strcmp(machine->gamedrv->name, "finlflng")) || |
| 2211 | (!strcmp(machine->gamedrv->name, "gunwars")) || | |
| 2212 | (!strcmp(machine->gamedrv->name, "finfurl2")) || | |
| 2213 | (!strcmp(machine->gamedrv->name, "finfurl2j")) || | |
| 2214 | (!strcmp(machine->gamedrv->name, "timecrs2b")) || | |
| 1899 | 2215 | (!strcmp(machine->gamedrv->name, "timecrs2"))) |
| 1900 | 2216 | { |
| 1901 | 2217 | has_jvsio = 1; |
| r7553 | r7554 | |
| 1920 | 2236 | 64*16 |
| 1921 | 2237 | }; /* cg_layout */ |
| 1922 | 2238 | |
| 1923 | #if 0 | |
| 1924 | static const gfx_layout sprite_layout = | |
| 1925 | { | |
| 1926 | 32,32, | |
| 1927 | RGN_FRAC(1,1), | |
| 1928 | 8, | |
| 1929 | { 0,1,2,3,4,5,6,7 }, | |
| 1930 | { | |
| 1931 | 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8, | |
| 1932 | 8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8, | |
| 1933 | 16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8, | |
| 1934 | 24*8,25*8,26*8,27*8,28*8,29*8,30*8,31*8 }, | |
| 1935 | { | |
| 1936 | 0*32*8,1*32*8,2*32*8,3*32*8,4*32*8,5*32*8,6*32*8,7*32*8, | |
| 1937 | 8*32*8,9*32*8,10*32*8,11*32*8,12*32*8,13*32*8,14*32*8,15*32*8, | |
| 1938 | 16*32*8,17*32*8,18*32*8,19*32*8,20*32*8,21*32*8,22*32*8,23*32*8, | |
| 1939 | 24*32*8,25*32*8,26*32*8,27*32*8,28*32*8,29*32*8,30*32*8,31*32*8 }, | |
| 1940 | 32*32*8 | |
| 1941 | }; | |
| 1942 | #endif | |
| 1943 | ||
| 1944 | 2239 | static GFXDECODE_START( namcos23 ) |
| 1945 | 2240 | GFXDECODE_ENTRY( NULL, 0, namcos23_cg_layout, 0x7f00, 0x80 ) |
| 1946 | 2241 | GFXDECODE_END |
| r7553 | r7554 | |
| 1965 | 2260 | MDRV_CPU_VBLANK_INT("screen", irq1_line_pulse) |
| 1966 | 2261 | |
| 1967 | 2262 | MDRV_CPU_ADD("ioboard", H83334, 14745600 ) |
| 1968 | MDRV_CPU_PROGRAM_MAP( | |
| 2263 | MDRV_CPU_PROGRAM_MAP( gorgoniobrdmap ) | |
| 1969 | 2264 | MDRV_CPU_IO_MAP( s23iobrdiomap ) |
| 1970 | 2265 | |
| 1971 | 2266 | MDRV_QUANTUM_TIME(HZ(60000)) |
| r7553 | r7554 | |
| 1997 | 2292 | MACHINE_DRIVER_END |
| 1998 | 2293 | |
| 1999 | 2294 | static MACHINE_DRIVER_START( s23 ) |
| 2000 | ||
| 2001 | 2295 | /* basic machine hardware */ |
| 2002 | 2296 | MDRV_CPU_ADD("maincpu", R4650BE, S23_BUSCLOCK*4) |
| 2003 | 2297 | MDRV_CPU_CONFIG(config) |
| r7553 | r7554 | |
| 2042 | 2336 | MACHINE_DRIVER_END |
| 2043 | 2337 | |
| 2044 | 2338 | static MACHINE_DRIVER_START( ss23 ) |
| 2045 | ||
| 2046 | 2339 | /* basic machine hardware */ |
| 2047 | 2340 | MDRV_CPU_ADD("maincpu", R4650BE, S23_BUSCLOCK*5) |
| 2048 | 2341 | MDRV_CPU_CONFIG(config) |
| r7553 | r7554 | |
| 2051 | 2344 | |
| 2052 | 2345 | MDRV_CPU_ADD("audiocpu", H83002, 14745600 ) |
| 2053 | 2346 | MDRV_CPU_PROGRAM_MAP( s23h8rwmap ) |
| 2054 | MDRV_CPU_IO_MAP( s23h8 | |
| 2347 | MDRV_CPU_IO_MAP( s23h8 | |
| 2055 | 2348 | MDRV_CPU_VBLANK_INT("screen", irq1_line_pulse) |
| 2056 | 2349 | |
| 2057 | MDRV_QUANTUM_TIME(HZ(60* | |
| 2350 | MDRV_QUANTUM_TIME(HZ(60*18000 | |
| 2058 | 2351 | |
| 2059 | 2352 | MDRV_SCREEN_ADD("screen", RASTER) |
| 2060 | 2353 | MDRV_SCREEN_REFRESH_RATE(S23_VSYNC1) |
| r7553 | r7554 | |
| 2082 | 2375 | MDRV_SOUND_ROUTE(3, "lspeaker", 1.00) |
| 2083 | 2376 | MACHINE_DRIVER_END |
| 2084 | 2377 | |
| 2378 | static MACHINE_DRIVER_START( ss23io ) | |
| 2379 | MDRV_IMPORT_FROM( ss23 ) | |
| 2380 | ||
| 2381 | MDRV_CPU_MODIFY("audiocpu") | |
| 2382 | MDRV_CPU_IO_MAP( s23h8iomap ) | |
| 2383 | ||
| 2384 | MDRV_CPU_ADD("ioboard", H83334, 14745600 ) | |
| 2385 | MDRV_CPU_PROGRAM_MAP( s23iobrdmap ) | |
| 2386 | MDRV_CPU_IO_MAP( s23iobrdiomap ) | |
| 2387 | MACHINE_DRIVER_END | |
| 2388 | ||
| 2389 | static MACHINE_DRIVER_START( gmen ) | |
| 2390 | MDRV_IMPORT_FROM( s23 ) | |
| 2391 | ||
| 2392 | MDRV_CPU_REPLACE("maincpu", R4650BE, S23_BUSCLOCK*5) | |
| 2393 | MDRV_CPU_PROGRAM_MAP(gmen_mips_map) | |
| 2394 | ||
| 2395 | MDRV_CPU_ADD("gmen", SH2, 28700000) | |
| 2396 | MDRV_CPU_PROGRAM_MAP(gmen_sh2_map) | |
| 2397 | ||
| 2398 | MDRV_MACHINE_RESET(gmen) | |
| 2399 | MACHINE_DRIVER_END | |
| 2400 | ||
| 2085 | 2401 | ROM_START( rapidrvr ) |
| 2086 | 2402 | ROM_REGION32_BE( 0x400000, "user1", 0 ) /* 4 megs for main R4650 code */ |
| 2087 | 2403 | ROM_LOAD16_BYTE( "rd3verc.ic2", 0x000000, 0x200000, CRC(c15c0f30) SHA1(9f529232818f3e184f81f62408a5cad615b05613) ) |
| r7553 | r7554 | |
| 2378 | 2694 | |
| 2379 | 2695 | ROM_REGION32_BE( 0x2000000, "data", 0 ) /* data roms */ |
| 2380 | 2696 | ROM_LOAD16_BYTE( "5gp1mtah.2j", 0x0000000, 0x800000, CRC(246e4b7a) SHA1(75743294b8f48bffb84f062febfbc02230d49ce9) ) |
| 2381 | | |
| 2697 | | |
| 2382 | 2698 | |
| 2383 | 2699 | /* COMMON FUJII YASUI WAKAO KURE INOUE |
| 2384 | 2700 | * 0x000000..0x57ffff: all 0xff |
| r7553 | r7554 | |
| 2419 | 2735 | ROM_REGION( 0x80000, "audiocpu", 0 ) /* Hitachi H8/3002 MCU code */ |
| 2420 | 2736 | ROM_LOAD16_WORD_SWAP( "m29f400.ic3", 0x000000, 0x080000, CRC(9fd69bbd) SHA1(53a9bf505de70495dcccc43fdc722b3381aad97c) ) |
| 2421 | 2737 | |
| 2738 | ROM_REGION( 0x40000, "ioboard", 0 ) /* I/O board HD643334 H8/3334 MCU code */ | |
| 2739 | ROM_LOAD( "asca-3a.ic14", 0x000000, 0x040000, CRC(8e9266e5) SHA1(ffa8782ca641d71d57df23ed1c5911db05d3df97) ) | |
| 2740 | ||
| 2422 | 2741 | ROM_REGION32_BE( 0x2000000, "data", 0 ) /* data roms */ |
| 2423 | 2742 | ROM_LOAD16_BYTE( "ffs1mtah.2j", 0x0000000, 0x800000, CRC(f336d81d) SHA1(a9177091e1412dea1b6ea6c53530ae31361b32d0) ) |
| 2424 | 2743 | ROM_LOAD16_BYTE( "ffs1mtal.2h", 0x0000001, 0x800000, CRC(98730ad5) SHA1(9ba276ad88ec8730edbacab80cdacc34a99593e4) ) |
| r7553 | r7554 | |
| 2458 | 2777 | ROM_REGION( 0x80000, "audiocpu", 0 ) /* Hitachi H8/3002 MCU code */ |
| 2459 | 2778 | ROM_LOAD16_WORD_SWAP( "m29f400.ic3", 0x000000, 0x080000, CRC(9fd69bbd) SHA1(53a9bf505de70495dcccc43fdc722b3381aad97c) ) |
| 2460 | 2779 | |
| 2780 | ROM_REGION( 0x40000, "ioboard", 0 ) /* I/O board HD643334 H8/3334 MCU code */ | |
| 2781 | ROM_LOAD( "asca-3a.ic14", 0x000000, 0x040000, CRC(8e9266e5) SHA1(ffa8782ca641d71d57df23ed1c5911db05d3df97) ) | |
| 2782 | ||
| 2461 | 2783 | ROM_REGION32_BE( 0x2000000, "data", 0 ) /* data roms */ |
| 2462 | 2784 | ROM_LOAD16_BYTE( "ffs1mtah.2j", 0x0000000, 0x800000, CRC(f336d81d) SHA1(a9177091e1412dea1b6ea6c53530ae31361b32d0) ) |
| 2463 | 2785 | ROM_LOAD16_BYTE( "ffs1mtal.2h", 0x0000001, 0x800000, CRC(98730ad5) SHA1(9ba276ad88ec8730edbacab80cdacc34a99593e4) ) |
| r7553 | r7554 | |
| 2505 | 2827 | ROM_LOAD16_BYTE( "pnp1mtal.2h", 0x000001, 0x800000, CRC(6490faaa) SHA1(03443746009b434e5d4074ea6314910418907360) ) |
| 2506 | 2828 | |
| 2507 | 2829 | ROM_REGION( 0x4000000, "textile", 0 ) /* texture tiles */ |
| 2508 | ROM_LOAD( "pnp1cguu.5f", 0x000000, 0x800000, CRC(cd64f57f) SHA1(8780270298e0823db1acbbf79396788df0c3c19c) ) | |
| 2509 | ROM_LOAD( "pnp1cgum.4j", 0x800000, 0x800000, CRC(206217ca) SHA1(9c095bba7764f3405c3fab10513b9b78981ec44d) ) | |
| 2830 | ROM_LOAD( "pnp1cguu.5f", 0x0000000, 0x800000, CRC(cd64f57f) SHA1(8780270298e0823db1acbbf79396788df0c3c19c) ) | |
| 2831 | ROM_LOAD( "pnp1cgum.4j", 0x0800000, 0x800000, CRC(206217ca) SHA1(9c095bba7764f3405c3fab10513b9b78981ec44d) ) | |
| 2510 | 2832 | ROM_LOAD( "pnp1cgll.4m", 0x1000000, 0x800000, CRC(d03932cf) SHA1(49240e44923cc6e815e9457b6290fd18466658af) ) |
| 2511 | ROM_LOAD( "pnp1cglm.5k", 0x180000, 0x800000, CRC(abf4ccf2) SHA1(3848e26d0ba6c872bbc6d5e0eb23a9d4b34152d5) ) | |
| 2833 | ROM_LOAD( "pnp1cglm.5k", 0x1800000, 0x800000, CRC(abf4ccf2) SHA1(3848e26d0ba6c872bbc6d5e0eb23a9d4b34152d5) ) | |
| 2512 | 2834 | ROM_LOAD( "pnp1cguu.4f", 0x2000000, 0x800000, CRC(cd64f57f) SHA1(8780270298e0823db1acbbf79396788df0c3c19c) ) |
| 2513 | 2835 | ROM_LOAD( "pnp1cgum.5j", 0x2800000, 0x800000, CRC(206217ca) SHA1(9c095bba7764f3405c3fab10513b9b78981ec44d) ) |
| 2514 | 2836 | ROM_LOAD( "pnp1cgll.5m", 0x3000000, 0x800000, CRC(d03932cf) SHA1(49240e44923cc6e815e9457b6290fd18466658af) ) |
| r7553 | r7554 | |
| 2531 | 2853 | ROM_LOAD( "pnp1waveh.2a", 0x800000, 0x800000, CRC(6fa1826a) SHA1(20a5af49e65ae2bc57c016b5cd9bafa5a5220d35) ) |
| 2532 | 2854 | ROM_END |
| 2533 | 2855 | |
| 2856 | ROM_START( gunwars ) | |
| 2857 | ROM_REGION32_BE( 0x400000, "user1", 0 ) /* 4 megs for main R4650 code */ | |
| 2858 | ROM_LOAD16_BYTE( "gm1vera.ic2", 0x000000, 0x200000, CRC(cf61467f) SHA1(eae79e4e540340cba7d576a36085f802b8032f4f) ) | |
| 2859 | ROM_LOAD16_BYTE( "gm1vera.ic1", 0x000001, 0x200000, CRC(abc9ffe6) SHA1(d833b9b9d8bb0cc4b53f30507c9603df9e63fa2f) ) | |
| 2534 | 2860 | |
| 2861 | ROM_REGION( 0x80000, "audiocpu", 0 ) /* Hitachi H8/3002 MCU code */ | |
| 2862 | ROM_LOAD16_WORD_SWAP( "gm1vera.ic3", 0x000000, 0x080000, CRC(5582fdd4) SHA1(8aae8bc6688d531888f2de509c07502ee355b3ab) ) | |
| 2863 | ||
| 2864 | ROM_REGION( 0x40000, "ioboard", 0 ) /* I/O board HD643334 H8/3334 MCU code. "ASCA-5;Ver 2.09;JPN,Multipurpose" */ | |
| 2865 | ROM_LOAD( "asc5_io-a.ic14", 0x000000, 0x020000, CRC(5964767f) SHA1(320db5e78ae23c5f94e368432d51573b409995db) ) | |
| 2866 | ||
| 2867 | ROM_REGION32_BE( 0x2000000, "data", 0 ) /* data roms */ | |
| 2868 | ROM_LOAD16_BYTE( "gm1mtah.2j", 0x000000, 0x800000, CRC(3cea9094) SHA1(497395425e409de47e1114de9aeeaf05e4f6a9a1) ) | |
| 2869 | ROM_LOAD16_BYTE( "gm1mtal.2h", 0x000001, 0x800000, CRC(d531dfcd) SHA1(9f7cbe9a03c1f7649bf05a7a30d47511573b50ba) ) | |
| 2870 | ||
| 2871 | ROM_REGION( 0x4000000, "textile", 0 ) /* texture tiles */ | |
| 2872 | ROM_LOAD( "gm1cguu.5f", 0x0000000, 0x800000, CRC(26a74698) SHA1(3f07d273abb3f2552dc6a29300f5dc2f2744c852) ) | |
| 2873 | ROM_LOAD( "gm1cgum.4j", 0x0800000, 0x800000, CRC(a7728944) SHA1(c187c6d66128554fcecc96e81d4f5396197e8280) ) | |
| 2874 | ROM_LOAD( "gm1cgll.4m", 0x1000000, 0x800000, CRC(936c0079) SHA1(3aec8caada35b7ed790bb3a8bcf6e01cad068fcd) ) | |
| 2875 | ROM_LOAD( "gm1cglm.4k", 0x1800000, 0x800000, CRC(e2ee5493) SHA1(1ffd74646796ad554d7967ba9fc18deab4fedadf) ) | |
| 2876 | ||
| 2877 | ROM_REGION( 0x4000000, "textile2", 0 ) /* second copy of texture tiles */ | |
| 2878 | ROM_LOAD( "gm1cguu.4f", 0x0000000, 0x800000, CRC(26a74698) SHA1(3f07d273abb3f2552dc6a29300f5dc2f2744c852) ) | |
| 2879 | ROM_LOAD( "gm1cgum.5j", 0x0800000, 0x800000, CRC(a7728944) SHA1(c187c6d66128554fcecc96e81d4f5396197e8280) ) | |
| 2880 | ROM_LOAD( "gm1cgll.5m", 0x1000000, 0x800000, CRC(936c0079) SHA1(3aec8caada35b7ed790bb3a8bcf6e01cad068fcd) ) | |
| 2881 | ROM_LOAD( "gm1cglm.5k", 0x1800000, 0x800000, CRC(e2ee5493) SHA1(1ffd74646796ad554d7967ba9fc18deab4fedadf) ) | |
| 2882 | ||
| 2883 | ROM_REGION( 0x800000, "textilemap", 0 ) /* texture tilemap */ | |
| 2884 | ROM_LOAD( "gm1ccrl.7f", 0x000000, 0x400000, CRC(2c54c182) SHA1(538dfb04653f8d86f976e702456bf4da97e3fda9) ) | |
| 2885 | ROM_LOAD( "gm1ccrh.7e", 0x400000, 0x200000, CRC(8563ef01) SHA1(59f09a08008a71a4bb12bd43a1b5dbe633d3061d) ) | |
| 2886 | ||
| 2887 | ROM_REGION( 0x800000, "textilemap2", 0 ) /* second copy of texture tilemap */ | |
| 2888 | ROM_LOAD( "gm1ccrl.7m", 0x000000, 0x400000, CRC(2c54c182) SHA1(538dfb04653f8d86f976e702456bf4da97e3fda9) ) | |
| 2889 | ROM_LOAD( "gm1ccrh.7k", 0x400000, 0x200000, CRC(8563ef01) SHA1(59f09a08008a71a4bb12bd43a1b5dbe633d3061d) ) | |
| 2890 | ||
| 2891 | ROM_REGION32_LE( 0x2000000, "pointrom", 0 ) /* 3D model data */ | |
| 2892 | ROM_LOAD32_WORD( "gm1pt0l.7c", 0x000000, 0x400000, CRC(62e9bedb) SHA1(7043c5e6f26139c9e6e18d4f35fac6a16d4dabd1) ) | |
| 2893 | ROM_LOAD32_WORD( "gm1pt0h.7a", 0x000002, 0x400000, CRC(5ebd658c) SHA1(9e7b89a726b11b6da3327d72ec6adcc30fbb384d) ) | |
| 2894 | ROM_LOAD32_WORD( "gm1pt1l.5c", 0x800000, 0x400000, CRC(f44c149f) SHA1(9f995de02ea6ac35ccbabbba5bb473a10e1ec667) ) | |
| 2895 | ROM_LOAD32_WORD( "gm1pt1h.5a", 0x800002, 0x400000, CRC(5f6cebab) SHA1(95bd30d30ea25509b66a107fb255d0af1e6a357e) ) | |
| 2896 | ||
| 2897 | ROM_REGION( 0x800000, "c352", 0 ) /* C352 PCM samples */ | |
| 2898 | ROM_LOAD( "gm1wave.2c", 0x000000, 0x800000, CRC(7d5c79a4) SHA1(b800a46bcca10cb0d0d9e0acfa68af63ae64dcaf) ) | |
| 2899 | ROM_END | |
| 2900 | ||
| 2535 | 2901 | /* Games */ |
| 2536 | GAME( 1997, rapidrvr, 0, gorgon, ss23, ss23, ROT0, "Namco", "Rapid River (RD3 Ver. C)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2537 | GAME( 1997, finlflng, 0, gorgon, ss23, ss23, ROT0, "Namco", "Final Furlong (FF2 Ver. A)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2538 | GAME( 1997, motoxgo, 0, s23, ss23, ss23, ROT0, "Namco", "Motocross Go! (MG3 Ver. A)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2539 | GAME( 1997, timecrs2, 0, s23, ss23, ss23, ROT0, "Namco", "Time Crisis 2 (TSS3 Ver. B)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2540 | GAME( 1997, timecrs2b,timecrs2, s23, ss23, ss23, ROT0, "Namco", "Time Crisis 2 (TSS2 Ver. B)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2541 | GAME( 1997, timecrs2c,timecrs2, ss23, ss23, ss23, ROT0, "Namco", "Time Crisis 2 (TSS4 Ver. A)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2542 | GAME( 1998, panicprk, 0, s23, ss23, ss23, ROT0, "Namco", "Panic Park (PNP2 Ver. A)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2543 | GAME( 1999, 500gp, 0, ss23, ss23, ss23, ROT0, "Namco", "500GP", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2544 | GAME( 1999, finfurl2, 0, ss23, ss23, ss23, ROT0, "Namco", "Final Furlong 2 (World)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2545 | GAME( 1999, finfurl2j,finfurl2, ss23, ss23, ss23, ROT0, "Namco", "Final Furlong 2 (Japan)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2902 | GAME( 1997, rapidrvr, 0, gorgon, gorgon, ss23, ROT0, "Namco", "Rapid River (RD3 Ver. C)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2903 | GAME( 1997, finlflng, 0, gorgon, gorgon, ss23, ROT0, "Namco", "Final Furlong (FF2 Ver. A)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2904 | GAME( 1997, motoxgo, 0, s23, s23, ss23, ROT0, "Namco", "Motocross Go! (MG3 Ver. A)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2905 | GAME( 1997, timecrs2, 0, s23, s23, ss23, ROT0, "Namco", "Time Crisis 2 (TSS3 Ver. B)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2906 | GAME( 1997, timecrs2b,timecrs2, s23, s23, ss23, ROT0, "Namco", "Time Crisis 2 (TSS2 Ver. B)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2907 | GAME( 1997, timecrs2c,timecrs2, ss23io, ss23, ss23, ROT0, "Namco", "Time Crisis 2 (TSS4 Ver. A)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2908 | GAME( 1998, panicprk, 0, s23, s23, ss23, ROT0, "Namco", "Panic Park (PNP2 Ver. A)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2909 | GAME( 1998, gunwars, 0, gmen, ss23, ss23, ROT0, "Namco", "Gunmen Wars (GM1 Ver. A)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2910 | GAME( 1999, 500gp, 0, ss23, ss23, ss23, ROT0, "Namco", "500GP", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2911 | GAME( 1999, finfurl2, 0, gmen, ss23, ss23, ROT0, "Namco", "Final Furlong 2 (World)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) | |
| 2912 | GAME( 1999, finfurl2j,finfurl2, gmen, ss23, ss23, ROT0, "Namco", "Final Furlong 2 (Japan)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND ) |
| r7553 | r7554 | |
|---|---|---|
| 1031 | 1031 | ROM_LOAD( "catnmous.14l", 0x0000, 0x0800, CRC(af79179a) SHA1(de61af7d02c93be326a33ee51572e3da7a25dab0) ) |
| 1032 | 1032 | |
| 1033 | 1033 | ROM_REGION( 0x0100, "plds", 0 ) |
| 1034 | ROM_LOAD( "82s100.13m", 0x0000, 0x00f5, NO_DUMP ) | |
| 1034 | ROM_LOAD( "catnmousa_82s100.13m", 0x0000, 0x00f5, NO_DUMP ) | |
| 1035 | 1035 | ROM_END |
| 1036 | 1036 | |
| 1037 | 1037 |
| r7553 | r7554 | |
|---|---|---|
| 481 | 481 | |
| 482 | 482 | if (cpu_get_pc(space->cpu)==0x060020E6) return_data = 0x10;//??? |
| 483 | 483 | |
| 484 | //if(LOG_SMPC) logerror ("cpu %s (PC=%08X) SMPC: Read from Byte Offset %02x Returns %02x\n", space->cpu->tag | |
| 484 | //if(LOG_SMPC) logerror ("cpu %s (PC=%08X) SMPC: Read from Byte Offset %02x Returns %02x\n", space->cpu->tag | |
| 485 | 485 | |
| 486 | 486 | |
| 487 | 487 | return return_data; |
| r7553 | r7554 | |
| 705 | 705 | smpc_ram[0x21] = (0x80) | ((NMI_reset & 1) << 6); |
| 706 | 706 | break; |
| 707 | 707 | default: |
| 708 | if(LOG_SMPC) logerror ("cpu '%s' (PC=%08X) SMPC: undocumented Command %02x\n", space->cpu->tag | |
| 708 | if(LOG_SMPC) logerror ("cpu '%s' (PC=%08X) SMPC: undocumented Command %02x\n", space->cpu->tag | |
| 709 | 709 | } |
| 710 | 710 | |
| 711 | 711 | // we've processed the command, clear status flag |
| r7553 | r7554 | |
| 895 | 895 | return 0xffffffff; |
| 896 | 896 | } |
| 897 | 897 | case 0x1c/4: |
| 898 | if(LOG_IOGA) logerror("(PC %s=%06x) Warning: READ from PORT_AD\n", space->cpu->tag | |
| 898 | if(LOG_IOGA) logerror("(PC %s=%06x) Warning: READ from PORT_AD\n", space->cpu->tag | |
| 899 | 899 | popmessage("Read from PORT_AD"); |
| 900 | 900 | port_i++; |
| 901 | 901 | return port_ad[port_i & 7]; |
| r7553 | r7554 | |
| 1357 | 1357 | stv_scu[40] != 0xffffffff) |
| 1358 | 1358 | { |
| 1359 | 1359 | if(LOG_SCU) logerror("cpu %s (PC=%08X) IRQ mask reg set %08x = %d%d%d%d|%d%d%d%d|%d%d%d%d|%d%d%d%d\n", |
| 1360 | space->cpu->tag | |
| 1360 | space->cpu->tag | |
| 1361 | 1361 | stv_scu[offset], |
| 1362 | 1362 | stv_scu[offset] & 0x8000 ? 1 : 0, /*A-Bus irq*/ |
| 1363 | 1363 | stv_scu[offset] & 0x4000 ? 1 : 0, /*<reserved>*/ |
| r7553 | r7554 | |
| 1965 | 1965 | * Enter into Radiant Silver Gun specific menu for a test... */ |
| 1966 | 1966 | static WRITE32_HANDLER( minit_w ) |
| 1967 | 1967 | { |
| 1968 | logerror("cpu %s (PC=%08X) MINIT write = %08x\n", space->cpu->tag | |
| 1968 | logerror("cpu %s (PC=%08X) MINIT write = %08x\n", space->cpu->tag | |
| 1969 | 1969 | cpuexec_boost_interleave(space->machine, minit_boost_timeslice, ATTOTIME_IN_USEC(minit_boost)); |
| 1970 | 1970 | cpuexec_trigger(space->machine, 1000); |
| 1971 | 1971 | sh2_set_frt_input(devtag_get_device(space->machine, "slave"), PULSE_LINE); |
| r7553 | r7554 | |
| 1973 | 1973 | |
| 1974 | 1974 | static WRITE32_HANDLER( sinit_w ) |
| 1975 | 1975 | { |
| 1976 | logerror("cpu %s (PC=%08X) SINIT write = %08x\n", space->cpu->tag | |
| 1976 | logerror("cpu %s (PC=%08X) SINIT write = %08x\n", space->cpu->tag | |
| 1977 | 1977 | cpuexec_boost_interleave(space->machine, sinit_boost_timeslice, ATTOTIME_IN_USEC(sinit_boost)); |
| 1978 | 1978 | sh2_set_frt_input(devtag_get_device(space->machine, "maincpu"), PULSE_LINE); |
| 1979 | 1979 | } |
| r7553 | r7554 | |
| 2315 | 2315 | { |
| 2316 | 2316 | COMBINE_DATA(&stv_workram_h[0xffc44/4]); |
| 2317 | 2317 | |
| 2318 | logerror("cpu %s (PC=%08X): 60ffc44_write write = %08X & %08X\n", space->cpu->tag | |
| 2318 | logerror("cpu %s (PC=%08X): 60ffc44_write write = %08X & %08X\n", space->cpu->tag | |
| 2319 | 2319 | //sinit_w(offset,data,mem_mask); |
| 2320 | 2320 | } |
| 2321 | 2321 | |
| r7553 | r7554 | |
| 2323 | 2323 | { |
| 2324 | 2324 | COMBINE_DATA(&stv_workram_h[0xffc48/4]); |
| 2325 | 2325 | |
| 2326 | logerror("cpu %s (PC=%08X): 60ffc48_write write = %08X & %08X\n", space->cpu->tag | |
| 2326 | logerror("cpu %s (PC=%08X): 60ffc48_write write = %08X & %08X\n", space->cpu->tag | |
| 2327 | 2327 | //minit_w(offset,data,mem_mask); |
| 2328 | 2328 | } |
| 2329 | 2329 | |
| r7553 | r7554 | |
| 2573 | 2573 | SCU register[40] is for IRQ masking. |
| 2574 | 2574 | */ |
| 2575 | 2575 | |
| 2576 | ||
| 2576 | # | |
| 2577 | 2577 | |
| 2578 | /* theoretical function about how this irq system should work, not yet implemented because the performance speed hits very very badly. | |
| 2579 | It's not tested much either, but I'm aware that timer 1 doesn't work with this for whatever reason ... */ | |
| 2580 | static TIMER_CALLBACK( stv_irq_callback ) | |
| 2581 | { | |
| 2582 | int hpos = video_screen_get_hpos(machine->primary_screen); | |
| 2583 | int vpos = video_screen_get_vpos(machine->primary_screen); | |
| 2584 | rectangle visarea = *video_screen_get_visible_area(machine->primary_screen); | |
| 2585 | ||
| 2586 | h_sync = visarea.max_x+1;//horz | |
| 2587 | v_sync = visarea.max_y+1;//vert | |
| 2588 | ||
| 2589 | if(vpos == v_sync && hpos == 0) | |
| 2590 | VBLANK_IN_IRQ; | |
| 2591 | if(hpos == 0 && vpos == 0) | |
| 2592 | VBLANK_OUT_IRQ; | |
| 2593 | if(hpos == h_sync) | |
| 2594 | TIMER_0_IRQ; | |
| 2595 | if(hpos == h_sync && (vpos != 0 && vpos != v_sync)) | |
| 2596 | { | |
| 2597 | HBLANK_IN_IRQ; | |
| 2598 | timer_0++; | |
| 2599 | } | |
| 2600 | ||
| 2601 | /*TODO: timing of this one (related to the VDP1 speed)*/ | |
| 2602 | /* (NOTE: value shouldn't be at h_sync/v_sync position (will break shienryu))*/ | |
| 2603 | if(hpos == 40 && vpos == 0) | |
| 2604 | VDP1_IRQ; | |
| 2605 | ||
| 2606 | if(hpos == timer_1) | |
| 2607 | TIMER_1_IRQ; | |
| 2608 | ||
| 2609 | if(hpos <= h_sync) | |
| 2610 | timer_adjust_oneshot(scan_timer, video_screen_get_time_until_pos(machine->primary_screen, vpos, hpos+1), 0); | |
| 2611 | else if(vpos <= v_sync) | |
| 2612 | timer_adjust_oneshot(scan_timer, video_screen_get_time_until_pos(machine->primary_screen, vpos+1, 0), 0); | |
| 2613 | else | |
| 2614 | timer_adjust_oneshot(scan_timer, video_screen_get_time_until_pos(machine->primary_screen, 0, 0), 0); | |
| 2615 | } | |
| 2616 | ||
| 2617 | #endif | |
| 2618 | ||
| 2619 | ||
| 2578 | 2620 | static running_device *vblank_out_timer,*scan_timer,*t1_timer; |
| 2579 | 2621 | static int h_sync,v_sync; |
| 2580 | 2622 | static int cur_scan; |
| r7553 | r7554 | |
|---|---|---|
| 4676 | 4676 | ROM_START( froggers2 ) |
| 4677 | 4677 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 4678 | 4678 | ROM_LOAD( "epr-1012.ic5", 0x0000, 0x1000, CRC(efab0c79) SHA1(68c99b6cdcb9396bb473739a62ffc009b4bf57d5) ) |
| 4679 | ROM_LOAD( "epr-1013.ic6", | |
| 4679 | ROM_LOAD( "epr-1013a.ic6", | |
| 4680 | 4680 | ROM_LOAD( "epr-1014.ic7", 0x2000, 0x1000, CRC(dd251066) SHA1(4612e1fe1ab7182a277140b1a1976cc17e0746a5) ) |
| 4681 | ROM_LOAD( "epr-101 | |
| 4681 | ROM_LOAD( "epr-1015.ic8", 0x3000, 0x1000, CRC(bf293a02) SHA1(be94e9f5caa74c3de6fd95bd20928f4a9c514227) ) | |
| 4682 | 4682 | |
| 4683 | 4683 | ROM_REGION( 0x10000, "audiocpu", 0 ) |
| 4684 | 4684 | ROM_LOAD( "epr-608.ic32", 0x0000, 0x0800, CRC(e8ab0256) SHA1(f090afcfacf5f13cdfa0dfda8e3feb868c6ce8bc) ) |
| r7553 | r7554 | |
|---|---|---|
| 943 | 943 | { |
| 944 | 944 | if (cpu_get_pc(space->cpu) == 0x2f) return 0xfb; |
| 945 | 945 | |
| 946 | logerror ("cpu '%s' (PC=%08X): unmapped prot read\n", space->cpu->tag | |
| 946 | logerror ("cpu '%s' (PC=%08X): unmapped prot read\n", space->cpu->tag | |
| 947 | 947 | return 0x00; |
| 948 | 948 | |
| 949 | 949 | } |
| r7553 | r7554 | |
|---|---|---|
| 1847 | 1847 | |
| 1848 | 1848 | ROM_START( cupsoca ) |
| 1849 | 1849 | ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ |
| 1850 | ROM_LOAD32_BYTE( "1.bin", 0x000000, 0x040000, CRC(d5f76bd6) SHA1(5e7c3843f6f497a24b8236a9307d347fb24dd0d5) ) | |
| 1851 | ROM_LOAD32_BYTE( "2.bin", 0x000001, 0x040000, CRC(34966aa1) SHA1(f07bca19bd92a60c04aa9b23e5d2d2eac073d2e4) ) | |
| 1852 | ROM_LOAD32_BYTE( "3.bin", 0x000002, 0x040000, CRC(2b7934ec) SHA1(b78e7079e03b23853397a3848c93f60702ac1c33) ) | |
| 1853 | ROM_LOAD32_BYTE( "4.bin", 0x000003, 0x040000, CRC(f4aa1d90) SHA1(eb94efc8cc623434b4c9a22e63d262e80ca84d83) ) | |
| 1850 | ROM_LOAD32_BYTE( "soca_1.bin", 0x000000, 0x040000, CRC(d5f76bd6) SHA1(5e7c3843f6f497a24b8236a9307d347fb24dd0d5) ) | |
| 1851 | ROM_LOAD32_BYTE( "soca_2.bin", 0x000001, 0x040000, CRC(34966aa1) SHA1(f07bca19bd92a60c04aa9b23e5d2d2eac073d2e4) ) | |
| 1852 | ROM_LOAD32_BYTE( "soca_3.bin", 0x000002, 0x040000, CRC(2b7934ec) SHA1(b78e7079e03b23853397a3848c93f60702ac1c33) ) | |
| 1853 | ROM_LOAD32_BYTE( "soca_4.bin", 0x000003, 0x040000, CRC(f4aa1d90) SHA1(eb94efc8cc623434b4c9a22e63d262e80ca84d83) ) | |
| 1854 | 1854 | |
| 1855 | 1855 | ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */ |
| 1856 | 1856 | ROM_LOAD( "seibu7.8a", 0x000000, 0x08000, CRC(f63329f9) SHA1(51736de48efc14415cfdf169b43623d4c95fde2b) ) |
| r7553 | r7554 | |
| 1858 | 1858 | ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 ) |
| 1859 | 1859 | |
| 1860 | 1860 | ROM_REGION( 0x020000, "gfx1", 0 ) |
| 1861 | ROM_LOAD16_BYTE( "6.bin", 0x000000, 0x010000, CRC(a9e15910) SHA1(305541b16a87d0e38871240fa2e111bb9332e93c) ) | |
| 1862 | ROM_LOAD16_BYTE( "5.bin", 0x000001, 0x010000, CRC(73a3e024) SHA1(aeb359dd2dc9eb96330f494c44123bab3f5986a4) ) | |
| 1861 | ROM_LOAD16_BYTE( "soca_6.bin", 0x000000, 0x010000, CRC(a9e15910) SHA1(305541b16a87d0e38871240fa2e111bb9332e93c) ) | |
| 1862 | ROM_LOAD16_BYTE( "soca_5.bin", 0x000001, 0x010000, CRC(73a3e024) SHA1(aeb359dd2dc9eb96330f494c44123bab3f5986a4) ) | |
| 1863 | 1863 | |
| 1864 | 1864 | ROM_REGION( 0x200000, "gfx2", 0 ) |
| 1865 | 1865 | ROM_LOAD( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) ) |
| r7553 | r7554 | |
|---|---|---|
| 603 | 603 | ROM_LOAD("u59.bin", 0x02000, 0x2000, CRC(84226547) SHA1(df9c2c01a7ac4d930c06a8c4863853ddb1a2adbe)) // sound and video rom |
| 604 | 604 | |
| 605 | 605 | /* GAME EPROMS */ |
| 606 | ROM_LOAD("u87.bin", 0x06000, 0x2000, CRC(03c2890f) SHA1(10d479b7ccece813676ad815a96169bbf259c49d)) // game code | |
| 607 | ROM_LOAD("u86.bin", 0x08000, 0x8000, CRC(36125194) SHA1(dc681dc60b25893ca3ee101f6813c22b914771f5)) // game code | |
| 606 | ROM_LOAD("a_u87.bin", 0x06000, 0x2000, CRC(03c2890f) SHA1(10d479b7ccece813676ad815a96169bbf259c49d)) // game code | |
| 607 | ROM_LOAD("a_u86.bin", 0x08000, 0x8000, CRC(36125194) SHA1(dc681dc60b25893ca3ee101f6813c22b914771f5)) // game code | |
| 608 | 608 | |
| 609 | 609 | /* SHAPE EPROMS */ |
| 610 | 610 | ROM_REGION(0xc000, "tile_gfx", 0 ) |
| r7553 | r7554 | |
|---|---|---|
| 10 | 10 | - inputs; |
| 11 | 11 | - Understand how tilemap color offsets really works; |
| 12 | 12 | - Discrete sound part? There's a Rossini's "William Tell" bgm on the Chinese bootlegs, |
| 13 | I think it's tied with ay8910 port B. | |
| 13 | I think it's tied with ay8910 port B. Update: the 1986 version sounds that just fine, could be | |
| 14 | that this is a btanb; | |
| 14 | 15 | - unknown memories; |
| 15 | - Garbage on the window tilemap if you win, it could be a | |
| 16 | - Garbage on the window tilemap if you win, it could be a btanb (masked by the color prom). | |
| 16 | 17 | - the name "King Derby" is a raw guess, there's a chance that it uses a different name |
| 17 | 18 | (but there isn't any title screen in the game?) |
| 18 | 19 | - Fix I/O in the 1986 bootleg version; |
| r7553 | r7554 | |
| 368 | 369 | AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("DSW") |
| 369 | 370 | ADDRESS_MAP_END |
| 370 | 371 | |
| 372 | static WRITE8_HANDLER( kingdrbb_lamps_w ) | |
| 373 | { | |
| 374 | // (same as the inputs but active high) | |
| 375 | } | |
| 376 | ||
| 371 | 377 | static ADDRESS_MAP_START( slave_1986_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 372 | 378 | AM_RANGE(0x0000, 0x2fff) AM_ROM |
| 373 | 379 | AM_RANGE(0x3000, 0x3fff) AM_ROM //sound rom tested for the post check |
| 374 | 380 | AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) //backup ram |
| 375 | 381 | AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) /* I/O Ports */ |
| 376 | ||
| 382 | // AM_RANGE(0x6000, 0x6003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w) /* I/O Ports */ | |
| 377 | 383 | AM_RANGE(0x7000, 0x73ff) AM_RAM AM_SHARE("share1") |
| 378 | 384 | AM_RANGE(0x7400, 0x74ff) AM_RAM AM_BASE_GENERIC(spriteram) |
| 379 | 385 | AM_RANGE(0x7600, 0x7600) AM_DEVWRITE("crtc", mc6845_address_w) |
| 380 | 386 | AM_RANGE(0x7601, 0x7601) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w) |
| 381 | // AM_RANGE(0x7800, 0x7803) AM_READ(test_r) | |
| 382 | AM_RANGE(0x7a00, 0x7a00) AM_RAM //buffer for the key matrix | |
| 387 | AM_RANGE(0x7800, 0x7800) AM_READ_PORT("KEY0") | |
| 388 | AM_RANGE(0x7801, 0x7801) AM_READ_PORT("KEY1") | |
| 389 | AM_RANGE(0x7802, 0x7802) AM_READ_PORT("KEY2") | |
| 390 | AM_RANGE(0x7803, 0x7803) AM_READ_PORT("KEY3") | |
| 391 | AM_RANGE(0x7800, 0x7803) AM_WRITE(kingdrbb_lamps_w) | |
| 392 | AM_RANGE(0x7a00, 0x7a00) AM_READ_PORT("SYSTEM") | |
| 383 | 393 | AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("DSW") |
| 384 | 394 | ADDRESS_MAP_END |
| 385 | 395 | |
| r7553 | r7554 | |
| 442 | 452 | } |
| 443 | 453 | }; |
| 444 | 454 | |
| 455 | static WRITE8_DEVICE_HANDLER( outportb_w ) | |
| 456 | { | |
| 457 | // printf("%02x B\n",data); | |
| 458 | } | |
| 459 | ||
| 460 | ||
| 445 | 461 | static const ppi8255_interface ppi8255_1986_intf[2] = |
| 446 | 462 | { |
| 447 | 463 | /* C as input, (all) as output */ |
| 448 | 464 | { |
| 449 | 465 | DEVCB_NULL, /* Port A read */ |
| 450 | 466 | DEVCB_INPUT_PORT("IN0"), /* Port B read */ |
| 451 | DEVCB_INPUT_PORT("IN1"), /* Port C read */ | |
| 452 | DEVCB_NULL, /* Port A write */ | |
| 453 | DEVCB_NULL, /* Port B write */ | |
| 454 | DEVCB_NULL /* Port C write */ | |
| 467 | DEVCB_INPUT_PORT("IN1"), /* Port C read */ | |
| 468 | DEVCB_HANDLER(sound_cmd_w), /* Port A write */ | |
| 469 | DEVCB_HANDLER(outportb_w), /* Port B write */ | |
| 470 | DEVCB_NULL /* Port C write */ | |
| 455 | 471 | }, |
| 456 | 472 | |
| 457 | /* */ | |
| 473 | /* actually unused */ | |
| 458 | 474 | { |
| 459 | 475 | DEVCB_NULL, /* Port A read */ |
| 460 | DEVCB_HANDLER(key_matrix_r),/* Port B read */ | |
| 461 | DEVCB_HANDLER(input_mux_r), /* Port C read */ | |
| 462 | DEVCB_HANDLER(sound_cmd_w), /* Port A write */ | |
| 476 | DEVCB_NULL, /* Port B read */ | |
| 477 | DEVCB_NULL, /* Port C read */ | |
| 478 | DEVCB_NULL, /* Port A write */ | |
| 463 | 479 | DEVCB_NULL, /* Port B write */ |
| 464 | DEVCB_ | |
| 480 | DEVCB_ | |
| 465 | 481 | } |
| 466 | 482 | }; |
| 467 | 483 | |
| r7553 | r7554 | |
| 623 | 639 | PORT_DIPNAME( 0x40, 0x40, "POST Check" ) |
| 624 | 640 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 625 | 641 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 626 | PORT_DIPNAME( 0x80, 0x80, | |
| 642 | PORT_DIPNAME( 0x80, 0x80, " | |
| 627 | 643 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 628 | 644 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 629 | 645 | INPUT_PORTS_END |
| r7553 | r7554 | |
| 702 | 718 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 703 | 719 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 704 | 720 | |
| 705 | PORT_START("KEY_1P") // ppi1 (6001) | |
| 706 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("1P 1-2") PORT_CODE(KEYCODE_Q) | |
| 707 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("1P 1-3") PORT_CODE(KEYCODE_W) | |
| 708 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("1P 1-4") PORT_CODE(KEYCODE_E) | |
| 709 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("1P 1-5") PORT_CODE(KEYCODE_R) | |
| 710 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("1P 1-6") PORT_CODE(KEYCODE_T) | |
| 711 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("1P 2-3") PORT_CODE(KEYCODE_A) | |
| 712 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("1P 2-4") PORT_CODE(KEYCODE_S) | |
| 713 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("1P 2-5") PORT_CODE(KEYCODE_D) | |
| 714 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("1P 2-6") PORT_CODE(KEYCODE_F) | |
| 715 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("1P 3-4") PORT_CODE(KEYCODE_G) | |
| 716 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON11 ) PORT_NAME("1P 3-5") PORT_CODE(KEYCODE_H) | |
| 717 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON12 ) PORT_NAME("1P 3-6") PORT_CODE(KEYCODE_Z) | |
| 718 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON13 ) PORT_NAME("1P 4-5") PORT_CODE(KEYCODE_X) | |
| 719 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON14 ) PORT_NAME("1P 4-6") PORT_CODE(KEYCODE_C) | |
| 720 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON15 ) PORT_NAME("1P 5-6") PORT_CODE(KEYCODE_V) | |
| 721 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 722 | ||
| 723 | PORT_START("KEY_2P") // ppi1 (6001) | |
| 724 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("2P 1-2") PORT_CODE(KEYCODE_Q) PORT_COCKTAIL | |
| 725 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("2P 1-3") PORT_CODE(KEYCODE_W) PORT_COCKTAIL | |
| 726 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("2P 1-4") PORT_CODE(KEYCODE_E) PORT_COCKTAIL | |
| 727 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("2P 1-5") PORT_CODE(KEYCODE_R) PORT_COCKTAIL | |
| 728 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("2P 1-6") PORT_CODE(KEYCODE_T) PORT_COCKTAIL | |
| 729 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("2P 2-3") PORT_CODE(KEYCODE_A) PORT_COCKTAIL | |
| 730 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("2P 2-4") PORT_CODE(KEYCODE_S) PORT_COCKTAIL | |
| 731 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("2P 2-5") PORT_CODE(KEYCODE_D) PORT_COCKTAIL | |
| 732 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("2P 2-6") PORT_CODE(KEYCODE_F) PORT_COCKTAIL | |
| 733 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("2P 3-4") PORT_CODE(KEYCODE_G) PORT_COCKTAIL | |
| 734 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON11 ) PORT_NAME("2P 3-5") PORT_CODE(KEYCODE_H) PORT_COCKTAIL | |
| 735 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON12 ) PORT_NAME("2P 3-6") PORT_CODE(KEYCODE_Z) PORT_COCKTAIL | |
| 736 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON13 ) PORT_NAME("2P 4-5") PORT_CODE(KEYCODE_X) PORT_COCKTAIL | |
| 737 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON14 ) PORT_NAME("2P 4-6") PORT_CODE(KEYCODE_C) PORT_COCKTAIL | |
| 738 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON15 ) PORT_NAME("2P 5-6") PORT_CODE(KEYCODE_V) PORT_COCKTAIL | |
| 739 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 740 | ||
| 741 | PORT_START("MUX0") // ppi1 (6002) | |
| 742 | PORT_DIPNAME( 0x01, 0x01, "SYSTEM" ) | |
| 743 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 744 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 745 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 721 | PORT_START("SYSTEM") // ppi0 (5001) | |
| 722 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 723 | PORT_DIPNAME( 0x02, 0x02, "SYSTEM" ) | |
| 746 | 724 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 747 | 725 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 748 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 749 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 750 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 726 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) | |
| 751 | 727 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 752 | 728 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 753 | 729 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r7553 | r7554 | |
| 760 | 736 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 761 | 737 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 762 | 738 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 763 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 739 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) //causes "hopper overpay" msg | |
| 764 | 740 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 765 | 741 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 766 | 742 | |
| 767 | PORT_START("MUX1") | |
| 768 | PORT_DIPNAME( 0x01, 0x01, "SYSTEM" ) | |
| 769 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 770 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 771 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 772 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 773 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 774 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 775 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 776 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 777 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 778 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 779 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 780 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 781 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 782 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 783 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 784 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 785 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 786 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 787 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 788 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 789 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 790 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 791 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 743 | PORT_START("KEY0") // (7800) | |
| 744 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("1P 1-2") PORT_CODE(KEYCODE_Q) | |
| 745 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("1P 1-3") PORT_CODE(KEYCODE_W) | |
| 746 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("1P 1-4") PORT_CODE(KEYCODE_E) | |
| 747 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("1P 1-5") PORT_CODE(KEYCODE_R) | |
| 748 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 792 | 749 | |
| 750 | PORT_START("KEY1") // (7801) | |
| 751 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("1P 1-6") PORT_CODE(KEYCODE_T) | |
| 752 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("1P 2-3") PORT_CODE(KEYCODE_A) | |
| 753 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("1P 2-4") PORT_CODE(KEYCODE_S) | |
| 754 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("1P 2-5") PORT_CODE(KEYCODE_D) | |
| 755 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 756 | ||
| 757 | PORT_START("KEY2") | |
| 758 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("1P 2-6") PORT_CODE(KEYCODE_F) | |
| 759 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("1P 3-4") PORT_CODE(KEYCODE_G) | |
| 760 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("1P 3-5") PORT_CODE(KEYCODE_H) | |
| 761 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_NAME("1P 3-6") PORT_CODE(KEYCODE_Z) | |
| 762 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 763 | ||
| 764 | PORT_START("KEY3") | |
| 765 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_NAME("1P 4-5") PORT_CODE(KEYCODE_X) | |
| 766 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_NAME("1P 4-6") PORT_CODE(KEYCODE_C) | |
| 767 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("1P 5-6") PORT_CODE(KEYCODE_V) | |
| 768 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 769 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 770 | ||
| 793 | 771 | PORT_START("DSW") |
| 794 | 772 | PORT_DIPNAME( 0x01, 0x01, "SYSTEM" ) |
| 795 | 773 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| r7553 | r7554 | |
| 812 | 790 | PORT_DIPNAME( 0x40, 0x40, "POST Check" ) |
| 813 | 791 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 814 | 792 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 815 | PORT_DIPNAME( 0x80, 0x80, | |
| 793 | PORT_DIPNAME( 0x80, 0x80, " | |
| 816 | 794 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 817 | 795 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 818 | 796 | INPUT_PORTS_END |
| r7553 | r7554 | |
| 955 | 933 | } |
| 956 | 934 | } |
| 957 | 935 | |
| 936 | static PALETTE_INIT(kingdrbb) | |
| 937 | { | |
| 938 | UINT8 *raw_prom = memory_region(machine, "raw_prom"); | |
| 939 | UINT8 *prom = memory_region(machine, "proms"); | |
| 940 | int bit0, bit1, bit2 , r, g, b; | |
| 941 | int i; | |
| 942 | ||
| 943 | for(i = 0; i < 0x200; i++) | |
| 944 | { | |
| 945 | /* this set has an extra address line shuffle applied on the prom */ | |
| 946 | prom[i] = raw_prom[BITSWAP16(i, 15,14,13,12,11,10,9,8,7,6,5,0,1,2,3,4)+0x1000]; | |
| 947 | } | |
| 948 | ||
| 949 | for(i = 0; i < 0x200; i++) | |
| 950 | { | |
| 951 | bit0 = 0; | |
| 952 | bit1 = (prom[i] >> 1) & 0x01; | |
| 953 | bit2 = (prom[i] >> 0) & 0x01; | |
| 954 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 955 | bit0 = (prom[i] >> 4) & 0x01; | |
| 956 | bit1 = (prom[i] >> 3) & 0x01; | |
| 957 | bit2 = (prom[i] >> 2) & 0x01; | |
| 958 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 959 | bit0 = (prom[i] >> 7) & 0x01; | |
| 960 | bit1 = (prom[i] >> 6) & 0x01; | |
| 961 | bit2 = (prom[i] >> 5) & 0x01; | |
| 962 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 963 | ||
| 964 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 965 | } | |
| 966 | } | |
| 967 | ||
| 958 | 968 | static MACHINE_DRIVER_START( kingdrby ) |
| 959 | 969 | MDRV_CPU_ADD("master", Z80, CLK_2) |
| 960 | 970 | MDRV_CPU_PROGRAM_MAP(master_map) |
| r7553 | r7554 | |
| 1007 | 1017 | MDRV_CPU_MODIFY("slave") |
| 1008 | 1018 | MDRV_CPU_PROGRAM_MAP(slave_1986_map) |
| 1009 | 1019 | |
| 1020 | MDRV_PALETTE_INIT(kingdrbb) | |
| 1021 | ||
| 1010 | 1022 | MDRV_PPI8255_RECONFIG( "ppi8255_0", ppi8255_1986_intf[0] ) |
| 1011 | 1023 | MDRV_PPI8255_RECONFIG( "ppi8255_1", ppi8255_1986_intf[1] ) |
| 1012 | 1024 | MACHINE_DRIVER_END |
| r7553 | r7554 | |
| 1019 | 1031 | MDRV_CPU_IO_MAP(cowrace_sound_io) |
| 1020 | 1032 | |
| 1021 | 1033 | MDRV_GFXDECODE(cowrace) |
| 1034 | MDRV_PALETTE_INIT(kingdrby) | |
| 1022 | 1035 | |
| 1023 | 1036 | MDRV_SOUND_ADD("oki", OKIM6295, 1056000) |
| 1024 | 1037 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) // clock frequency & pin 7 not verified |
| r7553 | r7554 | |
| 1089 | 1102 | ROM_REGION( 0x4000, "raw_prom", 0 ) |
| 1090 | 1103 | ROM_LOAD( "kingdrbb_u1.bin", 0x0000, 0x4000, CRC(97931952) SHA1(a0ef3be105f2ed7f744c73e92c583d25bb322e6a) ) // palette but in a normal rom? |
| 1091 | 1104 | |
| 1092 | ROM_REGION( 0x200, "proms", 0 ) | |
| 1093 | ROM_COPY( "raw_prom", 0x1000, 0x000, 0x200 ) | |
| 1105 | ROM_REGION( 0x200, "proms", ROMREGION_ERASE00 ) // address shuffled, decoded inside PALETTE_INIT | |
| 1106 | // ROM_COPY( "raw_prom", 0x1000, 0x000, 0x200 ) | |
| 1094 | 1107 | // ROM_COPY( "raw_prom", 0x3000, 0x200, 0x200 ) //identical to 0x1000 bank |
| 1095 | 1108 | |
| 1096 | 1109 | ROM_REGION( 0x4000, "pals", 0 ) // all read protected |
| r7553 | r7554 | |
| 1136 | 1149 | |
| 1137 | 1150 | |
| 1138 | 1151 | GAME( 1981, kingdrby, 0, kingdrby, kingdrby, 0, ROT0, "Tazmi", "King Derby (1981)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS| GAME_IMPERFECT_SOUND ) |
| 1139 | GAME( 1986, kingdrbb, kingdrby, kingdrbb, kingdrbb, 0, ROT0, "bootleg", "King Derby (1986 Taiwan bootleg)", GAME_ | |
| 1152 | GAME( 1986, kingdrbb, kingdrby, kingdrbb, kingdrbb, 0, ROT0, "bootleg", "King Derby (1986 Taiwan bootleg)", GAME_ | |
| 1140 | 1153 | GAME( 2000, cowrace, kingdrby, cowrace, kingdrbb, 0, ROT0, "bootleg", "Cow Race (1986 King Derby hack)", GAME_NOT_WORKING | GAME_WRONG_COLORS ) |
| r7553 | r7554 | |
|---|---|---|
| 365 | 365 | |
| 366 | 366 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 367 | 367 | ROM_LOAD( "069a04", 0x000000, 0x200000, CRC(11d6dcd6) SHA1(04cbff9f61cd8641db538db809ddf20da29fd5ac) ) |
| 368 | ||
| 369 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 370 | ROM_LOAD( "gijoe.nv", 0x0000, 0x080, CRC(a0d50a79) SHA1(972533ea45a0e84d9dd14c55f58cd7247926792e) ) | |
| 368 | 371 | ROM_END |
| 369 | 372 | |
| 370 | 373 | ROM_START( gijoeu ) |
| r7553 | r7554 | |
| 389 | 392 | |
| 390 | 393 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 391 | 394 | ROM_LOAD( "069a04", 0x000000, 0x200000, CRC(11d6dcd6) SHA1(04cbff9f61cd8641db538db809ddf20da29fd5ac) ) |
| 395 | ||
| 396 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 397 | ROM_LOAD( "gijoeu.nv", 0x0000, 0x080, CRC(ca966023) SHA1(6f07ece0f95213bc12387192986f468d23dfdfc8) ) | |
| 392 | 398 | ROM_END |
| 393 | 399 | |
| 394 | 400 | ROM_START( gijoej ) |
| r7553 | r7554 | |
| 413 | 419 | |
| 414 | 420 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 415 | 421 | ROM_LOAD( "069a04", 0x000000, 0x200000, CRC(11d6dcd6) SHA1(04cbff9f61cd8641db538db809ddf20da29fd5ac) ) |
| 422 | ||
| 423 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 424 | ROM_LOAD( "gijoej.nv", 0x0000, 0x080, CRC(c914fcf2) SHA1(b4f0a0b5d6d4075b004b061336d162336ce1a754) ) | |
| 416 | 425 | ROM_END |
| 417 | 426 | |
| 418 | 427 |
| r7553 | r7554 | |
|---|---|---|
| 1467 | 1467 | ROM_LOAD( "63701.bin", 0xc000, 0x4000, CRC(f5232d03) SHA1(e2a194e38633592fd6587690b3cb2669d93985c7) ) |
| 1468 | 1468 | |
| 1469 | 1469 | ROM_REGION( 0x10000, "soundcpu", 0 ) /* audio cpu */ |
| 1470 | ROM_LOAD( "3.bin", | |
| 1470 | ROM_LOAD( "b2_3.bin", | |
| 1471 | 1471 | |
| 1472 | 1472 | ROM_REGION( 0x08000, "gfx1", 0 ) |
| 1473 | 1473 | ROM_LOAD( "8.bin", 0x00000, 0x08000, CRC(7a8b8db4) SHA1(8368182234f9d4d763d4714fd7567a9e31b7ebeb) ) /* chars */ |
| r7553 | r7554 | |
| 1489 | 1489 | ROM_LOAD( "20.bin", 0x30000, 0x10000, CRC(5fb42e7c) SHA1(7953316712c56c6f8ca6bba127319e24b618b646) ) |
| 1490 | 1490 | |
| 1491 | 1491 | ROM_REGION( 0x20000, "adpcm", 0 ) /* adpcm samples */ |
| 1492 | ROM_LOAD( "1.bin", | |
| 1492 | ROM_LOAD( "b2_1.bin", | |
| 1493 | 1493 | ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(904de6f8) SHA1(3623e5ea05fd7c455992b7ed87e605b87c3850aa) ) |
| 1494 | 1494 | |
| 1495 | 1495 | ROM_REGION( 0x0300, "proms", 0 ) |
| r7553 | r7554 | |
| 1530 | 1530 | ROM_LOAD( "27.bin", 0x28000, 0x08000, CRC(15cd16cb) SHA1(ab2068ebba14da256e8f2600f34dca0e048a1de9) ) |
| 1531 | 1531 | ROM_LOAD( "28.bin", 0x30000, 0x08000, CRC(51b8a217) SHA1(60c067cd7272f856e29cdb64312535236656891a) ) |
| 1532 | 1532 | ROM_LOAD( "29.bin", 0x38000, 0x08000, CRC(e4ec2394) SHA1(43376ce2a07c1fc3053f7ac9b750e944d289105b) ) |
| 1533 | ROM_LOAD( "1.bin", | |
| 1533 | ROM_LOAD( "6809_1.bin", | |
| 1534 | 1534 | ROM_LOAD( "2.bin", 0x48000, 0x08000, CRC(6940120d) SHA1(bbe94f095ef983f54658c936f916ba6a72a84ead) ) |
| 1535 | 1535 | ROM_LOAD( "3.bin", 0x50000, 0x08000, CRC(c67aac12) SHA1(aab535507e3889bf1bdc2f4fe4828a70a350ba63) ) |
| 1536 | 1536 | ROM_LOAD( "4.bin", 0x58000, 0x08000, CRC(941dcd08) SHA1(266dee264f28affe8c3f57fe569929817ae16508) ) |
| r7553 | r7554 | |
| 1541 | 1541 | |
| 1542 | 1542 | ROM_REGION( 0x40000, "gfx3", 0 ) |
| 1543 | 1543 | ROM_LOAD( "9.bin", 0x00000, 0x10000, CRC(736eff0f) SHA1(ae2ec2d5c8ab1db579a08256d874426dc5d889c6) ) |
| 1544 | ROM_LOAD( "10.bin", | |
| 1544 | ROM_LOAD( "6809_10.bin", | |
| 1545 | 1545 | ROM_LOAD( "11.bin", 0x20000, 0x10000, CRC(4171b70d) SHA1(dc300c9bca6481417e97ad03c973e47389f261c1) ) |
| 1546 | 1546 | ROM_LOAD( "12.bin", 0x30000, 0x10000, CRC(5f6a6d6f) SHA1(7d546a226cda81c28e7ccfb4c5daebc65072198d) ) |
| 1547 | 1547 |
| r7553 | r7554 | |
|---|---|---|
| 362 | 362 | |
| 363 | 363 | ROM_REGION( 0x200000, "k053260", 0 ) |
| 364 | 364 | ROM_LOAD( "068a06.1e", 0x000000, 0x200000, CRC(6df9ec0e) SHA1(cee60312e9813bd6579f3ac7c3c2521a8e633eca) ) |
| 365 | ||
| 366 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 367 | ROM_LOAD( "asterix.nv", 0x0000, 0x0080, CRC(490085c8) SHA1(2a79e7c79db4b4fb0e6a7249cfd6a57e74b170e3) ) | |
| 365 | 368 | ROM_END |
| 366 | 369 | |
| 367 | 370 | ROM_START( asterixeac ) |
| r7553 | r7554 | |
| 384 | 387 | |
| 385 | 388 | ROM_REGION( 0x200000, "k053260", 0 ) |
| 386 | 389 | ROM_LOAD( "068a06.1e", 0x000000, 0x200000, CRC(6df9ec0e) SHA1(cee60312e9813bd6579f3ac7c3c2521a8e633eca) ) |
| 390 | ||
| 391 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 392 | ROM_LOAD( "asterixeac.nv", 0x0000, 0x0080, CRC(490085c8) SHA1(2a79e7c79db4b4fb0e6a7249cfd6a57e74b170e3) ) | |
| 387 | 393 | ROM_END |
| 388 | 394 | |
| 389 | 395 | ROM_START( asterixeaa ) |
| r7553 | r7554 | |
| 406 | 412 | |
| 407 | 413 | ROM_REGION( 0x200000, "k053260", 0 ) |
| 408 | 414 | ROM_LOAD( "068a06.1e", 0x000000, 0x200000, CRC(6df9ec0e) SHA1(cee60312e9813bd6579f3ac7c3c2521a8e633eca) ) |
| 415 | ||
| 416 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 417 | ROM_LOAD( "asterixeaa.nv", 0x0000, 0x0080, CRC(30275de0) SHA1(4bbf90a4e5b20406153329e9e7c4c2bf72676f8d) ) | |
| 409 | 418 | ROM_END |
| 410 | 419 | |
| 411 | 420 | ROM_START( asterixaad ) |
| r7553 | r7554 | |
| 428 | 437 | |
| 429 | 438 | ROM_REGION( 0x200000, "k053260", 0 ) |
| 430 | 439 | ROM_LOAD( "068a06.1e", 0x000000, 0x200000, CRC(6df9ec0e) SHA1(cee60312e9813bd6579f3ac7c3c2521a8e633eca) ) |
| 440 | ||
| 441 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 442 | ROM_LOAD( "asterixaad.nv", 0x0000, 0x0080, CRC(bcca86a7) SHA1(1191b0011749e2516df723c9d63da9c2304fa594) ) | |
| 431 | 443 | ROM_END |
| 432 | 444 | |
| 433 | 445 | ROM_START( asterixj ) |
| r7553 | r7554 | |
| 450 | 462 | |
| 451 | 463 | ROM_REGION( 0x200000, "k053260", 0 ) |
| 452 | 464 | ROM_LOAD( "068a06.1e", 0x000000, 0x200000, CRC(6df9ec0e) SHA1(cee60312e9813bd6579f3ac7c3c2521a8e633eca) ) |
| 465 | ||
| 466 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 467 | ROM_LOAD( "asterixj.nv", 0x0000, 0x0080, CRC(84229f2c) SHA1(34c7491c731fbf741dfd53bfc559d91201ccfb03) ) | |
| 453 | 468 | ROM_END |
| 454 | 469 | |
| 455 | 470 |
| r7553 | r7554 | |
|---|---|---|
| 646 | 646 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 647 | 647 | /* K054539 samples */ |
| 648 | 648 | ROM_LOAD( "151a08", 0x000000, 0x200000, CRC(962251d7) SHA1(32dccf515d2ca8eeffb45cada3dcc60089991b77) ) |
| 649 | ||
| 650 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 651 | ROM_LOAD( "moo.nv", 0x0000, 0x080, CRC(7bd904a8) SHA1(8747c5c62d1832e290be8ace73c61b1f228c0bec) ) | |
| 649 | 652 | ROM_END |
| 650 | 653 | |
| 651 | 654 | ROM_START( mooua ) /* Version UA - USA Ver A */ |
| r7553 | r7554 | |
| 678 | 681 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 679 | 682 | /* K054539 samples */ |
| 680 | 683 | ROM_LOAD( "151a08", 0x000000, 0x200000, CRC(962251d7) SHA1(32dccf515d2ca8eeffb45cada3dcc60089991b77) ) |
| 684 | ||
| 685 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 686 | ROM_LOAD( "moou.nv", 0x0000, 0x080, CRC(a5cb137a) SHA1(119df859d6b5c366481305b1433eea0deadc3fa9) ) | |
| 681 | 687 | ROM_END |
| 682 | 688 | |
| 683 | 689 | ROM_START( mooaa ) /* Version AA - Asia Ver A */ |
| r7553 | r7554 | |
| 710 | 716 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 711 | 717 | /* K054539 samples */ |
| 712 | 718 | ROM_LOAD( "151a08", 0x000000, 0x200000, CRC(962251d7) SHA1(32dccf515d2ca8eeffb45cada3dcc60089991b77) ) |
| 719 | ||
| 720 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 721 | ROM_LOAD( "moo.nv", 0x0000, 0x080, CRC(7bd904a8) SHA1(8747c5c62d1832e290be8ace73c61b1f228c0bec) ) | |
| 713 | 722 | ROM_END |
| 714 | 723 | |
| 715 | 724 | ROM_START( bucky ) |
| r7553 | r7554 | |
| 743 | 752 | /* K054539 samples */ |
| 744 | 753 | ROM_LOAD("173a08.b6", 0x000000, 0x200000, CRC(dcdded95) SHA1(8eeb546a0b60a35a6dce36c5ee872e6c93c577c9) ) |
| 745 | 754 | ROM_LOAD("173a09.a6", 0x200000, 0x200000, CRC(c93697c4) SHA1(0528a604868267a30d281b822c187df118566691) ) |
| 755 | ||
| 756 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 757 | ROM_LOAD( "bucky.nv", 0x0000, 0x080, CRC(6a5986f3) SHA1(3efddeed261b09031c582e12318f00c2cbb214ea) ) | |
| 746 | 758 | ROM_END |
| 747 | 759 | |
| 748 | 760 | ROM_START( buckyua ) |
| r7553 | r7554 | |
| 776 | 788 | /* K054539 samples */ |
| 777 | 789 | ROM_LOAD("173a08.b6", 0x000000, 0x200000, CRC(dcdded95) SHA1(8eeb546a0b60a35a6dce36c5ee872e6c93c577c9) ) |
| 778 | 790 | ROM_LOAD("173a09.a6", 0x200000, 0x200000, CRC(c93697c4) SHA1(0528a604868267a30d281b822c187df118566691) ) |
| 791 | ||
| 792 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 793 | ROM_LOAD( "buckyu.nv", 0x0000, 0x080, CRC(a5cb137a) SHA1(119df859d6b5c366481305b1433eea0deadc3fa9) ) | |
| 779 | 794 | ROM_END |
| 780 | 795 | |
| 781 | 796 | ROM_START( buckyaa ) |
| r7553 | r7554 | |
| 809 | 824 | /* K054539 samples */ |
| 810 | 825 | ROM_LOAD("173a08.b6", 0x000000, 0x200000, CRC(dcdded95) SHA1(8eeb546a0b60a35a6dce36c5ee872e6c93c577c9) ) |
| 811 | 826 | ROM_LOAD("173a09.a6", 0x200000, 0x200000, CRC(c93697c4) SHA1(0528a604868267a30d281b822c187df118566691) ) |
| 827 | ||
| 828 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 829 | ROM_LOAD( "bucky.nv", 0x0000, 0x080, CRC(6a5986f3) SHA1(3efddeed261b09031c582e12318f00c2cbb214ea) ) | |
| 812 | 830 | ROM_END |
| 813 | 831 | |
| 814 | 832 | |
| r7553 | r7554 | |
| 861 | 879 | ROM_CONTINUE( 0x280000+0x30000, 0x010000)//bank a hi |
| 862 | 880 | ROM_CONTINUE( 0x2c0000+0x30000, 0x010000)//bank b hi |
| 863 | 881 | ROM_CONTINUE( 0x300000+0x30000, 0x010000)//bank c hi |
| 882 | ||
| 883 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 884 | ROM_LOAD( "moo.nv", 0x0000, 0x080, CRC(7bd904a8) SHA1(8747c5c62d1832e290be8ace73c61b1f228c0bec) ) | |
| 864 | 885 | ROM_END |
| 865 | 886 | |
| 866 | 887 | static DRIVER_INIT( moo ) |
| r7553 | r7554 | |
|---|---|---|
| 197 | 197 | |
| 198 | 198 | if (bus_hold) |
| 199 | 199 | { |
| 200 | fprintf(stderr, "M0 asserting bus HOLD to i860 %s\n", device->tag | |
| 200 | fprintf(stderr, "M0 asserting bus HOLD to i860 %s\n", device->tag | |
| 201 | 201 | i860_set_pin(device, DEC_PIN_BUS_HOLD, 1); |
| 202 | 202 | } |
| 203 | 203 | else |
| 204 | 204 | { |
| 205 | fprintf(stderr, "M0 clearing bus HOLD to i860 %s\n", device->tag | |
| 205 | fprintf(stderr, "M0 clearing bus HOLD to i860 %s\n", device->tag | |
| 206 | 206 | i860_set_pin(device, DEC_PIN_BUS_HOLD, 0); |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | if (reset) |
| 210 | 210 | { |
| 211 | fprintf(stderr, "M0 asserting RESET to i860 %s\n", device->tag | |
| 211 | fprintf(stderr, "M0 asserting RESET to i860 %s\n", device->tag | |
| 212 | 212 | i860_set_pin(device, DEC_PIN_RESET, 1); |
| 213 | 213 | } |
| 214 | 214 | else |
| r7553 | r7554 | |
|---|---|---|
| 1633 | 1633 | |
| 1634 | 1634 | // EEPROM - contains security data |
| 1635 | 1635 | ROM_REGION16_BE( 0x200, "eeprom", 0 ) |
| 1636 | ROM_LOAD16_WORD_SWAP( "93c66_eeprom.bin", 0x000, 0x200, NO_DUMP ) | |
| 1636 | ROM_LOAD16_WORD_SWAP( "48in1_93c66_eeprom.bin", 0x000, 0x200, NO_DUMP ) | |
| 1637 | 1637 | ROM_END |
| 1638 | 1638 | |
| 1639 | 1639 | ROM_START( 48in1a ) |
| r7553 | r7554 | |
| 1647 | 1647 | |
| 1648 | 1648 | // EEPROM - contains security data |
| 1649 | 1649 | ROM_REGION16_BE( 0x200, "eeprom", 0 ) |
| 1650 | ROM_LOAD16_WORD_SWAP( "93c66_eeprom.bin", 0x000, 0x200, NO_DUMP ) | |
| 1650 | ROM_LOAD16_WORD_SWAP( "48in1_93c66_eeprom.bin", 0x000, 0x200, NO_DUMP ) | |
| 1651 | 1651 | ROM_END |
| 1652 | 1652 | |
| 1653 | 1653 | GAME(2004, 39in1, 0, 39in1, 39in1, 39in1, ROT270, "<unknown>", "39 in 1 MAME bootleg", GAME_IMPERFECT_SOUND) |
| r7553 | r7554 | |
|---|---|---|
| 26 | 26 | - missing sprites and priority |
| 27 | 27 | |
| 28 | 28 | Known Issues: |
| 29 | - no dual monitor support | |
| 30 | - synchronization and other oddities (rungunu doesn't show attract mode) | |
| 31 | - swapped P12 and P34 controls in 4-player mode team selectet (real puzzler) | |
| 32 | - P3 and P4 coin chutes not working in 4-player mode | |
| 29 | - no dual monitor support is broken | |
| 30 | - games seem to think they're in dual-monitor mode when they're not | |
| 31 | - speed in some sets is incorrect (for dual monitors I'm guessing it should | |
| 32 | output alternate frames to alternate monitors, but due to other bugs it | |
| 33 | just causes the game to run twice as fast as it should?) | |
| 34 | - synchronization and other oddities (rungunu doesn't show attract mode) | |
| 35 | - swapped P12 and P34 controls in 4-player mode team selectet (real puzzler) | |
| 36 | - P3 and P4 coin chutes not working in 4-player mode | |
| 37 | ||
| 38 | ||
| 33 | 39 | - sprite palettes are not entirely right |
| 34 | - ROZ update causes music to stutter | |
| 35 | 40 | |
| 36 | 41 | *************************************************************************/ |
| 37 | 42 | |
| r7553 | r7554 | |
| 481 | 486 | ROM_REGION( 0x400000, "shared", 0) |
| 482 | 487 | ROM_LOAD( "247-a06", 0x000000, 0x200000, CRC(b8b2a67e) SHA1(a873d32f4b178c714743664fa53c0dca29cb3ce4) ) |
| 483 | 488 | ROM_LOAD( "247-a07", 0x200000, 0x200000, CRC(0108142d) SHA1(4dc6a36d976dad9c0da5a5b1f01f2eb3b369c99d) ) |
| 489 | ||
| 490 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 491 | ROM_LOAD( "rungun.nv", 0x0000, 0x080, CRC(7bbf0e3c) SHA1(0fd3c9400e9b97a06517e0c8620f773a383100fd) ) | |
| 484 | 492 | ROM_END |
| 485 | 493 | |
| 486 | 494 | ROM_START( runguna ) |
| r7553 | r7554 | |
| 519 | 527 | ROM_REGION( 0x400000, "shared", 0) |
| 520 | 528 | ROM_LOAD( "247-a06", 0x000000, 0x200000, CRC(b8b2a67e) SHA1(a873d32f4b178c714743664fa53c0dca29cb3ce4) ) |
| 521 | 529 | ROM_LOAD( "247-a07", 0x200000, 0x200000, CRC(0108142d) SHA1(4dc6a36d976dad9c0da5a5b1f01f2eb3b369c99d) ) |
| 530 | ||
| 531 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 532 | ROM_LOAD( "runguna.nv", 0x0000, 0x080, CRC(7bbf0e3c) SHA1(0fd3c9400e9b97a06517e0c8620f773a383100fd) ) | |
| 522 | 533 | ROM_END |
| 523 | 534 | |
| 524 | 535 | ROM_START( rungunu ) |
| r7553 | r7554 | |
| 555 | 566 | ROM_REGION( 0x400000, "shared", 0) |
| 556 | 567 | ROM_LOAD( "247-a06", 0x000000, 0x200000, CRC(b8b2a67e) SHA1(a873d32f4b178c714743664fa53c0dca29cb3ce4) ) |
| 557 | 568 | ROM_LOAD( "247-a07", 0x200000, 0x200000, CRC(0108142d) SHA1(4dc6a36d976dad9c0da5a5b1f01f2eb3b369c99d) ) |
| 569 | ||
| 570 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 571 | ROM_LOAD( "rungunu.nv", 0x0000, 0x080, CRC(d501f579) SHA1(9e01d9a6a8cdc782dd2a92fbf2295e8df732f892) ) | |
| 558 | 572 | ROM_END |
| 559 | 573 | |
| 560 | 574 | ROM_START( rungunua ) |
| r7553 | r7554 | |
| 593 | 607 | ROM_REGION( 0x400000, "shared", 0) |
| 594 | 608 | ROM_LOAD( "247-a06", 0x000000, 0x200000, CRC(b8b2a67e) SHA1(a873d32f4b178c714743664fa53c0dca29cb3ce4) ) |
| 595 | 609 | ROM_LOAD( "247-a07", 0x200000, 0x200000, CRC(0108142d) SHA1(4dc6a36d976dad9c0da5a5b1f01f2eb3b369c99d) ) |
| 610 | ||
| 611 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 612 | ROM_LOAD( "rungunua.nv", 0x0000, 0x080, CRC(9890d304) SHA1(c94a77d1d45e372350456cf8eaa7e7ebd3cdbb84) ) | |
| 596 | 613 | ROM_END |
| 597 | 614 | |
| 598 | 615 | ROM_START( slmdunkj ) |
| r7553 | r7554 | |
| 631 | 648 | ROM_REGION( 0x400000, "shared", 0) |
| 632 | 649 | ROM_LOAD( "247-a06", 0x000000, 0x200000, CRC(b8b2a67e) SHA1(a873d32f4b178c714743664fa53c0dca29cb3ce4) ) |
| 633 | 650 | ROM_LOAD( "247-a07", 0x200000, 0x200000, CRC(0108142d) SHA1(4dc6a36d976dad9c0da5a5b1f01f2eb3b369c99d) ) |
| 651 | ||
| 652 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 653 | ROM_LOAD( "slmdunkj.nv", 0x0000, 0x080, CRC(531d27bd) SHA1(42251272691c66c1f89f99e6e5e2f300c1a7d69d) ) | |
| 634 | 654 | ROM_END |
| 635 | 655 | |
| 636 | 656 | |
| 637 | 657 | GAME( 1993, rungun, 0, rng, rng, 0, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.8)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 638 | 658 | GAME( 1993, runguna, rungun, rng, rng, 0, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.4)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 639 | GAME( 1993, rungunu, rungun, rng, rng, 0, ROT0, "Konami", "Run and Gun (ver UAB 1993 10.12)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 640 | GAME( 1993, rungunua, rungun, rng, rng, 0, ROT0, "Konami", "Run and Gun (ver UBA 1993 10.8)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 659 | GAME( 1993, rungunu, rungun, rng, rng, 0, ROT0, "Konami", "Run and Gun (ver UAB 1993 10.12)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) // runs twice as fast as it should, broken inputs! | |
| 660 | GAME( 1993, rungunua, rungun, rng, rng, 0, ROT0, "Konami", "Run and Gun (ver UBA 1993 10.8)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) // runs twice as fast as it should, broken inputs! broken attract! | |
| 641 | 661 | GAME( 1993, slmdunkj, rungun, rng, rng, 0, ROT0, "Konami", "Slam Dunk (ver JAA 1993 10.8)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| r7553 | r7554 | |
|---|---|---|
| 1715 | 1715 | ROM_END |
| 1716 | 1716 | |
| 1717 | 1717 | |
| 1718 | ROM_START( smashtv3 ) | |
| 1719 | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ | |
| 1720 | ROM_LOAD ( "sl2.u4", 0x10000, 0x10000, CRC(29d3f6c8) SHA1(8a90cdff54f59ddb7dba521504d880515a59df08) ) | |
| 1721 | ROM_RELOAD( 0x20000, 0x10000 ) | |
| 1722 | ROM_LOAD ( "sl2.u19", 0x30000, 0x10000, CRC(ac5a402a) SHA1(c476018062126dc3936caa2c328de490737165ec) ) | |
| 1723 | ROM_RELOAD( 0x40000, 0x10000 ) | |
| 1724 | ROM_LOAD ( "sl2.u20", 0x50000, 0x10000, CRC(875c66d9) SHA1(51cdad62ec57e69bba6fcf14e59841ec628dec11) ) | |
| 1725 | ROM_RELOAD( 0x60000, 0x10000 ) | |
| 1726 | ||
| 1727 | ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */ | |
| 1728 | ROM_LOAD16_BYTE( "u105-la3", 0xc0000, 0x20000, CRC(33b626c3) SHA1(8f0582f6fe08dc7de920aeac578ed570ca4e717f) ) | |
| 1729 | ROM_LOAD16_BYTE( "u89-la3", 0xc0001, 0x20000, CRC(5f6fbc25) SHA1(d623f5e64ff4e70e24d770ac3ac0d32ff3928ce0) ) | |
| 1730 | ||
| 1731 | ROM_REGION( 0x800000, "gfx1", 0 ) | |
| 1732 | ROM_LOAD ( "la1.u111", 0x000000, 0x20000, CRC(72f0ba84) SHA1(2e925b3cdd3c8e14046b3948d82f0f3cde3c22c5) ) | |
| 1733 | ROM_LOAD ( "la1.u112", 0x020000, 0x20000, CRC(436f0283) SHA1(ec33a8942c0fc326db885e08dad9346ec5a63360) ) | |
| 1734 | ROM_LOAD ( "la1.u113", 0x040000, 0x20000, CRC(4a4b8110) SHA1(9f1881d1d2682764ab85aebd685d97eb8b4afe46) ) | |
| 1735 | ||
| 1736 | ROM_LOAD ( "la1.u95", 0x200000, 0x20000, CRC(e864a44b) SHA1(40eb8e11a183f4f82dc8decb36aaeded9cd1bc26) ) | |
| 1737 | ROM_LOAD ( "la1.u96", 0x220000, 0x20000, CRC(15555ea7) SHA1(4fefc059736ca424dc05a08cb55b9acf9e31228b) ) | |
| 1738 | ROM_LOAD ( "la1.u97", 0x240000, 0x20000, CRC(ccac9d9e) SHA1(a43d70d1a0bbd377f0fc539c2e8b725f7079f463) ) | |
| 1739 | ||
| 1740 | ROM_LOAD ( "la1.u106", 0x400000, 0x20000, CRC(5c718361) SHA1(6178b1d53411f24d5a5a01559727e300cd27d587) ) | |
| 1741 | ROM_LOAD ( "la1.u107", 0x420000, 0x20000, CRC(0fba1e36) SHA1(17038cf35a72678bba149a632f1ad1b80cc3a38c) ) | |
| 1742 | ROM_LOAD ( "la1.u108", 0x440000, 0x20000, CRC(cb0a092f) SHA1(33cbb87b4be1eadb1f3624ef5e218e65109fa3eb) ) | |
| 1743 | ROM_END | |
| 1744 | ||
| 1745 | ||
| 1718 | 1746 | ROM_START( hiimpact ) |
| 1719 | 1747 | ROM_REGION( 0x90000, "cvsdcpu", 0 ) /* sound CPU */ |
| 1720 | 1748 | ROM_LOAD ( "sl1u4.bin", 0x10000, 0x20000, CRC(28effd6a) SHA1(4a839f15e1b453a22fdef7b1801b8cc5cfdf3c29) ) |
| r7553 | r7554 | |
| 2482 | 2510 | GAME( 1990, smashtv6, smashtv, yunit_cvsd_6bit_slow, smashtv, smashtv, ROT0, "Williams", "Smash T.V. (rev 6.00)", GAME_SUPPORTS_SAVE ) |
| 2483 | 2511 | GAME( 1990, smashtv5, smashtv, yunit_cvsd_6bit_slow, smashtv, smashtv, ROT0, "Williams", "Smash T.V. (rev 5.00)", GAME_SUPPORTS_SAVE ) |
| 2484 | 2512 | GAME( 1990, smashtv4, smashtv, yunit_cvsd_6bit_slow, smashtv, smashtv, ROT0, "Williams", "Smash T.V. (rev 4.00)", GAME_SUPPORTS_SAVE ) |
| 2513 | GAME( 1990, smashtv3, smashtv, yunit_cvsd_6bit_slow, smashtv, smashtv, ROT0, "Williams", "Smash T.V. (rev 3.01)", GAME_SUPPORTS_SAVE ) | |
| 2485 | 2514 | |
| 2486 | 2515 | GAME( 1990, hiimpact, 0, yunit_cvsd_6bit_slow, trog, hiimpact, ROT0, "Williams", "High Impact Football (rev LA5 02/15/91)", GAME_SUPPORTS_SAVE ) |
| 2487 | 2516 | GAME( 1990, hiimpact4, hiimpact, yunit_cvsd_6bit_slow, trog, hiimpact, ROT0, "Williams", "High Impact Football (rev LA4 02/04/91)", GAME_SUPPORTS_SAVE ) |
| r7553 | r7554 | |
|---|---|---|
| 276 | 276 | static WRITE8_DEVICE_HANDLER( galpani2_oki1_bank_w ) |
| 277 | 277 | { |
| 278 | 278 | UINT8 *ROM = memory_region(device->machine, "oki1"); |
| 279 | logerror("%s : %s bank %08X\n",cpuexec_describe_context(device->machine),device->tag | |
| 279 | logerror("%s : %s bank %08X\n",cpuexec_describe_context(device->machine),device->tag | |
| 280 | 280 | memcpy(ROM + 0x30000, ROM + 0x40000 + 0x10000 * (~data & 0xf), 0x10000); |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | static WRITE8_DEVICE_HANDLER( galpani2_oki2_bank_w ) |
| 284 | 284 | { |
| 285 | 285 | okim6295_set_bank_base(device, 0x40000 * (data & 0xf) ); |
| 286 | logerror("%s : %s bank %08X\n",cpuexec_describe_context(device->machine),device->tag | |
| 286 | logerror("%s : %s bank %08X\n",cpuexec_describe_context(device->machine),device->tag | |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 |
| r7553 | r7554 | |
|---|---|---|
| 262 | 262 | { |
| 263 | 263 | bitmap_fill(bitmap, cliprect, screen->machine->pens[0]); |
| 264 | 264 | |
| 265 | if (strcmp(screen->tag, "lscreen") == 0) | |
| 265 | if (strcmp(screen->tag(), "lscreen") == 0) | |
| 266 | 266 | { |
| 267 | 267 | running_device *k001604 = devtag_get_device(screen->machine, "k001604_1"); |
| 268 | 268 | running_device *voodoo = devtag_get_device(screen->machine, "voodoo0"); |
| r7553 | r7554 | |
| 273 | 273 | |
| 274 | 274 | k001604_draw_front_layer(k001604, bitmap, cliprect); |
| 275 | 275 | } |
| 276 | else if (strcmp(screen->tag, "rscreen") == 0) | |
| 276 | else if (strcmp(screen->tag(), "rscreen") == 0) | |
| 277 | 277 | { |
| 278 | 278 | running_device *k001604 = devtag_get_device(screen->machine, "k001604_2"); |
| 279 | 279 | running_device *voodoo = devtag_get_device(screen->machine, "voodoo1"); |
| r7553 | r7554 | |
| 1000 | 1000 | ROM_LOAD64_WORD( "688a14.13d", 0x000002, 0x200000, CRC(b9932735) SHA1(2492244d2acb350974202a6718bc7121325d2121) ) |
| 1001 | 1001 | ROM_LOAD64_WORD( "688a15.9d", 0x000004, 0x200000, CRC(8aadee51) SHA1(be9020a47583da9d4ff586d227836dc5b7dc31f0) ) |
| 1002 | 1002 | ROM_LOAD64_WORD( "688a16.4d", 0x000006, 0x200000, CRC(7f4e1893) SHA1(585be7b31ab7a48300c22b00443b00d631f4c49d) ) |
| 1003 | ||
| 1004 | ROM_REGION16_BE( 0x200, "eeprom", 0 ) | |
| 1005 | ROM_LOAD( "gticlub.nv", 0x0000, 0x0200, CRC(eca78a49) SHA1(3dcaccc4bee58f7ff5d6ecae551887cc967deaf7) ) | |
| 1003 | 1006 | ROM_END |
| 1004 | 1007 | |
| 1005 | 1008 | ROM_START( gticluba ) /* Asia version AAA */ |
| r7553 | r7554 | |
| 1027 | 1030 | ROM_LOAD64_WORD( "688a14.13d", 0x000002, 0x200000, CRC(b9932735) SHA1(2492244d2acb350974202a6718bc7121325d2121) ) |
| 1028 | 1031 | ROM_LOAD64_WORD( "688a15.9d", 0x000004, 0x200000, CRC(8aadee51) SHA1(be9020a47583da9d4ff586d227836dc5b7dc31f0) ) |
| 1029 | 1032 | ROM_LOAD64_WORD( "688a16.4d", 0x000006, 0x200000, CRC(7f4e1893) SHA1(585be7b31ab7a48300c22b00443b00d631f4c49d) ) |
| 1033 | ||
| 1034 | ROM_REGION16_BE( 0x200, "eeprom", 0 ) | |
| 1035 | ROM_LOAD( "gticlub.nv", 0x0000, 0x0200, CRC(eca78a49) SHA1(3dcaccc4bee58f7ff5d6ecae551887cc967deaf7) ) | |
| 1030 | 1036 | ROM_END |
| 1031 | 1037 | |
| 1032 | 1038 | ROM_START( gticlubj ) /* Japan version JAA */ |
| r7553 | r7554 | |
| 1054 | 1060 | ROM_LOAD64_WORD( "688a14.13d", 0x000002, 0x200000, CRC(b9932735) SHA1(2492244d2acb350974202a6718bc7121325d2121) ) |
| 1055 | 1061 | ROM_LOAD64_WORD( "688a15.9d", 0x000004, 0x200000, CRC(8aadee51) SHA1(be9020a47583da9d4ff586d227836dc5b7dc31f0) ) |
| 1056 | 1062 | ROM_LOAD64_WORD( "688a16.4d", 0x000006, 0x200000, CRC(7f4e1893) SHA1(585be7b31ab7a48300c22b00443b00d631f4c49d) ) |
| 1063 | ||
| 1064 | ROM_REGION16_BE( 0x200, "eeprom", 0 ) | |
| 1065 | ROM_LOAD( "gticlub.nv", 0x0000, 0x0200, CRC(eca78a49) SHA1(3dcaccc4bee58f7ff5d6ecae551887cc967deaf7) ) | |
| 1057 | 1066 | ROM_END |
| 1058 | 1067 | |
| 1059 | 1068 | ROM_START( thunderh ) /* Euro version EAA */ |
| r7553 | r7554 | |
| 1167 | 1176 | ROM_REGION(0x800000, "user5", 0) /* texture roms */ |
| 1168 | 1177 | ROM_LOAD32_WORD( "685a13.4w", 0x000002, 0x400000, CRC(06329af4) SHA1(76cad9db604751ce48bb67bfd29e57bac0ee9a16) ) |
| 1169 | 1178 | ROM_LOAD32_WORD( "685a14.12w", 0x000000, 0x400000, CRC(87437739) SHA1(0d45637af40938a54d5efd29c125b0fafd55f9a4) ) |
| 1179 | ||
| 1180 | ROM_REGION16_BE( 0x200, "eeprom", 0 ) | |
| 1181 | ROM_LOAD( "hangplt.nv", 0x0000, 0x0200, CRC(35f482c8) SHA1(445918156770449dce1a010aab9d310f15670092) ) | |
| 1170 | 1182 | ROM_END |
| 1171 | 1183 | |
| 1172 | 1184 | static DRIVER_INIT(gticlub) |
| r7553 | r7554 | |
|---|---|---|
| 378 | 378 | AM_RANGE(0xf800, 0xffff) AM_RAM |
| 379 | 379 | ADDRESS_MAP_END |
| 380 | 380 | |
| 381 | static WRITE8_HANDLER( magical_outb850_w ) | |
| 382 | { | |
| 383 | // guess, could be wrong, this might just be lights | |
| 384 | ||
| 385 | goldstar_state *state = (goldstar_state *)space->machine->driver_data; | |
| 386 | ||
| 387 | if (data&0x20) | |
| 388 | state->tile_bank = 1; | |
| 389 | else | |
| 390 | state->tile_bank = 0; | |
| 391 | ||
| 392 | //popmessage("magical_outb850_w %02x\n", data); | |
| 393 | ||
| 394 | tilemap_mark_all_tiles_dirty (state->fg_tilemap); | |
| 395 | ||
| 396 | } | |
| 397 | ||
| 398 | static WRITE8_HANDLER( magical_outb860_w ) | |
| 399 | { | |
| 400 | // popmessage("magical_outb860_w %02x\n", data); | |
| 401 | } | |
| 402 | ||
| 403 | static ADDRESS_MAP_START(magical_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 404 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 405 | // where does the extra rom data map?? it seems like it should come straight after the existing rom, but it can't if this is a plain z80? | |
| 406 | AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("share1") AM_BASE_MEMBER(goldstar_state,nvram) AM_SIZE_MEMBER(goldstar_state,nvram_size) | |
| 407 | AM_RANGE(0x8800, 0x8fff) AM_RAM_WRITE(goldstar_fg_vidram_w) AM_BASE_MEMBER(goldstar_state,fg_vidram) | |
| 408 | AM_RANGE(0x9000, 0x97ff) AM_RAM_WRITE(goldstar_fg_atrram_w) AM_BASE_MEMBER(goldstar_state,fg_atrram) | |
| 409 | AM_RANGE(0x9800, 0x99ff) AM_RAM_WRITE(goldstar_reel1_ram_w) AM_BASE_MEMBER(goldstar_state,reel1_ram) | |
| 410 | AM_RANGE(0xa000, 0xa1ff) AM_RAM_WRITE(goldstar_reel2_ram_w) AM_BASE_MEMBER(goldstar_state,reel2_ram) | |
| 411 | AM_RANGE(0xa900, 0xaaff) AM_RAM_WRITE(goldstar_reel3_ram_w) AM_BASE_MEMBER(goldstar_state,reel3_ram) // +0x100 compared to lucky8 | |
| 412 | AM_RANGE(0xb040, 0xb07f) AM_RAM AM_BASE_MEMBER(goldstar_state,reel1_scroll) | |
| 413 | AM_RANGE(0xb080, 0xb0bf) AM_RAM AM_BASE_MEMBER(goldstar_state,reel2_scroll) | |
| 414 | AM_RANGE(0xb100, 0xb17f) AM_RAM AM_BASE_MEMBER(goldstar_state,reel3_scroll) | |
| 415 | ||
| 416 | AM_RANGE(0xb800, 0xb803) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) /* Input Ports */ | |
| 417 | AM_RANGE(0xb810, 0xb813) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w) /* Input Ports */ | |
| 418 | AM_RANGE(0xb820, 0xb823) AM_DEVREADWRITE("ppi8255_2", ppi8255_r, ppi8255_w) /* Input/Output Ports */ | |
| 419 | AM_RANGE(0xb830, 0xb830) AM_DEVREADWRITE("aysnd", ay8910_r, ay8910_data_w) | |
| 420 | AM_RANGE(0xb840, 0xb840) AM_DEVWRITE("aysnd", ay8910_address_w) /* no sound... only use both ports for DSWs */ | |
| 421 | AM_RANGE(0xb850, 0xb850) AM_WRITE(magical_outb850_w) //lamps | |
| 422 | AM_RANGE(0xb860, 0xb860) AM_WRITE(magical_outb860_w) //watchdog | |
| 423 | AM_RANGE(0xb870, 0xb870) AM_DEVWRITE("snsnd", sn76496_w) /* sound */ | |
| 424 | AM_RANGE(0xc000, 0xffff) AM_ROM AM_REGION("maincpu",0xc000) | |
| 425 | ADDRESS_MAP_END | |
| 426 | ||
| 381 | 427 | static ADDRESS_MAP_START( kkojnoli_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 382 | 428 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 383 | 429 | AM_RANGE(0x8000, 0x87ff) AM_RAM /* definitely no NVRAM */ |
| r7553 | r7554 | |
| 463 | 509 | ADDRESS_MAP_END |
| 464 | 510 | |
| 465 | 511 | |
| 512 | /* | |
| 466 | 513 | static READ8_HANDLER( unkch_unk_r ) |
| 467 | 514 | { |
| 468 | ||
| 515 | return 0xff; | |
| 469 | 516 | } |
| 517 | */ | |
| 470 | 518 | |
| 471 | // scrolling is wrong / different | |
| 519 | ||
| 520 | /* newer / more capable hw */ | |
| 472 | 521 | static ADDRESS_MAP_START( unkch_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 473 | 522 | AM_RANGE(0x0000, 0x9fff) AM_ROM |
| 474 | 523 | AM_RANGE(0xc000, 0xc1ff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_split1_w) AM_BASE_GENERIC(paletteram) |
| 475 | 524 | AM_RANGE(0xc800, 0xc9ff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_split2_w) AM_BASE_GENERIC(paletteram2) |
| 476 | 525 | |
| 477 | 526 | AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_BASE_MEMBER(goldstar_state,nvram) AM_SIZE_MEMBER(goldstar_state,nvram_size) |
| 478 | AM_RANGE(0xd800, 0xdfff) AM_RAM | |
| 479 | 527 | |
| 528 | AM_RANGE(0xd840, 0xd87f) AM_RAM AM_BASE_MEMBER(goldstar_state,reel1_scroll) | |
| 529 | AM_RANGE(0xd880, 0xd8bf) AM_RAM AM_BASE_MEMBER(goldstar_state,reel2_scroll) | |
| 530 | AM_RANGE(0xd900, 0xd93f) AM_RAM AM_BASE_MEMBER(goldstar_state,reel3_scroll) | |
| 531 | AM_RANGE(0xdfc0, 0xdfff) AM_RAM | |
| 480 | 532 | |
| 481 | 533 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(goldstar_fg_vidram_w) AM_BASE_MEMBER(goldstar_state,fg_vidram) |
| 482 | 534 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(goldstar_fg_atrram_w) AM_BASE_MEMBER(goldstar_state,fg_atrram) |
| r7553 | r7554 | |
| 485 | 537 | AM_RANGE(0xf200, 0xf3ff) AM_RAM_WRITE( goldstar_reel2_ram_w ) AM_BASE_MEMBER(goldstar_state,reel2_ram) |
| 486 | 538 | AM_RANGE(0xf400, 0xf5ff) AM_RAM_WRITE( goldstar_reel3_ram_w ) AM_BASE_MEMBER(goldstar_state,reel3_ram) |
| 487 | 539 | AM_RANGE(0xf600, 0xf7ff) AM_RAM |
| 488 | ||
| 489 | AM_RANGE(0xf800, 0xf87f) AM_RAM AM_BASE_MEMBER(goldstar_state,reel1_scroll) | |
| 490 | AM_RANGE(0xf880, 0xf9ff) AM_RAM | |
| 491 | AM_RANGE(0xfa00, 0xfa7f) AM_RAM AM_BASE_MEMBER(goldstar_state,reel2_scroll) | |
| 492 | AM_RANGE(0xfa80, 0xfbff) AM_RAM | |
| 493 | AM_RANGE(0xfc00, 0xfc7f) AM_RAM AM_BASE_MEMBER(goldstar_state,reel3_scroll) | |
| 494 | AM_RANGE(0xfc80, 0xffff) AM_RAM | |
| 540 | AM_RANGE(0xf800, 0xf9ff) AM_RAM_WRITE( unkch_reel1_attrram_w ) AM_BASE_MEMBER(goldstar_state,reel1_attrram) | |
| 541 | AM_RANGE(0xfa00, 0xfbff) AM_RAM_WRITE( unkch_reel2_attrram_w ) AM_BASE_MEMBER(goldstar_state,reel2_attrram) | |
| 542 | AM_RANGE(0xfc00, 0xfdff) AM_RAM_WRITE( unkch_reel3_attrram_w ) AM_BASE_MEMBER(goldstar_state,reel3_attrram) | |
| 543 | AM_RANGE(0xfe00, 0xffff) AM_RAM | |
| 495 | 544 | ADDRESS_MAP_END |
| 496 | 545 | |
| 546 | static WRITE8_HANDLER( unkcm_0x02_w ) | |
| 547 | { | |
| 548 | //popmessage("unkcm_0x02_w %02x", data); | |
| 549 | } | |
| 550 | ||
| 551 | static WRITE8_HANDLER( unkcm_0x03_w ) | |
| 552 | { | |
| 553 | //popmessage("unkcm_0x03_w %02x", data); | |
| 554 | goldstar_state *state = (goldstar_state *)space->machine->driver_data; | |
| 555 | ||
| 556 | state->unkch_vidreg = data; | |
| 557 | ||
| 558 | // -x-- ---- seems to toggle when a 'normal' tilemap should be displayed instead of the reels? | |
| 559 | } | |
| 560 | ||
| 561 | ||
| 562 | static WRITE8_HANDLER( unkcm_0x11_w ) | |
| 563 | { | |
| 564 | //popmessage("unkcm_0x11_w %02x", data); | |
| 565 | } | |
| 566 | ||
| 567 | static WRITE8_HANDLER( unkcm_0x12_w ) | |
| 568 | { | |
| 569 | // popmessage("unkcm_0x12_w %02x", data); | |
| 570 | } | |
| 571 | ||
| 572 | ||
| 497 | 573 | static ADDRESS_MAP_START( unkch_portmap, ADDRESS_SPACE_IO, 8 ) |
| 498 | 574 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 499 | 575 | // AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_r) |
| 500 | // AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_data_address_w) | |
| 576 | AM_RANGE(0x02, 0x02) AM_WRITE(unkcm_0x02_w) | |
| 577 | AM_RANGE(0x03, 0x03) AM_WRITE(unkcm_0x03_w) | |
| 578 | AM_RANGE(0x11, 0x11) AM_WRITE(unkcm_0x11_w) | |
| 579 | AM_RANGE(0x12, 0x12) AM_WRITE(unkcm_0x12_w) | |
| 580 | ||
| 501 | 581 | // AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) /* Input Ports */ |
| 502 | 582 | // AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w) /* DIP switches */ |
| 503 | 583 | // AM_RANGE(0x10, 0x10) AM_WRITE (cm_outport0_w) /* output port */ |
| r7553 | r7554 | |
| 506 | 586 | // AM_RANGE(0x13, 0x13) AM_WRITE(cm_background_col_w) |
| 507 | 587 | // AM_RANGE(0x14, 0x14) AM_WRITE(cm_girl_scroll_w) |
| 508 | 588 | |
| 509 | AM_RANGE(0x08, 0x09) AM_READ(unkch_unk_r) | |
| 589 | AM_RANGE(0x08, 0x08) AM_READ_PORT("IN0") | |
| 590 | AM_RANGE(0x09, 0x09) AM_READ_PORT("IN1") | |
| 591 | AM_RANGE(0x0a, 0x0a) AM_READ_PORT("IN2") | |
| 592 | AM_RANGE(0x0b, 0x0b) AM_READ_PORT("IN3") | |
| 593 | AM_RANGE(0x10, 0x10) AM_READ_PORT("IN4") | |
| 594 | ||
| 510 | 595 | ADDRESS_MAP_END |
| 511 | 596 | |
| 512 | 597 | |
| r7553 | r7554 | |
| 2609 | 2694 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2610 | 2695 | INPUT_PORTS_END |
| 2611 | 2696 | |
| 2697 | /* not verified */ | |
| 2698 | static INPUT_PORTS_START( magical ) | |
| 2699 | PORT_START("IN0") /* d800 */ | |
| 2700 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2701 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2702 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_X) PORT_NAME("P1 - Big / Switch Controls") | |
| 2703 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_B) PORT_NAME("P1 - Double-Up") | |
| 2704 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_Z) PORT_NAME("P1 - Take Score") | |
| 2705 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_V) PORT_NAME("P1 - Bet") | |
| 2706 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("P1 - Small / Info") | |
| 2707 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_N) PORT_NAME("P1 - Start") | |
| 2708 | ||
| 2709 | PORT_START("IN1") /* d801 */ | |
| 2710 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2711 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2712 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_CODE(KEYCODE_S) PORT_NAME("P2 - Big / Switch Controls") | |
| 2713 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_CODE(KEYCODE_G) PORT_NAME("P2 - Double-Up") | |
| 2714 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_CODE(KEYCODE_A) PORT_NAME("P2 - Take Score") | |
| 2715 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_CODE(KEYCODE_F) PORT_NAME("P2 - Bet") | |
| 2716 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_CODE(KEYCODE_D) PORT_NAME("P2 - Small / Info") | |
| 2717 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_CODE(KEYCODE_H) PORT_NAME("P2 - Start") | |
| 2718 | ||
| 2719 | PORT_START("IN2") /* d802 */ | |
| 2720 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2721 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2722 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2723 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2724 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2725 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2726 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2727 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2728 | ||
| 2729 | PORT_START("IN3") /* d810 */ | |
| 2730 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2731 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2732 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2733 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2734 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) // CoinD? | |
| 2735 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) // CoinC? | |
| 2736 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) | |
| 2737 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // CoinA? | |
| 2738 | ||
| 2739 | PORT_START("IN4") /* d811 */ | |
| 2740 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2741 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2742 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2743 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2744 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant") | |
| 2745 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper") | |
| 2746 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") | |
| 2747 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") | |
| 2748 | ||
| 2749 | PORT_START("DSW1") | |
| 2750 | PORT_DIPNAME( 0x07, 0x00, "Coin A Rate" ) PORT_DIPLOCATION("DSW1:1,2,3") | |
| 2751 | PORT_DIPSETTING( 0x05, "1" ) | |
| 2752 | PORT_DIPSETTING( 0x06, "2" ) | |
| 2753 | PORT_DIPSETTING( 0x07, "5" ) | |
| 2754 | PORT_DIPSETTING( 0x04, "10" ) | |
| 2755 | PORT_DIPSETTING( 0x03, "20" ) | |
| 2756 | PORT_DIPSETTING( 0x02, "30" ) | |
| 2757 | PORT_DIPSETTING( 0x01, "40" ) | |
| 2758 | PORT_DIPSETTING( 0x00, "50" ) | |
| 2759 | PORT_DIPNAME( 0x38, 0x00, "Key In" ) PORT_DIPLOCATION("DSW1:4,5,6") // aka 'Coin B' | |
| 2760 | PORT_DIPSETTING( 0x10, "5" ) | |
| 2761 | PORT_DIPSETTING( 0x18, "10" ) | |
| 2762 | PORT_DIPSETTING( 0x20, "20" ) | |
| 2763 | PORT_DIPSETTING( 0x28, "25" ) | |
| 2764 | PORT_DIPSETTING( 0x30, "40" ) | |
| 2765 | PORT_DIPSETTING( 0x38, "50" ) | |
| 2766 | PORT_DIPSETTING( 0x08, "60" ) | |
| 2767 | PORT_DIPSETTING( 0x00, "100" ) | |
| 2768 | PORT_DIPNAME( 0xc0, 0x00, "Coin C Rate" ) PORT_DIPLOCATION("DSW1:7,8") | |
| 2769 | PORT_DIPSETTING( 0x40, "5" ) | |
| 2770 | PORT_DIPSETTING( 0x80, "10" ) | |
| 2771 | PORT_DIPSETTING( 0xc0, "25" ) | |
| 2772 | PORT_DIPSETTING( 0x00, "50" ) | |
| 2773 | ||
| 2774 | PORT_START("DSW2") | |
| 2775 | PORT_DIPNAME( 0x07, 0x04, "Main Game Level" ) PORT_DIPLOCATION("DSW2:1,2,3") | |
| 2776 | PORT_DIPSETTING( 0x00, "+4" ) | |
| 2777 | PORT_DIPSETTING( 0x01, "+3" ) | |
| 2778 | PORT_DIPSETTING( 0x02, "+2" ) | |
| 2779 | PORT_DIPSETTING( 0x03, "+1" ) | |
| 2780 | PORT_DIPSETTING( 0x04, "0" ) | |
| 2781 | PORT_DIPSETTING( 0x05, "-1" ) | |
| 2782 | PORT_DIPSETTING( 0x06, "-2" ) | |
| 2783 | PORT_DIPSETTING( 0x07, "-3" ) | |
| 2784 | PORT_DIPNAME( 0x08, 0x08, "Nudity / Strip" ) PORT_DIPLOCATION("DSW2:4") // verified | |
| 2785 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2786 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2787 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:5") | |
| 2788 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2789 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2790 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:6") | |
| 2791 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2792 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2793 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7") | |
| 2794 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2795 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2796 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8") | |
| 2797 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2798 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2799 | ||
| 2800 | ||
| 2801 | PORT_START("DSW3") | |
| 2802 | PORT_DIPNAME( 0x03, 0x03, "Credit Limit" ) PORT_DIPLOCATION("DSW3:1,2") | |
| 2803 | PORT_DIPSETTING( 0x00, "1000" ) | |
| 2804 | PORT_DIPSETTING( 0x01, "2000" ) | |
| 2805 | PORT_DIPSETTING( 0x02, "3000" ) | |
| 2806 | PORT_DIPSETTING( 0x03, "Unlimited?" ) | |
| 2807 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:3") | |
| 2808 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 2809 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2810 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:4") | |
| 2811 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2812 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2813 | PORT_DIPNAME( 0xf0, 0xf0, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6,7,8") | |
| 2814 | PORT_DIPSETTING( 0x00, "10-1" ) | |
| 2815 | PORT_DIPSETTING( 0x10, "5-1" ) | |
| 2816 | PORT_DIPSETTING( 0x20, "5-2" ) | |
| 2817 | PORT_DIPSETTING( 0x30, "4-1" ) | |
| 2818 | PORT_DIPSETTING( 0x40, "4-3" ) | |
| 2819 | PORT_DIPSETTING( 0x50, "3-2" ) | |
| 2820 | PORT_DIPSETTING( 0x60, "3-1" ) | |
| 2821 | PORT_DIPSETTING( 0x70, "2-1" ) | |
| 2822 | PORT_DIPSETTING( 0x80, "2-3" ) | |
| 2823 | PORT_DIPSETTING( 0x90, "2-5" ) | |
| 2824 | PORT_DIPSETTING( 0xf0, "1-1" ) | |
| 2825 | PORT_DIPSETTING( 0xe0, "1-2" ) | |
| 2826 | PORT_DIPSETTING( 0xd0, "1-3" ) | |
| 2827 | PORT_DIPSETTING( 0xc0, "1-4" ) | |
| 2828 | PORT_DIPSETTING( 0xb0, "1-5" ) | |
| 2829 | PORT_DIPSETTING( 0xa0, "1-10" ) | |
| 2830 | ||
| 2831 | PORT_START("DSW4") | |
| 2832 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:1") | |
| 2833 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 2834 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2835 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:2") | |
| 2836 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2837 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2838 | PORT_DIPNAME( 0x0c, 0x0c, "Max Bet" ) PORT_DIPLOCATION("DSW4:3,4") | |
| 2839 | PORT_DIPSETTING( 0x00, "8" ) | |
| 2840 | PORT_DIPSETTING( 0x04, "16" ) | |
| 2841 | PORT_DIPSETTING( 0x08, "32" ) | |
| 2842 | PORT_DIPSETTING( 0x0c, "64" ) | |
| 2843 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:5") | |
| 2844 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2845 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2846 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:6") | |
| 2847 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2848 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2849 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:7") | |
| 2850 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2851 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2852 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:8") | |
| 2853 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2854 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2855 | INPUT_PORTS_END | |
| 2856 | ||
| 2612 | 2857 | static INPUT_PORTS_START( ns8lines ) |
| 2613 | 2858 | PORT_START("IN0") /* d800 */ |
| 2614 | 2859 | // PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r7553 | r7554 | |
| 4153 | 4398 | INPUT_PORTS_END |
| 4154 | 4399 | |
| 4155 | 4400 | |
| 4401 | static INPUT_PORTS_START( unkch ) | |
| 4402 | PORT_START("IN0") | |
| 4403 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("Bet A / STOP 2") | |
| 4404 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) | |
| 4405 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4406 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4407 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4408 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4409 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4410 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4411 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) PORT_NAME("Take / STOP1") | |
| 4412 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) PORT_NAME("Bet B / D-UP") | |
| 4413 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) PORT_NAME("Small / STOP 3") | |
| 4414 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) PORT_NAME("Big") | |
| 4415 | ||
| 4416 | PORT_START("IN1") | |
| 4417 | PORT_DIPNAME( 0x01, 0x01, "IN1" ) | |
| 4418 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4419 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4420 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4421 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4422 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4423 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4424 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4425 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4426 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4427 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4428 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4429 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4430 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4431 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4432 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4433 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4434 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4435 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") | |
| 4436 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4437 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4438 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4439 | ||
| 4440 | ||
| 4441 | PORT_START("IN2") | |
| 4442 | PORT_DIPNAME( 0x01, 0x01, "IN2") | |
| 4443 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4444 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4445 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4446 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4447 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4448 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4449 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4450 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4451 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4452 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4453 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4454 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4455 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4456 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4457 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4458 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4459 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4460 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4461 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4462 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4463 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4464 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4465 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4466 | ||
| 4467 | PORT_START("IN3") | |
| 4468 | PORT_DIPNAME( 0x01, 0x01, "IN3" ) | |
| 4469 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4470 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4471 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4472 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4473 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4474 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4475 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4476 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4477 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4478 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4479 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4480 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4481 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4482 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4483 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4484 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4485 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4486 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4487 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4488 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4489 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4490 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4491 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4492 | ||
| 4493 | PORT_START("IN4") | |
| 4494 | PORT_DIPNAME( 0x01, 0x01, "IN4" ) | |
| 4495 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4496 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4497 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4498 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4499 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4500 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4501 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4502 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4503 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4504 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4505 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4506 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4507 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4508 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4509 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4510 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4511 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4512 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4513 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4514 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4515 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4516 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4517 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4518 | INPUT_PORTS_END | |
| 4519 | ||
| 4520 | static INPUT_PORTS_START( mtonic ) | |
| 4521 | PORT_START("IN0") | |
| 4522 | PORT_DIPNAME( 0x01, 0x01, "IN0") | |
| 4523 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4524 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4525 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4526 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4527 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4528 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4529 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4530 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4531 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4532 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4533 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4534 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4535 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4536 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4537 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4538 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4539 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4540 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4541 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4542 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4543 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4544 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4545 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4546 | ||
| 4547 | PORT_START("IN1") | |
| 4548 | PORT_DIPNAME( 0x01, 0x01, "IN1") | |
| 4549 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4550 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4551 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4552 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4553 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4554 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4555 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4556 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4557 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4558 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4559 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4560 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4561 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4562 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4563 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4564 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4565 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4566 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4567 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4568 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4569 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4570 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4571 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4572 | ||
| 4573 | PORT_START("IN2") | |
| 4574 | PORT_DIPNAME( 0x01, 0x01, "IN2") | |
| 4575 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4576 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4577 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4578 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4579 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4580 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4581 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4582 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4583 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4584 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4585 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4586 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4587 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4588 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4589 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4590 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4591 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4592 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4593 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4594 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4595 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4596 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4597 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4598 | ||
| 4599 | PORT_START("IN3") | |
| 4600 | PORT_DIPNAME( 0x01, 0x01, "IN3") | |
| 4601 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4602 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4603 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4604 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4605 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4606 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4607 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4608 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4609 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4610 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4611 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4612 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4613 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4614 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4615 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4616 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4617 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4618 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4619 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4620 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4621 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4622 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4623 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4624 | ||
| 4625 | PORT_START("IN4") | |
| 4626 | PORT_DIPNAME( 0x01, 0x01, "IN4") | |
| 4627 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4628 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4629 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4630 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4631 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4632 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4633 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4634 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4635 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4636 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4637 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4638 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4639 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4640 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4641 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4642 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4643 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4644 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4645 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4646 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4647 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4648 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4649 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4650 | ||
| 4651 | PORT_START("DSW1") | |
| 4652 | PORT_DIPNAME( 0x01, 0x01, "DSW1") | |
| 4653 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4654 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4655 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4656 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4657 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4658 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4659 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4660 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4661 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4662 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4663 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4664 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4665 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4666 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4667 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4668 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4669 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4670 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4671 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4672 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4673 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4674 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4675 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4676 | ||
| 4677 | PORT_START("DSW2") | |
| 4678 | PORT_DIPNAME( 0x01, 0x01, "DSW2") | |
| 4679 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4680 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4681 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4682 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4683 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4684 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4685 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4686 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4687 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4688 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4689 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4690 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4691 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4692 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4693 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4694 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4695 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4696 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4697 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4698 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4699 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4700 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4701 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4702 | ||
| 4703 | PORT_START("DSW3") | |
| 4704 | PORT_DIPNAME( 0x01, 0x01, "DSW3") | |
| 4705 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4706 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4707 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4708 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4709 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4710 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4711 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4712 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4713 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4714 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4715 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4716 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4717 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4718 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4719 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4720 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4721 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4722 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4723 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4724 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4725 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4726 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4727 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4728 | ||
| 4729 | PORT_START("DSW4") | |
| 4730 | PORT_DIPNAME( 0x01, 0x01, "DSW4") | |
| 4731 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 4732 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4733 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 4734 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 4735 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4736 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 4737 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 4738 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4739 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 4740 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 4741 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4742 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 4743 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 4744 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4745 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 4746 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 4747 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4748 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 4749 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 4750 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4751 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 4752 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 4753 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 4754 | INPUT_PORTS_END | |
| 4755 | ||
| 4156 | 4756 | static const gfx_layout charlayout = |
| 4157 | 4757 | { |
| 4158 | 4758 | 8,8, /* 8*8 characters */ |
| r7553 | r7554 | |
| 4448 | 5048 | |
| 4449 | 5049 | static GFXDECODE_START( unkch ) |
| 4450 | 5050 | GFXDECODE_ENTRY( "gfx1", 0, tiles8x8x4alt_layout, 0, 16 ) |
| 4451 | GFXDECODE_ENTRY( "gfx2", 0, tiles8x32x4alt2_layout, | |
| 5051 | GFXDECODE_ENTRY( "gfx2", 0, tiles8x32x4alt2_layout, 0 | |
| 4452 | 5052 | GFXDECODE_END |
| 4453 | 5053 | |
| 4454 | 5054 | static const gfx_layout tilescherrys_layout = |
| r7553 | r7554 | |
| 4468 | 5068 | GFXDECODE_END |
| 4469 | 5069 | |
| 4470 | 5070 | |
| 5071 | static const gfx_layout tiles8x8x4pkr_layout = | |
| 5072 | { | |
| 5073 | 8,8, /* 8*8 characters */ | |
| 5074 | RGN_FRAC(1,1), /* 4096 characters */ | |
| 5075 | 4, /* 3 bits per pixel */ | |
| 5076 | { 0, 2, 4, 6 }, /* the bitplanes are packed in one byte */ | |
| 5077 | { 0*8+0, 0*8+1, 1*8+0, 1*8+1, 2*8+0, 2*8+1, 3*8+0, 3*8+1 }, | |
| 5078 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 }, | |
| 5079 | 32*8 /* every char takes 32 consecutive bytes */ | |
| 5080 | }; | |
| 4471 | 5081 | |
| 5082 | static const gfx_layout tiles8x32x4pkr_layout = | |
| 5083 | { | |
| 5084 | 8,32, /* 8*8 characters */ | |
| 5085 | RGN_FRAC(1,1), /* 4096 characters */ | |
| 5086 | 4, /* 3 bits per pixel */ | |
| 5087 | { 0, 2, 4, 6 }, /* the bitplanes are packed in one byte */ | |
| 5088 | { 0*8+0, 0*8+1, 1*8+0, 1*8+1, 2*8+0, 2*8+1, 3*8+0, 3*8+1 }, | |
| 5089 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32, | |
| 5090 | 16*32,17*32,18*32,19*32,20*32,21*32,22*32,23*32,24*32,25*32, 26*32, 27*32, 28*32, 29*32, 30*32, 31*32}, | |
| 5091 | 32*8*4 /* every char takes 32 consecutive bytes */ | |
| 5092 | }; | |
| 5093 | ||
| 5094 | static GFXDECODE_START( pkrmast ) | |
| 5095 | GFXDECODE_ENTRY( "gfx1", 0, tiles8x8x4pkr_layout, 0, 16 ) | |
| 5096 | GFXDECODE_ENTRY( "gfx2", 0, tiles8x32x4pkr_layout, 0, 16 ) | |
| 5097 | GFXDECODE_END | |
| 5098 | ||
| 5099 | ||
| 5100 | ||
| 4472 | 5101 | /************************************* |
| 4473 | 5102 | * PPI 8255 (x3) Interfaces * |
| 4474 | 5103 | *************************************/ |
| r7553 | r7554 | |
| 4521 | 5150 | } |
| 4522 | 5151 | }; |
| 4523 | 5152 | |
| 5153 | ||
| 5154 | ||
| 5155 | ||
| 5156 | static WRITE8_DEVICE_HANDLER( system_outputa_w ) | |
| 5157 | { | |
| 5158 | //goldstar_state *state = (goldstar_state *)device->machine->driver_data; | |
| 5159 | //popmessage("system_outputa_w %02x",data); | |
| 5160 | } | |
| 5161 | ||
| 5162 | ||
| 5163 | static WRITE8_DEVICE_HANDLER( system_outputb_w ) | |
| 5164 | { | |
| 5165 | //goldstar_state *state = (goldstar_state *)device->machine->driver_data; | |
| 5166 | //popmessage("system_outputb_w %02x",data); | |
| 5167 | } | |
| 5168 | ||
| 5169 | ||
| 5170 | static WRITE8_DEVICE_HANDLER( system_outputc_w ) | |
| 5171 | { | |
| 5172 | goldstar_state *state = (goldstar_state *)device->machine->driver_data; | |
| 5173 | ||
| 5174 | state->lucky8_nmi_enable = data & 8; | |
| 5175 | state->unkch_vidreg = data & 2; | |
| 5176 | //popmessage("system_outputc_w %02x",data); | |
| 5177 | } | |
| 5178 | ||
| 5179 | ||
| 4524 | 5180 | static const ppi8255_interface lucky8_ppi8255_intf[3] = |
| 4525 | 5181 | { |
| 4526 | 5182 | { /* A, B & C set as input */ |
| r7553 | r7554 | |
| 4543 | 5199 | DEVCB_INPUT_PORT("DSW2"), /* Port A read */ |
| 4544 | 5200 | DEVCB_NULL, /* Port B read */ |
| 4545 | 5201 | DEVCB_NULL, /* Port C read */ |
| 4546 | DEVCB_NULL, /* Port A write */ | |
| 4547 | DEVCB_NULL, /* Port B write */ | |
| 4548 | DEVCB_NULL /* Port C write */ | |
| 5202 | DEVCB_HANDLER(system_outputa_w), /* Port A write */ | |
| 5203 | DEVCB_HANDLER(system_outputb_w), /* Port B write */ | |
| 5204 | DEVCB_HANDLER(system_outputc_w) /* Port C write */ | |
| 4549 | 5205 | } |
| 4550 | 5206 | }; |
| 4551 | 5207 | |
| r7553 | r7554 | |
| 4617 | 5273 | DEVCB_NULL |
| 4618 | 5274 | }; |
| 4619 | 5275 | |
| 5276 | static WRITE8_DEVICE_HANDLER( ay8910_outputa_w ) | |
| 5277 | { | |
| 5278 | //goldstar_state *state = (goldstar_state *)device->machine->driver_data; | |
| 5279 | //popmessage("ay8910_outputa_w %02x",data); | |
| 5280 | } | |
| 5281 | ||
| 5282 | static WRITE8_DEVICE_HANDLER( ay8910_outputb_w ) | |
| 5283 | { | |
| 5284 | //goldstar_state *state = (goldstar_state *)device->machine->driver_data; | |
| 5285 | //popmessage("ay8910_outputb_w %02x",data); | |
| 5286 | } | |
| 5287 | ||
| 4620 | 5288 | static const ay8910_interface lucky8_ay8910_config = |
| 4621 | 5289 | { |
| 4622 | 5290 | AY8910_LEGACY_OUTPUT, |
| 4623 | 5291 | AY8910_DEFAULT_LOADS, |
| 4624 | 5292 | DEVCB_INPUT_PORT("DSW3"), |
| 4625 | 5293 | DEVCB_INPUT_PORT("DSW4"), |
| 4626 | DEVCB_NULL, | |
| 4627 | DEVCB_NULL | |
| 5294 | DEVCB_HANDLER(ay8910_outputa_w), | |
| 5295 | DEVCB_HANDLER(ay8910_outputb_w) | |
| 4628 | 5296 | }; |
| 4629 | 5297 | |
| 4630 | 5298 | static const ay8910_interface ladylinr_ay8910_config = |
| r7553 | r7554 | |
| 5016 | 5684 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 5017 | 5685 | MACHINE_DRIVER_END |
| 5018 | 5686 | |
| 5687 | static INTERRUPT_GEN( lucky8_irq ) | |
| 5688 | { | |
| 5689 | goldstar_state *state = (goldstar_state *)device->machine->driver_data; | |
| 5690 | ||
| 5691 | if(state->lucky8_nmi_enable) | |
| 5692 | cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); | |
| 5693 | } | |
| 5694 | ||
| 5019 | 5695 | static MACHINE_DRIVER_START( lucky8 ) |
| 5020 | 5696 | |
| 5021 | 5697 | MDRV_DRIVER_DATA(goldstar_state) |
| r7553 | r7554 | |
| 5024 | 5700 | MDRV_CPU_ADD("maincpu", Z80, CPU_CLOCK) |
| 5025 | 5701 | MDRV_CPU_PROGRAM_MAP(lucky8_map) |
| 5026 | 5702 | //MDRV_CPU_IO_MAP(goldstar_readport) |
| 5027 | MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse) | |
| 5028 | // MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) // causes 'magical' to display 'wait' instead | |
| 5703 | MDRV_CPU_VBLANK_INT("screen", lucky8_irq) | |
| 5029 | 5704 | |
| 5030 | 5705 | /* 3x 8255 */ |
| 5031 | 5706 | MDRV_PPI8255_ADD( "ppi8255_0", lucky8_ppi8255_intf[0] ) |
| r7553 | r7554 | |
| 5060 | 5735 | |
| 5061 | 5736 | MACHINE_DRIVER_END |
| 5062 | 5737 | |
| 5738 | static MACHINE_DRIVER_START( magical ) | |
| 5063 | 5739 | |
| 5740 | MDRV_DRIVER_DATA(goldstar_state) | |
| 5741 | ||
| 5742 | /* basic machine hardware */ | |
| 5743 | MDRV_CPU_ADD("maincpu", Z80, CPU_CLOCK) | |
| 5744 | MDRV_CPU_PROGRAM_MAP(magical_map) | |
| 5745 | //MDRV_CPU_IO_MAP(goldstar_readport) | |
| 5746 | MDRV_CPU_VBLANK_INT("screen", lucky8_irq) | |
| 5747 | ||
| 5748 | /* 3x 8255 */ | |
| 5749 | MDRV_PPI8255_ADD( "ppi8255_0", lucky8_ppi8255_intf[0] ) | |
| 5750 | MDRV_PPI8255_ADD( "ppi8255_1", lucky8_ppi8255_intf[1] ) | |
| 5751 | MDRV_PPI8255_ADD( "ppi8255_2", lucky8_ppi8255_intf[2] ) | |
| 5752 | ||
| 5753 | /* video hardware */ | |
| 5754 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 5755 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 5756 | // MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 5757 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 5758 | MDRV_SCREEN_SIZE(64*8, 32*8) | |
| 5759 | MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1) | |
| 5760 | MDRV_PALETTE_INIT(lucky8) | |
| 5761 | ||
| 5762 | MDRV_GFXDECODE(ncb3) | |
| 5763 | MDRV_PALETTE_LENGTH(256) | |
| 5764 | MDRV_NVRAM_HANDLER(goldstar) | |
| 5765 | ||
| 5766 | MDRV_VIDEO_START(magical) | |
| 5767 | MDRV_VIDEO_UPDATE(magical) | |
| 5768 | ||
| 5769 | /* sound hardware */ | |
| 5770 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 5771 | ||
| 5772 | MDRV_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) | |
| 5773 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.00) // shut up annoying whine | |
| 5774 | ||
| 5775 | MDRV_SOUND_ADD("aysnd", AY8910, AY_CLOCK) | |
| 5776 | MDRV_SOUND_CONFIG(lucky8_ay8910_config) | |
| 5777 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) | |
| 5778 | MACHINE_DRIVER_END | |
| 5779 | ||
| 5780 | ||
| 5064 | 5781 | static MACHINE_DRIVER_START( kkojnoli ) |
| 5065 | 5782 | |
| 5066 | 5783 | MDRV_DRIVER_DATA(goldstar_state) |
| r7553 | r7554 | |
| 5372 | 6089 | |
| 5373 | 6090 | //MDRV_NVRAM_HANDLER(goldstar) |
| 5374 | 6091 | |
| 5375 | MDRV_VIDEO_START(cherrym) | |
| 5376 | MDRV_VIDEO_UPDATE(goldstar) | |
| 6092 | MDRV_VIDEO_START(unkch) | |
| 6093 | MDRV_VIDEO_UPDATE(unkch) | |
| 5377 | 6094 | |
| 5378 | 6095 | /* sound hardware */ |
| 5379 | 6096 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 5380 | 6097 | |
| 5381 | MDRV_SOUND_ADD("aysnd", AY8910, AY_CLOCK) | |
| 5382 | MDRV_SOUND_CONFIG(ay8910_config) | |
| 5383 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 6098 | // MDRV_SOUND_ADD("aysnd", AY8910, AY_CLOCK) | |
| 6099 | // MDRV_SOUND_CONFIG(ay8910_config) | |
| 6100 | // MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 5384 | 6101 | MACHINE_DRIVER_END |
| 5385 | 6102 | |
| 5386 | 6103 | static MACHINE_DRIVER_START( cherrys ) |
| r7553 | r7554 | |
| 5390 | 6107 | |
| 5391 | 6108 | MACHINE_DRIVER_END |
| 5392 | 6109 | |
| 6110 | // hw unknown | |
| 6111 | static MACHINE_DRIVER_START( pkrmast ) | |
| 6112 | ||
| 6113 | MDRV_DRIVER_DATA(goldstar_state) | |
| 6114 | ||
| 6115 | /* basic machine hardware */ | |
| 6116 | MDRV_CPU_ADD("maincpu", Z80, CPU_CLOCK) | |
| 6117 | MDRV_CPU_PROGRAM_MAP(cm_map) | |
| 6118 | MDRV_CPU_IO_MAP(cm_portmap) | |
| 6119 | MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) | |
| 6120 | ||
| 6121 | /* 2x 8255 */ | |
| 6122 | MDRV_PPI8255_ADD( "ppi8255_0", cm_ppi8255_intf[0] ) | |
| 6123 | MDRV_PPI8255_ADD( "ppi8255_1", cm_ppi8255_intf[1] ) | |
| 6124 | ||
| 6125 | /* video hardware */ | |
| 6126 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 6127 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 6128 | // MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 6129 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 6130 | MDRV_SCREEN_SIZE(64*8, 32*8) | |
| 6131 | MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1) | |
| 6132 | ||
| 6133 | MDRV_GFXDECODE(pkrmast) | |
| 6134 | MDRV_PALETTE_LENGTH(256) | |
| 6135 | MDRV_PALETTE_INIT(cm) | |
| 6136 | MDRV_NVRAM_HANDLER(goldstar) | |
| 6137 | ||
| 6138 | MDRV_VIDEO_START(cherrym) | |
| 6139 | MDRV_VIDEO_UPDATE(goldstar) | |
| 6140 | ||
| 6141 | /* sound hardware */ | |
| 6142 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 6143 | MDRV_SOUND_ADD("aysnd", AY8910, AY_CLOCK) | |
| 6144 | MDRV_SOUND_CONFIG(cm_ay8910_config) | |
| 6145 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 6146 | MACHINE_DRIVER_END | |
| 6147 | ||
| 5393 | 6148 | /*************************************************************************** |
| 5394 | 6149 | |
| 5395 | 6150 | Game driver(s) |
| r7553 | r7554 | |
| 6006 | 6761 | ROM_LOAD( "82s129.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) |
| 6007 | 6762 | ROM_END |
| 6008 | 6763 | |
| 6764 | ||
| 6765 | ROM_START( cmezspin ) | |
| 6766 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 6767 | ROM_LOAD( "ezspin.rom", 0x0000, 0x1000, CRC(de92b85c) SHA1(36e99b1444980a279293839c6db10f577b9e8657) ) | |
| 6768 | ROM_CONTINUE(0x4000,0x1000) | |
| 6769 | ROM_CONTINUE(0x3000,0x1000) | |
| 6770 | ROM_CONTINUE(0x7000,0x1000) | |
| 6771 | ROM_CONTINUE(0x1000,0x1000) | |
| 6772 | ROM_CONTINUE(0x6000,0x1000) | |
| 6773 | ROM_CONTINUE(0x2000,0x1000) | |
| 6774 | ROM_CONTINUE(0x5000,0x1000) | |
| 6775 | ||
| 6776 | ROM_REGION( 0x18000, "gfx1", 0 ) | |
| 6777 | ROM_LOAD( "u16.7", 0x00000, 0x8000, CRC(19cc1d67) SHA1(47487f9362bfb36a32100ed772960628844462bf) ) | |
| 6778 | ROM_LOAD( "up11.6", 0x08000, 0x8000, CRC(c1466efa) SHA1(d725fc507c77e66bde93d0c33bf469add15f39b9) ) // changed title | |
| 6779 | ROM_LOAD( "u4.5", 0x10000, 0x8000, CRC(e39fff9c) SHA1(22fdc517fa478441622c6245cecb5728c5595757) ) | |
| 6780 | ||
| 6781 | ROM_REGION( 0x8000, "gfx2", 0 ) | |
| 6782 | ROM_LOAD( "u15.4", 0x0000, 0x2000, CRC(8607ffd9) SHA1(9bc94715554aa2473ae2ed249a47f29c7886b3dc) ) | |
| 6783 | ROM_LOAD( "u10.3", 0x2000, 0x2000, CRC(c32367be) SHA1(ff217021b9c58e23b2226f8b0a7f5da966225715) ) | |
| 6784 | ROM_LOAD( "u14.2", 0x4000, 0x2000, CRC(6dfcb188) SHA1(22430429c798954d9d979e62699b58feae7fdbf4) ) | |
| 6785 | ROM_LOAD( "u9.1", 0x6000, 0x2000, CRC(9678ead2) SHA1(e80aefa98b2363fe9e6b2415762695ace272e4d3) ) | |
| 6786 | ||
| 6787 | ROM_REGION( 0x10000, "user1", 0 ) | |
| 6788 | ROM_LOAD( "u53.8", 0x0000, 0x10000, CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) ) | |
| 6789 | ||
| 6790 | /* proms taken from cmv4, probably wrong */ | |
| 6791 | ROM_REGION( 0x200, "proms", 0 ) | |
| 6792 | ROM_LOAD( "82s129.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) ) | |
| 6793 | ROM_LOAD( "82s129.u70", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) ) | |
| 6794 | ||
| 6795 | ROM_REGION( 0x100, "proms2", 0 ) | |
| 6796 | ROM_LOAD( "82s129.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) | |
| 6797 | ROM_END | |
| 6798 | ||
| 6009 | 6799 | ROM_START( cmasterc ) |
| 6010 | 6800 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 6011 | 6801 | ROM_LOAD( "msii841.u81", 0x3000, 0x1000, CRC(977db602) SHA1(0fd3d6781b654ac6befdc9278f84ca708d5d448c) ) |
| r7553 | r7554 | |
| 6220 | 7010 | ROM_LOAD( "82s129.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) |
| 6221 | 7011 | ROM_END |
| 6222 | 7012 | |
| 7013 | // the program roms on these seem scrambled somehow, and there are no gfx roms dumped | |
| 7014 | ROM_START( jkrmast ) | |
| 7015 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 7016 | ROM_LOAD( "jokermaster.rom", 0x0000, 0x10000, CRC(73caf824) SHA1(b7a7bb6190465f7c3b40f2ef97f4f6beeb89ec41) ) | |
| 6223 | 7017 | |
| 7018 | // unknown # of roms / sizes | |
| 7019 | ROM_REGION( 0x20000, "gfx1", 0 ) | |
| 7020 | ROM_LOAD( "gfx_roms", 0x00000, 0x8000, NO_DUMP ) | |
| 7021 | ROM_REGION( 0x20000, "gfx2", ROMREGION_ERASE00 ) | |
| 7022 | ||
| 7023 | ROM_REGION( 0x10000, "user1", ROMREGION_ERASE00 ) | |
| 7024 | ROM_REGION( 0x200, "proms", 0 ) | |
| 7025 | ROM_LOAD( "proms", 0x00000, 0x200, NO_DUMP ) | |
| 7026 | ROM_REGION( 0x100, "proms2", ROMREGION_ERASE00 ) | |
| 7027 | ROM_END | |
| 7028 | ||
| 7029 | ROM_START( pkrmast ) | |
| 7030 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 7031 | ROM_LOAD( "pokermastera.rom", 0x0000, 0x10000, CRC(467249f7) SHA1(efbab56896dc58d22ec921e7f5fd0befcfaadc52) ) | |
| 7032 | ||
| 7033 | ROM_REGION( 0x20000, "gfx1", 0 ) // tiles | |
| 7034 | ROM_LOAD( "103-2.bin", 0x00000, 0x20000, CRC(ed0dfbfe) SHA1(c3a5b68e821461b161293eaec1515e2b0f26c4f9) ) | |
| 7035 | ||
| 7036 | ROM_REGION( 0x20000, "gfx2", 0 ) // reels + girl? | |
| 7037 | ROM_LOAD( "103-1.bin", 0x00000, 0x20000, CRC(e375cd4b) SHA1(68888126ff9743cd589f3426205231bc3a896588) ) | |
| 7038 | ||
| 7039 | ROM_REGION( 0x10000, "user1", ROMREGION_ERASE00 ) | |
| 7040 | ROM_REGION( 0x200, "proms", 0 ) | |
| 7041 | ROM_LOAD( "proms", 0x00000, 0x200, NO_DUMP ) | |
| 7042 | ROM_REGION( 0x100, "proms2", ROMREGION_ERASE00 ) | |
| 7043 | ROM_END | |
| 7044 | ||
| 7045 | ||
| 7046 | ||
| 7047 | ROM_START( pkrmasta ) | |
| 7048 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 7049 | ROM_LOAD( "pokermasterb.rom", 0x0000, 0x10000, CRC(f59e0273) SHA1(160426b86dbb8a718cb3b886f90a231baed86a40) ) | |
| 7050 | ||
| 7051 | ROM_REGION( 0x20000, "gfx1", 0 ) // tiles | |
| 7052 | ROM_LOAD( "103-2.bin", 0x00000, 0x20000, CRC(ed0dfbfe) SHA1(c3a5b68e821461b161293eaec1515e2b0f26c4f9) ) | |
| 7053 | ||
| 7054 | ROM_REGION( 0x20000, "gfx2", 0 ) // reels + girl? | |
| 7055 | ROM_LOAD( "103-1.bin", 0x00000, 0x20000, CRC(e375cd4b) SHA1(68888126ff9743cd589f3426205231bc3a896588) ) | |
| 7056 | ||
| 7057 | ROM_REGION( 0x10000, "user1", ROMREGION_ERASE00 ) | |
| 7058 | ROM_REGION( 0x200, "proms", 0 ) | |
| 7059 | ROM_LOAD( "proms", 0x00000, 0x200, NO_DUMP ) | |
| 7060 | ROM_REGION( 0x100, "proms2", ROMREGION_ERASE00 ) | |
| 7061 | ROM_END | |
| 7062 | ||
| 7063 | ||
| 7064 | ||
| 6224 | 7065 | /* |
| 6225 | 7066 | |
| 6226 | 7067 | Cherry Master '91 |
| r7553 | r7554 | |
| 6371 | 7212 | ROM_END |
| 6372 | 7213 | |
| 6373 | 7214 | ROM_START( magical ) |
| 6374 | ROM_REGION( 0x | |
| 7215 | ROM_REGION( 0x20000, "maincpu", 0 ) | |
| 6375 | 7216 | ROM_LOAD( "8_p6_d12.512", 0x00000, 0x08000, CRC(6978c662) SHA1(cfdbcdcd4085c264e1d0ad4f18160b40d2d4e406) ) |
| 6376 | 7217 | ROM_IGNORE(0x8000) // 1ST AND 2ND HALF IDENTICAL |
| 6377 | ROM_LOAD( "9_p7_d14.512", 0x0 | |
| 7218 | ROM_LOAD( "9_p7_d14.512", 0x0c000, 0x04000, CRC(095230ba) SHA1(e60f5497c2cd5f1c0fc33b1e21303dd569654e6d) ) | |
| 6378 | 7219 | ROM_IGNORE(0xc000) // BADADDR --xxxxxxxxxxxxxx |
| 6379 | 7220 | |
| 6380 | 7221 | ROM_REGION( 0x30000, "gfx1", 0 ) |
| r7553 | r7554 | |
| 6392 | 7233 | ROM_LOAD( "proms", 0x0000, 0x0200, NO_DUMP ) |
| 6393 | 7234 | |
| 6394 | 7235 | ROM_REGION( 0x20, "proms2", ROMREGION_ERASE00 ) |
| 6395 | | |
| 7236 | | |
| 6396 | 7237 | |
| 6397 | 7238 | ROM_REGION( 0x100, "unkprom", ROMREGION_ERASE00 ) |
| 6398 | 7239 | //ROM_LOAD( "g14", 0x0000, 0x0100, CRC(bd48de71) SHA1(e4fa1e774af1499bc568be5b2deabb859d8c8172) ) |
| r7553 | r7554 | |
| 8735 | 9576 | GAME( 1995, cmfun, cmv4, cm, cmv4, cmv4, ROT0, "Dyna", "Cherry Master (Fun USA v2.5 bootleg / hack)", 0 ) |
| 8736 | 9577 | GAME( 1991, cmaster, 0, cm, cmaster, 0, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 1)", 0 ) |
| 8737 | 9578 | GAME( 1991, cmasterb, cmaster, cm, cmasterb, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 2)", 0 ) |
| 9579 | GAME( 1991, cmezspin, cmaster, cm, cmasterb, cmv4, ROT0, "Dyna", "Cherry Master I (E-Z Spin bootleg / hack)", 0 ) | |
| 8738 | 9580 | GAME( 1991, cmasterc, cmaster, cmasterc, cmasterc, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 3)", 0 ) |
| 8739 | 9581 | GAME( 1991, cmasterbv, cmaster, cm, cmasterb, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 4, with Blitz Poker ROM?)", GAME_NOT_WORKING ) // Cherry Master works, but no idea how to use the Blitz ROM |
| 8740 | 9582 | GAME( 1991, cmasterd, cmaster, cm, cmasterb, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 5)", 0 ) |
| 8741 | 9583 | GAME( 1991, cmastere, cmaster, cm, cmasterb, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 6)", 0 ) |
| 8742 | 9584 | GAME( 1991, cmasterf, cmaster, cm, cmasterb, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 7)", 0 ) |
| 8743 | 9585 | |
| 9586 | GAME( 199?, jkrmast, 0, pkrmast, cmasterb, cmv4, ROT0, "<unknown>", "Joker Master", GAME_NOT_WORKING ) // incomplete dump + encrypted? | |
| 9587 | GAME( 199?, pkrmast, jkrmast, pkrmast, cmasterb, cmv4, ROT0, "<unknown>", "Poker Master (set 1)", GAME_NOT_WORKING ) // incomplete dump + encrypted? | |
| 9588 | GAME( 199?, pkrmasta, jkrmast, pkrmast, cmasterb, cmv4, ROT0, "<unknown>", "Poker Master (set 2)", GAME_NOT_WORKING ) // incomplete dump + encrypted? | |
| 8744 | 9589 | |
| 9590 | ||
| 8745 | 9591 | GAME( 1991, cmast91, 0, cmast91, cmast91, cmast91, ROT0, "Dyna", "Cherry Master '91 (ver.1.30)", 0 ) |
| 8746 | 9592 | |
| 8747 | 9593 | GAME( 1992, cmast92, 0, cmast91, cmast91, cmast91, ROT0, "Dyna", "Cherry Master '92", GAME_NOT_WORKING ) // no gfx roms are dumped |
| r7553 | r7554 | |
| 8755 | 9601 | GAME( 198?, kkojnoli, 0, kkojnoli, kkojnoli, 0, ROT0, "south korean hack", "Kkoj Noli (Kill the Bees)", GAME_IMPERFECT_COLORS ) |
| 8756 | 9602 | GAME( 198?, wcat3, 0, wcat3, lucky8, 0, ROT0, "E.A.I.", "Wild Cat 3", GAME_NOT_WORKING ) |
| 8757 | 9603 | |
| 8758 | GAME( 198?, mtonic, 0, ncb3, cmv801, mtonic, ROT0, "Tonic", "Magical Tonic?", GAME_WRONG_COLORS | GAME_NOT_WORKING ) | |
| 8759 | GAME( 198?, magical, 0, lucky8, lucky8, 0, ROT0, "Micro Manufacturing Inc.", "Magical Tonic / Magical Odds?", GAME_NOT_WORKING ) | |
| 9604 | GAME( 1992, magical, 0, magical, magical, 0, ROT0, "Pal Company / Micro Manufacturing Inc.", "Magical Odds (set 1)", GAME_WRONG_COLORS|GAME_IMPERFECT_GRAPHICS ) | |
| 9605 | GAME( 1991, mtonic, magical, magical, mtonic, mtonic, ROT0, "Pal Company", "Magical Odds (set 2, alt hardware)", GAME_WRONG_COLORS | GAME_NOT_WORKING |GAME_NO_SOUND) // Magical Odds logo / company in GFX | |
| 8760 | 9606 | |
| 8761 | 9607 | |
| 8762 | 9608 | /* --- Amcoe games --- */ |
| r7553 | r7554 | |
| 8799 | 9645 | GAME( 2003, nfm, 0, nfm, nfb96bl, 0, ROT0, "Ming-Yang Electronic", "New Fruit Machine (Ming-Yang Electronic)", GAME_NOT_WORKING ) |
| 8800 | 9646 | |
| 8801 | 9647 | // these have 'cherry 1994' in the program roms, but also "Super Cherry / New Cherry Gold '99" probably hacks of a 1994 version of Cherry Bonus / Cherry Master (Super Cherry Master?) |
| 8802 | GAME( 1999, unkch1, 0, unkch, schery97, unkch1, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 1)", GAME_NOT_WORKING ) | |
| 8803 | GAME( 1999, unkch2, unkch1, unkch, schery97, unkch1, ROT0, "bootleg", "Super Cherry Gold (bootleg of Super Cherry Master)", GAME_NOT_WORKING ) | |
| 8804 | GAME( 1999, unkch3, unkch1, unkch, schery97, unkch3, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 2)", GAME_NOT_WORKING ) // cards have been hacked to look like barrels | |
| 8805 | GAME( 1999, unkch4, unkch1, unkch, schery97, unkch4, ROT0, "bootleg", "Grand Cherry Master (bootleg of Super Cherry Master)", GAME_NOT_WORKING ) // by 'toy system' hungary | |
| 9648 | GAME( 1999, unkch1, 0, unkch, unkch, unkch1, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 1)", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 9649 | GAME( 1999, unkch2, unkch1, unkch, unkch, unkch1, ROT0, "bootleg", "Super Cherry Gold (bootleg of Super Cherry Master)", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 9650 | GAME( 1999, unkch3, unkch1, unkch, unkch, unkch3, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 2)", GAME_NOT_WORKING|GAME_NO_SOUND ) // cards have been hacked to look like barrels, girl removed? | |
| 9651 | GAME( 1999, unkch4, unkch1, unkch, unkch, unkch4, ROT0, "bootleg", "Grand Cherry Master (bootleg of Super Cherry Master)", GAME_NOT_WORKING|GAME_NO_SOUND ) // by 'toy system' hungary | |
| 8806 | 9652 | |
| 8807 | 9653 | |
| 8808 | 9654 |
| r7553 | r7554 | |
|---|---|---|
| 388 | 388 | ROM_REGION( 0x140000, "k053260", 0 ) /* samples for the 053260 */ |
| 389 | 389 | ROM_LOAD( "072-d05.1f", 0x000000, 0x100000, CRC(1397a73b) SHA1(369422c84cca5472967af54b8351e29fcd69f621) ) |
| 390 | 390 | ROM_LOAD( "072-d04.1d", 0x100000, 0x040000, CRC(78778013) SHA1(edbd6d83b0d1a20df39bb160b92395586fa3c32d) ) |
| 391 | ||
| 392 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 393 | ROM_LOAD( "simpsons.nv", 0x0000, 0x080, CRC(ec3f0449) SHA1(da35b98cd10bfabe9df3ede05462fabeb0e01ca9) ) | |
| 391 | 394 | ROM_END |
| 392 | 395 | |
| 393 | 396 | ROM_START( simpsons4pa ) /* World 4 Player, later? (by use of later leters) */ |
| r7553 | r7554 | |
| 415 | 418 | ROM_REGION( 0x140000, "k053260", 0 ) /* samples for the 053260 */ |
| 416 | 419 | ROM_LOAD( "072-d05.1f", 0x000000, 0x100000, CRC(1397a73b) SHA1(369422c84cca5472967af54b8351e29fcd69f621) ) |
| 417 | 420 | ROM_LOAD( "072-d04.1d", 0x100000, 0x040000, CRC(78778013) SHA1(edbd6d83b0d1a20df39bb160b92395586fa3c32d) ) |
| 421 | ||
| 422 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 423 | ROM_LOAD( "simpsons4pa.nv", 0x0000, 0x080, CRC(ec3f0449) SHA1(da35b98cd10bfabe9df3ede05462fabeb0e01ca9) ) | |
| 418 | 424 | ROM_END |
| 419 | 425 | |
| 420 | 426 | |
| r7553 | r7554 | |
| 443 | 449 | ROM_REGION( 0x140000, "k053260", 0 ) /* samples for the 053260 */ |
| 444 | 450 | ROM_LOAD( "072-d05.1f", 0x000000, 0x100000, CRC(1397a73b) SHA1(369422c84cca5472967af54b8351e29fcd69f621) ) |
| 445 | 451 | ROM_LOAD( "072-d04.1d", 0x100000, 0x040000, CRC(78778013) SHA1(edbd6d83b0d1a20df39bb160b92395586fa3c32d) ) |
| 452 | ||
| 453 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 454 | ROM_LOAD( "simpsons2p.nv", 0x0000, 0x080, CRC(fbac4e30) SHA1(d3ff3a392550d9b06400b9292a44bdac7ba5c801) ) | |
| 446 | 455 | ROM_END |
| 447 | 456 | |
| 448 | 457 | ROM_START( simpsons2p2 ) /* World 2 Player, alt */ |
| 449 | 458 | ROM_REGION( 0x88000, "maincpu", 0 ) /* code + banked roms + banked ram */ |
| 450 | | |
| 459 | | |
| 451 | 460 | ROM_LOAD( "072-p01.17c", 0x30000, 0x20000, CRC(07ceeaea) SHA1(c18255ae1d578c2d53de80d6323cdf41cbe47b57) ) |
| 452 | ROM_LOAD( "072-_13.13c", 0x50000, 0x20000, CRC(54e6df66) SHA1(1b83ae56cf1deb51b04880fa421f06568c938a99) ) /* Uknown revision/region code */ | |
| 453 | ROM_LOAD( "072-_12.15c", 0x70000, 0x18000, CRC(96636225) SHA1(5de95606e5c9337f18bc42f4df791cacafa20399) ) /* Uknown revision/region code */ | |
| 461 | ROM_LOAD( "072-_13.13c", 0x50000, 0x20000, CRC(54e6df66) SHA1(1b83ae56cf1deb51b04880fa421f06568c938a99) ) /* Unknown revision/region code */ | |
| 462 | ROM_LOAD( "072-_12.15c", 0x70000, 0x18000, CRC(96636225) SHA1(5de95606e5c9337f18bc42f4df791cacafa20399) ) /* Unknown revision/region code */ | |
| 454 | 463 | ROM_CONTINUE( 0x08000, 0x08000 ) |
| 455 | 464 | |
| 456 | 465 | ROM_REGION( 0x28000, "audiocpu", 0 ) /* Z80 code + banks */ |
| r7553 | r7554 | |
| 470 | 479 | ROM_REGION( 0x140000, "k053260", 0 ) /* samples for the 053260 */ |
| 471 | 480 | ROM_LOAD( "072-d05.1f", 0x000000, 0x100000, CRC(1397a73b) SHA1(369422c84cca5472967af54b8351e29fcd69f621) ) |
| 472 | 481 | ROM_LOAD( "072-d04.1d", 0x100000, 0x040000, CRC(78778013) SHA1(edbd6d83b0d1a20df39bb160b92395586fa3c32d) ) |
| 482 | ||
| 483 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 484 | ROM_LOAD( "simpsons2p2.nv", 0x0000, 0x080, CRC(fbac4e30) SHA1(d3ff3a392550d9b06400b9292a44bdac7ba5c801) ) | |
| 473 | 485 | ROM_END |
| 474 | 486 | |
| 475 | 487 | ROM_START( simpsons2pa ) /* Asia 2 Player */ |
| r7553 | r7554 | |
| 497 | 509 | ROM_REGION( 0x140000, "k053260", 0 ) /* samples for the 053260 */ |
| 498 | 510 | ROM_LOAD( "072-d05.1f", 0x000000, 0x100000, CRC(1397a73b) SHA1(369422c84cca5472967af54b8351e29fcd69f621) ) |
| 499 | 511 | ROM_LOAD( "072-d04.1d", 0x100000, 0x040000, CRC(78778013) SHA1(edbd6d83b0d1a20df39bb160b92395586fa3c32d) ) |
| 512 | ||
| 513 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 514 | ROM_LOAD( "simpsons2pa.nv", 0x0000, 0x080, CRC(fbac4e30) SHA1(d3ff3a392550d9b06400b9292a44bdac7ba5c801) ) | |
| 500 | 515 | ROM_END |
| 501 | 516 | |
| 502 | 517 | ROM_START( simpsons2pj ) /* Japan 2 Player */ |
| r7553 | r7554 | |
| 524 | 539 | ROM_REGION( 0x140000, "k053260", 0 ) /* samples for the 053260 */ |
| 525 | 540 | ROM_LOAD( "072-d05.1f", 0x000000, 0x100000, CRC(1397a73b) SHA1(369422c84cca5472967af54b8351e29fcd69f621) ) |
| 526 | 541 | ROM_LOAD( "072-d04.1d", 0x100000, 0x040000, CRC(78778013) SHA1(edbd6d83b0d1a20df39bb160b92395586fa3c32d) ) |
| 542 | ||
| 543 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 544 | ROM_LOAD( "simpsons2pj.nv", 0x0000, 0x080, CRC(3550a54e) SHA1(370cd40a12c471b3b6690ecbdde9c7979bc2a652) ) | |
| 527 | 545 | ROM_END |
| 528 | 546 | |
| 529 | 547 | /*************************************************************************** |
| r7553 | r7554 | |
|---|---|---|
| 2256 | 2256 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_set_cs_line) |
| 2257 | 2257 | INPUT_PORTS_END |
| 2258 | 2258 | |
| 2259 | ||
| 2260 | static INPUT_PORTS_START( dinoh ) | |
| 2261 | PORT_INCLUDE( dino ) | |
| 2262 | ||
| 2263 | PORT_MODIFY("DSWA") | |
| 2264 | CPS1_COINAGE_2( "SW(A)" ) | |
| 2265 | PORT_DIPNAME( 0x08, 0x08, "Coin Slots" ) PORT_DIPLOCATION("SW(B):4") | |
| 2266 | PORT_DIPSETTING( 0x00, "1" ) | |
| 2267 | PORT_DIPSETTING( 0x08, "3" ) // This setting can't be used in two-player mode | |
| 2268 | PORT_DIPNAME( 0x10, 0x10, "Play Mode" ) PORT_DIPLOCATION("SW(B):5") | |
| 2269 | PORT_DIPSETTING( 0x00, "2 Players" ) | |
| 2270 | PORT_DIPSETTING( 0x10, "3 Players" ) | |
| 2271 | PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW(A):6" ) // This switch is not documented in the manual | |
| 2272 | PORT_DIPNAME( 0x40, 0x40, "2 Coins to Start, 1 to Continue" ) PORT_DIPLOCATION("SW(A):7") | |
| 2273 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2274 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2275 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(A):8" ) // This switch is not documented in the manual | |
| 2276 | ||
| 2277 | PORT_MODIFY("DSWB") | |
| 2278 | PORT_DIPNAME( 0x07, 0x04, "Difficulty Level 1" ) PORT_DIPLOCATION("SW(B):1,2,3") | |
| 2279 | PORT_DIPSETTING( 0x07, DEF_STR( Easiest ) ) // "01" | |
| 2280 | PORT_DIPSETTING( 0x06, DEF_STR( Easier ) ) // "02" | |
| 2281 | PORT_DIPSETTING( 0x05, DEF_STR( Easy ) ) // "03" | |
| 2282 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) // "04" | |
| 2283 | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) // "05" | |
| 2284 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) // "06" | |
| 2285 | PORT_DIPSETTING( 0x01, DEF_STR( Harder ) ) // "07" | |
| 2286 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) // "08" | |
| 2287 | PORT_DIPNAME( 0x18, 0x10, "Difficulty Level 2" ) PORT_DIPLOCATION("SW(B):4,5") | |
| 2288 | PORT_DIPSETTING( 0x18, DEF_STR( Easy ) ) // "01" | |
| 2289 | PORT_DIPSETTING( 0x10, DEF_STR( Normal ) ) // "02" | |
| 2290 | PORT_DIPSETTING( 0x08, DEF_STR( Hard ) ) // "03" | |
| 2291 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) // "04" | |
| 2292 | PORT_DIPNAME( 0x60, 0x40, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW(B):6,7") | |
| 2293 | PORT_DIPSETTING( 0x60, "300k and 700k" ) | |
| 2294 | PORT_DIPSETTING( 0x40, "500k and 1000k" ) | |
| 2295 | PORT_DIPSETTING( 0x20, "1000k" ) | |
| 2296 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 2297 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(B):8" ) | |
| 2298 | ||
| 2299 | PORT_MODIFY("DSWC") | |
| 2300 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW(C):1,2") | |
| 2301 | PORT_DIPSETTING( 0x00, "4" ) | |
| 2302 | PORT_DIPSETTING( 0x01, "3" ) | |
| 2303 | PORT_DIPSETTING( 0x02, "2" ) | |
| 2304 | PORT_DIPSETTING( 0x03, "1" ) | |
| 2305 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(C):3") | |
| 2306 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 2307 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2308 | PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW(C):4") | |
| 2309 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2310 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2311 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5") | |
| 2312 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2313 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2314 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6") | |
| 2315 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2316 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2317 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7") | |
| 2318 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) | |
| 2319 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 2320 | PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8") | |
| 2321 | PORT_DIPSETTING( 0x80, "Game" ) | |
| 2322 | PORT_DIPSETTING( 0x00, DEF_STR( Test ) ) | |
| 2323 | ||
| 2324 | PORT_MODIFY("IN1") | |
| 2325 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 2326 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 2327 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 2328 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 2329 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 2330 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 2331 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 2332 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2333 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 2334 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 2335 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 2336 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 2337 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 2338 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 2339 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 2340 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2341 | ||
| 2342 | PORT_MODIFY("IN2") /* Player 3 */ | |
| 2343 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) | |
| 2344 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) | |
| 2345 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) | |
| 2346 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) | |
| 2347 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) | |
| 2348 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) | |
| 2349 | // PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) | |
| 2350 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) | |
| 2351 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) | |
| 2352 | INPUT_PORTS_END | |
| 2353 | ||
| 2259 | 2354 | /* Needs further checking */ |
| 2260 | 2355 | static INPUT_PORTS_START( punipic ) |
| 2261 | 2356 | PORT_INCLUDE( cps1_2b ) |
| r7553 | r7554 | |
| 2294 | 2389 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_set_cs_line) |
| 2295 | 2390 | INPUT_PORTS_END |
| 2296 | 2391 | |
| 2392 | ||
| 2393 | static INPUT_PORTS_START( punisherbz ) | |
| 2394 | PORT_INCLUDE( punisher ) | |
| 2395 | ||
| 2396 | PORT_MODIFY("DSWA") | |
| 2397 | CPS1_COINAGE_2( "SW(A)" ) | |
| 2398 | PORT_DIPNAME( 0x08, 0x08, "2 Coins to Start, 1 to Continue" ) PORT_DIPLOCATION("SW(A):4") | |
| 2399 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2400 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2401 | PORT_DIPNAME( 0x30, 0x20, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW(A):5,6") | |
| 2402 | PORT_DIPSETTING( 0x30, "1" ) | |
| 2403 | PORT_DIPSETTING( 0x20, "2" ) | |
| 2404 | PORT_DIPSETTING( 0x10, "3" ) | |
| 2405 | PORT_DIPSETTING( 0x00, "4" ) | |
| 2406 | PORT_DIPNAME( 0x40, 0x40, "Sound" ) PORT_DIPLOCATION("SW(A):7") | |
| 2407 | PORT_DIPSETTING( 0x40, "Q Sound" ) | |
| 2408 | PORT_DIPSETTING( 0x00, "Monaural" ) | |
| 2409 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(A):8") | |
| 2410 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2411 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2412 | ||
| 2413 | PORT_MODIFY("DSWB") | |
| 2414 | PORT_DIPNAME( 0x07, 0x04, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW(B):1,2,3") | |
| 2415 | PORT_DIPSETTING( 0x07, "Extra Easy" ) | |
| 2416 | PORT_DIPSETTING( 0x06, DEF_STR( Very_Easy) ) | |
| 2417 | PORT_DIPSETTING( 0x05, DEF_STR( Easy) ) | |
| 2418 | PORT_DIPSETTING( 0x04, DEF_STR( Normal) ) | |
| 2419 | PORT_DIPSETTING( 0x03, DEF_STR( Hard) ) | |
| 2420 | PORT_DIPSETTING( 0x02, DEF_STR( Very_Hard) ) | |
| 2421 | PORT_DIPSETTING( 0x01, "Extra Hard" ) | |
| 2422 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest) ) | |
| 2423 | PORT_DIPNAME( 0x18, 0x10, "Extend" ) PORT_DIPLOCATION("SW(B):4,5") | |
| 2424 | PORT_DIPSETTING( 0x18, "800000" ) | |
| 2425 | PORT_DIPSETTING( 0x10, "1800000" ) | |
| 2426 | PORT_DIPSETTING( 0x08, "2800000" ) | |
| 2427 | PORT_DIPSETTING( 0x00, "No Extend" ) | |
| 2428 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(B):6") | |
| 2429 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) | |
| 2430 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 2431 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(B):7") | |
| 2432 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2433 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2434 | PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW(B):8" ) | |
| 2435 | ||
| 2436 | PORT_MODIFY("DSWC") | |
| 2437 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2438 | ||
| 2439 | PORT_MODIFY("IN1") | |
| 2440 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 2441 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 2442 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 2443 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 2444 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 2445 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 2446 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 2447 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2448 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 2449 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 2450 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 2451 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 2452 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 2453 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 2454 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 2455 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2456 | INPUT_PORTS_END | |
| 2457 | ||
| 2297 | 2458 | /* Needs further checking */ |
| 2298 | 2459 | static INPUT_PORTS_START( slammast ) |
| 2299 | 2460 | PORT_INCLUDE( cps1_4players ) |
| r7553 | r7554 | |
| 7885 | 8046 | ROM_LOAD( "palce16v8h-2.bin", 0x0, 0x117, CRC(9ae375ba) SHA1(6f227c2a5b1170a41e6419f12d1e1f98edc6f8e5) ) |
| 7886 | 8047 | ROM_END |
| 7887 | 8048 | |
| 8049 | /* Chinese bootleg board */ | |
| 8050 | ROM_START( dinohunt ) | |
| 8051 | ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ | |
| 8052 | ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x80000, CRC(8d5ddc5d) SHA1(3ed1da71d73425308d0c3ac1a01a7242e60b6677) ) | |
| 8053 | ROM_LOAD16_WORD_SWAP( "u22", 0x080000, 0x80000, CRC(f72cd219) SHA1(a3f580bd328b54d2546ae7e94262c1a706d27172) ) | |
| 8054 | ROM_LOAD16_WORD_SWAP( "u21", 0x100000, 0x80000, CRC(bc275b76) SHA1(1f7f7533b4ccb511dc479f531d9d6740d3ca6712) ) | |
| 8055 | ROM_LOAD16_WORD_SWAP( "u20", 0x180000, 0x80000, CRC(8987c975) SHA1(3fd856805d627f855f72acc7aacc2e8ecf0f12bd) ) | |
| 8056 | ||
| 8057 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 8058 | ROMX_LOAD( "u1", 0x000000, 0x80000, CRC(a01a9fb5) SHA1(d1ab4c7ead04932c60923363a0a661d0d1472aaa) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8059 | ROMX_LOAD( "u2", 0x000002, 0x80000, CRC(bdf02c17) SHA1(046ba4c589a22a7ac65c86baaae18eff0bff6ecb) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8060 | ROMX_LOAD( "u3", 0x000004, 0x80000, CRC(058beefa) SHA1(0d09ab5a200643b5a16e0313228f7ea243752bd0) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8061 | ROMX_LOAD( "u4", 0x000006, 0x80000, CRC(5028a9f1) SHA1(ff3a988153860e76beb79918ad896e702c3ecd3d) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8062 | ROMX_LOAD( "u5", 0x200000, 0x80000, CRC(d77f89ea) SHA1(1dd8c2a18742fd8483ecade31aed384c686ed244) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8063 | ROMX_LOAD( "u6", 0x200002, 0x80000, CRC(bfbcb034) SHA1(c1eb4d420b10ffa05197d9a82c7adac4d265c546) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8064 | ROMX_LOAD( "u7", 0x200004, 0x80000, CRC(a2544d4e) SHA1(def704055e041bc7c3b8cf7977249b69aa7924a8) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8065 | ROMX_LOAD( "u8", 0x200006, 0x80000, CRC(8869bbb1) SHA1(e53f77baffb913bf3ef5396d84fbfbaec6a90ca2) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8066 | ||
| 8067 | ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */ | |
| 8068 | ROM_LOAD( "u9", 0x00000, 0x08000, CRC(2eb16a83) SHA1(067ea0bfc2c1e73520d6b836c72fbb9da9998311) ) | |
| 8069 | ROM_CONTINUE( 0x10000, 0x08000 ) | |
| 8070 | ||
| 8071 | ROM_REGION( 0x40000, "oki", 0 ) /* samples */ | |
| 8072 | ROM_LOAD( "u18", 0x00000, 0x20000, CRC(8d2899ba) SHA1(0b3ac6cf2ce0323e3bfc9da3ebfcb0fd14bc405b) ) | |
| 8073 | ROM_LOAD( "u19", 0x20000, 0x20000, CRC(b34a4b42) SHA1(3eeb9e33bb911359e03d44949ac58439a3d3d54b) ) | |
| 8074 | ROM_END | |
| 8075 | ||
| 8076 | /* Chinese bootleg board */ | |
| 8077 | ROM_START( punisherbz ) | |
| 8078 | ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ | |
| 8079 | ROM_LOAD16_WORD_SWAP( "23.096", 0x000000, 0x80000, CRC(bfa45d23) SHA1(56d04d02c9b9b22603205b1ce9e376874d2eaa05) ) | |
| 8080 | ROM_LOAD16_WORD_SWAP( "22.096", 0x080000, 0x80000, CRC(092578a4) SHA1(c3c8f98f8b8fc9c71b33fb906b4c591067b4355b) ) | |
| 8081 | ROM_LOAD16_WORD_SWAP( "21.096", 0x100000, 0x80000, CRC(d21ccddb) SHA1(295c886cd14ee54e12acfe3f1e8f13513442c8c0) ) | |
| 8082 | ROM_LOAD16_WORD_SWAP( "20.096", 0x180000, 0x80000, CRC(f9f334ce) SHA1(22e58ce5096b95138a30e9726e1169895118e990) ) | |
| 8083 | ||
| 8084 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 8085 | ROMX_LOAD( "1.096", 0x000000, 0x80000, CRC(ad468e07) SHA1(1ee8ecfd001b447982bc16972575eb2c5e01bc51) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8086 | ROMX_LOAD( "2.096", 0x000002, 0x80000, CRC(b9fdb6b5) SHA1(991fe0ded5c859f1e25766e9417e1ad691205e59) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8087 | ROMX_LOAD( "3.096", 0x000004, 0x80000, CRC(be0b1a78) SHA1(d002bd90d0f239d29f5ea481e455d85a1c088516) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8088 | ROMX_LOAD( "4.096", 0x000006, 0x80000, CRC(bba67a43) SHA1(9cd51a06a7661b2f78059ac392423f73de5cf56f) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8089 | ROMX_LOAD( "ps_gfx5.rom", 0x200000, 0x80000, CRC(c54ea839) SHA1(0733f37329edd9d0cace1319a7544b40aa7ecb0b) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8090 | ROMX_LOAD( "ps_gfx7.rom", 0x200002, 0x80000, CRC(04c5acbd) SHA1(fddc94b0f36d4d22d7c357856ae15b7514c342d3) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8091 | ROMX_LOAD( "ps_gfx6.rom", 0x200004, 0x80000, CRC(a544f4cc) SHA1(9552df8934ba25f19a22f2e07783712d8c8ef03c) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8092 | ROMX_LOAD( "ps_gfx8.rom", 0x200006, 0x80000, CRC(8f02f436) SHA1(a2f0ebb7e9593469c7b843f8962a66f3d77f79e5) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8093 | ||
| 8094 | ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */ | |
| 8095 | ROM_LOAD( "9.512", 0x00000, 0x08000, CRC(b8367eb5) SHA1(ec3db29fdd6200e9a8f4f8073a7e34aef731354f) ) | |
| 8096 | ROM_CONTINUE( 0x10000, 0x08000 ) | |
| 8097 | ||
| 8098 | ROM_REGION( 0x40000, "oki", 0 ) /* samples */ | |
| 8099 | ROM_LOAD( "18.010", 0x00000, 0x20000, CRC(375c66e7) SHA1(36189e23209ce4ae5d9cbabd1574540d0591e7b3) ) | |
| 8100 | ROM_LOAD( "19.010", 0x20000, 0x20000, CRC(eb5ca884) SHA1(3592c69f77c7cd6ee241d6c1079c34a3e58abb5b) ) | |
| 8101 | ROM_END | |
| 8102 | ||
| 7888 | 8103 | /* B-Board 91635B */ |
| 7889 | 8104 | ROM_START( punisher ) |
| 7890 | 8105 | ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ |
| r7553 | r7554 | |
| 8832 | 9047 | DRIVER_INIT_CALL(cps1); |
| 8833 | 9048 | } |
| 8834 | 9049 | |
| 9050 | static DRIVER_INIT( dinohunt ) | |
| 9051 | { | |
| 9052 | // is this shared with the new sound hw? | |
| 9053 | UINT8* ram = (UINT8*)memory_install_ram(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xf18000, 0xf19fff, 0, 0, 0); | |
| 9054 | memset(ram,0xff,0x2000); | |
| 9055 | DRIVER_INIT_CALL(cps1); | |
| 9056 | } | |
| 8835 | 9057 | |
| 9058 | ||
| 8836 | 9059 | GAME( 1988, forgottn, 0, cps1_10MHz, forgottn, forgottn, ROT0, "Capcom", "Forgotten Worlds (World)", GAME_SUPPORTS_SAVE ) |
| 8837 | 9060 | GAME( 1988, forgottnu,forgottn, cps1_10MHz, forgottn, forgottn, ROT0, "Capcom", "Forgotten Worlds (US)", GAME_SUPPORTS_SAVE ) |
| 8838 | 9061 | GAME( 1988, lostwrld, forgottn, cps1_10MHz, forgottn, forgottn, ROT0, "Capcom", "Lost Worlds (Japan)", GAME_SUPPORTS_SAVE ) |
| r7553 | r7554 | |
| 8954 | 9177 | GAME( 1993, dinoj, dino, qsound, dino, dino, ROT0, "Capcom", "Cadillacs Kyouryuu-Shinseiki (Japan 930201)", GAME_SUPPORTS_SAVE ) |
| 8955 | 9178 | GAME( 1993, dinopic, dino, cpspicb, dinopic, dino, ROT0, "bootleg", "Cadillacs and Dinosaurs (bootleg with PIC16c57, set 1)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 8956 | 9179 | GAME( 1993, dinopic2, dino, cpspicb, dinopic, dino, ROT0, "bootleg", "Cadillacs and Dinosaurs (bootleg with PIC16c57, set 2)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 9180 | GAME( 1993, dinohunt, dino, wofhfh, dinoh, dinohunt, ROT0, "bootleg", "Dinosaur Hunter (Chinese bootleg of Cadillacs and Dinosaurs)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) | |
| 8957 | 9181 | GAME( 1993, punisher, 0, qsound, punisher, punisher, ROT0, "Capcom", "The Punisher (World 930422)", GAME_SUPPORTS_SAVE ) // "ETC" |
| 8958 | 9182 | GAME( 1993, punisheru,punisher, qsound, punisher, punisher, ROT0, "Capcom", "The Punisher (US 930422)", GAME_SUPPORTS_SAVE ) |
| 8959 | 9183 | GAME( 1993, punisherj,punisher, qsound, punisher, punisher, ROT0, "Capcom", "The Punisher (Japan 930422)", GAME_SUPPORTS_SAVE ) |
| 8960 | 9184 | GAME( 1993, punipic, punisher, cpspicb, punipic, punisher, ROT0, "Capcom", "The Punisher (bootleg with PIC16c57, set 1)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 8961 | 9185 | GAME( 1993, punipic2, punisher, cpspicb, punipic, punisher, ROT0, "Capcom", "The Punisher (bootleg with PIC16c57, set 2)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 8962 | 9186 | GAME( 1993, punipic3, punisher, cpspicb, punipic, punisher, ROT0, "Capcom", "The Punisher (bootleg with PIC16c57, set 3)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 9187 | GAME( 1993, punisherbz,punisher,wofhfh, punisherbz, cps1, ROT0, "bootleg","Biaofeng Zhanjing (Chinese bootleg of The Punisher)", GAME_SUPPORTS_SAVE ) // (c)2002, they ripped the sound from Final Fight! | |
| 8963 | 9188 | |
| 8964 | 9189 | GAME( 1993, slammast, 0, qsound, slammast, slammast, ROT0, "Capcom", "Saturday Night Slam Masters (World 930713)", GAME_SUPPORTS_SAVE ) // "ETC" |
| 8965 | 9190 | GAME( 1993, slammastu,slammast, qsound, slammast, slammast, ROT0, "Capcom", "Saturday Night Slam Masters (US 930713)", GAME_SUPPORTS_SAVE ) |
| r7553 | r7554 | |
|---|---|---|
| 200 | 200 | gives up or background scrolls enough to "free" you. |
| 201 | 201 | - As you can play with 2 players at the same time, there is no need of a "Cabinet" setting, |
| 202 | 202 | so DSWA bit 0 is unused (it is even no more tested). |
| 203 | - As other player can join in at any time, there is no need of a "Continue" setting, | |
| 204 | so DSWB bit 7 is unused (it is even no more tested). | |
| 203 | - DSWB bit 7 is unused (it is even no more tested). | |
| 205 | 204 | - Here are some differences I noticed with 'zerowing' : |
| 206 | 205 | * you get the twin ships when starting a new life |
| 207 | 206 | * speed range is 0x14-0x2c instead of 0x10-0x30 (but still +0x08) |
| r7553 | r7554 | |
| 209 | 208 | many addresses in RAM are different, it isn't very easy to spot which ones :( Any help is welcome ! |
| 210 | 209 | |
| 211 | 210 | |
| 211 | 5) 'demonwld' and "clones" | |
| 212 | ||
| 213 | TO DO ! | |
| 214 | ||
| 215 | ||
| 216 | 6) 'fireshrk' and "clones" | |
| 217 | ||
| 218 | TO DO ! | |
| 219 | ||
| 220 | ||
| 221 | 7) 'outzone' and "clones" | |
| 222 | ||
| 223 | TO DO ! | |
| 224 | ||
| 225 | ||
| 226 | 8) 'vimana' and "clones" | |
| 227 | ||
| 228 | 8a) 'vimana' | |
| 229 | ||
| 230 | - Region read from Territory Jumper (0x440011.b). | |
| 231 | - Coinage relies on bits 0 to 3 of the region : | |
| 232 | * ....0010 : TOAPLAN_COINAGE_WORLD | |
| 233 | * else : TOAPLAN_COINAGE_JAPAN_OLD | |
| 234 | This a guess based on the "test mode" (code at 0x01a804) because of the missing Z180 CPU. | |
| 235 | - Notice screen relies on bits 0 to 3 of the region (code at 0x018bf2 - table at 0x019736) : | |
| 236 | * ....0000 : "JAPAN ONLY" | |
| 237 | * ....0001 : "U.S.A. ONLY" | |
| 238 | * ....0010 : "EUROPE ONLY" | |
| 239 | * ....0011 : "HONG KONG ONLY" | |
| 240 | * ....0100 : "KOREA ONLY" | |
| 241 | * ....0101 : "TAIWAN ONLY" | |
| 242 | * ....0110 : "TAIWAN ONLY" | |
| 243 | * ....0111 : "U.S.A. ONLY" | |
| 244 | * ....1000 : "HONG KONG ONLY" | |
| 245 | * ....1001 : "" | |
| 246 | * ....1010 : "" | |
| 247 | * ....1011 : "" | |
| 248 | * ....1100 : "" | |
| 249 | * ....1101 : "" | |
| 250 | * ....1110 : "" | |
| 251 | * ....1111 : "JAPAN ONLY" | |
| 252 | - Copyright always displays "@ TOAPLAN CO. LTD. 1991" but the 2 other lines rely on bits 0 to 3 | |
| 253 | of the region (code at 0x016512 - tables at 0x01948e and 0x019496) : | |
| 254 | * ....0000 : "DISTRIBUTED BY" / "" | |
| 255 | * ....0001 : "ALL RIGHTS RESERVED" / "" | |
| 256 | * ....0010 : "ALL RIGHTS RESERVED" / "" | |
| 257 | * ....0011 : "ALL RIGHTS RESERVED" / "" | |
| 258 | * ....0100 : "ALL RIGHTS RESERVED" / "" | |
| 259 | * ....0101 : "ALL RIGHTS RESERVED" / "" | |
| 260 | * ....0110 : "LICENCED TO SPACY CO., LTD" / "FOR TAIWAN" | |
| 261 | * ....0111 : "LICENCED TO ROMSTAR, INC." / "FOR U.S.A." | |
| 262 | * ....1000 : "LICENCED TO HONEST TRADING CO." / "FOR HONG KONG AND CHINA." | |
| 263 | * ....1001 : "" / "" | |
| 264 | * ....1010 : "" / "" | |
| 265 | * ....1011 : "" / "" | |
| 266 | * ....1100 : "" / "" | |
| 267 | * ....1101 : "" / "" | |
| 268 | * ....1110 : "" / "" | |
| 269 | * ....1111 : "DISTRIBUTED BY" / "" | |
| 270 | An additional Tecmo logo also relies on bits 0 to 3 of the region : | |
| 271 | * ....0000 : display | |
| 272 | * ....1111 : display | |
| 273 | * else : no display | |
| 274 | So the Tecmo logo is only displayed when "Territory" set to "Japan" (right to the | |
| 275 | "DISTRIBUTED BY" text). | |
| 276 | - FBI logo (after diplsaying the hi-scores) relies on bits 0 to 3 of the region | |
| 277 | (code at 0x0163f4) : | |
| 278 | * ....0001 : display | |
| 279 | * ....0111 : display | |
| 280 | * else : no display | |
| 281 | So the FBI logo is only displayed when "Territory" set to "USA" or "USA (Romstar)". | |
| 282 | - Number of letters for initials are always set to 3 regardless of the rgion. | |
| 283 | - Jumper displayed in the Dip Switches screen relies on bits 0 to 3 of the region | |
| 284 | (code at 0x01a89c - tables at 0x019d1e) : | |
| 285 | * ....0000 : "FOR JAPAN. " | |
| 286 | * ....0001 : "FOR U.S.A. " | |
| 287 | * ....0010 : "FOR EUROPE " | |
| 288 | * ....0011 : "FOR HONG KONG" | |
| 289 | * ....0100 : "FOR KOREA " | |
| 290 | * ....0101 : "FOR TAIWAN " | |
| 291 | * ....0110 : "FOR TAIWAN " | |
| 292 | * ....0111 : "FOR U.S.A. " | |
| 293 | * ....1000 : "FOR HONG KONG" | |
| 294 | * ....1001 : " " | |
| 295 | * ....1010 : " " | |
| 296 | * ....1011 : " " | |
| 297 | * ....1100 : " " | |
| 298 | * ....1101 : " " | |
| 299 | * ....1110 : " " | |
| 300 | * ....1111 : "FOR JAPAN. " | |
| 301 | - When "Invulnerability" Dip Switch is ON, you can do the following with the STARTn buttons : | |
| 302 | * press START2 to pause game | |
| 303 | * press START1 to unpause game | |
| 304 | * when START1 and START2 are pressed, the game enters in "slow motion" mode | |
| 305 | - When "Invulnerability" Dip Switch is ON, you can press F1 ("Fast Scrolling", in fact | |
| 306 | the unused 3rd button of player 1) to advance quickly to your desired area. | |
| 307 | - When "Invulnerability" Dip Switch is ON, you can press the unused 3rd button of player 2, | |
| 308 | but as its effect is completely unknown (code at 0x0010aa), I've decided not to map it for now. | |
| 309 | - It's hard to tell which regions can be used for this set and which one is the default one. | |
| 310 | However, as the text at the "end" (after the "CONGRATULATIONS" message) is in English, | |
| 311 | I've decided to disable the ones related to Japan (0x00 and 0x0f). | |
| 312 | - Routine at 0x017c18 is sound related and is seems to share memory with the Z180. | |
| 313 | Unfortunately I haven't been able to understand yet how to produce a sound :( | |
| 314 | Routine at 0x017ca6 stops producing a sound by reseting values in shared memory with the Z180. | |
| 315 | ||
| 316 | 8b) 'vimanan' | |
| 317 | ||
| 318 | - The only difference with 'vimana' is the different copyright when region is set to Europe : | |
| 319 | * ....0010 : "NOVA APPARATE GMBH & CO" / "" | |
| 320 | Because of this additional text, other texts, code and data are shifted after 0x019e9c. | |
| 321 | ||
| 322 | 8c) 'vimana1' | |
| 323 | ||
| 324 | - The only difference I've noticed with 'vimana' is the text at the "end" is in Japanese. | |
| 325 | This is why I've disabled all regions which aren't related to Japan. | |
| 326 | - Sound routines at 0x01792c and 0x0179ba. | |
| 327 | ||
| 328 | ||
| 212 | 329 | To Do: |
| 213 | 330 | Add support for HD647180 (Z180) sound CPUs (once their internal ROMS are dumped). |
| 214 | 331 | These are: |
| 215 | 332 | Fire Shark / Same! Same! Same! |
| 216 | 333 | Vimana |
| 217 | 334 | In the meantime, it can be interesting to simulate the basic communications (coinage and credits) |
| 218 | between the M68000 and the Z180 | |
| 335 | between the M68000 and the Z180 | |
| 219 | 336 | |
| 220 | 337 | ***************************************************************************/ |
| 221 | 338 | |
| r7553 | r7554 | |
| 411 | 528 | AM_RANGE(0x400008, 0x40000f) AM_WRITE(toaplan1_bcu_control_w) |
| 412 | 529 | AM_RANGE(0x404000, 0x4047ff) AM_READWRITE(toaplan1_colorram1_r, toaplan1_colorram1_w) AM_BASE(&toaplan1_colorram1) AM_SIZE(&toaplan1_colorram1_size) |
| 413 | 530 | AM_RANGE(0x406000, 0x4067ff) AM_READWRITE(toaplan1_colorram2_r, toaplan1_colorram2_w) AM_BASE(&toaplan1_colorram2) AM_SIZE(&toaplan1_colorram2_size) |
| 414 | AM_RANGE(0x440000, 0x440005) AM_READWRITE(vimana_mcu_r, vimana_mcu_w) | |
| 531 | AM_RANGE(0x440000, 0x440005) AM_READWRITE(vimana_mcu_r, vimana_mcu_w) /* shared memory from 0x440000 to 0x44ffff ? */ | |
| 415 | 532 | AM_RANGE(0x440006, 0x440007) AM_READ_PORT("DSWA") |
| 416 | AM_RANGE(0x440008, 0x440009) AM_READ(vimana_ | |
| 533 | AM_RANGE(0x440008, 0x440009) AM_READ(vimana_sys | |
| 417 | 534 | AM_RANGE(0x44000a, 0x44000b) AM_READ_PORT("P1") |
| 418 | 535 | AM_RANGE(0x44000c, 0x44000d) AM_READ_PORT("P2") |
| 419 | 536 | AM_RANGE(0x44000e, 0x44000f) AM_READ_PORT("DSWB") |
| r7553 | r7554 | |
| 604 | 721 | TOAPLAN_DIFFICULTY |
| 605 | 722 | PORT_DIPUNUSED( 0x04, IP_ACTIVE_HIGH ) |
| 606 | 723 | PORT_DIPUNUSED( 0x08, IP_ACTIVE_HIGH ) |
| 607 | PORT_DIPNAME( 0x30, 0x20, "Territory/Copyright" ) /* bits 4 and 5 listed as unused in the Dip Switches screen */ | |
| 608 | PORT_DIPSETTING( 0x20, "Europe/Taito Corp Japan" ) | |
| 609 | PORT_DIPSETTING( 0x10, "USA/Taito America" ) | |
| 610 | PORT_DIPSETTING( 0x30, "USA/Taito America (Romstar)" ) | |
| 611 | PORT_DIPSETTING( 0x00, "Japan/Taito Corp" ) | |
| 724 | PORT_DIPNAME( 0x30, 0x20, "Territory" ) /* bits 4 and 5 listed as unused in the Dip Switches screen */ | |
| 725 | PORT_DIPSETTING( 0x20, DEF_STR( Europe ) ) /* Taito Corp. Japan */ | |
| 726 | PORT_DIPSETTING( 0x10, DEF_STR( USA ) ) /* Taito America Corp. */ | |
| 727 | PORT_DIPSETTING( 0x30, "USA (Romstar licence)" ) /* Taito America Corp. */ | |
| 728 | PORT_DIPSETTING( 0x00, DEF_STR( Japan ) ) /* Taito Corporation */ | |
| 612 | 729 | PORT_DIPNAME( 0x40, 0x00, "Show Dip Switches Settings" ) |
| 613 | 730 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 614 | 731 | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) |
| r7553 | r7554 | |
| 661 | 778 | |
| 662 | 779 | /* in 0x70 (CPU1) -> 0x8005 (CPU1 shared RAM) = 0x18000a.w (CPU0 shared RAM) -> 0x081b7c.w */ |
| 663 | 780 | PORT_START("TJUMP") /* Territory Jumper Block - see notes */ |
| 664 | PORT_DIPNAME( 0x07, 0x02, "Territory/Copyright" ) | |
| 665 | PORT_DIPSETTING( 0x02, "Europe/Taito Corp" ) /* TOAPLAN_COINAGE_WORLD */ | |
| 666 | // PORT_DIPSETTING( 0x03, "Europe/Taito Corp" ) /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 667 | // PORT_DIPSETTING( 0x06, "Europe/Taito America" ) /* TOAPLAN_COINAGE_WORLD */ | |
| 668 | // PORT_DIPSETTING( 0x07, "Europe/Taito America" ) /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 669 | PORT_DIPSETTING( 0x04, "USA/Taito America" ) /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 670 | // PORT_DIPSETTING( 0x05, "USA/Taito America" ) /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 671 | PORT_DIPSETTING( 0x01, "USA/Taito America (Romstar)" )/*TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 672 | PORT_DIPSETTING( 0x00, "Japan/Taito Corp" ) /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 781 | PORT_DIPNAME( 0x07, 0x02, "Territory" ) | |
| 782 | PORT_DIPSETTING( 0x02, DEF_STR( Europe ) ) /* Taito Corporation */ /* TOAPLAN_COINAGE_WORLD */ | |
| 783 | // PORT_DIPSETTING( 0x03, DEF_STR( Europe ) ) /* Taito Corporation */ /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 784 | // PORT_DIPSETTING( 0x06, DEF_STR( Europe ) ) /* Taito America Corp. */ /* TOAPLAN_COINAGE_WORLD */ | |
| 785 | // PORT_DIPSETTING( 0x07, DEF_STR( Europe ) ) /* Taito America Corp. */ /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 786 | PORT_DIPSETTING( 0x04, DEF_STR( USA ) ) /* Taito America Corp. */ /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 787 | // PORT_DIPSETTING( 0x05, DEF_STR( USA ) ) /* Taito America Corp. */ /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 788 | PORT_DIPSETTING( 0x01, "USA (Romstar licence)" ) /* Taito America Corp. */ /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 789 | PORT_DIPSETTING( 0x00, DEF_STR( Japan ) ) /* Taito Corporation */ /* TOAPLAN_COINAGE_JAPAN_OLD */ | |
| 673 | 790 | PORT_DIPUNUSED( 0x08, IP_ACTIVE_HIGH ) |
| 674 | 791 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 675 | 792 | |
| r7553 | r7554 | |
| 785 | 902 | PORT_DIPSETTING( 0x00, "3" ) |
| 786 | 903 | PORT_DIPSETTING( 0x20, "4" ) |
| 787 | 904 | PORT_DIPSETTING( 0x10, "5" ) |
| 788 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) | |
| 905 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) /* see notes */ | |
| 789 | 906 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 790 | 907 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 791 | 908 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) |
| r7553 | r7554 | |
| 824 | 941 | PORT_DIPUNUSED( 0x80, IP_ACTIVE_HIGH ) |
| 825 | 942 | |
| 826 | 943 | /* in 0x88 (CPU1) -> 0x8005 (CPU1 shared RAM) = 0x44000a.w (CPU0 shared RAM) -> 0x081ae2.w */ |
| 827 | PORT_MODIFY("TJUMP") | |
| 944 | PORT_MODIFY("TJUMP") /* Territory Jumper block - see notes */ | |
| 828 | 945 | PORT_DIPUNUSED( 0x01, IP_ACTIVE_HIGH ) |
| 829 | 946 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Region ) ) |
| 830 | 947 | PORT_DIPSETTING( 0x00, DEF_STR( USA ) ) |
| r7553 | r7554 | |
| 1175 | 1292 | INPUT_PORTS_END |
| 1176 | 1293 | |
| 1177 | 1294 | |
| 1295 | /* verified from M68000 - coinage based on "test mode" and handled by the MCU simulation */ | |
| 1178 | 1296 | static INPUT_PORTS_START( vimana ) |
| 1179 | | |
| 1297 | | |
| 1180 | 1298 | |
| 1181 | PORT_START("P1") | |
| 1182 | TOAPLAN1_PLAYER_INPUT( 1, IPT_BUTTON3, ) | |
| 1299 | /* 0x440007.b */ | |
| 1300 | PORT_START("DSWA") | |
| 1301 | TOAPLAN_MACHINE_NO_COCKTAIL | |
| 1302 | TOAPLAN_COINAGE_DUAL(TJUMP, 0x0f, 0x02) /* see notes */ | |
| 1183 | 1303 | |
| 1184 | PORT_START("P2") | |
| 1185 | TOAPLAN1_PLAYER_INPUT( 2, IPT_BUTTON3, ) | |
| 1186 | ||
| 1187 | PORT_START("DSWA") /* DSW A */ | |
| 1188 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) | |
| 1189 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1190 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1191 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) | |
| 1192 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1193 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1194 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) | |
| 1195 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 1196 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1197 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1198 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) | |
| 1199 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) | |
| 1200 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) | |
| 1201 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 1202 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1203 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) | |
| 1204 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) | |
| 1205 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 1206 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) | |
| 1207 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) | |
| 1208 | ||
| 1209 | PORT_START("DSWB") /* DSW B */ | |
| 1210 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) | |
| 1211 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) | |
| 1212 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) | |
| 1213 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 1214 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) | |
| 1215 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) | |
| 1216 | PORT_DIPSETTING( 0x00, "70K and 200K" ) | |
| 1217 | PORT_DIPSETTING( 0x04, "100K and 250K" ) | |
| 1218 | PORT_DIPSETTING( 0x08, "100K" ) | |
| 1219 | PORT_DIPSETTING( 0x0c, "200K" ) | |
| 1304 | /* 0x44000f.b */ | |
| 1305 | PORT_START("DSWB") | |
| 1306 | TOAPLAN_DIFFICULTY | |
| 1307 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) /* table at 0x000998 */ | |
| 1308 | PORT_DIPSETTING( 0x00, "70k 270k 200k+" ) | |
| 1309 | PORT_DIPSETTING( 0x04, "100k 350k 250k+" ) | |
| 1310 | PORT_DIPSETTING( 0x08, "100k Only" ) | |
| 1311 | PORT_DIPSETTING( 0x0c, "200k Only" ) | |
| 1220 | 1312 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) |
| 1221 | 1313 | PORT_DIPSETTING( 0x30, "2" ) |
| 1222 | 1314 | PORT_DIPSETTING( 0x00, "3" ) |
| 1223 | 1315 | PORT_DIPSETTING( 0x20, "4" ) |
| 1224 | 1316 | PORT_DIPSETTING( 0x10, "5" ) |
| 1225 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) | |
| 1317 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) /* see notes */ | |
| 1226 | 1318 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1227 | 1319 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1228 | 1320 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) |
| 1229 | 1321 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) |
| 1230 | 1322 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 1231 | 1323 | |
| 1232 | TOAPLAN1_SYSTEM_INPUTS | |
| 1233 | ||
| 1234 | PORT_START("TJUMP") /* Territory Jumper Block */ | |
| 1235 | PORT_DIPNAME( 0x0f, 0x02, "Territory / License" ) | |
| 1236 | PORT_DIPSETTING( 0x00, "Japan (Distributed by Tecmo)" ) | |
| 1237 | PORT_DIPSETTING( 0x01, "US" ) | |
| 1324 | /* 0x440011.b */ | |
| 1325 | PORT_START("TJUMP") /* Territory Jumper Block - see notes */ | |
| 1326 | PORT_DIPNAME( 0x0f, 0x02, "Territory" ) | |
| 1238 | 1327 | PORT_DIPSETTING( 0x02, DEF_STR( Europe ) ) |
| 1328 | PORT_DIPSETTING( 0x01, DEF_STR( USA ) ) | |
| 1329 | PORT_DIPSETTING( 0x07, "USA (Romstar license)" ) | |
| 1330 | // PORT_DIPSETTING( 0x00, "Japan (distributed by Tecmo)" ) | |
| 1331 | // PORT_DIPSETTING( 0x0f, "Japan (distributed by Tecmo)" ) | |
| 1332 | PORT_DIPSETTING( 0x04, "Korea" ) | |
| 1239 | 1333 | PORT_DIPSETTING( 0x03, "Hong Kong" ) |
| 1240 | PORT_DIPSETTING( 0x0 | |
| 1334 | PORT_DIPSETTING( 0x08, "Hong Kong (Honest Trading license)" ) | |
| 1241 | 1335 | PORT_DIPSETTING( 0x05, "Taiwan" ) |
| 1242 | PORT_DIPSETTING( 0x06, "Taiwan (Spacy License)" ) | |
| 1243 | PORT_DIPSETTING( 0x07, "US (Romstar License)" ) | |
| 1244 | PORT_DIPSETTING( 0x08, "Hong Kong (Honest Trading Co. License)" ) | |
| 1245 | // PORT_DIPSETTING( 0x09, DEF_STR( Unused ) ) | |
| 1246 | // PORT_DIPSETTING( 0x0a, DEF_STR( Unused ) ) | |
| 1247 | // PORT_DIPSETTING( 0x0b, DEF_STR( Unused ) ) | |
| 1248 | // PORT_DIPSETTING( 0x0c, DEF_STR( Unused ) ) | |
| 1249 | // PORT_DIPSETTING( 0x0d, DEF_STR( Unused ) ) | |
| 1250 | // PORT_DIPSETTING( 0x0e, DEF_STR( Unused ) ) | |
| 1251 | PORT_DIPSETTING( 0x0f, "Japan (Distributed by Tecmo)" ) // duplicate of 0x00 | |
| 1336 | PORT_DIPSETTING( 0x06, "Taiwan (Spacy license)" ) | |
| 1337 | // PORT_DIPSETTING( 0x09, "???" ) | |
| 1338 | // PORT_DIPSETTING( 0x0a, "???" ) | |
| 1339 | // PORT_DIPSETTING( 0x0b, "???" ) | |
| 1340 | // PORT_DIPSETTING( 0x0c, "???" ) | |
| 1341 | // PORT_DIPSETTING( 0x0d, "???" ) | |
| 1342 | // PORT_DIPSETTING( 0x0e, "???" ) | |
| 1252 | 1343 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1344 | ||
| 1345 | /* P1 : 0x44000b.b */ | |
| 1346 | PORT_MODIFY("P1") | |
| 1347 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Fast Scrolling") PORT_CODE(KEYCODE_F1) /* see notes */ | |
| 1348 | ||
| 1349 | /* P2 : 0x44000d.b */ | |
| 1350 | ||
| 1351 | /* SYSTEM : 0x440009.b */ | |
| 1352 | ||
| 1353 | /* VBLANK : 0x400001.b */ | |
| 1253 | 1354 | INPUT_PORTS_END |
| 1254 | 1355 | |
| 1356 | /* verified from M68000 - coinage based on "test mode" and handled by the MCU simulation */ | |
| 1255 | 1357 | static INPUT_PORTS_START( vimanan ) |
| 1256 | 1358 | PORT_INCLUDE( vimana ) |
| 1257 | 1359 | |
| 1258 | PORT_MODIFY("DSWA") /* DSW A */ | |
| 1259 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) | |
| 1260 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1261 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1262 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) ) | |
| 1263 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1264 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1265 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) ) | |
| 1266 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1267 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1268 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) | |
| 1269 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1270 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1271 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) | |
| 1272 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1273 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1274 | /* settings for other territories (non Nova license) | |
| 1275 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) | |
| 1276 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) | |
| 1277 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) | |
| 1278 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 1279 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1280 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) | |
| 1281 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) | |
| 1282 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 1283 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) | |
| 1284 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) | |
| 1285 | */ | |
| 1360 | /* DSWA : 0x440007.b */ | |
| 1361 | /* DSWB : 0x44000f.b */ | |
| 1286 | 1362 | |
| 1287 | PORT_MODIFY("TJUMP") /* Territory Jumper Block */ | |
| 1288 | PORT_DIPNAME( 0x0f, 0x02, "Territory / License" ) | |
| 1289 | PORT_DIPSETTING( 0x00, "Japan (Distributed by Tecmo)" ) | |
| 1290 | PORT_DIPSETTING( 0x01, "US" ) | |
| 1291 | PORT_DIPSETTING( 0x02, "Europe (Nova Apparate GMBH License)" ) | |
| 1363 | /* 0x440011.b */ | |
| 1364 | PORT_MODIFY("TJUMP") /* Territory Jumper Block - see notes */ | |
| 1365 | PORT_DIPNAME( 0x0f, 0x02, "Territory" ) | |
| 1366 | PORT_DIPSETTING( 0x02, "Europe (Nova Apparate license)" ) | |
| 1367 | PORT_DIPSETTING( 0x01, DEF_STR( USA ) ) | |
| 1368 | PORT_DIPSETTING( 0x07, "USA (Romstar license)" ) | |
| 1369 | // PORT_DIPSETTING( 0x00, "Japan (distributed by Tecmo)" ) /* "ending" text in English */ | |
| 1370 | // PORT_DIPSETTING( 0x0f, "Japan (distributed by Tecmo)" ) /* "ending" text in English */ | |
| 1371 | PORT_DIPSETTING( 0x04, "Korea" ) | |
| 1292 | 1372 | PORT_DIPSETTING( 0x03, "Hong Kong" ) |
| 1293 | PORT_DIPSETTING( 0x0 | |
| 1373 | PORT_DIPSETTING( 0x08, "Hong Kong (Honest Trading license)" ) | |
| 1294 | 1374 | PORT_DIPSETTING( 0x05, "Taiwan" ) |
| 1295 | PORT_DIPSETTING( 0x06, "Taiwan (Spacy License)" ) | |
| 1296 | PORT_DIPSETTING( 0x07, "US (Romstar License)" ) | |
| 1297 | PORT_DIPSETTING( 0x08, "Hong Kong (Honest Trading Co. License)" ) | |
| 1298 | // PORT_DIPSETTING( 0x09, DEF_STR( Unused ) ) | |
| 1299 | // PORT_DIPSETTING( 0x0a, DEF_STR( Unused ) ) | |
| 1300 | // PORT_DIPSETTING( 0x0b, DEF_STR( Unused ) ) | |
| 1301 | // PORT_DIPSETTING( 0x0c, DEF_STR( Unused ) ) | |
| 1302 | // PORT_DIPSETTING( 0x0d, DEF_STR( Unused ) ) | |
| 1303 | // PORT_DIPSETTING( 0x0e, DEF_STR( Unused ) ) | |
| 1304 | // PORT_DIPSETTING( 0x0f, "Japan (Distributed by Tecmo)" ) // duplicate of 0x00 | |
| 1375 | PORT_DIPSETTING( 0x06, "Taiwan (Spacy license)" ) | |
| 1376 | // PORT_DIPSETTING( 0x09, "???" ) | |
| 1377 | // PORT_DIPSETTING( 0x0a, "???" ) | |
| 1378 | // PORT_DIPSETTING( 0x0b, "???" ) | |
| 1379 | // PORT_DIPSETTING( 0x0c, "???" ) | |
| 1380 | // PORT_DIPSETTING( 0x0d, "???" ) | |
| 1381 | // PORT_DIPSETTING( 0x0e, "???" ) | |
| 1382 | ||
| 1383 | /* P1 : 0x44000b.b */ | |
| 1384 | /* P2 : 0x44000d.b */ | |
| 1385 | ||
| 1386 | /* SYSTEM : 0x440009.b */ | |
| 1387 | ||
| 1388 | /* VBLANK : 0x400001.b */ | |
| 1305 | 1389 | INPUT_PORTS_END |
| 1306 | 1390 | |
| 1391 | /* verified from M68000 - coinage based on "test mode" and handled by the MCU simulation */ | |
| 1392 | static INPUT_PORTS_START( vimana1 ) | |
| 1393 | PORT_INCLUDE( vimana ) | |
| 1307 | 1394 | |
| 1395 | /* DSWA : 0x440007.b */ | |
| 1396 | /* DSWB : 0x44000f.b */ | |
| 1397 | ||
| 1398 | /* 0x440011.b */ | |
| 1399 | PORT_MODIFY("TJUMP") /* Territory Jumper Block - see notes */ | |
| 1400 | PORT_DIPNAME( 0x0f, 0x00, "Territory" ) | |
| 1401 | // PORT_DIPSETTING( 0x02, DEF_STR( Europe ) ) | |
| 1402 | // PORT_DIPSETTING( 0x01, DEF_STR( USA ) ) | |
| 1403 | // PORT_DIPSETTING( 0x07, "USA (Romstar license)" ) | |
| 1404 | PORT_DIPSETTING( 0x00, "Japan (distributed by Tecmo)" ) | |
| 1405 | // PORT_DIPSETTING( 0x0f, "Japan (distributed by Tecmo)" ) | |
| 1406 | // PORT_DIPSETTING( 0x04, "Korea" ) | |
| 1407 | // PORT_DIPSETTING( 0x03, "Hong Kong" ) | |
| 1408 | // PORT_DIPSETTING( 0x08, "Hong Kong (Honest Trading license)" ) | |
| 1409 | // PORT_DIPSETTING( 0x05, "Taiwan" ) | |
| 1410 | // PORT_DIPSETTING( 0x06, "Taiwan (Spacy license)" ) | |
| 1411 | // PORT_DIPSETTING( 0x09, "???" ) | |
| 1412 | // PORT_DIPSETTING( 0x0a, "???" ) | |
| 1413 | // PORT_DIPSETTING( 0x0b, "???" ) | |
| 1414 | // PORT_DIPSETTING( 0x0c, "???" ) | |
| 1415 | // PORT_DIPSETTING( 0x0d, "???" ) | |
| 1416 | // PORT_DIPSETTING( 0x0e, "???" ) | |
| 1417 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1418 | ||
| 1419 | /* P1 : 0x44000b.b */ | |
| 1420 | /* P2 : 0x44000d.b */ | |
| 1421 | ||
| 1422 | /* SYSTEM : 0x440009.b */ | |
| 1423 | ||
| 1424 | /* VBLANK : 0x400001.b */ | |
| 1425 | INPUT_PORTS_END | |
| 1426 | ||
| 1427 | ||
| 1308 | 1428 | static const gfx_layout tilelayout = |
| 1309 | 1429 | { |
| 1310 | 1430 | 8,8, /* 8x8 */ |
| r7553 | r7554 | |
| 2355 | 2475 | ROM_LOAD( "tp019-10.bpr", 0x20, 0x20, CRC(a1e17492) SHA1(9ddec4c97f2d541f69f3c32c47aaa21fd9699ae2) ) /* ??? */ |
| 2356 | 2476 | ROM_END |
| 2357 | 2477 | |
| 2358 | ROM_START( vimana | |
| 2478 | ROM_START( vimanan ) | |
| 2359 | 2479 | ROM_REGION( 0x040000, "maincpu", 0 ) /* Main 68K code */ |
| 2360 | ROM_LOAD16_BYTE( "vim07.bin", 0x000000, 0x20000, CRC(1efaea84) SHA1(f9c5d2365d8948fa66dbe61d355919db15843a28) ) | |
| 2361 | ROM_LOAD16_BYTE( "vim08.bin", 0x000001, 0x20000, CRC(e45b7def) SHA1(6b92a91d64581954da8ecdbeb5fed79bcc9c5217) ) | |
| 2480 | ROM_LOAD16_BYTE( "tp019-07.rom", 0x000000, 0x20000, CRC(78888ff2) SHA1(7e1d248f806d585952eb35ceec6a7e63ae4e22f9) ) | |
| 2481 | ROM_LOAD16_BYTE( "tp019-08.rom", 0x000001, 0x20000, CRC(6cd2dc3c) SHA1(029d974eb938c5e2fbe7575f0dda342b4b12b731) ) | |
| 2362 | 2482 | |
| 2363 | 2483 | ROM_REGION( 0x10000, "cpu1", 0 ) /* Sound HD647180 code */ |
| 2364 | 2484 | /* sound CPU is a HD647180 (Z180) with internal ROM - not yet supported */ |
| r7553 | r7554 | |
| 2379 | 2499 | ROM_LOAD( "tp019-10.bpr", 0x20, 0x20, CRC(a1e17492) SHA1(9ddec4c97f2d541f69f3c32c47aaa21fd9699ae2) ) /* ??? */ |
| 2380 | 2500 | ROM_END |
| 2381 | 2501 | |
| 2382 | ROM_START( vimana | |
| 2502 | ROM_START( vimana1 ) | |
| 2383 | 2503 | ROM_REGION( 0x040000, "maincpu", 0 ) /* Main 68K code */ |
| 2384 | ROM_LOAD16_BYTE( "tp019-07.rom", 0x000000, 0x20000, CRC(78888ff2) SHA1(7e1d248f806d585952eb35ceec6a7e63ae4e22f9) ) | |
| 2385 | ROM_LOAD16_BYTE( "tp019-08.rom", 0x000001, 0x20000, CRC(6cd2dc3c) SHA1(029d974eb938c5e2fbe7575f0dda342b4b12b731) ) | |
| 2504 | ROM_LOAD16_BYTE( "vim07.bin", 0x000000, 0x20000, CRC(1efaea84) SHA1(f9c5d2365d8948fa66dbe61d355919db15843a28) ) | |
| 2505 | ROM_LOAD16_BYTE( "vim08.bin", 0x000001, 0x20000, CRC(e45b7def) SHA1(6b92a91d64581954da8ecdbeb5fed79bcc9c5217) ) | |
| 2386 | 2506 | |
| 2387 | 2507 | ROM_REGION( 0x10000, "cpu1", 0 ) /* Sound HD647180 code */ |
| 2388 | 2508 | /* sound CPU is a HD647180 (Z180) with internal ROM - not yet supported */ |
| r7553 | r7554 | |
| 2447 | 2567 | GAME( 1990, outzonec, outzone, outzone, outzonec, toaplan1, ROT270, "Toaplan", "Out Zone (set 4)", 0 ) |
| 2448 | 2568 | GAME( 1990, outzoned, outzone, outzone, outzonec, toaplan1, ROT270, "Toaplan", "Out Zone (set 5)", 0 ) |
| 2449 | 2569 | GAME( 1991, vimana, 0, vimana, vimana, vimana, ROT270, "Toaplan", "Vimana", GAME_NO_SOUND ) |
| 2450 | GAME( 1991, vimana1, vimana, vimana, vimana, vimana, ROT270, "Toaplan", "Vimana (old set)", GAME_NO_SOUND ) | |
| 2451 | GAME( 1991, vimanan, vimana, vimana, vimanan, vimana, ROT270, "Toaplan (Nova Apparate GMBH & Co license)", "Vimana (Nova Apparate GMBH & Co)", GAME_NO_SOUND ) | |
| 2570 | GAME( 1991, vimanan, vimana, vimana, vimanan, vimana, ROT270, "Toaplan", "Vimana (Nova Apparate GMBH & Co)", GAME_NO_SOUND ) | |
| 2571 | GAME( 1991, vimana1, vimana, vimana, vimana1, vimana, ROT270, "Toaplan", "Vimana (Japan)", GAME_NO_SOUND ) |
| r7553 | r7554 | |
|---|---|---|
| 3450 | 3450 | |
| 3451 | 3451 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3452 | 3452 | ROM_LOAD( "060e04.d1", 0x0000, 0x100000, CRC(c680395d) SHA1(acde593a5ec501e89c8aaca6c4fbacf707a727e1) ) |
| 3453 | ||
| 3454 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3455 | ROM_LOAD( "blswhstl.nv", 0x0000, 0x080, CRC(87434e3f) SHA1(458d21cfc0ef3415c0b09d8d748263b9218bdb24) ) | |
| 3453 | 3456 | ROM_END |
| 3454 | 3457 | |
| 3455 | 3458 | ROM_START( detatwin ) |
| r7553 | r7554 | |
| 3472 | 3475 | |
| 3473 | 3476 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3474 | 3477 | ROM_LOAD( "060e04.d1", 0x0000, 0x100000, CRC(c680395d) SHA1(acde593a5ec501e89c8aaca6c4fbacf707a727e1) ) |
| 3478 | ||
| 3479 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3480 | ROM_LOAD( "blswhstl.nv", 0x0000, 0x080, CRC(87434e3f) SHA1(458d21cfc0ef3415c0b09d8d748263b9218bdb24) ) | |
| 3475 | 3481 | ROM_END |
| 3476 | 3482 | |
| 3477 | 3483 | ROM_START( glfgreat ) |
| r7553 | r7554 | |
| 3558 | 3564 | |
| 3559 | 3565 | ROM_REGION( 0x200000, "k053260", 0 ) /* samples for the 053260 */ |
| 3560 | 3566 | ROM_LOAD( "063b06", 0x0000, 0x200000, CRC(1e510aa5) SHA1(02b9bd6bb6b098026a620e4d671c40a31ad9e318) ) |
| 3567 | ||
| 3568 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3569 | ROM_LOAD( "tmnt2_uaa.nv", 0x0000, 0x080, CRC(284357bd) SHA1(4f1c78b7cc86379678b1b84bcf59f8599a8c3686) ) | |
| 3561 | 3570 | ROM_END |
| 3562 | 3571 | |
| 3563 | 3572 | ROM_START( tmnt22pu ) |
| r7553 | r7554 | |
| 3584 | 3593 | |
| 3585 | 3594 | ROM_REGION( 0x200000, "k053260", 0 ) /* samples for the 053260 */ |
| 3586 | 3595 | ROM_LOAD( "063b06", 0x0000, 0x200000, CRC(1e510aa5) SHA1(02b9bd6bb6b098026a620e4d671c40a31ad9e318) ) |
| 3596 | ||
| 3597 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with invisible error message | |
| 3598 | ROM_LOAD( "tmnt2_uda.nv", 0x0000, 0x080, CRC(44928d33) SHA1(44024927987f6bb8bdac3dbd1fdc81d7b55c0f5a) ) | |
| 3587 | 3599 | ROM_END |
| 3588 | 3600 | |
| 3601 | ||
| 3589 | 3602 | ROM_START( tmht22pe ) |
| 3590 | 3603 | ROM_REGION( 0x100000, "maincpu", 0 ) /* 4*128k for 68000 code */ |
| 3591 | 3604 | ROM_LOAD16_BYTE( "063eba02.e8", 0x000000, 0x20000, CRC(99409094) SHA1(18059da85c59eb6ce193111bb8c7bd6601b1e698) ) |
| r7553 | r7554 | |
| 3610 | 3623 | |
| 3611 | 3624 | ROM_REGION( 0x200000, "k053260", 0 ) /* samples for the 053260 */ |
| 3612 | 3625 | ROM_LOAD( "063b06", 0x0000, 0x200000, CRC(1e510aa5) SHA1(02b9bd6bb6b098026a620e4d671c40a31ad9e318) ) |
| 3626 | ||
| 3627 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with invisible error message | |
| 3628 | ROM_LOAD( "tmnt2_eba.nv", 0x0000, 0x080, CRC(c0a3ed50) SHA1(6deec720c7f1c607740076cb8b5b5becd175aed0) ) | |
| 3613 | 3629 | ROM_END |
| 3614 | 3630 | |
| 3631 | ||
| 3615 | 3632 | ROM_START( tmnt2a ) |
| 3616 | 3633 | ROM_REGION( 0x100000, "maincpu", 0 ) /* 4*128k for 68000 code */ |
| 3617 | 3634 | ROM_LOAD16_BYTE( "063ada02.e8", 0x000000, 0x20000, CRC(4f11b587) SHA1(111051da23ce7035405b4d12c0f18dcc1d6c8ddc) ) |
| r7553 | r7554 | |
| 3636 | 3653 | |
| 3637 | 3654 | ROM_REGION( 0x200000, "k053260", 0 ) /* samples for the 053260 */ |
| 3638 | 3655 | ROM_LOAD( "063b06", 0x0000, 0x200000, CRC(1e510aa5) SHA1(02b9bd6bb6b098026a620e4d671c40a31ad9e318) ) |
| 3656 | ||
| 3657 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3658 | ROM_LOAD( "tmnt2_ada.nv", 0x0000, 0x080, CRC(063068a0) SHA1(c1da5319428fd8fb60305a2d7cc166596b2fe5a4) ) | |
| 3639 | 3659 | ROM_END |
| 3640 | 3660 | |
| 3661 | ||
| 3641 | 3662 | ROM_START( qgakumon ) |
| 3642 | 3663 | ROM_REGION( 0x100000, "maincpu", 0 ) /* 4*256k for 68000 code */ |
| 3643 | 3664 | ROM_LOAD16_BYTE( "248jaa02.8e", 0x000000, 0x40000, CRC(fab79410) SHA1(8b1a8946ee65505608cf026c9fca87365ccef089) ) |
| r7553 | r7554 | |
| 3658 | 3679 | |
| 3659 | 3680 | ROM_REGION( 0x200000, "k053260", 0 ) /* samples for the 053260 */ |
| 3660 | 3681 | ROM_LOAD( "248a06.1d", 0x0000, 0x200000, CRC(0fba1def) SHA1(f2ba23213effd06f14c7a179acea974c78c2198f) ) |
| 3682 | ||
| 3683 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 3684 | ROM_LOAD( "qgakumon.nv", 0x0000, 0x080, CRC(847bd238) SHA1(d6f7bf215055b7e9ea1027f4b4e34fea25b3273b) ) | |
| 3661 | 3685 | ROM_END |
| 3662 | 3686 | |
| 3663 | 3687 | ROM_START( ssriders ) |
| r7553 | r7554 | |
| 3680 | 3704 | |
| 3681 | 3705 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3682 | 3706 | ROM_LOAD( "064e06.1d", 0x0000, 0x100000, CRC(59810df9) SHA1(a0affc6330bdbfab1447dc0cf13c20ff708c2c71) ) |
| 3707 | ||
| 3708 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3709 | ROM_LOAD( "ssriders_eac.nv", 0x0000, 0x080, CRC(f6d641a7) SHA1(6c680d49e1b07a47b29ff263a6009d226bd120cf) ) | |
| 3683 | 3710 | ROM_END |
| 3684 | 3711 | |
| 3685 | 3712 | ROM_START( ssridersebd ) |
| r7553 | r7554 | |
| 3702 | 3729 | |
| 3703 | 3730 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3704 | 3731 | ROM_LOAD( "064e06.1d", 0x0000, 0x100000, CRC(59810df9) SHA1(a0affc6330bdbfab1447dc0cf13c20ff708c2c71) ) |
| 3732 | ||
| 3733 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3734 | ROM_LOAD( "ssriders_ebd.nv", 0x0000, 0x080, CRC(cbc903f6) SHA1(43cb8e7f9b1da05da93878bd236f63036e32e379) ) | |
| 3705 | 3735 | ROM_END |
| 3706 | 3736 | |
| 3707 | 3737 | ROM_START( ssridersebc ) |
| r7553 | r7554 | |
| 3724 | 3754 | |
| 3725 | 3755 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3726 | 3756 | ROM_LOAD( "064e06.1d", 0x0000, 0x100000, CRC(59810df9) SHA1(a0affc6330bdbfab1447dc0cf13c20ff708c2c71) ) |
| 3757 | ||
| 3758 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3759 | ROM_LOAD( "ssriders_ebc.nv", 0x0000, 0x080, CRC(1918e90f) SHA1(edddbe80a5c9dd64411596b1aa4d7fce7b7090ae) ) | |
| 3727 | 3760 | ROM_END |
| 3728 | 3761 | |
| 3729 | 3762 | ROM_START( ssriderseaa ) |
| r7553 | r7554 | |
| 3746 | 3779 | |
| 3747 | 3780 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3748 | 3781 | ROM_LOAD( "064e06.1d", 0x0000, 0x100000, CRC(59810df9) SHA1(a0affc6330bdbfab1447dc0cf13c20ff708c2c71) ) |
| 3782 | ||
| 3783 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3784 | ROM_LOAD( "ssriders_eaa.nv", 0x0000, 0x080, CRC(74a45ef5) SHA1(da01f14684315bfb5c180f0c64a14350c34ae945) ) | |
| 3749 | 3785 | ROM_END |
| 3750 | 3786 | |
| 3751 | 3787 | ROM_START( ssridersuda ) |
| r7553 | r7554 | |
| 3768 | 3804 | |
| 3769 | 3805 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3770 | 3806 | ROM_LOAD( "064e06.1d", 0x0000, 0x100000, CRC(59810df9) SHA1(a0affc6330bdbfab1447dc0cf13c20ff708c2c71) ) |
| 3807 | ||
| 3808 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3809 | ROM_LOAD( "ssriders_uda.nv", 0x0000, 0x080, CRC(148c6d64) SHA1(38016ba7e29f821a4c0de67a7ddc686d307e4659) ) | |
| 3771 | 3810 | ROM_END |
| 3772 | 3811 | |
| 3773 | 3812 | ROM_START( ssridersuac ) |
| r7553 | r7554 | |
| 3790 | 3829 | |
| 3791 | 3830 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3792 | 3831 | ROM_LOAD( "064e06.1d", 0x0000, 0x100000, CRC(59810df9) SHA1(a0affc6330bdbfab1447dc0cf13c20ff708c2c71) ) |
| 3832 | ||
| 3833 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3834 | ROM_LOAD( "ssriders_uac.nv", 0x0000, 0x080, CRC(26c8f1a0) SHA1(56b933d61fb3a3da787db8e6714b53178f3c98db) ) | |
| 3793 | 3835 | ROM_END |
| 3794 | 3836 | |
| 3795 | 3837 | ROM_START( ssridersubc ) |
| r7553 | r7554 | |
| 3812 | 3854 | |
| 3813 | 3855 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3814 | 3856 | ROM_LOAD( "064e06.1d", 0x0000, 0x100000, CRC(59810df9) SHA1(a0affc6330bdbfab1447dc0cf13c20ff708c2c71) ) |
| 3857 | ||
| 3858 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3859 | ROM_LOAD( "ssriders_ubc.nv", 0x0000, 0x080, CRC(31c5504f) SHA1(fa6ed1860122552e94abb27a6ea75f4cb8054e76) ) | |
| 3815 | 3860 | ROM_END |
| 3816 | 3861 | |
| 3817 | 3862 | ROM_START( ssridersabd ) |
| r7553 | r7554 | |
| 3834 | 3879 | |
| 3835 | 3880 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3836 | 3881 | ROM_LOAD( "064e06.1d", 0x0000, 0x100000, CRC(59810df9) SHA1(a0affc6330bdbfab1447dc0cf13c20ff708c2c71) ) |
| 3882 | ||
| 3883 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3884 | ROM_LOAD( "ssriders_abd.nv", 0x0000, 0x080, CRC(bfdafedf) SHA1(bc786d4fb3495a6baf2ae13c19392c6740a2be6d) ) | |
| 3837 | 3885 | ROM_END |
| 3838 | 3886 | |
| 3839 | 3887 | ROM_START( ssridersadd ) |
| r7553 | r7554 | |
| 3856 | 3904 | |
| 3857 | 3905 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3858 | 3906 | ROM_LOAD( "064e06.1d", 0x0000, 0x100000, CRC(59810df9) SHA1(a0affc6330bdbfab1447dc0cf13c20ff708c2c71) ) |
| 3907 | ||
| 3908 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3909 | ROM_LOAD( "ssriders_add.nv", 0x0000, 0x080, CRC(f06242d5) SHA1(181732b07c74c3f5cfa7838ec029ed42d5216b17) ) | |
| 3859 | 3910 | ROM_END |
| 3860 | 3911 | |
| 3861 | 3912 | ROM_START( ssridersjbd ) |
| r7553 | r7554 | |
| 3878 | 3929 | |
| 3879 | 3930 | ROM_REGION( 0x100000, "k053260", 0 ) /* samples for the 053260 */ |
| 3880 | 3931 | ROM_LOAD( "064e06.1d", 0x0000, 0x100000, CRC(59810df9) SHA1(a0affc6330bdbfab1447dc0cf13c20ff708c2c71) ) |
| 3932 | ||
| 3933 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with invisible error | |
| 3934 | ROM_LOAD( "ssriders_jbd.nv", 0x0000, 0x080, CRC(006200e3) SHA1(a6a0640c1a6d69a41db90f1fc935e97f2fa68553) ) | |
| 3881 | 3935 | ROM_END |
| 3882 | 3936 | |
| 3883 | 3937 | ROM_START( ssridersb ) |
| r7553 | r7554 | |
| 3919 | 3973 | |
| 3920 | 3974 | ROM_REGION( 0x80000, "k053260", 0 ) /* samples for the 053260 */ |
| 3921 | 3975 | ROM_LOAD( "073-b04.2d", 0x0000, 0x80000, CRC(05287a0b) SHA1(10784b8be6a93a5ebf22a884f99c116e51ae8743) ) |
| 3976 | ||
| 3977 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 3978 | ROM_LOAD( "thndrx2.nv", 0x0000, 0x080, CRC(ca613e98) SHA1(bde0d1722acfef19cf8ec091bdc296f8b9fa8125) ) | |
| 3922 | 3979 | ROM_END |
| 3923 | 3980 | |
| 3924 | 3981 | ROM_START( thndrx2a ) |
| r7553 | r7554 | |
| 3939 | 3996 | |
| 3940 | 3997 | ROM_REGION( 0x80000, "k053260", 0 ) /* samples for the 053260 */ |
| 3941 | 3998 | ROM_LOAD( "073-b04.2d", 0x0000, 0x80000, CRC(05287a0b) SHA1(10784b8be6a93a5ebf22a884f99c116e51ae8743) ) |
| 3999 | ||
| 4000 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 4001 | ROM_LOAD( "thndrx2a.nv", 0x0000, 0x080, CRC(f7893d00) SHA1(1165ad3485749015458df2840a34b5b0e1810aad) ) | |
| 3942 | 4002 | ROM_END |
| 3943 | 4003 | |
| 3944 | 4004 | ROM_START( thndrx2j ) |
| r7553 | r7554 | |
| 3959 | 4019 | |
| 3960 | 4020 | ROM_REGION( 0x80000, "k053260", 0 ) /* samples for the 053260 */ |
| 3961 | 4021 | ROM_LOAD( "073-b04.2d", 0x0000, 0x80000, CRC(05287a0b) SHA1(10784b8be6a93a5ebf22a884f99c116e51ae8743) ) |
| 4022 | ||
| 4023 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 4024 | ROM_LOAD( "thndrx2j.nv", 0x0000, 0x080, CRC(83b4799b) SHA1(da4f443cbcb06aa5983423cb6fecc1f803235f61) ) | |
| 3962 | 4025 | ROM_END |
| 3963 | 4026 | |
| 4027 | ||
| 3964 | 4028 | ROM_START( prmrsocr ) |
| 3965 | 4029 | ROM_REGION( 0x80000, "maincpu", 0 ) /* 2*256k for 68000 code */ |
| 3966 | 4030 | ROM_LOAD16_BYTE( "101eab08.1h", 0x000000, 0x40000, CRC(47208de6) SHA1(fe4ef56688d4a50f67a604357e7beea785106cd1) ) // 3.bin |
| r7553 | r7554 | |
| 3987 | 4051 | |
| 3988 | 4052 | ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ |
| 3989 | 4053 | ROM_LOAD( "101a06.1d", 0x0000, 0x200000, CRC(4f48e043) SHA1(f50e8642d9d3a028c243777640e7cd13da1abf86) ) |
| 4054 | ||
| 4055 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 4056 | ROM_LOAD( "prmrsocr_eab.nv", 0x0000, 0x080, CRC(daf60801) SHA1(de21774c4276ec399745c26a9278f7c58dbe6ad0) ) | |
| 3990 | 4057 | ROM_END |
| 3991 | 4058 | |
| 3992 | 4059 | ROM_START( prmrsocrj ) |
| r7553 | r7554 | |
| 4015 | 4082 | |
| 4016 | 4083 | ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ |
| 4017 | 4084 | ROM_LOAD( "101a06.1d", 0x0000, 0x200000, CRC(4f48e043) SHA1(f50e8642d9d3a028c243777640e7cd13da1abf86) ) |
| 4085 | ||
| 4086 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 4087 | ROM_LOAD( "prmrsocr_jab.nv", 0x0000, 0x080, CRC(5a88f95a) SHA1(18fdb598eee3958c45694bdac77e02790c936968) ) | |
| 4018 | 4088 | ROM_END |
| 4019 | 4089 | |
| 4020 | 4090 |
| r7553 | r7554 | |
|---|---|---|
| 927 | 927 | |
| 928 | 928 | ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ |
| 929 | 929 | ROM_LOAD( "esd4.su10", 0x000000, 0x020000, CRC(3c11c590) SHA1(cb33845c3dc0501fff8055c2d66f412881089df1) ) /* AT27010 mask rom */ |
| 930 | ||
| 931 | ROM_REGION( 0x80, "eeprom", 0 ) | |
| 932 | ROM_LOAD( "hedpanic.nv", 0x0000, 0x0080, CRC(e91f4038) SHA1(f492de71170900f87912a272ab4f4a3a37ba31fe) ) | |
| 930 | 933 | ROM_END |
| 931 | 934 | |
| 932 | 935 | |
| r7553 | r7554 | |
| 952 | 955 | |
| 953 | 956 | ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ |
| 954 | 957 | ROM_LOAD( "esd4.su10", 0x000000, 0x020000, CRC(3c11c590) SHA1(cb33845c3dc0501fff8055c2d66f412881089df1) ) /* AT27010 mask rom */ |
| 958 | ||
| 959 | ROM_REGION( 0x80, "eeprom", 0 ) | |
| 960 | ROM_LOAD( "hedpanic.nv", 0x0000, 0x0080, CRC(e91f4038) SHA1(f492de71170900f87912a272ab4f4a3a37ba31fe) ) | |
| 955 | 961 | ROM_END |
| 956 | 962 | |
| 957 | 963 | |
| r7553 | r7554 | |
| 980 | 986 | |
| 981 | 987 | ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ |
| 982 | 988 | ROM_LOAD( "esd4.rom", 0x000000, 0x020000, CRC(d7ca6806) SHA1(8ad668bfb5b7561cc0f3e36dfc3c936b136a4274) ) |
| 989 | ||
| 990 | ROM_REGION( 0x80, "eeprom", 0 ) | |
| 991 | ROM_LOAD( "hedpanic.nv", 0x0000, 0x0080, CRC(e91f4038) SHA1(f492de71170900f87912a272ab4f4a3a37ba31fe) ) | |
| 983 | 992 | ROM_END |
| 984 | 993 | |
| 985 | 994 |
| r7553 | r7554 | |
|---|---|---|
| 4607 | 4607 | ROM_END |
| 4608 | 4608 | |
| 4609 | 4609 | ROM_START( oceanhun ) /* Step 2.0 317-0244-COM security chip (837-13666-com security board) */ |
| 4610 | ROM_REGION64_BE( 0x | |
| 4610 | ROM_REGION64_BE( 0x8800000, "user1", 0 ) /* program + data ROMs */ | |
| 4611 | 4611 | // CROM |
| 4612 | 4612 | ROM_LOAD64_WORD_SWAP( "epr21114.17", 0x000006, 0x200000, CRC(3adfcb9d) SHA1(22307e36a48e59ab881d6df2fbf2864f6a8b239c) ) |
| 4613 | 4613 | ROM_LOAD64_WORD_SWAP( "epr21115.18", 0x000004, 0x200000, CRC(0bb9c107) SHA1(9778b9d020669a5f5736c80e77f0fb1c7d0e1f1b) ) |
| r7553 | r7554 | |
| 4615 | 4615 | ROM_LOAD64_WORD_SWAP( "epr21117.20", 0x000000, 0x200000, CRC(58d985f1) SHA1(1a3376906212a8a3bfb196ea29b5e4455a30e8f2) ) |
| 4616 | 4616 | |
| 4617 | 4617 | // CROM1 |
| 4618 | ROM_LOAD64_WORD_SWAP( "mpr21082.5", 0x1800006, 0x400000, CRC(5bfeaa64) SHA1(3aa9f0b10c17e999dc917e3ff888887f42c54d31) ) | |
| 4619 | ROM_LOAD64_WORD_SWAP( "mpr21083.6", 0x1800004, 0x400000, CRC(667e236f) SHA1(a3354a72ba3f535cbe54af592eafda1a9816a6e6) ) | |
| 4620 | ROM_LOAD64_WORD_SWAP( "mpr21084.7", 0x1800002, 0x400000, CRC(36d5c4c1) SHA1(827590934023313e006330c66fe69763559effae) ) | |
| 4621 | ROM_LOAD64_WORD_SWAP( "mpr21085.8", 0x1800000, 0x400000, CRC(8d62406a) SHA1(d8be8a7bf6f8c48c07a5532f772101888e65f9d4) ) | |
| 4618 | ROM_LOAD64_WORD_SWAP( "mpr21082.5", 0x1800006, 0x800000, CRC(5056ad33) SHA1(b8aa4edcf6ae78f23ee1c6c02a9d5aef9c4e2eda) ) | |
| 4619 | ROM_LOAD64_WORD_SWAP( "mpr21083.6", 0x1800004, 0x800000, CRC(fdec6a23) SHA1(88abe005c7f5f8423aa62ebc741e0b132b3a1fef) ) | |
| 4620 | ROM_LOAD64_WORD_SWAP( "mpr21084.7", 0x1800002, 0x800000, CRC(c1c6b554) SHA1(596059872c0bbe39a78425cefe8cd2e17aa4b1ee) ) | |
| 4621 | ROM_LOAD64_WORD_SWAP( "mpr21085.8", 0x1800000, 0x800000, CRC(2b7224d3) SHA1(195fb6eeaef6f2c66e780cc844d3d69ea587269b) ) | |
| 4622 | 4622 | |
| 4623 | 4623 | // CROM2 |
| 4624 | ROM_LOAD64_WORD_SWAP( "mpr21086.9", 0x2800006, 0x400000, CRC(1e704e51) SHA1(970f19521aea6802276f46a20b39d23f23e09b84) ) | |
| 4625 | ROM_LOAD64_WORD_SWAP( "mpr21087.10", 0x2800004, 0x400000, CRC(5db59035) SHA1(6e511e1819a48ca4d437587f3c9a14dc530352fe) ) | |
| 4626 | ROM_LOAD64_WORD_SWAP( "mpr21088.11", 0x2800002, 0x400000, CRC(7730742b) SHA1(267444812a07ff4cf69da8545d4a7a2de1a3ba29) ) | |
| 4627 | ROM_LOAD64_WORD_SWAP( "mpr21089.12", 0x2800000, 0x400000, CRC(a74d2dcb) SHA1(449a188a7e5a21e2b51748cf7ceae84e2e3beab4) ) | |
| 4624 | ROM_LOAD64_WORD_SWAP( "mpr21086.9", 0x2800006, 0x800000, CRC(3f12e1d0) SHA1(739347a6c51350b686124511be477cb5d643c0b9) ) | |
| 4625 | ROM_LOAD64_WORD_SWAP( "mpr21087.10", 0x2800004, 0x800000, CRC(cff28641) SHA1(8982b39b71f95f8db0d599be41fb8592210be779) ) | |
| 4626 | ROM_LOAD64_WORD_SWAP( "mpr21088.11", 0x2800002, 0x800000, CRC(7ed71c8c) SHA1(642b6e81f5e532afa972b47df3ba451829bfd591) ) | |
| 4627 | ROM_LOAD64_WORD_SWAP( "mpr21089.12", 0x2800000, 0x800000, CRC(2e8f88bd) SHA1(468c5e1d6596c8247ba94c02f6e519a091a78506) ) | |
| 4628 | 4628 | |
| 4629 | 4629 | // CROM3 |
| 4630 | ROM_LOAD64_WORD_SWAP( "mpr21090.13", 0x3800006, 0x400000, CRC(7a95c388) SHA1(9a0f8b4e3bf0670d4f838a6fb18f29f5e1b3721b) ) | |
| 4631 | ROM_LOAD64_WORD_SWAP( "mpr21091.14", 0x3800004, 0x400000, CRC(4031b961) SHA1(0c663171f15dea67709e7ffc3f45b7571e745232) ) | |
| 4632 | ROM_LOAD64_WORD_SWAP( "mpr21092.15", 0x3800002, 0x400000, CRC(0ce200d9) SHA1(dd27ee6754df1330544a61ca6ec1ec2e79d11284) ) | |
| 4633 | ROM_LOAD64_WORD_SWAP( "mpr21093.16", 0x3800000, 0x400000, CRC(6eae1fc4) SHA1(e83671d1ba7bcc8c8a577c725b54b7caa2e3666e) ) | |
| 4630 | ROM_LOAD64_WORD_SWAP( "mpr21090.13", 0x3800006, 0x800000, CRC(749d7979) SHA1(20e6d318cbdbefc84002111336cc336143c7b757) ) | |
| 4631 | ROM_LOAD64_WORD_SWAP( "mpr21091.14", 0x3800004, 0x800000, CRC(10671951) SHA1(1eeb5cded07380c06aca29379f3683977679c22b) ) | |
| 4632 | ROM_LOAD64_WORD_SWAP( "mpr21092.15", 0x3800002, 0x800000, CRC(5b1ced40) SHA1(d1946563215797df1e6e71ee1a92f70a59a60392) ) | |
| 4633 | ROM_LOAD64_WORD_SWAP( "mpr21093.16", 0x3800000, 0x800000, CRC(bdfbf357) SHA1(e324bbbc0ad17f365879c8be085ccde365445dd9) ) | |
| 4634 | 4634 | |
| 4635 | 4635 | ROM_REGION( 0x2000000, "user3", 0 ) /* Video ROMs Part 1 */ |
| 4636 | 4636 | ROM_LOAD_VROM( "mpr21098.26", 0x000002, 0x400000, CRC(91e71855) SHA1(d3dcea5e983b3a9139e0091a13e3f4b2764417b8) ) |
| r7553 | r7554 | |
|---|---|---|
| 618 | 618 | ROM_REGION( 0x300000, "k054539", 0 ) |
| 619 | 619 | ROM_LOAD( "067_b06.rom", 0x000000, 0x200000, CRC(3b12fce4) SHA1(c69172d9965b8da8a539812fac92d5f1a3c80d17) ) |
| 620 | 620 | ROM_LOAD( "067_b07.rom", 0x200000, 0x100000, CRC(ec87fe1b) SHA1(ec9823aea5a1fc5c47c8262e15e10b28be87231c) ) |
| 621 | ||
| 622 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 623 | ROM_LOAD( "xexex.nv", 0x0000, 0x080, CRC(155624cc) SHA1(457f921e3a5d053c53e4f1a44941eb0a1f22e1b2) ) | |
| 621 | 624 | ROM_END |
| 622 | 625 | |
| 623 | 626 | ROM_START( xexexa ) /* Asia, Version AA */ |
| r7553 | r7554 | |
| 647 | 650 | ROM_REGION( 0x300000, "k054539", 0 ) |
| 648 | 651 | ROM_LOAD( "067_b06.rom", 0x000000, 0x200000, CRC(3b12fce4) SHA1(c69172d9965b8da8a539812fac92d5f1a3c80d17) ) |
| 649 | 652 | ROM_LOAD( "067_b07.rom", 0x200000, 0x100000, CRC(ec87fe1b) SHA1(ec9823aea5a1fc5c47c8262e15e10b28be87231c) ) |
| 653 | ||
| 654 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 655 | ROM_LOAD( "xexexa.nv", 0x0000, 0x080, CRC(051c14c6) SHA1(23addbaa2ce323c06551b343ca45dea4fd2b9eee) ) | |
| 650 | 656 | ROM_END |
| 651 | 657 | |
| 652 | 658 | ROM_START( xexexj ) /* Japan, Version AA */ |
| r7553 | r7554 | |
| 676 | 682 | ROM_REGION( 0x300000, "k054539", 0 ) |
| 677 | 683 | ROM_LOAD( "067_b06.rom", 0x000000, 0x200000, CRC(3b12fce4) SHA1(c69172d9965b8da8a539812fac92d5f1a3c80d17) ) |
| 678 | 684 | ROM_LOAD( "067_b07.rom", 0x200000, 0x100000, CRC(ec87fe1b) SHA1(ec9823aea5a1fc5c47c8262e15e10b28be87231c) ) |
| 685 | ||
| 686 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 687 | ROM_LOAD( "xexexj.nv", 0x0000, 0x080, CRC(79a79c7b) SHA1(02eb235226949af0147d6d0fd2bd3d7a68083ae6) ) | |
| 679 | 688 | ROM_END |
| 680 | 689 | |
| 681 | 690 |
| r7553 | r7554 | |
|---|---|---|
| 286 | 286 | |
| 287 | 287 | static READ16_HANDLER( jchan_mcu_status_r ) |
| 288 | 288 | { |
| 289 | logerror("cpu '%s' (PC=%06X): read mcu status\n", space->cpu->tag | |
| 289 | logerror("cpu '%s' (PC=%06X): read mcu status\n", space->cpu->tag | |
| 290 | 290 | return 0; |
| 291 | 291 | } |
| 292 | 292 |
| r7553 | r7554 | |
|---|---|---|
| 2573 | 2573 | |
| 2574 | 2574 | ROM_START( ckongg ) |
| 2575 | 2575 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 2576 | ROM_LOAD( "ck1.bin", | |
| 2576 | ROM_LOAD( "g_ck1.bin", | |
| 2577 | 2577 | ROM_CONTINUE( 0x1C00, 0x0400) |
| 2578 | 2578 | ROM_CONTINUE( 0x4800, 0x0400) |
| 2579 | 2579 | ROM_CONTINUE( 0x0C00, 0x0400) |
| r7553 | r7554 | |
|---|---|---|
| 469 | 469 | static void opwolf_msm5205_vck( running_device *device ) |
| 470 | 470 | { |
| 471 | 471 | opwolf_state *state = (opwolf_state *)device->machine->driver_data; |
| 472 | int chip = (strcmp(device->tag, "msm1") == 0) ? 0 : 1; | |
| 472 | int chip = (strcmp(device->tag(), "msm1") == 0) ? 0 : 1; | |
| 473 | 473 | if (state->adpcm_data[chip] != -1) |
| 474 | 474 | { |
| 475 | 475 | msm5205_data_w(device, state->adpcm_data[chip] & 0x0f); |
| r7553 | r7554 | |
|---|---|---|
| 87 | 87 | |
| 88 | 88 | static void spd_adpcm_int(running_device *device) |
| 89 | 89 | { |
| 90 | int chip = (strcmp(device->tag, "msm1") == 0) ? 0 : 1; | |
| 90 | int chip = (strcmp(device->tag(), "msm1") == 0) ? 0 : 1; | |
| 91 | 91 | if (adpcm_pos[chip] >= adpcm_end[chip] || adpcm_pos[chip] >= 0x10000) |
| 92 | 92 | { |
| 93 | 93 | adpcm_idle[chip] = 1; |
| r7553 | r7554 | |
|---|---|---|
| 795 | 795 | /* sound data */ |
| 796 | 796 | ROM_REGION( 0x200000, "shared", 0 ) |
| 797 | 797 | ROM_LOAD( "305b08.2e", 0x000000, 0x200000, CRC(874607df) SHA1(763b44a80abfbc355bcb9be8bf44373254976019) ) |
| 798 | ||
| 799 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 800 | ROM_LOAD( "plygonet.nv", 0x0000, 0x0080, CRC(627748ac) SHA1(ea1b06739fee235b049ff8daffff7d43cb093112) ) | |
| 798 | 801 | ROM_END |
| 799 | 802 | |
| 800 | 803 | ROM_START( polynetw ) |
| r7553 | r7554 | |
| 822 | 825 | ROM_REGION( 0x400000, "shared", 0 ) |
| 823 | 826 | ROM_LOAD( "305a08.2e", 0x000000, 0x200000, CRC(7ddb8a52) SHA1(3199b347fc433ffe0de8521001df77672d40771e) ) |
| 824 | 827 | ROM_LOAD( "305a09.3e", 0x200000, 0x200000, CRC(6da1be58) SHA1(d63ac16ac551193ff8a6036724fb59e1d702e06b) ) |
| 828 | ||
| 829 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 830 | ROM_LOAD( "polynetw.nv", 0x0000, 0x0080, CRC(8f39d644) SHA1(8733e1a288ba20c4b04b3aedde52801d05cebdf9) ) | |
| 825 | 831 | ROM_END |
| 826 | 832 | |
| 827 | 833 | /* ROM parent machine inp init */ |
| r7553 | r7554 | |
|---|---|---|
| 2915 | 2915 | |
| 2916 | 2916 | ROM_START( digdug1 ) |
| 2917 | 2917 | ROM_REGION( 0x10000, "maincpu", 0 ) /* 64k for code for the first CPU */ |
| 2918 | ROM_LOAD( "dd1a.1", 0x0000, 0x1000, CRC(b9198079) SHA1(1d3fe04020f584ed250e32fdc6f6a3b769342884) ) | |
| 2919 | ROM_LOAD( "dd1a.2", 0x1000, 0x1000, CRC(b2acbe49) SHA1(c8f713e8cfa70d3bc64d3002ff7bffc65ee138e2) ) | |
| 2920 | ROM_LOAD( "dd1a.3", 0x2000, 0x1000, CRC(d6407b49) SHA1(0e71a8f02778286488865e20439776dbb2a8ec78) ) | |
| 2918 | ROM_LOAD( "dd1.1", 0x0000, 0x1000, CRC(b9198079) SHA1(1d3fe04020f584ed250e32fdc6f6a3b769342884) ) | |
| 2919 | ROM_LOAD( "dd1.2", 0x1000, 0x1000, CRC(b2acbe49) SHA1(c8f713e8cfa70d3bc64d3002ff7bffc65ee138e2) ) | |
| 2920 | ROM_LOAD( "dd1.3", 0x2000, 0x1000, CRC(d6407b49) SHA1(0e71a8f02778286488865e20439776dbb2a8ec78) ) | |
| 2921 | 2921 | ROM_LOAD( "dd1.4b", 0x3000, 0x1000, CRC(f4cebc16) SHA1(19b568f92069a1cfe1c07287408efe3b0e253375) ) |
| 2922 | 2922 | |
| 2923 | 2923 | ROM_REGION( 0x10000, "sub", 0 ) /* 64k for the second CPU */ |
| r7553 | r7554 | |
|---|---|---|
| 1819 | 1819 | amount of points (there is a dip switch to select the trigger: 150.000 or 200.000*/ |
| 1820 | 1820 | ROM_START( couplep ) |
| 1821 | 1821 | ROM_REGION( 0x20000, "maincpu", 0 ) |
| 1822 | ROM_LOAD( "1.1d", | |
| 1822 | ROM_LOAD( "p_1.1d", | |
| 1823 | 1823 | ROM_LOAD( "2.1e", 0x10000, 0x8000, CRC(17372a93) SHA1(e0f0980003473555c2543d98d1494f82afa49f1a) ) |
| 1824 | 1824 | |
| 1825 | 1825 | ROM_REGION( 0x18000, "gfx1", 0 ) |
| r7553 | r7554 | |
| 1838 | 1838 | it has same dips as set1, but remaining machine code is the same as set2*/ |
| 1839 | 1839 | ROM_START( couplei ) |
| 1840 | 1840 | ROM_REGION( 0x20000, "maincpu", 0 ) |
| 1841 | ROM_LOAD( "1.1d", | |
| 1841 | ROM_LOAD( "i_1.1d", | |
| 1842 | 1842 | ROM_LOAD( "2.1e", 0x10000, 0x8000, CRC(17372a93) SHA1(e0f0980003473555c2543d98d1494f82afa49f1a) ) |
| 1843 | 1843 | |
| 1844 | 1844 | ROM_REGION( 0x18000, "gfx1", 0 ) |
| r7553 | r7554 | |
|---|---|---|
| 869 | 869 | ROM_LOAD32_BYTE( "477a16.2h", 0x000003, 0x200000, CRC(2c03ee63) SHA1(6b74d340dddf92bb4e4b1e037f003d58c65d8d9b) ) |
| 870 | 870 | |
| 871 | 871 | ROM_REGION(0x600000, "shared", 0) /* Sound data */ |
| 872 | ROM_LOAD( "477a09.3r", 0x000000, 0x200000, CRC(f431e29f) SHA1(e6082d88f86abb63d02ac34e70873b58f88b0ddc) ) | |
| 873 | ROM_LOAD( "477a10.5n", 0x200000, 0x200000, CRC(8db31bd4) SHA1(d662d3bb6e8b44a01ffa158f5d7425454aad49a3) ) | |
| 874 | ROM_LOAD( "477a08.5r", 0x400000, 0x200000, CRC(d320dbde) SHA1(eb602cad6ac7c7151c9f29d39b10041d5a354164) ) | |
| 872 | ROM_LOAD( "477a08.5r", 0x000000, 0x200000, CRC(d320dbde) SHA1(eb602cad6ac7c7151c9f29d39b10041d5a354164) ) | |
| 873 | ROM_LOAD( "477a09.3r", 0x200000, 0x200000, CRC(f431e29f) SHA1(e6082d88f86abb63d02ac34e70873b58f88b0ddc) ) | |
| 874 | ROM_LOAD( "477a10.5n", 0x400000, 0x200000, CRC(8db31bd4) SHA1(d662d3bb6e8b44a01ffa158f5d7425454aad49a3) ) | |
| 875 | 875 | ROM_END |
| 876 | 876 | |
| 877 | 877 | ROM_START( windheat ) |
| r7553 | r7554 | |
| 895 | 895 | ROM_LOAD32_BYTE( "677a16.2h", 0x000003, 0x200000, CRC(7cc75539) SHA1(4bd8d88debf7489f30008bd4cbded67cb1a20ab0) ) |
| 896 | 896 | |
| 897 | 897 | ROM_REGION(0x600000, "shared", 0) /* Sound data */ |
| 898 | ROM_LOAD( "677a09.3r", 0x000000, 0x200000, CRC(4dfc1ea9) SHA1(4ab264c1902b522bc0589766e42f2b6ca276808d) ) | |
| 899 | ROM_LOAD( "677a10.5n", 0x200000, 0x200000, CRC(d8f77a68) SHA1(ff251863ef096f0864f6cbe6caa43b0aa299d9ee) ) | |
| 900 | ROM_LOAD( "677a08.5r", 0x400000, 0x200000, CRC(bde38850) SHA1(aaf1bdfc25ecdffc1f6076c9c1b2edbe263171d2) ) | |
| 898 | ROM_LOAD( "677a08.5r", 0x000000, 0x200000, CRC(bde38850) SHA1(aaf1bdfc25ecdffc1f6076c9c1b2edbe263171d2) ) | |
| 899 | ROM_LOAD( "677a09.3r", 0x200000, 0x200000, CRC(4dfc1ea9) SHA1(4ab264c1902b522bc0589766e42f2b6ca276808d) ) | |
| 900 | ROM_LOAD( "677a10.5n", 0x400000, 0x200000, CRC(d8f77a68) SHA1(ff251863ef096f0864f6cbe6caa43b0aa299d9ee) ) | |
| 901 | 901 | ROM_END |
| 902 | 902 | |
| 903 | 903 | ROM_START( windheatu ) |
| r7553 | r7554 | |
| 921 | 921 | ROM_LOAD32_BYTE( "677a16.2h", 0x000003, 0x200000, CRC(7cc75539) SHA1(4bd8d88debf7489f30008bd4cbded67cb1a20ab0) ) |
| 922 | 922 | |
| 923 | 923 | ROM_REGION(0x600000, "shared", 0) /* Sound data */ |
| 924 | ROM_LOAD( "677a09.3r", 0x000000, 0x200000, CRC(4dfc1ea9) SHA1(4ab264c1902b522bc0589766e42f2b6ca276808d) ) | |
| 925 | ROM_LOAD( "677a10.5n", 0x200000, 0x200000, CRC(d8f77a68) SHA1(ff251863ef096f0864f6cbe6caa43b0aa299d9ee) ) | |
| 926 | ROM_LOAD( "677a08.5r", 0x400000, 0x200000, CRC(bde38850) SHA1(aaf1bdfc25ecdffc1f6076c9c1b2edbe263171d2) ) | |
| 924 | ROM_LOAD( "677a08.5r", 0x000000, 0x200000, CRC(bde38850) SHA1(aaf1bdfc25ecdffc1f6076c9c1b2edbe263171d2) ) | |
| 925 | ROM_LOAD( "677a09.3r", 0x200000, 0x200000, CRC(4dfc1ea9) SHA1(4ab264c1902b522bc0589766e42f2b6ca276808d) ) | |
| 926 | ROM_LOAD( "677a10.5n", 0x400000, 0x200000, CRC(d8f77a68) SHA1(ff251863ef096f0864f6cbe6caa43b0aa299d9ee) ) | |
| 927 | 927 | ROM_END |
| 928 | 928 | |
| 929 | 929 | ROM_START( windheatj ) |
| r7553 | r7554 | |
| 947 | 947 | ROM_LOAD32_BYTE( "677a16.2h", 0x000003, 0x200000, CRC(7cc75539) SHA1(4bd8d88debf7489f30008bd4cbded67cb1a20ab0) ) |
| 948 | 948 | |
| 949 | 949 | ROM_REGION(0x600000, "shared", 0) /* Sound data */ |
| 950 | ROM_LOAD( "677a09.3r", 0x000000, 0x200000, CRC(4dfc1ea9) SHA1(4ab264c1902b522bc0589766e42f2b6ca276808d) ) | |
| 951 | ROM_LOAD( "677a10.5n", 0x200000, 0x200000, CRC(d8f77a68) SHA1(ff251863ef096f0864f6cbe6caa43b0aa299d9ee) ) | |
| 952 | ROM_LOAD( "677a08.5r", 0x400000, 0x200000, CRC(bde38850) SHA1(aaf1bdfc25ecdffc1f6076c9c1b2edbe263171d2) ) | |
| 950 | ROM_LOAD( "677a08.5r", 0x000000, 0x200000, CRC(bde38850) SHA1(aaf1bdfc25ecdffc1f6076c9c1b2edbe263171d2) ) | |
| 951 | ROM_LOAD( "677a09.3r", 0x200000, 0x200000, CRC(4dfc1ea9) SHA1(4ab264c1902b522bc0589766e42f2b6ca276808d) ) | |
| 952 | ROM_LOAD( "677a10.5n", 0x400000, 0x200000, CRC(d8f77a68) SHA1(ff251863ef096f0864f6cbe6caa43b0aa299d9ee) ) | |
| 953 | 953 | ROM_END |
| 954 | 954 | |
| 955 | ROM_START( | |
| 955 | ROM_START( | |
| 956 | 956 | ROM_REGION(0x200000, "user1", 0) /* PowerPC program roms */ |
| 957 | 957 | ROM_LOAD32_BYTE( "678uab01.20u", 0x000003, 0x080000, CRC(a9b9ceed) SHA1(36f0d18481d7c3e7358e02473e54bc6b52d5c26b) ) |
| 958 | 958 | ROM_LOAD32_BYTE( "678uab02.17u", 0x000002, 0x080000, CRC(5ed24ac8) SHA1(d659c751558d4f8d89314466a37c04ac2df46879) ) |
| r7553 | r7554 | |
| 967 | 967 | ROM_LOAD32_WORD_SWAP( "685a06.8u", 0x000002, 0x200000, CRC(fc98c6a5) SHA1(a84583bb7296fa9e0c284b2ac59e2dc7b2689eee) ) |
| 968 | 968 | |
| 969 | 969 | ROM_REGION(0x800000, "gfx1", 0) /* Texture data */ |
| 970 | ROM_LOAD64_WORD( "678a13.18d", 0x000000, 0x200000, CRC(ccf75722) SHA1(f48d21dfc4f82adbb4c9c841a809267cfd028a3d) ) | |
| 971 | ROM_LOAD64_WORD( "678a14.13d", 0x000002, 0x200000, CRC(333a1ab4) SHA1(79df4a98b7871eba4157307a7709da8f8b5da39b) ) | |
| 972 | ROM_LOAD64_WORD( "678a15.9d", 0x000004, 0x200000, CRC(58b670f8) SHA1(5d4facb00e34de3ad11ed60c19835918a9cf6cb9) ) | |
| 973 | ROM_LOAD64_WORD( "678a16.4d", 0x000006, 0x200000, CRC(137b9bff) SHA1(5052c1fa30cc1d6affd78f48d483415dca89d10b) ) | |
| 970 | ROM_LOAD32_BYTE( "678a13.18d", 0x000000, 0x200000, CRC(ccf75722) SHA1(f48d21dfc4f82adbb4c9c841a809267cfd028a3d) ) | |
| 971 | ROM_LOAD32_BYTE( "678a14.13d", 0x000001, 0x200000, CRC(333a1ab4) SHA1(79df4a98b7871eba4157307a7709da8f8b5da39b) ) | |
| 972 | ROM_LOAD32_BYTE( "678a15.9d", 0x000002, 0x200000, CRC(58b670f8) SHA1(5d4facb00e34de3ad11ed60c19835918a9cf6cb9) ) | |
| 973 | ROM_LOAD32_BYTE( "678a16.4d", 0x000003, 0x200000, CRC(137b9bff) SHA1(5052c1fa30cc1d6affd78f48d483415dca89d10b) ) | |
| 974 | 974 | |
| 975 | 975 | ROM_REGION(0x600000, "shared", 0) /* Sound data */ |
| 976 | ROM_LOAD( "678a09.3r", 0x000000, 0x200000, CRC(39baef23) SHA1(9f7bda0f9c06eee94703f9ceb06975c8e28338cc) ) | |
| 977 | ROM_LOAD( "678a10.5n", 0x200000, 0x200000, CRC(0508280e) SHA1(a36c5dc377b0ba597f131bd9dfc6019e7fc2d243) ) | |
| 978 | ROM_LOAD( "678a08.5r", 0x400000, 0x200000, CRC(4aeb61ad) SHA1(ec6872cb2e4776849963f48c1c245ca7697849e0) ) | |
| 976 | ROM_LOAD( "678a08.5r", 0x000000, 0x200000, CRC(4aeb61ad) SHA1(ec6872cb2e4776849963f48c1c245ca7697849e0) ) | |
| 977 | ROM_LOAD( "678a09.3r", 0x200000, 0x200000, CRC(39baef23) SHA1(9f7bda0f9c06eee94703f9ceb06975c8e28338cc) ) | |
| 978 | ROM_LOAD( "678a10.5n", 0x400000, 0x200000, CRC(0508280e) SHA1(a36c5dc377b0ba597f131bd9dfc6019e7fc2d243) ) | |
| 979 | 979 | ROM_END |
| 980 | 980 | |
| 981 | 981 | /*****************************************************************************/ |
| r7553 | r7554 | |
| 984 | 984 | GAME( 1996, windheat, 0, zr107, windheat, zr107, ROT0, "Konami", "Winding Heat (EAA, Euro v2.11)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 985 | 985 | GAME( 1996, windheatu,windheat, zr107, windheat, zr107, ROT0, "Konami", "Winding Heat (UBC, USA v2.22)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 986 | 986 | GAME( 1996, windheatj,windheat, zr107, windheat, zr107, ROT0, "Konami", "Winding Heat (JAA, JPN v2.11)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 987 | GAME( 1996, | |
| 987 | GAME( 1996, |
| r7553 | r7554 | |
|---|---|---|
| 578 | 578 | - Added a external default NVRAM for Jolly Card Professional 2.0. |
| 579 | 579 | - Updated technical notes. |
| 580 | 580 | |
| 581 | [2010/03/09] | |
| 582 | - Added external default NVRAM support to the following games: | |
| 583 | bottle10, bottl10b, elephfam, elephfmb, jollycrd, jolyc3x3, | |
| 584 | jolyccra, jolyccrb, jolycdev, jolycdib, jolycdit, jolyjokr, | |
| 585 | jolyjokra, jolyjokrb, lluck3x3, lluck4x1, magicrd2, pool10, | |
| 586 | pool10b, pool10c, pool10d, potgame, royalcrd, royalcdb, | |
| 587 | sjcd2kx3, tortufam, vegasfst, vegasfte and vegasslw. | |
| 588 | - Changed default settings for some games, now that NVRAM is | |
| 589 | loaded externally. | |
| 581 | 590 | |
| 591 | ||
| 582 | 592 | *** TO DO *** |
| 583 | 593 | |
| 584 | 594 | - Figure out the royalcdc & jokercrd encryption. |
| r7553 | r7554 | |
| 802 | 812 | |
| 803 | 813 | /* after nvram init, set the following one to 'manual' |
| 804 | 814 | to allow the remote credits mode to work */ |
| 805 | PORT_DIPNAME( 0x80, 0x | |
| 815 | PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") | |
| 806 | 816 | PORT_DIPSETTING( 0x00, "Hopper" ) |
| 807 | 817 | PORT_DIPSETTING( 0x80, "Manual Payout SW" ) |
| 808 | 818 | INPUT_PORTS_END |
| r7553 | r7554 | |
| 863 | 873 | |
| 864 | 874 | /* after nvram init, set the following one to 'manual' |
| 865 | 875 | to allow the remote credits mode to work */ |
| 866 | PORT_DIPNAME( 0x80, 0x | |
| 876 | PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") | |
| 867 | 877 | PORT_DIPSETTING( 0x00, "Hopper" ) |
| 868 | 878 | PORT_DIPSETTING( 0x80, "Manual Payout SW" ) |
| 869 | 879 | INPUT_PORTS_END |
| r7553 | r7554 | |
| 923 | 933 | |
| 924 | 934 | /* after nvram init, set the following one to 'manual' |
| 925 | 935 | to allow the remote credits mode to work */ |
| 926 | PORT_DIPNAME( 0x80, 0x | |
| 936 | PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") | |
| 927 | 937 | PORT_DIPSETTING( 0x00, "Hopper" ) |
| 928 | 938 | PORT_DIPSETTING( 0x80, "Manual Payout SW" ) |
| 929 | 939 | INPUT_PORTS_END |
| r7553 | r7554 | |
| 984 | 994 | |
| 985 | 995 | /* after nvram init, set the following one to 'manual' |
| 986 | 996 | to allow the remote credits mode to work */ |
| 987 | PORT_DIPNAME( 0x80, 0x | |
| 997 | PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") | |
| 988 | 998 | PORT_DIPSETTING( 0x00, "Hopper" ) |
| 989 | 999 | PORT_DIPSETTING( 0x80, "Manual Payout SW" ) |
| 990 | 1000 | INPUT_PORTS_END |
| r7553 | r7554 | |
| 1773 | 1783 | ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) |
| 1774 | 1784 | ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) |
| 1775 | 1785 | |
| 1776 | ROM_REGION( 0x0200, "proms", 0 ) | |
| 1777 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) | |
| 1778 | ROM_END | |
| 1786 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 1787 | ROM_LOAD( "jollycrd_nvram.bin", 0x0000, 0x0800, CRC(8f0a86c9) SHA1(467bd4f601ac6aa818c036f1269c2d43d27854f6) ) | |
| 1779 | 1788 | |
| 1780 | ||
| 1781 | ROM_START( jolycdae ) /* encrypted roms...*/ | |
| 1782 | ROM_REGION( 0x18000, "maincpu", 0 ) | |
| 1783 | ROM_LOAD( "pokeru0.bin", 0x8000, 0x10000, CRC(7732f177) SHA1(b75fca596a7315d1379fa5bcf07c449ec32c90f5) ) | |
| 1784 | ||
| 1785 | ROM_REGION( 0x20000, "gfx1", 0 ) | |
| 1786 | ROM_LOAD( "pokeru1.bin", 0x00000, 0x10000, CRC(878d695b) SHA1(0e1ea455e991e591316a340c56b23fa26764988d) ) | |
| 1787 | ROM_LOAD( "pokeru2.bin", 0x10000, 0x10000, CRC(b7b2946a) SHA1(25b15296b32bf88db6d60991105bba667f7940cc) ) | |
| 1788 | ROM_COPY( "gfx1", 0x10000, 0x00000, 0x8000 ) /* rgn, srcoffset, offset, length */ | |
| 1789 | ||
| 1790 | 1789 | ROM_REGION( 0x0200, "proms", 0 ) |
| 1791 | 1790 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1792 | 1791 | ROM_END |
| r7553 | r7554 | |
| 1800 | 1799 | ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) |
| 1801 | 1800 | ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) |
| 1802 | 1801 | |
| 1802 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 1803 | ROM_LOAD( "jolyc3x3_nvram.bin", 0x0000, 0x0800, CRC(727c70cf) SHA1(3639b0891514064e21ebdb280791cc9c8f5ba481) ) | |
| 1804 | ||
| 1803 | 1805 | ROM_REGION( 0x0200, "proms", 0 ) |
| 1804 | 1806 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1805 | 1807 | ROM_END |
| r7553 | r7554 | |
| 1824 | 1826 | inputs correlated to a code that pops up on the screen. |
| 1825 | 1827 | This code should be inserted into a PC-DOS program, that program is nowhere to be found right now. |
| 1826 | 1828 | */ |
| 1827 | ROM_REGION( 0x0800, "nvram", 0 ) | |
| 1828 | ROM_LOAD( "jolyc980_nv.bin", 0x0000, 0x0800, CRC(c917f071) SHA1(fdcd974d3acd4acf2e0ff5fca820cfc65fe18867) ) /* default NVRAM */ | |
| 1829 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 1830 | ROM_LOAD( "jolyc980_nvram.bin", 0x0000, 0x0800, CRC(c917f071) SHA1(fdcd974d3acd4acf2e0ff5fca820cfc65fe18867) ) | |
| 1829 | 1831 | |
| 1830 | 1832 | ROM_REGION( 0x0200, "proms", 0 ) |
| 1831 | 1833 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| r7553 | r7554 | |
| 1840 | 1842 | ROM_LOAD( "jollyb.bin", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) |
| 1841 | 1843 | ROM_LOAD( "jollya.bin", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) |
| 1842 | 1844 | |
| 1845 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 1846 | ROM_LOAD( "jolycdev_nvram.bin", 0x0000, 0x0800, CRC(ae2c2fb8) SHA1(912d673ea8e26ff62520a7b86e702e5260cff4c0) ) | |
| 1847 | ||
| 1843 | 1848 | ROM_REGION( 0x0200, "proms", 0 ) |
| 1844 | 1849 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1845 | 1850 | |
| r7553 | r7554 | |
| 1871 | 1876 | ROM_LOAD( "jollyb.bin", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) |
| 1872 | 1877 | ROM_LOAD( "jollya.bin", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) |
| 1873 | 1878 | |
| 1879 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 1880 | ROM_LOAD( "jolyccra_nvram.bin", 0x0000, 0x0800, CRC(478ab0a9) SHA1(8c5160d2ac8d4a9db0ae1e478d3bb1513a04544f) ) | |
| 1881 | ||
| 1874 | 1882 | ROM_REGION( 0x0200, "proms", 0 ) |
| 1875 | 1883 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1876 | 1884 | ROM_END |
| r7553 | r7554 | |
| 1884 | 1892 | ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) |
| 1885 | 1893 | ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) |
| 1886 | 1894 | |
| 1895 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 1896 | ROM_LOAD( "jolyccrb_nvram.bin", 0x0000, 0x0800, CRC(c1d49c88) SHA1(27ffdedfc7f09ff11c3b2537db3681473b776074) ) | |
| 1897 | ||
| 1887 | 1898 | ROM_REGION( 0x0200, "proms", 0 ) |
| 1888 | 1899 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1889 | 1900 | ROM_END |
| r7553 | r7554 | |
| 1919 | 1930 | ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(46805150) SHA1(63687ac44f6ace6d8924b2629536bcc7d3979ed2) ) |
| 1920 | 1931 | ROM_LOAD( "1.bin", 0x8000, 0x8000, CRC(43bcb2df) SHA1(5022bc3a0b852a7cd433e25c3c90a720e6328261) ) |
| 1921 | 1932 | |
| 1933 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 1934 | ROM_LOAD( "jolycdit_nvram.bin", 0x0000, 0x0800, CRC(c55c6706) SHA1(a38ae926f057fb47e48ca841b2d097fc4fd06416) ) | |
| 1935 | ||
| 1922 | 1936 | ROM_REGION( 0x0200, "proms", 0 ) |
| 1923 | 1937 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1924 | 1938 | |
| r7553 | r7554 | |
| 1963 | 1977 | ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(46805150) SHA1(63687ac44f6ace6d8924b2629536bcc7d3979ed2) ) |
| 1964 | 1978 | ROM_LOAD( "1.bin", 0x8000, 0x8000, CRC(43bcb2df) SHA1(5022bc3a0b852a7cd433e25c3c90a720e6328261) ) |
| 1965 | 1979 | |
| 1980 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 1981 | ROM_LOAD( "jolycdib_nvram.bin", 0x0000, 0x0800, CRC(038a71fe) SHA1(99d3befbee8f9f86ce7f074de7f16fb25053c077) ) | |
| 1982 | ||
| 1966 | 1983 | ROM_REGION( 0x0200, "proms", 0 ) |
| 1967 | 1984 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1968 | 1985 | |
| r7553 | r7554 | |
| 1979 | 1996 | ROM_LOAD( "sj2.bin", 0x0000, 0x8000, CRC(d7253325) SHA1(ad40e662519da9b11f77690b7d41c5007f74e280) ) |
| 1980 | 1997 | ROM_LOAD( "sj1.bin", 0x8000, 0x8000, CRC(82741749) SHA1(d0bf3073dff9ba1c4913fd754f965951e9cb5b03) ) |
| 1981 | 1998 | |
| 1999 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2000 | ROM_LOAD( "sjcd2kx3_nvram.bin", 0x0000, 0x0800, CRC(1141368b) SHA1(b4af2d59b5e8115440e1219a621cfd2fb8c2c978) ) | |
| 2001 | ||
| 1982 | 2002 | ROM_REGION( 0x0200, "proms", 0 ) |
| 1983 | 2003 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1984 | 2004 | |
| r7553 | r7554 | |
| 2094 | 2114 | ROM_LOAD( "cuore1b.u21", 0x0000, 0x8000, CRC(14eca2b8) SHA1(35cba415800c6cd3e6ed9946057f33510ad2bfc9) ) |
| 2095 | 2115 | ROM_LOAD( "cuore1c.u22", 0x8000, 0x8000, CRC(253fac84) SHA1(1ad104ab8e8d73df6397a840a4b26565b245d7a3) ) |
| 2096 | 2116 | |
| 2117 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2118 | ROM_LOAD( "cuoreuno_nvram.bin", 0x0000, 0x0800, CRC(b5a1bf25) SHA1(c2996a28c080debf10ab7a7dc47c305aed172a83) ) | |
| 2119 | ||
| 2097 | 2120 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2098 | 2121 | ROM_LOAD( "am27s29_cu.bin", 0x0000, 0x0200, CRC(7ea61749) SHA1(3167acd79f9bda2078c2af3e049ad6abf160aeae) ) |
| 2099 | 2122 | |
| r7553 | r7554 | |
| 2133 | 2156 | ROM_LOAD( "eleph_b.u21", 0x10000, 0x10000, CRC(e3612670) SHA1(beb65f7d2bd6d7bc68cfd876af51910cf6417bd0) ) |
| 2134 | 2157 | ROM_COPY( "gfx1", 0x10000, 0x00000, 0x8000 ) /* rgn, srcoffset, offset, length */ |
| 2135 | 2158 | |
| 2159 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2160 | ROM_LOAD( "elephfam_nvram.bin", 0x0000, 0x0800, CRC(fb9b1100) SHA1(cf15ce55042f1c4399fec480c2f862622905a8b5) ) | |
| 2161 | ||
| 2136 | 2162 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2137 | 2163 | ROM_LOAD( "am27s29_ef.u25", 0x0000, 0x0200, CRC(bca8b82a) SHA1(4aa19f5ecd9953bf8792dceb075a746f77c01cfc) ) |
| 2138 | 2164 | |
| r7553 | r7554 | |
| 2151 | 2177 | ROM_LOAD( "elephb.u21", 0x0000, 0x8000, CRC(3c60549c) SHA1(c839b3ea415a877e5eac04e0522c342cce8d6e64) ) |
| 2152 | 2178 | ROM_LOAD( "elephc.u20", 0x8000, 0x8000, CRC(448ba955) SHA1(2785cbc8cd42a7dda85bd8b81d5fbec01a1ba0bd) ) |
| 2153 | 2179 | |
| 2180 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2181 | ROM_LOAD( "elephfmb_nvram.bin", 0x0000, 0x0800, CRC(13a0cfea) SHA1(9c8ce509ef1076e88ea853347b64c5591bc2e18c) ) | |
| 2182 | ||
| 2154 | 2183 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2155 | 2184 | ROM_LOAD( "am27s29_ef.u25", 0x0000, 0x0200, CRC(bca8b82a) SHA1(4aa19f5ecd9953bf8792dceb075a746f77c01cfc) ) |
| 2156 | 2185 | |
| r7553 | r7554 | |
| 2267 | 2296 | ROM_LOAD( "2.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) |
| 2268 | 2297 | ROM_LOAD( "1.u20", 0x8000, 0x8000, CRC(9abedd0c) SHA1(f184a82e8ec2387069d631bcb77e890acd44b3f5) ) |
| 2269 | 2298 | |
| 2299 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2300 | ROM_LOAD( "pool10_nvram.bin", 0x0000, 0x0800, CRC(2f2fab43) SHA1(f815b70c171bad99fa6a60c256e4fdc85dd6b290) ) | |
| 2301 | ||
| 2270 | 2302 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2271 | 2303 | ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) |
| 2272 | 2304 | |
| r7553 | r7554 | |
| 2287 | 2319 | ROM_LOAD( "u21.bin", 0x10000, 0x10000, CRC(581c4878) SHA1(5ae61af090feea1745e22f46b33b2c01e6013fbe) ) |
| 2288 | 2320 | ROM_COPY( "gfx1", 0x10000, 0x00000, 0x8000 ) /* rgn, srcoffset, offset, length */ |
| 2289 | 2321 | |
| 2322 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2323 | ROM_LOAD( "pool10b_nvram.bin", 0x0000, 0x0800, CRC(d9f35299) SHA1(2c3608bc9c322a9cc86f74d8fa2f660804a8cf3c) ) | |
| 2324 | ||
| 2290 | 2325 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2291 | 2326 | ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) |
| 2292 | 2327 | |
| r7553 | r7554 | |
| 2305 | 2340 | ROM_LOAD( "b.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) |
| 2306 | 2341 | ROM_LOAD( "c.u20", 0x8000, 0x8000, CRC(9abedd0c) SHA1(f184a82e8ec2387069d631bcb77e890acd44b3f5) ) |
| 2307 | 2342 | |
| 2343 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2344 | ROM_LOAD( "pool10c_nvram.bin", 0x0000, 0x0800, CRC(396aefed) SHA1(066b87ff054dfb37f733a812ad0dc1b1bd2478e6) ) | |
| 2345 | ||
| 2308 | 2346 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2309 | 2347 | ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) |
| 2310 | 2348 | |
| r7553 | r7554 | |
| 2323 | 2361 | ROM_LOAD( "2.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) |
| 2324 | 2362 | ROM_LOAD( "1.u20", 0x8000, 0x8000, CRC(9abedd0c) SHA1(f184a82e8ec2387069d631bcb77e890acd44b3f5) ) |
| 2325 | 2363 | |
| 2364 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2365 | ROM_LOAD( "pool10d_nvram.bin", 0x0000, 0x0800, CRC(6b5984a0) SHA1(156a94e74e33b1a15222cffff9b62e65f6f5f2f5) ) | |
| 2366 | ||
| 2326 | 2367 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2327 | 2368 | ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) |
| 2328 | 2369 | |
| r7553 | r7554 | |
| 2362 | 2403 | ROM_LOAD( "tortu.b.u21", 0x0000, 0x8000, CRC(e7b18584) SHA1(fa1c367469d4ced5d7c83c15a25ec5fd6afcca10) ) |
| 2363 | 2404 | ROM_LOAD( "tortu.c.u20", 0x8000, 0x8000, CRC(3cda6f73) SHA1(b4f3d2d3c652ebf6973358ae33b7808de5939acd) ) |
| 2364 | 2405 | |
| 2406 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2407 | ROM_LOAD( "tortufam_nvram.bin", 0x0000, 0x0800, CRC(e5a08b1b) SHA1(6575ed3ec66ef0e42129225fe1679519e5e1c946) ) | |
| 2408 | ||
| 2365 | 2409 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2366 | 2410 | ROM_LOAD( "am27s29pc_tf.u25", 0x0000, 0x0200, CRC(c6d433fb) SHA1(065de832bbe8765eb0aacc2029e587a4f5362f8a) ) |
| 2367 | 2411 | |
| r7553 | r7554 | |
| 2380 | 2424 | ROM_LOAD( "potg.b.u21", 0x0000, 0x8000, CRC(32fc1d4f) SHA1(cc533a44498338bc0cbb7c7b9c42559ce7ff1337) ) |
| 2381 | 2425 | ROM_LOAD( "potg.c.u20", 0x8000, 0x8000, CRC(0331eb42) SHA1(a8e838d644fc6d93a9632070b305e44e4242ce94) ) |
| 2382 | 2426 | |
| 2427 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2428 | ROM_LOAD( "potgame_nvram.bin", 0x0000, 0x0800, CRC(2b07fb37) SHA1(9cbd3d8fb076d683a7853b3dd8a39a27f1c8872b) ) | |
| 2429 | ||
| 2383 | 2430 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2384 | 2431 | ROM_LOAD( "am27s29_pot.u25", 0x0000, 0x0200, CRC(a221f151) SHA1(270c57c9b7de912b136686bc6720eb8f12dbb805) ) |
| 2385 | 2432 | |
| r7553 | r7554 | |
| 2398 | 2445 | ROM_LOAD( "boat_2.bin", 0x0000, 0x8000, CRC(a6b36c3f) SHA1(90b12d9552ad5dbf11a30fc7451da1f3e6763cc3) ) |
| 2399 | 2446 | ROM_LOAD( "boat_1.bin", 0x8000, 0x8000, CRC(61fd8c19) SHA1(eb8fd8bd7de38a6c8a435e9e36daf699162138a5) ) |
| 2400 | 2447 | |
| 2448 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2449 | ROM_LOAD( "bottle10_nvram.bin", 0x0000, 0x0800, CRC(82927c53) SHA1(8cde91588cb53fefc84f0b14fc5c0b26a3a445eb) ) | |
| 2450 | ||
| 2401 | 2451 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2402 | 2452 | ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) |
| 2403 | 2453 | |
| r7553 | r7554 | |
| 2416 | 2466 | ROM_LOAD( "2.u21", 0x0000, 0x8000, CRC(9395c15b) SHA1(e4caefc6f55b07f5c4370a3b8652fa93e08987ce) ) |
| 2417 | 2467 | ROM_LOAD( "1.u20", 0x8000, 0x8000, CRC(61fd8c19) SHA1(eb8fd8bd7de38a6c8a435e9e36daf699162138a5) ) |
| 2418 | 2468 | |
| 2469 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2470 | ROM_LOAD( "bottl10b_nvram.bin", 0x0000, 0x0800, CRC(59976182) SHA1(f8d26169e86444607bc5a6649f41e7f5c05ddbb4) ) | |
| 2471 | ||
| 2419 | 2472 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2420 | 2473 | ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) |
| 2421 | 2474 | |
| r7553 | r7554 | |
| 2459 | 2512 | ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(85e77661) SHA1(7d7a765c1bfcfeb9eb91d2519b22d734f20eab24) ) |
| 2460 | 2513 | ROM_LOAD( "1.bin", 0x8000, 0x8000, CRC(41f7a0b3) SHA1(9aff2b8832d2a4f868daa9849a0bfe5e44f88fc0) ) |
| 2461 | 2514 | |
| 2515 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2516 | ROM_LOAD( "royalcrd_nvram.bin", 0x0000, 0x0800, CRC(335bfa5a) SHA1(7e9cbb502f450c515ea03ffcf4b7fbae60af4e73) ) | |
| 2517 | ||
| 2462 | 2518 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2463 | 2519 | ROM_LOAD( "n82s147.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) |
| 2464 | 2520 | |
| r7553 | r7554 | |
| 2498 | 2554 | ROM_LOAD( "2a.bin", 0x10000, 0x10000, CRC(3af71cf8) SHA1(3a0ce0d0abebf386573c5936545dada1d3558e55) ) |
| 2499 | 2555 | ROM_COPY( "gfx1", 0x10000, 0x00000, 0x8000 ) /* rgn, srcoffset, offset, length */ |
| 2500 | 2556 | |
| 2557 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2558 | ROM_LOAD( "royalcdb_nvram.bin", 0x0000, 0x0800, CRC(3b03440f) SHA1(49e51b8c9e1404d39c479a2d0619aab43f1a6529) ) | |
| 2559 | ||
| 2501 | 2560 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2502 | 2561 | ROM_LOAD( "n82s147.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) |
| 2503 | 2562 | |
| r7553 | r7554 | |
| 2571 | 2630 | ROM_LOAD( "l2.bin", 0x0000, 0x8000, CRC(8ca90a8f) SHA1(bc3db3f8c097f89eff488e3aca39bf24ff2b5cff) ) |
| 2572 | 2631 | ROM_LOAD( "l1.bin", 0x8000, 0x8000, CRC(beadc35c) SHA1(8a6a5954a827def8c4c3b904d8ee58a4bde53d85) ) |
| 2573 | 2632 | |
| 2633 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2634 | ROM_LOAD( "lluck3x3_nvram.bin", 0x0000, 0x0800, CRC(2fe79cff) SHA1(7839c04336b7702c7bdcd2b6917a353f4376f824) ) | |
| 2635 | ||
| 2574 | 2636 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2575 | 2637 | ROM_LOAD( "n82s147.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) |
| 2576 | 2638 | ROM_END |
| r7553 | r7554 | |
| 2584 | 2646 | ROM_LOAD( "l2.bin", 0x0000, 0x8000, CRC(8ca90a8f) SHA1(bc3db3f8c097f89eff488e3aca39bf24ff2b5cff) ) |
| 2585 | 2647 | ROM_LOAD( "l1.bin", 0x8000, 0x8000, CRC(beadc35c) SHA1(8a6a5954a827def8c4c3b904d8ee58a4bde53d85) ) |
| 2586 | 2648 | |
| 2649 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2650 | ROM_LOAD( "lluck4x1_nvram.bin", 0x0000, 0x0800, CRC(05d2d7b8) SHA1(1188b2b4835cadd95b1e9160c2948a2e3457afd2) ) | |
| 2651 | ||
| 2587 | 2652 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2588 | 2653 | ROM_LOAD( "n82s147.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) |
| 2589 | 2654 | ROM_END |
| r7553 | r7554 | |
| 2613 | 2678 | ROM_LOAD( "mc2gr2.bin", 0x0000, 0x8000, CRC(733da697) SHA1(45122c64d5a371ec91cecc67b7faf179078e714d) ) |
| 2614 | 2679 | ROM_LOAD( "mc2gr1.bin", 0x8000, 0x8000, CRC(2406b8d2) SHA1(e9d7a25562fd5adee351d7ef6ba02fff6aab021a) ) |
| 2615 | 2680 | |
| 2681 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2682 | ROM_LOAD( "magicrd2_nvram.bin", 0x0000, 0x0800, CRC(343b3162) SHA1(1524959dbbc0c6d7c5c3a4a6b20976382cfbe88f) ) | |
| 2683 | ||
| 2616 | 2684 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2617 | 2685 | ROM_LOAD( "mc2-82s147.bin", 0x0000, 0x0200, CRC(aa91cc35) SHA1(79f9a755441500e618c4183f524f969fffd44100) ) |
| 2618 | 2686 | |
| r7553 | r7554 | |
| 2663 | 2731 | ROM_LOAD( "v2.bin", 0x0000, 0x8000, CRC(af7ab460) SHA1(01ea400424152c09c10eb83a1bd569019969ccb7) ) |
| 2664 | 2732 | ROM_LOAD( "v1.bin", 0x8000, 0x8000, CRC(23e0d1c6) SHA1(98967b14d3264c444a1dfbd15c57cde70f41f09d) ) |
| 2665 | 2733 | |
| 2734 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2735 | ROM_LOAD( "vegasslw_nvram.bin", 0x0000, 0x0800, CRC(59b84075) SHA1(964531320d29adc42c3d8f0a28df395354a51d9b) ) | |
| 2736 | ||
| 2666 | 2737 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2667 | 2738 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 2668 | 2739 | ROM_END |
| r7553 | r7554 | |
| 2676 | 2747 | ROM_LOAD( "v2.bin", 0x0000, 0x8000, CRC(af7ab460) SHA1(01ea400424152c09c10eb83a1bd569019969ccb7) ) |
| 2677 | 2748 | ROM_LOAD( "v1.bin", 0x8000, 0x8000, CRC(23e0d1c6) SHA1(98967b14d3264c444a1dfbd15c57cde70f41f09d) ) |
| 2678 | 2749 | |
| 2750 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2751 | ROM_LOAD( "vegasfst_nvram.bin", 0x0000, 0x0800, CRC(627d13d7) SHA1(03ac605c589c645b672c57b0695dcb90240068e1) ) | |
| 2752 | ||
| 2679 | 2753 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2680 | 2754 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 2681 | 2755 | ROM_END |
| r7553 | r7554 | |
| 2689 | 2763 | ROM_LOAD( "ch2.bin", 0x0000, 0x8000, CRC(af7ab460) SHA1(01ea400424152c09c10eb83a1bd569019969ccb7) ) |
| 2690 | 2764 | ROM_LOAD( "ch1.bin", 0x8000, 0x8000, CRC(0a3679c0) SHA1(ce8a067e1a2eccf9fabb16733ef3a14e0e8129e5) ) /* X & Y in txt layer */ |
| 2691 | 2765 | |
| 2766 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2767 | ROM_LOAD( "vegasfte_nvram.bin", 0x0000, 0x0800, CRC(c09e49a2) SHA1(e95f444f1bfda0a2f2af6045f6079e16f13d244d) ) | |
| 2768 | ||
| 2692 | 2769 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2693 | 2770 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 2694 | 2771 | ROM_END |
| r7553 | r7554 | |
| 2784 | 2861 | ROM_LOAD( "impera2.bin", 0x0000, 0x8000, CRC(f0fa5941) SHA1(1fcade31ed6893ffcfd4efe97dfaaa31d24283ec) ) |
| 2785 | 2862 | ROM_LOAD( "impera1.bin", 0x8000, 0x8000, CRC(c3ab44dd) SHA1(e46c0fd94da561f57033647f1703fa135777ece5) ) |
| 2786 | 2863 | |
| 2864 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2865 | ROM_LOAD( "jolyjokr_nvram.bin", 0x0000, 0x0800, CRC(f33e66ed) SHA1(7a4b9a1b2f976d5d26f54915a213d5ac5eca0a42) ) | |
| 2866 | ||
| 2787 | 2867 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2788 | 2868 | ROM_LOAD( "am27s29.bin", 0x0000, 0x0200, CRC(0b671bba) SHA1(92d512e02b50f98b7bc5a60deee4fee722656c4f) ) |
| 2789 | 2869 | ROM_END |
| r7553 | r7554 | |
| 2797 | 2877 | ROM_LOAD( "impera2.bin", 0x0000, 0x8000, CRC(f0fa5941) SHA1(1fcade31ed6893ffcfd4efe97dfaaa31d24283ec) ) |
| 2798 | 2878 | ROM_LOAD( "impera1.bin", 0x8000, 0x8000, CRC(c3ab44dd) SHA1(e46c0fd94da561f57033647f1703fa135777ece5) ) |
| 2799 | 2879 | |
| 2880 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2881 | ROM_LOAD( "jolyjokra_nvram.bin", 0x0000, 0x0800, CRC(ed43693c) SHA1(d4aa4e539ab12c97bc9b9b1077997195a11d782b) ) | |
| 2882 | ||
| 2800 | 2883 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2801 | 2884 | ROM_LOAD( "am27s29.bin", 0x0000, 0x0200, CRC(0b671bba) SHA1(92d512e02b50f98b7bc5a60deee4fee722656c4f) ) |
| 2802 | 2885 | ROM_END |
| r7553 | r7554 | |
| 2828 | 2911 | ROM_LOAD( "ic26.bin", 0x10000, 0x10000, CRC(3e45dfc6) SHA1(8fd0b0cc00cdd96244ae7e7a91f6613b1c144ee0) ) |
| 2829 | 2912 | ROM_COPY( "gfx1", 0x10000, 0x00000, 0x8000 ) /* rgn, srcoffset, offset, length */ |
| 2830 | 2913 | |
| 2914 | ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ | |
| 2915 | ROM_LOAD( "jolyjokrb_nvram.bin", 0x0000, 0x0800, CRC(17007bb5) SHA1(72e08096293ce4fbde205a63b5ecd9641dbee017) ) | |
| 2916 | ||
| 2831 | 2917 | ROM_REGION( 0x0200, "proms", 0 ) |
| 2832 | 2918 | ROM_LOAD( "am27s29_ic40.bin", 0x0000, 0x0200, CRC(0b671bba) SHA1(92d512e02b50f98b7bc5a60deee4fee722656c4f) ) |
| 2833 | 2919 | ROM_END |
| r7553 | r7554 | |
|---|---|---|
| 595 | 595 | |
| 596 | 596 | ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ |
| 597 | 597 | ROM_LOAD( "065-a06.1f", 0x000000, 0x200000, CRC(5adbcee0) SHA1(435feda697193bc51db80eba46be474cbbc1de4b) ) |
| 598 | ||
| 599 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 600 | ROM_LOAD( "xmen_ubb.nv", 0x0000, 0x0080, CRC(52f334ba) SHA1(171c22b5ac41bcbbcfc31528cf49c096f6829a72) ) | |
| 598 | 601 | ROM_END |
| 599 | 602 | |
| 600 | 603 | ROM_START( xmenj ) |
| r7553 | r7554 | |
| 620 | 623 | |
| 621 | 624 | ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ |
| 622 | 625 | ROM_LOAD( "065-a06.1f", 0x000000, 0x200000, CRC(5adbcee0) SHA1(435feda697193bc51db80eba46be474cbbc1de4b) ) |
| 626 | ||
| 627 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 628 | ROM_LOAD( "xmen_jba.nv", 0x0000, 0x0080, CRC(7439cea7) SHA1(d34b8ed0549b0457362159098e5c86b1356e35d0) ) | |
| 623 | 629 | ROM_END |
| 624 | 630 | |
| 625 | 631 | ROM_START( xmene ) |
| r7553 | r7554 | |
| 645 | 651 | |
| 646 | 652 | ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ |
| 647 | 653 | ROM_LOAD( "065-a06.1f", 0x000000, 0x200000, CRC(5adbcee0) SHA1(435feda697193bc51db80eba46be474cbbc1de4b) ) |
| 654 | ||
| 655 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 656 | ROM_LOAD( "xmen_eba.nv", 0x0000, 0x0080, CRC(37f8e77a) SHA1(0b92caba33486c6fd104806aa96f735743bb2221) ) | |
| 648 | 657 | ROM_END |
| 649 | 658 | |
| 650 | 659 | ROM_START( xmen2pe ) |
| r7553 | r7554 | |
| 670 | 679 | |
| 671 | 680 | ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ |
| 672 | 681 | ROM_LOAD( "065-a06.1f", 0x000000, 0x200000, CRC(5adbcee0) SHA1(435feda697193bc51db80eba46be474cbbc1de4b) ) |
| 682 | ||
| 683 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 684 | ROM_LOAD( "xmen_eaa.nv", 0x0000, 0x0080, CRC(1cbcb653) SHA1(a86b4ad34ccbd868662ff8c61eb21ec07e8bf8b1) ) | |
| 673 | 685 | ROM_END |
| 674 | 686 | |
| 675 | 687 | ROM_START( xmen2pa ) |
| r7553 | r7554 | |
| 695 | 707 | |
| 696 | 708 | ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ |
| 697 | 709 | ROM_LOAD( "065-a06.1f", 0x000000, 0x200000, CRC(5adbcee0) SHA1(435feda697193bc51db80eba46be474cbbc1de4b) ) |
| 710 | ||
| 711 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 712 | ROM_LOAD( "xmen_aaa.nv", 0x0000, 0x0080, CRC(750fd447) SHA1(27884c1ceb0b5174f7d06e1e06bbbd6d6c5b47e7) ) | |
| 698 | 713 | ROM_END |
| 699 | 714 | |
| 700 | 715 | ROM_START( xmen2pj ) |
| r7553 | r7554 | |
| 720 | 735 | |
| 721 | 736 | ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ |
| 722 | 737 | ROM_LOAD( "065-a06.1f", 0x000000, 0x200000, CRC(5adbcee0) SHA1(435feda697193bc51db80eba46be474cbbc1de4b) ) |
| 738 | ||
| 739 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 740 | ROM_LOAD( "xmen_jaa.nv", 0x0000, 0x0080, CRC(849a9e19) SHA1(bd335a2d33bf4433de4fd57b8108b216eb3a2cf1) ) | |
| 723 | 741 | ROM_END |
| 724 | 742 | |
| 725 | 743 | /* |
| r7553 | r7554 | |
| 799 | 817 | |
| 800 | 818 | ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ |
| 801 | 819 | ROM_LOAD( "065-a06.1d", 0x000000, 0x200000, CRC(5adbcee0) SHA1(435feda697193bc51db80eba46be474cbbc1de4b) ) |
| 820 | ||
| 821 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 822 | ROM_LOAD( "xmen_ecb.nv", 0x0000, 0x0080, CRC(462c6e1a) SHA1(a57087163d7a760d5922c70842cfae20e6a2f5b5) ) | |
| 802 | 823 | ROM_END |
| 803 | 824 | |
| 804 | 825 | |
| r7553 | r7554 | |
| 825 | 846 | |
| 826 | 847 | ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ |
| 827 | 848 | ROM_LOAD( "065-a06.1d", 0x000000, 0x200000, CRC(5adbcee0) SHA1(435feda697193bc51db80eba46be474cbbc1de4b) ) |
| 849 | ||
| 850 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 851 | ROM_LOAD( "xmen_ucb.nv", 0x0000, 0x0080, CRC(f3d0f682) SHA1(b0d4655c651238ae028ffb59a704acba798f93f8) ) | |
| 828 | 852 | ROM_END |
| 829 | 853 | |
| 830 | 854 | GAME( 1992, xmen, 0, xmen, xmen, 0, ROT0, "Konami", "X-Men (4 Players ver UBB)", GAME_SUPPORTS_SAVE ) /* Second "version" letter denotes players, A=2 players, B=4 players, C=6 players ??? */ |
| r7553 | r7554 | |
|---|---|---|
| 736 | 736 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 737 | 737 | /* K054539 samples */ |
| 738 | 738 | ROM_LOAD( "191a03", 0x000000, 0x200000, CRC(9b13fbe8) SHA1(19b02dbd9d6da54045b0ba4dfe7b282c72745c9c)) |
| 739 | ||
| 740 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 741 | ROM_LOAD( "lethalen.nv", 0x0000, 0x0080, CRC(6e7224e6) SHA1(86dea9262d55e58b573d397d0fea437c58728707) ) | |
| 739 | 742 | ROM_END |
| 740 | 743 | |
| 741 | 744 | ROM_START( lethalenj ) // Japan version JAD |
| r7553 | r7554 | |
| 770 | 773 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 771 | 774 | /* K054539 samples */ |
| 772 | 775 | ROM_LOAD( "191a03", 0x000000, 0x200000, CRC(9b13fbe8) SHA1(19b02dbd9d6da54045b0ba4dfe7b282c72745c9c)) |
| 776 | ||
| 777 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 778 | ROM_LOAD( "lethalenj.nv", 0x0000, 0x0080, CRC(20b28f2f) SHA1(53d212f2c006729a01dfdb49cb36b67b9425172e) ) | |
| 773 | 779 | ROM_END |
| 774 | 780 | |
| 775 | 781 | ROM_START( lethalenux ) // US version ?, proto / hack?, very different to other sets |
| 776 | 782 | ROM_REGION( 0x50000, "maincpu", 0 ) |
| 777 | 783 | /* main program */ |
| 778 | ROM_LOAD( "191xxx01.u4", 0x10000, 0x40000, CRC(a3b9e790) SHA1(868b422850be129952c8b11c3c4aa730d8ea1544) ) // hacked? fails rom test | |
| 784 | ROM_LOAD( "191xxx01.u4", 0x10000, 0x40000, CRC(a3b9e790) SHA1(868b422850be129952c8b11c3c4aa730d8ea1544) ) // hacked? fails rom test, verified on multiple boards | |
| 779 | 785 | |
| 780 | 786 | ROM_REGION( 0x020000, "soundcpu", 0 ) |
| 781 | 787 | /* Z80 sound program */ |
| r7553 | r7554 | |
| 804 | 810 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 805 | 811 | /* K054539 samples */ |
| 806 | 812 | ROM_LOAD( "191a03", 0x000000, 0x200000, CRC(9b13fbe8) SHA1(19b02dbd9d6da54045b0ba4dfe7b282c72745c9c)) |
| 813 | ||
| 814 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 815 | ROM_LOAD( "lethalenux.nv", 0x0000, 0x0080, CRC(5d69c39d) SHA1(e468df829ee5094792289f9166d7e39b638ab70d) ) | |
| 807 | 816 | ROM_END |
| 808 | 817 | |
| 809 | 818 | ROM_START( lethaleneab ) // Euro ver. EAB |
| r7553 | r7554 | |
| 838 | 847 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 839 | 848 | /* K054539 samples */ |
| 840 | 849 | ROM_LOAD( "191a03", 0x000000, 0x200000, CRC(9b13fbe8) SHA1(19b02dbd9d6da54045b0ba4dfe7b282c72745c9c)) |
| 850 | ||
| 851 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 852 | ROM_LOAD( "lethaleneab.nv", 0x0000, 0x0080, CRC(4e9bb34d) SHA1(9502583bc9f5f6fc5bba333869398b24bf154b73) ) | |
| 841 | 853 | ROM_END |
| 842 | 854 | |
| 843 | 855 | ROM_START( lethaleneae ) // Euro ver. EAE |
| r7553 | r7554 | |
| 872 | 884 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 873 | 885 | /* K054539 samples */ |
| 874 | 886 | ROM_LOAD( "191a03", 0x000000, 0x200000, CRC(9b13fbe8) SHA1(19b02dbd9d6da54045b0ba4dfe7b282c72745c9c)) |
| 887 | ||
| 888 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 889 | ROM_LOAD( "lethaleneae.nv", 0x0000, 0x0080, CRC(eb369a67) SHA1(6c67294669614e96de5efb38372dbed435ee04d3) ) | |
| 875 | 890 | ROM_END |
| 876 | 891 | |
| 877 | 892 | ROM_START( lethalenua ) // *might* be UAA (writes UA to Eeprom) |
| r7553 | r7554 | |
| 906 | 921 | ROM_REGION( 0x200000, "k054539", 0 ) |
| 907 | 922 | /* K054539 samples */ |
| 908 | 923 | ROM_LOAD( "191a03", 0x000000, 0x200000, CRC(9b13fbe8) SHA1(19b02dbd9d6da54045b0ba4dfe7b282c72745c9c)) |
| 924 | ||
| 925 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 926 | ROM_LOAD( "lethalenua.nv", 0x0000, 0x0080, CRC(f71ad1c3) SHA1(04c7052d0895797af8a06183b8a877795bf2dbb3) ) | |
| 909 | 927 | ROM_END |
| 910 | 928 | |
| 911 | 929 | |
| r7553 | r7554 | |
| 917 | 935 | |
| 918 | 936 | GAME( 1992, lethalen, 0, lethalen, lethalen, lethalen, ORIENTATION_FLIP_Y, "Konami", "Lethal Enforcers (ver UAE, 11/19/92 15:04)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // writes UE to eeprom |
| 919 | 937 | GAME( 1992, lethalenua, lethalen, lethalen, lethalen, lethalen, ORIENTATION_FLIP_Y, "Konami", "Lethal Enforcers (ver unknown, US, 08/17/92 21:38)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // UAA? (writes UA to eeprom) |
| 920 | GAME( 1992, lethalenux, lethalen, lethalen, lethalen, lethalen, ORIENTATION_FLIP_Y, "Konami", "Lethal Enforcers (ver unknown, US, 08/06/92 15:11, hacked/proto?)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // writes UA to eeprom but earlier than suspected UAA set, might be a proto, might be hacked, fails rom test | |
| 938 | GAME( 1992, lethalenux, lethalen, lethalen, lethalen, lethalen, ORIENTATION_FLIP_Y, "Konami", "Lethal Enforcers (ver unknown, US, 08/06/92 15:11, hacked/proto?)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // writes UA to eeprom but earlier than suspected UAA set, might be a proto, might be hacked, fails rom test, definitely a good dump, another identical set was found in Italy | |
| 921 | 939 | GAME( 1992, lethaleneab,lethalen, lethalen, lethalen, lethalen, ORIENTATION_FLIP_Y, "Konami", "Lethal Enforcers (ver EAB, 10/14/92 19:53)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // writes EC to eeprom?! |
| 922 | 940 | GAME( 1992, lethaleneae,lethalen, lethalen, lethalen, lethalen, ORIENTATION_FLIP_Y, "Konami", "Lethal Enforcers (ver EAE, 11/19/92 16:24)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // writes EE to eeprom |
| 923 | 941 | // different mirror / display setup, shoot off the top of the screen to reload.. |
| r7553 | r7554 | |
|---|---|---|
| 337 | 337 | |
| 338 | 338 | ROM_REGION( 0x80000, "gfx3", 0 ) |
| 339 | 339 | ROM_LOAD( "9.bin", 0x000000, 0x80000, CRC(a8144a7e) SHA1(9dfdd6c17a91cad6b56c622671042ac2ee2c9ec8) ) |
| 340 | ||
| 341 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 342 | ROM_LOAD( "pzletime.nv", 0x0000, 0x0080, CRC(e5ed3d40) SHA1(8c163a6e5839e5c82d52f046d3268202fdf9f4d1) ) | |
| 340 | 343 | ROM_END |
| 341 | 344 | |
| 342 | 345 | GAME( 199?, pzletime, 0, pzletime, pzletime, 0, ROT0, "Elettronica Video-Games S.R.L.", "Puzzle Time (Prototype)", 0 ) |
| r7553 | r7554 | |
|---|---|---|
| 1155 | 1155 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1156 | 1156 | ROM_LOAD( "128a06.2d", 0x000000, 2*1024*1024, CRC(88ed598c) SHA1(3c123e26b3a12541df77b368bc0e0d486f5622b6) ) |
| 1157 | 1157 | ROM_LOAD( "128a07.1d", 0x200000, 2*1024*1024, CRC(db79a66e) SHA1(b7e118ed26bac557038e8ae6cb77f23f3da5646f) ) |
| 1158 | ||
| 1159 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1160 | ROM_LOAD( "mystwarr.nv", 0x0000, 0x080, CRC(28df2269) SHA1(3f071c97662745a199f96964e2e79f795bd5a391) ) | |
| 1158 | 1161 | ROM_END |
| 1159 | 1162 | |
| 1160 | 1163 | ROM_START( mystwarru ) |
| r7553 | r7554 | |
| 1192 | 1195 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1193 | 1196 | ROM_LOAD( "128a06.2d", 0x000000, 2*1024*1024, CRC(88ed598c) SHA1(3c123e26b3a12541df77b368bc0e0d486f5622b6) ) |
| 1194 | 1197 | ROM_LOAD( "128a07.1d", 0x200000, 2*1024*1024, CRC(db79a66e) SHA1(b7e118ed26bac557038e8ae6cb77f23f3da5646f) ) |
| 1198 | ||
| 1199 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1200 | ROM_LOAD( "mystwarru.nv", 0x0000, 0x080, CRC(1a2597c7) SHA1(3d85817fe42776c862a5930b8ad131443bc0172e) ) | |
| 1195 | 1201 | ROM_END |
| 1196 | 1202 | |
| 1197 | 1203 | ROM_START( mystwarrj ) |
| r7553 | r7554 | |
| 1229 | 1235 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1230 | 1236 | ROM_LOAD( "128a06.2d", 0x000000, 2*1024*1024, CRC(88ed598c) SHA1(3c123e26b3a12541df77b368bc0e0d486f5622b6) ) |
| 1231 | 1237 | ROM_LOAD( "128a07.1d", 0x200000, 2*1024*1024, CRC(db79a66e) SHA1(b7e118ed26bac557038e8ae6cb77f23f3da5646f) ) |
| 1238 | ||
| 1239 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1240 | ROM_LOAD( "mystwarrj.nv", 0x0000, 0x080, CRC(8e259918) SHA1(5eb46b0d96278648e8d2e84304d9bccd8dd68430) ) | |
| 1232 | 1241 | ROM_END |
| 1233 | 1242 | |
| 1234 | 1243 | ROM_START( viostorm ) |
| r7553 | r7554 | |
| 1261 | 1270 | ROM_REGION( 0x400000, "shared", 0) |
| 1262 | 1271 | ROM_LOAD( "168a06.1c", 0x000000, 2*1024*1024, CRC(25404fd7) SHA1(282cf523728b38d0bf14d765dd7257aa1fb2af39) ) |
| 1263 | 1272 | ROM_LOAD( "168a07.1e", 0x200000, 2*1024*1024, CRC(fdbbf8cc) SHA1(a8adf72a25fe2b9c4c338350d02c92deb5f8c8e9) ) |
| 1273 | ||
| 1274 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1275 | ROM_LOAD( "viostorm.nv", 0x0000, 0x080, CRC(28b5fe49) SHA1(0ef51ae4b012a7d680543747fd4b6dd9dfb5f560) ) | |
| 1264 | 1276 | ROM_END |
| 1265 | 1277 | |
| 1266 | 1278 | ROM_START( viostormu ) |
| r7553 | r7554 | |
| 1293 | 1305 | ROM_REGION( 0x400000, "shared", 0) |
| 1294 | 1306 | ROM_LOAD( "168a06.1c", 0x000000, 2*1024*1024, CRC(25404fd7) SHA1(282cf523728b38d0bf14d765dd7257aa1fb2af39) ) |
| 1295 | 1307 | ROM_LOAD( "168a07.1e", 0x200000, 2*1024*1024, CRC(fdbbf8cc) SHA1(a8adf72a25fe2b9c4c338350d02c92deb5f8c8e9) ) |
| 1308 | ||
| 1309 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1310 | ROM_LOAD( "viostormu.nv", 0x0000, 0x080, CRC(797042a1) SHA1(f33eb8b1b21f3d41372694fa6297bc2cc802c2eb) ) | |
| 1296 | 1311 | ROM_END |
| 1297 | 1312 | |
| 1298 | 1313 | ROM_START( viostormub ) |
| r7553 | r7554 | |
| 1325 | 1340 | ROM_REGION( 0x400000, "shared", 0) |
| 1326 | 1341 | ROM_LOAD( "168a06.1c", 0x000000, 2*1024*1024, CRC(25404fd7) SHA1(282cf523728b38d0bf14d765dd7257aa1fb2af39) ) |
| 1327 | 1342 | ROM_LOAD( "168a07.1e", 0x200000, 2*1024*1024, CRC(fdbbf8cc) SHA1(a8adf72a25fe2b9c4c338350d02c92deb5f8c8e9) ) |
| 1343 | ||
| 1344 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1345 | ROM_LOAD( "viostormub.nv", 0x0000, 0x080, CRC(b6937413) SHA1(eabc2ea661201f5ed42ab541aee765480bbdd5bc) ) | |
| 1328 | 1346 | ROM_END |
| 1329 | 1347 | |
| 1330 | 1348 | ROM_START( viostorma ) |
| r7553 | r7554 | |
| 1357 | 1375 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1358 | 1376 | ROM_LOAD( "168a06.1c", 0x000000, 2*1024*1024, CRC(25404fd7) SHA1(282cf523728b38d0bf14d765dd7257aa1fb2af39) ) |
| 1359 | 1377 | ROM_LOAD( "168a07.1e", 0x200000, 2*1024*1024, CRC(fdbbf8cc) SHA1(a8adf72a25fe2b9c4c338350d02c92deb5f8c8e9) ) |
| 1378 | ||
| 1379 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1380 | ROM_LOAD( "viostorma.nv", 0x0000, 0x080, CRC(2cfbf966) SHA1(fb9c4a47bac20a7f820a1fa178fc9f9079101cb8) ) | |
| 1360 | 1381 | ROM_END |
| 1361 | 1382 | |
| 1362 | 1383 | ROM_START( viostormj ) |
| r7553 | r7554 | |
| 1389 | 1410 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1390 | 1411 | ROM_LOAD( "168a06.1c", 0x000000, 2*1024*1024, CRC(25404fd7) SHA1(282cf523728b38d0bf14d765dd7257aa1fb2af39) ) |
| 1391 | 1412 | ROM_LOAD( "168a07.1e", 0x200000, 2*1024*1024, CRC(fdbbf8cc) SHA1(a8adf72a25fe2b9c4c338350d02c92deb5f8c8e9) ) |
| 1413 | ||
| 1414 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1415 | ROM_LOAD( "viostormj.nv", 0x0000, 0x080, CRC(32f5d8bc) SHA1(0c486ce80b62bfaf4f3c0be7653c0beaf4cfafbd) ) | |
| 1392 | 1416 | ROM_END |
| 1393 | 1417 | |
| 1394 | 1418 | ROM_START( metamrph ) |
| r7553 | r7554 | |
| 1424 | 1448 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1425 | 1449 | ROM_LOAD( "224a06", 0x000000, 2*1024*1024, CRC(972f6abe) SHA1(30907495fc49fe3424c092b074c1dc137aa14306) ) |
| 1426 | 1450 | ROM_LOAD( "224a07", 0x200000, 1*1024*1024, CRC(61b2f97a) SHA1(34bf835d6361c7809d40fa20fd238c9e2a84b101) ) |
| 1451 | ||
| 1452 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1453 | ROM_LOAD( "metamrph.nv", 0x0000, 0x080, CRC(2c51229a) SHA1(7f056792cc44ec3d4aacc33c825ab796a913488e) ) | |
| 1427 | 1454 | ROM_END |
| 1428 | 1455 | |
| 1429 | 1456 | ROM_START( metamrphu ) |
| r7553 | r7554 | |
| 1459 | 1486 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1460 | 1487 | ROM_LOAD( "224a06", 0x000000, 2*1024*1024, CRC(972f6abe) SHA1(30907495fc49fe3424c092b074c1dc137aa14306) ) |
| 1461 | 1488 | ROM_LOAD( "224a07", 0x200000, 1*1024*1024, CRC(61b2f97a) SHA1(34bf835d6361c7809d40fa20fd238c9e2a84b101) ) |
| 1489 | ||
| 1490 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1491 | ROM_LOAD( "metamrphu.nv", 0x0000, 0x080, CRC(1af2f855) SHA1(5f2fbb172f56867ee6f782cda8da65451b02435e) ) | |
| 1462 | 1492 | ROM_END |
| 1463 | 1493 | |
| 1464 | 1494 | ROM_START( metamrphj ) |
| r7553 | r7554 | |
| 1494 | 1524 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1495 | 1525 | ROM_LOAD( "224a06", 0x000000, 2*1024*1024, CRC(972f6abe) SHA1(30907495fc49fe3424c092b074c1dc137aa14306) ) |
| 1496 | 1526 | ROM_LOAD( "224a07", 0x200000, 1*1024*1024, CRC(61b2f97a) SHA1(34bf835d6361c7809d40fa20fd238c9e2a84b101) ) |
| 1527 | ||
| 1528 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1529 | ROM_LOAD( "metamrphj.nv", 0x0000, 0x080, CRC(30497478) SHA1(60acfbd25ac29c7b5a2571e274704205fc64424a) ) | |
| 1497 | 1530 | ROM_END |
| 1498 | 1531 | |
| 1499 | 1532 | ROM_START( mtlchamp ) |
| r7553 | r7554 | |
| 1528 | 1561 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1529 | 1562 | ROM_LOAD( "234a06.2d", 0x000000, 2*1024*1024, CRC(12d32384) SHA1(ecd6cd752b0e20339e17a7652ed843fbb43f7595) ) |
| 1530 | 1563 | ROM_LOAD( "234a07.1d", 0x200000, 2*1024*1024, CRC(05ee239f) SHA1(f4e6e7568dc73666a2b5e0c3fe743432e0436464) ) |
| 1564 | ||
| 1565 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1566 | ROM_LOAD( "mtlchamp.nv", 0x0000, 0x080, CRC(cd47858e) SHA1(8effdcd631516d537f956509111cb3d4d18040db) ) | |
| 1531 | 1567 | ROM_END |
| 1532 | 1568 | |
| 1533 | 1569 | ROM_START( mtlchamp1 ) |
| r7553 | r7554 | |
| 1562 | 1598 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1563 | 1599 | ROM_LOAD( "234a06.2d", 0x000000, 2*1024*1024, CRC(12d32384) SHA1(ecd6cd752b0e20339e17a7652ed843fbb43f7595) ) |
| 1564 | 1600 | ROM_LOAD( "234a07.1d", 0x200000, 2*1024*1024, CRC(05ee239f) SHA1(f4e6e7568dc73666a2b5e0c3fe743432e0436464) ) |
| 1601 | ||
| 1602 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1603 | ROM_LOAD( "mtlchamp1.nv", 0x0000, 0x080, CRC(202f6968) SHA1(38fc82a77896607c7fc09b75309f80048b52eb05) ) | |
| 1565 | 1604 | ROM_END |
| 1566 | 1605 | |
| 1567 | 1606 | ROM_START( mtlchampa ) |
| r7553 | r7554 | |
| 1596 | 1635 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1597 | 1636 | ROM_LOAD( "234a06.2d", 0x000000, 2*1024*1024, CRC(12d32384) SHA1(ecd6cd752b0e20339e17a7652ed843fbb43f7595) ) |
| 1598 | 1637 | ROM_LOAD( "234a07.1d", 0x200000, 2*1024*1024, CRC(05ee239f) SHA1(f4e6e7568dc73666a2b5e0c3fe743432e0436464) ) |
| 1638 | ||
| 1639 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1640 | ROM_LOAD( "mtlchampa.nv", 0x0000, 0x080, CRC(79a6f420) SHA1(c2889bbb86a3f56d4f5544b6dadede0c715c59ca) ) | |
| 1599 | 1641 | ROM_END |
| 1600 | 1642 | |
| 1601 | 1643 | ROM_START( mtlchampj ) |
| r7553 | r7554 | |
| 1630 | 1672 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1631 | 1673 | ROM_LOAD( "234a06.2d", 0x000000, 2*1024*1024, CRC(12d32384) SHA1(ecd6cd752b0e20339e17a7652ed843fbb43f7595) ) |
| 1632 | 1674 | ROM_LOAD( "234a07.1d", 0x200000, 2*1024*1024, CRC(05ee239f) SHA1(f4e6e7568dc73666a2b5e0c3fe743432e0436464) ) |
| 1675 | ||
| 1676 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1677 | ROM_LOAD( "mtlchampj.nv", 0x0000, 0x080, CRC(e311816f) SHA1(1e8ece157e6b3978d11bc9a4a6015c6004f7a375) ) | |
| 1633 | 1678 | ROM_END |
| 1634 | 1679 | |
| 1635 | 1680 | ROM_START( mtlchampu ) |
| r7553 | r7554 | |
| 1664 | 1709 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1665 | 1710 | ROM_LOAD( "234a06.2d", 0x000000, 2*1024*1024, CRC(12d32384) SHA1(ecd6cd752b0e20339e17a7652ed843fbb43f7595) ) |
| 1666 | 1711 | ROM_LOAD( "234a07.1d", 0x200000, 2*1024*1024, CRC(05ee239f) SHA1(f4e6e7568dc73666a2b5e0c3fe743432e0436464) ) |
| 1712 | ||
| 1713 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1714 | ROM_LOAD( "mtlchampu.nv", 0x0000, 0x080, CRC(f5d84df7) SHA1(a14dca3ca275a754f1f46eab220a24b77ada23a5) ) | |
| 1667 | 1715 | ROM_END |
| 1668 | 1716 | |
| 1669 | 1717 | ROM_START( gaiapols ) |
| r7553 | r7554 | |
| 1709 | 1757 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1710 | 1758 | ROM_LOAD( "123e14.2g", 0x000000, 2*1024*1024, CRC(65dfd3ff) SHA1(57e13c05f420747c1c2010cc5340dd70e2c28971) ) |
| 1711 | 1759 | ROM_LOAD( "123e15.2m", 0x200000, 2*1024*1024, CRC(7017ff07) SHA1(37ecd54f2c757c5385305ab726d9f66aa1afd456) ) |
| 1760 | ||
| 1761 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1762 | ROM_LOAD( "gaiapols.nv", 0x0000, 0x080, CRC(44c78184) SHA1(19343b47b60bf4e212d844fce28e7a1bd54c7012) ) | |
| 1712 | 1763 | ROM_END |
| 1713 | 1764 | |
| 1714 | 1765 | ROM_START( gaiapolsu ) |
| r7553 | r7554 | |
| 1754 | 1805 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1755 | 1806 | ROM_LOAD( "123e14.2g", 0x000000, 2*1024*1024, CRC(65dfd3ff) SHA1(57e13c05f420747c1c2010cc5340dd70e2c28971) ) |
| 1756 | 1807 | ROM_LOAD( "123e15.2m", 0x200000, 2*1024*1024, CRC(7017ff07) SHA1(37ecd54f2c757c5385305ab726d9f66aa1afd456) ) |
| 1808 | ||
| 1809 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1810 | ROM_LOAD( "gaiapolsu.nv", 0x0000, 0x080, CRC(7ece27b6) SHA1(f0671c5e6db665c86afcef563ff1dbcbf083b380) ) | |
| 1757 | 1811 | ROM_END |
| 1758 | 1812 | |
| 1759 | 1813 | ROM_START( gaiapolsj ) |
| r7553 | r7554 | |
| 1799 | 1853 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1800 | 1854 | ROM_LOAD( "123e14.2g", 0x000000, 2*1024*1024, CRC(65dfd3ff) SHA1(57e13c05f420747c1c2010cc5340dd70e2c28971) ) |
| 1801 | 1855 | ROM_LOAD( "123e15.2m", 0x200000, 2*1024*1024, CRC(7017ff07) SHA1(37ecd54f2c757c5385305ab726d9f66aa1afd456) ) |
| 1856 | ||
| 1857 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1858 | ROM_LOAD( "gaiapolsj.nv", 0x0000, 0x080, CRC(c4b970df) SHA1(d4a24b4950ee33a832342c752c24b58e033d9240) ) | |
| 1802 | 1859 | ROM_END |
| 1803 | 1860 | |
| 1804 | 1861 | ROM_START( mmaulers ) |
| r7553 | r7554 | |
| 1844 | 1901 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1845 | 1902 | ROM_LOAD("170a14.2g", 0x000000, 2*1024*1024, CRC(83317cda) SHA1(c5398c5959ef3ea73835e13db69660dd28c31486) ) |
| 1846 | 1903 | ROM_LOAD("170a15.2m", 0x200000, 2*1024*1024, CRC(d4113ae9) SHA1(e234d06f462e3db64455c384c2f42174f9ef9c6a) ) |
| 1904 | ||
| 1905 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1906 | ROM_LOAD( "mmaulers.nv", 0x0000, 0x080, CRC(8324f517) SHA1(4697d091a1924e1a5d6c3ffc64a40fd36eebe557) ) | |
| 1847 | 1907 | ROM_END |
| 1848 | 1908 | |
| 1849 | 1909 | ROM_START( dadandrn ) |
| r7553 | r7554 | |
| 1889 | 1949 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1890 | 1950 | ROM_LOAD("170a14.2g", 0x000000, 2*1024*1024, CRC(83317cda) SHA1(c5398c5959ef3ea73835e13db69660dd28c31486) ) |
| 1891 | 1951 | ROM_LOAD("170a15.2m", 0x200000, 2*1024*1024, CRC(d4113ae9) SHA1(e234d06f462e3db64455c384c2f42174f9ef9c6a) ) |
| 1952 | ||
| 1953 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 1954 | ROM_LOAD( "dadandrn.nv", 0x0000, 0x080, CRC(346ae0cf) SHA1(1f79b2e21766f7a971c7d0f618700deb8a32f78a) ) | |
| 1892 | 1955 | ROM_END |
| 1893 | 1956 | |
| 1894 | 1957 | static DRIVER_INIT(metamrph) |
| r7553 | r7554 | |
| 1901 | 1964 | GAME( 1993, mystwarr, 0, mystwarr, mystwarr, 0, ROT0, "Konami", "Mystic Warriors (ver EAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1902 | 1965 | GAME( 1993, mystwarru, mystwarr, mystwarr, mystwarr, 0, ROT0, "Konami", "Mystic Warriors (ver UAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1903 | 1966 | GAME( 1993, mystwarrj, mystwarr, mystwarr, mystwarr, 0, ROT0, "Konami", "Mystic Warriors (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1967 | ||
| 1904 | 1968 | GAME( 1993, mmaulers, 0, dadandrn, dadandrn, 0, ROT0, "Konami", "Monster Maulers (ver EAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1905 | 1969 | GAME( 1993, dadandrn, mmaulers, dadandrn, dadandrn, 0, ROT0, "Konami", "Kyukyoku Sentai Dadandarn (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1970 | ||
| 1906 | 1971 | GAME( 1993, viostorm, 0, viostorm, viostorm, 0, ROT0, "Konami", "Violent Storm (ver EAB)", GAME_IMPERFECT_GRAPHICS ) |
| 1907 | 1972 | GAME( 1993, viostormu, viostorm, viostorm, viostorm, 0, ROT0, "Konami", "Violent Storm (ver UAC)", GAME_IMPERFECT_GRAPHICS ) |
| 1908 | 1973 | GAME( 1993, viostormub,viostorm, viostorm, viostorm, 0, ROT0, "Konami", "Violent Storm (ver UAB)", GAME_IMPERFECT_GRAPHICS ) |
| 1909 | 1974 | GAME( 1993, viostormj, viostorm, viostorm, viostorm, 0, ROT0, "Konami", "Violent Storm (ver JAC)", GAME_IMPERFECT_GRAPHICS ) |
| 1910 | 1975 | GAME( 1993, viostorma, viostorm, viostorm, viostorm, 0, ROT0, "Konami", "Violent Storm (ver AAC)", GAME_IMPERFECT_GRAPHICS ) |
| 1976 | ||
| 1911 | 1977 | GAME( 1993, metamrph, 0, metamrph, metamrph, metamrph, ROT0, "Konami", "Metamorphic Force (ver EAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1912 | 1978 | GAME( 1993, metamrphu, metamrph, metamrph, metamrph, metamrph, ROT0, "Konami", "Metamorphic Force (ver UAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1913 | 1979 | GAME( 1993, metamrphj, metamrph, metamrph, metamrph, metamrph, ROT0, "Konami", "Metamorphic Force (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1980 | ||
| 1914 | 1981 | GAME( 1993, mtlchamp, 0, martchmp, martchmp, 0, ROT0, "Konami", "Martial Champion (ver EAB)", GAME_IMPERFECT_GRAPHICS ) |
| 1915 | 1982 | GAME( 1993, mtlchamp1, mtlchamp, martchmp, martchmp, 0, ROT0, "Konami", "Martial Champion (ver EAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1916 | 1983 | GAME( 1993, mtlchampu, mtlchamp, martchmp, martchmp, 0, ROT0, "Konami", "Martial Champion (ver UAD)", GAME_IMPERFECT_GRAPHICS ) |
| 1917 | 1984 | GAME( 1993, mtlchampj, mtlchamp, martchmp, martchmp, 0, ROT0, "Konami", "Martial Champion (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1918 | 1985 | GAME( 1993, mtlchampa, mtlchamp, martchmp, martchmp, 0, ROT0, "Konami", "Martial Champion (ver AAA)", GAME_IMPERFECT_GRAPHICS ) |
| 1986 | ||
| 1919 | 1987 | GAME( 1993, gaiapols, 0, gaiapols, dadandrn, 0, ROT90, "Konami", "Gaiapolis (ver EAF)", GAME_IMPERFECT_GRAPHICS ) |
| 1920 | 1988 | GAME( 1993, gaiapolsu, gaiapols, gaiapols, dadandrn, 0, ROT90, "Konami", "Gaiapolis (ver UAF)", GAME_IMPERFECT_GRAPHICS ) |
| 1921 | 1989 | GAME( 1993, gaiapolsj, gaiapols, gaiapols, dadandrn, 0, ROT90, "Konami", "Gaiapolis (ver JAF)", GAME_IMPERFECT_GRAPHICS ) |
| r7553 | r7554 | |
|---|---|---|
| 699 | 699 | static void resetcontrol_w(const address_space *space, UINT8 data) |
| 700 | 700 | { |
| 701 | 701 | resetcontrol = data; |
| 702 | logerror("Reset control %02x ('%s':%x)\n", resetcontrol, space->cpu->tag | |
| 702 | logerror("Reset control %02x ('%s':%x)\n", resetcontrol, space->cpu->tag | |
| 703 | 703 | reset_reset(space->machine); |
| 704 | 704 | } |
| 705 | 705 | |
| r7553 | r7554 | |
| 756 | 756 | int i; |
| 757 | 757 | UINT8 mxor = 0; |
| 758 | 758 | if(!mlatch_table) { |
| 759 | logerror("Protection: magic latch accessed but no table loaded (%s:%x)\n", space->cpu->tag | |
| 759 | logerror("Protection: magic latch accessed but no table loaded (%s:%x)\n", space->cpu->tag | |
| 760 | 760 | return; |
| 761 | 761 | } |
| 762 | 762 | |
| r7553 | r7554 | |
| 767 | 767 | if(mlatch & (1<<i)) |
| 768 | 768 | mxor |= 1 << mlatch_table[i]; |
| 769 | 769 | mlatch = data ^ mxor; |
| 770 | logerror("Magic latching %02x ^ %02x as %02x (%s:%x)\n", data & 0xff, mxor, mlatch, space->cpu->tag | |
| 770 | logerror("Magic latching %02x ^ %02x as %02x (%s:%x)\n", data & 0xff, mxor, mlatch, space->cpu->tag | |
| 771 | 771 | } else { |
| 772 | logerror("Magic latch reset (%s:%x)\n", space->cpu->tag | |
| 772 | logerror("Magic latch reset (%s:%x)\n", space->cpu->tag | |
| 773 | 773 | mlatch = 0x00; |
| 774 | 774 | } |
| 775 | 775 | } |
| r7553 | r7554 | |
|---|---|---|
| 1511 | 1511 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(2) |
| 1512 | 1512 | INPUT_PORTS_END |
| 1513 | 1513 | |
| 1514 | ||
| 1515 | static INPUT_PORTS_START( le2_flip ) | |
| 1516 | PORT_INCLUDE( le2 ) | |
| 1517 | ||
| 1518 | PORT_MODIFY("LIGHT0_Y") | |
| 1519 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_REVERSE | |
| 1520 | ||
| 1521 | PORT_MODIFY("LIGHT1_Y") | |
| 1522 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_REVERSE | |
| 1523 | INPUT_PORTS_END | |
| 1524 | ||
| 1514 | 1525 | static INPUT_PORTS_START( gokuparo ) |
| 1515 | 1526 | PORT_INCLUDE( common ) |
| 1516 | 1527 | |
| r7553 | r7554 | |
| 1998 | 2009 | ROM_REGION( 0x400000, "shared", 0 ) |
| 1999 | 2010 | ROM_LOAD( "321b17.9g", 0x000000, 2*1024*1024, CRC(b3e8d5d8) SHA1(6644a414e7f0e69ded9aa1bf892566002cebae26) ) |
| 2000 | 2011 | ROM_LOAD( "321b18.7g", 0x200000, 2*1024*1024, CRC(2c561ad0) SHA1(6265054072ba1c2837dd96e0259b20bc50457160) ) |
| 2012 | ||
| 2013 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2014 | ROM_LOAD( "gokuparo.nv", 0x0000, 0x080, CRC(15c0f2d9) SHA1(57c7462e3b1e15652ec5d682a1be3786926ddecd) ) | |
| 2001 | 2015 | ROM_END |
| 2002 | 2016 | |
| 2003 | 2017 | /* Fantastic Journey version EAA (Euro) */ |
| r7553 | r7554 | |
| 2028 | 2042 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2029 | 2043 | ROM_LOAD( "321b17.9g", 0x000000, 2*1024*1024, CRC(b3e8d5d8) SHA1(6644a414e7f0e69ded9aa1bf892566002cebae26) ) |
| 2030 | 2044 | ROM_LOAD( "321b18.7g", 0x200000, 2*1024*1024, CRC(2c561ad0) SHA1(6265054072ba1c2837dd96e0259b20bc50457160) ) |
| 2045 | ||
| 2046 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2047 | ROM_LOAD( "fantjour.nv", 0x0000, 0x080, CRC(35b7d8e1) SHA1(5f0e3799ff9c63af3e55b040cc52b2a9e7a76168) ) | |
| 2031 | 2048 | ROM_END |
| 2032 | 2049 | |
| 2033 | 2050 | /* Fantastic Journey version AAA (Asia) */ |
| r7553 | r7554 | |
| 2058 | 2075 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2059 | 2076 | ROM_LOAD( "321b17.9g", 0x000000, 2*1024*1024, CRC(b3e8d5d8) SHA1(6644a414e7f0e69ded9aa1bf892566002cebae26) ) |
| 2060 | 2077 | ROM_LOAD( "321b18.7g", 0x200000, 2*1024*1024, CRC(2c561ad0) SHA1(6265054072ba1c2837dd96e0259b20bc50457160) ) |
| 2078 | ||
| 2079 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2080 | ROM_LOAD( "fantjoura.nv", 0x0000, 0x080, CRC(d13b1ec1) SHA1(0f4aedd0aa9682b0b68b9f7745946a3bc1e76714) ) | |
| 2061 | 2081 | ROM_END |
| 2062 | 2082 | |
| 2063 | 2083 | /* Salamander 2 version JAA (Japan) */ |
| r7553 | r7554 | |
| 2089 | 2109 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2090 | 2110 | ROM_LOAD( "521-a12.9g", 0x000000, 2*1024*1024, CRC(66614d3b) SHA1(e1e5ebe546bced6ab74b0af500acf0f3308902a4) ) |
| 2091 | 2111 | ROM_LOAD( "521-a13.7g", 0x200000, 1*1024*1024, CRC(c3322475) SHA1(1774524ff031e0c4a7f3432810e968d37f9c6331) ) |
| 2112 | ||
| 2113 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2114 | ROM_LOAD( "salmndr2.nv", 0x0000, 0x080, CRC(60cdea03) SHA1(6aa597d391b5d7db67e599ec54d98600983966fc) ) | |
| 2092 | 2115 | ROM_END |
| 2093 | 2116 | |
| 2094 | 2117 | /* Salamander 2 version AAB (Asia) */ |
| r7553 | r7554 | |
| 2120 | 2143 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2121 | 2144 | ROM_LOAD( "521-a12.9g", 0x000000, 2*1024*1024, CRC(66614d3b) SHA1(e1e5ebe546bced6ab74b0af500acf0f3308902a4) ) |
| 2122 | 2145 | ROM_LOAD( "521-a13.7g", 0x200000, 1*1024*1024, CRC(c3322475) SHA1(1774524ff031e0c4a7f3432810e968d37f9c6331) ) |
| 2146 | ||
| 2147 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2148 | ROM_LOAD( "salmndr2a.nv", 0x0000, 0x080, CRC(3a98a8f9) SHA1(08c2d164620a4d8ad902d502acea8ad621931198) ) | |
| 2123 | 2149 | ROM_END |
| 2124 | 2150 | |
| 2125 | /* Twinbee Yahoo! */ | |
| 2151 | /* Twinbee Yahhoo! */ | |
| 2126 | 2152 | ROM_START( tbyahhoo ) |
| 2127 | 2153 | /* main program */ |
| 2128 | 2154 | ROM_REGION( 0x800000, "maincpu", 0 ) |
| r7553 | r7554 | |
| 2150 | 2176 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2151 | 2177 | ROM_LOAD( "424a17.9g", 0x000000, 2*1024*1024, CRC(e9dd9692) SHA1(c289019c8d1dd71b3cec26479c39b649de804707) ) |
| 2152 | 2178 | ROM_LOAD( "424a18.7g", 0x200000, 2*1024*1024, CRC(0f0d9f3a) SHA1(57f6b113b80f06964b7e672ad517c1654c5569c5) ) |
| 2179 | ||
| 2180 | // reports RAMs as bad on first boot due to TMS emulation problems, but automatically resets | |
| 2181 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2182 | ROM_LOAD( "tbyahhoo.nv", 0x0000, 0x080, CRC(1e6fa2f8) SHA1(fceb6617a4e02babfc1678bae9f6a131c1d759f5) ) | |
| 2153 | 2183 | ROM_END |
| 2154 | 2184 | |
| 2155 | 2185 | /* Daisu-Kiss */ |
| r7553 | r7554 | |
| 2383 | 2413 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2384 | 2414 | ROM_LOAD( "615a22.9g", 0x000000, 2*1024*1024, CRC(ea7e47dd) SHA1(5bf5bad9427b083757c400eaf58c63a6267c1caf) ) |
| 2385 | 2415 | ROM_LOAD( "615a23.7g", 0x200000, 2*1024*1024, CRC(22d71f36) SHA1(3f24bb4cd8e1d693b42219e05960ad0c756b08cb) ) |
| 2416 | ||
| 2417 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2418 | ROM_LOAD( "tokkae.nv", 0x0000, 0x080, CRC(5a6f8da6) SHA1(f68c67c98e99669904e23d5eac7e13a9c57bc394) ) | |
| 2386 | 2419 | ROM_END |
| 2387 | 2420 | |
| 2388 | 2421 | /* Tokimeki Memorial Taisen Puzzle-dama */ |
| r7553 | r7554 | |
| 2415 | 2448 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2416 | 2449 | ROM_LOAD( "515a13.9g", 0x000000, 2*1024*1024, CRC(4b066b00) SHA1(874dd49847b10e6d9c39decb81557534baa36d79) ) |
| 2417 | 2450 | ROM_LOAD( "515a14.7g", 0x200000, 2*1024*1024, CRC(128cc944) SHA1(b0cd2ec1b9a2ac936d57b6d6c2a70f9c13dc97a5) ) |
| 2451 | ||
| 2452 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2453 | ROM_LOAD( "tkmmpzdm.nv", 0x0000, 0x080, CRC(850ab8c4) SHA1(fea5ceb3f2cea61fb19bdb1b8f1496d1c06bfff1) ) | |
| 2418 | 2454 | ROM_END |
| 2419 | 2455 | |
| 2420 | 2456 | /* Winning Spike - Version EAA (Euro) */ |
| r7553 | r7554 | |
| 2433 | 2469 | /* tiles: length of 1 meg each is TRUSTED by the internal checksum code */ |
| 2434 | 2470 | /* do NOT change these to the 4 meg dumps again, those are WRONG!!!!!!! */ |
| 2435 | 2471 | ROM_REGION( 0x800000, "gfx1", ROMREGION_ERASE00 ) |
| 2436 | ||
| 2472 | ||
| 2437 | 2473 | ROM_LOAD16_BYTE( "705a18.22h", 0x000001, 0x100000, CRC(eb97fb5f) SHA1(13de0ad060fd6f1312fa10edde1fef6481e8df64) ) |
| 2438 | 2474 | |
| 2439 | 2475 | /* sprites */ |
| 2440 | 2476 | ROM_REGION( 0x1000000, "gfx2", ROMREGION_ERASE00 ) |
| 2441 | _64_WORD_ROM_LOAD( "705a10.33g", 0x000000, 0x400000, CRC(fc4dc78b) SHA1(520cdcf9ca20ec1c84be734e06e183e7a871090b) ) | |
| 2442 | _64_WORD_ROM_LOAD( "705a11.30g", 0x000002, 0x400000, CRC(68542ce9) SHA1(a4294da1d1026e3a9d070575e5855935389a705f) ) | |
| 2443 | _64_WORD_ROM_LOAD( "705a13.28g", 0x000004, 0x400000, CRC(3b62584b) SHA1(69718f47ff1e8d65a11972af1ed5068db175f625) ) | |
| 2444 | _64_WORD_ROM_LOAD( "705a17.25g", 0x000006, 0x400000, CRC(971d2812) SHA1(ee0819faf6f6c8420d5d3742cb39dfb76b9ce7a4) ) | |
| 2477 | _64_WORD_ROM_LOAD( "705a10.33g", 0x000000, 0x400000, CRC(fc4dc78b) SHA1(520cdcf9ca20ec1c84be734e06e183e7a871090b) ) | |
| 2478 | _64_WORD_ROM_LOAD( "705a11.30g", 0x000002, 0x400000, CRC(68542ce9) SHA1(a4294da1d1026e3a9d070575e5855935389a705f) ) | |
| 2479 | _64_WORD_ROM_LOAD( "705a13.28g", 0x000004, 0x400000, CRC(3b62584b) SHA1(69718f47ff1e8d65a11972af1ed5068db175f625) ) | |
| 2480 | _64_WORD_ROM_LOAD( "705a17.25g", 0x000006, 0x400000, CRC(971d2812) SHA1(ee0819faf6f6c8420d5d3742cb39dfb76b9ce7a4) ) | |
| 2445 | 2481 | |
| 2446 | 2482 | /* sound data */ |
| 2447 | 2483 | ROM_REGION( 0x400000, "shared", 0 ) |
| r7553 | r7554 | |
| 2492 | 2528 | /* tiles: length of 1 meg each is TRUSTED by the internal checksum code */ |
| 2493 | 2529 | /* do NOT change these to the 4 meg dumps again, those are WRONG!!!!!!! */ |
| 2494 | 2530 | ROM_REGION( 0x800000, "gfx1", ROMREGION_ERASE00 ) |
| 2495 | ||
| 2531 | ||
| 2496 | 2532 | ROM_LOAD16_BYTE( "705a18.22h", 0x000001, 0x100000, CRC(eb97fb5f) SHA1(13de0ad060fd6f1312fa10edde1fef6481e8df64) ) |
| 2497 | 2533 | |
| 2498 | 2534 | /* sprites */ |
| 2499 | 2535 | ROM_REGION( 0x1000000, "gfx2", ROMREGION_ERASE00 ) |
| 2500 | _64_WORD_ROM_LOAD( "705a10.33g", 0x000000, 0x400000, CRC(fc4dc78b) SHA1(520cdcf9ca20ec1c84be734e06e183e7a871090b) ) | |
| 2501 | _64_WORD_ROM_LOAD( "705a11.30g", 0x000002, 0x400000, CRC(68542ce9) SHA1(a4294da1d1026e3a9d070575e5855935389a705f) ) | |
| 2502 | _64_WORD_ROM_LOAD( "705a13.28g", 0x000004, 0x400000, CRC(3b62584b) SHA1(69718f47ff1e8d65a11972af1ed5068db175f625) ) | |
| 2503 | _64_WORD_ROM_LOAD( "705a17.25g", 0x000006, 0x400000, CRC(971d2812) SHA1(ee0819faf6f6c8420d5d3742cb39dfb76b9ce7a4) ) | |
| 2536 | _64_WORD_ROM_LOAD( "705a10.33g", 0x000000, 0x400000, CRC(fc4dc78b) SHA1(520cdcf9ca20ec1c84be734e06e183e7a871090b) ) | |
| 2537 | _64_WORD_ROM_LOAD( "705a11.30g", 0x000002, 0x400000, CRC(68542ce9) SHA1(a4294da1d1026e3a9d070575e5855935389a705f) ) | |
| 2538 | _64_WORD_ROM_LOAD( "705a13.28g", 0x000004, 0x400000, CRC(3b62584b) SHA1(69718f47ff1e8d65a11972af1ed5068db175f625) ) | |
| 2539 | _64_WORD_ROM_LOAD( "705a17.25g", 0x000006, 0x400000, CRC(971d2812) SHA1(ee0819faf6f6c8420d5d3742cb39dfb76b9ce7a4) ) | |
| 2504 | 2540 | |
| 2505 | 2541 | /* sound data */ |
| 2506 | 2542 | ROM_REGION( 0x400000, "shared", 0 ) |
| r7553 | r7554 | |
| 2535 | 2571 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2536 | 2572 | ROM_LOAD( "315a17.9g", 0x000000, 2*1024*1024, CRC(ea763d61) SHA1(2a7dcb2a2a23c9fea62fb82ffc18949bf15b9f6f) ) |
| 2537 | 2573 | ROM_LOAD( "315a18.7g", 0x200000, 2*1024*1024, CRC(6e416cee) SHA1(145a766ad2fa2b692692053dd36e0caf51d67a56) ) |
| 2574 | ||
| 2575 | // the TMS emulation is causing problems which means you have to reset this one anyway | |
| 2576 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 2577 | ROM_LOAD( "puzldama.nv", 0x0000, 0x080, CRC(bda98b84) SHA1(f4b03130bdc2a5bc6f0fc9ca21603109d82703b4) ) | |
| 2538 | 2578 | ROM_END |
| 2539 | 2579 | |
| 2540 | 2580 | /* Dragoon Might */ |
| r7553 | r7554 | |
| 2572 | 2612 | /* sound data */ |
| 2573 | 2613 | ROM_REGION( 0x200000, "shared", 0 ) |
| 2574 | 2614 | ROM_LOAD( "417a17.9g", 0x000000, 2*1024*1024, CRC(88d47dfd) SHA1(b5d6dd7ee9ac0c427dc3e714a97945c954260913) ) |
| 2615 | ||
| 2616 | // game is currently broken due to TMS emulation anyway.. | |
| 2617 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2618 | ROM_LOAD( "dragoonj.nv", 0x0000, 0x080, CRC(cbe16082) SHA1(da48893f3584ae2e034c73d4338b220107a884da) ) | |
| 2575 | 2619 | ROM_END |
| 2576 | 2620 | |
| 2577 | 2621 | /* Dragoon Might (Asia) */ |
| r7553 | r7554 | |
| 2609 | 2653 | /* sound data */ |
| 2610 | 2654 | ROM_REGION( 0x200000, "shared", 0 ) |
| 2611 | 2655 | ROM_LOAD( "417a17.9g", 0x000000, 2*1024*1024, CRC(88d47dfd) SHA1(b5d6dd7ee9ac0c427dc3e714a97945c954260913) ) |
| 2656 | ||
| 2657 | // game is currently broken due to TMS emulation anyway.. | |
| 2658 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2659 | ROM_LOAD( "dragoona.nv", 0x0000, 0x080, CRC(7980ad2b) SHA1(dccaab02d23edbd81ae13441fbac0dbd7112c258) ) | |
| 2612 | 2660 | ROM_END |
| 2613 | 2661 | |
| 2614 | 2662 | /* Soccer Superstars (Europe ver EAA)*/ |
| r7553 | r7554 | |
| 2665 | 2713 | /* sound data */ |
| 2666 | 2714 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2667 | 2715 | ROM_LOAD( "427a16.9r", 0x000000, 2*1024*1024, CRC(39547265) SHA1(c0efd68c0c1ea59141045150842f36d43e1f01d8) ) |
| 2716 | ||
| 2717 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2718 | ROM_LOAD( "soccerss.nv", 0x0000, 0x080, CRC(f222dae4) SHA1(fede48a4e1fe91cf2b17ff3f3996bca4816fc283) ) | |
| 2668 | 2719 | ROM_END |
| 2669 | 2720 | |
| 2670 | 2721 | /* Soccer Superstars (Japan ver JAC)*/ |
| r7553 | r7554 | |
| 2709 | 2760 | /* sound data */ |
| 2710 | 2761 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2711 | 2762 | ROM_LOAD( "427a16.9r", 0x000000, 2*1024*1024, CRC(39547265) SHA1(c0efd68c0c1ea59141045150842f36d43e1f01d8) ) |
| 2763 | ||
| 2764 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2765 | ROM_LOAD( "soccerssj.nv", 0x0000, 0x080, CRC(7440255e) SHA1(af379b5b1f765f9050f18fbd41c5031c5ad4918b) ) | |
| 2712 | 2766 | ROM_END |
| 2713 | 2767 | |
| 2714 | 2768 | /* Soccer Superstars (Japan ver JAA)*/ |
| r7553 | r7554 | |
| 2753 | 2807 | /* sound data */ |
| 2754 | 2808 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2755 | 2809 | ROM_LOAD( "427a16.9r", 0x000000, 2*1024*1024, CRC(39547265) SHA1(c0efd68c0c1ea59141045150842f36d43e1f01d8) ) |
| 2810 | ||
| 2811 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2812 | ROM_LOAD( "soccerssja.nv", 0x0000, 0x080, CRC(60dba700) SHA1(087b086b29748727b41fdd4c154ff9b4bef42959) ) | |
| 2756 | 2813 | ROM_END |
| 2757 | 2814 | |
| 2758 | 2815 | /* Soccer Superstars (Asian ver AAA) */ |
| r7553 | r7554 | |
| 2797 | 2854 | /* sound data */ |
| 2798 | 2855 | ROM_REGION( 0x400000, "shared", 0 ) |
| 2799 | 2856 | ROM_LOAD( "427a16.9r", 0x000000, 2*1024*1024, CRC(39547265) SHA1(c0efd68c0c1ea59141045150842f36d43e1f01d8) ) |
| 2857 | ||
| 2858 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 2859 | ROM_LOAD( "soccerssa.nv", 0x0000, 0x080, CRC(e3a3f3d5) SHA1(374cf5bbcc459c56ebbba5068406f6d767bcb608) ) | |
| 2800 | 2860 | ROM_END |
| 2801 | 2861 | |
| 2802 | 2862 | /* Vs. Net Soccer TODO: |
| 2803 | 2863 | |
| 2804 | 2864 | Redump sound ROM |
| 2805 | Check naming of data roms, I believe they're swapped on either this or all the other games. | |
| 2806 | Add 'Roz Doubling' support to the Type-4 roz rendering when width > 512 | |
| 2807 | Fix issues with FG Tilemaps (the hack used for Soccer Superstars clearly doesn't work here causing most of the left screen tilemaps to vanish) | |
| 2808 | See if there is any other protection | |
| 2809 | 2865 | Hook up ROM tests. |
| 2810 | 2866 | |
| 2811 | 2867 | */ |
| r7553 | r7554 | |
| 3160 | 3216 | ROM_REGION( 0x400000, "shared", 0 ) |
| 3161 | 3217 | ROM_LOAD( "312a17.9g", 0x000000, 2*1024*1024, CRC(ed101448) SHA1(ef1342f37fbbb092eddee0c237b40989ad42cf26) ) |
| 3162 | 3218 | ROM_LOAD( "312a18.7g", 0x200000, 1*1024*1024, CRC(5717abd7) SHA1(d304d733e7fca0363ea6b3872c2d3bbe4edf1179) ) |
| 3219 | ||
| 3220 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with invisible error | |
| 3221 | ROM_LOAD( "le2.nv", 0x0000, 0x080, CRC(fec3bc2e) SHA1(64040364d7db12f54e5c11f28a28e030bcf9a0f7) ) | |
| 3163 | 3222 | ROM_END |
| 3164 | 3223 | |
| 3165 | 3224 | /* Lethal Enforcers II (US Version) */ |
| r7553 | r7554 | |
| 3195 | 3254 | ROM_REGION( 0x400000, "shared", 0 ) |
| 3196 | 3255 | ROM_LOAD( "312a17.9g", 0x000000, 2*1024*1024, CRC(ed101448) SHA1(ef1342f37fbbb092eddee0c237b40989ad42cf26) ) |
| 3197 | 3256 | ROM_LOAD( "312a18.7g", 0x200000, 1*1024*1024, CRC(5717abd7) SHA1(d304d733e7fca0363ea6b3872c2d3bbe4edf1179) ) |
| 3257 | ||
| 3258 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with invisible error | |
| 3259 | ROM_LOAD( "le2u.nv", 0x0000, 0x080, CRC(d46b3878) SHA1(81bf4331547ce977eaa185f7281625fb695f6deb) ) | |
| 3198 | 3260 | ROM_END |
| 3199 | 3261 | |
| 3200 | /* Lethal Enforcers II (version) */ | |
| 3262 | /* Lethal Enforcers II (Japan version) */ | |
| 3201 | 3263 | ROM_START( le2j ) |
| 3202 | 3264 | /* main program */ |
| 3203 | 3265 | ROM_REGION( 0x800000, "maincpu", 0 ) |
| 3204 | 3266 | GX_BIOS |
| 3205 | ROM_LOAD32_BYTE( "312jaa05.26b", 0x200000, 0x020000, BAD_DUMP CRC(7eaa6ce2) SHA1(59d3460be98ac32ebea0422c2a9962556a9e964e) ) | |
| 3206 | ROM_LOAD32_BYTE( "312jaa04.28b", 0x200001, 0x020000, BAD_DUMP CRC(c3d19ddc) SHA1(3bc3e705567e8e59e56a40ae64381082c4f22271) ) | |
| 3207 | ROM_LOAD32_BYTE( "312jaa03.30b", 0x200002, 0x020000, BAD_DUMP CRC(465e3d03) SHA1(8efeb775f6d9f1dfcebdbc79d0c832107278c063) ) | |
| 3208 | ROM_LOAD32_BYTE( "312jaa02.33b", 0x200003, 0x020000, BAD_DUMP CRC(e971cb87) SHA1(53e2e7c4b96e4331df27d4788aa1bb81efddf9f0) ) | |
| 3209 | 3267 | |
| 3268 | ROM_LOAD32_BYTE( "312jaa05.26b", 0x200000, 0x020000, CRC(7eaa6ce2) SHA1(59d3460be98ac32ebea0422c2a9962556a9e964e) ) | |
| 3269 | ROM_LOAD32_BYTE( "312jaa04.28b", 0x200001, 0x020000, CRC(c3d19ddc) SHA1(3bc3e705567e8e59e56a40ae64381082c4f22271) ) | |
| 3270 | ROM_LOAD32_BYTE( "312jaa03.30b", 0x200002, 0x020000, CRC(9ad95a7c) SHA1(397b301f8bc4d5f039f47263ad73da5afc14712c) ) | |
| 3271 | ROM_LOAD32_BYTE( "312jaa02.33b", 0x200003, 0x020000, CRC(e971cb87) SHA1(53e2e7c4b96e4331df27d4788aa1bb81efddf9f0) ) | |
| 3272 | ||
| 3210 | 3273 | /* sound program */ |
| 3211 | 3274 | ROM_REGION( 0x40000, "soundcpu", 0 ) |
| 3212 | 3275 | ROM_LOAD16_BYTE("312b06.9c", 0x000000, 128*1024, CRC(a6f62539) SHA1(b333e02c55237a0429d8c5386ec68b67797a1107) ) |
| r7553 | r7554 | |
| 3230 | 3293 | ROM_REGION( 0x400000, "shared", 0 ) |
| 3231 | 3294 | ROM_LOAD( "312a17.9g", 0x000000, 2*1024*1024, CRC(ed101448) SHA1(ef1342f37fbbb092eddee0c237b40989ad42cf26) ) |
| 3232 | 3295 | ROM_LOAD( "312a18.7g", 0x200000, 1*1024*1024, CRC(5717abd7) SHA1(d304d733e7fca0363ea6b3872c2d3bbe4edf1179) ) |
| 3296 | ||
| 3297 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with invisible error | |
| 3298 | ROM_LOAD( "le2j.nv", 0x0000, 0x080, CRC(f6790425) SHA1(f233f3c09c4cdbd1c6e5204fc6554a4826b44c59) ) | |
| 3233 | 3299 | ROM_END |
| 3234 | 3300 | |
| 3235 | 3301 | /* Racin' Force */ |
| r7553 | r7554 | |
| 3277 | 3343 | ROM_REGION( 0x400000, "shared", 0 ) |
| 3278 | 3344 | ROM_LOAD( "250a17.14y", 0x000000, 2*1024*1024, CRC(adefa079) SHA1(d25911e3a02d92dc936c3d7e9d76fc270bd1a75a) ) |
| 3279 | 3345 | ROM_LOAD( "250a18.12y", 0x200000, 2*1024*1024, CRC(8014a2eb) SHA1(d82f0a7d559340ae05a78ecc8bb69bb35b9c0658) ) |
| 3346 | ||
| 3347 | // note, it seems impossible to calibrate the controls (again!), this has nothing to do with the default eeprom! | |
| 3348 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 3349 | ROM_LOAD( "racinfrc.nv", 0x0000, 0x080, CRC(dc88c693) SHA1(a7967f390db043570803c79edf984a3e6bdbd172) ) | |
| 3280 | 3350 | ROM_END |
| 3281 | 3351 | |
| 3282 | 3352 | |
| r7553 | r7554 | |
| 3325 | 3395 | ROM_REGION( 0x400000, "shared", 0 ) |
| 3326 | 3396 | ROM_LOAD( "250a17.14y", 0x000000, 2*1024*1024, CRC(adefa079) SHA1(d25911e3a02d92dc936c3d7e9d76fc270bd1a75a) ) |
| 3327 | 3397 | ROM_LOAD( "250a18.12y", 0x200000, 2*1024*1024, CRC(8014a2eb) SHA1(d82f0a7d559340ae05a78ecc8bb69bb35b9c0658) ) |
| 3398 | ||
| 3399 | // note, it seems impossible to calibrate the controls (again!), this has nothing to do with the default eeprom! | |
| 3400 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 3401 | ROM_LOAD( "racinfrcu.nv", 0x0000, 0x080, CRC(369e1a84) SHA1(bfed0145d89550b1a1661f3ccc612505053063f8) ) | |
| 3328 | 3402 | ROM_END |
| 3329 | 3403 | |
| 3330 | 3404 | |
| r7553 | r7554 | |
| 3408 | 3482 | ROM_REGION( 0x400000, "shared", 0 ) |
| 3409 | 3483 | ROM_LOAD( "218a17.14y", 0x000000, 2*1024*1024, CRC(0b525127) SHA1(218b306c12e1094a676815b7dddaf13bf19be2d5) ) |
| 3410 | 3484 | ROM_LOAD( "218a18.12y", 0x200000, 1*1024*1024, CRC(98ec4cfb) SHA1(638753f9d9269719a37133b9c39c242507fdd8ac) ) |
| 3485 | ||
| 3486 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 3487 | ROM_LOAD( "opengolf.nv", 0x0000, 0x080, CRC(d49bf7c3) SHA1(294c772a2f562c01e7c4d15068ba4e80e9522f9f) ) | |
| 3411 | 3488 | ROM_END |
| 3412 | 3489 | |
| 3413 | 3490 | /* Konami's Open Golf Championship - version EAD */ |
| r7553 | r7554 | |
| 3460 | 3537 | ROM_REGION( 0x400000, "shared", 0 ) |
| 3461 | 3538 | ROM_LOAD( "218a17.14y", 0x000000, 2*1024*1024, CRC(0b525127) SHA1(218b306c12e1094a676815b7dddaf13bf19be2d5) ) |
| 3462 | 3539 | ROM_LOAD( "218a18.12y", 0x200000, 1*1024*1024, CRC(98ec4cfb) SHA1(638753f9d9269719a37133b9c39c242507fdd8ac) ) |
| 3540 | ||
| 3541 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 3542 | ROM_LOAD( "opengolf2.nv", 0x0000, 0x080, CRC(c09fc0e6) SHA1(32807752344763613440bee46da24d605e62eace) ) | |
| 3463 | 3543 | ROM_END |
| 3464 | 3544 | |
| 3465 | 3545 | /* Golfing Greats 2 */ |
| r7553 | r7554 | |
| 3467 | 3547 | /* main program */ |
| 3468 | 3548 | ROM_REGION( 0x800000, "maincpu", 0 ) |
| 3469 | 3549 | GX_BIOS |
| 3470 | ROM_LOAD32_WORD_SWAP( "218jac02.34n", 0x200000, 0x080000, CRC(e4d47f92) SHA1(4761cf69670d97db548b146b127c9af04f8809d6) ) | |
| 3471 | ROM_LOAD32_WORD_SWAP( "218jac03.31n", 0x200002, 0x080000, CRC(ec10c0b2) SHA1(4084d8420c53e73630786adf1a4f0fde548fa212) ) | |
| 3472 | 3550 | |
| 3551 | ROM_LOAD32_WORD_SWAP( "218jac02.34n", 0x200000, 0x080000, CRC(e4d47f92) SHA1(4761cf69670d97db548b146b127c9af04f8809d6) ) | |
| 3552 | ROM_LOAD32_WORD_SWAP( "218jac03.31n", 0x200002, 0x080000, CRC(ec10c0b2) SHA1(4084d8420c53e73630786adf1a4f0fde548fa212) ) | |
| 3553 | ||
| 3473 | 3554 | /* data roms */ |
| 3474 | 3555 | ROM_LOAD32_WORD_SWAP( "218a04.34s", 0x400000, 512*1024, CRC(e50043a7) SHA1(d3a8e214362c34c4151408f422c9b1c723f7f01c) ) |
| 3475 | 3556 | ROM_LOAD32_WORD_SWAP( "218a05.31s", 0x400002, 512*1024, CRC(46c6b5d3) SHA1(e59c6d2dac9db635589149e4b4852e5f6a9c3c4f) ) |
| r7553 | r7554 | |
| 3510 | 3591 | ROM_REGION( 0x400000, "shared", 0 ) |
| 3511 | 3592 | ROM_LOAD( "218a17.14y", 0x000000, 2*1024*1024, CRC(0b525127) SHA1(218b306c12e1094a676815b7dddaf13bf19be2d5) ) |
| 3512 | 3593 | ROM_LOAD( "218a18.12y", 0x200000, 1*1024*1024, CRC(98ec4cfb) SHA1(638753f9d9269719a37133b9c39c242507fdd8ac) ) |
| 3594 | ||
| 3595 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting with error | |
| 3596 | ROM_LOAD( "ggreats2.nv", 0x0000, 0x080, CRC(4db10b5c) SHA1(29e3a59e4101349ace33d49b5fe59f0c785979b3) ) | |
| 3513 | 3597 | ROM_END |
| 3514 | 3598 | |
| 3515 | 3599 | /**********************************************************************************/ |
| r7553 | r7554 | |
| 3585 | 3669 | { "ggreats2", 11, 12, 0, BPP4 }, |
| 3586 | 3670 | { "le2", 13, 1, 1, BPP4 }, |
| 3587 | 3671 | { "le2u", 13, 1, 1, BPP4 }, |
| 3672 | { "le2j", 13, 1, 1, BPP4 }, | |
| 3588 | 3673 | { "gokuparo", 7, 0, 0, BPP5 }, |
| 3589 | 3674 | { "fantjour", 7, 0, 9, BPP5 }, |
| 3675 | { "fantjoura", 7, 0, 9, BPP5 }, | |
| 3590 | 3676 | { "puzldama", 7, 0, 0, BPP5 }, |
| 3591 | 3677 | { "tbyahhoo", 7, 0, 8, BPP5 }, |
| 3592 | 3678 | { "tkmmpzdm", 7, 0, 2, BPP6 }, |
| r7553 | r7554 | |
| 3722 | 3808 | /* dummy parent for the BIOS */ |
| 3723 | 3809 | GAME( 1994, konamigx, 0, konamigx, konamigx, konamigx, ROT0, "Konami", "System GX", GAME_IS_BIOS_ROOT ) |
| 3724 | 3810 | |
| 3725 | ||
| 3811 | /* --------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ | |
| 3726 | 3812 | /* Type 1: standard with an add-on 53936 on the ROM board, analog inputs, */ |
| 3727 | 3813 | /* and optional LAN capability (only on Racin' Force - chips aren't present on the golf games) */ |
| 3728 | 3814 | /* needs the ROZ layer to be playable */ |
| 3815 | /* --------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ | |
| 3816 | ||
| 3729 | 3817 | GAME( 1994, racinfrc, konamigx, racinfrc, racinfrc, konamigx, ROT0, "Konami", "Racin' Force (ver EAC)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| 3730 | 3818 | GAME( 1994, racinfrcu,racinfrc, racinfrc, racinfrc, konamigx, ROT0, "Konami", "Racin' Force (ver UAB)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| 3819 | ||
| 3731 | 3820 | GAME( 1994, opengolf, konamigx, opengolf, racinfrc, konamigx, ROT0, "Konami", "Konami's Open Golf Championship (ver EAE)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| 3732 | 3821 | GAME( 1994, opengolf2,opengolf, opengolf, racinfrc, konamigx, ROT0, "Konami", "Konami's Open Golf Championship (ver EAD)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| 3733 | 3822 | GAME( 1994, ggreats2, opengolf, opengolf, racinfrc, konamigx, ROT0, "Konami", "Golfing Greats 2 (ver JAC)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| 3734 | 3823 | |
| 3735 | ||
| 3824 | /* --------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ | |
| 3736 | 3825 | /* Type 2: totally stock, sometimes with funny protection chips on the ROM board */ |
| 3737 | 3826 | /* these games work and are playable with minor graphics glitches */ |
| 3827 | /* --------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ | |
| 3828 | ||
| 3738 | 3829 | GAME( 1994, le2, konamigx, le2, le2, konamigx, ROT0, "Konami", "Lethal Enforcers II: Gun Fighters (ver EAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3739 | GAME( 1994, le2u, le2, le2, le2, konamigx, ROT0, "Konami", "Lethal Enforcers II: Gun Fighters (ver UAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3740 | GAME( 1994, le2j, le2, le2, le2, konamigx, ROT0, "Konami", "Lethal Enforcers II: Gun Fighters (ver JAA)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING) | |
| 3830 | GAME( 1994, le2u, le2, le2, le2_flip, konamigx, ORIENTATION_FLIP_Y, "Konami", "Lethal Enforcers II: Gun Fighters (ver UAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3831 | GAME( 1994, le2j, le2, le2, le2_flip, konamigx, ORIENTATION_FLIP_Y, "Konami", "Lethal Enforcers II: The Western (ver JAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3832 | ||
| 3741 | 3833 | GAME( 1994, fantjour, konamigx, konamigx, gokuparo, konamigx, ROT0, "Konami", "Fantastic Journey (ver EAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3742 | GAME( 1994, fantjoura,fantjour, konamigx, gokuparo, konamigx, ROT0, "Konami", "Fantastic Journey (ver AAA)", GAME_IMPERFECT_GRAPHICS | |
| 3834 | GAME( 1994, fantjoura,fantjour, konamigx, gokuparo, konamigx, ROT0, "Konami", "Fantastic Journey (ver AAA)", GAME_IMPERFECT_GRAPHICS | |
| 3743 | 3835 | GAME( 1994, gokuparo, fantjour, konamigx, gokuparo, konamigx, ROT0, "Konami", "Gokujyou Parodius (ver JAD)", GAME_IMPERFECT_GRAPHICS ) |
| 3836 | ||
| 3744 | 3837 | GAME( 1994, puzldama, konamigx, konamigx, puzldama, konamigx, ROT0, "Konami", "Taisen Puzzle-dama (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3838 | ||
| 3745 | 3839 | GAME( 1995, tbyahhoo, konamigx, konamigx, gokuparo, konamigx, ROT0, "Konami", "Twin Bee Yahhoo! (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3840 | ||
| 3746 | 3841 | GAME( 1995, tkmmpzdm, konamigx, konamigx_6bpp, puzldama, konamigx, ROT0, "Konami", "Tokimeki Memorial Taisen Puzzle-dama (ver JAB)", GAME_IMPERFECT_GRAPHICS ) |
| 3842 | ||
| 3747 | 3843 | GAME( 1995, dragoona, konamigx, dragoonj, dragoonj, konamigx, ROT0, "Konami", "Dragoon Might (ver AAB)", GAME_IMPERFECT_GRAPHICS ) |
| 3748 | 3844 | GAME( 1995, dragoonj, dragoona, dragoonj, dragoonj, konamigx, ROT0, "Konami", "Dragoon Might (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3845 | ||
| 3749 | 3846 | GAME( 1996, sexyparo, konamigx, konamigx, gokuparo, konamigx, ROT0, "Konami", "Sexy Parodius (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3847 | ||
| 3750 | 3848 | GAME( 1996, daiskiss, konamigx, konamigx, gokuparo, konamigx, ROT0, "Konami", "Daisu-Kiss (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3849 | ||
| 3751 | 3850 | GAME( 1996, tokkae, konamigx, konamigx_6bpp, puzldama, konamigx, ROT0, "Konami", "Taisen Tokkae-dama (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3851 | ||
| 3752 | 3852 | /* protection controls player ship direction in attract mode - doesn't impact playability */ |
| 3753 | 3853 | GAME( 1996, salmndr2, konamigx, konamigx_6bpp_2, gokuparo, konamigx, ROT0, "Konami", "Salamander 2 (ver JAA)", GAME_IMPERFECT_GRAPHICS|GAME_UNEMULATED_PROTECTION ) |
| 3754 | 3854 | GAME( 1996, salmndr2a,salmndr2, konamigx_6bpp_2, gokuparo, konamigx, ROT0, "Konami", "Salamander 2 (ver AAB)", GAME_IMPERFECT_GRAPHICS|GAME_UNEMULATED_PROTECTION ) |
| 3855 | ||
| 3755 | 3856 | /* bad sprite colours, part of tilemap gets blanked out when a game starts (might be more protection) */ |
| 3756 | 3857 | GAME( 1997, winspike, konamigx, winspike, konamigx, konamigx, ROT0, "Konami", "Winning Spike (ver EAA)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS ) |
| 3757 | 3858 | GAME( 1997, winspikej,winspike, winspike, konamigx, konamigx, ROT0, "Konami", "Winning Spike (ver JAA)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS ) |
| 3758 | 3859 | |
| 3860 | /* --------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ | |
| 3759 | 3861 | /* Type 3: dual monitor output and 53936 on the ROM board, external palette RAM */ |
| 3862 | /* --------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ | |
| 3863 | ||
| 3760 | 3864 | GAME( 1994, soccerss, konamigx, gxtype3, type3, konamigx, ROT0, "Konami", "Soccer Superstars (ver EAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3761 | 3865 | GAME( 1994, soccerssj, soccerss, gxtype3, type3, konamigx, ROT0, "Konami", "Soccer Superstars (ver JAC)", GAME_IMPERFECT_GRAPHICS ) // writes JAB to EEPROM, but should be version JAC according to labels |
| 3762 | 3866 | GAME( 1994, soccerssja,soccerss, gxtype3, type3, konamigx, ROT0, "Konami", "Soccer Superstars (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3763 | 3867 | GAME( 1994, soccerssa, soccerss, gxtype3, type3, konamigx, ROT0, "Konami", "Soccer Superstars (ver AAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3764 | 3868 | |
| 3869 | /* --------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ | |
| 3765 | 3870 | /* Type 4: dual monitor output and 53936 on the ROM board, external palette RAM, DMA protection */ |
| 3871 | /* --------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ | |
| 3872 | ||
| 3766 | 3873 | GAME( 1996, vsnetscr, konamigx, gxtype4_vsn, type3, konamigx, ROT0, "Konami", "Versus Net Soccer (ver EAD)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3767 | 3874 | GAME( 1996, vsnetscreb,vsnetscr, gxtype4_vsn, type3, konamigx, ROT0, "Konami", "Versus Net Soccer (ver EAB)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3768 | 3875 | GAME( 1996, vsnetscru, vsnetscr, gxtype4_vsn, type3, konamigx, ROT0, "Konami", "Versus Net Soccer (ver UAB)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3769 | 3876 | GAME( 1996, vsnetscra, vsnetscr, gxtype4_vsn, type3, konamigx, ROT0, "Konami", "Versus Net Soccer (ver AAA)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3770 | 3877 | GAME( 1996, vsnetscrj, vsnetscr, gxtype4_vsn, type3, konamigx, ROT0, "Konami", "Versus Net Soccer (ver JAB)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3878 | ||
| 3771 | 3879 | GAME( 1996, rungun2, konamigx, gxtype4sd2, type3, konamigx, ROT0, "Konami", "Run and Gun 2 (ver UAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3772 | 3880 | GAME( 1996, slamdnk2, rungun2, gxtype4sd2, type3, konamigx, ROT0, "Konami", "Slam Dunk 2 (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3881 | ||
| 3773 | 3882 | GAME( 1996, rushhero, konamigx, gxtype4, type3, konamigx, ROT0, "Konami", "Rushing Heroes (ver UAB)", GAME_IMPERFECT_GRAPHICS ) |
| r7553 | r7554 | |
|---|---|---|
| 595 | 595 | |
| 596 | 596 | ROM_REGION( 0x100000, "k053260", 0 ) /* 053260 samples */ |
| 597 | 597 | ROM_LOAD( "081a03", 0x000000, 0x100000, CRC(14b6baea) SHA1(fe15ee57f19f5acaad6c1642d51f390046a7468a) ) |
| 598 | ||
| 599 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 600 | ROM_LOAD( "vendetta.nv", 0x0000, 0x080, CRC(fbac4e30) SHA1(d3ff3a392550d9b06400b9292a44bdac7ba5c801) ) | |
| 598 | 601 | ROM_END |
| 599 | 602 | |
| 600 | 603 | ROM_START( vendettar ) |
| r7553 | r7554 | |
| 617 | 620 | |
| 618 | 621 | ROM_REGION( 0x100000, "k053260", 0 ) /* 053260 samples */ |
| 619 | 622 | ROM_LOAD( "081a03", 0x000000, 0x100000, CRC(14b6baea) SHA1(fe15ee57f19f5acaad6c1642d51f390046a7468a) ) |
| 623 | ||
| 624 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 625 | ROM_LOAD( "vendettar.nv", 0x0000, 0x080, CRC(ec3f0449) SHA1(da35b98cd10bfabe9df3ede05462fabeb0e01ca9) ) | |
| 620 | 626 | ROM_END |
| 621 | 627 | |
| 622 | 628 | ROM_START( vendetta2p ) |
| r7553 | r7554 | |
| 639 | 645 | |
| 640 | 646 | ROM_REGION( 0x100000, "k053260", 0 ) /* 053260 samples */ |
| 641 | 647 | ROM_LOAD( "081a03", 0x000000, 0x100000, CRC(14b6baea) SHA1(fe15ee57f19f5acaad6c1642d51f390046a7468a) ) |
| 648 | ||
| 649 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 650 | ROM_LOAD( "vendetta.nv", 0x0000, 0x080, CRC(fbac4e30) SHA1(d3ff3a392550d9b06400b9292a44bdac7ba5c801) ) | |
| 642 | 651 | ROM_END |
| 643 | 652 | |
| 644 | 653 | ROM_START( vendetta2pu ) |
| r7553 | r7554 | |
| 661 | 670 | |
| 662 | 671 | ROM_REGION( 0x100000, "k053260", 0 ) /* 053260 samples */ |
| 663 | 672 | ROM_LOAD( "081a03", 0x000000, 0x100000, CRC(14b6baea) SHA1(fe15ee57f19f5acaad6c1642d51f390046a7468a) ) |
| 673 | ||
| 674 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 675 | ROM_LOAD( "vendetta.nv", 0x0000, 0x080, CRC(fbac4e30) SHA1(d3ff3a392550d9b06400b9292a44bdac7ba5c801) ) | |
| 664 | 676 | ROM_END |
| 665 | 677 | |
| 666 | 678 | ROM_START( vendetta2pd ) |
| r7553 | r7554 | |
| 683 | 695 | |
| 684 | 696 | ROM_REGION( 0x100000, "k053260", 0 ) /* 053260 samples */ |
| 685 | 697 | ROM_LOAD( "081a03", 0x000000, 0x100000, CRC(14b6baea) SHA1(fe15ee57f19f5acaad6c1642d51f390046a7468a) ) |
| 698 | ||
| 699 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 700 | ROM_LOAD( "vendetta.nv", 0x0000, 0x080, CRC(fbac4e30) SHA1(d3ff3a392550d9b06400b9292a44bdac7ba5c801) ) | |
| 686 | 701 | ROM_END |
| 687 | 702 | |
| 688 | 703 | ROM_START( vendettaj ) |
| r7553 | r7554 | |
| 705 | 720 | |
| 706 | 721 | ROM_REGION( 0x100000, "k053260", 0 ) /* 053260 samples */ |
| 707 | 722 | ROM_LOAD( "081a03", 0x000000, 0x100000, CRC(14b6baea) SHA1(fe15ee57f19f5acaad6c1642d51f390046a7468a) ) |
| 723 | ||
| 724 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 725 | ROM_LOAD( "vendettaj.nv", 0x0000, 0x080, CRC(3550a54e) SHA1(370cd40a12c471b3b6690ecbdde9c7979bc2a652) ) | |
| 708 | 726 | ROM_END |
| 709 | 727 | |
| 710 | 728 | ROM_START( esckids ) |
| r7553 | r7554 | |
| 727 | 745 | |
| 728 | 746 | ROM_REGION( 0x100000, "k053260", 0 ) // Samples MASK-ROM (4M x 1) |
| 729 | 747 | ROM_LOAD( "975c03", 0x000000, 0x080000, CRC(dc4a1707) SHA1(f252d08483fd664f8fc03bf8f174efd452b4cdc5) ) |
| 748 | ||
| 749 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 750 | ROM_LOAD( "esckids.nv", 0x0000, 0x080, CRC(a8522e1f) SHA1(43f82fce3c3b854bc8898c63dffc7c01b288c8aa) ) | |
| 730 | 751 | ROM_END |
| 731 | 752 | |
| 732 | 753 | |
| r7553 | r7554 | |
| 750 | 771 | |
| 751 | 772 | ROM_REGION( 0x100000, "k053260", 0 ) // Samples MASK-ROM (4M x 1) |
| 752 | 773 | ROM_LOAD( "975c03", 0x000000, 0x080000, CRC(dc4a1707) SHA1(f252d08483fd664f8fc03bf8f174efd452b4cdc5) ) |
| 774 | ||
| 775 | ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error | |
| 776 | ROM_LOAD( "esckidsj.nv", 0x0000, 0x080, CRC(985e2a2d) SHA1(afd9e5fc014d593d0a384326f32caf2a73fba867) ) | |
| 753 | 777 | ROM_END |
| 754 | 778 | |
| 755 | 779 |
| r7553 | r7554 | |
|---|---|---|
| 10 | 10 | Thank you to Shiriru for the scanline rendering (including alpha blending), |
| 11 | 11 | sprite sync fixes, sprite zoom fixes and others! |
| 12 | 12 | |
| 13 | Main Issues: | |
| 14 | - Sound eats lots of memory as 8 bit PCM data is decoded as 16 bit for | |
| 15 | use by the current ES5505 core (which rightly should be 16 bit). | |
| 16 | ||
| 17 | 13 | Other Issues: |
| 18 | 14 | - Dsp isn't hooked up. |
| 19 | 15 | - Crowd/boards not shown in the football games |
| 20 | 16 | - Sound doesn't work in RidingF/RingRage? |
| 17 | (for RingRage it's probably a timing / cpu sync bug, if you go into test mode | |
| 18 | for a while then exit you'll have sound, this doesn't work on RidingF) | |
| 21 | 19 | - It does work in ringrage but you have to enter test mode first |
| 22 | 20 | - Sound balance is not emulated (see arabianm test mode) |
| 23 | 21 | - When playing space invaders dx in original mode, t.t. with overlay, the |
| 24 | 22 | alpha blending effect is wrong (see Taito B version of game) |
| 25 | 23 | - Bubble Symphony has an alpha transition effect that doesn't appear in Mame |
| 24 | - Various other missing blending effects (see Mametesters) | |
| 26 | 25 | |
| 27 | 26 | Feel free to report any other issues to me. |
| 28 | 27 | |
| r7553 | r7554 | |
| 2832 | 2831 | ROM_REGION16_BE(0x800000, "ensoniq.0" , ROMREGION_ERASE00 ) // V2: 4 banks, only 2 populated |
| 2833 | 2832 | ROM_LOAD16_BYTE("e21-03.rom", 0x000000, 0x200000, CRC(54c5f83d) SHA1(10a993199c8d5a1361bd29a4b92c404451c6da01) ) // C8 C9 CA CB |
| 2834 | 2833 | ROM_LOAD16_BYTE("e21-04.rom", 0x400000, 0x200000, CRC(e5af2a2d) SHA1(62a49504decc7160b710260218920d2d6d2af8f0) ) // CC CD -std- |
| 2834 | ||
| 2835 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 2836 | ROM_LOAD( "bubblem.nv", 0x0000, 0x0080, CRC(9a59326e) SHA1(071dbfbfd77f7020476ddb54c93f5fafa7a08159) ) | |
| 2835 | 2837 | ROM_END |
| 2836 | 2838 | |
| 2837 | 2839 | ROM_START( bubblemj ) |
| r7553 | r7554 | |
| 2859 | 2861 | ROM_REGION16_BE(0x800000, "ensoniq.0" , ROMREGION_ERASE00 ) // V2: 4 banks, only 2 populated |
| 2860 | 2862 | ROM_LOAD16_BYTE("e21-03.rom", 0x000000, 0x200000, CRC(54c5f83d) SHA1(10a993199c8d5a1361bd29a4b92c404451c6da01) ) // C8 C9 CA CB |
| 2861 | 2863 | ROM_LOAD16_BYTE("e21-04.rom", 0x400000, 0x200000, CRC(e5af2a2d) SHA1(62a49504decc7160b710260218920d2d6d2af8f0) ) // CC CD -std- |
| 2864 | ||
| 2865 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 2866 | ROM_LOAD( "bubblemj.nv", 0x0000, 0x0080, CRC(cb4ef35c) SHA1(e0202b775d2494b77b1c08bafbfd239e40555dc6) ) | |
| 2862 | 2867 | ROM_END |
| 2863 | 2868 | |
| 2864 | 2869 | ROM_START( cleopatr ) |
| r7553 | r7554 | |
|---|---|---|
| 317 | 317 | { |
| 318 | 318 | if (data & 0x800000) |
| 319 | 319 | { |
| 320 | mame_printf_debug("CPU '%s': CPU1 IRQ at %08X\n", space->cpu->tag | |
| 320 | mame_printf_debug("CPU '%s': CPU1 IRQ at %08X\n", space->cpu->tag | |
| 321 | 321 | cputag_set_input_line(space->machine, "sub", INPUT_LINE_IRQ0, ASSERT_LINE); |
| 322 | 322 | } |
| 323 | 323 |
| r7553 | r7554 | |
|---|---|---|
| 1885 | 1885 | |
| 1886 | 1886 | ROM_START( startrkd ) |
| 1887 | 1887 | ROM_REGION( 0x19000, "maincpu", 0 ) |
| 1888 | ROM_LOAD( "rom8.bin", 0x0d000, 0x1000, CRC(5af871e3) SHA1(f9a42619b37db2eb07d0302ac9d0ff5c1923c21d) ) | |
| 1889 | ROM_LOAD( "rom9.bin", 0x0e000, 0x1000, CRC(1126adc9) SHA1(526cf1ca3a7eefd6115d74ac9af1a50774cc258e) ) | |
| 1890 | ROM_LOAD( "rom10.bin", 0x0f000, 0x1000, CRC(4097b46b) SHA1(8f506dc59b129c9441d813062fc38747619678db) ) | |
| 1891 | ROM_LOAD( "rom6.bin", 0x10000, 0x0800, CRC(93012991) SHA1(9e06ed4a489b2ed063f83b708d3e7c6a02e45389) ) | |
| 1892 | ROM_LOAD( "rom5.bin", 0x10800, 0x0800, CRC(c6f0c004) SHA1(57c547b804ad3eceb33a9390bbffcfc0b63f16dd) ) | |
| 1893 | ROM_LOAD( "rom4.bin", 0x11000, 0x0800, CRC(b48430bf) SHA1(6572812f3a1e6eede3dff3273f16846799e79ed9) ) | |
| 1894 | ROM_LOAD( "rom3.bin", 0x11800, 0x0800, CRC(d068f0c5) SHA1(d32a4232756ca05972780cb35b0add12b31e8283) ) | |
| 1895 | ROM_LOAD( "rom2.bin", 0x12000, 0x0800, CRC(fef4cb77) SHA1(96202e97f3392bc043a252e78d1c42b51c38d269) ) | |
| 1896 | ROM_LOAD( "rom1.bin", 0x12800, 0x0800, CRC(d23d6cdb) SHA1(2ce9fe269598919f994339c8f8685d6a79e417d8) ) | |
| 1897 | ROM_LOAD( "rom7.bin", 0x16000, 0x0800, CRC(43d42a1b) SHA1(b13d59940646451c00b49bbe4a41b9e2df4d7758) ) | |
| 1888 | ROM_LOAD( "st_rom8.bin", 0x0d000, 0x1000, CRC(5af871e3) SHA1(f9a42619b37db2eb07d0302ac9d0ff5c1923c21d) ) | |
| 1889 | ROM_LOAD( "st_rom9.bin", 0x0e000, 0x1000, CRC(1126adc9) SHA1(526cf1ca3a7eefd6115d74ac9af1a50774cc258e) ) | |
| 1890 | ROM_LOAD( "st_rom10.bin", 0x0f000, 0x1000, CRC(4097b46b) SHA1(8f506dc59b129c9441d813062fc38747619678db) ) | |
| 1891 | ROM_LOAD( "st_rom6.bin", 0x10000, 0x0800, CRC(93012991) SHA1(9e06ed4a489b2ed063f83b708d3e7c6a02e45389) ) | |
| 1892 | ROM_LOAD( "st_rom5.bin", 0x10800, 0x0800, CRC(c6f0c004) SHA1(57c547b804ad3eceb33a9390bbffcfc0b63f16dd) ) | |
| 1893 | ROM_LOAD( "st_rom4.bin", 0x11000, 0x0800, CRC(b48430bf) SHA1(6572812f3a1e6eede3dff3273f16846799e79ed9) ) | |
| 1894 | ROM_LOAD( "st_rom3.bin", 0x11800, 0x0800, CRC(d068f0c5) SHA1(d32a4232756ca05972780cb35b0add12b31e8283) ) | |
| 1895 | ROM_LOAD( "st_rom2.bin", 0x12000, 0x0800, CRC(fef4cb77) SHA1(96202e97f3392bc043a252e78d1c42b51c38d269) ) | |
| 1896 | ROM_LOAD( "st_rom1.bin", 0x12800, 0x0800, CRC(d23d6cdb) SHA1(2ce9fe269598919f994339c8f8685d6a79e417d8) ) | |
| 1897 | ROM_LOAD( "st_rom7.bin", 0x16000, 0x0800, CRC(43d42a1b) SHA1(b13d59940646451c00b49bbe4a41b9e2df4d7758) ) | |
| 1898 | 1898 | |
| 1899 | 1899 | ROM_REGION( 0x10000, "soundcpu", 0 ) |
| 1900 | 1900 | ROM_LOAD( "defend.snd", 0xf800, 0x0800, CRC(fefd5b48) SHA1(ceb0d18483f0691978c604db94417e6941ad7ff2) ) |
| r7553 | r7554 | |
|---|---|---|
| 181 | 181 | |
| 182 | 182 | static void tbowl_adpcm_int(running_device *device) |
| 183 | 183 | { |
| 184 | int num = (strcmp(device->tag, "msm1") == 0) ? 0 : 1; | |
| 184 | int num = (strcmp(device->tag(), "msm1") == 0) ? 0 : 1; | |
| 185 | 185 | if (adpcm_pos[num] >= adpcm_end[num] || |
| 186 | 186 | adpcm_pos[num] >= memory_region_length(device->machine, "adpcm")/2) |
| 187 | 187 | msm5205_reset_w(device,1); |
| r7553 | r7554 | |
|---|---|---|
| 16 | 16 | Year + Game PCB Video Chip Issues / Notes |
| 17 | 17 | --------------------------------------------------------------------------- |
| 18 | 18 | 97 Rabbit VG5330-B 15000 |
| 19 | 97? Tokimeki Mahjong Paradise | |
| 19 | 97? Tokimeki Mahjong Paradise(1)VG5550-B 15000 | |
| 20 | 20 | --------------------------------------------------------------------------- |
| 21 | 21 | Not dumped yet: |
| 22 | 22 | unknown |
| r7553 | r7554 | |
| 27 | 27 | - clean up zoom code and make zoom effect more accurate |
| 28 | 28 | - sound (adpcm of some kind) |
| 29 | 29 | - status bar in rabbit is the wrong colour, timing of blitter / interrupts? |
| 30 | - eeprom hookup seems flakey | |
| 31 | 30 | |
| 31 | Notes: | |
| 32 | ||
| 33 | (1) This is currently in it's own driver "tmmjprd.c" because it uses the | |
| 34 | chip in a completely different way to Rabbit. They should be merged | |
| 35 | again later, once the chip is better understood. | |
| 36 | ||
| 37 | ||
| 32 | 38 | */ |
| 33 | 39 | |
| 34 | 40 | /* |
| r7553 | r7554 | |
| 1003 | 1009 | ROM_REGION( 0x400000, "unknown", 0 ) /* sound rom */ |
| 1004 | 1010 | ROM_LOAD( "jsn0.11", 0x0000000, 0x400000, CRC(e1f726e8) SHA1(598d75f3ff9e43ec8ce6131ed37f4345bf2f2d8e) ) |
| 1005 | 1011 | |
| 1012 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 1013 | ROM_LOAD( "rabbit.nv", 0x0000, 0x0080, CRC(73d471ed) SHA1(45e045f5ea9036342b88013e021d402741d98537) ) | |
| 1006 | 1014 | ROM_END |
| 1007 | 1015 | |
| 1008 | 1016 | |
| 1009 | GAME( 1997, rabbit, 0, rabbit, rabbit, rabbit, ROT0, "Electronic Arts / Aorn", "Rabbit", GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) // somewhat playable | |
| 1017 | GAME( 1997, rabbit, 0, rabbit, rabbit, rabbit, ROT0, "Electronic Arts / Aorn", "Rabbit (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) // somewhat playable |
| r7553 | r7554 | |
|---|---|---|
| 620 | 620 | |
| 621 | 621 | static void extract_window_config(running_machine *machine, int index, sdl_window_config *conf) |
| 622 | 622 | { |
| 623 | char buf[ | |
| 623 | char buf[20]; | |
| 624 | 624 | |
| 625 | 625 | sprintf(buf,SDLOPTION_RESOLUTION("%d"), index); |
| 626 | 626 | // per-window options: extract the data |
| r7553 | r7554 | |
|---|---|---|
| 554 | 554 | if (info != NULL && (info->flags & DEBUG_FLAG_STOP_INTERRUPT) != 0 && (info->stopirq == -1 || info->stopirq == irqline)) |
| 555 | 555 | { |
| 556 | 556 | global->execution_state = EXECUTION_STATE_STOPPED; |
| 557 | debug_console_printf(device->machine, "Stopped on interrupt (CPU '%s', IRQ %d)\n", device->tag | |
| 557 | debug_console_printf(device->machine, "Stopped on interrupt (CPU '%s', IRQ %d)\n", device->tag | |
| 558 | 558 | compute_debug_flags(device); |
| 559 | 559 | } |
| 560 | 560 | } |
| r7553 | r7554 | |
| 574 | 574 | if ((info->flags & DEBUG_FLAG_STOP_EXCEPTION) != 0 && (info->stopexception == -1 || info->stopexception == exception)) |
| 575 | 575 | { |
| 576 | 576 | global->execution_state = EXECUTION_STATE_STOPPED; |
| 577 | debug_console_printf(device->machine, "Stopped on exception (CPU '%s', exception %d)\n", device->tag | |
| 577 | debug_console_printf(device->machine, "Stopped on exception (CPU '%s', exception %d)\n", device->tag | |
| 578 | 578 | compute_debug_flags(device); |
| 579 | 579 | } |
| 580 | 580 | } |
| r7553 | r7554 | |
| 641 | 641 | /* check the temp running breakpoint and break if we hit it */ |
| 642 | 642 | else if ((info->flags & DEBUG_FLAG_STOP_PC) != 0 && info->stopaddr == curpc) |
| 643 | 643 | { |
| 644 | debug_console_printf(device->machine, "Stopped at temporary breakpoint %X on CPU '%s'\n", info->stopaddr, device->tag | |
| 644 | debug_console_printf(device->machine, "Stopped at temporary breakpoint %X on CPU '%s'\n", info->stopaddr, device->tag | |
| 645 | 645 | global->execution_state = EXECUTION_STATE_STOPPED; |
| 646 | 646 | } |
| 647 | 647 | |
| r7553 | r7554 | |
| 2448 | 2448 | running_device *device; |
| 2449 | 2449 | |
| 2450 | 2450 | for (device = machine->devicelist.first(); device != NULL; device = device->next) |
| 2451 | if (mame_stricmp(device->tag, tag) == 0) | |
| 2451 | if (mame_stricmp(device->tag(), tag) == 0) | |
| 2452 | 2452 | return device; |
| 2453 | 2453 | |
| 2454 | 2454 | return NULL; |
| r7553 | r7554 | |
|---|---|---|
| 1036 | 1036 | /* populate the subview */ |
| 1037 | 1037 | subview->next = NULL; |
| 1038 | 1038 | subview->index = curindex++; |
| 1039 | subview->name.printf("CPU '%s' (%s)", cpu->tag | |
| 1039 | subview->name.printf("CPU '%s' (%s)", cpu->tag | |
| 1040 | 1040 | subview->device = cpu; |
| 1041 | 1041 | |
| 1042 | 1042 | /* add to the list */ |
| r7553 | r7554 | |
| 1492 | 1492 | /* populate the subview */ |
| 1493 | 1493 | subview->next = NULL; |
| 1494 | 1494 | subview->index = curindex++; |
| 1495 | subview->name.printf("CPU '%s' (%s)", cpu->tag | |
| 1495 | subview->name.printf("CPU '%s' (%s)", cpu->tag | |
| 1496 | 1496 | subview->space = space; |
| 1497 | 1497 | |
| 1498 | 1498 | /* add to the list */ |
| r7553 | r7554 | |
| 2365 | 2365 | subview->next = NULL; |
| 2366 | 2366 | subview->index = curindex++; |
| 2367 | 2367 | if (device->type == CPU) |
| 2368 | subview->name.printf("CPU '%s' (%s) %s memory", device->tag | |
| 2368 | subview->name.printf("CPU '%s' (%s) %s memory", device->tag | |
| 2369 | 2369 | else |
| 2370 | subview->name.printf("%s '%s' space #%d memory", device->name(), device->tag | |
| 2370 | subview->name.printf("%s '%s' space #%d memory", device->name(), device->tag | |
| 2371 | 2371 | subview->space = space; |
| 2372 | 2372 | subview->endianness = space->endianness; |
| 2373 | 2373 | subview->prefsize = space->dbits / 8; |
| r7553 | r7554 | |
|---|---|---|
| 571 | 571 | *result = cpu_get_address_space(cpu, spacenum); |
| 572 | 572 | if (*result == NULL) |
| 573 | 573 | { |
| 574 | debug_console_printf(machine, "No %s memory space found for CPU '%s'\n", address_space_names[spacenum], cpu->tag | |
| 574 | debug_console_printf(machine, "No %s memory space found for CPU '%s'\n", address_space_names[spacenum], cpu->tag | |
| 575 | 575 | return FALSE; |
| 576 | 576 | } |
| 577 | 577 | return TRUE; |
| r7553 | r7554 | |
| 987 | 987 | for (scancpu = machine->firstcpu; scancpu != NULL; scancpu = cpu_next(scancpu)) |
| 988 | 988 | if (scancpu != cpu) |
| 989 | 989 | debug_cpu_ignore_cpu(scancpu, 1); |
| 990 | debug_console_printf(machine, "Now focused on CPU '%s'\n", cpu->tag | |
| 990 | debug_console_printf(machine, "Now focused on CPU '%s'\n", cpu->tag | |
| 991 | 991 | } |
| 992 | 992 | |
| 993 | 993 | |
| r7553 | r7554 | |
| 1015 | 1015 | if ((cpuinfo->flags & DEBUG_FLAG_OBSERVING) == 0) |
| 1016 | 1016 | { |
| 1017 | 1017 | if (buflen == 0) |
| 1018 | buflen += sprintf(&buffer[buflen], "Currently ignoring CPU '%s'", cpu->tag | |
| 1018 | buflen += sprintf(&buffer[buflen], "Currently ignoring CPU '%s'", cpu->tag | |
| 1019 | 1019 | else |
| 1020 | buflen += sprintf(&buffer[buflen], ", '%s'", cpu->tag | |
| 1020 | buflen += sprintf(&buffer[buflen], ", '%s'", cpu->tag | |
| 1021 | 1021 | } |
| 1022 | 1022 | } |
| 1023 | 1023 | |
| r7553 | r7554 | |
| 1049 | 1049 | } |
| 1050 | 1050 | |
| 1051 | 1051 | debug_cpu_ignore_cpu(cpuwhich[paramnum], 1); |
| 1052 | debug_console_printf(machine, "Now ignoring CPU '%s'\n", cpuwhich[paramnum]->tag | |
| 1052 | debug_console_printf(machine, "Now ignoring CPU '%s'\n", cpuwhich[paramnum]->tag | |
| 1053 | 1053 | } |
| 1054 | 1054 | } |
| 1055 | 1055 | } |
| r7553 | r7554 | |
| 1079 | 1079 | if ((cpuinfo->flags & DEBUG_FLAG_OBSERVING) != 0) |
| 1080 | 1080 | { |
| 1081 | 1081 | if (buflen == 0) |
| 1082 | buflen += sprintf(&buffer[buflen], "Currently observing CPU '%s'", cpu->tag | |
| 1082 | buflen += sprintf(&buffer[buflen], "Currently observing CPU '%s'", cpu->tag | |
| 1083 | 1083 | else |
| 1084 | buflen += sprintf(&buffer[buflen], ", '%s'", cpu->tag | |
| 1084 | buflen += sprintf(&buffer[buflen], ", '%s'", cpu->tag | |
| 1085 | 1085 | } |
| 1086 | 1086 | } |
| 1087 | 1087 | |
| r7553 | r7554 | |
| 1103 | 1103 | for (paramnum = 0; paramnum < params; paramnum++) |
| 1104 | 1104 | { |
| 1105 | 1105 | debug_cpu_ignore_cpu(cpuwhich[paramnum], 0); |
| 1106 | debug_console_printf(machine, "Now observing CPU '%s'\n", cpuwhich[paramnum]->tag | |
| 1106 | debug_console_printf(machine, "Now observing CPU '%s'\n", cpuwhich[paramnum]->tag | |
| 1107 | 1107 | } |
| 1108 | 1108 | } |
| 1109 | 1109 | } |
| r7553 | r7554 | |
| 1309 | 1309 | { |
| 1310 | 1310 | debug_cpu_breakpoint *bp; |
| 1311 | 1311 | |
| 1312 | debug_console_printf(machine, "CPU '%s' breakpoints:\n", cpu->tag | |
| 1312 | debug_console_printf(machine, "CPU '%s' breakpoints:\n", cpu->tag | |
| 1313 | 1313 | |
| 1314 | 1314 | /* loop over the breakpoints */ |
| 1315 | 1315 | for (bp = cpuinfo->bplist; bp != NULL; bp = bp->next) |
| r7553 | r7554 | |
| 1497 | 1497 | const address_space *space = cpu_get_address_space(cpu, spacenum); |
| 1498 | 1498 | debug_cpu_watchpoint *wp; |
| 1499 | 1499 | |
| 1500 | debug_console_printf(machine, "CPU '%s' %s space watchpoints:\n", cpu->tag | |
| 1500 | debug_console_printf(machine, "CPU '%s' %s space watchpoints:\n", cpu->tag | |
| 1501 | 1501 | |
| 1502 | 1502 | /* loop over the watchpoints */ |
| 1503 | 1503 | for (wp = cpuinfo->wplist[spacenum]; wp != NULL; wp = wp->next) |
| r7553 | r7554 | |
| 1546 | 1546 | if (cpuinfo->hotspots != NULL) |
| 1547 | 1547 | { |
| 1548 | 1548 | debug_cpu_hotspot_track(cpuinfo->device, 0, 0); |
| 1549 | debug_console_printf(machine, "Cleared hotspot tracking on CPU '%s'\n", cpu->tag | |
| 1549 | debug_console_printf(machine, "Cleared hotspot tracking on CPU '%s'\n", cpu->tag | |
| 1550 | 1550 | cleared = TRUE; |
| 1551 | 1551 | } |
| 1552 | 1552 | } |
| r7553 | r7554 | |
| 1568 | 1568 | |
| 1569 | 1569 | /* attempt to install */ |
| 1570 | 1570 | if (debug_cpu_hotspot_track(cpu, count, threshhold)) |
| 1571 | debug_console_printf(machine, "Now tracking hotspots on CPU '%s' using %d slots with a threshhold of %d\n", cpu->tag | |
| 1571 | debug_console_printf(machine, "Now tracking hotspots on CPU '%s' using %d slots with a threshhold of %d\n", cpu->tag | |
| 1572 | 1572 | else |
| 1573 | 1573 | debug_console_printf(machine, "Error setting up the hotspot tracking\n"); |
| 1574 | 1574 | } |
| r7553 | r7554 | |
| 2100 | 2100 | active_cheat++; |
| 2101 | 2101 | fprintf(f, " <cheat desc=\"Possibility %d : %s (%s)\">\n", active_cheat, core_i64_hex_format(address, space->logaddrchars), core_i64_hex_format(value, cheat.width * 2)); |
| 2102 | 2102 | fprintf(f, " <script state=\"run\">\n"); |
| 2103 | fprintf(f, " <action>%s.p%c%c@%s=%s</action>\n", cpu->tag | |
| 2103 | fprintf(f, " <action>%s.p%c%c@%s=%s</action>\n", cpu->tag | |
| 2104 | 2104 | fprintf(f, " </script>\n"); |
| 2105 | 2105 | fprintf(f, " </cheat>\n\n"); |
| 2106 | 2106 | } |
| r7553 | r7554 | |
| 2399 | 2399 | /* do it */ |
| 2400 | 2400 | debug_cpu_trace(cpu, f, trace_over, action); |
| 2401 | 2401 | if (f) |
| 2402 | debug_console_printf(machine, "Tracing CPU '%s' to file %s\n", cpu->tag | |
| 2402 | debug_console_printf(machine, "Tracing CPU '%s' to file %s\n", cpu->tag | |
| 2403 | 2403 | else |
| 2404 | debug_console_printf(machine, "Stopped tracing on CPU '%s'\n", cpu->tag | |
| 2404 | debug_console_printf(machine, "Stopped tracing on CPU '%s'\n", cpu->tag | |
| 2405 | 2405 | } |
| 2406 | 2406 | |
| 2407 | 2407 | |
| r7553 | r7554 | |
| 2622 | 2622 | if (cpu != NULL) |
| 2623 | 2623 | { |
| 2624 | 2624 | symtable = debug_cpu_get_symtable(cpu); |
| 2625 | debug_console_printf(machine, "CPU '%s' symbols:\n", cpu->tag | |
| 2625 | debug_console_printf(machine, "CPU '%s' symbols:\n", cpu->tag | |
| 2626 | 2626 | } |
| 2627 | 2627 | else |
| 2628 | 2628 | { |
| r7553 | r7554 | |
|---|---|---|
| 393 | 393 | xml_data_node *curnode = xml_add_child(systemnode, "cpu", NULL); |
| 394 | 394 | if (curnode == NULL) |
| 395 | 395 | goto error; |
| 396 | xml_set_attribute(curnode, "tag", cpu->tag); | |
| 396 | xml_set_attribute(curnode, "tag", cpu->tag()); | |
| 397 | 397 | |
| 398 | 398 | for (j = 0; j < comments->comment_count; j++) |
| 399 | 399 | { |
| r7553 | r7554 | |
|---|---|---|
| 438 | 438 | { |
| 439 | 439 | if (m68_state->nmi_state == state) return; |
| 440 | 440 | m68_state->nmi_state = state; |
| 441 | LOG(("M6809 '%s' set_irq_line (NMI) %d\n", m68_state->device->tag | |
| 441 | LOG(("M6809 '%s' set_irq_line (NMI) %d\n", m68_state->device->tag | |
| 442 | 442 | if( state == CLEAR_LINE ) return; |
| 443 | 443 | |
| 444 | 444 | /* if the stack was not yet initialized */ |
| r7553 | r7554 | |
| 469 | 469 | } |
| 470 | 470 | else if (irqline < 2) |
| 471 | 471 | { |
| 472 | LOG(("M6809 '%s' set_irq_line %d, %d\n", m68_state->device->tag | |
| 472 | LOG(("M6809 '%s' set_irq_line %d, %d\n", m68_state->device->tag | |
| 473 | 473 | m68_state->irq_state[irqline] = state; |
| 474 | 474 | if (state == CLEAR_LINE) return; |
| 475 | 475 | check_irq_lines(m68_state); |
| r7553 | r7554 | |
|---|---|---|
| 567 | 567 | case 0xdd: // serial Rx 0 |
| 568 | 568 | val = memory_read_byte(h8->io, H8_SERIAL_0); |
| 569 | 569 | break; |
| 570 | case 0xe0: // ADC 0 low byte | |
| 571 | val = memory_read_byte(h8->io, H8_ADC_0_L); | |
| 572 | break; | |
| 573 | case 0xe1: // ADC 0 high byte | |
| 574 | val = memory_read_byte(h8->io, H8_ADC_0_H); | |
| 575 | break; | |
| 576 | case 0xe2: // ADC 1 low byte | |
| 577 | val = memory_read_byte(h8->io, H8_ADC_1_L); | |
| 578 | break; | |
| 579 | case 0xe3: // ADC 1 high byte | |
| 580 | val = memory_read_byte(h8->io, H8_ADC_1_H); | |
| 581 | break; | |
| 582 | case 0xe4: // ADC 2 low byte | |
| 583 | val = memory_read_byte(h8->io, H8_ADC_2_L); | |
| 584 | break; | |
| 585 | case 0xe5: // ADC 2 high byte | |
| 586 | val = memory_read_byte(h8->io, H8_ADC_2_H); | |
| 587 | break; | |
| 588 | case 0xe6: // ADC 3 low byte | |
| 589 | val = memory_read_byte(h8->io, H8_ADC_3_L); | |
| 590 | break; | |
| 591 | case 0xe7: // ADC 3 high byte | |
| 592 | val = memory_read_byte(h8->io, H8_ADC_3_H); | |
| 593 | break; | |
| 594 | case 0xe8: // ADCSR: A/D control/status | |
| 595 | val = 0x80; // return conversion completed | |
| 596 | break; | |
| 570 | 597 | default: |
| 571 | 598 | val = h8->per_regs[reg]; |
| 572 | 599 | break; |
| r7553 | r7554 | |
|---|---|---|
| 749 | 749 | case 0xfee018: return h8->per_regs[0xF8]; // IPRA |
| 750 | 750 | } |
| 751 | 751 | |
| 752 | logerror("cpu '%s' (PC=%08X): unmapped I/O(1) byte read from %08X\n",h8->device->tag | |
| 752 | logerror("cpu '%s' (PC=%08X): unmapped I/O(1) byte read from %08X\n",h8->device->tag | |
| 753 | 753 | return 0; |
| 754 | 754 | } |
| 755 | 755 | |
| r7553 | r7554 | |
| 761 | 761 | case 0xfee016: h8_ISR_w(h8, val); return; // ISR |
| 762 | 762 | case 0xfee018: h8->per_regs[0xF8] = val; return; // IPRA |
| 763 | 763 | } |
| 764 | logerror("cpu '%s' (PC=%08X): unmapped I/O(1) byte write to %08X = %02X\n",h8->device->tag | |
| 764 | logerror("cpu '%s' (PC=%08X): unmapped I/O(1) byte write to %08X = %02X\n",h8->device->tag | |
| 765 | 765 | } |
| 766 | 766 | |
| 767 | 767 | void h8_3007_itu_init(h83xx_state *h8) |
| r7553 | r7554 | |
|---|---|---|
| 648 | 648 | } |
| 649 | 649 | break; |
| 650 | 650 | |
| 651 | // Far Jump | |
| 652 | case 0x2f: case 0x3f: case 0x6f: case 0x7f: | |
| 653 | if (OPA == 7 && OP1 == 2) | |
| 654 | { | |
| 655 | UNSP_REG(PC) = READ16(unsp, UNSP_LPC); | |
| 656 | UNSP_REG(SR) &= 0xffc0; | |
| 657 | UNSP_REG(SR) |= OPIMM; | |
| 658 | } | |
| 659 | break; | |
| 660 | ||
| 651 | 661 | // Multiply, Unsigned * Signed |
| 652 | 662 | case 0x0f: |
| 653 | 663 | if(OPN == 1 && OPA != 7) |
| r7553 | r7554 | |
|---|---|---|
| 205 | 205 | } |
| 206 | 206 | return UNSP_DASM_OK; |
| 207 | 207 | |
| 208 | // Far Jump | |
| 209 | case 0x2f: case 0x3f: case 0x6f: case 0x7f: | |
| 210 | if (OPA == 7 && OPA == 2) | |
| 211 | { | |
| 212 | print("goto %06x", ((OPIMM << 16) | imm16) << 1); | |
| 213 | } | |
| 214 | return UNSP_DASM_OK; | |
| 215 | ||
| 208 | 216 | // Multiply, Unsigned * Signed |
| 209 | 217 | case 0x0f: |
| 210 | 218 | if(OPN == 1 && OPA != 7) |
| r7553 | r7554 | |
|---|---|---|
| 58 | 58 | M68K_SFC, M68K_DFC, M68K_CACR, M68K_CAAR, M68K_PREF_ADDR, M68K_PREF_DATA, |
| 59 | 59 | M68K_D0, M68K_D1, M68K_D2, M68K_D3, M68K_D4, M68K_D5, M68K_D6, M68K_D7, |
| 60 | 60 | M68K_A0, M68K_A1, M68K_A2, M68K_A3, M68K_A4, M68K_A5, M68K_A6, M68K_A7, |
| 61 | M68K_FP0, M68K_FP1, M68K_FP2, M68K_FP3, M68K_FP4, M68K_FP5, M68K_FP6, M68K_FP7, | |
| 62 | M68K_FPSR, M68K_FPCR, | |
| 61 | 63 | |
| 62 | 64 | M68K_GENPC = REG_GENPC, |
| 63 | 65 | M68K_GENSP = REG_GENSP, |
| r7553 | r7554 | |
|---|---|---|
| 480 | 480 | strcat(mode, "["); |
| 481 | 481 | if(base) |
| 482 | 482 | { |
| 483 | strcat(mode, make_signed_hex_str_16(base)); | |
| 483 | if (EXT_BASE_DISPLACEMENT_LONG(extension)) | |
| 484 | { | |
| 485 | strcat(mode, make_signed_hex_str_32(base)); | |
| 486 | } | |
| 487 | else | |
| 488 | { | |
| 489 | strcat(mode, make_signed_hex_str_16(base)); | |
| 490 | } | |
| 484 | 491 | comma = 1; |
| 485 | 492 | } |
| 486 | 493 | if(*base_reg) |
| r7553 | r7554 | |
| 1690 | 1697 | { |
| 1691 | 1698 | ".l", ".s", ".x", ".p", ".w", ".d", ".b", ".?" |
| 1692 | 1699 | }; |
| 1700 | const char *spec_reg[8] = | |
| 1701 | { | |
| 1702 | "?", "FPIAR", "FPSR", "?", "FPCR", "?", "?", "?" | |
| 1703 | }; | |
| 1693 | 1704 | |
| 1694 | 1705 | char mnemonic[40]; |
| 1695 | 1706 | UINT32 w2, src, dst_reg; |
| r7553 | r7554 | |
| 1776 | 1787 | |
| 1777 | 1788 | case 0x3: |
| 1778 | 1789 | { |
| 1779 | sprintf(g_dasm_str, "fmove | |
| 1790 | sprintf(g_dasm_str, "fmove FP%d, %s", dst_reg, get_ea_mode_str_32(g_cpu_ir)); | |
| 1780 | 1791 | break; |
| 1781 | 1792 | } |
| 1782 | 1793 | |
| 1783 | case 0x4: | |
| 1784 | case 0x5: | |
| 1794 | case 0x4: // ea to control | |
| 1785 | 1795 | { |
| 1786 | sprintf(g_dasm_str, "fmove | |
| 1796 | sprintf(g_dasm_str, "fmove.l %s, %s", get_ea_mode_str_32(g_cpu_ir), spec_reg[(w2>>10)&7]); | |
| 1787 | 1797 | break; |
| 1788 | 1798 | } |
| 1789 | 1799 | |
| 1790 | case 0x6: | |
| 1791 | case 0x7: | |
| 1800 | case 0x5: // control to ea | |
| 1792 | 1801 | { |
| 1793 | sprintf(g_dasm_str, "fmove | |
| 1802 | sprintf(g_dasm_str, "fmove.l %s, %s", spec_reg[(w2>>10)&7], get_ea_mode_str_32(g_cpu_ir)); | |
| 1794 | 1803 | break; |
| 1795 | 1804 | } |
| 1796 | 1805 | |
| 1806 | case 0x6: // memory to FPU, list | |
| 1807 | { | |
| 1808 | char temp[32]; | |
| 1809 | ||
| 1810 | if ((w2>>11) & 1) // dynamic register list | |
| 1811 | { | |
| 1812 | sprintf(g_dasm_str, "fmovem.x %s, D%d", get_ea_mode_str_32(g_cpu_ir), (w2>>4)&7); | |
| 1813 | } | |
| 1814 | else // static register list | |
| 1815 | { | |
| 1816 | int i; | |
| 1817 | ||
| 1818 | sprintf(g_dasm_str, "fmovem.x %s, ", get_ea_mode_str_32(g_cpu_ir)); | |
| 1819 | ||
| 1820 | for (i = 0; i < 8; i++) | |
| 1821 | { | |
| 1822 | if (w2 & (1<<i)) | |
| 1823 | { | |
| 1824 | if ((w2>>12) & 1) // postincrement or control | |
| 1825 | { | |
| 1826 | sprintf(temp, "FP%d ", 7-i); | |
| 1827 | } | |
| 1828 | else // predecrement | |
| 1829 | { | |
| 1830 | sprintf(temp, "FP%d ", i); | |
| 1831 | } | |
| 1832 | strcat(g_dasm_str, temp); | |
| 1833 | } | |
| 1834 | } | |
| 1835 | } | |
| 1836 | break; | |
| 1837 | } | |
| 1838 | ||
| 1839 | case 0x7: // FPU to memory, list | |
| 1840 | { | |
| 1841 | char temp[32]; | |
| 1842 | ||
| 1843 | if ((w2>>11) & 1) // dynamic register list | |
| 1844 | { | |
| 1845 | sprintf(g_dasm_str, "fmovem.x D%d, %s", (w2>>4)&7, get_ea_mode_str_32(g_cpu_ir)); | |
| 1846 | } | |
| 1847 | else // static register list | |
| 1848 | { | |
| 1849 | int i; | |
| 1850 | ||
| 1851 | sprintf(g_dasm_str, "fmovem.x "); | |
| 1852 | ||
| 1853 | for (i = 0; i < 8; i++) | |
| 1854 | { | |
| 1855 | if (w2 & (1<<i)) | |
| 1856 | { | |
| 1857 | if ((w2>>12) & 1) // postincrement or control | |
| 1858 | { | |
| 1859 | sprintf(temp, "FP%d ", 7-i); | |
| 1860 | } | |
| 1861 | else // predecrement | |
| 1862 | { | |
| 1863 | sprintf(temp, "FP%d ", i); | |
| 1864 | } | |
| 1865 | strcat(g_dasm_str, temp); | |
| 1866 | } | |
| 1867 | } | |
| 1868 | ||
| 1869 | strcat(g_dasm_str, ", "); | |
| 1870 | strcat(g_dasm_str, get_ea_mode_str_32(g_cpu_ir)); | |
| 1871 | } | |
| 1872 | break; | |
| 1873 | } | |
| 1874 | ||
| 1797 | 1875 | default: |
| 1798 | 1876 | { |
| 1799 | 1877 | sprintf(g_dasm_str, "FPU (?) "); |
| r7553 | r7554 | |
|---|---|---|
| 3288 | 3288 | REG_PC += 2; |
| 3289 | 3289 | (void)ea; /* just to avoid an 'unused variable' warning */ |
| 3290 | 3290 | logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", |
| 3291 | m68k->device->tag | |
| 3291 | m68k->device->tag | |
| 3292 | 3292 | return; |
| 3293 | 3293 | } |
| 3294 | 3294 | m68ki_exception_illegal(m68k); |
| r7553 | r7554 | |
| 4366 | 4366 | if(CPU_TYPE_IS_EC020_PLUS(m68k->cpu_type)) |
| 4367 | 4367 | { |
| 4368 | 4368 | logerror( "%s at %08x: called unimplemented instruction %04x (cpbcc)\n", |
| 4369 | m68k->device->tag | |
| 4369 | m68k->device->tag | |
| 4370 | 4370 | return; |
| 4371 | 4371 | } |
| 4372 | 4372 | m68ki_exception_1111(m68k); |
| r7553 | r7554 | |
| 4378 | 4378 | if(CPU_TYPE_IS_EC020_PLUS(m68k->cpu_type)) |
| 4379 | 4379 | { |
| 4380 | 4380 | logerror("%s at %08x: called unimplemented instruction %04x (cpdbcc)\n", |
| 4381 | m68k->device->tag | |
| 4381 | m68k->device->tag | |
| 4382 | 4382 | return; |
| 4383 | 4383 | } |
| 4384 | 4384 | m68ki_exception_1111(m68k); |
| r7553 | r7554 | |
| 4390 | 4390 | if(CPU_TYPE_IS_EC020_PLUS(m68k->cpu_type)) |
| 4391 | 4391 | { |
| 4392 | 4392 | logerror("%s at %08x: called unimplemented instruction %04x (cpgen)\n", |
| 4393 | m68k->device->tag | |
| 4393 | m68k->device->tag | |
| 4394 | 4394 | return; |
| 4395 | 4395 | } |
| 4396 | 4396 | m68ki_exception_1111(m68k); |
| r7553 | r7554 | |
| 4402 | 4402 | if(CPU_TYPE_IS_EC020_PLUS(m68k->cpu_type)) |
| 4403 | 4403 | { |
| 4404 | 4404 | logerror("%s at %08x: called unimplemented instruction %04x (cpscc)\n", |
| 4405 | m68k->device->tag | |
| 4405 | m68k->device->tag | |
| 4406 | 4406 | return; |
| 4407 | 4407 | } |
| 4408 | 4408 | m68ki_exception_1111(m68k); |
| r7553 | r7554 | |
| 4414 | 4414 | if(CPU_TYPE_IS_EC020_PLUS(m68k->cpu_type)) |
| 4415 | 4415 | { |
| 4416 | 4416 | logerror("%s at %08x: called unimplemented instruction %04x (cptrapcc)\n", |
| 4417 | m68k->device->tag | |
| 4417 | m68k->device->tag | |
| 4418 | 4418 | return; |
| 4419 | 4419 | } |
| 4420 | 4420 | m68ki_exception_1111(m68k); |
| r7553 | r7554 | |
| 8812 | 8812 | { |
| 8813 | 8813 | m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */ |
| 8814 | 8814 | logerror("%s at %08x: called unimplemented instruction %04x (rtm)\n", |
| 8815 | m68k->device->tag | |
| 8815 | m68k->device->tag | |
| 8816 | 8816 | return; |
| 8817 | 8817 | } |
| 8818 | 8818 | m68ki_exception_illegal(m68k); |
| r7553 | r7554 | |
|---|---|---|
| 540 | 540 | |
| 541 | 541 | M68K_STATE_ENTRY(CACR, "%08X", cacr, 0xffffffff, 0, MASK_020_OR_LATER) |
| 542 | 542 | M68K_STATE_ENTRY(CAAR, "%08X", caar, 0xffffffff, 0, MASK_020_OR_LATER) |
| 543 | ||
| 544 | M68K_STATE_ENTRY(FP0, "%s", iotemp, 0xffffffff, CPUSTATE_EXPORT, MASK_030_OR_LATER) | |
| 545 | M68K_STATE_ENTRY(FP1, "%s", iotemp, 0xffffffff, CPUSTATE_EXPORT, MASK_030_OR_LATER) | |
| 546 | M68K_STATE_ENTRY(FP2, "%s", iotemp, 0xffffffff, CPUSTATE_EXPORT, MASK_030_OR_LATER) | |
| 547 | M68K_STATE_ENTRY(FP3, "%s", iotemp, 0xffffffff, CPUSTATE_EXPORT, MASK_030_OR_LATER) | |
| 548 | M68K_STATE_ENTRY(FP4, "%s", iotemp, 0xffffffff, CPUSTATE_EXPORT, MASK_030_OR_LATER) | |
| 549 | M68K_STATE_ENTRY(FP5, "%s", iotemp, 0xffffffff, CPUSTATE_EXPORT, MASK_030_OR_LATER) | |
| 550 | M68K_STATE_ENTRY(FP6, "%s", iotemp, 0xffffffff, CPUSTATE_EXPORT, MASK_030_OR_LATER) | |
| 551 | M68K_STATE_ENTRY(FP7, "%s", iotemp, 0xffffffff, CPUSTATE_EXPORT, MASK_030_OR_LATER) | |
| 552 | M68K_STATE_ENTRY(FPSR, "%08X", fpsr, 0xffffffff, 0, MASK_040_OR_LATER) | |
| 553 | M68K_STATE_ENTRY(FPCR, "%08X", fpcr, 0xffffffff, 0, MASK_040_OR_LATER) | |
| 543 | 554 | }; |
| 544 | 555 | |
| 545 | 556 | static const cpu_state_table state_table_template = |
| r7553 | r7554 | |
| 847 | 858 | m68k->iotemp = (m68k->s_flag && m68k->m_flag) ? REG_SP : REG_MSP; |
| 848 | 859 | break; |
| 849 | 860 | |
| 861 | case M68K_FP0: | |
| 862 | case M68K_FP1: | |
| 863 | case M68K_FP2: | |
| 864 | case M68K_FP3: | |
| 865 | case M68K_FP4: | |
| 866 | case M68K_FP5: | |
| 867 | case M68K_FP6: | |
| 868 | case M68K_FP7: | |
| 869 | break; | |
| 870 | ||
| 850 | 871 | default: |
| 851 | 872 | fatalerror("CPU_EXPORT_STATE(m68k) called for unexpected value\n"); |
| 852 | 873 | break; |
| r7553 | r7554 | |
| 873 | 894 | } |
| 874 | 895 | } |
| 875 | 896 | |
| 897 | static CPU_EXPORT_STRING( m68k ) | |
| 898 | { | |
| 899 | m68ki_cpu_core *m68k = get_safe_token(device); | |
| 900 | ||
| 901 | switch (entry->index) | |
| 902 | { | |
| 903 | case M68K_FP0: | |
| 904 | sprintf(string, "%f", REG_FP[0].f); | |
| 905 | break; | |
| 906 | ||
| 907 | case M68K_FP1: | |
| 908 | sprintf(string, "%f", REG_FP[1].f); | |
| 909 | break; | |
| 910 | ||
| 911 | case M68K_FP2: | |
| 912 | sprintf(string, "%f", REG_FP[2].f); | |
| 913 | break; | |
| 914 | ||
| 915 | case M68K_FP3: | |
| 916 | sprintf(string, "%f", REG_FP[3].f); | |
| 917 | break; | |
| 918 | ||
| 919 | case M68K_FP4: | |
| 920 | sprintf(string, "%f", REG_FP[4].f); | |
| 921 | break; | |
| 922 | ||
| 923 | case M68K_FP5: | |
| 924 | sprintf(string, "%f", REG_FP[5].f); | |
| 925 | break; | |
| 926 | ||
| 927 | case M68K_FP6: | |
| 928 | sprintf(string, "%f", REG_FP[6].f); | |
| 929 | break; | |
| 930 | ||
| 931 | case M68K_FP7: | |
| 932 | sprintf(string, "%f", REG_FP[7].f); | |
| 933 | break; | |
| 934 | ||
| 935 | } | |
| 936 | } | |
| 937 | ||
| 876 | 938 | static CPU_GET_INFO( m68k ) |
| 877 | 939 | { |
| 878 | 940 | m68ki_cpu_core *m68k = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL; |
| r7553 | r7554 | |
| 913 | 975 | case CPUINFO_FCT_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(m68k); break; |
| 914 | 976 | case CPUINFO_FCT_IMPORT_STATE: info->import_state = CPU_IMPORT_STATE_NAME(m68k); break; |
| 915 | 977 | case CPUINFO_FCT_EXPORT_STATE: info->export_state = CPU_EXPORT_STATE_NAME(m68k); break; |
| 978 | case CPUINFO_FCT_EXPORT_STRING: info->export_string = CPU_EXPORT_STRING_NAME(m68k); break; | |
| 916 | 979 | case CPUINFO_FCT_TRANSLATE: info->translate = CPU_TRANSLATE_NAME(m68k); break; |
| 917 | 980 | |
| 918 | 981 | /* --- the following bits of info are returned as pointers --- */ |
| r7553 | r7554 | |
|---|---|---|
| 599 | 599 | /* check for NMI first */ |
| 600 | 600 | if (IOREG(tms, REG_HSTCTLH) & 0x0100) |
| 601 | 601 | { |
| 602 | LOG(("TMS34010 '%s' takes NMI\n", tms->device->tag | |
| 602 | LOG(("TMS34010 '%s' takes NMI\n", tms->device->tag | |
| 603 | 603 | |
| 604 | 604 | /* ack the NMI */ |
| 605 | 605 | IOREG(tms, REG_HSTCTLH) &= ~0x0100; |
| r7553 | r7554 | |
| 626 | 626 | /* host interrupt */ |
| 627 | 627 | if (irq & TMS34010_HI) |
| 628 | 628 | { |
| 629 | LOG(("TMS34010 '%s' takes HI\n", tms->device->tag | |
| 629 | LOG(("TMS34010 '%s' takes HI\n", tms->device->tag | |
| 630 | 630 | vector = 0xfffffec0; |
| 631 | 631 | } |
| 632 | 632 | |
| 633 | 633 | /* display interrupt */ |
| 634 | 634 | else if (irq & TMS34010_DI) |
| 635 | 635 | { |
| 636 | LOG(("TMS34010 '%s' takes DI\n", tms->device->tag | |
| 636 | LOG(("TMS34010 '%s' takes DI\n", tms->device->tag | |
| 637 | 637 | vector = 0xfffffea0; |
| 638 | 638 | } |
| 639 | 639 | |
| 640 | 640 | /* window violation interrupt */ |
| 641 | 641 | else if (irq & TMS34010_WV) |
| 642 | 642 | { |
| 643 | LOG(("TMS34010 '%s' takes WV\n", tms->device->tag | |
| 643 | LOG(("TMS34010 '%s' takes WV\n", tms->device->tag | |
| 644 | 644 | vector = 0xfffffe80; |
| 645 | 645 | } |
| 646 | 646 | |
| 647 | 647 | /* external 1 interrupt */ |
| 648 | 648 | else if (irq & TMS34010_INT1) |
| 649 | 649 | { |
| 650 | LOG(("TMS34010 '%s' takes INT1\n", tms->device->tag | |
| 650 | LOG(("TMS34010 '%s' takes INT1\n", tms->device->tag | |
| 651 | 651 | vector = 0xffffffc0; |
| 652 | 652 | irqline = 0; |
| 653 | 653 | } |
| r7553 | r7554 | |
| 655 | 655 | /* external 2 interrupt */ |
| 656 | 656 | else if (irq & TMS34010_INT2) |
| 657 | 657 | { |
| 658 | LOG(("TMS34010 '%s' takes INT2\n", tms->device->tag | |
| 658 | LOG(("TMS34010 '%s' takes INT2\n", tms->device->tag | |
| 659 | 659 | vector = 0xffffffa0; |
| 660 | 660 | irqline = 1; |
| 661 | 661 | } |
| r7553 | r7554 | |
| 781 | 781 | |
| 782 | 782 | static void set_irq_line(tms34010_state *tms, int irqline, int linestate) |
| 783 | 783 | { |
| 784 | LOG(("TMS34010 '%s' set irq line %d state %d\n", tms->device->tag | |
| 784 | LOG(("TMS34010 '%s' set irq line %d state %d\n", tms->device->tag | |
| 785 | 785 | |
| 786 | 786 | /* set the pending interrupt */ |
| 787 | 787 | switch (irqline) |
| r7553 | r7554 | |
| 815 | 815 | |
| 816 | 816 | /* call through to the CPU to generate the int */ |
| 817 | 817 | IOREG(tms, REG_INTPEND) |= type; |
| 818 | LOG(("TMS34010 '%s' set internal interrupt $%04x\n", tms->device->tag | |
| 818 | LOG(("TMS34010 '%s' set internal interrupt $%04x\n", tms->device->tag | |
| 819 | 819 | |
| 820 | 820 | /* generate triggers so that spin loops can key off them */ |
| 821 | 821 | cpu_triggerint(tms->device); |
| r7553 | r7554 | |
| 1151 | 1151 | } |
| 1152 | 1152 | } |
| 1153 | 1153 | if (tms == NULL) |
| 1154 | fatalerror("Unable to locate matching CPU for screen '%s'\n", screen->tag | |
| 1154 | fatalerror("Unable to locate matching CPU for screen '%s'\n", screen->tag | |
| 1155 | 1155 | |
| 1156 | 1156 | /* get the display parameters for the screen */ |
| 1157 | 1157 | tms34010_get_display_params(tms->device, ¶ms); |
| r7553 | r7554 | |
|---|---|---|
| 388 | 388 | |
| 389 | 389 | state_save_register_device_item(device, 0, tms->pc); |
| 390 | 390 | for (i = 0; i < 36; i++) |
| 391 | state_save_register_generic(device->machine, "tms32031", device->tag, i, "reg", tms->r[i].i8, UINT8, 8); | |
| 391 | state_save_register_generic(device->machine, "tms32031", device->tag(), i, "reg", tms->r[i].i8, UINT8, 8); | |
| 392 | 392 | state_save_register_device_item(device, 0, tms->bkmask); |
| 393 | 393 | state_save_register_device_item(device, 0, tms->irq_state); |
| 394 | 394 | state_save_register_device_item(device, 0, tms->delayed); |
| r7553 | r7554 | |
|---|---|---|
| 315 | 315 | else |
| 316 | 316 | irq_vector = (*cpustate->irq_callback)(cpustate->device, 0); |
| 317 | 317 | |
| 318 | LOG(("Z180 '%s' single int. irq_vector $%02x\n", cpustate->device->tag | |
| 318 | LOG(("Z180 '%s' single int. irq_vector $%02x\n", cpustate->device->tag | |
| 319 | 319 | |
| 320 | 320 | /* Interrupt mode 2. Call [cpustate->I:databyte] */ |
| 321 | 321 | if( cpustate->IM == 2 ) |
| r7553 | r7554 | |
| 323 | 323 | irq_vector = (irq_vector & 0xff) + (cpustate->I << 8); |
| 324 | 324 | PUSH(cpustate, PC ); |
| 325 | 325 | RM16( cpustate, irq_vector, &cpustate->PC ); |
| 326 | LOG(("Z180 '%s' IM2 [$%04x] = $%04x\n",cpustate->device->tag | |
| 326 | LOG(("Z180 '%s' IM2 [$%04x] = $%04x\n",cpustate->device->tag | |
| 327 | 327 | /* CALL opcode timing */ |
| 328 | 328 | cpustate->icount -= cpustate->cc[Z180_TABLE_op][0xcd]; |
| 329 | 329 | } |
| r7553 | r7554 | |
| 331 | 331 | /* Interrupt mode 1. RST 38h */ |
| 332 | 332 | if( cpustate->IM == 1 ) |
| 333 | 333 | { |
| 334 | LOG(("Z180 '%s' IM1 $0038\n",cpustate->device->tag | |
| 334 | LOG(("Z180 '%s' IM1 $0038\n",cpustate->device->tag | |
| 335 | 335 | PUSH(cpustate, PC ); |
| 336 | 336 | cpustate->_PCD = 0x0038; |
| 337 | 337 | /* RST $38 + 'interrupt latency' cycles */ |
| r7553 | r7554 | |
| 342 | 342 | /* Interrupt mode 0. We check for CALL and JP instructions, */ |
| 343 | 343 | /* if neither of these were found we assume a 1 byte opcode */ |
| 344 | 344 | /* was placed on the databus */ |
| 345 | LOG(("Z180 '%s' IM0 $%04x\n",cpustate->device->tag | |
| 345 | LOG(("Z180 '%s' IM0 $%04x\n",cpustate->device->tag | |
| 346 | 346 | switch (irq_vector & 0xff0000) |
| 347 | 347 | { |
| 348 | 348 | case 0xcd0000: /* call */ |
| r7553 | r7554 | |
| 371 | 371 | irq_vector = (cpustate->I << 8) + (irq_vector & 0xff); |
| 372 | 372 | PUSH(cpustate, PC ); |
| 373 | 373 | RM16( cpustate, irq_vector, &cpustate->PC ); |
| 374 | LOG(("Z180 '%s' INT%d [$%04x] = $%04x\n", cpustate->device->tag | |
| 374 | LOG(("Z180 '%s' INT%d [$%04x] = $%04x\n", cpustate->device->tag | |
| 375 | 375 | /* CALL opcode timing */ |
| 376 | 376 | cpustate->icount -= cpustate->cc[Z180_TABLE_op][0xcd]; |
| 377 | 377 | } |
| r7553 | r7554 | |
|---|---|---|
| 937 | 937 | { |
| 938 | 938 | case Z180_CNTLA0: |
| 939 | 939 | data = cpustate->IO_CNTLA0 & Z180_CNTLA0_RMASK; |
| 940 | LOG(("Z180 '%s' CNTLA0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 940 | LOG(("Z180 '%s' CNTLA0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 941 | 941 | break; |
| 942 | 942 | |
| 943 | 943 | case Z180_CNTLA1: |
| 944 | 944 | data = cpustate->IO_CNTLA1 & Z180_CNTLA1_RMASK; |
| 945 | LOG(("Z180 '%s' CNTLA1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 945 | LOG(("Z180 '%s' CNTLA1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 946 | 946 | break; |
| 947 | 947 | |
| 948 | 948 | case Z180_CNTLB0: |
| 949 | 949 | data = cpustate->IO_CNTLB0 & Z180_CNTLB0_RMASK; |
| 950 | LOG(("Z180 '%s' CNTLB0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 950 | LOG(("Z180 '%s' CNTLB0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 951 | 951 | break; |
| 952 | 952 | |
| 953 | 953 | case Z180_CNTLB1: |
| 954 | 954 | data = cpustate->IO_CNTLB1 & Z180_CNTLB1_RMASK; |
| 955 | LOG(("Z180 '%s' CNTLB1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 955 | LOG(("Z180 '%s' CNTLB1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 956 | 956 | break; |
| 957 | 957 | |
| 958 | 958 | case Z180_STAT0: |
| 959 | 959 | data = cpustate->IO_STAT0 & Z180_STAT0_RMASK; |
| 960 | 960 | data |= 0x02; // kludge for 20pacgal |
| 961 | LOG(("Z180 '%s' STAT0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 961 | LOG(("Z180 '%s' STAT0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 962 | 962 | break; |
| 963 | 963 | |
| 964 | 964 | case Z180_STAT1: |
| 965 | 965 | data = cpustate->IO_STAT1 & Z180_STAT1_RMASK; |
| 966 | LOG(("Z180 '%s' STAT1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 966 | LOG(("Z180 '%s' STAT1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 967 | 967 | break; |
| 968 | 968 | |
| 969 | 969 | case Z180_TDR0: |
| 970 | 970 | data = cpustate->IO_TDR0 & Z180_TDR0_RMASK; |
| 971 | LOG(("Z180 '%s' TDR0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 971 | LOG(("Z180 '%s' TDR0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 972 | 972 | break; |
| 973 | 973 | |
| 974 | 974 | case Z180_TDR1: |
| 975 | 975 | data = cpustate->IO_TDR1 & Z180_TDR1_RMASK; |
| 976 | LOG(("Z180 '%s' TDR1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 976 | LOG(("Z180 '%s' TDR1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 977 | 977 | break; |
| 978 | 978 | |
| 979 | 979 | case Z180_RDR0: |
| 980 | 980 | data = cpustate->IO_RDR0 & Z180_RDR0_RMASK; |
| 981 | LOG(("Z180 '%s' RDR0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 981 | LOG(("Z180 '%s' RDR0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 982 | 982 | break; |
| 983 | 983 | |
| 984 | 984 | case Z180_RDR1: |
| 985 | 985 | data = cpustate->IO_RDR1 & Z180_RDR1_RMASK; |
| 986 | LOG(("Z180 '%s' RDR1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 986 | LOG(("Z180 '%s' RDR1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 987 | 987 | break; |
| 988 | 988 | |
| 989 | 989 | case Z180_CNTR: |
| 990 | 990 | data = cpustate->IO_CNTR & Z180_CNTR_RMASK; |
| 991 | LOG(("Z180 '%s' CNTR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 991 | LOG(("Z180 '%s' CNTR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 992 | 992 | break; |
| 993 | 993 | |
| 994 | 994 | case Z180_TRDR: |
| 995 | 995 | data = cpustate->IO_TRDR & Z180_TRDR_RMASK; |
| 996 | LOG(("Z180 '%s' TRDR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 996 | LOG(("Z180 '%s' TRDR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 997 | 997 | break; |
| 998 | 998 | |
| 999 | 999 | case Z180_TMDR0L: |
| 1000 | 1000 | data = cpustate->tmdr_value[0] & Z180_TMDR0L_RMASK; |
| 1001 | LOG(("Z180 '%s' TMDR0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1001 | LOG(("Z180 '%s' TMDR0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1002 | 1002 | /* if timer is counting, latch the MSB and set the latch flag */ |
| 1003 | 1003 | if ((cpustate->IO_TCR & Z180_TCR_TDE0) == 0) |
| 1004 | 1004 | { |
| r7553 | r7554 | |
| 1038 | 1038 | { |
| 1039 | 1039 | cpustate->read_tcr_tmdr[0] = 1; |
| 1040 | 1040 | } |
| 1041 | LOG(("Z180 '%s' TMDR0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1041 | LOG(("Z180 '%s' TMDR0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1042 | 1042 | break; |
| 1043 | 1043 | |
| 1044 | 1044 | case Z180_RLDR0L: |
| 1045 | 1045 | data = cpustate->IO_RLDR0L & Z180_RLDR0L_RMASK; |
| 1046 | LOG(("Z180 '%s' RLDR0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1046 | LOG(("Z180 '%s' RLDR0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1047 | 1047 | break; |
| 1048 | 1048 | |
| 1049 | 1049 | case Z180_RLDR0H: |
| 1050 | 1050 | data = cpustate->IO_RLDR0H & Z180_RLDR0H_RMASK; |
| 1051 | LOG(("Z180 '%s' RLDR0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1051 | LOG(("Z180 '%s' RLDR0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1052 | 1052 | break; |
| 1053 | 1053 | |
| 1054 | 1054 | case Z180_TCR: |
| r7553 | r7554 | |
| 1074 | 1074 | cpustate->read_tcr_tmdr[1] = 1; |
| 1075 | 1075 | } |
| 1076 | 1076 | |
| 1077 | LOG(("Z180 '%s' TCR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1077 | LOG(("Z180 '%s' TCR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1078 | 1078 | break; |
| 1079 | 1079 | |
| 1080 | 1080 | case Z180_IO11: |
| 1081 | 1081 | data = cpustate->IO_IO11 & Z180_IO11_RMASK; |
| 1082 | LOG(("Z180 '%s' IO11 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1082 | LOG(("Z180 '%s' IO11 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1083 | 1083 | break; |
| 1084 | 1084 | |
| 1085 | 1085 | case Z180_ASEXT0: |
| 1086 | 1086 | data = cpustate->IO_ASEXT0 & Z180_ASEXT0_RMASK; |
| 1087 | LOG(("Z180 '%s' ASEXT0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1087 | LOG(("Z180 '%s' ASEXT0 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1088 | 1088 | break; |
| 1089 | 1089 | |
| 1090 | 1090 | case Z180_ASEXT1: |
| 1091 | 1091 | data = cpustate->IO_ASEXT1 & Z180_ASEXT1_RMASK; |
| 1092 | LOG(("Z180 '%s' ASEXT1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1092 | LOG(("Z180 '%s' ASEXT1 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1093 | 1093 | break; |
| 1094 | 1094 | |
| 1095 | 1095 | case Z180_TMDR1L: |
| 1096 | 1096 | data = cpustate->tmdr_value[1] & Z180_TMDR1L_RMASK; |
| 1097 | LOG(("Z180 '%s' TMDR1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1097 | LOG(("Z180 '%s' TMDR1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1098 | 1098 | /* if timer is counting, latch the MSB and set the latch flag */ |
| 1099 | 1099 | if ((cpustate->IO_TCR & Z180_TCR_TDE1) == 0) |
| 1100 | 1100 | { |
| r7553 | r7554 | |
| 1134 | 1134 | { |
| 1135 | 1135 | cpustate->read_tcr_tmdr[1] = 1; |
| 1136 | 1136 | } |
| 1137 | LOG(("Z180 '%s' TMDR1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1137 | LOG(("Z180 '%s' TMDR1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1138 | 1138 | break; |
| 1139 | 1139 | |
| 1140 | 1140 | case Z180_RLDR1L: |
| 1141 | 1141 | data = cpustate->IO_RLDR1L & Z180_RLDR1L_RMASK; |
| 1142 | LOG(("Z180 '%s' RLDR1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1142 | LOG(("Z180 '%s' RLDR1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1143 | 1143 | break; |
| 1144 | 1144 | |
| 1145 | 1145 | case Z180_RLDR1H: |
| 1146 | 1146 | data = cpustate->IO_RLDR1H & Z180_RLDR1H_RMASK; |
| 1147 | LOG(("Z180 '%s' RLDR1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1147 | LOG(("Z180 '%s' RLDR1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1148 | 1148 | break; |
| 1149 | 1149 | |
| 1150 | 1150 | case Z180_FRC: |
| 1151 | 1151 | data = cpustate->IO_FRC & Z180_FRC_RMASK; |
| 1152 | LOG(("Z180 '%s' FRC rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1152 | LOG(("Z180 '%s' FRC rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1153 | 1153 | break; |
| 1154 | 1154 | |
| 1155 | 1155 | case Z180_IO19: |
| 1156 | 1156 | data = cpustate->IO_IO19 & Z180_IO19_RMASK; |
| 1157 | LOG(("Z180 '%s' IO19 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1157 | LOG(("Z180 '%s' IO19 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1158 | 1158 | break; |
| 1159 | 1159 | |
| 1160 | 1160 | case Z180_ASTC0L: |
| 1161 | 1161 | data = cpustate->IO_ASTC0L & Z180_ASTC0L_RMASK; |
| 1162 | LOG(("Z180 '%s' ASTC0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1162 | LOG(("Z180 '%s' ASTC0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1163 | 1163 | break; |
| 1164 | 1164 | |
| 1165 | 1165 | case Z180_ASTC0H: |
| 1166 | 1166 | data = cpustate->IO_ASTC0H & Z180_ASTC0H_RMASK; |
| 1167 | LOG(("Z180 '%s' ASTC0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1167 | LOG(("Z180 '%s' ASTC0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1168 | 1168 | break; |
| 1169 | 1169 | |
| 1170 | 1170 | case Z180_ASTC1L: |
| 1171 | 1171 | data = cpustate->IO_ASTC1L & Z180_ASTC1L_RMASK; |
| 1172 | LOG(("Z180 '%s' ASTC1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1172 | LOG(("Z180 '%s' ASTC1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1173 | 1173 | break; |
| 1174 | 1174 | |
| 1175 | 1175 | case Z180_ASTC1H: |
| 1176 | 1176 | data = cpustate->IO_ASTC1H & Z180_ASTC1H_RMASK; |
| 1177 | LOG(("Z180 '%s' ASTC1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1177 | LOG(("Z180 '%s' ASTC1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1178 | 1178 | break; |
| 1179 | 1179 | |
| 1180 | 1180 | case Z180_CMR: |
| 1181 | 1181 | data = cpustate->IO_CMR & Z180_CMR_RMASK; |
| 1182 | LOG(("Z180 '%s' CMR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1182 | LOG(("Z180 '%s' CMR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1183 | 1183 | break; |
| 1184 | 1184 | |
| 1185 | 1185 | case Z180_CCR: |
| 1186 | 1186 | data = cpustate->IO_CCR & Z180_CCR_RMASK; |
| 1187 | LOG(("Z180 '%s' CCR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1187 | LOG(("Z180 '%s' CCR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1188 | 1188 | break; |
| 1189 | 1189 | |
| 1190 | 1190 | case Z180_SAR0L: |
| 1191 | 1191 | data = cpustate->IO_SAR0L & Z180_SAR0L_RMASK; |
| 1192 | LOG(("Z180 '%s' SAR0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1192 | LOG(("Z180 '%s' SAR0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1193 | 1193 | break; |
| 1194 | 1194 | |
| 1195 | 1195 | case Z180_SAR0H: |
| 1196 | 1196 | data = cpustate->IO_SAR0H & Z180_SAR0H_RMASK; |
| 1197 | LOG(("Z180 '%s' SAR0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1197 | LOG(("Z180 '%s' SAR0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1198 | 1198 | break; |
| 1199 | 1199 | |
| 1200 | 1200 | case Z180_SAR0B: |
| 1201 | 1201 | data = cpustate->IO_SAR0B & Z180_SAR0B_RMASK; |
| 1202 | LOG(("Z180 '%s' SAR0B rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1202 | LOG(("Z180 '%s' SAR0B rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1203 | 1203 | break; |
| 1204 | 1204 | |
| 1205 | 1205 | case Z180_DAR0L: |
| 1206 | 1206 | data = cpustate->IO_DAR0L & Z180_DAR0L_RMASK; |
| 1207 | LOG(("Z180 '%s' DAR0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1207 | LOG(("Z180 '%s' DAR0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1208 | 1208 | break; |
| 1209 | 1209 | |
| 1210 | 1210 | case Z180_DAR0H: |
| 1211 | 1211 | data = cpustate->IO_DAR0H & Z180_DAR0H_RMASK; |
| 1212 | LOG(("Z180 '%s' DAR0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1212 | LOG(("Z180 '%s' DAR0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1213 | 1213 | break; |
| 1214 | 1214 | |
| 1215 | 1215 | case Z180_DAR0B: |
| 1216 | 1216 | data = cpustate->IO_DAR0B & Z180_DAR0B_RMASK; |
| 1217 | LOG(("Z180 '%s' DAR0B rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1217 | LOG(("Z180 '%s' DAR0B rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1218 | 1218 | break; |
| 1219 | 1219 | |
| 1220 | 1220 | case Z180_BCR0L: |
| 1221 | 1221 | data = cpustate->IO_BCR0L & Z180_BCR0L_RMASK; |
| 1222 | LOG(("Z180 '%s' BCR0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1222 | LOG(("Z180 '%s' BCR0L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1223 | 1223 | break; |
| 1224 | 1224 | |
| 1225 | 1225 | case Z180_BCR0H: |
| 1226 | 1226 | data = cpustate->IO_BCR0H & Z180_BCR0H_RMASK; |
| 1227 | LOG(("Z180 '%s' BCR0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1227 | LOG(("Z180 '%s' BCR0H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1228 | 1228 | break; |
| 1229 | 1229 | |
| 1230 | 1230 | case Z180_MAR1L: |
| 1231 | 1231 | data = cpustate->IO_MAR1L & Z180_MAR1L_RMASK; |
| 1232 | LOG(("Z180 '%s' MAR1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1232 | LOG(("Z180 '%s' MAR1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1233 | 1233 | break; |
| 1234 | 1234 | |
| 1235 | 1235 | case Z180_MAR1H: |
| 1236 | 1236 | data = cpustate->IO_MAR1H & Z180_MAR1H_RMASK; |
| 1237 | LOG(("Z180 '%s' MAR1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1237 | LOG(("Z180 '%s' MAR1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1238 | 1238 | break; |
| 1239 | 1239 | |
| 1240 | 1240 | case Z180_MAR1B: |
| 1241 | 1241 | data = cpustate->IO_MAR1B & Z180_MAR1B_RMASK; |
| 1242 | LOG(("Z180 '%s' MAR1B rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1242 | LOG(("Z180 '%s' MAR1B rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1243 | 1243 | break; |
| 1244 | 1244 | |
| 1245 | 1245 | case Z180_IAR1L: |
| 1246 | 1246 | data = cpustate->IO_IAR1L & Z180_IAR1L_RMASK; |
| 1247 | LOG(("Z180 '%s' IAR1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1247 | LOG(("Z180 '%s' IAR1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1248 | 1248 | break; |
| 1249 | 1249 | |
| 1250 | 1250 | case Z180_IAR1H: |
| 1251 | 1251 | data = cpustate->IO_IAR1H & Z180_IAR1H_RMASK; |
| 1252 | LOG(("Z180 '%s' IAR1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1252 | LOG(("Z180 '%s' IAR1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1253 | 1253 | break; |
| 1254 | 1254 | |
| 1255 | 1255 | case Z180_IAR1B: |
| 1256 | 1256 | data = cpustate->IO_IAR1B & Z180_IAR1B_RMASK; |
| 1257 | LOG(("Z180 '%s' IAR1B rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1257 | LOG(("Z180 '%s' IAR1B rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1258 | 1258 | break; |
| 1259 | 1259 | |
| 1260 | 1260 | case Z180_BCR1L: |
| 1261 | 1261 | data = cpustate->IO_BCR1L & Z180_BCR1L_RMASK; |
| 1262 | LOG(("Z180 '%s' BCR1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1262 | LOG(("Z180 '%s' BCR1L rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1263 | 1263 | break; |
| 1264 | 1264 | |
| 1265 | 1265 | case Z180_BCR1H: |
| 1266 | 1266 | data = cpustate->IO_BCR1H & Z180_BCR1H_RMASK; |
| 1267 | LOG(("Z180 '%s' BCR1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1267 | LOG(("Z180 '%s' BCR1H rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1268 | 1268 | break; |
| 1269 | 1269 | |
| 1270 | 1270 | case Z180_DSTAT: |
| 1271 | 1271 | data = cpustate->IO_DSTAT & Z180_DSTAT_RMASK; |
| 1272 | LOG(("Z180 '%s' DSTAT rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1272 | LOG(("Z180 '%s' DSTAT rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1273 | 1273 | break; |
| 1274 | 1274 | |
| 1275 | 1275 | case Z180_DMODE: |
| 1276 | 1276 | data = cpustate->IO_DMODE & Z180_DMODE_RMASK; |
| 1277 | LOG(("Z180 '%s' DMODE rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1277 | LOG(("Z180 '%s' DMODE rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1278 | 1278 | break; |
| 1279 | 1279 | |
| 1280 | 1280 | case Z180_DCNTL: |
| 1281 | 1281 | data = cpustate->IO_DCNTL & Z180_DCNTL_RMASK; |
| 1282 | LOG(("Z180 '%s' DCNTL rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1282 | LOG(("Z180 '%s' DCNTL rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1283 | 1283 | break; |
| 1284 | 1284 | |
| 1285 | 1285 | case Z180_IL: |
| 1286 | 1286 | data = cpustate->IO_IL & Z180_IL_RMASK; |
| 1287 | LOG(("Z180 '%s' IL rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1287 | LOG(("Z180 '%s' IL rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1288 | 1288 | break; |
| 1289 | 1289 | |
| 1290 | 1290 | case Z180_ITC: |
| 1291 | 1291 | data = cpustate->IO_ITC & Z180_ITC_RMASK; |
| 1292 | LOG(("Z180 '%s' ITC rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1292 | LOG(("Z180 '%s' ITC rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1293 | 1293 | break; |
| 1294 | 1294 | |
| 1295 | 1295 | case Z180_IO35: |
| 1296 | 1296 | data = cpustate->IO_IO35 & Z180_IO35_RMASK; |
| 1297 | LOG(("Z180 '%s' IO35 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1297 | LOG(("Z180 '%s' IO35 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1298 | 1298 | break; |
| 1299 | 1299 | |
| 1300 | 1300 | case Z180_RCR: |
| 1301 | 1301 | data = cpustate->IO_RCR & Z180_RCR_RMASK; |
| 1302 | LOG(("Z180 '%s' RCR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1302 | LOG(("Z180 '%s' RCR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1303 | 1303 | break; |
| 1304 | 1304 | |
| 1305 | 1305 | case Z180_IO37: |
| 1306 | 1306 | data = cpustate->IO_IO37 & Z180_IO37_RMASK; |
| 1307 | LOG(("Z180 '%s' IO37 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1307 | LOG(("Z180 '%s' IO37 rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1308 | 1308 | break; |
| 1309 | 1309 | |
| 1310 | 1310 | case Z180_CBR: |
| 1311 | 1311 | data = cpustate->IO_CBR & Z180_CBR_RMASK; |
| 1312 | LOG(("Z180 '%s' CBR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1312 | LOG(("Z180 '%s' CBR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1313 | 1313 | break; |
| 1314 | 1314 | |
| 1315 | 1315 | case Z180_BBR: |
| 1316 | 1316 | data = cpustate->IO_BBR & Z180_BBR_RMASK; |
| 1317 | LOG(("Z180 '%s' BBR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1317 | LOG(("Z180 '%s' BBR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1318 | 1318 | break; |
| 1319 | 1319 | |
| 1320 | 1320 | case Z180_CBAR: |
| 1321 | 1321 | data = cpustate->IO_CBAR & Z180_CBAR_RMASK; |
| 1322 | LOG(("Z180 '%s' CBAR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1322 | LOG(("Z180 '%s' CBAR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1323 | 1323 | break; |
| 1324 | 1324 | |
| 1325 | 1325 | case Z180_IO3B: |
| 1326 | 1326 | data = cpustate->IO_IO3B & Z180_IO3B_RMASK; |
| 1327 | LOG(("Z180 '%s' IO3B rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1327 | LOG(("Z180 '%s' IO3B rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1328 | 1328 | break; |
| 1329 | 1329 | |
| 1330 | 1330 | case Z180_IO3C: |
| 1331 | 1331 | data = cpustate->IO_IO3C & Z180_IO3C_RMASK; |
| 1332 | LOG(("Z180 '%s' IO3C rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1332 | LOG(("Z180 '%s' IO3C rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1333 | 1333 | break; |
| 1334 | 1334 | |
| 1335 | 1335 | case Z180_IO3D: |
| 1336 | 1336 | data = cpustate->IO_IO3D & Z180_IO3D_RMASK; |
| 1337 | LOG(("Z180 '%s' IO3D rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1337 | LOG(("Z180 '%s' IO3D rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1338 | 1338 | break; |
| 1339 | 1339 | |
| 1340 | 1340 | case Z180_OMCR: |
| 1341 | 1341 | data = cpustate->IO_OMCR & Z180_OMCR_RMASK; |
| 1342 | LOG(("Z180 '%s' OMCR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1342 | LOG(("Z180 '%s' OMCR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1343 | 1343 | break; |
| 1344 | 1344 | |
| 1345 | 1345 | case Z180_IOCR: |
| 1346 | 1346 | data = cpustate->IO_IOCR & Z180_IOCR_RMASK; |
| 1347 | LOG(("Z180 '%s' IOCR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1347 | LOG(("Z180 '%s' IOCR rd $%02x ($%02x)\n", cpustate->device->tag | |
| 1348 | 1348 | break; |
| 1349 | 1349 | } |
| 1350 | 1350 | |
| r7553 | r7554 | |
| 1364 | 1364 | switch (port + Z180_CNTLA0) |
| 1365 | 1365 | { |
| 1366 | 1366 | case Z180_CNTLA0: |
| 1367 | LOG(("Z180 '%s' CNTLA0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1367 | LOG(("Z180 '%s' CNTLA0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1368 | 1368 | cpustate->IO_CNTLA0 = (cpustate->IO_CNTLA0 & ~Z180_CNTLA0_WMASK) | (data & Z180_CNTLA0_WMASK); |
| 1369 | 1369 | break; |
| 1370 | 1370 | |
| 1371 | 1371 | case Z180_CNTLA1: |
| 1372 | LOG(("Z180 '%s' CNTLA1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1372 | LOG(("Z180 '%s' CNTLA1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1373 | 1373 | cpustate->IO_CNTLA1 = (cpustate->IO_CNTLA1 & ~Z180_CNTLA1_WMASK) | (data & Z180_CNTLA1_WMASK); |
| 1374 | 1374 | break; |
| 1375 | 1375 | |
| 1376 | 1376 | case Z180_CNTLB0: |
| 1377 | LOG(("Z180 '%s' CNTLB0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1377 | LOG(("Z180 '%s' CNTLB0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1378 | 1378 | cpustate->IO_CNTLB0 = (cpustate->IO_CNTLB0 & ~Z180_CNTLB0_WMASK) | (data & Z180_CNTLB0_WMASK); |
| 1379 | 1379 | break; |
| 1380 | 1380 | |
| 1381 | 1381 | case Z180_CNTLB1: |
| 1382 | LOG(("Z180 '%s' CNTLB1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1382 | LOG(("Z180 '%s' CNTLB1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1383 | 1383 | cpustate->IO_CNTLB1 = (cpustate->IO_CNTLB1 & ~Z180_CNTLB1_WMASK) | (data & Z180_CNTLB1_WMASK); |
| 1384 | 1384 | break; |
| 1385 | 1385 | |
| 1386 | 1386 | case Z180_STAT0: |
| 1387 | LOG(("Z180 '%s' STAT0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1387 | LOG(("Z180 '%s' STAT0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1388 | 1388 | cpustate->IO_STAT0 = (cpustate->IO_STAT0 & ~Z180_STAT0_WMASK) | (data & Z180_STAT0_WMASK); |
| 1389 | 1389 | break; |
| 1390 | 1390 | |
| 1391 | 1391 | case Z180_STAT1: |
| 1392 | LOG(("Z180 '%s' STAT1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1392 | LOG(("Z180 '%s' STAT1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1393 | 1393 | cpustate->IO_STAT1 = (cpustate->IO_STAT1 & ~Z180_STAT1_WMASK) | (data & Z180_STAT1_WMASK); |
| 1394 | 1394 | break; |
| 1395 | 1395 | |
| 1396 | 1396 | case Z180_TDR0: |
| 1397 | LOG(("Z180 '%s' TDR0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1397 | LOG(("Z180 '%s' TDR0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1398 | 1398 | cpustate->IO_TDR0 = (cpustate->IO_TDR0 & ~Z180_TDR0_WMASK) | (data & Z180_TDR0_WMASK); |
| 1399 | 1399 | break; |
| 1400 | 1400 | |
| 1401 | 1401 | case Z180_TDR1: |
| 1402 | LOG(("Z180 '%s' TDR1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1402 | LOG(("Z180 '%s' TDR1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1403 | 1403 | cpustate->IO_TDR1 = (cpustate->IO_TDR1 & ~Z180_TDR1_WMASK) | (data & Z180_TDR1_WMASK); |
| 1404 | 1404 | break; |
| 1405 | 1405 | |
| 1406 | 1406 | case Z180_RDR0: |
| 1407 | LOG(("Z180 '%s' RDR0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1407 | LOG(("Z180 '%s' RDR0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1408 | 1408 | cpustate->IO_RDR0 = (cpustate->IO_RDR0 & ~Z180_RDR0_WMASK) | (data & Z180_RDR0_WMASK); |
| 1409 | 1409 | break; |
| 1410 | 1410 | |
| 1411 | 1411 | case Z180_RDR1: |
| 1412 | LOG(("Z180 '%s' RDR1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1412 | LOG(("Z180 '%s' RDR1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1413 | 1413 | cpustate->IO_RDR1 = (cpustate->IO_RDR1 & ~Z180_RDR1_WMASK) | (data & Z180_RDR1_WMASK); |
| 1414 | 1414 | break; |
| 1415 | 1415 | |
| 1416 | 1416 | case Z180_CNTR: |
| 1417 | LOG(("Z180 '%s' CNTR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1417 | LOG(("Z180 '%s' CNTR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1418 | 1418 | cpustate->IO_CNTR = (cpustate->IO_CNTR & ~Z180_CNTR_WMASK) | (data & Z180_CNTR_WMASK); |
| 1419 | 1419 | break; |
| 1420 | 1420 | |
| 1421 | 1421 | case Z180_TRDR: |
| 1422 | LOG(("Z180 '%s' TRDR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1422 | LOG(("Z180 '%s' TRDR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1423 | 1423 | cpustate->IO_TRDR = (cpustate->IO_TRDR & ~Z180_TRDR_WMASK) | (data & Z180_TRDR_WMASK); |
| 1424 | 1424 | break; |
| 1425 | 1425 | |
| 1426 | 1426 | case Z180_TMDR0L: |
| 1427 | LOG(("Z180 '%s' TMDR0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1427 | LOG(("Z180 '%s' TMDR0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1428 | 1428 | cpustate->IO_TMDR0L = data & Z180_TMDR0L_WMASK; |
| 1429 | 1429 | cpustate->tmdr_value[0] = (cpustate->tmdr_value[0] & 0xff00) | cpustate->IO_TMDR0L; |
| 1430 | 1430 | break; |
| 1431 | 1431 | |
| 1432 | 1432 | case Z180_TMDR0H: |
| 1433 | LOG(("Z180 '%s' TMDR0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1433 | LOG(("Z180 '%s' TMDR0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1434 | 1434 | cpustate->IO_TMDR0H = data & Z180_TMDR0H_WMASK; |
| 1435 | 1435 | cpustate->tmdr_value[0] = (cpustate->tmdr_value[0] & 0x00ff) | (cpustate->IO_TMDR0H << 8); |
| 1436 | 1436 | break; |
| 1437 | 1437 | |
| 1438 | 1438 | case Z180_RLDR0L: |
| 1439 | LOG(("Z180 '%s' RLDR0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1439 | LOG(("Z180 '%s' RLDR0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1440 | 1440 | cpustate->IO_RLDR0L = (cpustate->IO_RLDR0L & ~Z180_RLDR0L_WMASK) | (data & Z180_RLDR0L_WMASK); |
| 1441 | 1441 | break; |
| 1442 | 1442 | |
| 1443 | 1443 | case Z180_RLDR0H: |
| 1444 | LOG(("Z180 '%s' RLDR0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1444 | LOG(("Z180 '%s' RLDR0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1445 | 1445 | cpustate->IO_RLDR0H = (cpustate->IO_RLDR0H & ~Z180_RLDR0H_WMASK) | (data & Z180_RLDR0H_WMASK); |
| 1446 | 1446 | break; |
| 1447 | 1447 | |
| 1448 | 1448 | case Z180_TCR: |
| 1449 | LOG(("Z180 '%s' TCR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1449 | LOG(("Z180 '%s' TCR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1450 | 1450 | cpustate->IO_TCR = (cpustate->IO_TCR & ~Z180_TCR_WMASK) | (data & Z180_TCR_WMASK); |
| 1451 | 1451 | break; |
| 1452 | 1452 | |
| 1453 | 1453 | case Z180_IO11: |
| 1454 | LOG(("Z180 '%s' IO11 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1454 | LOG(("Z180 '%s' IO11 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1455 | 1455 | cpustate->IO_IO11 = (cpustate->IO_IO11 & ~Z180_IO11_WMASK) | (data & Z180_IO11_WMASK); |
| 1456 | 1456 | break; |
| 1457 | 1457 | |
| 1458 | 1458 | case Z180_ASEXT0: |
| 1459 | LOG(("Z180 '%s' ASEXT0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1459 | LOG(("Z180 '%s' ASEXT0 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1460 | 1460 | cpustate->IO_ASEXT0 = (cpustate->IO_ASEXT0 & ~Z180_ASEXT0_WMASK) | (data & Z180_ASEXT0_WMASK); |
| 1461 | 1461 | break; |
| 1462 | 1462 | |
| 1463 | 1463 | case Z180_ASEXT1: |
| 1464 | LOG(("Z180 '%s' ASEXT1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1464 | LOG(("Z180 '%s' ASEXT1 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1465 | 1465 | cpustate->IO_ASEXT1 = (cpustate->IO_ASEXT1 & ~Z180_ASEXT1_WMASK) | (data & Z180_ASEXT1_WMASK); |
| 1466 | 1466 | break; |
| 1467 | 1467 | |
| 1468 | 1468 | case Z180_TMDR1L: |
| 1469 | LOG(("Z180 '%s' TMDR1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1469 | LOG(("Z180 '%s' TMDR1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1470 | 1470 | cpustate->IO_TMDR1L = data & Z180_TMDR1L_WMASK; |
| 1471 | 1471 | cpustate->tmdr_value[1] = (cpustate->tmdr_value[1] & 0xff00) | cpustate->IO_TMDR1L; |
| 1472 | 1472 | break; |
| 1473 | 1473 | |
| 1474 | 1474 | case Z180_TMDR1H: |
| 1475 | LOG(("Z180 '%s' TMDR1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1475 | LOG(("Z180 '%s' TMDR1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1476 | 1476 | cpustate->IO_TMDR1H = data & Z180_TMDR1H_WMASK; |
| 1477 | 1477 | cpustate->tmdr_value[1] = (cpustate->tmdr_value[1] & 0x00ff) | cpustate->IO_TMDR1H; |
| 1478 | 1478 | break; |
| 1479 | 1479 | |
| 1480 | 1480 | case Z180_RLDR1L: |
| 1481 | LOG(("Z180 '%s' RLDR1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1481 | LOG(("Z180 '%s' RLDR1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1482 | 1482 | cpustate->IO_RLDR1L = (cpustate->IO_RLDR1L & ~Z180_RLDR1L_WMASK) | (data & Z180_RLDR1L_WMASK); |
| 1483 | 1483 | break; |
| 1484 | 1484 | |
| 1485 | 1485 | case Z180_RLDR1H: |
| 1486 | LOG(("Z180 '%s' RLDR1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1486 | LOG(("Z180 '%s' RLDR1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1487 | 1487 | cpustate->IO_RLDR1H = (cpustate->IO_RLDR1H & ~Z180_RLDR1H_WMASK) | (data & Z180_RLDR1H_WMASK); |
| 1488 | 1488 | break; |
| 1489 | 1489 | |
| 1490 | 1490 | case Z180_FRC: |
| 1491 | LOG(("Z180 '%s' FRC wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1491 | LOG(("Z180 '%s' FRC wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1492 | 1492 | cpustate->IO_FRC = (cpustate->IO_FRC & ~Z180_FRC_WMASK) | (data & Z180_FRC_WMASK); |
| 1493 | 1493 | break; |
| 1494 | 1494 | |
| 1495 | 1495 | case Z180_IO19: |
| 1496 | LOG(("Z180 '%s' IO19 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1496 | LOG(("Z180 '%s' IO19 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1497 | 1497 | cpustate->IO_IO19 = (cpustate->IO_IO19 & ~Z180_IO19_WMASK) | (data & Z180_IO19_WMASK); |
| 1498 | 1498 | break; |
| 1499 | 1499 | |
| 1500 | 1500 | case Z180_ASTC0L: |
| 1501 | LOG(("Z180 '%s' ASTC0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1501 | LOG(("Z180 '%s' ASTC0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1502 | 1502 | cpustate->IO_ASTC0L = (cpustate->IO_ASTC0L & ~Z180_ASTC0L_WMASK) | (data & Z180_ASTC0L_WMASK); |
| 1503 | 1503 | break; |
| 1504 | 1504 | |
| 1505 | 1505 | case Z180_ASTC0H: |
| 1506 | LOG(("Z180 '%s' ASTC0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1506 | LOG(("Z180 '%s' ASTC0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1507 | 1507 | cpustate->IO_ASTC0H = (cpustate->IO_ASTC0H & ~Z180_ASTC0H_WMASK) | (data & Z180_ASTC0H_WMASK); |
| 1508 | 1508 | break; |
| 1509 | 1509 | |
| 1510 | 1510 | case Z180_ASTC1L: |
| 1511 | LOG(("Z180 '%s' ASTC1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1511 | LOG(("Z180 '%s' ASTC1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1512 | 1512 | cpustate->IO_ASTC1L = (cpustate->IO_ASTC1L & ~Z180_ASTC1L_WMASK) | (data & Z180_ASTC1L_WMASK); |
| 1513 | 1513 | break; |
| 1514 | 1514 | |
| 1515 | 1515 | case Z180_ASTC1H: |
| 1516 | LOG(("Z180 '%s' ASTC1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1516 | LOG(("Z180 '%s' ASTC1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1517 | 1517 | cpustate->IO_ASTC1H = (cpustate->IO_ASTC1H & ~Z180_ASTC1H_WMASK) | (data & Z180_ASTC1H_WMASK); |
| 1518 | 1518 | break; |
| 1519 | 1519 | |
| 1520 | 1520 | case Z180_CMR: |
| 1521 | LOG(("Z180 '%s' CMR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1521 | LOG(("Z180 '%s' CMR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1522 | 1522 | cpustate->IO_CMR = (cpustate->IO_CMR & ~Z180_CMR_WMASK) | (data & Z180_CMR_WMASK); |
| 1523 | 1523 | break; |
| 1524 | 1524 | |
| 1525 | 1525 | case Z180_CCR: |
| 1526 | LOG(("Z180 '%s' CCR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1526 | LOG(("Z180 '%s' CCR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1527 | 1527 | cpustate->IO_CCR = (cpustate->IO_CCR & ~Z180_CCR_WMASK) | (data & Z180_CCR_WMASK); |
| 1528 | 1528 | break; |
| 1529 | 1529 | |
| 1530 | 1530 | case Z180_SAR0L: |
| 1531 | LOG(("Z180 '%s' SAR0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1531 | LOG(("Z180 '%s' SAR0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1532 | 1532 | cpustate->IO_SAR0L = (cpustate->IO_SAR0L & ~Z180_SAR0L_WMASK) | (data & Z180_SAR0L_WMASK); |
| 1533 | 1533 | break; |
| 1534 | 1534 | |
| 1535 | 1535 | case Z180_SAR0H: |
| 1536 | LOG(("Z180 '%s' SAR0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1536 | LOG(("Z180 '%s' SAR0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1537 | 1537 | cpustate->IO_SAR0H = (cpustate->IO_SAR0H & ~Z180_SAR0H_WMASK) | (data & Z180_SAR0H_WMASK); |
| 1538 | 1538 | break; |
| 1539 | 1539 | |
| 1540 | 1540 | case Z180_SAR0B: |
| 1541 | LOG(("Z180 '%s' SAR0B wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1541 | LOG(("Z180 '%s' SAR0B wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1542 | 1542 | cpustate->IO_SAR0B = (cpustate->IO_SAR0B & ~Z180_SAR0B_WMASK) | (data & Z180_SAR0B_WMASK); |
| 1543 | 1543 | break; |
| 1544 | 1544 | |
| 1545 | 1545 | case Z180_DAR0L: |
| 1546 | LOG(("Z180 '%s' DAR0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1546 | LOG(("Z180 '%s' DAR0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1547 | 1547 | cpustate->IO_DAR0L = (cpustate->IO_DAR0L & ~Z180_DAR0L_WMASK) | (data & Z180_DAR0L_WMASK); |
| 1548 | 1548 | break; |
| 1549 | 1549 | |
| 1550 | 1550 | case Z180_DAR0H: |
| 1551 | LOG(("Z180 '%s' DAR0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1551 | LOG(("Z180 '%s' DAR0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1552 | 1552 | cpustate->IO_DAR0H = (cpustate->IO_DAR0H & ~Z180_DAR0H_WMASK) | (data & Z180_DAR0H_WMASK); |
| 1553 | 1553 | break; |
| 1554 | 1554 | |
| 1555 | 1555 | case Z180_DAR0B: |
| 1556 | LOG(("Z180 '%s' DAR0B wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1556 | LOG(("Z180 '%s' DAR0B wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1557 | 1557 | cpustate->IO_DAR0B = (cpustate->IO_DAR0B & ~Z180_DAR0B_WMASK) | (data & Z180_DAR0B_WMASK); |
| 1558 | 1558 | break; |
| 1559 | 1559 | |
| 1560 | 1560 | case Z180_BCR0L: |
| 1561 | LOG(("Z180 '%s' BCR0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1561 | LOG(("Z180 '%s' BCR0L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1562 | 1562 | cpustate->IO_BCR0L = (cpustate->IO_BCR0L & ~Z180_BCR0L_WMASK) | (data & Z180_BCR0L_WMASK); |
| 1563 | 1563 | break; |
| 1564 | 1564 | |
| 1565 | 1565 | case Z180_BCR0H: |
| 1566 | LOG(("Z180 '%s' BCR0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1566 | LOG(("Z180 '%s' BCR0H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1567 | 1567 | cpustate->IO_BCR0H = (cpustate->IO_BCR0H & ~Z180_BCR0H_WMASK) | (data & Z180_BCR0H_WMASK); |
| 1568 | 1568 | break; |
| 1569 | 1569 | |
| 1570 | 1570 | case Z180_MAR1L: |
| 1571 | LOG(("Z180 '%s' MAR1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1571 | LOG(("Z180 '%s' MAR1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1572 | 1572 | cpustate->IO_MAR1L = (cpustate->IO_MAR1L & ~Z180_MAR1L_WMASK) | (data & Z180_MAR1L_WMASK); |
| 1573 | 1573 | break; |
| 1574 | 1574 | |
| 1575 | 1575 | case Z180_MAR1H: |
| 1576 | LOG(("Z180 '%s' MAR1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1576 | LOG(("Z180 '%s' MAR1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1577 | 1577 | cpustate->IO_MAR1H = (cpustate->IO_MAR1H & ~Z180_MAR1H_WMASK) | (data & Z180_MAR1H_WMASK); |
| 1578 | 1578 | break; |
| 1579 | 1579 | |
| 1580 | 1580 | case Z180_MAR1B: |
| 1581 | LOG(("Z180 '%s' MAR1B wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1581 | LOG(("Z180 '%s' MAR1B wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1582 | 1582 | cpustate->IO_MAR1B = (cpustate->IO_MAR1B & ~Z180_MAR1B_WMASK) | (data & Z180_MAR1B_WMASK); |
| 1583 | 1583 | break; |
| 1584 | 1584 | |
| 1585 | 1585 | case Z180_IAR1L: |
| 1586 | LOG(("Z180 '%s' IAR1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1586 | LOG(("Z180 '%s' IAR1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1587 | 1587 | cpustate->IO_IAR1L = (cpustate->IO_IAR1L & ~Z180_IAR1L_WMASK) | (data & Z180_IAR1L_WMASK); |
| 1588 | 1588 | break; |
| 1589 | 1589 | |
| 1590 | 1590 | case Z180_IAR1H: |
| 1591 | LOG(("Z180 '%s' IAR1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1591 | LOG(("Z180 '%s' IAR1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1592 | 1592 | cpustate->IO_IAR1H = (cpustate->IO_IAR1H & ~Z180_IAR1H_WMASK) | (data & Z180_IAR1H_WMASK); |
| 1593 | 1593 | break; |
| 1594 | 1594 | |
| 1595 | 1595 | case Z180_IAR1B: |
| 1596 | LOG(("Z180 '%s' IAR1B wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1596 | LOG(("Z180 '%s' IAR1B wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1597 | 1597 | cpustate->IO_IAR1B = (cpustate->IO_IAR1B & ~Z180_IAR1B_WMASK) | (data & Z180_IAR1B_WMASK); |
| 1598 | 1598 | break; |
| 1599 | 1599 | |
| 1600 | 1600 | case Z180_BCR1L: |
| 1601 | LOG(("Z180 '%s' BCR1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1601 | LOG(("Z180 '%s' BCR1L wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1602 | 1602 | cpustate->IO_BCR1L = (cpustate->IO_BCR1L & ~Z180_BCR1L_WMASK) | (data & Z180_BCR1L_WMASK); |
| 1603 | 1603 | break; |
| 1604 | 1604 | |
| 1605 | 1605 | case Z180_BCR1H: |
| 1606 | LOG(("Z180 '%s' BCR1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1606 | LOG(("Z180 '%s' BCR1H wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1607 | 1607 | cpustate->IO_BCR1H = (cpustate->IO_BCR1H & ~Z180_BCR1H_WMASK) | (data & Z180_BCR1H_WMASK); |
| 1608 | 1608 | break; |
| 1609 | 1609 | |
| 1610 | 1610 | case Z180_DSTAT: |
| 1611 | LOG(("Z180 '%s' DSTAT wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1611 | LOG(("Z180 '%s' DSTAT wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1612 | 1612 | cpustate->IO_DSTAT = (cpustate->IO_DSTAT & ~Z180_DSTAT_WMASK) | (data & Z180_DSTAT_WMASK); |
| 1613 | 1613 | if ((data & (Z180_DSTAT_DE1 | Z180_DSTAT_DWE1)) == Z180_DSTAT_DE1) |
| 1614 | 1614 | cpustate->IO_DSTAT |= Z180_DSTAT_DME; /* DMA enable */ |
| r7553 | r7554 | |
| 1617 | 1617 | break; |
| 1618 | 1618 | |
| 1619 | 1619 | case Z180_DMODE: |
| 1620 | LOG(("Z180 '%s' DMODE wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1620 | LOG(("Z180 '%s' DMODE wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1621 | 1621 | cpustate->IO_DMODE = (cpustate->IO_DMODE & ~Z180_DMODE_WMASK) | (data & Z180_DMODE_WMASK); |
| 1622 | 1622 | break; |
| 1623 | 1623 | |
| 1624 | 1624 | case Z180_DCNTL: |
| 1625 | LOG(("Z180 '%s' DCNTL wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1625 | LOG(("Z180 '%s' DCNTL wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1626 | 1626 | cpustate->IO_DCNTL = (cpustate->IO_DCNTL & ~Z180_DCNTL_WMASK) | (data & Z180_DCNTL_WMASK); |
| 1627 | 1627 | break; |
| 1628 | 1628 | |
| 1629 | 1629 | case Z180_IL: |
| 1630 | LOG(("Z180 '%s' IL wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1630 | LOG(("Z180 '%s' IL wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1631 | 1631 | cpustate->IO_IL = (cpustate->IO_IL & ~Z180_IL_WMASK) | (data & Z180_IL_WMASK); |
| 1632 | 1632 | break; |
| 1633 | 1633 | |
| 1634 | 1634 | case Z180_ITC: |
| 1635 | LOG(("Z180 '%s' ITC wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1635 | LOG(("Z180 '%s' ITC wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1636 | 1636 | cpustate->IO_ITC = (cpustate->IO_ITC & ~Z180_ITC_WMASK) | (data & Z180_ITC_WMASK); |
| 1637 | 1637 | break; |
| 1638 | 1638 | |
| 1639 | 1639 | case Z180_IO35: |
| 1640 | LOG(("Z180 '%s' IO35 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1640 | LOG(("Z180 '%s' IO35 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1641 | 1641 | cpustate->IO_IO35 = (cpustate->IO_IO35 & ~Z180_IO35_WMASK) | (data & Z180_IO35_WMASK); |
| 1642 | 1642 | break; |
| 1643 | 1643 | |
| 1644 | 1644 | case Z180_RCR: |
| 1645 | LOG(("Z180 '%s' RCR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1645 | LOG(("Z180 '%s' RCR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1646 | 1646 | cpustate->IO_RCR = (cpustate->IO_RCR & ~Z180_RCR_WMASK) | (data & Z180_RCR_WMASK); |
| 1647 | 1647 | break; |
| 1648 | 1648 | |
| 1649 | 1649 | case Z180_IO37: |
| 1650 | LOG(("Z180 '%s' IO37 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1650 | LOG(("Z180 '%s' IO37 wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1651 | 1651 | cpustate->IO_IO37 = (cpustate->IO_IO37 & ~Z180_IO37_WMASK) | (data & Z180_IO37_WMASK); |
| 1652 | 1652 | break; |
| 1653 | 1653 | |
| 1654 | 1654 | case Z180_CBR: |
| 1655 | LOG(("Z180 '%s' CBR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1655 | LOG(("Z180 '%s' CBR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1656 | 1656 | cpustate->IO_CBR = (cpustate->IO_CBR & ~Z180_CBR_WMASK) | (data & Z180_CBR_WMASK); |
| 1657 | 1657 | z180_mmu(cpustate); |
| 1658 | 1658 | break; |
| 1659 | 1659 | |
| 1660 | 1660 | case Z180_BBR: |
| 1661 | LOG(("Z180 '%s' BBR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1661 | LOG(("Z180 '%s' BBR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1662 | 1662 | cpustate->IO_BBR = (cpustate->IO_BBR & ~Z180_BBR_WMASK) | (data & Z180_BBR_WMASK); |
| 1663 | 1663 | z180_mmu(cpustate); |
| 1664 | 1664 | break; |
| 1665 | 1665 | |
| 1666 | 1666 | case Z180_CBAR: |
| 1667 | LOG(("Z180 '%s' CBAR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1667 | LOG(("Z180 '%s' CBAR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1668 | 1668 | cpustate->IO_CBAR = (cpustate->IO_CBAR & ~Z180_CBAR_WMASK) | (data & Z180_CBAR_WMASK); |
| 1669 | 1669 | z180_mmu(cpustate); |
| 1670 | 1670 | break; |
| 1671 | 1671 | |
| 1672 | 1672 | case Z180_IO3B: |
| 1673 | LOG(("Z180 '%s' IO3B wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1673 | LOG(("Z180 '%s' IO3B wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1674 | 1674 | cpustate->IO_IO3B = (cpustate->IO_IO3B & ~Z180_IO3B_WMASK) | (data & Z180_IO3B_WMASK); |
| 1675 | 1675 | break; |
| 1676 | 1676 | |
| 1677 | 1677 | case Z180_IO3C: |
| 1678 | LOG(("Z180 '%s' IO3C wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1678 | LOG(("Z180 '%s' IO3C wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1679 | 1679 | cpustate->IO_IO3C = (cpustate->IO_IO3C & ~Z180_IO3C_WMASK) | (data & Z180_IO3C_WMASK); |
| 1680 | 1680 | break; |
| 1681 | 1681 | |
| 1682 | 1682 | case Z180_IO3D: |
| 1683 | LOG(("Z180 '%s' IO3D wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1683 | LOG(("Z180 '%s' IO3D wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1684 | 1684 | cpustate->IO_IO3D = (cpustate->IO_IO3D & ~Z180_IO3D_WMASK) | (data & Z180_IO3D_WMASK); |
| 1685 | 1685 | break; |
| 1686 | 1686 | |
| 1687 | 1687 | case Z180_OMCR: |
| 1688 | LOG(("Z180 '%s' OMCR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1688 | LOG(("Z180 '%s' OMCR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1689 | 1689 | cpustate->IO_OMCR = (cpustate->IO_OMCR & ~Z180_OMCR_WMASK) | (data & Z180_OMCR_WMASK); |
| 1690 | 1690 | break; |
| 1691 | 1691 | |
| 1692 | 1692 | case Z180_IOCR: |
| 1693 | LOG(("Z180 '%s' IOCR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1693 | LOG(("Z180 '%s' IOCR wr $%02x ($%02x)\n", cpustate->device->tag | |
| 1694 | 1694 | cpustate->IO_IOCR = (cpustate->IO_IOCR & ~Z180_IOCR_WMASK) | (data & Z180_IOCR_WMASK); |
| 1695 | 1695 | break; |
| 1696 | 1696 | } |
| r7553 | r7554 | |
| 1893 | 1893 | /* I/O asynchronous clock 0 (active high) or DREQ0 (mux) */ |
| 1894 | 1894 | if (changes & Z180_CKA0) |
| 1895 | 1895 | { |
| 1896 | LOG(("Z180 '%s' CKA0 %d\n", cpustate->device->tag | |
| 1896 | LOG(("Z180 '%s' CKA0 %d\n", cpustate->device->tag | |
| 1897 | 1897 | cpustate->iol = (cpustate->iol & ~Z180_CKA0) | (data & Z180_CKA0); |
| 1898 | 1898 | } |
| 1899 | 1899 | |
| 1900 | 1900 | /* I/O asynchronous clock 1 (active high) or TEND1 (mux) */ |
| 1901 | 1901 | if (changes & Z180_CKA1) |
| 1902 | 1902 | { |
| 1903 | LOG(("Z180 '%s' CKA1 %d\n", cpustate->device->tag | |
| 1903 | LOG(("Z180 '%s' CKA1 %d\n", cpustate->device->tag | |
| 1904 | 1904 | cpustate->iol = (cpustate->iol & ~Z180_CKA1) | (data & Z180_CKA1); |
| 1905 | 1905 | } |
| 1906 | 1906 | |
| 1907 | 1907 | /* I/O serial clock (active high) */ |
| 1908 | 1908 | if (changes & Z180_CKS) |
| 1909 | 1909 | { |
| 1910 | LOG(("Z180 '%s' CKS %d\n", cpustate->device->tag | |
| 1910 | LOG(("Z180 '%s' CKS %d\n", cpustate->device->tag | |
| 1911 | 1911 | cpustate->iol = (cpustate->iol & ~Z180_CKS) | (data & Z180_CKS); |
| 1912 | 1912 | } |
| 1913 | 1913 | |
| 1914 | 1914 | /* I clear to send 0 (active low) */ |
| 1915 | 1915 | if (changes & Z180_CTS0) |
| 1916 | 1916 | { |
| 1917 | LOG(("Z180 '%s' CTS0 %d\n", cpustate->device->tag | |
| 1917 | LOG(("Z180 '%s' CTS0 %d\n", cpustate->device->tag | |
| 1918 | 1918 | cpustate->iol = (cpustate->iol & ~Z180_CTS0) | (data & Z180_CTS0); |
| 1919 | 1919 | } |
| 1920 | 1920 | |
| 1921 | 1921 | /* I clear to send 1 (active low) or RXS (mux) */ |
| 1922 | 1922 | if (changes & Z180_CTS1) |
| 1923 | 1923 | { |
| 1924 | LOG(("Z180 '%s' CTS1 %d\n", cpustate->device->tag | |
| 1924 | LOG(("Z180 '%s' CTS1 %d\n", cpustate->device->tag | |
| 1925 | 1925 | cpustate->iol = (cpustate->iol & ~Z180_CTS1) | (data & Z180_CTS1); |
| 1926 | 1926 | } |
| 1927 | 1927 | |
| 1928 | 1928 | /* I data carrier detect (active low) */ |
| 1929 | 1929 | if (changes & Z180_DCD0) |
| 1930 | 1930 | { |
| 1931 | LOG(("Z180 '%s' DCD0 %d\n", cpustate->device->tag | |
| 1931 | LOG(("Z180 '%s' DCD0 %d\n", cpustate->device->tag | |
| 1932 | 1932 | cpustate->iol = (cpustate->iol & ~Z180_DCD0) | (data & Z180_DCD0); |
| 1933 | 1933 | } |
| 1934 | 1934 | |
| 1935 | 1935 | /* I data request DMA ch 0 (active low) or CKA0 (mux) */ |
| 1936 | 1936 | if (changes & Z180_DREQ0) |
| 1937 | 1937 | { |
| 1938 | LOG(("Z180 '%s' DREQ0 %d\n", cpustate->device->tag | |
| 1938 | LOG(("Z180 '%s' DREQ0 %d\n", cpustate->device->tag | |
| 1939 | 1939 | cpustate->iol = (cpustate->iol & ~Z180_DREQ0) | (data & Z180_DREQ0); |
| 1940 | 1940 | } |
| 1941 | 1941 | |
| 1942 | 1942 | /* I data request DMA ch 1 (active low) */ |
| 1943 | 1943 | if (changes & Z180_DREQ1) |
| 1944 | 1944 | { |
| 1945 | LOG(("Z180 '%s' DREQ1 %d\n", cpustate->device->tag | |
| 1945 | LOG(("Z180 '%s' DREQ1 %d\n", cpustate->device->tag | |
| 1946 | 1946 | cpustate->iol = (cpustate->iol & ~Z180_DREQ1) | (data & Z180_DREQ1); |
| 1947 | 1947 | } |
| 1948 | 1948 | |
| 1949 | 1949 | /* I asynchronous receive data 0 (active high) */ |
| 1950 | 1950 | if (changes & Z180_RXA0) |
| 1951 | 1951 | { |
| 1952 | LOG(("Z180 '%s' RXA0 %d\n", cpustate->device->tag | |
| 1952 | LOG(("Z180 '%s' RXA0 %d\n", cpustate->device->tag | |
| 1953 | 1953 | cpustate->iol = (cpustate->iol & ~Z180_RXA0) | (data & Z180_RXA0); |
| 1954 | 1954 | } |
| 1955 | 1955 | |
| 1956 | 1956 | /* I asynchronous receive data 1 (active high) */ |
| 1957 | 1957 | if (changes & Z180_RXA1) |
| 1958 | 1958 | { |
| 1959 | LOG(("Z180 '%s' RXA1 %d\n", cpustate->device->tag | |
| 1959 | LOG(("Z180 '%s' RXA1 %d\n", cpustate->device->tag | |
| 1960 | 1960 | cpustate->iol = (cpustate->iol & ~Z180_RXA1) | (data & Z180_RXA1); |
| 1961 | 1961 | } |
| 1962 | 1962 | |
| 1963 | 1963 | /* I clocked serial receive data (active high) or CTS1 (mux) */ |
| 1964 | 1964 | if (changes & Z180_RXS) |
| 1965 | 1965 | { |
| 1966 | LOG(("Z180 '%s' RXS %d\n", cpustate->device->tag | |
| 1966 | LOG(("Z180 '%s' RXS %d\n", cpustate->device->tag | |
| 1967 | 1967 | cpustate->iol = (cpustate->iol & ~Z180_RXS) | (data & Z180_RXS); |
| 1968 | 1968 | } |
| 1969 | 1969 | |
| 1970 | 1970 | /* O request to send (active low) */ |
| 1971 | 1971 | if (changes & Z180_RTS0) |
| 1972 | 1972 | { |
| 1973 | LOG(("Z180 '%s' RTS0 won't change output\n", cpustate->device->tag | |
| 1973 | LOG(("Z180 '%s' RTS0 won't change output\n", cpustate->device->tag | |
| 1974 | 1974 | } |
| 1975 | 1975 | |
| 1976 | 1976 | /* O transfer end 0 (active low) or CKA1 (mux) */ |
| 1977 | 1977 | if (changes & Z180_TEND0) |
| 1978 | 1978 | { |
| 1979 | LOG(("Z180 '%s' TEND0 won't change output\n", cpustate->device->tag | |
| 1979 | LOG(("Z180 '%s' TEND0 won't change output\n", cpustate->device->tag | |
| 1980 | 1980 | } |
| 1981 | 1981 | |
| 1982 | 1982 | /* O transfer end 1 (active low) */ |
| 1983 | 1983 | if (changes & Z180_TEND1) |
| 1984 | 1984 | { |
| 1985 | LOG(("Z180 '%s' TEND1 won't change output\n", cpustate->device->tag | |
| 1985 | LOG(("Z180 '%s' TEND1 won't change output\n", cpustate->device->tag | |
| 1986 | 1986 | } |
| 1987 | 1987 | |
| 1988 | 1988 | /* O transfer out (PRT channel, active low) or A18 (mux) */ |
| 1989 | 1989 | if (changes & Z180_A18_TOUT) |
| 1990 | 1990 | { |
| 1991 | LOG(("Z180 '%s' TOUT won't change output\n", cpustate->device->tag | |
| 1991 | LOG(("Z180 '%s' TOUT won't change output\n", cpustate->device->tag | |
| 1992 | 1992 | } |
| 1993 | 1993 | |
| 1994 | 1994 | /* O asynchronous transmit data 0 (active high) */ |
| 1995 | 1995 | if (changes & Z180_TXA0) |
| 1996 | 1996 | { |
| 1997 | LOG(("Z180 '%s' TXA0 won't change output\n", cpustate->device->tag | |
| 1997 | LOG(("Z180 '%s' TXA0 won't change output\n", cpustate->device->tag | |
| 1998 | 1998 | } |
| 1999 | 1999 | |
| 2000 | 2000 | /* O asynchronous transmit data 1 (active high) */ |
| 2001 | 2001 | if (changes & Z180_TXA1) |
| 2002 | 2002 | { |
| 2003 | LOG(("Z180 '%s' TXA1 won't change output\n", cpustate->device->tag | |
| 2003 | LOG(("Z180 '%s' TXA1 won't change output\n", cpustate->device->tag | |
| 2004 | 2004 | } |
| 2005 | 2005 | |
| 2006 | 2006 | /* O clocked serial transmit data (active high) */ |
| 2007 | 2007 | if (changes & Z180_TXS) |
| 2008 | 2008 | { |
| 2009 | LOG(("Z180 '%s' TXS won't change output\n", cpustate->device->tag | |
| 2009 | LOG(("Z180 '%s' TXS won't change output\n", cpustate->device->tag | |
| 2010 | 2010 | } |
| 2011 | 2011 | } |
| 2012 | 2012 | |
| r7553 | r7554 | |
| 2320 | 2320 | /* to just check here */ |
| 2321 | 2321 | if (cpustate->nmi_pending) |
| 2322 | 2322 | { |
| 2323 | LOG(("Z180 '%s' take NMI\n", cpustate->device->tag | |
| 2323 | LOG(("Z180 '%s' take NMI\n", cpustate->device->tag | |
| 2324 | 2324 | cpustate->_PPC = -1; /* there isn't a valid previous program counter */ |
| 2325 | 2325 | LEAVE_HALT(cpustate); /* Check if processor was halted */ |
| 2326 | 2326 | |
| r7553 | r7554 | |
| 2426 | 2426 | } |
| 2427 | 2427 | else |
| 2428 | 2428 | { |
| 2429 | LOG(("Z180 '%s' set_irq_line %d = %d\n",cpustate->device->tag | |
| 2429 | LOG(("Z180 '%s' set_irq_line %d = %d\n",cpustate->device->tag | |
| 2430 | 2430 | |
| 2431 | 2431 | /* update the IRQ state */ |
| 2432 | 2432 | cpustate->irq_state[irqline] = state; |
| r7553 | r7554 | |
|---|---|---|
| 236 | 236 | * RETN |
| 237 | 237 | ***************************************************************/ |
| 238 | 238 | #define RETN { \ |
| 239 | LOG(("Z180 '%s' RETN IFF1:%d IFF2:%d\n", cpustate->device->tag | |
| 239 | LOG(("Z180 '%s' RETN IFF1:%d IFF2:%d\n", cpustate->device->tag | |
| 240 | 240 | POP(cpustate, PC); \ |
| 241 | 241 | cpustate->IFF1 = cpustate->IFF2; \ |
| 242 | 242 | } |
| r7553 | r7554 | |
|---|---|---|
| 1 | 1 | OP(illegal,1) { |
| 2 | 2 | logerror("Z180 '%s' ill. opcode $%02x $%02x\n", |
| 3 | cpustate->device->tag | |
| 3 | cpustate->device->tag | |
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | /********************************************************** |
| r7553 | r7554 | |
|---|---|---|
| 1 | 1 | OP(illegal,2) |
| 2 | 2 | { |
| 3 | 3 | logerror("Z180 '%s' ill. opcode $ed $%02x\n", |
| 4 | cpustate->device->tag | |
| 4 | cpustate->device->tag | |
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | /********************************************************** |
| r7553 | r7554 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | static void illegal(upd7810_state *cpustate) |
| 11 | 11 | { |
| 12 | logerror("uPD7810 '%s': illegal opcode %02x at PC:%04x\n", cpustate->device->tag | |
| 12 | logerror("uPD7810 '%s': illegal opcode %02x at PC:%04x\n", cpustate->device->tag | |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | static void illegal2(upd7810_state *cpustate) |
| 16 | 16 | { |
| 17 | logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", cpustate->device->tag | |
| 17 | logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", cpustate->device->tag | |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /* prefix 48 */ |
| r7553 | r7554 | |
| 8648 | 8648 | val = RP( cpustate, UPD7807_PORTT ); |
| 8649 | 8649 | break; |
| 8650 | 8650 | default: |
| 8651 | logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", cpustate->device->tag | |
| 8651 | logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", cpustate->device->tag | |
| 8652 | 8652 | val = 0; |
| 8653 | 8653 | break; |
| 8654 | 8654 | } |
| r7553 | r7554 | |
| 8702 | 8702 | // PT is input only |
| 8703 | 8703 | // break; |
| 8704 | 8704 | default: |
| 8705 | logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", cpustate->device->tag | |
| 8705 | logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", cpustate->device->tag | |
| 8706 | 8706 | break; |
| 8707 | 8707 | } |
| 8708 | 8708 | } |
| r7553 | r7554 | |
| 8752 | 8752 | // PT is input only |
| 8753 | 8753 | // break; |
| 8754 | 8754 | default: |
| 8755 | logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", cpustate->device->tag | |
| 8755 | logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", cpustate->device->tag | |
| 8756 | 8756 | break; |
| 8757 | 8757 | } |
| 8758 | 8758 | } |
| r7553 | r7554 | |
| 8801 | 8801 | val = RP( cpustate, UPD7807_PORTT ); |
| 8802 | 8802 | break; |
| 8803 | 8803 | default: |
| 8804 | logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", cpustate->device->tag | |
| 8804 | logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", cpustate->device->tag | |
| 8805 | 8805 | val = 0; |
| 8806 | 8806 | break; |
| 8807 | 8807 | } |
| r7553 | r7554 | |
|---|---|---|
| 584 | 584 | { |
| 585 | 585 | if (m68_state->nmi_state == state) return; |
| 586 | 586 | m68_state->nmi_state = state; |
| 587 | LOG(("HD6309 '%s' set_irq_line (NMI) %d (PC=%4.4X)\n", m68_state->device->tag | |
| 587 | LOG(("HD6309 '%s' set_irq_line (NMI) %d (PC=%4.4X)\n", m68_state->device->tag | |
| 588 | 588 | if( state == CLEAR_LINE ) return; |
| 589 | 589 | |
| 590 | 590 | /* if the stack was not yet initialized */ |
| r7553 | r7554 | |
| 622 | 622 | } |
| 623 | 623 | else if (irqline < 2) |
| 624 | 624 | { |
| 625 | LOG(("HD6309 '%s' set_irq_line %d, %d (PC=%4.4X)\n", m68_state->device->tag | |
| 625 | LOG(("HD6309 '%s' set_irq_line %d, %d (PC=%4.4X)\n", m68_state->device->tag | |
| 626 | 626 | m68_state->irq_state[irqline] = state; |
| 627 | 627 | if (state == CLEAR_LINE) return; |
| 628 | 628 | check_irq_lines(m68_state); |
| r7553 | r7554 | |
|---|---|---|
| 93 | 93 | |
| 94 | 94 | /*****************************************************************************/ |
| 95 | 95 | |
| 96 | INLINE bool avr8_is_long_opcode(UINT16 op) | |
| 97 | { | |
| 98 | if((op & 0xf000) == 0x9000) | |
| 99 | { | |
| 100 | if((op & 0x0f00) < 0x0400) | |
| 101 | { | |
| 102 | if((op & 0x000f) == 0x0000) | |
| 103 | { | |
| 104 | return true; | |
| 105 | } | |
| 106 | } | |
| 107 | else if((op & 0x0f00) < 0x0600) | |
| 108 | { | |
| 109 | if((op & 0x000f) >= 0x000c) | |
| 110 | { | |
| 111 | return true; | |
| 112 | } | |
| 113 | } | |
| 114 | } | |
| 115 | return false; | |
| 116 | } | |
| 117 | ||
| 96 | 118 | INLINE UINT8 READ_PRG_8(avr8_state *cpustate, UINT32 address) |
| 97 | 119 | { |
| 98 | 120 | return memory_read_byte_16le(cpustate->program, address); |
| r7553 | r7554 | |
| 149 | 171 | // Horrible hack, not accurate |
| 150 | 172 | if(state) |
| 151 | 173 | { |
| 152 | SREG_W(AVR8_SREG_I, 0); | |
| 153 | PUSH(cpustate, (cpustate->pc >> 8) & 0x00ff); | |
| 154 | PUSH(cpustate, cpustate->pc & 0x00ff); | |
| 155 | cpustate->pc = vector; | |
| 174 | if(SREG_R(AVR8_SREG_I)) | |
| 175 | { | |
| 176 | SREG_W(AVR8_SREG_I, 0); | |
| 177 | PUSH(cpustate, (cpustate->pc >> 8) & 0x00ff); | |
| 178 | PUSH(cpustate, cpustate->pc & 0x00ff); | |
| 179 | cpustate->pc = vector; | |
| 180 | } | |
| 156 | 181 | } |
| 157 | 182 | } |
| 158 | 183 | |
| r7553 | r7554 | |
| 828 | 853 | opcycles = 2; |
| 829 | 854 | break; |
| 830 | 855 | case 0x0900: // SBIC A,b |
| 831 | //output += sprintf( output, "SBIC 0x%02x, %d", ACONST5(op), RR3(op) ); | |
| 832 | unimplemented_opcode(cpustate, op); | |
| 856 | if(!(READ_IO_8(cpustate, ACONST5(op)) & (1 << RR3(op)))) | |
| 857 | { | |
| 858 | opcycles += avr8_is_long_opcode(op) ? 2 : 1; | |
| 859 | cpustate->pc += avr8_is_long_opcode(op) ? 2 : 1; | |
| 860 | } | |
| 833 | 861 | break; |
| 834 | 862 | case 0x0a00: // SBI A,b |
| 835 | 863 | //output += sprintf( output, "SBI 0x%02x, %d", ACONST5(op), RR3(op) ); |
| r7553 | r7554 | |
| 844 | 872 | case 0x0d00: |
| 845 | 873 | case 0x0e00: |
| 846 | 874 | case 0x0f00: // MUL Rd,Rr |
| 875 | sd = (UINT8)READ_IO_8(cpustate, RD5(op)) * (UINT8)READ_IO_8(cpustate, RR5(op)); | |
| 876 | WRITE_IO_8(cpustate, 1, (sd >> 8) & 0x00ff); | |
| 877 | WRITE_IO_8(cpustate, 0, sd & 0x00ff); | |
| 878 | SREG_W(AVR8_SREG_C, (sd & 0x8000) ? 1 : 0); | |
| 879 | SREG_W(AVR8_SREG_Z, (sd == 0) ? 1 : 0); | |
| 880 | opcycles = 2; | |
| 847 | 881 | //output += sprintf( output, "MUL R%d, R%d", RD5(op), RR5(op) ); |
| 848 | unimplemented_opcode(cpustate, op); | |
| 849 | 882 | break; |
| 850 | 883 | } |
| 851 | 884 | break; |
| r7553 | r7554 | |
|---|---|---|
| 923 | 923 | { |
| 924 | 924 | case CDP1802_MODE_LOAD: |
| 925 | 925 | // RUN mode cannot be initiated from LOAD mode |
| 926 | logerror("CDP1802 '%s' Tried to initiate RUN mode from LOAD mode\n", device->tag | |
| 926 | logerror("CDP1802 '%s' Tried to initiate RUN mode from LOAD mode\n", device->tag | |
| 927 | 927 | cpustate->mode = CDP1802_MODE_LOAD; |
| 928 | 928 | break; |
| 929 | 929 |
| r7553 | r7554 | |
|---|---|---|
| 4465 | 4465 | if (cpustate->pc == 0xfffc0370 || |
| 4466 | 4466 | cpustate->pc == 0xfffc03a4) |
| 4467 | 4467 | { |
| 4468 | fprintf(stderr, "(%s) 0x%08x: snag 0x20000000\n", cpustate->device->tag | |
| 4468 | fprintf(stderr, "(%s) 0x%08x: snag 0x20000000\n", cpustate->device->tag | |
| 4469 | 4469 | cpustate->single_stepping = 0; |
| 4470 | 4470 | } |
| 4471 | 4471 | else if (cpustate->pc == 0xfffc0384 || |
| 4472 | 4472 | cpustate->pc == 0xfffc03b8) |
| 4473 | 4473 | { |
| 4474 | fprintf(stderr, "(%s) 0x%08x: passed 0x20000000\n", cpustate->device->tag | |
| 4474 | fprintf(stderr, "(%s) 0x%08x: passed 0x20000000\n", cpustate->device->tag | |
| 4475 | 4475 | cpustate->single_stepping = 0; |
| 4476 | 4476 | } |
| 4477 | 4477 | #endif |
| r7553 | r7554 | |
| 4551 | 4551 | |
| 4552 | 4552 | /* Note that we print the incoming (possibly virtual) address as the |
| 4553 | 4553 | PC rather than the translated address. */ |
| 4554 | fprintf (stderr, " (%s) 0x%08x: ", cpustate->device->tag | |
| 4554 | fprintf (stderr, " (%s) 0x%08x: ", cpustate->device->tag | |
| 4555 | 4555 | insn = memory_read_dword_64le(cpustate->program, phys_addr); |
| 4556 | 4556 | #ifdef HOST_MSB |
| 4557 | 4557 | BYTE_REV32 (insn); |
| r7553 | r7554 | |
|---|---|---|
| 2026 | 2026 | case ADDR_SCON: |
| 2027 | 2027 | break; |
| 2028 | 2028 | default: |
| 2029 | LOG(("mcs51 '%s': attemping to write to an invalid/non-implemented SFR address: %x at 0x%04x, data=%x\n", mcs51_state->device->tag | |
| 2029 | LOG(("mcs51 '%s': attemping to write to an invalid/non-implemented SFR address: %x at 0x%04x, data=%x\n", mcs51_state->device->tag | |
| 2030 | 2030 | /* no write in this case according to manual */ |
| 2031 | 2031 | return; |
| 2032 | 2032 | } |
| r7553 | r7554 | |
| 2066 | 2066 | return memory_read_byte_8le(mcs51_state->data, (size_t) offset | 0x100); |
| 2067 | 2067 | /* Illegal or non-implemented sfr */ |
| 2068 | 2068 | default: |
| 2069 | LOG(("mcs51 '%s': attemping to read an invalid/non-implemented SFR address: %x at 0x%04x\n", mcs51_state->device->tag | |
| 2069 | LOG(("mcs51 '%s': attemping to read an invalid/non-implemented SFR address: %x at 0x%04x\n", mcs51_state->device->tag | |
| 2070 | 2070 | /* according to the manual, the read may return random bits */ |
| 2071 | 2071 | return 0xff; |
| 2072 | 2072 | } |
| r7553 | r7554 | |
| 2318 | 2318 | ****************************************************************************/ |
| 2319 | 2319 | |
| 2320 | 2320 | |
| 2321 | #define DS5_LOGW(a, d) LOG(("ds5002fp '%s': write to " # a " register at 0x%04x, data=%x\n", mcs51_state->device->tag.cstr(), PC, d)) | |
| 2322 | #define DS5_LOGR(a, d) LOG(("ds5002fp '%s': read from " # a " register at 0x%04x\n", mcs51_state->device->tag.cstr(), PC)) | |
| 2321 | #define DS5_LOGW(a, d) LOG(("ds5002fp '%s': write to " # a " register at 0x%04x, data=%x\n", mcs51_state->device->tag(), PC, d)) | |
| 2322 | #define DS5_LOGR(a, d) LOG(("ds5002fp '%s': read from " # a " register at 0x%04x\n", mcs51_state->device->tag(), PC)) | |
| 2323 | 2323 | |
| 2324 | 2324 | INLINE UINT8 ds5002fp_protected(mcs51_state_t *mcs51_state, size_t offset, UINT8 data, UINT8 ta_mask, UINT8 mask) |
| 2325 | 2325 | { |
| r7553 | r7554 | |
| 2345 | 2345 | if ((data == 0xaa) && (mcs51_state->ds5002fp.ta_window == 0)) |
| 2346 | 2346 | { |
| 2347 | 2347 | mcs51_state->ds5002fp.ta_window = 6; /* 4*12 + 2*12 */ |
| 2348 | LOG(("ds5002fp '%s': TA window initiated at 0x%04x\n", mcs51_state->device->tag | |
| 2348 | LOG(("ds5002fp '%s': TA window initiated at 0x%04x\n", mcs51_state->device->tag | |
| 2349 | 2349 | } |
| 2350 | 2350 | break; |
| 2351 | 2351 | case ADDR_MCON: data = ds5002fp_protected(mcs51_state, ADDR_MCON, data, 0x0f, 0xf7); DS5_LOGW(MCON, data); break; |
| r7553 | r7554 | |
|---|---|---|
| 976 | 976 | //illegal opcodes |
| 977 | 977 | OPHANDLER( illegal ) |
| 978 | 978 | { |
| 979 | LOG(("i8051 '%s': illegal opcode at 0x%03x: %02x\n", mcs51_state->device->tag | |
| 979 | LOG(("i8051 '%s': illegal opcode at 0x%03x: %02x\n", mcs51_state->device->tag | |
| 980 | 980 | } |
| r7553 | r7554 | |
|---|---|---|
| 272 | 272 | P = (P & ~F_D) | F_I; /* knock out D and set I flag */ |
| 273 | 273 | PCL = RDMEM(EAD); |
| 274 | 274 | PCH = RDMEM(EAD+1); |
| 275 | LOG(("M4510 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 275 | LOG(("M4510 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 276 | 276 | /* call back the cpuintrf to let it clear the line */ |
| 277 | 277 | if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, 0); |
| 278 | 278 | } |
| r7553 | r7554 | |
| 302 | 302 | /* check if the I flag was just reset (interrupts enabled) */ |
| 303 | 303 | if( cpustate->after_cli ) |
| 304 | 304 | { |
| 305 | LOG(("M4510 '%s' after_cli was >0", cpustate->device->tag | |
| 305 | LOG(("M4510 '%s' after_cli was >0", cpustate->device->tag | |
| 306 | 306 | cpustate->after_cli = 0; |
| 307 | 307 | if (cpustate->irq_state != CLEAR_LINE) |
| 308 | 308 | { |
| r7553 | r7554 | |
| 331 | 331 | cpustate->nmi_state = state; |
| 332 | 332 | if( state != CLEAR_LINE ) |
| 333 | 333 | { |
| 334 | LOG(("M4510 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 334 | LOG(("M4510 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 335 | 335 | EAD = M4510_NMI_VEC; |
| 336 | 336 | cpustate->icount -= 7; |
| 337 | 337 | PUSH(PCH); |
| r7553 | r7554 | |
| 340 | 340 | P = (P & ~F_D) | F_I; /* knock out D and set I flag */ |
| 341 | 341 | PCL = RDMEM(EAD); |
| 342 | 342 | PCH = RDMEM(EAD+1); |
| 343 | LOG(("M4510 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 343 | LOG(("M4510 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 344 | 344 | } |
| 345 | 345 | } |
| 346 | 346 | else |
| r7553 | r7554 | |
| 348 | 348 | cpustate->irq_state = state; |
| 349 | 349 | if( state != CLEAR_LINE ) |
| 350 | 350 | { |
| 351 | LOG(("M4510 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 351 | LOG(("M4510 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 352 | 352 | cpustate->pending_irq = 1; |
| 353 | 353 | } |
| 354 | 354 | } |
| r7553 | r7554 | |
|---|---|---|
| 623 | 623 | if ( P & F_I ) { \ |
| 624 | 624 | PULL(P); \ |
| 625 | 625 | if ((cpustate->irq_state != CLEAR_LINE) && !(P & F_I)) { \ |
| 626 | LOG(("M6502 '%s' PLP sets after_cli\n",cpustate->device->tag | |
| 626 | LOG(("M6502 '%s' PLP sets after_cli\n",cpustate->device->tag | |
| 627 | 627 | cpustate->after_cli = 1; \ |
| 628 | 628 | } \ |
| 629 | 629 | } else { \ |
| r7553 | r7554 | |
| 665 | 665 | P |= F_T | F_B; \ |
| 666 | 666 | if( (cpustate->irq_state != CLEAR_LINE) && !(P & F_I) ) \ |
| 667 | 667 | { \ |
| 668 | LOG(("M6502 '%s' RTI sets after_cli\n",cpustate->device->tag | |
| 668 | LOG(("M6502 '%s' RTI sets after_cli\n",cpustate->device->tag | |
| 669 | 669 | cpustate->after_cli = 1; \ |
| 670 | 670 | } |
| 671 | 671 |
| r7553 | r7554 | |
|---|---|---|
| 216 | 216 | P |= F_I; /* set I flag */ |
| 217 | 217 | PCL = RDMEM(EAD); |
| 218 | 218 | PCH = RDMEM(EAD+1); |
| 219 | LOG(("M6502 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 219 | LOG(("M6502 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 220 | 220 | /* call back the cpuintrf to let it clear the line */ |
| 221 | 221 | if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, 0); |
| 222 | 222 | } |
| r7553 | r7554 | |
| 246 | 246 | /* check if the I flag was just reset (interrupts enabled) */ |
| 247 | 247 | if( cpustate->after_cli ) |
| 248 | 248 | { |
| 249 | LOG(("M6502 '%s' after_cli was >0", cpustate->device->tag | |
| 249 | LOG(("M6502 '%s' after_cli was >0", cpustate->device->tag | |
| 250 | 250 | cpustate->after_cli = 0; |
| 251 | 251 | if (cpustate->irq_state != CLEAR_LINE) |
| 252 | 252 | { |
| r7553 | r7554 | |
| 284 | 284 | cpustate->nmi_state = state; |
| 285 | 285 | if( state != CLEAR_LINE ) |
| 286 | 286 | { |
| 287 | LOG(( "M6502 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 287 | LOG(( "M6502 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 288 | 288 | EAD = M6502_NMI_VEC; |
| 289 | 289 | cpustate->icount -= 2; |
| 290 | 290 | PUSH(PCH); |
| r7553 | r7554 | |
| 293 | 293 | P |= F_I; /* set I flag */ |
| 294 | 294 | PCL = RDMEM(EAD); |
| 295 | 295 | PCH = RDMEM(EAD+1); |
| 296 | LOG(("M6502 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 296 | LOG(("M6502 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 297 | 297 | } |
| 298 | 298 | } |
| 299 | 299 | else |
| r7553 | r7554 | |
| 302 | 302 | { |
| 303 | 303 | if( cpustate->so_state && !state ) |
| 304 | 304 | { |
| 305 | LOG(( "M6502 '%s' set overflow\n", cpustate->device->tag | |
| 305 | LOG(( "M6502 '%s' set overflow\n", cpustate->device->tag | |
| 306 | 306 | P|=F_V; |
| 307 | 307 | } |
| 308 | 308 | cpustate->so_state=state; |
| r7553 | r7554 | |
| 311 | 311 | cpustate->irq_state = state; |
| 312 | 312 | if( state != CLEAR_LINE ) |
| 313 | 313 | { |
| 314 | LOG(( "M6502 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 314 | LOG(( "M6502 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 315 | 315 | cpustate->pending_irq = 1; |
| 316 | 316 | // cpustate->pending_irq = 2; |
| 317 | 317 | cpustate->int_occured = cpustate->icount; |
| r7553 | r7554 | |
| 437 | 437 | P = (P & ~F_D) | F_I; /* knock out D and set I flag */ |
| 438 | 438 | PCL = RDMEM(EAD); |
| 439 | 439 | PCH = RDMEM(EAD+1); |
| 440 | LOG(("M65c02 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 440 | LOG(("M65c02 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 441 | 441 | /* call back the cpuintrf to let it clear the line */ |
| 442 | 442 | if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, 0); |
| 443 | 443 | } |
| r7553 | r7554 | |
| 468 | 468 | /* check if the I flag was just reset (interrupts enabled) */ |
| 469 | 469 | if( cpustate->after_cli ) |
| 470 | 470 | { |
| 471 | LOG(("M6502 '%s' after_cli was >0", cpustate->device->tag | |
| 471 | LOG(("M6502 '%s' after_cli was >0", cpustate->device->tag | |
| 472 | 472 | cpustate->after_cli = 0; |
| 473 | 473 | if (cpustate->irq_state != CLEAR_LINE) |
| 474 | 474 | { |
| r7553 | r7554 | |
| 497 | 497 | cpustate->nmi_state = state; |
| 498 | 498 | if( state != CLEAR_LINE ) |
| 499 | 499 | { |
| 500 | LOG(( "M6502 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 500 | LOG(( "M6502 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 501 | 501 | EAD = M6502_NMI_VEC; |
| 502 | 502 | cpustate->icount -= 2; |
| 503 | 503 | PUSH(PCH); |
| r7553 | r7554 | |
| 506 | 506 | P = (P & ~F_D) | F_I; /* knock out D and set I flag */ |
| 507 | 507 | PCL = RDMEM(EAD); |
| 508 | 508 | PCH = RDMEM(EAD+1); |
| 509 | LOG(("M6502 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 509 | LOG(("M6502 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 510 | 510 | } |
| 511 | 511 | } |
| 512 | 512 | else |
| r7553 | r7554 | |
| 562 | 562 | P |= F_I; /* set I flag */ |
| 563 | 563 | PCL = RDMEM(EAD+1); |
| 564 | 564 | PCH = RDMEM(EAD); |
| 565 | LOG(("M6502 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 565 | LOG(("M6502 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 566 | 566 | /* call back the cpuintrf to let it clear the line */ |
| 567 | 567 | if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, 0); |
| 568 | 568 | } |
| r7553 | r7554 | |
| 577 | 577 | cpustate->nmi_state = state; |
| 578 | 578 | if( state != CLEAR_LINE ) |
| 579 | 579 | { |
| 580 | LOG(( "M6502 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 580 | LOG(( "M6502 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 581 | 581 | EAD = DECO16_NMI_VEC; |
| 582 | 582 | cpustate->icount -= 7; |
| 583 | 583 | PUSH(PCH); |
| r7553 | r7554 | |
| 586 | 586 | P |= F_I; /* set I flag */ |
| 587 | 587 | PCL = RDMEM(EAD+1); |
| 588 | 588 | PCH = RDMEM(EAD); |
| 589 | LOG(("M6502 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 589 | LOG(("M6502 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 590 | 590 | } |
| 591 | 591 | } |
| 592 | 592 | else |
| r7553 | r7554 | |
| 595 | 595 | { |
| 596 | 596 | if( cpustate->so_state && !state ) |
| 597 | 597 | { |
| 598 | LOG(( "M6502 '%s' set overflow\n", cpustate->device->tag | |
| 598 | LOG(( "M6502 '%s' set overflow\n", cpustate->device->tag | |
| 599 | 599 | P|=F_V; |
| 600 | 600 | } |
| 601 | 601 | cpustate->so_state=state; |
| r7553 | r7554 | |
| 604 | 604 | cpustate->irq_state = state; |
| 605 | 605 | if( state != CLEAR_LINE ) |
| 606 | 606 | { |
| 607 | LOG(( "M6502 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 607 | LOG(( "M6502 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 608 | 608 | cpustate->pending_irq = 1; |
| 609 | 609 | } |
| 610 | 610 | } |
| r7553 | r7554 | |
| 634 | 634 | /* check if the I flag was just reset (interrupts enabled) */ |
| 635 | 635 | if( cpustate->after_cli ) |
| 636 | 636 | { |
| 637 | LOG(("M6502 %s after_cli was >0", cpustate->device->tag | |
| 637 | LOG(("M6502 %s after_cli was >0", cpustate->device->tag | |
| 638 | 638 | cpustate->after_cli = 0; |
| 639 | 639 | if (cpustate->irq_state != CLEAR_LINE) |
| 640 | 640 | { |
| r7553 | r7554 | |
|---|---|---|
| 200 | 200 | P |= F_I; /* knock out D and set I flag */ |
| 201 | 201 | PCL = RDMEM(EAD); |
| 202 | 202 | PCH = RDMEM(EAD+1); |
| 203 | LOG(("M6509 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 203 | LOG(("M6509 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 204 | 204 | /* call back the cpuintrf to let it clear the line */ |
| 205 | 205 | if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, 0); |
| 206 | 206 | } |
| r7553 | r7554 | |
| 230 | 230 | /* check if the I flag was just reset (interrupts enabled) */ |
| 231 | 231 | if( cpustate->after_cli ) |
| 232 | 232 | { |
| 233 | LOG(("M6509 '%s' after_cli was >0", cpustate->device->tag | |
| 233 | LOG(("M6509 '%s' after_cli was >0", cpustate->device->tag | |
| 234 | 234 | cpustate->after_cli = 0; |
| 235 | 235 | if (cpustate->irq_state != CLEAR_LINE) |
| 236 | 236 | { |
| r7553 | r7554 | |
| 259 | 259 | cpustate->nmi_state = state; |
| 260 | 260 | if( state != CLEAR_LINE ) |
| 261 | 261 | { |
| 262 | LOG(( "M6509 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 262 | LOG(( "M6509 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 263 | 263 | EAD = M6509_NMI_VEC; |
| 264 | 264 | EAWH = PBWH; |
| 265 | 265 | cpustate->icount -= 2; |
| r7553 | r7554 | |
| 269 | 269 | P |= F_I; /* knock out D and set I flag */ |
| 270 | 270 | PCL = RDMEM(EAD); |
| 271 | 271 | PCH = RDMEM(EAD+1); |
| 272 | LOG(("M6509 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 272 | LOG(("M6509 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 273 | 273 | } |
| 274 | 274 | } |
| 275 | 275 | else |
| r7553 | r7554 | |
| 278 | 278 | { |
| 279 | 279 | if( cpustate->so_state && !state ) |
| 280 | 280 | { |
| 281 | LOG(( "M6509 '%s' set overflow\n", cpustate->device->tag | |
| 281 | LOG(( "M6509 '%s' set overflow\n", cpustate->device->tag | |
| 282 | 282 | P|=F_V; |
| 283 | 283 | } |
| 284 | 284 | cpustate->so_state=state; |
| r7553 | r7554 | |
| 287 | 287 | cpustate->irq_state = state; |
| 288 | 288 | if( state != CLEAR_LINE ) |
| 289 | 289 | { |
| 290 | LOG(( "M6509 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 290 | LOG(( "M6509 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 291 | 291 | cpustate->pending_irq = 1; |
| 292 | 292 | } |
| 293 | 293 | } |
| r7553 | r7554 | |
|---|---|---|
| 676 | 676 | PULL(temp); \ |
| 677 | 677 | P=(P&F_E)|F_B|(temp&~F_E); \ |
| 678 | 678 | if( IRQ_STATE != CLEAR_LINE && !(P & F_I) ) { \ |
| 679 | LOG(("M65ce02 '%s' PLP sets after_cli\n", cpustate->device->tag | |
| 679 | LOG(("M65ce02 '%s' PLP sets after_cli\n", cpustate->device->tag | |
| 680 | 680 | AFTER_CLI = 1; \ |
| 681 | 681 | } \ |
| 682 | 682 | } else { \ |
| r7553 | r7554 | |
| 756 | 756 | PULL(PCH); \ |
| 757 | 757 | if( IRQ_STATE != CLEAR_LINE && !(P & F_I) ) \ |
| 758 | 758 | { \ |
| 759 | LOG(("M65ce02 '%s' RTI sets after_cli\n", cpustate->device->tag | |
| 759 | LOG(("M65ce02 '%s' RTI sets after_cli\n", cpustate->device->tag | |
| 760 | 760 | AFTER_CLI = 1; \ |
| 761 | 761 | } |
| 762 | 762 | |
| r7553 | r7554 | |
| 787 | 787 | PULL(PCL); \ |
| 788 | 788 | PULL(PCH); \ |
| 789 | 789 | if( IRQ_STATE != CLEAR_LINE && !(P & F_I) ) { \ |
| 790 | LOG(("M65ce02 '%s' RTI sets after_cli\n", cpustate->device->tag | |
| 790 | LOG(("M65ce02 '%s' RTI sets after_cli\n", cpustate->device->tag | |
| 791 | 791 | AFTER_CLI = 1; \ |
| 792 | 792 | } |
| 793 | 793 |
| r7553 | r7554 | |
|---|---|---|
| 159 | 159 | P = (P & ~F_D) | F_I; /* knock out D and set I flag */ |
| 160 | 160 | PCL = RDMEM(EAD); |
| 161 | 161 | PCH = RDMEM(EAD+1); |
| 162 | LOG(("M65ce02 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 162 | LOG(("M65ce02 '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 163 | 163 | /* call back the cpuintrf to let it clear the line */ |
| 164 | 164 | if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, 0); |
| 165 | 165 | } |
| r7553 | r7554 | |
| 189 | 189 | /* check if the I flag was just reset (interrupts enabled) */ |
| 190 | 190 | if( cpustate->after_cli ) |
| 191 | 191 | { |
| 192 | LOG(("M65ce02 '%s' after_cli was >0", cpustate->device->tag | |
| 192 | LOG(("M65ce02 '%s' after_cli was >0", cpustate->device->tag | |
| 193 | 193 | cpustate->after_cli = 0; |
| 194 | 194 | if (cpustate->irq_state != CLEAR_LINE) |
| 195 | 195 | { |
| r7553 | r7554 | |
| 218 | 218 | cpustate->nmi_state = state; |
| 219 | 219 | if( state != CLEAR_LINE ) |
| 220 | 220 | { |
| 221 | LOG(("M65ce02 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 221 | LOG(("M65ce02 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 222 | 222 | EAD = M65CE02_NMI_VEC; |
| 223 | 223 | cpustate->icount -= 7; |
| 224 | 224 | PUSH(PCH); |
| r7553 | r7554 | |
| 227 | 227 | P = (P & ~F_D) | F_I; /* knock out D and set I flag */ |
| 228 | 228 | PCL = RDMEM(EAD); |
| 229 | 229 | PCH = RDMEM(EAD+1); |
| 230 | LOG(("M65ce02 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 230 | LOG(("M65ce02 '%s' takes NMI ($%04x)\n", cpustate->device->tag | |
| 231 | 231 | } |
| 232 | 232 | } |
| 233 | 233 | else |
| r7553 | r7554 | |
| 235 | 235 | cpustate->irq_state = state; |
| 236 | 236 | if( state != CLEAR_LINE ) |
| 237 | 237 | { |
| 238 | LOG(("M65ce02 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 238 | LOG(("M65ce02 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 239 | 239 | cpustate->pending_irq = 1; |
| 240 | 240 | } |
| 241 | 241 | } |
| r7553 | r7554 | |
|---|---|---|
| 233 | 233 | cpustate->irq_req = type; |
| 234 | 234 | break; |
| 235 | 235 | case Z8000_SYSCALL >> 8: |
| 236 | LOG(("Z8K '%s' SYSCALL $%02x\n", cpustate->device->tag | |
| 236 | LOG(("Z8K '%s' SYSCALL $%02x\n", cpustate->device->tag | |
| 237 | 237 | cpustate->irq_req = type; |
| 238 | 238 | break; |
| 239 | 239 | default: |
| r7553 | r7554 | |
| 271 | 271 | cpustate->irq_srv = cpustate->irq_req; |
| 272 | 272 | cpustate->irq_req &= ~Z8000_TRAP; |
| 273 | 273 | cpustate->pc = TRAP; |
| 274 | LOG(("Z8K '%s' trap $%04x\n", cpustate->device->tag | |
| 274 | LOG(("Z8K '%s' trap $%04x\n", cpustate->device->tag | |
| 275 | 275 | } |
| 276 | 276 | else |
| 277 | 277 | if (cpustate->irq_req & Z8000_SYSCALL) |
| r7553 | r7554 | |
| 283 | 283 | cpustate->irq_srv = cpustate->irq_req; |
| 284 | 284 | cpustate->irq_req &= ~Z8000_SYSCALL; |
| 285 | 285 | cpustate->pc = SYSCALL; |
| 286 | LOG(("Z8K '%s' syscall $%04x\n", cpustate->device->tag | |
| 286 | LOG(("Z8K '%s' syscall $%04x\n", cpustate->device->tag | |
| 287 | 287 | } |
| 288 | 288 | else |
| 289 | 289 | if (cpustate->irq_req & Z8000_SEGTRAP) |
| r7553 | r7554 | |
| 295 | 295 | cpustate->irq_srv = cpustate->irq_req; |
| 296 | 296 | cpustate->irq_req &= ~Z8000_SEGTRAP; |
| 297 | 297 | cpustate->pc = SEGTRAP; |
| 298 | LOG(("Z8K '%s' segtrap $%04x\n", cpustate->device->tag | |
| 298 | LOG(("Z8K '%s' segtrap $%04x\n", cpustate->device->tag | |
| 299 | 299 | } |
| 300 | 300 | else |
| 301 | 301 | if (cpustate->irq_req & Z8000_NMI) |
| r7553 | r7554 | |
| 310 | 310 | cpustate->irq_req &= ~Z8000_NMI; |
| 311 | 311 | CHANGE_FCW(cpustate, fcw); |
| 312 | 312 | cpustate->pc = NMI; |
| 313 | LOG(("Z8K '%s' NMI $%04x\n", cpustate->device->tag | |
| 313 | LOG(("Z8K '%s' NMI $%04x\n", cpustate->device->tag | |
| 314 | 314 | } |
| 315 | 315 | else |
| 316 | 316 | if ((cpustate->irq_req & Z8000_NVI) && (cpustate->fcw & F_NVIE)) |
| r7553 | r7554 | |
| 324 | 324 | cpustate->pc = RDMEM_W(cpustate, NVI + 2); |
| 325 | 325 | cpustate->irq_req &= ~Z8000_NVI; |
| 326 | 326 | CHANGE_FCW(cpustate, fcw); |
| 327 | LOG(("Z8K '%s' NVI $%04x\n", cpustate->device->tag | |
| 327 | LOG(("Z8K '%s' NVI $%04x\n", cpustate->device->tag | |
| 328 | 328 | } |
| 329 | 329 | else |
| 330 | 330 | if ((cpustate->irq_req & Z8000_VI) && (cpustate->fcw & F_VIE)) |
| r7553 | r7554 | |
| 338 | 338 | cpustate->pc = RDMEM_W(cpustate, VEC00 + 2 * (cpustate->irq_req & 0xff)); |
| 339 | 339 | cpustate->irq_req &= ~Z8000_VI; |
| 340 | 340 | CHANGE_FCW(cpustate, fcw); |
| 341 | LOG(("Z8K '%s' VI [$%04x/$%04x] fcw $%04x, pc $%04x\n", cpustate->device->tag | |
| 341 | LOG(("Z8K '%s' VI [$%04x/$%04x] fcw $%04x, pc $%04x\n", cpustate->device->tag | |
| 342 | 342 | } |
| 343 | 343 | } |
| 344 | 344 |
| r7553 | r7554 | |
|---|---|---|
| 1530 | 1530 | static void Z0E_imm8(z8000_state *cpustate) |
| 1531 | 1531 | { |
| 1532 | 1532 | GET_IMM8(0); |
| 1533 | LOG(("Z8K '%s' %04x: ext0e $%02x\n", cpustate->device->tag | |
| 1533 | LOG(("Z8K '%s' %04x: ext0e $%02x\n", cpustate->device->tag | |
| 1534 | 1534 | if (cpustate->fcw & F_EPU) { |
| 1535 | 1535 | /* Z8001 EPU code goes here */ |
| 1536 | 1536 | (void)imm8; |
| r7553 | r7554 | |
| 1544 | 1544 | static void Z0F_imm8(z8000_state *cpustate) |
| 1545 | 1545 | { |
| 1546 | 1546 | GET_IMM8(0); |
| 1547 | LOG(("Z8K '%s' %04x: ext0f $%02x\n", cpustate->device->tag | |
| 1547 | LOG(("Z8K '%s' %04x: ext0f $%02x\n", cpustate->device->tag | |
| 1548 | 1548 | if (cpustate->fcw & F_EPU) { |
| 1549 | 1549 | /* Z8001 EPU code goes here */ |
| 1550 | 1550 | (void)imm8; |
| r7553 | r7554 | |
| 2272 | 2272 | static void Z36_imm8(z8000_state *cpustate) |
| 2273 | 2273 | { |
| 2274 | 2274 | GET_IMM8(0); |
| 2275 | LOG(("Z8K '%s' %04x: rsvd36 $%02x\n", cpustate->device->tag | |
| 2275 | LOG(("Z8K '%s' %04x: rsvd36 $%02x\n", cpustate->device->tag | |
| 2276 | 2276 | if (cpustate->fcw & F_EPU) { |
| 2277 | 2277 | /* Z8001 EPU code goes here */ |
| 2278 | 2278 | (void)imm8; |
| r7553 | r7554 | |
| 2310 | 2310 | static void Z38_imm8(z8000_state *cpustate) |
| 2311 | 2311 | { |
| 2312 | 2312 | GET_IMM8(0); |
| 2313 | LOG(("Z8K '%s' %04x: rsvd38 $%02x\n", cpustate->device->tag | |
| 2313 | LOG(("Z8K '%s' %04x: rsvd38 $%02x\n", cpustate->device->tag | |
| 2314 | 2314 | if (cpustate->fcw & F_EPU) { |
| 2315 | 2315 | /* Z8001 EPU code goes here */ |
| 2316 | 2316 | (void)imm8; |
| r7553 | r7554 | |
| 4347 | 4347 | static void Z78_imm8(z8000_state *cpustate) |
| 4348 | 4348 | { |
| 4349 | 4349 | GET_IMM8(0); |
| 4350 | LOG(("Z8K '%s' %04x: rsvd78 $%02x\n", cpustate->device->tag | |
| 4350 | LOG(("Z8K '%s' %04x: rsvd78 $%02x\n", cpustate->device->tag | |
| 4351 | 4351 | if (cpustate->fcw & F_EPU) { |
| 4352 | 4352 | /* Z8001 EPU code goes here */ |
| 4353 | 4353 | (void)imm8; |
| r7553 | r7554 | |
| 4404 | 4404 | cpustate->pc = POPW(cpustate, SP); /* get cpustate->pc */ |
| 4405 | 4405 | cpustate->irq_srv &= ~tag; /* remove IRQ serviced flag */ |
| 4406 | 4406 | CHANGE_FCW(cpustate, fcw); /* check for user/system mode change */ |
| 4407 | LOG(("Z8K '%s' IRET tag $%04x, fcw $%04x, pc $%04x\n", cpustate->device->tag | |
| 4407 | LOG(("Z8K '%s' IRET tag $%04x, fcw $%04x, pc $%04x\n", cpustate->device->tag | |
| 4408 | 4408 | } |
| 4409 | 4409 | |
| 4410 | 4410 | /****************************************** |
| r7553 | r7554 | |
| 4489 | 4489 | cpustate->RW(dst) = cpustate->nsp; |
| 4490 | 4490 | break; |
| 4491 | 4491 | default: |
| 4492 | LOG(("Z8K '%s' LDCTL R%d,%d\n", cpustate->device->tag | |
| 4492 | LOG(("Z8K '%s' LDCTL R%d,%d\n", cpustate->device->tag | |
| 4493 | 4493 | } |
| 4494 | 4494 | } |
| 4495 | 4495 | |
| r7553 | r7554 | |
| 4519 | 4519 | cpustate->nsp = cpustate->RW(src); |
| 4520 | 4520 | break; |
| 4521 | 4521 | default: |
| 4522 | LOG(("Z8K '%s' LDCTL %d,R%d\n", cpustate->device->tag | |
| 4522 | LOG(("Z8K '%s' LDCTL %d,R%d\n", cpustate->device->tag | |
| 4523 | 4523 | } |
| 4524 | 4524 | } |
| 4525 | 4525 | |
| r7553 | r7554 | |
| 4530 | 4530 | static void Z7E_imm8(z8000_state *cpustate) |
| 4531 | 4531 | { |
| 4532 | 4532 | GET_IMM8(0); |
| 4533 | LOG(("Z8K '%s' %04x: rsvd7e $%02x\n", cpustate->device->tag | |
| 4533 | LOG(("Z8K '%s' %04x: rsvd7e $%02x\n", cpustate->device->tag | |
| 4534 | 4534 | if (cpustate->fcw & F_EPU) { |
| 4535 | 4535 | /* Z8001 EPU code goes here */ |
| 4536 | 4536 | (void)imm8; |
| r7553 | r7554 | |
| 4826 | 4826 | static void Z8E_imm8(z8000_state *cpustate) |
| 4827 | 4827 | { |
| 4828 | 4828 | GET_IMM8(0); |
| 4829 | LOG(("Z8K '%s' %04x: ext8e $%02x\n", cpustate->device->tag | |
| 4829 | LOG(("Z8K '%s' %04x: ext8e $%02x\n", cpustate->device->tag | |
| 4830 | 4830 | if (cpustate->fcw & F_EPU) { |
| 4831 | 4831 | /* Z8001 EPU code goes here */ |
| 4832 | 4832 | (void)imm8; |
| r7553 | r7554 | |
| 4840 | 4840 | static void Z8F_imm8(z8000_state *cpustate) |
| 4841 | 4841 | { |
| 4842 | 4842 | GET_IMM8(0); |
| 4843 | LOG(("Z8K '%s' %04x: ext8f $%02x\n", cpustate->device->tag | |
| 4843 | LOG(("Z8K '%s' %04x: ext8f $%02x\n", cpustate->device->tag | |
| 4844 | 4844 | if (cpustate->fcw & F_EPU) { |
| 4845 | 4845 | /* Z8001 EPU code goes here */ |
| 4846 | 4846 | (void)imm8; |
| r7553 | r7554 | |
| 4998 | 4998 | static void Z9D_imm8(z8000_state *cpustate) |
| 4999 | 4999 | { |
| 5000 | 5000 | GET_IMM8(0); |
| 5001 | LOG(("Z8K '%s' %04x: rsvd9d $%02x\n", cpustate->device->tag | |
| 5001 | LOG(("Z8K '%s' %04x: rsvd9d $%02x\n", cpustate->device->tag | |
| 5002 | 5002 | if (cpustate->fcw & F_EPU) { |
| 5003 | 5003 | /* Z8001 EPU code goes here */ |
| 5004 | 5004 | (void)imm8; |
| r7553 | r7554 | |
| 5039 | 5039 | static void Z9F_imm8(z8000_state *cpustate) |
| 5040 | 5040 | { |
| 5041 | 5041 | GET_IMM8(0); |
| 5042 | LOG(("Z8K '%s' %04x: rsvd9f $%02x\n", cpustate->device->tag | |
| 5042 | LOG(("Z8K '%s' %04x: rsvd9f $%02x\n", cpustate->device->tag | |
| 5043 | 5043 | if (cpustate->fcw & F_EPU) { |
| 5044 | 5044 | /* Z8001 EPU code goes here */ |
| 5045 | 5045 | (void)imm8; |
| r7553 | r7554 | |
| 5740 | 5740 | static void ZB9_imm8(z8000_state *cpustate) |
| 5741 | 5741 | { |
| 5742 | 5742 | GET_IMM8(0); |
| 5743 | LOG(("Z8K '%s' %04x: rsvdb9 $%02x\n", cpustate->device->tag | |
| 5743 | LOG(("Z8K '%s' %04x: rsvdb9 $%02x\n", cpustate->device->tag | |
| 5744 | 5744 | if (cpustate->fcw & F_EPU) { |
| 5745 | 5745 | /* Z8001 EPU code goes here */ |
| 5746 | 5746 | (void)imm8; |
| r7553 | r7554 | |
| 6398 | 6398 | static void ZBF_imm8(z8000_state *cpustate) |
| 6399 | 6399 | { |
| 6400 | 6400 | GET_IMM8(0); |
| 6401 | LOG(("Z8K '%s' %04x: rsvdbf $%02x\n", cpustate->device->tag | |
| 6401 | LOG(("Z8K '%s' %04x: rsvdbf $%02x\n", cpustate->device->tag | |
| 6402 | 6402 | if (cpustate->fcw & F_EPU) { |
| 6403 | 6403 | /* Z8001 EPU code goes here */ |
| 6404 | 6404 | (void)imm8; |
| r7553 | r7554 | |
|---|---|---|
| 101 | 101 | sh2->frc_base = cpu_get_total_cycles(sh2->device); |
| 102 | 102 | timer_adjust_oneshot(sh2->timer, cpu_clocks_to_attotime(sh2->device, max_delta), 0); |
| 103 | 103 | } else { |
| 104 | logerror("SH2.%s: Timer event in %d cycles of external clock", sh2->device->tag | |
| 104 | logerror("SH2.%s: Timer event in %d cycles of external clock", sh2->device->tag | |
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | } |
| r7553 | r7554 | |
| 138 | 138 | int dma = param & 1; |
| 139 | 139 | SH2 *sh2 = (SH2 *)ptr; |
| 140 | 140 | |
| 141 | LOG(("SH2.%s: DMA %d complete\n", sh2->device->tag | |
| 141 | LOG(("SH2.%s: DMA %d complete\n", sh2->device->tag | |
| 142 | 142 | sh2->m[0x63+4*dma] |= 2; |
| 143 | 143 | sh2->dma_timer_active[dma] = 0; |
| 144 | 144 | sh2_recalc_irq(sh2); |
| r7553 | r7554 | |
| 306 | 306 | case 0x04: // TIER, FTCSR, FRC |
| 307 | 307 | if((mem_mask & 0x00ffffff) != 0) |
| 308 | 308 | sh2_timer_resync(sh2); |
| 309 | // printf("SH2.%s: TIER write %04x @ %04x\n", sh2->device->tag | |
| 309 | // printf("SH2.%s: TIER write %04x @ %04x\n", sh2->device->tag | |
| 310 | 310 | sh2->m[4] = (sh2->m[4] & ~(ICF|OCFA|OCFB|OVF)) | (old & sh2->m[4] & (ICF|OCFA|OCFB|OVF)); |
| 311 | 311 | COMBINE_DATA(&sh2->frc); |
| 312 | 312 | if((mem_mask & 0x00ffffff) != 0) |
| r7553 | r7554 | |
| 314 | 314 | sh2_recalc_irq(sh2); |
| 315 | 315 | break; |
| 316 | 316 | case 0x05: // OCRx, TCR, TOCR |
| 317 | // printf("SH2.%s: TCR write %08x @ %08x\n", sh2->device->tag | |
| 317 | // printf("SH2.%s: TCR write %08x @ %08x\n", sh2->device->tag | |
| 318 | 318 | sh2_timer_resync(sh2); |
| 319 | 319 | if(sh2->m[5] & 0x10) |
| 320 | 320 | sh2->ocrb = (sh2->ocrb & (~mem_mask >> 16)) | ((data & mem_mask) >> 16); |
| r7553 | r7554 | |
| 358 | 358 | { |
| 359 | 359 | INT32 a = sh2->m[0x41]; |
| 360 | 360 | INT32 b = sh2->m[0x40]; |
| 361 | LOG(("SH2 '%s' div+mod %d/%d\n", sh2->device->tag | |
| 361 | LOG(("SH2 '%s' div+mod %d/%d\n", sh2->device->tag | |
| 362 | 362 | if (b) |
| 363 | 363 | { |
| 364 | 364 | sh2->m[0x45] = a / b; |
| r7553 | r7554 | |
| 386 | 386 | { |
| 387 | 387 | INT64 a = sh2->m[0x45] | ((UINT64)(sh2->m[0x44]) << 32); |
| 388 | 388 | INT64 b = (INT32)sh2->m[0x40]; |
| 389 | LOG(("SH2 '%s' div+mod %" I64FMT "d/%" I64FMT "d\n", sh2->device->tag | |
| 389 | LOG(("SH2 '%s' div+mod %" I64FMT "d/%" I64FMT "d\n", sh2->device->tag | |
| 390 | 390 | if (b) |
| 391 | 391 | { |
| 392 | 392 | INT64 q = a / b; |
| r7553 | r7554 | |
| 536 | 536 | sh2_timer_resync(sh2); |
| 537 | 537 | sh2->icr = sh2->frc; |
| 538 | 538 | sh2->m[4] |= ICF; |
| 539 | logerror("SH2.%s: ICF activated (%x)\n", sh2->device->tag | |
| 539 | logerror("SH2.%s: ICF activated (%x)\n", sh2->device->tag | |
| 540 | 540 | sh2_recalc_irq(sh2); |
| 541 | 541 | } |
| 542 | 542 | |
| r7553 | r7554 | |
| 550 | 550 | |
| 551 | 551 | if( state == CLEAR_LINE ) |
| 552 | 552 | { |
| 553 | LOG(("SH-2 '%s' cleared nmi\n", sh2->device->tag | |
| 553 | LOG(("SH-2 '%s' cleared nmi\n", sh2->device->tag | |
| 554 | 554 | } |
| 555 | 555 | else |
| 556 | 556 | { |
| 557 | LOG(("SH-2 '%s' assert nmi\n", sh2->device->tag | |
| 557 | LOG(("SH-2 '%s' assert nmi\n", sh2->device->tag | |
| 558 | 558 | |
| 559 | 559 | sh2_exception(sh2, "Set IRQ line", 16); |
| 560 | 560 | |
| r7553 | r7554 | |
| 571 | 571 | |
| 572 | 572 | if( state == CLEAR_LINE ) |
| 573 | 573 | { |
| 574 | LOG(("SH-2 '%s' cleared irq #%d\n", sh2->device->tag | |
| 574 | LOG(("SH-2 '%s' cleared irq #%d\n", sh2->device->tag | |
| 575 | 575 | sh2->pending_irq &= ~(1 << irqline); |
| 576 | 576 | } |
| 577 | 577 | else |
| 578 | 578 | { |
| 579 | LOG(("SH-2 '%s' assert irq #%d\n", sh2->device->tag | |
| 579 | LOG(("SH-2 '%s' assert irq #%d\n", sh2->device->tag | |
| 580 | 580 | sh2->pending_irq |= 1 << irqline; |
| 581 | 581 | #ifdef USE_SH2DRC |
| 582 | 582 | sh2->test_irq = 1; |
| r7553 | r7554 | |
| 647 | 647 | if (sh2->internal_irq_level == irqline) |
| 648 | 648 | { |
| 649 | 649 | vector = sh2->internal_irq_vector; |
| 650 | LOG(("SH-2 '%s' exception #%d (internal vector: $%x) after [%s]\n", sh2->device->tag | |
| 650 | LOG(("SH-2 '%s' exception #%d (internal vector: $%x) after [%s]\n", sh2->device->tag | |
| 651 | 651 | } |
| 652 | 652 | else |
| 653 | 653 | { |
| 654 | 654 | if(sh2->m[0x38] & 0x00010000) |
| 655 | 655 | { |
| 656 | 656 | vector = sh2->irq_callback(sh2->device, irqline); |
| 657 | LOG(("SH-2 '%s' exception #%d (external vector: $%x) after [%s]\n", sh2->device->tag | |
| 657 | LOG(("SH-2 '%s' exception #%d (external vector: $%x) after [%s]\n", sh2->device->tag | |
| 658 | 658 | } |
| 659 | 659 | else |
| 660 | 660 | { |
| 661 | 661 | sh2->irq_callback(sh2->device, irqline); |
| 662 | 662 | vector = 64 + irqline/2; |
| 663 | LOG(("SH-2 '%s' exception #%d (autovector: $%x) after [%s]\n", sh2->device->tag | |
| 663 | LOG(("SH-2 '%s' exception #%d (autovector: $%x) after [%s]\n", sh2->device->tag | |
| 664 | 664 | } |
| 665 | 665 | } |
| 666 | 666 | } |
| 667 | 667 | else |
| 668 | 668 | { |
| 669 | 669 | vector = 11; |
| 670 | LOG(("SH-2 '%s' nmi exception (autovector: $%x) after [%s]\n", sh2->device->tag | |
| 670 | LOG(("SH-2 '%s' nmi exception (autovector: $%x) after [%s]\n", sh2->device->tag | |
| 671 | 671 | } |
| 672 | 672 | |
| 673 | 673 | #ifdef USE_SH2DRC |
| r7553 | r7554 | |
|---|---|---|
| 179 | 179 | sh4->m[INTEVT] = 0x1c0; |
| 180 | 180 | vector = 0x600; |
| 181 | 181 | sh4->irq_callback(sh4->device, INPUT_LINE_NMI); |
| 182 | LOG(("SH-4 '%s' nmi exception after [%s]\n", sh4->device->tag | |
| 182 | LOG(("SH-4 '%s' nmi exception after [%s]\n", sh4->device->tag | |
| 183 | 183 | } else { |
| 184 | 184 | // if ((sh4->m[ICR] & 0x4000) && (sh4->nmi_line_state == ASSERT_LINE)) |
| 185 | 185 | // return; |
| r7553 | r7554 | |
| 193 | 193 | sh4->irq_callback(sh4->device, SH4_INTC_IRL0-exception+SH4_IRL0); |
| 194 | 194 | else |
| 195 | 195 | sh4->irq_callback(sh4->device, SH4_IRL3+1); |
| 196 | LOG(("SH-4 '%s' interrupt exception #%d after [%s]\n", sh4->device->tag | |
| 196 | LOG(("SH-4 '%s' interrupt exception #%d after [%s]\n", sh4->device->tag | |
| 197 | 197 | } |
| 198 | 198 | sh4_exception_checkunrequest(sh4, exception); |
| 199 | 199 | |
| r7553 | r7554 | |
| 407 | 407 | SH4 *sh4 = (SH4 *)ptr; |
| 408 | 408 | int channel = param; |
| 409 | 409 | |
| 410 | LOG(("SH4 '%s': DMA %d complete\n", sh4->device->tag | |
| 410 | LOG(("SH4 '%s': DMA %d complete\n", sh4->device->tag | |
| 411 | 411 | sh4->dma_timer_active[channel] = 0; |
| 412 | 412 | switch (channel) |
| 413 | 413 | { |
| r7553 | r7554 | |
| 1028 | 1028 | sh4_timer_resync(); |
| 1029 | 1029 | sh4->icr = sh4->frc; |
| 1030 | 1030 | sh4->m[4] |= ICF; |
| 1031 | logerror("SH4 '%s': ICF activated (%x)\n", sh4->device->tag | |
| 1031 | logerror("SH4 '%s': ICF activated (%x)\n", sh4->device->tag | |
| 1032 | 1032 | sh4_recalc_irq(); |
| 1033 | 1033 | #endif |
| 1034 | 1034 | } |
| r7553 | r7554 | |
| 1056 | 1056 | { |
| 1057 | 1057 | if ((state == CLEAR_LINE) && (sh4->nmi_line_state == ASSERT_LINE)) // rising |
| 1058 | 1058 | { |
| 1059 | LOG(("SH-4 '%s' assert nmi\n", sh4->device->tag | |
| 1059 | LOG(("SH-4 '%s' assert nmi\n", sh4->device->tag | |
| 1060 | 1060 | sh4_exception_request(sh4, SH4_INTC_NMI); |
| 1061 | 1061 | sh4_dmac_nmi(sh4); |
| 1062 | 1062 | } |
| r7553 | r7554 | |
| 1065 | 1065 | { |
| 1066 | 1066 | if ((state == ASSERT_LINE) && (sh4->nmi_line_state == CLEAR_LINE)) // falling |
| 1067 | 1067 | { |
| 1068 | LOG(("SH-4 '%s' assert nmi\n", sh4->device->tag | |
| 1068 | LOG(("SH-4 '%s' assert nmi\n", sh4->device->tag | |
| 1069 | 1069 | sh4_exception_request(sh4, SH4_INTC_NMI); |
| 1070 | 1070 | sh4_dmac_nmi(sh4); |
| 1071 | 1071 | } |
| r7553 | r7554 | |
| 1088 | 1088 | |
| 1089 | 1089 | if( state == CLEAR_LINE ) |
| 1090 | 1090 | { |
| 1091 | LOG(("SH-4 '%s' cleared external irq IRL%d\n", sh4->device->tag | |
| 1091 | LOG(("SH-4 '%s' cleared external irq IRL%d\n", sh4->device->tag | |
| 1092 | 1092 | sh4_exception_unrequest(sh4, SH4_INTC_IRL0+irqline-SH4_IRL0); |
| 1093 | 1093 | } |
| 1094 | 1094 | else |
| 1095 | 1095 | { |
| 1096 | LOG(("SH-4 '%s' assert external irq IRL%d\n", sh4->device->tag | |
| 1096 | LOG(("SH-4 '%s' assert external irq IRL%d\n", sh4->device->tag | |
| 1097 | 1097 | sh4_exception_request(sh4, SH4_INTC_IRL0+irqline-SH4_IRL0); |
| 1098 | 1098 | } |
| 1099 | 1099 | } |
| r7553 | r7554 | |
| 1107 | 1107 | sh4_exception_unrequest(sh4, SH4_INTC_IRLn0+s); |
| 1108 | 1108 | if (sh4->irln < 15) |
| 1109 | 1109 | sh4_exception_request(sh4, SH4_INTC_IRLn0+sh4->irln); |
| 1110 | LOG(("SH-4 '%s' IRLn0-IRLn3 level #%d\n", sh4->device->tag | |
| 1110 | LOG(("SH-4 '%s' IRLn0-IRLn3 level #%d\n", sh4->device->tag | |
| 1111 | 1111 | } |
| 1112 | 1112 | } |
| 1113 | 1113 | if (sh4->test_irq && (!sh4->delay)) |
| r7553 | r7554 | |
|---|---|---|
| 366 | 366 | { /* check for transition */ |
| 367 | 367 | cpustate->irq_state[irqline] = state; |
| 368 | 368 | |
| 369 | LOG(("tms7000: (cpu '%s') set_irq_line (INT%d, state %d)\n", cpustate->device->tag | |
| 369 | LOG(("tms7000: (cpu '%s') set_irq_line (INT%d, state %d)\n", cpustate->device->tag | |
| 370 | 370 | |
| 371 | 371 | if (state == CLEAR_LINE) |
| 372 | 372 | { |
| r7553 | r7554 | |
|---|---|---|
| 824 | 824 | ***************************************************************/ |
| 825 | 825 | #define RETN(Z) do { \ |
| 826 | 826 | LOG(("Z80 '%s' RETN z80->iff1:%d z80->iff2:%d\n", \ |
| 827 | (Z)->device->tag | |
| 827 | (Z)->device->tag | |
| 828 | 828 | POP((Z), pc); \ |
| 829 | 829 | (Z)->WZ = (Z)->PC; \ |
| 830 | 830 | (Z)->iff1 = (Z)->iff2; \ |
| r7553 | r7554 | |
| 2093 | 2093 | |
| 2094 | 2094 | OP(illegal,1) { |
| 2095 | 2095 | logerror("Z80 '%s' ill. opcode $%02x $%02x\n", |
| 2096 | z80->device->tag | |
| 2096 | z80->device->tag | |
| 2097 | 2097 | } |
| 2098 | 2098 | |
| 2099 | 2099 | /********************************************************** |
| r7553 | r7554 | |
| 2681 | 2681 | OP(illegal,2) |
| 2682 | 2682 | { |
| 2683 | 2683 | logerror("Z80 '%s' ill. opcode $ed $%02x\n", |
| 2684 | z80->device->tag | |
| 2684 | z80->device->tag | |
| 2685 | 2685 | } |
| 2686 | 2686 | |
| 2687 | 2687 | /********************************************************** |
| r7553 | r7554 | |
| 3289 | 3289 | else |
| 3290 | 3290 | irq_vector = (*z80->irq_callback)(z80->device, 0); |
| 3291 | 3291 | |
| 3292 | LOG(("Z80 '%s' single int. irq_vector $%02x\n", z80->device->tag | |
| 3292 | LOG(("Z80 '%s' single int. irq_vector $%02x\n", z80->device->tag | |
| 3293 | 3293 | |
| 3294 | 3294 | /* Interrupt mode 2. Call [i:databyte] */ |
| 3295 | 3295 | if( z80->im == 2 ) |
| r7553 | r7554 | |
| 3297 | 3297 | irq_vector = (irq_vector & 0xff) | (z80->i << 8); |
| 3298 | 3298 | PUSH(z80, pc); |
| 3299 | 3299 | RM16(z80, irq_vector, &z80->pc); |
| 3300 | LOG(("Z80 '%s' IM2 [$%04x] = $%04x\n", z80->device->tag | |
| 3300 | LOG(("Z80 '%s' IM2 [$%04x] = $%04x\n", z80->device->tag | |
| 3301 | 3301 | /* CALL opcode timing + 'interrupt latency' cycles */ |
| 3302 | 3302 | z80->icount -= z80->cc_op[0xcd] + z80->cc_ex[0xff]; |
| 3303 | 3303 | } |
| r7553 | r7554 | |
| 3305 | 3305 | /* Interrupt mode 1. RST 38h */ |
| 3306 | 3306 | if( z80->im == 1 ) |
| 3307 | 3307 | { |
| 3308 | LOG(("Z80 '%s' IM1 $0038\n", z80->device->tag | |
| 3308 | LOG(("Z80 '%s' IM1 $0038\n", z80->device->tag | |
| 3309 | 3309 | PUSH(z80, pc); |
| 3310 | 3310 | z80->PCD = 0x0038; |
| 3311 | 3311 | /* RST $38 + 'interrupt latency' cycles */ |
| r7553 | r7554 | |
| 3316 | 3316 | /* Interrupt mode 0. We check for CALL and JP instructions, */ |
| 3317 | 3317 | /* if neither of these were found we assume a 1 byte opcode */ |
| 3318 | 3318 | /* was placed on the databus */ |
| 3319 | LOG(("Z80 '%s' IM0 $%04x\n", z80->device->tag | |
| 3319 | LOG(("Z80 '%s' IM0 $%04x\n", z80->device->tag | |
| 3320 | 3320 | |
| 3321 | 3321 | /* check for nop */ |
| 3322 | 3322 | if (irq_vector != 0x00) |
| r7553 | r7554 | |
| 3530 | 3530 | /* to just check here */ |
| 3531 | 3531 | if (z80->nmi_pending) |
| 3532 | 3532 | { |
| 3533 | LOG(("Z80 '%s' take NMI\n", z80->device->tag | |
| 3533 | LOG(("Z80 '%s' take NMI\n", z80->device->tag | |
| 3534 | 3534 | z80->PRVPC = -1; /* there isn't a valid previous program counter */ |
| 3535 | 3535 | LEAVE_HALT(z80); /* Check if processor was halted */ |
| 3536 | 3536 |
| r7553 | r7554 | |
|---|---|---|
| 546 | 546 | /* IRQ enter */ |
| 547 | 547 | static void enter_interrupt(m6800_state *cpustate, const char *message,UINT16 irq_vector) |
| 548 | 548 | { |
| 549 | LOG((message, cpustate->device->tag | |
| 549 | LOG((message, cpustate->device->tag | |
| 550 | 550 | if( cpustate->wai_state & (M6800_WAI|M6800_SLP) ) |
| 551 | 551 | { |
| 552 | 552 | if( cpustate->wai_state & M6800_WAI ) |
| r7553 | r7554 | |
| 965 | 965 | { |
| 966 | 966 | //int eddge; |
| 967 | 967 | |
| 968 | LOG(("M6800 '%s' set_irq_line %d,%d\n", cpustate->device->tag | |
| 968 | LOG(("M6800 '%s' set_irq_line %d,%d\n", cpustate->device->tag | |
| 969 | 969 | cpustate->irq_state[irqline] = state; |
| 970 | 970 | |
| 971 | 971 | if (irqline == M6800_TIN_LINE && state != cpustate->irq_state[irqline]) |
| r7553 | r7554 | |
| 2411 | 2411 | case 0x0e: |
| 2412 | 2412 | return (cpustate->input_capture >> 8) & 0xff; |
| 2413 | 2413 | case 0x0f: |
| 2414 | logerror("CPU '%s' PC %04x: warning - read from unsupported register %02x\n",space->cpu->tag | |
| 2414 | logerror("CPU '%s' PC %04x: warning - read from unsupported register %02x\n",space->cpu->tag | |
| 2415 | 2415 | return 0; |
| 2416 | 2416 | case 0x10: |
| 2417 | 2417 | return cpustate->rmcr; |
| r7553 | r7554 | |
| 2428 | 2428 | case 0x13: |
| 2429 | 2429 | return cpustate->tdr; |
| 2430 | 2430 | case 0x14: |
| 2431 | logerror("CPU '%s' PC %04x: read RAM control register\n",space->cpu->tag | |
| 2431 | logerror("CPU '%s' PC %04x: read RAM control register\n",space->cpu->tag | |
| 2432 | 2432 | return cpustate->ram_ctrl; |
| 2433 | 2433 | case 0x15: |
| 2434 | 2434 | case 0x16: |
| r7553 | r7554 | |
| 2442 | 2442 | case 0x1e: |
| 2443 | 2443 | case 0x1f: |
| 2444 | 2444 | default: |
| 2445 | logerror("CPU '%s' PC %04x: warning - read from reserved internal register %02x\n",space->cpu->tag | |
| 2445 | logerror("CPU '%s' PC %04x: warning - read from reserved internal register %02x\n",space->cpu->tag | |
| 2446 | 2446 | return 0; |
| 2447 | 2447 | } |
| 2448 | 2448 | } |
| r7553 | r7554 | |
| 2475 | 2475 | | (memory_read_byte_8be(cpustate->io, M6803_PORT2) & (cpustate->port2_ddr ^ 0xff))); |
| 2476 | 2476 | |
| 2477 | 2477 | if (cpustate->port2_ddr & 2) |
| 2478 | logerror("CPU '%s' PC %04x: warning - port 2 bit 1 set as output (OLVL) - not supported\n",space->cpu->tag | |
| 2478 | logerror("CPU '%s' PC %04x: warning - port 2 bit 1 set as output (OLVL) - not supported\n",space->cpu->tag | |
| 2479 | 2479 | } |
| 2480 | 2480 | break; |
| 2481 | 2481 | case 0x02: |
| r7553 | r7554 | |
| 2574 | 2574 | case 0x0d: |
| 2575 | 2575 | case 0x0e: |
| 2576 | 2576 | case 0x12: |
| 2577 | logerror("CPU '%s' PC %04x: warning - write %02x to read only internal register %02x\n",space->cpu->tag | |
| 2577 | logerror("CPU '%s' PC %04x: warning - write %02x to read only internal register %02x\n",space->cpu->tag | |
| 2578 | 2578 | break; |
| 2579 | 2579 | case 0x0f: |
| 2580 | logerror("CPU '%s' PC %04x: warning - write %02x to unsupported internal register %02x\n",space->cpu->tag | |
| 2580 | logerror("CPU '%s' PC %04x: warning - write %02x to unsupported internal register %02x\n",space->cpu->tag | |
| 2581 | 2581 | break; |
| 2582 | 2582 | case 0x10: |
| 2583 | 2583 | cpustate->rmcr = data & 0x0f; |
| r7553 | r7554 | |
| 2617 | 2617 | cpustate->tdr = data; |
| 2618 | 2618 | break; |
| 2619 | 2619 | case 0x14: |
| 2620 | logerror("CPU '%s' PC %04x: write %02x to RAM control register\n",space->cpu->tag | |
| 2620 | logerror("CPU '%s' PC %04x: write %02x to RAM control register\n",space->cpu->tag | |
| 2621 | 2621 | cpustate->ram_ctrl = data; |
| 2622 | 2622 | break; |
| 2623 | 2623 | case 0x15: |
| r7553 | r7554 | |
| 2632 | 2632 | case 0x1e: |
| 2633 | 2633 | case 0x1f: |
| 2634 | 2634 | default: |
| 2635 | logerror("CPU '%s' PC %04x: warning - write %02x to reserved internal register %02x\n",space->cpu->tag | |
| 2635 | logerror("CPU '%s' PC %04x: warning - write %02x to reserved internal register %02x\n",space->cpu->tag | |
| 2636 | 2636 | break; |
| 2637 | 2637 | } |
| 2638 | 2638 | } |
| r7553 | r7554 | |
|---|---|---|
| 38 | 38 | static void saturn_invalid3( saturn_state *cpustate, int op1, int op2, int op3 ) |
| 39 | 39 | { |
| 40 | 40 | logerror( "SATURN '%s' invalid opcode %x%x%x at %05x\n", |
| 41 | cpustate->device->tag | |
| 41 | cpustate->device->tag | |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | static void saturn_invalid4( saturn_state *cpustate, int op1, int op2, int op3, int op4 ) |
| 45 | 45 | { |
| 46 | 46 | logerror( "SATURN '%s' invalid opcode %x%x%x%x at %05x\n", |
| 47 | cpustate->device->tag | |
| 47 | cpustate->device->tag | |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | static void saturn_invalid5( saturn_state *cpustate, int op1, int op2, int op3, int op4, int op5 ) |
| 51 | 51 | { |
| 52 | 52 | logerror( "SATURN '%s' invalid opcode %x%x%x%x%x at %05x\n", |
| 53 | cpustate->device->tag | |
| 53 | cpustate->device->tag | |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | static void saturn_invalid6( saturn_state *cpustate, int op1, int op2, int op3, int op4, int op5, int op6 ) |
| 57 | 57 | { |
| 58 | 58 | logerror( "SATURN '%s' invalid opcode %x%x%x%x%x%x at %05x\n", |
| 59 | cpustate->device->tag | |
| 59 | cpustate->device->tag | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 |
| r7553 | r7554 | |
|---|---|---|
| 1 | 1 | #define IRQ_ADDRESS 0xf |
| 2 | 2 | |
| 3 | 3 | #define saturn_assert(x) \ |
| 4 | do { if (!(x)) logerror("SATURN '%s' assertion failed: %s at %s:%i, pc=%05x\n", cpustate->device->tag | |
| 4 | do { if (!(x)) logerror("SATURN '%s' assertion failed: %s at %s:%i, pc=%05x\n", cpustate->device->tag | |
| 5 | 5 | |
| 6 | 6 | INLINE int READ_OP(saturn_state *cpustate) |
| 7 | 7 | { |
| r7553 | r7554 | |
| 186 | 186 | |
| 187 | 187 | INLINE void saturn_interrupt_on(saturn_state *cpustate) |
| 188 | 188 | { |
| 189 | LOG(( "SATURN '%s' at %05x: INTON\n", cpustate->device->tag | |
| 189 | LOG(( "SATURN '%s' at %05x: INTON\n", cpustate->device->tag | |
| 190 | 190 | cpustate->irq_enable=1; |
| 191 | 191 | if (cpustate->irq_state) |
| 192 | 192 | { |
| 193 | LOG(( "SATURN '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 193 | LOG(( "SATURN '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 194 | 194 | cpustate->pending_irq=1; |
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | INLINE void saturn_interrupt_off(saturn_state *cpustate) |
| 199 | 199 | { |
| 200 | LOG(( "SATURN '%s' at %05x: INTOFF\n", cpustate->device->tag | |
| 200 | LOG(( "SATURN '%s' at %05x: INTOFF\n", cpustate->device->tag | |
| 201 | 201 | cpustate->irq_enable=0; |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | INLINE void saturn_reset_interrupt(saturn_state *cpustate) |
| 205 | 205 | { |
| 206 | LOG(( "SATURN '%s' at %05x: RSI\n", cpustate->device->tag | |
| 206 | LOG(( "SATURN '%s' at %05x: RSI\n", cpustate->device->tag | |
| 207 | 207 | if (cpustate->config&&cpustate->config->rsi) cpustate->config->rsi(cpustate->device); |
| 208 | 208 | } |
| 209 | 209 | |
| r7553 | r7554 | |
| 234 | 234 | { |
| 235 | 235 | cpustate->sleeping=1; |
| 236 | 236 | cpustate->irq_enable=1; |
| 237 | LOG(( "SATURN '%s' at %05x: SHUTDN\n", cpustate->device->tag | |
| 237 | LOG(( "SATURN '%s' at %05x: SHUTDN\n", cpustate->device->tag | |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | INLINE void saturn_bus_command_b(saturn_state *cpustate) |
| 241 | 241 | { |
| 242 | logerror( "SATURN '%s' at %05x: BUSCB opcode not handled\n", cpustate->device->tag | |
| 242 | logerror( "SATURN '%s' at %05x: BUSCB opcode not handled\n", cpustate->device->tag | |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | INLINE void saturn_bus_command_c(saturn_state *cpustate) |
| 246 | 246 | { |
| 247 | logerror( "SATURN '%s' at %05x: BUSCC opcode not handled\n", cpustate->device->tag | |
| 247 | logerror( "SATURN '%s' at %05x: BUSCC opcode not handled\n", cpustate->device->tag | |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | INLINE void saturn_bus_command_d(saturn_state *cpustate) |
| 251 | 251 | { |
| 252 | logerror( "SATURN '%s' at %05x: BUSCD opcode not handled\n", cpustate->device->tag | |
| 252 | logerror( "SATURN '%s' at %05x: BUSCD opcode not handled\n", cpustate->device->tag | |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | INLINE void saturn_serial_request(saturn_state *cpustate) |
| 256 | 256 | { |
| 257 | logerror( "SATURN '%s' at %05x: SREQ? opcode not handled\n", cpustate->device->tag | |
| 257 | logerror( "SATURN '%s' at %05x: SREQ? opcode not handled\n", cpustate->device->tag | |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | INLINE void saturn_out_c(saturn_state *cpustate) |
| r7553 | r7554 | |
| 275 | 275 | saturn_assert(reg>=0 && reg<9); |
| 276 | 276 | if (!(cpustate->pc&1)) |
| 277 | 277 | logerror( "SATURN '%s' at %05x: reg=IN opcode at odd addresse\n", |
| 278 | cpustate->device->tag | |
| 278 | cpustate->device->tag | |
| 279 | 279 | if (cpustate->config&&cpustate->config->in) in = cpustate->config->in(cpustate->device); |
| 280 | 280 | S64_WRITE_WORD(cpustate, reg,in); |
| 281 | 281 | cpustate->monitor_in = in; |
| r7553 | r7554 | |
| 459 | 459 | |
| 460 | 460 | INLINE void saturn_return_interrupt(saturn_state *cpustate) |
| 461 | 461 | { |
| 462 | LOG(( "SATURN '%s' at %05x: RTI\n", cpustate->device->tag | |
| 462 | LOG(( "SATURN '%s' at %05x: RTI\n", cpustate->device->tag | |
| 463 | 463 | cpustate->in_irq=0; /* set to 1 when an IRQ is taken */ |
| 464 | 464 | cpustate->pc=saturn_pop(cpustate); |
| 465 | 465 | // cpustate->icount-=10; |
| r7553 | r7554 | |
|---|---|---|
| 162 | 162 | saturn_push(cpustate, cpustate->pc); |
| 163 | 163 | cpustate->pc=IRQ_ADDRESS; |
| 164 | 164 | |
| 165 | LOG(("Saturn '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 165 | LOG(("Saturn '%s' takes IRQ ($%04x)\n", cpustate->device->tag | |
| 166 | 166 | |
| 167 | 167 | if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, SATURN_IRQ_LINE); |
| 168 | 168 | } |
| r7553 | r7554 | |
| 206 | 206 | cpustate->nmi_state = state; |
| 207 | 207 | if ( state != CLEAR_LINE ) |
| 208 | 208 | { |
| 209 | LOG(( "SATURN '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 209 | LOG(( "SATURN '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag | |
| 210 | 210 | cpustate->pending_irq = 1; |
| 211 | 211 | } |
| 212 | 212 | } |
| r7553 | r7554 | |
| 217 | 217 | cpustate->irq_state = state; |
| 218 | 218 | if ( state != CLEAR_LINE && cpustate->irq_enable ) |
| 219 | 219 | { |
| 220 | LOG(( "SATURN '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 220 | LOG(( "SATURN '%s' set_irq_line(ASSERT)\n", cpustate->device->tag | |
| 221 | 221 | cpustate->pending_irq = 1; |
| 222 | 222 | } |
| 223 | 223 | } |
| r7553 | r7554 | |
| 226 | 226 | { |
| 227 | 227 | if (cpustate->sleeping && state==1) |
| 228 | 228 | { |
| 229 | LOG(( "SATURN '%s' set_wakeup_line(ASSERT)\n", cpustate->device->tag | |
| 229 | LOG(( "SATURN '%s' set_wakeup_line(ASSERT)\n", cpustate->device->tag | |
| 230 | 230 | if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, SATURN_WAKEUP_LINE); |
| 231 | 231 | cpustate->sleeping = 0; |
| 232 | 232 | } |
| r7553 | r7554 | |
|---|---|---|
| 43 | 43 | { |
| 44 | 44 | resolved->target = device->machine->port(config->tag); |
| 45 | 45 | if (resolved->target == NULL) |
| 46 | fatalerror("devcb_resolve_read_line: unable to find input port '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 46 | fatalerror("devcb_resolve_read_line: unable to find input port '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 47 | 47 | resolved->read = trampoline_read_port_to_read_line; |
| 48 | 48 | } |
| 49 | 49 | |
| r7553 | r7554 | |
| 59 | 59 | cpu = device->machine->device(config->tag); |
| 60 | 60 | |
| 61 | 61 | if (cpu == NULL) |
| 62 | fatalerror("devcb_resolve_read_line: unable to find CPU '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 62 | fatalerror("devcb_resolve_read_line: unable to find CPU '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 63 | 63 | resolved->target = resolved; |
| 64 | 64 | resolved->read = trampoline_read8_to_read_line; |
| 65 | 65 | resolved->realtarget = cpu->space(spacenum); |
| 66 | 66 | if (resolved->realtarget == NULL) |
| 67 | fatalerror("devcb_resolve_read_line: unable to find CPU '%s' %s space (requested by %s '%s')", config->tag, address_space_names[spacenum], device->name(), device->tag | |
| 67 | fatalerror("devcb_resolve_read_line: unable to find CPU '%s' %s space (requested by %s '%s')", config->tag, address_space_names[spacenum], device->name(), device->tag | |
| 68 | 68 | resolved->real.readspace = config->readspace; |
| 69 | 69 | } |
| 70 | 70 | |
| r7553 | r7554 | |
| 80 | 80 | resolved->target = device->machine->device(config->tag); |
| 81 | 81 | |
| 82 | 82 | if (resolved->target == NULL) |
| 83 | fatalerror("devcb_resolve_read_line: unable to find device '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 83 | fatalerror("devcb_resolve_read_line: unable to find device '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 84 | 84 | |
| 85 | 85 | /* read_line to read_line is direct */ |
| 86 | 86 | if (config->readline != NULL) |
| r7553 | r7554 | |
| 130 | 130 | { |
| 131 | 131 | resolved->target = device->machine->port(config->tag); |
| 132 | 132 | if (resolved->target == NULL) |
| 133 | fatalerror("devcb_resolve_write_line: unable to find input port '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 133 | fatalerror("devcb_resolve_write_line: unable to find input port '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 134 | 134 | resolved->write = trampoline_write_port_to_write_line; |
| 135 | 135 | } |
| 136 | 136 | |
| r7553 | r7554 | |
| 146 | 146 | cpu = device->machine->device(config->tag); |
| 147 | 147 | |
| 148 | 148 | if (cpu == NULL) |
| 149 | fatalerror("devcb_resolve_write_line: unable to find CPU '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 149 | fatalerror("devcb_resolve_write_line: unable to find CPU '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 150 | 150 | resolved->target = resolved; |
| 151 | 151 | resolved->write = trampoline_write8_to_write_line; |
| 152 | 152 | resolved->realtarget = cpu->space(spacenum); |
| 153 | 153 | if (resolved->realtarget == NULL) |
| 154 | fatalerror("devcb_resolve_write_line: unable to find CPU '%s' %s space (requested by %s '%s')", config->tag, address_space_names[spacenum], device->name(), device->tag | |
| 154 | fatalerror("devcb_resolve_write_line: unable to find CPU '%s' %s space (requested by %s '%s')", config->tag, address_space_names[spacenum], device->name(), device->tag | |
| 155 | 155 | resolved->real.writespace = config->writespace; |
| 156 | 156 | } |
| 157 | 157 | |
| r7553 | r7554 | |
| 167 | 167 | cpu = device->machine->device(config->tag); |
| 168 | 168 | |
| 169 | 169 | if (cpu == NULL) |
| 170 | fatalerror("devcb_resolve_write_line: unable to find CPU '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 170 | fatalerror("devcb_resolve_write_line: unable to find CPU '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 171 | 171 | resolved->target = resolved; |
| 172 | 172 | resolved->write = trampoline_writecpu_to_write_line; |
| 173 | 173 | resolved->realtarget = cpu; |
| r7553 | r7554 | |
| 186 | 186 | resolved->target = device->machine->device(config->tag); |
| 187 | 187 | |
| 188 | 188 | if (resolved->target == NULL) |
| 189 | fatalerror("devcb_resolve_write_line: unable to find device '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 189 | fatalerror("devcb_resolve_write_line: unable to find device '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 190 | 190 | |
| 191 | 191 | /* write_line to write_line is direct */ |
| 192 | 192 | if (config->writeline != NULL) |
| r7553 | r7554 | |
| 230 | 230 | { |
| 231 | 231 | resolved->target = device->machine->port(config->tag); |
| 232 | 232 | if (resolved->target == NULL) |
| 233 | fatalerror("devcb_resolve_read8: unable to find input port '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 233 | fatalerror("devcb_resolve_read8: unable to find input port '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 234 | 234 | resolved->read = trampoline_read_port_to_read8; |
| 235 | 235 | } |
| 236 | 236 | |
| r7553 | r7554 | |
| 246 | 246 | cpu = device->machine->device(config->tag); |
| 247 | 247 | |
| 248 | 248 | if (cpu == NULL) |
| 249 | fatalerror("devcb_resolve_read8: unable to find CPU '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 249 | fatalerror("devcb_resolve_read8: unable to find CPU '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 250 | 250 | resolved->target = cpu->space(spacenum); |
| 251 | 251 | if (resolved->target == NULL) |
| 252 | fatalerror("devcb_resolve_read8: unable to find CPU '%s' %s space (requested by %s '%s')", config->tag, address_space_names[spacenum], device->name(), device->tag | |
| 252 | fatalerror("devcb_resolve_read8: unable to find CPU '%s' %s space (requested by %s '%s')", config->tag, address_space_names[spacenum], device->name(), device->tag | |
| 253 | 253 | resolved->read = (read8_device_func)config->readspace; |
| 254 | 254 | } |
| 255 | 255 | |
| r7553 | r7554 | |
| 258 | 258 | { |
| 259 | 259 | resolved->target = (config->type == DEVCB_TYPE_SELF) ? device : device->machine->device(config->tag); |
| 260 | 260 | if (resolved->target == NULL) |
| 261 | fatalerror("devcb_resolve_read8: unable to find device '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 261 | fatalerror("devcb_resolve_read8: unable to find device '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 262 | 262 | |
| 263 | 263 | /* read8 to read8 is direct */ |
| 264 | 264 | if (config->readdevice != NULL) |
| r7553 | r7554 | |
| 301 | 301 | { |
| 302 | 302 | resolved->target = device->machine->port(config->tag); |
| 303 | 303 | if (resolved->target == NULL) |
| 304 | fatalerror("devcb_resolve_read_line: unable to find input port '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 304 | fatalerror("devcb_resolve_read_line: unable to find input port '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 305 | 305 | resolved->write = trampoline_write_port_to_write8; |
| 306 | 306 | } |
| 307 | 307 | |
| r7553 | r7554 | |
| 317 | 317 | cpu = device->machine->device(config->tag); |
| 318 | 318 | |
| 319 | 319 | if (cpu == NULL) |
| 320 | fatalerror("devcb_resolve_write8: unable to find CPU '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 320 | fatalerror("devcb_resolve_write8: unable to find CPU '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 321 | 321 | resolved->target = cpu->space(spacenum); |
| 322 | 322 | if (resolved->target == NULL) |
| 323 | fatalerror("devcb_resolve_write8: unable to find CPU '%s' %s space (requested by %s '%s')", config->tag, address_space_names[spacenum], device->name(), device->tag | |
| 323 | fatalerror("devcb_resolve_write8: unable to find CPU '%s' %s space (requested by %s '%s')", config->tag, address_space_names[spacenum], device->name(), device->tag | |
| 324 | 324 | resolved->write = (write8_device_func)config->writespace; |
| 325 | 325 | } |
| 326 | 326 | |
| r7553 | r7554 | |
| 329 | 329 | { |
| 330 | 330 | resolved->target = (config->type == DEVCB_TYPE_SELF) ? device : device->machine->device(config->tag); |
| 331 | 331 | if (resolved->target == NULL) |
| 332 | fatalerror("devcb_resolve_write8: unable to find device '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 332 | fatalerror("devcb_resolve_write8: unable to find device '%s' (requested by %s '%s')", config->tag, device->name(), device->tag | |
| 333 | 333 | |
| 334 | 334 | /* write8 to write8 is direct */ |
| 335 | 335 | if (config->writedevice != NULL) |
| r7553 | r7554 | |
|---|---|---|
| 4538 | 4538 | } |
| 4539 | 4539 | |
| 4540 | 4540 | /* set the type, and initialize the chip mask */ |
| 4541 | v->index = device->machine->devicelist.index(device->type, device->tag); | |
| 4541 | v->index = device->machine->devicelist.index(device->type, device->tag()); | |
| 4542 | 4542 | v->screen = device->machine->device(config->screen); |
| 4543 | 4543 | assert_always(v->screen != NULL, "Unable to find screen attached to voodoo"); |
| 4544 | 4544 | v->cpu = device->machine->device(config->cputag); |
| r7553 | r7554 | |
|---|---|---|
| 633 | 633 | { |
| 634 | 634 | fprintf(out, "\t\t<chip"); |
| 635 | 635 | fprintf(out, " type=\"cpu\""); |
| 636 | fprintf(out, " tag=\"%s\"", xml_normalize_string(devconfig->tag)); | |
| 636 | fprintf(out, " tag=\"%s\"", xml_normalize_string(devconfig->tag())); | |
| 637 | 637 | fprintf(out, " name=\"%s\"", xml_normalize_string(devconfig->name())); |
| 638 | 638 | fprintf(out, " clock=\"%d\"", devconfig->clock); |
| 639 | 639 | fprintf(out, "/>\n"); |
| r7553 | r7554 | |
| 644 | 644 | { |
| 645 | 645 | fprintf(out, "\t\t<chip"); |
| 646 | 646 | fprintf(out, " type=\"audio\""); |
| 647 | fprintf(out, " tag=\"%s\"", xml_normalize_string(devconfig->tag)); | |
| 647 | fprintf(out, " tag=\"%s\"", xml_normalize_string(devconfig->tag())); | |
| 648 | 648 | fprintf(out, " name=\"%s\"", xml_normalize_string(devconfig->name())); |
| 649 | 649 | if (devconfig->clock != 0) |
| 650 | 650 | fprintf(out, " clock=\"%d\"", devconfig->clock); |
| r7553 | r7554 | |
|---|---|---|
| 610 | 610 | /* validate arguments */ |
| 611 | 611 | assert(scanline >= 0); |
| 612 | 612 | |
| 613 | LOG_PARTIAL_UPDATES(("Partial: video_screen_update_partial(%s, %d): ", screen->tag | |
| 613 | LOG_PARTIAL_UPDATES(("Partial: video_screen_update_partial(%s, %d): ", screen->tag | |
| 614 | 614 | |
| 615 | 615 | /* these two checks only apply if we're allowed to skip frames */ |
| 616 | 616 | if (!(screen->machine->config->video_attributes & VIDEO_ALWAYS_UPDATE)) |
| r7553 | r7554 | |
| 2078 | 2078 | /* select the appropriate view in our dummy target */ |
| 2079 | 2079 | if (global.snap_native && screen != NULL) |
| 2080 | 2080 | { |
| 2081 | view_index = screen->machine->devicelist.index(VIDEO_SCREEN, screen->tag | |
| 2081 | view_index = screen->machine->devicelist.index(VIDEO_SCREEN, screen->tag | |
| 2082 | 2082 | assert(view_index != -1); |
| 2083 | 2083 | render_target_set_view(global.snap_target, view_index); |
| 2084 | 2084 | } |
| r7553 | r7554 | |
| 2587 | 2587 | /* write the final PNG */ |
| 2588 | 2588 | |
| 2589 | 2589 | /* compute the name and create the file */ |
| 2590 | fname.printf("%s" PATH_SEPARATOR "burnin-%s.png", screen->machine->basename, screen->tag | |
| 2590 | fname.printf("%s" PATH_SEPARATOR "burnin-%s.png", screen->machine->basename, screen->tag | |
| 2591 | 2591 | filerr = mame_fopen(SEARCHPATH_SCREENSHOT, fname, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file); |
| 2592 | 2592 | if (filerr == FILERR_NONE) |
| 2593 | 2593 | { |
| r7553 | r7554 | |
|---|---|---|
| 913 | 913 | |
| 914 | 914 | /* fatal error if the decrypted region straddles the bank */ |
| 915 | 915 | else if (bank->bytestart < byteend && bank->byteend > bytestart) |
| 916 | fatalerror("memory_set_decrypted_region found straddled region %08X-%08X for device '%s'", bytestart, byteend, space->cpu->tag | |
| 916 | fatalerror("memory_set_decrypted_region found straddled region %08X-%08X for device '%s'", bytestart, byteend, space->cpu->tag | |
| 917 | 917 | } |
| 918 | 918 | } |
| 919 | 919 | |
| 920 | 920 | /* fatal error as well if we didn't find any relevant memory banks */ |
| 921 | 921 | if (!found) |
| 922 | fatalerror("memory_set_decrypted_region unable to find matching region %08X-%08X for device '%s'", bytestart, byteend, space->cpu->tag | |
| 922 | fatalerror("memory_set_decrypted_region unable to find matching region %08X-%08X for device '%s'", bytestart, byteend, space->cpu->tag | |
| 923 | 923 | } |
| 924 | 924 | |
| 925 | 925 | |
| r7553 | r7554 | |
| 981 | 981 | spacerw->direct.byteend = 0; |
| 982 | 982 | spacerw->direct.bytestart = 1; |
| 983 | 983 | if (!spacerw->debugger_access) |
| 984 | logerror("Device '%s': warning - attempt to direct-map address %s in %s space\n", space->cpu->tag | |
| 984 | logerror("Device '%s': warning - attempt to direct-map address %s in %s space\n", space->cpu->tag | |
| 985 | 985 | return FALSE; |
| 986 | 986 | } |
| 987 | 987 | |
| r7553 | r7554 | |
| 1210 | 1210 | { |
| 1211 | 1211 | address_space *spacerw = (address_space *)space; |
| 1212 | 1212 | if (rhandler >= STATIC_COUNT) |
| 1213 | fatalerror("Attempted to install non-static read handler via memory_install_handler() in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1213 | fatalerror("Attempted to install non-static read handler via memory_install_handler() in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1214 | 1214 | if (whandler >= STATIC_COUNT) |
| 1215 | fatalerror("Attempted to install non-static write handler via memory_install_handler() in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1215 | fatalerror("Attempted to install non-static write handler via memory_install_handler() in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1216 | 1216 | if (rhandler != 0) |
| 1217 | 1217 | space_map_range(spacerw, ROW_READ, spacerw->dbits, 0, addrstart, addrend, addrmask, addrmirror, (genf *)(FPTR)rhandler, spacerw, NULL); |
| 1218 | 1218 | if (whandler != 0) |
| r7553 | r7554 | |
| 1231 | 1231 | { |
| 1232 | 1232 | address_space *spacerw = (address_space *)space; |
| 1233 | 1233 | if (rhandler != NULL && (FPTR)rhandler < STATIC_COUNT) |
| 1234 | fatalerror("Attempted to install invalid read handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1234 | fatalerror("Attempted to install invalid read handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1235 | 1235 | if (whandler != NULL && (FPTR)whandler < STATIC_COUNT) |
| 1236 | fatalerror("Attempted to install invalid write handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1236 | fatalerror("Attempted to install invalid write handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1237 | 1237 | if (rhandler != NULL) |
| 1238 | 1238 | space_map_range(spacerw, ROW_READ, 8, handlerunitmask, addrstart, addrend, addrmask, addrmirror, (genf *)rhandler, spacerw, rhandler_name); |
| 1239 | 1239 | if (whandler != NULL) |
| r7553 | r7554 | |
| 1252 | 1252 | { |
| 1253 | 1253 | address_space *spacerw = (address_space *)space; |
| 1254 | 1254 | if (rhandler != NULL && (FPTR)rhandler < STATIC_COUNT) |
| 1255 | fatalerror("Attempted to install invalid read handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1255 | fatalerror("Attempted to install invalid read handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1256 | 1256 | if (whandler != NULL && (FPTR)whandler < STATIC_COUNT) |
| 1257 | fatalerror("Attempted to install invalid write handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1257 | fatalerror("Attempted to install invalid write handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1258 | 1258 | if (rhandler != NULL) |
| 1259 | 1259 | space_map_range(spacerw, ROW_READ, 16, handlerunitmask, addrstart, addrend, addrmask, addrmirror, (genf *)rhandler, spacerw, rhandler_name); |
| 1260 | 1260 | if (whandler != NULL) |
| r7553 | r7554 | |
| 1273 | 1273 | { |
| 1274 | 1274 | address_space *spacerw = (address_space *)space; |
| 1275 | 1275 | if (rhandler != NULL && (FPTR)rhandler < STATIC_COUNT) |
| 1276 | fatalerror("Attempted to install invalid read handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1276 | fatalerror("Attempted to install invalid read handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1277 | 1277 | if (whandler != NULL && (FPTR)whandler < STATIC_COUNT) |
| 1278 | fatalerror("Attempted to install invalid write handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1278 | fatalerror("Attempted to install invalid write handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1279 | 1279 | if (rhandler != NULL) |
| 1280 | 1280 | space_map_range(spacerw, ROW_READ, 32, handlerunitmask, addrstart, addrend, addrmask, addrmirror, (genf *)rhandler, spacerw, rhandler_name); |
| 1281 | 1281 | if (whandler != NULL) |
| r7553 | r7554 | |
| 1294 | 1294 | { |
| 1295 | 1295 | address_space *spacerw = (address_space *)space; |
| 1296 | 1296 | if (rhandler != NULL && (FPTR)rhandler < STATIC_COUNT) |
| 1297 | fatalerror("Attempted to install invalid read handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1297 | fatalerror("Attempted to install invalid read handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1298 | 1298 | if (whandler != NULL && (FPTR)whandler < STATIC_COUNT) |
| 1299 | fatalerror("Attempted to install invalid write handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1299 | fatalerror("Attempted to install invalid write handler in space %s of device '%s'\n", space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1300 | 1300 | if (rhandler != NULL) |
| 1301 | 1301 | space_map_range(spacerw, ROW_READ, 64, handlerunitmask, addrstart, addrend, addrmask, addrmirror, (genf *)rhandler, spacerw, rhandler_name); |
| 1302 | 1302 | if (whandler != NULL) |
| r7553 | r7554 | |
| 1315 | 1315 | { |
| 1316 | 1316 | address_space *spacerw = (address_space *)space; |
| 1317 | 1317 | if (rhandler != NULL && (FPTR)rhandler < STATIC_COUNT) |
| 1318 | fatalerror("Attempted to install invalid read handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1318 | fatalerror("Attempted to install invalid read handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1319 | 1319 | if (whandler != NULL && (FPTR)whandler < STATIC_COUNT) |
| 1320 | fatalerror("Attempted to install invalid write handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1320 | fatalerror("Attempted to install invalid write handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1321 | 1321 | if (rhandler != NULL) |
| 1322 | 1322 | space_map_range(spacerw, ROW_READ, 8, handlerunitmask, addrstart, addrend, addrmask, addrmirror, (genf *)rhandler, (void *)device, rhandler_name); |
| 1323 | 1323 | if (whandler != NULL) |
| r7553 | r7554 | |
| 1336 | 1336 | { |
| 1337 | 1337 | address_space *spacerw = (address_space *)space; |
| 1338 | 1338 | if (rhandler != NULL && (FPTR)rhandler < STATIC_COUNT) |
| 1339 | fatalerror("Attempted to install invalid read handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1339 | fatalerror("Attempted to install invalid read handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1340 | 1340 | if (whandler != NULL && (FPTR)whandler < STATIC_COUNT) |
| 1341 | fatalerror("Attempted to install invalid write handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1341 | fatalerror("Attempted to install invalid write handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1342 | 1342 | if (rhandler != NULL) |
| 1343 | 1343 | space_map_range(spacerw, ROW_READ, 16, handlerunitmask, addrstart, addrend, addrmask, addrmirror, (genf *)rhandler, (void *)device, rhandler_name); |
| 1344 | 1344 | if (whandler != NULL) |
| r7553 | r7554 | |
| 1357 | 1357 | { |
| 1358 | 1358 | address_space *spacerw = (address_space *)space; |
| 1359 | 1359 | if (rhandler != NULL && (FPTR)rhandler < STATIC_COUNT) |
| 1360 | fatalerror("Attempted to install invalid read handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1360 | fatalerror("Attempted to install invalid read handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1361 | 1361 | if (whandler != NULL && (FPTR)whandler < STATIC_COUNT) |
| 1362 | fatalerror("Attempted to install invalid write handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1362 | fatalerror("Attempted to install invalid write handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1363 | 1363 | if (rhandler != NULL) |
| 1364 | 1364 | space_map_range(spacerw, ROW_READ, 32, handlerunitmask, addrstart, addrend, addrmask, addrmirror, (genf *)rhandler, (void *)device, rhandler_name); |
| 1365 | 1365 | if (whandler != NULL) |
| r7553 | r7554 | |
| 1378 | 1378 | { |
| 1379 | 1379 | address_space *spacerw = (address_space *)space; |
| 1380 | 1380 | if (rhandler != NULL && (FPTR)rhandler < STATIC_COUNT) |
| 1381 | fatalerror("Attempted to install invalid read handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1381 | fatalerror("Attempted to install invalid read handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1382 | 1382 | if (whandler != NULL && (FPTR)whandler < STATIC_COUNT) |
| 1383 | fatalerror("Attempted to install invalid write handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1383 | fatalerror("Attempted to install invalid write handler for device '%s' in space %s of device '%s'\n", device->tag | |
| 1384 | 1384 | if (rhandler != NULL) |
| 1385 | 1385 | space_map_range(spacerw, ROW_READ, 64, handlerunitmask, addrstart, addrend, addrmask, addrmirror, (genf *)rhandler, (void *)device, rhandler_name); |
| 1386 | 1386 | if (whandler != NULL) |
| r7553 | r7554 | |
| 1415 | 1415 | { |
| 1416 | 1416 | const input_port_config *port = space->machine->port(rtag); |
| 1417 | 1417 | if (port == NULL) |
| 1418 | fatalerror("Attempted to map non-existent port '%s' for read in space %s of device '%s'\n", rtag, space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1418 | fatalerror("Attempted to map non-existent port '%s' for read in space %s of device '%s'\n", rtag, space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1419 | 1419 | space_map_range(spacerw, ROW_READ, space->dbits, 0, addrstart, addrend, addrmask, addrmirror, rhandler, (void *)port, rtag); |
| 1420 | 1420 | } |
| 1421 | 1421 | |
| r7553 | r7554 | |
| 1424 | 1424 | { |
| 1425 | 1425 | const input_port_config *port = space->machine->port(wtag); |
| 1426 | 1426 | if (port == NULL) |
| 1427 | fatalerror("Attempted to map non-existent port '%s' for write in space %s of device '%s'\n", wtag, space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1427 | fatalerror("Attempted to map non-existent port '%s' for write in space %s of device '%s'\n", wtag, space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1428 | 1428 | space_map_range(spacerw, ROW_WRITE, space->dbits, 0, addrstart, addrend, addrmask, addrmirror, whandler, (void *)port, wtag); |
| 1429 | 1429 | } |
| 1430 | 1430 | |
| r7553 | r7554 | |
| 1655 | 1655 | fprintf(file, "\n\n" |
| 1656 | 1656 | "====================================================\n" |
| 1657 | 1657 | "Device '%s' %s address space read handler dump\n" |
| 1658 | "====================================================\n", space->cpu->tag | |
| 1658 | "====================================================\n", space->cpu->tag | |
| 1659 | 1659 | dump_map(file, space, &space->read); |
| 1660 | 1660 | |
| 1661 | 1661 | fprintf(file, "\n\n" |
| 1662 | 1662 | "====================================================\n" |
| 1663 | 1663 | "Device '%s' %s address space write handler dump\n" |
| 1664 | "====================================================\n", space->cpu->tag | |
| 1664 | "====================================================\n", space->cpu->tag | |
| 1665 | 1665 | dump_map(file, space, &space->write); |
| 1666 | 1666 | } |
| 1667 | 1667 | } |
| r7553 | r7554 | |
| 1800 | 1800 | /* loop over valid address spaces */ |
| 1801 | 1801 | for (space = (address_space *)memdata->spacelist; space != NULL; space = (address_space *)space->next) |
| 1802 | 1802 | { |
| 1803 | int regionsize = (space->spacenum == ADDRESS_SPACE_0) ? memory_region_length(space->machine, space->cpu->tag) : 0; | |
| 1803 | int regionsize = (space->spacenum == ADDRESS_SPACE_0) ? memory_region_length(space->machine, space->cpu->tag()) : 0; | |
| 1804 | 1804 | address_map_entry *entry; |
| 1805 | 1805 | int entrynum; |
| 1806 | 1806 | |
| r7553 | r7554 | |
| 1831 | 1831 | /* make sure it fits within the memory region before doing so, however */ |
| 1832 | 1832 | if (entry->byteend < regionsize) |
| 1833 | 1833 | { |
| 1834 | entry->region = space->cpu->tag; | |
| 1834 | entry->region = space->cpu->tag(); | |
| 1835 | 1835 | entry->rgnoffs = entry->bytestart; |
| 1836 | 1836 | } |
| 1837 | 1837 | } |
| r7553 | r7554 | |
| 1844 | 1844 | |
| 1845 | 1845 | /* validate the region */ |
| 1846 | 1846 | if (base == NULL) |
| 1847 | fatalerror("Error: device '%s' %s space memory map entry %X-%X references non-existant region \"%s\"", space->cpu->tag | |
| 1847 | fatalerror("Error: device '%s' %s space memory map entry %X-%X references non-existant region \"%s\"", space->cpu->tag | |
| 1848 | 1848 | if (entry->rgnoffs + (entry->byteend - entry->bytestart + 1) > length) |
| 1849 | fatalerror("Error: device '%s' %s space memory map entry %X-%X extends beyond region \"%s\" size (%X)", space->cpu->tag | |
| 1849 | fatalerror("Error: device '%s' %s space memory map entry %X-%X extends beyond region \"%s\" size (%X)", space->cpu->tag | |
| 1850 | 1850 | } |
| 1851 | 1851 | |
| 1852 | 1852 | /* convert any region-relative entries to their memory pointers */ |
| r7553 | r7554 | |
| 1971 | 1971 | case AMH_DEVICE_HANDLER: |
| 1972 | 1972 | device = space->machine->device(handler->tag); |
| 1973 | 1973 | if (device == NULL) |
| 1974 | fatalerror("Attempted to map a non-existent device '%s' in space %s of device '%s'\n", handler->tag, space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1974 | fatalerror("Attempted to map a non-existent device '%s' in space %s of device '%s'\n", handler->tag, space->name, (space->cpu != NULL) ? space->cpu->tag | |
| 1975 | 1975 | switch ((handler->bits != 0) ? handler->bits : space->dbits) |
| 1976 | 1976 | { |
| 1977 | 1977 | case 8: |
| r7553 | r7554 | |
| 2490 | 2490 | address_map_entry *entry; |
| 2491 | 2491 | memory_block *block; |
| 2492 | 2492 | |
| 2493 | VPRINTF(("space_find_backing_memory('%s',%s,%08X-%08X) -> ", space->cpu->tag | |
| 2493 | VPRINTF(("space_find_backing_memory('%s',%s,%08X-%08X) -> ", space->cpu->tag | |
| 2494 | 2494 | |
| 2495 | 2495 | /* look in the address map first */ |
| 2496 | 2496 | for (entry = space->map->entrylist; entry != NULL; entry = entry->next) |
| r7553 | r7554 | |
| 2535 | 2535 | |
| 2536 | 2536 | /* if we're reading from RAM or from ROM outside of address space 0 or its region, then yes, we do need backing */ |
| 2537 | 2537 | if (entry->read.type == AMH_RAM || |
| 2538 | (entry->read.type == AMH_ROM && (space->spacenum != ADDRESS_SPACE_0 || entry->addrstart >= memory_region_length(space->machine, space->cpu->tag)))) | |
| 2538 | (entry->read.type == AMH_ROM && (space->spacenum != ADDRESS_SPACE_0 || entry->addrstart >= memory_region_length(space->machine, space->cpu->tag())))) | |
| 2539 | 2539 | return TRUE; |
| 2540 | 2540 | |
| 2541 | 2541 | /* all other cases don't need backing */ |
| r7553 | r7554 | |
| 3320 | 3320 | size_t bytestoalloc; |
| 3321 | 3321 | const char *region; |
| 3322 | 3322 | |
| 3323 | VPRINTF(("block_allocate('%s',%s,%08X,%08X,%p)\n", space->cpu->tag | |
| 3323 | VPRINTF(("block_allocate('%s',%s,%08X,%08X,%p)\n", space->cpu->tag | |
| 3324 | 3324 | |
| 3325 | 3325 | /* determine how much memory to allocate for this */ |
| 3326 | 3326 | bytestoalloc = sizeof(*block); |
| r7553 | r7554 | |
| 3351 | 3351 | char name[256]; |
| 3352 | 3352 | |
| 3353 | 3353 | sprintf(name, "%08x-%08x", bytestart, byteend); |
| 3354 | state_save_register_memory(space->machine, "memory", space->cpu->tag, space->spacenum, name, memory, bytes_per_element, (UINT32)(byteend - bytestart + 1) / bytes_per_element, __FILE__, __LINE__); | |
| 3354 | state_save_register_memory(space->machine, "memory", space->cpu->tag(), space->spacenum, name, memory, bytes_per_element, (UINT32)(byteend - bytestart + 1) / bytes_per_element, __FILE__, __LINE__); | |
| 3355 | 3355 | } |
| 3356 | 3356 | |
| 3357 | 3357 | /* fill in the tracking block */ |
| r7553 | r7554 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | // append each device from the configuration list |
| 78 | 78 | for (const device_config *devconfig = list.first(); devconfig != NULL; devconfig = devconfig->next) |
| 79 | append(devconfig->tag, new running_device(_machine, *devconfig)); | |
| 79 | append(devconfig->tag(), new running_device(_machine, *devconfig)); | |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | |
| r7553 | r7554 | |
| 169 | 169 | device_config::device_config(const device_config *_owner, device_type _type, const char *_tag, UINT32 _clock) |
| 170 | 170 | : next(NULL), |
| 171 | 171 | owner(const_cast<device_config *>(_owner)), |
| 172 | tag(_tag), | |
| 173 | 172 | type(_type), |
| 174 | 173 | devclass(DEVICE_CLASS_GENERAL), |
| 175 | 174 | clock(_clock), |
| 176 | 175 | static_config(NULL), |
| 177 | inline_config(NULL) | |
| 176 | inline_config(NULL), | |
| 177 | m_tag(_tag) | |
| 178 | 178 | { |
| 179 | 179 | // initialize remaining members |
| 180 | 180 | memset(address_map, 0, sizeof(address_map)); |
| r7553 | r7554 | |
| 303 | 303 | |
| 304 | 304 | astring &device_config::subtag(astring &dest, const char *_tag) const |
| 305 | 305 | { |
| 306 | return (this != NULL) ? dest.cpy(tag).cat(":").cat(_tag) : dest.cpy(_tag); | |
| 306 | return (this != NULL) ? dest.cpy(m_tag).cat(":").cat(_tag) : dest.cpy(_tag); | |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | |
| r7553 | r7554 | |
| 333 | 333 | : m_baseconfig(_config), |
| 334 | 334 | machine(&_machine), |
| 335 | 335 | next(NULL), |
| 336 | owner((_config.owner != NULL) ? _machine.devicelist.find(_config.owner->tag) : NULL), | |
| 337 | tag(_config.tag), | |
| 336 | owner((_config.owner != NULL) ? _machine.devicelist.find(_config.owner->tag()) : NULL), | |
| 338 | 337 | type(_config.type), |
| 339 | 338 | devclass(_config.devclass), |
| 340 | 339 | clock(_config.clock), |
| r7553 | r7554 | |
| 343 | 342 | tokenbytes(_config.get_config_int(DEVINFO_INT_TOKEN_BYTES)), |
| 344 | 343 | region(NULL), |
| 345 | 344 | execute(NULL), |
| 346 | get_runtime_info(NULL) | |
| 345 | get_runtime_info(NULL), | |
| 346 | m_tag(_config.tag()) | |
| 347 | 347 | { |
| 348 | 348 | memset(addrspace, 0, sizeof(addrspace)); |
| 349 | 349 | |
| 350 | 350 | if (tokenbytes == 0) |
| 351 | throw emu_fatalerror("Device %s specifies a 0 token length!\n", tag | |
| 351 | throw emu_fatalerror("Device %s specifies a 0 token length!\n", tag | |
| 352 | 352 | |
| 353 | 353 | // allocate memory for the token |
| 354 | 354 | token = auto_alloc_array_clear(machine, UINT8, tokenbytes); |
| r7553 | r7554 | |
| 433 | 433 | void running_device::start() |
| 434 | 434 | { |
| 435 | 435 | // find our region |
| 436 | region = machine->regionlist.find(baseconfig().tag); | |
| 436 | region = machine->regionlist.find(baseconfig().tag()); | |
| 437 | 437 | |
| 438 | 438 | // start functions are required |
| 439 | 439 | device_start_func start = (device_start_func)get_config_fct(DEVINFO_FCT_START); |
| r7553 | r7554 | |
|---|---|---|
| 173 | 173 | cia->sp = 0; |
| 174 | 174 | |
| 175 | 175 | /* initialize data direction registers */ |
| 176 | cia->port[0].ddr = !strcmp(device->tag, "cia_0") ? 0x03 : 0xff; | |
| 177 | cia->port[1].ddr = !strcmp(device->tag, "cia_0") ? 0x00 : 0xff; | |
| 176 | cia->port[0].ddr = !strcmp(device->tag(), "cia_0") ? 0x03 : 0xff; | |
| 177 | cia->port[1].ddr = !strcmp(device->tag(), "cia_0") ? 0x00 : 0xff; | |
| 178 | 178 | |
| 179 | 179 | /* TOD running by default */ |
| 180 | 180 | cia->tod_running = TRUE; |
| r7553 | r7554 | |
|---|---|---|
| 87 | 87 | |
| 88 | 88 | timer_set( device->machine, attotime_zero, (void *) device, output, output_callback ); |
| 89 | 89 | |
| 90 | if (LOG) logerror("74123 %s: Output: %d\n", device->tag | |
| 90 | if (LOG) logerror("74123 %s: Output: %d\n", device->tag | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | |
| r7553 | r7554 | |
| 118 | 118 | { |
| 119 | 119 | timer_adjust_oneshot(chip->timer, duration, 0); |
| 120 | 120 | |
| 121 | if (LOG) logerror("74123 %s: Retriggering pulse. Duration: %f\n", device->tag | |
| 121 | if (LOG) logerror("74123 %s: Retriggering pulse. Duration: %f\n", device->tag | |
| 122 | 122 | } |
| 123 | 123 | else |
| 124 | 124 | { |
| 125 | if (LOG) logerror("74123 %s: Retriggering failed.\n", device->tag | |
| 125 | if (LOG) logerror("74123 %s: Retriggering failed.\n", device->tag | |
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | else |
| r7553 | r7554 | |
| 132 | 132 | |
| 133 | 133 | set_output(device); |
| 134 | 134 | |
| 135 | if (LOG) logerror("74123 %s: Starting pulse. Duration: %f\n", device->tag | |
| 135 | if (LOG) logerror("74123 %s: Starting pulse. Duration: %f\n", device->tag | |
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | |
| r7553 | r7554 | |
| 172 | 172 | { |
| 173 | 173 | timer_adjust_oneshot(chip->timer, attotime_zero, 0); |
| 174 | 174 | |
| 175 | if (LOG) logerror("74123 #%s: Cleared\n", device->tag | |
| 175 | if (LOG) logerror("74123 #%s: Cleared\n", device->tag | |
| 176 | 176 | } |
| 177 | 177 | chip->clear = data; |
| 178 | 178 | } |
| r7553 | r7554 | |
|---|---|---|
| 1801 | 1801 | |
| 1802 | 1802 | /* set MAME harddisk handle */ |
| 1803 | 1803 | config = (const ide_config *)device->baseconfig().inline_config; |
| 1804 | ide->handle = get_disk_handle(device->machine, (config->master != NULL) ? config->master : device->tag | |
| 1804 | ide->handle = get_disk_handle(device->machine, (config->master != NULL) ? config->master : device->tag | |
| 1805 | 1805 | ide->disk = hard_disk_open(ide->handle); |
| 1806 | 1806 | assert_always(config->slave == NULL, "IDE controller does not yet support slave drives\n"); |
| 1807 | 1807 |
| r7553 | r7554 | |
|---|---|---|
| 301 | 301 | |
| 302 | 302 | if (!p->logged_port_a_not_connected && (p->ddr_a != 0xff)) |
| 303 | 303 | { |
| 304 | logerror("PIA #%s: Warning! No port A read handler. Assuming pins 0x%02X not connected\n", device->tag | |
| 304 | logerror("PIA #%s: Warning! No port A read handler. Assuming pins 0x%02X not connected\n", device->tag | |
| 305 | 305 | p->logged_port_a_not_connected = TRUE; |
| 306 | 306 | } |
| 307 | 307 | } |
| r7553 | r7554 | |
| 345 | 345 | { |
| 346 | 346 | if (!p->logged_port_b_not_connected && (p->ddr_b != 0xff)) |
| 347 | 347 | { |
| 348 | logerror("PIA #%s: Error! No port B read handler. Three-state pins 0x%02X are undefined\n", device->tag | |
| 348 | logerror("PIA #%s: Error! No port B read handler. Three-state pins 0x%02X are undefined\n", device->tag | |
| 349 | 349 | p->logged_port_b_not_connected = TRUE; |
| 350 | 350 | } |
| 351 | 351 | |
| r7553 | r7554 | |
| 413 | 413 | else |
| 414 | 414 | { |
| 415 | 415 | if (p->out_ca2_needs_pulled) |
| 416 | logerror("PIA #%s: Warning! No port CA2 write handler. Previous value has been lost!\n", device->tag | |
| 416 | logerror("PIA #%s: Warning! No port CA2 write handler. Previous value has been lost!\n", device->tag | |
| 417 | 417 | |
| 418 | 418 | p->out_ca2_needs_pulled = TRUE; |
| 419 | 419 | } |
| r7553 | r7554 | |
| 442 | 442 | else |
| 443 | 443 | { |
| 444 | 444 | if (p->out_cb2_needs_pulled) |
| 445 | logerror("PIA #%s: Warning! No port CB2 write handler. Previous value has been lost!\n", device->tag | |
| 445 | logerror("PIA #%s: Warning! No port CB2 write handler. Previous value has been lost!\n", device->tag | |
| 446 | 446 | |
| 447 | 447 | p->out_cb2_needs_pulled = TRUE; |
| 448 | 448 | } |
| r7553 | r7554 | |
| 476 | 476 | set_out_ca2(device, TRUE); |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | LOG(("PIA #%s: port A read = %02X\n", device->tag | |
| 479 | LOG(("PIA #%s: port A read = %02X\n", device->tag | |
| 480 | 480 | |
| 481 | 481 | return ret; |
| 482 | 482 | } |
| r7553 | r7554 | |
| 492 | 492 | |
| 493 | 493 | UINT8 ret = p->ddr_a; |
| 494 | 494 | |
| 495 | LOG(("PIA #%s: DDR A read = %02X\n", device->tag | |
| 495 | LOG(("PIA #%s: DDR A read = %02X\n", device->tag | |
| 496 | 496 | |
| 497 | 497 | return ret; |
| 498 | 498 | } |
| r7553 | r7554 | |
| 520 | 520 | p->irq_b2 = FALSE; |
| 521 | 521 | update_interrupts(device); |
| 522 | 522 | |
| 523 | LOG(("PIA #%s: port B read = %02X\n", device->tag | |
| 523 | LOG(("PIA #%s: port B read = %02X\n", device->tag | |
| 524 | 524 | |
| 525 | 525 | return ret; |
| 526 | 526 | } |
| r7553 | r7554 | |
| 536 | 536 | |
| 537 | 537 | UINT8 ret = p->ddr_b; |
| 538 | 538 | |
| 539 | LOG(("PIA #%s: DDR B read = %02X\n", device->tag | |
| 539 | LOG(("PIA #%s: DDR B read = %02X\n", device->tag | |
| 540 | 540 | |
| 541 | 541 | return ret; |
| 542 | 542 | } |
| r7553 | r7554 | |
| 556 | 556 | pia6821_ca1_w(device, 0, devcb_call_read_line(&p->in_ca1_func)); |
| 557 | 557 | else if (!p->logged_ca1_not_connected && (!p->in_ca1_pushed)) |
| 558 | 558 | { |
| 559 | logerror("PIA #%s: Warning! No CA1 read handler. Assuming pin not connected\n", device->tag | |
| 559 | logerror("PIA #%s: Warning! No CA1 read handler. Assuming pin not connected\n", device->tag | |
| 560 | 560 | p->logged_ca1_not_connected = TRUE; |
| 561 | 561 | } |
| 562 | 562 | |
| r7553 | r7554 | |
| 564 | 564 | pia6821_ca2_w(device, 0, devcb_call_read_line(&p->in_ca2_func)); |
| 565 | 565 | else if ( !p->logged_ca2_not_connected && C2_INPUT(p->ctl_a) && !p->in_ca2_pushed) |
| 566 | 566 | { |
| 567 | logerror("PIA #%s: Warning! No CA2 read handler. Assuming pin not connected\n", device->tag | |
| 567 | logerror("PIA #%s: Warning! No CA2 read handler. Assuming pin not connected\n", device->tag | |
| 568 | 568 | p->logged_ca2_not_connected = TRUE; |
| 569 | 569 | } |
| 570 | 570 | |
| r7553 | r7554 | |
| 578 | 578 | if (p->irq_a2 && C2_INPUT(p->ctl_a)) |
| 579 | 579 | ret |= PIA_IRQ2; |
| 580 | 580 | |
| 581 | LOG(("PIA #%s: control A read = %02X\n", device->tag | |
| 581 | LOG(("PIA #%s: control A read = %02X\n", device->tag | |
| 582 | 582 | |
| 583 | 583 | return ret; |
| 584 | 584 | } |
| r7553 | r7554 | |
| 598 | 598 | pia6821_cb1_w(device, 0, devcb_call_read_line(&p->in_cb1_func)); |
| 599 | 599 | else if (!p->logged_cb1_not_connected && !p->in_cb1_pushed) |
| 600 | 600 | { |
| 601 | logerror("PIA #%s: Error! no CB1 read handler. Three-state pin is undefined\n", device->tag | |
| 601 | logerror("PIA #%s: Error! no CB1 read handler. Three-state pin is undefined\n", device->tag | |
| 602 | 602 | p->logged_cb1_not_connected = TRUE; |
| 603 | 603 | } |
| 604 | 604 | |
| r7553 | r7554 | |
| 606 | 606 | pia6821_cb2_w(device, 0, devcb_call_read_line(&p->in_cb2_func)); |
| 607 | 607 | else if (!p->logged_cb2_not_connected && C2_INPUT(p->ctl_b) && !p->in_cb2_pushed) |
| 608 | 608 | { |
| 609 | logerror("PIA #%s: Error! No CB2 read handler. Three-state pin is undefined\n", device->tag | |
| 609 | logerror("PIA #%s: Error! No CB2 read handler. Three-state pin is undefined\n", device->tag | |
| 610 | 610 | p->logged_cb2_not_connected = TRUE; |
| 611 | 611 | } |
| 612 | 612 | |
| r7553 | r7554 | |
| 620 | 620 | if (p->irq_b2 && C2_INPUT(p->ctl_b)) |
| 621 | 621 | ret |= PIA_IRQ2; |
| 622 | 622 | |
| 623 | LOG(("PIA #%s: control B read = %02X\n", device->tag | |
| 623 | LOG(("PIA #%s: control B read = %02X\n", device->tag | |
| 624 | 624 | |
| 625 | 625 | return ret; |
| 626 | 626 | } |
| r7553 | r7554 | |
| 697 | 697 | /* input pins are pulled high */ |
| 698 | 698 | UINT8 data = get_out_a_value(device); |
| 699 | 699 | |
| 700 | LOG(("PIA #%s: %s = %02X\n", device->tag | |
| 700 | LOG(("PIA #%s: %s = %02X\n", device->tag | |
| 701 | 701 | |
| 702 | 702 | if (p->out_a_func.write != NULL) |
| 703 | 703 | devcb_call_write8(&p->out_a_func, 0, data); |
| 704 | 704 | else |
| 705 | 705 | { |
| 706 | 706 | if (p->out_a_needs_pulled) |
| 707 | logerror("PIA #%s: Warning! No port A write handler. Previous value has been lost!\n", device->tag | |
| 707 | logerror("PIA #%s: Warning! No port A write handler. Previous value has been lost!\n", device->tag | |
| 708 | 708 | |
| 709 | 709 | p->out_a_needs_pulled = TRUE; |
| 710 | 710 | } |
| r7553 | r7554 | |
| 722 | 722 | /* input pins are high-impedance - we just send them as zeros for backwards compatibility */ |
| 723 | 723 | UINT8 data = get_out_b_value(device); |
| 724 | 724 | |
| 725 | LOG(("PIA #%s: %s = %02X\n", device->tag | |
| 725 | LOG(("PIA #%s: %s = %02X\n", device->tag | |
| 726 | 726 | |
| 727 | 727 | if (p->out_b_func.write != NULL) |
| 728 | 728 | devcb_call_write8(&p->out_b_func, 0, data); |
| 729 | 729 | else |
| 730 | 730 | { |
| 731 | 731 | if (p->out_b_needs_pulled) |
| 732 | logerror("PIA #%s: Warning! No port B write handler. Previous value has been lost!\n", device->tag | |
| 732 | logerror("PIA #%s: Warning! No port B write handler. Previous value has been lost!\n", device->tag | |
| 733 | 733 | |
| 734 | 734 | p->out_b_needs_pulled = TRUE; |
| 735 | 735 | } |
| r7553 | r7554 | |
| 760 | 760 | pia6821_state *p = get_token(device); |
| 761 | 761 | |
| 762 | 762 | if (data == 0x00) |
| 763 | LOG(("PIA #%s: DDR A write = %02X (input mode)\n", device->tag | |
| 763 | LOG(("PIA #%s: DDR A write = %02X (input mode)\n", device->tag | |
| 764 | 764 | else if (data == 0xff) |
| 765 | LOG(("PIA #%s: DDR A write = %02X (output mode)\n", device->tag | |
| 765 | LOG(("PIA #%s: DDR A write = %02X (output mode)\n", device->tag | |
| 766 | 766 | else |
| 767 | LOG(("PIA #%s: DDR A write = %02X (mixed mode)\n", device->tag | |
| 767 | LOG(("PIA #%s: DDR A write = %02X (mixed mode)\n", device->tag | |
| 768 | 768 | |
| 769 | 769 | if (p->ddr_a != data) |
| 770 | 770 | { |
| r7553 | r7554 | |
| 811 | 811 | pia6821_state *p = get_token(device); |
| 812 | 812 | |
| 813 | 813 | if (data == 0x00) |
| 814 | LOG(("PIA #%s: DDR B write = %02X (input mode)\n", device->tag | |
| 814 | LOG(("PIA #%s: DDR B write = %02X (input mode)\n", device->tag | |
| 815 | 815 | else if (data == 0xff) |
| 816 | LOG(("PIA #%s: DDR B write = %02X (output mode)\n", device->tag | |
| 816 | LOG(("PIA #%s: DDR B write = %02X (output mode)\n", device->tag | |
| 817 | 817 | else |
| 818 | LOG(("PIA #%s: DDR B write = %02X (mixed mode)\n", device->tag | |
| 818 | LOG(("PIA #%s: DDR B write = %02X (mixed mode)\n", device->tag | |
| 819 | 819 | |
| 820 | 820 | if (p->ddr_b != data) |
| 821 | 821 | { |
| r7553 | r7554 | |
| 838 | 838 | /* bit 7 and 6 are read only */ |
| 839 | 839 | data &= 0x3f; |
| 840 | 840 | |
| 841 | LOG(("PIA #%s: control A write = %02X\n", device->tag | |
| 841 | LOG(("PIA #%s: control A write = %02X\n", device->tag | |
| 842 | 842 | |
| 843 | 843 | /* update the control register */ |
| 844 | 844 | p->ctl_a = data; |
| r7553 | r7554 | |
| 875 | 875 | /* bit 7 and 6 are read only */ |
| 876 | 876 | data &= 0x3f; |
| 877 | 877 | |
| 878 | LOG(("PIA #%s: control B write = %02X\n", device->tag | |
| 878 | LOG(("PIA #%s: control B write = %02X\n", device->tag | |
| 879 | 879 | |
| 880 | 880 | /* update the control register */ |
| 881 | 881 | p->ctl_b = data; |
| r7553 | r7554 | |
| 974 | 974 | |
| 975 | 975 | assert_always(p->in_a_func.read == NULL, "pia6821_porta_w() called when in_a_func implemented"); |
| 976 | 976 | |
| 977 | LOG(("PIA #%s: set input port A = %02X\n", device->tag | |
| 977 | LOG(("PIA #%s: set input port A = %02X\n", device->tag | |
| 978 | 978 | |
| 979 | 979 | p->in_a = data; |
| 980 | 980 | p->port_a_z_mask = z_mask; |
| r7553 | r7554 | |
| 1029 | 1029 | /* limit the data to 0 or 1 */ |
| 1030 | 1030 | data = data ? TRUE : FALSE; |
| 1031 | 1031 | |
| 1032 | LOG(("PIA #%s: set input CA1 = %d\n", device->tag | |
| 1032 | LOG(("PIA #%s: set input CA1 = %d\n", device->tag | |
| 1033 | 1033 | |
| 1034 | 1034 | /* the new state has caused a transition */ |
| 1035 | 1035 | if ((p->in_ca1 != data) && |
| 1036 | 1036 | ((data && C1_LOW_TO_HIGH(p->ctl_a)) || (!data && C1_HIGH_TO_LOW(p->ctl_a)))) |
| 1037 | 1037 | { |
| 1038 | LOG(("PIA #%s: CA1 triggering\n", device->tag | |
| 1038 | LOG(("PIA #%s: CA1 triggering\n", device->tag | |
| 1039 | 1039 | |
| 1040 | 1040 | /* mark the IRQ */ |
| 1041 | 1041 | p->irq_a1 = TRUE; |
| r7553 | r7554 | |
| 1077 | 1077 | /* limit the data to 0 or 1 */ |
| 1078 | 1078 | data = data ? 1 : 0; |
| 1079 | 1079 | |
| 1080 | LOG(("PIA #%s: set input CA2 = %d\n", device->tag | |
| 1080 | LOG(("PIA #%s: set input CA2 = %d\n", device->tag | |
| 1081 | 1081 | |
| 1082 | 1082 | /* if input mode and the new state has caused a transition */ |
| 1083 | 1083 | if (C2_INPUT(p->ctl_a) && |
| 1084 | 1084 | (p->in_ca2 != data) && |
| 1085 | 1085 | ((data && C2_LOW_TO_HIGH(p->ctl_a)) || (!data && C2_HIGH_TO_LOW(p->ctl_a)))) |
| 1086 | 1086 | { |
| 1087 | LOG(("PIA #%s: CA2 triggering\n", device->tag | |
| 1087 | LOG(("PIA #%s: CA2 triggering\n", device->tag | |
| 1088 | 1088 | |
| 1089 | 1089 | /* mark the IRQ */ |
| 1090 | 1090 | p->irq_a2 = TRUE; |
| r7553 | r7554 | |
| 1154 | 1154 | |
| 1155 | 1155 | assert_always(p->in_b_func.read == NULL, "pia_set_input_b() called when in_b_func implemented"); |
| 1156 | 1156 | |
| 1157 | LOG(("PIA #%s: set input port B = %02X\n", device->tag | |
| 1157 | LOG(("PIA #%s: set input port B = %02X\n", device->tag | |
| 1158 | 1158 | |
| 1159 | 1159 | p->in_b = data; |
| 1160 | 1160 | p->in_b_pushed = TRUE; |
| r7553 | r7554 | |
| 1198 | 1198 | /* limit the data to 0 or 1 */ |
| 1199 | 1199 | data = data ? 1 : 0; |
| 1200 | 1200 | |
| 1201 | LOG(("PIA #%s: set input CB1 = %d\n", device->tag | |
| 1201 | LOG(("PIA #%s: set input CB1 = %d\n", device->tag | |
| 1202 | 1202 | |
| 1203 | 1203 | /* the new state has caused a transition */ |
| 1204 | 1204 | if ((p->in_cb1 != data) && |
| 1205 | 1205 | ((data && C1_LOW_TO_HIGH(p->ctl_b)) || (!data && C1_HIGH_TO_LOW(p->ctl_b)))) |
| 1206 | 1206 | { |
| 1207 | LOG(("PIA #%s: CB1 triggering\n", device->tag | |
| 1207 | LOG(("PIA #%s: CB1 triggering\n", device->tag | |
| 1208 | 1208 | |
| 1209 | 1209 | /* mark the IRQ */ |
| 1210 | 1210 | p->irq_b1 = 1; |
| r7553 | r7554 | |
| 1247 | 1247 | /* limit the data to 0 or 1 */ |
| 1248 | 1248 | data = data ? 1 : 0; |
| 1249 | 1249 | |
| 1250 | LOG(("PIA #%s: set input CB2 = %d\n", device->tag | |
| 1250 | LOG(("PIA #%s: set input CB2 = %d\n", device->tag | |
| 1251 | 1251 | |
| 1252 | 1252 | /* if input mode and the new state has caused a transition */ |
| 1253 | 1253 | if (C2_INPUT(p->ctl_b) && |
| 1254 | 1254 | (p->in_cb2 != data) && |
| 1255 | 1255 | ((data && C2_LOW_TO_HIGH(p->ctl_b)) || (!data && C2_HIGH_TO_LOW(p->ctl_b)))) |
| 1256 | 1256 | { |
| 1257 | LOG(("PIA #%s: CB2 triggering\n", device->tag | |
| 1257 | LOG(("PIA #%s: CB2 triggering\n", device->tag | |
| 1258 | 1258 | |
| 1259 | 1259 | /* mark the IRQ */ |
| 1260 | 1260 | p->irq_b2 = 1; |
| r7553 | r7554 | |
|---|---|---|
| 462 | 462 | |
| 463 | 463 | offset &= 0xf; |
| 464 | 464 | |
| 465 | LOG(( "Reading 68681 (%s) reg %x (%s) ", device->tag | |
| 465 | LOG(( "Reading 68681 (%s) reg %x (%s) ", device->tag | |
| 466 | 466 | |
| 467 | 467 | switch (offset) |
| 468 | 468 | { |
| r7553 | r7554 | |
| 582 | 582 | duart68681_state* duart68681 = get_safe_token(device); |
| 583 | 583 | |
| 584 | 584 | offset &= 0x0f; |
| 585 | LOG(( "Writing 68681 (%s) reg %x (%s) with %04x\n", device->tag | |
| 585 | LOG(( "Writing 68681 (%s) reg %x (%s) with %04x\n", device->tag | |
| 586 | 586 | |
| 587 | 587 | switch(offset) |
| 588 | 588 | { |
| r7553 | r7554 | |
| 605 | 605 | switch ((data >> 4) & 0x07) |
| 606 | 606 | { |
| 607 | 607 | case 0: case 1: case 2: case 4: case 5: // TODO: handle these cases! |
| 608 | logerror( "68681 (%s): Unhandled timer/counter mode %d\n", device->tag | |
| 608 | logerror( "68681 (%s): Unhandled timer/counter mode %d\n", device->tag | |
| 609 | 609 | break; |
| 610 | 610 | case 3: case 6: case 7: |
| 611 | 611 | break; |
| r7553 | r7554 | |
| 641 | 641 | break; |
| 642 | 642 | case 0x0d: /* OPCR */ |
| 643 | 643 | if (data != 0x00) |
| 644 | logerror( "68681 (%s): Unhandled OPCR value: %02x\n", device->tag | |
| 644 | logerror( "68681 (%s): Unhandled OPCR value: %02x\n", device->tag | |
| 645 | 645 | duart68681->OPCR = data; |
| 646 | 646 | break; |
| 647 | 647 | case 0x0e: /* Set Output Port Bits */ |
| r7553 | r7554 | |
|---|---|---|
| 262 | 262 | if (port->out_func.write != NULL) |
| 263 | 263 | devcb_call_write8(&port->out_func, 0, data); |
| 264 | 264 | else |
| 265 | logerror("%s:6532RIOT chip %s: Port %c is being written to but has no handler. %02X\n", cpuexec_describe_context(device->machine), device->tag | |
| 265 | logerror("%s:6532RIOT chip %s: Port %c is being written to but has no handler. %02X\n", cpuexec_describe_context(device->machine), device->tag | |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | /* writes to port A need to update the PA7 state */ |
| r7553 | r7554 | |
| 331 | 331 | update_pa7_state(device); |
| 332 | 332 | } |
| 333 | 333 | else |
| 334 | logerror("%s:6532RIOT chip %s: Port %c is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 334 | logerror("%s:6532RIOT chip %s: Port %c is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 335 | 335 | |
| 336 | 336 | /* apply the DDR to the result */ |
| 337 | 337 | val = apply_ddr(port); |
| r7553 | r7554 | |
| 429 | 429 | |
| 430 | 430 | /* validate arguments */ |
| 431 | 431 | assert(device != NULL); |
| 432 | assert(strlen(device->tag) < 20); | |
| 433 | 432 | |
| 434 | 433 | /* set static values */ |
| 435 | 434 | riot->device = device; |
| 436 | 435 | riot->intf = (riot6532_interface *)device->baseconfig().static_config; |
| 437 | riot->index = device->machine->devicelist.index(RIOT6532, device->tag); | |
| 436 | riot->index = device->machine->devicelist.index(RIOT6532, device->tag()); | |
| 438 | 437 | |
| 439 | 438 | /* configure the ports */ |
| 440 | 439 | devcb_resolve_read8(&riot->port[0].in_func, &riot->intf->in_a_func, device); |
| r7553 | r7554 | |
|---|---|---|
| 306 | 306 | |
| 307 | 307 | v->ifr |= data; |
| 308 | 308 | if (TRACE_VIA) |
| 309 | logerror("%s:6522VIA chip %s: IFR = %02X\n", cpuexec_describe_context(device->machine), device->tag | |
| 309 | logerror("%s:6522VIA chip %s: IFR = %02X\n", cpuexec_describe_context(device->machine), device->tag | |
| 310 | 310 | |
| 311 | 311 | if (v->ier & v->ifr) |
| 312 | 312 | { |
| r7553 | r7554 | |
| 327 | 327 | v->ifr = (v->ifr & ~data) & 0x7f; |
| 328 | 328 | |
| 329 | 329 | if (TRACE_VIA) |
| 330 | logerror("%s:6522VIA chip %s: IFR = %02X\n", cpuexec_describe_context(device->machine), device->tag | |
| 330 | logerror("%s:6522VIA chip %s: IFR = %02X\n", cpuexec_describe_context(device->machine), device->tag | |
| 331 | 331 | |
| 332 | 332 | if (v->ifr & v->ier) |
| 333 | 333 | v->ifr |= INT_ANY; |
| r7553 | r7554 | |
| 523 | 523 | if (v->in_b_func.read != NULL) |
| 524 | 524 | v->in_b = devcb_call_read8(&v->in_b_func, 0); |
| 525 | 525 | else |
| 526 | logerror("%s:6522VIA chip %s: Port B is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 526 | logerror("%s:6522VIA chip %s: Port B is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 527 | 527 | } |
| 528 | 528 | } |
| 529 | 529 | |
| r7553 | r7554 | |
| 545 | 545 | if (v->in_a_func.read != NULL) |
| 546 | 546 | v->in_a = devcb_call_read8(&v->in_a_func, 0); |
| 547 | 547 | else |
| 548 | logerror("%s:6522VIA chip %s: Port A is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 548 | logerror("%s:6522VIA chip %s: Port A is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 549 | 549 | } |
| 550 | 550 | } |
| 551 | 551 | |
| r7553 | r7554 | |
| 577 | 577 | if (v->in_a_func.read != NULL) |
| 578 | 578 | v->in_a = devcb_call_read8(&v->in_a_func, 0); |
| 579 | 579 | else |
| 580 | logerror("%s:6522VIA chip %s: Port A is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 580 | logerror("%s:6522VIA chip %s: Port A is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 581 | 581 | } |
| 582 | 582 | |
| 583 | 583 | /* combine input and output values */ |
| r7553 | r7554 | |
| 845 | 845 | v->pcr = data; |
| 846 | 846 | |
| 847 | 847 | if (TRACE_VIA) |
| 848 | logerror("%s:6522VIA chip %s: PCR = %02X\n", cpuexec_describe_context(device->machine), device->tag | |
| 848 | logerror("%s:6522VIA chip %s: PCR = %02X\n", cpuexec_describe_context(device->machine), device->tag | |
| 849 | 849 | |
| 850 | 850 | if (CA2_FIX_OUTPUT(data) && CA2_OUTPUT_LEVEL(data) ^ v->out_ca2) |
| 851 | 851 | { |
| r7553 | r7554 | |
| 957 | 957 | if (state != v->in_ca1) |
| 958 | 958 | { |
| 959 | 959 | if (TRACE_VIA) |
| 960 | logerror("%s:6522VIA chip %s: CA1 = %02X\n", cpuexec_describe_context(device->machine), device->tag | |
| 960 | logerror("%s:6522VIA chip %s: CA1 = %02X\n", cpuexec_describe_context(device->machine), device->tag | |
| 961 | 961 | |
| 962 | 962 | if ((CA1_LOW_TO_HIGH(v->pcr) && state) || (CA1_HIGH_TO_LOW(v->pcr) && !state)) |
| 963 | 963 | { |
| r7553 | r7554 | |
| 966 | 966 | if (v->in_a_func.read != NULL) |
| 967 | 967 | v->in_a = devcb_call_read8(&v->in_a_func, 0); |
| 968 | 968 | else |
| 969 | logerror("%s:6522VIA chip %s: Port A is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 969 | logerror("%s:6522VIA chip %s: Port A is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 970 | 970 | } |
| 971 | 971 | |
| 972 | 972 | via_set_int (device, INT_CA1); |
| r7553 | r7554 | |
| 1090 | 1090 | if (v->in_b_func.read != NULL) |
| 1091 | 1091 | v->in_b = devcb_call_read8(&v->in_b_func, 0); |
| 1092 | 1092 | else |
| 1093 | logerror("%s:6522VIA chip %s: Port B is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 1093 | logerror("%s:6522VIA chip %s: Port B is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag | |
| 1094 | 1094 | } |
| 1095 | 1095 | if (SO_EXT_CONTROL(v->acr) || SI_EXT_CONTROL(v->acr)) |
| 1096 | 1096 | via_shift (device); |
| r7553 | r7554 | |
|---|---|---|
| 290 | 290 | /* If there's no timer, return the count */ |
| 291 | 291 | if (!ptm6840->enabled[counter]) |
| 292 | 292 | { |
| 293 | PLOG(("MC6840 #%s: read counter(%d): %d\n", device->tag | |
| 293 | PLOG(("MC6840 #%s: read counter(%d): %d\n", device->tag | |
| 294 | 294 | return ptm6840->counter[counter]; |
| 295 | 295 | } |
| 296 | 296 | |
| r7553 | r7554 | |
| 298 | 298 | if (ptm6840->control_reg[counter] & 0x02) |
| 299 | 299 | { |
| 300 | 300 | clock = ptm6840->internal_clock; |
| 301 | PLOG(("MC6840 #%s: %d internal clock freq %d \n", device->tag | |
| 301 | PLOG(("MC6840 #%s: %d internal clock freq %d \n", device->tag | |
| 302 | 302 | } |
| 303 | 303 | else |
| 304 | 304 | { |
| 305 | 305 | clock = ptm6840->external_clock[counter]; |
| 306 | PLOG(("MC6840 #%s: %d external clock freq %d \n", device->tag | |
| 306 | PLOG(("MC6840 #%s: %d external clock freq %d \n", device->tag | |
| 307 | 307 | } |
| 308 | 308 | /* See how many are left */ |
| 309 | 309 | remaining = attotime_to_double(attotime_mul(timer_timeleft(ptm6840->timer[counter]), clock)); |
| r7553 | r7554 | |
| 316 | 316 | int lsb = remaining % divisor; |
| 317 | 317 | remaining = (msb << 8) | lsb; |
| 318 | 318 | } |
| 319 | PLOG(("MC6840 #%s: read counter(%d): %d\n", device->tag | |
| 319 | PLOG(("MC6840 #%s: read counter(%d): %d\n", device->tag | |
| 320 | 320 | return remaining; |
| 321 | 321 | } |
| 322 | 322 | |
| r7553 | r7554 | |
| 338 | 338 | if (ptm6840->control_reg[idx] & 0x02) |
| 339 | 339 | { |
| 340 | 340 | clock = ptm6840->internal_clock; |
| 341 | PLOG(("MC6840 #%s: %d internal clock freq %d \n", device->tag | |
| 341 | PLOG(("MC6840 #%s: %d internal clock freq %d \n", device->tag | |
| 342 | 342 | } |
| 343 | 343 | else |
| 344 | 344 | { |
| 345 | 345 | clock = ptm6840->external_clock[idx]; |
| 346 | PLOG(("MC6840 #%s: %d external clock freq %d \n", device->tag | |
| 346 | PLOG(("MC6840 #%s: %d external clock freq %d \n", device->tag | |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | /* Determine the number of clock periods before we expire */ |
| r7553 | r7554 | |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | 365 | /* Set the timer */ |
| 366 | PLOG(("MC6840 #%s: reload_count(%d): clock = %d count = %d\n", device->tag | |
| 366 | PLOG(("MC6840 #%s: reload_count(%d): clock = %d count = %d\n", device->tag | |
| 367 | 367 | |
| 368 | 368 | duration = attotime_mul(ATTOTIME_IN_HZ(clock), count); |
| 369 | 369 | if (idx == 2) |
| 370 | 370 | duration = attotime_mul(duration, ptm6840->t3_divisor); |
| 371 | 371 | |
| 372 | PLOG(("MC6840 #%s: reload_count(%d): output = %lf\n", device->tag | |
| 372 | PLOG(("MC6840 #%s: reload_count(%d): output = %lf\n", device->tag | |
| 373 | 373 | |
| 374 | 374 | if (!(ptm6840->control_reg[idx] & 0x02)) |
| 375 | 375 | { |
| r7553 | r7554 | |
| 407 | 407 | |
| 408 | 408 | case PTM_6840_STATUS: |
| 409 | 409 | { |
| 410 | PLOG(("%s: MC6840 #%s: Status read = %04X\n", cpuexec_describe_context(device->machine), device->tag | |
| 410 | PLOG(("%s: MC6840 #%s: Status read = %04X\n", cpuexec_describe_context(device->machine), device->tag | |
| 411 | 411 | ptm6840->status_read_since_int |= ptm6840->status_reg & 0x07; |
| 412 | 412 | val = ptm6840->status_reg; |
| 413 | 413 | break; |
| r7553 | r7554 | |
| 429 | 429 | |
| 430 | 430 | ptm6840->lsb_buffer = result & 0xff; |
| 431 | 431 | |
| 432 | PLOG(("%s: MC6840 #%s: Counter %d read = %04X\n", cpuexec_describe_context(device->machine), device->tag | |
| 432 | PLOG(("%s: MC6840 #%s: Counter %d read = %04X\n", cpuexec_describe_context(device->machine), device->tag | |
| 433 | 433 | val = result >> 8; |
| 434 | 434 | break; |
| 435 | 435 | } |
| r7553 | r7554 | |
| 474 | 474 | ptm6840->mode[idx] = (data >> 3) & 0x07; |
| 475 | 475 | ptm6840->control_reg[idx] = data; |
| 476 | 476 | |
| 477 | PLOG(("MC6840 #%s : Control register %d selected\n", device->tag | |
| 477 | PLOG(("MC6840 #%s : Control register %d selected\n", device->tag | |
| 478 | 478 | PLOG(("operation mode = %s\n", opmode[ ptm6840->mode[idx] ])); |
| 479 | 479 | PLOG(("value = %04X\n", ptm6840->control_reg[idx])); |
| 480 | 480 | PLOG(("t3divisor = %d\n", ptm6840->t3_divisor)); |
| r7553 | r7554 | |
| 491 | 491 | /* Holding reset down */ |
| 492 | 492 | if (data & 0x01) |
| 493 | 493 | { |
| 494 | PLOG(("MC6840 #%s : Timer reset\n", device->tag | |
| 494 | PLOG(("MC6840 #%s : Timer reset\n", device->tag | |
| 495 | 495 | for (i = 0; i < 3; i++) |
| 496 | 496 | { |
| 497 | 497 | timer_enable(ptm6840->timer[i], FALSE); |
| r7553 | r7554 | |
| 519 | 519 | case PTM_6840_MSBBUF2: |
| 520 | 520 | case PTM_6840_MSBBUF3: |
| 521 | 521 | { |
| 522 | PLOG(("MC6840 #%s msbbuf%d = %02X\n", device->tag | |
| 522 | PLOG(("MC6840 #%s msbbuf%d = %02X\n", device->tag | |
| 523 | 523 | ptm6840->msb_buffer = data; |
| 524 | 524 | break; |
| 525 | 525 | } |
| r7553 | r7554 | |
| 539 | 539 | if (!(ptm6840->control_reg[idx] & 0x10)) |
| 540 | 540 | reload_count(device,idx); |
| 541 | 541 | |
| 542 | PLOG(("%s:MC6840 #%s: Counter %d latch = %04X\n", cpuexec_describe_context(device->machine), device->tag | |
| 542 | PLOG(("%s:MC6840 #%s: Counter %d latch = %04X\n", cpuexec_describe_context(device->machine), device->tag | |
| 543 | 543 | break; |
| 544 | 544 | } |
| 545 | 545 | } |
| r7553 | r7554 | |
| 553 | 553 | { |
| 554 | 554 | ptm6840_state *ptm6840 = get_safe_token(device); |
| 555 | 555 | |
| 556 | PLOG(("**ptm6840 %s t%d timeout**\n", device->tag | |
| 556 | PLOG(("**ptm6840 %s t%d timeout**\n", device->tag | |
| 557 | 557 | |
| 558 | 558 | if ( ptm6840->control_reg[idx] & 0x40 ) |
| 559 | 559 | { |
| r7553 | r7554 | |
| 568 | 568 | if ((ptm6840->mode[idx] == 0)||(ptm6840->mode[idx] == 2)) |
| 569 | 569 | { |
| 570 | 570 | ptm6840->output[idx] = ptm6840->output[idx] ? 0 : 1; |
| 571 | PLOG(("**ptm6840 %s t%d output %d **\n", device->tag | |
| 571 | PLOG(("**ptm6840 %s t%d output %d **\n", device->tag | |
| 572 | 572 | |
| 573 | 573 | if (ptm6840->out_func[idx].write != NULL) |
| 574 | 574 | devcb_call_write8(&ptm6840->out_func[idx], 0, ptm6840->output[idx]); |
| r7553 | r7554 | |
| 578 | 578 | if (!ptm6840->fired[idx]) |
| 579 | 579 | { |
| 580 | 580 | ptm6840->output[idx] = 1; |
| 581 | PLOG(("**ptm6840 %s t%d output %d **\n", device->tag | |
| 581 | PLOG(("**ptm6840 %s t%d output %d **\n", device->tag | |
| 582 | 582 | |
| 583 | 583 | if (ptm6840->out_func[idx].write != NULL) |
| 584 | 584 | devcb_call_write8(&ptm6840->out_func[idx], 0, ptm6840->output[idx]); |
| r7553 | r7554 | |
|---|---|---|
| 222 | 222 | |
| 223 | 223 | z80dma->status &= ~0x08; |
| 224 | 224 | |
| 225 | if (LOG) logerror("Z80DMA '%s' Interrupt Pending\n", device->tag | |
| 225 | if (LOG) logerror("Z80DMA '%s' Interrupt Pending\n", device->tag | |
| 226 | 226 | |
| 227 | 227 | interrupt_check(z80dma); |
| 228 | 228 | } |
| r7553 | r7554 | |
| 390 | 390 | if(TRANSFER_MODE(z80dma) == TM_TRANSFER) z80dma->status |= 0x10; // no match found |
| 391 | 391 | |
| 392 | 392 | z80dma_update_status(device); |
| 393 | if (LOG) logerror("Z80DMA '%s' End of Block\n", device->tag | |
| 393 | if (LOG) logerror("Z80DMA '%s' End of Block\n", device->tag | |
| 394 | 394 | |
| 395 | 395 | if (INT_ON_END_OF_BLOCK(z80dma)) |
| 396 | 396 | { |
| r7553 | r7554 | |
| 711 | 711 | state = Z80_DAISY_IEO; |
| 712 | 712 | } |
| 713 | 713 | |
| 714 | if (LOG) logerror("Z80DMA '%s' Interrupt State: %u\n", device->tag | |
| 714 | if (LOG) logerror("Z80DMA '%s' Interrupt State: %u\n", device->tag | |
| 715 | 715 | |
| 716 | 716 | return state; |
| 717 | 717 | } |
| r7553 | r7554 | |
| 726 | 726 | |
| 727 | 727 | if (z80dma->ip) |
| 728 | 728 | { |
| 729 | if (LOG) logerror("Z80DMA '%s' Interrupt Acknowledge\n", device->tag | |
| 729 | if (LOG) logerror("Z80DMA '%s' Interrupt Acknowledge\n", device->tag | |
| 730 | 730 | |
| 731 | 731 | /* clear interrupt pending flag */ |
| 732 | 732 | z80dma->ip = 0; |
| r7553 | r7554 | |
| 756 | 756 | |
| 757 | 757 | if (z80dma->ius) |
| 758 | 758 | { |
| 759 | if (LOG) logerror("Z80DMA '%s' Return from Interrupt\n", device->tag | |
| 759 | if (LOG) logerror("Z80DMA '%s' Return from Interrupt\n", device->tag | |
| 760 | 760 | |
| 761 | 761 | /* clear interrupt under service flag */ |
| 762 | 762 | z80dma->ius = 0; |
| r7553 | r7554 | |
|---|---|---|
| 80 | 80 | if (offset > 0x24) |
| 81 | 81 | { |
| 82 | 82 | if (VERBOSE) |
| 83 | logerror("%s: INS8154 '%s' Read from invalid offset %02x!\n", cpuexec_describe_context(device->machine), device->tag | |
| 83 | logerror("%s: INS8154 '%s' Read from invalid offset %02x!\n", cpuexec_describe_context(device->machine), device->tag | |
| 84 | 84 | return 0xff; |
| 85 | 85 | } |
| 86 | 86 | |
| r7553 | r7554 | |
| 146 | 146 | if (offset > 0x24) |
| 147 | 147 | { |
| 148 | 148 | if (VERBOSE) |
| 149 | logerror("%s: INS8154 '%s' Write %02x to invalid offset %02x!\n", cpuexec_describe_context(device->machine), device->tag | |
| 149 | logerror("%s: INS8154 '%s' Write %02x to invalid offset %02x!\n", cpuexec_describe_context(device->machine), device->tag | |
| 150 | 150 | return; |
| 151 | 151 | } |
| 152 | 152 | |
| r7553 | r7554 | |
| 162 | 162 | |
| 163 | 163 | case 0x22: |
| 164 | 164 | if (VERBOSE) |
| 165 | logerror("%s: INS8154 '%s' ODRA set to %02x\n", cpuexec_describe_context(device->machine), device->tag | |
| 165 | logerror("%s: INS8154 '%s' ODRA set to %02x\n", cpuexec_describe_context(device->machine), device->tag | |
| 166 | 166 | |
| 167 | 167 | ins8154->odra = data; |
| 168 | 168 | break; |
| 169 | 169 | |
| 170 | 170 | case 0x23: |
| 171 | 171 | if (VERBOSE) |
| 172 | logerror("%s: INS8154 '%s' ODRB set to %02x\n", cpuexec_describe_context(device->machine), device->tag | |
| 172 | logerror("%s: INS8154 '%s' ODRB set to %02x\n", cpuexec_describe_context(device->machine), device->tag | |
| 173 | 173 | |
| 174 | 174 | ins8154->odrb = data; |
| 175 | 175 | break; |
| 176 | 176 | |
| 177 | 177 | case 0x24: |
| 178 | 178 | if (VERBOSE) |
| 179 | logerror("%s: INS8154 '%s' MDR set to %02x\n", cpuexec_describe_context(device->machine), device->tag | |
| 179 | logerror("%s: INS8154 '%s' MDR set to %02x\n", cpuexec_describe_context(device->machine), device->tag | |
| 180 | 180 | |
| 181 | 181 | ins8154->mdr = data; |
| 182 | 182 | break; |
| r7553 | r7554 | |
| 232 | 232 | devcb_resolve_write_line(&ins8154->out_irq_func, &intf->out_irq_func, device); |
| 233 | 233 | |
| 234 | 234 | /* register for state saving */ |
| 235 | state_save_register_item(device->machine, "ins8154", device->tag, 0, ins8154->in_a); | |
| 236 | state_save_register_item(device->machine, "ins8154", device->tag, 0, ins8154->in_b); | |
| 237 | state_save_register_item(device->machine, "ins8154", device->tag, 0, ins8154->out_a); | |
| 238 | state_save_register_item(device->machine, "ins8154", device->tag, 0, ins8154->out_b); | |
| 239 | state_save_register_item(device->machine, "ins8154", device->tag, 0, ins8154->mdr); | |
| 240 | state_save_register_item(device->machine, "ins8154", device->tag, 0, ins8154->odra); | |
| 241 | state_save_register_item(device->machine, "ins8154", device->tag, 0, ins8154->odrb); | |
| 235 | state_save_register_device_item(device, 0, ins8154->in_a); | |
| 236 | state_save_register_device_item(device, 0, ins8154->in_b); | |
| 237 | state_save_register_device_item(device, 0, ins8154->out_a); | |
| 238 | state_save_register_device_item(device, 0, ins8154->out_b); | |
| 239 | state_save_register_device_item(device, 0, ins8154->mdr); | |
| 240 | state_save_register_device_item(device, 0, ins8154->odra); | |
| 241 | state_save_register_device_item(device, 0, ins8154->odrb); | |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | static DEVICE_RESET( ins8154 ) |
| r7553 | r7554 | |
|---|---|---|
| 129 | 129 | { |
| 130 | 130 | /* trigger interrupt */ |
| 131 | 131 | port->ip = 1; |
| 132 | if (LOG) logerror("Z80PIO '%s' Port %c Interrupt Pending\n", device->tag | |
| 132 | if (LOG) logerror("Z80PIO '%s' Port %c Interrupt Pending\n", device->tag | |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | port->match = match; |
| r7553 | r7554 | |
| 150 | 150 | pio_port *port = &z80pio->port[index]; |
| 151 | 151 | |
| 152 | 152 | port->ip = 1; |
| 153 | if (LOG) logerror("Z80PIO '%s' Port %c Interrupt Pending\n", device->tag | |
| 153 | if (LOG) logerror("Z80PIO '%s' Port %c Interrupt Pending\n", device->tag | |
| 154 | 154 | |
| 155 | 155 | check_interrupts(device); |
| 156 | 156 | } |
| r7553 | r7554 | |
| 162 | 162 | |
| 163 | 163 | if (port->rdy == state) return; |
| 164 | 164 | |
| 165 | if (LOG) logerror("Z80PIO '%s' Port %c Ready: %u\n", device->tag | |
| 165 | if (LOG) logerror("Z80PIO '%s' Port %c Ready: %u\n", device->tag | |
| 166 | 166 | |
| 167 | 167 | port->rdy = state; |
| 168 | 168 | devcb_call_write_line(&port->out_rdy_func, state); |
| r7553 | r7554 | |
| 188 | 188 | z80pio_t *z80pio = get_safe_token(device); |
| 189 | 189 | pio_port *port = &z80pio->port[index]; |
| 190 | 190 | |
| 191 | if (LOG) logerror("Z80PIO '%s' Port %c Mode: %u\n", device->tag | |
| 191 | if (LOG) logerror("Z80PIO '%s' Port %c Mode: %u\n", device->tag | |
| 192 | 192 | |
| 193 | 193 | switch (mode) |
| 194 | 194 | { |
| r7553 | r7554 | |
| 211 | 211 | case MODE_BIDIRECTIONAL: |
| 212 | 212 | if (index == PORT_B) |
| 213 | 213 | { |
| 214 | logerror("Z80PIO '%s' Port %c Invalid Mode: %u!\n", device->tag | |
| 214 | logerror("Z80PIO '%s' Port %c Invalid Mode: %u!\n", device->tag | |
| 215 | 215 | } |
| 216 | 216 | else |
| 217 | 217 | { |
| r7553 | r7554 | |
| 260 | 260 | { |
| 261 | 261 | /* load interrupt vector */ |
| 262 | 262 | port->vector = data; |
| 263 | if (LOG) logerror("Z80PIO '%s' Port %c Interrupt Vector: %02x\n", device->tag | |
| 263 | if (LOG) logerror("Z80PIO '%s' Port %c Interrupt Vector: %02x\n", device->tag | |
| 264 | 264 | |
| 265 | 265 | /* set interrupt enable */ |
| 266 | 266 | port->icw |= ICW_ENABLE_INT; |
| r7553 | r7554 | |
| 280 | 280 | |
| 281 | 281 | if (LOG) |
| 282 | 282 | { |
| 283 | logerror("Z80PIO '%s' Port %c Interrupt Enable: %u\n", device->tag.cstr(), 'A' + index, BIT(data, 7)); | |
| 284 | logerror("Z80PIO '%s' Port %c Logic: %s\n", device->tag.cstr(), 'A' + index, BIT(data, 6) ? "AND" : "OR"); | |
| 285 | logerror("Z80PIO '%s' Port %c Active %s\n", device->tag.cstr(), 'A' + index, BIT(data, 5) ? "High" : "Low"); | |
| 286 | logerror("Z80PIO '%s' Port %c Mask Follows: %u\n", device->tag.cstr(), 'A' + index, BIT(data, 4)); | |
| 283 | logerror("Z80PIO '%s' Port %c Interrupt Enable: %u\n", device->tag(), 'A' + index, BIT(data, 7)); | |
| 284 | logerror("Z80PIO '%s' Port %c Logic: %s\n", device->tag(), 'A' + index, BIT(data, 6) ? "AND" : "OR"); | |
| 285 | logerror("Z80PIO '%s' Port %c Active %s\n", device->tag(), 'A' + index, BIT(data, 5) ? "High" : "Low"); | |
| 286 | logerror("Z80PIO '%s' Port %c Mask Follows: %u\n", device->tag(), 'A' + index, BIT(data, 4)); | |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | if (port->icw & ICW_MASK_FOLLOWS) |
| r7553 | r7554 | |
| 305 | 305 | |
| 306 | 306 | case 0x03: /* set interrupt enable flip-flop */ |
| 307 | 307 | port->icw = (data & 0x80) | (port->icw & 0x7f); |
| 308 | if (LOG) logerror("Z80PIO '%s' Port %c Interrupt Enable: %u\n", device->tag | |
| 308 | if (LOG) logerror("Z80PIO '%s' Port %c Interrupt Enable: %u\n", device->tag | |
| 309 | 309 | |
| 310 | 310 | /* set interrupt enable */ |
| 311 | 311 | port->ie = BIT(port->icw, 7); |
| r7553 | r7554 | |
| 313 | 313 | break; |
| 314 | 314 | |
| 315 | 315 | default: |
| 316 | logerror("Z80PIO '%s' Port %c Invalid Control Word: %02x!\n", device->tag | |
| 316 | logerror("Z80PIO '%s' Port %c Invalid Control Word: %02x!\n", device->tag | |
| 317 | 317 | } |
| 318 | 318 | } |
| 319 | 319 | break; |
| 320 | 320 | |
| 321 | 321 | case IOR: /* data direction register */ |
| 322 | 322 | port->ior = data; |
| 323 | if (LOG) logerror("Z80PIO '%s' Port %c IOR: %02x\n", device->tag | |
| 323 | if (LOG) logerror("Z80PIO '%s' Port %c IOR: %02x\n", device->tag | |
| 324 | 324 | |
| 325 | 325 | /* set interrupt enable */ |
| 326 | 326 | port->ie = BIT(port->icw, 7); |
| r7553 | r7554 | |
| 332 | 332 | |
| 333 | 333 | case MASK: /* interrupt mask */ |
| 334 | 334 | port->mask = data; |
| 335 | if (LOG) logerror("Z80PIO '%s' Port %c Mask: %02x\n", device->tag | |
| 335 | if (LOG) logerror("Z80PIO '%s' Port %c Mask: %02x\n", device->tag | |
| 336 | 336 | |
| 337 | 337 | /* set interrupt enable */ |
| 338 | 338 | port->ie = BIT(port->icw, 7); |
| r7553 | r7554 | |
| 622 | 622 | z80pio_t *z80pio = get_safe_token(device); |
| 623 | 623 | pio_port *port = &z80pio->port[index]; |
| 624 | 624 | |
| 625 | if (LOG) logerror("Z80PIO '%s' Port %c Strobe: %u\n", device->tag | |
| 625 | if (LOG) logerror("Z80PIO '%s' Port %c Strobe: %u\n", device->tag | |
| 626 | 626 | |
| 627 | 627 | if (z80pio->port[PORT_A].mode == MODE_BIDIRECTIONAL) |
| 628 | 628 | { |
| r7553 | r7554 | |
| 763 | 763 | |
| 764 | 764 | if (port->ip) |
| 765 | 765 | { |
| 766 | if (LOG) logerror("Z80PIO '%s' Interrupt Acknowledge\n", device->tag | |
| 766 | if (LOG) logerror("Z80PIO '%s' Interrupt Acknowledge\n", device->tag | |
| 767 | 767 | |
| 768 | 768 | /* clear interrupt pending flag */ |
| 769 | 769 | port->ip = 0; |
| r7553 | r7554 | |
| 796 | 796 | |
| 797 | 797 | if (port->ius) |
| 798 | 798 | { |
| 799 | if (LOG) logerror("Z80PIO '%s' Return from Interrupt\n", device->tag | |
| 799 | if (LOG) logerror("Z80PIO '%s' Return from Interrupt\n", device->tag | |
| 800 | 800 | |
| 801 | 801 | /* clear interrupt under service flag */ |
| 802 | 802 | port->ius = 0; |
| r7553 | r7554 | |
|---|---|---|
| 117 | 117 | |
| 118 | 118 | if( adc083x->cs != state ) |
| 119 | 119 | { |
| 120 | verboselog( 2, device->machine, "adc083x_cs_write( %s, %d )\n", device->tag | |
| 120 | verboselog( 2, device->machine, "adc083x_cs_write( %s, %d )\n", device->tag | |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | if( adc083x->cs == 0 && state != 0 ) |
| r7553 | r7554 | |
| 235 | 235 | |
| 236 | 236 | if( adc083x->clk != state ) |
| 237 | 237 | { |
| 238 | verboselog( 2, device->machine, "adc083x_clk_write( %s, %d )\n", device->tag | |
| 238 | verboselog( 2, device->machine, "adc083x_clk_write( %s, %d )\n", device->tag | |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | if( adc083x->cs == 0 ) |
| r7553 | r7554 | |
| 247 | 247 | case STATE_WAIT_FOR_START: |
| 248 | 248 | if( adc083x->di != 0 ) |
| 249 | 249 | { |
| 250 | verboselog( 1, device->machine, "adc083x %s got start bit\n", device->tag | |
| 250 | verboselog( 1, device->machine, "adc083x %s got start bit\n", device->tag | |
| 251 | 251 | adc083x->state = STATE_SHIFT_MUX; |
| 252 | 252 | adc083x->sars = 0; |
| 253 | 253 | adc083x->sgl = 0; |
| r7553 | r7554 | |
| 258 | 258 | } |
| 259 | 259 | else |
| 260 | 260 | { |
| 261 | verboselog( 1, device->machine, "adc083x %s not start bit\n", device->tag | |
| 261 | verboselog( 1, device->machine, "adc083x %s not start bit\n", device->tag | |
| 262 | 262 | } |
| 263 | 263 | break; |
| 264 | 264 | |
| r7553 | r7554 | |
| 270 | 270 | { |
| 271 | 271 | adc083x->sgl = 1; |
| 272 | 272 | } |
| 273 | verboselog( 1, device->machine, "adc083x %s sgl <- %d\n", device->tag | |
| 273 | verboselog( 1, device->machine, "adc083x %s sgl <- %d\n", device->tag | |
| 274 | 274 | break; |
| 275 | 275 | |
| 276 | 276 | case 1: |
| r7553 | r7554 | |
| 278 | 278 | { |
| 279 | 279 | adc083x->odd = 1; |
| 280 | 280 | } |
| 281 | verboselog( 1, device->machine, "adc083x %s odd <- %d\n", device->tag | |
| 281 | verboselog( 1, device->machine, "adc083x %s odd <- %d\n", device->tag | |
| 282 | 282 | break; |
| 283 | 283 | |
| 284 | 284 | case 2: |
| r7553 | r7554 | |
| 286 | 286 | { |
| 287 | 287 | adc083x->sel1 = 1; |
| 288 | 288 | } |
| 289 | verboselog( 1, device->machine, "adc083x %s sel1 <- %d\n", device->tag | |
| 289 | verboselog( 1, device->machine, "adc083x %s sel1 <- %d\n", device->tag | |
| 290 | 290 | break; |
| 291 | 291 | |
| 292 | 292 | case 3: |
| r7553 | r7554 | |
| 294 | 294 | { |
| 295 | 295 | adc083x->sel0 = 1; |
| 296 | 296 | } |
| 297 | verboselog( 1, device->machine, "adc083x %s sel0 <- %d\n", device->tag | |
| 297 | verboselog( 1, device->machine, "adc083x %s sel0 <- %d\n", device->tag | |
| 298 | 298 | break; |
| 299 | 299 | } |
| 300 | 300 | |
| r7553 | r7554 | |
| 310 | 310 | adc083x->sars = 0; |
| 311 | 311 | if( device->type == ADC0838 && adc083x->se != 0 ) |
| 312 | 312 | { |
| 313 | verboselog( 1, device->machine, "adc083x %s not se\n", device->tag | |
| 313 | verboselog( 1, device->machine, "adc083x %s not se\n", device->tag | |
| 314 | 314 | } |
| 315 | 315 | else |
| 316 | 316 | { |
| 317 | verboselog( 1, device->machine, "adc083x %s got se\n", device->tag | |
| 317 | verboselog( 1, device->machine, "adc083x %s got se\n", device->tag | |
| 318 | 318 | adc083x->state = STATE_OUTPUT_LSB_FIRST; |
| 319 | 319 | adc083x->bit = 1; |
| 320 | 320 | } |
| r7553 | r7554 | |
| 327 | 327 | switch( adc083x->state ) |
| 328 | 328 | { |
| 329 | 329 | case STATE_MUX_SETTLE: |
| 330 | verboselog( 1, device->machine, "adc083x %s mux settle\n", device->tag | |
| 330 | verboselog( 1, device->machine, "adc083x %s mux settle\n", device->tag | |
| 331 | 331 | adc083x->output = adc083x_conversion( device ); |
| 332 | 332 | adc083x->state = STATE_OUTPUT_MSB_FIRST; |
| 333 | 333 | adc083x->bit = 7; |
| r7553 | r7554 | |
| 337 | 337 | |
| 338 | 338 | case STATE_OUTPUT_MSB_FIRST: |
| 339 | 339 | adc083x->_do = ( adc083x->output >> adc083x->bit ) & 1; |
| 340 | verboselog( 1, device->machine, "adc083x %s msb %d -> %d\n", device->tag | |
| 340 | verboselog( 1, device->machine, "adc083x %s msb %d -> %d\n", device->tag | |
| 341 | 341 | |
| 342 | 342 | adc083x->bit--; |
| 343 | 343 | if( adc083x->bit < 0 ) |
| r7553 | r7554 | |
| 355 | 355 | |
| 356 | 356 | case STATE_OUTPUT_LSB_FIRST: |
| 357 | 357 | adc083x->_do = ( adc083x->output >> adc083x->bit ) & 1; |
| 358 | verboselog( 1, device->machine, "adc083x %s lsb %d -> %d\n", device->tag | |
| 358 | verboselog( 1, device->machine, "adc083x %s lsb %d -> %d\n", device->tag | |
| 359 | 359 | |
| 360 | 360 | adc083x->bit++; |
| 361 | 361 | if( adc083x->bit == 8 ) |
| r7553 | r7554 | |
| 385 | 385 | |
| 386 | 386 | if( adc083x->di != state ) |
| 387 | 387 | { |
| 388 | verboselog( 2, device->machine, "adc083x_di_write( %s, %d )\n", device->tag | |
| 388 | verboselog( 2, device->machine, "adc083x_di_write( %s, %d )\n", device->tag | |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | adc083x->di = state; |
| r7553 | r7554 | |
| 401 | 401 | |
| 402 | 402 | if( adc083x->se != state ) |
| 403 | 403 | { |
| 404 | verboselog( 2, device->machine, "adc083x_se_write( %s, %d )\n", device->tag | |
| 404 | verboselog( 2, device->machine, "adc083x_se_write( %s, %d )\n", device->tag | |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | adc083x->se = state; |
| r7553 | r7554 | |
| 415 | 415 | { |
| 416 | 416 | adc0831_state *adc083x = get_safe_token( device ); |
| 417 | 417 | |
| 418 | verboselog( 1, device->machine, "adc083x_sars_read( %s ) %d\n", device->tag | |
| 418 | verboselog( 1, device->machine, "adc083x_sars_read( %s ) %d\n", device->tag | |
| 419 | 419 | return adc083x->sars; |
| 420 | 420 | } |
| 421 | 421 | |
| r7553 | r7554 | |
| 427 | 427 | { |
| 428 | 428 | adc0831_state *adc083x = get_safe_token( device ); |
| 429 | 429 | |
| 430 | verboselog( 1, device->machine, "adc083x_do_read( %s ) %d\n", device->tag | |
| 430 | verboselog( 1, device->machine, "adc083x_do_read( %s ) %d\n", device->tag | |
| 431 | 431 | return adc083x->_do; |
| 432 | 432 | } |
| 433 | 433 |
| r7553 | r7554 | |
|---|---|---|
| 336 | 336 | switch (z80sti->pvr & 0x07) |
| 337 | 337 | { |
| 338 | 338 | case Z80STI_REGISTER_IR_SCR: |
| 339 | LOG(("Z80STI '%s' Sync Character Register: %x\n", device->tag | |
| 339 | LOG(("Z80STI '%s' Sync Character Register: %x\n", device->tag | |
| 340 | 340 | z80sti->scr = data; |
| 341 | 341 | break; |
| 342 | 342 | |
| 343 | 343 | case Z80STI_REGISTER_IR_TDDR: |
| 344 | LOG(("Z80STI '%s' Timer D Data Register: %x\n", device->tag | |
| 344 | LOG(("Z80STI '%s' Timer D Data Register: %x\n", device->tag | |
| 345 | 345 | z80sti->tdr[TIMER_D] = data; |
| 346 | 346 | break; |
| 347 | 347 | |
| 348 | 348 | case Z80STI_REGISTER_IR_TCDR: |
| 349 | LOG(("Z80STI '%s' Timer C Data Register: %x\n", device->tag | |
| 349 | LOG(("Z80STI '%s' Timer C Data Register: %x\n", device->tag | |
| 350 | 350 | z80sti->tdr[TIMER_C] = data; |
| 351 | 351 | break; |
| 352 | 352 | |
| 353 | 353 | case Z80STI_REGISTER_IR_AER: |
| 354 | LOG(("Z80STI '%s' Active Edge Register: %x\n", device->tag | |
| 354 | LOG(("Z80STI '%s' Active Edge Register: %x\n", device->tag | |
| 355 | 355 | z80sti->aer = data; |
| 356 | 356 | break; |
| 357 | 357 | |
| 358 | 358 | case Z80STI_REGISTER_IR_IERB: |
| 359 | LOG(("Z80STI '%s' Interrupt Enable Register B: %x\n", device->tag | |
| 359 | LOG(("Z80STI '%s' Interrupt Enable Register B: %x\n", device->tag | |
| 360 | 360 | z80sti->ier = (z80sti->ier & 0xff00) | data; |
| 361 | 361 | check_interrupts(z80sti); |
| 362 | 362 | break; |
| 363 | 363 | |
| 364 | 364 | case Z80STI_REGISTER_IR_IERA: |
| 365 | LOG(("Z80STI '%s' Interrupt Enable Register A: %x\n", device->tag | |
| 365 | LOG(("Z80STI '%s' Interrupt Enable Register A: %x\n", device->tag | |
| 366 | 366 | z80sti->ier = (data << 8) | (z80sti->ier & 0xff); |
| 367 | 367 | check_interrupts(z80sti); |
| 368 | 368 | break; |
| 369 | 369 | |
| 370 | 370 | case Z80STI_REGISTER_IR_DDR: |
| 371 | LOG(("Z80STI '%s' Data Direction Register: %x\n", device->tag | |
| 371 | LOG(("Z80STI '%s' Data Direction Register: %x\n", device->tag | |
| 372 | 372 | z80sti->ddr = data; |
| 373 | 373 | break; |
| 374 | 374 | |
| r7553 | r7554 | |
| 379 | 379 | |
| 380 | 380 | z80sti->tcdc = data; |
| 381 | 381 | |
| 382 | LOG(("Z80STI '%s' Timer C Prescaler: %u\n", device->tag.cstr(), tcc)); | |
| 383 | LOG(("Z80STI '%s' Timer D Prescaler: %u\n", device->tag.cstr(), tdc)); | |
| 382 | LOG(("Z80STI '%s' Timer C Prescaler: %u\n", device->tag(), tcc)); | |
| 383 | LOG(("Z80STI '%s' Timer D Prescaler: %u\n", device->tag(), tdc)); | |
| 384 | 384 | |
| 385 | 385 | if (tcc) |
| 386 | 386 | timer_adjust_periodic(z80sti->timer[TIMER_C], ATTOTIME_IN_HZ(device->clock / tcc), 0, ATTOTIME_IN_HZ(device->clock / tcc)); |
| r7553 | r7554 | |
| 394 | 394 | |
| 395 | 395 | if (BIT(data, 7)) |
| 396 | 396 | { |
| 397 | LOG(("Z80STI '%s' Timer A Reset\n", device->tag | |
| 397 | LOG(("Z80STI '%s' Timer A Reset\n", device->tag | |
| 398 | 398 | z80sti->to[TIMER_A] = 0; |
| 399 | 399 | |
| 400 | 400 | devcb_call_write_line(&z80sti->out_tao_func, z80sti->to[TIMER_A]); |
| r7553 | r7554 | |
| 402 | 402 | |
| 403 | 403 | if (BIT(data, 3)) |
| 404 | 404 | { |
| 405 | LOG(("Z80STI '%s' Timer B Reset\n", device->tag | |
| 405 | LOG(("Z80STI '%s' Timer B Reset\n", device->tag | |
| 406 | 406 | z80sti->to[TIMER_B] = 0; |
| 407 | 407 | |
| 408 | 408 | devcb_call_write_line(&z80sti->out_tbo_func, z80sti->to[TIMER_B]); |
| r7553 | r7554 | |
| 413 | 413 | break; |
| 414 | 414 | |
| 415 | 415 | case Z80STI_REGISTER_GPIP: |
| 416 | LOG(("Z80STI '%s' General Purpose I/O Register: %x\n", device->tag | |
| 416 | LOG(("Z80STI '%s' General Purpose I/O Register: %x\n", device->tag | |
| 417 | 417 | z80sti->gpip = data & z80sti->ddr; |
| 418 | 418 | devcb_call_write8(&z80sti->out_gpio_func, 0, z80sti->gpip); |
| 419 | 419 | break; |
| r7553 | r7554 | |
| 421 | 421 | case Z80STI_REGISTER_IPRB: |
| 422 | 422 | { |
| 423 | 423 | int i; |
| 424 | LOG(("Z80STI '%s' Interrupt Pending Register B: %x\n", device->tag | |
| 424 | LOG(("Z80STI '%s' Interrupt Pending Register B: %x\n", device->tag | |
| 425 | 425 | z80sti->ipr &= (z80sti->ipr & 0xff00) | data; |
| 426 | 426 | |
| 427 | 427 | for (i = 0; i < 16; i++) |
| r7553 | r7554 | |
| 436 | 436 | case Z80STI_REGISTER_IPRA: |
| 437 | 437 | { |
| 438 | 438 | int i; |
| 439 | LOG(("Z80STI '%s' Interrupt Pending Register A: %x\n", device->tag | |
| 439 | LOG(("Z80STI '%s' Interrupt Pending Register A: %x\n", device->tag | |
| 440 | 440 | z80sti->ipr &= (data << 8) | (z80sti->ipr & 0xff); |
| 441 | 441 | |
| 442 | 442 | for (i = 0; i < 16; i++) |
| r7553 | r7554 | |
| 449 | 449 | break; |
| 450 | 450 | |
| 451 | 451 | case Z80STI_REGISTER_ISRB: |
| 452 | LOG(("Z80STI '%s' Interrupt In-Service Register B: %x\n", device->tag | |
| 452 | LOG(("Z80STI '%s' Interrupt In-Service Register B: %x\n", device->tag | |
| 453 | 453 | z80sti->isr &= (z80sti->isr & 0xff00) | data; |
| 454 | 454 | break; |
| 455 | 455 | |
| 456 | 456 | case Z80STI_REGISTER_ISRA: |
| 457 | LOG(("Z80STI '%s' Interrupt In-Service Register A: %x\n", device->tag | |
| 457 | LOG(("Z80STI '%s' Interrupt In-Service Register A: %x\n", device->tag | |
| 458 | 458 | z80sti->isr &= (data << 8) | (z80sti->isr & 0xff); |
| 459 | 459 | break; |
| 460 | 460 | |
| 461 | 461 | case Z80STI_REGISTER_IMRB: |
| 462 | LOG(("Z80STI '%s' Interrupt Mask Register B: %x\n", device->tag | |
| 462 | LOG(("Z80STI '%s' Interrupt Mask Register B: %x\n", device->tag | |
| 463 | 463 | z80sti->imr = (z80sti->imr & 0xff00) | data; |
| 464 | 464 | z80sti->isr &= z80sti->imr; |
| 465 | 465 | check_interrupts(z80sti); |
| 466 | 466 | break; |
| 467 | 467 | |
| 468 | 468 | case Z80STI_REGISTER_IMRA: |
| 469 | LOG(("Z80STI '%s' Interrupt Mask Register A: %x\n", device->tag | |
| 469 | LOG(("Z80STI '%s' Interrupt Mask Register A: %x\n", device->tag | |
| 470 | 470 | z80sti->imr = (data << 8) | (z80sti->imr & 0xff); |
| 471 | 471 | z80sti->isr &= z80sti->imr; |
| 472 | 472 | check_interrupts(z80sti); |
| 473 | 473 | break; |
| 474 | 474 | |
| 475 | 475 | case Z80STI_REGISTER_PVR: |
| 476 | LOG(("Z80STI '%s' Interrupt Vector: %02x\n", device->tag.cstr(), data & 0xe0)); | |
| 477 | LOG(("Z80STI '%s' IR Address: %01x\n", device->tag.cstr(), data & 0x07)); | |
| 476 | LOG(("Z80STI '%s' Interrupt Vector: %02x\n", device->tag(), data & 0xe0)); | |
| 477 | LOG(("Z80STI '%s' IR Address: %01x\n", device->tag(), data & 0x07)); | |
| 478 | 478 | z80sti->pvr = data; |
| 479 | 479 | break; |
| 480 | 480 | |
| r7553 | r7554 | |
| 485 | 485 | |
| 486 | 486 | z80sti->tabc = data; |
| 487 | 487 | |
| 488 | LOG(("Z80STI '%s' Timer A Prescaler: %u\n", device->tag.cstr(), tac)); | |
| 489 | LOG(("Z80STI '%s' Timer B Prescaler: %u\n", device->tag.cstr(), tbc)); | |
| 488 | LOG(("Z80STI '%s' Timer A Prescaler: %u\n", device->tag(), tac)); | |
| 489 | LOG(("Z80STI '%s' Timer B Prescaler: %u\n", device->tag(), tbc)); | |
| 490 | 490 | |
| 491 | 491 | if (tac) |
| 492 | 492 | timer_adjust_periodic(z80sti->timer[TIMER_A], ATTOTIME_IN_HZ(device->clock / tac), 0, ATTOTIME_IN_HZ(device->clock / tac)); |
| r7553 | r7554 | |
| 501 | 501 | break; |
| 502 | 502 | |
| 503 | 503 | case Z80STI_REGISTER_TBDR: |
| 504 | LOG(("Z80STI '%s' Timer B Data Register: %x\n", device->tag | |
| 504 | LOG(("Z80STI '%s' Timer B Data Register: %x\n", device->tag | |
| 505 | 505 | z80sti->tdr[TIMER_B] = data; |
| 506 | 506 | break; |
| 507 | 507 | |
| 508 | 508 | case Z80STI_REGISTER_TADR: |
| 509 | LOG(("Z80STI '%s' Timer A Data Register: %x\n", device->tag | |
| 509 | LOG(("Z80STI '%s' Timer A Data Register: %x\n", device->tag | |
| 510 | 510 | z80sti->tdr[TIMER_A] = data; |
| 511 | 511 | break; |
| 512 | 512 | #if 0 |
| r7553 | r7554 | |
| 527 | 527 | break; |
| 528 | 528 | #endif |
| 529 | 529 | default: |
| 530 | LOG(("Z80STI '%s' Unsupported Register %x\n", device->tag | |
| 530 | LOG(("Z80STI '%s' Unsupported Register %x\n", device->tag | |
| 531 | 531 | } |
| 532 | 532 | } |
| 533 | 533 | |
| r7553 | r7554 | |
| 584 | 584 | |
| 585 | 585 | if (z80sti->ier & (1 << INT_LEVEL_TIMER[index])) |
| 586 | 586 | { |
| 587 | LOG(("Z80STI '%s' Interrupt Pending for Timer %c\n", device->tag | |
| 587 | LOG(("Z80STI '%s' Interrupt Pending for Timer %c\n", device->tag | |
| 588 | 588 | |
| 589 | 589 | /* signal timer elapsed interrupt */ |
| 590 | 590 | take_interrupt(z80sti, INT_LEVEL_TIMER[index]); |
| r7553 | r7554 | |
| 622 | 622 | |
| 623 | 623 | if ((old_state ^ aer) && !(state ^ aer)) |
| 624 | 624 | { |
| 625 | LOG(("Z80STI '%s' Edge Transition Detected on Bit: %u\n", device->tag | |
| 625 | LOG(("Z80STI '%s' Edge Transition Detected on Bit: %u\n", device->tag | |
| 626 | 626 | |
| 627 | 627 | if (z80sti->ier & (1 << INT_LEVEL_GPIP[bit])) |
| 628 | 628 | { |
| 629 | LOG(("Z80STI '%s' Interrupt Pending for P%u\n", device->tag | |
| 629 | LOG(("Z80STI '%s' Interrupt Pending for P%u\n", device->tag | |
| 630 | 630 | |
| 631 | 631 | take_interrupt(z80sti, INT_LEVEL_GPIP[bit]); |
| 632 | 632 | } |
| r7553 | r7554 | |
| 673 | 673 | } |
| 674 | 674 | } |
| 675 | 675 | |
| 676 | LOG(("Z80STI '%s' Interrupt State: %u\n", device->tag | |
| 676 | LOG(("Z80STI '%s' Interrupt State: %u\n", device->tag | |
| 677 | 677 | |
| 678 | 678 | return state; |
| 679 | 679 | } |
| r7553 | r7554 | |
| 706 | 706 | |
| 707 | 707 | check_interrupts(z80sti); |
| 708 | 708 | |
| 709 | LOG(("Z80STI '%s' Interrupt Acknowledge Vector: %02x\n", device->tag | |
| 709 | LOG(("Z80STI '%s' Interrupt Acknowledge Vector: %02x\n", device->tag | |
| 710 | 710 | |
| 711 | 711 | return vector; |
| 712 | 712 | } |
| r7553 | r7554 | |
| 726 | 726 | z80sti_t *z80sti = get_safe_token(device); |
| 727 | 727 | int i; |
| 728 | 728 | |
| 729 | LOG(("Z80STI '%s' Return from Interrupt\n", device->tag | |
| 729 | LOG(("Z80STI '%s' Return from Interrupt\n", device->tag | |
| 730 | 730 | |
| 731 | 731 | /* loop over all interrupt sources */ |
| 732 | 732 | for (i = 15; i >= 0; i--) |
| r7553 | r7554 | |
|---|---|---|
| 242 | 242 | UINT8 vector = ch->wr[2]; |
| 243 | 243 | int priority = (channel << 2) | level; |
| 244 | 244 | |
| 245 | LOG(("Z80DART \"%s\" Channel %c : Interrupt Request %u\n", device->tag | |
| 245 | LOG(("Z80DART \"%s\" Channel %c : Interrupt Request %u\n", device->tag | |
| 246 | 246 | |
| 247 | 247 | if ((channel == Z80DART_CH_B) && (ch->wr[1] & Z80DART_WR1_STATUS_VECTOR)) |
| 248 | 248 | { |
| r7553 | r7554 | |
| 696 | 696 | break; |
| 697 | 697 | } |
| 698 | 698 | |
| 699 | LOG(("Z80DART \"%s\" Channel %c : Control Register Read '%02x'\n", device->tag | |
| 699 | LOG(("Z80DART \"%s\" Channel %c : Control Register Read '%02x'\n", device->tag | |
| 700 | 700 | |
| 701 | 701 | return data; |
| 702 | 702 | } |
| r7553 | r7554 | |
| 713 | 713 | |
| 714 | 714 | int reg = ch->wr[0] & Z80DART_WR0_REGISTER_MASK; |
| 715 | 715 | |
| 716 | LOG(("Z80DART \"%s\" Channel %c : Control Register Write '%02x'\n", device->tag | |
| 716 | LOG(("Z80DART \"%s\" Channel %c : Control Register Write '%02x'\n", device->tag | |
| 717 | 717 | |
| 718 | 718 | /* write data to selected register */ |
| 719 | 719 | ch->wr[reg] = data; |
| r7553 | r7554 | |
| 739 | 739 | |
| 740 | 740 | ch->rx_rr0_latch = 0; |
| 741 | 741 | |
| 742 | LOG(("Z80DART \"%s\" Channel %c : Reset External/Status Interrupt\n", device->tag | |
| 742 | LOG(("Z80DART \"%s\" Channel %c : Reset External/Status Interrupt\n", device->tag | |
| 743 | 743 | break; |
| 744 | 744 | |
| 745 | 745 | case Z80DART_WR0_CHANNEL_RESET: |
| 746 | 746 | /* channel reset */ |
| 747 | LOG(("Z80DART \"%s\" Channel %c : Channel Reset\n", device->tag | |
| 747 | LOG(("Z80DART \"%s\" Channel %c : Channel Reset\n", device->tag | |
| 748 | 748 | reset_channel(device, channel); |
| 749 | 749 | break; |
| 750 | 750 | |
| 751 | 751 | case Z80DART_WR0_ENABLE_INT_NEXT_RX: |
| 752 | 752 | /* enable interrupt on next receive character */ |
| 753 | LOG(("Z80DART \"%s\" Channel %c : Enable Interrupt on Next Received Character\n", device->tag | |
| 753 | LOG(("Z80DART \"%s\" Channel %c : Enable Interrupt on Next Received Character\n", device->tag | |
| 754 | 754 | ch->rx_first = 1; |
| 755 | 755 | break; |
| 756 | 756 | |
| 757 | 757 | case Z80DART_WR0_RESET_TX_INT: |
| 758 | 758 | /* reset transmitter interrupt pending */ |
| 759 | LOG(("Z80DART \"%s\" Channel %c : Reset Transmitter Interrupt Pending\n", device->tag | |
| 759 | LOG(("Z80DART \"%s\" Channel %c : Reset Transmitter Interrupt Pending\n", device->tag | |
| 760 | 760 | break; |
| 761 | 761 | |
| 762 | 762 | case Z80DART_WR0_ERROR_RESET: |
| 763 | 763 | /* error reset */ |
| 764 | LOG(("Z80DART \"%s\" Channel %c : Error Reset\n", device->tag | |
| 764 | LOG(("Z80DART \"%s\" Channel %c : Error Reset\n", device->tag | |
| 765 | 765 | ch->rr[1] &= ~(Z80DART_RR1_FRAMING_ERROR | Z80DART_RR1_RX_OVERRUN_ERROR | Z80DART_RR1_PARITY_ERROR); |
| 766 | 766 | break; |
| 767 | 767 | |
| 768 | 768 | case Z80DART_WR0_RETURN_FROM_INT: |
| 769 | 769 | /* return from interrupt */ |
| 770 | LOG(("Z80DART \"%s\" Channel %c : Return from Interrupt\n", device->tag | |
| 770 | LOG(("Z80DART \"%s\" Channel %c : Return from Interrupt\n", device->tag | |
| 771 | 771 | z80dart_irq_reti(device); |
| 772 | 772 | break; |
| 773 | 773 | } |
| 774 | 774 | break; |
| 775 | 775 | |
| 776 | 776 | case 1: |
| 777 | LOG(("Z80DART \"%s\" Channel %c : External Interrupt Enable %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR1_EXT_INT_ENABLE) ? 1 : 0)); | |
| 778 | LOG(("Z80DART \"%s\" Channel %c : Transmit Interrupt Enable %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR1_TX_INT_ENABLE) ? 1 : 0)); | |
| 779 | LOG(("Z80DART \"%s\" Channel %c : Status Affects Vector %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR1_STATUS_VECTOR) ? 1 : 0)); | |
| 780 | LOG(("Z80DART \"%s\" Channel %c : Wait/Ready Enable %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR1_WRDY_ENABLE) ? 1 : 0)); | |
| 777 | LOG(("Z80DART \"%s\" Channel %c : External Interrupt Enable %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR1_EXT_INT_ENABLE) ? 1 : 0)); | |
| 778 | LOG(("Z80DART \"%s\" Channel %c : Transmit Interrupt Enable %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR1_TX_INT_ENABLE) ? 1 : 0)); | |
| 779 | LOG(("Z80DART \"%s\" Channel %c : Status Affects Vector %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR1_STATUS_VECTOR) ? 1 : 0)); | |
| 780 | LOG(("Z80DART \"%s\" Channel %c : Wait/Ready Enable %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR1_WRDY_ENABLE) ? 1 : 0)); | |
| 781 | 781 | |
| 782 | 782 | switch (data & Z80DART_WR1_RX_INT_ENABLE_MASK) |
| 783 | 783 | { |
| 784 | 784 | case Z80DART_WR1_RX_INT_DISABLE: |
| 785 | LOG(("Z80DART \"%s\" Channel %c : Receiver Interrupt Disabled\n", device->tag | |
| 785 | LOG(("Z80DART \"%s\" Channel %c : Receiver Interrupt Disabled\n", device->tag | |
| 786 | 786 | break; |
| 787 | 787 | |
| 788 | 788 | case Z80DART_WR1_RX_INT_FIRST: |
| 789 | LOG(("Z80DART \"%s\" Channel %c : Receiver Interrupt on First Character\n", device->tag | |
| 789 | LOG(("Z80DART \"%s\" Channel %c : Receiver Interrupt on First Character\n", device->tag | |
| 790 | 790 | break; |
| 791 | 791 | |
| 792 | 792 | case Z80DART_WR1_RX_INT_ALL_PARITY: |
| 793 | LOG(("Z80DART \"%s\" Channel %c : Receiver Interrupt on All Characters, Parity Affects Vector\n", device->tag | |
| 793 | LOG(("Z80DART \"%s\" Channel %c : Receiver Interrupt on All Characters, Parity Affects Vector\n", device->tag | |
| 794 | 794 | break; |
| 795 | 795 | |
| 796 | 796 | case Z80DART_WR1_RX_INT_ALL: |
| 797 | LOG(("Z80DART \"%s\" Channel %c : Receiver Interrupt on All Characters\n", device->tag | |
| 797 | LOG(("Z80DART \"%s\" Channel %c : Receiver Interrupt on All Characters\n", device->tag | |
| 798 | 798 | break; |
| 799 | 799 | } |
| 800 | 800 | |
| r7553 | r7554 | |
| 804 | 804 | case 2: |
| 805 | 805 | /* interrupt vector */ |
| 806 | 806 | check_interrupts(device); |
| 807 | LOG(("Z80DART \"%s\" Channel %c : Interrupt Vector %02x\n", device->tag | |
| 807 | LOG(("Z80DART \"%s\" Channel %c : Interrupt Vector %02x\n", device->tag | |
| 808 | 808 | break; |
| 809 | 809 | |
| 810 | 810 | case 3: |
| 811 | LOG(("Z80DART \"%s\" Channel %c : Receiver Enable %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR3_RX_ENABLE) ? 1 : 0)); | |
| 812 | LOG(("Z80DART \"%s\" Channel %c : Auto Enables %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR3_AUTO_ENABLES) ? 1 : 0)); | |
| 813 | LOG(("Z80DART \"%s\" Channel %c : Receiver Bits/Character %u\n", device->tag.cstr(), 'A' + channel, get_rx_word_length(ch))); | |
| 811 | LOG(("Z80DART \"%s\" Channel %c : Receiver Enable %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR3_RX_ENABLE) ? 1 : 0)); | |
| 812 | LOG(("Z80DART \"%s\" Channel %c : Auto Enables %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR3_AUTO_ENABLES) ? 1 : 0)); | |
| 813 | LOG(("Z80DART \"%s\" Channel %c : Receiver Bits/Character %u\n", device->tag(), 'A' + channel, get_rx_word_length(ch))); | |
| 814 | 814 | break; |
| 815 | 815 | |
| 816 | 816 | case 4: |
| 817 | LOG(("Z80DART \"%s\" Channel %c : Parity Enable %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR4_PARITY_ENABLE) ? 1 : 0)); | |
| 818 | LOG(("Z80DART \"%s\" Channel %c : Parity %s\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR4_PARITY_EVEN) ? "Even" : "Odd")); | |
| 819 | LOG(("Z80DART \"%s\" Channel %c : Stop Bits %f\n", device->tag.cstr(), 'A' + channel, get_stop_bits(ch))); | |
| 820 | LOG(("Z80DART \"%s\" Channel %c : Clock Mode %uX\n", device->tag.cstr(), 'A' + channel, get_clock_mode(ch))); | |
| 817 | LOG(("Z80DART \"%s\" Channel %c : Parity Enable %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR4_PARITY_ENABLE) ? 1 : 0)); | |
| 818 | LOG(("Z80DART \"%s\" Channel %c : Parity %s\n", device->tag(), 'A' + channel, (data & Z80DART_WR4_PARITY_EVEN) ? "Even" : "Odd")); | |
| 819 | LOG(("Z80DART \"%s\" Channel %c : Stop Bits %f\n", device->tag(), 'A' + channel, get_stop_bits(ch))); | |
| 820 | LOG(("Z80DART \"%s\" Channel %c : Clock Mode %uX\n", device->tag(), 'A' + channel, get_clock_mode(ch))); | |
| 821 | 821 | break; |
| 822 | 822 | |
| 823 | 823 | case 5: |
| 824 | LOG(("Z80DART \"%s\" Channel %c : Transmitter Enable %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR5_TX_ENABLE) ? 1 : 0)); | |
| 825 | LOG(("Z80DART \"%s\" Channel %c : Transmitter Bits/Character %u\n", device->tag.cstr(), 'A' + channel, get_tx_word_length(ch))); | |
| 826 | LOG(("Z80DART \"%s\" Channel %c : Send Break %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR5_SEND_BREAK) ? 1 : 0)); | |
| 827 | LOG(("Z80DART \"%s\" Channel %c : Request to Send %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR5_RTS) ? 1 : 0)); | |
| 828 | LOG(("Z80DART \"%s\" Channel %c : Data Terminal Ready %u\n", device->tag.cstr(), 'A' + channel, (data & Z80DART_WR5_DTR) ? 1 : 0)); | |
| 824 | LOG(("Z80DART \"%s\" Channel %c : Transmitter Enable %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR5_TX_ENABLE) ? 1 : 0)); | |
| 825 | LOG(("Z80DART \"%s\" Channel %c : Transmitter Bits/Character %u\n", device->tag(), 'A' + channel, get_tx_word_length(ch))); | |
| 826 | LOG(("Z80DART \"%s\" Channel %c : Send Break %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR5_SEND_BREAK) ? 1 : 0)); | |
| 827 | LOG(("Z80DART \"%s\" Channel %c : Request to Send %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR5_RTS) ? 1 : 0)); | |
| 828 | LOG(("Z80DART \"%s\" Channel %c : Data Terminal Ready %u\n", device->tag(), 'A' + channel, (data & Z80DART_WR5_DTR) ? 1 : 0)); | |
| 829 | 829 | |
| 830 | 830 | if (data & Z80DART_WR5_RTS) |
| 831 | 831 | { |
| r7553 | r7554 | |
| 876 | 876 | } |
| 877 | 877 | } |
| 878 | 878 | |
| 879 | LOG(("Z80DART \"%s\" Channel %c : Data Register Read '%02x'\n", device->tag | |
| 879 | LOG(("Z80DART \"%s\" Channel %c : Data Register Read '%02x'\n", device->tag | |
| 880 | 880 | |
| 881 | 881 | return data; |
| 882 | 882 | } |
| r7553 | r7554 | |
| 896 | 896 | ch->rr[0] &= ~Z80DART_RR0_TX_BUFFER_EMPTY; |
| 897 | 897 | ch->rr[1] &= ~Z80DART_RR1_ALL_SENT; |
| 898 | 898 | |
| 899 | LOG(("Z80DART \"%s\" Channel %c : Data Register Write '%02x'\n", device->tag | |
| 899 | LOG(("Z80DART \"%s\" Channel %c : Data Register Write '%02x'\n", device->tag | |
| 900 | 900 | } |
| 901 | 901 | |
| 902 | 902 | /*------------------------------------------------- |
| r7553 | r7554 | |
| 908 | 908 | z80dart_t *z80dart = get_safe_token(device); |
| 909 | 909 | dart_channel *ch = &z80dart->channel[channel]; |
| 910 | 910 | |
| 911 | LOG(("Z80DART \"%s\" Channel %c : Receive Data Byte '%02x'\n", device->tag | |
| 911 | LOG(("Z80DART \"%s\" Channel %c : Receive Data Byte '%02x'\n", device->tag | |
| 912 | 912 | |
| 913 | 913 | if (ch->rx_fifo == 2) |
| 914 | 914 | { |
| r7553 | r7554 | |
| 969 | 969 | z80dart_t *z80dart = get_safe_token(device); |
| 970 | 970 | dart_channel *ch = &z80dart->channel[channel]; |
| 971 | 971 | |
| 972 | LOG(("Z80DART \"%s\" Channel %c : CTS %u\n", device->tag | |
| 972 | LOG(("Z80DART \"%s\" Channel %c : CTS %u\n", device->tag | |
| 973 | 973 | |
| 974 | 974 | if (ch->cts != state) |
| 975 | 975 | { |
| r7553 | r7554 | |
| 1028 | 1028 | z80dart_t *z80dart = get_safe_token(device); |
| 1029 | 1029 | dart_channel *ch = &z80dart->channel[channel]; |
| 1030 | 1030 | |
| 1031 | LOG(("Z80DART \"%s\" Channel %c : DCD %u\n", device->tag | |
| 1031 | LOG(("Z80DART \"%s\" Channel %c : DCD %u\n", device->tag | |
| 1032 | 1032 | |
| 1033 | 1033 | if (ch->dcd != state) |
| 1034 | 1034 | { |
| r7553 | r7554 | |
| 1088 | 1088 | z80dart_t *z80dart = get_safe_token(device); |
| 1089 | 1089 | dart_channel *ch = &z80dart->channel[channel]; |
| 1090 | 1090 | |
| 1091 | LOG(("Z80DART \"%s\" Channel %c : RI %u\n", device->tag | |
| 1091 | LOG(("Z80DART \"%s\" Channel %c : RI %u\n", device->tag | |
| 1092 | 1092 | |
| 1093 | 1093 | if (ch->ri != state) |
| 1094 | 1094 | { |
| r7553 | r7554 | |
| 1145 | 1145 | |
| 1146 | 1146 | if (!state) return; |
| 1147 | 1147 | |
| 1148 | LOG(("Z80DART \"%s\" Channel A : Receiver Clock Pulse\n", device->tag | |
| 1148 | LOG(("Z80DART \"%s\" Channel A : Receiver Clock Pulse\n", device->tag | |
| 1149 | 1149 | |
| 1150 | 1150 | ch->rx_clock++; |
| 1151 | 1151 | |
| r7553 | r7554 | |
| 1171 | 1171 | |
| 1172 | 1172 | if (!state) return; |
| 1173 | 1173 | |
| 1174 | LOG(("Z80DART \"%s\" Channel A : Transmitter Clock Pulse\n", device->tag | |
| 1174 | LOG(("Z80DART \"%s\" Channel A : Transmitter Clock Pulse\n", device->tag | |
| 1175 | 1175 | |
| 1176 | 1176 | ch->tx_clock++; |
| 1177 | 1177 | |
| r7553 | r7554 | |
| 1198 | 1198 | |
| 1199 | 1199 | if (!state) return; |
| 1200 | 1200 | |
| 1201 | LOG(("Z80DART \"%s\" Channel A : Receiver/Transmitter Clock Pulse\n", device->tag | |
| 1201 | LOG(("Z80DART \"%s\" Channel A : Receiver/Transmitter Clock Pulse\n", device->tag | |
| 1202 | 1202 | |
| 1203 | 1203 | ch->rx_clock++; |
| 1204 | 1204 | ch->tx_clock++; |
| r7553 | r7554 | |
| 1251 | 1251 | int state = 0; |
| 1252 | 1252 | int i; |
| 1253 | 1253 | |
| 1254 | LOG(("Z80DART \"%s\" : Interrupt State B:%d%d%d%d A:%d%d%d%d\n", device->tag | |
| 1254 | LOG(("Z80DART \"%s\" : Interrupt State B:%d%d%d%d A:%d%d%d%d\n", device->tag | |
| 1255 | 1255 | z80dart->int_state[0], z80dart->int_state[1], z80dart->int_state[2], z80dart->int_state[3], |
| 1256 | 1256 | z80dart->int_state[4], z80dart->int_state[5], z80dart->int_state[6], z80dart->int_state[7])); |
| 1257 | 1257 | |
| r7553 | r7554 | |
| 1267 | 1267 | state |= z80dart->int_state[i]; |
| 1268 | 1268 | } |
| 1269 | 1269 | |
| 1270 | LOG(("Z80DART \"%s\" : Interrupt State %u\n", device->tag | |
| 1270 | LOG(("Z80DART \"%s\" : Interrupt State %u\n", device->tag | |
| 1271 | 1271 | |
| 1272 | 1272 | return state; |
| 1273 | 1273 | } |
| r7553 | r7554 | |
| 1281 | 1281 | z80dart_t *z80dart = get_safe_token( device ); |
| 1282 | 1282 | int i; |
| 1283 | 1283 | |
| 1284 | LOG(("Z80DART \"%s\" Interrupt Acknowledge\n", device->tag | |
| 1284 | LOG(("Z80DART \"%s\" Interrupt Acknowledge\n", device->tag | |
| 1285 | 1285 | |
| 1286 | 1286 | /* loop over all interrupt sources */ |
| 1287 | 1287 | for (i = 0; i < 8; i++) |
| r7553 | r7554 | |
| 1294 | 1294 | z80dart->channel[Z80DART_CH_A].rr[0] &= ~Z80DART_RR0_INTERRUPT_PENDING; |
| 1295 | 1295 | check_interrupts(device); |
| 1296 | 1296 | |
| 1297 | LOG(("Z80DART \"%s\" : Interrupt Acknowledge Vector %02x\n", device->tag | |
| 1297 | LOG(("Z80DART \"%s\" : Interrupt Acknowledge Vector %02x\n", device->tag | |
| 1298 | 1298 | |
| 1299 | 1299 | return z80dart->channel[Z80DART_CH_B].rr[2]; |
| 1300 | 1300 | } |
| r7553 | r7554 | |
| 1314 | 1314 | z80dart_t *z80dart = get_safe_token( device ); |
| 1315 | 1315 | int i; |
| 1316 | 1316 | |
| 1317 | LOG(("Z80DART \"%s\" Return from Interrupt\n", device->tag | |
| 1317 | LOG(("Z80DART \"%s\" Return from Interrupt\n", device->tag | |
| 1318 | 1318 | |
| 1319 | 1319 | /* loop over all interrupt sources */ |
| 1320 | 1320 | for (i = 0; i < 8; i++) |
| r7553 | r7554 | |
| 1463 | 1463 | { |
| 1464 | 1464 | int channel; |
| 1465 | 1465 | |
| 1466 | LOG(("Z80DART \"%s\" Reset\n", device->tag | |
| 1466 | LOG(("Z80DART \"%s\" Reset\n", device->tag | |
| 1467 | 1467 | |
| 1468 | 1468 | for (channel = Z80DART_CH_A; channel <= Z80DART_CH_B; channel++) |
| 1469 | 1469 | { |
| r7553 | r7554 | |
|---|---|---|
| 1141 | 1141 | int changed = FALSE; |
| 1142 | 1142 | |
| 1143 | 1143 | /* output the basics */ |
| 1144 | xml_set_attribute(ldnode, "tag", device->tag); | |
| 1144 | xml_set_attribute(ldnode, "tag", device->tag()); | |
| 1145 | 1145 | |
| 1146 | 1146 | /* add an overlay node */ |
| 1147 | 1147 | overnode = xml_add_child(ldnode, "overlay", NULL); |
| r7553 | r7554 | |
| 1333 | 1333 | if (config->getdisc != NULL) |
| 1334 | 1334 | ldcore->disc = (*config->getdisc)(device); |
| 1335 | 1335 | else |
| 1336 | ldcore->disc = get_disk_handle(device->machine, device->tag); | |
| 1336 | ldcore->disc = get_disk_handle(device->machine, device->tag()); | |
| 1337 | 1337 | |
| 1338 | 1338 | /* set default parameters */ |
| 1339 | 1339 | ldcore->width = 720; |
| r7553 | r7554 | |
|---|---|---|
| 476 | 476 | case MODE_1: data = read_mode1(i8255a, PORT_A); break; |
| 477 | 477 | case MODE_2: data = read_mode2(i8255a); break; |
| 478 | 478 | } |
| 479 | if (LOG) logerror("8255A '%s' Port A Read: %02x\n", device->tag | |
| 479 | if (LOG) logerror("8255A '%s' Port A Read: %02x\n", device->tag | |
| 480 | 480 | break; |
| 481 | 481 | |
| 482 | 482 | case PORT_B: |
| r7553 | r7554 | |
| 485 | 485 | case MODE_0: data = read_mode0(i8255a, PORT_B); break; |
| 486 | 486 | case MODE_1: data = read_mode1(i8255a, PORT_B); break; |
| 487 | 487 | } |
| 488 | if (LOG) logerror("8255A '%s' Port B Read: %02x\n", device->tag | |
| 488 | if (LOG) logerror("8255A '%s' Port B Read: %02x\n", device->tag | |
| 489 | 489 | break; |
| 490 | 490 | |
| 491 | 491 | case PORT_C: |
| 492 | 492 | data = read_pc(i8255a); |
| 493 | //if (LOG) logerror("8255A '%s' Port C Read: %02x\n", device->tag | |
| 493 | //if (LOG) logerror("8255A '%s' Port C Read: %02x\n", device->tag | |
| 494 | 494 | break; |
| 495 | 495 | |
| 496 | 496 | case CONTROL: |
| 497 | 497 | data = i8255a->control; |
| 498 | if (LOG) logerror("8255A '%s' Mode Control Word Read: %02x\n", device->tag | |
| 498 | if (LOG) logerror("8255A '%s' Mode Control Word Read: %02x\n", device->tag | |
| 499 | 499 | break; |
| 500 | 500 | } |
| 501 | 501 | |
| r7553 | r7554 | |
| 599 | 599 | devcb_call_write8(&i8255a->out_port_func[PORT_A], 0, 0xff); |
| 600 | 600 | } |
| 601 | 601 | |
| 602 | if (LOG) logerror("8255A '%s' Group A Mode: %u\n", device->tag.cstr(), group_mode(i8255a, GROUP_A)); | |
| 603 | if (LOG) logerror("8255A '%s' Port A Mode: %s\n", device->tag.cstr(), (port_mode(i8255a, PORT_A) == MODE_OUTPUT) ? "output" : "input"); | |
| 604 | if (LOG) logerror("8255A '%s' Port C Upper Mode: %s\n", device->tag.cstr(), (port_c_upper_mode(i8255a) == MODE_OUTPUT) ? "output" : "input"); | |
| 605 | if (LOG) logerror("8255A '%s' Group B Mode: %u\n", device->tag.cstr(), group_mode(i8255a, GROUP_B)); | |
| 606 | if (LOG) logerror("8255A '%s' Port B Mode: %s\n", device->tag.cstr(), (port_mode(i8255a, PORT_B) == MODE_OUTPUT) ? "output" : "input"); | |
| 607 | if (LOG) logerror("8255A '%s' Port C Lower Mode: %s\n", device->tag.cstr(), (port_c_lower_mode(i8255a) == MODE_OUTPUT) ? "output" : "input"); | |
| 602 | if (LOG) logerror("8255A '%s' Group A Mode: %u\n", device->tag(), group_mode(i8255a, GROUP_A)); | |
| 603 | if (LOG) logerror("8255A '%s' Port A Mode: %s\n", device->tag(), (port_mode(i8255a, PORT_A) == MODE_OUTPUT) ? "output" : "input"); | |
| 604 | if (LOG) logerror("8255A '%s' Port C Upper Mode: %s\n", device->tag(), (port_c_upper_mode(i8255a) == MODE_OUTPUT) ? "output" : "input"); | |
| 605 | if (LOG) logerror("8255A '%s' Group B Mode: %u\n", device->tag(), group_mode(i8255a, GROUP_B)); | |
| 606 | if (LOG) logerror("8255A '%s' Port B Mode: %s\n", device->tag(), (port_mode(i8255a, PORT_B) == MODE_OUTPUT) ? "output" : "input"); | |
| 607 | if (LOG) logerror("8255A '%s' Port C Lower Mode: %s\n", device->tag(), (port_c_lower_mode(i8255a) == MODE_OUTPUT) ? "output" : "input"); | |
| 608 | 608 | |
| 609 | 609 | /* group B */ |
| 610 | 610 | i8255a->output[PORT_B] = 0; |
| r7553 | r7554 | |
| 697 | 697 | switch (offset & 0x03) |
| 698 | 698 | { |
| 699 | 699 | case PORT_A: |
| 700 | if (LOG) logerror("8255A '%s' Port A Write: %02x\n", device->tag | |
| 700 | if (LOG) logerror("8255A '%s' Port A Write: %02x\n", device->tag | |
| 701 | 701 | |
| 702 | 702 | switch (group_mode(i8255a, GROUP_A)) |
| 703 | 703 | { |
| r7553 | r7554 | |
| 708 | 708 | break; |
| 709 | 709 | |
| 710 | 710 | case PORT_B: |
| 711 | if (LOG) logerror("8255A '%s' Port B Write: %02x\n", device->tag | |
| 711 | if (LOG) logerror("8255A '%s' Port B Write: %02x\n", device->tag | |
| 712 | 712 | |
| 713 | 713 | switch (group_mode(i8255a, GROUP_B)) |
| 714 | 714 | { |
| r7553 | r7554 | |
| 718 | 718 | break; |
| 719 | 719 | |
| 720 | 720 | case PORT_C: |
| 721 | if (LOG) logerror("8255A '%s' Port C Write: %02x\n", device->tag | |
| 721 | if (LOG) logerror("8255A '%s' Port C Write: %02x\n", device->tag | |
| 722 | 722 | |
| 723 | 723 | write_pc(i8255a, data); |
| 724 | 724 | break; |
| r7553 | r7554 | |
| 726 | 726 | case CONTROL: |
| 727 | 727 | if (data & I8255A_CONTROL_MODE_SET) |
| 728 | 728 | { |
| 729 | if (LOG) logerror("8255A '%s' Mode Control Word: %02x\n", device->tag | |
| 729 | if (LOG) logerror("8255A '%s' Mode Control Word: %02x\n", device->tag | |
| 730 | 730 | |
| 731 | 731 | set_mode(device, data); |
| 732 | 732 | } |
| r7553 | r7554 | |
| 735 | 735 | int bit = (data >> 1) & 0x07; |
| 736 | 736 | int state = BIT(data, 0); |
| 737 | 737 | |
| 738 | if (LOG) logerror("8255A '%s' %s Bit %u\n", device->tag | |
| 738 | if (LOG) logerror("8255A '%s' %s Bit %u\n", device->tag | |
| 739 | 739 | |
| 740 | 740 | set_pc_bit(device, bit, state); |
| 741 | 741 | } |
| r7553 | r7554 | |
| 782 | 782 | /* port B acknowledge */ |
| 783 | 783 | if (!i8255a->obf[PORT_B] && !state) |
| 784 | 784 | { |
| 785 | if (LOG) logerror("8255A '%s' Port B Acknowledge\n", device->tag | |
| 785 | if (LOG) logerror("8255A '%s' Port B Acknowledge\n", device->tag | |
| 786 | 786 | |
| 787 | 787 | /* clear output buffer flag */ |
| 788 | 788 | set_obf(i8255a, PORT_B, 1); |
| r7553 | r7554 | |
| 793 | 793 | /* port B strobe */ |
| 794 | 794 | if (!i8255a->ibf[PORT_B] && !state) |
| 795 | 795 | { |
| 796 | if (LOG) logerror("8255A '%s' Port B Strobe\n", device->tag | |
| 796 | if (LOG) logerror("8255A '%s' Port B Strobe\n", device->tag | |
| 797 | 797 | |
| 798 | 798 | /* read port into latch */ |
| 799 | 799 | i8255a->input[PORT_B] = devcb_call_read8(&i8255a->in_port_func[PORT_B], 0); |
| r7553 | r7554 | |
| 814 | 814 | /* port A strobe */ |
| 815 | 815 | if (!i8255a->ibf[PORT_A] && !state) |
| 816 | 816 | { |
| 817 | if (LOG) logerror("8255A '%s' Port A Strobe\n", device->tag | |
| 817 | if (LOG) logerror("8255A '%s' Port A Strobe\n", device->tag | |
| 818 | 818 | |
| 819 | 819 | /* read port into latch */ |
| 820 | 820 | i8255a->input[PORT_A] = devcb_call_read8(&i8255a->in_port_func[PORT_A], 0); |
| r7553 | r7554 | |
| 834 | 834 | /* port A acknowledge */ |
| 835 | 835 | if (!i8255a->obf[PORT_A] && !state) |
| 836 | 836 | { |
| 837 | if (LOG) logerror("8255A '%s' Port A Acknowledge\n", device->tag | |
| 837 | if (LOG) logerror("8255A '%s' Port A Acknowledge\n", device->tag | |
| 838 | 838 | |
| 839 | 839 | /* clear output buffer flag */ |
| 840 | 840 | set_obf(i8255a, PORT_A, 1); |
| r7553 | r7554 | |
|---|---|---|
| 197 | 197 | if (latch8->intf->node_map[i] ) |
| 198 | 198 | { |
| 199 | 199 | if (!latch8->intf->node_device[i]) |
| 200 | fatalerror("Device %s: Bit %d has invalid discrete device\n", device->tag | |
| 200 | fatalerror("Device %s: Bit %d has invalid discrete device\n", device->tag | |
| 201 | 201 | latch8->has_node_map = 1; |
| 202 | 202 | } |
| 203 | 203 | |
| r7553 | r7554 | |
| 206 | 206 | if (latch8->intf->devread[i].tag != NULL) |
| 207 | 207 | { |
| 208 | 208 | if (latch8->devices[i] != NULL) |
| 209 | fatalerror("Device %s: Bit %d already has a handler.\n", device->tag | |
| 209 | fatalerror("Device %s: Bit %d already has a handler.\n", device->tag | |
| 210 | 210 | latch8->devices[i] = device->machine->device(latch8->intf->devread[i].tag); |
| 211 | 211 | if (latch8->devices[i] == NULL) |
| 212 | fatalerror("Device %s: Unable to find device %s\n", device->tag | |
| 212 | fatalerror("Device %s: Unable to find device %s\n", device->tag | |
| 213 | 213 | latch8->has_devread = 1; |
| 214 | 214 | } |
| 215 | 215 | |
| r7553 | r7554 | |
| 218 | 218 | if (latch8->intf->devread[i].read_handler != NULL) |
| 219 | 219 | { |
| 220 | 220 | if (latch8->devices[i] != NULL) |
| 221 | fatalerror("Device %s: Bit %d already has a handler.\n", device->tag | |
| 221 | fatalerror("Device %s: Bit %d already has a handler.\n", device->tag | |
| 222 | 222 | latch8->has_read = 1; |
| 223 | 223 | } |
| 224 | 224 |
| r7553 | r7554 | |
|---|---|---|
| 361 | 361 | if (device->region != NULL) |
| 362 | 362 | { |
| 363 | 363 | if (device->region->length != eeprom_bytes) |
| 364 | fatalerror("eeprom region '%s' wrong size (expected size = 0x%X)", device->tag | |
| 364 | fatalerror("eeprom region '%s' wrong size (expected size = 0x%X)", device->tag | |
| 365 | 365 | if (eestate->intf->data_bits == 8 && (device->region->flags & ROMREGION_WIDTHMASK) != ROMREGION_8BIT) |
| 366 | fatalerror("eeprom region '%s' needs to be an 8-bit region", device->tag | |
| 366 | fatalerror("eeprom region '%s' needs to be an 8-bit region", device->tag | |
| 367 | 367 | if (eestate->intf->data_bits == 16 && ((device->region->flags & ROMREGION_WIDTHMASK) != ROMREGION_16BIT || (device->region->flags & ROMREGION_ENDIANMASK) != ROMREGION_BE)) |
| 368 | fatalerror("eeprom region '%s' needs to be a 16-bit big-endian region (flags=%08x)", device->tag | |
| 368 | fatalerror("eeprom region '%s' needs to be a 16-bit big-endian region (flags=%08x)", device->tag | |
| 369 | 369 | |
| 370 | 370 | for (offs = 0; offs < eeprom_length; offs++) |
| 371 | 371 | if (eestate->intf->data_bits == 8) |
| r7553 | r7554 | |
|---|---|---|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | if (LOG_PCI) |
| 139 | logerror("pci_32le_r('%s'): offset=%d result=0x%08X\n", device->tag | |
| 139 | logerror("pci_32le_r('%s'): offset=%d result=0x%08X\n", device->tag | |
| 140 | 140 | |
| 141 | 141 | return result; |
| 142 | 142 | } |
| r7553 | r7554 | |
| 150 | 150 | offset %= 2; |
| 151 | 151 | |
| 152 | 152 | if (LOG_PCI) |
| 153 | logerror("pci_32le_w('%s'): offset=%d data=0x%08X\n", device->tag | |
| 153 | logerror("pci_32le_w('%s'): offset=%d data=0x%08X\n", device->tag | |
| 154 | 154 | |
| 155 | 155 | switch (offset) |
| 156 | 156 | { |
| r7553 | r7554 | |
|---|---|---|
| 404 | 404 | virtual const char *version() const { return get_config_string(DEVINFO_STR_VERSION); } |
| 405 | 405 | virtual const char *source_file() const { return get_config_string(DEVINFO_STR_SOURCE_FILE); } |
| 406 | 406 | virtual const char *credits() const { return get_config_string(DEVINFO_STR_CREDITS); } |
| 407 | const char *tag() const { return m_tag; } | |
| 407 | 408 | |
| 408 | 409 | INT64 get_config_int(UINT32 state) const; |
| 409 | 410 | void *get_config_ptr(UINT32 state) const; |
| r7553 | r7554 | |
| 418 | 419 | device_config * owner; // device that owns us, or NULL if nobody |
| 419 | 420 | |
| 420 | 421 | // device properties |
| 421 | astring tag; // tag for this instance | |
| 422 | 422 | device_type type; // device type |
| 423 | 423 | device_class devclass; // device class |
| 424 | 424 | |
| r7553 | r7554 | |
| 427 | 427 | const addrmap_token * address_map[ADDRESS_SPACES]; // address maps for each address space |
| 428 | 428 | const void * static_config; // static device configuration |
| 429 | 429 | void * inline_config; // inline device configuration |
| 430 | ||
| 431 | private: | |
| 432 | astring m_tag; // tag for this instance | |
| 430 | 433 | }; |
| 431 | 434 | |
| 432 | 435 | |
| r7553 | r7554 | |
| 490 | 493 | const char *version() const { return m_baseconfig.version(); } |
| 491 | 494 | const char *source_file() const { return m_baseconfig.source_file(); } |
| 492 | 495 | const char *credits() const { return m_baseconfig.credits(); } |
| 496 | const char *tag() const { return m_tag; } | |
| 493 | 497 | |
| 494 | 498 | INT64 get_config_int(UINT32 state) const { return m_baseconfig.get_config_int(state); } |
| 495 | 499 | void *get_config_ptr(UINT32 state) const { return m_baseconfig.get_config_ptr(state); } |
| r7553 | r7554 | |
| 510 | 514 | running_device * owner; // device that owns us, or NULL if nobody |
| 511 | 515 | |
| 512 | 516 | // device properties |
| 513 | astring tag; // tag for this instance | |
| 514 | 517 | device_type type; // device type |
| 515 | 518 | device_class devclass; // device class |
| 516 | 519 | |
| r7553 | r7554 | |
| 525 | 528 | |
| 526 | 529 | device_execute_func execute; // quick pointer to execute callback |
| 527 | 530 | device_get_runtime_info_func get_runtime_info; |
| 531 | ||
| 532 | private: | |
| 533 | astring m_tag; | |
| 528 | 534 | }; |
| 529 | 535 | |
| 530 | 536 |
| r7553 | r7554 | |
|---|---|---|
| 312 | 312 | { |
| 313 | 313 | /* compute how many cycles we want to execute */ |
| 314 | 314 | ran = classdata->cycles_running = divu_64x32((UINT64)delta >> classdata->divshift, classdata->divisor); |
| 315 | LOG((" cpu '%s': %d cycles\n", classdata->device->tag | |
| 315 | LOG((" cpu '%s': %d cycles\n", classdata->device->tag | |
| 316 | 316 | |
| 317 | 317 | /* if we're not suspended, actually execute */ |
| 318 | 318 | if (classdata->suspend == 0) |
| r7553 | r7554 | |
| 423 | 423 | if (executingcpu != NULL) |
| 424 | 424 | { |
| 425 | 425 | const address_space *space = cpu_get_address_space(executingcpu, ADDRESS_SPACE_PROGRAM); |
| 426 | sprintf(global->statebuf, "'%s' (%s)", executingcpu->tag | |
| 426 | sprintf(global->statebuf, "'%s' (%s)", executingcpu->tag | |
| 427 | 427 | } |
| 428 | 428 | else |
| 429 | 429 | strcpy(global->statebuf, "(no context)"); |
| r7553 | r7554 | |
| 530 | 530 | /* if no state registered for saving, we can't save */ |
| 531 | 531 | if (num_regs == 0) |
| 532 | 532 | { |
| 533 | logerror("CPU '%s' did not register any state to save!\n", device->tag | |
| 533 | logerror("CPU '%s' did not register any state to save!\n", device->tag | |
| 534 | 534 | if (device->machine->gamedrv->flags & GAME_SUPPORTS_SAVE) |
| 535 | fatalerror("CPU '%s' did not register any state to save!", device->tag | |
| 535 | fatalerror("CPU '%s' did not register any state to save!", device->tag | |
| 536 | 536 | } |
| 537 | 537 | |
| 538 | 538 | /* register some internal states as well */ |
| r7553 | r7554 | |
| 1212 | 1212 | classdata->input[line].vector = vector; |
| 1213 | 1213 | return; |
| 1214 | 1214 | } |
| 1215 | LOG(("cpu_set_input_line_vector CPU '%s' line %d > max input lines\n", device->tag | |
| 1215 | LOG(("cpu_set_input_line_vector CPU '%s' line %d > max input lines\n", device->tag | |
| 1216 | 1216 | } |
| 1217 | 1217 | |
| 1218 | 1218 | |
| r7553 | r7554 | |
| 1228 | 1228 | |
| 1229 | 1229 | /* catch errors where people use PULSE_LINE for CPUs that don't support it */ |
| 1230 | 1230 | if (state == PULSE_LINE && line != INPUT_LINE_NMI && line != INPUT_LINE_RESET) |
| 1231 | fatalerror("CPU %s: PULSE_LINE can only be used for NMI and RESET lines\n", device->tag | |
| 1231 | fatalerror("CPU %s: PULSE_LINE can only be used for NMI and RESET lines\n", device->tag | |
| 1232 | 1232 | |
| 1233 | 1233 | if (line >= 0 && line < MAX_INPUT_LINES) |
| 1234 | 1234 | { |
| r7553 | r7554 | |
| 1236 | 1236 | INT32 input_event = (state & 0xff) | (vector << 8); |
| 1237 | 1237 | int event_index = inputline->qindex++; |
| 1238 | 1238 | |
| 1239 | LOG(("cpu_set_input_line_and_vector('%s',%d,%d,%02x)\n", device->tag | |
| 1239 | LOG(("cpu_set_input_line_and_vector('%s',%d,%d,%02x)\n", device->tag | |
| 1240 | 1240 | |
| 1241 | 1241 | /* if we're full of events, flush the queue and log a message */ |
| 1242 | 1242 | if (event_index >= ARRAY_LENGTH(inputline->queue)) |
| r7553 | r7554 | |
| 1244 | 1244 | inputline->qindex--; |
| 1245 | 1245 | empty_event_queue(device->machine, (void *)device, line); |
| 1246 | 1246 | event_index = inputline->qindex++; |
| 1247 | logerror("Exceeded pending input line event queue on CPU '%s'!\n", device->tag | |
| 1247 | logerror("Exceeded pending input line event queue on CPU '%s'!\n", device->tag | |
| 1248 | 1248 | } |
| 1249 | 1249 | |
| 1250 | 1250 | /* enqueue the event */ |
| r7553 | r7554 | |
| 1391 | 1391 | |
| 1392 | 1392 | /* for new style declaration, we need to compare the tags */ |
| 1393 | 1393 | else if (config->vblank_interrupt_screen != NULL) |
| 1394 | cpu_interested = (strcmp(config->vblank_interrupt_screen, device->tag) == 0); | |
| 1394 | cpu_interested = (strcmp(config->vblank_interrupt_screen, device->tag()) == 0); | |
| 1395 | 1395 | |
| 1396 | 1396 | /* no VBLANK interrupt, not interested */ |
| 1397 | 1397 | else |
| r7553 | r7554 | |
| 1541 | 1541 | break; |
| 1542 | 1542 | |
| 1543 | 1543 | default: |
| 1544 | logerror("empty_event_queue cpu '%s', line %d, unknown state %d\n", device->tag | |
| 1544 | logerror("empty_event_queue cpu '%s', line %d, unknown state %d\n", device->tag | |
| 1545 | 1545 | break; |
| 1546 | 1546 | } |
| 1547 | 1547 | |
| r7553 | r7554 | |
| 1568 | 1568 | cpu_input_data *inputline = &classdata->input[irqline]; |
| 1569 | 1569 | int vector = inputline->curvector; |
| 1570 | 1570 | |
| 1571 | LOG(("standard_irq_callback('%s', %d) $%04x\n", device->tag | |
| 1571 | LOG(("standard_irq_callback('%s', %d) $%04x\n", device->tag | |
| 1572 | 1572 | |
| 1573 | 1573 | /* if the IRQ state is HOLD_LINE, clear it */ |
| 1574 | 1574 | if (inputline->curstate == HOLD_LINE) |
| 1575 | 1575 | { |
| 1576 | LOG(("->set_irq_line('%s',%d,%d)\n", device->tag | |
| 1576 | LOG(("->set_irq_line('%s',%d,%d)\n", device->tag | |
| 1577 | 1577 | cpu_set_info(device, CPUINFO_INT_INPUT_STATE + irqline, CLEAR_LINE); |
| 1578 | 1578 | inputline->curstate = CLEAR_LINE; |
| 1579 | 1579 | } |
| r7553 | r7554 | |
|---|---|---|
| 1342 | 1342 | /* screen 0 parameters */ |
| 1343 | 1343 | for (devconfig = video_screen_first(config); devconfig != NULL; devconfig = video_screen_next(devconfig)) |
| 1344 | 1344 | { |
| 1345 | int scrnum = config->devicelist.index(VIDEO_SCREEN, devconfig->tag); | |
| 1345 | int scrnum = config->devicelist.index(VIDEO_SCREEN, devconfig->tag()); | |
| 1346 | 1346 | const screen_config *scrconfig = (const screen_config *)devconfig->inline_config; |
| 1347 | 1347 | |
| 1348 | 1348 | /* native X aspect factor */ |
| r7553 | r7554 | |
|---|---|---|
| 212 | 212 | #define cpu_count(config) (config)->devicelist.count(CPU) |
| 213 | 213 | #define cpu_first(config) (config)->devicelist.first(CPU) |
| 214 | 214 | #define cpu_next(previous) (previous)->typenext() |
| 215 | #define cpu_get_index(cpu) (cpu)->machine->devicelist.index(CPU, (cpu)->tag) | |
| 215 | #define cpu_get_index(cpu) (cpu)->machine->devicelist.index(CPU, (cpu)->tag()) | |
| 216 | 216 | |
| 217 | 217 | |
| 218 | 218 | /* IRQ callback to be called by CPU cores when an IRQ is actually taken */ |
| r7553 | r7554 | |
|---|---|---|
| 176 | 176 | log_num = node_module_index(node); |
| 177 | 177 | context->sample_num = 0; |
| 178 | 178 | |
| 179 | sprintf(context->name, "discrete_%s_%d.csv", node->info->device->tag | |
| 179 | sprintf(context->name, "discrete_%s_%d.csv", node->info->device->tag | |
| 180 | 180 | context->csv_file = fopen(context->name, "w"); |
| 181 | 181 | /* Output some header info */ |
| 182 | 182 | fprintf(context->csv_file, "\"MAME Discrete System Node Log\"\n"); |
| r7553 | r7554 | |
| 220 | 220 | int log_num; |
| 221 | 221 | |
| 222 | 222 | log_num = node_module_index(node); |
| 223 | sprintf(context->name, "discrete_%s_%d.wav", node->info->device->tag | |
| 223 | sprintf(context->name, "discrete_%s_%d.wav", node->info->device->tag | |
| 224 | 224 | context->wavfile = wav_open(context->name, node->info->sample_rate, node->active_inputs/2); |
| 225 | 225 | } |
| 226 | 226 |
| r7553 | r7554 | |
|---|---|---|
| 217 | 217 | |
| 218 | 218 | if( voice->prescaler != 0 ) |
| 219 | 219 | { |
| 220 | logerror("error: msm5205_vclk_w() called with chip = '%s', but VCLK selected master mode\n", device->tag | |
| 220 | logerror("error: msm5205_vclk_w() called with chip = '%s', but VCLK selected master mode\n", device->tag | |
| 221 | 221 | } |
| 222 | 222 | else |
| 223 | 223 | { |
| r7553 | r7554 | |
|---|---|---|
| 340 | 340 | if ((data & 0xff) > 0x1c) |
| 341 | 341 | { |
| 342 | 342 | /* Error! */ |
| 343 | logerror("%s: (SAA1099 '%s') Unknown register selected\n",cpuexec_describe_context(device->machine), device->tag | |
| 343 | logerror("%s: (SAA1099 '%s') Unknown register selected\n",cpuexec_describe_context(device->machine), device->tag | |
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | saa->selected_reg = data & 0x1f; |
| r7553 | r7554 | |
| 426 | 426 | int i; |
| 427 | 427 | |
| 428 | 428 | /* Synch & Reset generators */ |
| 429 | logerror("%s: (SAA1099 '%s') -reg 0x1c- Chip reset\n",cpuexec_describe_context(device->machine), device->tag | |
| 429 | logerror("%s: (SAA1099 '%s') -reg 0x1c- Chip reset\n",cpuexec_describe_context(device->machine), device->tag | |
| 430 | 430 | for (i = 0; i < 6; i++) |
| 431 | 431 | { |
| 432 | 432 | saa->channels[i].level = 0; |
| r7553 | r7554 | |
| 435 | 435 | } |
| 436 | 436 | break; |
| 437 | 437 | default: /* Error! */ |
| 438 | logerror("%s: (SAA1099 '%s') Unknown operation (reg:%02x, data:%02x)\n",cpuexec_describe_context(device->machine), device->tag | |
| 438 | logerror("%s: (SAA1099 '%s') Unknown operation (reg:%02x, data:%02x)\n",cpuexec_describe_context(device->machine), device->tag | |
| 439 | 439 | } |
| 440 | 440 | } |
| 441 | 441 |
| r7553 | r7554 | |
|---|---|---|
| 651 | 651 | { |
| 652 | 652 | digitalker *dg = get_safe_token(device); |
| 653 | 653 | dg->device = device; |
| 654 | dg->rom = memory_region(device->machine, device->tag); | |
| 654 | dg->rom = memory_region(device->machine, device->tag()); | |
| 655 | 655 | dg->stream = stream_create(device, 0, 1, device->clock/4, dg, digitalker_update); |
| 656 | 656 | dg->dac_index = 128; |
| 657 | 657 | dg->data = 0xff; |
| r7553 | r7554 | |
|---|---|---|
| 805 | 805 | { |
| 806 | 806 | int r = devcb_call_read8(&p->pot_r[pot], pot); |
| 807 | 807 | |
| 808 | LOG(("POKEY %s pot_r(%d) returned $%02x\n", p->device->tag | |
| 808 | LOG(("POKEY %s pot_r(%d) returned $%02x\n", p->device->tag | |
| 809 | 809 | if( r != -1 ) |
| 810 | 810 | { |
| 811 | 811 | if (r > 228) |
| r7553 | r7554 | |
| 840 | 840 | if( p->ALLPOT & (1 << pot) ) |
| 841 | 841 | { |
| 842 | 842 | data = timer_timeelapsed(p->ptimer[pot]).attoseconds / AD_TIME.attoseconds; |
| 843 | LOG(("POKEY '%s' read POT%d (interpolated) $%02x\n", p->device->tag | |
| 843 | LOG(("POKEY '%s' read POT%d (interpolated) $%02x\n", p->device->tag | |
| 844 | 844 | } |
| 845 | 845 | else |
| 846 | 846 | { |
| 847 | 847 | data = p->POTx[pot]; |
| 848 | LOG(("POKEY '%s' read POT%d (final value) $%02x\n", p->device->tag | |
| 848 | LOG(("POKEY '%s' read POT%d (final value) $%02x\n", p->device->tag | |
| 849 | 849 | } |
| 850 | 850 | } |
| 851 | 851 | else |
| 852 | logerror("%s: warning - read '%s' POT%d\n", cpuexec_describe_context(p->device->machine), p->device->tag | |
| 852 | logerror("%s: warning - read '%s' POT%d\n", cpuexec_describe_context(p->device->machine), p->device->tag | |
| 853 | 853 | break; |
| 854 | 854 | |
| 855 | 855 | case ALLPOT_C: |
| r7553 | r7554 | |
| 860 | 860 | if( (p->SKCTL & SK_RESET) == 0) |
| 861 | 861 | { |
| 862 | 862 | data = 0; |
| 863 | LOG(("POKEY '%s' ALLPOT internal $%02x (reset)\n", p->device->tag | |
| 863 | LOG(("POKEY '%s' ALLPOT internal $%02x (reset)\n", p->device->tag | |
| 864 | 864 | } |
| 865 | 865 | else if( p->allpot_r.read ) |
| 866 | 866 | { |
| 867 | 867 | data = devcb_call_read8(&p->allpot_r, offset); |
| 868 | LOG(("POKEY '%s' ALLPOT callback $%02x\n", p->device->tag | |
| 868 | LOG(("POKEY '%s' ALLPOT callback $%02x\n", p->device->tag | |
| 869 | 869 | } |
| 870 | 870 | else |
| 871 | 871 | { |
| 872 | 872 | data = p->ALLPOT; |
| 873 | LOG(("POKEY '%s' ALLPOT internal $%02x\n", p->device->tag | |
| 873 | LOG(("POKEY '%s' ALLPOT internal $%02x\n", p->device->tag | |
| 874 | 874 | } |
| 875 | 875 | break; |
| 876 | 876 | |
| r7553 | r7554 | |
| 898 | 898 | adjust = 1; |
| 899 | 899 | p->r9 = 0; |
| 900 | 900 | p->r17 = 0; |
| 901 | LOG_RAND(("POKEY '%s' rand17 frozen (SKCTL): $%02x\n", p->device->tag | |
| 901 | LOG_RAND(("POKEY '%s' rand17 frozen (SKCTL): $%02x\n", p->device->tag | |
| 902 | 902 | } |
| 903 | 903 | if( p->AUDCTL & POLY9 ) |
| 904 | 904 | { |
| 905 | 905 | p->RANDOM = p->rand9[p->r9]; |
| 906 | LOG_RAND(("POKEY '%s' adjust %u rand9[$%05x]: $%02x\n", p->device->tag | |
| 906 | LOG_RAND(("POKEY '%s' adjust %u rand9[$%05x]: $%02x\n", p->device->tag | |
| 907 | 907 | } |
| 908 | 908 | else |
| 909 | 909 | { |
| 910 | 910 | p->RANDOM = p->rand17[p->r17]; |
| 911 | LOG_RAND(("POKEY '%s' adjust %u rand17[$%05x]: $%02x\n", p->device->tag | |
| 911 | LOG_RAND(("POKEY '%s' adjust %u rand17[$%05x]: $%02x\n", p->device->tag | |
| 912 | 912 | } |
| 913 | 913 | if (adjust > 0) |
| 914 | 914 | timer_adjust_oneshot(p->rtimer, attotime_never, 0); |
| r7553 | r7554 | |
| 919 | 919 | if( p->serin_r.read ) |
| 920 | 920 | p->SERIN = devcb_call_read8(&p->serin_r, offset); |
| 921 | 921 | data = p->SERIN; |
| 922 | LOG(("POKEY '%s' SERIN $%02x\n", p->device->tag | |
| 922 | LOG(("POKEY '%s' SERIN $%02x\n", p->device->tag | |
| 923 | 923 | break; |
| 924 | 924 | |
| 925 | 925 | case IRQST_C: |
| 926 | 926 | /* IRQST is an active low input port; we keep it active high */ |
| 927 | 927 | /* internally to ease the (un-)masking of bits */ |
| 928 | 928 | data = p->IRQST ^ 0xff; |
| 929 | LOG(("POKEY '%s' IRQST $%02x\n", p->device->tag | |
| 929 | LOG(("POKEY '%s' IRQST $%02x\n", p->device->tag | |
| 930 | 930 | break; |
| 931 | 931 | |
| 932 | 932 | case SKSTAT_C: |
| 933 | 933 | /* SKSTAT is also an active low input port */ |
| 934 | 934 | data = p->SKSTAT ^ 0xff; |
| 935 | LOG(("POKEY '%s' SKSTAT $%02x\n", p->device->tag | |
| 935 | LOG(("POKEY '%s' SKSTAT $%02x\n", p->device->tag | |
| 936 | 936 | break; |
| 937 | 937 | |
| 938 | 938 | default: |
| 939 | LOG(("POKEY '%s' register $%02x\n", p->device->tag | |
| 939 | LOG(("POKEY '%s' register $%02x\n", p->device->tag | |
| 940 | 940 | break; |
| 941 | 941 | } |
| 942 | 942 | return data; |
| r7553 | r7554 | |
| 966 | 966 | case AUDF1_C: |
| 967 | 967 | if( data == p->AUDF[CHAN1] ) |
| 968 | 968 | return; |
| 969 | LOG_SOUND(("POKEY '%s' AUDF1 $%02x\n", p->device->tag | |
| 969 | LOG_SOUND(("POKEY '%s' AUDF1 $%02x\n", p->device->tag | |
| 970 | 970 | p->AUDF[CHAN1] = data; |
| 971 | 971 | ch_mask = 1 << CHAN1; |
| 972 | 972 | if( p->AUDCTL & CH12_JOINED ) /* if ch 1&2 tied together */ |
| r7553 | r7554 | |
| 976 | 976 | case AUDC1_C: |
| 977 | 977 | if( data == p->AUDC[CHAN1] ) |
| 978 | 978 | return; |
| 979 | LOG_SOUND(("POKEY '%s' AUDC1 $%02x (%s)\n", p->device->tag | |
| 979 | LOG_SOUND(("POKEY '%s' AUDC1 $%02x (%s)\n", p->device->tag | |
| 980 | 980 | p->AUDC[CHAN1] = data; |
| 981 | 981 | ch_mask = 1 << CHAN1; |
| 982 | 982 | break; |
| r7553 | r7554 | |
| 984 | 984 | case AUDF2_C: |
| 985 | 985 | if( data == p->AUDF[CHAN2] ) |
| 986 | 986 | return; |
| 987 | LOG_SOUND(("POKEY '%s' AUDF2 $%02x\n", p->device->tag | |
| 987 | LOG_SOUND(("POKEY '%s' AUDF2 $%02x\n", p->device->tag | |
| 988 | 988 | p->AUDF[CHAN2] = data; |
| 989 | 989 | ch_mask = 1 << CHAN2; |
| 990 | 990 | break; |
| r7553 | r7554 | |
| 992 | 992 | case AUDC2_C: |
| 993 | 993 | if( data == p->AUDC[CHAN2] ) |
| 994 | 994 | return; |
| 995 | LOG_SOUND(("POKEY '%s' AUDC2 $%02x (%s)\n", p->device->tag | |
| 995 | LOG_SOUND(("POKEY '%s' AUDC2 $%02x (%s)\n", p->device->tag | |
| 996 | 996 | p->AUDC[CHAN2] = data; |
| 997 | 997 | ch_mask = 1 << CHAN2; |
| 998 | 998 | break; |
| r7553 | r7554 | |
| 1000 | 1000 | case AUDF3_C: |
| 1001 | 1001 | if( data == p->AUDF[CHAN3] ) |
| 1002 | 1002 | return; |
| 1003 | LOG_SOUND(("POKEY '%s' AUDF3 $%02x\n", p->device->tag | |
| 1003 | LOG_SOUND(("POKEY '%s' AUDF3 $%02x\n", p->device->tag | |
| 1004 | 1004 | p->AUDF[CHAN3] = data; |
| 1005 | 1005 | ch_mask = 1 << CHAN3; |
| 1006 | 1006 | |
| r7553 | r7554 | |
| 1011 | 1011 | case AUDC3_C: |
| 1012 | 1012 | if( data == p->AUDC[CHAN3] ) |
| 1013 | 1013 | return; |
| 1014 | LOG_SOUND(("POKEY '%s' AUDC3 $%02x (%s)\n", p->device->tag | |
| 1014 | LOG_SOUND(("POKEY '%s' AUDC3 $%02x (%s)\n", p->device->tag | |
| 1015 | 1015 | p->AUDC[CHAN3] = data; |
| 1016 | 1016 | ch_mask = 1 << CHAN3; |
| 1017 | 1017 | break; |
| r7553 | r7554 | |
| 1019 | 1019 | case AUDF4_C: |
| 1020 | 1020 | if( data == p->AUDF[CHAN4] ) |
| 1021 | 1021 | return; |
| 1022 | LOG_SOUND(("POKEY '%s' AUDF4 $%02x\n", p->device->tag | |
| 1022 | LOG_SOUND(("POKEY '%s' AUDF4 $%02x\n", p->device->tag | |
| 1023 | 1023 | p->AUDF[CHAN4] = data; |
| 1024 | 1024 | ch_mask = 1 << CHAN4; |
| 1025 | 1025 | break; |
| r7553 | r7554 | |
| 1027 | 1027 | case AUDC4_C: |
| 1028 | 1028 | if( data == p->AUDC[CHAN4] ) |
| 1029 | 1029 | return; |
| 1030 | LOG_SOUND(("POKEY '%s' AUDC4 $%02x (%s)\n", p->device->tag | |
| 1030 | LOG_SOUND(("POKEY '%s' AUDC4 $%02x (%s)\n", p->device->tag | |
| 1031 | 1031 | p->AUDC[CHAN4] = data; |
| 1032 | 1032 | ch_mask = 1 << CHAN4; |
| 1033 | 1033 | break; |
| r7553 | r7554 | |
| 1035 | 1035 | case AUDCTL_C: |
| 1036 | 1036 | if( data == p->AUDCTL ) |
| 1037 | 1037 | return; |
| 1038 | LOG_SOUND(("POKEY '%s' AUDCTL $%02x (%s)\n", p->device->tag | |
| 1038 | LOG_SOUND(("POKEY '%s' AUDCTL $%02x (%s)\n", p->device->tag | |
| 1039 | 1039 | p->AUDCTL = data; |
| 1040 | 1040 | ch_mask = 15; /* all channels */ |
| 1041 | 1041 | /* determine the base multiplier for the 'div by n' calculations */ |
| r7553 | r7554 | |
| 1044 | 1044 | |
| 1045 | 1045 | case STIMER_C: |
| 1046 | 1046 | /* first remove any existing timers */ |
| 1047 | LOG_TIMER(("POKEY '%s' STIMER $%02x\n", p->device->tag | |
| 1047 | LOG_TIMER(("POKEY '%s' STIMER $%02x\n", p->device->tag | |
| 1048 | 1048 | |
| 1049 | 1049 | timer_adjust_oneshot(p->timer[TIMER1], attotime_never, p->timer_param[TIMER1]); |
| 1050 | 1050 | timer_adjust_oneshot(p->timer[TIMER2], attotime_never, p->timer_param[TIMER2]); |
| r7553 | r7554 | |
| 1062 | 1062 | { |
| 1063 | 1063 | if( p->divisor[CHAN2] > 4 ) |
| 1064 | 1064 | { |
| 1065 | LOG_TIMER(("POKEY '%s' timer1+2 after %d clocks\n", p->device->tag | |
| 1065 | LOG_TIMER(("POKEY '%s' timer1+2 after %d clocks\n", p->device->tag | |
| 1066 | 1066 | /* set timer #1 _and_ #2 event after timer_div clocks of joined CHAN1+CHAN2 */ |
| 1067 | 1067 | p->timer_period[TIMER2] = attotime_mul(p->clock_period, p->divisor[CHAN2]); |
| 1068 | 1068 | p->timer_param[TIMER2] = IRQ_TIMR2|IRQ_TIMR1; |
| r7553 | r7554 | |
| 1073 | 1073 | { |
| 1074 | 1074 | if( p->divisor[CHAN1] > 4 ) |
| 1075 | 1075 | { |
| 1076 | LOG_TIMER(("POKEY '%s' timer1 after %d clocks\n", p->device->tag | |
| 1076 | LOG_TIMER(("POKEY '%s' timer1 after %d clocks\n", p->device->tag | |
| 1077 | 1077 | /* set timer #1 event after timer_div clocks of CHAN1 */ |
| 1078 | 1078 | p->timer_period[TIMER1] = attotime_mul(p->clock_period, p->divisor[CHAN1]); |
| 1079 | 1079 | p->timer_param[TIMER1] = IRQ_TIMR1; |
| r7553 | r7554 | |
| 1082 | 1082 | |
| 1083 | 1083 | if( p->divisor[CHAN2] > 4 ) |
| 1084 | 1084 | { |
| 1085 | LOG_TIMER(("POKEY '%s' timer2 after %d clocks\n", p->device->tag | |
| 1085 | LOG_TIMER(("POKEY '%s' timer2 after %d clocks\n", p->device->tag | |
| 1086 | 1086 | /* set timer #2 event after timer_div clocks of CHAN2 */ |
| 1087 | 1087 | p->timer_period[TIMER2] = attotime_mul(p->clock_period, p->divisor[CHAN2]); |
| 1088 | 1088 | p->timer_param[TIMER2] = IRQ_TIMR2; |
| r7553 | r7554 | |
| 1099 | 1099 | { |
| 1100 | 1100 | if( p->divisor[CHAN4] > 4 ) |
| 1101 | 1101 | { |
| 1102 | LOG_TIMER(("POKEY '%s' timer4 after %d clocks\n", p->device->tag | |
| 1102 | LOG_TIMER(("POKEY '%s' timer4 after %d clocks\n", p->device->tag | |
| 1103 | 1103 | /* set timer #4 event after timer_div clocks of CHAN4 */ |
| 1104 | 1104 | p->timer_period[TIMER4] = attotime_mul(p->clock_period, p->divisor[CHAN4]); |
| 1105 | 1105 | p->timer_param[TIMER4] = IRQ_TIMR4; |
| r7553 | r7554 | |
| 1111 | 1111 | { |
| 1112 | 1112 | if( p->divisor[CHAN4] > 4 ) |
| 1113 | 1113 | { |
| 1114 | LOG_TIMER(("POKEY '%s' timer4 after %d clocks\n", p->device->tag | |
| 1114 | LOG_TIMER(("POKEY '%s' timer4 after %d clocks\n", p->device->tag | |
| 1115 | 1115 | /* set timer #4 event after timer_div clocks of CHAN4 */ |
| 1116 | 1116 | p->timer_period[TIMER4] = attotime_mul(p->clock_period, p->divisor[CHAN4]); |
| 1117 | 1117 | p->timer_param[TIMER4] = IRQ_TIMR4; |
| r7553 | r7554 | |
| 1126 | 1126 | |
| 1127 | 1127 | case SKREST_C: |
| 1128 | 1128 | /* reset SKSTAT */ |
| 1129 | LOG(("POKEY '%s' SKREST $%02x\n", p->device->tag | |
| 1129 | LOG(("POKEY '%s' SKREST $%02x\n", p->device->tag | |
| 1130 | 1130 | p->SKSTAT &= ~(SK_FRAME|SK_OVERRUN|SK_KBERR); |
| 1131 | 1131 | break; |
| 1132 | 1132 | |
| 1133 | 1133 | case POTGO_C: |
| 1134 | LOG(("POKEY '%s' POTGO $%02x\n", p->device->tag | |
| 1134 | LOG(("POKEY '%s' POTGO $%02x\n", p->device->tag | |
| 1135 | 1135 | pokey_potgo(p); |
| 1136 | 1136 | break; |
| 1137 | 1137 | |
| 1138 | 1138 | case SEROUT_C: |
| 1139 | LOG(("POKEY '%s' SEROUT $%02x\n", p->device->tag | |
| 1139 | LOG(("POKEY '%s' SEROUT $%02x\n", p->device->tag | |
| 1140 | 1140 | devcb_call_write8(&p->serout_w, offset, data); |
| 1141 | 1141 | p->SKSTAT |= SK_SEROUT; |
| 1142 | 1142 | /* |
| r7553 | r7554 | |
| 1150 | 1150 | break; |
| 1151 | 1151 | |
| 1152 | 1152 | case IRQEN_C: |
| 1153 | LOG(("POKEY '%s' IRQEN $%02x\n", p->device->tag | |
| 1153 | LOG(("POKEY '%s' IRQEN $%02x\n", p->device->tag | |
| 1154 | 1154 | |
| 1155 | 1155 | /* acknowledge one or more IRQST bits ? */ |
| 1156 | 1156 | if( p->IRQST & ~data ) |
| r7553 | r7554 | |
| 1176 | 1176 | case SKCTL_C: |
| 1177 | 1177 | if( data == p->SKCTL ) |
| 1178 | 1178 | return; |
| 1179 | LOG(("POKEY '%s' SKCTL $%02x\n", p->device->tag | |
| 1179 | LOG(("POKEY '%s' SKCTL $%02x\n", p->device->tag | |
| 1180 | 1180 | p->SKCTL = data; |
| 1181 | 1181 | if( !(data & SK_RESET) ) |
| 1182 | 1182 | { |
| r7553 | r7554 | |
| 1204 | 1204 | else |
| 1205 | 1205 | new_val = (p->AUDF[CHAN1] + DIVADD_LOCLK) * p->clockmult; |
| 1206 | 1206 | |
| 1207 | LOG_SOUND(("POKEY '%s' chan1 %d\n", p->device->tag | |
| 1207 | LOG_SOUND(("POKEY '%s' chan1 %d\n", p->device->tag | |
| 1208 | 1208 | |
| 1209 | 1209 | p->volume[CHAN1] = (p->AUDC[CHAN1] & VOLUME_MASK) * POKEY_DEFAULT_GAIN; |
| 1210 | 1210 | p->divisor[CHAN1] = new_val; |
| r7553 | r7554 | |
| 1234 | 1234 | new_val = p->AUDF[CHAN2] * 256 + p->AUDF[CHAN1] + DIVADD_HICLK_JOINED; |
| 1235 | 1235 | else |
| 1236 | 1236 | new_val = (p->AUDF[CHAN2] * 256 + p->AUDF[CHAN1] + DIVADD_LOCLK) * p->clockmult; |
| 1237 | LOG_SOUND(("POKEY '%s' chan1+2 %d\n", p->device->tag | |
| 1237 | LOG_SOUND(("POKEY '%s' chan1+2 %d\n", p->device->tag | |
| 1238 | 1238 | } |
| 1239 | 1239 | else |
| 1240 | 1240 | { |
| 1241 | 1241 | new_val = (p->AUDF[CHAN2] + DIVADD_LOCLK) * p->clockmult; |
| 1242 | LOG_SOUND(("POKEY '%s' chan2 %d\n", p->device->tag | |
| 1242 | LOG_SOUND(("POKEY '%s' chan2 %d\n", p->device->tag | |
| 1243 | 1243 | } |
| 1244 | 1244 | |
| 1245 | 1245 | p->volume[CHAN2] = (p->AUDC[CHAN2] & VOLUME_MASK) * POKEY_DEFAULT_GAIN; |
| r7553 | r7554 | |
| 1269 | 1269 | else |
| 1270 | 1270 | new_val = (p->AUDF[CHAN3] + DIVADD_LOCLK) * p->clockmult; |
| 1271 | 1271 | |
| 1272 | LOG_SOUND(("POKEY '%s' chan3 %d\n", p->device->tag | |
| 1272 | LOG_SOUND(("POKEY '%s' chan3 %d\n", p->device->tag | |
| 1273 | 1273 | |
| 1274 | 1274 | p->volume[CHAN3] = (p->AUDC[CHAN3] & VOLUME_MASK) * POKEY_DEFAULT_GAIN; |
| 1275 | 1275 | p->divisor[CHAN3] = new_val; |
| r7553 | r7554 | |
| 1299 | 1299 | new_val = p->AUDF[CHAN4] * 256 + p->AUDF[CHAN3] + DIVADD_HICLK_JOINED; |
| 1300 | 1300 | else |
| 1301 | 1301 | new_val = (p->AUDF[CHAN4] * 256 + p->AUDF[CHAN3] + DIVADD_LOCLK) * p->clockmult; |
| 1302 | LOG_SOUND(("POKEY '%s' chan3+4 %d\n", p->device->tag | |
| 1302 | LOG_SOUND(("POKEY '%s' chan3+4 %d\n", p->device->tag | |
| 1303 | 1303 | } |
| 1304 | 1304 | else |
| 1305 | 1305 | { |
| 1306 | 1306 | new_val = (p->AUDF[CHAN4] + DIVADD_LOCLK) * p->clockmult; |
| 1307 | LOG_SOUND(("POKEY '%s' chan4 %d\n", p->device->tag | |
| 1307 | LOG_SOUND(("POKEY '%s' chan4 %d\n", p->device->tag | |
| 1308 | 1308 | } |
| 1309 | 1309 | |
| 1310 | 1310 | p->volume[CHAN4] = (p->AUDC[CHAN4] & VOLUME_MASK) * POKEY_DEFAULT_GAIN; |
| r7553 | r7554 | |
|---|---|---|
| 527 | 527 | if (psg->portAwrite.write) |
| 528 | 528 | devcb_call_write8(&psg->portAwrite, 0, psg->regs[AY_PORTA]); |
| 529 | 529 | else |
| 530 | logerror("warning - write %02x to 8910 '%s' Port A\n",psg->regs[AY_PORTA],psg->device->tag | |
| 530 | logerror("warning - write %02x to 8910 '%s' Port A\n",psg->regs[AY_PORTA],psg->device->tag | |
| 531 | 531 | } |
| 532 | 532 | else |
| 533 | 533 | { |
| 534 | logerror("warning: write to 8910 '%s' Port A set as input - ignored\n",psg->device->tag | |
| 534 | logerror("warning: write to 8910 '%s' Port A set as input - ignored\n",psg->device->tag | |
| 535 | 535 | } |
| 536 | 536 | break; |
| 537 | 537 | case AY_PORTB: |
| r7553 | r7554 | |
| 540 | 540 | if (psg->portBwrite.write) |
| 541 | 541 | devcb_call_write8(&psg->portBwrite, 0, psg->regs[AY_PORTB]); |
| 542 | 542 | else |
| 543 | logerror("warning - write %02x to 8910 '%s' Port B\n",psg->regs[AY_PORTB],psg->device->tag | |
| 543 | logerror("warning - write %02x to 8910 '%s' Port B\n",psg->regs[AY_PORTB],psg->device->tag | |
| 544 | 544 | } |
| 545 | 545 | else |
| 546 | 546 | { |
| 547 | logerror("warning: write to 8910 '%s' Port B set as input - ignored\n",psg->device->tag | |
| 547 | logerror("warning: write to 8910 '%s' Port B set as input - ignored\n",psg->device->tag | |
| 548 | 548 | } |
| 549 | 549 | break; |
| 550 | 550 | } |
| r7553 | r7554 | |
| 881 | 881 | { |
| 882 | 882 | case AY_PORTA: |
| 883 | 883 | if ((psg->regs[AY_ENABLE] & 0x40) != 0) |
| 884 | logerror("warning: read from 8910 '%s' Port A set as output\n",psg->device->tag | |
| 884 | logerror("warning: read from 8910 '%s' Port A set as output\n",psg->device->tag | |
| 885 | 885 | /* |
| 886 | 886 | even if the port is set as output, we still need to return the external |
| 887 | 887 | data. Some games, like kidniki, need this to work. |
| r7553 | r7554 | |
| 889 | 889 | if (psg->portAread.read) |
| 890 | 890 | psg->regs[AY_PORTA] = devcb_call_read8(&psg->portAread, 0); |
| 891 | 891 | else |
| 892 | logerror("%s: warning - read 8910 '%s' Port A\n",cpuexec_describe_context(psg->device->machine),psg->device->tag | |
| 892 | logerror("%s: warning - read 8910 '%s' Port A\n",cpuexec_describe_context(psg->device->machine),psg->device->tag | |
| 893 | 893 | break; |
| 894 | 894 | case AY_PORTB: |
| 895 | 895 | if ((psg->regs[AY_ENABLE] & 0x80) != 0) |
| 896 | logerror("warning: read from 8910 '%s' Port B set as output\n",psg->device->tag | |
| 896 | logerror("warning: read from 8910 '%s' Port B set as output\n",psg->device->tag | |
| 897 | 897 | if (psg->portBread.read) |
| 898 | 898 | psg->regs[AY_PORTB] = devcb_call_read8(&psg->portBread, 0); |
| 899 | 899 | else |
| 900 | logerror("%s: warning - read 8910 '%s' Port B\n",cpuexec_describe_context(psg->device->machine),psg->device->tag | |
| 900 | logerror("%s: warning - read 8910 '%s' Port B\n",cpuexec_describe_context(psg->device->machine),psg->device->tag | |
| 901 | 901 | break; |
| 902 | 902 | } |
| 903 | 903 | return psg->regs[r]; |
| r7553 | r7554 | |
|---|---|---|
| 496 | 496 | info->total_stream_updates = 0; |
| 497 | 497 | |
| 498 | 498 | /* create the logfile */ |
| 499 | sprintf(name, "discrete%s.log", device->tag | |
| 499 | sprintf(name, "discrete%s.log", device->tag | |
| 500 | 500 | if (DISCRETE_DEBUGLOG) |
| 501 | 501 | info->disclogfile = fopen(name, "w"); |
| 502 | 502 |
| r7553 | r7554 | |
|---|---|---|
| 112 | 112 | p->device = device; |
| 113 | 113 | p->cpudevice = device->machine->device(intf->cpu); |
| 114 | 114 | if (p->cpudevice == NULL) |
| 115 | fatalerror("c6280_init: no CPU found with tag of '%s'\n", device->tag | |
| 115 | fatalerror("c6280_init: no CPU found with tag of '%s'\n", device->tag | |
| 116 | 116 | |
| 117 | 117 | /* Make waveform frequency table */ |
| 118 | 118 | for(i = 0; i < 4096; i += 1) |
| r7553 | r7554 | |
|---|---|---|
| 528 | 528 | SCSP->MidiOutR=SCSP->MidiOutW=0; |
| 529 | 529 | |
| 530 | 530 | // get SCSP RAM |
| 531 | if (strcmp(device->tag, "scsp") == 0 || strcmp(device->tag, "scsp1") == 0) | |
| 531 | if (strcmp(device->tag(), "scsp") == 0 || strcmp(device->tag(), "scsp1") == 0) | |
| 532 | 532 | { |
| 533 | 533 | SCSP->Master=1; |
| 534 | 534 | } |
| r7553 | r7554 | |
|---|---|---|
| 167 | 167 | /* setup adpcm buffers */ |
| 168 | 168 | pcmbufa = *device->region; |
| 169 | 169 | pcmsizea = device->region->bytes(); |
| 170 | name.printf("%s.deltat", device->tag | |
| 170 | name.printf("%s.deltat", device->tag | |
| 171 | 171 | pcmbufb = (void *)(memory_region(device->machine, name)); |
| 172 | 172 | pcmsizeb = memory_region_length(device->machine, name); |
| 173 | 173 | if (pcmbufb == NULL || pcmsizeb == 0) |
| r7553 | r7554 | |
|---|---|---|
| 429 | 429 | } |
| 430 | 430 | else |
| 431 | 431 | { |
| 432 | logerror("OKIM6376:'%s' requested to play sample %02x on non-stopped voice\n",device->tag | |
| 432 | logerror("OKIM6376:'%s' requested to play sample %02x on non-stopped voice\n",device->tag | |
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | } |
| r7553 | r7554 | |
|---|---|---|
| 405 | 405 | if (!info->bank_installed && base != 0) |
| 406 | 406 | { |
| 407 | 407 | /* override our memory map with a bank */ |
| 408 | memory_install_read_bank(device->space(), 0x00000, 0x3ffff, 0, 0, device->tag); | |
| 408 | memory_install_read_bank(device->space(), 0x00000, 0x3ffff, 0, 0, device->tag()); | |
| 409 | 409 | info->bank_installed = TRUE; |
| 410 | 410 | } |
| 411 | 411 | |
| r7553 | r7554 | |
| 413 | 413 | if (info->bank_installed) |
| 414 | 414 | { |
| 415 | 415 | info->bank_offs = base; |
| 416 | memory_set_bankptr(device->machine, device->tag, device->region->base.u8 + base); | |
| 416 | memory_set_bankptr(device->machine, device->tag(), device->region->base.u8 + base); | |
| 417 | 417 | } |
| 418 | 418 | } |
| 419 | 419 | |
| r7553 | r7554 | |
| 522 | 522 | } |
| 523 | 523 | else |
| 524 | 524 | { |
| 525 | logerror("OKIM6295:'%s' requested to play sample %02x on non-stopped voice\n",device->tag | |
| 525 | logerror("OKIM6295:'%s' requested to play sample %02x on non-stopped voice\n",device->tag | |
| 526 | 526 | } |
| 527 | 527 | } |
| 528 | 528 | /* invalid samples go here */ |
| 529 | 529 | else |
| 530 | 530 | { |
| 531 | logerror("OKIM6295:'%s' requested to play invalid sample %02x\n",device->tag | |
| 531 | logerror("OKIM6295:'%s' requested to play invalid sample %02x\n",device->tag | |
| 532 | 532 | voice->playing = 0; |
| 533 | 533 | } |
| 534 | 534 | } |
| r7553 | r7554 | |
|---|---|---|
| 650 | 650 | "Enabled", "Inhibited" |
| 651 | 651 | }; |
| 652 | 652 | |
| 653 | LOG(1, ("SN76477 '%s': Enable line (9): %d [%s]\n", sn->device->tag | |
| 653 | LOG(1, ("SN76477 '%s': Enable line (9): %d [%s]\n", sn->device->tag | |
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | |
| r7553 | r7554 | |
| 662 | 662 | "SLF/Noise", "SLF/VCO/Noise", "SLF/VCO", "Inhibit" |
| 663 | 663 | }; |
| 664 | 664 | |
| 665 | LOG(1, ("SN76477 '%s': Mixer mode (25-27): %d [%s]\n", sn->device->tag | |
| 665 | LOG(1, ("SN76477 '%s': Mixer mode (25-27): %d [%s]\n", sn->device->tag | |
| 666 | 666 | } |
| 667 | 667 | |
| 668 | 668 | |
| r7553 | r7554 | |
| 673 | 673 | "VCO", "One-Shot", "Mixer Only", "VCO with Alternating Polarity" |
| 674 | 674 | }; |
| 675 | 675 | |
| 676 | LOG(1, ("SN76477 '%s': Envelope mode (1,28): %d [%s]\n", sn->device->tag | |
| 676 | LOG(1, ("SN76477 '%s': Envelope mode (1,28): %d [%s]\n", sn->device->tag | |
| 677 | 677 | } |
| 678 | 678 | |
| 679 | 679 | |
| r7553 | r7554 | |
| 684 | 684 | "External (Pin 16)", "Internal (SLF)" |
| 685 | 685 | }; |
| 686 | 686 | |
| 687 | LOG(1, ("SN76477 '%s': VCO mode (22): %d [%s]\n", sn->device->tag | |
| 687 | LOG(1, ("SN76477 '%s': VCO mode (22): %d [%s]\n", sn->device->tag | |
| 688 | 688 | } |
| 689 | 689 | |
| 690 | 690 | |
| r7553 | r7554 | |
| 694 | 694 | { |
| 695 | 695 | if (compute_one_shot_cap_charging_rate(sn) > 0) |
| 696 | 696 | { |
| 697 | LOG(1, ("SN76477 '%s': One-shot time (23,24): %.4f sec\n", sn->device->tag | |
| 697 | LOG(1, ("SN76477 '%s': One-shot time (23,24): %.4f sec\n", sn->device->tag | |
| 698 | 698 | } |
| 699 | 699 | else |
| 700 | 700 | { |
| 701 | LOG(1, ("SN76477 '%s': One-shot time (23,24): N/A\n", sn->device->tag | |
| 701 | LOG(1, ("SN76477 '%s': One-shot time (23,24): N/A\n", sn->device->tag | |
| 702 | 702 | } |
| 703 | 703 | } |
| 704 | 704 | else |
| 705 | 705 | { |
| 706 | LOG(1, ("SN76477 '%s': One-shot time (23,24): External (cap = %.2fV)\n", sn->device->tag | |
| 706 | LOG(1, ("SN76477 '%s': One-shot time (23,24): External (cap = %.2fV)\n", sn->device->tag | |
| 707 | 707 | } |
| 708 | 708 | } |
| 709 | 709 | |
| r7553 | r7554 | |
| 717 | 717 | double charging_time = (1 / compute_slf_cap_charging_rate(sn)) * SLF_CAP_VOLTAGE_RANGE; |
| 718 | 718 | double discharging_time = (1 / compute_slf_cap_discharging_rate(sn)) * SLF_CAP_VOLTAGE_RANGE; |
| 719 | 719 | |
| 720 | LOG(1, ("SN76477 '%s': SLF frequency (20,21): %.2f Hz\n", sn->device->tag | |
| 720 | LOG(1, ("SN76477 '%s': SLF frequency (20,21): %.2f Hz\n", sn->device->tag | |
| 721 | 721 | } |
| 722 | 722 | else |
| 723 | 723 | { |
| 724 | LOG(1, ("SN76477 '%s': SLF frequency (20,21): N/A\n", sn->device->tag | |
| 724 | LOG(1, ("SN76477 '%s': SLF frequency (20,21): N/A\n", sn->device->tag | |
| 725 | 725 | } |
| 726 | 726 | } |
| 727 | 727 | else |
| 728 | 728 | { |
| 729 | LOG(1, ("SN76477 '%s': SLF frequency (20,21): External (cap = %.2fV)\n", sn->device->tag | |
| 729 | LOG(1, ("SN76477 '%s': SLF frequency (20,21): External (cap = %.2fV)\n", sn->device->tag | |
| 730 | 730 | } |
| 731 | 731 | } |
| 732 | 732 | |
| 733 | 733 | |
| 734 | 734 | static void log_vco_pitch_voltage(sn76477_state *sn) |
| 735 | 735 | { |
| 736 | LOG(1, ("SN76477 '%s': VCO pitch voltage (19): %.2fV\n", sn->device->tag | |
| 736 | LOG(1, ("SN76477 '%s': VCO pitch voltage (19): %.2fV\n", sn->device->tag | |
| 737 | 737 | } |
| 738 | 738 | |
| 739 | 739 | |
| 740 | 740 | static void log_vco_duty_cycle(sn76477_state *sn) |
| 741 | 741 | { |
| 742 | LOG(1, ("SN76477 '%s': VCO duty cycle (16,19): %.0f%%\n", sn->device->tag | |
| 742 | LOG(1, ("SN76477 '%s': VCO duty cycle (16,19): %.0f%%\n", sn->device->tag | |
| 743 | 743 | } |
| 744 | 744 | |
| 745 | 745 | |
| r7553 | r7554 | |
| 752 | 752 | double min_freq = compute_vco_cap_charging_discharging_rate(sn) / (2 * VCO_CAP_VOLTAGE_RANGE); |
| 753 | 753 | double max_freq = compute_vco_cap_charging_discharging_rate(sn) / (2 * VCO_TO_SLF_VOLTAGE_DIFF); |
| 754 | 754 | |
| 755 | LOG(1, ("SN76477 '%s': VCO frequency (17,18): %.2f Hz - %.1f Hz\n", sn->device->tag | |
| 755 | LOG(1, ("SN76477 '%s': VCO frequency (17,18): %.2f Hz - %.1f Hz\n", sn->device->tag | |
| 756 | 756 | } |
| 757 | 757 | else |
| 758 | 758 | { |
| 759 | LOG(1, ("SN76477 '%s': VCO frequency (17,18): N/A\n", sn->device->tag | |
| 759 | LOG(1, ("SN76477 '%s': VCO frequency (17,18): N/A\n", sn->device->tag | |
| 760 | 760 | } |
| 761 | 761 | } |
| 762 | 762 | else |
| 763 | 763 | { |
| 764 | LOG(1, ("SN76477 '%s': VCO frequency (17,18): External (cap = %.2fV)\n", sn->device->tag | |
| 764 | LOG(1, ("SN76477 '%s': VCO frequency (17,18): External (cap = %.2fV)\n", sn->device->tag | |
| 765 | 765 | } |
| 766 | 766 | } |
| 767 | 767 | |
| r7553 | r7554 | |
| 773 | 773 | double min_freq = compute_vco_cap_charging_discharging_rate(sn) / (2 * VCO_CAP_VOLTAGE_RANGE); |
| 774 | 774 | double max_freq = compute_vco_cap_charging_discharging_rate(sn) / (2 * VCO_TO_SLF_VOLTAGE_DIFF); |
| 775 | 775 | |
| 776 | LOG(1, ("SN76477 '%s': VCO ext. voltage (16): %.2fV (%.2f Hz)\n", sn->device->tag | |
| 776 | LOG(1, ("SN76477 '%s': VCO ext. voltage (16): %.2fV (%.2f Hz)\n", sn->device->tag | |
| 777 | 777 | sn->vco_voltage, |
| 778 | 778 | min_freq + ((max_freq - min_freq) * sn->vco_voltage / VCO_MAX_EXT_VOLTAGE))); |
| 779 | 779 | } |
| 780 | 780 | else |
| 781 | 781 | { |
| 782 | LOG(1, ("SN76477 '%s': VCO ext. voltage (16): %.2fV (saturated, no output)\n", sn->device->tag | |
| 782 | LOG(1, ("SN76477 '%s': VCO ext. voltage (16): %.2fV (saturated, no output)\n", sn->device->tag | |
| 783 | 783 | } |
| 784 | 784 | } |
| 785 | 785 | |
| r7553 | r7554 | |
| 788 | 788 | { |
| 789 | 789 | if (sn->noise_clock_ext) |
| 790 | 790 | { |
| 791 | LOG(1, ("SN76477 '%s': Noise gen frequency (4): External\n", sn->device->tag | |
| 791 | LOG(1, ("SN76477 '%s': Noise gen frequency (4): External\n", sn->device->tag | |
| 792 | 792 | } |
| 793 | 793 | else |
| 794 | 794 | { |
| 795 | 795 | if (compute_noise_gen_freq(sn) > 0) |
| 796 | 796 | { |
| 797 | LOG(1, ("SN76477 '%s': Noise gen frequency (4): %d Hz\n", sn->device->tag | |
| 797 | LOG(1, ("SN76477 '%s': Noise gen frequency (4): %d Hz\n", sn->device->tag | |
| 798 | 798 | } |
| 799 | 799 | else |
| 800 | 800 | { |
| 801 | LOG(1, ("SN76477 '%s': Noise gen frequency (4): N/A\n", sn->device->tag | |
| 801 | LOG(1, ("SN76477 '%s': Noise gen frequency (4): N/A\n", sn->device->tag | |
| 802 | 802 | } |
| 803 | 803 | } |
| 804 | 804 | } |
| r7553 | r7554 | |
| 817 | 817 | double charging_time = (1 / charging_rate) * NOISE_CAP_VOLTAGE_RANGE; |
| 818 | 818 | double discharging_time = (1 / charging_rate) * NOISE_CAP_VOLTAGE_RANGE; |
| 819 | 819 | |
| 820 | LOG(1, ("SN76477 '%s': Noise filter frequency (5,6): %.0f Hz\n", sn->device->tag | |
| 820 | LOG(1, ("SN76477 '%s': Noise filter frequency (5,6): %.0f Hz\n", sn->device->tag | |
| 821 | 821 | } |
| 822 | 822 | else |
| 823 | 823 | { |
| 824 | LOG(1, ("SN76477 '%s': Noise filter frequency (5,6): Very Large (Filtering Disabled)\n", sn->device->tag | |
| 824 | LOG(1, ("SN76477 '%s': Noise filter frequency (5,6): Very Large (Filtering Disabled)\n", sn->device->tag | |
| 825 | 825 | } |
| 826 | 826 | } |
| 827 | 827 | else |
| 828 | 828 | { |
| 829 | LOG(1, ("SN76477 '%s': Noise filter frequency (5,6): N/A\n", sn->device->tag | |
| 829 | LOG(1, ("SN76477 '%s': Noise filter frequency (5,6): N/A\n", sn->device->tag | |
| 830 | 830 | } |
| 831 | 831 | } |
| 832 | 832 | else |
| 833 | 833 | { |
| 834 | LOG(1, ("SN76477 '%s': Noise filter frequency (5,6): External (cap = %.2fV)\n", sn->device->tag | |
| 834 | LOG(1, ("SN76477 '%s': Noise filter frequency (5,6): External (cap = %.2fV)\n", sn->device->tag | |
| 835 | 835 | } |
| 836 | 836 | } |
| 837 | 837 | |
| r7553 | r7554 | |
| 842 | 842 | { |
| 843 | 843 | if (compute_attack_decay_cap_charging_rate(sn) > 0) |
| 844 | 844 | { |
| 845 | LOG(1, ("SN76477 '%s': Attack time (8,10): %.4f sec\n", sn->device->tag | |
| 845 | LOG(1, ("SN76477 '%s': Attack time (8,10): %.4f sec\n", sn->device->tag | |
| 846 | 846 | } |
| 847 | 847 | else |
| 848 | 848 | { |
| 849 | LOG(1, ("SN76477 '%s': Attack time (8,10): N/A\n", sn->device->tag | |
| 849 | LOG(1, ("SN76477 '%s': Attack time (8,10): N/A\n", sn->device->tag | |
| 850 | 850 | } |
| 851 | 851 | } |
| 852 | 852 | else |
| 853 | 853 | { |
| 854 | LOG(1, ("SN76477 '%s': Attack time (8,10): External (cap = %.2fV)\n", sn->device->tag | |
| 854 | LOG(1, ("SN76477 '%s': Attack time (8,10): External (cap = %.2fV)\n", sn->device->tag | |
| 855 | 855 | } |
| 856 | 856 | } |
| 857 | 857 | |
| r7553 | r7554 | |
| 862 | 862 | { |
| 863 | 863 | if (compute_attack_decay_cap_discharging_rate(sn) > 0) |
| 864 | 864 | { |
| 865 | LOG(1, ("SN76477 '%s': Decay time (7,8): %.4f sec\n", sn->device->tag | |
| 865 | LOG(1, ("SN76477 '%s': Decay time (7,8): %.4f sec\n", sn->device->tag | |
| 866 | 866 | } |
| 867 | 867 | else |
| 868 | 868 | { |
| 869 | LOG(1, ("SN76477 '%s': Decay time (8,10): N/A\n", sn->device->tag | |
| 869 | LOG(1, ("SN76477 '%s': Decay time (8,10): N/A\n", sn->device->tag | |
| 870 | 870 | } |
| 871 | 871 | } |
| 872 | 872 | else |
| 873 | 873 | { |
| 874 | LOG(1, ("SN76477 '%s': Decay time (7, 8): External (cap = %.2fV)\n", sn->device->tag | |
| 874 | LOG(1, ("SN76477 '%s': Decay time (7, 8): External (cap = %.2fV)\n", sn->device->tag | |
| 875 | 875 | } |
| 876 | 876 | } |
| 877 | 877 | |
| r7553 | r7554 | |
| 879 | 879 | static void log_voltage_out(sn76477_state *sn) |
| 880 | 880 | { |
| 881 | 881 | LOG(1, ("SN76477 '%s': Voltage OUT range (11,12): %.2fV - %.2fV (clips above %.2fV)\n", |
| 882 | sn->device->tag | |
| 882 | sn->device->tag | |
| 883 | 883 | OUT_CENTER_LEVEL_VOLTAGE + compute_center_to_peak_voltage_out(sn) * out_neg_gain[(int)(AD_CAP_VOLTAGE_MAX * 10)], |
| 884 | 884 | OUT_CENTER_LEVEL_VOLTAGE + compute_center_to_peak_voltage_out(sn) * out_pos_gain[(int)(AD_CAP_VOLTAGE_MAX * 10)], |
| 885 | 885 | OUT_HIGH_CLIP_THRESHOLD)); |
| r7553 | r7554 | |
| 918 | 918 | { |
| 919 | 919 | char wav_file_name[30]; |
| 920 | 920 | |
| 921 | sprintf(wav_file_name, LOG_WAV_FILE_NAME, sn->device->tag | |
| 921 | sprintf(wav_file_name, LOG_WAV_FILE_NAME, sn->device->tag | |
| 922 | 922 | sn->file = wav_open(wav_file_name, sn->sample_rate, 2); |
| 923 | 923 | |
| 924 | LOG(1, ("SN76477 '%s': Logging output: %s\n", sn->device->tag | |
| 924 | LOG(1, ("SN76477 '%s': Logging output: %s\n", sn->device->tag | |
| 925 | 925 | } |
| 926 | 926 | |
| 927 | 927 |
| r7553 | r7554 | |
|---|---|---|
| 320 | 320 | /* invalid samples go here */ |
| 321 | 321 | else |
| 322 | 322 | { |
| 323 | logerror("ES871295:'%s' requested to play invalid sample range %06x-%06x\n",device->tag | |
| 323 | logerror("ES871295:'%s' requested to play invalid sample range %06x-%06x\n",device->tag | |
| 324 | 324 | |
| 325 | 325 | if (chip->playing) |
| 326 | 326 | { |
| r7553 | r7554 | |
|---|---|---|
| 1618 | 1618 | for (device = machine->firstcpu; device != NULL; device = cpu_next(device)) |
| 1619 | 1619 | { |
| 1620 | 1620 | void *param = (void *)device; |
| 1621 | string.printf("Overclock CPU %s", device->tag | |
| 1621 | string.printf("Overclock CPU %s", device->tag | |
| 1622 | 1622 | *tailptr = slider_alloc(machine, string, 10, 1000, 2000, 1, slider_overclock, param); |
| 1623 | 1623 | tailptr = &(*tailptr)->next; |
| 1624 | 1624 | } |
| r7553 | r7554 | |
| 2112 | 2112 | static char descbuf[256]; |
| 2113 | 2113 | |
| 2114 | 2114 | if (screen_count > 1) |
| 2115 | sprintf(descbuf, "Screen '%s'", screen->tag | |
| 2115 | sprintf(descbuf, "Screen '%s'", screen->tag | |
| 2116 | 2116 | else |
| 2117 | 2117 | strcpy(descbuf, "Screen"); |
| 2118 | 2118 | |
| r7553 | r7554 | |
| 2131 | 2131 | static char descbuf[256]; |
| 2132 | 2132 | |
| 2133 | 2133 | if (ldcount > 1) |
| 2134 | sprintf(descbuf, "Laserdisc '%s'", laserdisc->tag | |
| 2134 | sprintf(descbuf, "Laserdisc '%s'", laserdisc->tag | |
| 2135 | 2135 | else |
| 2136 | 2136 | strcpy(descbuf, "Laserdisc"); |
| 2137 | 2137 |
| r7553 | r7554 | |
|---|---|---|
| 186 | 186 | |
| 187 | 187 | /* and then the text */ |
| 188 | 188 | if (curtype >= PROFILER_CPU_FIRST && curtype <= PROFILER_CPU_MAX) |
| 189 | string.catprintf("CPU '%s'", machine->devicelist.find(CPU, curtype - PROFILER_CPU_FIRST)->tag | |
| 189 | string.catprintf("CPU '%s'", machine->devicelist.find(CPU, curtype - PROFILER_CPU_FIRST)->tag | |
| 190 | 190 | else |
| 191 | 191 | for (nameindex = 0; nameindex < ARRAY_LENGTH(names); nameindex++) |
| 192 | 192 | if (names[nameindex].type == curtype) |
| r7553 | r7554 | |
|---|---|---|
| 315 | 315 | /* if no state registered for saving, we can't save */ |
| 316 | 316 | if (num_regs == 0) |
| 317 | 317 | { |
| 318 | logerror("Sound chip '%s' did not register any state to save!\n", device->tag | |
| 318 | logerror("Sound chip '%s' did not register any state to save!\n", device->tag | |
| 319 | 319 | if (device->machine->gamedrv->flags & GAME_SUPPORTS_SAVE) |
| 320 | fatalerror("Sound chip '%s' did not register any state to save!", device->tag | |
| 320 | fatalerror("Sound chip '%s' did not register any state to save!", device->tag | |
| 321 | 321 | } |
| 322 | 322 | } |
| 323 | 323 | |
| r7553 | r7554 | |
| 488 | 488 | speaker_info *speakerinfo = get_safe_token(target_device); |
| 489 | 489 | |
| 490 | 490 | /* generate text for the UI */ |
| 491 | tempstring.printf("Speaker '%s': %s '%s'", target_device->tag | |
| 491 | tempstring.printf("Speaker '%s': %s '%s'", target_device->tag | |
| 492 | 492 | if (numoutputs > 1) |
| 493 | 493 | tempstring.catprintf(" Ch.%d", outputnum); |
| 494 | 494 | |
| r7553 | r7554 | |
| 864 | 864 | |
| 865 | 865 | /* copy in all the relevant info */ |
| 866 | 866 | info->speaker = (const speaker_config *)device->baseconfig().inline_config; |
| 867 | info->tag = device->tag; | |
| 867 | info->tag = device->tag(); | |
| 868 | 868 | } |
| 869 | 869 | |
| 870 | 870 |
| r7553 | r7554 | |
|---|---|---|
| 963 | 963 | assert(screen != NULL); |
| 964 | 964 | assert(screen->machine != NULL); |
| 965 | 965 | assert(screen->machine->config != NULL); |
| 966 | assert(screen->tag != NULL); | |
| 967 | 966 | |
| 968 | screen_index = screen->machine->devicelist.index(VIDEO_SCREEN, screen->tag); | |
| 967 | screen_index = screen->machine->devicelist.index(VIDEO_SCREEN, screen->tag()); | |
| 969 | 968 | |
| 970 | 969 | assert(screen_index != -1); |
| 971 | 970 | |
| r7553 | r7554 | |
| 1470 | 1469 | { |
| 1471 | 1470 | const device_config *screen = target->machine->config->devicelist.find(VIDEO_SCREEN, item->index); |
| 1472 | 1471 | const screen_config *scrconfig = (const screen_config *)screen->inline_config; |
| 1473 | running_device *screendev = target->machine->device(screen->tag); | |
| 1472 | running_device *screendev = target->machine->device(screen->tag()); | |
| 1474 | 1473 | const rectangle vectorvis = { 0, 639, 0, 479 }; |
| 1475 | 1474 | const rectangle *visarea = NULL; |
| 1476 | 1475 | render_container *container = get_screen_container_by_index(item->index); |
| r7553 | r7554 | |
|---|---|---|
| 676 | 676 | case DEVICE_CLASS_TIMER: printf(" Timer: "); break; |
| 677 | 677 | default: printf(" Other: "); break; |
| 678 | 678 | } |
| 679 | printf("%s ('%s')", devconfig->name(), devconfig->tag | |
| 679 | printf("%s ('%s')", devconfig->name(), devconfig->tag | |
| 680 | 680 | if (devconfig->clock >= 1000000000) |
| 681 | 681 | printf(" @ %d.%02d GHz\n", devconfig->clock / 1000000000, (devconfig->clock / 10000000) % 100); |
| 682 | 682 | else if (devconfig->clock >= 1000000) |
| r7553 | r7554 | |
|---|---|---|
| 94 | 94 | |
| 95 | 95 | /* register device items */ |
| 96 | 96 | #define state_save_register_device_item(_dev, _index, _val) \ |
| 97 | state_save_register_generic((_dev)->machine, (_dev)->name(), (_dev)->tag, _index, #_val, &_val, _val, 1) | |
| 97 | state_save_register_generic((_dev)->machine, (_dev)->name(), (_dev)->tag(), _index, #_val, &_val, _val, 1) | |
| 98 | 98 | |
| 99 | 99 | #define state_save_register_device_item_pointer(_dev, _index, _val, _count) \ |
| 100 | state_save_register_generic((_dev)->machine, (_dev)->name(), (_dev)->tag, _index, #_val, &_val[0], _val[0], _count) | |
| 100 | state_save_register_generic((_dev)->machine, (_dev)->name(), (_dev)->tag(), _index, #_val, &_val[0], _val[0], _count) | |
| 101 | 101 | |
| 102 | 102 | #define state_save_register_device_item_array(_dev, _index, _val) \ |
| 103 | state_save_register_item_pointer((_dev)->machine, (_dev)->name(), (_dev)->tag, _index, _val, sizeof(_val)/sizeof(_val[0])) | |
| 103 | state_save_register_item_pointer((_dev)->machine, (_dev)->name(), (_dev)->tag(), _index, _val, sizeof(_val)/sizeof(_val[0])) | |
| 104 | 104 | |
| 105 | 105 | #define state_save_register_device_item_2d_array(_dev, _index, _val) \ |
| 106 | state_save_register_item_pointer((_dev)->machine, (_dev)->name(), (_dev)->tag, _index, _val[0], sizeof(_val)/sizeof(_val[0][0])) | |
| 106 | state_save_register_item_pointer((_dev)->machine, (_dev)->name(), (_dev)->tag(), _index, _val[0], sizeof(_val)/sizeof(_val[0][0])) | |
| 107 | 107 | |
| 108 | 108 | #define state_save_register_device_item_bitmap(_dev, _index, _val) \ |
| 109 | state_save_register_bitmap((_dev)->machine, (_dev)->name(), (_dev)->tag, _index, #_val, _val, __FILE__, __LINE__) | |
| 109 | state_save_register_bitmap((_dev)->machine, (_dev)->name(), (_dev)->tag(), _index, #_val, _val, __FILE__, __LINE__) | |
| 110 | 110 | |
| 111 | 111 | |
| 112 | 112 |
| r7553 | r7554 | |
|---|---|---|
| 620 | 620 | { |
| 621 | 621 | if (video_screen_count(config) == 0) |
| 622 | 622 | { |
| 623 | mame_printf_error("%s: %s cpu '%s' has a VBLANK interrupt, but the driver is screenless !\n", driver->source_file, driver->name, devconfig->tag | |
| 623 | mame_printf_error("%s: %s cpu '%s' has a VBLANK interrupt, but the driver is screenless !\n", driver->source_file, driver->name, devconfig->tag | |
| 624 | 624 | error = TRUE; |
| 625 | 625 | } |
| 626 | 626 | else if (cpuconfig->vblank_interrupt_screen != NULL && cpuconfig->vblank_interrupts_per_frame != 0) |
| 627 | 627 | { |
| 628 | mame_printf_error("%s: %s cpu '%s' has a new VBLANK interrupt handler with >1 interrupts!\n", driver->source_file, driver->name, devconfig->tag | |
| 628 | mame_printf_error("%s: %s cpu '%s' has a new VBLANK interrupt handler with >1 interrupts!\n", driver->source_file, driver->name, devconfig->tag | |
| 629 | 629 | error = TRUE; |
| 630 | 630 | } |
| 631 | 631 | else if (cpuconfig->vblank_interrupt_screen != NULL && config->devicelist.find(cpuconfig->vblank_interrupt_screen) == NULL) |
| 632 | 632 | { |
| 633 | mame_printf_error("%s: %s cpu '%s' VBLANK interrupt with a non-existant screen tag (%s)!\n", driver->source_file, driver->name, devconfig->tag | |
| 633 | mame_printf_error("%s: %s cpu '%s' VBLANK interrupt with a non-existant screen tag (%s)!\n", driver->source_file, driver->name, devconfig->tag | |
| 634 | 634 | error = TRUE; |
| 635 | 635 | } |
| 636 | 636 | else if (cpuconfig->vblank_interrupt_screen == NULL && cpuconfig->vblank_interrupts_per_frame == 0) |
| 637 | 637 | { |
| 638 | mame_printf_error("%s: %s cpu '%s' has a VBLANK interrupt handler with 0 interrupts!\n", driver->source_file, driver->name, devconfig->tag | |
| 638 | mame_printf_error("%s: %s cpu '%s' has a VBLANK interrupt handler with 0 interrupts!\n", driver->source_file, driver->name, devconfig->tag | |
| 639 | 639 | error = TRUE; |
| 640 | 640 | } |
| 641 | 641 | } |
| 642 | 642 | else if (cpuconfig->vblank_interrupts_per_frame != 0) |
| 643 | 643 | { |
| 644 | mame_printf_error("%s: %s cpu '%s' has no VBLANK interrupt handler but a non-0 interrupt count is given!\n", driver->source_file, driver->name, devconfig->tag | |
| 644 | mame_printf_error("%s: %s cpu '%s' has no VBLANK interrupt handler but a non-0 interrupt count is given!\n", driver->source_file, driver->name, devconfig->tag | |
| 645 | 645 | error = TRUE; |
| 646 | 646 | } |
| 647 | 647 | |
| 648 | 648 | if (cpuconfig->timed_interrupt != NULL && cpuconfig->timed_interrupt_period == 0) |
| 649 | 649 | { |
| 650 | mame_printf_error("%s: %s cpu '%s' has a timer interrupt handler with 0 period!\n", driver->source_file, driver->name, devconfig->tag | |
| 650 | mame_printf_error("%s: %s cpu '%s' has a timer interrupt handler with 0 period!\n", driver->source_file, driver->name, devconfig->tag | |
| 651 | 651 | error = TRUE; |
| 652 | 652 | } |
| 653 | 653 | else if (cpuconfig->timed_interrupt == NULL && cpuconfig->timed_interrupt_period != 0) |
| 654 | 654 | { |
| 655 | mame_printf_error("%s: %s cpu '%s' has a no timer interrupt handler but has a non-0 period given!\n", driver->source_file, driver->name, devconfig->tag | |
| 655 | mame_printf_error("%s: %s cpu '%s' has a no timer interrupt handler but has a non-0 period given!\n", driver->source_file, driver->name, devconfig->tag | |
| 656 | 656 | error = TRUE; |
| 657 | 657 | } |
| 658 | 658 | } |
| r7553 | r7554 | |
| 681 | 681 | /* sanity check dimensions */ |
| 682 | 682 | if ((scrconfig->width <= 0) || (scrconfig->height <= 0)) |
| 683 | 683 | { |
| 684 | mame_printf_error("%s: %s screen '%s' has invalid display dimensions\n", driver->source_file, driver->name, devconfig->tag | |
| 684 | mame_printf_error("%s: %s screen '%s' has invalid display dimensions\n", driver->source_file, driver->name, devconfig->tag | |
| 685 | 685 | error = TRUE; |
| 686 | 686 | } |
| 687 | 687 | |
| r7553 | r7554 | |
| 693 | 693 | (scrconfig->visarea.max_x >= scrconfig->width) || |
| 694 | 694 | (scrconfig->visarea.max_y >= scrconfig->height)) |
| 695 | 695 | { |
| 696 | mame_printf_error("%s: %s screen '%s' has an invalid display area\n", driver->source_file, driver->name, devconfig->tag | |
| 696 | mame_printf_error("%s: %s screen '%s' has an invalid display area\n", driver->source_file, driver->name, devconfig->tag | |
| 697 | 697 | error = TRUE; |
| 698 | 698 | } |
| 699 | 699 | |
| r7553 | r7554 | |
| 702 | 702 | scrconfig->format != BITMAP_FORMAT_RGB15 && |
| 703 | 703 | scrconfig->format != BITMAP_FORMAT_RGB32) |
| 704 | 704 | { |
| 705 | mame_printf_error("%s: %s screen '%s' has unsupported format\n", driver->source_file, driver->name, devconfig->tag | |
| 705 | mame_printf_error("%s: %s screen '%s' has unsupported format\n", driver->source_file, driver->name, devconfig->tag | |
| 706 | 706 | error = TRUE; |
| 707 | 707 | } |
| 708 | 708 | if (scrconfig->format == BITMAP_FORMAT_INDEXED16) |
| r7553 | r7554 | |
| 712 | 712 | /* check for zero frame rate */ |
| 713 | 713 | if (scrconfig->refresh == 0) |
| 714 | 714 | { |
| 715 | mame_printf_error("%s: %s screen '%s' has a zero refresh rate\n", driver->source_file, driver->name, devconfig->tag | |
| 715 | mame_printf_error("%s: %s screen '%s' has a zero refresh rate\n", driver->source_file, driver->name, devconfig->tag | |
| 716 | 716 | error = TRUE; |
| 717 | 717 | } |
| 718 | 718 | } |
| r7553 | r7554 | |
| 1216 | 1216 | { |
| 1217 | 1217 | /* check for duplicate tags */ |
| 1218 | 1218 | for (checkspeak = speaker_output_first(config); checkspeak != NULL; checkspeak = speaker_output_next(checkspeak)) |
| 1219 | if (checkspeak != curspeak && strcmp(checkspeak->tag, curspeak->tag) == 0) | |
| 1219 | if (checkspeak != curspeak && strcmp(checkspeak->tag(), curspeak->tag()) == 0) | |
| 1220 | 1220 | { |
| 1221 | mame_printf_error("%s: %s has multiple speakers tagged as '%s'\n", driver->source_file, driver->name, checkspeak->tag | |
| 1221 | mame_printf_error("%s: %s has multiple speakers tagged as '%s'\n", driver->source_file, driver->name, checkspeak->tag | |
| 1222 | 1222 | error = TRUE; |
| 1223 | 1223 | } |
| 1224 | 1224 | |
| 1225 | 1225 | /* make sure there are no sound chips with the same tag */ |
| 1226 | 1226 | for (checksound = sound_first(config); checksound != NULL; checksound = sound_next(checksound)) |
| 1227 | if (strcmp(curspeak->tag, checksound->tag) == 0) | |
| 1227 | if (strcmp(curspeak->tag(), checksound->tag()) == 0) | |
| 1228 | 1228 | { |
| 1229 | mame_printf_error("%s: %s has both a speaker and a sound chip tagged as '%s'\n", driver->source_file, driver->name, curspeak->tag | |
| 1229 | mame_printf_error("%s: %s has both a speaker and a sound chip tagged as '%s'\n", driver->source_file, driver->name, curspeak->tag | |
| 1230 | 1230 | error = TRUE; |
| 1231 | 1231 | } |
| 1232 | 1232 | } |
| r7553 | r7554 | |
| 1242 | 1242 | { |
| 1243 | 1243 | /* find a speaker with the requested tag */ |
| 1244 | 1244 | for (checkspeak = speaker_output_first(config); checkspeak != NULL; checkspeak = speaker_output_next(checkspeak)) |
| 1245 | if (strcmp(route->target, checkspeak->tag) == 0) | |
| 1245 | if (strcmp(route->target, checkspeak->tag()) == 0) | |
| 1246 | 1246 | break; |
| 1247 | 1247 | |
| 1248 | 1248 | /* if we didn't find one, look for another sound chip with the tag */ |
| 1249 | 1249 | if (checkspeak == NULL) |
| 1250 | 1250 | { |
| 1251 | 1251 | for (checksound = sound_first(config); checksound != NULL; checksound = sound_next(checksound)) |
| 1252 | if (checksound != cursound && strcmp(route->target, checksound->tag) == 0) | |
| 1252 | if (checksound != cursound && strcmp(route->target, checksound->tag()) == 0) | |
| 1253 | 1253 | break; |
| 1254 | 1254 | |
| 1255 | 1255 | /* if we didn't find one, it's an error */ |
| r7553 | r7554 | |
| 1284 | 1284 | int spacenum; |
| 1285 | 1285 | |
| 1286 | 1286 | /* validate the device tag */ |
| 1287 | error |= validate_tag(driver, devconfig->get_config_string(DEVINFO_STR_NAME), devconfig->tag); | |
| 1287 | error |= validate_tag(driver, devconfig->get_config_string(DEVINFO_STR_NAME), devconfig->tag()); | |
| 1288 | 1288 | |
| 1289 | 1289 | /* look for duplicates */ |
| 1290 | 1290 | for (scanconfig = config->devicelist.first(); scanconfig != devconfig; scanconfig = scanconfig->next) |
| 1291 | if (strcmp(scanconfig->tag, devconfig->tag) == 0) | |
| 1291 | if (strcmp(scanconfig->tag(), devconfig->tag()) == 0) | |
| 1292 | 1292 | { |
| 1293 | mame_printf_warning("%s: %s has multiple devices with the tag '%s'\n", driver->source_file, driver->name, devconfig->tag | |
| 1293 | mame_printf_warning("%s: %s has multiple devices with the tag '%s'\n", driver->source_file, driver->name, devconfig->tag | |
| 1294 | 1294 | break; |
| 1295 | 1295 | } |
| 1296 | 1296 | |
| r7553 | r7554 | |
| 1322 | 1322 | /* validate the global map parameters */ |
| 1323 | 1323 | if (map->spacenum != spacenum) |
| 1324 | 1324 | { |
| 1325 | mame_printf_error("%s: %s device '%s' space %d has address space %d handlers!\n", driver->source_file, driver->name, devconfig->tag | |
| 1325 | mame_printf_error("%s: %s device '%s' space %d has address space %d handlers!\n", driver->source_file, driver->name, devconfig->tag | |
| 1326 | 1326 | error = TRUE; |
| 1327 | 1327 | } |
| 1328 | 1328 | if (map->databits != databus_width) |
| 1329 | 1329 | { |
| 1330 | mame_printf_error("%s: %s device '%s' uses wrong memory handlers for %s space! (width = %d, memory = %08x)\n", driver->source_file, driver->name, devconfig->tag | |
| 1330 | mame_printf_error("%s: %s device '%s' uses wrong memory handlers for %s space! (width = %d, memory = %08x)\n", driver->source_file, driver->name, devconfig->tag | |
| 1331 | 1331 | error = TRUE; |
| 1332 | 1332 | } |
| 1333 | 1333 | |
| r7553 | r7554 | |
| 1346 | 1346 | ((entry->read.type != AMH_NONE && scan->read.type != AMH_NONE) || |
| 1347 | 1347 | (entry->write.type != AMH_NONE && scan->write.type != AMH_NONE))) |
| 1348 | 1348 | { |
| 1349 | mame_printf_warning("%s: %s '%s' %s space has overlapping memory (%X-%X,%d,%d) vs (%X-%X,%d,%d)\n", driver->source_file, driver->name, devconfig->tag | |
| 1349 | mame_printf_warning("%s: %s '%s' %s space has overlapping memory (%X-%X,%d,%d) vs (%X-%X,%d,%d)\n", driver->source_file, driver->name, devconfig->tag | |
| 1350 | 1350 | detected_overlap = TRUE; |
| 1351 | 1351 | break; |
| 1352 | 1352 | } |
| r7553 | r7554 | |
| 1369 | 1369 | /* if this is a program space, auto-assign implicit ROM entries */ |
| 1370 | 1370 | if (entry->read.type == AMH_ROM && entry->region == NULL) |
| 1371 | 1371 | { |
| 1372 | entry->region = devconfig->tag; | |
| 1372 | entry->region = devconfig->tag(); | |
| 1373 | 1373 | entry->rgnoffs = entry->addrstart; |
| 1374 | 1374 | } |
| 1375 | 1375 | |
| r7553 | r7554 | |
| 1384 | 1384 | /* stop if we hit an empty */ |
| 1385 | 1385 | if (rgninfo->entries[rgnnum].tag == NULL) |
| 1386 | 1386 | { |
| 1387 | mame_printf_error("%s: %s device '%s' %s space memory map entry %X-%X references non-existant region '%s'\n", driver->source_file, driver->name, devconfig->tag | |
| 1387 | mame_printf_error("%s: %s device '%s' %s space memory map entry %X-%X references non-existant region '%s'\n", driver->source_file, driver->name, devconfig->tag | |
| 1388 | 1388 | error = TRUE; |
| 1389 | 1389 | break; |
| 1390 | 1390 | } |
| r7553 | r7554 | |
| 1395 | 1395 | offs_t length = rgninfo->entries[rgnnum].length; |
| 1396 | 1396 | if (entry->rgnoffs + (byteend - bytestart + 1) > length) |
| 1397 | 1397 | { |
| 1398 | mame_printf_error("%s: %s device '%s' %s space memory map entry %X-%X extends beyond region '%s' size (%X)\n", driver->source_file, driver->name, devconfig->tag | |
| 1398 | mame_printf_error("%s: %s device '%s' %s space memory map entry %X-%X extends beyond region '%s' size (%X)\n", driver->source_file, driver->name, devconfig->tag | |
| 1399 | 1399 | error = TRUE; |
| 1400 | 1400 | } |
| 1401 | 1401 | break; |
| r7553 | r7554 | |
| 1407 | 1407 | if ((entry->read.type == AMH_DEVICE_HANDLER && entry->read.tag != NULL && config->devicelist.find(entry->read.tag) == NULL) || |
| 1408 | 1408 | (entry->write.type == AMH_DEVICE_HANDLER && entry->write.tag != NULL && config->devicelist.find(entry->write.tag) == NULL)) |
| 1409 | 1409 | { |
| 1410 | mame_printf_error("%s: %s device '%s' %s space memory map entry references nonexistant device '%s'\n", driver->source_file, driver->name, devconfig->tag | |
| 1410 | mame_printf_error("%s: %s device '%s' %s space memory map entry references nonexistant device '%s'\n", driver->source_file, driver->name, devconfig->tag | |
| 1411 | 1411 | error = TRUE; |
| 1412 | 1412 | } |
| 1413 | 1413 | |
| r7553 | r7554 | |
| 1415 | 1415 | if ((entry->read.type == AMH_PORT && entry->read.tag != NULL && portlist.find(entry->read.tag) == NULL) || |
| 1416 | 1416 | (entry->write.type == AMH_PORT && entry->write.tag != NULL && portlist.find(entry->write.tag) == NULL)) |
| 1417 | 1417 | { |
| 1418 | mame_printf_error("%s: %s device '%s' %s space memory map entry references nonexistant port tag '%s'\n", driver->source_file, driver->name, devconfig->tag | |
| 1418 | mame_printf_error("%s: %s device '%s' %s space memory map entry references nonexistant port tag '%s'\n", driver->source_file, driver->name, devconfig->tag | |
| 1419 | 1419 | error = TRUE; |
| 1420 | 1420 | } |
| 1421 | 1421 |
| r7553 | r7554 | |
|---|---|---|
| 272 | 272 | else |
| 273 | 273 | { |
| 274 | 274 | const device_config *devconfig = (const device_config *)source; |
| 275 | result.printf("%s:%s", devconfig->tag | |
| 275 | result.printf("%s:%s", devconfig->tag | |
| 276 | 276 | } |
| 277 | 277 | return result; |
| 278 | 278 | } |
| r7553 | r7554 | |
|---|---|---|
| 1 | 0.13 | |
| 1 | 0.137 | |
| 2 | 2 | |
| 3 | 3 | New System Drivers Supported: |
| 4 | 4 | ----------------------------- |
| r7553 | r7554 | |
|---|---|---|
| 1 | 0.13 | |
| 1 | 0.137 | |
| 2 | 2 | ----- |
| 3 | 3 | |
| 4 | IMPORTANT NOTE: As of this release of MAME, several important things | |
| 5 | about the system have changed. Please read the following items before | |
| 6 | attempting to compile this new version. | |
| 4 | 7 | |
| 8 | 1. A new tool chain for Windows, based off of gcc 4.4.3 prerelease, | |
| 9 | is now REQUIRED. Go to http://mamedev.org/tools to get the new tools. | |
| 10 | The code included with 0.137 WILL NOT BUILD with the old tools. | |
| 11 | The new tool chain has support for building 64-bit MAME builds with | |
| 12 | gcc, as well as built-in DirectX headers, and C++ support, which was | |
| 13 | missing from the old tools. | |
| 14 | ||
| 15 | 2. Non-Unicode builds of Windows MAME are no longer supported. The | |
| 16 | options to turn this off in the makefile have been removed, and | |
| 17 | future changes are likely to solidify this requirement. If you are | |
| 18 | still (God forbid) running on Win9x, you will need the unicows.dll | |
| 19 | library to run MAME. Download unicows from Microsoft. | |
| 20 | ||
| 21 | 3. All code in MAME is now compiled as C++, plus there have been a few | |
| 22 | small changes that take advantage of the C++ language. For the most | |
| 23 | part, there is no effect on how drivers are written, except for some | |
| 24 | nicer accessors to devices and address spaces. Future improvements to | |
| 25 | take advantage of the C++ syntax will evolve slowly, and will be done | |
| 26 | internally. We are not interested in outside attempts to do this work | |
| 27 | for now. | |
| 28 | ||
| 29 | 4. The SDL OSD for MAME is now shipped as part of the main source | |
| 30 | package. SDL builds for Windows are now regularly built as part of the | |
| 31 | validation sequence for a new release. Thanks to R. Belmont, | |
| 32 | couriersud, and Olivier Galibert for their work on the SDL port over | |
| 33 | the years. | |
| 34 | ||
| 35 | ||
| 36 | ||
| 5 | 37 | MAMETesters Bugs Fixed |
| 6 | 38 | ---------------------- |
| 7 | - 03603: [DIP/Input] karnov, karnovj: incorrect difficulty dipswitch | |
| 8 | (Tafoid) | |
| 9 | - 03604: [DIP/Input] oscar, oscaru, oscarj1, oscarj2: Incorrect | |
| 10 | difficulty dipswitch (Tafoid) | |
| 11 | - 03142: [DIP/Input] All drivers using PORT_CHANGED callbacks: Input | |
| 12 | port callback functions are not triggered correctly during | |
| 13 | INP playback. (mahlemiut) | |
| 14 | - 03493: [Gameplay] spacedxo: The game reboots itself after title | |
| 15 | screen (Fabio Priuli) | |
| 16 | - 03608: [Multisession] scontra, scontraj: Tile/graphic corruption on | |
| 17 | multiple launches of Super Contra (Fabio Priuli) | |
| 18 | - 03611: [Crash/Freeze] 1943, 1943j, 1943kai: Crash when starting | |
| 19 | 1943 in Service Mode (Fabio Priuli) | |
| 20 | - 03598: [Original Reference] plotting, flipull: YM2203 speed | |
| 21 | adjustment (Tafoid) | |
| 22 | - 03593: [Graphics] captaven & clones: Intro text scrolls from wrong | |
| 23 | direction (Pierpaolo Prazzoli) | |
| 24 | - 03596: [Crash/Freeze] All sets in konamigv.c, mitchell.c: Attempt to | |
| 25 | register save state entry after state registration is closed | |
| 26 | (Aaron Giles) | |
| 27 | - 03597: [Original Reference] outrun, outrunra, outruno, outrundx, | |
| 28 | outrunb: Incorrect vsync speed on Outrun (Tafoid) | |
| 39 | - 03533: [Debugger] All 68020 cpu based drivers: 68020 disassembler | |
| 40 | bug: a 32-bit address displacement's upper 16-bit is | |
| 41 | desappear (R. Belmont) | |
| 29 | 42 | |
| 30 | 43 | |
| 31 | 44 | |
| 32 | 45 | Source Changes |
| 33 | 46 | -------------- |
| 34 | hng64 improvements: [Andrew Gardner] | |
| 35 | - RoadsEdge & XRally polygons are now visible. | |
| 36 | - Improved geometry chunk type 0x2e. | |
| 37 | - Fleshed out the 'chunk type bits' a little. This will be verified | |
| 38 | against type 0x24. | |
| 39 | - Xrally and roadedge hng64 screens no longer run at 10fps. | |
| 40 | - Fixed polygon lookup in driving games. | |
| 47 | snes.c: simplified drawing routines, added support for | |
| 48 | offset-per-tile, cleaned up the code [Fabio Priuli] | |
| 41 | 49 | |
| 42 | Changed behavior of -watchdog option to act like a real watchdog. It | |
| 43 | now specifies the number of seconds after the last video update that | |
| 44 | will cause auto-termination of MAME. Also modified it to output a | |
| 45 | message when the watchdog triggers the exit. [Aaron Giles] | |
| 50 | H8/3334: add analog input ports [R. Belmont] | |
| 46 | 51 | |
| 47 | Updated windows.txt to reflect this option and the debugger_font | |
| 48 | options which were never previously documented. [Aaron Giles] | |
| 52 | snes.c: fixed remaining issues in hires modes [Fabio Priuli] | |
| 49 | 53 | |
| 50 | EEPROM changes: [Aaron Giles] | |
| 51 | - Fixed auto EEPROM region to properly handle 16-bit data. | |
| 52 | - Changed EEPROM device to initialize EEPROM at NVRAM load time | |
| 53 | rather than init time, giving DEVICE_INIT handlers a chance to | |
| 54 | muck with the data first. | |
| 55 | - Removed _NODEFAULT_ forms of EEPROM driver macros. If you need to | |
| 56 | add default data, follow the MDRV_EEPROM_ADD() with | |
| 57 | MDRV_EEPROM_DATA(). | |
| 58 | - Updated remaining drivers to the new EEPROM device code. Many of | |
| 59 | them now require a default EEPROM to be loaded along with the | |
| 60 | ROMs, rather than hard-coded data in the driver | |
| 61 | - Exposed an address space for EEPROM devices, meaning the memory | |
| 62 | is now visible in the debugger and can be accessed via expressions | |
| 63 | - Updated all systems that muck directly with EEPROM memory to | |
| 64 | use memory accessors instead on the EEPROM address space. | |
| 65 | - Removed old EEPROM implementation | |
| 66 | ||
| 67 | cb2001: added many new opcodes [robiza] | |
| 54 | snes.c: fixed serial joystick reads [Fabio Priuli] | |
| 68 | 55 | |
| 69 | Split ADC1038, Konami 033906 and Konami 056230 emulation from | |
| 70 | gticlub.c and konppc.c. Also, converted them to be devices and updated | |
| 71 | PPC Konami games to use the new code. [Fabio Priuli] | |
| 56 | snes.c: slightly simplified palette handling [Fabio Priuli] | |
| 72 | 57 | |
| 73 | ||
| 58 | R | |
| 74 | 59 | |
| 75 | sub.c - Put in board XTAL and came up with some seeming better clock | |
| 76 | speed approximations until board readings can be done. [Tafoid] | |
| 60 | namcos23: Cleanups [O. Galibert] | |
| 77 | 61 | |
| 78 | mcr.c - Sets tron3 and tron4 don't appear to have a valid working | |
| 79 | cocktail mode video or controls (upright player2 works fine). Flagged | |
| 80 | as GAME_NO_COCKTAIL. [Tafoid] | |
| 62 | namcos23: Add dips [O. Galibert] | |
| 81 | 63 | |
| 82 | subs.c - Added DIP LOCATIONS. [Tafoid] | |
| 64 | snes.c: Added very preliminary driver_data class for snes based | |
| 65 | drivers (it only contains input-related items for the moment, because | |
| 66 | these are needed to add support for additional controller types in | |
| 67 | MESS) [Fabio Priuli] | |
| 83 | 68 | |
| 84 | ||
| 69 | sn | |
| 85 | 70 | |
| 86 | ||
| 71 | s | |
| 87 | 72 | |
| 88 | Removed sysconfig section from game_driver struct. Made | |
| 89 | compatible_with attribute available for MAME too (with NULL value set | |
| 90 | in GAMEL macro). [Miodrag Milanovic] | |
| 73 | namcos23: More cleanups [O. Galibert] | |
| 91 | 74 | |
| 92 | Added preliminary device version of Konami video ICs used in PowerPC | |
| 93 | games (001005, 001006, 001604 and 037122). [Fabio Priuli] | |
| 75 | Implemented default EEPROMs to the following drivers [David Haywood] | |
| 76 | * deco_mlc.c | |
| 77 | * esd16.c | |
| 78 | * gijoe.c | |
| 79 | * konamigx.c | |
| 80 | * moo.c | |
| 81 | * mystwarr.c | |
| 82 | * rabbit.c | |
| 83 | * rungun.c | |
| 84 | * tmnt.c | |
| 85 | * vendetta.c | |
| 86 | * xexex.c | |
| 94 | 87 | |
| 95 | Converted all Taito custom I/O and video ICs to devices and updated | |
| 96 | all drivers to use them. [Fabio Priuli] | |
| 88 | Added support for the 'simple' rowscroll mode used by sams64_2 | |
| 89 | [David Haywood] | |
| 97 | 90 | |
| 98 | Simplified bloodbro gfx decoding and removed unnecessary DRIVER_INIT. | |
| 99 | Marked two weststry sprite ROMs as BAD_DUMP [David Haywood] | |
| 91 | Fixed Z80 DMA ready signal handling. [Curt Coder] | |
| 100 | 92 | |
| 101 | Converted Namco IO chips 56xx, 58xx and 59xx to be devices and | |
| 102 | converted gaplus.c, mappy.c and toypop.c to use the new code. | |
| 103 | [Fabio Priuli] | |
| 93 | namcos23 update: [R. Belmont, Guru] | |
| 94 | * Updated Guru Readme | |
| 95 | * More IRQ tests pass | |
| 96 | * Gunmen Wars I/O board runs and syncs | |
| 97 | * SH-2 shared RAM added for Gunmen Wars | |
| 104 | 98 | |
| 105 | Allow any device memory (not just CPU's) to be accessed via debug | |
| 106 | expressions. Removed support in the expression engine for EEPROM- | |
| 107 | specific accesses. [Aaron Giles] | |
| 99 | Implemented default EEPROMs to Bubble Memories, Lethal Enforcers and | |
| 100 | Puzzle Time [David Haywood] | |
| 108 | 101 | |
| 109 | Converted Fujitsu MB87078 Volume Controller to be a device and | |
| 110 | updated taito_b.c to use the new code (it's the only driver | |
| 111 | emulating this chip atm). [Fabio Priuli] | |
| 102 | Implemented default EEPROMs for GTIClub, Hang Pilot, Asterix, X-Men | |
| 103 | and Polygonet Commanders [David Haywood] | |
| 112 | 104 | |
| 113 | merit.c - Fixed what might be a copy/paste error in two sets | |
| 114 | (trvwz3h, trvwz3v) where two roms had the same filename in the same | |
| 115 | romset. [Tafoid] | |
| 105 | Fixed the texture ROM loading/order in Wave Shark. Textures look | |
| 106 | better now, and the ROM check passes [David Haywood] | |
| 116 | 107 | |
| 117 | Renamed tilemap -> tilemap_t, as the name 'tilemap' is too commonly | |
| 118 | used for statics and structure members, and some compilers (esp. C++ | |
| 119 | compilers) don't allow that. [Aaron Giles] | |
| 108 | namcos23: pass C422 IRQ test [R. Belmont] | |
| 120 | 109 | |
| 121 | Fix for INP recording ports that have changed notification. Also | |
| 122 | prevents new inputs from affecting recorded inputs during playback. | |
| 123 | [mahlemiut] | |
| 110 | Added ARDY/BRDY signal read handlers to Z80 PIO. [Curt Coder] | |
| 124 | 111 | |
| 125 | Updated srcclean to remove "invisible spaces" immediately preceding | |
| 126 | tabs. [Atari Ace] | |
| 112 | Implemented 'key matrix' inputs in King Derby (1986 version) | |
| 113 | [Angelo Salese] | |
| 127 | 114 | |
| 128 | Cleaned up braces in the code so that they are properly balanced. | |
| 129 | [Atari Ace] | |
| 115 | namcos23 updates: [R. Belmont] | |
| 116 | * Preliminary SH-2 hookup for GMEN games. SH-2 boots and copies the | |
| 117 | loader to private RAM then jumps to it. Transfer protocol for | |
| 118 | main program not yet understood. | |
| 119 | * Final Furlong 2 has a GMEN board and camera; update it to use that | |
| 120 | subdriver. | |
| 130 | 121 | |
| 131 | Optimized RDP implementation further with more flattened branches. | |
| 132 | [Harmony] | |
| 122 | Implemented sound to King Derby (1986 version) [Angelo Salese] | |
| 133 | 123 | |
| 134 | Converted a number of vector opcodes to the RSP DRC core. [Harmony] | |
| 124 | Implemented coins to King Derby (1986 version), game can be considered | |
| 125 | as working right now [Angelo Salese] | |
| 135 | 126 | |
| 136 | Unrolled and optimized a number of vector opcodes in the interpreter | |
| 137 | RSP core. [Harmony] | |
| 127 | namcos23 updates: [R. Belmont] | |
| 128 | * Hooked up start/coin/buttons for Gorgon | |
| 129 | * Fixed Panic Park crash | |
| 130 | * Enabled I/O board for timecrs2c so it can coin up | |
| 131 | * Cleanup | |
| 138 | 132 | |
| 139 | Extended the devtempl.h file to support device address spaces. | |
| 140 | [Aaron Giles] | |
| 133 | SDL: fix Fortify-reported stack smash [Belegdol] | |
| 141 | 134 | |
| 142 | cmmb.c - Identified and marked Service Mode DIP. [Tafoid] | |
| 135 | New driver for Five Clown, from IGS. This is a dual 6502 system with | |
| 136 | CRT controller, AY8910 and OKI M6295. Main program, graphics and sound | |
| 137 | samples are encrypted. [Roberto Fresca, Grull Osgo] | |
| 138 | * Hooked both 6502 CPU's. | |
| 139 | * Hooked the M6845 CRT. | |
| 140 | * Decrypted main program and bulk GFX. | |
| 141 | * Decoded GFX and color PROM. | |
| 142 | * Hooked both PIA's 6821. | |
| 143 | * Worked inputs from the scratch. | |
| 144 | * Hooked DIP Switches banks 2 & 4. | |
| 145 | * Hooked proper interrupts for audio CPU. | |
| 146 | * Hooked the AY8910 latches... | |
| 147 | * Hooked the OKI6295. | |
| 148 | * Hooked DIP switches ports $C400 & $CC00. | |
| 149 | * Found the sound samples decryption algorithm. | |
| 150 | * Added NVRAM support. | |
| 151 | * Added a complete PCB layout. | |
| 152 | * Added game notes. | |
| 153 | * Added technical notes. | |
| 143 | 154 | |
| 144 | Converted the NMK112 to be a device and updated drivers using it | |
| 145 | accordingly. [Fabio Priuli] | |
| 155 | z80sio: Added register access functions to prevent trampoline | |
| 156 | functions [Dirk Best] | |
| 146 | 157 | |
| 147 | Added GAME_SUPPORTS_SAVE flag to psikyosh.c, since the conversion to | |
| 148 | eeprom devices fixed the remaining issues with save states. | |
| 149 | [Fabio Priuli, Aaron Giles] | |
| 158 | Fixed debugger memdump command [Robbbert] | |
| 150 | 159 | |
| 151 | Changed Caveman Ninja driver to use Partial Updates for Raster Effects | |
| 152 | instead of buffering scanline data [David Haywood] | |
| 160 | Improvements to the unkch1/4 sets [David Haywood] | |
| 153 | 161 | |
| 154 | Changed Deco32 driver to use Partial Updates for Raster Effects | |
| 155 | instead of buffering scanline data (but left Dragon Gun using the | |
| 156 | buffering, because the video rendering code is far too slow with 224 | |
| 157 | partial updates for now) [David Haywood] | |
| 162 | Decrypted the color prom in King Derby (1986 version) [Angelo Salese] | |
| 158 | 163 | |
| 159 | Commented out some harmful and suspicious looking interrupt generation | |
| 160 | in NamcoND1 driver until it's being properly verified; fixes Game | |
| 161 | Options menu in NCV2 test mode. [David Haywood] | |
| 164 | Made device->tag and devconfig->tag into private member variables | |
| 165 | (m_tag). Added inline tag() function to return a const char * version. | |
| 166 | Updated callers to use this instead of directly accessing tag.cstr() | |
| 167 | which was awkward. [Aaron Giles] | |
| 162 | 168 | |
| 163 | adp.c improvements: [Angelo Salese] | |
| 164 | - Fixed some minor quirks | |
| 165 | - Improved Backgammon memory map | |
| 166 | - Implemented RAMDAC for Fun Land Deluxe | |
| 169 | snes.c: Fixed OAM overflow [jbo_85, Fabio Priuli] | |
| 167 | 170 | |
| 168 | Fixed error in codegen for drol/dror opcodes in the x86 back-end. | |
| 169 | [Aaron Giles] | |
| 171 | Improvements to funworld.c driver. [Roberto Fresca] | |
| 172 | * Added external default NVRAM support to the following games: | |
| 173 | bottle10, bottl10b, elephfam, elephfmb, jollycrd, jolyc3x3, | |
| 174 | jolyccra, jolyccrb, jolycdev, jolycdib, jolycdit, jolyjokr, | |
| 175 | jolyjokra, jolyjokrb, lluck3x3, lluck4x1, magicrd2, pool10, | |
| 176 | pool10b, pool10c, pool10d, potgame, royalcrd, royalcdb, sjcd2kx3, | |
| 177 | tortufam, vegasfst, vegasfte and vegasslw. | |
| 178 | * Changed default settings for some games, now that NVRAM is loaded | |
| 179 | externally. | |
| 170 | 180 | |
| 171 | Re-implemented misaligned memory handling in the RSP DRC as before. | |
| 172 | [Aaron Giles] | |
| 181 | Confirmed and hooked up i/o ports in Magical Tonic / Odds, doesn't | |
| 182 | work due of nested NMI [Angelo Salese] | |
| 173 | 183 | |
| 174 | Explicitly sign-extend 32-bit indexes for load/loads/store on 64-bit | |
| 175 | machines to prevent overflow issues. Fixes DRC crash in mtetrisc. | |
| 176 | [Aaron Giles] | |
| 184 | snes.c: refactored joypad inputs to be consistent with other input | |
| 185 | devices (used in MESS) [Fabio Priuli] | |
| 177 | 186 | |
| 178 | Fixed a few DRC-ized vector load/store opcodes in the RSP core. | |
| 179 | [Harmony] | |
| 187 | Implemented NMI enable flag in Lucky 8 Lines and Magical Odds, fixes | |
| 188 | logic quirks in the latter [Angelo Salese] | |
| 180 | 189 | |
| 181 | Hardware multiplication and division on the SNES takes 8 machine | |
| 182 | cycles to complete. [Wilbert Pol] | |
| 190 | Improvements to Magical Odds graphics [David Haywood] | |
| 183 | 191 | |
| 184 | Fixed x86 HLT instruction handling [Phill Harvey-Smith] | |
| 192 | Written a per-pixel function for the irq system in the ST-V driver, | |
| 193 | disabled by default [Angelo Salese] | |
| 185 | 194 | |
| 186 | Made LA Girls and clone of Play Girls. It's clearly a bootleg | |
| 187 | hardware clone. Title & background change, but the demo play and | |
| 188 | block arrangement are identical. Added info from the Guru's website | |
| 189 | about the reported manufacture company and year for LA Girls. Added a | |
| 190 | note about Tube-it having the copyright and manufacture info removed. | |
| 191 | [Brian Troha] | |
| 195 | vimana, vimanan, vimana1 (toaplan1.c driver) [stephh] : | |
| 196 | * Fixed Dip Switches and Inputs (after verification of the M68000 | |
| 197 | code) | |
| 198 | * Improved MCU emulation to correctly handle coinage based on Dip | |
| 199 | Switches settings and Territory Jumper | |
| 192 | 200 | |
| 193 | Added additional information to the dipswitches and configurations | |
| 194 | sections in the -listxml output [Oliver Stoneberg] | |
| 201 | Implemented sound NMI enable flag to the Munch Mobile driver | |
| 202 | [Angelo Salese] | |
| 195 | 203 | |
| 196 | Changed Green Beret sound chip to SN76489 and indicated that the | |
| 197 | bootleg has an undumped PAL and PROMs [Kevin Eshbach] | |
| 204 | m680x0: show FPU registers in the debugger for 030+ [R. Belmont] | |
| 198 | 205 | |
| 206 | 680x0: Improve disassembly for various FMOVE forms [R. Belmont] | |
| 199 | 207 | |
| 208 | Slightly fixed interrupt handling and added SBIC and MUL opcodes to | |
| 209 | the Atmel AVR8 core. [Harmony] | |
| 200 | 210 | |
| 211 | Added FJMP/JMPF opcode to the SunPlus u'nSP core. [Segher, Harmony] | |
| 212 | ||
| 213 | Performed an initial code cleanup pass on the N64 rendering code to | |
| 214 | make use of booleans and inline variable instantiation, and removed a | |
| 215 | number of unused variables that were exposed as a result of the | |
| 216 | latter. [Harmony] | |
| 217 | ||
| 218 | ||
| 219 | ||
| 201 | 220 | New games added or promoted from NOT_WORKING status |
| 202 | 221 | --------------------------------------------------- |
| 203 | Final Fight (Japan, hack) [bonky0013, JacKc, Fabio Priuli] | |
| 222 | Five Clown (english, set 1) [Roberto Fresca, Grull Osgo] | |
| 223 | Five Clown (english, set 2) [Roberto Fresca, Grull Osgo] | |
| 224 | Five Clown (spanish hack) [Roberto Fresca, Grull Osgo] | |
| 225 | Magical Odds [David Haywood, Angelo Salese] | |
| 204 | 226 | |
| 205 | 227 | |
| 206 | 228 | |
| 207 | 229 | New clones added |
| 208 | 230 | ---------------- |
| 209 | Spark Man (v 2.0, set 2) [Stefan Lindberg] (Not Working) | |
| 210 | Cherry Master I (ver.1.01) (various bootleg? sets) [David Haywood] | |
| 211 | Block (Game Corporation bootleg, set 3) [David Haywood] | |
| 212 | Multi Fish (030124) [MetalliC] | |
| 213 | Shaolin's Road (bootleg) [Kevin Eshbach] | |
| 231 | Dinosaur Hunter (Chinese bootleg of Cadillacs and Dinosaurs) | |
| 232 | [Anonymous] (not working) | |
| 233 | Biaofeng Zhanjing (Chinese bootleg of The Punisher) [Anonymous] | |
| 234 | Cherry Master I (E-Z Spin bootleg / hack) [William Ostronic] | |
| 235 | Lethal Enforcers II: The Western (ver JAA) [David Haywood] | |
| 236 | Fantastic Journey (ver AAA) [David Haywood, Tirino73] | |
| 237 | Smash T.V. (rev 3.01) [Brian Troha, The Dumping Union] | |
| 214 | 238 | |
| 215 | 239 | |
| 216 | 240 | |
| 217 | 241 | New games marked as GAME_NOT_WORKING |
| 218 | 242 | ------------------------------------ |
| 219 | Cycle Mahbou [Angelo Salese, Chack'n, Team Japump, Dumping Union] | |
| 220 | Race Drivin' Panorama [David Haywood] | |
| 221 | Metal Maniax (prototype) [David Haywood] | |
| 243 | Joker Master / Poker Master | |
| 244 | [William Ostronic] (incomplete + encrypted) | |
| 245 | Gunmen Wars [Guru] | |
| 222 | 246 | |
| 223 | 247 | |
| 224 | 248 | |
| 225 | 0.13 | |
| 249 | 0.136u4 | |
| 226 | 250 | ------- |
| 227 | 251 | |
| 228 | 252 | |
| 229 | 253 | MAMETesters Bugs Fixed |
| 230 | 254 | ---------------------- |
| 231 | - 03583: [Core] Windows Debug: Stack crawl is not generated anymore | |
| 232 | (Firewave) | |
| 233 | - 03588: [Sound] mystston, myststono: Music is faster than original | |
| 234 | PCB (Kold666) | |
| 235 | - 03589: [Graphics] mystston, myststono: VSYNC does not match original | |
| 236 | PCB (Kold666) | |
| 237 | - 03592: [Original Reference] outrun, outrunra, outruno, outrundx, | |
| 238 | outrunb: Master clock is incorrect (Tafoid) | |
| 239 | - 00400: [Graphics] combascb: Graphic issues on the "players" screen | |
| 240 | as scrolling problems on 1st stage. (Fabio Priuli) | |
| 241 | - 03575: [Crash/Freeze] block2: [debug] Memory Leak in Debug | |
| 255 | - 03268: [Save/Restore] All sets in galaga.c: Problem with Savestates | |
| 256 | (couriersud) | |
| 257 | - 03698: [Compiling] NOWERROR=1 casues -fno-strict-aliasing to be | |
| 258 | dropped (couriersud) | |
| 259 | - 03749: [Crash/Freeze] All sets in micro3d.c : [debug] Assert in | |
| 260 | debug build (couriersud) | |
| 261 | - 03746: [Core] [debug] Overloaded C++ operator new/operator delete is | |
| 262 | too restrictive (couriersud) | |
| 263 | - 03748: [Documentation] ncv1, ncv2 and clones: Namco 'Classics' | |
| 264 | Collection description incorrect (Tafoid) | |
| 265 | - 03634: [Graphics] quantum: Draws wrong lines (MathisRosenhauer) | |
| 266 | - 03739: [Crash/Freeze] backgamn: Access Violation after OK | |
| 242 | 267 | (Fabio Priuli) |
| 243 | - 03569: [Crash/Freeze] escounts: Access Violation after OK | |
| 244 | (Phil Bennett) | |
| 245 | - 03444: [Debugger] Registered ram blocks registered with save state | |
| 246 | cannot be viewed with debugger (Aaron Giles) | |
| 247 | - 03567: [Crash/Freeze] trvquest: Access Violation after OK | |
| 248 | (Fabio Priuli) | |
| 249 | - 03574: [Crash/Freeze] All sets in drivers using s2636 video chip: | |
| 250 | [debug] assert: src/emu/video/s2636.c:320: offset < 8 | |
| 251 | (Fabio Priuli) | |
| 252 | - 03570: [Crash/Freeze] kf2k3pcb: Access Violation after OK | |
| 253 | (Fabio Priuli) | |
| 268 | - 03249: [Misc.] motoxgo, timecrs2b: H8/3xx: Unknown opcode (PC=2) | |
| 269 | 100 (R. Belmont) | |
| 270 | - 03740: [Crash/Freeze] atomicp, snapper: Duplicate save state entry | |
| 271 | (Tafoid) | |
| 272 | - 03699: [Crash/Freeze] masterw: Game freezes (Fabio Priuli) | |
| 273 | - 03697: [Misc.] bigrun: Missing gfx and terrible music (Mamesick) | |
| 274 | - 02960: [Graphics] speglsht: Regression in Super Eagle Shot, looping | |
| 275 | broken attract mode (Mamesick) | |
| 276 | - 03034: [DIP/Input] scross, scrossu: Control Issues (M.A.S.H.) | |
| 277 | - 03731: [DIP/Input] ixion: Unable to rotate cannon clockwise (M.A.S.H.) | |
| 278 | - 03727: [Misc.] spiders: Source typo in discrete sound system | |
| 279 | (M.A.S.H.) | |
| 254 | 280 | |
| 255 | 281 | |
| 256 | 282 | |
| 257 | 283 | Source Changes |
| 258 | 284 | -------------- |
| 259 | Added driver data struct to: [Fabio Priuli] | |
| 260 | - airbustr.c | |
| 261 | - cvs.c | |
| 262 | - 8080bw.c and mw8080bw.c | |
| 263 | - 88games.c, combatsc.c and rockrage.c | |
| 264 | - psikyo4.c and psikyosh.c | |
| 285 | Removed window config from video_config [couriersud] | |
| 265 | 286 | |
| 266 | Added driver data struct and save states to: [Fabio Priuli] | |
| 267 | - djboy.c | |
| 268 | - toratora.c and sf.c | |
| 269 | - neogeo.c | |
| 270 | - cps1.c, cps2.c and fcrash.c | |
| 271 | - cbasebal.c, chinsan.c, mitchell.c and quasar.c | |
| 272 | - malzak.c | |
| 273 | - battlnts.c, bladestl.c, crshrace.c and contra.c | |
| 274 | - f1gp.c, fastlane.c, flkatck.c, hcastle.c, labyrunr.c and suprslam.c | |
| 275 | - psikyo.c and pgm.c | |
| 287 | Mapped player 2 inputs and buttons 4-6 in Mortal Kombat 3 (bootleg of | |
| 288 | Megadrive version) [Mariusz Wojcieszek]. | |
| 276 | 289 | |
| 277 | Removed old index-based DISCRETE_ADJUSTMENT and then renamed the newer | |
| 278 | DISCRETE_ADJUSTMENT_TAG to replace it. Updated all callers. | |
| 279 | [Aaron Giles] | |
| 290 | {megadriv} Fixed compile by removing "static" [Miodrag Milanovic] | |
| 280 | 291 | |
| 281 | Removed all uses of input_port_by_index(), and removed the function. | |
| 282 | [Fabio Priuli, Aaron Giles] | |
| 292 | Moved global new/delete operators into inlines in emualloc.h to avoid | |
| 293 | link errors with certain architectures. [couriersud] | |
| 283 | 294 | |
| 284 | Added saves to 6522via.c. This fixes problems of gameplan.c and | |
| 285 | trvquest.c games with -autosave. [Fabio Priuli] | |
| 295 | Some minor cleanup/normalizing of emualloc in general. [Aaron Giles] | |
| 286 | 296 | |
| 287 | Enabled GAME_SUPPORTS_SAVE flag to dday.c because some of the core | |
| 288 | changes have fixed the sound problem at loading. [Fabio Priuli] | |
| 297 | namcops2 updates [Guru] | |
| 298 | * Moved Kinnikuman Muscle Grand Prix and Taiko No Tatsujin 9 to | |
| 299 | System 256 | |
| 300 | * Added DVD images for netchu02, soulcl2a, tekken4b, tekken51, | |
| 301 | sukuinuf, and soulclb3 | |
| 289 | 302 | |
| 290 | Imported SAA5050 emulation from MESS and made it a device. Updated | |
| 291 | malzak.c to use it, removing the almost identical implementation in | |
| 292 | the driver. [Fabio Priuli] | |
| 303 | Fixed TI PSG (sn76489 and friends) noise and square-wave period to be | |
| 304 | maximum length when period register is set to 0. Fixed white-noise | |
| 305 | phase/XOR issue: got rid of noise XOR/XNOR select, as all chips seem | |
| 306 | to use XOR. [Lord Nightmare, Michael Zapf, PlgDavid] | |
| 293 | 307 | |
| 294 | Added TILE_GET_INFO_DEVICE and SET_TILE_INFO_DEVICE macros to | |
| 295 | tilemap.c. [Fabio Priuli] | |
| 308 | Preliminary DIP coverage (lives/coinage/test mode) and Player 2 | |
| 309 | control fix for unclepoo. [Tafoid] | |
| 296 | 310 | |
| 297 | Made MB14241 Shifter IC a device and moved its source to emu/machine. | |
| 298 | Updated mw8080bw.c and 8080bw.c accordingly. Also converted fgoal.c | |
| 299 | to use this implementation in place of its own version. [Fabio Priuli] | |
| 311 | Implemented Z80-DMA interrupts. [Curt Coder] | |
| 300 | 312 | |
| 301 | Enhanced the UML opcodes for LOAD, LOADS, and STORE to support | |
| 302 | arbitrary scaling factors. Previously, specifying a size implied | |
| 303 | a scaling factor equal to the size (i.e., specifying DWORD meant | |
| 304 | the index was scaled by 4). This is still the default. However, | |
| 305 | now you can specify the scale explicitly for other cases. For | |
| 306 | example, you can specify DWORD_x1 to fetch a DWORD but don't | |
| 307 | scale the index at all, or BYTE_x8 to fetch a BYTE while scaling | |
| 308 | the index by 8. Updated all backends to make this work. [Aaron Giles] | |
| 313 | Fixed a bug in emu/sound/disc_mth.c. This affected spiders.c fire | |
| 314 | sound. [MASH] | |
| 309 | 315 | |
| 310 | Konami devic-fication and improvements: [Fabio Priuli] | |
| 311 | - Added device versions of all the Konami custom ICs currently | |
| 312 | emulated in machine/konamiic.c and video/konamiic.c | |
| 313 | - Updated combatsc.c, contra.c, crshrace.c, f1gp.c, fastlane.c, | |
| 314 | flkatck.c, hcastle.c, labyrunr.c and suprslam.c to use the | |
| 315 | new code. | |
| 316 | - Moved k056800 sound device to emu/sound and removed the old code; | |
| 317 | updated gticlub.c, hornet.c, nwk-tr.c, ultrsprt.c and zr107.c to | |
| 318 | use this implementation | |
| 319 | - Updated 88games.c, battlnts.c, bladestl.c and rockrage.c to use new | |
| 320 | devices | |
| 321 | - Updated asterix.c and moo.c to use the new devices. | |
| 322 | - Converted aliens.c, blockhl.c, crimfght.c and gbusters.c to use | |
| 323 | Konami video devices | |
| 324 | - Updated parodius.c, simpsons.c, thunderx.c, vendetta.c and | |
| 325 | xexex.c to use the new video devices | |
| 326 | - Updated overdriv.c to use the Konami video devices | |
| 327 | - Updated gradius3.c, mainevt.c & gijoe.c to use Konami video devices | |
| 328 | - Updated ajax.c, bottom9.c, chqflag.c, rollerg.c, spy.c, surpratk.c | |
| 329 | to use Konami video devices | |
| 330 | - Updated dbz.c, lethal.c, metro.c, rungun.c, tail2nos.c, tmnt.c, | |
| 331 | ultraman.c, wecleman.c, xmen.c & zr107.c to use Konami video | |
| 332 | devices instead of konamiic.h code | |
| 333 | - Updated bishi.c and djmain.c to use Konami video devices | |
| 334 | - Updated plygonet.c to use Konami video devices and | |
| 335 | input_port_write for eepromdev_read_bit | |
| 336 | - Updated asterix.c, gijoe.c, hornet.c, lethal.c, moo.c, overdriv.c, | |
| 337 | rungun.c, vendetta.c, xexex.c & xmen.c to use eeprom device | |
| 338 | - Updated konamigx.c, tmnt.c and mystwarr.c to use eeprom device | |
| 316 | Minor fix to sn76489: sn76489 wasn't using the correct noise taps (now | |
| 317 | matches sn94624, still need to test a real chip) Removed a piece of | |
| 318 | useless code, and fixed a comment. [Lord Nightmare] | |
| 339 | 319 | |
| 340 | Fixed tilemaps so they can be initialized at device start time. | |
| 341 | [Aaron Giles] | |
| 320 | ui.c,ui.h,windows/input.c: [Miodrag Milanovic] | |
| 321 | * removed ui_use_new_ui check used by MESS code | |
| 322 | * moved ui_mess_handler_ingame call in proper place, so device UI | |
| 323 | callbacks works again | |
| 324 | * removed toggle of menu bar (MESS related) | |
| 342 | 325 | |
| 343 | Added redumped roms to coolridr. [David Haywood] | |
| 326 | info.c: Moved print_game_categories into info.c, since it can be used | |
| 327 | by any driver anyway. [Miodrag Milanovic] | |
| 344 | 328 | |
| 345 | Fixed crash on exit for systems with no tilemaps. [Aaron Giles] | |
| 329 | Fresh driver notes added for unclepoo based analysis of the Z80 code. | |
| 330 | [Stephh] | |
| 346 | 331 | |
| 347 | Added warning messages for auto_malloc, timer, and save state | |
| 348 | allocations done after init time. These should be fixed when detected, | |
| 349 | and will soon be disallowed entirely. Fixed many cases in the code | |
| 350 | where this was being done. [Aaron Giles] | |
| 332 | k051649.c: fixed bogus for loop in device reset [Fabio Priuli] | |
| 351 | 333 | |
| 352 | Converted Taito F3 sound to a separate machine driver which is | |
| 353 | imported into games that use it. [Aaron Giles] | |
| 334 | z80ctc: Fixed Z80CTC read handler [Tim Schuerewegen] | |
| 354 | 335 | |
| 355 | Converted the balsente driver to driver_data structure. [Aaron Giles] | |
| 336 | Complete rewrite of the Z80-PIO implementation. The handshaking | |
| 337 | signals are now more accurately emulated. As a result, the Merit | |
| 338 | Megatouch games are no longer working since they relied on the earlier | |
| 339 | incorrect behavior. [Curt Coder] | |
| 356 | 340 | |
| 357 | Some more Atari driver shuffling. Added atarigen_init() function | |
| 358 | which allocates all timers and registers for save states. Updated | |
| 359 | all drivers to call it. Converted some drivers to use device timers. | |
| 360 | [Aaron Giles] | |
| 341 | attckufo: Imported MOS6560 device emulation from MESS and removed the | |
| 342 | existent custom audio/video emulation [Fabio Priuli] | |
| 361 | 343 | |
| 362 | Changed ticket.c into a device, updated all users. [Aaron Giles] | |
| 344 | Corrected visible area and timer speeds to make the fix up some | |
| 345 | audio/video problems. [Angelo Salese] | |
| 363 | 346 | |
| 364 | CIA6526: fixed FLAG handling and slight interface cleanup. | |
| 347 | Preliminary merging of hexa.c into the arkanoid.c driver. [Tafoid] | |
| 348 | ||
| 349 | meritm.c: Added scanline timer-based vblank interrupt to work around | |
| 350 | the broken V9938 interrupts. Megatouch games are now working again. | |
| 365 | 351 | [Curt Coder] |
| 366 | 352 | |
| 367 | ||
| 353 | zaxxon.c: F | |
| 368 | 354 | |
| 369 | Koi Koi Part 2: written an hardcoded table (disabled by default), | |
| 370 | concluded that a color prom is currently undumped. Also documented a | |
| 371 | bunch of unused ports [Angelo Salese] | |
| 355 | i386: Small fix for the i386 core, correcting the LLDT instruction. | |
| 356 | This fix sets up the LDTR base and limit values correctly, fixing use | |
| 357 | of the LDT. [Barry Rodewald] | |
| 372 | 358 | |
| 373 | ||
| 359 | Implemented proper | |
| 374 | 360 | |
| 375 | Sky Army: cleaned up the driver, also removed the GAME_WRONG_COLORS | |
| 376 | flag since the colors actually seems correct according to the | |
| 377 | references. [Angelo Salese] | |
| 361 | Implemented irq ack to Big 10 [Angelo Salese] | |
| 378 | 362 | |
| 379 | ||
| 363 | ||
| 380 | 364 | |
| 381 | ||
| 365 | s | |
| 382 | 366 | |
| 383 | Preliminary RSP recompiler, with all vector ops stubbed out to C | |
| 384 | functions for now. [Harmony] | |
| 367 | hexa: merged the remaining code into arkanoid.c [Fabio Priuli] | |
| 385 | 368 | |
| 386 | sbowling.c - Added proper COINAGE selections as well DIP LOCATIONS to | |
| 387 | the driver. Added mapping for button 1 which is used to allow change | |
| 388 | from curve to straight throw. Replaced clock speeds with XTAL values. | |
| 389 | [Tafoid] | |
| 369 | skyfox.c: added driver data struct and save states [Fabio Priuli] | |
| 390 | 370 | |
| 391 | Re-implemented 3d rasterization in the hng64 driver as a FIFO system. | |
| 392 | [Andrew Gardner] | |
| 371 | Hooked up bare bones z180 communication CPU in Cadash [Angelo Salese] | |
| 393 | 372 | |
| 394 | ggconnie.c - Added DIP LOCATIONS to match those showing in service | |
| 395 | mode. Added game year to source from title screen. [Tafoid] | |
| 373 | Make mips register names accessible in the debugger expressions | |
| 374 | [Olivier Galibert] | |
| 396 | 375 | |
| 397 | Added preliminary decryption to Victor 5, Victor 21 and Cross Bingo | |
| 398 | [David Haywood] | |
| 376 | Some improvements to Lucky Girl (New HW) [Angelo Salese] | |
| 399 | 377 | |
| 400 | Decoded Cross Bingo proms [Angelo Salese] | |
| 378 | Fixed a bug in debugint.c: Actually make Del and BS delete the last | |
| 379 | character. [sz72] | |
| 401 | 380 | |
| 402 | hexa.c - Added DIP LOCATIONS as well as assigned XTAL for the clock | |
| 403 | speeds, using those from Arkanoid, since the boards are nearly | |
| 404 | identical in many aspects. [Tafoid] | |
| 381 | Added driver_data struct and save states to the following drivers: | |
| 382 | lkage.c, lockon.c & lsasquad.c. [Fabio Priuli] | |
| 405 | 383 | |
| 406 | RSP recompiler improvements / optimizations: [Harmony] | |
| 407 | - Split SATURATE_ACCUM into a signed and unsigned version to reduce | |
| 408 | stack usage. | |
| 409 | - Corrected an issue with the 0h variants of VMRG, VAND, VNAND, VOR, | |
| 410 | VNOR, VXOR and VNXOR. | |
| 411 | - Slightly optimized unaligned reads and writes | |
| 412 | - Optimized unaligned dword reads | |
| 413 | - Corrected an issue where badly-written RSP programs could jump to | |
| 414 | invalid addresses | |
| 384 | Added save states to liberate.c. [Fabio Priuli] | |
| 415 | 385 | |
| 416 | Added new profiler bucket for DRC recompilation. [Aaron Giles] | |
| 386 | Moved ins8154 emulation from MESS to MAME, needed by future drivers. | |
| 387 | [Dirk Best] | |
| 417 | 388 | |
| 418 | luckgrln: Implemented CRT Controller hook-up [Angelo Salese] | |
| 389 | H8: fix stack trashing when simultaneous IRQ sources asserted | |
| 390 | [R. Belmont] | |
| 419 | 391 | |
| 420 | gomoku.c, sspeedr.c - Added DIPS and changed clock values to XTAL | |
| 421 | [Tafoid] | |
| 392 | namcos23 update: [R. Belmont, Olivier Galibert] | |
| 393 | * motoxgo and timecrs2 are now able to sync up and communicate with | |
| 394 | the emulated JVS I/O board | |
| 395 | * Fixed all games to run VBL toggle | |
| 396 | * Documented data and point ROM checks for future use | |
| 422 | 397 | |
| 423 | ||
| 398 | ||
| 424 | 399 | |
| 425 | Added new option "numprocessors" (see windows.txt for an explanation). | |
| 426 | [couriersud] | |
| 400 | added driver_data struct and save states to the following drivers: | |
| 401 | attckufo.c, m79amb.c, macrossp.c, marinedt.c, markham.c, mayumi.c and | |
| 402 | mcatadv.c. [Fabio Priuli] | |
| 427 | 403 | |
| 428 | Optimized N64 RDP renderer by using function pointers to function | |
| 429 | variants that eliminate costly branches. [Harmony] | |
| 404 | Added driver_data struct and save states to the following drivers: | |
| 405 | madmotor.c, mazerbla.c, mikie.c, mjsister.c, mogura.c, mole.c and | |
| 406 | momoko.c. [Fabio Priuli] | |
| 430 | 407 | |
| 431 | Minor drc improvments: [Aaron Giles] | |
| 432 | - simplified RSP's misaligned memory accesses | |
| 433 | - removed now-unnecessary shifts from direct memory accesses in | |
| 434 | mips3/powerpc drcs | |
| 435 | - optimized AND with 0xff/0xffff/0xffffffff cases for x86/x64 | |
| 436 | - added rudimentary memory/register tracking in x86 backend to | |
| 437 | remove redundant loads | |
| 408 | namcos23: Panic Park uses the motoxgo I/O board, now it syncs too | |
| 409 | [R. Belmont] | |
| 438 | 410 | |
| 439 | cb2001 improvements: [robiza] | |
| 440 | - added ay8910 and 8255ppi devices | |
| 441 | - added some info about relation between cmast91 and cb2001 | |
| 442 | - added many opcodes | |
| 411 | namcos23 update: improved "Gorgon" h/w support [R. Belmont] | |
| 443 | 412 | |
| 444 | Fixed sprite-tilemap priorities in Super Slams [Angelo Salese] | |
| 413 | Added driver_data struct and save states to the following drivers: | |
| 414 | megazone.c, meijinsn.c and mermaid.c. [Fabio Priuli] | |
| 445 | 415 | |
| 446 | Worked around protection in sranger, srangerw and srangerb | |
| 447 | [Angelo Salese] | |
| 416 | namcos23: improved documentation, fixed a few POST fails [R. Belmont] | |
| 448 | 417 | |
| 449 | Converted 7474, 74148, and 74153 TTL implementations to devices. | |
| 450 | [Aaron Giles] | |
| 418 | exerion, exeriont, exerionb (exerion.c driver) : [stephh] | |
| 419 | * Fixed Dip Switches and Inputs (after verification of the Z80 code) | |
| 451 | 420 | |
| 452 | More rom name corrections for the merit.c driver [Brian Troha] | |
| 421 | namcos23 updates: [R. Belmont] | |
| 422 | * Documented clocks and syncs measured by Guru | |
| 423 | * Added Gorgon JVS I/O board. Final Furlong now gets farther | |
| 453 | 424 | |
| 454 | Added Guru's board notes to the Outrun/Super Hang-on Driver. | |
| 455 | [Guru] | |
| 425 | H8: add bild and bist opcodes [R. Belmont] | |
| 456 | 426 | |
| 457 | ||
| 427 | ||
| 458 | 428 | |
| 459 | ||
| 429 | ins8154: U | |
| 460 | 430 | |
| 461 | Removed the global "includes" include and instead specify the | |
| 462 | "includes" path in all #include occurences. [Oliver Stoneberg] | |
| 431 | Namco Super System 23: Add a whole bunch of ram, chips and data roms | |
| 432 | mappings [O. Galibert, R. Belmont] | |
| 463 | 433 | |
| 464 | Eliminated the use of generic.colorram and generic.videoram in | |
| 465 | several drivers [Atari Ace] | |
| 434 | Changed Tecmo World Cup 90 main z80 cpus to 8mhz and vsync to 59.17hz | |
| 435 | / Hard Head sound z80 to 3mhz and vsync to 59.10hz to match original | |
| 436 | PCB readings. [Corrado Tomaselli] | |
| 466 | 437 | |
| 467 | Fixed Brick Zone parent set bitplane graphics [Angelo Salese] | |
| 438 | Fixed inverted buttons 1 and 2 on f1gp, f1gp2 and Super Formula. They | |
| 439 | are Jamma standards boards: brake button is wired to pin 22 and | |
| 440 | acceleration button to pin 23 which are respectively button 1 and 2 in | |
| 441 | a jamma standard pinout. [Corrado Tomaselli] | |
| 468 | 442 | |
| 469 | Fix megadrive emulation to use the SMSIII version of the sn76489 | |
| 470 | sound chip. [Lord Nightmare, DFJustin] | |
| 443 | Added driver_data struct and save states to the following drivers: | |
| 444 | matmania.c, metlclsh.c, mexico86.c, mouser.c, mrflea.c, mrjong.c, | |
| 445 | munchmo.c and mwarr.c. [Fabio Priuli] | |
| 471 | 446 | |
| 472 | Added save states to ics2115 sound device. [Fabio Priuli] | |
| 447 | Added driver_data struct to the following drivers: mgolf.c, | |
| 448 | minivadr.c, mosaic.c and mrdo.c. [Fabio Priuli] | |
| 473 | 449 | |
| 474 | Changed EEPROM usage in many drivers to use the new device version. | |
| 475 | [Aaron Giles, Fabio Priuli] | |
| 450 | Enabled save states to mugsmash.c (everything was already saved) | |
| 451 | [Fabio Priuli] | |
| 476 | 452 | |
| 477 | Removed auto-init hack from some Konami games. Hold down F2 and reset | |
| 478 | (via F3) to initialize the EEPROM, like all the other Konami games. | |
| 453 | hng64: Added sub-page texture indexing. Fixes many texture lookups in | |
| 454 | roadedge and xrally. [Andrew Gardner] | |
| 455 | ||
| 456 | Added driver_data struct and save states to the following drivers: | |
| 457 | news.c, nightgal.c and nycaptor.c. [Fabio Priuli] | |
| 458 | ||
| 459 | Added driver_data struct to the following drivers: nitedrvr.c and | |
| 460 | nmg5.c. [Fabio Priuli] | |
| 461 | ||
| 462 | enabled save flag in othunder.c (everything is properly saved, but it | |
| 463 | seems I forgot about this driver when I device-fied Taito video chips) | |
| 479 | 464 | [Fabio Priuli] |
| 480 | 465 | |
| 481 | Cleaned up EEPROM device implementation a bit. [Aaron Giles] | |
| 466 | pic8259: replaced pic8259_set_irq_line with pic8259_irX_w write line | |
| 467 | handlers. [Dirk Best] | |
| 482 | 468 | |
| 483 | Added flickering effect in Super Slams title screen | |
| 484 | [Angelo Salese, Guru] | |
| 469 | pic8259: updated to use devcb calls. [Dirk Best] | |
| 485 | 470 | |
| 486 | ||
| 471 | Improved gfxs | |
| 487 | 472 | |
| 488 | ||
| 473 | Implemented d | |
| 489 | 474 | |
| 490 | Spark Man: Refactored the protection, implemented thrash protection | |
| 491 | that's used after the title screen. [Angelo Salese] | |
| 475 | Converted backfire.c, boogwing.c, dietgo.c, mirage.c, pktgaldx.c, | |
| 476 | simpl156.c, supbtime.c, tumblep.c to use the device-fied video chips | |
| 477 | [Fabio Priuli] | |
| 492 | 478 | |
| 493 | EEPROM device now looks for a matching memory region to fetch the | |
| 494 | default values from. Fixed bug in ROM loader that would change the | |
| 495 | memory region flags to match devices with no address bus. Updated | |
| 496 | groundfx to use the new default loading scheme. [Aaron Giles] | |
| 479 | Added driver data struct and save states to the following drivers: | |
| 480 | dietgo.c, mirage.c, pktgaldx.c, supbtime.c and tumblep.c | |
| 481 | [Fabio Priuli] | |
| 497 | 482 | |
| 498 | Reworked the hng64 polygon chunk recovery code to be more crash-proof. | |
| 499 | Documented what's known about the 3d data much better. Fixed vertex | |
| 500 | ROM loading for fatfurwa and buriki. [Andrew Gardner] | |
| 483 | hng64 : More accurately emulated intrinsic camera matrix. | |
| 484 | [Andrew Gardner] | |
| 501 | 485 | |
| 502 | Converted rtc65271 to a device. [Aaron Giles] | |
| 486 | Changed all driver_data structs into classes with a simple constructor | |
| 487 | and a static allocation function. [Aaron Giles] | |
| 503 | 488 | |
| 504 | Added "new" command -listdevices (or -ld) to list the devices attached | |
| 505 | to a driver. I notice that MESS has a command with the same name; | |
| 506 | hopefully the behaviors can be combined eventually. [Aaron Giles] | |
| 489 | Changed MDRV_DRIVER_DATA to reference driver_data::alloc instead of | |
| 490 | just providing a size. This function is called to allocate the driver | |
| 491 | data. This allows objects to be embedded in the state data and be | |
| 492 | properly initialized. [Aaron Giles] | |
| 507 | 493 | |
| 508 | Got rid of explicit resource tracking for state saving. Now we just | |
| 509 | use the auto_ allocators, since registration is restricted to | |
| 510 | initialization. [Aaron Giles] | |
| 494 | Moved driver data allocation after device list construction so that | |
| 495 | devices can be found when the driver data is constructed. [Aaron Giles] | |
| 511 | 496 | |
| 512 | Moved machine->gfx initialization out of the video module and into | |
| 513 | drawgfx. We now call this before devices are initialized, so that | |
| 514 | devices can dynamically append to the machine->gfx as needed. | |
| 515 | [Aaron Giles] | |
| 497 | wardner, wardnerj, pyros (wardner.c driver) : [stephh] | |
| 498 | * Fixed Dip Switches and Inputs (after verification of the Z80 code) | |
| 516 | 499 | |
| 517 | i386 improvements: [Barry Rodewald] | |
| 518 | * minimal implementation of the LSL protected mode instruction | |
| 519 | * fixed the REP instruction when used with a segment prefix. | |
| 500 | Converted cbuster.c, cninja.c, dassault.c, funkyjet.c, rohga.c and | |
| 501 | vaportra.c to use device versions of the deco16 video chips | |
| 502 | [Fabio Priuli] | |
| 520 | 503 | |
| 521 | Updated readme for Race Drivin' Compact. [Guru] | |
| 504 | Made deco32.c independent of deco16ic.c (it only needed a drawing | |
| 505 | routine) and removed deco16ic.c now that it is not needed anymore | |
| 506 | [Fabio Priuli] | |
| 522 | 507 | |
| 523 | Fixed a couple of edge case parsing bugs in srcclean.c. [Atari Ace] | |
| 508 | avgdvg: Fixed mametesters bug 03634. Reduced flickering in | |
| 509 | Tempest/Quantum. [Mathis Rosenhauer] | |
| 524 | 510 | |
| 525 | Fixed some unbalanced quotes/braces lurking in the source (mostly in | |
| 526 | disabled code). [Atari Ace] | |
| 511 | pit8253: Updated to use devcb calls, cleanups. [Dirk Bst] | |
| 527 | 512 | |
| 528 | Added a new CPU core for the PIC 16c62x series of processors. | |
| 529 | [Samuele Zannoli] | |
| 513 | Renamed decodev->deco16ic [Fabio Priuli] | |
| 530 | 514 | |
| 515 | Added driver data class to funkyjet.c [Fabio Priuli] | |
| 531 | 516 | |
| 517 | Added driver data class and save states to vaportra.c and tumbleb.c | |
| 518 | [Fabio Priuli] | |
| 532 | 519 | |
| 520 | Added driver_data class and save states to the following drivers: | |
| 521 | backfire.c, boogwing.c, cbuster.c, cninja.c, dassault.c, dblewing.c, | |
| 522 | deco156.c, rohga.c, simpl156.c [Fabio Priuli] | |
| 523 | ||
| 524 | twincobr, twincobru, ktiger, gulfwar2 (twincobr.c driver) : [stephh] | |
| 525 | * Fixed Dip Switches and Inputs (after verification of the M68000 and | |
| 526 | Z80 code) | |
| 527 | ||
| 528 | fshark, skyshark, hishouza, fsharkbt (twincobr.c driver) : [stephh] | |
| 529 | * Fixed Dip Switches and Inputs (after verification of the M68000 | |
| 530 | code) | |
| 531 | ||
| 532 | Corrected default assignment of F10 as the default throttle on/off key | |
| 533 | for MAME. The #ifdef MESS is needed here due to it's unique old/new | |
| 534 | UI setup. [Miodrag Milanovic] | |
| 535 | ||
| 536 | Naomi updates: [R. Belmont, David Haywood, Andreas Naive, Deunan | |
| 537 | Knute, Guru, ANY] | |
| 538 | * Fix ROM mirroring in gram2000 and friends | |
| 539 | * Preliminary hookup of live decryption. Decryption + decompression | |
| 540 | is not yet supported so some games still load trojaned data | |
| 541 | instead. | |
| 542 | ||
| 543 | naomi: Fixed decrypt method 2, added many more game keys | |
| 544 | [Deunan Knute, R. Belmont] | |
| 545 | ||
| 546 | namcos23.c: Add comments about the irq testing code [O. Galibert] | |
| 547 | ||
| 548 | Tidied up includes in a number of files in src/osd/sdl. [couriersud] | |
| 549 | ||
| 550 | Hook up vblank and just enough controls to pass error screens | |
| 551 | [O. Galibert] | |
| 552 | ||
| 553 | namcos23: get Gorgon games out of service mode, fix finlflng sound ROM | |
| 554 | loading [R. Belmont] | |
| 555 | ||
| 556 | namcos23: comment the probable dips a tad better [O. Galibert] | |
| 557 | ||
| 558 | Added driver_data class and save states to the following drivers: | |
| 559 | ohmygod.c, ojankohs.c and olibochu.c. [Fabio Priuli] | |
| 560 | ||
| 561 | Added driver_data class and save states to the following drivers: | |
| 562 | oneshot.c, onetwo.c, orbit.c, othello.c and othldrby.c. | |
| 563 | [Fabio Priuli] | |
| 564 | ||
| 565 | Added driver_data class to the following drivers: nemesis.c and nyny.c | |
| 566 | [Fabio Priuli] | |
| 567 | ||
| 568 | Improvements to Funworld driver. [Roberto Fresca] | |
| 569 | * Fixed Jolly Joker graphics and colors. | |
| 570 | * Changed Jolly Joker description to Jolly Joker (98bet). | |
| 571 | * Added a new croatian set of Jolly Joker with maximum bet = 40. | |
| 572 | * Moved the hardware description and tech notes to the ROM_LOAD | |
| 573 | section. | |
| 574 | * Added a external default NVRAM for Jolly Card Professional 2.0. | |
| 575 | * Updated technical notes. | |
| 576 | ||
| 577 | Implemented proper BIOS/Cart ROM bankswitch in the MACS driver, this | |
| 578 | improves program logic in Kisekae Mahjong [Angelo Salese] | |
| 579 | ||
| 580 | Removed the coin latch kludge in the MACS driver [Angelo Salese] | |
| 581 | ||
| 582 | snes.c: minor refactorization [Fabio Priuli] | |
| 583 | ||
| 584 | namcos23: fix the data rom mappings [O. Galibert] | |
| 585 | ||
| 586 | rallybik, truxton (toaplan1.c driver) [stephh]: | |
| 587 | * Fixed Dip Switches and Inputs (after verification of the M68000 and | |
| 588 | Z80 code) | |
| 589 | ||
| 590 | snes.c: temporarily reverted implementation of mult/div through timers | |
| 591 | since it breaks some SNES games on the MESS side [Fabio Priuli] | |
| 592 | ||
| 593 | namcos23: timecrs2c reaches the test mode [O. Galibert] | |
| 594 | ||
| 595 | Fixed MT3698 (NOWERROR=1 casues -fno-strict-aliasing to be dropped). | |
| 596 | [couriersud] | |
| 597 | ||
| 598 | Fixed save state support in custom namco devices (50,51,53) and | |
| 599 | galaga.c. Also resolves MT03268: All sets in galaga.c: Problem with | |
| 600 | Savestates. [couriersud] | |
| 601 | ||
| 602 | naomi: convert GD-ROM games to use real PIC dumps [David Haywood] | |
| 603 | ||
| 604 | Add MAME-ified version of SoftFloat library [John R. Hauser] | |
| 605 | ||
| 606 | Merged kingdrby.c and cowrace.c drivers [Angelo Salese] | |
| 607 | ||
| 608 | namcos23: working inputs for TC2 test mode [R. Belmont] | |
| 609 | ||
| 610 | namcos23: Document gun I/O boards [Guru] | |
| 611 | ||
| 612 | hng64 : An initial implementation of hardware lighting. | |
| 613 | [Andrew Gardner] | |
| 614 | ||
| 615 | zerowing, zerowing2 (toaplan1.c driver) [stephh] : | |
| 616 | * Fixed Dip Switches and Inputs (after verification of the M68000 and | |
| 617 | Z80 code) | |
| 618 | ||
| 619 | namcos23: fix Time Crisis 2 coin input [R. Belmont] | |
| 620 | ||
| 621 | ||
| 622 | ||
| 533 | 623 | New games added or promoted from NOT_WORKING status |
| 534 | 624 | --------------------------------------------------- |
| 535 | Shark Party (Italy, v1.3) [David Haywood, Angelo Salese] | |
| 536 | Victor 5 [David Haywood, Angelo Salese] | |
| 537 | Victor 21 [David Haywood, Angelo Salese] | |
| 538 | Poker Carnival [David Haywood, Angelo Salese] | |
| 625 | Mortal Kombat 3 (bootleg of Megadrive version) | |
| 626 | [Mariusz Wojcieszek, Patrick McCarron, Smitdogg, The Dumping Union] | |
| 627 | Bug Fever (5 sets) [Brian Troha, Dumping Union] | |
| 628 | Uncle Poo | |
| 629 | [Team Europe, Dumping Union, Rene Single, David Haywood, Angelo Salese] | |
| 630 | Champion Number [f205v, David Haywood, Angelo Salese] | |
| 539 | 631 | |
| 540 | 632 | |
| 541 | ||
| 542 | 633 | New clones added |
| 543 | 634 | ---------------- |
| 544 | Hyper Street Fighter 2: The Anniversary Edition (USA 040202) | |
| 545 | [Artemio Urbina, David Haywood] | |
| 546 | ST-V BIOS 1.11 [2 sets - Japan and Taiwan] [XingXing] | |
| 547 | Blood Bros. (set 3) [Dlfrsilver] | |
| 548 | Caveman Ninja (bootleg) [Dlfrsilver] (NOT WORKING) | |
| 549 | Pipi & Bibis / Whoopee!! (Z80 sound cpu, set 2) [Dlfrsilver] | |
| 550 | Mortal Kombat 4 v1.0 (not working) | |
| 551 | [xrodney, HobbyRoms, Patrick McCarron] | |
| 635 | Pit Fighter (rev 9) [B. Sparks, Smitdogg, The Dumping Union] | |
| 636 | Time Crisis 2 (TSS4 Ver.A, Super System 23) [Guru] | |
| 637 | Pushman (Top Tronic license) | |
| 638 | [MrGoodwraith, Ren?\195?\169 Single, Smitdogg, The Dumping Union] | |
| 639 | Blades of Steel (Version L) | |
| 640 | [R. Mucciarelli, Phil Bennett, Smitdogg, The Dumping Union] | |
| 641 | Touchmaster 4000 (v6.03 Standard) | |
| 642 | [jeremymtc, Brian Troha, Smitdogg, The Dumping Union] | |
| 643 | Alien Invasion [Andrew Welburn, Brian Troha, The Dumping Union] | |
| 644 | Soul Calibur (SOC14/VER.B) [Guru] | |
| 645 | Jolly Joker (40bet, croatian hack) [Roberto Fresca, Team Europe] | |
| 646 | Touchmaster (v2.2-01 Standard) | |
| 647 | [S. Austin, Smitdogg, The Dumping Union] | |
| 648 | Smash [Trevor Brown] | |
| 649 | X-Men: Children of the Atom (Japan 950105) [Razoola] | |
| 650 | Maya (set 1) | |
| 651 | [Team Europe, Dumping Union, Rene Single, David Haywood] | |
| 652 | King Derby (Taiwan bootleg) [Team Europe, Dumping Union] (not working) | |
| 653 | Cherry Master (Watermelon bootleg / hack) [William Ostronic] | |
| 654 | Cherry Master (Fun USA v2.5 bootleg / hack) [William Ostronic] | |
| 655 | Aracnis (bootleg of Scorpion on Moon Cresta hardware) [f205v] | |
| 656 | The Pit (bootleg on Moon Quasar hardware) | |
| 657 | [Andrew Welburn, David Haywood] | |
| 658 | Safari (set 2, bootleg?) [f205v] | |
| 659 | Moon Cresta (Nichibutsu UK) [Andrew Welburn] | |
| 660 | Armed Police Batrider (Taiwan Revision A) [Anonymous] | |
| 552 | 661 | |
| 553 | 662 | |
| 554 | ||
| 555 | 663 | New games marked as GAME_NOT_WORKING |
| 556 | 664 | ------------------------------------ |
| 557 | Happy 6-in-1 [XX] | |
| 665 | L.A. Machineguns [ANY] | |
| 666 | The Ocean Hunter [ANY] | |
| 667 | Royal Gum [Siftware] | |
| 558 | 668 | |
| 559 | 669 | |
| 560 | 670 | |
| 561 | 0.13 | |
| 671 | 0.136u3 | |
| 562 | 672 | ------- |
| 563 | 673 | |
| 564 | 674 | |
| 565 | 675 | MAMETesters Bugs Fixed |
| 566 | 676 | ---------------------- |
| 567 | - 03565: [Color/Palette] astrof, astrof2, astrof3: blue background is | |
| 568 | supposed to be black (David Haywood) | |
| 569 | - 03557: [Sound] All sets in namcos12.c: Music is slower than | |
| 570 | original (Phil Bennett) | |
| 571 | - 03561: [Crash/Freeze] robokid, robokidj, robokidj2: Segmentation | |
| 572 | Fault after OK (Fabio Priuli) | |
| 573 | - 03562: [Crash/Freeze] fcombat: Segmentation Fault after OK | |
| 574 | (Fabio Priuli) | |
| 575 | - 03560: [Crash/Freeze] missb2, saiyugoub1, saiyugoub2: Driver Data | |
| 576 | Struct Issues (Fabio Priuli) | |
| 577 | - 03559: [Crash/Freeze] All sets in viper.c, subsino.c and coolridr.c: | |
| 578 | Segmentation Fault before OK (Fabio Priuli) | |
| 677 | - 03724: [Speed] mrdo: Incorrect XTALs cause for problems with | |
| 678 | refresh rate and game speed. (Tafoid) | |
| 679 | - 03706: [Sound] lastday, gulfstrm: Audio Regression (M.A.S.H.) | |
| 680 | - 03704: [Sound] evilston: Missing sound (M.A.S.H.) | |
| 681 | - 00993: [Crash/Freeze] sharrier: [debug] Crashes when a specific | |
| 682 | sample is being played during gameplay. (Phil Bennett) | |
| 683 | - 03692: [Crash/Freeze] kurikint: Service Switch error (M.A.S.H.) | |
| 579 | 684 | |
| 580 | 685 | |
| 581 | 686 | |
| 582 | 687 | Source Changes |
| 583 | 688 | -------------- |
| 584 | Kusayakyu improvements [Angelo Salese] | |
| 585 | - fixed color prom hook-up, tilemap color offsets and tilemap | |
| 586 | flipping | |
| 587 | - fixed sound and tweaked the frequencies in the driver | |
| 689 | Fixed Dip Switches and Inputs (after verification of the Z80 code) | |
| 690 | for 'scramblb', 'scramb2', 'bagmanmc', 'dkongjrm', 'rockclim' (also | |
| 691 | updated memory map for this last game). [stephh] | |
| 588 | 692 | |
| 589 | Tron: Hooked up cocktail (P2) fire button so that it can be used | |
| 590 | in-game and in test mode. [Tafoid] | |
| 693 | am29k: fix PPC GCC compile error [R. Belmont] | |
| 591 | 694 | |
| 592 | Added driver data struct and save states to: [Fabio Priuli] | |
| 593 | - gberet.c, ddrible.c, gaelco.c, trackfld.c, hyperspt.c, yiear.c | |
| 594 | - hnayayoi.c, hanaawas.c, higemaru.c, himesiki.c and sonson.c | |
| 595 | - galspnbl.c, gcpinbal.c, ginganin.c, go2000.c, goal92.c, goindol.c, | |
| 596 | good.c, gotcha.c, gotya.c, gstream.c, gumbo.c, gundealr.c, | |
| 597 | hitme.c, holeland.c & homerun.c | |
| 598 | - glass.c & homedata.c | |
| 599 | - fromance.c, fromanc2.c, ikki.c, imolagp.c, inufuku.c | |
| 600 | - jack.c | |
| 601 | - jangou.c, jantotsu.c, jollyjgr.c and jongkyo.c | |
| 602 | - kangaroo.c, karnov.c, kchamp.c, kickgoal.c, kingobox.c, | |
| 603 | kncljoe.c, koikoi.c, kopunch.c, ksayakyu.c and kyugo.c | |
| 604 | - ladybug.c, ladyfrog.c, lastduel.c, lwings.c, redclash.c and | |
| 605 | yunsung8.c | |
| 606 | - laserbas.c, laserbat.c, lastfght.c, lazercmd.c and lemmings.c | |
| 695 | Added Sega ID# for newly added version of INDY 500 and correct the | |
| 696 | spelling of attract. [Brian Troha] | |
| 607 | 697 | |
| 608 | Added driver data struct to: [Fabio Priuli] | |
| 609 | - galivan.c, jailbrek.c, sbasketb.c | |
| 610 | - alpha68k.c, amspdwy.c, gng.c, gunsmoke.c, hotblock.c | |
| 611 | - aerofgt.c and gyruss.c | |
| 612 | - hyprduel.c | |
| 613 | - pipedrm.c | |
| 614 | - ironhors.c | |
| 615 | - jackal.c | |
| 616 | - lasso.c | |
| 698 | minor information update for Viper 1 games in seibuspi.c. | |
| 699 | [Brian Troha] | |
| 617 | 700 | |
| 618 | ||
| 701 | Fix | |
| 619 | 702 | |
| 620 | Converted cabal, mappy, toypop and zaxxon to use driver_data | |
| 621 | structure [Atari Ace] | |
| 703 | Fix immediate crash on startup of GTK debugger. [R. Belmont] | |
| 622 | 704 | |
| 623 | Fixed CP1610 disassembler. [Robbbert] | |
| 705 | namcos11: use real C76 BIOS for audio and I/O | |
| 706 | [R. Belmont, Olivier Galibert, Guru] | |
| 624 | 707 | |
| 625 | Cool Riders improvements: [Angelo Salese, David Haywood] | |
| 626 | - fixed regression | |
| 627 | - hooked up what it looks like a ROM->to->VRAM transfer... | |
| 628 | - slightly improved booting | |
| 629 | - some hooks to allow FBI logo drawing | |
| 630 | - basic DMA hooked up | |
| 631 | - fixed program ROM memory map loading as per the service mode item | |
| 632 | - allow it to draw RAM-based chars, starts to show correct gfxs | |
| 633 | - fixed paletteram and implemented basic inputs | |
| 634 | - implemented DMA vram transfers | |
| 635 | - added Guru readme | |
| 636 | - hooked up videoram reading in drawing functions | |
| 637 | - some hook-ups for the text blitter | |
| 708 | Cleaned up comments refering to old driver names, and updated clone | |
| 709 | names in drivers from 0-K. [Tafoid] | |
| 638 | 710 | |
| 639 | Wink: Fixed colors [Angelo Salese] | |
| 711 | [APEXC] 1. Added pseudo PC register for the debugger, it will now | |
| 712 | highlight the next instruction to be executed. 2. Added "normal" | |
| 713 | addresses to disassembler output, so anyone can see the program flow. | |
| 714 | [Robbbert] | |
| 640 | 715 | |
| 641 | Mostly resolved mix of intel and motorola notation in tms32025 | |
| 642 | disassembler [Lord Nightmare] | |
| 716 | Sega misc wip: [Fabio Priuli] | |
| 717 | - split dependences of system16 games from bootleg ones | |
| 718 | - moved some .h files to includes/ | |
| 719 | - removed some unneeded include | |
| 720 | - removed some dead code | |
| 721 | - added driver data struct to segahang.c, segaorun.c, segas16a.c, | |
| 722 | sega16b.c, segas18.c, segaxbd.c & segaybd.c | |
| 723 | - added save states to segas16a.c | |
| 643 | 724 | |
| 644 | Cosmic: fixed cosmica2 romset rom split and names to match romset as | |
| 645 | described in mameinfo, which it matches (except for one rom which | |
| 646 | mameinfo is probably wrong about). The romset uses a different rom | |
| 647 | daughterboard to the other cosmica romsets, and different sized roms. | |
| 648 | [Lord Nightmare] | |
| 725 | Fixed Dip Switches and Inputs (after verification of the Z80 code) for | |
| 726 | 'ozon1', 'ladybugg', 'vpool'. [stephh] | |
| 649 | 727 | |
| 650 | Added shared driver data struct to 40love.c, bking.c, buggychl.c and | |
| 651 | msisaac.c (they use the same mcu emulation) [Fabio Priuli] | |
| 728 | Added driver data struct to system 16/18 bootlegs and removed most | |
| 729 | unused code. [Fabio Priuli] | |
| 652 | 730 | |
| 653 | Added preliminary HNG64 additive tilemap blending [David Haywood] | |
| 731 | Implemented reels in Treasure Island (Subsino), same as goldstar.c | |
| 732 | [David Haywood] | |
| 654 | 733 | |
| 655 | Fixed srcclean handling of embedded comments within strings | |
| 656 | [Atari Ace] | |
| 734 | Converted Sega 315-5248, 315-5249 and 315-5250 custom ICs to be | |
| 735 | devices and updated drivers accordingly. [Fabio Priuli] | |
| 657 | 736 | |
| 658 | PCB documentation updates: [Kevin Eshbach] | |
| 659 | * Added the board xtal's for Battlantis, Contra and Pandora's Palace | |
| 660 | * Corrected the MCU dump for Pandora's Palace | |
| 661 | * Added indication of an undumped PAL for Contra/Gryzor | |
| 662 | * Added PAL dumps for Cruis'n USA - rev L4.1 | |
| 663 | * Added information on the PROM from the 2 Board version of Congo | |
| 664 | Bongo | |
| 737 | [PDP1] Display the PC in hex as well as octal. [Robbbert] | |
| 665 | 738 | |
| 666 | Noraut Poker driver improvements: [Roberto Fresca] | |
| 667 | * Added new technical notes. | |
| 668 | * Added Kimble Z80 hardware support. | |
| 669 | * Added Prologic-Noraut hardware support. | |
| 670 | * Added proper discrete sound support to Kimble games, | |
| 671 | and Prologic-Noraut Joker Poker. | |
| 672 | * Slightly adjusted the visual area. | |
| 673 | This can be wrong and must be rechecked. | |
| 674 | * Relocated the hardware notes and layouts to ROM_LOAD section, | |
| 675 | so can be seen/maintained in a cleaner way. | |
| 676 | * Fixed the default lamps state. | |
| 739 | Converted hornet.c to use the Konami 037122 device and removed the | |
| 740 | old code. [Fabio Priuli] | |
| 677 | 741 | |
| 678 | Cleaned-up several drivers; added missing prototypes and removed dead | |
| 679 | ones, marked non-exported functions as static and removed cases of | |
| 680 | #include "deprecat.h" [Atari Ace] | |
| 742 | Converted gticlub.c, nwk-tr.c and zr107.c to use the Konami 001604 | |
| 743 | device and removed the old code. [Fabio Priuli] | |
| 681 | 744 | |
| 682 | Aleck 64: Implemented player 2 inputs [Angelo Salese] | |
| 745 | carjmbre.c - Added XTAL, corrected second z80 speed and added DIP | |
| 746 | LOCATIONS for driver. [Tafoid] | |
| 683 | 747 | |
| 684 | Added a PCB layout for M.Kramer's Black Jack Poker, based on a hi-res | |
| 685 | pic. Also added undumped devices as NO_DUMP. [Roberto Fresca] | |
| 748 | Improvements to Treasure Island: [Roberto Fresca] | |
| 749 | - Added proper inputs. | |
| 750 | - Added coin/keyin/keyout/payout counters. | |
| 751 | - Limited the bet and coin pulses to avoid repeats and coin jams. | |
| 752 | - Added complete coinage and keyin DIP switches. | |
| 753 | - Added main game and double-up rates DIP switches. | |
| 754 | - Added minimum bet DIP switches. | |
| 755 | - Added maximum bet DIP switches. | |
| 756 | - Added main game and double-up limit DIP switches. | |
| 757 | - Added payout mode and auto take DIP switches. | |
| 758 | - Added DIP locations as seen in the settings mode. | |
| 759 | - Added demo sounds DIP switch. | |
| 760 | - Created proper button-lamps layout. | |
| 761 | - Added technical notes. | |
| 762 | - Some clean-ups... | |
| 686 | 763 | |
| 687 | Added common driver data struct to timeplt.c, tutankhm.c, junofrst.c, | |
| 688 | pooyan.c, rallyx.c and rocnrope.c (these drivers all use | |
| 689 | audio/timeplt.c). As a side effect, we now have save states in | |
| 690 | junofrst.c and rallyx.c. [Fabio Priuli] | |
| 764 | Dumped IC1 from Giant Gram 2000 [Joerg Hartenberger] | |
| 691 | 765 | |
| 692 | Converted atari drivers over to using driver_data for the most | |
| 693 | part. Some shared systems still exist with globals, but this | |
| 694 | tackles the atarigen module and the variables local to each | |
| 695 | driver. [Aaron Giles] | |
| 766 | Fixed bonus game gfxs in Treasure Island (Subsino) [Angelo Salese] | |
| 696 | 767 | |
| 697 | Added validity check that AM_BASE_MEMBER and AM_SIZE_MEMBER items | |
| 698 | point within the bounds of the driver_data structure. [Aaron Giles] | |
| 768 | Fix os2 auto-detect [KO Myung-Hun] | |
| 699 | 769 | |
| 700 | Fixed DMADAC wrapping behavior. [Tim Schuerewegen] | |
| 770 | Preliminary Panasonic MN10200 CPU core and Taito ZOOM ZSG-1 sound | |
| 771 | system [Olivier Galibert] | |
| 701 | 772 | |
| 702 | Added Driver Configuration to astrof.c to emulate common wire hack | |
| 703 | which causes black background [David Haywood] | |
| 773 | Document FPGA-provided "ic1" data in gram2000 [Joerg Hartenberger] | |
| 704 | 774 | |
| 705 | ||
| 775 | Implemented flip scr | |
| 706 | 776 | |
| 707 | Identified Semicom's Dream World hardware as a copy of Psikyo's | |
| 708 | 68020 hardware (it was already known that their older platforms were | |
| 709 | copied from Snow Bros, and Tumble Pop) [David Haywood] | |
| 777 | Fixed video emulation in Best League (World Cup version) | |
| 778 | [Angelo Salese] | |
| 710 | 779 | |
| 711 | i386 core improvements: [Barry Rodewald] | |
| 712 | * Fixed EIP displacement when executing FPU instructions with no | |
| 713 | 80387 present | |
| 714 | * Added 32-bit implementations of SLDT and STR | |
| 780 | Fix DISTRO=gcc44-generic make shortcut to use gcc-4.4 properly | |
| 781 | (-V 4.4 does not work for linking) [couriersud] | |
| 715 | 782 | |
| 716 | Converted Kaneko Pandora sprite chip to be a MAME device and updated | |
| 717 | drivers accordingly. [Fabio Priuli] | |
| 783 | Minor changes for internal render debugger [couriersud] | |
| 784 | - ui_input_frame_update is now global | |
| 785 | - moved element_component from rendlay.c to rendlay.h | |
| 786 | - added ability to rendlay.c to define "container" components. These | |
| 787 | simply provide a render_container. | |
| 718 | 788 | |
| 719 | Added tilemap_create_device() function which lets you create a tilemap | |
| 720 | from within a device, and be passed that device in your callback. | |
| 721 | [Aaron Giles] | |
| 789 | Added DEBUG_FLAG_OSD_ENABLED to allow coexistence of debuggers going | |
| 790 | forward. Replaced all occurrences of OPTION_DEBUG in src/osd/* by | |
| 791 | checking machine->debug_flags. Replaced all occurrences of | |
| 792 | DEBUG_FLAG_ENABLED in src/osd/* by DEBUG_FLAG_OSD_ENABLED For the | |
| 793 | time being, DEBUG_FLAG_OSD_ENABLED is default (set in mame.c). | |
| 794 | [couriersud] | |
| 722 | 795 | |
| 723 | Converted Signetics 2636 video chip to be a MAME device and updated | |
| 724 | drivers using it accordingly. [Fabio Priuli] | |
| 796 | Fixed Dip Switches and Inputs (after verification of the Z80 code) for | |
| 797 | 'bongo', 'porter'. [stephh] | |
| 725 | 798 | |
| 726 | Memory system changes: [Aaron Giles] | |
| 727 | - Memory banks are now referenced by tag rather than index. | |
| 728 | Changed all memory_bank_* functions to specify a tag. | |
| 729 | Bulk-converted existing banks to be tagged "bank##" in | |
| 730 | order to ensure consistency. However, going forward, the | |
| 731 | tags don't matter, so please name them something useful. | |
| 799 | Implemented Actel FPGA ID, used by some Naomi games for accessing a | |
| 800 | special ROM check mode [Deunan Knute, Angelo Salese] | |
| 732 | 801 | |
| 733 | - Added AM_BANK_READ/AM_BANK_WRITE macros to let you specify | |
| 734 | bank tags. Also changed AM_ROMBANK and AM_RAMBANK macros to | |
| 735 | accept tags as well. | |
| 802 | Documentation update for Hotdog Storm, IE: The PCB ID number and tile | |
| 803 | map chip info. [Brian Troha] | |
| 736 | 804 | |
| 737 | - Added new functions memory_install_read_bank_handler and | |
| 738 | memory_install_write_bank_handler to install banks by tag | |
| 739 | name, similar to input ports. | |
| 805 | Add and hook up ZOOM ZSG-2 skeleton [Olivier Galibert] | |
| 740 | 806 | |
| 741 | - Changed internals of memory system to dynamically allocate | |
| 742 | all banks. The first time a bank with an unknown tag is | |
| 743 | installed, a new bank object is created and tracked | |
| 744 | internally. | |
| 807 | Doesn't do much at the moment, but the increase in documentation value is | |
| 808 | significant (we're documenting the sample compression format, for one thing). | |
| 745 | 809 | |
| 746 | - Removed SMH_* macros entirely. In their place are a series of | |
| 747 | expanded macros and new memory installation helpers. Some | |
| 748 | mappings below (not all are new): | |
| 810 | New driver for Sigma B52 system. ACRTC implementation is a bit hacky | |
| 811 | due to its preliminary emulation status. [Roberto Fresca] | |
| 749 | 812 | |
| 750 | AM_READ(SMH_RAM) -> AM_READONLY | |
| 751 | AM_WRITE(SMH_RAM) -> AM_WRITEONLY | |
| 752 | AM_READWRITE(SMH_RAM, SMH_RAM) -> AM_RAM | |
| 753 | AM_READ(rhandler) AM_WRITE(SMH_RAM) -> AM_RAM_READ(rhandler) | |
| 754 | AM_READ(SMH_RAM) AM_WRITE(whandler) -> AM_RAM_WRITE(whandler) | |
| 755 | AM_DEVREAD(tag, rhandler) AM_WRITE(SMH_RAM) | |
| 756 | -> AM_RAM_DEVREAD(tag, rhandler) | |
| 757 | AM_READ(SMH_RAM) AM_DEVWRITE(tag, whandler) | |
| 758 | -> AM_RAM_DEVWRITE(tag, whandler) | |
| 813 | lethal.c - Verified clocks and vsync from orginal PCB | |
| 814 | [Corrado Tomaselli] | |
| 759 | 815 | |
| 760 | AM_READ(SMH_ROM) -> AM_ROM | |
| 761 | AM_WRITE(SMH_ROM) -> (was a no-op) | |
| 816 | astrocorp.c update: [Luca Elia] | |
| 817 | - Added frame buffer | |
| 818 | - Fixed sprite list end, negative coordinates, wrap around | |
| 819 | - Added battery backed RAM | |
| 762 | 820 | |
| 763 | AM_READ(SMH_NOP) -> AM_READNOP | |
| 764 | AM_WRITE(SMH_NOP) -> AM_WRITENOP | |
| 765 | AM_READWRITE(SMH_NOP, SMH_NOP) -> AM_NOP | |
| 821 | adp.c: hooked up (with a hack) gfx rom in hd63484 memory map [robiza] | |
| 766 | 822 | |
| 767 | For dynamic memory handler installation of the various types, | |
| 768 | use the new functions: | |
| 823 | Hooked up coin input and start input in skattv. [robiza] | |
| 769 | 824 | |
| 770 | memory_unmap_read() | |
| 771 | memory_unmap_write() | |
| 772 | memory_unmap_readwrite() -- unmaps a section of address space | |
| 825 | astrocde.c - Fixed the Bonus Life dipswitch for gorf and clones. | |
| 826 | It's state was inverted. [Tafoid] | |
| 773 | 827 | |
| 774 | memory_nop_read() | |
| 775 | memory_nop_write() | |
| 776 | memory_nop_readwrite() -- nops a section of address space | |
| 828 | [I8255] Clear output lines to 0 on write to mode register, and float | |
| 829 | input lines to 1. [Curt Coder] | |
| 777 | 830 | |
| 778 | - Cleaned up the internals of the address_map_entry structure, and | |
| 779 | also normalized the way the address map macros work to remove a | |
| 780 | lot of redundancy. | |
| 831 | Simplified/combined MAME and MESS code: [Miodrag Milanovic] | |
| 832 | - Moved compatibility validation into MAME core from MESS. | |
| 833 | - Made GAME_NO_SOUND check done on MESS too. | |
| 834 | - Removed MESS dependent checks | |
| 835 | - Renamed GAME_COMPUTER_MODIFIED to GAME_UNOFFICIAL to mark | |
| 836 | unofficial hardware modifications | |
| 837 | - Removed GAME_COMPUTER it is distinct by IPT_KEYBOARD | |
| 838 | - Added GAME_NO_SOUND_HW (to mark that there is no sound hardware) | |
| 839 | and marked drivers in dotrikun.c, minivadr.c and tgtpanic.c as | |
| 840 | such | |
| 841 | - Removed GAME_SHARE_ROMS flag and commented old check for | |
| 842 | duplicate ROM entries | |
| 843 | - Moved natural keyboard support from MESS to MAME | |
| 844 | - Moved OSD file functions and clipboard access functions into OSD | |
| 845 | core | |
| 846 | - Significantly reduced the number of new OSD functions needed by | |
| 847 | MESS [with couriersud] | |
| 781 | 848 | |
| 782 | - Renamed functions: memory_install_read/write_port_handler to | |
| 783 | memory_install_read/write_port | |
| 849 | Fixed Dip Switches and Inputs (after verification of the Z80 code) for | |
| 850 | 'tazzmang'. [stephh] | |
| 784 | 851 | |
| 785 | - Memory shares are now specified by tag instead of index. | |
| 786 | The AM_SHARE() macro now takes a tag parameter. All existing | |
| 787 | shares have been bulk renamed to "share##". However, the name | |
| 788 | does not matter, so please use descriptive tags going forward. | |
| 852 | snes wip: [Fabio Priuli] | |
| 853 | * added a couple of registers to snes_ppu struct | |
| 854 | * moved color blending (background & subscreen color | |
| 855 | addition/subtraction) at the end of the drawing process. | |
| 856 | * removed some unused (and not working anymore) debug code | |
| 857 | * fixed the remaining debug functionalities | |
| 858 | * moved colour struct to be another layer (simplifying some code) | |
| 859 | * updated hires blending to work with two pixel at time. | |
| 860 | * fixed clipmasks with hires modes | |
| 789 | 861 | |
| 790 | - Added tag validation for bank and share tags. | |
| 862 | hng64 : Initial implementation of 0x10-sized palette pages for 3d | |
| 863 | objects. This makes most environment colors correct in sams64. | |
| 864 | [Andrew Gardner] | |
| 791 | 865 | |
| 792 | - Added flag to tagmap_add functions that optionally will | |
| 793 | replace existing objects if a duplicate is found. | |
| 866 | [VIA6522] Read port A/B only if some pins are inputs. [Curt Coder] | |
| 794 | 867 | |
| 795 | - Internal code shuffling. Address maps initialized internally | |
| 796 | now call the same installation handlers that drivers do for | |
| 797 | dynamic installation. Cleaned up some parameter ordering and | |
| 798 | error detection. | |
| 868 | Fixed Dip Switches and Inputs (after verification of the Z80 code) | |
| 869 | for 'dambustr' and clones. [stephh] | |
| 799 | 870 | |
| 800 | - Added new functions: | |
| 871 | Internal debugger using the mame rendering infrastructure [couriersud] | |
| 872 | - added support for arbitrary number of containers for render_target | |
| 873 | - added command-line parameter -debug_internal (-di) to use the | |
| 874 | internal debugger when in debug mode | |
| 875 | - internal debugger supports all views except memory view | |
| 876 | - added "Debug" view to layout/vertical.lay to create more place for | |
| 877 | debug views in vertical games. | |
| 801 | 878 | |
| 802 | memory_install_ram() to assign a un-named bank to a region and | |
| 803 | specify a pointer to where the RAM lives. If this is called in | |
| 804 | the DRIVER_INIT function or MACHINE/SOUND/VIDEO_START | |
| 805 | functions, then it is permissible to specify NULL, in which | |
| 806 | case the memory system will allocate memory and register it | |
| 807 | for save states. | |
| 879 | NOTE: The colors are ugly. Font rendering needs improvement. There | |
| 880 | are no shortcut keys right now. There is still a lot of room for more | |
| 881 | improvements. However, it works and does not depend on any ui | |
| 882 | toolkit. The interface has been designed to support displaying views | |
| 883 | programmatically e.g. from the ui. | |
| 808 | 884 | |
| 809 | memory_install_rom() is like the above except that it only | |
| 810 | installs a read handler. | |
| 885 | Short HowTo: | |
| 886 | - Start MAME with "-debug -di" | |
| 887 | - Console, register and disasm views will be shown. Place them by | |
| 888 | dragging the view on the title bar. | |
| 889 | - Views can be resized by dragging the bottom-right yellow square. | |
| 890 | - The view having the focus has a green background title bar. | |
| 891 | - Hit "Tab" (IPT_UI_CONFIGURE) to show the menu. | |
| 892 | - Console and disasm views support a very simple facility to | |
| 893 | support entering commands and addresses. Just start typing. | |
| 894 | Hit "enter" when finished. | |
| 811 | 895 | |
| 812 | memory_install_writeonly() is like the above except that it | |
| 813 | only installs a write handler. | |
| 896 | irobot.c - Added XTAL values from manual and hooked up to driver for | |
| 897 | main/sound CPU. [Phil Bennett/Tafoid] | |
| 814 | 898 | |
| 815 | - Updated several instances in the code that were assigning banks | |
| 816 | to these sorts of static RAM regions and simplified the code. | |
| 899 | rungun: fix text tilemap lookup for big-endian targets. [R. Belmont] | |
| 817 | 900 | |
| 818 | - Apply mirrors and global masks at address map detokenizing time | |
| 819 | rather than later. | |
| 901 | Added Intel 8021/8022 CPU types. [Curt Coder] | |
| 820 | 902 | |
| 903 | irobot.c - Added/verified Dip Locations per manual and test mode. | |
| 904 | [Tafoid] | |
| 821 | 905 | |
| 906 | Workaround for gcc-4.3 reporting a false warning on solaris: disable | |
| 907 | -Werror for this file only. [couriersud] | |
| 822 | 908 | |
| 909 | Cleaned up SDL OSD functions after merging in code from MESS. | |
| 910 | [couriersud] | |
| 911 | ||
| 912 | wrally.c - Added/verified DIP Locations for World Rally [Guru] | |
| 913 | ||
| 914 | Fixed long-standing (day one?) bug with ADPCM samples in Trojan / | |
| 915 | Tatakai no Banka [Mamesick, Angelo Salese] | |
| 916 | ||
| 917 | Fixed Dip Switches and Inputs (after verification of the Z80 code) for | |
| 918 | 'espial', 'espialu' and 'netwars". [stephh] | |
| 919 | ||
| 920 | Got Mortal Kombat 3 (bootleg of Megadrive version) to boot. Still | |
| 921 | missing some key inputs. [Mariusz Wojcieszek] | |
| 922 | ||
| 923 | ||
| 924 | ||
| 823 | 925 | New games added or promoted from NOT_WORKING status |
| 824 | 926 | --------------------------------------------------- |
| 825 | Top Shooter [Mariusz Wojcieszek] | |
| 826 | LA Girl [Tomasz Slanina, Guru] | |
| 827 | Noraut Joker Poker (Prologic HW) [Roberto Fresca, Alan Griffin] | |
| 927 | Midnight Resistance (bootleg with 68705) [IQ_132] | |
| 928 | Sexy Boom [Mariusz Wojcieszek] | |
| 929 | Treasure Island (Subsino) | |
| 930 | [Team Europe, Dumping Union, Angelo Salese, David Haywood, | |
| 931 | Roberto Fresca] | |
| 932 | Ghost Chaser Densei (SNES bootleg) [Tomasz Slanina, XingXing] | |
| 933 | Skill Drop Georgia | |
| 934 | [Luca Elia, Smitdogg, Brian Troha, The Dumping Union] | |
| 935 | Logic Pro Adventure | |
| 936 | [Guru, D. Beneke, snoopy, pongplaya, W. Belk, hap, S. S. Neilson, | |
| 937 | JacKc, The Dumping Union] | |
| 938 | Pachifever [Tomasz Slanina] | |
| 828 | 939 | |
| 829 | 940 | |
| 830 | 941 | |
| 831 | 942 | New clones added |
| 832 | 943 | ---------------- |
| 833 | Domino Block ver.2 [Guru] | |
| 834 | Tower of Druaga (Manufactured by Sidam) [Corrado Tomaselli] | |
| 835 | Invasion (4 bootleg sets) [f205v, ANY] | |
| 836 | Head On (Sidam bootleg, set 2) [f205v, ANY] | |
| 837 | Head On 2 (Sidam bootleg) [f205v, ANY] | |
| 838 | Arkanoid (bootleg on Block hardware, set 2) [f205v, ANY] | |
| 839 | Gals Panic (Korea, EXPRO-02 PCB) [Guru] | |
| 840 | Strikers 1945 (Hong Kong, Bootleg) | |
| 841 | [David Haywood, Brian Troha, Dumping Union] | |
| 842 | Fighting Fantasy (bootleg with 68705) [f205v] (not working) | |
| 843 | Phantom (Spectar bootleg) [Team Europe & rades] | |
| 844 | Panzar (Spectar bootleg) [f205v] | |
| 845 | Fatsy Gambler (Video Hustler bootleg) [f205v] | |
| 846 | Fitter (bootleg) [f205v] | |
| 847 | Vs. Super Mario Bros. (bootleg with Z80) (2 sets) [f205v, Dante Profeta] (not working) | |
| 944 | INDY 500 Twin (Revision A, Newer) [Brian Troha, Dumping Union] | |
| 945 | Fantastic Journey (ver AAA) [Tirino73] | |
| 946 | Name That Tune (3-23-86) [Kevin Eshbach] | |
| 947 | E.D.F. : Earth Defense Force (bootleg) | |
| 948 | [Team Europe, Rene Single, Dumping Union] - not working | |
| 949 | Out Zone (set 5) [Corrado Tomaselli] | |
| 950 | Ghosts'n Goblins (World? set 3) [Corrado Tomaselli] | |
| 951 | Bagman (bootleg on Crazy Kong hardware) | |
| 952 | [Team Europe & Volker Hahn] - not working | |
| 953 | Magical Tonic / Magical Odds? [David Haywood] - not working | |
| 954 | Spiders (set 3) [Team Europe] | |
| 955 | Raiden (US, SEI8904 + SEI9008 PCBs) | |
| 956 | [tormod, Smitdogg, The Dumping Union, David Haywood] | |
| 957 | Asterix (ver AAD) [Luis "Datasat"] | |
| 958 | Pang! 3 (Euro 950601) | |
| 959 | [Gerald (COY), B. Sparks, Smitdogg, The Dumping Union] | |
| 848 | 960 | |
| 849 | 961 | |
| 850 | 962 | |
| 851 | 963 | New games marked as GAME_NOT_WORKING |
| 852 | 964 | ------------------------------------ |
| 853 | White Tiger - 3VXFC5342 (New Zealand) [Heihachi_73] | |
| 854 | Magic Mask (A - 09/05/2000, Export) [Heihachi_73] | |
| 855 | Geisha (A - 05/03/01, New Zealand) [Heihachi_73] | |
| 856 | Kimble Double HI-LO (z80 version) [Roberto Fresca, Alan Griffin] | |
| 857 | Fast Draw (poker conversion kit)? [Roberto Fresca] | |
| 858 | Draw Poker HI-LO (unknown, rev 1) [Roberto Fresca, Dumping Union] | |
| 859 | Draw Poker HI-LO (unknown, rev 2) [Roberto Fresca, Dumping Union] | |
| 860 | Video Stars [Andrew Welburn] | |
| 861 | ||
| 862 | ||
| 863 | ||
| 864 | 0.135u2 | |
| 965 | Mr. Kicker [krick, MrGoodwraith, Smitdogg, The Dumping Union] | |
| 966 | Crackin' DJ [Guru, R. Belmont] | |
| 967 | Joker's Wild (B52 system, set 1) | |
| 968 | [Roberto Fresca, Tomasz Slanina, Gerald Vanderick] | |
| 969 | Joker's Wild (B52 system, set 2) [Roberto Fresca, Tomasz Slanina] | |
| 970 | Joker's Wild (B52 system, Harrah's GFX) | |
| 971 | [Roberto Fresca, Tomasz Slanina, Gerald Vanderick] | |
| 972 | ||
| 973 | ||
| 974 | ||
| 975 | 0.136u2 | |
| 865 | 976 | ------- |
| 866 | 977 | |
| 867 | 978 | |
| 868 | 979 | MAMETesters Bugs Fixed |
| 869 | 980 | ---------------------- |
| 870 | - 03553: [Crash/Freeze] extdwnhl: Game does not start (Phil Bennett) | |
| 871 | - 03544: [DIP/Input] mgdh, sdmg2: The joystick function missed in | |
| 872 | mgdh and sdmg2 (Luca Elia) | |
| 873 | - 03547: [Graphics] mgdh,sdmg2: Donden graphics in mgdh and sdmg2 are | |
| 874 | inaccurate (Luca Elia) | |
| 875 | - 03546: [Documentation] nkishusp: Black screen after the game start. | |
| 876 | (Luca Elia) | |
| 877 | - 03540: [Sound] glpracr3, hvnsgate, raystorm: Missing sound. | |
| 878 | (Phil Bennett) | |
| 879 | - 03545: [Graphics] tekken3, tektagt: Tekken games do not proceed | |
| 880 | into attract mode after initial screen (Phil Bennett) | |
| 881 | - 03542: [Sound] Sets/Drivers using YM2610: Missing sounds | |
| 882 | (Phil Bennett) | |
| 981 | - 03667: [Interface] All default/per-game .cfg files are not saved | |
| 982 | correctly (Aaron Giles) | |
| 983 | - 03671: [Sound] fcrash: Bad sound ingame (Mamesick) | |
| 984 | - 03663: [Graphics] tgm2, tgm2p: The warning boot screen has a black | |
| 985 | background which should be blue. | |
| 883 | 986 | |
| 884 | 987 | |
| 885 | 988 | |
| 886 | 989 | Source Changes |
| 887 | 990 | -------------- |
| 888 | Added driver data structs to: [Fabio Priuli] | |
| 889 | - beaminv.c | |
| 890 | - cball.c and capbowl.c | |
| 891 | - changela.c, circus.c and circusc.c | |
| 892 | - crgolf.c and clayshoo.c | |
| 893 | - decocass.c | |
| 894 | - docastle.c, dotrikun.c, cloud9.c and destroyr.c | |
| 895 | - cheekyms.c | |
| 896 | - embargo.c | |
| 897 | - ddragon.c, ddragon3.c and fgoal.c | |
| 898 | - bwing.c | |
| 899 | - dday.c | |
| 900 | - dcheese.c | |
| 901 | - flyball.c | |
| 902 | - freekick.c | |
| 991 | Replaced vsnetscr GFX ROMs with correct dumps | |
| 992 | [Team Japump, Dumping Union] | |
| 903 | 993 | |
| 904 | Added driver data and save state support to: [Fabio Priuli] | |
| 905 | - blmbycar.c | |
| 906 | - zerozone.c, yunsun16.c, dominob.c, dogfgt.c and bogeyman.c | |
| 907 | - blockout.c and bigevglf.c | |
| 908 | - chaknpop.c | |
| 909 | - albazg.c | |
| 910 | - chinagat.c, esd16.c, f-32.c, fcombat.c, finalizr.c | |
| 911 | - fantland.c and firetrap.c | |
| 912 | - btime.c and scregg.c | |
| 913 | - fitfight.c, flstory.c and funkybee.c | |
| 914 | - fuukifg2.c and fuukifg3.c | |
| 994 | Fixed memory allocation issue in debug builds. [Aaron Giles] | |
| 915 | 995 | |
| 916 | Added save state support to: [Fabio Priuli] | |
| 917 | - 2mindril.c, ashnojoe.c, bigfghtr.c, bublbobl.c, cchance.c, | |
| 918 | champbwl.c, missb2.c | |
| 919 | - compgolf.c, champbas.c, copsnrob.c, cop01.c, cosmic.c, cntsteer.c, | |
| 920 | dacholer.c and dec8.c | |
| 921 | - armedf.c, calorie.c, canyon.c, chanbara.c, citycon.c, commando.c, | |
| 922 | crospang.c & cultures.c | |
| 923 | - astrocorp.c | |
| 924 | - ddayjlc.c, ddealer.c, deniam.c, discoboy.c, diverboy.c, dorachan.c, | |
| 925 | dragrace.c, dreamwld.c, dribling.c, drmicro.c, drtomy.c | |
| 926 | - dynadice.c, dwarfd.c, dunhuang.c, enigma2.c, epos.c, drgnmst.c | |
| 927 | and egghunt.c | |
| 928 | - equites.c, exedexes.c, exerion.c and exprraid.c | |
| 929 | - funybubl.c, galaxi.c, gaiden.c and rocnrope.c | |
| 996 | Added makefile autotest for BIGENDIAN. A bit hacked, though. | |
| 997 | [couriersud] | |
| 930 | 998 | |
| 931 | Removed some rogue occurrences of 'x1snd' resulting from device tag | |
| 932 | mass-change. [Phil Bennett] | |
| 999 | Redumped sound roms in Cyber Tank | |
| 1000 | [Antonio Gonzalez Jr., Dumping Union] | |
| 933 | 1001 | |
| 934 | drw80pkr.c updates: [Jim Stolis] | |
| 935 | - Added Save State Support | |
| 936 | - Added Preliminary Dip Switch Settings | |
| 937 | - Corrected CPU Clock Value | |
| 938 | - Corrected Sound (Now Works) | |
| 939 | - Narrowed Down More IO R/W Areas | |
| 1002 | psikyosh improvements: [PsikyoFan] | |
| 1003 | * Add support for per-scanline scroll/zoom and per-column effects. | |
| 1004 | This is adds a significant performance penalty when enabled. | |
| 1005 | Removed warning flag from s1945ii and s1945iii. s1945iii needs | |
| 1006 | confirmation of correctness and x-zoom is a guess. | |
| 1007 | * Virtually completed video rendering. Only flipscreen missing (and | |
| 1008 | conversion to tilemaps one day). Per-line effects now respect | |
| 1009 | per-line alpha, priority and bank. As a result daraku text works | |
| 1010 | without any hacks. | |
| 1011 | * Added various optimisations to get back all games to a playable | |
| 1012 | speed. | |
| 1013 | * Fixed missing soldivid effect on final boss that was broken due to | |
| 1014 | above daraku hack. | |
| 1015 | * Added accurate scaling effects based on measurements from hardware. | |
| 940 | 1016 | |
| 941 | tms7000: Fixed disassembly of PCREL addressing mode. [Wilbert Pol] | |
| 1017 | cybertnk improvements: [Angelo Salese] | |
| 1018 | * Fixed sprite height | |
| 1019 | * Implemented flip x and negative y offsets | |
| 1020 | * Implemented preliminary zooming | |
| 942 | 1021 | |
| 943 | Added device support to the input system. Internally this replaces | |
| 944 | PORT_CUSTOM/PORT_CHANGED, backward compatibility is achieved with an | |
| 945 | internal dummy device. Added output lines (IPT_OUTPUT), which can be | |
| 946 | written using new input_port_write* functions or directly from a | |
| 947 | memory map using AM_WRITE_PORT converted adc083x to use io lines. | |
| 948 | [smf] | |
| 1022 | sdl.mak rewrite [couriersud] | |
| 1023 | - TARGETOS=freebsd may now be given on make invocation | |
| 1024 | - modular approach, separate sections for opengl, x11, debugger | |
| 1025 | - most target specific settings parametrized. | |
| 1026 | - Added GTL_INSTLL_ROOT to optionally build win32 with the mame | |
| 1027 | debugger. | |
| 1028 | - On targets supporting "-m64" and "-m32" use them. | |
| 1029 | - On unix ppc targets, add -Dpowerpc automatically | |
| 949 | 1030 | |
| 950 | ADC devices updates: [smf] | |
| 951 | - adc08x chips are all hooked up using input/output ports | |
| 952 | - reversed racing force steering wheel input and gas pedal, which | |
| 953 | is enough to get the game to boot. | |
| 954 | - reversed steering wheel input on winding heat, the usa cabinets | |
| 955 | are however hooked up the other way. | |
| 956 | - renamed adc0831_interface to adc083x_interface. | |
| 957 | - fixed adc083x gnd input | |
| 958 | - removed stray call logerror from adc083x.c | |
| 959 | - fixed default adc083x sars value | |
| 960 | - adc083x reset only affects outputs | |
| 1031 | Improved stack walking on crash in Windows. Now using StackWalk64 to | |
| 1032 | do the stack walk, resulting in cleaner logs. Also will try to use | |
| 1033 | system function to look up symbol and source/line information if | |
| 1034 | present. [Aaron Giles] | |
| 961 | 1035 | |
| 962 | Added set name to -romident. [smf] | |
| 1036 | Improvements to subsino.c [Roberto Fresca] | |
| 1037 | (general): | |
| 1038 | - Lowered CPU clock to 1.5 MHz. | |
| 1039 | - Reworked former inputs. | |
| 1040 | - Added specific game and technical notes. | |
| 1041 | - Added lamps support. | |
| 1042 | - Cleaned-up a bit the driver. | |
| 963 | 1043 | |
| 964 | Updated ddr 3rd mix plus protection to remove display corruption. | |
| 965 | [smf] | |
| 1044 | Victor 5: | |
| 1045 | - Mapped the M6295 but commented out due to missing sample roms. | |
| 1046 | - Added keyin, keyout, payout, stats and settings inputs. | |
| 1047 | - Added coin/keyin/keyout counters. | |
| 1048 | - Limited the bet and coin pulses to avoid repeats and coin jams. | |
| 1049 | - Added complete coinage and keyin DIP switches. | |
| 1050 | - Added main game and double-up rates DIP switches. | |
| 1051 | - Added minimum bet DIP switches. | |
| 1052 | - Added maximum bet DIP switches. | |
| 1053 | - Added attract music DIP switch. | |
| 1054 | - Added button-lamps layout. | |
| 966 | 1055 | |
| 967 | RDP Updates: Fixed TMEM size, removed separate tlut, fixed tlut | |
| 968 | uploads [angrylion] | |
| 1056 | Victor 21: | |
| 1057 | - Mapped the M6295 but commented out due to missing sample roms. | |
| 1058 | - Added bet x10, keyin, keyout, stats and settings inputs. | |
| 1059 | - Added coin/keyin/keyout/payout counters. | |
| 1060 | - Limited the bet and coin pulses to avoid repeats and coin jams. | |
| 1061 | - Added complete coinage and keyin DIP switches. | |
| 1062 | - Added main game rate DIP switches. | |
| 1063 | - Added minimum bet DIP switches. | |
| 1064 | - Added attract music DIP switch. | |
| 1065 | - Added button-lamps layout. | |
| 969 | 1066 | |
| 970 | hng64 updates: | |
| 971 | - Added preliminary hook-up for multi-byte chain mode for sprites, | |
| 972 | used by Buriki One and the two Samurai Shodown games | |
| 973 | [David Haywood, Angelo Salese] | |
| 974 | - Fixed back plane color, thus giving characteristic blue background | |
| 975 | for POST screen [Angelo Salese] | |
| 976 | - Improved Dual Port emulation, fixing the POST errors about it | |
| 977 | [Angelo Salese] | |
| 978 | - Implemented "simple" scroll register layout [David Haywood] | |
| 979 | - Implemented "complex" scroll register layout [David Haywood] | |
| 980 | - Corrected sprite end boundary, fixes credit messages in Buriki One | |
| 981 | [Angelo Salese] | |
| 982 | - Fixed scrolling text in Buriki One attract mode [Angelo Salese] | |
| 983 | - Hooked up global bpp switch for sprites, HW doesn't seem capable | |
| 984 | of doing per-sprite bpp switch, fixes coin credit text in Buriki | |
| 985 | One [Angelo Salese] | |
| 986 | - Implemented V-Blank register, fixes palette uploading in Samurai | |
| 987 | Shodown 1 & 2 [Angelo Salese] | |
| 988 | - Fixed sprite wrap-around [David Haywood] | |
| 989 | - Implemented irq 11, used by the racing games for network check, | |
| 990 | currently crashes due to an invalid parameter inside the 3d | |
| 991 | packets [Angelo Salese] | |
| 992 | - Added 16x16 / 8x8 tilemap mode select, fixes one scene in Extreme | |
| 993 | Rally and transition layer in Fatal Fury WA (squares on title | |
| 994 | screen) [David Haywood] | |
| 995 | - Added alt layout for the roz, fixes Roads Edge graphics before the | |
| 996 | title screen [David Haywood] | |
| 997 | - Implemented sprite clearance capability, fixes garbage gfxs as | |
| 998 | seen in Samurai Shodown 64 1 & 2 [Angelo Salese] | |
| 999 | - Implemented x/y sprite global offsets, used by Samurai Shodown 64 | |
| 1000 | 1 ranking screen [David Haywood] | |
| 1001 | - Hooked-up backup ram [Angelo Salese] | |
| 1002 | - Documented some sprite findings [Angelo Salese] | |
| 1003 | - Re-implemented zooming in Fatal Fury WA, and added alternative | |
| 1004 | zooming mode used by the other games, they have some precision | |
| 1005 | bugs though [Angelo Salese] | |
| 1006 | - Implemented preliminary additive blending [David Haywood] | |
| 1007 | - Slight optimization to the tile dirty marking [David Haywood] | |
| 1008 | - Better documentation of mosaic and floor modes [David Haywood] | |
| 1009 | - Implemented sprite disable bit [David Haywood] | |
| 1010 | - Implemented dynamic visible area [Angelo Salese] | |
| 1011 | - Start to document 3d / framebuffer video registers, implemented a | |
| 1012 | quick hook-up that fixes Buriki One 3d model colors minus one | |
| 1013 | case [Angelo Salese] | |
| 1014 | - Implemented screen disable when the visible area regs are equal to | |
| 1015 | zero and fixed back layer [Angelo Salese] | |
| 1067 | Poker Carnival (crsbingo): | |
| 1068 | - Added change card, keyin, keyout, stats and settings inputs. | |
| 1069 | - Added coin/keyin/keyout/payout counters. | |
| 1070 | - Limited the bet and coin pulses to avoid repeats and coin jams. | |
| 1071 | - Added complete coinage and keyin DIP switches. | |
| 1072 | - Added double-up rate DIP switches. | |
| 1073 | - Added minimum bet DIP switches. | |
| 1074 | - Added maximum bet DIP switches. | |
| 1075 | - Added cards graphics DIP switches. | |
| 1076 | - Added double-up type DIP switches. | |
| 1077 | - Added button-lamps layout. | |
| 1016 | 1078 | |
| 1017 | Updated the albazg driver to use hanafuda standard inputs, eeprom | |
| 1018 | device, and memory_set_bank in place of memory_set_bankptr. | |
| 1019 | [Fabio Priuli] | |
| 1079 | Super Rider, Super Moto: | |
| 1080 | - Added stats and settings inputs. | |
| 1081 | - Added coin counters. | |
| 1082 | - Added main game and double-up rates DIP switches. | |
| 1083 | - Added double-up and control type DIP switches. | |
| 1084 | - Added coinage and demo sounds DIP switches. | |
| 1085 | - Added button-lamps layout. | |
| 1020 | 1086 | |
| 1021 | System 23 update [Naibo Zhang] | |
| 1022 | - Corrected memory mapping of palette RAM and handling of palette | |
| 1023 | data. Power-On Self Test now shows correct colors. | |
| 1024 | - Changed Panic Park from SS23 to S23 game. | |
| 1087 | Shark Party: | |
| 1088 | - Added stats and settings inputs. | |
| 1089 | - Added coin counters. | |
| 1090 | - Added main game and double-up rates DIP switches. | |
| 1091 | - Added double-up, coinage and demo sounds DIP switches. | |
| 1092 | - Added button-lamps layout. | |
| 1025 | 1093 | |
| 1026 | Galaxian3 update [Naibo Zhang] | |
| 1027 | - Fleshed out skeleton driver. Each CPU board passes many self-tests | |
| 1028 | - Master and slave CPU comms hooked up | |
| 1094 | Created new template class tagged_list which manages a simple list | |
| 1095 | along with a tagmap. Changed memory regions, input ports, and devices | |
| 1096 | to use this class. For devices, converted typenext and classnext | |
| 1097 | fields into methods which dynamically search for the next item. | |
| 1098 | Changed a number of macros to use the features of the class, removing | |
| 1099 | the need for a bunch of helper functions. [Aaron Giles] | |
| 1029 | 1100 | |
| 1030 | Designated Puzzle Bang Bang (vamphalf.c) as Korean version. For this | |
| 1031 | set the title and language cannot be change. [Brian Troha] | |
| 1101 | Replaced device_find_child_by_tag() -> device->subdevice(). | |
| 1032 | 1102 | |
| 1033 | Added new module tagmap which is a simple hashed string map. Updated | |
| 1034 | device and input port lists to use the tagmap for tag searches. Also | |
| 1035 | removed the whole "quark" thing from the validity checker in favor of | |
| 1036 | using the tagmaps. [Aaron Giles] | |
| 1103 | Added Am29000 CPU core [Phil Bennett] | |
| 1037 | 1104 | |
| 1038 | Added Intel 8008 and National Semiconductor SC/MP CPU cores. | |
| 1039 | [Miodrag Milanovic] | |
| 1105 | Removed stdlib.h from osdcomm.h. [couriersud] | |
| 1106 | - Added #include stdlib.h where now necessary | |
| 1107 | - Fixed Solaris build | |
| 1108 | - Fixed building unidasm for OSD=sdl on win32 | |
| 1040 | 1109 | |
| 1041 | INS 8060 SC/MP II support (using clock divider 2), main model renamed | |
| 1042 | to INS 8050 SC/MP. [Miodrag Milanovic] | |
| 1110 | Tools now include stdlib.h where needed. [couriersud] | |
| 1043 | 1111 | |
| 1044 | Updated the astrocorp.c and groundfx.c drivers to use EEPROM device. | |
| 1045 | [Fabio Priuli] | |
| 1112 | Changed core library files to use osd_malloc/osd_free where | |
| 1113 | appropriate. [couriersud] | |
| 1046 | 1114 | |
| 1047 | Added support for SCSI command 0x2a (Write w/ 32-bit LBA), upped | |
| 1048 | input buffer size in WD33C93 controller [Harmony] | |
| 1115 | Added checkautodetect target to makefile. [couriersud] | |
| 1049 | 1116 | |
| 1050 | Hooked up eepromdev.c using PORT_READ_LINE_DEVICE/ | |
| 1051 | PORT_WRITE_LINE_DEVICE in groundfx.c. Output ports are now affected | |
| 1052 | by IP_ACTIVE_HIGH/IP_ACTIVE_LOW (eepromdev.c has active low cs). | |
| 1053 | The previous value for callbacks in inptport.c is now tracked per | |
| 1054 | field. This saves recalculating it for PORT_CHANGED & conditional | |
| 1055 | fields wouldn't always get updated correctly. Tidied up eepromdev.c | |
| 1056 | interface. [smf] | |
| 1117 | Permit zlib and expat to be linked dynamically without changing the | |
| 1118 | makefile by specifying "=0": make BUILD_ZLIB=0 BUILD_EXPAT=0 | |
| 1119 | [couriersud] | |
| 1057 | 1120 | |
| 1058 | Added sprites list stop to igs017.c. Implemented joystick mode in | |
| 1059 | mgdh and sdmg2 [Luca Elia] | |
| 1121 | Improved vsnet sprite/roz alignment [David Haywood] | |
| 1060 | 1122 | |
| 1061 | Fixed audio output lengths in aviio.c. [CDiFan] | |
| 1123 | Converted the following drivers to use a driver_data structure: | |
| 1124 | [Atari Ace] | |
| 1125 | - bigstrkb, mugsmash, pass, sbugger, sderby, shadfrce, shootout, | |
| 1126 | silkroad, spbactn, sslam, stlforce, taitojc, tunhunt, | |
| 1127 | welltris, wwfsstar, xyonix | |
| 1128 | - 39in1, safarir, sbowling, shougi, skeetsht, skyarmy, sliver, | |
| 1129 | spoker, spool99, srmp5, srmp6, ssingles, sstrangr, sub, supdrapo, | |
| 1130 | superdq, supertnk, suprgolf | |
| 1062 | 1131 | |
| 1063 | Added memory_install_write_port_handler & | |
| 1064 | memory_install_readwrite_port_handler to be consistent with | |
| 1065 | installing handlers. [smf] | |
| 1132 | hng64 : Implemented low-res texture decoding. All red/green polygons | |
| 1133 | should now be textured. [Andrew Gardner] | |
| 1066 | 1134 | |
| 1067 | CDP1869 changes: [Curt Coder] | |
| 1068 | - converted page RAM functions to use devcb | |
| 1069 | - added pull interface for predisplay | |
| 1135 | Correct a long-standing design flaw: device configuration state is | |
| 1136 | now separate from runtime device state: [Aaron Giles] | |
| 1070 | 1137 | |
| 1071 | Switched from linear interpolation to antialiased point sampling | |
| 1072 | when upconverting low-frequency sound streams. This should de-muffle | |
| 1073 | low-frequency streams, treating them has having hard edges at sample | |
| 1074 | boundaries. [Aaron Giles] | |
| 1138 | * There is a new class 'running_device' which represents the | |
| 1139 | state of a live device. A list of these running_devices sits | |
| 1140 | in machine->devicelist and is created when a running_machine | |
| 1141 | is instantiated. | |
| 1075 | 1142 | |
| 1076 | Converted the following drivers to use EEPROM device: deco156.c, | |
| 1077 | eolith.c, eolith16.c, limenko.c, taito_f3.c, taito_z.c, taito_b.c, | |
| 1078 | taitojc.c, toaplan2.c and kaneko16.c. [Fabio Priuli] | |
| 1143 | * To access the configuration state, use device->baseconfig() | |
| 1144 | which returns a reference to the configuration. | |
| 1079 | 1145 | |
| 1080 | Implemented use of per tile colour lookup ROM in Portraits, colour | |
| 1081 | decode is still wrong [David Haywood] | |
| 1146 | * The list of running_devices in machine->devicelist has a 1:1 | |
| 1147 | correspondance with the list of device configurations in | |
| 1148 | machine->config->devicelist, and most navigation options work | |
| 1149 | equally on either (scanning by class, type, etc.) | |
| 1082 | 1150 | |
| 1083 | CF clear after binary operations on Intel 8008 CPU core. | |
| 1084 | [Miodrag Milanovic] | |
| 1151 | * For the most part, drivers will now deal with running_device | |
| 1152 | objects instead of const device_config objects. In fact, in | |
| 1153 | order to do this patch, I did the following global search & | |
| 1154 | replace: | |
| 1085 | 1155 | |
| 1086 | Improvements to Noraut Poker driver: [Roberto Fresca] | |
| 1087 | * A lot of work in memory maps and machine driver stuff. | |
| 1088 | * Improved Inputs / DIP switches for some games. | |
| 1089 | * Added lamps support / layouts to new working games. | |
| 1090 | * Added preliminary support to Kimble hardware. | |
| 1091 | * Added support to CGI's Credit Poker 30x games. | |
| 1092 | * Added new (and fixed old) technical notes. | |
| 1093 | * Renamed norautpn descripion to Noraut Deluxe Poker (bootleg). | |
| 1094 | * Added a placeholder for tpoker2's undumped 68705 MCU. | |
| 1095 | * Reorganized the driver, plus some clean-ups. | |
| 1096 | * Renamed kimblejp to kimbldhl. Changed game description to Kimble | |
| 1097 | Double Hi-Lo. | |
| 1098 | * Added specific memory map & machine driver to Kimble Double Hi-Lo. | |
| 1099 | * Fix the Kimble Double Hi-Lo CPU type. | |
| 1100 | * Added notes about the code obfuscation and PPI's handling/offsets. | |
| 1156 | const device_config -> running_device | |
| 1157 | device->static_config -> device->baseconfig().static_config | |
| 1158 | device->inline_config -> device->baseconfig().inline_config | |
| 1101 | 1159 | |
| 1102 | Added Magic Card Jackpot and Magic Lotto Export to Impera Magic Card | |
| 1103 | driver. Also added PCB layouts, hardware description and technical | |
| 1104 | notes. Changed the bipolar prom dumps to serial I2C bus EEPROM. | |
| 1105 | [Roberto Fresca] | |
| 1160 | and then fixed up the compiler errors that fell out. | |
| 1106 | 1161 | |
| 1107 | Made DEVCB_INPUT_PORT(tag) work for write callbacks. [smf] | |
| 1162 | * Removed device_get_info_* functions and replaced them with | |
| 1163 | methods called get_config_*. | |
| 1164 | ||
| 1165 | * Added methods for get_runtime_* to access runtime state from | |
| 1166 | the running_device. | |
| 1167 | ||
| 1168 | * DEVICE_GET_INFO callbacks are only passed a device_config *. | |
| 1169 | This means they have no access to the token or runtime state | |
| 1170 | at all. For most cases this is fine. | |
| 1171 | ||
| 1172 | * Added new DEVICE_GET_RUNTIME_INFO callback that is passed | |
| 1173 | the running_device for accessing data that is live at runtime. | |
| 1174 | In the future this will go away to make room for a cleaner | |
| 1175 | mechanism. | |
| 1176 | ||
| 1177 | * Cleaned up the handoff of memory regions from the memory | |
| 1178 | subsystem to the devices. | |
| 1108 | 1179 | |
| 1109 | Fixed regression in magicard.c driver [Angelo Salese] | |
| 1180 | Fix bug introduced with astring changes that caused malformed tokens | |
| 1181 | when writing out cfg files. [Aaron Giles] | |
| 1110 | 1182 | |
| 1111 | Introduced a generic_pointers structure within machine that is | |
| 1112 | designed to hold generic pointers that are commonly used. Moved | |
| 1113 | generic_nvram, videoram, colorram, spriteram*, paletteram* pointers | |
| 1114 | there. Added AM_BASE_GENERIC and AM_SIZE_GENERIC macros for | |
| 1115 | initializing generic pointers in memory maps. Also added | |
| 1116 | AM_BASE_SIZE_GENERIC to set both base and size in one step. | |
| 1117 | [Aaron Giles] | |
| 1183 | Fix bug where memory regions were not properly enumerated for the | |
| 1184 | debugger memory view. Also, stop creating empty regions for disk | |
| 1185 | regions. [Aaron Giles] | |
| 1118 | 1186 | |
| 1119 | Moved global variables out of machine/generic and into a private data | |
| 1120 | structure hanging off of the running_machine. Added newly-needed | |
| 1121 | machine parameters to coin_counter_w, coin_lockout_w, and | |
| 1122 | coin_lockout_global_w. Also added machine parameter to | |
| 1123 | set_led_state. [Aaron Giles] | |
| 1187 | Added Guru(TM)-readme to trackfld. [Curt Coder] | |
| 1124 | 1188 | |
| 1125 | Added interface functions to get the number of dispensed tickets and | |
| 1126 | to increment the count, to remove the need for direct access to these | |
| 1127 | global variables. Also added functions to get the current count on a | |
| 1128 | particular coin counter and to determine the lockout state. | |
| 1129 | [Aaron Giles] | |
| 1189 | Refactored the CIA 6526 interface, adding SP/CNT callbacks. Fixed | |
| 1190 | serial transfer. [Curt Coder] | |
| 1130 | 1191 | |
| 1131 | Intel 8255A: clear input latch after reading it. [Curt Coder] | |
| 1192 | Convrted the rest of devintrf to classes and moved management | |
| 1193 | functions into methods of those classes. The most wide-ranging | |
| 1194 | change was converting device_reset() to device->reset(). Apart | |
| 1195 | from that it was mostly internal shuffling in the core. [Aaron Giles] | |
| 1132 | 1196 | |
| 1133 | A | |
| 1197 | Added | |
| 1134 | 1198 | |
| 1135 | Purged remaining globals from video/generic.c and audio/generic.c. | |
| 1199 | Autodetection of PTR64 can be inhibited now by specifying PTR64=0. | |
| 1200 | On mixed 32bit/64bit targets identifying themselves as 64bit this can | |
| 1201 | be used to build a 32bit executable. [couriersud] | |
| 1202 | ||
| 1203 | Added OpenBSD support in makefile/sdl.mak. Fixed XBSD detection of | |
| 1204 | PTR64 (uses amd64). [couriersud] | |
| 1205 | ||
| 1206 | Fix bug that mistook a non-NULL token to mean that a device was | |
| 1207 | started. Fixes -video ddraw issue. [Aaron Giles] | |
| 1208 | ||
| 1209 | Replaced vsnes bank installs with RAM installs, since the banks were | |
| 1210 | never changed. [Aaron Giles] | |
| 1211 | ||
| 1212 | Exit from the unhandled exception filter cleanly now. Use | |
| 1213 | SetErrorMode() to disable the appearance of dialog boxes when crashes | |
| 1214 | occur. [Aaron Giles] | |
| 1215 | ||
| 1216 | Fixed a typo in pgm.c that was causing a memory test error and | |
| 1217 | corrected some comments [XingXing] | |
| 1218 | ||
| 1219 | Made direct accessors for device configuration state. Currently they | |
| 1220 | just call through to the get info function. Removed old macros that | |
| 1221 | wrapped calls. [Aaron Giles] | |
| 1222 | ||
| 1223 | Removed some aliases between CPUINFO_ and DEVINFO_ to help clarify | |
| 1224 | usage. Also converted a few more places to use the new accessors. | |
| 1136 | 1225 | [Aaron Giles] |
| 1137 | 1226 | |
| 1138 | Fixed i386 REP prefix to use segment:SI when address size is 16-bit | |
| 1139 | (ie: when using OUTSB or OUTSW). [Barry Rodewald] | |
| 1227 | Replaced drgninja set with one dumped from a genuine Data East PCB | |
| 1228 | [dlfrsilver] | |
| 1140 | 1229 | |
| 1141 | Removed limited use of spriteram_3 global. [Atari Ace] | |
| 1230 | Added MEC-M1 PCB layout to the dec0 driver and updated some clocks | |
| 1231 | and ROM names [Guru] | |
| 1142 | 1232 | |
| 1143 | Added AM_BASE_SIZE_MEMBER() macro for specifying both base and size | |
| 1144 | structure members at once. Updated all cases where this could be | |
| 1145 | used. [Aaron Giles] | |
| 1233 | hng64 : Partially decodes translation-only geometry type 0102. This | |
| 1234 | makes the road appear in the racing games, the edge of the ring in | |
| 1235 | buriki, and a hallway during the buriki attract. [Andrew Gardner] | |
| 1146 | 1236 | |
| 1147 | Cleaned up many driver data structs: [Fabio Priuli] | |
| 1148 | * dropped almost completely the use of generic sizes with struct | |
| 1149 | members | |
| 1150 | * reduced as much as possible accesses to cputag calls during | |
| 1151 | emulation (they are now mainly concentrated at MACHINE_START & | |
| 1152 | DRIVER_INIT) | |
| 1237 | The return of the "misc" [couriersud] | |
| 1238 | - Added sdlmisc_<targetos>.c again. This was necessary since | |
| 1239 | certain tools create stubs for e.g. osd_break_into_debugger. | |
| 1240 | If we do not have this in a separate file, the link stage may | |
| 1241 | break. | |
| 1242 | - Applied OS/2 patch [Credit: KO Myung-Hun] | |
| 1243 | - Cleaned up #includes. Removed stdlib.h were possible. | |
| 1244 | - More malloc to osd_malloc rename. | |
| 1245 | - SDL monitor modes are read now when they are needed. This is now | |
| 1246 | consistent across platforms. | |
| 1153 | 1247 | |
| 1154 | Joker's Wild: bypassed the rng test [Angelo Salese] | |
| 1248 | GTK Debugger work [couriersud] | |
| 1249 | - glade-2 can now be used again to edit the debug.glade file. | |
| 1250 | - No more need to edit the files created by glade-2 | |
| 1251 | - All "activate" handlers now pass the parent window pointer. | |
| 1252 | - malloc ==> osd_malloc to prevent mixed c++/c window allocations. | |
| 1253 | - Run to cursor (main view) | |
| 1254 | - In place memory editing (memory view) | |
| 1255 | - implement key handling (Up, down, ..) like in windows | |
| 1256 | - Tab and ESC not yet handled | |
| 1257 | - Functionality now matches win32 debugger | |
| 1258 | - Further code review/rewrite/simplification | |
| 1259 | - Added more comment headings | |
| 1260 | - fix a compile warning for gcc-4.4 (not detected by gcc-4.2) | |
| 1261 | - Horizontal divider bar to individually size views. | |
| 1262 | - minimum height aligned to win32 debugger | |
| 1155 | 1263 | |
| 1156 | Joker's Wild: implemented bare minimum to allow it to go into gameplay | |
| 1157 | and fixed tilemap graphics [Angelo Salese] | |
| 1264 | ARM: preliminary SA-1110 support [R. Belmont] | |
| 1158 | 1265 | |
| 1159 | Memory regions now use a tagmap for lookups. [Aaron Giles] | |
| 1266 | Verified all deco32 clocks and corrected HuC6280 clock following old | |
| 1267 | Charles McDonald notes I had about internal divisor. Added a note on | |
| 1268 | the Arm cpu used by this game: it's a Data East 101 custom | |
| 1269 | [Corrado Tomaselli] | |
| 1160 | 1270 | |
| 1271 | Changed the following games to use the 76489A variant (verified on my | |
| 1272 | pcbs): Green Beret, Do Run Run, Mr.Do's Castle, Jail Break, | |
| 1273 | Shaolin's Road, Yie Ar Kung-Fu [Corrado Tomaselli] | |
| 1161 | 1274 | |
| 1275 | Fixed sn76489a periodic noise once again (and simplified a bit of | |
| 1276 | code), now should be closer to or match real chips as sampled. Added | |
| 1277 | true clock divider emulation, so emulation may be a bit slower. | |
| 1278 | [Lord Nightmare, PlgDavid, Kold666] | |
| 1162 | 1279 | |
| 1280 | Popmessages can now be used in drivers which have an MC6845. | |
| 1281 | [Curt Coder] | |
| 1282 | ||
| 1283 | Ensure that RAM and bitmaps are cleared when the ms32 driver is | |
| 1284 | started to avoid 64-bit build crashes [David Haywood] | |
| 1285 | ||
| 1286 | Converted HD63484 ACRTC to be device. [Fabio Priuli] | |
| 1287 | ||
| 1288 | hng64 : Hacks the camera to work in sams64. [Andrew Gardner] | |
| 1289 | ||
| 1290 | Fixed crash issues with mchampdx [Fabio Priuli] | |
| 1291 | ||
| 1292 | s14001a: updated comments; got rid of the squealing noise (hidden | |
| 1293 | behind a #define now, code is still there) until some other issues | |
| 1294 | can be resolved. [Lord Nightmare] | |
| 1295 | ||
| 1296 | Dumped the proms in D-Day (Jaleco) [Chack'n, Team Japump] | |
| 1297 | ||
| 1298 | Fixed background and sprites colors in D-Day (Jaleco) [Angelo Salese] | |
| 1299 | ||
| 1300 | UI menu interface changes [couriersud] | |
| 1301 | - all ui functions now expect a render_container | |
| 1302 | - removed all macros referencing render_container_get_ui | |
| 1303 | - ui_menu_alloc now is passed a container to which to render the menu. | |
| 1304 | ||
| 1305 | ||
| 1306 | ||
| 1163 | 1307 | New games added or promoted from NOT_WORKING status |
| 1164 | 1308 | --------------------------------------------------- |
| 1165 | Submarine [Volker Hann, Team Europe, David Haywood, Angelo Salese] | |
| 1166 | Noraut Deluxe Poker (console) [Roberto Fresca, ByteMaster] | |
| 1167 | Noraut Joker Poker (original) [Roberto Fresca, ByteMaster] | |
| 1168 | Noraut Red Hot Joker Poker (alt HW) [Roberto Fresca, ByteMaster] | |
| 1169 | Mainline Double Joker Poker [Roberto Fresca, ByteMaster] | |
| 1170 | Double Joker Poker (45%-75% payout) [Roberto Fresca, ByteMaster] | |
| 1171 | Royal on Ten (Noraut Deluxe hack) [Roberto Fresca, ByteMaster] | |
| 1172 | Credit Poker (ver.30c, standard) [Roberto Fresca, ByteMaster] | |
| 1173 | Iron (SNES bootleg) [Tomasz Slanina, Volker Hann & Team Europe] | |
| 1309 | F-15 Strike Eagle (2 sets) [Phil Bennett] | |
| 1310 | Battle of the Solar System (rev. 1.1) [Phil Bennett] | |
| 1311 | Tank Battle (prototype rev. 4/21/92) [Phil Bennett] | |
| 1312 | Fortune I (PK485-S) Draw Poker [Jim Stolis] | |
| 1313 | Versus Net Soccer (5 sets) [David Haywood] | |
| 1314 | Island 2 (060529, banking address hack) [David Haywood] | |
| 1174 | 1315 | |
| 1175 | 1316 | |
| 1176 | 1317 | |
| 1177 | 1318 | New clones added |
| 1178 | 1319 | ---------------- |
| 1179 | Cannon Ball (bootleg on Crazy Kong hardware) (set 3, no bonus game) | |
| 1180 | [Volker Hann, Team Europe] | |
| 1181 | X-Men (4 Players ver EBA) [Irongiant] | |
| 1182 | Wizard of Wor (with German Language ROM) [Volker Hann] | |
| 1183 | Gorf (program 1, with German Language ROM) [Volker Hann] | |
| 1184 | Super Puzzle Fighter II Turbo (Hispanic 960531) | |
| 1185 | [Artemio Urbina, David Haywood] | |
| 1320 | Insector X (Japan) [Gyrovision, Gatinho, Smitdogg, Dumping Union] | |
| 1321 | Viper Phase 1 =U.S.A= [Keven Eshbach, Dumping Union] | |
| 1322 | Cube Quest (12/30/83) [Bill K] | |
| 1186 | 1323 | |
| 1187 | 1324 | |
| 1188 | 1325 | |
| 1189 | 1326 | New games marked as GAME_NOT_WORKING |
| 1190 | 1327 | ------------------------------------ |
| 1191 | The King of Fighters Neowave (Japan) [Cah4e3] | |
| 1192 | Final Furlong (FF2 Ver. A) [Guru] | |
| 1193 | Dragon Chronicles (DC001 Ver. A) [Guru] | |
| 1194 | Netchuu Pro Yakyuu 2002 (NPY1 Ver. A) [Guru] | |
| 1195 | Soul Calibur II (SC23 Ver. A) [Guru] | |
| 1196 | Soul Calibur II (SC21 Ver. A) [Guru] | |
| 1197 | Tekken 4 (TEF3 Ver. C) [Guru] | |
| 1198 | Tekken 4 (TEF2 Ver. A) [Guru] | |
| 1199 | Tekken 4 (TEF1 Ver. A) [Guru] | |
| 1200 | Mobile Suit Z-Gundam: A.E.U.G. vs Titans (ZGA1 Ver. A) [Guru] | |
| 1201 | Capcom Fighting Jam (JAM1 Ver. A) [Guru] | |
| 1202 | Quiz and Veriety Suku Suku Inufuku 2 (IN2 Ver. A) [Guru] | |
| 1203 | Mobile Suit Z-Gundam: A.E.U.G. vs Titans DX (ZDX1 Ver. A) [Guru] | |
| 1204 | Soul Calibur III (SC31001-NA-A) [Guru] | |
| 1205 | Kinnikuman Muscle Grand Prix (KN1 Ver. A) [Guru] | |
| 1206 | Taiko No Tatsujin 9 (TK91001-NA-A) [Guru] | |
| 1207 | Tekken 5.1 (TE51 Ver. B) [Guru] | |
| 1208 | Airline Pilots (Rev. A) [f205v] | |
| 1209 | Sega Tetris [Guru] | |
| 1210 | Noraut unknown set 1 (console) [Roberto Fresca, ByteMaster] | |
| 1211 | Noraut unknown set 2 (console) [Roberto Fresca, ByteMaster] | |
| 1212 | Noraut Joker Poker (V3.011a) [Roberto Fresca, Alan Griffin] | |
| 1213 | Poker / Black Jack (Model 7521) [Roberto Fresca] | |
| 1214 | Kimble Double Hi-Lo [Roberto Fresca, Alan Griffin] | |
| 1215 | DRHL Poker (v.2.89) [Roberto Fresca, Siftware] | |
| 1216 | Magic Card Jackpot (4.01) | |
| 1217 | [Roberto Fresca, Team Europe, krick & The Dumping Union] | |
| 1218 | Magic Lotto Export (5.03) | |
| 1219 | [Roberto Fresca, Team Europe, krick & The Dumping Union] | |
| 1328 | King Tut (Australia) [David Haywood] | |
| 1329 | Money Bank (Australia) [David Haywood] | |
| 1330 | Penguin Adventure (bootleg) [Mariusz Wojcieszek] | |
| 1331 | Quarter Horse Classic [Siftware, Mariusz Wojcieszek] | |
| 1332 | Pinkiri 8 [Gyrovision, Smitdogg, The Dumping Union] | |
| 1333 | Poker Ladies (Censored bootleg) [David Haywood] | |
| 1334 | Gundam Wing: Endless Duel (SNES bootleg) | |
| 1335 | [N. Francfort, manliodp, Smitdogg, The Dumping Union] | |
| 1336 | Mortal Kombat 3 (bootleg of Megadrive version) | |
| 1337 | [Patrick McCarron, Smitdogg, The Dumping Union] | |
| 1220 | 1338 | |
| 1221 | 1339 | |
| 1222 | 1340 | |
| 1223 | 0.13 | |
| 1341 | 0.136u1 | |
| 1224 | 1342 | ------- |
| 1225 | 1343 | |
| 1344 | IMPORTANT NOTE: As of this release of MAME, several important things | |
| 1345 | about the system have changed. Please read the following items before | |
| 1346 | attempting to compile this new version. | |
| 1226 | 1347 | |
| 1348 | 1. A new tool chain for Windows, based off of gcc 4.4.3 prerelease, | |
| 1349 | is now REQUIRED. Go to http://mamedev.org/tools to get the new tools. | |
| 1350 | The updated included with 0.136u1 WILL NOT BUILD with the old tools. | |
| 1351 | The new tool chain has support for building 64-bit MAME builds with | |
| 1352 | gcc, as well as built-in DirectX headers, and C++ support, which was | |
| 1353 | missing from the old tools. | |
| 1354 | ||
| 1355 | 2. Non-Unicode builds of Windows MAME are no longer supported. The | |
| 1356 | options to turn this off in the makefile have been removed, and | |
| 1357 | future changes are likely to solidify this requirement. If you are | |
| 1358 | still (God forbid) running on Win9x, you will need the unicows.dll | |
| 1359 | library to run MAME. Download unicows from Microsoft. | |
| 1360 | ||
| 1361 | 3. All code in MAME is now compiled as C++, plus there have been a few | |
| 1362 | small changes that take advantage of the C++ language. For the most | |
| 1363 | part, there is no effect on how drivers are written, except for some | |
| 1364 | nicer accessors to devices and address spaces. Future improvements to | |
| 1365 | take advantage of the C++ syntax will evolve slowly, and will be done | |
| 1366 | internally. We are not interest in outside attempts to do this work | |
| 1367 | for now. | |
| 1368 | ||
| 1369 | 4. The SDL OSD for MAME is now shipped as part of the main source | |
| 1370 | package. SDL builds for Windows are now regularly built as part of the | |
| 1371 | validation sequence for a new release. Thanks to R. Belmont, | |
| 1372 | couriersud, and Olivier Galibert for their work on the SDL port over | |
| 1373 | the years. | |
| 1374 | ||
| 1375 | ||
| 1376 | ||
| 1227 | 1377 | MAMETesters Bugs Fixed |
| 1228 | 1378 | ---------------------- |
| 1229 | - 03535: [Documentation] 3stooges: P1-P2-P3 button does not match | |
| 1230 | documentation (input (this game)) (David Haywood) | |
| 1231 | - 02734: [Crash/Freeze] videocba, videodad, blckjack: Crash | |
| 1232 | immediately after OK (Firewave) | |
| 1233 | - 00941: [Sound] tp84: The startup 'tune' no longer sounds like the | |
| 1234 | original game after the fixes to the SN76496 sound core. | |
| 1235 | (Lord Nightmare) | |
| 1236 | - 03494: [Gameplay] batridc, batrid, batridk, batridu: 'Guest | |
| 1237 | Player', 'Special Course', 'Player Select' dipswitch | |
| 1238 | settings reversed (Fabio Priuli) | |
| 1239 | - 02155: [DIP/Input] mole: Incorrect buttons mapping. (M.A.S.H.) | |
| 1240 | - 03498: [Graphics] sengekis, sengekisj: Missing graphic layer in | |
| 1241 | Stages 3 and 5 (David Haywood) | |
| 1242 | - 03509: [Graphics] galpans2, galpans3, panicstr: Input test screen | |
| 1243 | shows zoomed in text (David Haywood) | |
| 1379 | - 00660: [DIP/Input] zoar: The cabinet UPRIGHT dipswitch is not | |
| 1380 | working. (stephh) | |
| 1381 | - 03233: [Multisession] All sets in crystal.c: Multisession Crash | |
| 1382 | - 00111: [Crash/Freeze] gunbird2: crashes during the 4th level boss | |
| 1383 | fight (North Pole) when using Vampiro. (PsikyoFan) | |
| 1384 | - 03649: [Crash/Freeze] gekisha: Unknown DIP 4-2 toggles Auto Tsumo | |
| 1385 | after Reach. If it is enabled and declare Reach, MAME crashes. | |
| 1386 | (Angelo Salese) | |
| 1387 | - 02154: [DIP/Input] ckongg: Coinage settings are wrong. (stephh) | |
| 1388 | - 02157: [DIP/Input] ckongg: Coinage settings shown on screen don't | |
| 1389 | correspond to actual settings (stephh) | |
| 1390 | - 03653: [Graphics] crzrally, crzrallya, crzrallyg: Default high | |
| 1391 | scores are incorrect (Pierpaolo Prazzoli) | |
| 1392 | - 03651: [Graphics] matmania: Graphical corruption (M.A.S.H.) | |
| 1393 | - 03620: [Speed] quasar: Massive slowdown (Quench) | |
| 1394 | - 03623: [Speed] laserbat, catnmous: Massive slowdown (Quench) | |
| 1395 | - 03621: [Interface] Hitting F6 without -cheat trigger causes crash | |
| 1396 | (smf) | |
| 1397 | - 03626: [Graphics] raiders, spacefrt: Background star field is | |
| 1398 | missing (Fabio Priuli) | |
| 1399 | - 03637: [Core] dino, punisher, wof and clones: NVRAM saves correctly, | |
| 1400 | but doesn't reload any changes made (Fabio Priuli) | |
| 1401 | - 03415: [Compiling] unidasm fails to link when ldplayer is the | |
| 1402 | specified target (Aaron Giles) | |
| 1403 | - 03485: [Graphics] mikie, mikiej, mikiehs: Possible priority issue | |
| 1404 | on game completion (robiza) | |
| 1405 | - 00266: [Graphics] daraku: Graphic Issues at region warning and | |
| 1406 | during super move. (PsikyoFan) | |
| 1407 | - 00892: [Misc.] s1945iii: At the very last boss, MAME popup a message | |
| 1408 | (PsikyoFan) | |
| 1409 | - 03632: [Crash/Freeze] kinst, kinst2: Game hangs at black screen with | |
| 1410 | 32-bit build (Aaron Giles) | |
| 1411 | - 03630: [Core] Any EEPROM with an 8-bit data bus is not being saved | |
| 1412 | correctly (Aaron Giles) | |
| 1413 | - 03622: [Graphics] solomon, solomonj: Graphics Bugs | |
| 1414 | (Pierpaolo Prazzoli) | |
| 1244 | 1415 | |
| 1245 | 1416 | |
| 1246 | 1417 | |
| 1247 | 1418 | Source Changes |
| 1248 | 1419 | -------------- |
| 1249 | Updated LFO information in YMF271 core. [Brian Troha, Nicola Salmoria] | |
| 1420 | hng64 improvments [Andrew Gardner] | |
| 1421 | - bbust2 now has 3d geometry. | |
| 1422 | - fixed improperly loaded ROMs in sams64* games. | |
| 1423 | - hacked 3d acknowledge in a slightly different manner. Sams64 games | |
| 1424 | now show 3d. | |
| 1425 | - found the 'explicit palette' word in bbust2. Colors are now correct | |
| 1426 | Implemented what looks like a 'dynamic palette' bit. Fixes the | |
| 1427 | colors in sams64 games, but not roadedge or buriki. | |
| 1250 | 1428 | |
| 1251 | Fixed parent relationship between sbrkout3 and sbrkout. | |
| 1252 | [Lord Nightmare] | |
| 1429 | RSP DRC changes: [Aaron Giles] | |
| 1430 | - fixed misaligned 32-bit accesses | |
| 1431 | - disabled DRC_SQV implementation as it breaks music in mtetrisc | |
| 1253 | 1432 | |
| 1254 | Removed some magic numbers from machine/psx.c, replaced with #defines. | |
| 1255 | [Harmony] | |
| 1433 | Converted RSP callbacks into device callbacks. Removed a ton of tag- | |
| 1434 | based queries in favor of using the device passed. [Aaron Giles] | |
| 1256 | 1435 | |
| 1257 | Change to consistently use Intel notation for hex values in TMS32010 | |
| 1258 | disassembler, rather than a mix of Motorola and Intel notation. | |
| 1259 | [Lord Nightmare] | |
| 1436 | Added profiler_mark() calls around rdp_process_list() so that the RDP | |
| 1437 | time is separated from the RSP time. [Aaron Giles] | |
| 1260 | 1438 | |
| 1261 | Z80: Check for NOP in interrupt mode 0. This allows code like ei / | |
| 1262 | halt / di to work correctly. A better solution would be to implement | |
| 1263 | full support for arbitrary opcodes in mode 0. [Dirk Best] | |
| 1439 | Added more decrypted opcodes to cb2001. [robiza] | |
| 1264 | 1440 | |
| 1265 | igs017.c update [Luca Elia] | |
| 1266 | - Merged in some IGS031 based games (igs_m68.c, tarzan.c) | |
| 1267 | - Implemented tiles flip x and video disable | |
| 1268 | - Added hopper simulation to mgcs | |
| 1269 | - Decrypted mgdh | |
| 1441 | Added driver data struct to cave.c. [Fabio Priuli] | |
| 1270 | 1442 | |
| 1271 | Almost complete decryption of starzan and tarzana [iq_132] | |
| 1443 | Changed inline_config to be allocated separately to avoid alignment | |
| 1444 | issues. [Aaron Giles] | |
| 1272 | 1445 | |
| 1273 | Documented presence of Namco customs on the Pole Position bootleg | |
| 1274 | (Top Racer) sets. Removed Namco devices from bootlegs which don't | |
| 1275 | have them. [David Haywood] | |
| 1446 | uPD7801 core changes: [Wilbert Pol] | |
| 1447 | - Fixed incorrect disassembly of some instructions. | |
| 1448 | - Updated the handling of interrupts to match the documentation. | |
| 1449 | - Implemented uPD7801 timers. | |
| 1450 | - Configured port A on the uPD7801 to an output port. | |
| 1276 | 1451 | |
| 1277 | Added save state support to plygonet.c and the DSP56156 CPU core. | |
| 1278 | [Andrew Gardner] | |
| 1452 | Removed the various HAS_xxxx for sound cores. To select sound cores, | |
| 1453 | just choose them in the make system. Further granularity is not | |
| 1454 | necessary. This also means that the samples core is always required. | |
| 1455 | [Aaron Giles] | |
| 1279 | 1456 | |
| 1280 | Updated SN76489/A to have correct PRNG waveforms (a 0 bit was missing | |
| 1281 | at the beginning, and beginning of SN76489 waveform was all 1s | |
| 1282 | instead of 0s as measured on hardware). Added SN94624 (same as | |
| 1283 | SN76489). [Lord Nightmare, plgDavid (David Viens)] | |
| 1457 | Base tilemap hook-up for cb2001. [Angelo Salese] | |
| 1284 | 1458 | |
| 1285 | IGS blitter based games update [Luca Elia] | |
| 1286 | - Renamed driver to igs011.c and cleaned it up | |
| 1287 | - Renamed some sets according to chinese title | |
| 1288 | - Implemented hopper in lhb, lhb2, wlcc | |
| 1289 | - Decrypted ryukobou | |
| 1459 | Fixed the gfx rom loading for Race Drivin' Panorama [David Haywood] | |
| 1290 | 1460 | |
| 1291 | i386 core fixes: [Barry Rodewald] | |
| 1292 | * Added Nested Task flag, and I/O Privilege flags. They aren't | |
| 1293 | implemented in any way, but can now be set or reset. Can be used | |
| 1294 | to detect a 80386 or later CPU. | |
| 1295 | * Implemented ENTER instruction. | |
| 1296 | * Made IRQ vectors treated as 8 bytes when in protected mode, and | |
| 1297 | made the addresses pushed onto the stack 32-bit if the gate | |
| 1298 | descriptor used is a 386 interrupt or trap gate (also when in | |
| 1299 | protected mode, will always be 16-bit if in real mode). | |
| 1461 | Vs. Net Soccer improvements: | |
| 1462 | - Emulated DMA protection for startup-checks [Olivier Galibert] | |
| 1463 | - Fixed Data ROM loading, game now boots [David Haywood] | |
| 1464 | - Marked Sprite + Sound ROMs as BAD_DUMP [David Haywood] | |
| 1300 | 1465 | |
| 1301 | Fixes to default mapping as well as comment/information fixes for | |
| 1302 | Mole Attack [M.A.S.H./Tafoid] | |
| 1466 | Converted the goldstar, liberate, sidearms and sidepckt drivers to use | |
| 1467 | driver_data [Atari Ace] | |
| 1303 | 1468 | |
| 1304 | Identify puyoj set as Rev B and correct various rom names. | |
| 1305 | [Smitdogg, Dumping Union] | |
| 1469 | Makefile changes: [Aaron Giles] | |
| 1470 | - Removed CPP_COMPILE flag; all code is now compiled as C++ except | |
| 1471 | for zlib and expat | |
| 1472 | - Mapped INLINE to "static inline" since C++ has real inlining | |
| 1473 | - Added new 'default' make target which just builds the emulator. | |
| 1474 | Use 'make tools' to build the tools, or 'make all' to build the | |
| 1475 | whole thing. | |
| 1476 | - 64-bit builds now get a '64' suffix on them. | |
| 1477 | - Removed UNICODE flag from Windows; UNICODE is always enabled now. | |
| 1478 | - If OSD is not defined, we look for the built-in Windows | |
| 1479 | environment variable 'OS' and if it is set to 'Windows_NT', | |
| 1480 | we assume OSD=windows; otherwise we assume OSD=sdl. | |
| 1481 | - If TARGETOS is not defined, we look for the same variable | |
| 1482 | and set TARGETOS=win32 if it is set to 'Windows_NT'. | |
| 1483 | - Windows SDL builds have an 'sdl' prefix on the executable | |
| 1484 | so they can live side-by-side. | |
| 1485 | - Added cheesy auto-detection of 64-bit Windows builds (based on the | |
| 1486 | PATH including 'mingw64-w64') | |
| 1487 | ||
| 1488 | Removed hacks surrounding unicode handling in main(). They are no | |
| 1489 | longer necessary with the new tools. [Aaron Giles] | |
| 1306 | 1490 | |
| 1307 | Improved Super Nova sprite shrinking, used by Gals Panic S2 and | |
| 1308 | Sengeki Striker. [David Haywood] | |
| 1491 | Fixed typo in 8-bit eeprom case that broke operation in some games. | |
| 1492 | [Aaron Giles] | |
| 1309 | 1493 | |
| 1310 | ||
| 1494 | Fix | |
| 1311 | 1495 | |
| 1312 | Added emulation of background graphics (blitter), sound and inputs to | |
| 1313 | skimaxx.c [Luca Elia] | |
| 1496 | Got rid of setjmp/longjmp for error handling in favor of exceptions. | |
| 1497 | Fatalerror now maps to throwing an exception. [Aaron Giles] | |
| 1314 | 1498 | |
| 1315 | Refactored Z80, i8237, and i8257 DMA to use devcb. [Curt Coder] | |
| 1499 | [PIT8253] Update PIT counter even if there was no elapsed cycles (this | |
| 1500 | only affects fast drivers like at586 in MESS). [Miodrag Milanovic] | |
| 1316 | 1501 | |
| 1317 | Fixed RGB555 palette RAM format in Soccer Superstars [Angelo Salese] | |
| 1502 | Fixed a bunch of minor quirks, and fixed gfxs in the dwarfd driver. | |
| 1503 | [Angelo Salese] | |
| 1318 | 1504 | |
| 1319 | Allowed child CPUs to be used in read8/write8 callbacks. [Curt Coder] | |
| 1505 | Changed berlwall, arkanoid, bakubrkr, mgcrystl to use YM2149. | |
| 1506 | [Corrado Tomaselli] | |
| 1320 | 1507 | |
| 1321 | Jaleco Mega System 32 update: [David Haywood] | |
| 1322 | * Added correct RAM sizes as per Charles McDonald's notes | |
| 1323 | * Implemented priority in the same manner as tetrisp2 | |
| 1324 | * Add shadows via custom mixing (gametngk and tetrisp / tp2m32 are | |
| 1325 | much improved) | |
| 1326 | * Added the alt tilemap layout used by f1superb for the backgrounds | |
| 1327 | * Added f1superb notes and IRQ generation code from nuapete | |
| 1508 | Verified and corrected clocks in halleys and exctsccr. | |
| 1509 | [Corrado Tomaselli] | |
| 1328 | 1510 | |
| 1329 | Tournament Solitaire (pcat_dyn) improvements [luigi30]: | |
| 1330 | * Added newer version of toursol, renamed existing to toursol1 and | |
| 1331 | the new one is now toursol | |
| 1332 | * Set toursol date to 1995 | |
| 1333 | * Set toursol CPU speed to 40MHz | |
| 1511 | Add support for Mahjong panel for mjgtaste. Makes this the default | |
| 1512 | input and alters the default eeprom accordingly to match factory | |
| 1513 | default. Note that you need to change both the game and the controller | |
| 1514 | setting from the driver configuration when switching input sources | |
| 1515 | since the two are mutually exclusive. [PsikyoFan] | |
| 1334 | 1516 | |
| 1335 | Many improvements to konamigx rendering, specifically improving | |
| 1336 | Soccer Superstars and Rushing Hero. [David Haywood, Angelo Salese] | |
| 1517 | Fix zeroize protection simulation in lieu of proper dongle dump. | |
| 1518 | [Bryan McPhail] | |
| 1337 | 1519 | |
| 1338 | Implemented input buffer copy protection in Rushing Heroes, game is | |
| 1339 | now somewhat playable with heavy gfx glitches [Angelo Salese] | |
| 1520 | Adds missing sample rom to Gals Panic 4 (Korea) | |
| 1521 | [Brian Troha, Dumping Union] | |
| 1340 | 1522 | |
| 1341 | Fixed Konami GX type 4 protection seed $d15, used to protect a sprite | |
| 1342 | bank in Run & Gun 2 / Slam Dunk 2 [Angelo Salese] | |
| 1523 | misc Konami wip: [Fabio Priuli] | |
| 1524 | * moved a few routines (used for sorting graphics layers) to | |
| 1525 | konicdev.c since they are shared by several drivers | |
| 1526 | * added driver data struct to ajax.c and aliens.c | |
| 1527 | * added driver data struct + save states to: asterix.c, bishi.c, | |
| 1528 | blockhl.c, bottom9.c, chqflag.c, crimfght.c, dbz.c, gbusters.c, | |
| 1529 | gijoe.c, lethal.c, mainevt.c, moo.c, overdriv.c, parodius.c, | |
| 1530 | rollerg.c, rungun.c, simpsons.c, spy.c, surpratk.c, tail2nos.c, | |
| 1531 | thunderx.c, tmnt.c, ultraman.c, vendetta.c, xexex.c and xmen.c | |
| 1532 | * updated some Konami drivers above to separately allocate palette/ | |
| 1533 | extra/work RAM instead of appending them to maincpu ROM; also, | |
| 1534 | reduced maincpu rom regions where appropriate | |
| 1535 | * replaced memory_set_bankptr with memory_set_bank where necessary | |
| 1536 | * added driver data struct & save states to gradius3.c | |
| 1343 | 1537 | |
| 1344 | Fixed sprite ROM loading in Slam Dunk 2 [David Haywood] | |
| 1538 | Converted taitosnd (aka tc0140syt) to be a device and updated the | |
| 1539 | related drivers to use the new code. [Fabio Priuli] | |
| 1345 | 1540 | |
| 1346 | Added missing BLTZAL opcode to the RSP core. [angrylion] | |
| 1541 | Replaced all occurrences of cputag_get_cpu with devtag_get_device: | |
| 1542 | the former function was just an alias and now cpus are no different | |
| 1543 | from other devices. Also removed cputag_get_cpu and cputag_reset | |
| 1544 | (another alias, not even used in the source) from cpuexec.h. | |
| 1545 | [Fabio Priuli] | |
| 1347 | 1546 | |
| 1348 | Control fix for Strike Gunner S.T.G. to allow a 3rd button mapping | |
| 1349 | for each player - thus allowing for the feature of merging ships in 2 | |
| 1350 | player games. [Tafoid] | |
| 1547 | Fixed knights rom labels [Dlfrsilver] | |
| 1351 | 1548 | |
| 1352 | Marked cosmic alien colors as wrong, added TODO to the driver for | |
| 1353 | fixing colors. Added new XTAL value for cosmic alien and switched | |
| 1354 | driver to use it. [Lord Nightmare] | |
| 1549 | Metal Maniax improvements [Phil Bennett/luigi30] | |
| 1550 | * Fixed frame buffer display | |
| 1551 | * Started to add the other CPUs | |
| 1552 | * Added PCB layouts for layers 1 and 2 | |
| 1553 | * Hooked up TMS34020 | |
| 1554 | * Started to implement the ADSP-2105 network CPU and the CAGE audio | |
| 1555 | system [Phil Bennett] | |
| 1355 | 1556 | |
| 1356 | Fixed colors in Greyhound games [Mariusz Wojcieszek] | |
| 1557 | Added some missing header declarations and static qualifiers. Added | |
| 1558 | validity.h to the core for consistency as well as an explicit foo.h | |
| 1559 | in each foo.c. [Atari Ace] | |
| 1357 | 1560 | |
| 1358 | ||
| 1561 | Adde | |
| 1359 | 1562 | |
| 1360 | Fixed gfx decoding and hooked up mc6845 in the Forte Card driver | |
| 1361 | [Angelo Salese] | |
| 1563 | VIA6522: Refactored interface to use READ/WRITE_LINE. [Curt Coder] | |
| 1362 | 1564 | |
| 1363 | Removed dual layout, added Map base video register and fixed | |
| 1364 | transparent issues in the Jackpot Cards driver [Angelo Salese] | |
| 1565 | Cyber Tank improvements: [Angelo Salese] | |
| 1566 | * Fixed bitplane order | |
| 1567 | * Decoded sprite gfx format | |
| 1568 | * Hooked up the two bg tilemaps | |
| 1569 | * Wrote bare-bones video emulation for the Cyber Tank sprite chip / | |
| 1570 | blitter | |
| 1571 | * Added video boundary checks for the blitter | |
| 1365 | 1572 | |
| 1366 | MC680x0 update: [R. Belmont] | |
| 1367 | - Reworked PMMU/core interface so PMMU now sees all cop 0 | |
| 1368 | instructions | |
| 1369 | - Improved disassembly of PMMU instructions | |
| 1370 | - Preliminary 68LC040 support | |
| 1371 | - Fixed disassembly for EC/LC variants of '030/'040 | |
| 1573 | The starting value for an output port is now the default value, which | |
| 1574 | is based on whether it is active high or low. So the device will be | |
| 1575 | called the first time the line becomes active. Changed the eeprom | |
| 1576 | device to assume that the reset and clock are cleared until it's told | |
| 1577 | otherwise. [smf] | |
| 1372 | 1578 | |
| 1373 | Patched NVRAM check in Jackpot Cards, makes the game playable but you | |
| 1374 | cannot save settings so it's not yet working. [Angelo Salese] | |
| 1579 | Added driver data struct to taito_l.c & opwolf.c. [Fabio Priuli] | |
| 1375 | 1580 | |
| 1376 | Trashed the old pre-accurate-clocking STEP based sample averaging | |
| 1377 | scheme from sn76489 and friends, vastly simplifying the code. Made | |
| 1378 | the output bipolar rather than only above the 0 line. Added missing | |
| 1379 | statement to the get_safe_token function for the recently added | |
| 1380 | SN94624. [Lord Nightmare] | |
| 1581 | Added driver data struct + save states to asuka.c (cadash was not | |
| 1582 | supporting saves), rainbow.c, rastan.c, taito_f2.c, taito_h.c, | |
| 1583 | taito_o.c, taito_z.c, topspeed.c & volfied.c. [Fabio Priuli] | |
| 1381 | 1584 | |
| 1382 | Many N64 RDP fixes. | |
| 1383 | [angrylion, Ziggy, Gonetz, Orkin, DrgnMndd, Harmony] | |
| 1585 | Renamed mamecore.h -> emucore.h. [Aaron Giles] | |
| 1384 | 1586 | |
| 1385 | Cleaned up toaplan2 V25 support, enabled Batsugun V25 and added | |
| 1386 | decryption table info for the other games [David Haywood] | |
| 1587 | New C++-aware memory manager: [Aaron Giles] | |
| 1387 | 1588 | |
| 1388 | Improved the V25S memory map in Batsugun, now CPUs starts to | |
| 1389 | communicate properly, needs to find & implement the irq that clears | |
| 1390 | the RAM flag and decrypt the relative opcodes in that. [Angelo Salese] | |
| 1589 | This is a simple manager that allows you to add any type of object | |
| 1590 | to a resource pool. Most commonly, allocated objects are added, and | |
| 1591 | so a set of allocation macros is provided to allow you to manage | |
| 1592 | objects in a particular pool: | |
| 1391 | 1593 | |
| 1392 | More Greyhound improvements: [Mariusz Wojcieszek] | |
| 1393 | - added dip switches for Super Poker | |
| 1394 | - improved inputs in Sports Authority | |
| 1594 | pool_alloc(p, t) = allocate object of type 't' and add to pool 'p' | |
| 1595 | pool_alloc_clear(p, t) = same as above, but clear the memory first | |
| 1596 | pool_alloc_array(p, t, c) = allocate an array of 'c' objects of | |
| 1597 | type 't' and add to pool 'p' | |
| 1598 | pool_alloc_array_clear(p, t, c) = same, but with clearing | |
| 1599 | pool_free(p, v) = free object 'v' and remove it from the pool | |
| 1395 | 1600 | |
| 1396 | Expanded some sound chip tags to specifically indicate they are sound | |
| 1397 | chips (generally, "ay" becomes "aysnd", "fm" becomes "fmsnd", etc) | |
| 1398 | [Aaron Giles] | |
| 1601 | Note that pool_alloc[_clear] is roughly equivalent to "new t" and | |
| 1602 | pool_alloc_array[_clear] is roughly equivalent to "new t[c]". Also | |
| 1603 | note that pool_free works for single objects and arrays. | |
| 1399 | 1604 | |
| 1400 | MIPS3 TLB fixes: [Aaron Giles] | |
| 1401 | - now properly generating TLB fill exceptions under correct | |
| 1402 | circumstances | |
| 1403 | - TLB exceptions no longer trash low 4 bits of Context | |
| 1404 | - exceptions with the EXL bit set always go to vector 0x180 | |
| 1405 | - fixed bug in vtlb code that caused us to lose track of previously | |
| 1406 | registered fixed page ranges | |
| 1407 | - fixed MIPS3 behavior that would not clear out invalid page ranges | |
| 1408 | from the VTLB under certain circumstances | |
| 1409 | - added support for TLB sizes less than 48 entries | |
| 1410 | - fix TLBMOD exceptions so they also properly set BadVAddr | |
| 1605 | There is a single global_resource_pool defined which should be used | |
| 1606 | for any global allocations. It has equivalent macros to the pool_* | |
| 1607 | macros above that automatically target the global pool. | |
| 1411 | 1608 | |
| 1412 | Added NCR7496 variant to sn76496.c. Updated comments to show which | |
| 1413 | chips are currently verified. Cleaned up comments. [Lord Nightmare] | |
| 1609 | In addition, the memory module defines global new/delete overrides | |
| 1610 | that access file and line number parameters so that allocations can | |
| 1611 | be tracked. Currently this tracking is only done if MAME_DEBUG is | |
| 1612 | enabled. In debug builds, any unfreed memory will be printed at | |
| 1613 | the end of the session. | |
| 1414 | 1614 | |
| 1415 | Fixed the 64-bit crashing issues in N64 [Harmony] | |
| 1615 | emualloc.h also has #defines to disable malloc/free/realloc/calloc. | |
| 1616 | Since emualloc.h is included by emucore.h, this means pretty much | |
| 1617 | all code within the emulator is forced to use the new allocators. | |
| 1618 | Although straight new/delete do work, their use is discouraged, as | |
| 1619 | any allocations made with them will not be tracked. | |
| 1416 | 1620 | |
| 1417 | Fixed out-of-bounds array accesses in the peplus and videopkr drivers | |
| 1418 | [Oliver Stoeneberg] | |
| 1621 | Changed the familar auto_alloc_* macros to map to the resource pool | |
| 1622 | model described above. The running_machine is now a class and | |
| 1623 | contains a resource pool which is automatically destructed upon | |
| 1624 | deletion. If you are a driver writer, all your allocations should be | |
| 1625 | done with auto_alloc_*. | |
| 1419 | 1626 | |
| 1420 | Merged findout.c and getrivia.c into gei.c [Mariusz Wojcieszek] | |
| 1627 | Changed all drivers and files in the core using malloc/realloc or | |
| 1628 | the old alloc_*_or_die macros to use (preferably) the auto_alloc_* | |
| 1629 | macros instead, or the global_alloc_* macros if necessary. | |
| 1421 | 1630 | |
| 1422 | Fixed broken DRC logging. [Aaron Giles] | |
| 1631 | Added simple C++ wrappers for astring and bitmap_t, as these need | |
| 1632 | proper constructors/destructors to be used for auto_alloc_astring | |
| 1633 | and auto_alloc_bitmap. | |
| 1423 | 1634 | |
| 1424 | Fix PowerPC 603 translation so it doesn't get stuck in an infinite | |
| 1425 | loop after the first fixup. [Aaron Giles] | |
| 1635 | Removed references to the winalloc prefix file. Most of its | |
| 1636 | functionality has moved into the core, save for the guard page | |
| 1637 | allocations, which are now implemented in osd_alloc and osd_free. | |
| 1426 | 1638 | |
| 1427 | Added driver data struct and save state support to pandoras.c, | |
| 1428 | marineb.c, m10.c, m14.c, m52.c, m57.c, m58.c, m62.c, m63.c, | |
| 1429 | travrusa.c, adp.c, n8080.c, atarifb.c, astinvad.c, avalnche.c, | |
| 1430 | battlex.c, carjmbre.c, popper.c, spaceg.c, bankp.c, battlane.c, | |
| 1431 | blockade.c, blueprnt.c, brkthru.c bsktball.c, hexa.c | |
| 1639 | Added driver data struct + save states to darius.c & othunder.c. | |
| 1432 | 1640 | [Fabio Priuli] |
| 1433 | 1641 | |
| 1434 | Added driver data struct to espial.c, zodiack.c, 4enraya.c, 1942.c, | |
| 1435 | 1943.c, ace.c, albazc.c, arabian.c, aeroboto.c, astrof.c, ambush.c | |
| 1436 | angelkds.c, arkanoid.c. [Fabio Priuli] | |
| 1642 | Added driver data struct to ninjaw.c, slapshot.c, warriorb.c, wgp.c. | |
| 1643 | [Fabio Priuli] | |
| 1437 | 1644 | |
| 1438 | Replaced model3.c fatalerror() calls with development-friendly | |
| 1439 | logerror() calls. Also allows dayto2pe to boot again. [Phil Bennett] | |
| 1645 | Extended the astring class wrapper into something useful, and | |
| 1646 | useable as a stack object. Also designed the interfaces to allow | |
| 1647 | for chaining operations. And added a casting operator to const | |
| 1648 | char * for seamless use in most functions that take plain old C | |
| 1649 | strings. [Aaron Giles] | |
| 1440 | 1650 | |
| 1441 | hng64: Improved the Samurai Shodown 64 2 i/o simulation comms, now | |
| 1442 | inputs works and enters into proper gameplay. [Angelo Salese] | |
| 1651 | Changed all uses of astring to use the object directly on the | |
| 1652 | stack or embedded in objects instead of explicitly allocating | |
| 1653 | and deallocating it. Removed a lot of annoying memory management | |
| 1654 | code as a result. [Aaron Giles] | |
| 1443 | 1655 | |
| 1444 | Merged some include files and merged audio/fghtbskt.c in | |
| 1445 | drivers/m63.c. [Fabio Priuli] | |
| 1656 | Changed interfaces that accepted/returned an astring * to | |
| 1657 | use an astring & instead. [Aaron Giles] | |
| 1446 | 1658 | |
| 1447 | Got rid of SN76496's R->OldNoise since it causes problems for | |
| 1448 | gamegear/sms. Changed noise taps accordingly. Redid change to | |
| 1449 | gamegear/sms for XOR vs XNOR, now verified by Justin Kerk. Verified | |
| 1450 | gamegear noise taps thanks to sample provided by Justin Kerk. | |
| 1451 | Add stereo sound support to sn76496.c for gamegear. | |
| 1452 | [Lord Nightmare, Justin Kerk] | |
| 1659 | Removed auto_alloc_astring(machine). Use auto_alloc(machine, astring) | |
| 1660 | instead. [Aaron Giles] | |
| 1453 | 1661 | |
| 1454 | Added a MDRV_EEPROM_NODEFAULT_ADD macro for drivers which do not need | |
| 1455 | default data size / data. [Fabio Priuli] | |
| 1662 | Major header file cleanup: [Aaron Giles] | |
| 1663 | - Created new central header "emu.h"; this should be included | |
| 1664 | by pretty much any driver or device as the first include. This | |
| 1665 | file in turn includes pretty much everything a driver or device | |
| 1666 | will need, minus any other devices it references. Note that | |
| 1667 | emu.h should *never* be included by another header file. | |
| 1668 | - Updated all files in the core (src/emu) to use emu.h. | |
| 1669 | - Removed a ton of redundant and poorly-tracked header includes | |
| 1670 | from within other header files. | |
| 1671 | - Temporarily changed driver.h to map to emu.h until we update | |
| 1672 | files outside of the core. | |
| 1456 | 1673 | |
| 1457 | Updated 20pacgal to use EEPROM device. Proper save state support still | |
| 1458 | needs some work (to handle the rom banking mechanism). [Fabio Priuli] | |
| 1674 | Added class wrapper around tagmap so it can be directly included | |
| 1675 | and accessed within objects that need it. Updated all users to | |
| 1676 | embed tagmap objects and changed them to call through the class. | |
| 1677 | [Aaron Giles] | |
| 1459 | 1678 | |
| 1460 | Updated galgbios to use EEPROM_NODEFAULT. [Fabio Priuli] | |
| 1679 | Added nicer functions for finding devices, ports, and regions in | |
| 1680 | a machine: [Aaron Giles] | |
| 1461 | 1681 | |
| 1462 | Added PORT_CUSTOM(eepromdev_bit_r) for EEPROM devices. [Fabio Priuli] | |
| 1682 | machine->device("tag") -- return the named device, or NULL | |
| 1683 | machine->port("tag") -- return the named port, or NULL | |
| 1684 | machine->region("tag") -- return the named region | |
| 1463 | 1685 | |
| 1464 | Fixed wrong order parameters in memset (spotted by Beledgol). | |
| 1465 | [Fabio Priuli] | |
| 1686 | (Note that machine->region() returns a pointer to a region_info class | |
| 1687 | which describes a region, not a pointer to the region's memory.) | |
| 1466 | 1688 | |
| 1467 | Verified/changed clocks and vsyncs on the following games: | |
| 1468 | Aerofighters (only vsync), Power Spikes, Turbo Force (only vsync), | |
| 1469 | Guzzler/Swimmer (same pcb), Exerion and Karate Champs Vs. | |
| 1689 | Made the device tag an astring. This required touching a lot of | |
| 1690 | code that printed the device to explicitly fetch the C-string | |
| 1691 | from it. (Thank you gcc for flagging that issue!) [Aaron Giles] | |
| 1692 | ||
| 1693 | Added a PCM sample end/loop callback to the RF5C68 core | |
| 1694 | [Barry Rodewald] | |
| 1695 | ||
| 1696 | galaxold update: [stephh] | |
| 1697 | - Renamed set kkgalax to ckongmc | |
| 1698 | - Changed descriptions for ckongg and ckongmc | |
| 1699 | - Fixed dip switches and inputs for ckongg and ckongmc | |
| 1700 | - Updated ckongmc memory map | |
| 1701 | ||
| 1702 | Added the mameconfig version to the -listxml output [Oliver Stoneberg] | |
| 1703 | ||
| 1704 | Implemented inputs and sound in Gunpey [Luca Elia] | |
| 1705 | ||
| 1706 | Added new member function space() to the device_config, along with | |
| 1707 | shorter constants to be used (AS_PROGRAM, AS_DATA, AS_IO). With no | |
| 1708 | parameters, space() returns the first address space, which is | |
| 1709 | commonly the only space present. Updated a few devices that referenced | |
| 1710 | the old space[] array to call the new function instead. [Aaron Giles] | |
| 1711 | ||
| 1712 | Implemented basic blitter support in Gunpey [Tomasz Slanina] | |
| 1713 | ||
| 1714 | Converted Gunpey to use RGB pens instead of hardcoded palette table | |
| 1715 | [Angelo Salese] | |
| 1716 | ||
| 1717 | Enforce that numbers are all the same exact width when loading fonts. | |
| 1718 | [Aaron Giles] | |
| 1719 | ||
| 1720 | Fixed a bogus protection check in Victor 21 [Angelo Salese] | |
| 1721 | ||
| 1722 | Fix assert for prmrsocr + clones - no whatsnew needed [Fabio Priuli] | |
| 1723 | ||
| 1724 | Redumped program and sprite roms in Cyber Tank [Antonio Gonzalez Jr.] | |
| 1725 | ||
| 1726 | Added a mostly-complete SunPlus u'nSP core based on the one in | |
| 1727 | Segher's "Unununium". [Harmony] | |
| 1728 | ||
| 1729 | Add lots of comments relating to 56-pin Mahjong interface and Psikyo | |
| 1730 | SK-G001 interface pcb based on discussion with alien_mame and | |
| 1731 | documents from other Mahjong PCBs. [PsikyoFan] | |
| 1732 | ||
| 1733 | Verified clocks on Poker Ladies and changed Z80 clock of Mahjong | |
| 1734 | Gakuen from 6Mhz to 8MHz to match the other Mitchell hardware games | |
| 1470 | 1735 | [Corrado Tomaselli] |
| 1471 | 1736 | |
| 1472 | hng64: rewrote the MCU simulations, basically to be more clean than | |
| 1473 | before [Angelo Salese] | |
| 1737 | i386: Improved accuracy of the various emulated models, makes CPU | |
| 1738 | detection programs detect the correct CPU (in MESS). [Dirk Best] | |
| 1739 | - eflags mask added | |
| 1740 | - Initial values for the EAX and EDX registers fixed | |
| 1741 | - cpuid values improved | |
| 1742 | - feature flags improved | |
| 1743 | - initial value for the cr0 register improved | |
| 1744 | - changed 486 to not support the cpuid instruction by default | |
| 1745 | - take a trap on invalid instructions instead of throwing a | |
| 1746 | fatalerror | |
| 1747 | - emulated the undefined flag behavior for the DIV/IDIV instructions on Intel CPUs | |
| 1474 | 1748 | |
| 1475 | hng64: improved MCU simulation and added inputs in Beast Busters 2nd | |
| 1476 | Nightmare, it can now reach gameplay mode too [Angelo Salese] | |
| 1749 | SDLMAME: improved OS X and SDL 1.3 SVN support, try to autodetect | |
| 1750 | SDLMAME targets [Couriersud] | |
| 1477 | 1751 | |
| 1478 | hng64: removed Program Counter-based routines in Samurai Shodown 64 | |
| 1479 | 1/2, this fixes the first episode that can now be coined up, however | |
| 1480 | it hangs soon after that [Angelo Salese] | |
| 1752 | SDLMAME: add BGRA support to -video soft [couriersud] | |
| 1481 | 1753 | |
| 1482 | Renamed drw80pkr to drw80pk2. Appears to be later version and MN | |
| 1483 | jurisdiction specific. [Jim Stolis] | |
| 1754 | Fixed period for both sn76489 and sn76489A periodic noise; fixes | |
| 1755 | pitch in 'smooth criminal' demo for colecovision and fixes pitch | |
| 1756 | (but not the waveform, which will require more work) of music in | |
| 1757 | dorunrun; More work is required before the code will be bit accurate | |
| 1758 | due to the way the real LFSR and periodic generator work. | |
| 1759 | [Lord Nightmare, Kold666, PlgDavid] | |
| 1484 | 1760 | |
| 1485 | Replaced drw80pkr with older dump from [Team Europe]. | |
| 1761 | SDLMAME makefile improvements: [couriersud] | |
| 1762 | - Fix TARGETOS detection on OS X. | |
| 1763 | - Do not try to check TARGETOS when cross-compiling | |
| 1764 | - For non-windows targets, try to auto-detect PTR64 | |
| 1765 | - testkeys now builds again | |
| 1766 | - for unix targets, added a depend rule to sdl.mak which builds a | |
| 1767 | .depend file. | |
| 1486 | 1768 | |
| 1487 | Added various graphics improvements and corrected colors to drw80pkr. | |
| 1488 | Game boots much farther and cleaner. Additional graphics/memory | |
| 1489 | cleanup and preliminary input support [Jim Stolis] | |
| 1769 | Fixed a number of compiler bugs found by PowerPC MacOS X. [R. Belmont] | |
| 1490 | 1770 | |
| 1491 | hng64: work-around to get to the character screen in Samurai Shodown | |
| 1492 | 64, hangs again after it [Angelo Salese] | |
| 1771 | Added casting operators to the region_info class so you can assign | |
| 1772 | a region to a generic type pointer and have it automatically convert. | |
| 1773 | Also added a bytes() method which is safe if the region is NULL | |
| 1774 | (useful for saying machine->region("foo")->bytes() and not crashing | |
| 1775 | if foo doesn't exist). [Aaron Giles] | |
| 1493 | 1776 | |
| 1494 | Added driver_data struct to appoooh.c and boxer.c. Also merged boxer | |
| 1495 | video emulation into drivers/boxer.c. [Fabio Priuli] | |
| 1777 | Changed the region field in the device_config to be a region_info *, | |
| 1778 | and removed the regionbytes field. Updated all users of these fields | |
| 1779 | to use the new casting operators and bytes() methods instead. | |
| 1780 | [Aaron Giles] | |
| 1496 | 1781 | |
| 1497 | Added dual screen output to the Konami GX Type 3/4 games | |
| 1498 | [David Haywood] | |
| 1782 | Added subdevice and subregion methods to the device_config class, so | |
| 1783 | you can easily query for devices and regions that are device-specific. | |
| 1784 | The device prefix ("devicename:") is automatically prepended. | |
| 1785 | [Aaron Giles] | |
| 1499 | 1786 | |
| 1500 | Fixed possible NULL pointer dereference in video/dec0.c | |
| 1501 | [Oliver Stoneberg] | |
| 1787 | YM2612: More accurate LFO implementation and channel clipping | |
| 1788 | [Eke-Eke, Nemesis, R. Belmont] | |
| 1502 | 1789 | |
| 1503 | Added save states to bionicc.c. [Fabio Priuli] | |
| 1504 | 1790 | |
| 1505 | 1791 | |
| 1506 | ||
| 1507 | 1792 | New games added or promoted from NOT_WORKING status |
| 1508 | 1793 | --------------------------------------------------- |
| 1509 | Mahjong Super Da Man Guan II | |
| 1510 | [Luca Elia, Pierpaolo Prazzoli, Guru, Xing Xing] | |
| 1511 | Mahjong Man Guan Da Heng [Luca Elia, Guru, The Dumping Union] | |
| 1512 | Touche Me [David Haywood, Justin Kerk, JacKc, Sez, The tECHIDNA, Smitdogg, The Dumping Union] | |
| 1513 | Skimaxx [Luca Elia, Phil Bennett] | |
| 1514 | Dream 9 Final [Angelo Salese, David Haywood] | |
| 1515 | Soccer Superstars [David Haywood, Angelo Salese] | |
| 1516 | Rushing Heroes [David Haywood, Angelo Salese] | |
| 1517 | Run & Gun 2 [David Haywood, Angelo Salese] | |
| 1518 | Super Poker [Mariusz Wojcieszek] | |
| 1519 | GEI Multi Game [Mariusz Wojcieszek] | |
| 1520 | Sport Authority [Mariusz Wojcieszek] | |
| 1521 | Oh! Paipee [Takahiro Nogi] | |
| 1522 | Tougenkyou [Takahiro Nogi] | |
| 1794 | Second Chance [Siftware] | |
| 1795 | Multi Game (Tung Sheng Electronics) [Mariusz Wojcieszek] | |
| 1523 | 1796 | |
| 1524 | 1797 | |
| 1525 | 1798 | |
| 1526 | 1799 | New clones added |
| 1527 | 1800 | ---------------- |
| 1528 | Super Street Fighter II: The New Challengers (Hispanic 930911) | |
| 1529 | [Artemio] | |
| 1530 | Silent Scope (JZD) (not working) [Guru} | |
| 1531 | Tarzan (V107) (not working) [iq_132] | |
| 1532 | Mahjong Ryukobou (Japan, V030J) [Luca Elia, Guru, Dyq, Bnathan] | |
| 1533 | Ultimate Tennis (Japan) [David Haywood, Aaron Giles, N. Alston, Smitdogg, The Dumping Union] | |
| 1534 | The Big Breakfast (5 sets) [AGEMAME Development] | |
| 1535 | Gals Panic S - Extra Edition (Korea) [Choi Sung Ho] | |
| 1536 | Light Bringer (Ver 2.20 1994/04/08) [Choi Sung Ho] | |
| 1537 | Mad Crusher (Japan) [David Haywood, Andrew Welburn] | |
| 1538 | Cosmic Alien (first version) [Andrew Welburn, Lord Nightmare] | |
| 1539 | Dungeons & Dragons: Shadow over Mystara (Hispanic 960223) | |
| 1540 | [Artemio Urbina, David Haywood] | |
| 1541 | Mega Man 2: The Power Fighters (Hispanic 960712) | |
| 1542 | [Artemio Urbina, David Haywood] | |
| 1543 | Last Duel (Japan) [Chack'n, Team Japump!!!] | |
| 1544 | Joker Poker (Version 16.04BI 10-19-88, Joker Poker ICB 9-30-86) | |
| 1545 | [Mariusz Wojcieszek] | |
| 1546 | Joker Poker (Version 16.03BI 5-10-85, Poker No Raise ICB 9-30-86) | |
| 1547 | [Mariusz Wojcieszek] | |
| 1548 | Amuse (Version 30.08 IBA) [Mariusz Wojcieszek] | |
| 1549 | R-Type II (Japan, revision C) [Andrew Welburn] | |
| 1550 | Popeye Man (hack) [Team Japump!!!] | |
| 1551 | Steraranger (Moon Cresta bootleg) [Siftware] | |
| 1801 | Exciting Soccer (Japan set 2) [Corrado Tomaselli] | |
| 1802 | Super Bar [Brian Troha, David Haywood, Dumping Union] | |
| 1803 | Mega Blast (US) [D. Beneke, hap, Smitdogg, Dumping Union] | |
| 1552 | 1804 | |
| 1553 | 1805 | |
| 1554 | 1806 | |
| 1555 | 1807 | New games marked as GAME_NOT_WORKING |
| 1556 | 1808 | ------------------------------------ |
| 1557 | Super Tarzan [f205v, Mirko Buffoni, iq_132] | |
| 1558 | Mahjong Nenrikishu SP [Guru, Dyq, Bnathan] | |
| 1559 | Print Club 2 (U 970921 V1.000) [Guru, Angelo Salese] | |
| 1560 | Print Club 2 Vol. 3 (U 990310 V1.000) [Guru, Angelo Salese] | |
| 1809 | Fun Station Spielekoffer 9 Spiele [Tomasz Slanina] | |
| 1810 | Vega [David Haywood] | |
| 1811 | Monza GP [Tomasz Slanina] | |
| 1812 | Quarter Horse [Ruben Panossian, Angelo Salese] | |
| 1813 | Vortex [tormod, Team Europe, Smitdogg, The Dumping Union] | |
| 1814 | Bega's Battle [Angelo Salese] | |
| 1815 | Computer Quiz Atama no Taisou [Chack'n, Team Japump] | |
| 1816 | Track & Field (NZ Bootleg?) [Siftware, Tafoid] | |
| 1817 | ||
| No newline at end of file |
| Previous | 15994 Revisions | Next |