| Previous | 15994 Revisions | Next |
| r7357 Sunday 14th February, 2010 at 22:44:05 UTC by Nathan Woods |
|---|
| Updated to MAME 0.136u3 core |
| [ROOT] | makefile |
| [docs] | messnew.txt |
| [src/emu] | debugger.c driver.h emu.mak emuopts.c emuopts.h inptport.c mame.c mame.h render.c render.h ui.c uiinput.c uiinput.h uimenu.c validity.c video.c |
| [src/emu/cpu] | cpu.mak |
| [src/emu/cpu/am29000] | am29000.c |
| [src/emu/cpu/apexc] | apexcdsm.c |
| [src/emu/cpu/i386] | i386op16.c i386op32.c |
| [src/emu/cpu/mcs48] | mcs48.h |
| [src/emu/cpu/mn10200] | mn10200.c* mn10200.h* mn102dis.c* |
| [src/emu/debug] | debugcpu.c |
| [src/emu/debugint] | debugint.c* debugint.h* |
| [src/emu/drivers] | xtal.h |
| [src/emu/layout] | vertical.lay |
| [src/emu/machine] | i8255a.c |
| [src/emu/sound] | segapcm.c sound.mak zsg2.c* zsg2.h* |
| [src/emu/video] | hd63484.c |
| [src/mame] | mame.mak mamedriv.c |
| [src/mame/audio] | 8080bw.c dkong.c taito_zm.c* taito_zm.h* |
| [src/mame/drivers] | 1945kiii.c 2mindril.c 8080bw.c acefruit.c actfancr.c adp.c aerofgt.c airbustr.c aladbl.c albazc.c alg.c alpha68k.c appoooh.c arabian.c aristmk5.c arkanoid.c asterix.c asteroid.c astinvad.c astrocde.c astrocorp.c astrof.c asuka.c atarig1.c atetris.c backfire.c badlands.c bagman.c balsente.c battlnts.c bestleag.c bfm_sc1.c bfm_sc2.c bfmsys85.c bigevglf.c bishi.c bishjan.c bladestl.c blockade.c blockout.c bloodbro.c bombjack.c canyon.c carjmbre.c carpolo.c cave.c cball.c ccastles.c cclimber.c champbas.c chinagat.c cidelsa.c cliffhgr.c cojag.c commando.c cps1.c crbaloon.c crimfght.c crshrace.c cshooter.c cvs.c cyberbal.c dambustr.c darkhors.c dassault.c ddenlovr.c ddragon.c ddragon3.c ddribble.c* dec0.c dec8.c decocass.c destroyr.c dkong.c docastle.c dooyong.c espial.c esripsys.c exidy.c exprraid.c fastfred.c finalizr.c firebeat.c firetrap.c flkatck.c freekick.c funkybee.c funkyjet.c funworld.c fuukifg2.c gaelco2.c galaxian.c galaxold.c galpanic.c gamecstl.c gaplus.c gng.c goldstar.c gticlub.c gunpey.c gunsmoke.c harddriv.c hornet.c hshavoc.c hyperspt.c igs009.c irobot.c itech32.c itech8.c jackie.c kingobox.c klax.c konamigx.c kyugo.c lethal.c lwings.c megadriv.c megaplay.c megasys1.c megatech.c micro3d.c model2.c mrdo.c namcos11.c naomi.c neogeo.c neptunp2.c* nwk-tr.c pachifev.c puckpkmn.c raiden.c sangho.c segac2.c segae.c segahang.c segamsys.c segaorun.c segas16a.c segas16b.c segas18.c segas24.c segaxbd.c segaybd.c seibuspi.c sigmab52.c* snesb.c spiders.c ssf2md.c ssgbl.c subsino.c system16.c taito_l.c taitogn.c toaplan1.c topshoot.c vamphalf.c wrally.c zn.c zr107.c |
| [src/mame/includes] | cclimber.h cyberbal.h ddribble.h* dec8.h dkong.h genesis.h megadriv.h* mw8080bw.h naomi.h segamsys.h* segas16.h* system16.h |
| [src/mame/layout] | tisub.lay* |
| [src/mame/machine] | cclimber.c dc.c decocass.c decocass.h naomi.c naomibd.c s16fd.c segaic16.c segaic16.h segas24.c snes.c |
| [src/mame/video] | 8080bw.c cps1.c cyberbal.c ddribble.c* dec8.c dkong.c genesis.c gticlub.c hng64.c konamiic.c konicdev.c megasys1.c rungun.c segahang.c segaorun.c segas16a.c segas16b.c segas18.c segaxbd.c segaybd.c snes.c system16.c |
| [src/mess] | mess.mak |
| [src/osd] | osdcore.h |
| [src/osd/sdl] | README_SDL13.txt dview.c input.c osdsdl.h sdl.mak sdldir.c sdlfile.c sdlmain.c sdlos_macosx.c sdlos_os2.c sdlos_unix.c sdlos_win32.c texcopy.c video.c window.c |
| [src/osd/windows] | video.c window.c winmain.c |
| r7356 | r7357 | |
|---|---|---|
| 1057 | 1057 | /* Much more work needs to be done */ |
| 1058 | 1058 | /*****************************************/ |
| 1059 | 1059 | |
| 1060 | WRITE8_HANDLER( schasrcv_sh_port_1_w ) | |
| 1060 | WRITE8_HANDLER( schasercv_sh_port_1_w ) | |
| 1061 | 1061 | { |
| 1062 | 1062 | |
| 1063 | 1063 | /* bit 2 = 2nd speedup |
| r7356 | r7357 | |
| 1073 | 1073 | state->port_1_last_extra = data; |
| 1074 | 1074 | } |
| 1075 | 1075 | |
| 1076 | WRITE8_HANDLER( schasrcv_sh_port_2_w ) | |
| 1076 | WRITE8_HANDLER( schasercv_sh_port_2_w ) | |
| 1077 | 1077 | { |
| 1078 | 1078 | mw8080bw_state *state = (mw8080bw_state *)space->machine->driver_data; |
| 1079 | 1079 |
| r7356 | r7357 | |
|---|---|---|
| 1140 | 1140 | { 0x0000, 0x007a, 0x018b, 0x0320, 0x036c, 0x03c4, 0x041c, 0x0520, 0x063e } |
| 1141 | 1141 | and related samples interface |
| 1142 | 1142 | |
| 1143 | static const char *const radarsc1_sample_names[] = | |
| 1143 | static const char *const radarscp1_sample_names[] = | |
| 1144 | 1144 | { |
| 1145 | "*radarsc1", | |
| 1145 | "*radarscp1", | |
| 1146 | 1146 | "10.wav", |
| 1147 | 1147 | "12.wav", |
| 1148 | 1148 | "14.wav", |
| r7356 | r7357 | |
| 1155 | 1155 | 0 |
| 1156 | 1156 | }; |
| 1157 | 1157 | |
| 1158 | static const samples_interface radarsc1_samples_interface = | |
| 1158 | static const samples_interface radarscp1_samples_interface = | |
| 1159 | 1159 | { |
| 1160 | 1160 | 8, |
| 1161 | radarsc1_sample_names | |
| 1161 | radarscp1_sample_names | |
| 1162 | 1162 | }; |
| 1163 | 1163 | |
| 1164 | 1164 | */ |
| r7356 | r7357 | |
| 1259 | 1259 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_LATCH8_READBIT("ls259.6h", 4) |
| 1260 | 1260 | ADDRESS_MAP_END |
| 1261 | 1261 | |
| 1262 | static ADDRESS_MAP_START( radarsc1_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 1262 | static ADDRESS_MAP_START( radarscp1_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 1263 | 1263 | AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_DEVREAD("ls175.3d", latch8_r) |
| 1264 | 1264 | AM_RANGE(0x00, 0xff) AM_DEVWRITE("discrete", dkong_p1_w) /* DAC here */ |
| 1265 | 1265 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_LATCH8_READ("virtual_p1") |
| r7356 | r7357 | |
| 1320 | 1320 | MDRV_LATCH8_DISCRETE_NODE("discrete", 7, DS_SOUND7_INP) |
| 1321 | 1321 | |
| 1322 | 1322 | /* If P2.Bit7 -> is apparently an external signal decay or other output control |
| 1323 | * If P2.Bit6 -> activates the external compressed sample ROM (not radarsc1) | |
| 1324 | * If P2.Bit5 -> Signal ANSN ==> Grid enable (radarsc1) | |
| 1323 | * If P2.Bit6 -> activates the external compressed sample ROM (not radarscp1) | |
| 1324 | * If P2.Bit5 -> Signal ANSN ==> Grid enable (radarscp1) | |
| 1325 | 1325 | * If P2.Bit4 -> status code to main cpu |
| 1326 | 1326 | * P2.Bit2-0 -> select the 256 byte bank for external ROM |
| 1327 | 1327 | */ |
| r7356 | r7357 | |
| 1352 | 1352 | MACHINE_DRIVER_END |
| 1353 | 1353 | |
| 1354 | 1354 | |
| 1355 | MACHINE_DRIVER_START( radarsc1_audio ) | |
| 1355 | MACHINE_DRIVER_START( radarscp1_audio ) | |
| 1356 | 1356 | |
| 1357 | 1357 | MDRV_IMPORT_FROM( radarscp_audio ) |
| 1358 | 1358 | MDRV_CPU_MODIFY("soundcpu") |
| 1359 | MDRV_CPU_IO_MAP(radarsc1_sound_io_map) | |
| 1359 | MDRV_CPU_IO_MAP(radarscp1_sound_io_map) | |
| 1360 | 1360 | |
| 1361 | 1361 | /* virtual_p2 is not read -see memory map-, all bits are output bits */ |
| 1362 | 1362 | MDRV_LATCH8_ADD( "virtual_p1" ) /* virtual latch for port A */ |
| r0 | r7357 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | Taito Zoom ZSG-2 sound board | |
| 4 | Includes: MN10200 CPU, ZOOM ZSG-2 audio chip, TMS57002 DASP | |
| 5 | By Olivier Galibert. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | ***************************************************************************/ | |
| 11 | ||
| 12 | #include "emu.h" | |
| 13 | #include "cpu/mn10200/mn10200.h" | |
| 14 | #include "cpu/tms57002/tms57002.h" | |
| 15 | #include "audio/taito_zm.h" | |
| 16 | #include "sound/zsg2.h" | |
| 17 | ||
| 18 | static ADDRESS_MAP_START(taitozoom_map, ADDRESS_SPACE_PROGRAM, 16) | |
| 19 | AM_RANGE(0x080000, 0x0fffff) AM_ROM AM_REGION("mn10200", 0) | |
| 20 | AM_RANGE(0x400000, 0x40ffff) AM_RAM | |
| 21 | AM_RANGE(0x800000, 0x800fff) AM_DEVREADWRITE("zsg2", zsg2_r, zsg2_w) | |
| 22 | AM_RANGE(0xe00000, 0xe000ff) AM_RAM // main CPU comms? | |
| 23 | AM_RANGE(0xc00000, 0xc00001) AM_RAM // TMS57002 comms | |
| 24 | ADDRESS_MAP_END | |
| 25 | ||
| 26 | static UINT8 tms_ctrl; | |
| 27 | ||
| 28 | static READ8_HANDLER(tms_ctrl_r) | |
| 29 | { | |
| 30 | return tms_ctrl; | |
| 31 | } | |
| 32 | ||
| 33 | static WRITE8_HANDLER(tms_ctrl_w) | |
| 34 | { | |
| 35 | #if 0 | |
| 36 | tms57002_reset_w(data & 4); | |
| 37 | tms57002_cload_w(data & 2); | |
| 38 | tms57002_pload_w(data & 1); | |
| 39 | #endif | |
| 40 | ||
| 41 | tms_ctrl = data; | |
| 42 | } | |
| 43 | ||
| 44 | static ADDRESS_MAP_START(taitozoom_io_map, ADDRESS_SPACE_IO, 8) | |
| 45 | AM_RANGE(MN10200_PORT1, MN10200_PORT1) AM_READWRITE(tms_ctrl_r, tms_ctrl_w) | |
| 46 | ADDRESS_MAP_END | |
| 47 | ||
| 48 | static const zsg2_interface zsg2_taito_config = | |
| 49 | { | |
| 50 | "zsg2" /* sample region */ | |
| 51 | }; | |
| 52 | ||
| 53 | MACHINE_DRIVER_START( taito_zoom_sound ) | |
| 54 | MDRV_CPU_ADD("mn10200", MN10200, 25000000/2) | |
| 55 | MDRV_CPU_PROGRAM_MAP(taitozoom_map) | |
| 56 | MDRV_CPU_IO_MAP(taitozoom_io_map) | |
| 57 | ||
| 58 | // we assume the parent machine has created lspeaker/rspeaker | |
| 59 | MDRV_SOUND_ADD("zsg2", ZSG2, 25000000/2) | |
| 60 | MDRV_SOUND_CONFIG(zsg2_taito_config) | |
| 61 | MDRV_SOUND_ROUTE(0, "lspeaker", 1.0) | |
| 62 | MDRV_SOUND_ROUTE(1, "rspeaker", 1.0) | |
| 63 | MACHINE_DRIVER_END |
| r7356 | r7357 | |
|---|---|---|
| 12 | 12 | #include "cpu/m68000/m68000.h" |
| 13 | 13 | #include "machine/fd1094.h" |
| 14 | 14 | #include "machine/fddebug.h" |
| 15 | #include "includes/s | |
| 15 | #include "includes/s | |
| 16 | 16 | |
| 17 | 17 | |
| 18 | 18 | #define CACHE_ENTRIES 8 |
| r7356 | r7357 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | UINT64 *naomi_ram64; |
| 11 | 11 | int jvsboard_type; |
| 12 | UINT16 actel_id; | |
| 12 | 13 | |
| 13 | 14 | static READ64_HANDLER( naomi_bios_idle_skip_r ) |
| 14 | 15 | { |
| r7356 | r7357 | |
| 25 | 26 | { |
| 26 | 27 | memory_install_read64_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc2ad238, 0xc2ad23f, 0, 0, naomi_bios_idle_skip_r); // rev e bios |
| 27 | 28 | jvsboard_type = JVSBD_DEFAULT; |
| 29 | actel_id = 0xffff; | |
| 28 | 30 | } |
| 29 | 31 | |
| 30 | 32 | DRIVER_INIT(naomi_mp) |
| 31 | 33 | { |
| 32 | 34 | memory_install_read64_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc2ad238, 0xc2ad23f, 0, 0, naomi_bios_idle_skip_r); // rev e bios |
| 33 | 35 | jvsboard_type = JVSBD_MAHJONG; |
| 36 | actel_id = 0xffff; | |
| 34 | 37 | } |
| 35 | 38 | |
| 36 | 39 | static READ64_HANDLER( naomigd_ggxxsla_idle_skip_r ) |
| r7356 | r7357 | |
| 78 | 81 | memory_install_read64_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc18d6c8, 0xc18d6cf, 0, 0, naomigd_ggxxrl_idle_skip_r); |
| 79 | 82 | DRIVER_INIT_CALL(naomi); |
| 80 | 83 | } |
| 84 | ||
| 85 | DRIVER_INIT( qmegamis ) | |
| 86 | { | |
| 87 | DRIVER_INIT_CALL(naomi); | |
| 88 | actel_id = 0; //FIXME: correct value | |
| 89 | } | |
| 90 | ||
| 91 | DRIVER_INIT( mvsc2 ) | |
| 92 | { | |
| 93 | DRIVER_INIT_CALL(naomi); | |
| 94 | actel_id = 0; //FIXME: correct value | |
| 95 | } | |
| 96 | ||
| 97 | DRIVER_INIT( gram2000 ) | |
| 98 | { | |
| 99 | DRIVER_INIT_CALL(naomi); | |
| 100 | actel_id = 0; //FIXME: correct value | |
| 101 | } | |
| 102 | ||
| 103 | DRIVER_INIT( vf4evoct ) | |
| 104 | { | |
| 105 | // DRIVER_INIT_CALL(naomi2); | |
| 106 | actel_id = 0; //FIXME: correct value | |
| 107 | } |
| r7356 | r7357 | |
|---|---|---|
| 1570 | 1570 | state->type3_swap = TYPE3_SWAP_56; |
| 1571 | 1571 | } |
| 1572 | 1572 | |
| 1573 | MACHINE_RESET( cgraplp2 ) | |
| 1573 | MACHINE_RESET( cgraplop2 ) | |
| 1574 | 1574 | { |
| 1575 | 1575 | decocass_state *state = (decocass_state *)machine->driver_data; |
| 1576 | 1576 | decocass_reset_common(machine); |
| r7356 | r7357 | |
|---|---|---|
| 149 | 149 | extern MACHINE_RESET( cburnrub ); |
| 150 | 150 | extern MACHINE_RESET( cbtime ); |
| 151 | 151 | extern MACHINE_RESET( cgraplop ); |
| 152 | extern MACHINE_RESET( cgraplp2 ); | |
| 152 | extern MACHINE_RESET( cgraplop2 ); | |
| 153 | 153 | extern MACHINE_RESET( clapapa ); |
| 154 | 154 | extern MACHINE_RESET( cfghtice ); |
| 155 | 155 | extern MACHINE_RESET( cprobowl ); |
| r7356 | r7357 | |
|---|---|---|
| 1 | 1 | #include "emu.h" |
| 2 | #include "includes/system16.h" | |
| 3 | 2 | #include "includes/segas24.h" |
| 4 | 3 | |
| 5 | 4 | /* system24temp_ functions / variables are from shared rewrite files, |
| r7356 | r7357 | |
|---|---|---|
| 303 | 303 | maple0x86data2[pos+20]=8; // bits per channel |
| 304 | 304 | maple0x86data2[pos+21]=0; |
| 305 | 305 | //4 rotary |
| 306 | maple0x86data2[pos+22]=0; | |
| 306 | maple0x86data2[pos+22]=4; | |
| 307 | maple0x86data2[pos+23]=4; // channels | |
| 308 | maple0x86data2[pos+24]=8; // bits per channel | |
| 307 | 309 | //5 keyboard |
| 308 | 310 | //6 (touch?) screen |
| 309 | 311 | //7 card reader |
| r7356 | r7357 | |
| 617 | 619 | { |
| 618 | 620 | if (port > 0) |
| 619 | 621 | buff[0]=0xffffffff; |
| 622 | // printf("MAPLE: command %02x\n", command); | |
| 620 | 623 | switch (command) |
| 621 | 624 | { |
| 622 | 625 | case 1: |
| r7356 | r7357 | |
| 696 | 699 | jvs_address = (buff[1] >> 16) & 0xff; // slave address |
| 697 | 700 | jvs_command = buff[2] & 0xff; // jvs command |
| 698 | 701 | #if DEBUG_MAPLE |
| 699 | printf("MAPLE: sent jvs command %x\n", jvs_command); | |
| 702 | printf("MAPLE: sent jvs command %x to address %x\n", jvs_command, jvs_address); | |
| 700 | 703 | #endif |
| 701 | 704 | //buff[1] = 0xe4e3e2e1; |
| 702 | 705 | ddtdata.length = 0;//2; |
| r7356 | r7357 | |
|---|---|---|
| 8 | 8 | #include "segaic16.h" |
| 9 | 9 | #include "video/resnet.h" |
| 10 | 10 | #include "machine/fd1089.h" |
| 11 | #include "includes/s | |
| 11 | #include "includes/s | |
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | /************************************* |
| r7356 | r7357 | |
| 40 | 40 | }; |
| 41 | 41 | |
| 42 | 42 | |
| 43 | struct multiply_chip | |
| 44 | { | |
| 45 | UINT16 regs[4]; | |
| 46 | }; | |
| 47 | ||
| 48 | ||
| 49 | struct divide_chip | |
| 50 | { | |
| 51 | UINT16 regs[8]; | |
| 52 | }; | |
| 53 | ||
| 54 | ||
| 55 | struct compare_timer_chip | |
| 56 | { | |
| 57 | UINT16 regs[16]; | |
| 58 | UINT16 counter; | |
| 59 | UINT8 bit; | |
| 60 | void (*sound_w)(running_machine *, UINT8); | |
| 61 | void (*timer_ack)(running_machine *); | |
| 62 | }; | |
| 63 | ||
| 64 | ||
| 65 | ||
| 66 | 43 | /************************************* |
| 67 | 44 | * |
| 68 | 45 | * Statics |
| r7356 | r7357 | |
| 70 | 47 | *************************************/ |
| 71 | 48 | |
| 72 | 49 | static struct memory_mapper_chip memory_mapper; |
| 73 | static struct multiply_chip multiply[3]; | |
| 74 | static struct divide_chip divide[3]; | |
| 75 | static struct compare_timer_chip compare_timer[2]; | |
| 76 | 50 | |
| 77 | 51 | |
| 78 | ||
| 79 | 52 | /************************************* |
| 80 | 53 | * |
| 81 | 54 | * Prototypes |
| r7356 | r7357 | |
| 85 | 58 | static void update_memory_mapping(running_machine *machine, struct memory_mapper_chip *chip, int decrypt); |
| 86 | 59 | |
| 87 | 60 | |
| 88 | ||
| 89 | 61 | /************************************* |
| 90 | 62 | * |
| 91 | 63 | * Misc helpers |
| r7356 | r7357 | |
| 137 | 109 | |
| 138 | 110 | /* create the initial regions */ |
| 139 | 111 | update_memory_mapping(cpu->machine, chip, 0); |
| 112 | ||
| 113 | state_save_register_item_array(cpu->machine, "segaic16_mapper", NULL, 0, chip->regs); | |
| 140 | 114 | } |
| 141 | 115 | |
| 142 | ||
| 143 | 116 | void segaic16_memory_mapper_reset(running_machine *machine) |
| 144 | 117 | { |
| 145 | 118 | struct memory_mapper_chip *chip = &memory_mapper; |
| r7356 | r7357 | |
| 420 | 393 | } |
| 421 | 394 | |
| 422 | 395 | |
| 423 | ||
| 424 | 396 | /************************************* |
| 425 | 397 | * |
| 426 | * Multiply chip | |
| 398 | * Multiply chip - 315-5248 | |
| 427 | 399 | * |
| 428 | 400 | *************************************/ |
| 429 | 401 | |
| 430 | static UINT16 multiply_r(int which, offs_t offset, UINT16 mem_mask) | |
| 402 | typedef struct _ic_315_5248_state ic_315_5248_state ; | |
| 403 | struct _ic_315_5248_state | |
| 431 | 404 | { |
| 405 | UINT16 regs[4]; | |
| 406 | }; | |
| 407 | ||
| 408 | /***************************************************************************** | |
| 409 | INLINE FUNCTIONS | |
| 410 | *****************************************************************************/ | |
| 411 | ||
| 412 | INLINE ic_315_5248_state *_315_5248_get_safe_token( running_device *device ) | |
| 413 | { | |
| 414 | assert(device != NULL); | |
| 415 | assert(device->token != NULL); | |
| 416 | assert(device->type == _315_5248); | |
| 417 | ||
| 418 | return (ic_315_5248_state *)device->token; | |
| 419 | } | |
| 420 | ||
| 421 | /***************************************************************************** | |
| 422 | IMPLEMENTATION | |
| 423 | *****************************************************************************/ | |
| 424 | ||
| 425 | READ16_DEVICE_HANDLER ( segaic16_multiply_r ) | |
| 426 | { | |
| 427 | ic_315_5248_state *ic_315_5248 = _315_5248_get_safe_token(device); | |
| 428 | ||
| 432 | 429 | offset &= 3; |
| 433 | 430 | switch (offset) |
| 434 | 431 | { |
| 435 | case 0: return multiply[which].regs[0]; | |
| 436 | case 1: return multiply[which].regs[1]; | |
| 437 | case 2: return ((INT16)multiply[which].regs[0] * (INT16)multiply[which].regs[1]) >> 16; | |
| 438 | case 3: return ((INT16)multiply[which].regs[0] * (INT16)multiply[which].regs[1]) & 0xffff; | |
| 432 | case 0: return ic_315_5248->regs[0]; | |
| 433 | case 1: return ic_315_5248->regs[1]; | |
| 434 | case 2: return ((INT16)ic_315_5248->regs[0] * (INT16)ic_315_5248->regs[1]) >> 16; | |
| 435 | case 3: return ((INT16)ic_315_5248->regs[0] * (INT16)ic_315_5248->regs[1]) & 0xffff; | |
| 439 | 436 | } |
| 440 | 437 | return 0xffff; |
| 441 | 438 | } |
| 442 | 439 | |
| 443 | 440 | |
| 444 | s | |
| 441 | WRITE16_DEVICE_HANDLER( sega | |
| 445 | 442 | { |
| 443 | ic_315_5248_state *ic_315_5248 = _315_5248_get_safe_token(device); | |
| 444 | ||
| 446 | 445 | offset &= 3; |
| 447 | 446 | switch (offset) |
| 448 | 447 | { |
| 449 | case 0: COMBINE_DATA(&multiply[which].regs[0]); break; | |
| 450 | case 1: COMBINE_DATA(&multiply[which].regs[1]); break; | |
| 451 | case 2: COMBINE_DATA(&multiply[which].regs[0]); break; | |
| 452 | case 3: COMBINE_DATA(&multiply[which].regs[1]); break; | |
| 448 | case 0: COMBINE_DATA(&ic_315_5248->regs[0]); break; | |
| 449 | case 1: COMBINE_DATA(&ic_315_5248->regs[1]); break; | |
| 450 | case 2: COMBINE_DATA(&ic_315_5248->regs[0]); break; | |
| 451 | case 3: COMBINE_DATA(&ic_315_5248->regs[1]); break; | |
| 453 | 452 | } |
| 454 | 453 | } |
| 455 | 454 | |
| 455 | /***************************************************************************** | |
| 456 | DEVICE INTERFACE | |
| 457 | *****************************************************************************/ | |
| 456 | 458 | |
| 457 | READ16_HANDLER( segaic16_multiply_0_r ) { return multiply_r(0, offset, mem_mask); } | |
| 458 | READ16_HANDLER( segaic16_multiply_1_r ) { return multiply_r(1, offset, mem_mask); } | |
| 459 | READ16_HANDLER( segaic16_multiply_2_r ) { return multiply_r(2, offset, mem_mask); } | |
| 460 | WRITE16_HANDLER( segaic16_multiply_0_w ) { multiply_w(0, offset, data, mem_mask); } | |
| 461 | WRITE16_HANDLER( segaic16_multiply_1_w ) { multiply_w(1, offset, data, mem_mask); } | |
| 462 | WRITE16_HANDLER( segaic16_multiply_2_w ) { multiply_w(2, offset, data, mem_mask); } | |
| 459 | static DEVICE_START( ic_315_5248 ) | |
| 460 | { | |
| 461 | ic_315_5248_state *ic_315_5248 = _315_5248_get_safe_token(device); | |
| 463 | 462 | |
| 463 | state_save_register_device_item_array(device, 0, ic_315_5248->regs); | |
| 464 | } | |
| 464 | 465 | |
| 466 | static DEVICE_RESET( ic_315_5248 ) | |
| 467 | { | |
| 468 | ic_315_5248_state *ic_315_5248 = _315_5248_get_safe_token(device); | |
| 469 | int i; | |
| 465 | 470 | |
| 471 | for (i = 0; i < 4; i++) | |
| 472 | ic_315_5248->regs[i] = 0; | |
| 473 | } | |
| 474 | ||
| 466 | 475 | /************************************* |
| 467 | 476 | * |
| 468 | * Divide chip | |
| 477 | * Divide chip - 315-5249 | |
| 469 | 478 | * |
| 470 | 479 | *************************************/ |
| 471 | 480 | |
| 472 | static void update_divide(int which, int mode) | |
| 481 | typedef struct _ic_315_5249_state ic_315_5249_state ; | |
| 482 | struct _ic_315_5249_state | |
| 473 | 483 | { |
| 484 | UINT16 regs[8]; | |
| 485 | }; | |
| 486 | ||
| 487 | /***************************************************************************** | |
| 488 | INLINE FUNCTIONS | |
| 489 | *****************************************************************************/ | |
| 490 | ||
| 491 | INLINE ic_315_5249_state *_315_5249_get_safe_token( running_device *device ) | |
| 492 | { | |
| 493 | assert(device != NULL); | |
| 494 | assert(device->token != NULL); | |
| 495 | assert(device->type == _315_5249); | |
| 496 | ||
| 497 | return (ic_315_5249_state *)device->token; | |
| 498 | } | |
| 499 | ||
| 500 | /***************************************************************************** | |
| 501 | IMPLEMENTATION | |
| 502 | *****************************************************************************/ | |
| 503 | ||
| 504 | static void update_divide( running_device *device, int mode ) | |
| 505 | { | |
| 506 | ic_315_5249_state *ic_315_5249 = _315_5249_get_safe_token(device); | |
| 507 | ||
| 474 | 508 | /* clear the flags by default */ |
| 475 | | |
| 509 | | |
| 476 | 510 | |
| 477 | 511 | /* if mode 0, store quotient/remainder */ |
| 478 | 512 | if (mode == 0) |
| 479 | 513 | { |
| 480 | INT32 dividend = (INT32)((divide[which].regs[0] << 16) | divide[which].regs[1]); | |
| 481 | INT32 divisor = (INT16)divide[which].regs[2]; | |
| 514 | INT32 dividend = (INT32)((ic_315_5249->regs[0] << 16) | ic_315_5249->regs[1]); | |
| 515 | INT32 divisor = (INT16)ic_315_5249->regs[2]; | |
| 482 | 516 | INT32 quotient, remainder; |
| 483 | 517 | |
| 484 | 518 | /* perform signed divide */ |
| 485 | 519 | if (divisor == 0) |
| 486 | 520 | { |
| 487 | 521 | quotient = dividend;//((INT32)(dividend ^ divisor) < 0) ? 0x8000 : 0x7fff; |
| 488 | | |
| 522 | | |
| 489 | 523 | } |
| 490 | 524 | else |
| 491 | 525 | quotient = dividend / divisor; |
| 526 | ||
| 492 | 527 | remainder = dividend - quotient * divisor; |
| 493 | 528 | |
| 494 | 529 | /* clamp to 16-bit signed */ |
| 495 | 530 | if (quotient < -32768) |
| 496 | 531 | { |
| 497 | 532 | quotient = -32768; |
| 498 | | |
| 533 | | |
| 499 | 534 | } |
| 500 | 535 | else if (quotient > 32767) |
| 501 | 536 | { |
| 502 | 537 | quotient = 32767; |
| 503 | | |
| 538 | | |
| 504 | 539 | } |
| 505 | 540 | |
| 506 | 541 | /* store quotient and remainder */ |
| 507 | divide[which].regs[4] = quotient; | |
| 508 | divide[which].regs[5] = remainder; | |
| 542 | ic_315_5249->regs[4] = quotient; | |
| 543 | ic_315_5249->regs[5] = remainder; | |
| 509 | 544 | } |
| 510 | 545 | |
| 511 | 546 | /* if mode 1, store 32-bit quotient */ |
| 512 | 547 | else |
| 513 | 548 | { |
| 514 | UINT32 dividend = (UINT32)((divide[which].regs[0] << 16) | divide[which].regs[1]); | |
| 515 | UINT32 divisor = (UINT16)divide[which].regs[2]; | |
| 549 | UINT32 dividend = (UINT32)((ic_315_5249->regs[0] << 16) | ic_315_5249->regs[1]); | |
| 550 | UINT32 divisor = (UINT16)ic_315_5249->regs[2]; | |
| 516 | 551 | UINT32 quotient; |
| 517 | 552 | |
| 518 | 553 | /* perform unsigned divide */ |
| 519 | 554 | if (divisor == 0) |
| 520 | 555 | { |
| 521 | 556 | quotient = dividend;//0x7fffffff; |
| 522 | | |
| 557 | | |
| 523 | 558 | } |
| 524 | 559 | else |
| 525 | 560 | quotient = dividend / divisor; |
| 526 | 561 | |
| 527 | 562 | /* store 32-bit quotient */ |
| 528 | divide[which].regs[4] = quotient >> 16; | |
| 529 | divide[which].regs[5] = quotient & 0xffff; | |
| 563 | ic_315_5249->regs[4] = quotient >> 16; | |
| 564 | ic_315_5249->regs[5] = quotient & 0xffff; | |
| 530 | 565 | } |
| 531 | 566 | } |
| 532 | 567 | |
| 533 | s | |
| 568 | READ16_DEVICE_HANDLER ( sega | |
| 534 | 569 | { |
| 570 | ic_315_5249_state *ic_315_5249 = _315_5249_get_safe_token(device); | |
| 571 | ||
| 535 | 572 | /* 8 effective read registers */ |
| 536 | 573 | offset &= 7; |
| 537 | 574 | switch (offset) |
| 538 | 575 | { |
| 539 | case 0: return divide[which].regs[0]; /* dividend high */ | |
| 540 | case 1: return divide[which].regs[1]; /* dividend low */ | |
| 541 | case 2: return divide[which].regs[2]; /* divisor */ | |
| 542 | case 4: return divide[which].regs[4]; /* quotient (mode 0) or quotient high (mode 1) */ | |
| 543 | case 5: return divide[which].regs[5]; /* remainder (mode 0) or quotient low (mode 1) */ | |
| 544 | case 6: return divide[which].regs[6]; /* flags */ | |
| 576 | case 0: return ic_315_5249->regs[0]; /* dividend high */ | |
| 577 | case 1: return ic_315_5249->regs[1]; /* dividend low */ | |
| 578 | case 2: return ic_315_5249->regs[2]; /* divisor */ | |
| 579 | case 4: return ic_315_5249->regs[4]; /* quotient (mode 0) or quotient high (mode 1) */ | |
| 580 | case 5: return ic_315_5249->regs[5]; /* remainder (mode 0) or quotient low (mode 1) */ | |
| 581 | case 6: return ic_315_5249->regs[6]; /* flags */ | |
| 545 | 582 | } |
| 583 | ||
| 546 | 584 | return 0xffff; |
| 547 | 585 | } |
| 548 | 586 | |
| 549 | 587 | |
| 550 | ||
| 588 | WRITE16 | |
| 551 | 589 | { |
| 590 | ic_315_5249_state *ic_315_5249 = _315_5249_get_safe_token(device); | |
| 552 | 591 | int a4 = offset & 8; |
| 553 | 592 | int a3 = offset & 4; |
| 554 | 593 | |
| 555 | if (LOG_DIVIDE) logerror(" | |
| 594 | if (LOG_DIVIDE) logerror(" | |
| 556 | 595 | |
| 557 | 596 | /* only 4 effective write registers */ |
| 558 | 597 | offset &= 3; |
| 559 | 598 | switch (offset) |
| 560 | 599 | { |
| 561 | case 0: COMBINE_DATA(÷[which].regs[0]); break; /* dividend high */ | |
| 562 | case 1: COMBINE_DATA(÷[which].regs[1]); break; /* dividend low */ | |
| 563 | case 2: COMBINE_DATA(÷[which].regs[2]); break; /* divisor/trigger */ | |
| 600 | case 0: COMBINE_DATA(&ic_315_5249->regs[0]); break; /* dividend high */ | |
| 601 | case 1: COMBINE_DATA(&ic_315_5249->regs[1]); break; /* dividend low */ | |
| 602 | case 2: COMBINE_DATA(&ic_315_5249->regs[2]); break; /* divisor/trigger */ | |
| 564 | 603 | case 3: break; |
| 565 | 604 | } |
| 566 | 605 | |
| 567 | 606 | /* if a4 line is high, divide, using a3 as the mode */ |
| 568 | if (a4) update_divide( | |
| 607 | if (a4) update_divide(device, a3); | |
| 569 | 608 | } |
| 570 | 609 | |
| 610 | /***************************************************************************** | |
| 611 | DEVICE INTERFACE | |
| 612 | *****************************************************************************/ | |
| 571 | 613 | |
| 572 | READ16_HANDLER( segaic16_divide_0_r ) { return divide_r(0, offset, mem_mask); } | |
| 573 | READ16_HANDLER( segaic16_divide_1_r ) { return divide_r(1, offset, mem_mask); } | |
| 574 | READ16_HANDLER( segaic16_divide_2_r ) { return divide_r(2, offset, mem_mask); } | |
| 575 | WRITE16_HANDLER( segaic16_divide_0_w ) { divide_w(space, 0, offset, data, mem_mask); } | |
| 576 | WRITE16_HANDLER( segaic16_divide_1_w ) { divide_w(space, 1, offset, data, mem_mask); } | |
| 577 | WRITE16_HANDLER( segaic16_divide_2_w ) { divide_w(space, 2, offset, data, mem_mask); } | |
| 614 | static DEVICE_START( ic_315_5249 ) | |
| 615 | { | |
| 616 | ic_315_5249_state *ic_315_5249 = _315_5249_get_safe_token(device); | |
| 578 | 617 | |
| 618 | state_save_register_device_item_array(device, 0, ic_315_5249->regs); | |
| 619 | } | |
| 579 | 620 | |
| 621 | static DEVICE_RESET( ic_315_5249 ) | |
| 622 | { | |
| 623 | ic_315_5249_state *ic_315_5249 = _315_5249_get_safe_token(device); | |
| 624 | int i; | |
| 580 | 625 | |
| 626 | for (i = 0; i < 8; i++) | |
| 627 | ic_315_5249->regs[i] = 0; | |
| 628 | } | |
| 629 | ||
| 581 | 630 | /************************************* |
| 582 | 631 | * |
| 583 | * Compare/timer chip | |
| 632 | * Compare/timer chip - 315-5250 | |
| 584 | 633 | * |
| 585 | 634 | *************************************/ |
| 586 | 635 | |
| 587 | void segaic16_compare_timer_init(int which, void (*sound_write_callback)(running_machine *, UINT8), void (*timer_ack_callback)(running_machine *)) | |
| 636 | typedef struct _ic_315_5250_state ic_315_5250_state ; | |
| 637 | struct _ic_315_5250_state | |
| 588 | 638 | { |
| 589 | memset(&compare_timer[which], 0, sizeof(compare_timer[which])); | |
| 590 | compare_timer[which].sound_w = sound_write_callback; | |
| 591 | compare_timer[which].timer_ack = timer_ack_callback; | |
| 639 | UINT16 regs[16]; | |
| 640 | UINT16 counter; | |
| 641 | UINT8 bit; | |
| 642 | _315_5250_sound_callback sound_w; | |
| 643 | _315_5250_timer_ack_callback timer_ack; | |
| 644 | }; | |
| 645 | ||
| 646 | /***************************************************************************** | |
| 647 | INLINE FUNCTIONS | |
| 648 | *****************************************************************************/ | |
| 649 | ||
| 650 | INLINE ic_315_5250_state *_315_5250_get_safe_token( running_device *device ) | |
| 651 | { | |
| 652 | assert(device != NULL); | |
| 653 | assert(device->token != NULL); | |
| 654 | assert(device->type == _315_5250); | |
| 655 | ||
| 656 | return (ic_315_5250_state *)device->token; | |
| 592 | 657 | } |
| 593 | 658 | |
| 659 | INLINE const ic_315_5250_interface *_315_5250_get_interface( running_device *device ) | |
| 660 | { | |
| 661 | assert(device != NULL); | |
| 662 | assert((device->type == _315_5250)); | |
| 663 | return (const ic_315_5250_interface *) device->baseconfig().static_config; | |
| 664 | } | |
| 594 | 665 | |
| 595 | int segaic16_compare_timer_clock(int which) | |
| 666 | /***************************************************************************** | |
| 667 | IMPLEMENTATION | |
| 668 | *****************************************************************************/ | |
| 669 | ||
| 670 | int segaic16_compare_timer_clock( running_device *device ) | |
| 596 | 671 | { |
| 597 | int old_counter = compare_timer[which].counter; | |
| 672 | ic_315_5250_state *ic_315_5250 = _315_5250_get_safe_token(device); | |
| 673 | int old_counter = ic_315_5250->counter; | |
| 598 | 674 | int result = 0; |
| 599 | 675 | |
| 600 | 676 | /* if we're enabled, clock the upcounter */ |
| 601 | if (compare_timer[which].regs[10] & 1) | |
| 602 | compare_timer[which].counter++; | |
| 677 | if (ic_315_5250->regs[10] & 1) | |
| 678 | ic_315_5250->counter++; | |
| 603 | 679 | |
| 604 | 680 | /* regardless of the enable, a value of 0xfff will generate the IRQ */ |
| 605 | 681 | if (old_counter == 0xfff) |
| 606 | 682 | { |
| 607 | 683 | result = 1; |
| 608 | c | |
| 684 | ic | |
| 609 | 685 | } |
| 610 | 686 | return result; |
| 611 | 687 | } |
| 612 | 688 | |
| 613 | 689 | |
| 614 | static void update_compare(in | |
| 690 | static void update_compare( running_device *device, int update_history ) | |
| 615 | 691 | { |
| 616 | int bound1 = (INT16)compare_timer[which].regs[0]; | |
| 617 | int bound2 = (INT16)compare_timer[which].regs[1]; | |
| 618 | int value = (INT16)compare_timer[which].regs[2]; | |
| 692 | ic_315_5250_state *ic_315_5250 = _315_5250_get_safe_token(device); | |
| 693 | int bound1 = (INT16)ic_315_5250->regs[0]; | |
| 694 | int bound2 = (INT16)ic_315_5250->regs[1]; | |
| 695 | int value = (INT16)ic_315_5250->regs[2]; | |
| 619 | 696 | int min = (bound1 < bound2) ? bound1 : bound2; |
| 620 | 697 | int max = (bound1 > bound2) ? bound1 : bound2; |
| 621 | 698 | |
| 622 | 699 | if (value < min) |
| 623 | 700 | { |
| 624 | compare_timer[which].regs[7] = min; | |
| 625 | compare_timer[which].regs[3] = 0x8000; | |
| 701 | ic_315_5250->regs[7] = min; | |
| 702 | ic_315_5250->regs[3] = 0x8000; | |
| 626 | 703 | } |
| 627 | 704 | else if (value > max) |
| 628 | 705 | { |
| 629 | compare_timer[which].regs[7] = max; | |
| 630 | compare_timer[which].regs[3] = 0x4000; | |
| 706 | ic_315_5250->regs[7] = max; | |
| 707 | ic_315_5250->regs[3] = 0x4000; | |
| 631 | 708 | } |
| 632 | 709 | else |
| 633 | 710 | { |
| 634 | compare_timer[which].regs[7] = value; | |
| 635 | compare_timer[which].regs[3] = 0x0000; | |
| 711 | ic_315_5250->regs[7] = value; | |
| 712 | ic_315_5250->regs[3] = 0x0000; | |
| 636 | 713 | } |
| 637 | 714 | |
| 638 | 715 | if (update_history) |
| 639 | c | |
| 716 | ic | |
| 640 | 717 | } |
| 641 | 718 | |
| 642 | 719 | |
| 643 | static void timer_interrupt_ack(running_ | |
| 720 | static void timer_interrupt_ack( running_dev | |
| 644 | 721 | { |
| 645 | if (compare_timer[which].timer_ack) | |
| 646 | (*compare_timer[which].timer_ack)(machine); | |
| 722 | ic_315_5250_state *ic_315_5250 = _315_5250_get_safe_token(device); | |
| 723 | ||
| 724 | if (ic_315_5250->timer_ack) | |
| 725 | (*ic_315_5250->timer_ack)(device->machine); | |
| 647 | 726 | } |
| 648 | 727 | |
| 649 | 728 | |
| 650 | s | |
| 729 | READ16_DEVICE_HANDLER ( sega | |
| 651 | 730 | { |
| 731 | ic_315_5250_state *ic_315_5250 = _315_5250_get_safe_token(device); | |
| 732 | ||
| 652 | 733 | offset &= 0xf; |
| 653 | if (LOG_COMPARE) logerror(" | |
| 734 | if (LOG_COMPARE) logerror(" | |
| 654 | 735 | switch (offset) |
| 655 | 736 | { |
| 656 | case 0x0: return compare_timer[which].regs[0]; | |
| 657 | case 0x1: return compare_timer[which].regs[1]; | |
| 658 | case 0x2: return compare_timer[which].regs[2]; | |
| 659 | case 0x3: return compare_timer[which].regs[3]; | |
| 660 | case 0x4: return compare_timer[which].regs[4]; | |
| 661 | case 0x5: return compare_timer[which].regs[1]; | |
| 662 | case 0x6: return compare_timer[which].regs[2]; | |
| 663 | case 0x7: return compare_timer[which].regs[7]; | |
| 737 | case 0x0: return ic_315_5250->regs[0]; | |
| 738 | case 0x1: return ic_315_5250->regs[1]; | |
| 739 | case 0x2: return ic_315_5250->regs[2]; | |
| 740 | case 0x3: return ic_315_5250->regs[3]; | |
| 741 | case 0x4: return ic_315_5250->regs[4]; | |
| 742 | case 0x5: return ic_315_5250->regs[1]; | |
| 743 | case 0x6: return ic_315_5250->regs[2]; | |
| 744 | case 0x7: return ic_315_5250->regs[7]; | |
| 664 | 745 | case 0x9: |
| 665 | case 0xd: timer_interrupt_ack( | |
| 746 | case 0xd: timer_interrupt_ack(d | |
| 666 | 747 | } |
| 667 | 748 | return 0xffff; |
| 668 | 749 | } |
| 669 | 750 | |
| 670 | 751 | |
| 671 | s | |
| 752 | WRITE16_DEVICE_HANDLER ( sega | |
| 672 | 753 | { |
| 754 | ic_315_5250_state *ic_315_5250 = _315_5250_get_safe_token(device); | |
| 755 | ||
| 673 | 756 | offset &= 0xf; |
| 674 | if (LOG_COMPARE) logerror(" | |
| 757 | if (LOG_COMPARE) logerror(" | |
| 675 | 758 | switch (offset) |
| 676 | 759 | { |
| 677 | case 0x0: COMBINE_DATA(&compare_timer[which].regs[0]); update_compare(which, 0); break; | |
| 678 | case 0x1: COMBINE_DATA(&compare_timer[which].regs[1]); update_compare(which, 0); break; | |
| 679 | case 0x2: COMBINE_DATA(&compare_timer[which].regs[2]); update_compare(which, 1); break; | |
| 680 | case 0x4: compare_timer[which].regs[4] = 0; compare_timer[which].bit = 0; break; | |
| 681 | case 0x6: COMBINE_DATA(&compare_timer[which].regs[2]); update_compare(which, 0); break; | |
| 760 | case 0x0: COMBINE_DATA(&ic_315_5250->regs[0]); update_compare(device, 0); break; | |
| 761 | case 0x1: COMBINE_DATA(&ic_315_5250->regs[1]); update_compare(device, 0); break; | |
| 762 | case 0x2: COMBINE_DATA(&ic_315_5250->regs[2]); update_compare(device, 1); break; | |
| 763 | case 0x4: ic_315_5250->regs[4] = 0; ic_315_5250->bit = 0; break; | |
| 764 | case 0x6: COMBINE_DATA(&ic_315_5250->regs[2]); update_compare(device, 0); break; | |
| 682 | 765 | case 0x8: |
| 683 | case 0xc: COMBINE_DATA(& | |
| 766 | case 0xc: COMBINE_DATA(& | |
| 684 | 767 | case 0x9: |
| 685 | case 0xd: timer_interrupt_ack( | |
| 768 | case 0xd: timer_interrupt_ack(d | |
| 686 | 769 | case 0xa: |
| 687 | case 0xe: COMBINE_DATA(& | |
| 770 | case 0xe: COMBINE_DATA(& | |
| 688 | 771 | case 0xb: |
| 689 | 772 | case 0xf: |
| 690 | COMBINE_DATA(&compare_timer[which].regs[11]); | |
| 691 | if (compare_timer[which].sound_w) | |
| 692 | (*compare_timer[which].sound_w)(space->machine, compare_timer[which].regs[11]); | |
| 773 | COMBINE_DATA(&ic_315_5250->regs[11]); | |
| 774 | if (ic_315_5250->sound_w) | |
| 775 | (*ic_315_5250->sound_w)(device->machine, ic_315_5250->regs[11]); | |
| 693 | 776 | break; |
| 694 | 777 | } |
| 695 | 778 | } |
| 696 | 779 | |
| 780 | /***************************************************************************** | |
| 781 | DEVICE INTERFACE | |
| 782 | *****************************************************************************/ | |
| 697 | 783 | |
| 698 | READ16_HANDLER( segaic16_compare_timer_0_r ) { return compare_timer_r(space, 0, offset, mem_mask); } | |
| 699 | READ16_HANDLER( segaic16_compare_timer_1_r ) { return compare_timer_r(space, 1, offset, mem_mask); } | |
| 700 | WRITE16_HANDLER( segaic16_compare_timer_0_w ) { compare_timer_w(space, 0, offset, data, mem_mask); } | |
| 701 | WRITE16_HANDLER( segaic16_compare_timer_1_w ) { compare_timer_w(space, 1, offset, data, mem_mask); } | |
| 784 | static DEVICE_START( ic_315_5250 ) | |
| 785 | { | |
| 786 | ic_315_5250_state *ic_315_5250 = _315_5250_get_safe_token(device); | |
| 787 | const ic_315_5250_interface *intf = _315_5250_get_interface(device); | |
| 788 | ||
| 789 | ic_315_5250->sound_w = intf->sound_write_callback; | |
| 790 | ic_315_5250->timer_ack = intf->timer_ack_callback; | |
| 791 | ||
| 792 | state_save_register_device_item(device, 0, ic_315_5250->counter); | |
| 793 | state_save_register_device_item(device, 0, ic_315_5250->bit); | |
| 794 | state_save_register_device_item_array(device, 0, ic_315_5250->regs); | |
| 795 | } | |
| 796 | ||
| 797 | static DEVICE_RESET( ic_315_5250 ) | |
| 798 | { | |
| 799 | ic_315_5250_state *ic_315_5250 = _315_5250_get_safe_token(device); | |
| 800 | ||
| 801 | memset(&ic_315_5250, 0, sizeof(ic_315_5250)); | |
| 802 | } | |
| 803 | ||
| 804 | ||
| 805 | ||
| 806 | DEVICE_GET_INFO( ic_315_5248 ) | |
| 807 | { | |
| 808 | switch (state) | |
| 809 | { | |
| 810 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 811 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(ic_315_5248_state); break; | |
| 812 | case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_VIDEO; break; | |
| 813 | ||
| 814 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 815 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(ic_315_5248); break; | |
| 816 | case DEVINFO_FCT_STOP: /* Nothing */ break; | |
| 817 | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ic_315_5248); break; | |
| 818 | ||
| 819 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 820 | case DEVINFO_STR_NAME: strcpy(info->s, "Sega 315-5248"); break; | |
| 821 | case DEVINFO_STR_FAMILY: strcpy(info->s, "Sega Custom IC"); break; | |
| 822 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; | |
| 823 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; | |
| 824 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright MAME Team"); break; | |
| 825 | } | |
| 826 | } | |
| 827 | ||
| 828 | DEVICE_GET_INFO( ic_315_5249 ) | |
| 829 | { | |
| 830 | switch (state) | |
| 831 | { | |
| 832 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 833 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(ic_315_5249_state); break; | |
| 834 | case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_VIDEO; break; | |
| 835 | ||
| 836 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 837 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(ic_315_5249); break; | |
| 838 | case DEVINFO_FCT_STOP: /* Nothing */ break; | |
| 839 | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ic_315_5249); break; | |
| 840 | ||
| 841 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 842 | case DEVINFO_STR_NAME: strcpy(info->s, "Sega 315-5249"); break; | |
| 843 | case DEVINFO_STR_FAMILY: strcpy(info->s, "Sega Custom IC"); break; | |
| 844 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; | |
| 845 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; | |
| 846 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright MAME Team"); break; | |
| 847 | } | |
| 848 | } | |
| 849 | ||
| 850 | DEVICE_GET_INFO( ic_315_5250 ) | |
| 851 | { | |
| 852 | switch (state) | |
| 853 | { | |
| 854 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 855 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(ic_315_5250_state); break; | |
| 856 | case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_VIDEO; break; | |
| 857 | ||
| 858 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 859 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(ic_315_5250); break; | |
| 860 | case DEVINFO_FCT_STOP: /* Nothing */ break; | |
| 861 | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ic_315_5250); break; | |
| 862 | ||
| 863 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 864 | case DEVINFO_STR_NAME: strcpy(info->s, "Sega 315-5250"); break; | |
| 865 | case DEVINFO_STR_FAMILY: strcpy(info->s, "Sega Custom IC"); break; | |
| 866 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; | |
| 867 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; | |
| 868 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright MAME Team"); break; | |
| 869 | } | |
| 870 | } |
| r7356 | r7357 | |
|---|---|---|
| 33 | 33 | READ16_HANDLER( segaic16_memory_mapper_lsb_r ); |
| 34 | 34 | WRITE16_HANDLER( segaic16_memory_mapper_lsb_w ); |
| 35 | 35 | |
| 36 | /*** Sega 16-bit Devices ***/ | |
| 37 | ||
| 38 | #include "devcb.h" | |
| 39 | ||
| 40 | /*************************************************************************** | |
| 41 | TYPE DEFINITIONS | |
| 42 | ***************************************************************************/ | |
| 43 | ||
| 44 | typedef void (*_315_5250_sound_callback)(running_machine *, UINT8); | |
| 45 | typedef void (*_315_5250_timer_ack_callback)(running_machine *); | |
| 46 | ||
| 47 | typedef struct _ic_315_5250_interface ic_315_5250_interface; | |
| 48 | struct _ic_315_5250_interface | |
| 49 | { | |
| 50 | _315_5250_sound_callback sound_write_callback; | |
| 51 | _315_5250_timer_ack_callback timer_ack_callback; | |
| 52 | }; | |
| 53 | ||
| 54 | ||
| 55 | /*************************************************************************** | |
| 56 | FUNCTION PROTOTYPES | |
| 57 | ***************************************************************************/ | |
| 58 | ||
| 59 | DEVICE_GET_INFO( ic_315_5248 ); | |
| 60 | DEVICE_GET_INFO( ic_315_5249 ); | |
| 61 | DEVICE_GET_INFO( ic_315_5250 ); | |
| 62 | ||
| 63 | /*************************************************************************** | |
| 64 | DEVICE CONFIGURATION MACROS | |
| 65 | ***************************************************************************/ | |
| 66 | ||
| 67 | #define _315_5248 DEVICE_GET_INFO_NAME( ic_315_5248 ) | |
| 68 | ||
| 69 | #define MDRV_315_5248_ADD(_tag) \ | |
| 70 | MDRV_DEVICE_ADD(_tag, _315_5248, 0) | |
| 71 | ||
| 72 | #define _315_5249 DEVICE_GET_INFO_NAME( ic_315_5249 ) | |
| 73 | ||
| 74 | #define MDRV_315_5249_ADD(_tag) \ | |
| 75 | MDRV_DEVICE_ADD(_tag, _315_5249, 0) | |
| 76 | ||
| 77 | #define _315_5250 DEVICE_GET_INFO_NAME( ic_315_5250 ) | |
| 78 | ||
| 79 | #define MDRV_315_5250_ADD(_tag, _interface) \ | |
| 80 | MDRV_DEVICE_ADD(_tag, _315_5250, 0) \ | |
| 81 | MDRV_DEVICE_CONFIG(_interface) | |
| 82 | ||
| 83 | ||
| 84 | /*************************************************************************** | |
| 85 | DEVICE I/O FUNCTIONS | |
| 86 | ***************************************************************************/ | |
| 87 | ||
| 36 | 88 | /* multiply chip */ |
| 37 | READ16_HANDLER( segaic16_multiply_0_r ); | |
| 38 | READ16_HANDLER( segaic16_multiply_1_r ); | |
| 39 | READ16_HANDLER( segaic16_multiply_2_r ); | |
| 40 | WRITE16_HANDLER( segaic16_multiply_0_w ); | |
| 41 | WRITE16_HANDLER( segaic16_multiply_1_w ); | |
| 42 | WRITE16_HANDLER( segaic16_multiply_2_w ); | |
| 89 | READ16_DEVICE_HANDLER( segaic16_multiply_r ); | |
| 90 | WRITE16_DEVICE_HANDLER( segaic16_multiply_w ); | |
| 43 | 91 | |
| 44 | 92 | /* divide chip */ |
| 45 | READ16_HANDLER( segaic16_divide_0_r ); | |
| 46 | READ16_HANDLER( segaic16_divide_1_r ); | |
| 47 | READ16_HANDLER( segaic16_divide_2_r ); | |
| 48 | WRITE16_HANDLER( segaic16_divide_0_w ); | |
| 49 | WRITE16_HANDLER( segaic16_divide_1_w ); | |
| 50 | WRITE16_HANDLER( segaic16_divide_2_w ); | |
| 93 | READ16_DEVICE_HANDLER( segaic16_divide_r ); | |
| 94 | WRITE16_DEVICE_HANDLER( segaic16_divide_w ); | |
| 51 | 95 | |
| 52 | 96 | /* compare/timer chip */ |
| 53 | void segaic16_compare_timer_init(int which, void (*sound_write_callback)(running_machine *, UINT8), void (*timer_ack_callback)(running_machine *)); | |
| 54 | int segaic16_compare_timer_clock(int which); | |
| 55 | READ16_HANDLER( segaic16_compare_timer_0_r ); | |
| 56 | READ16_HANDLER( segaic16_compare_timer_1_r ); | |
| 57 | WRITE16_HANDLER( segaic16_compare_timer_0_w ); | |
| 58 | WRITE16_HANDLER( segaic16_compare_timer_1_w ); | |
| 59 | ||
| 97 | int segaic16_compare_timer_clock( running_device *device ); | |
| 98 | READ16_DEVICE_HANDLER( segaic16_compare_timer_r ); | |
| 99 | WRITE16_DEVICE_HANDLER( segaic16_compare_timer_w ); |
| r7356 | r7357 | |
|---|---|---|
| 1589 | 1589 | else if (snes_cart.mode & 5) /* Mode 20 & 22 */ |
| 1590 | 1590 | { |
| 1591 | 1591 | if ((address < 0x8000) && (snes_cart.mode == SNES_MODE_20)) //FIXME: check this |
| 1592 | { | |
| 1592 | { | |
| 1593 | 1593 | value = 0xff; /* Reserved */ |
| 1594 | //value = snes_ram[0x200000 + ((offset & ~0x8000) | 0x8000)]; | |
| 1594 | //value = snes_ram[0x200000 + ((offset & ~0x8000) | 0x8000)]; // is this hack still needed? /* Reserved */ | |
| 1595 | 1595 | } |
| 1596 | 1596 | else |
| 1597 | 1597 | value = snes_ram[0x400000 + offset]; |
| r7356 | r7357 | |
|---|---|---|
| 458 | 458 | |
| 459 | 459 | return ret; |
| 460 | 460 | } |
| 461 | else if ((offset == 2) && ACCESSING_BITS_32_63) | |
| 462 | { | |
| 463 | // Actel FPGA ID, used on some games for a "special" ROM test. | |
| 464 | ||
| 465 | return (UINT64)actel_id << 32; | |
| 466 | } | |
| 461 | 467 | else if ((offset == 7) && ACCESSING_BITS_32_47) |
| 462 | 468 | { |
| 463 | 469 | // 5f703c |
| r7356 | r7357 | |
|---|---|---|
| 51 | 51 | cclimber_decode(machine, convtable); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | void cclimbrj_decode(running_machine *machine) | |
| 54 | void cclimberj_decode(running_machine *machine) | |
| 55 | 55 | { |
| 56 | 56 | static const UINT8 convtable[8][16] = |
| 57 | 57 | { |
| r7356 | r7357 | |
| 68 | 68 | cclimber_decode(machine, convtable); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | DRIVER_INIT( cclimbrj ) | |
| 71 | DRIVER_INIT( cclimberj ) | |
| 72 | 72 | { |
| 73 | cclimbrj_decode(machine); | |
| 73 | cclimberj_decode(machine); | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | void mshuttle_decode(running_machine *machine) |
| r7356 | r7357 | |
|---|---|---|
| 372 | 372 | DRIVER( cannonb2 ) /* (c) 1985 TV Game Gruenberg */ |
| 373 | 373 | DRIVER( cannonb3 ) /* (c) 1985 Soft */ |
| 374 | 374 | DRIVER( ckongb ) /* bootleg */ |
| 375 | DRIVER( bagmanf ) /* bootleg on Falcon FCK-00 (Falcon Crazy Kong) PCB */ | |
| 375 | 376 | |
| 376 | 377 | /* Nichibutsu games */ |
| 377 | 378 | DRIVER( gomoku ) /* (c) 1981 */ |
| r7356 | r7357 | |
| 1209 | 1210 | DRIVER( sblast2b ) /* bootleg */ |
| 1210 | 1211 | DRIVER( iron ) /* bootleg */ |
| 1211 | 1212 | DRIVER( endless ) /* bootleg */ |
| 1213 | DRIVER( denseib ) /* bootleg */ | |
| 1212 | 1214 | |
| 1215 | ||
| 1213 | 1216 | /* Midway 8080 b/w games */ |
| 1214 | 1217 | DRIVER( seawolf ) /* 596 [1976] */ |
| 1215 | 1218 | DRIVER( gunfight ) /* 597 [1975] */ |
| r7356 | r7357 | |
| 1437 | 1440 | DRIVER( minigolf2 ) /* (c) 1985 */ |
| 1438 | 1441 | DRIVER( toggle ) /* (c) 1985 */ |
| 1439 | 1442 | DRIVER( nametune ) /* (c) 1986 */ |
| 1443 | DRIVER( nametune2 ) /* (c) 1986 */ | |
| 1440 | 1444 | DRIVER( nstocker ) /* (c) 1986 */ |
| 1441 | 1445 | DRIVER( nstocker2 ) /* (c) 1986 */ |
| 1442 | 1446 | DRIVER( sfootbal ) /* (c) 1986 */ |
| r7356 | r7357 | |
| 2247 | 2251 | DRIVER( outzonea ) /* TP-O18 (c) 1990 Toaplan */ |
| 2248 | 2252 | DRIVER( outzoneb ) /* TP-O18 (c) 1990 Toaplan */ |
| 2249 | 2253 | DRIVER( outzonec ) /* TP-O18 (c) 1990 Toaplan */ |
| 2254 | DRIVER( outzoned ) /* TP-O18 (c) 1990 Toaplan */ | |
| 2250 | 2255 | DRIVER( vimana ) /* TP-O19 (c) 1991 Toaplan (+ Tecmo license when set to Japan) */ |
| 2251 | 2256 | DRIVER( vimana1 ) /* TP-O19 (c) 1991 Toaplan (+ Tecmo license when set to Japan) */ |
| 2252 | 2257 | DRIVER( vimanan ) /* TP-O19 (c) 1991 Toaplan (+ Nova Apparate GMBH & Co license) */ |
| r7356 | r7357 | |
| 2487 | 2492 | DRIVER( gnga ) /* 9/1985 (c) 1985 */ |
| 2488 | 2493 | DRIVER( gngbl ) /* bootleg */ |
| 2489 | 2494 | DRIVER( gngblita ) /* bootleg */ |
| 2495 | DRIVER( gngc ) /* 9/1985 (c) 1985 */ | |
| 2490 | 2496 | DRIVER( gngt ) /* 9/1985 (c) 1985 */ |
| 2491 | 2497 | DRIVER( makaimur ) /* 9/1985 (c) 1985 */ |
| 2492 | 2498 | DRIVER( makaimurc ) /* 9/1985 (c) 1985 */ |
| r7356 | r7357 | |
| 2696 | 2702 | DRIVER( qad ) /* 01/07/1992 (c) 1992 (US) */ |
| 2697 | 2703 | DRIVER( qadj ) /* 21/09/1994 (c) 1994 (Japan) */ |
| 2698 | 2704 | DRIVER( qtono2 ) /* 23/01/1995 (c) 1995 (Japan) */ |
| 2699 | DRIVER( pang3 ) /* 11/05/1995 (c) 1995 Mitchell (Euro) not listed on Capcom's site */ | |
| 2705 | DRIVER( pang3 ) /* 01/06/1995 (c) 1995 Mitchell (Euro) not listed on Capcom's site */ | |
| 2706 | DRIVER( pang3n ) /* 11/05/1995 (c) 1995 Mitchell (Euro) not listed on Capcom's site */ | |
| 2700 | 2707 | DRIVER( pang3j ) /* 11/05/1995 (c) 1995 Mitchell (Japan) not listed on Capcom's site */ |
| 2701 | 2708 | DRIVER( megaman ) /* 06/10/1995 (c) 1995 (Asia) */ |
| 2702 | 2709 | DRIVER( rockmanj ) /* 22/09/1995 (c) 1995 (Japan) */ |
| r7356 | r7357 | |
| 3029 | 3036 | DRIVER( glpracr3 ) /* Gallop Racer 3 (JAPAN) */ |
| 3030 | 3037 | DRIVER( flamegun ) /* Flame Gunner (USA) */ |
| 3031 | 3038 | DRIVER( flamegunj ) /* Flame Gunner (JAPAN) */ |
| 3039 | DRIVER( lpadv ) /* Logic Pro Adventure (JAPAN) */ | |
| 3032 | 3040 | DRIVER( tblkkuzu ) /* The Block Kuzushi (JAPAN) */ |
| 3033 | 3041 | DRIVER( 1on1gov ) /* 1 on 1 Government (JAPAN) */ |
| 3034 | 3042 | DRIVER( tecmowcm ) /* Tecmo World Cup Millenium (JAPAN) */ |
| r7356 | r7357 | |
| 4192 | 4200 | DRIVER( rchase2 ) /* 1995.06 Rail Chase 2 (Arcade TV Game List - P.104, Left, 12 from top) */ |
| 4193 | 4201 | DRIVER( indy500 ) /* 1995.07 Indy 500 */ |
| 4194 | 4202 | DRIVER( indy500d ) |
| 4203 | DRIVER( indy500to ) | |
| 4195 | 4204 | DRIVER( skytargt ) /* 1995.10 Sky Target */ |
| 4196 | 4205 | DRIVER( fvipers ) /* 1995.11 Fighting Vipers */ |
| 4197 | 4206 | DRIVER( von ) /* 1996.01 Dennou Senki Virtual-On */ |
| r7356 | r7357 | |
| 4491 | 4500 | DRIVER( capsnk ) /* 2000.09 Capcom vs. SNK Millenium Fight 2000 */ |
| 4492 | 4501 | DRIVER( gram2000 ) /* 2000.09 Giant Gram 2000 Zen Nippon Pro-wres 3 */ |
| 4493 | 4502 | /* 2000.09 Nittere Shiki! Mirai Yosou Studio */ |
| 4494 | | |
| 4503 | DRIVER( crackndj ) /* 2000.10 Crackin' DJ */ | |
| 4495 | 4504 | DRIVER( cspike ) /* 2000.10 Gun Spike */ |
| 4496 | 4505 | /* 2000.10 Sega Strike Fighter */ |
| 4497 | 4506 | DRIVER( deathcox ) /* 2000.10 Death Crimson OX */ |
| r7356 | r7357 | |
| 4902 | 4911 | DRIVER( gekitsui ) /* (c) 1985 Data East Corporation (Japan) */ |
| 4903 | 4912 | DRIVER( tryout ) /* (c) 1985 Data East Corporation (Japan) */ |
| 4904 | 4913 | DRIVER( firetrap ) /* (c) 1986 Data East USA (US) */ |
| 4905 | DRIVER( firetpbl ) /* bootleg */ | |
| 4914 | DRIVER( firetrapbl ) /* bootleg */ | |
| 4906 | 4915 | DRIVER( metlclsh ) /* (c) 1985 Data East */ |
| 4907 | 4916 | DRIVER( chanbara ) /* (c) 1985 Data East */ |
| 4908 | 4917 | DRIVER( brkthru ) /* (c) 1986 Data East USA (US) */ |
| r7356 | r7357 | |
| 5498 | 5507 | DRIVER( asterix ) /* GX068 (c) 1992 (World) */ |
| 5499 | 5508 | DRIVER( asterixeac ) /* GX068 (c) 1992 (World) */ |
| 5500 | 5509 | DRIVER( asterixeaa ) /* GX068 (c) 1992 (World) */ |
| 5510 | DRIVER( asterixaad ) /* GX068 (c) 1992 (Asia) */ | |
| 5501 | 5511 | DRIVER( asterixj ) /* GX068 (c) 1992 (Japan) */ |
| 5502 | 5512 | DRIVER( gijoe ) /* GX069 (c) 1991 (World) */ |
| 5503 | 5513 | DRIVER( gijoeu ) /* GX069 (c) 1991 (US) */ |
| r7356 | r7357 | |
| 5575 | 5585 | DRIVER( le2j ) /* 1994.06 GX312 (Japan) */ |
| 5576 | 5586 | DRIVER( puzldama ) /* 1994.07 GX315 (Japan) */ |
| 5577 | 5587 | DRIVER( gokuparo ) /* 1994.04 GX321 (Japan) */ |
| 5578 | DRIVER( fantjour ) /* 1994.?? GX321 (US?) */ | |
| 5588 | DRIVER( fantjour ) /* 1994.?? GX321 (Euro) */ | |
| 5589 | DRIVER( fantjoura ) /* 1994.?? GX321 (Asia) */ | |
| 5579 | 5590 | DRIVER( dragoona ) /* 1995.?? GX417 (Asia) */ |
| 5580 | 5591 | DRIVER( dragoonj ) /* 1995.08 GX417 (Japan) */ |
| 5581 | 5592 | DRIVER( tbyahhoo ) /* 1995.04 GX424 (Japan) */ |
| r7356 | r7357 | |
| 6189 | 6200 | DRIVER( area51a ) /* 136105 (c) 1995 */ |
| 6190 | 6201 | DRIVER( fishfren ) /* (proto) (c) 1995 */ |
| 6191 | 6202 | DRIVER( freezeat ) /* (proto) (c) 1996 */ |
| 6192 | DRIVER( freezejp ) /* (proto) (c) 1996 */ | |
| 6193 | DRIVER( freezea2 ) /* (proto) (c) 1996 */ | |
| 6194 | DRIVER( freezea3 ) /* (proto) (c) 1996 */ | |
| 6195 | DRIVER( freezea4 ) /* (proto) (c) 1996 */ | |
| 6196 | DRIVER( freezea5 ) /* (proto) (c) 1996 */ | |
| 6197 | DRIVER( freezea6 ) /* (proto) (c) 1996 */ | |
| 6203 | DRIVER( freezeatjp ) /* (proto) (c) 1996 */ | |
| 6204 | DRIVER( freezeat2 ) /* (proto) (c) 1996 */ | |
| 6205 | DRIVER( freezeat3 ) /* (proto) (c) 1996 */ | |
| 6206 | DRIVER( freezeat4 ) /* (proto) (c) 1996 */ | |
| 6207 | DRIVER( freezeat5 ) /* (proto) (c) 1996 */ | |
| 6208 | DRIVER( freezeat6 ) /* (proto) (c) 1996 */ | |
| 6198 | 6209 | DRIVER( area51mx ) /* 136105 (c) 1998 */ |
| 6199 | 6210 | DRIVER( a51mxr3k ) /* ?? (c) 1998 */ |
| 6200 | 6211 | DRIVER( maxforce ) /* ?? (c) 1996 */ |
| r7356 | r7357 | |
| 7128 | 7139 | DRIVER( raidena ) /* (c) 1990 Seibu Kaihatsu */ |
| 7129 | 7140 | DRIVER( raidenk ) /* (c) 1990 Seibu Kaihatsu + IBL Corporation license */ |
| 7130 | 7141 | DRIVER( raident ) /* (c) 1990 Seibu Kaihatsu + Liang HWA Electronics license */ |
| 7142 | DRIVER( raidenu ) /* (c) 1990 Seibu Kaihatsu + Fabtek license */ | |
| 7131 | 7143 | DRIVER( sdgndmps ) /* (c) Banpresto / Bandai (Japan) */ |
| 7132 | 7144 | DRIVER( dcon ) /* (c) 1992 Success */ |
| 7133 | 7145 | DRIVER( sengokmj ) /* (c) 1991 Sigma */ |
| r7356 | r7357 | |
| 7311 | 7323 | DRIVER( monkelf ) /* bootleg */ |
| 7312 | 7324 | DRIVER( edf ) /* (c) 1991 */ |
| 7313 | 7325 | DRIVER( edfu ) /* (c) 1991 */ |
| 7326 | DRIVER( edfbl ) /* (c) 1991 */ | |
| 7314 | 7327 | DRIVER( 64street ) /* (c) 1991 */ |
| 7315 | 7328 | DRIVER( 64streetj ) /* (c) 1991 (Japan) */ |
| 7316 | 7329 | DRIVER( soldam ) /* (c) 1992 */ |
| r7356 | r7357 | |
| 8150 | 8163 | DRIVER( mjtensin ) /* "100" 1995 Dynax */ |
| 8151 | 8164 | DRIVER( nettoqc ) /* "103" (c) 1995 Nakanihon */ |
| 8152 | 8165 | DRIVER( majrjhdx ) /* "105" 1996 Dynax */ |
| 8153 | DRIVER( ddenlvrj ) /* "113" (c) 1995 Dynax */ | |
| 8154 | DRIVER( ddenlvrk ) /* "113" (c) 1995 Dynax */ | |
| 8155 | DRIVER( ddenlovr ) /* "113" (c) 1996 Dynax */ | |
| 8156 | DRIVER( ddenlovb ) /* bootleg */ | |
| 8166 | DRIVER( ddenlovj ) /* "113" (c) 1995 Dynax (Japan) */ | |
| 8167 | DRIVER( ddenlovrk ) /* "113" (c) 1995 Dynax (Korea) */ | |
| 8168 | DRIVER( ddenlovr ) /* "113" (c) 1996 Dynax (Hong Kong) */ | |
| 8169 | DRIVER( ddenlovrb ) /* bootleg */ | |
| 8157 | 8170 | DRIVER( hanakanz ) /* "507" 1996 Dynax */ |
| 8158 | 8171 | DRIVER( akamaru ) /* "501" 1996 Dynax */ |
| 8159 | 8172 | DRIVER( sryudens ) /* "502" 1996 Dynax / Face */ |
| r7356 | r7357 | |
| 8187 | 8200 | DRIVER( r2dtank ) /* (c) 1980 Sigma Ent. Inc. */ |
| 8188 | 8201 | DRIVER( spiders ) /* (c) 1981 Sigma Ent. Inc. */ |
| 8189 | 8202 | DRIVER( spiders2 ) /* (c) 1981 Sigma Ent. Inc. */ |
| 8203 | DRIVER( spiders3 ) /* (c) 1981 Sigma Ent. Inc. */ | |
| 8190 | 8204 | DRIVER( spinner ) /* bootleg */ |
| 8191 | 8205 | DRIVER( sub ) /* (c) 1985 Sigma Ent. Inc. */ |
| 8192 | 8206 | |
| 8207 | /* Sigma B52 */ | |
| 8208 | DRIVER( jwildb52 ) /* (c) 199? Sigma */ | |
| 8209 | DRIVER( jwildb52a ) /* (c) 199? Sigma */ | |
| 8210 | DRIVER( jwildb52h ) /* (c) 199? Sigma */ | |
| 8211 | ||
| 8193 | 8212 | /* IGS games ( www.igs.com.tw ) */ |
| 8194 | 8213 | DRIVER( goldstar ) /* (c) 198? IGS */ |
| 8195 | 8214 | DRIVER( goldstbl ) /* (c) 198? IGS */ |
| r7356 | r7357 | |
| 8383 | 8402 | DRIVER( pbillrd ) /* (c) 1987 Nihon System */ |
| 8384 | 8403 | DRIVER( pbillrds ) /* (c) 1988 Nihon System (+ optional Sega) */ |
| 8385 | 8404 | DRIVER( freekick ) /* (c) 1988 Nihon System (+ optional Sega) */ |
| 8386 | DRIVER( freekckb ) /* (c) 1987 bootleg */ | |
| 8387 | DRIVER( freekcb2 ) /* (c) 1987 bootleg */ | |
| 8405 | DRIVER( freekickb ) /* (c) 1987 bootleg */ | |
| 8406 | DRIVER( freekickb2 ) /* (c) 1987 bootleg */ | |
| 8388 | 8407 | DRIVER( countrun ) /* (c) 1988 Nihon System (+ optional Sega) */ |
| 8389 | DRIVER( countrnb ) /* (c) 1988 bootleg */ | |
| 8390 | DRIVER( countrb2 ) /* (c) 1988 bootleg */ | |
| 8408 | DRIVER( countrunb ) /* (c) 1988 bootleg */ | |
| 8409 | DRIVER( countrunb2 ) /* (c) 1988 bootleg */ | |
| 8391 | 8410 | |
| 8392 | 8411 | /* Alba games */ |
| 8393 | 8412 | DRIVER( rmhaihai ) /* (c) 1985 Alba */ |
| r7356 | r7357 | |
| 8980 | 8999 | DRIVER( laserbasa ) /* (c) 1981 Amstar/HOEI */ |
| 8981 | 9000 | DRIVER( futflash ) /* (c) 1981 HOEI (Arcade TV Game List - P.96, Right, 18 from top) */ |
| 8982 | 9001 | DRIVER( turbosub ) /* (c) 1985 Entertainment Sciences */ |
| 8983 | DRIVER( turbosb7 ) /* (c) 1985 Entertainment Sciences */ | |
| 8984 | DRIVER( turbosb6 ) /* (c) 1985 Entertainment Sciences */ | |
| 9002 | DRIVER( turbosub7 ) /* (c) 1985 Entertainment Sciences */ | |
| 9003 | DRIVER( turbosub6 ) /* (c) 1985 Entertainment Sciences */ | |
| 8985 | 9004 | DRIVER( pipeline ) /* (c) 1990 Daehyun Electronics */ |
| 8986 | 9005 | DRIVER( ttchamp ) |
| 8987 | 9006 | DRIVER( ttchampa ) |
| r7356 | r7357 | |
| 9036 | 9055 | DRIVER( vegasfst ) /* (c) 1993 Soft Design */ |
| 9037 | 9056 | DRIVER( vegasfte ) /* (c) 1993 Soft Design */ |
| 9038 | 9057 | DRIVER( jolyjokr ) /* (c) 198? Impera */ |
| 9039 | DRIVER( jolyjkra ) /* (c) 198? Impera */ | |
| 9058 | DRIVER( jolyjokra ) /* (c) 198? Impera */ | |
| 9040 | 9059 | DRIVER( jokercrd ) /* (c) 1993 Vesely Svet */ |
| 9041 | 9060 | DRIVER( mongolnw ) /* 199? bootleg */ |
| 9042 | 9061 | DRIVER( soccernw ) /* 199? bootleg */ |
| r7356 | r7357 | |
| 9106 | 9125 | DRIVER( tattack ) /* (c) 198? Shonan */ |
| 9107 | 9126 | DRIVER( mosaicf2 ) /* (c) 1999 F2 System */ |
| 9108 | 9127 | DRIVER( finalgdr ) /* (c) 2001 Semicom */ |
| 9128 | DRIVER( mrkicker ) /* (c) 2001 Semicom */ | |
| 9109 | 9129 | DRIVER( wyvernwg ) /* (c) 2001 Semicom / Game Vision */ |
| 9110 | 9130 | DRIVER( rbmk ) /* (c) 1995 GMS */ |
| 9111 | 9131 | DRIVER( go2000 ) /* (c) 2000 SA */ |
| r7356 | r7357 | |
| 9115 | 9135 | DRIVER( victor5 ) /* (c) 1990 Subsino */ |
| 9116 | 9136 | DRIVER( victor21 ) /* (c) 1990 Subsino */ |
| 9117 | 9137 | DRIVER( crsbingo ) /* (c) 1991 Subsino */ |
| 9138 | DRIVER( tisub ) /* (c) 1991 Subsino */ | |
| 9118 | 9139 | DRIVER( sharkpy ) /* (c) 1993 Subsino */ |
| 9119 | 9140 | DRIVER( sharkpya ) /* (c) 1993 Subsino */ |
| 9120 | 9141 | DRIVER( smoto20 ) /* (c) 1996 Subsino */ |
| r7356 | r7357 | |
| 9235 | 9256 | |
| 9236 | 9257 | DRIVER( altair ) /* (c) 1981 Cidelsa */ |
| 9237 | 9258 | DRIVER( destryer ) /* (c) 1981 Cidelsa */ |
| 9238 | DRIVER( destryea ) /* (c) 1981 Cidelsa */ | |
| 9259 | DRIVER( destryera ) /* (c) 1981 Cidelsa */ | |
| 9239 | 9260 | DRIVER( draco ) /* (c) 1981 Cidelsa */ |
| 9240 | 9261 | DRIVER( rockduck ) /* (c) 1983 Datel SAS */ |
| 9241 | 9262 | DRIVER( tetriskr ) /* (c) 1988? bootleg */ |
| r7356 | r7357 | |
| 9395 | 9416 | /* Astro Corp. */ |
| 9396 | 9417 | DRIVER( showhand ) /* (c) 1999? Astro Corp. */ |
| 9397 | 9418 | DRIVER( showhanc ) /* (c) 1999? Astro Corp. */ |
| 9419 | DRIVER( skilldrp ) /* (c) 2002 Astro Corp. */ | |
| 9398 | 9420 | |
| 9399 | 9421 | /* Dyna */ |
| 9400 | 9422 | DRIVER( ncb3 ) /* (c) 199? Dyna Electronics */ |
| r7356 | r7357 | |
| 9499 | 9521 | DRIVER( kkojnoli ) /* 198? south korean hack */ |
| 9500 | 9522 | DRIVER( wcat3 ) |
| 9501 | 9523 | DRIVER( mtonic ) /* 198? (c) Tonic */ |
| 9524 | DRIVER( magical ) /* 198? (c) Micro Manufacturing Ltd. */ | |
| 9502 | 9525 | |
| 9503 | 9526 | DRIVER( sfbonus ) /* (c) 2003 Amcoe - Skill Fruit Bonus */ |
| 9504 | 9527 | DRIVER( sfbonusd1 ) /* (c) 2003 Amcoe */ |
| r7356 | r7357 | |
| 9982 | 10005 | DRIVER( am_mg3 ) /* (c) Amatic 2000 */ |
| 9983 | 10006 | |
| 9984 | 10007 | DRIVER( pinkiri8 ) |
| 10008 | DRIVER( neptunp2 ) | |
| 9985 | 10009 | |
| 9986 | 10010 | #endif /* DRIVER_RECURSIVE */ |
| r7356 | r7357 | |
|---|---|---|
| 25 | 25 | extern DRIVER_INIT( ggxxsla ); |
| 26 | 26 | extern DRIVER_INIT( ggxxrl ); |
| 27 | 27 | extern DRIVER_INIT( ggxx ); |
| 28 | ||
| 29 | extern DRIVER_INIT( gram2000 ); | |
| 30 | extern DRIVER_INIT( mvsc2 ); | |
| 31 | extern DRIVER_INIT( qmegamis ); | |
| 32 | ||
| 33 | extern DRIVER_INIT( vf4evoct ); | |
| 34 | ||
| 28 | 35 | extern UINT64 *naomi_ram64; |
| 29 | 36 | |
| 30 | 37 | extern int jvsboard_type; |
| 38 | extern UINT16 actel_id; |
| r0 | r7357 | |
|---|---|---|
| 1 | #define MASTER_CLOCK_NTSC 53693175 | |
| 2 | #define MASTER_CLOCK_PAL 53203424 | |
| 3 | #define SEGACD_CLOCK 12500000 | |
| 4 | ||
| 5 | ||
| 6 | extern DRIVER_INIT( megadriv_c2 ); | |
| 7 | extern DRIVER_INIT( megadrie ); | |
| 8 | extern DRIVER_INIT( megadriv ); | |
| 9 | extern DRIVER_INIT( megadrij ); | |
| 10 | extern DRIVER_INIT( _32x ); | |
| 11 | extern DRIVER_INIT( mpnew ); | |
| 12 | ||
| 13 | INPUT_PORTS_EXTERN( md_common ); | |
| 14 | INPUT_PORTS_EXTERN( megadriv ); | |
| 15 | INPUT_PORTS_EXTERN( aladbl ); | |
| 16 | INPUT_PORTS_EXTERN( megadri6 ); | |
| 17 | INPUT_PORTS_EXTERN( ssf2ghw ); | |
| 18 | INPUT_PORTS_EXTERN( megdsvp ); | |
| 19 | ||
| 20 | MACHINE_DRIVER_EXTERN( megadriv_timers ); | |
| 21 | ||
| 22 | MACHINE_DRIVER_EXTERN( megdsvppal ); | |
| 23 | MACHINE_DRIVER_EXTERN( megadriv ); | |
| 24 | MACHINE_DRIVER_EXTERN( megadpal ); | |
| 25 | MACHINE_DRIVER_EXTERN( megdsvp ); | |
| 26 | MACHINE_DRIVER_EXTERN( genesis_32x ); | |
| 27 | MACHINE_DRIVER_EXTERN( genesis_32x_pal ); | |
| 28 | MACHINE_DRIVER_EXTERN( genesis_scd ); | |
| 29 | MACHINE_DRIVER_EXTERN( genesis_32x_scd ); | |
| 30 | MACHINE_DRIVER_EXTERN( md_bootleg ); // for topshoot.c & hshavoc.c | |
| 31 | ||
| 32 | extern UINT16* megadriv_backupram; | |
| 33 | extern int megadriv_backupram_length; | |
| 34 | extern UINT16* megadrive_ram; | |
| 35 | extern UINT8 megatech_bios_port_cc_dc_r(running_machine *machine, int offset, int ctrl); | |
| 36 | extern void megadriv_stop_scanline_timer(void); | |
| 37 | ||
| 38 | void megatech_set_megadrive_z80_as_megadrive_z80(running_machine *machine, const char* tag); | |
| 39 | ||
| 40 | extern READ16_HANDLER( megadriv_vdp_r ); | |
| 41 | extern WRITE16_HANDLER( megadriv_vdp_w ); | |
| 42 | ||
| 43 | /* These handlers are needed by megaplay.c */ | |
| 44 | extern READ16_HANDLER( megadriv_68k_io_read ); | |
| 45 | extern WRITE16_HANDLER( megadriv_68k_io_write ); | |
| 46 | ||
| 47 | /* These handlers are needed by puckpkmn.c for his memory map */ | |
| 48 | extern READ8_DEVICE_HANDLER( megadriv_68k_YM2612_read); | |
| 49 | extern WRITE8_DEVICE_HANDLER( megadriv_68k_YM2612_write); | |
| 50 | ||
| 51 | /* These are needed to create external input handlers (see e.g. MESS) */ | |
| 52 | /* Regs are also used by Megaplay! */ | |
| 53 | extern UINT8 (*megadrive_io_read_data_port_ptr)(running_machine *machine, int offset); | |
| 54 | extern void (*megadrive_io_write_data_port_ptr)(running_machine *machine, int offset, UINT16 data); | |
| 55 | extern UINT8 megadrive_io_data_regs[3]; | |
| 56 | extern UINT8 megadrive_io_ctrl_regs[3]; | |
| 57 | ||
| 58 | MACHINE_START( megadriv ); | |
| 59 | MACHINE_RESET( megadriv ); | |
| 60 | VIDEO_START( megadriv ); | |
| 61 | VIDEO_UPDATE( megadriv ); | |
| 62 | VIDEO_EOF( megadriv ); | |
| 63 | ||
| 64 | ||
| 65 | extern UINT16* megadrive_vdp_palette_lookup; | |
| 66 | extern UINT16* megadrive_vdp_palette_lookup_sprite; // for C2 | |
| 67 | extern UINT16* megadrive_vdp_palette_lookup_shadow; | |
| 68 | extern UINT16* megadrive_vdp_palette_lookup_highlight; | |
| 69 | ||
| 70 | extern int segac2_bg_pal_lookup[4]; | |
| 71 | extern int segac2_sp_pal_lookup[4]; | |
| 72 | ||
| 73 | extern int genvdp_use_cram; | |
| 74 | extern int genesis_always_irq6; | |
| 75 | extern int genesis_other_hacks; | |
| 76 | ||
| 77 | ||
| 78 | /* Megaplay - Megatech specific */ | |
| 79 | /* It might be possible to move the following structs in the drivers */ | |
| 80 | ||
| 81 | #define MP_ROM 0x10 | |
| 82 | #define MP_GAME 0 | |
| 83 | ||
| 84 | struct _mplay_bios /* once all the regs are saved in this structure, it would be better to reorganize it a bit... */ | |
| 85 | { | |
| 86 | UINT32 bios_mode; // determines whether ROM banks or Game data | |
| 87 | // is to read from 0x8000-0xffff | |
| 88 | ||
| 89 | UINT32 bios_bank; // ROM bank selection | |
| 90 | UINT16 game_banksel; // Game bank selection | |
| 91 | UINT32 readpos; // serial bank selection position (9-bit) | |
| 92 | UINT32 mp_bios_bank_addr; | |
| 93 | ||
| 94 | UINT32 bios_width; // determines the way the game info ROM is read | |
| 95 | UINT8 bios_ctrl[6]; | |
| 96 | UINT8 bios_6600; | |
| 97 | UINT8 bios_6403; | |
| 98 | UINT8 bios_6404; | |
| 99 | }; | |
| 100 | ||
| 101 | extern struct _mplay_bios mplay_bios; // defined in megaplay.c | |
| 102 | ||
| 103 | struct _mtech_bios /* once all the regs are saved in this structure, it would be better to reorganize it a bit... */ | |
| 104 | { | |
| 105 | UINT8 mt_cart_select_reg; | |
| 106 | UINT32 bios_port_ctrl; | |
| 107 | int current_game_is_sms; // is the current game SMS based (running on genesis z80, in VDP compatibility mode) | |
| 108 | UINT32 bios_ctrl_inputs; | |
| 109 | UINT8 bios_ctrl[6]; | |
| 110 | ||
| 111 | int mt_bank_bank_pos; | |
| 112 | int mt_bank_partial; | |
| 113 | int mt_bank_addr; | |
| 114 | }; |
| r0 | r7357 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | Double Dribble | |
| 4 | ||
| 5 | ***************************************************************************/ | |
| 6 | ||
| 7 | typedef struct _ddribble_state ddribble_state; | |
| 8 | struct _ddribble_state | |
| 9 | { | |
| 10 | /* memory pointers */ | |
| 11 | UINT8 * sharedram; | |
| 12 | UINT8 * snd_sharedram; | |
| 13 | UINT8 * spriteram_1; | |
| 14 | UINT8 * spriteram_2; | |
| 15 | UINT8 * bg_videoram; | |
| 16 | UINT8 * fg_videoram; | |
| 17 | UINT8 * paletteram; | |
| 18 | ||
| 19 | /* video-related */ | |
| 20 | tilemap_t *fg_tilemap,*bg_tilemap; | |
| 21 | int vregs[2][5]; | |
| 22 | int charbank[2]; | |
| 23 | ||
| 24 | /* misc */ | |
| 25 | int int_enable_0, int_enable_1; | |
| 26 | ||
| 27 | /* devices */ | |
| 28 | running_device *filter1; | |
| 29 | running_device *filter2; | |
| 30 | running_device *filter3; | |
| 31 | }; | |
| 32 | ||
| 33 | /*----------- defined in video/ddribble.c -----------*/ | |
| 34 | ||
| 35 | WRITE8_HANDLER( ddribble_fg_videoram_w ); | |
| 36 | WRITE8_HANDLER( ddribble_bg_videoram_w ); | |
| 37 | WRITE8_HANDLER( K005885_0_w ); | |
| 38 | WRITE8_HANDLER( K005885_1_w ); | |
| 39 | ||
| 40 | PALETTE_INIT( ddribble ); | |
| 41 | VIDEO_START( ddribble ); | |
| 42 | VIDEO_UPDATE( ddribble ); |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | |
| 7 | 7 | DRIVER_INIT( cclimber ); |
| 8 | DRIVER_INIT( cclimbrj ); | |
| 9 | void cclimbrj_decode(running_machine *machine); | |
| 8 | DRIVER_INIT( cclimberj ); | |
| 9 | void cclimberj_decode(running_machine *machine); | |
| 10 | 10 | void mshuttle_decode(running_machine *machine); |
| 11 | 11 | DRIVER_INIT( cannonb ); |
| 12 | 12 | DRIVER_INIT( cannonb2 ); |
| r0 | r7357 | |
|---|---|---|
| 1 | /* System E stuff */ | |
| 2 | ||
| 3 | enum sms_mapper | |
| 4 | { | |
| 5 | MAPPER_STANDARD = 0, | |
| 6 | MAPPER_CODEMASTERS = 1 | |
| 7 | }; | |
| 8 | ||
| 9 | ADDRESS_MAP_EXTERN( sms_io_map, 8 ); | |
| 10 | ||
| 11 | extern VIDEO_UPDATE(megatech_bios); | |
| 12 | extern VIDEO_UPDATE(megaplay_bios); | |
| 13 | extern VIDEO_UPDATE(megatech_md_sms); | |
| 14 | extern DRIVER_INIT( megatech_bios ); | |
| 15 | extern DRIVER_INIT( hazemd_segasyse ); | |
| 16 | extern MACHINE_RESET(megatech_bios); | |
| 17 | extern MACHINE_RESET(megatech_md_sms); | |
| 18 | extern VIDEO_EOF(megatech_bios); | |
| 19 | extern VIDEO_EOF(megatech_md_sms); | |
| 20 | ||
| 21 | extern READ8_HANDLER( sms_vcounter_r ); | |
| 22 | extern READ8_HANDLER( sms_vdp_data_r ); | |
| 23 | extern WRITE8_HANDLER( sms_vdp_data_w ); | |
| 24 | extern READ8_HANDLER( sms_vdp_ctrl_r ); | |
| 25 | extern WRITE8_HANDLER( sms_vdp_ctrl_w ); | |
| 26 | ||
| 27 | extern void init_for_megadrive(running_machine *machine); | |
| 28 | extern void segae_md_sms_stop_scanline_timer(void); | |
| 29 | ||
| 30 | ||
| 31 | extern READ8_HANDLER( md_sms_vdp_vcounter_r ); | |
| 32 | extern READ8_HANDLER( md_sms_vdp_data_r ); | |
| 33 | extern WRITE8_HANDLER( md_sms_vdp_data_w ); | |
| 34 | extern READ8_HANDLER( md_sms_vdp_ctrl_r ); | |
| 35 | extern WRITE8_HANDLER( md_sms_vdp_ctrl_w ); | |
| 36 | ||
| 37 | extern VIDEO_START(sms); | |
| 38 | extern VIDEO_EOF(sms); | |
| 39 | extern MACHINE_RESET(sms); | |
| 40 | extern READ8_HANDLER( sms_vdp_2_data_r ); | |
| 41 | extern WRITE8_HANDLER( sms_vdp_2_data_w ); | |
| 42 | extern READ8_HANDLER( sms_vdp_2_ctrl_r ); | |
| 43 | extern WRITE8_HANDLER( sms_vdp_2_ctrl_w ); | |
| 44 | extern VIDEO_EOF(systeme); | |
| 45 | extern VIDEO_UPDATE(systeme); | |
| 46 | extern MACHINE_RESET(systeme); | |
| 47 | extern UINT8* sms_mainram; | |
| 48 | extern UINT8* vdp2_vram_bank0; | |
| 49 | extern UINT8* vdp2_vram_bank1; | |
| 50 | extern UINT8* vdp1_vram_bank0; | |
| 51 | extern UINT8* vdp1_vram_bank1; | |
| 52 | extern void segae_set_vram_banks(UINT8 data); | |
| 53 | READ8_HANDLER( sms_ioport_gg00_r ); | |
| 54 | void init_extra_gg_ports(running_machine* machine, const char* tag); | |
| 55 | READ8_HANDLER (megatech_sms_ioport_dc_r); | |
| 56 | READ8_HANDLER (megatech_sms_ioport_dd_r); | |
| 57 | READ8_HANDLER( smsgg_backupram_r ); | |
| 58 | WRITE8_HANDLER( smsgg_backupram_w ); | |
| 59 | extern void megatech_set_genz80_as_sms_standard_map(running_machine *machine, const char* tag, int mapper); | |
| 60 | MACHINE_DRIVER_EXTERN(sms); | |
| 61 | extern DRIVER_INIT(sms); | |
| 62 | extern DRIVER_INIT(smspal); | |
| 63 | extern DRIVER_INIT(smscm); | |
| 64 | extern DRIVER_INIT( smsgg ); | |
| 65 | ||
| 66 | INPUT_PORTS_EXTERN(sms); | |
| 67 | INPUT_PORTS_EXTERN(gamegear); | |
| 68 | extern UINT8* smsgg_backupram; | |
| 69 | ||
| 70 | ||
| 71 | ||
| 72 | ||
| 73 |
| r7356 | r7357 | |
|---|---|---|
| 195 | 195 | |
| 196 | 196 | PALETTE_INIT( dkong2b ); |
| 197 | 197 | PALETTE_INIT( radarscp ); |
| 198 | PALETTE_INIT( radarsc1 ); | |
| 198 | PALETTE_INIT( radarscp1 ); | |
| 199 | 199 | PALETTE_INIT( dkong3 ); |
| 200 | 200 | |
| 201 | 201 | VIDEO_START( dkong ); |
| r7356 | r7357 | |
| 211 | 211 | MACHINE_DRIVER_EXTERN( dkong2b_audio ); |
| 212 | 212 | MACHINE_DRIVER_EXTERN( dkongjr_audio ); |
| 213 | 213 | MACHINE_DRIVER_EXTERN( dkong3_audio ); |
| 214 | MACHINE_DRIVER_EXTERN( radarsc1_audio ); | |
| 214 | MACHINE_DRIVER_EXTERN( radarscp1_audio ); | |
| 215 | 215 |
| r7356 | r7357 | |
|---|---|---|
| 1 | /******************** NEW STUFF *******************/ | |
| 2 | 1 | |
| 3 | #include "video/segaic16.h" | |
| 4 | #include "sound/upd7759.h" | |
| 2 | // later, this might be merged with segas1x_state in segas16.h | |
| 5 | 3 | |
| 6 | /*----------- defined in video/segahang.c -----------*/ | |
| 4 | typedef struct _segas1x_bootleg_state segas1x_bootleg_state; | |
| 5 | struct _segas1x_bootleg_state | |
| 6 | { | |
| 7 | UINT16 * bg0_tileram; | |
| 8 | UINT16 * bg1_tileram; | |
| 9 | UINT16 * textram; | |
| 10 | UINT16 * tileram; | |
| 7 | 11 | |
| 8 | VIDEO_START( hangon ); | |
| 9 | VIDEO_START( sharrier ); | |
| 10 | VIDEO_UPDATE( hangon ); | |
| 12 | UINT16 coinctrl; | |
| 11 | 13 | |
| 12 | /*----------- defined in video/segas16a.c -----------*/ | |
| 14 | /* game specific */ | |
| 15 | int passht4b_io1_val; | |
| 16 | int passht4b_io2_val; | |
| 17 | int passht4b_io3_val; | |
| 13 | 18 | |
| 14 | VIDEO_START( system16a ); | |
| 15 | VIDEO_UPDATE( system16a ); | |
| 19 | int beautyb_unkx; | |
| 16 | 20 | |
| 17 | ||
| 21 | | |
| 18 | 22 | |
| 19 | VIDEO_START( system16b ); | |
| 20 | VIDEO_START( timscanr ); | |
| 21 | VIDEO_UPDATE( system16b ); | |
| 23 | UINT16* goldnaxeb2_fgpage; | |
| 24 | UINT16* goldnaxeb2_bgpage; | |
| 22 | 25 | |
| 23 | ||
| 26 | | |
| 24 | 27 | |
| 25 | VIDEO_START( system18 ); | |
| 26 | VIDEO_UPDATE( system18 ); | |
| 27 | 28 | |
| 28 | void system18_set_grayscale(running_machine *machine, int enable); | |
| 29 | void system18_set_vdp_enable(running_machine *machine, int eanble); | |
| 30 | void system18_set_vdp_mixing(running_machine *machine, int mixing); | |
| 29 | /* video-related */ | |
| 30 | tilemap_t *background, *foreground, *text_layer; | |
| 31 | tilemap_t *background2, *foreground2; | |
| 32 | tilemap_t *bg_tilemaps[2]; | |
| 33 | tilemap_t *text_tilemap; | |
| 34 | double weights[2][3][6]; | |
| 31 | 35 | |
| 32 | /*----------- defined in video/segaorun.c -----------*/ | |
| 36 | int spritebank_type; | |
| 37 | int back_yscroll; | |
| 38 | int fore_yscroll; | |
| 39 | int text_yscroll; | |
| 40 | int sprite_xoffs; | |
| 33 | 41 | |
| 34 | VIDEO_START( outrun ); | |
| 35 | VIDEO_START( shangon ); | |
| 36 | VIDEO_UPDATE( outrun ); | |
| 37 | VIDEO_UPDATE( shangon ); | |
| 42 | int bg1_trans; // alien syn + sys18 | |
| 38 | 43 | |
| 39 | /*----------- defined in video/segaxbd.c -----------*/ | |
| 44 | int tile_bank1; | |
| 45 | int tile_bank0; | |
| 46 | int bg_page[4]; | |
| 47 | int fg_page[4]; | |
| 40 | 48 | |
| 41 | VIDEO_START( xboard ); | |
| 42 | VIDEO_UPDATE( xboard ); | |
| 43 | void xboard_set_road_priority(int priority); | |
| 49 | UINT16 datsu_page[4]; | |
| 44 | 50 | |
| 45 | /*----------- defined in video/segaybd.c -----------*/ | |
| 51 | int bg2_page[4]; | |
| 52 | int fg2_page[4]; | |
| 46 | 53 | |
| 47 | VIDEO_START( yboard ); | |
| 48 | VIDEO_UPDATE( yboard ); | |
| 54 | int old_bg_page[4],old_fg_page[4], old_tile_bank1, old_tile_bank0; | |
| 55 | int old_bg2_page[4], old_fg2_page[4]; | |
| 49 | 56 | |
| 57 | int bg_scrollx, bg_scrolly; | |
| 58 | int fg_scrollx, fg_scrolly; | |
| 59 | UINT16 tilemapselect; | |
| 50 | 60 | |
| 51 | /*----------- defined in machine/s16fd.c -----------*/ | |
| 61 | int textlayer_lo_min; | |
| 62 | int textlayer_lo_max; | |
| 63 | int textlayer_hi_min; | |
| 64 | int textlayer_hi_max; | |
| 52 | 65 | |
| 53 | void *fd1094_get_decrypted_base(void); | |
| 54 | void fd1094_machine_init(running_device *device); | |
| 55 | void fd1094_driver_init(running_machine *machine, const char* tag, void (*set_decrypted)(running_machine *, UINT8 *)); | |
| 66 | int tilebank_switch; | |
| 56 | 67 | |
| 57 | /*----------- defined in machine/system16.c -----------*/ | |
| 58 | 68 | |
| 59 | /* sound */ | |
| 60 | extern const upd7759_interface sys16_upd7759_interface; | |
| 69 | /* sound-related */ | |
| 70 | int sample_buffer; | |
| 71 | int sample_select; | |
| 61 | 72 | |
| 62 | ||
| 73 | UINT8 *soundbank_pt | |
| 63 | 74 | |
| 64 | typedef struct _sys16_patch sys16_patch; | |
| 65 | struct _sys16_patch | |
| 66 | { | |
| 67 | offs_t offset; | |
| 68 | UINT8 data; | |
| 69 | }; | |
| 75 | /* sys18 */ | |
| 76 | UINT8 *sound_bank; | |
| 77 | UINT16 *splittab_bg_x; | |
| 78 | UINT16 *splittab_bg_y; | |
| 79 | UINT16 *splittab_fg_x; | |
| 80 | UINT16 *splittab_fg_y; | |
| 81 | int sound_info[4*2]; | |
| 82 | int refreshenable; | |
| 83 | int system18; | |
| 70 | 84 | |
| 71 | ||
| 85 | UINT8 * | |
| 72 | 86 | |
| 73 | extern MACHINE_RESET( sys16_onetime ); | |
| 87 | /* devices */ | |
| 88 | running_device *maincpu; | |
| 89 | running_device *soundcpu; | |
| 90 | }; | |
| 74 | 91 | |
| 75 | GFXDECODE_EXTERN( sys16 ); | |
| 76 | ||
| 77 | 92 | /*----------- defined in video/system16.c -----------*/ |
| 78 | 93 | |
| 79 | extern VIDEO_START( system16a_bootleg ); | |
| 80 | extern VIDEO_START( system16a_bootleg_wb3bl ); | |
| 81 | extern VIDEO_START( system16a_bootleg_shinobi ); | |
| 82 | extern VIDEO_START( system16a_bootleg_passsht ); | |
| 83 | extern VIDEO_UPDATE( system16a_bootleg ); | |
| 84 | extern VIDEO_UPDATE( system16a_bootleg_passht4b ); | |
| 85 | extern WRITE16_HANDLER( system16a_bootleg_tilemapselect_w ); | |
| 86 | extern WRITE16_HANDLER( system16a_bootleg_bgscrolly_w ); | |
| 87 | extern WRITE16_HANDLER( system16a_bootleg_bgscrollx_w ); | |
| 88 | extern WRITE16_HANDLER( system16a_bootleg_fgscrolly_w ); | |
| 89 | extern WRITE16_HANDLER( system16a_bootleg_fgscrollx_w ); | |
| 90 | extern UINT16* system16a_bootleg_bg0_tileram; | |
| 91 | extern UINT16* system16a_bootleg_bg1_tileram; | |
| 94 | extern VIDEO_START( s16a_bootleg ); | |
| 95 | extern VIDEO_START( s16a_bootleg_wb3bl ); | |
| 96 | extern VIDEO_START( s16a_bootleg_shinobi ); | |
| 97 | extern VIDEO_START( s16a_bootleg_passsht ); | |
| 98 | extern VIDEO_UPDATE( s16a_bootleg ); | |
| 99 | extern VIDEO_UPDATE( s16a_bootleg_passht4b ); | |
| 100 | extern WRITE16_HANDLER( s16a_bootleg_tilemapselect_w ); | |
| 101 | extern WRITE16_HANDLER( s16a_bootleg_bgscrolly_w ); | |
| 102 | extern WRITE16_HANDLER( s16a_bootleg_bgscrollx_w ); | |
| 103 | extern WRITE16_HANDLER( s16a_bootleg_fgscrolly_w ); | |
| 104 | extern WRITE16_HANDLER( s16a_bootleg_fgscrollx_w ); | |
| 92 | 105 | |
| 93 | 106 | /* video hardware */ |
| 94 | 107 | extern WRITE16_HANDLER( sys16_tileram_w ); |
| r7356 | r7357 | |
| 101 | 114 | /* system18 video hardware */ |
| 102 | 115 | extern VIDEO_START( system18old ); |
| 103 | 116 | extern VIDEO_UPDATE( system18old ); |
| 104 | ||
| 105 | extern UINT16 *sys16_tileram; | |
| 106 | extern UINT16 *sys16_textram; | |
| 107 | extern UINT16 *sys16_spriteram; | |
| 108 | ||
| 109 | extern int sys16_sh_shadowpal; | |
| 110 | extern int sys16_MaxShadowColors; | |
| 111 | ||
| 112 | /* video driver constants (vary with game) */ | |
| 113 | extern int sys16_sprxoffset; | |
| 114 | extern int sys16_bgxoffset; | |
| 115 | extern int sys16_fgxoffset; | |
| 116 | extern const int *sys16_obj_bank; | |
| 117 | extern int sys16_textlayer_lo_min; | |
| 118 | extern int sys16_textlayer_lo_max; | |
| 119 | extern int sys16_textlayer_hi_min; | |
| 120 | extern int sys16_textlayer_hi_max; | |
| 121 | extern int sys16_bg1_trans; | |
| 122 | extern int sys16_bg_priority_mode; | |
| 123 | extern int sys16_fg_priority_mode; | |
| 124 | extern int sys16_bg_priority_value; | |
| 125 | extern int sys16_fg_priority_value; | |
| 126 | extern int sys16_tilebank_switch; | |
| 127 | extern int sys16_rowscroll_scroll; | |
| 128 | extern int shinobl_kludge; | |
| 129 | ||
| 130 | /* video driver registers */ | |
| 131 | extern int sys16_refreshenable; | |
| 132 | extern int sys16_tile_bank0; | |
| 133 | extern int sys16_tile_bank1; | |
| 134 | extern int sys16_bg_scrollx, sys16_bg_scrolly; | |
| 135 | extern int sys16_bg_page[4]; | |
| 136 | extern int sys16_fg_scrollx, sys16_fg_scrolly; | |
| 137 | extern int sys16_fg_page[4]; | |
| 138 | ||
| 139 | extern int sys16_bg2_page[4]; | |
| 140 | extern int sys16_fg2_page[4]; | |
| 141 | ||
| 142 | extern int sys18_bg2_active; | |
| 143 | extern int sys18_fg2_active; | |
| 144 | extern UINT16 *sys18_splittab_bg_x; | |
| 145 | extern UINT16 *sys18_splittab_bg_y; | |
| 146 | extern UINT16 *sys18_splittab_fg_x; | |
| 147 | extern UINT16 *sys18_splittab_fg_y; | |
| 148 |
| r7356 | r7357 | |
|---|---|---|
| 280 | 280 | WRITE8_HANDLER( lupin3_sh_port_1_w ); |
| 281 | 281 | WRITE8_HANDLER( lupin3_sh_port_2_w ); |
| 282 | 282 | |
| 283 | WRITE8_HANDLER( schasrcv_sh_port_1_w ); | |
| 284 | WRITE8_HANDLER( schasrcv_sh_port_2_w ); | |
| 283 | WRITE8_HANDLER( schasercv_sh_port_1_w ); | |
| 284 | WRITE8_HANDLER( schasercv_sh_port_2_w ); | |
| 285 | 285 | |
| 286 | 286 | WRITE8_HANDLER( yosakdon_sh_port_1_w ); |
| 287 | 287 | WRITE8_HANDLER( yosakdon_sh_port_2_w ); |
| r7356 | r7357 | |
| 309 | 309 | VIDEO_UPDATE( invadpt2 ); |
| 310 | 310 | VIDEO_UPDATE( ballbomb ); |
| 311 | 311 | VIDEO_UPDATE( schaser ); |
| 312 | VIDEO_UPDATE( schasrcv ); | |
| 312 | VIDEO_UPDATE( schasercv ); | |
| 313 | 313 | VIDEO_UPDATE( rollingc ); |
| 314 | 314 | VIDEO_UPDATE( polaris ); |
| 315 | 315 | VIDEO_UPDATE( lupin3 ); |
| r7356 | r7357 | |
|---|---|---|
| 55 | 55 | WRITE16_HANDLER( cyberbal_paletteram_1_w ); |
| 56 | 56 | |
| 57 | 57 | VIDEO_START( cyberbal ); |
| 58 | VIDEO_START( cyberb2p ); | |
| 58 | VIDEO_START( cyberbal2p ); | |
| 59 | 59 | VIDEO_UPDATE( cyberbal ); |
| 60 | 60 | |
| 61 | 61 | void cyberbal_scanline_update(running_device *screen, int scanline); |
| r0 | r7357 | |
|---|---|---|
| 1 | ||
| 2 | typedef struct _segas1x_state segas1x_state; | |
| 3 | struct _segas1x_state | |
| 4 | { | |
| 5 | /* memory pointers */ | |
| 6 | // UINT16 * workram; // this is used in the nvram handler, hence it cannot be added here | |
| 7 | // UINT16 * paletteram; // this is used in the segaic16 mapper, hence it cannot be added here (yet) | |
| 8 | // UINT16 * tileram_0; // this is used in the segaic16 mapper, hence it cannot be added here (yet) | |
| 9 | // UINT16 * textram_0; // this is used in the segaic16 mapper, hence it cannot be added here (yet) | |
| 10 | // UINT16 * spriteram_0; // this is used in the segaic16 mapper, hence it cannot be added here (yet) | |
| 11 | ||
| 12 | /* misc video */ | |
| 13 | UINT8 road_priority; // segaxbd | |
| 14 | bitmap_t *tmp_bitmap; // segaybd & segas18 | |
| 15 | UINT8 grayscale_enable; // segas18 | |
| 16 | UINT8 vdp_enable; // segas18 | |
| 17 | UINT8 vdp_mixing; // segas18 | |
| 18 | ||
| 19 | /* misc common */ | |
| 20 | UINT8 rom_board; // segas16b | |
| 21 | UINT8 mj_input_num; // segas16a & segas16b | |
| 22 | UINT8 mj_last_val; // segas16b | |
| 23 | UINT8 adc_select; // segahang & segaorun | |
| 24 | UINT8 timer_irq_state; // segaxbd & segaybd | |
| 25 | UINT8 vblank_irq_state; // segaorun, segaxbd & segaybd | |
| 26 | UINT8 misc_io_data[0x10]; // system18 & segaybd | |
| 27 | ||
| 28 | void (*i8751_vblank_hook)(running_machine *machine); | |
| 29 | const UINT8 *i8751_initial_config; | |
| 30 | ||
| 31 | read16_space_func custom_io_r; | |
| 32 | write16_space_func custom_io_w; | |
| 33 | ||
| 34 | /* misc system 16b */ | |
| 35 | UINT8 atomicp_sound_divisor; | |
| 36 | UINT8 atomicp_sound_count; | |
| 37 | UINT8 disable_screen_blanking; | |
| 38 | UINT8 hwc_input_value; | |
| 39 | ||
| 40 | ||
| 41 | /* misc system 16a */ | |
| 42 | UINT8 video_control; | |
| 43 | UINT8 mcu_control; | |
| 44 | UINT8 n7751_command; | |
| 45 | UINT32 n7751_rom_address; | |
| 46 | UINT8 last_buttons1; | |
| 47 | UINT8 last_buttons2; | |
| 48 | int read_port; | |
| 49 | ||
| 50 | void (*lamp_changed_w)(running_machine *machine, UINT8 changed, UINT8 newval); | |
| 51 | ||
| 52 | /* misc system 18 */ | |
| 53 | UINT8 mcu_data; | |
| 54 | ||
| 55 | UINT8 wwally_last_x[3], wwally_last_y[3]; | |
| 56 | UINT8 lghost_value, lghost_select; | |
| 57 | ||
| 58 | /* misc segaorun */ | |
| 59 | UINT8 irq2_state; | |
| 60 | const UINT8 *custom_map; | |
| 61 | ||
| 62 | /* misc yboard */ | |
| 63 | UINT8 analog_data[4]; | |
| 64 | int irq2_scanline; | |
| 65 | ||
| 66 | /* misc xboard */ | |
| 67 | UINT8 iochip_regs[2][8]; | |
| 68 | UINT8 iochip_force_input; | |
| 69 | ||
| 70 | UINT8 (*iochip_custom_io_r[2])(offs_t offset, UINT8 portdata); // currently unused | |
| 71 | void (*iochip_custom_io_w[2])(offs_t offset, UINT8 data); // currently unused | |
| 72 | ||
| 73 | UINT8 adc_reverse[8]; | |
| 74 | ||
| 75 | UINT8 gprider_hack; | |
| 76 | UINT16 *loffire_sync; | |
| 77 | ||
| 78 | ||
| 79 | /* devices */ | |
| 80 | running_device *maincpu; | |
| 81 | running_device *soundcpu; | |
| 82 | running_device *subcpu; | |
| 83 | running_device *subx; | |
| 84 | running_device *suby; | |
| 85 | running_device *mcu; | |
| 86 | running_device *ymsnd; | |
| 87 | running_device *ppi8255; | |
| 88 | running_device *n7751; | |
| 89 | running_device *ppi8255_1; | |
| 90 | running_device *ppi8255_2; | |
| 91 | running_device *interrupt_timer; | |
| 92 | running_device *_315_5248_1; | |
| 93 | running_device *_315_5250_1; | |
| 94 | running_device *_315_5250_2; | |
| 95 | }; | |
| 96 | ||
| 97 | ||
| 98 | /*----------- defined in video/segahang.c -----------*/ | |
| 99 | ||
| 100 | VIDEO_START( hangon ); | |
| 101 | VIDEO_START( sharrier ); | |
| 102 | VIDEO_UPDATE( hangon ); | |
| 103 | ||
| 104 | /*----------- defined in video/segas16a.c -----------*/ | |
| 105 | ||
| 106 | VIDEO_START( system16a ); | |
| 107 | VIDEO_UPDATE( system16a ); | |
| 108 | ||
| 109 | /*----------- defined in video/segas16b.c -----------*/ | |
| 110 | ||
| 111 | VIDEO_START( system16b ); | |
| 112 | VIDEO_START( timscanr ); | |
| 113 | VIDEO_UPDATE( system16b ); | |
| 114 | ||
| 115 | /*----------- defined in video/segas18.c -----------*/ | |
| 116 | ||
| 117 | VIDEO_START( system18 ); | |
| 118 | VIDEO_UPDATE( system18 ); | |
| 119 | ||
| 120 | void system18_set_grayscale(running_machine *machine, int enable); | |
| 121 | void system18_set_vdp_enable(running_machine *machine, int eanble); | |
| 122 | void system18_set_vdp_mixing(running_machine *machine, int mixing); | |
| 123 | ||
| 124 | /*----------- defined in video/segaorun.c -----------*/ | |
| 125 | ||
| 126 | VIDEO_START( outrun ); | |
| 127 | VIDEO_START( shangon ); | |
| 128 | VIDEO_UPDATE( outrun ); | |
| 129 | VIDEO_UPDATE( shangon ); | |
| 130 | ||
| 131 | /*----------- defined in video/segaxbd.c -----------*/ | |
| 132 | ||
| 133 | VIDEO_START( xboard ); | |
| 134 | VIDEO_UPDATE( xboard ); | |
| 135 | ||
| 136 | /*----------- defined in video/segaybd.c -----------*/ | |
| 137 | ||
| 138 | VIDEO_START( yboard ); | |
| 139 | VIDEO_UPDATE( yboard ); | |
| 140 | ||
| 141 | ||
| 142 | /*----------- defined in machine/s16fd.c -----------*/ | |
| 143 | ||
| 144 | void *fd1094_get_decrypted_base(void); | |
| 145 | void fd1094_machine_init(running_device *device); | |
| 146 | void fd1094_driver_init(running_machine *machine, const char* tag, void (*set_decrypted)(running_machine *, UINT8 *)); |
| r7356 | r7357 | |
|---|---|---|
| 42 | 42 | VIDEO_UPDATE( srdarwin ); |
| 43 | 43 | VIDEO_UPDATE( gondo ); |
| 44 | 44 | VIDEO_UPDATE( garyoret ); |
| 45 | VIDEO_UPDATE( lastmis | |
| 45 | VIDEO_UPDATE( lastmisn ); | |
| 46 | 46 | VIDEO_UPDATE( shackled ); |
| 47 | 47 | VIDEO_UPDATE( oscar ); |
| 48 | 48 | VIDEO_START( cobracom ); |
| 49 | 49 | VIDEO_START( oscar ); |
| 50 | 50 | VIDEO_START( ghostb ); |
| 51 | VIDEO_START( lastmis | |
| 51 | VIDEO_START( lastmisn ); | |
| 52 | 52 | VIDEO_START( shackled ); |
| 53 | 53 | VIDEO_START( srdarwin ); |
| 54 | 54 | VIDEO_START( gondo ); |
| r7356 | r7357 | |
| 65 | 65 | WRITE8_HANDLER( srdarwin_control_w ); |
| 66 | 66 | WRITE8_HANDLER( gondo_scroll_w ); |
| 67 | 67 | WRITE8_HANDLER( shackled_control_w ); |
| 68 | WRITE8_HANDLER( lastmiss_control_w ); | |
| 69 | WRITE8_HANDLER( lastmiss_scrollx_w ); | |
| 70 | WRITE8_HANDLER( lastmiss_scrolly_w ); | |
| 68 | WRITE8_HANDLER( lastmisn_control_w ); | |
| 69 | WRITE8_HANDLER( lastmisn_scrollx_w ); | |
| 70 | WRITE8_HANDLER( lastmisn_scrolly_w ); | |
| 71 | 71 | WRITE8_HANDLER( dec8_videoram_w ); |
| r7356 | r7357 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | /*----------- defined in video/genesis.c -----------*/ |
| 4 | 4 | |
| 5 | extern UINT8 genesis_vdp_regs[]; | |
| 6 | extern UINT16 genesis_bg_pal_lookup[]; | |
| 7 | extern UINT16 genesis_sp_pal_lookup[]; | |
| 8 | ||
| 9 | VIDEO_START( genesis ); | |
| 10 | ||
| 11 | VIDEO_UPDATE( genesis ); | |
| 12 | ||
| 13 | 5 | void system18_vdp_start(running_machine *machine); |
| 14 | 6 | void system18_vdp_update(bitmap_t *bitmap, const rectangle *cliprect); |
| 15 | 7 |
| r7356 | r7357 | |
|---|---|---|
| 120 | 120 | CPUS += Z8 |
| 121 | 121 | CPUS += I8008 |
| 122 | 122 | CPUS += SCMP |
| 123 | CPUS += MN10200 | |
| 123 | 124 | |
| 124 | ||
| 125 | 125 | #------------------------------------------------- |
| 126 | 126 | # specify available sound cores; some of these are |
| 127 | 127 | # only for MESS and so aren't included |
| r7356 | r7357 | |
| 220 | 220 | SOUNDS += DIGITALKER |
| 221 | 221 | SOUNDS += CDP1863 |
| 222 | 222 | SOUNDS += CDP1864 |
| 223 | SOUNDS += ZSG2 | |
| 223 | 224 | |
| 224 | ||
| 225 | 225 | #------------------------------------------------- |
| 226 | 226 | # this is the list of driver libraries that |
| 227 | 227 | # comprise MAME plus mamedriv.o which contains |
| r7356 | r7357 | |
| 774 | 774 | $(DRIVERS)/contra.o $(VIDEO)/contra.o \ |
| 775 | 775 | $(DRIVERS)/crimfght.o $(VIDEO)/crimfght.o \ |
| 776 | 776 | $(DRIVERS)/dbz.o $(VIDEO)/dbz.o \ |
| 777 | $(DRIVERS)/ddrible.o $(VIDEO)/ddrible.o \ | |
| 777 | $(DRIVERS)/ddribble.o $(VIDEO)/ddribble.o \ | |
| 778 | 778 | $(DRIVERS)/djmain.o $(VIDEO)/djmain.o \ |
| 779 | 779 | $(DRIVERS)/fastfred.o $(VIDEO)/fastfred.o \ |
| 780 | 780 | $(DRIVERS)/fastlane.o $(VIDEO)/fastlane.o \ |
| r7356 | r7357 | |
| 1142 | 1142 | $(DRIVERS)/stv.o $(DRIVERS)/stvinit.o $(MACHINE)/stvprot.o $(MACHINE)/stvcd.o \ |
| 1143 | 1143 | $(DRIVERS)/suprloco.o $(VIDEO)/suprloco.o \ |
| 1144 | 1144 | $(DRIVERS)/system1.o $(VIDEO)/system1.o \ |
| 1145 | $(DRIVERS)/system16.o $( | |
| 1145 | $(DRIVERS)/system16.o $( | |
| 1146 | 1146 | $(DRIVERS)/timetrv.o \ |
| 1147 | 1147 | $(DRIVERS)/topshoot.o \ |
| 1148 | 1148 | $(DRIVERS)/turbo.o $(AUDIO)/turbo.o $(VIDEO)/turbo.o \ |
| r7356 | r7357 | |
| 1209 | 1209 | $(MAMEOBJ)/sigma.a: \ |
| 1210 | 1210 | $(DRIVERS)/nyny.o \ |
| 1211 | 1211 | $(DRIVERS)/r2dtank.o \ |
| 1212 | $(DRIVERS)/sigmab52.o \ | |
| 1212 | 1213 | $(DRIVERS)/spiders.o $(AUDIO)/spiders.o \ |
| 1213 | 1214 | $(DRIVERS)/sub.o \ |
| 1214 | 1215 | |
| r7356 | r7357 | |
| 1331 | 1332 | $(AUDIO)/t5182.o \ |
| 1332 | 1333 | $(MACHINE)/taitoio.o \ |
| 1333 | 1334 | $(VIDEO)/taitoic.o \ |
| 1335 | $(AUDIO)/taito_zm.o \ | |
| 1334 | 1336 | |
| 1335 | 1337 | $(MAMEOBJ)/tatsumi.a: \ |
| 1336 | 1338 | $(DRIVERS)/kingdrby.o \ |
| r7356 | r7357 | |
| 1580 | 1582 | $(DRIVERS)/multfish.o \ |
| 1581 | 1583 | $(DRIVERS)/murogem.o \ |
| 1582 | 1584 | $(DRIVERS)/murogmbl.o \ |
| 1585 | $(DRIVERS)/neptunp2.o \ | |
| 1583 | 1586 | $(DRIVERS)/news.o $(VIDEO)/news.o \ |
| 1584 | 1587 | $(DRIVERS)/norautp.o $(AUDIO)/norautp.o \ |
| 1585 | 1588 | $(DRIVERS)/oneshot.o $(VIDEO)/oneshot.o \ |
| r7356 | r7357 | |
| 1810 | 1813 | |
| 1811 | 1814 | $(DRIVERS)/subsino.o: $(LAYOUT)/victor5.lh \ |
| 1812 | 1815 | $(LAYOUT)/victor21.lh \ |
| 1816 | $(LAYOUT)/tisub.lh \ | |
| 1813 | 1817 | $(LAYOUT)/crsbingo.lh \ |
| 1814 | 1818 | $(LAYOUT)/sharkpy.lh \ |
| 1815 | 1819 | $(LAYOUT)/smoto.lh |
| r7356 | r7357 | |
|---|---|---|
| 17 | 17 | static TILE_GET_INFO( ttl_get_tile_info ) |
| 18 | 18 | { |
| 19 | 19 | rungun_state *state = (rungun_state *)machine->driver_data; |
| 20 | UINT | |
| 20 | UINT8 | |
| 21 | 21 | int attr, code; |
| 22 | 22 | |
| 23 | code = (lvram[tile_index] >> 16) & 0xffff; | |
| 24 | code |= (lvram[tile_index] & 0x0f) << 8; /* tile "bank" */ | |
| 25 | attr = ((lvram[tile_index] & 0xf0) >> 4); /* palette */ | |
| 23 | attr = (lvram[BYTE_XOR_LE(tile_index<<2)] & 0xf0) >> 4; | |
| 24 | code = ((lvram[BYTE_XOR_LE(tile_index<<2)] & 0x0f) << 8) | (lvram[BYTE_XOR_LE((tile_index<<2)+2)]); | |
| 26 | 25 | |
| 27 | 26 | SET_TILE_INFO(state->ttl_gfx_index, code, attr, 0); |
| 28 | 27 | } |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "emu.h" |
| 8 | #include "segaic16.h" | |
| 9 | #include "includes/system16.h" | |
| 8 | #include "video/segaic16.h" | |
| 9 | #include "includes/segas16.h" | |
| 10 | 10 | |
| 11 | 11 | |
| 12 | ||
| 13 | 12 | /************************************* |
| 14 | 13 | * |
| 15 | * Statics | |
| 16 | * | |
| 17 | *************************************/ | |
| 18 | ||
| 19 | static UINT8 road_priority; | |
| 20 | ||
| 21 | ||
| 22 | ||
| 23 | /************************************* | |
| 24 | * | |
| 25 | 14 | * Video startup |
| 26 | 15 | * |
| 27 | 16 | *************************************/ |
| r7356 | r7357 | |
| 42 | 31 | } |
| 43 | 32 | |
| 44 | 33 | |
| 45 | ||
| 46 | 34 | /************************************* |
| 47 | 35 | * |
| 48 | * Miscellaneous setters | |
| 49 | * | |
| 50 | *************************************/ | |
| 51 | ||
| 52 | void xboard_set_road_priority(int priority) | |
| 53 | { | |
| 54 | /* this is only set at init time */ | |
| 55 | road_priority = priority; | |
| 56 | } | |
| 57 | ||
| 58 | ||
| 59 | ||
| 60 | /************************************* | |
| 61 | * | |
| 62 | 36 | * Video update |
| 63 | 37 | * |
| 64 | 38 | *************************************/ |
| 65 | 39 | |
| 66 | 40 | VIDEO_UPDATE( xboard ) |
| 67 | 41 | { |
| 42 | segas1x_state *state = (segas1x_state *)screen->machine->driver_data; | |
| 43 | ||
| 68 | 44 | /* if no drawing is happening, fill with black and get out */ |
| 69 | 45 | if (!segaic16_display_enable) |
| 70 | 46 | { |
| r7356 | r7357 | |
| 77 | 53 | |
| 78 | 54 | /* draw the low priority road layer */ |
| 79 | 55 | segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_BACKGROUND); |
| 80 | if (road_priority == 0) | |
| 56 | if (state->road_priority == 0) | |
| 81 | 57 | segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_FOREGROUND); |
| 82 | 58 | |
| 83 | 59 | /* draw background */ |
| r7356 | r7357 | |
| 89 | 65 | segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04); |
| 90 | 66 | |
| 91 | 67 | /* draw the high priority road */ |
| 92 | if (road_priority == 1) | |
| 68 | if (state->road_priority == 1) | |
| 93 | 69 | segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_FOREGROUND); |
| 94 | 70 | |
| 95 | 71 | /* text layer */ |
| r0 | r7357 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | video.c | |
| 4 | ||
| 5 | Functions to emulate the video hardware of the machine. | |
| 6 | ||
| 7 | ***************************************************************************/ | |
| 8 | ||
| 9 | #include "emu.h" | |
| 10 | #include "includes/ddribble.h" | |
| 11 | ||
| 12 | ||
| 13 | PALETTE_INIT( ddribble ) | |
| 14 | { | |
| 15 | int i; | |
| 16 | ||
| 17 | /* allocate the colortable */ | |
| 18 | machine->colortable = colortable_alloc(machine, 0x40); | |
| 19 | ||
| 20 | for (i = 0x10; i < 0x40; i++) | |
| 21 | colortable_entry_set_value(machine->colortable, i, i); | |
| 22 | ||
| 23 | /* sprite #2 uses pens 0x00-0x0f */ | |
| 24 | for (i = 0x40; i < 0x140; i++) | |
| 25 | { | |
| 26 | UINT8 ctabentry = color_prom[i - 0x40] & 0x0f; | |
| 27 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 28 | } | |
| 29 | } | |
| 30 | ||
| 31 | ||
| 32 | static void set_pens( running_machine *machine ) | |
| 33 | { | |
| 34 | ddribble_state *state = (ddribble_state *)machine->driver_data; | |
| 35 | int i; | |
| 36 | ||
| 37 | for (i = 0x00; i < 0x80; i += 2) | |
| 38 | { | |
| 39 | UINT16 data = state->paletteram[i | 1] | (state->paletteram[i] << 8); | |
| 40 | ||
| 41 | rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10)); | |
| 42 | colortable_palette_set_color(machine->colortable, i >> 1, color); | |
| 43 | } | |
| 44 | } | |
| 45 | ||
| 46 | ||
| 47 | WRITE8_HANDLER( K005885_0_w ) | |
| 48 | { | |
| 49 | ddribble_state *state = (ddribble_state *)space->machine->driver_data; | |
| 50 | switch (offset) | |
| 51 | { | |
| 52 | case 0x03: /* char bank selection for set 1 */ | |
| 53 | if ((data & 0x03) != state->charbank[0]) | |
| 54 | { | |
| 55 | state->charbank[0] = data & 0x03; | |
| 56 | tilemap_mark_all_tiles_dirty(state->fg_tilemap); | |
| 57 | } | |
| 58 | break; | |
| 59 | case 0x04: /* IRQ control, flipscreen */ | |
| 60 | state->int_enable_0 = data & 0x02; | |
| 61 | break; | |
| 62 | } | |
| 63 | state->vregs[0][offset] = data; | |
| 64 | } | |
| 65 | ||
| 66 | WRITE8_HANDLER( K005885_1_w ) | |
| 67 | { | |
| 68 | ddribble_state *state = (ddribble_state *)space->machine->driver_data; | |
| 69 | switch (offset) | |
| 70 | { | |
| 71 | case 0x03: /* char bank selection for set 2 */ | |
| 72 | if ((data & 0x03) != state->charbank[1]) | |
| 73 | { | |
| 74 | state->charbank[1] = data & 0x03; | |
| 75 | tilemap_mark_all_tiles_dirty(state->bg_tilemap); | |
| 76 | } | |
| 77 | break; | |
| 78 | case 0x04: /* IRQ control, flipscreen */ | |
| 79 | state->int_enable_1 = data & 0x02; | |
| 80 | break; | |
| 81 | } | |
| 82 | state->vregs[1][offset] = data; | |
| 83 | } | |
| 84 | ||
| 85 | /*************************************************************************** | |
| 86 | ||
| 87 | Callbacks for the TileMap code | |
| 88 | ||
| 89 | ***************************************************************************/ | |
| 90 | ||
| 91 | static TILEMAP_MAPPER( tilemap_scan ) | |
| 92 | { | |
| 93 | /* logical (col,row) -> memory offset */ | |
| 94 | return (col & 0x1f) + ((row & 0x1f) << 5) + ((col & 0x20) << 6); /* skip 0x400 */ | |
| 95 | } | |
| 96 | ||
| 97 | static TILE_GET_INFO( get_fg_tile_info ) | |
| 98 | { | |
| 99 | ddribble_state *state = (ddribble_state *)machine->driver_data; | |
| 100 | UINT8 attr = state->fg_videoram[tile_index]; | |
| 101 | int num = state->fg_videoram[tile_index + 0x400] + ((attr & 0xc0) << 2) + ((attr & 0x20) << 5) + ((state->charbank[0] & 2) << 10); | |
| 102 | SET_TILE_INFO( | |
| 103 | 0, | |
| 104 | num, | |
| 105 | 0, | |
| 106 | TILE_FLIPYX((attr & 0x30) >> 4)); | |
| 107 | } | |
| 108 | ||
| 109 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 110 | { | |
| 111 | ddribble_state *state = (ddribble_state *)machine->driver_data; | |
| 112 | UINT8 attr = state->bg_videoram[tile_index]; | |
| 113 | int num = state->bg_videoram[tile_index + 0x400] + ((attr & 0xc0) << 2) + ((attr & 0x20) << 5) + (state->charbank[1] << 11); | |
| 114 | SET_TILE_INFO( | |
| 115 | 1, | |
| 116 | num, | |
| 117 | 0, | |
| 118 | TILE_FLIPYX((attr & 0x30) >> 4)); | |
| 119 | } | |
| 120 | ||
| 121 | /*************************************************************************** | |
| 122 | ||
| 123 | Start the video hardware emulation. | |
| 124 | ||
| 125 | ***************************************************************************/ | |
| 126 | ||
| 127 | VIDEO_START( ddribble ) | |
| 128 | { | |
| 129 | ddribble_state *state = (ddribble_state *)machine->driver_data; | |
| 130 | ||
| 131 | state->fg_tilemap = tilemap_create(machine, get_fg_tile_info, tilemap_scan, 8, 8, 64, 32); | |
| 132 | state->bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan, 8, 8, 64, 32); | |
| 133 | ||
| 134 | tilemap_set_transparent_pen(state->fg_tilemap, 0); | |
| 135 | } | |
| 136 | ||
| 137 | /*************************************************************************** | |
| 138 | ||
| 139 | Memory handlers | |
| 140 | ||
| 141 | ***************************************************************************/ | |
| 142 | ||
| 143 | WRITE8_HANDLER( ddribble_fg_videoram_w ) | |
| 144 | { | |
| 145 | ddribble_state *state = (ddribble_state *)space->machine->driver_data; | |
| 146 | state->fg_videoram[offset] = data; | |
| 147 | tilemap_mark_tile_dirty(state->fg_tilemap, offset & 0xbff); | |
| 148 | } | |
| 149 | ||
| 150 | WRITE8_HANDLER( ddribble_bg_videoram_w ) | |
| 151 | { | |
| 152 | ddribble_state *state = (ddribble_state *)space->machine->driver_data; | |
| 153 | state->bg_videoram[offset] = data; | |
| 154 | tilemap_mark_tile_dirty(state->bg_tilemap, offset & 0xbff); | |
| 155 | } | |
| 156 | ||
| 157 | /*************************************************************************** | |
| 158 | ||
| 159 | Double Dribble sprites | |
| 160 | ||
| 161 | Each sprite has 5 bytes: | |
| 162 | byte #0: sprite number | |
| 163 | byte #1: | |
| 164 | bits 0..2: sprite bank # | |
| 165 | bit 3: not used? | |
| 166 | bits 4..7: sprite color | |
| 167 | byte #2: y position | |
| 168 | byte #3: x position | |
| 169 | byte #4: attributes | |
| 170 | bit 0: x position (high bit) | |
| 171 | bit 1: ??? | |
| 172 | bits 2..4: sprite size | |
| 173 | bit 5: flip x | |
| 174 | bit 6: flip y | |
| 175 | bit 7: unused? | |
| 176 | ||
| 177 | ***************************************************************************/ | |
| 178 | ||
| 179 | static void draw_sprites( running_machine* machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8* source, int lenght, int gfxset, int flipscreen ) | |
| 180 | { | |
| 181 | gfx_element *gfx = machine->gfx[gfxset]; | |
| 182 | const UINT8 *finish = source + lenght; | |
| 183 | ||
| 184 | while (source < finish) | |
| 185 | { | |
| 186 | int number = source[0] | ((source[1] & 0x07) << 8); /* sprite number */ | |
| 187 | int attr = source[4]; /* attributes */ | |
| 188 | int sx = source[3] | ((attr & 0x01) << 8); /* vertical position */ | |
| 189 | int sy = source[2]; /* horizontal position */ | |
| 190 | int flipx = attr & 0x20; /* flip x */ | |
| 191 | int flipy = attr & 0x40; /* flip y */ | |
| 192 | int color = (source[1] & 0xf0) >> 4; /* color */ | |
| 193 | int width, height; | |
| 194 | ||
| 195 | if (flipscreen) | |
| 196 | { | |
| 197 | flipx = !flipx; | |
| 198 | flipy = !flipy; | |
| 199 | sx = 240 - sx; | |
| 200 | sy = 240 - sy; | |
| 201 | ||
| 202 | if ((attr & 0x1c) == 0x10) | |
| 203 | { /* ???. needed for some sprites in flipped mode */ | |
| 204 | sx -= 0x10; | |
| 205 | sy -= 0x10; | |
| 206 | } | |
| 207 | } | |
| 208 | ||
| 209 | switch (attr & 0x1c) | |
| 210 | { | |
| 211 | case 0x10: /* 32x32 */ | |
| 212 | width = height = 2; number &= (~3); break; | |
| 213 | case 0x08: /* 16x32 */ | |
| 214 | width = 1; height = 2; number &= (~2); break; | |
| 215 | case 0x04: /* 32x16 */ | |
| 216 | width = 2; height = 1; number &= (~1); break; | |
| 217 | /* the hardware allow more sprite sizes, but ddribble doesn't use them */ | |
| 218 | default: /* 16x16 */ | |
| 219 | width = height = 1; break; | |
| 220 | } | |
| 221 | ||
| 222 | { | |
| 223 | static const int x_offset[2] = { 0x00, 0x01 }; | |
| 224 | static const int y_offset[2] = { 0x00, 0x02 }; | |
| 225 | int x, y, ex, ey; | |
| 226 | ||
| 227 | for (y = 0; y < height; y++) | |
| 228 | { | |
| 229 | for (x = 0; x < width; x++) | |
| 230 | { | |
| 231 | ex = flipx ? (width - 1 - x) : x; | |
| 232 | ey = flipy ? (height - 1 - y) : y; | |
| 233 | ||
| 234 | drawgfx_transpen(bitmap,cliprect, | |
| 235 | gfx, | |
| 236 | (number)+x_offset[ex]+y_offset[ey], | |
| 237 | color, | |
| 238 | flipx, flipy, | |
| 239 | sx+x*16,sy+y*16, 0); | |
| 240 | } | |
| 241 | } | |
| 242 | } | |
| 243 | source += 5; | |
| 244 | } | |
| 245 | } | |
| 246 | ||
| 247 | /*************************************************************************** | |
| 248 | ||
| 249 | Display Refresh | |
| 250 | ||
| 251 | ***************************************************************************/ | |
| 252 | ||
| 253 | VIDEO_UPDATE( ddribble ) | |
| 254 | { | |
| 255 | ddribble_state *state = (ddribble_state *)screen->machine->driver_data; | |
| 256 | set_pens(screen->machine); | |
| 257 | ||
| 258 | tilemap_set_flip(state->fg_tilemap, (state->vregs[0][4] & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); | |
| 259 | tilemap_set_flip(state->bg_tilemap, (state->vregs[1][4] & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); | |
| 260 | ||
| 261 | /* set scroll registers */ | |
| 262 | tilemap_set_scrollx(state->fg_tilemap, 0, state->vregs[0][1] | ((state->vregs[0][2] & 0x01) << 8)); | |
| 263 | tilemap_set_scrollx(state->bg_tilemap, 0, state->vregs[1][1] | ((state->vregs[1][2] & 0x01) << 8)); | |
| 264 | tilemap_set_scrolly(state->fg_tilemap, 0, state->vregs[0][0]); | |
| 265 | tilemap_set_scrolly(state->bg_tilemap, 0, state->vregs[1][0]); | |
| 266 | ||
| 267 | tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0); | |
| 268 | draw_sprites(screen->machine, bitmap, cliprect, state->spriteram_1, 0x07d, 2, state->vregs[0][4] & 0x08); | |
| 269 | draw_sprites(screen->machine, bitmap, cliprect, state->spriteram_2, 0x140, 3, state->vregs[1][4] & 0x08); | |
| 270 | tilemap_draw(bitmap, cliprect, state->fg_tilemap, 0, 0); | |
| 271 | return 0; | |
| 272 | } |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "emu.h" |
| 8 | #include "segaic16.h" | |
| 9 | #include "includes/system16.h" | |
| 8 | #include "video/segaic16.h" | |
| 9 | #include "includes/segas16.h" | |
| 10 | 10 | |
| 11 | 11 | |
| 12 | ||
| 13 | 12 | /************************************* |
| 14 | 13 | * |
| 15 | * Statics | |
| 16 | * | |
| 17 | *************************************/ | |
| 18 | ||
| 19 | static bitmap_t *yboard_bitmap; | |
| 20 | ||
| 21 | ||
| 22 | ||
| 23 | /************************************* | |
| 24 | * | |
| 25 | 14 | * Video startup |
| 26 | 15 | * |
| 27 | 16 | *************************************/ |
| 28 | 17 | |
| 29 | 18 | VIDEO_START( yboard ) |
| 30 | 19 | { |
| 20 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 21 | ||
| 31 | 22 | /* compute palette info */ |
| 32 | 23 | segaic16_palette_init(0x2000); |
| 33 | 24 | |
| 34 | 25 | /* allocate a bitmap for the yboard layer */ |
| 35 | | |
| 26 | st | |
| 36 | 27 | |
| 37 | 28 | /* initialize the sprites */ |
| 38 | 29 | segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_YBOARD_16B, 0x800, 0); |
| r7356 | r7357 | |
| 40 | 31 | |
| 41 | 32 | /* initialize the rotation layer */ |
| 42 | 33 | segaic16_rotate_init(machine, 0, SEGAIC16_ROTATE_YBOARD, 0x000); |
| 34 | ||
| 35 | state_save_register_global_bitmap(machine, state->tmp_bitmap); | |
| 43 | 36 | } |
| 44 | 37 | |
| 45 | 38 | |
| r7356 | r7357 | |
| 52 | 45 | |
| 53 | 46 | VIDEO_UPDATE( yboard ) |
| 54 | 47 | { |
| 48 | segas1x_state *state = (segas1x_state *)screen->machine->driver_data; | |
| 55 | 49 | rectangle yboard_clip; |
| 56 | 50 | |
| 57 | 51 | /* if no drawing is happening, fill with black and get out */ |
| r7356 | r7357 | |
| 64 | 58 | /* draw the yboard sprites */ |
| 65 | 59 | yboard_clip.min_x = yboard_clip.min_y = 0; |
| 66 | 60 | yboard_clip.max_x = yboard_clip.max_y = 511; |
| 67 | segaic16_sprites_draw(screen, | |
| 61 | segaic16_sprites_draw(screen, st | |
| 68 | 62 | |
| 69 | 63 | /* apply rotation */ |
| 70 | segaic16_rotate_draw(screen->machine, 0, bitmap, cliprect, | |
| 64 | segaic16_rotate_draw(screen->machine, 0, bitmap, cliprect, st | |
| 71 | 65 | |
| 72 | 66 | /* draw the 16B sprites */ |
| 73 | 67 | segaic16_sprites_draw(screen, bitmap, cliprect, 0); |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "emu.h" |
| 8 | #include "segaic16.h" | |
| 9 | #include "includes/system16.h" | |
| 8 | #include "video/segaic16.h" | |
| 9 | #include "includes/segas16.h" | |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 |
| r7356 | r7357 | |
|---|---|---|
| 2 | 2 | #include "cpu/sharc/sharc.h" |
| 3 | 3 | #include "machine/konppc.h" |
| 4 | 4 | #include "video/poly.h" |
| 5 | #include "gticlub.h" | |
| 5 | #include "video/konicdev.h" | |
| 6 | #include "video/gticlub.h" | |
| 6 | 7 | |
| 7 | 8 | |
| 8 | 9 | typedef struct _poly_extra_data poly_extra_data; |
| r7356 | r7357 | |
| 16 | 17 | int texture_mirror_y; |
| 17 | 18 | }; |
| 18 | 19 | |
| 19 | ||
| 20 | // defined in drivers/nwk-tr.c | |
| 21 | int K001604_vh_start(running_machine *machine, int chip); | |
| 22 | void K001604_draw_front_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect); | |
| 23 | void K001604_draw_back_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect); | |
| 24 | ||
| 25 | 20 | extern UINT8 gticlub_led_reg0; |
| 26 | 21 | extern UINT8 gticlub_led_reg1; |
| 27 | 22 | |
| 28 | 23 | |
| 29 | ||
| 30 | 24 | /*****************************************************************************/ |
| 31 | 25 | /* Konami K001006 Custom 3D Texel Renderer chip (KS10081) */ |
| 32 | 26 | |
| r7356 | r7357 | |
| 981 | 975 | |
| 982 | 976 | K001006_init(machine); |
| 983 | 977 | K001005_init(machine); |
| 984 | K001604_vh_start(machine, 0); | |
| 985 | 978 | } |
| 986 | 979 | |
| 987 | 980 | VIDEO_UPDATE( gticlub ) |
| 988 | 981 | { |
| 989 | | |
| 982 | running_device *k001604 = devtag_get | |
| 990 | 983 | |
| 984 | k001604_draw_back_layer(k001604, bitmap, cliprect); | |
| 985 | ||
| 991 | 986 | K001005_draw(bitmap, cliprect); |
| 992 | 987 | |
| 993 | | |
| 988 | k001604_draw_front_layer(k001604, bitmap, cliprect); | |
| 994 | 989 | |
| 995 | 990 | tick++; |
| 996 | 991 | if( tick >= 5 ) { |
| r7356 | r7357 | |
|---|---|---|
| 140 | 140 | }; |
| 141 | 141 | |
| 142 | 142 | /* |
| 143 | radarsc1 interface | |
| 143 | radarscp1 interface | |
| 144 | 144 | |
| 145 | 145 | All outputs are open-collector. They are followed by inverters which |
| 146 | 146 | drive the resistor network. All outputs are routed through a complimentary |
| 147 | 147 | darlington. |
| 148 | 148 | */ |
| 149 | 149 | |
| 150 | static const res_net_info radarsc1_net_info = | |
| 150 | static const res_net_info radarscp1_net_info = | |
| 151 | 151 | { |
| 152 | 152 | RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_TTL_OUT | RES_NET_MONITOR_SANYO_EZV20, |
| 153 | 153 | { |
| r7356 | r7357 | |
| 332 | 332 | state->color_codes = color_prom; /* we'll need it later */ |
| 333 | 333 | } |
| 334 | 334 | |
| 335 | PALETTE_INIT( radarsc1 ) | |
| 335 | PALETTE_INIT( radarscp1 ) | |
| 336 | 336 | { |
| 337 | 337 | dkong_state *state = (dkong_state *)machine->driver_data; |
| 338 | 338 | int i; |
| r7356 | r7357 | |
| 342 | 342 | { |
| 343 | 343 | |
| 344 | 344 | /* red component */ |
| 345 | r = compute_res_net( color_prom[512], 0, &radarsc1_net_info ); | |
| 345 | r = compute_res_net( color_prom[512], 0, &radarscp1_net_info ); | |
| 346 | 346 | /* green component */ |
| 347 | g = compute_res_net( color_prom[256], 1, &radarsc1_net_info ); | |
| 347 | g = compute_res_net( color_prom[256], 1, &radarscp1_net_info ); | |
| 348 | 348 | /* blue component */ |
| 349 | b = compute_res_net( color_prom[0], 2, &radarsc1_net_info ); | |
| 349 | b = compute_res_net( color_prom[0], 2, &radarscp1_net_info ); | |
| 350 | 350 | |
| 351 | 351 | palette_set_color_rgb(machine,i,r,g,b); |
| 352 | 352 | color_prom++; |
| r7356 | r7357 | |
| 357 | 357 | for (i=0;i<256;i++) |
| 358 | 358 | if ( (i & 0x03) == 0x00 ) /* NOR => CS=1 => Tristate => real black */ |
| 359 | 359 | { |
| 360 | r = compute_res_net( 0, 0, &radarsc1_net_info ); | |
| 361 | g = compute_res_net( 0, 1, &radarsc1_net_info ); | |
| 362 | b = compute_res_net( 0, 2, &radarsc1_net_info ); | |
| 360 | r = compute_res_net( 0, 0, &radarscp1_net_info ); | |
| 361 | g = compute_res_net( 0, 1, &radarscp1_net_info ); | |
| 362 | b = compute_res_net( 0, 2, &radarscp1_net_info ); | |
| 363 | 363 | palette_set_color_rgb(machine,i,r,g,b); |
| 364 | 364 | } |
| 365 | 365 | |
| r7356 | r7357 | |
| 456 | 456 | SET_TILE_INFO(0, code, color, 0); |
| 457 | 457 | } |
| 458 | 458 | |
| 459 | static TILE_GET_INFO( radarsc1_bg_tile_info ) | |
| 459 | static TILE_GET_INFO( radarscp1_bg_tile_info ) | |
| 460 | 460 | { |
| 461 | 461 | dkong_state *state = (dkong_state *)machine->driver_data; |
| 462 | 462 | int code = state->video_ram[tile_index] + 256 * state->gfx_bank; |
| r7356 | r7357 | |
| 960 | 960 | tilemap_set_scrolldx(state->bg_tilemap, 0, 128); |
| 961 | 961 | break; |
| 962 | 962 | case HARDWARE_TRS01: |
| 963 | state->bg_tilemap = tilemap_create(machine, radarsc1_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 963 | state->bg_tilemap = tilemap_create(machine, radarscp1_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 964 | 964 | tilemap_set_scrolldx(state->bg_tilemap, 0, 128); |
| 965 | 965 | |
| 966 | 966 | state->bg_bits = video_screen_auto_bitmap_alloc(machine->primary_screen); |
| r7356 | r7357 | |
|---|---|---|
| 29 | 29 | #include "video/resnet.h" |
| 30 | 30 | #include "video/segaic16.h" |
| 31 | 31 | |
| 32 | static int system16_bootleg_spritebank_type; | |
| 33 | static int system16_bootleg_back_tilemap_yscroll = 0; | |
| 34 | static int system16_bootleg_fore_tilemap_yscroll = 0; | |
| 35 | static int system16_bootleg_text_tilemap_yscroll = 0; | |
| 36 | static int system16_bootleg_sprite_xoffs = 0; | |
| 37 | 32 | |
| 38 | /* A config table for per-game offsets and bank types */ | |
| 39 | struct system15_bootleg_config | |
| 33 | static void setup_system16_bootleg_spritebanking( running_machine* machine ) | |
| 40 | 34 | { |
| 41 | const char *name; /* game driver name */ | |
| 42 | int spritebank_type; | |
| 43 | int back_tilemap_yscroll; | |
| 44 | int fore_tilemap_yscroll; | |
| 45 | int text_tilemap_yscroll; | |
| 46 | int sprite_xoffs; | |
| 47 | }; | |
| 35 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 48 | 36 | |
| 49 | ||
| 50 | static const struct system15_bootleg_config config_table[] = | |
| 51 | { | |
| 52 | /* 16A bootlegs */ | |
| 53 | { "shinobld", 1, 0,0,0, 117 }, | |
| 54 | { "passshtb", 1, 3,0,0, 117 }, | |
| 55 | { "passht4b", 1, 0,0,0, 117 }, | |
| 56 | { "wb3bbl", 1, 2,2,0, 117 }, | |
| 57 | ||
| 58 | /* 16B bootlegs */ | |
| 59 | { "bayrouteb1", 0, 0,0,0, 107 }, | |
| 60 | { "bayrouteb2", 0, 0,0,0, 107 }, | |
| 61 | { "goldnaxeb1", 1, 0,0,0, 121 }, | |
| 62 | { "goldnaxeb2", 1, 0,0,0, 121 }, | |
| 63 | { "tturfbl", 0, 0,0,0, 107 }, | |
| 64 | { "dduxbl", 0, 0,0,0, 112 }, | |
| 65 | { "eswatbl", 1, 0,0,0, 124 }, | |
| 66 | { "fpointbl", 0, 2,2,0, 107 }, | |
| 67 | { "fpointbj", 0, 2,2,0, 107 }, | |
| 68 | { "tetrisbl", 0, 0,0,0, 112 }, | |
| 69 | ||
| 70 | /* 18 bootlegs */ | |
| 71 | { "astormbl", 1, 0,0,0, 107 }, | |
| 72 | { "astormb2", 1, 0,0,0, 107 }, | |
| 73 | { "mwalkbl", 1, 0,0,0, 107 }, | |
| 74 | { "shdancbl", 1, 0,0,0, 107 }, | |
| 75 | ||
| 76 | /* Tetris-based hardware */ | |
| 77 | { "beautyb", 0, 0,0,0, 112 }, | |
| 78 | { "iqpipe", 0, 0,0,0, 112 }, | |
| 79 | ||
| 80 | ||
| 81 | ||
| 82 | { NULL, 0 } // end of table | |
| 83 | }; | |
| 84 | ||
| 85 | ||
| 86 | ||
| 87 | ||
| 88 | static void setup_system16_bootleg_video(running_machine* machine) | |
| 89 | { | |
| 90 | const char *gamename = machine->gamedrv->name; | |
| 91 | const struct system15_bootleg_config *k = &config_table[0]; | |
| 92 | int found = 0; | |
| 93 | while (k->name) | |
| 37 | if (state->spritebank_type == 1) | |
| 94 | 38 | { |
| 95 | if (strcmp(k->name, gamename) == 0) | |
| 96 | { | |
| 97 | system16_bootleg_spritebank_type = k->spritebank_type; | |
| 98 | system16_bootleg_back_tilemap_yscroll = k->back_tilemap_yscroll; | |
| 99 | system16_bootleg_fore_tilemap_yscroll = k->fore_tilemap_yscroll; | |
| 100 | system16_bootleg_text_tilemap_yscroll = k->text_tilemap_yscroll; | |
| 101 | system16_bootleg_sprite_xoffs = k->sprite_xoffs; | |
| 102 | found = 1; | |
| 103 | break; | |
| 104 | } | |
| 105 | ++k; | |
| 106 | } | |
| 107 | ||
| 108 | if (!found) fatalerror("system16 bootleg not in system15_bootleg_config config_table[]!\n"); | |
| 109 | } | |
| 110 | ||
| 111 | static void setup_system16_bootleg_spritebanking(running_machine* machine) | |
| 112 | { | |
| 113 | ||
| 114 | if (system16_bootleg_spritebank_type == 1) | |
| 115 | { | |
| 116 | 39 | static const UINT8 default_banklist[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; |
| 117 | 40 | int i; |
| 118 | 41 | for (i = 0; i < 16; i++) |
| r7356 | r7357 | |
| 130 | 53 | } |
| 131 | 54 | |
| 132 | 55 | |
| 133 | UINT16* system16a_bootleg_bg0_tileram; | |
| 134 | UINT16* system16a_bootleg_bg1_tileram; | |
| 135 | ||
| 136 | UINT16 *sys16_tileram; | |
| 137 | UINT16 *sys16_textram; | |
| 138 | UINT16 *sys16_spriteram; | |
| 139 | ||
| 140 | static int num_sprites; | |
| 141 | ||
| 142 | 56 | #define MAXCOLOURS 0x2000 /* 8192 */ |
| 143 | 57 | |
| 144 | int sys16_sh_shadowpal; | |
| 145 | int sys16_MaxShadowColors; | |
| 146 | 58 | |
| 147 | /* video driver constants (potentially different for each game) */ | |
| 148 | const int *sys16_obj_bank; | |
| 149 | int sys16_sprxoffset; | |
| 150 | int sys16_bgxoffset; | |
| 151 | int sys16_fgxoffset; | |
| 152 | int sys16_textlayer_lo_min; | |
| 153 | int sys16_textlayer_lo_max; | |
| 154 | int sys16_textlayer_hi_min; | |
| 155 | int sys16_textlayer_hi_max; | |
| 156 | int sys16_bg1_trans; // alien syn + sys18 | |
| 157 | int sys16_bg_priority_mode; | |
| 158 | int sys16_fg_priority_mode; | |
| 159 | int sys16_bg_priority_value; | |
| 160 | int sys16_fg_priority_value; | |
| 161 | static int sys16_18_mode; | |
| 162 | int sys16_tilebank_switch; | |
| 163 | int sys16_rowscroll_scroll; | |
| 164 | int shinobl_kludge; | |
| 165 | ||
| 166 | /* video registers */ | |
| 167 | int sys16_tile_bank1; | |
| 168 | int sys16_tile_bank0; | |
| 169 | int sys16_refreshenable; | |
| 170 | ||
| 171 | int sys16_bg_scrollx, sys16_bg_scrolly; | |
| 172 | int sys16_fg_scrollx, sys16_fg_scrolly; | |
| 173 | ||
| 174 | int sys16_bg_page[4]; | |
| 175 | int sys16_bg2_page[4]; | |
| 176 | int sys16_fg_page[4]; | |
| 177 | int sys16_fg2_page[4]; | |
| 178 | ||
| 179 | int sys18_bg2_active; | |
| 180 | int sys18_fg2_active; | |
| 181 | UINT16 *sys18_splittab_bg_x; | |
| 182 | UINT16 *sys18_splittab_bg_y; | |
| 183 | UINT16 *sys18_splittab_fg_x; | |
| 184 | UINT16 *sys18_splittab_fg_y; | |
| 185 | ||
| 186 | static tilemap_t *background, *foreground, *text_layer; | |
| 187 | static tilemap_t *background2, *foreground2; | |
| 188 | static int old_bg_page[4],old_fg_page[4], old_tile_bank1, old_tile_bank0; | |
| 189 | static int old_bg2_page[4],old_fg2_page[4]; | |
| 190 | ||
| 191 | ||
| 192 | // doesn't use te page system | |
| 193 | #if 0 | |
| 194 | ||
| 195 | //static UINT8 bg0_page[4]; | |
| 196 | //static UINT8 bg1_page[4]; | |
| 197 | ||
| 198 | static TILE_GET_INFO( get_system16b_bootleg_tile_info0 ) | |
| 199 | { | |
| 200 | /* TILEMAP_MAPPER can't be dynamic, so we do the page lookup here */ | |
| 201 | int data, tile_number; | |
| 202 | int page = 0; | |
| 203 | ||
| 204 | if (tile_index & 0x0040) | |
| 205 | page+=1; | |
| 206 | ||
| 207 | if (tile_index & 0x1000) | |
| 208 | page+=2; | |
| 209 | ||
| 210 | tile_index = ((tile_index & 0x03f) >> 0) | | |
| 211 | ((tile_index & 0xf80) >> 1); | |
| 212 | ||
| 213 | tile_index += bg0_page[page] * 0x800; | |
| 214 | ||
| 215 | data = sys16_tileram[tile_index]; | |
| 216 | tile_number = data&0xfff; | |
| 217 | ||
| 218 | SET_TILE_INFO( | |
| 219 | 0, | |
| 220 | tile_number, | |
| 221 | (data>>6)&0x7f, | |
| 222 | 0); | |
| 223 | } | |
| 224 | ||
| 225 | static TILE_GET_INFO( get_system16b_bootleg_tile_info1 ) | |
| 226 | { | |
| 227 | /* TILEMAP_MAPPER can't be dynamic, so we do the page lookup here */ | |
| 228 | int data, tile_number; | |
| 229 | int page = 0; | |
| 230 | ||
| 231 | if (tile_index & 0x0040) | |
| 232 | page+=1; | |
| 233 | ||
| 234 | if (tile_index & 0x1000) | |
| 235 | page+=2; | |
| 236 | ||
| 237 | tile_index = ((tile_index & 0x03f) >> 0) | | |
| 238 | ((tile_index & 0xf80) >> 1); | |
| 239 | ||
| 240 | tile_index += bg1_page[page] * 0x800; | |
| 241 | ||
| 242 | data = sys16_tileram[tile_index]; | |
| 243 | tile_number = data&0xfff; | |
| 244 | ||
| 245 | SET_TILE_INFO( | |
| 246 | 0, | |
| 247 | tile_number, | |
| 248 | (data>>6)&0x7f, | |
| 249 | 0); | |
| 250 | } | |
| 251 | #endif | |
| 252 | ||
| 253 | ||
| 254 | 59 | /***************************************************************************/ |
| 255 | 60 | |
| 256 | ||
| 257 | /***************************************************************************/ | |
| 258 | ||
| 259 | 61 | static TILEMAP_MAPPER( sys16_bg_map ) |
| 260 | 62 | { |
| 261 | 63 | int page = 0; |
| 262 | if( row<32 ){ /* top */ | |
| 263 | if( col<64 ) page = 0; else page = 1; | |
| 64 | if (row < 32) | |
| 65 | { | |
| 66 | /* top */ | |
| 67 | if (col < 64) | |
| 68 | page = 0; | |
| 69 | else | |
| 70 | page = 1; | |
| 264 | 71 | } |
| 265 | else { /* bottom */ | |
| 266 | if( col<64 ) page = 2; else page = 3; | |
| 72 | else | |
| 73 | { | |
| 74 | /* bottom */ | |
| 75 | if (col < 64) | |
| 76 | page = 2; | |
| 77 | else | |
| 78 | page = 3; | |
| 267 | 79 | } |
| 268 | row = row%32; | |
| 269 | col = col%64; | |
| 270 | return page*64*32+row*64+col; | |
| 80 | ||
| 81 | row = row % 32; | |
| 82 | col = col % 64; | |
| 83 | return page * 64 * 32 + row * 64 + col; | |
| 271 | 84 | } |
| 272 | 85 | |
| 273 | 86 | static TILEMAP_MAPPER( sys16_text_map ) |
| 274 | 87 | { |
| 275 | return row*64+col+(64-40); | |
| 88 | return row * 64 + col + (64 - 40); | |
| 276 | 89 | } |
| 277 | 90 | |
| 278 | /***************************************************************************/ | |
| 279 | 91 | |
| 280 | 92 | /* |
| 281 | 93 | Color generation details |
| r7356 | r7357 | |
| 296 | 108 | |
| 297 | 109 | static const int resistances_normal[6] = {3900, 2000, 1000, 1000/2, 1000/4, 0}; |
| 298 | 110 | static const int resistances_sh[6] = {3900, 2000, 1000, 1000/2, 1000/4, 470}; |
| 299 | static double weights[2][3][6]; | |
| 300 | 111 | |
| 301 | 112 | #ifdef UNUSED_CODE |
| 302 | 113 | WRITE16_HANDLER( sys16_paletteram_w ) |
| 303 | 114 | { |
| 115 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 304 | 116 | UINT16 newword; |
| 305 | COMBINE_DATA( &space->machine->generic.paletteram.u16[offset] ); | |
| 117 | ||
| 118 | COMBINE_DATA(&space->machine->generic.paletteram.u16[offset]); | |
| 306 | 119 | newword = space->machine->generic.paletteram.u16[offset]; |
| 307 | 120 | |
| 308 | 121 | /* sBGR BBBB GGGG RRRR */ |
| r7356 | r7357 | |
| 326 | 139 | int b4 = (newword >> 11) & 1; |
| 327 | 140 | |
| 328 | 141 | /* Normal colors */ |
| 329 | r = combine_6_weights(weights[0][0], r0, r1, r2, r3, r4, 0); | |
| 330 | g = combine_6_weights(weights[0][1], g0, g1, g2, g3, g4, 0); | |
| 331 | b = combine_6_weights(weights[0][2], b0, b1, b2, b3, b4, 0); | |
| 142 | r = combine_6_weights(state->weights[0][0], r0, r1, r2, r3, r4, 0); | |
| 143 | g = combine_6_weights(state->weights[0][1], g0, g1, g2, g3, g4, 0); | |
| 144 | b = combine_6_weights(state->weights[0][2], b0, b1, b2, b3, b4, 0); | |
| 332 | 145 | |
| 333 | 146 | /* Shadow colors */ |
| 334 | rs = combine_6_weights(weights[1][0], r0, r1, r2, r3, r4, 0); | |
| 335 | gs = combine_6_weights(weights[1][1], g0, g1, g2, g3, g4, 0); | |
| 336 | bs = combine_6_weights(weights[1][2], b0, b1, b2, b3, b4, 0); | |
| 147 | rs = combine_6_weights(state->weights[1][0], r0, r1, r2, r3, r4, 0); | |
| 148 | gs = combine_6_weights(state->weights[1][1], g0, g1, g2, g3, g4, 0); | |
| 149 | bs = combine_6_weights(state->weights[1][2], b0, b1, b2, b3, b4, 0); | |
| 337 | 150 | |
| 338 | 151 | /* Highlight colors */ |
| 339 | rh = combine_6_weights(weights[1][0], r0, r1, r2, r3, r4, 1); | |
| 340 | gh = combine_6_weights(weights[1][1], g0, g1, g2, g3, g4, 1); | |
| 341 | bh = combine_6_weights(weights[1][2], b0, b1, b2, b3, b4, 1); | |
| 152 | rh = combine_6_weights(state->weights[1][0], r0, r1, r2, r3, r4, 1); | |
| 153 | gh = combine_6_weights(state->weights[1][1], g0, g1, g2, g3, g4, 1); | |
| 154 | bh = combine_6_weights(state->weights[1][2], b0, b1, b2, b3, b4, 1); | |
| 342 | 155 | |
| 343 | palette_set_color( | |
| 156 | palette_set_color( | |
| 344 | 157 | |
| 345 | palette_set_color( | |
| 158 | palette_set_color( | |
| 346 | 159 | } |
| 347 | 160 | } |
| 348 | 161 | #endif |
| 349 | 162 | |
| 350 | static void update_page( void ){ | |
| 163 | static void update_page( running_machine *machine ) | |
| 164 | { | |
| 165 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 351 | 166 | int all_dirty = 0; |
| 352 | int i,offset; | |
| 353 | if( old_tile_bank1 != sys16_tile_bank1 ){ | |
| 167 | int i, offset; | |
| 168 | ||
| 169 | if (state->old_tile_bank1 != state->tile_bank1) | |
| 170 | { | |
| 354 | 171 | all_dirty = 1; |
| 355 | old_tile_bank1 = s | |
| 172 | state->old_tile_bank1 = state->tile_bank1; | |
| 356 | 173 | } |
| 357 | if( old_tile_bank0 != sys16_tile_bank0 ){ | |
| 174 | ||
| 175 | if (state->old_tile_bank0 != state->tile_bank0) | |
| 176 | { | |
| 358 | 177 | all_dirty = 1; |
| 359 | old_tile_bank0 = sys16_tile_bank0; | |
| 360 | tilemap_mark_all_tiles_dirty( text_layer ); | |
| 178 | state->old_tile_bank0 = state->tile_bank0; | |
| 179 | tilemap_mark_all_tiles_dirty(state->text_layer); | |
| 361 | 180 | } |
| 362 | if( all_dirty ){ | |
| 363 | tilemap_mark_all_tiles_dirty( background ); | |
| 364 | tilemap_mark_all_tiles_dirty( foreground ); | |
| 365 | if( sys16_18_mode ){ | |
| 366 | tilemap_mark_all_tiles_dirty( background2 ); | |
| 367 | tilemap_mark_all_tiles_dirty( foreground2 ); | |
| 181 | ||
| 182 | if (all_dirty) | |
| 183 | { | |
| 184 | tilemap_mark_all_tiles_dirty(state->background); | |
| 185 | tilemap_mark_all_tiles_dirty(state->foreground); | |
| 186 | ||
| 187 | if (state->system18) | |
| 188 | { | |
| 189 | tilemap_mark_all_tiles_dirty(state->background2); | |
| 190 | tilemap_mark_all_tiles_dirty(state->foreground2); | |
| 368 | 191 | } |
| 369 | 192 | } |
| 370 | 193 | else { |
| 371 | for(i=0;i<4;i++){ | |
| 372 | int page0 = 64*32*i; | |
| 373 | if( old_bg_page[i]!=sys16_bg_page[i] ){ | |
| 374 | old_bg_page[i] = sys16_bg_page[i]; | |
| 375 | for( offset = page0; offset<page0+64*32; offset++ ){ | |
| 376 | tilemap_mark_tile_dirty( background, offset ); | |
| 194 | for (i = 0; i < 4; i++) | |
| 195 | { | |
| 196 | int page0 = 64 * 32 * i; | |
| 197 | if (state->old_bg_page[i] != state->bg_page[i]) | |
| 198 | { | |
| 199 | state->old_bg_page[i] = state->bg_page[i]; | |
| 200 | for (offset = page0; offset < page0 + 64 * 32; offset++) | |
| 201 | { | |
| 202 | tilemap_mark_tile_dirty(state->background, offset); | |
| 377 | 203 | } |
| 378 | 204 | } |
| 379 | if( old_fg_page[i]!=sys16_fg_page[i] ){ | |
| 380 | old_fg_page[i] = sys16_fg_page[i]; | |
| 381 | for( offset = page0; offset<page0+64*32; offset++ ){ | |
| 382 | tilemap_mark_tile_dirty( foreground, offset ); | |
| 205 | ||
| 206 | if (state->old_fg_page[i] != state->fg_page[i]) | |
| 207 | { | |
| 208 | state->old_fg_page[i] = state->fg_page[i]; | |
| 209 | for (offset = page0; offset < page0 + 64 * 32; offset++) | |
| 210 | { | |
| 211 | tilemap_mark_tile_dirty(state->foreground, offset); | |
| 383 | 212 | } |
| 384 | 213 | } |
| 385 | if( sys16_18_mode ){ | |
| 386 | if( old_bg2_page[i]!=sys16_bg2_page[i] ){ | |
| 387 | old_bg2_page[i] = sys16_bg2_page[i]; | |
| 388 | for( offset = page0; offset<page0+64*32; offset++ ){ | |
| 389 | tilemap_mark_tile_dirty( background2, offset ); | |
| 214 | ||
| 215 | if (state->system18) | |
| 216 | { | |
| 217 | if (state->old_bg2_page[i] != state->bg2_page[i]) | |
| 218 | { | |
| 219 | state->old_bg2_page[i] = state->bg2_page[i]; | |
| 220 | for (offset = page0; offset < page0 + 64 * 32; offset++) | |
| 221 | { | |
| 222 | tilemap_mark_tile_dirty(state->background2, offset); | |
| 390 | 223 | } |
| 391 | 224 | } |
| 392 | if( old_fg2_page[i]!=sys16_fg2_page[i] ){ | |
| 393 | old_fg2_page[i] = sys16_fg2_page[i]; | |
| 394 | for( offset = page0; offset<page0+64*32; offset++ ){ | |
| 395 | tilemap_mark_tile_dirty( foreground2, offset ); | |
| 225 | ||
| 226 | if (state->old_fg2_page[i] != state->fg2_page[i]) | |
| 227 | { | |
| 228 | state->old_fg2_page[i] = state->fg2_page[i]; | |
| 229 | for (offset = page0; offset < page0 + 64 * 32; offset++) | |
| 230 | { | |
| 231 | tilemap_mark_tile_dirty(state->foreground2, offset); | |
| 396 | 232 | } |
| 397 | 233 | } |
| 398 | 234 | } |
| r7356 | r7357 | |
| 400 | 236 | } |
| 401 | 237 | } |
| 402 | 238 | |
| 403 | static TILE_GET_INFO( get_bg_tile_info ){ | |
| 404 | const UINT16 *source = 64*32*sys16_bg_page[tile_index/(64*32)] + sys16_tileram; | |
| 239 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 240 | { | |
| 241 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 242 | const UINT16 *source = 64 * 32 * state->bg_page[tile_index / (64 * 32)] + state->tileram; | |
| 405 | 243 | int data = source[tile_index%(64*32)]; |
| 406 | int tile_number = (data&0xfff) + 0x1000*((data&s | |
| 244 | int tile_number = (data & 0xfff) + 0x1000 * ((data & s | |
| 407 | 245 | |
| 408 | 246 | SET_TILE_INFO( |
| 409 | 247 | 0, |
| 410 | 248 | tile_number, |
| 411 | (data>>6)&0x7f, | |
| 249 | (data >> 6) & 0x7f, | |
| 412 | 250 | 0); |
| 413 | 251 | } |
| 414 | 252 | |
| 415 | static TILE_GET_INFO( get_fg_tile_info ){ | |
| 416 | const UINT16 *source = 64*32*sys16_fg_page[tile_index/(64*32)] + sys16_tileram; | |
| 417 | int data = source[tile_index%(64*32)]; | |
| 418 | int tile_number = (data&0xfff) + 0x1000*((data&sys16_tilebank_switch)?sys16_tile_bank1:sys16_tile_bank0); | |
| 253 | static TILE_GET_INFO( get_fg_tile_info ) | |
| 254 | { | |
| 255 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 256 | const UINT16 *source = 64 * 32 * state->fg_page[tile_index / (64 * 32)] + state->tileram; | |
| 257 | int data = source[tile_index % (64 * 32)]; | |
| 258 | int tile_number = (data & 0xfff) + 0x1000 * ((data & state->tilebank_switch) ? state->tile_bank1 : state->tile_bank0); | |
| 419 | 259 | |
| 420 | 260 | SET_TILE_INFO( |
| 421 | 261 | 0, |
| 422 | 262 | tile_number, |
| 423 | (data>>6)&0x7f, | |
| 263 | (data >> 6) & 0x7f, | |
| 424 | 264 | 0); |
| 425 | 265 | } |
| 426 | 266 | |
| 427 | static TILE_GET_INFO( get_bg2_tile_info ){ | |
| 428 | const UINT16 *source = 64*32*sys16_bg2_page[tile_index/(64*32)] + sys16_tileram; | |
| 429 | int data = source[tile_index%(64*32)]; | |
| 430 | int tile_number = (data&0xfff) + 0x1000*((data&0x1000)?sys16_tile_bank1:sys16_tile_bank0); | |
| 267 | static TILE_GET_INFO( get_bg2_tile_info ) | |
| 268 | { | |
| 269 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 270 | const UINT16 *source = 64 * 32 * state->bg2_page[tile_index / (64 * 32)] + state->tileram; | |
| 271 | int data = source[tile_index % (64 * 32)]; | |
| 272 | int tile_number = (data & 0xfff) + 0x1000 * ((data & 0x1000) ? state->tile_bank1 : state->tile_bank0); | |
| 431 | 273 | |
| 432 | 274 | SET_TILE_INFO( |
| 433 | 275 | 0, |
| 434 | 276 | tile_number, |
| 435 | (data>>6)&0x7f, | |
| 277 | (data >> 6) & 0x7f, | |
| 436 | 278 | 0); |
| 437 | 279 | } |
| 438 | 280 | |
| 439 | static TILE_GET_INFO( get_fg2_tile_info ){ | |
| 440 | const UINT16 *source = 64*32*sys16_fg2_page[tile_index/(64*32)] + sys16_tileram; | |
| 441 | int data = source[tile_index%(64*32)]; | |
| 442 | int tile_number = (data&0xfff) + 0x1000*((data&0x1000)?sys16_tile_bank1:sys16_tile_bank0); | |
| 281 | static TILE_GET_INFO( get_fg2_tile_info ) | |
| 282 | { | |
| 283 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 284 | const UINT16 *source = 64 * 32 * state->fg2_page[tile_index / (64 * 32)] + state->tileram; | |
| 285 | int data = source[tile_index % (64 * 32)]; | |
| 286 | int tile_number = (data & 0xfff) + 0x1000 * ((data & 0x1000) ? state->tile_bank1 : state->tile_bank0); | |
| 443 | 287 | |
| 444 | 288 | SET_TILE_INFO( |
| 445 | 289 | 0, |
| 446 | 290 | tile_number, |
| 447 | (data>>6)&0x7f, | |
| 291 | (data >> 6) & 0x7f, | |
| 448 | 292 | 0); |
| 449 | 293 | } |
| 450 | 294 | |
| 451 | WRITE16_HANDLER( sys16_tileram_w ){ | |
| 452 | UINT16 oldword = sys16_tileram[offset]; | |
| 453 | COMBINE_DATA( &sys16_tileram[offset] ); | |
| 454 | if( oldword != sys16_tileram[offset] ){ | |
| 455 | int page = offset/(64*32); | |
| 456 | offset = offset%(64*32); | |
| 295 | WRITE16_HANDLER( sys16_tileram_w ) | |
| 296 | { | |
| 297 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 298 | UINT16 oldword = state->tileram[offset]; | |
| 457 | 299 | |
| 458 | if( sys16_bg_page[0]==page ) tilemap_mark_tile_dirty( background, offset+64*32*0 ); | |
| 459 | if( sys16_bg_page[1]==page ) tilemap_mark_tile_dirty( background, offset+64*32*1 ); | |
| 460 | if( sys16_bg_page[2]==page ) tilemap_mark_tile_dirty( background, offset+64*32*2 ); | |
| 461 | if( sys16_bg_page[3]==page ) tilemap_mark_tile_dirty( background, offset+64*32*3 ); | |
| 300 | COMBINE_DATA(&state->tileram[offset]); | |
| 462 | 301 | |
| 463 | if( sys16_fg_page[0]==page ) tilemap_mark_tile_dirty( foreground, offset+64*32*0 ); | |
| 464 | if( sys16_fg_page[1]==page ) tilemap_mark_tile_dirty( foreground, offset+64*32*1 ); | |
| 465 | if( sys16_fg_page[2]==page ) tilemap_mark_tile_dirty( foreground, offset+64*32*2 ); | |
| 466 | if( sys16_fg_page[3]==page ) tilemap_mark_tile_dirty( foreground, offset+64*32*3 ); | |
| 302 | if (oldword != state->tileram[offset]) | |
| 303 | { | |
| 304 | int page = offset / (64 * 32); | |
| 305 | offset = offset % (64 * 32); | |
| 467 | 306 | |
| 468 | if( sys16_18_mode ){ | |
| 469 | if( sys16_bg2_page[0]==page ) tilemap_mark_tile_dirty( background2, offset+64*32*0 ); | |
| 470 | if( sys16_bg2_page[1]==page ) tilemap_mark_tile_dirty( background2, offset+64*32*1 ); | |
| 471 | if( sys16_bg2_page[2]==page ) tilemap_mark_tile_dirty( background2, offset+64*32*2 ); | |
| 472 | if( sys16_bg2_page[3]==page ) tilemap_mark_tile_dirty( background2, offset+64*32*3 ); | |
| 307 | if (state->bg_page[0] == page) tilemap_mark_tile_dirty(state->background, offset + 64 * 32 * 0); | |
| 308 | if (state->bg_page[1] == page) tilemap_mark_tile_dirty(state->background, offset + 64 * 32 * 1); | |
| 309 | if (state->bg_page[2] == page) tilemap_mark_tile_dirty(state->background, offset + 64 * 32 * 2); | |
| 310 | if (state->bg_page[3] == page) tilemap_mark_tile_dirty(state->background, offset + 64 * 32 * 3); | |
| 473 | 311 | |
| 474 | if( sys16_fg2_page[0]==page ) tilemap_mark_tile_dirty( foreground2, offset+64*32*0 ); | |
| 475 | if( sys16_fg2_page[1]==page ) tilemap_mark_tile_dirty( foreground2, offset+64*32*1 ); | |
| 476 | if( sys16_fg2_page[2]==page ) tilemap_mark_tile_dirty( foreground2, offset+64*32*2 ); | |
| 477 | if( sys16_fg2_page[3]==page ) tilemap_mark_tile_dirty( foreground2, offset+64*32*3 ); | |
| 312 | if (state->fg_page[0] == page) tilemap_mark_tile_dirty(state->foreground, offset + 64 * 32 * 0); | |
| 313 | if (state->fg_page[1] == page) tilemap_mark_tile_dirty(state->foreground, offset + 64 * 32 * 1); | |
| 314 | if (state->fg_page[2] == page) tilemap_mark_tile_dirty(state->foreground, offset + 64 * 32 * 2); | |
| 315 | if (state->fg_page[3] == page) tilemap_mark_tile_dirty(state->foreground, offset + 64 * 32 * 3); | |
| 316 | ||
| 317 | if (state->system18) | |
| 318 | { | |
| 319 | if (state->bg2_page[0] == page) tilemap_mark_tile_dirty(state->background2, offset + 64 * 32 * 0); | |
| 320 | if (state->bg2_page[1] == page) tilemap_mark_tile_dirty(state->background2, offset + 64 * 32 * 1); | |
| 321 | if (state->bg2_page[2] == page) tilemap_mark_tile_dirty(state->background2, offset + 64 * 32 * 2); | |
| 322 | if (state->bg2_page[3] == page) tilemap_mark_tile_dirty(state->background2, offset + 64 * 32 * 3); | |
| 323 | ||
| 324 | if (state->fg2_page[0] == page) tilemap_mark_tile_dirty(state->foreground2, offset + 64 * 32 * 0); | |
| 325 | if (state->fg2_page[1] == page) tilemap_mark_tile_dirty(state->foreground2, offset + 64 * 32 * 1); | |
| 326 | if (state->fg2_page[2] == page) tilemap_mark_tile_dirty(state->foreground2, offset + 64 * 32 * 2); | |
| 327 | if (state->fg2_page[3] == page) tilemap_mark_tile_dirty(state->foreground2, offset + 64 * 32 * 3); | |
| 478 | 328 | } |
| 479 | 329 | } |
| 480 | 330 | } |
| 481 | 331 | |
| 482 | 332 | /***************************************************************************/ |
| 483 | 333 | |
| 484 | static TILE_GET_INFO( get_text_tile_info ){ | |
| 485 | const UINT16 *source = sys16_textram; | |
| 334 | static TILE_GET_INFO( get_text_tile_info ) | |
| 335 | { | |
| 336 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 337 | const UINT16 *source = state->textram; | |
| 486 | 338 | int tile_number = source[tile_index]; |
| 487 | 339 | int pri = tile_number >> 8; |
| 488 | 340 | |
| 489 | if (!shinobl_kludge) | |
| 341 | if (!state->shinobl_kludge) | |
| 490 | 342 | { |
| 491 | 343 | SET_TILE_INFO( |
| 492 | 344 | 0, |
| 493 | (tile_number&0x1ff) + sys16_tile_bank0 * 0x1000, | |
| 494 | (tile_number>>9)%8, | |
| 345 | (tile_number & 0x1ff) + state->tile_bank0 * 0x1000, | |
| 346 | (tile_number >> 9) % 8, | |
| 495 | 347 | 0); |
| 496 | 348 | } |
| 497 | 349 | else |
| 498 | 350 | { |
| 499 | 351 | SET_TILE_INFO( |
| 500 | 352 | 0, |
| 501 | (tile_number&0xff) + sys16_tile_bank0 * 0x1000, | |
| 502 | (tile_number>>8)%8, | |
| 353 | (tile_number & 0xff) + state->tile_bank0 * 0x1000, | |
| 354 | (tile_number >> 8) % 8, | |
| 503 | 355 | 0); |
| 504 | 356 | } |
| 505 | 357 | |
| 506 | if(pri>=s | |
| 358 | if (pri >= s | |
| 507 | 359 | tileinfo->category = 1; |
| 508 | if(pri>=s | |
| 360 | if (pri >= s | |
| 509 | 361 | tileinfo->category = 0; |
| 510 | 362 | } |
| 511 | 363 | |
| 512 | WRITE16_HANDLER( sys16_textram_w ){ | |
| 513 | COMBINE_DATA( &sys16_textram[offset] ); | |
| 514 | tilemap_mark_tile_dirty( text_layer, offset ); | |
| 364 | WRITE16_HANDLER( sys16_textram_w ) | |
| 365 | { | |
| 366 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 367 | ||
| 368 | COMBINE_DATA(&state->textram[offset]); | |
| 369 | tilemap_mark_tile_dirty(state->text_layer, offset); | |
| 515 | 370 | } |
| 516 | 371 | |
| 517 | 372 | /***************************************************************************/ |
| 518 | 373 | |
| 519 | 374 | VIDEO_START( system16 ) |
| 520 | 375 | { |
| 521 | set | |
| 376 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 522 | 377 | |
| 523 | 378 | /* Normal colors */ |
| 524 | 379 | compute_resistor_weights(0, 255, -1.0, |
| 525 | 6, resistances_normal, weights[0][0], 0, 0, | |
| 526 | 6, resistances_normal, weights[0][1], 0, 0, | |
| 527 | 6, resistances_normal, weights[0][2], 0, 0 | |
| 380 | 6, resistances_normal, state->weights[0][0], 0, 0, | |
| 381 | 6, resistances_normal, state->weights[0][1], 0, 0, | |
| 382 | 6, resistances_normal, state->weights[0][2], 0, 0 | |
| 528 | 383 | ); |
| 529 | 384 | |
| 530 | 385 | /* Shadow/Highlight colors */ |
| 531 | 386 | compute_resistor_weights(0, 255, -1.0, |
| 532 | 6, resistances_sh, weights[1][0], 0, 0, | |
| 533 | 6, resistances_sh, weights[1][1], 0, 0, | |
| 534 | 6, resistances_sh, weights[1][2], 0, 0 | |
| 387 | 6, resistances_sh, state->weights[1][0], 0, 0, | |
| 388 | 6, resistances_sh, state->weights[1][1], 0, 0, | |
| 389 | 6, resistances_sh, state->weights[1][2], 0, 0 | |
| 535 | 390 | ); |
| 536 | 391 | |
| 537 | if( !sys16_bg1_trans ) | |
| 538 | background = tilemap_create(machine, | |
| 539 | get_bg_tile_info, | |
| 540 | sys16_bg_map, | |
| 541 | ||
| 392 | if (!state->bg1_trans) | |
| 393 | state->background = tilemap_create(machine, get_bg_tile_info, sys16_bg_map, | |
| 542 | 394 | 8,8, |
| 543 | 395 | 64*2,32*2 ); |
| 544 | 396 | else |
| 545 | background = tilemap_create(machine, | |
| 546 | get_bg_tile_info, | |
| 547 | sys16_bg_map, | |
| 548 | ||
| 397 | state->background = tilemap_create(machine, get_bg_tile_info, sys16_bg_map, | |
| 549 | 398 | 8,8, |
| 550 | 399 | 64*2,32*2 ); |
| 551 | 400 | |
| 552 | foreground = tilemap_create(machine, | |
| 553 | get_fg_tile_info, | |
| 554 | sys16_bg_map, | |
| 555 | ||
| 401 | state->foreground = tilemap_create(machine, get_fg_tile_info, sys16_bg_map, | |
| 556 | 402 | 8,8, |
| 557 | 403 | 64*2,32*2 ); |
| 558 | 404 | |
| 559 | text_layer = tilemap_create(machine, | |
| 560 | get_text_tile_info, | |
| 561 | sys16_text_map, | |
| 562 | ||
| 405 | state->text_layer = tilemap_create(machine, get_text_tile_info, sys16_text_map, | |
| 563 | 406 | 8,8, |
| 564 | 407 | 40,28 ); |
| 565 | 408 | |
| 566 | num_sprites = 128*2; /* only 128 for most games; aburner uses 256 */ | |
| 567 | ||
| 568 | 409 | { |
| 569 | if(sys16_bg1_trans) tilemap_set_transparent_pen( background, 0 ); | |
| 570 | tilemap_set_transparent_pen( foreground, 0 ); | |
| 571 | tilemap_set_transparent_pen( text_layer, 0 ); | |
| 410 | if (state->bg1_trans) tilemap_set_transparent_pen(state->background, 0); | |
| 411 | tilemap_set_transparent_pen(state->foreground, 0); | |
| 412 | tilemap_set_transparent_pen(state->text_layer, 0); | |
| 572 | 413 | |
| 573 | sys16_tile_bank0 = 0; | |
| 574 | sys16_tile_bank1 = 1; | |
| 414 | state->tile_bank0 = 0; | |
| 415 | state->tile_bank1 = 1; | |
| 575 | 416 | |
| 576 | sys16_fg_scrollx = 0; | |
| 577 | sys16_fg_scrolly = 0; | |
| 417 | state->fg_scrollx = 0; | |
| 418 | state->fg_scrolly = 0; | |
| 578 | 419 | |
| 579 | sys16_bg_scrollx = 0; | |
| 580 | sys16_bg_scrolly = 0; | |
| 420 | state->bg_scrollx = 0; | |
| 421 | state->bg_scrolly = 0; | |
| 581 | 422 | |
| 582 | s | |
| 423 | state->refreshenable = 1; | |
| 583 | 424 | |
| 584 | 425 | /* common defaults */ |
| 426 | state->tilebank_switch = 0x1000; | |
| 585 | 427 | |
| 586 | sys16_bgxoffset = 0; | |
| 587 | sys16_bg_priority_mode=0; | |
| 588 | sys16_fg_priority_mode=0; | |
| 589 | sys16_tilebank_switch=0x1000; | |
| 590 | ||
| 591 | 428 | // Defaults for sys16 games |
| 592 | sys16_textlayer_lo_min=0; | |
| 593 | sys16_textlayer_lo_max=0x7f; | |
| 594 | sys16_textlayer_hi_min=0x80; | |
| 595 | sys16_textlayer_hi_max=0xff; | |
| 429 | state->textlayer_lo_min = 0; | |
| 430 | state->textlayer_lo_max = 0x7f; | |
| 431 | state->textlayer_hi_min = 0x80; | |
| 432 | state->textlayer_hi_max = 0xff; | |
| 596 | 433 | |
| 597 | sys1 | |
| 434 | state->system1 | |
| 598 | 435 | } |
| 599 | 436 | |
| 600 | 437 | segaic16_palette_init(0x800); |
| 601 | segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16B, 0x400,s | |
| 438 | segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16B, 0x400, s | |
| 602 | 439 | setup_system16_bootleg_spritebanking(machine); |
| 603 | 440 | |
| 604 | 441 | |
| r7356 | r7357 | |
| 606 | 443 | |
| 607 | 444 | VIDEO_START( system18old ) |
| 608 | 445 | { |
| 446 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 447 | ||
| 609 | 448 | VIDEO_START_CALL(system16); |
| 610 | 449 | |
| 611 | s | |
| 450 | state->bg1_trans = 1; | |
| 612 | 451 | |
| 613 | background2 = tilemap_create(machine, | |
| 614 | get_bg2_tile_info, | |
| 615 | sys16_bg_map, | |
| 616 | ||
| 452 | state->background2 = tilemap_create(machine, get_bg2_tile_info, sys16_bg_map, | |
| 617 | 453 | 8,8, |
| 618 | 454 | 64*2,32*2 ); |
| 619 | 455 | |
| 620 | foreground2 = tilemap_create(machine, | |
| 621 | get_fg2_tile_info, | |
| 622 | sys16_bg_map, | |
| 623 | ||
| 456 | state->foreground2 = tilemap_create(machine, get_fg2_tile_info, sys16_bg_map, | |
| 624 | 457 | 8,8, |
| 625 | 458 | 64*2,32*2 ); |
| 626 | 459 | |
| 460 | tilemap_set_transparent_pen(state->foreground2, 0); | |
| 627 | 461 | |
| 628 | tilemap_set_transparent_pen( foreground2, 0 ); | |
| 462 | if (state->splittab_fg_x) | |
| 463 | { | |
| 464 | tilemap_set_scroll_rows(state->foreground , 64); | |
| 465 | tilemap_set_scroll_rows(state->foreground2 , 64); | |
| 466 | } | |
| 629 | 467 | |
| 630 | if(sys18_splittab_fg_x){ | |
| 631 | tilemap_set_scroll_rows( foreground , 64 ); | |
| 632 | tilemap_set_scroll_rows( foreground2 , 64 ); | |
| 468 | if (state->splittab_bg_x) | |
| 469 | { | |
| 470 | tilemap_set_scroll_rows(state->background , 64); | |
| 471 | tilemap_set_scroll_rows(state->background2 , 64); | |
| 633 | 472 | } |
| 634 | if(sys18_splittab_bg_x){ | |
| 635 | tilemap_set_scroll_rows( background , 64 ); | |
| 636 | tilemap_set_scroll_rows( background2 , 64 ); | |
| 637 | } | |
| 638 | 473 | |
| 639 | sys16_textlayer_lo_min=0; | |
| 640 | sys16_textlayer_lo_max=0x1f; | |
| 641 | sys16_textlayer_hi_min=0x20; | |
| 642 | sys16_textlayer_hi_max=0xff; | |
| 474 | state->textlayer_lo_min = 0; | |
| 475 | state->textlayer_lo_max = 0x1f; | |
| 476 | state->textlayer_hi_min = 0x20; | |
| 477 | state->textlayer_hi_max = 0xff; | |
| 643 | 478 | |
| 644 | sys16_18_mode=1; | |
| 645 | sys16_bg_priority_mode=3; | |
| 646 | sys16_fg_priority_mode=3; | |
| 647 | sys16_bg_priority_value=0x1800; | |
| 648 | sys16_fg_priority_value=0x2000; | |
| 649 | ||
| 650 | ||
| 479 | state->system18 = 1; | |
| 651 | 480 | } |
| 652 | 481 | |
| 653 | 482 | |
| r7356 | r7357 | |
| 668 | 497 | |
| 669 | 498 | *****************************************************************************************/ |
| 670 | 499 | |
| 671 | static tilemap_t *system16a_bootleg_bg_tilemaps[2]; | |
| 672 | static tilemap_t *system16a_bootleg_text_tilemap; | |
| 673 | static UINT16 system16a_bootleg_tilemapselect; | |
| 674 | 500 | |
| 675 | ||
| 676 | static int system16a_bootleg_bgscrolly; | |
| 677 | static int system16a_bootleg_bgscrollx; | |
| 678 | static int system16a_bootleg_fgscrolly; | |
| 679 | static int system16a_bootleg_fgscrollx; | |
| 680 | ||
| 681 | static TILE_GET_INFO( get_system16a_bootleg_tile_infotxt ) | |
| 501 | static TILE_GET_INFO( get_s16a_bootleg_tile_infotxt ) | |
| 682 | 502 | { |
| 503 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 683 | 504 | int data, tile_number; |
| 684 | 505 | |
| 685 | data = sys16_textram[tile_index]; | |
| 686 | tile_number = data&0x1ff; | |
| 506 | data = state->textram[tile_index]; | |
| 507 | tile_number = data & 0x1ff; | |
| 687 | 508 | |
| 688 | ||
| 689 | ||
| 690 | ||
| 691 | 509 | SET_TILE_INFO( |
| 692 | 510 | 0, |
| 693 | 511 | tile_number, |
| 694 | ((data>>9)&0x7), | |
| 512 | ((data >> 9) & 0x7), | |
| 695 | 513 | 0); |
| 696 | 514 | } |
| 697 | 515 | |
| 698 | static TILE_GET_INFO( get_s | |
| 516 | static TILE_GET_INFO( get_s | |
| 699 | 517 | { |
| 518 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 700 | 519 | int data, tile_number; |
| 701 | 520 | |
| 702 | data = system16a_bootleg_bg0_tileram[tile_index]; | |
| 703 | tile_number = data&0x1fff; | |
| 521 | data = state->bg0_tileram[tile_index]; | |
| 522 | tile_number = data & 0x1fff; | |
| 704 | 523 | |
| 705 | 524 | |
| 706 | 525 | SET_TILE_INFO( |
| 707 | 526 | 0, |
| 708 | 527 | tile_number, |
| 709 | (data>>6)&0x7f, | |
| 528 | (data >> 6) & 0x7f, | |
| 710 | 529 | 0); |
| 711 | 530 | } |
| 712 | 531 | |
| 713 | static TILE_GET_INFO( get_s | |
| 532 | static TILE_GET_INFO( get_s | |
| 714 | 533 | { |
| 534 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 715 | 535 | int data, tile_number; |
| 716 | 536 | |
| 717 | data = system16a_bootleg_bg1_tileram[tile_index]; | |
| 718 | tile_number = data&0x1fff; | |
| 537 | data = state->bg1_tileram[tile_index]; | |
| 538 | tile_number = data & 0x1fff; | |
| 719 | 539 | |
| 720 | 540 | SET_TILE_INFO( |
| 721 | 541 | 0, |
| 722 | 542 | tile_number, |
| 723 | (data>>6)&0x7f, | |
| 543 | (data >> 6) & 0x7f, | |
| 724 | 544 | 0); |
| 725 | 545 | } |
| 726 | 546 | |
| 727 | WRITE16_HANDLER( s | |
| 547 | WRITE16_HANDLER( s | |
| 728 | 548 | { |
| 729 | system16a_bootleg_bgscrolly = data; | |
| 549 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 550 | state->bg_scrolly = data; | |
| 730 | 551 | } |
| 731 | 552 | |
| 732 | WRITE16_HANDLER( s | |
| 553 | WRITE16_HANDLER( s | |
| 733 | 554 | { |
| 734 | system16a_bootleg_bgscrollx = data; | |
| 555 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 556 | state->bg_scrollx = data; | |
| 735 | 557 | } |
| 736 | 558 | |
| 737 | WRITE16_HANDLER( s | |
| 559 | WRITE16_HANDLER( s | |
| 738 | 560 | { |
| 739 | system16a_bootleg_fgscrolly = data; | |
| 561 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 562 | state->fg_scrolly = data; | |
| 740 | 563 | } |
| 741 | 564 | |
| 742 | WRITE16_HANDLER( s | |
| 565 | WRITE16_HANDLER( s | |
| 743 | 566 | { |
| 744 | system16a_bootleg_fgscrollx = data; | |
| 567 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 568 | state->fg_scrollx = data; | |
| 745 | 569 | } |
| 746 | 570 | |
| 747 | WRITE16_HANDLER( s | |
| 571 | WRITE16_HANDLER( s | |
| 748 | 572 | { |
| 749 | COMBINE_DATA(&system16a_bootleg_tilemapselect); | |
| 750 | //printf("system16a_bootleg_tilemapselect %04x\n", system16a_bootleg_tilemapselect); | |
| 573 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 574 | ||
| 575 | COMBINE_DATA(&state->tilemapselect); | |
| 576 | //printf("system16 bootleg tilemapselect %04x\n", state->tilemapselect); | |
| 751 | 577 | } |
| 752 | 578 | |
| 753 | 579 | |
| 754 | ||
| 755 | VIDEO_START( system16a_bootleg ) | |
| 580 | VIDEO_START( s16a_bootleg ) | |
| 756 | 581 | { |
| 757 | set | |
| 582 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 758 | 583 | |
| 759 | 584 | /* Normal colors */ |
| 760 | 585 | compute_resistor_weights(0, 255, -1.0, |
| 761 | 6, resistances_normal, weights[0][0], 0, 0, | |
| 762 | 6, resistances_normal, weights[0][1], 0, 0, | |
| 763 | 6, resistances_normal, weights[0][2], 0, 0 | |
| 586 | 6, resistances_normal, state->weights[0][0], 0, 0, | |
| 587 | 6, resistances_normal, state->weights[0][1], 0, 0, | |
| 588 | 6, resistances_normal, state->weights[0][2], 0, 0 | |
| 764 | 589 | ); |
| 765 | 590 | |
| 766 | 591 | /* Shadow/Highlight colors */ |
| 767 | 592 | compute_resistor_weights(0, 255, -1.0, |
| 768 | 6, resistances_sh, weights[1][0], 0, 0, | |
| 769 | 6, resistances_sh, weights[1][1], 0, 0, | |
| 770 | 6, resistances_sh, weights[1][2], 0, 0 | |
| 593 | 6, resistances_sh, state->weights[1][0], 0, 0, | |
| 594 | 6, resistances_sh, state->weights[1][1], 0, 0, | |
| 595 | 6, resistances_sh, state->weights[1][2], 0, 0 | |
| 771 | 596 | ); |
| 772 | 597 | |
| 773 | 598 | |
| 774 | 599 | |
| 775 | s | |
| 600 | s | |
| 776 | 601 | |
| 777 | 602 | // the system16a bootlegs have simple tilemaps instead of the paged system |
| 778 | system16a_bootleg_bg_tilemaps[0] = tilemap_create(machine, get_system16a_bootleg_tile_info0, tilemap_scan_rows, 8,8, 64,32 ); | |
| 779 | system16a_bootleg_bg_tilemaps[1] = tilemap_create(machine, get_system16a_bootleg_tile_info1, tilemap_scan_rows, 8,8, 64,32 ); | |
| 603 | state->bg_tilemaps[0] = tilemap_create(machine, get_s16a_bootleg_tile_info0, tilemap_scan_rows, 8,8, 64,32 ); | |
| 604 | state->bg_tilemaps[1] = tilemap_create(machine, get_s16a_bootleg_tile_info1, tilemap_scan_rows, 8,8, 64,32 ); | |
| 780 | 605 | |
| 781 | tilemap_set_transparent_pen( system16a_bootleg_text_tilemap, 0 ); | |
| 782 | tilemap_set_transparent_pen( system16a_bootleg_bg_tilemaps[0], 0 ); | |
| 783 | tilemap_set_transparent_pen( system16a_bootleg_bg_tilemaps[1], 0 ); | |
| 606 | tilemap_set_transparent_pen(state->text_tilemap, 0); | |
| 607 | tilemap_set_transparent_pen(state->bg_tilemaps[0], 0); | |
| 608 | tilemap_set_transparent_pen(state->bg_tilemaps[1], 0); | |
| 784 | 609 | |
| 785 | 610 | segaic16_palette_init(0x800); |
| 786 | 611 | |
| 787 | 612 | } |
| 788 | 613 | |
| 789 | VIDEO_START( s | |
| 614 | VIDEO_START( s | |
| 790 | 615 | { |
| 791 | VIDEO_START_CALL(system16a_bootleg); | |
| 792 | segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_WB3BL, 0x400, system16_bootleg_sprite_xoffs); | |
| 616 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 617 | ||
| 618 | VIDEO_START_CALL(s16a_bootleg); | |
| 619 | segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_WB3BL, 0x400, state->sprite_xoffs); | |
| 793 | 620 | setup_system16_bootleg_spritebanking(machine); |
| 794 | 621 | } |
| 795 | 622 | |
| 796 | VIDEO_START( s | |
| 623 | VIDEO_START( s | |
| 797 | 624 | { |
| 798 | VIDEO_START_CALL(system16a_bootleg); | |
| 799 | segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_SHINOBLD, 0x400, system16_bootleg_sprite_xoffs); | |
| 625 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 626 | ||
| 627 | VIDEO_START_CALL(s16a_bootleg); | |
| 628 | segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_SHINOBLD, 0x400, state->sprite_xoffs); | |
| 800 | 629 | setup_system16_bootleg_spritebanking(machine); |
| 801 | 630 | } |
| 802 | 631 | |
| 803 | VIDEO_START( s | |
| 632 | VIDEO_START( s | |
| 804 | 633 | { |
| 805 | VIDEO_START_CALL(system16a_bootleg); | |
| 806 | segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_PASSHTBL, 0x400, system16_bootleg_sprite_xoffs); | |
| 634 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 635 | ||
| 636 | VIDEO_START_CALL(s16a_bootleg); | |
| 637 | segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_PASSHTBL, 0x400, state->sprite_xoffs); | |
| 807 | 638 | setup_system16_bootleg_spritebanking(machine); |
| 808 | 639 | } |
| 809 | 640 | |
| 810 | 641 | // Passing Shot (2 player), Shinobi (Datsu), Wonderboy 3 |
| 811 | VIDEO_UPDATE( s | |
| 642 | VIDEO_UPDATE( s | |
| 812 | 643 | { |
| 813 | | |
| 644 | | |
| 814 | 645 | |
| 815 | 646 | // passing shot |
| 816 | offset_txtx = 192; | |
| 817 | offset_txty = 0; | |
| 818 | offset_bg1x = 190; | |
| 819 | offset_bg1y = 0; | |
| 820 | offset_bg0x = 187; | |
| 821 | offset_bg0y = 0; | |
| 647 | int offset_txtx = 192; | |
| 648 | int offset_txty = 0; | |
| 649 | int offset_bg1x = 190; | |
| 650 | int offset_bg1y = 0; | |
| 651 | int offset_bg0x = 187; | |
| 652 | int offset_bg0y = 0; | |
| 822 | 653 | |
| 823 | bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine)); | |
| 654 | bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine)); | |
| 824 | 655 | |
| 825 | 656 | // I can't bring myself to care about dirty tile marking on something which runs at a bazillion % speed anyway, clean code is better |
| 826 | tilemap_mark_all_tiles_dirty (system16a_bootleg_bg_tilemaps[0]); | |
| 827 | tilemap_mark_all_tiles_dirty (system16a_bootleg_bg_tilemaps[1]); | |
| 828 | tilemap_mark_all_tiles_dirty (system16a_bootleg_text_tilemap); | |
| 657 | tilemap_mark_all_tiles_dirty(state->bg_tilemaps[0]); | |
| 658 | tilemap_mark_all_tiles_dirty(state->bg_tilemaps[1]); | |
| 659 | tilemap_mark_all_tiles_dirty(state->text_tilemap); | |
| 829 | 660 | |
| 830 | tilemap_set_scrollx( system16a_bootleg_text_tilemap, 0, offset_txtx ); | |
| 831 | tilemap_set_scrolly( system16a_bootleg_text_tilemap, 0, offset_txty ); | |
| 661 | tilemap_set_scrollx(state->text_tilemap, 0, offset_txtx); | |
| 662 | tilemap_set_scrolly(state->text_tilemap, 0, offset_txty); | |
| 832 | 663 | |
| 833 | if ((s | |
| 664 | if ((s | |
| 834 | 665 | { |
| 835 | tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_bgscrollx+offset_bg1x ); | |
| 836 | tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_bgscrolly+offset_bg1y+system16_bootleg_back_tilemap_yscroll ); | |
| 837 | tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_fgscrollx+offset_bg0x ); | |
| 838 | tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_fgscrolly+offset_bg0y+system16_bootleg_fore_tilemap_yscroll ); | |
| 666 | tilemap_set_scrollx(state->bg_tilemaps[1], 0, state->bg_scrollx + offset_bg1x); | |
| 667 | tilemap_set_scrolly(state->bg_tilemaps[1], 0, state->bg_scrolly + offset_bg1y + state->back_yscroll); | |
| 668 | tilemap_set_scrollx(state->bg_tilemaps[0], 0, state->fg_scrollx + offset_bg0x); | |
| 669 | tilemap_set_scrolly(state->bg_tilemaps[0], 0, state->fg_scrolly + offset_bg0y + state->fore_yscroll); | |
| 839 | 670 | |
| 840 | tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[0], TILEMAP_DRAW_OPAQUE, 0 ); | |
| 841 | tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[1], 0, 0 ); | |
| 671 | tilemap_draw(bitmap, cliprect, state->bg_tilemaps[0], TILEMAP_DRAW_OPAQUE, 0); | |
| 672 | tilemap_draw(bitmap, cliprect, state->bg_tilemaps[1], 0, 0); | |
| 842 | 673 | |
| 843 | tilemap_set_scrolly( | |
| 674 | tilemap_set_scrolly( | |
| 844 | 675 | |
| 845 | tilemap_draw( | |
| 676 | tilemap_draw( | |
| 846 | 677 | } |
| 847 | else if ((s | |
| 678 | else if ((s | |
| 848 | 679 | { |
| 849 | tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_bgscrollx+187 ); | |
| 850 | tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_bgscrolly+system16_bootleg_back_tilemap_yscroll ); | |
| 851 | tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_fgscrollx+187 ); | |
| 852 | tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_fgscrolly+1+system16_bootleg_fore_tilemap_yscroll ); | |
| 680 | tilemap_set_scrollx(state->bg_tilemaps[0], 0, state->bg_scrollx + 187 ); | |
| 681 | tilemap_set_scrolly(state->bg_tilemaps[0], 0, state->bg_scrolly + state->back_yscroll ); | |
| 682 | tilemap_set_scrollx(state->bg_tilemaps[1], 0, state->fg_scrollx + 187 ); | |
| 683 | tilemap_set_scrolly(state->bg_tilemaps[1], 0, state->fg_scrolly + 1 + state->fore_yscroll ); | |
| 853 | 684 | |
| 854 | tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[1], TILEMAP_DRAW_OPAQUE, 0 ); | |
| 855 | tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[0], 0, 0 ); | |
| 685 | tilemap_draw(bitmap, cliprect, state->bg_tilemaps[1], TILEMAP_DRAW_OPAQUE, 0); | |
| 686 | tilemap_draw(bitmap, cliprect, state->bg_tilemaps[0], 0, 0); | |
| 856 | 687 | |
| 857 | tilemap_set_scrolly( | |
| 688 | tilemap_set_scrolly( | |
| 858 | 689 | |
| 859 | tilemap_draw( | |
| 690 | tilemap_draw( | |
| 860 | 691 | } |
| 861 | 692 | |
| 862 | 693 | /* draw the sprites */ |
| r7356 | r7357 | |
| 866 | 697 | } |
| 867 | 698 | |
| 868 | 699 | /* The Passing Shot 4 Player bootleg has weird scroll registers (different offsets, ^0x7 xor) */ |
| 869 | VIDEO_UPDATE( s | |
| 700 | VIDEO_UPDATE( s | |
| 870 | 701 | { |
| 871 | | |
| 702 | | |
| 872 | 703 | |
| 873 | 704 | // passing shot |
| 874 | offset_txtx = 192; | |
| 875 | offset_txty = 0; | |
| 876 | offset_bg1x = 3; | |
| 877 | offset_bg1y = 32; | |
| 878 | offset_bg0x = 5; | |
| 879 | offset_bg0y = 32; | |
| 705 | int offset_txtx = 192; | |
| 706 | int offset_txty = 0; | |
| 707 | int offset_bg1x = 3; | |
| 708 | int offset_bg1y = 32; | |
| 709 | int offset_bg0x = 5; | |
| 710 | int offset_bg0y = 32; | |
| 880 | 711 | |
| 881 | bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine)); | |
| 712 | bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine)); | |
| 882 | 713 | |
| 883 | 714 | // I can't bring myself to care about dirty tile marking on something which runs at a bazillion % speed anyway, clean code is better |
| 884 | tilemap_mark_all_tiles_dirty (system16a_bootleg_bg_tilemaps[0]); | |
| 885 | tilemap_mark_all_tiles_dirty (system16a_bootleg_bg_tilemaps[1]); | |
| 886 | tilemap_mark_all_tiles_dirty (system16a_bootleg_text_tilemap); | |
| 715 | tilemap_mark_all_tiles_dirty(state->bg_tilemaps[0]); | |
| 716 | tilemap_mark_all_tiles_dirty(state->bg_tilemaps[1]); | |
| 717 | tilemap_mark_all_tiles_dirty(state->text_tilemap); | |
| 887 | 718 | |
| 888 | tilemap_set_scrollx( system16a_bootleg_text_tilemap, 0, offset_txtx ); | |
| 889 | tilemap_set_scrolly( system16a_bootleg_text_tilemap, 0, offset_txty ); | |
| 719 | tilemap_set_scrollx(state->text_tilemap, 0, offset_txtx); | |
| 720 | tilemap_set_scrolly(state->text_tilemap, 0, offset_txty); | |
| 890 | 721 | |
| 891 | if ((s | |
| 722 | if ((s | |
| 892 | 723 | { |
| 893 | tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[1], 0, (system16a_bootleg_bgscrollx^0x7)+offset_bg1x ); | |
| 894 | tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_bgscrolly+offset_bg1y ); | |
| 895 | tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[0], 0, (system16a_bootleg_fgscrollx^0x7)+offset_bg0x ); | |
| 896 | tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_fgscrolly+offset_bg0y ); | |
| 724 | tilemap_set_scrollx(state->bg_tilemaps[1], 0, (state->bg_scrollx ^ 0x7) + offset_bg1x); | |
| 725 | tilemap_set_scrolly(state->bg_tilemaps[1], 0, state->bg_scrolly + offset_bg1y); | |
| 726 | tilemap_set_scrollx(state->bg_tilemaps[0], 0, (state->fg_scrollx ^ 0x7) + offset_bg0x); | |
| 727 | tilemap_set_scrolly(state->bg_tilemaps[0], 0, state->fg_scrolly + offset_bg0y); | |
| 897 | 728 | |
| 898 | tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[0], TILEMAP_DRAW_OPAQUE, 0 ); | |
| 899 | tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[1], 0, 0 ); | |
| 900 | tilemap_draw( bitmap,cliprect, system16a_bootleg_text_tilemap, 0, 0 ); | |
| 729 | tilemap_draw(bitmap, cliprect, state->bg_tilemaps[0], TILEMAP_DRAW_OPAQUE, 0); | |
| 730 | tilemap_draw(bitmap, cliprect, state->bg_tilemaps[1], 0, 0); | |
| 731 | tilemap_draw(bitmap, cliprect, state->text_tilemap, 0, 0); | |
| 901 | 732 | } |
| 902 | 733 | |
| 903 | 734 | /* draw the sprites */ |
| r7356 | r7357 | |
| 911 | 742 | |
| 912 | 743 | VIDEO_UPDATE( system16 ) |
| 913 | 744 | { |
| 914 | if (!sys16_refreshenable) | |
| 745 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)screen->machine->driver_data; | |
| 746 | ||
| 747 | if (!state->refreshenable) | |
| 915 | 748 | { |
| 916 | 749 | bitmap_fill(bitmap, cliprect, 0); |
| 917 | 750 | return 0; |
| 918 | 751 | } |
| 919 | 752 | |
| 920 | update_page(); | |
| 753 | update_page(screen->machine); | |
| 921 | 754 | |
| 922 | bitmap_fill(screen->machine->priority_bitmap,cliprect,0); | |
| 755 | bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); | |
| 923 | 756 | |
| 924 | tilemap_set_scrollx( background, 0, -320-sys16_bg_scrollx+sys16_bgxoffset ); | |
| 925 | tilemap_set_scrolly( background, 0, -256+sys16_bg_scrolly+system16_bootleg_back_tilemap_yscroll ); | |
| 926 | tilemap_set_scrollx( foreground, 0, -320-sys16_fg_scrollx+sys16_fgxoffset ); | |
| 927 | tilemap_set_scrolly( foreground, 0, -256+sys16_fg_scrolly+system16_bootleg_fore_tilemap_yscroll ); | |
| 757 | tilemap_set_scrollx(state->background, 0, -320 - state->bg_scrollx); | |
| 758 | tilemap_set_scrolly(state->background, 0, -256 + state->bg_scrolly + state->back_yscroll); | |
| 759 | tilemap_set_scrollx(state->foreground, 0, -320 - state->fg_scrollx); | |
| 760 | tilemap_set_scrolly(state->foreground, 0, -256 + state->fg_scrolly + state->fore_yscroll); | |
| 928 | 761 | |
| 929 | tilemap_set_scrollx( text_layer, 0, 0 ); | |
| 930 | tilemap_set_scrolly( text_layer, 0, 0+system16_bootleg_text_tilemap_yscroll ); | |
| 762 | tilemap_set_scrollx(state->text_layer, 0, 0); | |
| 763 | tilemap_set_scrolly(state->text_layer, 0, 0 + state->text_yscroll); | |
| 931 | 764 | |
| 932 | tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE, 0x00 ); | |
| 933 | ||
| 934 | 765 | /* Background */ |
| 766 | tilemap_draw(bitmap, cliprect, state->background, TILEMAP_DRAW_OPAQUE, 0x00); | |
| 935 | 767 | |
| 936 | if(sys16_bg_priority_mode) | |
| 937 | { | |
| 938 | tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE | 1, 0x00 ); | |
| 939 | } | |
| 940 | ||
| 941 | if( sys16_bg_priority_mode==2 ) | |
| 942 | { | |
| 943 | tilemap_draw( bitmap,cliprect, background, 1, 0x01 );// body slam (& wrestwar??) | |
| 944 | } | |
| 945 | else if ( sys16_bg_priority_mode==1 ) | |
| 946 | { | |
| 947 | tilemap_draw( bitmap,cliprect, background, 1, 0x03 );// alien syndrome / aurail | |
| 948 | } | |
| 949 | ||
| 950 | 768 | /* Foreground */ |
| 769 | tilemap_draw(bitmap, cliprect, state->foreground, 0, 0x03); | |
| 770 | tilemap_draw(bitmap, cliprect, state->foreground, 1, 0x07); | |
| 951 | 771 | |
| 952 | tilemap_draw( bitmap,cliprect, foreground, 0, 0x03 ); | |
| 953 | tilemap_draw( bitmap,cliprect, foreground, 1, 0x07 ); | |
| 954 | 772 | |
| 955 | ||
| 956 | 773 | /* Text Layer */ |
| 957 | ||
| 958 | if( sys16_textlayer_lo_max!=0 ) | |
| 774 | if (state->textlayer_lo_max != 0) | |
| 959 | 775 | { |
| 960 | tilemap_draw( | |
| 776 | tilemap_draw( | |
| 961 | 777 | } |
| 962 | 778 | |
| 963 | tilemap_draw( | |
| 779 | tilemap_draw( | |
| 964 | 780 | |
| 965 | //draw_sprites(screen->machine, bitmap,cliprect,0 | |
| 781 | //draw_sprites(screen->machine, bitmap, cliprect,0 | |
| 966 | 782 | |
| 967 | 783 | /* draw the sprites */ |
| 968 | 784 | segaic16_sprites_draw(screen, bitmap, cliprect, 0); |
| r7356 | r7357 | |
| 972 | 788 | |
| 973 | 789 | VIDEO_UPDATE( system18old ) |
| 974 | 790 | { |
| 975 | if (!sys16_refreshenable) | |
| 791 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)screen->machine->driver_data; | |
| 792 | ||
| 793 | if (!state->refreshenable) | |
| 976 | 794 | { |
| 977 | bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine)); | |
| 795 | bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine)); | |
| 978 | 796 | return 0; |
| 979 | 797 | } |
| 980 | 798 | |
| 981 | update_page(); | |
| 799 | update_page(screen->machine); | |
| 982 | 800 | |
| 983 | bitmap_fill(screen->machine->priority_bitmap,NULL,0); | |
| 984 | if(sys18_bg2_active) | |
| 985 | tilemap_draw( bitmap,cliprect, background2, 0, 0 ); | |
| 986 | else | |
| 987 | bitmap_fill(bitmap,cliprect,0); | |
| 801 | bitmap_fill(screen->machine->priority_bitmap, NULL, 0); | |
| 988 | 802 | |
| 989 | tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE, 0 ); | |
| 990 | tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE | 1, 0 ); //?? | |
| 991 | tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE | 2, 0 ); //?? | |
| 992 | tilemap_draw( bitmap,cliprect, background, 1, 0x1 ); | |
| 993 | tilemap_draw( bitmap,cliprect, background, 2, 0x3 ); | |
| 803 | bitmap_fill(bitmap,cliprect,0); | |
| 994 | 804 | |
| 995 | if(sys18_fg2_active) | |
| 996 | { | |
| 997 | tilemap_draw( bitmap,cliprect, foreground2, 0, 0x3 ); | |
| 998 | } | |
| 805 | tilemap_draw(bitmap, cliprect, state->background, TILEMAP_DRAW_OPAQUE, 0); | |
| 806 | tilemap_draw(bitmap, cliprect, state->background, TILEMAP_DRAW_OPAQUE | 1, 0); //?? | |
| 807 | tilemap_draw(bitmap, cliprect, state->background, TILEMAP_DRAW_OPAQUE | 2, 0); //?? | |
| 808 | tilemap_draw(bitmap, cliprect, state->background, 1, 0x1); | |
| 809 | tilemap_draw(bitmap, cliprect, state->background, 2, 0x3); | |
| 999 | 810 | |
| 1000 | tilemap_draw( bitmap,cliprect, foreground, 0, 0x3 ); | |
| 811 | tilemap_draw(bitmap, cliprect, state->foreground, 0, 0x3); | |
| 812 | tilemap_draw(bitmap, cliprect, state->foreground, 1, 0x7); | |
| 1001 | 813 | |
| 1002 | if(sys18_fg2_active) | |
| 1003 | { | |
| 1004 | tilemap_draw( bitmap,cliprect, foreground2, 1, 0x7 ); | |
| 1005 | } | |
| 814 | tilemap_draw(bitmap, cliprect, state->text_layer, 1, 0x7); | |
| 815 | tilemap_draw(bitmap, cliprect, state->text_layer, 0, 0xf); | |
| 1006 | 816 | |
| 1007 | tilemap_draw( bitmap,cliprect, foreground, 1, 0x7 ); | |
| 1008 | ||
| 1009 | tilemap_draw( bitmap,cliprect, text_layer, 1, 0x7 ); | |
| 1010 | tilemap_draw( bitmap,cliprect, text_layer, 0, 0xf ); | |
| 1011 | ||
| 1012 | 817 | /* draw the sprites */ |
| 1013 | 818 | segaic16_sprites_draw(screen, bitmap, cliprect, 0); |
| 1014 | 819 |
| r7356 | r7357 | |
|---|---|---|
| 1310 | 1310 | {"rockmanj", CPS_B_21_DEF, mapper_RCM63B }, |
| 1311 | 1311 | {"pnickj", CPS_B_21_DEF, mapper_pnickj }, |
| 1312 | 1312 | {"pang3", CPS_B_21_DEF, mapper_pang3 }, /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */ |
| 1313 | {"pang3j", CPS_B_21_DEF, mapper_pang3 }, /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */ | |
| 1313 | {"pang3n", CPS_B_21_DEF, mapper_pang3 }, /* ^^ */ | |
| 1314 | {"pang3j", CPS_B_21_DEF, mapper_pang3 }, /* ^^ */ | |
| 1314 | 1315 | #ifdef MESS |
| 1315 | 1316 | {"sfzch", CPS_B_21_DEF, mapper_sfzch }, |
| 1316 | 1317 | #endif |
| r7356 | r7357 | |
|---|---|---|
| 158 | 158 | |
| 159 | 159 | if (snes_ppu.sub_add_mode) /* SNES_SUBSCREEN*/ |
| 160 | 160 | { |
| 161 | | |
| 161 | | |
| 162 | 162 | { |
| 163 | | |
| 163 | | |
| 164 | 164 | r = (*colour & 0x1f) + (scanlines[SNES_SUBSCREEN].buffer[offset] & 0x1f); |
| 165 | 165 | g = ((*colour & 0x3e0) >> 5) + ((scanlines[SNES_SUBSCREEN].buffer[offset] & 0x3e0) >> 5); |
| 166 | 166 | b = ((*colour & 0x7c00) >> 10) + ((scanlines[SNES_SUBSCREEN].buffer[offset] & 0x7c00) >> 10); |
| 167 | 167 | clip_max = 1; |
| 168 | break; | |
| 169 | case 0x80: /* sub */ | |
| 168 | } | |
| 169 | else | |
| 170 | { | |
| 171 | /* 0x80 sub */ | |
| 170 | 172 | r = (*colour & 0x1f) - (scanlines[SNES_SUBSCREEN].buffer[offset] & 0x1f); |
| 171 | 173 | g = ((*colour & 0x3e0) >> 5) - ((scanlines[SNES_SUBSCREEN].buffer[offset] & 0x3e0) >> 5); |
| 172 | 174 | b = ((*colour & 0x7c00) >> 10) - ((scanlines[SNES_SUBSCREEN].buffer[offset] & 0x7c00) >> 10); |
| 173 | 175 | if (r > 0x1f) r = 0; |
| 174 | 176 | if (g > 0x1f) g = 0; |
| 175 | 177 | if (b > 0x1f) b = 0; |
| 176 | break; | |
| 177 | 178 | } |
| 178 | 179 | /* only halve if the color is not the back colour */ |
| 179 | 180 | if ((snes_ppu.color_modes & 0x40) && (scanlines[SNES_SUBSCREEN].buffer[offset] != snes_cgram[FIXED_COLOUR])) |
| r7356 | r7357 | |
| 185 | 186 | } |
| 186 | 187 | else /* Fixed colour */ |
| 187 | 188 | { |
| 188 | | |
| 189 | | |
| 189 | 190 | { |
| 190 | | |
| 191 | | |
| 191 | 192 | r = (*colour & 0x1f) + (snes_cgram[FIXED_COLOUR] & 0x1f); |
| 192 | 193 | g = ((*colour & 0x3e0) >> 5) + ((snes_cgram[FIXED_COLOUR] & 0x3e0) >> 5); |
| 193 | 194 | b = ((*colour & 0x7c00) >> 10) + ((snes_cgram[FIXED_COLOUR] & 0x7c00) >> 10); |
| 194 | 195 | clip_max = 1; |
| 195 | break; | |
| 196 | case 0x80: /* sub */ | |
| 196 | } | |
| 197 | else | |
| 198 | { | |
| 199 | /* 0x80: sub */ | |
| 197 | 200 | r = (*colour & 0x1f) - (snes_cgram[FIXED_COLOUR] & 0x1f); |
| 198 | 201 | g = ((*colour & 0x3e0) >> 5) - ((snes_cgram[FIXED_COLOUR] & 0x3e0) >> 5); |
| 199 | 202 | b = ((*colour & 0x7c00) >> 10) - ((snes_cgram[FIXED_COLOUR] & 0x7c00) >> 10); |
| 200 | 203 | if (r > 0x1f) r = 0; |
| 201 | 204 | if (g > 0x1f) g = 0; |
| 202 | 205 | if (b > 0x1f) b = 0; |
| 203 | break; | |
| 204 | 206 | } |
| 205 | 207 | /* halve if necessary */ |
| 206 | 208 | if (snes_ppu.color_modes & 0x40) |
| r7356 | r7357 | |
|---|---|---|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | |
| 221 | VIDEO_UPDATE( schasrcv ) | |
| 221 | VIDEO_UPDATE( schasercv ) | |
| 222 | 222 | { |
| 223 | 223 | mw8080bw_state *state = (mw8080bw_state *)screen->machine->driver_data; |
| 224 | 224 | pen_t pens[NUM_PENS]; |
| r7356 | r7357 | |
|---|---|---|
| 308 | 308 | control registers |
| 309 | 309 | 000: scroll x (low 8 bits) |
| 310 | 310 | 001: -------x scroll x (high bit) |
| 311 | ------x- enable rowscroll? (combasc) | |
| 311 | ------x- enable rowscroll? (combatsc) | |
| 312 | 312 | ----x--- this probably selects an alternate screen layout used in combat |
| 313 | 313 | school where tilemap #2 is overlayed on front and doesn't scroll. |
| 314 | 314 | The 32 lines of the front layer can be individually turned on or |
| r7356 | r7357 | |
| 332 | 332 | --x----- might be sprite / tilemap priority (0 = sprites have priority) |
| 333 | 333 | (combat school, contra, haunted castle(0/1), labyrunr) |
| 334 | 334 | -x------ Chops away the leftmost and rightmost columns, switching the |
| 335 | visible area from 256 to 240 pixels. This is used by combasc on | |
| 335 | visible area from 256 to 240 pixels. This is used by combatsc on | |
| 336 | 336 | the scrolling stages, and by labyrunr on the title screen. |
| 337 | 337 | At first I thought that this enabled an extra bank of 0x40 |
| 338 | sprites, needed by combasc, but labyrunr proves that this is not | |
| 338 | sprites, needed by combatsc, but labyrunr proves that this is not | |
| 339 | 339 | the case |
| 340 | 340 | x------- unknown (contra) |
| 341 | 341 | 004: ----xxxx bits 9-12 of the tile code. Only the bits enabled by the following |
| r7356 | r7357 | |
| 355 | 355 | same ones indexed by register 005). Note that an attribute bit |
| 356 | 356 | can therefore be used at the same time to be BOTH a tile code bit |
| 357 | 357 | and an additional effect. |
| 358 | -------x bit 3 of attribute is bit 3 of color (combasc, fastlane, flkatck) | |
| 358 | -------x bit 3 of attribute is bit 3 of color (combatsc, fastlane, flkatck) | |
| 359 | 359 | ------x- bit 4 of attribute is tile flip X (assumption - no game uses this) |
| 360 | 360 | -----x-- bit 5 of attribute is tile flip Y (flkatck) |
| 361 | ----x--- bit 6 of attribute is tile priority over sprites (combasc, hcastle, | |
| 361 | ----x--- bit 6 of attribute is tile priority over sprites (combatsc, hcastle, | |
| 362 | 362 | labyrunr) |
| 363 | 363 | Note that hcastle sets this bit for layer 0, and bit 6 of the |
| 364 | 364 | attribute is also used as bit 12 of the tile code, however that |
| 365 | 365 | bit is ALWAYS set throughout the game. |
| 366 | combasc uses the bit in the "graduation" scene during attract mode, | |
| 366 | combatsc uses the bit in the "graduation" scene during attract mode, | |
| 367 | 367 | to place soldiers behind the stand. |
| 368 | 368 | Use in labyrunr has not been investigated yet. |
| 369 | 369 | --xx---- palette bank (both tiles and sprites, see contra) |
| r7356 | r7357 | |
| 1333 | 1333 | } |
| 1334 | 1334 | else /* all others */ |
| 1335 | 1335 | { |
| 1336 | //num = (K007121_ctrlram[chip][0x03] & 0x40) ? 0x80 : 0x40; /* WRONG!!! (needed by combasc) */ | |
| 1337 | num = 0x40; // Combasc writes 70 sprites to VRAM at peak but the chip only processes the first 64. | |
| 1336 | //num = (K007121_ctrlram[chip][0x03] & 0x40) ? 0x80 : 0x40; /* WRONG!!! (needed by combatsc) */ | |
| 1337 | num = 0x40; // combatsc writes 70 sprites to VRAM at peak but the chip only processes the first 64. | |
| 1338 | 1338 | |
| 1339 | 1339 | inc = 5; |
| 1340 | 1340 | offs[0] = 0x00; |
| r7356 | r7357 | |
|---|---|---|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | |
| 194 | VIDEO_START( cyberb2p ) | |
| 194 | VIDEO_START( cyberbal2p ) | |
| 195 | 195 | { |
| 196 | 196 | video_start_cyberbal_common(machine, 1); |
| 197 | 197 |
| r7356 | r7357 | |
|---|---|---|
| 308 | 308 | control registers |
| 309 | 309 | 000: scroll x (low 8 bits) |
| 310 | 310 | 001: -------x scroll x (high bit) |
| 311 | ------x- enable rowscroll? (combasc) | |
| 311 | ------x- enable rowscroll? (combatsc) | |
| 312 | 312 | ----x--- this probably selects an alternate screen layout used in combat |
| 313 | 313 | school where tilemap #2 is overlayed on front and doesn't scroll. |
| 314 | 314 | The 32 lines of the front layer can be individually turned on or |
| r7356 | r7357 | |
| 332 | 332 | --x----- might be sprite / tilemap priority (0 = sprites have priority) |
| 333 | 333 | (combat school, contra, haunted castle(0/1), labyrunr) |
| 334 | 334 | -x------ Chops away the leftmost and rightmost columns, switching the |
| 335 | visible area from 256 to 240 pixels. This is used by combasc on | |
| 335 | visible area from 256 to 240 pixels. This is used by combatsc on | |
| 336 | 336 | the scrolling stages, and by labyrunr on the title screen. |
| 337 | 337 | At first I thought that this enabled an extra bank of 0x40 |
| 338 | sprites, needed by combasc, but labyrunr proves that this is not | |
| 338 | sprites, needed by combatsc, but labyrunr proves that this is not | |
| 339 | 339 | the case |
| 340 | 340 | x------- unknown (contra) |
| 341 | 341 | 004: ----xxxx bits 9-12 of the tile code. Only the bits enabled by the following |
| r7356 | r7357 | |
| 355 | 355 | same ones indexed by register 005). Note that an attribute bit |
| 356 | 356 | can therefore be used at the same time to be BOTH a tile code bit |
| 357 | 357 | and an additional effect. |
| 358 | -------x bit 3 of attribute is bit 3 of color (combasc, fastlane, flkatck) | |
| 358 | -------x bit 3 of attribute is bit 3 of color (combatsc, fastlane, flkatck) | |
| 359 | 359 | ------x- bit 4 of attribute is tile flip X (assumption - no game uses this) |
| 360 | 360 | -----x-- bit 5 of attribute is tile flip Y (flkatck) |
| 361 | ----x--- bit 6 of attribute is tile priority over sprites (combasc, hcastle, | |
| 361 | ----x--- bit 6 of attribute is tile priority over sprites (combatsc, hcastle, | |
| 362 | 362 | labyrunr) |
| 363 | 363 | Note that hcastle sets this bit for layer 0, and bit 6 of the |
| 364 | 364 | attribute is also used as bit 12 of the tile code, however that |
| 365 | 365 | bit is ALWAYS set throughout the game. |
| 366 | combasc uses the bit in the "graduation" scene during attract mode, | |
| 366 | combatsc uses the bit in the "graduation" scene during attract mode, | |
| 367 | 367 | to place soldiers behind the stand. |
| 368 | 368 | Use in labyrunr has not been investigated yet. |
| 369 | 369 | --xx---- palette bank (both tiles and sprites, see contra) |
| r7356 | r7357 | |
| 1455 | 1455 | } |
| 1456 | 1456 | else /* all others */ |
| 1457 | 1457 | { |
| 1458 | //num = (k007121->ctrlram[0x03] & 0x40) ? 0x80 : 0x40; /* WRONG!!! (needed by combasc) */ | |
| 1459 | num = 0x40; // Combasc writes 70 sprites to VRAM at peak but the chip only processes the first 64. | |
| 1458 | //num = (k007121->ctrlram[0x03] & 0x40) ? 0x80 : 0x40; /* WRONG!!! (needed by combatsc) */ | |
| 1459 | num = 0x40; // combatsc writes 70 sprites to VRAM at peak but the chip only processes the first 64. | |
| 1460 | 1460 | |
| 1461 | 1461 | inc = 5; |
| 1462 | 1462 | offs[0] = 0x00; |
| r7356 | r7357 | |
| 10122 | 10122 | } |
| 10123 | 10123 | |
| 10124 | 10124 | |
| 10125 | // from drivers/nwk-tr | |
| 10126 | ||
| 10127 | 10125 | /***************************************************************************/ |
| 10128 | 10126 | /* */ |
| 10129 | 10127 | /* 001604 */ |
| r7356 | r7357 | |
| 10341 | 10339 | |
| 10342 | 10340 | READ32_DEVICE_HANDLER( k001604_tile_r ) |
| 10343 | 10341 | { |
| 10344 | // int chip = get_cgboard_id(); | |
| 10345 | 10342 | k001604_state *k001604 = k001604_get_safe_token(device); |
| 10346 | 10343 | |
| 10347 | 10344 | return k001604->tile_ram[offset]; |
| r7356 | r7357 | |
| 10349 | 10346 | |
| 10350 | 10347 | READ32_DEVICE_HANDLER( k001604_char_r ) |
| 10351 | 10348 | { |
| 10352 | // int chip = get_cgboard_id(); | |
| 10353 | 10349 | k001604_state *k001604 = k001604_get_safe_token(device); |
| 10354 | 10350 | |
| 10355 | 10351 | int set, bank; |
| r7356 | r7357 | |
| 10367 | 10363 | return k001604->char_ram[addr]; |
| 10368 | 10364 | } |
| 10369 | 10365 | |
| 10366 | READ32_DEVICE_HANDLER( k001604_reg_r ) | |
| 10367 | { | |
| 10368 | k001604_state *k001604 = k001604_get_safe_token(device); | |
| 10369 | ||
| 10370 | switch (offset) | |
| 10371 | { | |
| 10372 | case 0x54/4: return mame_rand(device->machine) << 16; break; | |
| 10373 | case 0x5c/4: return mame_rand(device->machine) << 16 | mame_rand(device->machine); break; | |
| 10374 | } | |
| 10375 | ||
| 10376 | return k001604->reg[offset]; | |
| 10377 | } | |
| 10378 | ||
| 10370 | 10379 | WRITE32_DEVICE_HANDLER( k001604_tile_w ) |
| 10371 | 10380 | { |
| 10372 | // int chip = get_cgboard_id(); | |
| 10373 | 10381 | k001604_state *k001604 = k001604_get_safe_token(device); |
| 10374 | 10382 | |
| 10375 | 10383 | int x, y; |
| r7356 | r7357 | |
| 10422 | 10430 | |
| 10423 | 10431 | WRITE32_DEVICE_HANDLER( k001604_char_w ) |
| 10424 | 10432 | { |
| 10425 | // int chip = get_cgboard_id(); | |
| 10426 | 10433 | k001604_state *k001604 = k001604_get_safe_token(device); |
| 10427 | 10434 | |
| 10428 | 10435 | int set, bank; |
| r7356 | r7357 | |
| 10445 | 10452 | |
| 10446 | 10453 | WRITE32_DEVICE_HANDLER( k001604_reg_w ) |
| 10447 | 10454 | { |
| 10448 | // int chip = get_cgboard_id(); | |
| 10449 | 10455 | k001604_state *k001604 = k001604_get_safe_token(device); |
| 10450 | 10456 | |
| 10451 | 10457 | COMBINE_DATA(k001604->reg + offset); |
| r7356 | r7357 | |
| 10465 | 10471 | } |
| 10466 | 10472 | } |
| 10467 | 10473 | |
| 10468 | READ32_DEVICE_HANDLER( k001604_reg_r ) | |
| 10469 | { | |
| 10470 | // int chip = get_cgboard_id(); | |
| 10471 | k001604_state *k001604 = k001604_get_safe_token(device); | |
| 10472 | 10474 | |
| 10473 | switch (offset) | |
| 10474 | { | |
| 10475 | case 0x54/4: return mame_rand(device->machine) << 16; break; | |
| 10476 | case 0x5c/4: return mame_rand(device->machine) << 16 | mame_rand(device->machine); break; | |
| 10477 | } | |
| 10478 | ||
| 10479 | return k001604->reg[offset]; | |
| 10480 | } | |
| 10481 | ||
| 10482 | ||
| 10483 | 10475 | /***************************************************************************** |
| 10484 | 10476 | DEVICE INTERFACE |
| 10485 | 10477 | *****************************************************************************/ |
| r7356 | r7357 | |
| 10668 | 10660 | |
| 10669 | 10661 | READ32_DEVICE_HANDLER( k037122_sram_r ) |
| 10670 | 10662 | { |
| 10671 | // int chip = get_cgboard_id(); | |
| 10672 | 10663 | k037122_state *k037122 = k037122_get_safe_token(device); |
| 10673 | 10664 | |
| 10674 | 10665 | return k037122->tile_ram[offset]; |
| r7356 | r7357 | |
| 10676 | 10667 | |
| 10677 | 10668 | WRITE32_DEVICE_HANDLER( k037122_sram_w ) |
| 10678 | 10669 | { |
| 10679 | // int chip = get_cgboard_id(); | |
| 10680 | 10670 | k037122_state *k037122 = k037122_get_safe_token(device); |
| 10681 | 10671 | |
| 10682 | 10672 | COMBINE_DATA(k037122->tile_ram + offset); |
| r7356 | r7357 | |
| 10716 | 10706 | |
| 10717 | 10707 | READ32_DEVICE_HANDLER( k037122_char_r ) |
| 10718 | 10708 | { |
| 10719 | // int chip = get_cgboard_id(); | |
| 10720 | 10709 | k037122_state *k037122 = k037122_get_safe_token(device); |
| 10721 | 10710 | int bank = k037122->reg[0x30 / 4] & 0x7; |
| 10722 | 10711 | |
| r7356 | r7357 | |
| 10725 | 10714 | |
| 10726 | 10715 | WRITE32_DEVICE_HANDLER( k037122_char_w ) |
| 10727 | 10716 | { |
| 10728 | // int chip = get_cgboard_id(); | |
| 10729 | 10717 | k037122_state *k037122 = k037122_get_safe_token(device); |
| 10730 | 10718 | int bank = k037122->reg[0x30 / 4] & 0x7; |
| 10731 | 10719 | UINT32 addr = offset + (bank * (0x40000/4)); |
| r7356 | r7357 | |
| 10736 | 10724 | |
| 10737 | 10725 | READ32_DEVICE_HANDLER( k037122_reg_r ) |
| 10738 | 10726 | { |
| 10739 | // int chip = get_cgboard_id(); | |
| 10740 | 10727 | k037122_state *k037122 = k037122_get_safe_token(device); |
| 10741 | 10728 | |
| 10742 | 10729 | switch (offset) |
| r7356 | r7357 | |
| 10751 | 10738 | |
| 10752 | 10739 | WRITE32_DEVICE_HANDLER( k037122_reg_w ) |
| 10753 | 10740 | { |
| 10754 | // int chip = get_cgboard_id(); | |
| 10755 | 10741 | k037122_state *k037122 = k037122_get_safe_token(device); |
| 10756 | 10742 | |
| 10757 | 10743 | COMBINE_DATA(k037122->reg + offset); |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "emu.h" |
| 8 | #include "segaic16.h" | |
| 9 | #include "includes/system16.h" | |
| 8 | #include "video/segaic16.h" | |
| 9 | #include "includes/segas16.h" | |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "emu.h" |
| 8 | #include "segaic16.h" | |
| 9 | #include "includes/system16.h" | |
| 8 | #include "video/segaic16.h" | |
| 9 | #include "includes/segas16.h" | |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 |
| r7356 | r7357 | |
|---|---|---|
| 1110 | 1110 | } |
| 1111 | 1111 | |
| 1112 | 1112 | // xrally's pink tilemaps make me think this is a tilemap enable bit. |
| 1113 | // | |
| 1113 | // fa | |
| 1114 | 1114 | //if (!(tileregs & 0x0040)) return; |
| 1115 | 1115 | |
| 1116 | 1116 | // set the transmask so our manual copy is correct |
| r7356 | r7357 | |
| 1680 | 1680 | INT8 texIndex; // Which texture to draw from (0x00-0x0f) |
| 1681 | 1681 | INT8 texType; // How to index into the texture |
| 1682 | 1682 | UINT32 palOffset; // The base offset where this object's palette starts. |
| 1683 | UINT32 palPageSize; // The size of the palette page that is being pointed to. | |
| 1683 | 1684 | |
| 1684 | 1685 | UINT32 debugColor; // Will go away someday. Used to explicitly color polygons for debugging. |
| 1685 | 1686 | }; |
| r7356 | r7357 | |
| 1895 | 1896 | struct polygon lastPoly = { 0 }; |
| 1896 | 1897 | const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen); |
| 1897 | 1898 | |
| 1898 | ||
| 1899 | 1899 | ///////////////// |
| 1900 | 1900 | // HEADER INFO // |
| 1901 | 1901 | ///////////////// |
| r7356 | r7357 | |
| 1949 | 1949 | // [20] - ???? always 0 ???? |
| 1950 | 1950 | //////////////////////////////////////////////*/ |
| 1951 | 1951 | |
| 1952 | // Debug - ajg | |
| 1953 | //UINT32 tdColor = 0xff000000; | |
| 1954 | //if (packet[1] & 0x1000) tdColor |= 0x00ff0000; | |
| 1955 | //if (packet[1] & 0x2000) tdColor |= 0x0000ff00; | |
| 1956 | //if (packet[1] & 0x4000) tdColor |= 0x000000ff; | |
| 1957 | //if (packet[1] & 0x8000) tdColor |= 0xffffffff; | |
| 1958 | ||
| 1959 | 1952 | // 3d ROM Offset |
| 1960 | 1953 | UINT16* threeDRoms = (UINT16*)(memory_region(machine, "verts")); |
| 1961 | 1954 | UINT32 threeDOffset = (((UINT32)packet[2]) << 16) | ((UINT32)packet[3]); |
| r7356 | r7357 | |
| 1968 | 1961 | return; |
| 1969 | 1962 | } |
| 1970 | 1963 | |
| 1971 | ||
| 1964 | ||
| 1972 | 1965 | // Debug - ajg |
| 1973 | 1966 | printf("%08x : ", threeDOffset*3*2); |
| 1974 | 1967 | for (int k = 0; k < 7*3; k++) |
| r7356 | r7357 | |
| 1977 | 1970 | if ((k % 3) == 2) printf(" "); |
| 1978 | 1971 | } |
| 1979 | 1972 | printf("\n"); |
| 1980 | } | |
| 1981 | */ | |
| 1973 | */ | |
| 1982 | 1974 | |
| 1983 | 1975 | // There are 4 hunks per address. |
| 1984 | 1976 | address[0] = threeDPointer[0]; |
| r7356 | r7357 | |
| 2015 | 2007 | address[2] |= (megaOffset << 16); |
| 2016 | 2008 | address[3] |= (megaOffset << 16); |
| 2017 | 2009 | |
| 2010 | // Debug - ajg | |
| 2011 | //UINT32 tdColor = 0xff000000; | |
| 2012 | //if (threeDPointer[14] & 0x0002) tdColor |= 0x00ff0000; | |
| 2013 | //if (threeDPointer[14] & 0x0001) tdColor |= 0x0000ff00; | |
| 2014 | //if (threeDPointer[14] & 0x0000) tdColor |= 0x000000ff; | |
| 2015 | ||
| 2018 | 2016 | /* For all 4 polygon chunks */ |
| 2019 | 2017 | for (int k = 0; k < 4; k++) |
| 2020 | 2018 | { |
| r7356 | r7357 | |
| 2055 | 2053 | //break; |
| 2056 | 2054 | |
| 2057 | 2055 | // TEXTURE |
| 2058 | /* The | |
| 2056 | /* The | |
| 2059 | 2057 | if (chunkOffset[1] & 0x1000) polys[*numPolys].texType = 0x1; |
| 2060 | 2058 | else polys[*numPolys].texType = 0x0; |
| 2061 | 2059 | |
| r7356 | r7357 | |
| 2064 | 2062 | |
| 2065 | 2063 | // PALETTE |
| 2066 | 2064 | polys[*numPolys].palOffset = 0; |
| 2065 | polys[*numPolys].palPageSize = 0x100; | |
| 2067 | 2066 | |
| 2068 | /* FIXME: This really isn't correct - commenting out this line fixes the palette in roadedge snk intro */ | |
| 2067 | /* FIXME: This isn't correct. | |
| 2068 | Buriki & Xrally need this line. Roads Edge needs it removed. | |
| 2069 | So instead we're looking for a bit that is on for XRally & Buriki, but noone else. */ | |
| 2069 | 2070 | if (hng64_3dregs[0x00/4] & 0x2000) |
| 2070 | 2071 | { |
| 2071 | 2072 | polys[*numPolys].palOffset += 0x800; |
| 2072 | 2073 | } |
| 2073 | 2074 | |
| 2074 | // Apply the dynamic palette offset if its flag is set, otherwise use the fixed one from the ROM | |
| 2075 | //UINT16 explicitPaletteValue0 = ((chunkOffset[?] & 0x????) >> ?) * 0x800; | |
| 2076 | UINT16 explicitPaletteValue1 = ((chunkOffset[1] & 0x0f00) >> 8) * 0x080; | |
| 2077 | UINT16 explicitPaletteValue2 = ((chunkOffset[1] & 0x00f0) >> 4) * 0x008; | |
| 2078 | ||
| 2079 | // The presence of 0x00f0 *probably* sets 0x10-sized palette addressing. | |
| 2080 | if (explicitPaletteValue2) polys[*numPolys].palPageSize = 0x10; | |
| 2081 | ||
| 2082 | // Apply the dynamic palette offset if its flag is set, otherwise stick with the fixed one | |
| 2075 | 2083 | if ((packet[1] & 0x0100)) |
| 2076 | 2084 | { |
| 2077 | polys[*numPolys].palOffset += paletteState3d * 0x80; | |
| 2078 | /* TODO: Does the explicit palette bit do anything when the dynamic palette flag is on? */ | |
| 2079 | } | |
| 2080 | else | |
| 2081 | { | |
| 2082 | UINT8 explicitPaletteValue = (chunkOffset[1] & 0x0f00) >> 8; | |
| 2083 | polys[*numPolys].palOffset += explicitPaletteValue * 0x80; | |
| 2084 | } | |
| 2085 | explicitPaletteValue1 = paletteState3d * 0x80; | |
| 2086 | explicitPaletteValue2 = 0; // This is probably hiding somewhere in operation 0011 | |
| 2087 | } | |
| 2085 | 2088 | |
| 2089 | polys[*numPolys].palOffset += (explicitPaletteValue1 + explicitPaletteValue2); | |
| 2090 | ||
| 2091 | ||
| 2092 | ||
| 2086 | 2093 | UINT8 chunkLength = 0; |
| 2087 | 2094 | switch(chunkType) |
| 2088 | 2095 | { |
| r7356 | r7357 | |
| 2119 | 2126 | polys[*numPolys].vert[m].normal[1] = uToF(chunkOffset[10 + (9*m)] ); |
| 2120 | 2127 | polys[*numPolys].vert[m].normal[2] = uToF(chunkOffset[11 + (9*m)] ); |
| 2121 | 2128 | polys[*numPolys].vert[m].normal[3] = 0.0f; |
| 2122 | ||
| 2123 | // !!! DUMB !!! | |
| 2124 | polys[*numPolys].vert[m].light[0] = polys[*numPolys].vert[m].texCoords[0] * 255.0f; | |
| 2125 | polys[*numPolys].vert[m].light[1] = polys[*numPolys].vert[m].texCoords[1] * 255.0f; | |
| 2126 | polys[*numPolys].vert[m].light[2] = polys[*numPolys].vert[m].texCoords[2] * 255.0f; | |
| 2127 | 2129 | } |
| 2128 | 2130 | |
| 2129 | 2131 | // Redundantly called, but it works... |
| r7356 | r7357 | |
| 2159 | 2161 | polys[*numPolys].vert[m].normal[1] = uToF(chunkOffset[22]); |
| 2160 | 2162 | polys[*numPolys].vert[m].normal[2] = uToF(chunkOffset[23]); |
| 2161 | 2163 | polys[*numPolys].vert[m].normal[3] = 0.0f; |
| 2162 | ||
| 2163 | // !!! DUMB !!! | |
| 2164 | polys[*numPolys].vert[m].light[0] = polys[*numPolys].vert[m].texCoords[0] * 255.0f; | |
| 2165 | polys[*numPolys].vert[m].light[1] = polys[*numPolys].vert[m].texCoords[1] * 255.0f; | |
| 2166 | polys[*numPolys].vert[m].light[2] = polys[*numPolys].vert[m].texCoords[2] * 255.0f; | |
| 2167 | 2164 | } |
| 2168 | 2165 | |
| 2169 | 2166 | // Redundantly called, but it works... |
| r7356 | r7357 | |
| 2203 | 2200 | polys[*numPolys].vert[0].normal[2] = uToF(chunkOffset[11]); |
| 2204 | 2201 | polys[*numPolys].vert[0].normal[3] = 0.0f; |
| 2205 | 2202 | |
| 2206 | polys[*numPolys].vert[0].light[0] = polys[*numPolys].vert[0].texCoords[0] * 255.0f; | |
| 2207 | polys[*numPolys].vert[0].light[1] = polys[*numPolys].vert[0].texCoords[1] * 255.0f; | |
| 2208 | polys[*numPolys].vert[0].light[2] = polys[*numPolys].vert[0].texCoords[2] * 255.0f; | |
| 2209 | ||
| 2210 | 2203 | polys[*numPolys].faceNormal[0] = uToF(chunkOffset[12]); |
| 2211 | 2204 | polys[*numPolys].faceNormal[1] = uToF(chunkOffset[13]); |
| 2212 | 2205 | polys[*numPolys].faceNormal[2] = uToF(chunkOffset[14]); |
| r7356 | r7357 | |
| 2238 | 2231 | polys[*numPolys].vert[0].texCoords[2] = 0.0f; |
| 2239 | 2232 | polys[*numPolys].vert[0].texCoords[3] = 1.0f; |
| 2240 | 2233 | |
| 2241 | // !!! DUMB !!! | |
| 2242 | polys[*numPolys].vert[0].light[0] = polys[*numPolys].vert[0].texCoords[0] * 255.0f; | |
| 2243 | polys[*numPolys].vert[0].light[1] = polys[*numPolys].vert[0].texCoords[1] * 255.0f; | |
| 2244 | polys[*numPolys].vert[0].light[2] = polys[*numPolys].vert[0].texCoords[2] * 255.0f; | |
| 2245 | ||
| 2246 | 2234 | // This normal could be right, but I'm not entirely sure - there is no normal in the 18 bytes! |
| 2247 | 2235 | polys[*numPolys].vert[0].normal[0] = lastPoly.faceNormal[0]; |
| 2248 | 2236 | polys[*numPolys].vert[0].normal[1] = lastPoly.faceNormal[1]; |
| r7356 | r7357 | |
| 2848 | 2836 | /** Output: none **/ |
| 2849 | 2837 | /*********************************************************************/ |
| 2850 | 2838 | INLINE void FillSmoothTexPCHorizontalLine(running_machine *machine, |
| 2851 | int textureType, int palOffset, int texIndex, int debugColor, | |
| 2839 | int textureType, int palOffset, int palPageSize, | |
| 2840 | int texIndex, int debugColor, | |
| 2852 | 2841 | int x_start, int x_end, int y, float z_start, float z_delta, |
| 2853 | 2842 | float w_start, float w_delta, float r_start, float r_delta, |
| 2854 | 2843 | float g_start, float g_delta, float b_start, float b_delta, |
| r7356 | r7357 | |
| 2859 | 2848 | |
| 2860 | 2849 | UINT8 paletteEntry = 0; |
| 2861 | 2850 | float t_coord, s_coord; |
| 2862 | const UINT8 *textureOffset; | |
| 2863 | 2851 | const UINT8 *gfx = memory_region(machine, "textures"); |
| 2852 | const UINT8 *textureOffset = &gfx[texIndex * 1024 * 1024]; | |
| 2864 | 2853 | |
| 2865 | if (texIndex >= 0) | |
| 2866 | textureOffset = &gfx[texIndex * 1024 * 1024]; | |
| 2867 | else | |
| 2868 | textureOffset = 0x00; | |
| 2869 | ||
| 2870 | 2854 | for (; x_start <= x_end; x_start++) |
| 2871 | 2855 | { |
| 2872 | 2856 | if (z_start < (*db)) |
| r7356 | r7357 | |
| 2875 | 2859 | t_coord = t_start / w_start; |
| 2876 | 2860 | s_coord = s_start / w_start; |
| 2877 | 2861 | |
| 2878 | // DEBUG COLOR MODE | |
| 2879 | if (debugColor != 0x00000000) | |
| 2862 | if ((debugColor & 0xff000000) == 0x01000000) | |
| 2880 | 2863 | { |
| 2864 | // UV COLOR MODE | |
| 2865 | *cb = MAKE_ARGB(255, (UINT8)(s_coord*255.0f), (UINT8)(t_coord*255.0f), (UINT8)(0)); | |
| 2866 | *db = z_start; | |
| 2867 | } | |
| 2868 | else if ((debugColor & 0xff000000) == 0x02000000) | |
| 2869 | { | |
| 2870 | // Lit | |
| 2871 | *cb = MAKE_ARGB(255, (UINT8)(r_start/w_start), (UINT8)(g_start/w_start), (UINT8)(b_start/w_start)); | |
| 2872 | *db = z_start; | |
| 2873 | } | |
| 2874 | else if ((debugColor & 0xff000000) == 0xff000000) | |
| 2875 | { | |
| 2876 | // DEBUG COLOR MODE | |
| 2881 | 2877 | *cb = debugColor; |
| 2882 | 2878 | *db = z_start; |
| 2883 | 2879 | } |
| 2884 | else | |
| 2880 | else | |
| 2885 | 2881 | { |
| 2886 | 2882 | // TEXTURED |
| 2887 | 2883 | if (textureType == 0x0) |
| r7356 | r7357 | |
| 2892 | 2888 | // Naieve Alpha Implementation (?) - don't draw if you're at texture index 0... |
| 2893 | 2889 | if (paletteEntry != 0) |
| 2894 | 2890 | { |
| 2891 | paletteEntry %= palPageSize; | |
| 2892 | ||
| 2895 | 2893 | // Greyscale texture test. |
| 2896 | 2894 | // *cb = MAKE_ARGB(255, (UINT8)paletteEntry, (UINT8)paletteEntry, (UINT8)paletteEntry); |
| 2897 | 2895 | *cb = machine->pens[palOffset + paletteEntry]; |
| 2898 | 2896 | *db = z_start; |
| 2899 | 2897 | } |
| 2900 | 2898 | } |
| 2901 | else | |
| 2902 | { | |
| 2903 | // UNTEXTURED | |
| 2904 | *cb = MAKE_ARGB(255, (UINT8)(r_start/w_start), (UINT8)(g_start/w_start), (UINT8)(b_start/w_start)); | |
| 2905 | *db = z_start; | |
| 2906 | } | |
| 2907 | 2899 | } |
| 2908 | 2900 | db++; |
| 2909 | 2901 | cb++; |
| r7356 | r7357 | |
| 2951 | 2943 | float A[4], float B[4], float C[4], |
| 2952 | 2944 | float Ca[3], float Cb[3], float Cc[3], // PER-VERTEX RGB COLORS |
| 2953 | 2945 | float Ta[2], float Tb[2], float Tc[2], // PER-VERTEX (S,T) TEX-COORDS |
| 2954 | int textureType, int palOffset, int texIndex, int debugColor) | |
| 2946 | int textureType, int palOffset, int palPageSize, | |
| 2947 | int texIndex, int debugColor) | |
| 2955 | 2948 | { |
| 2956 | 2949 | // Get our order of points by increasing y-coord |
| 2957 | 2950 | float *p_min = ((A[1] <= B[1]) && (A[1] <= C[1])) ? A : ((B[1] <= A[1]) && (B[1] <= C[1])) ? B : C; |
| r7356 | r7357 | |
| 3142 | 3135 | |
| 3143 | 3136 | // Pass the horizontal line to the filler, this could be put in the routine |
| 3144 | 3137 | // then interpolate for the next values of x and z |
| 3145 | FillSmoothTexPCHorizontalLine(machine, textureType, palOffset, texIndex, debugColor, | |
| 3138 | FillSmoothTexPCHorizontalLine(machine, textureType, palOffset, palPageSize, texIndex, debugColor, | |
| 3146 | 3139 | x_start, x_end, y_min, z_interp_x, z_delta_x, w_interp_x, w_delta_x, |
| 3147 | 3140 | r_interp_x, r_delta_x, g_interp_x, g_delta_x, b_interp_x, b_delta_x, |
| 3148 | 3141 | s_interp_x, s_delta_x, t_interp_x, t_delta_x); |
| r7356 | r7357 | |
| 3222 | 3215 | |
| 3223 | 3216 | // Pass the horizontal line to the filler, this could be put in the routine |
| 3224 | 3217 | // then interpolate for the next values of x and z |
| 3225 | FillSmoothTexPCHorizontalLine(machine, textureType, palOffset, texIndex, debugColor, | |
| 3218 | FillSmoothTexPCHorizontalLine(machine, textureType, palOffset, palPageSize, texIndex, debugColor, | |
| 3226 | 3219 | x_start, x_end, y_mid, z_interp_x, z_delta_x, w_interp_x, w_delta_x, |
| 3227 | 3220 | r_interp_x, r_delta_x, g_interp_x, g_delta_x, b_interp_x, b_delta_x, |
| 3228 | 3221 | s_interp_x, s_delta_x, t_interp_x, t_delta_x); |
| r7356 | r7357 | |
| 3258 | 3251 | p->vert[0].clipCoords, p->vert[j].clipCoords, p->vert[j+1].clipCoords, |
| 3259 | 3252 | p->vert[0].light, p->vert[j].light, p->vert[j+1].light, |
| 3260 | 3253 | p->vert[0].texCoords, p->vert[j].texCoords, p->vert[j+1].texCoords, |
| 3261 | p->texType, p->palOffset, p->texIndex, p->debugColor); | |
| 3262 | ||
| 3254 | p->texType, p->palOffset, p->palPageSize, | |
| 3255 | p->texIndex, p->debugColor); | |
| 3263 | 3256 | } |
| 3264 | 3257 | } |
| 3265 | 3258 |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "emu.h" |
| 8 | #include "segaic16.h" | |
| 9 | #include "includes/system16.h" | |
| 8 | #include "video/segaic16.h" | |
| 9 | #include "includes/segas16.h" | |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 |
| r7356 | r7357 | |
|---|---|---|
| 455 | 455 | case 0x100/2 : megasys1_sprite_flag = new_data; break; |
| 456 | 456 | |
| 457 | 457 | case 0x300/2 : megasys1_screen_flag = new_data; |
| 458 | if (new_data & 0x10) | |
| 459 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_RESET, ASSERT_LINE); | |
| 460 | else | |
| 461 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_RESET, CLEAR_LINE); | |
| 458 | if (devtag_get_device(space->machine, "soundcpu")) | |
| 459 | { | |
| 460 | if (new_data & 0x10) | |
| 461 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_RESET, ASSERT_LINE); | |
| 462 | else | |
| 463 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_RESET, CLEAR_LINE); | |
| 464 | } | |
| 462 | 465 | break; |
| 463 | 466 | |
| 464 | 467 | case 0x308/2 : soundlatch_word_w(space,0,new_data,0xffff); |
| r7356 | r7357 | |
|---|---|---|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | WRITE8_HANDLER( lastmis | |
| 185 | WRITE8_HANDLER( lastmisn_control_w ) | |
| 186 | 186 | { |
| 187 | 187 | dec8_state *state = (dec8_state *)space->machine->driver_data; |
| 188 | 188 | |
| r7356 | r7357 | |
| 215 | 215 | state->scroll2[2] = (data >> 6) & 1; |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | WRITE8_HANDLER( lastmis | |
| 218 | WRITE8_HANDLER( lastmisn_scrollx_w ) | |
| 219 | 219 | { |
| 220 | 220 | dec8_state *state = (dec8_state *)space->machine->driver_data; |
| 221 | 221 | state->scroll2[1] = data; |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | WRITE8_HANDLER( lastmis | |
| 224 | WRITE8_HANDLER( lastmisn_scrolly_w ) | |
| 225 | 225 | { |
| 226 | 226 | dec8_state *state = (dec8_state *)space->machine->driver_data; |
| 227 | 227 | state->scroll2[3] = data; |
| r7356 | r7357 | |
| 640 | 640 | |
| 641 | 641 | /******************************************************************************/ |
| 642 | 642 | |
| 643 | VIDEO_UPDATE( lastmis | |
| 643 | VIDEO_UPDATE( lastmisn ) | |
| 644 | 644 | { |
| 645 | 645 | dec8_state *state = (dec8_state *)screen->machine->driver_data; |
| 646 | 646 | tilemap_set_scrollx(state->pf0_tilemap, 0, ((state->scroll2[0] << 8)+ state->scroll2[1])); |
| r7356 | r7357 | |
| 667 | 667 | return 0; |
| 668 | 668 | } |
| 669 | 669 | |
| 670 | static TILEMAP_MAPPER( lastmis | |
| 670 | static TILEMAP_MAPPER( lastmisn_scan_rows ) | |
| 671 | 671 | { |
| 672 | 672 | /* logical (col,row) -> memory offset */ |
| 673 | 673 | return ((col & 0x0f) + ((row & 0x0f) << 4)) + ((col & 0x10) << 4) + ((row & 0x10) << 5); |
| 674 | 674 | } |
| 675 | 675 | |
| 676 | static TILE_GET_INFO( get_lastmis | |
| 676 | static TILE_GET_INFO( get_lastmisn_tile_info ) | |
| 677 | 677 | { |
| 678 | 678 | dec8_state *state = (dec8_state *)machine->driver_data; |
| 679 | 679 | int offs = tile_index * 2; |
| r7356 | r7357 | |
| 692 | 692 | 0); |
| 693 | 693 | } |
| 694 | 694 | |
| 695 | static TILE_GET_INFO( get_lastmis | |
| 695 | static TILE_GET_INFO( get_lastmisn_fix_tile_info ) | |
| 696 | 696 | { |
| 697 | 697 | dec8_state *state = (dec8_state *)machine->driver_data; |
| 698 | 698 | int offs = tile_index << 1; |
| r7356 | r7357 | |
| 706 | 706 | 0); |
| 707 | 707 | } |
| 708 | 708 | |
| 709 | VIDEO_START( lastmis | |
| 709 | VIDEO_START( lastmisn ) | |
| 710 | 710 | { |
| 711 | 711 | dec8_state *state = (dec8_state *)machine->driver_data; |
| 712 | state->pf0_tilemap = tilemap_create(machine, get_lastmiss_tile_info, lastmiss_scan_rows, 16, 16, 32, 32); | |
| 713 | state->fix_tilemap = tilemap_create(machine, get_lastmiss_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 712 | state->pf0_tilemap = tilemap_create(machine, get_lastmisn_tile_info, lastmisn_scan_rows, 16, 16, 32, 32); | |
| 713 | state->fix_tilemap = tilemap_create(machine, get_lastmisn_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 714 | 714 | |
| 715 | 715 | tilemap_set_transparent_pen(state->fix_tilemap, 0); |
| 716 | 716 | state->game_uses_priority = 0; |
| r7356 | r7357 | |
| 719 | 719 | VIDEO_START( shackled ) |
| 720 | 720 | { |
| 721 | 721 | dec8_state *state = (dec8_state *)machine->driver_data; |
| 722 | state->pf0_tilemap = tilemap_create(machine, get_lastmiss_tile_info, lastmiss_scan_rows, 16, 16, 32, 32); | |
| 723 | state->fix_tilemap = tilemap_create(machine, get_lastmiss_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 722 | state->pf0_tilemap = tilemap_create(machine, get_lastmisn_tile_info, lastmisn_scan_rows, 16, 16, 32, 32); | |
| 723 | state->fix_tilemap = tilemap_create(machine, get_lastmisn_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 724 | 724 | |
| 725 | 725 | tilemap_set_transparent_pen(state->fix_tilemap, 0); |
| 726 | 726 | tilemap_set_transmask(state->pf0_tilemap, 0, 0x000f, 0xfff0); /* Bottom 12 pens */ |
| r7356 | r7357 | |
|---|---|---|
| 1 | 1 | /*********************************************************************************************** |
| 2 | 2 | |
| 3 | Sega System C/C2 Driver | |
| 4 | ----------------------- | |
| 5 | Version 0.54 - 02 Feb 2003 | |
| 6 | (for changes see drivers\segac2.c) | |
| 3 | Old Genesis VDP emulation still used by System 18 | |
| 4 | ------------------------------------------------- | |
| 7 | 5 | |
| 6 | (originally used for Sega System C/C2 Driver, source version 0.54 - 02 Feb 2003) | |
| 7 | ||
| 8 | 8 | ***********************************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "emu.h" |
| 11 | 11 | #include "sound/sn76496.h" |
| 12 | ||
| 13 | 12 | #include "includes/genesis.h" |
| 14 | 13 | |
| 15 | ||
| 16 | 14 | static running_device *genesis_screen; |
| 17 | 15 | |
| 18 | 16 | |
| r7356 | r7357 | |
| 195 | 193 | state_save_register_global(screen->machine, window_vpos); |
| 196 | 194 | } |
| 197 | 195 | |
| 198 | VIDEO_START(genesis) | |
| 199 | { | |
| 200 | start_genesis_vdp(machine->primary_screen); | |
| 201 | } | |
| 202 | 196 | |
| 203 | ||
| 204 | VIDEO_START( segac2 ) | |
| 205 | { | |
| 206 | start_genesis_vdp(machine->primary_screen); | |
| 207 | ||
| 208 | /* C2 has separate sprite/background palettes */ | |
| 209 | genesis_sp_pal_lookup[0] = 0x100; | |
| 210 | genesis_sp_pal_lookup[1] = 0x110; | |
| 211 | genesis_sp_pal_lookup[2] = 0x120; | |
| 212 | genesis_sp_pal_lookup[3] = 0x130; | |
| 213 | } | |
| 214 | ||
| 215 | ||
| 216 | ||
| 217 | ||
| 218 | ||
| 219 | ||
| 220 | 197 | void system18_vdp_start(running_machine *machine) |
| 221 | 198 | { |
| 222 | 199 | start_genesis_vdp(machine->primary_screen); |
| r7356 | r7357 | |
| 243 | 220 | |
| 244 | 221 | ******************************************************************************/ |
| 245 | 222 | |
| 246 | /* set the display enable bit */ | |
| 247 | void segac2_enable_display(running_machine *machine, int enable) | |
| 248 | { | |
| 249 | video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen)); | |
| 250 | display_enable = enable; | |
| 251 | } | |
| 252 | ||
| 253 | ||
| 254 | VIDEO_UPDATE( genesis ) | |
| 255 | { | |
| 256 | int y; | |
| 257 | ||
| 258 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 259 | drawline(BITMAP_ADDR16(bitmap, y, 0), y, 0); | |
| 260 | return 0; | |
| 261 | } | |
| 262 | ||
| 263 | ||
| 264 | VIDEO_UPDATE( segac2 ) | |
| 265 | { | |
| 266 | if (!display_enable) | |
| 267 | bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine)); | |
| 268 | else | |
| 269 | VIDEO_UPDATE_CALL(genesis); | |
| 270 | return 0; | |
| 271 | } | |
| 272 | ||
| 273 | ||
| 274 | ||
| 275 | ||
| 276 | /* megaplay, draws either Genesis or SMS (single screen display) */ | |
| 277 | ||
| 278 | /* core refresh: computes the final screen */ | |
| 279 | #if 0 | |
| 280 | VIDEO_UPDATE( megaplay ) | |
| 281 | { | |
| 282 | int y; | |
| 283 | ||
| 284 | ||
| 285 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 286 | drawline(BITMAP_ADDR16(bitmap, y, 0), y, 0); | |
| 287 | ||
| 288 | //VIDEO_UPDATE_CALL(megaplay_normal); | |
| 289 | ||
| 290 | return 0; | |
| 291 | } | |
| 292 | #endif | |
| 293 | ||
| 294 | 223 | void system18_vdp_update( bitmap_t *bitmap, const rectangle *cliprect ) |
| 295 | 224 | { |
| 296 | 225 | int y; |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "emu.h" |
| 8 | #include "segaic16.h" | |
| 8 | #include "video/segaic16.h" | |
| 9 | 9 | #include "includes/genesis.h" |
| 10 | #include "includes/s | |
| 10 | #include "includes/s | |
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | |
| r7356 | r7357 | |
| 20 | 20 | #define DEBUG_VDP (0) |
| 21 | 21 | |
| 22 | 22 | |
| 23 | ||
| 24 | 23 | /************************************* |
| 25 | 24 | * |
| 26 | * Statics | |
| 27 | * | |
| 28 | *************************************/ | |
| 29 | ||
| 30 | static bitmap_t *tempbitmap; | |
| 31 | ||
| 32 | static UINT8 grayscale_enable; | |
| 33 | static UINT8 vdp_enable; | |
| 34 | static UINT8 vdp_mixing; | |
| 35 | ||
| 36 | ||
| 37 | ||
| 38 | /************************************* | |
| 39 | * | |
| 40 | 25 | * Video startup |
| 41 | 26 | * |
| 42 | 27 | *************************************/ |
| 43 | 28 | |
| 44 | 29 | VIDEO_START( system18 ) |
| 45 | 30 | { |
| 31 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 46 | 32 | int width, height; |
| 47 | 33 | |
| 48 | tempbitmap = NULL; | |
| 49 | grayscale_enable = 0; | |
| 50 | vdp_enable = 0; | |
| 51 | vdp_mixing = 0; | |
| 34 | state->grayscale_enable = 0; | |
| 35 | state->vdp_enable = 0; | |
| 36 | state->vdp_mixing = 0; | |
| 52 | 37 | |
| 53 | 38 | /* compute palette info */ |
| 54 | 39 | segaic16_palette_init(0x800); |
| r7356 | r7357 | |
| 65 | 50 | /* create a temp bitmap to draw the VDP data into */ |
| 66 | 51 | width = video_screen_get_width(machine->primary_screen); |
| 67 | 52 | height = video_screen_get_height(machine->primary_screen); |
| 68 | tempbitmap = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16); | |
| 53 | state->tmp_bitmap = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16); | |
| 54 | ||
| 55 | ||
| 56 | state_save_register_global(machine, state->grayscale_enable); | |
| 57 | state_save_register_global(machine, state->vdp_enable); | |
| 58 | state_save_register_global(machine, state->vdp_mixing); | |
| 59 | state_save_register_global_bitmap(machine, state->tmp_bitmap); | |
| 69 | 60 | } |
| 70 | 61 | |
| 71 | 62 | |
| r7356 | r7357 | |
| 78 | 69 | |
| 79 | 70 | void system18_set_grayscale(running_machine *machine, int enable) |
| 80 | 71 | { |
| 72 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 73 | ||
| 81 | 74 | enable = (enable != 0); |
| 82 | if (enable != grayscale_enable) | |
| 75 | if (enable != state->grayscale_enable) | |
| 83 | 76 | { |
| 84 | 77 | video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen)); |
| 85 | grayscale_enable = enable; | |
| 78 | state->grayscale_enable = enable; | |
| 86 | 79 | // mame_printf_debug("Grayscale = %02X\n", enable); |
| 87 | 80 | } |
| 88 | 81 | } |
| r7356 | r7357 | |
| 90 | 83 | |
| 91 | 84 | void system18_set_vdp_enable(running_machine *machine, int enable) |
| 92 | 85 | { |
| 86 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 87 | ||
| 93 | 88 | enable = (enable != 0); |
| 94 | if (enable != vdp_enable) | |
| 89 | if (enable != state->vdp_enable) | |
| 95 | 90 | { |
| 96 | 91 | video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen)); |
| 97 | vdp_enable = enable; | |
| 92 | state->vdp_enable = enable; | |
| 98 | 93 | #if DEBUG_VDP |
| 99 | 94 | mame_printf_debug("VDP enable = %02X\n", enable); |
| 100 | 95 | #endif |
| r7356 | r7357 | |
| 104 | 99 | |
| 105 | 100 | void system18_set_vdp_mixing(running_machine *machine, int mixing) |
| 106 | 101 | { |
| 107 | if (mixing != vdp_mixing) | |
| 102 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 103 | ||
| 104 | if (mixing != state->vdp_mixing) | |
| 108 | 105 | { |
| 109 | 106 | video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen)); |
| 110 | vdp_mixing = mixing; | |
| 107 | state->vdp_mixing = mixing; | |
| 111 | 108 | #if DEBUG_VDP |
| 112 | 109 | mame_printf_debug("VDP mixing = %02X\n", mixing); |
| 113 | 110 | #endif |
| r7356 | r7357 | |
| 124 | 121 | |
| 125 | 122 | static void draw_vdp(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, int priority) |
| 126 | 123 | { |
| 124 | segas1x_state *state = (segas1x_state *)screen->machine->driver_data; | |
| 127 | 125 | int x, y; |
| 128 | 126 | bitmap_t *priority_bitmap = screen->machine->priority_bitmap; |
| 129 | 127 | |
| 130 | 128 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) |
| 131 | 129 | { |
| 132 | UINT16 *src = BITMAP_ADDR16(tempbitmap, y, 0); | |
| 130 | UINT16 *src = BITMAP_ADDR16(state->tmp_bitmap, y, 0); | |
| 133 | 131 | UINT16 *dst = BITMAP_ADDR16(bitmap, y, 0); |
| 134 | 132 | UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0); |
| 135 | 133 | |
| r7356 | r7357 | |
| 155 | 153 | |
| 156 | 154 | VIDEO_UPDATE( system18 ) |
| 157 | 155 | { |
| 156 | segas1x_state *state = (segas1x_state *)screen->machine->driver_data; | |
| 158 | 157 | int vdppri, vdplayer; |
| 159 | 158 | |
| 160 | 159 | /* |
| r7356 | r7357 | |
| 188 | 187 | cltchitr: layer = 1 or 2 or 3, pri = 0x02 or 0x04 or 0x08 |
| 189 | 188 | mwalk: layer = 3, pri = 0x04 or 0x08 |
| 190 | 189 | */ |
| 191 | vdplayer = (vdp_mixing >> 1) & 3; | |
| 192 | vdppri = (vdp_mixing & 1) ? (1 << vdplayer) : 0; | |
| 190 | vdplayer = (state->vdp_mixing >> 1) & 3; | |
| 191 | vdppri = (state->vdp_mixing & 1) ? (1 << vdplayer) : 0; | |
| 193 | 192 | |
| 194 | 193 | #if DEBUG_VDP |
| 195 | 194 | if (input_code_pressed(screen->machine, KEYCODE_Q)) vdplayer = 0; |
| r7356 | r7357 | |
| 210 | 209 | return 0; |
| 211 | 210 | } |
| 212 | 211 | |
| 213 | /* if the VDP is enabled, update our tempbitmap */ | |
| 214 | if (vdp_enable) | |
| 215 | system18_vdp_update(tempbitmap, cliprect); | |
| 212 | /* if the VDP is enabled, update our tmp_bitmap */ | |
| 213 | if (state->vdp_enable) | |
| 214 | system18_vdp_update(state->tmp_bitmap, cliprect); | |
| 216 | 215 | |
| 217 | 216 | /* reset priorities */ |
| 218 | 217 | bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); |
| r7356 | r7357 | |
| 220 | 219 | /* draw background opaquely first, not setting any priorities */ |
| 221 | 220 | segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0 | TILEMAP_DRAW_OPAQUE, 0x00); |
| 222 | 221 | segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1 | TILEMAP_DRAW_OPAQUE, 0x00); |
| 223 | if (vdp_enable && vdplayer == 0) draw_vdp(screen, bitmap, cliprect, vdppri); | |
| 222 | if (state->vdp_enable && vdplayer == 0) draw_vdp(screen, bitmap, cliprect, vdppri); | |
| 224 | 223 | |
| 225 | 224 | /* draw background again to draw non-transparent pixels over the VDP and set the priority */ |
| 226 | 225 | segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01); |
| 227 | 226 | segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02); |
| 228 | if (vdp_enable && vdplayer == 1) draw_vdp(screen, bitmap, cliprect, vdppri); | |
| 227 | if (state->vdp_enable && vdplayer == 1) draw_vdp(screen, bitmap, cliprect, vdppri); | |
| 229 | 228 | |
| 230 | 229 | /* draw foreground */ |
| 231 | 230 | segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02); |
| 232 | 231 | segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04); |
| 233 | if (vdp_enable && vdplayer == 2) draw_vdp(screen, bitmap, cliprect, vdppri); | |
| 232 | if (state->vdp_enable && vdplayer == 2) draw_vdp(screen, bitmap, cliprect, vdppri); | |
| 234 | 233 | |
| 235 | 234 | /* text layer */ |
| 236 | 235 | segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04); |
| 237 | 236 | segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08); |
| 238 | if (vdp_enable && vdplayer == 3) draw_vdp(screen, bitmap, cliprect, vdppri); | |
| 237 | if (state->vdp_enable && vdplayer == 3) draw_vdp(screen, bitmap, cliprect, vdppri); | |
| 239 | 238 | |
| 240 | 239 | /* draw the sprites */ |
| 241 | 240 | segaic16_sprites_draw(screen, bitmap, cliprect, 0); |
| 242 | 241 | |
| 243 | 242 | #if DEBUG_VDP |
| 244 | if (vdp_enable && input_code_pressed(screen->machine, KEYCODE_V)) | |
| 243 | if (state->vdp_enable && input_code_pressed(screen->machine, KEYCODE_V)) | |
| 245 | 244 | { |
| 246 | 245 | bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine)); |
| 247 | 246 | update_system18_vdp(bitmap, cliprect); |
| r7356 | r7357 | |
| 249 | 248 | if (vdp_enable && input_code_pressed(screen->machine, KEYCODE_B)) |
| 250 | 249 | { |
| 251 | 250 | FILE *f = fopen("vdp.bin", "w"); |
| 252 | fwrite(tempbitmap->base, 1, tempbitmap->rowpixels * (tempbitmap->bpp / 8) * tempbitmap->height, f); | |
| 251 | fwrite(state->tmp_bitmap->base, 1, state->tmp_bitmap->rowpixels * (state->tmp_bitmap->bpp / 8) * state->tmp_bitmap->height, f); | |
| 253 | 252 | fclose(f); |
| 254 | 253 | } |
| 255 | 254 | #endif |
| r0 | r7357 | |
|---|---|---|
| 1 | <?xml version="1.0"?> | |
| 2 | <mamelayout version="2"> | |
| 3 | <element name="hold1" defstate="0"> | |
| 4 | <rect state="1"> | |
| 5 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 6 | </rect> | |
| 7 | <rect state="0"> | |
| 8 | <color red="0.3" green="0.0" blue="0.0" /> | |
| 9 | </rect> | |
| 10 | <text string="HOLD 1"> | |
| 11 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 12 | <bounds x="0" y="0.2" width="1" height="0.6" /> | |
| 13 | </text> | |
| 14 | </element> | |
| 15 | ||
| 16 | <element name="hold2" defstate="0"> | |
| 17 | <rect state="1"> | |
| 18 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 19 | </rect> | |
| 20 | <rect state="0"> | |
| 21 | <color red="0.3" green="0.0" blue="0.0" /> | |
| 22 | </rect> | |
| 23 | <text string="HOLD 2"> | |
| 24 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 25 | <bounds x="0" y="0.1" width="1" height="0.4" /> | |
| 26 | </text> | |
| 27 | <text string="BIG"> | |
| 28 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 29 | <bounds x="0" y="0.5" width="1" height="0.4" /> | |
| 30 | </text> | |
| 31 | </element> | |
| 32 | ||
| 33 | <element name="hold3" defstate="0"> | |
| 34 | <rect state="1"> | |
| 35 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 36 | </rect> | |
| 37 | <rect state="0"> | |
| 38 | <color red="0.3" green="0.0" blue="0.0" /> | |
| 39 | </rect> | |
| 40 | <text string="HOLD 3"> | |
| 41 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 42 | <bounds x="0" y="0.1" width="1" height="0.4" /> | |
| 43 | </text> | |
| 44 | <text string="SMALL"> | |
| 45 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 46 | <bounds x="0" y="0.5" width="1" height="0.4" /> | |
| 47 | </text> | |
| 48 | </element> | |
| 49 | ||
| 50 | <element name="bet" defstate="0"> | |
| 51 | <rect state="1"> | |
| 52 | <color red="0.0" green="1.0" blue="0.0" /> | |
| 53 | </rect> | |
| 54 | <rect state="0"> | |
| 55 | <color red="0.0" green="0.3" blue="0.0" /> | |
| 56 | </rect> | |
| 57 | <text string="BET"> | |
| 58 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 59 | <bounds x="0" y="0.2" width="1" height="0.6" /> | |
| 60 | </text> | |
| 61 | </element> | |
| 62 | ||
| 63 | <element name="start" defstate="0"> | |
| 64 | <rect state="1"> | |
| 65 | <color red="0.0" green="1.0" blue="0.0" /> | |
| 66 | </rect> | |
| 67 | <rect state="0"> | |
| 68 | <color red="0.0" green="0.3" blue="0.0" /> | |
| 69 | </rect> | |
| 70 | <text string="START"> | |
| 71 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 72 | <bounds x="0" y="0.1" width="1" height="0.4" /> | |
| 73 | </text> | |
| 74 | <text string="TAKE"> | |
| 75 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 76 | <bounds x="0" y="0.5" width="1" height="0.4" /> | |
| 77 | </text> | |
| 78 | </element> | |
| 79 | ||
| 80 | <element name="double" defstate="0"> | |
| 81 | <rect state="1"> | |
| 82 | <color red="1.0" green="1.0" blue="0.0" /> | |
| 83 | </rect> | |
| 84 | <rect state="0"> | |
| 85 | <color red="0.3" green="0.2" blue="0.0" /> | |
| 86 | </rect> | |
| 87 | <text string="DOUBLE"> | |
| 88 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 89 | <bounds x="0" y="0.1" width="1" height="0.4" /> | |
| 90 | </text> | |
| 91 | <text string="INFO"> | |
| 92 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 93 | <bounds x="0" y="0.5" width="1" height="0.4" /> | |
| 94 | </text> | |
| 95 | </element> | |
| 96 | ||
| 97 | <element name="start" defstate="0"> | |
| 98 | <rect state="1"> | |
| 99 | <color red="0.0" green="1.0" blue="0.0" /> | |
| 100 | </rect> | |
| 101 | <rect state="0"> | |
| 102 | <color red="0.0" green="0.3" blue="0.0" /> | |
| 103 | </rect> | |
| 104 | <text string="START"> | |
| 105 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 106 | <bounds x="0" y="0.1" width="1" height="0.4" /> | |
| 107 | </text> | |
| 108 | <text string="TAKE"> | |
| 109 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 110 | <bounds x="0" y="0.5" width="1" height="0.4" /> | |
| 111 | </text> | |
| 112 | </element> | |
| 113 | ||
| 114 | <element name="unknown" defstate="0"> | |
| 115 | <rect state="1"> | |
| 116 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 117 | </rect> | |
| 118 | <rect state="0"> | |
| 119 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 120 | </rect> | |
| 121 | </element> | |
| 122 | ||
| 123 | <view name="Button Lamps"> | |
| 124 | <screen index="0"> | |
| 125 | <bounds left="0" top="0" right="4" bottom="3" /> | |
| 126 | </screen> | |
| 127 | <bezel name="lamp0" element="hold1"> | |
| 128 | <bounds x="2.20" y="3.13" width="0.50" height="0.24" /> | |
| 129 | </bezel> | |
| 130 | <bezel name="lamp1" element="hold2"> | |
| 131 | <bounds x="2.80" y="3.13" width="0.50" height="0.24" /> | |
| 132 | </bezel> | |
| 133 | <bezel name="lamp2" element="unknown"> | |
| 134 | <bounds x="0" y="3.13" width="0.0" height="0.0" /> | |
| 135 | </bezel> | |
| 136 | <bezel name="lamp3" element="bet"> | |
| 137 | <bounds x="0.10" y="3.13" width="0.50" height="0.24" /> | |
| 138 | </bezel> | |
| 139 | <bezel name="lamp4" element="double"> | |
| 140 | <bounds x="1.30" y="3.13" width="0.50" height="0.24" /> | |
| 141 | </bezel> | |
| 142 | <bezel name="lamp5" element="start"> | |
| 143 | <bounds x="0.70" y="3.13" width="0.50" height="0.24" /> | |
| 144 | </bezel> | |
| 145 | <bezel name="lamp6" element="hold3"> | |
| 146 | <bounds x="3.40" y="3.13" width="0.50" height="0.24" /> | |
| 147 | </bezel> | |
| 148 | <bezel name="lamp7" element="unknown"> | |
| 149 | <bounds x="0" y="3.13" width="0.0" height="0.0" /> | |
| 150 | </bezel> | |
| 151 | </view> | |
| 152 | </mamelayout> |
| r7356 | r7357 | |
|---|---|---|
| 118 | 118 | dip switch reading will fail if the main CPU is running at the nominally correct |
| 119 | 119 | 4MHz speed. This is kludge by slighly lowering the speed to 3.98MHz. |
| 120 | 120 | - the dorunrun attract mode sequence is also very timing sensitive. The behaviour |
| 121 | of the "dorunru2" set, verified on the real board, with all dips in the OFF | |
| 121 | of the "dorunrun2" set, verified on the real board, with all dips in the OFF | |
| 122 | 122 | position (easiest difficulty setting), should be, for the first 12 rounds of |
| 123 | 123 | demo play: |
| 124 | 124 | 1) Mr do moves right. Kills all monsters and a letter 'E'. |
| r7356 | r7357 | |
| 137 | 137 | Small changes to the CPU speed alter the demo timing and can cause the above |
| 138 | 138 | sequence not to work (e.g. Mr Do might not fill all monsters at once on the |
| 139 | 139 | first round). The 3.98MHz speed makes the sequence work. |
| 140 | Note that this only works in the dorunru2 set. The dorunrun set works slightly | |
| 140 | Note that this only works in the dorunrun2 set. The dorunrun set works slightly | |
| 141 | 141 | differently, however it hasn't been compared with the real board so it might be |
| 142 | 142 | right. |
| 143 | 143 | - unknown ports 0 and 2 |
| r7356 | r7357 | |
| 609 | 609 | |
| 610 | 610 | /* basic machine hardware */ |
| 611 | 611 | // MDRV_CPU_ADD("maincpu", Z80, 4000000) // 4 MHz |
| 612 | MDRV_CPU_ADD("maincpu", Z80, 3980000) // make dip switches work in docastle and dorunrun and fix dorunru2 attract sequence | |
| 612 | MDRV_CPU_ADD("maincpu", Z80, 3980000) // make dip switches work in docastle and dorunrun and fix dorunrun2 attract sequence | |
| 613 | 613 | MDRV_CPU_PROGRAM_MAP(docastle_map) |
| 614 | 614 | MDRV_CPU_IO_MAP(docastle_io_map) |
| 615 | 615 | MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) |
| r7356 | r7357 | |
|---|---|---|
| 1404 | 1404 | |
| 1405 | 1405 | ///////////////////////////////////////////////////////////////////////////////////// |
| 1406 | 1406 | |
| 1407 | // year, name, parent, machine, input, init, monitor, company, fullname, flags | |
| 1408 | GAME( 1988, m_lotsse, 0, scorpion1, scorpion1, lotse, 0, "BFM/ELAM", "Lotus SE (Dutch)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) | |
| 1409 | GAME( 1988, m_roulet, 0, scorpion1, scorpion1, rou029, 0, "BFM/ELAM", "Roulette (Dutch, Game Card 39-360-129?)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) | |
| 1410 | GAME( 1990, m_clattr, 0, scorpion1_nec_uk, clatt, clatt, 0, "BFM", "Club attraction (UK, Game Card 39-370-196)",GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) | |
| 1407 | GAME( 1988, m_lotsse, 0, scorpion1, scorpion1, lotse, 0, "BFM/ELAM", "Lotus SE (Dutch)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) | |
| 1408 | GAME( 1988, m_roulet, 0, scorpion1, scorpion1, rou029, 0, "BFM/ELAM", "Roulette (Dutch, Game Card 39-360-129?)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) | |
| 1409 | GAME( 1990, m_clattr, 0, scorpion1_nec_uk,clatt, clatt, 0, "BFM", "Club attraction (UK, Game Card 39-370-196)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) | |
| 1411 | 1410 | |
| 1412 | 1411 | //Adder |
| 1413 | GAME( 1996, m_tppokr, 0, scorpion1_adder2, | |
| 1412 | GAME( 1996, m_tppokr, 0, scorpion1_adder2, |
| r7356 | r7357 | |
|---|---|---|
| 233 | 233 | |
| 234 | 234 | #include "emu.h" |
| 235 | 235 | #include "cpu/z80/z80.h" |
| 236 | #include "includes/s | |
| 236 | #include "includes/s | |
| 237 | 237 | #include "cpu/m68000/m68000.h" |
| 238 | 238 | #include "machine/segaic16.h" |
| 239 | 239 | #include "sound/2151intf.h" |
| 240 | 240 | #include "sound/segapcm.h" |
| 241 | #include "video/segaic16.h" | |
| 241 | 242 | |
| 242 | 243 | |
| 243 | 244 | #define MASTER_CLOCK 50000000 |
| r7356 | r7357 | |
| 251 | 252 | * |
| 252 | 253 | *************************************/ |
| 253 | 254 | |
| 254 | static UINT8 iochip_regs[2][8]; | |
| 255 | static UINT8 iochip_force_input; | |
| 256 | static UINT8 (*iochip_custom_io_r[2])(offs_t offset, UINT8 portdata); | |
| 257 | static void (*iochip_custom_io_w[2])(offs_t offset, UINT8 data); | |
| 258 | ||
| 259 | static UINT8 adc_reverse[8]; | |
| 260 | ||
| 261 | static UINT8 vblank_irq_state; | |
| 262 | static UINT8 timer_irq_state; | |
| 263 | static UINT8 gprider_hack; | |
| 264 | ||
| 265 | 255 | static UINT16 *backupram1, *backupram2; |
| 266 | 256 | |
| 267 | ||
| 268 | ||
| 269 | 257 | /************************************* |
| 270 | 258 | * |
| 271 | 259 | * Configuration |
| r7356 | r7357 | |
| 274 | 262 | |
| 275 | 263 | static void xboard_generic_init(running_machine *machine) |
| 276 | 264 | { |
| 265 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 266 | ||
| 277 | 267 | /* init the FD1094 */ |
| 278 | 268 | fd1094_driver_init(machine, "maincpu", NULL); |
| 279 | 269 | |
| 280 | 270 | /* set the default road priority */ |
| 281 | | |
| 271 | | |
| 282 | 272 | |
| 283 | 273 | /* reset the custom handlers and other pointers */ |
| 284 | memset(iochip_custom_io_r, 0, sizeof(iochip_custom_io_r)); | |
| 285 | memset(iochip_custom_io_w, 0, sizeof(iochip_custom_io_w)); | |
| 286 | memset(adc_reverse, 0, sizeof(adc_reverse)); | |
| 274 | memset(state->iochip_custom_io_r, 0, sizeof(state->iochip_custom_io_r)); | |
| 275 | memset(state->iochip_custom_io_w, 0, sizeof(state->iochip_custom_io_w)); | |
| 276 | memset(state->adc_reverse, 0, sizeof(state->adc_reverse)); | |
| 287 | 277 | |
| 288 | gprider_hack = 0; | |
| 278 | state->gprider_hack = 0; | |
| 279 | ||
| 280 | state->maincpu = devtag_get_device(machine, "maincpu"); | |
| 281 | state->soundcpu = devtag_get_device(machine, "soundcpu"); | |
| 282 | state->subcpu = devtag_get_device(machine, "sub"); | |
| 283 | state->_315_5250_1 = devtag_get_device(machine, "5250_main"); | |
| 284 | ||
| 285 | state_save_register_global(machine, state->iochip_force_input); | |
| 286 | state_save_register_global(machine, state->vblank_irq_state); | |
| 287 | state_save_register_global(machine, state->timer_irq_state); | |
| 288 | state_save_register_global(machine, state->gprider_hack); | |
| 289 | state_save_register_global_array(machine, state->iochip_regs[0]); | |
| 290 | state_save_register_global_array(machine, state->iochip_regs[1]); | |
| 291 | state_save_register_global_array(machine, state->adc_reverse); | |
| 289 | 292 | } |
| 290 | 293 | |
| 291 | 294 | |
| r7356 | r7357 | |
| 298 | 301 | |
| 299 | 302 | static void update_main_irqs(running_machine *machine) |
| 300 | 303 | { |
| 304 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 301 | 305 | int irq = 0; |
| 302 | 306 | |
| 303 | if (timer_irq_state) | |
| 307 | if (state->timer_irq_state) | |
| 304 | 308 | irq |= 2; |
| 305 | 309 | else |
| 306 | cpu | |
| 310 | cpu | |
| 307 | 311 | |
| 308 | if (vblank_irq_state) | |
| 312 | if (state->vblank_irq_state) | |
| 309 | 313 | irq |= 4; |
| 310 | 314 | else |
| 311 | cpu | |
| 315 | cpu | |
| 312 | 316 | |
| 313 | if (gprider_hack && irq > 4) | |
| 317 | if (state->gprider_hack && irq > 4) | |
| 314 | 318 | irq = 4; |
| 315 | 319 | |
| 316 | 320 | if (!(irq==6)) |
| 317 | cpu | |
| 321 | cpu | |
| 318 | 322 | |
| 319 | 323 | if (irq) |
| 320 | 324 | { |
| 321 | cpu | |
| 325 | cpu | |
| 322 | 326 | cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(100)); |
| 323 | 327 | } |
| 324 | 328 | } |
| r7356 | r7357 | |
| 326 | 330 | |
| 327 | 331 | static TIMER_CALLBACK( scanline_callback ) |
| 328 | 332 | { |
| 333 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 334 | ||
| 329 | 335 | int scanline = param; |
| 330 | 336 | int next_scanline = (scanline + 2) % 262; |
| 331 | 337 | int update = 0; |
| 332 | 338 | |
| 333 | 339 | /* clock the timer and set the IRQ if something happened */ |
| 334 | if ((scanline % 2) != 0 && segaic16_compare_timer_clock(0)) | |
| 335 | timer_irq_state = update = 1; | |
| 340 | if ((scanline % 2) != 0 && segaic16_compare_timer_clock(state->_315_5250_1)) | |
| 341 | state->timer_irq_state = update = 1; | |
| 336 | 342 | |
| 337 | 343 | /* set VBLANK on scanline 223 */ |
| 338 | 344 | if (scanline == 223) |
| 339 | 345 | { |
| 340 | vblank_irq_state = update = 1; | |
| 341 | cputag_set_input_line(machine, "sub", 4, ASSERT_LINE); | |
| 346 | state->vblank_irq_state = update = 1; | |
| 347 | cpu_set_input_line(state->subcpu, 4, ASSERT_LINE); | |
| 342 | 348 | next_scanline = scanline + 1; |
| 343 | 349 | } |
| 344 | 350 | |
| 345 | 351 | /* clear VBLANK on scanline 224 */ |
| 346 | 352 | else if (scanline == 224) |
| 347 | 353 | { |
| 348 | vblank_irq_state = 0; | |
| 354 | state->vblank_irq_state = 0; | |
| 349 | 355 | update = 1; |
| 350 | cpu | |
| 356 | cpu | |
| 351 | 357 | next_scanline = scanline + 1; |
| 352 | 358 | } |
| 353 | 359 | |
| r7356 | r7357 | |
| 362 | 368 | |
| 363 | 369 | static void timer_ack_callback(running_machine *machine) |
| 364 | 370 | { |
| 371 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 372 | ||
| 365 | 373 | /* clear the timer IRQ */ |
| 366 | timer_irq_state = 0; | |
| 374 | state->timer_irq_state = 0; | |
| 367 | 375 | update_main_irqs(machine); |
| 368 | 376 | } |
| 369 | 377 | |
| r7356 | r7357 | |
| 377 | 385 | |
| 378 | 386 | static TIMER_CALLBACK( delayed_sound_data_w ) |
| 379 | 387 | { |
| 380 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 388 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 389 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 381 | 390 | |
| 382 | 391 | soundlatch_w(space, 0, param); |
| 383 | cpu | |
| 392 | cpu | |
| 384 | 393 | } |
| 385 | 394 | |
| 386 | 395 | |
| r7356 | r7357 | |
| 392 | 401 | |
| 393 | 402 | static void sound_cpu_irq(running_device *device, int state) |
| 394 | 403 | { |
| 395 | cputag_set_input_line(device->machine, "soundcpu", 0, state); | |
| 404 | segas1x_state *driver = (segas1x_state *)device->machine->driver_data; | |
| 405 | ||
| 406 | cpu_set_input_line(driver->soundcpu, 0, state); | |
| 396 | 407 | } |
| 397 | 408 | |
| 398 | 409 | |
| 399 | 410 | static READ8_HANDLER( sound_data_r ) |
| 400 | 411 | { |
| 401 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_NMI, CLEAR_LINE); | |
| 412 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 413 | ||
| 414 | cpu_set_input_line(state->soundcpu, INPUT_LINE_NMI, CLEAR_LINE); | |
| 402 | 415 | return soundlatch_r(space, offset); |
| 403 | 416 | } |
| 404 | 417 | |
| r7356 | r7357 | |
| 412 | 425 | |
| 413 | 426 | static void xboard_reset(running_device *device) |
| 414 | 427 | { |
| 415 | cputag_set_input_line(device->machine, "sub", INPUT_LINE_RESET, PULSE_LINE); | |
| 428 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 429 | ||
| 430 | cpu_set_input_line(state->subcpu, INPUT_LINE_RESET, PULSE_LINE); | |
| 416 | 431 | cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(100)); |
| 417 | 432 | } |
| 418 | 433 | |
| r7356 | r7357 | |
| 425 | 440 | /* hook the RESET line, which resets CPU #1 */ |
| 426 | 441 | m68k_set_reset_callback(devtag_get_device(machine, "maincpu"), xboard_reset); |
| 427 | 442 | |
| 428 | /* set up the compare/timer chip */ | |
| 429 | segaic16_compare_timer_init(0, sound_data_w, timer_ack_callback); | |
| 430 | segaic16_compare_timer_init(1, NULL, NULL); | |
| 431 | ||
| 432 | 443 | /* start timers to track interrupts */ |
| 433 | 444 | timer_set(machine, video_screen_get_time_until_pos(machine->primary_screen, 1, 0), NULL, 1, scanline_callback); |
| 434 | 445 | } |
| r7356 | r7357 | |
| 443 | 454 | |
| 444 | 455 | static READ16_HANDLER( adc_r ) |
| 445 | 456 | { |
| 457 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 446 | 458 | static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" }; |
| 447 | int which = (iochip_regs[0][2] >> 2) & 7; | |
| 459 | int which = (state->iochip_regs[0][2] >> 2) & 7; | |
| 448 | 460 | |
| 449 | 461 | /* on the write, latch the selected input port and stash the value */ |
| 450 | 462 | int value = input_port_read_safe(space->machine, ports[which], 0x0010); |
| 451 | 463 | |
| 452 | 464 | /* reverse some port values */ |
| 453 | if (adc_reverse[which]) | |
| 465 | if (state->adc_reverse[which]) | |
| 454 | 466 | value = 255 - value; |
| 455 | 467 | |
| 456 | 468 | /* return the previously latched value */ |
| r7356 | r7357 | |
| 463 | 475 | } |
| 464 | 476 | |
| 465 | 477 | |
| 466 | INLINE UINT16 iochip_r(int which, int port, int inputval) | |
| 478 | INLINE UINT16 iochip_r(running_machine *machine, int which, int port, int inputval) | |
| 467 | 479 | { |
| 468 | UINT16 result = iochip_regs[which][port]; | |
| 480 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 481 | UINT16 result = state->iochip_regs[which][port]; | |
| 469 | 482 | |
| 470 | 483 | /* if there's custom I/O, do that to get the input value */ |
| 471 | if (iochip_custom_io_r[which]) | |
| 472 | inputval = (*iochip_custom_io_r[which])(port, inputval); | |
| 484 | if (state->iochip_custom_io_r[which]) | |
| 485 | inputval = (*state->iochip_custom_io_r[which])(port, inputval); | |
| 473 | 486 | |
| 474 | 487 | /* for ports 0-3, the direction is controlled 4 bits at a time by register 6 */ |
| 475 | 488 | if (port <= 3) |
| 476 | 489 | { |
| 477 | if (iochip_force_input || ((iochip_regs[which][6] >> (2*port+0)) & 1)) | |
| 490 | if (state->iochip_force_input || ((state->iochip_regs[which][6] >> (2 * port + 0)) & 1)) | |
| 478 | 491 | result = (result & ~0x0f) | (inputval & 0x0f); |
| 479 | if (iochip_force_input || ((iochip_regs[which][6] >> (2*port+1)) & 1)) | |
| 492 | if (state->iochip_force_input || ((state->iochip_regs[which][6] >> (2 * port + 1)) & 1)) | |
| 480 | 493 | result = (result & ~0xf0) | (inputval & 0xf0); |
| 481 | 494 | } |
| 482 | 495 | |
| 483 | 496 | /* for port 4, the direction is controlled 1 bit at a time by register 7 */ |
| 484 | 497 | else |
| 485 | 498 | { |
| 486 | if ((iochip_regs[which][7] >> 0) & 1) | |
| 499 | if ((state->iochip_regs[which][7] >> 0) & 1) | |
| 487 | 500 | result = (result & ~0x01) | (inputval & 0x01); |
| 488 | if ((iochip_regs[which][7] >> 1) & 1) | |
| 501 | if ((state->iochip_regs[which][7] >> 1) & 1) | |
| 489 | 502 | result = (result & ~0x02) | (inputval & 0x02); |
| 490 | if ((iochip_regs[which][7] >> 2) & 1) | |
| 503 | if ((state->iochip_regs[which][7] >> 2) & 1) | |
| 491 | 504 | result = (result & ~0x04) | (inputval & 0x04); |
| 492 | if ((iochip_regs[which][7] >> 3) & 1) | |
| 505 | if ((state->iochip_regs[which][7] >> 3) & 1) | |
| 493 | 506 | result = (result & ~0x08) | (inputval & 0x08); |
| 494 | 507 | result &= 0x0f; |
| 495 | 508 | } |
| r7356 | r7357 | |
| 507 | 520 | D6: /INTR of ADC0804 |
| 508 | 521 | D5-D0: CN C pin 24-19 (switch state 0= open, 1= closed) |
| 509 | 522 | */ |
| 510 | return iochip_r(0, 0, input_port_read(space->machine, "IO0PORTA")); | |
| 523 | return iochip_r(space->machine, 0, 0, input_port_read(space->machine, "IO0PORTA")); | |
| 511 | 524 | |
| 512 | 525 | case 1: |
| 513 | 526 | /* I/O port: CN C pins 17,15,13,11,9,7,5,3 */ |
| 514 | return iochip_r(0, 1, input_port_read(space->machine, "IO0PORTB")); | |
| 527 | return iochip_r(space->machine, 0, 1, input_port_read(space->machine, "IO0PORTB")); | |
| 515 | 528 | |
| 516 | 529 | case 2: |
| 517 | 530 | /* Output port */ |
| 518 | return iochip_r(0, 2, 0); | |
| 531 | return iochip_r(space->machine, 0, 2, 0); | |
| 519 | 532 | |
| 520 | 533 | case 3: |
| 521 | 534 | /* Output port */ |
| 522 | return iochip_r(0, 3, 0); | |
| 535 | return iochip_r(space->machine, 0, 3, 0); | |
| 523 | 536 | |
| 524 | 537 | case 4: |
| 525 | 538 | /* Unused */ |
| 526 | return iochip_r(0, 4, 0); | |
| 539 | return iochip_r(space->machine, 0, 4, 0); | |
| 527 | 540 | } |
| 528 | 541 | |
| 529 | 542 | /* everything else returns 0 */ |
| r7356 | r7357 | |
| 533 | 546 | |
| 534 | 547 | static WRITE16_HANDLER( iochip_0_w ) |
| 535 | 548 | { |
| 549 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 536 | 550 | UINT8 oldval; |
| 537 | 551 | |
| 538 | 552 | /* access is via the low 8 bits */ |
| r7356 | r7357 | |
| 542 | 556 | data &= 0xff; |
| 543 | 557 | |
| 544 | 558 | /* swap in the new value and remember the previous value */ |
| 545 | oldval = iochip_regs[0][offset]; | |
| 546 | iochip_regs[0][offset] = data; | |
| 559 | oldval = state->iochip_regs[0][offset]; | |
| 560 | state->iochip_regs[0][offset] = data; | |
| 547 | 561 | |
| 548 | 562 | /* certain offsets have common effects */ |
| 549 | 563 | switch (offset) |
| r7356 | r7357 | |
| 559 | 573 | */ |
| 560 | 574 | if (((oldval ^ data) & 0x40) && !(data & 0x40)) watchdog_reset_w(space,0,0); |
| 561 | 575 | segaic16_set_display_enable(space->machine, data & 0x20); |
| 562 | cpu | |
| 576 | cpu | |
| 563 | 577 | return; |
| 564 | 578 | |
| 565 | 579 | case 3: |
| r7356 | r7357 | |
| 582 | 596 | { |
| 583 | 597 | case 0: |
| 584 | 598 | /* Input port: switches, CN D pin A1-8 (switch state 1= open, 0= closed) */ |
| 585 | return iochip_r(1, 0, input_port_read(space->machine, "IO1PORTA")); | |
| 599 | return iochip_r(space->machine, 1, 0, input_port_read(space->machine, "IO1PORTA")); | |
| 586 | 600 | |
| 587 | 601 | case 1: |
| 588 | 602 | /* Input port: switches, CN D pin A9-16 (switch state 1= open, 0= closed) */ |
| 589 | return iochip_r(1, 1, input_port_read(space->machine, "IO1PORTB")); | |
| 603 | return iochip_r(space->machine, 1, 1, input_port_read(space->machine, "IO1PORTB")); | |
| 590 | 604 | |
| 591 | 605 | case 2: |
| 592 | 606 | /* Input port: DIP switches (1= off, 0= on) */ |
| 593 | return iochip_r(1, 2, input_port_read(space->machine, "IO1PORTC")); | |
| 607 | return iochip_r(space->machine, 1, 2, input_port_read(space->machine, "IO1PORTC")); | |
| 594 | 608 | |
| 595 | 609 | case 3: |
| 596 | 610 | /* Input port: DIP switches (1= off, 0= on) */ |
| 597 | return iochip_r(1, 3, input_port_read(space->machine, "IO1PORTD")); | |
| 611 | return iochip_r(space->machine, 1, 3, input_port_read(space->machine, "IO1PORTD")); | |
| 598 | 612 | |
| 599 | 613 | case 4: |
| 600 | 614 | /* Unused */ |
| 601 | return iochip_r(1, 4, 0); | |
| 615 | return iochip_r(space->machine, 1, 4, 0); | |
| 602 | 616 | } |
| 603 | 617 | |
| 604 | 618 | /* everything else returns 0 */ |
| r7356 | r7357 | |
| 608 | 622 | |
| 609 | 623 | static WRITE16_HANDLER( iochip_1_w ) |
| 610 | 624 | { |
| 625 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 626 | ||
| 611 | 627 | /* access is via the low 8 bits */ |
| 612 | 628 | if (!ACCESSING_BITS_0_7) |
| 613 | 629 | return; |
| r7356 | r7357 | |
| 615 | 631 | data &= 0xff; |
| 616 | 632 | |
| 617 | 633 | /* swap in the new value and remember the previous value */ |
| 618 | iochip_regs[1][offset] = data; | |
| 634 | state->iochip_regs[1][offset] = data; | |
| 619 | 635 | |
| 620 | 636 | if (offset <= 4) |
| 621 | 637 | logerror("I/O chip 1, port %c write = %02X\n", 'A' + offset, data); |
| r7356 | r7357 | |
| 642 | 658 | |
| 643 | 659 | static WRITE16_HANDLER( aburner2_iochip_0_D_w ) |
| 644 | 660 | { |
| 661 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 662 | ||
| 645 | 663 | /* access is via the low 8 bits */ |
| 646 | 664 | if (!ACCESSING_BITS_0_7) |
| 647 | 665 | return; |
| 648 | 666 | |
| 649 | iochip_regs[0][3] = data; | |
| 667 | state->iochip_regs[0][3] = data; | |
| 650 | 668 | |
| 651 | 669 | output_set_lamp_value(2, (data >> 1) & 0x01); /* altitude warning lamp */ |
| 652 | 670 | output_set_led_value(0, (data >> 2) & 0x01); /* start lamp */ |
| r7356 | r7357 | |
| 664 | 682 | * |
| 665 | 683 | *************************************/ |
| 666 | 684 | |
| 667 | static UINT16 *loffire_sync; | |
| 668 | ||
| 669 | 685 | static WRITE16_HANDLER( loffire_sync0_w ) |
| 670 | 686 | { |
| 671 | COMBINE_DATA(&loffire_sync[offset]); | |
| 687 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 688 | ||
| 689 | COMBINE_DATA(&state->loffire_sync[offset]); | |
| 672 | 690 | cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(10)); |
| 673 | 691 | } |
| 674 | 692 | |
| r7356 | r7357 | |
| 730 | 748 | AM_RANGE(0x0a0000, 0x0a3fff) AM_MIRROR(0x01c000) AM_RAM AM_SHARE("share2") AM_BASE(&backupram2) |
| 731 | 749 | AM_RANGE(0x0c0000, 0x0cffff) AM_RAM_WRITE(segaic16_tileram_0_w) AM_BASE(&segaic16_tileram_0) |
| 732 | 750 | AM_RANGE(0x0d0000, 0x0d0fff) AM_MIRROR(0x00f000) AM_RAM_WRITE(segaic16_textram_0_w) AM_BASE(&segaic16_textram_0) |
| 733 | AM_RANGE(0x0e0000, 0x0e0007) AM_MIRROR(0x003ff8) AM_READWRITE(segaic16_multiply_0_r, segaic16_multiply_0_w) | |
| 734 | AM_RANGE(0x0e4000, 0x0e401f) AM_MIRROR(0x003fe0) AM_READWRITE(segaic16_divide_0_r, segaic16_divide_0_w) | |
| 735 | AM_RANGE(0x0e8000, 0x0e801f) AM_MIRROR(0x003fe0) AM_READWRITE(segaic16_compare_timer_0_r, segaic16_compare_timer_0_w) | |
| 751 | AM_RANGE(0x0e0000, 0x0e0007) AM_MIRROR(0x003ff8) AM_DEVREADWRITE("5248_main", segaic16_multiply_r, segaic16_multiply_w) | |
| 752 | AM_RANGE(0x0e4000, 0x0e401f) AM_MIRROR(0x003fe0) AM_DEVREADWRITE("5249_main", segaic16_divide_r, segaic16_divide_w) | |
| 753 | AM_RANGE(0x0e8000, 0x0e801f) AM_MIRROR(0x003fe0) AM_DEVREADWRITE("5250_main", segaic16_compare_timer_r, segaic16_compare_timer_w) | |
| 736 | 754 | AM_RANGE(0x100000, 0x100fff) AM_MIRROR(0x00f000) AM_RAM AM_BASE(&segaic16_spriteram_0) |
| 737 | 755 | AM_RANGE(0x110000, 0x11ffff) AM_WRITE(segaic16_sprites_draw_0_w) |
| 738 | 756 | AM_RANGE(0x120000, 0x123fff) AM_MIRROR(0x00c000) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) |
| r7356 | r7357 | |
| 743 | 761 | AM_RANGE(0x200000, 0x27ffff) AM_ROM AM_REGION("sub", 0x00000) |
| 744 | 762 | AM_RANGE(0x280000, 0x283fff) AM_MIRROR(0x01c000) AM_RAM AM_SHARE("share3") |
| 745 | 763 | AM_RANGE(0x2a0000, 0x2a3fff) AM_MIRROR(0x01c000) AM_RAM AM_SHARE("share4") |
| 746 | AM_RANGE(0x2e0000, 0x2e0007) AM_MIRROR(0x003ff8) AM_READWRITE(segaic16_multiply_1_r, segaic16_multiply_1_w) | |
| 747 | AM_RANGE(0x2e4000, 0x2e401f) AM_MIRROR(0x003fe0) AM_READWRITE(segaic16_divide_1_r, segaic16_divide_1_w) | |
| 748 | AM_RANGE(0x2e8000, 0x2e800f) AM_MIRROR(0x003ff0) AM_READWRITE(segaic16_compare_timer_1_r, segaic16_compare_timer_1_w) | |
| 764 | AM_RANGE(0x2e0000, 0x2e0007) AM_MIRROR(0x003ff8) AM_DEVREADWRITE("5248_subx", segaic16_multiply_r, segaic16_multiply_w) | |
| 765 | AM_RANGE(0x2e4000, 0x2e401f) AM_MIRROR(0x003fe0) AM_DEVREADWRITE("5249_subx", segaic16_divide_r, segaic16_divide_w) | |
| 766 | AM_RANGE(0x2e8000, 0x2e800f) AM_MIRROR(0x003ff0) AM_DEVREADWRITE("5250_subx", segaic16_compare_timer_r, segaic16_compare_timer_w) | |
| 749 | 767 | AM_RANGE(0x2ec000, 0x2ecfff) AM_MIRROR(0x001000) AM_RAM AM_SHARE("share5") AM_BASE(&segaic16_roadram_0) |
| 750 | 768 | AM_RANGE(0x2ee000, 0x2effff) AM_READWRITE(segaic16_road_control_0_r, segaic16_road_control_0_w) |
| 751 | 769 | // AM_RANGE(0x2f0000, 0x2f3fff) AM_READWRITE(excs_r, excs_w) |
| r7356 | r7357 | |
| 767 | 785 | AM_RANGE(0x000000, 0x07ffff) AM_ROM |
| 768 | 786 | AM_RANGE(0x080000, 0x083fff) AM_MIRROR(0x01c000) AM_RAM AM_SHARE("share3") |
| 769 | 787 | AM_RANGE(0x0a0000, 0x0a3fff) AM_MIRROR(0x01c000) AM_RAM AM_SHARE("share4") |
| 770 | AM_RANGE(0x0e0000, 0x0e0007) AM_MIRROR(0x003ff8) AM_READWRITE(segaic16_multiply_1_r, segaic16_multiply_1_w) | |
| 771 | AM_RANGE(0x0e4000, 0x0e401f) AM_MIRROR(0x003fe0) AM_READWRITE(segaic16_divide_1_r, segaic16_divide_1_w) | |
| 772 | AM_RANGE(0x0e8000, 0x0e800f) AM_MIRROR(0x003ff0) AM_READWRITE(segaic16_compare_timer_1_r, segaic16_compare_timer_1_w) | |
| 788 | AM_RANGE(0x0e0000, 0x0e0007) AM_MIRROR(0x003ff8) AM_DEVREADWRITE("5248_subx", segaic16_multiply_r, segaic16_multiply_w) | |
| 789 | AM_RANGE(0x0e4000, 0x0e401f) AM_MIRROR(0x003fe0) AM_DEVREADWRITE("5249_subx", segaic16_divide_r, segaic16_divide_w) | |
| 790 | AM_RANGE(0x0e8000, 0x0e800f) AM_MIRROR(0x003ff0) AM_DEVREADWRITE("5250_subx", segaic16_compare_timer_r, segaic16_compare_timer_w) | |
| 773 | 791 | AM_RANGE(0x0ec000, 0x0ecfff) AM_MIRROR(0x001000) AM_RAM AM_SHARE("share5") |
| 774 | 792 | AM_RANGE(0x0ee000, 0x0effff) AM_READWRITE(segaic16_road_control_0_r, segaic16_road_control_0_w) |
| 775 | 793 | // AM_RANGE(0x0f0000, 0x0f3fff) AM_READWRITE(excs_r, excs_w) |
| r7356 | r7357 | |
| 1335 | 1353 | * |
| 1336 | 1354 | *************************************/ |
| 1337 | 1355 | |
| 1356 | static const ic_315_5250_interface segaxb_5250_1_intf = | |
| 1357 | { | |
| 1358 | sound_data_w, timer_ack_callback | |
| 1359 | }; | |
| 1360 | ||
| 1361 | static const ic_315_5250_interface segaxb_5250_2_intf = | |
| 1362 | { | |
| 1363 | NULL, NULL | |
| 1364 | }; | |
| 1365 | ||
| 1338 | 1366 | static MACHINE_DRIVER_START( xboard ) |
| 1339 | 1367 | |
| 1368 | /* driver data */ | |
| 1369 | MDRV_DRIVER_DATA(segas1x_state) | |
| 1370 | ||
| 1340 | 1371 | /* basic machine hardware */ |
| 1341 | 1372 | MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK/4) |
| 1342 | 1373 | MDRV_CPU_PROGRAM_MAP(main_map) |
| r7356 | r7357 | |
| 1352 | 1383 | MDRV_NVRAM_HANDLER(xboard) |
| 1353 | 1384 | MDRV_QUANTUM_TIME(HZ(6000)) |
| 1354 | 1385 | |
| 1386 | MDRV_315_5248_ADD("5248_main") | |
| 1387 | MDRV_315_5248_ADD("5248_subx") | |
| 1388 | MDRV_315_5249_ADD("5249_main") | |
| 1389 | MDRV_315_5249_ADD("5249_subx") | |
| 1390 | MDRV_315_5250_ADD("5250_main", segaxb_5250_1_intf) | |
| 1391 | MDRV_315_5250_ADD("5250_subx", segaxb_5250_2_intf) | |
| 1392 | ||
| 1355 | 1393 | /* video hardware */ |
| 1356 | 1394 | MDRV_GFXDECODE(segaxbd) |
| 1357 | 1395 | MDRV_PALETTE_LENGTH(8192*3) |
| r7356 | r7357 | |
| 2808 | 2846 | |
| 2809 | 2847 | static DRIVER_INIT( aburner2 ) |
| 2810 | 2848 | { |
| 2849 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2850 | ||
| 2811 | 2851 | xboard_generic_init(machine); |
| 2812 | xboard_set_road_priority(0); | |
| 2813 | 2852 | |
| 2853 | state->road_priority = 0; | |
| 2854 | ||
| 2814 | 2855 | memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x140006, 0x140007, 0, 0x00fff0, aburner2_iochip_0_D_w); |
| 2815 | 2856 | } |
| 2816 | 2857 | |
| 2817 | 2858 | |
| 2818 | 2859 | static DRIVER_INIT( aburner ) |
| 2819 | 2860 | { |
| 2861 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2862 | ||
| 2820 | 2863 | xboard_generic_init(machine); |
| 2821 | xboard_set_road_priority(0); | |
| 2864 | ||
| 2865 | state->road_priority = 0; | |
| 2822 | 2866 | } |
| 2823 | 2867 | |
| 2824 | 2868 | |
| 2825 | 2869 | static DRIVER_INIT( loffire ) |
| 2826 | 2870 | { |
| 2871 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2872 | ||
| 2827 | 2873 | xboard_generic_init(machine); |
| 2828 | adc_reverse[1] = adc_reverse[3] = 1; | |
| 2874 | state->adc_reverse[1] = state->adc_reverse[3] = 1; | |
| 2829 | 2875 | |
| 2830 | 2876 | /* install extra synchronization on core shared memory */ |
| 2831 | loffire_sync = memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x29c000, 0x29c011, 0, 0, loffire_sync0_w); | |
| 2877 | state->loffire_sync = memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x29c000, 0x29c011, 0, 0, loffire_sync0_w); | |
| 2832 | 2878 | } |
| 2833 | 2879 | |
| 2834 | 2880 | |
| r7356 | r7357 | |
| 2841 | 2887 | |
| 2842 | 2888 | static DRIVER_INIT( gprider ) |
| 2843 | 2889 | { |
| 2890 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2891 | ||
| 2844 | 2892 | xboard_generic_init(machine); |
| 2845 | gprider_hack = 1; | |
| 2893 | state->gprider_hack = 1; | |
| 2846 | 2894 | } |
| 2847 | 2895 | |
| 2848 | 2896 |
| r7356 | r7357 | |
|---|---|---|
| 72 | 72 | #include "sound/ay8910.h" |
| 73 | 73 | |
| 74 | 74 | /* constants */ |
| 75 | #define MAIN_OSC 12 | |
| 75 | #define MAIN_OSC XTAL_12MHz | |
| 76 | 76 | |
| 77 | 77 | |
| 78 | 78 | /************************************* |
| r7356 | r7357 | |
|---|---|---|
| 311 | 311 | #include "cpu/m68000/m68000.h" |
| 312 | 312 | #include "cpu/powerpc/ppc.h" |
| 313 | 313 | #include "cpu/sharc/sharc.h" |
| 314 | #include "machine/adc1213x.h" | |
| 314 | 315 | #include "machine/eeprom.h" |
| 316 | #include "machine/k033906.h" | |
| 315 | 317 | #include "machine/konppc.h" |
| 316 | #include "video/voodoo.h" | |
| 317 | 318 | #include "machine/timekpr.h" |
| 318 | 319 | #include "sound/rf5c400.h" |
| 319 | #include "rendlay.h" | |
| 320 | #include "machine/adc1213x.h" | |
| 321 | 320 | #include "sound/k056800.h" |
| 322 | #include "machine/k033906.h" | |
| 321 | #include "video/voodoo.h" | |
| 322 | #include "video/konicdev.h" | |
| 323 | #include "rendlay.h" | |
| 323 | 324 | |
| 324 | 325 | static UINT8 led_reg0, led_reg1; |
| 325 | 326 | static UINT32 *workram; |
| r7356 | r7357 | |
| 328 | 329 | static UINT32 jvs_sdata_ptr = 0; |
| 329 | 330 | |
| 330 | 331 | |
| 331 | /* K037122 Tilemap chip (move to konamiic.c ?) */ | |
| 332 | ||
| 333 | #define MAX_K037122_CHIPS 2 | |
| 334 | ||
| 335 | static UINT32 *K037122_tile_ram[MAX_K037122_CHIPS]; | |
| 336 | static UINT32 *K037122_char_ram[MAX_K037122_CHIPS]; | |
| 337 | static int K037122_gfx_index[MAX_K037122_CHIPS]; | |
| 338 | static tilemap_t *K037122_layer[MAX_K037122_CHIPS][2]; | |
| 339 | static UINT32 *K037122_reg[MAX_K037122_CHIPS]; | |
| 340 | ||
| 341 | #define K037122_NUM_TILES 16384 | |
| 342 | ||
| 343 | static const gfx_layout K037122_char_layout = | |
| 332 | static READ32_HANDLER( hornet_k037122_sram_r ) | |
| 344 | 333 | { |
| 345 | 8, 8, | |
| 346 | K037122_NUM_TILES, | |
| 347 | 8, | |
| 348 | { 0,1,2,3,4,5,6,7 }, | |
| 349 | { 1*16, 0*16, 3*16, 2*16, 5*16, 4*16, 7*16, 6*16 }, | |
| 350 | { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128 }, | |
| 351 | 8*128 | |
| 352 | }; | |
| 353 | ||
| 354 | static TILE_GET_INFO( K037122_0_tile_info_layer0 ) | |
| 355 | { | |
| 356 | UINT32 val = K037122_tile_ram[0][tile_index + (0x8000/4)]; | |
| 357 | int color = (val >> 17) & 0x1f; | |
| 358 | int tile = val & 0x3fff; | |
| 359 | int flags = 0; | |
| 360 | ||
| 361 | if (val & 0x400000) | |
| 362 | flags |= TILE_FLIPX; | |
| 363 | if (val & 0x800000) | |
| 364 | flags |= TILE_FLIPY; | |
| 365 | ||
| 366 | SET_TILE_INFO(K037122_gfx_index[0], tile, color, flags); | |
| 334 | running_device *k037122 = devtag_get_device(space->machine, get_cgboard_id() ? "k037122_2" : "k037122_1"); | |
| 335 | return k037122_sram_r(k037122, offset, mem_mask); | |
| 367 | 336 | } |
| 368 | 337 | |
| 369 | static | |
| 338 | static WRITE32_HA | |
| 370 | 339 | { |
| 371 | UINT32 val = K037122_tile_ram[0][tile_index]; | |
| 372 | int color = (val >> 17) & 0x1f; | |
| 373 | int tile = val & 0x3fff; | |
| 374 | int flags = 0; | |
| 375 | ||
| 376 | if (val & 0x400000) | |
| 377 | flags |= TILE_FLIPX; | |
| 378 | if (val & 0x800000) | |
| 379 | flags |= TILE_FLIPY; | |
| 380 | ||
| 381 | SET_TILE_INFO(K037122_gfx_index[0], tile, color, flags); | |
| 340 | running_device *k037122 = devtag_get_device(space->machine, get_cgboard_id() ? "k037122_2" : "k037122_1"); | |
| 341 | k037122_sram_w(k037122, offset, data, mem_mask); | |
| 382 | 342 | } |
| 383 | 343 | |
| 384 | static TILE_GET_INFO( K037122_1_tile_info_layer0 ) | |
| 385 | { | |
| 386 | UINT32 val = K037122_tile_ram[1][tile_index + (0x8000/4)]; | |
| 387 | int color = (val >> 17) & 0x1f; | |
| 388 | int tile = val & 0x3fff; | |
| 389 | int flags = 0; | |
| 390 | 344 | |
| 391 | if (val & 0x400000) | |
| 392 | flags |= TILE_FLIPX; | |
| 393 | if (val & 0x800000) | |
| 394 | flags |= TILE_FLIPY; | |
| 395 | ||
| 396 | SET_TILE_INFO(K037122_gfx_index[1], tile, color, flags); | |
| 397 | } | |
| 398 | ||
| 399 | static TILE_GET_INFO( K037122_1_tile_info_layer1 ) | |
| 345 | static READ32_HANDLER( hornet_k037122_char_r ) | |
| 400 | 346 | { |
| 401 | UINT32 val = K037122_tile_ram[1][tile_index]; | |
| 402 | int color = (val >> 17) & 0x1f; | |
| 403 | int tile = val & 0x3fff; | |
| 404 | int flags = 0; | |
| 405 | ||
| 406 | if (val & 0x400000) | |
| 407 | flags |= TILE_FLIPX; | |
| 408 | if (val & 0x800000) | |
| 409 | flags |= TILE_FLIPY; | |
| 410 | ||
| 411 | SET_TILE_INFO(K037122_gfx_index[1], tile, color, flags); | |
| 347 | running_device *k037122 = devtag_get_device(space->machine, get_cgboard_id() ? "k037122_2" : "k037122_1"); | |
| 348 | return k037122_char_r(k037122, offset, mem_mask); | |
| 412 | 349 | } |
| 413 | 350 | |
| 414 | static | |
| 351 | static WRITE32_HANDLER( hornet_k037122_ch | |
| 415 | 352 | { |
| 416 | for(K037122_gfx_index[chip] = 0; K037122_gfx_index[chip] < MAX_GFX_ELEMENTS; K037122_gfx_index[chip]++) | |
| 417 | if (machine->gfx[K037122_gfx_index[chip]] == 0) | |
| 418 | break; | |
| 419 | if(K037122_gfx_index[chip] == MAX_GFX_ELEMENTS) | |
| 420 | return 1; | |
| 421 | ||
| 422 | K037122_char_ram[chip] = auto_alloc_array(machine, UINT32, 0x200000/4); | |
| 423 | ||
| 424 | K037122_tile_ram[chip] = auto_alloc_array(machine, UINT32, 0x20000/4); | |
| 425 | ||
| 426 | K037122_reg[chip] = auto_alloc_array(machine, UINT32, 0x400/4); | |
| 427 | ||
| 428 | if (chip == 0) | |
| 429 | { | |
| 430 | K037122_layer[chip][0] = tilemap_create(machine, K037122_0_tile_info_layer0, tilemap_scan_rows, 8, 8, 256, 64); | |
| 431 | K037122_layer[chip][1] = tilemap_create(machine, K037122_0_tile_info_layer1, tilemap_scan_rows, 8, 8, 128, 64); | |
| 432 | } | |
| 433 | else | |
| 434 | { | |
| 435 | K037122_layer[chip][0] = tilemap_create(machine, K037122_1_tile_info_layer0, tilemap_scan_rows, 8, 8, 256, 64); | |
| 436 | K037122_layer[chip][1] = tilemap_create(machine, K037122_1_tile_info_layer1, tilemap_scan_rows, 8, 8, 128, 64); | |
| 437 | } | |
| 438 | ||
| 439 | tilemap_set_transparent_pen(K037122_layer[chip][0], 0); | |
| 440 | tilemap_set_transparent_pen(K037122_layer[chip][1], 0); | |
| 441 | ||
| 442 | memset(K037122_char_ram[chip], 0, 0x200000); | |
| 443 | memset(K037122_tile_ram[chip], 0, 0x20000); | |
| 444 | memset(K037122_reg[chip], 0, 0x400); | |
| 445 | ||
| 446 | machine->gfx[K037122_gfx_index[chip]] = gfx_element_alloc(machine, &K037122_char_layout, (UINT8*)K037122_char_ram[chip], machine->config->total_colors / 16, 0); | |
| 447 | ||
| 448 | state_save_register_item_pointer(machine, "K037122", NULL, chip, K037122_reg[chip], 0x400/sizeof(K037122_reg[chip][0])); | |
| 449 | state_save_register_item_pointer(machine, "K037122", NULL, chip, K037122_char_ram[chip], 0x200000/sizeof(K037122_char_ram[chip][0])); | |
| 450 | state_save_register_item_pointer(machine, "K037122", NULL, chip, K037122_tile_ram[chip], 0x20000/sizeof(K037122_tile_ram[chip][0])); | |
| 451 | ||
| 452 | return 0; | |
| 353 | running_device *k037122 = devtag_get_device(space->machine, get_cgboard_id() ? "k037122_2" : "k037122_1"); | |
| 354 | k037122_char_w(k037122, offset, data, mem_mask); | |
| 453 | 355 | } |
| 454 | 356 | |
| 455 | static | |
| 357 | static READ | |
| 456 | 358 | { |
| 457 | const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen); | |
| 458 | ||
| 459 | if (K037122_reg[chip][0xc] & 0x10000) | |
| 460 | { | |
| 461 | tilemap_set_scrolldx(K037122_layer[chip][1], visarea->min_x, visarea->min_x); | |
| 462 | tilemap_set_scrolldy(K037122_layer[chip][1], visarea->min_y, visarea->min_y); | |
| 463 | tilemap_draw(bitmap, cliprect, K037122_layer[chip][1], 0,0); | |
| 464 | } | |
| 465 | else | |
| 466 | { | |
| 467 | tilemap_set_scrolldx(K037122_layer[chip][0], visarea->min_x, visarea->min_x); | |
| 468 | tilemap_set_scrolldy(K037122_layer[chip][0], visarea->min_y, visarea->min_y); | |
| 469 | tilemap_draw(bitmap, cliprect, K037122_layer[chip][0], 0,0); | |
| 470 | } | |
| 359 | running_device *k037122 = devtag_get_device(space->machine, get_cgboard_id() ? "k037122_2" : "k037122_1"); | |
| 360 | return k037122_reg_r(k037122, offset, mem_mask); | |
| 471 | 361 | } |
| 472 | 362 | |
| 473 | static | |
| 363 | static WRITE32 | |
| 474 | 364 | { |
| 475 | UINT32 data = K037122_tile_ram[chip][(palette_base/4) + color]; | |
| 476 | palette_set_color_rgb(machine, color, pal5bit(data >> 6), pal6bit(data >> 0), pal5bit(data >> 11)); | |
| 365 | running_device *k037122 = devtag_get_device(space->machine, get_cgboard_id() ? "k037122_2" : "k037122_1"); | |
| 366 | k037122_reg_w(k037122, offset, data, mem_mask); | |
| 477 | 367 | } |
| 478 | 368 | |
| 479 | static READ32_HANDLER(K037122_sram_r) | |
| 480 | { | |
| 481 | int chip = get_cgboard_id(); | |
| 482 | ||
| 483 | return K037122_tile_ram[chip][offset]; | |
| 484 | } | |
| 485 | ||
| 486 | static WRITE32_HANDLER(K037122_sram_w) | |
| 487 | { | |
| 488 | int chip = get_cgboard_id(); | |
| 489 | ||
| 490 | COMBINE_DATA(K037122_tile_ram[chip] + offset); | |
| 491 | ||
| 492 | if (K037122_reg[chip][0xc] & 0x10000) | |
| 493 | { | |
| 494 | if (offset < 0x8000/4) | |
| 495 | { | |
| 496 | tilemap_mark_tile_dirty(K037122_layer[chip][1], offset); | |
| 497 | } | |
| 498 | else if (offset >= 0x8000/4 && offset < 0x18000/4) | |
| 499 | { | |
| 500 | tilemap_mark_tile_dirty(K037122_layer[chip][0], offset - (0x8000/4)); | |
| 501 | } | |
| 502 | else if (offset >= 0x18000/4) | |
| 503 | { | |
| 504 | update_palette_color(space->machine, chip, 0x18000, offset - (0x18000/4)); | |
| 505 | } | |
| 506 | } | |
| 507 | else | |
| 508 | { | |
| 509 | if (offset < 0x8000/4) | |
| 510 | { | |
| 511 | update_palette_color(space->machine, chip, 0, offset); | |
| 512 | } | |
| 513 | else if (offset >= 0x8000/4 && offset < 0x18000/4) | |
| 514 | { | |
| 515 | tilemap_mark_tile_dirty(K037122_layer[chip][0], offset - (0x8000/4)); | |
| 516 | } | |
| 517 | else if (offset >= 0x18000/4) | |
| 518 | { | |
| 519 | tilemap_mark_tile_dirty(K037122_layer[chip][1], offset - (0x18000/4)); | |
| 520 | } | |
| 521 | } | |
| 522 | } | |
| 523 | ||
| 524 | ||
| 525 | static READ32_HANDLER(K037122_char_r) | |
| 526 | { | |
| 527 | int chip = get_cgboard_id(); | |
| 528 | ||
| 529 | UINT32 addr; | |
| 530 | int bank = K037122_reg[chip][0x30/4] & 0x7; | |
| 531 | ||
| 532 | addr = offset + (bank * (0x40000/4)); | |
| 533 | ||
| 534 | return K037122_char_ram[chip][addr]; | |
| 535 | } | |
| 536 | ||
| 537 | static WRITE32_HANDLER(K037122_char_w) | |
| 538 | { | |
| 539 | int chip = get_cgboard_id(); | |
| 540 | ||
| 541 | UINT32 addr; | |
| 542 | int bank = K037122_reg[chip][0x30/4] & 0x7; | |
| 543 | ||
| 544 | addr = offset + (bank * (0x40000/4)); | |
| 545 | ||
| 546 | COMBINE_DATA(K037122_char_ram[chip] + addr); | |
| 547 | gfx_element_mark_dirty(space->machine->gfx[K037122_gfx_index[chip]], addr / 32); | |
| 548 | } | |
| 549 | ||
| 550 | static READ32_HANDLER(K037122_reg_r) | |
| 551 | { | |
| 552 | int chip = get_cgboard_id(); | |
| 553 | ||
| 554 | switch (offset) | |
| 555 | { | |
| 556 | case 0x14/4: | |
| 557 | { | |
| 558 | return 0x000003fa; | |
| 559 | } | |
| 560 | } | |
| 561 | return K037122_reg[chip][offset]; | |
| 562 | } | |
| 563 | ||
| 564 | static WRITE32_HANDLER(K037122_reg_w) | |
| 565 | { | |
| 566 | int chip = get_cgboard_id(); | |
| 567 | ||
| 568 | COMBINE_DATA( K037122_reg[chip] + offset ); | |
| 569 | } | |
| 570 | ||
| 571 | 369 | static void voodoo_vblank_0(running_device *device, int param) |
| 572 | 370 | { |
| 573 | 371 | cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE); |
| r7356 | r7357 | |
| 578 | 376 | cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_IRQ1, ASSERT_LINE); |
| 579 | 377 | } |
| 580 | 378 | |
| 581 | static VIDEO_START( hornet ) | |
| 582 | { | |
| 583 | K037122_vh_start(machine, 0); | |
| 584 | } | |
| 585 | ||
| 586 | static VIDEO_START( hornet_2board ) | |
| 587 | { | |
| 588 | K037122_vh_start(machine, 0); | |
| 589 | K037122_vh_start(machine, 1); | |
| 590 | } | |
| 591 | ||
| 592 | ||
| 593 | 379 | static VIDEO_UPDATE( hornet ) |
| 594 | 380 | { |
| 595 | 381 | running_device *voodoo = devtag_get_device(screen->machine, "voodoo0"); |
| 382 | running_device *k037122 = devtag_get_device(screen->machine, "k037122_1"); | |
| 596 | 383 | |
| 597 | 384 | voodoo_update(voodoo, bitmap, cliprect); |
| 598 | 385 | |
| 599 | | |
| 386 | k037122_tile_draw(k | |
| 600 | 387 | |
| 601 | 388 | draw_7segment_led(bitmap, 3, 3, led_reg0); |
| 602 | 389 | draw_7segment_led(bitmap, 9, 3, led_reg1); |
| r7356 | r7357 | |
| 607 | 394 | { |
| 608 | 395 | if (strcmp(screen->tag, "lscreen") == 0) |
| 609 | 396 | { |
| 397 | running_device *k037122 = devtag_get_device(screen->machine, "k037122_1"); | |
| 610 | 398 | running_device *voodoo = devtag_get_device(screen->machine, "voodoo0"); |
| 611 | 399 | voodoo_update(voodoo, bitmap, cliprect); |
| 612 | 400 | |
| 613 | 401 | /* TODO: tilemaps per screen */ |
| 614 | | |
| 402 | k037122_tile_draw(k | |
| 615 | 403 | } |
| 616 | 404 | else if (strcmp(screen->tag, "rscreen") == 0) |
| 617 | 405 | { |
| 406 | running_device *k037122 = devtag_get_device(screen->machine, "k037122_2"); | |
| 618 | 407 | running_device *voodoo = devtag_get_device(screen->machine, "voodoo1"); |
| 619 | 408 | voodoo_update(voodoo, bitmap, cliprect); |
| 620 | 409 | |
| 621 | 410 | /* TODO: tilemaps per screen */ |
| 622 | | |
| 411 | k037122_tile_draw(k037 | |
| 623 | 412 | } |
| 624 | 413 | |
| 625 | 414 | draw_7segment_led(bitmap, 3, 3, led_reg0); |
| r7356 | r7357 | |
| 798 | 587 | |
| 799 | 588 | static ADDRESS_MAP_START( hornet_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 800 | 589 | AM_RANGE(0x00000000, 0x003fffff) AM_RAM AM_BASE(&workram) /* Work RAM */ |
| 801 | AM_RANGE(0x74000000, 0x740000ff) AM_READWRITE(K037122_reg_r, K037122_reg_w) | |
| 802 | AM_RANGE(0x74020000, 0x7403ffff) AM_READWRITE(K037122_sram_r, K037122_sram_w) | |
| 803 | AM_RANGE(0x74040000, 0x7407ffff) AM_READWRITE(K037122_char_r, K037122_char_w) | |
| 590 | AM_RANGE(0x74000000, 0x740000ff) AM_READWRITE(hornet_k037122_reg_r, hornet_k037122_reg_w) | |
| 591 | AM_RANGE(0x74020000, 0x7403ffff) AM_READWRITE(hornet_k037122_sram_r, hornet_k037122_sram_w) | |
| 592 | AM_RANGE(0x74040000, 0x7407ffff) AM_READWRITE(hornet_k037122_char_r, hornet_k037122_char_w) | |
| 804 | 593 | AM_RANGE(0x74080000, 0x7408000f) AM_READWRITE(gun_r, gun_w) |
| 805 | 594 | AM_RANGE(0x78000000, 0x7800ffff) AM_READWRITE(cgboard_dsp_shared_r_ppc, cgboard_dsp_shared_w_ppc) |
| 806 | 595 | AM_RANGE(0x780c0000, 0x780c0003) AM_READWRITE(cgboard_dsp_comm_r_ppc, cgboard_dsp_comm_w_ppc) |
| r7356 | r7357 | |
| 1111 | 900 | "voodoo1" |
| 1112 | 901 | }; |
| 1113 | 902 | |
| 903 | static const k037122_interface hornet_k037122_intf = | |
| 904 | { | |
| 905 | "screen", 0 | |
| 906 | }; | |
| 907 | ||
| 908 | static const k037122_interface hornet_k037122_intf_l = | |
| 909 | { | |
| 910 | "lscreen", 0 | |
| 911 | }; | |
| 912 | ||
| 913 | static const k037122_interface hornet_k037122_intf_r = | |
| 914 | { | |
| 915 | "rscreen", 1 | |
| 916 | }; | |
| 917 | ||
| 1114 | 918 | static MACHINE_DRIVER_START( hornet ) |
| 1115 | 919 | |
| 1116 | 920 | /* basic machine hardware */ |
| r7356 | r7357 | |
| 1147 | 951 | |
| 1148 | 952 | MDRV_PALETTE_LENGTH(65536) |
| 1149 | 953 | |
| 1150 | MDRV_VIDEO_START(hornet) | |
| 1151 | 954 | MDRV_VIDEO_UPDATE(hornet) |
| 1152 | 955 | |
| 956 | MDRV_K037122_ADD("k037122_1", hornet_k037122_intf) | |
| 957 | ||
| 1153 | 958 | MDRV_K056800_ADD("k056800", hornet_k056800_interface) |
| 1154 | 959 | |
| 1155 | 960 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| r7356 | r7357 | |
| 1191 | 996 | |
| 1192 | 997 | MDRV_MACHINE_RESET(hornet_2board) |
| 1193 | 998 | |
| 1194 | MDRV_VIDEO_START(hornet_2board) | |
| 1195 | 999 | MDRV_VIDEO_UPDATE(hornet_2board) |
| 1196 | 1000 | |
| 1001 | MDRV_DEVICE_REMOVE("k037122_1") | |
| 1002 | MDRV_K037122_ADD("k037122_1", hornet_k037122_intf_l) | |
| 1003 | MDRV_K037122_ADD("k037122_2", hornet_k037122_intf_r) | |
| 1004 | ||
| 1197 | 1005 | MDRV_DEVICE_REMOVE("voodoo0") |
| 1198 | 1006 | MDRV_3DFX_VOODOO_1_ADD("voodoo0", STD_VOODOO_1_CLOCK, 2, "lscreen") |
| 1199 | 1007 | MDRV_3DFX_VOODOO_CPU("dsp") |
| r7356 | r7357 | |
|---|---|---|
| 418 | 418 | INPUT_PORTS_END |
| 419 | 419 | |
| 420 | 420 | |
| 421 | static INPUT_PORTS_START( ccastlej ) | |
| 421 | static INPUT_PORTS_START( ccastlesj ) | |
| 422 | 422 | PORT_INCLUDE(ccastles) |
| 423 | 423 | |
| 424 | 424 | PORT_MODIFY("LETA0") |
| r7356 | r7357 | |
| 698 | 698 | * |
| 699 | 699 | *************************************/ |
| 700 | 700 | |
| 701 | GAME( 1983, ccastles, 0, ccastles, ccastles, 0, ROT0, "Atari", "Crystal Castles (version 4)", GAME_SUPPORTS_SAVE ) | |
| 701 | GAME( 1983, ccastles, 0, ccastles, ccastles, 0, ROT0, "Atari", "Crystal Castles (version 4)", GAME_SUPPORTS_SAVE ) | |
| 702 | 702 | GAME( 1983, ccastlesg, ccastles, ccastles, ccastles, 0, ROT0, "Atari", "Crystal Castles (version 3, German)", GAME_SUPPORTS_SAVE ) |
| 703 | 703 | GAME( 1983, ccastlesp, ccastles, ccastles, ccastles, 0, ROT0, "Atari", "Crystal Castles (version 3, Spanish)", GAME_SUPPORTS_SAVE ) |
| 704 | 704 | GAME( 1983, ccastlesf, ccastles, ccastles, ccastles, 0, ROT0, "Atari", "Crystal Castles (version 3, French)", GAME_SUPPORTS_SAVE ) |
| 705 | 705 | GAME( 1983, ccastles3, ccastles, ccastles, ccastles, 0, ROT0, "Atari", "Crystal Castles (version 3)", GAME_SUPPORTS_SAVE ) |
| 706 | 706 | GAME( 1983, ccastles2, ccastles, ccastles, ccastles, 0, ROT0, "Atari", "Crystal Castles (version 2)", GAME_SUPPORTS_SAVE ) |
| 707 | 707 | GAME( 1983, ccastles1, ccastles, ccastles, ccastles, 0, ROT0, "Atari", "Crystal Castles (version 1)", GAME_SUPPORTS_SAVE ) |
| 708 | GAME( 1983, ccastlesj, ccastles, ccastles, ccastlej, | |
| 708 | GAME( 1983, ccastlesj, ccastles, ccastles, ccastlesj, |
| r7356 | r7357 | |
|---|---|---|
| 437 | 437 | PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 438 | 438 | INPUT_PORTS_END |
| 439 | 439 | |
| 440 | static INPUT_PORTS_START( ddrago3b ) | |
| 440 | static INPUT_PORTS_START( ddragon3b ) | |
| 441 | 441 | PORT_INCLUDE( ctribe ) |
| 442 | 442 | |
| 443 | 443 | PORT_MODIFY("IN0") |
| r7356 | r7357 | |
| 630 | 630 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.50) |
| 631 | 631 | MACHINE_DRIVER_END |
| 632 | 632 | |
| 633 | static MACHINE_DRIVER_START( ddrago3b ) | |
| 633 | static MACHINE_DRIVER_START( ddragon3b ) | |
| 634 | 634 | MDRV_IMPORT_FROM(ddragon3) |
| 635 | 635 | |
| 636 | 636 | MDRV_CPU_MODIFY("maincpu") |
| r7356 | r7357 | |
| 1014 | 1014 | GAME( 1990, ddragon3, 0, ddragon3, ddragon3, 0, ROT0, "Technos Japan", "Double Dragon 3 - The Rosetta Stone (US)", GAME_SUPPORTS_SAVE ) |
| 1015 | 1015 | GAME( 1990, ddragon3j,ddragon3, ddragon3, ddragon3, 0, ROT0, "Technos Japan", "Double Dragon 3 - The Rosetta Stone (Japan)", GAME_SUPPORTS_SAVE ) |
| 1016 | 1016 | GAME( 1990, ddragon3p,ddragon3, ddragon3, ddragon3, 0, ROT0, "Technos Japan", "Double Dragon 3 - The Rosetta Stone (prototype)", GAME_SUPPORTS_SAVE ) |
| 1017 | GAME( 1990, ddragon3b,ddragon3, ddrago3b, | |
| 1017 | GAME( 1990, ddragon3b,ddragon3, ddragon3b, | |
| 1018 | 1018 | GAME( 1990, ctribe, 0, ctribe, ctribe, 0, ROT0, "Technos Japan", "The Combatribes (US)", GAME_SUPPORTS_SAVE ) |
| 1019 | 1019 | GAME( 1990, ctribe1, ctribe, ctribe, ctribe, 0, ROT0, "Technos Japan", "The Combatribes (US Set 1?)", GAME_SUPPORTS_SAVE ) |
| 1020 | 1020 | GAME( 1990, ctribej, ctribe, ctribe, ctribe, 0, ROT0, "Technos Japan", "The Combatribes (Japan)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 144 | 144 | |
| 145 | 145 | - Add 62XX custom to machine/namcoio.c (though it's quite different from 56XX and 58XX). |
| 146 | 146 | |
| 147 | - Is the sp | |
| 147 | - Is the sp | |
| 148 | 148 | very similar, especially in the way the size flags are layed out. |
| 149 | 149 | |
| 150 | 150 | ***************************************************************************/ |
| r7356 | r7357 | |
|---|---|---|
| 233 | 233 | static MACHINE_DRIVER_START( carpolo ) |
| 234 | 234 | |
| 235 | 235 | /* basic machine hardware */ |
| 236 | MDRV_CPU_ADD("maincpu", M6502,11289 | |
| 236 | MDRV_CPU_ADD("maincpu", M6502, XTAL_11_289MHz/12) /* 940.75 kHz */ | |
| 237 | 237 | MDRV_CPU_PROGRAM_MAP(main_map) |
| 238 | 238 | MDRV_CPU_VBLANK_INT("screen", carpolo_timer_interrupt) /* this not strictly VBLANK, |
| 239 | 239 | but it's supposed to happen 60 |
| r7356 | r7357 | |
|---|---|---|
| 305 | 305 | |
| 306 | 306 | |
| 307 | 307 | |
| 308 | GAME( 1987, mx5000, 0, | |
| 308 | GAME( 1987, mx5000, 0, flkatck, flkatck, 0, ROT90, "Konami", "MX5000", GAME_SUPPORTS_SAVE ) | |
| 309 | 309 | GAME( 1987, flkatck, mx5000, flkatck, flkatck, 0, ROT90, "Konami", "Flak Attack (Japan)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 24 | 24 | #include "sound/qsound.h" |
| 25 | 25 | #include "sound/psx.h" |
| 26 | 26 | #include "sound/ymf271.h" |
| 27 | #include "audio/taito_zm.h" | |
| 27 | 28 | |
| 28 | 29 | #define VERBOSE_LEVEL ( 0 ) |
| 29 | 30 | |
| r7356 | r7357 | |
| 79 | 80 | static const UINT8 mg04[ 8 ] = { 0xf0, 0xe1, 0x81, 0x82, 0xfa, 0x04, 0x3c, 0xc0 }; |
| 80 | 81 | static const UINT8 mg05[ 8 ] = { 0x80, 0xc2, 0x38, 0xf9, 0xfd, 0x0c, 0x10, 0xe0 }; /* brute forced */ |
| 81 | 82 | static const UINT8 mg06[ 8 ] = { 0xc0, 0xe2, 0xe1, 0xfd, 0x04, 0x78, 0x70, 0xf0 }; |
| 83 | static const UINT8 mg07[ 8 ] = { 0xe0, 0xc2, 0x38, 0xf9, 0xfd, 0x0c, 0x70, 0x80 }; | |
| 82 | 84 | static const UINT8 mg08[ 8 ] = { 0xf0, 0xfa, 0xf9, 0xc1, 0x20, 0x1c, 0x7c, 0x80 }; |
| 83 | 85 | static const UINT8 mg09[ 8 ] = { 0xf0, 0x03, 0xe2, 0x18, 0x78, 0x7c, 0x3c, 0xc0 }; /* brute forced */ |
| 84 | 86 | static const UINT8 mg10[ 8 ] = { 0xfc, 0xf2, 0x30, 0xc1, 0xf9, 0x78, 0x60, 0xe0 }; |
| r7356 | r7357 | |
| 156 | 158 | { "doapp", mg01, mg05 }, /* OK */ |
| 157 | 159 | { "flamegun", mg01, mg06 }, /* OK */ |
| 158 | 160 | { "flamegunj",mg01, mg06 }, /* OK */ |
| 161 | { "lpadv", mg01, mg07 }, | |
| 159 | 162 | { "glpracr3", mg01, mg08 }, |
| 160 | 163 | { "tondemo", mg01, mg09 }, /* OK */ |
| 161 | 164 | { "1on1gov", mg01, mg10 }, /* OK */ |
| r7356 | r7357 | |
| 1322 | 1325 | } |
| 1323 | 1326 | } |
| 1324 | 1327 | |
| 1328 | ||
| 1325 | 1329 | static MACHINE_DRIVER_START( coh1000tb ) |
| 1326 | 1330 | MDRV_IMPORT_FROM( zn1_2mb_vram ) |
| 1327 | 1331 | |
| r7356 | r7357 | |
| 1329 | 1333 | MDRV_NVRAM_HANDLER( coh1000tb ) |
| 1330 | 1334 | |
| 1331 | 1335 | MDRV_MB3773_ADD("mb3773") |
| 1336 | ||
| 1337 | MDRV_IMPORT_FROM( taito_zoom_sound ) | |
| 1332 | 1338 | MACHINE_DRIVER_END |
| 1333 | 1339 | |
| 1334 | 1340 | /* |
| r7356 | r7357 | |
| 3697 | 3703 | ROM_LOAD( "fb0b.326", 0x3000000, 0x400000, CRC(ad78ec79) SHA1(7e37a90a64c70f2c0024eaf30e1e4e028c0d858e) ) |
| 3698 | 3704 | ROM_END |
| 3699 | 3705 | |
| 3706 | ROM_START( lpadv ) | |
| 3707 | TPS_BIOS | |
| 3708 | ||
| 3709 | ROM_REGION32_LE( 0xc00000, "user2", 0 ) | |
| 3710 | ROM_LOAD16_BYTE( "lp_3.u0119", 0x000001, 0x100000, CRC(18cade44) SHA1(8a44156224c77c51f4f6ca61a0168e48dfcc6eda) ) | |
| 3711 | ROM_LOAD16_BYTE( "lp_4.u0120", 0x000000, 0x100000, CRC(12fffc02) SHA1(3294b65e4a0bbf501785565dd0c1f36f9bcea969) ) | |
| 3712 | ROM_LOAD( "rp00.u0216", 0x400000, 0x400000, CRC(d759d0d4) SHA1(47b009a5dfa81611276b1376bdab44dfad597e85) ) | |
| 3713 | ROM_LOAD( "rp01.u0217", 0x800000, 0x400000, CRC(5be576e1) SHA1(e24a96d179016d6d65205079874b35500760a642) ) | |
| 3714 | ROM_END | |
| 3715 | ||
| 3700 | 3716 | ROM_START( mfjump ) |
| 3701 | 3717 | TPS_BIOS |
| 3702 | 3718 | |
| r7356 | r7357 | |
| 3807 | 3823 | ROM_LOAD( "e25-02.2", 0x0800000, 0x400000, CRC(8e8b4c82) SHA1(55c9d4d3a08fc3226a75ab3a674be433af83e289) ) |
| 3808 | 3824 | ROM_LOAD( "e25-03.12", 0x0c00000, 0x400000, CRC(43b1c085) SHA1(6e53550e9be0d2f415fc6b4f3b8a71185c5370b2) ) |
| 3809 | 3825 | |
| 3810 | ROM_REGION( 0x080000, " | |
| 3826 | ROM_REGION( 0x080000, "mn | |
| 3811 | 3827 | ROM_LOAD( "e25-10.14", 0x0000000, 0x080000, CRC(2b2ad1b1) SHA1(6d064d0b6805d43ce42929ac8f5645b56384f53c) ) |
| 3812 | 3828 | |
| 3813 | ROM_REGION( 0x600000, " | |
| 3829 | ROM_REGION( 0x600000, "zsg1 | |
| 3814 | 3830 | ROM_LOAD( "e25-04.27", 0x0000000, 0x400000, CRC(09a66d35) SHA1(f0df24bc9bfc9eb0f5150dc035c19fc5b8a39bf9) ) |
| 3815 | 3831 | ROM_LOAD( "e25-05.28", 0x0040000, 0x200000, CRC(3fb57636) SHA1(aa38bfac11ecf10fd55143cf4525a2a529be8bb6) ) |
| 3816 | 3832 | ROM_END |
| r7356 | r7357 | |
| 3825 | 3841 | ROM_LOAD( "e25-02.2", 0x0800000, 0x400000, CRC(8e8b4c82) SHA1(55c9d4d3a08fc3226a75ab3a674be433af83e289) ) |
| 3826 | 3842 | ROM_LOAD( "e25-03.12", 0x0c00000, 0x400000, CRC(43b1c085) SHA1(6e53550e9be0d2f415fc6b4f3b8a71185c5370b2) ) |
| 3827 | 3843 | |
| 3828 | ROM_REGION( 0x080000, " | |
| 3844 | ROM_REGION( 0x080000, "mn | |
| 3829 | 3845 | ROM_LOAD( "e25-10.14", 0x0000000, 0x080000, CRC(2b2ad1b1) SHA1(6d064d0b6805d43ce42929ac8f5645b56384f53c) ) |
| 3830 | 3846 | |
| 3831 | ROM_REGION( 0x600000, " | |
| 3847 | ROM_REGION( 0x600000, "zsg1 | |
| 3832 | 3848 | ROM_LOAD( "e25-04.27", 0x0000000, 0x400000, CRC(09a66d35) SHA1(f0df24bc9bfc9eb0f5150dc035c19fc5b8a39bf9) ) |
| 3833 | 3849 | ROM_LOAD( "e25-05.28", 0x0040000, 0x200000, CRC(3fb57636) SHA1(aa38bfac11ecf10fd55143cf4525a2a529be8bb6) ) |
| 3834 | 3850 | ROM_END |
| r7356 | r7357 | |
| 3843 | 3859 | ROM_LOAD( "e25-02.2", 0x0800000, 0x400000, CRC(8e8b4c82) SHA1(55c9d4d3a08fc3226a75ab3a674be433af83e289) ) |
| 3844 | 3860 | ROM_LOAD( "e25-03.12", 0x0c00000, 0x400000, CRC(43b1c085) SHA1(6e53550e9be0d2f415fc6b4f3b8a71185c5370b2) ) |
| 3845 | 3861 | |
| 3846 | ROM_REGION( 0x080000, " | |
| 3862 | ROM_REGION( 0x080000, "mn | |
| 3847 | 3863 | ROM_LOAD( "e25-10.14", 0x0000000, 0x080000, CRC(2b2ad1b1) SHA1(6d064d0b6805d43ce42929ac8f5645b56384f53c) ) |
| 3848 | 3864 | |
| 3849 | ROM_REGION( 0x600000, " | |
| 3865 | ROM_REGION( 0x600000, "zsg1 | |
| 3850 | 3866 | ROM_LOAD( "e25-04.27", 0x0000000, 0x400000, CRC(09a66d35) SHA1(f0df24bc9bfc9eb0f5150dc035c19fc5b8a39bf9) ) |
| 3851 | 3867 | ROM_LOAD( "e25-05.28", 0x0040000, 0x200000, CRC(3fb57636) SHA1(aa38bfac11ecf10fd55143cf4525a2a529be8bb6) ) |
| 3852 | 3868 | ROM_END |
| r7356 | r7357 | |
| 3861 | 3877 | ROM_LOAD( "e39-02.2", 0x0800000, 0x400000, CRC(a47aab5d) SHA1(64b58e47035ad9d8d6dcaf475cbcc3ad85f4d82f) ) |
| 3862 | 3878 | ROM_LOAD( "e39-03.12", 0x0c00000, 0x400000, CRC(a883b6a5) SHA1(b8d00d944c90f8cd9c2b076688f4c68b2e6d557a) ) |
| 3863 | 3879 | |
| 3864 | ROM_REGION( 0x080000, " | |
| 3880 | ROM_REGION( 0x080000, "mn | |
| 3865 | 3881 | ROM_LOAD( "e39-07.14", 0x0000000, 0x080000, CRC(2252c7c1) SHA1(92b9908e0d87cad6587f1acc0eef69eaae8c6a98) ) |
| 3866 | 3882 | |
| 3867 | ROM_REGION( 0x400000, " | |
| 3883 | ROM_REGION( 0x400000, "zsg1 | |
| 3868 | 3884 | ROM_LOAD( "e39-04.27", 0x0000000, 0x400000, CRC(6ee35e68) SHA1(fdfe63203d8cecf84cb869039fb893d5b63cdd67) ) |
| 3869 | 3885 | ROM_END |
| 3870 | 3886 | |
| r7356 | r7357 | |
| 3878 | 3894 | ROM_LOAD( "e39-02.2", 0x0800000, 0x400000, CRC(a47aab5d) SHA1(64b58e47035ad9d8d6dcaf475cbcc3ad85f4d82f) ) |
| 3879 | 3895 | ROM_LOAD( "e39-03.12", 0x0c00000, 0x400000, CRC(a883b6a5) SHA1(b8d00d944c90f8cd9c2b076688f4c68b2e6d557a) ) |
| 3880 | 3896 | |
| 3881 | ROM_REGION( 0x080000, " | |
| 3897 | ROM_REGION( 0x080000, "mn | |
| 3882 | 3898 | ROM_LOAD( "e39-07.14", 0x0000000, 0x080000, CRC(2252c7c1) SHA1(92b9908e0d87cad6587f1acc0eef69eaae8c6a98) ) |
| 3883 | 3899 | |
| 3884 | ROM_REGION( 0x400000, " | |
| 3900 | ROM_REGION( 0x400000, "zsg1 | |
| 3885 | 3901 | ROM_LOAD( "e39-04.27", 0x0000000, 0x400000, CRC(6ee35e68) SHA1(fdfe63203d8cecf84cb869039fb893d5b63cdd67) ) |
| 3886 | 3902 | ROM_END |
| 3887 | 3903 | |
| r7356 | r7357 | |
| 3895 | 3911 | ROM_LOAD( "e39-02.2", 0x0800000, 0x400000, CRC(a47aab5d) SHA1(64b58e47035ad9d8d6dcaf475cbcc3ad85f4d82f) ) |
| 3896 | 3912 | ROM_LOAD( "e39-03.12", 0x0c00000, 0x400000, CRC(a883b6a5) SHA1(b8d00d944c90f8cd9c2b076688f4c68b2e6d557a) ) |
| 3897 | 3913 | |
| 3898 | ROM_REGION( 0x080000, " | |
| 3914 | ROM_REGION( 0x080000, "mn | |
| 3899 | 3915 | ROM_LOAD( "e39-07.14", 0x0000000, 0x080000, CRC(2252c7c1) SHA1(92b9908e0d87cad6587f1acc0eef69eaae8c6a98) ) |
| 3900 | 3916 | |
| 3901 | ROM_REGION( 0x400000, " | |
| 3917 | ROM_REGION( 0x400000, "zsg1 | |
| 3902 | 3918 | ROM_LOAD( "e39-04.27", 0x0000000, 0x400000, CRC(6ee35e68) SHA1(fdfe63203d8cecf84cb869039fb893d5b63cdd67) ) |
| 3903 | 3919 | ROM_END |
| 3904 | 3920 | |
| r7356 | r7357 | |
| 4002 | 4018 | ROM_LOAD( "e24-02.1", 0x0400000, 0x400000, CRC(9f70950d) SHA1(b3e4f925a61ae2e5dd4cc5d7ec3030a0d5c2c04d) ) |
| 4003 | 4019 | ROM_LOAD( "e24-03.2", 0x0800000, 0x400000, CRC(6c1f0a5d) SHA1(1aac37a7ff23e54021a4cec18c9bb93242337180) ) |
| 4004 | 4020 | |
| 4005 | ROM_REGION( 0x080000, " | |
| 4021 | ROM_REGION16_LE( 0x080000, "mn | |
| 4006 | 4022 | ROM_LOAD( "e24-09.14", 0x0000000, 0x080000, CRC(808589e1) SHA1(46ada4c6d68c2462186a0b962abb435ee740c0ba) ) |
| 4007 | 4023 | |
| 4008 | ROM_REGION( 0x400000, " | |
| 4024 | ROM_REGION( 0x400000, "zsg1 | |
| 4009 | 4025 | ROM_LOAD( "e24-04.27", 0x0000000, 0x400000, CRC(f403493a) SHA1(3e49fd2a060a3893e26f14cc3cf47c4ba91e17d4) ) |
| 4010 | 4026 | ROM_END |
| 4011 | 4027 | |
| r7356 | r7357 | |
| 4018 | 4034 | ROM_LOAD( "e24-02.1", 0x0400000, 0x400000, CRC(9f70950d) SHA1(b3e4f925a61ae2e5dd4cc5d7ec3030a0d5c2c04d) ) |
| 4019 | 4035 | ROM_LOAD( "e24-03.2", 0x0800000, 0x400000, CRC(6c1f0a5d) SHA1(1aac37a7ff23e54021a4cec18c9bb93242337180) ) |
| 4020 | 4036 | |
| 4021 | ROM_REGION( 0x080000, " | |
| 4037 | ROM_REGION( 0x080000, "mn | |
| 4022 | 4038 | ROM_LOAD( "e24-09.14", 0x0000000, 0x080000, CRC(808589e1) SHA1(46ada4c6d68c2462186a0b962abb435ee740c0ba) ) |
| 4023 | 4039 | |
| 4024 | ROM_REGION( 0x400000, " | |
| 4040 | ROM_REGION( 0x400000, "zsg1 | |
| 4025 | 4041 | ROM_LOAD( "e24-04.27", 0x0000000, 0x400000, CRC(f403493a) SHA1(3e49fd2a060a3893e26f14cc3cf47c4ba91e17d4) ) |
| 4026 | 4042 | ROM_END |
| 4027 | 4043 | |
| r7356 | r7357 | |
| 4471 | 4487 | GAME( 1999, glpracr3, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "Gallop Racer 3 (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4472 | 4488 | GAME( 1999, flamegun, tps, coh1002m, zn, coh1002m, ROT0, "GAPS Inc.", "Flame Gunner", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4473 | 4489 | GAME( 1999, flamegunj, flamegun, coh1002m, zn, coh1002m, ROT0, "GAPS Inc.", "Flame Gunner (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4490 | GAME( 1999, lpadv, tps, coh1002m, zn, coh1002m, ROT0, "Amuse World", "Logic Pro Adventure (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 4474 | 4491 | GAME( 2000, tblkkuzu, tps, coh1002m, zn, coh1002m, ROT0, "Tamsoft/D3 Publisher", "The Block Kuzushi (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4475 | 4492 | GAME( 2000, 1on1gov, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "1 on 1 Government (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4476 | 4493 | GAME( 2000, tecmowcm, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "Tecmo World Cup Millennium (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| r7356 | r7357 | |
|---|---|---|
| 766 | 766 | INPUT_PORTS_END |
| 767 | 767 | |
| 768 | 768 | |
| 769 | static INPUT_PORTS_START( minigol2 ) | |
| 769 | static INPUT_PORTS_START( minigolf2 ) | |
| 770 | 770 | PORT_INCLUDE( minigolf ) |
| 771 | 771 | |
| 772 | 772 | PORT_MODIFY("SWH") |
| r7356 | r7357 | |
| 1748 | 1748 | MOTHERBOARD_PALS |
| 1749 | 1749 | ROM_END |
| 1750 | 1750 | |
| 1751 | ROM_START( nametune2 ) | |
| 1752 | ROM_REGION( 0x70000, "maincpu", 0 ) /* 64k for code for the first CPU, plus 128k of banked ROMs */ | |
| 1753 | ROM_LOAD( "nmetneur_ab_01.u8a", 0x10000, 0x4000, CRC(4044891d) SHA1(4e1e7cb9846939e03b035b95ba04f62a78719bb2) ) | |
| 1754 | ROM_CONTINUE( 0x40000, 0x4000 ) | |
| 1755 | ROM_LOAD( "nmetneur_ab_23.u7a", 0x14000, 0x4000, CRC(df3454bc) SHA1(82faf87ca8974629e546b6854718908721b64ad0) ) | |
| 1756 | ROM_CONTINUE( 0x44000, 0x4000 ) | |
| 1757 | ROM_LOAD( "nmetneur_ab_45.u6a", 0x18000, 0x4000, CRC(fb4050b0) SHA1(a4d185e02aa08e886b90454f681f49de3de76f86) ) | |
| 1758 | ROM_CONTINUE( 0x48000, 0x4000 ) | |
| 1759 | ROM_LOAD( "nmetneur_ab_67.u5a", 0x1c000, 0x4000, CRC(276a28f4) SHA1(cceeb9c05ff72cfe86ab55555055cf8195d3ea16) ) | |
| 1760 | ROM_CONTINUE( 0x4c000, 0x4000 ) | |
| 1761 | ROM_LOAD( "nmetneur_cd_01.u4a", 0x20000, 0x4000, CRC(88bed028) SHA1(69c83ba07f34dd1d45f432e2ed6a50e2d13c4acb) ) | |
| 1762 | ROM_CONTINUE( 0x50000, 0x4000 ) | |
| 1763 | ROM_LOAD( "nmetneur_cd_23.u3a", 0x24000, 0x4000, CRC(38c63308) SHA1(1a26642cbe91ebc96444eb05fa1454c9175d370c) ) | |
| 1764 | ROM_CONTINUE( 0x54000, 0x4000 ) | |
| 1765 | ROM_LOAD( "nmetneur_cd_45.u2a", 0x28000, 0x4000, CRC(d19a3671) SHA1(b68010ad235175c73258f64f9a64b37b2a06efdc) ) | |
| 1766 | ROM_CONTINUE( 0x58000, 0x4000 ) | |
| 1767 | ROM_LOAD( "nmetneur_cd_6_ef.u1a", 0x2c000, 0x4000, CRC(e73c7cda) SHA1(c6f751923d0c7930db2e173f680674759f94c8bb) ) | |
| 1768 | ROM_CONTINUE( 0x5c000, 0x4000 ) | |
| 1751 | 1769 | |
| 1770 | ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for Z80 */ | |
| 1771 | ROM_LOAD( "sentesnd", 0x00000, 0x2000, CRC(4dd0a525) SHA1(f0c447adc5b67917851a9df978df851247e75c43) ) | |
| 1772 | ||
| 1773 | ROM_REGION( 0x10000, "gfx1", 0 ) /* up to 64k of sprites */ | |
| 1774 | ROM_LOAD( "nmetneur_gr_0.u3c", 0x00000, 0x8000, CRC(a0121b80) SHA1(ba38e9b738baac85fa33ae3751d02cb223fa3e65) ) | |
| 1775 | ||
| 1776 | ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */ | |
| 1777 | ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8ANC */ | |
| 1778 | ||
| 1779 | MOTHERBOARD_PALS | |
| 1780 | ROM_END | |
| 1781 | ||
| 1752 | 1782 | /* |
| 1753 | 1783 | Night Stocker |
| 1754 | 1784 | |
| r7356 | r7357 | |
| 2080 | 2110 | static DRIVER_INIT( triviaes ) { expand_roms(machine, EXPAND_NONE | SWAP_HALVES); config_shooter_adc(machine, FALSE, 0 /* noanalog */); } |
| 2081 | 2111 | static DRIVER_INIT( gimeabrk ) { expand_roms(machine, EXPAND_ALL); config_shooter_adc(machine, FALSE, 1); } |
| 2082 | 2112 | static DRIVER_INIT( minigolf ) { expand_roms(machine, EXPAND_NONE); config_shooter_adc(machine, FALSE, 2); } |
| 2083 | static DRIVER_INIT( minigol2 ) { expand_roms(machine, 0x0c); config_shooter_adc(machine, FALSE, 2); } | |
| 2113 | static DRIVER_INIT( minigolf2 ) { expand_roms(machine, 0x0c); config_shooter_adc(machine, FALSE, 2); } | |
| 2084 | 2114 | static DRIVER_INIT( toggle ) { expand_roms(machine, EXPAND_ALL); config_shooter_adc(machine, FALSE, 0 /* noanalog */); } |
| 2085 | 2115 | static DRIVER_INIT( nametune ) |
| 2086 | 2116 | { |
| r7356 | r7357 | |
| 2155 | 2185 | GAMEL(1984, stocker, 0, balsente, stocker, stocker, ROT0, "Bally/Sente", "Stocker", GAME_SUPPORTS_SAVE, layout_stocker ) |
| 2156 | 2186 | GAME( 1985, gimeabrk, 0, balsente, gimeabrk, gimeabrk, ROT0, "Bally/Sente", "Gimme A Break", GAME_SUPPORTS_SAVE ) |
| 2157 | 2187 | GAME( 1985, minigolf, 0, balsente, minigolf, minigolf, ROT0, "Bally/Sente", "Mini Golf (set 1)", GAME_SUPPORTS_SAVE ) |
| 2158 | GAME( 1985, minigolf2,minigolf, balsente, minigol2, | |
| 2188 | GAME( 1985, minigolf2,minigolf, balsente, minigolf2, | |
| 2159 | 2189 | |
| 2160 | 2190 | /* Board: Unknown (Baby Boomer Edition uses 006-8025-01-0B Rev B board. Do the rest use it too? */ |
| 2161 | 2191 | GAME( 1984, triviag1, 0, balsente, triviag1, triviag1, ROT0, "Bally/Sente", "Trivial Pursuit (Genus I) (set 1)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
| 2168 | 2198 | GAME( 1985, toggle, 0, balsente, toggle, toggle, ROT0, "Bally/Sente", "Toggle (prototype)", GAME_SUPPORTS_SAVE ) |
| 2169 | 2199 | GAME( 1986, nametune, 0, balsente, nametune, nametune, ROT0, "Bally/Sente", "Name That Tune", GAME_SUPPORTS_SAVE ) |
| 2170 | 2200 | |
| 2201 | /* Board: 006-8030-01-0A Rev A */ | |
| 2202 | GAME( 1986, nametune2,nametune, balsente, nametune, nametune, ROT0, "Bally/Sente", "Name That Tune (3-23-86)", GAME_SUPPORTS_SAVE ) | |
| 2203 | ||
| 2171 | 2204 | /* Board: 006-8027-01-0B Rev B */ |
| 2172 | 2205 | GAME( 1986, nstocker, 0, balsente, nstocker, nstocker, ROT0, "Bally/Sente", "Night Stocker (set 1)", GAME_SUPPORTS_SAVE ) |
| 2173 | 2206 | GAME( 1986, nstocker2,nstocker, balsente, nstocker, nstocker, ROT0, "Bally/Sente", "Night Stocker (set 2)", GAME_SUPPORTS_SAVE ) |
| r0 | r7357 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | Double Dribble (GX690) (c) Konami 1986 | |
| 4 | ||
| 5 | Driver by Manuel Abadia <manu@teleline.es> | |
| 6 | ||
| 7 | 2008-08 | |
| 8 | Dip locations and suggested settings verified with US manual. | |
| 9 | ||
| 10 | ***************************************************************************/ | |
| 11 | ||
| 12 | #include "emu.h" | |
| 13 | #include "cpu/m6809/m6809.h" | |
| 14 | #include "sound/2203intf.h" | |
| 15 | #include "sound/vlm5030.h" | |
| 16 | #include "sound/flt_rc.h" | |
| 17 | #include "includes/konamipt.h" | |
| 18 | #include "includes/ddribble.h" | |
| 19 | ||
| 20 | ||
| 21 | static INTERRUPT_GEN( ddribble_interrupt_0 ) | |
| 22 | { | |
| 23 | ddribble_state *state = (ddribble_state *)device->machine->driver_data; | |
| 24 | if (state->int_enable_0) | |
| 25 | cpu_set_input_line(device, M6809_FIRQ_LINE, HOLD_LINE); | |
| 26 | } | |
| 27 | ||
| 28 | static INTERRUPT_GEN( ddribble_interrupt_1 ) | |
| 29 | { | |
| 30 | ddribble_state *state = (ddribble_state *)device->machine->driver_data; | |
| 31 | if (state->int_enable_1) | |
| 32 | cpu_set_input_line(device, M6809_FIRQ_LINE, HOLD_LINE); | |
| 33 | } | |
| 34 | ||
| 35 | ||
| 36 | static WRITE8_HANDLER( ddribble_bankswitch_w ) | |
| 37 | { | |
| 38 | memory_set_bank(space->machine, "bank1", data & 0x0f); | |
| 39 | } | |
| 40 | ||
| 41 | ||
| 42 | static READ8_HANDLER( ddribble_sharedram_r ) | |
| 43 | { | |
| 44 | ddribble_state *state = (ddribble_state *)space->machine->driver_data; | |
| 45 | return state->sharedram[offset]; | |
| 46 | } | |
| 47 | ||
| 48 | static WRITE8_HANDLER( ddribble_sharedram_w ) | |
| 49 | { | |
| 50 | ddribble_state *state = (ddribble_state *)space->machine->driver_data; | |
| 51 | state->sharedram[offset] = data; | |
| 52 | } | |
| 53 | ||
| 54 | static READ8_HANDLER( ddribble_snd_sharedram_r ) | |
| 55 | { | |
| 56 | ddribble_state *state = (ddribble_state *)space->machine->driver_data; | |
| 57 | return state->snd_sharedram[offset]; | |
| 58 | } | |
| 59 | ||
| 60 | static WRITE8_HANDLER( ddribble_snd_sharedram_w ) | |
| 61 | { | |
| 62 | ddribble_state *state = (ddribble_state *)space->machine->driver_data; | |
| 63 | state->snd_sharedram[offset] = data; | |
| 64 | } | |
| 65 | ||
| 66 | static WRITE8_HANDLER( ddribble_coin_counter_w ) | |
| 67 | { | |
| 68 | /* b4-b7: unused */ | |
| 69 | /* b2-b3: unknown */ | |
| 70 | /* b1: coin counter 2 */ | |
| 71 | /* b0: coin counter 1 */ | |
| 72 | coin_counter_w(space->machine, 0,(data) & 0x01); | |
| 73 | coin_counter_w(space->machine, 1,(data >> 1) & 0x01); | |
| 74 | } | |
| 75 | ||
| 76 | static READ8_DEVICE_HANDLER( ddribble_vlm5030_busy_r ) | |
| 77 | { | |
| 78 | return mame_rand(device->machine); /* patch */ | |
| 79 | /* FIXME: remove ? */ | |
| 80 | #if 0 | |
| 81 | if (vlm5030_bsy(device)) return 1; | |
| 82 | else return 0; | |
| 83 | #endif | |
| 84 | } | |
| 85 | ||
| 86 | static WRITE8_DEVICE_HANDLER( ddribble_vlm5030_ctrl_w ) | |
| 87 | { | |
| 88 | ddribble_state *state = (ddribble_state *)device->machine->driver_data; | |
| 89 | UINT8 *SPEECH_ROM = memory_region(device->machine, "vlm"); | |
| 90 | ||
| 91 | /* b7 : vlm data bus OE */ | |
| 92 | ||
| 93 | /* b6 : VLM5030-RST */ | |
| 94 | vlm5030_rst(device, data & 0x40 ? 1 : 0); | |
| 95 | ||
| 96 | /* b5 : VLM5030-ST */ | |
| 97 | vlm5030_st(device, data & 0x20 ? 1 : 0); | |
| 98 | ||
| 99 | /* b4 : VLM5300-VCU */ | |
| 100 | vlm5030_vcu(device, data & 0x10 ? 1 : 0); | |
| 101 | ||
| 102 | /* b3 : ROM bank select */ | |
| 103 | vlm5030_set_rom(device, &SPEECH_ROM[data & 0x08 ? 0x10000 : 0]); | |
| 104 | ||
| 105 | /* b2 : SSG-C rc filter enable */ | |
| 106 | filter_rc_set_RC(state->filter3, FLT_RC_LOWPASS, 1000, 2200, 1000, data & 0x04 ? CAP_N(150) : 0); /* YM2203-SSG-C */ | |
| 107 | ||
| 108 | /* b1 : SSG-B rc filter enable */ | |
| 109 | filter_rc_set_RC(state->filter2, FLT_RC_LOWPASS, 1000, 2200, 1000, data & 0x02 ? CAP_N(150) : 0); /* YM2203-SSG-B */ | |
| 110 | ||
| 111 | /* b0 : SSG-A rc filter enable */ | |
| 112 | filter_rc_set_RC(state->filter1, FLT_RC_LOWPASS, 1000, 2200, 1000, data & 0x01 ? CAP_N(150) : 0); /* YM2203-SSG-A */ | |
| 113 | } | |
| 114 | ||
| 115 | ||
| 116 | static ADDRESS_MAP_START( cpu0_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 117 | AM_RANGE(0x0000, 0x0004) AM_WRITE(K005885_0_w) /* video registers (005885 #1) */ | |
| 118 | AM_RANGE(0x0800, 0x0804) AM_WRITE(K005885_1_w) /* video registers (005885 #2) */ | |
| 119 | AM_RANGE(0x1800, 0x187f) AM_RAM AM_BASE_MEMBER(ddribble_state, paletteram) /* palette */ | |
| 120 | AM_RANGE(0x2000, 0x2fff) AM_RAM_WRITE(ddribble_fg_videoram_w) AM_BASE_MEMBER(ddribble_state, fg_videoram) /* Video RAM 1 */ | |
| 121 | AM_RANGE(0x3000, 0x3fff) AM_RAM AM_BASE_MEMBER(ddribble_state, spriteram_1) /* Object RAM 1 */ | |
| 122 | AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE_MEMBER(ddribble_state, sharedram) /* shared RAM with CPU #1 */ | |
| 123 | AM_RANGE(0x6000, 0x6fff) AM_RAM_WRITE(ddribble_bg_videoram_w) AM_BASE_MEMBER(ddribble_state, bg_videoram) /* Video RAM 2 */ | |
| 124 | AM_RANGE(0x7000, 0x7fff) AM_RAM AM_BASE_MEMBER(ddribble_state, spriteram_2) /* Object RAM 2 */ | |
| 125 | AM_RANGE(0x8000, 0x8000) AM_WRITE(ddribble_bankswitch_w) /* bankswitch control */ | |
| 126 | AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("bank1") /* banked ROM */ | |
| 127 | AM_RANGE(0xa000, 0xffff) AM_ROM /* ROM */ | |
| 128 | ADDRESS_MAP_END | |
| 129 | ||
| 130 | static ADDRESS_MAP_START( cpu1_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 131 | AM_RANGE(0x0000, 0x1fff) AM_READWRITE(ddribble_sharedram_r, ddribble_sharedram_w) /* shared RAM with CPU #0 */ | |
| 132 | AM_RANGE(0x2000, 0x27ff) AM_READWRITE(ddribble_snd_sharedram_r, ddribble_snd_sharedram_w) /* shared RAM with CPU #2 */ | |
| 133 | AM_RANGE(0x2800, 0x2800) AM_READ_PORT("DSW1") | |
| 134 | AM_RANGE(0x2801, 0x2801) AM_READ_PORT("P1") | |
| 135 | AM_RANGE(0x2802, 0x2802) AM_READ_PORT("P2") | |
| 136 | AM_RANGE(0x2803, 0x2803) AM_READ_PORT("SYSTEM") /* coinsw & start */ | |
| 137 | AM_RANGE(0x2c00, 0x2c00) AM_READ_PORT("DSW2") | |
| 138 | AM_RANGE(0x3000, 0x3000) AM_READ_PORT("DSW3") | |
| 139 | AM_RANGE(0x3400, 0x3400) AM_WRITE(ddribble_coin_counter_w) /* coin counters */ | |
| 140 | AM_RANGE(0x3c00, 0x3c00) AM_WRITE(watchdog_reset_w) /* watchdog reset */ | |
| 141 | AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM */ | |
| 142 | ADDRESS_MAP_END | |
| 143 | ||
| 144 | static ADDRESS_MAP_START( cpu2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 145 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_MEMBER(ddribble_state, snd_sharedram) /* shared RAM with CPU #1 */ | |
| 146 | AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE("ymsnd", ym2203_r, ym2203_w) /* YM2203 */ | |
| 147 | AM_RANGE(0x3000, 0x3000) AM_DEVWRITE("vlm", vlm5030_data_w) /* Speech data */ | |
| 148 | AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM */ | |
| 149 | ADDRESS_MAP_END | |
| 150 | ||
| 151 | static INPUT_PORTS_START( ddribble ) | |
| 152 | PORT_START("P1") | |
| 153 | KONAMI8_B132(1) | |
| 154 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 155 | ||
| 156 | PORT_START("P2") | |
| 157 | KONAMI8_B132(2) | |
| 158 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 159 | ||
| 160 | PORT_START("SYSTEM") | |
| 161 | KONAMI8_SYSTEM_UNK | |
| 162 | ||
| 163 | PORT_START("DSW1") | |
| 164 | KONAMI_COINAGE_ALT_LOC(SW1) | |
| 165 | ||
| 166 | PORT_START("DSW2") | |
| 167 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW2:1" ) /* Manual says it's Unused */ | |
| 168 | PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW2:2" ) /* Manual says it's Unused */ | |
| 169 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) | |
| 170 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 171 | PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) ) | |
| 172 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW2:4" ) /* Manual says it's Unused */ | |
| 173 | PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW2:5" ) /* Manual says it's Unused */ | |
| 174 | PORT_DIPNAME( 0x60, 0x20, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:6,7") | |
| 175 | PORT_DIPSETTING( 0x60, DEF_STR( Easy ) ) | |
| 176 | PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) | |
| 177 | PORT_DIPSETTING( 0x20, DEF_STR( Hard ) ) | |
| 178 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 179 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8") | |
| 180 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 181 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 182 | ||
| 183 | PORT_START("DSW3") | |
| 184 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW3:1") | |
| 185 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 186 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 187 | PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW3:2" ) /* Manual says it's Unused */ | |
| 188 | PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW3:3" ) | |
| 189 | PORT_DIPNAME( 0x08, 0x08, "Allow vs match with 1 Credit" ) PORT_DIPLOCATION("SW3:4") | |
| 190 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 191 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 192 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 193 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 194 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 195 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 196 | INPUT_PORTS_END | |
| 197 | ||
| 198 | ||
| 199 | ||
| 200 | static const gfx_layout charlayout = | |
| 201 | { | |
| 202 | 8,8, | |
| 203 | RGN_FRAC(1,2), | |
| 204 | 4, | |
| 205 | { 0, 1, 2, 3 }, | |
| 206 | { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 }, | |
| 207 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 }, | |
| 208 | 32*8 | |
| 209 | }; | |
| 210 | ||
| 211 | static const gfx_layout spritelayout = | |
| 212 | { | |
| 213 | 16,16, | |
| 214 | RGN_FRAC(1,2), | |
| 215 | 4, | |
| 216 | { 0, 1, 2, 3 }, | |
| 217 | { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4, | |
| 218 | 32*8+0*4, 32*8+1*4, 32*8+2*4, 32*8+3*4, 32*8+4*4, 32*8+5*4, 32*8+6*4, 32*8+7*4 }, | |
| 219 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, | |
| 220 | 16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 }, | |
| 221 | 32*32 | |
| 222 | }; | |
| 223 | ||
| 224 | static GFXDECODE_START( ddribble ) | |
| 225 | GFXDECODE_ENTRY( "gfx1", 0x00000, charlayout, 48, 1 ) /* colors 48-63 */ | |
| 226 | GFXDECODE_ENTRY( "gfx2", 0x00000, charlayout, 16, 1 ) /* colors 16-31 */ | |
| 227 | GFXDECODE_ENTRY( "gfx1", 0x20000, spritelayout, 32, 1 ) /* colors 32-47 */ | |
| 228 | GFXDECODE_ENTRY( "gfx2", 0x40000, spritelayout, 64, 16 ) /* colors 0-15 but using lookup table */ | |
| 229 | GFXDECODE_END | |
| 230 | ||
| 231 | static const ym2203_interface ym2203_config = | |
| 232 | { | |
| 233 | { | |
| 234 | AY8910_LEGACY_OUTPUT, | |
| 235 | AY8910_DEFAULT_LOADS, | |
| 236 | DEVCB_NULL, | |
| 237 | DEVCB_DEVICE_HANDLER("vlm", ddribble_vlm5030_busy_r), | |
| 238 | DEVCB_DEVICE_HANDLER("vlm", ddribble_vlm5030_ctrl_w), | |
| 239 | DEVCB_NULL | |
| 240 | }, | |
| 241 | NULL | |
| 242 | }; | |
| 243 | ||
| 244 | static const vlm5030_interface vlm5030_config = | |
| 245 | { | |
| 246 | 0x10000 /* memory size 64Kbyte * 2 bank */ | |
| 247 | }; | |
| 248 | ||
| 249 | ||
| 250 | ||
| 251 | static MACHINE_START( ddribble ) | |
| 252 | { | |
| 253 | ddribble_state *state = (ddribble_state *)machine->driver_data; | |
| 254 | UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 255 | memory_configure_bank(machine, "bank1", 0, 5, &ROM[0x10000], 0x2000); | |
| 256 | ||
| 257 | state->filter1 = devtag_get_device(machine, "filter1"); | |
| 258 | state->filter2 = devtag_get_device(machine, "filter2"); | |
| 259 | state->filter3 = devtag_get_device(machine, "filter3"); | |
| 260 | ||
| 261 | state_save_register_global(machine, state->int_enable_0); | |
| 262 | state_save_register_global(machine, state->int_enable_1); | |
| 263 | state_save_register_global_array(machine, state->vregs[0]); | |
| 264 | state_save_register_global_array(machine, state->vregs[1]); | |
| 265 | state_save_register_global_array(machine, state->charbank); | |
| 266 | } | |
| 267 | ||
| 268 | static MACHINE_RESET( ddribble ) | |
| 269 | { | |
| 270 | ddribble_state *state = (ddribble_state *)machine->driver_data; | |
| 271 | int i; | |
| 272 | ||
| 273 | for (i = 0; i < 5; i++) | |
| 274 | { | |
| 275 | state->vregs[0][i] = 0; | |
| 276 | state->vregs[1][i] = 0; | |
| 277 | } | |
| 278 | ||
| 279 | state->int_enable_0 = 0; | |
| 280 | state->int_enable_1 = 0; | |
| 281 | state->charbank[0] = 0; | |
| 282 | state->charbank[1] = 0; | |
| 283 | } | |
| 284 | ||
| 285 | static MACHINE_DRIVER_START( ddribble ) | |
| 286 | ||
| 287 | /* driver data */ | |
| 288 | MDRV_DRIVER_DATA(ddribble_state) | |
| 289 | ||
| 290 | /* basic machine hardware */ | |
| 291 | MDRV_CPU_ADD("maincpu", M6809, XTAL_18_432MHz/12) /* verified on pcb */ | |
| 292 | MDRV_CPU_PROGRAM_MAP(cpu0_map) | |
| 293 | MDRV_CPU_VBLANK_INT("screen", ddribble_interrupt_0) | |
| 294 | ||
| 295 | MDRV_CPU_ADD("cpu1", M6809, XTAL_18_432MHz/12) /* verified on pcb */ | |
| 296 | MDRV_CPU_PROGRAM_MAP(cpu1_map) | |
| 297 | MDRV_CPU_VBLANK_INT("screen", ddribble_interrupt_1) | |
| 298 | ||
| 299 | MDRV_CPU_ADD("cpu2", M6809, XTAL_18_432MHz/12) /* verified on pcb */ | |
| 300 | MDRV_CPU_PROGRAM_MAP(cpu2_map) | |
| 301 | ||
| 302 | MDRV_QUANTUM_TIME(HZ(6000)) /* we need heavy synch */ | |
| 303 | ||
| 304 | MDRV_MACHINE_START(ddribble) | |
| 305 | MDRV_MACHINE_RESET(ddribble) | |
| 306 | ||
| 307 | /* video hardware */ | |
| 308 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 309 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 310 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 311 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 312 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 313 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) | |
| 314 | /* MDRV_SCREEN_SIZE(64*8, 32*8) | |
| 315 | MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1) */ | |
| 316 | ||
| 317 | MDRV_GFXDECODE(ddribble) | |
| 318 | MDRV_PALETTE_LENGTH(64 + 256) | |
| 319 | ||
| 320 | MDRV_PALETTE_INIT(ddribble) | |
| 321 | MDRV_VIDEO_START(ddribble) | |
| 322 | MDRV_VIDEO_UPDATE(ddribble) | |
| 323 | ||
| 324 | /* sound hardware */ | |
| 325 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 326 | ||
| 327 | MDRV_SOUND_ADD("ymsnd", YM2203, XTAL_3_579545MHz) /* verified on pcb */ | |
| 328 | MDRV_SOUND_CONFIG(ym2203_config) | |
| 329 | MDRV_SOUND_ROUTE(0, "filter1", 0.25) | |
| 330 | MDRV_SOUND_ROUTE(1, "filter2", 0.25) | |
| 331 | MDRV_SOUND_ROUTE(2, "filter3", 0.25) | |
| 332 | MDRV_SOUND_ROUTE(3, "mono", 0.25) | |
| 333 | ||
| 334 | MDRV_SOUND_ADD("vlm", VLM5030, XTAL_3_579545MHz) /* verified on pcb */ | |
| 335 | MDRV_SOUND_CONFIG(vlm5030_config) | |
| 336 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 337 | ||
| 338 | MDRV_SOUND_ADD("filter1", FILTER_RC, 0) | |
| 339 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 340 | MDRV_SOUND_ADD("filter2", FILTER_RC, 0) | |
| 341 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 342 | MDRV_SOUND_ADD("filter3", FILTER_RC, 0) | |
| 343 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 344 | MACHINE_DRIVER_END | |
| 345 | ||
| 346 | ||
| 347 | ROM_START( ddribble ) | |
| 348 | ROM_REGION( 0x1a000, "maincpu", 0 ) /* 64K CPU #0 + 40K for Banked ROMS */ | |
| 349 | ROM_LOAD( "690c03.bin", 0x10000, 0x0a000, CRC(07975a58) SHA1(96fd1b2348bbdf560067d8ee3cd4c0514e263d7a) ) | |
| 350 | ROM_CONTINUE( 0x0a000, 0x06000 ) | |
| 351 | ||
| 352 | ROM_REGION( 0x10000, "cpu1", 0 ) /* 64 for the CPU #1 */ | |
| 353 | ROM_LOAD( "690c02.bin", 0x08000, 0x08000, CRC(f07c030a) SHA1(db96a10f8bb657bf285266db9e775fa6af82f38c) ) | |
| 354 | ||
| 355 | ROM_REGION( 0x10000, "cpu2", 0 ) /* 64k for the SOUND CPU */ | |
| 356 | ROM_LOAD( "690b01.bin", 0x08000, 0x08000, CRC(806b8453) SHA1(3184772c5e5181438a17ac72129070bf164b2965) ) | |
| 357 | ||
| 358 | ROM_REGION( 0x40000, "gfx1", 0 ) | |
| 359 | ROM_LOAD16_BYTE( "690a05.bin", 0x00000, 0x20000, CRC(6a816d0d) SHA1(73f2527d5f2b9d51b784be36e07e0d0c566a28d9) ) /* characters & objects */ | |
| 360 | ROM_LOAD16_BYTE( "690a06.bin", 0x00001, 0x20000, CRC(46300cd0) SHA1(07197a546fff452a41575fcd481da64ac6bf601e) ) | |
| 361 | ||
| 362 | ROM_REGION( 0x80000, "gfx2", 0 ) | |
| 363 | ROM_LOAD16_BYTE( "690a10.bin", 0x00000, 0x20000, CRC(61efa222) SHA1(bd7b993ad1c06d8f6ac29fbc07c4a987abe1ab42) ) /* characters */ | |
| 364 | ROM_LOAD16_BYTE( "690a09.bin", 0x00001, 0x20000, CRC(ab682186) SHA1(a28982835042a07354557e1539b097cdf93fc466) ) | |
| 365 | ROM_LOAD16_BYTE( "690a08.bin", 0x40000, 0x20000, CRC(9a889944) SHA1(ca96815aefb1e336bd2288841b00a5c21cacf90f) ) /* objects */ | |
| 366 | ROM_LOAD16_BYTE( "690a07.bin", 0x40001, 0x20000, CRC(faf81b3f) SHA1(0bd647b4cdd3f2209472e303fd22eedd5533d1b1) ) | |
| 367 | ||
| 368 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 369 | ROM_LOAD( "690a11.i15", 0x0000, 0x0100, CRC(f34617ad) SHA1(79ceba6fe204472a5a659641ac4f14bb1f0ee3f6) ) /* sprite lookup table */ | |
| 370 | ||
| 371 | ROM_REGION( 0x20000, "vlm", 0 ) /* 128k for the VLM5030 data */ | |
| 372 | ROM_LOAD( "690a04.bin", 0x00000, 0x20000, CRC(1bfeb763) SHA1(f3e9acb2a7a9b4c8dee6838c1344a7a65c27ff77) ) | |
| 373 | ||
| 374 | ROM_REGION( 0x0100, "plds", 0 ) | |
| 375 | ROM_LOAD( "pal10l8-007553.bin", 0x0000, 0x002c, CRC(0ae5a161) SHA1(87571addf434b332019ea0e22372eb24b4fd0197) ) | |
| 376 | ROM_END | |
| 377 | ||
| 378 | ||
| 379 | GAME( 1986, ddribble, 0, ddribble, ddribble, 0, ROT0, "Konami", "Double Dribble", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Best League (c) 1993 |
| 4 | 4 | |
| 5 | A Big Striker Italian bootleg (made by Playmark?) running on a different hardware, and with | |
| 6 | Italian Serie A teams instead of the national teams. | |
| 5 | A Big Striker Italian bootleg (made by Playmark?) running on a different hardware. | |
| 7 | 6 | |
| 8 | 7 | driver by David Haywood & Angelo Salese |
| 9 | 8 | |
| r7356 | r7357 | |
| 158 | 157 | return 0; |
| 159 | 158 | } |
| 160 | 159 | |
| 160 | static VIDEO_UPDATE(bestleaw) | |
| 161 | { | |
| 162 | tilemap_set_scrollx(bg_tilemap,0,bestleag_vregs[0x08/2]); | |
| 163 | tilemap_set_scrolly(bg_tilemap,0,bestleag_vregs[0x0a/2]); | |
| 164 | tilemap_set_scrollx(tx_tilemap,0,bestleag_vregs[0x00/2]); | |
| 165 | tilemap_set_scrolly(tx_tilemap,0,bestleag_vregs[0x02/2]); | |
| 166 | tilemap_set_scrollx(fg_tilemap,0,bestleag_vregs[0x04/2]); | |
| 167 | tilemap_set_scrolly(fg_tilemap,0,bestleag_vregs[0x06/2]); | |
| 168 | ||
| 169 | tilemap_draw(bitmap,cliprect,bg_tilemap,0,0); | |
| 170 | tilemap_draw(bitmap,cliprect,fg_tilemap,0,0); | |
| 171 | draw_sprites(screen->machine,bitmap,cliprect); | |
| 172 | tilemap_draw(bitmap,cliprect,tx_tilemap,0,0); | |
| 173 | return 0; | |
| 174 | } | |
| 175 | ||
| 161 | 176 | static WRITE16_HANDLER( bestleag_txram_w ) |
| 162 | 177 | { |
| 163 | 178 | bestleag_txram[offset] = data; |
| r7356 | r7357 | |
| 317 | 332 | MDRV_CPU_PROGRAM_MAP(bestleag_map) |
| 318 | 333 | MDRV_CPU_VBLANK_INT("screen", irq6_line_hold) |
| 319 | 334 | |
| 320 | ||
| 321 | 335 | MDRV_SCREEN_ADD("screen", RASTER) |
| 322 | 336 | MDRV_SCREEN_REFRESH_RATE(60) |
| 323 | 337 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| r7356 | r7357 | |
| 339 | 353 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00) |
| 340 | 354 | MACHINE_DRIVER_END |
| 341 | 355 | |
| 356 | static MACHINE_DRIVER_START( bestleaw ) | |
| 357 | MDRV_IMPORT_FROM(bestleag) | |
| 358 | ||
| 359 | MDRV_VIDEO_UPDATE(bestleaw) | |
| 360 | MACHINE_DRIVER_END | |
| 361 | ||
| 362 | ||
| 342 | 363 | /* Rom Loading */ |
| 343 | 364 | |
| 344 | 365 | ROM_START( bestleag ) |
| r7356 | r7357 | |
| 358 | 379 | ROM_LOAD( "29_27c010.u84", 0x040000, 0x20000, CRC(7ea4e22d) SHA1(3c7f05dfd1c5889bfcbc14d08026e2a484870216) ) |
| 359 | 380 | ROM_LOAD( "30_27c010.u83", 0x060000, 0x20000, CRC(283d9ba6) SHA1(6054853f76907a4a0f89ad5aa02dde9d3d4ff196) ) |
| 360 | 381 | |
| 361 | ROM_REGION( 0x80000, " | |
| 382 | ROM_REGION( 0x80000, "oki_rom", 0 ) /* Samples */ | |
| 362 | 383 | ROM_LOAD( "20_27c040.u16", 0x00000, 0x80000, CRC(e152138e) SHA1(9d41b61b98414e1d5804b5a9edf4acb4c5f31615) ) |
| 363 | 384 | |
| 364 | 385 | ROM_REGION( 0xc0000, "oki", 0 ) |
| 365 | ROM_COPY( "user1", 0x000000, 0x000000, 0x020000) | |
| 366 | ROM_COPY( "user1", 0x020000, 0x020000, 0x020000) | |
| 367 | ROM_COPY( "user1", 0x000000, 0x040000, 0x020000) | |
| 368 | ROM_COPY( "user1", 0x040000, 0x060000, 0x020000) | |
| 369 | ROM_COPY( "user1", 0x000000, 0x080000, 0x020000) | |
| 370 | ROM_COPY( "user1", 0x060000, 0x0a0000, 0x020000) | |
| 386 | ROM_COPY( "oki_rom", 0x000000, 0x000000, 0x020000) | |
| 387 | ROM_COPY( "oki_rom", 0x020000, 0x020000, 0x020000) | |
| 388 | ROM_COPY( "oki_rom", 0x000000, 0x040000, 0x020000) | |
| 389 | ROM_COPY( "oki_rom", 0x040000, 0x060000, 0x020000) | |
| 390 | ROM_COPY( "oki_rom", 0x000000, 0x080000, 0x020000) | |
| 391 | ROM_COPY( "oki_rom", 0x060000, 0x0a0000, 0x020000) | |
| 371 | 392 | ROM_END |
| 372 | 393 | |
| 373 | 394 | ROM_START( bestleaw ) |
| r7356 | r7357 | |
| 387 | 408 | ROM_LOAD( "29_27c010.u84", 0x040000, 0x20000, CRC(7ea4e22d) SHA1(3c7f05dfd1c5889bfcbc14d08026e2a484870216) ) |
| 388 | 409 | ROM_LOAD( "30_27c010.u83", 0x060000, 0x20000, CRC(283d9ba6) SHA1(6054853f76907a4a0f89ad5aa02dde9d3d4ff196) ) |
| 389 | 410 | |
| 390 | ROM_REGION( 0x80000, " | |
| 411 | ROM_REGION( 0x80000, "oki_rom", 0 ) /* Samples */ | |
| 391 | 412 | ROM_LOAD( "20_27c040.u16", 0x00000, 0x80000, CRC(e152138e) SHA1(9d41b61b98414e1d5804b5a9edf4acb4c5f31615) ) |
| 392 | 413 | |
| 393 | 414 | ROM_REGION( 0xc0000, "oki", 0 ) |
| 394 | ROM_COPY( "user1", 0x000000, 0x000000, 0x020000) | |
| 395 | ROM_COPY( "user1", 0x020000, 0x020000, 0x020000) | |
| 396 | ROM_COPY( "user1", 0x000000, 0x040000, 0x020000) | |
| 397 | ROM_COPY( "user1", 0x040000, 0x060000, 0x020000) | |
| 398 | ROM_COPY( "user1", 0x000000, 0x080000, 0x020000) | |
| 399 | ROM_COPY( "user1", 0x060000, 0x0a0000, 0x020000) | |
| 415 | ROM_COPY( "oki_rom", 0x000000, 0x000000, 0x020000) | |
| 416 | ROM_COPY( "oki_rom", 0x020000, 0x020000, 0x020000) | |
| 417 | ROM_COPY( "oki_rom", 0x000000, 0x040000, 0x020000) | |
| 418 | ROM_COPY( "oki_rom", 0x040000, 0x060000, 0x020000) | |
| 419 | ROM_COPY( "oki_rom", 0x000000, 0x080000, 0x020000) | |
| 420 | ROM_COPY( "oki_rom", 0x060000, 0x0a0000, 0x020000) | |
| 400 | 421 | |
| 401 | 422 | ROM_REGION( 0x2000, "plds", 0 ) |
| 402 | 423 | ROM_LOAD( "85c060.bin", 0x0000, 0x032f, CRC(537100ac) SHA1(3d5e9013e3cba660671f02e78c233c866dad2e53) ) |
| 403 | 424 | ROM_LOAD( "gal16v8-25hb1.u182", 0x0200, 0x0117, NO_DUMP ) /* Protected */ |
| 404 | 425 | ROM_LOAD( "gal16v8-25hb1.u183", 0x0400, 0x0117, NO_DUMP ) /* Protected */ |
| 405 | 426 | ROM_LOAD( "gal16v8-25hb1.u58", 0x0800, 0x0117, NO_DUMP ) /* Protected */ |
| 406 | ||
| 427 | | |
| 407 | 428 | ROM_END |
| 408 | 429 | |
| 409 | 430 | /* GAME drivers */ |
| 410 | 431 | |
| 411 | GAME( 1993, bestleag, bigstrik, bestleag, bestleag, 0, ROT0, "bootleg", "Best League", 0 ) | |
| 412 | GAME( 1993, bestleaw, bigstrik, bestleag, bestleag, 0, ROT0, "bootleg", "Best League (World)", GAME_IMPERFECT_GRAPHICS ) | |
| 432 | GAME( 1993, bestleag, bigstrik, bestleag, bestleag, 0, ROT0, "bootleg", "Best League (bootleg of Big Striker, Italian Serie A)", 0 ) | |
| 433 | GAME( 1993, bestleaw, bigstrik, bestleaw, bestleag, 0, ROT0, "bootleg", "Best League (bootleg of Big Striker, World Cup)", 0 ) | |
| 413 | 434 |
| r7356 | r7357 | |
|---|---|---|
| 996 | 996 | GAME( 1983, jumpcoast,jumpcoas, jumpcoas, jumpcoas, jumpcoas, ROT90, "Taito", "Jump Coaster (Taito)", 0 ) |
| 997 | 997 | GAME( 1983, boggy84, 0, jumpcoas, boggy84, boggy84, ROT90, "bootleg", "Boggy '84", 0 ) |
| 998 | 998 | GAME( 1986, redrobin, 0, fastfred, redrobin, flyboyb, ROT90, "Elettronolo", "Red Robin", 0 ) |
| 999 | GAME( 1984, imago, 0, imago, imago, imago, ROT90, "Acom", "Imago (cocktail set)", 0 ) | |
| 1000 | GAME( 1983, imagoa, imago, imago, imagoa, imago, ROT90, "Acom", "Imago (no cocktail set)", 0 ) | |
| 999 | GAME( 1984, imago, 0, imago, imago, imago, ROT90, "Acom", "Imago (cocktail set)", 0 ) | |
| 1000 | GAME( 1983, imagoa, imago, imago, imagoa, imago, ROT90, "Acom", "Imago (no cocktail set)", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 335 | 335 | AM_RANGE(0xf802, 0xf803) AM_WRITE(lwings_bg1_scrolly_w) |
| 336 | 336 | AM_RANGE(0xf804, 0xf804) AM_WRITE(trojan_bg2_scrollx_w) |
| 337 | 337 | AM_RANGE(0xf805, 0xf805) AM_WRITE(trojan_bg2_image_w) |
| 338 | AM_RANGE(0xf808, 0xf808) AM_READ_PORT("SERVICE") | |
| 338 | AM_RANGE(0xf808, 0xf808) AM_READ_PORT("SERVICE") AM_WRITENOP //watchdog | |
| 339 | 339 | AM_RANGE(0xf809, 0xf809) AM_READ_PORT("P1") |
| 340 | 340 | AM_RANGE(0xf80a, 0xf80a) AM_READ_PORT("P2") |
| 341 | 341 | AM_RANGE(0xf80b, 0xf80b) AM_READ_PORT("DSWA") |
| 342 | 342 | AM_RANGE(0xf80c, 0xf80c) AM_READ_PORT("DSWB") AM_WRITE(soundlatch_w) |
| 343 | AM_RANGE(0xf80d, 0xf80d) AM_WRITE( | |
| 343 | AM_RANGE(0xf80d, 0xf80d) AM_WRITE(soundlatch2 | |
| 344 | 344 | AM_RANGE(0xf80e, 0xf80e) AM_WRITE(lwings_bankswitch_w) |
| 345 | 345 | ADDRESS_MAP_END |
| 346 | 346 | |
| r7356 | r7357 | |
| 367 | 367 | |
| 368 | 368 | static ADDRESS_MAP_START( trojan_adpcm_io_map, ADDRESS_SPACE_IO, 8 ) |
| 369 | 369 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 370 | AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) | |
| 370 | AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_r) | |
| 371 | 371 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("5205", msm5205_w) |
| 372 | 372 | ADDRESS_MAP_END |
| 373 | 373 |
| r7356 | r7357 | |
|---|---|---|
| 24 | 24 | |
| 25 | 25 | #include "emu.h" |
| 26 | 26 | #include "cpu/z80/z80.h" |
| 27 | #include "includes/s | |
| 27 | #include "includes/s | |
| 28 | 28 | #include "cpu/m68000/m68000.h" |
| 29 | 29 | #include "machine/segaic16.h" |
| 30 | 30 | #include "sound/2151intf.h" |
| 31 | 31 | #include "sound/segapcm.h" |
| 32 | #include "video/segaic16.h" | |
| 32 | 33 | |
| 33 | 34 | #include "pdrift.lh" |
| 34 | 35 | |
| r7356 | r7357 | |
| 47 | 48 | * |
| 48 | 49 | *************************************/ |
| 49 | 50 | |
| 50 | static UINT8 misc_io_data[0x10]; | |
| 51 | static UINT8 analog_data[4]; | |
| 52 | ||
| 53 | static UINT8 vblank_irq_state; | |
| 54 | static UINT8 timer_irq_state; | |
| 55 | ||
| 56 | 51 | static UINT16 *backupram; |
| 57 | 52 | |
| 58 | static running_device *interrupt_timer; | |
| 59 | ||
| 60 | ||
| 61 | ||
| 62 | 53 | /************************************* |
| 63 | 54 | * |
| 64 | 55 | * Configuration |
| 65 | 56 | * |
| 66 | 57 | *************************************/ |
| 67 | 58 | |
| 68 | static void yboard_generic_init( | |
| 59 | static void yboard_generic_init( running_machine *machine ) | |
| 69 | 60 | { |
| 61 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 62 | ||
| 70 | 63 | /* reset globals */ |
| 71 | vblank_irq_state = 0; | |
| 72 | timer_irq_state = 0; | |
| 64 | state->vblank_irq_state = 0; | |
| 65 | state->timer_irq_state = 0; | |
| 73 | 66 | } |
| 74 | 67 | |
| 75 | 68 | |
| r7356 | r7357 | |
| 82 | 75 | |
| 83 | 76 | static void update_main_irqs(running_machine *machine) |
| 84 | 77 | { |
| 85 | cputag_set_input_line(machine, "maincpu", 2, timer_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 86 | cputag_set_input_line(machine, "subx", 2, timer_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 87 | cputag_set_input_line(machine, "suby", 2, timer_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 88 | cputag_set_input_line(machine, "maincpu", 4, vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 89 | cputag_set_input_line(machine, "subx", 4, vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 90 | cputag_set_input_line(machine, "suby", 4, vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 91 | cputag_set_input_line(machine, "maincpu", 6, timer_irq_state && vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 92 | cputag_set_input_line(machine, "subx", 6, timer_irq_state && vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 93 | cputag_set_input_line(machine, "suby", 6, timer_irq_state && vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 78 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 94 | 79 | |
| 95 | if(timer_irq_state || vblank_irq_state) | |
| 80 | cpu_set_input_line(state->maincpu, 2, state->timer_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 81 | cpu_set_input_line(state->subx, 2, state->timer_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 82 | cpu_set_input_line(state->suby, 2, state->timer_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 83 | cpu_set_input_line(state->maincpu, 4, state->vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 84 | cpu_set_input_line(state->subx, 4, state->vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 85 | cpu_set_input_line(state->suby, 4, state->vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 86 | cpu_set_input_line(state->maincpu, 6, state->timer_irq_state && state->vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 87 | cpu_set_input_line(state->subx, 6, state->timer_irq_state && state->vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 88 | cpu_set_input_line(state->suby, 6, state->timer_irq_state && state->vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 89 | ||
| 90 | if (state->timer_irq_state || state->vblank_irq_state) | |
| 96 | 91 | cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(50)); |
| 97 | 92 | } |
| 98 | 93 | |
| r7356 | r7357 | |
| 131 | 126 | 150-200 = ok |
| 132 | 127 | */ |
| 133 | 128 | |
| 134 | static int irq2_scanline = 170; | |
| 135 | ||
| 136 | 129 | static TIMER_DEVICE_CALLBACK( scanline_callback ) |
| 137 | 130 | { |
| 131 | segas1x_state *state = (segas1x_state *)timer->machine->driver_data; | |
| 138 | 132 | int scanline = param; |
| 139 | 133 | |
| 140 | 134 | /* on scanline 'irq2_scanline' generate an IRQ2 */ |
| 141 | if (scanline == irq2_scanline) | |
| 135 | if (scanline == state->irq2_scanline) | |
| 142 | 136 | { |
| 143 | timer_irq_state = 1; | |
| 144 | scanline = irq2_scanline + 1; | |
| 137 | state->timer_irq_state = 1; | |
| 138 | scanline = state->irq2_scanline + 1; | |
| 145 | 139 | } |
| 146 | 140 | |
| 147 | 141 | /* on scanline 'irq2_scanline' + 1, clear the IRQ2 */ |
| 148 | else if (scanline == irq2_scanline + 1) | |
| 142 | else if (scanline == state->irq2_scanline + 1) | |
| 149 | 143 | { |
| 150 | timer_irq_state = 0; | |
| 144 | state->timer_irq_state = 0; | |
| 151 | 145 | scanline = 223; |
| 152 | 146 | } |
| 153 | 147 | |
| 154 | 148 | /* on scanline 223 generate VBLANK for all CPUs */ |
| 155 | 149 | else if (scanline == 223) |
| 156 | 150 | { |
| 157 | vblank_irq_state = 1; | |
| 151 | state->vblank_irq_state = 1; | |
| 158 | 152 | scanline = 224; |
| 159 | 153 | } |
| 160 | 154 | |
| 161 | 155 | /* on scanline 224 we turn it off */ |
| 162 | 156 | else if (scanline == 224) |
| 163 | 157 | { |
| 164 | vblank_irq_state = 0; | |
| 165 | scanline = irq2_scanline; | |
| 158 | state->vblank_irq_state = 0; | |
| 159 | scanline = state->irq2_scanline; | |
| 166 | 160 | } |
| 167 | 161 | |
| 168 | 162 | /* update IRQs on the main CPU */ |
| 169 | 163 | update_main_irqs(timer->machine); |
| 170 | 164 | |
| 171 | 165 | /* come back at the next appropriate scanline */ |
| 172 | timer_device_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(timer->machine->primary_screen, scanline, 0), scanline); | |
| 166 | timer_device_adjust_oneshot(state->interrupt_timer, video_screen_get_time_until_pos(timer->machine->primary_screen, scanline, 0), scanline); | |
| 173 | 167 | |
| 174 | 168 | #if TWEAK_IRQ2_SCANLINE |
| 175 | 169 | if (scanline == 223) |
| 176 | 170 | { |
| 177 | int old = irq2_scanline; | |
| 171 | int old = state->irq2_scanline; | |
| 178 | 172 | |
| 179 | 173 | /* Q = -10 scanlines, W = -1 scanline, E = +1 scanline, R = +10 scanlines */ |
| 180 | if (input_code_pressed(timer->machine, KEYCODE_Q)) { while (input_code_pressed(timer->machine, KEYCODE_Q)) ; irq2_scanline -= 10; } | |
| 181 | if (input_code_pressed(timer->machine, KEYCODE_W)) { while (input_code_pressed(timer->machine, KEYCODE_W)) ; irq2_scanline -= 1; } | |
| 182 | if (input_code_pressed(timer->machine, KEYCODE_E)) { while (input_code_pressed(timer->machine, KEYCODE_E)) ; irq2_scanline += 1; } | |
| 183 | if (input_code_pressed(timer->machine, KEYCODE_R)) { while (input_code_pressed(timer->machine, KEYCODE_R)) ; irq2_scanline += 10; } | |
| 184 | if (old != irq2_scanline) | |
| 185 | popmessage("scanline = %d", irq2_scanline); | |
| 174 | if (input_code_pressed(timer->machine, KEYCODE_Q)) { while (input_code_pressed(timer->machine, KEYCODE_Q)) ; state->irq2_scanline -= 10; } | |
| 175 | if (input_code_pressed(timer->machine, KEYCODE_W)) { while (input_code_pressed(timer->machine, KEYCODE_W)) ; state->irq2_scanline -= 1; } | |
| 176 | if (input_code_pressed(timer->machine, KEYCODE_E)) { while (input_code_pressed(timer->machine, KEYCODE_E)) ; state->irq2_scanline += 1; } | |
| 177 | if (input_code_pressed(timer->machine, KEYCODE_R)) { while (input_code_pressed(timer->machine, KEYCODE_R)) ; state->irq2_scanline += 10; } | |
| 178 | if (old != state->irq2_scanline) | |
| 179 | popmessage("scanline = %d", state->irq2_scanline); | |
| 186 | 180 | } |
| 187 | 181 | #endif |
| 188 | 182 | } |
| r7356 | r7357 | |
| 190 | 184 | |
| 191 | 185 | static MACHINE_START( yboard ) |
| 192 | 186 | { |
| 193 | state_save_register_global_array(machine, misc_io_data); | |
| 194 | state_save_register_global_array(machine, analog_data); | |
| 195 | state_save_register_global(machine, vblank_irq_state); | |
| 196 | state_save_register_global(machine, timer_irq_state); | |
| 187 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 188 | ||
| 189 | state->maincpu = devtag_get_device(machine, "maincpu"); | |
| 190 | state->soundcpu = devtag_get_device(machine, "soundcpu"); | |
| 191 | state->subx = devtag_get_device(machine, "subx"); | |
| 192 | state->suby = devtag_get_device(machine, "suby"); | |
| 193 | ||
| 194 | state_save_register_global(machine, state->vblank_irq_state); | |
| 195 | state_save_register_global(machine, state->timer_irq_state); | |
| 196 | state_save_register_global(machine, state->irq2_scanline); | |
| 197 | state_save_register_global_array(machine, state->misc_io_data); | |
| 198 | state_save_register_global_array(machine, state->analog_data); | |
| 197 | 199 | } |
| 198 | 200 | |
| 199 | 201 | |
| 200 | 202 | static MACHINE_RESET( yboard ) |
| 201 | 203 | { |
| 202 | interrupt_timer = devtag_get_device(machine, "int_timer"); | |
| 203 | timer_device_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(machine->primary_screen, 223, 0), 223); | |
| 204 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 205 | ||
| 206 | state->irq2_scanline = 170; | |
| 207 | ||
| 208 | state->interrupt_timer = devtag_get_device(machine, "int_timer"); | |
| 209 | timer_device_adjust_oneshot(state->interrupt_timer, video_screen_get_time_until_pos(machine->primary_screen, 223, 0), 223); | |
| 204 | 210 | } |
| 205 | 211 | |
| 206 | 212 | |
| r7356 | r7357 | |
| 213 | 219 | |
| 214 | 220 | static void sound_cpu_irq(running_device *device, int state) |
| 215 | 221 | { |
| 216 | cputag_set_input_line(device->machine, "soundcpu", 0, state); | |
| 222 | segas1x_state *driver = (segas1x_state *)device->machine->driver_data; | |
| 223 | ||
| 224 | cpu_set_input_line(driver->soundcpu, 0, state); | |
| 217 | 225 | } |
| 218 | 226 | |
| 219 | 227 | |
| 220 | 228 | static TIMER_CALLBACK( delayed_sound_data_w ) |
| 221 | 229 | { |
| 222 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 230 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 231 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 223 | 232 | |
| 224 | 233 | soundlatch_w(space, 0, param); |
| 225 | cpu | |
| 234 | cpu | |
| 226 | 235 | } |
| 227 | 236 | |
| 228 | 237 | |
| r7356 | r7357 | |
| 235 | 244 | |
| 236 | 245 | static READ8_HANDLER( sound_data_r ) |
| 237 | 246 | { |
| 238 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_NMI, CLEAR_LINE); | |
| 239 | return soundlatch_r(space,offset); | |
| 247 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 248 | cpu_set_input_line(state->soundcpu, INPUT_LINE_NMI, CLEAR_LINE); | |
| 249 | return soundlatch_r(space, offset); | |
| 240 | 250 | } |
| 241 | 251 | |
| 242 | 252 | |
| r7356 | r7357 | |
| 249 | 259 | |
| 250 | 260 | static READ16_HANDLER( io_chip_r ) |
| 251 | 261 | { |
| 262 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 252 | 263 | static const char *const portnames[] = { "P1", "GENERAL", "PORTC", "PORTD", "PORTE", "DSW", "COINAGE", "PORTH" }; |
| 253 | 264 | offset &= 0x1f/2; |
| 254 | 265 | |
| r7356 | r7357 | |
| 264 | 275 | case 0x0c/2: |
| 265 | 276 | case 0x0e/2: |
| 266 | 277 | /* if the port is configured as an output, return the last thing written */ |
| 267 | if (misc_io_data[0x1e/2] & (1 << offset)) | |
| 268 | return misc_io_data[offset]; | |
| 278 | if (state->misc_io_data[0x1e/2] & (1 << offset)) | |
| 279 | return state->misc_io_data[offset]; | |
| 269 | 280 | |
| 270 | 281 | /* otherwise, return an input port */ |
| 271 | 282 | return input_port_read(space->machine, portnames[offset]); |
| r7356 | r7357 | |
| 283 | 294 | /* CNT register & mirror */ |
| 284 | 295 | case 0x18/2: |
| 285 | 296 | case 0x1c/2: |
| 286 | return misc_io_data[0x1c/2]; | |
| 297 | return state->misc_io_data[0x1c/2]; | |
| 287 | 298 | |
| 288 | 299 | /* port direction register & mirror */ |
| 289 | 300 | case 0x1a/2: |
| 290 | 301 | case 0x1e/2: |
| 291 | return misc_io_data[0x1e/2]; | |
| 302 | return state->misc_io_data[0x1e/2]; | |
| 292 | 303 | } |
| 293 | 304 | return 0xffff; |
| 294 | 305 | } |
| r7356 | r7357 | |
| 296 | 307 | |
| 297 | 308 | static WRITE16_HANDLER( io_chip_w ) |
| 298 | 309 | { |
| 310 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 299 | 311 | UINT8 old; |
| 300 | 312 | |
| 301 | 313 | /* generic implementation */ |
| 302 | 314 | offset &= 0x1f/2; |
| 303 | old = misc_io_data[offset]; | |
| 304 | misc_io_data[offset] = data; | |
| 315 | old = state->misc_io_data[offset]; | |
| 316 | state->misc_io_data[offset] = data; | |
| 305 | 317 | |
| 306 | 318 | switch (offset) |
| 307 | 319 | { |
| r7356 | r7357 | |
| 326 | 338 | D1-D0 = ADC0-1 |
| 327 | 339 | */ |
| 328 | 340 | segaic16_set_display_enable(space->machine, data & 0x80); |
| 329 | if (((old ^ data) & 0x20) && !(data & 0x20)) watchdog_reset_w(space,0,0); | |
| 330 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); | |
| 331 | cputag_set_input_line(space->machine, "subx", INPUT_LINE_RESET, (data & 0x08) ? ASSERT_LINE : CLEAR_LINE); | |
| 332 | cputag_set_input_line(space->machine, "suby", INPUT_LINE_RESET, (data & 0x04) ? ASSERT_LINE : CLEAR_LINE); | |
| 341 | if (((old ^ data) & 0x20) && !(data & 0x20)) watchdog_reset_w(space, 0, 0); | |
| 342 | cpu_set_input_line(state->soundcpu, INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); | |
| 343 | cpu_set_input_line(state->subx, INPUT_LINE_RESET, (data & 0x08) ? ASSERT_LINE : CLEAR_LINE); | |
| 344 | cpu_set_input_line(state->suby, INPUT_LINE_RESET, (data & 0x04) ? ASSERT_LINE : CLEAR_LINE); | |
| 333 | 345 | break; |
| 334 | 346 | |
| 335 | 347 | /* mute */ |
| r7356 | r7357 | |
| 355 | 367 | |
| 356 | 368 | static READ16_HANDLER( analog_r ) |
| 357 | 369 | { |
| 370 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 358 | 371 | int result = 0xff; |
| 359 | 372 | if (ACCESSING_BITS_0_7) |
| 360 | 373 | { |
| 361 | result = analog_data[offset & 3] & 0x80; | |
| 362 | analog_data[offset & 3] <<= 1; | |
| 374 | result = state->analog_data[offset & 3] & 0x80; | |
| 375 | state->analog_data[offset & 3] <<= 1; | |
| 363 | 376 | } |
| 364 | 377 | return result; |
| 365 | 378 | } |
| r7356 | r7357 | |
| 367 | 380 | |
| 368 | 381 | static WRITE16_HANDLER( analog_w ) |
| 369 | 382 | { |
| 383 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 370 | 384 | static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6" }; |
| 371 | int selected = ((offset & 3) == 3) ? (3 + (misc_io_data[0x08/2] & 3)) : (offset & 3); | |
| 385 | int selected = ((offset & 3) == 3) ? (3 + (state->misc_io_data[0x08/2] & 3)) : (offset & 3); | |
| 372 | 386 | int value = input_port_read_safe(space->machine, ports[selected], 0xff); |
| 373 | analog_data[offset & 3] = value; | |
| 387 | state->analog_data[offset & 3] = value; | |
| 374 | 388 | } |
| 375 | 389 | |
| 376 | 390 | |
| r7356 | r7357 | |
| 401 | 415 | ADDRESS_MAP_UNMAP_HIGH |
| 402 | 416 | ADDRESS_MAP_GLOBAL_MASK(0x1fffff) |
| 403 | 417 | AM_RANGE(0x000000, 0x07ffff) AM_ROM |
| 404 | AM_RANGE(0x080000, 0x080007) AM_MIRROR(0x001ff8) AM_READWRITE(segaic16_multiply_ | |
| 418 | AM_RANGE(0x080000, 0x080007) AM_MIRROR(0x001ff8) AM_DEVREADWRITE("5248_main", segaic16_multiply_ | |
| 405 | 419 | AM_RANGE(0x082000, 0x083fff) AM_WRITE(sound_data_w) |
| 406 | AM_RANGE(0x084000, 0x08401f) AM_MIRROR(0x001fe0) AM_READWRITE(segaic16_divide_ | |
| 420 | AM_RANGE(0x084000, 0x08401f) AM_MIRROR(0x001fe0) AM_DEVREADWRITE("5249_main", segaic16_divide_ | |
| 407 | 421 | // AM_RANGE(0x086000, 0x087fff) /DEA0 |
| 408 | 422 | AM_RANGE(0x0c0000, 0x0cffff) AM_RAM AM_SHARE("share1") |
| 409 | 423 | AM_RANGE(0x100000, 0x10001f) AM_READWRITE(io_chip_r, io_chip_w) |
| r7356 | r7357 | |
| 423 | 437 | ADDRESS_MAP_UNMAP_HIGH |
| 424 | 438 | ADDRESS_MAP_GLOBAL_MASK(0x1fffff) |
| 425 | 439 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 426 | AM_RANGE(0x080000, 0x080007) AM_MIRROR(0x001ff8) AM_READWRITE(segaic16_multiply_1_r, segaic16_multiply_1_w) | |
| 427 | AM_RANGE(0x084000, 0x08401f) AM_MIRROR(0x001fe0) AM_READWRITE(segaic16_divide_1_r, segaic16_divide_1_w) | |
| 440 | AM_RANGE(0x080000, 0x080007) AM_MIRROR(0x001ff8) AM_DEVREADWRITE("5248_subx", segaic16_multiply_r, segaic16_multiply_w) | |
| 441 | AM_RANGE(0x084000, 0x08401f) AM_MIRROR(0x001fe0) AM_DEVREADWRITE("5249_subx", segaic16_divide_r, segaic16_divide_w) | |
| 428 | 442 | AM_RANGE(0x0c0000, 0x0cffff) AM_RAM AM_SHARE("share1") |
| 429 | 443 | AM_RANGE(0x180000, 0x18ffff) AM_RAM AM_BASE(&segaic16_spriteram_1) |
| 430 | 444 | AM_RANGE(0x1f8000, 0x1fbfff) AM_RAM |
| r7356 | r7357 | |
| 436 | 450 | ADDRESS_MAP_UNMAP_HIGH |
| 437 | 451 | ADDRESS_MAP_GLOBAL_MASK(0x1fffff) |
| 438 | 452 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 439 | AM_RANGE(0x080000, 0x080007) AM_MIRROR(0x001ff8) AM_READWRITE(segaic16_multiply_2_r, segaic16_multiply_2_w) | |
| 440 | AM_RANGE(0x084000, 0x08401f) AM_MIRROR(0x001fe0) AM_READWRITE(segaic16_divide_2_r, segaic16_divide_2_w) | |
| 453 | AM_RANGE(0x080000, 0x080007) AM_MIRROR(0x001ff8) AM_DEVREADWRITE("5248_suby", segaic16_multiply_r, segaic16_multiply_w) | |
| 454 | AM_RANGE(0x084000, 0x08401f) AM_MIRROR(0x001fe0) AM_DEVREADWRITE("5249_suby", segaic16_divide_r, segaic16_divide_w) | |
| 441 | 455 | AM_RANGE(0x0c0000, 0x0cffff) AM_RAM AM_SHARE("share1") |
| 442 | 456 | AM_RANGE(0x180000, 0x1807ff) AM_MIRROR(0x007800) AM_RAM AM_BASE(&segaic16_rotateram_0) |
| 443 | 457 | AM_RANGE(0x188000, 0x188fff) AM_MIRROR(0x007000) AM_RAM AM_BASE(&segaic16_spriteram_0) |
| r7356 | r7357 | |
| 970 | 984 | |
| 971 | 985 | static MACHINE_DRIVER_START( yboard ) |
| 972 | 986 | |
| 987 | /* driver data */ | |
| 988 | MDRV_DRIVER_DATA(segas1x_state) | |
| 989 | ||
| 973 | 990 | /* basic machine hardware */ |
| 974 | 991 | MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK/4) |
| 975 | 992 | MDRV_CPU_PROGRAM_MAP(main_map) |
| r7356 | r7357 | |
| 989 | 1006 | MDRV_NVRAM_HANDLER(yboard) |
| 990 | 1007 | MDRV_QUANTUM_TIME(HZ(6000)) |
| 991 | 1008 | |
| 992 | ||
| 1009 | | |
| 993 | 1010 | |
| 1011 | MDRV_315_5248_ADD("5248_main") | |
| 1012 | MDRV_315_5248_ADD("5248_subx") | |
| 1013 | MDRV_315_5248_ADD("5248_suby") | |
| 1014 | MDRV_315_5249_ADD("5249_main") | |
| 1015 | MDRV_315_5249_ADD("5249_subx") | |
| 1016 | MDRV_315_5249_ADD("5249_suby") | |
| 1017 | ||
| 994 | 1018 | /* video hardware */ |
| 995 | 1019 | MDRV_SCREEN_ADD("screen", RASTER) |
| 996 | 1020 | MDRV_SCREEN_REFRESH_RATE(60) |
| r7356 | r7357 | |
| 1814 | 1838 | |
| 1815 | 1839 | static DRIVER_INIT( generic_yboard ) |
| 1816 | 1840 | { |
| 1817 | yboard_generic_init(); | |
| 1841 | yboard_generic_init(machine); | |
| 1818 | 1842 | } |
| 1819 | 1843 | |
| 1820 | 1844 |
| r7356 | r7357 | |
|---|---|---|
| 482 | 482 | INPUT_PORTS_END |
| 483 | 483 | |
| 484 | 484 | /* Same as 'cclimber' but correct "Bonus Life" Dip Switch */ |
| 485 | static INPUT_PORTS_START( cclimbrj ) | |
| 485 | static INPUT_PORTS_START( cclimberj ) | |
| 486 | 486 | PORT_INCLUDE( cclimber ) |
| 487 | 487 | |
| 488 | 488 | PORT_MODIFY("DSW") |
| r7356 | r7357 | |
| 1642 | 1642 | /* no samples */ |
| 1643 | 1643 | ROM_END |
| 1644 | 1644 | |
| 1645 | /*This dump | |
| 1645 | /*This dump was a mess. 11n and 11k seem to be bad dumps, the second half should probably be sprite data | |
| 1646 | 1646 | Comparing to set 2 11l and 11h are unnecessary, and are actually from Le Bagnard(set1), as is 5m. |
| 1647 | 5n ID'd as unknown, but it also is from bagnard with some patches.*/ | |
| 1647 | 5n ID'd as unknown, but it also is from bagnard with some patches. */ | |
| 1648 | 1648 | ROM_START( cannonb ) |
| 1649 | 1649 | ROM_REGION( 0x11000, "maincpu", 0 ) |
| 1650 | 1650 | ROM_LOAD( "canballs.5d", 0x10000, 0x1000, CRC(43ad0d16) SHA1(682f1ee15e41bb5a161287536bb97704c0d3be9c) ) /* only this one ROM is encrypted */ |
| r7356 | r7357 | |
| 1675 | 1675 | ROM_LOAD( "canballs.5s", 0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) ) |
| 1676 | 1676 | ROM_LOAD( "canballs.5p", 0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) ) |
| 1677 | 1677 | |
| 1678 | ROM_REGION( 0x6000, "unused", 0 ) /* unused roms, don't seem to belong to this game, can probably remove them later */ | |
| 1679 | ROM_LOAD( "canballs.5m", 0x0000, 0x1000, CRC(4f0088ab) SHA1(a8009f5b8517ba4d84fbc483b199f2514f24eae8) ) // patched 'le bagnard' cod rom | |
| 1680 | ROM_LOAD( "canballs.5n", 0x1000, 0x1000, CRC(91570033) SHA1(7cd7fe9541da36c3919324bc65e6db1d1ca635e0) ) // ? | |
| 1681 | ROM_LOAD( "canballs.11l", 0x2000, 0x1000, CRC(060b044c) SHA1(3121f07adb661663a2303085eea1b662968f8f98) ) // 'le bagnard gfx' | |
| 1682 | ROM_LOAD( "canballs.11h", 0x3000, 0x1000, CRC(8043bc1a) SHA1(bd2f3dfe26cf8d987d9ecaa41eac4bdc4e16a692) ) // 'le bagnard gfx' | |
| 1678 | ROM_REGION( 0x6000, "unused", ROMREGION_ERASEFF ) /* unused roms, don't seem to belong to this game - they come from the bagman on crazy kong conversion, see below */ | |
| 1679 | //ROM_LOAD( "canballs.5m", 0x0000, 0x1000, CRC(4f0088ab) SHA1(a8009f5b8517ba4d84fbc483b199f2514f24eae8) ) // patched 'le bagnard' cod rom | |
| 1680 | //ROM_LOAD( "canballs.5n", 0x1000, 0x1000, CRC(91570033) SHA1(7cd7fe9541da36c3919324bc65e6db1d1ca635e0) ) // ? | |
| 1681 | //ROM_LOAD( "canballs.11l", 0x2000, 0x1000, CRC(060b044c) SHA1(3121f07adb661663a2303085eea1b662968f8f98) ) // 'le bagnard gfx' | |
| 1682 | //ROM_LOAD( "canballs.11h", 0x3000, 0x1000, CRC(8043bc1a) SHA1(bd2f3dfe26cf8d987d9ecaa41eac4bdc4e16a692) ) // 'le bagnard gfx' | |
| 1683 | 1683 | ROM_LOAD( "canballs.11n", 0x4000, 0x1000, CRC(a95b8e03) SHA1(e78125023e1af6de292292b875b45401b2173ca9) ) // probably just bad dump (missing sprite data) |
| 1684 | 1684 | ROM_LOAD( "canballs.11k", 0x5000, 0x1000, CRC(dbbe8263) SHA1(efe4bba25a03261bc8309e6d83d5600def875b0c) ) // probably just bad dump (missing sprite data) |
| 1685 | 1685 | ROM_END |
| r7356 | r7357 | |
| 1746 | 1746 | ROM_LOAD( "ck13 pos r5 2532.bin", 0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) ) |
| 1747 | 1747 | ROM_END |
| 1748 | 1748 | |
| 1749 | ||
| 1750 | /* PCB FCK-00 (Falcon Crazy Kong) + Daughterboard | |
| 1751 | running Bagman | |
| 1752 | ||
| 1753 | there are a lot of wire-mods on this board, it's possible that it's been hacked to work more like | |
| 1754 | an original bagman board, a lot of the roms are the same | |
| 1755 | ||
| 1756 | this set also explains why the cannonball set above contained a number of bagman roms, it was clearly | |
| 1757 | a half-converted board. | |
| 1758 | ||
| 1759 | */ | |
| 1760 | ROM_START( bagmanf ) | |
| 1761 | ROM_REGION( 0x11000, "maincpu", 0 ) | |
| 1762 | ROM_LOAD( "01.d5.bin", 0x0000, 0x1000, CRC(e0156191) SHA1(bb5f16d49fbe48f3bac118acd1fea51ec4bc5355) ) | |
| 1763 | ROM_LOAD( "02.f5.bin", 0x1000, 0x1000, CRC(7b758982) SHA1(c8460023b43fed4aca9c6b987faea334832c5e30) ) | |
| 1764 | ROM_LOAD( "03.h5.bin", 0x2000, 0x1000, CRC(302a077b) SHA1(916c4a6ea1e631cc72bdb91ff9d263dcbaf08bb2) ) | |
| 1765 | ROM_LOAD( "04.k5.bin", 0x3000, 0x1000, CRC(b704d761) SHA1(60f5f84a7c43ef50cf8ea81d566a3b23ca4f57c4) ) | |
| 1766 | ROM_LOAD( "05.l5.bin", 0x4000, 0x1000, CRC(4f0088ab) SHA1(a8009f5b8517ba4d84fbc483b199f2514f24eae8) ) | |
| 1767 | ROM_LOAD( "2732 05 pos dboard.bin", 0x5000, 0x1000, CRC(91570033) SHA1(7cd7fe9541da36c3919324bc65e6db1d1ca635e0) ) | |
| 1768 | ||
| 1769 | ROM_REGION( 0x4000, "gfx1", 0 ) | |
| 1770 | ROM_LOAD( "09.l11.bin", 0x0000, 0x0800, CRC(060b044c) SHA1(3121f07adb661663a2303085eea1b662968f8f98) ) | |
| 1771 | /* 0x0800-0x0fff - empty */ | |
| 1772 | ROM_CONTINUE( 0x1000, 0x0800 ) | |
| 1773 | /* 0x1800-0x0fff - empty */ | |
| 1774 | ROM_LOAD( "11.h11.bin", 0x2000, 0x0800, CRC(8043bc1a) SHA1(bd2f3dfe26cf8d987d9ecaa41eac4bdc4e16a692) ) | |
| 1775 | /* 0x2800-0x0fff - empty */ | |
| 1776 | ROM_CONTINUE( 0x3000, 0x0800 ) | |
| 1777 | /* 0x3800-0x0fff - empty */ | |
| 1778 | ||
| 1779 | ROM_REGION( 0x2000, "gfx2", 0 ) | |
| 1780 | ROM_LOAD( "10.n11.bin", 0x0000, 0x1000, CRC(c680ef04) SHA1(79406bc786374abfcd9f548268c445b5c8d8858d) ) | |
| 1781 | ROM_LOAD( "12.k11.bin", 0x1000, 0x1000, CRC(4a0a6b55) SHA1(955f8bd4bd9b0fc3c6c359c25ba543ba26c04cbd) ) | |
| 1782 | ||
| 1783 | ROM_REGION( 0x0060, "proms", 0 ) | |
| 1784 | ROM_LOAD( "v6", 0x0000, 0x0020, CRC(b3fc1505) SHA1(5b94adde0428a26b815c7eb9b3f3716470d349c7) ) | |
| 1785 | ROM_LOAD( "u6", 0x0020, 0x0020, CRC(26aada9e) SHA1(f59645e606ea4f0dd0fc4ea47dd03f526c534941) ) | |
| 1786 | ROM_LOAD( "t6", 0x0040, 0x0020, CRC(676b3166) SHA1(29b9434cd34d43ea5664e436e2a24b54f8d88aac) ) | |
| 1787 | ||
| 1788 | /* as well as one of the program roms, the daughterboard contains the speech hardware + roms */ | |
| 1789 | ROM_REGION( 0x0020, "proms2", 0 ) | |
| 1790 | ROM_LOAD( "daughterboard.prom", 0x0000, 0x0020, CRC(c58a4f6a) SHA1(35ef244b3e94032df2610aa594ea5670b91e1449) ) /*state machine driving TMS5110*/ | |
| 1791 | ||
| 1792 | ROM_REGION( 0x2000, "speech", 0 ) /* data for the TMS5110 speech chip */ | |
| 1793 | ROM_LOAD( "2732 07 pos dboard.bin", 0x0000, 0x1000, CRC(2e0057ff) SHA1(33e3ffa6418f86864eb81e5e9bda4bf540c143a6) ) | |
| 1794 | ROM_LOAD( "2732 08 pos dboard.bin", 0x1000, 0x1000, CRC(b2120edd) SHA1(52b89dbcc749b084331fa82b13d0876e911fce52) ) | |
| 1795 | ||
| 1796 | ROM_REGION( 0x2000, "samples", ROMREGION_ERASE00 ) /* samples */ | |
| 1797 | /* unpopulated */ | |
| 1798 | ROM_END | |
| 1799 | ||
| 1800 | ||
| 1749 | 1801 | ROM_START( swimmer ) |
| 1750 | 1802 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 1751 | 1803 | ROM_LOAD( "sw1", 0x0000, 0x1000, CRC(f12481e7) SHA1(4e8ee509043fd57ec1579594f0b2c543f270bead) ) |
| r7356 | r7357 | |
| 1989 | 2041 | |
| 1990 | 2042 | |
| 1991 | 2043 | GAME( 1980, cclimber, 0, cclimber, cclimber, cclimber, ROT0, "Nichibutsu", "Crazy Climber (US)", 0 ) |
| 1992 | GAME( 1980, cclimberj,cclimber, cclimber, cclimbrj, cclimbrj, ROT0, "Nichibutsu", "Crazy Climber (Japan)", 0 ) | |
| 1993 | GAME( 1980, ccboot, cclimber, cclimber, cclimber, cclimbrj, ROT0, "bootleg", "Crazy Climber (bootleg set 1)", 0 ) | |
| 1994 | GAME( 1980, ccboot2, cclimber, cclimber, cclimber, cclimbrj, ROT0, "bootleg", "Crazy Climber (bootleg set 2)", 0 ) | |
| 2044 | GAME( 1980, cclimberj,cclimber, cclimber, cclimberj,cclimberj,ROT0, "Nichibutsu", "Crazy Climber (Japan)", 0 ) | |
| 2045 | GAME( 1980, ccboot, cclimber, cclimber, cclimber, cclimberj,ROT0, "bootleg", "Crazy Climber (bootleg set 1)", 0 ) | |
| 2046 | GAME( 1980, ccboot2, cclimber, cclimber, cclimber, cclimberj,ROT0, "bootleg", "Crazy Climber (bootleg set 2)", 0 ) | |
| 1995 | 2047 | GAME( 1981, ckong, 0, cclimber, ckong, 0, ROT270, "Falcon", "Crazy Kong Part II (set 1)", 0 ) |
| 1996 | 2048 | GAME( 1981, ckonga, ckong, cclimber, ckong, 0, ROT270, "Falcon", "Crazy Kong Part II (set 2)", 0 ) |
| 1997 | 2049 | GAME( 1981, ckong2j, ckong, cclimber, ckong, 0, ROT270, "Falcon", "Crazy Kong Part II (Japan)", 0 ) |
| r7356 | r7357 | |
| 2001 | 2053 | GAME( 1981, bigkong, ckong, cclimber, ckong, 0, ROT270, "bootleg", "Big Kong", 0 ) |
| 2002 | 2054 | GAME( 1981, monkeyd, ckong, cclimber, ckong, 0, ROT270, "bootleg", "Monkey Donkey", 0 ) |
| 2003 | 2055 | GAME( 198?, ckongb, ckong, cclimber, ckongb, ckongb, ROT270, "bootleg", "Crazy Kong Part II (alternative levels)", 0 ) |
| 2056 | GAME( 1981, bagmanf, bagman, cclimber, ckong, 0, ROT270, "bootleg", "Bagman (bootleg on Crazy Kong hardware)", GAME_NOT_WORKING ) | |
| 2004 | 2057 | GAME( 1981, rpatrol, 0, cclimber, rpatrol, 0, ROT0, "Orca", "River Patrol (Orca)", 0 ) |
| 2005 | 2058 | GAME( 1981, rpatrolb, rpatrol, cclimber, rpatrol, 0, ROT0, "bootleg", "River Patrol (bootleg)", 0 ) |
| 2006 | 2059 | GAME( 1981, silvland, rpatrol, cclimber, rpatrol, 0, ROT0, "Falcon", "Silver Land", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | - quiz365 protection |
| 83 | 83 | |
| 84 | - ddenlv | |
| 84 | - ddenlov | |
| 85 | 85 | is all wrong (RTC/interrupts related). |
| 86 | 86 | |
| 87 | 87 | - sryudens: Transparency problems (Test->Option->Gal, Bonus Game during Demo mode). |
| r7356 | r7357 | |
| 1625 | 1625 | ADDRESS_MAP_END |
| 1626 | 1626 | |
| 1627 | 1627 | |
| 1628 | static UINT16 *ddenlv | |
| 1628 | static UINT16 *ddenlov | |
| 1629 | 1629 | |
| 1630 | static READ16_HANDLER( ddenlv | |
| 1630 | static READ16_HANDLER( ddenlov | |
| 1631 | 1631 | { |
| 1632 | 1632 | UINT16 dsw = 0; |
| 1633 | if ((~*ddenlvrj_dsw_sel) & 0x01) dsw |= input_port_read(space->machine, "DSW1"); | |
| 1634 | if ((~*ddenlvrj_dsw_sel) & 0x02) dsw |= input_port_read(space->machine, "DSW2"); | |
| 1635 | if ((~*ddenlvrj_dsw_sel) & 0x04) dsw |= input_port_read(space->machine, "DSW3"); | |
| 1633 | if ((~*ddenlovj_dsw_sel) & 0x01) dsw |= input_port_read(space->machine, "DSW1"); | |
| 1634 | if ((~*ddenlovj_dsw_sel) & 0x02) dsw |= input_port_read(space->machine, "DSW2"); | |
| 1635 | if ((~*ddenlovj_dsw_sel) & 0x04) dsw |= input_port_read(space->machine, "DSW3"); | |
| 1636 | 1636 | return dsw; |
| 1637 | 1637 | } |
| 1638 | 1638 | |
| 1639 | static WRITE16_HANDLER( ddenlv | |
| 1639 | static WRITE16_HANDLER( ddenlov | |
| 1640 | 1640 | { |
| 1641 | 1641 | if (ACCESSING_BITS_0_7) |
| 1642 | 1642 | { |
| r7356 | r7357 | |
| 1646 | 1646 | } |
| 1647 | 1647 | } |
| 1648 | 1648 | |
| 1649 | static CUSTOM_INPUT( ddenlv | |
| 1649 | static CUSTOM_INPUT( ddenlov | |
| 1650 | 1650 | { |
| 1651 | 1651 | return ddenlovr_blitter_irq_flag ? 0x03 : 0x00; // bit 4 = 1 -> blitter busy |
| 1652 | 1652 | } |
| 1653 | 1653 | |
| 1654 | static ADDRESS_MAP_START( ddenlv | |
| 1654 | static ADDRESS_MAP_START( ddenlov | |
| 1655 | 1655 | AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM |
| 1656 | 1656 | |
| 1657 | 1657 | AM_RANGE(0x200000, 0x2003ff) AM_WRITE(ddenlovr_palette_w) // Palette |
| r7356 | r7357 | |
| 1673 | 1673 | AM_RANGE(0x300180, 0x300181) AM_READ_PORT("P1") |
| 1674 | 1674 | AM_RANGE(0x300182, 0x300183) AM_READ_PORT("P2") |
| 1675 | 1675 | AM_RANGE(0x300184, 0x300185) AM_READ_PORT("SYSTEM") |
| 1676 | AM_RANGE(0x300186, 0x300187) AM_READ(ddenlvrj_dsw_r) // DSW | |
| 1677 | AM_RANGE(0x300188, 0x300189) AM_WRITE(ddenlvrj_coincounter_w) // Coin Counters | |
| 1678 | AM_RANGE(0x30018a, 0x30018b) AM_WRITEONLY AM_BASE(&ddenlvrj_dsw_sel) // DSW select | |
| 1676 | AM_RANGE(0x300186, 0x300187) AM_READ(ddenlovj_dsw_r) // DSW | |
| 1677 | AM_RANGE(0x300188, 0x300189) AM_WRITE(ddenlovj_coincounter_w) // Coin Counters | |
| 1678 | AM_RANGE(0x30018a, 0x30018b) AM_WRITEONLY AM_BASE(&ddenlovj_dsw_sel) // DSW select | |
| 1679 | 1679 | AM_RANGE(0x30018c, 0x30018d) AM_DEVWRITE("oki", ddenlovr_oki_bank_w) |
| 1680 | 1680 | AM_RANGE(0x3001ca, 0x3001cb) AM_WRITE(ddenlovr_blitter_irq_ack_w) // Blitter irq acknowledge |
| 1681 | 1681 | AM_RANGE(0x300240, 0x300241) AM_DEVREADWRITE8("oki", okim6295_r, okim6295_w, 0x00ff)// Sound |
| r7356 | r7357 | |
| 1683 | 1683 | ADDRESS_MAP_END |
| 1684 | 1684 | |
| 1685 | 1685 | |
| 1686 | static UINT16 *ddenlvrk_protection1, *ddenlvrk_protection2; | |
| 1687 | static READ16_HANDLER( ddenlvrk_protection1_r ) | |
| 1686 | static UINT16 *ddenlovrk_protection1, *ddenlovrk_protection2; | |
| 1687 | static READ16_HANDLER( ddenlovrk_protection1_r ) | |
| 1688 | 1688 | { |
| 1689 | switch(*ddenlvrk_protection1) | |
| 1689 | switch(*ddenlovrk_protection1) | |
| 1690 | 1690 | { |
| 1691 | 1691 | case 0x007e: return 0x00aa; |
| 1692 | 1692 | } |
| 1693 | return *ddenlvrk_protection1; | |
| 1693 | return *ddenlovrk_protection1; | |
| 1694 | 1694 | } |
| 1695 | 1695 | |
| 1696 | static READ16_HANDLER( ddenlvrk_protection2_r ) | |
| 1696 | static READ16_HANDLER( ddenlovrk_protection2_r ) | |
| 1697 | 1697 | { |
| 1698 | switch(*ddenlvrk_protection1) | |
| 1698 | switch(*ddenlovrk_protection1) | |
| 1699 | 1699 | { |
| 1700 | case 0x0000: return *ddenlvrk_protection2; | |
| 1700 | case 0x0000: return *ddenlovrk_protection2; | |
| 1701 | 1701 | } |
| 1702 | 1702 | return 0x80; |
| 1703 | 1703 | } |
| 1704 | static WRITE16_HANDLER( ddenlvrk_protection2_w ) | |
| 1704 | static WRITE16_HANDLER( ddenlovrk_protection2_w ) | |
| 1705 | 1705 | { |
| 1706 | COMBINE_DATA( ddenlvrk_protection2 ); | |
| 1707 | okim6295_set_bank_base(devtag_get_device(space->machine, "oki"), ((*ddenlvrk_protection2)&0x7) * 0x40000); | |
| 1706 | COMBINE_DATA( ddenlovrk_protection2 ); | |
| 1707 | okim6295_set_bank_base(devtag_get_device(space->machine, "oki"), ((*ddenlovrk_protection2)&0x7) * 0x40000); | |
| 1708 | 1708 | } |
| 1709 | 1709 | |
| 1710 | static ADDRESS_MAP_START( ddenlvrk_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1710 | static ADDRESS_MAP_START( ddenlovrk_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1711 | 1711 | AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM |
| 1712 | 1712 | |
| 1713 | AM_RANGE(0x100000, 0x100001) AM_RAM_READ(ddenlvrk_protection1_r) AM_BASE(&ddenlvrk_protection1) | |
| 1714 | AM_RANGE(0x200000, 0x200001) AM_READWRITE(ddenlvrk_protection2_r, ddenlvrk_protection2_w) AM_BASE(&ddenlvrk_protection2) | |
| 1713 | AM_RANGE(0x100000, 0x100001) AM_RAM_READ(ddenlovrk_protection1_r) AM_BASE(&ddenlovrk_protection1) | |
| 1714 | AM_RANGE(0x200000, 0x200001) AM_READWRITE(ddenlovrk_protection2_r, ddenlovrk_protection2_w) AM_BASE(&ddenlovrk_protection2) | |
| 1715 | 1715 | |
| 1716 | 1716 | AM_RANGE(0xd00000, 0xd003ff) AM_WRITE(ddenlovr_palette_w) // Palette |
| 1717 | 1717 | // AM_RANGE(0xd01000, 0xd017ff) AM_RAM // ? B0 on startup, then 00 |
| r7356 | r7357 | |
| 3508 | 3508 | |
| 3509 | 3509 | |
| 3510 | 3510 | |
| 3511 | static INPUT_PORTS_START( ddenlv | |
| 3511 | static INPUT_PORTS_START( ddenlov | |
| 3512 | 3512 | PORT_START("P1") |
| 3513 | 3513 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 3514 | 3514 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| r7356 | r7357 | |
| 3535 | 3535 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3536 | 3536 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */ |
| 3537 | 3537 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag |
| 3538 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ddenlv | |
| 3538 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ddenlov | |
| 3539 | 3539 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 3540 | 3540 | |
| 3541 | 3541 | PORT_START("DSW1") |
| r7356 | r7357 | |
| 7376 | 7376 | MDRV_MSM6242_ADD("rtc") |
| 7377 | 7377 | MACHINE_DRIVER_END |
| 7378 | 7378 | |
| 7379 | static MACHINE_DRIVER_START( ddenlv | |
| 7379 | static MACHINE_DRIVER_START( ddenlov | |
| 7380 | 7380 | |
| 7381 | 7381 | /* basic machine hardware */ |
| 7382 | 7382 | MDRV_IMPORT_FROM(ddenlovr) |
| 7383 | 7383 | MDRV_CPU_MODIFY("maincpu") |
| 7384 | MDRV_CPU_PROGRAM_MAP(ddenlv | |
| 7384 | MDRV_CPU_PROGRAM_MAP(ddenlov | |
| 7385 | 7385 | MACHINE_DRIVER_END |
| 7386 | 7386 | |
| 7387 | static MACHINE_DRIVER_START( ddenlvrk ) | |
| 7387 | static MACHINE_DRIVER_START( ddenlovrk ) | |
| 7388 | 7388 | MDRV_IMPORT_FROM(ddenlovr) |
| 7389 | 7389 | MDRV_CPU_MODIFY("maincpu") |
| 7390 | MDRV_CPU_PROGRAM_MAP(ddenlvrk_map) | |
| 7390 | MDRV_CPU_PROGRAM_MAP(ddenlovrk_map) | |
| 7391 | 7391 | MACHINE_DRIVER_END |
| 7392 | 7392 | |
| 7393 | 7393 | static MACHINE_DRIVER_START( akamaru ) |
| r7356 | r7357 | |
| 8459 | 8459 | |
| 8460 | 8460 | ***************************************************************************/ |
| 8461 | 8461 | |
| 8462 | ROM_START( ddenlv | |
| 8462 | ROM_START( ddenlov | |
| 8463 | 8463 | ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 Code */ |
| 8464 | 8464 | ROM_LOAD16_BYTE( "1124.2d", 0x000000, 0x040000, CRC(6a9ec557) SHA1(e1512601910a9d06e16a20e10ab7acc96a0819bd) ) |
| 8465 | 8465 | ROM_LOAD16_BYTE( "1123.2h", 0x000001, 0x040000, CRC(d41cbed0) SHA1(5c80f6a6cf15518120f664a0446355e80eeb2a0f) ) |
| r7356 | r7357 | |
| 8530 | 8530 | |
| 8531 | 8531 | ***************************************************************************/ |
| 8532 | 8532 | |
| 8533 | ROM_START( ddenlvrk ) | |
| 8533 | ROM_START( ddenlovrk ) | |
| 8534 | 8534 | ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 Code */ |
| 8535 | 8535 | ROM_LOAD16_BYTE( "rom.1a", 0x000000, 0x40000, CRC(868c45f8) SHA1(023ceaa30cfa03470ef005c8b739a85ae9764e15) ) |
| 8536 | 8536 | ROM_LOAD16_BYTE( "rom.1b", 0x000001, 0x40000, CRC(4fab3c90) SHA1(61a756a3ccae39f3a649371116b9d940d3b1b852) ) |
| r7356 | r7357 | |
| 8618 | 8618 | HSync 15.30kHz |
| 8619 | 8619 | VSync 60Hz |
| 8620 | 8620 | */ |
| 8621 | ROM_START( ddenlovb ) | |
| 8621 | ROM_START( ddenlovrb ) | |
| 8622 | 8622 | ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 Code */ |
| 8623 | 8623 | ROM_LOAD16_BYTE( "rom2", 0x000000, 0x040000, CRC(cabdf78f) SHA1(789d4754c7b84964ee317b8a618f26a417f50bcc) ) |
| 8624 | 8624 | ROM_LOAD16_BYTE( "rom3", 0x000001, 0x040000, CRC(36f8d05e) SHA1(78f75175541ebf377f5375ea30d80ea91f380971) ) |
| r7356 | r7357 | |
| 9771 | 9771 | GAME( 1995, hgokou, 0, hgokou, hgokou, 0, ROT0, "Dynax (Alba licence)", "Hanafuda Hana Gokou (Japan)", GAME_NO_COCKTAIL ) |
| 9772 | 9772 | GAME( 1995, mjdchuka, 0, mjchuuka, mjchuuka, 0, ROT0, "Dynax", "Mahjong The Dai Chuuka Ken (China, v. D111)", GAME_NO_COCKTAIL ) |
| 9773 | 9773 | GAME( 1995, nettoqc, 0, nettoqc, nettoqc, 0, ROT0, "Nakanihon", "Nettoh Quiz Champion (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_COLORS ) |
| 9774 | GAME( 1995, ddenlvrj, 0, ddenlvrj, ddenlvrj, 0, ROT0, "Dynax", "Don Den Lover Vol. 1 - Shiro Kuro Tsukeyo! (Japan)", GAME_NO_COCKTAIL ) | |
| 9775 | GAME( 1995, ddenlvrk, ddenlvrj, ddenlvrk, ddenlovr, 0, ROT0, "Dynax", "Don Den Lover Vol. 1 - Heukbaeg-euro Jeonghaja (Korea)", GAME_NO_COCKTAIL ) | |
| 9776 | GAME( 1995, ddenlovb, ddenlvrj, ddenlovr, ddenlovr, 0, ROT0, "[Dynax] (bootleg)", "Don Den Lover Vol. 1 - Heukbaeg-euro Jeonghaja (Korea, bootleg)", GAME_NO_COCKTAIL ) | |
| 9777 | GAME( 1996, ddenlovr, ddenlvrj, ddenlovr, ddenlovr, 0, ROT0, "Dynax", "Don Den Lover Vol. 1 (Hong Kong)", GAME_NO_COCKTAIL ) | |
| 9774 | GAME( 1995, ddenlovj, 0, ddenlovj, ddenlovj, 0, ROT0, "Dynax", "Don Den Lover Vol. 1 - Shiro Kuro Tsukeyo! (Japan)", GAME_NO_COCKTAIL ) | |
| 9775 | GAME( 1995, ddenlovrk,ddenlovj, ddenlovrk,ddenlovr, 0, ROT0, "Dynax", "Don Den Lover Vol. 1 - Heukbaeg-euro Jeonghaja (Korea)", GAME_NO_COCKTAIL ) | |
| 9776 | GAME( 1995, ddenlovrb,ddenlovj, ddenlovr, ddenlovr, 0, ROT0, "[Dynax] (bootleg)", "Don Den Lover Vol. 1 - Heukbaeg-euro Jeonghaja (Korea, bootleg)", GAME_NO_COCKTAIL ) | |
| 9777 | GAME( 1996, ddenlovr, ddenlovj, ddenlovr, ddenlovr, 0, ROT0, "Dynax", "Don Den Lover Vol. 1 (Hong Kong)", GAME_NO_COCKTAIL ) | |
| 9778 | 9778 | GAME( 1996, hanakanz, 0, hanakanz, hanakanz, 0, ROT0, "Dynax", "Hana Kanzashi (Japan)", GAME_NO_COCKTAIL ) |
| 9779 | 9779 | GAME( 1996, akamaru, 0, akamaru, akamaru, 0, ROT0, "Dynax (Nakanihon licence)", "Panel & Variety Akamaru Q Jousyou Dont-R", GAME_NO_COCKTAIL ) |
| 9780 | 9780 | GAME( 1996, sryudens, 0, sryudens, sryudens, 0, ROT0, "Dynax / Face", "Mahjong Seiryu Densetsu (Japan, NM502)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) |
| r7356 | r7357 | |
|---|---|---|
| 188 | 188 | memory_set_bank(space->machine, "bank4", data & 0x07); // shall we check (data & 7) < 6 (# of banks)? |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | static READ8_HANDLER( saiyugb1_mcu_command_r ) | |
| 191 | static READ8_HANDLER( saiyugoub1_mcu_command_r ) | |
| 192 | 192 | { |
| 193 | 193 | ddragon_state *state = (ddragon_state *)space->machine->driver_data; |
| 194 | 194 | #if 0 |
| r7356 | r7357 | |
| 200 | 200 | return state->mcu_command; |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | static WRITE8_HANDLER( saiyugb1_mcu_command_w ) | |
| 203 | static WRITE8_HANDLER( saiyugoub1_mcu_command_w ) | |
| 204 | 204 | { |
| 205 | 205 | ddragon_state *state = (ddragon_state *)space->machine->driver_data; |
| 206 | 206 | state->mcu_command = data; |
| r7356 | r7357 | |
| 212 | 212 | #endif |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | static WRITE8_HANDLER( saiyugb1_adpcm_rom_addr_w ) | |
| 215 | static WRITE8_HANDLER( saiyugoub1_adpcm_rom_addr_w ) | |
| 216 | 216 | { |
| 217 | 217 | ddragon_state *state = (ddragon_state *)space->machine->driver_data; |
| 218 | 218 | /* i8748 Port 1 write */ |
| 219 | 219 | state->i8748_P1 = data; |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | static WRITE8_DEVICE_HANDLER( saiyugb1_adpcm_control_w ) | |
| 222 | static WRITE8_DEVICE_HANDLER( saiyugoub1_adpcm_control_w ) | |
| 223 | 223 | { |
| 224 | 224 | ddragon_state *state = (ddragon_state *)device->machine->driver_data; |
| 225 | 225 | |
| 226 | 226 | /* i8748 Port 2 write */ |
| 227 | UINT8 *saiyugb1_adpcm_rom = memory_region(device->machine, "adpcm"); | |
| 227 | UINT8 *saiyugoub1_adpcm_rom = memory_region(device->machine, "adpcm"); | |
| 228 | 228 | |
| 229 | 229 | if (data & 0x80) /* Reset m5205 and disable ADPCM ROM outputs */ |
| 230 | 230 | { |
| r7356 | r7357 | |
| 251 | 251 | |
| 252 | 252 | state->adpcm_addr = ((state->adpcm_addr & 0x07fff) | (data & 0x70 << 11)); |
| 253 | 253 | |
| 254 | state->pcm_nibble = saiyugb1_adpcm_rom[state->adpcm_addr & 0x3ffff]; | |
| 254 | state->pcm_nibble = saiyugoub1_adpcm_rom[state->adpcm_addr & 0x3ffff]; | |
| 255 | 255 | |
| 256 | 256 | state->pcm_nibble = (state->pcm_nibble >> state->pcm_shift) & 0x0f; |
| 257 | 257 | |
| r7356 | r7357 | |
| 267 | 267 | state->i8748_P2 = data; |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | static WRITE8_DEVICE_HANDLER( saiyugb1_m5205_clk_w ) | |
| 270 | static WRITE8_DEVICE_HANDLER( saiyugoub1_m5205_clk_w ) | |
| 271 | 271 | { |
| 272 | 272 | /* i8748 T0 output clk mode */ |
| 273 | 273 | /* This signal goes through a divide by 8 counter */ |
| r7356 | r7357 | |
| 288 | 288 | #endif |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | static READ8_HANDLER( saiyugb1_m5205_irq_r ) | |
| 291 | static READ8_HANDLER( saiyugoub1_m5205_irq_r ) | |
| 292 | 292 | { |
| 293 | 293 | ddragon_state *state = (ddragon_state *)space->machine->driver_data; |
| 294 | 294 | if (state->adpcm_sound_irq) |
| r7356 | r7357 | |
| 299 | 299 | return 0; |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | static void saiyugb1_m5205_irq_w( running_device *device ) | |
| 302 | static void saiyugoub1_m5205_irq_w( running_device *device ) | |
| 303 | 303 | { |
| 304 | 304 | ddragon_state *state = (ddragon_state *)device->machine->driver_data; |
| 305 | 305 | state->adpcm_sound_irq = 1; |
| r7356 | r7357 | |
| 362 | 362 | AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_r) |
| 363 | 363 | ADDRESS_MAP_END |
| 364 | 364 | |
| 365 | static ADDRESS_MAP_START( saiyugb1_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 365 | static ADDRESS_MAP_START( saiyugoub1_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 366 | 366 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 367 | 367 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 368 | 368 | AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE("ymsnd", ym2151_r, ym2151_w) |
| 369 | AM_RANGE(0x9800, 0x9800) AM_WRITE(saiyugb1_mcu_command_w) | |
| 369 | AM_RANGE(0x9800, 0x9800) AM_WRITE(saiyugoub1_mcu_command_w) | |
| 370 | 370 | AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_r) |
| 371 | 371 | ADDRESS_MAP_END |
| 372 | 372 | |
| r7356 | r7357 | |
| 376 | 376 | ADDRESS_MAP_END |
| 377 | 377 | |
| 378 | 378 | static ADDRESS_MAP_START( i8748_portmap, ADDRESS_SPACE_IO, 8 ) |
| 379 | AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(saiyugb1_mcu_command_r) | |
| 380 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_DEVWRITE("adpcm", saiyugb1_m5205_clk_w) /* Drives the clock on the m5205 at 1/8 of this frequency */ | |
| 381 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(saiyugb1_m5205_irq_r) | |
| 382 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(saiyugb1_adpcm_rom_addr_w) | |
| 383 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_DEVWRITE("adpcm", saiyugb1_adpcm_control_w) | |
| 379 | AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(saiyugoub1_mcu_command_r) | |
| 380 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_DEVWRITE("adpcm", saiyugoub1_m5205_clk_w) /* Drives the clock on the m5205 at 1/8 of this frequency */ | |
| 381 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(saiyugoub1_m5205_irq_r) | |
| 382 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(saiyugoub1_adpcm_rom_addr_w) | |
| 383 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_DEVWRITE("adpcm", saiyugoub1_adpcm_control_w) | |
| 384 | 384 | ADDRESS_MAP_END |
| 385 | 385 | |
| 386 | 386 | |
| r7356 | r7357 | |
| 506 | 506 | /* This on the bootleg board, instead of the m6295 */ |
| 507 | 507 | static const msm5205_interface msm5205_config = |
| 508 | 508 | { |
| 509 | saiyugb1_m5205_irq_w, /* Interrupt function */ | |
| 509 | saiyugoub1_m5205_irq_w, /* Interrupt function */ | |
| 510 | 510 | MSM5205_S64_4B /* vclk input mode (6030Hz, 4-bit) */ |
| 511 | 511 | }; |
| 512 | 512 | |
| r7356 | r7357 | |
| 613 | 613 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) |
| 614 | 614 | MACHINE_DRIVER_END |
| 615 | 615 | |
| 616 | static MACHINE_DRIVER_START( saiyugb1 ) | |
| 616 | static MACHINE_DRIVER_START( saiyugoub1 ) | |
| 617 | 617 | |
| 618 | 618 | /* driver data */ |
| 619 | 619 | MDRV_DRIVER_DATA(ddragon_state) |
| r7356 | r7357 | |
| 627 | 627 | MDRV_CPU_PROGRAM_MAP(sub_map) |
| 628 | 628 | |
| 629 | 629 | MDRV_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* 3.579545 MHz oscillator */ |
| 630 | MDRV_CPU_PROGRAM_MAP(saiyugb1_sound_map) | |
| 630 | MDRV_CPU_PROGRAM_MAP(saiyugoub1_sound_map) | |
| 631 | 631 | |
| 632 | 632 | MDRV_CPU_ADD("mcu", I8748, 9263750) /* 9.263750 MHz oscillator, divided by 3*5 internally */ |
| 633 | 633 | MDRV_CPU_PROGRAM_MAP(i8748_map) |
| r7356 | r7357 | |
| 662 | 662 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) |
| 663 | 663 | MACHINE_DRIVER_END |
| 664 | 664 | |
| 665 | static MACHINE_DRIVER_START( saiyugb2 ) | |
| 665 | static MACHINE_DRIVER_START( saiyugoub2 ) | |
| 666 | 666 | |
| 667 | 667 | /* driver data */ |
| 668 | 668 | MDRV_DRIVER_DATA(ddragon_state) |
| r7356 | r7357 | |
| 938 | 938 | |
| 939 | 939 | |
| 940 | 940 | /* ( YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME FLAGS ) */ |
| 941 | GAME( 1988, chinagat, 0, chinagat, chinagat, chinagat, ROT0, "[Technos Japan] (Taito Romstar license)", "China Gate (US)", GAME_SUPPORTS_SAVE ) | |
| 942 | GAME( 1988, saiyugou, chinagat, chinagat, chinagat, chinagat, ROT0, "Technos Japan", "Sai Yu Gou Ma Roku (Japan)", GAME_SUPPORTS_SAVE ) | |
| 943 | GAME( 1988, saiyugoub1, chinagat, saiyugb1, chinagat, chinagat, ROT0, "bootleg", "Sai Yu Gou Ma Roku (Japan bootleg 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 944 | GAME( 1988, saiyugoub2, chinagat, saiyugb2, chinagat, chinagat, ROT0, "bootleg", "Sai Yu Gou Ma Roku (Japan bootleg 2)", GAME_SUPPORTS_SAVE ) | |
| 941 | GAME( 1988, chinagat, 0, chinagat, chinagat, chinagat, ROT0, "[Technos Japan] (Taito Romstar license)", "China Gate (US)", GAME_SUPPORTS_SAVE ) | |
| 942 | GAME( 1988, saiyugou, chinagat, chinagat, chinagat, chinagat, ROT0, "Technos Japan", "Sai Yu Gou Ma Roku (Japan)", GAME_SUPPORTS_SAVE ) | |
| 943 | GAME( 1988, saiyugoub1, chinagat, saiyugoub1, chinagat, chinagat, ROT0, "bootleg", "Sai Yu Gou Ma Roku (Japan bootleg 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 944 | GAME( 1988, saiyugoub2, chinagat, saiyugoub2, chinagat, chinagat, ROT0, "bootleg", "Sai Yu Gou Ma Roku (Japan bootleg 2)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 1 | 1 | #include "emu.h" |
| 2 | #include "megadriv.h" | |
| 2 | #include "includes/megadriv.h" | |
| 3 | 3 | |
| 4 | 4 | /* |
| 5 | 5 | |
| r7356 | r7357 | |
| 154 | 154 | ROM_CONTINUE( 0x300000, 0x040000) |
| 155 | 155 | ROM_END |
| 156 | 156 | |
| 157 | static INPUT_PORTS_START(mk3ghw) | |
| 158 | PORT_INCLUDE( md_common ) | |
| 157 | 159 | |
| 160 | PORT_MODIFY("PAD1") /* Joypad 1 (3 button + start) NOT READ DIRECTLY */ | |
| 161 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // a | |
| 162 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // b | |
| 163 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) // c | |
| 164 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) // start | |
| 165 | ||
| 166 | PORT_MODIFY("PAD2") /* Joypad 2 (3 button + start) NOT READ DIRECTLY - not used */ | |
| 167 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 168 | ||
| 169 | PORT_START("IN0") | |
| 170 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) | |
| 171 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) | |
| 172 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Coinage ) ) | |
| 173 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) | |
| 174 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) | |
| 175 | PORT_BIT( 0xf8, 0x00, IPT_UNUSED ) | |
| 176 | ||
| 177 | PORT_START("IN1") | |
| 178 | PORT_DIPUNKNOWN( 0x01, 0x00 ) | |
| 179 | PORT_DIPUNKNOWN( 0x02, 0x00 ) | |
| 180 | PORT_DIPUNKNOWN( 0x04, 0x00 ) | |
| 181 | PORT_DIPUNKNOWN( 0x08, 0x00 ) | |
| 182 | PORT_DIPUNKNOWN( 0x10, 0x00 ) | |
| 183 | PORT_DIPUNKNOWN( 0x20, 0x00 ) | |
| 184 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) | |
| 185 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 186 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 187 | PORT_DIPUNKNOWN( 0x80, 0x00 ) | |
| 188 | INPUT_PORTS_END | |
| 189 | ||
| 158 | 190 | // this should be correct, the areas of the rom that differ to the original |
| 159 | 191 | // after this decode look like intentional changes |
| 160 | 192 | static DRIVER_INIT( mk3ghw ) |
| r7356 | r7357 | |
| 191 | 223 | } |
| 192 | 224 | } |
| 193 | 225 | |
| 194 | // boot vectors don't seem to be valid... | |
| 195 | // these are from the original, but I don't seem right for this either | |
| 226 | // boot vectors don't seem to be valid, so they are patched... | |
| 196 | 227 | ROM[1] = 0x01; |
| 197 | 228 | ROM[0] = 0x00; |
| 198 | 229 | ROM[3] = 0x00; |
| r7356 | r7357 | |
| 200 | 231 | ROM[5] = 0x00; |
| 201 | 232 | ROM[4] = 0x00; |
| 202 | 233 | ROM[7] = 0x02; |
| 203 | ROM[6] = 0x | |
| 234 | ROM[6] = 0x10; | |
| 204 | 235 | |
| 236 | memory_install_read_port(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x770070, 0x770071, 0, 0, "IN0"); | |
| 237 | memory_install_read_port(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x770072, 0x770073, 0, 0, "IN1"); | |
| 205 | 238 | } |
| 206 | 239 | |
| 207 | 240 | |
| r7356 | r7357 | |
| 238 | 271 | } |
| 239 | 272 | |
| 240 | 273 | GAME( 1993, aladbl , 0, megadriv, aladbl, aladbl, ROT0, "bootleg / Sega", "Aladdin (bootleg of Japanese Megadrive version)", 0) |
| 241 | GAME( 1996, mk3ghw , 0, megadriv, | |
| 274 | GAME( 1996, mk3ghw , 0, megadriv, mk3ghw, mk3ghw, ROT0, "bootleg / Midway", "Mortal Kombat 3 (bootleg of Megadrive version)", 0 |
| r7356 | r7357 | |
|---|---|---|
| 3316 | 3316 | ROM_LOAD("mpr-21280.sd4", 0x0600000, 0x200000, CRC(aa548124) SHA1(a94adfe16b5c3236746451c181ccd3e1c27432f4) ) |
| 3317 | 3317 | ROM_END |
| 3318 | 3318 | |
| 3319 | ROM_START( indy500 ) /* Defaults to Twin (Stand Alone) Cab version. 2 credits to start - Can be set to Deluxe setting in service mode */ | |
| 3319 | ROM_START( indy500 ) /* Defaults to Twin (Stand Alone) Cab version. 2 credits to start - Can be set to Deluxe setting in service mode, Sega ID# 834-12362 */ | |
| 3320 | 3320 | ROM_REGION( 0x200000, "maincpu", 0 ) // i960 program |
| 3321 | ROM_LOAD32_WORD("epr-18254a.15", 0x000000, 0x080000, CRC(ad0f1fc5) SHA1(0bff35fc1d892aaffbf1a3965bf3109c54839f4b) ) | |
| 3322 | ROM_LOAD32_WORD("epr-18255a.16", 0x000002, 0x080000, CRC(784daab8) SHA1(299e87f8ec7bdefa6f94f4ab65e29e91f290611e) ) | |
| 3321 | ROM_LOAD32_WORD("epr-18598a.15", 0x000000, 0x080000, CRC(3cdcac0f) SHA1(2f616e363f4d246fece309e81325e5e3c4e9d9f8) ) /* Higher rom numbers indicate a newer version */ | |
| 3322 | ROM_LOAD32_WORD("epr-18599a.16", 0x000002, 0x080000, CRC(32bde9a2) SHA1(0982952ab3c5b035f37beb9304ac950c0e78aea8) ) /* Different attract mode... what else??? */ | |
| 3323 | 3323 | |
| 3324 | 3324 | ROM_REGION32_LE( 0x2000000, "user1", 0 ) // Data |
| 3325 | 3325 | ROM_LOAD32_WORD("mpr-18237.11", 0x0000000, 0x400000, CRC(37e4255a) SHA1(3ee69a5b9364048dfab242773d97f3af430845b7) ) |
| 3326 | 3326 | ROM_LOAD32_WORD("mpr-18238.12", 0x0000002, 0x400000, CRC(bf837bac) SHA1(6624417b65f15f20427bc42c27283f10342c76b5) ) |
| 3327 | 3327 | ROM_LOAD32_WORD("mpr-18239.9", 0x0800000, 0x400000, CRC(9a2db86e) SHA1(0b81f6037657af7d96ed5e9bfef407d87cbcc294) ) |
| 3328 | 3328 | ROM_LOAD32_WORD("mpr-18240.10", 0x0800002, 0x400000, CRC(ab46a35f) SHA1(67da857db7155a858a1fa575b6c50f4be3c9ab7c) ) |
| 3329 | ROM_LOAD32_WORD("epr-18389.7", 0x1000000, 0x080000, CRC(d22ea019) SHA1(ef10bb0ffcb1bbcf4672bb5f705a27679a793764) ) | |
| 3330 | ROM_LOAD32_WORD("epr-18390.8", 0x1000002, 0x080000, CRC(38e796e5) SHA1(b23cfe45c363d616a65decd57aeb8ae61d5370e9) ) | |
| 3329 | ROM_LOAD32_WORD("epr-18596.7", 0x1000000, 0x080000, CRC(8be1a5cd) SHA1(56ed21234c6494d95b4efda6c3374199c5ac65db) ) | |
| 3330 | ROM_LOAD32_WORD("epr-18597.8", 0x1000002, 0x080000, CRC(44824e38) SHA1(f0fb0d73c1e72ce77c3931d436c54c034d2107a8) ) | |
| 3331 | 3331 | ROM_COPY( "user1", 0x1000000, 0x1100000, 0x100000 ) |
| 3332 | 3332 | ROM_COPY( "user1", 0x1000000, 0x1200000, 0x100000 ) |
| 3333 | 3333 | ROM_COPY( "user1", 0x1000000, 0x1300000, 0x100000 ) |
| r7356 | r7357 | |
| 3359 | 3359 | ROM_LOAD32_WORD("mpr-18231.25", 0x000002, 0x400000, CRC(673d5338) SHA1(ce592857496ccc0a51efb377cf7cccc000b4296b) ) |
| 3360 | 3360 | |
| 3361 | 3361 | ROM_REGION( 0x100000, "audiocpu", 0 ) // Sound program |
| 3362 | ROM_LOAD16_WORD_SWAP("epr-18 | |
| 3362 | ROM_LOAD16_WORD_SWAP("epr-18600.31", 0x080000, 0x40000, CRC( | |
| 3363 | 3363 | |
| 3364 | 3364 | ROM_REGION( 0x800000, "scsp", 0 ) // Samples |
| 3365 | 3365 | ROM_LOAD("mpr-18241.32", 0x0000000, 0x200000, CRC(3a380ae1) SHA1(114113325e9e5262af8750c05089f24818943cde) ) |
| r7356 | r7357 | |
| 3420 | 3420 | ROM_LOAD("mpr-18244.35", 0x0600000, 0x200000, CRC(bfa75beb) SHA1(fec89260d887e90ee9c2803e2eaf937cf9bfa10b) ) |
| 3421 | 3421 | ROM_END |
| 3422 | 3422 | |
| 3423 | ROM_START( indy500to ) /* Defaults to Twin (Stand Alone) Cab version. 2 credits to start - Can be set to Deluxe setting in service mode */ | |
| 3424 | ROM_REGION( 0x200000, "maincpu", 0 ) // i960 program | |
| 3425 | ROM_LOAD32_WORD("epr-18254a.15", 0x000000, 0x080000, CRC(ad0f1fc5) SHA1(0bff35fc1d892aaffbf1a3965bf3109c54839f4b) ) | |
| 3426 | ROM_LOAD32_WORD("epr-18255a.16", 0x000002, 0x080000, CRC(784daab8) SHA1(299e87f8ec7bdefa6f94f4ab65e29e91f290611e) ) | |
| 3427 | ||
| 3428 | ROM_REGION32_LE( 0x2000000, "user1", 0 ) // Data | |
| 3429 | ROM_LOAD32_WORD("mpr-18237.11", 0x0000000, 0x400000, CRC(37e4255a) SHA1(3ee69a5b9364048dfab242773d97f3af430845b7) ) | |
| 3430 | ROM_LOAD32_WORD("mpr-18238.12", 0x0000002, 0x400000, CRC(bf837bac) SHA1(6624417b65f15f20427bc42c27283f10342c76b5) ) | |
| 3431 | ROM_LOAD32_WORD("mpr-18239.9", 0x0800000, 0x400000, CRC(9a2db86e) SHA1(0b81f6037657af7d96ed5e9bfef407d87cbcc294) ) | |
| 3432 | ROM_LOAD32_WORD("mpr-18240.10", 0x0800002, 0x400000, CRC(ab46a35f) SHA1(67da857db7155a858a1fa575b6c50f4be3c9ab7c) ) | |
| 3433 | ROM_LOAD32_WORD("epr-18389.7", 0x1000000, 0x080000, CRC(d22ea019) SHA1(ef10bb0ffcb1bbcf4672bb5f705a27679a793764) ) | |
| 3434 | ROM_LOAD32_WORD("epr-18390.8", 0x1000002, 0x080000, CRC(38e796e5) SHA1(b23cfe45c363d616a65decd57aeb8ae61d5370e9) ) | |
| 3435 | ROM_COPY( "user1", 0x1000000, 0x1100000, 0x100000 ) | |
| 3436 | ROM_COPY( "user1", 0x1000000, 0x1200000, 0x100000 ) | |
| 3437 | ROM_COPY( "user1", 0x1000000, 0x1300000, 0x100000 ) | |
| 3438 | ROM_COPY( "user1", 0x1000000, 0x1400000, 0x100000 ) | |
| 3439 | ROM_COPY( "user1", 0x1000000, 0x1500000, 0x100000 ) | |
| 3440 | ROM_COPY( "user1", 0x1000000, 0x1600000, 0x100000 ) | |
| 3441 | ROM_COPY( "user1", 0x1000000, 0x1700000, 0x100000 ) | |
| 3442 | ROM_COPY( "user1", 0x1000000, 0x1800000, 0x100000 ) | |
| 3443 | ROM_COPY( "user1", 0x1000000, 0x1900000, 0x100000 ) | |
| 3444 | ROM_COPY( "user1", 0x1000000, 0x1a00000, 0x100000 ) | |
| 3445 | ROM_COPY( "user1", 0x1000000, 0x1b00000, 0x100000 ) | |
| 3446 | ROM_COPY( "user1", 0x1000000, 0x1c00000, 0x100000 ) | |
| 3447 | ROM_COPY( "user1", 0x1000000, 0x1d00000, 0x100000 ) | |
| 3448 | ROM_COPY( "user1", 0x1000000, 0x1e00000, 0x100000 ) | |
| 3449 | ROM_COPY( "user1", 0x1000000, 0x1f00000, 0x100000 ) | |
| 3450 | ||
| 3451 | ROM_REGION( 0x800000, "user5", 0 ) // Coprocessor Data ROM | |
| 3452 | ROM_LOAD32_WORD("epr-18249.29", 0x000000, 0x080000, CRC(a399f023) SHA1(8b453313c16d935701ed7dbf71c1607c40aede63) ) | |
| 3453 | ROM_LOAD32_WORD("epr-18250.30", 0x000002, 0x080000, CRC(7479ad52) SHA1(d453e25709cd5970cd21bdc8b4785bc8eb5a50d7) ) | |
| 3454 | ||
| 3455 | ROM_REGION( 0x1000000, "user2", 0 ) // Models | |
| 3456 | ROM_LOAD32_WORD("mpr-18233.17", 0x000000, 0x400000, CRC(48a024d3) SHA1(501c6ab969713187025331942f922cb0e8efa69a) ) | |
| 3457 | ROM_LOAD32_WORD("mpr-18234.21", 0x000002, 0x400000, CRC(1178bfc8) SHA1(4a9982fdce08f9d375371763dd5287e8485c24b1) ) | |
| 3458 | ROM_LOAD32_WORD("mpr-18235.18", 0x800000, 0x400000, CRC(e7d70d59) SHA1(6081739c15a634d5cc7680a4fc7decead93540ed) ) | |
| 3459 | ROM_LOAD32_WORD("mpr-18236.22", 0x800002, 0x400000, CRC(6ca29e0e) SHA1(5de8b569d2a91047836f4a251c21db82fd7841c9) ) | |
| 3460 | ||
| 3461 | ROM_REGION( 0x800000, "user3", 0 ) // Textures | |
| 3462 | ROM_LOAD32_WORD("mpr-18232.27", 0x000000, 0x400000, CRC(f962347d) SHA1(79f07ee6b821724294ca9e7a079cb33249102508) ) | |
| 3463 | ROM_LOAD32_WORD("mpr-18231.25", 0x000002, 0x400000, CRC(673d5338) SHA1(ce592857496ccc0a51efb377cf7cccc000b4296b) ) | |
| 3464 | ||
| 3465 | ROM_REGION( 0x100000, "audiocpu", 0 ) // Sound program | |
| 3466 | ROM_LOAD16_WORD_SWAP("epr-18391.31", 0x080000, 0x40000, CRC(79579b72) SHA1(36fed8a9eeb34968b2852ea8fc9198427f0d27c6) ) | |
| 3467 | ||
| 3468 | ROM_REGION( 0x800000, "scsp", 0 ) // Samples | |
| 3469 | ROM_LOAD("mpr-18241.32", 0x0000000, 0x200000, CRC(3a380ae1) SHA1(114113325e9e5262af8750c05089f24818943cde) ) | |
| 3470 | ROM_LOAD("mpr-18242.33", 0x0200000, 0x200000, CRC(1cc3deae) SHA1(5c9cb8ce43a909b25b4e734c6a4ffd786f4dde31) ) | |
| 3471 | ROM_LOAD("mpr-18243.34", 0x0400000, 0x200000, CRC(a00a0053) SHA1(9c24fbcd0318c7e195dd153d6ba05e8c1e052968) ) | |
| 3472 | ROM_LOAD("mpr-18244.35", 0x0600000, 0x200000, CRC(bfa75beb) SHA1(fec89260d887e90ee9c2803e2eaf937cf9bfa10b) ) | |
| 3473 | ROM_END | |
| 3474 | ||
| 3423 | 3475 | ROM_START( waverunr ) /* Wave Runner Revision A (Japan), Model 2C */ |
| 3424 | 3476 | ROM_REGION( 0x200000, "maincpu", 0 ) // i960 program |
| 3425 | 3477 | ROM_LOAD32_WORD("epr-19282a.15", 0x000000, 0x080000, CRC(5df58604) SHA1(a136bb80746f37450be51f98ca60791b4022035d) ) |
| r7356 | r7357 | |
| 4606 | 4658 | GAME( 1994, vstrikero,vstriker, model2b, model2, 0, ROT0, "Sega", "Virtua Striker", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 4607 | 4659 | GAME( 1995, fvipers, 0, model2b, model2, 0, ROT0, "Sega", "Fighting Vipers (Revision D)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 4608 | 4660 | GAME( 1995, gunblade, 0, model2b, model2, 0, ROT0, "Sega", "Gunblade NY (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 4609 | GAME( 1995, indy500, 0, model2b, model2, 0, ROT0, "Sega", "INDY 500 Twin (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 4661 | GAME( 1995, indy500, 0, model2b, model2, 0, ROT0, "Sega", "INDY 500 Twin (Revision A, Newer)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 4610 | 4662 | GAME( 1995, indy500d, indy500, model2b, model2, 0, ROT0, "Sega", "INDY 500 Deluxe (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 4663 | GAME( 1995, indy500to, indy500, model2b, model2, 0, ROT0, "Sega", "INDY 500 Twin (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 4611 | 4664 | GAME( 1996, schamp, 0, model2b, model2, 0, ROT0, "Sega", "Sonic Championship", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 4612 | 4665 | GAME( 1996, sfight, schamp, model2b, model2, 0, ROT0, "Sega", "Sonic The Fighters", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 4613 | 4666 | GAME( 1996, lastbrnx, 0, model2b, model2, 0, ROT0, "Sega", "Last Bronx (Export, Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| r7356 | r7357 | |
|---|---|---|
| 583 | 583 | GAME( 1984, hypersptb, hyperspt, hypersptb, hyperspt, hyperspt, ROT0, "bootleg", "Hyper Sports (bootleg)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // has ADPCM vis MSM5205 instead of VLM |
| 584 | 584 | GAME( 1984, hpolym84, hyperspt, hyperspt, hyperspt, hyperspt, ROT0, "Konami", "Hyper Olympic '84", GAME_SUPPORTS_SAVE ) |
| 585 | 585 | GAME( 1984, roadf, 0, roadf, roadf, hyperspt, ROT90, "Konami", "Road Fighter (set 1)", GAME_SUPPORTS_SAVE ) |
| 586 | GAME( 1984, roadf2, roadf, | |
| 586 | GAME( 1984, roadf2, roadf, roadf, roadf, hyperspt, ROT90, "Konami", "Road Fighter (set 2)", GAME_SUPPORTS_SAVE ) |
| r0 | r7357 | |
|---|---|---|
| 1 | /****************************************************************************** | |
| 2 | ||
| 3 | SIGMA B52 SYSTEM. | |
| 4 | ----------------- | |
| 5 | ||
| 6 | Driver by Roberto Fresca. | |
| 7 | ||
| 8 | ||
| 9 | Games running on this hardware: | |
| 10 | ||
| 11 | * Joker's Wild (B52 system, set 1), 199?, Sigma. | |
| 12 | * Joker's Wild (B52 system, set 2), 199?, Sigma. | |
| 13 | * Joker's Wild (B52 system, Harrah's GFX), 199?, Sigma. | |
| 14 | ||
| 15 | ||
| 16 | The HD63484 ACRTC support is a bit hacky and incomplete, | |
| 17 | due to its preliminary emulation state. | |
| 18 | ||
| 19 | ||
| 20 | ******************************************************************************* | |
| 21 | ||
| 22 | Hardware Notes: | |
| 23 | --------------- | |
| 24 | ||
| 25 | CPU: | |
| 26 | ||
| 27 | - 2x MC68B09CP ; 6809 CPU @ 2 MHz, from Motorola. | |
| 28 | - 1x HD63484P8 @ 8MHz ; Advanced CRT controller (ACRTC), from Hitachi Semiconductor. | |
| 29 | ||
| 30 | RAM devices: | |
| 31 | ||
| 32 | - 8x TC51832ASPL-10 ; 32K x 8-bit CMOS Pseudo Static RAM. | |
| 33 | - 1x HM62256ALP-10 ; 32K x 8-bit High Speed CMOS Static RAM. | |
| 34 | - 1x HM6264ALP-10 ; 8K x 8-bit High Speed CMOS Static RAM. | |
| 35 | ||
| 36 | ROM devices: | |
| 37 | ||
| 38 | - 1x 64K main program ROM. | |
| 39 | - 4x 64K graphics ROM. | |
| 40 | - 1x 32K sound program ROM. | |
| 41 | - 1x 256 bytes bipolar PROM. | |
| 42 | ||
| 43 | Sound device: | |
| 44 | ||
| 45 | - 1x YM3812 ; Sound IC, from Yamaha. | |
| 46 | ||
| 47 | Other: | |
| 48 | ||
| 49 | - 2x EF68B40P ; Frequency clock 2 MHz Programmable Timer, from SGS-Thomson Microelectronics. | |
| 50 | - 1x EF68B50P ; Asynchronous Communications Interface Adapter (ACIA, 2 MHz), from SGS-Thomson Microelectronics. | |
| 51 | ||
| 52 | - 1x Xtal @ 18 MHz. | |
| 53 | - 1x Xtal @ 8 MHz. | |
| 54 | - 1x Xtal @ 3.579545 MHz. | |
| 55 | ||
| 56 | ||
| 57 | Silkscreened on main PCB: | |
| 58 | ||
| 59 | "SIGMA GAME INC." | |
| 60 | "VIDEO PCB 340016" | |
| 61 | "REV. A" | |
| 62 | ||
| 63 | Silkscreened on daughterboard: | |
| 64 | ||
| 65 | "SIGMA GAMES 340003" | |
| 66 | "BILL VALID BOARD" | |
| 67 | ||
| 68 | ||
| 69 | - Seems that you can set the node (01-32) for a network. | |
| 70 | - Cards graphics from set 2 have the Harrah's Casino logo. | |
| 71 | ||
| 72 | ||
| 73 | ******************************************************************************* | |
| 74 | ||
| 75 | ||
| 76 | *** Game Notes *** | |
| 77 | ||
| 78 | Nothing yet... | |
| 79 | ||
| 80 | ||
| 81 | ******************************************************************************* | |
| 82 | ||
| 83 | --------------------------------- | |
| 84 | *** Memory Map (preliminary) *** | |
| 85 | --------------------------------- | |
| 86 | ||
| 87 | 0x0000 - 0x3FFF ; RAM. | |
| 88 | 0xF730 - 0xF731 ; ACRTC. | |
| 89 | 0xF740 - 0xF746 ; I/O. | |
| 90 | ||
| 91 | Sound: | |
| 92 | ||
| 93 | 0x8000 - 0xFFFF ; ROM space. | |
| 94 | ||
| 95 | ||
| 96 | ******************************************************************************* | |
| 97 | ||
| 98 | ||
| 99 | DRIVER UPDATES: | |
| 100 | ||
| 101 | ||
| 102 | [2010-02-04] | |
| 103 | ||
| 104 | - Initial release. | |
| 105 | - Pre-defined Xtals. | |
| 106 | - Started a preliminary memory map. | |
| 107 | - Hooked both CPUs. | |
| 108 | - Preliminary ACRTC support. | |
| 109 | - Added technical notes. | |
| 110 | ||
| 111 | ||
| 112 | TODO: | |
| 113 | ||
| 114 | - GFX decode. | |
| 115 | - Improve memory map. | |
| 116 | - Color decode. | |
| 117 | - Sound support. | |
| 118 | - Inputs. | |
| 119 | ||
| 120 | ||
| 121 | *******************************************************************************/ | |
| 122 | ||
| 123 | ||
| 124 | #define MAIN_CLOCK XTAL_18MHz | |
| 125 | #define SEC_CLOCK XTAL_8MHz | |
| 126 | #define AUX_CLOCK XTAL_3_579545MHz | |
| 127 | ||
| 128 | #include "emu.h" | |
| 129 | #include "cpu/m6809/m6809.h" | |
| 130 | #include "machine/6850acia.h" | |
| 131 | #include "sound/3812intf.h" | |
| 132 | #include "video/hd63484.h" | |
| 133 | ||
| 134 | ||
| 135 | ||
| 136 | /************************* | |
| 137 | * Video Hardware * | |
| 138 | *************************/ | |
| 139 | ||
| 140 | ||
| 141 | static VIDEO_START( jwildb52 ) | |
| 142 | { | |
| 143 | ||
| 144 | } | |
| 145 | ||
| 146 | ||
| 147 | static VIDEO_UPDATE( jwildb52 ) | |
| 148 | { | |
| 149 | running_device *hd63484 = devtag_get_device(screen->machine, "hd63484"); | |
| 150 | ||
| 151 | int x, y, b, src; | |
| 152 | ||
| 153 | b = ((hd63484_regs_r(hd63484, 0xcc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(hd63484, 0xce/2, 0xffff); | |
| 154 | ||
| 155 | //save vram to file | |
| 156 | #if 0 | |
| 157 | if (input_code_pressed_once(screen->machine, KEYCODE_Q)) | |
| 158 | { | |
| 159 | FILE *p = fopen("vram.bin", "wb"); | |
| 160 | fwrite(&HD63484_ram[0], 1, 0x40000 * 4, p); | |
| 161 | fclose(p); | |
| 162 | } | |
| 163 | #endif | |
| 164 | //copied form other acrtc based games | |
| 165 | ||
| 166 | for (y = 0; y < 480; y++) | |
| 167 | { | |
| 168 | for (x = 0; x < (hd63484_regs_r(hd63484, 0xca/2, 0xffff) & 0x0fff) * 4; x += 4) | |
| 169 | { | |
| 170 | ||
| 171 | src = hd63484_ram_r(hd63484, b & (HD63484_RAM_SIZE - 1), 0xffff); | |
| 172 | ||
| 173 | *BITMAP_ADDR16(bitmap, y, x ) = ((src & 0x000f) >> 0) << 0; | |
| 174 | *BITMAP_ADDR16(bitmap, y, x + 1) = ((src & 0x00f0) >> 4) << 0; | |
| 175 | *BITMAP_ADDR16(bitmap, y, x + 2) = ((src & 0x0f00) >> 8) << 0; | |
| 176 | *BITMAP_ADDR16(bitmap, y, x + 3) = ((src & 0xf000) >> 12) << 0; | |
| 177 | b++; | |
| 178 | } | |
| 179 | } | |
| 180 | ||
| 181 | if (!input_code_pressed(screen->machine, KEYCODE_O)) | |
| 182 | if ((hd63484_regs_r(hd63484, 0x06/2, 0xffff) & 0x0300) == 0x0300) | |
| 183 | { | |
| 184 | int sy = (hd63484_regs_r(hd63484, 0x94/2, 0xffff) & 0x0fff) - (hd63484_regs_r(hd63484, 0x88/2, 0xffff) >> 8); | |
| 185 | int h = hd63484_regs_r(hd63484, 0x96/2, 0xffff) & 0x0fff; | |
| 186 | int sx = ((hd63484_regs_r(hd63484, 0x92/2, 0xffff) >> 8) - (hd63484_regs_r(hd63484, 0x84/2, 0xffff) >> 8)) * 4; | |
| 187 | int w = (hd63484_regs_r(hd63484, 0x92/2, 0xffff) & 0xff) * 2; | |
| 188 | if (sx < 0) sx = 0; // not sure about this (shangha2 title screen) | |
| 189 | ||
| 190 | b = (((hd63484_regs_r(hd63484, 0xdc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(hd63484, 0xde/2, 0xffff)); | |
| 191 | ||
| 192 | ||
| 193 | for (y = sy; y <= sy + h && y < 480; y++) | |
| 194 | { | |
| 195 | for (x = 0; x < (hd63484_regs_r(hd63484, 0xca/2, 0xffff) & 0x0fff)* 4; x += 4) | |
| 196 | { | |
| 197 | src = hd63484_ram_r(hd63484, b & (HD63484_RAM_SIZE - 1), 0xffff); | |
| 198 | ||
| 199 | if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(hd63484, 0xca/2, 0xffff) & 0x0fff) * 4) | |
| 200 | { | |
| 201 | *BITMAP_ADDR16(bitmap, y, x + sx ) = ((src & 0x000f) >> 0) << 0; | |
| 202 | *BITMAP_ADDR16(bitmap, y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0; | |
| 203 | *BITMAP_ADDR16(bitmap, y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0; | |
| 204 | *BITMAP_ADDR16(bitmap, y, x + sx + 3) = ((src & 0xf000) >> 12) << 0; | |
| 205 | } | |
| 206 | b++; | |
| 207 | } | |
| 208 | } | |
| 209 | } | |
| 210 | ||
| 211 | return 0; | |
| 212 | } | |
| 213 | ||
| 214 | ||
| 215 | static PALETTE_INIT( jwildb52 ) | |
| 216 | { | |
| 217 | ||
| 218 | } | |
| 219 | ||
| 220 | ||
| 221 | /************************* | |
| 222 | * ACRTC Access * | |
| 223 | *************************/ | |
| 224 | ||
| 225 | static WRITE8_HANDLER(acrtc_w) | |
| 226 | { | |
| 227 | static int latch=0; | |
| 228 | static unsigned int acrtc_data=0; | |
| 229 | running_device *hd63484 = devtag_get_device(space->machine, "hd63484"); | |
| 230 | if(!offset) | |
| 231 | { | |
| 232 | //address select | |
| 233 | hd63484_address_w(hd63484, 0, data, 0x00ff); | |
| 234 | latch = 0; | |
| 235 | } | |
| 236 | else | |
| 237 | { | |
| 238 | if(!latch) | |
| 239 | { | |
| 240 | acrtc_data = data; | |
| 241 | ||
| 242 | } | |
| 243 | ||
| 244 | else | |
| 245 | { | |
| 246 | acrtc_data <<= 8; | |
| 247 | acrtc_data |= data; | |
| 248 | ||
| 249 | hd63484_data_w(hd63484, 0, acrtc_data, 0xffff); | |
| 250 | } | |
| 251 | ||
| 252 | latch ^= 1; | |
| 253 | } | |
| 254 | } | |
| 255 | ||
| 256 | static READ8_HANDLER(acrtc_r) | |
| 257 | { | |
| 258 | if(offset&1) | |
| 259 | { | |
| 260 | running_device *hd63484 = devtag_get_device(space->machine, "hd63484"); | |
| 261 | return hd63484_data_r(hd63484, 0, 0xff); | |
| 262 | } | |
| 263 | ||
| 264 | else | |
| 265 | { | |
| 266 | return 0x7b; //fake status read (instead HD63484_status_r(space, 0, 0xff); ) | |
| 267 | } | |
| 268 | } | |
| 269 | ||
| 270 | ||
| 271 | /************************* | |
| 272 | * Misc Handlers * | |
| 273 | *************************/ | |
| 274 | ||
| 275 | static READ8_HANDLER(unk_f700_r) | |
| 276 | { | |
| 277 | return 0x7f; | |
| 278 | } | |
| 279 | ||
| 280 | static WRITE8_HANDLER(unk_f710_w) | |
| 281 | { | |
| 282 | memory_set_bankptr(space->machine, "bank1" ,&memory_region(space->machine, "maincpu")[0x10000 + ((data&0x80)?0x4000:0x0000)]); | |
| 283 | } | |
| 284 | ||
| 285 | static READ8_HANDLER(unk_f721_r) | |
| 286 | { | |
| 287 | return 0x04; // test is stuck. feeding bit3 the error message appear... | |
| 288 | } | |
| 289 | ||
| 290 | ||
| 291 | /************************* | |
| 292 | * Memory Maps * | |
| 293 | *************************/ | |
| 294 | ||
| 295 | static ADDRESS_MAP_START( jwildb52_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 296 | AM_RANGE(0x0000, 0x3fff) AM_RAM | |
| 297 | AM_RANGE(0x4000, 0x7fff) AM_RAMBANK("bank1") | |
| 298 | ||
| 299 | AM_RANGE(0x8000, 0xf6ff) AM_RAMBANK("bank3") | |
| 300 | ||
| 301 | AM_RANGE(0xf700, 0xf700) AM_READ(unk_f700_r) | |
| 302 | AM_RANGE(0xf710, 0xf710) AM_WRITE(unk_f710_w) | |
| 303 | AM_RANGE(0xf721, 0xf721) AM_READ(unk_f721_r) | |
| 304 | ||
| 305 | //AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("hd63484", hd63484_status_r, hd63484_address_w) | |
| 306 | //AM_RANGE(0x02, 0x03) AM_DEVREADWRITE("hd63484", hd63484_data_r, hd63484_data_w) | |
| 307 | ||
| 308 | AM_RANGE(0xf730, 0xf731) AM_READWRITE(acrtc_r, acrtc_w) | |
| 309 | AM_RANGE(0xf740, 0xf740) AM_READ_PORT("IN0") | |
| 310 | AM_RANGE(0xf741, 0xf741) AM_READ_PORT("IN1") // random checks to active high to go further with the test. | |
| 311 | AM_RANGE(0xf742, 0xf742) AM_READ_PORT("IN2") | |
| 312 | AM_RANGE(0xf743, 0xf743) AM_READ_PORT("DSW1") | |
| 313 | AM_RANGE(0xf744, 0xf744) AM_READ_PORT("DSW2") | |
| 314 | AM_RANGE(0xf745, 0xf745) AM_READ_PORT("DSW3") | |
| 315 | AM_RANGE(0xf746, 0xf746) AM_READ_PORT("DSW4") | |
| 316 | AM_RANGE(0xf800, 0xffff) AM_RAMBANK("bank2") | |
| 317 | ADDRESS_MAP_END | |
| 318 | ||
| 319 | /* Unknown R/W: | |
| 320 | ||
| 321 | F700 W | |
| 322 | F701 R | |
| 323 | ||
| 324 | F726 RW | |
| 325 | F727 RW | |
| 326 | ||
| 327 | F747 R | |
| 328 | ||
| 329 | F750 W | |
| 330 | ||
| 331 | F7D4 W | |
| 332 | F7D5 W | |
| 333 | ||
| 334 | F7E6 RW | |
| 335 | F7E7 RW | |
| 336 | ||
| 337 | */ | |
| 338 | ||
| 339 | static ADDRESS_MAP_START( sound_prog_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 340 | AM_RANGE(0x8000, 0xffff) AM_ROM | |
| 341 | ADDRESS_MAP_END | |
| 342 | ||
| 343 | /* Unknown R/W: | |
| 344 | ||
| 345 | ||
| 346 | */ | |
| 347 | ||
| 348 | ||
| 349 | /************************* | |
| 350 | * Input Ports * | |
| 351 | *************************/ | |
| 352 | ||
| 353 | static INPUT_PORTS_START( jwildb52 ) | |
| 354 | PORT_START("IN0") | |
| 355 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1) PORT_NAME("IN0-1") | |
| 356 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2) PORT_NAME("IN0-2") | |
| 357 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3) PORT_NAME("IN0-3") | |
| 358 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4) PORT_NAME("IN0-4") | |
| 359 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5) PORT_NAME("IN0-5") | |
| 360 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6) PORT_NAME("IN0-6") | |
| 361 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7) PORT_NAME("IN0-7") | |
| 362 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8) PORT_NAME("IN0-8") | |
| 363 | ||
| 364 | PORT_START("IN1") | |
| 365 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_9) PORT_NAME("IN1-1") // keys Q & O are used for debugging purposes. | |
| 366 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_W) PORT_NAME("IN1-2") | |
| 367 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_E) PORT_NAME("IN1-3") // pressing this one the message "PLEASE SET #10 IN D/S-2 ON" appear. Only SW4-8 seems to has effect. | |
| 368 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_R) PORT_NAME("IN1-4") | |
| 369 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("IN1-5") | |
| 370 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) PORT_NAME("IN1-6") | |
| 371 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) PORT_NAME("IN1-7") | |
| 372 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("IN1-8") | |
| 373 | ||
| 374 | PORT_START("IN2") | |
| 375 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("IN2-1") | |
| 376 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("IN2-2") | |
| 377 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("IN2-3") | |
| 378 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("IN2-4") | |
| 379 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("IN2-5") | |
| 380 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("IN2-6") | |
| 381 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) PORT_NAME("IN2-7") | |
| 382 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) PORT_NAME("IN2-8") | |
| 383 | ||
| 384 | PORT_START("IN3") | |
| 385 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) PORT_NAME("IN3-1") | |
| 386 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) PORT_NAME("IN3-2") | |
| 387 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) PORT_NAME("IN3-3") | |
| 388 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) PORT_NAME("IN3-4") | |
| 389 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) PORT_NAME("IN3-5") | |
| 390 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("IN3-6") | |
| 391 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) PORT_NAME("IN3-7") | |
| 392 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) PORT_NAME("IN3-8") | |
| 393 | ||
| 394 | PORT_START("IN4") | |
| 395 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("IN4-1") | |
| 396 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("IN4-2") | |
| 397 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("IN4-3") | |
| 398 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("IN4-4") | |
| 399 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("IN4-5") | |
| 400 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("IN4-6") | |
| 401 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("IN4-7") | |
| 402 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("IN4-8") | |
| 403 | ||
| 404 | PORT_START("DSW1") | |
| 405 | PORT_DIPNAME( 0x01, 0x01, "DSW1 - #01" ) PORT_DIPLOCATION("SW1:1") | |
| 406 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 407 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 408 | PORT_DIPNAME( 0x02, 0x02, "DSW1 - #02" ) PORT_DIPLOCATION("SW1:2") | |
| 409 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 410 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 411 | PORT_DIPNAME( 0x04, 0x04, "DSW1 - #04" ) PORT_DIPLOCATION("SW1:3") | |
| 412 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 413 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 414 | PORT_DIPNAME( 0x08, 0x08, "DSW1 - #08" ) PORT_DIPLOCATION("SW1:4") | |
| 415 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 416 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 417 | PORT_DIPNAME( 0x10, 0x10, "DSW1 - #10" ) PORT_DIPLOCATION("SW1:5") | |
| 418 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 419 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 420 | PORT_DIPNAME( 0x20, 0x20, "DSW1 - #20" ) PORT_DIPLOCATION("SW1:6") | |
| 421 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 422 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 423 | PORT_DIPNAME( 0x40, 0x40, "DSW1 - #40" ) PORT_DIPLOCATION("SW1:7") | |
| 424 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 425 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 426 | PORT_DIPNAME( 0x80, 0x80, "DSW1 - #80" ) PORT_DIPLOCATION("SW1:8") | |
| 427 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 428 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 429 | ||
| 430 | PORT_START("DSW2") | |
| 431 | PORT_DIPNAME( 0x01, 0x01, "DSW2 - #01" ) PORT_DIPLOCATION("SW2:1") | |
| 432 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 433 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 434 | PORT_DIPNAME( 0x02, 0x02, "DSW2 - #02" ) PORT_DIPLOCATION("SW2:2") | |
| 435 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 436 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 437 | PORT_DIPNAME( 0x04, 0x04, "DSW2 - #04" ) PORT_DIPLOCATION("SW2:3") | |
| 438 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 439 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 440 | PORT_DIPNAME( 0x08, 0x08, "DSW2 - #08" ) PORT_DIPLOCATION("SW2:4") | |
| 441 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 442 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 443 | PORT_DIPNAME( 0x10, 0x10, "DSW2 - #10" ) PORT_DIPLOCATION("SW2:5") | |
| 444 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 445 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 446 | PORT_DIPNAME( 0x20, 0x20, "DSW2 - #20" ) PORT_DIPLOCATION("SW2:6") | |
| 447 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 448 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 449 | PORT_DIPNAME( 0x40, 0x40, "DSW2 - #40" ) PORT_DIPLOCATION("SW2:7") | |
| 450 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 451 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 452 | PORT_DIPNAME( 0x80, 0x80, "DSW2 - #80" ) PORT_DIPLOCATION("SW2:8") | |
| 453 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 454 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 455 | ||
| 456 | PORT_START("DSW3") | |
| 457 | PORT_DIPNAME( 0x01, 0x01, "DSW3 - #01" ) PORT_DIPLOCATION("SW3:1") | |
| 458 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 459 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 460 | PORT_DIPNAME( 0x02, 0x02, "DSW3 - #02" ) PORT_DIPLOCATION("SW3:2") | |
| 461 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 462 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 463 | PORT_DIPNAME( 0x04, 0x04, "DSW3 - #04" ) PORT_DIPLOCATION("SW3:3") | |
| 464 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 465 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 466 | PORT_DIPNAME( 0x08, 0x08, "DSW3 - #08" ) PORT_DIPLOCATION("SW3:4") | |
| 467 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 468 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 469 | PORT_DIPNAME( 0x10, 0x10, "DSW3 - #10" ) PORT_DIPLOCATION("SW3:5") | |
| 470 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 471 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 472 | PORT_DIPNAME( 0x20, 0x20, "DSW3 - #20" ) PORT_DIPLOCATION("SW3:6") | |
| 473 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 474 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 475 | PORT_DIPNAME( 0x40, 0x40, "DSW3 - #40" ) PORT_DIPLOCATION("SW3:7") | |
| 476 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 477 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 478 | PORT_DIPNAME( 0x80, 0x80, "DSW3 - #80" ) PORT_DIPLOCATION("SW3:8") | |
| 479 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 480 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 481 | ||
| 482 | ||
| 483 | PORT_START("DSW4") | |
| 484 | PORT_DIPNAME( 0x01, 0x01, "DSW4 - #01" ) PORT_DIPLOCATION("SW4:1") | |
| 485 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 486 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 487 | PORT_DIPNAME( 0x02, 0x02, "DSW4 - #02" ) PORT_DIPLOCATION("SW4:2") | |
| 488 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 489 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 490 | PORT_DIPNAME( 0x04, 0x04, "DSW4 - #04" ) PORT_DIPLOCATION("SW4:3") | |
| 491 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 492 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 493 | PORT_DIPNAME( 0x08, 0x08, "DSW4 - #08" ) PORT_DIPLOCATION("SW4:4") | |
| 494 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 495 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 496 | PORT_DIPNAME( 0x10, 0x10, "DSW4 - #10" ) PORT_DIPLOCATION("SW4:5") | |
| 497 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 498 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 499 | PORT_DIPNAME( 0x20, 0x20, "DSW4 - #20" ) PORT_DIPLOCATION("SW4:6") | |
| 500 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 501 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 502 | PORT_DIPNAME( 0x40, 0x40, "DSW4 - #40" ) PORT_DIPLOCATION("SW4:7") | |
| 503 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 504 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 505 | PORT_DIPNAME( 0x80, 0x80, "DSW4 - #80" ) PORT_DIPLOCATION("SW4:8") | |
| 506 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 507 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 508 | ||
| 509 | INPUT_PORTS_END | |
| 510 | ||
| 511 | ||
| 512 | /****************************** | |
| 513 | * Interrupts Gen (to fix) * | |
| 514 | ******************************/ | |
| 515 | ||
| 516 | static INTERRUPT_GEN( timer_irq ) | |
| 517 | { | |
| 518 | generic_pulse_irq_line(device, M6809_IRQ_LINE); | |
| 519 | } | |
| 520 | ||
| 521 | ||
| 522 | /************************* | |
| 523 | * Machine Start * | |
| 524 | *************************/ | |
| 525 | ||
| 526 | static MACHINE_START(jwildb52) | |
| 527 | { | |
| 528 | memory_set_bankptr(machine, "bank1", &memory_region(machine, "maincpu")[0x10000 + 0x0000]); | |
| 529 | ||
| 530 | memory_set_bankptr(machine, "bank2", &memory_region(machine, "maincpu")[0x10000 + 0xf800]); | |
| 531 | ||
| 532 | memory_set_bankptr(machine, "bank3", &memory_region(machine, "maincpu")[0x10000 + 0x8000]); | |
| 533 | ||
| 534 | /* | |
| 535 | ||
| 536 | ACRTC memory: | |
| 537 | ||
| 538 | 00000-3ffff = RAM | |
| 539 | 40000-7ffff = ROM | |
| 540 | 80000-bffff = unused | |
| 541 | c0000-fffff = unused | |
| 542 | ||
| 543 | */ | |
| 544 | ||
| 545 | { | |
| 546 | UINT16 *rom = (UINT16*)memory_region(machine, "gfx1"); | |
| 547 | int i; | |
| 548 | ||
| 549 | running_device *hd63484 = devtag_get_device(machine, "hd63484"); | |
| 550 | ||
| 551 | for(i = 0; i < 0x40000/2; ++i) | |
| 552 | { | |
| 553 | hd63484_ram_w(hd63484, i + 0x40000/2, rom[i], 0xffff); | |
| 554 | } | |
| 555 | } | |
| 556 | } | |
| 557 | ||
| 558 | static const hd63484_interface jwildb52_hd63484_intf = { 1 }; | |
| 559 | ||
| 560 | ||
| 561 | /************************* | |
| 562 | * Machine Drivers * | |
| 563 | *************************/ | |
| 564 | ||
| 565 | static MACHINE_DRIVER_START( jwildb52 ) | |
| 566 | ||
| 567 | /* basic machine hardware */ | |
| 568 | MDRV_CPU_ADD("maincpu", M6809, MAIN_CLOCK/9) /* 2 MHz */ | |
| 569 | MDRV_CPU_PROGRAM_MAP(jwildb52_map) | |
| 570 | MDRV_CPU_VBLANK_INT("screen", timer_irq) /* Fix me */ | |
| 571 | ||
| 572 | #if 0 | |
| 573 | MDRV_CPU_ADD("audiocpu", M6809, MAIN_CLOCK/9) /* 2 MHz */ | |
| 574 | MDRV_CPU_PROGRAM_MAP(sound_prog_map) | |
| 575 | //temporary teh same int as for main cpu | |
| 576 | MDRV_CPU_PERIODIC_INT(timer_irq, 1000) /* Fix me */ | |
| 577 | #endif | |
| 578 | ||
| 579 | MDRV_MACHINE_START(jwildb52) | |
| 580 | ||
| 581 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 582 | MDRV_SCREEN_REFRESH_RATE(30) | |
| 583 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 584 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 585 | MDRV_SCREEN_SIZE(1024, 1024) | |
| 586 | MDRV_SCREEN_VISIBLE_AREA(0, 512-1, 0, 384-1) | |
| 587 | ||
| 588 | MDRV_HD63484_ADD("hd63484", jwildb52_hd63484_intf) | |
| 589 | ||
| 590 | MDRV_PALETTE_INIT(jwildb52) | |
| 591 | MDRV_PALETTE_LENGTH(256) | |
| 592 | ||
| 593 | MDRV_VIDEO_START(jwildb52) | |
| 594 | MDRV_VIDEO_UPDATE(jwildb52) | |
| 595 | ||
| 596 | MACHINE_DRIVER_END | |
| 597 | ||
| 598 | ||
| 599 | /************************* | |
| 600 | * Rom Load * | |
| 601 | *************************/ | |
| 602 | ||
| 603 | ROM_START( jwildb52 ) | |
| 604 | ROM_REGION( 0x20000, "maincpu", 0 ) | |
| 605 | ROM_LOAD( "poker.ic95", 0x10000, 0x10000, CRC(07eb9007) SHA1(ee814c40c6d8c9ea9e5246cae0cfa2c30f2976ed) ) | |
| 606 | ||
| 607 | ROM_REGION( 0x40000, "gfx1", 0 ) | |
| 608 | ROM_LOAD32_BYTE( "cards_2001-1.ic45", 0x00002, 0x10000, CRC(7664455e) SHA1(c9f129060e63b9ac9058ab94208846e4dc578ead) ) | |
| 609 | ROM_LOAD32_BYTE( "cards_2001-2.ic46", 0x00000, 0x10000, CRC(c1455d64) SHA1(ddb576ba471b5d2faa415ec425615cf5f9d87911) ) | |
| 610 | ROM_LOAD32_BYTE( "cards_2001-3.ic47", 0x00001, 0x10000, CRC(cb2ece6e) SHA1(f2b6949085fe395d0fdd16322a880ec87e2efd50) ) | |
| 611 | ROM_LOAD32_BYTE( "cards_2001-4.ic48", 0x00003, 0x10000, CRC(8131d236) SHA1(8984aa1f2af70df41973b61df17f184796a2ffe9) ) | |
| 612 | ||
| 613 | ROM_REGION( 0x10000, "audiocpu", 0 ) | |
| 614 | ROM_LOAD( "sound-01-00.43", 0x8000, 0x8000, CRC(2712d44c) SHA1(295526b27676cd97cbf111d47305d63c2b3ea50d) ) | |
| 615 | ||
| 616 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 617 | ROM_LOAD( "mb7118.41", 0x0000, 0x0100, CRC(b362f9e2) SHA1(3963b40389ed6584e4cd96ab48849552857d99af) ) | |
| 618 | ROM_END | |
| 619 | ||
| 620 | ||
| 621 | ROM_START( jwildb52a ) | |
| 622 | ROM_REGION( 0x20000, "maincpu", 0 ) | |
| 623 | ROM_LOAD( "sigm_wrk.bin", 0x10000, 0x10000, CRC(15c83c6c) SHA1(7a05bd94ea8b1ad051fbe6580a6550d4bb47dd15) ) | |
| 624 | ||
| 625 | /* No gfx & sound dumps. Using the ones from parent set for now... */ | |
| 626 | ||
| 627 | ROM_REGION( 0x40000, "gfx1", 0 ) | |
| 628 | ROM_LOAD32_BYTE( "cards_2001-1.ic45", 0x00002, 0x10000, BAD_DUMP CRC(7664455e) SHA1(c9f129060e63b9ac9058ab94208846e4dc578ead) ) | |
| 629 | ROM_LOAD32_BYTE( "cards_2001-2.ic46", 0x00000, 0x10000, BAD_DUMP CRC(c1455d64) SHA1(ddb576ba471b5d2faa415ec425615cf5f9d87911) ) | |
| 630 | ROM_LOAD32_BYTE( "cards_2001-3.ic47", 0x00001, 0x10000, BAD_DUMP CRC(cb2ece6e) SHA1(f2b6949085fe395d0fdd16322a880ec87e2efd50) ) | |
| 631 | ROM_LOAD32_BYTE( "cards_2001-4.ic48", 0x00003, 0x10000, BAD_DUMP CRC(8131d236) SHA1(8984aa1f2af70df41973b61df17f184796a2ffe9) ) | |
| 632 | ||
| 633 | ROM_REGION( 0x10000, "audiocpu", 0 ) | |
| 634 | ROM_LOAD( "sound-01-00.43", 0x8000, 0x8000, BAD_DUMP CRC(2712d44c) SHA1(295526b27676cd97cbf111d47305d63c2b3ea50d) ) | |
| 635 | ||
| 636 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 637 | ROM_LOAD( "mb7118.41", 0x0000, 0x0100, BAD_DUMP CRC(b362f9e2) SHA1(3963b40389ed6584e4cd96ab48849552857d99af) ) | |
| 638 | ROM_END | |
| 639 | ||
| 640 | ||
| 641 | ROM_START( jwildb52h ) | |
| 642 | ROM_REGION( 0x20000, "maincpu", 0 ) | |
| 643 | ROM_LOAD( "jokers_wild_ver_xxx.ic95", 0x10000, 0x10000, CRC(07eb9007) SHA1(ee814c40c6d8c9ea9e5246cae0cfa2c30f2976ed) ) | |
| 644 | ||
| 645 | ROM_REGION( 0x40000, "gfx1", 0 ) | |
| 646 | ROM_LOAD32_BYTE( "2006-1_harrahs.ic45", 0x00002, 0x10000, CRC(6e6871dc) SHA1(5dfc99c808c06ec34838324181988d4550c1ed1a) ) | |
| 647 | ROM_LOAD32_BYTE( "2006-2_harrahs.ic46", 0x00000, 0x10000, CRC(1039c62d) SHA1(11f0dbcbbff5f6e9028a0305f7e16a0654be40d4) ) | |
| 648 | ROM_LOAD32_BYTE( "2006-3_harrahs.ic47", 0x00001, 0x10000, CRC(d66af95a) SHA1(70bba1aeea9221541b82642045ce8ecf26e1d08c) ) | |
| 649 | ROM_LOAD32_BYTE( "2006-4_harrahs.ic48", 0x00003, 0x10000, CRC(2bf196cb) SHA1(686ca0dd84c48f51efee5349ea3db65531dd4a52) ) | |
| 650 | ||
| 651 | ROM_REGION( 0x10000, "audiocpu", 0 ) | |
| 652 | ROM_LOAD( "poker-01-00.43", 0x8000, 0x8000, CRC(2712d44c) SHA1(295526b27676cd97cbf111d47305d63c2b3ea50d) ) | |
| 653 | ||
| 654 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 655 | ROM_LOAD( "mb7118.41", 0x0000, 0x0100, CRC(b362f9e2) SHA1(3963b40389ed6584e4cd96ab48849552857d99af) ) | |
| 656 | ROM_END | |
| 657 | ||
| 658 | ||
| 659 | /************************* | |
| 660 | * Driver Init * | |
| 661 | *************************/ | |
| 662 | ||
| 663 | static DRIVER_INIT(jwildb52) | |
| 664 | { | |
| 665 | //HD63484_start(machine); | |
| 666 | } | |
| 667 | ||
| 668 | ||
| 669 | /************************* | |
| 670 | * Game Drivers * | |
| 671 | *************************/ | |
| 672 | ||
| 673 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */ | |
| 674 | GAME( 199?, jwildb52, 0, jwildb52, jwildb52, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, set 1)", GAME_NO_SOUND | GAME_NOT_WORKING ) | |
| 675 | GAME( 199?, jwildb52a, jwildb52, jwildb52, jwildb52, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, set 2)", GAME_NO_SOUND | GAME_NOT_WORKING ) | |
| 676 | GAME( 199?, jwildb52h, jwildb52, jwildb52, jwildb52, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, Harrah's GFX)", GAME_NO_SOUND | GAME_NOT_WORKING ) |
| r7356 | r7357 | |
|---|---|---|
| 208 | 208 | |
| 209 | 209 | state_save_register_global(machine, state->mux_data); |
| 210 | 210 | state_save_register_global(machine, state->register_active); |
| 211 | ||
| 212 | /* | |
| 213 | ACRTC memory: | |
| 214 | ||
| 215 | 00000-3ffff = RAM | |
| 216 | 40000-7ffff = ROM | |
| 217 | 80000-bffff = unused | |
| 218 | c0000-fffff = unused | |
| 219 | */ | |
| 220 | ||
| 221 | // hack to handle acrt rom | |
| 222 | { | |
| 223 | UINT16 *rom = (UINT16*)memory_region(machine, "gfx1"); | |
| 224 | int i; | |
| 225 | ||
| 226 | running_device *hd63484 = devtag_get_device(machine, "hd63484"); | |
| 227 | ||
| 228 | for(i = 0; i < 0x40000/2; ++i) | |
| 229 | { | |
| 230 | hd63484_ram_w(hd63484, i + 0x00000/2, rom[i], 0xffff); | |
| 231 | hd63484_ram_w(hd63484, i + 0x40000/2, rom[i], 0xffff); | |
| 232 | hd63484_ram_w(hd63484, i + 0x80000/2, rom[i], 0xffff); | |
| 233 | hd63484_ram_w(hd63484, i + 0xc0000/2, rom[i], 0xffff); | |
| 234 | } | |
| 235 | } | |
| 211 | 236 | } |
| 212 | 237 | |
| 213 | 238 | static MACHINE_RESET( skattv ) |
| r7356 | r7357 | |
| 257 | 282 | |
| 258 | 283 | static VIDEO_START(adp) |
| 259 | 284 | { |
| 260 | // adp_state *state = (adp_state *)machine->driver_data; | |
| 261 | // UINT32 i; | |
| 262 | // UINT16 *prgrom = (UINT16*)memory_region(machine, "maincpu"); | |
| 263 | 285 | |
| 264 | // for (i = 0; i < 0x70000; i++) | |
| 265 | // hd63484_ram_w(state->hd63484, 0x90000 + i, prgrom[i]); | |
| 266 | ||
| 267 | 286 | } |
| 268 | 287 | |
| 269 | 288 | static VIDEO_UPDATE( adp ) |
| r7356 | r7357 | |
| 272 | 291 | int x, y, b, src; |
| 273 | 292 | |
| 274 | 293 | b = ((hd63484_regs_r(state->hd63484, 0xcc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(state->hd63484, 0xce/2, 0xffff); |
| 275 | #if | |
| 294 | #if 1 | |
| 276 | 295 | if (input_code_pressed(screen->machine, KEYCODE_M)) b = 0; |
| 277 | if (input_code_pressed(screen->machine, KEYCODE_Q)) b += 0x060 * 280 * 1; | |
| 278 | if (input_code_pressed(screen->machine, KEYCODE_W)) b += 0x060 * 280 * 2; | |
| 279 | if (input_code_pressed(screen->machine, KEYCODE_E)) b += 0x060 * 280 * 3; | |
| 280 | if (input_code_pressed(screen->machine, KEYCODE_R)) b += 0x060 * 280 * 4; | |
| 281 | if (input_code_pressed(screen->machine, KEYCODE_T)) b += 0x060 * 280 * 5; | |
| 282 | if (input_code_pressed(screen->machine, KEYCODE_Y)) b += 0x060 * 280 * 6; | |
| 283 | if (input_code_pressed(screen->machine, KEYCODE_U)) b += 0x060 * 280 * 7; | |
| 284 | if (input_code_pressed(screen->machine, KEYCODE_I)) b += 0x060 * 280 * 8; | |
| 285 | if (input_code_pressed(screen->machine, KEYCODE_A)) b += 0x060 * 280 * 9; | |
| 286 | if (input_code_pressed(screen->machine, KEYCODE_S)) b += 0x060 * 280 * 10; | |
| 287 | if (input_code_pressed(screen->machine, KEYCODE_D)) b += 0x060 * 280 * 11; | |
| 288 | if (input_code_pressed(screen->machine, KEYCODE_F)) b += 0x060 * 280 * 12; | |
| 289 | if (input_code_pressed(screen->machine, KEYCODE_G)) b += 0x060 * 280 * 13; | |
| 290 | if (input_code_pressed(screen->machine, KEYCODE_H)) b += 0x060 * 280 * 14; | |
| 291 | if (input_code_pressed(screen->machine, KEYCODE_J)) b += 0x060 * 280 * 15; | |
| 292 | if (input_code_pressed(screen->machine, KEYCODE_K)) b += 0x060 * 280 * 16; | |
| 293 | if (input_code_pressed(screen->machine, KEYCODE_Z)) b += 0x060 * 280 * 17; | |
| 294 | if (input_code_pressed(screen->machine, KEYCODE_X)) b += 0x060 * 280 * 18; | |
| 295 | if (input_code_pressed(screen->machine, KEYCODE_C)) b += 0x060 * 280 * 19; | |
| 296 | if (input_code_pressed(screen->machine, KEYCODE_V)) b += 0x060 * 280 * 20; | |
| 297 | if (input_code_pressed(screen->machine, KEYCODE_B)) b += 0x060 * 280 * 21; | |
| 298 | if (input_code_pressed(screen->machine, KEYCODE_N)) b += 0x060 * 280 * 22; | |
| 296 | if (input_code_pressed(screen->machine, KEYCODE_Q)) b += 0x2000 * 1; | |
| 297 | if (input_code_pressed(screen->machine, KEYCODE_W)) b += 0x2000 * 2; | |
| 298 | if (input_code_pressed(screen->machine, KEYCODE_E)) b += 0x2000 * 3; | |
| 299 | if (input_code_pressed(screen->machine, KEYCODE_R)) b += 0x2000 * 4; | |
| 300 | if (input_code_pressed(screen->machine, KEYCODE_T)) b += 0x2000 * 5; | |
| 301 | if (input_code_pressed(screen->machine, KEYCODE_Y)) b += 0x2000 * 6; | |
| 302 | if (input_code_pressed(screen->machine, KEYCODE_U)) b += 0x2000 * 7; | |
| 303 | if (input_code_pressed(screen->machine, KEYCODE_I)) b += 0x2000 * 8; | |
| 304 | if (input_code_pressed(screen->machine, KEYCODE_A)) b += 0x2000 * 9; | |
| 305 | if (input_code_pressed(screen->machine, KEYCODE_S)) b += 0x2000 * 10; | |
| 306 | if (input_code_pressed(screen->machine, KEYCODE_D)) b += 0x2000 * 11; | |
| 307 | if (input_code_pressed(screen->machine, KEYCODE_F)) b += 0x2000 * 12; | |
| 308 | if (input_code_pressed(screen->machine, KEYCODE_G)) b += 0x2000 * 13; | |
| 309 | if (input_code_pressed(screen->machine, KEYCODE_H)) b += 0x2000 * 14; | |
| 310 | if (input_code_pressed(screen->machine, KEYCODE_J)) b += 0x2000 * 15; | |
| 311 | if (input_code_pressed(screen->machine, KEYCODE_K)) b += 0x2000 * 16; | |
| 312 | if (input_code_pressed(screen->machine, KEYCODE_Z)) b += 0x2000 * 17; | |
| 313 | if (input_code_pressed(screen->machine, KEYCODE_X)) b += 0x2000 * 18; | |
| 314 | if (input_code_pressed(screen->machine, KEYCODE_C)) b += 0x2000 * 19; | |
| 315 | if (input_code_pressed(screen->machine, KEYCODE_V)) b += 0x2000 * 20; | |
| 316 | if (input_code_pressed(screen->machine, KEYCODE_B)) b += 0x2000 * 21; | |
| 317 | if (input_code_pressed(screen->machine, KEYCODE_N)) b += 0x2000 * 22; | |
| 299 | 318 | #endif |
| 300 | 319 | for (y = 0;y < 280;y++) |
| 301 | 320 | { |
| r7356 | r7357 | |
| 310 | 329 | b++; |
| 311 | 330 | } |
| 312 | 331 | } |
| 313 | if (!input_code_pressed(screen->machine, KEYCODE_O)) | |
| 332 | if (!input_code_pressed(screen->machine, KEYCODE_O)) // debug: toggle window | |
| 314 | 333 | if ((hd63484_regs_r(state->hd63484, 0x06/2, 0xffff) & 0x0300) == 0x0300) |
| 315 | 334 | { |
| 316 | 335 | int sy = (hd63484_regs_r(state->hd63484, 0x94/2, 0xffff) & 0x0fff) - (hd63484_regs_r(state->hd63484, 0x88/2, 0xffff) >> 8); |
| r7356 | r7357 | |
| 364 | 383 | case 0x0b: value = input_port_read(space->machine, "x11"); break; |
| 365 | 384 | case 0x0c: value = input_port_read(space->machine, "x12"); break; |
| 366 | 385 | case 0x0d: value = input_port_read(space->machine, "x13"); break; |
| 367 | case 0x0e: value = input_port_read(space->machine, "x14"); break; | |
| 368 | case 0x0f: value = input_port_read(space->machine, "x15"); break; | |
| 386 | case 0x0e: value = input_port_read(space->machine, "1P_START"); break; | |
| 387 | case 0x0f: value = input_port_read(space->machine, "1P_COIN"); break; | |
| 369 | 388 | } |
| 370 | 389 | |
| 371 | 390 | state->mux_data++; |
| 372 | 391 | state->mux_data &= 0xf; |
| 373 | ||
| 374 | return value; | |
| 392 | /* | |
| 393 | switch (mame_rand(space->machine) & 3) | |
| 394 | { | |
| 395 | case 0: | |
| 396 | return 0; | |
| 397 | case 1: | |
| 398 | return 0xffff; | |
| 399 | default: | |
| 400 | return mame_rand(space->machine) & 0xffff; | |
| 401 | } | |
| 402 | */ | |
| 403 | return value | (mame_rand(space->machine) & 0x0000); | |
| 375 | 404 | } |
| 376 | 405 | |
| 377 | 406 | /*???*/ |
| r7356 | r7357 | |
| 571 | 600 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 572 | 601 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 573 | 602 | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 574 | PORT_START("x14") //button 4 | |
| 575 | PORT_DIPNAME( 0x0004,0x0004, "SW14" ) | |
| 576 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 577 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 603 | PORT_START("1P_START") | |
| 604 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) | |
| 578 | 605 | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 579 | PORT_START("x15") | |
| 580 | PORT_DIPNAME( 0x0004,0x0004, "SW15" ) | |
| 581 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 582 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 606 | PORT_START("1P_COIN") | |
| 607 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 583 | 608 | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 584 | 609 | INPUT_PORTS_END |
| 585 | 610 | |
| r7356 | r7357 | |
| 732 | 757 | ROM_LOAD16_BYTE( "quick_jack_index_a.2.u6.bin", 0x00001, 0x10000, CRC(210cb89b) SHA1(8eac60d40b60e845f9c02fee6c447f125ba5d1ab) ) |
| 733 | 758 | |
| 734 | 759 | ROM_REGION( 0x40000, "gfx1", 0 ) |
| 735 | ROM_LOAD16_BYTE( "quick_jack_video_inde_a.1.u2.bin", 0x00000, 0x20000, CRC(73c27fc6) SHA1(12429bc0009b7754e08d2b6a5e1cd8251ab66e2d) ) | |
| 736 | ROM_LOAD16_BYTE( "quick_jack_video_inde_a.2.u6.bin", 0x00001, 0x20000, CRC(61d55be2) SHA1(bc17dc91fd1ef0f862eb0d7dbbbfa354a8403eb8) ) | |
| 760 | ROM_LOAD16_BYTE( "quick_jack_video_inde_a.1.u2.bin", 0x00001, 0x20000, CRC(73c27fc6) SHA1(12429bc0009b7754e08d2b6a5e1cd8251ab66e2d) ) | |
| 761 | ROM_LOAD16_BYTE( "quick_jack_video_inde_a.2.u6.bin", 0x00000, 0x20000, CRC(61d55be2) SHA1(bc17dc91fd1ef0f862eb0d7dbbbfa354a8403eb8) ) | |
| 737 | 762 | ROM_END |
| 738 | 763 | |
| 739 | 764 | ROM_START( skattv ) |
| r7356 | r7357 | |
| 742 | 767 | ROM_LOAD16_BYTE( "f2_ii.bin", 0x00001, 0x20000, CRC(0db1d2d5) SHA1(a29b0299352e0b2b713caf02aa7978f2a4b34e37) ) |
| 743 | 768 | |
| 744 | 769 | ROM_REGION( 0x40000, "gfx1", 0 ) |
| 745 | ROM_LOAD16_BYTE( "f1_i.bin", 0x00000, 0x20000, CRC(4869a889) SHA1(ad9f3fcdfd3630f9ad5b93a9d2738de9fc3514d3) ) | |
| 746 | ROM_LOAD16_BYTE( "f1_ii.bin", 0x00001, 0x20000, CRC(17681537) SHA1(133685854b2080aaa3d0cced0287bc454d1f3bfc) ) | |
| 770 | ROM_LOAD16_BYTE( "f1_i.bin", 0x00001, 0x20000, CRC(4869a889) SHA1(ad9f3fcdfd3630f9ad5b93a9d2738de9fc3514d3) ) | |
| 771 | ROM_LOAD16_BYTE( "f1_ii.bin", 0x00000, 0x20000, CRC(17681537) SHA1(133685854b2080aaa3d0cced0287bc454d1f3bfc) ) | |
| 747 | 772 | ROM_END |
| 748 | 773 | |
| 749 | 774 | ROM_START( skattva ) |
| r7356 | r7357 | |
| 752 | 777 | ROM_LOAD16_BYTE( "skat_tv_version_ts3.2.u6.bin", 0x00001, 0x20000, CRC(4f927832) SHA1(bbe013005fd00dd42d12939eab5c80ec44a54b71) ) |
| 753 | 778 | |
| 754 | 779 | ROM_REGION( 0x40000, "gfx1", 0 ) |
| 755 | ROM_LOAD16_BYTE( "skat_tv_videoprom_t2.1.u2.bin", 0x00000, 0x20000, CRC(de6f275b) SHA1(0c396fa4d1975c8ccc4967d330b368c0697d2124) ) | |
| 756 | ROM_LOAD16_BYTE( "skat_tv_videoprom_t2.2.u5.bin", 0x00001, 0x20000, CRC(af3e60f9) SHA1(c88976ea42cf29a092fdee18377b32ffe91e9f33) ) | |
| 780 | ROM_LOAD16_BYTE( "skat_tv_videoprom_t2.1.u2.bin", 0x00001, 0x20000, CRC(de6f275b) SHA1(0c396fa4d1975c8ccc4967d330b368c0697d2124) ) | |
| 781 | ROM_LOAD16_BYTE( "skat_tv_videoprom_t2.2.u5.bin", 0x00000, 0x20000, CRC(af3e60f9) SHA1(c88976ea42cf29a092fdee18377b32ffe91e9f33) ) | |
| 757 | 782 | ROM_END |
| 758 | 783 | |
| 759 | 784 | ROM_START( backgamn ) |
| r7356 | r7357 | |
| 762 | 787 | ROM_LOAD16_BYTE( "b_f2_ii.bin", 0x00001, 0x10000, CRC(8e0ee50c) SHA1(2a05c337db1131b873646aa4109593636ebaa356) ) |
| 763 | 788 | |
| 764 | 789 | ROM_REGION( 0x40000, "gfx1", 0 ) |
| 765 | ROM_LOAD16_BYTE( "b_f1_i.bin", 0x00000, 0x20000, NO_DUMP ) | |
| 766 | ROM_LOAD16_BYTE( "b_f1_ii.bin", 0x00001, 0x20000, NO_DUMP ) | |
| 790 | ROM_LOAD16_BYTE( "b_f1_i.bin", 0x00001, 0x20000, NO_DUMP ) | |
| 791 | ROM_LOAD16_BYTE( "b_f1_ii.bin", 0x00000, 0x20000, NO_DUMP ) | |
| 767 | 792 | ROM_END |
| 768 | 793 | |
| 769 | 794 | ROM_START( fashiong ) |
| r7356 | r7357 | |
| 772 | 797 | ROM_LOAD16_BYTE( "fashion_gambler_s6_ii.bin", 0x00001, 0x80000, CRC(5a2466d1) SHA1(c113a2295beed2011c70887a1f2fcdec00b055cb) ) |
| 773 | 798 | |
| 774 | 799 | ROM_REGION( 0x100000, "gfx1", 0 ) |
| 775 | ROM_LOAD16_BYTE( "fashion_gambler_video_s2_i.bin", 0x00000, 0x80000, CRC(d1ee9133) SHA1(e5fdfa303a3317f8f5fbdc03438ee97415afff4b) ) | |
| 776 | ROM_LOAD16_BYTE( "fashion_gambler_video_s2_ii.bin", 0x00001, 0x80000, CRC(07b1e722) SHA1(594cbe9edfea6b04a4e49d1c1594f1c3afeadef5) ) | |
| 800 | ROM_LOAD16_BYTE( "fashion_gambler_video_s2_i.bin", 0x00001, 0x80000, CRC(d1ee9133) SHA1(e5fdfa303a3317f8f5fbdc03438ee97415afff4b) ) | |
| 801 | ROM_LOAD16_BYTE( "fashion_gambler_video_s2_ii.bin", 0x00000, 0x80000, CRC(07b1e722) SHA1(594cbe9edfea6b04a4e49d1c1594f1c3afeadef5) ) | |
| 777 | 802 | |
| 778 | 803 | ROM_REGION( 0x4000, "user1", 0 ) |
| 779 | 804 | //nvram - 16 bit |
| r7356 | r7357 | |
| 787 | 812 | ROM_LOAD16_BYTE( "fldl_f6_2.bin", 0x00000, 0x80000, CRC(93bf1a4b) SHA1(5b4353feba1e0d4402cd26f4855e3803e6be43b9) ) |
| 788 | 813 | |
| 789 | 814 | ROM_REGION( 0x100000, "gfx1", 0 ) |
| 790 | ROM_LOAD16_BYTE( "flv_f1_i.bin", 0x00000, 0x80000, CRC(286fccdc) SHA1(dd23deda625e486a7cfe1f3268731d10053a96e9) ) | |
| 791 | ROM_LOAD16_BYTE( "flv_f1_ii.bin", 0x00001, 0x80000, CRC(2aa904e6) SHA1(864530b136dd488d619cc95f48e7dce8d93d88e0) ) | |
| 815 | ROM_LOAD16_BYTE( "flv_f1_i.bin", 0x00001, 0x80000, CRC(286fccdc) SHA1(dd23deda625e486a7cfe1f3268731d10053a96e9) ) | |
| 816 | ROM_LOAD16_BYTE( "flv_f1_ii.bin", 0x00000, 0x80000, CRC(2aa904e6) SHA1(864530b136dd488d619cc95f48e7dce8d93d88e0) ) | |
| 792 | 817 | ROM_END |
| 793 | 818 | |
| 794 | 819 | ROM_START( fstation ) |
| r7356 | r7357 | |
| 797 | 822 | ROM_LOAD16_BYTE( "spielekoffer_9_sp_fun_station_f1.ii", 0x00001, 0x80000, CRC(a972184d) SHA1(1849e71e696039f07b7b67c4172c7999e81664c3) ) |
| 798 | 823 | |
| 799 | 824 | ROM_REGION( 0x100000, "gfx1", 0 ) |
| 800 | ROM_LOAD16_BYTE( "spielekoffer_video_9_sp_f1.i", 0x00000, 0x80000, CRC(b6eb971e) SHA1(14e3272c66a82db0f77123974eea28f308209b1b) ) | |
| 801 | ROM_LOAD16_BYTE( "spielekoffer_video_9_sp_f1.ii", 0x00001, 0x80000, CRC(64138dcb) SHA1(1b629915cba32f8f6164ae5075c175b522b4a323) ) | |
| 825 | ROM_LOAD16_BYTE( "spielekoffer_video_9_sp_f1.i", 0x00001, 0x80000, CRC(b6eb971e) SHA1(14e3272c66a82db0f77123974eea28f308209b1b) ) | |
| 826 | ROM_LOAD16_BYTE( "spielekoffer_video_9_sp_f1.ii", 0x00000, 0x80000, CRC(64138dcb) SHA1(1b629915cba32f8f6164ae5075c175b522b4a323) ) | |
| 802 | 827 | ROM_END |
| 803 | 828 | |
| 804 | 829 |
| r7356 | r7357 | |
|---|---|---|
| 9 | 9 | - Final Fight 2 |
| 10 | 10 | - Sonic Blast Man 2 |
| 11 | 11 | - Iron (bootleg of Iron Commando) |
| 12 | - Ghost Chaser Densei | |
| 12 | 13 | |
| 13 | 14 | Not dumped: |
| 14 | 15 | - Final Fight 3 |
| r7356 | r7357 | |
| 20 | 21 | - kiinstb - fix gfx glitches, missing texts |
| 21 | 22 | |
| 22 | 23 | |
| 23 | ||
| 24 | 24 | Final Fight 2 PCB layout: |
| 25 | 25 | ------------------------ |
| 26 | 26 | |
| r7356 | r7357 | |
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | |
| 248 | /* Denseib */ | |
| 248 | 249 | |
| 250 | static READ8_HANDLER(denseib_770071_r) | |
| 251 | { | |
| 252 | return input_port_read(space->machine, "DSW1"); | |
| 253 | } | |
| 249 | 254 | |
| 255 | static READ8_HANDLER(denseib_770079_r) | |
| 256 | { | |
| 257 | return input_port_read(space->machine, "COIN"); | |
| 258 | } | |
| 259 | ||
| 260 | ||
| 261 | ||
| 250 | 262 | static ADDRESS_MAP_START( snesb_map, ADDRESS_SPACE_PROGRAM, 8) |
| 251 | 263 | AM_RANGE(0x000000, 0x2fffff) AM_READWRITE(snes_r_bank1, snes_w_bank1) /* I/O and ROM (repeats for each bank) */ |
| 252 | 264 | AM_RANGE(0x300000, 0x3fffff) AM_READWRITE(snes_r_bank2, snes_w_bank2) /* I/O and ROM (repeats for each bank) */ |
| r7356 | r7357 | |
| 343 | 355 | PORT_DIPSETTING( 0x0, DEF_STR( No ) ) |
| 344 | 356 | PORT_DIPSETTING( 0x1, DEF_STR( Yes ) ) |
| 345 | 357 | |
| 346 | #ifdef | |
| 358 | #ifdef SNES_LAYER_DEBUG | |
| 347 | 359 | PORT_START("DEBUG1") /* IN 9 : debug switches */ |
| 348 | 360 | PORT_DIPNAME( 0x3, 0x0, "Browse tiles" ) |
| 349 | 361 | PORT_DIPSETTING( 0x0, DEF_STR( Off ) ) |
| r7356 | r7357 | |
| 447 | 459 | PORT_DIPSETTING( 0x0, DEF_STR( No ) ) |
| 448 | 460 | PORT_DIPSETTING( 0x1, DEF_STR( Yes ) ) |
| 449 | 461 | |
| 450 | #ifdef | |
| 462 | #ifdef SNES_LAYER_DEBUG | |
| 451 | 463 | PORT_START("DEBUG1") /* IN 9 : debug switches */ |
| 452 | 464 | PORT_DIPNAME( 0x3, 0x0, "Browse tiles" ) |
| 453 | 465 | PORT_DIPSETTING( 0x0, DEF_STR( Off ) ) |
| r7356 | r7357 | |
| 573 | 585 | PORT_DIPSETTING( 0x0, DEF_STR( No ) ) |
| 574 | 586 | PORT_DIPSETTING( 0x1, DEF_STR( Yes ) ) |
| 575 | 587 | |
| 576 | #ifdef | |
| 588 | #ifdef SNES_LAYER_DEBUG | |
| 577 | 589 | PORT_START("DEBUG1") /* IN 9 : debug switches */ |
| 578 | 590 | PORT_DIPNAME( 0x3, 0x0, "Browse tiles" ) |
| 579 | 591 | PORT_DIPSETTING( 0x0, DEF_STR( Off ) ) |
| r7356 | r7357 | |
| 685 | 697 | PORT_DIPSETTING( 0x0, DEF_STR( No ) ) |
| 686 | 698 | PORT_DIPSETTING( 0x1, DEF_STR( Yes ) ) |
| 687 | 699 | |
| 688 | #ifdef | |
| 700 | #ifdef SNES_LAYER_DEBUG | |
| 689 | 701 | PORT_START("DEBUG1") /* IN 9 : debug switches */ |
| 690 | 702 | PORT_DIPNAME( 0x3, 0x0, "Browse tiles" ) |
| 691 | 703 | PORT_DIPSETTING( 0x0, DEF_STR( Off ) ) |
| r7356 | r7357 | |
| 740 | 752 | |
| 741 | 753 | INPUT_PORTS_END |
| 742 | 754 | |
| 755 | static INPUT_PORTS_START( denseib ) | |
| 756 | PORT_START("PAD1L") /* IN 0 : Joypad 1 - L */ | |
| 757 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Button A") PORT_PLAYER(1) | |
| 758 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Button X") PORT_PLAYER(1) | |
| 759 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P1 Button L") PORT_PLAYER(1) | |
| 760 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P1 Button R") PORT_PLAYER(1) | |
| 761 | PORT_START("PAD1H") /* IN 1 : Joypad 1 - H */ | |
| 762 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Button B") PORT_PLAYER(1) | |
| 763 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Button Y") PORT_PLAYER(1) | |
| 764 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("P1 Select") | |
| 765 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("P1 Start") | |
| 766 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 767 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 768 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 769 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 743 | 770 | |
| 771 | PORT_START("PAD2L") /* IN 2 : Joypad 2 - L */ | |
| 772 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Button A") PORT_PLAYER(2) | |
| 773 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 Button X") PORT_PLAYER(2) | |
| 774 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P2 Button L") PORT_PLAYER(2) | |
| 775 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P2 Button R") PORT_PLAYER(2) | |
| 776 | PORT_START("PAD2H") /* IN 3 : Joypad 2 - H */ | |
| 777 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Button B") PORT_PLAYER(2) | |
| 778 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Button Y") PORT_PLAYER(2) | |
| 779 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("P2 Select") | |
| 780 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("P2 Start") | |
| 781 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 782 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 783 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 784 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 785 | ||
| 786 | PORT_START("PAD3L") /* IN 4 : Joypad 3 - L */ | |
| 787 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P3 Button A") PORT_PLAYER(3) | |
| 788 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P3 Button X") PORT_PLAYER(3) | |
| 789 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P3 Button L") PORT_PLAYER(3) | |
| 790 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P3 Button R") PORT_PLAYER(3) | |
| 791 | PORT_START("PAD3H") /* IN 5 : Joypad 3 - H */ | |
| 792 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3 Button B") PORT_PLAYER(3) | |
| 793 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3 Button Y") PORT_PLAYER(3) | |
| 794 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE3 ) PORT_NAME("P3 Select") | |
| 795 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START3 ) PORT_NAME("P3 Start") | |
| 796 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(3) | |
| 797 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) | |
| 798 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) | |
| 799 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) | |
| 800 | ||
| 801 | PORT_START("PAD4L") /* IN 6 : Joypad 4 - L */ | |
| 802 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P4 Button A") PORT_PLAYER(4) | |
| 803 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P4 Button X") PORT_PLAYER(4) | |
| 804 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P4 Button L") PORT_PLAYER(4) | |
| 805 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P4 Button R") PORT_PLAYER(4) | |
| 806 | PORT_START("PAD4H") /* IN 7 : Joypad 4 - H */ | |
| 807 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4 Button B") PORT_PLAYER(4) | |
| 808 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4 Button Y") PORT_PLAYER(4) | |
| 809 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_NAME("P4 Select") | |
| 810 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START4 ) PORT_NAME("P4 Start") | |
| 811 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(4) | |
| 812 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) | |
| 813 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) | |
| 814 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) | |
| 815 | ||
| 816 | PORT_START("INTERNAL") /* IN 8 : Internal switches */ | |
| 817 | PORT_DIPNAME( 0x1, 0x1, "Enforce 32 sprites/line" ) | |
| 818 | PORT_DIPSETTING( 0x0, DEF_STR( No ) ) | |
| 819 | PORT_DIPSETTING( 0x1, DEF_STR( Yes ) ) | |
| 820 | ||
| 821 | #ifdef SNES_LAYER_DEBUG | |
| 822 | PORT_START("DEBUG1") /* IN 9 : debug switches */ | |
| 823 | PORT_DIPNAME( 0x3, 0x0, "Browse tiles" ) | |
| 824 | PORT_DIPSETTING( 0x0, DEF_STR( Off ) ) | |
| 825 | PORT_DIPSETTING( 0x1, "2bpl" ) | |
| 826 | PORT_DIPSETTING( 0x2, "4bpl" ) | |
| 827 | PORT_DIPSETTING( 0x3, "8bpl" ) | |
| 828 | PORT_DIPNAME( 0xc, 0x0, "Browse maps" ) | |
| 829 | PORT_DIPSETTING( 0x0, DEF_STR( Off ) ) | |
| 830 | PORT_DIPSETTING( 0x4, "2bpl" ) | |
| 831 | PORT_DIPSETTING( 0x8, "4bpl" ) | |
| 832 | PORT_DIPSETTING( 0xc, "8bpl" ) | |
| 833 | ||
| 834 | PORT_START("DEBUG2") /* IN 10 : debug switches */ | |
| 835 | PORT_BIT( 0x1, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Toggle BG 1") PORT_PLAYER(2) | |
| 836 | PORT_BIT( 0x2, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Toggle BG 2") PORT_PLAYER(2) | |
| 837 | PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Toggle BG 3") PORT_PLAYER(2) | |
| 838 | PORT_BIT( 0x8, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Toggle BG 4") PORT_PLAYER(2) | |
| 839 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Toggle Objects") PORT_PLAYER(3) | |
| 840 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Toggle Main/Sub") PORT_PLAYER(3) | |
| 841 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Toggle Back col") PORT_PLAYER(3) | |
| 842 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Toggle Windows") PORT_PLAYER(3) | |
| 843 | ||
| 844 | PORT_START("DEBUG3") /* IN 11 : debug input */ | |
| 845 | PORT_BIT( 0x1, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Pal prev") | |
| 846 | PORT_BIT( 0x2, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Pal next") | |
| 847 | PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Toggle Transparency") PORT_PLAYER(4) | |
| 848 | #endif | |
| 849 | ||
| 850 | PORT_START("DSW1") /* IN 12 : dip-switches */ | |
| 851 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW1:1" ) | |
| 852 | PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW1:2" ) | |
| 853 | PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW1:3" ) | |
| 854 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW1:4" ) | |
| 855 | PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW1:5" ) | |
| 856 | PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW1:6" ) | |
| 857 | PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW1:7" ) | |
| 858 | PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW1:8" ) | |
| 859 | ||
| 860 | PORT_START("COIN") /* IN 14 : coins */ | |
| 861 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 862 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 863 | ||
| 864 | INPUT_PORTS_END | |
| 865 | ||
| 866 | ||
| 744 | 867 | static MACHINE_DRIVER_START( kinstb ) |
| 745 | 868 | /* basic machine hardware */ |
| 746 | 869 | MDRV_CPU_ADD("maincpu", G65816, 3580000) /* 2.68Mhz, also 3.58Mhz */ |
| r7356 | r7357 | |
| 938 | 1061 | DRIVER_INIT_CALL(snes); |
| 939 | 1062 | } |
| 940 | 1063 | |
| 1064 | static DRIVER_INIT( denseib ) | |
| 1065 | { | |
| 941 | 1066 | |
| 1067 | UINT8 *rom = memory_region(machine, "user3"); | |
| 1068 | ||
| 1069 | INT32 i; | |
| 1070 | for(i=0;i<0x200000;i++) | |
| 1071 | { | |
| 1072 | rom[i]=rom[i]^0xff; | |
| 1073 | switch(i>>16) | |
| 1074 | { | |
| 1075 | case 0x00: rom[i]=BITSWAP8(rom[i],1,7,0,6,3,4,5,2); break; | |
| 1076 | case 0x01: rom[i]=BITSWAP8(rom[i],3,4,7,2,0,6,5,1); break; | |
| 1077 | case 0x02: rom[i]=BITSWAP8(rom[i],5,4,2,1,7,0,6,3); break; | |
| 1078 | case 0x03: rom[i]=BITSWAP8(rom[i],0,1,3,7,2,6,5,4); break; | |
| 1079 | ||
| 1080 | default: rom[i]=BITSWAP8(rom[i],4,5,1,0,2,3,7,6); break; | |
| 1081 | } | |
| 1082 | } | |
| 1083 | ||
| 1084 | /* boot vector */ | |
| 1085 | rom[0xfffc]=0x40; | |
| 1086 | rom[0xfffd]=0xf7; | |
| 1087 | ||
| 1088 | /* extra inputs */ | |
| 1089 | memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x770071, 0x770071, 0, 0, denseib_770071_r); | |
| 1090 | memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x770079, 0x770079, 0, 0, denseib_770079_r); | |
| 1091 | ||
| 1092 | ||
| 1093 | DRIVER_INIT_CALL(snes_hirom); | |
| 1094 | } | |
| 1095 | ||
| 1096 | ||
| 942 | 1097 | ROM_START( kinstb ) |
| 943 | 1098 | ROM_REGION( 0x400000, "user3", 0 ) |
| 944 | 1099 | ROM_LOAD( "1.u14", 0x000000, 0x100000, CRC(70889919) SHA1(1451714cbdacb7f6ced2bc7afa478ad7264cf3b7) ) |
| r7356 | r7357 | |
| 1034 | 1189 | |
| 1035 | 1190 | ROM_END |
| 1036 | 1191 | |
| 1192 | ROM_START( denseib ) | |
| 1193 | ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF ) | |
| 1194 | ROM_LOAD( "dj.u14", 0x000000, 0x0080000, CRC(487ded13) SHA1(624edce30fe2f2d750bcb49c609ceb511b2279b1) ) | |
| 1195 | ROM_LOAD( "dj.u15", 0x080000, 0x0080000, CRC(5932a440) SHA1(6048372268a097b08d9f56ad30f083267d798165) ) | |
| 1196 | ROM_LOAD( "dj.u16", 0x100000, 0x0080000, CRC(7cb71fd7) SHA1(7673e9dcaabe804e2d637e67eabca1683dad4245) ) | |
| 1197 | ROM_LOAD( "dj.u17", 0x180000, 0x0080000, CRC(de29dd89) SHA1(441aefbc7ee64515ee66431ef504e76dc8dc5ca3) ) | |
| 1198 | ||
| 1199 | ROM_REGION(0x100, "user5", 0) | |
| 1200 | ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) ) | |
| 1201 | ||
| 1202 | ROM_REGION(0x800, "user6", ROMREGION_ERASEFF) | |
| 1203 | ROM_END | |
| 1204 | ||
| 1205 | ||
| 1037 | 1206 | GAME( 199?, kinstb, 0, kinstb, kinstb, kinstb, ROT0, "bootleg", "Killer Instinct (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 1038 | 1207 | GAME( 1996, ffight2b, 0, kinstb, ffight2b, ffight2b, ROT0, "bootleg", "Final Fight 2 (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 1039 | 1208 | GAME( 1997, sblast2b, 0, kinstb, sblast2b, sblast2b, ROT0, "bootleg", "Sonic Blast Man 2 Special Turbo (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS) |
| 1040 | 1209 | GAME( 1996, iron, 0, kinstb, iron, iron, ROT0, "bootleg", "Iron (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 1210 | GAME( 1996, denseib, 0, kinstb, denseib, denseib, ROT0, "bootleg", "Ghost Chaser Densei (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 1041 | 1211 | GAME( 1996, endless, 0, kinstb, iron, endless, ROT0, "bootleg", "Gundam Wing: Endless Duel (SNES bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| r7356 | r7357 | |
|---|---|---|
| 438 | 438 | * |
| 439 | 439 | *************************************/ |
| 440 | 440 | |
| 441 | GAME( 1980, crbaloon, 0, | |
| 441 | GAME( 1980, crbaloon, 0, crbaloon, crbaloon, 0, ROT90, "Taito Corporation", "Crazy Balloon (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 442 | 442 | GAME( 1980, crbaloon2,crbaloon, crbaloon, crbaloon, 0, ROT90, "Taito Corporation", "Crazy Balloon (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 46 | 46 | - Possible "Lives" settings : 3, 4, 5 or 6 (code at 0x0501) |
| 47 | 47 | - Bonus life routine at 0x2d03 (test on DSW bit 6) |
| 48 | 48 | |
| 49 | 1b) 'funkbeeb' | |
| 49 | 1b) 'funkybeeb' | |
| 50 | 50 | |
| 51 | 51 | - Removal of ORCA copyright on title screen (text at 0x0e9a). |
| 52 | 52 | However, high scores table remains unchanged. |
| r7356 | r7357 | |
| 64 | 64 | but "Bonus Life" settings depend on the starting number of lives. |
| 65 | 65 | DSW bit 6 has no effect because of this. |
| 66 | 66 | |
| 67 | 2a) 'skylance' | |
| 67 | 2a) 'skylancre' | |
| 68 | 68 | |
| 69 | 69 | - Possible "Lives" settings : 3, 4, 5 or 6 (code at 0x0601) |
| 70 | 70 | - Bonus life routine at 0x1f28 (test on DSW bit 6) |
| r7356 | r7357 | |
| 160 | 160 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 161 | 161 | INPUT_PORTS_END |
| 162 | 162 | |
| 163 | static INPUT_PORTS_START( funkbeeb ) | |
| 163 | static INPUT_PORTS_START( funkybeeb ) | |
| 164 | 164 | PORT_INCLUDE(funkybee) |
| 165 | 165 | |
| 166 | 166 | PORT_MODIFY("DSW") |
| r7356 | r7357 | |
| 219 | 219 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 220 | 220 | INPUT_PORTS_END |
| 221 | 221 | |
| 222 | static INPUT_PORTS_START( skylance ) | |
| 222 | static INPUT_PORTS_START( skylancre ) | |
| 223 | 223 | PORT_INCLUDE(skylancr) |
| 224 | 224 | |
| 225 | 225 | PORT_MODIFY("DSW") |
| r7356 | r7357 | |
| 436 | 436 | ROM_END |
| 437 | 437 | |
| 438 | 438 | GAME( 1982, funkybee, 0, funkybee, funkybee, 0, ROT90, "Orca", "Funky Bee", GAME_SUPPORTS_SAVE ) |
| 439 | GAME( 1982, funkybeeb, funkybee, funkybee, funkbeeb, | |
| 439 | GAME( 1982, funkybeeb, funkybee, funkybee, funkybeeb, | |
| 440 | 440 | GAME( 1983, skylancr, 0, funkybee, skylancr, 0, ROT90, "Orca", "Sky Lancer", GAME_SUPPORTS_SAVE ) |
| 441 | GAME( 1983, skylancre, skylancr, funkybee, skylance, | |
| 441 | GAME( 1983, skylancre, skylancr, funkybee, skylancre, |
| r7356 | r7357 | |
|---|---|---|
| 182 | 182 | AM_RANGE(0xfc03, 0xfc03) AM_DEVWRITE("sn4", sn76496_w) |
| 183 | 183 | ADDRESS_MAP_END |
| 184 | 184 | |
| 185 | static ADDRESS_MAP_START( freekckb_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 185 | static ADDRESS_MAP_START( freekickb_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 186 | 186 | AM_RANGE(0x0000, 0xcfff) AM_ROM |
| 187 | 187 | AM_RANGE(0xd000, 0xdfff) AM_RAM |
| 188 | 188 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(freek_videoram_w) AM_BASE_MEMBER(freekick_state, videoram) // tilemap |
| r7356 | r7357 | |
| 236 | 236 | AM_RANGE(0x05, 0x05) AM_WRITE(oigas_5_w) |
| 237 | 237 | ADDRESS_MAP_END |
| 238 | 238 | |
| 239 | static ADDRESS_MAP_START( freekckb_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 239 | static ADDRESS_MAP_START( freekickb_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 240 | 240 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 241 | 241 | AM_RANGE(0xff, 0xff) AM_READWRITE(freekick_ff_r, freekick_ff_w) |
| 242 | 242 | ADDRESS_MAP_END |
| r7356 | r7357 | |
| 689 | 689 | MDRV_MACHINE_RESET(freekick) |
| 690 | 690 | MACHINE_DRIVER_END |
| 691 | 691 | |
| 692 | static MACHINE_DRIVER_START( freekckb ) | |
| 692 | static MACHINE_DRIVER_START( freekickb ) | |
| 693 | 693 | MDRV_IMPORT_FROM(base) |
| 694 | 694 | |
| 695 | 695 | MDRV_CPU_MODIFY("maincpu") |
| 696 | MDRV_CPU_PROGRAM_MAP(freekckb_map) | |
| 697 | MDRV_CPU_IO_MAP(freekckb_io_map) | |
| 696 | MDRV_CPU_PROGRAM_MAP(freekickb_map) | |
| 697 | MDRV_CPU_IO_MAP(freekickb_io_map) | |
| 698 | 698 | |
| 699 | 699 | MDRV_MACHINE_START(freekick) |
| 700 | 700 | MDRV_MACHINE_RESET(freekick) |
| r7356 | r7357 | |
| 825 | 825 | ROM_LOAD( "24s10n.7h", 0x0500, 0x0100, CRC(a507f941) SHA1(97619959ee4c366cb010525636ab5eefe5a3127a) ) |
| 826 | 826 | ROM_END |
| 827 | 827 | |
| 828 | ROM_START( freekckb ) | |
| 828 | ROM_START( freekickb ) | |
| 829 | 829 | ROM_REGION( 0x10000, "maincpu", 0 ) /* Z80 Code */ |
| 830 | 830 | ROM_LOAD( "freekbl8.q7", 0x00000, 0x10000, CRC(4208cfe5) SHA1(21628cbe8a217fbae30a6c24c9cc4c790fe45d65) ) // this was on the bootleg, would normally be battery backed inside cpu? |
| 831 | 831 | |
| r7356 | r7357 | |
| 851 | 851 | ROM_LOAD( "24s10n.7h", 0x0500, 0x0100, CRC(a507f941) SHA1(97619959ee4c366cb010525636ab5eefe5a3127a) ) |
| 852 | 852 | ROM_END |
| 853 | 853 | |
| 854 | ROM_START( freekcb2 ) | |
| 854 | ROM_START( freekickb2 ) | |
| 855 | 855 | ROM_REGION( 0x10000, "maincpu", 0 ) /* Z80 Code */ |
| 856 | 856 | ROM_LOAD( "15.bin", 0x00000, 0x10000, CRC(6569f2b0) SHA1(9306e316e6ae659bae3759a12a4e445b555a8893) ) // this was on the bootleg, would normally be battery backed inside cpu? |
| 857 | 857 | |
| r7356 | r7357 | |
| 914 | 914 | ROM_LOAD( "24s10n.7h", 0x0500, 0x0100, CRC(c77d0077) SHA1(4cbbf625ad5e45d00ca6aebe9566538ff0a3348d) ) |
| 915 | 915 | ROM_END |
| 916 | 916 | |
| 917 | ROM_START( countrb2 ) | |
| 917 | ROM_START( countrunb2 ) | |
| 918 | 918 | ROM_REGION( 0x10000, "maincpu", 0 ) /* Z80 Code */ |
| 919 | 919 | ROM_LOAD( "crunbl.8", 0x00000, 0x10000, CRC(318f95d9) SHA1(f2386b9d26d1bc98728aad9e257363b381043dc9) ) // encrypted? bad? its strange anyway |
| 920 | 920 | |
| r7356 | r7357 | |
| 943 | 943 | ROM_LOAD( "24s10n.7h", 0x0500, 0x0100, CRC(c77d0077) SHA1(4cbbf625ad5e45d00ca6aebe9566538ff0a3348d) ) |
| 944 | 944 | ROM_END |
| 945 | 945 | |
| 946 | ROM_START( countrnb ) | |
| 946 | ROM_START( countrunb ) | |
| 947 | 947 | ROM_REGION( 0x10000, "maincpu", 0 ) /* Z80 Code */ |
| 948 | 948 | ROM_LOAD( "rom_cpu.bin", 0x00000, 0x10000, CRC(f65639ae) SHA1(faa81607858d49559098c887ac847722df955a76) ) |
| 949 | 949 | |
| r7356 | r7357 | |
| 1134 | 1134 | * Game driver(s) |
| 1135 | 1135 | * |
| 1136 | 1136 | *************************************/ |
| 1137 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */ | |
| 1138 | GAME( 1986, gigas, 0, gigas, gigas, gigas, ROT270, "Sega", "Gigas (MC-8123, 317-5002)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 1139 | GAME( 1986, gigasb, gigas, gigas, gigas, gigasb, ROT270, "bootleg", "Gigas (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 1140 | GAME( 1986, oigas, gigas , oigas, gigas, gigasb, ROT270, "bootleg", "Oigas (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 1141 | GAME( 1986, gigasm2b, 0, gigas, gigasm2, gigasb, ROT270, "bootleg", "Gigas Mark II (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 1142 | GAME( 1987, pbillrd, 0, pbillrd, pbillrd, 0, ROT0, "Nihon System", "Perfect Billiard", GAME_SUPPORTS_SAVE ) | |
| 1143 | GAME( 1987, pbillrds, pbillrd, pbillrd, pbillrd, pbillrds, ROT0, "Nihon System", "Perfect Billiard (MC-8123, 317-0030)", GAME_SUPPORTS_SAVE ) | |
| 1144 | GAME( 1987, freekick, 0, freekckb, freekck, 0, ROT270, "Nihon System (Sega license)", "Free Kick", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 1145 | GAME( 1987, freekckb, freekick, freekckb, freekck, 0, ROT270, "bootleg", "Free Kick (bootleg set 1)", GAME_SUPPORTS_SAVE ) | |
| 1146 | GAME( 1987, freekcb2, freekick, freekckb, freekck, 0, ROT270, "bootleg", "Free Kick (bootleg set 2)", GAME_SUPPORTS_SAVE ) | |
| 1147 | GAME( 1988, countrun, 0, freekckb, countrun, 0, ROT0, "Nihon System (Sega license)", "Counter Run", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 1148 | GAME( 1988, countrnb, countrun, freekckb, countrun, 0, ROT0, "bootleg", "Counter Run (bootleg set 1)", GAME_SUPPORTS_SAVE ) | |
| 1149 | GAME( 1988, countrb2, countrun, freekckb, countrun, 0, ROT0, "bootleg", "Counter Run (bootleg set 2)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 1137 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */ | |
| 1138 | GAME( 1986, gigas, 0, gigas, gigas, gigas, ROT270, "Sega", "Gigas (MC-8123, 317-5002)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 1139 | GAME( 1986, gigasb, gigas, gigas, gigas, gigasb, ROT270, "bootleg", "Gigas (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 1140 | GAME( 1986, oigas, gigas , oigas, gigas, gigasb, ROT270, "bootleg", "Oigas (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 1141 | GAME( 1986, gigasm2b, 0, gigas, gigasm2, gigasb, ROT270, "bootleg", "Gigas Mark II (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 1142 | GAME( 1987, pbillrd, 0, pbillrd, pbillrd, 0, ROT0, "Nihon System", "Perfect Billiard", GAME_SUPPORTS_SAVE ) | |
| 1143 | GAME( 1987, pbillrds, pbillrd, pbillrd, pbillrd, pbillrds, ROT0, "Nihon System", "Perfect Billiard (MC-8123, 317-0030)", GAME_SUPPORTS_SAVE ) | |
| 1144 | GAME( 1987, freekick, 0, freekickb, freekck, 0, ROT270, "Nihon System (Sega license)", "Free Kick", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 1145 | GAME( 1987, freekickb, freekick, freekickb, freekck, 0, ROT270, "bootleg", "Free Kick (bootleg set 1)", GAME_SUPPORTS_SAVE ) | |
| 1146 | GAME( 1987, freekickb2,freekick, freekickb, freekck, 0, ROT270, "bootleg", "Free Kick (bootleg set 2)", GAME_SUPPORTS_SAVE ) | |
| 1147 | GAME( 1988, countrun, 0, freekickb, countrun, 0, ROT0, "Nihon System (Sega license)", "Counter Run", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 1148 | GAME( 1988, countrunb, countrun, freekickb, countrun, 0, ROT0, "bootleg", "Counter Run (bootleg set 1)", GAME_SUPPORTS_SAVE ) | |
| 1149 | GAME( 1988, countrunb2,countrun, freekickb, countrun, 0, ROT0, "bootleg", "Counter Run (bootleg set 2)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 1150 | 1150 |
| r7356 | r7357 | |
|---|---|---|
| 39 | 39 | #include "cpu/m68000/m68000.h" |
| 40 | 40 | #include "sound/2612intf.h" |
| 41 | 41 | #include "sound/sn76496.h" |
| 42 | #include "includes/megadriv.h" | |
| 42 | 43 | |
| 43 | #include "megadriv.h" | |
| 44 | ||
| 45 | 44 | static INPUT_PORTS_START( hshavoc ) |
| 46 | 45 | PORT_START("IN0") /* 16bit */ |
| 47 | 46 | PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) ) |
| r0 | r7357 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | Neptune's Pearls (c) Unidesa? | |
| 4 | ||
| 5 | skeleton driver, can't do much without gfx roms anyway. | |
| 6 | ||
| 7 | ***************************************************************************/ | |
| 8 | ||
| 9 | #include "emu.h" | |
| 10 | #include "cpu/i86/i86.h" | |
| 11 | ||
| 12 | static VIDEO_START( neptunp2 ) | |
| 13 | { | |
| 14 | ||
| 15 | } | |
| 16 | ||
| 17 | static VIDEO_UPDATE( neptunp2 ) | |
| 18 | { | |
| 19 | return 0; | |
| 20 | } | |
| 21 | ||
| 22 | static READ8_HANDLER( test_r ) | |
| 23 | { | |
| 24 | return mame_rand(space->machine); | |
| 25 | } | |
| 26 | ||
| 27 | static ADDRESS_MAP_START( neptunp2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 28 | AM_RANGE(0x00000, 0xbffff) AM_ROM | |
| 29 | AM_RANGE(0xe0000, 0xeffff) AM_RAM | |
| 30 | ||
| 31 | AM_RANGE(0xd0000, 0xd7fff) AM_RAM //videoram | |
| 32 | AM_RANGE(0xdb004, 0xdb007) AM_RAM | |
| 33 | AM_RANGE(0xdb00c, 0xdb00f) AM_RAM | |
| 34 | ||
| 35 | AM_RANGE(0xff806, 0xff806) AM_READ(test_r) | |
| 36 | AM_RANGE(0xff810, 0xff810) AM_READ(test_r) | |
| 37 | AM_RANGE(0xff812, 0xff812) AM_READ(test_r) | |
| 38 | ||
| 39 | AM_RANGE(0xff980, 0xff980) AM_WRITENOP | |
| 40 | ||
| 41 | AM_RANGE(0xffff0, 0xfffff) AM_ROM | |
| 42 | ADDRESS_MAP_END | |
| 43 | ||
| 44 | static ADDRESS_MAP_START( neptunp2_io, ADDRESS_SPACE_IO, 8 ) | |
| 45 | ADDRESS_MAP_END | |
| 46 | ||
| 47 | ||
| 48 | static INPUT_PORTS_START( neptunp2 ) | |
| 49 | ||
| 50 | INPUT_PORTS_END | |
| 51 | ||
| 52 | #if 0 | |
| 53 | static const gfx_layout charlayout = | |
| 54 | { | |
| 55 | 8,8, /* 8*8 characters */ | |
| 56 | RGN_FRAC(1,3), /* 1024 characters */ | |
| 57 | 3, /* 3 bits per pixel */ | |
| 58 | { RGN_FRAC(1,3), RGN_FRAC(2,3), RGN_FRAC(0,3) }, /* the bitplanes are separated */ | |
| 59 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 60 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 61 | 8*8 /* every char takes 8 consecutive bytes */ | |
| 62 | }; | |
| 63 | #endif | |
| 64 | ||
| 65 | static GFXDECODE_START( neptunp2 ) | |
| 66 | // GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 8 ) | |
| 67 | GFXDECODE_END | |
| 68 | ||
| 69 | static MACHINE_DRIVER_START( neptunp2 ) | |
| 70 | ||
| 71 | /* basic machine hardware */ | |
| 72 | MDRV_CPU_ADD("maincpu",I80188,20000000) // N80C188-20 AMD | |
| 73 | MDRV_CPU_PROGRAM_MAP(neptunp2_map) | |
| 74 | MDRV_CPU_IO_MAP(neptunp2_io) | |
| 75 | // MDRV_CPU_VBLANK_INT("screen",irq0_line_hold) | |
| 76 | ||
| 77 | /* video hardware */ | |
| 78 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 79 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 80 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 81 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 82 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 83 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) | |
| 84 | MDRV_GFXDECODE(neptunp2) | |
| 85 | MDRV_PALETTE_LENGTH(512) | |
| 86 | ||
| 87 | MDRV_VIDEO_START(neptunp2) | |
| 88 | MDRV_VIDEO_UPDATE(neptunp2) | |
| 89 | ||
| 90 | /* sound hardware */ | |
| 91 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 92 | ||
| 93 | MACHINE_DRIVER_END | |
| 94 | ||
| 95 | /*************************************************************************** | |
| 96 | ||
| 97 | Game driver(s) | |
| 98 | ||
| 99 | ***************************************************************************/ | |
| 100 | ||
| 101 | ROM_START( neptunp2 ) | |
| 102 | ROM_REGION( 0x100000, "maincpu", 0 ) | |
| 103 | ROM_LOAD( "u2.bin", 0x000000, 0x100000, CRC(4fbb06d1) SHA1(6490cd3b96b3b61f48fcb843772bd787605ab76f) ) | |
| 104 | ||
| 105 | ROM_REGION( 0x100000, "prg_data", 0 ) //dunno how this maps ... | |
| 106 | ROM_LOAD( "u3.bin", 0x000000, 0x100000, CRC(3c1746e2) SHA1(a7fd59f5397ce1653848e15f16399b537f3a1ea7) ) | |
| 107 | ||
| 108 | ROM_REGION( 0x200000, "oki", 0 ) | |
| 109 | ROM_LOAD( "u14.bin", 0x000000, 0x100000, CRC(a2de1156) SHA1(58b325b720057e8d7105fe3a87ac2c0109afad84) ) | |
| 110 | ROM_LOAD( "u15.bin", 0x100000, 0x100000, CRC(8de6d4de) SHA1(121e7507ef57074bc7ad0bf69556f26c84c4e236) ) | |
| 111 | ||
| 112 | ROM_REGION( 0x10000, "gfx", 0 ) | |
| 113 | ROM_LOAD( "flash_roms", 0x00000, 0x10000, NO_DUMP ) | |
| 114 | ROM_END | |
| 115 | ||
| 116 | GAME( 199?, neptunp2, 0, neptunp2, neptunp2, 0, ROT0, "Unidesa?", "Neptune's Pearls 2", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| r7356 | r7357 | |
|---|---|---|
| 38 | 38 | **************************************************************************** |
| 39 | 39 | |
| 40 | 40 | Note : there is an ingame typo bug that doesn't display the bonus life values |
| 41 | correctly on the title screen in 'commando', 'commandj' and 'spaceinv'. | |
| 41 | correctly on the title screen in 'commando', 'commandoj' and 'spaceinv'. | |
| 42 | 42 | |
| 43 | 43 | ***************************************************************************/ |
| 44 | 44 | |
| r7356 | r7357 | |
| 155 | 155 | PORT_DIPSETTING( 0xc0, DEF_STR( Cocktail ) ) |
| 156 | 156 | INPUT_PORTS_END |
| 157 | 157 | |
| 158 | static INPUT_PORTS_START( commandu ) | |
| 158 | static INPUT_PORTS_START( commandou ) | |
| 159 | 159 | PORT_INCLUDE(commando) |
| 160 | 160 | |
| 161 | 161 | PORT_MODIFY("DSW2") |
| r7356 | r7357 | |
| 403 | 403 | |
| 404 | 404 | ROM_START( commandob ) |
| 405 | 405 | ROM_REGION( 2*0x10000, "maincpu", 0 ) /* 64k for code + 64k for decrypted opcodes */ |
| 406 | ROM_LOAD( "commandb_04_9m_27256.bin", 0x0000, 0x8000, CRC(348a7654) SHA1(f3668c47c154a9c7d7afeabb0259c9bc56e847ac) ) | |
| 406 | ROM_LOAD( "commandob_04_9m_27256.bin", 0x0000, 0x8000, CRC(348a7654) SHA1(f3668c47c154a9c7d7afeabb0259c9bc56e847ac) ) | |
| 407 | 407 | ROM_LOAD( "cm03.8m", 0x8000, 0x4000, CRC(35486542) SHA1(531a85c9e03970ce037be84f2240c2df6f6e3ec1) ) |
| 408 | 408 | |
| 409 | 409 | ROM_REGION( 0x10000, "audiocpu", 0 ) |
| r7356 | r7357 | |
| 442 | 442 | and the CPU1 (a Z80 compatible NEC D780C-1). This sub-board is plugged on what seems to be |
| 443 | 443 | a ROM socket. */ |
| 444 | 444 | ROM_REGION( 0x0200, "plds", 0 ) |
| 445 | ROM_LOAD( "commandb_pal16l8a.bin", 0x0000, 0x0104, NO_DUMP ) /* I Didn't try to dump it... */ | |
| 445 | ROM_LOAD( "commandob_pal16l8a.bin", 0x0000, 0x0104, NO_DUMP ) /* I Didn't try to dump it... */ | |
| 446 | 446 | ROM_END |
| 447 | 447 | |
| 448 | 448 | ROM_START( sinvasn ) |
| r7356 | r7357 | |
| 561 | 561 | /* Game Drivers */ |
| 562 | 562 | |
| 563 | 563 | GAME( 1985, commando, 0, commando, commando, commando, ROT270, "Capcom", "Commando (World)", GAME_SUPPORTS_SAVE ) |
| 564 | GAME( 1985, commandou, commando, commando, commandu, | |
| 564 | GAME( 1985, commandou, commando, commando, commandou, | |
| 565 | 565 | GAME( 1985, commandoj, commando, commando, commando, commando, ROT270, "Capcom", "Senjou no Ookami", GAME_SUPPORTS_SAVE ) |
| 566 | 566 | GAME( 1985, commandob, commando, commando, commando, spaceinv, ROT270, "bootleg", "Commando (bootleg)", GAME_SUPPORTS_SAVE ) |
| 567 | 567 | GAME( 1985, sinvasn, commando, commando, commando, commando, ROT270, "Capcom", "Space Invasion (Europe)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 519 | 519 | ROM_LOAD( "gg-pal10l8.bin", 0x0000, 0x002c, CRC(87f1b7e0) SHA1(b719c3be7bd4a02660bb0887f752e9769cbd37d2) ) |
| 520 | 520 | ROM_END |
| 521 | 521 | |
| 522 | ROM_START( gngc ) | |
| 523 | ROM_REGION( 0x18000, "maincpu", 0 ) | |
| 524 | ROM_LOAD( "mm_c_04", 0x04000, 0x4000, CRC(4f94130f) SHA1(6863fee3c97c76ba314ccbada7efacb6783e7d32) ) | |
| 525 | ROM_LOAD( "mm_c_03", 0x08000, 0x8000, CRC(1def138a) SHA1(d29e12082c4d5c06a9910b3500ef66242cdec905) ) | |
| 526 | ROM_LOAD( "mm_c_05", 0x10000, 0x8000, CRC(ed28e86e) SHA1(064871918547a56be330c6994d4db2c9932e14db) ) | |
| 527 | ||
| 528 | ROM_REGION( 0x10000, "audiocpu", 0 ) | |
| 529 | ROM_LOAD( "gg2.bin", 0x0000, 0x8000, CRC(615f5b6f) SHA1(7ef9ec5c2072e21c787a6bbf700033f50c759c1d) ) | |
| 530 | ||
| 531 | ROM_REGION( 0x04000, "gfx1", 0 ) | |
| 532 | ROM_LOAD( "gg1.bin", 0x00000, 0x4000, CRC(ecfccf07) SHA1(0a1518e19a2e0a4cc3dde4b9568202ea911b5ece) ) /* characters */ | |
| 533 | ||
| 534 | ROM_REGION( 0x18000, "gfx2", 0 ) | |
| 535 | ROM_LOAD( "gg11.bin", 0x00000, 0x4000, CRC(ddd56fa9) SHA1(f9d77eee5e2738b7e83ba02fcc55dd480391479f) ) /* tiles 0-1 Plane 1*/ | |
| 536 | ROM_LOAD( "gg10.bin", 0x04000, 0x4000, CRC(7302529d) SHA1(8434c994cc55d2586641f3b90b6b15fd65dfb67c) ) /* tiles 2-3 Plane 1*/ | |
| 537 | ROM_LOAD( "gg9.bin", 0x08000, 0x4000, CRC(20035bda) SHA1(bbb1fba0eb19471f66d29526fa8423ccb047bd63) ) /* tiles 0-1 Plane 2*/ | |
| 538 | ROM_LOAD( "gg8.bin", 0x0c000, 0x4000, CRC(f12ba271) SHA1(1c42fa02cb27b35d10c3f7f036005e747f9f6b79) ) /* tiles 2-3 Plane 2*/ | |
| 539 | ROM_LOAD( "gg7.bin", 0x10000, 0x4000, CRC(e525207d) SHA1(1947f159189b3a53f1251d8653b6e7c65c91fc3c) ) /* tiles 0-1 Plane 3*/ | |
| 540 | ROM_LOAD( "gg6.bin", 0x14000, 0x4000, CRC(2d77e9b2) SHA1(944da1ce29a18bf0fc8deff78bceacba0bf23a07) ) /* tiles 2-3 Plane 3*/ | |
| 541 | ||
| 542 | ROM_REGION( 0x20000, "gfx3", ROMREGION_ERASEFF ) | |
| 543 | ROM_LOAD( "gg17.bin", 0x00000, 0x4000, CRC(93e50a8f) SHA1(42d367f57bb2fdf60a0445ac1533da99cfeaa617) ) /* sprites 0 Plane 1-2 */ | |
| 544 | ROM_LOAD( "gg16.bin", 0x04000, 0x4000, CRC(06d7e5ca) SHA1(9e06012bcd82f98fad43de666ef9a75979d940ab) ) /* sprites 1 Plane 1-2 */ | |
| 545 | ROM_LOAD( "gg15.bin", 0x08000, 0x4000, CRC(bc1fe02d) SHA1(e3a1421d465b87148ffa94f5673b2307f0246afe) ) /* sprites 2 Plane 1-2 */ | |
| 546 | ROM_LOAD( "gg14.bin", 0x10000, 0x4000, CRC(6aaf12f9) SHA1(207a7407288182a4f3eddaea634c6a6452131182) ) /* sprites 0 Plane 3-4 */ | |
| 547 | ROM_LOAD( "gg13.bin", 0x14000, 0x4000, CRC(e80c3fca) SHA1(cb641c25bb04b970b2cbeca41adb792bbe142fb5) ) /* sprites 1 Plane 3-4 */ | |
| 548 | ROM_LOAD( "gg12.bin", 0x18000, 0x4000, CRC(7780a925) SHA1(3f129ca6d695548b659955fe538584bd9ac2ff17) ) /* sprites 2 Plane 3-4 */ | |
| 549 | ||
| 550 | ROM_REGION( 0x0200, "proms", 0 ) | |
| 551 | ROM_LOAD( "tbp24s10.14k", 0x0000, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */ | |
| 552 | ROM_LOAD( "63s141.2e", 0x0100, 0x0100, CRC(4a1285a4) SHA1(5018c3950b675af58db499e2883ecbc55419b491) ) /* priority (not used) */ | |
| 553 | ROM_END | |
| 554 | ||
| 555 | ||
| 522 | 556 | ROM_START( gngt ) |
| 523 | 557 | ROM_REGION( 0x18000, "maincpu", 0 ) |
| 524 | 558 | ROM_LOAD( "mm04", 0x04000, 0x4000, CRC(652406f6) SHA1(3b2bafd31f670ea26c568c48f3bd00597e5a2ed6) ) /* 4000-5fff is page 4 */ |
| r7356 | r7357 | |
| 699 | 733 | GAME( 1985, gnga, gng, gng, gng, 0, ROT0, "Capcom", "Ghosts'n Goblins (World? set 2)", GAME_SUPPORTS_SAVE ) |
| 700 | 734 | GAME( 1985, gngbl, gng, gng, gng, 0, ROT0, "Capcom", "Ghosts'n Goblins (bootleg with Cross)", GAME_SUPPORTS_SAVE ) |
| 701 | 735 | GAME( 1985, gngblita, gng, gng, gng, 0, ROT0, "Capcom", "Ghosts'n Goblins (Italian bootleg, harder)", GAME_SUPPORTS_SAVE ) |
| 736 | GAME( 1985, gngc, gng, gng, gng, 0, ROT0, "Capcom", "Ghosts'n Goblins (World? set 3)", GAME_SUPPORTS_SAVE ) // rev c? | |
| 702 | 737 | GAME( 1985, gngt, gng, gng, gng, 0, ROT0, "Capcom (Taito America license)", "Ghosts'n Goblins (US)", GAME_SUPPORTS_SAVE ) |
| 703 | 738 | GAME( 1985, makaimur, gng, gng, makaimur, 0, ROT0, "Capcom", "Makai-Mura (Japan)", GAME_SUPPORTS_SAVE ) |
| 704 | 739 | GAME( 1985, makaimurc, gng, gng, makaimur, 0, ROT0, "Capcom", "Makai-Mura (Japan Revision C)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 39 | 39 | You can enter 3 chars for your initials. |
| 40 | 40 | |
| 41 | 41 | |
| 42 | 2) 'gunsmokj' | |
| 42 | 2) 'gunsmokej' | |
| 43 | 43 | |
| 44 | 44 | - Japan version (but English text though). |
| 45 | 45 | You can enter 8 chars for your initials. |
| 46 | 46 | |
| 47 | 47 | |
| 48 | 3) 'gunsmoku' | |
| 48 | 3) 'gunsmokeu' | |
| 49 | 49 | |
| 50 | 50 | - US version licenced to Romstar. |
| 51 | 51 | You can enter 3 chars for your initials. |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 4) 'gunsmoka' | |
| 54 | 4) 'gunsmokeua' | |
| 55 | 55 | |
| 56 | 56 | - US version licenced to Romstar. |
| 57 | 57 | You can enter 3 chars for your initials. |
| r7356 | r7357 | |
| 209 | 209 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 210 | 210 | INPUT_PORTS_END |
| 211 | 211 | |
| 212 | static INPUT_PORTS_START( gunsmoka ) | |
| 212 | static INPUT_PORTS_START( gunsmokeua ) | |
| 213 | 213 | PORT_INCLUDE(gunsmoke) |
| 214 | 214 | |
| 215 | 215 | // Same as 'gunsmoke', but "Lives" Dip Switch instead of "Demonstration" Dip Switch |
| r7356 | r7357 | |
| 539 | 539 | |
| 540 | 540 | /* Game Drivers */ |
| 541 | 541 | |
| 542 | GAME( 1985, gunsmoke, 0, gunsmoke, gunsmoke, 0, ROT270, "Capcom", "Gun.Smoke (World)", GAME_SUPPORTS_SAVE ) | |
| 543 | GAME( 1985, gunsmokej, gunsmoke, gunsmoke, gunsmoke, 0, ROT270, "Capcom", "Gun.Smoke (Japan)", GAME_SUPPORTS_SAVE ) | |
| 544 | GAME( 1985, gunsmokeu, gunsmoke, gunsmoke, gunsmoke, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US set 1)", GAME_SUPPORTS_SAVE ) | |
| 545 | GAME( 1986, gunsmokeua, gunsmoke, gunsmoke, gunsmoka, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US set 2)", GAME_SUPPORTS_SAVE ) | |
| 542 | GAME( 1985, gunsmoke, 0, gunsmoke, gunsmoke, 0, ROT270, "Capcom", "Gun.Smoke (World)", GAME_SUPPORTS_SAVE ) | |
| 543 | GAME( 1985, gunsmokej, gunsmoke, gunsmoke, gunsmoke, 0, ROT270, "Capcom", "Gun.Smoke (Japan)", GAME_SUPPORTS_SAVE ) | |
| 544 | GAME( 1985, gunsmokeu, gunsmoke, gunsmoke, gunsmoke, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US set 1)", GAME_SUPPORTS_SAVE ) | |
| 545 | GAME( 1986, gunsmokeua,gunsmoke, gunsmoke, gunsmokeua,0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US set 2)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 1 | 1 | #include "emu.h" |
| 2 | #include "megadriv.h" | |
| 2 | #include "includes/megadriv.h" | |
| 3 | 3 | |
| 4 | 4 | ROM_START( ssf2ghw ) |
| 5 | 5 | ROM_REGION( 0x1400000, "maincpu", 0 ) /* 68000 Code */ |
| r7356 | r7357 | |
|---|---|---|
| 3066 | 3066 | |
| 3067 | 3067 | ROM_REGION( 0xb000000, "user1", ROMREGION_ERASEFF) |
| 3068 | 3068 | ROM_LOAD("epr-23377.ic11", 0x0000000, 0x0400000, CRC(4ca3149c) SHA1(9d25fc659658b416202b033754669be2f3abcdbe) ) |
| 3069 | /* ic1 empty? test mode reports a bad result. */ | |
| 3069 | /* Test mode returns IC1 as bad dump, it looks like that is data provided by the Actel A54SX32 FPGA present on board | |
| 3070 | and mirrored there. Provided as documentation until we know more about it. */ | |
| 3071 | ROM_LOAD("gram2000.ic1", 0x0800000, 0x0800000, CRC(4a86556a) SHA1(61100dc84c95dd47d9f61c7cc52ea25579b90632) ) | |
| 3070 | 3072 | ROM_LOAD32_WORD("mpr-23357.ic17", 0x1000000, 0x0800000, CRC(eaf77487) SHA1(bdfc4666a6724441c11b31d89fa30c4bd11cbdd1) ) //ic 2 |
| 3071 | 3073 | ROM_LOAD32_WORD("mpr-23358.ic18", 0x1000002, 0x0800000, CRC(96819a5b) SHA1(e28c9d7b0579ab5d6116401b49f30dc8e4961618) ) //ic 3 |
| 3072 | 3074 | ROM_LOAD32_WORD("mpr-23359.ic19", 0x2000000, 0x0800000, CRC(757b9e89) SHA1(b131af1cbcb4fcebb7081b208acc86841192ff14) ) //ic 4 |
| r7356 | r7357 | |
| 3089 | 3091 | ROM_LOAD32_WORD("mpr-23376.ic36", 0xa000002, 0x0800000, CRC(e09cb473) SHA1(c3ec980f1a56142a0e06bae9594d6038acf0690d) ) //ic 21 |
| 3090 | 3092 | ROM_END |
| 3091 | 3093 | |
| 3094 | ROM_START( crackndj ) | |
| 3095 | ROM_REGION( 0x200000, "maincpu", 0) | |
| 3096 | NAOMI_BIOS | |
| 3097 | NAOMI_DEFAULT_EEPROM | |
| 3098 | ||
| 3099 | ROM_REGION( 0xa800000, "user1", ROMREGION_ERASEFF) | |
| 3100 | ROM_LOAD( "epr-23450.ic22", 0x0000000, 0x400000, CRC(ba0ee505) SHA1(7777f532ace9032a25fc949316c07bd70dd03851) ) | |
| 3101 | ROM_LOAD( "mpr-23525.ic1", 0x0800000, 0x1000000, CRC(01996526) SHA1(1080305424989593e606f8195d295e0fb822ae43) ) | |
| 3102 | ROM_LOAD( "mpr-23526.ic2", 0x1800000, 0x1000000, CRC(d7a0d52e) SHA1(64a03c6da70c64fc62dbb0f9a4b0fb35de59c72f) ) | |
| 3103 | ROM_LOAD( "mpr-23527.ic3", 0x2800000, 0x1000000, CRC(9361afd9) SHA1(fee55341b623cc1928d8f95acd53e20759db725f) ) | |
| 3104 | ROM_LOAD( "mpr-23528.ic4", 0x3800000, 0x1000000, CRC(e40b7970) SHA1(6467463994f2b4535f822357ff2c8ca2dd4450c8) ) | |
| 3105 | ROM_LOAD( "mpr-23529.ic5", 0x4800000, 0x1000000, CRC(5920e6e5) SHA1(eec207dba99ca541f2abc98674e8dcaef506af3b) ) | |
| 3106 | ROM_LOAD( "mpr-23530.ic6", 0x5800000, 0x1000000, CRC(2bb0aefc) SHA1(8e5e90a4b8780411a41f14f1ca16dd049aefcd4b) ) | |
| 3107 | ROM_LOAD( "mpr-23531.ic7", 0x6800000, 0x1000000, CRC(43592459) SHA1(1b69ce3c54ad2c054ea72547afba6ef55a2daf63) ) | |
| 3108 | ROM_LOAD( "mpr-23532.ic8", 0x7800000, 0x1000000, CRC(bbcddeee) SHA1(8649da1411e404953d5ebd4e459d407eb79b61b1) ) | |
| 3109 | ROM_LOAD( "mpr-23533.ic9", 0x8800000, 0x1000000, CRC(fc909c00) SHA1(9cf22a97ea272c4586f3942aefdb803bd0e6ede7) ) | |
| 3110 | ROM_LOAD( "mpr-23534.ic10", 0x9800000, 0x1000000, CRC(62ed85b6) SHA1(b88336bc6115c92a839981cb0c0d0a67b1f7eda5) ) | |
| 3111 | ROM_END | |
| 3112 | ||
| 3092 | 3113 | /* |
| 3093 | 3114 | SYSTEMID: NAOMI |
| 3094 | 3115 | JAP: GUILTY GEAR X |
| r7356 | r7357 | |
| 4543 | 4564 | /* Complete Dumps */ |
| 4544 | 4565 | /* 840-xxxxx (Sega games)*/ |
| 4545 | 4566 | /* 0001C */ GAME( 1998, dybbnao, naomi, naomi, naomi, naomi, ROT0, "Sega", "Dynamite Baseball NAOMI (JPN)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4567 | /* 0002C */ GAME( 1999, crzytaxi, naomi, naomi, naomi, naomi, ROT0, "Sega", "Crazy Taxi (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4546 | 4568 | /* 0003C */ GAME( 1999, zombrvn, naomi, naomi, naomi, naomi, ROT0, "Sega", "Zombie Revenge (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4547 | 4569 | /* 0007C */ GAME( 1999, ggram2, naomi, naomi, naomi, naomi, ROT0, "Sega", "Giant Gram (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4548 | 4570 | /* 0010C */ GAME( 1999, vs2_2k, naomi, naomi, naomi, naomi, ROT0, "Sega", "Virtua Striker 2 Ver. 2000 (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4549 | 4571 | /* 0011C */ GAME( 1999, toyfight, naomi, naomi, naomi, naomi, ROT0, "Sega", "Toy Fighter", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4572 | /* 0013C */ GAME( 1999, jambo, naomi, naomi, naomi, naomi, ROT0, "Sega", "Jambo! Safari (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4550 | 4573 | /* 0015C */ GAME( 1999, vtennis, naomi, naomi, naomi, naomi, ROT0, "Sega", "Power Smash (JPN) / Virtua Tennis (USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4551 | /* ????? */ GAME( 1999, sgtetris, naomi, naomi, naomi, naomi, ROT0, "Sega", "Sega Tetris", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4552 | 4574 | /* 0016C */ GAME( 1999, derbyoc, naomi, naomi, naomi, naomi, ROT0, "Sega", "Derby Owners Club (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4553 | 4575 | /* 0017C */ GAME( 1999, otrigger, naomi, naomi, naomi, naomi, ROT0, "Sega", "OutTrigger (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4576 | /* 0018C */ GAME( 1999, sgtetris, naomi, naomi, naomi, naomi, ROT0, "Sega", "Sega Tetris", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4554 | 4577 | /* 0019C */ GAME( 1999, dybb99, naomi, naomi, naomi, naomi, ROT0, "Sega", "Dynamite Baseball '99 (JPN) / World Series '99 (USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4555 | 4578 | /* 00??C */ GAME( 1999, smlg99, naomi, naomi, naomi, naomi, ROT0, "Sega", "Super Major League '99", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4556 | 4579 | /* 0020C */ GAME( 1999, samba, naomi, naomi, naomi, naomi, ROT0, "Sega", "Samba De Amigo (JPN)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4557 | /* 0083C */ GAME( 1999, derbyoc2, naomi, naomi, naomi, naomi, ROT0, "Sega", "Derby Owners Club II (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4558 | /* ????? */ GAME( 1999, crzytaxi, naomi, naomi, naomi, naomi, ROT0, "Sega", "Crazy Taxi (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4559 | /* ????? */ GAME( 1999, jambo, naomi, naomi, naomi, naomi, ROT0, "Sega", "Jambo! Safari (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4560 | 4580 | /* 0021C */ GAME( 2000, virnba, naomi, naomi, naomi, naomi, ROT0, "Sega", "Virtua NBA (JPN, USA, EXP, KOR, AUS)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4561 | 4581 | /* 0021C */ GAME( 2000, virnbao, virnba, naomi, naomi, naomi, ROT0, "Sega", "Virtua NBA (JPN, USA, EXP, KOR, AUS) (original)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4562 | 4582 | /* 0026C */ GAME( 2000, totd, naomi, naomi, naomi, naomi, ROT0, "Sega", "The Typing of the Dead (JPN, USA, EXP, KOR, AUS)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4563 | /* ????? */ GAME( 2000, 18wheelr, naomi, naomi, naomi, naomi, ROT0, "Sega", "18 Wheeler (JPN)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4564 | 4583 | /* 0027C */ GAME( 2000, smarinef, naomi, naomi, naomi, naomi, ROT0, "Sega", "Sega Marine Fishing", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4565 | /* 0030C */ GAME( 2000, qmegamis, naomi, naomi, naomi, naomi, ROT0, "Sega", "Quiz Ah Megamisama (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4566 | /* 0039C */ GAME( 2000, gram2000, naomi, naomi, naomi, naomi, ROT0, "Sega", "Giant Gram 2000 (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4584 | /* 0030C */ GAME( 2000, qmegamis, naomi, naomi, naomi, qmegamis, ROT0, "Sega", "Quiz Ah Megamisama (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4585 | /* 0037C */ GAME( 2000, 18wheelr, naomi, naomi, naomi, naomi, ROT0, "Sega", "18 Wheeler (JPN)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4586 | /* 0039C */ GAME( 2000, gram2000, naomi, naomi, naomi, gram2000, ROT0, "Sega", "Giant Gram 2000 (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4567 | 4587 | /* 0040C */ GAME( 2000, wwfroyal, naomi, naomi, naomi, naomi, ROT0, "Sega", "WWF Royal Rumble (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4568 | 4588 | /* 0041C */ GAME( 2000, slasho, naomi, naomi, naomi, naomi, ROT0, "Sega", "Slashout (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4589 | /* 0043C */ GAME( 2000, crackndj, naomi, naomi, naomi, naomi, ROT0, "Sega", "Crackin' DJ", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4569 | 4590 | /* 0044C */ GAME( 2001, csmash, naomi, naomi, naomi, naomi, ROT0, "Sega", "Cosmic Smash (JPN, USA, EXP, KOR, AUS) (rev. A)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4570 | 4591 | /* 0044C */ GAME( 2001, csmasho, csmash, naomi, naomi, naomi, ROT0, "Sega", "Cosmic Smash (JPN, USA, EXP, KOR, AUS) (original)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4592 | /* 0083C */ GAME( 2001, derbyoc2, naomi, naomi, naomi, naomi, ROT0, "Sega", "Derby Owners Club II (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4593 | /* 0084C */ GAME( 2001, vtenis2c, naomi, naomi, naomi, naomi, ROT0, "Sega", "Power Smash 2 / Virtua Tennis 2 (cartridge)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4594 | /* 0098C */ GAME( 2001, shootopl, naomi, naomi, naomi, naomi, ROT0, "Sega", "Shootout Pool", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4571 | 4595 | /* 0128C */ GAME( 2001, shootpl, naomi, naomi, naomi, naomi, ROT0, "Sega", "Shootout Pool (JPN, USA, KOR, AUS) / Shootout Pool Prize (EXP)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4572 | /* 0???? */ GAME( 2001, shootopl, naomi, naomi, naomi, naomi, ROT0, "Sega", "Shootout Pool", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4573 | /* 0???? */ GAME( 2001, vtenis2c, naomi, naomi, naomi, naomi, ROT0, "Sega", "Power Smash 2 / Virtua Tennis 2 (cartridge)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4574 | 4596 | |
| 4575 | 4597 | /* 841-xxxxx ("Licensed by Sega" games)*/ |
| 4576 | 4598 | /* 0001C */ GAME( 1999, pstone, naomi, naomi, naomi, naomi, ROT0, "Capcom", "Power Stone (JPN, USA, EUR, ASI, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| r7356 | r7357 | |
| 4579 | 4601 | /* 0003C */ GAME( 2000, doa2m, doa2, naomi, naomi, naomi, ROT0, "Tecmo", "Dead or Alive 2 Millennium (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4580 | 4602 | /* 0004C */ GAME( 1999, shangril, naomi, naomi, naomi_mp, naomi_mp, ROT0, "Marvelous Ent.", "Dengen Tenshi Taisen Janshi Shangri-la (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4581 | 4603 | /* 0005C */ GAME( 1999, spawn, naomi, naomi, naomi, naomi, ROT0, "Capcom", "Spawn (JPN, USA, EUR, ASI, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4582 | /* 0007C */ GAME( 2000, mvsc2, naomi, naomi, naomi, | |
| 4604 | /* 0007C */ GAME( 2000, mvsc2, naomi, naomi, naomi, | |
| 4583 | 4605 | /* 0008C */ GAME( 2000, pstone2, naomi, naomi, naomi, naomi, ROT0, "Capcom", "Power Stone 2 (JPN, USA, EUR, ASI, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4584 | 4606 | /* 0011C */ GAME( 2000, capsnk, naomi, naomi, naomi, naomi, ROT0, "Capcom / SNK", "Capcom Vs. SNK Millennium Fight 2000 (000904 JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4585 | 4607 | /* 0011C */ GAME( 2000, capsnka, capsnk, naomi, naomi, naomi, ROT0, "Capcom / SNK", "Capcom Vs. SNK Millennium Fight 2000 (000804 JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| r7356 | r7357 | |
| 5983 | 6005 | GAME( 2001, vstrik3c, naomi2, naomi, naomi, 0, ROT0, "Sega", "Virtua Striker 3 (Cart) (USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 5984 | 6006 | GAME( 2001, wldrider, naomi2, naomi, naomi, 0, ROT0, "Sega", "Wild Riders (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 5985 | 6007 | GAME( 2001, vf4cart, naomi2, naomi, naomi, 0, ROT0, "Sega", "Virtua Fighter 4 (Cartridge)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 5986 | GAME( 2001, vf4evoct, naomi2, naomi, naomi, | |
| 6008 | GAME( 2001, vf4evoct, naomi2, naomi, naomi, vf4evoct, ROT0, "Sega", "Virtua Fighter 4 Evolution (Cartridge)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 5987 | 6009 | GAME( 2002, clubkrte, naomi2, naomi, naomi, 0, ROT0, "Sega", "Club Kart: European Session", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 5988 | 6010 | |
| 5989 | 6011 | /* GDS-xxxx (Sega first party games) */ |
| r7356 | r7357 | |
|---|---|---|
| 358 | 358 | INPUT_PORTS_END |
| 359 | 359 | |
| 360 | 360 | |
| 361 | static INPUT_PORTS_START( asteroib ) | |
| 361 | static INPUT_PORTS_START( asteroidb ) | |
| 362 | 362 | PORT_INCLUDE( asteroid ) |
| 363 | 363 | |
| 364 | 364 | PORT_MODIFY("IN0") |
| r7356 | r7357 | |
| 920 | 920 | * |
| 921 | 921 | *************************************/ |
| 922 | 922 | |
| 923 | static DRIVER_INIT( asteroib ) | |
| 923 | static DRIVER_INIT( asteroidb ) | |
| 924 | 924 | { |
| 925 | 925 | memory_install_read_port(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2000, 0x2000, 0, 0, "IN0"); |
| 926 | 926 | memory_install_read_port(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2003, 0x2003, 0, 0, "HS"); |
| r7356 | r7357 | |
| 943 | 943 | GAME( 1979, asteroid, 0, asteroid, asteroid, 0, ROT0, "Atari", "Asteroids (rev 4)", GAME_SUPPORTS_SAVE ) |
| 944 | 944 | GAME( 1979, asteroid2,asteroid, asteroid, asteroid, 0, ROT0, "Atari", "Asteroids (rev 2)", GAME_SUPPORTS_SAVE ) |
| 945 | 945 | GAME( 1979, asteroid1,asteroid, asteroid, asteroid, 0, ROT0, "Atari", "Asteroids (rev 1)", GAME_SUPPORTS_SAVE ) |
| 946 | GAME( 1979, asteroidb,asteroid, asteroid, asteroib, | |
| 946 | GAME( 1979, asteroidb,asteroid, asteroid, asteroidb, | |
| 947 | 947 | GAME( 1979, asterock, asteroid, asterock, asterock, asterock, ROT0, "Sidam", "Asterock", GAME_SUPPORTS_SAVE ) |
| 948 | 948 | GAME( 1979, meteorts, asteroid, asteroid, asteroid, 0, ROT0, "VGG", "Meteorites", GAME_SUPPORTS_SAVE ) |
| 949 | 949 | GAME( 1980, meteorho, asteroid, asteroid, asteroid, 0, ROT0, "Hoei", "Meteor", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 92 | 92 | #include "sound/sn76496.h" |
| 93 | 93 | #include "rendlay.h" |
| 94 | 94 | |
| 95 | #include "segamsys.h" | |
| 96 | #include "megadriv.h" | |
| 95 | #include "includes/segamsys.h" | |
| 96 | #include "includes/megadriv.h" | |
| 97 | 97 | |
| 98 | 98 | static struct _mtech_bios mtech_bios; |
| 99 | 99 |
| r7356 | r7357 | |
|---|---|---|
| 19 | 19 | Mission Craft (c) 2000 Sun (version 2.4) |
| 20 | 20 | Final Godori (c) 2001 SemiCom (version 2.20.5915) |
| 21 | 21 | Wyvern Wings (c) 2001 SemiCom |
| 22 | Mr. Kicker (c) 2001 SemiCom | |
| 22 | 23 | Age Of Heroes - Silkroad 2 (c) 2001 Unico (v0.63 - 2001/02/07) |
| 23 | 24 | |
| 24 | 25 | Real games bugs: |
| r7356 | r7357 | |
| 1269 | 1270 | +---------------------------------------------+ |
| 1270 | 1271 | | +------+ | |
| 1271 | 1272 | | YM3012 | U7 | | |
| 1272 | | | |
| 1273 | | VR1 +------+ | | |
| 1273 | 1274 | | YM2151 M6295 | |
| 1274 | 1275 | | | |
| 1275 | 1276 | | +-----+ MEM1l +----------+ | |
| r7356 | r7357 | |
| 1296 | 1297 | ROM1 & U7 are 27C040 |
| 1297 | 1298 | ROML00 & ROMH00 are MX 29F1610MC flashroms |
| 1298 | 1299 | ROM0, ROML01 & ROMH01 are unpopulated |
| 1299 | YM2151, YM3012 & M6295 badged as BS901, BS902 U6295 | |
| 1300 | YM2151, YM3012 & M6295 badged as BS901, BS902 & U6295 | |
| 1300 | 1301 | CRAM are MCM6206BAEJ15 |
| 1301 | 1302 | DRAM are KM416C1204AJ-6 |
| 1302 | 1303 | MEM are MCM6206BAEJ15 |
| r7356 | r7357 | |
| 1304 | 1305 | |
| 1305 | 1306 | SW1 is the reset button |
| 1306 | 1307 | SW2 is the setup button |
| 1308 | VR1 is the volume adjust pot | |
| 1307 | 1309 | |
| 1308 | 1310 | */ |
| 1309 | 1311 | |
| r7356 | r7357 | |
| 1335 | 1337 | ROM_END |
| 1336 | 1338 | |
| 1337 | 1339 | /* |
| 1340 | ||
| 1341 | Mr. Kicker (c) SemiCom | |
| 1342 | ||
| 1343 | SEMICOM-003b | |
| 1344 | ||
| 1345 | +---------------------------------------------+ | |
| 1346 | | +------+ | | |
| 1347 | | YM3012 | U7 | | | |
| 1348 | | VR1 +------+ | | |
| 1349 | | YM2151 M6295 | | |
| 1350 | | | | |
| 1351 | | +-----+ MEM1l +----------+ | | |
| 1352 | | |CRAM2| |QuickLogic| | | |
| 1353 | | +-----+ | QL12X16B | | | |
| 1354 | | +-----+ | XPL84C | | | |
| 1355 | | +-------+ |CRAM2| MEM1U | | | | |
| 1356 | |J | DRAM1 | +-----+ +----------+ | | |
| 1357 | |A +-------+ +----------+ MEM3 | | |
| 1358 | |M +-------+ | | +----------+ | | |
| 1359 | |M | DRAM2 | |HyperStone| MEM7 |QuickLogic| | | |
| 1360 | |A +-------+ | E1-32T | | QL12X16B | | | |
| 1361 | | | | MEM6 | XPL84C | | | |
| 1362 | | PAL +----------+ | | | | |
| 1363 | | MEM2 +----------+ | | |
| 1364 | |SW1 SW2 61L256S | | |
| 1365 | | ROM0* +--------+ +--------+ 28MHz | | |
| 1366 | | ROM1 | ROML00 | | ROMH00 | +-----+| | |
| 1367 | | +--------+ +--------+ |93C46|| | |
| 1368 | | 50MHz ROML01* ROMH01* +-----+| | |
| 1369 | | | | |
| 1370 | +---------------------------------------------+ | |
| 1371 | ||
| 1372 | ROM1 & U7 are 27C040 | |
| 1373 | ROML00 & ROMH00 are MX 29F1610MC flashroms | |
| 1374 | ROM0, ROML01 & ROMH01 are unpopulated | |
| 1375 | YM2151, YM3012 & M6295 badged as U6651, U6612 & AD-65 | |
| 1376 | CRAM are MCM6206BAEJ15 | |
| 1377 | DRAM are KM416C1204AJ-6 | |
| 1378 | MEM are MCM6206BAEJ15 | |
| 1379 | 61L256S - 32K x 8 bit High Speed CMOS SRAM (game's so called "Backup Data") | |
| 1380 | ||
| 1381 | SW1 is the reset button | |
| 1382 | SW2 is the setup button | |
| 1383 | VR1 is the volume adjust pot | |
| 1384 | ||
| 1385 | */ | |
| 1386 | ||
| 1387 | ROM_START( mrkicker ) | |
| 1388 | ROM_REGION32_BE( 0x100000, "user1", ROMREGION_ERASE00 ) /* Hyperstone CPU Code */ | |
| 1389 | /* rom0 empty */ | |
| 1390 | ROM_LOAD( "2-semicom.rom1", 0x080000, 0x080000, CRC(d3da29ca) SHA1(b843c650096a1c6d50f99e354ec0c93eb4406c5b) ) | |
| 1391 | ||
| 1392 | ROM_REGION( 0x800000, "gfx1", 0 ) /* gfx data */ | |
| 1393 | ROM_LOAD32_WORD( "roml00", 0x000000, 0x200000, CRC(c677aac3) SHA1(356073a29260e8e6c29dd12b2113b30140c6108c) ) | |
| 1394 | ROM_LOAD32_WORD( "romh00", 0x000002, 0x200000, CRC(b6337d4a) SHA1(2f46e2933af7fd0f71083900d5e6e4f602ab4c66) ) | |
| 1395 | /* roml01 empty */ | |
| 1396 | /* romh01 empty */ | |
| 1397 | ||
| 1398 | ROM_REGION( 0x080000, "user2", 0 ) /* Oki Samples */ | |
| 1399 | ROM_LOAD( "at27c040.u7", 0x000000, 0x080000, CRC(e8141fcd) SHA1(256fd1987030e0a1df0a66a228c1fea996cda686) ) /* Mask ROM */ | |
| 1400 | ||
| 1401 | /* $00000-$20000 stays the same in all sound banks, */ | |
| 1402 | /* the second half of the bank is what gets switched */ | |
| 1403 | ROM_REGION( 0x100000, "oki", 0 ) /* Samples */ | |
| 1404 | ROM_COPY( "user2", 0x000000, 0x000000, 0x020000) | |
| 1405 | ROM_COPY( "user2", 0x000000, 0x020000, 0x020000) | |
| 1406 | ROM_COPY( "user2", 0x000000, 0x040000, 0x020000) | |
| 1407 | ROM_COPY( "user2", 0x020000, 0x060000, 0x020000) | |
| 1408 | ROM_COPY( "user2", 0x000000, 0x080000, 0x020000) | |
| 1409 | ROM_COPY( "user2", 0x040000, 0x0a0000, 0x020000) | |
| 1410 | ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000) | |
| 1411 | ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000) | |
| 1412 | ROM_END | |
| 1413 | ||
| 1414 | /* | |
| 1338 | 1415 | Age Of Heroes - Silkroad 2 |
| 1339 | 1416 | Unico, 2001 |
| 1340 | 1417 | |
| r7356 | r7357 | |
| 1682 | 1759 | semicom_prot_data[1] = 3; |
| 1683 | 1760 | } |
| 1684 | 1761 | |
| 1762 | static DRIVER_INIT( mrkicker ) | |
| 1763 | { | |
| 1764 | finalgdr_backupram_bank = 1; | |
| 1765 | finalgdr_backupram = auto_alloc_array(machine, UINT8, 0x80*0x100); | |
| 1766 | // memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x005e874, 0x005e877, 0, 0, mrkicker_speedup_r ); | |
| 1767 | ||
| 1768 | palshift = 0; | |
| 1769 | flip_bit = 1; //? | |
| 1770 | ||
| 1771 | semicom_prot_idx = 8; | |
| 1772 | semicom_prot_data[0] = 2; | |
| 1773 | semicom_prot_data[1] = 3; | |
| 1774 | } | |
| 1775 | ||
| 1685 | 1776 | static DRIVER_INIT( dquizgo2 ) |
| 1686 | 1777 | { |
| 1687 | 1778 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x00cde70, 0x00cde73, 0, 0, dquizgo2_speedup_r ); |
| r7356 | r7357 | |
| 1717 | 1808 | GAME( 2000, dquizgo2, 0, coolmini, common, dquizgo2, ROT0, "SemiCom", "Date Quiz Go Go Episode 2" , 0) |
| 1718 | 1809 | GAME( 2000, misncrft, 0, misncrft, common, misncrft, ROT90, "Sun", "Mission Craft (version 2.4)", GAME_NO_SOUND ) |
| 1719 | 1810 | GAME( 2001, finalgdr, 0, finalgdr, finalgdr, finalgdr, ROT0, "SemiCom", "Final Godori (Korea, version 2.20.5915)", 0 ) |
| 1811 | GAME( 2001, mrkicker, 0, finalgdr, finalgdr, mrkicker, ROT0, "SemiCom", "Mr. Kicker", 0 ) | |
| 1720 | 1812 | GAME( 2001, wyvernwg, 0, wyvernwg, common, wyvernwg, ROT270, "SemiCom (Game Vision License)", "Wyvern Wings", GAME_NO_SOUND ) |
| 1721 | 1813 | GAME( 2001, aoh, 0, aoh, aoh, aoh, ROT0, "Unico", "Age Of Heroes - Silkroad 2 (v0.63 - 2001/02/07)", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 526 | 526 | ROM_END |
| 527 | 527 | |
| 528 | 528 | |
| 529 | GAME( 1996, bishi, 0, bishi, bishi, 0, ROT0, "Konami", "Bishi Bashi Championship Mini Game Senshuken (ver JAA, 3 Players)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 529 | GAME( 1996, bishi, 0, bishi, bishi, 0, ROT0, "Konami", "Bishi Bashi Championship Mini Game Senshuken (ver JAA, 3 Players)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 530 | 530 | GAME( 1998, sbishi, 0, bishi, bishi2p, 0, ROT0, "Konami", "Super Bishi Bashi Championship (ver JAA, 2 Players)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 531 | GAME( 1998, sbishik, sbishi, bishi, bishi, 0, ROT0, "Konami", "Super Bishi Bashi Championship (ver KAA, 3 Players)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 531 | GAME( 1998, sbishik, sbishi, bishi, bishi, 0, ROT0, "Konami", "Super Bishi Bashi Championship (ver KAA, 3 Players)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | /************************* Alternate board set ************************/ |
| 83 | 83 | |
| 84 | static ADDRESS_MAP_START( alt_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 84 | static ADDRESS_MAP_START( alt_main_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 85 | 85 | AM_RANGE(0x00000, 0x06fff) AM_RAM |
| 86 | 86 | AM_RANGE(0x07000, 0x07fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) |
| 87 | 87 | AM_RANGE(0x08000, 0x08fff) AM_RAM AM_SHARE("share1") AM_BASE(&raiden_shared_ram) |
| r7356 | r7357 | |
| 96 | 96 | |
| 97 | 97 | /******************************************************************************/ |
| 98 | 98 | |
| 99 | static ADDRESS_MAP_START( raidenu_main_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 100 | AM_RANGE(0x00000, 0x06fff) AM_RAM | |
| 101 | AM_RANGE(0x07000, 0x07fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) | |
| 102 | AM_RANGE(0x08000, 0x08035) AM_WRITEONLY AM_BASE(&raiden_scroll_ram) | |
| 103 | AM_RANGE(0x0a000, 0x0afff) AM_RAM AM_SHARE("share1") AM_BASE(&raiden_shared_ram) | |
| 104 | AM_RANGE(0x0b000, 0x0b001) AM_READ_PORT("P1_P2") | |
| 105 | AM_RANGE(0x0b002, 0x0b003) AM_READ_PORT("DSW") | |
| 106 | AM_RANGE(0x0b000, 0x0b007) AM_WRITE(raidena_control_w) | |
| 107 | AM_RANGE(0x0c000, 0x0c7ff) AM_WRITE(raiden_text_w) AM_BASE_GENERIC(videoram) | |
| 108 | AM_RANGE(0x0d000, 0x0d00d) AM_READWRITE(seibu_main_word_r, seibu_main_word_w) | |
| 109 | AM_RANGE(0xa0000, 0xfffff) AM_ROM | |
| 110 | ADDRESS_MAP_END | |
| 111 | ||
| 112 | ||
| 113 | static ADDRESS_MAP_START( raidenu_sub_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 114 | AM_RANGE(0x00000, 0x05fff) AM_RAM | |
| 115 | AM_RANGE(0x06000, 0x067ff) AM_RAM_WRITE(raiden_background_w) AM_BASE(&raiden_back_data) | |
| 116 | AM_RANGE(0x06800, 0x06fff) AM_RAM_WRITE(raiden_foreground_w) AM_BASE(&raiden_fore_data) | |
| 117 | AM_RANGE(0x07000, 0x07fff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE_GENERIC(paletteram) | |
| 118 | AM_RANGE(0x08000, 0x08fff) AM_RAM AM_SHARE("share1") | |
| 119 | //AM_RANGE(0x07ffe, 0x0afff) AM_WRITENOP | |
| 120 | AM_RANGE(0xc0000, 0xfffff) AM_ROM | |
| 121 | ADDRESS_MAP_END | |
| 122 | ||
| 123 | /*****************************************************************************/ | |
| 124 | ||
| 99 | 125 | static INPUT_PORTS_START( raiden ) |
| 100 | 126 | SEIBU_COIN_INPUTS /* coin inputs read through sound cpu */ |
| 101 | 127 | |
| r7356 | r7357 | |
| 270 | 296 | SEIBU_SOUND_SYSTEM_YM3812_RAIDEN_INTERFACE(XTAL_14_31818MHz/4,XTAL_12MHz/12) // frequency and pin 7 verified (pin set in audio\seibu.h) |
| 271 | 297 | MACHINE_DRIVER_END |
| 272 | 298 | |
| 273 | ||
| 274 | 299 | static MACHINE_DRIVER_START( raidena ) |
| 275 | 300 | |
| 276 | /* basic machine hardware */ | |
| 277 | MDRV_CPU_ADD("maincpu", V30,XTAL_20MHz/2) /* NEC V30 CPU, 20MHz verified on pcb */ | |
| 278 | MDRV_CPU_PROGRAM_MAP(alt_map) | |
| 279 | MDRV_CPU_VBLANK_INT("screen", raiden_interrupt) | |
| 301 | MDRV_IMPORT_FROM( raiden ) | |
| 302 | MDRV_CPU_MODIFY("maincpu") | |
| 303 | MDRV_CPU_PROGRAM_MAP(alt_main_map) | |
| 280 | 304 | |
| 281 | MDRV_CPU_ADD("sub", V30,XTAL_20MHz/2) /* NEC V30 CPU, 20MHz verified on pcb */ | |
| 282 | MDRV_CPU_PROGRAM_MAP(sub_map) | |
| 283 | MDRV_CPU_VBLANK_INT("screen", raiden_interrupt) | |
| 305 | MDRV_VIDEO_START(raidena) | |
| 306 | MACHINE_DRIVER_END | |
| 284 | 307 | |
| 285 | SEIBU_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) /* verified on pcb */ | |
| 308 | static MACHINE_DRIVER_START( raidenu ) | |
| 309 | MDRV_IMPORT_FROM( raiden ) | |
| 286 | 310 | |
| 287 | MDRV_QUANTUM_TIME(HZ(7200)) | |
| 311 | MDRV_CPU_MODIFY("maincpu") | |
| 312 | MDRV_CPU_PROGRAM_MAP(raidenu_main_map) | |
| 288 | 313 | |
| 289 | MDRV_MACHINE_RESET(seibu_sound) | |
| 314 | MDRV_CPU_MODIFY("sub") | |
| 315 | MDRV_CPU_PROGRAM_MAP(raidenu_sub_map) | |
| 290 | 316 | |
| 291 | /* video hardware */ | |
| 292 | MDRV_VIDEO_ATTRIBUTES(VIDEO_BUFFERS_SPRITERAM) | |
| 293 | ||
| 294 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 295 | MDRV_SCREEN_REFRESH_RATE(59.60) /* verified on pcb */ | |
| 296 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) | |
| 297 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 298 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 299 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) | |
| 300 | ||
| 301 | MDRV_GFXDECODE(raiden) | |
| 302 | MDRV_PALETTE_LENGTH(2048) | |
| 303 | ||
| 304 | 317 | MDRV_VIDEO_START(raidena) |
| 305 | MDRV_VIDEO_EOF(raiden) | |
| 306 | MDRV_VIDEO_UPDATE(raiden) | |
| 307 | ||
| 308 | /* sound hardware */ | |
| 309 | SEIBU_SOUND_SYSTEM_YM3812_RAIDEN_INTERFACE(XTAL_14_31818MHz/4,XTAL_12MHz/12) /* frequency and pin 7 verified on pcb */ | |
| 310 | 318 | MACHINE_DRIVER_END |
| 311 | 319 | |
| 320 | ||
| 312 | 321 | /***************************************************************************/ |
| 313 | 322 | |
| 314 | 323 | ROM_START( raiden ) |
| r7356 | r7357 | |
| 447 | 456 | ROM_LOAD( "rai7.bin", 0x00000, 0x10000, CRC(8f927822) SHA1(592f2719f2c448c3b4b239eeaec078b411e12dbb) ) |
| 448 | 457 | ROM_END |
| 449 | 458 | |
| 459 | ||
| 460 | ROM_START( raidenu ) | |
| 461 | ROM_REGION( 0x100000, "maincpu", 0 ) /* v30 main cpu */ | |
| 462 | ROM_LOAD16_BYTE( "1.c8", 0x0a0000, 0x10000, CRC(a4b12785) SHA1(446314e82ce01315cb3e3d1f323eaa2ad6fb48dd) ) | |
| 463 | ROM_LOAD16_BYTE( "2.c7", 0x0a0001, 0x10000, CRC(17640bd5) SHA1(5bbc99900426b1a072b52537ae9a50220c378a0d) ) | |
| 464 | ROM_LOAD16_BYTE( "3dd.e8", 0x0c0000, 0x20000, CRC(b6f3bad2) SHA1(214474ab9fa65e2716155b77d7825951cc98148a) ) | |
| 465 | ROM_LOAD16_BYTE( "4dd.e7", 0x0c0001, 0x20000, CRC(d294dfc1) SHA1(03606ddfa35d5cb34c447fa370495e1fbb0cad0e) ) | |
| 466 | ||
| 467 | ROM_REGION( 0x100000, "sub", 0 ) /* v30 sub cpu */ | |
| 468 | ROM_LOAD16_BYTE( "5.p8", 0x0c0000, 0x20000, CRC(15c1cf45) SHA1(daac732a1d3e8f36fa665f984e05651cbca74fef) ) | |
| 469 | ROM_LOAD16_BYTE( "6.p7", 0x0c0001, 0x20000, CRC(261c381b) SHA1(64a9e0ea9abcba6287829cf4abb806362b62c806) ) | |
| 470 | ||
| 471 | ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */ | |
| 472 | ROM_LOAD( "8.w8", 0x000000, 0x08000, CRC(105b9c11) SHA1(eb142806f8410d584d914b91207361a15ab18e6f) ) | |
| 473 | ROM_CONTINUE( 0x10000, 0x08000 ) | |
| 474 | ROM_COPY( "audiocpu", 0, 0x18000, 0x08000 ) | |
| 475 | ||
| 476 | ROM_REGION( 0x010000, "gfx1", 0 ) | |
| 477 | ROM_LOAD( "9.u016", 0x00000, 0x08000, CRC(1922b25e) SHA1(da27122dd1c43770e7385ad602ef397c64d2f754) ) /* chars */ | |
| 478 | ROM_LOAD( "10.u017", 0x08000, 0x08000, CRC(5f90786a) SHA1(4f63b07c6afbcf5196a433f3356bef984fe303ef) ) | |
| 479 | ||
| 480 | ROM_REGION( 0x080000, "gfx2", 0 ) | |
| 481 | ROM_LOAD( "sei420.u011", 0x00000, 0x80000, CRC(da151f0b) SHA1(02682497caf5f058331f18c652471829fa08d54f) ) /* tiles */ | |
| 482 | ||
| 483 | ROM_REGION( 0x080000, "gfx3", 0 ) | |
| 484 | ROM_LOAD( "sei430.u013", 0x00000, 0x80000, CRC(ac1f57ac) SHA1(1de926a0db73b99904ef119ac816c53d1551156a) ) /* tiles */ | |
| 485 | ||
| 486 | ROM_REGION( 0x090000, "gfx4", 0 ) | |
| 487 | ROM_LOAD( "sei440.u012", 0x00000, 0x80000, CRC(946d7bde) SHA1(30e8755c2b1ca8bff6278710b8422b51f75eec10) ) /* sprites */ | |
| 488 | ||
| 489 | ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ | |
| 490 | ROM_LOAD( "7.x10", 0x00000, 0x10000, CRC(2051263e) SHA1(dff96caa11adf619360d88704e3af8427ddfe524) ) | |
| 491 | ROM_END | |
| 492 | ||
| 493 | ||
| 450 | 494 | /***************************************************************************/ |
| 451 | 495 | |
| 452 | /* Spin the sub-cpu if it is waiting on the master cpu */ | |
| 496 | ||
| 497 | ||
| 498 | /* this used to be needed to stop the collisions from breaking (high interleave didn't help), is it still required? */ | |
| 499 | //#define SYNC_HACK | |
| 500 | ||
| 501 | #ifdef SYNC_HACK | |
| 453 | 502 | static READ16_HANDLER( sub_cpu_spin_r ) |
| 454 | 503 | { |
| 455 | 504 | int pc=cpu_get_pc(space->cpu); |
| 456 | 505 | int ret=raiden_shared_ram[0x4]; |
| 457 | 506 | |
| 507 | // main set | |
| 458 | 508 | if (pc==0xfcde6 && ret!=0x40) |
| 459 | 509 | cpu_spin(space->cpu); |
| 460 | 510 | |
| 461 | return ret; | |
| 462 | } | |
| 463 | ||
| 464 | static READ16_HANDLER( sub_cpu_spina_r ) | |
| 465 | { | |
| 466 | int pc=cpu_get_pc(space->cpu); | |
| 467 | int ret=raiden_shared_ram[0x4]; | |
| 468 | ||
| 511 | // alt sets | |
| 469 | 512 | if (pc==0xfcde8 && ret!=0x40) |
| 470 | 513 | cpu_spin(space->cpu); |
| 471 | 514 | |
| 472 | 515 | return ret; |
| 473 | 516 | } |
| 517 | #endif | |
| 474 | 518 | |
| 475 | 519 | static DRIVER_INIT( raiden ) |
| 476 | 520 | { |
| 521 | #ifdef SYNC_HACK | |
| 477 | 522 | memory_install_read16_handler(cputag_get_address_space(machine, "sub", ADDRESS_SPACE_PROGRAM), 0x4008, 0x4009, 0, 0, sub_cpu_spin_r); |
| 523 | #endif | |
| 478 | 524 | } |
| 479 | 525 | |
| 480 | static | |
| 526 | static DRIVER | |
| 481 | 527 | { |
| 482 | memory_install_read16_handler(cputag_get_address_space(machine, "sub", ADDRESS_SPACE_PROGRAM), 0x4008, 0x4009, 0, 0, sub_cpu_spina_r); | |
| 528 | DRIVER_INIT_CALL(raiden); | |
| 529 | seibu_sound_decrypt(machine,"audiocpu",0x20000); | |
| 483 | 530 | } |
| 484 | 531 | |
| 485 | 532 | /* This is based on code by Niclas Karlsson Mate, who figured out the |
| r7356 | r7357 | |
| 487 | 534 | bit-swapping */ |
| 488 | 535 | static void common_decrypt(running_machine *machine) |
| 489 | 536 | { |
| 537 | ||
| 490 | 538 | UINT16 *RAM = (UINT16 *)memory_region(machine, "maincpu"); |
| 491 | 539 | int i; |
| 492 | 540 | |
| r7356 | r7357 | |
| 513 | 561 | |
| 514 | 562 | static DRIVER_INIT( raidenk ) |
| 515 | 563 | { |
| 516 | | |
| 564 | DRIVER_INIT_CALL(ra | |
| 517 | 565 | common_decrypt(machine); |
| 518 | 566 | } |
| 519 | 567 | |
| 520 | 568 | static DRIVER_INIT( raidena ) |
| 521 | 569 | { |
| 522 | | |
| 570 | DRIVER_INIT_CALL(ra | |
| 523 | 571 | common_decrypt(machine); |
| 524 | 572 | seibu_sound_decrypt(machine,"audiocpu",0x20000); |
| 525 | 573 | } |
| 526 | 574 | |
| 575 | ||
| 576 | ||
| 527 | 577 | /***************************************************************************/ |
| 528 | 578 | |
| 529 | GAME( 1990, raiden, 0, raiden, raiden, raiden, ROT270, "Seibu Kaihatsu", "Raiden", 0 ) | |
| 579 | GAME( 1990, raiden, 0, raiden, raiden, raiden, ROT270, "Seibu Kaihatsu", "Raiden", 0 ) // main/sub/sound not encrypted | |
| 580 | GAME( 1990, raidenu, raiden, raidenu, raiden, raidenu, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden (US, SEI8904 + SEI9008 PCBs)", 0 ) // main/sub not encrypted | |
| 530 | 581 | GAME( 1990, raidena, raiden, raidena, raiden, raidena, ROT270, "Seibu Kaihatsu", "Raiden (Alternate Hardware)", 0 ) |
| 531 | GAME( 1990, raidenk, raiden, raidena, raiden, raidenk, ROT270, "Seibu Kaihatsu (IBL Corporation license)", "Raiden (Korea)", 0 ) | |
| 582 | GAME( 1990, raidenk, raiden, raidena, raiden, raidenk, ROT270, "Seibu Kaihatsu (IBL Corporation license)", "Raiden (Korea)", 0 ) // sound not encrypted | |
| 532 | 583 | GAME( 1990, raident, raiden, raidena, raiden, raidena, ROT270, "Seibu Kaihatsu (Liang HWA Electronics license)", "Raiden (Taiwan)", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 55 | 55 | entering the initials (code at 0x004a1e, 0x014bb0 and 0x014c84) |
| 56 | 56 | |
| 57 | 57 | |
| 58 | 2) 'bloodbra' | |
| 58 | 2) 'bloodbroa' | |
| 59 | 59 | |
| 60 | 60 | - When "Starting Coin" Dip Switch is set to "x2", you need 2 coins to start |
| 61 | 61 | a game (but 1 coin to join), then 1 coin to continue. |
| r7356 | r7357 | |
|---|---|---|
| 28 | 28 | |
| 29 | 29 | Notes: |
| 30 | 30 | |
| 31 | - sound cpu speed chosen from coin error countdown, 1.536 MHz is too fast | |
| 32 | as it loses synchronisation with the onscreen timer | |
| 33 | ||
| 34 | 31 | - some sprite glitches from sprite number/colour changes happening on |
| 35 | 32 | different frames, possibly original behaviour. eg cars changing colour |
| 36 | 33 | just before exploding, animals displaying as the wrong sprite for one |
| r7356 | r7357 | |
| 120 | 117 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 121 | 118 | |
| 122 | 119 | PORT_START("DSW") |
| 123 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) | |
| 120 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2") | |
| 124 | 121 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) |
| 125 | 122 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 126 | 123 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) |
| 127 | 124 | PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) ) |
| 128 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_B ) ) | |
| 125 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3") | |
| 129 | 126 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) |
| 130 | 127 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) ) |
| 131 | PORT_DIPNAME( 0x18, 0x00, DEF_STR( Lives ) ) | |
| 128 | PORT_DIPNAME( 0x18, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:4,5") | |
| 132 | 129 | PORT_DIPSETTING( 0x00, "3" ) |
| 133 | 130 | PORT_DIPSETTING( 0x08, "4" ) |
| 134 | 131 | PORT_DIPSETTING( 0x10, "5" ) |
| 135 | 132 | PORT_DIPSETTING( 0x18, "250 (Cheat)") |
| 136 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) | |
| 133 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:6") | |
| 137 | 134 | PORT_DIPSETTING( 0x00, "10k, then every 100k" ) |
| 138 | 135 | PORT_DIPSETTING( 0x20, "20k, then every 100k" ) |
| 139 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) | |
| 136 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:7") | |
| 140 | 137 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 141 | 138 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 142 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) | |
| 139 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8") | |
| 143 | 140 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) |
| 144 | 141 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 145 | 142 | INPUT_PORTS_END |
| r7356 | r7357 | |
| 198 | 195 | MDRV_DRIVER_DATA(carjmbre_state) |
| 199 | 196 | |
| 200 | 197 | /* basic machine hardware */ |
| 201 | MDRV_CPU_ADD("maincpu", Z80,18432 | |
| 198 | MDRV_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) | |
| 202 | 199 | MDRV_CPU_PROGRAM_MAP(carjmbre_map) |
| 203 | 200 | MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse) |
| 204 | 201 | |
| 205 | 202 | MDRV_MACHINE_RESET(carjmbre) |
| 206 | 203 | |
| 207 | MDRV_CPU_ADD("audiocpu", Z80, 1 | |
| 204 | MDRV_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6/2) | |
| 208 | 205 | MDRV_CPU_PROGRAM_MAP(carjmbre_sound_map) |
| 209 | 206 | MDRV_CPU_IO_MAP(carjmbre_sound_io_map) |
| 210 | 207 | MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) |
| r7356 | r7357 | |
| 227 | 224 | /* sound hardware */ |
| 228 | 225 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 229 | 226 | |
| 230 | MDRV_SOUND_ADD("ay1", AY8910, 1 | |
| 227 | MDRV_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/6/2) | |
| 231 | 228 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.12) |
| 232 | 229 | |
| 233 | MDRV_SOUND_ADD("ay2", AY8910, 1 | |
| 230 | MDRV_SOUND_ADD("ay2", AY8910, XTAL_18_432MHz/6/2) | |
| 234 | 231 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.12) |
| 235 | 232 | MACHINE_DRIVER_END |
| 236 | 233 |
| r7356 | r7357 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | 3 | Mr Do! |
| 4 | ||
| 5 | 4 | driver by Nicola Salmoria |
| 6 | 5 | |
| 6 | Updated 02/2010 with proper XTAL values thanks to Oliver_A | |
| 7 | 7 | |
| 8 | Video clock: XTAL = 20 MHz | |
| 9 | Horizontal video frequency: HSYNC = XTAL/4/312 = 16.02564103 kHz | |
| 10 | Video frequency: VSYNC = HSYNC/262 = 61.1665688 Hz | |
| 11 | VBlank duration: 1/VSYNC * (70/262) = 4368 us | |
| 8 | PCB Model: 8201 | |
| 9 | Main Clock: XTAL = 8.2 MHz | |
| 10 | Video clock: XTAL = 19.6 MHz | |
| 12 | 11 | |
| 12 | Horizontal video frequency: HSYNC = XTAL/4/312 = 15.7051282051 kHz | |
| 13 | Video frequency: VSYNC = HSYNC/262 = 59.94323742 Hz | |
| 14 | VBlank duration: 1/VSYNC * (70/262) = 4457 us | |
| 15 | ||
| 16 | ||
| 17 | The manual for this model clearly shows above values in 'Misc' parts listings. | |
| 18 | There's a chance that certain bootlegs might have the different 8/20 MHz XTALS. | |
| 19 | ||
| 13 | 20 | ***************************************************************************/ |
| 14 | 21 | |
| 15 | 22 | #include "emu.h" |
| 16 | 23 | #include "cpu/z80/z80.h" |
| 17 | 24 | #include "sound/sn76496.h" |
| 18 | 25 | |
| 19 | #define MAIN_CLOCK XTAL_8MHz | |
| 20 | #define VIDEO_CLOCK XTAL_20MHz | |
| 26 | #define MAIN_CLOCK XTAL_8_2MHz | |
| 27 | #define VIDEO_CLOCK XTAL_19_6MHz | |
| 21 | 28 | |
| 22 | 29 | |
| 23 | 30 | extern UINT8 *mrdo_bgvideoram,*mrdo_fgvideoram; |
| r7356 | r7357 | |
| 170 | 177 | static MACHINE_DRIVER_START( mrdo ) |
| 171 | 178 | |
| 172 | 179 | /* basic machine hardware */ |
| 173 | MDRV_CPU_ADD("maincpu", Z80, MAIN_CLOCK/2) /* | |
| 180 | MDRV_CPU_ADD("maincpu", Z80, MAIN_CLOCK/2) /* Verified */ | |
| 174 | 181 | MDRV_CPU_PROGRAM_MAP(main_map) |
| 175 | 182 | MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) |
| 176 | 183 | |
| r7356 | r7357 | |
| 189 | 196 | /* sound hardware */ |
| 190 | 197 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 191 | 198 | |
| 192 | MDRV_SOUND_ADD("sn1", SN76489, MAIN_CLOCK/2) | |
| 199 | MDRV_SOUND_ADD("sn1", SN76489, MAIN_CLOCK/2) /* Verified */ | |
| 193 | 200 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 194 | 201 | |
| 195 | MDRV_SOUND_ADD("sn2", SN76489, MAIN_CLOCK/2) | |
| 202 | MDRV_SOUND_ADD("sn2", SN76489, MAIN_CLOCK/2) /* Verified */ | |
| 196 | 203 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 197 | 204 | MACHINE_DRIVER_END |
| 198 | 205 |
| r7356 | r7357 | |
|---|---|---|
| 240 | 240 | MDRV_DRIVER_DATA(canyon_state) |
| 241 | 241 | |
| 242 | 242 | /* basic machine hardware */ |
| 243 | MDRV_CPU_ADD("maincpu", M6502, 12096 | |
| 243 | MDRV_CPU_ADD("maincpu", M6502, XTAL_12_096MHz / 16) | |
| 244 | 244 | MDRV_CPU_PROGRAM_MAP(main_map) |
| 245 | 245 | MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse) |
| 246 | 246 | MDRV_WATCHDOG_VBLANK_INIT(8) |
| r7356 | r7357 | |
|---|---|---|
| 118 | 118 | */ |
| 119 | 119 | |
| 120 | 120 | #include "emu.h" |
| 121 | #include "megadriv.h" | |
| 121 | #include "includes/megadriv.h" | |
| 122 | 122 | |
| 123 | 123 | static INPUT_PORTS_START( topshoot ) /* Top Shooter Input Ports */ |
| 124 | 124 | PORT_START("IN0") |
| r7356 | r7357 | |
|---|---|---|
| 99 | 99 | * BUTTON2n : "nuke" |
| 100 | 100 | |
| 101 | 101 | |
| 102 | 3) 'dassaul4' | |
| 102 | 3) 'dassault4' | |
| 103 | 103 | |
| 104 | 104 | - always 4 players : |
| 105 | 105 | |
| r7356 | r7357 | |
| 422 | 422 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 423 | 423 | INPUT_PORTS_END |
| 424 | 424 | |
| 425 | static INPUT_PORTS_START( dassaul4 ) | |
| 425 | static INPUT_PORTS_START( dassault4 ) | |
| 426 | 426 | PORT_INCLUDE( common ) |
| 427 | 427 | |
| 428 | 428 | PORT_MODIFY("P1_P2") |
| r7356 | r7357 | |
| 848 | 848 | |
| 849 | 849 | GAME( 1991, thndzone, 0, dassault, thndzone, thndzone, ROT0, "Data East Corporation", "Thunder Zone (World)", 0 ) |
| 850 | 850 | GAME( 1991, dassault, thndzone, dassault, dassault, dassault, ROT0, "Data East Corporation", "Desert Assault (US)", 0 ) |
| 851 | GAME( 1991, dassault4,thndzone, dassault, dassaul4, | |
| 851 | GAME( 1991, dassault4,thndzone, dassault, dassault4, |
| r7356 | r7357 | |
|---|---|---|
| 8 | 8 | 2008-08 |
| 9 | 9 | Dip locations verified with manual |
| 10 | 10 | |
| 11 | ||
| 12 | Stephh's notes (based on the games Z80 code and some tests) : | |
| 13 | ||
| 14 | 1) 'dambustr' | |
| 15 | ||
| 16 | - This seems to be a bugfixed version as only the 3 "fire" buttons are | |
| 17 | tested while entering the initials (code at 0x1e59). | |
| 18 | - The "Initials Reset" button only affects the initials, not the scores ! | |
| 19 | - The "Disable Background Collision" Dip Switch only prevents you to lose | |
| 20 | "lives" if you touch the background : you can still be hit by enemies' | |
| 21 | bullets and be stalled if speed is too low. | |
| 22 | - There is a setting which is only available in the "test mode", it's the | |
| 23 | maximum game time. If you don't set it, the game considers it's illimited | |
| 24 | time (full doesn't decrease). But once you set it to a value, it is not | |
| 25 | possible to turn the value back to 0 even by reseting the game. | |
| 26 | - If you go too far without dying, background becomes complete garbage, | |
| 27 | but it then appears again correctly. Is there a bad dumped ROM or is | |
| 28 | emulation bugged somewhere ? Verification against real PCB is needed ! | |
| 29 | ||
| 30 | 2) 'dambustra' | |
| 31 | ||
| 32 | - There is sort of bug at 0x1e59 : you can't enter a letter in the | |
| 33 | initials screen while pressing one of the system buttons (SERVICE, | |
| 34 | "Initials Reset", START1 or START2), and even COIN2. | |
| 35 | This is because 8 bytes are checked instead of 3 in 'dambustr'. | |
| 36 | - Same as 'dambustr' otherwise. | |
| 37 | ||
| 38 | 3) 'dambustruk' | |
| 39 | ||
| 40 | - This set is based on 'dambustr' as there is no initials bug (code at 0x1e0f). | |
| 41 | - The differences with 'dambustr' are : | |
| 42 | * coinage for 2nd slot | |
| 43 | * currency and price (but it's still 2 credits to start a game) | |
| 44 | * score is divided by 10 | |
| 45 | ||
| 11 | 46 | ***************************************************************************/ |
| 12 | 47 | |
| 13 | 48 | |
| r7356 | r7357 | |
| 67 | 102 | AM_RANGE(0xf800, 0xffff) AM_READ(watchdog_reset_r) |
| 68 | 103 | ADDRESS_MAP_END |
| 69 | 104 | |
| 105 | ||
| 106 | /* verified from Z80 code */ | |
| 70 | 107 | static INPUT_PORTS_START( dambustr ) |
| 71 | 108 | PORT_START("IN0") |
| 72 | 109 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 73 | 110 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 74 | 111 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 ) |
| 75 | 112 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) |
| 76 | PORT_DIPNAME( 0x20, 0x00, "Clear Swear Words" ) | |
| 77 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 78 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 79 | PORT_SERVICE( 0x40, IP_ACTIVE_HIGH ) | |
| 113 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Initials Reset") PORT_CODE(KEYCODE_0) | |
| 114 | PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_HIGH ) | |
| 80 | 115 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) |
| 81 | 116 | |
| 82 | 117 | PORT_START("IN1") |
| 83 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 84 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 118 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 119 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 85 | 120 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 86 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 87 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 88 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 89 | PORT_DIPNAME( 0x40, 0x00, "2nd Coin Counter" ) PORT_DIPLOCATION("SW:!1") | |
| 90 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 91 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 92 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW:!2") | |
| 93 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) | |
| 94 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 121 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 122 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 123 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 124 | PORT_DIPNAME( 0x40, 0x40, "Coin Counters" ) PORT_DIPLOCATION("SW:!1") | |
| 125 | PORT_DIPSETTING( 0x00, "1" ) | |
| 126 | PORT_DIPSETTING( 0x40, "2" ) | |
| 127 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW:!2") | |
| 128 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x00) | |
| 129 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x00) | |
| 130 | PORT_DIPSETTING( 0x80, "A 1/1 B 1/2" ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x40) | |
| 131 | PORT_DIPSETTING( 0x00, "A 1/2 B 1/6" ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x40) | |
| 95 | 132 | |
| 96 | 133 | PORT_START("DSW") |
| 97 | 134 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW:!3,!4") |
| 98 | 135 | PORT_DIPSETTING( 0x00, "3" ) |
| 99 | PORT_DIPSETTING( 0x01, "4" ) | |
| 100 | PORT_DIPSETTING( 0x02, "5" ) | |
| 136 | PORT_DIPSETTING( 0x02, "4" ) | |
| 137 | PORT_DIPSETTING( 0x01, "5" ) | |
| 101 | 138 | PORT_DIPSETTING( 0x03, "6" ) |
| 102 | PORT_DIPNAME( 0x04, 0x00, " | |
| 139 | PORT_DIPNAME( 0x04, 0x00, "Disable Background Collision (Cheat)" ) PORT_DIPLOCATION("SW:!5") /* see notes - manual says must be OFF */ | |
| 103 | 140 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 104 | 141 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| 105 | PORT_DIPNAME( 0x08, 0x00, "Union Jack" ) PORT_DIPLOCATION("SW:!6") | |
| 142 | PORT_DIPNAME( 0x08, 0x00, "Union Jack Flag" ) PORT_DIPLOCATION("SW:!6") | |
| 106 | 143 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 107 | 144 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 145 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 108 | 146 | INPUT_PORTS_END |
| 109 | 147 | |
| 148 | /* verified from Z80 code */ | |
| 149 | static INPUT_PORTS_START( dambustruk ) | |
| 150 | PORT_INCLUDE(dambustr) | |
| 110 | 151 | |
| 152 | PORT_MODIFY("IN1") | |
| 153 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW:!2") | |
| 154 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x00) | |
| 155 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x00) | |
| 156 | PORT_DIPSETTING( 0x80, "A 1/1 B 1/6" ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x40) | |
| 157 | PORT_DIPSETTING( 0x00, "A 1/2 B 1/12" ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x40) | |
| 158 | INPUT_PORTS_END | |
| 159 | ||
| 160 | ||
| 111 | 161 | static const gfx_layout dambustr_charlayout = |
| 112 | 162 | { |
| 113 | 163 | 8,8, |
| r7356 | r7357 | |
| 295 | 345 | ROM_END |
| 296 | 346 | |
| 297 | 347 | |
| 298 | GAME( 1981, dambustr, 0, dambustr, dambustr, dambustr, ROT90, "South West Research", "Dambusters (US, set 1)", 0 ) | |
| 299 | GAME( 1981, dambustra, dambustr, dambustr, dambustr, dambustr, ROT90, "South West Research", "Dambusters (US, set 2)", 0 ) | |
| 300 | GAME( 1981, dambustruk,dambustr, dambustr, dambustr, dambustr, ROT90, "South West Research", "Dambusters (UK)", 0 ) | |
| 348 | GAME( 1981, dambustr, 0, dambustr, dambustr, dambustr, ROT90, "South West Research", "Dambusters (US, set 1)", 0 ) | |
| 349 | GAME( 1981, dambustra, dambustr, dambustr, dambustr, dambustr, ROT90, "South West Research", "Dambusters (US, set 2)", 0 ) | |
| 350 | GAME( 1981, dambustruk, dambustr, dambustr, dambustruk, dambustr, ROT90, "South West Research", "Dambusters (UK)", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 14 | 14 | #include "sound/sn76496.h" |
| 15 | 15 | #include "machine/mc8123.h" |
| 16 | 16 | #include "machine/segacrpt.h" |
| 17 | #include "segamsys.h" | |
| 17 | #include "includes/segamsys.h" | |
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | //static UINT8* sms_rom; |
| r7356 | r7357 | |
|---|---|---|
| 54 | 54 | #include "sound/sn76496.h" |
| 55 | 55 | |
| 56 | 56 | #include "deprecat.h" |
| 57 | #include "megadriv.h" | |
| 58 | #include "segamsys.h" | |
| 57 | #include "includes/megadriv.h" | |
| 58 | #include "includes/segamsys.h" | |
| 59 | 59 | |
| 60 | 60 | #define MASTER_CLOCK 53693100 |
| 61 | 61 |
| r7356 | r7357 | |
|---|---|---|
| 298 | 298 | #include "sound/sn76496.h" |
| 299 | 299 | #include "machine/mc8123.h" |
| 300 | 300 | #include "machine/segacrpt.h" |
| 301 | #include "segamsys.h" | |
| 301 | #include "includes/segamsys.h" | |
| 302 | 302 | |
| 303 | 303 | /**************************************************************************************** |
| 304 | 304 | Memory Maps |
| r7356 | r7357 | |
|---|---|---|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | |
| 150 | static STATE_POSTLOAD( pitfighb_state_postload ) | |
| 150 | static STATE_POSTLOAD( pitfightb_state_postload ) | |
| 151 | 151 | { |
| 152 | 152 | atarig1_state *state = (atarig1_state *)machine->driver_data; |
| 153 | 153 | int bank = state->bslapstic_bank; |
| r7356 | r7357 | |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | |
| 159 | static READ16_HANDLER( pitfighb_cheap_slapstic_r ) | |
| 159 | static READ16_HANDLER( pitfightb_cheap_slapstic_r ) | |
| 160 | 160 | { |
| 161 | 161 | atarig1_state *state = (atarig1_state *)space->machine->driver_data; |
| 162 | 162 | int result = state->bslapstic_base[offset & 0xfff]; |
| r7356 | r7357 | |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | |
| 187 | static void pitfighb_cheap_slapstic_init(running_machine *machine) | |
| 187 | static void pitfightb_cheap_slapstic_init(running_machine *machine) | |
| 188 | 188 | { |
| 189 | 189 | atarig1_state *state = (atarig1_state *)machine->driver_data; |
| 190 | 190 | |
| 191 | 191 | /* install a read handler */ |
| 192 | state->bslapstic_base = memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x038000, 0x03ffff, 0, 0, pitfighb_cheap_slapstic_r); | |
| 192 | state->bslapstic_base = memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x038000, 0x03ffff, 0, 0, pitfightb_cheap_slapstic_r); | |
| 193 | 193 | |
| 194 | 194 | /* allocate memory for a copy of bank 0 */ |
| 195 | 195 | state->bslapstic_bank0 = auto_alloc_array(machine, UINT8, 0x2000); |
| r7356 | r7357 | |
| 314 | 314 | INPUT_PORTS_END |
| 315 | 315 | |
| 316 | 316 | |
| 317 | static INPUT_PORTS_START( pitfighj ) | |
| 317 | static INPUT_PORTS_START( pitfightj ) | |
| 318 | 318 | PORT_START("IN0") /* fc0000 */ |
| 319 | 319 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| 320 | 320 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| r7356 | r7357 | |
| 1078 | 1078 | state->atarigen.eeprom_default = NULL; |
| 1079 | 1079 | if (slapstic == -1) |
| 1080 | 1080 | { |
| 1081 | pitfighb_cheap_slapstic_init(machine); | |
| 1081 | pitfightb_cheap_slapstic_init(machine); | |
| 1082 | 1082 | state_save_register_global(machine, state->bslapstic_bank); |
| 1083 | 1083 | state_save_register_global(machine, state->bslapstic_primed); |
| 1084 | state_save_register_postload(machine, pitfighb_state_postload, NULL); | |
| 1084 | state_save_register_postload(machine, pitfightb_state_postload, NULL); | |
| 1085 | 1085 | } |
| 1086 | 1086 | else if (slapstic != 0) |
| 1087 | 1087 | atarigen_slapstic_init(devtag_get_device(machine, "maincpu"), slapstic_base, 0, slapstic); |
| r7356 | r7357 | |
| 1093 | 1093 | static DRIVER_INIT( hydra ) { init_g1_common(machine, 0x078000, 116, 0); } |
| 1094 | 1094 | static DRIVER_INIT( hydrap ) { init_g1_common(machine, 0x000000, 0, 0); } |
| 1095 | 1095 | |
| 1096 | static DRIVER_INIT( pitfigh7 ) { init_g1_common(machine, 0x038000, 112, 2); } | |
| 1096 | static DRIVER_INIT( pitfight7 ) { init_g1_common(machine, 0x038000, 112, 2); } | |
| 1097 | 1097 | static DRIVER_INIT( pitfight ) { init_g1_common(machine, 0x038000, 111, 1); } |
| 1098 | static DRIVER_INIT( pitfighj ) { init_g1_common(machine, 0x038000, 113, 1); } | |
| 1099 | static DRIVER_INIT( pitfighb ) { init_g1_common(machine, 0x038000, -1, 1); } | |
| 1098 | static DRIVER_INIT( pitfightj ) { init_g1_common(machine, 0x038000, 113, 1); } | |
| 1099 | static DRIVER_INIT( pitfightb ) { init_g1_common(machine, 0x038000, -1, 1); } | |
| 1100 | 1100 | |
| 1101 | 1101 | |
| 1102 | 1102 | /************************************* |
| r7356 | r7357 | |
| 1109 | 1109 | GAME( 1990, hydrap, hydra, atarig1, hydra, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/14/90)", GAME_SUPPORTS_SAVE ) |
| 1110 | 1110 | GAME( 1990, hydrap2, hydra, atarig1, hydra, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/25/90)", GAME_SUPPORTS_SAVE ) |
| 1111 | 1111 | |
| 1112 | GAME( 1990, pitfight, 0, atarig1, pitfight, pitfigh7, ROT0, "Atari Games", "Pit Fighter (rev 7)", GAME_SUPPORTS_SAVE ) | |
| 1113 | GAME( 1990, pitfight6, pitfight, atarig1, pitfight, pitfighj, ROT0, "Atari Games", "Pit Fighter (rev 6)", GAME_SUPPORTS_SAVE ) | |
| 1114 | GAME( 1990, pitfight5, pitfight, atarig1, pitfight, pitfigh7, ROT0, "Atari Games", "Pit Fighter (rev 5)", GAME_SUPPORTS_SAVE ) | |
| 1112 | GAME( 1990, pitfight, 0, atarig1, pitfight, pitfight7,ROT0, "Atari Games", "Pit Fighter (rev 7)", GAME_SUPPORTS_SAVE ) | |
| 1113 | GAME( 1990, pitfight6, pitfight, atarig1, pitfight, pitfightj,ROT0, "Atari Games", "Pit Fighter (rev 6)", GAME_SUPPORTS_SAVE ) | |
| 1114 | GAME( 1990, pitfight5, pitfight, atarig1, pitfight, pitfight7,ROT0, "Atari Games", "Pit Fighter (rev 5)", GAME_SUPPORTS_SAVE ) | |
| 1115 | 1115 | GAME( 1990, pitfight4, pitfight, atarig1, pitfight, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 4)", GAME_SUPPORTS_SAVE ) |
| 1116 | 1116 | GAME( 1990, pitfight3, pitfight, atarig1, pitfight, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 3)", GAME_SUPPORTS_SAVE ) |
| 1117 | GAME( 1990, pitfightj, pitfight, atarig1, pitfighj, pitfighj, ROT0, "Atari Games", "Pit Fighter (Japan, 2 players)", GAME_SUPPORTS_SAVE ) | |
| 1118 | GAME( 1990, pitfightb, pitfight, atarig1, pitfight, pitfighb, ROT0, "Atari Games", "Pit Fighter (bootleg)", GAME_SUPPORTS_SAVE ) | |
| 1117 | GAME( 1990, pitfightj, pitfight, atarig1, pitfightj,pitfightj,ROT0, "Atari Games", "Pit Fighter (Japan, 2 players)", GAME_SUPPORTS_SAVE ) | |
| 1118 | GAME( 1990, pitfightb, pitfight, atarig1, pitfight, pitfightb,ROT0, "Atari Games", "Pit Fighter (bootleg)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 4 | 4 | TODO: |
| 5 | 5 | - colour decoding might not be perfect |
| 6 | 6 | - Background color should be green, but current handling might be wrong. |
| 7 | - some unknown sprite attributes | |
| 7 | - some unknown sprite attributes | |
| 8 | 8 | - don't know what to do when the jackpot is displayed (missing controls ?) |
| 9 | 9 | - according to the board pic, there should be one more 4-switches dip |
| 10 | 10 | switch bank, and probably some NVRAM because there's a battery. |
| r7356 | r7357 | |
| 21 | 21 | UINT8 * spriteram1; |
| 22 | 22 | UINT8 * spriteram2; |
| 23 | 23 | UINT8 * spriteram3; |
| 24 | UINT8 flip_bit; | |
| 24 | 25 | }; |
| 25 | 26 | |
| 26 | 27 | |
| r7356 | r7357 | |
| 61 | 62 | int sx = state->spriteram1[i + 0x200] | ((state->spriteram2[i + 0x200] & 0x07) << 8); |
| 62 | 63 | int sy = 242 - state->spriteram3[i]; |
| 63 | 64 | |
| 64 | if (flip_ | |
| 65 | if (state->flip_b | |
| 65 | 66 | { |
| 66 | 67 | sy = 242 - sy; |
| 67 | 68 | flipx = !flipx; |
| r7356 | r7357 | |
| 123 | 124 | // unused |
| 124 | 125 | } |
| 125 | 126 | |
| 127 | static WRITE8_HANDLER( albazc_vregs_w ) | |
| 128 | { | |
| 129 | albazc_state *state = (albazc_state *)space->machine->driver_data; | |
| 130 | ||
| 131 | #ifdef UNUSED_FUNCTION | |
| 132 | { | |
| 133 | static UINT8 x[5]; | |
| 134 | x[offset] = data; | |
| 135 | popmessage("%02x %02x %02x %02x %02x",x[0],x[1],x[2],x[3],x[4]); | |
| 136 | } | |
| 137 | #endif | |
| 138 | ||
| 139 | if(offset == 0) | |
| 140 | { | |
| 141 | /* core bug with this? */ | |
| 142 | //flip_screen_set(space->machine, (data & 0x40) >> 6); | |
| 143 | state->flip_bit = (data & 0x40) >> 6; | |
| 144 | } | |
| 145 | } | |
| 146 | ||
| 126 | 147 | /* main cpu */ |
| 127 | 148 | |
| 128 | 149 | static ADDRESS_MAP_START( hanaroku_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r7356 | r7357 | |
| 131 | 152 | AM_RANGE(0x9000, 0x97ff) AM_RAM AM_BASE_MEMBER(albazc_state, spriteram2) |
| 132 | 153 | AM_RANGE(0xa000, 0xa1ff) AM_RAM AM_BASE_MEMBER(albazc_state, spriteram3) |
| 133 | 154 | AM_RANGE(0xa200, 0xa2ff) AM_WRITENOP // ??? written once during P.O.S.T. |
| 134 | AM_RANGE(0xa300, 0xa304) AM_WRITE | |
| 155 | AM_RANGE(0xa300, 0xa304) AM_WRITE(albazc_vregs_w) // ??? | |
| 135 | 156 | AM_RANGE(0xb000, 0xb000) AM_WRITENOP // ??? always 0x40 |
| 136 | 157 | AM_RANGE(0xc000, 0xc3ff) AM_RAM // main ram |
| 137 | 158 | AM_RANGE(0xc400, 0xc4ff) AM_RAM // ??? |
| r7356 | r7357 | |
| 260 | 281 | /* sound hardware */ |
| 261 | 282 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 262 | 283 | |
| 263 | MDRV_SOUND_ADD("aysnd", AY8910, 1500000) | |
| 284 | MDRV_SOUND_ADD("aysnd", AY8910, 1500000) /* ? MHz */ | |
| 264 | 285 | MDRV_SOUND_CONFIG(ay8910_config) |
| 265 | 286 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 266 | 287 | MACHINE_DRIVER_END |
| r7356 | r7357 | |
| 282 | 303 | ROM_END |
| 283 | 304 | |
| 284 | 305 | |
| 285 | GAME( 1988, hanaroku, 0, hanaroku, hanaroku, 0, ROT0, "Alba", "Hanaroku", GAME_ | |
| 306 | GAME( 1988, hanaroku, 0, hanaroku, hanaroku, 0, ROT0, "Alba", "Hanaroku", GAME_ |
| r7356 | r7357 | |
|---|---|---|
| 563 | 563 | GAME( 1991, f15se, 0, micro3d, f15se, micro3d, ROT0, "Microprose Games Inc.", "F-15 Strike Eagle (rev. 2.2 02/25/91)", GAME_IMPERFECT_SOUND ) |
| 564 | 564 | GAME( 1991, f15se21 , f15se, micro3d, f15se, micro3d, ROT0, "Microprose Games Inc.", "F-15 Strike Eagle (rev. 2.1 02/04/91)", GAME_IMPERFECT_SOUND ) |
| 565 | 565 | GAME( 1992, botss, 0, micro3d, botss, micro3d, ROT0, "Microprose Games Inc.", "Battle of the Solar System (rev. 1.1)", GAME_IMPERFECT_SOUND ) |
| 566 | GAME( 1992, tankbatl, 0, micro3d, tankbatl, micro3d, ROT0, "Microprose Games Inc.", "Tank Battle (prototype rev. 4/21/92 | |
| 566 | GAME( 1992, tankbatl, 0, micro3d, tankbatl, micro3d, ROT0, "Microprose Games Inc.", "Tank Battle (prototype rev. 4/21/92 |
| r7356 | r7357 | |
|---|---|---|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | |
| 77 | static void cyberb2p_update_interrupts(running_machine *machine) | |
| 77 | static void cyberbal2p_update_interrupts(running_machine *machine) | |
| 78 | 78 | { |
| 79 | 79 | cyberbal_state *state = (cyberbal_state *)machine->driver_data; |
| 80 | 80 | cputag_set_input_line(machine, "maincpu", 1, state->atarigen.video_int_state ? ASSERT_LINE : CLEAR_LINE); |
| r7356 | r7357 | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | |
| 85 | static MACHINE_RESET( cyberb2p ) | |
| 85 | static MACHINE_RESET( cyberbal2p ) | |
| 86 | 86 | { |
| 87 | 87 | cyberbal_state *state = (cyberbal_state *)machine->driver_data; |
| 88 | 88 | |
| 89 | 89 | atarigen_eeprom_reset(&state->atarigen); |
| 90 | atarigen_interrupt_reset(&state->atarigen, cyberb2p_update_interrupts); | |
| 90 | atarigen_interrupt_reset(&state->atarigen, cyberbal2p_update_interrupts); | |
| 91 | 91 | atarigen_scanline_timer_reset(machine->primary_screen, cyberbal_scanline_update, 8); |
| 92 | 92 | atarijsa_reset(); |
| 93 | 93 | } |
| r7356 | r7357 | |
| 247 | 247 | * |
| 248 | 248 | *************************************/ |
| 249 | 249 | |
| 250 | static ADDRESS_MAP_START( cyberb2p_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 250 | static ADDRESS_MAP_START( cyberbal2p_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 251 | 251 | AM_RANGE(0x000000, 0x07ffff) AM_ROM |
| 252 | 252 | AM_RANGE(0xfc0000, 0xfc0003) AM_READ_PORT("IN0") |
| 253 | 253 | AM_RANGE(0xfc2000, 0xfc2003) AM_READ_PORT("IN1") |
| r7356 | r7357 | |
| 326 | 326 | INPUT_PORTS_END |
| 327 | 327 | |
| 328 | 328 | |
| 329 | static INPUT_PORTS_START( cyberb2p ) | |
| 329 | static INPUT_PORTS_START( cyberbal2p ) | |
| 330 | 330 | PORT_START("IN0") /* fc0000 */ |
| 331 | 331 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 332 | 332 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| r7356 | r7357 | |
| 490 | 490 | MACHINE_DRIVER_END |
| 491 | 491 | |
| 492 | 492 | |
| 493 | static MACHINE_DRIVER_START( cyberb2p ) | |
| 493 | static MACHINE_DRIVER_START( cyberbal2p ) | |
| 494 | 494 | MDRV_DRIVER_DATA(cyberbal_state) |
| 495 | 495 | |
| 496 | 496 | /* basic machine hardware */ |
| 497 | 497 | MDRV_CPU_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2) |
| 498 | MDRV_CPU_PROGRAM_MAP(cyberb2p_map) | |
| 498 | MDRV_CPU_PROGRAM_MAP(cyberbal2p_map) | |
| 499 | 499 | MDRV_CPU_VBLANK_INT("screen", atarigen_video_int_gen) |
| 500 | 500 | |
| 501 | 501 | MDRV_MACHINE_START(cyberbal) |
| 502 | MDRV_MACHINE_RESET(cyberb2p) | |
| 502 | MDRV_MACHINE_RESET(cyberbal2p) | |
| 503 | 503 | MDRV_NVRAM_HANDLER(atarigen) |
| 504 | 504 | |
| 505 | 505 | /* video hardware */ |
| r7356 | r7357 | |
| 513 | 513 | /* the board uses an SOS-2 chip to generate video signals */ |
| 514 | 514 | MDRV_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240) |
| 515 | 515 | |
| 516 | MDRV_VIDEO_START(cyberb2p) | |
| 516 | MDRV_VIDEO_START(cyberbal2p) | |
| 517 | 517 | MDRV_VIDEO_UPDATE(cyberbal) |
| 518 | 518 | |
| 519 | 519 | /* sound hardware */ |
| r7356 | r7357 | |
| 1003 | 1003 | } |
| 1004 | 1004 | |
| 1005 | 1005 | |
| 1006 | static DRIVER_INIT( cyberbt ) | |
| 1006 | static DRIVER_INIT( cyberbalt ) | |
| 1007 | 1007 | { |
| 1008 | 1008 | cyberbal_state *state = (cyberbal_state *)machine->driver_data; |
| 1009 | 1009 | state->atarigen.eeprom_default = default_eeprom; |
| r7356 | r7357 | |
| 1011 | 1011 | } |
| 1012 | 1012 | |
| 1013 | 1013 | |
| 1014 | static DRIVER_INIT( cyberb2p ) | |
| 1014 | static DRIVER_INIT( cyberbal2p ) | |
| 1015 | 1015 | { |
| 1016 | 1016 | cyberbal_state *state = (cyberbal_state *)machine->driver_data; |
| 1017 | 1017 | state->atarigen.eeprom_default = default_eeprom; |
| r7356 | r7357 | |
| 1030 | 1030 | GAMEL(1988, cyberbal2, cyberbal, cyberbal, cyberbal, cyberbal, ROT0, "Atari Games", "Cyberball (rev 2)", 0, layout_dualhsxs ) |
| 1031 | 1031 | GAMEL(1988, cyberbalp, cyberbal, cyberbal, cyberbal, cyberbal, ROT0, "Atari Games", "Cyberball (prototype)", 0, layout_dualhsxs ) |
| 1032 | 1032 | |
| 1033 | GAME( 1989, cyberbal2p, cyberbal, cyberb2p, cyberb2p, cyberb2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 4)", 0 ) | |
| 1034 | GAME( 1989, cyberbal2p3, cyberbal, cyberb2p, cyberb2p, cyberb2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 3)", 0 ) | |
| 1035 | GAME( 1989, cyberbal2p2, cyberbal, cyberb2p, cyberb2p, cyberb2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 2)", 0 ) | |
| 1036 | GAME( 1989, cyberbal2p1, cyberbal, cyberb2p, cyberb2p, cyberb2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 1)", 0 ) | |
| 1033 | GAME( 1989, cyberbal2p, cyberbal, cyberbal2p, cyberbal2p, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 4)", 0 ) | |
| 1034 | GAME( 1989, cyberbal2p3, cyberbal, cyberbal2p, cyberbal2p, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 3)", 0 ) | |
| 1035 | GAME( 1989, cyberbal2p2, cyberbal, cyberbal2p, cyberbal2p, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 2)", 0 ) | |
| 1036 | GAME( 1989, cyberbal2p1, cyberbal, cyberbal2p, cyberbal2p, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 1)", 0 ) | |
| 1037 | 1037 | |
| 1038 | GAMEL(1989, cyberbalt, cyberbal, cyberbal, cyberbal, cyberbt, ROT0, "Atari Games", "Tournament Cyberball 2072 (rev 2)", 0, layout_dualhsxs ) | |
| 1039 | GAMEL(1989, cyberbalt1, cyberbal, cyberbal, cyberbal, cyberbt, ROT0, "Atari Games", "Tournament Cyberball 2072 (rev 1)", 0, layout_dualhsxs ) | |
| 1038 | GAMEL(1989, cyberbalt, cyberbal, cyberbal, cyberbal, cyberbalt, ROT0, "Atari Games", "Tournament Cyberball 2072 (rev 2)", 0, layout_dualhsxs ) | |
| 1039 | GAMEL(1989, cyberbalt1, cyberbal, cyberbal, cyberbal, cyberbalt, ROT0, "Atari Games", "Tournament Cyberball 2072 (rev 1)", 0, layout_dualhsxs ) | |
| 1040 | 1040 |
| r7356 | r7357 | |
|---|---|---|
| 38 | 38 | M6295 clocks : 1.000MHz (both), sample rate = 1000000 / 132 |
| 39 | 39 | VSync : 60Hz |
| 40 | 40 | |
| 41 | ||
| 42 | SAVE STATE (lee@lmservers.com): | |
| 43 | No code changes required to support save state | |
| 44 | 1945kiii uses the 68000 and OKIM6295 which both support save state. | |
| 45 | The rationale for saving/not saving are as follows: | |
| 46 | ||
| 47 | static UINT16* k3_spriteram_1; Saved via reference to AM_BASE | |
| 48 | static UINT16* k3_spriteram_2; Saved via reference to AM_BASE | |
| 49 | static UINT16* k3_bgram; Saved via reference to AM_BASE | |
| 50 | static tilemap_t *k3_bg_tilemap; Saved due to tilemap supporting save | |
| 51 | ||
| 52 | There are no static local variables. | |
| 53 | ||
| 54 | 41 | */ |
| 55 | 42 | |
| 56 | 43 | #include "emu.h" |
| r7356 | r7357 | |
|---|---|---|
| 633 | 633 | |
| 634 | 634 | */ |
| 635 | 635 | |
| 636 | static READ16_HANDLER( badlandb_unk_r ) | |
| 636 | static READ16_HANDLER( badlandsb_unk_r ) | |
| 637 | 637 | { |
| 638 | 638 | |
| 639 | 639 | return 0xffff; |
| r7356 | r7357 | |
| 643 | 643 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 644 | 644 | |
| 645 | 645 | |
| 646 | AM_RANGE(0x400008, 0x400009) AM_READ(badlandb_unk_r ) | |
| 647 | AM_RANGE(0x4000fe, 0x4000ff) AM_READ(badlandb_unk_r ) | |
| 646 | AM_RANGE(0x400008, 0x400009) AM_READ(badlandsb_unk_r ) | |
| 647 | AM_RANGE(0x4000fe, 0x4000ff) AM_READ(badlandsb_unk_r ) | |
| 648 | 648 | |
| 649 | AM_RANGE(0xfc0000, 0xfc0001) AM_READ(badlandb_unk_r ) | |
| 649 | AM_RANGE(0xfc0000, 0xfc0001) AM_READ(badlandsb_unk_r ) | |
| 650 | 650 | |
| 651 | AM_RANGE(0xfe4000, 0xfe4001) AM_READ(badlandb_unk_r ) | |
| 652 | AM_RANGE(0xfe4004, 0xfe4005) AM_READ(badlandb_unk_r ) | |
| 653 | AM_RANGE(0xfe4006, 0xfe4007) AM_READ(badlandb_unk_r ) | |
| 651 | AM_RANGE(0xfe4000, 0xfe4001) AM_READ(badlandsb_unk_r ) | |
| 652 | AM_RANGE(0xfe4004, 0xfe4005) AM_READ(badlandsb_unk_r ) | |
| 653 | AM_RANGE(0xfe4006, 0xfe4007) AM_READ(badlandsb_unk_r ) | |
| 654 | 654 | |
| 655 | 655 | |
| 656 | 656 | AM_RANGE(0xfd0000, 0xfd1fff) AM_READWRITE(atarigen_eeprom_r, atarigen_eeprom_w) AM_BASE_SIZE_MEMBER(badlands_state, atarigen.eeprom, atarigen.eeprom_size) |
| r7356 | r7357 | |
| 677 | 677 | 8*8 |
| 678 | 678 | }; |
| 679 | 679 | |
| 680 | static GFXDECODE_START( badlandb ) | |
| 680 | static GFXDECODE_START( badlandsb ) | |
| 681 | 681 | GFXDECODE_ENTRY( "gfx1", 0, pflayout_bootleg, 0, 8 ) |
| 682 | 682 | GFXDECODE_ENTRY( "gfx2", 0, molayout, 128, 8 ) |
| 683 | 683 | GFXDECODE_END |
| r7356 | r7357 | |
| 700 | 700 | |
| 701 | 701 | |
| 702 | 702 | |
| 703 | static MACHINE_RESET( badlandb ) | |
| 703 | static MACHINE_RESET( badlandsb ) | |
| 704 | 704 | { |
| 705 | 705 | badlands_state *state = (badlands_state *)machine->driver_data; |
| 706 | 706 | // state->pedal_value[0] = state->pedal_value[1] = 0x80; |
| r7356 | r7357 | |
| 713 | 713 | // memcpy(state->bank_base, &state->bank_source_data[0x0000], 0x1000); |
| 714 | 714 | } |
| 715 | 715 | |
| 716 | static MACHINE_DRIVER_START( badlandb ) | |
| 716 | static MACHINE_DRIVER_START( badlandsb ) | |
| 717 | 717 | MDRV_DRIVER_DATA(badlands_state) |
| 718 | 718 | |
| 719 | 719 | /* basic machine hardware */ |
| r7356 | r7357 | |
| 725 | 725 | // MDRV_CPU_PROGRAM_MAP(bootleg_soundmap) |
| 726 | 726 | |
| 727 | 727 | MDRV_MACHINE_START(badlands) |
| 728 | MDRV_MACHINE_RESET(badlandb) | |
| 728 | MDRV_MACHINE_RESET(badlandsb) | |
| 729 | 729 | MDRV_NVRAM_HANDLER(atarigen) |
| 730 | 730 | |
| 731 | 731 | /* video hardware */ |
| 732 | 732 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| 733 | MDRV_GFXDECODE(badlandb) | |
| 733 | MDRV_GFXDECODE(badlandsb) | |
| 734 | 734 | MDRV_PALETTE_LENGTH(256) |
| 735 | 735 | |
| 736 | 736 | MDRV_SCREEN_ADD("screen", RASTER) |
| r7356 | r7357 | |
| 785 | 785 | ROM_END |
| 786 | 786 | |
| 787 | 787 | |
| 788 | GAME( 1989, badlandsb, badlands, badlandb, badlands, 0, ROT0, "[Atari Games] (Playmark bootleg)", "Bad Lands (bootleg)", GAME_NOT_WORKING ) | |
| 788 | GAME( 1989, badlandsb, badlands, badlandsb, badlands, 0, ROT0, "[Atari Games] (Playmark bootleg)", "Bad Lands (bootleg)", GAME_NOT_WORKING ) |
| r7356 | r7357 | |
|---|---|---|
| 533 | 533 | PORT_DIPSETTING( 0xff, DEF_STR( Cocktail ) ) |
| 534 | 534 | INPUT_PORTS_END |
| 535 | 535 | |
| 536 | static INPUT_PORTS_START( spaceinj ) | |
| 536 | static INPUT_PORTS_START( spaceintj ) | |
| 537 | 537 | PORT_INCLUDE( spaceint ) |
| 538 | 538 | |
| 539 | 539 | PORT_MODIFY("IN1") |
| r7356 | r7357 | |
| 776 | 776 | GAME( 19??, kosmokil, kamikaze, kamikaze, kamikaze, kamikaze, ROT270, "bootleg", "Kosmo Killer", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // says >BEM< Mi Italy but it looks hacked in, dif revision of game tho. |
| 777 | 777 | GAME( 1979, spcking2, 0, spcking2, spcking2, spcking2, ROT270, "Konami", "Space King 2", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 778 | 778 | GAME( 1980, spaceint, 0, spaceint, spaceint, 0, ROT90, "Shoei", "Space Intruder", GAME_IMPERFECT_SOUND | GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) |
| 779 | GAME( 1980, spaceintj,spaceint, spaceint, spaceinj, | |
| 779 | GAME( 1980, spaceintj,spaceint, spaceint, spaceintj, |
| r7356 | r7357 | |
|---|---|---|
| 147 | 147 | #include "cpu/z80/z80.h" |
| 148 | 148 | #include "cpu/m68000/m68000.h" |
| 149 | 149 | #include "cpu/mcs51/mcs51.h" |
| 150 | #include "includes/s | |
| 150 | #include "includes/s | |
| 151 | 151 | #include "machine/8255ppi.h" |
| 152 | 152 | #include "machine/fd1089.h" |
| 153 | 153 | #include "machine/i8243.h" |
| 154 | 154 | #include "cpu/mcs48/mcs48.h" |
| 155 | 155 | #include "sound/dac.h" |
| 156 | 156 | #include "sound/2151intf.h" |
| 157 | #include "video/segaic16.h" | |
| 157 | 158 | |
| 158 | 159 | |
| 159 | 160 | /************************************* |
| r7356 | r7357 | |
| 164 | 165 | |
| 165 | 166 | static UINT16 *workram; |
| 166 | 167 | |
| 167 | static UINT8 video_control; | |
| 168 | static UINT8 mcu_control; | |
| 169 | static UINT8 mj_input_num; | |
| 170 | 168 | |
| 171 | static read16_space_func custom_io_r; | |
| 172 | static write16_space_func custom_io_w; | |
| 173 | static void (*lamp_changed_w)(UINT8 changed, UINT8 newval); | |
| 174 | static void (*i8751_vblank_hook)(running_machine *machine); | |
| 175 | ||
| 176 | static UINT8 n7751_command; | |
| 177 | static UINT32 n7751_rom_address; | |
| 178 | ||
| 179 | ||
| 180 | ||
| 181 | 169 | /************************************* |
| 182 | 170 | * |
| 183 | 171 | * Prototypes |
| r7356 | r7357 | |
| 218 | 206 | |
| 219 | 207 | static void system16a_generic_init(running_machine *machine) |
| 220 | 208 | { |
| 221 | /* call the generic init */ | |
| 222 | MACHINE_RESET_CALL(sys16_onetime); | |
| 209 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 223 | 210 | |
| 224 | 211 | /* init the FD1094 */ |
| 225 | 212 | fd1094_driver_init(machine, "maincpu", NULL); |
| 226 | 213 | |
| 227 | 214 | /* reset the custom handlers and other pointers */ |
| 228 | custom_io_r = NULL; | |
| 229 | custom_io_w = NULL; | |
| 230 | lamp_changed_w = NULL; | |
| 231 | i8751_vblank_hook = NULL; | |
| 215 | state->custom_io_r = NULL; | |
| 216 | state->custom_io_w = NULL; | |
| 217 | state->lamp_changed_w = NULL; | |
| 218 | state->i8751_vblank_hook = NULL; | |
| 219 | ||
| 220 | state->maincpu = devtag_get_device(machine, "maincpu"); | |
| 221 | state->soundcpu = devtag_get_device(machine, "soundcpu"); | |
| 222 | state->mcu = devtag_get_device(machine, "mcu"); | |
| 223 | state->ymsnd = devtag_get_device(machine, "ymsnd"); | |
| 224 | state->ppi8255 = devtag_get_device(machine, "ppi8255"); | |
| 225 | state->n7751 = devtag_get_device(machine, "n7751"); | |
| 232 | 226 | } |
| 233 | 227 | |
| 234 | 228 | |
| 235 | 229 | static TIMER_CALLBACK( suspend_i8751 ) |
| 236 | 230 | { |
| 237 | cputag_suspend(machine, "mcu", SUSPEND_REASON_DISABLE, 1); | |
| 231 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 232 | cpu_suspend(state->mcu, SUSPEND_REASON_DISABLE, 1); | |
| 238 | 233 | } |
| 239 | 234 | |
| 240 | 235 | |
| r7356 | r7357 | |
| 247 | 242 | |
| 248 | 243 | static MACHINE_START( system16a ) |
| 249 | 244 | { |
| 250 | state_save_register_global(machine, video_control); | |
| 251 | state_save_register_global(machine, mcu_control); | |
| 252 | state_save_register_global(machine, mj_input_num); | |
| 245 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 253 | 246 | |
| 254 | state_save_register_global(machine, n7751_command); | |
| 255 | state_save_register_global(machine, n7751_rom_address); | |
| 247 | state_save_register_global(machine, state->video_control); | |
| 248 | state_save_register_global(machine, state->mcu_control); | |
| 249 | state_save_register_global(machine, state->n7751_command); | |
| 250 | state_save_register_global(machine, state->n7751_rom_address); | |
| 251 | state_save_register_global(machine, state->mj_input_num); | |
| 252 | state_save_register_global(machine, state->last_buttons1); | |
| 253 | state_save_register_global(machine, state->last_buttons2); | |
| 254 | state_save_register_global(machine, state->read_port); | |
| 256 | 255 | } |
| 257 | 256 | |
| 258 | 257 | |
| 259 | 258 | static MACHINE_RESET( system16a ) |
| 260 | 259 | { |
| 260 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 261 | ||
| 261 | 262 | fd1094_machine_init(devtag_get_device(machine, "maincpu")); |
| 262 | 263 | |
| 263 | 264 | /* if we have a fake i8751 handler, disable the actual 8751 */ |
| 264 | if (i8751_vblank_hook != NULL) | |
| 265 | if (state->i8751_vblank_hook != NULL) | |
| 265 | 266 | timer_call_after_resynch(machine, NULL, 0, suspend_i8751); |
| 266 | 267 | |
| 267 | mcu_control = 0x00; | |
| 268 | state->mcu_control = 0x00; | |
| 268 | 269 | } |
| 269 | 270 | |
| 270 | 271 | |
| r7356 | r7357 | |
| 277 | 278 | |
| 278 | 279 | static TIMER_CALLBACK( delayed_ppi8255_w ) |
| 279 | 280 | { |
| 280 | ppi8255_w(devtag_get_device(machine, "ppi8255"), param >> 8, param & 0xff); | |
| 281 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 282 | ppi8255_w(state->ppi8255, param >> 8, param & 0xff); | |
| 281 | 283 | } |
| 282 | 284 | |
| 283 | 285 | |
| 284 | 286 | static READ16_HANDLER( standard_io_r ) |
| 285 | 287 | { |
| 288 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 286 | 289 | offset &= 0x3fff/2; |
| 287 | 290 | switch (offset & (0x3000/2)) |
| 288 | 291 | { |
| 289 | 292 | case 0x0000/2: |
| 290 | return ppi8255_r( | |
| 293 | return ppi8255_r(s | |
| 291 | 294 | |
| 292 | 295 | case 0x1000/2: |
| 293 | 296 | { |
| r7356 | r7357 | |
| 321 | 324 | |
| 322 | 325 | static READ16_HANDLER( misc_io_r ) |
| 323 | 326 | { |
| 324 | if (custom_io_r) | |
| 325 | return (*custom_io_r)(space, offset, mem_mask); | |
| 327 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 328 | ||
| 329 | if (state->custom_io_r) | |
| 330 | return (*state->custom_io_r)(space, offset, mem_mask); | |
| 326 | 331 | else |
| 327 | 332 | return standard_io_r(space, offset, mem_mask); |
| 328 | 333 | } |
| r7356 | r7357 | |
| 330 | 335 | |
| 331 | 336 | static WRITE16_HANDLER( misc_io_w ) |
| 332 | 337 | { |
| 333 | if (custom_io_w) | |
| 334 | (*custom_io_w)(space, offset, data, mem_mask); | |
| 338 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 339 | ||
| 340 | if (state->custom_io_w) | |
| 341 | (*state->custom_io_w)(space, offset, data, mem_mask); | |
| 335 | 342 | else |
| 336 | 343 | standard_io_w(space, offset, data, mem_mask); |
| 337 | 344 | } |
| r7356 | r7357 | |
| 358 | 365 | D1 : Coin meter #2 |
| 359 | 366 | D0 : Coin meter #1 |
| 360 | 367 | */ |
| 361 | running_device *mcu = devtag_get_device(device->machine, "mcu"); | |
| 362 | 368 | |
| 363 | if (((video_control ^ data) & 0x0c) && lamp_changed_w) | |
| 364 | (*lamp_changed_w)(video_control ^ data, data); | |
| 365 | video_control = data; | |
| 369 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 366 | 370 | |
| 371 | if (((state->video_control ^ data) & 0x0c) && state->lamp_changed_w) | |
| 372 | (*state->lamp_changed_w)(device->machine, state->video_control ^ data, data); | |
| 373 | state->video_control = data; | |
| 374 | ||
| 367 | 375 | segaic16_tilemap_set_flip(device->machine, 0, data & 0x80); |
| 368 | 376 | segaic16_sprites_set_flip(device->machine, 0, data & 0x80); |
| 369 | 377 | |
| 370 | if (mcu != NULL) | |
| 371 | cpu_set_input_line(mcu, MCS51_INT1_LINE, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); | |
| 378 | if (state->mcu != NULL) | |
| 379 | cpu_set_input_line(state->mcu, MCS51_INT1_LINE, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); | |
| 372 | 380 | |
| 373 | 381 | segaic16_set_display_enable(device->machine, data & 0x10); |
| 374 | 382 | set_led_status(device->machine, 1, data & 0x08); |
| r7356 | r7357 | |
| 401 | 409 | 0= Sound is disabled |
| 402 | 410 | 1= sound is enabled |
| 403 | 411 | */ |
| 404 | cputag_set_input_line(device->machine, "soundcpu", INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 412 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 413 | ||
| 414 | cpu_set_input_line(state->soundcpu, INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 405 | 415 | segaic16_tilemap_set_colscroll(device->machine, 0, ~data & 0x04); |
| 406 | 416 | segaic16_tilemap_set_rowscroll(device->machine, 0, ~data & 0x02); |
| 407 | 417 | } |
| r7356 | r7357 | |
| 416 | 426 | |
| 417 | 427 | static READ8_HANDLER( sound_data_r ) |
| 418 | 428 | { |
| 429 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 430 | ||
| 419 | 431 | /* assert ACK */ |
| 420 | ppi8255_set_port_c( | |
| 432 | ppi8255_set_port_c(s | |
| 421 | 433 | return soundlatch_r(space, offset); |
| 422 | 434 | } |
| 423 | 435 | |
| r7356 | r7357 | |
| 434 | 446 | D1 = /CS for ROM 0 |
| 435 | 447 | D0 = A14 line to ROMs |
| 436 | 448 | */ |
| 449 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 450 | ||
| 437 | 451 | int numroms = memory_region_length(space->machine, "n7751data") / 0x8000; |
| 438 | n7751_rom_address &= 0x3fff; | |
| 439 | n7751_rom_address |= (data & 0x01) << 14; | |
| 440 | if (!(data & 0x02) && numroms >= 1) n7751_rom_address |= 0x00000; | |
| 441 | if (!(data & 0x04) && numroms >= 2) n7751_rom_address |= 0x08000; | |
| 442 | if (!(data & 0x08) && numroms >= 3) n7751_rom_address |= 0x10000; | |
| 443 | if (!(data & 0x10) && numroms >= 4) n7751_rom_address |= 0x18000; | |
| 444 | n7751_command = data >> 5; | |
| 452 | state->n7751_rom_address &= 0x3fff; | |
| 453 | state->n7751_rom_address |= (data & 0x01) << 14; | |
| 454 | if (!(data & 0x02) && numroms >= 1) state->n7751_rom_address |= 0x00000; | |
| 455 | if (!(data & 0x04) && numroms >= 2) state->n7751_rom_address |= 0x08000; | |
| 456 | if (!(data & 0x08) && numroms >= 3) state->n7751_rom_address |= 0x10000; | |
| 457 | if (!(data & 0x10) && numroms >= 4) state->n7751_rom_address |= 0x18000; | |
| 458 | state->n7751_command = data >> 5; | |
| 445 | 459 | } |
| 446 | 460 | |
| 447 | 461 | |
| r7356 | r7357 | |
| 453 | 467 | D1 = /RESET line on 7751 |
| 454 | 468 | D0 = /IRQ line on 7751 |
| 455 | 469 | */ |
| 456 | cputag_set_input_line(device->machine, "n7751", INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); | |
| 457 | cputag_set_input_line(device->machine, "n7751", 0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE); | |
| 470 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 471 | ||
| 472 | cpu_set_input_line(state->n7751, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); | |
| 473 | cpu_set_input_line(state->n7751, 0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE); | |
| 458 | 474 | cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(100)); |
| 459 | 475 | } |
| 460 | 476 | |
| r7356 | r7357 | |
| 465 | 481 | /* P5 - address lines 4-7 */ |
| 466 | 482 | /* P6 - address lines 8-11 */ |
| 467 | 483 | /* P7 - address lines 12-13 */ |
| 484 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 485 | ||
| 468 | 486 | int mask = (0xf << (4 * offset)) & 0x3fff; |
| 469 | 487 | int newdata = (data << (4 * offset)) & mask; |
| 470 | n7751_rom_address = (n7751_rom_address & ~mask) | newdata; | |
| 488 | state->n7751_rom_address = (state->n7751_rom_address & ~mask) | newdata; | |
| 471 | 489 | } |
| 472 | 490 | |
| 473 | 491 | |
| 474 | 492 | static READ8_HANDLER( n7751_rom_r ) |
| 475 | 493 | { |
| 476 | 494 | /* read from BUS */ |
| 477 | return memory_region(space->machine, "n7751data")[n7751_rom_address]; | |
| 495 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 496 | return memory_region(space->machine, "n7751data")[state->n7751_rom_address]; | |
| 478 | 497 | } |
| 479 | 498 | |
| 480 | 499 | |
| r7356 | r7357 | |
| 482 | 501 | { |
| 483 | 502 | /* read from P2 - 8255's PC0-2 connects to 7751's S0-2 (P24-P26 on an 8048) */ |
| 484 | 503 | /* bit 0x80 is an alternate way to control the sample on/off; doesn't appear to be used */ |
| 485 | return 0x80 | ((n7751_command & 0x07) << 4) | (i8243_p2_r(device, offset) & 0x0f); | |
| 504 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 505 | return 0x80 | ((state->n7751_command & 0x07) << 4) | (i8243_p2_r(device, offset) & 0x0f); | |
| 486 | 506 | } |
| 487 | 507 | |
| 488 | 508 | |
| r7356 | r7357 | |
| 513 | 533 | static INTERRUPT_GEN( i8751_main_cpu_vblank ) |
| 514 | 534 | { |
| 515 | 535 | /* if we have a fake 8751 handler, call it on VBLANK */ |
| 516 | if (i8751_vblank_hook != NULL) | |
| 517 | (*i8751_vblank_hook)(device->machine); | |
| 536 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 537 | ||
| 538 | if (state->i8751_vblank_hook != NULL) | |
| 539 | (*state->i8751_vblank_hook)(device->machine); | |
| 518 | 540 | } |
| 519 | 541 | |
| 520 | 542 | |
| r7356 | r7357 | |
| 527 | 549 | |
| 528 | 550 | static void dumpmtmt_i8751_sim(running_machine *machine) |
| 529 | 551 | { |
| 552 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 530 | 553 | UINT8 flag = workram[0x200/2] >> 8; |
| 531 | 554 | UINT8 tick = workram[0x200/2] & 0xff; |
| 532 | 555 | UINT8 sec = workram[0x202/2] >> 8; |
| 533 | 556 | UINT8 min = workram[0x202/2] & 0xff; |
| 534 | 557 | |
| 535 | 558 | /* signal a VBLANK to the main CPU */ |
| 536 | cpu | |
| 559 | cpu | |
| 537 | 560 | |
| 538 | 561 | /* out of time? set the flag */ |
| 539 | 562 | if (tick == 0 && sec == 0 && min == 0) |
| r7356 | r7357 | |
| 572 | 595 | |
| 573 | 596 | static void quartet_i8751_sim(running_machine *machine) |
| 574 | 597 | { |
| 575 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 598 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 599 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 576 | 600 | |
| 577 | 601 | /* signal a VBLANK to the main CPU */ |
| 578 | cpu | |
| 602 | cpu | |
| 579 | 603 | |
| 580 | 604 | /* X scroll values */ |
| 581 | 605 | segaic16_textram_0_w(space, 0xff8/2, workram[0x0d14/2], 0xffff); |
| r7356 | r7357 | |
| 596 | 620 | |
| 597 | 621 | static READ16_HANDLER( aceattaa_custom_io_r ) |
| 598 | 622 | { |
| 623 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 624 | ||
| 599 | 625 | switch (offset & (0x3000/2)) |
| 600 | 626 | { |
| 601 | 627 | case 0x1000/2: |
| r7356 | r7357 | |
| 603 | 629 | { |
| 604 | 630 | case 0x01: |
| 605 | 631 | { |
| 606 | switch (video_control & 0xf) | |
| 632 | switch (state->video_control & 0xf) | |
| 607 | 633 | { |
| 608 | 634 | case 0x00: return input_port_read(space->machine, "P1"); |
| 609 | 635 | case 0x04: return input_port_read(space->machine, "ANALOGX1"); |
| r7356 | r7357 | |
| 618 | 644 | |
| 619 | 645 | case 0x03: |
| 620 | 646 | { |
| 621 | switch (video_control & 0xf) | |
| 647 | switch (state->video_control & 0xf) | |
| 622 | 648 | { |
| 623 | 649 | case 0x00: return input_port_read(space->machine, "P2"); |
| 624 | 650 | case 0x04: return input_port_read(space->machine, "ANALOGX2"); |
| r7356 | r7357 | |
| 644 | 670 | |
| 645 | 671 | static READ16_HANDLER( mjleague_custom_io_r ) |
| 646 | 672 | { |
| 673 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 674 | ||
| 647 | 675 | switch (offset & (0x3000/2)) |
| 648 | 676 | { |
| 649 | 677 | case 0x1000/2: |
| r7356 | r7357 | |
| 654 | 682 | case 0: |
| 655 | 683 | { |
| 656 | 684 | UINT8 buttons = input_port_read(space->machine, "SERVICE"); |
| 657 | UINT8 analog1 = input_port_read(space->machine, (video_control & 4) ? "ANALOGY1" : "ANALOGX1"); | |
| 658 | UINT8 analog2 = input_port_read(space->machine, (video_control & 4) ? "ANALOGY2" : "ANALOGX2"); | |
| 685 | UINT8 analog1 = input_port_read(space->machine, (state->video_control & 4) ? "ANALOGY1" : "ANALOGX1"); | |
| 686 | UINT8 analog2 = input_port_read(space->machine, (state->video_control & 4) ? "ANALOGY2" : "ANALOGX2"); | |
| 659 | 687 | buttons |= (analog1 & 0x80) >> 1; |
| 660 | 688 | buttons |= (analog2 & 0x80); |
| 661 | 689 | return buttons; |
| r7356 | r7357 | |
| 666 | 694 | case 1: |
| 667 | 695 | { |
| 668 | 696 | UINT8 buttons = input_port_read(space->machine, "BUTTONS1"); |
| 669 | UINT8 analog = input_port_read(space->machine, (video_control & 4) ? "ANALOGY1" : "ANALOGX1"); | |
| 697 | UINT8 analog = input_port_read(space->machine, (state->video_control & 4) ? "ANALOGY1" : "ANALOGX1"); | |
| 670 | 698 | return (buttons & 0x80) | (analog & 0x7f); |
| 671 | 699 | } |
| 672 | 700 | |
| 673 | 701 | /* offset 2 contains either the batting control or the "stance" button state */ |
| 674 | 702 | case 2: |
| 675 | 703 | { |
| 676 | if (video_control & 4) | |
| 704 | if (state->video_control & 4) | |
| 677 | 705 | return (input_port_read(space->machine, "ANALOGZ1") >> 4) | (input_port_read(space->machine, "ANALOGZ2") & 0xf0); |
| 678 | 706 | else |
| 679 | 707 | { |
| 680 | static UINT8 last_buttons1 = 0; | |
| 681 | static UINT8 last_buttons2 = 0; | |
| 682 | 708 | UINT8 buttons1 = input_port_read(space->machine, "BUTTONS1"); |
| 683 | 709 | UINT8 buttons2 = input_port_read(space->machine, "BUTTONS2"); |
| 684 | 710 | |
| 685 | 711 | if (!(buttons1 & 0x01)) |
| 686 | last_buttons1 = 0; | |
| 712 | state->last_buttons1 = 0; | |
| 687 | 713 | else if (!(buttons1 & 0x02)) |
| 688 | last_buttons1 = 1; | |
| 714 | state->last_buttons1 = 1; | |
| 689 | 715 | else if (!(buttons1 & 0x04)) |
| 690 | last_buttons1 = 2; | |
| 716 | state->last_buttons1 = 2; | |
| 691 | 717 | else if (!(buttons1 & 0x08)) |
| 692 | last_buttons1 = 3; | |
| 718 | state->last_buttons1 = 3; | |
| 693 | 719 | |
| 694 | 720 | if (!(buttons2 & 0x01)) |
| 695 | last_buttons2 = 0; | |
| 721 | state->last_buttons2 = 0; | |
| 696 | 722 | else if (!(buttons2 & 0x02)) |
| 697 | last_buttons2 = 1; | |
| 723 | state->last_buttons2 = 1; | |
| 698 | 724 | else if (!(buttons2 & 0x04)) |
| 699 | last_buttons2 = 2; | |
| 725 | state->last_buttons2 = 2; | |
| 700 | 726 | else if (!(buttons2 & 0x08)) |
| 701 | last_buttons2 = 3; | |
| 727 | state->last_buttons2 = 3; | |
| 702 | 728 | |
| 703 | return last_buttons1 | (last_buttons2 << 4); | |
| 729 | return state->last_buttons1 | (state->last_buttons2 << 4); | |
| 704 | 730 | } |
| 705 | 731 | } |
| 706 | 732 | |
| r7356 | r7357 | |
| 709 | 735 | case 3: |
| 710 | 736 | { |
| 711 | 737 | UINT8 buttons = input_port_read(space->machine, "BUTTONS2"); |
| 712 | UINT8 analog = input_port_read(space->machine, (video_control & 4) ? "ANALOGY2" : "ANALOGX2"); | |
| 738 | UINT8 analog = input_port_read(space->machine, (state->video_control & 4) ? "ANALOGY2" : "ANALOGX2"); | |
| 713 | 739 | return (buttons & 0x80) | (analog & 0x7f); |
| 714 | 740 | } |
| 715 | 741 | } |
| r7356 | r7357 | |
| 728 | 754 | |
| 729 | 755 | static READ16_HANDLER( passsht16a_custom_io_r ) |
| 730 | 756 | { |
| 731 | static int read_port = 0; | |
| 757 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 758 | ||
| 732 | 759 | switch (offset & (0x3000/2)) |
| 733 | 760 | { |
| 734 | 761 | case 0x1000/2: |
| 735 | 762 | switch (offset & 3) |
| 736 | 763 | { |
| 737 | 764 | case 0: |
| 738 | read_port = 0; | |
| 765 | state->read_port = 0; | |
| 739 | 766 | break; |
| 740 | 767 | |
| 741 | 768 | case 1: |
| 742 | switch ((read_port++)&3) | |
| 769 | switch ((state->read_port++) & 3) | |
| 743 | 770 | { |
| 744 | 771 | case 0: return input_port_read(space->machine, "P1"); |
| 745 | 772 | case 1: return input_port_read(space->machine, "P2"); |
| r7356 | r7357 | |
| 764 | 791 | |
| 765 | 792 | static READ16_HANDLER( sdi_custom_io_r ) |
| 766 | 793 | { |
| 794 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 795 | ||
| 767 | 796 | switch (offset & (0x3000/2)) |
| 768 | 797 | { |
| 769 | 798 | case 0x1000/2: |
| 770 | 799 | switch (offset & 3) |
| 771 | 800 | { |
| 772 | case 1: return input_port_read(space->machine, (video_control & 4) ? "ANALOGY1" : "ANALOGX1"); | |
| 773 | case 3: return input_port_read(space->machine, (video_control & 4) ? "ANALOGY2" : "ANALOGX2"); | |
| 801 | case 1: return input_port_read(space->machine, (state->video_control & 4) ? "ANALOGY1" : "ANALOGX1"); | |
| 802 | case 3: return input_port_read(space->machine, (state->video_control & 4) ? "ANALOGY2" : "ANALOGX2"); | |
| 774 | 803 | } |
| 775 | 804 | break; |
| 776 | 805 | } |
| r7356 | r7357 | |
| 787 | 816 | |
| 788 | 817 | static READ16_HANDLER( sjryuko_custom_io_r ) |
| 789 | 818 | { |
| 819 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 820 | ||
| 790 | 821 | static const char *const portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" }; |
| 791 | 822 | switch (offset & (0x3000/2)) |
| 792 | 823 | { |
| r7356 | r7357 | |
| 794 | 825 | switch (offset & 3) |
| 795 | 826 | { |
| 796 | 827 | case 1: |
| 797 | if (input_port_read_safe(space->machine, portname[mj_input_num], 0xff) != 0xff) | |
| 798 | return 0xff & ~(1 << mj_input_num); | |
| 828 | if (input_port_read_safe(space->machine, portname[state->mj_input_num], 0xff) != 0xff) | |
| 829 | return 0xff & ~(1 << state->mj_input_num); | |
| 799 | 830 | return 0xff; |
| 800 | 831 | |
| 801 | 832 | case 2: |
| 802 | return input_port_read_safe(space->machine, portname[mj_input_num], 0xff); | |
| 833 | return input_port_read_safe(space->machine, portname[state->mj_input_num], 0xff); | |
| 803 | 834 | } |
| 804 | 835 | break; |
| 805 | 836 | } |
| r7356 | r7357 | |
| 807 | 838 | } |
| 808 | 839 | |
| 809 | 840 | |
| 810 | static void sjryuko_lamp_changed_w(UINT8 changed, UINT8 newval) | |
| 841 | static void sjryuko_lamp_changed_w(running_machine *machine, UINT8 changed, UINT8 newval) | |
| 811 | 842 | { |
| 843 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 844 | ||
| 812 | 845 | if ((changed & 4) && (newval & 4)) |
| 813 | mj_input_num = (mj_input_num + 1) % 6; | |
| 846 | state->mj_input_num = (state->mj_input_num + 1) % 6; | |
| 814 | 847 | } |
| 815 | 848 | |
| 816 | 849 | |
| r7356 | r7357 | |
| 823 | 856 | |
| 824 | 857 | INLINE UINT8 maincpu_byte_r(running_machine *machine, offs_t offset) |
| 825 | 858 | { |
| 826 | return memory_read_byte(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), offset); | |
| 859 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 860 | return memory_read_byte(cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM), offset); | |
| 827 | 861 | } |
| 828 | 862 | |
| 829 | 863 | |
| 830 | 864 | INLINE void maincpu_byte_w(running_machine *machine, offs_t offset, UINT8 data) |
| 831 | 865 | { |
| 832 | memory_write_byte(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), offset, data); | |
| 866 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 867 | memory_write_byte(cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM), offset, data); | |
| 833 | 868 | } |
| 834 | 869 | |
| 835 | 870 | |
| 836 | 871 | static WRITE8_HANDLER( mcu_control_w ) |
| 837 | 872 | { |
| 838 | | |
| 873 | se | |
| 839 | 874 | int irqline; |
| 840 | 875 | |
| 841 | cpu_set_input_line(maincpu, INPUT_LINE_RESET, (data & 0x40) ? ASSERT_LINE : CLEAR_LINE); | |
| 876 | cpu_set_input_line(state->maincpu, INPUT_LINE_RESET, (data & 0x40) ? ASSERT_LINE : CLEAR_LINE); | |
| 842 | 877 | for (irqline = 1; irqline <= 7; irqline++) |
| 843 | cpu_set_input_line(maincpu, irqline, ((~data & 7) == irqline) ? ASSERT_LINE : CLEAR_LINE); | |
| 878 | cpu_set_input_line(state->maincpu, irqline, ((~data & 7) == irqline) ? ASSERT_LINE : CLEAR_LINE); | |
| 844 | 879 | |
| 845 | 880 | if (data & 0x40) |
| 846 | 881 | segaic16_set_display_enable(space->machine, 1); |
| 847 | 882 | |
| 848 | if ((mcu_control ^ data) & 0x40) | |
| 883 | if ((state->mcu_control ^ data) & 0x40) | |
| 849 | 884 | cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(10)); |
| 850 | 885 | |
| 851 | mcu_control = data; | |
| 886 | state->mcu_control = data; | |
| 852 | 887 | } |
| 853 | 888 | |
| 854 | 889 | |
| r7356 | r7357 | |
| 862 | 897 | 1.11 0... = checksum #1 |
| 863 | 898 | 1.11 1... = checksum #2 |
| 864 | 899 | */ |
| 865 | switch ((mcu_control >> 3) & 7) | |
| 900 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 901 | ||
| 902 | switch ((state->mcu_control >> 3) & 7) | |
| 866 | 903 | { |
| 867 | 904 | case 0: |
| 868 | 905 | if (offset >= 0x4000 && offset < 0x8000) |
| r7356 | r7357 | |
| 871 | 908 | maincpu_byte_w(space->machine, 0xc40001 ^ (offset & 0x3fff), data); |
| 872 | 909 | else |
| 873 | 910 | logerror("%03X: MCU movx write mode %02X offset %04X = %02X\n", |
| 874 | cpu_get_pc(space->cpu), mcu_control, offset, data); | |
| 911 | cpu_get_pc(space->cpu), state->mcu_control, offset, data); | |
| 875 | 912 | break; |
| 876 | 913 | |
| 877 | 914 | case 1: |
| r7356 | r7357 | |
| 879 | 916 | maincpu_byte_w(space->machine, 0x410001 ^ (offset & 0xfff), data); |
| 880 | 917 | else |
| 881 | 918 | logerror("%03X: MCU movx write mode %02X offset %04X = %02X\n", |
| 882 | cpu_get_pc(space->cpu), mcu_control, offset, data); | |
| 919 | cpu_get_pc(space->cpu), state->mcu_control, offset, data); | |
| 883 | 920 | break; |
| 884 | 921 | |
| 885 | 922 | case 3: |
| r7356 | r7357 | |
| 893 | 930 | |
| 894 | 931 | default: |
| 895 | 932 | logerror("%03X: MCU movx write mode %02X offset %04X = %02X\n", |
| 896 | cpu_get_pc(space->cpu), mcu_control, offset, data); | |
| 933 | cpu_get_pc(space->cpu), state->mcu_control, offset, data); | |
| 897 | 934 | break; |
| 898 | 935 | } |
| 899 | 936 | } |
| r7356 | r7357 | |
| 901 | 938 | |
| 902 | 939 | static READ8_HANDLER( mcu_io_r ) |
| 903 | 940 | { |
| 904 | switch ((mcu_control >> 3) & 7) | |
| 941 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 942 | ||
| 943 | switch ((state->mcu_control >> 3) & 7) | |
| 905 | 944 | { |
| 906 | 945 | case 0: |
| 907 | 946 | if (offset >= 0x0000 && offset < 0x3fff) |
| r7356 | r7357 | |
| 911 | 950 | else if (offset >= 0x8000 && offset < 0xc000) |
| 912 | 951 | return maincpu_byte_r(space->machine, 0xc40001 ^ (offset & 0x3fff)); |
| 913 | 952 | logerror("%03X: MCU movx read mode %02X offset %04X\n", |
| 914 | cpu_get_pc(space->cpu), mcu_control, offset); | |
| 953 | cpu_get_pc(space->cpu), state->mcu_control, offset); | |
| 915 | 954 | return 0xff; |
| 916 | 955 | |
| 917 | 956 | case 1: |
| 918 | 957 | if (offset >= 0x8000 && offset < 0x9000) |
| 919 | 958 | return maincpu_byte_r(space->machine, 0x410001 ^ (offset & 0xfff)); |
| 920 | 959 | logerror("%03X: MCU movx read mode %02X offset %04X\n", |
| 921 | cpu_get_pc(space->cpu), mcu_control, offset); | |
| 960 | cpu_get_pc(space->cpu), state->mcu_control, offset); | |
| 922 | 961 | return 0xff; |
| 923 | 962 | |
| 924 | 963 | case 3: |
| r7356 | r7357 | |
| 933 | 972 | |
| 934 | 973 | default: |
| 935 | 974 | logerror("%03X: MCU movx read mode %02X offset %04X\n", |
| 936 | cpu_get_pc(space->cpu), mcu_control, offset); | |
| 975 | cpu_get_pc(space->cpu), state->mcu_control, offset); | |
| 937 | 976 | return 0xff; |
| 938 | 977 | } |
| 939 | 978 | } |
| r7356 | r7357 | |
| 1914 | 1953 | |
| 1915 | 1954 | static MACHINE_DRIVER_START( system16a ) |
| 1916 | 1955 | |
| 1956 | /* driver data */ | |
| 1957 | MDRV_DRIVER_DATA(segas1x_state) | |
| 1958 | ||
| 1917 | 1959 | /* basic machine hardware */ |
| 1918 | 1960 | MDRV_CPU_ADD("maincpu", M68000, 10000000) |
| 1919 | 1961 | MDRV_CPU_PROGRAM_MAP(system16a_map) |
| r7356 | r7357 | |
| 3320 | 3362 | |
| 3321 | 3363 | static DRIVER_INIT( aceattaa ) |
| 3322 | 3364 | { |
| 3365 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 3366 | ||
| 3323 | 3367 | system16a_generic_init(machine); |
| 3324 | custom_io_r = aceattaa_custom_io_r; | |
| 3368 | state->custom_io_r = aceattaa_custom_io_r; | |
| 3325 | 3369 | } |
| 3326 | 3370 | |
| 3327 | 3371 | |
| r7356 | r7357 | |
| 3341 | 3385 | |
| 3342 | 3386 | static DRIVER_INIT( dumpmtmt ) |
| 3343 | 3387 | { |
| 3388 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 3389 | ||
| 3344 | 3390 | system16a_generic_init(machine); |
| 3345 | i8751_vblank_hook = dumpmtmt_i8751_sim; | |
| 3391 | state->i8751_vblank_hook = dumpmtmt_i8751_sim; | |
| 3346 | 3392 | } |
| 3347 | 3393 | |
| 3348 | 3394 | |
| 3349 | 3395 | static DRIVER_INIT( mjleague ) |
| 3350 | 3396 | { |
| 3397 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 3398 | ||
| 3351 | 3399 | system16a_generic_init(machine); |
| 3352 | custom_io_r = mjleague_custom_io_r; | |
| 3400 | state->custom_io_r = mjleague_custom_io_r; | |
| 3353 | 3401 | } |
| 3354 | 3402 | |
| 3355 | 3403 | static DRIVER_INIT( passsht16a ) |
| 3356 | 3404 | { |
| 3405 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 3406 | ||
| 3357 | 3407 | system16a_generic_init(machine); |
| 3358 | custom_io_r = passsht16a_custom_io_r; | |
| 3408 | state->custom_io_r = passsht16a_custom_io_r; | |
| 3359 | 3409 | } |
| 3360 | 3410 | |
| 3361 | 3411 | static DRIVER_INIT( quartet ) |
| 3362 | 3412 | { |
| 3413 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 3414 | ||
| 3363 | 3415 | system16a_generic_init(machine); |
| 3364 | i8751_vblank_hook = quartet_i8751_sim; | |
| 3416 | state->i8751_vblank_hook = quartet_i8751_sim; | |
| 3365 | 3417 | } |
| 3366 | 3418 | |
| 3367 | 3419 | |
| 3368 | 3420 | static DRIVER_INIT( sdi ) |
| 3369 | 3421 | { |
| 3422 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 3423 | ||
| 3370 | 3424 | system16a_generic_init(machine); |
| 3371 | 3425 | fd1089b_decrypt(machine); |
| 3372 | custom_io_r = sdi_custom_io_r; | |
| 3426 | state->custom_io_r = sdi_custom_io_r; | |
| 3373 | 3427 | } |
| 3374 | 3428 | |
| 3375 | 3429 | |
| 3376 | 3430 | static DRIVER_INIT( sjryukoa ) |
| 3377 | 3431 | { |
| 3432 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 3433 | ||
| 3378 | 3434 | system16a_generic_init(machine); |
| 3379 | 3435 | fd1089b_decrypt(machine); |
| 3380 | custom_io_r = sjryuko_custom_io_r; | |
| 3381 | lamp_changed_w = sjryuko_lamp_changed_w; | |
| 3436 | state->custom_io_r = sjryuko_custom_io_r; | |
| 3437 | state->lamp_changed_w = sjryuko_lamp_changed_w; | |
| 3382 | 3438 | } |
| 3383 | 3439 | |
| 3384 | 3440 | |
| r7356 | r7357 | |
| 3390 | 3446 | *************************************/ |
| 3391 | 3447 | |
| 3392 | 3448 | /* "Pre-System 16" */ |
| 3393 | GAME( 1986, bodyslam, 0, system16a_8751, bodyslam, generic_16a, ROT0, "Sega", "Body Slam (8751 317-0015)", 0 ) | |
| 3394 | GAME( 1986, dumpmtmt, bodyslam, system16a_8751, bodyslam, dumpmtmt, ROT0, "Sega", "Dump Matsumoto (Japan, 8751 317-0011a)", GAME_UNEMULATED_PROTECTION ) | |
| 3395 | GAME( 1985, mjleague, 0, system16a, mjleague, mjleague, ROT270, "Sega", "Major League", 0 ) | |
| 3396 | GAME( 1986, quartet, 0, system16a_8751, quartet, quartet, ROT0, "Sega", "Quartet (Rev A, 8751 315-5194)", GAME_UNEMULATED_PROTECTION ) | |
| 3397 | GAME( 1986, quarteta, quartet, system16a_8751, quartet, quartet, ROT0, "Sega", "Quartet (8751 315-5194)", GAME_UNEMULATED_PROTECTION ) | |
| 3398 | GAME( 1986, quartet2, quartet, system16a_8751, quart2, generic_16a, ROT0, "Sega", "Quartet 2 (8751 317-0010)", 0 ) | |
| 3399 | GAME( 1986, quartet2a, quartet, system16a, quart2, generic_16a, ROT0, "Sega", "Quartet 2 (unprotected)", 0 ) | |
| 3449 | GAME( 1986, bodyslam, 0, system16a_8751, bodyslam, generic_16a, ROT0, "Sega", "Body Slam (8751 317-0015)", GAME_SUPPORTS_SAVE ) | |
| 3450 | GAME( 1986, dumpmtmt, bodyslam, system16a_8751, bodyslam, dumpmtmt, ROT0, "Sega", "Dump Matsumoto (Japan, 8751 317-0011a)", GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) | |
| 3451 | GAME( 1985, mjleague, 0, system16a, mjleague, mjleague, ROT270, "Sega", "Major League", GAME_SUPPORTS_SAVE ) | |
| 3452 | GAME( 1986, quartet, 0, system16a_8751, quartet, quartet, ROT0, "Sega", "Quartet (Rev A, 8751 315-5194)", GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) | |
| 3453 | GAME( 1986, quarteta, quartet, system16a_8751, quartet, quartet, ROT0, "Sega", "Quartet (8751 315-5194)", GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) | |
| 3454 | GAME( 1986, quartet2, quartet, system16a_8751, quart2, generic_16a, ROT0, "Sega", "Quartet 2 (8751 317-0010)", GAME_SUPPORTS_SAVE ) | |
| 3455 | GAME( 1986, quartet2a, quartet, system16a, quart2, generic_16a, ROT0, "Sega", "Quartet 2 (unprotected)", GAME_SUPPORTS_SAVE ) | |
| 3400 | 3456 | |
| 3401 | 3457 | /* System 16A */ |
| 3402 | GAME( 1987, aliensyn5, aliensyn, system16a, aliensyn, fd1089b_16a, ROT0, "Sega", "Alien Syndrome (set 5, System 16A, FD1089B 317-0037)", 0 ) | |
| 3403 | GAME( 1987, aliensyn2, aliensyn, system16a, aliensyn, fd1089a_16a, ROT0, "Sega", "Alien Syndrome (set 2, System 16A, FD1089A 317-0033)", 0 ) | |
| 3404 | GAME( 1987, aliensynjo, aliensyn, system16a, aliensynj, fd1089a_16a, ROT0, "Sega", "Alien Syndrome (set 1, Japan, old, System 16A, FD1089A 317-0033)", 0 ) | |
| 3405 | GAME( 1988, aceattaca, aceattac, system16a , aceattaa, aceattaa, ROT270, "Sega", "Ace Attacker (Japan, System 16A, FD1094 317-0060)", 0 ) | |
| 3406 | GAME( 1986, afighter, 0, system16a_no7751, afighter, fd1089a_16a, ROT270, "Sega", "Action Fighter (FD1089A 317-0018)", 0 ) | |
| 3407 | GAME( 1986, alexkidd, 0, system16a, alexkidd, generic_16a, ROT0, "Sega", "Alex Kidd: The Lost Stars (set 2, unprotected)", 0 ) | |
| 3408 | GAME( 1986, alexkidd1, alexkidd, system16a, alexkidd, fd1089a_16a, ROT0, "Sega", "Alex Kidd: The Lost Stars (set 1, FD1089A 317-0021)", 0 ) | |
| 3409 | GAME( 1986, fantzone, 0, system16a_no7751, fantzone, generic_16a, ROT0, "Sega", "Fantasy Zone (set 2, unprotected)", 0 ) | |
| 3410 | GAME( 1986, fantzone1, fantzone, system16a_no7751, fantzone, generic_16a, ROT0, "Sega", "Fantasy Zone (set 1, unprotected)", 0 ) | |
| 3411 | GAME( 1988, passsht16a, passsht, system16a, passsht16a, passsht16a, ROT270, "Sega", "Passing Shot (Japan, 4 Players, System 16A, FD1094 317-0071)", 0 ) | |
| 3412 | GAME( 1987, sdi, 0, system16a_no7751, sdi, sdi, ROT0, "Sega", "SDI - Strategic Defense Initiative (Japan, old, System 16A, FD1089B 317-0027)", 0 ) | |
| 3413 | GAME( 1987, shinobi, 0, system16a, shinobi, generic_16a, ROT0, "Sega", "Shinobi (set 6, System 16A, unprotected)", 0 ) | |
| 3414 | GAME( 1987, shinobi1, shinobi, system16a, shinobi, generic_16a, ROT0, "Sega", "Shinobi (set 1, System 16A, FD1094 317-0050)", 0 ) | |
| 3415 | GAME( 1987, shinobls, shinobi, system16a, shinobi, generic_16a, ROT0, "[Sega] (Star bootleg)", "Shinobi (Star bootleg, System 16A)", 0 ) | |
| 3416 | GAME( 1987, shinoblb, shinobi, system16a, shinobi, generic_16a, ROT0, "[Sega] (Beta bootleg)", "Shinobi (Beta bootleg)", 0 ) // should have different sound hw? using original ATM | |
| 3417 | GAME( 1987, sjryuko1, sjryuko, system16a, sjryuko, sjryukoa, ROT0, "White Board", "Sukeban Jansi Ryuko (set 1, System 16A, FD1089B 317-5021)", 0 ) | |
| 3418 | GAME( 1988, tetris, 0, system16a_no7751, tetris, generic_16a, ROT0, "Sega", "Tetris (set 4, Japan, System 16A, FD1094 317-0093)", 0 ) | |
| 3419 | GAME( 1988, tetris3, tetris, system16a_no7751, tetris, generic_16a, ROT0, "Sega", "Tetris (set 3, Japan, System 16A, FD1094 317-0093a)", 0 ) | |
| 3420 | GAME( 1987, timescan1, timescan, system16a, timescan, fd1089b_16a, ROT270, "Sega", "Time Scanner (set 1, System 16A, FD1089B 317-0024)", 0 ) | |
| 3421 | GAME( 1988, wb31, wb3, system16a_no7751, wb3, generic_16a, ROT0, "Sega / Westone", "Wonder Boy III - Monster Lair (set 1, System 16A, FD1094 317-0084)", 0 ) | |
| 3422 | GAME( 1988, wb35, wb3, system16a_no7751, wb3, fd1089a_16a, ROT0, "Sega / Westone", "Wonder Boy III - Monster Lair (set 5, System 16A, FD1089A 317-xxxx)", GAME_NOT_WORKING ) | |
| 3458 | GAME( 1987, aliensyn5, aliensyn, system16a, aliensyn, fd1089b_16a, ROT0, "Sega", "Alien Syndrome (set 5, System 16A, FD1089B 317-0037)", GAME_SUPPORTS_SAVE ) | |
| 3459 | GAME( 1987, aliensyn2, aliensyn, system16a, aliensyn, fd1089a_16a, ROT0, "Sega", "Alien Syndrome (set 2, System 16A, FD1089A 317-0033)", GAME_SUPPORTS_SAVE ) | |
| 3460 | GAME( 1987, aliensynjo, aliensyn, system16a, aliensynj, fd1089a_16a, ROT0, "Sega", "Alien Syndrome (set 1, Japan, old, System 16A, FD1089A 317-0033)", GAME_SUPPORTS_SAVE ) | |
| 3461 | GAME( 1988, aceattaca, aceattac, system16a , aceattaa, aceattaa, ROT270, "Sega", "Ace Attacker (Japan, System 16A, FD1094 317-0060)", GAME_SUPPORTS_SAVE ) | |
| 3462 | GAME( 1986, afighter, 0, system16a_no7751, afighter, fd1089a_16a, ROT270, "Sega", "Action Fighter (FD1089A 317-0018)", GAME_SUPPORTS_SAVE ) | |
| 3463 | GAME( 1986, alexkidd, 0, system16a, alexkidd, generic_16a, ROT0, "Sega", "Alex Kidd: The Lost Stars (set 2, unprotected)", GAME_SUPPORTS_SAVE ) | |
| 3464 | GAME( 1986, alexkidd1, alexkidd, system16a, alexkidd, fd1089a_16a, ROT0, "Sega", "Alex Kidd: The Lost Stars (set 1, FD1089A 317-0021)", GAME_SUPPORTS_SAVE ) | |
| 3465 | GAME( 1986, fantzone, 0, system16a_no7751, fantzone, generic_16a, ROT0, "Sega", "Fantasy Zone (set 2, unprotected)", GAME_SUPPORTS_SAVE ) | |
| 3466 | GAME( 1986, fantzone1, fantzone, system16a_no7751, fantzone, generic_16a, ROT0, "Sega", "Fantasy Zone (set 1, unprotected)", GAME_SUPPORTS_SAVE ) | |
| 3467 | GAME( 1988, passsht16a, passsht, system16a, passsht16a, passsht16a, ROT270, "Sega", "Passing Shot (Japan, 4 Players, System 16A, FD1094 317-0071)", GAME_SUPPORTS_SAVE ) | |
| 3468 | GAME( 1987, sdi, 0, system16a_no7751, sdi, sdi, ROT0, "Sega", "SDI - Strategic Defense Initiative (Japan, old, System 16A, FD1089B 317-0027)", GAME_SUPPORTS_SAVE ) | |
| 3469 | GAME( 1987, shinobi, 0, system16a, shinobi, generic_16a, ROT0, "Sega", "Shinobi (set 6, System 16A, unprotected)", GAME_SUPPORTS_SAVE ) | |
| 3470 | GAME( 1987, shinobi1, shinobi, system16a, shinobi, generic_16a, ROT0, "Sega", "Shinobi (set 1, System 16A, FD1094 317-0050)", GAME_SUPPORTS_SAVE ) | |
| 3471 | GAME( 1987, shinobls, shinobi, system16a, shinobi, generic_16a, ROT0, "[Sega] (Star bootleg)", "Shinobi (Star bootleg, System 16A)", GAME_SUPPORTS_SAVE ) | |
| 3472 | GAME( 1987, shinoblb, shinobi, system16a, shinobi, generic_16a, ROT0, "[Sega] (Beta bootleg)", "Shinobi (Beta bootleg)", GAME_SUPPORTS_SAVE ) // should have different sound hw? using original ATM | |
| 3473 | GAME( 1987, sjryuko1, sjryuko, system16a, sjryuko, sjryukoa, ROT0, "White Board", "Sukeban Jansi Ryuko (set 1, System 16A, FD1089B 317-5021)", GAME_SUPPORTS_SAVE ) | |
| 3474 | GAME( 1988, tetris, 0, system16a_no7751, tetris, generic_16a, ROT0, "Sega", "Tetris (set 4, Japan, System 16A, FD1094 317-0093)", GAME_SUPPORTS_SAVE ) | |
| 3475 | GAME( 1988, tetris3, tetris, system16a_no7751, tetris, generic_16a, ROT0, "Sega", "Tetris (set 3, Japan, System 16A, FD1094 317-0093a)", GAME_SUPPORTS_SAVE ) | |
| 3476 | GAME( 1987, timescan1, timescan, system16a, timescan, fd1089b_16a, ROT270, "Sega", "Time Scanner (set 1, System 16A, FD1089B 317-0024)", GAME_SUPPORTS_SAVE ) | |
| 3477 | GAME( 1988, wb31, wb3, system16a_no7751, wb3, generic_16a, ROT0, "Sega / Westone", "Wonder Boy III - Monster Lair (set 1, System 16A, FD1094 317-0084)", GAME_SUPPORTS_SAVE ) | |
| 3478 | GAME( 1988, wb35, wb3, system16a_no7751, wb3, fd1089a_16a, ROT0, "Sega / Westone", "Wonder Boy III - Monster Lair (set 5, System 16A, FD1089A 317-xxxx)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 1194 | 1194 | * |
| 1195 | 1195 | *************************************/ |
| 1196 | 1196 | |
| 1197 | static ADDRESS_MAP_START( au | |
| 1197 | static ADDRESS_MAP_START( au | |
| 1198 | 1198 | /*AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READWRITE(audio_command_r, audio_cpu_clear_nmi_w);*/ /* may not and NMI clear */ |
| 1199 | 1199 | AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READ(audio_command_r) |
| 1200 | 1200 | AM_RANGE(0x04, 0x07) AM_MIRROR(0xff00) AM_DEVREADWRITE("ymsnd", ym2610_r, ym2610_w) |
| r7356 | r7357 | |
| 1241 | 1241 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) \ |
| 1242 | 1242 | PORT_DIPNAME( 0x0018, 0x0018, "COMM Setting (Cabinet No.)" ) PORT_DIPLOCATION("SW:4,5") \ |
| 1243 | 1243 | PORT_DIPSETTING( 0x0018, "1" ) \ |
| 1244 | PORT_DIPSETTING( 0x0008, "2" ) \ | |
| 1245 | PORT_DIPSETTING( 0x0010, "3" ) \ | |
| 1244 | PORT_DIPSETTING( 0x0010, "2" ) \ | |
| 1245 | PORT_DIPSETTING( 0x0008, "3" ) \ | |
| 1246 | 1246 | PORT_DIPSETTING( 0x0000, "4" ) \ |
| 1247 | 1247 | PORT_DIPNAME( 0x0020, 0x0020, "COMM Setting (Link Enable)" ) PORT_DIPLOCATION("SW:6") \ |
| 1248 | 1248 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) \ |
| r7356 | r7357 | |
| 1348 | 1348 | |
| 1349 | 1349 | MDRV_CPU_ADD("audiocpu", Z80, NEOGEO_AUDIO_CPU_CLOCK) |
| 1350 | 1350 | MDRV_CPU_PROGRAM_MAP(audio_map) |
| 1351 | MDRV_CPU_IO_MAP(au | |
| 1351 | MDRV_CPU_IO_MAP(au | |
| 1352 | 1352 | |
| 1353 | 1353 | MDRV_WATCHDOG_TIME_INIT(USEC(128762)) |
| 1354 | 1354 |
| r7356 | r7357 | |
|---|---|---|
| 17 | 17 | #include "cpu/z80/z80.h" |
| 18 | 18 | #include "cpu/mcs51/mcs51.h" |
| 19 | 19 | #include "deprecat.h" |
| 20 | #include "includes/s | |
| 20 | #include "includes/s | |
| 21 | 21 | #include "machine/segaic16.h" |
| 22 | 22 | #include "machine/fd1089.h" |
| 23 | 23 | #include "machine/8255ppi.h" |
| r7356 | r7357 | |
| 25 | 25 | #include "sound/2203intf.h" |
| 26 | 26 | #include "sound/2151intf.h" |
| 27 | 27 | #include "sound/segapcm.h" |
| 28 | #include "video/segaic16.h" | |
| 28 | 29 | |
| 29 | 30 | |
| 30 | 31 | #define MASTER_CLOCK_25MHz (25174800) |
| r7356 | r7357 | |
| 40 | 41 | |
| 41 | 42 | static UINT16 *workram; |
| 42 | 43 | |
| 43 | static UINT8 adc_select; | |
| 44 | ||
| 45 | static void (*i8751_vblank_hook)(running_machine *machine); | |
| 46 | ||
| 47 | ||
| 48 | ||
| 49 | 44 | /************************************* |
| 50 | 45 | * |
| 51 | 46 | * Prototypes |
| r7356 | r7357 | |
| 95 | 90 | * |
| 96 | 91 | *************************************/ |
| 97 | 92 | |
| 98 | static void hangon_generic_init( | |
| 93 | static void hangon_generic_init( running_machine *machine ) | |
| 99 | 94 | { |
| 95 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 96 | ||
| 100 | 97 | /* reset the custom handlers and other pointers */ |
| 101 | i8751_vblank_hook = NULL; | |
| 98 | state->i8751_vblank_hook = NULL; | |
| 99 | ||
| 100 | state->maincpu = devtag_get_device(machine, "maincpu"); | |
| 101 | state->soundcpu = devtag_get_device(machine, "soundcpu"); | |
| 102 | state->subcpu = devtag_get_device(machine, "sub"); | |
| 103 | state->mcu = devtag_get_device(machine, "mcu"); | |
| 104 | state->ppi8255_1 = devtag_get_device(machine, "ppi8255_1"); | |
| 105 | state->ppi8255_2 = devtag_get_device(machine, "ppi8255_2"); | |
| 106 | ||
| 107 | state_save_register_global(machine, state->adc_select); | |
| 102 | 108 | } |
| 103 | 109 | |
| 104 | 110 | |
| 105 | 111 | static TIMER_CALLBACK( suspend_i8751 ) |
| 106 | 112 | { |
| 107 | cputag_suspend(machine, "mcu", SUSPEND_REASON_DISABLE, 1); | |
| 113 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 114 | cpu_suspend(state->mcu, SUSPEND_REASON_DISABLE, 1); | |
| 108 | 115 | } |
| 109 | 116 | |
| 110 | 117 | |
| r7356 | r7357 | |
| 117 | 124 | |
| 118 | 125 | static MACHINE_RESET( hangon ) |
| 119 | 126 | { |
| 127 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 128 | ||
| 120 | 129 | fd1094_machine_init(devtag_get_device(machine, "sub")); |
| 121 | 130 | |
| 122 | 131 | /* reset misc components */ |
| 123 | 132 | segaic16_tilemap_reset(machine, 0); |
| 124 | 133 | |
| 125 | 134 | /* if we have a fake i8751 handler, disable the actual 8751 */ |
| 126 | if (i8751_vblank_hook != NULL) | |
| 135 | if (state->i8751_vblank_hook != NULL) | |
| 127 | 136 | timer_call_after_resynch(machine, NULL, 0, suspend_i8751); |
| 128 | 137 | |
| 129 | 138 | /* reset global state */ |
| 130 | adc_select = 0; | |
| 139 | state->adc_select = 0; | |
| 131 | 140 | } |
| 132 | 141 | |
| 133 | 142 | #if 0 |
| r7356 | r7357 | |
| 150 | 159 | |
| 151 | 160 | static TIMER_CALLBACK( delayed_ppi8255_w ) |
| 152 | 161 | { |
| 153 | ppi8255_w(devtag_get_device(machine, "ppi8255_0"), param >> 8, param & 0xff); | |
| 162 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 163 | ppi8255_w(state->ppi8255_1, param >> 8, param & 0xff); | |
| 154 | 164 | } |
| 155 | 165 | |
| 156 | 166 | |
| 157 | 167 | static READ16_HANDLER( hangon_io_r ) |
| 158 | 168 | { |
| 169 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 170 | ||
| 159 | 171 | switch (offset & 0x3020/2) |
| 160 | 172 | { |
| 161 | 173 | case 0x0000/2: /* PPI @ 4B */ |
| 162 | return ppi8255_r( | |
| 174 | return ppi8255_r(s | |
| 163 | 175 | |
| 164 | 176 | case 0x1000/2: /* Input ports and DIP switches */ |
| 165 | 177 | { |
| r7356 | r7357 | |
| 168 | 180 | } |
| 169 | 181 | |
| 170 | 182 | case 0x3000/2: /* PPI @ 4C */ |
| 171 | return ppi8255_r( | |
| 183 | return ppi8255_r(s | |
| 172 | 184 | |
| 173 | 185 | case 0x3020/2: /* ADC0804 data output */ |
| 174 | 186 | { |
| 175 | 187 | static const char *const adcports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| 176 | return input_port_read_safe(space->machine, adcports[adc_select], 0); | |
| 188 | return input_port_read_safe(space->machine, adcports[state->adc_select], 0); | |
| 177 | 189 | } |
| 178 | 190 | } |
| 179 | 191 | |
| 180 | 192 | logerror("%06X:hangon_io_r - unknown read access to address %04X\n", cpu_get_pc(space->cpu), offset * 2); |
| 181 | return segaic16_open_bus_r(space,0,mem_mask); | |
| 193 | return segaic16_open_bus_r(space, 0, mem_mask); | |
| 182 | 194 | } |
| 183 | 195 | |
| 184 | 196 | |
| 185 | 197 | static WRITE16_HANDLER( hangon_io_w ) |
| 186 | 198 | { |
| 199 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 200 | ||
| 187 | 201 | if (ACCESSING_BITS_0_7) |
| 188 | 202 | switch (offset & 0x3020/2) |
| 189 | 203 | { |
| r7356 | r7357 | |
| 194 | 208 | return; |
| 195 | 209 | |
| 196 | 210 | case 0x3000/2: /* PPI @ 4C */ |
| 197 | ppi8255_w( | |
| 211 | ppi8255_w(s | |
| 198 | 212 | return; |
| 199 | 213 | |
| 200 | 214 | case 0x3020/2: /* ADC0804 */ |
| r7356 | r7357 | |
| 207 | 221 | |
| 208 | 222 | static READ16_HANDLER( sharrier_io_r ) |
| 209 | 223 | { |
| 224 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 225 | ||
| 210 | 226 | switch (offset & 0x0030/2) |
| 211 | 227 | { |
| 212 | 228 | case 0x0000/2: |
| 213 | return ppi8255_r( | |
| 229 | return ppi8255_r(s | |
| 214 | 230 | |
| 215 | 231 | case 0x0010/2: /* Input ports and DIP switches */ |
| 216 | 232 | { |
| r7356 | r7357 | |
| 220 | 236 | |
| 221 | 237 | case 0x0020/2: /* PPI @ 4C */ |
| 222 | 238 | if (offset == 2) return 0; |
| 223 | return ppi8255_r( | |
| 239 | return ppi8255_r(s | |
| 224 | 240 | |
| 225 | 241 | case 0x0030/2: /* ADC0804 data output */ |
| 226 | 242 | { |
| 227 | 243 | static const char *const adcports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| 228 | return input_port_read_safe(space->machine, adcports[adc_select], 0); | |
| 244 | return input_port_read_safe(space->machine, adcports[state->adc_select], 0); | |
| 229 | 245 | } |
| 230 | 246 | } |
| 231 | 247 | |
| 232 | 248 | logerror("%06X:sharrier_io_r - unknown read access to address %04X\n", cpu_get_pc(space->cpu), offset * 2); |
| 233 | return segaic16_open_bus_r(space,0,mem_mask); | |
| 249 | return segaic16_open_bus_r(space, 0, mem_mask); | |
| 234 | 250 | } |
| 235 | 251 | |
| 236 | 252 | |
| 237 | 253 | static WRITE16_HANDLER( sharrier_io_w ) |
| 238 | 254 | { |
| 255 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 256 | ||
| 239 | 257 | if (ACCESSING_BITS_0_7) |
| 240 | 258 | switch (offset & 0x0030/2) |
| 241 | 259 | { |
| r7356 | r7357 | |
| 246 | 264 | return; |
| 247 | 265 | |
| 248 | 266 | case 0x0020/2: /* PPI @ 4C */ |
| 249 | ppi8255_w( | |
| 267 | ppi8255_w(s | |
| 250 | 268 | return; |
| 251 | 269 | |
| 252 | 270 | case 0x0030/2: /* ADC0804 */ |
| r7356 | r7357 | |
| 266 | 284 | |
| 267 | 285 | static WRITE8_DEVICE_HANDLER( sound_latch_w ) |
| 268 | 286 | { |
| 269 | const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 287 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 288 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 270 | 289 | soundlatch_w(space, offset, data); |
| 271 | 290 | } |
| 272 | 291 | |
| r7356 | r7357 | |
| 294 | 313 | |
| 295 | 314 | static WRITE8_DEVICE_HANDLER( tilemap_sound_w ) |
| 296 | 315 | { |
| 316 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 317 | ||
| 297 | 318 | /* Port C : Tilemap origin and audio mute */ |
| 298 | 319 | /* D7 : Port A handshaking signal /OBF */ |
| 299 | 320 | /* D6 : Port A handshaking signal ACK */ |
| r7356 | r7357 | |
| 303 | 324 | /* D2 : SCONT1 - Tilemap origin bit 1 */ |
| 304 | 325 | /* D1 : SCONT0 - Tilemap origin bit 0 */ |
| 305 | 326 | /* D0 : MUTE (1= audio on, 0= audio off) */ |
| 306 | cpu | |
| 327 | cpu | |
| 307 | 328 | segaic16_tilemap_set_colscroll(device->machine, 0, ~data & 0x04); |
| 308 | 329 | segaic16_tilemap_set_rowscroll(device->machine, 0, ~data & 0x02); |
| 309 | 330 | sound_global_enable(device->machine, data & 0x01); |
| r7356 | r7357 | |
| 312 | 333 | |
| 313 | 334 | static WRITE8_DEVICE_HANDLER( sub_control_adc_w ) |
| 314 | 335 | { |
| 336 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 337 | ||
| 315 | 338 | /* Port A : S.CPU control and ADC channel select */ |
| 316 | 339 | /* D6 : INTR line on second CPU */ |
| 317 | 340 | /* D5 : RESET line on second CPU */ |
| 318 | 341 | /* D3-D2 : ADC_SELECT */ |
| 319 | cputag_set_input_line(device->machine, "sub", 4, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); | |
| 320 | cputag_set_input_line(device->machine, "sub", INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); | |
| 342 | cpu_set_input_line(state->subcpu, 4, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); | |
| 343 | cpu_set_input_line(state->subcpu, INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); | |
| 321 | 344 | |
| 322 | 345 | /* If the CPU is being Reset we also need to reset the fd1094 state */ |
| 323 | 346 | if (data & 0x20) |
| 324 | 347 | { |
| 325 | fd1094_machine_init( | |
| 348 | fd1094_machine_init(s | |
| 326 | 349 | } |
| 327 | 350 | |
| 328 | adc_select = (data >> 2) & 3; | |
| 351 | state->adc_select = (data >> 2) & 3; | |
| 329 | 352 | } |
| 330 | 353 | |
| 331 | 354 | |
| r7356 | r7357 | |
| 348 | 371 | |
| 349 | 372 | static INTERRUPT_GEN( i8751_main_cpu_vblank ) |
| 350 | 373 | { |
| 374 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 375 | ||
| 351 | 376 | /* if we have a fake 8751 handler, call it on VBLANK */ |
| 352 | if (i8751_vblank_hook != NULL) | |
| 353 | (*i8751_vblank_hook)(device->machine); | |
| 377 | if (state->i8751_vblank_hook != NULL) | |
| 378 | (*state->i8751_vblank_hook)(device->machine); | |
| 354 | 379 | irq4_line_hold(device); |
| 355 | 380 | } |
| 356 | 381 | |
| r7356 | r7357 | |
| 377 | 402 | |
| 378 | 403 | static void sound_irq(running_device *device, int irq) |
| 379 | 404 | { |
| 380 | cputag_set_input_line(device->machine, "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); | |
| 405 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 406 | cpu_set_input_line(state->soundcpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); | |
| 381 | 407 | } |
| 382 | 408 | |
| 383 | 409 | |
| 384 | 410 | static READ8_HANDLER( sound_data_r ) |
| 385 | 411 | { |
| 412 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 413 | ||
| 386 | 414 | /* assert ACK */ |
| 387 | ppi8255_set_port_c( | |
| 415 | ppi8255_set_port_c(s | |
| 388 | 416 | return soundlatch_r(space, offset); |
| 389 | 417 | } |
| 390 | 418 | |
| r7356 | r7357 | |
| 887 | 915 | |
| 888 | 916 | static MACHINE_DRIVER_START( hangon_base ) |
| 889 | 917 | |
| 918 | /* driver data */ | |
| 919 | MDRV_DRIVER_DATA(segas1x_state) | |
| 920 | ||
| 890 | 921 | /* basic machine hardware */ |
| 891 | 922 | MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK_25MHz/4) |
| 892 | 923 | MDRV_CPU_PROGRAM_MAP(hangon_map) |
| r7356 | r7357 | |
| 898 | 929 | MDRV_MACHINE_RESET(hangon) |
| 899 | 930 | MDRV_QUANTUM_TIME(HZ(6000)) |
| 900 | 931 | |
| 901 | MDRV_PPI8255_ADD( "ppi8255_0", hangon_ppi_intf[0] ) | |
| 902 | MDRV_PPI8255_ADD( "ppi8255_1", hangon_ppi_intf[1] ) | |
| 932 | MDRV_PPI8255_ADD( "ppi8255_1", hangon_ppi_intf[0] ) | |
| 933 | MDRV_PPI8255_ADD( "ppi8255_2", hangon_ppi_intf[1] ) | |
| 903 | 934 | |
| 904 | 935 | /* video hardware */ |
| 905 | 936 | MDRV_GFXDECODE(segahang) |
| r7356 | r7357 | |
| 1797 | 1828 | |
| 1798 | 1829 | static DRIVER_INIT( hangon ) |
| 1799 | 1830 | { |
| 1800 | hangon_generic_init(); | |
| 1831 | hangon_generic_init(machine); | |
| 1801 | 1832 | } |
| 1802 | 1833 | |
| 1803 | 1834 | |
| 1804 | 1835 | static DRIVER_INIT( sharrier ) |
| 1805 | 1836 | { |
| 1806 | hangon_generic_init(); | |
| 1807 | i8751_vblank_hook = sharrier_i8751_sim; | |
| 1837 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1838 | ||
| 1839 | hangon_generic_init(machine); | |
| 1840 | state->i8751_vblank_hook = sharrier_i8751_sim; | |
| 1808 | 1841 | } |
| 1809 | 1842 | |
| 1810 | 1843 | |
| 1811 | 1844 | static DRIVER_INIT( enduror ) |
| 1812 | 1845 | { |
| 1813 | hangon_generic_init(); | |
| 1846 | hangon_generic_init(machine); | |
| 1814 | 1847 | fd1089b_decrypt(machine); |
| 1815 | 1848 | } |
| 1816 | 1849 | |
| r7356 | r7357 | |
| 1821 | 1854 | UINT16 *rom = (UINT16 *)memory_region(machine, "maincpu"); |
| 1822 | 1855 | UINT16 *decrypt = auto_alloc_array(machine, UINT16, 0x40000/2); |
| 1823 | 1856 | |
| 1824 | hangon_generic_init(); | |
| 1857 | hangon_generic_init(machine); | |
| 1825 | 1858 | memory_set_decrypted_region(space, 0x000000, 0x03ffff, decrypt); |
| 1826 | 1859 | |
| 1827 | 1860 | memcpy(decrypt + 0x00000/2, rom + 0x30000/2, 0x10000); |
| r7356 | r7357 | |
| 1835 | 1868 | UINT16 *rom = (UINT16 *)memory_region(machine, "maincpu"); |
| 1836 | 1869 | UINT16 *decrypt = auto_alloc_array(machine, UINT16, 0x40000/2); |
| 1837 | 1870 | |
| 1838 | hangon_generic_init(); | |
| 1871 | hangon_generic_init(machine); | |
| 1839 | 1872 | memory_set_decrypted_region(space, 0x000000, 0x03ffff, decrypt); |
| 1840 | 1873 | |
| 1841 | 1874 | memcpy(decrypt, rom, 0x30000); |
| 1842 | 1875 | /* missing data ROM */ |
| 1843 | 1876 | } |
| 1877 | ||
| 1844 | 1878 | static DRIVER_INIT( shangonro ) |
| 1845 | 1879 | { |
| 1846 | hangon_generic_init(); | |
| 1880 | hangon_generic_init(machine); | |
| 1847 | 1881 | |
| 1848 | 1882 | /* init the FD1094 */ |
| 1849 | 1883 | fd1094_driver_init(machine, "sub", NULL); |
| r7356 | r7357 | |
|---|---|---|
| 559 | 559 | ADDRESS_MAP_END |
| 560 | 560 | |
| 561 | 561 | |
| 562 | static ADDRESS_MAP_START( ddragnba_sub_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 562 | static ADDRESS_MAP_START( ddragonba_sub_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 563 | 563 | AM_RANGE(0x0000, 0x0fff) AM_RAM |
| 564 | 564 | AM_RANGE(0x8000, 0x8fff) AM_READWRITE(ddragon_spriteram_r, ddragon_spriteram_w) |
| 565 | 565 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| r7356 | r7357 | |
| 574 | 574 | ADDRESS_MAP_END |
| 575 | 575 | |
| 576 | 576 | /* might not be 100% accurate, check bits written */ |
| 577 | static WRITE8_HANDLER( ddragnba_port_w ) | |
| 577 | static WRITE8_HANDLER( ddragonba_port_w ) | |
| 578 | 578 | { |
| 579 | 579 | ddragon_state *state = (ddragon_state *)space->machine->driver_data; |
| 580 | 580 | cpu_set_input_line(state->maincpu, M6809_IRQ_LINE, ASSERT_LINE); |
| 581 | 581 | cpu_set_input_line(state->sub_cpu, state->sprite_irq, CLEAR_LINE ); |
| 582 | 582 | } |
| 583 | 583 | |
| 584 | static ADDRESS_MAP_START( ddragnba_sub_portmap, ADDRESS_SPACE_IO, 8 ) | |
| 585 | AM_RANGE(0x0000, 0xffff) AM_WRITE(ddragnba_port_w) | |
| 584 | static ADDRESS_MAP_START( ddragonba_sub_portmap, ADDRESS_SPACE_IO, 8 ) | |
| 585 | AM_RANGE(0x0000, 0xffff) AM_WRITE(ddragonba_port_w) | |
| 586 | 586 | ADDRESS_MAP_END |
| 587 | 587 | |
| 588 | 588 | |
| r7356 | r7357 | |
| 1033 | 1033 | MACHINE_DRIVER_END |
| 1034 | 1034 | |
| 1035 | 1035 | |
| 1036 | static MACHINE_DRIVER_START( ddragnba ) | |
| 1036 | static MACHINE_DRIVER_START( ddragonba ) | |
| 1037 | 1037 | MDRV_IMPORT_FROM(ddragon) |
| 1038 | 1038 | |
| 1039 | 1039 | /* basic machine hardware */ |
| 1040 | 1040 | MDRV_CPU_REPLACE("sub", M6803, MAIN_CLOCK / 2) /* 6Mhz / 4 internally */ |
| 1041 | MDRV_CPU_PROGRAM_MAP(ddragnba_sub_map) | |
| 1042 | MDRV_CPU_IO_MAP(ddragnba_sub_portmap) | |
| 1041 | MDRV_CPU_PROGRAM_MAP(ddragonba_sub_map) | |
| 1042 | MDRV_CPU_IO_MAP(ddragonba_sub_portmap) | |
| 1043 | 1043 | MACHINE_DRIVER_END |
| 1044 | 1044 | |
| 1045 | 1045 | |
| 1046 | static MACHINE_DRIVER_START( ddgn6809 ) | |
| 1046 | static MACHINE_DRIVER_START( ddragon6809 ) | |
| 1047 | 1047 | |
| 1048 | 1048 | /* driver data */ |
| 1049 | 1049 | MDRV_DRIVER_DATA(ddragon_state) |
| r7356 | r7357 | |
| 2033 | 2033 | /* should the sound rom be bitswapped too? */ |
| 2034 | 2034 | } |
| 2035 | 2035 | |
| 2036 | static DRIVER_INIT( ddgn6809 ) | |
| 2036 | static DRIVER_INIT( ddragon6809 ) | |
| 2037 | 2037 | { |
| 2038 | 2038 | ddragon_state *state = (ddragon_state *)machine->driver_data; |
| 2039 | 2039 | /* Descramble GFX here */ |
| r7356 | r7357 | |
| 2057 | 2057 | GAME( 1987, ddragonua, ddragon, ddragon, ddragon, ddragon, ROT0, "[Technos Japan] (Taito America license)", "Double Dragon (US Set 2)", GAME_SUPPORTS_SAVE ) |
| 2058 | 2058 | GAME( 1987, ddragonb2, ddragon, ddragon, ddragon, ddragon, ROT0, "bootleg", "Double Dragon (bootleg)", GAME_SUPPORTS_SAVE ) |
| 2059 | 2059 | GAME( 1987, ddragonb, ddragon, ddragonb, ddragon, ddragon, ROT0, "bootleg", "Double Dragon (bootleg with HD6309)", GAME_SUPPORTS_SAVE ) // according to dump notes |
| 2060 | GAME( 1987, ddragonba, ddragon, ddragnba, ddragon, ddragon, ROT0, "bootleg", "Double Dragon (bootleg with M6803)", GAME_SUPPORTS_SAVE ) | |
| 2061 | GAME( 1987, ddragon6809, ddragon, ddgn6809, ddragon, ddgn6809, ROT0, "bootleg", "Double Dragon (bootleg with 3xM6809, set 1)", GAME_NOT_WORKING ) | |
| 2062 | GAME( 1987, ddragon6809a,ddragon, ddgn6809, ddragon, ddgn6809, ROT0, "bootleg", "Double Dragon (bootleg with 3xM6809, set 2)", GAME_NOT_WORKING ) | |
| 2060 | GAME( 1987, ddragonba, ddragon, ddragonba, ddragon, ddragon, ROT0, "bootleg", "Double Dragon (bootleg with M6803)", GAME_SUPPORTS_SAVE ) | |
| 2061 | GAME( 1987, ddragon6809, ddragon, ddragon6809, ddragon, ddragon6809, ROT0, "bootleg", "Double Dragon (bootleg with 3xM6809, set 1)", GAME_NOT_WORKING ) | |
| 2062 | GAME( 1987, ddragon6809a,ddragon, ddragon6809, ddragon, ddragon6809, ROT0, "bootleg", "Double Dragon (bootleg with 3xM6809, set 2)", GAME_NOT_WORKING ) | |
| 2063 | 2063 | GAME( 1988, ddragon2, 0, ddragon2, ddragon2, ddragon2, ROT0, "Technos Japan", "Double Dragon II - The Revenge (World)", GAME_SUPPORTS_SAVE ) |
| 2064 | 2064 | GAME( 1988, ddragon2u, ddragon2, ddragon2, ddragon2, ddragon2, ROT0, "Technos Japan", "Double Dragon II - The Revenge (US)", GAME_SUPPORTS_SAVE ) |
| 2065 | 2065 |
| r7356 | r7357 | |
|---|---|---|
| 408 | 408 | ROM_LOAD( "068a06.1e", 0x000000, 0x200000, CRC(6df9ec0e) SHA1(cee60312e9813bd6579f3ac7c3c2521a8e633eca) ) |
| 409 | 409 | ROM_END |
| 410 | 410 | |
| 411 | ROM_START( asterixaad ) | |
| 412 | ROM_REGION( 0x100000, "maincpu", 0 ) | |
| 413 | ROM_LOAD16_BYTE( "068_aa_d01.8c", 0x000000, 0x20000, CRC(3fae5f1f) SHA1(73ef65dac8e1cd4d9a3695963231e3a2a860b486) ) | |
| 414 | ROM_LOAD16_BYTE( "068_aa_d02.8d", 0x000001, 0x20000, CRC(171f0ba0) SHA1(1665f23194da5811e4708ad0495378957b6e6251) ) | |
| 415 | ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) | |
| 416 | ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) | |
| 417 | ||
| 418 | ROM_REGION( 0x010000, "audiocpu", 0 ) | |
| 419 | ROM_LOAD( "068_a05.5f", 0x000000, 0x010000, CRC(d3d0d77b) SHA1(bfa77a8bf651dc27f481e96a2d63242084cc214c) ) | |
| 420 | ||
| 421 | ROM_REGION( 0x100000, "gfx1", 0 ) | |
| 422 | ROM_LOAD( "068a12.16k", 0x000000, 0x080000, CRC(b9da8e9c) SHA1(a46878916833923e421da0667e37620ae0b77744) ) | |
| 423 | ROM_LOAD( "068a11.12k", 0x080000, 0x080000, CRC(7eb07a81) SHA1(672c0c60834df7816d33d88643e4575b8ca9bcc1) ) | |
| 424 | ||
| 425 | ROM_REGION( 0x400000, "gfx2", 0 ) | |
| 426 | ROM_LOAD( "068a08.7k", 0x000000, 0x200000, CRC(c41278fe) SHA1(58e5f67a67ae97e0b264489828cd7e74662c5ed5) ) | |
| 427 | ROM_LOAD( "068a07.3k", 0x200000, 0x200000, CRC(32efdbc4) SHA1(b7e8610aa22249176d82b750e2549d1eea6abe4f) ) | |
| 428 | ||
| 429 | ROM_REGION( 0x200000, "k053260", 0 ) | |
| 430 | ROM_LOAD( "068a06.1e", 0x000000, 0x200000, CRC(6df9ec0e) SHA1(cee60312e9813bd6579f3ac7c3c2521a8e633eca) ) | |
| 431 | ROM_END | |
| 432 | ||
| 411 | 433 | ROM_START( asterixj ) |
| 412 | 434 | ROM_REGION( 0x100000, "maincpu", 0 ) |
| 413 | 435 | ROM_LOAD16_BYTE( "068_ja_d01.8c", 0x000000, 0x20000, CRC(2bc10940) SHA1(e25cc97435f157bed9c28d9e9277c9f47d4fb5fb) ) |
| r7356 | r7357 | |
| 443 | 465 | GAME( 1992, asterix, 0, asterix, asterix, asterix, ROT0, "Konami", "Asterix (ver EAD)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 444 | 466 | GAME( 1992, asterixeac, asterix, asterix, asterix, asterix, ROT0, "Konami", "Asterix (ver EAC)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 445 | 467 | GAME( 1992, asterixeaa, asterix, asterix, asterix, asterix, ROT0, "Konami", "Asterix (ver EAA)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 468 | GAME( 1992, asterixaad, asterix, asterix, asterix, asterix, ROT0, "Konami", "Asterix (ver AAD)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 446 | 469 | GAME( 1992, asterixj, asterix, asterix, asterix, asterix, ROT0, "Konami", "Asterix (ver JAD)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 836 | 836 | static ADDRESS_MAP_START( kurikint_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 837 | 837 | COMMON_BANKS_MAP |
| 838 | 838 | AM_RANGE(0x8000, 0x9fff) AM_RAM |
| 839 | AM_RANGE(0xa000, 0x | |
| 839 | AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_BASE_MEMBER(taitol_state, shared_ram) | |
| 840 | 840 | AM_RANGE(0xa800, 0xa800) AM_READWRITE(mux_r, mux_w) |
| 841 | 841 | AM_RANGE(0xa801, 0xa801) AM_WRITE(mux_ctrl_w) AM_READNOP // Watchdog or interrupt ack (value ignored) |
| 842 | 842 | ADDRESS_MAP_END |
| r7356 | r7357 | |
| 2919 | 2919 | { |
| 2920 | 2920 | UINT8 *ROM = memory_region(machine, "audiocpu"); |
| 2921 | 2921 | ROM[0x72] = 0x45; /* reti -> retn ('dead' loop @ $1104 )*/ |
| 2922 | memory_install_write8_handler(cputag_get_address_space(machine, "a | |
| 2922 | memory_install_write8_handler(cputag_get_address_space(machine, "ma | |
| 2923 | 2923 | } |
| 2924 | 2924 | |
| 2925 | 2925 |
| r7356 | r7357 | |
|---|---|---|
| 449 | 449 | MDRV_DRIVER_DATA(destroyr_state) |
| 450 | 450 | |
| 451 | 451 | /* basic machine hardware */ |
| 452 | MDRV_CPU_ADD("maincpu", M6800, 12096 | |
| 452 | MDRV_CPU_ADD("maincpu", M6800, XTAL_12_096MHz / 16) | |
| 453 | 453 | MDRV_CPU_PROGRAM_MAP(destroyr_map) |
| 454 | 454 | MDRV_CPU_VBLANK_INT_HACK(irq0_line_assert, 4) |
| 455 | 455 |
| r7356 | r7357 | |
|---|---|---|
| 226 | 226 | INPUT_PORTS_END |
| 227 | 227 | |
| 228 | 228 | /* Same as gogomile, but the default country is different and the coinage settings too. */ |
| 229 | static INPUT_PORTS_START( gogomilj ) | |
| 229 | static INPUT_PORTS_START( gogomilej ) | |
| 230 | 230 | PORT_INCLUDE( gogomile ) |
| 231 | 231 | |
| 232 | 232 | PORT_MODIFY("DSW") // $880000.w |
| r7356 | r7357 | |
| 668 | 668 | ***************************************************************************/ |
| 669 | 669 | |
| 670 | 670 | GAME( 1995, gogomile, 0, fuuki16, gogomile, 0, ROT0, "Fuuki", "Go Go! Mile Smile", GAME_IMPERFECT_SOUND ) |
| 671 | GAME( 1995, gogomilej,gogomile, fuuki16, gogomilj, | |
| 671 | GAME( 1995, gogomilej,gogomile, fuuki16, gogomilej, | |
| 672 | 672 | GAME( 1996, pbancho, 0, fuuki16, pbancho, 0, ROT0, "Fuuki", "Gyakuten!! Puzzle Bancho (Japan)", 0) |
| r7356 | r7357 | |
|---|---|---|
| 351 | 351 | |
| 352 | 352 | /***************************************************************************************/ |
| 353 | 353 | |
| 354 | ||
| 355 | 354 | ROM_START( gunpey ) |
| 356 | 355 | ROM_REGION( 0x100000, "maincpu", 0 ) /* V30 code */ |
| 357 | 356 | ROM_LOAD16_BYTE( "gp_rom1.021", 0x00000, 0x80000, CRC(07a589a7) SHA1(06c4140ffd5f74b3d3ddfc424f43fcd08d903490) ) |
| r7356 | r7357 | |
| 367 | 366 | ROM_LOAD( "gp_rom5.622", 0x000000, 0x400000, CRC(f79903e0) SHA1(4fd50b4138e64a48ec1504eb8cd172a229e0e965)) // 1xxxxxxxxxxxxxxxxxxxxx = 0xFF |
| 368 | 367 | ROM_END |
| 369 | 368 | |
| 370 | GAME( 2000, gunpey, 0, gunpey, gunpey, 0, ROT0, "Banpresto", "Gunpey",GAME_NOT_WORKING) | |
| 369 | static DRIVER_INIT( gunpey ) | |
| 370 | { | |
| 371 | UINT8 *rom = memory_region(machine, "maincpu"); | |
| 372 | ||
| 373 | /* patch SLOOOOW cycle checks ... */ | |
| 374 | rom[0x848b5] = 0x7e; | |
| 375 | // rom[0x848b6] = 0x03; | |
| 376 | rom[0x89657] = 0x75; | |
| 377 | rom[0x8e628] = 0x75; | |
| 378 | ||
| 379 | } | |
| 380 | ||
| 381 | GAME( 2000, gunpey, 0, gunpey, gunpey, gunpey, ROT0, "Banpresto", "Gunpey",GAME_NOT_WORKING) |
| r7356 | r7357 | |
|---|---|---|
| 256 | 256 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 257 | 257 | AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_r) |
| 258 | 258 | AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE("ym1", ym2203_r, ym2203_w) |
| 259 | AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE("ym | |
| 259 | AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE("ym2", ym2203_r, ym2203_w) | |
| 260 | 260 | ADDRESS_MAP_END |
| 261 | 261 | |
| 262 | 262 | static ADDRESS_MAP_START( pollux_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r7356 | r7357 | |
|---|---|---|
| 226 | 226 | |
| 227 | 227 | static READ32_DEVICE_HANDLER(backfire_eeprom_r) |
| 228 | 228 | { |
| 229 | /* some kind of screen indicator? checked by backfira set before it will boot */ | |
| 229 | /* some kind of screen indicator? checked by backfirea set before it will boot */ | |
| 230 | 230 | int backfire_screen = mame_rand(device->machine) & 1; |
| 231 | 231 | return ((eeprom_read_bit(device) << 24) | input_port_read(device->machine, "IN0") |
| 232 | 232 | | ((input_port_read(device->machine, "IN2") & 0xbf) << 16) |
| r7356 | r7357 | |
| 655 | 655 | // mame_printf_debug( "%08x\n",cpu_get_pc(space->cpu)); |
| 656 | 656 | |
| 657 | 657 | if (cpu_get_pc(space->cpu)==0xce44) cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400)); // backfire |
| 658 | if (cpu_get_pc(space->cpu)==0xcee4) cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400)); // backfira | |
| 658 | if (cpu_get_pc(space->cpu)==0xcee4) cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400)); // backfirea | |
| 659 | 659 | |
| 660 | 660 | return backfire_mainram[0x18/4]; |
| 661 | 661 | } |
| r7356 | r7357 | |
|---|---|---|
| 33 | 33 | #include "cpu/mcs51/mcs51.h" |
| 34 | 34 | #include "deprecat.h" |
| 35 | 35 | #include "machine/segaic16.h" |
| 36 | #include "includes/s | |
| 36 | #include "includes/s | |
| 37 | 37 | #include "includes/genesis.h" |
| 38 | 38 | #include "sound/2612intf.h" |
| 39 | 39 | #include "sound/rf5c68.h" |
| 40 | #include "video/segaic16.h" | |
| 40 | 41 | |
| 41 | 42 | |
| 42 | ||
| 43 | 43 | /************************************* |
| 44 | 44 | * |
| 45 | 45 | * Constants |
| 46 | 46 | * |
| 47 | 47 | *************************************/ |
| 48 | 48 | |
| 49 | #define ROM_BOARD_171_SHADOW (0) /* 171-???? -- used by shadow dancer */ | |
| 50 | #define ROM_BOARD_171_5874 (1) /* 171-5874 */ | |
| 51 | #define ROM_BOARD_171_5987 (2) /* 171-5987 */ | |
| 49 | #define ROM_BOARD_171_SHADOW (0) /* 171-???? -- used by shadow dancer */ | |
| 50 | #define ROM_BOARD_171_5874 (1) /* 171-5874 */ | |
| 51 | #define ROM_BOARD_171_5987 (2) /* 171-5987 */ | |
| 52 | 52 | |
| 53 | 53 | |
| 54 | ||
| 55 | 54 | /************************************* |
| 56 | 55 | * |
| 57 | 56 | * Statics |
| r7356 | r7357 | |
| 60 | 59 | |
| 61 | 60 | static UINT16 *workram; |
| 62 | 61 | |
| 63 | static UINT8 rom_board; | |
| 64 | static UINT8 misc_io_data[0x10]; | |
| 65 | static UINT8 mcu_data; | |
| 66 | 62 | |
| 67 | static read16_space_func custom_io_r; | |
| 68 | static write16_space_func custom_io_w; | |
| 69 | ||
| 70 | static UINT8 wwally_last_x[3], wwally_last_y[3]; | |
| 71 | static UINT8 lghost_value, lghost_select; | |
| 72 | ||
| 73 | ||
| 74 | ||
| 75 | 63 | /************************************* |
| 76 | 64 | * |
| 77 | 65 | * Prototypes |
| r7356 | r7357 | |
| 149 | 137 | |
| 150 | 138 | static void sound_w(running_machine *machine, UINT8 data) |
| 151 | 139 | { |
| 152 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 140 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 141 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 142 | ||
| 153 | 143 | soundlatch_w(space, 0, data & 0xff); |
| 154 | cpu | |
| 144 | cpu | |
| 155 | 145 | } |
| 156 | 146 | |
| 157 | ||
| 158 | 147 | static UINT8 sound_r(running_machine *machine) |
| 159 | 148 | { |
| 160 | return mcu_data; | |
| 149 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 150 | return state->mcu_data; | |
| 161 | 151 | } |
| 162 | 152 | |
| 163 | ||
| 164 | 153 | static void system18_generic_init(running_machine *machine, int _rom_board) |
| 165 | 154 | { |
| 155 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 156 | ||
| 166 | 157 | /* set the ROM board */ |
| 167 | rom_board = _rom_board; | |
| 158 | state->rom_board = _rom_board; | |
| 168 | 159 | |
| 169 | 160 | /* allocate memory for regions not autmatically assigned */ |
| 170 | 161 | segaic16_spriteram_0 = auto_alloc_array(machine, UINT16, 0x00800/2); |
| r7356 | r7357 | |
| 174 | 165 | workram = auto_alloc_array(machine, UINT16, 0x04000/2); |
| 175 | 166 | |
| 176 | 167 | /* init the memory mapper */ |
| 177 | segaic16_memory_mapper_init(devtag_get_device(machine, "maincpu"), region_info_list[rom_board], sound_w, sound_r); | |
| 168 | segaic16_memory_mapper_init(devtag_get_device(machine, "maincpu"), region_info_list[state->rom_board], sound_w, sound_r); | |
| 178 | 169 | |
| 179 | 170 | /* init the FD1094 */ |
| 180 | 171 | fd1094_driver_init(machine, "maincpu", segaic16_memory_mapper_set_decrypted); |
| 181 | 172 | |
| 182 | 173 | /* reset the custom handlers and other pointers */ |
| 183 | custom_io_r = NULL; | |
| 184 | custom_io_w = NULL; | |
| 174 | state->custom_io_r = NULL; | |
| 175 | state->custom_io_w = NULL; | |
| 176 | ||
| 177 | state->maincpu = devtag_get_device(machine, "maincpu"); | |
| 178 | state->soundcpu = devtag_get_device(machine, "soundcpu"); | |
| 179 | state->mcu = devtag_get_device(machine, "mcu"); | |
| 180 | ||
| 181 | state_save_register_global(machine, state->mcu_data); | |
| 182 | state_save_register_global(machine, state->lghost_value); | |
| 183 | state_save_register_global(machine, state->lghost_select); | |
| 184 | state_save_register_global_array(machine, state->misc_io_data); | |
| 185 | state_save_register_global_array(machine, state->wwally_last_x); | |
| 186 | state_save_register_global_array(machine, state->wwally_last_y); | |
| 187 | state_save_register_global_pointer(machine, segaic16_spriteram_0, 0x00800/2); | |
| 188 | state_save_register_global_pointer(machine, segaic16_paletteram, 0x04000/2); | |
| 189 | state_save_register_global_pointer(machine, segaic16_tileram_0, 0x10000/2); | |
| 190 | state_save_register_global_pointer(machine, segaic16_textram_0, 0x01000/2); | |
| 191 | state_save_register_global_pointer(machine, workram, 0x04000/2); | |
| 185 | 192 | } |
| 186 | 193 | |
| 187 | 194 | |
| r7356 | r7357 | |
| 200 | 207 | |
| 201 | 208 | static MACHINE_RESET( system18 ) |
| 202 | 209 | { |
| 210 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 211 | ||
| 203 | 212 | segaic16_memory_mapper_reset(machine); |
| 204 | 213 | segaic16_tilemap_reset(machine, 0); |
| 205 | 214 | fd1094_machine_init(devtag_get_device(machine, "maincpu")); |
| 206 | 215 | |
| 207 | 216 | /* if we are running with a real live 8751, we need to boost the interleave at startup */ |
| 208 | if ( | |
| 217 | if (s | |
| 209 | 218 | timer_call_after_resynch(machine, NULL, 0, boost_interleave); |
| 210 | 219 | } |
| 211 | 220 | |
| r7356 | r7357 | |
| 219 | 228 | |
| 220 | 229 | static READ16_HANDLER( io_chip_r ) |
| 221 | 230 | { |
| 231 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 222 | 232 | static const char *const portnames[] = { "P1", "P2", "PORTC", "PORTD", "SERVICE", "COINAGE", "DSW", "PORTH" }; |
| 223 | 233 | offset &= 0x1f/2; |
| 224 | 234 | |
| r7356 | r7357 | |
| 234 | 244 | case 0x0c/2: |
| 235 | 245 | case 0x0e/2: |
| 236 | 246 | /* if the port is configured as an output, return the last thing written */ |
| 237 | if (misc_io_data[0x1e/2] & (1 << offset)) | |
| 238 | return misc_io_data[offset]; | |
| 247 | if (state->misc_io_data[0x1e/2] & (1 << offset)) | |
| 248 | return state->misc_io_data[offset]; | |
| 239 | 249 | |
| 240 | 250 | /* otherwise, return an input port */ |
| 241 | 251 | return input_port_read(space->machine, portnames[offset]); |
| r7356 | r7357 | |
| 253 | 263 | /* CNT register & mirror */ |
| 254 | 264 | case 0x18/2: |
| 255 | 265 | case 0x1c/2: |
| 256 | return misc_io_data[0x1c/2]; | |
| 266 | return state->misc_io_data[0x1c/2]; | |
| 257 | 267 | |
| 258 | 268 | /* port direction register & mirror */ |
| 259 | 269 | case 0x1a/2: |
| 260 | 270 | case 0x1e/2: |
| 261 | return misc_io_data[0x1e/2]; | |
| 271 | return state->misc_io_data[0x1e/2]; | |
| 262 | 272 | } |
| 263 | 273 | return 0xffff; |
| 264 | 274 | } |
| r7356 | r7357 | |
| 266 | 276 | |
| 267 | 277 | static WRITE16_HANDLER( io_chip_w ) |
| 268 | 278 | { |
| 279 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 269 | 280 | UINT8 old; |
| 270 | 281 | |
| 271 | 282 | /* generic implementation */ |
| 272 | 283 | offset &= 0x1f/2; |
| 273 | old = misc_io_data[offset]; | |
| 274 | misc_io_data[offset] = data; | |
| 284 | old = state->misc_io_data[offset]; | |
| 285 | state->misc_io_data[offset] = data; | |
| 275 | 286 | |
| 276 | 287 | switch (offset) |
| 277 | 288 | { |
| r7356 | r7357 | |
| 299 | 310 | |
| 300 | 311 | /* tile banking */ |
| 301 | 312 | case 0x0e/2: |
| 302 | if (rom_board == ROM_BOARD_171_5874 || rom_board == ROM_BOARD_171_SHADOW) | |
| 313 | if (state->rom_board == ROM_BOARD_171_5874 || state->rom_board == ROM_BOARD_171_SHADOW) | |
| 303 | 314 | { |
| 304 | 315 | int i; |
| 305 | 316 | for (i = 0; i < 4; i++) |
| r7356 | r7357 | |
| 322 | 333 | |
| 323 | 334 | static READ16_HANDLER( misc_io_r ) |
| 324 | 335 | { |
| 336 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 325 | 337 | static const char *const portnames[] = { "SERVICE", "COINAGE" }; |
| 326 | 338 | |
| 327 | 339 | offset &= 0x1fff; |
| r7356 | r7357 | |
| 337 | 349 | case 0x2000/2: |
| 338 | 350 | return input_port_read(space->machine, portnames[offset & 1]); |
| 339 | 351 | } |
| 340 | if (custom_io_r) | |
| 341 | return custom_io_r(space, offset, mem_mask); | |
| 352 | if (state->custom_io_r) | |
| 353 | return state->custom_io_r(space, offset, mem_mask); | |
| 342 | 354 | logerror("%06X:misc_io_r - unknown read access to address %04X\n", cpu_get_pc(space->cpu), offset * 2); |
| 343 | return segaic16_open_bus_r(space,0,mem_mask); | |
| 355 | return segaic16_open_bus_r(space, 0, mem_mask); | |
| 344 | 356 | } |
| 345 | 357 | |
| 346 | 358 | |
| 347 | 359 | static WRITE16_HANDLER( misc_io_w ) |
| 348 | 360 | { |
| 361 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 362 | ||
| 349 | 363 | offset &= 0x1fff; |
| 350 | 364 | switch (offset & (0x3000/2)) |
| 351 | 365 | { |
| r7356 | r7357 | |
| 368 | 382 | } |
| 369 | 383 | break; |
| 370 | 384 | } |
| 371 | if (custom_io_w) | |
| 385 | if (state->custom_io_w) | |
| 372 | 386 | { |
| 373 | custom_io_w(space, offset, data, mem_mask); | |
| 387 | state->custom_io_w(space, offset, data, mem_mask); | |
| 374 | 388 | return; |
| 375 | 389 | } |
| 376 | 390 | logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", cpu_get_pc(space->cpu), offset * 2, data, mem_mask); |
| r7356 | r7357 | |
| 432 | 446 | case 0x3024/2: |
| 433 | 447 | return input_port_read(space->machine, "P34START"); |
| 434 | 448 | } |
| 435 | return segaic16_open_bus_r(space,0,mem_mask); | |
| 449 | return segaic16_open_bus_r(space, 0, mem_mask); | |
| 436 | 450 | } |
| 437 | 451 | |
| 438 | 452 | |
| r7356 | r7357 | |
| 445 | 459 | |
| 446 | 460 | static READ16_HANDLER( lghost_custom_io_r ) |
| 447 | 461 | { |
| 462 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 448 | 463 | UINT16 result; |
| 449 | 464 | switch (offset) |
| 450 | 465 | { |
| r7356 | r7357 | |
| 452 | 467 | case 0x3012/2: |
| 453 | 468 | case 0x3014/2: |
| 454 | 469 | case 0x3016/2: |
| 455 | result = lghost_value | 0x7f; | |
| 456 | lghost_value <<= 1; | |
| 470 | result = state->lghost_value | 0x7f; | |
| 471 | state->lghost_value <<= 1; | |
| 457 | 472 | return result; |
| 458 | 473 | } |
| 459 | return segaic16_open_bus_r(space,0,mem_mask); | |
| 474 | return segaic16_open_bus_r(space, 0, mem_mask); | |
| 460 | 475 | } |
| 461 | 476 | |
| 462 | 477 | |
| 463 | 478 | static WRITE16_HANDLER( lghost_custom_io_w ) |
| 464 | 479 | { |
| 480 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 481 | ||
| 465 | 482 | switch (offset) |
| 466 | 483 | { |
| 467 | 484 | case 0x3010/2: |
| 468 | lghost_value = 255 - input_port_read(space->machine, "GUNY1"); | |
| 485 | state->lghost_value = 255 - input_port_read(space->machine, "GUNY1"); | |
| 469 | 486 | break; |
| 470 | 487 | |
| 471 | 488 | case 0x3012/2: |
| 472 | lghost_value = input_port_read(space->machine, "GUNX1"); | |
| 489 | state->lghost_value = input_port_read(space->machine, "GUNX1"); | |
| 473 | 490 | break; |
| 474 | 491 | |
| 475 | 492 | case 0x3014/2: |
| 476 | lghost_value = 255 - input_port_read(space->machine, lghost_select ? "GUNY3" : "GUNY2"); | |
| 493 | state->lghost_value = 255 - input_port_read(space->machine, state->lghost_select ? "GUNY3" : "GUNY2"); | |
| 477 | 494 | break; |
| 478 | 495 | |
| 479 | 496 | case 0x3016/2: |
| 480 | lghost_value = input_port_read(space->machine, lghost_select ? "GUNX3" : "GUNX2"); | |
| 497 | state->lghost_value = input_port_read(space->machine, state->lghost_select ? "GUNX3" : "GUNX2"); | |
| 481 | 498 | break; |
| 482 | 499 | |
| 483 | 500 | case 0x3020/2: |
| 484 | lghost_select = data & 1; | |
| 501 | state->lghost_select = data & 1; | |
| 485 | 502 | break; |
| 486 | 503 | } |
| 487 | 504 | } |
| r7356 | r7357 | |
| 496 | 513 | |
| 497 | 514 | static READ16_HANDLER( wwally_custom_io_r ) |
| 498 | 515 | { |
| 516 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 517 | ||
| 499 | 518 | switch (offset) |
| 500 | 519 | { |
| 501 | 520 | case 0x3000/2: |
| 502 | return (input_port_read(space->machine, "TRACKX1") - wwally_last_x[0]) & 0xff; | |
| 521 | return (input_port_read(space->machine, "TRACKX1") - state->wwally_last_x[0]) & 0xff; | |
| 503 | 522 | |
| 504 | 523 | case 0x3004/2: |
| 505 | return (input_port_read(space->machine, "TRACKY1") - wwally_last_y[0]) & 0xff; | |
| 524 | return (input_port_read(space->machine, "TRACKY1") - state->wwally_last_y[0]) & 0xff; | |
| 506 | 525 | |
| 507 | 526 | case 0x3008/2: |
| 508 | return (input_port_read(space->machine, "TRACKX2") - wwally_last_x[1]) & 0xff; | |
| 527 | return (input_port_read(space->machine, "TRACKX2") - state->wwally_last_x[1]) & 0xff; | |
| 509 | 528 | |
| 510 | 529 | case 0x300c/2: |
| 511 | return (input_port_read(space->machine, "TRACKY2") - wwally_last_y[1]) & 0xff; | |
| 530 | return (input_port_read(space->machine, "TRACKY2") - state->wwally_last_y[1]) & 0xff; | |
| 512 | 531 | |
| 513 | 532 | case 0x3010/2: |
| 514 | return (input_port_read(space->machine, "TRACKX3") - wwally_last_x[2]) & 0xff; | |
| 533 | return (input_port_read(space->machine, "TRACKX3") - state->wwally_last_x[2]) & 0xff; | |
| 515 | 534 | |
| 516 | 535 | case 0x3014/2: |
| 517 | return (input_port_read(space->machine, "TRACKY3") - wwally_last_y[2]) & 0xff; | |
| 536 | return (input_port_read(space->machine, "TRACKY3") - state->wwally_last_y[2]) & 0xff; | |
| 518 | 537 | } |
| 519 | return segaic16_open_bus_r(space,0,mem_mask); | |
| 538 | return segaic16_open_bus_r(space, 0, mem_mask); | |
| 520 | 539 | } |
| 521 | 540 | |
| 522 | 541 | |
| 523 | 542 | static WRITE16_HANDLER( wwally_custom_io_w ) |
| 524 | 543 | { |
| 544 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 545 | ||
| 525 | 546 | switch (offset) |
| 526 | 547 | { |
| 527 | 548 | case 0x3000/2: |
| 528 | 549 | case 0x3004/2: |
| 529 | wwally_last_x[0] = input_port_read(space->machine, "TRACKX1"); | |
| 530 | wwally_last_y[0] = input_port_read(space->machine, "TRACKY1"); | |
| 550 | state->wwally_last_x[0] = input_port_read(space->machine, "TRACKX1"); | |
| 551 | state->wwally_last_y[0] = input_port_read(space->machine, "TRACKY1"); | |
| 531 | 552 | break; |
| 532 | 553 | |
| 533 | 554 | case 0x3008/2: |
| 534 | 555 | case 0x300c/2: |
| 535 | wwally_last_x[1] = input_port_read(space->machine, "TRACKX2"); | |
| 536 | wwally_last_y[1] = input_port_read(space->machine, "TRACKY2"); | |
| 556 | state->wwally_last_x[1] = input_port_read(space->machine, "TRACKX2"); | |
| 557 | state->wwally_last_y[1] = input_port_read(space->machine, "TRACKY2"); | |
| 537 | 558 | break; |
| 538 | 559 | |
| 539 | 560 | case 0x3010/2: |
| 540 | 561 | case 0x3014/2: |
| 541 | wwally_last_x[2] = input_port_read(space->machine, "TRACKX3"); | |
| 542 | wwally_last_y[2] = input_port_read(space->machine, "TRACKY3"); | |
| 562 | state->wwally_last_x[2] = input_port_read(space->machine, "TRACKX3"); | |
| 563 | state->wwally_last_y[2] = input_port_read(space->machine, "TRACKY3"); | |
| 543 | 564 | break; |
| 544 | 565 | } |
| 545 | 566 | } |
| r7356 | r7357 | |
| 560 | 581 | |
| 561 | 582 | static WRITE8_HANDLER( mcu_data_w ) |
| 562 | 583 | { |
| 563 | mcu_data = data; | |
| 564 | cputag_set_input_line(space->machine, "mcu", MCS51_INT1_LINE, HOLD_LINE); | |
| 584 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 585 | state->mcu_data = data; | |
| 586 | cpu_set_input_line(state->mcu, MCS51_INT1_LINE, HOLD_LINE); | |
| 565 | 587 | } |
| 566 | 588 | |
| 567 | 589 | |
| r7356 | r7357 | |
| 1259 | 1281 | |
| 1260 | 1282 | static MACHINE_DRIVER_START( system18 ) |
| 1261 | 1283 | |
| 1284 | /* driver data */ | |
| 1285 | MDRV_DRIVER_DATA(segas1x_state) | |
| 1286 | ||
| 1262 | 1287 | /* basic machine hardware */ |
| 1263 | 1288 | MDRV_CPU_ADD("maincpu", M68000, 10000000) |
| 1264 | 1289 | MDRV_CPU_PROGRAM_MAP(system18_map) |
| r7356 | r7357 | |
| 2215 | 2240 | |
| 2216 | 2241 | static DRIVER_INIT( ddcrew ) |
| 2217 | 2242 | { |
| 2243 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2244 | ||
| 2218 | 2245 | DRIVER_INIT_CALL(generic_5987); |
| 2219 | custom_io_r = ddcrew_custom_io_r; | |
| 2246 | state->custom_io_r = ddcrew_custom_io_r; | |
| 2220 | 2247 | } |
| 2221 | 2248 | |
| 2222 | 2249 | static DRIVER_INIT( lghost ) |
| 2223 | 2250 | { |
| 2251 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2252 | ||
| 2224 | 2253 | DRIVER_INIT_CALL(generic_5987); |
| 2225 | custom_io_r = lghost_custom_io_r; | |
| 2226 | custom_io_w = lghost_custom_io_w; | |
| 2254 | state->custom_io_r = lghost_custom_io_r; | |
| 2255 | state->custom_io_w = lghost_custom_io_w; | |
| 2227 | 2256 | } |
| 2228 | 2257 | |
| 2229 | 2258 | static DRIVER_INIT( wwally ) |
| 2230 | 2259 | { |
| 2260 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2261 | ||
| 2231 | 2262 | DRIVER_INIT_CALL(generic_5987); |
| 2232 | custom_io_r = wwally_custom_io_r; | |
| 2233 | custom_io_w = wwally_custom_io_w; | |
| 2263 | state->custom_io_r = wwally_custom_io_r; | |
| 2264 | state->custom_io_w = wwally_custom_io_w; | |
| 2234 | 2265 | } |
| 2235 | 2266 | |
| 2236 | 2267 |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | driver by Luca Elia (l.elia@tin.it) |
| 6 | 6 | |
| 7 | 7 | CPU: 68000 |
| 8 | GFX: ASTRO V01 0005 | |
| 8 | GFX: ASTRO V01 0005 o | |
| 9 | 9 | SOUND: OKI M6295 (AD-65) |
| 10 | OTHER: | |
| 10 | OTHER: | |
| 11 | 11 | |
| 12 | 512 sprites, each made of N x M tiles. Tiles are 16x16x8 | |
| 13 | ||
| 14 | To do: | |
| 15 | ||
| 16 | - Find source of level 2 interrupt | |
| 17 | ||
| 12 | 18 | ***************************************************************************/ |
| 13 | 19 | |
| 14 | 20 | #include "emu.h" |
| 21 | #include "deprecat.h" | |
| 15 | 22 | #include "cpu/m68000/m68000.h" |
| 16 | 23 | #include "machine/eeprom.h" |
| 24 | #include "machine/ticket.h" | |
| 17 | 25 | #include "sound/okim6295.h" |
| 18 | 26 | |
| 19 | typedef struct _astrocrp_state astrocrp_state; | |
| 20 | struct _astrocrp_state | |
| 27 | typedef struct _astrocorp_state astrocorp_state; | |
| 28 | struct _astrocorp_state | |
| 21 | 29 | { |
| 22 | 30 | /* memory pointers */ |
| 23 | 31 | UINT16 * spriteram; |
| r7356 | r7357 | |
| 25 | 33 | size_t spriteram_size; |
| 26 | 34 | |
| 27 | 35 | /* video-related */ |
| 36 | bitmap_t * bitmap; | |
| 28 | 37 | UINT16 screen_enable; |
| 38 | UINT16 draw_sprites; | |
| 29 | 39 | }; |
| 30 | 40 | |
| 41 | /*************************************************************************** | |
| 42 | Video | |
| 43 | ***************************************************************************/ | |
| 31 | 44 | |
| 45 | static VIDEO_START( astrocorp ) | |
| 46 | { | |
| 47 | astrocorp_state *state = (astrocorp_state *)machine->driver_data; | |
| 48 | ||
| 49 | state->bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen); | |
| 50 | ||
| 51 | state_save_register_global_bitmap(machine, state->bitmap); | |
| 52 | state_save_register_global (machine, state->screen_enable); | |
| 53 | state_save_register_global (machine, state->draw_sprites); | |
| 54 | } | |
| 55 | ||
| 32 | 56 | /*************************************************************************** |
| 33 | 57 | Sprites Format |
| 34 | 58 | |
| r7356 | r7357 | |
| 47 | 71 | |
| 48 | 72 | ***************************************************************************/ |
| 49 | 73 | |
| 50 | static void draw_sprites( running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect ) | |
| 74 | static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect ) | |
| 51 | 75 | { |
| 52 | astrocrp_state *state = (astrocrp_state *)machine->driver_data; | |
| 76 | astrocorp_state *state = (astrocorp_state *)machine->driver_data; | |
| 53 | 77 | UINT16 *source = state->spriteram; |
| 54 | 78 | UINT16 *finish = state->spriteram + state->spriteram_size / 2; |
| 55 | 79 | |
| 56 | 80 | for ( ; source < finish; source += 8 / 2 ) |
| 57 | 81 | { |
| 58 | 82 | int x, y; |
| 83 | int xwrap, ywrap; | |
| 59 | 84 | |
| 60 | int sx = source[ 0x0/2 ]; | |
| 85 | int sx = source[ 0x0/2 ]; | |
| 61 | 86 | int code = source[ 0x2/2 ]; |
| 62 | int sy = source[ 0x4/2 ]; | |
| 87 | int sy = source[ 0x4/2 ]; | |
| 63 | 88 | int attr = source[ 0x6/2 ]; |
| 64 | 89 | |
| 65 | 90 | int dimx = (attr >> 8) & 0xff; |
| 66 | 91 | int dimy = (attr >> 0) & 0xff; |
| 67 | 92 | |
| 68 | if (! | |
| 93 | if (!s | |
| 69 | 94 | return; |
| 70 | 95 | |
| 71 | 96 | if (!(sx & 0x8000)) |
| 72 | 97 | continue; |
| 73 | 98 | |
| 74 | sx = (sx & 0x3fff) - (sx & 0x4000); | |
| 75 | sy = (sy & 0x3fff) - (sy & 0x4000); | |
| 99 | sx = (sx & 0x1fff) - (sx & 0x2000); | |
| 100 | sy = (sy & 0x1fff) - (sy & 0x2000); | |
| 76 | 101 | |
| 77 | 102 | for (y = 0 ; y < dimy ; y++) |
| 78 | 103 | { |
| 79 | 104 | for (x = 0 ; x < dimx ; x++) |
| 80 | 105 | { |
| 81 | drawgfx_transpen(bitmap,cliprect, machine->gfx[0], | |
| 82 | code++, 0, | |
| 83 | 0, 0, | |
| 84 | sx + x * 16, sy + y * 16, 0xff); | |
| 106 | for (ywrap = 0 ; ywrap <= 0x100 ; ywrap += 0x100) | |
| 107 | { | |
| 108 | for (xwrap = 0 ; xwrap <= 0x200 ; xwrap += 0x200) | |
| 109 | { | |
| 110 | drawgfx_transpen(bitmap,cliprect, machine->gfx[0], | |
| 111 | code, 0, | |
| 112 | 0, 0, | |
| 113 | sx + x * 16 - xwrap, sy + y * 16 - ywrap, 0xff); | |
| 114 | } | |
| 115 | } | |
| 116 | code++; | |
| 85 | 117 | } |
| 86 | 118 | } |
| 87 | 119 | } |
| r7356 | r7357 | |
| 89 | 121 | |
| 90 | 122 | static VIDEO_UPDATE(astrocorp) |
| 91 | 123 | { |
| 92 | astrocrp_state *state = (astrocrp_state *)screen->machine->driver_data; | |
| 124 | astrocorp_state *state = (astrocorp_state *)screen->machine->driver_data; | |
| 93 | 125 | |
| 94 | 126 | if (state->screen_enable & 1) |
| 95 | 127 | { |
| 96 | 128 | bitmap_fill(bitmap,cliprect,screen->machine->pens[0xff]); |
| 97 | | |
| 129 | co | |
| 98 | 130 | } |
| 99 | 131 | else |
| 100 | 132 | bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine)); |
| r7356 | r7357 | |
| 107 | 139 | Memory Maps |
| 108 | 140 | ***************************************************************************/ |
| 109 | 141 | |
| 142 | static WRITE16_HANDLER( astrocorp_draw_sprites_w ) | |
| 143 | { | |
| 144 | astrocorp_state *state = (astrocorp_state *)space->machine->driver_data; | |
| 110 | 145 | |
| 146 | UINT16 old = state->draw_sprites; | |
| 147 | UINT16 now = COMBINE_DATA(&state->draw_sprites); | |
| 148 | ||
| 149 | if (!old && now) | |
| 150 | draw_sprites(space->machine, state->bitmap, video_screen_get_visible_area(space->machine->primary_screen)); | |
| 151 | } | |
| 152 | ||
| 111 | 153 | static WRITE16_HANDLER( astrocorp_eeprom_w ) |
| 112 | 154 | { |
| 113 | 155 | if (ACCESSING_BITS_0_7) |
| r7356 | r7357 | |
| 125 | 167 | } |
| 126 | 168 | } |
| 127 | 169 | |
| 128 | static WRITE16_HANDLER( | |
| 170 | static WRITE16_DEVICE_HANDLER( | |
| 129 | 171 | { |
| 130 | 172 | if (ACCESSING_BITS_0_7) |
| 131 | 173 | { |
| 174 | okim6295_set_bank_base(device, 0x40000 * (data & 1)); | |
| 175 | // logerror("CPU #0 PC %06X: OKI bank %08X\n", cpu_get_pc(space->cpu), data); | |
| 176 | } | |
| 177 | } | |
| 178 | ||
| 179 | static WRITE16_HANDLER( showhand_outputs_w ) | |
| 180 | { | |
| 181 | if (ACCESSING_BITS_0_7) | |
| 182 | { | |
| 132 | 183 | coin_counter_w(space->machine, 0, (data & 0x0004)); // coin counter |
| 133 | 184 | set_led_status(space->machine, 0, (data & 0x0008)); // you win |
| 134 | 185 | if ((data & 0x0010)) increment_dispensed_tickets(space->machine, 1); // coin out |
| r7356 | r7357 | |
| 145 | 196 | // popmessage("%04X",data); |
| 146 | 197 | } |
| 147 | 198 | |
| 199 | static WRITE16_HANDLER( skilldrp_outputs_w ) | |
| 200 | { | |
| 201 | // key in (0001) | |
| 202 | // coin in (0002) | |
| 203 | // key out (0004) | |
| 204 | // coin out (0008) | |
| 205 | // hopper? (0010) | |
| 206 | // error lamp (0020) | |
| 207 | // ticket motor? (0080) | |
| 208 | // select lamp (0100) | |
| 209 | // take lamp (0400) | |
| 210 | // bet lamp (0800) | |
| 211 | // start lamp (1000) | |
| 212 | // win / test lamp (4000) | |
| 213 | // ticket? (8000) | |
| 214 | ||
| 215 | // account (5d20 4d20 4520 4420 4020 4000) | |
| 216 | ||
| 217 | if (ACCESSING_BITS_0_7) | |
| 218 | { | |
| 219 | coin_counter_w(space->machine, 0, (data & 0x0001)); // key in | | |
| 220 | coin_counter_w(space->machine, 0, (data & 0x0002)); // coin in |- manual shows 1 in- and 1 out- counter | |
| 221 | coin_counter_w(space->machine, 1, (data & 0x0004)); // key out | | |
| 222 | ticket_dispenser_w(devtag_get_device(space->machine, "hopper"), 0, (data & 0x0008)<<4); // hopper motor? | |
| 223 | // (data & 0x0010) // hopper? | |
| 224 | set_led_status(space->machine, 0, (data & 0x0020)); // error lamp (coin/hopper jam: "call attendant") | |
| 225 | ticket_dispenser_w(devtag_get_device(space->machine, "ticket"), 0, data & 0x0080); // ticket motor? | |
| 226 | } | |
| 227 | if (ACCESSING_BITS_8_15) | |
| 228 | { | |
| 229 | // lamps: | |
| 230 | set_led_status(space->machine, 1, (data & 0x0100)); // select | |
| 231 | set_led_status(space->machine, 2, (data & 0x0400)); // take | |
| 232 | set_led_status(space->machine, 3, (data & 0x0800)); // bet | |
| 233 | set_led_status(space->machine, 4, (data & 0x1000)); // start | |
| 234 | set_led_status(space->machine, 5, (data & 0x4000)); // win / test | |
| 235 | set_led_status(space->machine, 6, (data & 0x8000)); // ticket? | |
| 236 | } | |
| 237 | ||
| 238 | // popmessage("%04X",data); | |
| 239 | } | |
| 240 | ||
| 148 | 241 | static WRITE16_HANDLER( astrocorp_enable_w ) |
| 149 | 242 | { |
| 150 | astrocrp_state *state = (astrocrp_state *)space->machine->driver_data; | |
| 243 | astrocorp_state *state = (astrocorp_state *)space->machine->driver_data; | |
| 151 | 244 | COMBINE_DATA(&state->screen_enable); |
| 152 | 245 | // popmessage("%04X",data); |
| 153 | if (data & (~1)) | |
| 154 | logerror("CPU #0 PC %06X: screen enable = %04X\n", cpu_get_pc(space->cpu), data); | |
| 246 | if (state->screen_enable & (~1)) | |
| 247 | logerror("CPU #0 PC %06X: screen enable = %04X\n", cpu_get_pc(space->cpu), state->screen_enable); | |
| 155 | 248 | } |
| 156 | 249 | |
| 157 | 250 | static READ16_HANDLER( astrocorp_unk_r ) |
| r7356 | r7357 | |
| 162 | 255 | // 5-6-5 Palette: BBBBB-GGGGGG-RRRRR |
| 163 | 256 | static WRITE16_HANDLER( astrocorp_palette_w ) |
| 164 | 257 | { |
| 165 | astrocrp_state *state = (astrocrp_state *)space->machine->driver_data; | |
| 258 | astrocorp_state *state = (astrocorp_state *)space->machine->driver_data; | |
| 166 | 259 | COMBINE_DATA(&state->paletteram[offset]); |
| 167 | 260 | palette_set_color_rgb(space->machine, offset, |
| 168 | 261 | pal5bit((state->paletteram[offset] >> 0) & 0x1f), |
| r7356 | r7357 | |
| 173 | 266 | |
| 174 | 267 | static ADDRESS_MAP_START( showhand_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 175 | 268 | AM_RANGE( 0x000000, 0x01ffff ) AM_ROM |
| 176 | AM_RANGE( 0x050000, 0x050fff ) AM_RAM AM_BASE_SIZE_MEMBER(astrocrp_state, spriteram, spriteram_size) | |
| 177 | AM_RANGE( 0x052000, 0x052001 ) AM_WRITENOP | |
| 269 | AM_RANGE( 0x050000, 0x050fff ) AM_RAM AM_BASE_SIZE_MEMBER(astrocorp_state, spriteram, spriteram_size) | |
| 270 | AM_RANGE( 0x052000, 0x052001 ) AM_WRITE(astrocorp_draw_sprites_w) | |
| 178 | 271 | AM_RANGE( 0x054000, 0x054001 ) AM_READ_PORT("INPUTS") |
| 179 | 272 | AM_RANGE( 0x058000, 0x058001 ) AM_WRITE(astrocorp_eeprom_w) |
| 180 | AM_RANGE( 0x05a000, 0x05a001 ) AM_WRITE( | |
| 273 | AM_RANGE( 0x05a000, 0x05a001 ) AM_WRITE( | |
| 181 | 274 | AM_RANGE( 0x05e000, 0x05e001 ) AM_READ_PORT("EEPROMIN") |
| 182 | AM_RANGE( 0x060000, 0x0601ff ) AM_RAM_WRITE(astrocorp_palette_w) AM_BASE_MEMBER(astrocrp_state, paletteram) | |
| 183 | AM_RANGE( 0x070000, 0x073fff ) AM_RAM | |
| 275 | AM_RANGE( 0x060000, 0x0601ff ) AM_RAM_WRITE(astrocorp_palette_w) AM_BASE_MEMBER(astrocorp_state, paletteram) | |
| 276 | AM_RANGE( 0x070000, 0x073fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // battery | |
| 184 | 277 | AM_RANGE( 0x080000, 0x080001 ) AM_DEVWRITE("oki", astrocorp_sound_bank_w) |
| 185 | 278 | AM_RANGE( 0x0a0000, 0x0a0001 ) AM_WRITE(astrocorp_enable_w) |
| 186 | 279 | AM_RANGE( 0x0d0000, 0x0d0001 ) AM_READ(astrocorp_unk_r) AM_DEVWRITE8("oki", okim6295_w, 0xff00) |
| r7356 | r7357 | |
| 188 | 281 | |
| 189 | 282 | static ADDRESS_MAP_START( showhanc_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 190 | 283 | AM_RANGE( 0x000000, 0x01ffff ) AM_ROM |
| 191 | AM_RANGE( 0x060000, 0x0601ff ) AM_RAM_WRITE(astrocorp_palette_w) AM_BASE_MEMBER(astrocrp_state, paletteram) | |
| 284 | AM_RANGE( 0x060000, 0x0601ff ) AM_RAM_WRITE(astrocorp_palette_w) AM_BASE_MEMBER(astrocorp_state, paletteram) | |
| 192 | 285 | AM_RANGE( 0x070000, 0x070001 ) AM_DEVWRITE("oki", astrocorp_sound_bank_w) |
| 193 | AM_RANGE( 0x080000, 0x080fff ) AM_RAM AM_BASE_SIZE_MEMBER(astrocrp_state, spriteram, spriteram_size) | |
| 194 | AM_RANGE( 0x082000, 0x082001 ) AM_WRITENOP | |
| 286 | AM_RANGE( 0x080000, 0x080fff ) AM_RAM AM_BASE_SIZE_MEMBER(astrocorp_state, spriteram, spriteram_size) | |
| 287 | AM_RANGE( 0x082000, 0x082001 ) AM_WRITE(astrocorp_draw_sprites_w) | |
| 195 | 288 | AM_RANGE( 0x084000, 0x084001 ) AM_READ_PORT("INPUTS") |
| 196 | 289 | AM_RANGE( 0x088000, 0x088001 ) AM_WRITE(astrocorp_eeprom_w) |
| 197 | AM_RANGE( 0x08a000, 0x08a001 ) AM_WRITE( | |
| 290 | AM_RANGE( 0x08a000, 0x08a001 ) AM_WRITE( | |
| 198 | 291 | AM_RANGE( 0x08e000, 0x08e001 ) AM_READ_PORT("EEPROMIN") |
| 199 | AM_RANGE( 0x090000, 0x093fff ) AM_RAM | |
| 292 | AM_RANGE( 0x090000, 0x093fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // battery | |
| 200 | 293 | AM_RANGE( 0x0a0000, 0x0a0001 ) AM_WRITE(astrocorp_enable_w) |
| 201 | 294 | AM_RANGE( 0x0e0000, 0x0e0001 ) AM_READ(astrocorp_unk_r) AM_DEVWRITE8("oki", okim6295_w, 0xff00) |
| 202 | 295 | ADDRESS_MAP_END |
| 203 | 296 | |
| 297 | static ADDRESS_MAP_START( skilldrp_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 298 | AM_RANGE( 0x000000, 0x03ffff ) AM_ROM | |
| 299 | AM_RANGE( 0x200000, 0x200fff ) AM_RAM AM_BASE_SIZE_MEMBER(astrocorp_state, spriteram, spriteram_size) | |
| 300 | AM_RANGE( 0x202000, 0x202001 ) AM_WRITE(astrocorp_draw_sprites_w) | |
| 301 | AM_RANGE( 0x204000, 0x204001 ) AM_READ_PORT("INPUTS") | |
| 302 | AM_RANGE( 0x208000, 0x208001 ) AM_WRITE(astrocorp_eeprom_w) | |
| 303 | AM_RANGE( 0x20a000, 0x20a001 ) AM_WRITE(skilldrp_outputs_w) | |
| 304 | AM_RANGE( 0x20e000, 0x20e001 ) AM_READ_PORT("EEPROMIN") | |
| 305 | AM_RANGE( 0x380000, 0x3801ff ) AM_RAM_WRITE(astrocorp_palette_w) AM_BASE_MEMBER(astrocorp_state, paletteram) | |
| 306 | AM_RANGE( 0x400000, 0x400001 ) AM_WRITE(astrocorp_enable_w) | |
| 307 | AM_RANGE( 0x500000, 0x507fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // battery | |
| 308 | AM_RANGE( 0x580000, 0x580001 ) AM_DEVWRITE("oki", skilldrp_sound_bank_w) | |
| 309 | AM_RANGE( 0x600000, 0x600001 ) AM_DEVREADWRITE8("oki", okim6295_r, okim6295_w, 0x00ff) | |
| 310 | ADDRESS_MAP_END | |
| 311 | ||
| 204 | 312 | /*************************************************************************** |
| 205 | 313 | Input Ports |
| 206 | 314 | ***************************************************************************/ |
| r7356 | r7357 | |
| 225 | 333 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) // coin sensor |
| 226 | 334 | |
| 227 | 335 | PORT_START( "EEPROMIN" ) |
| 228 | PORT_BIT( 0xfff7, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 336 | PORT_BIT( 0xfff7, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 229 | 337 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_READ_LINE_DEVICE("eeprom", eeprom_read_bit) |
| 230 | 338 | |
| 231 | 339 | PORT_START( "EEPROMOUT" ) |
| 232 | 340 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_write_bit) |
| 233 | 341 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_set_clock_line) |
| 234 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_set_cs_line) | |
| 342 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_set_cs_line) | |
| 235 | 343 | INPUT_PORTS_END |
| 236 | 344 | |
| 237 | 345 | static INPUT_PORTS_START( showhanc ) |
| r7356 | r7357 | |
| 254 | 362 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 255 | 363 | |
| 256 | 364 | PORT_START( "EEPROMIN" ) |
| 257 | PORT_BIT( 0xfff7, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 365 | PORT_BIT( 0xfff7, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 258 | 366 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_READ_LINE_DEVICE("eeprom", eeprom_read_bit) |
| 259 | 367 | |
| 260 | 368 | PORT_START( "EEPROMOUT" ) |
| 261 | 369 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_write_bit) |
| 262 | 370 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_set_clock_line) |
| 263 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_set_cs_line) | |
| 371 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_set_cs_line) | |
| 264 | 372 | INPUT_PORTS_END |
| 265 | 373 | |
| 374 | static INPUT_PORTS_START( skilldrp ) | |
| 375 | PORT_START("INPUTS") // 204000 | |
| 376 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) | |
| 377 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) | |
| 378 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) | |
| 379 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START3 ) PORT_NAME("Select / Double") | |
| 380 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 381 | PORT_SERVICE_NO_TOGGLE( 0x0020, IP_ACTIVE_LOW ) | |
| 382 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) | |
| 383 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) | |
| 384 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("Ticket Out") | |
| 385 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 386 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 387 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Bet") | |
| 388 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("ticket", ticket_dispenser_line_r) // ticket sw | |
| 389 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) | |
| 390 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("hopper", ticket_dispenser_line_r) // hopper sw | |
| 391 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) | |
| 392 | ||
| 393 | PORT_START( "EEPROMIN" ) | |
| 394 | PORT_BIT( 0xfff7, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 395 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_READ_LINE_DEVICE("eeprom", eeprom_read_bit) | |
| 396 | ||
| 397 | PORT_START( "EEPROMOUT" ) | |
| 398 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_write_bit) | |
| 399 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_set_clock_line) | |
| 400 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("eeprom", eeprom_set_cs_line) | |
| 401 | INPUT_PORTS_END | |
| 402 | ||
| 266 | 403 | /*************************************************************************** |
| 267 | 404 | Graphics Layout |
| 268 | 405 | ***************************************************************************/ |
| r7356 | r7357 | |
| 287 | 424 | Machine Drivers |
| 288 | 425 | ***************************************************************************/ |
| 289 | 426 | |
| 290 | static MACHINE_START( showhand ) | |
| 291 | { | |
| 292 | astrocrp_state *state = (astrocrp_state *)machine->driver_data; | |
| 293 | state_save_register_global(machine, state->screen_enable); | |
| 294 | } | |
| 427 | static const UINT16 showhand_default_eeprom[15] = {0x0001,0x0007,0x000a,0x0003,0x0000,0x0009,0x0003,0x0000,0x0002,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000}; | |
| 295 | 428 | |
| 296 | static MACHINE_RESET( showhand ) | |
| 297 | { | |
| 298 | astrocrp_state *state = (astrocrp_state *)machine->driver_data; | |
| 299 | state->screen_enable = 0; | |
| 300 | } | |
| 301 | ||
| 302 | ||
| 303 | static const UINT16 showhand_default_eeprom[0x0f] = {0x0001,0x0007,0x000a,0x0003,0x0000,0x0009,0x0003,0x0000,0x0002,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000}; | |
| 304 | ||
| 305 | 429 | static MACHINE_DRIVER_START( showhand ) |
| 306 | 430 | |
| 307 | 431 | /* driver data */ |
| 308 | MDRV_DRIVER_DATA(astrocrp_state) | |
| 432 | MDRV_DRIVER_DATA(astrocorp_state) | |
| 309 | 433 | |
| 310 | 434 | /* basic machine hardware */ |
| 311 | 435 | MDRV_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2) |
| 312 | 436 | MDRV_CPU_PROGRAM_MAP(showhand_map) |
| 313 | 437 | MDRV_CPU_VBLANK_INT("screen", irq4_line_hold) |
| 314 | 438 | |
| 315 | MDRV_MACHINE_START(showhand) | |
| 316 | MDRV_MACHINE_RESET(showhand) | |
| 317 | ||
| 439 | MDRV_NVRAM_HANDLER(generic_0fill) | |
| 318 | 440 | MDRV_EEPROM_93C46_ADD("eeprom") |
| 319 | 441 | MDRV_EEPROM_DATA(showhand_default_eeprom, sizeof(showhand_default_eeprom)) |
| 320 | 442 | |
| r7356 | r7357 | |
| 329 | 451 | MDRV_GFXDECODE(astrocorp) |
| 330 | 452 | MDRV_PALETTE_LENGTH(0x100) |
| 331 | 453 | |
| 454 | MDRV_VIDEO_START(astrocorp) | |
| 332 | 455 | MDRV_VIDEO_UPDATE(astrocorp) |
| 333 | 456 | |
| 334 | 457 | /* sound hardware */ |
| r7356 | r7357 | |
| 347 | 470 | MACHINE_DRIVER_END |
| 348 | 471 | |
| 349 | 472 | |
| 473 | static INTERRUPT_GEN( skilldrp_irq ) | |
| 474 | { | |
| 475 | switch (cpu_getiloops(device)) | |
| 476 | { | |
| 477 | case 0: cpu_set_input_line(device, 4, HOLD_LINE); break; // sprites, sound, i/o | |
| 478 | case 1: cpu_set_input_line(device, 2, HOLD_LINE); break; // palette | |
| 479 | } | |
| 480 | } | |
| 481 | ||
| 482 | static MACHINE_DRIVER_START( skilldrp ) | |
| 483 | ||
| 484 | /* driver data */ | |
| 485 | MDRV_DRIVER_DATA(astrocorp_state) | |
| 486 | ||
| 487 | /* basic machine hardware */ | |
| 488 | MDRV_CPU_ADD("maincpu", M68000, XTAL_24MHz / 2) // JX-1689F1028N GRX586.V5 | |
| 489 | MDRV_CPU_PROGRAM_MAP(skilldrp_map) | |
| 490 | MDRV_CPU_VBLANK_INT_HACK(skilldrp_irq, 2) | |
| 491 | ||
| 492 | MDRV_NVRAM_HANDLER(generic_0fill) | |
| 493 | MDRV_EEPROM_93C46_ADD("eeprom") | |
| 494 | ||
| 495 | MDRV_TICKET_DISPENSER_ADD("ticket", 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW ) | |
| 496 | MDRV_TICKET_DISPENSER_ADD("hopper", 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW ) | |
| 497 | ||
| 498 | /* video hardware */ | |
| 499 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 500 | MDRV_SCREEN_REFRESH_RATE(58.846) | |
| 501 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) | |
| 502 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 503 | MDRV_SCREEN_SIZE(0x200, 0x100) | |
| 504 | MDRV_SCREEN_VISIBLE_AREA(0, 0x200-1, 0, 0xf0-1) | |
| 505 | ||
| 506 | MDRV_GFXDECODE(astrocorp) | |
| 507 | MDRV_PALETTE_LENGTH(0x100) | |
| 508 | ||
| 509 | MDRV_VIDEO_START(astrocorp) | |
| 510 | MDRV_VIDEO_UPDATE(astrocorp) | |
| 511 | ||
| 512 | /* sound hardware */ | |
| 513 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 514 | ||
| 515 | MDRV_SOUND_ADD("oki", OKIM6295, XTAL_24MHz/24) | |
| 516 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) | |
| 517 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 518 | MACHINE_DRIVER_END | |
| 519 | ||
| 520 | ||
| 350 | 521 | /*************************************************************************** |
| 351 | 522 | ROMs Loading |
| 352 | 523 | ***************************************************************************/ |
| r7356 | r7357 | |
| 441 | 612 | ROM_LOAD( "5.u43", 0x00000, 0x80000, CRC(d6b70f02) SHA1(5a94680594c1f06196fe3bcf7faf56e2ed576f01) ) |
| 442 | 613 | ROM_END |
| 443 | 614 | |
| 615 | /*************************************************************************** | |
| 444 | 616 | |
| 617 | Skill Drop Georgia | |
| 618 | ||
| 619 | "Sep 13 2002 09:17:54" in code rom. | |
| 620 | ||
| 621 | AAI276832 on sticker | |
| 622 | ||
| 623 | ***************************************************************************/ | |
| 624 | ||
| 625 | ROM_START( skilldrp ) | |
| 626 | ROM_REGION( 0x40000, "maincpu", 0 ) | |
| 627 | ROM_LOAD16_WORD_SWAP( "7-skill_drop_g1.0s.bc133", 0x00000, 0x40000, CRC(f968b783) SHA1(1d693b1d460e659ca94aae8625ea26e120053f84) ) | |
| 628 | ||
| 629 | ROM_REGION( 0x200000, "sprites", 0 ) | |
| 630 | ROM_LOAD( "mx29f1610amc.u26", 0x000000, 0x200000, CRC(4fdac800) SHA1(bcafceb6c34866c474714347e23f9e819b5fcfa6) ) | |
| 631 | ||
| 632 | ROM_REGION( 0x80000, "oki", 0 ) | |
| 633 | ROM_LOAD( "5-skill_drop.bc52", 0x00000, 0x80000, CRC(a479e06d) SHA1(ee690d39188b8a43652c4aa5bf8267c1f6632d2f) ) | |
| 634 | ||
| 635 | ROM_REGION16_BE( 0x80, "eeprom", 0 ) | |
| 636 | ROM_LOAD( "skilldrp.nv", 0x00, 0x80, CRC(57886a3d) SHA1(bad8fa2ec2262ccb5ef8ec50959aec3f3bf8b90b) ) | |
| 637 | ROM_END | |
| 638 | ||
| 445 | 639 | static DRIVER_INIT( showhand ) |
| 446 | 640 | { |
| 447 | 641 | #if 0 |
| r7356 | r7357 | |
| 471 | 665 | #endif |
| 472 | 666 | } |
| 473 | 667 | |
| 474 | GAME( 1999?, showhand, 0, showhand, showhand, showhand, ROT0, "Astro Corp.", "Show Hand (Italy)", GAME_SUPPORTS_SAVE ) | |
| 475 | GAME( 1999?, showhanc, showhand, showhanc, showhanc, showhanc, ROT0, "Astro Corp.", "Wang Pai Dui Jue", GAME_SUPPORTS_SAVE ) | |
| 668 | GAME( 1999?, showhand, 0, showhand, showhand, showhand, ROT0, "Astro Corp.", "Show Hand (Italy)", GAME_SUPPORTS_SAVE ) | |
| 669 | GAME( 1999?, showhanc, showhand, showhanc, showhanc, showhanc, ROT0, "Astro Corp.", "Wang Pai Dui Jue", GAME_SUPPORTS_SAVE ) | |
| 670 | GAME( 2002, skilldrp, 0, skilldrp, skilldrp, 0, ROT0, "Astro Corp.", "Skill Drop Georgia", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 3 | 3 | TS 01.05.2006: |
| 4 | 4 | |
| 5 | 5 | - added sprites, bgmap reading and few ixes here and there |
| 6 | airraid and cshootre are a bit "playable" ;) without gfx | |
| 6 | airraid and cshootere are a bit "playable" ;) without gfx | |
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | Haze's notes : |
| r7356 | r7357 | |
| 14 | 14 | - i can't decode the other gfx? rom |
| 15 | 15 | - there don't seem to be any sprites / bg's in ram, interrupts? |
| 16 | 16 | - palette? format isn't understood |
| 17 | - the other sets ('cshootre' and 'airraid') need decrypting .. | |
| 17 | - the other sets ('cshootere' and 'airraid') need decrypting .. | |
| 18 | 18 | is the main one protected ? theres a 68705 on it |
| 19 | 19 | |
| 20 | 20 | |
| r7356 | r7357 | |
| 658 | 658 | memory_set_bankptr(machine, "bank1",&memory_region(machine, "user1")[0]); |
| 659 | 659 | } |
| 660 | 660 | |
| 661 | static DRIVER_INIT( cshootre ) | |
| 661 | static DRIVER_INIT( cshootere ) | |
| 662 | 662 | { |
| 663 | 663 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 664 | 664 | int A; |
| r7356 | r7357 | |
| 698 | 698 | |
| 699 | 699 | |
| 700 | 700 | |
| 701 | GAME( 1987, cshooter, 0, cshooter, cshooter, cshooter, ROT270, "[Seibu Kaihatsu] (Taito license)", "Cross Shooter (not encrypted)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 702 | GAME( 1987, cshootere, cshooter, airraid, cshooter, cshootre, ROT270, "[Seibu Kaihatsu] (J.K.H. license)", "Cross Shooter (encrypted)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 703 | GAME( 1987, airraid, cshooter, airraid, cshooter, cshootre, ROT270, "Seibu Kaihatsu", "Air Raid (encrypted)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 701 | GAME( 1987, cshooter, 0, cshooter, cshooter, cshooter, ROT270, "[Seibu Kaihatsu] (Taito license)", "Cross Shooter (not encrypted)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 702 | GAME( 1987, cshootere, cshooter, airraid, cshooter, cshootere, ROT270, "[Seibu Kaihatsu] (J.K.H. license)", "Cross Shooter (encrypted)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 703 | GAME( 1987, airraid, cshooter, airraid, cshooter, cshootere, ROT270, "Seibu Kaihatsu", "Air Raid (encrypted)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 704 | 704 |
| r7356 | r7357 | |
|---|---|---|
| 778 | 778 | PORT_DIPSETTING( 0x0000, "5 Points" ) |
| 779 | 779 | INPUT_PORTS_END |
| 780 | 780 | |
| 781 | static INPUT_PORTS_START( spinlbru ) | |
| 781 | static INPUT_PORTS_START( spinlbrku ) | |
| 782 | 782 | PORT_INCLUDE(spinlbrk) |
| 783 | 783 | |
| 784 | 784 | PORT_MODIFY("DSW") |
| r7356 | r7357 | |
| 2502 | 2502 | |
| 2503 | 2503 | |
| 2504 | 2504 | GAME( 1990, spinlbrk, 0, spinlbrk, spinlbrk, 0, ROT0, "V-System Co.", "Spinal Breakers (World)", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL ) |
| 2505 | GAME( 1990, spinlbrku,spinlbrk, spinlbrk, spinlbru, | |
| 2505 | GAME( 1990, spinlbrku,spinlbrk, spinlbrk, spinlbrku, | |
| 2506 | 2506 | GAME( 1990, spinlbrkj,spinlbrk, spinlbrk, spinlbrk, 0, ROT0, "V-System Co.", "Spinal Breakers (Japan)", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL ) |
| 2507 | 2507 | GAME( 1991, pspikes, 0, pspikes, pspikes, 0, ROT0, "Video System Co.", "Power Spikes (World)", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL ) |
| 2508 | 2508 | GAME( 1991, pspikesk, pspikes, pspikes, pspikes, 0, ROT0, "Video System Co.", "Power Spikes (Korea)", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL ) |
| r7356 | r7357 | |
|---|---|---|
| 390 | 390 | PORT_BIT ( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 391 | 391 | INPUT_PORTS_END |
| 392 | 392 | |
| 393 | static INPUT_PORTS_START( cliffhga ) | |
| 393 | static INPUT_PORTS_START( cliffhgra ) | |
| 394 | 394 | PORT_START("BANK0") |
| 395 | 395 | PORT_BIT ( 0x3F, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 396 | 396 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* SW2 on CPU PCB */ |
| r7356 | r7357 | |
| 783 | 783 | * |
| 784 | 784 | *************************************/ |
| 785 | 785 | |
| 786 | GAME( 1983, cliffhgr, 0, cliffhgr, cliffhgr, cliff, ROT0, "Stern Electronics", "Cliff Hanger", 0) | |
| 787 | GAME( 1983, cliffhgra,cliffhgr, cliffhgr, cliffhga, cliff, ROT0, "Stern Electronics", "Cliff Hanger (Alt)", 0) | |
| 786 | GAME( 1983, cliffhgr, 0, cliffhgr, cliffhgr, cliff, ROT0, "Stern Electronics", "Cliff Hanger", 0) | |
| 787 | GAME( 1983, cliffhgra,cliffhgr, cliffhgr, cliffhgra, cliff, ROT0, "Stern Electronics", "Cliff Hanger (Alt)", 0) | |
| 788 | 788 | GAME( 1983, goaltogo, 0, cliffhgr, goaltogo, cliff, ROT0, "Stern Electronics", "Goal To Go", GAME_NOT_WORKING) |
| r7356 | r7357 | |
|---|---|---|
| 139 | 139 | KONAMI8_B1_UNK(2) |
| 140 | 140 | INPUT_PORTS_END |
| 141 | 141 | |
| 142 | static INPUT_PORTS_START( thehustj ) | |
| 142 | static INPUT_PORTS_START( thehustlj ) | |
| 143 | 143 | PORT_INCLUDE( battlnts ) |
| 144 | 144 | |
| 145 | 145 | PORT_MODIFY("DSW2") |
| r7356 | r7357 | |
| 418 | 418 | |
| 419 | 419 | GAME( 1987, battlnts, 0, battlnts, battlnts, 0, ROT90, "Konami", "Battlantis", GAME_SUPPORTS_SAVE ) |
| 420 | 420 | GAME( 1987, battlntsj, battlnts, battlnts, battlnts, 0, ROT90, "Konami", "Battlantis (Japan)", GAME_SUPPORTS_SAVE ) |
| 421 | GAME( 1987, rackemup, 0, battlnts, thehustj, rackemup, ROT90, "Konami", "Rack 'em Up", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 422 | GAME( 1987, thehustl, rackemup, battlnts, thehustj, 0, ROT90, "Konami", "The Hustler (Japan version M)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 423 | GAME( 1987, thehustlj, rackemup, battlnts, thehustj, 0, ROT90, "Konami", "The Hustler (Japan version J)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 421 | GAME( 1987, rackemup, 0, battlnts, thehustlj,rackemup, ROT90, "Konami", "Rack 'em Up", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 422 | GAME( 1987, thehustl, rackemup, battlnts, thehustlj,0, ROT90, "Konami", "The Hustler (Japan version M)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 423 | GAME( 1987, thehustlj, rackemup, battlnts, thehustlj,0, ROT90, "Konami", "The Hustler (Japan version J)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 2583 | 2583 | |
| 2584 | 2584 | ROM_START( viprp1hk ) |
| 2585 | 2585 | ROM_REGION32_LE(0x200000, "user1", 0) /* i386 program */ |
| 2586 | ROM_LOAD32_BYTE("seibu_1", 0x000000, 0x80000, CRC(283ba7b7) SHA1(28122e04b72f1163c69f3f845f6a493fdb6ed652) ) /* | |
| 2586 | ROM_LOAD32_BYTE("seibu_1", 0x000000, 0x80000, CRC(283ba7b7) SHA1(28122e04b72f1163c69f3f845f6a493fdb6ed652) ) /* Old Version, "=HONG KONG=" s | |
| 2587 | 2587 | ROM_LOAD32_BYTE("seibu_2", 0x000001, 0x80000, CRC(2c4db249) SHA1(a6372c9a3cde5f262ec5ef446945f6d3ad506e88) ) |
| 2588 | 2588 | ROM_LOAD32_BYTE("seibu_3", 0x000002, 0x80000, CRC(91989503) SHA1(8c215fac200cc693396dbd57e0939e7efe883342) ) |
| 2589 | 2589 | ROM_LOAD32_BYTE("seibu_4", 0x000003, 0x80000, CRC(12c9582d) SHA1(a79e26514e5ab8703a7a8c3ac39b359cfa4117c1) ) |
| r7356 | r7357 | |
| 3499 | 3499 | GAME( 1995, batlballu, senkyu, spi, spi_3button, batlball, ROT0, "Seibu Kaihatsu (Fabtek License)", "Battle Balls (US)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3500 | 3500 | |
| 3501 | 3501 | GAME( 1995, viprp1, 0, spi, spi_3button, viprp1, ROT270, "Seibu Kaihatsu", "Viper Phase 1 (World, New Version)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3502 | GAME( 1995, viprp1u, viprp1, spi, spi_3button, viprp1o, ROT270, "Seibu Kaihatsu (Fabtek license)", "Viper Phase 1 (USA)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) /* New version, "=U.S.A=" seems part of title */ | |
| 3502 | GAME( 1995, viprp1u, viprp1, spi, spi_3button, viprp1o, ROT270, "Seibu Kaihatsu (Fabtek license)", "Viper Phase 1 (USA, New Version)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) /* New version, "=U.S.A=" seems part of title */ | |
| 3503 | 3503 | GAME( 1995, viprp1j, viprp1, spi, spi_3button, viprp1, ROT270, "Seibu Kaihatsu", "Viper Phase 1 (Japan, New Version)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3504 | 3504 | GAME( 1995, viprp1s, viprp1, spi, spi_3button, viprp1, ROT270, "Seibu Kaihatsu", "Viper Phase 1 (Switzerland, New Version)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3505 | 3505 |
| r7356 | r7357 | |
|---|---|---|
| 4451 | 4451 | ROM_LOAD("cpe1_snd.bin", 0x00000, 0x80000, CRC(ca8a56bb) SHA1(36434dae4369f004fa5b4dd00eb6b1a965be60f9)) |
| 4452 | 4452 | ROM_END |
| 4453 | 4453 | |
| 4454 | /* year, name, parent, machine, input, init, monitor, company, fullname */ | |
| 4454 | GAMEL( 1994, m_bdrwho, 0, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 1, UK, Game Card 95-750-288)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4455 | GAMEL( 1994, m_bdrwh1, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 2, UK, Game Card 95-750-661)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4456 | GAMEL( 1994, m_bdrwh2, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 3)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4457 | GAMEL( 1994, m_bdrwh3, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 4)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4458 | GAMEL( 1994, m_bdrwh4, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 5)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4459 | GAMEL( 1994, m_bdrwh5, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 6)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4460 | GAMEL( 1994, m_bdrwh6, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 7)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4461 | GAMEL( 1994, m_bdrwh7, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 8)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4462 | GAMEL( 1994, m_bdrwh8, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 9)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4463 | GAMEL( 1994, m_bdrwh9, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 10)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4464 | GAMEL( 1994, m_bdrw10, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 11)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4465 | GAMEL( 1994, m_bdrw11, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 12)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4466 | GAMEL( 1994, m_bdrw12, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 13)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4467 | GAMEL( 1994, m_bdrw13, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 14)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4468 | GAMEL( 1994, m_bdrw14, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 15)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4469 | GAMEL( 1994, m_bdrw15, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 16)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4470 | GAMEL( 1994, m_bdrw16, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 17)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4471 | GAMEL( 1994, m_bdrw17, m_bdrwho, scorpion2, drwho, drwhon, 0, "BFM", "Dr.Who The Timelord (set 18, not encrypted)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4455 | 4472 | |
| 4456 | GAMEL( 1994, m_bdrwho, 0, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 1, UK, Game Card 95-750-288)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4457 | GAMEL( 1994, m_bdrwh1, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 2, UK, Game Card 95-750-661)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4458 | GAMEL( 1994, m_bdrwh2, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 3)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4459 | GAMEL( 1994, m_bdrwh3, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 4)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4460 | GAMEL( 1994, m_bdrwh4, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 5)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4461 | GAMEL( 1994, m_bdrwh5, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 6)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4462 | GAMEL( 1994, m_bdrwh6, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 7)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4463 | GAMEL( 1994, m_bdrwh7, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 8)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4464 | GAMEL( 1994, m_bdrwh8, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 9)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4465 | GAMEL( 1994, m_bdrwh9, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 10)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4466 | GAMEL( 1994, m_bdrw10, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 11)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4467 | GAMEL( 1994, m_bdrw11, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 12)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4468 | GAMEL( 1994, m_bdrw12, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 13)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4469 | GAMEL( 1994, m_bdrw13, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 14)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4470 | GAMEL( 1994, m_bdrw14, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 15)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4471 | GAMEL( 1994, m_bdrw15, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 16)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4472 | GAMEL( 1994, m_bdrw16, m_bdrwho, scorpion2, drwho, drwho, 0, "BFM", "Dr.Who The Timelord (set 17)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4473 | GAMEL( 1994, m_bdrw17, m_bdrwho, scorpion2, drwho, drwhon, 0, "BFM", "Dr.Who The Timelord (set 18, not encrypted)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK,layout_drwho) | |
| 4473 | GAME( 1994, m_brkfst, 0, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 1 UK, Game Card 95-750-524)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4474 | GAME( 1994, m_brkfs1, m_brkfst, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 2)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4475 | GAME( 1994, m_brkfs2, m_brkfst, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 3)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4476 | GAME( 1994, m_brkfs3, m_brkfst, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 4)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4477 | GAME( 1994, m_brkfs4, m_brkfst, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 5)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4478 | GAME( 1994, m_brkfs5, m_brkfst, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 6)", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4474 | 4479 | |
| 4475 | GAME( 1994, m_brkfst, 0, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 1 UK, Game Card 95-750-524)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4476 | GAME( 1994, m_brkfs1, m_brkfst, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 2)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4477 | GAME( 1994, m_brkfs2, m_brkfst, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 3)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4478 | GAME( 1994, m_brkfs3, m_brkfst, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 4)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4479 | GAME( 1994, m_brkfs4, m_brkfst, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 5)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4480 | GAME( 1994, m_brkfs5, m_brkfst, scorpion2, bbrkfst, bbrkfst, 0, "BFM", "The Big Breakfast (Set 6)",GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING) | |
| 4481 | ||
| 4482 | GAME ( 1995, m_bfocus, 0, scorpion3, scorpion3, focus, 0, "BFM/ELAM", "Focus (Dutch, Game Card 95-750-347)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK) | |
| 4483 | ||
| 4484 | GAME ( 1996, m_bcgslm, 0, scorpion2, bfmcgslm, bfmcgslm, 0, "BFM", "Club Grandslam (UK, Game Card 95-750-843)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK) | |
| 4485 | ||
| 4486 | GAME ( 1996, m_luvjub, 0, scorpion2_dm01,luvjub, luvjub, 0, "BFM", "Luvvly Jubbly (UK Multisite 10/25p, Game Card 95-750-808)", GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK) | |
| 4487 | ||
| 4488 | GAME ( 1996, m_cpeno1, 0, scorpion2_dm01,cpeno1, cpeno1, 0, "BFM", "Club Public Enemy No.1 (UK, Game Card 95-750-846)", GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK) | |
| 4480 | GAME( 1995, m_bfocus, 0, scorpion3, scorpion3, focus, 0, "BFM/ELAM", "Focus (Dutch, Game Card 95-750-347)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK) | |
| 4481 | GAME( 1996, m_bcgslm, 0, scorpion2, bfmcgslm, bfmcgslm, 0, "BFM", "Club Grandslam (UK, Game Card 95-750-843)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK) | |
| 4482 | GAME( 1996, m_luvjub, 0, scorpion2_dm01,luvjub, luvjub, 0, "BFM", "Luvvly Jubbly (UK Multisite 10/25p, Game Card 95-750-808)", GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK) | |
| 4483 | GAME( 1996, m_cpeno1, 0, scorpion2_dm01,cpeno1, cpeno1, 0, "BFM", "Club Public Enemy No.1 (UK, Game Card 95-750-846)", GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK) |
| r7356 | r7357 | |
|---|---|---|
| 73 | 73 | #include "sound/upd7759.h" |
| 74 | 74 | #include "sound/fm.h" |
| 75 | 75 | #include "cpu/m68000/m68000.h" |
| 76 | #include "megadriv.h" | |
| 76 | #include "includes/megadriv.h" | |
| 77 | 77 | #include "cpu/sh2/sh2.h" |
| 78 | 78 | |
| 79 | 79 | #define MEGADRIV_VDP_VRAM(address) megadrive_vdp_vram[(address)&0x7fff] |
| r7356 | r7357 | |
|---|---|---|
| 4094 | 4094 | } |
| 4095 | 4095 | |
| 4096 | 4096 | |
| 4097 | static DRIVER_INIT( gtclassp ) | |
| 4097 | static DRIVER_INIT( gtclasscp ) | |
| 4098 | 4098 | { |
| 4099 | 4099 | /* a little extra protection */ |
| 4100 | 4100 | memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x680000, 0x680003, 0, 0, gtclass_prot_result_r); |
| r7356 | r7357 | |
| 4227 | 4227 | GAME( 2000, gt2kt500, gt2k, tourny, gt98s, aamat, ROT0, "Incredible Technologies", "Golden Tee 2K Tournament (v5.00)" , 0) /* PIC 16C54 labeled as ITGF2K */ |
| 4228 | 4228 | GAME( 2002, gtsuprem, gt2k, tourny, gt98s, aamat, ROT0, "Incredible Technologies", "Golden Tee Supreme Edition Tournament (v5.10)" , 0) /* PIC 16C54 labeled as ITGF2K-I */ |
| 4229 | 4229 | |
| 4230 | GAME( 2001, gtclassc, 0, sftm, aama, aama, ROT0, "Incredible Technologies", "Golden Tee Classic (v1.00)" , 0) /* PIC 16C54 labeled as ITGFCL */ | |
| 4231 | GAME( 2001, gtclasscp, gtclassc, sftm, aama, gtclassp, ROT0, "Incredible Technologies", "Golden Tee Classic (v1.00) with Infinite Loop Protection" , 0) /* PIC 16C54 labeled as ITGFCL */ | |
| 4230 | GAME( 2001, gtclassc, 0, sftm, aama, aama, ROT0, "Incredible Technologies", "Golden Tee Classic (v1.00)" , 0) /* PIC 16C54 labeled as ITGFCL */ | |
| 4231 | GAME( 2001, gtclasscp, gtclassc, sftm, aama, gtclasscp, ROT0, "Incredible Technologies", "Golden Tee Classic (v1.00) with Infinite Loop Protection" , 0) /* PIC 16C54 labeled as ITGFCL */ | |
| 4232 | 4232 | GAME( 2001, gtclasscs, gtclassc, sftm, s_ver, s_ver, ROT0, "Incredible Technologies", "Golden Tee Classic (v1.00S)" , 0) /* PIC 16C54 labeled as ITGFCL-M */ |
| r7356 | r7357 | |
|---|---|---|
| 821 | 821 | PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 822 | 822 | INPUT_PORTS_END |
| 823 | 823 | |
| 824 | static INPUT_PORTS_START( spfgmk22 ) | |
| 824 | static INPUT_PORTS_START( spfghmk22 ) | |
| 825 | 825 | PORT_INCLUDE( astrof_common ) |
| 826 | 826 | |
| 827 | 827 | PORT_START("IN") |
| r7356 | r7357 | |
| 935 | 935 | PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 936 | 936 | INPUT_PORTS_END |
| 937 | 937 | |
| 938 | static INPUT_PORTS_START( tomahaw1 ) | |
| 938 | static INPUT_PORTS_START( tomahawk1 ) | |
| 939 | 939 | PORT_INCLUDE( tomahawk ) |
| 940 | 940 | |
| 941 | 941 | PORT_MODIFY("DSW") |
| r7356 | r7357 | |
| 1362 | 1362 | GAME( 1979, acombato, astrof, abattle, abattle, afire, ROT90, "bootleg", "Astro Combat (older, PZ)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1363 | 1363 | GAME( 1979, sstarbtl, astrof, abattle, abattle, sstarbtl,ROT90, "bootleg", "Super Star Battle", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1364 | 1364 | GAME( 1979, spfghmk2, 0, spfghmk2, spfghmk2, 0, ROT90, "Data East", "Space Fighter Mark II (set 1)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) |
| 1365 | GAME( 1979, spfghmk22,spfghmk2, spfghmk2, spfgmk22, | |
| 1365 | GAME( 1979, spfghmk22,spfghmk2, spfghmk2, spfghmk22, | |
| 1366 | 1366 | GAME( 1980, tomahawk, 0, tomahawk, tomahawk, 0, ROT90, "Data East", "Tomahawk 777 (rev 5)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1367 | GAME( 1980, tomahawk1,tomahawk, tomahawk, tomahaw1, | |
| 1367 | GAME( 1980, tomahawk1,tomahawk, tomahawk, tomahawk1, |
| r7356 | r7357 | |
|---|---|---|
| 72 | 72 | In the Comad games, the interruption is the same, but the addresses |
| 73 | 73 | which are checked are in full RAM. So the Dip Switch could be checked. |
| 74 | 74 | |
| 75 | - I added the 'galpania' romset which is in fact the same as 'galpanic', | |
| 75 | - I added the 'galpanica' romset which is in fact the same as 'galpanic', | |
| 76 | 76 | but with the PRG ROMS which aren't overwritten and simulated the CALC1 |
| 77 | 77 | MCU functions |
| 78 | 78 | Here are a few notes about what I found : |
| r7356 | r7357 | |
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | static WRITE16_HANDLER( galpania_6295_bankswitch_w ) | |
| 179 | static WRITE16_HANDLER( galpanica_6295_bankswitch_w ) | |
| 180 | 180 | { |
| 181 | 181 | if (ACCESSING_BITS_8_15) |
| 182 | 182 | { |
| r7356 | r7357 | |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | #ifdef UNUSED_FUNCTION |
| 190 | static WRITE16_HANDLER( galpania_misc_w ) | |
| 190 | static WRITE16_HANDLER( galpanica_misc_w ) | |
| 191 | 191 | { |
| 192 | 192 | running_device *pandora = devtag_get_device(machine, "pandora"); |
| 193 | 193 | |
| r7356 | r7357 | |
| 269 | 269 | // AM_RANGE(0x800006, 0x800007) ?? |
| 270 | 270 | AM_RANGE(0x80000a, 0x80000b) AM_READ(kludge) /* bits 8-a = timer? palette update code waits for them to be 111 */ |
| 271 | 271 | AM_RANGE(0x80000c, 0x80000d) AM_READ(kludge) /* missw96 bits 8-a = timer? palette update code waits for them to be 111 */ |
| 272 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galpania_6295_bankswitch_w) /* not sure */ | |
| 272 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galpanica_6295_bankswitch_w) /* not sure */ | |
| 273 | 273 | AM_RANGE(0xc00000, 0xc0ffff) AM_RAM /* missw96 */ |
| 274 | 274 | AM_RANGE(0xc80000, 0xc8ffff) AM_RAM /* fantasia, newfant */ |
| 275 | 275 | AM_RANGE(0xf00000, 0xf00001) AM_DEVREADWRITE8("oki", comad_okim6295_r, okim6295_w, 0xff00) /* fantasia, missw96 */ |
| r7356 | r7357 | |
| 287 | 287 | AM_RANGE(0x800004, 0x800005) AM_READ_PORT("SYSTEM") |
| 288 | 288 | // AM_RANGE(0x800006, 0x800007) ?? |
| 289 | 289 | AM_RANGE(0x800008, 0x800009) AM_READ(kludge) /* bits 8-a = timer? palette update code waits for them to be 111 */ |
| 290 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galpania_6295_bankswitch_w) /* not sure */ | |
| 290 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galpanica_6295_bankswitch_w) /* not sure */ | |
| 291 | 291 | AM_RANGE(0xa00000, 0xa00001) AM_WRITENOP /* coin counters, + ? */ |
| 292 | 292 | AM_RANGE(0xc80000, 0xc80001) AM_DEVREADWRITE8("oki", comad_okim6295_r, okim6295_w, 0xff00) |
| 293 | 293 | AM_RANGE(0xf80000, 0xf8ffff) AM_RAM |
| r7356 | r7357 | |
| 307 | 307 | AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1_P1") |
| 308 | 308 | AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2_P2") |
| 309 | 309 | AM_RANGE(0x800004, 0x800005) AM_READ_PORT("SYSTEM") |
| 310 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galpania_6295_bankswitch_w) | |
| 310 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galpanica_6295_bankswitch_w) | |
| 311 | 311 | AM_RANGE(0xa00000, 0xa00001) AM_WRITENOP // ? |
| 312 | 312 | AM_RANGE(0xd00000, 0xd00001) AM_DEVREADWRITE8("oki", okim6295_r, okim6295_w, 0xff00) |
| 313 | 313 | AM_RANGE(0xe80000, 0xe8ffff) AM_RAM |
| r7356 | r7357 | |
| 334 | 334 | AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2_P2") |
| 335 | 335 | AM_RANGE(0x800004, 0x800005) AM_READ_PORT("SYSTEM") |
| 336 | 336 | |
| 337 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galpania_6295_bankswitch_w) | |
| 337 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galpanica_6295_bankswitch_w) | |
| 338 | 338 | |
| 339 | 339 | AM_RANGE(0xc00000, 0xc00001) AM_DEVREADWRITE8("oki", comad_okim6295_r, okim6295_w, 0xff00) |
| 340 | 340 | |
| r7356 | r7357 | |
| 355 | 355 | AM_RANGE(0x800004, 0x800005) AM_READ_PORT("SYSTEM") |
| 356 | 356 | AM_RANGE(0x800006, 0x800007) AM_READ(kludge) |
| 357 | 357 | AM_RANGE(0x800008, 0x800009) AM_READ(kludge) |
| 358 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galpania_6295_bankswitch_w) /* not sure */ | |
| 358 | AM_RANGE(0x900000, 0x900001) AM_WRITE(galpanica_6295_bankswitch_w) /* not sure */ | |
| 359 | 359 | AM_RANGE(0xa00000, 0xa00001) AM_WRITENOP |
| 360 | 360 | AM_RANGE(0xc80000, 0xc8ffff) AM_RAM |
| 361 | 361 | AM_RANGE(0xd80000, 0xd80001) AM_WRITENOP |
| r7356 | r7357 | |
| 485 | 485 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 486 | 486 | INPUT_PORTS_END |
| 487 | 487 | |
| 488 | static INPUT_PORTS_START( galpania ) | |
| 488 | static INPUT_PORTS_START( galpanica ) | |
| 489 | 489 | PORT_START("DSW1_P1") |
| 490 | 490 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unused ) ) |
| 491 | 491 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| r7356 | r7357 | |
| 915 | 915 | MACHINE_DRIVER_END |
| 916 | 916 | |
| 917 | 917 | |
| 918 | static MACHINE_DRIVER_START( galpania ) | |
| 918 | static MACHINE_DRIVER_START( galpanica ) | |
| 919 | 919 | |
| 920 | 920 | /* basic machine hardware */ |
| 921 | 921 | MDRV_IMPORT_FROM(galpanic) |
| r7356 | r7357 | |
| 1320 | 1320 | ROM_END |
| 1321 | 1321 | |
| 1322 | 1322 | GAME( 1990, galpanic, 0, galpanic, galpanic, 0, ROT90, "Kaneko", "Gals Panic (Unprotected)", GAME_NO_COCKTAIL ) |
| 1323 | GAME( 1990, galpanica,galpanic, galpania, | |
| 1323 | GAME( 1990, galpanica,galpanic, galpanica, | |
| 1324 | 1324 | GAME( 1994, supmodel, 0, supmodel, fantasia, 0, ROT90, "Comad & New Japan System", "Super Model",GAME_NO_COCKTAIL ) // 'official' or hack of fantasia? |
| 1325 | 1325 | GAME( 1995, newfant, 0, comad, fantasia, 0, ROT90, "Comad & New Japan System", "New Fantasia", GAME_NO_COCKTAIL ) |
| 1326 | 1326 | GAME( 1995, fantsy95, 0, comad, fantasia, 0, ROT90, "Hi-max Technology Inc.", "Fantasy '95", GAME_NO_COCKTAIL ) |
| r7356 | r7357 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | 2009-03: |
| 8 | 8 | Added dsw locations and verified factory setting based on Guru's notes |
| 9 | (actually for finalizr only, finalizb locations assumed to be the same) | |
| 9 | (actually for finalizr only, finalizrb locations assumed to be the same) | |
| 10 | 10 | |
| 11 | 11 | ***************************************************************************/ |
| 12 | 12 | |
| r7356 | r7357 | |
| 193 | 193 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 194 | 194 | INPUT_PORTS_END |
| 195 | 195 | |
| 196 | static INPUT_PORTS_START( finalizb ) | |
| 196 | static INPUT_PORTS_START( finalizrb ) | |
| 197 | 197 | PORT_INCLUDE( finalizr ) |
| 198 | 198 | |
| 199 | 199 | PORT_MODIFY("DSW2") |
| r7356 | r7357 | |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | |
| 377 | GAME( 1985, finalizr, 0, finalizr, finalizr, finalizr, ROT90, "Konami", "Finalizer - Super Transformation", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 378 | GAME( 1985, finalizrb, finalizr, finalizr, finalizb, finalizr, ROT90, "bootleg", "Finalizer - Super Transformation (bootleg)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 377 | GAME( 1985, finalizr, 0, finalizr, finalizr, finalizr, ROT90, "Konami", "Finalizer - Super Transformation", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 378 | GAME( 1985, finalizrb, finalizr, finalizr, finalizrb, finalizr, ROT90, "bootleg", "Finalizer - Super Transformation (bootleg)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 270 | 270 | |
| 271 | 271 | #include "emu.h" |
| 272 | 272 | #include "cpu/z80/z80.h" |
| 273 | #include "includes/s | |
| 273 | #include "includes/s | |
| 274 | 274 | #include "machine/fd1089.h" |
| 275 | 275 | #include "machine/segaic16.h" |
| 276 | 276 | #include "machine/8255ppi.h" |
| 277 | 277 | #include "cpu/m68000/m68000.h" |
| 278 | 278 | #include "sound/2151intf.h" |
| 279 | 279 | #include "sound/segapcm.h" |
| 280 | #include "video/segaic16.h" | |
| 280 | 281 | |
| 281 | 282 | #include "outrun.lh" |
| 282 | 283 | |
| r7356 | r7357 | |
| 296 | 297 | static UINT16 *workram; |
| 297 | 298 | static UINT16 *cpu1ram, *cpu1rom; |
| 298 | 299 | |
| 299 | static UINT8 adc_select; | |
| 300 | ||
| 301 | static UINT8 irq2_state; | |
| 302 | static UINT8 vblank_irq_state; | |
| 303 | ||
| 304 | static read16_space_func custom_io_r; | |
| 305 | static write16_space_func custom_io_w; | |
| 306 | ||
| 307 | static const UINT8 *custom_map; | |
| 308 | ||
| 309 | ||
| 310 | ||
| 311 | 300 | /************************************* |
| 312 | 301 | * |
| 313 | 302 | * Prototypes |
| r7356 | r7357 | |
| 376 | 365 | |
| 377 | 366 | static TIMER_CALLBACK( delayed_sound_data_w ) |
| 378 | 367 | { |
| 379 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 368 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 369 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 380 | 370 | soundlatch_w(space, 0, param); |
| 381 | cpu | |
| 371 | cpu | |
| 382 | 372 | } |
| 383 | 373 | |
| 384 | 374 | |
| r7356 | r7357 | |
| 390 | 380 | |
| 391 | 381 | static READ8_HANDLER( sound_data_r ) |
| 392 | 382 | { |
| 393 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_NMI, CLEAR_LINE); | |
| 394 | return soundlatch_r(space,offset); | |
| 383 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 384 | ||
| 385 | cpu_set_input_line(state->soundcpu, INPUT_LINE_NMI, CLEAR_LINE); | |
| 386 | return soundlatch_r(space, offset); | |
| 395 | 387 | } |
| 396 | 388 | |
| 397 | 389 | |
| 398 | 390 | |
| 399 | 391 | static void outrun_generic_init(running_machine *machine) |
| 400 | 392 | { |
| 393 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 394 | ||
| 401 | 395 | /* allocate memory for regions not automatically assigned */ |
| 402 | 396 | segaic16_spriteram_0 = auto_alloc_array(machine, UINT16, 0x01000/2); |
| 403 | 397 | segaic16_paletteram = auto_alloc_array(machine, UINT16, 0x02000/2); |
| r7356 | r7357 | |
| 412 | 406 | fd1094_driver_init(machine, "maincpu", segaic16_memory_mapper_set_decrypted); |
| 413 | 407 | |
| 414 | 408 | /* reset the custom handlers and other pointers */ |
| 415 | custom_io_r = NULL; | |
| 416 | custom_io_w = NULL; | |
| 417 | custom_map = NULL; | |
| 409 | state->custom_io_r = NULL; | |
| 410 | state->custom_io_w = NULL; | |
| 411 | state->custom_map = NULL; | |
| 412 | ||
| 413 | state->maincpu = devtag_get_device(machine, "maincpu"); | |
| 414 | state->soundcpu = devtag_get_device(machine, "soundcpu"); | |
| 415 | state->subcpu = devtag_get_device(machine, "sub"); | |
| 416 | state->ppi8255 = devtag_get_device(machine, "ppi8255"); | |
| 417 | ||
| 418 | state_save_register_global(machine, state->adc_select); | |
| 419 | state_save_register_global(machine, state->vblank_irq_state); | |
| 420 | state_save_register_global(machine, state->irq2_state); | |
| 421 | state_save_register_global_pointer(machine, segaic16_spriteram_0, 0x01000/2); | |
| 422 | state_save_register_global_pointer(machine, segaic16_paletteram, 0x02000/2); | |
| 423 | state_save_register_global_pointer(machine, segaic16_tileram_0, 0x10000/2); | |
| 424 | state_save_register_global_pointer(machine, segaic16_textram_0, 0x01000/2); | |
| 425 | state_save_register_global_pointer(machine, workram, 0x08000/2); | |
| 418 | 426 | } |
| 419 | 427 | |
| 420 | 428 | |
| r7356 | r7357 | |
| 427 | 435 | |
| 428 | 436 | static void update_main_irqs(running_machine *machine) |
| 429 | 437 | { |
| 430 | cputag_set_input_line(machine, "maincpu", 2, irq2_state ? ASSERT_LINE : CLEAR_LINE); | |
| 431 | cputag_set_input_line(machine, "maincpu", 4, vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 432 | cputag_set_input_line(machine, "maincpu", 6, vblank_irq_state && irq2_state ? ASSERT_LINE : CLEAR_LINE); | |
| 438 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 433 | 439 | |
| 434 | if(vblank_irq_state || irq2_state) | |
| 440 | cpu_set_input_line(state->maincpu, 2, state->irq2_state ? ASSERT_LINE : CLEAR_LINE); | |
| 441 | cpu_set_input_line(state->maincpu, 4, state->vblank_irq_state ? ASSERT_LINE : CLEAR_LINE); | |
| 442 | cpu_set_input_line(state->maincpu, 6, state->vblank_irq_state && state->irq2_state ? ASSERT_LINE : CLEAR_LINE); | |
| 443 | ||
| 444 | if (state->vblank_irq_state || state->irq2_state) | |
| 435 | 445 | cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(100)); |
| 436 | 446 | } |
| 437 | 447 | |
| 438 | 448 | |
| 439 | 449 | static TIMER_CALLBACK( irq2_gen ) |
| 440 | 450 | { |
| 451 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 452 | ||
| 441 | 453 | /* set the IRQ2 line */ |
| 442 | irq2_state = 1; | |
| 454 | state->irq2_state = 1; | |
| 443 | 455 | update_main_irqs(machine); |
| 444 | 456 | } |
| 445 | 457 | |
| 446 | 458 | |
| 447 | 459 | static TIMER_CALLBACK( scanline_callback ) |
| 448 | 460 | { |
| 461 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 449 | 462 | int scanline = param; |
| 450 | 463 | int next_scanline = scanline; |
| 451 | 464 | |
| r7356 | r7357 | |
| 464 | 477 | case 66: |
| 465 | 478 | case 130: |
| 466 | 479 | case 194: |
| 467 | irq2_state = 0; | |
| 480 | state->irq2_state = 0; | |
| 468 | 481 | next_scanline = (scanline == 194) ? 223 : (scanline + 63); |
| 469 | 482 | break; |
| 470 | 483 | |
| 471 | 484 | /* VBLANK triggers on scanline 223 */ |
| 472 | 485 | case 223: |
| 473 | vblank_irq_state = 1; | |
| 486 | state->vblank_irq_state = 1; | |
| 474 | 487 | next_scanline = scanline + 1; |
| 475 | cpu | |
| 488 | cpu | |
| 476 | 489 | break; |
| 477 | 490 | |
| 478 | 491 | /* VBLANK turns off at the start of scanline 224 */ |
| 479 | 492 | case 224: |
| 480 | vblank_irq_state = 0; | |
| 493 | state->vblank_irq_state = 0; | |
| 481 | 494 | next_scanline = 65; |
| 482 | cpu | |
| 495 | cpu | |
| 483 | 496 | break; |
| 484 | 497 | } |
| 485 | 498 | |
| r7356 | r7357 | |
| 500 | 513 | |
| 501 | 514 | static void outrun_reset(running_device *device) |
| 502 | 515 | { |
| 503 | cputag_set_input_line(device->machine, "sub", INPUT_LINE_RESET, PULSE_LINE); | |
| 516 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 517 | cpu_set_input_line(state->subcpu, INPUT_LINE_RESET, PULSE_LINE); | |
| 504 | 518 | } |
| 505 | 519 | |
| 506 | 520 | |
| 507 | 521 | static MACHINE_RESET( outrun ) |
| 508 | 522 | { |
| 523 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 509 | 524 | fd1094_machine_init(devtag_get_device(machine, "maincpu")); |
| 510 | 525 | |
| 511 | 526 | /* reset misc components */ |
| 512 | 527 | segaic16_memory_mapper_reset(machine); |
| 513 | if (custom_map) | |
| 514 | segaic16_memory_mapper_config(machine, custom_map); | |
| 528 | if (state->custom_map) | |
| 529 | segaic16_memory_mapper_config(machine, state->custom_map); | |
| 515 | 530 | segaic16_tilemap_reset(machine, 0); |
| 516 | 531 | |
| 517 | 532 | /* hook the RESET line, which resets CPU #1 */ |
| r7356 | r7357 | |
| 531 | 546 | |
| 532 | 547 | static void log_unknown_ppi_read( running_machine *machine, unsigned port ) |
| 533 | 548 | { |
| 549 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 534 | 550 | static const char ports[] = "ABC"; |
| 535 | 551 | |
| 536 | logerror("%06X:read from 8255 port %c\n", cpu_get_pc( | |
| 552 | logerror("%06X:read from 8255 port %c\n", cpu_get_pc(s | |
| 537 | 553 | } |
| 538 | 554 | |
| 539 | 555 | |
| 540 | 556 | static void log_unknown_ppi_write( running_machine *machine, unsigned port, UINT8 data ) |
| 541 | 557 | { |
| 558 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 542 | 559 | static const char ports[] = "ABC"; |
| 543 | 560 | |
| 544 | logerror("%06X:write %02X to 8255 port %c\n", cpu_get_pc( | |
| 561 | logerror("%06X:write %02X to 8255 port %c\n", cpu_get_pc(s | |
| 545 | 562 | } |
| 546 | 563 | |
| 547 | 564 | |
| r7356 | r7357 | |
| 580 | 597 | |
| 581 | 598 | static WRITE8_DEVICE_HANDLER( video_control_w ) |
| 582 | 599 | { |
| 600 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 601 | ||
| 583 | 602 | /* Output port: |
| 584 | 603 | D7: SG1 -- connects to sprite chip |
| 585 | 604 | D6: SG0 -- connects to mixing |
| r7356 | r7357 | |
| 589 | 608 | D0: Sound section reset (1= normal operation, 0= reset) |
| 590 | 609 | */ |
| 591 | 610 | segaic16_set_display_enable(device->machine, data & 0x20); |
| 592 | adc_select = (data >> 2) & 7; | |
| 593 | cputag_set_input_line(device->machine, "soundcpu", INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); | |
| 611 | state->adc_select = (data >> 2) & 7; | |
| 612 | cpu_set_input_line(state->soundcpu, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); | |
| 594 | 613 | } |
| 595 | 614 | |
| 596 | 615 | |
| r7356 | r7357 | |
| 603 | 622 | |
| 604 | 623 | static READ16_HANDLER( misc_io_r ) |
| 605 | 624 | { |
| 606 | if (custom_io_r) | |
| 607 | return custom_io_r(space, offset, mem_mask); | |
| 625 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 626 | ||
| 627 | if (state->custom_io_r) | |
| 628 | return state->custom_io_r(space, offset, mem_mask); | |
| 608 | 629 | logerror("%06X:misc_io_r - unknown read access to address %04X\n", cpu_get_pc(space->cpu), offset * 2); |
| 609 | return segaic16_open_bus_r(space,0,mem_mask); | |
| 630 | return segaic16_open_bus_r(space, 0, mem_mask); | |
| 610 | 631 | } |
| 611 | 632 | |
| 612 | 633 | |
| 613 | 634 | static WRITE16_HANDLER( misc_io_w ) |
| 614 | 635 | { |
| 615 | if (custom_io_w) | |
| 636 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 637 | ||
| 638 | if (state->custom_io_w) | |
| 616 | 639 | { |
| 617 | custom_io_w(space, offset, data, mem_mask); | |
| 640 | state->custom_io_w(space, offset, data, mem_mask); | |
| 618 | 641 | return; |
| 619 | 642 | } |
| 620 | 643 | logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", cpu_get_pc(space->cpu), offset * 2, data, mem_mask); |
| r7356 | r7357 | |
| 623 | 646 | |
| 624 | 647 | static READ16_HANDLER( outrun_custom_io_r ) |
| 625 | 648 | { |
| 649 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 650 | ||
| 626 | 651 | offset &= 0x7f/2; |
| 627 | 652 | switch (offset & 0x70/2) |
| 628 | 653 | { |
| 629 | 654 | case 0x00/2: |
| 630 | return ppi8255_r( | |
| 655 | return ppi8255_r(s | |
| 631 | 656 | |
| 632 | 657 | case 0x10/2: |
| 633 | 658 | { |
| r7356 | r7357 | |
| 638 | 663 | case 0x30/2: |
| 639 | 664 | { |
| 640 | 665 | static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" }; |
| 641 | return input_port_read_safe(space->machine, ports[adc_select], 0x0010); | |
| 666 | return input_port_read_safe(space->machine, ports[state->adc_select], 0x0010); | |
| 642 | 667 | } |
| 643 | 668 | |
| 644 | 669 | case 0x60/2: |
| r7356 | r7357 | |
| 646 | 671 | } |
| 647 | 672 | |
| 648 | 673 | logerror("%06X:outrun_custom_io_r - unknown read access to address %04X\n", cpu_get_pc(space->cpu), offset * 2); |
| 649 | return segaic16_open_bus_r(space,0,mem_mask); | |
| 674 | return segaic16_open_bus_r(space, 0, mem_mask); | |
| 650 | 675 | } |
| 651 | 676 | |
| 652 | 677 | |
| 653 | 678 | static WRITE16_HANDLER( outrun_custom_io_w ) |
| 654 | 679 | { |
| 680 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 681 | ||
| 655 | 682 | offset &= 0x7f/2; |
| 656 | 683 | switch (offset & 0x70/2) |
| 657 | 684 | { |
| 658 | 685 | case 0x00/2: |
| 659 | 686 | if (ACCESSING_BITS_0_7) |
| 660 | ppi8255_w( | |
| 687 | ppi8255_w(s | |
| 661 | 688 | return; |
| 662 | 689 | |
| 663 | 690 | case 0x20/2: |
| r7356 | r7357 | |
| 689 | 716 | |
| 690 | 717 | static READ16_HANDLER( shangon_custom_io_r ) |
| 691 | 718 | { |
| 719 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 720 | ||
| 692 | 721 | offset &= 0x303f/2; |
| 693 | 722 | switch (offset) |
| 694 | 723 | { |
| r7356 | r7357 | |
| 704 | 733 | case 0x3020/2: |
| 705 | 734 | { |
| 706 | 735 | static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| 707 | return input_port_read_safe(space->machine, ports[adc_select], 0x0010); | |
| 736 | return input_port_read_safe(space->machine, ports[state->adc_select], 0x0010); | |
| 708 | 737 | } |
| 709 | 738 | } |
| 710 | 739 | logerror("%06X:misc_io_r - unknown read access to address %04X\n", cpu_get_pc(space->cpu), offset * 2); |
| r7356 | r7357 | |
| 714 | 743 | |
| 715 | 744 | static WRITE16_HANDLER( shangon_custom_io_w ) |
| 716 | 745 | { |
| 746 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 747 | ||
| 717 | 748 | offset &= 0x303f/2; |
| 718 | 749 | switch (offset) |
| 719 | 750 | { |
| r7356 | r7357 | |
| 722 | 753 | D7-D6: (ADC1-0) |
| 723 | 754 | D5: Screen display |
| 724 | 755 | */ |
| 725 | adc_select = (data >> 6) & 3; | |
| 756 | state->adc_select = (data >> 6) & 3; | |
| 726 | 757 | segaic16_set_display_enable(space->machine, (data >> 5) & 1); |
| 727 | 758 | return; |
| 728 | 759 | |
| r7356 | r7357 | |
| 730 | 761 | /* Output port: |
| 731 | 762 | D0: Sound section reset (1= normal operation, 0= reset) |
| 732 | 763 | */ |
| 733 | cpu | |
| 764 | cpu | |
| 734 | 765 | return; |
| 735 | 766 | |
| 736 | 767 | case 0x3000/2: |
| 737 | watchdog_reset_w(space,0,0); | |
| 768 | watchdog_reset_w(space, 0, 0); | |
| 738 | 769 | return; |
| 739 | 770 | |
| 740 | 771 | case 0x3020/2: |
| r7356 | r7357 | |
| 1061 | 1092 | |
| 1062 | 1093 | static MACHINE_DRIVER_START( outrundx ) |
| 1063 | 1094 | |
| 1095 | /* driver data */ | |
| 1096 | MDRV_DRIVER_DATA(segas1x_state) | |
| 1097 | ||
| 1064 | 1098 | /* basic machine hardware */ |
| 1065 | 1099 | MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK/4) |
| 1066 | 1100 | MDRV_CPU_PROGRAM_MAP(outrun_map) |
| r7356 | r7357 | |
| 2081 | 2115 | |
| 2082 | 2116 | static DRIVER_INIT( outrun ) |
| 2083 | 2117 | { |
| 2118 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2119 | ||
| 2084 | 2120 | outrun_generic_init(machine); |
| 2085 | custom_io_r = outrun_custom_io_r; | |
| 2086 | custom_io_w = outrun_custom_io_w; | |
| 2121 | state->custom_io_r = outrun_custom_io_r; | |
| 2122 | state->custom_io_w = outrun_custom_io_w; | |
| 2087 | 2123 | } |
| 2088 | 2124 | |
| 2089 | 2125 | |
| 2090 | 2126 | static DRIVER_INIT( outrunb ) |
| 2091 | 2127 | { |
| 2128 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2092 | 2129 | static const UINT8 memory_map[] = { 0x02,0x00,0x0d,0x10,0x00,0x12,0x0c,0x13,0x08,0x14,0x0f,0x20,0x00,0x00,0x00,0x00 }; |
| 2093 | 2130 | UINT16 *word; |
| 2094 | 2131 | UINT8 *byte; |
| 2095 | 2132 | int i, length; |
| 2096 | 2133 | |
| 2097 | 2134 | outrun_generic_init(machine); |
| 2098 | custom_map = memory_map; | |
| 2099 | custom_io_r = outrun_custom_io_r; | |
| 2100 | custom_io_w = outrun_custom_io_w; | |
| 2135 | state->custom_map = memory_map; | |
| 2136 | state->custom_io_r = outrun_custom_io_r; | |
| 2137 | state->custom_io_w = outrun_custom_io_w; | |
| 2101 | 2138 | |
| 2102 | 2139 | /* main CPU: swap bits 11,12 and 6,7 */ |
| 2103 | 2140 | word = (UINT16 *)memory_region(machine, "maincpu"); |
| r7356 | r7357 | |
| 2132 | 2169 | |
| 2133 | 2170 | static DRIVER_INIT( shangon ) |
| 2134 | 2171 | { |
| 2172 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2173 | ||
| 2135 | 2174 | outrun_generic_init(machine); |
| 2136 | custom_io_r = shangon_custom_io_r; | |
| 2137 | custom_io_w = shangon_custom_io_w; | |
| 2175 | state->custom_io_r = shangon_custom_io_r; | |
| 2176 | state->custom_io_w = shangon_custom_io_w; | |
| 2138 | 2177 | } |
| 2139 | 2178 | |
| 2140 | 2179 | |
| 2141 | 2180 | static DRIVER_INIT( shangon3 ) |
| 2142 | 2181 | { |
| 2182 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 2183 | ||
| 2143 | 2184 | outrun_generic_init(machine); |
| 2144 | 2185 | fd1089b_decrypt(machine); |
| 2145 | custom_io_r = shangon_custom_io_r; | |
| 2146 | custom_io_w = shangon_custom_io_w; | |
| 2186 | state->custom_io_r = shangon_custom_io_r; | |
| 2187 | state->custom_io_w = shangon_custom_io_w; | |
| 2147 | 2188 | } |
| 2148 | 2189 | |
| 2149 | 2190 |
| r7356 | r7357 | |
|---|---|---|
| 228 | 228 | #include "machine/k056230.h" |
| 229 | 229 | #include "machine/k033906.h" |
| 230 | 230 | #include "sound/rf5c400.h" |
| 231 | #include "sound/k056800.h" | |
| 231 | 232 | #include "video/voodoo.h" |
| 232 | 233 | #include "video/gticlub.h" |
| 234 | #include "video/konicdev.h" | |
| 235 | ||
| 233 | 236 | #include "rendlay.h" |
| 234 | #include "sound/k056800.h" | |
| 235 | 237 | |
| 236 | 238 | static UINT32 *work_ram; |
| 237 | 239 | |
| 238 | 240 | UINT8 gticlub_led_reg0; |
| 239 | 241 | UINT8 gticlub_led_reg1; |
| 240 | 242 | |
| 241 | int K001604_vh_start(running_machine *machine, int chip); | |
| 242 | void K001604_draw_front_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect); | |
| 243 | void K001604_draw_back_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect); | |
| 244 | READ32_HANDLER(K001604_tile_r); | |
| 245 | READ32_HANDLER(K001604_char_r); | |
| 246 | WRITE32_HANDLER(K001604_tile_w); | |
| 247 | WRITE32_HANDLER(K001604_char_w); | |
| 248 | WRITE32_HANDLER(K001604_reg_w); | |
| 249 | READ32_HANDLER(K001604_reg_r); | |
| 250 | 243 | |
| 251 | ||
| 252 | ||
| 253 | 244 | static WRITE32_HANDLER( paletteram32_w ) |
| 254 | 245 | { |
| 255 | 246 | COMBINE_DATA(&space->machine->generic.paletteram.u32[offset]); |
| r7356 | r7357 | |
| 267 | 258 | cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_IRQ1, param ? ASSERT_LINE : CLEAR_LINE); |
| 268 | 259 | } |
| 269 | 260 | |
| 270 | static VIDEO_START( hangplt ) | |
| 271 | { | |
| 272 | K001604_vh_start(machine, 0); | |
| 273 | K001604_vh_start(machine, 1); | |
| 274 | } | |
| 275 | ||
| 276 | ||
| 277 | 261 | static VIDEO_UPDATE( hangplt ) |
| 278 | 262 | { |
| 279 | 263 | bitmap_fill(bitmap, cliprect, screen->machine->pens[0]); |
| 280 | 264 | |
| 281 | 265 | if (strcmp(screen->tag, "lscreen") == 0) |
| 282 | 266 | { |
| 267 | running_device *k001604 = devtag_get_device(screen->machine, "k001604_1"); | |
| 283 | 268 | running_device *voodoo = devtag_get_device(screen->machine, "voodoo0"); |
| 284 | 269 | |
| 285 | // | |
| 270 | // k001604_draw_back_layer(k001604, bitmap, cliprect); | |
| 286 | 271 | |
| 287 | 272 | voodoo_update(voodoo, bitmap, cliprect); |
| 288 | 273 | |
| 289 | | |
| 274 | k001604_draw_front_layer(k001604, bitmap, cliprect); | |
| 290 | 275 | } |
| 291 | 276 | else if (strcmp(screen->tag, "rscreen") == 0) |
| 292 | 277 | { |
| 278 | running_device *k001604 = devtag_get_device(screen->machine, "k001604_2"); | |
| 293 | 279 | running_device *voodoo = devtag_get_device(screen->machine, "voodoo1"); |
| 294 | 280 | |
| 295 | // | |
| 281 | // k001604_draw_back_layer(k001604, bitmap, cliprect); | |
| 296 | 282 | |
| 297 | 283 | voodoo_update(voodoo, bitmap, cliprect); |
| 298 | 284 | |
| 299 | | |
| 285 | k001604_draw_front_layer(k001604, bitmap, cliprect); | |
| 300 | 286 | } |
| 301 | 287 | |
| 302 | 288 | draw_7segment_led(bitmap, 3, 3, gticlub_led_reg0); |
| r7356 | r7357 | |
| 305 | 291 | return 0; |
| 306 | 292 | } |
| 307 | 293 | |
| 294 | static READ32_HANDLER( gticlub_k001604_tile_r ) | |
| 295 | { | |
| 296 | running_device *k001604 = devtag_get_device(space->machine, get_cgboard_id() ? "k001604_2" : "k001604_1"); | |
| 297 | return k001604_tile_r(k001604, offset, mem_mask); | |
| 298 | } | |
| 299 | ||
| 300 | static WRITE32_HANDLER( gticlub_k001604_tile_w ) | |
| 301 | { | |
| 302 | running_device *k001604 = devtag_get_device(space->machine, get_cgboard_id() ? "k001604_2" : "k001604_1"); | |
| 303 | k001604_tile_w(k001604, offset, data, mem_mask); | |
| 304 | } | |
| 305 | ||
| 306 | ||
| 307 | static READ32_HANDLER( gticlub_k001604_char_r ) | |
| 308 | { | |
| 309 | running_device *k001604 = devtag_get_device(space->machine, get_cgboard_id() ? "k001604_2" : "k001604_1"); | |
| 310 | return k001604_char_r(k001604, offset, mem_mask); | |
| 311 | } | |
| 312 | ||
| 313 | static WRITE32_HANDLER( gticlub_k001604_char_w ) | |
| 314 | { | |
| 315 | running_device *k001604 = devtag_get_device(space->machine, get_cgboard_id() ? "k001604_2" : "k001604_1"); | |
| 316 | k001604_char_w(k001604, offset, data, mem_mask); | |
| 317 | } | |
| 318 | ||
| 319 | static READ32_HANDLER( gticlub_k001604_reg_r ) | |
| 320 | { | |
| 321 | running_device *k001604 = devtag_get_device(space->machine, get_cgboard_id() ? "k001604_2" : "k001604_1"); | |
| 322 | return k001604_reg_r(k001604, offset, mem_mask); | |
| 323 | } | |
| 324 | ||
| 325 | static WRITE32_HANDLER( gticlub_k001604_reg_w ) | |
| 326 | { | |
| 327 | running_device *k001604 = devtag_get_device(space->machine, get_cgboard_id() ? "k001604_2" : "k001604_1"); | |
| 328 | k001604_reg_w(k001604, offset, data, mem_mask); | |
| 329 | } | |
| 330 | ||
| 331 | ||
| 308 | 332 | /******************************************************************/ |
| 309 | 333 | |
| 310 | 334 | /* 93C56 EEPROM */ |
| r7356 | r7357 | |
| 406 | 430 | |
| 407 | 431 | static ADDRESS_MAP_START( gticlub_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 408 | 432 | AM_RANGE(0x00000000, 0x000fffff) AM_RAM AM_BASE(&work_ram) /* Work RAM */ |
| 409 | AM_RANGE(0x74000000, 0x740000ff) AM_READWRITE( | |
| 433 | AM_RANGE(0x74000000, 0x740000ff) AM_READWRITE(gticlub_k001604_reg_r, gticlub_k001604_reg_w) | |
| 410 | 434 | AM_RANGE(0x74010000, 0x7401ffff) AM_RAM_WRITE(paletteram32_w) AM_BASE_GENERIC(paletteram) |
| 411 | AM_RANGE(0x74020000, 0x7403ffff) AM_READWRITE(K001604_tile_r, K001604_tile_w) | |
| 412 | AM_RANGE(0x74040000, 0x7407ffff) AM_READWRITE(K001604_char_r, K001604_char_w) | |
| 435 | AM_RANGE(0x74020000, 0x7403ffff) AM_READWRITE(gticlub_k001604_tile_r, gticlub_k001604_tile_w) | |
| 436 | AM_RANGE(0x74040000, 0x7407ffff) AM_READWRITE(gticlub_k001604_char_r, gticlub_k001604_char_w) | |
| 413 | 437 | AM_RANGE(0x78000000, 0x7800ffff) AM_READWRITE(cgboard_dsp_shared_r_ppc, cgboard_dsp_shared_w_ppc) |
| 414 | 438 | AM_RANGE(0x78040000, 0x7804000f) AM_READWRITE(K001006_0_r, K001006_0_w) |
| 415 | 439 | AM_RANGE(0x78080000, 0x7808000f) AM_READWRITE(K001006_1_r, K001006_1_w) |
| r7356 | r7357 | |
| 757 | 781 | 1 |
| 758 | 782 | }; |
| 759 | 783 | |
| 784 | static const k001604_interface gticlub_k001604_intf = | |
| 785 | { | |
| 786 | 1, 2, /* gfx index 1 & 2 */ | |
| 787 | 1, 1, /* layer_size, roz_size */ | |
| 788 | 0 /* slrasslt hack */ | |
| 789 | }; | |
| 760 | 790 | |
| 791 | static const k001604_interface slrasslt_k001604_intf = | |
| 792 | { | |
| 793 | 1, 2, /* gfx index 1 & 2 */ | |
| 794 | 0, 0, /* layer_size, roz_size */ | |
| 795 | 1 /* slrasslt hack */ | |
| 796 | }; | |
| 797 | ||
| 798 | static const k001604_interface hangplt_k001604_intf_l = | |
| 799 | { | |
| 800 | 1, 2, /* gfx index 1 & 2 */ | |
| 801 | 0, 1, /* layer_size, roz_size */ | |
| 802 | 0 /* slrasslt hack */ | |
| 803 | }; | |
| 804 | ||
| 805 | static const k001604_interface hangplt_k001604_intf_r = | |
| 806 | { | |
| 807 | 3, 4, /* gfx index 1 & 2 */ | |
| 808 | 0, 1, /* layer_size, roz_size */ | |
| 809 | 0 /* slrasslt hack */ | |
| 810 | }; | |
| 811 | ||
| 812 | ||
| 761 | 813 | static MACHINE_RESET( gticlub ) |
| 762 | 814 | { |
| 763 | 815 | cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE); |
| r7356 | r7357 | |
| 800 | 852 | MDRV_VIDEO_START(gticlub) |
| 801 | 853 | MDRV_VIDEO_UPDATE(gticlub) |
| 802 | 854 | |
| 855 | MDRV_K001604_ADD("k001604_1", gticlub_k001604_intf) | |
| 856 | ||
| 803 | 857 | MDRV_K056800_ADD("k056800", gticlub_k056800_interface) |
| 804 | 858 | |
| 805 | 859 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| r7356 | r7357 | |
| 826 | 880 | |
| 827 | 881 | MDRV_DEVICE_REMOVE("adc1038") |
| 828 | 882 | MDRV_ADC1038_ADD("adc1038", thunderh_adc1038_intf) |
| 883 | ||
| 884 | MDRV_DEVICE_REMOVE("k001604_1") | |
| 885 | MDRV_K001604_ADD("k001604_1", slrasslt_k001604_intf) | |
| 829 | 886 | MACHINE_DRIVER_END |
| 830 | 887 | |
| 831 | 888 | |
| r7356 | r7357 | |
| 902 | 959 | MDRV_SCREEN_SIZE(512, 384) |
| 903 | 960 | MDRV_SCREEN_VISIBLE_AREA(0, 511, 0, 383) |
| 904 | 961 | |
| 905 | MDRV_VIDEO_START(hangplt) | |
| 906 | 962 | MDRV_VIDEO_UPDATE(hangplt) |
| 907 | 963 | |
| 964 | MDRV_K001604_ADD("k001604_1", hangplt_k001604_intf_l) | |
| 965 | MDRV_K001604_ADD("k001604_2", hangplt_k001604_intf_r) | |
| 966 | ||
| 908 | 967 | MDRV_K056800_ADD("k056800", gticlub_k056800_interface) |
| 909 | 968 | |
| 910 | 969 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| r7356 | r7357 | |
|---|---|---|
| 402 | 402 | PORT_BIT( 0xf4, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 403 | 403 | INPUT_PORTS_END |
| 404 | 404 | |
| 405 | /* I've only mapped the known inputs after compar | |
| 405 | /* I've only mapped the known inputs after compar | |
| 406 | 406 | static INPUT_PORTS_START( starspnr ) |
| 407 | 407 | PORT_START("IN0") // 0 |
| 408 | 408 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Gamble" ) |
| r7356 | r7357 | |
|---|---|---|
| 37 | 37 | Couriersud: 11/2007 |
| 38 | 38 | |
| 39 | 39 | - Added configuration switch to change palette between TKG02 (radarscp conversion) and TKG04 (dkong 2board) |
| 40 | - Added speech support (samples) to radarsc1 | |
| 40 | - Added speech support (samples) to radarscp1 | |
| 41 | 41 | - Hooked up and written 8257 dma controller |
| 42 | 42 | All dkong and dkongjr based games now use the 8257 |
| 43 | 43 | All epos and 2650 based games now use the 8257 |
| r7356 | r7357 | |
| 448 | 448 | state->hardware_type = HARDWARE_TRS02; |
| 449 | 449 | } |
| 450 | 450 | |
| 451 | static MACHINE_START( radarsc1 ) | |
| 451 | static MACHINE_START( radarscp1 ) | |
| 452 | 452 | { |
| 453 | 453 | dkong_state *state = (dkong_state *)machine->driver_data; |
| 454 | 454 | |
| r7356 | r7357 | |
| 1615 | 1615 | |
| 1616 | 1616 | MACHINE_DRIVER_END |
| 1617 | 1617 | |
| 1618 | static MACHINE_DRIVER_START( radarsc1 ) | |
| 1618 | static MACHINE_DRIVER_START( radarscp1 ) | |
| 1619 | 1619 | |
| 1620 | 1620 | MDRV_IMPORT_FROM(dkong_base) |
| 1621 | 1621 | |
| 1622 | MDRV_MACHINE_START(radarsc1) | |
| 1622 | MDRV_MACHINE_START(radarscp1) | |
| 1623 | 1623 | MDRV_PALETTE_LENGTH(RS_PALETTE_LENGTH) |
| 1624 | MDRV_PALETTE_INIT(radarsc1) | |
| 1624 | MDRV_PALETTE_INIT(radarscp1) | |
| 1625 | 1625 | |
| 1626 | 1626 | /* sound hardware */ |
| 1627 | MDRV_IMPORT_FROM(radarsc1_audio) | |
| 1627 | MDRV_IMPORT_FROM(radarscp1_audio) | |
| 1628 | 1628 | |
| 1629 | 1629 | MACHINE_DRIVER_END |
| 1630 | 1630 | |
| r7356 | r7357 | |
| 2948 | 2948 | *************************************/ |
| 2949 | 2949 | |
| 2950 | 2950 | GAME( 1980, radarscp, 0, radarscp, radarscp, 0, ROT90, "Nintendo", "Radar Scope", GAME_SUPPORTS_SAVE ) |
| 2951 | GAME( 1980, radarscp1,radarscp, radarsc1, | |
| 2951 | GAME( 1980, radarscp1,radarscp, radarscp1, | |
| 2952 | 2952 | |
| 2953 | 2953 | GAME( 1981, dkong, 0, dkong2b, dkong, 0, ROT90, "Nintendo of America", "Donkey Kong (US set 1)", GAME_SUPPORTS_SAVE ) |
| 2954 | 2954 | GAME( 1981, dkongo, dkong, dkong2b, dkong, 0, ROT90, "Nintendo", "Donkey Kong (US set 2)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 603 | 603 | robowres_decode(machine, "maincpu"); |
| 604 | 604 | } |
| 605 | 605 | |
| 606 | static DRIVER_INIT(robowrb) | |
| 606 | static DRIVER_INIT(robowresb) | |
| 607 | 607 | { |
| 608 | 608 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 609 | 609 | memory_set_decrypted_region(space, 0x0000, 0x7fff, memory_region(machine, "maincpu") + 0x1c000); |
| r7356 | r7357 | |
| 618 | 618 | |
| 619 | 619 | GAME( 1984, appoooh, 0, appoooh, appoooh, 0, ROT0, "[Sanritsu] Sega", "Appoooh", GAME_SUPPORTS_SAVE ) |
| 620 | 620 | GAME( 1986, robowres, 0, robowres, robowres, robowres, ROT0, "Sega", "Robo Wres 2001", GAME_SUPPORTS_SAVE ) |
| 621 | GAME( 1986, robowresb, robowres, robowres, robowres, robowrb, | |
| 621 | GAME( 1986, robowresb, robowres, robowres, robowres, robowresb, |
| r7356 | r7357 | |
|---|---|---|
| 5025 | 5025 | MDRV_CPU_PROGRAM_MAP(lucky8_map) |
| 5026 | 5026 | //MDRV_CPU_IO_MAP(goldstar_readport) |
| 5027 | 5027 | MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse) |
| 5028 | // MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) // causes 'magical' to display 'wait' instead | |
| 5028 | 5029 | |
| 5029 | 5030 | /* 3x 8255 */ |
| 5030 | 5031 | MDRV_PPI8255_ADD( "ppi8255_0", lucky8_ppi8255_intf[0] ) |
| r7356 | r7357 | |
| 6303 | 6304 | ROM_LOAD( "g13", 0x0000, 0x0020, CRC(6df3f972) SHA1(0096a7f7452b70cac6c0752cb62e24b643015b5c) ) |
| 6304 | 6305 | ROM_END |
| 6305 | 6306 | |
| 6307 | ROM_START( magical ) | |
| 6308 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 6309 | ROM_LOAD( "8_p6_d12.512", 0x00000, 0x08000, CRC(6978c662) SHA1(cfdbcdcd4085c264e1d0ad4f18160b40d2d4e406) ) | |
| 6310 | ROM_IGNORE(0x8000) // 1ST AND 2ND HALF IDENTICAL | |
| 6311 | ROM_LOAD( "9_p7_d14.512", 0x08000, 0x04000, CRC(095230ba) SHA1(e60f5497c2cd5f1c0fc33b1e21303dd569654e6d) ) | |
| 6312 | ROM_IGNORE(0xc000) // BADADDR --xxxxxxxxxxxxxx | |
| 6313 | ||
| 6314 | ROM_REGION( 0x30000, "gfx1", 0 ) | |
| 6315 | ROM_LOAD( "5_l5_g2.512", 0x00000, 0x10000, CRC(f0ffb199) SHA1(383406e6ab74e8cecaf5574a879bf24aa606ac37) ) | |
| 6316 | ROM_LOAD( "6_l6_g3.512", 0x10000, 0x10000, CRC(3e44d92b) SHA1(4e00e26a4dbf326c0c919c40382505189e82c85b) ) | |
| 6317 | ROM_LOAD( "7_l7_g5.512", 0x20000, 0x10000, CRC(654bb754) SHA1(346bfbf85fc38797cf422da47d474e2ef2ef459c) ) | |
| 6318 | ||
| 6319 | ROM_REGION( 0x8000, "gfx2", 0 ) | |
| 6320 | ROM_LOAD( "1_m1_h2.764", 0x00000, 0x2000, CRC(d7d657e4) SHA1(53e2717edb4cdeac83cd519b08225784600afa61) ) | |
| 6321 | ROM_LOAD( "2_m2_h3.764", 0x02000, 0x2000, CRC(fb7541d5) SHA1(62a36c186b32bd98dff5c3f0fa5f2ad13992835c) ) | |
| 6322 | ROM_LOAD( "3_m3_h5.764", 0x04000, 0x2000, CRC(49572d8b) SHA1(ceaaf911f58cceec82f429ca9114bffa1a67ec12) ) | |
| 6323 | ROM_LOAD( "4_m4_h6.764", 0x06000, 0x2000, CRC(cccfaa5d) SHA1(69d9b8a26c769fd69093610e92918c9a086a2077) ) | |
| 6324 | ||
| 6325 | ROM_REGION( 0x200, "proms", 0 ) | |
| 6326 | ROM_LOAD( "proms", 0x0000, 0x0200, NO_DUMP ) | |
| 6327 | ||
| 6328 | ROM_REGION( 0x20, "proms2", ROMREGION_ERASE00 ) | |
| 6329 | //ROM_LOAD( "d13", 0x0000, 0x0020, CRC(c6b41352) SHA1(d7c3b5aa32e4e456c9432a13bede1db6d62eb270) ) | |
| 6330 | ||
| 6331 | ROM_REGION( 0x100, "unkprom", ROMREGION_ERASE00 ) | |
| 6332 | //ROM_LOAD( "g14", 0x0000, 0x0100, CRC(bd48de71) SHA1(e4fa1e774af1499bc568be5b2deabb859d8c8172) ) | |
| 6333 | ||
| 6334 | ROM_REGION( 0x20, "unkprom2", ROMREGION_ERASE00 ) | |
| 6335 | //ROM_LOAD( "g13", 0x0000, 0x0020, CRC(6df3f972) SHA1(0096a7f7452b70cac6c0752cb62e24b643015b5c) ) | |
| 6336 | ROM_END | |
| 6337 | ||
| 6306 | 6338 | /* |
| 6307 | 6339 | |
| 6308 | 6340 | unknown koren or chinese bootleg of something? |
| r7356 | r7357 | |
| 8656 | 8688 | GAME( 198?, wcat3, 0, wcat3, lucky8, 0, ROT0, "E.A.I.", "Wild Cat 3", GAME_NOT_WORKING ) |
| 8657 | 8689 | |
| 8658 | 8690 | GAME( 198?, mtonic, 0, ncb3, cmv801, mtonic, ROT0, "Tonic", "Magical Tonic?", GAME_WRONG_COLORS | GAME_NOT_WORKING ) |
| 8691 | GAME( 198?, magical, 0, lucky8, lucky8, 0, ROT0, "Micro Manufacturing Inc.", "Magical Tonic / Magical Odds?", GAME_NOT_WORKING ) | |
| 8659 | 8692 | |
| 8660 | 8693 | |
| 8661 | 8694 | /* --- Amcoe games --- */ |
| r7356 | r7357 | |
|---|---|---|
| 97 | 97 | #include "sound/rf5c68.h" |
| 98 | 98 | #include "video/segaic16.h" |
| 99 | 99 | |
| 100 | #define S | |
| 100 | #define SHADOW_COLORS_MULTIPLIER 2 | |
| 101 | 101 | |
| 102 | /***************************************************************************/ | |
| 103 | 102 | |
| 104 | static UINT16 coinctrl; | |
| 105 | ||
| 106 | 103 | static INTERRUPT_GEN( sys16_interrupt ) |
| 107 | 104 | { |
| 108 | 105 | cpu_set_input_line(device, 4, HOLD_LINE); /* Interrupt vector 4, used by VBlank */ |
| r7356 | r7357 | |
| 110 | 107 | |
| 111 | 108 | |
| 112 | 109 | /***************************************************************************/ |
| 113 | /* | |
| 110 | ||
| 111 | static WRITE16_HANDLER( sound_command_nmi_w ) | |
| 112 | { | |
| 113 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 114 | ||
| 115 | if (ACCESSING_BITS_0_7) | |
| 116 | { | |
| 117 | soundlatch_w(space, 0, data & 0xff); | |
| 118 | cpu_set_input_line(state->soundcpu, INPUT_LINE_NMI, PULSE_LINE); | |
| 119 | } | |
| 120 | } | |
| 121 | ||
| 122 | ||
| 123 | static ADDRESS_MAP_START( shinobib_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 124 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 125 | AM_RANGE(0x400000, 0x40ffff) AM_RAM // tilemap ram on the original, used as a buffer on the bootlegs | |
| 126 | AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 127 | AM_RANGE(0x411000, 0x411fff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, bg0_tileram) | |
| 128 | AM_RANGE(0x412000, 0x412fff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, bg1_tileram) | |
| 129 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 130 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 131 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sound_command_nmi_w) | |
| 132 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 133 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 134 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") | |
| 135 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW1") | |
| 136 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW2") | |
| 137 | AM_RANGE(0xC43000, 0xC43001) AM_WRITENOP | |
| 138 | AM_RANGE(0xC44000, 0xC44001) AM_WRITENOP | |
| 139 | AM_RANGE(0xc46000, 0xc46001) AM_WRITE(s16a_bootleg_bgscrolly_w) | |
| 140 | AM_RANGE(0xc46002, 0xc46003) AM_WRITE(s16a_bootleg_bgscrollx_w) | |
| 141 | AM_RANGE(0xc46004, 0xc46005) AM_WRITE(s16a_bootleg_fgscrolly_w) | |
| 142 | AM_RANGE(0xc46006, 0xc46007) AM_WRITE(s16a_bootleg_fgscrollx_w) | |
| 143 | AM_RANGE(0xc46008, 0xc46009) AM_WRITE(s16a_bootleg_tilemapselect_w) | |
| 144 | AM_RANGE(0xC60000, 0xC60001) AM_READNOP | |
| 145 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 146 | ADDRESS_MAP_END | |
| 147 | ||
| 148 | /***************************************************************************/ | |
| 149 | ||
| 150 | static WRITE16_HANDLER( sound_command_w ) | |
| 151 | { | |
| 152 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 153 | ||
| 154 | if (ACCESSING_BITS_0_7) | |
| 155 | { | |
| 156 | soundlatch_w(space, 0, data & 0xff); | |
| 157 | cpu_set_input_line(state->soundcpu, 0, HOLD_LINE); | |
| 158 | } | |
| 159 | } | |
| 160 | ||
| 161 | static WRITE16_HANDLER( sys16_coinctrl_w ) | |
| 162 | { | |
| 163 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 164 | ||
| 165 | if (ACCESSING_BITS_0_7) | |
| 166 | { | |
| 167 | state->coinctrl = data & 0xff; | |
| 168 | state->refreshenable = state->coinctrl & 0x20; | |
| 169 | set_led_status(space->machine, 1, state->coinctrl & 0x08); | |
| 170 | set_led_status(space->machine, 0, state->coinctrl & 0x04); | |
| 171 | coin_counter_w(space->machine, 1, state->coinctrl & 0x02); | |
| 172 | coin_counter_w(space->machine, 0, state->coinctrl & 0x01); | |
| 173 | /* bit 6 is also used (1 most of the time; 0 in dduxbl, sdi, wb3; | |
| 174 | tturf has it normally 1 but 0 after coin insertion) */ | |
| 175 | /* eswat sets bit 4 */ | |
| 176 | } | |
| 177 | } | |
| 178 | ||
| 179 | static ADDRESS_MAP_START( passshtb_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 180 | AM_RANGE(0x000000, 0x01ffff) AM_ROM | |
| 181 | ||
| 182 | AM_RANGE(0x400000, 0x407fff) AM_RAM // tilemap ram on original, buffer on bootleg | |
| 183 | AM_RANGE(0x409000, 0x409fff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, bg0_tileram) | |
| 184 | AM_RANGE(0x40a000, 0x40afff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, bg1_tileram) | |
| 185 | AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 186 | ||
| 187 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 188 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 189 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) | |
| 190 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 191 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") | |
| 192 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 193 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") | |
| 194 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") | |
| 195 | AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w) | |
| 196 | AM_RANGE(0xc46000, 0xc46001) AM_WRITE(s16a_bootleg_bgscrolly_w) | |
| 197 | AM_RANGE(0xc46002, 0xc46003) AM_WRITE(s16a_bootleg_bgscrollx_w) | |
| 198 | AM_RANGE(0xc46004, 0xc46005) AM_WRITE(s16a_bootleg_fgscrolly_w) | |
| 199 | AM_RANGE(0xc46006, 0xc46007) AM_WRITE(s16a_bootleg_fgscrollx_w) | |
| 200 | AM_RANGE(0xc46008, 0xc46009) AM_WRITE(s16a_bootleg_tilemapselect_w) | |
| 201 | ||
| 202 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 203 | ADDRESS_MAP_END | |
| 204 | ||
| 205 | /***************************************************************************/ | |
| 206 | ||
| 207 | static READ16_HANDLER( passht4b_service_r ) | |
| 208 | { | |
| 209 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 210 | UINT16 val = input_port_read(space->machine, "SERVICE"); | |
| 211 | ||
| 212 | if(!(input_port_read(space->machine, "P1") & 0x40)) val &= 0xef; | |
| 213 | if(!(input_port_read(space->machine, "P2") & 0x40)) val &= 0xdf; | |
| 214 | if(!(input_port_read(space->machine, "P3") & 0x40)) val &= 0xbf; | |
| 215 | if(!(input_port_read(space->machine, "P4") & 0x40)) val &= 0x7f; | |
| 216 | ||
| 217 | state->passht4b_io3_val = (input_port_read(space->machine, "P1") << 4) | (input_port_read(space->machine, "P3") & 0xf); | |
| 218 | state->passht4b_io2_val = (input_port_read(space->machine, "P2") << 4) | (input_port_read(space->machine, "P4") & 0xf); | |
| 219 | ||
| 220 | state->passht4b_io1_val = 0xff; | |
| 221 | ||
| 222 | // player 1 buttons | |
| 223 | if(!(input_port_read(space->machine, "P1") & 0x10)) state->passht4b_io1_val &= 0xfe; | |
| 224 | if(!(input_port_read(space->machine, "P1") & 0x20)) state->passht4b_io1_val &= 0xfd; | |
| 225 | if(!(input_port_read(space->machine, "P1") & 0x80)) state->passht4b_io1_val &= 0xfc; | |
| 226 | ||
| 227 | // player 2 buttons | |
| 228 | if(!(input_port_read(space->machine, "P2") & 0x10)) state->passht4b_io1_val &= 0xfb; | |
| 229 | if(!(input_port_read(space->machine, "P2") & 0x20)) state->passht4b_io1_val &= 0xf7; | |
| 230 | if(!(input_port_read(space->machine, "P2") & 0x80)) state->passht4b_io1_val &= 0xf3; | |
| 231 | ||
| 232 | // player 3 buttons | |
| 233 | if(!(input_port_read(space->machine, "P3") & 0x10)) state->passht4b_io1_val &= 0xef; | |
| 234 | if(!(input_port_read(space->machine, "P3") & 0x20)) state->passht4b_io1_val &= 0xdf; | |
| 235 | if(!(input_port_read(space->machine, "P3") & 0x80)) state->passht4b_io1_val &= 0xcf; | |
| 236 | ||
| 237 | // player 4 buttons | |
| 238 | if(!(input_port_read(space->machine, "P4") & 0x10)) state->passht4b_io1_val &= 0xbf; | |
| 239 | if(!(input_port_read(space->machine, "P4") & 0x20)) state->passht4b_io1_val &= 0x7f; | |
| 240 | if(!(input_port_read(space->machine, "P4") & 0x80)) state->passht4b_io1_val &= 0x3f; | |
| 241 | ||
| 242 | return val; | |
| 243 | } | |
| 244 | ||
| 245 | static READ16_HANDLER( passht4b_io1_r ) | |
| 246 | { | |
| 247 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 248 | return state->passht4b_io1_val; | |
| 249 | } | |
| 250 | ||
| 251 | static READ16_HANDLER( passht4b_io2_r ) | |
| 252 | { | |
| 253 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 254 | return state->passht4b_io2_val; | |
| 255 | } | |
| 256 | ||
| 257 | static READ16_HANDLER( passht4b_io3_r ) | |
| 258 | { | |
| 259 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 260 | return state->passht4b_io3_val; | |
| 261 | } | |
| 262 | ||
| 263 | static ADDRESS_MAP_START( passht4b_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 264 | AM_RANGE(0x000000, 0x01ffff) AM_ROM | |
| 265 | AM_RANGE(0x400000, 0x407fff) AM_RAM // tilemap ram on original, buffer on bootleg | |
| 266 | AM_RANGE(0x409000, 0x40afff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, bg0_tileram) | |
| 267 | AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, bg1_tileram) | |
| 268 | AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 269 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 270 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 271 | AM_RANGE(0xc41000, 0xc41001) AM_READ(passht4b_service_r) | |
| 272 | AM_RANGE(0xc41002, 0xc41003) AM_READ(passht4b_io1_r) | |
| 273 | AM_RANGE(0xc41004, 0xc41005) AM_READ(passht4b_io2_r) | |
| 274 | AM_RANGE(0xc41006, 0xc41007) AM_READ(passht4b_io3_r) | |
| 275 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") | |
| 276 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") | |
| 277 | AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w) | |
| 278 | AM_RANGE(0xc43000, 0xc43001) AM_READ_PORT("P1") // test mode only | |
| 279 | AM_RANGE(0xc43002, 0xc43003) AM_READ_PORT("P2") | |
| 280 | AM_RANGE(0xc43004, 0xc43005) AM_READ_PORT("P3") | |
| 281 | AM_RANGE(0xc43006, 0xc43007) AM_READ_PORT("P4") | |
| 282 | AM_RANGE(0xc4600a, 0xc4600b) AM_WRITE(sys16_coinctrl_w) /* coin counter doesn't work */ | |
| 283 | AM_RANGE(0xc46000, 0xc46001) AM_WRITE(s16a_bootleg_bgscrolly_w) | |
| 284 | AM_RANGE(0xc46002, 0xc46003) AM_WRITE(s16a_bootleg_bgscrollx_w) | |
| 285 | AM_RANGE(0xc46004, 0xc46005) AM_WRITE(s16a_bootleg_fgscrolly_w) | |
| 286 | AM_RANGE(0xc46006, 0xc46007) AM_WRITE(s16a_bootleg_fgscrollx_w) | |
| 287 | AM_RANGE(0xc46008, 0xc46009) AM_WRITE(s16a_bootleg_tilemapselect_w) | |
| 288 | ||
| 289 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 290 | ADDRESS_MAP_END | |
| 291 | ||
| 292 | /***************************************************************************/ | |
| 293 | ||
| 294 | static WRITE16_HANDLER( sys16_tilebank_w ) | |
| 295 | { | |
| 296 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 297 | ||
| 298 | if (ACCESSING_BITS_0_7) | |
| 299 | { | |
| 300 | switch (offset & 1) | |
| 301 | { | |
| 302 | case 0: | |
| 303 | state->tile_bank0 = data & 0x0f; | |
| 304 | break; | |
| 305 | case 1: | |
| 306 | state->tile_bank1 = data & 0x0f; | |
| 307 | break; | |
| 308 | } | |
| 309 | } | |
| 310 | } | |
| 311 | ||
| 312 | static ADDRESS_MAP_START( wb3bbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 313 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 314 | AM_RANGE(0x3f0000, 0x3fffff) AM_WRITE(sys16_tilebank_w) | |
| 315 | AM_RANGE(0x400000, 0x407fff) AM_RAM // tilemap ram on the original, used as a buffer on the bootlegs | |
| 316 | AM_RANGE(0x409000, 0x40afff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, bg0_tileram) | |
| 317 | AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, bg1_tileram) | |
| 318 | AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 319 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 320 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 321 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) | |
| 322 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 323 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 324 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") | |
| 325 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") | |
| 326 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") | |
| 327 | AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w) | |
| 328 | AM_RANGE(0xC44000, 0xC44001) AM_WRITENOP | |
| 329 | AM_RANGE(0xc46000, 0xc46001) AM_WRITE(s16a_bootleg_bgscrolly_w) | |
| 330 | AM_RANGE(0xc46002, 0xc46003) AM_WRITE(s16a_bootleg_bgscrollx_w) | |
| 331 | AM_RANGE(0xc46004, 0xc46005) AM_WRITE(s16a_bootleg_fgscrolly_w) | |
| 332 | AM_RANGE(0xc46006, 0xc46007) AM_WRITE(s16a_bootleg_fgscrollx_w) | |
| 333 | AM_RANGE(0xc46008, 0xc46009) AM_WRITE(s16a_bootleg_tilemapselect_w) | |
| 334 | AM_RANGE(0xff0000, 0xffffff) AM_RAM // work ram | |
| 335 | ADDRESS_MAP_END | |
| 336 | ||
| 337 | /*************************************************************************** | |
| 338 | ||
| 114 | 339 | Tough Turf (Datsu bootleg) sound emulation |
| 115 | 340 | |
| 116 | 341 | Memory map |
| r7356 | r7357 | |
| 137 | 362 | |
| 138 | 363 | The sample sound codes in the sound test are OK, but in-game sample playback is bad. |
| 139 | 364 | There seems to be more data in the high bits of the ROM bank control word which may be related. |
| 140 | */ | |
| 365 | ***************************************************************************/ | |
| 141 | 366 | |
| 142 | static int sample_buffer = 0; | |
| 143 | static int sample_select = 0; | |
| 144 | ||
| 145 | static WRITE16_HANDLER( sound_command_nmi_w ) | |
| 146 | { | |
| 147 | if( ACCESSING_BITS_0_7 ) | |
| 148 | { | |
| 149 | soundlatch_w( space, 0, data & 0xff ); | |
| 150 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_NMI, PULSE_LINE); | |
| 151 | } | |
| 152 | } | |
| 153 | ||
| 154 | ||
| 155 | 367 | static WRITE8_HANDLER( tturfbl_msm5205_data_w ) |
| 156 | 368 | { |
| 157 | sample_buffer = data; | |
| 369 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 370 | state->sample_buffer = data; | |
| 158 | 371 | } |
| 159 | 372 | |
| 160 | static void tturfbl_msm5205_callback(running_device *device) | |
| 373 | static void tturfbl_msm5205_callback( running_device *device ) | |
| 161 | 374 | { |
| 162 | msm5205_data_w(device, (sample_buffer >> 4) & 0x0F); | |
| 163 | sample_buffer <<= 4; | |
| 164 | sample_select ^= 1; | |
| 165 | if(sample_select == 0) | |
| 166 | cputag_set_input_line(device->machine, "soundcpu", INPUT_LINE_NMI, PULSE_LINE); | |
| 375 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)device->machine->driver_data; | |
| 376 | msm5205_data_w(device, (state->sample_buffer >> 4) & 0x0f); | |
| 377 | ||
| 378 | state->sample_buffer <<= 4; | |
| 379 | state->sample_select ^= 1; | |
| 380 | if(state->sample_select == 0) | |
| 381 | cpu_set_input_line(state->soundcpu, INPUT_LINE_NMI, PULSE_LINE); | |
| 167 | 382 | } |
| 168 | 383 | |
| 169 | static const msm5205_interface tturfbl_msm5205_interface = | |
| 384 | static const msm5205_interface tturfbl_msm5205_interface = | |
| 170 | 385 | { |
| 171 | 386 | tturfbl_msm5205_callback, |
| 172 | 387 | MSM5205_S48_4B |
| 173 | 388 | }; |
| 174 | 389 | |
| 175 | 390 | |
| 176 | static UINT8 *tturfbl_soundbank_ptr = NULL; /* Pointer to currently selected portion of ROM */ | |
| 177 | ||
| 178 | 391 | static READ8_HANDLER( tturfbl_soundbank_r ) |
| 179 | 392 | { |
| 180 | if(tturfbl_soundbank_ptr) return tturfbl_soundbank_ptr[offset & 0x3fff]; | |
| 393 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 394 | ||
| 395 | if (state->soundbank_ptr) | |
| 396 | return state->soundbank_ptr[offset & 0x3fff]; | |
| 181 | 397 | return 0x80; |
| 182 | 398 | } |
| 183 | 399 | |
| 184 | 400 | static WRITE8_HANDLER( tturfbl_soundbank_w ) |
| 185 | 401 | { |
| 402 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 186 | 403 | UINT8 *mem = memory_region(space->machine, "soundcpu"); |
| 187 | 404 | |
| 188 | 405 | switch(data) |
| 189 | 406 | { |
| 190 | 407 | case 0: |
| 191 | tt | |
| 408 | state-> | |
| 192 | 409 | break; |
| 193 | 410 | case 1: |
| 194 | tt | |
| 411 | state-> | |
| 195 | 412 | break; |
| 196 | 413 | case 2: |
| 197 | tt | |
| 414 | state-> | |
| 198 | 415 | break; |
| 199 | 416 | case 3: |
| 200 | tt | |
| 417 | state-> | |
| 201 | 418 | break; |
| 202 | 419 | case 4: |
| 203 | tt | |
| 420 | state-> | |
| 204 | 421 | break; |
| 205 | 422 | case 8: |
| 206 | tt | |
| 423 | state-> | |
| 207 | 424 | break; |
| 208 | 425 | default: |
| 209 | tt | |
| 426 | state-> | |
| 210 | 427 | logerror("Invalid bank setting %02X (%04X)\n", data, cpu_get_pc(space->cpu)); |
| 211 | 428 | break; |
| 212 | 429 | } |
| r7356 | r7357 | |
| 271 | 488 | ADDRESS_MAP_END |
| 272 | 489 | |
| 273 | 490 | |
| 274 | static WRITE16_HANDLER( sound_command_w ) | |
| 275 | { | |
| 276 | if( ACCESSING_BITS_0_7 ) | |
| 277 | { | |
| 278 | soundlatch_w( space, 0, data & 0xff ); | |
| 279 | cputag_set_input_line(space->machine, "soundcpu", 0, HOLD_LINE ); | |
| 280 | } | |
| 281 | } | |
| 282 | ||
| 283 | ||
| 284 | //static UINT16 coinctrl; | |
| 285 | ||
| 286 | static WRITE16_HANDLER( sys16_coinctrl_w ) | |
| 287 | { | |
| 288 | if( ACCESSING_BITS_0_7 ) | |
| 289 | { | |
| 290 | coinctrl = data&0xff; | |
| 291 | sys16_refreshenable = coinctrl & 0x20; | |
| 292 | set_led_status(space->machine, 1,coinctrl & 0x08); | |
| 293 | set_led_status(space->machine, 0,coinctrl & 0x04); | |
| 294 | coin_counter_w(space->machine, 1,coinctrl & 0x02); | |
| 295 | coin_counter_w(space->machine, 0,coinctrl & 0x01); | |
| 296 | /* bit 6 is also used (1 most of the time; 0 in dduxbl, sdi, wb3; | |
| 297 | tturf has it normally 1 but 0 after coin insertion) */ | |
| 298 | /* eswat sets bit 4 */ | |
| 299 | } | |
| 300 | } | |
| 301 | ||
| 302 | 491 | /***************************************************************************/ |
| 303 | 492 | |
| 304 | static MACHINE_DRIVER_START( system16 ) | |
| 305 | ||
| 306 | /* basic machine hardware */ | |
| 307 | MDRV_CPU_ADD("maincpu", M68000, 10000000) | |
| 308 | MDRV_CPU_VBLANK_INT("screen", sys16_interrupt) | |
| 309 | ||
| 310 | MDRV_CPU_ADD("soundcpu", Z80, 4000000) | |
| 311 | MDRV_CPU_PROGRAM_MAP(sound_map) | |
| 312 | MDRV_CPU_IO_MAP(sound_io_map) | |
| 313 | ||
| 314 | /* video hardware */ | |
| 315 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 316 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 317 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 318 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 319 | MDRV_SCREEN_SIZE(40*8, 28*8) | |
| 320 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) | |
| 321 | ||
| 322 | MDRV_GFXDECODE(sys16) | |
| 323 | MDRV_PALETTE_LENGTH(2048*ShadowColorsMultiplier) | |
| 324 | ||
| 325 | MDRV_VIDEO_START(system16) | |
| 326 | MDRV_VIDEO_UPDATE(system16) | |
| 327 | ||
| 328 | /* sound hardware */ | |
| 329 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") | |
| 330 | ||
| 331 | MDRV_SOUND_ADD("ymsnd", YM2151, 4000000) | |
| 332 | MDRV_SOUND_ROUTE(0, "lspeaker", 0.32) | |
| 333 | MDRV_SOUND_ROUTE(1, "rspeaker", 0.32) | |
| 334 | MACHINE_DRIVER_END | |
| 335 | ||
| 336 | ||
| 337 | static MACHINE_DRIVER_START( system16_7759 ) | |
| 338 | ||
| 339 | /* basic machine hardware */ | |
| 340 | MDRV_IMPORT_FROM(system16) | |
| 341 | ||
| 342 | MDRV_CPU_MODIFY("soundcpu") | |
| 343 | MDRV_CPU_PROGRAM_MAP(sound_7759_map) | |
| 344 | MDRV_CPU_IO_MAP(sound_7759_io_map) | |
| 345 | ||
| 346 | /* sound hardware */ | |
| 347 | MDRV_SOUND_ADD("7759", UPD7759, UPD7759_STANDARD_CLOCK) | |
| 348 | MDRV_SOUND_CONFIG(sys16_upd7759_interface) | |
| 349 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.48) | |
| 350 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.48) | |
| 351 | MACHINE_DRIVER_END | |
| 352 | ||
| 353 | /***************************************************************************/ | |
| 354 | ||
| 355 | static WRITE16_HANDLER( sys16_tilebank_w ) | |
| 493 | static void set_tile_bank( running_machine *machine, int data ) | |
| 356 | 494 | { |
| 357 | if(ACCESSING_BITS_0_7) | |
| 358 | { | |
| 359 | switch(offset & 1) | |
| 360 | { | |
| 361 | case 0: | |
| 362 | sys16_tile_bank0 = data & 0x0F; | |
| 363 | break; | |
| 364 | case 1: | |
| 365 | sys16_tile_bank1 = data & 0x0F; | |
| 366 | break; | |
| 367 | } | |
| 368 | } | |
| 495 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 496 | state->tile_bank0 = (data >> 4) & 0x0f; | |
| 497 | state->tile_bank1 = data & 0x0f; | |
| 369 | 498 | } |
| 370 | 499 | |
| 371 | static void set_ | |
| 500 | static void set_fg_page( running_machine *machine, int data ) | |
| 372 | 501 | { |
| 373 | sys16_tile_bank1 = data&0xf; | |
| 374 | sys16_tile_bank0 = (data>>4)&0xf; | |
| 502 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 503 | state->fg_page[0] = data >> 12; | |
| 504 | state->fg_page[1] = (data >> 8) & 0x0f; | |
| 505 | state->fg_page[2] = (data >> 4) & 0x0f; | |
| 506 | state->fg_page[3] = data & 0x0f; | |
| 375 | 507 | } |
| 376 | 508 | |
| 377 | static void set_ | |
| 509 | static void set_bg_page( running_machine *machine, int data ) | |
| 378 | 510 | { |
| 379 | sys16_fg_page[0] = data>>12; | |
| 380 | sys16_fg_page[1] = (data>>8)&0xf; | |
| 381 | sys16_fg_page[2] = (data>>4)&0xf; | |
| 382 | sys16_fg_page[3] = data&0xf; | |
| 511 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 512 | state->bg_page[0] = data >> 12; | |
| 513 | state->bg_page[1] = (data >> 8) & 0x0f; | |
| 514 | state->bg_page[2] = (data >> 4) & 0x0f; | |
| 515 | state->bg_page[3] = data & 0x0f; | |
| 383 | 516 | } |
| 384 | 517 | |
| 385 | static void set_bg_page( int data ) | |
| 386 | { | |
| 387 | sys16_bg_page[0] = data>>12; | |
| 388 | sys16_bg_page[1] = (data>>8)&0xf; | |
| 389 | sys16_bg_page[2] = (data>>4)&0xf; | |
| 390 | sys16_bg_page[3] = data&0xf; | |
| 391 | } | |
| 392 | 518 | |
| 393 | /***************************************************************************/ | |
| 394 | ||
| 395 | static INPUT_PORTS_START( sys16_common ) | |
| 396 | PORT_START("P1") | |
| 397 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 398 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 399 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 400 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 401 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 402 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 403 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 404 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 405 | ||
| 406 | PORT_START("P2") | |
| 407 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL | |
| 408 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 409 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 410 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 411 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 412 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 413 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 414 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 415 | ||
| 416 | PORT_START("SERVICE") | |
| 417 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 418 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 419 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) | |
| 420 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 421 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) | |
| 422 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 423 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 424 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 425 | ||
| 426 | PORT_START("DSW1") | |
| 427 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") | |
| 428 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) | |
| 429 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 430 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) | |
| 431 | PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" ) | |
| 432 | PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" ) | |
| 433 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 434 | PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" ) | |
| 435 | PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" ) | |
| 436 | PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" ) | |
| 437 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) | |
| 438 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 439 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 440 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 441 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 442 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 443 | PORT_DIPSETTING( 0x00, "Free Play (if Coin B too) or 1/1" ) | |
| 444 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") | |
| 445 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) | |
| 446 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) | |
| 447 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) | |
| 448 | PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" ) | |
| 449 | PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" ) | |
| 450 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 451 | PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" ) | |
| 452 | PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" ) | |
| 453 | PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" ) | |
| 454 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) | |
| 455 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 456 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 457 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 458 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 459 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 460 | PORT_DIPSETTING( 0x00, "Free Play (if Coin A too) or 1/1" ) | |
| 461 | INPUT_PORTS_END | |
| 462 | ||
| 463 | /***************************************************************************/ | |
| 464 | ||
| 465 | #ifdef UNUSED_DEFINITION | |
| 466 | static INPUT_PORTS_START( aliensyn ) | |
| 467 | PORT_INCLUDE( sys16_common ) | |
| 468 | ||
| 469 | PORT_START("DSW2") | |
| 470 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ | |
| 471 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 472 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 473 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 474 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 475 | PORT_DIPSETTING( 0x08, "2" ) | |
| 476 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 477 | PORT_DIPSETTING( 0x04, "4" ) | |
| 478 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 479 | PORT_DIPNAME( 0x30, 0x30, "Timer" ) PORT_DIPLOCATION("SW2:5,6") | |
| 480 | PORT_DIPSETTING( 0x00, "120" ) | |
| 481 | PORT_DIPSETTING( 0x10, "130" ) | |
| 482 | PORT_DIPSETTING( 0x20, "140" ) | |
| 483 | PORT_DIPSETTING( 0x30, "150" ) | |
| 484 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7,8") | |
| 485 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) | |
| 486 | PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) ) | |
| 487 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) | |
| 488 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 489 | INPUT_PORTS_END | |
| 490 | #endif | |
| 491 | /****************************************************************************/ | |
| 492 | ||
| 493 | 519 | static ADDRESS_MAP_START( bayroute_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 494 | 520 | AM_RANGE(0x000000, 0x0bffff) AM_ROM |
| 495 | 521 | AM_RANGE(0x100000, 0x100003) AM_WRITENOP // tilebank control? |
| 496 | 522 | AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram |
| 497 | 523 | AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&segaic16_spriteram_0) |
| 498 | AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 499 | AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 500 | AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 524 | AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 525 | AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 526 | AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 501 | 527 | AM_RANGE(0x900000, 0x900001) AM_WRITE(sys16_coinctrl_w) |
| 502 | 528 | AM_RANGE(0x901002, 0x901003) AM_READ_PORT("P1") |
| 503 | 529 | AM_RANGE(0x901006, 0x901007) AM_READ_PORT("P2") |
| r7356 | r7357 | |
| 510 | 536 | |
| 511 | 537 | /***************************************************************************/ |
| 512 | 538 | |
| 513 | static INPUT_PORTS_START( bayroute ) | |
| 514 | PORT_INCLUDE( sys16_common ) | |
| 515 | ||
| 516 | PORT_START("DSW2") | |
| 517 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:1") | |
| 518 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 519 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 520 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 521 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 522 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 523 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 524 | PORT_DIPSETTING( 0x04, "1" ) | |
| 525 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 526 | PORT_DIPSETTING( 0x08, "5" ) | |
| 527 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 528 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:5,6") | |
| 529 | PORT_DIPSETTING( 0x30, "100k" ) | |
| 530 | PORT_DIPSETTING( 0x20, "150k" ) | |
| 531 | PORT_DIPSETTING( 0x10, "200k" ) | |
| 532 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 533 | PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7,8") | |
| 534 | PORT_DIPSETTING( 0xc0, DEF_STR( Easy ) ) | |
| 535 | PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) | |
| 536 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) | |
| 537 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 538 | INPUT_PORTS_END | |
| 539 | ||
| 540 | /***************************************************************************/ | |
| 541 | ||
| 542 | ||
| 543 | ||
| 544 | ||
| 545 | /***************************************************************************/ | |
| 546 | ||
| 547 | static DRIVER_INIT( dduxbl ) | |
| 548 | { | |
| 549 | MACHINE_RESET_CALL(sys16_onetime); | |
| 550 | } | |
| 551 | ||
| 552 | /***************************************************************************/ | |
| 553 | ||
| 554 | static INPUT_PORTS_START( ddux ) | |
| 555 | PORT_INCLUDE( sys16_common ) | |
| 556 | ||
| 557 | PORT_START("DSW2") | |
| 558 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1") | |
| 559 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 560 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 561 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:2,3") | |
| 562 | PORT_DIPSETTING( 0x04, DEF_STR( Easy ) ) | |
| 563 | PORT_DIPSETTING( 0x06, DEF_STR( Normal ) ) | |
| 564 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 565 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 566 | PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:4,5") | |
| 567 | PORT_DIPSETTING( 0x10, "2" ) | |
| 568 | PORT_DIPSETTING( 0x18, "3" ) | |
| 569 | PORT_DIPSETTING( 0x08, "4" ) | |
| 570 | PORT_DIPSETTING( 0x00, "5" ) | |
| 571 | PORT_DIPNAME( 0x60, 0x60, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:6,7") | |
| 572 | PORT_DIPSETTING( 0x40, "150k" ) | |
| 573 | PORT_DIPSETTING( 0x60, "200k" ) | |
| 574 | PORT_DIPSETTING( 0x20, "300k" ) | |
| 575 | PORT_DIPSETTING( 0x00, "400k" ) | |
| 576 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Listed as "Unused" */ | |
| 577 | INPUT_PORTS_END | |
| 578 | ||
| 579 | /***************************************************************************/ | |
| 580 | ||
| 581 | ||
| 582 | ||
| 583 | /***************************************************************************/ | |
| 584 | ||
| 585 | static int eswat_tilebank0; | |
| 586 | ||
| 587 | static WRITE16_HANDLER( eswat_tilebank0_w ) | |
| 588 | { | |
| 589 | if( ACCESSING_BITS_0_7 ) | |
| 590 | { | |
| 591 | eswat_tilebank0 = data&0xff; | |
| 592 | } | |
| 593 | } | |
| 594 | ||
| 595 | ||
| 596 | ||
| 597 | /***************************************************************************/ | |
| 598 | ||
| 599 | ||
| 600 | static MACHINE_RESET( eswatbl ) | |
| 601 | { | |
| 602 | ||
| 603 | } | |
| 604 | ||
| 605 | ||
| 606 | static DRIVER_INIT( eswatbl ) | |
| 607 | { | |
| 608 | MACHINE_RESET_CALL(sys16_onetime); | |
| 609 | sys16_rowscroll_scroll=0x8000; | |
| 610 | //sys18_splittab_fg_x=&sys16_textram[0x0f80]; | |
| 611 | } | |
| 612 | ||
| 613 | /***************************************************************************/ | |
| 614 | ||
| 615 | static INPUT_PORTS_START( eswat ) | |
| 616 | PORT_INCLUDE( sys16_common ) | |
| 617 | ||
| 618 | PORT_START("DSW2") | |
| 619 | PORT_DIPNAME( 0x01, 0x01, "Credits To Start" ) PORT_DIPLOCATION("SW2:1") | |
| 620 | PORT_DIPSETTING( 0x01, "1 Credit" ) | |
| 621 | PORT_DIPSETTING( 0x00, "2 Credits" ) | |
| 622 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 623 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 624 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 625 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:3") | |
| 626 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 627 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 628 | PORT_DIPNAME( 0x08, 0x08, "Timer" ) PORT_DIPLOCATION("SW2:4") | |
| 629 | PORT_DIPSETTING( 0x08, DEF_STR( Normal ) ) | |
| 630 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 631 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6") | |
| 632 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 633 | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) | |
| 634 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 635 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 636 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:7,8") | |
| 637 | PORT_DIPSETTING( 0x00, "1" ) | |
| 638 | PORT_DIPSETTING( 0x40, "2" ) | |
| 639 | PORT_DIPSETTING( 0xc0, "3" ) | |
| 640 | PORT_DIPSETTING( 0x80, "4" ) | |
| 641 | INPUT_PORTS_END | |
| 642 | ||
| 643 | /***************************************************************************/ | |
| 644 | ||
| 645 | /***************************************************************************/ | |
| 646 | ||
| 647 | /***************************************************************************/ | |
| 648 | ||
| 649 | ||
| 650 | static INPUT_PORTS_START( fpointbl ) | |
| 651 | PORT_START("SERVICE") | |
| 652 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 653 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 654 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) | |
| 655 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 656 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) | |
| 657 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 658 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 659 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 660 | ||
| 661 | PORT_START("P1") | |
| 662 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 663 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 664 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 665 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 666 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 667 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 668 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 669 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 670 | ||
| 671 | PORT_START("P2") | |
| 672 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 673 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL | |
| 674 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 675 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 676 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 677 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 678 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 679 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 680 | ||
| 681 | PORT_START("DSW2") | |
| 682 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ | |
| 683 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 684 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 685 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 686 | PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW2:3" ) /* Listed as "Unused" */ | |
| 687 | PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" ) /* Listed as "Unused" */ | |
| 688 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6") | |
| 689 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 690 | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) | |
| 691 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 692 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 693 | PORT_DIPNAME( 0x40, 0x40, "Clear Round Allowed" ) PORT_DIPLOCATION("SW2:7") /* Use button 3 */ | |
| 694 | PORT_DIPSETTING( 0x00, "1" ) | |
| 695 | PORT_DIPSETTING( 0x40, "2" ) | |
| 696 | /* SW2:8 The mode in which a block falls at twice [ usual ] speed as this when playing 25 minutes or more on one coin. */ | |
| 697 | PORT_DIPNAME( 0x80, 0x80, "2 Cell Move" ) PORT_DIPLOCATION("SW2:8") | |
| 698 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 699 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) | |
| 700 | ||
| 701 | PORT_START("DSW1") | |
| 702 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") | |
| 703 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) | |
| 704 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 705 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) | |
| 706 | PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" ) | |
| 707 | PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" ) | |
| 708 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 709 | PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" ) | |
| 710 | PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" ) | |
| 711 | PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" ) | |
| 712 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) | |
| 713 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 714 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 715 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 716 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 717 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 718 | PORT_DIPSETTING( 0x00, "Free Play (if Coin B too) or 1/1" ) | |
| 719 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") | |
| 720 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) | |
| 721 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) | |
| 722 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) | |
| 723 | PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" ) | |
| 724 | PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" ) | |
| 725 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 726 | PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" ) | |
| 727 | PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" ) | |
| 728 | PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" ) | |
| 729 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) | |
| 730 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 731 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 732 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 733 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 734 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 735 | PORT_DIPSETTING( 0x00, "Free Play (if Coin A too) or 1/1" ) | |
| 736 | INPUT_PORTS_END | |
| 737 | ||
| 738 | /***************************************************************************/ | |
| 739 | ||
| 740 | 539 | /* |
| 741 | 540 | Flash Point (Datsu bootlegs = fpointbl, fpointbj) |
| 742 | 541 | Has sound latch at $E000 instead of I/O ports $C0-FF |
| r7356 | r7357 | |
| 749 | 548 | |
| 750 | 549 | /***************************************************************************/ |
| 751 | 550 | |
| 752 | ||
| 753 | ||
| 754 | ||
| 755 | static WRITE16_HANDLER( sys16bootleg_bgpage_w ) | |
| 551 | static WRITE16_HANDLER( s16bl_bgpage_w ) | |
| 756 | 552 | { |
| 757 | set_bg_page( data | |
| 553 | set_bg_page(space->machine, data | |
| 758 | 554 | } |
| 759 | 555 | |
| 760 | static WRITE16_HANDLER( s | |
| 556 | static WRITE16_HANDLER( s | |
| 761 | 557 | { |
| 762 | set_fg_page( data | |
| 558 | set_fg_page(space->machine, data | |
| 763 | 559 | } |
| 764 | 560 | |
| 765 | static WRITE16_HANDLER( s | |
| 561 | static WRITE16_HANDLER( s | |
| 766 | 562 | { |
| 767 | ||
| 563 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 768 | 564 | int scroll = data & 0x1ff; |
| 769 | int bank = (data&0xc000)>>14; | |
| 770 | scroll+=0x200; | |
| 771 | set_tile_bank( bank ); | |
| 565 | int bank = (data & 0xc000) >> 14; | |
| 772 | 566 | |
| 773 | scroll+=3; // so that the character portraits in attract mode are properly aligned (alighnment on character select no longer matches original tho?) | |
| 774 | sys16_fg_scrollx = -scroll; | |
| 567 | scroll += 0x200; | |
| 568 | set_tile_bank(space->machine, bank); | |
| 569 | ||
| 570 | scroll += 3; // so that the character portraits in attract mode are properly aligned (alighnment on character select no longer matches original tho?) | |
| 571 | state->fg_scrollx = -scroll; | |
| 775 | 572 | } |
| 776 | 573 | |
| 777 | static WRITE16_HANDLER( s | |
| 574 | static WRITE16_HANDLER( s | |
| 778 | 575 | { |
| 779 | ||
| 780 | //data ^= 0x7; // 4 player passing shot | |
| 781 | ||
| 576 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 782 | 577 | int scroll = data & 0x1ff; |
| 783 | scroll+=0x200; | |
| 784 | scroll+=3; | |
| 785 | 578 | |
| 579 | scroll += 0x200; | |
| 580 | scroll += 3; | |
| 786 | 581 | |
| 787 | s | |
| 582 | state->fg_scrollx = -scroll; | |
| 788 | 583 | } |
| 789 | 584 | |
| 790 | 585 | |
| 791 | static WRITE16_HANDLER( s | |
| 586 | static WRITE16_HANDLER( s | |
| 792 | 587 | { |
| 588 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 793 | 589 | int scroll = data & 0xff; |
| 794 | sys16_fg_scrolly = scroll; | |
| 590 | ||
| 591 | state->fg_scrolly = scroll; | |
| 795 | 592 | } |
| 796 | 593 | |
| 797 | static WRITE16_HANDLER( s | |
| 594 | static WRITE16_HANDLER( s | |
| 798 | 595 | { |
| 799 | ||
| 596 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 800 | 597 | int scroll = data & 0x1ff; |
| 801 | scroll+=0x200; | |
| 802 | scroll+=1; // so that the background fo the select screen is properly aligned | |
| 803 | sys16_bg_scrollx = -scroll; | |
| 598 | ||
| 599 | scroll+= 0x200; | |
| 600 | scroll+= 1; // so that the background fo the select screen is properly aligned | |
| 601 | state->bg_scrollx = -scroll; | |
| 804 | 602 | } |
| 805 | 603 | |
| 806 | static WRITE16_HANDLER( s | |
| 604 | static WRITE16_HANDLER( s | |
| 807 | 605 | { |
| 606 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 808 | 607 | int scroll = data & 0xff; |
| 809 | sys16_bg_scrolly = scroll; | |
| 608 | ||
| 609 | state->bg_scrolly = scroll; | |
| 810 | 610 | } |
| 811 | 611 | |
| 812 | 612 | |
| 813 | static ADDRESS_MAP_START( goldnaxe | |
| 613 | static ADDRESS_MAP_START( goldnaxe | |
| 814 | 614 | AM_RANGE(0x000000, 0x0bffff) AM_ROM |
| 815 | AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 816 | AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 817 | AM_RANGE(0x118000, 0x118001) AM_WRITE(sys16bootleg_fgscrolly_w) | |
| 818 | AM_RANGE(0x118008, 0x118009) AM_WRITE(sys16bootleg_fgscrollx_bank_w) // and tile bank | |
| 819 | AM_RANGE(0x118010, 0x118011) AM_WRITE(sys16bootleg_bgscrolly_w) | |
| 820 | AM_RANGE(0x118018, 0x118019) AM_WRITE(sys16bootleg_bgscrollx_w) | |
| 821 | AM_RANGE(0x118020, 0x118021) AM_WRITE(sys16bootleg_fgpage_w) | |
| 822 | AM_RANGE(0x118028, 0x118029) AM_WRITE(sys16bootleg_bgpage_w) | |
| 823 | AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 615 | AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 616 | AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 617 | AM_RANGE(0x118000, 0x118001) AM_WRITE(s16bl_fgscrolly_w) | |
| 618 | AM_RANGE(0x118008, 0x118009) AM_WRITE(s16bl_fgscrollx_bank_w) // and tile bank | |
| 619 | AM_RANGE(0x118010, 0x118011) AM_WRITE(s16bl_bgscrolly_w) | |
| 620 | AM_RANGE(0x118018, 0x118019) AM_WRITE(s16bl_bgscrollx_w) | |
| 621 | AM_RANGE(0x118020, 0x118021) AM_WRITE(s16bl_fgpage_w) | |
| 622 | AM_RANGE(0x118028, 0x118029) AM_WRITE(s16bl_bgpage_w) | |
| 623 | AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 824 | 624 | AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&segaic16_spriteram_0) |
| 825 | 625 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) |
| 826 | 626 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| r7356 | r7357 | |
| 835 | 635 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram |
| 836 | 636 | ADDRESS_MAP_END |
| 837 | 637 | |
| 838 | static ADDRESS_MAP_START( bayroute | |
| 638 | static ADDRESS_MAP_START( bayroute | |
| 839 | 639 | AM_RANGE(0x000000, 0x0bffff) AM_ROM |
| 840 | 640 | AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram |
| 841 | 641 | AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&segaic16_spriteram_0) |
| 842 | AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 843 | AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 844 | AM_RANGE(0x718000, 0x718001) AM_WRITE(sys16bootleg_fgscrolly_w) | |
| 845 | AM_RANGE(0x718008, 0x718009) AM_WRITE(sys16bootleg_fgscrollx_bank_w) // and tile bank | |
| 846 | AM_RANGE(0x718010, 0x718011) AM_WRITE(sys16bootleg_bgscrolly_w) | |
| 847 | AM_RANGE(0x718018, 0x718019) AM_WRITE(sys16bootleg_bgscrollx_w) | |
| 848 | AM_RANGE(0x718020, 0x718021) AM_WRITE(sys16bootleg_fgpage_w) | |
| 849 | AM_RANGE(0x718028, 0x718029) AM_WRITE(sys16bootleg_bgpage_w) | |
| 850 | AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 642 | AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 643 | AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 644 | AM_RANGE(0x718000, 0x718001) AM_WRITE(s16bl_fgscrolly_w) | |
| 645 | AM_RANGE(0x718008, 0x718009) AM_WRITE(s16bl_fgscrollx_bank_w) // and tile bank | |
| 646 | AM_RANGE(0x718010, 0x718011) AM_WRITE(s16bl_bgscrolly_w) | |
| 647 | AM_RANGE(0x718018, 0x718019) AM_WRITE(s16bl_bgscrollx_w) | |
| 648 | AM_RANGE(0x718020, 0x718021) AM_WRITE(s16bl_fgpage_w) | |
| 649 | AM_RANGE(0x718028, 0x718029) AM_WRITE(s16bl_bgpage_w) | |
| 650 | AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 851 | 651 | AM_RANGE(0x901000, 0x901001) AM_READ_PORT("SERVICE") AM_WRITE(sys16_coinctrl_w) |
| 852 | 652 | AM_RANGE(0x901002, 0x901003) AM_READ_PORT("P1") |
| 853 | 653 | AM_RANGE(0x901006, 0x901007) AM_READ_PORT("P2") |
| r7356 | r7357 | |
| 855 | 655 | AM_RANGE(0x902002, 0x902003) AM_READ_PORT("DSW1") |
| 856 | 656 | ADDRESS_MAP_END |
| 857 | 657 | |
| 858 | ||
| 859 | static UINT16 datsu_page[4]; | |
| 860 | ||
| 861 | static void datsu_set_pages(void) | |
| 658 | static void datsu_set_pages( running_machine *machine ) | |
| 862 | 659 | { |
| 660 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 863 | 661 | UINT16 page; |
| 864 | 662 | |
| 865 | page = ((datsu_page[0] & 0x00f0) >>0) | | |
| 866 | ((datsu_page[1] & 0x00f0) >>4) | | |
| 867 | ((datsu_page[2] & 0x00f0) <<8) | | |
| 868 | ((datsu_page[3] & 0x00f0) <<4); | |
| 663 | page = ((state->datsu_page[0] & 0x00f0) >>0) | | |
| 664 | ((state->datsu_page[1] & 0x00f0) >>4) | | |
| 665 | ((state->datsu_page[2] & 0x00f0) <<8) | | |
| 666 | ((state->datsu_page[3] & 0x00f0) <<4); | |
| 869 | 667 | |
| 870 | 668 | |
| 871 | set_fg_page( page | |
| 669 | set_fg_page(machine, page | |
| 872 | 670 | |
| 873 | page = ((datsu_page[0] & 0x000f) <<4) | | |
| 874 | ((datsu_page[1] & 0x000f) <<0) | | |
| 875 | ((datsu_page[2] & 0x000f) <<12) | | |
| 876 | ((datsu_page[3] & 0x000f) <<8); | |
| 671 | page = ((state->datsu_page[0] & 0x000f) <<4) | | |
| 672 | ((state->datsu_page[1] & 0x000f) <<0) | | |
| 673 | ((state->datsu_page[2] & 0x000f) <<12) | | |
| 674 | ((state->datsu_page[3] & 0x000f) <<8); | |
| 877 | 675 | |
| 878 | set_bg_page( page | |
| 676 | set_bg_page(machine, page | |
| 879 | 677 | } |
| 880 | 678 | |
| 881 | 679 | static WRITE16_HANDLER( datsu_page0_w ) |
| 882 | 680 | { |
| 883 | COMBINE_DATA(&datsu_page[0]); | |
| 884 | datsu_set_pages(); | |
| 681 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 682 | ||
| 683 | COMBINE_DATA(&state->datsu_page[0]); | |
| 684 | datsu_set_pages(space->machine); | |
| 885 | 685 | } |
| 886 | 686 | |
| 887 | 687 | static WRITE16_HANDLER( datsu_page1_w ) |
| 888 | 688 | { |
| 889 | COMBINE_DATA(&datsu_page[1]); | |
| 890 | datsu_set_pages(); | |
| 689 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 690 | ||
| 691 | COMBINE_DATA(&state->datsu_page[1]); | |
| 692 | datsu_set_pages(space->machine); | |
| 891 | 693 | } |
| 892 | 694 | |
| 893 | 695 | static WRITE16_HANDLER( datsu_page2_w ) |
| 894 | 696 | { |
| 895 | COMBINE_DATA(&datsu_page[2]); | |
| 896 | datsu_set_pages(); | |
| 697 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 698 | ||
| 699 | COMBINE_DATA(&state->datsu_page[2]); | |
| 700 | datsu_set_pages(space->machine); | |
| 897 | 701 | } |
| 898 | 702 | |
| 899 | 703 | static WRITE16_HANDLER( datsu_page3_w ) |
| 900 | 704 | { |
| 901 | COMBINE_DATA(&datsu_page[3]); | |
| 902 | datsu_set_pages(); | |
| 705 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 706 | ||
| 707 | COMBINE_DATA(&state->datsu_page[3]); | |
| 708 | datsu_set_pages(space->machine); | |
| 903 | 709 | } |
| 904 | 710 | |
| 905 | static ADDRESS_MAP_START( bayroute | |
| 711 | static ADDRESS_MAP_START( bayroute | |
| 906 | 712 | AM_RANGE(0x000000, 0x0bffff) AM_ROM |
| 907 | 713 | AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram |
| 908 | 714 | AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&segaic16_spriteram_0) |
| 909 | AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 910 | AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 911 | AM_RANGE(0x718000, 0x718001) AM_WRITE(sys16bootleg_fgscrolly_w) | |
| 912 | AM_RANGE(0x718008, 0x718009) AM_WRITE(sys16bootleg_fgscrollx_bank_w) // and tile bank | |
| 913 | AM_RANGE(0x718010, 0x718011) AM_WRITE(sys16bootleg_bgscrolly_w) | |
| 914 | AM_RANGE(0x718018, 0x718019) AM_WRITE(sys16bootleg_bgscrollx_w) | |
| 715 | AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 716 | AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 717 | AM_RANGE(0x718000, 0x718001) AM_WRITE(s16bl_fgscrolly_w) | |
| 718 | AM_RANGE(0x718008, 0x718009) AM_WRITE(s16bl_fgscrollx_bank_w) // and tile bank | |
| 719 | AM_RANGE(0x718010, 0x718011) AM_WRITE(s16bl_bgscrolly_w) | |
| 720 | AM_RANGE(0x718018, 0x718019) AM_WRITE(s16bl_bgscrollx_w) | |
| 915 | 721 | AM_RANGE(0x718020, 0x718021) AM_WRITE(datsu_page0_w) |
| 916 | 722 | AM_RANGE(0x718022, 0x718023) AM_WRITE(datsu_page1_w) |
| 917 | 723 | AM_RANGE(0x718024, 0x718025) AM_WRITE(datsu_page2_w) |
| 918 | 724 | AM_RANGE(0x718026, 0x718027) AM_WRITE(datsu_page3_w) |
| 919 | 725 | |
| 920 | AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( | |
| 726 | AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( | |
| 921 | 727 | AM_RANGE(0x900000, 0x900001) AM_READ_PORT("DSW1") |
| 922 | 728 | AM_RANGE(0x900002, 0x900003) AM_READ_PORT("DSW2") |
| 923 | 729 | AM_RANGE(0x900006, 0x900007) AM_WRITE(sound_command_w) |
| r7356 | r7357 | |
| 929 | 735 | static ADDRESS_MAP_START( dduxbl_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 930 | 736 | AM_RANGE(0x000000, 0x0bffff) AM_ROM |
| 931 | 737 | AM_RANGE(0x3f0000, 0x3fffff) AM_WRITE(sys16_tilebank_w) |
| 932 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 933 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 738 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 739 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 934 | 740 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) |
| 935 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( | |
| 741 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( | |
| 936 | 742 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) |
| 937 | 743 | AM_RANGE(0xc40006, 0xc40007) AM_WRITE(sound_command_w) |
| 938 | 744 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| r7356 | r7357 | |
| 941 | 747 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") |
| 942 | 748 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") |
| 943 | 749 | |
| 944 | AM_RANGE(0xC46000, 0xC46001) AM_WRITE(sys16bootleg_fgscrolly_w) | |
| 945 | AM_RANGE(0xC46008, 0xC46009) AM_WRITE(sys16bootleg_fgscrollx_w) | |
| 946 | AM_RANGE(0xC46010, 0xC46011) AM_WRITE(sys16bootleg_bgscrolly_w) | |
| 947 | AM_RANGE(0xC46018, 0xC46019) AM_WRITE(sys16bootleg_bgscrollx_w) | |
| 750 | AM_RANGE(0xC46000, 0xC46001) AM_WRITE(s16bl_fgscrolly_w) | |
| 751 | AM_RANGE(0xC46008, 0xC46009) AM_WRITE(s16bl_fgscrollx_w) | |
| 752 | AM_RANGE(0xC46010, 0xC46011) AM_WRITE(s16bl_bgscrolly_w) | |
| 753 | AM_RANGE(0xC46018, 0xC46019) AM_WRITE(s16bl_bgscrollx_w) | |
| 948 | 754 | AM_RANGE(0xC46020, 0xC46021) AM_WRITE(datsu_page0_w) |
| 949 | 755 | AM_RANGE(0xC46022, 0xC46023) AM_WRITE(datsu_page1_w) |
| 950 | 756 | AM_RANGE(0xC46024, 0xC46025) AM_WRITE(datsu_page2_w) |
| r7356 | r7357 | |
| 953 | 759 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram |
| 954 | 760 | ADDRESS_MAP_END |
| 955 | 761 | |
| 956 | static UINT16* goldnax_b2_fgpage; | |
| 957 | static UINT16* goldnax_b2_bgpage; | |
| 958 | ||
| 959 | static WRITE16_HANDLER( goldnax_b2_fgscrollx_w ) | |
| 762 | static WRITE16_HANDLER( goldnaxeb2_fgscrollx_w ) | |
| 960 | 763 | { |
| 764 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 961 | 765 | int scroll = data & 0x1ff; |
| 962 | int bank = (data&0xc000)>>14; | |
| 963 | set_tile_bank( bank ); | |
| 964 | scroll +=0x1f6; | |
| 766 | int bank = (data & 0xc000) >> 14; | |
| 767 | ||
| 768 | set_tile_bank(space->machine, bank); | |
| 769 | scroll += 0x1f6; | |
| 965 | 770 | scroll &= 0x3ff; |
| 966 | s | |
| 771 | state->fg_scrollx = -scroll; | |
| 967 | 772 | } |
| 968 | 773 | |
| 969 | static WRITE16_HANDLER( goldnax | |
| 774 | static WRITE16_HANDLER( goldnaxeb2_bgscrollx_w ) | |
| 970 | 775 | { |
| 776 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 971 | 777 | int scroll = data & 0x1ff; |
| 972 | scroll +=0x1f4; | |
| 778 | ||
| 779 | scroll += 0x1f4; | |
| 973 | 780 | scroll &= 0x3ff; |
| 974 | s | |
| 781 | state->bg_scrollx = -scroll; | |
| 975 | 782 | } |
| 976 | 783 | |
| 977 | 784 | |
| 978 | static WRITE16_HANDLER( goldnax | |
| 785 | static WRITE16_HANDLER( goldnaxeb2_fgscrolly_w ) | |
| 979 | 786 | { |
| 787 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 980 | 788 | int scroll = data & 0xff; |
| 789 | ||
| 981 | 790 | scroll += 0x1; |
| 982 | s | |
| 791 | state->fg_scrolly = scroll; | |
| 983 | 792 | } |
| 984 | 793 | |
| 985 | static WRITE16_HANDLER( goldnax | |
| 794 | static WRITE16_HANDLER( goldnaxeb2_bgscrolly_w ) | |
| 986 | 795 | { |
| 796 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 987 | 797 | int scroll = data & 0xff; |
| 988 | scroll += 0x1; | |
| 989 | 798 | |
| 990 | sys16_bg_scrolly = scroll; | |
| 799 | scroll += 0x1; | |
| 800 | state->bg_scrolly = scroll; | |
| 991 | 801 | } |
| 992 | 802 | |
| 993 | static WRITE16_HANDLER( goldnax | |
| 803 | static WRITE16_HANDLER( goldnaxeb2_fgpage_w ) | |
| 994 | 804 | { |
| 805 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 995 | 806 | UINT16 page; |
| 996 | COMBINE_DATA(&goldnax_b2_fgpage[offset]); | |
| 997 | 807 | |
| 998 | page = ((goldnax_b2_fgpage[1] & 0xf) << 0) | | |
| 999 | ((goldnax_b2_fgpage[0] & 0xf) << 4) | | |
| 1000 | ((goldnax_b2_fgpage[3] & 0xf) << 8) | | |
| 1001 | ((goldnax_b2_fgpage[2] & 0xf) << 12); | |
| 808 | COMBINE_DATA(&state->goldnaxeb2_fgpage[offset]); | |
| 1002 | 809 | |
| 1003 | set_fg_page( page^0xffff ); | |
| 810 | page = ((state->goldnaxeb2_fgpage[1] & 0xf) << 0) | | |
| 811 | ((state->goldnaxeb2_fgpage[0] & 0xf) << 4) | | |
| 812 | ((state->goldnaxeb2_fgpage[3] & 0xf) << 8) | | |
| 813 | ((state->goldnaxeb2_fgpage[2] & 0xf) << 12); | |
| 1004 | 814 | |
| 815 | set_fg_page(space->machine, page ^ 0xffff); | |
| 816 | ||
| 1005 | 817 | } |
| 1006 | 818 | |
| 1007 | static WRITE16_HANDLER( goldnax | |
| 819 | static WRITE16_HANDLER( goldnaxeb2_bgpage_w ) | |
| 1008 | 820 | { |
| 821 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1009 | 822 | UINT16 page; |
| 1010 | COMBINE_DATA(&goldnax_b2_bgpage[offset]); | |
| 1011 | 823 | |
| 1012 | page = ((goldnax_b2_bgpage[1] & 0xf) << 0) | | |
| 1013 | ((goldnax_b2_bgpage[0] & 0xf) << 4) | | |
| 1014 | ((goldnax_b2_bgpage[3] & 0xf) << 8) | | |
| 1015 | ((goldnax_b2_bgpage[2] & 0xf) << 12); | |
| 824 | COMBINE_DATA(&state->goldnaxeb2_bgpage[offset]); | |
| 1016 | 825 | |
| 1017 | set_bg_page( page^0xffff ); | |
| 826 | page = ((state->goldnaxeb2_bgpage[1] & 0xf) << 0) | | |
| 827 | ((state->goldnaxeb2_bgpage[0] & 0xf) << 4) | | |
| 828 | ((state->goldnaxeb2_bgpage[3] & 0xf) << 8) | | |
| 829 | ((state->goldnaxeb2_bgpage[2] & 0xf) << 12); | |
| 830 | ||
| 831 | set_bg_page(space->machine, page ^ 0xffff); | |
| 1018 | 832 | } |
| 1019 | 833 | |
| 1020 | static ADDRESS_MAP_START( goldnaxe | |
| 834 | static ADDRESS_MAP_START( goldnaxe | |
| 1021 | 835 | AM_RANGE(0x000000, 0x0bffff) AM_ROM |
| 1022 | AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 1023 | AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 1024 | AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 836 | AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 837 | AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 838 | AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 1025 | 839 | AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&segaic16_spriteram_0) |
| 1026 | 840 | AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("DSW2") AM_WRITENOP |
| 1027 | 841 | AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1") |
| r7356 | r7357 | |
| 1029 | 843 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| 1030 | 844 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") |
| 1031 | 845 | AM_RANGE(0xc43000, 0xc43001) AM_WRITENOP |
| 1032 | AM_RANGE(0xc44000, 0xc44001) AM_WRITE(goldnax_b2_fgscrolly_w) | |
| 1033 | AM_RANGE(0xc44008, 0xc44009) AM_WRITE(goldnax_b2_fgscrollx_w) // and tile bank | |
| 1034 | AM_RANGE(0xc44010, 0xc44011) AM_WRITE(goldnax_b2_bgscrolly_w) | |
| 1035 | AM_RANGE(0xc44018, 0xc44019) AM_WRITE(goldnax_b2_bgscrollx_w) | |
| 1036 | AM_RANGE(0xc44020, 0xc44027) AM_WRITE(goldnax_b2_bgpage_w) AM_BASE(&goldnax_b2_bgpage) | |
| 1037 | AM_RANGE(0xc44060, 0xc44067) AM_WRITE(goldnax_b2_fgpage_w) AM_BASE(&goldnax_b2_fgpage) | |
| 846 | AM_RANGE(0xc44000, 0xc44001) AM_WRITE(goldnaxeb2_fgscrolly_w) | |
| 847 | AM_RANGE(0xc44008, 0xc44009) AM_WRITE(goldnaxeb2_fgscrollx_w) // and tile bank | |
| 848 | AM_RANGE(0xc44010, 0xc44011) AM_WRITE(goldnaxeb2_bgscrolly_w) | |
| 849 | AM_RANGE(0xc44018, 0xc44019) AM_WRITE(goldnaxeb2_bgscrollx_w) | |
| 850 | AM_RANGE(0xc44020, 0xc44027) AM_WRITE(goldnaxeb2_bgpage_w) AM_BASE_MEMBER(segas1x_bootleg_state, goldnaxeb2_bgpage) | |
| 851 | AM_RANGE(0xc44060, 0xc44067) AM_WRITE(goldnaxeb2_fgpage_w) AM_BASE_MEMBER(segas1x_bootleg_state, goldnaxeb2_fgpage) | |
| 1038 | 852 | AM_RANGE(0xc46000, 0xc46001) AM_WRITENOP |
| 1039 | 853 | AM_RANGE(0xc43034, 0xc43035) AM_WRITENOP |
| 1040 | 854 | AM_RANGE(0xfe0006, 0xfe0007) AM_WRITENOP |
| r7356 | r7357 | |
| 1045 | 859 | /***************************************************************************/ |
| 1046 | 860 | |
| 1047 | 861 | |
| 1048 | static MACHINE_RESET( goldnaxe ) | |
| 1049 | { | |
| 1050 | static const int bank[16] = { | |
| 1051 | 0,1,4,5, | |
| 1052 | 8,9,0,0, | |
| 1053 | 2,3,6,7, | |
| 1054 | 10,11,0,0 | |
| 1055 | }; | |
| 862 | static ADDRESS_MAP_START( fpointbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 863 | AM_RANGE(0x000000, 0x0bffff) AM_ROM | |
| 1056 | 864 | |
| 1057 | sys16_obj_bank = bank; | |
| 1058 | } | |
| 865 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 866 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 867 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 1059 | 868 | |
| 1060 | static DRIVER_INIT( goldnab2 ) | |
| 1061 | { | |
| 1062 | MACHINE_RESET_CALL(sys16_onetime); | |
| 1063 | } | |
| 869 | AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_w) | |
| 870 | AM_RANGE(0x601000, 0x601001) AM_READ_PORT("SERVICE") | |
| 871 | AM_RANGE(0x601002, 0x601003) AM_READ_PORT("P1") | |
| 872 | AM_RANGE(0x601004, 0x601005) AM_READ_PORT("P2") | |
| 873 | AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2") | |
| 874 | AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1") | |
| 1064 | 875 | |
| 1065 | /***************************************************************************/ | |
| 876 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 877 | AM_RANGE(0x843000, 0x843001) AM_WRITENOP | |
| 1066 | 878 | |
| 1067 | static INPUT_PORTS_START( goldnaxe ) | |
| 1068 | PORT_INCLUDE( sys16_common ) | |
| 879 | AM_RANGE(0xC46000, 0xC46001) AM_WRITE(s16bl_fgscrolly_w) | |
| 880 | AM_RANGE(0xC46008, 0xC46009) AM_WRITE(s16bl_fgscrollx_w) | |
| 881 | AM_RANGE(0xC46010, 0xC46011) AM_WRITE(s16bl_bgscrolly_w) | |
| 882 | AM_RANGE(0xC46018, 0xC46019) AM_WRITE(s16bl_bgscrollx_w) | |
| 1069 | 883 | |
| 1070 | PORT_START("DSW2") | |
| 1071 | PORT_DIPNAME( 0x01, 0x01, "Credits Needed" ) PORT_DIPLOCATION("SW2:1") | |
| 1072 | PORT_DIPSETTING( 0x01, "1 Credit To Start" ) | |
| 1073 | PORT_DIPSETTING( 0x00, "2 Credits To Start" ) | |
| 1074 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 1075 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1076 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1077 | PORT_DIPNAME( 0x3c, 0x3c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4,5,6") /* Definition according to manual */ | |
| 1078 | PORT_DIPSETTING( 0x00, "Special" ) | |
| 1079 | PORT_DIPSETTING( 0x14, DEF_STR( Easiest ) ) | |
| 1080 | PORT_DIPSETTING( 0x1c, DEF_STR( Easier ) ) | |
| 1081 | PORT_DIPSETTING( 0x34, DEF_STR( Easy ) ) | |
| 1082 | PORT_DIPSETTING( 0x3c, DEF_STR( Normal ) ) | |
| 1083 | PORT_DIPSETTING( 0x38, DEF_STR( Hard ) ) | |
| 1084 | PORT_DIPSETTING( 0x2c, DEF_STR( Harder ) ) | |
| 1085 | PORT_DIPSETTING( 0x28, DEF_STR( Hardest ) ) | |
| 1086 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) /* Listed as "Unused" */ | |
| 1087 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Listed as "Unused" */ | |
| 884 | AM_RANGE(0xC46020, 0xC46021) AM_WRITE(datsu_page0_w) | |
| 885 | AM_RANGE(0xc46022, 0xc46023) AM_WRITE(datsu_page1_w) | |
| 886 | AM_RANGE(0xC46024, 0xC46025) AM_WRITE(datsu_page2_w) | |
| 887 | AM_RANGE(0xC46026, 0xC46027) AM_WRITE(datsu_page3_w) | |
| 1088 | 888 | |
| 1089 | /* PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 1090 | PORT_DIPSETTING( 0x08, "1" ) | |
| 1091 | PORT_DIPSETTING( 0x0c, "2" ) | |
| 1092 | PORT_DIPSETTING( 0x04, "3" ) | |
| 1093 | PORT_DIPSETTING( 0x00, "5" ) | |
| 1094 | PORT_DIPNAME( 0x30, 0x30, "Energy Meter" ) PORT_DIPLOCATION("SW2:5,6") | |
| 1095 | PORT_DIPSETTING( 0x20, "2" ) | |
| 1096 | PORT_DIPSETTING( 0x30, "3" ) | |
| 1097 | PORT_DIPSETTING( 0x10, "4" ) | |
| 1098 | PORT_DIPSETTING( 0x00, "5" ) | |
| 1099 | */ | |
| 1100 | INPUT_PORTS_END | |
| 889 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 890 | ADDRESS_MAP_END | |
| 1101 | 891 | |
| 1102 | /***************************************************************************/ | |
| 1103 | 892 | |
| 1104 | static MACHINE_DRIVER_START( sys16_datsu_sound_cfg ) | |
| 1105 | /* TODO: | |
| 1106 | - other games might use this sound configuration | |
| 1107 | - speaker is likely to be mono for the bootlegs, not stereo. | |
| 1108 | - check msm5205 frequency. | |
| 1109 | */ | |
| 1110 | MDRV_CPU_ADD("soundcpu",Z80, 4000000) | |
| 1111 | MDRV_CPU_PROGRAM_MAP(tturfbl_sound_map) | |
| 1112 | MDRV_CPU_IO_MAP(tturfbl_sound_io_map) | |
| 893 | static WRITE16_HANDLER( eswat_tilebank0_w ) | |
| 894 | { | |
| 895 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1113 | 896 | |
| 1114 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") | |
| 897 | if (ACCESSING_BITS_0_7) | |
| 898 | { | |
| 899 | state->eswat_tilebank0 = data & 0xff; | |
| 900 | } | |
| 901 | } | |
| 1115 | 902 | |
| 1116 | MDRV_SOUND_ADD("ymsnd", YM2151, 4000000) | |
| 1117 | MDRV_SOUND_ROUTE(0, "lspeaker", 0.32) | |
| 1118 | MDRV_SOUND_ROUTE(1, "rspeaker", 0.32) | |
| 903 | static ADDRESS_MAP_START( eswatbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 904 | AM_RANGE(0x000000, 0x07ffff) AM_ROM | |
| 1119 | 905 | |
| 1120 | MDRV_SOUND_ADD("5205", MSM5205, 220000) | |
| 1121 | MDRV_SOUND_CONFIG(tturfbl_msm5205_interface) | |
| 1122 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.80) | |
| 1123 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80) | |
| 1124 | MACHINE_DRIVER_END | |
| 906 | AM_RANGE(0x3e2000, 0x3e2001) AM_WRITE(eswat_tilebank0_w) // external tile bank ( > 0x4000 tiles ) | |
| 1125 | 907 | |
| 1126 | static MACHINE_DRIVER_START( goldnaxe_b1 ) | |
| 908 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 909 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 910 | AM_RANGE(0x418000, 0x418001) AM_WRITE(s16bl_bgscrolly_w) | |
| 911 | AM_RANGE(0x418008, 0x418009) AM_WRITE(s16bl_bgscrollx_w) // and tile bank | |
| 912 | AM_RANGE(0x418010, 0x418011) AM_WRITE(s16bl_fgscrolly_w) | |
| 913 | AM_RANGE(0x418018, 0x418019) AM_WRITE(s16bl_fgscrollx_bank_w) | |
| 914 | AM_RANGE(0x418020, 0x418021) AM_WRITE(s16bl_bgpage_w) | |
| 915 | AM_RANGE(0x418028, 0x418029) AM_WRITE(s16bl_fgpage_w) | |
| 1127 | 916 | |
| 1128 | /* basic machine hardware */ | |
| 1129 | MDRV_CPU_ADD("maincpu", M68000, 10000000) | |
| 1130 | MDRV_CPU_PROGRAM_MAP(goldnaxe_b1_map) | |
| 1131 | MDRV_CPU_VBLANK_INT("screen", sys16_interrupt) | |
| 917 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 918 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 919 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) | |
| 920 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 921 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") | |
| 922 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 923 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") | |
| 924 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") | |
| 925 | AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w) | |
| 926 | AM_RANGE(0xc80000, 0xc80001) AM_WRITENOP | |
| 927 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 928 | ADDRESS_MAP_END | |
| 1132 | 929 | |
| 1133 | /* video hardware */ | |
| 1134 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 1135 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1136 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 1137 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1138 | MDRV_SCREEN_SIZE(40*8, 28*8) | |
| 1139 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) | |
| 930 | /***************************************************************************/ | |
| 1140 | 931 | |
| 1141 | MDRV_GFXDECODE(sys16) | |
| 1142 | MDRV_PALETTE_LENGTH(2048*ShadowColorsMultiplier) | |
| 932 | static ADDRESS_MAP_START( tetrisbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 933 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 934 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 935 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 1143 | 936 | |
| 1144 | MDRV_PALETTE_INIT( all_black ) | |
| 1145 | MDRV_VIDEO_START(system16) | |
| 1146 | MDRV_VIDEO_UPDATE(system16) | |
| 937 | AM_RANGE(0x418000, 0x418001) AM_WRITE(s16bl_fgscrolly_w) | |
| 938 | AM_RANGE(0x418008, 0x418009) AM_WRITE(s16bl_fgscrollx_w) | |
| 939 | AM_RANGE(0x418010, 0x418011) AM_WRITE(s16bl_bgscrolly_w) | |
| 940 | AM_RANGE(0x418018, 0x418019) AM_WRITE(s16bl_bgscrollx_w) | |
| 941 | AM_RANGE(0x418020, 0x418021) AM_WRITE(s16bl_fgpage_w) | |
| 942 | AM_RANGE(0x418028, 0x418029) AM_WRITE(s16bl_bgpage_w) | |
| 1147 | 943 | |
| 1148 | MDRV_MACHINE_RESET(goldnaxe) | |
| 1149 | MACHINE_DRIVER_END | |
| 944 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 945 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 946 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) | |
| 947 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 948 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 949 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") | |
| 950 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") | |
| 951 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") | |
| 952 | AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w) | |
| 953 | AM_RANGE(0xc43034, 0xc43035) AM_WRITENOP | |
| 954 | AM_RANGE(0xc80000, 0xc80001) AM_NOP | |
| 955 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 956 | ADDRESS_MAP_END | |
| 1150 | 957 | |
| 1151 | 958 | |
| 1152 | static MACHINE_DRIVER_START( goldnaxe_b2 ) | |
| 1153 | /* basic machine hardware */ | |
| 1154 | MDRV_IMPORT_FROM(goldnaxe_b1) | |
| 1155 | MDRV_CPU_MODIFY("maincpu") | |
| 1156 | MDRV_CPU_PROGRAM_MAP(goldnaxe_b2_map) | |
| 1157 | MACHINE_DRIVER_END | |
| 959 | static READ16_HANDLER( beautyb_unkx_r ) | |
| 960 | { | |
| 961 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1158 | 962 | |
| 1159 | static MACHINE_DRIVER_START( bayrouteb1 ) | |
| 1160 | /* basic machine hardware */ | |
| 1161 | MDRV_IMPORT_FROM(goldnaxe_b1) | |
| 1162 | MDRV_CPU_MODIFY("maincpu") | |
| 1163 | MDRV_CPU_PROGRAM_MAP(bayroute_b1_map) | |
| 1164 | MACHINE_DRIVER_END | |
| 963 | state->beautyb_unkx++; | |
| 964 | state->beautyb_unkx &= 0x7f; | |
| 965 | return state->beautyb_unkx; | |
| 966 | } | |
| 1165 | 967 | |
| 1166 | static MACHINE_DRIVER_START( bayrouteb2 ) | |
| 1167 | /* basic machine hardware */ | |
| 1168 | MDRV_IMPORT_FROM(goldnaxe_b1) | |
| 1169 | MDRV_CPU_MODIFY("maincpu") | |
| 1170 | MDRV_CPU_PROGRAM_MAP(bayroute_b2_map) | |
| 968 | static ADDRESS_MAP_START( beautyb_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 969 | AM_RANGE(0x000000, 0x00ffff) AM_ROM AM_WRITENOP | |
| 970 | AM_RANGE(0x010000, 0x03ffff) AM_WRITENOP | |
| 1171 | 971 | |
| 1172 | MDRV_IMPORT_FROM(sys16_datsu_sound_cfg) | |
| 1173 | MACHINE_DRIVER_END | |
| 972 | AM_RANGE(0x0280D6, 0x0280D7) AM_READ(beautyb_unkx_r) | |
| 973 | AM_RANGE(0x0280D8, 0x0280D9) AM_READ(beautyb_unkx_r) | |
| 1174 | 974 | |
| 1175 | static MACHINE_DRIVER_START( dduxbl ) | |
| 975 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 976 | AM_RANGE(0x410000, 0x413fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 1176 | 977 | |
| 1177 | /* basic machine hardware */ | |
| 1178 | MDRV_IMPORT_FROM(system16) | |
| 1179 | MDRV_CPU_MODIFY("maincpu") | |
| 1180 | MDRV_CPU_PROGRAM_MAP(dduxbl_map) | |
| 1181 | MACHINE_DRIVER_END | |
| 978 | AM_RANGE(0x418000, 0x418001) AM_WRITE(s16bl_bgscrolly_w) | |
| 979 | AM_RANGE(0x418008, 0x418009) AM_WRITE(s16bl_bgscrollx_w) | |
| 980 | AM_RANGE(0x418010, 0x418011) AM_WRITE(s16bl_fgscrolly_w) | |
| 981 | AM_RANGE(0x418018, 0x418019) AM_WRITE(s16bl_fgscrollx_w) | |
| 982 | AM_RANGE(0x418020, 0x418021) AM_WRITE(s16bl_bgpage_w) | |
| 983 | AM_RANGE(0x418028, 0x418029) AM_WRITE(s16bl_fgpage_w) | |
| 1182 | 984 | |
| 985 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 986 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 1183 | 987 | |
| 1184 | static ADDRESS_MAP_START( fpointbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1185 | AM_RANGE(0x000000, 0x0bffff) AM_ROM | |
| 988 | AM_RANGE(0xC41000, 0xC41001) AM_READ(beautyb_unkx_r ) | |
| 989 | AM_RANGE(0xC41002, 0xC41003) AM_READ(beautyb_unkx_r ) | |
| 1186 | 990 | |
| 1187 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 1188 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 1189 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 991 | AM_RANGE(0xc40000, 0xc40001) AM_WRITENOP | |
| 992 | AM_RANGE(0xc80000, 0xc80001) AM_WRITENOP | |
| 1190 | 993 | |
| 994 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 995 | ADDRESS_MAP_END | |
| 996 | ||
| 997 | /***************************************************************************/ | |
| 998 | ||
| 999 | static ADDRESS_MAP_START( tturfbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1000 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 1001 | AM_RANGE(0x200000, 0x203fff) AM_RAM // work ram | |
| 1002 | AM_RANGE(0x300000, 0x300fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 1003 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 1004 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 1005 | AM_RANGE(0x500000, 0x500fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 1006 | AM_RANGE(0x600000, 0x600001) AM_WRITE(sys16_coinctrl_w) | |
| 1007 | AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2") | |
| 1008 | AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1") | |
| 1191 | 1009 | AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_w) |
| 1192 | 1010 | AM_RANGE(0x601000, 0x601001) AM_READ_PORT("SERVICE") |
| 1193 | 1011 | AM_RANGE(0x601002, 0x601003) AM_READ_PORT("P1") |
| 1194 | 1012 | AM_RANGE(0x601004, 0x601005) AM_READ_PORT("P2") |
| 1195 | AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2") | |
| 1196 | AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1") | |
| 1013 | AM_RANGE(0x602000, 0x602001) AM_READ_PORT("DSW2") | |
| 1014 | AM_RANGE(0x602002, 0x602003) AM_READ_PORT("DSW1") | |
| 1015 | AM_RANGE(0xc44000, 0xc44001) AM_WRITENOP | |
| 1197 | 1016 | |
| 1198 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 1199 | AM_RANGE(0x843000, 0x843001) AM_WRITENOP | |
| 1200 | ||
| 1201 | AM_RANGE(0xC46000, 0xC46001) AM_WRITE(sys16bootleg_fgscrolly_w) | |
| 1202 | AM_RANGE(0xC46008, 0xC46009) AM_WRITE(sys16bootleg_fgscrollx_w) | |
| 1203 | AM_RANGE(0xC46010, 0xC46011) AM_WRITE(sys16bootleg_bgscrolly_w) | |
| 1204 | AM_RANGE(0xC46018, 0xC46019) AM_WRITE(sys16bootleg_bgscrollx_w) | |
| 1205 | ||
| 1017 | AM_RANGE(0xC46000, 0xC46001) AM_WRITE(s16bl_fgscrolly_w) | |
| 1018 | AM_RANGE(0xC46008, 0xC46009) AM_WRITE(s16bl_fgscrollx_w) | |
| 1019 | AM_RANGE(0xC46010, 0xC46011) AM_WRITE(s16bl_bgscrolly_w) | |
| 1020 | AM_RANGE(0xC46018, 0xC46019) AM_WRITE(s16bl_bgscrollx_w) | |
| 1206 | 1021 | AM_RANGE(0xC46020, 0xC46021) AM_WRITE(datsu_page0_w) |
| 1207 | 1022 | AM_RANGE(0xc46022, 0xc46023) AM_WRITE(datsu_page1_w) |
| 1208 | 1023 | AM_RANGE(0xC46024, 0xC46025) AM_WRITE(datsu_page2_w) |
| 1209 | 1024 | AM_RANGE(0xC46026, 0xC46027) AM_WRITE(datsu_page3_w) |
| 1210 | ||
| 1211 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 1212 | 1025 | ADDRESS_MAP_END |
| 1213 | 1026 | |
| 1027 | /***************************************************************************/ | |
| 1214 | 1028 | |
| 1215 | static | |
| 1029 | static WR | |
| 1216 | 1030 | { |
| 1031 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1032 | ||
| 1033 | if (ACCESSING_BITS_0_7) | |
| 1034 | { | |
| 1035 | state->refreshenable = data & 0x02; | |
| 1036 | } | |
| 1217 | 1037 | } |
| 1218 | 1038 | |
| 1219 | static | |
| 1039 | static WRITE16_HANDLER( sys18_tilebank_w ) | |
| 1220 | 1040 | { |
| 1221 | MACHINE_RESET_CALL(sys16_onetime); | |
| 1222 | //sys16_video_config(fpoint_update_proc, -0xb8, NULL); | |
| 1041 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1042 | ||
| 1043 | if (ACCESSING_BITS_0_7) | |
| 1044 | { | |
| 1045 | state->tile_bank0 = (data >> 0) & 0x0f; | |
| 1046 | state->tile_bank1 = (data >> 4) & 0x0f; | |
| 1047 | } | |
| 1223 | 1048 | } |
| 1224 | 1049 | |
| 1050 | static READ8_HANDLER( system18_bank_r ) | |
| 1051 | { | |
| 1052 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1225 | 1053 | |
| 1054 | if (state->sound_bank != NULL) | |
| 1055 | return state->sound_bank[offset]; | |
| 1226 | 1056 | |
| 1227 | static MACHINE_DRIVER_START( fpointbl ) | |
| 1057 | return 0xff; | |
| 1058 | } | |
| 1228 | 1059 | |
| 1229 | /* basic machine hardware */ | |
| 1230 | MDRV_IMPORT_FROM(system16) | |
| 1231 | MDRV_CPU_MODIFY("maincpu") | |
| 1232 | MDRV_CPU_PROGRAM_MAP(fpointbl_map) | |
| 1060 | static ADDRESS_MAP_START( sound_18_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1061 | AM_RANGE(0x0000, 0x9fff) AM_ROM | |
| 1062 | AM_RANGE(0xa000, 0xbfff) AM_READ(system18_bank_r) | |
| 1063 | /**** D/A register ****/ | |
| 1064 | AM_RANGE(0xc000, 0xc008) AM_DEVWRITE("5c68", rf5c68_w) | |
| 1065 | AM_RANGE(0xd000, 0xdfff) AM_DEVREADWRITE("5c68", rf5c68_mem_r, rf5c68_mem_w) | |
| 1066 | AM_RANGE(0xe000, 0xffff) AM_RAM //?? | |
| 1067 | ADDRESS_MAP_END | |
| 1233 | 1068 | |
| 1234 | MDRV_CPU_MODIFY("soundcpu") | |
| 1235 | MDRV_CPU_PROGRAM_MAP(fpointbl_sound_map) | |
| 1236 | 1069 | |
| 1237 | MDRV_MACHINE_RESET(fpointbl) | |
| 1238 | MACHINE_DRIVER_END | |
| 1070 | static WRITE8_HANDLER( sys18_soundbank_w ) | |
| 1071 | { | |
| 1072 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1073 | UINT8 *mem = memory_region(space->machine, "soundcpu"); | |
| 1074 | int rom = (data >> 6) & 3; | |
| 1075 | int bank = (data & 0x3f); | |
| 1076 | int mask = state->sound_info[rom * 2 + 0]; | |
| 1077 | int offs = state->sound_info[rom * 2 + 1]; | |
| 1239 | 1078 | |
| 1079 | if (mask) | |
| 1080 | state->sound_bank = &mem[0x10000 + offs + ((bank & mask) << 13)]; | |
| 1081 | else | |
| 1082 | state->sound_bank = NULL; | |
| 1083 | } | |
| 1240 | 1084 | |
| 1085 | static ADDRESS_MAP_START( sound_18_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 1086 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 1087 | AM_RANGE(0x80, 0x83) AM_DEVREADWRITE("3438.0", ym3438_r, ym3438_w) | |
| 1088 | AM_RANGE(0x90, 0x93) AM_DEVREADWRITE("3438.1", ym3438_r, ym3438_w) | |
| 1089 | AM_RANGE(0xa0, 0xa0) AM_WRITE(sys18_soundbank_w) | |
| 1090 | AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) | |
| 1091 | ADDRESS_MAP_END | |
| 1241 | 1092 | |
| 1242 | static ADDRESS_MAP_START( eswatbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1243 | AM_RANGE(0x000000, 0x07ffff) AM_ROM | |
| 1244 | 1093 | |
| 1245 | ||
| 1094 | ||
| 1246 | 1095 | |
| 1247 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 1248 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 1249 | AM_RANGE(0x418000, 0x418001) AM_WRITE(sys16bootleg_bgscrolly_w) | |
| 1250 | AM_RANGE(0x418008, 0x418009) AM_WRITE(sys16bootleg_bgscrollx_w) // and tile bank | |
| 1251 | AM_RANGE(0x418010, 0x418011) AM_WRITE(sys16bootleg_fgscrolly_w) | |
| 1252 | AM_RANGE(0x418018, 0x418019) AM_WRITE(sys16bootleg_fgscrollx_bank_w) | |
| 1253 | AM_RANGE(0x418020, 0x418021) AM_WRITE(sys16bootleg_bgpage_w) | |
| 1254 | AM_RANGE(0x418028, 0x418029) AM_WRITE(sys16bootleg_fgpage_w) | |
| 1096 | Shadow Dancer (Bootleg) | |
| 1255 | 1097 | |
| 1256 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 1257 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 1258 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) | |
| 1259 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 1260 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") | |
| 1261 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 1262 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") | |
| 1263 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") | |
| 1264 | AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w) | |
| 1265 | AM_RANGE(0xc80000, 0xc80001) AM_WRITENOP | |
| 1266 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 1267 | ADDRESS_MAP_END | |
| 1098 | This seems to be a modified version of shdancer. It has no warning screen, displays English text during the | |
| 1099 | attract sequence, and has a 2P input test. The 'Sega' copyright text was changed to 'Datsu', and their | |
| 1100 | logo is missing. | |
| 1268 | 1101 | |
| 1102 | Access to the configuration registers, I/O chip, and VDP are done even though it's likely none of this hardware | |
| 1103 | exists in the bootleg. For example: | |
| 1269 | 1104 | |
| 1270 | static MACHINE_DRIVER_START( eswatbl ) | |
| 1105 | - Most I/O port access has been redirected to new addresses. | |
| 1106 | - Z80 sound command has been redirected to a new address. | |
| 1107 | - The tilebank routine which saves the bank value in VDP VRAM has a form of protection has been modified to store | |
| 1108 | the tilebank value directly to $E4001F. | |
| 1109 | - Implementing screen blanking control via $E4001D leaves the screen blanked at the wrong times (after coin-up). | |
| 1271 | 1110 | |
| 1272 | /* basic machine hardware */ | |
| 1273 | MDRV_IMPORT_FROM(system16_7759) | |
| 1274 | MDRV_CPU_MODIFY("maincpu") | |
| 1275 | MDRV_CPU_PROGRAM_MAP(eswatbl_map) | |
| 1111 | This is probably due to unmodified parts of the original code accessing these components, which would be ignored | |
| 1112 | on the bootleg hardware. Both the I/O chip and VDP are supported in this driver, just as I don't know for certain | |
| 1113 | how much of either are present on the real board. | |
| 1276 | 1114 | |
| 1277 | MDRV_MACHINE_RESET(eswatbl) | |
| 1278 | MACHINE_DRIVER_END | |
| 1115 | Bootleg specific addresses: | |
| 1279 | 1116 | |
| 1117 | C40001 = DIP switch #1 | |
| 1118 | C40003 = DIP switch #2 | |
| 1119 | C40007 = Z80 sound command | |
| 1120 | C41001 = Service input | |
| 1121 | C41003 = Player 1 input | |
| 1122 | C41005 = Player 2 input | |
| 1123 | C44000 = Has 'clr.w' done after setting tile bank in $E4000F. | |
| 1124 | C460xx = Extra video hardware controls | |
| 1280 | 1125 | |
| 1281 | / | |
| 1126 | Here are the I/O chip addresses accessed: | |
| 1282 | 1127 | |
| 1128 | E40001 = Player 1 | |
| 1129 | E40007 = Miscellaneous outputs (coin control, etc.) | |
| 1130 | E4000F = Tile bank | |
| 1131 | E4001D = CNT2-0 pin output state | |
| 1132 | E4001F = I/O chip port direction | |
| 1283 | 1133 | |
| 1284 | ||
| 1134 | ||
| 1285 | 1135 | |
| 1136 | static WRITE16_HANDLER( sound_command_irq_w ) | |
| 1137 | { | |
| 1138 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1286 | 1139 | |
| 1287 | static ADDRESS_MAP_START( system16a_bootleg_passsht_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1288 | AM_RANGE(0x000000, 0x01ffff) AM_ROM | |
| 1140 | if (ACCESSING_BITS_0_7) | |
| 1141 | { | |
| 1142 | soundlatch_w(space, 0, data & 0xff); | |
| 1143 | cpu_set_input_line(state->soundcpu, 0, HOLD_LINE); | |
| 1144 | } | |
| 1145 | } | |
| 1289 | 1146 | |
| 1290 | AM_RANGE(0x400000, 0x407fff) AM_RAM // tilemap ram on original, buffer on bootleg | |
| 1291 | AM_RANGE(0x409000, 0x409fff) AM_RAM AM_BASE(&system16a_bootleg_bg0_tileram) | |
| 1292 | AM_RANGE(0x40a000, 0x40afff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram) | |
| 1293 | AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram) | |
| 1294 | ||
| 1147 | static ADDRESS_MAP_START( shdancbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1148 | AM_RANGE(0x000000, 0x07ffff) AM_ROM | |
| 1149 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 1150 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 1295 | 1151 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) |
| 1296 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 1297 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) | |
| 1152 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 1153 | AM_RANGE(0xc00000, 0xc0ffff) AM_NOP | |
| 1154 | AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("COINAGE") | |
| 1155 | AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1") | |
| 1156 | AM_RANGE(0xc40006, 0xc40007) AM_WRITE(sound_command_irq_w) | |
| 1157 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 1298 | 1158 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| 1299 | 1159 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") |
| 1300 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 1301 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") | |
| 1302 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") | |
| 1303 | AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w) | |
| 1304 | AM_RANGE(0xc46000, 0xc46001) AM_WRITE(system16a_bootleg_bgscrolly_w) | |
| 1305 | AM_RANGE(0xc46002, 0xc46003) AM_WRITE(system16a_bootleg_bgscrollx_w) | |
| 1306 | AM_RANGE(0xc46004, 0xc46005) AM_WRITE(system16a_bootleg_fgscrolly_w) | |
| 1307 | AM_RANGE(0xc46006, 0xc46007) AM_WRITE(system16a_bootleg_fgscrollx_w) | |
| 1308 | AM_RANGE(0xc46008, 0xc46009) AM_WRITE(system16a_bootleg_tilemapselect_w) | |
| 1160 | AM_RANGE(0xc44000, 0xc44001) AM_WRITENOP // only used via clr.w after tilebank set | |
| 1309 | 1161 | |
| 1310 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 1162 | ||
| 1163 | AM_RANGE(0xe4001c, 0xe4001d) AM_WRITENOP // to prevent access to screen blanking control below | |
| 1164 | AM_RANGE(0xe40000, 0xe4ffff) AM_NOP | |
| 1165 | AM_RANGE(0xfe0020, 0xfe003f) AM_WRITENOP // config regs | |
| 1166 | AM_RANGE(0xffc000, 0xffffff) AM_RAM | |
| 1311 | 1167 | ADDRESS_MAP_END |
| 1312 | 1168 | |
| 1313 | static int passht4b_io1_val; | |
| 1314 | static int passht4b_io2_val; | |
| 1315 | static int passht4b_io3_val; | |
| 1316 | 1169 | |
| 1317 | static READ16_HANDLER( passht4b_service_r ) | |
| 1318 | { | |
| 1319 | UINT16 val=input_port_read(space->machine, "SERVICE"); | |
| 1320 | if(!(input_port_read(space->machine, "P1") & 0x40)) val&=0xef; | |
| 1321 | if(!(input_port_read(space->machine, "P2") & 0x40)) val&=0xdf; | |
| 1322 | if(!(input_port_read(space->machine, "P3") & 0x40)) val&=0xbf; | |
| 1323 | if(!(input_port_read(space->machine, "P4") & 0x40)) val&=0x7f; | |
| 1170 | /*************************************************************************** | |
| 1324 | 1171 | |
| 1325 | passht4b_io3_val=(input_port_read(space->machine, "P1") << 4) | (input_port_read(space->machine, "P3") & 0xf); | |
| 1326 | passht4b_io2_val=(input_port_read(space->machine, "P2") << 4) | (input_port_read(space->machine, "P4") & 0xf); | |
| 1172 | Sound hardware for Shadow Dancer (Datsu bootleg) | |
| 1327 | 1173 | |
| 1328 | passht4b_io1_val=0xff; | |
| 1174 | Z80 memory map | |
| 1175 | 0000-7FFF : ROM (fixed) | |
| 1176 | 8000-BFFF : ROM (banked) | |
| 1177 | C000-C007 : ? | |
| 1178 | C400 : Sound command (r/o) | |
| 1179 | C800 : MSM5205 sample data output (w/o) | |
| 1180 | CC00-CC03 : YM3438 #1 | |
| 1181 | D000-D003 : YM3438 #2 | |
| 1182 | D400 : ROM bank control (w/o) | |
| 1183 | DF00-DFFF : ? | |
| 1184 | E000-FFFF : Work RAM | |
| 1329 | 1185 | |
| 1330 | // player 1 buttons | |
| 1331 | if(!(input_port_read(space->machine, "P1") & 0x10)) passht4b_io1_val &=0xfe; | |
| 1332 | if(!(input_port_read(space->machine, "P1") & 0x20)) passht4b_io1_val &=0xfd; | |
| 1333 | if(!(input_port_read(space->machine, "P1") & 0x80)) passht4b_io1_val &=0xfc; | |
| 1186 | The unused memory locations and I/O port access seem to be remnants of the original code that were not patched out: | |
| 1334 | 1187 | |
| 1335 | // player 2 buttons | |
| 1336 | if(!(input_port_read(space->machine, "P2") & 0x10)) passht4b_io1_val &=0xfb; | |
| 1337 | if(!(input_port_read(space->machine, "P2") & 0x20)) passht4b_io1_val &=0xf7; | |
| 1338 | if(!(input_port_read(space->machine, "P2") & 0x80)) passht4b_io1_val &=0xf3; | |
| 1188 | - Program accesses RF5C68A channel registes at $C000-$C007 | |
| 1189 | - Program clears RF5C68A wave memory at $DF00-$DFFF | |
| 1190 | - Program writes to port $A0 to access sound ROM banking control latch | |
| 1191 | - Program reads port $C0 to access sound command | |
| 1339 | 1192 | |
| 1340 | // player 3 buttons | |
| 1341 | if(!(input_port_read(space->machine, "P3") & 0x10)) passht4b_io1_val &=0xef; | |
| 1342 | if(!(input_port_read(space->machine, "P3") & 0x20)) passht4b_io1_val &=0xdf; | |
| 1343 | if(!(input_port_read(space->machine, "P3") & 0x80)) passht4b_io1_val &=0xcf; | |
| 1193 | Interrupts | |
| 1344 | 1194 | |
| 1345 | // player 4 buttons | |
| 1346 | if(!(input_port_read(space->machine, "P4") & 0x10)) passht4b_io1_val &=0xbf; | |
| 1347 | if(!(input_port_read(space->machine, "P4") & 0x20)) passht4b_io1_val &=0x7f; | |
| 1348 | if(!(input_port_read(space->machine, "P4") & 0x80)) passht4b_io1_val &=0x3f; | |
| 1195 | IRQ = Triggered when 68000 writes sound command. Z80 reads from $C400. | |
| 1196 | NMI = Triggered when second nibble of sample data has been output to the MSM5205. | |
| 1197 | Program copies sample data from ROM bank to the MSM5205 sample data buffer at $C800. | |
| 1349 | 1198 | |
| 1350 | return val; | |
| 1199 | ROM banking seems correct. | |
| 1200 | It doesn't look like there's a way to reset the MSM5205, unless that's related to bit 7 of the | |
| 1201 | ROM bank control register. | |
| 1202 | MSM5205 clock speed hasn't been confirmed. | |
| 1203 | ||
| 1204 | ***************************************************************************/ | |
| 1205 | ||
| 1206 | static WRITE8_HANDLER( shdancbl_msm5205_data_w ) | |
| 1207 | { | |
| 1208 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1209 | state->sample_buffer = data; | |
| 1351 | 1210 | } |
| 1352 | 1211 | |
| 1353 | static | |
| 1212 | static void | |
| 1354 | 1213 | { |
| 1355 | return passht4b_io1_val; | |
| 1214 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)device->machine->driver_data; | |
| 1215 | msm5205_data_w(device, state->sample_buffer & 0x0f); | |
| 1216 | ||
| 1217 | state->sample_buffer >>= 4; | |
| 1218 | state->sample_select ^= 1; | |
| 1219 | if (state->sample_select == 0) | |
| 1220 | cpu_set_input_line(state->soundcpu, INPUT_LINE_NMI, PULSE_LINE); | |
| 1356 | 1221 | } |
| 1357 | 1222 | |
| 1358 | static | |
| 1223 | static const | |
| 1359 | 1224 | { |
| 1360 | return passht4b_io2_val; | |
| 1225 | shdancbl_msm5205_callback, | |
| 1226 | MSM5205_S48_4B | |
| 1227 | }; | |
| 1228 | ||
| 1229 | static READ8_HANDLER( shdancbl_soundbank_r ) | |
| 1230 | { | |
| 1231 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1232 | ||
| 1233 | if (state->soundbank_ptr) | |
| 1234 | return state->soundbank_ptr[offset & 0x3fff]; | |
| 1235 | return 0xff; | |
| 1361 | 1236 | } |
| 1362 | 1237 | |
| 1363 | static RE | |
| 1238 | static WRITE8 | |
| 1364 | 1239 | { |
| 1365 | return passht4b_io3_val; | |
| 1240 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)space->machine->driver_data; | |
| 1241 | UINT8 *mem = memory_region(space->machine, "soundcpu"); | |
| 1242 | ||
| 1243 | switch (data) | |
| 1244 | { | |
| 1245 | case 0: | |
| 1246 | state->soundbank_ptr = &mem[0x18000]; /* IC45 8000-BFFF */ | |
| 1247 | break; | |
| 1248 | case 1: | |
| 1249 | state->soundbank_ptr = &mem[0x1C000]; /* IC45 C000-FFFF */ | |
| 1250 | break; | |
| 1251 | case 2: | |
| 1252 | state->soundbank_ptr = &mem[0x20000]; /* IC46 0000-3FFF */ | |
| 1253 | break; | |
| 1254 | case 3: | |
| 1255 | state->soundbank_ptr = &mem[0x24000]; /* IC46 4000-7FFF */ | |
| 1256 | break; | |
| 1257 | default: | |
| 1258 | state->soundbank_ptr = NULL; | |
| 1259 | logerror("Invalid bank setting %02X (%04X)\n", data, cpu_get_pc(space->cpu)); | |
| 1260 | break; | |
| 1261 | } | |
| 1366 | 1262 | } |
| 1367 | 1263 | |
| 1368 | static ADDRESS_MAP_START( system16a_bootleg_passht4b_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1369 | AM_RANGE(0x000000, 0x01ffff) AM_ROM | |
| 1370 | AM_RANGE(0x400000, 0x407fff) AM_RAM // tilemap ram on original, buffer on bootleg | |
| 1371 | AM_RANGE(0x409000, 0x40afff) AM_RAM AM_BASE(&system16a_bootleg_bg0_tileram) | |
| 1372 | AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram) | |
| 1373 | AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram) | |
| 1264 | static ADDRESS_MAP_START(shdancbl_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1265 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 1266 | AM_RANGE(0x8000, 0xbfff) AM_READ(shdancbl_soundbank_r) | |
| 1267 | AM_RANGE(0xc000, 0xc00f) AM_WRITENOP | |
| 1268 | AM_RANGE(0xc400, 0xc400) AM_READ(soundlatch_r) | |
| 1269 | AM_RANGE(0xc800, 0xc800) AM_WRITE(shdancbl_msm5205_data_w) | |
| 1270 | AM_RANGE(0xcc00, 0xcc03) AM_DEVREADWRITE("3438.0", ym3438_r, ym3438_w) | |
| 1271 | AM_RANGE(0xd000, 0xd003) AM_DEVREADWRITE("3438.1", ym3438_r, ym3438_w) | |
| 1272 | AM_RANGE(0xd400, 0xd400) AM_WRITE(shdancbl_bankctrl_w) | |
| 1273 | AM_RANGE(0xdf00, 0xdfff) AM_NOP | |
| 1274 | AM_RANGE(0xe000, 0xffff) AM_RAM | |
| 1275 | ADDRESS_MAP_END | |
| 1276 | ||
| 1277 | ||
| 1278 | static ADDRESS_MAP_START( shdancbl_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 1279 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 1280 | AM_RANGE(0xa0, 0xbf) AM_WRITENOP | |
| 1281 | AM_RANGE(0xc0, 0xdf) AM_READNOP | |
| 1282 | ADDRESS_MAP_END | |
| 1283 | ||
| 1284 | ||
| 1285 | /*************************************************************************** | |
| 1286 | ||
| 1287 | Moonwalker (Bootleg) | |
| 1288 | ||
| 1289 | ***************************************************************************/ | |
| 1290 | ||
| 1291 | static ADDRESS_MAP_START( mwalkbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1292 | AM_RANGE(0x000000, 0x07ffff) AM_ROM | |
| 1293 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 1294 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 1374 | 1295 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) |
| 1375 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 1376 | AM_RANGE(0xc41000, 0xc41001) AM_READ(passht4b_service_r) | |
| 1377 | AM_RANGE(0xc41002, 0xc41003) AM_READ(passht4b_io1_r) | |
| 1378 | AM_RANGE(0xc41004, 0xc41005) AM_READ(passht4b_io2_r) | |
| 1379 | AM_RANGE(0xc41006, 0xc41007) AM_READ(passht4b_io3_r) | |
| 1380 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") | |
| 1381 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") | |
| 1382 | AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w) | |
| 1383 | AM_RANGE(0xc43000, 0xc43001) AM_READ_PORT("P1") // test mode only | |
| 1384 | AM_RANGE(0xc43002, 0xc43003) AM_READ_PORT("P2") | |
| 1385 | AM_RANGE(0xc43004, 0xc43005) AM_READ_PORT("P3") | |
| 1386 | AM_RANGE(0xc43006, 0xc43007) AM_READ_PORT("P4") | |
| 1387 | AM_RANGE(0xc4600a, 0xc4600b) AM_WRITE(sys16_coinctrl_w) /* coin counter doesn't work */ | |
| 1388 | AM_RANGE(0xc46000, 0xc46001) AM_WRITE(system16a_bootleg_bgscrolly_w) | |
| 1389 | AM_RANGE(0xc46002, 0xc46003) AM_WRITE(system16a_bootleg_bgscrollx_w) | |
| 1390 | AM_RANGE(0xc46004, 0xc46005) AM_WRITE(system16a_bootleg_fgscrolly_w) | |
| 1391 | AM_RANGE(0xc46006, 0xc46007) AM_WRITE(system16a_bootleg_fgscrollx_w) | |
| 1392 | AM_RANGE(0xc46008, 0xc46009) AM_WRITE(system16a_bootleg_tilemapselect_w) | |
| 1296 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 1393 | 1297 | |
| 1394 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 1298 | /* bootleg video regs */ | |
| 1299 | /*AM_RANGE(0xc00000, 0xc00001) AM_NOP | |
| 1300 | AM_RANGE(0xc00002, 0xc00003) AM_NOP | |
| 1301 | AM_RANGE(0xc00004, 0xc00005) AM_NOP // tile bank? | |
| 1302 | AM_RANGE(0xc00006, 0xc00007) AM_NOP | |
| 1303 | AM_RANGE(0xc44000, 0xc44001) AM_NOP | |
| 1304 | AM_RANGE(0xc46000, 0xc46001) AM_NOP | |
| 1305 | AM_RANGE(0xc46200, 0xc46201) AM_NOP | |
| 1306 | AM_RANGE(0xc46400, 0xc464ff) AM_NOP // scroll? | |
| 1307 | AM_RANGE(0xc46500, 0xc465ff) AM_NOP // scroll? | |
| 1308 | */ | |
| 1309 | ||
| 1310 | AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("COINAGE") | |
| 1311 | AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1") | |
| 1312 | AM_RANGE(0xc40006, 0xc40007) AM_WRITE(sound_command_nmi_w) | |
| 1313 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 1314 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 1315 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") | |
| 1316 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P3") | |
| 1317 | AM_RANGE(0xc41008, 0xc41009) AM_READNOP // figure this out, extra input for 3p? | |
| 1318 | AM_RANGE(0xc46600, 0xc46601) AM_WRITE(sys18_refreshenable_w) | |
| 1319 | AM_RANGE(0xc46800, 0xc46801) AM_WRITE(sys18_tilebank_w) | |
| 1320 | ||
| 1321 | AM_RANGE(0xfe0020, 0xfe003f) AM_WRITENOP // config regs | |
| 1322 | AM_RANGE(0xffc000, 0xffffff) AM_RAM | |
| 1395 | 1323 | ADDRESS_MAP_END |
| 1396 | 1324 | |
| 1397 | /***************************************************************************/ | |
| 1398 | 1325 | |
| 1326 | /*************************************************************************** | |
| 1399 | 1327 | |
| 1400 | static MACHINE_RESET( passsht ) | |
| 1401 | { | |
| 1402 | sys16_sprxoffset = -0x48; | |
| 1403 | } | |
| 1328 | Alien Storm (Bootleg) | |
| 1404 | 1329 | |
| 1405 | static MACHINE_RESET( passht4b ) | |
| 1406 | { | |
| 1407 | sys16_sprxoffset = -0xb8; | |
| 1408 | } | |
| 1330 | ***************************************************************************/ | |
| 1409 | 1331 | |
| 1410 | static DRIVER_INIT( passsht ) | |
| 1411 | { | |
| 1412 | MACHINE_RESET_CALL(sys16_onetime); | |
| 1413 | } | |
| 1332 | /* bootleg doesn't have real vdp or i/o */ | |
| 1333 | static ADDRESS_MAP_START( astormbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1334 | AM_RANGE(0x000000, 0x07ffff) AM_ROM | |
| 1335 | AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE(sys16_tileram_w) AM_BASE_MEMBER(segas1x_bootleg_state, tileram) | |
| 1336 | AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE(sys16_textram_w) AM_BASE_MEMBER(segas1x_bootleg_state, textram) | |
| 1337 | AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE(segaic16_paletteram_w) AM_BASE(&segaic16_paletteram) | |
| 1338 | AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 1339 | AM_RANGE(0xa00000, 0xa00001) AM_READ_PORT("COINAGE") | |
| 1340 | AM_RANGE(0xa00002, 0xa00003) AM_READ_PORT("DSW1") | |
| 1341 | AM_RANGE(0xa00006, 0xa00007) AM_WRITE(sound_command_nmi_w) | |
| 1342 | AM_RANGE(0xa0000e, 0xa0000f) AM_WRITE(sys18_tilebank_w) | |
| 1343 | AM_RANGE(0xa01000, 0xa01001) AM_READ_PORT("SERVICE") | |
| 1344 | AM_RANGE(0xa01002, 0xa01003) AM_READ_PORT("P1") | |
| 1345 | AM_RANGE(0xa01004, 0xa01005) AM_READ_PORT("P2") | |
| 1346 | AM_RANGE(0xa01006, 0xa01007) AM_READ_PORT("P3") | |
| 1347 | AM_RANGE(0xa02100, 0xa02101) AM_NOP | |
| 1348 | AM_RANGE(0xa03000, 0xa03001) AM_NOP | |
| 1349 | AM_RANGE(0xa03034, 0xa03035) AM_NOP | |
| 1414 | 1350 | |
| 1415 | static DRIVER_INIT( passht4b ) | |
| 1416 | { | |
| 1417 | MACHINE_RESET_CALL(sys16_onetime); | |
| 1418 | } | |
| 1351 | /* bootleg video regs */ | |
| 1352 | AM_RANGE(0xc00000, 0xc00001) AM_NOP | |
| 1353 | AM_RANGE(0xc00002, 0xc00003) AM_NOP | |
| 1354 | AM_RANGE(0xc00004, 0xc00005) AM_NOP // tile bank? | |
| 1355 | AM_RANGE(0xc00006, 0xc00007) AM_NOP | |
| 1356 | AM_RANGE(0xc44000, 0xc44001) AM_NOP | |
| 1357 | AM_RANGE(0xc46000, 0xc46001) AM_NOP | |
| 1358 | AM_RANGE(0xc46200, 0xc46201) AM_NOP | |
| 1359 | AM_RANGE(0xc46400, 0xc464ff) AM_NOP // scroll? | |
| 1360 | AM_RANGE(0xc46500, 0xc465ff) AM_NOP // scroll? | |
| 1419 | 1361 | |
| 1420 | /***************************************************************************/ | |
| 1362 | AM_RANGE(0xc46600, 0xc46601) AM_WRITE(sys18_refreshenable_w) | |
| 1363 | AM_RANGE(0xfe0020, 0xfe003f) AM_WRITENOP | |
| 1364 | AM_RANGE(0xffc000, 0xffffff) AM_RAM | |
| 1365 | ADDRESS_MAP_END | |
| 1421 | 1366 | |
| 1367 | /************************************* | |
| 1368 | * | |
| 1369 | * Input ports | |
| 1370 | * | |
| 1371 | *************************************/ | |
| 1372 | ||
| 1373 | /* System 16A/B Bootlegs */ | |
| 1374 | static INPUT_PORTS_START( sys16_common ) | |
| 1375 | PORT_START("P1") | |
| 1376 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 1377 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1378 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1379 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1380 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1381 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1382 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1383 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1384 | ||
| 1385 | PORT_START("P2") | |
| 1386 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL | |
| 1387 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1388 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 1389 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1390 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1391 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1392 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1393 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1394 | ||
| 1395 | PORT_START("SERVICE") | |
| 1396 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1397 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1398 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) | |
| 1399 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1400 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1401 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1402 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1403 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1404 | ||
| 1405 | PORT_START("DSW1") | |
| 1406 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") | |
| 1407 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) | |
| 1408 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 1409 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) | |
| 1410 | PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" ) | |
| 1411 | PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" ) | |
| 1412 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 1413 | PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" ) | |
| 1414 | PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" ) | |
| 1415 | PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" ) | |
| 1416 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) | |
| 1417 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 1418 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 1419 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 1420 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 1421 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 1422 | PORT_DIPSETTING( 0x00, "Free Play (if Coin B too) or 1/1" ) | |
| 1423 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") | |
| 1424 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) | |
| 1425 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) | |
| 1426 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) | |
| 1427 | PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" ) | |
| 1428 | PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" ) | |
| 1429 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 1430 | PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" ) | |
| 1431 | PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" ) | |
| 1432 | PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" ) | |
| 1433 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) | |
| 1434 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 1435 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 1436 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 1437 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 1438 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 1439 | PORT_DIPSETTING( 0x00, "Free Play (if Coin A too) or 1/1" ) | |
| 1440 | INPUT_PORTS_END | |
| 1441 | ||
| 1442 | ||
| 1443 | static INPUT_PORTS_START( shinobi ) | |
| 1444 | PORT_INCLUDE( sys16_common ) | |
| 1445 | ||
| 1446 | PORT_START("DSW2") | |
| 1447 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:1") | |
| 1448 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1449 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1450 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 1451 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1452 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1453 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 1454 | PORT_DIPSETTING( 0x08, "2" ) | |
| 1455 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1456 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1457 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 1458 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6") | |
| 1459 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 1460 | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) | |
| 1461 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 1462 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1463 | PORT_DIPNAME( 0x40, 0x40, "Enemy's Bullet Speed" ) PORT_DIPLOCATION("SW2:7") | |
| 1464 | PORT_DIPSETTING( 0x40, "Slow" ) | |
| 1465 | PORT_DIPSETTING( 0x00, "Fast" ) | |
| 1466 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Language ) ) PORT_DIPLOCATION("SW2:8") | |
| 1467 | PORT_DIPSETTING( 0x80, DEF_STR( Japanese ) ) | |
| 1468 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) | |
| 1469 | INPUT_PORTS_END | |
| 1470 | ||
| 1422 | 1471 | static INPUT_PORTS_START( passsht ) |
| 1423 | 1472 | PORT_INCLUDE( sys16_common ) |
| 1424 | 1473 | |
| r7356 | r7357 | |
| 1501 | 1550 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4) |
| 1502 | 1551 | INPUT_PORTS_END |
| 1503 | 1552 | |
| 1504 | /***************************************************************************/ | |
| 1553 | static INPUT_PORTS_START( wb3b ) | |
| 1554 | PORT_INCLUDE( sys16_common ) | |
| 1505 | 1555 | |
| 1506 | static MACHINE_DRIVER_START( passsht ) | |
| 1556 | PORT_START("DSW2") | |
| 1557 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ | |
| 1558 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 1559 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1560 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1561 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 1562 | PORT_DIPSETTING( 0x00, "2" ) | |
| 1563 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1564 | PORT_DIPSETTING( 0x08, "4" ) | |
| 1565 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1566 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:5") | |
| 1567 | PORT_DIPSETTING( 0x10, "50k/100k/180k/300k" ) | |
| 1568 | PORT_DIPSETTING( 0x00, "50k/150k/300k" ) | |
| 1569 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:6") | |
| 1570 | PORT_DIPSETTING( 0x20, DEF_STR( Normal ) ) | |
| 1571 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 1572 | PORT_DIPNAME( 0x40, 0x40, "Test Mode" ) PORT_DIPLOCATION("SW2:7") | |
| 1573 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) /* Normal game */ | |
| 1574 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) /* Levels are selectable / Player is Invincible */ | |
| 1575 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Listed as "Unused" */ | |
| 1576 | INPUT_PORTS_END | |
| 1507 | 1577 | |
| 1508 | /* basic machine hardware */ | |
| 1509 | MDRV_IMPORT_FROM(system16_7759) | |
| 1510 | MDRV_CPU_MODIFY("maincpu") | |
| 1511 | MDRV_CPU_PROGRAM_MAP(system16a_bootleg_passsht_map) | |
| 1578 | static INPUT_PORTS_START( bayroute ) | |
| 1579 | PORT_INCLUDE( sys16_common ) | |
| 1512 | 1580 | |
| 1513 | MDRV_VIDEO_START( system16a_bootleg_passsht ) | |
| 1514 | MDRV_VIDEO_UPDATE( system16a_bootleg ) | |
| 1581 | PORT_START("DSW2") | |
| 1582 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:1") | |
| 1583 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1584 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1585 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 1586 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1587 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1588 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 1589 | PORT_DIPSETTING( 0x04, "1" ) | |
| 1590 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1591 | PORT_DIPSETTING( 0x08, "5" ) | |
| 1592 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 1593 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:5,6") | |
| 1594 | PORT_DIPSETTING( 0x30, "100k" ) | |
| 1595 | PORT_DIPSETTING( 0x20, "150k" ) | |
| 1596 | PORT_DIPSETTING( 0x10, "200k" ) | |
| 1597 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1598 | PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7,8") | |
| 1599 | PORT_DIPSETTING( 0xc0, DEF_STR( Easy ) ) | |
| 1600 | PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) | |
| 1601 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) | |
| 1602 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1603 | INPUT_PORTS_END | |
| 1515 | 1604 | |
| 1516 | MDRV_MACHINE_RESET(passsht) | |
| 1517 | MACHINE_DRIVER_END | |
| 1605 | static INPUT_PORTS_START( goldnaxe ) | |
| 1606 | PORT_INCLUDE( sys16_common ) | |
| 1518 | 1607 | |
| 1608 | PORT_START("DSW2") | |
| 1609 | PORT_DIPNAME( 0x01, 0x01, "Credits Needed" ) PORT_DIPLOCATION("SW2:1") | |
| 1610 | PORT_DIPSETTING( 0x01, "1 Credit To Start" ) | |
| 1611 | PORT_DIPSETTING( 0x00, "2 Credits To Start" ) | |
| 1612 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 1613 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1614 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1615 | PORT_DIPNAME( 0x3c, 0x3c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4,5,6") /* Definition according to manual */ | |
| 1616 | PORT_DIPSETTING( 0x00, "Special" ) | |
| 1617 | PORT_DIPSETTING( 0x14, DEF_STR( Easiest ) ) | |
| 1618 | PORT_DIPSETTING( 0x1c, DEF_STR( Easier ) ) | |
| 1619 | PORT_DIPSETTING( 0x34, DEF_STR( Easy ) ) | |
| 1620 | PORT_DIPSETTING( 0x3c, DEF_STR( Normal ) ) | |
| 1621 | PORT_DIPSETTING( 0x38, DEF_STR( Hard ) ) | |
| 1622 | PORT_DIPSETTING( 0x2c, DEF_STR( Harder ) ) | |
| 1623 | PORT_DIPSETTING( 0x28, DEF_STR( Hardest ) ) | |
| 1624 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) /* Listed as "Unused" */ | |
| 1625 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Listed as "Unused" */ | |
| 1519 | 1626 | |
| 1520 | static MACHINE_DRIVER_START( passht4b ) | |
| 1627 | /* PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 1628 | PORT_DIPSETTING( 0x08, "1" ) | |
| 1629 | PORT_DIPSETTING( 0x0c, "2" ) | |
| 1630 | PORT_DIPSETTING( 0x04, "3" ) | |
| 1631 | PORT_DIPSETTING( 0x00, "5" ) | |
| 1632 | PORT_DIPNAME( 0x30, 0x30, "Energy Meter" ) PORT_DIPLOCATION("SW2:5,6") | |
| 1633 | PORT_DIPSETTING( 0x20, "2" ) | |
| 1634 | PORT_DIPSETTING( 0x30, "3" ) | |
| 1635 | PORT_DIPSETTING( 0x10, "4" ) | |
| 1636 | PORT_DIPSETTING( 0x00, "5" ) | |
| 1637 | */ | |
| 1638 | INPUT_PORTS_END | |
| 1521 | 1639 | |
| 1522 | /* basic machine hardware */ | |
| 1523 | MDRV_IMPORT_FROM(system16_7759) | |
| 1524 | MDRV_CPU_MODIFY("maincpu") | |
| 1525 | MDRV_CPU_PROGRAM_MAP(system16a_bootleg_passht4b_map) | |
| 1640 | static INPUT_PORTS_START( tturf ) | |
| 1641 | PORT_INCLUDE( sys16_common ) | |
| 1526 | 1642 | |
| 1527 | MDRV_VIDEO_START( system16a_bootleg_passsht ) | |
| 1528 | MDRV_VIDEO_UPDATE( system16a_bootleg_passht4b ) | |
| 1643 | PORT_START("DSW2") | |
| 1644 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Continues ) ) PORT_DIPLOCATION("SW2:1,2") | |
| 1645 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1646 | PORT_DIPSETTING( 0x01, "3" ) | |
| 1647 | PORT_DIPSETTING( 0x02, "Unlimited" ) | |
| 1648 | PORT_DIPSETTING( 0x03, "Unlimited" ) | |
| 1649 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 1650 | PORT_DIPSETTING( 0x08, DEF_STR( Easy ) ) | |
| 1651 | PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) | |
| 1652 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) | |
| 1653 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1654 | PORT_DIPNAME( 0x30, 0x20, "Starting Energy" ) PORT_DIPLOCATION("SW2:5,6") | |
| 1655 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1656 | PORT_DIPSETTING( 0x10, "4" ) | |
| 1657 | PORT_DIPSETTING( 0x20, "6" ) | |
| 1658 | PORT_DIPSETTING( 0x30, "8" ) | |
| 1659 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:7") | |
| 1660 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1661 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1662 | PORT_DIPNAME( 0x80, 0x00, "Bonus Energy" ) PORT_DIPLOCATION("SW2:8") | |
| 1663 | PORT_DIPSETTING( 0x80, "1" ) | |
| 1664 | PORT_DIPSETTING( 0x00, "2" ) | |
| 1665 | INPUT_PORTS_END | |
| 1529 | 1666 | |
| 1530 | MDRV_MACHINE_RESET(passht4b) | |
| 1531 | MACHINE_DRIVER_END | |
| 1667 | static INPUT_PORTS_START( ddux ) | |
| 1668 | PORT_INCLUDE( sys16_common ) | |
| 1532 | 1669 | |
| 1533 | /***************************************************************************/ | |
| 1670 | PORT_START("DSW2") | |
| 1671 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1") | |
| 1672 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1673 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1674 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:2,3") | |
| 1675 | PORT_DIPSETTING( 0x04, DEF_STR( Easy ) ) | |
| 1676 | PORT_DIPSETTING( 0x06, DEF_STR( Normal ) ) | |
| 1677 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 1678 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1679 | PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:4,5") | |
| 1680 | PORT_DIPSETTING( 0x10, "2" ) | |
| 1681 | PORT_DIPSETTING( 0x18, "3" ) | |
| 1682 | PORT_DIPSETTING( 0x08, "4" ) | |
| 1683 | PORT_DIPSETTING( 0x00, "5" ) | |
| 1684 | PORT_DIPNAME( 0x60, 0x60, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:6,7") | |
| 1685 | PORT_DIPSETTING( 0x40, "150k" ) | |
| 1686 | PORT_DIPSETTING( 0x60, "200k" ) | |
| 1687 | PORT_DIPSETTING( 0x20, "300k" ) | |
| 1688 | PORT_DIPSETTING( 0x00, "400k" ) | |
| 1689 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Listed as "Unused" */ | |
| 1690 | INPUT_PORTS_END | |
| 1534 | 1691 | |
| 1535 | static INPUT_PORTS_START( s | |
| 1692 | static INPUT_PORTS_START( eswat | |
| 1536 | 1693 | PORT_INCLUDE( sys16_common ) |
| 1537 | 1694 | |
| 1538 | 1695 | PORT_START("DSW2") |
| 1539 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:1") | |
| 1540 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1541 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1696 | PORT_DIPNAME( 0x01, 0x01, "Credits To Start" ) PORT_DIPLOCATION("SW2:1") | |
| 1697 | PORT_DIPSETTING( 0x01, "1 Credit" ) | |
| 1698 | PORT_DIPSETTING( 0x00, "2 Credits" ) | |
| 1542 | 1699 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") |
| 1543 | 1700 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1544 | 1701 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1545 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 1546 | PORT_DIPSETTING( 0x08, "2" ) | |
| 1547 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1548 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1549 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 1702 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:3") | |
| 1703 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1704 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1705 | PORT_DIPNAME( 0x08, 0x08, "Timer" ) PORT_DIPLOCATION("SW2:4") | |
| 1706 | PORT_DIPSETTING( 0x08, DEF_STR( Normal ) ) | |
| 1707 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 1550 | 1708 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6") |
| 1551 | 1709 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) |
| 1552 | 1710 | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) |
| 1553 | 1711 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 1554 | 1712 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1555 | PORT_DIPNAME( 0x40, 0x40, "Enemy's Bullet Speed" ) PORT_DIPLOCATION("SW2:7") | |
| 1556 | PORT_DIPSETTING( 0x40, "Slow" ) | |
| 1557 | PORT_DIPSETTING( 0x00, "Fast" ) | |
| 1558 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Language ) ) PORT_DIPLOCATION("SW2:8") | |
| 1559 | PORT_DIPSETTING( 0x80, DEF_STR( Japanese ) ) | |
| 1560 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) | |
| 1713 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:7,8") | |
| 1714 | PORT_DIPSETTING( 0x00, "1" ) | |
| 1715 | PORT_DIPSETTING( 0x40, "2" ) | |
| 1716 | PORT_DIPSETTING( 0xc0, "3" ) | |
| 1717 | PORT_DIPSETTING( 0x80, "4" ) | |
| 1561 | 1718 | INPUT_PORTS_END |
| 1562 | 1719 | |
| 1563 | /***************************************************************************/ | |
| 1720 | static INPUT_PORTS_START( fpointbl ) | |
| 1721 | PORT_START("SERVICE") | |
| 1722 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1723 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1724 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) | |
| 1725 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1726 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1727 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1728 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1729 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1564 | 1730 | |
| 1565 | static ADDRESS_MAP_START( system16a_bootleg_shinobi_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1566 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 1567 | AM_RANGE(0x400000, 0x40ffff) AM_RAM // tilemap ram on the original, used as a buffer on the bootlegs | |
| 1568 | AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram) | |
| 1569 | AM_RANGE(0x411000, 0x411fff) AM_RAM AM_BASE(&system16a_bootleg_bg0_tileram) | |
| 1570 | AM_RANGE(0x412000, 0x412fff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram) | |
| 1571 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 1572 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 1573 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sound_command_nmi_w) | |
| 1574 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 1575 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 1576 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") | |
| 1577 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW1") | |
| 1578 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW2") | |
| 1579 | AM_RANGE(0xC43000, 0xC43001) AM_WRITENOP | |
| 1580 | AM_RANGE(0xC44000, 0xC44001) AM_WRITENOP | |
| 1581 | AM_RANGE(0xc46000, 0xc46001) AM_WRITE(system16a_bootleg_bgscrolly_w) | |
| 1582 | AM_RANGE(0xc46002, 0xc46003) AM_WRITE(system16a_bootleg_bgscrollx_w) | |
| 1583 | AM_RANGE(0xc46004, 0xc46005) AM_WRITE(system16a_bootleg_fgscrolly_w) | |
| 1584 | AM_RANGE(0xc46006, 0xc46007) AM_WRITE(system16a_bootleg_fgscrollx_w) | |
| 1585 | AM_RANGE(0xc46008, 0xc46009) AM_WRITE(system16a_bootleg_tilemapselect_w) | |
| 1586 | AM_RANGE(0xC60000, 0xC60001) AM_READNOP | |
| 1587 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 1588 | ADDRESS_MAP_END | |
| 1731 | PORT_START("P1") | |
| 1732 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1733 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 1734 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1735 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1736 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1737 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1738 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1739 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1589 | 1740 | |
| 1590 | /***************************************************************************/ | |
| 1741 | PORT_START("P2") | |
| 1742 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 1743 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL | |
| 1744 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1745 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1746 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1747 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1748 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1749 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1591 | 1750 | |
| 1751 | PORT_START("DSW2") | |
| 1752 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ | |
| 1753 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 1754 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1755 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1756 | PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW2:3" ) /* Listed as "Unused" */ | |
| 1757 | PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" ) /* Listed as "Unused" */ | |
| 1758 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6") | |
| 1759 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 1760 | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) | |
| 1761 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 1762 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1763 | PORT_DIPNAME( 0x40, 0x40, "Clear Round Allowed" ) PORT_DIPLOCATION("SW2:7") /* Use button 3 */ | |
| 1764 | PORT_DIPSETTING( 0x00, "1" ) | |
| 1765 | PORT_DIPSETTING( 0x40, "2" ) | |
| 1766 | /* SW2:8 The mode in which a block falls at twice [ usual ] speed as this when playing 25 minutes or more on one coin. */ | |
| 1767 | PORT_DIPNAME( 0x80, 0x80, "2 Cell Move" ) PORT_DIPLOCATION("SW2:8") | |
| 1768 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 1769 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) | |
| 1592 | 1770 | |
| 1593 | static DRIVER_INIT( shinobl ) | |
| 1594 | { | |
| 1595 | MACHINE_RESET_CALL(sys16_onetime); | |
| 1596 | } | |
| 1771 | PORT_START("DSW1") | |
| 1772 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") | |
| 1773 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) | |
| 1774 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 1775 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) | |
| 1776 | PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" ) | |
| 1777 | PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" ) | |
| 1778 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 1779 | PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" ) | |
| 1780 | PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" ) | |
| 1781 | PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" ) | |
| 1782 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) | |
| 1783 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 1784 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 1785 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 1786 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 1787 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 1788 | PORT_DIPSETTING( 0x00, "Free Play (if Coin B too) or 1/1" ) | |
| 1789 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") | |
| 1790 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) | |
| 1791 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) | |
| 1792 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) | |
| 1793 | PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" ) | |
| 1794 | PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" ) | |
| 1795 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 1796 | PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" ) | |
| 1797 | PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" ) | |
| 1798 | PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" ) | |
| 1799 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) | |
| 1800 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 1801 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 1802 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 1803 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 1804 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 1805 | PORT_DIPSETTING( 0x00, "Free Play (if Coin A too) or 1/1" ) | |
| 1806 | INPUT_PORTS_END | |
| 1597 | 1807 | |
| 1598 | /***************************************************************************/ | |
| 1808 | static INPUT_PORTS_START( tetris ) | |
| 1809 | PORT_INCLUDE( sys16_common ) /* unconfirmed coinage dip */ | |
| 1599 | 1810 | |
| 1600 | static MACHINE_DRIVER_START( system16a_bootleg_shinobi ) | |
| 1811 | PORT_START("DSW2") | |
| 1812 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ | |
| 1813 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 1814 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1815 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1816 | /* From the code SW2:3,4 looks like some kind of difficulty level, | |
| 1817 | but all 4 levels points to the same place so it doesn't actually change anything!! */ | |
| 1818 | PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW2:3" ) /* Listed as "Unused" */ | |
| 1819 | PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" ) /* Listed as "Unused" */ | |
| 1820 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6") | |
| 1821 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 1822 | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) | |
| 1823 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 1824 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1825 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) /* Listed as "Unused" */ | |
| 1826 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Listed as "Unused" */ | |
| 1827 | INPUT_PORTS_END | |
| 1601 | 1828 | |
| 1602 | /* basic machine hardware */ | |
| 1603 | MDRV_IMPORT_FROM(system16) | |
| 1604 | MDRV_CPU_MODIFY("maincpu") | |
| 1605 | MDRV_CPU_PROGRAM_MAP(system16a_bootleg_shinobi_map) | |
| 1829 | /* System 18 Bootlegs */ | |
| 1830 | static INPUT_PORTS_START( astormbl ) | |
| 1831 | PORT_START("P1") | |
| 1832 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1833 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1834 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 1835 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1836 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1837 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1838 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1839 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1606 | 1840 | |
| 1607 | MDRV_VIDEO_START( system16a_bootleg_shinobi ) | |
| 1608 | MDRV_VIDEO_UPDATE( system16a_bootleg ) | |
| 1609 | MACHINE_DRIVER_END | |
| 1841 | PORT_START("P2") | |
| 1842 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1843 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1844 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1845 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1846 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1847 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1848 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1849 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1610 | 1850 | |
| 1611 | /***************************************************************************/ | |
| 1851 | PORT_START("P3") | |
| 1852 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) | |
| 1853 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) | |
| 1854 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) | |
| 1855 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1856 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) | |
| 1857 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) | |
| 1858 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) | |
| 1859 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) | |
| 1612 | 1860 | |
| 1861 | PORT_START("SERVICE") | |
| 1862 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) | |
| 1863 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1864 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) | |
| 1865 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1866 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1867 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1868 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START3 ) | |
| 1869 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1613 | 1870 | |
| 1614 | static ADDRESS_MAP_START( tetrisbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1615 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 1616 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 1617 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 1871 | PORT_START("COINAGE") | |
| 1872 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") | |
| 1873 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) | |
| 1874 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 1875 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) | |
| 1876 | PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" ) | |
| 1877 | PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" ) | |
| 1878 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 1879 | PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" ) | |
| 1880 | PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" ) | |
| 1881 | PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" ) | |
| 1882 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) | |
| 1883 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 1884 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 1885 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 1886 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 1887 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 1888 | PORT_DIPSETTING( 0x00, "Free Play (if Coin B too) or 1/1" ) | |
| 1889 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") | |
| 1890 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) | |
| 1891 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) | |
| 1892 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) | |
| 1893 | PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" ) | |
| 1894 | PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" ) | |
| 1895 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 1896 | PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" ) | |
| 1897 | PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" ) | |
| 1898 | PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" ) | |
| 1899 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) | |
| 1900 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 1901 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 1902 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 1903 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 1904 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 1905 | PORT_DIPSETTING( 0x00, "Free Play (if Coin A too) or 1/1" ) | |
| 1618 | 1906 | |
| 1619 | AM_RANGE(0x418000, 0x418001) AM_WRITE(sys16bootleg_fgscrolly_w) | |
| 1620 | AM_RANGE(0x418008, 0x418009) AM_WRITE(sys16bootleg_fgscrollx_w) | |
| 1621 | AM_RANGE(0x418010, 0x418011) AM_WRITE(sys16bootleg_bgscrolly_w) | |
| 1622 | AM_RANGE(0x418018, 0x418019) AM_WRITE(sys16bootleg_bgscrollx_w) | |
| 1623 | AM_RANGE(0x418020, 0x418021) AM_WRITE(sys16bootleg_fgpage_w) | |
| 1624 | AM_RANGE(0x418028, 0x418029) AM_WRITE(sys16bootleg_bgpage_w) | |
| 1907 | PORT_START("DSW1") | |
| 1908 | PORT_DIPNAME( 0x01, 0x01, "2 Credits to Start" ) | |
| 1909 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1910 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1911 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 1912 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1913 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1914 | PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Difficulty ) ) | |
| 1915 | PORT_DIPSETTING( 0x04, DEF_STR( Easiest ) ) | |
| 1916 | PORT_DIPSETTING( 0x08, DEF_STR( Easier ) ) | |
| 1917 | PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) ) | |
| 1918 | PORT_DIPSETTING( 0x1c, DEF_STR( Normal ) ) | |
| 1919 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 1920 | PORT_DIPSETTING( 0x14, DEF_STR( Harder ) ) | |
| 1921 | PORT_DIPSETTING( 0x18, DEF_STR( Hardest ) ) | |
| 1922 | PORT_DIPSETTING( 0x00, "Special" ) | |
| 1923 | PORT_DIPNAME( 0x20, 0x20, "Coin Chutes" ) | |
| 1924 | PORT_DIPSETTING( 0x20, "3" ) | |
| 1925 | PORT_DIPSETTING( 0x00, "1" ) | |
| 1926 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) | |
| 1927 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1928 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1929 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) | |
| 1930 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1931 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1932 | INPUT_PORTS_END | |
| 1625 | 1933 | |
| 1626 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 1627 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 1628 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) | |
| 1629 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 1630 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 1631 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") | |
| 1632 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") | |
| 1633 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") | |
| 1634 | AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w) | |
| 1635 | AM_RANGE(0xc43034, 0xc43035) AM_WRITENOP | |
| 1636 | AM_RANGE(0xc80000, 0xc80001) AM_NOP | |
| 1637 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 1638 | ADDRESS_MAP_END | |
| 1934 | static INPUT_PORTS_START( mwalkbl ) | |
| 1935 | PORT_INCLUDE( astormbl ) | |
| 1639 | 1936 | |
| 1937 | PORT_MODIFY("P3") | |
| 1938 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START3 ) | |
| 1640 | 1939 | |
| 1641 | static READ16_HANDLER( beautyb_unkx_r ) | |
| 1940 | PORT_MODIFY("SERVICE") | |
| 1941 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1942 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1943 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1944 | ||
| 1945 | PORT_MODIFY("DSW1") | |
| 1946 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) | |
| 1947 | PORT_DIPSETTING( 0x04, "2" ) | |
| 1948 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1949 | PORT_DIPNAME( 0x08, 0x08, "Player Vitality" ) | |
| 1950 | PORT_DIPSETTING( 0x08, DEF_STR( Low ) ) | |
| 1951 | PORT_DIPSETTING( 0x00, DEF_STR( High ) ) | |
| 1952 | PORT_DIPNAME( 0x10, 0x00, "Play Mode" ) | |
| 1953 | PORT_DIPSETTING( 0x10, "2 Players" ) | |
| 1954 | PORT_DIPSETTING( 0x00, "3 Players" ) | |
| 1955 | PORT_DIPNAME( 0x20, 0x20, "Coin Mode" ) | |
| 1956 | PORT_DIPSETTING( 0x20, "Common" ) | |
| 1957 | PORT_DIPSETTING( 0x00, "Individual" ) | |
| 1958 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) | |
| 1959 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) | |
| 1960 | PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) ) | |
| 1961 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) | |
| 1962 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1963 | INPUT_PORTS_END | |
| 1964 | ||
| 1965 | ||
| 1966 | /************************************* | |
| 1967 | * | |
| 1968 | * Graphics definitions | |
| 1969 | * | |
| 1970 | *************************************/ | |
| 1971 | ||
| 1972 | static const gfx_layout charlayout = | |
| 1642 | 1973 | { |
| 1643 | static int x = 0; | |
| 1644 | x++; | |
| 1645 | x&=0x7f; | |
| 1646 | return x; | |
| 1647 | } | |
| 1974 | 8,8, | |
| 1975 | RGN_FRAC(1,3), | |
| 1976 | 3, | |
| 1977 | { RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3) }, | |
| 1978 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 1979 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 1980 | 8*8 | |
| 1981 | }; | |
| 1648 | 1982 | |
| 1649 | static ADDRESS_MAP_START( beautyb_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1650 | AM_RANGE(0x000000, 0x00ffff) AM_ROM AM_WRITENOP | |
| 1651 | AM_RANGE(0x010000, 0x03ffff) AM_WRITENOP | |
| 1983 | GFXDECODE_START( sys16 ) | |
| 1984 | GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 1024 ) | |
| 1985 | GFXDECODE_END | |
| 1652 | 1986 | |
| 1653 | AM_RANGE(0x0280D6, 0x0280D7) AM_READ(beautyb_unkx_r) | |
| 1654 | AM_RANGE(0x0280D8, 0x0280D9) AM_READ(beautyb_unkx_r) | |
| 1655 | 1987 | |
| 1656 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 1657 | AM_RANGE(0x410000, 0x413fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 1988 | /************************************* | |
| 1989 | * | |
| 1990 | * Machine driver | |
| 1991 | * | |
| 1992 | *************************************/ | |
| 1658 | 1993 | |
| 1659 | AM_RANGE(0x418000, 0x418001) AM_WRITE(sys16bootleg_bgscrolly_w) | |
| 1660 | AM_RANGE(0x418008, 0x418009) AM_WRITE(sys16bootleg_bgscrollx_w) | |
| 1661 | AM_RANGE(0x418010, 0x418011) AM_WRITE(sys16bootleg_fgscrolly_w) | |
| 1662 | AM_RANGE(0x418018, 0x418019) AM_WRITE(sys16bootleg_fgscrollx_w) | |
| 1663 | AM_RANGE(0x418020, 0x418021) AM_WRITE(sys16bootleg_bgpage_w) | |
| 1664 | AM_RANGE(0x418028, 0x418029) AM_WRITE(sys16bootleg_fgpage_w) | |
| 1994 | /* System 16A/B Bootlegs */ | |
| 1995 | static MACHINE_DRIVER_START( system16 ) | |
| 1665 | 1996 | |
| 1666 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 1667 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 1997 | /* driver data */ | |
| 1998 | MDRV_DRIVER_DATA(segas1x_bootleg_state) | |
| 1668 | 1999 | |
| 1669 | AM_RANGE(0xC41000, 0xC41001) AM_READ(beautyb_unkx_r ) | |
| 1670 | AM_RANGE(0xC41002, 0xC41003) AM_READ(beautyb_unkx_r ) | |
| 2000 | /* basic machine hardware */ | |
| 2001 | MDRV_CPU_ADD("maincpu", M68000, 10000000) | |
| 2002 | MDRV_CPU_VBLANK_INT("screen", sys16_interrupt) | |
| 1671 | 2003 | |
| 1672 | AM_RANGE(0xc40000, 0xc40001) AM_WRITENOP | |
| 1673 | AM_RANGE(0xc80000, 0xc80001) AM_WRITENOP | |
| 2004 | MDRV_CPU_ADD("soundcpu", Z80, 4000000) | |
| 2005 | MDRV_CPU_PROGRAM_MAP(sound_map) | |
| 2006 | MDRV_CPU_IO_MAP(sound_io_map) | |
| 1674 | 2007 | |
| 1675 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram | |
| 1676 | ADDRESS_MAP_END | |
| 2008 | /* video hardware */ | |
| 2009 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 2010 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 2011 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 2012 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 2013 | MDRV_SCREEN_SIZE(40*8, 28*8) | |
| 2014 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) | |
| 1677 | 2015 | |
| 1678 | /***************************************************************************/ | |
| 2016 | MDRV_GFXDECODE(sys16) | |
| 2017 | MDRV_PALETTE_LENGTH(2048*SHADOW_COLORS_MULTIPLIER) | |
| 1679 | 2018 | |
| 2019 | MDRV_VIDEO_START(system16) | |
| 2020 | MDRV_VIDEO_UPDATE(system16) | |
| 1680 | 2021 | |
| 1681 | static DRIVER_INIT( tetrisbl ) | |
| 2022 | /* sound hardware */ | |
| 2023 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") | |
| 2024 | ||
| 2025 | MDRV_SOUND_ADD("ymsnd", YM2151, 4000000) | |
| 2026 | MDRV_SOUND_ROUTE(0, "lspeaker", 0.32) | |
| 2027 | MDRV_SOUND_ROUTE(1, "rspeaker", 0.32) | |
| 2028 | MACHINE_DRIVER_END | |
| 2029 | ||
| 2030 | ||
| 2031 | static void sound_cause_nmi( running_device *device, int chip ) | |
| 1682 | 2032 | { |
| 1683 | MACHINE_RESET_CALL(sys16_onetime); | |
| 2033 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)device->machine->driver_data; | |
| 2034 | ||
| 2035 | /* upd7759 callback */ | |
| 2036 | cpu_set_input_line(state->soundcpu, INPUT_LINE_NMI, PULSE_LINE); | |
| 1684 | 2037 | } |
| 1685 | 2038 | |
| 1686 | 2039 | |
| 1687 | /***************************************************************************/ | |
| 2040 | const upd7759_interface sys16_upd7759_interface = | |
| 2041 | { | |
| 2042 | sound_cause_nmi | |
| 2043 | }; | |
| 1688 | 2044 | |
| 1689 | static INPUT_PORTS_START( tetris ) | |
| 1690 | PORT_INCLUDE( sys16_common ) /* unconfirmed coinage dip */ | |
| 1691 | 2045 | |
| 1692 | PORT_START("DSW2") | |
| 1693 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ | |
| 1694 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 1695 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1696 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1697 | /* From the code SW2:3,4 looks like some kind of difficulty level, | |
| 1698 | but all 4 levels points to the same place so it doesn't actually change anything!! */ | |
| 1699 | PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW2:3" ) /* Listed as "Unused" */ | |
| 1700 | PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" ) /* Listed as "Unused" */ | |
| 1701 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6") | |
| 1702 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 1703 | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) | |
| 1704 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 1705 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1706 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) /* Listed as "Unused" */ | |
| 1707 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Listed as "Unused" */ | |
| 1708 | INPUT_PORTS_END | |
| 2046 | static MACHINE_DRIVER_START( system16_7759 ) | |
| 1709 | 2047 | |
| 1710 | /***************************************************************************/ | |
| 2048 | /* basic machine hardware */ | |
| 2049 | MDRV_IMPORT_FROM(system16) | |
| 1711 | 2050 | |
| 2051 | MDRV_CPU_MODIFY("soundcpu") | |
| 2052 | MDRV_CPU_PROGRAM_MAP(sound_7759_map) | |
| 2053 | MDRV_CPU_IO_MAP(sound_7759_io_map) | |
| 1712 | 2054 | |
| 1713 | static MACHINE_DRIVER_START( tetrisbl ) | |
| 2055 | /* sound hardware */ | |
| 2056 | MDRV_SOUND_ADD("7759", UPD7759, UPD7759_STANDARD_CLOCK) | |
| 2057 | MDRV_SOUND_CONFIG(sys16_upd7759_interface) | |
| 2058 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.48) | |
| 2059 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.48) | |
| 2060 | MACHINE_DRIVER_END | |
| 1714 | 2061 | |
| 2062 | ||
| 2063 | static MACHINE_DRIVER_START( system16_datsu_sound ) | |
| 2064 | /* TODO: | |
| 2065 | - other games might use this sound configuration | |
| 2066 | - speaker is likely to be mono for the bootlegs, not stereo. | |
| 2067 | - check msm5205 frequency. | |
| 2068 | */ | |
| 2069 | MDRV_CPU_ADD("soundcpu",Z80, 4000000) | |
| 2070 | MDRV_CPU_PROGRAM_MAP(tturfbl_sound_map) | |
| 2071 | MDRV_CPU_IO_MAP(tturfbl_sound_io_map) | |
| 2072 | ||
| 2073 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") | |
| 2074 | ||
| 2075 | MDRV_SOUND_ADD("ymsnd", YM2151, 4000000) | |
| 2076 | MDRV_SOUND_ROUTE(0, "lspeaker", 0.32) | |
| 2077 | MDRV_SOUND_ROUTE(1, "rspeaker", 0.32) | |
| 2078 | ||
| 2079 | MDRV_SOUND_ADD("5205", MSM5205, 220000) | |
| 2080 | MDRV_SOUND_CONFIG(tturfbl_msm5205_interface) | |
| 2081 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.80) | |
| 2082 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80) | |
| 2083 | MACHINE_DRIVER_END | |
| 2084 | ||
| 2085 | ||
| 2086 | static MACHINE_DRIVER_START( shinobib ) | |
| 2087 | ||
| 1715 | 2088 | /* basic machine hardware */ |
| 1716 | 2089 | MDRV_IMPORT_FROM(system16) |
| 1717 | 2090 | MDRV_CPU_MODIFY("maincpu") |
| 1718 | MDRV_CPU_PROGRAM_MAP(tetrisbl_map) | |
| 2091 | MDRV_CPU_PROGRAM_MAP(shinobib_map) | |
| 2092 | ||
| 2093 | MDRV_VIDEO_START( s16a_bootleg_shinobi ) | |
| 2094 | MDRV_VIDEO_UPDATE( s16a_bootleg ) | |
| 1719 | 2095 | MACHINE_DRIVER_END |
| 1720 | 2096 | |
| 1721 | static MACHINE_DRIVER_START( | |
| 2097 | static MACHINE_DRIVER_START( p | |
| 1722 | 2098 | |
| 1723 | 2099 | /* basic machine hardware */ |
| 2100 | MDRV_IMPORT_FROM(system16_7759) | |
| 2101 | MDRV_CPU_MODIFY("maincpu") | |
| 2102 | MDRV_CPU_PROGRAM_MAP(passshtb_map) | |
| 2103 | ||
| 2104 | MDRV_VIDEO_START( s16a_bootleg_passsht ) | |
| 2105 | MDRV_VIDEO_UPDATE( s16a_bootleg ) | |
| 2106 | MACHINE_DRIVER_END | |
| 2107 | ||
| 2108 | ||
| 2109 | static MACHINE_DRIVER_START( passsht4b ) | |
| 2110 | ||
| 2111 | /* basic machine hardware */ | |
| 2112 | MDRV_IMPORT_FROM(system16_7759) | |
| 2113 | MDRV_CPU_MODIFY("maincpu") | |
| 2114 | MDRV_CPU_PROGRAM_MAP(passht4b_map) | |
| 2115 | ||
| 2116 | MDRV_VIDEO_START( s16a_bootleg_passsht ) | |
| 2117 | MDRV_VIDEO_UPDATE( s16a_bootleg_passht4b ) | |
| 2118 | MACHINE_DRIVER_END | |
| 2119 | ||
| 2120 | static MACHINE_DRIVER_START( wb3bb ) | |
| 2121 | ||
| 2122 | /* basic machine hardware */ | |
| 1724 | 2123 | MDRV_IMPORT_FROM(system16) |
| 1725 | 2124 | MDRV_CPU_MODIFY("maincpu") |
| 1726 | MDRV_CPU_PROGRAM_MAP(beautyb_map) | |
| 2125 | MDRV_CPU_PROGRAM_MAP(wb3bbl_map) | |
| 2126 | ||
| 2127 | MDRV_VIDEO_START( s16a_bootleg_wb3bl ) | |
| 2128 | MDRV_VIDEO_UPDATE( s16a_bootleg ) | |
| 1727 | 2129 | MACHINE_DRIVER_END |
| 1728 | 2130 | |
| 1729 | /***************************************************************************/ | |
| 1730 | 2131 | |
| 1731 | static INPUT_PORTS_START( tturf ) | |
| 1732 | PORT_INCLUDE( sys16_common ) | |
| 2132 | static MACHINE_DRIVER_START( goldnaxeb1 ) | |
| 1733 | 2133 | |
| 1734 | PORT_START("DSW2") | |
| 1735 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Continues ) ) PORT_DIPLOCATION("SW2:1,2") | |
| 1736 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1737 | PORT_DIPSETTING( 0x01, "3" ) | |
| 1738 | PORT_DIPSETTING( 0x02, "Unlimited" ) | |
| 1739 | PORT_DIPSETTING( 0x03, "Unlimited" ) | |
| 1740 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 1741 | PORT_DIPSETTING( 0x08, DEF_STR( Easy ) ) | |
| 1742 | PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) | |
| 1743 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) | |
| 1744 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1745 | PORT_DIPNAME( 0x30, 0x20, "Starting Energy" ) PORT_DIPLOCATION("SW2:5,6") | |
| 1746 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1747 | PORT_DIPSETTING( 0x10, "4" ) | |
| 1748 | PORT_DIPSETTING( 0x20, "6" ) | |
| 1749 | PORT_DIPSETTING( 0x30, "8" ) | |
| 1750 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:7") | |
| 1751 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1752 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1753 | PORT_DIPNAME( 0x80, 0x00, "Bonus Energy" ) PORT_DIPLOCATION("SW2:8") | |
| 1754 | PORT_DIPSETTING( 0x80, "1" ) | |
| 1755 | PORT_DIPSETTING( 0x00, "2" ) | |
| 1756 | INPUT_PORTS_END | |
| 2134 | /* driver data */ | |
| 2135 | MDRV_DRIVER_DATA(segas1x_bootleg_state) | |
| 1757 | 2136 | |
| 2137 | /* basic machine hardware */ | |
| 2138 | MDRV_CPU_ADD("maincpu", M68000, 10000000) | |
| 2139 | MDRV_CPU_PROGRAM_MAP(goldnaxeb1_map) | |
| 2140 | MDRV_CPU_VBLANK_INT("screen", sys16_interrupt) | |
| 1758 | 2141 | |
| 1759 | /***************************************************************************/ | |
| 2142 | /* video hardware */ | |
| 2143 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 2144 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 2145 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 2146 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 2147 | MDRV_SCREEN_SIZE(40*8, 28*8) | |
| 2148 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) | |
| 1760 | 2149 | |
| 1761 | static ADDRESS_MAP_START( tturfbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1762 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 1763 | AM_RANGE(0x200000, 0x203fff) AM_RAM // work ram | |
| 1764 | AM_RANGE(0x300000, 0x300fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 1765 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 1766 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 1767 | AM_RANGE(0x500000, 0x500fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 1768 | AM_RANGE(0x600000, 0x600001) AM_WRITE(sys16_coinctrl_w) | |
| 1769 | AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2") | |
| 1770 | AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1") | |
| 1771 | AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_w) | |
| 1772 | AM_RANGE(0x601000, 0x601001) AM_READ_PORT("SERVICE") | |
| 1773 | AM_RANGE(0x601002, 0x601003) AM_READ_PORT("P1") | |
| 1774 | AM_RANGE(0x601004, 0x601005) AM_READ_PORT("P2") | |
| 1775 | AM_RANGE(0x602000, 0x602001) AM_READ_PORT("DSW2") | |
| 1776 | AM_RANGE(0x602002, 0x602003) AM_READ_PORT("DSW1") | |
| 1777 | AM_RANGE(0xc44000, 0xc44001) AM_WRITENOP | |
| 2150 | MDRV_GFXDECODE(sys16) | |
| 2151 | MDRV_PALETTE_LENGTH(2048*SHADOW_COLORS_MULTIPLIER) | |
| 1778 | 2152 | |
| 1779 | AM_RANGE(0xC46000, 0xC46001) AM_WRITE(sys16bootleg_fgscrolly_w) | |
| 1780 | AM_RANGE(0xC46008, 0xC46009) AM_WRITE(sys16bootleg_fgscrollx_w) | |
| 1781 | AM_RANGE(0xC46010, 0xC46011) AM_WRITE(sys16bootleg_bgscrolly_w) | |
| 1782 | AM_RANGE(0xC46018, 0xC46019) AM_WRITE(sys16bootleg_bgscrollx_w) | |
| 1783 | AM_RANGE(0xC46020, 0xC46021) AM_WRITE(datsu_page0_w) | |
| 1784 | AM_RANGE(0xc46022, 0xc46023) AM_WRITE(datsu_page1_w) | |
| 1785 | AM_RANGE(0xC46024, 0xC46025) AM_WRITE(datsu_page2_w) | |
| 1786 | AM_RANGE(0xC46026, 0xC46027) AM_WRITE(datsu_page3_w) | |
| 1787 | ADDRESS_MAP_END | |
| 2153 | MDRV_PALETTE_INIT( all_black ) | |
| 2154 | MDRV_VIDEO_START(system16) | |
| 2155 | MDRV_VIDEO_UPDATE(system16) | |
| 2156 | MACHINE_DRIVER_END | |
| 1788 | 2157 | |
| 1789 | /***************************************************************************/ | |
| 1790 | 2158 | |
| 1791 | static DRIVER_INIT( tturfbl ) | |
| 1792 | { | |
| 1793 | UINT8 *mem; | |
| 2159 | static MACHINE_DRIVER_START( goldnaxeb2 ) | |
| 2160 | /* basic machine hardware */ | |
| 2161 | MDRV_IMPORT_FROM(goldnaxeb1) | |
| 2162 | MDRV_CPU_MODIFY("maincpu") | |
| 2163 | MDRV_CPU_PROGRAM_MAP(goldnaxeb2_map) | |
| 2164 | MACHINE_DRIVER_END | |
| 1794 | 2165 | |
| 1795 | MACHINE_RESET_CALL(sys16_onetime); | |
| 1796 | 2166 | |
| 1797 | mem = memory_region(machine, "soundcpu"); | |
| 1798 | memcpy(mem, mem+0x10000, 0x8000); | |
| 1799 | } | |
| 2167 | static MACHINE_DRIVER_START( bayrouteb1 ) | |
| 2168 | /* basic machine hardware */ | |
| 2169 | MDRV_IMPORT_FROM(goldnaxeb1) | |
| 2170 | MDRV_CPU_MODIFY("maincpu") | |
| 2171 | MDRV_CPU_PROGRAM_MAP(bayrouteb1_map) | |
| 2172 | MACHINE_DRIVER_END | |
| 1800 | 2173 | |
| 1801 | /***************************************************************************/ | |
| 2174 | static MACHINE_DRIVER_START( bayrouteb2 ) | |
| 2175 | /* basic machine hardware */ | |
| 2176 | MDRV_IMPORT_FROM(goldnaxeb1) | |
| 2177 | MDRV_CPU_MODIFY("maincpu") | |
| 2178 | MDRV_CPU_PROGRAM_MAP(bayrouteb2_map) | |
| 1802 | 2179 | |
| 2180 | MDRV_IMPORT_FROM(system16_datsu_sound) | |
| 2181 | MACHINE_DRIVER_END | |
| 2182 | ||
| 1803 | 2183 | static MACHINE_DRIVER_START( tturfbl ) |
| 1804 | 2184 | |
| 1805 | 2185 | /* basic machine hardware */ |
| r7356 | r7357 | |
| 1818 | 2198 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80) |
| 1819 | 2199 | MACHINE_DRIVER_END |
| 1820 | 2200 | |
| 2201 | static MACHINE_DRIVER_START( dduxbl ) | |
| 1821 | 2202 | |
| 1822 | /***************************************************************************/ | |
| 2203 | /* basic machine hardware */ | |
| 2204 | MDRV_IMPORT_FROM(system16) | |
| 2205 | MDRV_CPU_MODIFY("maincpu") | |
| 2206 | MDRV_CPU_PROGRAM_MAP(dduxbl_map) | |
| 2207 | MACHINE_DRIVER_END | |
| 1823 | 2208 | |
| 1824 | static INPUT_PORTS_START( wb3b ) | |
| 1825 | PORT_INCLUDE( sys16_common ) | |
| 2209 | static MACHINE_DRIVER_START( eswatbl ) | |
| 1826 | 2210 | |
| 1827 | PORT_START("DSW2") | |
| 1828 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ | |
| 1829 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") | |
| 1830 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1831 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1832 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 1833 | PORT_DIPSETTING( 0x00, "2" ) | |
| 1834 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 1835 | PORT_DIPSETTING( 0x08, "4" ) | |
| 1836 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1837 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:5") | |
| 1838 | PORT_DIPSETTING( 0x10, "50k/100k/180k/300k" ) | |
| 1839 | PORT_DIPSETTING( 0x00, "50k/150k/300k" ) | |
| 1840 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:6") | |
| 1841 | PORT_DIPSETTING( 0x20, DEF_STR( Normal ) ) | |
| 1842 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 1843 | PORT_DIPNAME( 0x40, 0x40, "Test Mode" ) PORT_DIPLOCATION("SW2:7") | |
| 1844 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) /* Normal game */ | |
| 1845 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) /* Levels are selectable / Player is Invincible */ | |
| 1846 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Listed as "Unused" */ | |
| 1847 | INPUT_PORTS_END | |
| 2211 | /* basic machine hardware */ | |
| 2212 | MDRV_IMPORT_FROM(system16_7759) | |
| 2213 | MDRV_CPU_MODIFY("maincpu") | |
| 2214 | MDRV_CPU_PROGRAM_MAP(eswatbl_map) | |
| 2215 | MACHINE_DRIVER_END | |
| 1848 | 2216 | |
| 1849 | ||
| 2217 | static MACHINE_DRIVER_START( fpointbl ) | |
| 1850 | 2218 | |
| 1851 | static ADDRESS_MAP_START( wb3bbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1852 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 1853 | AM_RANGE(0x3f0000, 0x3fffff) AM_WRITE(sys16_tilebank_w) | |
| 1854 | AM_RANGE(0x400000, 0x407fff) AM_RAM // tilemap ram on the original, used as a buffer on the bootlegs | |
| 1855 | AM_RANGE(0x409000, 0x40afff) AM_RAM AM_BASE(&system16a_bootleg_bg0_tileram) | |
| 1856 | AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram) | |
| 1857 | AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram) | |
| 1858 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 1859 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 1860 | AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) | |
| 1861 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 1862 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 1863 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") | |
| 1864 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") | |
| 1865 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") | |
| 1866 | AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w) | |
| 1867 | AM_RANGE(0xC44000, 0xC44001) AM_WRITENOP | |
| 1868 | AM_RANGE(0xc46000, 0xc46001) AM_WRITE(system16a_bootleg_bgscrolly_w) | |
| 1869 | AM_RANGE(0xc46002, 0xc46003) AM_WRITE(system16a_bootleg_bgscrollx_w) | |
| 1870 | AM_RANGE(0xc46004, 0xc46005) AM_WRITE(system16a_bootleg_fgscrolly_w) | |
| 1871 | AM_RANGE(0xc46006, 0xc46007) AM_WRITE(system16a_bootleg_fgscrollx_w) | |
| 1872 | AM_RANGE(0xc46008, 0xc46009) AM_WRITE(system16a_bootleg_tilemapselect_w) | |
| 1873 | AM_RANGE(0xff0000, 0xffffff) AM_RAM // work ram | |
| 1874 | ADDRESS_MAP_END | |
| 2219 | /* basic machine hardware */ | |
| 2220 | MDRV_IMPORT_FROM(system16) | |
| 2221 | MDRV_CPU_MODIFY("maincpu") | |
| 2222 | MDRV_CPU_PROGRAM_MAP(fpointbl_map) | |
| 1875 | 2223 | |
| 1876 | /***************************************************************************/ | |
| 2224 | MDRV_CPU_MODIFY("soundcpu") | |
| 2225 | MDRV_CPU_PROGRAM_MAP(fpointbl_sound_map) | |
| 2226 | MACHINE_DRIVER_END | |
| 1877 | 2227 | |
| 1878 | static DRIVER_INIT( wb3bbl ) | |
| 1879 | { | |
| 1880 | MACHINE_RESET_CALL(sys16_onetime); | |
| 1881 | } | |
| 2228 | static MACHINE_DRIVER_START( tetrisbl ) | |
| 1882 | 2229 | |
| 1883 | /***************************************************************************/ | |
| 2230 | /* basic machine hardware */ | |
| 2231 | MDRV_IMPORT_FROM(system16) | |
| 2232 | MDRV_CPU_MODIFY("maincpu") | |
| 2233 | MDRV_CPU_PROGRAM_MAP(tetrisbl_map) | |
| 2234 | MACHINE_DRIVER_END | |
| 1884 | 2235 | |
| 1885 | static MACHINE_DRIVER_START( system16a_bootleg_wb3 ) | |
| 1886 | 2236 | |
| 2237 | static MACHINE_DRIVER_START( beautyb ) | |
| 2238 | ||
| 1887 | 2239 | /* basic machine hardware */ |
| 1888 | 2240 | MDRV_IMPORT_FROM(system16) |
| 1889 | 2241 | MDRV_CPU_MODIFY("maincpu") |
| 1890 | MDRV_CPU_PROGRAM_MAP(wb3bbl_map) | |
| 2242 | MDRV_CPU_PROGRAM_MAP(beautyb_map) | |
| 2243 | MACHINE_DRIVER_END | |
| 1891 | 2244 | |
| 1892 | MDRV_VIDEO_START( system16a_bootleg_wb3bl ) | |
| 1893 | MDRV_VIDEO_UPDATE( system16a_bootleg ) | |
| 2245 | ||
| 2246 | /* System 18 Bootlegs */ | |
| 2247 | static MACHINE_DRIVER_START( system18 ) | |
| 2248 | ||
| 2249 | /* driver data */ | |
| 2250 | MDRV_DRIVER_DATA(segas1x_bootleg_state) | |
| 2251 | ||
| 2252 | /* basic machine hardware */ | |
| 2253 | MDRV_CPU_ADD("maincpu", M68000, 10000000) | |
| 2254 | MDRV_CPU_VBLANK_INT("screen", irq4_line_hold) | |
| 2255 | ||
| 2256 | MDRV_CPU_ADD("soundcpu", Z80, 8000000) | |
| 2257 | MDRV_CPU_PROGRAM_MAP(sound_18_map) | |
| 2258 | MDRV_CPU_IO_MAP(sound_18_io_map) | |
| 2259 | ||
| 2260 | /* video hardware */ | |
| 2261 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 2262 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 2263 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 2264 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 2265 | MDRV_SCREEN_SIZE(40*8, 28*8) | |
| 2266 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) | |
| 2267 | ||
| 2268 | MDRV_GFXDECODE(sys16) | |
| 2269 | MDRV_PALETTE_LENGTH((2048+2048)*SHADOW_COLORS_MULTIPLIER) // 64 extra colours for vdp (but we use 2048 so shadow mask works) | |
| 2270 | ||
| 2271 | MDRV_VIDEO_START(system18old) | |
| 2272 | MDRV_VIDEO_UPDATE(system18old) | |
| 2273 | ||
| 2274 | /* sound hardware */ | |
| 2275 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") | |
| 2276 | ||
| 2277 | MDRV_SOUND_ADD("3438.0", YM3438, 8000000) | |
| 2278 | MDRV_SOUND_ROUTE(0, "lspeaker", 0.40) | |
| 2279 | MDRV_SOUND_ROUTE(1, "rspeaker", 0.40) | |
| 2280 | MDRV_SOUND_ROUTE(2, "lspeaker", 0.40) | |
| 2281 | MDRV_SOUND_ROUTE(3, "rspeaker", 0.40) | |
| 2282 | ||
| 2283 | MDRV_SOUND_ADD("3438.1", YM3438, 8000000) | |
| 2284 | MDRV_SOUND_ROUTE(0, "lspeaker", 0.40) | |
| 2285 | MDRV_SOUND_ROUTE(1, "rspeaker", 0.40) | |
| 2286 | MDRV_SOUND_ROUTE(2, "lspeaker", 0.40) | |
| 2287 | MDRV_SOUND_ROUTE(3, "rspeaker", 0.40) | |
| 2288 | ||
| 2289 | MDRV_SOUND_ADD("5c68", RF5C68, 8000000) | |
| 2290 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) | |
| 2291 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) | |
| 1894 | 2292 | MACHINE_DRIVER_END |
| 1895 | 2293 | |
| 1896 | /*****************************************************************************/ | |
| 1897 | 2294 | |
| 2295 | static MACHINE_DRIVER_START( astormbl ) | |
| 2296 | ||
| 2297 | /* basic machine hardware */ | |
| 2298 | MDRV_IMPORT_FROM(system18) | |
| 2299 | MDRV_CPU_MODIFY("maincpu") | |
| 2300 | MDRV_CPU_PROGRAM_MAP(astormbl_map) | |
| 2301 | MACHINE_DRIVER_END | |
| 2302 | ||
| 2303 | ||
| 2304 | static MACHINE_DRIVER_START( mwalkbl ) | |
| 2305 | ||
| 2306 | /* basic machine hardware */ | |
| 2307 | MDRV_IMPORT_FROM(system18) | |
| 2308 | MDRV_CPU_MODIFY("maincpu") | |
| 2309 | MDRV_CPU_PROGRAM_MAP(mwalkbl_map) | |
| 2310 | MACHINE_DRIVER_END | |
| 2311 | ||
| 2312 | ||
| 2313 | static MACHINE_DRIVER_START( shdancbl ) | |
| 2314 | ||
| 2315 | /* basic machine hardware */ | |
| 2316 | MDRV_IMPORT_FROM(system18) | |
| 2317 | MDRV_CPU_MODIFY("maincpu") | |
| 2318 | MDRV_CPU_PROGRAM_MAP(shdancbl_map) | |
| 2319 | ||
| 2320 | MDRV_CPU_MODIFY("soundcpu") | |
| 2321 | MDRV_CPU_PROGRAM_MAP(shdancbl_sound_map) | |
| 2322 | MDRV_CPU_IO_MAP(shdancbl_sound_io_map) | |
| 2323 | MDRV_DEVICE_REMOVE("5c68") | |
| 2324 | ||
| 2325 | MDRV_SOUND_ADD("5205", MSM5205, 200000) | |
| 2326 | MDRV_SOUND_CONFIG(shdancbl_msm5205_interface) | |
| 2327 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.80) | |
| 2328 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80) | |
| 2329 | MACHINE_DRIVER_END | |
| 2330 | ||
| 2331 | ||
| 2332 | /************************************* | |
| 2333 | * | |
| 2334 | * ROM definition(s) | |
| 2335 | * | |
| 2336 | *************************************/ | |
| 2337 | ||
| 2338 | /****************************** | |
| 2339 | System 16A Bootlegs | |
| 2340 | ******************************/ | |
| 2341 | ||
| 2342 | /* Shinobi bootleg by 'Datsu' - Sound hardware is different */ | |
| 2343 | ROM_START( shinobld ) | |
| 2344 | ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */ | |
| 2345 | ROM_LOAD16_BYTE( "12.bin", 0x000001, 0x10000, CRC(757a0c71) SHA1(8f476b0fd5f5dd480489af09b99585c58a4801fc) ) | |
| 2346 | ROM_LOAD16_BYTE( "14.bin", 0x000000, 0x10000, CRC(a65870b2) SHA1(3e9b4aa694bf86ef9db4756ebaa3d8d87d7f269a) ) | |
| 2347 | ROM_LOAD16_BYTE( "13.bin", 0x020001, 0x10000, CRC(c4334bcd) SHA1(ea1dd23ca6fbf632d8e10bbb9ced6515a69bd14a) ) | |
| 2348 | ROM_LOAD16_BYTE( "15.bin", 0x020000, 0x10000, CRC(b70a6ec1) SHA1(79db41c36d6a053bcdc355b46b19ae938a7755a9) ) | |
| 2349 | ||
| 2350 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ | |
| 2351 | ROM_LOAD( "9.bin", 0x00000, 0x10000, CRC(565e11c6) SHA1(e063400b3d0470b932d75da0be9cd4b446189dea) ) | |
| 2352 | ROM_LOAD( "10.bin", 0x10000, 0x10000, CRC(7cc40b6c) SHA1(ffad7eef7ab2ff9a2e49a8d71b5785a61fa3c675) ) | |
| 2353 | ROM_LOAD( "11.bin", 0x20000, 0x10000, CRC(0f6c7b1c) SHA1(defc76592c285b3396e89a3cff7a73f3a948117f) ) | |
| 2354 | ||
| 2355 | ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ | |
| 2356 | ROM_LOAD16_BYTE( "5.bin", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) ) | |
| 2357 | ROM_LOAD16_BYTE( "3.bin", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) ) | |
| 2358 | ROM_LOAD16_BYTE( "8.bin", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) ) | |
| 2359 | ROM_LOAD16_BYTE( "2.bin", 0x20000, 0x10000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) ) | |
| 2360 | ROM_LOAD16_BYTE( "6.bin", 0x40001, 0x10000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) ) | |
| 2361 | ROM_LOAD16_BYTE( "4.bin", 0x40000, 0x10000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) ) | |
| 2362 | ROM_LOAD16_BYTE( "7.bin", 0x60001, 0x10000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) ) | |
| 2363 | ROM_LOAD16_BYTE( "1.bin", 0x60000, 0x10000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) ) | |
| 2364 | ||
| 2365 | ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU + data */ | |
| 2366 | ROM_LOAD( "16.bin", 0x0000, 0x10000, CRC(52c8364e) SHA1(01d30b82f92498d155d2e31d43d58dff0285cce3) ) | |
| 2367 | ROM_END | |
| 2368 | ||
| 2369 | /* Passing Shot Bootleg is a decrypted version of Passing Shot Japanese (passshtj). It has been heavily modified */ | |
| 2370 | ROM_START( passshtb ) | |
| 2371 | ROM_REGION( 0x020000, "maincpu", 0 ) /* 68000 code */ | |
| 2372 | ROM_LOAD16_BYTE( "pass3_2p.bin", 0x000000, 0x10000, CRC(26bb9299) SHA1(11bacf86dfdd8bcfbfb61f0ebc59890325c48adc) ) | |
| 2373 | ROM_LOAD16_BYTE( "pass4_2p.bin", 0x000001, 0x10000, CRC(06ac6d5d) SHA1(2dd71a8a956404326797de8beed7bca016c9919e) ) | |
| 2374 | ||
| 2375 | ROM_REGION( 0x30000, "gfx1", 0 ) /* tiles */ | |
| 2376 | ROM_LOAD( "opr11854.b9", 0x00000, 0x10000, CRC(d31c0b6c) SHA1(610d04988da70c30300cc5614817eda9d2204f39) ) | |
| 2377 | ROM_LOAD( "opr11855.b10", 0x10000, 0x10000, CRC(b78762b4) SHA1(d594ef846bd7fed8da91a89906b39c1a2867a1fe) ) | |
| 2378 | ROM_LOAD( "opr11856.b11", 0x20000, 0x10000, CRC(ea49f666) SHA1(36ccd32cdcbb7fcc300628bb59c220ec3c324d82) ) | |
| 2379 | ||
| 2380 | ROM_REGION16_BE( 0x80000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ | |
| 2381 | ROM_LOAD16_BYTE( "opr11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) | |
| 2382 | ROM_LOAD16_BYTE( "opr11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) | |
| 2383 | ROM_LOAD16_BYTE( "opr11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) ) | |
| 2384 | ROM_LOAD16_BYTE( "opr11866.b6", 0x20000, 0x10000, CRC(50eb71cc) SHA1(463b4917ca19c7f4ad2c2845caa104d5e4a2dda3) ) | |
| 2385 | ROM_LOAD16_BYTE( "opr11864.b3", 0x40001, 0x10000, CRC(05733ca8) SHA1(1dbc7c99450ebe6a9fd8c0244fd3cb38b74984ef) ) | |
| 2386 | ROM_LOAD16_BYTE( "opr11867.b7", 0x40000, 0x10000, CRC(81e49697) SHA1(a70fa409e3555ad6c8f28930a7026fdf2deb8c65) ) | |
| 2387 | ||
| 2388 | ROM_REGION( 0x30000, "soundcpu", 0 ) /* sound CPU */ | |
| 2389 | ROM_LOAD( "epr11857.a7", 0x00000, 0x08000, CRC(789edc06) SHA1(8c89c94e503513c287807d187de78a7fbd75a7cf) ) | |
| 2390 | ROM_LOAD( "epr11858.a8", 0x10000, 0x08000, CRC(08ab0018) SHA1(0685f80a7d403208c9cfffea3f2035324f3924fe) ) | |
| 2391 | ROM_LOAD( "epr11859.a9", 0x18000, 0x08000, CRC(8673e01b) SHA1(e79183ab30e683fdf61ced2e9dbe010567c324cb) ) | |
| 2392 | ROM_LOAD( "epr11860.a10", 0x20000, 0x08000, CRC(10263746) SHA1(1f981fb185c6a9795208ecdcfba36cf892a99ed5) ) | |
| 2393 | ROM_LOAD( "epr11861.a11", 0x28000, 0x08000, CRC(38b54a71) SHA1(68ec4ef5b115844214ff2213be1ce6678904fbd2) ) | |
| 2394 | ROM_END | |
| 2395 | ||
| 2396 | ROM_START( passht4b ) | |
| 2397 | ROM_REGION( 0x20000, "maincpu", 0 ) /* 68000 code */ | |
| 2398 | ROM_LOAD16_BYTE( "pas4p.3", 0x000000, 0x10000, CRC(2d8bc946) SHA1(35d3e529d4815543d9876fd0545c3d686467abaa) ) | |
| 2399 | ROM_LOAD16_BYTE( "pas4p.4", 0x000001, 0x10000, CRC(e759e831) SHA1(dd5727dc28010cb988e4951723171171eb645ce8) ) | |
| 2400 | ||
| 2401 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ | |
| 2402 | ROM_LOAD( "pas4p.11", 0x00000, 0x10000, CRC(da20fbc9) SHA1(21dc8143f4d1cebae4f86e83495fa84e5293ba48) ) | |
| 2403 | ROM_LOAD( "pas4p.12", 0x10000, 0x10000, CRC(bebb9211) SHA1(4f56048f6f70b63f74a4c0d64456213d36ce5b26) ) | |
| 2404 | ROM_LOAD( "pas4p.13", 0x20000, 0x10000, CRC(e37506c3) SHA1(e6fbf15d58f321a3d052fefbe5a1901e4a1734ae) ) | |
| 2405 | ||
| 2406 | ROM_REGION16_BE( 0x60000, "gfx2", 0 ) /* sprites */ | |
| 2407 | ROM_LOAD16_BYTE( "opr11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) | |
| 2408 | ROM_LOAD16_BYTE( "opr11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) | |
| 2409 | ROM_LOAD16_BYTE( "opr11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) ) | |
| 2410 | ROM_LOAD16_BYTE( "opr11866.b6", 0x20000, 0x10000, CRC(50eb71cc) SHA1(463b4917ca19c7f4ad2c2845caa104d5e4a2dda3) ) | |
| 2411 | ROM_LOAD16_BYTE( "opr11864.b3", 0x40001, 0x10000, CRC(05733ca8) SHA1(1dbc7c99450ebe6a9fd8c0244fd3cb38b74984ef) ) | |
| 2412 | ROM_LOAD16_BYTE( "opr11867.b7", 0x40000, 0x10000, CRC(81e49697) SHA1(a70fa409e3555ad6c8f28930a7026fdf2deb8c65) ) | |
| 2413 | ||
| 2414 | ROM_REGION( 0x20000, "soundcpu", 0 ) /* sound CPU */ | |
| 2415 | ROM_LOAD( "pas4p.1", 0x00000, 0x08000, CRC(e60fb017) SHA1(21298036eab55c74427f1c2e3a9623d41bca4849) ) | |
| 2416 | ROM_LOAD( "pas4p.2", 0x10000, 0x10000, CRC(092e016e) SHA1(713638749efa9dce19c547b84308236110bc85fe) ) | |
| 2417 | ROM_END | |
| 2418 | ||
| 2419 | ROM_START( wb3bbl ) | |
| 2420 | ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */ | |
| 2421 | ROM_LOAD16_BYTE( "wb3_03", 0x000000, 0x10000, CRC(0019ab3b) SHA1(89d49a437690fa6e0c35bb9f1450042f89504714) ) | |
| 2422 | ROM_LOAD16_BYTE( "wb3_05", 0x000001, 0x10000, CRC(196e17ee) SHA1(71e4345b2c3d1612a3d424c9310fad1e23c8a9f7) ) | |
| 2423 | ROM_LOAD16_BYTE( "wb3_02", 0x020000, 0x10000, CRC(c87350cb) SHA1(55a8cb68d70b6060dd9a55e281e216ce3917ea5b) ) | |
| 2424 | ROM_LOAD16_BYTE( "wb3_04", 0x020001, 0x10000, CRC(565d5035) SHA1(e28a132f1a4ce9466945e231c54502178748af98) ) | |
| 2425 | ||
| 2426 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ | |
| 2427 | ROM_LOAD( "wb3_14", 0x00000, 0x10000, CRC(d3f20bca) SHA1(0a87f709f8e2a913473512ede408e2cbc535443f) ) | |
| 2428 | ROM_LOAD( "wb3_15", 0x10000, 0x10000, CRC(96ff9d52) SHA1(791a9da4860e0d42fba98f80a3c6725ad8c73e33) ) | |
| 2429 | ROM_LOAD( "wb3_16", 0x20000, 0x10000, CRC(afaf0d31) SHA1(d4309329a0a543250788146b63b27ff058c02fc3) ) | |
| 2430 | ||
| 2431 | ROM_REGION16_BE( 0x100000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ | |
| 2432 | ROM_LOAD16_BYTE( "epr12090.b1", 0x00001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) ) | |
| 2433 | ROM_LOAD16_BYTE( "epr12094.b5", 0x00000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) ) | |
| 2434 | ROM_LOAD16_BYTE( "epr12091.b2", 0x20001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) ) | |
| 2435 | ROM_LOAD16_BYTE( "epr12095.b6", 0x20000, 0x010000, CRC(e774ec2c) SHA1(a4aa15ec7be5539a740ad02ff720458018dbc536) ) | |
| 2436 | ROM_LOAD16_BYTE( "epr12092.b3", 0x40001, 0x010000, CRC(5c2f0d90) SHA1(e0fbc0f841e4607ad232931368b16e81440a75c4) ) | |
| 2437 | ROM_LOAD16_BYTE( "epr12096.b7", 0x40000, 0x010000, CRC(0cd59d6e) SHA1(caf754a461feffafcfe7bfc6e89da76c4db257c5) ) | |
| 2438 | ROM_LOAD16_BYTE( "epr12093.b4", 0x60001, 0x010000, CRC(4891e7bb) SHA1(1be04fcabe9bfa8cf746263a5bcca67902a021a0) ) | |
| 2439 | ROM_LOAD16_BYTE( "epr12097.b8", 0x60000, 0x010000, CRC(e645902c) SHA1(497cfcf6c25cc2e042e16dbcb1963d2223def15a) ) | |
| 2440 | ||
| 2441 | ||
| 2442 | ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */ | |
| 2443 | ROM_LOAD( "epr12127.a10", 0x0000, 0x8000, CRC(0bb901bb) SHA1(c81b198df8e3b0ec568032c76addf0d1a1711194) ) | |
| 2444 | ROM_END | |
| 2445 | ||
| 2446 | ||
| 2447 | /****************************** | |
| 2448 | System 16B Bootlegs | |
| 2449 | ******************************/ | |
| 2450 | ||
| 1898 | 2451 | // protected + encrypted bootleg |
| 1899 | 2452 | ROM_START( bayrouteb1 ) |
| 1900 | 2453 | ROM_REGION( 0xc0000, "maincpu", 0 ) /* 68000 code */ |
| r7356 | r7357 | |
| 1984 | 2537 | ROM_LOAD( "br_02", 0x20000, 0x10000, CRC(ef63991b) SHA1(4221741780f88c80b3213ddca949bee7d4c1469a) ) |
| 1985 | 2538 | ROM_END |
| 1986 | 2539 | |
| 1987 | // sys16B | |
| 1988 | ROM_START( dduxbl ) | |
| 1989 | ROM_REGION( 0x0c0000, "maincpu", 0 ) /* 68000 code */ | |
| 1990 | ROM_LOAD16_BYTE( "dduxb03.bin", 0x000000, 0x20000, CRC(e7526012) SHA1(a1798008bfa1ce9b87dc330f3817b1978052fcfd) ) | |
| 1991 | ROM_LOAD16_BYTE( "dduxb05.bin", 0x000001, 0x20000, CRC(459d1237) SHA1(55e9c0dc341c919d58cc789203642c397d7ac65e) ) | |
| 1992 | /* empty 0x40000 - 0x80000 */ | |
| 1993 | ROM_LOAD16_BYTE( "dduxb02.bin", 0x080000, 0x20000, CRC(d8ed3132) SHA1(a9d5ad8f79fb635cc234a99fad398688a5f15926) ) | |
| 1994 | ROM_LOAD16_BYTE( "dduxb04.bin", 0x080001, 0x20000, CRC(30c6cb92) SHA1(2e17c74eeb37c9731fc2e365cc0114f7383c0106) ) | |
| 2540 | /* | |
| 1995 | 2541 | |
| 1996 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ | |
| 1997 | ROM_LOAD( "dduxb14.bin", 0x00000, 0x10000, CRC(664bd135) SHA1(674b06e01c2c8f5b8057dd24d470330c3f140473) ) | |
| 1998 | ROM_LOAD( "dduxb15.bin", 0x10000, 0x10000, CRC(ce0d2b30) SHA1(e60521c46f1650c9bdc76f2ceb91a6d61aaa0a09) ) | |
| 1999 | ROM_LOAD( "dduxb16.bin", 0x20000, 0x10000, CRC(6de95434) SHA1(7bed2a0261cf6c2fbb3756633f05f0bb2173977c) ) | |
| 2542 | this is a more complete dump of the old encrypted bootleg set | |
| 2000 | 2543 | |
| 2001 | ROM_REGION16_BE( 0x100000, "gfx2", 0 ) //* sprites */ | |
| 2002 | ROM_LOAD16_BYTE( "dduxb06.bin", 0x00000, 0x010000, CRC(b0079e99) SHA1(9bb4d3fa804a3d05a6e06b45a1280d7064e96ac6) ) | |
| 2003 | ROM_LOAD16_BYTE( "dduxb10.bin", 0x00001, 0x010000, CRC(0be3aee5) SHA1(48fc779b7398abbb82cd0d0d28705ece75b3c4e3) ) | |
| 2004 | ROM_LOAD16_BYTE( "dduxb07.bin", 0x20000, 0x010000, CRC(0217369c) SHA1(b6ec2fa1279a27a602d79e1073c54193745ea816) ) | |
| 2005 | ROM_LOAD16_BYTE( "dduxb11.bin", 0x20001, 0x010000, CRC(cfb2af18) SHA1(1ad18f933a7b797f0364d1f4a6c8549351b4c9a6) ) | |
| 2006 | ROM_LOAD16_BYTE( "dduxb08.bin", 0x40000, 0x010000, CRC(8844f336) SHA1(18c1baaad3bcc658d4a6d03de8c97378b5284e88) ) | |
| 2007 | ROM_LOAD16_BYTE( "dduxb12.bin", 0x40001, 0x010000, CRC(28ce9b15) SHA1(1640df9c8f21893c0647ad2f4210c714a06e6f37) ) | |
| 2008 | ROM_LOAD16_BYTE( "dduxb09.bin", 0x60000, 0x010000, CRC(6b64f665) SHA1(df07fcf2bbec6fa78f89b95272762aebd6f3ec0e) ) | |
| 2009 | ROM_LOAD16_BYTE( "dduxb13.bin", 0x60001, 0x010000, CRC(efe57759) SHA1(69b8969b20ab9480df2735bd2bcd527069196bd7) ) | |
| 2544 | Golden Axe (different HW bottleg) | |
| 2010 | 2545 | |
| 2011 | ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */ | |
| 2012 | ROM_LOAD( "dduxb01.bin", 0x0000, 0x8000, CRC(0dbef0d7) SHA1(8b9afb2fcb946cec467b1e691c267194b503f841) ) | |
| 2013 | ROM_END | |
| 2546 | Anno 1989 | |
| 2547 | Produttore | |
| 2548 | N.revisione | |
| 2014 | 2549 | |
| 2015 | // sys16B | |
| 2016 | ROM_START( eswatbl ) | |
| 2017 | ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 code */ | |
| 2018 | ROM_LOAD16_BYTE( "eswat_c.rom", 0x000000, 0x10000, CRC(1028cc81) SHA1(24b4cd182419a44f3d6afa1c4273353024eb278f) ) | |
| 2019 | ROM_LOAD16_BYTE( "eswat_f.rom", 0x000001, 0x10000, CRC(f7b2d388) SHA1(8131ba8f4fa01751b9993c3c6c218c9bd3adb328) ) | |
| 2020 | ROM_LOAD16_BYTE( "eswat_b.rom", 0x020000, 0x10000, CRC(87c6b1b5) SHA1(a9f29e29a9c0e3daf272dce263a5fd7866642c77) ) | |
| 2021 | ROM_LOAD16_BYTE( "eswat_e.rom", 0x020001, 0x10000, CRC(937ddf9a) SHA1(9fc73f93e9c4221a4dc778593edc02cb405b2f78) ) | |
| 2022 | ROM_LOAD16_BYTE( "eswat_a.rom", 0x040000, 0x08000, CRC(2af4fc62) SHA1(f7b1539a5ab9560bd49dfecf44699abccfb649be) ) | |
| 2023 | ROM_LOAD16_BYTE( "eswat_d.rom", 0x040001, 0x08000, CRC(b4751e19) SHA1(57c9687dc864c163d13dbb89057cd42684a199cd) ) | |
| 2550 | CPU: | |
| 2551 | main PCB: | |
| 2552 | 1x 68000 (main)(missing) | |
| 2553 | 1x LH0080B-Z80B-CPU (sound) | |
| 2554 | 1x D7759C (sound) | |
| 2555 | 1x YM2151 (sound) | |
| 2556 | 1x YM3012 (sound) | |
| 2557 | 1x UPC1241H (sound) | |
| 2558 | 1x oscillator 20.000 (close to main) | |
| 2559 | 1x oscillator 24.000MHz (close to sound) | |
| 2560 | 1x blue resonator 655K (close to sound) | |
| 2024 | 2561 | |
| 2025 | ROM_REGION( 0xc0000, "gfx1", 0 ) /* tiles */ | |
| 2026 | ROM_LOAD( "mpr12624.b11", 0x00000, 0x40000, CRC(375a5ec4) SHA1(42b9116bdc0e0a5b1dd667ac1856b4c2252829ba) ) // ic19 | |
| 2027 | ROM_LOAD( "mpr12625.b12", 0x40000, 0x40000, CRC(3b8c757e) SHA1(0b66e8446d059a12e47e2a6fe8f0a333245bb95c) ) // ic20 | |
| 2028 | ROM_LOAD( "mpr12626.b13", 0x80000, 0x40000, CRC(3efca25c) SHA1(0d866bf53a16b52719f73081e933f4db27d72ece) ) // ic21 | |
| 2562 | ROMs: | |
| 2563 | main PCB: | |
| 2564 | 2x NMC27C512 (1,3) | |
| 2565 | 2x NMC27C256 (2,12) | |
| 2566 | 8x TMS27PC512 (4,5,6,7,8,9,10,11) | |
| 2029 | 2567 | |
| 2030 | ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */ | |
| 2031 | ROM_LOAD16_BYTE( "ic9", 0x000001, 0x20000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) ) | |
| 2032 | ROM_CONTINUE( 0x100001, 0x20000 ) | |
| 2033 | ROM_LOAD16_BYTE( "ic12", 0x000000, 0x20000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) ) | |
| 2034 | ROM_CONTINUE( 0x100000, 0x20000 ) | |
| 2035 | ROM_LOAD16_BYTE( "ic10", 0x040001, 0x20000, CRC(32069246) SHA1(4913009bc72bf4f8b171b14fe06457f5784cab15) ) | |
| 2036 | ROM_CONTINUE( 0x140001, 0x20000 ) | |
| 2037 | ROM_LOAD16_BYTE( "ic13", 0x040000, 0x20000, CRC(a3dfe436) SHA1(640ccc552114d403f35d441574d2f3e4f1d4a8f9) ) | |
| 2038 | ROM_CONTINUE( 0x140000, 0x20000 ) | |
| 2039 | ROM_LOAD16_BYTE( "ic11", 0x080001, 0x20000, CRC(f6b096e0) SHA1(695ad1adbdc29f4d614645867e16de038cf92709) ) | |
| 2040 | ROM_CONTINUE( 0x180001, 0x20000 ) | |
| 2041 | ROM_LOAD16_BYTE( "ic14", 0x080000, 0x20000, CRC(6773fef6) SHA1(91e646ea447be02254d060daf255d26afe0cc79e) ) | |
| 2042 | ROM_CONTINUE( 0x180000, 0x20000 ) | |
| 2568 | roms PCB: | |
| 2569 | 29x Am27C512 (13-32,34-42) | |
| 2570 | 1x NMC27C512 (33) | |
| 2571 | 1x PROM N82S129N | |
| 2043 | 2572 | |
| 2044 | ROM_REGION( 0x50000, "soundcpu", 0 ) /* sound CPU */ | |
| 2045 | ROM_LOAD( "epr12617.a13", 0x00000, 0x08000, CRC(7efecf23) SHA1(2b87af7cfaab5942a3f7b38c987fcba01d3475ab) ) // ic8 | |
| 2046 | ROM_LOAD( "mpr12616.a11", 0x10000, 0x40000, CRC(254347c2) SHA1(bf2d83a69a5be375c7e42e9f7d6e65c1095a354c) ) // ic6 | |
| 2047 | ROM_END | |
| 2048 | 2573 | |
| 2049 | // sys16B | |
| 2050 | ROM_START( fpointbl ) | |
| 2051 | ROM_REGION( 0x0c0000, "maincpu", 0 ) /* 68000 code */ | |
| 2052 | ROM_LOAD16_BYTE( "flpoint.003", 0x000000, 0x10000, CRC(4d6df514) SHA1(168aa1629ab7152ba1984605155406b236954a2c) ) | |
| 2053 | ROM_LOAD16_BYTE( "flpoint.002", 0x000001, 0x10000, CRC(4dff2ee8) SHA1(bd157d8c168d45e7490a05d5e1e901d9bdda9599) ) | |
| 2574 | RAMs: | |
| 2575 | main PCB: | |
| 2576 | 1x GM76C28 | |
| 2577 | 2x GM76C88 | |
| 2578 | 2x HM6116K | |
| 2054 | 2579 | |
| 2055 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ | |
| 2056 | ROM_LOAD( "flpoint.006", 0x00000, 0x10000, CRC(c539727d) SHA1(56674effe1d273128dddd2ff9e02974ec10f3fff) ) | |
| 2057 | ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) ) | |
| 2058 | ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) ) | |
| 2580 | roms PCB: | |
| 2581 | 8x LC3517BS | |
| 2582 | 2x 256K S BGD-A | |
| 2059 | 2583 | |
| 2060 | ROM_REGION16_BE( 0x20000, "gfx2", 0 ) /* sprites */ | |
| 2061 | ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) ) | |
| 2062 | ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) ) | |
| 2063 | 2584 | |
| 2064 | ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */ | |
| 2065 | ROM_LOAD( "flpoint.001", 0x0000, 0x8000, CRC(c5b8e0fe) SHA1(6cf8c67151d8604326fc6dbf976c0635b452a844) ) // bootleg rom doesn't work, but should be correct! | |
| 2066 | ROM_END | |
| 2585 | PLDs: | |
| 2586 | main PCB: | |
| 2587 | 3x PAL16L8ACN (not dumped) | |
| 2067 | 2588 | |
| 2068 | ROM_START( fpointbj ) | |
| 2069 | ROM_REGION( 0x0c0000, "maincpu", 0 ) /* 68000 code */ | |
| 2070 | ROM_LOAD16_BYTE( "boot2.003", 0x000000, 0x10000, CRC(6c00d1b0) SHA1(fd0c47b8ca010a64d3ef91980f93854ebc98fbda) ) | |
| 2071 | ROM_LOAD16_BYTE( "boot2.002", 0x000001, 0x10000, CRC(c1fcd704) SHA1(697bef464e53fb9891ed15ee2d6210107b693b20) ) | |
| 2589 | roms PCB: | |
| 2590 | 1x PEEL18CV8P (not dumped) | |
| 2072 | 2591 | |
| 2073 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ | |
| 2074 | ROM_LOAD( "flpoint.006", 0x00000, 0x10000, CRC(c539727d) SHA1(56674effe1d273128dddd2ff9e02974ec10f3fff) ) | |
| 2075 | ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) ) | |
| 2076 | ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) ) | |
| 2592 | Note | |
| 2593 | main PCB: | |
| 2594 | 1x JAMMA edge connector | |
| 2595 | 2x 50 pins flat cable connector to roms PCB | |
| 2596 | 1x trimmer (volume) | |
| 2597 | 2x 8x2 switches dip | |
| 2077 | 2598 | |
| 2078 | ROM_REGION16_BE( 0x20000, "gfx2", 0 ) /* sprites */ | |
| 2079 | ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) ) | |
| 2080 | ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) ) | |
| 2081 | ||
| 2082 | ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */ | |
| 2083 | ROM_LOAD( "flpoint.001", 0x0000, 0x8000, CRC(c5b8e0fe) SHA1(6cf8c67151d8604326fc6dbf976c0635b452a844) ) // bootleg rom doesn't work, but should be correct! | |
| 2084 | ||
| 2085 | /* stuff below isn't used but loaded because it was on the board .. */ | |
| 2086 | ROM_REGION( 0x0120, "proms", 0 ) | |
| 2087 | ROM_LOAD( "82s129.1", 0x0000, 0x0100, CRC(a7c22d96) SHA1(160deae8053b09c09328325246598b3518c7e20b) ) | |
| 2088 | ROM_LOAD( "82s123.2", 0x0100, 0x0020, CRC(58bcf8bd) SHA1(e4d3d179b08c0f3424a6bec0f15058fb1b56f8d8) ) | |
| 2089 | ||
| 2090 | ROM_REGION( 0x0600, "plds", 0 ) | |
| 2091 | ROM_LOAD( "fpointbj_gal16v8_1.bin", 0x0000, 0x0117, CRC(ba7f292c) SHA1(c383700d05663c9c5f29d5d04d16b05cd6adceb8) ) | |
| 2092 | ROM_LOAD( "fpointbj_gal16v8_3.bin", 0x0200, 0x0117, CRC(ce1ab1e1) SHA1(dcfc0015d8595ee6cb6bb02c95655161a7f3b017) ) | |
| 2093 | ROM_LOAD( "fpointbj_gal20v8.bin", 0x0400, 0x019d, NO_DUMP ) /* Protected */ | |
| 2094 | ROM_END | |
| 2095 | ||
| 2096 | static UINT8 *decrypted_region; | |
| 2097 | ||
| 2098 | static DRIVER_INIT( goldnabl ) | |
| 2099 | { | |
| 2100 | int i; | |
| 2101 | UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 2102 | UINT8* KEY = memory_region(machine, "decryption"); | |
| 2103 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 2104 | UINT8 data[0x1000]; | |
| 2105 | ||
| 2106 | // the decryption key is in a rom (part of an MSDOS executable...) | |
| 2107 | for (i=0;i<0x800;i++) | |
| 2108 | { | |
| 2109 | KEY[i] = KEY[i] ^ 0xff; | |
| 2110 | data[(i*2)+0] = ((KEY[i] & 0x80) >> 1) | ((KEY[i] & 0x40) >> 2) | ((KEY[i] & 0x20) >> 3) | ((KEY[i] & 0x10) >> 4); | |
| 2111 | data[(i*2)+1] = ((KEY[i] & 0x08) << 3) | ((KEY[i] & 0x04) << 2) | ((KEY[i] & 0x02) << 1) | ((KEY[i] & 0x01) << 0); | |
| 2112 | } | |
| 2113 | ||
| 2114 | decrypted_region = auto_alloc_array(machine, UINT8, 0xc0000); | |
| 2115 | memcpy (decrypted_region, ROM, 0xc0000); | |
| 2116 | ||
| 2117 | for (i = 0;i < 0x40000;i++) | |
| 2118 | { | |
| 2119 | decrypted_region[i] = ROM[i] ^ data[(i&0xfff)^1]; | |
| 2120 | } | |
| 2121 | ||
| 2122 | memory_set_decrypted_region(space, 0x00000, 0xbffff, decrypted_region); | |
| 2123 | ||
| 2124 | MACHINE_RESET_CALL(sys16_onetime); | |
| 2125 | } | |
| 2126 | ||
| 2127 | ||
| 2128 | static DRIVER_INIT( bayrouteb1 ) | |
| 2129 | { | |
| 2130 | // it has the same encryption as the golden axe bootleg! | |
| 2131 | // | |
| 2132 | // but also some protection, probably code provided in RAM by an MCU | |
| 2133 | // | |
| 2134 | // for now we use the code which is present in the unprotected bootleg set | |
| 2135 | // and modify the rom to use it | |
| 2136 | UINT16 *ROM2; | |
| 2137 | UINT16* decrypted_region2; | |
| 2138 | ||
| 2139 | // decrypt | |
| 2140 | DRIVER_INIT_CALL( goldnabl ); | |
| 2141 | ||
| 2142 | ROM2 = (UINT16*)memory_region(machine, "maincpu"); | |
| 2143 | decrypted_region2 = (UINT16*)decrypted_region; | |
| 2144 | ||
| 2145 | // patch interrupt vector | |
| 2146 | ROM2[0x0070/2] = 0x000b; | |
| 2147 | ROM2[0x0072/2] = 0xf000; | |
| 2148 | ||
| 2149 | // patch check for code in RAM | |
| 2150 | decrypted_region2[0x107e/2] = 0x48e7; | |
| 2151 | decrypted_region2[0x1080/2] = 0x000b; | |
| 2152 | decrypted_region2[0x1082/2] = 0xf000; | |
| 2153 | } | |
| 2154 | ||
| 2155 | static DRIVER_INIT( bayrouteb2 ) | |
| 2156 | { | |
| 2157 | UINT8 *mem; | |
| 2158 | ||
| 2159 | MACHINE_RESET_CALL(sys16_onetime); | |
| 2160 | ||
| 2161 | mem = memory_region(machine, "soundcpu"); | |
| 2162 | memcpy(mem, mem+0x10000, 0x8000); | |
| 2163 | } | |
| 2164 | ||
| 2165 | /* | |
| 2166 | ||
| 2167 | this is a more complete dump of the old encrypted bootleg set | |
| 2168 | ||
| 2169 | Golden Axe (different HW bottleg) | |
| 2170 | ||
| 2171 | Anno 1989 | |
| 2172 | Produttore | |
| 2173 | N.revisione | |
| 2174 | CPU main PCB: | |
| 2175 | 1x 68000 (main)(missing) | |
| 2176 | 1x LH0080B-Z80B-CPU (sound) | |
| 2177 | 1x D7759C (sound) | |
| 2178 | 1x YM2151 (sound) | |
| 2179 | 1x YM3012 (sound) | |
| 2180 | 1x UPC1241H (sound) | |
| 2181 | 1x oscillator 20.000 (close to main) | |
| 2182 | 1x oscillator 24.000MHz (close to sound) | |
| 2183 | 1x blue resonator 655K (close to sound) | |
| 2184 | ROMs main PCB: | |
| 2185 | 2x NMC27C512 (1,3) | |
| 2186 | 2x NMC27C256 (2,12) | |
| 2187 | 8x TMS27PC512 (4,5,6,7,8,9,10,11) | |
| 2188 | ||
| 2189 | roms PCB: | |
| 2190 | 29x Am27C512 (13-32,34-42) | |
| 2191 | 1x NMC27C512 (33) | |
| 2192 | 1x PROM N82S129N | |
| 2193 | ||
| 2194 | ||
| 2195 | RAMs: | |
| 2196 | main PCB: | |
| 2197 | 1x GM76C28 | |
| 2198 | 2x GM76C88 | |
| 2199 | 2x HM6116K | |
| 2200 | ||
| 2201 | roms PCB: | |
| 2202 | 8x LC3517BS | |
| 2203 | 2x 256K S BGD-A | |
| 2204 | ||
| 2205 | ||
| 2206 | PLDs: | |
| 2207 | main PCB: | |
| 2208 | 3x PAL16L8ACN (not dumped) | |
| 2209 | ||
| 2210 | roms PCB: | |
| 2211 | 1x PEEL18CV8P (not dumped) | |
| 2212 | Note main PCB: | |
| 2213 | 1x JAMMA edge connector | |
| 2214 | 2x 50 pins flat cable connector to roms PCB | |
| 2215 | 1x trimmer (volume) | |
| 2216 | 2x 8x2 switches dip | |
| 2217 | ||
| 2218 | roms PCB: | |
| 2219 | 2x 50 pins flat cable connector to roms PCB | |
| 2599 | roms PCB: | |
| 2600 | 2x 50 pins flat cable connector to roms PCB | |
| 2220 | 2601 | */ |
| 2221 | 2602 | |
| 2222 | 2603 | ROM_START( goldnaxeb1 ) |
| r7356 | r7357 | |
| 2286 | 2667 | ROM_LOAD( "82s129.bin", 0x000, 0x100, CRC(88962e80) SHA1(ebf3d57d53fcba727cf20e4bb26f12934f7d1bc7) ) |
| 2287 | 2668 | ROM_END |
| 2288 | 2669 | |
| 2289 | /* Golden Axe (bootleg) made in Italy? | |
| 2290 | PCB: GENSYS-1/I | |
| 2670 | /* | |
| 2671 | Golden Axe (bootleg) made in Italy? | |
| 2672 | PCB: GENSYS-1/I | |
| 2291 | 2673 | |
| 2292 | CPUs | |
| 2674 | CPUs | |
| 2675 | 1x SCN68000CAN64-KGQ7551-8931KE (main - upper board)(IC40) | |
| 2676 | 1x oscillator 20.000MHz (upper board - near main CPU)(XL2) | |
| 2677 | 1x STZ8400BB1-Z80BCPU-28911 (sound - upper board)(IC44) | |
| 2678 | 2x YAMAHA YM2203C (sound - upper board)IC27, IC28) | |
| 2679 | 1x OKI M5205 (sound - upper board)(IC16) | |
| 2680 | 2x YAMAHA Y3014B (DAC - sound - upper board)(IC19, IC20) | |
| 2681 | 1x crystal resonator CSB398P (upper board - near sound CPUs)(XL1) | |
| 2682 | 1x oscillator 24MHz (lower board near connectors to upper board)(XL1) | |
| 2293 | 2683 | |
| 2294 | 1x SCN68000CAN64-KGQ7551-8931KE (main - upper board)(IC40) | |
| 2295 | 1x oscillator 20.000MHz (upper board - near main CPU)(XL2) | |
| 2296 | 1x STZ8400BB1-Z80BCPU-28911 (sound - upper board)(IC44) | |
| 2297 | 2x YAMAHA YM2203C (sound - upper board)IC27, IC28) | |
| 2298 | 1x OKI M5205 (sound - upper board)(IC16) | |
| 2299 | 2x YAMAHA Y3014B (DAC - sound - upper board)(IC19, IC20) | |
| 2300 | 1x crystal resonator CSB398P (upper board - near sound CPUs)(XL1) | |
| 2301 | 1x oscillator 24MHz (lower board near connectors to upper board)(XL1) | |
| 2684 | ROMs | |
| 2685 | 8x TMS27C512-20JL (from 1 to 8 - upper board) (CPU) | |
| 2686 | 26x ST M27512FI (from 9 to 34 - upper board) (Sound + Tilemap) | |
| 2687 | 6x ST M27512FI (from 35 to 40 - lower board) (Sprites) | |
| 2302 | 2688 | |
| 2303 | ROMs | |
| 2304 | 8x TMS27C512-20JL (from 1 to 8 - upper board) (CPU) | |
| 2305 | 26x ST M27512FI (from 9 to 34 - upper board) (Sound + Tilemap) | |
| 2306 | 6x ST M27512FI (from 35 to 40 - lower board) (Sprites) | |
| 2307 | ||
| 2308 | 2689 | */ |
| 2309 | 2690 | |
| 2310 | ||
| 2311 | 2691 | ROM_START( goldnaxeb2 ) |
| 2312 | 2692 | ROM_REGION( 0x0c0000, "maincpu", 0 ) /* 68000 code */ |
| 2313 | 2693 | ROM_LOAD16_BYTE( "ic39.1", 0x00000, 0x10000, CRC(71489c9a) SHA1(ec25463a2c63027d2635f0e27f5a971d68938fe3) ) |
| r7356 | r7357 | |
| 2320 | 2700 | ROM_LOAD16_BYTE( "ic36.4", 0xa0000, 0x10000, CRC(b69ab892) SHA1(9b426058a80abb8dd3d6c0c55574fdc841889a72) ) |
| 2321 | 2701 | ROM_LOAD16_BYTE( "ic50.8", 0xa0001, 0x10000, CRC(3cf2f725) SHA1(1f620fcebe8533cba50736ae1d97c095abf1bc25) ) |
| 2322 | 2702 | |
| 2323 | ||
| 2324 | 2703 | ROM_REGION( 0x60000, "gfx1", ROMREGION_INVERT ) /* tiles */ |
| 2325 | 2704 | ROM_LOAD( "ic4.35", 0x00000, 0x10000, CRC(84587263) SHA1(3a88c8578a477a487a0a214a367042b9739f39eb) ) |
| 2326 | 2705 | ROM_LOAD( "ic18.38", 0x10000, 0x10000, CRC(63d72388) SHA1(ba0a582b1daf3a1e316237efbad17fcc0381643f) ) |
| r7356 | r7357 | |
| 2360 | 2739 | ROM_LOAD( "ic46.9", 0x10000, 0x10000, CRC(634dd54e) SHA1(ac4ab0ad9c1ac634ff4dfb83232b0fa5cfb26fdd) ) |
| 2361 | 2740 | ROM_END |
| 2362 | 2741 | |
| 2363 | ||
| 2364 | ||
| 2365 | ROM_START( passht4b ) | |
| 2366 | ROM_REGION( 0x20000, "maincpu", 0 ) /* 68000 code */ | |
| 2367 | ROM_LOAD16_BYTE( "pas4p.3", 0x000000, 0x10000, CRC(2d8bc946) SHA1(35d3e529d4815543d9876fd0545c3d686467abaa) ) | |
| 2368 | ROM_LOAD16_BYTE( "pas4p.4", 0x000001, 0x10000, CRC(e759e831) SHA1(dd5727dc28010cb988e4951723171171eb645ce8) ) | |
| 2369 | ||
| 2370 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ | |
| 2371 | ROM_LOAD( "pas4p.11", 0x00000, 0x10000, CRC(da20fbc9) SHA1(21dc8143f4d1cebae4f86e83495fa84e5293ba48) ) | |
| 2372 | ROM_LOAD( "pas4p.12", 0x10000, 0x10000, CRC(bebb9211) SHA1(4f56048f6f70b63f74a4c0d64456213d36ce5b26) ) | |
| 2373 | ROM_LOAD( "pas4p.13", 0x20000, 0x10000, CRC(e37506c3) SHA1(e6fbf15d58f321a3d052fefbe5a1901e4a1734ae) ) | |
| 2374 | ||
| 2375 | ROM_REGION16_BE( 0x60000, "gfx2", 0 ) /* sprites */ | |
| 2376 | ROM_LOAD16_BYTE( "opr11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) | |
| 2377 | ROM_LOAD16_BYTE( "opr11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) | |
| 2378 | ROM_LOAD16_BYTE( "opr11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) ) | |
| 2379 | ROM_LOAD16_BYTE( "opr11866.b6", 0x20000, 0x10000, CRC(50eb71cc) SHA1(463b4917ca19c7f4ad2c2845caa104d5e4a2dda3) ) | |
| 2380 | ROM_LOAD16_BYTE( "opr11864.b3", 0x40001, 0x10000, CRC(05733ca8) SHA1(1dbc7c99450ebe6a9fd8c0244fd3cb38b74984ef) ) | |
| 2381 | ROM_LOAD16_BYTE( "opr11867.b7", 0x40000, 0x10000, CRC(81e49697) SHA1(a70fa409e3555ad6c8f28930a7026fdf2deb8c65) ) | |
| 2382 | ||
| 2383 | ROM_REGION( 0x20000, "soundcpu", 0 ) /* sound CPU */ | |
| 2384 | ROM_LOAD( "pas4p.1", 0x00000, 0x08000, CRC(e60fb017) SHA1(21298036eab55c74427f1c2e3a9623d41bca4849) ) | |
| 2385 | ROM_LOAD( "pas4p.2", 0x10000, 0x10000, CRC(092e016e) SHA1(713638749efa9dce19c547b84308236110bc85fe) ) | |
| 2386 | ROM_END | |
| 2387 | ||
| 2388 | /* Passing Shot Bootleg is a decrypted version of Passing Shot Japanese (passshtj). It has been heavily modified */ | |
| 2389 | ROM_START( passshtb ) | |
| 2390 | ROM_REGION( 0x020000, "maincpu", 0 ) /* 68000 code */ | |
| 2391 | ROM_LOAD16_BYTE( "pass3_2p.bin", 0x000000, 0x10000, CRC(26bb9299) SHA1(11bacf86dfdd8bcfbfb61f0ebc59890325c48adc) ) | |
| 2392 | ROM_LOAD16_BYTE( "pass4_2p.bin", 0x000001, 0x10000, CRC(06ac6d5d) SHA1(2dd71a8a956404326797de8beed7bca016c9919e) ) | |
| 2393 | ||
| 2394 | ROM_REGION( 0x30000, "gfx1", 0 ) /* tiles */ | |
| 2395 | ROM_LOAD( "opr11854.b9", 0x00000, 0x10000, CRC(d31c0b6c) SHA1(610d04988da70c30300cc5614817eda9d2204f39) ) | |
| 2396 | ROM_LOAD( "opr11855.b10", 0x10000, 0x10000, CRC(b78762b4) SHA1(d594ef846bd7fed8da91a89906b39c1a2867a1fe) ) | |
| 2397 | ROM_LOAD( "opr11856.b11", 0x20000, 0x10000, CRC(ea49f666) SHA1(36ccd32cdcbb7fcc300628bb59c220ec3c324d82) ) | |
| 2398 | ||
| 2399 | ROM_REGION16_BE( 0x80000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ | |
| 2400 | ROM_LOAD16_BYTE( "opr11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) | |
| 2401 | ROM_LOAD16_BYTE( "opr11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) | |
| 2402 | ROM_LOAD16_BYTE( "opr11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) ) | |
| 2403 | ROM_LOAD16_BYTE( "opr11866.b6", 0x20000, 0x10000, CRC(50eb71cc) SHA1(463b4917ca19c7f4ad2c2845caa104d5e4a2dda3) ) | |
| 2404 | ROM_LOAD16_BYTE( "opr11864.b3", 0x40001, 0x10000, CRC(05733ca8) SHA1(1dbc7c99450ebe6a9fd8c0244fd3cb38b74984ef) ) | |
| 2405 | ROM_LOAD16_BYTE( "opr11867.b7", 0x40000, 0x10000, CRC(81e49697) SHA1(a70fa409e3555ad6c8f28930a7026fdf2deb8c65) ) | |
| 2406 | ||
| 2407 | ROM_REGION( 0x30000, "soundcpu", 0 ) /* sound CPU */ | |
| 2408 | ROM_LOAD( "epr11857.a7", 0x00000, 0x08000, CRC(789edc06) SHA1(8c89c94e503513c287807d187de78a7fbd75a7cf) ) | |
| 2409 | ROM_LOAD( "epr11858.a8", 0x10000, 0x08000, CRC(08ab0018) SHA1(0685f80a7d403208c9cfffea3f2035324f3924fe) ) | |
| 2410 | ROM_LOAD( "epr11859.a9", 0x18000, 0x08000, CRC(8673e01b) SHA1(e79183ab30e683fdf61ced2e9dbe010567c324cb) ) | |
| 2411 | ROM_LOAD( "epr11860.a10", 0x20000, 0x08000, CRC(10263746) SHA1(1f981fb185c6a9795208ecdcfba36cf892a99ed5) ) | |
| 2412 | ROM_LOAD( "epr11861.a11", 0x28000, 0x08000, CRC(38b54a71) SHA1(68ec4ef5b115844214ff2213be1ce6678904fbd2) ) | |
| 2413 | ROM_END | |
| 2414 | ||
| 2415 | ||
| 2416 | ||
| 2417 | /* Shinobi bootleg by 'Datsu' - Sound hardware is different */ | |
| 2418 | ROM_START( shinobld ) | |
| 2419 | ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */ | |
| 2420 | ROM_LOAD16_BYTE( "12.bin", 0x000001, 0x10000, CRC(757a0c71) SHA1(8f476b0fd5f5dd480489af09b99585c58a4801fc) ) | |
| 2421 | ROM_LOAD16_BYTE( "14.bin", 0x000000, 0x10000, CRC(a65870b2) SHA1(3e9b4aa694bf86ef9db4756ebaa3d8d87d7f269a) ) | |
| 2422 | ROM_LOAD16_BYTE( "13.bin", 0x020001, 0x10000, CRC(c4334bcd) SHA1(ea1dd23ca6fbf632d8e10bbb9ced6515a69bd14a) ) | |
| 2423 | ROM_LOAD16_BYTE( "15.bin", 0x020000, 0x10000, CRC(b70a6ec1) SHA1(79db41c36d6a053bcdc355b46b19ae938a7755a9) ) | |
| 2424 | ||
| 2425 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ | |
| 2426 | ROM_LOAD( "9.bin", 0x00000, 0x10000, CRC(565e11c6) SHA1(e063400b3d0470b932d75da0be9cd4b446189dea) ) | |
| 2427 | ROM_LOAD( "10.bin", 0x10000, 0x10000, CRC(7cc40b6c) SHA1(ffad7eef7ab2ff9a2e49a8d71b5785a61fa3c675) ) | |
| 2428 | ROM_LOAD( "11.bin", 0x20000, 0x10000, CRC(0f6c7b1c) SHA1(defc76592c285b3396e89a3cff7a73f3a948117f) ) | |
| 2429 | ||
| 2430 | ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ | |
| 2431 | ROM_LOAD16_BYTE( "5.bin", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) ) | |
| 2432 | ROM_LOAD16_BYTE( "3.bin", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) ) | |
| 2433 | ROM_LOAD16_BYTE( "8.bin", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) ) | |
| 2434 | ROM_LOAD16_BYTE( "2.bin", 0x20000, 0x10000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) ) | |
| 2435 | ROM_LOAD16_BYTE( "6.bin", 0x40001, 0x10000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) ) | |
| 2436 | ROM_LOAD16_BYTE( "4.bin", 0x40000, 0x10000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) ) | |
| 2437 | ROM_LOAD16_BYTE( "7.bin", 0x60001, 0x10000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) ) | |
| 2438 | ROM_LOAD16_BYTE( "1.bin", 0x60000, 0x10000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) ) | |
| 2439 | ||
| 2440 | ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU + data */ | |
| 2441 | ROM_LOAD( "16.bin", 0x0000, 0x10000, CRC(52c8364e) SHA1(01d30b82f92498d155d2e31d43d58dff0285cce3) ) | |
| 2442 | ROM_END | |
| 2443 | ||
| 2444 | // sys16B | |
| 2445 | ROM_START( tetrisbl ) | |
| 2446 | ROM_REGION( 0x040000, "maincpu", ROMREGION_ERASEFF ) /* 68000 code */ | |
| 2447 | ROM_LOAD16_BYTE( "rom2.bin", 0x000000, 0x10000, CRC(4d165c38) SHA1(04706b1977ae18bd09bafaf8ea65f8e5f32e04b8) ) | |
| 2448 | ROM_LOAD16_BYTE( "rom1.bin", 0x000001, 0x10000, CRC(1e912131) SHA1(8f53504ac08942ee340489d84eab825e654d0a2c) ) | |
| 2449 | ||
| 2450 | ROM_REGION( 0x30000, "gfx1", 0 ) /* tiles */ | |
| 2451 | ROM_LOAD( "epr12165.b9", 0x00000, 0x10000, CRC(62640221) SHA1(c311d3847a981d0e1609f9b3d80481565d32d78c) ) | |
| 2452 | ROM_LOAD( "epr12166.b10", 0x10000, 0x10000, CRC(9abd183b) SHA1(621b017cb34973f9227be383e26b5cd41aea9422) ) | |
| 2453 | ROM_LOAD( "epr12167.b11", 0x20000, 0x10000, CRC(2495fd4e) SHA1(2db94ead9223a67238a97e724668076fc43e5534) ) | |
| 2454 | ||
| 2455 | ROM_REGION16_BE( 0x020000, "gfx2", 0 ) /* sprites */ | |
| 2456 | ROM_LOAD16_BYTE( "obj0-o.rom", 0x00001, 0x10000, CRC(2fb38880) SHA1(0e1b601bbda78d1887951c1f7e752531c281bc83) ) | |
| 2457 | ROM_LOAD16_BYTE( "obj0-e.rom", 0x00000, 0x10000, CRC(d6a02cba) SHA1(d80000f92e754e89c6ca7b7273feab448fc9a061) ) | |
| 2458 | ||
| 2459 | ROM_REGION( 0x40000, "soundcpu", 0 ) /* sound CPU */ | |
| 2460 | ROM_LOAD( "epr12168.a7", 0x0000, 0x8000, CRC(bd9ba01b) SHA1(fafa7dc36cc057a50ae4cdf7a35f3594292336f4) ) | |
| 2461 | ROM_END | |
| 2462 | ||
| 2463 | // sys16B | |
| 2464 | 2742 | ROM_START( tturfbl ) |
| 2465 | 2743 | ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */ |
| 2466 | 2744 | ROM_LOAD16_BYTE( "tt042197.rom", 0x00000, 0x10000, CRC(deee5af1) SHA1(0caba775021dc7e28ac6b7af8eac4f49d3102c83) ) |
| r7356 | r7357 | |
| 2488 | 2766 | ROM_LOAD( "tt0246ff.rom", 0x20000, 0x10000, CRC(bb4bba8f) SHA1(b182a7e1d0425e93c2c1b93472aafd30a6af6907) ) |
| 2489 | 2767 | ROM_END |
| 2490 | 2768 | |
| 2491 | ROM_START( wb3bbl ) | |
| 2492 | ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */ | |
| 2493 | ROM_LOAD16_BYTE( "wb3_03", 0x000000, 0x10000, CRC(0019ab3b) SHA1(89d49a437690fa6e0c35bb9f1450042f89504714) ) | |
| 2494 | ROM_LOAD16_BYTE( "wb3_05", 0x000001, 0x10000, CRC(196e17ee) SHA1(71e4345b2c3d1612a3d424c9310fad1e23c8a9f7) ) | |
| 2495 | ROM_LOAD16_BYTE( "wb3_02", 0x020000, 0x10000, CRC(c87350cb) SHA1(55a8cb68d70b6060dd9a55e281e216ce3917ea5b) ) | |
| 2496 | ROM_LOAD16_BYTE( "wb3_04", 0x020001, 0x10000, CRC(565d5035) SHA1(e28a132f1a4ce9466945e231c54502178748af98) ) | |
| 2769 | ROM_START( dduxbl ) | |
| 2770 | ROM_REGION( 0x0c0000, "maincpu", 0 ) /* 68000 code */ | |
| 2771 | ROM_LOAD16_BYTE( "dduxb03.bin", 0x000000, 0x20000, CRC(e7526012) SHA1(a1798008bfa1ce9b87dc330f3817b1978052fcfd) ) | |
| 2772 | ROM_LOAD16_BYTE( "dduxb05.bin", 0x000001, 0x20000, CRC(459d1237) SHA1(55e9c0dc341c919d58cc789203642c397d7ac65e) ) | |
| 2773 | /* empty 0x40000 - 0x80000 */ | |
| 2774 | ROM_LOAD16_BYTE( "dduxb02.bin", 0x080000, 0x20000, CRC(d8ed3132) SHA1(a9d5ad8f79fb635cc234a99fad398688a5f15926) ) | |
| 2775 | ROM_LOAD16_BYTE( "dduxb04.bin", 0x080001, 0x20000, CRC(30c6cb92) SHA1(2e17c74eeb37c9731fc2e365cc0114f7383c0106) ) | |
| 2497 | 2776 | |
| 2498 | 2777 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ |
| 2499 | ROM_LOAD( "wb3_14", 0x00000, 0x10000, CRC(d3f20bca) SHA1(0a87f709f8e2a913473512ede408e2cbc535443f) ) | |
| 2500 | ROM_LOAD( "wb3_15", 0x10000, 0x10000, CRC(96ff9d52) SHA1(791a9da4860e0d42fba98f80a3c6725ad8c73e33) ) | |
| 2501 | ROM_LOAD( "wb3_16", 0x20000, 0x10000, CRC(afaf0d31) SHA1(d4309329a0a543250788146b63b27ff058c02fc3) ) | |
| 2778 | ROM_LOAD( "dduxb14.bin", 0x00000, 0x10000, CRC(664bd135) SHA1(674b06e01c2c8f5b8057dd24d470330c3f140473) ) | |
| 2779 | ROM_LOAD( "dduxb15.bin", 0x10000, 0x10000, CRC(ce0d2b30) SHA1(e60521c46f1650c9bdc76f2ceb91a6d61aaa0a09) ) | |
| 2780 | ROM_LOAD( "dduxb16.bin", 0x20000, 0x10000, CRC(6de95434) SHA1(7bed2a0261cf6c2fbb3756633f05f0bb2173977c) ) | |
| 2502 | 2781 | |
| 2503 | ROM_REGION16_BE( 0x100000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ | |
| 2504 | ROM_LOAD16_BYTE( "epr12090.b1", 0x00001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) ) | |
| 2505 | ROM_LOAD16_BYTE( "epr12094.b5", 0x00000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) ) | |
| 2506 | ROM_LOAD16_BYTE( "epr12091.b2", 0x20001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) ) | |
| 2507 | ROM_LOAD16_BYTE( "epr12095.b6", 0x20000, 0x010000, CRC(e774ec2c) SHA1(a4aa15ec7be5539a740ad02ff720458018dbc536) ) | |
| 2508 | ROM_LOAD16_BYTE( "epr12092.b3", 0x40001, 0x010000, CRC(5c2f0d90) SHA1(e0fbc0f841e4607ad232931368b16e81440a75c4) ) | |
| 2509 | ROM_LOAD16_BYTE( "epr12096.b7", 0x40000, 0x010000, CRC(0cd59d6e) SHA1(caf754a461feffafcfe7bfc6e89da76c4db257c5) ) | |
| 2510 | ROM_LOAD16_BYTE( "epr12093.b4", 0x60001, 0x010000, CRC(4891e7bb) SHA1(1be04fcabe9bfa8cf746263a5bcca67902a021a0) ) | |
| 2511 | ROM_LOAD16_BYTE( "epr12097.b8", 0x60000, 0x010000, CRC(e645902c) SHA1(497cfcf6c25cc2e042e16dbcb1963d2223def15a) ) | |
| 2782 | ROM_REGION16_BE( 0x100000, "gfx2", 0 ) //* sprites */ | |
| 2783 | ROM_LOAD16_BYTE( "dduxb06.bin", 0x00000, 0x010000, CRC(b0079e99) SHA1(9bb4d3fa804a3d05a6e06b45a1280d7064e96ac6) ) | |
| 2784 | ROM_LOAD16_BYTE( "dduxb10.bin", 0x00001, 0x010000, CRC(0be3aee5) SHA1(48fc779b7398abbb82cd0d0d28705ece75b3c4e3) ) | |
| 2785 | ROM_LOAD16_BYTE( "dduxb07.bin", 0x20000, 0x010000, CRC(0217369c) SHA1(b6ec2fa1279a27a602d79e1073c54193745ea816) ) | |
| 2786 | ROM_LOAD16_BYTE( "dduxb11.bin", 0x20001, 0x010000, CRC(cfb2af18) SHA1(1ad18f933a7b797f0364d1f4a6c8549351b4c9a6) ) | |
| 2787 | ROM_LOAD16_BYTE( "dduxb08.bin", 0x40000, 0x010000, CRC(8844f336) SHA1(18c1baaad3bcc658d4a6d03de8c97378b5284e88) ) | |
| 2788 | ROM_LOAD16_BYTE( "dduxb12.bin", 0x40001, 0x010000, CRC(28ce9b15) SHA1(1640df9c8f21893c0647ad2f4210c714a06e6f37) ) | |
| 2789 | ROM_LOAD16_BYTE( "dduxb09.bin", 0x60000, 0x010000, CRC(6b64f665) SHA1(df07fcf2bbec6fa78f89b95272762aebd6f3ec0e) ) | |
| 2790 | ROM_LOAD16_BYTE( "dduxb13.bin", 0x60001, 0x010000, CRC(efe57759) SHA1(69b8969b20ab9480df2735bd2bcd527069196bd7) ) | |
| 2512 | 2791 | |
| 2792 | ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */ | |
| 2793 | ROM_LOAD( "dduxb01.bin", 0x0000, 0x8000, CRC(0dbef0d7) SHA1(8b9afb2fcb946cec467b1e691c267194b503f841) ) | |
| 2794 | ROM_END | |
| 2513 | 2795 | |
| 2796 | ROM_START( eswatbl ) | |
| 2797 | ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 code */ | |
| 2798 | ROM_LOAD16_BYTE( "eswat_c.rom", 0x000000, 0x10000, CRC(1028cc81) SHA1(24b4cd182419a44f3d6afa1c4273353024eb278f) ) | |
| 2799 | ROM_LOAD16_BYTE( "eswat_f.rom", 0x000001, 0x10000, CRC(f7b2d388) SHA1(8131ba8f4fa01751b9993c3c6c218c9bd3adb328) ) | |
| 2800 | ROM_LOAD16_BYTE( "eswat_b.rom", 0x020000, 0x10000, CRC(87c6b1b5) SHA1(a9f29e29a9c0e3daf272dce263a5fd7866642c77) ) | |
| 2801 | ROM_LOAD16_BYTE( "eswat_e.rom", 0x020001, 0x10000, CRC(937ddf9a) SHA1(9fc73f93e9c4221a4dc778593edc02cb405b2f78) ) | |
| 2802 | ROM_LOAD16_BYTE( "eswat_a.rom", 0x040000, 0x08000, CRC(2af4fc62) SHA1(f7b1539a5ab9560bd49dfecf44699abccfb649be) ) | |
| 2803 | ROM_LOAD16_BYTE( "eswat_d.rom", 0x040001, 0x08000, CRC(b4751e19) SHA1(57c9687dc864c163d13dbb89057cd42684a199cd) ) | |
| 2804 | ||
| 2805 | ROM_REGION( 0xc0000, "gfx1", 0 ) /* tiles */ | |
| 2806 | ROM_LOAD( "mpr12624.b11", 0x00000, 0x40000, CRC(375a5ec4) SHA1(42b9116bdc0e0a5b1dd667ac1856b4c2252829ba) ) // ic19 | |
| 2807 | ROM_LOAD( "mpr12625.b12", 0x40000, 0x40000, CRC(3b8c757e) SHA1(0b66e8446d059a12e47e2a6fe8f0a333245bb95c) ) // ic20 | |
| 2808 | ROM_LOAD( "mpr12626.b13", 0x80000, 0x40000, CRC(3efca25c) SHA1(0d866bf53a16b52719f73081e933f4db27d72ece) ) // ic21 | |
| 2809 | ||
| 2810 | ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */ | |
| 2811 | ROM_LOAD16_BYTE( "ic9", 0x000001, 0x20000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) ) | |
| 2812 | ROM_CONTINUE( 0x100001, 0x20000 ) | |
| 2813 | ROM_LOAD16_BYTE( "ic12", 0x000000, 0x20000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) ) | |
| 2814 | ROM_CONTINUE( 0x100000, 0x20000 ) | |
| 2815 | ROM_LOAD16_BYTE( "ic10", 0x040001, 0x20000, CRC(32069246) SHA1(4913009bc72bf4f8b171b14fe06457f5784cab15) ) | |
| 2816 | ROM_CONTINUE( 0x140001, 0x20000 ) | |
| 2817 | ROM_LOAD16_BYTE( "ic13", 0x040000, 0x20000, CRC(a3dfe436) SHA1(640ccc552114d403f35d441574d2f3e4f1d4a8f9) ) | |
| 2818 | ROM_CONTINUE( 0x140000, 0x20000 ) | |
| 2819 | ROM_LOAD16_BYTE( "ic11", 0x080001, 0x20000, CRC(f6b096e0) SHA1(695ad1adbdc29f4d614645867e16de038cf92709) ) | |
| 2820 | ROM_CONTINUE( 0x180001, 0x20000 ) | |
| 2821 | ROM_LOAD16_BYTE( "ic14", 0x080000, 0x20000, CRC(6773fef6) SHA1(91e646ea447be02254d060daf255d26afe0cc79e) ) | |
| 2822 | ROM_CONTINUE( 0x180000, 0x20000 ) | |
| 2823 | ||
| 2824 | ROM_REGION( 0x50000, "soundcpu", 0 ) /* sound CPU */ | |
| 2825 | ROM_LOAD( "epr12617.a13", 0x00000, 0x08000, CRC(7efecf23) SHA1(2b87af7cfaab5942a3f7b38c987fcba01d3475ab) ) // ic8 | |
| 2826 | ROM_LOAD( "mpr12616.a11", 0x10000, 0x40000, CRC(254347c2) SHA1(bf2d83a69a5be375c7e42e9f7d6e65c1095a354c) ) // ic6 | |
| 2827 | ROM_END | |
| 2828 | ||
| 2829 | ROM_START( fpointbl ) | |
| 2830 | ROM_REGION( 0x0c0000, "maincpu", 0 ) /* 68000 code */ | |
| 2831 | ROM_LOAD16_BYTE( "flpoint.003", 0x000000, 0x10000, CRC(4d6df514) SHA1(168aa1629ab7152ba1984605155406b236954a2c) ) | |
| 2832 | ROM_LOAD16_BYTE( "flpoint.002", 0x000001, 0x10000, CRC(4dff2ee8) SHA1(bd157d8c168d45e7490a05d5e1e901d9bdda9599) ) | |
| 2833 | ||
| 2834 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ | |
| 2835 | ROM_LOAD( "flpoint.006", 0x00000, 0x10000, CRC(c539727d) SHA1(56674effe1d273128dddd2ff9e02974ec10f3fff) ) | |
| 2836 | ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) ) | |
| 2837 | ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) ) | |
| 2838 | ||
| 2839 | ROM_REGION16_BE( 0x20000, "gfx2", 0 ) /* sprites */ | |
| 2840 | ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) ) | |
| 2841 | ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) ) | |
| 2842 | ||
| 2514 | 2843 | ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */ |
| 2515 | ROM_LOAD( " | |
| 2844 | ROM_LOAD( "flpoint | |
| 2516 | 2845 | ROM_END |
| 2517 | 2846 | |
| 2847 | ROM_START( fpointbj ) | |
| 2848 | ROM_REGION( 0x0c0000, "maincpu", 0 ) /* 68000 code */ | |
| 2849 | ROM_LOAD16_BYTE( "boot2.003", 0x000000, 0x10000, CRC(6c00d1b0) SHA1(fd0c47b8ca010a64d3ef91980f93854ebc98fbda) ) | |
| 2850 | ROM_LOAD16_BYTE( "boot2.002", 0x000001, 0x10000, CRC(c1fcd704) SHA1(697bef464e53fb9891ed15ee2d6210107b693b20) ) | |
| 2518 | 2851 | |
| 2519 | /* Looked at 24/05/09 */ | |
| 2852 | ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */ | |
| 2853 | ROM_LOAD( "flpoint.006", 0x00000, 0x10000, CRC(c539727d) SHA1(56674effe1d273128dddd2ff9e02974ec10f3fff) ) | |
| 2854 | ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) ) | |
| 2855 | ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) ) | |
| 2520 | 2856 | |
| 2521 | // System 16B based bootlegs | |
| 2522 | GAME( 1989, bayrouteb1, bayroute, bayrouteb1, bayroute, bayrouteb1, ROT0, "bootleg", "Bay Route (encrypted, protected bootleg)", GAME_NO_SOUND | GAME_NOT_WORKING ) // broken sprites (due to missing/wrong irq code?) | |
| 2523 | GAME( 1989, bayrouteb2, bayroute, bayrouteb2, bayroute, bayrouteb2, ROT0, "bootleg", "Bay Route (Datsu bootleg)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) | |
| 2524 | GAME( 1989, goldnaxeb1, goldnaxe, goldnaxe_b1, goldnaxe, goldnabl, ROT0, "bootleg", "Golden Axe (encrypted bootleg)", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 2525 | GAME( 1989, goldnaxeb2, goldnaxe, goldnaxe_b2, goldnaxe, goldnab2, ROT0, "bootleg", "Golden Axe (bootleg)", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 2526 | GAME( 1989, tturfbl, tturf, tturfbl, tturf, tturfbl, ROT0, "bootleg", "Tough Turf (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 2527 | GAME( 1989, dduxbl, ddux, dduxbl, ddux, dduxbl, ROT0, "bootleg", "Dynamite Dux (bootleg)", GAME_NOT_WORKING ) | |
| 2528 | GAME( 1989, eswatbl, eswat, eswatbl, eswat, eswatbl, ROT0, "bootleg", "E-Swat - Cyber Police (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) | |
| 2529 | GAME( 1989, fpointbl, fpoint, fpointbl, fpointbl, fpointbl, ROT0, "bootleg", "Flash Point (World, bootleg)", GAME_NOT_WORKING ) | |
| 2530 | GAME( 1989, fpointbj, fpoint, fpointbl, fpointbl, fpointbl, ROT0, "bootleg", "Flash Point (Japan, bootleg)", GAME_NOT_WORKING ) | |
| 2531 | GAME( 1988, tetrisbl, tetris, tetrisbl, tetris, tetrisbl, ROT0, "bootleg", "Tetris (bootleg)", 0 ) | |
| 2857 | ROM_REGION16_BE( 0x20000, "gfx2", 0 ) /* sprites */ | |
| 2858 | ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) ) | |
| 2859 | ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) ) | |
| 2532 | 2860 | |
| 2533 | // System 16A based bootlegs (less complex tilemap system) | |
| 2534 | GAME( 1987, shinobld, shinobi, system16a_bootleg_shinobi, shinobi, shinobl, ROT0, "[Sega] (Datsu bootleg)", "Shinobi (Datsu bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) | |
| 2535 | GAME( 1988, passshtb, passsht, passsht, passsht, passsht, ROT270, "bootleg", "Passing Shot (2 Players) (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 2536 | GAME( 1988, passht4b, passsht, passht4b, passht4b, passht4b, ROT270, "bootleg", "Passing Shot (4 Players) (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) | |
| 2537 | GAME( 1988, wb3bbl, wb3, system16a_bootleg_wb3, wb3b, wb3bbl, ROT0, "bootleg", "Wonder Boy III - Monster Lair (bootleg)", GAME_NOT_WORKING ) | |
| 2861 | ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */ | |
| 2862 | ROM_LOAD( "flpoint.001", 0x0000, 0x8000, CRC(c5b8e0fe) SHA1(6cf8c67151d8604326fc6dbf976c0635b452a844) ) // bootleg rom doesn't work, but should be correct! | |
| 2538 | 2863 | |
| 2539 | static DRIVER_INIT( beautyb ) | |
| 2540 | { | |
| 2541 | UINT16*rom = (UINT16*)memory_region( machine, "maincpu" ); | |
| 2542 | int x; | |
| 2864 | /* stuff below isn't used but loaded because it was on the board .. */ | |
| 2865 | ROM_REGION( 0x0120, "proms", 0 ) | |
| 2866 | ROM_LOAD( "82s129.1", 0x0000, 0x0100, CRC(a7c22d96) SHA1(160deae8053b09c09328325246598b3518c7e20b) ) | |
| 2867 | ROM_LOAD( "82s123.2", 0x0100, 0x0020, CRC(58bcf8bd) SHA1(e4d3d179b08c0f3424a6bec0f15058fb1b56f8d8) ) | |
| 2543 | 2868 | |
| 2544 | for (x=0;x<0x8000;x++) | |
| 2545 | { | |
| 2546 | rom[x] = rom[x] ^ 0x2400; | |
| 2869 | ROM_REGION( 0x0600, "plds", 0 ) | |
| 2870 | ROM_LOAD( "fpointbj_gal16v8_1.bin", 0x0000, 0x0117, CRC(ba7f292c) SHA1(c383700d05663c9c5f29d5d04d16b05cd6adceb8) ) | |
| 2871 | ROM_LOAD( "fpointbj_gal16v8_3.bin", 0x0200, 0x0117, CRC(ce1ab1e1) SHA1(dcfc0015d8595ee6cb6bb02c95655161a7f3b017) ) | |
| 2872 | ROM_LOAD( "fpointbj_gal20v8.bin", 0x0400, 0x019d, NO_DUMP ) /* Protected */ | |
| 2873 | ROM_END | |
| 2547 | 2874 | |
| 2548 | if (x&8) rom[x] = BITSWAP16(rom[x],15,14,10,12, 11,13,9,8, | |
| 2549 | 7,6,5,4, 3,2,1,0 ); | |
| 2875 | ROM_START( tetrisbl ) | |
| 2876 | ROM_REGION( 0x040000, "maincpu", ROMREGION_ERASEFF ) /* 68000 code */ | |
| 2877 | ROM_LOAD16_BYTE( "rom2.bin", 0x000000, 0x10000, CRC(4d165c38) SHA1(04706b1977ae18bd09bafaf8ea65f8e5f32e04b8) ) | |
| 2878 | ROM_LOAD16_BYTE( "rom1.bin", 0x000001, 0x10000, CRC(1e912131) SHA1(8f53504ac08942ee340489d84eab825e654d0a2c) ) | |
| 2550 | 2879 | |
| 2551 | } | |
| 2880 | ROM_REGION( 0x30000, "gfx1", 0 ) /* tiles */ | |
| 2881 | ROM_LOAD( "epr12165.b9", 0x00000, 0x10000, CRC(62640221) SHA1(c311d3847a981d0e1609f9b3d80481565d32d78c) ) | |
| 2882 | ROM_LOAD( "epr12166.b10", 0x10000, 0x10000, CRC(9abd183b) SHA1(621b017cb34973f9227be383e26b5cd41aea9422) ) | |
| 2883 | ROM_LOAD( "epr12167.b11", 0x20000, 0x10000, CRC(2495fd4e) SHA1(2db94ead9223a67238a97e724668076fc43e5534) ) | |
| 2552 | 2884 | |
| 2553 | MACHINE_RESET_CALL(sys16_onetime); | |
| 2885 | ROM_REGION16_BE( 0x020000, "gfx2", 0 ) /* sprites */ | |
| 2886 | ROM_LOAD16_BYTE( "obj0-o.rom", 0x00001, 0x10000, CRC(2fb38880) SHA1(0e1b601bbda78d1887951c1f7e752531c281bc83) ) | |
| 2887 | ROM_LOAD16_BYTE( "obj0-e.rom", 0x00000, 0x10000, CRC(d6a02cba) SHA1(d80000f92e754e89c6ca7b7273feab448fc9a061) ) | |
| 2554 | 2888 | |
| 2555 | } | |
| 2889 | ROM_REGION( 0x40000, "soundcpu", 0 ) /* sound CPU */ | |
| 2890 | ROM_LOAD( "epr12168.a7", 0x0000, 0x8000, CRC(bd9ba01b) SHA1(fafa7dc36cc057a50ae4cdf7a35f3594292336f4) ) | |
| 2891 | ROM_END | |
| 2556 | 2892 | |
| 2557 | /* Program Roms contain | |
| 2558 | 2893 | |
| 2894 | ||
| 2895 | /****************************** | |
| 2896 | Tetris-based HW | |
| 2897 | ******************************/ | |
| 2898 | ||
| 2899 | /* | |
| 2900 | Program Roms contain | |
| 2901 | ||
| 2559 | 2902 | Designed and Programmed by A.M.T. Research & Development Department 03/30/1991. |
| 2560 | 2903 | Copying or Revising for Commercial Use Is Not Permitted. |
| 2561 | ||
| 2562 | 2904 | */ |
| 2563 | 2905 | |
| 2564 | 2906 | ROM_START( beautyb ) |
| r7356 | r7357 | |
| 2615 | 2957 | ROM_LOAD( "iqpipe.u4", 0x0000, 0x0104, CRC(e9cd78fb) SHA1(557d3e7ef3b25c1338b24722cac91bca788c02b8) ) |
| 2616 | 2958 | ROM_END |
| 2617 | 2959 | |
| 2618 | GAME( 1991, beautyb, 0, beautyb, tetris, beautyb, ROT0, "AMT", "Beauty Block", GAME_NO_SOUND|GAME_NOT_WORKING ) | |
| 2619 | GAME( 1991, iqpipe, 0, beautyb, tetris, beautyb, ROT0, "AMT", "IQ Pipe", GAME_NO_SOUND|GAME_NOT_WORKING ) | |
| 2620 | 2960 | |
| 2961 | /****************************** | |
| 2962 | System 18 Bootlegs | |
| 2963 | ******************************/ | |
| 2621 | 2964 | |
| 2622 | /***************************************************************************/ | |
| 2623 | ||
| 2624 | static WRITE16_HANDLER( sys18_refreshenable_w ) | |
| 2625 | { | |
| 2626 | if(ACCESSING_BITS_0_7) | |
| 2627 | { | |
| 2628 | sys16_refreshenable = data & 0x02; | |
| 2629 | } | |
| 2630 | } | |
| 2631 | ||
| 2632 | static WRITE16_HANDLER( sys18_tilebank_w ) | |
| 2633 | { | |
| 2634 | if(ACCESSING_BITS_0_7) | |
| 2635 | { | |
| 2636 | sys16_tile_bank0 = (data >> 0) & 0x0F; | |
| 2637 | sys16_tile_bank1 = (data >> 4) & 0x0F; | |
| 2638 | } | |
| 2639 | } | |
| 2640 | ||
| 2641 | /***************************************************************************/ | |
| 2642 | ||
| 2643 | #if 0 | |
| 2644 | static void set_fg_page( int data ) | |
| 2645 | { | |
| 2646 | sys16_fg_page[0] = data>>12; | |
| 2647 | sys16_fg_page[1] = (data>>8)&0xf; | |
| 2648 | sys16_fg_page[2] = (data>>4)&0xf; | |
| 2649 | sys16_fg_page[3] = data&0xf; | |
| 2650 | } | |
| 2651 | ||
| 2652 | static void set_bg_page( int data ) | |
| 2653 | { | |
| 2654 | sys16_bg_page[0] = data>>12; | |
| 2655 | sys16_bg_page[1] = (data>>8)&0xf; | |
| 2656 | sys16_bg_page[2] = (data>>4)&0xf; | |
| 2657 | sys16_bg_page[3] = data&0xf; | |
| 2658 | } | |
| 2659 | ||
| 2660 | static void set_fg2_page( int data ) | |
| 2661 | { | |
| 2662 | sys16_fg2_page[0] = data>>12; | |
| 2663 | sys16_fg2_page[1] = (data>>8)&0xf; | |
| 2664 | sys16_fg2_page[2] = (data>>4)&0xf; | |
| 2665 | sys16_fg2_page[3] = data&0xf; | |
| 2666 | } | |
| 2667 | ||
| 2668 | static void set_bg2_page( int data ) | |
| 2669 | { | |
| 2670 | sys16_bg2_page[0] = data>>12; | |
| 2671 | sys16_bg2_page[1] = (data>>8)&0xf; | |
| 2672 | sys16_bg2_page[2] = (data>>4)&0xf; | |
| 2673 | sys16_bg2_page[3] = data&0xf; | |
| 2674 | } | |
| 2675 | #endif | |
| 2676 | ||
| 2677 | /***************************************************************************/ | |
| 2678 | /* | |
| 2679 | Sound hardware for Shadow Dancer (Datsu bootleg) | |
| 2680 | ||
| 2681 | Z80 memory map | |
| 2682 | 0000-7FFF : ROM (fixed) | |
| 2683 | 8000-BFFF : ROM (banked) | |
| 2684 | C000-C007 : ? | |
| 2685 | C400 : Sound command (r/o) | |
| 2686 | C800 : MSM5205 sample data output (w/o) | |
| 2687 | CC00-CC03 : YM3438 #1 | |
| 2688 | D000-D003 : YM3438 #2 | |
| 2689 | D400 : ROM bank control (w/o) | |
| 2690 | DF00-DFFF : ? | |
| 2691 | E000-FFFF : Work RAM | |
| 2692 | ||
| 2693 | The unused memory locations and I/O port access seem to be remnants of the original code that were not patched out: | |
| 2694 | ||
| 2695 | - Program accesses RF5C68A channel registes at $C000-$C007 | |
| 2696 | - Program clears RF5C68A wave memory at $DF00-$DFFF | |
| 2697 | - Program writes to port $A0 to access sound ROM banking control latch | |
| 2698 | - Program reads port $C0 to access sound command | |
| 2699 | ||
| 2700 | Interrupts | |
| 2701 | ||
| 2702 | IRQ = Triggered when 68000 writes sound command. Z80 reads from $C400. | |
| 2703 | NMI = Triggered when second nibble of sample data has been output to the MSM5205. | |
| 2704 | Program copies sample data from ROM bank to the MSM5205 sample data buffer at $C800. | |
| 2705 | ||
| 2706 | ROM banking seems correct. | |
| 2707 | It doesn't look like there's a way to reset the MSM5205, unless that's related to bit 7 of the | |
| 2708 | ROM bank control register. | |
| 2709 | MSM5205 clock speed hasn't been confirmed. | |
| 2710 | */ | |
| 2711 | /***************************************************************************/ | |
| 2712 | ||
| 2713 | ||
| 2714 | static WRITE8_HANDLER( shdancbl_msm5205_data_w ) | |
| 2715 | { | |
| 2716 | sample_buffer = data; | |
| 2717 | } | |
| 2718 | ||
| 2719 | static void shdancbl_msm5205_callback(running_device *device) | |
| 2720 | { | |
| 2721 | msm5205_data_w(device, sample_buffer & 0x0F); | |
| 2722 | sample_buffer >>= 4; | |
| 2723 | sample_select ^= 1; | |
| 2724 | if(sample_select == 0) | |
| 2725 | cputag_set_input_line(device->machine, "soundcpu", INPUT_LINE_NMI, PULSE_LINE); | |
| 2726 | } | |
| 2727 | ||
| 2728 | static const msm5205_interface shdancbl_msm5205_interface = | |
| 2729 | { | |
| 2730 | shdancbl_msm5205_callback, | |
| 2731 | MSM5205_S48_4B | |
| 2732 | }; | |
| 2733 | ||
| 2734 | static UINT8* shdancbl_soundbank_ptr = NULL; /* Pointer to currently selected portion of ROM */ | |
| 2735 | ||
| 2736 | static WRITE16_HANDLER( sound_command_irq_w ) | |
| 2737 | { | |
| 2738 | if( ACCESSING_BITS_0_7 ) | |
| 2739 | { | |
| 2740 | soundlatch_w( space, 0, data&0xff ); | |
| 2741 | cputag_set_input_line(space->machine, "soundcpu", 0, HOLD_LINE ); | |
| 2742 | } | |
| 2743 | } | |
| 2744 | ||
| 2745 | static READ8_HANDLER( shdancbl_soundbank_r ) | |
| 2746 | { | |
| 2747 | if(shdancbl_soundbank_ptr) return shdancbl_soundbank_ptr[offset & 0x3FFF]; | |
| 2748 | return 0xFF; | |
| 2749 | } | |
| 2750 | ||
| 2751 | static WRITE8_HANDLER( shdancbl_bankctrl_w ) | |
| 2752 | { | |
| 2753 | UINT8 *mem = memory_region(space->machine, "soundcpu"); | |
| 2754 | ||
| 2755 | switch(data) | |
| 2756 | { | |
| 2757 | case 0: | |
| 2758 | shdancbl_soundbank_ptr = &mem[0x18000]; /* IC45 8000-BFFF */ | |
| 2759 | break; | |
| 2760 | case 1: | |
| 2761 | shdancbl_soundbank_ptr = &mem[0x1C000]; /* IC45 C000-FFFF */ | |
| 2762 | break; | |
| 2763 | case 2: | |
| 2764 | shdancbl_soundbank_ptr = &mem[0x20000]; /* IC46 0000-3FFF */ | |
| 2765 | break; | |
| 2766 | case 3: | |
| 2767 | shdancbl_soundbank_ptr = &mem[0x24000]; /* IC46 4000-7FFF */ | |
| 2768 | break; | |
| 2769 | default: | |
| 2770 | shdancbl_soundbank_ptr = NULL; | |
| 2771 | logerror("Invalid bank setting %02X (%04X)\n", data, cpu_get_pc(space->cpu)); | |
| 2772 | break; | |
| 2773 | } | |
| 2774 | } | |
| 2775 | ||
| 2776 | static ADDRESS_MAP_START(shdancbl_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 2777 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 2778 | AM_RANGE(0x8000, 0xbfff) AM_READ(shdancbl_soundbank_r) | |
| 2779 | AM_RANGE(0xc000, 0xc00f) AM_WRITENOP | |
| 2780 | AM_RANGE(0xc400, 0xc400) AM_READ(soundlatch_r) | |
| 2781 | AM_RANGE(0xc800, 0xc800) AM_WRITE(shdancbl_msm5205_data_w) | |
| 2782 | AM_RANGE(0xcc00, 0xcc03) AM_DEVREADWRITE("3438.0", ym3438_r, ym3438_w) | |
| 2783 | AM_RANGE(0xd000, 0xd003) AM_DEVREADWRITE("3438.1", ym3438_r, ym3438_w) | |
| 2784 | AM_RANGE(0xd400, 0xd400) AM_WRITE(shdancbl_bankctrl_w) | |
| 2785 | AM_RANGE(0xdf00, 0xdfff) AM_NOP | |
| 2786 | AM_RANGE(0xe000, 0xffff) AM_RAM | |
| 2787 | ADDRESS_MAP_END | |
| 2788 | ||
| 2789 | ||
| 2790 | static ADDRESS_MAP_START( shdancbl_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 2791 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 2792 | AM_RANGE(0xa0, 0xbf) AM_WRITENOP | |
| 2793 | AM_RANGE(0xc0, 0xdf) AM_READNOP | |
| 2794 | ADDRESS_MAP_END | |
| 2795 | ||
| 2796 | /***************************************************************************/ | |
| 2797 | ||
| 2798 | static UINT8 *sys18_SoundMemBank; | |
| 2799 | ||
| 2800 | static READ8_HANDLER( system18_bank_r ) | |
| 2801 | { | |
| 2802 | if(sys18_SoundMemBank) | |
| 2803 | return sys18_SoundMemBank[offset]; | |
| 2804 | return 0xFF; | |
| 2805 | } | |
| 2806 | ||
| 2807 | static ADDRESS_MAP_START( sound_18_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 2808 | AM_RANGE(0x0000, 0x9fff) AM_ROM | |
| 2809 | AM_RANGE(0xa000, 0xbfff) AM_READ(system18_bank_r) | |
| 2810 | /**** D/A register ****/ | |
| 2811 | AM_RANGE(0xc000, 0xc008) AM_DEVWRITE("5c68", rf5c68_w) | |
| 2812 | AM_RANGE(0xd000, 0xdfff) AM_DEVREADWRITE("5c68", rf5c68_mem_r, rf5c68_mem_w) | |
| 2813 | AM_RANGE(0xe000, 0xffff) AM_RAM //?? | |
| 2814 | ADDRESS_MAP_END | |
| 2815 | ||
| 2816 | ||
| 2817 | static WRITE8_HANDLER( sys18_soundbank_w ) | |
| 2818 | { | |
| 2819 | UINT8 *mem = memory_region(space->machine, "soundcpu"); | |
| 2820 | int rom = (data >> 6) & 3; | |
| 2821 | int bank = (data & 0x3f); | |
| 2822 | int mask = sys18_sound_info[rom*2+0]; | |
| 2823 | int offs = sys18_sound_info[rom*2+1]; | |
| 2824 | if(mask) sys18_SoundMemBank = &mem[0x10000 + offs + ((bank & mask) << 13)]; | |
| 2825 | else sys18_SoundMemBank = NULL; | |
| 2826 | } | |
| 2827 | ||
| 2828 | static ADDRESS_MAP_START( sound_18_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 2829 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 2830 | AM_RANGE(0x80, 0x83) AM_DEVREADWRITE("3438.0", ym3438_r, ym3438_w) | |
| 2831 | AM_RANGE(0x90, 0x93) AM_DEVREADWRITE("3438.1", ym3438_r, ym3438_w) | |
| 2832 | AM_RANGE(0xa0, 0xa0) AM_WRITE(sys18_soundbank_w) | |
| 2833 | AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) | |
| 2834 | ADDRESS_MAP_END | |
| 2835 | ||
| 2836 | ||
| 2837 | /***************************************************************************/ | |
| 2838 | /* | |
| 2839 | Shadow Dancer (Bootleg) | |
| 2840 | ||
| 2841 | This seems to be a modified version of shdancer. It has no warning screen, displays English text during the | |
| 2842 | attract sequence, and has a 2P input test. The 'Sega' copyright text was changed to 'Datsu', and their | |
| 2843 | logo is missing. | |
| 2844 | ||
| 2845 | Access to the configuration registers, I/O chip, and VDP are done even though it's likely none of this hardware | |
| 2846 | exists in the bootleg. For example: | |
| 2847 | ||
| 2848 | - Most I/O port access has been redirected to new addresses. | |
| 2849 | - Z80 sound command has been redirected to a new address. | |
| 2850 | - The tilebank routine which saves the bank value in VDP VRAM has a form of protection has been modified to store | |
| 2851 | the tilebank value directly to $E4001F. | |
| 2852 | - Implementing screen blanking control via $E4001D leaves the screen blanked at the wrong times (after coin-up). | |
| 2853 | ||
| 2854 | This is probably due to unmodified parts of the original code accessing these components, which would be ignored | |
| 2855 | on the bootleg hardware. Both the I/O chip and VDP are supported in this driver, just as I don't know for certain | |
| 2856 | how much of either are present on the real board. | |
| 2857 | ||
| 2858 | Bootleg specific addresses: | |
| 2859 | ||
| 2860 | C40001 = DIP switch #1 | |
| 2861 | C40003 = DIP switch #2 | |
| 2862 | C40007 = Z80 sound command | |
| 2863 | C41001 = Service input | |
| 2864 | C41003 = Player 1 input | |
| 2865 | C41005 = Player 2 input | |
| 2866 | C44000 = Has 'clr.w' done after setting tile bank in $E4000F. | |
| 2867 | C460xx = Extra video hardware controls | |
| 2868 | ||
| 2869 | Here are the I/O chip addresses accessed: | |
| 2870 | ||
| 2871 | E40001 = Player 1 | |
| 2872 | E40007 = Miscellaneous outputs (coin control, etc.) | |
| 2873 | E4000F = Tile bank | |
| 2874 | E4001D = CNT2-0 pin output state | |
| 2875 | E4001F = I/O chip port direction | |
| 2876 | */ | |
| 2877 | /***************************************************************************/ | |
| 2878 | ||
| 2879 | static ADDRESS_MAP_START( shdancbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 2880 | AM_RANGE(0x000000, 0x07ffff) AM_ROM | |
| 2881 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 2882 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 2883 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 2884 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 2885 | AM_RANGE(0xc00000, 0xc0ffff) AM_NOP | |
| 2886 | AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("COINAGE") | |
| 2887 | AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1") | |
| 2888 | AM_RANGE(0xc40006, 0xc40007) AM_WRITE(sound_command_irq_w) | |
| 2889 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 2890 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 2891 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") | |
| 2892 | AM_RANGE(0xc44000, 0xc44001) AM_WRITENOP // only used via clr.w after tilebank set | |
| 2893 | ||
| 2894 | ||
| 2895 | AM_RANGE(0xe4001c, 0xe4001d) AM_WRITENOP // to prevent access to screen blanking control below | |
| 2896 | AM_RANGE(0xe40000, 0xe4ffff) AM_NOP | |
| 2897 | AM_RANGE(0xfe0020, 0xfe003f) AM_WRITENOP // config regs | |
| 2898 | AM_RANGE(0xffc000, 0xffffff) AM_RAM | |
| 2899 | ADDRESS_MAP_END | |
| 2900 | ||
| 2901 | /***************************************************************************/ | |
| 2902 | ||
| 2903 | ||
| 2904 | static DRIVER_INIT( shdancbl ) | |
| 2905 | { | |
| 2906 | UINT8 *mem; | |
| 2907 | ||
| 2908 | MACHINE_RESET_CALL(sys16_onetime); | |
| 2909 | ||
| 2910 | sys18_splittab_fg_x=&sys16_textram[0x0f80/2]; | |
| 2911 | sys18_splittab_bg_x=&sys16_textram[0x0fc0/2]; | |
| 2912 | sys16_MaxShadowColors=0; | |
| 2913 | ||
| 2914 | /* Copy first 32K of IC45 to Z80 address space */ | |
| 2915 | mem = memory_region(machine, "soundcpu"); | |
| 2916 | memcpy(mem, mem+0x10000, 0x8000); | |
| 2917 | } | |
| 2918 | ||
| 2919 | /***************************************************************************/ | |
| 2920 | /* | |
| 2921 | Moonwalker (Bootleg) | |
| 2922 | */ | |
| 2923 | /***************************************************************************/ | |
| 2924 | ||
| 2925 | static ADDRESS_MAP_START( mwalkbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 2926 | AM_RANGE(0x000000, 0x07ffff) AM_ROM | |
| 2927 | AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 2928 | AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 2929 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 2930 | AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 2931 | ||
| 2932 | /* bootleg video regs */ | |
| 2933 | /*AM_RANGE(0xc00000, 0xc00001) AM_NOP | |
| 2934 | AM_RANGE(0xc00002, 0xc00003) AM_NOP | |
| 2935 | AM_RANGE(0xc00004, 0xc00005) AM_NOP // tile bank? | |
| 2936 | AM_RANGE(0xc00006, 0xc00007) AM_NOP | |
| 2937 | AM_RANGE(0xc44000, 0xc44001) AM_NOP | |
| 2938 | AM_RANGE(0xc46000, 0xc46001) AM_NOP | |
| 2939 | AM_RANGE(0xc46200, 0xc46201) AM_NOP | |
| 2940 | AM_RANGE(0xc46400, 0xc464ff) AM_NOP // scroll? | |
| 2941 | AM_RANGE(0xc46500, 0xc465ff) AM_NOP // scroll? | |
| 2942 | */ | |
| 2943 | ||
| 2944 | AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("COINAGE") | |
| 2945 | AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1") | |
| 2946 | AM_RANGE(0xc40006, 0xc40007) AM_WRITE(sound_command_nmi_w) | |
| 2947 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") | |
| 2948 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") | |
| 2949 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") | |
| 2950 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P3") | |
| 2951 | AM_RANGE(0xc41008, 0xc41009) AM_READNOP // figure this out, extra input for 3p? | |
| 2952 | AM_RANGE(0xc46600, 0xc46601) AM_WRITE(sys18_refreshenable_w) | |
| 2953 | AM_RANGE(0xc46800, 0xc46801) AM_WRITE(sys18_tilebank_w) | |
| 2954 | ||
| 2955 | AM_RANGE(0xfe0020, 0xfe003f) AM_WRITENOP // config regs | |
| 2956 | AM_RANGE(0xffc000, 0xffffff) AM_RAM | |
| 2957 | ADDRESS_MAP_END | |
| 2958 | ||
| 2959 | /***************************************************************************/ | |
| 2960 | ||
| 2961 | static DRIVER_INIT( mwalkbl ) | |
| 2962 | { | |
| 2963 | UINT8 *RAM= memory_region(machine, "soundcpu"); | |
| 2964 | static const int mwalk_sound_info[] = | |
| 2965 | { | |
| 2966 | 0x0f, 0x00000, // ROM #1 = 128K | |
| 2967 | 0x1f, 0x20000, // ROM #2 = 256K | |
| 2968 | 0x1f, 0x60000, // ROM #3 = 256K | |
| 2969 | 0x1f, 0xA0000 // ROM #4 = 256K | |
| 2970 | }; | |
| 2971 | ||
| 2972 | MACHINE_RESET_CALL(sys16_onetime); | |
| 2973 | sys18_splittab_fg_x=&sys16_textram[0x0f80/2]; | |
| 2974 | sys18_splittab_bg_x=&sys16_textram[0x0fc0/2]; | |
| 2975 | ||
| 2976 | memcpy(sys18_sound_info, mwalk_sound_info, sizeof(sys18_sound_info)); | |
| 2977 | memcpy(RAM,&RAM[0x10000],0xa000); | |
| 2978 | } | |
| 2979 | ||
| 2980 | /***************************************************************************/ | |
| 2981 | ||
| 2982 | /* bootleg doesn't have real vdp or i/o */ | |
| 2983 | ||
| 2984 | static ADDRESS_MAP_START( astormbl_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 2985 | AM_RANGE(0x000000, 0x07ffff) AM_ROM | |
| 2986 | AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram) | |
| 2987 | AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram) | |
| 2988 | AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&segaic16_paletteram) | |
| 2989 | AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&segaic16_spriteram_0) | |
| 2990 | AM_RANGE(0xa00000, 0xa00001) AM_READ_PORT("COINAGE") | |
| 2991 | AM_RANGE(0xa00002, 0xa00003) AM_READ_PORT("DSW1") | |
| 2992 | AM_RANGE(0xa00006, 0xa00007) AM_WRITE(sound_command_nmi_w) | |
| 2993 | AM_RANGE(0xa0000e, 0xa0000f) AM_WRITE(sys18_tilebank_w) | |
| 2994 | AM_RANGE(0xa01000, 0xa01001) AM_READ_PORT("SERVICE") | |
| 2995 | AM_RANGE(0xa01002, 0xa01003) AM_READ_PORT("P1") | |
| 2996 | AM_RANGE(0xa01004, 0xa01005) AM_READ_PORT("P2") | |
| 2997 | AM_RANGE(0xa01006, 0xa01007) AM_READ_PORT("P3") | |
| 2998 | AM_RANGE(0xa02100, 0xa02101) AM_NOP | |
| 2999 | AM_RANGE(0xa03000, 0xa03001) AM_NOP | |
| 3000 | AM_RANGE(0xa03034, 0xa03035) AM_NOP | |
| 3001 | ||
| 3002 | /* bootleg video regs */ | |
| 3003 | AM_RANGE(0xc00000, 0xc00001) AM_NOP | |
| 3004 | AM_RANGE(0xc00002, 0xc00003) AM_NOP | |
| 3005 | AM_RANGE(0xc00004, 0xc00005) AM_NOP // tile bank? | |
| 3006 | AM_RANGE(0xc00006, 0xc00007) AM_NOP | |
| 3007 | AM_RANGE(0xc44000, 0xc44001) AM_NOP | |
| 3008 | AM_RANGE(0xc46000, 0xc46001) AM_NOP | |
| 3009 | AM_RANGE(0xc46200, 0xc46201) AM_NOP | |
| 3010 | AM_RANGE(0xc46400, 0xc464ff) AM_NOP // scroll? | |
| 3011 | AM_RANGE(0xc46500, 0xc465ff) AM_NOP // scroll? | |
| 3012 | ||
| 3013 | AM_RANGE(0xc46600, 0xc46601) AM_WRITE(sys18_refreshenable_w) | |
| 3014 | AM_RANGE(0xfe0020, 0xfe003f) AM_WRITENOP | |
| 3015 | AM_RANGE(0xffc000, 0xffffff) AM_RAM | |
| 3016 | ADDRESS_MAP_END | |
| 3017 | ||
| 3018 | ||
| 3019 | /***************************************************************************/ | |
| 3020 | ||
| 3021 | ||
| 3022 | static DRIVER_INIT( astormbl ) | |
| 3023 | { | |
| 3024 | UINT8 *RAM= memory_region(machine, "soundcpu"); | |
| 3025 | static const int astormbl_sound_info[] = | |
| 3026 | { | |
| 3027 | 0x0f, 0x00000, // ROM #1 = 128K | |
| 3028 | 0x1f, 0x20000, // ROM #2 = 256K | |
| 3029 | 0x1f, 0x60000, // ROM #3 = 256K | |
| 3030 | 0x1f, 0xA0000 // ROM #4 = 256K | |
| 3031 | }; | |
| 3032 | ||
| 3033 | MACHINE_RESET_CALL(sys16_onetime); | |
| 3034 | sys18_splittab_fg_x=&sys16_textram[0x0f80/2]; | |
| 3035 | sys18_splittab_bg_x=&sys16_textram[0x0fc0/2]; | |
| 3036 | sys16_MaxShadowColors = 0; // doesn't seem to use transparent shadows | |
| 3037 | ||
| 3038 | memcpy(sys18_sound_info, astormbl_sound_info, sizeof(sys18_sound_info)); | |
| 3039 | memcpy(RAM,&RAM[0x10000],0xa000); | |
| 3040 | } | |
| 3041 | ||
| 3042 | ||
| 3043 | /*****************************************************************************/ | |
| 3044 | ||
| 3045 | static MACHINE_DRIVER_START( system18 ) | |
| 3046 | ||
| 3047 | /* basic machine hardware */ | |
| 3048 | MDRV_CPU_ADD("maincpu", M68000, 10000000) | |
| 3049 | MDRV_CPU_VBLANK_INT("screen", irq4_line_hold) | |
| 3050 | ||
| 3051 | MDRV_CPU_ADD("soundcpu", Z80, 8000000) | |
| 3052 | MDRV_CPU_PROGRAM_MAP(sound_18_map) | |
| 3053 | MDRV_CPU_IO_MAP(sound_18_io_map) | |
| 3054 | ||
| 3055 | /* video hardware */ | |
| 3056 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 3057 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 3058 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 3059 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 3060 | MDRV_SCREEN_SIZE(40*8, 28*8) | |
| 3061 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) | |
| 3062 | ||
| 3063 | MDRV_GFXDECODE(sys16) | |
| 3064 | MDRV_PALETTE_LENGTH((2048+2048)*ShadowColorsMultiplier) // 64 extra colours for vdp (but we use 2048 so shadow mask works) | |
| 3065 | ||
| 3066 | MDRV_VIDEO_START(system18old) | |
| 3067 | MDRV_VIDEO_UPDATE(system18old) | |
| 3068 | ||
| 3069 | /* sound hardware */ | |
| 3070 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") | |
| 3071 | ||
| 3072 | MDRV_SOUND_ADD("3438.0", YM3438, 8000000) | |
| 3073 | MDRV_SOUND_ROUTE(0, "lspeaker", 0.40) | |
| 3074 | MDRV_SOUND_ROUTE(1, "rspeaker", 0.40) | |
| 3075 | MDRV_SOUND_ROUTE(2, "lspeaker", 0.40) | |
| 3076 | MDRV_SOUND_ROUTE(3, "rspeaker", 0.40) | |
| 3077 | ||
| 3078 | MDRV_SOUND_ADD("3438.1", YM3438, 8000000) | |
| 3079 | MDRV_SOUND_ROUTE(0, "lspeaker", 0.40) | |
| 3080 | MDRV_SOUND_ROUTE(1, "rspeaker", 0.40) | |
| 3081 | MDRV_SOUND_ROUTE(2, "lspeaker", 0.40) | |
| 3082 | MDRV_SOUND_ROUTE(3, "rspeaker", 0.40) | |
| 3083 | ||
| 3084 | MDRV_SOUND_ADD("5c68", RF5C68, 8000000) | |
| 3085 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) | |
| 3086 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) | |
| 3087 | MACHINE_DRIVER_END | |
| 3088 | ||
| 3089 | ||
| 3090 | static MACHINE_DRIVER_START( astormbl ) | |
| 3091 | ||
| 3092 | /* basic machine hardware */ | |
| 3093 | MDRV_IMPORT_FROM(system18) | |
| 3094 | MDRV_CPU_MODIFY("maincpu") | |
| 3095 | MDRV_CPU_PROGRAM_MAP(astormbl_map) | |
| 3096 | MACHINE_DRIVER_END | |
| 3097 | ||
| 3098 | ||
| 3099 | static MACHINE_DRIVER_START( mwalkbl ) | |
| 3100 | ||
| 3101 | /* basic machine hardware */ | |
| 3102 | MDRV_IMPORT_FROM(system18) | |
| 3103 | MDRV_CPU_MODIFY("maincpu") | |
| 3104 | MDRV_CPU_PROGRAM_MAP(mwalkbl_map) | |
| 3105 | MACHINE_DRIVER_END | |
| 3106 | ||
| 3107 | ||
| 3108 | static MACHINE_DRIVER_START( shdancbl ) | |
| 3109 | ||
| 3110 | /* basic machine hardware */ | |
| 3111 | MDRV_IMPORT_FROM(system18) | |
| 3112 | MDRV_CPU_MODIFY("maincpu") | |
| 3113 | MDRV_CPU_PROGRAM_MAP(shdancbl_map) | |
| 3114 | ||
| 3115 | MDRV_CPU_MODIFY("soundcpu") | |
| 3116 | MDRV_CPU_PROGRAM_MAP(shdancbl_sound_map) | |
| 3117 | MDRV_CPU_IO_MAP(shdancbl_sound_io_map) | |
| 3118 | MDRV_DEVICE_REMOVE("5c68") | |
| 3119 | ||
| 3120 | MDRV_SOUND_ADD("5205", MSM5205, 200000) | |
| 3121 | MDRV_SOUND_CONFIG(shdancbl_msm5205_interface) | |
| 3122 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.80) | |
| 3123 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80) | |
| 3124 | MACHINE_DRIVER_END | |
| 3125 | ||
| 3126 | ||
| 3127 | /***************************************************************************/ | |
| 3128 | ||
| 3129 | static INPUT_PORTS_START( astormbl ) | |
| 3130 | PORT_START("P1") /* player 1 */ | |
| 3131 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 3132 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 3133 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 3134 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3135 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 3136 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 3137 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 3138 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 3139 | ||
| 3140 | PORT_START("P2") /* player 2 */ | |
| 3141 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 3142 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 3143 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 3144 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3145 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 3146 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 3147 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 3148 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 3149 | ||
| 3150 | PORT_START("SERVICE") | |
| 3151 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) | |
| 3152 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 3153 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) | |
| 3154 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 3155 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) | |
| 3156 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 3157 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START3 ) | |
| 3158 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 3159 | ||
| 3160 | PORT_START("COINAGE") | |
| 3161 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") | |
| 3162 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) | |
| 3163 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 3164 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) | |
| 3165 | PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" ) | |
| 3166 | PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" ) | |
| 3167 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 3168 | PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" ) | |
| 3169 | PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" ) | |
| 3170 | PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" ) | |
| 3171 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) | |
| 3172 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 3173 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 3174 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 3175 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 3176 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 3177 | PORT_DIPSETTING( 0x00, "Free Play (if Coin B too) or 1/1" ) | |
| 3178 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") | |
| 3179 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) | |
| 3180 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) | |
| 3181 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) | |
| 3182 | PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" ) | |
| 3183 | PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" ) | |
| 3184 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 3185 | PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" ) | |
| 3186 | PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" ) | |
| 3187 | PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" ) | |
| 3188 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) | |
| 3189 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 3190 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 3191 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 3192 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 3193 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 3194 | PORT_DIPSETTING( 0x00, "Free Play (if Coin A too) or 1/1" ) | |
| 3195 | ||
| 3196 | PORT_START("DSW1") /* DSW1 */ | |
| 3197 | PORT_DIPNAME( 0x01, 0x01, "2 Credits to Start" ) | |
| 3198 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 3199 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3200 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 3201 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 3202 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3203 | PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Difficulty ) ) | |
| 3204 | PORT_DIPSETTING( 0x04, DEF_STR( Easiest ) ) | |
| 3205 | PORT_DIPSETTING( 0x08, DEF_STR( Easier ) ) | |
| 3206 | PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) ) | |
| 3207 | PORT_DIPSETTING( 0x1c, DEF_STR( Normal ) ) | |
| 3208 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 3209 | PORT_DIPSETTING( 0x14, DEF_STR( Harder ) ) | |
| 3210 | PORT_DIPSETTING( 0x18, DEF_STR( Hardest ) ) | |
| 3211 | PORT_DIPSETTING( 0x00, "Special" ) | |
| 3212 | PORT_DIPNAME( 0x20, 0x20, "Coin Chutes" ) | |
| 3213 | PORT_DIPSETTING( 0x20, "3" ) | |
| 3214 | PORT_DIPSETTING( 0x00, "1" ) | |
| 3215 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) | |
| 3216 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 3217 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3218 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) | |
| 3219 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 3220 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3221 | ||
| 3222 | PORT_START("P3") /* player 3 */ | |
| 3223 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) | |
| 3224 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) | |
| 3225 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) | |
| 3226 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3227 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) | |
| 3228 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) | |
| 3229 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) | |
| 3230 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) | |
| 3231 | INPUT_PORTS_END | |
| 3232 | ||
| 3233 | static INPUT_PORTS_START( mwalkbl ) | |
| 3234 | PORT_INCLUDE( astormbl ) | |
| 3235 | ||
| 3236 | PORT_MODIFY("SERVICE") /* service */ | |
| 3237 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 3238 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3239 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3240 | ||
| 3241 | PORT_MODIFY("DSW1") /* DSW1 */ | |
| 3242 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) | |
| 3243 | PORT_DIPSETTING( 0x04, "2" ) | |
| 3244 | PORT_DIPSETTING( 0x00, "3" ) | |
| 3245 | PORT_DIPNAME( 0x08, 0x08, "Player Vitality" ) | |
| 3246 | PORT_DIPSETTING( 0x08, DEF_STR( Low ) ) | |
| 3247 | PORT_DIPSETTING( 0x00, DEF_STR( High ) ) | |
| 3248 | PORT_DIPNAME( 0x10, 0x00, "Play Mode" ) | |
| 3249 | PORT_DIPSETTING( 0x10, "2 Players" ) | |
| 3250 | PORT_DIPSETTING( 0x00, "3 Players" ) | |
| 3251 | PORT_DIPNAME( 0x20, 0x20, "Coin Mode" ) | |
| 3252 | PORT_DIPSETTING( 0x20, "Common" ) | |
| 3253 | PORT_DIPSETTING( 0x00, "Individual" ) | |
| 3254 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) | |
| 3255 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) | |
| 3256 | PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) ) | |
| 3257 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) | |
| 3258 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 3259 | ||
| 3260 | PORT_MODIFY("P3") /* player 3 */ | |
| 3261 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START3 ) | |
| 3262 | INPUT_PORTS_END | |
| 3263 | ||
| 3264 | /*****************************************************************************/ | |
| 3265 | ||
| 3266 | 2965 | ROM_START( astormbl ) |
| 3267 | 2966 | ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 code */ |
| 3268 | 2967 | ROM_LOAD16_BYTE( "astorm.a6", 0x000000, 0x40000, CRC(7682ed3e) SHA1(b857352ad9c66488e91f60989472638c483e4ae8) ) |
| r7356 | r7357 | |
| 3486 | 3185 | ROM_END |
| 3487 | 3186 | |
| 3488 | 3187 | |
| 3489 | /*****************************************************************************/ | |
| 3188 | /************************************* | |
| 3189 | * | |
| 3190 | * Driver initialization | |
| 3191 | * | |
| 3192 | *************************************/ | |
| 3490 | 3193 | |
| 3491 | GAME( 1990, astormbl, astorm, astormbl, astormbl, astormbl, ROT0, "bootleg", "Alien Storm (bootleg, set 1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 3492 | GAME( 1990, astormb2, astorm, astormbl, astormbl, astormbl, ROT0, "bootleg", "Alien Storm (bootleg, set 2)", GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) | |
| 3194 | static DRIVER_INIT( common ) | |
| 3195 | { | |
| 3196 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3493 | 3197 | |
| 3494 | GAME( 1990, mwalkbl, mwalk, mwalkbl, mwalkbl, mwalkbl, ROT0, "bootleg", "Michael Jackson's Moonwalker (bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 3198 | state->bg1_trans = 0; | |
| 3199 | state->splittab_bg_x = 0; | |
| 3200 | state->splittab_bg_y = 0; | |
| 3201 | state->splittab_fg_x = 0; | |
| 3202 | state->splittab_fg_y = 0; | |
| 3495 | 3203 | |
| 3496 | GAME( 1989, shdancbl, shdancer, shdancbl, mwalkbl, shdancbl, ROT0, "bootleg", "Shadow Dancer (bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 3204 | state->spritebank_type = 0; | |
| 3205 | state->back_yscroll = 0; | |
| 3206 | state->fore_yscroll = 0; | |
| 3207 | state->text_yscroll = 0; | |
| 3208 | state->sprite_xoffs = 107; | |
| 3497 | 3209 | |
| 3210 | state->sample_buffer = 0; | |
| 3211 | state->sample_select = 0; | |
| 3212 | ||
| 3213 | state->soundbank_ptr = NULL; | |
| 3214 | ||
| 3215 | state->beautyb_unkx = 0; | |
| 3216 | ||
| 3217 | state->maincpu = devtag_get_device(machine, "maincpu"); | |
| 3218 | state->soundcpu = devtag_get_device(machine, "soundcpu"); | |
| 3219 | } | |
| 3220 | ||
| 3221 | /* Sys16A */ | |
| 3222 | static DRIVER_INIT( shinobl ) | |
| 3223 | { | |
| 3224 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3225 | ||
| 3226 | DRIVER_INIT_CALL(common); | |
| 3227 | ||
| 3228 | state->spritebank_type = 1; | |
| 3229 | state->sprite_xoffs = 117; | |
| 3230 | } | |
| 3231 | ||
| 3232 | static DRIVER_INIT( passsht ) | |
| 3233 | { | |
| 3234 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3235 | ||
| 3236 | DRIVER_INIT_CALL(common); | |
| 3237 | ||
| 3238 | state->spritebank_type = 1; | |
| 3239 | state->back_yscroll = 3; | |
| 3240 | state->sprite_xoffs = 117; | |
| 3241 | } | |
| 3242 | ||
| 3243 | static DRIVER_INIT( wb3bbl ) | |
| 3244 | { | |
| 3245 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3246 | ||
| 3247 | DRIVER_INIT_CALL(common); | |
| 3248 | ||
| 3249 | state->spritebank_type = 1; | |
| 3250 | state->back_yscroll = 2; | |
| 3251 | state->fore_yscroll = 2; | |
| 3252 | state->sprite_xoffs = 117; | |
| 3253 | } | |
| 3254 | ||
| 3255 | ||
| 3256 | /* Sys16B */ | |
| 3257 | static DRIVER_INIT( goldnaxeb1 ) | |
| 3258 | { | |
| 3259 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3260 | int i; | |
| 3261 | UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 3262 | UINT8 *KEY = memory_region(machine, "decryption"); | |
| 3263 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 3264 | UINT8 data[0x1000]; | |
| 3265 | ||
| 3266 | // the decryption key is in a rom (part of an MSDOS executable...) | |
| 3267 | for (i = 0; i < 0x800; i++) | |
| 3268 | { | |
| 3269 | KEY[i] = KEY[i] ^ 0xff; | |
| 3270 | data[(i * 2) + 0] = ((KEY[i] & 0x80) >> 1) | ((KEY[i] & 0x40) >> 2) | ((KEY[i] & 0x20) >> 3) | ((KEY[i] & 0x10) >> 4); | |
| 3271 | data[(i * 2) + 1] = ((KEY[i] & 0x08) << 3) | ((KEY[i] & 0x04) << 2) | ((KEY[i] & 0x02) << 1) | ((KEY[i] & 0x01) << 0); | |
| 3272 | } | |
| 3273 | ||
| 3274 | state->decrypted_region = auto_alloc_array(machine, UINT8, 0xc0000); | |
| 3275 | memcpy(state->decrypted_region, ROM, 0xc0000); | |
| 3276 | ||
| 3277 | for (i = 0; i < 0x40000; i++) | |
| 3278 | { | |
| 3279 | state->decrypted_region[i] = ROM[i] ^ data[(i & 0xfff) ^ 1]; | |
| 3280 | } | |
| 3281 | ||
| 3282 | memory_set_decrypted_region(space, 0x00000, 0xbffff, state->decrypted_region); | |
| 3283 | ||
| 3284 | DRIVER_INIT_CALL(common); | |
| 3285 | ||
| 3286 | state->spritebank_type = 1; | |
| 3287 | state->sprite_xoffs = 121; | |
| 3288 | } | |
| 3289 | ||
| 3290 | ||
| 3291 | static DRIVER_INIT( bayrouteb1 ) | |
| 3292 | { | |
| 3293 | // it has the same encryption as the golden axe bootleg! | |
| 3294 | // | |
| 3295 | // but also some protection, probably code provided in RAM by an MCU | |
| 3296 | // | |
| 3297 | // for now we use the code which is present in the unprotected bootleg set | |
| 3298 | // and modify the rom to use it | |
| 3299 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3300 | UINT16 *ROM2; | |
| 3301 | UINT16 *decrypted_region2; | |
| 3302 | ||
| 3303 | // decrypt | |
| 3304 | DRIVER_INIT_CALL( goldnaxeb1 ); | |
| 3305 | ||
| 3306 | ROM2 = (UINT16*)memory_region(machine, "maincpu"); | |
| 3307 | decrypted_region2 = (UINT16*)state->decrypted_region; | |
| 3308 | ||
| 3309 | // patch interrupt vector | |
| 3310 | ROM2[0x0070/2] = 0x000b; | |
| 3311 | ROM2[0x0072/2] = 0xf000; | |
| 3312 | ||
| 3313 | // patch check for code in RAM | |
| 3314 | decrypted_region2[0x107e/2] = 0x48e7; | |
| 3315 | decrypted_region2[0x1080/2] = 0x000b; | |
| 3316 | decrypted_region2[0x1082/2] = 0xf000; | |
| 3317 | } | |
| 3318 | ||
| 3319 | static DRIVER_INIT( bayrouteb2 ) | |
| 3320 | { | |
| 3321 | UINT8 *mem = memory_region(machine, "soundcpu"); | |
| 3322 | ||
| 3323 | memcpy(mem, mem + 0x10000, 0x8000); | |
| 3324 | ||
| 3325 | DRIVER_INIT_CALL(common); | |
| 3326 | } | |
| 3327 | ||
| 3328 | static DRIVER_INIT( goldnaxeb2 ) | |
| 3329 | { | |
| 3330 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3331 | ||
| 3332 | DRIVER_INIT_CALL(common); | |
| 3333 | ||
| 3334 | state->spritebank_type = 1; | |
| 3335 | state->sprite_xoffs = 121; | |
| 3336 | } | |
| 3337 | ||
| 3338 | static DRIVER_INIT( tturfbl ) | |
| 3339 | { | |
| 3340 | UINT8 *mem = memory_region(machine, "soundcpu"); | |
| 3341 | ||
| 3342 | memcpy(mem, mem + 0x10000, 0x8000); | |
| 3343 | ||
| 3344 | DRIVER_INIT_CALL(common); | |
| 3345 | } | |
| 3346 | ||
| 3347 | static DRIVER_INIT( dduxbl ) | |
| 3348 | { | |
| 3349 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3350 | ||
| 3351 | DRIVER_INIT_CALL(common); | |
| 3352 | ||
| 3353 | state->sprite_xoffs = 112; | |
| 3354 | } | |
| 3355 | ||
| 3356 | static DRIVER_INIT( eswatbl ) | |
| 3357 | { | |
| 3358 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3359 | ||
| 3360 | DRIVER_INIT_CALL(common); | |
| 3361 | //state->splittab_fg_x = &sys16_textram[0x0f80]; | |
| 3362 | ||
| 3363 | state->spritebank_type = 1; | |
| 3364 | state->sprite_xoffs = 124; | |
| 3365 | } | |
| 3366 | ||
| 3367 | static DRIVER_INIT( fpointbl ) | |
| 3368 | { | |
| 3369 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3370 | ||
| 3371 | DRIVER_INIT_CALL(common); | |
| 3372 | //sys16_video_config(fpoint_update_proc, -0xb8, NULL); | |
| 3373 | ||
| 3374 | state->back_yscroll = 2; | |
| 3375 | state->fore_yscroll = 2; | |
| 3376 | } | |
| 3377 | ||
| 3378 | /* Tetris-based */ | |
| 3379 | static DRIVER_INIT( beautyb ) | |
| 3380 | { | |
| 3381 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3382 | UINT16*rom = (UINT16*)memory_region( machine, "maincpu" ); | |
| 3383 | int x; | |
| 3384 | ||
| 3385 | for (x = 0; x < 0x8000; x++) | |
| 3386 | { | |
| 3387 | rom[x] = rom[x] ^ 0x2400; | |
| 3388 | ||
| 3389 | if (x & 8) rom[x] = BITSWAP16(rom[x],15,14,10,12, 11,13,9,8, | |
| 3390 | 7,6,5,4, 3,2,1,0 ); | |
| 3391 | } | |
| 3392 | ||
| 3393 | DRIVER_INIT_CALL(common); | |
| 3394 | ||
| 3395 | state->sprite_xoffs = 112; | |
| 3396 | } | |
| 3397 | ||
| 3398 | ||
| 3399 | /* Sys18 */ | |
| 3400 | static DRIVER_INIT( shdancbl ) | |
| 3401 | { | |
| 3402 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3403 | UINT8 *mem = memory_region(machine, "soundcpu");; | |
| 3404 | ||
| 3405 | /* Copy first 32K of IC45 to Z80 address space */ | |
| 3406 | memcpy(mem, mem + 0x10000, 0x8000); | |
| 3407 | ||
| 3408 | DRIVER_INIT_CALL(common); | |
| 3409 | ||
| 3410 | state->spritebank_type = 1; | |
| 3411 | state->splittab_fg_x = &state->textram[0x0f80/2]; | |
| 3412 | state->splittab_bg_x = &state->textram[0x0fc0/2]; | |
| 3413 | } | |
| 3414 | ||
| 3415 | static DRIVER_INIT( mwalkbl ) | |
| 3416 | { | |
| 3417 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3418 | UINT8 *RAM = memory_region(machine, "soundcpu"); | |
| 3419 | static const int mwalk_sound_info[] = | |
| 3420 | { | |
| 3421 | 0x0f, 0x00000, // ROM #1 = 128K | |
| 3422 | 0x1f, 0x20000, // ROM #2 = 256K | |
| 3423 | 0x1f, 0x60000, // ROM #3 = 256K | |
| 3424 | 0x1f, 0xA0000 // ROM #4 = 256K | |
| 3425 | }; | |
| 3426 | ||
| 3427 | memcpy(state->sound_info, mwalk_sound_info, sizeof(state->sound_info)); | |
| 3428 | memcpy(RAM, &RAM[0x10000], 0xa000); | |
| 3429 | ||
| 3430 | DRIVER_INIT_CALL(common); | |
| 3431 | ||
| 3432 | state->spritebank_type = 1; | |
| 3433 | state->splittab_fg_x = &state->textram[0x0f80/2]; | |
| 3434 | state->splittab_bg_x = &state->textram[0x0fc0/2]; | |
| 3435 | } | |
| 3436 | ||
| 3437 | static DRIVER_INIT( astormbl ) | |
| 3438 | { | |
| 3439 | segas1x_bootleg_state *state = (segas1x_bootleg_state *)machine->driver_data; | |
| 3440 | UINT8 *RAM = memory_region(machine, "soundcpu"); | |
| 3441 | static const int astormbl_sound_info[] = | |
| 3442 | { | |
| 3443 | 0x0f, 0x00000, // ROM #1 = 128K | |
| 3444 | 0x1f, 0x20000, // ROM #2 = 256K | |
| 3445 | 0x1f, 0x60000, // ROM #3 = 256K | |
| 3446 | 0x1f, 0xA0000 // ROM #4 = 256K | |
| 3447 | }; | |
| 3448 | ||
| 3449 | memcpy(state->sound_info, astormbl_sound_info, sizeof(state->sound_info)); | |
| 3450 | memcpy(RAM, &RAM[0x10000], 0xa000); | |
| 3451 | ||
| 3452 | DRIVER_INIT_CALL(common); | |
| 3453 | ||
| 3454 | state->spritebank_type = 1; | |
| 3455 | state->splittab_fg_x = &state->textram[0x0f80/2]; | |
| 3456 | state->splittab_bg_x = &state->textram[0x0fc0/2]; | |
| 3457 | } | |
| 3458 | ||
| 3459 | /************************************* | |
| 3460 | * | |
| 3461 | * Game driver(s) | |
| 3462 | * | |
| 3463 | *************************************/ | |
| 3464 | ||
| 3465 | /* System 16A based bootlegs (less complex tilemap system) */ | |
| 3466 | GAME( 1987, shinobld, shinobi, shinobib, shinobi, shinobl, ROT0, "[Sega] (Datsu bootleg)", "Shinobi (Datsu bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) | |
| 3467 | GAME( 1988, passshtb, passsht, passshtb, passsht, passsht, ROT270, "bootleg", "Passing Shot (2 Players) (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 3468 | GAME( 1988, passht4b, passsht, passsht4b, passht4b, shinobl, ROT270, "bootleg", "Passing Shot (4 Players) (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) | |
| 3469 | GAME( 1988, wb3bbl, wb3, wb3bb, wb3b, wb3bbl, ROT0, "bootleg", "Wonder Boy III - Monster Lair (bootleg)", GAME_NOT_WORKING ) | |
| 3470 | ||
| 3471 | /* System 16B based bootlegs */ | |
| 3472 | GAME( 1989, bayrouteb1, bayroute, bayrouteb1, bayroute, bayrouteb1, ROT0, "bootleg", "Bay Route (encrypted, protected bootleg)", GAME_NO_SOUND | GAME_NOT_WORKING ) // broken sprites (due to missing/wrong irq code?) | |
| 3473 | GAME( 1989, bayrouteb2, bayroute, bayrouteb2, bayroute, bayrouteb2, ROT0, "bootleg", "Bay Route (Datsu bootleg)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) | |
| 3474 | GAME( 1989, goldnaxeb1, goldnaxe, goldnaxeb1, goldnaxe, goldnaxeb1, ROT0, "bootleg", "Golden Axe (encrypted bootleg)", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 3475 | GAME( 1989, goldnaxeb2, goldnaxe, goldnaxeb2, goldnaxe, goldnaxeb2, ROT0, "bootleg", "Golden Axe (bootleg)", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 3476 | GAME( 1989, tturfbl, tturf, tturfbl, tturf, tturfbl, ROT0, "bootleg", "Tough Turf (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 3477 | GAME( 1989, dduxbl, ddux, dduxbl, ddux, dduxbl, ROT0, "bootleg", "Dynamite Dux (bootleg)", GAME_NOT_WORKING ) | |
| 3478 | GAME( 1989, eswatbl, eswat, eswatbl, eswat, eswatbl, ROT0, "bootleg", "E-Swat - Cyber Police (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) | |
| 3479 | GAME( 1989, fpointbl, fpoint, fpointbl, fpointbl, fpointbl, ROT0, "bootleg", "Flash Point (World, bootleg)", GAME_NOT_WORKING ) | |
| 3480 | GAME( 1989, fpointbj, fpoint, fpointbl, fpointbl, fpointbl, ROT0, "bootleg", "Flash Point (Japan, bootleg)", GAME_NOT_WORKING ) | |
| 3481 | GAME( 1988, tetrisbl, tetris, tetrisbl, tetris, dduxbl, ROT0, "bootleg", "Tetris (bootleg)", 0 ) | |
| 3482 | ||
| 3483 | /* Tetris-based hardware */ | |
| 3484 | GAME( 1991, beautyb, 0, beautyb, tetris, beautyb, ROT0, "AMT", "Beauty Block", GAME_NO_SOUND | GAME_NOT_WORKING ) | |
| 3485 | GAME( 1991, iqpipe, 0, beautyb, tetris, beautyb, ROT0, "AMT", "IQ Pipe", GAME_NO_SOUND | GAME_NOT_WORKING ) | |
| 3486 | ||
| 3487 | /* System 18 bootlegs */ | |
| 3488 | GAME( 1990, astormbl, astorm, astormbl, astormbl, astormbl, ROT0, "bootleg", "Alien Storm (bootleg, set 1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 3489 | GAME( 1990, astormb2, astorm, astormbl, astormbl, astormbl, ROT0, "bootleg", "Alien Storm (bootleg, set 2)", GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) | |
| 3490 | GAME( 1990, mwalkbl, mwalk, mwalkbl, mwalkbl, mwalkbl, ROT0, "bootleg", "Michael Jackson's Moonwalker (bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 3491 | GAME( 1989, shdancbl, shdancer, shdancbl, mwalkbl, shdancbl, ROT0, "bootleg", "Shadow Dancer (bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| r7356 | r7357 | |
|---|---|---|
| 625 | 625 | memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f0026, 0x1f0027, 0, 0, cycle_r); |
| 626 | 626 | } |
| 627 | 627 | |
| 628 | static DRIVER_INIT( actfancj ) | |
| 628 | static DRIVER_INIT( actfancrj ) | |
| 629 | 629 | { |
| 630 | 630 | memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f0026, 0x1f0027, 0, 0, cyclej_r); |
| 631 | 631 | } |
| r7356 | r7357 | |
| 633 | 633 | |
| 634 | 634 | GAME( 1989, actfancr, 0, actfancr, actfancr, actfancr, ROT0, "Data East Corporation", "Act-Fancer Cybernetick Hyper Weapon (World revision 2)", GAME_SUPPORTS_SAVE ) |
| 635 | 635 | GAME( 1989, actfancr1,actfancr, actfancr, actfancr, actfancr, ROT0, "Data East Corporation", "Act-Fancer Cybernetick Hyper Weapon (World revision 1)", GAME_SUPPORTS_SAVE ) |
| 636 | GAME( 1989, actfancrj,actfancr, actfancr, actfancr, actfancj, | |
| 636 | GAME( 1989, actfancrj,actfancr, actfancr, actfancr, actfancrj, | |
| 637 | 637 | GAME( 1989, triothep, 0, triothep, triothep, 0, ROT0, "Data East Corporation", "Trio The Punch - Never Forget Me... (World)", GAME_SUPPORTS_SAVE ) |
| 638 | 638 | GAME( 1989, triothepj,triothep, triothep, triothep, 0, ROT0, "Data East Corporation", "Trio The Punch - Never Forget Me... (Japan)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 2552 | 2552 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2553 | 2553 | |
| 2554 | 2554 | PORT_START("DSWC") |
| 2555 | PORT_DIPNAME( 0x08, 0x08, "Freeze" ) | |
| 2556 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2557 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2555 | PORT_DIPUNUSED( 0x01, 0x01 ) | |
| 2556 | PORT_DIPUNUSED( 0x02, 0x02 ) | |
| 2557 | PORT_DIPUNUSED( 0x04, 0x04 ) | |
| 2558 | PORT_DIPUNUSED( 0x08, 0x08 ) | |
| 2559 | PORT_DIPUNUSED( 0x10, 0x10 ) | |
| 2560 | PORT_DIPUNUSED( 0x20, 0x20 ) | |
| 2561 | PORT_DIPUNUSED( 0x40, 0x40 ) | |
| 2562 | PORT_DIPUNUSED( 0x80, 0x80 ) /* doubles up as an extra service switch */ | |
| 2558 | 2563 | |
| 2559 | 2564 | PORT_START( "EEPROMIN" ) |
| 2560 | 2565 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("eeprom", eeprom_read_bit) |
| r7356 | r7357 | |
| 2566 | 2571 | INPUT_PORTS_END |
| 2567 | 2572 | |
| 2568 | 2573 | /* Needs further checking */ |
| 2574 | static INPUT_PORTS_START( pang3n ) | |
| 2575 | PORT_INCLUDE( pang3 ) | |
| 2576 | ||
| 2577 | PORT_MODIFY("DSWC") | |
| 2578 | PORT_DIPUNUSED( 0x01, 0x01 ) | |
| 2579 | PORT_DIPUNUSED( 0x02, 0x02 ) | |
| 2580 | PORT_DIPUNUSED( 0x04, 0x04 ) | |
| 2581 | PORT_DIPNAME( 0x08, 0x08, "Freeze" ) | |
| 2582 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2583 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2584 | PORT_DIPUNUSED( 0x10, 0x10 ) | |
| 2585 | PORT_DIPUNUSED( 0x20, 0x20 ) | |
| 2586 | PORT_DIPUNUSED( 0x40, 0x40 ) | |
| 2587 | PORT_DIPUNUSED( 0x80, 0x80 ) | |
| 2588 | INPUT_PORTS_END | |
| 2589 | ||
| 2590 | /* Needs further checking */ | |
| 2569 | 2591 | static INPUT_PORTS_START( megaman ) |
| 2570 | 2592 | PORT_INCLUDE( cps1_3b ) |
| 2571 | 2593 | |
| r7356 | r7357 | |
| 8500 | 8522 | ROM_LOAD( "sou1", 0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) ) |
| 8501 | 8523 | ROM_END |
| 8502 | 8524 | |
| 8503 | ||
| 8525 | ||
| 8504 | 8526 | ROM_START( pang3 ) |
| 8505 | 8527 | ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ |
| 8528 | ROM_LOAD16_WORD_SWAP( "pa3e-17a.11l", 0x00000, 0x80000, CRC(a213fa80) SHA1(fee6b0b21e2ef573ebfb35eaa1785533101c9170) ) | |
| 8529 | ROM_LOAD16_WORD_SWAP( "pa3e-16a.10l", 0x80000, 0x80000, CRC(7169ea67) SHA1(1076afaff7b05c9009798a0cea13e71fa27f2b7e) ) | |
| 8530 | ||
| 8531 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 8532 | ROMX_LOAD( "pa3-01m.2c", 0x000000, 0x100000, CRC(068a152c) SHA1(fa491874068924c39bcc7de93dfda3b27f5d9613) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8533 | ROM_CONTINUE( 0x000004, 0x100000 ) | |
| 8534 | ROMX_LOAD( "pa3-07m.2f", 0x000002, 0x100000, CRC(3a4a619d) SHA1(cfe68e24632b53fb6cd6d03b2166d6b5ba28b778) , ROM_GROUPWORD | ROM_SKIP(6) ) | |
| 8535 | ROM_CONTINUE( 0x000006, 0x100000 ) | |
| 8536 | ||
| 8537 | ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */ | |
| 8538 | ROM_LOAD( "pa3-11.11f", 0x00000, 0x08000, CRC(90a08c46) SHA1(7544adab2d7e052e0d21c920bff7841d9d718345) ) | |
| 8539 | ||
| 8540 | ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ | |
| 8541 | ROM_LOAD( "pa3-05.10d", 0x00000, 0x20000, CRC(73a10d5d) SHA1(999465e4fbc35a34746d2db61ad49f61403d5af7) ) | |
| 8542 | ROM_LOAD( "pa3-06.11d", 0x20000, 0x20000, CRC(affa4f82) SHA1(27b9292bbc121cf585f53297a79fe8f0d0a729ae) ) | |
| 8543 | ||
| 8544 | ROM_REGION( 0x0200, "aboardplds", 0 ) | |
| 8545 | ROM_LOAD( "buf1", 0x0000, 0x0117, CRC(eb122de7) SHA1(b26b5bfe258e3e184f069719f9fd008d6b8f6b9b) ) | |
| 8546 | ROM_LOAD( "ioa1", 0x0000, 0x0117, CRC(59c7ee3b) SHA1(fbb887c5b4f5cb8df77cec710eaac2985bc482a6) ) | |
| 8547 | ROM_LOAD( "prg1", 0x0000, 0x0117, CRC(f1129744) SHA1(a5300f301c1a08a7da768f0773fa0fe3f683b237) ) | |
| 8548 | ROM_LOAD( "rom1", 0x0000, 0x0117, CRC(41dc73b9) SHA1(7d4c9f1693c821fbf84e32dd6ef62ddf14967845) ) | |
| 8549 | ROM_LOAD( "sou1", 0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) ) | |
| 8550 | ROM_END | |
| 8551 | ||
| 8552 | ||
| 8553 | /* B-Board 94916-10 */ | |
| 8554 | ROM_START( pang3n ) /* this set isn't encrypted, is it actually an original? */ | |
| 8555 | ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ | |
| 8506 | 8556 | ROM_LOAD16_WORD_SWAP( "pa3w-17.11l", 0x00000, 0x80000, CRC(12138234) SHA1(956a2c847a3cfb94007d1a636167fd2bb9f826ec) ) |
| 8507 | 8557 | ROM_LOAD16_WORD_SWAP( "pa3w-16.10l", 0x80000, 0x80000, CRC(d1ba585c) SHA1(c6d04441fe97abf0a72b23c917777a7b58e94a85) ) |
| 8508 | 8558 | |
| r7356 | r7357 | |
| 8718 | 8768 | DRIVER_INIT_CALL(cps1); |
| 8719 | 8769 | } |
| 8720 | 8770 | |
| 8721 | static DRIVER_INIT( pang3 ) | |
| 8771 | static DRIVER_INIT( pang3n ) | |
| 8722 | 8772 | { |
| 8723 | 8773 | /* Pang 3 is the only non-QSound game to have an EEPROM. */ |
| 8724 | 8774 | /* It is mapped in the CPS-B address range so probably is on the C-board. */ |
| r7356 | r7357 | |
| 8727 | 8777 | DRIVER_INIT_CALL(cps1); |
| 8728 | 8778 | } |
| 8729 | 8779 | |
| 8730 | static DRIVER_INIT( pang3 | |
| 8780 | static DRIVER_INIT( pang3 | |
| 8731 | 8781 | { |
| 8732 | 8782 | UINT16 *rom = (UINT16 *)memory_region(machine, "maincpu"); |
| 8733 | 8783 | int A, src, dst; |
| r7356 | r7357 | |
| 8748 | 8798 | rom[A/2] = dst; |
| 8749 | 8799 | } |
| 8750 | 8800 | |
| 8751 | DRIVER_INIT_CALL(pang3); | |
| 8801 | DRIVER_INIT_CALL(pang3n); | |
| 8752 | 8802 | } |
| 8753 | 8803 | #endif |
| 8754 | 8804 | |
| r7356 | r7357 | |
| 8918 | 8968 | GAME( 1993, mbombrdj, mbombrd, qsound, slammast, slammast, ROT0, "Capcom", "Muscle Bomber Duo - Heat Up Warriors (Japan 931206)", GAME_SUPPORTS_SAVE ) |
| 8919 | 8969 | |
| 8920 | 8970 | GAME( 1994, pnickj, 0, cps1_12MHz, pnickj, cps1, ROT0, "Compile (Capcom license)", "Pnickies (Japan 940608)", GAME_SUPPORTS_SAVE ) |
| 8921 | /* Japanese version of Pang 3 is encrypted, Euro version is not */ | |
| 8922 | GAME( 1995, pang3, 0, pang3, pang3, pang3, ROT0, "Mitchell", "Pang! 3 (Euro 950511)", GAME_SUPPORTS_SAVE ) | |
| 8923 | GAME( 1995, pang3j, pang3, pang3, pang3, pang3j, ROT0, "Mitchell", "Pang! 3 (Japan 950511)", GAME_SUPPORTS_SAVE ) | |
| 8971 | ||
| 8972 | GAME( 1995, pang3, 0, pang3, pang3, pang3, ROT0, "Mitchell", "Pang! 3 (Euro 950601)", GAME_SUPPORTS_SAVE ) | |
| 8973 | GAME( 1995, pang3n, pang3, pang3, pang3n, pang3n, ROT0, "Mitchell", "Pang! 3 (Euro 950511, not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 8974 | GAME( 1995, pang3j, pang3, pang3, pang3n, pang3, ROT0, "Mitchell", "Pang! 3 (Japan 950511)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 4 | 4 | ===================================== |
| 5 | 5 | Driver by smf & Ryan Holtz |
| 6 | 6 | Board notes by The Guru |
| 7 | Sound by R Belmont | |
| 7 | Sound and MCU hookup by R. Belmont | |
| 8 | 8 | Thanks to the original Zinc Team. |
| 9 | 9 | |
| 10 | 10 | Issues: |
| 11 | The C76 internal rom is not dumped, we use the sound program from Prop Cycle and patch the inputs. | |
| 12 | 11 | Random draw list corruption in soul edge v2 & dunkmania. |
| 13 | 12 | soul edge, dunk mania & prime goal ex try to access joypads/memory cards. It is unknown what they would do if they found one. |
| 13 | Pocket Racer can't enter service menus with proper C76 hookup, runs 60 FPS when it looks like it should be 30 | |
| 14 | 14 | |
| 15 | 15 | Known Dumps |
| 16 | 16 | ----------- |
| r7356 | r7357 | |
| 266 | 266 | #include "emu.h" |
| 267 | 267 | #include "deprecat.h" |
| 268 | 268 | #include "cpu/mips/psx.h" |
| 269 | #include "cpu/m37710/m37710.h" | |
| 269 | 270 | #include "includes/psx.h" |
| 270 | 271 | #include "machine/at28c16.h" |
| 271 | #include " | |
| 272 | #include "sound | |
| 272 | 273 | |
| 273 | 274 | #define VERBOSE_LEVEL ( 0 ) |
| 274 | 275 | |
| r7356 | r7357 | |
| 553 | 554 | return data; |
| 554 | 555 | } |
| 555 | 556 | |
| 556 | static WRITE32_HANDLER( sharedram_w ) | |
| 557 | { | |
| 558 | verboselog( space->machine, 1, "sharedram_w( %08x, %08x, %08x )\n", ( offset * 4 ) + 0x4000, data, mem_mask ); | |
| 559 | COMBINE_DATA( &namcos11_sharedram[ offset ] ); | |
| 560 | } | |
| 561 | ||
| 562 | static READ32_HANDLER( sharedram_r ) | |
| 563 | { | |
| 564 | verboselog( space->machine, 1, "sharedram_r( %08x, %08x ) %08x\n", ( offset * 4 ) + 0x4000, mem_mask, namcos11_sharedram[ offset ] ); | |
| 565 | return namcos11_sharedram[ offset ]; | |
| 566 | } | |
| 567 | ||
| 568 | #define SHRAM( x ) namcos11_sharedram[ ( x - 0x4000 ) / 4 ] | |
| 569 | ||
| 570 | static UINT16 m_n_oldcoin; | |
| 571 | ||
| 572 | 557 | static INTERRUPT_GEN( namcos11_vblank ) |
| 573 | 558 | { |
| 574 | UINT16 n_coin; | |
| 575 | UINT32 n_input; | |
| 576 | ||
| 577 | n_input = ( input_port_read(device->machine, "PLAYER1" ) << 16 ); | |
| 578 | SHRAM( 0xbd00 ) = n_input | ( ( n_input & ~SHRAM( 0xbd00 ) ) >> 8 ) | ( SHRAM( 0xbd00 ) & 0x0000ffff ); | |
| 579 | ||
| 580 | n_input = input_port_read(device->machine, "PLAYER2" ) | ( input_port_read(device->machine, "PLAYER3" ) << 16 ); | |
| 581 | SHRAM( 0xbd04 ) = n_input | ( ( n_input & ~SHRAM( 0xbd04 ) ) >> 8 ); | |
| 582 | ||
| 583 | n_input = input_port_read(device->machine, "PLAYER4" ); | |
| 584 | SHRAM( 0xbd08 ) = n_input | ( ( n_input & ~SHRAM( 0xbd08 ) ) >> 8 ) | ( SHRAM( 0xbd08 ) & 0xffff0000 ); | |
| 585 | ||
| 586 | n_coin = input_port_read(device->machine, "COIN" ); | |
| 587 | ||
| 588 | if( ( n_coin & m_n_oldcoin & 0x08 ) != 0 ) | |
| 589 | { | |
| 590 | SHRAM( 0xbd1c ) = ( SHRAM( 0xbd1c ) & 0x0000ffff ) | ( ( SHRAM( 0xbd1c ) + 0x00010000 ) & 0xffff0000 ); | |
| 591 | } | |
| 592 | if( ( n_coin & m_n_oldcoin & 0x04 ) != 0 ) | |
| 593 | { | |
| 594 | SHRAM( 0xbd20 ) = ( SHRAM( 0xbd20 ) & 0xffff0000 ) | ( ( SHRAM( 0xbd20 ) + 0x00000001 ) & 0x0000ffff ); | |
| 595 | } | |
| 596 | if( ( n_coin & m_n_oldcoin & 0x02 ) != 0 ) | |
| 597 | { | |
| 598 | SHRAM( 0xbd20 ) = ( SHRAM( 0xbd20 ) & 0x0000ffff ) | ( ( SHRAM( 0xbd20 ) + 0x00010000 ) & 0xffff0000 ); | |
| 599 | } | |
| 600 | if( ( n_coin & m_n_oldcoin & 0x01 ) != 0 ) | |
| 601 | { | |
| 602 | SHRAM( 0xbd24 ) = ( SHRAM( 0xbd24 ) & 0xffff0000 ) | ( ( SHRAM( 0xbd24 ) + 0x00000001 ) & 0x0000ffff ); | |
| 603 | } | |
| 604 | m_n_oldcoin = ~n_coin; | |
| 605 | ||
| 606 | 559 | if( strcmp( device->machine->gamedrv->name, "pocketrc" ) == 0 ) |
| 607 | 560 | { |
| 608 | 561 | if( g_p_n_psxram[ 0x12c74 / 4 ] == 0x1440fff9 ) |
| r7356 | r7357 | |
| 613 | 566 | { |
| 614 | 567 | g_p_n_psxram[ 0x64694 / 4 ] = 0; |
| 615 | 568 | } |
| 616 | ||
| 617 | if( ( SHRAM( 0xbe88 ) & 0x0000ffff ) == 2 ) | |
| 618 | { | |
| 619 | cpu_set_input_line(device, INPUT_LINE_RESET, PULSE_LINE ); | |
| 620 | memset( namcos11_keycus, 0, namcos11_keycus_size ); | |
| 621 | ||
| 622 | SHRAM( 0xbe88 ) = ( SHRAM( 0xbe88 ) & 0xffff0000 ); | |
| 623 | } | |
| 624 | ||
| 625 | SHRAM( 0xbd30 ) = ( SHRAM( 0xbd30 ) & 0x0000ffff ) | ( 0x0080 << 16 ); | |
| 626 | ||
| 627 | SHRAM( 0xbd08 ) = ( SHRAM( 0xbd08 ) & 0x0000ffff ) | ( ( input_port_read(device->machine, "STEERING" ) - 0x8000 ) << 16 ); | |
| 628 | SHRAM( 0xbd0c ) = ( SHRAM( 0xbd0c ) & 0xffff0000 ) | ( input_port_read(device->machine, "GAS" ) << 0 ); | |
| 629 | 569 | } |
| 630 | 570 | |
| 631 | 571 | psx_vblank(device); |
| 632 | 572 | } |
| 633 | 573 | |
| 634 | static TIMER_CALLBACK( mcu_timer ) | |
| 635 | { | |
| 636 | SHRAM( 0xbd00 ) = ( SHRAM( 0xbd00 ) & 0xffffff00 ) | input_port_read(machine, "SWITCH" ); | |
| 637 | } | |
| 638 | ||
| 639 | 574 | static UINT32 m_n_bankoffset; |
| 640 | 575 | |
| 641 | 576 | INLINE void bankswitch_rom8( const address_space *space, const char *bank, int n_data ) |
| r7356 | r7357 | |
| 750 | 685 | AM_RANGE(0x1f801c00, 0x1f801dff) AM_NOP |
| 751 | 686 | AM_RANGE(0x1f802020, 0x1f802033) AM_RAM /* ?? */ |
| 752 | 687 | AM_RANGE(0x1f802040, 0x1f802043) AM_WRITENOP |
| 753 | AM_RANGE(0x1fa04000, 0x1fa0ffff) AM_R | |
| 688 | AM_RANGE(0x1fa04000, 0x1fa0ffff) AM_R | |
| 754 | 689 | AM_RANGE(0x1fa20000, 0x1fa2ffff) AM_WRITE(keycus_w) AM_BASE(&namcos11_keycus) AM_SIZE(&namcos11_keycus_size) /* keycus */ |
| 755 | 690 | AM_RANGE(0x1fa30000, 0x1fa30fff) AM_DEVREADWRITE8("at28c16", at28c16_r, at28c16_w, 0x00ff00ff) /* eeprom */ |
| 756 | 691 | AM_RANGE(0x1fb00000, 0x1fb00003) AM_WRITENOP /* ?? */ |
| r7356 | r7357 | |
| 763 | 698 | AM_RANGE(0xfffe0130, 0xfffe0133) AM_WRITENOP |
| 764 | 699 | ADDRESS_MAP_END |
| 765 | 700 | |
| 701 | static READ16_HANDLER( c76_shared_r ) | |
| 702 | { | |
| 703 | UINT16 *share16 = (UINT16 *)namcos11_sharedram; | |
| 704 | ||
| 705 | return share16[offset]; | |
| 706 | } | |
| 707 | ||
| 708 | static WRITE16_HANDLER( c76_shared_w ) | |
| 709 | { | |
| 710 | UINT16 *share16 = (UINT16 *)namcos11_sharedram; | |
| 711 | ||
| 712 | COMBINE_DATA(&share16[offset]); | |
| 713 | } | |
| 714 | ||
| 715 | static UINT8 su_83; | |
| 716 | ||
| 717 | static READ16_HANDLER( c76_speedup_r ) | |
| 718 | { | |
| 719 | if ((cpu_get_pc(space->cpu) == 0xc153) && (!(su_83 & 0xff00))) | |
| 720 | { | |
| 721 | cpu_spinuntil_int(space->cpu); | |
| 722 | } | |
| 723 | ||
| 724 | return su_83; | |
| 725 | } | |
| 726 | ||
| 727 | static WRITE16_HANDLER( c76_speedup_w ) | |
| 728 | { | |
| 729 | COMBINE_DATA(&su_83); | |
| 730 | } | |
| 731 | ||
| 732 | static READ16_HANDLER( c76_inputs_r ) | |
| 733 | { | |
| 734 | // logerror("'c76' Read port %d @ %06X\n", offset, cpu_get_pc(space->cpu)); | |
| 735 | ||
| 736 | switch (offset) | |
| 737 | { | |
| 738 | case 0: | |
| 739 | return input_port_read(space->machine, "PLAYER4"); | |
| 740 | ||
| 741 | case 1: | |
| 742 | return input_port_read(space->machine, "SWITCH"); | |
| 743 | ||
| 744 | case 2: | |
| 745 | return input_port_read(space->machine, "PLAYER1"); | |
| 746 | ||
| 747 | case 3: | |
| 748 | return input_port_read(space->machine, "PLAYER2"); | |
| 749 | } | |
| 750 | ||
| 751 | return 0xff; | |
| 752 | } | |
| 753 | ||
| 754 | ADDRESS_MAP_START( c76_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 755 | AM_RANGE(0x002000, 0x002fff) AM_DEVREADWRITE("c352", c352_r, c352_w ) | |
| 756 | AM_RANGE(0x001000, 0x001007) AM_READ( c76_inputs_r ) | |
| 757 | AM_RANGE(0x004000, 0x00bfff) AM_READWRITE( c76_shared_r, c76_shared_w ) | |
| 758 | AM_RANGE(0x00c000, 0x00ffff) AM_ROM AM_REGION("c76", 0x40000) | |
| 759 | AM_RANGE(0x080000, 0x0fffff) AM_ROM AM_REGION("c76", 0) | |
| 760 | AM_RANGE(0x200000, 0x27ffff) AM_ROM AM_REGION("c76", 0) | |
| 761 | AM_RANGE(0x280000, 0x2fffff) AM_ROM AM_REGION("c76", 0) | |
| 762 | AM_RANGE(0x300000, 0x300001) AM_WRITENOP | |
| 763 | AM_RANGE(0x301000, 0x301001) AM_WRITENOP | |
| 764 | ADDRESS_MAP_END | |
| 765 | ||
| 766 | static READ8_HANDLER(dac7_r) // bit 7 | |
| 767 | { | |
| 768 | return input_port_read_safe(space->machine, "PLAYER3", 0xff)&0x80; | |
| 769 | } | |
| 770 | ||
| 771 | static READ8_HANDLER(dac6_r) // bit 3 | |
| 772 | { | |
| 773 | return (input_port_read_safe(space->machine, "PLAYER3", 0xff)<<4)&0x80; | |
| 774 | } | |
| 775 | ||
| 776 | static READ8_HANDLER(dac5_r) // bit 2 | |
| 777 | { | |
| 778 | return (input_port_read_safe(space->machine, "PLAYER3", 0xff)<<5)&0x80; | |
| 779 | } | |
| 780 | ||
| 781 | static READ8_HANDLER(dac4_r) // bit 1 | |
| 782 | { | |
| 783 | return (input_port_read_safe(space->machine, "PLAYER3", 0xff)<<6)&0x80; | |
| 784 | } | |
| 785 | ||
| 786 | static READ8_HANDLER(dac3_r) // bit 0 | |
| 787 | { | |
| 788 | return (input_port_read_safe(space->machine, "PLAYER3", 0xff)<<7)&0x80; | |
| 789 | } | |
| 790 | ||
| 791 | static READ8_HANDLER(dac2_r) // bit 4 | |
| 792 | { | |
| 793 | return (input_port_read_safe(space->machine, "PLAYER3", 0xff)<<3)&0x80; | |
| 794 | } | |
| 795 | ||
| 796 | static READ8_HANDLER(dac1_r) // bit 5 | |
| 797 | { | |
| 798 | return (input_port_read_safe(space->machine, "PLAYER3", 0xff)<<2)&0x80; | |
| 799 | } | |
| 800 | ||
| 801 | static READ8_HANDLER(dac0_r) // bit 6 | |
| 802 | { | |
| 803 | return (input_port_read_safe(space->machine, "PLAYER3", 0xff)<<1)&0x80; | |
| 804 | } | |
| 805 | ||
| 806 | static READ8_HANDLER(pocketrc_gas_r) | |
| 807 | { | |
| 808 | return input_port_read(space->machine, "GAS"); | |
| 809 | } | |
| 810 | ||
| 811 | static READ8_HANDLER(pocketrc_steer_r) | |
| 812 | { | |
| 813 | return input_port_read(space->machine, "STEERING"); | |
| 814 | } | |
| 815 | ||
| 816 | ADDRESS_MAP_START( c76_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 817 | AM_RANGE(M37710_ADC7_L, M37710_ADC7_L) AM_READ(dac7_r) | |
| 818 | AM_RANGE(M37710_ADC6_L, M37710_ADC6_L) AM_READ(dac6_r) | |
| 819 | AM_RANGE(M37710_ADC5_L, M37710_ADC5_L) AM_READ(dac5_r) | |
| 820 | AM_RANGE(M37710_ADC4_L, M37710_ADC4_L) AM_READ(dac4_r) | |
| 821 | AM_RANGE(M37710_ADC3_L, M37710_ADC3_L) AM_READ(dac3_r) | |
| 822 | AM_RANGE(M37710_ADC2_L, M37710_ADC2_L) AM_READ(dac2_r) | |
| 823 | AM_RANGE(M37710_ADC1_L, M37710_ADC1_L) AM_READ(dac1_r) | |
| 824 | AM_RANGE(M37710_ADC0_L, M37710_ADC0_L) AM_READ(dac0_r) | |
| 825 | ||
| 826 | AM_RANGE(M37710_ADC0_H, M37710_ADC7_H) AM_READNOP | |
| 827 | ADDRESS_MAP_END | |
| 828 | ||
| 829 | INTERRUPT_GEN( c76_interrupt ) | |
| 830 | { | |
| 831 | switch (cpu_getiloops(device)) | |
| 832 | { | |
| 833 | case 0: | |
| 834 | cpu_set_input_line(device, M37710_LINE_IRQ0, HOLD_LINE); | |
| 835 | break; | |
| 836 | ||
| 837 | case 1: | |
| 838 | cpu_set_input_line(device, M37710_LINE_IRQ2, HOLD_LINE); | |
| 839 | break; | |
| 840 | ||
| 841 | case 2: | |
| 842 | cpu_set_input_line(device, M37710_LINE_ADC, HOLD_LINE); | |
| 843 | break; | |
| 844 | } | |
| 845 | } | |
| 846 | ||
| 766 | 847 | static const struct |
| 767 | 848 | { |
| 768 | 849 | const char *s_name; |
| r7356 | r7357 | |
| 796 | 877 | static DRIVER_INIT( namcos11 ) |
| 797 | 878 | { |
| 798 | 879 | int n_game; |
| 799 | emu_timer *timer; | |
| 800 | 880 | |
| 801 | timer = timer_alloc(machine, mcu_timer , NULL); | |
| 802 | timer_adjust_periodic( timer, ATTOTIME_IN_HZ( 600 ), 0, ATTOTIME_IN_HZ( 600 ) ); | |
| 881 | memory_install_readwrite16_handler(cputag_get_address_space(machine, "c76", ADDRESS_SPACE_PROGRAM), 0x82, 0x83, 0, 0, c76_speedup_r, c76_speedup_w); | |
| 803 | 882 | |
| 883 | if( strcmp( machine->gamedrv->name, "pocketrc" ) == 0 ) | |
| 884 | { | |
| 885 | memory_install_read8_handler(cputag_get_address_space(machine, "c76", ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC0_L, 0, 0, pocketrc_steer_r); | |
| 886 | memory_install_read8_handler(cputag_get_address_space(machine, "c76", ADDRESS_SPACE_IO), M37710_ADC1_L, M37710_ADC1_L, 0, 0, pocketrc_gas_r); | |
| 887 | } | |
| 888 | ||
| 804 | 889 | psx_driver_init(machine); |
| 805 | namcoc7x_on_driver_init(machine); | |
| 806 | namcoc7x_set_host_ram(namcos11_sharedram); | |
| 807 | 890 | |
| 808 | 891 | n_game = 0; |
| 809 | 892 | while( namcos11_config_table[ n_game ].s_name != NULL ) |
| r7356 | r7357 | |
| 862 | 945 | memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f788000, 0x1f788003, 0, 0, lightgun_w ); |
| 863 | 946 | memory_install_read32_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f780000, 0x1f78000f, 0, 0, lightgun_r ); |
| 864 | 947 | } |
| 865 | ||
| 866 | state_save_register_global(machine, m_n_oldcoin ); | |
| 867 | 948 | } |
| 868 | 949 | |
| 869 | 950 | static MACHINE_RESET( namcos11 ) |
| r7356 | r7357 | |
| 878 | 959 | MDRV_CPU_PROGRAM_MAP( namcos11_map) |
| 879 | 960 | MDRV_CPU_VBLANK_INT("screen", namcos11_vblank) |
| 880 | 961 | |
| 962 | MDRV_CPU_ADD("c76", M37702, 16384000) | |
| 963 | MDRV_CPU_PROGRAM_MAP(c76_map) | |
| 964 | MDRV_CPU_IO_MAP(c76_io_map) | |
| 965 | MDRV_CPU_VBLANK_INT_HACK(c76_interrupt, 3) | |
| 966 | ||
| 881 | 967 | MDRV_MACHINE_RESET( namcos11 ) |
| 882 | 968 | |
| 883 | 969 | /* video hardware */ |
| r7356 | r7357 | |
| 894 | 980 | MDRV_VIDEO_START( psx_type1 ) |
| 895 | 981 | MDRV_VIDEO_UPDATE( psx ) |
| 896 | 982 | |
| 897 | NAMCO_C7X_MCU_SHARED(16384000) | |
| 898 | NAMCO_C7X_SOUND(16384000) | |
| 983 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") | |
| 984 | MDRV_SOUND_ADD("c352", C352, 16384000) | |
| 985 | MDRV_SOUND_ROUTE(0, "rspeaker", 1.00) | |
| 986 | MDRV_SOUND_ROUTE(1, "lspeaker", 1.00) | |
| 987 | MDRV_SOUND_ROUTE(2, "rspeaker", 1.00) | |
| 988 | MDRV_SOUND_ROUTE(3, "lspeaker", 1.00) | |
| 899 | 989 | |
| 900 | 990 | MDRV_AT28C16_ADD( "at28c16", NULL ) |
| 901 | 991 | MACHINE_DRIVER_END |
| r7356 | r7357 | |
| 903 | 993 | static MACHINE_DRIVER_START( coh110 ) |
| 904 | 994 | MDRV_IMPORT_FROM( coh100 ) |
| 905 | 995 | MDRV_VIDEO_START( psx_type2 ) |
| 996 | ||
| 997 | MDRV_SCREEN_MODIFY("screen") | |
| 998 | MDRV_SCREEN_REFRESH_RATE( 30 ) | |
| 906 | 999 | MACHINE_DRIVER_END |
| 907 | 1000 | |
| 908 | 1001 | static INPUT_PORTS_START( namcos11 ) |
| 909 | 1002 | PORT_START( "SWITCH" ) |
| 910 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* read by pocket racer */ | |
| 911 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 912 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 913 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 914 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE1 ) | |
| 915 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) | |
| 916 | PORT_DIPNAME( 0x02, 0x00, "DIP1 (Test)" ) | |
| 1003 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1004 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 1005 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1006 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1007 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) | |
| 1008 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN4 ) | |
| 1009 | PORT_DIPNAME( 0x02, 0x02, "DIP1 (Test)" ) | |
| 1010 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1011 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1012 | PORT_DIPNAME( 0x01, 0x01, "DIP2 (Freeze)" ) | |
| 1013 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1014 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1015 | ||
| 1016 | PORT_START( "TEST" ) | |
| 1017 | PORT_DIPNAME( 0x80, 0x00, "TDIP8" ) | |
| 917 | 1018 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1019 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1020 | PORT_DIPNAME( 0x40, 0x00, "TDIP7" ) | |
| 1021 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1022 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1023 | PORT_DIPNAME( 0x20, 0x00, "TDIP6" ) | |
| 1024 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1025 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1026 | PORT_DIPNAME( 0x10, 0x00, "TDIP5" ) | |
| 1027 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1028 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1029 | PORT_DIPNAME( 0x08, 0x00, "TDIP4" ) | |
| 1030 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1031 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1032 | PORT_DIPNAME( 0x04, 0x00, "TDIP3" ) | |
| 1033 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1034 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 1035 | PORT_DIPNAME( 0x02, 0x00, "TDIP2" ) | |
| 1036 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 918 | 1037 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 919 | PORT_DIPNAME( 0x01, 0x00, "DIP | |
| 1038 | PORT_DIPNAME( 0x01, 0x00, "TDIP1 | |
| 920 | 1039 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 921 | 1040 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 922 | 1041 | |
| 923 | 1042 | PORT_START( "PLAYER1" ) |
| 924 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 925 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 926 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 927 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 928 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 929 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 930 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) | |
| 931 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1043 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1044 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1045 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1046 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1047 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1048 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1049 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 1050 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) | |
| 932 | 1051 | |
| 933 | 1052 | PORT_START( "PLAYER2" ) |
| 934 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER( 2 ) | |
| 935 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER( 2 ) | |
| 936 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER( 2 ) | |
| 937 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER( 2 ) | |
| 938 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER( 2 ) | |
| 939 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER( 2 ) | |
| 940 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER( 2 ) | |
| 941 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1053 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER( 2 ) | |
| 1054 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER( 2 ) | |
| 1055 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER( 2 ) | |
| 1056 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER( 2 ) | |
| 1057 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER( 2 ) | |
| 1058 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER( 2 ) | |
| 1059 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER( 2 ) | |
| 1060 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) | |
| 942 | 1061 | |
| 943 | 1062 | PORT_START( "PLAYER3" ) |
| 944 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER( 3 ) | |
| 945 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER( 3 ) | |
| 946 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER( 3 ) | |
| 947 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER( 3 ) | |
| 948 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER( 3 ) | |
| 949 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER( 3 ) | |
| 950 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER( 3 ) | |
| 951 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START3 ) | |
| 1063 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER( 3 ) | |
| 1064 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER( 3 ) | |
| 1065 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER( 3 ) | |
| 1066 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER( 3 ) | |
| 1067 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER( 3 ) | |
| 1068 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER( 3 ) | |
| 1069 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER( 3 ) | |
| 1070 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) | |
| 952 | 1071 | |
| 953 | 1072 | PORT_START( "PLAYER4" ) |
| 954 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER( 4 ) | |
| 955 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER( 4 ) | |
| 956 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER( 4 ) | |
| 957 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER( 4 ) | |
| 958 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER( 4 ) | |
| 959 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER( 4 ) | |
| 960 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER( 4 ) | |
| 961 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START4 ) | |
| 962 | ||
| 963 | PORT_START( "COIN" ) | |
| 964 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 965 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 966 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 967 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN3 ) | |
| 968 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN4 ) | |
| 1073 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER( 4 ) | |
| 1074 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER( 4 ) | |
| 1075 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER( 4 ) | |
| 1076 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER( 4 ) | |
| 1077 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER( 4 ) | |
| 1078 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER( 4 ) | |
| 1079 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER( 4 ) | |
| 1080 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) | |
| 969 | 1081 | INPUT_PORTS_END |
| 970 | 1082 | |
| 971 | 1083 | static INPUT_PORTS_START( tekken ) |
| 972 | 1084 | PORT_INCLUDE( namcos11 ) |
| 973 | 1085 | |
| 1086 | PORT_MODIFY( "SWITCH" ) | |
| 1087 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1088 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1089 | ||
| 974 | 1090 | PORT_MODIFY( "PLAYER1" ) |
| 975 | PORT_BIT( 0x40 | |
| 1091 | PORT_BIT( 0x40 | |
| 976 | 1092 | |
| 977 | 1093 | PORT_MODIFY( "PLAYER2" ) |
| 978 | PORT_BIT( 0x40 | |
| 1094 | PORT_BIT( 0x40 | |
| 979 | 1095 | |
| 980 | 1096 | PORT_MODIFY( "PLAYER3" ) |
| 981 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 982 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 983 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 984 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 985 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) | |
| 986 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON4 ) | |
| 987 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 988 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1097 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 989 | 1098 | |
| 990 | 1099 | PORT_MODIFY( "PLAYER4" ) |
| 991 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 992 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 993 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 994 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 995 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER( 2 ) | |
| 996 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER( 2 ) | |
| 997 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 998 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1100 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 999 | 1101 | INPUT_PORTS_END |
| 1000 | 1102 | |
| 1001 | 1103 | static INPUT_PORTS_START( souledge ) |
| 1002 | 1104 | PORT_INCLUDE( namcos11 ) |
| 1003 | 1105 | |
| 1106 | PORT_MODIFY( "SWITCH" ) | |
| 1107 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1108 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1109 | ||
| 1004 | 1110 | PORT_MODIFY( "PLAYER3" ) |
| 1005 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1006 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1007 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1008 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1009 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON4 ) | |
| 1010 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1011 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1012 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1111 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1112 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1113 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1114 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1115 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) | |
| 1116 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1117 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1118 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1013 | 1119 | |
| 1014 | 1120 | PORT_MODIFY( "PLAYER4" ) |
| 1015 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1016 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1017 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1018 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1019 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER( 2 ) | |
| 1020 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1021 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1022 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1121 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1122 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1123 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1124 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1125 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER( 2 ) | |
| 1126 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1127 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1128 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1023 | 1129 | INPUT_PORTS_END |
| 1024 | 1130 | |
| 1025 | 1131 | static INPUT_PORTS_START( myangel3 ) |
| 1026 | 1132 | PORT_INCLUDE( namcos11 ) |
| 1027 | 1133 | |
| 1134 | PORT_MODIFY( "SWITCH" ) | |
| 1135 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1136 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1137 | ||
| 1028 | 1138 | PORT_MODIFY( "PLAYER1" ) |
| 1029 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1030 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1031 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1032 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1033 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 1034 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON3 ) | |
| 1035 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON4 ) | |
| 1139 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1140 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) | |
| 1141 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 1142 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1143 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1036 | 1144 | |
| 1037 | 1145 | PORT_MODIFY( "PLAYER2" ) |
| 1038 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1039 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1040 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1041 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER( 2 ) | |
| 1042 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER( 2 ) | |
| 1043 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER( 2 ) | |
| 1044 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER( 2 ) | |
| 1146 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1147 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 1148 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1149 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1150 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1045 | 1151 | |
| 1046 | 1152 | PORT_MODIFY( "PLAYER3" ) |
| 1047 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1048 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1049 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1050 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1051 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1052 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1053 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1054 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1153 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1154 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1155 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1156 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1157 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1158 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1159 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1160 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1055 | 1161 | |
| 1056 | 1162 | PORT_MODIFY( "PLAYER4" ) |
| 1057 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1058 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1059 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1060 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1061 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1062 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1063 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1064 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1163 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1164 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1165 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1166 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1167 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1168 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1169 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1170 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1065 | 1171 | INPUT_PORTS_END |
| 1066 | 1172 | |
| 1067 | 1173 | static INPUT_PORTS_START( ptblnk2a ) |
| 1068 | 1174 | PORT_INCLUDE( namcos11 ) |
| 1069 | 1175 | |
| 1070 | 1176 | PORT_MODIFY( "PLAYER1" ) |
| 1071 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1072 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1073 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1074 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1075 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1076 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1177 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1178 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1179 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1180 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1181 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1182 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1077 | 1183 | |
| 1078 | 1184 | PORT_MODIFY( "PLAYER2" ) |
| 1079 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1080 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1081 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1082 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1083 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1084 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1185 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1186 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1187 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1188 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1189 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1190 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1085 | 1191 | |
| 1086 | 1192 | PORT_MODIFY( "PLAYER3" ) |
| 1087 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1088 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1089 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1090 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1091 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1092 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1093 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1094 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1193 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1194 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1195 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1196 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1197 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1198 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1199 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1200 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1095 | 1201 | |
| 1096 | 1202 | PORT_MODIFY( "PLAYER4" ) |
| 1097 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1098 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1099 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1100 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1101 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1102 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1103 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1104 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1203 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1204 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1205 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1206 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1207 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1208 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1209 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1210 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1105 | 1211 | |
| 1106 | 1212 | PORT_START( "GUN1X" ) |
| 1107 | 1213 | PORT_BIT( 0xffff, 0x022f, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX( 0xd8, 0x387 ) PORT_SENSITIVITY( 100 ) PORT_KEYDELTA( 15 ) PORT_PLAYER( 1 ) |
| r7356 | r7357 | |
| 1119 | 1225 | static INPUT_PORTS_START( pocketrc ) |
| 1120 | 1226 | PORT_INCLUDE( namcos11 ) |
| 1121 | 1227 | |
| 1228 | PORT_MODIFY( "SWITCH" ) | |
| 1229 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1230 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1231 | ||
| 1122 | 1232 | PORT_MODIFY( "PLAYER1" ) |
| 1123 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1124 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1125 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1126 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1127 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1128 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1129 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1130 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1233 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1234 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1235 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1236 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1237 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1238 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1239 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1240 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1131 | 1241 | |
| 1132 | 1242 | PORT_MODIFY( "PLAYER2" ) |
| 1133 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1134 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1135 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1136 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1137 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1138 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1139 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1140 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1243 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1244 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1245 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1246 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1247 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1248 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1249 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1250 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1141 | 1251 | |
| 1142 | 1252 | PORT_MODIFY( "PLAYER3" ) |
| 1143 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1144 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1145 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1146 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1147 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1148 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1149 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1150 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1253 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1254 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1255 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1256 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1257 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1258 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1259 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1260 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1151 | 1261 | |
| 1152 | 1262 | PORT_MODIFY( "PLAYER4" ) |
| 1153 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1154 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1155 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1156 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1157 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CODE( KEYCODE_A ) | |
| 1158 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1159 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1160 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1263 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1264 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1265 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1266 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1267 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1268 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1269 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1270 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1161 | 1271 | |
| 1162 | PORT_MODIFY( "COIN" ) | |
| 1163 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1164 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1165 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1166 | ||
| 1167 | 1272 | PORT_START( "STEERING" ) |
| 1168 | PORT_BIT( 0xff | |
| 1273 | PORT_BIT( 0xff | |
| 1169 | 1274 | |
| 1170 | 1275 | PORT_START( "GAS" ) |
| 1171 | 1276 | PORT_BIT( 0x00ff, 0x0000, IPT_PEDAL ) PORT_MINMAX( 0x0000, 0x00ff ) PORT_SENSITIVITY( 100 ) PORT_KEYDELTA( 15 ) PORT_PLAYER( 1 ) PORT_REVERSE |
| r7356 | r7357 | |
| 1188 | 1293 | ROM_LOAD16_BYTE( "dc1rom3l.ic1", 0x0c00000, 0x200000, CRC(a76bcd4c) SHA1(817abdc43158b7aaac329c3ea17782277acb36a4) ) |
| 1189 | 1294 | ROM_LOAD16_BYTE( "dc1rom3u.ic9", 0x0c00001, 0x200000, CRC(1405d123) SHA1(3d7be5558358740f5a0a3a3022543cf5aca4cf24) ) |
| 1190 | 1295 | |
| 1191 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1296 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1192 | 1297 | ROM_LOAD( "dc1sprog.6d", 0x0000000, 0x040000, CRC(96cd7788) SHA1(68a5a53a5fc50e2b6b684c99d27d81e3a8c56287) ) |
| 1193 | | |
| 1298 | R | |
| 1194 | 1299 | |
| 1195 | 1300 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1196 | 1301 | ROM_LOAD( "dc1wave.8k", 0x000000, 0x400000, CRC(8ba0f6a7) SHA1(e9868debd808e92b196d1baeeeae9c4855356a01) ) |
| r7356 | r7357 | |
| 1214 | 1319 | ROM_LOAD16_BYTE( "dm1rom1u.ic8", 0x0400001, 0x200000, CRC(01e905d3) SHA1(430b2ae0c67265b6acc8aa4dd50f6144929993f8) ) |
| 1215 | 1320 | ROM_CONTINUE( 0x0400001, 0x200000 ) /* first & second half identical */ |
| 1216 | 1321 | |
| 1217 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1322 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1218 | 1323 | ROM_LOAD( "dm1sprog.6d", 0x0000000, 0x040000, CRC(de1cbc78) SHA1(855ebece1841f50ae324d7d6b8b18ab6f657d28e) ) |
| 1219 | | |
| 1324 | R | |
| 1220 | 1325 | |
| 1221 | 1326 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1222 | 1327 | ROM_LOAD( "dm1wave.8k", 0x000000, 0x400000, CRC(4891d53e) SHA1(a1fee060e94d3219174b5974517f4fd3be32aaa5) ) |
| r7356 | r7357 | |
| 1240 | 1345 | ROM_LOAD16_BYTE( "dm1rom1u.ic8", 0x0400001, 0x200000, CRC(01e905d3) SHA1(430b2ae0c67265b6acc8aa4dd50f6144929993f8) ) |
| 1241 | 1346 | ROM_CONTINUE( 0x0400001, 0x200000 ) /* first & second half identical */ |
| 1242 | 1347 | |
| 1243 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1348 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1244 | 1349 | ROM_LOAD( "dm1sprog.6d", 0x0000000, 0x040000, CRC(de1cbc78) SHA1(855ebece1841f50ae324d7d6b8b18ab6f657d28e) ) |
| 1245 | | |
| 1350 | R | |
| 1246 | 1351 | |
| 1247 | 1352 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1248 | 1353 | ROM_LOAD( "dm1wave.8k", 0x800000, 0x400000, CRC(4891d53e) SHA1(a1fee060e94d3219174b5974517f4fd3be32aaa5) ) |
| r7356 | r7357 | |
| 1259 | 1364 | ROM_LOAD16_BYTE( "kqt1prg1l.ic3", 0x1000000, 0x800000, CRC(298d8eeb) SHA1(c421b1bdd5fd46c026a41e2cec47cafd1a69d33d) ) |
| 1260 | 1365 | ROM_LOAD16_BYTE( "kqt1prg1u.ic6", 0x1000001, 0x800000, CRC(911783db) SHA1(1005fc9b38e212844e397150a6f98f43ad88d4b9) ) |
| 1261 | 1366 | |
| 1262 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1367 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1263 | 1368 | ROM_LOAD( "kqt1sprog.7e", 0x0000000, 0x040000, CRC(bb1888a6) SHA1(4db07738079725413cdba7eb75252ee71ae50a66) ) |
| 1264 | | |
| 1369 | R | |
| 1265 | 1370 | |
| 1266 | 1371 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1267 | 1372 | ROM_LOAD( "kqt1wave.8k", 0x000000, 0x400000, CRC(92ca8e4f) SHA1(48d6bdfcc5de1c280afa36c3f0dd6d4177771355) ) |
| r7356 | r7357 | |
| 1277 | 1382 | ROM_LOAD16_BYTE( "pkr1rom0l.ic5", 0x000000, 0x200000, CRC(6c9b074c) SHA1(885f342bd178e4146e1f75259206f6625c0b3c18) ) |
| 1278 | 1383 | ROM_LOAD16_BYTE( "pkr1rom0u.ic6", 0x000001, 0x200000, CRC(a55c0906) SHA1(3b6abfa877f88a4d96222d98af02498b0c777af6) ) |
| 1279 | 1384 | |
| 1280 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1385 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1281 | 1386 | ROM_LOAD( "pkr1verb.6d", 0x000000, 0x040000, CRC(9bf08992) SHA1(fca7943f7bcf0ee758fa63fbdef8f7456b9e46cb) ) |
| 1282 | | |
| 1387 | R | |
| 1283 | 1388 | |
| 1284 | 1389 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1285 | 1390 | ROM_LOAD( "pkr1wave.8k", 0x000000, 0x400000, CRC(72517c46) SHA1(d0dcc750fe8eca9e965e7c366ac39a42ffd76557) ) |
| r7356 | r7357 | |
| 1301 | 1406 | ROM_LOAD16_BYTE( "pg1rom1l.ic8", 0x0400001, 0x200000, CRC(59b5a71c) SHA1(ddc1f0a5488466166c21fd0c84ab2b4cf04316bf) ) |
| 1302 | 1407 | ROM_CONTINUE( 0x0400001, 0x200000 ) /* first & second half identical */ |
| 1303 | 1408 | |
| 1304 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1409 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1305 | 1410 | ROM_LOAD( "pg1sprog.6d", 0x0000000, 0x040000, CRC(e7c3396d) SHA1(12bbb8ebcaab1b40462a12917dd9b58bd9ab8663) ) |
| 1306 | | |
| 1411 | R | |
| 1307 | 1412 | |
| 1308 | 1413 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1309 | 1414 | ROM_LOAD( "pg1wave.8k", 0x0000000, 0x400000, CRC(fc9ad9eb) SHA1(ce5bb2288ed8cf1348825c39423cbb99d9324b9c) ) |
| r7356 | r7357 | |
| 1321 | 1426 | ROM_LOAD16_BYTE( "gnb1prg0l.ic2", 0x000000, 0x800000, CRC(78746037) SHA1(d130ca1153a730e3c967945248f00662f9fab304) ) |
| 1322 | 1427 | ROM_LOAD16_BYTE( "gnb1prg0u.ic5", 0x000001, 0x800000, CRC(697d3279) SHA1(40302780f7494d9413888b2d1da38bd14a9a444f) ) |
| 1323 | 1428 | |
| 1324 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1429 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1325 | 1430 | ROM_LOAD( "gnb1vera.6d", 0x0000000, 0x040000, CRC(6461ae77) SHA1(1377b716a69ef9d4d2e48083d23f22bd5c103c00) ) |
| 1326 | | |
| 1431 | R | |
| 1327 | 1432 | |
| 1328 | 1433 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1329 | 1434 | ROM_LOAD( "gnb1wave.8k", 0x0000000, 0x400000, CRC(4e19d9d6) SHA1(0a92c987536999a789663a30c787950ab6995128) ) |
| r7356 | r7357 | |
| 1347 | 1452 | ROM_LOAD16_BYTE( "so1rom3u.ic1", 0x0c00000, 0x200000, CRC(f11bd521) SHA1(baf936dec58cebfeef1c74f95e455b2fe74eb982) ) |
| 1348 | 1453 | ROM_LOAD16_BYTE( "so1rom3l.ic9", 0x0c00001, 0x200000, CRC(84465bcc) SHA1(d8be888d41cfe194c3a1853d9146d3a74ef7bab1) ) |
| 1349 | 1454 | |
| 1350 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1455 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1351 | 1456 | ROM_LOAD( "so1sprogc.6d", 0x0000000, 0x040000, CRC(2bbc118c) SHA1(4168a9aa525f1f0ce6cf6e14cfe4c118c4c0d773) ) |
| 1352 | | |
| 1457 | R | |
| 1353 | 1458 | |
| 1354 | 1459 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1355 | 1460 | ROM_LOAD( "so1wave.8k", 0x000000, 0x400000, CRC(0e68836b) SHA1(c392b370a807803c7ab060105861253e1b407f49) ) |
| r7356 | r7357 | |
| 1373 | 1478 | ROM_LOAD16_BYTE( "so1rom3u.ic1", 0x0c00000, 0x200000, CRC(f11bd521) SHA1(baf936dec58cebfeef1c74f95e455b2fe74eb982) ) |
| 1374 | 1479 | ROM_LOAD16_BYTE( "so1rom3l.ic9", 0x0c00001, 0x200000, CRC(84465bcc) SHA1(d8be888d41cfe194c3a1853d9146d3a74ef7bab1) ) |
| 1375 | 1480 | |
| 1376 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1481 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1377 | 1482 | ROM_LOAD( "so1sprogc.6d", 0x0000000, 0x040000, CRC(2bbc118c) SHA1(4168a9aa525f1f0ce6cf6e14cfe4c118c4c0d773) ) |
| 1378 | | |
| 1483 | R | |
| 1379 | 1484 | |
| 1380 | 1485 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1381 | 1486 | ROM_LOAD( "so1wave.8k", 0x000000, 0x400000, CRC(0e68836b) SHA1(c392b370a807803c7ab060105861253e1b407f49) ) |
| r7356 | r7357 | |
| 1399 | 1504 | ROM_LOAD16_BYTE( "so1rom3u.ic1", 0x0c00000, 0x200000, CRC(f11bd521) SHA1(baf936dec58cebfeef1c74f95e455b2fe74eb982) ) |
| 1400 | 1505 | ROM_LOAD16_BYTE( "so1rom3l.ic9", 0x0c00001, 0x200000, CRC(84465bcc) SHA1(d8be888d41cfe194c3a1853d9146d3a74ef7bab1) ) |
| 1401 | 1506 | |
| 1402 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1507 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1403 | 1508 | ROM_LOAD( "so1sprog.6d", 0x0000000, 0x040000, CRC(f6f682b7) SHA1(a64e19be3f6e630b8c34f34b46b95aadfabd3f63) ) |
| 1404 | | |
| 1509 | R | |
| 1405 | 1510 | |
| 1406 | 1511 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1407 | 1512 | ROM_LOAD( "so1wave.8k", 0x800000, 0x400000, CRC(0e68836b) SHA1(c392b370a807803c7ab060105861253e1b407f49) ) |
| r7356 | r7357 | |
| 1424 | 1529 | ROM_LOAD16_BYTE( "so1rom3u.ic1", 0x0c00000, 0x200000, CRC(f11bd521) SHA1(baf936dec58cebfeef1c74f95e455b2fe74eb982) ) |
| 1425 | 1530 | ROM_LOAD16_BYTE( "so1rom3l.ic9", 0x0c00001, 0x200000, CRC(84465bcc) SHA1(d8be888d41cfe194c3a1853d9146d3a74ef7bab1) ) |
| 1426 | 1531 | |
| 1427 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1532 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1428 | 1533 | ROM_LOAD( "so1sprog.6d", 0x0000000, 0x040000, CRC(f6f682b7) SHA1(a64e19be3f6e630b8c34f34b46b95aadfabd3f63) ) |
| 1429 | | |
| 1534 | R | |
| 1430 | 1535 | |
| 1431 | 1536 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1432 | 1537 | ROM_LOAD( "so1wave.8k", 0x000000, 0x400000, CRC(0e68836b) SHA1(c392b370a807803c7ab060105861253e1b407f49) ) |
| r7356 | r7357 | |
| 1440 | 1545 | |
| 1441 | 1546 | ROM_REGION32_LE( 0x0100000, "user2", ROMREGION_ERASE00 ) /* main data */ |
| 1442 | 1547 | |
| 1443 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1548 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1444 | 1549 | ROM_LOAD( "stp1sprog.7e", 0x0000000, 0x040000, CRC(08aaaf6a) SHA1(51c913a39ff7c154aef8bb10139cc8b92eb4756a) ) |
| 1445 | | |
| 1550 | R | |
| 1446 | 1551 | |
| 1447 | 1552 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1448 | 1553 | ROM_LOAD( "stp1wave.8k", 0x000000, 0x400000, CRC(18f30e92) SHA1(b3819455856298527a7224495f541145aecf23dd) ) |
| r7356 | r7357 | |
| 1464 | 1569 | ROM_LOAD16_BYTE( "te1rom2l.ic4", 0x0800000, 0x200000, CRC(41d77846) SHA1(eeab049135c02a255899fe37e225c1111b2fbb7d) ) |
| 1465 | 1570 | ROM_LOAD16_BYTE( "te1rom2u.ic7", 0x0800001, 0x200000, CRC(a678987e) SHA1(c62c00ce5cf4d001723c999b2bc3dbb90283def1) ) |
| 1466 | 1571 | |
| 1467 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1572 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1468 | 1573 | ROM_LOAD( "te1sprog.6d", 0x0000000, 0x040000, CRC(849587e9) SHA1(94c6a757b24758a866a41bd8acd46aa46844f74b) ) |
| 1469 | | |
| 1574 | R | |
| 1470 | 1575 | |
| 1471 | 1576 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1472 | 1577 | ROM_LOAD( "te1wave.8k", 0x0000000, 0x200000, CRC(fce6c57a) SHA1(7fb8c69452c92c59a940a2b69d0d73ef7aefcb82) ) |
| r7356 | r7357 | |
| 1487 | 1592 | ROM_LOAD16_BYTE( "te1rom2l.ic4", 0x0800000, 0x200000, CRC(41d77846) SHA1(eeab049135c02a255899fe37e225c1111b2fbb7d) ) |
| 1488 | 1593 | ROM_LOAD16_BYTE( "te1rom2u.ic7", 0x0800001, 0x200000, CRC(a678987e) SHA1(c62c00ce5cf4d001723c999b2bc3dbb90283def1) ) |
| 1489 | 1594 | |
| 1490 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1595 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1491 | 1596 | ROM_LOAD( "te1sprog.6d", 0x0000000, 0x040000, CRC(849587e9) SHA1(94c6a757b24758a866a41bd8acd46aa46844f74b) ) |
| 1492 | | |
| 1597 | R | |
| 1493 | 1598 | |
| 1494 | 1599 | ROM_REGION( 0x0200000, "c352", 0 ) /* samples */ |
| 1495 | 1600 | ROM_LOAD( "te1wave.8k", 0x0000000, 0x200000, CRC(fce6c57a) SHA1(7fb8c69452c92c59a940a2b69d0d73ef7aefcb82) ) |
| r7356 | r7357 | |
| 1510 | 1615 | ROM_LOAD16_BYTE( "te1rom2l.ic4", 0x0800000, 0x200000, CRC(41d77846) SHA1(eeab049135c02a255899fe37e225c1111b2fbb7d) ) |
| 1511 | 1616 | ROM_LOAD16_BYTE( "te1rom2u.ic7", 0x0800001, 0x200000, CRC(a678987e) SHA1(c62c00ce5cf4d001723c999b2bc3dbb90283def1) ) |
| 1512 | 1617 | |
| 1513 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1618 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1514 | 1619 | ROM_LOAD( "te1sprog.6d", 0x0000000, 0x040000, CRC(849587e9) SHA1(94c6a757b24758a866a41bd8acd46aa46844f74b) ) |
| 1515 | | |
| 1620 | R | |
| 1516 | 1621 | |
| 1517 | 1622 | ROM_REGION( 0x0200000, "c352", 0 ) /* samples */ |
| 1518 | 1623 | ROM_LOAD( "te1wave.8k", 0x0000000, 0x200000, CRC(fce6c57a) SHA1(7fb8c69452c92c59a940a2b69d0d73ef7aefcb82) ) |
| r7356 | r7357 | |
| 1533 | 1638 | ROM_LOAD16_BYTE( "te1rom2l.ic4", 0x0800000, 0x200000, CRC(41d77846) SHA1(eeab049135c02a255899fe37e225c1111b2fbb7d) ) |
| 1534 | 1639 | ROM_LOAD16_BYTE( "te1rom2u.ic7", 0x0800001, 0x200000, CRC(a678987e) SHA1(c62c00ce5cf4d001723c999b2bc3dbb90283def1) ) |
| 1535 | 1640 | |
| 1536 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1641 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1537 | 1642 | ROM_LOAD( "te1sprog.6d", 0x0000000, 0x040000, CRC(849587e9) SHA1(94c6a757b24758a866a41bd8acd46aa46844f74b) ) |
| 1538 | | |
| 1643 | R | |
| 1539 | 1644 | |
| 1540 | 1645 | ROM_REGION( 0x0200000, "c352", 0 ) /* samples */ |
| 1541 | 1646 | ROM_LOAD( "te1wave.8k", 0x0000000, 0x200000, CRC(fce6c57a) SHA1(7fb8c69452c92c59a940a2b69d0d73ef7aefcb82) ) |
| r7356 | r7357 | |
| 1558 | 1663 | ROM_LOAD16_BYTE( "tes1rom3l.ic9", 0x0c00000, 0x200000, CRC(d5ac0f18) SHA1(342d063f7974bd1f90b5ca4832dfa4fbc9605453) ) |
| 1559 | 1664 | ROM_LOAD16_BYTE( "tes1rom3u.ic1", 0x0c00001, 0x200000, CRC(44ed509d) SHA1(27e26aaf5ce72ab686f3f05743b1d91b5334b4e0) ) |
| 1560 | 1665 | |
| 1561 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1666 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1562 | 1667 | ROM_LOAD( "tes1sprog.6d", 0x0000000, 0x040000, CRC(af18759f) SHA1(aabd7d1384925781d37f860605a5d4622e0fc2e4) ) |
| 1563 | | |
| 1668 | R | |
| 1564 | 1669 | |
| 1565 | 1670 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1566 | 1671 | ROM_LOAD( "tes1wave.8k", 0x800000, 0x400000, CRC(34a34eab) SHA1(8e83a579abdcd419dc5cff8aa4c1d7e6c3add773) ) |
| r7356 | r7357 | |
| 1583 | 1688 | ROM_LOAD16_BYTE( "tes1rom3l.ic9", 0x0c00000, 0x200000, CRC(d5ac0f18) SHA1(342d063f7974bd1f90b5ca4832dfa4fbc9605453) ) |
| 1584 | 1689 | ROM_LOAD16_BYTE( "tes1rom3u.ic1", 0x0c00001, 0x200000, CRC(44ed509d) SHA1(27e26aaf5ce72ab686f3f05743b1d91b5334b4e0) ) |
| 1585 | 1690 | |
| 1586 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1691 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1587 | 1692 | ROM_LOAD( "tes1sprog.6d", 0x0000000, 0x040000, CRC(af18759f) SHA1(aabd7d1384925781d37f860605a5d4622e0fc2e4) ) |
| 1588 | | |
| 1693 | R | |
| 1589 | 1694 | |
| 1590 | 1695 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1591 | 1696 | ROM_LOAD( "tes1wave.8k", 0x800000, 0x400000, CRC(34a34eab) SHA1(8e83a579abdcd419dc5cff8aa4c1d7e6c3add773) ) |
| r7356 | r7357 | |
| 1608 | 1713 | ROM_LOAD16_BYTE( "tes1rom3l.ic9", 0x0c00000, 0x200000, CRC(d5ac0f18) SHA1(342d063f7974bd1f90b5ca4832dfa4fbc9605453) ) |
| 1609 | 1714 | ROM_LOAD16_BYTE( "tes1rom3u.ic1", 0x0c00001, 0x200000, CRC(44ed509d) SHA1(27e26aaf5ce72ab686f3f05743b1d91b5334b4e0) ) |
| 1610 | 1715 | |
| 1611 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1716 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1612 | 1717 | ROM_LOAD( "tes1sprog.6d", 0x0000000, 0x040000, CRC(af18759f) SHA1(aabd7d1384925781d37f860605a5d4622e0fc2e4) ) |
| 1613 | | |
| 1718 | R | |
| 1614 | 1719 | |
| 1615 | 1720 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1616 | 1721 | ROM_LOAD( "tes1wave.8k", 0x800000, 0x400000, CRC(34a34eab) SHA1(8e83a579abdcd419dc5cff8aa4c1d7e6c3add773) ) |
| r7356 | r7357 | |
| 1631 | 1736 | ROM_LOAD16_BYTE( "xv31rom2l.ic4", 0x0800000, 0x200000, CRC(8403a277) SHA1(35193211351494a086d8422e3b0b71a8d3a262a6) ) |
| 1632 | 1737 | ROM_LOAD16_BYTE( "xv31rom2u.ic7", 0x0800001, 0x200000, CRC(ecf70432) SHA1(bec128a215e0aef66e9a8707bb0d1eb7b098a356) ) |
| 1633 | 1738 | |
| 1634 | ROM_REGION16_LE( 0x100000, "c7 | |
| 1739 | ROM_REGION16_LE( 0x100000, "c76", 0 ) /* sound data and MCU BIOS */ | |
| 1635 | 1740 | ROM_LOAD( "xv31sprog.6d", 0x0000000, 0x040000, CRC(e50b856a) SHA1(631da4f60c9ce08387fca26a70481a2fdacf9765) ) |
| 1636 | | |
| 1741 | R | |
| 1637 | 1742 | |
| 1638 | 1743 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 1639 | 1744 | ROM_LOAD( "xv31wave.8k", 0x000000, 0x400000, CRC(14f25ddd) SHA1(4981cf1017432ff85b768ec88c36f535df30b783) ) |
| r7356 | r7357 | |
|---|---|---|
| 2735 | 2735 | |
| 2736 | 2736 | /* Wheel of Fortune-style PCB */ |
| 2737 | 2737 | GAME( 1989, wfortune, 0, wfortune, wfortune, 0, ROT0, "GameTek", "Wheel Of Fortune", 0 ) |
| 2738 | GAME( 1989, wfortunea, | |
| 2738 | GAME( 1989, wfortunea, | |
| 2739 | 2739 | |
| 2740 | 2740 | /* Grudge Match-style PCB */ |
| 2741 | 2741 | GAME( 1989, grmatch, 0, grmatch, grmatch, grmatch, ROT0, "Yankee Game Technology", "Grudge Match (Yankee Game Technology)", 0 ) |
| r7356 | r7357 | |
| 2749 | 2749 | GAME( 1991, gtg2j, gtg2, stratab_lo, gtg, 0, ROT0, "Strata/Incredible Technologies", "Golden Tee Golf II (Joystick, V1.0)", 0 ) |
| 2750 | 2750 | |
| 2751 | 2751 | /* Slick Shot-style PCB */ |
| 2752 | GAME( 1990, slikshot, 0, slikshot_hi, slikshot, slikshot, ROT90, "Grand Products/Incredible Technologies", "Slick Shot (V2.2)", 0 ) | |
| 2753 | GAME( 1990, slikshot17, slikshot, slikshot_hi, slikshot, slikshot, ROT90, "Grand Products/Incredible Technologies", "Slick Shot (V1.7)", 0 ) | |
| 2754 | GAME( 1990, slikshot16, slikshot, slikshot_hi, slikshot, slikshot, ROT90, "Grand Products/Incredible Technologies", "Slick Shot (V1.6)", 0 ) | |
| 2755 | GAME( 1990, dynobop, 0, slikshot_hi, dynobop, slikshot, ROT90, "Grand Products/Incredible Technologies", "Dyno Bop", 0 ) | |
| 2756 | GAME( 1990, sstrike, 0, sstrike, sstrike, sstrike, ROT270, "Strata/Incredible Technologies", "Super Strike Bowling", 0 ) | |
| 2757 | GAME( 1991, pokrdice, 0, slikshot_lo_noz80, pokrdice, 0, ROT90, "Strata/Incredible Technologies", "Poker Dice", 0 ) | |
| 2752 | GAME( 1990, slikshot, 0, slikshot_hi, slikshot, slikshot, ROT90, "Grand Products/Incredible Technologies", "Slick Shot (V2.2)", 0 ) | |
| 2753 | GAME( 1990, slikshot17,slikshot, slikshot_hi, slikshot, slikshot, ROT90, "Grand Products/Incredible Technologies", "Slick Shot (V1.7)", 0 ) | |
| 2754 | GAME( 1990, slikshot16,slikshot, slikshot_hi, slikshot, slikshot, ROT90, "Grand Products/Incredible Technologies", "Slick Shot (V1.6)", 0 ) | |
| 2755 | GAME( 1990, dynobop, 0, slikshot_hi, dynobop, slikshot, ROT90, "Grand Products/Incredible Technologies", "Dyno Bop", 0 ) | |
| 2756 | GAME( 1990, sstrike, 0, sstrike, sstrike, sstrike, ROT270, "Strata/Incredible Technologies", "Super Strike Bowling", 0 ) | |
| 2757 | GAME( 1991, pokrdice, 0, slikshot_lo_noz80, pokrdice, 0, ROT90, "Strata/Incredible Technologies", "Poker Dice", 0 ) | |
| 2758 | 2758 | |
| 2759 | 2759 | /* Hot Shots Tennis-style PCB */ |
| 2760 | GAME( 1990, hstennis, 0, hstennis_hi, hstennis, hstennis, ROT90, "Strata/Incredible Technologies", "Hot Shots Tennis (V1.1)", 0 ) | |
| 2761 | GAME( 1990, hstennis10, hstennis, hstennis_hi, hstennis, hstennis, ROT90, "Strata/Incredible Technologies", "Hot Shots Tennis (V1.0)", 0 ) | |
| 2762 | GAME( 1991, arlingtn, 0, hstennis_hi, arlingtn, arligntn, ROT0, "Strata/Incredible Technologies", "Arlington Horse Racing (v1.21-D)", 0 ) | |
| 2763 | GAME( 1991, peggle, 0, hstennis_lo, peggle, peggle, ROT90, "Strata/Incredible Technologies", "Peggle (Joystick, v1.0)", 0 ) | |
| 2764 | GAME( 1991, pegglet, peggle, hstennis_lo, pegglet, peggle, ROT90, "Strata/Incredible Technologies", "Peggle (Trackball, v1.0)", 0 ) | |
| 2765 | GAME( 1992, neckneck, 0, hstennis_lo, neckneck, neckneck, ROT0, "Bundra Games/Incredible Technologies", "Neck-n-Neck (v1.2)", 0 ) | |
| 2760 | GAME( 1990, hstennis, 0, hstennis_hi, hstennis, hstennis, ROT90, "Strata/Incredible Technologies", "Hot Shots Tennis (V1.1)", 0 ) | |
| 2761 | GAME( 1990, hstennis10,hstennis, hstennis_hi, hstennis, hstennis, ROT90, "Strata/Incredible Technologies", "Hot Shots Tennis (V1.0)", 0 ) | |
| 2762 | GAME( 1991, arlingtn, 0, hstennis_hi, arlingtn, arligntn, ROT0, "Strata/Incredible Technologies", "Arlington Horse Racing (v1.21-D)", 0 ) | |
| 2763 | GAME( 1991, peggle, 0, hstennis_lo, peggle, peggle, ROT90, "Strata/Incredible Technologies", "Peggle (Joystick, v1.0)", 0 ) | |
| 2764 | GAME( 1991, pegglet, peggle, hstennis_lo, pegglet, peggle, ROT90, "Strata/Incredible Technologies", "Peggle (Trackball, v1.0)", 0 ) | |
| 2765 | GAME( 1992, neckneck, 0, hstennis_lo, neckneck, neckneck, ROT0, "Bundra Games/Incredible Technologies", "Neck-n-Neck (v1.2)", 0 ) | |
| 2766 | 2766 | |
| 2767 | 2767 | /* Rim Rockin' Basketball-style PCB */ |
| 2768 | GAME( 1991, rimrockn, 0, rimrockn, rimrockn, rimrockn, ROT0, "Strata/Incredible Technologies", "Rim Rockin' Basketball (V2.2)", 0 ) | |
| 2768 | GAME( 1991, rimrockn, 0, rimrockn, rimrockn, rimrockn, ROT0, "Strata/Incredible Technologies", "Rim Rockin' Basketball (V2.2)", 0 ) | |
| 2769 | 2769 | GAME( 1991, rimrockn20, rimrockn, rimrockn, rimrockn, rimrockn, ROT0, "Strata/Incredible Technologies", "Rim Rockin' Basketball (V2.0)", 0 ) |
| 2770 | 2770 | GAME( 1991, rimrockn16, rimrockn, rimrockn, rimrockn, rimrockn, ROT0, "Strata/Incredible Technologies", "Rim Rockin' Basketball (V1.6)", 0 ) |
| 2771 | 2771 | GAME( 1991, rimrockn12, rimrockn, rimrockn, rimrockn, rimrockn, ROT0, "Strata/Incredible Technologies", "Rim Rockin' Basketball (V1.2)", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 2834 | 2834 | irq_line = 0; |
| 2835 | 2835 | |
| 2836 | 2836 | /* decrypt the code */ |
| 2837 | cclimbrj_decode(machine); | |
| 2837 | cclimberj_decode(machine); | |
| 2838 | 2838 | } |
| 2839 | 2839 | |
| 2840 | 2840 |
| r7356 | r7357 | |
|---|---|---|
| 220 | 220 | ADDRESS_MAP_END |
| 221 | 221 | |
| 222 | 222 | |
| 223 | static ADDRESS_MAP_START( atetrsb2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 223 | static ADDRESS_MAP_START( atetrisb2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 224 | 224 | AM_RANGE(0x0000, 0x0fff) AM_RAM |
| 225 | 225 | AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(atetris_videoram_w) AM_BASE_GENERIC(videoram) AM_SIZE_GENERIC(videoram) |
| 226 | 226 | AM_RANGE(0x2000, 0x20ff) AM_RAM_WRITE(paletteram_RRRGGGBB_w) AM_BASE_GENERIC(paletteram) |
| r7356 | r7357 | |
| 276 | 276 | |
| 277 | 277 | |
| 278 | 278 | // Same as the regular one except they added a Flip Controls switch |
| 279 | static INPUT_PORTS_START( atetc | |
| 279 | static INPUT_PORTS_START( atetrisc | |
| 280 | 280 | PORT_INCLUDE( atetris ) |
| 281 | 281 | |
| 282 | 282 | PORT_MODIFY("IN0") |
| r7356 | r7357 | |
| 374 | 374 | MACHINE_DRIVER_END |
| 375 | 375 | |
| 376 | 376 | |
| 377 | static MACHINE_DRIVER_START( atetrsb2 ) | |
| 377 | static MACHINE_DRIVER_START( atetrisb2 ) | |
| 378 | 378 | |
| 379 | 379 | /* basic machine hardware */ |
| 380 | 380 | MDRV_CPU_ADD("maincpu", M6502,BOOTLEG_CLOCK/8) |
| 381 | MDRV_CPU_PROGRAM_MAP(atetrsb2_map) | |
| 381 | MDRV_CPU_PROGRAM_MAP(atetrisb2_map) | |
| 382 | 382 | |
| 383 | 383 | MDRV_MACHINE_START(atetris) |
| 384 | 384 | MDRV_MACHINE_RESET(atetris) |
| r7356 | r7357 | |
| 509 | 509 | GAME( 1988, atetris, 0, atetris, atetris, atetris, ROT0, "Atari Games", "Tetris (set 1)", GAME_SUPPORTS_SAVE ) |
| 510 | 510 | GAME( 1988, atetrisa, atetris, atetris, atetris, atetris, ROT0, "Atari Games", "Tetris (set 2)", GAME_SUPPORTS_SAVE ) |
| 511 | 511 | GAME( 1988, atetrisb, atetris, atetris, atetris, atetris, ROT0, "bootleg", "Tetris (bootleg set 1)", GAME_SUPPORTS_SAVE ) |
| 512 | GAME( 1988, atetrisb2,atetris, atetrsb2, atetris, atetris, ROT0, "bootleg", "Tetris (bootleg set 2)", GAME_SUPPORTS_SAVE ) | |
| 513 | GAME( 1989, atetrisc, atetris, atetris, atetcktl, atetris, ROT270, "Atari Games", "Tetris (cocktail set 1)", GAME_SUPPORTS_SAVE ) | |
| 514 | GAME( 1989, atetrisc2,atetris, atetris, atetcktl, atetris, ROT270, "Atari Games", "Tetris (cocktail set 2)", GAME_SUPPORTS_SAVE ) | |
| 512 | GAME( 1988, atetrisb2,atetris, atetrisb2,atetris, atetris, ROT0, "bootleg", "Tetris (bootleg set 2)", GAME_SUPPORTS_SAVE ) | |
| 513 | GAME( 1989, atetrisc, atetris, atetris, atetrisc, atetris, ROT270, "Atari Games", "Tetris (cocktail set 1)", GAME_SUPPORTS_SAVE ) | |
| 514 | GAME( 1989, atetrisc2,atetris, atetris, atetrisc, atetris, ROT270, "Atari Games", "Tetris (cocktail set 2)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 1 | /* Sang Ho Soft 'Puzzle Star' PCB */ | |
| 2 | ||
| 3 | 1 | /* |
| 4 | 2 | |
| 5 | It is important that this is finished before all the | |
| 6 | PCBs are dead incase we need anything additional | |
| 7 | from the boards which can only be retrived while they are | |
| 8 | in working condition. | |
| 3 | Sang Ho Soft 'Puzzle Star' PCB | |
| 9 | 4 | |
| 10 | At this stage it looks unlikely that we will need anything | |
| 11 | as the battery backed chip appears to control ports+banking. | |
| 5 | Driver by David Haywood, Tomasz Slanina and Mariusz Wojcieszek | |
| 12 | 6 | |
| 13 | */ | |
| 14 | ||
| 15 | /* | |
| 16 | ||
| 17 | 7 | Each board contains a custom FGPA on a sub-board with |
| 18 | 8 | a warning "WARNING ! NO TOUCH..." printed on the PCB |
| 19 | 9 | |
| r7356 | r7357 | |
| 53 | 43 | #include "sound/2413intf.h" |
| 54 | 44 | |
| 55 | 45 | static UINT8* sangho_ram; |
| 46 | static UINT8 sexyboom_bank[8]; | |
| 56 | 47 | |
| 57 | 48 | static WRITE8_HANDLER(sangho_ram_w) |
| 58 | 49 | { |
| r7356 | r7357 | |
| 67 | 58 | AM_RANGE(0xc000, 0xffff) AM_ROMBANK("bank4") |
| 68 | 59 | ADDRESS_MAP_END |
| 69 | 60 | |
| 61 | static ADDRESS_MAP_START( sexyboom_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 62 | AM_RANGE(0x0000, 0x3fff) AM_READ_BANK("bank1") AM_WRITE_BANK("bank5") | |
| 63 | AM_RANGE(0x4000, 0x7fff) AM_READ_BANK("bank2") AM_WRITE_BANK("bank6") | |
| 64 | AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank3") AM_WRITE_BANK("bank7") | |
| 65 | AM_RANGE(0xc000, 0xffff) AM_READ_BANK("bank4") AM_WRITE_BANK("bank8") | |
| 66 | ADDRESS_MAP_END | |
| 67 | ||
| 70 | 68 | /* Wrong ! */ |
| 71 | 69 | static WRITE8_HANDLER(pzlestar_bank_w) |
| 72 | 70 | { |
| r7356 | r7357 | |
| 74 | 72 | memory_set_bankptr(space->machine, "bank3",&memory_region(space->machine, "user1")[ 0x18000 ]); |
| 75 | 73 | } |
| 76 | 74 | |
| 75 | static void sexyboom_map_bank(running_machine *machine, int bank) | |
| 76 | { | |
| 77 | UINT8 banknum, banktype; | |
| 78 | char read_bank_name[6], write_bank_name[6]; | |
| 79 | ||
| 80 | banknum = sexyboom_bank[bank*2]; | |
| 81 | banktype = sexyboom_bank[bank*2 + 1]; | |
| 82 | sprintf(read_bank_name, "bank%d", bank+1); | |
| 83 | sprintf(write_bank_name, "bank%d", bank+1+4); | |
| 84 | ||
| 85 | if (banktype == 0) | |
| 86 | { | |
| 87 | if (banknum & 0x80) | |
| 88 | { | |
| 89 | // ram | |
| 90 | memory_set_bankptr(machine, read_bank_name, &sangho_ram[(banknum & 0x7f) * 0x4000]); | |
| 91 | memory_install_write_bank(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), bank*0x4000, (bank+1)*0x4000 - 1, 0, 0, write_bank_name ); | |
| 92 | memory_set_bankptr(machine, write_bank_name, &sangho_ram[(banknum & 0x7f) * 0x4000]); | |
| 93 | } | |
| 94 | else | |
| 95 | { | |
| 96 | // rom 0 | |
| 97 | memory_set_bankptr(machine, read_bank_name, memory_region(machine, "user1")+0x4000*banknum); | |
| 98 | memory_unmap_write(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), bank*0x4000, (bank+1)*0x4000 - 1, 0, 0); | |
| 99 | } | |
| 100 | } | |
| 101 | else if (banktype == 0x82) | |
| 102 | { | |
| 103 | memory_set_bankptr(machine, read_bank_name, memory_region(machine, "user1")+0x20000+banknum*0x4000); | |
| 104 | memory_unmap_write(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), bank*0x4000, (bank+1)*0x4000 - 1, 0, 0); | |
| 105 | } | |
| 106 | else if (banktype == 0x80) | |
| 107 | { | |
| 108 | memory_set_bankptr(machine, read_bank_name, memory_region(machine, "user1")+0x120000+banknum*0x4000); | |
| 109 | memory_unmap_write(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), bank*0x4000, (bank+1)*0x4000 - 1, 0, 0); | |
| 110 | } | |
| 111 | else | |
| 112 | { | |
| 113 | logerror("Unknown bank type %02x\n", banktype); | |
| 114 | } | |
| 115 | } | |
| 116 | ||
| 117 | static WRITE8_HANDLER(sexyboom_bank_w) | |
| 118 | { | |
| 119 | sexyboom_bank[offset] = data; | |
| 120 | sexyboom_map_bank(space->machine, offset>>1); | |
| 121 | } | |
| 122 | ||
| 77 | 123 | /* Puzzle Star Ports */ |
| 78 | 124 | |
| 79 | 125 | static ADDRESS_MAP_START( pzlestar_io_map, ADDRESS_SPACE_IO, 8 ) |
| r7356 | r7357 | |
| 101 | 147 | AM_RANGE( 0xf2, 0xf2) AM_WRITE( v9938_0_palette_w ) |
| 102 | 148 | AM_RANGE( 0xf3, 0xf3) AM_WRITE( v9938_0_register_w ) |
| 103 | 149 | AM_RANGE( 0xf7, 0xf7) AM_READ_PORT("DSW") |
| 104 | | |
| 150 | AM_RANGE( 0xf8, 0xff) AM_WRITE( sexyboom_bank_w ) | |
| 105 | 151 | ADDRESS_MAP_END |
| 106 | 152 | |
| 107 | 153 | |
| r7356 | r7357 | |
| 188 | 234 | |
| 189 | 235 | static MACHINE_RESET(sexyboom) |
| 190 | 236 | { |
| 191 | /* give it some code to run */ | |
| 192 | memcpy(sangho_ram,memory_region(machine, "user1"),0x8000); | |
| 193 | /* patch out rom check */ | |
| 194 | sangho_ram[0x022e]=0xc9; | |
| 195 | sangho_ram[0x4604]=0xc9; | |
| 237 | sexyboom_bank[0] = 0x00; | |
| 238 | sexyboom_bank[1] = 0x00; | |
| 239 | sexyboom_bank[2] = 0x01; | |
| 240 | sexyboom_bank[3] = 0x00; | |
| 241 | sexyboom_bank[4] = 0x80; | |
| 242 | sexyboom_bank[5] = 0x00; | |
| 243 | sexyboom_bank[6] = 0x80; | |
| 244 | sexyboom_bank[7] = 0x01; | |
| 245 | sexyboom_map_bank(machine, 0); | |
| 246 | sexyboom_map_bank(machine, 1); | |
| 247 | sexyboom_map_bank(machine, 2); | |
| 248 | sexyboom_map_bank(machine, 3); | |
| 196 | 249 | |
| 197 | | |
| 250 | v9938 | |
| 198 | 251 | } |
| 199 | 252 | |
| 200 | 253 | static void msx_vdp_interrupt(running_machine *machine, int i) |
| r7356 | r7357 | |
| 252 | 305 | static MACHINE_DRIVER_START(sexyboom ) |
| 253 | 306 | |
| 254 | 307 | MDRV_CPU_ADD("maincpu", Z80,8000000) // ? |
| 255 | MDRV_CPU_PROGRAM_MAP( | |
| 308 | MDRV_CPU_PROGRAM_MAP( | |
| 256 | 309 | MDRV_CPU_IO_MAP(sexyboom_io_map) |
| 257 | 310 | MDRV_CPU_VBLANK_INT_HACK(sangho_interrupt,262) |
| 258 | 311 | |
| r7356 | r7357 | |
| 324 | 377 | } |
| 325 | 378 | |
| 326 | 379 | GAME( 1991, pzlestar, 0, pzlestar, sangho, sangho, ROT270, "Sang Ho Soft", "Puzzle Star (Sang Ho Soft)", GAME_NOT_WORKING ) |
| 327 | GAME( 1992, sexyboom, 0, sexyboom, sangho, sangho, ROT270, "Sang Ho Soft", "Sexy Boom", GAME_ | |
| 380 | GAME( 1992, sexyboom, 0, sexyboom, sangho, sangho, ROT270, "Sang Ho Soft", "Sexy Boom", GAME_IMPERFECT_G |
| r7356 | r7357 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 1 | /********************************************************************************************************** | |
| 2 | 2 | |
| 3 | 3 | PACHI FEVER / SANKI DENSHI KOGYO |
| 4 | 4 | |
| 5 | DORE GA CPU ? <- where's the CPU? | |
| 6 | 5 | |
| 7 | 6 | GEN6480830 (TEXAS INSTRUMENTS) |
| 8 | 7 | XTAL:12.000MHZ |
| r7356 | r7357 | |
| 13 | 12 | |
| 14 | 13 | DIP SWITCH:8BIT x 3 |
| 15 | 14 | |
| 16 | ============================================================================ | |
| 15 | =========================================================================================================== | |
| 17 | 16 | |
| 18 | Skeleton driver, just the main CPU was identified (TMS9900). Can't get it | |
| 19 | to upload a vram / blitter list at all :-/ | |
| 20 | Many thanks to Olivier Galibert and Wilbert Pol for the identify effort ;-) | |
| 17 | Many thanks to Olivier Galibert and Wilbert Pol for identify the CPU | |
| 21 | 18 | |
| 22 | ***************************************************************************/ | |
| 23 | 19 | |
| 20 | Tomasz Slanina 10.02.2010: | |
| 21 | --------------------------- | |
| 22 | ||
| 23 | There's very little info about the game or hardware, so all the above (except for clocks and MSM ) is | |
| 24 | just a guess: | |
| 25 | ||
| 26 | - CPU (GEN6480830 ?) is TMS9995 or derivative ( decrementer + lvl3 interrupt, internal ram) | |
| 27 | - RY050012 could be a VDP ( probably TMS9928A ) | |
| 28 | - SN76469A (or similar) used for music | |
| 29 | - MSM5205 - sample player (see below) | |
| 30 | ||
| 31 | - TODO: | |
| 32 | - what's the correct game title - Pachifever ? Fever 777 ? | |
| 33 | - ic48.50 ROM redump (probably more adpcm samples + lookuptable .. mapped at $c000) | |
| 34 | - remaing DSW | |
| 35 | - unknown writes ($ffxx range) | |
| 36 | - controls : unused bits (is the BUTTON1 used _only_ for entering initials?) | |
| 37 | - controls : make PLUNGER (or whatever it is in reality) implementation more clear | |
| 38 | here's some code used to read plunger pos(angle?): | |
| 39 | ||
| 40 | 0284: 04CC clr R12 ; CRU address | |
| 41 | 0286: 0208 FF00 li R8,>ff00 ; R8=ff00 - initial data ($ff) | |
| 42 | 028A: D688 movb R8,*R10 ; ff-> ff40 - write to output | |
| 43 | 028C: 3449 stcr R9,1 ; CRU read (one bit) | |
| 44 | 028E: 1603 jne >0296 ; not zer0 - end | |
| 45 | 0290: 0228 FC00 ai R8,>fc00 ; R8=R8-4 | |
| 46 | 0294: 18FA joc >028a ; loop | |
| 47 | ||
| 48 | 0296: D6A0 020F movb @>020f,*R10 ; 00 ->ff40 - end of controls read | |
| 49 | 029A: 045B b *R11 ; b $1ca - process data in R8 | |
| 50 | ||
| 51 | ***********************************************************************************************************/ | |
| 52 | ||
| 24 | 53 | #include "emu.h" |
| 25 | 54 | #include "cpu/tms9900/tms9900.h" |
| 55 | #include "video/tms9928a.h" | |
| 26 | 56 | #include "sound/msm5205.h" |
| 57 | #include "sound/sn76496.h" | |
| 27 | 58 | |
| 28 | static VIDEO_START( pachifev ) | |
| 59 | #define USE_MSM 0 | |
| 60 | #define NUM_PLUNGER_REPEATS 50 | |
| 61 | ||
| 62 | typedef struct _pachifev_state pachifev_state; | |
| 63 | ||
| 64 | struct _pachifev_state | |
| 29 | 65 | { |
| 66 | /* controls related */ | |
| 30 | 67 | |
| 68 | int power; | |
| 69 | int max_power; | |
| 70 | int input_power; | |
| 71 | int previous_power; | |
| 72 | int cnt; | |
| 73 | ||
| 74 | }; | |
| 75 | ||
| 76 | static WRITE8_HANDLER(controls_w) | |
| 77 | { | |
| 78 | if(!data) | |
| 79 | { | |
| 80 | pachifev_state *state = (pachifev_state *)space->machine->driver_data; | |
| 81 | ||
| 82 | /*end of input read*/ | |
| 83 | state->power=0; | |
| 84 | state->max_power=state->input_power; | |
| 85 | if(--state->cnt <= 0) /* why to do it N times? no ide.. someone should fix it */ | |
| 86 | { | |
| 87 | state->cnt=0; | |
| 88 | state->input_power=0; | |
| 89 | } | |
| 90 | } | |
| 31 | 91 | } |
| 32 | 92 | |
| 33 | static | |
| 93 | static R | |
| 34 | 94 | { |
| 35 | return 0; | |
| 95 | pachifev_state *state = (pachifev_state *)space->machine->driver_data; | |
| 96 | int output_bit=(state->power < state->max_power)?0:1; | |
| 97 | ++state->power; | |
| 98 | return output_bit; | |
| 36 | 99 | } |
| 37 | 100 | |
| 38 | static ADDRESS_MAP_START( pachifev_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 39 | AM_RANGE(0x0000, 0xbfff) AM_ROM | |
| 40 | AM_RANGE(0xe000, 0xffff) AM_RAM | |
| 101 | static ADDRESS_MAP_START( pachifev_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 102 | AM_RANGE(0x0000, 0x9fff) AM_ROM | |
| 103 | ||
| 104 | AM_RANGE(0xc000, 0xc0ff) AM_NOP /* game is expecting here some kind of lookup table (adpcm samples start?) */ | |
| 105 | ||
| 106 | AM_RANGE(0xe000, 0xe7ff) AM_RAM | |
| 107 | AM_RANGE(0xf000, 0xf0fb) AM_NOP /* internal ram */ | |
| 108 | AM_RANGE(0xff00, 0xff00) AM_READ_PORT("IN0") | |
| 109 | AM_RANGE(0xff02, 0xff02) AM_READ_PORT("IN1") | |
| 110 | AM_RANGE(0xff04, 0xff04) AM_READ_PORT("DSW1") | |
| 111 | AM_RANGE(0xff06, 0xff06) AM_READ_PORT("DSW2") | |
| 112 | AM_RANGE(0xff08, 0xff08) AM_READ_PORT("DSW3") | |
| 113 | AM_RANGE(0xff10, 0xff10) AM_READWRITE(TMS9928A_vram_r, TMS9928A_vram_w) | |
| 114 | AM_RANGE(0xff12, 0xff12) AM_READWRITE(TMS9928A_register_r, TMS9928A_register_w) | |
| 115 | AM_RANGE(0xff20, 0xff20) AM_WRITENOP /* unknown */ | |
| 116 | AM_RANGE(0xff30, 0xff30) AM_DEVWRITE("sn76", sn76496_w) | |
| 117 | AM_RANGE(0xff40, 0xff40) AM_WRITE(controls_w) | |
| 118 | AM_RANGE(0xff50, 0xff50) AM_WRITENOP /* unknown */ | |
| 119 | AM_RANGE(0xfffa, 0xfffb) AM_NOP /* decrementer */ | |
| 120 | AM_RANGE(0xfffc, 0xffff) AM_NOP /* nmi */ | |
| 41 | 121 | ADDRESS_MAP_END |
| 42 | 122 | |
| 43 | static ADDRESS_MAP_START( pachifev_io, ADDRESS_SPACE_IO, 8 ) | |
| 44 | // AM_RANGE(0x0f70, 0x0f70) AM_WRITE() | |
| 45 | // AM_RANGE(0x0f71, 0x0f71) AM_WRITE() | |
| 123 | static ADDRESS_MAP_START( pachifev_cru, ADDRESS_SPACE_IO, 8 ) | |
| 124 | AM_RANGE(0x000, 0x000) AM_READ(controls_r) | |
| 46 | 125 | ADDRESS_MAP_END |
| 47 | 126 | |
| 127 | static INPUT_PORTS_START( pachifev ) | |
| 128 | PORT_START("IN0") | |
| 129 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* used on enter player initials in top 5 */ | |
| 130 | PORT_BIT( 0x4d, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 131 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) | |
| 132 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 133 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 48 | 134 | |
| 49 | static INPUT_PORTS_START( pachifev ) | |
| 135 | PORT_START("IN1") | |
| 136 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 137 | ||
| 138 | PORT_START("DSW1") | |
| 139 | PORT_DIPUNKNOWN( 0x07, 0x07 ) | |
| 140 | ||
| 141 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) | |
| 142 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) | |
| 143 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 144 | ||
| 145 | PORT_DIPNAME( 0x30, 0x10, "Balls" ) | |
| 146 | PORT_DIPSETTING( 0x00, "200") | |
| 147 | PORT_DIPSETTING( 0x10, "100") | |
| 148 | PORT_DIPSETTING( 0x20, "50") | |
| 149 | PORT_DIPSETTING( 0x30, "25") | |
| 150 | ||
| 151 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_A ) ) | |
| 152 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C )) | |
| 153 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) | |
| 154 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 155 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) | |
| 156 | ||
| 157 | PORT_START("DSW2") | |
| 158 | ||
| 159 | PORT_DIPNAME( 0x03, 0x01, "Time" ) | |
| 160 | PORT_DIPSETTING( 0x00, "180") | |
| 161 | PORT_DIPSETTING( 0x01, "120") | |
| 162 | PORT_DIPSETTING( 0x02, "150") | |
| 163 | PORT_DIPSETTING( 0x03, "90") | |
| 164 | ||
| 165 | PORT_DIPUNKNOWN( 0x0c, 0x0c ) | |
| 166 | ||
| 167 | PORT_DIPNAME( 0x30, 0x20, "Limit (attract)" ) /* attract mode only??? */ | |
| 168 | PORT_DIPSETTING( 0x00, "2000") | |
| 169 | PORT_DIPSETTING( 0x10, "1500") | |
| 170 | PORT_DIPSETTING( 0x20, "1000") | |
| 171 | PORT_DIPSETTING( 0x30, "500") | |
| 172 | ||
| 173 | PORT_DIPNAME( 0xc0, 0xc0, "Limit (game)" ) /* ball limit in game */ | |
| 174 | PORT_DIPSETTING( 0x00, "1500") | |
| 175 | PORT_DIPSETTING( 0x40, "1000") | |
| 176 | PORT_DIPSETTING( 0x80, "500") | |
| 177 | PORT_DIPSETTING( 0xc0, "300") | |
| 178 | ||
| 179 | PORT_START("DSW3") | |
| 180 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 181 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 182 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 183 | ||
| 184 | PORT_DIPUNKNOWN( 0xfe, 0xfe ) | |
| 185 | ||
| 186 | PORT_START("PLUNGER") | |
| 187 | PORT_BIT( 0x3f, 0x00, IPT_POSITIONAL ) PORT_MINMAX(0x00,0x3f) PORT_SENSITIVITY(30) PORT_KEYDELTA(4) PORT_CENTERDELTA(0xff) | |
| 188 | ||
| 50 | 189 | INPUT_PORTS_END |
| 51 | 190 | |
| 191 | ||
| 192 | #if USE_MSM | |
| 193 | ||
| 52 | 194 | static UINT32 adpcm_pos; |
| 53 | ||
| 195 | ||
| 54 | 196 | |
| 55 | 197 | static void pf_adpcm_int(running_device *device) |
| 56 | 198 | { |
| 57 | ||
| 199 | static UINT8 trigger,adpcm_data; | |
| 58 | 200 | |
| 59 | if (adpcm_pos >= 0x4000/* || adpcm_idle*/) | |
| 60 | { | |
| 61 | //adpcm_idle = 1; | |
| 62 | msm5205_reset_w(device,1); | |
| 63 | trigger = 0; | |
| 64 | } | |
| 65 | else | |
| 66 | { | |
| 67 | UINT8 *ROM = memory_region(device->machine, "adpcm"); | |
| 201 | if (adpcm_pos >= 0x4000 || adpcm_idle) | |
| 202 | { | |
| 203 | adpcm_idle = 1; | |
| 204 | msm5205_reset_w(device,1); | |
| 205 | trigger = 0; | |
| 206 | } | |
| 207 | else | |
| 208 | { | |
| 209 | UINT8 *ROM = memory_region(device->machine, "adpcm"); | |
| 68 | 210 | |
| 69 | adpcm_data = ((trigger ? (ROM[adpcm_pos] & 0x0f) : (ROM[adpcm_pos] & 0xf0)>>4) ); | |
| 70 | msm5205_data_w(device,adpcm_data & 0xf); | |
| 71 | trigger^=1; | |
| 72 | if(trigger == 0) | |
| 73 | { | |
| 74 | adpcm_pos++; | |
| 75 | //if((ROM[adpcm_pos] & 0xff) == 0xff) | |
| 76 | // adpcm_idle = 1; | |
| 77 | } | |
| 78 | } | |
| 211 | adpcm_data = ((trigger ? (ROM[adpcm_pos] & 0x0f) : (ROM[adpcm_pos] & 0xf0)>>4) ); | |
| 212 | msm5205_data_w(device,adpcm_data & 0xf); | |
| 213 | trigger^=1; | |
| 214 | if(trigger == 0) | |
| 215 | { | |
| 216 | adpcm_pos++; | |
| 217 | if((ROM[adpcm_pos] & 0xff) == 0xff) | |
| 218 | adpcm_idle = 1; | |
| 219 | } | |
| 220 | } | |
| 79 | 221 | } |
| 80 | 222 | |
| 81 | 223 | static const msm5205_interface msm5205_config = |
| 82 | 224 | { |
| 83 | pf_adpcm_int, /* interrupt function */ | |
| 84 | MSM5205_S48_4B /* 8kHz */ | |
| 225 | pf_adpcm_int, /* interrupt function */ | |
| 226 | MSM5205_S48_4B /* 8kHz */ | |
| 85 | 227 | }; |
| 86 | 228 | |
| 229 | #endif | |
| 230 | ||
| 87 | 231 | static MACHINE_RESET( pachifev ) |
| 88 | 232 | { |
| 89 | adpcm_pos = 0; | |
| 233 | pachifev_state *state = (pachifev_state *)machine->driver_data; | |
| 234 | ||
| 235 | state->power=0; | |
| 236 | state->max_power=0; | |
| 237 | state->input_power=0; | |
| 238 | state->previous_power=0; | |
| 239 | state->cnt=0; | |
| 240 | ||
| 241 | #if USE_MSM | |
| 242 | adpcm_pos = 0; | |
| 243 | #endif | |
| 90 | 244 | } |
| 91 | 245 | |
| 246 | ||
| 92 | 247 | static INTERRUPT_GEN( pachifev_vblank_irq ) |
| 93 | 248 | { |
| 249 | TMS9928A_interrupt(device->machine); | |
| 250 | ||
| 251 | { | |
| 252 | pachifev_state *state = (pachifev_state *)device->machine->driver_data; | |
| 253 | int current_power=input_port_read(device->machine, "PLUNGER") & 0x3f; | |
| 254 | if(current_power != state->previous_power) | |
| 255 | { | |
| 256 | popmessage ("%d%%", (current_power * 100) / 0x3f); | |
| 257 | } | |
| 258 | ||
| 259 | if( (!current_power) && (state->previous_power) ) | |
| 260 | { | |
| 261 | state->input_power=state->previous_power; | |
| 262 | state->cnt=NUM_PLUNGER_REPEATS; | |
| 263 | } | |
| 264 | ||
| 265 | state->previous_power=current_power; | |
| 266 | } | |
| 267 | ||
| 94 | 268 | } |
| 95 | 269 | |
| 270 | static const TMS9928a_interface tms9928a_interface = | |
| 271 | { | |
| 272 | TMS99x8A, | |
| 273 | 0x4000, | |
| 274 | 0, 0, | |
| 275 | 0 /* no interrupt is generated */ | |
| 276 | }; | |
| 277 | ||
| 278 | static MACHINE_START( pachifev) | |
| 279 | { | |
| 280 | /* configure VDP */ | |
| 281 | TMS9928A_configure(&tms9928a_interface); | |
| 282 | { | |
| 283 | pachifev_state *state = (pachifev_state *)machine->driver_data; | |
| 284 | ||
| 285 | state_save_register_global(machine, state->power); | |
| 286 | state_save_register_global(machine, state->max_power); | |
| 287 | state_save_register_global(machine, state->input_power); | |
| 288 | state_save_register_global(machine, state->previous_power); | |
| 289 | state_save_register_global(machine, state->cnt); | |
| 290 | } | |
| 291 | } | |
| 292 | ||
| 293 | static const struct tms9995reset_param pachifev_processor_config = | |
| 294 | { | |
| 295 | 1,0,0 | |
| 296 | }; | |
| 297 | ||
| 96 | 298 | static MACHINE_DRIVER_START( pachifev ) |
| 97 | 299 | |
| 98 | /* basic machine hardware */ | |
| 99 | MDRV_CPU_ADD("maincpu", TMS9900, 12000000/4) /* unknown divider */ | |
| 100 | MDRV_CPU_PROGRAM_MAP(pachifev_map) | |
| 101 | MDRV_CPU_IO_MAP(pachifev_io) | |
| 102 | MDRV_CPU_VBLANK_INT("screen",pachifev_vblank_irq) | |
| 300 | MDRV_DRIVER_DATA(pachifev_state) | |
| 103 | 301 | |
| 104 | /* video hardware */ | |
| 105 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 106 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 107 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 108 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 109 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 110 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) | |
| 111 | MDRV_PALETTE_LENGTH(512) | |
| 112 | MDRV_MACHINE_RESET(pachifev) | |
| 302 | /* basic machine hardware */ | |
| 303 | MDRV_CPU_ADD("maincpu", TMS9995, XTAL_12MHz) | |
| 304 | MDRV_CPU_CONFIG(pachifev_processor_config) | |
| 305 | MDRV_CPU_PROGRAM_MAP(pachifev_map) | |
| 306 | MDRV_CPU_IO_MAP(pachifev_cru) | |
| 307 | MDRV_CPU_VBLANK_INT("screen",pachifev_vblank_irq) | |
| 113 | 308 | |
| 114 | MDRV_VIDEO_START(pachifev) | |
| 115 | MDRV_VIDEO_UPDATE(pachifev) | |
| 309 | MDRV_MACHINE_START(pachifev) | |
| 310 | MDRV_MACHINE_RESET(pachifev) | |
| 116 | 311 | |
| 117 | /* sound hardware */ | |
| 118 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 119 | MDRV_SOUND_ADD("adpcm", MSM5205, 288000) | |
| 120 | MDRV_SOUND_CONFIG(msm5205_config) | |
| 121 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) | |
| 122 | MACHINE_DRIVER_END | |
| 312 | /* video hardware */ | |
| 123 | 313 | |
| 124 | /*************************************************************************** | |
| 314 | MDRV_IMPORT_FROM(tms9928a) | |
| 315 | MDRV_SCREEN_MODIFY("screen") | |
| 316 | MDRV_SCREEN_REFRESH_RATE((float)XTAL_10_738635MHz/2/342/262) | |
| 317 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ | |
| 125 | 318 | |
| 126 | Game driver(s) | |
| 319 | /* sound hardware */ | |
| 320 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 321 | #if USE_MSM | |
| 322 | MDRV_SOUND_ADD("adpcm", MSM5205, 288000) /* guess */ | |
| 323 | MDRV_SOUND_CONFIG(msm5205_config) | |
| 324 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) | |
| 325 | #endif | |
| 326 | MDRV_SOUND_ADD("sn76", SN76489, XTAL_10_738635MHz/3) /* guess */ | |
| 327 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) | |
| 328 | MACHINE_DRIVER_END | |
| 127 | 329 | |
| 128 | ***************************************************************************/ | |
| 129 | ||
| 130 | 330 | ROM_START( pachifev ) |
| 131 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 132 | ROM_LOAD( "ic42.00", 0x00000, 0x2000, CRC(9653546e) SHA1(0836d01118241d38bbf61732275afe3ae47d0622) ) | |
| 133 | ROM_LOAD( "ic43.01", 0x02000, 0x2000, CRC(5572dce5) SHA1(fad45b33e095ac6e3ed3d7cdc3d8678c153a1b38) ) | |
| 134 | ROM_LOAD( "ic44.02", 0x04000, 0x2000, CRC(98b3841f) SHA1(0563139877bf01e1673767ee1798bbcf68adadea) ) | |
| 135 | ROM_LOAD( "ic45.03", 0x06000, 0x2000, CRC(6b76e6fa) SHA1(5be10ab0b76e2061fc7e9c77649572955bee7661) ) | |
| 136 | ROM_LOAD( "ic46.04", 0x08000, 0x2000, CRC(1c8c66d7) SHA1(3b9b05f35b20d798651c7d5fdb35e6af956615a1) ) | |
| 137 | ROM_LOAD( "ic48.50", 0x0a000, 0x2000, CRC(1c8c66d7) SHA1(3b9b05f35b20d798651c7d5fdb35e6af956615a1) ) | |
| 331 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 332 | ROM_LOAD( "ic42.00", 0x00000, 0x2000, CRC(9653546e) SHA1(0836d01118241d38bbf61732275afe3ae47d0622) ) | |
| 333 | ROM_LOAD( "ic43.01", 0x02000, 0x2000, CRC(5572dce5) SHA1(fad45b33e095ac6e3ed3d7cdc3d8678c153a1b38) ) | |
| 334 | ROM_LOAD( "ic44.02", 0x04000, 0x2000, CRC(98b3841f) SHA1(0563139877bf01e1673767ee1798bbcf68adadea) ) | |
| 335 | ROM_LOAD( "ic45.03", 0x06000, 0x2000, CRC(6b76e6fa) SHA1(5be10ab0b76e2061fc7e9c77649572955bee7661) ) | |
| 336 | ROM_LOAD( "ic46.04", 0x08000, 0x2000, CRC(1c8c66d7) SHA1(3b9b05f35b20d798651c7d5fdb35e6af956615a1) ) | |
| 138 | 337 | |
| 139 | ROM_REGION( 0x4000, "adpcm", 0 ) //msm code | |
| 140 | ROM_LOAD( "ic66.10", 0x0000, 0x2000, CRC(217c573e) SHA1(6fb90865d1d81f5ea00fa7916d0ccb6756ef5ce5) ) | |
| 338 | ROM_REGION( 0x4000, "adpcm", 0 ) | |
| 339 | ROM_LOAD( "ic66.10", 0x0000, 0x2000, CRC(217c573e) SHA1(6fb90865d1d81f5ea00fa7916d0ccb6756ef5ce5) ) | |
| 340 | ||
| 341 | ROM_REGION( 0x2000, "user1", 0 ) | |
| 342 | ROM_LOAD( "ic48.50", 0x00000, 0x2000, BAD_DUMP CRC(1c8c66d7) SHA1(3b9b05f35b20d798651c7d5fdb35e6af956615a1) ) | |
| 141 | 343 | ROM_END |
| 142 | 344 | |
| 143 | static DRIVER_INIT( pachifev ) | |
| 144 | { | |
| 145 | } | |
| 345 | GAME( 1983, pachifev, 0, pachifev, pachifev, 0, ROT270, "Sanki Denshi Kogyo", "Pachifever", GAME_IMPERFECT_SOUND ) | |
| 146 | 346 | |
| 147 | GAME( 1983, pachifev, 0, pachifev, pachifev, pachifev, ROT0, "Sanki Denshi Kogyo", "Pachi Fever", GAME_NOT_WORKING ) |
| r7356 | r7357 | |
|---|---|---|
| 78 | 78 | |
| 79 | 79 | Main_PortMap( gyrodine, 0x00 ) |
| 80 | 80 | Main_PortMap( flashgal, 0x40 ) |
| 81 | Main_PortMap( flashgla, 0xc0 ) | |
| 81 | Main_PortMap( flashgala, 0xc0 ) | |
| 82 | 82 | Main_PortMap( srdmissn, 0x08 ) |
| 83 | 83 | |
| 84 | 84 | |
| r7356 | r7357 | |
| 102 | 102 | Sub_MemMap( sonofphx, 0x7fff, 0xa000, 0xc080, 0xc040, 0xc000 ) |
| 103 | 103 | Sub_MemMap( srdmissn, 0x7fff, 0x8000, 0xf400, 0xf401, 0xf402 ) |
| 104 | 104 | Sub_MemMap( legend, 0x7fff, 0xc000, 0xf800, 0xf801, 0xf802 ) |
| 105 | Sub_MemMap( flashgla, 0x7fff, 0xe000, 0xc040, 0xc080, 0xc0c0 ) | |
| 105 | Sub_MemMap( flashgala, 0x7fff, 0xe000, 0xc040, 0xc080, 0xc0c0 ) | |
| 106 | 106 | |
| 107 | 107 | |
| 108 | 108 | |
| r7356 | r7357 | |
| 123 | 123 | Sub_PortMap( gyrodine, 0x00, 0xc0 ) |
| 124 | 124 | Sub_PortMap( sonofphx, 0x00, 0x40 ) |
| 125 | 125 | Sub_PortMap( srdmissn, 0x80, 0x84 ) |
| 126 | Sub_PortMap( flashgla, 0x40, 0x80 ) | |
| 126 | Sub_PortMap( flashgala, 0x40, 0x80 ) | |
| 127 | 127 | |
| 128 | 128 | |
| 129 | 129 | /************************************* |
| r7356 | r7357 | |
| 555 | 555 | MDRV_CPU_IO_MAP(flashgal_portmap) |
| 556 | 556 | MACHINE_DRIVER_END |
| 557 | 557 | |
| 558 | static MACHINE_DRIVER_START( flashgla ) | |
| 558 | static MACHINE_DRIVER_START( flashgala ) | |
| 559 | 559 | |
| 560 | 560 | /* basic machine hardware */ |
| 561 | 561 | MDRV_IMPORT_FROM(gyrodine) |
| 562 | 562 | MDRV_CPU_MODIFY("maincpu") |
| 563 | MDRV_CPU_IO_MAP(flashgla_portmap) | |
| 563 | MDRV_CPU_IO_MAP(flashgala_portmap) | |
| 564 | 564 | |
| 565 | 565 | MDRV_CPU_MODIFY("sub") |
| 566 | MDRV_CPU_PROGRAM_MAP(flashgla_sub_map) | |
| 567 | MDRV_CPU_IO_MAP(flashgla_sub_portmap) | |
| 566 | MDRV_CPU_PROGRAM_MAP(flashgala_sub_map) | |
| 567 | MDRV_CPU_IO_MAP(flashgala_sub_portmap) | |
| 568 | 568 | MACHINE_DRIVER_END |
| 569 | 569 | |
| 570 | 570 | static MACHINE_DRIVER_START( legend ) |
| r7356 | r7357 | |
| 1334 | 1334 | GAME( 1985, 99lstwara, sonofphx, sonofphx, sonofphx, 0, ROT90, "Proma", "'99: The Last War (alternate)", GAME_SUPPORTS_SAVE ) |
| 1335 | 1335 | GAME( 1985, 99lstwark, sonofphx, sonofphx, sonofphx, 0, ROT90, "Kyugo", "'99: The Last War (Kyugo)", GAME_SUPPORTS_SAVE ) |
| 1336 | 1336 | GAME( 1985, flashgal, 0, flashgal, flashgal, 0, ROT0, "Sega", "Flashgal (set 1)", GAME_SUPPORTS_SAVE ) |
| 1337 | GAME( 1985, flashgala, flashgal, flashgla, | |
| 1337 | GAME( 1985, flashgala, flashgal, flashgala, | |
| 1338 | 1338 | GAME( 1986, srdmissn, 0, srdmissn, srdmissn, srdmissn, ROT90, "Taito Corporation", "S.R.D. Mission", GAME_SUPPORTS_SAVE ) |
| 1339 | 1339 | GAME( 1986, fx, srdmissn, srdmissn, srdmissn, srdmissn, ROT90, "bootleg", "F-X", GAME_SUPPORTS_SAVE ) |
| 1340 | 1340 | GAME( 1986, legend, 0, legend, legend, srdmissn, ROT0, "Sega / Coreland", "Legend", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 360 | 360 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 361 | 361 | INPUT_PORTS_END |
| 362 | 362 | |
| 363 | static INPUT_PORTS_START( minesw | |
| 363 | static INPUT_PORTS_START( minesw | |
| 364 | 364 | PORT_START("IN0") |
| 365 | 365 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 366 | 366 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* This wiring selects cocktail mode */ |
| r7356 | r7357 | |
| 621 | 621 | GAME( 1978, blasto, 0, blasto, blasto, 0, ROT0, "Gremlin", "Blasto", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 622 | 622 | GAME( 1977, hustle, 0, hustle, hustle, 0, ROT0, "Gremlin", "Hustle", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 623 | 623 | GAME( 1977, mineswpr, 0, blasto, mineswpr, 0, ROT0, "Amutech", "Minesweeper", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 624 | GAME( 1977, mineswpr4, mineswpr, blasto, minesw | |
| 624 | GAME( 1977, mineswpr4, mineswpr, blasto, minesw |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | Espial: The Orca logo is displayed, but looks to be "blacked out" via the |
| 6 | 6 | color proms by having 0x1c & 0x1d set to black. |
| 7 | 7 | |
| 8 | ||
| 9 | Stephh's notes (based on the games Z80 code and some tests) : | |
| 10 | ||
| 11 | 1) 'espial*' | |
| 12 | ||
| 13 | - The games read both players controls for player 2 when "Cabinet" is set | |
| 14 | to "Upright" (code at 0x0321). | |
| 15 | - The games read both buttons status regardless of settings. They are | |
| 16 | then comnbined if Dip Switch is set to "1" (code at 0x32a). | |
| 17 | - The "CRE." displayed at the bottom right of the screen is in fact | |
| 18 | not really the number of credits (especially when coinage isn't 1C_1C) | |
| 19 | as it relies on a transformation of real number of credits (stored at | |
| 20 | 0x5802) based on settings (coins needed stored at 0x5806 and credits | |
| 21 | awarded at 0x5804). Check code at 0x080b which displays the odd value. | |
| 22 | ||
| 23 | 2) 'netwars' | |
| 24 | ||
| 25 | - The game reads both players controls for player 2 when "Cabinet" is set | |
| 26 | to "Upright" (code at 0x038e). | |
| 27 | - The "CREDIT" displayed at the bottom right of the screen is in fact | |
| 28 | not really the number of credits (especially when coinage isn't 1C_1C) | |
| 29 | as it relies on a transformation of real number of credits (stored at | |
| 30 | 0x5802) based on settings (coins needed stored at 0x5806 and credits | |
| 31 | awarded at 0x5804). Check code at 0x0147 which displays the odd value. | |
| 32 | - When you get a perfect in the bonus game, you are only awarded 1000 points | |
| 33 | even if the game tells you that you have been awarded 10000 points. | |
| 34 | ||
| 8 | 35 | ***************************************************************************/ |
| 9 | 36 | |
| 10 | 37 | #include "emu.h" |
| r7356 | r7357 | |
| 142 | 169 | ADDRESS_MAP_END |
| 143 | 170 | |
| 144 | 171 | |
| 172 | /* verified from Z80 code */ | |
| 145 | 173 | static INPUT_PORTS_START( espial ) |
| 146 | 174 | PORT_START("IN0") |
| 147 | 175 | PORT_DIPNAME( 0x01, 0x00, "Number of Buttons" ) |
| 148 | 176 | PORT_DIPSETTING( 0x01, "1" ) |
| 149 | 177 | PORT_DIPSETTING( 0x00, "2" ) |
| 150 | PORT_DIPNAME( 0x02, 0x02, "Enemy Bullets Vulnerable" ) | |
| 178 | PORT_DIPNAME( 0x02, 0x02, "Enemy Bullets Vulnerable" ) /* you can shoot bullets */ | |
| 151 | 179 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 152 | 180 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 153 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 154 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 181 | PORT_DIPUNUSED( 0x04, IP_ACTIVE_HIGH ) | |
| 182 | PORT_DIPUNUSED( 0x08, IP_ACTIVE_HIGH ) | |
| 155 | 183 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 156 | 184 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 157 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON | |
| 185 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 158 | 186 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 159 | 187 | |
| 160 | 188 | PORT_START("DSW1") |
| r7356 | r7357 | |
| 172 | 200 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) |
| 173 | 201 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_6C ) ) |
| 174 | 202 | PORT_DIPSETTING( 0x1c, DEF_STR( Free_Play ) ) |
| 175 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) /* Sources on the net show 20K/50K & 40K/70K */ | |
| 176 | PORT_DIPSETTING( 0x00, "20k and every 70k" ) | |
| 177 | PORT_DIPSETTING( 0x20, "50k and every 100k" ) | |
| 203 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) /* code at 0x43e1 in 'espial' and 0x44b5 in 'espialu' */ | |
| 204 | PORT_DIPSETTING( 0x00, "20k 70k 70k+" ) /* last bonus life at 980k : max. 15 bonus lives */ | |
| 205 | PORT_DIPSETTING( 0x20, "50k 100k 100k+" ) /* last bonus life at 900k : max. 10 bonus lives */ | |
| 178 | 206 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) ) |
| 179 | 207 | PORT_DIPSETTING( 0x40, DEF_STR( Upright ) ) |
| 180 | 208 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 181 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 182 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 183 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 209 | PORT_DIPNAME( 0x80, 0x00, "Reset on Check Error" ) | |
| 210 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) | |
| 211 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 184 | 212 | |
| 185 | 213 | PORT_START("IN1") |
| 186 | 214 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 187 | 215 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 188 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 216 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 189 | 217 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 190 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 191 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 192 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 193 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 218 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 219 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 220 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 221 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 194 | 222 | |
| 195 | 223 | PORT_START("IN2") |
| 196 | 224 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 197 | 225 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 198 | 226 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 199 | 227 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 200 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 201 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 202 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 203 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 228 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 229 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 230 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 231 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 204 | 232 | INPUT_PORTS_END |
| 205 | 233 | |
| 206 | 234 | |
| 235 | /* verified from Z80 code */ | |
| 207 | 236 | static INPUT_PORTS_START( netwars ) |
| 208 | 237 | PORT_START("IN0") |
| 209 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) /* probably unused */ | |
| 210 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 211 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 212 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) /* used */ | |
| 213 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 214 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 215 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) /* probably unused */ | |
| 216 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 217 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 218 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) /* used */ | |
| 219 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 220 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 238 | PORT_DIPUNUSED( 0x01, IP_ACTIVE_HIGH ) | |
| 239 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Difficulty ) ) /* when enemies shoot - code at 0x2216 */ | |
| 240 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) | |
| 241 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 242 | PORT_DIPUNUSED( 0x04, IP_ACTIVE_HIGH ) | |
| 243 | PORT_DIPUNUSED( 0x08, IP_ACTIVE_HIGH ) /* no effect due to code at 0x0e0a */ | |
| 221 | 244 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 222 | 245 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 223 | 246 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r7356 | r7357 | |
| 238 | 261 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) |
| 239 | 262 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_6C ) ) |
| 240 | 263 | PORT_DIPSETTING( 0x1c, DEF_STR( Free_Play ) ) |
| 241 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) | |
| 242 | PORT_DIPSETTING( 0x00, "20k and every 70k" ) | |
| 243 | PORT_DIPSETTING( 0x20, "50k and every 100k" ) | |
| 264 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) /* code at 0x2383 */ | |
| 265 | PORT_DIPSETTING( 0x00, "20k and 50k" ) | |
| 266 | PORT_DIPSETTING( 0x20, "40k and 70k" ) | |
| 244 | 267 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) ) |
| 245 | 268 | PORT_DIPSETTING( 0x40, DEF_STR( Upright ) ) |
| 246 | 269 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 247 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 248 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 249 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 270 | PORT_DIPNAME( 0x80, 0x00, "Reset on Check Error" ) | |
| 271 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) | |
| 272 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 250 | 273 | |
| 251 | 274 | PORT_START("IN1") |
| 252 | 275 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 253 | 276 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 254 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 277 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 255 | 278 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 256 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 257 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 258 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 279 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 280 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 281 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 259 | 282 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 260 | 283 | |
| 261 | 284 | PORT_START("IN2") |
| r7356 | r7357 | |
| 263 | 286 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 264 | 287 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 265 | 288 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 266 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 289 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 267 | 290 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 268 | 291 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 269 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 292 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 270 | 293 | INPUT_PORTS_END |
| 271 | 294 | |
| 272 | 295 |
| r7356 | r7357 | |
|---|---|---|
| 2169 | 2169 | ROM_LOAD( "tp018_11.bpr", 0x20, 0x20, CRC(a1e17492) SHA1(9ddec4c97f2d541f69f3c32c47aaa21fd9699ae2) ) /* ??? */ |
| 2170 | 2170 | ROM_END |
| 2171 | 2171 | |
| 2172 | ROM_START( outzoned ) | |
| 2173 | ROM_REGION( 0x040000, "maincpu", 0 ) /* Main 68K code */ | |
| 2174 | ROM_LOAD16_BYTE( "tp07.bin", 0x000000, 0x20000, CRC(a85a1d48) SHA1(74f16ef5126f0ce3d94a66849ccd7c28338e3974) ) | |
| 2175 | ROM_LOAD16_BYTE( "tp08.bin", 0x000001, 0x20000, CRC(d8cc44af) SHA1(da9c07e3670e5c7a2c1f9bc433e604a2a13b8a54) ) | |
| 2172 | 2176 | |
| 2177 | ROM_REGION( 0x10000, "audiocpu", 0 ) /* Sound Z80 code */ | |
| 2178 | ROM_LOAD( "tp09.bin", 0x0000, 0x8000, CRC(dd56041f) SHA1(a481b8959b349761624166906175f8efcbebb7e7) ) | |
| 2179 | ||
| 2180 | ROM_REGION( 0x100000, "gfx1", 0 ) | |
| 2181 | ROM_LOAD( "rom5.bin", 0x00000, 0x80000, CRC(c64ec7b6) SHA1(e73b51c3713c2ea7a572a02531c15d1261ddeaa0) ) | |
| 2182 | ROM_LOAD( "rom6.bin", 0x80000, 0x80000, CRC(64b6c5ac) SHA1(07fa20115f603445c0d51af3465c0471c09d76b1) ) | |
| 2183 | ||
| 2184 | ROM_REGION( 0x80000, "gfx2", 0 ) | |
| 2185 | ROM_LOAD( "rom2.bin", 0x00000, 0x20000, CRC(6bb72d16) SHA1(a127b10d9c255542bd09fcb5df057c12fd28c0d1) ) | |
| 2186 | ROM_LOAD( "rom1.bin", 0x20000, 0x20000, CRC(0934782d) SHA1(e4a775ead23227d7d6e76aea23aa3103b511d031) ) | |
| 2187 | ROM_LOAD( "rom3.bin", 0x40000, 0x20000, CRC(ec903c07) SHA1(75906f31200877fc8f6e78c2606ad5be49778165) ) | |
| 2188 | ROM_LOAD( "rom4.bin", 0x60000, 0x20000, CRC(50cbf1a8) SHA1(cfab1504746654b4a61912155e9aeca746c65321) ) | |
| 2189 | ||
| 2190 | ROM_REGION( 0x40, "proms", 0 ) /* nibble bproms, lo/hi order to be determined */ | |
| 2191 | ROM_LOAD( "tp018_10.bpr", 0x00, 0x20, CRC(bc88cced) SHA1(5055362710c0f58823c05fb4c0e0eec638b91e3d) ) /* sprite attribute (flip/position) ?? */ | |
| 2192 | ROM_LOAD( "tp018_11.bpr", 0x20, 0x20, CRC(a1e17492) SHA1(9ddec4c97f2d541f69f3c32c47aaa21fd9699ae2) ) /* ??? */ | |
| 2193 | ROM_END | |
| 2194 | ||
| 2173 | 2195 | ROM_START( vimana ) /* From board serial number 1547.04 (July '94) */ |
| 2174 | 2196 | ROM_REGION( 0x040000, "maincpu", 0 ) /* Main 68K code */ |
| 2175 | 2197 | ROM_LOAD16_BYTE( "tp019-7a.bin", 0x000000, 0x20000, CRC(5a4bf73e) SHA1(9a43d822bc24b59278f294d0b3275595de997d16) ) |
| r7356 | r7357 | |
| 2284 | 2306 | GAME( 1990, outzonea, outzone, outzone, outzone, toaplan1, ROT270, "Toaplan", "Out Zone (set 2)", 0 ) |
| 2285 | 2307 | GAME( 1990, outzoneb, outzone, outzone, outzoneb, toaplan1, ROT270, "Toaplan", "Out Zone (set 3, prototype?)", 0 ) // early revision at least |
| 2286 | 2308 | GAME( 1990, outzonec, outzone, outzone, outzonec, toaplan1, ROT270, "Toaplan", "Out Zone (set 4)", 0 ) |
| 2309 | GAME( 1990, outzoned, outzone, outzone, outzonec, toaplan1, ROT270, "Toaplan", "Out Zone (set 5)", 0 ) | |
| 2287 | 2310 | GAME( 1991, vimana, 0, vimana, vimana, vimana, ROT270, "Toaplan", "Vimana", GAME_NO_SOUND ) |
| 2288 | 2311 | GAME( 1991, vimana1, vimana, vimana, vimana, vimana, ROT270, "Toaplan", "Vimana (old set)", GAME_NO_SOUND ) |
| 2289 | 2312 | GAME( 1991, vimanan, vimana, vimana, vimanan, vimana, ROT270, "Toaplan (Nova Apparate GMBH & Co license)", "Vimana (Nova Apparate GMBH & Co)", GAME_NO_SOUND ) |
| r7356 | r7357 | |
|---|---|---|
| 793 | 793 | ROM_END |
| 794 | 794 | |
| 795 | 795 | GAME( 1995?, jingbell, 0, jingbell, jingbell, jingbell, ROT0, "IGS", "Jingle Bell (Italy, V133I)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION ) |
| 796 | GAME( 1998, gp98, 0, gp98, | |
| 796 | GAME( 1998, gp98, 0, gp98, |
| r7356 | r7357 | |
|---|---|---|
| 208 | 208 | PORT_DIPSETTING( 0x0000, "4" ) |
| 209 | 209 | INPUT_PORTS_END |
| 210 | 210 | |
| 211 | static INPUT_PORTS_START( funkyjej ) | |
| 211 | static INPUT_PORTS_START( funkyjetj ) | |
| 212 | 212 | PORT_INCLUDE(funkyjet) |
| 213 | 213 | |
| 214 | 214 | PORT_MODIFY("DSW") |
| r7356 | r7357 | |
| 392 | 392 | /******************************************************************************/ |
| 393 | 393 | |
| 394 | 394 | GAME( 1992, funkyjet, 0, funkyjet, funkyjet, funkyjet, ROT0, "[Data East] (Mitchell license)", "Funky Jet (World)", GAME_SUPPORTS_SAVE ) |
| 395 | GAME( 1992, funkyjetj,funkyjet, funkyjet, funkyjej, | |
| 395 | GAME( 1992, funkyjetj,funkyjet, funkyjet, funkyjetj, | |
| 396 | 396 | GAME( 1995, sotsugyo, 0, funkyjet, sotsugyo, funkyjet, ROT0, "Mitchell (Atlus license)", "Sotsugyo Shousho", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 811 | 811 | ROM_LOAD( "sp11-12.r9", 0x6000, 0x1000, CRC(4d37da5a) SHA1(37567d19596506385e9dcc7a7c0cf65120189ae0) ) |
| 812 | 812 | ROM_END |
| 813 | 813 | |
| 814 | ROM_START( spiders3 ) | |
| 815 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 816 | ROM_LOAD( "sp-ic74.bin", 0xc000, 0x1000, CRC(ed6b5dcd) SHA1(551fecb9adbab5cb5ac07fb27cc1fcfa03b5e832) ) | |
| 817 | ROM_LOAD( "sp-ic73.bin", 0xd000, 0x1000, CRC(bc04f779) SHA1(a6366461a120d978b27470dad34a2270aee71428) ) | |
| 818 | ROM_LOAD( "sp-ic72.bin", 0xe000, 0x1000, CRC(c7dd097d) SHA1(c7802ac33c1a67ffcb1891e74f0e43483f5b1016) ) | |
| 819 | ROM_LOAD( "sp-ic71.bin", 0xf000, 0x1000, CRC(593b43c4) SHA1(f0cf06a22be205f00a9d52f766c3aae1985f0090) ) | |
| 814 | 820 | |
| 821 | ROM_REGION( 0x10000, "audiocpu", 0 ) | |
| 822 | ROM_LOAD( "sp-ic3.bin", 0xf800, 0x0800, CRC(153adee7) SHA1(45dbd756adb5d75562b066fc152c0af7925052de) ) | |
| 815 | 823 | |
| 824 | ROM_REGION( 0x10000, "gfx1", 0 ) | |
| 825 | ROM_LOAD( "sp-ic33.bin", 0x0000, 0x1000, CRC(7209dacd) SHA1(142de81c013f4074a8eaedc5cd7e9498e6910eb9) ) | |
| 826 | ROM_LOAD( "sp-ic25.bin", 0x1000, 0x1000, CRC(d3d06722) SHA1(da510ed162e5c310945123c9ce6d5648c7b0ae48) ) | |
| 827 | ROM_LOAD( "sp-ic24", 0x2000, 0x1000, CRC(a40a5517) SHA1(3f524c7dbbfe8aad7860d15c38d2702732895681) ) | |
| 828 | ROM_LOAD( "sp-ic23", 0x3000, 0x1000, CRC(3ca08053) SHA1(20c5709d9650c426b91aed5318a9ab0a10009f17) ) | |
| 829 | ROM_LOAD( "sp-ic22", 0x4000, 0x1000, CRC(07ea073c) SHA1(2e57831092730db5fbdb97c2d78d8842868906f4) ) | |
| 830 | ROM_LOAD( "sp-ic21", 0x5000, 0x1000, CRC(41b344b4) SHA1(c0eac1e332da1eada062059ae742b666051da76c) ) | |
| 831 | ROM_LOAD( "sp-ic20", 0x6000, 0x1000, CRC(4d37da5a) SHA1(37567d19596506385e9dcc7a7c0cf65120189ae0) ) | |
| 832 | ROM_END | |
| 833 | ||
| 834 | ||
| 816 | 835 | /************************************* |
| 817 | 836 | * |
| 818 | 837 | * Game drivers |
| r7356 | r7357 | |
| 822 | 841 | /* this is a newer version with just one bug fix */ |
| 823 | 842 | GAME( 1981, spiders, 0, spiders, spiders, 0, ROT270, "Sigma Enterprises Inc.", "Spiders (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE) |
| 824 | 843 | GAME( 1981, spiders2, spiders, spiders, spiders, 0, ROT270, "Sigma Enterprises Inc.", "Spiders (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE) |
| 844 | GAME( 1981, spiders3, spiders, spiders, spiders, 0, ROT270, "Sigma Enterprises Inc.", "Spiders (set 3)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE) | |
| 825 | 845 | GAME( 1981, spinner, spiders, spiders, spiders, 0, ROT270, "bootleg", "Spinner", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE) |
| r7356 | r7357 | |
|---|---|---|
| 25 | 25 | Press START/DEAL (key 2) to exit. |
| 26 | 26 | |
| 27 | 27 | |
| 28 | * Treasure Island. | |
| 29 | ||
| 30 | To enter test mode, keep STATS/TEST (key 9) pressed during boot. | |
| 31 | HOLD3 (key C) to increase the tune/sound number, START (key 2) to decrease it. | |
| 32 | ||
| 33 | To enter the bookkeeping mode press STATS/TEST (key 9). | |
| 34 | Press START/TAKE (key 2) to exit. | |
| 35 | ||
| 36 | ||
| 28 | 37 | * Poker Carnival (crsbingo) |
| 29 | 38 | |
| 30 | 39 | To adjust the game rate, press SETTINGS (key 0) and then use HOLD4 (key V) |
| r7356 | r7357 | |
| 41 | 50 | HOLD5 (key B) to select between VOICE <-> MUSIC. |
| 42 | 51 | HOLD4 (key V) to increase the tune/sound number, START (key 2) to decrease it. |
| 43 | 52 | |
| 44 | To enter the bookkeeping mode press STATS (key 9). | |
| 53 | To enter the bookkeeping mode press STATS/TEST (key 9). | |
| 45 | 54 | Press START/DEAL (key 2) to exit. |
| 46 | 55 | |
| 47 | 56 | |
| r7356 | r7357 | |
| 116 | 125 | - Added button-lamps layout. |
| 117 | 126 | |
| 118 | 127 | |
| 128 | 2010-02-03 | |
| 129 | ---------- | |
| 130 | ||
| 131 | Treasure Island: | |
| 132 | ||
| 133 | - Added proper inputs. | |
| 134 | - Added coin/keyin/keyout/payout counters. | |
| 135 | - Limited the bet and coin pulses to avoid repeats and coin jams. | |
| 136 | - Added complete coinage and keyin DIP switches. | |
| 137 | - Added main game and double-up rates DIP switches. | |
| 138 | - Added minimum bet DIP switches. | |
| 139 | - Added maximum bet DIP switches. | |
| 140 | - Added main game and double-up limit DIP switches. | |
| 141 | - Added payout mode and auto take DIP switches. | |
| 142 | - Added DIP locations as seen in the settings mode. | |
| 143 | - Added demo sounds DIP switch. | |
| 144 | - Created proper button-lamps layout. | |
| 145 | - Added technical notes. | |
| 146 | - Some clean-ups... | |
| 147 | ||
| 148 | ||
| 119 | 149 | ***************************************************************************/ |
| 120 | 150 | |
| 121 | 151 | #include "emu.h" |
| r7356 | r7357 | |
| 129 | 159 | #include "crsbingo.lh" |
| 130 | 160 | #include "sharkpy.lh" |
| 131 | 161 | #include "smoto.lh" |
| 162 | #include "tisub.lh" | |
| 132 | 163 | |
| 133 | 164 | /*************************************************************************** |
| 134 | 165 | * Video Hardware * |
| r7356 | r7357 | |
| 137 | 168 | static UINT8 *videoram; |
| 138 | 169 | static UINT8 *colorram; |
| 139 | 170 | static tilemap_t *tmap; |
| 171 | static tilemap_t *reel1_tilemap, *reel2_tilemap, *reel3_tilemap; | |
| 140 | 172 | static int tiles_offset; |
| 173 | static UINT8* reel1_ram; | |
| 174 | static UINT8* reel2_ram; | |
| 175 | static UINT8* reel3_ram; | |
| 176 | static UINT8* reel1_scroll; | |
| 177 | static UINT8* reel2_scroll; | |
| 178 | static UINT8* reel3_scroll; | |
| 141 | 179 | |
| 180 | ||
| 142 | 181 | static WRITE8_HANDLER( subsino_tiles_offset_w ) |
| 143 | 182 | { |
| 144 | 183 | tiles_offset = (data & 1) ? 0x1000: 0; |
| r7356 | r7357 | |
| 167 | 206 | SET_TILE_INFO(0, code, color, 0); |
| 168 | 207 | } |
| 169 | 208 | |
| 209 | ||
| 210 | ||
| 170 | 211 | static VIDEO_START( subsino ) |
| 171 | 212 | { |
| 172 | 213 | tmap = tilemap_create( machine, get_tile_info, tilemap_scan_rows, 8,8, 0x40,0x20 ); |
| r7356 | r7357 | |
| 174 | 215 | tiles_offset = 0; |
| 175 | 216 | } |
| 176 | 217 | |
| 218 | ||
| 219 | ||
| 220 | WRITE8_HANDLER( subsino_reel1_ram_w ) | |
| 221 | { | |
| 222 | reel1_ram[offset] = data; | |
| 223 | tilemap_mark_tile_dirty(reel1_tilemap,offset); | |
| 224 | } | |
| 225 | ||
| 226 | static TILE_GET_INFO( get_subsino_reel1_tile_info ) | |
| 227 | { | |
| 228 | int code = reel1_ram[tile_index]; | |
| 229 | ||
| 230 | SET_TILE_INFO( | |
| 231 | 1, | |
| 232 | code, | |
| 233 | 0, | |
| 234 | 0); | |
| 235 | } | |
| 236 | ||
| 237 | ||
| 238 | WRITE8_HANDLER( subsino_reel2_ram_w ) | |
| 239 | { | |
| 240 | reel2_ram[offset] = data; | |
| 241 | tilemap_mark_tile_dirty(reel2_tilemap,offset); | |
| 242 | } | |
| 243 | ||
| 244 | static TILE_GET_INFO( get_subsino_reel2_tile_info ) | |
| 245 | { | |
| 246 | int code = reel2_ram[tile_index]; | |
| 247 | ||
| 248 | SET_TILE_INFO( | |
| 249 | 1, | |
| 250 | code, | |
| 251 | 0, | |
| 252 | 0); | |
| 253 | } | |
| 254 | ||
| 255 | WRITE8_HANDLER( subsino_reel3_ram_w ) | |
| 256 | { | |
| 257 | reel3_ram[offset] = data; | |
| 258 | tilemap_mark_tile_dirty(reel3_tilemap,offset); | |
| 259 | } | |
| 260 | ||
| 261 | static TILE_GET_INFO( get_subsino_reel3_tile_info ) | |
| 262 | { | |
| 263 | int code = reel3_ram[tile_index]; | |
| 264 | ||
| 265 | SET_TILE_INFO( | |
| 266 | 1, | |
| 267 | code, | |
| 268 | 0, | |
| 269 | 0); | |
| 270 | } | |
| 271 | ||
| 272 | ||
| 273 | ||
| 274 | static VIDEO_START( subsino_reels ) | |
| 275 | { | |
| 276 | VIDEO_START_CALL( subsino ); | |
| 277 | ||
| 278 | reel1_tilemap = tilemap_create(machine,get_subsino_reel1_tile_info,tilemap_scan_rows, 8, 32, 64, 8); | |
| 279 | reel2_tilemap = tilemap_create(machine,get_subsino_reel2_tile_info,tilemap_scan_rows, 8, 32, 64, 8); | |
| 280 | reel3_tilemap = tilemap_create(machine,get_subsino_reel3_tile_info,tilemap_scan_rows, 8, 32, 64, 8); | |
| 281 | ||
| 282 | tilemap_set_scroll_cols(reel1_tilemap, 64); | |
| 283 | tilemap_set_scroll_cols(reel2_tilemap, 64); | |
| 284 | tilemap_set_scroll_cols(reel3_tilemap, 64); | |
| 285 | ||
| 286 | } | |
| 287 | ||
| 177 | 288 | static VIDEO_UPDATE( subsino ) |
| 178 | 289 | { |
| 179 | 290 | bitmap_fill(bitmap,cliprect,0); |
| r7356 | r7357 | |
| 181 | 292 | return 0; |
| 182 | 293 | } |
| 183 | 294 | |
| 295 | // are these hardcoded, or registers? | |
| 296 | static const rectangle visible1 = { 0*8, (14+48)*8-1, 4*8, (4+7)*8-1 }; | |
| 297 | static const rectangle visible2 = { 0*8, (14+48)*8-1, 10*8, (10+7)*8-1 }; | |
| 298 | static const rectangle visible3 = { 0*8, (14+48)*8-1, 18*8, (18+7)*8-1 }; | |
| 299 | ||
| 300 | static VIDEO_UPDATE( subsino_reels ) | |
| 301 | { | |
| 302 | int i; | |
| 303 | bitmap_fill(bitmap,cliprect,0); | |
| 304 | ||
| 305 | for (i= 0;i < 64;i++) | |
| 306 | { | |
| 307 | tilemap_set_scrolly(reel1_tilemap, i, reel1_scroll[i]); | |
| 308 | tilemap_set_scrolly(reel2_tilemap, i, reel2_scroll[i]); | |
| 309 | tilemap_set_scrolly(reel3_tilemap, i, reel3_scroll[i]); | |
| 310 | } | |
| 311 | ||
| 312 | tilemap_draw(bitmap, &visible1, reel1_tilemap, 0, 0); | |
| 313 | tilemap_draw(bitmap, &visible2, reel2_tilemap, 0, 0); | |
| 314 | tilemap_draw(bitmap, &visible3, reel3_tilemap, 0, 0); | |
| 315 | ||
| 316 | tilemap_draw(bitmap,cliprect, tmap, 0, 0); | |
| 317 | return 0; | |
| 318 | } | |
| 319 | ||
| 184 | 320 | static PALETTE_INIT( subsino_2proms ) |
| 185 | 321 | { |
| 186 | 322 | int i,r,g,b,val; |
| r7356 | r7357 | |
| 253 | 389 | --x- ---- Payout pulse. |
| 254 | 390 | |
| 255 | 391 | |
| 392 | * Treasure Island. | |
| 393 | ||
| 394 | 7654 3210 | |
| 395 | ---- ---x Key In pulse. | |
| 396 | ---- --x- Coin pulse. | |
| 397 | ---x ---- Key Out pulse. | |
| 398 | --x- ---- Payout pulse. | |
| 399 | ||
| 400 | ||
| 256 | 401 | * Super Rider, Super Moto, Shark Party. |
| 257 | 402 | |
| 258 | 403 | 7654 3210 |
| r7356 | r7357 | |
| 269 | 414 | output_set_lamp_value(14, (data >> 6) & 1); /* Lamp 14 */ |
| 270 | 415 | output_set_lamp_value(15, (data >> 7) & 1); /* Lamp 15 */ |
| 271 | 416 | |
| 272 | coin_counter_w( space->machine, 0, data & 0x01 ); /* Coin1 */ | |
| 273 | coin_counter_w( space->machine, 1, data & 0x02 ); /* keyin */ | |
| 417 | coin_counter_w( space->machine, 0, data & 0x01 ); /* coin / keyin */ | |
| 418 | coin_counter_w( space->machine, 1, data & 0x02 ); /* keyin / coin */ | |
| 274 | 419 | coin_counter_w( space->machine, 2, data & 0x10 ); /* keyout */ |
| 275 | 420 | coin_counter_w( space->machine, 3, data & 0x20 ); /* payout */ |
| 276 | 421 | |
| r7356 | r7357 | |
| 308 | 453 | x--- ---- GAME OVER?. |
| 309 | 454 | |
| 310 | 455 | |
| 456 | * Treasure Island. | |
| 457 | ||
| 458 | 7654 3210 | |
| 459 | ---- ---x HOLD1. | |
| 460 | ---- --x- HOLD2 / BIG. | |
| 461 | ---- -x-- ???. | |
| 462 | ---- x--- BET. | |
| 463 | ---x ---- DOUBLE / INFO. | |
| 464 | --x- ---- START / TAKE. | |
| 465 | -x-- ---- HOLD3 / SMALL. | |
| 466 | x--- ---- ???. | |
| 467 | ||
| 468 | ||
| 311 | 469 | * Poker Carnival (crsbingo). |
| 312 | 470 | |
| 313 | 471 | 7654 3210 |
| r7356 | r7357 | |
| 370 | 528 | |
| 371 | 529 | AM_RANGE( 0x0c000, 0x0cfff ) AM_RAM |
| 372 | 530 | |
| 373 | AM_RANGE( 0x0d000, 0x0d000 ) AM_READ_PORT( "DSW1" ) | |
| 374 | AM_RANGE( 0x0d001, 0x0d001 ) AM_READ_PORT( "DSW2" ) | |
| 375 | AM_RANGE( 0x0d002, 0x0d002 ) AM_READ_PORT( "DSW3" ) | |
| 531 | AM_RANGE( 0x0d000, 0x0d000 ) AM_READ_PORT( "SW1" ) | |
| 532 | AM_RANGE( 0x0d001, 0x0d001 ) AM_READ_PORT( "SW2" ) | |
| 533 | AM_RANGE( 0x0d002, 0x0d002 ) AM_READ_PORT( "SW3" ) | |
| 376 | 534 | |
| 377 | AM_RANGE( 0x0d004, 0x0d004 ) AM_READ_PORT( " | |
| 535 | AM_RANGE( 0x0d004, 0x0d004 ) AM_READ_PORT( " | |
| 378 | 536 | AM_RANGE( 0x0d005, 0x0d005 ) AM_READ_PORT( "INA" ) |
| 379 | 537 | AM_RANGE( 0x0d006, 0x0d006 ) AM_READ_PORT( "INB" ) |
| 380 | 538 | |
| r7356 | r7357 | |
| 397 | 555 | static ADDRESS_MAP_START( sharkpy_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 398 | 556 | AM_RANGE( 0x09800, 0x09fff ) AM_RAM |
| 399 | 557 | |
| 400 | AM_RANGE( 0x09000, 0x09000 ) AM_READ_PORT( "DSW1" ) | |
| 401 | AM_RANGE( 0x09001, 0x09001 ) AM_READ_PORT( "DSW2" ) | |
| 402 | AM_RANGE( 0x09002, 0x09002 ) AM_READ_PORT( "DSW3" ) | |
| 558 | AM_RANGE( 0x09000, 0x09000 ) AM_READ_PORT( "SW1" ) | |
| 559 | AM_RANGE( 0x09001, 0x09001 ) AM_READ_PORT( "SW2" ) | |
| 560 | AM_RANGE( 0x09002, 0x09002 ) AM_READ_PORT( "SW3" ) | |
| 403 | 561 | |
| 404 | AM_RANGE( 0x09004, 0x09004 ) AM_READ_PORT( " | |
| 562 | AM_RANGE( 0x09004, 0x09004 ) AM_READ_PORT( " | |
| 405 | 563 | AM_RANGE( 0x09005, 0x09005 ) AM_READ_PORT( "INA" ) |
| 406 | 564 | AM_RANGE( 0x09006, 0x09006 ) AM_READ_PORT( "INB" ) |
| 407 | 565 | |
| r7356 | r7357 | |
| 438 | 596 | AM_RANGE( 0x09004, 0x09004 ) AM_READ_PORT( "INA" ) |
| 439 | 597 | AM_RANGE( 0x09005, 0x09005 ) AM_READ_PORT( "INB" ) |
| 440 | 598 | |
| 441 | AM_RANGE( 0x09006, 0x09006 ) AM_READ_PORT( "DSW1" ) | |
| 442 | AM_RANGE( 0x09007, 0x09007 ) AM_READ_PORT( "DSW2" ) | |
| 443 | AM_RANGE( 0x09008, 0x09008 ) AM_READ_PORT( "DSW3" ) | |
| 599 | AM_RANGE( 0x09006, 0x09006 ) AM_READ_PORT( "SW1" ) | |
| 600 | AM_RANGE( 0x09007, 0x09007 ) AM_READ_PORT( "SW2" ) | |
| 601 | AM_RANGE( 0x09008, 0x09008 ) AM_READ_PORT( "SW3" ) | |
| 444 | 602 | |
| 445 | 603 | AM_RANGE( 0x0900b, 0x0900b ) AM_RAM //protection |
| 446 | 604 | |
| r7356 | r7357 | |
| 527 | 685 | static ADDRESS_MAP_START( crsbingo_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 528 | 686 | AM_RANGE( 0x09800, 0x09fff ) AM_RAM |
| 529 | 687 | |
| 530 | AM_RANGE( 0x09000, 0x09000 ) AM_READ_PORT( "DSW1" ) | |
| 531 | AM_RANGE( 0x09001, 0x09001 ) AM_READ_PORT( "DSW2" ) | |
| 688 | AM_RANGE( 0x09000, 0x09000 ) AM_READ_PORT( "SW1" ) | |
| 689 | AM_RANGE( 0x09001, 0x09001 ) AM_READ_PORT( "SW2" ) | |
| 532 | 690 | AM_RANGE( 0x09002, 0x09002 ) AM_READ_PORT( "INA" ) |
| 533 | 691 | AM_RANGE( 0x09003, 0x09003 ) AM_READ_PORT( "INB" ) |
| 534 | 692 | AM_RANGE( 0x09004, 0x09004 ) AM_READ_PORT( "INC" ) |
| 535 | 693 | AM_RANGE( 0x09005, 0x09005 ) AM_WRITE( subsino_out_a_w ) |
| 536 | 694 | |
| 537 | AM_RANGE( 0x09008, 0x09008 ) AM_READ_PORT( "DSW4" ) | |
| 538 | AM_RANGE( 0x09009, 0x09009 ) AM_READ_PORT( "DSW3" ) // AM_WRITE( subsino_out_a_w ) | |
| 695 | AM_RANGE( 0x09008, 0x09008 ) AM_READ_PORT( "SW4" ) | |
| 696 | AM_RANGE( 0x09009, 0x09009 ) AM_READ_PORT( "SW3" ) // AM_WRITE( subsino_out_a_w ) | |
| 539 | 697 | AM_RANGE( 0x0900a, 0x0900a ) AM_READWRITE( hwcheck_r, subsino_out_b_w ) |
| 540 | 698 | |
| 541 | 699 | AM_RANGE( 0x09010, 0x09010 ) AM_READWRITE( flash_r, flash_w ) |
| r7356 | r7357 | |
| 557 | 715 | |
| 558 | 716 | ADDRESS_MAP_END |
| 559 | 717 | |
| 718 | static ADDRESS_MAP_START( tisub_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 719 | AM_RANGE( 0x09800, 0x09fff ) AM_RAM | |
| 560 | 720 | |
| 721 | AM_RANGE( 0x09000, 0x09000 ) AM_READ_PORT( "SW1" ) | |
| 722 | AM_RANGE( 0x09001, 0x09001 ) AM_READ_PORT( "SW2" ) | |
| 723 | AM_RANGE( 0x09002, 0x09002 ) AM_READ_PORT( "SW3" ) | |
| 724 | ||
| 725 | AM_RANGE( 0x09004, 0x09004 ) AM_READ_PORT( "SW4" ) | |
| 726 | AM_RANGE( 0x09005, 0x09005 ) AM_READ_PORT( "INA" ) | |
| 727 | AM_RANGE( 0x09006, 0x09006 ) AM_READ_PORT( "INB" ) | |
| 728 | ||
| 729 | /* 0x09008: is marked as OUTPUT C in the test mode. */ | |
| 730 | AM_RANGE( 0x09009, 0x09009 ) AM_WRITE( subsino_out_b_w ) | |
| 731 | AM_RANGE( 0x0900a, 0x0900a ) AM_WRITE( subsino_out_a_w ) | |
| 732 | ||
| 733 | AM_RANGE( 0x0900c, 0x0900c ) AM_READ_PORT( "INC" ) | |
| 734 | ||
| 735 | AM_RANGE( 0x09016, 0x09017 ) AM_DEVWRITE( "ymsnd", ym3812_w ) | |
| 736 | ||
| 737 | // AM_RANGE( 0x0900c, 0x0900c ) AM_DEVWRITE( "oki", okim6295_w ) | |
| 738 | ||
| 739 | AM_RANGE( 0x0901b, 0x0901b ) AM_WRITE( subsino_tiles_offset_w ) | |
| 740 | ||
| 741 | AM_RANGE( 0x07800, 0x07fff ) AM_RAM | |
| 742 | AM_RANGE( 0x08800, 0x08fff ) AM_RAM_WRITE( subsino_videoram_w ) AM_BASE( &videoram ) | |
| 743 | AM_RANGE( 0x08000, 0x087ff ) AM_RAM_WRITE( subsino_colorram_w ) AM_BASE( &colorram ) | |
| 744 | ||
| 745 | AM_RANGE( 0x00000, 0x0bfff ) AM_ROM // overlap unmapped regions | |
| 746 | AM_RANGE( 0x10000, 0x13fff ) AM_ROM | |
| 747 | AM_RANGE( 0x14000, 0x14fff ) AM_ROM // reads the card face data here (see rom copy in rom loading) | |
| 748 | ||
| 749 | AM_RANGE( 0x150c0, 0x150ff ) AM_RAM AM_BASE(&reel3_scroll) | |
| 750 | AM_RANGE( 0x15140, 0x1517f ) AM_RAM AM_BASE(&reel2_scroll) | |
| 751 | AM_RANGE( 0x15180, 0x151bf ) AM_RAM AM_BASE(&reel1_scroll) | |
| 752 | ||
| 753 | AM_RANGE( 0x15800, 0x159ff ) AM_RAM_WRITE(subsino_reel1_ram_w) AM_BASE(&reel1_ram) | |
| 754 | AM_RANGE( 0x15a00, 0x15bff ) AM_RAM_WRITE(subsino_reel2_ram_w) AM_BASE(&reel2_ram) | |
| 755 | AM_RANGE( 0x15c00, 0x15dff ) AM_RAM_WRITE(subsino_reel3_ram_w) AM_BASE(&reel3_ram) | |
| 756 | ADDRESS_MAP_END | |
| 757 | ||
| 561 | 758 | static ADDRESS_MAP_START( subsino_iomap, ADDRESS_SPACE_IO, 8 ) |
| 562 | 759 | AM_RANGE( 0x0000, 0x003f ) AM_RAM // internal regs |
| 563 | 760 | ADDRESS_MAP_END |
| r7356 | r7357 | |
| 568 | 765 | |
| 569 | 766 | static INPUT_PORTS_START( victor21 ) |
| 570 | 767 | |
| 571 | PORT_START( " | |
| 768 | PORT_START( " | |
| 572 | 769 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) |
| 573 | 770 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) |
| 574 | 771 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_2C ) ) |
| r7356 | r7357 | |
| 594 | 791 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 595 | 792 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 596 | 793 | |
| 597 | PORT_START( " | |
| 794 | PORT_START( " | |
| 598 | 795 | PORT_DIPNAME( 0x03, 0x03, "Main Game Rate" ) |
| 599 | 796 | PORT_DIPSETTING( 0x00, "75%" ) |
| 600 | 797 | PORT_DIPSETTING( 0x01, "80%" ) |
| r7356 | r7357 | |
| 611 | 808 | PORT_DIPNAME( 0x20, 0x20, "Attract Music" ) |
| 612 | 809 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 613 | 810 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 614 | PORT_DIPNAME( 0x40, 0x40, " | |
| 811 | PORT_DIPNAME( 0x40, 0x40, " | |
| 615 | 812 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 616 | 813 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 617 | 814 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 618 | 815 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 619 | 816 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 620 | 817 | |
| 621 | PORT_START( "DSW3" ) | |
| 622 | PORT_DIPNAME( 0x01, 0x01, "DSW3" ) | |
| 818 | PORT_START( "SW3" ) | |
| 819 | PORT_DIPNAME( 0x01, 0x01, "SW3" ) | |
| 623 | 820 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 624 | 821 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 625 | 822 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| r7356 | r7357 | |
| 678 | 875 | |
| 679 | 876 | static INPUT_PORTS_START( victor5 ) |
| 680 | 877 | |
| 681 | PORT_START( " | |
| 878 | PORT_START( " | |
| 682 | 879 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) |
| 683 | 880 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) |
| 684 | 881 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_2C ) ) |
| r7356 | r7357 | |
| 703 | 900 | PORT_DIPSETTING( 0xc0, "50" ) |
| 704 | 901 | PORT_DIPSETTING( 0x00, "80" ) |
| 705 | 902 | |
| 706 | PORT_START( " | |
| 903 | PORT_START( " | |
| 707 | 904 | PORT_DIPNAME( 0x03, 0x03, "Main Game Rate" ) |
| 708 | 905 | PORT_DIPSETTING( 0x00, "68%" ) |
| 709 | 906 | PORT_DIPSETTING( 0x01, "76%" ) |
| r7356 | r7357 | |
| 726 | 923 | PORT_DIPSETTING( 0xc0, "10" ) |
| 727 | 924 | PORT_DIPSETTING( 0x00, "20" ) |
| 728 | 925 | |
| 729 | PORT_START( "DSW3" ) | |
| 730 | PORT_DIPNAME( 0x01, 0x01, "DSW3" ) | |
| 926 | PORT_START( "SW3" ) | |
| 927 | PORT_DIPNAME( 0x01, 0x01, "SW3" ) | |
| 731 | 928 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 732 | 929 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 733 | 930 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| r7356 | r7357 | |
| 784 | 981 | INPUT_PORTS_END |
| 785 | 982 | |
| 786 | 983 | |
| 984 | static INPUT_PORTS_START( tisub ) | |
| 985 | ||
| 986 | PORT_START( "SW1" ) | |
| 987 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2,3") // SW1-123 | |
| 988 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) | |
| 989 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_2C ) ) | |
| 990 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) ) | |
| 991 | PORT_DIPSETTING( 0x07, "1 Coin / 10 Credits" ) | |
| 992 | PORT_DIPSETTING( 0x03, "1 Coin / 20 Credits" ) | |
| 993 | PORT_DIPSETTING( 0x02, "1 Coin / 25 Credits" ) | |
| 994 | PORT_DIPSETTING( 0x01, "1 Coin / 50 Credits" ) | |
| 995 | PORT_DIPSETTING( 0x00, "1 Coin / 100 Credits" ) | |
| 996 | PORT_DIPNAME( 0x38, 0x38, "Key In" ) PORT_DIPLOCATION("SW1:4,5,6") // SW1-456 | |
| 997 | PORT_DIPSETTING( 0x30, "4 Points/Pulse" ) | |
| 998 | PORT_DIPSETTING( 0x28, "8 Points/Pulse" ) | |
| 999 | PORT_DIPSETTING( 0x20, "20 Points/Pulse" ) | |
| 1000 | PORT_DIPSETTING( 0x38, "40 Points/Pulse" ) | |
| 1001 | PORT_DIPSETTING( 0x18, "80 Points/Pulse" ) | |
| 1002 | PORT_DIPSETTING( 0x10, "100 Points/Pulse" ) | |
| 1003 | PORT_DIPSETTING( 0x08, "200 Points/Pulse" ) | |
| 1004 | PORT_DIPSETTING( 0x00, "400 Points/Pulse" ) | |
| 1005 | PORT_DIPNAME( 0x40, 0x40, "Payout Mode" ) PORT_DIPLOCATION("SW1:7") // SW1-7 | |
| 1006 | PORT_DIPSETTING( 0x40, "Coin Value" ) | |
| 1007 | PORT_DIPSETTING( 0x00, "Key In Value" ) | |
| 1008 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") | |
| 1009 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1010 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1011 | ||
| 1012 | PORT_START( "SW2" ) | |
| 1013 | PORT_DIPNAME( 0x03, 0x03, "Minimum Bet" ) PORT_DIPLOCATION("SW2:1,2") // SW2-12 | |
| 1014 | PORT_DIPSETTING( 0x03, "1" ) | |
| 1015 | PORT_DIPSETTING( 0x02, "8" ) | |
| 1016 | PORT_DIPSETTING( 0x01, "16" ) | |
| 1017 | PORT_DIPSETTING( 0x00, "32" ) | |
| 1018 | PORT_DIPNAME( 0x0c, 0x08, "Max Bet" ) PORT_DIPLOCATION("SW2:3,4") // SW2-34 | |
| 1019 | PORT_DIPSETTING( 0x0c, "2" ) | |
| 1020 | PORT_DIPSETTING( 0x00, "8" ) | |
| 1021 | PORT_DIPSETTING( 0x04, "16" ) | |
| 1022 | PORT_DIPSETTING( 0x08, "32" ) | |
| 1023 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:5") // Not in test mode. | |
| 1024 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 1025 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1026 | PORT_DIPNAME( 0x20, 0x20, "Game Limit" ) PORT_DIPLOCATION("SW2:6") // SW2-6 | |
| 1027 | PORT_DIPSETTING( 0x20, "20000" ) | |
| 1028 | PORT_DIPSETTING( 0x00, "30000" ) | |
| 1029 | PORT_DIPNAME( 0x40, 0x40, "Auto Take" ) PORT_DIPLOCATION("SW2:7") // SW2-7 | |
| 1030 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1031 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1032 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8") | |
| 1033 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1034 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1035 | ||
| 1036 | PORT_START( "SW3" ) | |
| 1037 | PORT_DIPNAME( 0x07, 0x07, "Main Game Rate" ) PORT_DIPLOCATION("SW3:1,2,3") // SW3-123 | |
| 1038 | PORT_DIPSETTING( 0x00, "77%" ) | |
| 1039 | PORT_DIPSETTING( 0x01, "80%" ) | |
| 1040 | PORT_DIPSETTING( 0x02, "83%" ) | |
| 1041 | PORT_DIPSETTING( 0x03, "86%" ) | |
| 1042 | PORT_DIPSETTING( 0x04, "89%" ) | |
| 1043 | PORT_DIPSETTING( 0x07, "92%" ) | |
| 1044 | PORT_DIPSETTING( 0x05, "95%" ) | |
| 1045 | PORT_DIPSETTING( 0x06, "98%" ) | |
| 1046 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:4") | |
| 1047 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1048 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1049 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:5") | |
| 1050 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 1051 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1052 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:6") | |
| 1053 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1054 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1055 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:7") | |
| 1056 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1057 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1058 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:8") | |
| 1059 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1060 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1061 | ||
| 1062 | PORT_START( "SW4" ) | |
| 1063 | PORT_DIPNAME( 0x07, 0x07, "Double-Up Rate" ) PORT_DIPLOCATION("SW4:1,2,3") // SW4-123 | |
| 1064 | PORT_DIPSETTING( 0x00, "70%" ) | |
| 1065 | PORT_DIPSETTING( 0x01, "74%" ) | |
| 1066 | PORT_DIPSETTING( 0x02, "78%" ) | |
| 1067 | PORT_DIPSETTING( 0x03, "82%" ) | |
| 1068 | PORT_DIPSETTING( 0x04, "86%" ) | |
| 1069 | PORT_DIPSETTING( 0x07, "90%" ) | |
| 1070 | PORT_DIPSETTING( 0x05, "94%" ) | |
| 1071 | PORT_DIPSETTING( 0x06, "98%" ) | |
| 1072 | PORT_DIPNAME( 0x08, 0x08, "Double-Up Limit" ) PORT_DIPLOCATION("SW4:4") // SW4-4 | |
| 1073 | PORT_DIPSETTING( 0x08, "5000" ) | |
| 1074 | PORT_DIPSETTING( 0x00, "10000" ) | |
| 1075 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:5") | |
| 1076 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 1077 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1078 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:6") | |
| 1079 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1080 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1081 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:7") | |
| 1082 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1083 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1084 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:8") | |
| 1085 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1086 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1087 | ||
| 1088 | PORT_START( "INA" ) | |
| 1089 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Double / Info") | |
| 1090 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1") | |
| 1091 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2 / Big") | |
| 1092 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3 / Small") | |
| 1093 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1094 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Start / Take") | |
| 1095 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_IMPULSE(3) | |
| 1096 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1097 | ||
| 1098 | PORT_START( "INB" ) | |
| 1099 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) // coin | |
| 1100 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) // key in | |
| 1101 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1102 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1103 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Stats / Test") // Bookkeeping. | |
| 1104 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Settings") // Current settings. | |
| 1105 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout | |
| 1106 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out | |
| 1107 | ||
| 1108 | PORT_START( "INC" ) | |
| 1109 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1110 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1111 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_R) PORT_NAME("Reset") // hard reset | |
| 1112 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1113 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1114 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1115 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1116 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1117 | INPUT_PORTS_END | |
| 1118 | ||
| 1119 | ||
| 787 | 1120 | static INPUT_PORTS_START( crsbingo ) |
| 788 | 1121 | |
| 789 | PORT_START( " | |
| 1122 | PORT_START( " | |
| 790 | 1123 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) |
| 791 | 1124 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) |
| 792 | 1125 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_2C ) ) |
| r7356 | r7357 | |
| 812 | 1145 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 813 | 1146 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 814 | 1147 | |
| 815 | PORT_START( " | |
| 1148 | PORT_START( " | |
| 816 | 1149 | PORT_DIPNAME( 0x03, 0x03, "Minimum Bet" ) |
| 817 | 1150 | PORT_DIPSETTING( 0x02, "1" ) |
| 818 | 1151 | PORT_DIPSETTING( 0x01, "5" ) |
| r7356 | r7357 | |
| 835 | 1168 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 836 | 1169 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 837 | 1170 | |
| 838 | PORT_START( "DSW3" ) | |
| 839 | PORT_DIPNAME( 0x01, 0x01, "DSW3" ) | |
| 1171 | PORT_START( "SW3" ) | |
| 1172 | PORT_DIPNAME( 0x01, 0x01, "SW3" ) | |
| 840 | 1173 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 841 | 1174 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 842 | 1175 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| r7356 | r7357 | |
| 861 | 1194 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 862 | 1195 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 863 | 1196 | |
| 864 | PORT_START( " | |
| 1197 | PORT_START( " | |
| 865 | 1198 | PORT_DIPNAME( 0x07, 0x07, "Double-Up Rate" ) |
| 866 | 1199 | PORT_DIPSETTING( 0x00, "70%" ) |
| 867 | 1200 | PORT_DIPSETTING( 0x01, "74%" ) |
| r7356 | r7357 | |
| 902 | 1235 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) // key in |
| 903 | 1236 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 904 | 1237 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 905 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Stats") // Bookkeeping. | |
| 1238 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Stats") // Bookkeeping. | |
| 906 | 1239 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Settings") // Game Rate & others. |
| 907 | 1240 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout |
| 908 | 1241 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out |
| r7356 | r7357 | |
| 921 | 1254 | |
| 922 | 1255 | static INPUT_PORTS_START( sharkpy ) |
| 923 | 1256 | |
| 924 | PORT_START( " | |
| 1257 | PORT_START( " | |
| 925 | 1258 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coinage ) ) |
| 926 | 1259 | PORT_DIPSETTING( 0x01, "1 Coin / 10 Credits" ) |
| 927 | 1260 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) |
| r7356 | r7357 | |
| 933 | 1266 | PORT_DIPUNKNOWN( 0x40, 0x40 ) |
| 934 | 1267 | PORT_DIPUNKNOWN( 0x80, 0x80 ) |
| 935 | 1268 | |
| 936 | PORT_START( " | |
| 1269 | PORT_START( " | |
| 937 | 1270 | PORT_DIPUNKNOWN( 0x01, 0x01 ) |
| 938 | 1271 | PORT_DIPUNKNOWN( 0x02, 0x02 ) |
| 939 | 1272 | PORT_DIPUNKNOWN( 0x04, 0x04 ) |
| r7356 | r7357 | |
| 947 | 1280 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 948 | 1281 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 949 | 1282 | |
| 950 | PORT_START( " | |
| 1283 | PORT_START( " | |
| 951 | 1284 | PORT_DIPNAME( 0x07, 0x07, "Main Game Rate" ) |
| 952 | 1285 | PORT_DIPSETTING( 0x00, "55%" ) |
| 953 | 1286 | PORT_DIPSETTING( 0x01, "60%" ) |
| r7356 | r7357 | |
| 969 | 1302 | PORT_DIPUNKNOWN( 0x40, 0x40 ) |
| 970 | 1303 | PORT_DIPUNKNOWN( 0x80, 0x80 ) |
| 971 | 1304 | |
| 972 | PORT_START( " | |
| 1305 | PORT_START( " | |
| 973 | 1306 | PORT_DIPUNKNOWN( 0x01, 0x01 ) |
| 974 | 1307 | PORT_DIPUNKNOWN( 0x02, 0x02 ) |
| 975 | 1308 | PORT_DIPUNKNOWN( 0x04, 0x04 ) |
| r7356 | r7357 | |
| 1013 | 1346 | |
| 1014 | 1347 | static INPUT_PORTS_START( smoto16 ) |
| 1015 | 1348 | |
| 1016 | PORT_START( " | |
| 1349 | PORT_START( " | |
| 1017 | 1350 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coinage ) ) |
| 1018 | 1351 | PORT_DIPSETTING( 0x01, "1 Coin / 10 Credits" ) |
| 1019 | 1352 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) |
| r7356 | r7357 | |
| 1025 | 1358 | PORT_DIPUNKNOWN( 0x40, 0x40 ) |
| 1026 | 1359 | PORT_DIPUNKNOWN( 0x80, 0x80 ) |
| 1027 | 1360 | |
| 1028 | PORT_START( " | |
| 1361 | PORT_START( " | |
| 1029 | 1362 | PORT_DIPUNKNOWN( 0x01, 0x01 ) |
| 1030 | 1363 | PORT_DIPUNKNOWN( 0x02, 0x02 ) |
| 1031 | 1364 | PORT_DIPUNKNOWN( 0x04, 0x04 ) |
| r7356 | r7357 | |
| 1039 | 1372 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 1040 | 1373 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 1041 | 1374 | |
| 1042 | PORT_START( " | |
| 1375 | PORT_START( " | |
| 1043 | 1376 | PORT_DIPNAME( 0x07, 0x07, "Main Game Rate" ) |
| 1044 | 1377 | PORT_DIPSETTING( 0x00, "55%" ) |
| 1045 | 1378 | PORT_DIPSETTING( 0x01, "60%" ) |
| r7356 | r7357 | |
| 1061 | 1394 | PORT_DIPUNKNOWN( 0x40, 0x40 ) |
| 1062 | 1395 | PORT_DIPUNKNOWN( 0x80, 0x80 ) |
| 1063 | 1396 | |
| 1064 | PORT_START( " | |
| 1397 | PORT_START( " | |
| 1065 | 1398 | PORT_DIPUNKNOWN( 0x01, 0x01 ) |
| 1066 | 1399 | PORT_DIPUNKNOWN( 0x02, 0x02 ) |
| 1067 | 1400 | PORT_DIPUNKNOWN( 0x04, 0x04 ) |
| r7356 | r7357 | |
| 1107 | 1440 | |
| 1108 | 1441 | static INPUT_PORTS_START( smoto20 ) |
| 1109 | 1442 | |
| 1110 | PORT_START( " | |
| 1443 | PORT_START( " | |
| 1111 | 1444 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coinage ) ) |
| 1112 | 1445 | PORT_DIPSETTING( 0x01, "1 Coin / 10 Credits" ) |
| 1113 | 1446 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) |
| r7356 | r7357 | |
| 1119 | 1452 | PORT_DIPUNKNOWN( 0x40, 0x40 ) |
| 1120 | 1453 | PORT_DIPUNKNOWN( 0x80, 0x80 ) |
| 1121 | 1454 | |
| 1122 | PORT_START( " | |
| 1455 | PORT_START( " | |
| 1123 | 1456 | PORT_DIPUNKNOWN( 0x01, 0x01 ) |
| 1124 | 1457 | PORT_DIPUNKNOWN( 0x02, 0x02 ) |
| 1125 | 1458 | PORT_DIPUNKNOWN( 0x04, 0x04 ) |
| r7356 | r7357 | |
| 1133 | 1466 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 1134 | 1467 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 1135 | 1468 | |
| 1136 | PORT_START( " | |
| 1469 | PORT_START( " | |
| 1137 | 1470 | PORT_DIPNAME( 0x07, 0x07, "Main Game Rate" ) |
| 1138 | 1471 | PORT_DIPSETTING( 0x00, "25%" ) |
| 1139 | 1472 | PORT_DIPSETTING( 0x01, "30%" ) |
| r7356 | r7357 | |
| 1155 | 1488 | PORT_DIPUNKNOWN( 0x40, 0x40 ) |
| 1156 | 1489 | PORT_DIPUNKNOWN( 0x80, 0x80 ) |
| 1157 | 1490 | |
| 1158 | PORT_START( " | |
| 1491 | PORT_START( " | |
| 1159 | 1492 | PORT_DIPUNKNOWN( 0x01, 0x01 ) |
| 1160 | 1493 | PORT_DIPUNKNOWN( 0x02, 0x02 ) |
| 1161 | 1494 | PORT_DIPUNKNOWN( 0x04, 0x04 ) |
| r7356 | r7357 | |
| 1225 | 1558 | 8*8 |
| 1226 | 1559 | }; |
| 1227 | 1560 | |
| 1561 | static const gfx_layout layout_8x32x4 = | |
| 1562 | { | |
| 1563 | 8, 32, | |
| 1564 | RGN_FRAC(1, 4), | |
| 1565 | 4, | |
| 1566 | { RGN_FRAC(2,4), RGN_FRAC(3,4), RGN_FRAC(0,4), RGN_FRAC(1,4) }, | |
| 1567 | { STEP8(0,1) }, | |
| 1568 | { STEP32(0,8) }, | |
| 1569 | 8*8*4 | |
| 1570 | }; | |
| 1571 | ||
| 1572 | ||
| 1228 | 1573 | static GFXDECODE_START( subsino_depth3 ) |
| 1229 | 1574 | GFXDECODE_ENTRY( "tilemap", 0, layout_8x8x3, 0, 16 ) |
| 1230 | 1575 | GFXDECODE_END |
| r7356 | r7357 | |
| 1233 | 1578 | GFXDECODE_ENTRY( "tilemap", 0, layout_8x8x4, 0, 16 ) |
| 1234 | 1579 | GFXDECODE_END |
| 1235 | 1580 | |
| 1581 | static GFXDECODE_START( subsino_depth4_reels ) | |
| 1582 | GFXDECODE_ENTRY( "tilemap", 0, layout_8x8x4, 0, 16 ) | |
| 1583 | GFXDECODE_ENTRY( "reels", 0, layout_8x32x4, 0, 16 ) | |
| 1584 | GFXDECODE_END | |
| 1236 | 1585 | |
| 1237 | 1586 | /*************************************************************************** |
| 1238 | 1587 | * Machine Drivers * |
| r7356 | r7357 | |
| 1353 | 1702 | MDRV_CPU_PROGRAM_MAP(sharkpy_map) |
| 1354 | 1703 | MACHINE_DRIVER_END |
| 1355 | 1704 | |
| 1705 | static MACHINE_DRIVER_START( tisub ) | |
| 1706 | /* basic machine hardware */ | |
| 1707 | MDRV_CPU_ADD("maincpu", Z180, XTAL_12MHz / 8) /* Unknown CPU and clock */ | |
| 1708 | MDRV_CPU_PROGRAM_MAP(tisub_map) | |
| 1709 | MDRV_CPU_IO_MAP(subsino_iomap) | |
| 1356 | 1710 | |
| 1711 | /* video hardware */ | |
| 1712 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 1713 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1714 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 1715 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1716 | MDRV_SCREEN_SIZE(512, 256) | |
| 1717 | MDRV_SCREEN_VISIBLE_AREA(0, 512-1, 0+16, 256-16-1) | |
| 1718 | ||
| 1719 | MDRV_GFXDECODE(subsino_depth4_reels) | |
| 1720 | ||
| 1721 | MDRV_PALETTE_LENGTH(0x100) | |
| 1722 | MDRV_PALETTE_INIT(subsino_3proms) | |
| 1723 | ||
| 1724 | MDRV_VIDEO_START(subsino_reels) | |
| 1725 | MDRV_VIDEO_UPDATE(subsino_reels) | |
| 1726 | ||
| 1727 | /* sound hardware */ | |
| 1728 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1729 | ||
| 1730 | MDRV_SOUND_ADD("ymsnd", YM3812, XTAL_3_579545MHz) /* Unknown clock */ | |
| 1731 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 1732 | MACHINE_DRIVER_END | |
| 1733 | ||
| 1734 | ||
| 1357 | 1735 | /*************************************************************************** |
| 1358 | 1736 | * ROMs Loading * |
| 1359 | 1737 | ***************************************************************************/ |
| r7356 | r7357 | |
| 1467 | 1845 | |
| 1468 | 1846 | /*************************************************************************** |
| 1469 | 1847 | |
| 1848 | Treasure Island | |
| 1849 | -- this has an extra layer for the reels, exactly the same as goldstar.c | |
| 1850 | ||
| 1851 | ***************************************************************************/ | |
| 1852 | ||
| 1853 | ROM_START( tisub ) | |
| 1854 | ROM_REGION( 0x18000, "maincpu", 0 ) | |
| 1855 | ROM_LOAD( "rom_1.bin", 0x10000, 0x4000, CRC(ed3b4a69) SHA1(c57985e8d19b2b495fc768e52b83cbbd75f027ad) ) | |
| 1856 | ROM_CONTINUE(0x0000,0xc000) | |
| 1857 | ROM_COPY( "maincpu", 0x09000, 0x14000, 0x1000) | |
| 1858 | ||
| 1859 | ROM_REGION( 0x40000, "tilemap", 0 ) | |
| 1860 | ROM_LOAD( "rom_4.bin", 0x00000, 0x10000, CRC(37724fda) SHA1(084653662c9f77afef2a77c607e1fb093aaf3adf) ) | |
| 1861 | ROM_LOAD( "rom_5.bin", 0x10000, 0x10000, CRC(3d18acd8) SHA1(179545c18ad880097366c07c8e2fa821701a2758) ) | |
| 1862 | ROM_LOAD( "rom_6.bin", 0x20000, 0x10000, CRC(c2c226df) SHA1(39762b390d6b271c3252342e843a181dd152a0cc) ) | |
| 1863 | ROM_LOAD( "rom_7.bin", 0x30000, 0x10000, CRC(9d7d99d8) SHA1(a3df5e023c2102028a5186101dc0b19d91e8965e) ) | |
| 1864 | ||
| 1865 | ROM_REGION( 0x8000, "reels", 0 ) | |
| 1866 | ROM_LOAD( "rom_2.bin", 0x0000, 0x4000, CRC(836c756d) SHA1(fca1d5b600861eea30ed73ee13be735e7d167097) ) | |
| 1867 | ROM_IGNORE(0x4000) | |
| 1868 | ROM_LOAD( "rom_3.bin", 0x4000, 0x4000, CRC(2ad82222) SHA1(68780b9528393b28eaa2f90501efb5a8c39bed63) ) | |
| 1869 | ROM_IGNORE(0x4000) | |
| 1870 | ||
| 1871 | ROM_REGION( 0x300, "proms", 0 ) | |
| 1872 | ROM_LOAD( "n82s129n.u39", 0x000, 0x100, NO_DUMP ) | |
| 1873 | ROM_LOAD( "n82s129n.u40", 0x100, 0x100, NO_DUMP ) | |
| 1874 | ROM_LOAD( "n82s129n.u41", 0x200, 0x100, NO_DUMP ) | |
| 1875 | ROM_END | |
| 1876 | ||
| 1877 | /*************************************************************************** | |
| 1878 | ||
| 1470 | 1879 | Cross Bingo |
| 1471 | 1880 | (C)1991 Subsino |
| 1472 | 1881 | |
| r7356 | r7357 | |
| 1940 | 2349 | rom[0x12e1] = 0x20; // "ERROR 951010" |
| 1941 | 2350 | } |
| 1942 | 2351 | |
| 2352 | static DRIVER_INIT( tisub ) | |
| 2353 | { | |
| 2354 | UINT8 *rom = memory_region( machine, "maincpu" ); | |
| 1943 | 2355 | |
| 2356 | DRIVER_INIT_CALL(victor5); | |
| 2357 | ||
| 2358 | /* this trips a z180 MMU core bug? It unmaps a region then the program code jumps to that region... */ | |
| 2359 | rom[0x64c8] = 0x00; | |
| 2360 | rom[0x64c9] = 0x00; | |
| 2361 | rom[0x64ca] = 0x00; | |
| 2362 | rom[0x64cd] = 0x00; | |
| 2363 | rom[0x64ce] = 0x00; | |
| 2364 | rom[0x64cf] = 0x00; | |
| 2365 | } | |
| 2366 | ||
| 2367 | ||
| 1944 | 2368 | /*************************************************************************** |
| 1945 | 2369 | * Game Drivers * |
| 1946 | 2370 | ***************************************************************************/ |
| 1947 | 2371 | |
| 1948 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ | |
| 1949 | GAMEL( 1990, victor21, 0, victor21, victor21, victor21, ROT0, "Subsino / Buffy", "Victor 21", 0, layout_victor21 ) | |
| 1950 | GAMEL( 1991, victor5, 0, victor5, victor5, victor5, ROT0, "Subsino", "Victor 5", 0, layout_victor5 ) // board sticker says Victor 5, in-game says G.E.A with no manufacturer info? | |
| 1951 | GAMEL( 1991, crsbingo, 0, crsbingo, crsbingo, crsbingo, ROT0, "Subsino", "Poker Carnival", 0, layout_crsbingo ) // alt version of Cross Bingo? | |
| 1952 | GAMEL( 1996, sharkpy, 0, sharkpy, sharkpy, sharkpy, ROT0, "Subsino", "Shark Party (Italy, v1.3)", 0, layout_sharkpy ) // missing POST messages? | |
| 1953 | GAMEL( 1996, sharkpya, sharkpy, sharkpy, sharkpy, sharkpy, ROT0, "Subsino", "Shark Party (Italy, v1.6)", 0, layout_sharkpy ) // missing POST messages? | |
| 1954 | GAMEL( 1996, smoto20, 0, srider, smoto20, smoto20, ROT0, "Subsino", "Super Rider (Italy, v2.0)", 0, layout_smoto ) | |
| 1955 | GAMEL( 1996, smoto16, smoto20, srider, smoto16, smoto16, ROT0, "Subsino", "Super Moto (Italy, v1.6)", 0, layout_smoto ) | |
| 2372 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ | |
| 2373 | GAMEL( 1990, victor21, 0, victor21, victor21, victor21, ROT0, "Subsino / Buffy", "Victor 21", 0, layout_victor21 ) | |
| 2374 | GAMEL( 1991, victor5, 0, victor5, victor5, victor5, ROT0, "Subsino", "Victor 5", 0, layout_victor5 ) // board sticker says Victor 5, in-game says G.E.A with no manufacturer info? | |
| 2375 | GAMEL( 1991, tisub, 0, tisub, tisub, tisub, ROT0, "Subsino", "Treasure Island (Subsino)", GAME_WRONG_COLORS, layout_tisub ) | |
| 2376 | GAMEL( 1991, crsbingo, 0, crsbingo, crsbingo, crsbingo, ROT0, "Subsino", "Poker Carnival", 0, layout_crsbingo ) // alt version of Cross Bingo? | |
| 2377 | GAMEL( 1996, sharkpy, 0, sharkpy, sharkpy, sharkpy, ROT0, "Subsino", "Shark Party (Italy, v1.3)", 0, layout_sharkpy ) // missing POST messages? | |
| 2378 | GAMEL( 1996, sharkpya, sharkpy, sharkpy, sharkpy, sharkpy, ROT0, "Subsino", "Shark Party (Italy, v1.6)", 0, layout_sharkpy ) // missing POST messages? | |
| 2379 | GAMEL( 1996, smoto20, 0, srider, smoto20, smoto20, ROT0, "Subsino", "Super Rider (Italy, v2.0)", 0, layout_smoto ) | |
| 2380 | GAMEL( 1996, smoto16, smoto20, srider, smoto16, smoto16, ROT0, "Subsino", "Super Moto (Italy, v1.6)", 0, layout_smoto ) |
| r7356 | r7357 | |
|---|---|---|
| 75 | 75 | and select difficulty/court. I've mapped them this way because you |
| 76 | 76 | absolutely need the 2 buttons when you are in the "test mode". |
| 77 | 77 | |
| 78 | 4) 'timesold', 'timesol1' and 'btlfield' | |
| 78 | 4) 'timesold', 'timesold1' and 'btlfield' | |
| 79 | 79 | |
| 80 | 80 | - The "Unused" Dip Switch is sort of "Debug Mode" Dip Switch and has an |
| 81 | 81 | effect ONLY if 0x008fff.b is writable (as Bryan mentioned it). |
| r7356 | r7357 | |
| 88 | 88 | it is set to "Romstar". Again, it has an effect only if 0x000074.w is |
| 89 | 89 | writable and its role seems only to be limited to display some coordonates. |
| 90 | 90 | |
| 91 | 7) 'skyadvnt', 'skyadvnu' and 'skyadvnj' | |
| 91 | 7) 'skyadvnt', 'skyadvntu' and 'skyadvntj' | |
| 92 | 92 | |
| 93 | 93 | - As in 'skysoldr', you can access to some "hidden features" if 0x000074.w |
| 94 | 94 | is writable : |
| r7356 | r7357 | |
| 97 | 97 | * bit 6 (when "Difficulty" Dip Switch is set to DEF_STR( Hard ) or DEF_STR( Hardest )) |
| 98 | 98 | determines if some coordonates are displayed. |
| 99 | 99 | |
| 100 | 8) 'gangwarb' | |
| 100 | 8) 'gangwarsb' | |
| 101 | 101 | |
| 102 | 102 | - When "Coin Slots" Dip Switch is set to "1", COIN2 only adds ONE credit |
| 103 | 103 | and this has nothing to do with the microcontroller stuff. |
| r7356 | r7357 | |
| 125 | 125 | for 'sstingry', even if I had to rewrite it !) |
| 126 | 126 | - Fix screen flipping in 'sbasebal' (this was a Dip Switch issue) |
| 127 | 127 | - Add READ16_HANDLER( *_cycle_r ) for the following games : |
| 128 | * timesol1 (based on the one from 'timesold') | |
| 128 | * timesold1 (based on the one from 'timesold') | |
| 129 | 129 | * btlfield (based on the one from 'timesold') |
| 130 | * gangwarb (I splitted the one from 'gangwars') | |
| 131 | * skyadvnt, skyadvnu and skyadvnj | |
| 130 | * gangwarsb (I splitted the one from 'gangwars') | |
| 131 | * skyadvnt, skyadvntu and skyadvntj | |
| 132 | 132 | - Change manufacturer for the following games : |
| 133 | 133 | * timesold |
| 134 | * timesol1 | |
| 134 | * timesold1 | |
| 135 | 135 | * btlfield |
| 136 | 136 | * skysoldr |
| 137 | 137 | I can send you the ending pics where "Alpha Denshi Co." is mentioned. |
| r7356 | r7357 | |
| 180 | 180 | DIP locations verified from manuals for: |
| 181 | 181 | - tnextspc |
| 182 | 182 | - btlfield |
| 183 | - gangwarb | |
| 183 | - gangwarsb | |
| 184 | 184 | - skyadvnt |
| 185 | 185 | - goldmedl |
| 186 | 186 | - kyros |
| r7356 | r7357 | |
| 1176 | 1176 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(8) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_REVERSE PORT_PLAYER(2) |
| 1177 | 1177 | INPUT_PORTS_END |
| 1178 | 1178 | |
| 1179 | static INPUT_PORTS_START( btlfildb ) | |
| 1179 | static INPUT_PORTS_START( btlfieldb ) | |
| 1180 | 1180 | PORT_INCLUDE( btlfield ) |
| 1181 | 1181 | |
| 1182 | 1182 | PORT_MODIFY("IN4") /* A 6 way dip switch */ |
| r7356 | r7357 | |
| 1358 | 1358 | INPUT_PORTS_END |
| 1359 | 1359 | |
| 1360 | 1360 | /* Same as 'skyadvnt' but bits 0-3 of 2nd set of Dip Switches are different */ |
| 1361 | static INPUT_PORTS_START( skyadvnu ) | |
| 1361 | static INPUT_PORTS_START( skyadvntu ) | |
| 1362 | 1362 | PORT_INCLUDE( skyadvnt ) |
| 1363 | 1363 | |
| 1364 | 1364 | PORT_MODIFY("IN4") /* A 6 way dip switch */ |
| r7356 | r7357 | |
| 1428 | 1428 | INPUT_PORTS_END |
| 1429 | 1429 | |
| 1430 | 1430 | /* Same as 'gangwars' but bits 0-3 of 2nd set of Dip Switches are different */ |
| 1431 | static INPUT_PORTS_START( gangwarb ) | |
| 1431 | static INPUT_PORTS_START( gangwarsb ) | |
| 1432 | 1432 | PORT_INCLUDE( gangwars ) /* See notes about "IN2" (microcontroller) */ |
| 1433 | 1433 | |
| 1434 | 1434 | PORT_MODIFY("IN3") |
| r7356 | r7357 | |
| 2164 | 2164 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 2165 | 2165 | MACHINE_DRIVER_END |
| 2166 | 2166 | |
| 2167 | static MACHINE_DRIVER_START( btlfildb ) | |
| 2167 | static MACHINE_DRIVER_START( btlfieldb ) | |
| 2168 | 2168 | MDRV_IMPORT_FROM(alpha68k_II) |
| 2169 | 2169 | MDRV_CPU_MODIFY("maincpu") |
| 2170 | 2170 | MDRV_CPU_VBLANK_INT_HACK(alpha68k_interrupt,2) |
| r7356 | r7357 | |
| 3140 | 3140 | return ret; |
| 3141 | 3141 | } |
| 3142 | 3142 | |
| 3143 | static READ16_HANDLER( timesol1_cycle_r ) | |
| 3143 | static READ16_HANDLER( timesold1_cycle_r ) | |
| 3144 | 3144 | { |
| 3145 | 3145 | alpha68k_state *state = (alpha68k_state *)space->machine->driver_data; |
| 3146 | 3146 | int ret = state->shared_ram[0x4]; |
| r7356 | r7357 | |
| 3210 | 3210 | return ret; |
| 3211 | 3211 | } |
| 3212 | 3212 | |
| 3213 | static READ16_HANDLER( gangwarb_cycle_r ) | |
| 3213 | static READ16_HANDLER( gangwarsb_cycle_r ) | |
| 3214 | 3214 | { |
| 3215 | 3215 | alpha68k_state *state = (alpha68k_state *)space->machine->driver_data; |
| 3216 | 3216 | int ret = state->shared_ram[0x103]; |
| r7356 | r7357 | |
| 3269 | 3269 | state->coin_id = 0x22 | (0x22 << 8); |
| 3270 | 3270 | } |
| 3271 | 3271 | |
| 3272 | static DRIVER_INIT( timesol1 ) | |
| 3272 | static DRIVER_INIT( timesold1 ) | |
| 3273 | 3273 | { |
| 3274 | 3274 | alpha68k_state *state = (alpha68k_state *)machine->driver_data; |
| 3275 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x40008, 0x40009, 0, 0, timesol1_cycle_r); | |
| 3275 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x40008, 0x40009, 0, 0, timesold1_cycle_r); | |
| 3276 | 3276 | state->invert_controls = 1; |
| 3277 | 3277 | state->microcontroller_id = 0; |
| 3278 | 3278 | state->coin_id = 0x22 | (0x22 << 8); |
| r7356 | r7357 | |
| 3287 | 3287 | state->coin_id = 0x22 | (0x22 << 8); |
| 3288 | 3288 | } |
| 3289 | 3289 | |
| 3290 | static DRIVER_INIT( btlfildb ) | |
| 3290 | static DRIVER_INIT( btlfieldb ) | |
| 3291 | 3291 | { |
| 3292 | 3292 | alpha68k_state *state = (alpha68k_state *)machine->driver_data; |
| 3293 | 3293 | state->invert_controls = 1; |
| r7356 | r7357 | |
| 3314 | 3314 | state->coin_id = 0x23 | (0x24 << 8); |
| 3315 | 3315 | } |
| 3316 | 3316 | |
| 3317 | static DRIVER_INIT( goldmeda ) | |
| 3317 | static DRIVER_INIT( goldmedla ) | |
| 3318 | 3318 | { |
| 3319 | 3319 | alpha68k_state *state = (alpha68k_state *)machine->driver_data; |
| 3320 | 3320 | memory_set_bankptr(machine, "bank8", memory_region(machine, "maincpu") + 0x20000); |
| r7356 | r7357 | |
| 3332 | 3332 | state->coin_id = 0x22 | (0x22 << 8); |
| 3333 | 3333 | } |
| 3334 | 3334 | |
| 3335 | static DRIVER_INIT( skyadvnu ) | |
| 3335 | static DRIVER_INIT( skyadvntu ) | |
| 3336 | 3336 | { |
| 3337 | 3337 | alpha68k_state *state = (alpha68k_state *)machine->driver_data; |
| 3338 | 3338 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x40008, 0x40009, 0, 0, skyadvnt_cycle_r); |
| r7356 | r7357 | |
| 3351 | 3351 | state->coin_id = 0x23 | (0x24 << 8); |
| 3352 | 3352 | } |
| 3353 | 3353 | |
| 3354 | static DRIVER_INIT( gangwarb ) | |
| 3354 | static DRIVER_INIT( gangwarsb ) | |
| 3355 | 3355 | { |
| 3356 | 3356 | alpha68k_state *state = (alpha68k_state *)machine->driver_data; |
| 3357 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x40206, 0x40207, 0, 0, gangwarb_cycle_r); | |
| 3357 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x40206, 0x40207, 0, 0, gangwarsb_cycle_r); | |
| 3358 | 3358 | memory_set_bankptr(machine, "bank8", memory_region(machine, "user1")); |
| 3359 | 3359 | state->invert_controls = 0; |
| 3360 | 3360 | state->microcontroller_id = 0x8512; |
| r7356 | r7357 | |
| 3401 | 3401 | GAME( 1987, jongbou, 0, jongbou, jongbou, jongbou, ROT90, "SNK", "Mahjong Block Jongbou (Japan)", GAME_SUPPORTS_SAVE ) |
| 3402 | 3402 | GAME( 1988, paddlema, 0, alpha68k_I, paddlema, paddlema, ROT90, "SNK", "Paddle Mania", GAME_SUPPORTS_SAVE ) |
| 3403 | 3403 | GAME( 1987, timesold, 0, alpha68k_II, timesold, timesold, ROT90, "[Alpha Denshi Co.] (SNK/Romstar license)", "Time Soldiers (US Rev 3)", GAME_SUPPORTS_SAVE ) |
| 3404 | GAME( 1987, timesold1, timesold, alpha68k_II, timesold, timesol1, | |
| 3404 | GAME( 1987, timesold1, timesold, alpha68k_II, timesold, timesold1, | |
| 3405 | 3405 | GAME( 1987, btlfield, timesold, alpha68k_II, btlfield, btlfield, ROT90, "[Alpha Denshi Co.] (SNK license)", "Battle Field (Japan)", GAME_SUPPORTS_SAVE ) |
| 3406 | GAME( 1987, btlfieldb, timesold, btlfildb, | |
| 3406 | GAME( 1987, btlfieldb, timesold, btlfieldb, | |
| 3407 | 3407 | GAME( 1988, skysoldr, 0, alpha68k_II, skysoldr, skysoldr, ROT90, "[Alpha Denshi Co.] (SNK of America/Romstar license)", "Sky Soldiers (US)", GAME_SUPPORTS_SAVE ) |
| 3408 | 3408 | GAME( 1988, goldmedl, 0, alpha68k_II_gm, goldmedl, goldmedl, ROT0, "SNK", "Gold Medalist", GAME_SUPPORTS_SAVE ) |
| 3409 | GAME( 1988, goldmedla, goldmedl, alpha68k_II_gm, goldmedl, goldmeda, ROT0, "SNK", "Gold Medalist (alt)", GAME_SUPPORTS_SAVE ) | |
| 3410 | GAME( 1988, goldmedlb, goldmedl, alpha68k_II_gm, goldmedl, goldmeda, ROT0, "bootleg", "Gold Medalist (bootleg)", GAME_NOT_WORKING ) | |
| 3409 | GAME( 1988, goldmedla, goldmedl, alpha68k_II_gm, goldmedl, goldmedla,ROT0, "SNK", "Gold Medalist (alt)", GAME_SUPPORTS_SAVE ) | |
| 3410 | GAME( 1988, goldmedlb, goldmedl, alpha68k_II_gm, goldmedl, goldmedla,ROT0, "bootleg", "Gold Medalist (bootleg)", GAME_NOT_WORKING ) | |
| 3411 | 3411 | GAME( 1989, skyadvnt, 0, alpha68k_V, skyadvnt, skyadvnt, ROT90, "Alpha Denshi Co.", "Sky Adventure (World)", GAME_SUPPORTS_SAVE ) |
| 3412 | GAME( 1989, skyadvntu, skyadvnt, alpha68k_V, skyadvnu, | |
| 3412 | GAME( 1989, skyadvntu, skyadvnt, alpha68k_V, skyadvntu, | |
| 3413 | 3413 | GAME( 1989, skyadvntj, skyadvnt, alpha68k_V, skyadvnt, skyadvnt, ROT90, "Alpha Denshi Co.", "Sky Adventure (Japan)", GAME_SUPPORTS_SAVE ) |
| 3414 | 3414 | GAME( 1989, gangwars, 0, alpha68k_V, gangwars, gangwars, ROT0, "Alpha Denshi Co.", "Gang Wars (US)", GAME_SUPPORTS_SAVE ) |
| 3415 | GAME( 1989, gangwarsb, gangwars, alpha68k_V, gangwarb, | |
| 3415 | GAME( 1989, gangwarsb, gangwars, alpha68k_V, gangwarsb, | |
| 3416 | 3416 | #if SBASEBAL_HACK |
| 3417 | 3417 | GAME( 1989, sbasebal, 0, alpha68k_V_sb, sbasebal, sbasebal, ROT0, "Alpha Denshi Co.", "Super Champion Baseball (Japan)", GAME_SUPPORTS_SAVE ) |
| 3418 | 3418 | #else |
| r7356 | r7357 | |
|---|---|---|
| 294 | 294 | for hi-score table when screen not is flipped |
| 295 | 295 | |
| 296 | 296 | |
| 297 | Notes about 'azurian' : | |
| 298 | ----------------------- | |
| 297 | Stephh's notes (based on the games Z80 code and some tests) for other games : | |
| 299 | 298 | |
| 300 | ||
| 299 | ||
| 301 | 300 | |
| 302 | bit 6 bit 2 contents of | |
| 303 | IN1 IN2 0x40f4 consequences difficulty | |
| 301 | - Player 2 controls are used for player 2 regardless of the "Cabinet" Dip Switch | |
| 302 | (check code at 0x1043 which changes player and routines that handle players inputs : | |
| 303 | 0x1741 UP and DOWN - 0x1796 LEFT and RIGHT - 0x24e6 BUTTON1 - 0x2615 BUTTON2). | |
| 304 | 304 | |
| 305 | OFF OFF 2 aliens move 2 frames out of 3 easy | |
| 306 | ON OFF 4 aliens move 4 frames out of 5 hard | |
| 307 | OFF ON 3 aliens move 3 frames out of 4 normal | |
| 308 | ON ON 5 aliens move 5 frames out of 6 very hard | |
| 305 | 2) 'bagmanmc' | |
| 309 | 306 | |
| 310 | aliens movements is handled by routine at 0x1d59 : | |
| 307 | - DSW bit 6 was previously used for "Bonus Lives" settings, but it has no effect | |
| 308 | in this set because of 'NOP' instructions from 0x3501 to 0x3507. | |
| 311 | 309 | |
| 312 | - alien 1 moves when 0x4044 != 0 else contents of 0x40f4 is stored at 0x4044 | |
| 313 | - alien 2 moves when 0x4054 != 0 else contents of 0x40f4 is stored at 0x4054 | |
| 314 | - alien 3 moves when 0x4064 != 0 else contents of 0x40f4 is stored at 0x4064 | |
| 310 | 3) 'porter' | |
| 315 | 311 | |
| 312 | - It's difficult to map correctly players buttons because of what they do : | |
| 313 | on one side, both buttons do the same thing (code at 0x0940 for player 1 and | |
| 314 | player 2 in "Upright" cabinet, or 0x1cc0 for player 2 in "Cocktail" cabinet), | |
| 315 | but on the other side, due to code at 0x0910, player 1 BUTTON1 acts as a | |
| 316 | START1 button while player 1 BUTTON2 acts as a START2 button. Any help is welcome ! | |
| 316 | 317 | |
| 317 | Notes about 'scorpnmc' : | |
| 318 | ----------------------- | |
| 318 | 4) 'tazzmang' | |
| 319 | 319 | |
| 320 | As the START buttons are also the buttons for player 1, how should I map them ? | |
| 321 | I've coded this the same way as in 'checkman', but I'm not sure this is correct. | |
| 320 | - If you press COIN2 during the boot-up sequence, you enter sort of "test mode" | |
| 321 | where you can access to all inputs, but this doesn't give a clue about what | |
| 322 | they do (only the status - 0 or 1 - is displayed). | |
| 323 | - IN1 bit 0 has 2 effects : it starts a one player game (code at 0x5585), | |
| 324 | but it also acts as 2nd button (bomb) for BOTH players regardless of "Cabinet" | |
| 325 | settings (code at 0x5805 for player 1 and player 2 in "Upright" cabinet, or | |
| 326 | 0x5563 for player 2 in "Cocktail" cabinet). | |
| 322 | 327 | |
| 323 | I can't tell if it's a bug, but if you reset the game when the screen is flipped, | |
| 324 | the screens remains flipped (the "flip screen" routine doesn't seem to be called) ! | |
| 328 | 5) 'bongo' | |
| 325 | 329 | |
| 330 | - IN0 bit 1 is supposed to be COIN2 (see coinage routine at 0x0288), but | |
| 331 | there is a test on it at 0x0082 (in NMI routine) which jumps to 0xc003 | |
| 332 | (unmapped memory) if it pressed (HIGH). | |
| 333 | - IN0 bit 7 is tested on startup (code at 0x0048) in combinaison with bits 0 and 1 | |
| 334 | (which are supposed to be COIN1 and COIN2). If all of them are pressed (HIGH), | |
| 335 | the game displays a "CREDIT FAULT" message then jumps back to 0x0048. | |
| 336 | - IN0 bit 4 and IN1 bit 4 should have been IPT_JOYSTICK_DOWN (Upright and Cocktail) | |
| 337 | but their status is discarded with 3 'NOP' instructions at 0x06ca. | |
| 338 | - IN0 bit 7 and IN0 bit 6 should have been IPT_BUTTON1 (Upright and Cocktail) | |
| 339 | but their status is discarded with 3 'NOP' instructions at 0x06d1. | |
| 340 | - DSW0 is read via code at 0x2426, but its contents is directly overwritten | |
| 341 | with value read from DSW1 (AY port A) via code at 0x3647. | |
| 326 | 342 | |
| 343 | 4) 'ozon1' | |
| 327 | 344 | |
| 328 | Notes about 'frogg' : | |
| 329 | --------------------- | |
| 345 | - Player 2 controls are used for player 2 regardless of the "Cabinet" Dip Switch | |
| 346 | (check code at 0x03c6 which changes player and routines that handle players inputs : | |
| 347 | 0x0dc3 and 0x1e31 LEFT and RIGHT - 0x0e76 BUTTON1). | |
| 348 | - Credits are coded on 1 byte (range 0x00-0xff) and stored at 0x4002. | |
| 349 | To display them, they are converted to BCD on 1 byte via routine at 0x1421. | |
| 350 | As a result, it will always display 0 to 99 (eg: 0xf0 = 240 will display 40). | |
| 351 | When you get 256 credits, 0x4002 = 0x00, so the game thinks you have no credit | |
| 352 | at all and enters "attract mode" again (but the game does NOT reset). | |
| 353 | - There's an ingame bug when you get 101 or 201 credits : due to code at 0x0239, | |
| 354 | the game checks the BCD value (0x01) instead of the correct one at 0x4002, | |
| 355 | so you can't start a 2 players game ! | |
| 356 | - There is another ingame bug when "Coinage" settings are "A 1C/2C B 1C/1C" | |
| 357 | and you press COIN2 : due to code at 0x0473, contents of 0x4004 is NEVER reset | |
| 358 | to 0x00, so routine at 0x042a ALWAYS thinks that you've pressed COIN2, | |
| 359 | and as a consequence, it ALWAYS adds 1 credit (even when you are playing) ! | |
| 330 | 360 | |
| 331 | If bit 5 of IN0 or bit 5 of IN1 is HIGH, something strange occurs (check code | |
| 332 | at 0x3580) : each time you press START2 a counter at 0x47da is incremented. | |
| 333 | When this counter reaches 0x2f, each next time you press START2, it acts as if | |
| 334 | you had pressed COIN2, so credits are added ! | |
| 335 | Bit 5 of IN0 is tested if "Cabinet" Dip Switch is set to "Upright" and | |
| 336 | bit 5 of IN1 is tested if "Cabinet" Dip Switch is set to "Cocktail". | |
| 337 | 361 | |
| 338 | ||
| 339 | ||
| 340 | TO DO : | |
| 341 | ------- | |
| 342 | ||
| 343 | - smooncrs : fix read/writes at/to unmapped memory (when player 2, "cocktail" mode) | |
| 344 | fix the ?#! bug with "bullets" (when player 2, "cocktail" mode) | |
| 345 | - frogg : fix read/writes at/to unmapped/wrong memory | |
| 346 | - scprpng : fix read/writes at/to unmapped/wrong memory | |
| 347 | ||
| 348 | 362 | ***************************************************************************/ |
| 349 | 363 | |
| 350 | 364 | #include "emu.h" |
| r7356 | r7357 | |
| 449 | 463 | AM_RANGE(0xb800, 0xb800) AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) |
| 450 | 464 | ADDRESS_MAP_END |
| 451 | 465 | |
| 466 | ||
| 452 | 467 | static ADDRESS_MAP_START( rockclim_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 453 | 468 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 454 | 469 | AM_RANGE(0x4000, 0x47ff) AM_READWRITE(rockclim_videoram_r, rockclim_videoram_w) AM_BASE(&rockclim_videoram)//4800 - 4803 = bg scroll ? |
| 455 | 470 | AM_RANGE(0x4800, 0x4803) AM_WRITE(rockclim_scroll_w) |
| 456 | 471 | AM_RANGE(0x5000, 0x53ff) AM_RAM //? |
| 472 | AM_RANGE(0x5800, 0x5800) AM_READ_PORT("IN2") | |
| 457 | 473 | AM_RANGE(0x6000, 0x7fff) AM_ROM |
| 458 | 474 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 459 | 475 | AM_RANGE(0x8800, 0x8800) AM_READ_PORT("DSW1") |
| r7356 | r7357 | |
| 479 | 495 | AM_RANGE(0xb800, 0xb800) AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) |
| 480 | 496 | ADDRESS_MAP_END |
| 481 | 497 | |
| 498 | ||
| 499 | static ADDRESS_MAP_START( ckongg_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 500 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 501 | AM_RANGE(0x6000, 0x6fff) AM_RAM | |
| 502 | AM_RANGE(0x9000, 0x93ff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 503 | AM_RANGE(0x9800, 0x983f) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 504 | AM_RANGE(0x9840, 0x985f) AM_RAM AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 505 | AM_RANGE(0x9860, 0x987f) AM_RAM AM_BASE(&galaxold_bulletsram) AM_SIZE(&galaxold_bulletsram_size) | |
| 506 | AM_RANGE(0x9880, 0x98ff) AM_RAM | |
| 507 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN0") | |
| 508 | AM_RANGE(0xc000, 0xc001) AM_WRITE(galaxold_leds_w) | |
| 509 | AM_RANGE(0xc002, 0xc002) AM_WRITE(galaxold_coin_lockout_w) | |
| 510 | AM_RANGE(0xc003, 0xc003) AM_WRITE(galaxold_coin_counter_w) | |
| 511 | AM_RANGE(0xc004, 0xc007) AM_DEVWRITE(GAL_AUDIO, galaxian_lfo_freq_w) | |
| 512 | AM_RANGE(0xc400, 0xc400) AM_READ_PORT("IN1") | |
| 513 | AM_RANGE(0xc400, 0xc402) AM_DEVWRITE(GAL_AUDIO, galaxian_background_enable_w) | |
| 514 | AM_RANGE(0xc403, 0xc403) AM_DEVWRITE(GAL_AUDIO, galaxian_noise_enable_w) | |
| 515 | AM_RANGE(0xc405, 0xc405) AM_DEVWRITE(GAL_AUDIO, galaxian_shoot_enable_w) | |
| 516 | AM_RANGE(0xc406, 0xc407) AM_DEVWRITE(GAL_AUDIO, galaxian_vol_w) | |
| 517 | AM_RANGE(0xc800, 0xc800) AM_READ_PORT("DSW") | |
| 518 | AM_RANGE(0xc801, 0xc801) AM_WRITE(galaxold_nmi_enable_w) | |
| 519 | AM_RANGE(0xc804, 0xc804) AM_WRITENOP // link cut | |
| 520 | AM_RANGE(0xc806, 0xc806) AM_WRITE(galaxold_flip_screen_x_w) | |
| 521 | AM_RANGE(0xc807, 0xc807) AM_WRITE(galaxold_flip_screen_y_w) | |
| 522 | AM_RANGE(0xcc00, 0xcc00) AM_READ(watchdog_reset_r) AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) | |
| 523 | ADDRESS_MAP_END | |
| 524 | ||
| 525 | /* Memory map based on mooncrst_map according to Z80 code - seems to be good but needs further checking */ | |
| 526 | static ADDRESS_MAP_START( ckongmc_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 527 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 528 | AM_RANGE(0x6000, 0x6fff) AM_RAM | |
| 529 | AM_RANGE(0x9000, 0x93ff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 530 | AM_RANGE(0x9800, 0x983f) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 531 | AM_RANGE(0x9840, 0x985f) AM_RAM AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 532 | AM_RANGE(0x9860, 0x987f) AM_RAM AM_BASE(&galaxold_bulletsram) AM_SIZE(&galaxold_bulletsram_size) | |
| 533 | AM_RANGE(0x9880, 0x98ff) AM_RAM | |
| 534 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0") | |
| 535 | AM_RANGE(0xa001, 0xa002) AM_WRITE(galaxold_leds_w) /* GUESS */ | |
| 536 | // AM_RANGE(0xa002, 0xa002) AM_WRITE(galaxold_coin_lockout_w) /* not written */ | |
| 537 | // AM_RANGE(0xa003, 0xa003) AM_WRITE(galaxold_coin_counter_w) /* not written */ | |
| 538 | AM_RANGE(0xa004, 0xa007) AM_DEVWRITE(GAL_AUDIO, galaxian_lfo_freq_w) /* GUESS */ | |
| 539 | AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN1") | |
| 540 | AM_RANGE(0xa800, 0xa802) AM_DEVWRITE(GAL_AUDIO, galaxian_background_enable_w) /* GUESS */ | |
| 541 | AM_RANGE(0xa803, 0xa803) AM_DEVWRITE(GAL_AUDIO, galaxian_noise_enable_w) /* GUESS */ | |
| 542 | AM_RANGE(0xa805, 0xa805) AM_DEVWRITE(GAL_AUDIO, galaxian_shoot_enable_w) /* GUESS */ | |
| 543 | AM_RANGE(0xa806, 0xa807) AM_DEVWRITE(GAL_AUDIO, galaxian_vol_w) /* GUESS */ | |
| 544 | AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW") | |
| 545 | AM_RANGE(0xb001, 0xb001) AM_WRITE(galaxold_nmi_enable_w) | |
| 546 | AM_RANGE(0xb004, 0xb004) AM_WRITENOP /* AM_WRITE(galaxold_stars_enable_w) */ | |
| 547 | AM_RANGE(0xb006, 0xb006) AM_WRITE(galaxold_flip_screen_x_w) /* GUESS */ | |
| 548 | AM_RANGE(0xb007, 0xb007) AM_WRITE(galaxold_flip_screen_y_w) /* GUESS */ | |
| 549 | AM_RANGE(0xb800, 0xb800) AM_READ(watchdog_reset_r) AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) /* GUESS */ | |
| 550 | ADDRESS_MAP_END | |
| 551 | ||
| 552 | ||
| 482 | 553 | static ADDRESS_MAP_START( scramblb_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 483 | 554 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 484 | 555 | AM_RANGE(0x4000, 0x47ff) AM_RAM |
| r7356 | r7357 | |
| 509 | 580 | AM_RANGE(0x8202, 0x8202) AM_READ(scramblb_protection_2_r) |
| 510 | 581 | ADDRESS_MAP_END |
| 511 | 582 | |
| 512 | ||
| 513 | 583 | static READ8_HANDLER( scramb2_protection_r ) { return 0x25; } |
| 514 | 584 | static READ8_HANDLER( scramb2_port0_r ) { return (input_port_read(space->machine, "IN0") >> offset) & 0x1; } |
| 515 | 585 | static READ8_HANDLER( scramb2_port1_r ) { return (input_port_read(space->machine, "IN1") >> offset) & 0x1; } |
| r7356 | r7357 | |
| 540 | 610 | ADDRESS_MAP_END |
| 541 | 611 | |
| 542 | 612 | |
| 543 | ||
| 544 | 613 | static ADDRESS_MAP_START( _4in1_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 545 | 614 | AM_RANGE(0x0000, 0x3fff) AM_ROMBANK("bank1") /* banked game code */ |
| 546 | 615 | AM_RANGE(0x4000, 0x47ff) AM_RAM |
| r7356 | r7357 | |
| 571 | 640 | AM_RANGE(0xc000, 0xdfff) AM_ROM /* fixed menu code */ |
| 572 | 641 | ADDRESS_MAP_END |
| 573 | 642 | |
| 643 | ||
| 574 | 644 | static ADDRESS_MAP_START( bagmanmc_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 575 | 645 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 576 | 646 | AM_RANGE(0x6000, 0x67ff) AM_RAM |
| r7356 | r7357 | |
| 591 | 661 | AM_RANGE(0xb800, 0xb800) AM_READ(watchdog_reset_r) AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) |
| 592 | 662 | ADDRESS_MAP_END |
| 593 | 663 | |
| 664 | ||
| 594 | 665 | static ADDRESS_MAP_START( dkongjrm_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 595 | 666 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 596 | 667 | AM_RANGE(0x6000, 0x6fff) AM_RAM |
| r7356 | r7357 | |
| 607 | 678 | AM_RANGE(0xa803, 0xa803) AM_DEVWRITE(GAL_AUDIO, galaxian_noise_enable_w) |
| 608 | 679 | //AM_RANGE(0xa805, 0xa805) AM_WRITE(galaxian) |
| 609 | 680 | AM_RANGE(0xa806, 0xa807) AM_DEVWRITE(GAL_AUDIO, galaxian_vol_w) |
| 610 | AM_RANGE(0xb000, 0xb0ff) AM_READ_PORT(" | |
| 681 | AM_RANGE(0xb000, 0xb0ff) AM_READ_PORT("DSW") | |
| 611 | 682 | AM_RANGE(0xb000, 0xb000) AM_WRITE(galaxold_gfxbank_w) |
| 612 | 683 | AM_RANGE(0xb001, 0xb001) AM_WRITE(galaxold_nmi_enable_w) |
| 613 | 684 | //AM_RANGE(0xb004, 0xb004) AM_WRITE(galaxold_stars_enable_w) |
| r7356 | r7357 | |
| 616 | 687 | AM_RANGE(0xb800, 0xb800) AM_READ(watchdog_reset_r) AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) |
| 617 | 688 | ADDRESS_MAP_END |
| 618 | 689 | |
| 619 | static ADDRESS_MAP_START( ozon1_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 620 | AM_RANGE(0x0000, 0x2fff) AM_ROM | |
| 621 | AM_RANGE(0x4000, 0x4200) AM_RAM | |
| 622 | AM_RANGE(0x4300, 0x43ff) AM_RAM | |
| 623 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 624 | AM_RANGE(0x4c00, 0x4fff) AM_WRITE(galaxold_videoram_w) | |
| 625 | AM_RANGE(0x5000, 0x503f) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 626 | AM_RANGE(0x5040, 0x505f) AM_RAM AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 627 | AM_RANGE(0x6801, 0x6801) AM_WRITENOP //continuosly 0 and 1 | |
| 628 | AM_RANGE(0x6802, 0x6802) AM_WRITE(galaxold_coin_counter_w) | |
| 629 | AM_RANGE(0x6806, 0x6806) AM_WRITENOP //only one 0 at reset | |
| 630 | AM_RANGE(0x6807, 0x6807) AM_WRITENOP //only one 0 at reset | |
| 631 | AM_RANGE(0x8100, 0x8100) AM_READ_PORT("IN0") | |
| 632 | AM_RANGE(0x8101, 0x8101) AM_READ_PORT("IN1") | |
| 633 | AM_RANGE(0x8102, 0x8102) AM_READ_PORT("DSW") | |
| 634 | AM_RANGE(0x8103, 0x8103) AM_WRITENOP //only one 9b at reset | |
| 635 | ADDRESS_MAP_END | |
| 636 | 690 | |
| 637 | static ADDRESS_MAP_START( ozon1_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 638 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 639 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_data_address_w) | |
| 691 | static ADDRESS_MAP_START( tazzmang, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 692 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 693 | AM_RANGE(0x7000, 0x7000) AM_READ_PORT("DSW0") /* mirror */ | |
| 694 | AM_RANGE(0x8000, 0x87ff) AM_RAM | |
| 695 | AM_RANGE(0x8800, 0x883f) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 696 | AM_RANGE(0x8840, 0x885f) AM_RAM AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 697 | AM_RANGE(0x8860, 0x887f) AM_RAM AM_BASE(&galaxold_bulletsram) AM_SIZE(&galaxold_bulletsram_size) | |
| 698 | AM_RANGE(0x8880, 0x8bff) AM_WRITENOP | |
| 699 | AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 700 | AM_RANGE(0x9800, 0x9800) AM_READ(watchdog_reset_r) | |
| 701 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0") | |
| 702 | AM_RANGE(0xa7ff, 0xa7ff) AM_READ_PORT("IN0") /* mirror */ | |
| 703 | AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN1") AM_DEVWRITE(GAL_AUDIO, galaxian_background_enable_w) | |
| 704 | AM_RANGE(0xa803, 0xa803) AM_WRITE(galaxold_coin_counter_w) | |
| 705 | AM_RANGE(0xa805, 0xa805) AM_DEVWRITE(GAL_AUDIO, galaxian_shoot_enable_w) | |
| 706 | AM_RANGE(0xa806, 0xa807) AM_DEVWRITE(GAL_AUDIO, galaxian_vol_w) | |
| 707 | AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW0") | |
| 708 | AM_RANGE(0xb001, 0xb001) AM_WRITE(galaxold_nmi_enable_w) | |
| 709 | AM_RANGE(0xb004, 0xb004) AM_WRITE(galaxold_stars_enable_w) | |
| 710 | AM_RANGE(0xb006, 0xb006) AM_WRITE(galaxold_flip_screen_x_w) | |
| 711 | AM_RANGE(0xb007, 0xb007) AM_WRITE(galaxold_flip_screen_y_w) | |
| 712 | AM_RANGE(0xb800, 0xb800) AM_READ(watchdog_reset_r) AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) | |
| 640 | 713 | ADDRESS_MAP_END |
| 641 | 714 | |
| 642 | static ADDRESS_MAP_START( drivfrcg, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 643 | AM_RANGE(0x0000, 0x0fff) AM_ROM | |
| 644 | AM_RANGE(0x1480, 0x14bf) AM_MIRROR(0x6000) AM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 645 | AM_RANGE(0x14c0, 0x14ff) AM_MIRROR(0x6000) AM_WRITEONLY AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 646 | AM_RANGE(0x1500, 0x1500) AM_MIRROR(0x6000) AM_READ_PORT("IN0") | |
| 647 | AM_RANGE(0x1503, 0x1503) AM_MIRROR(0x6000) AM_WRITE(galaxold_coin_counter_w) | |
| 648 | AM_RANGE(0x1580, 0x1580) AM_MIRROR(0x6000) AM_READ_PORT("IN1") | |
| 649 | AM_RANGE(0x1580, 0x1582) AM_MIRROR(0x6000) AM_DEVWRITE(GAL_AUDIO, galaxian_background_enable_w) | |
| 650 | AM_RANGE(0x1583, 0x1583) AM_MIRROR(0x6000) AM_WRITENOP | |
| 651 | AM_RANGE(0x1585, 0x1585) AM_MIRROR(0x6000) AM_WRITENOP | |
| 652 | AM_RANGE(0x1586, 0x1587) AM_MIRROR(0x6000) AM_DEVWRITE(GAL_AUDIO, galaxian_lfo_freq_w) | |
| 653 | AM_RANGE(0x1600, 0x1600) AM_MIRROR(0x6000) AM_READ_PORT("DSW0") AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) | |
| 654 | AM_RANGE(0x1700, 0x1700) AM_MIRROR(0x6000) AM_READ_PORT("DSW1") AM_WRITENOP | |
| 655 | AM_RANGE(0x1701, 0x1701) AM_MIRROR(0x6000) AM_WRITENOP | |
| 656 | AM_RANGE(0x1704, 0x1707) AM_MIRROR(0x6000) AM_DEVWRITE(GAL_AUDIO, galaxian_vol_w) | |
| 657 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_WRITE(galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 658 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM | |
| 659 | AM_RANGE(0x2000, 0x2fff) AM_ROM | |
| 660 | AM_RANGE(0x4000, 0x4fff) AM_ROM | |
| 661 | AM_RANGE(0x6000, 0x6fff) AM_ROM | |
| 662 | ADDRESS_MAP_END | |
| 663 | 715 | |
| 664 | static ADDRESS_MAP_START( drivfrcg_io, ADDRESS_SPACE_IO, 8 ) | |
| 665 | AM_RANGE(0x00, 0x00) AM_READ(drivfrcg_port0_r) | |
| 666 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") AM_WRITENOP | |
| 667 | ADDRESS_MAP_END | |
| 668 | ||
| 669 | 716 | static ADDRESS_MAP_START( bongo, ADDRESS_SPACE_PROGRAM, 8 ) |
| 670 | 717 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 671 | 718 | AM_RANGE(0x8000, 0x83ff) AM_RAM |
| r7356 | r7357 | |
| 692 | 739 | ADDRESS_MAP_END |
| 693 | 740 | |
| 694 | 741 | |
| 695 | static ADDRESS_MAP_START( hunchbkg, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 696 | AM_RANGE(0x0000, 0x0fff) AM_ROM | |
| 697 | AM_RANGE(0x1480, 0x14bf) AM_MIRROR(0x6000) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 698 | AM_RANGE(0x14c0, 0x14ff) AM_MIRROR(0x6000) AM_WRITEONLY AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 699 | AM_RANGE(0x1500, 0x1500) AM_MIRROR(0x6000) AM_READ_PORT("IN0") | |
| 700 | AM_RANGE(0x1503, 0x1503) AM_MIRROR(0x6000) AM_WRITE(galaxold_coin_counter_w) | |
| 701 | AM_RANGE(0x1580, 0x1580) AM_MIRROR(0x6000) AM_READ_PORT("IN1") | |
| 702 | AM_RANGE(0x1580, 0x1582) AM_MIRROR(0x6000) AM_DEVWRITE(GAL_AUDIO, galaxian_background_enable_w) | |
| 703 | AM_RANGE(0x1583, 0x1583) AM_MIRROR(0x6000) AM_WRITENOP | |
| 704 | AM_RANGE(0x1584, 0x1587) AM_MIRROR(0x6000) AM_DEVWRITE(GAL_AUDIO, galaxian_lfo_freq_w) | |
| 705 | AM_RANGE(0x1600, 0x1600) AM_MIRROR(0x6000) AM_READ_PORT("DSW0") | |
| 706 | AM_RANGE(0x1600, 0x1601) AM_MIRROR(0x6000) AM_WRITENOP | |
| 707 | AM_RANGE(0x1604, 0x1604) AM_MIRROR(0x6000) AM_WRITENOP | |
| 708 | AM_RANGE(0x1606, 0x1606) AM_MIRROR(0x6000) AM_WRITE(galaxold_flip_screen_x_w) | |
| 709 | AM_RANGE(0x1607, 0x1607) AM_MIRROR(0x6000) AM_WRITE(galaxold_flip_screen_y_w) | |
| 710 | AM_RANGE(0x1680, 0x1680) AM_MIRROR(0x6000) AM_READNOP AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) | |
| 711 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_WRITE(galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 712 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM | |
| 713 | AM_RANGE(0x2000, 0x2fff) AM_ROM | |
| 714 | AM_RANGE(0x4000, 0x4fff) AM_ROM | |
| 715 | AM_RANGE(0x6000, 0x6fff) AM_ROM | |
| 742 | static ADDRESS_MAP_START( ozon1_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 743 | AM_RANGE(0x0000, 0x2fff) AM_ROM | |
| 744 | AM_RANGE(0x4000, 0x4200) AM_RAM | |
| 745 | AM_RANGE(0x4300, 0x43ff) AM_RAM | |
| 746 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 747 | AM_RANGE(0x4c00, 0x4fff) AM_WRITE(galaxold_videoram_w) | |
| 748 | AM_RANGE(0x5000, 0x503f) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 749 | AM_RANGE(0x5040, 0x505f) AM_RAM AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 750 | AM_RANGE(0x6801, 0x6801) AM_WRITENOP //continuosly 0 and 1 | |
| 751 | AM_RANGE(0x6802, 0x6802) AM_WRITE(galaxold_coin_counter_w) | |
| 752 | AM_RANGE(0x6806, 0x6806) AM_WRITE(galaxold_flip_screen_x_w) | |
| 753 | AM_RANGE(0x6807, 0x6807) AM_WRITE(galaxold_flip_screen_y_w) | |
| 754 | AM_RANGE(0x8100, 0x8100) AM_READ_PORT("IN0") | |
| 755 | AM_RANGE(0x8101, 0x8101) AM_READ_PORT("IN1") | |
| 756 | AM_RANGE(0x8102, 0x8102) AM_READ_PORT("IN2") | |
| 757 | AM_RANGE(0x8103, 0x8103) AM_WRITENOP //only one 9b at reset | |
| 716 | 758 | ADDRESS_MAP_END |
| 717 | 759 | |
| 718 | ||
| 719 | static ADDRESS_MAP_START( hunchbkg_io, ADDRESS_SPACE_IO, 8 ) | |
| 720 | AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READNOP // not used | |
| 721 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") | |
| 760 | static ADDRESS_MAP_START( ozon1_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 761 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 762 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_data_address_w) | |
| 722 | 763 | ADDRESS_MAP_END |
| 723 | 764 | |
| 765 | ||
| 724 | 766 | static ADDRESS_MAP_START( harem_cpu1, ADDRESS_SPACE_PROGRAM, 8 ) |
| 725 | 767 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 726 | 768 | AM_RANGE(0x2000, 0x27ff) AM_RAM |
| r7356 | r7357 | |
| 754 | 796 | AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) |
| 755 | 797 | ADDRESS_MAP_END |
| 756 | 798 | |
| 757 | static ADDRESS_MAP_START( tazzmang, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 758 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 759 | AM_RANGE(0x7000, 0x7000) AM_READ_PORT("DSW0") /* mirror */ | |
| 760 | AM_RANGE(0x8000, 0x87ff) AM_RAM | |
| 761 | AM_RANGE(0x8800, 0x883f) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 762 | AM_RANGE(0x8840, 0x885f) AM_RAM AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 763 | AM_RANGE(0x8860, 0x887f) AM_RAM AM_BASE(&galaxold_bulletsram) AM_SIZE(&galaxold_bulletsram_size) | |
| 764 | AM_RANGE(0x8880, 0x8bff) AM_WRITENOP | |
| 765 | AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 766 | AM_RANGE(0x9800, 0x9800) AM_READ(watchdog_reset_r) | |
| 767 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0") | |
| 768 | AM_RANGE(0xa7ff, 0xa7ff) AM_READ_PORT("IN0") /* mirror */ | |
| 769 | AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN1") AM_DEVWRITE(GAL_AUDIO, galaxian_background_enable_w) | |
| 770 | AM_RANGE(0xa803, 0xa803) AM_WRITE(galaxold_coin_counter_w) | |
| 771 | AM_RANGE(0xa805, 0xa805) AM_DEVWRITE(GAL_AUDIO, galaxian_shoot_enable_w) | |
| 772 | AM_RANGE(0xa806, 0xa807) AM_DEVWRITE(GAL_AUDIO, galaxian_vol_w) | |
| 773 | AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW0") | |
| 774 | AM_RANGE(0xb001, 0xb001) AM_WRITE(galaxold_nmi_enable_w) | |
| 775 | AM_RANGE(0xb004, 0xb004) AM_WRITE(galaxold_stars_enable_w) | |
| 776 | AM_RANGE(0xb006, 0xb006) AM_WRITE(galaxold_flip_screen_x_w) | |
| 777 | AM_RANGE(0xb007, 0xb007) AM_WRITE(galaxold_flip_screen_y_w) | |
| 778 | AM_RANGE(0xb800, 0xb800) AM_READ(watchdog_reset_r) AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) | |
| 799 | ||
| 800 | static ADDRESS_MAP_START( hunchbkg, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 801 | AM_RANGE(0x0000, 0x0fff) AM_ROM | |
| 802 | AM_RANGE(0x1480, 0x14bf) AM_MIRROR(0x6000) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 803 | AM_RANGE(0x14c0, 0x14ff) AM_MIRROR(0x6000) AM_WRITEONLY AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 804 | AM_RANGE(0x1500, 0x1500) AM_MIRROR(0x6000) AM_READ_PORT("IN0") | |
| 805 | AM_RANGE(0x1503, 0x1503) AM_MIRROR(0x6000) AM_WRITE(galaxold_coin_counter_w) | |
| 806 | AM_RANGE(0x1580, 0x1580) AM_MIRROR(0x6000) AM_READ_PORT("IN1") | |
| 807 | AM_RANGE(0x1580, 0x1582) AM_MIRROR(0x6000) AM_DEVWRITE(GAL_AUDIO, galaxian_background_enable_w) | |
| 808 | AM_RANGE(0x1583, 0x1583) AM_MIRROR(0x6000) AM_WRITENOP | |
| 809 | AM_RANGE(0x1584, 0x1587) AM_MIRROR(0x6000) AM_DEVWRITE(GAL_AUDIO, galaxian_lfo_freq_w) | |
| 810 | AM_RANGE(0x1600, 0x1600) AM_MIRROR(0x6000) AM_READ_PORT("DSW0") | |
| 811 | AM_RANGE(0x1600, 0x1601) AM_MIRROR(0x6000) AM_WRITENOP | |
| 812 | AM_RANGE(0x1604, 0x1604) AM_MIRROR(0x6000) AM_WRITENOP | |
| 813 | AM_RANGE(0x1606, 0x1606) AM_MIRROR(0x6000) AM_WRITE(galaxold_flip_screen_x_w) | |
| 814 | AM_RANGE(0x1607, 0x1607) AM_MIRROR(0x6000) AM_WRITE(galaxold_flip_screen_y_w) | |
| 815 | AM_RANGE(0x1680, 0x1680) AM_MIRROR(0x6000) AM_READNOP AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) | |
| 816 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_WRITE(galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 817 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM | |
| 818 | AM_RANGE(0x2000, 0x2fff) AM_ROM | |
| 819 | AM_RANGE(0x4000, 0x4fff) AM_ROM | |
| 820 | AM_RANGE(0x6000, 0x6fff) AM_ROM | |
| 779 | 821 | ADDRESS_MAP_END |
| 780 | 822 | |
| 823 | static ADDRESS_MAP_START( hunchbkg_io, ADDRESS_SPACE_IO, 8 ) | |
| 824 | AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READNOP // not used | |
| 825 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") | |
| 826 | ADDRESS_MAP_END | |
| 827 | ||
| 828 | ||
| 829 | static ADDRESS_MAP_START( drivfrcg, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 830 | AM_RANGE(0x0000, 0x0fff) AM_ROM | |
| 831 | AM_RANGE(0x1480, 0x14bf) AM_MIRROR(0x6000) AM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 832 | AM_RANGE(0x14c0, 0x14ff) AM_MIRROR(0x6000) AM_WRITEONLY AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 833 | AM_RANGE(0x1500, 0x1500) AM_MIRROR(0x6000) AM_READ_PORT("IN0") | |
| 834 | AM_RANGE(0x1503, 0x1503) AM_MIRROR(0x6000) AM_WRITE(galaxold_coin_counter_w) | |
| 835 | AM_RANGE(0x1580, 0x1580) AM_MIRROR(0x6000) AM_READ_PORT("IN1") | |
| 836 | AM_RANGE(0x1580, 0x1582) AM_MIRROR(0x6000) AM_DEVWRITE(GAL_AUDIO, galaxian_background_enable_w) | |
| 837 | AM_RANGE(0x1583, 0x1583) AM_MIRROR(0x6000) AM_WRITENOP | |
| 838 | AM_RANGE(0x1585, 0x1585) AM_MIRROR(0x6000) AM_WRITENOP | |
| 839 | AM_RANGE(0x1586, 0x1587) AM_MIRROR(0x6000) AM_DEVWRITE(GAL_AUDIO, galaxian_lfo_freq_w) | |
| 840 | AM_RANGE(0x1600, 0x1600) AM_MIRROR(0x6000) AM_READ_PORT("DSW0") AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) | |
| 841 | AM_RANGE(0x1700, 0x1700) AM_MIRROR(0x6000) AM_READ_PORT("DSW1") AM_WRITENOP | |
| 842 | AM_RANGE(0x1701, 0x1701) AM_MIRROR(0x6000) AM_WRITENOP | |
| 843 | AM_RANGE(0x1704, 0x1707) AM_MIRROR(0x6000) AM_DEVWRITE(GAL_AUDIO, galaxian_vol_w) | |
| 844 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_WRITE(galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 845 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM | |
| 846 | AM_RANGE(0x2000, 0x2fff) AM_ROM | |
| 847 | AM_RANGE(0x4000, 0x4fff) AM_ROM | |
| 848 | AM_RANGE(0x6000, 0x6fff) AM_ROM | |
| 849 | ADDRESS_MAP_END | |
| 850 | ||
| 851 | static ADDRESS_MAP_START( drivfrcg_io, ADDRESS_SPACE_IO, 8 ) | |
| 852 | AM_RANGE(0x00, 0x00) AM_READ(drivfrcg_port0_r) | |
| 853 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") AM_WRITENOP | |
| 854 | ADDRESS_MAP_END | |
| 855 | ||
| 856 | ||
| 781 | 857 | static ADDRESS_MAP_START( racknrol, ADDRESS_SPACE_PROGRAM, 8 ) |
| 782 | 858 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 783 | 859 | AM_RANGE(0x1400, 0x143f) AM_MIRROR(0x6000) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) |
| r7356 | r7357 | |
| 807 | 883 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") |
| 808 | 884 | ADDRESS_MAP_END |
| 809 | 885 | |
| 810 | static ADDRESS_MAP_START( ckongg_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 811 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 812 | AM_RANGE(0x6000, 0x6fff) AM_RAM | |
| 813 | AM_RANGE(0x9000, 0x93ff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 814 | AM_RANGE(0x9800, 0x983f) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 815 | AM_RANGE(0x9840, 0x985f) AM_RAM AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 816 | AM_RANGE(0x9860, 0x987f) AM_RAM AM_BASE(&galaxold_bulletsram) AM_SIZE(&galaxold_bulletsram_size) | |
| 817 | AM_RANGE(0x9880, 0x98ff) AM_RAM | |
| 818 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN0") | |
| 819 | AM_RANGE(0xc000, 0xc001) AM_WRITE(galaxold_leds_w) | |
| 820 | AM_RANGE(0xc002, 0xc002) AM_WRITE(galaxold_coin_lockout_w) | |
| 821 | AM_RANGE(0xc003, 0xc003) AM_WRITE(galaxold_coin_counter_w) | |
| 822 | AM_RANGE(0xc004, 0xc007) AM_DEVWRITE(GAL_AUDIO, galaxian_lfo_freq_w) | |
| 823 | AM_RANGE(0xc400, 0xc400) AM_READ_PORT("IN1") | |
| 824 | AM_RANGE(0xc400, 0xc402) AM_DEVWRITE(GAL_AUDIO, galaxian_background_enable_w) | |
| 825 | AM_RANGE(0xc403, 0xc403) AM_DEVWRITE(GAL_AUDIO, galaxian_noise_enable_w) | |
| 826 | AM_RANGE(0xc405, 0xc405) AM_DEVWRITE(GAL_AUDIO, galaxian_shoot_enable_w) | |
| 827 | AM_RANGE(0xc406, 0xc407) AM_DEVWRITE(GAL_AUDIO, galaxian_vol_w) | |
| 828 | AM_RANGE(0xc800, 0xc800) AM_READ_PORT("DSW0") | |
| 829 | AM_RANGE(0xc801, 0xc801) AM_WRITE(galaxold_nmi_enable_w) | |
| 830 | AM_RANGE(0xc804, 0xc804) AM_WRITENOP // link cut | |
| 831 | AM_RANGE(0xc806, 0xc806) AM_WRITE(galaxold_flip_screen_x_w) | |
| 832 | AM_RANGE(0xc807, 0xc807) AM_WRITE(galaxold_flip_screen_y_w) | |
| 833 | AM_RANGE(0xcc00, 0xcc00) AM_READ(watchdog_reset_r) AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) | |
| 834 | ADDRESS_MAP_END | |
| 835 | ||
| 836 | /* Memory map based on mooncrst_map according to Z80 code - seems to be good but needs further checking */ | |
| 837 | static ADDRESS_MAP_START( ckongmc_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 838 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 839 | AM_RANGE(0x6000, 0x6fff) AM_RAM | |
| 840 | AM_RANGE(0x9000, 0x93ff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_BASE(&galaxold_videoram) | |
| 841 | AM_RANGE(0x9800, 0x983f) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) | |
| 842 | AM_RANGE(0x9840, 0x985f) AM_RAM AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) | |
| 843 | AM_RANGE(0x9860, 0x987f) AM_RAM AM_BASE(&galaxold_bulletsram) AM_SIZE(&galaxold_bulletsram_size) | |
| 844 | AM_RANGE(0x9880, 0x98ff) AM_RAM | |
| 845 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0") | |
| 846 | AM_RANGE(0xa001, 0xa002) AM_WRITE(galaxold_leds_w) /* GUESS */ | |
| 847 | // AM_RANGE(0xa002, 0xa002) AM_WRITE(galaxold_coin_lockout_w) /* not written */ | |
| 848 | // AM_RANGE(0xa003, 0xa003) AM_WRITE(galaxold_coin_counter_w) /* not written */ | |
| 849 | AM_RANGE(0xa004, 0xa007) AM_DEVWRITE(GAL_AUDIO, galaxian_lfo_freq_w) /* GUESS */ | |
| 850 | AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN1") | |
| 851 | AM_RANGE(0xa800, 0xa802) AM_DEVWRITE(GAL_AUDIO, galaxian_background_enable_w) /* GUESS */ | |
| 852 | AM_RANGE(0xa803, 0xa803) AM_DEVWRITE(GAL_AUDIO, galaxian_noise_enable_w) /* GUESS */ | |
| 853 | AM_RANGE(0xa805, 0xa805) AM_DEVWRITE(GAL_AUDIO, galaxian_shoot_enable_w) /* GUESS */ | |
| 854 | AM_RANGE(0xa806, 0xa807) AM_DEVWRITE(GAL_AUDIO, galaxian_vol_w) /* GUESS */ | |
| 855 | AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW0") | |
| 856 | AM_RANGE(0xb001, 0xb001) AM_WRITE(galaxold_nmi_enable_w) | |
| 857 | AM_RANGE(0xb004, 0xb004) AM_WRITENOP /* AM_WRITE(galaxold_stars_enable_w) */ | |
| 858 | AM_RANGE(0xb006, 0xb006) AM_WRITE(galaxold_flip_screen_x_w) /* GUESS */ | |
| 859 | AM_RANGE(0xb007, 0xb007) AM_WRITE(galaxold_flip_screen_y_w) /* GUESS */ | |
| 860 | AM_RANGE(0xb800, 0xb800) AM_READ(watchdog_reset_r) AM_DEVWRITE(GAL_AUDIO, galaxian_pitch_w) /* GUESS */ | |
| 861 | ADDRESS_MAP_END | |
| 862 | ||
| 863 | 886 | static READ8_HANDLER( hexpoola_data_port_r ) |
| 864 | 887 | { |
| 865 | 888 | switch (cpu_get_pc(space->cpu)) |
| r7356 | r7357 | |
| 882 | 905 | ADDRESS_MAP_END |
| 883 | 906 | |
| 884 | 907 | |
| 885 | static INPUT_PORTS_START( scramblb ) | |
| 908 | /* Lives Dips are spread accross two input ports */ | |
| 909 | static CUSTOM_INPUT( vpool_lives_r ) | |
| 910 | { | |
| 911 | int bit_mask = (FPTR)param; | |
| 912 | ||
| 913 | switch (bit_mask) | |
| 914 | { | |
| 915 | case 0x40: /* vpool : IN1 (0xa800) bit 6 */ | |
| 916 | return ((input_port_read(field->port->machine, "LIVES") & bit_mask) >> 6); | |
| 917 | case 0x01: /* vpool : DSW (0xb000) bit 0 */ | |
| 918 | return ((input_port_read(field->port->machine, "LIVES") & bit_mask) >> 0); | |
| 919 | ||
| 920 | default: | |
| 921 | logerror("vpool_lives_r : invalid %02X bit_mask\n",bit_mask); | |
| 922 | return 0; | |
| 923 | } | |
| 924 | } | |
| 925 | ||
| 926 | /* verified from Z80 code */ | |
| 927 | static INPUT_PORTS_START( vpool ) | |
| 886 | 928 | PORT_START("IN0") |
| 887 | 929 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 888 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 889 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 890 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 930 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 931 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 932 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 891 | 933 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 892 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 893 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 894 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 934 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 935 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 936 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) /* uses same coinage as COIN1 and COIN2 */ | |
| 895 | 937 | |
| 896 | 938 | PORT_START("IN1") |
| 897 | 939 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 898 | 940 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 899 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 900 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 941 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 942 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 901 | 943 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 902 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 944 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 945 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vpool_lives_r, (void *)0x40) | |
| 946 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 947 | ||
| 948 | PORT_START("DSW0") | |
| 949 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vpool_lives_r, (void *)0x01) | |
| 950 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) | |
| 951 | PORT_DIPSETTING( 0x02, DEF_STR( Upright ) ) | |
| 952 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 953 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coinage ) ) | |
| 954 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 955 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) | |
| 956 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) | |
| 957 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) | |
| 958 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 959 | ||
| 960 | PORT_START("LIVES") | |
| 961 | PORT_DIPNAME( 0x41, 0x01, DEF_STR( Lives ) ) | |
| 962 | PORT_DIPSETTING( 0x41, "1" ) | |
| 963 | PORT_DIPSETTING( 0x40, "2" ) | |
| 964 | PORT_DIPSETTING( 0x01, "3" ) | |
| 965 | PORT_DIPSETTING( 0x00, "Infinite (Cheat)" ) /* also gives 99 credits after coin insertion regardless of coinage */ | |
| 966 | INPUT_PORTS_END | |
| 967 | ||
| 968 | ||
| 969 | /* verified from Z80 code */ | |
| 970 | static INPUT_PORTS_START( rockclim ) | |
| 971 | PORT_START("IN0") | |
| 972 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) /* only adds 1 credit if "Coin Slots" is set to 1 */ | |
| 973 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) | |
| 974 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY | |
| 975 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY | |
| 976 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY | |
| 977 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY | |
| 903 | 978 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) |
| 979 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 980 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) | |
| 981 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 982 | ||
| 983 | PORT_START("IN1") | |
| 984 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 985 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 986 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY | |
| 987 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY | |
| 988 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY | |
| 989 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY | |
| 990 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Bonus_Life ) ) | |
| 991 | PORT_DIPSETTING( 0x00, "30000" ) | |
| 992 | PORT_DIPSETTING( 0x40, "50000" ) | |
| 993 | PORT_DIPNAME( 0x80, 0x00, "Coin Slots" ) | |
| 994 | PORT_DIPSETTING( 0x80, "1" ) | |
| 995 | PORT_DIPSETTING( 0x00, "2" ) | |
| 996 | ||
| 997 | PORT_START("IN2") | |
| 998 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 999 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1000 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1001 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1002 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1003 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1004 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1005 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1006 | ||
| 1007 | PORT_START("DSW0") | |
| 1008 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 1009 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1010 | PORT_DIPSETTING( 0x01, "4" ) | |
| 1011 | PORT_DIPSETTING( 0x02, "5" ) | |
| 1012 | PORT_DIPSETTING( 0x03, "6" ) | |
| 1013 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1014 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_TILT ) | |
| 1015 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1016 | ||
| 1017 | PORT_START("DSW1") | |
| 1018 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) | |
| 1019 | PORT_DIPSETTING( 0x00, DEF_STR( 9C_1C ) ) | |
| 1020 | PORT_DIPSETTING( 0x01, DEF_STR( 8C_1C ) ) | |
| 1021 | PORT_DIPSETTING( 0x02, DEF_STR( 7C_1C ) ) | |
| 1022 | PORT_DIPSETTING( 0x03, DEF_STR( 6C_1C ) ) | |
| 1023 | PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) ) | |
| 1024 | PORT_DIPSETTING( 0x05, DEF_STR( 4C_1C ) ) | |
| 1025 | PORT_DIPSETTING( 0x06, DEF_STR( 3C_1C ) ) | |
| 1026 | PORT_DIPSETTING( 0x07, DEF_STR( 2C_1C ) ) | |
| 1027 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 1028 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 1029 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 1030 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 1031 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 1032 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 1033 | PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) | |
| 1034 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_8C ) ) | |
| 1035 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) | |
| 1036 | PORT_DIPSETTING( 0x00, DEF_STR( 9C_1C ) ) | |
| 1037 | PORT_DIPSETTING( 0x10, DEF_STR( 8C_1C ) ) | |
| 1038 | PORT_DIPSETTING( 0x20, DEF_STR( 7C_1C ) ) | |
| 1039 | PORT_DIPSETTING( 0x30, DEF_STR( 6C_1C ) ) | |
| 1040 | PORT_DIPSETTING( 0x40, DEF_STR( 5C_1C ) ) | |
| 1041 | PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) | |
| 1042 | PORT_DIPSETTING( 0x60, DEF_STR( 3C_1C ) ) | |
| 1043 | PORT_DIPSETTING( 0x70, DEF_STR( 2C_1C ) ) | |
| 1044 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 1045 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 1046 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 1047 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 1048 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 1049 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 1050 | PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) | |
| 1051 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_8C ) ) | |
| 1052 | INPUT_PORTS_END | |
| 1053 | ||
| 1054 | ||
| 1055 | /* Coinage Dips are spread accross two input ports */ | |
| 1056 | static CUSTOM_INPUT( ckongg_coinage_r ) | |
| 1057 | { | |
| 1058 | int bit_mask = (FPTR)param; | |
| 1059 | ||
| 1060 | switch (bit_mask) | |
| 1061 | { | |
| 1062 | case 0x0c: /* ckongg : DSW (0xc800) bits 2 and 3 */ | |
| 1063 | return ((input_port_read(field->port->machine, "COINAGE") & bit_mask) >> 2); | |
| 1064 | case 0x40: /* ckongg : IN1 (0xc400) bit 6 */ | |
| 1065 | return ((input_port_read(field->port->machine, "COINAGE") & bit_mask) >> 6); | |
| 1066 | ||
| 1067 | case 0xc0: /* ckongmc : IN1 (0xa800) bits 6 and 7 */ | |
| 1068 | return ((input_port_read(field->port->machine, "COINAGE") & bit_mask) >> 6); | |
| 1069 | case 0x01: /* ckongmc : DSW (0xb000) bit 0 */ | |
| 1070 | return ((input_port_read(field->port->machine, "COINAGE") & bit_mask) >> 0); | |
| 1071 | ||
| 1072 | default: | |
| 1073 | logerror("ckongg_coinage_r : invalid %02X bit_mask\n",bit_mask); | |
| 1074 | return 0; | |
| 1075 | } | |
| 1076 | } | |
| 1077 | ||
| 1078 | /* verified from Z80 code */ | |
| 1079 | static INPUT_PORTS_START( ckongg ) | |
| 1080 | PORT_START("IN0") | |
| 1081 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1082 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1083 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 1084 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 1085 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 1086 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 1087 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1088 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1089 | ||
| 1090 | PORT_START("IN1") | |
| 1091 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1092 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1093 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 1094 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 1095 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 1096 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 1097 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0x40) | |
| 1098 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) | |
| 1099 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) | |
| 1100 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 1101 | ||
| 1102 | PORT_START("DSW") | |
| 1103 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 1104 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1105 | PORT_DIPSETTING( 0x01, "4" ) | |
| 1106 | PORT_DIPSETTING( 0x02, "5" ) | |
| 1107 | PORT_DIPSETTING( 0x03, "6" ) | |
| 1108 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0x0c) | |
| 1109 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1110 | ||
| 1111 | PORT_START("COINAGE") | |
| 1112 | PORT_DIPNAME( 0x4c, 0x00, DEF_STR( Coinage ) ) | |
| 1113 | PORT_DIPSETTING( 0x4c, DEF_STR( 5C_1C ) ) | |
| 1114 | PORT_DIPSETTING( 0x44, DEF_STR( 4C_1C ) ) | |
| 1115 | PORT_DIPSETTING( 0x0c, DEF_STR( 3C_1C ) ) | |
| 1116 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) | |
| 1117 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1118 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) | |
| 1119 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 1120 | PORT_DIPSETTING( 0x48, DEF_STR( 1C_4C ) ) | |
| 1121 | INPUT_PORTS_END | |
| 1122 | ||
| 1123 | /* verified from Z80 code */ | |
| 1124 | static INPUT_PORTS_START( ckongmc ) | |
| 1125 | PORT_START("IN0") | |
| 1126 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1127 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1128 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 1129 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 1130 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 1131 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1132 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 1133 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 1134 | ||
| 1135 | PORT_START("IN1") | |
| 1136 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) /* also START1 : code at 0x5064 for BUTTON1 and 0x514d for START1 */ | |
| 1137 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1138 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 1139 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 1140 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 1141 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1142 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0xc0) | |
| 1143 | ||
| 1144 | PORT_START("DSW") | |
| 1145 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0x01) | |
| 1146 | PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) ) | |
| 1147 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1148 | PORT_DIPSETTING( 0x02, "4" ) | |
| 1149 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1150 | PORT_DIPSETTING( 0x06, "6" ) | |
| 1151 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) | |
| 1152 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) | |
| 1153 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 1154 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1155 | ||
| 1156 | PORT_START("COINAGE") | |
| 1157 | PORT_DIPNAME( 0xc1, 0x00, DEF_STR( Coinage ) ) | |
| 1158 | PORT_DIPSETTING( 0xc1, DEF_STR( 5C_1C ) ) | |
| 1159 | PORT_DIPSETTING( 0x41, DEF_STR( 4C_1C ) ) | |
| 1160 | PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) ) | |
| 1161 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) | |
| 1162 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1163 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) | |
| 1164 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) | |
| 1165 | PORT_DIPSETTING( 0x81, DEF_STR( 1C_4C ) ) | |
| 1166 | INPUT_PORTS_END | |
| 1167 | ||
| 1168 | ||
| 1169 | /* verified from Z80 code */ | |
| 1170 | static INPUT_PORTS_START( scramblb ) | |
| 1171 | PORT_START("IN0") | |
| 1172 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1173 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1174 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1175 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1176 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1177 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1178 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1179 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1180 | ||
| 1181 | PORT_START("IN1") | |
| 1182 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1183 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1184 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1185 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1186 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1187 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1188 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) | |
| 904 | 1189 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 905 | 1190 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) |
| 906 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_ | |
| 1191 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_P | |
| 907 | 1192 | |
| 908 | 1193 | PORT_START("IN2") |
| 909 | 1194 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) |
| r7356 | r7357 | |
| 919 | 1204 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 920 | 1205 | INPUT_PORTS_END |
| 921 | 1206 | |
| 922 | ||
| 923 | /* the cocktail controls only seem to be used in upright mode, is the flip flag wrong for this bootleg? */ | |
| 1207 | /* verified from Z80 code */ | |
| 924 | 1208 | static INPUT_PORTS_START( scramb2 ) |
| 925 | 1209 | PORT_START("IN0") |
| 926 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 927 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 928 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 929 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 930 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 931 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 932 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 933 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 934 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1210 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1211 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1212 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses same coinage as COIN1 */ | |
| 1213 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1214 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1215 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1216 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 935 | 1217 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 936 | 1218 | |
| 937 | 1219 | PORT_START("IN1") |
| r7356 | r7357 | |
| 940 | 1222 | PORT_DIPSETTING( 0x01, "4" ) |
| 941 | 1223 | PORT_DIPSETTING( 0x02, "5" ) |
| 942 | 1224 | PORT_DIPSETTING( 0x03, "255 (Cheat)") |
| 943 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 944 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 945 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 946 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1225 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1226 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1227 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1228 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 947 | 1229 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 948 | 1230 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 949 | 1231 | |
| 950 | 1232 | PORT_START("IN2") |
| 951 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_ | |
| 1233 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_P | |
| 952 | 1234 | PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) ) |
| 953 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 954 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) | |
| 955 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) | |
| 956 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_4C ) ) | |
| 1235 | PORT_DIPSETTING( 0x00, "A 1/1 B 2/1" ) | |
| 1236 | PORT_DIPSETTING( 0x02, "A 1/2 B 1/1" ) | |
| 1237 | PORT_DIPSETTING( 0x04, "A 1/3 B 3/1" ) | |
| 1238 | PORT_DIPSETTING( 0x06, "A 1/4 B 4/1" ) | |
| 957 | 1239 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) |
| 958 | 1240 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 959 | 1241 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) |
| 960 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 961 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 962 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 963 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 964 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 965 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 966 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 967 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1242 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1243 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1244 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1245 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 968 | 1246 | INPUT_PORTS_END |
| 969 | 1247 | |
| 1248 | ||
| 970 | 1249 | static INPUT_PORTS_START( 4in1 ) |
| 971 | 1250 | PORT_START("IN0") |
| 972 | 1251 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| r7356 | r7357 | |
| 1092 | 1371 | PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play ) ) |
| 1093 | 1372 | INPUT_PORTS_END |
| 1094 | 1373 | |
| 1374 | ||
| 1375 | /* verified from Z80 code */ | |
| 1095 | 1376 | static INPUT_PORTS_START( bagmanmc ) |
| 1096 | 1377 | PORT_START("IN0") |
| 1097 | 1378 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 1098 | 1379 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 1099 | 1380 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 1100 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1381 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1101 | 1382 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 1102 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1103 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1383 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1384 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1104 | 1385 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 1105 | 1386 | |
| 1106 | 1387 | PORT_START("IN1") |
| 1107 | 1388 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START2 ) |
| 1108 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1389 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1109 | 1390 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 1110 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1111 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1391 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1392 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1112 | 1393 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1113 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1394 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* stored to 0x6163 bit 4 but not tested */ | |
| 1114 | 1395 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) |
| 1115 | 1396 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) |
| 1116 | 1397 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r7356 | r7357 | |
| 1132 | 1413 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Language ) ) |
| 1133 | 1414 | PORT_DIPSETTING( 0x20, DEF_STR( English ) ) |
| 1134 | 1415 | PORT_DIPSETTING( 0x00, DEF_STR( French ) ) |
| 1135 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Bonus_Life ) ) | |
| 1136 | PORT_DIPSETTING( 0x40, "30000" ) | |
| 1137 | PORT_DIPSETTING( 0x00, "40000" ) | |
| 1138 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) // Check code at 0x2d78 and 0x2e6b | |
| 1139 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1140 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1416 | PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) /* see notes */ | |
| 1417 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) /* check code at 0x2d78 and 0x2e6b - affect initials entry */ | |
| 1418 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1419 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1141 | 1420 | INPUT_PORTS_END |
| 1142 | 1421 | |
| 1422 | ||
| 1423 | /* Coinage Dips are spread accross two input ports */ | |
| 1424 | static CUSTOM_INPUT( dkongjrm_coinage_r ) | |
| 1425 | { | |
| 1426 | int bit_mask = (FPTR)param; | |
| 1427 | ||
| 1428 | switch (bit_mask) | |
| 1429 | { | |
| 1430 | case 0xc0: /* dkongjrm : IN1 (0xa8??) bits 6 and 7 */ | |
| 1431 | return ((input_port_read(field->port->machine, "COINAGE") & bit_mask) >> 6); | |
| 1432 | case 0x01: /* dkongjrm : DSW (0xb0??) bit 0 */ | |
| 1433 | return ((input_port_read(field->port->machine, "COINAGE") & bit_mask) >> 0); | |
| 1434 | ||
| 1435 | default: | |
| 1436 | logerror("dkongjrm_coinage_r : invalid %02X bit_mask\n",bit_mask); | |
| 1437 | return 0; | |
| 1438 | } | |
| 1439 | } | |
| 1440 | ||
| 1441 | /* verified from Z80 code */ | |
| 1143 | 1442 | static INPUT_PORTS_START( dkongjrm ) |
| 1144 | 1443 | PORT_START("IN0") |
| 1145 | 1444 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 1146 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1147 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 1445 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1446 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 1148 | 1447 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1149 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 1448 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 1150 | 1449 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 1151 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 1152 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 1450 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 1451 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 1153 | 1452 | |
| 1154 | 1453 | PORT_START("IN1") |
| 1155 | 1454 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 1156 | 1455 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 1157 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 1456 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 1158 | 1457 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 1159 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 1458 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 1160 | 1459 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1161 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coinage ) ) | |
| 1162 | PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) ) | |
| 1163 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) | |
| 1164 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1165 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) | |
| 1460 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dkongjrm_coinage_r, (void *)0xc0) | |
| 1166 | 1461 | |
| 1167 | PORT_START("IN2") | |
| 1168 | PORT_DIPNAME( 0x01, 0x00, "Coin Multiplier" ) | |
| 1169 | PORT_DIPSETTING( 0x00, "*1" ) | |
| 1170 | PORT_DIPSETTING( 0x01, "*2" ) | |
| 1462 | PORT_START("DSW") | |
| 1463 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dkongjrm_coinage_r, (void *)0x01) | |
| 1171 | 1464 | PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) ) |
| 1172 | 1465 | PORT_DIPSETTING( 0x00, "3" ) |
| 1173 | 1466 | PORT_DIPSETTING( 0x02, "4" ) |
| r7356 | r7357 | |
| 1177 | 1470 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) |
| 1178 | 1471 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 1179 | 1472 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1473 | ||
| 1474 | PORT_START("COINAGE") | |
| 1475 | PORT_DIPNAME( 0xc1, 0x00, DEF_STR( Coinage ) ) | |
| 1476 | PORT_DIPSETTING( 0xc1, DEF_STR( 5C_1C ) ) | |
| 1477 | PORT_DIPSETTING( 0x41, DEF_STR( 4C_1C ) ) | |
| 1478 | PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) ) | |
| 1479 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) | |
| 1480 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1481 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) | |
| 1482 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) | |
| 1483 | PORT_DIPSETTING( 0x81, DEF_STR( 1C_4C ) ) | |
| 1180 | 1484 | INPUT_PORTS_END |
| 1181 | 1485 | |
| 1182 | static INPUT_PORTS_START( rockclim ) | |
| 1183 | 1486 | |
| 1487 | /* verified from Z80 code */ | |
| 1488 | static INPUT_PORTS_START( porter ) | |
| 1184 | 1489 | PORT_START("IN0") |
| 1185 | 1490 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 1186 | 1491 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 1187 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY | |
| 1188 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY | |
| 1189 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY | |
| 1190 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY | |
| 1191 | PORT_DIPNAME( 0x40, 0x40, "Unknown 1" ) //code at $7713 | |
| 1192 | PORT_DIPSETTING( 0x00, "0" ) | |
| 1193 | PORT_DIPSETTING( 0x40, "1" ) | |
| 1492 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1493 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1494 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1495 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL /* see notes */ | |
| 1496 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1497 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1194 | 1498 | |
| 1195 | 1499 | PORT_START("IN1") |
| 1500 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) /* also START1 - see notes */ | |
| 1501 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) /* also START2 - see notes */ | |
| 1502 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1503 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1504 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1505 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL /* see notes */ | |
| 1506 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Coinage ) ) | |
| 1507 | PORT_DIPSETTING( 0x00, "10000 only" ) | |
| 1508 | PORT_DIPSETTING( 0x40, "30000 only" ) | |
| 1509 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) | |
| 1510 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1511 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) | |
| 1512 | ||
| 1513 | PORT_START("DSW0") | |
| 1514 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coinage ) ) | |
| 1515 | PORT_DIPSETTING( 0x00, "A 2C/1C B 1C/3C" ) | |
| 1516 | PORT_DIPSETTING( 0x01, "A 1C/1C B 1C/6C" ) | |
| 1517 | PORT_DIPUNUSED( 0x02, IP_ACTIVE_LOW ) /* stored to 0x8021 bit 1 but not tested */ | |
| 1518 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) ) | |
| 1519 | PORT_DIPSETTING( 0x00, "2" ) | |
| 1520 | PORT_DIPSETTING( 0x04, "3" ) | |
| 1521 | PORT_DIPSETTING( 0x08, "4" ) | |
| 1522 | PORT_DIPSETTING( 0x0c, "5" ) | |
| 1523 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1524 | INPUT_PORTS_END | |
| 1525 | ||
| 1526 | ||
| 1527 | /* verified from Z80 code */ | |
| 1528 | static INPUT_PORTS_START( tazzmang ) | |
| 1529 | PORT_START("IN0") | |
| 1530 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1531 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1532 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1533 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1534 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1535 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1536 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1537 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1538 | ||
| 1539 | PORT_START("IN1") | |
| 1540 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start 1 / P1 and P2 Button 2") | |
| 1541 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1542 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1543 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1544 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1545 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1546 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 1547 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1548 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1549 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Lives ) ) | |
| 1550 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1551 | PORT_DIPSETTING( 0x80, "5" ) | |
| 1552 | ||
| 1553 | PORT_START("DSW0") | |
| 1554 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1555 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1556 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1557 | PORT_DIPNAME( 0x06, 0x04, DEF_STR( Coinage ) ) | |
| 1558 | PORT_DIPSETTING( 0x00, "A 4C/1C B 1C/4C" ) | |
| 1559 | PORT_DIPSETTING( 0x02, "A 3C/1C B 1C/3C" ) | |
| 1560 | PORT_DIPSETTING( 0x06, "A 2C/1C B 1C/2C" ) | |
| 1561 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_1C ) ) | |
| 1562 | PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) | |
| 1563 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1564 | INPUT_PORTS_END | |
| 1565 | ||
| 1566 | ||
| 1567 | /* verified from Z80 code */ | |
| 1568 | static INPUT_PORTS_START( bongo ) | |
| 1569 | PORT_START("IN0") | |
| 1570 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1571 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* see notes */ | |
| 1572 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) | |
| 1573 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) | |
| 1574 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) /* see notes */ | |
| 1575 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) | |
| 1576 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) /* see notes */ | |
| 1577 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) /* see notes */ | |
| 1578 | ||
| 1579 | PORT_START("IN1") | |
| 1196 | 1580 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 1197 | 1581 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 1198 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY | |
| 1199 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY | |
| 1200 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY | |
| 1201 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY | |
| 1202 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Bonus_Life ) ) | |
| 1203 | PORT_DIPSETTING( 0x00, "30,000" ) | |
| 1204 | PORT_DIPSETTING( 0x40, "50,000" ) | |
| 1205 | PORT_DIPNAME( 0x80, 0x80, "Coin Slots" ) | |
| 1206 | PORT_DIPSETTING( 0x00, "2" ) | |
| 1207 | PORT_DIPSETTING( 0x80, "1" ) | |
| 1582 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL | |
| 1583 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL | |
| 1584 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) /* see notes */ | |
| 1585 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL | |
| 1586 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1587 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1208 | 1588 | |
| 1209 | 1589 | PORT_START("DSW0") |
| 1210 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 1211 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1212 | PORT_DIPSETTING( 0x01, "4" ) | |
| 1213 | PORT_DIPSETTING( 0x02, "5" ) | |
| 1214 | PORT_DIPSETTING( 0x03, "6" ) | |
| 1590 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) /* see notes */ | |
| 1215 | 1591 | |
| 1216 | 1592 | PORT_START("DSW1") |
| 1217 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) | |
| 1218 | PORT_DIPSETTING( 0x00, DEF_STR( 9C_1C ) ) | |
| 1219 | PORT_DIPSETTING( 0x01, DEF_STR( 8C_1C ) ) | |
| 1220 | PORT_DIPSETTING( 0x02, DEF_STR( 7C_1C ) ) | |
| 1221 | PORT_DIPSETTING( 0x03, DEF_STR( 6C_1C ) ) | |
| 1222 | PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) ) | |
| 1223 | PORT_DIPSETTING( 0x05, DEF_STR( 4C_1C ) ) | |
| 1224 | PORT_DIPSETTING( 0x06, DEF_STR( 3C_1C ) ) | |
| 1225 | PORT_DIPSETTING( 0x07, DEF_STR( 2C_1C ) ) | |
| 1226 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 1227 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 1228 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 1229 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 1230 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 1231 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 1232 | PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) | |
| 1233 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_8C ) ) | |
| 1234 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) | |
| 1235 | PORT_DIPSETTING( 0x00, DEF_STR( 9C_1C ) ) | |
| 1236 | PORT_DIPSETTING( 0x10, DEF_STR( 8C_1C ) ) | |
| 1237 | PORT_DIPSETTING( 0x20, DEF_STR( 7C_1C ) ) | |
| 1238 | PORT_DIPSETTING( 0x30, DEF_STR( 6C_1C ) ) | |
| 1239 | PORT_DIPSETTING( 0x40, DEF_STR( 5C_1C ) ) | |
| 1240 | PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) | |
| 1241 | PORT_DIPSETTING( 0x60, DEF_STR( 3C_1C ) ) | |
| 1242 | PORT_DIPSETTING( 0x70, DEF_STR( 2C_1C ) ) | |
| 1243 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 1244 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 1245 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 1246 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 1247 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 1248 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 1249 | PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) | |
| 1250 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_8C ) ) | |
| 1593 | PORT_DIPUNUSED( 0x01, IP_ACTIVE_HIGH ) | |
| 1594 | PORT_DIPNAME( 0x06, 0x02, DEF_STR( Lives ) ) | |
| 1595 | PORT_DIPSETTING( 0x00, "2" ) | |
| 1596 | PORT_DIPSETTING( 0x02, "3" ) | |
| 1597 | PORT_DIPSETTING( 0x04, "4" ) | |
| 1598 | PORT_DIPSETTING( 0x06, "5" ) | |
| 1599 | PORT_DIPNAME( 0x08, 0x00, "Infinite Lives (Cheat)" ) /* always gives 3 lives */ | |
| 1600 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1601 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1602 | PORT_DIPUNUSED( 0x10, IP_ACTIVE_HIGH ) | |
| 1603 | PORT_DIPUNUSED( 0x20, IP_ACTIVE_HIGH ) | |
| 1604 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coinage ) ) | |
| 1605 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) /* also 1C_3C for Coin B if it existed */ | |
| 1606 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) /* also 1C_6C for Coin B if it existed */ | |
| 1607 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) | |
| 1608 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1609 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) | |
| 1251 | 1610 | INPUT_PORTS_END |
| 1252 | 1611 | |
| 1253 | /* | |
| 1254 | 1612 | |
| 1255 | Game bug: | |
| 1256 | - you can insert 99 credits 3 times consecutively, then it resets | |
| 1257 | ||
| 1258 | */ | |
| 1613 | /* verified from Z80 code */ | |
| 1259 | 1614 | static INPUT_PORTS_START( ozon1 ) |
| 1260 | 1615 | PORT_START("IN0") |
| 1261 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1262 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1263 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1616 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1617 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1618 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1264 | 1619 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 1265 | 1620 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) |
| 1266 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) | |
| 1621 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) | |
| 1267 | 1622 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1268 | 1623 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1269 | 1624 | |
| 1270 | 1625 | PORT_START("IN1") |
| 1271 | PORT_DIPNAME( 0x03, 0x0 | |
| 1626 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 1272 | 1627 | PORT_DIPSETTING( 0x00, "3" ) |
| 1273 | 1628 | PORT_DIPSETTING( 0x01, "4" ) |
| 1274 | 1629 | PORT_DIPSETTING( 0x02, "5" ) |
| 1275 | 1630 | PORT_DIPSETTING( 0x03, "6" ) |
| 1276 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UN | |
| 1631 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED | |
| 1277 | 1632 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 1278 | 1633 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) |
| 1279 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) | |
| 1634 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) | |
| 1280 | 1635 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 1281 | 1636 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 1282 | 1637 | |
| 1283 | PORT_START("DSW") | |
| 1284 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1285 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1286 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1638 | PORT_START("IN2") | |
| 1639 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1287 | 1640 | PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) ) |
| 1288 | 1641 | PORT_DIPSETTING( 0x00, "A 1C/1C B 2C/1C" ) |
| 1289 | PORT_DIPSETTING( 0x02, "A 1C/2C B 1C/1C" ) | |
| 1642 | PORT_DIPSETTING( 0x02, "A 1C/2C B 1C/1C" ) | |
| 1290 | 1643 | PORT_DIPSETTING( 0x04, "A 1C/3C B 3C/1C" ) |
| 1291 | 1644 | PORT_DIPSETTING( 0x06, "A 1C/4C B 4C/1C" ) |
| 1292 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 1293 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1294 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1295 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 1296 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1297 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1298 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 1299 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1300 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1301 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 1302 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1303 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1304 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 1305 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1306 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1645 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) | |
| 1646 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1647 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) | |
| 1648 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1307 | 1649 | INPUT_PORTS_END |
| 1308 | 1650 | |
| 1651 | ||
| 1652 | /* verified from Z80 code */ | |
| 1309 | 1653 | static INPUT_PORTS_START( ladybugg ) |
| 1310 | 1654 | PORT_START("IN0") |
| 1311 | 1655 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 1312 | 1656 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 1313 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) | |
| 1314 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) | |
| 1315 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1316 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) | |
| 1317 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1318 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) | |
| 1657 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 1658 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 1659 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1660 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 1661 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 1662 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 1319 | 1663 | |
| 1320 | 1664 | PORT_START("IN1") |
| 1321 | 1665 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 1322 | 1666 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 1323 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL | |
| 1324 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL | |
| 1325 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL | |
| 1326 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL /* 2nd Button 1 */ | |
| 1327 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) | |
| 1328 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1329 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) | |
| 1330 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) ) | |
| 1331 | PORT_DIPSETTING( 0x80, "A 1C/1C B 1C/5C" ) | |
| 1332 | PORT_DIPSETTING( 0x00, "A 2C/1C B 1C/3C" ) | |
| 1667 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 1668 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 1669 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1670 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 1671 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coinage ) ) | |
| 1672 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) | |
| 1673 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1674 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) | |
| 1675 | PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play ) ) | |
| 1333 | 1676 | |
| 1334 | 1677 | PORT_START("IN2") |
| 1335 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Difficulty ) ) | |
| 1336 | PORT_DIPSETTING( 0x00, DEF_STR( Easiest ) ) | |
| 1337 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) | |
| 1678 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) | |
| 1679 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) | |
| 1680 | PORT_DIPSETTING( 0x01, DEF_STR( Medium ) ) | |
| 1338 | 1681 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) |
| 1339 | 1682 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) |
| 1340 | 1683 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) |
| 1341 | 1684 | PORT_DIPSETTING( 0x00, "3" ) |
| 1342 | PORT_DIPSETTING( 0x04, "4" ) | |
| 1343 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) | |
| 1344 | PORT_DIPSETTING( 0x00, "20000" ) | |
| 1345 | PORT_DIPSETTING( 0x08, "40000" ) | |
| 1346 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) /* Yes, the game reads both of these */ | |
| 1347 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) /* Check code at 0x22e1 */ | |
| 1685 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1686 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) | |
| 1687 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1688 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) | |
| 1689 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1348 | 1690 | INPUT_PORTS_END |
| 1349 | 1691 | |
| 1350 | static INPUT_PORTS_START( vpool ) | |
| 1351 | PORT_START("IN0") | |
| 1352 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1353 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1354 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 1355 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 1356 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1357 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 1358 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1359 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1360 | PORT_SERVICE( 0x40, IP_ACTIVE_HIGH ) | |
| 1361 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) | |
| 1362 | 1692 | |
| 1363 | PORT_START("IN1") | |
| 1364 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1365 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1366 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 1367 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 1368 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1369 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 1370 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1371 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1372 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 1373 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1374 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1375 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 1376 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1377 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1378 | ||
| 1379 | PORT_START("DSW0") | |
| 1380 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) | |
| 1381 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1382 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1383 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 1384 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1385 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1386 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 1387 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1388 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1389 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 1390 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1391 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1392 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 1393 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 1394 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1395 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 1396 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1397 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1398 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 1399 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1400 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1401 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 1402 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1403 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1404 | INPUT_PORTS_END | |
| 1405 | ||
| 1406 | static INPUT_PORTS_START( drivfrcg ) | |
| 1407 | PORT_START("IN0") | |
| 1408 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1409 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1410 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 1411 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 1412 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1413 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1414 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1415 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1416 | ||
| 1417 | PORT_START("IN1") | |
| 1418 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1419 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 1420 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1421 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1422 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1423 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1424 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Coinage ) ) | |
| 1425 | PORT_DIPSETTING( 0x40, "A 2C/1C B 1C/3C" ) | |
| 1426 | PORT_DIPSETTING( 0x00, "A 1C/1C B 1C/5C" ) | |
| 1427 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1428 | ||
| 1429 | PORT_START("DSW0") | |
| 1693 | static INPUT_PORTS_START( harem ) | |
| 1694 | PORT_START("IN0")//Change tag when major usage uncovered. | |
| 1430 | 1695 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) |
| 1431 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1432 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1696 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1697 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1433 | 1698 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) |
| 1434 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1435 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1699 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1700 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1436 | 1701 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) |
| 1437 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1438 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 1702 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1703 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 1439 | 1704 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) |
| 1440 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1441 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1705 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1706 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1442 | 1707 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) |
| 1443 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1444 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1708 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1709 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1445 | 1710 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) |
| 1446 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1447 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1711 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1712 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1448 | 1713 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) |
| 1449 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1450 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1714 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1715 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1451 | 1716 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) |
| 1452 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1453 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1717 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1718 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1454 | 1719 | |
| 1455 | PORT_START(" | |
| 1720 | PORT_START("IN | |
| 1456 | 1721 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) |
| 1457 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1458 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1722 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1723 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1459 | 1724 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) |
| 1460 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1461 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1725 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1726 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1462 | 1727 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) |
| 1463 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1464 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 1728 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1729 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 1465 | 1730 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) |
| 1466 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1467 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1731 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1732 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1468 | 1733 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) |
| 1469 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1470 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1734 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1735 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1471 | 1736 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) |
| 1472 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1473 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1737 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1738 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1474 | 1739 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) |
| 1475 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1476 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1740 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1741 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1477 | 1742 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) |
| 1478 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1479 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1480 | ||
| 1481 | PORT_START("SENSE") | |
| 1482 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 1743 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1744 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1483 | 1745 | INPUT_PORTS_END |
| 1484 | 1746 | |
| 1485 | static INPUT_PORTS_START( bongo ) | |
| 1747 | ||
| 1748 | static INPUT_PORTS_START( hunchbkg ) | |
| 1486 | 1749 | PORT_START("IN0") |
| 1487 | 1750 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 1488 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // coin? it jumps to an unmapped area at $C003 | |
| 1489 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) | |
| 1490 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) | |
| 1751 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1752 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) | |
| 1753 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) | |
| 1491 | 1754 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1492 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) | |
| 1493 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1494 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1755 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1756 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 1757 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) | |
| 1495 | 1758 | |
| 1496 | 1759 | PORT_START("IN1") |
| 1497 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1498 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1499 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL | |
| 1500 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL | |
| 1760 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1) | |
| 1761 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 1") PORT_PLAYER(1) | |
| 1762 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 1763 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 1501 | 1764 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1502 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_ | |
| 1765 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_B | |
| 1503 | 1766 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1504 | 1767 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1505 | 1768 | |
| 1506 | 1769 | PORT_START("DSW0") |
| 1507 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1508 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1509 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1770 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1771 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1772 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1510 | 1773 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) |
| 1511 | 1774 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1512 | 1775 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| r7356 | r7357 | |
| 1529 | 1792 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1530 | 1793 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 1531 | 1794 | |
| 1532 | PORT_START("DSW1") | |
| 1533 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1534 | PORT_DIPSETTING( 0x0, DEF_STR( Off ) ) | |
| 1535 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1536 | PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) ) | |
| 1537 | PORT_DIPSETTING( 0x00, "2" ) | |
| 1538 | PORT_DIPSETTING( 0x02, "3" ) | |
| 1539 | PORT_DIPSETTING( 0x04, "4" ) | |
| 1540 | PORT_DIPSETTING( 0x06, "5" ) | |
| 1541 | PORT_DIPNAME( 0x08, 0x00, "Infinite Lives" ) | |
| 1542 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1543 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1544 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 1545 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1546 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1547 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 1548 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1549 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1550 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coinage ) ) | |
| 1551 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) | |
| 1552 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) | |
| 1553 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) | |
| 1554 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1555 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) | |
| 1795 | PORT_START("SENSE") | |
| 1796 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 1556 | 1797 | INPUT_PORTS_END |
| 1557 | 1798 | |
| 1558 | static INPUT_PORTS_START( hunchbkg ) | |
| 1799 | ||
| 1800 | static INPUT_PORTS_START( drivfrcg ) | |
| 1559 | 1801 | PORT_START("IN0") |
| 1560 | 1802 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 1561 | 1803 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 1562 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) | |
| 1563 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) | |
| 1804 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 1805 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 1564 | 1806 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1565 | 1807 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1566 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 1567 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) | |
| 1808 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1809 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1568 | 1810 | |
| 1569 | 1811 | PORT_START("IN1") |
| 1570 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1) | |
| 1571 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 1") PORT_PLAYER(1) | |
| 1572 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 1573 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 1812 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1813 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 1814 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1815 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1574 | 1816 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1575 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1576 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1817 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1818 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Coinage ) ) | |
| 1819 | PORT_DIPSETTING( 0x40, "A 2C/1C B 1C/3C" ) | |
| 1820 | PORT_DIPSETTING( 0x00, "A 1C/1C B 1C/5C" ) | |
| 1577 | 1821 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1578 | 1822 | |
| 1579 | 1823 | PORT_START("DSW0") |
| 1580 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1581 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1582 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1824 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1825 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1826 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1583 | 1827 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) |
| 1584 | 1828 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1585 | 1829 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| r7356 | r7357 | |
| 1602 | 1846 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1603 | 1847 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 1604 | 1848 | |
| 1605 | PORT_START("SENSE") | |
| 1606 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 1607 | INPUT_PORTS_END | |
| 1608 | ||
| 1609 | static INPUT_PORTS_START( harem ) | |
| 1610 | PORT_START("IN0")//Change tag when major usage uncovered. | |
| 1849 | PORT_START("DSW1") | |
| 1611 | 1850 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) |
| 1612 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1613 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1851 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1852 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1614 | 1853 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) |
| 1615 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1616 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1854 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1855 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1617 | 1856 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) |
| 1618 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1619 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 1857 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1858 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 1620 | 1859 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) |
| 1621 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1622 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1623 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 1624 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1625 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1626 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 1627 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1628 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1629 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 1630 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1631 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1632 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 1633 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1634 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1635 | ||
| 1636 | PORT_START("IN1") | |
| 1637 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1638 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1639 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1640 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 1641 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1642 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1643 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 1644 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1645 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 1646 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 1647 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1648 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1649 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 1650 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1651 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1652 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 1653 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1654 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1655 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 1656 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1657 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1658 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 1659 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1660 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1661 | INPUT_PORTS_END | |
| 1662 | ||
| 1663 | static INPUT_PORTS_START( tazzmang ) | |
| 1664 | PORT_START("IN0") | |
| 1665 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1666 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1667 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1668 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1669 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1670 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1671 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1672 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1673 | ||
| 1674 | PORT_START("IN1") | |
| 1675 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start 1 / P1 and P2 Button 2") | |
| 1676 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1677 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1678 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1679 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1680 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1681 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1682 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1683 | ||
| 1684 | PORT_START("DSW0") | |
| 1685 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 1686 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1687 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 1688 | PORT_DIPNAME( 0x06, 0x04, DEF_STR( Coinage ) ) | |
| 1689 | PORT_DIPSETTING( 0x00, "A 4C/1C B 1C/4C" ) | |
| 1690 | PORT_DIPSETTING( 0x02, "A 3C/1C B 1C/3C" ) | |
| 1691 | PORT_DIPSETTING( 0x06, "A 2C/1C B 1C/2C" ) | |
| 1692 | PORT_DIPSETTING( 0x04, "A 1C/1C B 1C/1C" ) | |
| 1693 | PORT_DIPNAME( 0x08, 0x00, "3" ) | |
| 1694 | 1860 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1695 | 1861 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1696 | 1862 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) |
| r7356 | r7357 | |
| 1705 | 1871 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) |
| 1706 | 1872 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1707 | 1873 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 1874 | ||
| 1875 | PORT_START("SENSE") | |
| 1876 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 1708 | 1877 | INPUT_PORTS_END |
| 1709 | 1878 | |
| 1879 | ||
| 1710 | 1880 | static INPUT_PORTS_START( racknrol ) |
| 1711 | 1881 | PORT_START("IN0") |
| 1712 | 1882 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| r7356 | r7357 | |
| 1770 | 1940 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 1771 | 1941 | INPUT_PORTS_END |
| 1772 | 1942 | |
| 1943 | ||
| 1773 | 1944 | static INPUT_PORTS_START( trvchlng ) |
| 1774 | 1945 | PORT_START("IN0") |
| 1775 | 1946 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| r7356 | r7357 | |
| 1834 | 2005 | INPUT_PORTS_END |
| 1835 | 2006 | |
| 1836 | 2007 | |
| 1837 | /* Coinage Dips are spread accross two input ports */ | |
| 1838 | static CUSTOM_INPUT( ckongg_coinage_r ) | |
| 1839 | { | |
| 1840 | int bit_mask = (FPTR)param; | |
| 1841 | ||
| 1842 | switch (bit_mask) | |
| 1843 | { | |
| 1844 | case 0x0c: /* ckongg : DSW (0xc800) bits 2 and 3 */ | |
| 1845 | return ((input_port_read(field->port->machine, "COINAGE") & bit_mask) >> 2); | |
| 1846 | case 0x40: /* ckongg : IN1 (0xc400) bit 6 */ | |
| 1847 | return ((input_port_read(field->port->machine, "COINAGE") & bit_mask) >> 6); | |
| 1848 | ||
| 1849 | case 0xc0: /* ckongmc : IN1 (0xa800) bits 6 and 7 */ | |
| 1850 | return ((input_port_read(field->port->machine, "COINAGE") & bit_mask) >> 6); | |
| 1851 | case 0x01: /* ckongmc : DSW (0xb000) bit 0 */ | |
| 1852 | return ((input_port_read(field->port->machine, "COINAGE") & bit_mask) >> 0); | |
| 1853 | ||
| 1854 | default: | |
| 1855 | logerror("ckongg_bonus_r : invalid %02X bit_mask\n",bit_mask); | |
| 1856 | return 0; | |
| 1857 | } | |
| 1858 | } | |
| 1859 | ||
| 1860 | /* verified from Z80 code */ | |
| 1861 | static INPUT_PORTS_START( ckongg ) | |
| 1862 | PORT_START("IN0") | |
| 1863 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1864 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1865 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 1866 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 1867 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 1868 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 1869 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1870 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1871 | ||
| 1872 | PORT_START("IN1") | |
| 1873 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1874 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1875 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 1876 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 1877 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 1878 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 1879 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0x40) | |
| 1880 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) | |
| 1881 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) | |
| 1882 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 1883 | ||
| 1884 | PORT_START("DSW0") | |
| 1885 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 1886 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1887 | PORT_DIPSETTING( 0x01, "4" ) | |
| 1888 | PORT_DIPSETTING( 0x02, "5" ) | |
| 1889 | PORT_DIPSETTING( 0x03, "6" ) | |
| 1890 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0x0c) | |
| 1891 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1892 | ||
| 1893 | PORT_START("COINAGE") | |
| 1894 | PORT_DIPNAME( 0x4c, 0x00, DEF_STR( Coinage ) ) | |
| 1895 | PORT_DIPSETTING( 0x4c, DEF_STR( 5C_1C ) ) | |
| 1896 | PORT_DIPSETTING( 0x44, DEF_STR( 4C_1C ) ) | |
| 1897 | PORT_DIPSETTING( 0x0c, DEF_STR( 3C_1C ) ) | |
| 1898 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) | |
| 1899 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1900 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) | |
| 1901 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 1902 | PORT_DIPSETTING( 0x48, DEF_STR( 1C_4C ) ) | |
| 1903 | INPUT_PORTS_END | |
| 1904 | ||
| 1905 | /* verified from Z80 code */ | |
| 1906 | static INPUT_PORTS_START( ckongmc ) | |
| 1907 | PORT_START("IN0") | |
| 1908 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1909 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1910 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 1911 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 1912 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 1913 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1914 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 1915 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 1916 | ||
| 1917 | PORT_START("IN1") | |
| 1918 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) /* also START1 : code at 0x5064 for BUTTON1 and 0x514d for START1 */ | |
| 1919 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1920 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 1921 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 1922 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 1923 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1924 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0xc0) | |
| 1925 | ||
| 1926 | PORT_START("DSW0") | |
| 1927 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0x01) | |
| 1928 | PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) ) | |
| 1929 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1930 | PORT_DIPSETTING( 0x02, "4" ) | |
| 1931 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1932 | PORT_DIPSETTING( 0x06, "6" ) | |
| 1933 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) | |
| 1934 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) | |
| 1935 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 1936 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1937 | ||
| 1938 | PORT_START("COINAGE") | |
| 1939 | PORT_DIPNAME( 0xc1, 0x00, DEF_STR( Coinage ) ) | |
| 1940 | PORT_DIPSETTING( 0xc1, DEF_STR( 5C_1C ) ) | |
| 1941 | PORT_DIPSETTING( 0x41, DEF_STR( 4C_1C ) ) | |
| 1942 | PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) ) | |
| 1943 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) | |
| 1944 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1945 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) | |
| 1946 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) | |
| 1947 | PORT_DIPSETTING( 0x81, DEF_STR( 1C_4C ) ) | |
| 1948 | INPUT_PORTS_END | |
| 1949 | ||
| 1950 | static INPUT_PORTS_START( porter ) | |
| 1951 | PORT_START("IN0") | |
| 1952 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1953 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1954 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) | |
| 1955 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) | |
| 1956 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) | |
| 1957 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 1958 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1959 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1960 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 1961 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1962 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1963 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) | |
| 1964 | ||
| 1965 | PORT_START("IN1") | |
| 1966 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // and START | |
| 1967 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) // and START2 | |
| 1968 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 1969 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 1970 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 1971 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 1972 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1973 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1974 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 1975 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1976 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1977 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 1978 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1979 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1980 | ||
| 1981 | PORT_START("DSW0") | |
| 1982 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1983 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1984 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1985 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 1986 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1987 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1988 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 1989 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1990 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1991 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 1992 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1993 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1994 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 1995 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 1996 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1997 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 1998 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1999 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2000 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 2001 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2002 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2003 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 2004 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2005 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2006 | INPUT_PORTS_END | |
| 2007 | ||
| 2008 | 2008 | static const gfx_layout galaxold_charlayout = |
| 2009 | 2009 | { |
| 2010 | 2010 | 8,8, |
| r7356 | r7357 | |
| 2489 | 2489 | |
| 2490 | 2490 | ***************************************************************************/ |
| 2491 | 2491 | |
| 2492 | ROM_START( vpool ) | |
| 2493 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2494 | ROM_LOAD( "vidpool1.bin", 0x0000, 0x0800, CRC(333f4732) SHA1(b57460c039c69137645bd4280ad877aa789277d6) ) | |
| 2495 | ROM_CONTINUE( 0x2000, 0x0800 ) | |
| 2496 | ROM_LOAD( "vidpool2.bin", 0x0800, 0x0800, CRC(eea6c0f1) SHA1(5b18caa78e246f55fd9cd778d6e83f79f0b3f157) ) | |
| 2497 | ROM_CONTINUE( 0x2800, 0x0800 ) | |
| 2498 | ROM_LOAD( "vidpool3.bin", 0x1000, 0x0800, CRC(309972a6) SHA1(8269d2f677f55dda71d6a7b0796d2d53a4def59d) ) | |
| 2499 | ROM_CONTINUE( 0x3000, 0x0800 ) | |
| 2500 | ROM_LOAD( "vidpool4.bin", 0x1800, 0x0800, CRC(c4f71c1d) SHA1(e1d01135d5ccc1a53308ce89dc2a8fc0992207d5) ) | |
| 2501 | ROM_CONTINUE( 0x3800, 0x0800 ) | |
| 2502 | ||
| 2503 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 2504 | ROM_LOAD( "hustler.5f", 0x0000, 0x0800, CRC(0bdfad0e) SHA1(8e6f1737604f3801c03fa2e9a5e6a2778b54bae8) ) // vidpoolh.bin | |
| 2505 | ROM_LOAD( "hustler.5h", 0x0800, 0x0800, CRC(8e062177) SHA1(7e52a1669804b6c2f694cfc64b04abc8246bb0c2) ) // vidpoolk.bin | |
| 2506 | ||
| 2507 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2508 | ROM_LOAD( "hustler.clr", 0x0000, 0x0020, CRC(aa1f7f5e) SHA1(311dd17aa11490a1173c76223e4ccccf8ea29850) ) | |
| 2509 | ROM_END | |
| 2510 | ||
| 2511 | ROM_START( rockclim ) | |
| 2512 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2513 | ROM_LOAD( "lc01.a1", 0x0000, 0x1000, CRC(8601ae8d) SHA1(6e0c3b34ce5e6879ce7a116c5c2660889a68320d) ) | |
| 2514 | ROM_LOAD( "lc02.a2", 0x1000, 0x1000, CRC(2dde9d4c) SHA1(7e343113116b94894558819a7f77f77e4e952da7) ) | |
| 2515 | ROM_LOAD( "lc03.a3", 0x2000, 0x1000, CRC(82c48a67) SHA1(abf95062eb5c9bd4bb3c9b9af59396a4ca6905d8) ) | |
| 2516 | ROM_LOAD( "lc04.a4", 0x3000, 0x1000, CRC(7cd3a04a) SHA1(756c12288e120e6f761b266b91920d17cab6926c) ) | |
| 2517 | ROM_LOAD( "lc05.a5", 0x6000, 0x1000, CRC(5e542149) SHA1(425a5a8769c3fa0887db8ff04e2a4f32f18d2679) ) | |
| 2518 | ROM_LOAD( "lc06.a6", 0x7000, 0x1000, CRC(b2bdca64) SHA1(e72e63725164c922816dda90ac964a94062eab1b) ) | |
| 2519 | ||
| 2520 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 2521 | ROM_LOAD( "lc08.a9", 0x0000, 0x800, CRC(7f18e1ef) SHA1(2a160b994708ec0f06774dde3ec613af7e3f32c6) ) | |
| 2522 | ROM_LOAD( "lc07.a7", 0x0800, 0x800, CRC(f18b50ac) SHA1(a2328eb55882a09403cae1a497c611b494649cac) ) | |
| 2523 | ROM_LOAD( "lc10.c9", 0x1000, 0x800, CRC(dec5781b) SHA1(b6277fc890d153db24bd48293780cf239a6aa0e7) ) | |
| 2524 | ROM_LOAD( "lc09.c7", 0x1800, 0x800, CRC(06c0b5de) SHA1(561cf99a6be03205c7bc5fd15d4d51ee4d6d164b) ) | |
| 2525 | ||
| 2526 | ROM_REGION( 0x2000, "gfx2", 0 ) | |
| 2527 | ROM_LOAD( "lc13.g5", 0x0000, 0x1000, CRC(19475f2b) SHA1(5d42aa45a7b519dacdecd3d2edbfee6971693034) ) | |
| 2528 | ROM_LOAD( "lc14.g7", 0x1000, 0x1000, CRC(cc96d1db) SHA1(9713b47b723a5d8837f2a8e8c43e46dc41a62e5b) ) | |
| 2529 | ||
| 2530 | ROM_REGION( 0x0040, "proms", 0 ) | |
| 2531 | ROM_LOAD( "lc12.e9", 0x0000, 0x0020, CRC(f6e76547) SHA1(c9ea78d1876156561b3bbf327d7e0299e1d9fd4a) ) | |
| 2532 | ROM_LOAD( "lc11.f4", 0x0020, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) | |
| 2533 | ROM_END | |
| 2534 | ||
| 2535 | /* | |
| 2536 | Crazy Kong | |
| 2537 | Bootleg, 1982 | |
| 2538 | ||
| 2539 | PCB Layout | |
| 2540 | ---------- | |
| 2541 | ||
| 2542 | |----------------------------------------------| | |
| 2543 | | AY3-8910 MB7051 2125 2125 | | |
| 2544 | | LM3900 ROM.5S MB7051 2125 2125 | | |
| 2545 | | MB7051 2125 2125 | | |
| 2546 | | ROM.5R | | |
| 2547 | | | | |
| 2548 | |1 ROM.5N | | |
| 2549 | |8 | | |
| 2550 | |W ROM.5M ROM.11N | | |
| 2551 | |A ROM.11L | | |
| 2552 | |Y ROM.5K 2114 ROM.11K | | |
| 2553 | | VOL 2114 ROM.11H | | |
| 2554 | | ROM.5H 2114 | | |
| 2555 | | Z80 2114 | | |
| 2556 | | ROM.5F | | |
| 2557 | | 2114 | | |
| 2558 | | 2114 ROM.5D 5101 ROM.11C | | |
| 2559 | | | | |
| 2560 | |HA1368 DSW(8) 6116 18.432MHz 5101 ROM.11A | | |
| 2561 | |----------------------------------------------| | |
| 2562 | Notes: | |
| 2563 | Z80 : Clock running at 3.072MHz (18.432/6) | |
| 2564 | AY3-8910: Clock running at 1.536MHz (18.432/12) | |
| 2565 | 2125 : 1K x1 SRAM (DIP16) | |
| 2566 | 2114 : 1K x4 SRAM (DIP18) | |
| 2567 | 6116 : 2K x8 SRAM (DIP24) | |
| 2568 | 5101 : 256 x4 SRAM (SDIP22) | |
| 2569 | LM3900 : National Semiconductor LM3900 Quadruple Norton Operational Amplifier (DIP14) | |
| 2570 | HA1368 : Hitachi HA1368 18V, 4.5A, 5.3W Audio Power Amplifier IC | |
| 2571 | MB7051 : Hitachi MB7051 32bytes x8 Bipolar PROM (DIP16) | |
| 2572 | */ | |
| 2573 | ||
| 2574 | ROM_START( ckongg ) | |
| 2575 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2576 | ROM_LOAD( "ck1.bin", 0x2400, 0x0400, CRC(a4323b94) SHA1(1fed47e1df5efa8f40585bedab07b60067edc2bb) ) | |
| 2577 | ROM_CONTINUE( 0x1C00, 0x0400) | |
| 2578 | ROM_CONTINUE( 0x4800, 0x0400) | |
| 2579 | ROM_CONTINUE( 0x0C00, 0x0400) | |
| 2580 | ROM_LOAD( "ck2.bin", 0x4400, 0x0400, CRC(1e532996) SHA1(fe1feeca347fccd266925614a46c98cff683f5d3) ) | |
| 2581 | ROM_CONTINUE( 0x0000, 0x0400) | |
| 2582 | ROM_CONTINUE( 0x1800, 0x0400) | |
| 2583 | ROM_CONTINUE( 0x2800, 0x0400) | |
| 2584 | ROM_LOAD( "ck3.bin", 0x3400, 0x0400, CRC(65157cde) SHA1(572b9bd56894600e21220356d0bf193c7920672c) ) | |
| 2585 | ROM_CONTINUE( 0x4c00, 0x0400) | |
| 2586 | ROM_CONTINUE( 0x5000, 0x0400) | |
| 2587 | ROM_CONTINUE( 0x0400, 0x0400) | |
| 2588 | ROM_LOAD( "ck4.bin", 0x2000, 0x0400, CRC(43827bc6) SHA1(a2ca9afff0dd1bdcfc3a6ead9ff30b7c91caa7ea) ) | |
| 2589 | ROM_CONTINUE( 0x3800, 0x0400) | |
| 2590 | ROM_CONTINUE( 0x1000, 0x0400) | |
| 2591 | ROM_CONTINUE( 0x4000, 0x0400) | |
| 2592 | ROM_LOAD( "ck5.bin", 0x0800, 0x0400, CRC(a74ed96e) SHA1(1e845d693a728fea9d52953b5493ec98fdec63e3) ) | |
| 2593 | ROM_CONTINUE( 0x5400, 0x0400) // fill | |
| 2594 | ROM_CONTINUE( 0x2c00, 0x0400) | |
| 2595 | ROM_CONTINUE( 0x1400, 0x0400) | |
| 2596 | ROM_LOAD( "ck7.bin", 0x3000, 0x0400, CRC(2c4d8129) SHA1(ab1708ff72ee027106fe8da0caea03a796b3212b) ) | |
| 2597 | ROM_CONTINUE( 0x3c00, 0x0400) | |
| 2598 | ||
| 2599 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 2600 | ROM_LOAD( "ckvid10.bin", 0x0000, 0x1000, CRC(7866d2cb) SHA1(62dd8b80bc0459c7337d8a8cb83e53b999e7f4a9) ) | |
| 2601 | ROM_LOAD( "ckvid7.bin", 0x1000, 0x1000, CRC(7311a101) SHA1(49d54c8b94cae4ba81d7a7684eaa4e87815bb4da) ) | |
| 2602 | ||
| 2603 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2604 | ROM_LOAD( "ck_cp.bin", 0x0000, 0x0020, CRC(7e0b79cb) SHA1(72ef3eb5f09e10c13dcf6fd568a6d16658055a16) ) | |
| 2605 | ROM_END | |
| 2606 | ||
| 2607 | ROM_START( ckongmc ) | |
| 2608 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2609 | ROM_LOAD( "kc1.bin", 0x0000, 0x0800, CRC(a87fc828) SHA1(f66b72427d8cdfabdf2274e22bdb10018ac7d2f9) ) | |
| 2610 | ROM_CONTINUE( 0x2000, 0x0800) | |
| 2611 | ROM_LOAD( "kc2.bin", 0x0800, 0x0800, CRC(94a13dec) SHA1(d3bfd5a266bb1f0e66d847e15b51bdd4c9a15e37) ) | |
| 2612 | ROM_CONTINUE( 0x2800, 0x0800) | |
| 2613 | ROM_LOAD( "kc3.bin", 0x1000, 0x0800, CRC(5efc6705) SHA1(9af59a9cb58599b1c7ce0a063929531f6c73b912) ) | |
| 2614 | ROM_CONTINUE( 0x3000, 0x0800) | |
| 2615 | ROM_LOAD( "kc4.bin", 0x1800, 0x0800, CRC(ac917d66) SHA1(63a0db01bb93e052fec64fa69ebcbae3b0b8aa04) ) | |
| 2616 | ROM_CONTINUE( 0x3800, 0x0800) | |
| 2617 | ROM_LOAD( "kc5.bin", 0x4000, 0x0800, CRC(5a9ee1ed) SHA1(1bc420a42a4931c389b4f8db451de7c59786dfbc) ) | |
| 2618 | ROM_LOAD( "kc6.bin", 0x4800, 0x0800, CRC(f787431e) SHA1(5cee497b8f4072509920d982470cbe06bd18f88b) ) | |
| 2619 | ROM_LOAD( "kc7.bin", 0x5000, 0x0800, CRC(7a185e31) SHA1(a257f32958af6b2c1c9007b46bd1dc984670b0d9) ) | |
| 2620 | ||
| 2621 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 2622 | ROM_LOAD( "kc8carat.bin", 0x0000, 0x1000, CRC(7866d2cb) SHA1(62dd8b80bc0459c7337d8a8cb83e53b999e7f4a9) ) | |
| 2623 | ROM_LOAD( "kc9carat.bin", 0x1000, 0x1000, CRC(7311a101) SHA1(49d54c8b94cae4ba81d7a7684eaa4e87815bb4da) ) | |
| 2624 | ||
| 2625 | ROM_REGION( 0x0020, "proms", 0 ) // not in this set | |
| 2626 | ROM_LOAD( "ck_cp.bin", 0x0000, 0x0020, CRC(7e0b79cb) SHA1(72ef3eb5f09e10c13dcf6fd568a6d16658055a16) ) | |
| 2627 | ROM_END | |
| 2628 | ||
| 2492 | 2629 | ROM_START( scramblb ) |
| 2493 | 2630 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 2494 | 2631 | ROM_LOAD( "scramble.1k", 0x0000, 0x0800, CRC(9e025c4a) SHA1(a8cc9391bdd01a5a2fe7f0c4e889b4e2495df891) ) |
| r7356 | r7357 | |
| 2508 | 2645 | ROM_LOAD( "82s123.6e", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) |
| 2509 | 2646 | ROM_END |
| 2510 | 2647 | |
| 2511 | ||
| 2512 | 2648 | ROM_START( scramb2 ) |
| 2513 | 2649 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 2514 | 2650 | ROM_LOAD( "r1.7f1", 0x0000, 0x0800, CRC(4a43148c) SHA1(ea27fd3acf661101296a58a7a50fb8e4d5292760) ) |
| r7356 | r7357 | |
| 2533 | 2669 | ROM_LOAD( "82s123.6e", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) |
| 2534 | 2670 | ROM_END |
| 2535 | 2671 | |
| 2536 | ||
| 2537 | 2672 | ROM_START( 4in1 ) |
| 2538 | 2673 | ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code 64k for banked code, encrypted */ |
| 2539 | 2674 | /* Menu Code, Fixed at 0xc000 - 0xdfff */ |
| r7356 | r7357 | |
| 2601 | 2736 | ROM_LOAD( "g1-l.bin", 0x0800, 0x0800, CRC(2ae6b5ab) SHA1(59bdebf75d28a247293440ec2ad83eaf30e3de00) ) |
| 2602 | 2737 | ROM_LOAD( "g2-l.bin", 0x1800, 0x0800, CRC(98b37397) SHA1(29914435a10cebbbce04382c45e13a64a0cd18cb) ) |
| 2603 | 2738 | |
| 2604 | ||
| 2605 | 2739 | ROM_REGION( 0x0020, "proms", 0 ) |
| 2606 | 2740 | ROM_LOAD( "bagmanmc.clr", 0x0000, 0x0020, NO_DUMP ) // missing |
| 2607 | 2741 | ROM_END |
| r7356 | r7357 | |
| 2626 | 2760 | ROM_LOAD( "hustler.clr", 0x0000, 0x0020, CRC(aa1f7f5e) SHA1(311dd17aa11490a1173c76223e4ccccf8ea29850) ) |
| 2627 | 2761 | ROM_END |
| 2628 | 2762 | |
| 2629 | ROM_START( rockclim ) | |
| 2630 | ||
| 2763 | ROM_START( porter ) | |
| 2631 | 2764 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 2632 | ROM_LOAD( "lc01.a1", 0x0000, 0x1000, CRC(8601ae8d) SHA1(6e0c3b34ce5e6879ce7a116c5c2660889a68320d) ) | |
| 2633 | ROM_LOAD( "lc02.a2", 0x1000, 0x1000, CRC(2dde9d4c) SHA1(7e343113116b94894558819a7f77f77e4e952da7) ) | |
| 2634 | ROM_LOAD( "lc03.a3", 0x2000, 0x1000, CRC(82c48a67) SHA1(abf95062eb5c9bd4bb3c9b9af59396a4ca6905d8) ) | |
| 2635 | ROM_LOAD( "lc04.a4", 0x3000, 0x1000, CRC(7cd3a04a) SHA1(756c12288e120e6f761b266b91920d17cab6926c) ) | |
| 2636 | ROM_LOAD( "lc05.a5", 0x6000, 0x1000, CRC(5e542149) SHA1(425a5a8769c3fa0887db8ff04e2a4f32f18d2679) ) | |
| 2637 | ROM_LOAD( "lc06.a6", 0x7000, 0x1000, CRC(b2bdca64) SHA1(e72e63725164c922816dda90ac964a94062eab1b) ) | |
| 2765 | ROM_LOAD( "port1.bin", 0x0000, 0x0800, CRC(babaf7fe) SHA1(2138abf57990df9b6f9953efd3be9b2bede49520) ) | |
| 2766 | ROM_CONTINUE( 0x2000, 0x0800) | |
| 2767 | ROM_LOAD( "port2.bin", 0x0800, 0x0800, CRC(8f7eb0e3) SHA1(7ac5bfc0bb8b6a7a3e9acab5ce9a53f7cba1fca5) ) | |
| 2768 | ROM_CONTINUE( 0x2800, 0x0800) | |
| 2769 | ROM_LOAD( "port3.bin", 0x1000, 0x0800, CRC(683939b5) SHA1(caf69b03794cb5cf63b1aa52cf8ef355a3aeef87) ) | |
| 2770 | ROM_CONTINUE( 0x3000, 0x0800) | |
| 2771 | ROM_LOAD( "port4.bin", 0x1800, 0x0800, CRC(6a65d58d) SHA1(05824a41b2912f12bff7887e7483cb3f4367d339) ) | |
| 2772 | ROM_CONTINUE( 0x3800,0x0800) | |
| 2773 | ROM_LOAD( "port5.bin", 0x4000, 0x0800, CRC(2978a9aa) SHA1(99ec75c7f83f4858b26e083b50fde41fbcfe449a) ) | |
| 2774 | ROM_LOAD( "port6.bin", 0x4800, 0x0800, CRC(7ecdffb5) SHA1(18ce71b670503bef039c6bfb0aed5e8c10e9eb2d) ) | |
| 2638 | 2775 | |
| 2639 | 2776 | ROM_REGION( 0x2000, "gfx1", 0 ) |
| 2640 | ROM_LOAD( "lc08.a9", 0x0000, 0x800, CRC(7f18e1ef) SHA1(2a160b994708ec0f06774dde3ec613af7e3f32c6) ) | |
| 2641 | ROM_LOAD( "lc07.a7", 0x0800, 0x800, CRC(f18b50ac) SHA1(a2328eb55882a09403cae1a497c611b494649cac) ) | |
| 2642 | ROM_LOAD( "lc10.c9", 0x1000, 0x800, CRC(dec5781b) SHA1(b6277fc890d153db24bd48293780cf239a6aa0e7) ) | |
| 2643 | ROM_LOAD( "lc09.c7", 0x1800, 0x800, CRC(06c0b5de) SHA1(561cf99a6be03205c7bc5fd15d4d51ee4d6d164b) ) | |
| 2777 | ROM_LOAD( "port7.bin", 0x0000, 0x1000, CRC(603294f9) SHA1(168b90fdf38cd2e2c7f54cde16b4d83dc5bb3046) ) | |
| 2778 | ROM_LOAD( "port8.bin", 0x1000, 0x1000, CRC(b66a763d) SHA1(995b473b1942ff666b0989993587e41e89542172) ) | |
| 2644 | 2779 | |
| 2645 | ROM_REGION( 0x2000, "gfx2", 0 ) | |
| 2646 | ROM_LOAD( "lc13.g5", 0x0000, 0x1000, CRC(19475f2b) SHA1(5d42aa45a7b519dacdecd3d2edbfee6971693034) ) | |
| 2647 | ROM_LOAD( "lc14.g7", 0x1000, 0x1000, CRC(cc96d1db) SHA1(9713b47b723a5d8837f2a8e8c43e46dc41a62e5b) ) | |
| 2780 | ROM_REGION( 0x0020, "proms", 0 ) // not in the set | |
| 2781 | ROM_LOAD( "mmi6331.6l", 0x0000, 0x0020, BAD_DUMP CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) /* Compatible with 82s123 prom */ | |
| 2782 | ROM_END | |
| 2648 | 2783 | |
| 2649 | ROM_REGION( 0x0040, "proms", 0 ) | |
| 2650 | ROM_LOAD( "lc12.e9", 0x0000, 0x0020, CRC(f6e76547) SHA1(c9ea78d1876156561b3bbf327d7e0299e1d9fd4a) ) | |
| 2651 | ROM_LOAD( "lc11.f4", 0x0020, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) | |
| 2784 | ROM_START( tazzmang ) | |
| 2785 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2786 | ROM_LOAD( "tazzm1.4k", 0x0000, 0x1000, CRC(a14480a1) SHA1(60dac6b57e8331cc4daedaf87faf3e3acc68f378) ) | |
| 2787 | ROM_LOAD( "tazzm2.5j", 0x1000, 0x1000, CRC(5609f5db) SHA1(3fc50109ea0e012e3e310ae4f5dd0cf460bdca52) ) | |
| 2788 | ROM_LOAD( "tazzm3.6f", 0x2000, 0x1000, CRC(fe7f7002) SHA1(ac4134c07a798328b18994010bcaf6b3f728466a) ) | |
| 2789 | ROM_LOAD( "tazzm4.7e", 0x3000, 0x1000, CRC(c9ca1d0a) SHA1(d420ca2e926174e17215212278c86ba9bbb3d9dc) ) | |
| 2790 | ROM_LOAD( "tazzm5.7l", 0x4000, 0x1000, CRC(f50cd8a6) SHA1(b59ca37171b9acc9854f1beae43cfa5643219a5f) ) | |
| 2791 | ROM_LOAD( "tazzm6.7l", 0x5000, 0x1000, CRC(5cf2e7d2) SHA1(ad89e2655164e0fc5ecc9af70c5f0dd9b094d432) ) | |
| 2792 | ||
| 2793 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 2794 | ROM_LOAD( "tazm8.1lk", 0x0000, 0x0800, CRC(2c5b612b) SHA1(32e3a41a9a4a8b1285b6a195213ff0d98012360a) ) | |
| 2795 | ROM_LOAD( "tazzm7.1jh", 0x0800, 0x0800, CRC(3f5ff3ac) SHA1(bc70eef54a45b52c14e35464e5f06b5eec554eb6) ) | |
| 2796 | ||
| 2797 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2798 | ROM_LOAD( "prom.6l", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) | |
| 2652 | 2799 | ROM_END |
| 2653 | 2800 | |
| 2801 | ROM_START( bongo ) | |
| 2802 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2803 | ROM_LOAD( "bg1.bin", 0x0000, 0x1000, CRC(de9a8ec6) SHA1(b5ee99b26d1a39e31b643ad0f5723ee8e364023e) ) | |
| 2804 | ROM_LOAD( "bg2.bin", 0x1000, 0x1000, CRC(a19da662) SHA1(a2674392d489c5e5eeb9abc51572a37cc6045220) ) | |
| 2805 | ROM_LOAD( "bg3.bin", 0x2000, 0x1000, CRC(9f6f2150) SHA1(26a1f872686ddddcdb690d7b826ba26c20cdec35) ) | |
| 2806 | ROM_LOAD( "bg4.bin", 0x3000, 0x1000, CRC(f80372d2) SHA1(078e2c8b947103c168c0c85430f8ebc9d09f8ba7) ) | |
| 2807 | ROM_LOAD( "bg5.bin", 0x4000, 0x1000, CRC(fc92eade) SHA1(f4012a1c4631388a3e8109a8381bc4084ddc8757) ) | |
| 2808 | ROM_LOAD( "bg6.bin", 0x5000, 0x1000, CRC(561d9e5d) SHA1(68d7fab3cfb5b3360fe8064c70bf21bb1341032f) ) | |
| 2809 | ||
| 2810 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 2811 | ROM_LOAD( "b-h.bin", 0x0000, 0x1000, CRC(fc79d103) SHA1(dac1152221ebdc4cd9bf353b4cc5d45021ca5d9e) ) | |
| 2812 | ROM_LOAD( "b-k.bin", 0x1000, 0x1000, CRC(94d17bf3) SHA1(2a70968249946de52c5a4cfabafbbf4ecda844a8) ) | |
| 2813 | ||
| 2814 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2815 | ROM_LOAD( "b-clr.bin", 0x0000, 0x0020, CRC(c4761ada) SHA1(067d12b2d3635ffa6337ed234ba42717447bea00) ) | |
| 2816 | ROM_END | |
| 2817 | ||
| 2654 | 2818 | ROM_START( ozon1 ) |
| 2655 | 2819 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 2656 | 2820 | ROM_LOAD( "rom1.bin", 0x0000, 0x1000, CRC(54899e8b) SHA1(270af76ae4396ebda767f160535fa77c0b49726a) ) |
| r7356 | r7357 | |
| 2686 | 2850 | ROM_LOAD( "lbuggx.clr", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) |
| 2687 | 2851 | ROM_END |
| 2688 | 2852 | |
| 2689 | ROM_START( vpool ) | |
| 2853 | /* | |
| 2854 | ||
| 2855 | on a cocktail galaxian pcb (eagle style) | |
| 2856 | ||
| 2857 | this had a CPU daughtercard with 3 unknown prom/pal/gal type things on it: | |
| 2858 | ||
| 2859 | Harris M3-7643-5 x2 | |
| 2860 | TI SN746471 ? (number has been partially obliterated on purpose. | |
| 2861 | and a 74ls126 | |
| 2862 | ||
| 2863 | The CPU has 'VIDEO STARS - V.S PRO - TEL: 03045 61541' on a sticky label on it. | |
| 2864 | ||
| 2865 | the cpu daughterboard is etched 'competitive video'. | |
| 2866 | ||
| 2867 | The rom daughtercard may not have come from this precise pcb, | |
| 2868 | i think it was on a fullsize pcb according to the spacing of the riser pins. | |
| 2869 | This daughterboard is also etched competitive video, and uses 4 2716's and 3 2732's. | |
| 2870 | ||
| 2871 | there are 8 rom sockets on this daughterboard, 7 are roms, and the final socket is actually a 6116 ram. | |
| 2872 | ||
| 2873 | there is a small prom in the midle of the pcb inbetween the risers, | |
| 2874 | with a circular red labelled saying 'k'. This might be a decryption prom or somethign? i dunno. | |
| 2875 | ||
| 2876 | there is a TBP18s03 PROM installed at 6L which i guess is the colour prom :) | |
| 2877 | ||
| 2878 | I think thats about it. | |
| 2879 | ||
| 2880 | Dumped 26.05.04 | |
| 2881 | Andy Welburn | |
| 2882 | www.andys-arcade.com | |
| 2883 | ||
| 2884 | */ | |
| 2885 | ||
| 2886 | /* this rom mapping probably isn't quite right */ | |
| 2887 | ROM_START( vstars ) | |
| 2690 | 2888 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 2691 | ROM_LOAD( "vidpool1.bin", 0x0000, 0x0800, CRC(333f4732) SHA1(b57460c039c69137645bd4280ad877aa789277d6) ) | |
| 2692 | ROM_CONTINUE( 0x2000, 0x0800 ) | |
| 2693 | ROM_LOAD( "vidpool2.bin", 0x0800, 0x0800, CRC(eea6c0f1) SHA1(5b18caa78e246f55fd9cd778d6e83f79f0b3f157) ) | |
| 2694 | ROM_CONTINUE( 0x2800, 0x0800 ) | |
| 2695 | ROM_LOAD( "vidpool3.bin", 0x1000, 0x0800, CRC(309972a6) SHA1(8269d2f677f55dda71d6a7b0796d2d53a4def59d) ) | |
| 2696 | ROM_CONTINUE( 0x3000, 0x0800 ) | |
| 2697 | ROM_LOAD( "vidpool4.bin", 0x1800, 0x0800, CRC(c4f71c1d) SHA1(e1d01135d5ccc1a53308ce89dc2a8fc0992207d5) ) | |
| 2698 | ROM_CONTINUE( 0x3800, 0x0800 ) | |
| 2889 | ROM_LOAD( "c-k2.bin", 0x0000, 0x0400, CRC(b0fcf6c1) SHA1(7dc8a7b99977ea9582c1ed36fa9f1fa502a70c6e) ) | |
| 2890 | ROM_CONTINUE( 0x0800, 0x0400) | |
| 2891 | ROM_LOAD( "c-k1.bin", 0x0c00, 0x0400, CRC(ea9603b2) SHA1(f72202f17f862c7ea81e556690f8fcb9ee926e7f) ) | |
| 2892 | ROM_CONTINUE( 0x0400, 0x0400) | |
| 2893 | ROM_LOAD( "c-k4.bin", 0x1c00, 0x0400, CRC(f5743990) SHA1(defd1577b935e3597eba74344dca5626ec2993dd) ) | |
| 2894 | ROM_CONTINUE( 0x1000, 0x0400) | |
| 2895 | ROM_LOAD( "c-k3.bin", 0x1400, 0x0400, CRC(c4338a77) SHA1(b1ca2d43340b671ef33f3a96ce8e1c286a3e6d80) ) | |
| 2896 | ROM_CONTINUE( 0x1800, 0x0400) | |
| 2897 | ROM_LOAD( "c-k6.bin", 0x2c00, 0x0400, CRC(184b9d7e) SHA1(80159ab19233ce95e9c74d039b6777d01b32e959) ) | |
| 2898 | ROM_CONTINUE( 0x2000, 0x0400) | |
| 2899 | ROM_CONTINUE( 0x2400, 0x0400) | |
| 2900 | ROM_CONTINUE( 0x2800, 0x0400) | |
| 2901 | ROM_LOAD( "c-k7.bin", 0x4c00, 0x0400, CRC(9ddcc06f) SHA1(63bc77d8b3273681ca4e681105a117d19a0f23a5) ) | |
| 2902 | ROM_CONTINUE( 0x4000, 0x0400) | |
| 2903 | ROM_CONTINUE( 0x4400, 0x0400) | |
| 2904 | ROM_CONTINUE( 0x4800, 0x0400) | |
| 2699 | 2905 | |
| 2906 | /* seems to be data, can't rearrange based on the jumps */ | |
| 2907 | ROM_LOAD( "c-k5.bin", 0x3c00, 0x0400, CRC(d8df2ec4) SHA1(bef1d4b404cddb8a5f9d4e3f30ee09915c602f56) ) | |
| 2908 | ROM_CONTINUE( 0x3000, 0x0400) | |
| 2909 | ROM_CONTINUE( 0x3400, 0x0400) | |
| 2910 | ROM_CONTINUE( 0x3800, 0x0400) | |
| 2911 | ||
| 2912 | /* Crazy Kong gfx?! */ | |
| 2913 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 2914 | ROM_LOAD( "1h.bin", 0x0000, 0x1000, CRC(7866d2cb) SHA1(62dd8b80bc0459c7337d8a8cb83e53b999e7f4a9) ) | |
| 2915 | ROM_LOAD( "1k.bin", 0x1000, 0x1000, CRC(7311a101) SHA1(49d54c8b94cae4ba81d7a7684eaa4e87815bb4da) ) | |
| 2916 | ||
| 2917 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2918 | ROM_LOAD( "6l.bin", 0x0000, 0x0020, CRC(fd81e715) SHA1(eadafe88f26405e6540d4b248b940974e8c31145) ) | |
| 2919 | ||
| 2920 | ROM_REGION( 0x0020, "proms2", 0 ) | |
| 2921 | ROM_LOAD( "k.bin", 0x0000, 0x0020, CRC(d46ed869) SHA1(9c0a11df11b1a24ee933d1aa435337b78c3ca643) ) | |
| 2922 | ROM_END | |
| 2923 | ||
| 2924 | ROM_START( harem ) | |
| 2925 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2926 | ROM_LOAD( "p0_ic85.bin", 0x0000, 0x2000, CRC(4521b753) SHA1(9033f9c3be8fec1e5ff251e9f60faaf3848a1a1e) ) | |
| 2927 | ROM_LOAD( "p1_ic87.bin", 0x8000, 0x2000, BAD_DUMP CRC(3cc5d1e8) SHA1(827e2d20de2a00ec016ead249ed3afdccd0c856c) ) | |
| 2928 | ||
| 2929 | ROM_REGION( 0x10000, "audiocpu", 0 ) | |
| 2930 | ROM_LOAD( "s1_ic12.bin", 0x0000, 0x2000, CRC(b54799dd) SHA1(b6aeb010257cba48a52afd33b4f8031c7d99550c) ) | |
| 2931 | ROM_LOAD( "s2_ic13.bin", 0x2000, 0x1000, CRC(2d5573a4) SHA1(1fdcd99d89e078509634742b2116a35bb199fe4b) ) | |
| 2932 | ||
| 2933 | ROM_REGION( 0x2000, "unknown", 0 ) | |
| 2934 | ROM_LOAD( "a1_ic25.bin", 0x0000, 0x2000, CRC(279f923a) SHA1(166b1b625997766f0de7cc18af52c42268022fcb) ) | |
| 2935 | ||
| 2936 | ROM_REGION( 0x4000, "gfx1", 0 ) | |
| 2937 | ROM_LOAD( "m0_ic36.bin", 0x0000, 0x2000, CRC(64b3c6d6) SHA1(e71092585f7ffdae85b2a4c9add1bc71e5a608a8) ) | |
| 2938 | ROM_LOAD( "m1_ic37.bin", 0x2000, 0x2000, CRC(cb0324fb) SHA1(61612f683810339d5d5f31daa4c475d0338d446f) ) | |
| 2939 | ||
| 2940 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2941 | ROM_LOAD( "harem.clr", 0x0000, 0x0020, CRC(c9a2bf73) SHA1(dad65ebf43a5df147e334afd552e67f5fcd26df7) ) | |
| 2942 | ROM_END | |
| 2943 | ||
| 2944 | ROM_START( hunchbkg ) | |
| 2945 | ROM_REGION( 0x8000, "maincpu", 0 ) | |
| 2946 | ROM_LOAD( "gal_hb_1", 0x0000, 0x0800, CRC(46590e9b) SHA1(5d26578c91adec20d8d8a17d5dade9ef2febcbe5) ) | |
| 2947 | ROM_LOAD( "gal_hb_2", 0x0800, 0x0800, CRC(4e6e671c) SHA1(5948fc7f390f0343b367d333395427ce2f9b2931) ) | |
| 2948 | ROM_LOAD( "gal_hb_3", 0x2000, 0x0800, CRC(d29dc242) SHA1(3f6087fe962ee63c2886ad3f502c1a37d357ba87) ) | |
| 2949 | ROM_LOAD( "gal_hb_4", 0x2800, 0x0800, CRC(d409d292) SHA1(d631c9106106b31b605b6fdf1d4f40e237a725ac) ) | |
| 2950 | ROM_LOAD( "gal_hb_5", 0x4000, 0x0800, CRC(29d3a8c4) SHA1(2e1ef20d980e5033503d8095e9576dcb8f532f41) ) | |
| 2951 | ROM_LOAD( "gal_hb_6", 0x4800, 0x0800, CRC(b016fd15) SHA1(cdfbd531e23438f05a7c3aad99a94ce55912aac3) ) | |
| 2952 | ROM_LOAD( "gal_hb_7", 0x6000, 0x0800, CRC(d2731d27) SHA1(8c4a3d2303d85c3b11803c577a9ad21e6e69011e) ) | |
| 2953 | ROM_LOAD( "gal_hb_8", 0x6800, 0x0800, CRC(e4b1a666) SHA1(9f73d17cff208374d587536e783be024fc9ab700) ) | |
| 2954 | ||
| 2700 | 2955 | ROM_REGION( 0x1000, "gfx1", 0 ) |
| 2701 | ROM_LOAD( "hustler.5f", 0x0000, 0x0800, CRC(0bdfad0e) SHA1(8e6f1737604f3801c03fa2e9a5e6a2778b54bae8) ) // vidpoolh.bin | |
| 2702 | ROM_LOAD( "hustler.5h", 0x0800, 0x0800, CRC(8e062177) SHA1(7e52a1669804b6c2f694cfc64b04abc8246bb0c2) ) // vidpoolk.bin | |
| 2956 | ROM_LOAD( "gal_hb_kl", 0x0000, 0x0800, CRC(3977650e) SHA1(1de05d6ceed3f2ed0925caa8235b63a93f03f61e) ) | |
| 2957 | ROM_LOAD( "gal_hb_hj", 0x0800, 0x0800, CRC(db489c3d) SHA1(df08607ad07222c1c1c4b3589b50b785bdeefbf2) ) | |
| 2703 | 2958 | |
| 2704 | 2959 | ROM_REGION( 0x0020, "proms", 0 ) |
| 2705 | ROM_LOAD( " | |
| 2960 | ROM_LOAD( "ga | |
| 2706 | 2961 | ROM_END |
| 2707 | 2962 | |
| 2708 | 2963 | ROM_START( drivfrcg ) |
| r7356 | r7357 | |
| 2767 | 3022 | ROM_LOAD( "bot.clr", 0x0020, 0x0020, CRC(0f0782af) SHA1(32c0dd09ead5c70cee2657e9cb8cb9fcf54c5a6a) ) |
| 2768 | 3023 | ROM_END |
| 2769 | 3024 | |
| 2770 | ROM_START( bongo ) | |
| 2771 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2772 | ROM_LOAD( "bg1.bin", 0x0000, 0x1000, CRC(de9a8ec6) SHA1(b5ee99b26d1a39e31b643ad0f5723ee8e364023e) ) | |
| 2773 | ROM_LOAD( "bg2.bin", 0x1000, 0x1000, CRC(a19da662) SHA1(a2674392d489c5e5eeb9abc51572a37cc6045220) ) | |
| 2774 | ROM_LOAD( "bg3.bin", 0x2000, 0x1000, CRC(9f6f2150) SHA1(26a1f872686ddddcdb690d7b826ba26c20cdec35) ) | |
| 2775 | ROM_LOAD( "bg4.bin", 0x3000, 0x1000, CRC(f80372d2) SHA1(078e2c8b947103c168c0c85430f8ebc9d09f8ba7) ) | |
| 2776 | ROM_LOAD( "bg5.bin", 0x4000, 0x1000, CRC(fc92eade) SHA1(f4012a1c4631388a3e8109a8381bc4084ddc8757) ) | |
| 2777 | ROM_LOAD( "bg6.bin", 0x5000, 0x1000, CRC(561d9e5d) SHA1(68d7fab3cfb5b3360fe8064c70bf21bb1341032f) ) | |
| 2778 | ||
| 2779 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 2780 | ROM_LOAD( "b-h.bin", 0x0000, 0x1000, CRC(fc79d103) SHA1(dac1152221ebdc4cd9bf353b4cc5d45021ca5d9e) ) | |
| 2781 | ROM_LOAD( "b-k.bin", 0x1000, 0x1000, CRC(94d17bf3) SHA1(2a70968249946de52c5a4cfabafbbf4ecda844a8) ) | |
| 2782 | ||
| 2783 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2784 | ROM_LOAD( "b-clr.bin", 0x0000, 0x0020, CRC(c4761ada) SHA1(067d12b2d3635ffa6337ed234ba42717447bea00) ) | |
| 2785 | ROM_END | |
| 2786 | ||
| 2787 | ROM_START( hunchbkg ) | |
| 2788 | ROM_REGION( 0x8000, "maincpu", 0 ) | |
| 2789 | ROM_LOAD( "gal_hb_1", 0x0000, 0x0800, CRC(46590e9b) SHA1(5d26578c91adec20d8d8a17d5dade9ef2febcbe5) ) | |
| 2790 | ROM_LOAD( "gal_hb_2", 0x0800, 0x0800, CRC(4e6e671c) SHA1(5948fc7f390f0343b367d333395427ce2f9b2931) ) | |
| 2791 | ROM_LOAD( "gal_hb_3", 0x2000, 0x0800, CRC(d29dc242) SHA1(3f6087fe962ee63c2886ad3f502c1a37d357ba87) ) | |
| 2792 | ROM_LOAD( "gal_hb_4", 0x2800, 0x0800, CRC(d409d292) SHA1(d631c9106106b31b605b6fdf1d4f40e237a725ac) ) | |
| 2793 | ROM_LOAD( "gal_hb_5", 0x4000, 0x0800, CRC(29d3a8c4) SHA1(2e1ef20d980e5033503d8095e9576dcb8f532f41) ) | |
| 2794 | ROM_LOAD( "gal_hb_6", 0x4800, 0x0800, CRC(b016fd15) SHA1(cdfbd531e23438f05a7c3aad99a94ce55912aac3) ) | |
| 2795 | ROM_LOAD( "gal_hb_7", 0x6000, 0x0800, CRC(d2731d27) SHA1(8c4a3d2303d85c3b11803c577a9ad21e6e69011e) ) | |
| 2796 | ROM_LOAD( "gal_hb_8", 0x6800, 0x0800, CRC(e4b1a666) SHA1(9f73d17cff208374d587536e783be024fc9ab700) ) | |
| 2797 | ||
| 2798 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 2799 | ROM_LOAD( "gal_hb_kl", 0x0000, 0x0800, CRC(3977650e) SHA1(1de05d6ceed3f2ed0925caa8235b63a93f03f61e) ) | |
| 2800 | ROM_LOAD( "gal_hb_hj", 0x0800, 0x0800, CRC(db489c3d) SHA1(df08607ad07222c1c1c4b3589b50b785bdeefbf2) ) | |
| 2801 | ||
| 2802 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2803 | ROM_LOAD( "gal_hb_cp", 0x0000, 0x0020, CRC(cbff6762) SHA1(4515a6e12a0a5c485a55291feee17a571120a549) ) | |
| 2804 | ROM_END | |
| 2805 | ||
| 2806 | ROM_START( harem ) | |
| 2807 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2808 | ROM_LOAD( "p0_ic85.bin", 0x0000, 0x2000, CRC(4521b753) SHA1(9033f9c3be8fec1e5ff251e9f60faaf3848a1a1e) ) | |
| 2809 | ROM_LOAD( "p1_ic87.bin", 0x8000, 0x2000, BAD_DUMP CRC(3cc5d1e8) SHA1(827e2d20de2a00ec016ead249ed3afdccd0c856c) ) | |
| 2810 | ||
| 2811 | ROM_REGION( 0x10000, "audiocpu", 0 ) | |
| 2812 | ROM_LOAD( "s1_ic12.bin", 0x0000, 0x2000, CRC(b54799dd) SHA1(b6aeb010257cba48a52afd33b4f8031c7d99550c) ) | |
| 2813 | ROM_LOAD( "s2_ic13.bin", 0x2000, 0x1000, CRC(2d5573a4) SHA1(1fdcd99d89e078509634742b2116a35bb199fe4b) ) | |
| 2814 | ||
| 2815 | ROM_REGION( 0x2000, "unknown", 0 ) | |
| 2816 | ROM_LOAD( "a1_ic25.bin", 0x0000, 0x2000, CRC(279f923a) SHA1(166b1b625997766f0de7cc18af52c42268022fcb) ) | |
| 2817 | ||
| 2818 | ROM_REGION( 0x4000, "gfx1", 0 ) | |
| 2819 | ROM_LOAD( "m0_ic36.bin", 0x0000, 0x2000, CRC(64b3c6d6) SHA1(e71092585f7ffdae85b2a4c9add1bc71e5a608a8) ) | |
| 2820 | ROM_LOAD( "m1_ic37.bin", 0x2000, 0x2000, CRC(cb0324fb) SHA1(61612f683810339d5d5f31daa4c475d0338d446f) ) | |
| 2821 | ||
| 2822 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2823 | ROM_LOAD( "harem.clr", 0x0000, 0x0020, CRC(c9a2bf73) SHA1(dad65ebf43a5df147e334afd552e67f5fcd26df7) ) | |
| 2824 | ROM_END | |
| 2825 | ||
| 2826 | ROM_START( tazzmang ) | |
| 2827 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2828 | ROM_LOAD( "tazzm1.4k", 0x0000, 0x1000, CRC(a14480a1) SHA1(60dac6b57e8331cc4daedaf87faf3e3acc68f378) ) | |
| 2829 | ROM_LOAD( "tazzm2.5j", 0x1000, 0x1000, CRC(5609f5db) SHA1(3fc50109ea0e012e3e310ae4f5dd0cf460bdca52) ) | |
| 2830 | ROM_LOAD( "tazzm3.6f", 0x2000, 0x1000, CRC(fe7f7002) SHA1(ac4134c07a798328b18994010bcaf6b3f728466a) ) | |
| 2831 | ROM_LOAD( "tazzm4.7e", 0x3000, 0x1000, CRC(c9ca1d0a) SHA1(d420ca2e926174e17215212278c86ba9bbb3d9dc) ) | |
| 2832 | ROM_LOAD( "tazzm5.7l", 0x4000, 0x1000, CRC(f50cd8a6) SHA1(b59ca37171b9acc9854f1beae43cfa5643219a5f) ) | |
| 2833 | ROM_LOAD( "tazzm6.7l", 0x5000, 0x1000, CRC(5cf2e7d2) SHA1(ad89e2655164e0fc5ecc9af70c5f0dd9b094d432) ) | |
| 2834 | ||
| 2835 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 2836 | ROM_LOAD( "tazm8.1lk", 0x0000, 0x0800, CRC(2c5b612b) SHA1(32e3a41a9a4a8b1285b6a195213ff0d98012360a) ) | |
| 2837 | ROM_LOAD( "tazzm7.1jh", 0x0800, 0x0800, CRC(3f5ff3ac) SHA1(bc70eef54a45b52c14e35464e5f06b5eec554eb6) ) | |
| 2838 | ||
| 2839 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2840 | ROM_LOAD( "prom.6l", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) | |
| 2841 | ROM_END | |
| 2842 | ||
| 2843 | 3025 | ROM_START( racknrol ) |
| 2844 | 3026 | ROM_REGION( 0x8000, "maincpu", 0 ) |
| 2845 | 3027 | ROM_LOAD( "horz_p.bin", 0x0000, 0x1000, CRC(32ca5b43) SHA1(f3e7662f947dcdd80f6eae4f002d2fe64a825aff) ) |
| r7356 | r7357 | |
| 2915 | 3097 | ROM_LOAD( "senko1.bin", 0x0000, 0x0020, CRC(1434c7ff) SHA1(0ee5f5351dd84fbf8d3d8eaafbdbe86dd29960f8) ) |
| 2916 | 3098 | ROM_END |
| 2917 | 3099 | |
| 2918 | /* | |
| 2919 | Crazy Kong | |
| 2920 | Bootleg, 1982 | |
| 2921 | ||
| 2922 | PCB Layout | |
| 2923 | ---------- | |
| 2924 | ||
| 2925 | |----------------------------------------------| | |
| 2926 | | AY3-8910 MB7051 2125 2125 | | |
| 2927 | | LM3900 ROM.5S MB7051 2125 2125 | | |
| 2928 | | MB7051 2125 2125 | | |
| 2929 | | ROM.5R | | |
| 2930 | | | | |
| 2931 | |1 ROM.5N | | |
| 2932 | |8 | | |
| 2933 | |W ROM.5M ROM.11N | | |
| 2934 | |A ROM.11L | | |
| 2935 | |Y ROM.5K 2114 ROM.11K | | |
| 2936 | | VOL 2114 ROM.11H | | |
| 2937 | | ROM.5H 2114 | | |
| 2938 | | Z80 2114 | | |
| 2939 | | ROM.5F | | |
| 2940 | | 2114 | | |
| 2941 | | 2114 ROM.5D 5101 ROM.11C | | |
| 2942 | | | | |
| 2943 | |HA1368 DSW(8) 6116 18.432MHz 5101 ROM.11A | | |
| 2944 | |----------------------------------------------| | |
| 2945 | Notes: | |
| 2946 | Z80 : Clock running at 3.072MHz (18.432/6) | |
| 2947 | AY3-8910: Clock running at 1.536MHz (18.432/12) | |
| 2948 | 2125 : 1K x1 SRAM (DIP16) | |
| 2949 | 2114 : 1K x4 SRAM (DIP18) | |
| 2950 | 6116 : 2K x8 SRAM (DIP24) | |
| 2951 | 5101 : 256 x4 SRAM (SDIP22) | |
| 2952 | LM3900 : National Semiconductor LM3900 Quadruple Norton Operational Amplifier (DIP14) | |
| 2953 | HA1368 : Hitachi HA1368 18V, 4.5A, 5.3W Audio Power Amplifier IC | |
| 2954 | MB7051 : Hitachi MB7051 32bytes x8 Bipolar PROM (DIP16) | |
| 2955 | */ | |
| 2956 | ||
| 2957 | ROM_START( ckongg ) | |
| 2958 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2959 | ROM_LOAD( "ck1.bin", 0x2400, 0x0400, CRC(a4323b94) SHA1(1fed47e1df5efa8f40585bedab07b60067edc2bb) ) | |
| 2960 | ROM_CONTINUE( 0x1C00, 0x0400) | |
| 2961 | ROM_CONTINUE( 0x4800, 0x0400) | |
| 2962 | ROM_CONTINUE( 0x0C00, 0x0400) | |
| 2963 | ROM_LOAD( "ck2.bin", 0x4400, 0x0400, CRC(1e532996) SHA1(fe1feeca347fccd266925614a46c98cff683f5d3) ) | |
| 2964 | ROM_CONTINUE( 0x0000, 0x0400) | |
| 2965 | ROM_CONTINUE( 0x1800, 0x0400) | |
| 2966 | ROM_CONTINUE( 0x2800, 0x0400) | |
| 2967 | ROM_LOAD( "ck3.bin", 0x3400, 0x0400, CRC(65157cde) SHA1(572b9bd56894600e21220356d0bf193c7920672c) ) | |
| 2968 | ROM_CONTINUE( 0x4c00, 0x0400) | |
| 2969 | ROM_CONTINUE( 0x5000, 0x0400) | |
| 2970 | ROM_CONTINUE( 0x0400, 0x0400) | |
| 2971 | ROM_LOAD( "ck4.bin", 0x2000, 0x0400, CRC(43827bc6) SHA1(a2ca9afff0dd1bdcfc3a6ead9ff30b7c91caa7ea) ) | |
| 2972 | ROM_CONTINUE( 0x3800, 0x0400) | |
| 2973 | ROM_CONTINUE( 0x1000, 0x0400) | |
| 2974 | ROM_CONTINUE( 0x4000, 0x0400) | |
| 2975 | ROM_LOAD( "ck5.bin", 0x0800, 0x0400, CRC(a74ed96e) SHA1(1e845d693a728fea9d52953b5493ec98fdec63e3) ) | |
| 2976 | ROM_CONTINUE( 0x5400, 0x0400) // fill | |
| 2977 | ROM_CONTINUE( 0x2c00, 0x0400) | |
| 2978 | ROM_CONTINUE( 0x1400, 0x0400) | |
| 2979 | ROM_LOAD( "ck7.bin", 0x3000, 0x0400, CRC(2c4d8129) SHA1(ab1708ff72ee027106fe8da0caea03a796b3212b) ) | |
| 2980 | ROM_CONTINUE( 0x3c00, 0x0400) | |
| 2981 | ||
| 2982 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 2983 | ROM_LOAD( "ckvid10.bin", 0x0000, 0x1000, CRC(7866d2cb) SHA1(62dd8b80bc0459c7337d8a8cb83e53b999e7f4a9) ) | |
| 2984 | ROM_LOAD( "ckvid7.bin", 0x1000, 0x1000, CRC(7311a101) SHA1(49d54c8b94cae4ba81d7a7684eaa4e87815bb4da) ) | |
| 2985 | ||
| 2986 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 2987 | ROM_LOAD( "ck_cp.bin", 0x0000, 0x0020, CRC(7e0b79cb) SHA1(72ef3eb5f09e10c13dcf6fd568a6d16658055a16) ) | |
| 2988 | ROM_END | |
| 2989 | ||
| 2990 | ROM_START( ckongmc ) | |
| 2991 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 2992 | ROM_LOAD( "kc1.bin", 0x0000, 0x0800, CRC(a87fc828) SHA1(f66b72427d8cdfabdf2274e22bdb10018ac7d2f9) ) | |
| 2993 | ROM_CONTINUE( 0x2000, 0x0800) | |
| 2994 | ROM_LOAD( "kc2.bin", 0x0800, 0x0800, CRC(94a13dec) SHA1(d3bfd5a266bb1f0e66d847e15b51bdd4c9a15e37) ) | |
| 2995 | ROM_CONTINUE( 0x2800, 0x0800) | |
| 2996 | ROM_LOAD( "kc3.bin", 0x1000, 0x0800, CRC(5efc6705) SHA1(9af59a9cb58599b1c7ce0a063929531f6c73b912) ) | |
| 2997 | ROM_CONTINUE( 0x3000, 0x0800) | |
| 2998 | ROM_LOAD( "kc4.bin", 0x1800, 0x0800, CRC(ac917d66) SHA1(63a0db01bb93e052fec64fa69ebcbae3b0b8aa04) ) | |
| 2999 | ROM_CONTINUE( 0x3800, 0x0800) | |
| 3000 | ROM_LOAD( "kc5.bin", 0x4000, 0x0800, CRC(5a9ee1ed) SHA1(1bc420a42a4931c389b4f8db451de7c59786dfbc) ) | |
| 3001 | ROM_LOAD( "kc6.bin", 0x4800, 0x0800, CRC(f787431e) SHA1(5cee497b8f4072509920d982470cbe06bd18f88b) ) | |
| 3002 | ROM_LOAD( "kc7.bin", 0x5000, 0x0800, CRC(7a185e31) SHA1(a257f32958af6b2c1c9007b46bd1dc984670b0d9) ) | |
| 3003 | ||
| 3004 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 3005 | ROM_LOAD( "kc8carat.bin", 0x0000, 0x1000, CRC(7866d2cb) SHA1(62dd8b80bc0459c7337d8a8cb83e53b999e7f4a9) ) | |
| 3006 | ROM_LOAD( "kc9carat.bin", 0x1000, 0x1000, CRC(7311a101) SHA1(49d54c8b94cae4ba81d7a7684eaa4e87815bb4da) ) | |
| 3007 | ||
| 3008 | ROM_REGION( 0x0020, "proms", 0 ) // not in this set | |
| 3009 | ROM_LOAD( "ck_cp.bin", 0x0000, 0x0020, CRC(7e0b79cb) SHA1(72ef3eb5f09e10c13dcf6fd568a6d16658055a16) ) | |
| 3010 | ROM_END | |
| 3011 | ||
| 3012 | ||
| 3013 | ROM_START( porter ) | |
| 3014 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 3015 | ROM_LOAD( "port1.bin", 0x0000, 0x0800, CRC(babaf7fe) SHA1(2138abf57990df9b6f9953efd3be9b2bede49520) ) | |
| 3016 | ROM_CONTINUE( 0x2000, 0x0800) | |
| 3017 | ROM_LOAD( "port2.bin", 0x0800, 0x0800, CRC(8f7eb0e3) SHA1(7ac5bfc0bb8b6a7a3e9acab5ce9a53f7cba1fca5) ) | |
| 3018 | ROM_CONTINUE( 0x2800, 0x0800) | |
| 3019 | ROM_LOAD( "port3.bin", 0x1000, 0x0800, CRC(683939b5) SHA1(caf69b03794cb5cf63b1aa52cf8ef355a3aeef87) ) | |
| 3020 | ROM_CONTINUE( 0x3000, 0x0800) | |
| 3021 | ROM_LOAD( "port4.bin", 0x1800, 0x0800, CRC(6a65d58d) SHA1(05824a41b2912f12bff7887e7483cb3f4367d339) ) | |
| 3022 | ROM_CONTINUE( 0x3800,0x0800) | |
| 3023 | ROM_LOAD( "port5.bin", 0x4000, 0x0800, CRC(2978a9aa) SHA1(99ec75c7f83f4858b26e083b50fde41fbcfe449a) ) | |
| 3024 | ROM_LOAD( "port6.bin", 0x4800, 0x0800, CRC(7ecdffb5) SHA1(18ce71b670503bef039c6bfb0aed5e8c10e9eb2d) ) | |
| 3025 | ||
| 3026 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 3027 | ROM_LOAD( "port7.bin", 0x0000, 0x1000, CRC(603294f9) SHA1(168b90fdf38cd2e2c7f54cde16b4d83dc5bb3046) ) | |
| 3028 | ROM_LOAD( "port8.bin", 0x1000, 0x1000, CRC(b66a763d) SHA1(995b473b1942ff666b0989993587e41e89542172) ) | |
| 3029 | ||
| 3030 | ROM_REGION( 0x0020, "proms", 0 ) // not in the set | |
| 3031 | ROM_LOAD( "mmi6331.6l", 0x0000, 0x0020, BAD_DUMP CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) /* Compatible with 82s123 prom */ | |
| 3032 | ROM_END | |
| 3033 | ||
| 3034 | ||
| 3035 | /* | |
| 3036 | ||
| 3037 | on a cocktail galaxian pcb (eagle style) | |
| 3038 | ||
| 3039 | this had a CPU daughtercard with 3 unknown prom/pal/gal type things on it: | |
| 3040 | ||
| 3041 | Harris M3-7643-5 x2 | |
| 3042 | TI SN746471 ? (number has been partially obliterated on purpose. | |
| 3043 | and a 74ls126 | |
| 3044 | ||
| 3045 | The CPU has 'VIDEO STARS - V.S PRO - TEL: 03045 61541' on a sticky label on it. | |
| 3046 | ||
| 3047 | the cpu daughterboard is etched 'competitive video'. | |
| 3048 | ||
| 3049 | The rom daughtercard may not have come from this precise pcb, | |
| 3050 | i think it was on a fullsize pcb according to the spacing of the riser pins. | |
| 3051 | This daughterboard is also etched competitive video, and uses 4 2716's and 3 2732's. | |
| 3052 | ||
| 3053 | there are 8 rom sockets on this daughterboard, 7 are roms, and the final socket is actually a 6116 ram. | |
| 3054 | ||
| 3055 | there is a small prom in the midle of the pcb inbetween the risers, | |
| 3056 | with a circular red labelled saying 'k'. This might be a decryption prom or somethign? i dunno. | |
| 3057 | ||
| 3058 | there is a TBP18s03 PROM installed at 6L which i guess is the colour prom :) | |
| 3059 | ||
| 3060 | I think thats about it. | |
| 3061 | ||
| 3062 | Dumped 26.05.04 | |
| 3063 | Andy Welburn | |
| 3064 | www.andys-arcade.com | |
| 3065 | ||
| 3066 | */ | |
| 3067 | ||
| 3068 | /* this rom mapping probably isn't quite right */ | |
| 3069 | ROM_START( vstars ) | |
| 3070 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 3071 | ROM_LOAD( "c-k2.bin", 0x0000, 0x0400, CRC(b0fcf6c1) SHA1(7dc8a7b99977ea9582c1ed36fa9f1fa502a70c6e) ) | |
| 3072 | ROM_CONTINUE( 0x0800, 0x0400) | |
| 3073 | ROM_LOAD( "c-k1.bin", 0x0c00, 0x0400, CRC(ea9603b2) SHA1(f72202f17f862c7ea81e556690f8fcb9ee926e7f) ) | |
| 3074 | ROM_CONTINUE( 0x0400, 0x0400) | |
| 3075 | ROM_LOAD( "c-k4.bin", 0x1c00, 0x0400, CRC(f5743990) SHA1(defd1577b935e3597eba74344dca5626ec2993dd) ) | |
| 3076 | ROM_CONTINUE( 0x1000, 0x0400) | |
| 3077 | ROM_LOAD( "c-k3.bin", 0x1400, 0x0400, CRC(c4338a77) SHA1(b1ca2d43340b671ef33f3a96ce8e1c286a3e6d80) ) | |
| 3078 | ROM_CONTINUE( 0x1800, 0x0400) | |
| 3079 | ROM_LOAD( "c-k6.bin", 0x2c00, 0x0400, CRC(184b9d7e) SHA1(80159ab19233ce95e9c74d039b6777d01b32e959) ) | |
| 3080 | ROM_CONTINUE( 0x2000, 0x0400) | |
| 3081 | ROM_CONTINUE( 0x2400, 0x0400) | |
| 3082 | ROM_CONTINUE( 0x2800, 0x0400) | |
| 3083 | ROM_LOAD( "c-k7.bin", 0x4c00, 0x0400, CRC(9ddcc06f) SHA1(63bc77d8b3273681ca4e681105a117d19a0f23a5) ) | |
| 3084 | ROM_CONTINUE( 0x4000, 0x0400) | |
| 3085 | ROM_CONTINUE( 0x4400, 0x0400) | |
| 3086 | ROM_CONTINUE( 0x4800, 0x0400) | |
| 3087 | ||
| 3088 | /* seems to be data, can't rearrange based on the jumps */ | |
| 3089 | ROM_LOAD( "c-k5.bin", 0x3c00, 0x0400, CRC(d8df2ec4) SHA1(bef1d4b404cddb8a5f9d4e3f30ee09915c602f56) ) | |
| 3090 | ROM_CONTINUE( 0x3000, 0x0400) | |
| 3091 | ROM_CONTINUE( 0x3400, 0x0400) | |
| 3092 | ROM_CONTINUE( 0x3800, 0x0400) | |
| 3093 | ||
| 3094 | /* Crazy Kong gfx?! */ | |
| 3095 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 3096 | ROM_LOAD( "1h.bin", 0x0000, 0x1000, CRC(7866d2cb) SHA1(62dd8b80bc0459c7337d8a8cb83e53b999e7f4a9) ) | |
| 3097 | ROM_LOAD( "1k.bin", 0x1000, 0x1000, CRC(7311a101) SHA1(49d54c8b94cae4ba81d7a7684eaa4e87815bb4da) ) | |
| 3098 | ||
| 3099 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 3100 | ROM_LOAD( "6l.bin", 0x0000, 0x0020, CRC(fd81e715) SHA1(eadafe88f26405e6540d4b248b940974e8c31145) ) | |
| 3101 | ||
| 3102 | ROM_REGION( 0x0020, "proms2", 0 ) | |
| 3103 | ROM_LOAD( "k.bin", 0x0000, 0x0020, CRC(d46ed869) SHA1(9c0a11df11b1a24ee933d1aa435337b78c3ca643) ) | |
| 3104 | ROM_END | |
| 3105 | ||
| 3106 | GAME( 1981, scramblb, scramble, scramblb, scramblb, 0, ROT90, "bootleg", "Scramble (Galaxian hardware)", GAME_SUPPORTS_SAVE ) | |
| 3107 | GAME( 1981, scramb2, scramble, scramb2, scramb2, 0, ROT90, "bootleg", "Scramble (bootleg)", GAME_SUPPORTS_SAVE ) | |
| 3108 | ||
| 3109 | GAME( 1981, 4in1, 0, 4in1, 4in1, 4in1, ROT90, "Armenia / Food and Fun", "4 Fun in 1", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 3110 | GAME( 1982, bagmanmc, bagman, bagmanmc, bagmanmc, 0, ROT90, "bootleg", "Bagman (Moon Cresta hardware)", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) | |
| 3111 | GAME( 1982, dkongjrm, dkongjr, dkongjrm, dkongjrm, 0, ROT90, "bootleg", "Donkey Kong Jr. (Moon Cresta hardware)", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 3100 | /* Z80 games */ | |
| 3101 | GAME( 1980, vpool, hustler, mooncrst, vpool, 0, ROT90, "bootleg", "Video Pool (bootleg on Moon Cresta hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3112 | 3102 | GAME( 1981, rockclim, 0, rockclim, rockclim, 0, ROT180, "Taito", "Rock Climber", GAME_SUPPORTS_SAVE ) |
| 3113 | GAME( 1983, ozon1, 0, ozon1, ozon1, 0, ROT90, "Proma", "Ozon I", GAME_SUPPORTS_SAVE ) | |
| 3114 | GAME( 1983, ladybugg, ladybug, batman2, ladybugg, ladybugg, ROT270, "bootleg", "Lady Bug (bootleg on Galaxian hardware)", GAME_SUPPORTS_SAVE ) | |
| 3115 | GAME( 1980, vpool, hustler, mooncrst, vpool, 0, ROT90, "bootleg", "Video Pool (bootleg on Moon Cresta hardware)", GAME_SUPPORTS_SAVE ) | |
| 3103 | GAME( 1981, ckongg, ckong, ckongg, ckongg, 0, ROT90, "bootleg", "Crazy Kong (bootleg on Galaxian hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3104 | GAME( 1981, ckongmc, ckong, ckongmc, ckongmc, 0, ROT90, "bootleg", "Crazy Kong (bootleg on Moon Cresta hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) // set was marked as 'King Kong on Galaxian' | |
| 3105 | GAME( 1981, scramblb, scramble, scramblb, scramblb, 0, ROT90, "bootleg", "Scramble (bootleg on Galaxian hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3106 | GAME( 1981, scramb2, scramble, scramb2, scramb2, 0, ROT90, "bootleg", "Scramble (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3107 | GAME( 1981, 4in1, 0, 4in1, 4in1, 4in1, ROT90, "Armenia / Food and Fun", "4 Fun in 1", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 3108 | GAME( 1982, bagmanmc, bagman, bagmanmc, bagmanmc, 0, ROT90, "bootleg", "Bagman (bootleg on Moon Cresta hardware)", GAME_WRONG_COLORS | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3109 | GAME( 1982, dkongjrm, dkongjr, dkongjrm, dkongjrm, 0, ROT90, "bootleg", "Donkey Kong Jr. (bootleg on Moon Cresta hardware)", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3110 | GAME( 1982, porter, dockman, mooncrst, porter, 0, ROT90, "bootleg", "Port Man (bootleg on Moon Cresta hardware)", GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL ) // missing GFX bank switch! | |
| 3111 | GAME( 1982, tazzmang, tazmania, tazzmang, tazzmang, 0, ROT90, "bootleg", "Tazz-Mania (bootleg on Galaxian hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3112 | GAME( 1983, bongo, 0, bongo, bongo, 0, ROT90, "Jetsoft", "Bongo", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3113 | GAME( 1983, ozon1, 0, ozon1, ozon1, 0, ROT90, "Proma", "Ozon I", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3114 | GAME( 1983, ladybugg, ladybug, batman2, ladybugg, ladybugg, ROT270, "bootleg", "Lady Bug (bootleg on Galaxian hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3115 | GAME( 1982, vstars, 0, mooncrst, porter, 0, ROT90, "Competitive Video?", "Video Stars", GAME_NOT_WORKING ) | |
| 3116 | GAME( 1983, harem, 0, harem, harem, 0, ROT90, "I.G.R.", "Harem", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 3117 | ||
| 3118 | /* S2650 games */ | |
| 3119 | GAME( 1983, hunchbkg, hunchbak, hunchbkg, hunchbkg, 0, ROT90, "Century Electronics", "Hunchback (Galaxian hardware)", GAME_SUPPORTS_SAVE ) | |
| 3116 | 3120 | GAME( 1984, drivfrcg, drivfrcp, drivfrcg, drivfrcg, 0, ROT90, "Shinkai Inc. (Magic Eletronics USA licence)", "Driving Force (Galaxian conversion)", GAME_SUPPORTS_SAVE ) |
| 3117 | 3121 | GAME( 1985, drivfrcb, drivfrcp, drivfrcg, drivfrcg, 0, ROT90, "bootleg", "Driving Force (Galaxian conversion bootleg)", GAME_SUPPORTS_SAVE ) |
| 3118 | GAME( 1983, bongo, 0, bongo, bongo, 0, ROT90, "Jetsoft", "Bongo", GAME_SUPPORTS_SAVE ) | |
| 3119 | GAME( 1983, hunchbkg, hunchbak, hunchbkg, hunchbkg, 0, ROT90, "Century Electronics", "Hunchback (Galaxian hardware)", GAME_SUPPORTS_SAVE ) | |
| 3120 | GAME( 1983, harem, 0, harem, harem, 0, ROT90, "I.G.R.", "Harem", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 3121 | GAME( 1982, tazzmang, tazmania, tazzmang, tazzmang, 0, ROT90, "bootleg", "Tazz-Mania (Galaxian Hardware)", GAME_SUPPORTS_SAVE ) | |
| 3122 | 3122 | GAME( 1986, racknrol, 0, racknrol, racknrol, 0, ROT0, "Status (Shinkai License)", "Rack + Roll", GAME_SUPPORTS_SAVE ) |
| 3123 | 3123 | GAME( 1986, hexpool, racknrol, racknrol, racknrol, 0, ROT90, "Shinkai", "Hex Pool (Shinkai)", GAME_SUPPORTS_SAVE ) |
| 3124 | 3124 | GAME( 1985, hexpoola, racknrol, hexpoola, racknrol, 0, ROT90, "Senko", "Hex Pool (Senko)", GAME_SUPPORTS_SAVE ) |
| 3125 | 3125 | GAME( 1985, trvchlng, 0, racknrol, trvchlng, 0, ROT90, "Joyland (Senko License)", "Trivia Challenge", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 3126 | GAME( 1981, ckongg, 0, ckongg, ckongg, 0, ROT90, "bootleg", "Crazy Kong (bootleg on Galaxian hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 3127 | GAME( 1981, ckongmc, ckongg, ckongmc, ckongmc, 0, ROT90, "bootleg", "Crazy Kong (bootleg on Moon Cresta hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) // set was marked as 'King Kong on Galaxian' | |
| 3128 | GAME( 1982, porter, 0, mooncrst, porter, 0, ROT90, "[Nova Games Ltd.] (bootleg)", "Port Man (bootleg on Moon Cresta hardware)", GAME_IMPERFECT_GRAPHICS ) // missing GFX bank switch! | |
| 3129 | GAME( 1982, vstars, 0, mooncrst, porter, 0, ROT90, "Competitive Video?", "Video Stars", GAME_NOT_WORKING ) |
| r7356 | r7357 | |
|---|---|---|
| 1 | 1 | #include "emu.h" |
| 2 | #include "megadriv.h" | |
| 2 | #include "includes/megadriv.h" | |
| 3 | 3 | |
| 4 | 4 | /* Sunset Riders bootleg - based on Genesis / Megadrive version |
| 5 | 5 |
| r7356 | r7357 | |
|---|---|---|
| 858 | 858 | PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12) |
| 859 | 859 | INPUT_PORTS_END |
| 860 | 860 | |
| 861 | static INPUT_PORTS_START( midresb ) | |
| 862 | PORT_INCLUDE( dec0 ) | |
| 863 | ||
| 864 | PORT_START("DSW") | |
| 865 | DEC0_COIN_SETTING | |
| 866 | PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW1:5" ) // Always OFF | |
| 867 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:6") | |
| 868 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) | |
| 869 | PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) | |
| 870 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:7") | |
| 871 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 872 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 873 | PORT_DIPUNUSED_DIPLOC( 0x0080, 0x0080, "SW1:8" ) // Always OFF | |
| 874 | ||
| 875 | PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") | |
| 876 | PORT_DIPSETTING( 0x0300, "3" ) | |
| 877 | PORT_DIPSETTING( 0x0200, "4" ) | |
| 878 | PORT_DIPSETTING( 0x0100, "5" ) | |
| 879 | PORT_DIPSETTING( 0x0000, "Infinite (Cheat)") | |
| 880 | PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4") | |
| 881 | PORT_DIPSETTING( 0x0800, DEF_STR( Easy ) ) | |
| 882 | PORT_DIPSETTING( 0x0c00, DEF_STR( Normal ) ) | |
| 883 | PORT_DIPSETTING( 0x0400, DEF_STR( Hard ) ) | |
| 884 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) | |
| 885 | PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5") /* manual mentions Extra Lives - Default OFF */ | |
| 886 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 887 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 888 | PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") /* manual mentions Extra Lives - Default OFF */ | |
| 889 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 890 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 891 | PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:7") | |
| 892 | PORT_DIPSETTING( 0x4000, DEF_STR( No ) ) | |
| 893 | PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) | |
| 894 | PORT_DIPUNUSED_DIPLOC( 0x8000, 0x8000, "SW2:8" ) // Always OFF | |
| 895 | ||
| 896 | PORT_START("AN0") /* player 1 12-way rotary control - converted in controls_r() */ | |
| 897 | PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12) | |
| 898 | ||
| 899 | PORT_START("AN1") /* player 2 12-way rotary control - converted in controls_r() */ | |
| 900 | PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12) | |
| 901 | INPUT_PORTS_END | |
| 902 | ||
| 861 | 903 | static INPUT_PORTS_START( bouldash ) |
| 862 | 904 | PORT_INCLUDE( dec1 ) |
| 863 | 905 | |
| r7356 | r7357 | |
| 1528 | 1570 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.40) |
| 1529 | 1571 | MACHINE_DRIVER_END |
| 1530 | 1572 | |
| 1573 | static MACHINE_DRIVER_START( midresb ) | |
| 1574 | MDRV_IMPORT_FROM(midres) | |
| 1575 | ||
| 1576 | MDRV_CPU_REPLACE("audiocpu", M6502, 1500000 ) | |
| 1577 | MDRV_CPU_PROGRAM_MAP(dec0_s_map) | |
| 1578 | ||
| 1579 | MDRV_SOUND_MODIFY("ym2") | |
| 1580 | MDRV_SOUND_CONFIG(ym3812_config) | |
| 1581 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) | |
| 1582 | MACHINE_DRIVER_END | |
| 1583 | ||
| 1531 | 1584 | /******************************************************************************/ |
| 1532 | 1585 | |
| 1533 | 1586 | ROM_START( hbarrel ) |
| r7356 | r7357 | |
| 2853 | 2906 | dump_to_file(machine,R, 0x70000, 0x08000); |
| 2854 | 2907 | } |
| 2855 | 2908 | #endif |
| 2909 | ||
| 2910 | static DRIVER_INIT( midresb ) | |
| 2911 | { | |
| 2912 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x00180000, 0x0018000f, 0, 0, dec0_controls_r ); | |
| 2913 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x001a0000, 0x001a000f, 0, 0, dec0_rotary_r ); | |
| 2914 | ||
| 2915 | memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x00180014, 0x00180015, 0, 0, midres_sound_w ); | |
| 2916 | } | |
| 2917 | ||
| 2856 | 2918 | /******************************************************************************/ |
| 2857 | 2919 | |
| 2858 | 2920 | GAME( 1987, hbarrel, 0, hbarrel, hbarrel, hbarrel, ROT270, "Data East USA", "Heavy Barrel (US)", 0 ) |
| r7356 | r7357 | |
| 2879 | 2941 | GAME( 1989, midres, 0, midres, midres, 0, ROT0, "Data East Corporation", "Midnight Resistance (World)", 0 ) |
| 2880 | 2942 | GAME( 1989, midresu, midres, midres, midres, 0, ROT0, "Data East USA", "Midnight Resistance (US)", 0 ) |
| 2881 | 2943 | GAME( 1989, midresj, midres, midres, midres, 0, ROT0, "Data East Corporation", "Midnight Resistance (Japan)", 0 ) |
| 2882 | GAME( 1989, midresb, midres, midres, | |
| 2944 | GAME( 1989, midresb, midres, midresb, | |
| 2883 | 2945 | GAME( 1990, bouldash, 0, slyspy, bouldash, slyspy, ROT0, "Data East Corporation (licensed from First Star)", "Boulder Dash / Boulder Dash Part 2 (World)", 0 ) |
| 2884 | 2946 | GAME( 1990, bouldashj,bouldash, slyspy, bouldash, slyspy, ROT0, "Data East Corporation (licensed from First Star)", "Boulder Dash / Boulder Dash Part 2 (Japan)", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 2347 | 2347 | |
| 2348 | 2348 | /*****************************************************************************/ |
| 2349 | 2349 | |
| 2350 | GAME( 2000, ppp, | |
| 2350 | GAME( 2000, ppp, 0, firebeat, ppp, ppp, ROT0, "Konami", "ParaParaParadise", GAME_NOT_WORKING) | |
| 2351 | 2351 | GAME( 2000, ppd, 0, firebeat, ppp, ppd, ROT0, "Konami", "ParaParaDancing", GAME_NOT_WORKING) |
| 2352 | GAME( 2000, ppp11, | |
| 2352 | GAME( 2000, ppp11, 0, firebeat, ppp, ppp, ROT0, "Konami", "ParaParaParadise v1.1", GAME_NOT_WORKING) | |
| 2353 | 2353 | GAMEL(2000, kbm, 0, firebeat2, kbm, kbm, ROT270, "Konami", "Keyboardmania", GAME_NOT_WORKING, layout_firebeat) |
| 2354 | 2354 | GAMEL(2000, kbm2nd, 0, firebeat2, kbm, kbm, ROT270, "Konami", "Keyboardmania 2nd Mix", GAME_NOT_WORKING, layout_firebeat) |
| 2355 | 2355 | GAMEL(2001, kbm3rd, 0, firebeat2, kbm, kbm, ROT270, "Konami", "Keyboardmania 3rd Mix", GAME_NOT_WORKING, layout_firebeat) |
| r7356 | r7357 | |
|---|---|---|
| 294 | 294 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL |
| 295 | 295 | INPUT_PORTS_END |
| 296 | 296 | |
| 297 | static INPUT_PORTS_START( bigevglj ) | |
| 297 | static INPUT_PORTS_START( bigevglfj ) | |
| 298 | 298 | PORT_INCLUDE(bigevglf) |
| 299 | 299 | |
| 300 | 300 | PORT_MODIFY("DSW2") |
| r7356 | r7357 | |
| 641 | 641 | } |
| 642 | 642 | |
| 643 | 643 | GAME( 1986, bigevglf, 0, bigevglf, bigevglf, bigevglf, ROT270, "Taito America Corporation", "Big Event Golf (US)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
| 644 | GAME( 1986, bigevglfj, bigevglf, bigevglf, bigevglj, | |
| 644 | GAME( 1986, bigevglfj, bigevglf, bigevglf, bigevglfj, |
| r7356 | r7357 | |
|---|---|---|
| 957 | 957 | *bagman_video_enable = 1; |
| 958 | 958 | } |
| 959 | 959 | |
| 960 | GAME( 1982, bagman, 0, | |
| 960 | GAME( 1982, bagman, 0, | |
| 961 | 961 | GAME( 1982, bagnard, bagman, bagman, bagman, 0, ROT270, "Valadon Automation", "Le Bagnard (set 1)", 0 ) |
| 962 | 962 | GAME( 1982, bagnarda, bagman, bagman, bagman, bagnarda, ROT270, "Valadon Automation", "Le Bagnard (set 2)", 0 ) |
| 963 | 963 | GAME( 1982, bagmans, bagman, bagman, bagmans, 0, ROT270, "Valadon Automation (Stern license)", "Bagman (Stern set 1)", 0 ) |
| 964 | 964 | GAME( 1982, bagmans2, bagman, bagman, bagman, 0, ROT270, "Valadon Automation (Stern license)", "Bagman (Stern set 2)", 0 ) |
| 965 | GAME( 1984, sbagman, 0, | |
| 965 | GAME( 1984, sbagman, 0, | |
| 966 | 966 | GAME( 1984, sbagmans, sbagman, bagman, sbagman, 0, ROT270, "Valadon Automation (Stern license)", "Super Bagman (Stern)", 0 ) |
| 967 | GAME( 1983, pickin, 0, pickin, pickin, 0, ROT270, "Valadon Automation", "Pickin'", 0 ) | |
| 968 | GAME( 1984, botanic, 0, botanic, botanic, 0, ROT270, "Valadon Automation (Itisa license)", "Botanic", 0 ) | |
| 969 | GAME( 1984, squaitsa, 0, squaitsa,squaitsa,0, ROT0, "Itisa", "Squash (Itisa)", 0 ) | |
| 967 | GAME( 1983, pickin, 0, pickin, pickin, 0, ROT270, "Valadon Automation", "Pickin'", 0 ) | |
| 968 | GAME( 1984, botanic, 0, botanic, botanic, 0, ROT270, "Valadon Automation (Itisa license)", "Botanic", 0 ) | |
| 969 | GAME( 1984, squaitsa, 0, squaitsa,squaitsa,0, ROT0, "Itisa", "Squash (Itisa)", 0 ) | |
| 970 | 970 |
| r7356 | r7357 | |
|---|---|---|
| 895 | 895 | PORT_DIPSETTING( 0x00, "80k only" ) /* displays "80000" */ |
| 896 | 896 | |
| 897 | 897 | /* hunchbak : DSW2 bit 5 stored at 0x5e97 - code at 0x516c - read back code at 0x6054 */ |
| 898 | /* hunchbka : DSW2 bit 5 stored at 0x1e97 - code at 0x0c0c - read back code at 0x6054 */ | |
| 898 | /* hunchbaka : DSW2 bit 5 stored at 0x1e97 - code at 0x0c0c - read back code at 0x6054 */ | |
| 899 | 899 | INPUT_PORTS_END |
| 900 | 900 | |
| 901 | 901 | static INPUT_PORTS_START( superbik ) |
| r7356 | r7357 | |
| 1616 | 1616 | } |
| 1617 | 1617 | |
| 1618 | 1618 | |
| 1619 | static DRIVER_INIT( hunchbka ) | |
| 1619 | static DRIVER_INIT( hunchbaka ) | |
| 1620 | 1620 | { |
| 1621 | 1621 | UINT8 *ROM = memory_region(machine, "maincpu"); |
| 1622 | 1622 | |
| r7356 | r7357 | |
| 1718 | 1718 | GAME( 1982, diggerc, 0, cvs, diggerc, 0, ROT90, "Century Electronics", "Digger (CVS)", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1719 | 1719 | GAME( 1983, heartatk, 0, cvs, heartatk, 0, ROT90, "Century Electronics", "Heart Attack", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1720 | 1720 | GAME( 1983, hunchbak, 0, cvs, hunchbak, 0, ROT90, "Century Electronics", "Hunchback (set 1)", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1721 | GAME( 1983, hunchbaka, hunchbak, cvs, hunchbak, hunchbka, | |
| 1721 | GAME( 1983, hunchbaka, hunchbak, cvs, hunchbak, hunchbaka, | |
| 1722 | 1722 | GAME( 1983, superbik, 0, cvs, superbik, superbik, ROT90, "Century Electronics", "Superbike", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1723 | 1723 | GAME( 1983, raiders, 0, cvs, raiders, raiders, ROT90, "Century Electronics", "Raiders", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1724 | 1724 | GAME( 1983, hero, 0, cvs, hero, hero, ROT90, "Seatongrove Ltd", "Hero", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 1 | /* | |
| 2 | Happy Jackie (c) 1993 IGS. | |
| 3 | Video Slot machine game for amusement only. | |
| 4 | ||
| 5 | Driver by David Haywood and Mirko Buffoni | |
| 6 | */ | |
| 7 | /* | |
| 8 | ||
| 9 | Anno 199x | |
| 10 | Produttore IGS | |
| 11 | N.revisione | |
| 12 | ||
| 13 | CPU | |
| 14 | ||
| 15 | 1x Z0840006PSC (main) | |
| 16 | 2x D8255AC | |
| 17 | 1x unknown AMT001 | |
| 18 | 1x unknown IGS002 | |
| 19 | 1x UM3567 (sound) | |
| 20 | 1x oscillator 12.000MHz | |
| 21 | 1x oscillator 3.579645 | |
| 22 | ||
| 23 | ROMs | |
| 24 | ||
| 25 | 2x D27128A (1,3) | |
| 26 | 1x MBM27128 (2) | |
| 27 | 3x 27C010 (4,5,6) | |
| 28 | 1x D27512 (7sv) | |
| 29 | 1x MBM27C512 (v110) | |
| 30 | 1x unknown (DIP20 mil300)(jack3) | |
| 31 | 3x PEEL18CV8PC (read protected) | |
| 32 | 1x TIBPAL16L8 (read protected) | |
| 33 | ||
| 34 | Note | |
| 35 | ||
| 36 | 1x 36x2 edge connector | |
| 37 | 1x 10x2 edge connector (payout system) | |
| 38 | 1x trimmer (volume) | |
| 39 | 1x pushbutton | |
| 40 | 1x battery | |
| 41 | 5x 8x2 switches dip | |
| 42 | ||
| 43 | */ | |
| 44 | ||
| 45 | ||
| 1 | 46 | #include "emu.h" |
| 2 | 47 | #include "deprecat.h" |
| 3 | 48 | #include "cpu/z80/z80.h" |
| r7356 | r7357 | |
| 453 | 498 | GFXDECODE_ENTRY( "gfx2", 0, layout_8x32x6, 0, 16 ) |
| 454 | 499 | GFXDECODE_END |
| 455 | 500 | |
| 501 | static DRIVER_INIT( jackie ) | |
| 502 | { | |
| 456 | 503 | |
| 504 | int A; | |
| 505 | UINT8 *rom = memory_region(machine, "maincpu"); | |
| 457 | 506 | |
| 507 | for (A = 0;A < 0xf000;A++) | |
| 508 | { | |
| 509 | rom[A] = rom[A] ^ 0x21; | |
| 510 | ||
| 511 | if (((A & 0x0080) == 0x0000) && ((A & 0x0008) == 0x0000)) rom[A] = rom[A] ^ 0x20; | |
| 512 | if ((A & 0x0282) == 0x0282) rom[A] ^= 0x01; | |
| 513 | if ((A & 0x0940) == 0x0940) rom[A] ^= 0x02; | |
| 514 | } | |
| 515 | memset( &rom[0xf000], 0, 0x1000); | |
| 516 | ||
| 517 | // Patch trap | |
| 518 | rom[0x7e86] = 0xc3; | |
| 519 | } | |
| 520 | ||
| 521 | ||
| 458 | 522 | static MACHINE_DRIVER_START( jackie ) |
| 459 | 523 | |
| 460 | 524 | /* basic machine hardware */ |
| r7356 | r7357 | |
| 487 | 551 | MACHINE_DRIVER_END |
| 488 | 552 | |
| 489 | 553 | |
| 490 | /* | |
| 491 | ||
| 492 | Anno 199x | |
| 493 | Produttore IGS | |
| 494 | N.revisione | |
| 495 | ||
| 496 | CPU | |
| 497 | ||
| 498 | 1x Z0840006PSC (main) | |
| 499 | 2x D8255AC | |
| 500 | 1x unknown AMT001 | |
| 501 | 1x unknown IGS002 | |
| 502 | 1x UM3567 (sound) | |
| 503 | 1x oscillator 12.000MHz | |
| 504 | 1x oscillator 3.579645 | |
| 505 | ||
| 506 | ROMs | |
| 507 | ||
| 508 | 2x D27128A (1,3) | |
| 509 | 1x MBM27128 (2) | |
| 510 | 3x 27C010 (4,5,6) | |
| 511 | 1x D27512 (7sv) | |
| 512 | 1x MBM27C512 (v110) | |
| 513 | 1x unknown (DIP20 mil300)(jack3) | |
| 514 | 3x PEEL18CV8PC (read protected) | |
| 515 | 1x TIBPAL16L8 (read protected) | |
| 516 | ||
| 517 | Note | |
| 518 | ||
| 519 | 1x 36x2 edge connector | |
| 520 | 1x 10x2 edge connector (payout system) | |
| 521 | 1x trimmer (volume) | |
| 522 | 1x pushbutton | |
| 523 | 1x battery | |
| 524 | 5x 8x2 switches dip | |
| 525 | ||
| 526 | */ | |
| 527 | 554 | ROM_START( jackie ) |
| 528 | 555 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 529 | 556 | ROM_LOAD( "jackiev110.u23", 0x0000, 0x10000, CRC(1b78a619) SHA1(a6eb6b6e544efa55225f2e947483614afb6ece3b) ) |
| r7356 | r7357 | |
| 548 | 575 | ROM_LOAD( "18cv8.u9", 0x0000, 0x155, BAD_DUMP CRC(996e8f59) SHA1(630d9b91f6e8eda781061e2a8ff6fb0fecaf034c) ) |
| 549 | 576 | ROM_END |
| 550 | 577 | |
| 551 | static DRIVER_INIT( jackie ) | |
| 552 | { | |
| 553 | 578 | |
| 554 | int A; | |
| 555 | UINT8 *rom = memory_region(machine, "maincpu"); | |
| 556 | ||
| 557 | for (A = 0;A < 0xf000;A++) | |
| 558 | { | |
| 559 | rom[A] = rom[A] ^ 0x21; | |
| 560 | ||
| 561 | if (((A & 0x0080) == 0x0000) && ((A & 0x0008) == 0x0000)) rom[A] = rom[A] ^ 0x20; | |
| 562 | if ((A & 0x0282) == 0x0282) rom[A] ^= 0x01; | |
| 563 | if ((A & 0x0940) == 0x0940) rom[A] ^= 0x02; | |
| 564 | } | |
| 565 | memset( &rom[0xf000], 0, 0x1000); | |
| 566 | ||
| 567 | // Patch trap | |
| 568 | rom[0x7e86] = 0xc3; | |
| 569 | } | |
| 570 | ||
| 571 | 579 | GAME( 1993, jackie, 0, jackie, jackie, jackie, ROT0, "IGS", "Happy Jackie (v110U)", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 795 | 795 | /* works ok but uses right player (2) controls only for trigger and holster */ |
| 796 | 796 | GAME( 1992, maddog2, alg_bios, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "Mad Dog II: The Lost Gold v2.04", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 797 | 797 | GAME( 1992, maddog22, alg_bios, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "Mad Dog II: The Lost Gold v2.02", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 798 | GAME( 1992, maddog21, maddog2, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "Mad Dog II: The Lost Gold v1.0", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 798 | GAME( 1992, maddog21, maddog2, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "Mad Dog II: The Lost Gold v1.0", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 799 | 799 | /* works ok but uses right player (2) controls only for trigger and holster */ |
| 800 | 800 | GAME( 1992, spacepir, alg_bios, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "Space Pirates v2.2", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 801 | 801 | GAME( 1992, gallgall, alg_bios, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "Gallagher's Gallery v2.2", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 802 | 802 | /* all good, but no holster */ |
| 803 | 803 | GAME( 1993, crimepat, alg_bios, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "Crime Patrol v1.4", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 804 | 804 | GAME( 1993, crimep2, alg_bios, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "Crime Patrol 2: Drug Wars v1.3", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 805 | GAME( 1993, crimep211,crimep2, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "Crime Patrol 2: Drug Wars v1.1", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 805 | GAME( 1993, crimep211,crimep2, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "Crime Patrol 2: Drug Wars v1.1", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 806 | 806 | GAME( 1994, lastbh, alg_bios, alg_r2, alg_2p, palr6, ROT0, "American Laser Games", "The Last Bounty Hunter v0.06", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 807 | 807 | GAME( 1995, fastdraw, alg_bios, alg_r2, alg_2p, palr6, ROT90, "American Laser Games", "Fast Draw Showdown v1.3", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 808 | 808 | /* works ok but uses right player (2) controls only for trigger and holster */ |
| r7356 | r7357 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | driver by Mirko Buffoni |
| 6 | 6 | |
| 7 | bombjac2 has YOU ARE LUCY instead of LUCKY, so it's probably an older version | |
| 7 | bombjack2 has YOU ARE LUCY instead of LUCKY, so it's probably an older version | |
| 8 | 8 | |
| 9 | 9 | |
| 10 | 10 | MAIN BOARD: |
| r7356 | r7357 | |
| 85 | 85 | - Ingame bug : if game is reset when screen is flipped, the screen remains |
| 86 | 86 | flipped for the start-up tests and we'll be OK when scores are displayed. |
| 87 | 87 | |
| 88 | - The only difference between 'bombjack' and 'bombjac2' is that 'bombjack' | |
| 88 | - The only difference between 'bombjack' and 'bombjack2' is that 'bombjack' | |
| 89 | 89 | fixes the message when you get a 'S' for extra credit (text at 0xd24a) : |
| 90 | 90 | * 'bombjack' : "YOU ARE LUCKY" |
| 91 | * 'bombjac2' : "YOU ARE LUCY" | |
| 91 | * 'bombjack2' : "YOU ARE LUCY" | |
| 92 | 92 | |
| 93 | 93 | 2008-07 |
| 94 | 94 | Dip Locations and factory settings verified with manual |
| r7356 | r7357 | |
|---|---|---|
| 996 | 996 | PORT_DIPNAME( 0x10, 0x00, "Lives per Credit" ) PORT_DIPLOCATION("S1:5") |
| 997 | 997 | PORT_DIPSETTING( 0x10, "2" ) |
| 998 | 998 | PORT_DIPSETTING( 0x00, "3" ) |
| 999 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("S1:6") | |
| 1000 | PORT_DIPSETTING( 0x00, "Mission 5" ) | |
| 1001 | PORT_DIPSETTING( 0x20, DEF_STR( None ) ) | |
| 999 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("S1:6") | |
| 1000 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1001 | PORT_DIPSETTING( 0x20, "Mission 5" ) | |
| 1002 | 1002 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("S1:7") |
| 1003 | 1003 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1004 | 1004 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r7356 | r7357 | |
| 1008 | 1008 | INPUT_PORTS_END |
| 1009 | 1009 | |
| 1010 | 1010 | |
| 1011 | static INPUT_PORTS_START( gorfg ) | |
| 1011 | static INPUT_PORTS_START( gorfpgm1g ) | |
| 1012 | 1012 | PORT_INCLUDE(gorf) |
| 1013 | 1013 | |
| 1014 | 1014 | PORT_MODIFY("P4HANDLE") |
| r7356 | r7357 | |
| 1838 | 1838 | /* 91354 CPU board + 90708 game board + 91356 RAM board + 91355 pattern board + 91364 ROM/RAM board */ |
| 1839 | 1839 | GAMEL(1981, gorf, 0, gorf, gorf, gorf, ROT270, "Midway", "Gorf", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_gorf ) |
| 1840 | 1840 | GAMEL(1981, gorfpgm1, gorf, gorf, gorf, gorf, ROT270, "Midway", "Gorf (program 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_gorf ) |
| 1841 | GAMEL(1981, gorfpgm1g,gorf, gorf, gorfg, | |
| 1841 | GAMEL(1981, gorfpgm1g,gorf, gorf, gorfpgm1g, | |
| 1842 | 1842 | |
| 1843 | 1843 | /* 91354 CPU board + 90708 game board + 91356 RAM board + 91355 pattern board + 91423 memory board */ |
| 1844 | 1844 | GAME( 1981, robby, 0, robby, robby, robby, ROT0, "Bally Midway", "Robby Roto", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 56 | 56 | /* 21 Nov 1999 - added spacewar3 [LT] */ |
| 57 | 57 | /* */ |
| 58 | 58 | /* 26 May 2001 - added galxwars */ |
| 59 | /* galxwar2 */ | |
| 60 | /* jspectr2 */ | |
| 61 | /* ozmawar2 */ | |
| 59 | /* galxwar2 (galxwars2) */ | |
| 60 | /* jspectr2 (jspecter2) */ | |
| 61 | /* ozmawar2 (ozmawars2) */ | |
| 62 | 62 | /* spaceatt */ |
| 63 | 63 | /* sstrangr */ |
| 64 | 64 | /* */ |
| r7356 | r7357 | |
| 67 | 67 | /* 30 Jul 2001 - added sstrngr2 */ |
| 68 | 68 | /* */ |
| 69 | 69 | /* 17 Jul 2006 - schaser - connect up prom - fix dipswitches */ |
| 70 | /* schasrcv - allow bottom line to show on screen | |
| 70 | /* schasrcv (schasercv) - allow bottom line to show on screen | |
| 71 | 71 | /* */ |
| 72 | 72 | /* */ |
| 73 | 73 | /* 10 Sep 2006 - invadpt2 - add name reset button */ |
| 74 | 74 | /* spcewars - add bitstream circuit, fix dipswitches */ |
| 75 | 75 | /* */ |
| 76 | 76 | /* */ |
| 77 | /* 13 Dec 2006 - add PRELIMINARY sound support and documentation to */ | |
| 78 | /* rollingc, spcenctr, gunfight, m4, gmissile, schasrcv, */ | |
| 79 | /* 280zzzap, lagunar, lupin3, phantom2, blueshrk, desertgu, */ | |
| 80 | /* ballbomb, yasokdon/yosakdoa, shuttlei, invrvnge/invrvnga. */ | |
| 77 | /* 13 Dec 2006 - add PRELIMINARY sound support and documentation to: */ | |
| 78 | /* rollingc, spcenctr, gunfight, m4, gmissile, */ | |
| 79 | /* schasrcv (schasercv), 280zzzap, lagunar, lupin3, phantom2, */ | |
| 80 | /* blueshrk, desertgu, ballbomb, yosakdon/yosakdoa (yosakdona)*/ | |
| 81 | /* shuttlei, invrvnge/invrvnga (invrvngea). */ | |
| 81 | 82 | /* Documented indianbt sound. Removed NO_SOUND flag from */ |
| 82 | 83 | /* cosmo and dogpatch as the sound was already working. */ |
| 83 | 84 | /* [Robert] */ |
| r7356 | r7357 | |
| 950 | 951 | /* */ |
| 951 | 952 | /*******************************************************/ |
| 952 | 953 | |
| 953 | static ADDRESS_MAP_START( schasrcv_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 954 | static ADDRESS_MAP_START( schasercv_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 954 | 955 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
| 955 | 956 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
| 956 | 957 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w) |
| 957 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(schasrcv_sh_port_1_w) | |
| 958 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(schasercv_sh_port_1_w) | |
| 958 | 959 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w) |
| 959 | AM_RANGE(0x05, 0x05) AM_WRITE(schasrcv_sh_port_2_w) | |
| 960 | AM_RANGE(0x05, 0x05) AM_WRITE(schasercv_sh_port_2_w) | |
| 960 | 961 | ADDRESS_MAP_END |
| 961 | 962 | |
| 962 | 963 | |
| 963 | static INPUT_PORTS_START( schasrcv ) | |
| 964 | static INPUT_PORTS_START( schasercv ) | |
| 964 | 965 | PORT_INCLUDE( invrvnge ) |
| 965 | 966 | |
| 966 | 967 | PORT_MODIFY("IN1") |
| r7356 | r7357 | |
| 984 | 985 | PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW1:8" ) |
| 985 | 986 | INPUT_PORTS_END |
| 986 | 987 | |
| 987 | static MACHINE_DRIVER_START( schasrcv ) | |
| 988 | static MACHINE_DRIVER_START( schasercv ) | |
| 988 | 989 | |
| 989 | 990 | /* basic machine hardware */ |
| 990 | 991 | MDRV_IMPORT_FROM(mw8080bw_root) |
| 991 | 992 | MDRV_CPU_MODIFY("maincpu") |
| 992 | 993 | MDRV_CPU_PROGRAM_MAP(schaser_map) |
| 993 | MDRV_CPU_IO_MAP(schasrcv_io_map) | |
| 994 | MDRV_CPU_IO_MAP(schasercv_io_map) | |
| 994 | 995 | MDRV_MACHINE_START(extra_8080bw) |
| 995 | 996 | |
| 996 | 997 | /* add shifter */ |
| 997 | 998 | MDRV_MB14241_ADD("mb14241") |
| 998 | 999 | |
| 999 | 1000 | /* video hardware */ |
| 1000 | MDRV_VIDEO_UPDATE(schasrcv) | |
| 1001 | MDRV_VIDEO_UPDATE(schasercv) | |
| 1001 | 1002 | |
| 1002 | 1003 | /* sound hardware */ |
| 1003 | 1004 | MDRV_IMPORT_FROM(invaders_samples_audio) |
| r7356 | r7357 | |
| 2861 | 2862 | GAME( 1980, vortex, 0, invaders, invadpt2, 0, ROT270, "Zilec Electronics Ltd.", "Vortex", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) /* Encrypted 8080 */ |
| 2862 | 2863 | GAME( 1979, cosmo, 0, cosmo, cosmo, 0, ROT90, "TDS & Mints", "Cosmo", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |
| 2863 | 2864 | GAME( 1979, schaser, 0, schaser, schaser, 0, ROT270, "Taito", "Space Chaser", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_COLORS ) |
| 2864 | GAME( 1979, schasercv,schaser, schasrcv, | |
| 2865 | GAME( 1979, schasercv,schaser, schasercv, | |
| 2865 | 2866 | GAME( 1979, sflush, 0, sflush, sflush, 0, ROT270, "Taito", "Straight Flush",GAME_SUPPORTS_SAVE | GAME_NO_SOUND | GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL) |
| 2866 | 2867 | GAME( 1980, lupin3, 0, lupin3, lupin3, 0, ROT270, "Taito", "Lupin III (set 1)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |
| 2867 | 2868 | GAME( 1980, lupin3a, lupin3, lupin3a, lupin3a, 0, ROT270, "Taito", "Lupin III (set 2)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |
| r7356 | r7357 | |
|---|---|---|
| 797 | 797 | ROM_LOAD( "prom1.bin", 0x0800, 0x0400, CRC(913f5975) SHA1(3d1e40eeb4d5a3a4bd42ec73d05bfca13b2f1805) ) /* blue component */ |
| 798 | 798 | ROM_END |
| 799 | 799 | |
| 800 | static DRIVER_INIT( ringkin3 ) | |
| 800 | static DRIVER_INIT( ringking3 ) | |
| 801 | 801 | { |
| 802 | 802 | int i; |
| 803 | 803 | UINT8 *RAM = memory_region(machine, "proms"); |
| r7356 | r7357 | |
| 807 | 807 | RAM[i] = RAM[i + 0x100] >> 4; |
| 808 | 808 | } |
| 809 | 809 | |
| 810 | static DRIVER_INIT( ringkinw ) | |
| 810 | static DRIVER_INIT( ringkingw ) | |
| 811 | 811 | { |
| 812 | 812 | int i,j,k; |
| 813 | 813 | UINT8 *PROMS = memory_region(machine, "proms"); |
| r7356 | r7357 | |
| 832 | 832 | GAME( 1985, kingofb, 0, kingofb, kingofb, 0, ROT90, "Woodplace", "King of Boxer (English)", GAME_SUPPORTS_SAVE ) |
| 833 | 833 | GAME( 1985, ringking, kingofb, ringking, ringking, 0, ROT90, "Data East USA", "Ring King (US set 1)", GAME_SUPPORTS_SAVE ) |
| 834 | 834 | GAME( 1985, ringking2, kingofb, ringking, ringking, 0, ROT90, "Data East USA", "Ring King (US set 2)", GAME_SUPPORTS_SAVE ) |
| 835 | GAME( 1985, ringking3, kingofb, kingofb, kingofb, ringkin3, ROT90, "Data East USA", "Ring King (US set 3)", GAME_SUPPORTS_SAVE ) | |
| 836 | GAME( 1985, ringkingw, kingofb, kingofb, kingofb, ringkinw, ROT90, "Woodplace", "Ring King (US, Woodplace license)", GAME_SUPPORTS_SAVE ) | |
| 835 | GAME( 1985, ringking3, kingofb, kingofb, kingofb, ringking3,ROT90, "Data East USA", "Ring King (US set 3)", GAME_SUPPORTS_SAVE ) | |
| 836 | GAME( 1985, ringkingw, kingofb, kingofb, kingofb, ringkingw,ROT90, "Woodplace", "Ring King (US, Woodplace license)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 483 | 483 | ROM_LOAD( "sc271.bin", 0x8000, 0x8000, CRC(58e9c9df) SHA1(345c5aa279327d7142edc6823aad0cfd40cbeb73)) |
| 484 | 484 | ROM_END |
| 485 | 485 | |
| 486 | // year,name, parent, machine, input, init, monitor, company, fullname, flags | |
| 487 | 486 | GAME( 1985,m_supcrd, 0, bfmsys85, bfmsys85, 0, 0, "BFM/ELAM", "Supercards (Dutch, Game Card 39-340-271?)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| r7356 | r7357 | |
|---|---|---|
| 896 | 896 | ROM_LOAD( "6331_vid.u155", 0x0240, 0x0020, CRC(63371737) SHA1(f08c03c81322c0de9ee64b4a9f11a1422c5bd463) ) |
| 897 | 897 | ROM_END |
| 898 | 898 | |
| 899 | ROM_START( turbosb7 ) | |
| 899 | ROM_START( turbosub7 ) | |
| 900 | 900 | ROM_REGION( 0xc0000, "main_code", 0) /* Non-bankswitched, 6809 #0 code */ |
| 901 | 901 | ROM_LOAD( "mem6u85.bin", 0x18000, 0x4000, CRC(30016c8b) SHA1(0cd2dd7052de0eaa451ff8b0b2224180764c26de) ) |
| 902 | 902 | |
| r7356 | r7357 | |
| 1006 | 1006 | ROM_LOAD( "6331_vid.u155", 0x0240, 0x0020, CRC(63371737) SHA1(f08c03c81322c0de9ee64b4a9f11a1422c5bd463) ) |
| 1007 | 1007 | ROM_END |
| 1008 | 1008 | |
| 1009 | ROM_START( turbosb6 ) | |
| 1009 | ROM_START( turbosub6 ) | |
| 1010 | 1010 | ROM_REGION( 0xc0000, "main_code", 0) /* Non-bankswitched, 6809 #0 code */ |
| 1011 | 1011 | ROM_LOAD( "u85", 0x18000, 0x4000, CRC(d37ccb06) SHA1(445df1caa4dd4901e474bb0903bf28e536edf493) ) |
| 1012 | 1012 | |
| r7356 | r7357 | |
| 1129 | 1129 | * |
| 1130 | 1130 | *************************************/ |
| 1131 | 1131 | |
| 1132 | GAME( 1985, turbosub, 0, esripsys, turbosub, esripsys, ROT0, "Entertainment Sciences", "Turbo Sub (prototype rev. TSCA)", GAME_SUPPORTS_SAVE ) | |
| 1133 | GAME( 1985, turbosb7, turbosub, esripsys, turbosub, esripsys, ROT0, "Entertainment Sciences", "Turbo Sub (prototype rev. TSC7)", GAME_SUPPORTS_SAVE ) | |
| 1134 | GAME( 1985, turbosb6, turbosub, esripsys, turbosub, esripsys, ROT0, "Entertainment Sciences", "Turbo Sub (prototype rev. TSC6)", GAME_SUPPORTS_SAVE ) | |
| 1132 | GAME( 1985, turbosub, 0, esripsys, turbosub, esripsys, ROT0, "Entertainment Sciences", "Turbo Sub (prototype rev. TSCA)", GAME_SUPPORTS_SAVE ) | |
| 1133 | GAME( 1985, turbosub7, turbosub, esripsys, turbosub, esripsys, ROT0, "Entertainment Sciences", "Turbo Sub (prototype rev. TSC7)", GAME_SUPPORTS_SAVE ) | |
| 1134 | GAME( 1985, turbosub6, turbosub, esripsys, turbosub, esripsys, ROT0, "Entertainment Sciences", "Turbo Sub (prototype rev. TSC6)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 193 | 193 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_DIPLOCATION("SW2:8") /* Listed as "Unused" */ |
| 194 | 194 | INPUT_PORTS_END |
| 195 | 195 | |
| 196 | static INPUT_PORTS_START( blckoutj ) | |
| 196 | static INPUT_PORTS_START( blockoutj ) | |
| 197 | 197 | PORT_INCLUDE( blockout ) |
| 198 | 198 | |
| 199 | 199 | PORT_MODIFY("P1") |
| r7356 | r7357 | |
| 405 | 405 | |
| 406 | 406 | GAME( 1989, blockout, 0, blockout, blockout, 0, ROT0, "Technos Japan + California Dreams", "Block Out (set 1)", GAME_SUPPORTS_SAVE ) |
| 407 | 407 | GAME( 1989, blockout2,blockout, blockout, blockout, 0, ROT0, "Technos Japan + California Dreams", "Block Out (set 2)", GAME_SUPPORTS_SAVE ) |
| 408 | GAME( 1989, blockoutj,blockout, blockout, blckoutj, | |
| 408 | GAME( 1989, blockoutj,blockout, blockout, blockoutj, | |
| 409 | 409 | GAME( 1991, agress, 0, blockout, agress, 0, ROT0, "Palco", "Agress", GAME_SUPPORTS_SAVE ) |
| 410 | 410 | GAME( 2003, agressb, agress, blockout, agress, 0, ROT0, "Palco", "Agress (English bootleg)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 356 | 356 | }; |
| 357 | 357 | |
| 358 | 358 | |
| 359 | /* used on the low-resolution multisync boards for harddrvc, racedrvc, steeltal */ | |
| 359 | /* used on the low-resolution multisync boards for harddrivc, racedrivc, steeltal */ | |
| 360 | 360 | static const tms34010_config gsp_config_multisync = |
| 361 | 361 | { |
| 362 | 362 | TRUE, /* halt on reset */ |
| r7356 | r7357 | |
| 798 | 798 | INPUT_PORTS_END |
| 799 | 799 | |
| 800 | 800 | |
| 801 | static INPUT_PORTS_START( racedrvc ) | |
| 801 | static INPUT_PORTS_START( racedrivc ) | |
| 802 | 802 | PORT_START("IN0") /* 60c000 */ |
| 803 | 803 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) /* diagnostic switch */ |
| 804 | 804 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* HBLANK */ |
| r7356 | r7357 | |
| 1334 | 1334 | MACHINE_DRIVER_END |
| 1335 | 1335 | |
| 1336 | 1336 | |
| 1337 | static MACHINE_DRIVER_START( harddrvc ) | |
| 1337 | static MACHINE_DRIVER_START( harddrivc ) | |
| 1338 | 1338 | |
| 1339 | 1339 | /* basic machine hardware */ |
| 1340 | 1340 | MDRV_IMPORT_FROM( multisync_msp ) /* multisync board with MSP */ |
| r7356 | r7357 | |
| 1353 | 1353 | MACHINE_DRIVER_END |
| 1354 | 1354 | |
| 1355 | 1355 | |
| 1356 | static MACHINE_DRIVER_START( racedrvc ) | |
| 1356 | static MACHINE_DRIVER_START( racedrivc ) | |
| 1357 | 1357 | |
| 1358 | 1358 | /* basic machine hardware */ |
| 1359 | 1359 | MDRV_IMPORT_FROM( multisync_nomsp ) /* multisync board without MSP */ |
| r7356 | r7357 | |
| 3938 | 3938 | } |
| 3939 | 3939 | |
| 3940 | 3940 | |
| 3941 | static DRIVER_INIT( harddrvc ) | |
| 3941 | static DRIVER_INIT( harddrivc ) | |
| 3942 | 3942 | { |
| 3943 | 3943 | harddriv_state *state = (harddriv_state *)machine->driver_data; |
| 3944 | 3944 | |
| r7356 | r7357 | |
| 4032 | 4032 | } |
| 4033 | 4033 | |
| 4034 | 4034 | |
| 4035 | static void racedrvc_init_common(running_machine *machine, offs_t gsp_protection) | |
| 4035 | static void racedrivc_init_common(running_machine *machine, offs_t gsp_protection) | |
| 4036 | 4036 | { |
| 4037 | 4037 | harddriv_state *state = (harddriv_state *)machine->driver_data; |
| 4038 | 4038 | |
| r7356 | r7357 | |
| 4066 | 4066 | state->rddsp32_speedup_pc = 0x6054b0; |
| 4067 | 4067 | } |
| 4068 | 4068 | |
| 4069 | static DRIVER_INIT( racedrvc ) { racedrvc_init_common(machine, 0xfff95cd0); } | |
| 4070 | static DRIVER_INIT( racedrc1 ) { racedrvc_init_common(machine, 0xfff7ecd0); } | |
| 4069 | static DRIVER_INIT( racedrivc ) { racedrivc_init_common(machine, 0xfff95cd0); } | |
| 4070 | static DRIVER_INIT( racedrivc1 ) { racedrivc_init_common(machine, 0xfff7ecd0); } | |
| 4071 | 4071 | |
| 4072 | 4072 | |
| 4073 | 4073 | |
| r7356 | r7357 | |
| 4123 | 4123 | |
| 4124 | 4124 | |
| 4125 | 4125 | static DRIVER_INIT( steeltal ) { steeltal_init_common(machine, 0x4fc18, 0); } |
| 4126 | static DRIVER_INIT( steelta1 ) { steeltal_init_common(machine, 0x4f9c6, 0); } | |
| 4127 | static DRIVER_INIT( steeltap ) { steeltal_init_common(machine, 0x52290, 1); } | |
| 4126 | static DRIVER_INIT( steeltal1 ) { steeltal_init_common(machine, 0x4f9c6, 0); } | |
| 4127 | static DRIVER_INIT( steeltalp ) { steeltal_init_common(machine, 0x52290, 1); } | |
| 4128 | 4128 | |
| 4129 | 4129 | |
| 4130 | 4130 | static DRIVER_INIT( strtdriv ) |
| r7356 | r7357 | |
| 4185 | 4185 | } |
| 4186 | 4186 | |
| 4187 | 4187 | |
| 4188 | static DRIVER_INIT( hdrivaip ) | |
| 4188 | static DRIVER_INIT( hdrivairp ) | |
| 4189 | 4189 | { |
| 4190 | 4190 | harddriv_state *state = (harddriv_state *)machine->driver_data; |
| 4191 | 4191 | |
| r7356 | r7357 | |
| 4231 | 4231 | GAME( 1988, harddriv2, harddriv, harddriv, harddriv, harddriv, ROT0, "Atari Games", "Hard Drivin' (cockpit, rev 2)", 0 ) |
| 4232 | 4232 | GAME( 1988, harddriv1, harddriv, harddriv, harddriv, harddriv, ROT0, "Atari Games", "Hard Drivin' (cockpit, rev 1)", GAME_NOT_WORKING ) |
| 4233 | 4233 | |
| 4234 | GAME( 1990, harddrivc, harddriv, harddrvc, racedrvc, harddrvc, ROT0, "Atari Games", "Hard Drivin' (compact, rev 2)", 0 ) | |
| 4235 | GAME( 1990, harddrivcg, harddriv, harddrvc, racedrvc, harddrvc, ROT0, "Atari Games", "Hard Drivin' (compact, German, rev 2)", 0 ) | |
| 4236 | GAME( 1990, harddrivcb, harddriv, harddrvc, racedrvc, harddrvc, ROT0, "Atari Games", "Hard Drivin' (compact, British, rev 2)", 0 ) | |
| 4237 | GAME( 1990, harddrivc1, harddriv, harddrvc, racedrvc, harddrvc, ROT0, "Atari Games", "Hard Drivin' (compact, rev 1)", 0 ) | |
| 4234 | GAME( 1990, harddrivc, harddriv, harddrivc, racedrivc, harddrivc, ROT0, "Atari Games", "Hard Drivin' (compact, rev 2)", 0 ) | |
| 4235 | GAME( 1990, harddrivcg, harddriv, harddrivc, racedrivc, harddrivc, ROT0, "Atari Games", "Hard Drivin' (compact, German, rev 2)", 0 ) | |
| 4236 | GAME( 1990, harddrivcb, harddriv, harddrivc, racedrivc, harddrivc, ROT0, "Atari Games", "Hard Drivin' (compact, British, rev 2)", 0 ) | |
| 4237 | GAME( 1990, harddrivc1, harddriv, harddrivc, racedrivc, harddrivc, ROT0, "Atari Games", "Hard Drivin' (compact, rev 1)", 0 ) | |
| 4238 | 4238 | |
| 4239 | 4239 | GAME( 1989, stunrun, 0, stunrun, stunrun, stunrun, ROT0, "Atari Games", "S.T.U.N. Runner (rev 6)", 0 ) |
| 4240 | 4240 | GAME( 1989, stunrunj, stunrun, stunrun, stunrun, stunrun, ROT0, "Atari Games", "S.T.U.N. Runner (rev 7, Japan)", 0 ) |
| r7356 | r7357 | |
| 4260 | 4260 | GAME( 1990, racedrivb1, racedriv, racedriv, racedriv, racedriv, ROT0, "Atari Games", "Race Drivin' (cockpit, British, rev 1)", GAME_NOT_WORKING ) |
| 4261 | 4261 | GAME( 1990, racedrivg1, racedriv, racedriv, racedriv, racedriv, ROT0, "Atari Games", "Race Drivin' (cockpit, German, rev 2)", GAME_NOT_WORKING ) |
| 4262 | 4262 | |
| 4263 | GAME( 1990, racedrivc, racedriv, racedrvc, racedrvc, racedrvc, ROT0, "Atari Games", "Race Drivin' (compact, rev 5)", 0 ) | |
| 4264 | GAME( 1990, racedrivcb, racedriv, racedrvc, racedrvc, racedrvc, ROT0, "Atari Games", "Race Drivin' (compact, British, rev 5)", 0 ) | |
| 4265 | GAME( 1990, racedrivcg, racedriv, racedrvc, racedrvc, racedrvc, ROT0, "Atari Games", "Race Drivin' (compact, German, rev 5)", 0 ) | |
| 4266 | GAME( 1990, racedrivc4, racedriv, racedrvc, racedrvc, racedrvc, ROT0, "Atari Games", "Race Drivin' (compact, rev 4)", 0 ) | |
| 4267 | GAME( 1990, racedrivcb4, racedriv, racedrvc, racedrvc, racedrvc, ROT0, "Atari Games", "Race Drivin' (compact, British, rev 4)", 0 ) | |
| 4268 | GAME( 1990, racedrivcg4, racedriv, racedrvc, racedrvc, racedrvc, ROT0, "Atari Games", "Race Drivin' (compact, German, rev 4)", 0 ) | |
| 4269 | GAME( 1990, racedrivc2, racedriv, racedrvc, racedrvc, racedrc1, ROT0, "Atari Games", "Race Drivin' (compact, rev 2)", 0 ) | |
| 4270 | GAME( 1990, racedrivc1, racedriv, racedrvc, racedrvc, racedrc1, ROT0, "Atari Games", "Race Drivin' (compact, rev 1)", 0 ) | |
| 4263 | GAME( 1990, racedrivc, racedriv, racedrivc, racedrivc, racedrivc, ROT0, "Atari Games", "Race Drivin' (compact, rev 5)", 0 ) | |
| 4264 | GAME( 1990, racedrivcb, racedriv, racedrivc, racedrivc, racedrivc, ROT0, "Atari Games", "Race Drivin' (compact, British, rev 5)", 0 ) | |
| 4265 | GAME( 1990, racedrivcg, racedriv, racedrivc, racedrivc, racedrivc, ROT0, "Atari Games", "Race Drivin' (compact, German, rev 5)", 0 ) | |
| 4266 | GAME( 1990, racedrivc4, racedriv, racedrivc, racedrivc, racedrivc, ROT0, "Atari Games", "Race Drivin' (compact, rev 4)", 0 ) | |
| 4267 | GAME( 1990, racedrivcb4, racedriv, racedrivc, racedrivc, racedrivc, ROT0, "Atari Games", "Race Drivin' (compact, British, rev 4)", 0 ) | |
| 4268 | GAME( 1990, racedrivcg4, racedriv, racedrivc, racedrivc, racedrivc, ROT0, "Atari Games", "Race Drivin' (compact, German, rev 4)", 0 ) | |
| 4269 | GAME( 1990, racedrivc2, racedriv, racedrivc, racedrivc, racedrivc1,ROT0, "Atari Games", "Race Drivin' (compact, rev 2)", 0 ) | |
| 4270 | GAME( 1990, racedrivc1, racedriv, racedrivc, racedrivc, racedrivc1,ROT0, "Atari Games", "Race Drivin' (compact, rev 1)", 0 ) | |
| 4271 | 4271 | |
| 4272 | 4272 | GAME( 1990, racedrivpan, racedriv, racedriv, racedriv, racedriv, ROT0, "Atari Games", "Race Drivin' Panorama (prototype, rev 2.1)", GAME_NOT_WORKING ) |
| 4273 | 4273 | |
| 4274 | 4274 | GAME( 1991, steeltal, 0, steeltal, steeltal, steeltal, ROT0, "Atari Games", "Steel Talons (rev 2)", 0 ) |
| 4275 | 4275 | GAME( 1991, steeltalg, steeltal, steeltal, steeltal, steeltal, ROT0, "Atari Games", "Steel Talons (German, rev 2)", 0 ) |
| 4276 | GAME( 1991, steeltal1, steeltal, steeltal, steeltal, steelta1, ROT0, "Atari Games", "Steel Talons (rev 1)", 0 ) | |
| 4277 | GAME( 1991, steeltalp, steeltal, steeltal, steeltal, steeltap, ROT0, "Atari Games", "Steel Talons (prototype)", GAME_NOT_WORKING ) | |
| 4276 | GAME( 1991, steeltal1, steeltal, steeltal, steeltal, steeltal1,ROT0, "Atari Games", "Steel Talons (rev 1)", 0 ) | |
| 4277 | GAME( 1991, steeltalp, steeltal, steeltal, steeltal, steeltalp,ROT0, "Atari Games", "Steel Talons (prototype)", GAME_NOT_WORKING ) | |
| 4278 | 4278 | |
| 4279 | 4279 | GAME( 1993, strtdriv, 0, strtdriv, strtdriv, strtdriv, ROT0, "Atari Games", "Street Drivin' (prototype)", GAME_NO_SOUND ) |
| 4280 | 4280 | |
| 4281 | 4281 | GAME( 1993, hdrivair, 0, hdrivair, hdrivair, hdrivair, ROT0, "Atari Games", "Hard Drivin's Airborne (prototype)", GAME_NO_SOUND ) |
| 4282 | GAME( 1993, hdrivairp, hdrivair, hdrivair, hdrivair, hdrivaip, | |
| 4282 | GAME( 1993, hdrivairp, hdrivair, hdrivair, hdrivair, hdrivairp, |
| r7356 | r7357 | |
|---|---|---|
| 370 | 370 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 371 | 371 | INPUT_PORTS_END |
| 372 | 372 | |
| 373 | static INPUT_PORTS_START( firetpbl ) | |
| 373 | static INPUT_PORTS_START( firetrapbl ) | |
| 374 | 374 | PORT_START("IN0") /* IN0 */ |
| 375 | 375 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_4WAY |
| 376 | 376 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_4WAY |
| r7356 | r7357 | |
| 633 | 633 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 634 | 634 | MACHINE_DRIVER_END |
| 635 | 635 | |
| 636 | static MACHINE_DRIVER_START( firetpbl ) | |
| 636 | static MACHINE_DRIVER_START( firetrapbl ) | |
| 637 | 637 | |
| 638 | 638 | /* driver data */ |
| 639 | 639 | MDRV_DRIVER_DATA(firetrap_state) |
| r7356 | r7357 | |
| 747 | 747 | ROM_LOAD( "firetrap.4b", 0x0100, 0x0100, CRC(d5abfc64) SHA1(6c808c1d6087804214dc29d35280f42382c40b18) ) /* palette blue component */ |
| 748 | 748 | ROM_END |
| 749 | 749 | |
| 750 | ROM_START( firetpbl ) | |
| 750 | ROM_START( firetrapbl ) | |
| 751 | 751 | ROM_REGION( 0x28000, "maincpu", 0 ) /* 64k for code + 96k for banked ROMs */ |
| 752 | 752 | ROM_LOAD( "ft0d.bin", 0x00000, 0x8000, CRC(793ef849) SHA1(5a2c587370733d43484ba0a38a357260cdde8357) ) |
| 753 | 753 | ROM_LOAD( "ft0a.bin", 0x08000, 0x8000, CRC(613313ee) SHA1(54e386b2b1faada3441e3e0bb7822a63eab36930) ) /* unprotection code */ |
| r7356 | r7357 | |
| 810 | 810 | |
| 811 | 811 | |
| 812 | 812 | |
| 813 | GAME( 1986, firetrap, 0, firetrap, firetrap, 0, ROT90, "Data East USA", "Fire Trap (US)", GAME_SUPPORTS_SAVE ) | |
| 814 | GAME( 1986, firetpbl, firetrap, firetpbl, firetpbl, 0, ROT90, "bootleg", "Fire Trap (Japan bootleg)", GAME_SUPPORTS_SAVE ) | |
| 813 | GAME( 1986, firetrap, 0, firetrap, firetrap, 0, ROT90, "Data East USA", "Fire Trap (US)", GAME_SUPPORTS_SAVE ) | |
| 814 | GAME( 1986, firetrapbl, firetrap, firetrapbl, firetrapbl, 0, ROT90, "bootleg", "Fire Trap (Japan bootleg)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 167 | 167 | #include "cpu/m68000/m68000.h" |
| 168 | 168 | #include "cpu/powerpc/ppc.h" |
| 169 | 169 | #include "cpu/sharc/sharc.h" |
| 170 | #include "sound/k054539.h" | |
| 171 | 170 | #include "machine/konppc.h" |
| 172 | 171 | #include "machine/adc083x.h" |
| 173 | 172 | #include "machine/k056230.h" |
| 174 | 173 | #include "machine/eeprom.h" |
| 174 | #include "sound/k056800.h" | |
| 175 | #include "sound/k054539.h" | |
| 175 | 176 | #include "video/konicdev.h" |
| 176 | 177 | #include "video/gticlub.h" |
| 177 | #include "sound/k056800.h" | |
| 178 | 178 | |
| 179 | 179 | static UINT8 led_reg0, led_reg1; |
| 180 | 180 | |
| 181 | 181 | |
| 182 | 182 | |
| 183 | // defined in drivers/nwk-tr.c | |
| 184 | int K001604_vh_start(running_machine *machine, int chip); | |
| 185 | void K001604_draw_front_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect); | |
| 186 | void K001604_draw_back_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect); | |
| 187 | READ32_HANDLER(K001604_tile_r); | |
| 188 | READ32_HANDLER(K001604_char_r); | |
| 189 | WRITE32_HANDLER(K001604_tile_w); | |
| 190 | WRITE32_HANDLER(K001604_char_w); | |
| 191 | WRITE32_HANDLER(K001604_reg_w); | |
| 192 | READ32_HANDLER(K001604_reg_r); | |
| 193 | ||
| 194 | ||
| 195 | ||
| 196 | ||
| 197 | 183 | static VIDEO_START( jetwave ) |
| 198 | 184 | { |
| 199 | 185 | K001005_init(machine); |
| 200 | 186 | K001006_init(machine); |
| 201 | K001604_vh_start(machine, 0); | |
| 202 | 187 | } |
| 203 | 188 | |
| 204 | 189 | |
| 205 | 190 | static VIDEO_UPDATE( jetwave ) |
| 206 | 191 | { |
| 192 | running_device *k001604 = devtag_get_device(screen->machine, "k001604"); | |
| 193 | ||
| 207 | 194 | bitmap_fill(bitmap, cliprect, screen->machine->pens[0]); |
| 208 | 195 | |
| 209 | 196 | K001005_draw(bitmap, cliprect); |
| 210 | 197 | |
| 211 | | |
| 198 | k001604_draw_front_layer(k001604, bitmap, cliprect); | |
| 212 | 199 | |
| 213 | 200 | draw_7segment_led(bitmap, 3, 3, led_reg0); |
| 214 | 201 | draw_7segment_led(bitmap, 9, 3, led_reg1); |
| r7356 | r7357 | |
| 428 | 415 | |
| 429 | 416 | static ADDRESS_MAP_START( jetwave_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 430 | 417 | AM_RANGE(0x00000000, 0x000fffff) AM_MIRROR(0x80000000) AM_RAM /* Work RAM */ |
| 431 | AM_RANGE(0x74000000, 0x740000ff) AM_MIRROR(0x80000000) AM_READWRITE( | |
| 418 | AM_RANGE(0x74000000, 0x740000ff) AM_MIRROR(0x80000000) AM_DEVREADWRITE("k001604", k001604_reg_r, k001604_reg_w) | |
| 432 | 419 | AM_RANGE(0x74010000, 0x7401ffff) AM_MIRROR(0x80000000) AM_RAM_WRITE(jetwave_palette_w) AM_BASE_GENERIC(paletteram) |
| 433 | AM_RANGE(0x74020000, 0x7403ffff) AM_MIRROR(0x80000000) AM_READWRITE(K001604_tile_r, K001604_tile_w) | |
| 434 | AM_RANGE(0x74040000, 0x7407ffff) AM_MIRROR(0x80000000) AM_READWRITE(K001604_char_r, K001604_char_w) | |
| 420 | AM_RANGE(0x74020000, 0x7403ffff) AM_MIRROR(0x80000000) AM_DEVREADWRITE("k001604", k001604_tile_r, k001604_tile_w) | |
| 421 | AM_RANGE(0x74040000, 0x7407ffff) AM_MIRROR(0x80000000) AM_DEVREADWRITE("k001604", k001604_char_r, k001604_char_w) | |
| 435 | 422 | AM_RANGE(0x78000000, 0x7800ffff) AM_MIRROR(0x80000000) AM_READWRITE(cgboard_dsp_shared_r_ppc, cgboard_dsp_shared_w_ppc) /* 21N 21K 23N 23K */ |
| 436 | 423 | AM_RANGE(0x78010000, 0x7801ffff) AM_MIRROR(0x80000000) AM_WRITE(cgboard_dsp_shared_w_ppc) |
| 437 | 424 | AM_RANGE(0x78040000, 0x7804000f) AM_MIRROR(0x80000000) AM_READWRITE(K001006_0_r, K001006_0_w) |
| r7356 | r7357 | |
| 775 | 762 | MDRV_ADC0838_ADD("adc0838", zr107_adc_interface) |
| 776 | 763 | MACHINE_DRIVER_END |
| 777 | 764 | |
| 765 | ||
| 766 | static const k001604_interface jetwave_k001604_intf = | |
| 767 | { | |
| 768 | 0, 1, /* gfx index 1 & 2 */ | |
| 769 | 0, 1, /* layer_size, roz_size */ | |
| 770 | 0 /* slrasslt hack */ | |
| 771 | }; | |
| 772 | ||
| 778 | 773 | static MACHINE_DRIVER_START( jetwave ) |
| 779 | 774 | |
| 780 | 775 | /* basic machine hardware */ |
| r7356 | r7357 | |
| 809 | 804 | MDRV_VIDEO_START(jetwave) |
| 810 | 805 | MDRV_VIDEO_UPDATE(jetwave) |
| 811 | 806 | |
| 807 | MDRV_K001604_ADD("k001604", jetwave_k001604_intf) | |
| 808 | ||
| 812 | 809 | MDRV_K056800_ADD("k056800", zr107_k056800_interface) |
| 813 | 810 | |
| 814 | 811 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| r7356 | r7357 | |
|---|---|---|
| 221 | 221 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(63) PORT_PLAYER(2) |
| 222 | 222 | INPUT_PORTS_END |
| 223 | 223 | |
| 224 | static INPUT_PORTS_START( bladstle ) | |
| 224 | static INPUT_PORTS_START( bladestle ) | |
| 225 | 225 | PORT_INCLUDE( bladestl ) |
| 226 | 226 | |
| 227 | 227 | PORT_MODIFY("DSW2") |
| r7356 | r7357 | |
| 437 | 437 | *************************************/ |
| 438 | 438 | |
| 439 | 439 | GAME( 1987, bladestl, 0, bladestl, bladestl, 0, ROT90, "Konami", "Blades of Steel (version T)", GAME_SUPPORTS_SAVE ) |
| 440 | GAME( 1987, bladestle, bladestl, bladestl, bladstle, | |
| 440 | GAME( 1987, bladestle, bladestl, bladestl, bladestle, |
| r7356 | r7357 | |
|---|---|---|
| 956 | 956 | - Added new game: Jolly Card (Evona Electronic) |
| 957 | 957 | - Added new game: Super Joly 2000 - 3x |
| 958 | 958 | - Fixed some inputs. |
| 959 | - Masked inputs to allow jolyjkra to boot. | |
| 959 | - Masked inputs to allow jolyjokra to boot. | |
| 960 | 960 | - Added minor corrections. |
| 961 | 961 | - Updated technical notes. |
| 962 | 962 | |
| r7356 | r7357 | |
| 1803 | 1803 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1804 | 1804 | INPUT_PORTS_END |
| 1805 | 1805 | |
| 1806 | static INPUT_PORTS_START( jolyjkra ) | |
| 1806 | static INPUT_PORTS_START( jolyjokra ) | |
| 1807 | 1807 | PORT_START("IN0") |
| 1808 | 1808 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_NAME("Remote") |
| 1809 | 1809 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Halten (Hold) 1") |
| r7356 | r7357 | |
| 2875 | 2875 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 2876 | 2876 | ROM_END |
| 2877 | 2877 | |
| 2878 | ROM_START( jolyjkra ) /* Jolly Joker (Impera, 50bet) */ | |
| 2878 | ROM_START( jolyjokra ) /* Jolly Joker (Impera, 50bet) */ | |
| 2879 | 2879 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 2880 | 2880 | ROM_LOAD( "impera50.bin", 0x8000, 0x8000, CRC(7effc044) SHA1(961438e7fb8222296fb959b510cdf646e4ac3226) ) |
| 2881 | 2881 | |
| r7356 | r7357 | |
| 3208 | 3208 | GAME( 1993, vegasfst, vegasslw, funworld, funworld, 0, ROT0, "Soft Design", "Royal Vegas Joker Card (fast deal)", 0 ) |
| 3209 | 3209 | GAME( 1993, vegasfte, vegasslw, funworld, funworld, 0, ROT0, "Soft Design", "Royal Vegas Joker Card (fast deal, english gfx)", 0 ) |
| 3210 | 3210 | GAME( 198?, jolyjokr, 0, funworld, funworld, 0, ROT0, "Impera", "Jolly Joker", 0 ) |
| 3211 | GAME( 198?, jolyjkra, | |
| 3211 | GAME( 198?, jolyjokra, | |
| 3212 | 3212 | GAME( 1993, jokercrd, 0, funworld, funworld, 0, ROT0, "Vesely Svet", "Joker Card (Ver.A267BC, encrypted)", GAME_WRONG_COLORS | GAME_NOT_WORKING ) |
| 3213 | 3213 | GAME( 199?, mongolnw, 0, royalmcu, royalcrd, 0, ROT0, "bootleg", "Mongolfier New (italian)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 3214 | 3214 | GAME( 199?, soccernw, 0, royalcrd, royalcrd, soccernw, ROT0, "bootleg", "Soccer New (italian)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| r7356 | r7357 | |
|---|---|---|
| 651 | 651 | MDRV_DRIVER_DATA(lethal_state) |
| 652 | 652 | |
| 653 | 653 | /* basic machine hardware */ |
| 654 | MDRV_CPU_ADD("maincpu", HD6309, MAIN_CLOCK/2) | |
| 654 | MDRV_CPU_ADD("maincpu", HD6309, MAIN_CLOCK/2) /* verified on pcb */ | |
| 655 | 655 | MDRV_CPU_PROGRAM_MAP(le_main) |
| 656 | 656 | MDRV_CPU_VBLANK_INT("screen", lethalen_interrupt) |
| 657 | 657 | |
| 658 | MDRV_CPU_ADD("soundcpu", Z80, | |
| 658 | MDRV_CPU_ADD("soundcpu", Z80, MAIN_CLOCK/4) /* verified on pcb */ | |
| 659 | 659 | MDRV_CPU_PROGRAM_MAP(le_sound) |
| 660 | 660 | |
| 661 | 661 | MDRV_MACHINE_START(lethalen) |
| r7356 | r7357 | |
| 670 | 670 | MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS) |
| 671 | 671 | |
| 672 | 672 | MDRV_SCREEN_ADD("screen", RASTER) |
| 673 | MDRV_SCREEN_REFRESH_RATE(6 | |
| 673 | MDRV_SCREEN_REFRESH_RATE(59.62) /* verified on pcb */ | |
| 674 | 674 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 675 | 675 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 676 | 676 | MDRV_SCREEN_SIZE(64*8, 32*8) |
| r7356 | r7357 | |
|---|---|---|
| 168 | 168 | (reads from 0x2801 occur almost all the time). |
| 169 | 169 | So IMO this set looks like a World bootleg . |
| 170 | 170 | |
| 171 | 4) 'wexpresb' | |
| 171 | 4) 'wexpressb' | |
| 172 | 172 | |
| 173 | 173 | - "@ 1986 DATA EAST CORPORATION" + extra code to display the Warning screen (Japan) |
| 174 | 174 | - Modified Warning screen |
| r7356 | r7357 | |
| 184 | 184 | * 0xe826 : COIN1 - 0xe82e : COIN2 (Mode 1) |
| 185 | 185 | * 0xe836 : COIN1 - 0xe83e : COIN2 (Mode 2) |
| 186 | 186 | |
| 187 | 5) 'wexpres | |
| 187 | 5) 'wexpressb2' | |
| 188 | 188 | |
| 189 | 189 | - "@ 1986 DATA EAST CORPORATION" + extra code to display the Warning screen (Japan) |
| 190 | 190 | - Original Warning screen |
| r7356 | r7357 | |
| 193 | 193 | that there shall exist a "better" Japan undumped version) |
| 194 | 194 | so all comments also fit for this set. The main difference is |
| 195 | 195 | the way protection is bypassed (in a different way than 'wexpress' |
| 196 | but also in a different way than 'wexpresb' as reads from 0x2801 | |
| 196 | but also in a different way than 'wexpressb' as reads from 0x2801 | |
| 197 | 197 | occur when you lose a life but also on "shoot" stages). |
| 198 | The other difference is that you can NOT continue a game as in 'wexpresb'. | |
| 199 | - "Bonus lives" routine starts at 0xe4e5 (same as 'wexpresb') | |
| 200 | - Coinage related stuff starts at 0xe7d8 (same as 'wexpresb'). | |
| 201 | - Coinage tables (same as 'wexpresb') : | |
| 198 | The other difference is that you can NOT continue a game as in 'wexpressb'. | |
| 199 | - "Bonus lives" routine starts at 0xe4e5 (same as 'wexpressb') | |
| 200 | - Coinage related stuff starts at 0xe7d8 (same as 'wexpressb'). | |
| 201 | - Coinage tables (same as 'wexpressb') : | |
| 202 | 202 | * 0xe826 : COIN1 - 0xe82e : COIN2 (Mode 1) |
| 203 | 203 | * 0xe836 : COIN1 - 0xe83e : COIN2 (Mode 2) |
| 204 | 204 | |
| r7356 | r7357 | |
| 781 | 781 | exprraid_gfx_expand(machine); |
| 782 | 782 | } |
| 783 | 783 | |
| 784 | static DRIVER_INIT( wexpresb ) | |
| 784 | static DRIVER_INIT( wexpressb ) | |
| 785 | 785 | { |
| 786 | 786 | memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x3800, 0x3800, 0, 0, vblank_r); |
| 787 | 787 | exprraid_gfx_expand(machine); |
| 788 | 788 | } |
| 789 | 789 | |
| 790 | static DRIVER_INIT( wexpres | |
| 790 | static DRIVER_INIT( wexpressb2 ) | |
| 791 | 791 | { |
| 792 | 792 | memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xFFC0, 0xFFC0, 0, 0, vblank_r); |
| 793 | 793 | exprraid_gfx_expand(machine); |
| 794 | 794 | } |
| 795 | 795 | |
| 796 | 796 | |
| 797 | GAME( 1986, exprraid, 0, exprraid, exprraid, exprraid, ROT0, "Data East USA", "Express Raider (US set 1)", GAME_SUPPORTS_SAVE ) | |
| 798 | GAME( 1986, exprraida, exprraid, exprraid, exprraid, exprraid, ROT0, "Data East USA", "Express Raider (US set 2)", GAME_SUPPORTS_SAVE ) | |
| 799 | GAME( 1986, wexpress, exprraid, exprraid, exprraid, wexpress, ROT0, "Data East Corporation", "Western Express (World?)", GAME_SUPPORTS_SAVE ) | |
| 800 | GAME( 1986, wexpressb, exprraid, exprboot, exprboot, wexpresb, ROT0, "bootleg", "Western Express (bootleg set 1)", GAME_SUPPORTS_SAVE ) | |
| 801 | GAME( 1986, wexpressb2,exprraid, exprboot, exprboot, wexpresc, ROT0, "bootleg", "Western Express (bootleg set 2)", GAME_SUPPORTS_SAVE ) | |
| 797 | GAME( 1986, exprraid, 0, exprraid, exprraid, exprraid, ROT0, "Data East USA", "Express Raider (US set 1)", GAME_SUPPORTS_SAVE ) | |
| 798 | GAME( 1986, exprraida, exprraid, exprraid, exprraid, exprraid, ROT0, "Data East USA", "Express Raider (US set 2)", GAME_SUPPORTS_SAVE ) | |
| 799 | GAME( 1986, wexpress, exprraid, exprraid, exprraid, wexpress, ROT0, "Data East Corporation", "Western Express (World?)", GAME_SUPPORTS_SAVE ) | |
| 800 | GAME( 1986, wexpressb, exprraid, exprboot, exprboot, wexpressb, ROT0, "bootleg", "Western Express (bootleg set 1)", GAME_SUPPORTS_SAVE ) | |
| 801 | GAME( 1986, wexpressb2,exprraid, exprboot, exprboot, wexpressb2,ROT0, "bootleg", "Western Express (bootleg set 2)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 26 | 26 | 460004, 46000c |
| 27 | 27 | 460006, 46000e |
| 28 | 28 | |
| 29 | */ | |
| 30 | 29 | |
| 31 | /* | |
| 32 | ||
| 33 | TWO MINUTE DRILL - Taito 1993? | |
| 34 | ||
| 35 | No idea what this game is... I do not have the pinout | |
| 36 | See pic for more details | |
| 37 | ||
| 38 | 30 | Brief hardware overview: |
| 39 | 31 | ------------------------ |
| 40 | 32 | |
| r7356 | r7357 | |
| 48 | 40 | - TC0510NI0 |
| 49 | 41 | |
| 50 | 42 | DAC -26.6860Mhz |
| 51 | | |
| 43 | | |
| 52 | 44 | |
| 53 | 45 | */ |
| 54 | 46 |
| r7356 | r7357 | |
|---|---|---|
| 326 | 326 | #include "machine/idectrl.h" |
| 327 | 327 | #include "machine/mb3773.h" |
| 328 | 328 | #include "sound/psx.h" |
| 329 | #include "audio/taito_zm.h" | |
| 329 | 330 | |
| 330 | ||
| 331 | 331 | static unsigned char cis[512]; |
| 332 | 332 | static int locked; |
| 333 | 333 | |
| r7356 | r7357 | |
| 853 | 853 | psx_machine_init(machine); |
| 854 | 854 | devtag_reset(machine, "card"); |
| 855 | 855 | ide_set_gnet_readlock(devtag_get_device(machine, "card"), 1); |
| 856 | ||
| 857 | // halt sound CPU since it has no valid program at start | |
| 858 | cputag_set_input_line(machine, "mn10200",INPUT_LINE_RESET,ASSERT_LINE); /* MCU */ | |
| 856 | 859 | } |
| 857 | 860 | |
| 858 | 861 | static ADDRESS_MAP_START( zn_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| r7356 | r7357 | |
| 948 | 951 | MDRV_NVRAM_HANDLER( coh3002t ) |
| 949 | 952 | |
| 950 | 953 | MDRV_MB3773_ADD("mb3773") |
| 954 | ||
| 955 | MDRV_IMPORT_FROM( taito_zoom_sound ) | |
| 951 | 956 | MACHINE_DRIVER_END |
| 952 | 957 | |
| 953 | 958 | static INPUT_PORTS_START( coh3002t ) |
| r7356 | r7357 | |
| 1075 | 1080 | ROM_LOAD16_WORD_BIOS(0, "flash.u30", 0x000000, 0x200000, CRC(c48c8236) SHA1(c6dad60266ce2ff635696bc0d91903c543273559) ) \ |
| 1076 | 1081 | ROM_SYSTEM_BIOS( 1, "v2", "G-NET Bios v2" ) \ |
| 1077 | 1082 | ROM_LOAD16_WORD_BIOS(1, "flashv2.u30", 0x000000, 0x200000, CRC(CAE462D3) SHA1(f1b10846a8423d9fe021191c5876190857c3d2a4) ) \ |
| 1078 | ROM_REGION32_LE( 0x80000, " | |
| 1083 | ROM_REGION32_LE( 0x80000, "m | |
| 1079 | 1084 | ROM_FILL( 0, 0x80000, 0xff) \ |
| 1080 | ROM_REGION32_LE( 0x600000, "s | |
| 1085 | ROM_REGION32_LE( 0x600000, "zsg1 | |
| 1081 | 1086 | ROM_FILL( 0, 0x600000, 0xff) |
| 1082 | 1087 | |
| 1083 | 1088 | ROM_START( taitogn ) |
| r7356 | r7357 | |
|---|---|---|
| 1335 | 1335 | ROMX_LOAD( "fish_eng.07-00", 0x800007, 0x100000, CRC(13fa20ad) SHA1(0a04fdea025109c0e604ef2a6d58cfb3adce9bd1), ROM_SKIP(7) ) |
| 1336 | 1336 | ROM_END |
| 1337 | 1337 | |
| 1338 | ROM_START( freezejp ) | |
| 1338 | ROM_START( freezeatjp ) | |
| 1339 | 1339 | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 1340 | 1340 | ROM_LOAD32_BYTE( "prog_jpn.hh", 0x000000, 0x040000, CRC(989302bf) SHA1(232927ec0a52b8bb587a3c206af8e1c6cde67860) ) |
| 1341 | 1341 | ROM_LOAD32_BYTE( "prog_jpn.hl", 0x000001, 0x040000, CRC(6262b760) SHA1(12ca749f5cdc6db7d19f88a21f5f955b80206784) ) |
| r7356 | r7357 | |
| 1361 | 1361 | ROMX_LOAD( "fish_jpn.07-00", 0x800007, 0x100000, CRC(e7e0daa5) SHA1(108da84cc6b4df7ae88cfdacd27c1728e59cdb81), ROM_SKIP(7) ) |
| 1362 | 1362 | ROM_END |
| 1363 | 1363 | |
| 1364 | ROM_START( freezea2 ) | |
| 1364 | ROM_START( freezeat2 ) | |
| 1365 | 1365 | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 1366 | 1366 | ROM_LOAD32_BYTE( "prog.hh", 0x000000, 0x040000, CRC(a8aefa52) SHA1(ba95da93035520de4b15245f68217c59dfb69dbd) ) |
| 1367 | 1367 | ROM_LOAD32_BYTE( "prog.hl", 0x000001, 0x040000, CRC(152dd641) SHA1(52fa260baf1979ed8f15f8abcbbeebd8e595d0e4) ) |
| r7356 | r7357 | |
| 1387 | 1387 | ROMX_LOAD( "fish_gr1.07-00", 0x800007, 0x100000, CRC(1f20c020) SHA1(71b32386dc0444264f2f1e2a81899e0e9260994c), ROM_SKIP(7) ) |
| 1388 | 1388 | ROM_END |
| 1389 | 1389 | |
| 1390 | ROM_START( freezea3 ) | |
| 1390 | ROM_START( freezeat3 ) | |
| 1391 | 1391 | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 1392 | 1392 | ROM_LOAD32_BYTE( "prog.hh", 0x000000, 0x040000, CRC(863942e6) SHA1(c7429c8a5c86ff93c64950e201cffca83dd7b7b0) ) |
| 1393 | 1393 | ROM_LOAD32_BYTE( "prog.hl", 0x000001, 0x040000, CRC(2acc18ef) SHA1(ead02566f7641b1d1066bd2e257b695e5c7e8437) ) |
| r7356 | r7357 | |
| 1413 | 1413 | ROMX_LOAD( "fish_gr1.07-00", 0x800007, 0x100000, CRC(5ae08327) SHA1(822d8292793509ebfbfce27e92a74c78c4328bda), ROM_SKIP(7) ) |
| 1414 | 1414 | ROM_END |
| 1415 | 1415 | |
| 1416 | ROM_START( freezea4 ) | |
| 1416 | ROM_START( freezeat4 ) | |
| 1417 | 1417 | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 1418 | 1418 | ROM_LOAD32_BYTE( "prog.hh", 0x000000, 0x040000, CRC(80336f5e) SHA1(9946e8eebec2cd68db059f40f535ea212f41913d) ) |
| 1419 | 1419 | ROM_LOAD32_BYTE( "prog.hl", 0x000001, 0x040000, CRC(55125520) SHA1(13be4fbf32bcd94a2ea97fd690bd1dfdff146d33) ) |
| r7356 | r7357 | |
| 1439 | 1439 | ROMX_LOAD( "fish_gr1.07-00", 0x800007, 0x100000, CRC(a84335c3) SHA1(340f5ddb9bff1ecd469eab8be36cc0ede84f1f5e), ROM_SKIP(7) ) |
| 1440 | 1440 | ROM_END |
| 1441 | 1441 | |
| 1442 | ROM_START( freezea5 ) | |
| 1442 | ROM_START( freezeat5 ) | |
| 1443 | 1443 | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 1444 | 1444 | ROM_LOAD32_BYTE( "prog.hh", 0x000000, 0x040000, CRC(95c4fc64) SHA1(cd00efe7f760ef1e4cdc4bc8a3b368427cb15d8a) ) |
| 1445 | 1445 | ROM_LOAD32_BYTE( "prog.hl", 0x000001, 0x040000, CRC(ffb9cb71) SHA1(35d6a5440d63bc5b94c4447645365039169da368) ) |
| r7356 | r7357 | |
| 1465 | 1465 | ROMX_LOAD( "fish_gr1.07-00", 0x800007, 0x100000, CRC(3676ac70) SHA1(640c4d4f53ca2bcae2009e402fd6ad70e40defa4), ROM_SKIP(7) ) |
| 1466 | 1466 | ROM_END |
| 1467 | 1467 | |
| 1468 | ROM_START( freezea6 ) | |
| 1468 | ROM_START( freezeat6 ) | |
| 1469 | 1469 | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 1470 | 1470 | ROM_LOAD32_BYTE( "prog.hh", 0x000000, 0x040000, CRC(120711fe) SHA1(387e3cc8a1a9ea7d65c528387891d09ed9889fe3) ) |
| 1471 | 1471 | ROM_LOAD32_BYTE( "prog.hl", 0x000001, 0x040000, CRC(18dd292a) SHA1(00e79851140716985f43594142c97e510a06b24a) ) |
| r7356 | r7357 | |
| 1609 | 1609 | } |
| 1610 | 1610 | |
| 1611 | 1611 | static DRIVER_INIT( freezeat ) { init_freeze_common(machine, 0x1001a9f4); } |
| 1612 | static DRIVER_INIT( freezea2 ) { init_freeze_common(machine, 0x1001a8c4); } | |
| 1613 | static DRIVER_INIT( freezea3 ) { init_freeze_common(machine, 0x1001a134); } | |
| 1614 | static DRIVER_INIT( freezea4 ) { init_freeze_common(machine, 0x1001a134); } | |
| 1615 | static DRIVER_INIT( freezea5 ) { init_freeze_common(machine, 0x10019b34); } | |
| 1616 | static DRIVER_INIT( freezea6 ) { init_freeze_common(machine, 0x10019684); } | |
| 1612 | static DRIVER_INIT( freezeat2 ) { init_freeze_common(machine, 0x1001a8c4); } | |
| 1613 | static DRIVER_INIT( freezeat3 ) { init_freeze_common(machine, 0x1001a134); } | |
| 1614 | static DRIVER_INIT( freezeat4 ) { init_freeze_common(machine, 0x1001a134); } | |
| 1615 | static DRIVER_INIT( freezeat5 ) { init_freeze_common(machine, 0x10019b34); } | |
| 1616 | static DRIVER_INIT( freezeat6 ) { init_freeze_common(machine, 0x10019684); } | |
| 1617 | 1617 | |
| 1618 | 1618 | |
| 1619 | 1619 | static DRIVER_INIT( vcircle ) |
| r7356 | r7357 | |
| 1635 | 1635 | * |
| 1636 | 1636 | *************************************/ |
| 1637 | 1637 | |
| 1638 | GAME( 1996, area51, 0, cojagr3k, area51, area51, ROT0, "Atari Games", "Area 51 (R3000)", 0 ) | |
| 1639 | GAME( 1995, area51t, area51, cojag68k, area51, area51a, ROT0, "Time Warner", "Area 51 (Time Warner License)", 0 ) | |
| 1640 | GAME( 1995, area51a, area51, cojag68k, area51, area51a, ROT0, "Atari Games", "Area 51 (Atari Games License)", 0 ) | |
| 1641 | GAME( 1995, fishfren, 0, cojagr3k, fishfren, fishfren, ROT0, "Time Warner Interactive", "Fishin' Frenzy (prototype)", 0 ) | |
| 1642 | GAME( 1996, freezeat, 0, cojagr3k, freezeat, freezeat, ROT0, "Atari Games", "Freeze (Atari) (prototype, English voice, 96/10/25)", 0 ) | |
| 1643 | GAME( 1996, freezejp, freezeat, cojagr3k, freezeat, freezeat, ROT0, "Atari Games", "Freeze (Atari) (prototype, Japanese voice, 96/10/25)", 0 ) | |
| 1644 | GAME( 1996, freezea2, freezeat, cojagr3k, freezeat, freezea2, ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/18)", 0 ) | |
| 1645 | GAME( 1996, freezea3, freezeat, cojagr3k, freezeat, freezea3, ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/07)", 0 ) | |
| 1646 | GAME( 1996, freezea4, freezeat, cojagr3k, freezeat, freezea4, ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/03)", 0 ) | |
| 1647 | GAME( 1996, freezea5, freezeat, cojagr3k, freezeat, freezea5, ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/09/20, AMOA-96)", 0 ) | |
| 1648 | GAME( 1996, freezea6, freezeat, cojagr3k, freezeat, freezea6, ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/09/07, Jamma-96)", 0 ) | |
| 1649 | GAME( 1996, maxforce, 0, cojagr3k, area51, maxforce, ROT0, "Atari Games", "Maximum Force v1.05", 0 ) | |
| 1650 | GAME( 1996, maxf_102, maxforce, cojagr3k, area51, maxforce, ROT0, "Atari Games", "Maximum Force v1.02", 0 ) | |
| 1651 | GAME( 1996, maxf_ng, maxforce, cojagr3k, area51, maxforce, ROT0, "Atari Games", "Maximum Force (No Gore version)", 0 ) | |
| 1652 | GAME( 1998, area51mx, 0, cojag68k, area51, area51mx, ROT0, "Atari Games", "Area 51 / Maximum Force Duo v2.0", 0 ) | |
| 1653 | GAME( 1998, a51mxr3k, area51mx, cojagr3k, area51, a51mxr3k, ROT0, "Atari Games", "Area 51 / Maximum Force Duo (R3000)", 0 ) | |
| 1654 | GAME( 1996, vcircle, 0, cojagr3k, vcircle, vcircle, ROT0, "Atari Games", "Vicious Circle (prototype)", 0 ) | |
| 1638 | GAME( 1996, area51, 0, cojagr3k, area51, area51, ROT0, "Atari Games", "Area 51 (R3000)", 0 ) | |
| 1639 | GAME( 1995, area51t, area51, cojag68k, area51, area51a, ROT0, "Time Warner", "Area 51 (Time Warner License)", 0 ) | |
| 1640 | GAME( 1995, area51a, area51, cojag68k, area51, area51a, ROT0, "Atari Games", "Area 51 (Atari Games License)", 0 ) | |
| 1641 | GAME( 1995, fishfren, 0, cojagr3k, fishfren, fishfren, ROT0, "Time Warner Interactive", "Fishin' Frenzy (prototype)", 0 ) | |
| 1642 | GAME( 1996, freezeat, 0, cojagr3k, freezeat, freezeat, ROT0, "Atari Games", "Freeze (Atari) (prototype, English voice, 96/10/25)", 0 ) | |
| 1643 | GAME( 1996, freezeatjp,freezeat, cojagr3k, freezeat, freezeat, ROT0, "Atari Games", "Freeze (Atari) (prototype, Japanese voice, 96/10/25)", 0 ) | |
| 1644 | GAME( 1996, freezeat2, freezeat, cojagr3k, freezeat, freezeat2,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/18)", 0 ) | |
| 1645 | GAME( 1996, freezeat3, freezeat, cojagr3k, freezeat, freezeat3,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/07)", 0 ) | |
| 1646 | GAME( 1996, freezeat4, freezeat, cojagr3k, freezeat, freezeat4,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/03)", 0 ) | |
| 1647 | GAME( 1996, freezeat5, freezeat, cojagr3k, freezeat, freezeat5,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/09/20, AMOA-96)", 0 ) | |
| 1648 | GAME( 1996, freezeat6, freezeat, cojagr3k, freezeat, freezeat6,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/09/07, Jamma-96)", 0 ) | |
| 1649 | GAME( 1996, maxforce, 0, cojagr3k, area51, maxforce, ROT0, "Atari Games", "Maximum Force v1.05", 0 ) | |
| 1650 | GAME( 1996, maxf_102, maxforce, cojagr3k, area51, maxforce, ROT0, "Atari Games", "Maximum Force v1.02", 0 ) | |
| 1651 | GAME( 1996, maxf_ng, maxforce, cojagr3k, area51, maxforce, ROT0, "Atari Games", "Maximum Force (No Gore version)", 0 ) | |
| 1652 | GAME( 1998, area51mx, 0, cojag68k, area51, area51mx, ROT0, "Atari Games", "Area 51 / Maximum Force Duo v2.0", 0 ) | |
| 1653 | GAME( 1998, a51mxr3k, area51mx, cojagr3k, area51, a51mxr3k, ROT0, "Atari Games", "Area 51 / Maximum Force Duo (R3000)", 0 ) | |
| 1654 | GAME( 1996, vcircle, 0, cojagr3k, vcircle, vcircle, ROT0, "Atari Games", "Vicious Circle (prototype)", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 185 | 185 | GAME( 1996, dolphntr, 0, aristmk5, aristmk5, aristmk5, ROT0, "Aristocrat", "Dolphin Treasure (B - 06/12/96, NSW/ACT, Rev 1.24.4.0)", GAME_NOT_WORKING|GAME_NO_SOUND ) |
| 186 | 186 | GAME( 1996, dolphtra, 0, aristmk5, aristmk5, aristmk5, ROT0, "Aristocrat", "Dolphin Treasure (B - 06/12/96, NSW/ACT, Rev 3)", GAME_NOT_WORKING|GAME_NO_SOUND ) |
| 187 | 187 | GAME( 1997, goldprmd, 0, aristmk5, aristmk5, aristmk5, ROT0, "Aristocrat", "Golden Pyramids (B - 13-05-97, USA)", GAME_NOT_WORKING|GAME_NO_SOUND ) |
| 188 | GAME( 1997, qotn, | |
| 188 | GAME( 1997, qotn, 0, aristmk5, aristmk5, aristmk5, ROT0, "Aristocrat", "Queen of the Nile (B - 13-05-97, NSW/ACT)", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 189 | 189 | GAME( 1997, dmdtouch, 0, aristmk5, aristmk5, aristmk5, ROT0, "Aristocrat", "Diamond Touch (E - 30-06-97, Local)", GAME_NOT_WORKING|GAME_NO_SOUND ) |
| 190 | 190 | GAME( 1998, adonis, 0, aristmk5, aristmk5, aristmk5, ROT0, "Aristocrat", "Adonis (A - 25-05-98, NSW/ACT)", GAME_NOT_WORKING|GAME_NO_SOUND ) |
| 191 | 191 | GAME( 1998, reelrock, 0, aristmk5, aristmk5, aristmk5, ROT0, "Aristocrat", "Reelin-n-Rockin (A - 13/07/98, Local)", GAME_NOT_WORKING|GAME_NO_SOUND ) |
| r7356 | r7357 | |
|---|---|---|
| 941 | 941 | |
| 942 | 942 | GAME( 199?, jclub2, 0, jclub2, darkhors, 0, ROT0, "Seta", "Jockey Club II (newer hardware)", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| 943 | 943 | GAME( 199?, jclub2o, jclub2, jclub2o, darkhors, 0, ROT0, "Seta", "Jockey Club II (older hardware)", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| 944 | GAME( 2001, darkhors, jclub2, darkhors, | |
| 944 | GAME( 2001, darkhors, jclub2, darkhors, |
| r7356 | r7357 | |
|---|---|---|
| 1021 | 1021 | |
| 1022 | 1022 | |
| 1023 | 1023 | GAME( 1998, saklove, 0, saklove, saklove, saklove, ROT0, "Subsino", "Ying Hua Lian 2.0 (China 1.02)", 0 ) |
| 1024 | GAME( 1999, bishjan, 0, bishjan, bishjan, bishjan, ROT0, "Subsino", "Bishou Jan (Japan 203)", | |
| 1024 | GAME( 1999, bishjan, 0, bishjan, bishjan, bishjan, ROT0, "Subsino", "Bishou Jan (Japan 203)", |
| r7356 | r7357 | |
|---|---|---|
| 789 | 789 | MACHINE_DRIVER_END |
| 790 | 790 | |
| 791 | 791 | |
| 792 | static MACHINE_DRIVER_START( cgraplp2 ) | |
| 792 | static MACHINE_DRIVER_START( cgraplop2 ) | |
| 793 | 793 | |
| 794 | 794 | /* basic machine hardware */ |
| 795 | 795 | MDRV_IMPORT_FROM(decocass) |
| 796 | MDRV_MACHINE_RESET(cgraplp2) | |
| 796 | MDRV_MACHINE_RESET(cgraplop2) | |
| 797 | 797 | MACHINE_DRIVER_END |
| 798 | 798 | |
| 799 | 799 | |
| r7356 | r7357 | |
| 1170 | 1170 | ROM_LOAD( "cgraplop.pro", 0x0000, 0x1000, CRC(ee93787d) SHA1(0c753d62fdce2fdbd5b329a5aa259a967d07a651) ) /* is this right for this set? */ |
| 1171 | 1171 | |
| 1172 | 1172 | ROM_REGION( 0x10000, "cassette", 0 ) /* (max) 64k for cassette image */ |
| 1173 | ROM_LOAD( "cgraplp2.cas", 0x0000, 0x8000, CRC(2e728981) SHA1(83ba90d95858d647315a1c311b8643672afea5f7) ) | |
| 1173 | ROM_LOAD( "cgraplop2.cas", 0x0000, 0x8000, CRC(2e728981) SHA1(83ba90d95858d647315a1c311b8643672afea5f7) ) | |
| 1174 | 1174 | ROM_END |
| 1175 | 1175 | |
| 1176 | 1176 | ROM_START( clapapa ) |
| r7356 | r7357 | |
| 1404 | 1404 | /* 27 */ GAME( 1982, cburnrub2,cburnrub, cburnrub, decocass, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (Cassette, set 2)", 0 ) |
| 1405 | 1405 | /* 27 */ GAME( 1982, cbnj, cburnrub, cbnj, decocass, decocass, ROT270, "Data East Corporation", "Bump N Jump (Cassette)", 0 ) |
| 1406 | 1406 | /* 28 */ GAME( 1983, cgraplop, decocass, cgraplop, cgraplop, decocass, ROT270, "Data East Corporation", "Cluster Buster / Graplop (Cassette, set 1)", 0 ) |
| 1407 | /* 28 */ GAME( 1983, cgraplop2,cgraplop, cgraplp2, | |
| 1407 | /* 28 */ GAME( 1983, cgraplop2,cgraplop, cgraplop2, | |
| 1408 | 1408 | /* 29 */ GAME( 1983, clapapa, decocass, clapapa, decocass, decocass, ROT270, "Data East Corporation", "Rootin' Tootin' / La-Pa-Pa (Cassette)" , 0) /* Displays 'La-Pa-Pa during attract */ |
| 1409 | 1409 | /* 29 */ GAME( 1983, clapapa2, clapapa, clapapa, decocass, decocass, ROT270, "Data East Corporation", "Rootin' Tootin' (Cassette)" , 0) /* Displays 'Rootin' Tootin' during attract */ |
| 1410 | 1410 | /* 31 */ GAME( 1983, cprobowl, decocass, cprobowl, decocass, decocass, ROT270, "Data East Corporation", "Pro Bowling (Cassette)", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 72 | 72 | Notes: |
| 73 | 73 | - There is no flip screen nor cocktail mode in the original game |
| 74 | 74 | |
| 75 | 02/2010 - Added XTAL values based on the parts listing the manual. The | |
| 76 | divisors for the cpus make sense, however, they are not verified. | |
| 77 | ||
| 75 | 78 | ****************************************************************************/ |
| 76 | 79 | |
| 77 | 80 | #include "emu.h" |
| r7356 | r7357 | |
| 79 | 82 | #include "sound/pokey.h" |
| 80 | 83 | #include "includes/irobot.h" |
| 81 | 84 | |
| 85 | #define MAIN_CLOCK XTAL_12_096MHz | |
| 86 | #define VIDEO_CLOCK XTAL_20MHz | |
| 82 | 87 | |
| 83 | ||
| 84 | 88 | /************************************* |
| 85 | 89 | * |
| 86 | 90 | * NVRAM handler |
| r7356 | r7357 | |
| 153 | 157 | |
| 154 | 158 | static INPUT_PORTS_START( irobot ) |
| 155 | 159 | PORT_START("IN0") /* IN0 */ |
| 156 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 157 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 158 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 159 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 160 | PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) | |
| 161 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) | |
| 162 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 163 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 160 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 161 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 162 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 163 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 164 | PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) | |
| 165 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) | |
| 166 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 167 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 164 | 168 | |
| 165 | 169 | PORT_START("IN1") /* IN1 */ |
| 166 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 167 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 168 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 169 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 170 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 171 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 172 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) | |
| 173 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) | |
| 170 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 171 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 172 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 173 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 174 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 175 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 176 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) | |
| 177 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) | |
| 174 | 178 | |
| 175 | 179 | PORT_START("IN2") /* IN2 */ |
| 176 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 177 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 178 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 179 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 180 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 181 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* MB DONE */ | |
| 182 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* EXT DONE */ | |
| 183 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 180 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 181 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 182 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 183 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 184 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 185 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* MB DONE */ | |
| 186 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* EXT DONE */ | |
| 187 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 184 | 188 | |
| 185 | PORT_START("DSW1") /* DSW1 */ | |
| 186 | PORT_DIPNAME( 0x03, 0x00, "Coins Per Credit" ) | |
| 189 | PORT_START("DSW2") /* DSW2 - 5E*/ | |
| 190 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Language ) ) PORT_DIPLOCATION("SW5E:1") | |
| 191 | PORT_DIPSETTING( 0x01, DEF_STR( English ) ) | |
| 192 | PORT_DIPSETTING( 0x00, DEF_STR( German ) ) | |
| 193 | // Printed Manual States Dip (0x01) adjusts Doodle City playtime: ON=2M10S / OFF=3M5S | |
| 194 | PORT_DIPNAME( 0x02, 0x02, "Minimum Game Time" ) PORT_DIPLOCATION("SW5E:2") | |
| 195 | PORT_DIPSETTING( 0x00, "90 Seconds on Level 1" ) | |
| 196 | PORT_DIPSETTING( 0x02, DEF_STR( None ) ) | |
| 197 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW5E:3,4") | |
| 198 | PORT_DIPSETTING( 0x08, DEF_STR( None ) ) | |
| 199 | PORT_DIPSETTING( 0x0c, "20000" ) | |
| 200 | PORT_DIPSETTING( 0x00, "30000" ) | |
| 201 | PORT_DIPSETTING( 0x04, "50000" ) | |
| 202 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW5E:5,6") | |
| 203 | PORT_DIPSETTING( 0x20, "2" ) | |
| 204 | PORT_DIPSETTING( 0x30, "3" ) | |
| 205 | PORT_DIPSETTING( 0x00, "4" ) | |
| 206 | PORT_DIPSETTING( 0x10, "5" ) | |
| 207 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW5E:7") | |
| 208 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) | |
| 209 | PORT_DIPSETTING( 0x40, DEF_STR( Medium ) ) | |
| 210 | PORT_DIPNAME( 0x80, 0x80, "Demo Mode" ) PORT_DIPLOCATION("SW5E:8") | |
| 211 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 212 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 213 | ||
| 214 | PORT_START("DSW1") /* DSW1 - 3J */ | |
| 215 | PORT_DIPNAME( 0x03, 0x00, "Coins Per Credit" ) PORT_DIPLOCATION("SW3J:!1,!2") | |
| 187 | 216 | PORT_DIPSETTING( 0x00, "1 Coin 1 Credit" ) |
| 188 | 217 | PORT_DIPSETTING( 0x01, "2 Coins 1 Credit" ) |
| 189 | 218 | PORT_DIPSETTING( 0x02, "3 Coins 1 Credit" ) |
| 190 | 219 | PORT_DIPSETTING( 0x03, "4 Coins 1 Credit" ) |
| 191 | PORT_DIPNAME( 0x0c, 0x00, "Right Coin" ) | |
| 220 | PORT_DIPNAME( 0x0c, 0x00, "Right Coin" ) PORT_DIPLOCATION("SW3J:!3,!4") | |
| 192 | 221 | PORT_DIPSETTING( 0x00, "1 Coin for 1 Coin Unit" ) |
| 193 | 222 | PORT_DIPSETTING( 0x04, "1 Coin for 4 Coin Units" ) |
| 194 | 223 | PORT_DIPSETTING( 0x08, "1 Coin for 5 Coin Units" ) |
| 195 | 224 | PORT_DIPSETTING( 0x0c, "1 Coin for 6 Coin Units" ) |
| 196 | PORT_DIPNAME( 0x10, 0x00, "Left Coin" ) | |
| 225 | PORT_DIPNAME( 0x10, 0x00, "Left Coin" ) PORT_DIPLOCATION("SW3J:!5") | |
| 197 | 226 | PORT_DIPSETTING( 0x00, "1 Coin for 1 Coin Unit" ) |
| 198 | 227 | PORT_DIPSETTING( 0x10, "1 Coin for 2 Coin Units" ) |
| 199 | PORT_DIPNAME( 0xe0, 0x00, "Bonus Adder" ) | |
| 228 | PORT_DIPNAME( 0xe0, 0x00, "Bonus Adder" ) PORT_DIPLOCATION("SW3J:!6,!7,!8") | |
| 200 | 229 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 201 | 230 | PORT_DIPSETTING( 0x20, "1 Credit for 2 Coin Units" ) |
| 202 | 231 | PORT_DIPSETTING( 0xa0, "1 Credit for 3 Coin Units" ) |
| r7356 | r7357 | |
| 205 | 234 | PORT_DIPSETTING( 0x60, "2 Credits for 4 Coin Units" ) |
| 206 | 235 | PORT_DIPSETTING( 0xe0, DEF_STR( Free_Play ) ) |
| 207 | 236 | |
| 208 | PORT_START("DSW2") /* DSW2 */ | |
| 209 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Language ) ) | |
| 210 | PORT_DIPSETTING( 0x01, DEF_STR( English ) ) | |
| 211 | PORT_DIPSETTING( 0x00, DEF_STR( German ) ) | |
| 212 | PORT_DIPNAME( 0x02, 0x02, "Min Game Time" ) | |
| 213 | PORT_DIPSETTING( 0x00, "90 Sec" ) | |
| 214 | PORT_DIPSETTING( 0x02, "3 Lives" ) | |
| 215 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 216 | PORT_DIPSETTING( 0x08, DEF_STR( None ) ) | |
| 217 | PORT_DIPSETTING( 0x0c, "20000" ) | |
| 218 | PORT_DIPSETTING( 0x00, "30000" ) | |
| 219 | PORT_DIPSETTING( 0x04, "50000" ) | |
| 220 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) | |
| 221 | PORT_DIPSETTING( 0x20, "2" ) | |
| 222 | PORT_DIPSETTING( 0x30, "3" ) | |
| 223 | PORT_DIPSETTING( 0x00, "4" ) | |
| 224 | PORT_DIPSETTING( 0x10, "5" ) | |
| 225 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) | |
| 226 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) | |
| 227 | PORT_DIPSETTING( 0x40, DEF_STR( Medium ) ) | |
| 228 | PORT_DIPNAME( 0x80, 0x80, "Demo Mode" ) | |
| 229 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 230 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 231 | ||
| 232 | 237 | PORT_START("AN0") /* IN4 */ |
| 233 | 238 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(96,163) PORT_SENSITIVITY(70) PORT_KEYDELTA(50) |
| 234 | 239 | |
| r7356 | r7357 | |
| 285 | 290 | static MACHINE_DRIVER_START( irobot ) |
| 286 | 291 | |
| 287 | 292 | /* basic machine hardware */ |
| 288 | MDRV_CPU_ADD("maincpu", M6809, | |
| 293 | MDRV_CPU_ADD("maincpu", M6809, MAIN_CLOCK/8) | |
| 289 | 294 | MDRV_CPU_PROGRAM_MAP(irobot_map) |
| 290 | 295 | |
| 291 | 296 | MDRV_MACHINE_RESET(irobot) |
| r7356 | r7357 | |
| 312 | 317 | /* sound hardware */ |
| 313 | 318 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 314 | 319 | |
| 315 | MDRV_SOUND_ADD("pokey1", POKEY, | |
| 320 | MDRV_SOUND_ADD("pokey1", POKEY, MAIN_CLOCK/8) | |
| 316 | 321 | MDRV_SOUND_CONFIG(pokey_config) |
| 317 | 322 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 318 | 323 | |
| 319 | MDRV_SOUND_ADD("pokey2", POKEY, | |
| 324 | MDRV_SOUND_ADD("pokey2", POKEY, MAIN_CLOCK/8) | |
| 320 | 325 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 321 | 326 | |
| 322 | MDRV_SOUND_ADD("pokey3", POKEY, | |
| 327 | MDRV_SOUND_ADD("pokey3", POKEY, MAIN_CLOCK/8) | |
| 323 | 328 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 324 | 329 | |
| 325 | MDRV_SOUND_ADD("pokey4", POKEY, | |
| 330 | MDRV_SOUND_ADD("pokey4", POKEY, MAIN_CLOCK/8) | |
| 326 | 331 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 327 | 332 | MACHINE_DRIVER_END |
| 328 | 333 |
| r7356 | r7357 | |
|---|---|---|
| 227 | 227 | ROM_LOAD( "136075-1015.14b", 0x00000, 0x10000, CRC(4d24c768) SHA1(da102105a4d8c552e3594b8ffb1903ecbaa69415) ) |
| 228 | 228 | ROM_LOAD( "136075-1016.12b", 0x10000, 0x10000, CRC(12e9b4b7) SHA1(2447f116cd865e46e61022143a2668beca99d5d1) ) |
| 229 | 229 | |
| 230 | ROM_REGION( 0x00573, "pals", 0 ) /* Lattice GAL16V8A-25LP GAL's */ | |
| 231 | ROM_LOAD( "136075-1000.11c.bin", 0x0000, 0x0117, CRC(fb86e94a) SHA1(b16f037c49766ab734e47c8e1b16b5178809b8a3) ) | |
| 232 | ROM_LOAD( "136075-1001.18l.bin", 0x0000, 0x0117, CRC(cd21acfe) SHA1(14bd9e2f1b50a1da550933e3fdc16e3f09b65e92) ) | |
| 233 | ROM_LOAD( "136075-1002.8w.bin", 0x0000, 0x0117, CRC(4a7b6c44) SHA1(9579e098af3e5cd19bd14c361d3b1c5cb9047171) ) | |
| 234 | ROM_LOAD( "136075-1003.9w.bin", 0x0000, 0x0117, CRC(72f7f904) SHA1(f792b5bcc313c5f3338a569a6f376a3ebb1eabf7) ) | |
| 235 | ROM_LOAD( "136075-1004.6w.bin", 0x0000, 0x0117, CRC(6cd3270d) SHA1(84854b5beee539a80fc94f6e4637aa1c2543a1cb) ) | |
| 230 | ROM_REGION( 0x00573, "pals", 0 ) /* Lattice GAL16V8A-25LP GAL's */ | |
| 231 | ROM_LOAD( "136075-1000.11c.bin", 0x0000, 0x0117, CRC(fb86e94a) SHA1(b16f037c49766ab734e47c8e1b16b5178809b8a3) ) | |
| 232 | ROM_LOAD( "136075-1001.18l.bin", 0x0000, 0x0117, CRC(cd21acfe) SHA1(14bd9e2f1b50a1da550933e3fdc16e3f09b65e92) ) | |
| 233 | ROM_LOAD( "136075-1002.8w.bin", 0x0000, 0x0117, CRC(4a7b6c44) SHA1(9579e098af3e5cd19bd14c361d3b1c5cb9047171) ) | |
| 234 | ROM_LOAD( "136075-1003.9w.bin", 0x0000, 0x0117, CRC(72f7f904) SHA1(f792b5bcc313c5f3338a569a6f376a3ebb1eabf7) ) | |
| 235 | ROM_LOAD( "136075-1004.6w.bin", 0x0000, 0x0117, CRC(6cd3270d) SHA1(84854b5beee539a80fc94f6e4637aa1c2543a1cb) ) | |
| 236 | 236 | ROM_END |
| 237 | 237 | |
| 238 | 238 | |
| r7356 | r7357 | |
| 257 | 257 | ROM_LOAD( "136075-1015.14b", 0x00000, 0x10000, CRC(4d24c768) SHA1(da102105a4d8c552e3594b8ffb1903ecbaa69415) ) |
| 258 | 258 | ROM_LOAD( "136075-1016.12b", 0x10000, 0x10000, CRC(12e9b4b7) SHA1(2447f116cd865e46e61022143a2668beca99d5d1) ) |
| 259 | 259 | |
| 260 | ROM_REGION( 0x00573, "pals", 0 ) /* Lattice GAL16V8A-25LP GAL's */ | |
| 261 | ROM_LOAD( "136075-1000.11c.bin", 0x0000, 0x0117, CRC(fb86e94a) SHA1(b16f037c49766ab734e47c8e1b16b5178809b8a3) ) | |
| 262 | ROM_LOAD( "136075-1001.18l.bin", 0x0000, 0x0117, CRC(cd21acfe) SHA1(14bd9e2f1b50a1da550933e3fdc16e3f09b65e92) ) | |
| 263 | ROM_LOAD( "136075-1002.8w.bin", 0x0000, 0x0117, CRC(4a7b6c44) SHA1(9579e098af3e5cd19bd14c361d3b1c5cb9047171) ) | |
| 264 | ROM_LOAD( "136075-1003.9w.bin", 0x0000, 0x0117, CRC(72f7f904) SHA1(f792b5bcc313c5f3338a569a6f376a3ebb1eabf7) ) | |
| 265 | ROM_LOAD( "136075-1004.6w.bin", 0x0000, 0x0117, CRC(6cd3270d) SHA1(84854b5beee539a80fc94f6e4637aa1c2543a1cb) ) | |
| 260 | ROM_REGION( 0x00573, "pals", 0 ) /* Lattice GAL16V8A-25LP GAL's */ | |
| 261 | ROM_LOAD( "136075-1000.11c.bin", 0x0000, 0x0117, CRC(fb86e94a) SHA1(b16f037c49766ab734e47c8e1b16b5178809b8a3) ) | |
| 262 | ROM_LOAD( "136075-1001.18l.bin", 0x0000, 0x0117, CRC(cd21acfe) SHA1(14bd9e2f1b50a1da550933e3fdc16e3f09b65e92) ) | |
| 263 | ROM_LOAD( "136075-1002.8w.bin", 0x0000, 0x0117, CRC(4a7b6c44) SHA1(9579e098af3e5cd19bd14c361d3b1c5cb9047171) ) | |
| 264 | ROM_LOAD( "136075-1003.9w.bin", 0x0000, 0x0117, CRC(72f7f904) SHA1(f792b5bcc313c5f3338a569a6f376a3ebb1eabf7) ) | |
| 265 | ROM_LOAD( "136075-1004.6w.bin", 0x0000, 0x0117, CRC(6cd3270d) SHA1(84854b5beee539a80fc94f6e4637aa1c2543a1cb) ) | |
| 266 | 266 | ROM_END |
| 267 | 267 | |
| 268 | 268 | |
| r7356 | r7357 | |
| 287 | 287 | ROM_LOAD( "136075-1015.14b", 0x00000, 0x10000, CRC(4d24c768) SHA1(da102105a4d8c552e3594b8ffb1903ecbaa69415) ) |
| 288 | 288 | ROM_LOAD( "136075-1016.12b", 0x10000, 0x10000, CRC(12e9b4b7) SHA1(2447f116cd865e46e61022143a2668beca99d5d1) ) |
| 289 | 289 | |
| 290 | ROM_REGION( 0x00573, "pals", 0 ) /* Lattice GAL16V8A-25LP GAL's */ | |
| 291 | ROM_LOAD( "136075-1000.11c.bin", 0x0000, 0x0117, CRC(fb86e94a) SHA1(b16f037c49766ab734e47c8e1b16b5178809b8a3) ) | |
| 292 | ROM_LOAD( "136075-1001.18l.bin", 0x0000, 0x0117, CRC(cd21acfe) SHA1(14bd9e2f1b50a1da550933e3fdc16e3f09b65e92) ) | |
| 293 | ROM_LOAD( "136075-1002.8w.bin", 0x0000, 0x0117, CRC(4a7b6c44) SHA1(9579e098af3e5cd19bd14c361d3b1c5cb9047171) ) | |
| 294 | ROM_LOAD( "136075-1003.9w.bin", 0x0000, 0x0117, CRC(72f7f904) SHA1(f792b5bcc313c5f3338a569a6f376a3ebb1eabf7) ) | |
| 295 | ROM_LOAD( "136075-1004.6w.bin", 0x0000, 0x0117, CRC(6cd3270d) SHA1(84854b5beee539a80fc94f6e4637aa1c2543a1cb) ) | |
| 290 | ROM_REGION( 0x00573, "pals", 0 ) /* Lattice GAL16V8A-25LP GAL's */ | |
| 291 | ROM_LOAD( "136075-1000.11c.bin", 0x0000, 0x0117, CRC(fb86e94a) SHA1(b16f037c49766ab734e47c8e1b16b5178809b8a3) ) | |
| 292 | ROM_LOAD( "136075-1001.18l.bin", 0x0000, 0x0117, CRC(cd21acfe) SHA1(14bd9e2f1b50a1da550933e3fdc16e3f09b65e92) ) | |
| 293 | ROM_LOAD( "136075-1002.8w.bin", 0x0000, 0x0117, CRC(4a7b6c44) SHA1(9579e098af3e5cd19bd14c361d3b1c5cb9047171) ) | |
| 294 | ROM_LOAD( "136075-1003.9w.bin", 0x0000, 0x0117, CRC(72f7f904) SHA1(f792b5bcc313c5f3338a569a6f376a3ebb1eabf7) ) | |
| 295 | ROM_LOAD( "136075-1004.6w.bin", 0x0000, 0x0117, CRC(6cd3270d) SHA1(84854b5beee539a80fc94f6e4637aa1c2543a1cb) ) | |
| 296 | 296 | ROM_END |
| 297 | 297 | |
| 298 | 298 | |
| r7356 | r7357 | |
| 317 | 317 | ROM_LOAD( "136075-1015.14b", 0x00000, 0x10000, CRC(4d24c768) SHA1(da102105a4d8c552e3594b8ffb1903ecbaa69415) ) |
| 318 | 318 | ROM_LOAD( "136075-1016.12b", 0x10000, 0x10000, CRC(12e9b4b7) SHA1(2447f116cd865e46e61022143a2668beca99d5d1) ) |
| 319 | 319 | |
| 320 | ROM_REGION( 0x00573, "pals", 0 ) /* Lattice GAL16V8A-25LP GAL's */ | |
| 321 | ROM_LOAD( "136075-1000.11c.bin", 0x0000, 0x0117, CRC(fb86e94a) SHA1(b16f037c49766ab734e47c8e1b16b5178809b8a3) ) | |
| 322 | ROM_LOAD( "136075-1001.18l.bin", 0x0000, 0x0117, CRC(cd21acfe) SHA1(14bd9e2f1b50a1da550933e3fdc16e3f09b65e92) ) | |
| 323 | ROM_LOAD( "136075-1002.8w.bin", 0x0000, 0x0117, CRC(4a7b6c44) SHA1(9579e098af3e5cd19bd14c361d3b1c5cb9047171) ) | |
| 324 | ROM_LOAD( "136075-1003.9w.bin", 0x0000, 0x0117, CRC(72f7f904) SHA1(f792b5bcc313c5f3338a569a6f376a3ebb1eabf7) ) | |
| 325 | ROM_LOAD( "136075-1004.6w.bin", 0x0000, 0x0117, CRC(6cd3270d) SHA1(84854b5beee539a80fc94f6e4637aa1c2543a1cb) ) | |
| 320 | ROM_REGION( 0x00573, "pals", 0 ) /* Lattice GAL16V8A-25LP GAL's */ | |
| 321 | ROM_LOAD( "136075-1000.11c.bin", 0x0000, 0x0117, CRC(fb86e94a) SHA1(b16f037c49766ab734e47c8e1b16b5178809b8a3) ) | |
| 322 | ROM_LOAD( "136075-1001.18l.bin", 0x0000, 0x0117, CRC(cd21acfe) SHA1(14bd9e2f1b50a1da550933e3fdc16e3f09b65e92) ) | |
| 323 | ROM_LOAD( "136075-1002.8w.bin", 0x0000, 0x0117, CRC(4a7b6c44) SHA1(9579e098af3e5cd19bd14c361d3b1c5cb9047171) ) | |
| 324 | ROM_LOAD( "136075-1003.9w.bin", 0x0000, 0x0117, CRC(72f7f904) SHA1(f792b5bcc313c5f3338a569a6f376a3ebb1eabf7) ) | |
| 325 | ROM_LOAD( "136075-1004.6w.bin", 0x0000, 0x0117, CRC(6cd3270d) SHA1(84854b5beee539a80fc94f6e4637aa1c2543a1cb) ) | |
| 326 | 326 | ROM_END |
| 327 | 327 | |
| 328 | 328 | |
| r7356 | r7357 | |
| 347 | 347 | ROM_LOAD( "136075-1015.14b", 0x00000, 0x10000, CRC(4d24c768) SHA1(da102105a4d8c552e3594b8ffb1903ecbaa69415) ) |
| 348 | 348 | ROM_LOAD( "136075-1016.12b", 0x10000, 0x10000, CRC(12e9b4b7) SHA1(2447f116cd865e46e61022143a2668beca99d5d1) ) |
| 349 | 349 | |
| 350 | ROM_REGION( 0x00573, "pals", 0 ) /* Lattice GAL16V8A-25LP GAL's */ | |
| 351 | ROM_LOAD( "136075-1000.11c.bin", 0x0000, 0x0117, CRC(fb86e94a) SHA1(b16f037c49766ab734e47c8e1b16b5178809b8a3) ) | |
| 352 | ROM_LOAD( "136075-1001.18l.bin", 0x0000, 0x0117, CRC(cd21acfe) SHA1(14bd9e2f1b50a1da550933e3fdc16e3f09b65e92) ) | |
| 353 | ROM_LOAD( "136075-1002.8w.bin", 0x0000, 0x0117, CRC(4a7b6c44) SHA1(9579e098af3e5cd19bd14c361d3b1c5cb9047171) ) | |
| 354 | ROM_LOAD( "136075-1003.9w.bin", 0x0000, 0x0117, CRC(72f7f904) SHA1(f792b5bcc313c5f3338a569a6f376a3ebb1eabf7) ) | |
| 355 | ROM_LOAD( "136075-1004.6w.bin", 0x0000, 0x0117, CRC(6cd3270d) SHA1(84854b5beee539a80fc94f6e4637aa1c2543a1cb) ) | |
| 350 | ROM_REGION( 0x00573, "pals", 0 ) /* Lattice GAL16V8A-25LP GAL's */ | |
| 351 | ROM_LOAD( "136075-1000.11c.bin", 0x0000, 0x0117, CRC(fb86e94a) SHA1(b16f037c49766ab734e47c8e1b16b5178809b8a3) ) | |
| 352 | ROM_LOAD( "136075-1001.18l.bin", 0x0000, 0x0117, CRC(cd21acfe) SHA1(14bd9e2f1b50a1da550933e3fdc16e3f09b65e92) ) | |
| 353 | ROM_LOAD( "136075-1002.8w.bin", 0x0000, 0x0117, CRC(4a7b6c44) SHA1(9579e098af3e5cd19bd14c361d3b1c5cb9047171) ) | |
| 354 | ROM_LOAD( "136075-1003.9w.bin", 0x0000, 0x0117, CRC(72f7f904) SHA1(f792b5bcc313c5f3338a569a6f376a3ebb1eabf7) ) | |
| 355 | ROM_LOAD( "136075-1004.6w.bin", 0x0000, 0x0117, CRC(6cd3270d) SHA1(84854b5beee539a80fc94f6e4637aa1c2543a1cb) ) | |
| 356 | 356 | ROM_END |
| 357 | 357 | |
| 358 | 358 |
| r7356 | r7357 | |
|---|---|---|
| 338 | 338 | #include "sound/dac.h" |
| 339 | 339 | #include "sound/2151intf.h" |
| 340 | 340 | #include "video/segaic24.h" |
| 341 | #include "includes/system16.h" | |
| 342 | 341 | #include "includes/segas24.h" |
| 343 | 342 | |
| 344 | 343 | #define MASTER_CLOCK XTAL_20MHz |
| r7356 | r7357 | |
|---|---|---|
| 1970 | 1970 | #define _64_WORD_ROM_LOAD(name,offset,length,crc) ROMX_LOAD(name, offset, length, crc, ROM_GROUPWORD | ROM_SKIP(6)) |
| 1971 | 1971 | |
| 1972 | 1972 | |
| 1973 | /* Gokujou Parodius */ | |
| 1973 | /* Gokujou Parodius version JAD (Japan) */ | |
| 1974 | 1974 | ROM_START( gokuparo ) |
| 1975 | 1975 | /* main program */ |
| 1976 | 1976 | ROM_REGION( 0x800000, "maincpu", 0 ) |
| 1977 | 1977 | GX_BIOS |
| 1978 | ROM_LOAD32_WORD_SWAP( "321jad02. | |
| 1978 | ROM_LOAD32_WORD_SWAP( "321jad02.21b", 0x200002, 512*1024, CRC(c2e548c0) SHA1(48fbcc96d1f56bb3abb5098400536a18a676d934) ) | |
| 1979 | 1979 | ROM_LOAD32_WORD_SWAP( "321jad04.27b", 0x200000, 512*1024, CRC(916a7951) SHA1(d6f56ff5f6c6708939767e69a3ebc7c7eddb6003) ) |
| 1980 | 1980 | |
| 1981 | 1981 | /* sound program */ |
| 1982 | 1982 | ROM_REGION( 0x40000, "soundcpu", 0 ) |
| 1983 | ROM_LOAD16_BYTE("321_b06.9c", 0x000000, 128*1024, CRC(da810554) SHA1(f253e1aa137eecf283d8b083ef2b3b049e8366f4) ) | |
| 1984 | ROM_LOAD16_BYTE("321_b07.7c", 0x000001, 128*1024, CRC(c47634c0) SHA1(20e4105df5bbc33edd01894e78f74ed5f173576e) ) | |
| 1983 | ROM_LOAD16_BYTE("321b06.9c", 0x000000, 128*1024, CRC(da810554) SHA1(f253e1aa137eecf283d8b083ef2b3b049e8366f4) ) | |
| 1984 | ROM_LOAD16_BYTE("321b07.7c", 0x000001, 128*1024, CRC(c47634c0) SHA1(20e4105df5bbc33edd01894e78f74ed5f173576e) ) | |
| 1985 | 1985 | |
| 1986 | 1986 | /* tiles */ |
| 1987 | 1987 | ROM_REGION( 0x600000, "gfx1", ROMREGION_ERASE00 ) |
| 1988 | TILE_WORD_ROM_LOAD( " | |
| 1988 | TILE_WORD_ROM_LOAD( "321b14.17h", 0x000000, 2*1024*1024, CRC(437d0057) SHA1(30c449200e0510dc664289b527bade6e10dbe57a) ) | |
| 1989 | 1989 | TILE_BYTE_ROM_LOAD( "321b12.13g", 0x000004, 512*1024, CRC(5f9edfa0) SHA1(36d54c5fe498a4d0fa64757cef11c56c67518258) ) |
| 1990 | 1990 | |
| 1991 | 1991 | /* sprites */ |
| 1992 | 1992 | ROM_REGION( 0x500000, "gfx2", ROMREGION_ERASE00 ) |
| 1993 | ROM_LOAD32_WORD( "fj-jap.25g", 0x000000, 2*1024*1024, CRC(c6e2e74d) SHA1(3875a50923e46e2986dbe2573453af5c7fa726f7) ) | |
| 1994 | ROM_LOAD32_WORD( "fj-jap.28g", 0x000002, 2*1024*1024, CRC(ea9f8c48) SHA1(b5e880015887308a5f1c1c623011d9b0903e848f) ) | |
| 1993 | ROM_LOAD32_WORD( "321b11.25g", 0x000000, 2*1024*1024, CRC(c6e2e74d) SHA1(3875a50923e46e2986dbe2573453af5c7fa726f7) ) | |
| 1994 | ROM_LOAD32_WORD( "321b10.28g", 0x000002, 2*1024*1024, CRC(ea9f8c48) SHA1(b5e880015887308a5f1c1c623011d9b0903e848f) ) | |
| 1995 | 1995 | ROM_LOAD( "321b09.30g", 0x400000, 1*1024*1024, CRC(94add237) SHA1(9a6d0a9727e7fa02d91ece220b145074a6741a95) ) |
| 1996 | 1996 | |
| 1997 | 1997 | /* sound data */ |
| r7356 | r7357 | |
| 2000 | 2000 | ROM_LOAD( "321b18.7g", 0x200000, 2*1024*1024, CRC(2c561ad0) SHA1(6265054072ba1c2837dd96e0259b20bc50457160) ) |
| 2001 | 2001 | ROM_END |
| 2002 | 2002 | |
| 2003 | /* Fantastic Journey | |
| 2003 | /* Fantastic Journey | |
| 2004 | 2004 | ROM_START( fantjour ) |
| 2005 | 2005 | /* main program */ |
| 2006 | 2006 | ROM_REGION( 0x800000, "maincpu", 0 ) |
| 2007 | 2007 | GX_BIOS |
| 2008 | ROM_LOAD32_WORD_SWAP( "fsus31b.bin", 0x200002, 512*1024, CRC(afaf9d17) SHA1(a12214c6e634862d6507f56719b55d4a23a0ef0f) ) | |
| 2009 | ROM_LOAD32_WORD_SWAP( "fsus27b.bin", 0x200000, 512*1024, CRC(b2cfe225) SHA1(7fd43acb1dd853a7980e7fcf48971ae28175e421) ) | |
| 2008 | ROM_LOAD32_WORD_SWAP( "321eaa02.21b", 0x200002, 512*1024, CRC(afaf9d17) SHA1(a12214c6e634862d6507f56719b55d4a23a0ef0f) ) | |
| 2009 | ROM_LOAD32_WORD_SWAP( "321eaa04.27b", 0x200000, 512*1024, CRC(b2cfe225) SHA1(7fd43acb1dd853a7980e7fcf48971ae28175e421) ) | |
| 2010 | 2010 | |
| 2011 | 2011 | /* sound program */ |
| 2012 | 2012 | ROM_REGION( 0x40000, "soundcpu", 0 ) |
| 2013 | ROM_LOAD16_BYTE("321_b06.9c", 0x000000, 128*1024, CRC(da810554) SHA1(f253e1aa137eecf283d8b083ef2b3b049e8366f4) ) | |
| 2014 | ROM_LOAD16_BYTE("321_b07.7c", 0x000001, 128*1024, CRC(c47634c0) SHA1(20e4105df5bbc33edd01894e78f74ed5f173576e) ) | |
| 2013 | ROM_LOAD16_BYTE("321b06.9c", 0x000000, 128*1024, CRC(da810554) SHA1(f253e1aa137eecf283d8b083ef2b3b049e8366f4) ) | |
| 2014 | ROM_LOAD16_BYTE("321b07.7c", 0x000001, 128*1024, CRC(c47634c0) SHA1(20e4105df5bbc33edd01894e78f74ed5f173576e) ) | |
| 2015 | 2015 | |
| 2016 | 2016 | /* tiles */ |
| 2017 | 2017 | ROM_REGION( 0x600000, "gfx1", ROMREGION_ERASE00 ) |
| 2018 | TILE_WORD_ROM_LOAD( " | |
| 2018 | TILE_WORD_ROM_LOAD( "321b14.17h", 0x000000, 2*1024*1024, CRC(437d0057) SHA1(30c449200e0510dc664289b527bade6e10dbe57a) ) | |
| 2019 | 2019 | TILE_BYTE_ROM_LOAD( "321b12.13g", 0x000004, 512*1024, CRC(5f9edfa0) SHA1(36d54c5fe498a4d0fa64757cef11c56c67518258) ) |
| 2020 | 2020 | |
| 2021 | 2021 | /* sprites */ |
| 2022 | 2022 | ROM_REGION( 0x500000, "gfx2", ROMREGION_ERASE00 ) |
| 2023 | ROM_LOAD32_WORD( "fj-jap.25g", 0x000000, 2*1024*1024, CRC(c6e2e74d) SHA1(3875a50923e46e2986dbe2573453af5c7fa726f7) ) | |
| 2024 | ROM_LOAD32_WORD( "fj-jap.28g", 0x000002, 2*1024*1024, CRC(ea9f8c48) SHA1(b5e880015887308a5f1c1c623011d9b0903e848f) ) | |
| 2023 | ROM_LOAD32_WORD( "321b11.25g", 0x000000, 2*1024*1024, CRC(c6e2e74d) SHA1(3875a50923e46e2986dbe2573453af5c7fa726f7) ) | |
| 2024 | ROM_LOAD32_WORD( "321b10.28g", 0x000002, 2*1024*1024, CRC(ea9f8c48) SHA1(b5e880015887308a5f1c1c623011d9b0903e848f) ) | |
| 2025 | 2025 | ROM_LOAD( "321b09.30g", 0x400000, 1*1024*1024, CRC(94add237) SHA1(9a6d0a9727e7fa02d91ece220b145074a6741a95) ) |
| 2026 | 2026 | |
| 2027 | 2027 | /* sound data */ |
| r7356 | r7357 | |
| 2030 | 2030 | ROM_LOAD( "321b18.7g", 0x200000, 2*1024*1024, CRC(2c561ad0) SHA1(6265054072ba1c2837dd96e0259b20bc50457160) ) |
| 2031 | 2031 | ROM_END |
| 2032 | 2032 | |
| 2033 | /* Fantastic Journey version AAA (Asia) */ | |
| 2034 | ROM_START( fantjoura ) | |
| 2035 | /* main program */ | |
| 2036 | ROM_REGION( 0x800000, "maincpu", 0 ) | |
| 2037 | GX_BIOS | |
| 2038 | ROM_LOAD32_WORD_SWAP( "321aaa02.21b", 0x200002, 512*1024, CRC(5efb62f8) SHA1(637ea9809bd49c865f6d565d2707ddb110f9bea2) ) | |
| 2039 | ROM_LOAD32_WORD_SWAP( "321aaa04.27b", 0x200000, 512*1024, CRC(507becce) SHA1(feaced6562569679ea3813546cbcb8fa40709dd5) ) | |
| 2040 | ||
| 2041 | /* sound program */ | |
| 2042 | ROM_REGION( 0x40000, "soundcpu", 0 ) | |
| 2043 | ROM_LOAD16_BYTE("321b06.9c", 0x000000, 128*1024, CRC(da810554) SHA1(f253e1aa137eecf283d8b083ef2b3b049e8366f4) ) | |
| 2044 | ROM_LOAD16_BYTE("321b07.7c", 0x000001, 128*1024, CRC(c47634c0) SHA1(20e4105df5bbc33edd01894e78f74ed5f173576e) ) | |
| 2045 | ||
| 2046 | /* tiles */ | |
| 2047 | ROM_REGION( 0x600000, "gfx1", ROMREGION_ERASE00 ) | |
| 2048 | TILE_WORD_ROM_LOAD( "321b14.17h", 0x000000, 2*1024*1024, CRC(437d0057) SHA1(30c449200e0510dc664289b527bade6e10dbe57a) ) | |
| 2049 | TILE_BYTE_ROM_LOAD( "321b12.13g", 0x000004, 512*1024, CRC(5f9edfa0) SHA1(36d54c5fe498a4d0fa64757cef11c56c67518258) ) | |
| 2050 | ||
| 2051 | /* sprites */ | |
| 2052 | ROM_REGION( 0x500000, "gfx2", ROMREGION_ERASE00 ) | |
| 2053 | ROM_LOAD32_WORD( "321b11.25g", 0x000000, 2*1024*1024, CRC(c6e2e74d) SHA1(3875a50923e46e2986dbe2573453af5c7fa726f7) ) | |
| 2054 | ROM_LOAD32_WORD( "321b10.28g", 0x000002, 2*1024*1024, CRC(ea9f8c48) SHA1(b5e880015887308a5f1c1c623011d9b0903e848f) ) | |
| 2055 | ROM_LOAD( "321b09.30g", 0x400000, 1*1024*1024, CRC(94add237) SHA1(9a6d0a9727e7fa02d91ece220b145074a6741a95) ) | |
| 2056 | ||
| 2057 | /* sound data */ | |
| 2058 | ROM_REGION( 0x400000, "shared", 0 ) | |
| 2059 | ROM_LOAD( "321b17.9g", 0x000000, 2*1024*1024, CRC(b3e8d5d8) SHA1(6644a414e7f0e69ded9aa1bf892566002cebae26) ) | |
| 2060 | ROM_LOAD( "321b18.7g", 0x200000, 2*1024*1024, CRC(2c561ad0) SHA1(6265054072ba1c2837dd96e0259b20bc50457160) ) | |
| 2061 | ROM_END | |
| 2062 | ||
| 2033 | 2063 | /* Salamander 2 version JAA (Japan) */ |
| 2034 | 2064 | ROM_START( salmndr2 ) |
| 2035 | 2065 | /* main program */ |
| r7356 | r7357 | |
| 3064 | 3094 | /* main program */ |
| 3065 | 3095 | ROM_REGION( 0x800000, "maincpu", 0 ) |
| 3066 | 3096 | GX_BIOS |
| 3067 | ROM_LOAD32_WORD_SWAP( "627aaa03.29m", 0x200000, 0x080000, CRC(50e23a50) SHA1(82cf1b051cfb2f94567c5a4199802960798c1152) ) | |
| 3068 | ROM_LOAD32_WORD_SWAP( "627aaa02.31m", 0x200002, 0x080000, CRC(e3d21afe) SHA1(28c213106087da425f85bb7f3398aca98964ea38) ) | |
| 3097 | ROM_LOAD32_WORD_SWAP( "627aaa03.29m", 0x200000, 0x080000, CRC(50e23a50) SHA1(82cf1b051cfb2f94567c5a4199802960798c1152) ) | |
| 3098 | ROM_LOAD32_WORD_SWAP( "627aaa02.31m", 0x200002, 0x080000, CRC(e3d21afe) SHA1(28c213106087da425f85bb7f3398aca98964ea38) ) | |
| 3069 | 3099 | |
| 3070 | 3100 | ROM_LOAD32_WORD_SWAP( "627a05.29r", 0x400000, 1024*1024, CRC(be4e7b3c) SHA1(f44e7b1913aa54f759bd31bb86fdedbb9747b2d5) ) |
| 3071 | 3101 | ROM_LOAD32_WORD_SWAP( "627a04.31r", 0x400002, 1024*1024, CRC(17334e9a) SHA1(82cdba016c29160550c43feee7a4feff6e1184aa) ) |
| r7356 | r7357 | |
| 3708 | 3738 | GAME( 1994, le2, konamigx, le2, le2, konamigx, ROT0, "Konami", "Lethal Enforcers II: Gun Fighters (ver EAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3709 | 3739 | GAME( 1994, le2u, le2, le2, le2, konamigx, ROT0, "Konami", "Lethal Enforcers II: Gun Fighters (ver UAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3710 | 3740 | GAME( 1994, le2j, le2, le2, le2, konamigx, ROT0, "Konami", "Lethal Enforcers II: Gun Fighters (ver JAA)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING) |
| 3711 | GAME( 1994, gokuparo, konamigx, konamigx, gokuparo, konamigx, ROT0, "Konami", "Gokujyou Parodius (ver JAD)", GAME_IMPERFECT_GRAPHICS ) | |
| 3712 | GAME( 1994, fantjour, gokuparo, konamigx, gokuparo, konamigx, ROT0, "Konami", "Fantastic Journey", GAME_IMPERFECT_GRAPHICS ) | |
| 3741 | 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|GAME_UNEMULATED_PROTECTION ) | |
| 3743 | GAME( 1994, gokuparo, fantjour, konamigx, gokuparo, konamigx, ROT0, "Konami", "Gokujyou Parodius (ver JAD)", GAME_IMPERFECT_GRAPHICS ) | |
| 3713 | 3744 | GAME( 1994, puzldama, konamigx, konamigx, puzldama, konamigx, ROT0, "Konami", "Taisen Puzzle-dama (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3714 | 3745 | GAME( 1995, tbyahhoo, konamigx, konamigx, gokuparo, konamigx, ROT0, "Konami", "Twin Bee Yahhoo! (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3715 | 3746 | GAME( 1995, tkmmpzdm, konamigx, konamigx_6bpp, puzldama, konamigx, ROT0, "Konami", "Tokimeki Memorial Taisen Puzzle-dama (ver JAB)", GAME_IMPERFECT_GRAPHICS ) |
| r7356 | r7357 | |
| 3726 | 3757 | GAME( 1997, winspikej,winspike, winspike, konamigx, konamigx, ROT0, "Konami", "Winning Spike (ver JAA)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS ) |
| 3727 | 3758 | |
| 3728 | 3759 | /* Type 3: dual monitor output and 53936 on the ROM board, external palette RAM */ |
| 3729 | GAME( 1994, soccerss, konamigx, gxtype3, type3, konamigx, ROT0, "Konami", "Soccer Superstars (ver EAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3730 | 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 | |
| 3760 | GAME( 1994, soccerss, konamigx, gxtype3, type3, konamigx, ROT0, "Konami", "Soccer Superstars (ver EAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3761 | 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 | |
| 3731 | 3762 | GAME( 1994, soccerssja,soccerss, gxtype3, type3, konamigx, ROT0, "Konami", "Soccer Superstars (ver JAA)", GAME_IMPERFECT_GRAPHICS ) |
| 3732 | GAME( 1994, soccerssa,soccerss, gxtype3, type3, konamigx, ROT0, "Konami", "Soccer Superstars (ver AAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3763 | GAME( 1994, soccerssa, soccerss, gxtype3, type3, konamigx, ROT0, "Konami", "Soccer Superstars (ver AAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3733 | 3764 | |
| 3734 | 3765 | /* Type 4: dual monitor output and 53936 on the ROM board, external palette RAM, DMA protection */ |
| 3735 | 3766 | GAME( 1996, vsnetscr, konamigx, gxtype4_vsn, type3, konamigx, ROT0, "Konami", "Versus Net Soccer (ver EAD)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| r7356 | r7357 | |
| 3737 | 3768 | GAME( 1996, vsnetscru, vsnetscr, gxtype4_vsn, type3, konamigx, ROT0, "Konami", "Versus Net Soccer (ver UAB)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3738 | 3769 | GAME( 1996, vsnetscra, vsnetscr, gxtype4_vsn, type3, konamigx, ROT0, "Konami", "Versus Net Soccer (ver AAA)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3739 | 3770 | GAME( 1996, vsnetscrj, vsnetscr, gxtype4_vsn, type3, konamigx, ROT0, "Konami", "Versus Net Soccer (ver JAB)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) |
| 3740 | GAME( 1996, rungun2, konamigx, gxtype4sd2, type3, konamigx, ROT0, "Konami", "Run and Gun 2 (ver UAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3741 | GAME( 1996, slamdnk2, rungun2, gxtype4sd2, type3, konamigx, ROT0, "Konami", "Slam Dunk 2 (ver JAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3742 | GAME( 1996, rushhero, konamigx, gxtype4, type3, konamigx, ROT0, "Konami", "Rushing Heroes (ver UAB)", GAME_IMPERFECT_GRAPHICS ) | |
| 3771 | GAME( 1996, rungun2, konamigx, gxtype4sd2, type3, konamigx, ROT0, "Konami", "Run and Gun 2 (ver UAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3772 | GAME( 1996, slamdnk2, rungun2, gxtype4sd2, type3, konamigx, ROT0, "Konami", "Slam Dunk 2 (ver JAA)", GAME_IMPERFECT_GRAPHICS ) | |
| 3773 | GAME( 1996, rushhero, konamigx, gxtype4, type3, konamigx, ROT0, "Konami", "Rushing Heroes (ver UAB)", GAME_IMPERFECT_GRAPHICS ) |
| r7356 | r7357 | |
|---|---|---|
| 73 | 73 | #include "sound/2612intf.h" |
| 74 | 74 | #include "sound/upd7759.h" |
| 75 | 75 | |
| 76 | #include "megadriv.h" | |
| 76 | #include "includes/megadriv.h" | |
| 77 | 77 | |
| 78 | 78 | #define XL1_CLOCK 640000 |
| 79 | 79 | #define XL2_CLOCK 53693175 |
| r7356 | r7357 | |
|---|---|---|
| 1482 | 1482 | GAME( 1980, rallys, spectar, rallys, rallys, rallys, ROT0, "Novar", "Rallys (bootleg of Spectar)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1483 | 1483 | GAME( 1980, panzer, spectar, rallys, rallys, rallys, ROT0, "Proel", "Panzer (bootleg of Spectar)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1484 | 1484 | GAME( 1980, phantoma, spectar, rallys, phantoma, phantoma, ROT0, "Jeutel","Phantomas (bootleg of Spectar)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 1485 | GAME( 1980, phantom, spectar, rallys, phantoma, phantoma, ROT0, "Proel","Phantom (bootleg of Spectar)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1485 | GAME( 1980, phantom, spectar, rallys, phantoma, phantoma, ROT0, "Proel", "Phantom (bootleg of Spectar)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1486 | 1486 | |
| 1487 | 1487 | GAME( 1981, mtrap, 0, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 5)", GAME_SUPPORTS_SAVE ) |
| 1488 | 1488 | GAME( 1981, mtrap3, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 3)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 48 | 48 | #include "sound/sn76496.h" |
| 49 | 49 | #include "sound/2612intf.h" |
| 50 | 50 | |
| 51 | #include "megadriv.h" | |
| 51 | #include "includes/megadriv.h" | |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | /* Puckman Pockimon Input Ports */ |
| r7356 | r7357 | |
|---|---|---|
| 777 | 777 | |
| 778 | 778 | /*****************************************************************************/ |
| 779 | 779 | |
| 780 | GAME(2002, gamecstl, 0, | |
| 780 | GAME(2002, gamecstl, 0, gamecstl, gamecstl, gamecstl, ROT0, | |
| 781 | 781 | GAME(2002, gamecst2, gamecstl, gamecstl, gamecstl, gamecstl, ROT0, "Cristaltec", "GameCristal (version 2.613)", GAME_NOT_WORKING | GAME_NO_SOUND) |
| r7356 | r7357 | |
|---|---|---|
| 236 | 236 | AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_pageram_r, cdp1869_pageram_w) |
| 237 | 237 | ADDRESS_MAP_END |
| 238 | 238 | |
| 239 | static ADDRESS_MAP_START( destryea_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 239 | static ADDRESS_MAP_START( destryera_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 240 | 240 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 241 | 241 | AM_RANGE(0x3000, 0x30ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) |
| 242 | 242 | AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_charram_r, cdp1869_charram_w) |
| r7356 | r7357 | |
| 526 | 526 | MDRV_IMPORT_FROM(destryer_video) |
| 527 | 527 | MACHINE_DRIVER_END |
| 528 | 528 | |
| 529 | static MACHINE_DRIVER_START( destryea ) | |
| 529 | static MACHINE_DRIVER_START( destryera ) | |
| 530 | 530 | MDRV_DRIVER_DATA(cidelsa_state) |
| 531 | 531 | |
| 532 | 532 | /* basic system hardware */ |
| 533 | 533 | MDRV_CPU_ADD(CDP1802_TAG, CDP1802, DESTRYER_CHR1) |
| 534 | MDRV_CPU_PROGRAM_MAP(destryea_map) | |
| 534 | MDRV_CPU_PROGRAM_MAP(destryera_map) | |
| 535 | 535 | MDRV_CPU_IO_MAP(destryer_io_map) |
| 536 | 536 | MDRV_CPU_CONFIG(cidelsa_cdp1802_config) |
| 537 | 537 | MDRV_NVRAM_HANDLER(generic_0fill) |
| r7356 | r7357 | |
| 605 | 605 | ROM_END |
| 606 | 606 | |
| 607 | 607 | // this was destroyer2.rom in standalone emu.. |
| 608 | ROM_START( destryea ) | |
| 608 | ROM_START( destryera ) | |
| 609 | 609 | ROM_REGION( 0x10000, CDP1802_TAG, 0 ) |
| 610 | ROM_LOAD( "destryea_1", 0x0000, 0x0800, CRC(421428e9) SHA1(0ac3a1e7f61125a1cd82145fa28cbc4b93505dc9) ) | |
| 611 | ROM_LOAD( "destryea_2", 0x0800, 0x0800, CRC(55dc8145) SHA1(a0066d3f3ac0ae56273485b74af90eeffea5e64e) ) | |
| 612 | ROM_LOAD( "destryea_3", 0x1000, 0x0800, CRC(5557bdf8) SHA1(37a9cbc5d25051d3bed7535c58aac937cd7c64e1) ) | |
| 613 | ROM_LOAD( "destryea_4", 0x1800, 0x0800, CRC(608b779c) SHA1(8fd6cc376c507680777553090329cc66be42a934) ) | |
| 610 | ROM_LOAD( "destryera_1", 0x0000, 0x0800, CRC(421428e9) SHA1(0ac3a1e7f61125a1cd82145fa28cbc4b93505dc9) ) | |
| 611 | ROM_LOAD( "destryera_2", 0x0800, 0x0800, CRC(55dc8145) SHA1(a0066d3f3ac0ae56273485b74af90eeffea5e64e) ) | |
| 612 | ROM_LOAD( "destryera_3", 0x1000, 0x0800, CRC(5557bdf8) SHA1(37a9cbc5d25051d3bed7535c58aac937cd7c64e1) ) | |
| 613 | ROM_LOAD( "destryera_4", 0x1800, 0x0800, CRC(608b779c) SHA1(8fd6cc376c507680777553090329cc66be42a934) ) | |
| 614 | 614 | ROM_END |
| 615 | 615 | |
| 616 | 616 | ROM_START( altair ) |
| r7356 | r7357 | |
| 640 | 640 | |
| 641 | 641 | /* Game Drivers */ |
| 642 | 642 | |
| 643 | GAME( 1980, destryer, 0, destryer, destryer, 0, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 644 | GAME( 1980, destryea, destryer, destryea, destryer, 0, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 645 | GAME( 1981, altair, 0, altair, altair, 0, ROT90, "Cidelsa", "Altair", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 646 | GAME( 1981, draco, 0, draco, draco, 0, ROT90, "Cidelsa", "Draco", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE ) | |
| 643 | GAME( 1980, destryer, 0, destryer, destryer, 0, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 644 | GAME( 1980, destryera,destryer, destryera,destryer, 0, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 645 | GAME( 1981, altair, 0, altair, altair, 0, ROT90, "Cidelsa", "Altair", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 646 | GAME( 1981, draco, 0, draco, draco, 0, ROT90, "Cidelsa", "Draco", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 871 | 871 | #include "cpu/z80/z80.h" |
| 872 | 872 | #include "cpu/m68000/m68000.h" |
| 873 | 873 | #include "cpu/mcs51/mcs51.h" |
| 874 | #include "includes/s | |
| 874 | #include "includes/s | |
| 875 | 875 | #include "machine/segaic16.h" |
| 876 | 876 | #include "machine/fd1089.h" |
| 877 | 877 | #include "machine/fd1094.h" |
| r7356 | r7357 | |
| 879 | 879 | #include "sound/2151intf.h" |
| 880 | 880 | #include "sound/2413intf.h" |
| 881 | 881 | #include "sound/upd7759.h" |
| 882 | #include "video/segaic16.h" | |
| 882 | 883 | |
| 883 | 884 | |
| 884 | 885 | /************************************* |
| r7356 | r7357 | |
| 891 | 892 | #define MASTER_CLOCK_8MHz XTAL_8MHz |
| 892 | 893 | #define MASTER_CLOCK_25MHz XTAL_25_1748MHz |
| 893 | 894 | |
| 894 | #define ROM_BOARD_171_5358_SMALL (0) /* 171-5358 with smaller ROMs */ | |
| 895 | #define ROM_BOARD_171_5358 (1) /* 171-5358 */ | |
| 896 | #define ROM_BOARD_171_5521 (2) /* 171-5521 */ | |
| 897 | #define ROM_BOARD_171_5704 (2) /* 171-5704 - don't know any diff between this and 171-5521 */ | |
| 898 | #define ROM_BOARD_ATOMICP (3) /* (custom Korean) */ | |
| 899 | #define ROM_BOARD_171_5797 (4) /* 171-5797 */ | |
| 895 | #define ROM_BOARD_171_5358_SMALL (0) /* 171-5358 with smaller ROMs */ | |
| 896 | #define ROM_BOARD_171_5358 (1) /* 171-5358 */ | |
| 897 | #define ROM_BOARD_171_5521 (2) /* 171-5521 */ | |
| 898 | #define ROM_BOARD_171_5704 (2) /* 171-5704 - don't know any diff between this and 171-5521 */ | |
| 899 | #define ROM_BOARD_ATOMICP (3) /* (custom Korean) */ | |
| 900 | #define ROM_BOARD_171_5797 (4) /* 171-5797 */ | |
| 900 | 901 | |
| 901 | 902 | |
| 902 | ||
| 903 | 903 | /************************************* |
| 904 | 904 | * |
| 905 | 905 | * Statics |
| r7356 | r7357 | |
| 908 | 908 | |
| 909 | 909 | static UINT16 *workram; |
| 910 | 910 | |
| 911 | static UINT8 rom_board; | |
| 912 | static UINT8 atomicp_sound_divisor; | |
| 913 | static UINT8 atomicp_sound_count; | |
| 914 | 911 | |
| 915 | static UINT8 has_sound_cpu; | |
| 916 | ||
| 917 | static read16_space_func custom_io_r; | |
| 918 | static write16_space_func custom_io_w; | |
| 919 | ||
| 920 | static UINT8 disable_screen_blanking; | |
| 921 | static UINT8 mj_input_num; | |
| 922 | static UINT8 hwc_input_value; | |
| 923 | ||
| 924 | static void (*i8751_vblank_hook)(running_machine *machine); | |
| 925 | static const UINT8 *i8751_initial_config; | |
| 926 | ||
| 927 | ||
| 928 | ||
| 929 | 912 | /************************************* |
| 930 | 913 | * |
| 931 | 914 | * Prototypes |
| r7356 | r7357 | |
| 956 | 939 | { 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" }, |
| 957 | 940 | { 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" }, |
| 958 | 941 | { 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" }, |
| 959 | { 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, | |
| 942 | { 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, | |
| 960 | 943 | { 0x29/2, 0x00000, 0x20000, 0xfe0000, 0x20000, NULL, "bank15", NULL, NULL, NULL, "ROM 2" }, |
| 961 | 944 | { 0x25/2, 0x00000, 0x20000, 0xfe0000, 0x10000, NULL, "bank16", NULL, NULL, NULL, "ROM 1" }, |
| 962 | 945 | { 0x21/2, 0x00000, 0x20000, 0xfe0000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" }, |
| r7356 | r7357 | |
| 970 | 953 | { 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" }, |
| 971 | 954 | { 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" }, |
| 972 | 955 | { 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" }, |
| 973 | { 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, | |
| 956 | { 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, | |
| 974 | 957 | { 0x29/2, 0x00000, 0x20000, 0xfe0000, 0x40000, NULL, "bank15", NULL, NULL, NULL, "ROM 2" }, |
| 975 | 958 | { 0x25/2, 0x00000, 0x20000, 0xfe0000, 0x20000, NULL, "bank16", NULL, NULL, NULL, "ROM 1" }, |
| 976 | 959 | { 0x21/2, 0x00000, 0x20000, 0xfe0000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" }, |
| r7356 | r7357 | |
| 984 | 967 | { 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" }, |
| 985 | 968 | { 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" }, |
| 986 | 969 | { 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" }, |
| 987 | { 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, | |
| 970 | { 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, | |
| 988 | 971 | { 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, NULL, rom_5704_bank_w, NULL, NULL, "tile bank" }, |
| 989 | 972 | { 0x25/2, 0x00000, 0x80000, 0xfc0000, 0x80000, NULL, "bank16", NULL, NULL, NULL, "ROM 1" }, |
| 990 | 973 | { 0x21/2, 0x00000, 0x80000, 0xfc0000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" }, |
| r7356 | r7357 | |
| 998 | 981 | { 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" }, |
| 999 | 982 | { 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" }, |
| 1000 | 983 | { 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" }, |
| 1001 | { 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, | |
| 984 | { 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, | |
| 1002 | 985 | { 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, NULL, rom_5704_bank_w, NULL, NULL, "tile bank" }, |
| 1003 | 986 | { 0x25/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, NULL, atomicp_sound_w, NULL, NULL, "sound" }, |
| 1004 | 987 | { 0x21/2, 0x00000, 0x80000, 0xfc0000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" }, |
| r7356 | r7357 | |
| 1012 | 995 | { 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" }, |
| 1013 | 996 | { 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" }, |
| 1014 | 997 | { 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" }, |
| 1015 | { 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, | |
| 998 | { 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, | |
| 1016 | 999 | { 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, unknown_rgn2_r, NULL, unknown_rgn2_w, NULL, NULL, "???" }, |
| 1017 | 1000 | { 0x25/2, 0x00000, 0x04000, 0xffc000, ~0, rom_5797_bank_math_r, NULL, rom_5797_bank_math_w, NULL, NULL, "tile bank/math" }, |
| 1018 | 1001 | { 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" }, |
| r7356 | r7357 | |
| 1038 | 1021 | |
| 1039 | 1022 | static void sound_w(running_machine *machine, UINT8 data) |
| 1040 | 1023 | { |
| 1041 | if (has_sound_cpu) | |
| 1024 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1025 | ||
| 1026 | if (state->soundcpu != NULL) | |
| 1042 | 1027 | { |
| 1043 | const address_space *space = cpu | |
| 1028 | const address_space *space = cpu | |
| 1044 | 1029 | soundlatch_w(space, 0, data & 0xff); |
| 1045 | cpu | |
| 1030 | cpu | |
| 1046 | 1031 | } |
| 1047 | 1032 | } |
| 1048 | 1033 | |
| 1049 | 1034 | |
| 1050 | 1035 | static void system16b_generic_init(running_machine *machine, int _rom_board) |
| 1051 | 1036 | { |
| 1037 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1038 | ||
| 1052 | 1039 | /* set the ROM board */ |
| 1053 | rom_board = _rom_board; | |
| 1040 | state->rom_board = _rom_board; | |
| 1054 | 1041 | |
| 1055 | 1042 | /* allocate memory for regions not autmatically assigned */ |
| 1056 | segaic16_spriteram_0 = auto_alloc_array(machine, UINT16, 0x00800/2); | |
| 1057 | segaic16_paletteram = auto_alloc_array(machine, UINT16, 0x01000/2); | |
| 1058 | segaic16_tileram_0 = auto_alloc_array(machine, UINT16, 0x10000/2); | |
| 1059 | segaic16_textram_0 = auto_alloc_array(machine, UINT16, 0x01000/2); | |
| 1060 | workram = auto_alloc_array(machine, UINT16, 0x04000/2); | |
| 1043 | segaic16_spriteram_0 = auto_alloc_array(machine, UINT16, 0x00800 / 2); | |
| 1044 | segaic16_paletteram = auto_alloc_array(machine, UINT16, 0x01000 / 2); | |
| 1045 | segaic16_tileram_0 = auto_alloc_array(machine, UINT16, 0x10000 / 2); | |
| 1046 | segaic16_textram_0 = auto_alloc_array(machine, UINT16, 0x01000 / 2); | |
| 1047 | workram = auto_alloc_array(machine, UINT16, 0x04000 / 2); | |
| 1061 | 1048 | |
| 1062 | 1049 | /* init the memory mapper */ |
| 1063 | segaic16_memory_mapper_init(devtag_get_device(machine, "maincpu"), region_info_list[rom_board], sound_w, NULL); | |
| 1050 | segaic16_memory_mapper_init(devtag_get_device(machine, "maincpu"), region_info_list[state->rom_board], sound_w, NULL); | |
| 1064 | 1051 | |
| 1065 | 1052 | /* init the FD1094 */ |
| 1066 | 1053 | fd1094_driver_init(machine, "maincpu", segaic16_memory_mapper_set_decrypted); |
| 1067 | 1054 | |
| 1068 | 1055 | /* reset the custom handlers and other pointers */ |
| 1069 | custom_io_r = NULL; | |
| 1070 | custom_io_w = NULL; | |
| 1071 | i8751_vblank_hook = NULL; | |
| 1072 | i8751_initial_config = NULL; | |
| 1073 | disable_screen_blanking = 0; | |
| 1056 | state->custom_io_r = NULL; | |
| 1057 | state->custom_io_w = NULL; | |
| 1058 | state->i8751_vblank_hook = NULL; | |
| 1059 | state->i8751_initial_config = NULL; | |
| 1060 | state->disable_screen_blanking = 0; | |
| 1074 | 1061 | |
| 1075 | /* see if we have a sound CPU and a UPD7759 chip */ | |
| 1076 | has_sound_cpu = (devtag_get_device(machine, "soundcpu") != NULL); | |
| 1062 | state->maincpu = devtag_get_device(machine, "maincpu"); | |
| 1063 | state->soundcpu = devtag_get_device(machine, "soundcpu"); | |
| 1064 | state->mcu = devtag_get_device(machine, "mcu"); | |
| 1065 | state->ymsnd = devtag_get_device(machine, "ymsnd"); | |
| 1066 | state->_315_5248_1 = devtag_get_device(machine, "315_5248"); | |
| 1067 | state->_315_5250_1 = devtag_get_device(machine, "315_5250_1"); | |
| 1068 | state->_315_5250_2 = devtag_get_device(machine, "315_5250_2"); | |
| 1069 | ||
| 1070 | state_save_register_global(machine, state->disable_screen_blanking); | |
| 1071 | state_save_register_global(machine, state->mj_input_num); | |
| 1072 | state_save_register_global(machine, state->mj_last_val); | |
| 1073 | state_save_register_global(machine, state->hwc_input_value); | |
| 1074 | state_save_register_global(machine, state->atomicp_sound_divisor); | |
| 1075 | state_save_register_global(machine, state->atomicp_sound_count); | |
| 1076 | state_save_register_global_pointer(machine, segaic16_spriteram_0, 0x00800/2); | |
| 1077 | state_save_register_global_pointer(machine, segaic16_paletteram, 0x01000/2); | |
| 1078 | state_save_register_global_pointer(machine, segaic16_tileram_0, 0x10000/2); | |
| 1079 | state_save_register_global_pointer(machine, segaic16_textram_0, 0x01000/2); | |
| 1080 | state_save_register_global_pointer(machine, workram, 0x04000/2); | |
| 1077 | 1081 | } |
| 1078 | 1082 | |
| 1079 | 1083 | |
| 1080 | 1084 | static TIMER_CALLBACK( suspend_i8751 ) |
| 1081 | 1085 | { |
| 1082 | cpu_suspend(devtag_get_device(machine, "mcu"), SUSPEND_REASON_DISABLE, 1); | |
| 1086 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1087 | cpu_suspend(state->mcu, SUSPEND_REASON_DISABLE, 1); | |
| 1083 | 1088 | } |
| 1084 | 1089 | |
| 1085 | 1090 | |
| r7356 | r7357 | |
| 1092 | 1097 | |
| 1093 | 1098 | static MACHINE_RESET( system16b ) |
| 1094 | 1099 | { |
| 1100 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1095 | 1101 | static const UINT8 default_banklist[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; |
| 1096 | 1102 | static const UINT8 alternate_banklist[] = { 0,255,255,255, 255,255,255,3, 255,255,255,2, 255,1,0,255 }; |
| 1097 | 1103 | int i; |
| 1098 | 1104 | |
| 1099 | 1105 | segaic16_memory_mapper_reset(machine); |
| 1100 | if (i8751_initial_config != NULL) | |
| 1101 | segaic16_memory_mapper_config(machine, i8751_initial_config); | |
| 1106 | if (state->i8751_initial_config != NULL) | |
| 1107 | segaic16_memory_mapper_config(machine, state->i8751_initial_config); | |
| 1102 | 1108 | segaic16_tilemap_reset(machine, 0); |
| 1103 | 1109 | |
| 1104 | 1110 | fd1094_machine_init(devtag_get_device(machine, "maincpu")); |
| 1105 | 1111 | |
| 1106 | 1112 | /* if we have a fake i8751 handler, disable the actual 8751 */ |
| 1107 | if (i8751_vblank_hook != NULL) | |
| 1113 | if (state->i8751_vblank_hook != NULL) | |
| 1108 | 1114 | timer_call_after_resynch(machine, NULL, 0, suspend_i8751); |
| 1109 | 1115 | |
| 1110 | 1116 | /* configure sprite banks */ |
| 1111 | 1117 | for (i = 0; i < 16; i++) |
| 1112 | segaic16_sprites_set_bank(machine, 0, i, (rom_board == ROM_BOARD_171_5358 || rom_board == ROM_BOARD_171_5358_SMALL) ? alternate_banklist[i] : default_banklist[i]); | |
| 1118 | segaic16_sprites_set_bank(machine, 0, i, (state->rom_board == ROM_BOARD_171_5358 || state->rom_board == ROM_BOARD_171_5358_SMALL) ? alternate_banklist[i] : default_banklist[i]); | |
| 1113 | 1119 | } |
| 1114 | 1120 | |
| 1115 | 1121 | |
| 1116 | 1122 | static TIMER_DEVICE_CALLBACK( atomicp_sound_irq ) |
| 1117 | 1123 | { |
| 1118 | if (++atomicp_sound_count >= atomicp_sound_divisor) | |
| 1124 | segas1x_state *state = (segas1x_state *)timer->machine->driver_data; | |
| 1125 | ||
| 1126 | if (++state->atomicp_sound_count >= state->atomicp_sound_divisor) | |
| 1119 | 1127 | { |
| 1120 | cputag_set_input_line(timer->machine, "maincpu", 2, HOLD_LINE); | |
| 1121 | atomicp_sound_count = 0; | |
| 1128 | cpu_set_input_line(state->maincpu, 2, HOLD_LINE); | |
| 1129 | state->atomicp_sound_count = 0; | |
| 1122 | 1130 | } |
| 1123 | 1131 | } |
| 1124 | 1132 | |
| r7356 | r7357 | |
| 1145 | 1153 | return input_port_read(space->machine, (offset & 1) ? "DSW1" : "DSW2"); |
| 1146 | 1154 | } |
| 1147 | 1155 | logerror("%06X:standard_io_r - unknown read access to address %04X\n", cpu_get_pc(space->cpu), offset * 2); |
| 1148 | return segaic16_open_bus_r(space,0,mem_mask); | |
| 1156 | return segaic16_open_bus_r(space, 0, mem_mask); | |
| 1149 | 1157 | } |
| 1150 | 1158 | |
| 1151 | 1159 | |
| 1152 | 1160 | static WRITE16_HANDLER( standard_io_w ) |
| 1153 | 1161 | { |
| 1162 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1163 | ||
| 1154 | 1164 | offset &= 0x1fff; |
| 1155 | 1165 | switch (offset & (0x3000/2)) |
| 1156 | 1166 | { |
| r7356 | r7357 | |
| 1167 | 1177 | */ |
| 1168 | 1178 | segaic16_tilemap_set_flip(space->machine, 0, data & 0x40); |
| 1169 | 1179 | segaic16_sprites_set_flip(space->machine, 0, data & 0x40); |
| 1170 | if (!disable_screen_blanking) | |
| 1180 | if (!state->disable_screen_blanking) | |
| 1171 | 1181 | segaic16_set_display_enable(space->machine, data & 0x20); |
| 1172 | 1182 | set_led_status(space->machine, 1, data & 0x08); |
| 1173 | 1183 | set_led_status(space->machine, 0, data & 0x04); |
| r7356 | r7357 | |
| 1181 | 1191 | |
| 1182 | 1192 | static READ16_HANDLER( misc_io_r ) |
| 1183 | 1193 | { |
| 1184 | if (custom_io_r) | |
| 1185 | return (*custom_io_r)(space, offset, mem_mask); | |
| 1194 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1195 | ||
| 1196 | if (state->custom_io_r) | |
| 1197 | return (*state->custom_io_r)(space, offset, mem_mask); | |
| 1186 | 1198 | else |
| 1187 | 1199 | return standard_io_r(space, offset, mem_mask); |
| 1188 | 1200 | } |
| r7356 | r7357 | |
| 1190 | 1202 | |
| 1191 | 1203 | static WRITE16_HANDLER( misc_io_w ) |
| 1192 | 1204 | { |
| 1193 | if (custom_io_w) | |
| 1194 | (*custom_io_w)(space, offset, data, mem_mask); | |
| 1205 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1206 | ||
| 1207 | if (state->custom_io_w) | |
| 1208 | (*state->custom_io_w)(space, offset, data, mem_mask); | |
| 1195 | 1209 | else |
| 1196 | 1210 | standard_io_w(space, offset, data, mem_mask); |
| 1197 | 1211 | } |
| r7356 | r7357 | |
| 1213 | 1227 | |
| 1214 | 1228 | static READ16_HANDLER( rom_5797_bank_math_r ) |
| 1215 | 1229 | { |
| 1230 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1231 | ||
| 1216 | 1232 | offset &= 0x1fff; |
| 1217 | 1233 | switch (offset & (0x3000/2)) |
| 1218 | 1234 | { |
| 1219 | 1235 | case 0x0000/2: |
| 1220 | 1236 | /* multiply registers */ |
| 1221 | return segaic16_multiply_ | |
| 1237 | return segaic16_multiply_ | |
| 1222 | 1238 | |
| 1223 | 1239 | case 0x1000/2: |
| 1224 | 1240 | /* compare registers */ |
| 1225 | return segaic16_compare_timer_ | |
| 1241 | return segaic16_compare_timer_ | |
| 1226 | 1242 | } |
| 1227 | return segaic16_open_bus_r(space,0,mem_mask); | |
| 1243 | return segaic16_open_bus_r(space, 0, mem_mask); | |
| 1228 | 1244 | } |
| 1229 | 1245 | |
| 1230 | 1246 | |
| 1231 | 1247 | static WRITE16_HANDLER( rom_5797_bank_math_w ) |
| 1232 | 1248 | { |
| 1249 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1250 | ||
| 1233 | 1251 | offset &= 0x1fff; |
| 1234 | 1252 | switch (offset & (0x3000/2)) |
| 1235 | 1253 | { |
| 1236 | 1254 | case 0x0000/2: |
| 1237 | 1255 | /* multiply registers */ |
| 1238 | segaic16_multiply_ | |
| 1256 | segaic16_multiply_ | |
| 1239 | 1257 | break; |
| 1240 | 1258 | |
| 1241 | 1259 | case 0x1000/2: |
| 1242 | 1260 | /* compare registers */ |
| 1243 | segaic16_compare_timer_ | |
| 1261 | segaic16_compare_timer_ | |
| 1244 | 1262 | break; |
| 1245 | 1263 | |
| 1246 | 1264 | case 0x2000/2: |
| r7356 | r7357 | |
| 1253 | 1271 | |
| 1254 | 1272 | static READ16_HANDLER( unknown_rgn2_r ) |
| 1255 | 1273 | { |
| 1274 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1275 | ||
| 1256 | 1276 | logerror("Region 2: read from %04X\n", offset * 2); |
| 1257 | return segaic16_compare_timer_ | |
| 1277 | return segaic16_compare_timer_ | |
| 1258 | 1278 | } |
| 1259 | 1279 | |
| 1260 | 1280 | |
| 1261 | 1281 | static WRITE16_HANDLER( unknown_rgn2_w ) |
| 1262 | 1282 | { |
| 1283 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1284 | ||
| 1263 | 1285 | logerror("Region 2: write to %04X = %04X & %04X\n", offset * 2, data, mem_mask); |
| 1264 | segaic16_compare_timer_ | |
| 1286 | segaic16_compare_timer_ | |
| 1265 | 1287 | } |
| 1266 | 1288 | |
| 1267 | 1289 | |
| r7356 | r7357 | |
| 1274 | 1296 | |
| 1275 | 1297 | static WRITE8_DEVICE_HANDLER( upd7759_control_w ) |
| 1276 | 1298 | { |
| 1299 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 1277 | 1300 | int size = memory_region_length(device->machine, "soundcpu") - 0x10000; |
| 1278 | 1301 | if (size > 0) |
| 1279 | 1302 | { |
| r7356 | r7357 | |
| 1285 | 1308 | upd7759_reset_w(device, data & 0x40); |
| 1286 | 1309 | |
| 1287 | 1310 | /* banking depends on the ROM board */ |
| 1288 | switch (rom_board) | |
| 1311 | switch (state->rom_board) | |
| 1289 | 1312 | { |
| 1290 | 1313 | case ROM_BOARD_171_5358: |
| 1291 | 1314 | case ROM_BOARD_171_5358_SMALL: |
| r7356 | r7357 | |
| 1344 | 1367 | |
| 1345 | 1368 | static void upd7759_generate_nmi(running_device *device, int state) |
| 1346 | 1369 | { |
| 1370 | segas1x_state *driver = (segas1x_state *)device->machine->driver_data; | |
| 1371 | ||
| 1347 | 1372 | if (state) |
| 1348 | cpu | |
| 1373 | cpu | |
| 1349 | 1374 | } |
| 1350 | 1375 | |
| 1351 | 1376 | |
| 1352 | 1377 | #if 0 |
| 1353 | 1378 | static WRITE8_HANDLER( mcu_data_w ) |
| 1354 | 1379 | { |
| 1355 | mcu_data = data; | |
| 1356 | generic_pulse_irq_line(devtag_get_device(space->machine, "mcu"), 1); | |
| 1380 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1381 | state->mcu_data = data; | |
| 1382 | generic_pulse_irq_line(state->mcu, 1); | |
| 1357 | 1383 | } |
| 1358 | 1384 | #endif |
| 1359 | 1385 | |
| r7356 | r7357 | |
| 1366 | 1392 | |
| 1367 | 1393 | static INTERRUPT_GEN( i8751_main_cpu_vblank ) |
| 1368 | 1394 | { |
| 1395 | segas1x_state *state = (segas1x_state *)device->machine->driver_data; | |
| 1396 | ||
| 1369 | 1397 | /* if we have a fake 8751 handler, call it on VBLANK */ |
| 1370 | if (i8751_vblank_hook != NULL) | |
| 1371 | (*i8751_vblank_hook)(device->machine); | |
| 1398 | if (state->i8751_vblank_hook != NULL) | |
| 1399 | (*state->i8751_vblank_hook)(device->machine); | |
| 1372 | 1400 | } |
| 1373 | 1401 | |
| 1374 | 1402 | |
| r7356 | r7357 | |
| 1381 | 1409 | |
| 1382 | 1410 | static void altbeast_common_i8751_sim(running_machine *machine, offs_t soundoffs, offs_t inputoffs) |
| 1383 | 1411 | { |
| 1384 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 1412 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1413 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 1385 | 1414 | UINT16 temp; |
| 1386 | 1415 | |
| 1387 | 1416 | /* signal a VBLANK to the main CPU */ |
| 1388 | cpu | |
| 1417 | cpu | |
| 1389 | 1418 | |
| 1390 | 1419 | /* set tile banks */ |
| 1391 | 1420 | rom_5704_bank_w(space, 1, workram[0x3094/2] & 0x00ff, 0x00ff); |
| r7356 | r7357 | |
| 1420 | 1449 | |
| 1421 | 1450 | static void ddux_i8751_sim(running_machine *machine) |
| 1422 | 1451 | { |
| 1423 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 1452 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1453 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 1424 | 1454 | UINT16 temp; |
| 1425 | 1455 | |
| 1426 | 1456 | /* signal a VBLANK to the main CPU */ |
| 1427 | cpu | |
| 1457 | cpu | |
| 1428 | 1458 | |
| 1429 | 1459 | /* process any new sound data */ |
| 1430 | 1460 | temp = workram[0x0bd0/2]; |
| r7356 | r7357 | |
| 1438 | 1468 | |
| 1439 | 1469 | static void goldnaxe_i8751_init(running_machine *machine) |
| 1440 | 1470 | { |
| 1471 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1441 | 1472 | static const UINT8 memory_control_5704[0x10] = |
| 1442 | 1473 | { 0x02,0x00, 0x02,0x08, 0x00,0x1f, 0x00,0xff, 0x00,0x20, 0x01,0x10, 0x00,0x14, 0x00,0xc4 }; |
| 1443 | 1474 | static const UINT8 memory_control_5797[0x10] = |
| 1444 | 1475 | { 0x02,0x00, 0x00,0x1f, 0x00,0x1e, 0x00,0xff, 0x00,0x20, 0x01,0x10, 0x00,0x14, 0x00,0xc4 }; |
| 1445 | 1476 | |
| 1446 | switch (rom_board) | |
| 1477 | switch (state->rom_board) | |
| 1447 | 1478 | { |
| 1448 | 1479 | case ROM_BOARD_171_5704: |
| 1449 | i8751_initial_config = memory_control_5704; | |
| 1480 | state->i8751_initial_config = memory_control_5704; | |
| 1450 | 1481 | break; |
| 1451 | 1482 | case ROM_BOARD_171_5797: |
| 1452 | i8751_initial_config = memory_control_5797; | |
| 1483 | state->i8751_initial_config = memory_control_5797; | |
| 1453 | 1484 | break; |
| 1454 | 1485 | } |
| 1455 | 1486 | } |
| 1456 | 1487 | |
| 1457 | 1488 | static void goldnaxe_i8751_sim(running_machine *machine) |
| 1458 | 1489 | { |
| 1459 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 1490 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1491 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 1460 | 1492 | UINT16 temp; |
| 1461 | 1493 | |
| 1462 | 1494 | /* signal a VBLANK to the main CPU */ |
| 1463 | cpu | |
| 1495 | cpu | |
| 1464 | 1496 | |
| 1465 | 1497 | /* they periodically clear the data at 2cd8,2cda,2cdc,2cde and expect the MCU to fill it in */ |
| 1466 | 1498 | if (workram[0x2cd8/2] == 0 && workram[0x2cda/2] == 0 && workram[0x2cdc/2] == 0 && workram[0x2cde/2] == 0) |
| r7356 | r7357 | |
| 1487 | 1519 | |
| 1488 | 1520 | static void tturf_i8751_sim(running_machine *machine) |
| 1489 | 1521 | { |
| 1490 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 1522 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1523 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 1491 | 1524 | UINT16 temp; |
| 1492 | 1525 | |
| 1493 | 1526 | /* signal a VBLANK to the main CPU */ |
| 1494 | cpu | |
| 1527 | cpu | |
| 1495 | 1528 | |
| 1496 | 1529 | /* process any new sound data */ |
| 1497 | 1530 | temp = workram[0x01d0/2]; |
| r7356 | r7357 | |
| 1510 | 1543 | |
| 1511 | 1544 | static void wb3_i8751_sim(running_machine *machine) |
| 1512 | 1545 | { |
| 1513 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 1546 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1547 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 1514 | 1548 | UINT16 temp; |
| 1515 | 1549 | |
| 1516 | 1550 | /* signal a VBLANK to the main CPU */ |
| 1517 | cpu | |
| 1551 | cpu | |
| 1518 | 1552 | |
| 1519 | 1553 | /* process any new sound data */ |
| 1520 | 1554 | temp = workram[0x0008/2]; |
| r7356 | r7357 | |
| 1528 | 1562 | |
| 1529 | 1563 | static void wrestwar_i8751_sim(running_machine *machine) |
| 1530 | 1564 | { |
| 1531 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 1565 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1566 | const address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); | |
| 1532 | 1567 | UINT16 temp; |
| 1533 | 1568 | |
| 1534 | 1569 | /* signal a VBLANK to the main CPU */ |
| 1535 | cpu | |
| 1570 | cpu | |
| 1536 | 1571 | |
| 1537 | 1572 | /* process any new sound data */ |
| 1538 | 1573 | temp = workram[0x208e/2]; |
| r7356 | r7357 | |
| 1556 | 1591 | |
| 1557 | 1592 | static MACHINE_START( atomicp ) |
| 1558 | 1593 | { |
| 1559 | state_save_register_global(machine, atomicp_sound_count); | |
| 1594 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 1595 | state_save_register_global(machine, state->atomicp_sound_count); | |
| 1560 | 1596 | } |
| 1561 | 1597 | |
| 1562 | 1598 | |
| 1563 | 1599 | static WRITE16_HANDLER( atomicp_sound_w ) |
| 1564 | 1600 | { |
| 1565 | ym2413_w(devtag_get_device(space->machine, "ymsnd"), offset, data >> 8); | |
| 1601 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1602 | ym2413_w(state->ymsnd, offset, data >> 8); | |
| 1566 | 1603 | } |
| 1567 | 1604 | |
| 1568 | 1605 | |
| r7356 | r7357 | |
| 1604 | 1641 | |
| 1605 | 1642 | static READ16_HANDLER( hwchamp_custom_io_r ) |
| 1606 | 1643 | { |
| 1644 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1607 | 1645 | UINT16 result; |
| 1608 | 1646 | |
| 1609 | 1647 | switch (offset & (0x3000/2)) |
| r7356 | r7357 | |
| 1612 | 1650 | switch (offset & 0x30/2) |
| 1613 | 1651 | { |
| 1614 | 1652 | case 0x20/2: |
| 1615 | result = (hwc_input_value & 0x80) >> 7; | |
| 1616 | hwc_input_value <<= 1; | |
| 1653 | result = (state->hwc_input_value & 0x80) >> 7; | |
| 1654 | state->hwc_input_value <<= 1; | |
| 1617 | 1655 | return result; |
| 1618 | 1656 | } |
| 1619 | 1657 | break; |
| r7356 | r7357 | |
| 1624 | 1662 | |
| 1625 | 1663 | static WRITE16_HANDLER( hwchamp_custom_io_w ) |
| 1626 | 1664 | { |
| 1665 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1627 | 1666 | static const char *const portname[4] = { "MONITOR", "LEFT", "RIGHT", "DUMMY" }; |
| 1628 | 1667 | switch (offset & (0x3000/2)) |
| 1629 | 1668 | { |
| r7356 | r7357 | |
| 1631 | 1670 | switch (offset & 0x30/2) |
| 1632 | 1671 | { |
| 1633 | 1672 | case 0x20/2: |
| 1634 | hwc_input_value = input_port_read_safe(space->machine, portname[offset & 3], 0xff); | |
| 1673 | state->hwc_input_value = input_port_read_safe(space->machine, portname[offset & 3], 0xff); | |
| 1635 | 1674 | break; |
| 1636 | 1675 | |
| 1637 | 1676 | case 0x30/2: |
| r7356 | r7357 | |
| 1708 | 1747 | |
| 1709 | 1748 | static READ16_HANDLER( sjryuko_custom_io_r ) |
| 1710 | 1749 | { |
| 1750 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1711 | 1751 | static const char *const portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" }; |
| 1752 | ||
| 1712 | 1753 | switch (offset & (0x3000/2)) |
| 1713 | 1754 | { |
| 1714 | 1755 | case 0x1000/2: |
| 1715 | 1756 | switch (offset & 3) |
| 1716 | 1757 | { |
| 1717 | 1758 | case 1: |
| 1718 | if (input_port_read_safe(space->machine, portname[mj_input_num], 0xff) != 0xff) | |
| 1719 | return 0xff & ~(1 << mj_input_num); | |
| 1759 | if (input_port_read_safe(space->machine, portname[state->mj_input_num], 0xff) != 0xff) | |
| 1760 | return 0xff & ~(1 << state->mj_input_num); | |
| 1720 | 1761 | return 0xff; |
| 1721 | 1762 | |
| 1722 | 1763 | case 2: |
| 1723 | return input_port_read_safe(space->machine, portname[mj_input_num], 0xff); | |
| 1764 | return input_port_read_safe(space->machine, portname[state->mj_input_num], 0xff); | |
| 1724 | 1765 | } |
| 1725 | 1766 | break; |
| 1726 | 1767 | } |
| r7356 | r7357 | |
| 1730 | 1771 | |
| 1731 | 1772 | static WRITE16_HANDLER( sjryuko_custom_io_w ) |
| 1732 | 1773 | { |
| 1733 | static UINT8 last_val; | |
| 1774 | segas1x_state *state = (segas1x_state *)space->machine->driver_data; | |
| 1775 | ||
| 1734 | 1776 | switch (offset & (0x3000/2)) |
| 1735 | 1777 | { |
| 1736 | 1778 | case 0x0000/2: |
| 1737 | if (((last_val ^ data) & 4) && (data & 4)) | |
| 1738 | mj_input_num = (mj_input_num + 1) % 6; | |
| 1779 | if (((state->mj_last_val ^ data) & 4) && (data & 4)) | |
| 1780 | { | |
| 1781 | state->mj_input_num = (state->mj_input_num + 1) % 6; | |
| 1782 | state->mj_last_val = data; | |
| 1783 | } | |
| 1739 | 1784 | break; |
| 1740 | 1785 | } |
| 1741 | 1786 | standard_io_w(space, offset, data, mem_mask); |
| r7356 | r7357 | |
| 3242 | 3287 | |
| 3243 | 3288 | static MACHINE_DRIVER_START( system16b ) |
| 3244 | 3289 | |
| 3290 | /* driver data */ | |
| 3291 | MDRV_DRIVER_DATA(segas1x_state) | |
| 3292 | ||
| 3245 | 3293 | /* basic machine hardware */ |
| 3246 | 3294 | MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK_10MHz) |
| 3247 | 3295 | MDRV_CPU_PROGRAM_MAP(system16b_map) |
| r7356 | r7357 | |
| 3287 | 3335 | MDRV_CPU_VBLANK_INT("screen", irq0_line_pulse) |
| 3288 | 3336 | MACHINE_DRIVER_END |
| 3289 | 3337 | |
| 3338 | /* same as the above, but with custom Sega ICs */ | |
| 3290 | 3339 | |
| 3340 | static const ic_315_5250_interface sys16b_5250_intf = | |
| 3341 | { | |
| 3342 | NULL, NULL | |
| 3343 | }; | |
| 3291 | 3344 | |
| 3345 | static MACHINE_DRIVER_START( system16b_5248 ) | |
| 3346 | MDRV_IMPORT_FROM(system16b) | |
| 3347 | ||
| 3348 | MDRV_315_5248_ADD("315_5248") | |
| 3349 | MDRV_315_5250_ADD("315_5250_1", sys16b_5250_intf) | |
| 3350 | MDRV_315_5250_ADD("315_5250_2", sys16b_5250_intf) | |
| 3351 | MACHINE_DRIVER_END | |
| 3352 | ||
| 3353 | static MACHINE_DRIVER_START( system16b_8751_5248 ) | |
| 3354 | MDRV_IMPORT_FROM(system16b_8751) | |
| 3355 | ||
| 3356 | MDRV_315_5248_ADD("315_5248") | |
| 3357 | MDRV_315_5250_ADD("315_5250_1", sys16b_5250_intf) | |
| 3358 | MDRV_315_5250_ADD("315_5250_2", sys16b_5250_intf) | |
| 3359 | MACHINE_DRIVER_END | |
| 3360 | ||
| 3361 | ||
| 3362 | ||
| 3292 | 3363 | /************************************* |
| 3293 | 3364 | * |
| 3294 | 3365 | * Game-specific machine drivers |
| r7356 | r7357 | |
| 6200 | 6271 | |
| 6201 | 6272 | static DRIVER_INIT( altbeast_5521 ) |
| 6202 | 6273 | { |
| 6274 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6275 | ||
| 6203 | 6276 | DRIVER_INIT_CALL(generic_5521); |
| 6204 | i8751_vblank_hook = altbeast_i8751_sim; | |
| 6277 | state->i8751_vblank_hook = altbeast_i8751_sim; | |
| 6205 | 6278 | } |
| 6206 | 6279 | |
| 6207 | 6280 | |
| 6208 | 6281 | static DRIVER_INIT( altbeasj_5521 ) |
| 6209 | 6282 | { |
| 6283 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6284 | ||
| 6210 | 6285 | DRIVER_INIT_CALL(generic_5521); |
| 6211 | i8751_vblank_hook = altbeasj_i8751_sim; | |
| 6286 | state->i8751_vblank_hook = altbeasj_i8751_sim; | |
| 6212 | 6287 | } |
| 6213 | 6288 | |
| 6214 | 6289 | |
| 6215 | 6290 | static DRIVER_INIT( altbeas5_5521 ) |
| 6216 | 6291 | { |
| 6292 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6293 | ||
| 6217 | 6294 | DRIVER_INIT_CALL(generic_5521); |
| 6218 | i8751_vblank_hook = altbeas5_i8751_sim; | |
| 6295 | state->i8751_vblank_hook = altbeas5_i8751_sim; | |
| 6219 | 6296 | } |
| 6220 | 6297 | |
| 6221 | 6298 | |
| r7356 | r7357 | |
| 6242 | 6319 | |
| 6243 | 6320 | static DRIVER_INIT( ddux_5704 ) |
| 6244 | 6321 | { |
| 6322 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6323 | ||
| 6245 | 6324 | DRIVER_INIT_CALL(generic_5704); |
| 6246 | i8751_vblank_hook = ddux_i8751_sim; | |
| 6325 | state->i8751_vblank_hook = ddux_i8751_sim; | |
| 6247 | 6326 | } |
| 6248 | 6327 | |
| 6249 | 6328 | |
| 6250 | 6329 | static DRIVER_INIT( dunkshot_5358 ) |
| 6251 | 6330 | { |
| 6331 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6332 | ||
| 6252 | 6333 | DRIVER_INIT_CALL(generic_5358); |
| 6253 | 6334 | fd1089a_decrypt(machine); |
| 6254 | custom_io_r = dunkshot_custom_io_r; | |
| 6335 | state->custom_io_r = dunkshot_custom_io_r; | |
| 6255 | 6336 | } |
| 6256 | 6337 | |
| 6257 | 6338 | |
| 6258 | 6339 | static DRIVER_INIT( exctleag_5358 ) |
| 6259 | 6340 | { |
| 6341 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6342 | ||
| 6260 | 6343 | DRIVER_INIT_CALL(generic_5358); |
| 6261 | custom_io_r = sdi_custom_io_r; | |
| 6344 | state->custom_io_r = sdi_custom_io_r; | |
| 6262 | 6345 | } |
| 6263 | 6346 | |
| 6264 | 6347 | |
| 6265 | 6348 | static DRIVER_INIT( goldnaxe_5704 ) |
| 6266 | 6349 | { |
| 6350 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6351 | ||
| 6267 | 6352 | DRIVER_INIT_CALL(generic_5704); |
| 6268 | 6353 | goldnaxe_i8751_init(machine); |
| 6269 | i8751_vblank_hook = goldnaxe_i8751_sim; | |
| 6354 | state->i8751_vblank_hook = goldnaxe_i8751_sim; | |
| 6270 | 6355 | } |
| 6271 | 6356 | |
| 6272 | 6357 | |
| 6273 | 6358 | static DRIVER_INIT( goldnaxe_5797 ) |
| 6274 | 6359 | { |
| 6360 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6361 | ||
| 6275 | 6362 | DRIVER_INIT_CALL(generic_5797); |
| 6276 | 6363 | goldnaxe_i8751_init(machine); |
| 6277 | i8751_vblank_hook = goldnaxe_i8751_sim; | |
| 6364 | state->i8751_vblank_hook = goldnaxe_i8751_sim; | |
| 6278 | 6365 | } |
| 6279 | 6366 | |
| 6280 | 6367 | |
| 6281 | 6368 | static DRIVER_INIT( hwchamp_5521 ) |
| 6282 | 6369 | { |
| 6370 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6371 | ||
| 6283 | 6372 | DRIVER_INIT_CALL(generic_5521); |
| 6284 | custom_io_r = hwchamp_custom_io_r; | |
| 6285 | custom_io_w = hwchamp_custom_io_w; | |
| 6373 | state->custom_io_r = hwchamp_custom_io_r; | |
| 6374 | state->custom_io_w = hwchamp_custom_io_w; | |
| 6286 | 6375 | } |
| 6287 | 6376 | |
| 6288 | 6377 | |
| 6289 | 6378 | static DRIVER_INIT( sdi_5358 ) |
| 6290 | 6379 | { |
| 6380 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6381 | ||
| 6291 | 6382 | DRIVER_INIT_CALL(generic_5358); |
| 6292 | custom_io_r = sdi_custom_io_r; | |
| 6383 | state->custom_io_r = sdi_custom_io_r; | |
| 6293 | 6384 | } |
| 6294 | 6385 | |
| 6295 | 6386 | static DRIVER_INIT( defense_5358 ) |
| 6296 | 6387 | { |
| 6388 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6389 | ||
| 6297 | 6390 | DRIVER_INIT_CALL(generic_5358); |
| 6298 | 6391 | fd1089a_decrypt(machine); |
| 6299 | custom_io_r = sdi_custom_io_r; | |
| 6392 | state->custom_io_r = sdi_custom_io_r; | |
| 6300 | 6393 | } |
| 6301 | 6394 | |
| 6302 | 6395 | |
| r7356 | r7357 | |
| 6316 | 6409 | |
| 6317 | 6410 | static DRIVER_INIT( sjryuko_5358 ) |
| 6318 | 6411 | { |
| 6412 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6413 | ||
| 6319 | 6414 | DRIVER_INIT_CALL(generic_5358); |
| 6320 | 6415 | fd1089b_decrypt(machine); |
| 6321 | custom_io_r = sjryuko_custom_io_r; | |
| 6322 | custom_io_w = sjryuko_custom_io_w; | |
| 6416 | state->custom_io_r = sjryuko_custom_io_r; | |
| 6417 | state->custom_io_w = sjryuko_custom_io_w; | |
| 6323 | 6418 | } |
| 6324 | 6419 | |
| 6325 | 6420 | |
| 6326 | 6421 | static DRIVER_INIT( passshtj_5358 ) |
| 6327 | 6422 | { |
| 6423 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6424 | ||
| 6328 | 6425 | DRIVER_INIT_CALL(generic_5358); |
| 6329 | custom_io_r = passshtj_custom_io_r; | |
| 6426 | state->custom_io_r = passshtj_custom_io_r; | |
| 6330 | 6427 | } |
| 6331 | 6428 | |
| 6332 | 6429 | static DRIVER_INIT( tturf_5704 ) |
| 6333 | 6430 | { |
| 6431 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6432 | ||
| 6334 | 6433 | DRIVER_INIT_CALL(generic_5704); |
| 6335 | i8751_vblank_hook = tturf_i8751_sim; | |
| 6434 | state->i8751_vblank_hook = tturf_i8751_sim; | |
| 6336 | 6435 | } |
| 6337 | 6436 | |
| 6338 | 6437 | |
| 6339 | 6438 | static DRIVER_INIT( tturf_5358 ) |
| 6340 | 6439 | { |
| 6440 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6441 | ||
| 6341 | 6442 | DRIVER_INIT_CALL(generic_5358); |
| 6342 | i8751_vblank_hook = tturf_i8751_sim; | |
| 6443 | state->i8751_vblank_hook = tturf_i8751_sim; | |
| 6343 | 6444 | } |
| 6344 | 6445 | |
| 6345 | 6446 | |
| 6346 | 6447 | static DRIVER_INIT( wb3_5704 ) |
| 6347 | 6448 | { |
| 6449 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6450 | ||
| 6348 | 6451 | DRIVER_INIT_CALL(generic_5704); |
| 6349 | i8751_vblank_hook = wb3_i8751_sim; | |
| 6452 | state->i8751_vblank_hook = wb3_i8751_sim; | |
| 6350 | 6453 | } |
| 6351 | 6454 | |
| 6352 | 6455 | |
| 6353 | 6456 | static DRIVER_INIT( wrestwar_8751 ) |
| 6354 | 6457 | { |
| 6458 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6459 | ||
| 6355 | 6460 | DRIVER_INIT_CALL(generic_5704); |
| 6356 | i8751_vblank_hook = wrestwar_i8751_sim; | |
| 6461 | state->i8751_vblank_hook = wrestwar_i8751_sim; | |
| 6357 | 6462 | } |
| 6358 | 6463 | |
| 6359 | 6464 | |
| 6360 | 6465 | static DRIVER_INIT( atomicp ) |
| 6361 | 6466 | { |
| 6467 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6468 | ||
| 6362 | 6469 | system16b_generic_init(machine, ROM_BOARD_ATOMICP); |
| 6363 | disable_screen_blanking = 1; | |
| 6470 | state->disable_screen_blanking = 1; | |
| 6471 | state->atomicp_sound_divisor = 1; | |
| 6472 | ||
| 6364 | 6473 | segaic16_display_enable = 1; |
| 6365 | atomicp_sound_divisor = 1; | |
| 6366 | 6474 | } |
| 6367 | 6475 | |
| 6368 | 6476 | |
| 6369 | 6477 | static DRIVER_INIT( snapper ) |
| 6370 | 6478 | { |
| 6479 | segas1x_state *state = (segas1x_state *)machine->driver_data; | |
| 6480 | ||
| 6371 | 6481 | system16b_generic_init(machine, ROM_BOARD_ATOMICP); |
| 6372 | disable_screen_blanking = 1; | |
| 6482 | state->disable_screen_blanking = 1; | |
| 6483 | state->atomicp_sound_divisor = 4; | |
| 6484 | ||
| 6373 | 6485 | segaic16_display_enable = 1; |
| 6374 | atomicp_sound_divisor = 4; | |
| 6375 | 6486 | } |
| 6376 | 6487 | |
| 6377 | 6488 | |
| r7356 | r7357 | |
| 6415 | 6526 | |
| 6416 | 6527 | GAME( 1986, dunkshot, 0, timescan, dunkshot, dunkshot_5358, ROT0, "Sega", "Dunk Shot (FD1089A 317-0022)", 0 ) |
| 6417 | 6528 | |
| 6418 | GAME( 1989, eswat, 0, system16b, eswat, generic_5797, ROT0, "Sega", "E-Swat - Cyber Police (set 3, World, FD1094 317-0130)", 0 ) | |
| 6419 | GAME( 1989, eswatu, eswat, system16b, eswat, generic_5797, ROT0, "Sega", "E-Swat - Cyber Police (set 2, US, FD1094 317-0129)", 0 ) | |
| 6420 | GAME( 1989, eswatj, eswat, system16b, eswat, generic_5797, ROT0, "Sega", "E-Swat - Cyber Police (set 1, Japan, FD1094 317-0128)", 0 ) | |
| 6529 | GAME( 1989, eswat, 0, system16b_5248, eswat, generic_5797, ROT0, "Sega", "E-Swat - Cyber Police (set 3, World, FD1094 317-0130)", 0 ) | |
| 6530 | GAME( 1989, eswatu, eswat, system16b_5248, eswat, generic_5797, ROT0, "Sega", "E-Swat - Cyber Police (set 2, US, FD1094 317-0129)", 0 ) | |
| 6531 | GAME( 1989, eswatj, eswat, system16b_5248, eswat, generic_5797, ROT0, "Sega", "E-Swat - Cyber Police (set 1, Japan, FD1094 317-0128)", 0 ) | |
| 6421 | 6532 | |
| 6422 | 6533 | GAME( 1988, exctleag, 0, system16b, exctleag, exctleag_5358, ROT0, "Sega", "Excite League (FD1094 317-0079)", 0 ) |
| 6423 | 6534 | |
| 6424 | 6535 | GAME( 1989, fpoint, 0, system16b, fpoint, generic_5358, ROT0, "Sega", "Flash Point (set 2, Japan, FD1094 317-0127A)", 0 ) |
| 6425 | 6536 | GAME( 1989, fpoint1, fpoint, system16b, fpoint, generic_5704, ROT0, "Sega", "Flash Point (set 1, Japan, FD1094 317-0127A)", 0 ) |
| 6426 | 6537 | |
| 6427 | GAME( 1989, goldnaxe, 0, system16b_8751, goldnaxe, goldnaxe_5797, ROT0, "Sega", "Golden Axe (set 6, US, 8751 317-123A)", 0 ) | |
| 6428 | GAME( 1989, goldnaxeu, goldnaxe, system16b, goldnaxe, generic_5797, ROT0, "Sega", "Golden Axe (set 5, US, FD1094 317-0122)", 0 ) | |
| 6538 | GAME( 1989, goldnaxe, 0, system16b_8751_5248, goldnaxe, goldnaxe_5797, ROT0, "Sega", "Golden Axe (set 6, US, 8751 317-123A)", 0 ) | |
| 6539 | GAME( 1989, goldnaxeu, goldnaxe, system16b_5248, goldnaxe, generic_5797, ROT0, "Sega", "Golden Axe (set 5, US, FD1094 317-0122)", 0 ) | |
| 6429 | 6540 | GAME( 1989, goldnaxej, goldnaxe, system16b, goldnaxe, generic_5704, ROT0, "Sega", "Golden Axe (set 4, Japan, FD1094 317-0121)", 0 ) |
| 6430 | 6541 | GAME( 1989, goldnaxe3, goldnaxe, system16b, goldnaxe, generic_5704, ROT0, "Sega", "Golden Axe (set 3, World, FD1094 317-0120)" , 0) // set was labeled japan but doesn't seem to be |
| 6431 | 6542 | GAME( 1989, goldnaxe2, goldnaxe, system16b_8751, goldnaxe, goldnaxe_5704, ROT0, "Sega", "Golden Axe (set 2, US, 8751 317-0112)", 0 ) |
| 6432 | GAME( 1989, goldnaxe1, goldnaxe, system16b, | |
| 6543 | GAME( 1989, goldnaxe1, goldnaxe, system16b_5248, | |
| 6433 | 6544 | |
| 6434 | 6545 | GAME( 1987, hwchamp, 0, system16b, hwchamp, hwchamp_5521, ROT0, "Sega", "Heavyweight Champ", 0 ) |
| 6435 | 6546 | |
| 6436 | GAME( 1989, mvp, 0, system16b, | |
| 6547 | GAME( 1989, mvp, 0, system16b_5248, | |
| 6437 | 6548 | GAME( 1989, mvpj, mvp, system16b, mvp, generic_5704, ROT0, "Sega", "MVP (set 1, Japan, FD1094 317-0142)", 0 ) |
| 6438 | 6549 | |
| 6439 | 6550 | GAME( 1988, passsht, 0, system16b, passsht, generic_5358, ROT270, "Sega", "Passing Shot (World, 2 Players, FD1094 317-0080)", 0 ) |
| r7356 | r7357 | |
| 6464 | 6575 | |
| 6465 | 6576 | GAME( 1987, timescan, 0, timescan, timescan, generic_5358, ROT270, "Sega", "Time Scanner (set 2, System 16B)", 0 ) |
| 6466 | 6577 | |
| 6467 | GAME( 1994, toryumon, 0, system16b, | |
| 6578 | GAME( 1994, toryumon, 0, system16b_5248, | |
| 6468 | 6579 | |
| 6469 | 6580 | GAME( 1989, tturf, 0, system16b_8751, tturf, tturf_5704, ROT0, "Sega / Sunsoft", "Tough Turf (set 2, Japan, 8751 317-0104)", GAME_NO_SOUND /* due to missing ROM only */) |
| 6470 | 6581 | GAME( 1989, tturfu, tturf, system16b_8751, tturf, tturf_5358, ROT0, "Sega / Sunsoft", "Tough Turf (set 1, US, 8751 317-0099)", 0) |
| r7356 | r7357 | |
|---|---|---|
| 216 | 216 | #include "cpu/m68000/m68000.h" |
| 217 | 217 | #include "cpu/powerpc/ppc.h" |
| 218 | 218 | #include "cpu/sharc/sharc.h" |
| 219 | #include "machine/konppc.h" | |
| 220 | 219 | #include "machine/adc1213x.h" |
| 221 | #include "sound/rf5c400.h" | |
| 222 | #include "video/voodoo.h" | |
| 220 | #include "machine/k033906.h" | |
| 221 | #include "machine/konppc.h" | |
| 223 | 222 | #include "machine/timekpr.h" |
| 223 | #include "sound/rf5c400.h" | |
| 224 | 224 | #include "sound/k056800.h" |
| 225 | #include "machine/k033906.h" | |
| 225 | #include "video/voodoo.h" | |
| 226 | #include "video/konicdev.h" | |
| 226 | 227 | |
| 227 | 228 | static UINT8 led_reg0, led_reg1; |
| 228 | 229 | |
| r7356 | r7357 | |
| 236 | 237 | palette_set_color_rgb(space->machine, offset, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); |
| 237 | 238 | } |
| 238 | 239 | |
| 239 | ||
| 240 | ||
| 241 | /* K001604 Tilemap chip (move to konamiic.c ?) */ | |
| 242 | ||
| 243 | #define MAX_K001604_CHIPS 2 | |
| 244 | ||
| 245 | static UINT32 *K001604_tile_ram[MAX_K001604_CHIPS]; | |
| 246 | static UINT32 *K001604_char_ram[MAX_K001604_CHIPS]; | |
| 247 | static int K001604_gfx_index[MAX_K001604_CHIPS][2]; | |
| 248 | static tilemap_t *K001604_layer_8x8[MAX_K001604_CHIPS][2]; | |
| 249 | static int K001604_tilemap_offset; | |
| 250 | static tilemap_t *K001604_layer_roz[MAX_K001604_CHIPS][2]; | |
| 251 | static int K001604_roz_size[MAX_K001604_CHIPS]; | |
| 252 | ||
| 253 | static UINT32 *K001604_reg[MAX_K001604_CHIPS]; | |
| 254 | ||
| 255 | static int K001604_layer_size; | |
| 256 | ||
| 257 | #define K001604_NUM_TILES_LAYER0 16384 | |
| 258 | #define K001604_NUM_TILES_LAYER1 4096 | |
| 259 | ||
| 260 | static const gfx_layout K001604_char_layout_layer_8x8 = | |
| 261 | { | |
| 262 | 8, 8, | |
| 263 | K001604_NUM_TILES_LAYER0, | |
| 264 | 8, | |
| 265 | { 8,9,10,11,12,13,14,15 }, | |
| 266 | { 1*16, 0*16, 3*16, 2*16, 5*16, 4*16, 7*16, 6*16 }, | |
| 267 | { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128 }, | |
| 268 | 8*128 | |
| 269 | }; | |
| 270 | ||
| 271 | static const gfx_layout K001604_char_layout_layer_16x16 = | |
| 272 | { | |
| 273 | 16, 16, | |
| 274 | K001604_NUM_TILES_LAYER1, | |
| 275 | 8, | |
| 276 | { 8,9,10,11,12,13,14,15 }, | |
| 277 | { 1*16, 0*16, 3*16, 2*16, 5*16, 4*16, 7*16, 6*16, 9*16, 8*16, 11*16, 10*16, 13*16, 12*16, 15*16, 14*16 }, | |
| 278 | { 0*256, 1*256, 2*256, 3*256, 4*256, 5*256, 6*256, 7*256, 8*256, 9*256, 10*256, 11*256, 12*256, 13*256, 14*256, 15*256 }, | |
| 279 | 16*256 | |
| 280 | }; | |
| 281 | ||
| 282 | ||
| 283 | static TILEMAP_MAPPER( K001604_scan_layer_8x8_0 ) | |
| 284 | { | |
| 285 | /* logical (col,row) -> memory offset */ | |
| 286 | int width = K001604_layer_size ? 256 : 128; | |
| 287 | return K001604_tilemap_offset + (row * width) + col; | |
| 288 | } | |
| 289 | ||
| 290 | static TILEMAP_MAPPER( K001604_scan_layer_8x8_1 ) | |
| 291 | { | |
| 292 | /* logical (col,row) -> memory offset */ | |
| 293 | int width = K001604_layer_size ? 256 : 128; | |
| 294 | return K001604_tilemap_offset + (row * width) + col + 64; | |
| 295 | } | |
| 296 | ||
| 297 | static TILEMAP_MAPPER( K001604_scan_layer_roz_0 ) | |
| 298 | { | |
| 299 | /* logical (col,row) -> memory offset */ | |
| 300 | int width = K001604_layer_size ? 256 : 128; | |
| 301 | return (row * width) + col + (K001604_layer_size ? 128 : 0); | |
| 302 | } | |
| 303 | ||
| 304 | static TILEMAP_MAPPER( K001604_scan_layer_roz_1 ) | |
| 305 | { | |
| 306 | /* logical (col,row) -> memory offset */ | |
| 307 | int width = K001604_layer_size ? 256 : 128; | |
| 308 | return (row * width) + col + (K001604_layer_size ? 192 : 64); | |
| 309 | } | |
| 310 | ||
| 311 | static TILE_GET_INFO( K001604_0_tile_info_layer_8x8 ) | |
| 312 | { | |
| 313 | UINT32 val = K001604_tile_ram[0][tile_index]; | |
| 314 | int color = (val >> 17) & 0x1f; | |
| 315 | int tile = (val & 0x7fff); | |
| 316 | int flags = 0; | |
| 317 | ||
| 318 | if (val & 0x400000) | |
| 319 | flags |= TILE_FLIPX; | |
| 320 | if (val & 0x800000) | |
| 321 | flags |= TILE_FLIPY; | |
| 322 | ||
| 323 | SET_TILE_INFO(K001604_gfx_index[0][0], tile, color, flags); | |
| 324 | } | |
| 325 | ||
| 326 | static TILE_GET_INFO( K001604_0_tile_info_layer_roz ) | |
| 327 | { | |
| 328 | UINT32 val = K001604_tile_ram[0][tile_index]; | |
| 329 | int flags = 0; | |
| 330 | int color = (val >> 17) & 0x1f; | |
| 331 | int tile = val & 0x7ff; | |
| 332 | ||
| 333 | if (val & 0x400000) | |
| 334 | flags |= TILE_FLIPX; | |
| 335 | if (val & 0x800000) | |
| 336 | flags |= TILE_FLIPY; | |
| 337 | ||
| 338 | tile += K001604_roz_size[0] ? 0x800 : 0x2000; | |
| 339 | ||
| 340 | SET_TILE_INFO(K001604_gfx_index[0][K001604_roz_size[0]], tile, color, flags); | |
| 341 | } | |
| 342 | ||
| 343 | static TILE_GET_INFO( K001604_1_tile_info_layer_8x8 ) | |
| 344 | { | |
| 345 | UINT32 val = K001604_tile_ram[1][tile_index]; | |
| 346 | int color = (val >> 17) & 0x1f; | |
| 347 | int tile = (val & 0x7fff); | |
| 348 | int flags = 0; | |
| 349 | ||
| 350 | if (val & 0x400000) | |
| 351 | flags |= TILE_FLIPX; | |
| 352 | if (val & 0x800000) | |
| 353 | flags |= TILE_FLIPY; | |
| 354 | ||
| 355 | SET_TILE_INFO(K001604_gfx_index[1][0], tile, color, flags); | |
| 356 | } | |
| 357 | ||
| 358 | static TILE_GET_INFO( K001604_1_tile_info_layer_roz ) | |
| 359 | { | |
| 360 | UINT32 val = K001604_tile_ram[1][tile_index]; | |
| 361 | int flags = 0; | |
| 362 | int color = (val >> 17) & 0x1f; | |
| 363 | int tile = (val & 0x7ff); | |
| 364 | ||
| 365 | if (val & 0x400000) | |
| 366 | flags |= TILE_FLIPX; | |
| 367 | if (val & 0x800000) | |
| 368 | flags |= TILE_FLIPY; | |
| 369 | ||
| 370 | tile += K001604_roz_size[1] ? 0x800 : 0x2000; | |
| 371 | ||
| 372 | SET_TILE_INFO(K001604_gfx_index[1][K001604_roz_size[1]], tile, color, flags); | |
| 373 | } | |
| 374 | ||
| 375 | int K001604_vh_start(running_machine *machine, int chip) | |
| 376 | { | |
| 377 | const char *gamename = machine->gamedrv->name; | |
| 378 | ||
| 379 | /* HACK !!! To be removed */ | |
| 380 | if (mame_stricmp(gamename, "racingj") == 0 || mame_stricmp(gamename, "racingj2") == 0 | |
| 381 | || mame_stricmp(gamename, "hangplt") == 0 || mame_stricmp(gamename, "slrasslt") == 0 | |
| 382 | || mame_stricmp(gamename, "jetwave") == 0) | |
| 383 | { | |
| 384 | K001604_layer_size = 0; // width = 128 tiles | |
| 385 | } | |
| 386 | else | |
| 387 | { | |
| 388 | K001604_layer_size = 1; // width = 256 tiles | |
| 389 | } | |
| 390 | ||
| 391 | /* HACK !!! To be removed */ | |
| 392 | if (mame_stricmp(gamename, "slrasslt") == 0) | |
| 393 | { | |
| 394 | K001604_tilemap_offset = 16384; | |
| 395 | ||
| 396 | K001604_roz_size[chip] = 0; // 8x8 | |
| 397 | } | |
| 398 | else | |
| 399 | { | |
| 400 | K001604_tilemap_offset = 0; | |
| 401 | ||
| 402 | K001604_roz_size[chip] = 1; // 16x16 | |
| 403 | } | |
| 404 | ||
| 405 | for (K001604_gfx_index[chip][0] = 0; K001604_gfx_index[chip][0] < MAX_GFX_ELEMENTS; K001604_gfx_index[chip][0]++) | |
| 406 | if (machine->gfx[K001604_gfx_index[chip][0]] == 0) | |
| 407 | break; | |
| 408 | if (K001604_gfx_index[chip][0] == MAX_GFX_ELEMENTS) | |
| 409 | { | |
| 410 | return 1; | |
| 411 | } | |
| 412 | ||
| 413 | for (K001604_gfx_index[chip][1] = K001604_gfx_index[chip][0] + 1; K001604_gfx_index[chip][1] < MAX_GFX_ELEMENTS; K001604_gfx_index[chip][1]++) | |
| 414 | if (machine->gfx[K001604_gfx_index[chip][1]] == 0) | |
| 415 | break; | |
| 416 | if (K001604_gfx_index[chip][1] == MAX_GFX_ELEMENTS) | |
| 417 | { | |
| 418 | return 1; | |
| 419 | } | |
| 420 | ||
| 421 | K001604_char_ram[chip] = auto_alloc_array(machine, UINT32, 0x200000/4); | |
| 422 | ||
| 423 | K001604_tile_ram[chip] = auto_alloc_array(machine, UINT32, 0x20000/4); | |
| 424 | ||
| 425 | K001604_reg[chip] = auto_alloc_array(machine, UINT32, 0x400/4); | |
| 426 | ||
| 427 | if (chip == 0) | |
| 428 | { | |
| 429 | int roz_tile_size = K001604_roz_size[chip] ? 16 : 8; | |
| 430 | int roz_width = K001604_layer_size ? 64 : 128; | |
| 431 | K001604_layer_8x8[chip][0] = tilemap_create(machine, K001604_0_tile_info_layer_8x8, K001604_scan_layer_8x8_0, 8, 8, 64, 64); | |
| 432 | K001604_layer_8x8[chip][1] = tilemap_create(machine, K001604_0_tile_info_layer_8x8, K001604_scan_layer_8x8_1, 8, 8, 64, 64); | |
| 433 | ||
| 434 | K001604_layer_roz[chip][0] = tilemap_create(machine, K001604_0_tile_info_layer_roz, K001604_scan_layer_roz_0, roz_tile_size, roz_tile_size, roz_width, 64); | |
| 435 | K001604_layer_roz[chip][1] = tilemap_create(machine, K001604_0_tile_info_layer_roz, K001604_scan_layer_roz_1, roz_tile_size, roz_tile_size, 64, 64); | |
| 436 | } | |
| 437 | else | |
| 438 | { | |
| 439 | int roz_tile_size = K001604_roz_size[chip] ? 16 : 8; | |
| 440 | int roz_width = K001604_layer_size ? 64 : 128; | |
| 441 | K001604_layer_8x8[chip][0] = tilemap_create(machine, K001604_1_tile_info_layer_8x8, K001604_scan_layer_8x8_0, 8, 8, 64, 64); | |
| 442 | K001604_layer_8x8[chip][1] = tilemap_create(machine, K001604_1_tile_info_layer_8x8, K001604_scan_layer_8x8_1, 8, 8, 64, 64); | |
| 443 | ||
| 444 | K001604_layer_roz[chip][0] = tilemap_create(machine, K001604_1_tile_info_layer_roz, K001604_scan_layer_roz_0, roz_tile_size, roz_tile_size, roz_width, 64); | |
| 445 | K001604_layer_roz[chip][1] = tilemap_create(machine, K001604_1_tile_info_layer_roz, K001604_scan_layer_roz_1, roz_tile_size, roz_tile_size, 64, 64); | |
| 446 | } | |
| 447 | ||
| 448 | tilemap_set_transparent_pen(K001604_layer_8x8[chip][0], 0); | |
| 449 | tilemap_set_transparent_pen(K001604_layer_8x8[chip][1], 0); | |
| 450 | ||
| 451 | memset(K001604_char_ram[chip], 0, 0x200000); | |
| 452 | memset(K001604_tile_ram[chip], 0, 0x10000); | |
| 453 | memset(K001604_reg[chip], 0, 0x400); | |
| 454 | ||
| 455 | ||
| 456 | machine->gfx[K001604_gfx_index[chip][0]] = gfx_element_alloc(machine, &K001604_char_layout_layer_8x8, (UINT8*)&K001604_char_ram[chip][0], machine->config->total_colors / 16, 0); | |
| 457 | machine->gfx[K001604_gfx_index[chip][1]] = gfx_element_alloc(machine, &K001604_char_layout_layer_16x16, (UINT8*)&K001604_char_ram[chip][0], machine->config->total_colors / 16, 0); | |
| 458 | ||
| 459 | return 0; | |
| 460 | } | |
| 461 | ||
| 462 | void K001604_draw_back_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect) | |
| 463 | { | |
| 464 | int layer; | |
| 465 | int num_layers; | |
| 466 | bitmap_fill(bitmap, cliprect, 0); | |
| 467 | ||
| 468 | num_layers = K001604_layer_size ? 2 : 1; | |
| 469 | ||
| 470 | for (layer=0; layer < num_layers; layer++) | |
| 471 | { | |
| 472 | int reg = 0x08; | |
| 473 | ||
| 474 | INT32 x = (INT16)((K001604_reg[chip][reg+0] >> 16) & 0xffff); | |
| 475 | INT32 y = (INT16)((K001604_reg[chip][reg+0] >> 0) & 0xffff); | |
| 476 | INT32 xx = (INT16)((K001604_reg[chip][reg+1] >> 0) & 0xffff); | |
| 477 | INT32 xy = (INT16)((K001604_reg[chip][reg+1] >> 16) & 0xffff); | |
| 478 | INT32 yx = (INT16)((K001604_reg[chip][reg+2] >> 0) & 0xffff); | |
| 479 | INT32 yy = (INT16)((K001604_reg[chip][reg+2] >> 16) & 0xffff); | |
| 480 | ||
| 481 | x = (x + 320) * 256; | |
| 482 | y = (y + 208) * 256; | |
| 483 | xx = (xx); | |
| 484 | xy = (-xy); | |
| 485 | yx = (-yx); | |
| 486 | yy = (yy); | |
| 487 | ||
| 488 | if ((K001604_reg[chip][0x6c/4] & (0x08 >> layer)) != 0) | |
| 489 | { | |
| 490 | tilemap_draw_roz(bitmap, cliprect, K001604_layer_roz[chip][layer], | |
| 491 | x << 5, y << 5, xx << 5, xy << 5, yx << 5, yy << 5, 1, 0, 0); | |
| 492 | } | |
| 493 | } | |
| 494 | } | |
| 495 | ||
| 496 | void K001604_draw_front_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect) | |
| 497 | { | |
| 498 | //tilemap_draw(bitmap, cliprect, K001604_layer_8x8[chip][1], 0,0); | |
| 499 | tilemap_draw(bitmap, cliprect, K001604_layer_8x8[chip][0], 0,0); | |
| 500 | } | |
| 501 | ||
| 502 | READ32_HANDLER(K001604_tile_r) | |
| 503 | { | |
| 504 | int chip = get_cgboard_id(); | |
| 505 | ||
| 506 | return K001604_tile_ram[chip][offset]; | |
| 507 | } | |
| 508 | ||
| 509 | READ32_HANDLER(K001604_char_r) | |
| 510 | { | |
| 511 | int chip = get_cgboard_id(); | |
| 512 | ||
| 513 | int set, bank; | |
| 514 | UINT32 addr; | |
| 515 | ||
| 516 | set = (K001604_reg[chip][0x60/4] & 0x1000000) ? 0x100000 : 0; | |
| 517 | ||
| 518 | if (set) | |
| 519 | { | |
| 520 | bank = (K001604_reg[chip][0x60/4] >> 8) & 0x3; | |
| 521 | } | |
| 522 | else | |
| 523 | { | |
| 524 | bank = (K001604_reg[chip][0x60/4] & 0x3); | |
| 525 | } | |
| 526 | ||
| 527 | addr = offset + ((set + (bank * 0x40000)) / 4); | |
| 528 | ||
| 529 | return K001604_char_ram[chip][addr]; | |
| 530 | } | |
| 531 | ||
| 532 | WRITE32_HANDLER(K001604_tile_w) | |
| 533 | { | |
| 534 | int chip = get_cgboard_id(); | |
| 535 | ||
| 536 | int x, y; | |
| 537 | COMBINE_DATA(K001604_tile_ram[chip] + offset); | |
| 538 | ||
| 539 | if (K001604_layer_size) | |
| 540 | { | |
| 541 | x = offset & 0xff; | |
| 542 | y = offset / 256; | |
| 543 | } | |
| 544 | else | |
| 545 | { | |
| 546 | x = offset & 0x7f; | |
| 547 | y = offset / 128; | |
| 548 | } | |
| 549 | ||
| 550 | if (K001604_layer_size) | |
| 551 | { | |
| 552 | if (x < 64) | |
| 553 | { | |
| 554 | tilemap_mark_tile_dirty(K001604_layer_8x8[chip][0], offset); | |
| 555 | } | |
| 556 | else if (x < 128) | |
| 557 | { | |
| 558 | tilemap_mark_tile_dirty(K001604_layer_8x8[chip][1], offset); | |
| 559 | } | |
| 560 | else if (x < 192) | |
| 561 | { | |
| 562 | tilemap_mark_tile_dirty(K001604_layer_roz[chip][0], offset); | |
| 563 | } | |
| 564 | else | |
| 565 | { | |
| 566 | tilemap_mark_tile_dirty(K001604_layer_roz[chip][1], offset); | |
| 567 | } | |
| 568 | } | |
| 569 | else | |
| 570 | { | |
| 571 | if (x < 64) | |
| 572 | { | |
| 573 | tilemap_mark_tile_dirty(K001604_layer_8x8[chip][0], offset); | |
| 574 | ||
| 575 | tilemap_mark_tile_dirty(K001604_layer_roz[chip][0], offset); | |
| 576 | } | |
| 577 | else | |
| 578 | { | |
| 579 | tilemap_mark_tile_dirty(K001604_layer_8x8[chip][1], offset); | |
| 580 | ||
| 581 | tilemap_mark_tile_dirty(K001604_layer_roz[chip][1], offset); | |
| 582 | } | |
| 583 | } | |
| 584 | } | |
| 585 | ||
| 586 | WRITE32_HANDLER(K001604_char_w) | |
| 587 | { | |
| 588 | int chip = get_cgboard_id(); | |
| 589 | ||
| 590 | int set, bank; | |
| 591 | UINT32 addr; | |
| 592 | ||
| 593 | set = (K001604_reg[chip][0x60/4] & 0x1000000) ? 0x100000 : 0; | |
| 594 | ||
| 595 | if (set) | |
| 596 | { | |
| 597 | bank = (K001604_reg[chip][0x60/4] >> 8) & 0x3; | |
| 598 | } | |
| 599 | else | |
| 600 | { | |
| 601 | bank = (K001604_reg[chip][0x60/4] & 0x3); | |
| 602 | } | |
| 603 | ||
| 604 | addr = offset + ((set + (bank * 0x40000)) / 4); | |
| 605 | ||
| 606 | COMBINE_DATA(K001604_char_ram[chip] + addr); | |
| 607 | ||
| 608 | gfx_element_mark_dirty(space->machine->gfx[K001604_gfx_index[chip][0]], addr / 32); | |
| 609 | gfx_element_mark_dirty(space->machine->gfx[K001604_gfx_index[chip][1]], addr / 128); | |
| 610 | } | |
| 611 | ||
| 612 | ||
| 613 | ||
| 614 | WRITE32_HANDLER(K001604_reg_w) | |
| 615 | { | |
| 616 | int chip = get_cgboard_id(); | |
| 617 | ||
| 618 | COMBINE_DATA(K001604_reg[chip] + offset); | |
| 619 | ||
| 620 | switch (offset) | |
| 621 | { | |
| 622 | case 0x8: | |
| 623 | case 0x9: | |
| 624 | case 0xa: | |
| 625 | //printf("K001604_reg_w %02X, %08X, %08X\n", offset, data, mem_mask); | |
| 626 | break; | |
| 627 | } | |
| 628 | ||
| 629 | if (offset != 0x08 && offset != 0x09 && offset != 0x0a /*&& offset != 0x17 && offset != 0x18*/) | |
| 630 | { | |
| 631 | //printf("K001604_reg_w (%d), %02X, %08X, %08X at %08X\n", chip, offset, data, mem_mask, cpu_get_pc(space->cpu)); | |
| 632 | } | |
| 633 | } | |
| 634 | ||
| 635 | READ32_HANDLER(K001604_reg_r) | |
| 636 | { | |
| 637 | int chip = get_cgboard_id(); | |
| 638 | ||
| 639 | switch (offset) | |
| 640 | { | |
| 641 | case 0x54/4: return mame_rand(space->machine) << 16; break; | |
| 642 | case 0x5c/4: return mame_rand(space->machine) << 16 | mame_rand(space->machine); break; | |
| 643 | } | |
| 644 | ||
| 645 | return K001604_reg[chip][offset]; | |
| 646 | } | |
| 647 | ||
| 648 | ||
| 649 | ||
| 650 | ||
| 651 | 240 | static void voodoo_vblank_0(running_device *device, int param) |
| 652 | 241 | { |
| 653 | 242 | cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE); |
| 654 | 243 | } |
| 655 | 244 | |
| 656 | static VIDEO_START( nwktr ) | |
| 657 | { | |
| 658 | K001604_vh_start(machine, 0); | |
| 659 | } | |
| 660 | 245 | |
| 661 | ||
| 662 | 246 | static VIDEO_UPDATE( nwktr ) |
| 663 | 247 | { |
| 664 | 248 | running_device *voodoo = devtag_get_device(screen->machine, "voodoo"); |
| 249 | running_device *k001604 = devtag_get_device(screen->machine, "k001604"); | |
| 665 | 250 | |
| 666 | 251 | bitmap_fill(bitmap, cliprect, screen->machine->pens[0]); |
| 667 | 252 | |
| 668 | 253 | voodoo_update(voodoo, bitmap, cliprect); |
| 669 | 254 | |
| 670 | | |
| 255 | k001604_draw_front_layer(k001604, bitmap, cliprect); | |
| 671 | 256 | |
| 672 | 257 | draw_7segment_led(bitmap, 3, 3, led_reg0); |
| 673 | 258 | draw_7segment_led(bitmap, 9, 3, led_reg1); |
| r7356 | r7357 | |
| 886 | 471 | |
| 887 | 472 | static ADDRESS_MAP_START( nwktr_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 888 | 473 | AM_RANGE(0x00000000, 0x003fffff) AM_RAM AM_BASE(&work_ram) /* Work RAM */ |
| 889 | AM_RANGE(0x74000000, 0x740000ff) AM_READWRITE( | |
| 474 | AM_RANGE(0x74000000, 0x740000ff) AM_DEVREADWRITE("k001604", k001604_reg_r, k001604_reg_w) | |
| 890 | 475 | AM_RANGE(0x74010000, 0x74017fff) AM_RAM_WRITE(paletteram32_w) AM_BASE_GENERIC(paletteram) |
| 891 | AM_RANGE(0x74020000, 0x7403ffff) AM_READWRITE(K001604_tile_r, K001604_tile_w) | |
| 892 | AM_RANGE(0x74040000, 0x7407ffff) AM_READWRITE(K001604_char_r, K001604_char_w) | |
| 476 | AM_RANGE(0x74020000, 0x7403ffff) AM_DEVREADWRITE("k001604", k001604_tile_r, k001604_tile_w) | |
| 477 | AM_RANGE(0x74040000, 0x7407ffff) AM_DEVREADWRITE("k001604", k001604_char_r, k001604_char_w) | |
| 893 | 478 | AM_RANGE(0x78000000, 0x7800ffff) AM_READWRITE(cgboard_dsp_shared_r_ppc, cgboard_dsp_shared_w_ppc) |
| 894 | 479 | AM_RANGE(0x780c0000, 0x780c0003) AM_READWRITE(cgboard_dsp_comm_r_ppc, cgboard_dsp_comm_w_ppc) |
| 895 | 480 | AM_RANGE(0x7d000000, 0x7d00ffff) AM_READ(sysreg_r) |
| r7356 | r7357 | |
| 1048 | 633 | "voodoo" |
| 1049 | 634 | }; |
| 1050 | 635 | |
| 636 | static const k001604_interface racingj_k001604_intf = | |
| 637 | { | |
| 638 | 0, 1, /* gfx index 1 & 2 */ | |
| 639 | 0, 1, /* layer_size, roz_size */ | |
| 640 | 0 /* slrasslt hack */ | |
| 641 | }; | |
| 642 | ||
| 643 | static const k001604_interface thrilld_k001604_intf = | |
| 644 | { | |
| 645 | 0, 1, /* gfx index 1 & 2 */ | |
| 646 | 1, 1, /* layer_size, roz_size */ | |
| 647 | 0 /* slrasslt hack */ | |
| 648 | }; | |
| 649 | ||
| 1051 | 650 | static MACHINE_RESET( nwktr ) |
| 1052 | 651 | { |
| 1053 | 652 | cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE); |
| r7356 | r7357 | |
| 1088 | 687 | |
| 1089 | 688 | MDRV_PALETTE_LENGTH(65536) |
| 1090 | 689 | |
| 1091 | MDRV_VIDEO_START(nwktr) | |
| 1092 | 690 | MDRV_VIDEO_UPDATE(nwktr) |
| 1093 | 691 | |
| 692 | MDRV_K001604_ADD("k001604", racingj_k001604_intf) | |
| 693 | ||
| 1094 | 694 | MDRV_K056800_ADD("k056800", nwktr_k056800_interface) |
| 1095 | 695 | |
| 1096 | 696 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| r7356 | r7357 | |
| 1104 | 704 | MDRV_ADC12138_ADD( "adc12138", nwktr_adc_interface ) |
| 1105 | 705 | MACHINE_DRIVER_END |
| 1106 | 706 | |
| 707 | static MACHINE_DRIVER_START( thrilld ) | |
| 708 | MDRV_IMPORT_FROM(nwktr) | |
| 709 | ||
| 710 | MDRV_DEVICE_REMOVE("k001604") | |
| 711 | MDRV_K001604_ADD("k001604", thrilld_k001604_intf) | |
| 712 | MACHINE_DRIVER_END | |
| 713 | ||
| 714 | ||
| 1107 | 715 | /*****************************************************************************/ |
| 1108 | 716 | |
| 1109 | 717 | static DRIVER_INIT(nwktr) |
| r7356 | r7357 | |
| 1192 | 800 | |
| 1193 | 801 | /*****************************************************************************/ |
| 1194 | 802 | |
| 1195 | GAME( 1998, racingj, 0, nwktr, nwktr, nwktr, ROT0, "Konami", "Racing Jam", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 1196 | GAME( 1999, racingj2, racingj, nwktr, nwktr, nwktr, ROT0, "Konami", "Racing Jam: Chapter 2", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 1197 | GAME( 1998, thrilld, 0, nwktr, nwktr, nwktr, ROT0, "Konami", "Thrill Drive", GAME_NOT_WORKING|GAME_IMPERFECT_SOUND ) | |
| 803 | GAME( 1998, racingj, 0, nwktr, nwktr, nwktr, ROT0, "Konami", "Racing Jam", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 804 | GAME( 1999, racingj2, racingj, nwktr, nwktr, nwktr, ROT0, "Konami", "Racing Jam: Chapter 2", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 805 | GAME( 1998, thrilld, 0, thrilld, nwktr, nwktr, ROT0, "Konami", "Thrill Drive", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) |
| r7356 | r7357 | |
|---|---|---|
| 1429 | 1429 | ROM_LOAD( "palce16v8h.u29", 0x0000, 0x0117, BAD_DUMP CRC(4a0a6f39) SHA1(57351e471649391c9abf110828fe2f128fe84eee) ) |
| 1430 | 1430 | ROM_END |
| 1431 | 1431 | |
| 1432 | GAME( 1994, aligator, 0, alighunt, alighunt, alighunt, ROT0, "Gaelco", "Alligator Hunt", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 1433 | GAME( 1994, aligatorun, aligator, alighunt, alighunt, alighunt, ROT0, "Gaelco", "Alligator Hunt (unprotected)", 0 ) | |
| 1432 | GAME( 1994, aligator, 0, alighunt, alighunt, alighunt, ROT0, "Gaelco", "Alligator Hunt", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 1433 | GAME( 1994, aligatorun,aligator,alighunt, alighunt, alighunt, ROT0, "Gaelco", "Alligator Hunt (unprotected)", 0 ) | |
| 1434 | 1434 | GAME( 1995, touchgo, 0, touchgo, touchgo, touchgo, ROT0, "Gaelco", "Touch & Go (World)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 1435 | 1435 | GAME( 1995, touchgon, touchgo, touchgo, touchgo, touchgo, ROT0, "Gaelco", "Touch & Go (Non North America)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 1436 | 1436 | GAME( 1995, touchgoe, touchgo, touchgo, touchgo, touchgo, ROT0, "Gaelco", "Touch & Go (earlier revision)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| r7356 | r7357 | |
|---|---|---|
| 272 | 272 | AM_RANGE(0x6800, 0x68ff) AM_READ(champbja_alt_protection_r) |
| 273 | 273 | ADDRESS_MAP_END |
| 274 | 274 | |
| 275 | static ADDRESS_MAP_START( exctsccb_main_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 275 | static ADDRESS_MAP_START( exctsccrb_main_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 276 | 276 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 277 | 277 | // AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share1") // MCU not used (though it's present on the board) |
| 278 | 278 | AM_RANGE(0x7000, 0x7001) AM_DEVWRITE("aysnd", ay8910_data_address_w) |
| r7356 | r7357 | |
| 753 | 753 | MACHINE_DRIVER_END |
| 754 | 754 | |
| 755 | 755 | /* Bootleg running on a modified Champion Baseball board */ |
| 756 | static MACHINE_DRIVER_START( exctsccb ) | |
| 756 | static MACHINE_DRIVER_START( exctsccrb ) | |
| 757 | 757 | |
| 758 | 758 | /* driver data */ |
| 759 | 759 | MDRV_DRIVER_DATA(champbas_state) |
| 760 | 760 | |
| 761 | 761 | /* basic machine hardware */ |
| 762 | 762 | MDRV_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) |
| 763 | MDRV_CPU_PROGRAM_MAP(exctsccb_main_map) | |
| 763 | MDRV_CPU_PROGRAM_MAP(exctsccrb_main_map) | |
| 764 | 764 | MDRV_CPU_VBLANK_INT("screen", irq0_line_assert) |
| 765 | 765 | |
| 766 | 766 | MDRV_CPU_ADD("sub", Z80, XTAL_18_432MHz/6) |
| r7356 | r7357 | |
| 1218 | 1218 | GAME( 1983, exctsccra, exctsccr, exctsccr, exctsccr, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (alternate music)", GAME_SUPPORTS_SAVE ) |
| 1219 | 1219 | GAME( 1983, exctsccrj, exctsccr, exctsccr, exctsccr, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan)", GAME_SUPPORTS_SAVE ) |
| 1220 | 1220 | GAME( 1983, exctsccrj2, exctsccr, exctsccr, exctsccr, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan set 2)", GAME_SUPPORTS_SAVE ) |
| 1221 | GAME( 1983, exctsccrb, exctsccr, exctsccb, | |
| 1221 | GAME( 1983, exctsccrb, exctsccr, exctsccrb, | |
| 1222 | 1222 | GAME( 1984, exctscc2, 0, exctsccr, exctsccr, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer II", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 8 | 8 | Here are the versions we have: |
| 9 | 9 | |
| 10 | 10 | arkanoid World version, probably an earlier revision |
| 11 | arknoidu | |
| 11 | arkanoidu | |
| 12 | 12 | inserted, NOT patched, so I don't think it's a bootleg |
| 13 | 13 | The 68705 code for this one was not available; I made it up from |
| 14 | 14 | the World version changing the level data pointer table. |
| 15 | arknoiuo | |
| 15 | arkanoiduo | |
| 16 | 16 | ROM a75-10.bin should be identical to the real World one. |
| 17 | 17 | (It only differs in the country byte from A75-11.ROM) |
| 18 | 18 | This version works fine with the real MCU ROM |
| 19 | 19 | arkatour Tournament version |
| 20 | 20 | The 68705 code for this one was not available; I made it up from |
| 21 | 21 | the World version changing the level data pointer table. |
| 22 | arknoidj | |
| 22 | arkanoidj | |
| 23 | 23 | The 68705 code for this one was not available; I made it up from |
| 24 | 24 | the World version changing the level data pointer table. |
| 25 | 25 | arkbl2 Bootleg of the early Japanese version. |
| r7356 | r7357 | |
| 224 | 224 | * affects ball speed at start of level (0x06 or 0x08) |
| 225 | 225 | * affects level 2 (same as normal version or same as level 30) |
| 226 | 226 | - You can select your starting level (between 1 and 30) |
| 227 | but they aren't displayed like in the original Japanese set we have ('arknoidj'). | |
| 227 | but they aren't displayed like in the original Japanese set we have ('arkanoidj'). | |
| 228 | 228 | - Level 30 differs from original Japanese version |
| 229 | 229 | - There seems to be code to edit levels (check code at 0x8082), but the routines |
| 230 | 230 | don't seem to be called anymore. |
| r7356 | r7357 | |
| 247 | 247 | * affects ball speed at start of level (0x04 or 0x06) |
| 248 | 248 | * affects level 2 (same as normal version or same as level 30) |
| 249 | 249 | - You can select your starting level (between 1 and 30) |
| 250 | but they aren't displayed like in the original Japanese set we have ('arknoidj'). | |
| 250 | but they aren't displayed like in the original Japanese set we have ('arkanoidj'). | |
| 251 | 251 | No "What round do you want to start from ?" message though. |
| 252 | 252 | - Level 30 differs from original Japanese version (it also differs from 'arkangc') |
| 253 | 253 | - The routine to handle the paddle is completely different as in 'arkangc' |
| r7356 | r7357 | |
| 278 | 278 | - "Continue" Dip Switch has been replaced by sort of "Debug" Dip Switch as in 'arkangc'; |
| 279 | 279 | however, this has no effect due to newly patched code at 0x06e9 ! |
| 280 | 280 | - You can select your starting level (between 1 and 30) |
| 281 | but they aren't displayed like in the original Japanese set we have ('arknoidj'). | |
| 281 | but they aren't displayed like in the original Japanese set we have ('arkanoidj'). | |
| 282 | 282 | - Levels 1, 2, 3, 4, 6, 7, 11, 14, 30, 31 and 32 differ from original Japanese version; |
| 283 | 283 | level 1 starts at a different offset (0x90a8 instead of 0xbf15). |
| 284 | 284 | - Complerely different initials on high-scores table, but scores and rounds |
| 285 | are the same as in the original Japanese set we have ('arknoidj'). | |
| 285 | are the same as in the original Japanese set we have ('arkanoidj'). | |
| 286 | 286 | - There seems to be code to edit levels (check code at 0x8082), but the routines |
| 287 | 287 | don't seem to be called anymore. |
| 288 | 288 | - Known bugs : |
| r7356 | r7357 | |
| 317 | 317 | - All reads from 0xf002 are patched. |
| 318 | 318 | - Reads bit 5 from 0xd008. |
| 319 | 319 | - You can select your starting level (between 1 and 30) but they aren't displayed |
| 320 | like in the original Japanese set we have ('arknoidj'). | |
| 320 | like in the original Japanese set we have ('arkanoidj'). | |
| 321 | 321 | - "Continue" Dip Switch has been replaced by sort of "Debug" Dip Switch : |
| 322 | 322 | * affects ball speed at start of level (0x06 or 0x08) |
| 323 | 323 | * affects level 2 (same as normal version or same as level 30) |
| 324 | 324 | - You can select your starting level (between 1 and 30) |
| 325 | but they aren't displayed like in the original Japanese set we have ('arknoidj'). | |
| 325 | but they aren't displayed like in the original Japanese set we have ('arkanoidj'). | |
| 326 | 326 | - Level 30 differs from original Japanese version (same as the one from 'arkangc2') |
| 327 | 327 | - Known bugs : |
| 328 | 328 | * You can go from one side of the screen to the other through the walls |
| r7356 | r7357 | |
| 345 | 345 | - Different "Lives" Dip Switch (check table at 0x9a28) |
| 346 | 346 | - Specific coinage (always 2C_1C) |
| 347 | 347 | - If Dip Switch is set, you can select your starting level (between 1 and 30) |
| 348 | but they aren't displayed like in the original Japanese set we have ('arknoidj'). | |
| 348 | but they aren't displayed like in the original Japanese set we have ('arkanoidj'). | |
| 349 | 349 | - Same level 30 as original Japanese version |
| 350 | 350 | - Known bugs : |
| 351 | 351 | * You can go from one side of the screen to the other through the walls |
| r7356 | r7357 | |
| 373 | 373 | * "20K 60K 60K+" or "20K" when you continue |
| 374 | 374 | - Different "Lives" Dip Switch (check table at 0x9a28) |
| 375 | 375 | - If Dip Switch is set, you can select your starting level (between 1 and 30) |
| 376 | but they aren't displayed like in the original Japanese set we have ('arknoidj'). | |
| 376 | but they aren't displayed like in the original Japanese set we have ('arkanoidj'). | |
| 377 | 377 | - Levels are based on the ones from "Arkanoid II". |
| 378 | 378 | - Known bugs : |
| 379 | 379 | * You can go from one side of the screen to the other through the walls |
| r7356 | r7357 | |
| 424 | 424 | TO DO (2006.09.12) : |
| 425 | 425 | |
| 426 | 426 | - Check the following Taito sets (adresses, routines and Dip Switches) : |
| 427 | * 'arkanoid' = 'arknoiuo' | |
| 428 | * 'arknoidj' | |
| 429 | * 'arknoidu' | |
| 427 | * 'arkanoid' = 'arkanoiduo' | |
| 428 | * 'arkanoidj' | |
| 429 | * 'arkanoidu' | |
| 430 | 430 | * 'arkatour' |
| 431 | 431 | - Add more notes about main addresses and routines in the Z80 |
| 432 | 432 | - Try to understand the problem with the MCU in the following sets : |
| r7356 | r7357 | |
| 498 | 498 | *************************************************************************** |
| 499 | 499 | |
| 500 | 500 | DIP locations verified for: |
| 501 | - arknoidj | |
| 501 | - arkanoidj | |
| 502 | 502 | - arkanoid |
| 503 | 503 | |
| 504 | 504 | ***************************************************************************/ |
| r7356 | r7357 | |
| 613 | 613 | INPUT_PORTS_END |
| 614 | 614 | |
| 615 | 615 | /* Different coinage and additional "Cabinet" Dip Switch */ |
| 616 | static INPUT_PORTS_START( arknoidj ) | |
| 616 | static INPUT_PORTS_START( arkanoidj ) | |
| 617 | 617 | PORT_INCLUDE( arkanoid ) |
| 618 | 618 | |
| 619 | 619 | PORT_MODIFY("DSW") |
| r7356 | r7357 | |
| 626 | 626 | INPUT_PORTS_END |
| 627 | 627 | |
| 628 | 628 | static INPUT_PORTS_START( ark1ball ) |
| 629 | PORT_INCLUDE( arknoidj ) | |
| 629 | PORT_INCLUDE( arkanoidj ) | |
| 630 | 630 | |
| 631 | 631 | PORT_MODIFY("DSW") |
| 632 | 632 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4") /* "ld a,$60" at 0x93bd and "ld a,$60" at 0x9c7f and 0x9c9b */ |
| r7356 | r7357 | |
| 639 | 639 | |
| 640 | 640 | /* Bootlegs do not read from the MCU */ |
| 641 | 641 | static INPUT_PORTS_START( arkatayt ) |
| 642 | PORT_INCLUDE( arknoidj ) | |
| 642 | PORT_INCLUDE( arkanoidj ) | |
| 643 | 643 | |
| 644 | 644 | PORT_MODIFY("SYSTEM") |
| 645 | 645 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) /* Some bootlegs need it to be 1 */ |
| r7356 | r7357 | |
| 1382 | 1382 | GAME( 1986, arkanoid, 0, arkanoid, arkanoid, 0, ROT90, "Taito Corporation Japan", "Arkanoid (World)", GAME_SUPPORTS_SAVE ) |
| 1383 | 1383 | GAME( 1986, arkanoidu, arkanoid, arkanoid, arkanoid, 0, ROT90, "Taito America Corporation (Romstar license)", "Arkanoid (US)", GAME_SUPPORTS_SAVE ) |
| 1384 | 1384 | GAME( 1986, arkanoiduo, arkanoid, arkanoid, arkanoid, 0, ROT90, "Taito America Corporation (Romstar license)", "Arkanoid (US, older)", GAME_SUPPORTS_SAVE ) |
| 1385 | GAME( 1986, arkanoidj, arkanoid, arkanoid, arknoidj, 0, ROT90, "Taito Corporation", "Arkanoid (Japan)", GAME_SUPPORTS_SAVE ) | |
| 1386 | GAME( 1986, arkmcubl, arkanoid, arkanoid, arknoidj, 0, ROT90, "bootleg", "Arkanoid (bootleg with MCU)", GAME_SUPPORTS_SAVE ) | |
| 1385 | GAME( 1986, arkanoidj, arkanoid, arkanoid, arkanoidj,0, ROT90, "Taito Corporation", "Arkanoid (Japan)", GAME_SUPPORTS_SAVE ) | |
| 1386 | GAME( 1986, arkmcubl, arkanoid, arkanoid, arkanoidj,0, ROT90, "bootleg", "Arkanoid (bootleg with MCU)", GAME_SUPPORTS_SAVE ) | |
| 1387 | 1387 | GAME( 1986, ark1ball, arkanoid, arkanoid, ark1ball, 0, ROT90, "bootleg", "Arkanoid (bootleg with MCU, harder)", GAME_SUPPORTS_SAVE ) |
| 1388 | 1388 | GAME( 1986, arkangc, arkanoid, bootleg, arkangc, arkangc, ROT90, "bootleg", "Arkanoid (Game Corporation bootleg, set 1)", GAME_SUPPORTS_SAVE ) |
| 1389 | 1389 | GAME( 1986, arkangc2, arkanoid, bootleg, arkangc2, arkangc2, ROT90, "bootleg", "Arkanoid (Game Corporation bootleg, set 2)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 1522 | 1522 | MDRV_CPU_PROGRAM_MAP(megasys1B_sound_map) |
| 1523 | 1523 | MACHINE_DRIVER_END |
| 1524 | 1524 | |
| 1525 | ||
| 1526 | static MACHINE_DRIVER_START( system_Bbl ) | |
| 1527 | ||
| 1528 | /* basic machine hardware */ | |
| 1529 | MDRV_CPU_ADD("maincpu", M68000, SYS_B_CPU_CLOCK) | |
| 1530 | MDRV_CPU_PROGRAM_MAP(megasys1B_map) | |
| 1531 | MDRV_CPU_VBLANK_INT_HACK(interrupt_B,INTERRUPT_NUM_B) | |
| 1532 | ||
| 1533 | MDRV_MACHINE_RESET(megasys1) | |
| 1534 | ||
| 1535 | /* video hardware */ | |
| 1536 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 1537 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1538 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 1539 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1540 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 1541 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) | |
| 1542 | ||
| 1543 | MDRV_GFXDECODE(ABC) | |
| 1544 | MDRV_PALETTE_LENGTH(1024) | |
| 1545 | ||
| 1546 | MDRV_PALETTE_INIT(megasys1) | |
| 1547 | MDRV_VIDEO_START(megasys1) | |
| 1548 | MDRV_VIDEO_UPDATE(megasys1) | |
| 1549 | MDRV_VIDEO_EOF(megasys1) | |
| 1550 | ||
| 1551 | /* sound hardware */ | |
| 1552 | MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") | |
| 1553 | ||
| 1554 | /* just the one OKI, used for sound and music */ | |
| 1555 | MDRV_SOUND_ADD("oki1", OKIM6295, OKI4_SOUND_CLOCK) | |
| 1556 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) | |
| 1557 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30) | |
| 1558 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30) | |
| 1559 | MACHINE_DRIVER_END | |
| 1560 | ||
| 1525 | 1561 | static MACHINE_DRIVER_START( system_B_hayaosi1 ) |
| 1526 | 1562 | |
| 1527 | 1563 | /* basic machine hardware */ |
| r7356 | r7357 | |
| 2332 | 2368 | ROM_LOAD( "rd.20n", 0x0000, 0x0200, CRC(1d877538) SHA1(a5be0dc65dcfc36fbba10d1fddbe155e24b6122f) ) |
| 2333 | 2369 | ROM_END |
| 2334 | 2370 | |
| 2335 | ||
| 2336 | 2371 | ROM_START( edfu ) |
| 2337 | 2372 | ROM_REGION( 0xc0000, "maincpu", 0 ) /* Main CPU Code: 00000-3ffff & 80000-bffff */ |
| 2338 | 2373 | ROM_LOAD16_BYTE( "edf5.b5", 0x000000, 0x020000, CRC(105094d1) SHA1(e962164836756bc20c2b5dc0032042a0219e82d8) ) |
| r7356 | r7357 | |
| 2370 | 2405 | ROM_END |
| 2371 | 2406 | |
| 2372 | 2407 | |
| 2408 | ROM_START( edfbl ) | |
| 2409 | ROM_REGION( 0xc0000, "maincpu", 0 ) /* Main CPU Code: 00000-3ffff & 80000-bffff */ | |
| 2410 | ROM_LOAD16_BYTE( "02.bin", 0x000000, 0x020000, CRC(19a0dfa0) SHA1(acd020fa42de9cd98e51fe92377a46846859797b) ) | |
| 2411 | ROM_CONTINUE ( 0x080000, 0x020000 ) | |
| 2412 | ROM_LOAD16_BYTE( "01.bin", 0x000001, 0x020000, CRC(fc893ad0) SHA1(6d7be560e2343f3943f52ccdae7bd255b7720b6e) ) | |
| 2413 | ROM_CONTINUE ( 0x080001, 0x020000 ) | |
| 2414 | ||
| 2415 | /* no 2nd 68k on this bootleg */ | |
| 2416 | ||
| 2417 | ROM_REGION( 0x080000, "gfx1", 0 ) /* Scroll 0 */ | |
| 2418 | ROM_LOAD( "07.bin", 0x000000, 0x040000, CRC(4495c228) SHA1(2193561e193e696c66f27fa186f27ffbbdcb1826) ) | |
| 2419 | ROM_LOAD( "06.bin", 0x040000, 0x040000, CRC(3e37f226) SHA1(b789c1d2159f54d7464239e111bd729e0582b89b) ) | |
| 2420 | ||
| 2421 | ROM_REGION( 0x080000, "gfx2", 0 ) /* Scroll 1 */ | |
| 2422 | ROM_LOAD( "03.bin", 0x000000, 0x040000, CRC(eea24345) SHA1(1ed690eb62b28cf6bbcb6fec7e8e39daaa340af3) ) | |
| 2423 | ROM_LOAD( "04.bin", 0x040000, 0x040000, CRC(2cfe9439) SHA1(c953f1cf16be444eef3dc389305733ac351559b6) ) | |
| 2424 | ||
| 2425 | ROM_REGION( 0x020000, "gfx3", 0 ) /* Scroll 2 */ | |
| 2426 | ROM_LOAD( "05.bin", 0x000000, 0x020000, CRC(96e38983) SHA1(a4fb94f15d9a9f7df1645be66fe3e179d0ebf765) ) | |
| 2427 | ||
| 2428 | ROM_REGION( 0x080000, "gfx4", 0 ) /* Sprites */ | |
| 2429 | ROM_LOAD( "09.bin", 0x000000, 0x040000, CRC(e89d27c0) SHA1(b95d7988f13c578f501dc6cf2a5109dbef2a4d6c) ) | |
| 2430 | ROM_LOAD( "08.bin", 0x040000, 0x040000, CRC(603ac969) SHA1(193144080d2cb5536980e5f0f7173fba470ab79f) ) | |
| 2431 | ||
| 2432 | ROM_REGION( 0x040000, "oki1", 0 ) /* Samples - non-banked sfx? */ | |
| 2433 | ROM_LOAD( "12.bin", 0x000000, 0x010000, CRC(e645f447) SHA1(5de3acc32a2211995ed1e9b4577063124b0db45a) ) | |
| 2434 | ||
| 2435 | ROM_REGION( 0x080000, "okibanks", 0 ) /* Samples - banked music? */ | |
| 2436 | ROM_LOAD( "11.bin", 0x000000, 0x040000, CRC(5a8896cb) SHA1(ffa529acc1842868d51c22acf2b6b5a6aa1a79b2) ) | |
| 2437 | ROM_LOAD( "10.bin", 0x040000, 0x040000, CRC(baa7c91b) SHA1(1f4d240a4059fad1d09d624275dfe2dffe950a47) ) | |
| 2438 | ||
| 2439 | ROM_REGION( 0x0200, "proms", 0 ) /* the bootleg has an 82s131 prom like the original, but it isn't confirmed to be the same yet */ | |
| 2440 | ROM_LOAD( "rd.20n", 0x0000, 0x0200, CRC(1d877538) SHA1(a5be0dc65dcfc36fbba10d1fddbe155e24b6122f) ) | |
| 2441 | ROM_END | |
| 2442 | ||
| 2373 | 2443 | /*************************************************************************** |
| 2374 | 2444 | |
| 2375 | 2445 | [ Hachoo! ] |
| r7356 | r7357 | |
| 3738 | 3808 | ip_select_values[4] = 0x24; |
| 3739 | 3809 | } |
| 3740 | 3810 | |
| 3811 | static READ16_HANDLER( edfbl_input_r ) | |
| 3812 | { | |
| 3813 | return 0xffff; | |
| 3814 | } | |
| 3815 | ||
| 3816 | static DRIVER_INIT( edfbl ) | |
| 3817 | { | |
| 3818 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xe0002, 0xe000b, 0, 0, edfbl_input_r); | |
| 3819 | } | |
| 3820 | ||
| 3821 | ||
| 3741 | 3822 | static DRIVER_INIT( hachoo ) |
| 3742 | 3823 | { |
| 3743 | 3824 | UINT16 *RAM; |
| r7356 | r7357 | |
| 3909 | 3990 | GAME( 1990, monkelf, avspirit, system_B, avspirit, monkelf, ROT0, "bootleg", "Monky Elf (Korean bootleg of Avenging Spirit)", GAME_NOT_WORKING ) |
| 3910 | 3991 | GAME( 1991, edf, 0, system_B, edf, edf, ROT0, "Jaleco", "E.D.F. : Earth Defense Force", 0 ) |
| 3911 | 3992 | GAME( 1991, edfu, edf, system_B, edf, edf, ROT0, "Jaleco", "E.D.F. : Earth Defense Force (North America)", 0 ) |
| 3993 | GAME( 1991, edfbl, edf, system_Bbl, edf, edfbl, ROT0, "Jaleco", "E.D.F. : Earth Defense Force (bootleg)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 3912 | 3994 | GAME( 1991, 64street, 0, system_C, 64street, 64street, ROT0, "Jaleco", "64th. Street - A Detective Story (World)", 0 ) |
| 3913 | 3995 | GAME( 1991, 64streetj,64street, system_C, 64street, 64street, ROT0, "Jaleco", "64th. Street - A Detective Story (Japan)", 0 ) |
| 3914 | 3996 | GAME( 1992, soldam, 0, system_A, soldam, soldam, ROT0, "Jaleco", "Soldam", 0 ) |
| r7356 | r7357 | |
|---|---|---|
| 89 | 89 | to the "test mode" (code at 0x0040de). |
| 90 | 90 | |
| 91 | 91 | |
| 92 | 2) 'crshrac2' | |
| 92 | 2) 'crshrace2' | |
| 93 | 93 | |
| 94 | 94 | - Even if there is code for it, there is NO possibility to select a 3 players |
| 95 | 95 | game due to code at 0x003796 which "invalidates" the previous reading of DSW 3 : |
| r7356 | r7357 | |
| 374 | 374 | INPUT_PORTS_END |
| 375 | 375 | |
| 376 | 376 | /* Same as 'crshrace', but additional "unknown" Dip Switch (see notes) */ |
| 377 | static INPUT_PORTS_START( crshrac2 ) | |
| 377 | static INPUT_PORTS_START( crshrace2 ) | |
| 378 | 378 | PORT_INCLUDE( crshrace ) |
| 379 | 379 | |
| 380 | 380 | PORT_MODIFY("DSW0") |
| r7356 | r7357 | |
| 603 | 603 | #endif |
| 604 | 604 | } |
| 605 | 605 | |
| 606 | static DRIVER_INIT( crshrac2 ) | |
| 606 | static DRIVER_INIT( crshrace2 ) | |
| 607 | 607 | { |
| 608 | 608 | #if CRSHRACE_3P_HACK |
| 609 | 609 | crshrace_patch_code(0x003796); |
| r7356 | r7357 | |
| 611 | 611 | } |
| 612 | 612 | |
| 613 | 613 | |
| 614 | GAME( 1993, crshrace, 0, crshrace, crshrace, crshrace, ROT270, "Video System Co.", "Lethal Crash Race (set 1)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 615 | GAME( 1993, crshrace2,crshrace, crshrace, crshrac2, crshrac2, ROT270, "Video System Co.", "Lethal Crash Race (set 2)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 614 | GAME( 1993, crshrace, 0, crshrace, crshrace, crshrace, ROT270, "Video System Co.", "Lethal Crash Race (set 1)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 615 | GAME( 1993, crshrace2, crshrace, crshrace, crshrace2, crshrace2, ROT270, "Video System Co.", "Lethal Crash Race (set 2)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 488 | 488 | PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" ) |
| 489 | 489 | INPUT_PORTS_END |
| 490 | 490 | |
| 491 | static INPUT_PORTS_START( airbustj ) | |
| 491 | static INPUT_PORTS_START( airbustrj ) | |
| 492 | 492 | PORT_INCLUDE(airbustr) |
| 493 | 493 | |
| 494 | 494 | PORT_MODIFY("DSW1") |
| r7356 | r7357 | |
| 688 | 688 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) |
| 689 | 689 | MACHINE_DRIVER_END |
| 690 | 690 | |
| 691 | static MACHINE_DRIVER_START( airbusb ) | |
| 691 | static MACHINE_DRIVER_START( airbustrb ) | |
| 692 | 692 | MDRV_IMPORT_FROM(airbustr) |
| 693 | 693 | MDRV_WATCHDOG_TIME_INIT(SEC(0)) // no protection device or watchdog |
| 694 | 694 | MACHINE_DRIVER_END |
| r7356 | r7357 | |
| 809 | 809 | /* Game Drivers */ |
| 810 | 810 | |
| 811 | 811 | GAME( 1990, airbustr, 0, airbustr, airbustr, airbustr, ROT0, "Kaneko (Namco license)", "Air Buster: Trouble Specialty Raid Unit (World)", GAME_SUPPORTS_SAVE ) // 891220 |
| 812 | GAME( 1990, airbustrj, airbustr, airbustr, airbustj, airbustr, ROT0, "Kaneko (Namco license)", "Air Buster: Trouble Specialty Raid Unit (Japan)", GAME_SUPPORTS_SAVE) // 891229 | |
| 813 | GAME( 1990, airbustrb, airbustr, airbusb, airbustj, 0, ROT0, "bootleg", "Air Buster: Trouble Specialty Raid Unit (bootleg)", GAME_SUPPORTS_SAVE) // based on Japan set (891229) | |
| 812 | GAME( 1990, airbustrj, airbustr, airbustr, airbustrj,airbustr, ROT0, "Kaneko (Namco license)", "Air Buster: Trouble Specialty Raid Unit (Japan)", GAME_SUPPORTS_SAVE) // 891229 | |
| 813 | GAME( 1990, airbustrb, airbustr, airbustrb,airbustrj,0, ROT0, "bootleg", "Air Buster: Trouble Specialty Raid Unit (bootleg)", GAME_SUPPORTS_SAVE) // based on Japan set (891229) |
| r7356 | r7357 | |
|---|---|---|
| 226 | 226 | MDRV_DRIVER_DATA(cball_state) |
| 227 | 227 | |
| 228 | 228 | /* basic machine hardware */ |
| 229 | MDRV_CPU_ADD("maincpu", M6800, 12096 | |
| 229 | MDRV_CPU_ADD("maincpu", M6800, XTAL_12_096MHz / 16) /* ? */ | |
| 230 | 230 | MDRV_CPU_PROGRAM_MAP(cpu_map) |
| 231 | 231 | |
| 232 | 232 | MDRV_MACHINE_START(cball) |
| r7356 | r7357 | |
|---|---|---|
| 25 | 25 | 95 Sailor Moon Banpresto BP945A 038 9437WX711 013 9346E7002 Z80 |
| 26 | 26 | 95 Donpachi Atlus AT-C01DP-2 038 9429WX727 013 8647-01 NMK 112 |
| 27 | 27 | 96 Air Gallet Banpresto BP962A 038 9437WX711 013 9346E7002 Z80 |
| 28 | 96 Hotdog Storm Marble | |
| 28 | 96 Hotdog Storm Marble ASTC9501 038 9341EX702 | |
| 29 | 29 | 97 Dodonpachi Atlus ATC03D2 ? |
| 30 | 30 | 98 Dangun Feveron Nihon System CV01 038 9808WX003 013 9807EX004 |
| 31 | 31 | 98 ESP Ra.De. Atlus ATC04 ? |
| r7356 | r7357 | |
| 4089 | 4089 | } |
| 4090 | 4090 | |
| 4091 | 4091 | |
| 4092 | static DRIVER_INIT( pwrins2j ) | |
| 4092 | static DRIVER_INIT( pwrinst2j ) | |
| 4093 | 4093 | { |
| 4094 | 4094 | cave_state *state = (cave_state *)machine->driver_data; |
| 4095 | 4095 | UINT8 *ROM = memory_region(machine, "audiocpu"); |
| r7356 | r7357 | |
| 4127 | 4127 | { |
| 4128 | 4128 | /* this patch fixes on of the moves, why is it needed? is the rom bad or is there another |
| 4129 | 4129 | problem? does the Japan set need it or not? */ |
| 4130 | DRIVER_INIT_CALL(pwrins2j); | |
| 4130 | DRIVER_INIT_CALL(pwrinst2j); | |
| 4131 | 4131 | |
| 4132 | 4132 | #if 1 //ROM PATCH |
| 4133 | 4133 | { |
| r7356 | r7357 | |
| 4213 | 4213 | ***************************************************************************/ |
| 4214 | 4214 | |
| 4215 | 4215 | GAME( 1994, pwrinst2, 0, pwrinst2, metmqstr, pwrinst2, ROT0, "Atlus/Cave", "Power Instinct 2 (US, Ver. 94/04/08)" , 0 ) |
| 4216 | GAME( 1994, pwrinst2j, pwrinst2, pwrinst2, metmqstr, pwrins2j, | |
| 4216 | GAME( 1994, pwrinst2j, pwrinst2, pwrinst2, metmqstr, pwrinst2j, | |
| 4217 | 4217 | GAME( 1994, mazinger, 0, mazinger, mazinger, mazinger, ROT90, "Banpresto/Dynamic Pl. Toei Animation", "Mazinger Z (International/Japan)" , 0 ) // region in eeprom |
| 4218 | 4218 | GAME( 1995, donpachi, 0, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (US)" , 0 ) |
| 4219 | 4219 | GAME( 1995, donpachij, donpachi, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (Japan)" , 0 ) |
| r7356 | r7357 | |
| 4221 | 4221 | GAME( 1995, donpachihk, donpachi, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (Hong Kong)" , 0 ) |
| 4222 | 4222 | GAME( 1995, metmqstr, 0, metmqstr, metmqstr, metmqstr, ROT0, "Banpresto/Pandorabox", "Metamoqester (International)" , 0 ) |
| 4223 | 4223 | GAME( 1995, nmaster, metmqstr, metmqstr, metmqstr, metmqstr, ROT0, "Banpresto/Pandorabox", "Oni - The Ninja Master (Japan)" , 0 ) |
| 4224 | GAME( 1995, plegends, 0, pwrinst2, metmqstr, pwrins2j, ROT0, "Atlus/Cave", "Power Instinct Legends (US, Ver. 95/06/20)" , 0 ) | |
| 4225 | GAME( 1995, plegendsj, plegends, pwrinst2, metmqstr, pwrins2j, ROT0, "Atlus/Cave", "Gouketsuji Ichizoku Saikyou Densetsu (Japan, Ver. 95/06/20)", 0 ) | |
| 4224 | GAME( 1995, plegends, 0, pwrinst2, metmqstr, pwrinst2j,ROT0, "Atlus/Cave", "Power Instinct Legends (US, Ver. 95/06/20)" , 0 ) | |
| 4225 | GAME( 1995, plegendsj, plegends, pwrinst2, metmqstr, pwrinst2j,ROT0, "Atlus/Cave", "Gouketsuji Ichizoku Saikyou Densetsu (Japan, Ver. 95/06/20)", 0 ) | |
| 4226 | 4226 | GAME( 1995, sailormn, 0, sailormn, sailormn, sailormn, ROT0, "Banpresto", "Pretty Soldier Sailor Moon (JUEHTK, Ver. 95/03/22B)" , 0 ) // region in eeprom |
| 4227 | 4227 | GAME( 1995, sailormno, sailormn, sailormn, sailormn, sailormn, ROT0, "Banpresto", "Pretty Soldier Sailor Moon (JUEHTK, Ver. 95/03/22)" , 0 ) // region in eeprom |
| 4228 | 4228 | GAME( 1996, agallet, 0, sailormn, sailormn, agallet, ROT270, "Banpresto / Gazelle", "Air Gallet (JUEHTK)" , 0 ) // board was taiwan, region in eeprom |
| r7356 | r7357 | |
|---|---|---|
| 295 | 295 | ((((state->coin1 / 10) << 4) | (state->coin1 % 10)) << 8); /* Coins */ |
| 296 | 296 | } |
| 297 | 297 | |
| 298 | static WRITE8_HANDLER( lastmis | |
| 298 | static WRITE8_HANDLER( lastmisn_i8751_w ) | |
| 299 | 299 | { |
| 300 | 300 | dec8_state *state = (dec8_state *)space->machine->driver_data; |
| 301 | 301 | state->i8751_return = 0; |
| r7356 | r7357 | |
| 681 | 681 | AM_RANGE(0x4000, 0xffff) AM_ROM |
| 682 | 682 | ADDRESS_MAP_END |
| 683 | 683 | |
| 684 | static ADDRESS_MAP_START( lastmis | |
| 684 | static ADDRESS_MAP_START( lastmisn_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 685 | 685 | AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("share1") |
| 686 | 686 | AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_split1_w) AM_SHARE("share3") AM_BASE_GENERIC(paletteram) |
| 687 | 687 | AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_split2_w) AM_SHARE("share4") AM_BASE_GENERIC(paletteram2) |
| r7356 | r7357 | |
| 694 | 694 | AM_RANGE(0x1805, 0x1805) AM_WRITE(buffer_spriteram_w) /* DMA */ |
| 695 | 695 | AM_RANGE(0x1806, 0x1806) AM_READ(i8751_h_r) |
| 696 | 696 | AM_RANGE(0x1807, 0x1807) AM_READWRITE(i8751_l_r, flip_screen_w) |
| 697 | AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmiss_scrollx_w) /* Scroll LSB */ | |
| 698 | AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmiss_scrolly_w) /* Scroll LSB */ | |
| 697 | AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmisn_scrollx_w) /* Scroll LSB */ | |
| 698 | AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmisn_scrolly_w) /* Scroll LSB */ | |
| 699 | 699 | AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w) |
| 700 | AM_RANGE(0x180d, 0x180d) AM_WRITE(lastmiss_control_w) /* Bank switch + Scroll MSB */ | |
| 701 | AM_RANGE(0x180e, 0x180f) AM_WRITE(lastmiss_i8751_w) | |
| 700 | AM_RANGE(0x180d, 0x180d) AM_WRITE(lastmisn_control_w) /* Bank switch + Scroll MSB */ | |
| 701 | AM_RANGE(0x180e, 0x180f) AM_WRITE(lastmisn_i8751_w) | |
| 702 | 702 | AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE_SIZE_MEMBER(dec8_state, videoram, videoram_size) |
| 703 | 703 | AM_RANGE(0x2800, 0x2fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) |
| 704 | 704 | AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2") |
| r7356 | r7357 | |
| 707 | 707 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 708 | 708 | ADDRESS_MAP_END |
| 709 | 709 | |
| 710 | static ADDRESS_MAP_START( lastmis | |
| 710 | static ADDRESS_MAP_START( lastmisn_sub_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 711 | 711 | AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("share1") |
| 712 | 712 | AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_split1_w) AM_SHARE("share3") |
| 713 | 713 | AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_split2_w) AM_SHARE("share4") |
| r7356 | r7357 | |
| 739 | 739 | AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w) |
| 740 | 740 | AM_RANGE(0x1805, 0x1805) AM_WRITE(buffer_spriteram_w) /* DMA */ |
| 741 | 741 | AM_RANGE(0x1807, 0x1807) AM_WRITE(flip_screen_w) |
| 742 | AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmiss_scrollx_w) /* Scroll LSB */ | |
| 743 | AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmiss_scrolly_w) /* Scroll LSB */ | |
| 742 | AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmisn_scrollx_w) /* Scroll LSB */ | |
| 743 | AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmisn_scrolly_w) /* Scroll LSB */ | |
| 744 | 744 | AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w) |
| 745 | 745 | AM_RANGE(0x180d, 0x180d) AM_WRITE(shackled_control_w) /* Bank switch + Scroll MSB */ |
| 746 | 746 | AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) |
| r7356 | r7357 | |
| 764 | 764 | AM_RANGE(0x1805, 0x1805) AM_WRITE(buffer_spriteram_w) /* DMA */ |
| 765 | 765 | AM_RANGE(0x1806, 0x1806) AM_READ(i8751_h_r) |
| 766 | 766 | AM_RANGE(0x1807, 0x1807) AM_READWRITE(i8751_l_r, flip_screen_w) |
| 767 | AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmiss_scrollx_w) /* Scroll LSB */ | |
| 768 | AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmiss_scrolly_w) /* Scroll LSB */ | |
| 767 | AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmisn_scrollx_w) /* Scroll LSB */ | |
| 768 | AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmisn_scrolly_w) /* Scroll LSB */ | |
| 769 | 769 | AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w) |
| 770 | 770 | AM_RANGE(0x180d, 0x180d) AM_WRITE(shackled_control_w) /* Bank switch + Scroll MSB */ |
| 771 | 771 | AM_RANGE(0x180e, 0x180f) AM_WRITE(shackled_i8751_w) |
| r7356 | r7357 | |
| 1493 | 1493 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 1494 | 1494 | INPUT_PORTS_END |
| 1495 | 1495 | |
| 1496 | static INPUT_PORTS_START( lastmsnj ) | |
| 1496 | static INPUT_PORTS_START( lastmisnj ) | |
| 1497 | 1497 | PORT_START("IN0") |
| 1498 | 1498 | PLAYER1_JOYSTICK |
| 1499 | 1499 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r7356 | r7357 | |
| 2294 | 2294 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) |
| 2295 | 2295 | MACHINE_DRIVER_END |
| 2296 | 2296 | |
| 2297 | static MACHINE_DRIVER_START( lastmis | |
| 2297 | static MACHINE_DRIVER_START( lastmisn ) | |
| 2298 | 2298 | |
| 2299 | 2299 | /* driver data */ |
| 2300 | 2300 | MDRV_DRIVER_DATA(dec8_state) |
| 2301 | 2301 | |
| 2302 | 2302 | /* basic machine hardware */ |
| 2303 | 2303 | MDRV_CPU_ADD("maincpu", M6809, 2000000) |
| 2304 | MDRV_CPU_PROGRAM_MAP(lastmis | |
| 2304 | MDRV_CPU_PROGRAM_MAP(lastmisn_map) | |
| 2305 | 2305 | |
| 2306 | 2306 | MDRV_CPU_ADD("sub", M6809, 2000000) |
| 2307 | MDRV_CPU_PROGRAM_MAP(lastmis | |
| 2307 | MDRV_CPU_PROGRAM_MAP(lastmisn_sub_map) | |
| 2308 | 2308 | |
| 2309 | 2309 | MDRV_CPU_ADD("audiocpu", M6502, 1500000) |
| 2310 | 2310 | MDRV_CPU_PROGRAM_MAP(ym3526_s_map) |
| r7356 | r7357 | |
| 2327 | 2327 | MDRV_GFXDECODE(shackled) |
| 2328 | 2328 | MDRV_PALETTE_LENGTH(1024) |
| 2329 | 2329 | |
| 2330 | MDRV_VIDEO_START(lastmiss) | |
| 2331 | MDRV_VIDEO_UPDATE(lastmiss) | |
| 2330 | MDRV_VIDEO_START(lastmisn) | |
| 2331 | MDRV_VIDEO_UPDATE(lastmisn) | |
| 2332 | 2332 | |
| 2333 | 2333 | /* sound hardware */ |
| 2334 | 2334 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r7356 | r7357 | |
| 2428 | 2428 | MDRV_GFXDECODE(shackled) |
| 2429 | 2429 | MDRV_PALETTE_LENGTH(1024) |
| 2430 | 2430 | |
| 2431 | MDRV_VIDEO_START(lastmiss) | |
| 2432 | MDRV_VIDEO_UPDATE(lastmiss) | |
| 2431 | MDRV_VIDEO_START(lastmisn) | |
| 2432 | MDRV_VIDEO_UPDATE(lastmisn) | |
| 2433 | 2433 | |
| 2434 | 2434 | /* sound hardware */ |
| 2435 | 2435 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r7356 | r7357 | |
| 3603 | 3603 | DRIVER_INIT_CALL( dec8 ); |
| 3604 | 3604 | } |
| 3605 | 3605 | |
| 3606 | static DRIVER_INIT( lastmis | |
| 3606 | static DRIVER_INIT( lastmisn ) | |
| 3607 | 3607 | { |
| 3608 | 3608 | UINT8 *ROM = memory_region(machine, "maincpu"); |
| 3609 | 3609 | memory_configure_bank(machine, "bank1", 0, 4, &ROM[0x10000], 0x4000); |
| r7356 | r7357 | |
| 3634 | 3634 | GAME( 1987, oscaru, oscar, oscar, oscaru, oscar, ROT0, "Data East USA", "Psycho-Nics Oscar (US)", GAME_SUPPORTS_SAVE ) |
| 3635 | 3635 | GAME( 1987, oscarj1, oscar, oscar, oscaru, oscar, ROT0, "Data East Corporation", "Psycho-Nics Oscar (Japan revision 1)", GAME_SUPPORTS_SAVE ) |
| 3636 | 3636 | GAME( 1987, oscarj2, oscar, oscar, oscaru, oscar, ROT0, "Data East Corporation", "Psycho-Nics Oscar (Japan revision 2)", GAME_SUPPORTS_SAVE ) |
| 3637 | GAME( 1986, lastmisn, 0, lastmiss, lastmisn, lastmiss, ROT270, "Data East USA", "Last Mission (US revision 6)", GAME_SUPPORTS_SAVE ) | |
| 3638 | GAME( 1986, lastmisno,lastmisn, lastmiss, lastmisn, lastmiss, ROT270, "Data East USA", "Last Mission (US revision 5)", GAME_SUPPORTS_SAVE ) | |
| 3639 | GAME( 1986, lastmisnj,lastmisn, lastmiss, lastmsnj, lastmiss, ROT270, "Data East Corporation", "Last Mission (Japan)", GAME_SUPPORTS_SAVE ) | |
| 3637 | GAME( 1986, lastmisn, 0, lastmisn, lastmisn, lastmisn, ROT270, "Data East USA", "Last Mission (US revision 6)", GAME_SUPPORTS_SAVE ) | |
| 3638 | GAME( 1986, lastmisno,lastmisn, lastmisn, lastmisn, lastmisn, ROT270, "Data East USA", "Last Mission (US revision 5)", GAME_SUPPORTS_SAVE ) | |
| 3639 | GAME( 1986, lastmisnj,lastmisn, lastmisn, lastmisnj, lastmisn, ROT270, "Data East Corporation", "Last Mission (Japan)", GAME_SUPPORTS_SAVE ) | |
| 3640 | 3640 | GAME( 1986, shackled, 0, shackled, shackled, shackled, ROT0, "Data East USA", "Shackled (US)", GAME_SUPPORTS_SAVE ) |
| 3641 | 3641 | GAME( 1986, breywood, shackled, shackled, shackled, shackled, ROT0, "Data East Corporation", "Breywood (Japan revision 2)", GAME_SUPPORTS_SAVE ) |
| 3642 | 3642 | GAME( 1987, csilver, 0, csilver, csilver, csilver, ROT0, "Data East Corporation", "Captain Silver (World)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 180 | 180 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) |
| 181 | 181 | INPUT_PORTS_END |
| 182 | 182 | |
| 183 | static INPUT_PORTS_START( crimfgtj ) | |
| 183 | static INPUT_PORTS_START( crimfghtj ) | |
| 184 | 184 | PORT_INCLUDE( crimfght ) |
| 185 | 185 | |
| 186 | 186 | PORT_MODIFY("DSW1") |
| r7356 | r7357 | |
| 427 | 427 | } |
| 428 | 428 | |
| 429 | 429 | GAME( 1989, crimfght, 0, crimfght, crimfght, 0, ROT0, "Konami", "Crime Fighters (US 4 players)", GAME_SUPPORTS_SAVE ) |
| 430 | GAME( 1989, crimfght2, crimfght, crimfght, crimfgtj, 0, ROT0, "Konami", "Crime Fighters (World 2 Players)", GAME_SUPPORTS_SAVE ) | |
| 431 | GAME( 1989, crimfghtj, crimfght, crimfght, crimfgtj, 0, ROT0, "Konami", "Crime Fighters (Japan 2 Players)", GAME_SUPPORTS_SAVE ) | |
| 430 | GAME( 1989, crimfght2, crimfght, crimfght, crimfghtj,0, ROT0, "Konami", "Crime Fighters (World 2 Players)", GAME_SUPPORTS_SAVE ) | |
| 431 | GAME( 1989, crimfghtj, crimfght, crimfght, crimfghtj,0, ROT0, "Konami", "Crime Fighters (Japan 2 Players)", GAME_SUPPORTS_SAVE ) |
| r7356 | r7357 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | Stephh's notes (based on the game M68000 code and some tests) : |
| 78 | 78 | |
| 79 | 1) 'bonzeadv', 'jigkmgri' and 'bonzeadu' | |
| 79 | 1) 'bonzeadv', 'jigkmgri' and 'bonzeadvu' | |
| 80 | 80 | |
| 81 | 81 | - Region stored at 0x03fffe.w |
| 82 | 82 | - Sets : |
| 83 | 83 | * 'bonzeadv' : region = 0x0002 |
| 84 | 84 | * 'jigkmgri' : region = 0x0000 |
| 85 | * 'bonzeadu' | |
| 85 | * 'bonzeadvu' | |
| 86 | 86 | - These 3 games are 100% the same, only region differs ! |
| 87 | 87 | - Coinage relies on the region (code at 0x02d344) : |
| 88 | 88 | * 0x0000 (Japan) and 0x0001 (US) use TAITO_COINAGE_JAPAN_OLD_LOC() |
| r7356 | r7357 | |
| 107 | 107 | but it is now unused due to "bra" instruction at 0x007572 |
| 108 | 108 | |
| 109 | 109 | |
| 110 | 2) 'bonzeado' | |
| 110 | 2) 'bonzeadvo' | |
| 111 | 111 | |
| 112 | 112 | - Region stored at 0x03fffe.w |
| 113 | 113 | - Sets : |
| 114 | * 'bonzeado' : region = 0x0002 | |
| 114 | * 'bonzeadvo' : region = 0x0002 | |
| 115 | 115 | - The only difference is that the following code is missing : |
| 116 | 116 | |
| 117 | 117 | 00D218: 08AD 0004 15DE bclr #$4, ($15de,A5) |
| r7356 | r7357 | |
|---|---|---|
| 155 | 155 | |
| 156 | 156 | static INPUT_PORTS_START( wrally ) |
| 157 | 157 | PORT_START("DSW") |
| 158 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) | |
| 158 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7,8") | |
| 159 | 159 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) |
| 160 | 160 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) |
| 161 | 161 | PORT_DIPSETTING( 0x0001, DEF_STR( Hard ) ) |
| 162 | 162 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) |
| 163 | PORT_DIPNAME( 0x0004, 0x0004, "Number of Joysticks" ) | |
| 163 | PORT_DIPNAME( 0x0004, 0x0004, "Number of Joysticks" ) PORT_DIPLOCATION("SW2:6") | |
| 164 | 164 | PORT_DIPSETTING( 0x0004, "2" ) |
| 165 | 165 | PORT_DIPSETTING( 0x0000, "1" ) |
| 166 | PORT_DIPNAME( 0x0018, 0x0018, "Control Configuration" ) | |
| 166 | PORT_DIPNAME( 0x0018, 0x0018, "Control Configuration" ) PORT_DIPLOCATION("SW2:4,5") | |
| 167 | 167 | PORT_DIPSETTING( 0x0018, DEF_STR( Joystick ) ) |
| 168 | 168 | PORT_DIPSETTING( 0x0010, "Pot Wheel" ) |
| 169 | PORT_DIPSETTING( 0x0000, "Opt Wheel" ) | |
| 170 | PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Demo_Sounds ) ) | |
| 169 | PORT_DIPSETTING( 0x0000, "Optical Wheel" ) | |
| 170 | PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3") | |
| 171 | 171 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) |
| 172 | 172 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 173 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Cabinet ) ) | |
| 173 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:2") | |
| 174 | 174 | PORT_DIPSETTING( 0x0040, DEF_STR( Upright ) ) |
| 175 | 175 | PORT_DIPSETTING( 0x0000, DEF_STR( Cocktail ) ) |
| 176 | PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) | |
| 177 | PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Coin_A ) ) | |
| 176 | PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) PORT_DIPLOCATION("SW2:1") | |
| 177 | PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:6,7,8") | |
| 178 | 178 | PORT_DIPSETTING( 0x0700, DEF_STR( 1C_1C ) ) |
| 179 | 179 | PORT_DIPSETTING( 0x0000, DEF_STR( 3C_4C ) ) |
| 180 | 180 | PORT_DIPSETTING( 0x0100, DEF_STR( 2C_3C ) ) |
| r7356 | r7357 | |
| 183 | 183 | PORT_DIPSETTING( 0x0400, DEF_STR( 1C_4C ) ) |
| 184 | 184 | PORT_DIPSETTING( 0x0300, DEF_STR( 1C_5C ) ) |
| 185 | 185 | PORT_DIPSETTING( 0x0200, DEF_STR( 1C_6C ) ) |
| 186 | PORT_DIPNAME( 0x3800, 0x3800, DEF_STR( Coin_B ) ) | |
| 186 | PORT_DIPNAME( 0x3800, 0x3800, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4,5") | |
| 187 | 187 | PORT_DIPSETTING( 0x1000, DEF_STR( 6C_1C ) ) |
| 188 | 188 | PORT_DIPSETTING( 0x1800, DEF_STR( 5C_1C ) ) |
| 189 | 189 | PORT_DIPSETTING( 0x2000, DEF_STR( 4C_1C ) ) |
| r7356 | r7357 | |
| 192 | 192 | PORT_DIPSETTING( 0x0800, DEF_STR( 3C_2C ) ) |
| 193 | 193 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_3C ) ) |
| 194 | 194 | PORT_DIPSETTING( 0x3800, DEF_STR( 1C_1C ) ) |
| 195 | PORT_DIPNAME( 0x4000, 0x4000, "Credit configuration" ) | |
| 195 | PORT_DIPNAME( 0x4000, 0x4000, "Credit configuration" ) PORT_DIPLOCATION("SW1:2") | |
| 196 | 196 | PORT_DIPSETTING( 0x4000, "Start 1C/Continue 1C" ) |
| 197 | 197 | PORT_DIPSETTING( 0x0000, "Start 2C/Continue 1C" ) |
| 198 | PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Free_Play ) ) | |
| 198 | PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:1") | |
| 199 | 199 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 200 | 200 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 201 | 201 |
| r7356 | r7357 | |
|---|---|---|
| 207 | 207 | return setenv(name, value, overwrite); |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | ||
| 211 | 210 | //============================================================ |
| 212 | 211 | // osd_get_clipboard_text |
| 213 | 212 | //============================================================ |
| r7356 | r7357 | |
| 308 | 307 | } |
| 309 | 308 | |
| 310 | 309 | //============================================================ |
| 310 | // MESS specific code below | |
| 311 | //============================================================ | |
| 312 | ||
| 313 | #ifdef MESS | |
| 314 | ||
| 315 | //============================================================ | |
| 311 | 316 | // osd_stat |
| 312 | 317 | //============================================================ |
| 313 | 318 | |
| r7356 | r7357 | |
| 383 | 388 | |
| 384 | 389 | return err; |
| 385 | 390 | } |
| 391 | ||
| 392 | #endif |
| r7356 | r7357 | |
|---|---|---|
| 273 | 273 | return result; |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | //============================================================ | |
| 277 | // MESS specific code below | |
| 278 | //============================================================ | |
| 276 | 279 | |
| 277 | 280 | //============================================================ |
| 278 | 281 | // get_clipboard_text_by_format |
| r7356 | r7357 | |
| 314 | 317 | } |
| 315 | 318 | |
| 316 | 319 | |
| 317 | ||
| 318 | 320 | //============================================================ |
| 319 | 321 | // convert_wide |
| 320 | 322 | //============================================================ |
| r7356 | r7357 | |
| 356 | 358 | return result; |
| 357 | 359 | } |
| 358 | 360 | |
| 361 | #ifdef MESS | |
| 362 | ||
| 359 | 363 | //============================================================ |
| 360 | 364 | // astring_from_utf8 |
| 361 | 365 | //============================================================ |
| r7356 | r7357 | |
| 548 | 552 | free(t_path); |
| 549 | 553 | return err; |
| 550 | 554 | } |
| 555 | ||
| 556 | #endif |
| r7356 | r7357 | |
|---|---|---|
| 227 | 227 | { |
| 228 | 228 | return setenv(name, value, overwrite); |
| 229 | 229 | } |
| 230 | ||
| 231 | ||
| 232 | //============================================================ | |
| 233 | // osd_get_clipboard_text | |
| 234 | // - used in MESS | |
| 235 | //============================================================ | |
| 236 | ||
| 237 | char *osd_get_clipboard_text(void) | |
| 238 | { | |
| 239 | char *result = NULL; | |
| 240 | ||
| 241 | return result; | |
| 242 | } |
| r7356 | r7357 | |
|---|---|---|
| 476 | 476 | $(OBJ)/emu/cpu/h6280/6280dasm.o : CDEFS += -D__STRICT_ANSI__ |
| 477 | 477 | endif # OS2 |
| 478 | 478 | |
| 479 | ifeq ($(TARGETOS),solaris) | |
| 480 | # solaris only has gcc-4.3 by default and is reporting a false positive | |
| 481 | $(OBJ)/emu/video/tms9927.o : CCOMFLAGS += -Wno-error | |
| 482 | endif # solaris | |
| 483 | ||
| 479 | 484 | # drawSDL depends on the core software renderer, so make sure it exists |
| 480 | 485 | $(SDLOBJ)/drawsdl.o : $(SRC)/emu/rendersw.c $(SDLSRC)/drawogl.c $(SDLSRC)/texcopy.c |
| 481 | 486 |
| r7356 | r7357 | |
|---|---|---|
| 124 | 124 | return setenv(name, value, overwrite); |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | ||
| 128 | 127 | #if defined(SDL_VIDEO_DRIVER_X11) && defined(SDLMAME_X11) |
| 129 | 128 | |
| 130 | 129 | //============================================================ |
| r7356 | r7357 | |
| 228 | 227 | #endif |
| 229 | 228 | |
| 230 | 229 | //============================================================ |
| 230 | // MESS specific code below | |
| 231 | //============================================================ | |
| 232 | ||
| 233 | #ifdef MESS | |
| 234 | ||
| 235 | //============================================================ | |
| 231 | 236 | // osd_stat |
| 232 | 237 | //============================================================ |
| 233 | 238 | |
| r7356 | r7357 | |
| 241 | 246 | struct stat64 st; |
| 242 | 247 | #endif |
| 243 | 248 | |
| 244 | #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) | |
| 249 | #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) | |
| 245 | 250 | err = stat(path, &st); |
| 246 | 251 | #else |
| 247 | 252 | err = stat64(path, &st); |
| r7356 | r7357 | |
| 303 | 308 | |
| 304 | 309 | return err; |
| 305 | 310 | } |
| 311 | ||
| 312 | #endif |
| r7356 | r7357 | |
|---|---|---|
| 350 | 350 | sdlinput_poll(machine); |
| 351 | 351 | check_osd_inputs(machine); |
| 352 | 352 | |
| 353 | if (machine->debug_flags & DEBUG_FLAG_ENABLED) | |
| 353 | if ((machine->debug_flags & DEBUG_FLAG_OSD_ENABLED) != 0) | |
| 354 | 354 | debugwin_update_during_game(machine); |
| 355 | 355 | } |
| 356 | 356 | |
| r7356 | r7357 | |
| 631 | 631 | #endif |
| 632 | 632 | |
| 633 | 633 | |
| 634 | if ( | |
| 634 | if (machi | |
| 635 | 635 | video_config.windowed = TRUE; |
| 636 | 636 | |
| 637 | 637 | stemp = options_get_string(mame_options(), SDLOPTION_EFFECT); |
| r7356 | r7357 | |
|---|---|---|
| 27 | 27 | #include <fcntl.h> |
| 28 | 28 | #include <unistd.h> |
| 29 | 29 | #include <stdio.h> |
| 30 | #include <stdlib.h> | |
| 31 | 30 | #include <errno.h> |
| 32 | 31 | |
| 33 | 32 | // MAME headers |
| r7356 | r7357 | |
| 56 | 55 | struct _osd_file |
| 57 | 56 | { |
| 58 | 57 | int handle; |
| 59 | char | |
| 58 | char | |
| 60 | 59 | }; |
| 61 | 60 | |
| 62 | 61 | |
| 63 | 62 | //============================================================ |
| 64 | // | |
| 63 | // Prototyp | |
| 65 | 64 | //============================================================ |
| 66 | 65 | |
| 67 | 66 | static UINT32 create_path_recursive(char *path); |
| r7356 | r7357 | |
| 109 | 108 | UINT32 access; |
| 110 | 109 | const char *src; |
| 111 | 110 | char *dst; |
| 112 | ||
| 111 | | |
| 113 | 112 | struct stat st; |
| 114 | 113 | #else |
| 115 | 114 | struct stat64 st; |
| r7356 | r7357 | |
| 193 | 192 | #endif |
| 194 | 193 | |
| 195 | 194 | // attempt to open the file |
| 196 | ||
| 195 | | |
| 197 | 196 | (*file)->handle = open(tmpstr, access, 0666); |
| 198 | 197 | #else |
| 199 | 198 | (*file)->handle = open64(tmpstr, access, 0666); |
| r7356 | r7357 | |
| 216 | 215 | // attempt to reopen the file |
| 217 | 216 | if (error == NO_ERROR) |
| 218 | 217 | { |
| 219 | | |
| 218 | | |
| 220 | 219 | (*file)->handle = open(tmpstr, access, 0666); |
| 221 | 220 | #else |
| 222 | 221 | (*file)->handle = open64(tmpstr, access, 0666); |
| r7356 | r7357 | |
| 236 | 235 | } |
| 237 | 236 | |
| 238 | 237 | // get the file size |
| 239 | ||
| 238 | | |
| 240 | 239 | fstat((*file)->handle, &st); |
| 241 | 240 | #else |
| 242 | 241 | fstat64((*file)->handle, &st); |
| r7356 | r7357 | |
| 384 | 383 | return FALSE; // no, no way, huh-uh, forget it |
| 385 | 384 | } |
| 386 | 385 | |
| 387 | /*============================================================ */ | |
| 388 | /* osd_is_path_separator */ | |
| 389 | /*============================================================ */ | |
| 386 | //============================================================ | |
| 387 | // osd_is_path_separator | |
| 388 | //============================================================ | |
| 390 | 389 | |
| 391 | 390 | static int osd_is_path_separator(char c) |
| 392 | 391 | { |
| 393 | ||
| 392 | | |
| 394 | 393 | } |
| 395 | 394 | |
| 396 | /*============================================================ */ | |
| 397 | /* osd_is_absolute_path */ | |
| 398 | /*============================================================ */ | |
| 395 | //============================================================ | |
| 396 | // osd_is_absolute_path | |
| 397 | //============================================================ | |
| 398 | ||
| 399 | 399 | int osd_is_absolute_path(const char *path) |
| 400 | 400 | { |
| 401 | ||
| 401 | | |
| 402 | 402 | |
| 403 | if (osd_is_path_separator(path[0])) | |
| 404 | result = TRUE; | |
| 403 | if (osd_is_path_separator(path[0])) | |
| 404 | result = TRUE; | |
| 405 | 405 | #if !defined(SDLMAME_WIN32) && !defined(SDLMAME_OS2) |
| 406 | else if (path[0] == '.') | |
| 407 | result = TRUE; | |
| 406 | else if (path[0] == '.') | |
| 407 | result = TRUE; | |
| 408 | 408 | #else |
| 409 | 409 | #ifndef UNDER_CE |
| 410 | 410 | else if (*path && path[1] == ':') |
| 411 | 411 | result = TRUE; |
| 412 | 412 | #endif |
| 413 | 413 | #endif |
| 414 | else | |
| 415 | result = FALSE; | |
| 416 | return result; | |
| 414 | else | |
| 415 | result = FALSE; | |
| 416 | ||
| 417 | return result; | |
| 417 | 418 | } |
| r7356 | r7357 | |
|---|---|---|
| 14 | 14 | #include <SDL/SDL_version.h> |
| 15 | 15 | |
| 16 | 16 | // standard includes |
| 17 | #ifdef MESS | |
| 18 | #include <unistd.h> | |
| 19 | #endif | |
| 20 | #ifdef SDLMAME_OS2 | |
| 21 | #define INCL_DOS | |
| 22 | #include <os2.h> | |
| 23 | #endif | |
| 17 | 24 | |
| 18 | 25 | // MAME headers |
| 19 | 26 | #include "osdepend.h" |
| r7356 | r7357 | |
| 36 | 43 | #include <X11/Xutil.h> |
| 37 | 44 | #endif |
| 38 | 45 | |
| 39 | #ifdef SDLMAME_OS2 | |
| 40 | #define INCL_DOS | |
| 41 | #include <os2.h> | |
| 42 | ||
| 43 | void MorphToPM() | |
| 44 | { | |
| 45 | PPIB pib; | |
| 46 | PTIB tib; | |
| 47 | ||
| 48 | DosGetInfoBlocks(&tib, &pib); | |
| 49 | ||
| 50 | // Change flag from VIO to PM: | |
| 51 | if (pib->pib_ultype==2) pib->pib_ultype = 3; | |
| 52 | } | |
| 53 | #endif | |
| 54 | ||
| 55 | 46 | //============================================================ |
| 56 | // LOCAL VARIABLES | |
| 57 | //============================================================ | |
| 58 | ||
| 59 | #include <unistd.h> | |
| 60 | ||
| 61 | //============================================================ | |
| 62 | 47 | // OPTIONS |
| 63 | 48 | //============================================================ |
| 64 | 49 | |
| r7356 | r7357 | |
| 74 | 59 | #endif // MACOSX |
| 75 | 60 | #endif // INI_PATH |
| 76 | 61 | |
| 62 | ||
| 63 | //============================================================ | |
| 64 | // Global variables | |
| 65 | //============================================================ | |
| 66 | ||
| 67 | //============================================================ | |
| 68 | // Local variables | |
| 69 | //============================================================ | |
| 70 | ||
| 77 | 71 | static const options_entry mame_sdl_options[] = |
| 78 | 72 | { |
| 79 | 73 | { SDLOPTION_INIPATH, INI_PATH, 0, "path to ini files" }, |
| r7356 | r7357 | |
| 233 | 227 | }; |
| 234 | 228 | |
| 235 | 229 | //============================================================ |
| 230 | // OS2 specific | |
| 231 | //============================================================ | |
| 232 | ||
| 233 | #ifdef SDLMAME_OS2 | |
| 234 | void MorphToPM() | |
| 235 | { | |
| 236 | PPIB pib; | |
| 237 | PTIB tib; | |
| 238 | ||
| 239 | DosGetInfoBlocks(&tib, &pib); | |
| 240 | ||
| 241 | // Change flag from VIO to PM: | |
| 242 | if (pib->pib_ultype==2) pib->pib_ultype = 3; | |
| 243 | } | |
| 244 | #endif | |
| 245 | ||
| 246 | //============================================================ | |
| 236 | 247 | // main |
| 237 | 248 | //============================================================ |
| 238 | 249 | |
| r7356 | r7357 | |
| 527 | 538 | defines_verbose(); |
| 528 | 539 | |
| 529 | 540 | if (!SDLMAME_HAS_DEBUGGER) |
| 530 | if ( | |
| 541 | if (machi | |
| 531 | 542 | { |
| 532 | 543 | mame_printf_error("sdlmame: -debug not supported on X11-less builds\n\n"); |
| 533 | 544 | osd_exit(machine); |
| r7356 | r7357 | |
|---|---|---|
| 1 | 1 | #ifndef _osdsdl_h_ |
| 2 | 2 | #define _osdsdl_h_ |
| 3 | 3 | |
| 4 | /* Notes | |
| 5 | ||
| 6 | - Known bugs: | |
| 7 | ||
| 8 | * SDL1.3/X11: Some compound keys, e.g. "'" are not supported by SDL driver | |
| 9 | * SDL1.3: sdlvideofps does not take -numscreens>1 into account. | |
| 10 | * SDL1.3/WIN32: crashes with -rd d3d | |
| 11 | * SDL1.3/WIN32: resizing does not work | |
| 12 | ||
| 13 | - fixed returning (w,h) = (0,0) in get_max_bounds | |
| 14 | - new video driver "sdl13" utilitizing SDL texture and line | |
| 15 | drawing support. Accelerated drivers like directfb now | |
| 16 | may attain opengl speed. DirectFB does with a radeon card. | |
| 17 | The driver determines which pixel formats perform best and | |
| 18 | converts textures to these pixel formats. | |
| 19 | Supported options: | |
| 20 | -waitvsync | |
| 21 | -filter | |
| 22 | -prescale | |
| 23 | Supported renderdrivers: | |
| 24 | X11: opengl, software, x11 (no artwork!) | |
| 25 | DirectFB: directfb, software, opengl (special setup, slow) | |
| 26 | Windows: software, gdi (no artwork) | |
| 27 | - SDL1.3: Clear bck when moving | |
| 28 | - SDL1.3: now compiles on win32 | |
| 29 | - SDL1.3: Support screen refresh rates, provided the sdl video | |
| 30 | layer supports them (e.g. X11). | |
| 31 | - Use video_config.waitvsync (previously option was queried) | |
| 32 | - -video soft / -sm now supports -prescale | |
| 33 | - removed reqwidth, reqheight from sdl_monitor_info; not used anywhere | |
| 34 | - removed layerconfig from sdl_video_config; not used anywhere | |
| 35 | ||
| 36 | - fixed yuv issues (firefox) / this was a bug I introduced | |
| 37 | - removed deprecat.h from output.c | |
| 38 | - Separated keyboard and mouse initialization into separate functions | |
| 39 | - added _FORTIFY_SOURCE to verbose compiler define output. | |
| 40 | - remove MAX_CPU from debugwin.c | |
| 41 | - fixed vsync handling in SDL1.3 in soft/opengl drivers | |
| 42 | - "waitvsync" also supported by "soft" driver in SDL1.3 | |
| 43 | - multiple mice and keyboards supported in SDL1.3 | |
| 44 | - support for DISTRO= make option | |
| 45 | - got rid of "-joymap" and "-joymap_file" | |
| 46 | - add -joy_idx[0-7] -keyb_idx[0-7] -mouse_idx[0-7] which | |
| 47 | specify, which device is allocated to to e.g. Mouse 1, Mouse 2, ... | |
| 48 | - moved define of THREAD_COOPERATIVE into sdl.mak and renamed to | |
| 49 | NO_THREAD_COOPERATIVE. Changed references to #ifndef | |
| 50 | - define NO_DEBUGGER in sdl.mak | |
| 51 | - Solaris now uses -DNO_AFFINITY_NP | |
| 52 | - added machine to window_info, removed deprecat.h from drawogl.c | |
| 53 | ||
| 54 | - For DEBUG=1 builds, disable input grapping while windowed | |
| 55 | - Fixed WIN32 compile | |
| 56 | Wrote setenv function since mingw does not provide one. | |
| 57 | Implemented osd_event_* as inline functions for win32 build. | |
| 58 | We should at some point merge sdlwork.c and winwork.c and push it | |
| 59 | to the core, letting sdlsync.c provide the necessary details. | |
| 60 | - Removed keybled.c and references | |
| 61 | - Added output.c and output.h. These will look for a fifo or file | |
| 62 | /tmp/sdlmame_out and write output notifiers to it. | |
| 63 | Added a sample client ledutil.sh to src/osd/sdl which turns | |
| 64 | leds on and off and provides a debug (log) facility. | |
| 65 | - removed os2work.c | |
| 66 | ||
| 67 | - replaced window->render_lock with event window->rendered_event | |
| 68 | For multiple windows and "-mt", the old code would allow filling up | |
| 69 | the workqueue with 1000s of entries, since the lock would not block while | |
| 70 | another window is rendered. The osd_event establishes a barrier which | |
| 71 | is only freed if the last window blit operation has finished. | |
| 72 | - Set SDL_VIDEO_GL_DRIVER if -gl_lib is given. The SDL directfb driver is picky about | |
| 73 | this. Added reminder: FIXME: move lib loading code from drawogl.c here. This may be | |
| 74 | used to disable opengl if no library was loaded. | |
| 75 | - SDL1.3/video=opengl: Fixed windows not being updated after another window was resized | |
| 76 | - for -verbose, output some information about renderer (-video soft) | |
| 77 | - initialize mouse_enabled with option "-mouse". Affects both SDL1.2 and SDL1.3 | |
| 78 | This will hide the mouse if you specify "-mouse". | |
| 79 | - SDL1.2: added blitmode "async" which sets SDL_ASYNCBLIT | |
| 80 | - SDL1.2: removed blitmodes "hwbest" and "hwblit" | |
| 81 | - added blitmode "hwbest" for antialiased and smoothed scaling now that the | |
| 82 | directfb driver supports it. This is also supported by the 1.3 opengl | |
| 83 | render backend | |
| 84 | - added sdlinput_release_keys to cope with lost keyboard events in SDL1.3 | |
| 85 | - some identing in drawogl.c | |
| 86 | - rename SDL_* macros to SDLMAME_* (avoid name clashes) | |
| 87 | - got rid of VIDEO_SCALE_MODE constants. Scale modes are now handled in drawsdl.c. | |
| 88 | Starting mame with eg. -video soft -sm yuy2 on X11 no longer crashes. | |
| 89 | - some more changes to input.c to avoid resize loops (issue for directfb) | |
| 90 | ||
| 91 | - working ui mouse inputs for SDL1.2 and SDL1.3 incl. yuv modes | |
| 92 | - added blitmode "hwblit" (SDL1.3) for rgb hardware scaling | |
| 93 | - rename "-yuvmode" option to "-scalemode" | |
| 94 | - rename yuv_mode and derivatives to scale_mode | |
| 95 | - moved extra_flags into sdl_info | |
| 96 | - moved callbacks indow sdl_window_info | |
| 97 | - made a number of flags (e.g. yuvmode) window relative | |
| 98 | - changing of yuvmodes and opengl scale effects is working with SDL 1.3 | |
| 99 | - improved fullscreen handling | |
| 100 | - removed HAS_WINDOW_MENU - this has no effect nowhere | |
| 101 | - removed underscores in header defines, e.g. __SDL_SYNC__ ==> __SDLSYNC__ | |
| 102 | - added SDLMAME_HAS_DEBUGGER define | |
| 103 | - removed #if 0 inw window.c | |
| 104 | - added option "-audiodriver" to specify the SDL audio driver | |
| 105 | - added option "-videodriver" to specify the SDL video driver | |
| 106 | - added option "-renderdriver" to specify the SDL renderer driver | |
| 107 | - changed environment SDLMAME_GL_LIB into option -gl_lib | |
| 108 | - added some more SDL_ENV defines | |
| 109 | - move keymap reading into separate function | |
| 110 | - SDL_EnableUNICODE for all builds (not only MESS) | |
| 111 | - SDL1.3 : Mouse & text input for ui | |
| 112 | ||
| 113 | - removed osd_event_wait_multiple from sdlsync.h | |
| 114 | - removed some includes not needed | |
| 115 | - reorganized texcopy/scale2x | |
| 116 | - removed effect.h | |
| 117 | - removed effect_func.h | |
| 118 | - indenting | |
| 119 | - put osd_copyfile, osd_stat into #ifdef MESS | |
| 120 | - added code which implements events without the need | |
| 121 | for pthreads. This is commented out, since | |
| 122 | owever, it horribly fails, if | |
| 123 | threads > num processors as is the case if you | |
| 124 | enable "-mt" | |
| 125 | - rename mame_bitmap to bitmap_t | |
| 126 | - introduced define OSDWORK_CALLBACK to prototype and | |
| 127 | define functions to be passed to sdlwork.c | |
| 128 | ||
| 129 | - fixes from judge for warnings / may reappear (glade) | |
| 130 | - more warnings fixed / may reappear (glade) | |
| 131 | - moved osdefs.h into sdlprefix.h | |
| 132 | - removed osdefs.h | |
| 133 | - finally removed sdlmisc.h | |
| 134 | ||
| 135 | - create drawogl.c and moved ogl relevant stuff there | |
| 136 | - draw.window_init() now called after window creation | |
| 137 | - removed window.opengl flag | |
| 138 | - added sdl_window_info as parameter to all functions in window.h | |
| 139 | - rename SDL_VERSIONNUM to SDL_VERSION_ATLEAST | |
| 140 | - removed all uclock stuff in sdlmisc.[ch] | |
| 141 | - minor cleanups | |
| 142 | ||
| 143 | - fixed compile issues against SDL13 | |
| 144 | - fixed input issues with SDL13 | |
| 145 | - stricter checks for USE_OPENGL, e.g. for options | |
| 146 | - move sdlvideo_loadgl to window.c, rename it to sdlwindow_loadgl and make it static | |
| 147 | - moved yuv_blit.c into drawsdl.c | |
| 148 | - renamed compute_blit_surface_size to sdlwindow_blit_surface_size | |
| 149 | - renamed drawsdl_destroy_all_textures to drawogl_destroy_all_textures and | |
| 150 | moved it to _sdl_draw_callbacks | |
| 151 | - removed print_colums | |
| 152 | - rename misc.h to sdlmisc.h | |
| 153 | - moved some includes from .h to .c | |
| 154 | - rename led_init to sdlled_init for consistency | |
| 155 | - rename sdl_init_audio to sdlaudio_init for consistency | |
| 156 | - fixed some indentation issues | |
| 157 | - removed ticker.h & dirty.h | |
| 158 | ||
| 159 | - changed all [f]printf to mame_printf_verbose|error|warning | |
| 160 | - removed obsolete frameskipping code | |
| 161 | - removed obsolete throttle code | |
| 162 | - removed fastforward | |
| 163 | - removed framestorun | |
| 164 | - introduced SDLOPTION constants for a number of options | |
| 165 | - add more verbose info for YUV | |
| 166 | ||
| 167 | - removed dirty.h | |
| 168 | - removed ticker.h | |
| 169 | ||
| 170 | - remove win_trying_to_quit | |
| 171 | - changed win_use_mouse to static use_mouse | |
| 172 | - removed win_key_trans_table | |
| 173 | - removed keyboard typematic definitions from input.h | |
| 174 | - made sdl_monitor_list static | |
| 175 | - removed hwstretch (sdl_video_config) | |
| 176 | - removed syncrefresh (sdl_video_config) | |
| 177 | - removed triplebuf (sdl_video_config) | |
| 178 | - removed sdl_has_menu | |
| 179 | - fixed memory_leak (window.c) | |
| 180 | ||
| 181 | - moved prototypes from drawsdl.c to window.h | |
| 182 | - removed joystick calibration code | |
| 183 | - "#if 0" code which is unreachable | |
| 184 | - "#if 0" code which is never used | |
| 185 | - moved pick_best_mode to window.c | |
| 186 | - removed pause_brightness option | |
| 187 | - added more SDLOPTION_ defines | |
| 188 | ||
| 189 | - renamed void yuv_lookup_init to drawsdl_yuv_init (global namespace) | |
| 190 | - rmoved some obsolete code | |
| 191 | - add SDL1.3 compatibility | |
| 192 | ||
| 193 | - fixed some compile issues | |
| 194 | - moved clear_surface into window thread | |
| 195 | - got SDL1.3 -mt working - still crashing on exit | |
| 196 | ||
| 197 | - removed "digital" option | |
| 198 | - removed device selection options | |
| 199 | - added more SDLOPTION defines | |
| 200 | */ | |
| 201 | ||
| 202 | 4 | //============================================================ |
| 203 | 5 | // System dependent defines |
| 204 | 6 | //============================================================ |
| r7356 | r7357 | |
|---|---|---|
| 214 | 214 | vsize.x = size.x-pos.x; |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | /* FIXME: This does not really work */ | |
| 217 | 218 | { |
| 218 | 219 | GdkGeometry x; |
| 219 | 220 | x.max_width = size.x*dvc->fixedfont_width; |
| r7356 | r7357 | |
|---|---|---|
| 43 | 43 | #define INVPATHSEPCH '\\' |
| 44 | 44 | #endif |
| 45 | 45 | |
| 46 | struct _osd_directory | |
| 47 | { | |
| 48 | osd_directory_entry ent; | |
| 49 | 46 | #if defined(SDLMAME_DARWIN) || defined(SDLMAME_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) |
| 50 | struct dirent *data; | |
| 47 | typedef struct dirent sdl_dirent; | |
| 48 | typedef struct stat sdl_stat; | |
| 49 | #define sdl_readdir readdir | |
| 50 | #define sdl_stat_fn stat | |
| 51 | 51 | #else |
| 52 | struct dirent64 *data; | |
| 52 | typedef struct dirent64 sdl_dirent; | |
| 53 | typedef struct stat64 sdl_stat; | |
| 54 | #define sdl_readdir readdir64 | |
| 55 | #define sdl_stat_fn stat64 | |
| 53 | 56 | #endif |
| 57 | ||
| 58 | #define HAS_DT_XXX defined(SDLMAME_LINUX) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN) | |
| 59 | ||
| 60 | struct _osd_directory | |
| 61 | { | |
| 62 | osd_directory_entry ent; | |
| 63 | sdl_dirent *data; | |
| 54 | 64 | DIR *fd; |
| 55 | 65 | char *path; |
| 56 | 66 | }; |
| r7356 | r7357 | |
| 61 | 71 | char *p = ret; |
| 62 | 72 | |
| 63 | 73 | strcpy(p, path); |
| 64 | p += strlen(path); | |
| 74 | p += strlen(path); | |
| 65 | 75 | *p++ = PATHSEPCH; |
| 66 | 76 | strcpy(p, file); |
| 67 | return ret; | |
| 77 | return ret; | |
| 68 | 78 | } |
| 69 | 79 | |
| 70 | 80 | |
| 71 | #if | |
| 81 | #if H | |
| 72 | 82 | static osd_dir_entry_type get_attributes_enttype(int attributes) |
| 73 | 83 | { |
| 74 | 84 | if (attributes == DT_DIR) |
| r7356 | r7357 | |
| 80 | 90 | |
| 81 | 91 | static osd_dir_entry_type get_attributes_stat(const char *file) |
| 82 | 92 | { |
| 83 | #if defined(SDLMAME_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_OS2) | |
| 84 | struct stat st; | |
| 85 | if(stat(file, &st)) | |
| 93 | sdl_stat st; | |
| 94 | if(sdl_stat_fn(file, &st)) | |
| 86 | 95 | return (osd_dir_entry_type) 0; |
| 87 | #else | |
| 88 | struct stat64 st; | |
| 89 | if(stat64(file, &st)) | |
| 90 | return ENTTYPE_NONE; | |
| 91 | #endif | |
| 92 | 96 | |
| 93 | 97 | if (S_ISDIR(st.st_mode)) |
| 94 | 98 | return ENTTYPE_DIR; |
| r7356 | r7357 | |
| 99 | 103 | |
| 100 | 104 | static UINT64 osd_get_file_size(const char *file) |
| 101 | 105 | { |
| 102 | #if defined(SDLMAME_DARWIN) || defined(SDLMAME_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) | |
| 103 | struct stat st; | |
| 104 | if(stat(file, &st)) | |
| 106 | sdl_stat st; | |
| 107 | if(sdl_stat_fn(file, &st)) | |
| 105 | 108 | return 0; |
| 106 | #else | |
| 107 | struct stat64 st; | |
| 108 | if(stat64(file, &st)) | |
| 109 | return 0; | |
| 110 | #endif | |
| 111 | 109 | return st.st_size; |
| 112 | 110 | } |
| 113 | 111 | |
| r7356 | r7357 | |
| 186 | 184 | const osd_directory_entry *osd_readdir(osd_directory *dir) |
| 187 | 185 | { |
| 188 | 186 | char *temp; |
| 189 | #if defined(SDLMAME_DARWIN) || defined(SDLMAME_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) | |
| 190 | dir->data = readdir(dir->fd); | |
| 191 | #else | |
| 192 | dir->data = readdir64(dir->fd); | |
| 193 | #endif | |
| 187 | dir->data = sdl_readdir(dir->fd); | |
| 194 | 188 | |
| 195 | 189 | if (dir->data == NULL) |
| 196 | 190 | return NULL; |
| 197 | 191 | |
| 198 | 192 | dir->ent.name = dir->data->d_name; |
| 199 | 193 | temp = build_full_path(dir->path, dir->data->d_name); |
| 200 | #if | |
| 194 | #if H | |
| 201 | 195 | dir->ent.type = get_attributes_enttype(dir->data->d_type); |
| 202 | 196 | #else |
| 203 | 197 | dir->ent.type = get_attributes_stat(temp); |
| r7356 | r7357 | |
|---|---|---|
| 45 | 45 | #else |
| 46 | 46 | |
| 47 | 47 | |
| 48 | static int clamp[256+128+128] = { 255 }; | |
| 48 | static int clamp_lu[256+128+128] = { 255 }; | |
| 49 | 49 | static int coff_cr[256][2] = { {0, 0} }; |
| 50 | 50 | static int coff_cb[256][2] = { {0, 0} }; |
| 51 | 51 | |
| r7356 | r7357 | |
| 54 | 54 | int i; |
| 55 | 55 | for (i=0;i<128;i++) |
| 56 | 56 | { |
| 57 | clamp[i] = 0; | |
| 58 | clamp[i + 256 + 128] = 255; | |
| 57 | clamp_lu[i] = 0; | |
| 58 | clamp_lu[i + 256 + 128] = 255; | |
| 59 | 59 | } |
| 60 | 60 | for (i=0;i<256;i++) |
| 61 | 61 | { |
| 62 | clamp[i + 128] = i; | |
| 62 | clamp_lu[i + 128] = i; | |
| 63 | 63 | |
| 64 | 64 | coff_cr[i][0] = + 409 * i - 56992; |
| 65 | 65 | coff_cr[i][1] = - 208 * i; |
| r7356 | r7357 | |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | INLINE int | |
| 71 | INLINE int clamp(int x) { return (const int) clamp_lu[(x >> 8) + 128] ; } | |
| 72 | 72 | |
| 73 | 73 | INLINE UINT32 ycc_to_rgb(unsigned y, unsigned cb, unsigned cr) |
| 74 | 74 | { |
| r7356 | r7357 | |
| 78 | 78 | r = (const int) coff_cr[cr][0]; // 409 * cr - 56992; |
| 79 | 79 | g = (const int) coff_cb[cb][0] + (const int) coff_cr[cr][1]; //- 100 * cb - 208 * cr + 34784; |
| 80 | 80 | b = (const int) coff_cb[cb][1]; //+ 516 * cb - 70688; |
| 81 | return 0xff000000 | ( | |
| 81 | return 0xff000000 | (clamp(r + common)<<16) | (clamp(g + common)<<8) | (clamp(b + common)); | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | #endif |
| r7356 | r7357 | |
| 135 | 135 | UINT32 *dst; |
| 136 | 136 | UINT16 *src; |
| 137 | 137 | |
| 138 | if (clamp[0]>0) | |
| 138 | if (clamp_lu[0]>0) | |
| 139 | 139 | init_clamp(); |
| 140 | 140 | |
| 141 | 141 | // loop over Y |
| r7356 | r7357 | |
| 176 | 176 | UINT16 *src; |
| 177 | 177 | int lookup[256]; |
| 178 | 178 | |
| 179 | if (clamp[0]>0) | |
| 179 | if (clamp_lu[0]>0) | |
| 180 | 180 | init_clamp(); |
| 181 | 181 | |
| 182 | 182 | /* preprocess lookup */ |
| r7356 | r7357 | |
| 212 | 212 | int y2 = (const int) lookup[(srcpix1 >> 8)]; |
| 213 | 213 | |
| 214 | 214 | |
| 215 | *dst++ = 0xff000000 | (CLSH(r + y1)<<16) | (CLSH(g + y1)<<8) | (CLSH(b + y1)); | |
| 216 | *dst++ = 0xff000000 | (CLSH(r + y2)<<16) | (CLSH(g + y2)<<8) | (CLSH(b + y2)); | |
| 215 | *dst++ = 0xff000000 | (clamp(r + y1)<<16) | (clamp(g + y1)<<8) | (clamp(b + y1)); | |
| 216 | *dst++ = 0xff000000 | (clamp(r + y2)<<16) | (clamp(g + y2)<<8) | (clamp(b + y2)); | |
| 217 | 217 | #endif |
| 218 | 218 | } |
| 219 | 219 | |
| r7356 | r7357 | |
| 224 | 224 | #endif |
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | #undef CLSH | |
| 228 | 227 | |
| 229 | 228 | #endif |
| 230 | 229 |
| r7356 | r7357 | |
|---|---|---|
| 1116 | 1116 | // register the mice |
| 1117 | 1117 | sdlinput_register_mice(machine); |
| 1118 | 1118 | |
| 1119 | if (machine->debug_flags & DEBUG_FLAG_ENABLED) | |
| 1119 | if (machine->debug_flags & DEBUG_FLAG_OSD_ENABLED) | |
| 1120 | 1120 | { |
| 1121 | 1121 | mame_printf_warning("Debug Build: Disabling input grab for -debug\n"); |
| 1122 | 1122 | mouse_enabled = 0; |
| r7356 | r7357 | |
| 1592 | 1592 | switch (typedesc->type) |
| 1593 | 1593 | { |
| 1594 | 1594 | // configurable UI mode switch |
| 1595 | case IPT_UI_TOGGLE_UI: | |
| 1595 | case IPT_UI_TOGGLE_UI: | |
| 1596 | 1596 | uimode = (const char *)options_get_string(mame_options(), SDLOPTION_UIMODEKEY); |
| 1597 | 1597 | if(!strcmp(uimode,"auto")) { |
| 1598 | 1598 | #if defined(__APPLE__) && defined(__MACH__) |
| r7356 | r7357 | |
|---|---|---|
| 5 | 5 | work. |
| 6 | 6 | - if you are using wine on unix be sure to disable wintab32.dll |
| 7 | 7 | |
| 8 | Known bugs: | |
| 9 | =========== | |
| 10 | ||
| 11 | * SDL1.3/X11: Some compound keys, e.g. "'" are not supported by SDL driver | |
| 12 | * SDL1.3: sdlvideofps does not take -numscreens>1 into account. | |
| 13 | * SDL1.3/WIN32: crashes with -rd d3d | |
| 14 | * SDL1.3/WIN32: resizing does not work | |
| 15 | ||
| 8 | 16 | Build SDL 1.3 from SVN |
| 9 | 17 | ====================== |
| 10 | 18 |
| r7356 | r7357 | |
|---|---|---|
| 506 | 506 | ASSERT_WINDOW_THREAD(); |
| 507 | 507 | |
| 508 | 508 | // if we are in debug mode, never go full screen |
| 509 | if ( | |
| 509 | if (w | |
| 510 | 510 | return NULL; |
| 511 | 511 | |
| 512 | 512 | // If we are going fullscreen (leaving windowed) remember our windowed size |
| r7356 | r7357 | |
| 638 | 638 | #if (SDL_VERSION_ATLEAST(1,3,0)) |
| 639 | 639 | // do not do mouse capture if the debugger's enabled to avoid |
| 640 | 640 | // the possibility of losing control |
| 641 | if (! | |
| 641 | if (!(machi | |
| 642 | 642 | { |
| 643 | 643 | //FIXME: SDL1.3: really broken: the whole SDL code |
| 644 | 644 | // will only work correct with relative mouse movements ... |
| r7356 | r7357 | |
| 661 | 661 | #else |
| 662 | 662 | // do not do mouse capture if the debugger's enabled to avoid |
| 663 | 663 | // the possibility of losing control |
| 664 | if (! | |
| 664 | if (!(machi | |
| 665 | 665 | { |
| 666 | 666 | if ( window->fullscreen || sdlinput_should_hide_mouse(machine) ) |
| 667 | 667 | { |
| r7356 | r7357 | |
|---|---|---|
| 810 | 810 | void osd_break_into_debugger(const char *message); |
| 811 | 811 | |
| 812 | 812 | |
| 813 | /*----------------------------------------------------------------------------- | |
| 814 | MESS specific code below | |
| 815 | -----------------------------------------------------------------------------*/ | |
| 816 | ||
| 817 | /*----------------------------------------------------------------------------- | |
| 818 | osd_get_clipboard_text: retrieves text from the clipboard | |
| 819 | ||
| 820 | Return value: | |
| 821 | ||
| 822 | the returned string needs to be free()-ed! | |
| 823 | ||
| 824 | -----------------------------------------------------------------------------*/ | |
| 825 | char *osd_get_clipboard_text(void); | |
| 826 | ||
| 827 | ||
| 828 | #ifdef MESS | |
| 813 | 829 | /*************************************************************************** |
| 814 | 830 | DIRECTORY INTERFACES |
| 815 | 831 | ***************************************************************************/ |
| r7356 | r7357 | |
| 854 | 870 | ***************************************************************************/ |
| 855 | 871 | |
| 856 | 872 | /*----------------------------------------------------------------------------- |
| 857 | osd_get_clipboard_text: retrieves text from the clipboard | |
| 858 | ||
| 859 | Return value: | |
| 860 | ||
| 861 | the returned string needs to be free()-ed! | |
| 862 | ||
| 863 | -----------------------------------------------------------------------------*/ | |
| 864 | char *osd_get_clipboard_text(void); | |
| 865 | ||
| 866 | /*----------------------------------------------------------------------------- | |
| 867 | 873 | osd_get_volume_name: retrieves the volume name |
| 868 | 874 | |
| 869 | 875 | Parameters: |
| r7356 | r7357 | |
| 876 | 882 | |
| 877 | 883 | -----------------------------------------------------------------------------*/ |
| 878 | 884 | const char *osd_get_volume_name(int idx); |
| 885 | #endif | |
| 879 | 886 | |
| 880 | 887 | #endif /* __OSDEPEND_H__ */ |
| r7356 | r7357 | |
|---|---|---|
| 339 | 339 | const char *stemp; |
| 340 | 340 | |
| 341 | 341 | // thread priority |
| 342 | if (! | |
| 342 | if (!(machi | |
| 343 | 343 | SetThreadPriority(GetCurrentThread(), options_get_int(mame_options(), WINOPTION_PRIORITY)); |
| 344 | 344 | |
| 345 | 345 | // ensure we get called on the way out |
| r7356 | r7357 | |
|---|---|---|
| 137 | 137 | SetForegroundWindow(win_window_list->hwnd); |
| 138 | 138 | |
| 139 | 139 | // possibly create the debug window, but don't show it yet |
| 140 | if ( | |
| 140 | if (machi | |
| 141 | 141 | debugwin_init_windows(); |
| 142 | 142 | } |
| 143 | 143 | |
| r7356 | r7357 | |
| 406 | 406 | video_config.numscreens = options_get_int(mame_options(), WINOPTION_NUMSCREENS); |
| 407 | 407 | |
| 408 | 408 | // if we are in debug mode, never go full screen |
| 409 | if ( | |
| 409 | if (machi | |
| 410 | 410 | video_config.windowed = TRUE; |
| 411 | 411 | stemp = options_get_string(mame_options(), WINOPTION_EFFECT); |
| 412 | 412 | if (strcmp(stemp, "none") != 0) |
| r7356 | r7357 | |
|---|---|---|
| 301 | 301 | assert(GetCurrentThreadId() == main_threadid); |
| 302 | 302 | |
| 303 | 303 | // possibly kill the debug window |
| 304 | if ( | |
| 304 | if (machi | |
| 305 | 305 | debugwin_destroy_windows(); |
| 306 | 306 | |
| 307 | 307 | // free all the windows |
| r7356 | r7357 | |
| 386 | 386 | assert(GetCurrentThreadId() == main_threadid); |
| 387 | 387 | |
| 388 | 388 | // if we're running, disable some parts of the debugger |
| 389 | if (ingame && (machine->debug_flags & DEBUG_FLAG_ENABLED) != 0) | |
| 389 | if (ingame && (machine->debug_flags & DEBUG_FLAG_OSD_ENABLED) != 0) | |
| 390 | 390 | debugwin_update_during_game(machine); |
| 391 | 391 | |
| 392 | 392 | // remember the last time we did this |
| r7356 | r7357 | |
| 514 | 514 | assert(GetCurrentThreadId() == main_threadid); |
| 515 | 515 | |
| 516 | 516 | // if we are in debug mode, never go full screen |
| 517 | if (options_get_bool(mame_options(), OPTION_DEBUG)) | |
| 518 | return; | |
| 517 | for (window = win_window_list; window != NULL; window = window->next) | |
| 518 | if (window->machine->debug_flags & DEBUG_FLAG_OSD_ENABLED) | |
| 519 | return; | |
| 519 | 520 | |
| 520 | 521 | // toggle the window mode |
| 521 | 522 | video_config.windowed = !video_config.windowed; |
| r7356 | r7357 | |
|---|---|---|
| 24 | 24 | #include "express.h" |
| 25 | 25 | #include "debugvw.h" |
| 26 | 26 | #include "debugger.h" |
| 27 | #include "debugint/debugint.h" | |
| 27 | 28 | #include "uiinput.h" |
| 28 | 29 | #include <ctype.h> |
| 29 | 30 | |
| r7356 | r7357 | |
| 674 | 675 | |
| 675 | 676 | /* clear the memory modified flag and wait */ |
| 676 | 677 | global->memory_modified = FALSE; |
| 677 | osd_wait_for_debugger(device, firststop); | |
| 678 | if (device->machine->debug_flags & DEBUG_FLAG_OSD_ENABLED) | |
| 679 | osd_wait_for_debugger(device, firststop); | |
| 680 | else if (device->machine->debug_flags & DEBUG_FLAG_ENABLED) | |
| 681 | debugint_wait_for_debugger(device, firststop); | |
| 678 | 682 | firststop = FALSE; |
| 679 | 683 | |
| 680 | 684 | /* if something modified memory, update the screen */ |
| r7356 | r7357 | |
| 2000 | 2004 | running_machine *machine = device->machine; |
| 2001 | 2005 | debugcpu_private *global = machine->debugcpu_data; |
| 2002 | 2006 | |
| 2003 | /* clear out all global flags by default */ | |
| 2004 | machine->debug_flags = DEBUG_FLAG_ENABLED; | |
| 2007 | /* clear out global flags by default, keep DEBUG_FLAG_OSD_ENABLED */ | |
| 2008 | machine->debug_flags &= DEBUG_FLAG_OSD_ENABLED; | |
| 2009 | machine->debug_flags |= DEBUG_FLAG_ENABLED; | |
| 2005 | 2010 | |
| 2006 | 2011 | /* if we are ignoring this CPU, or if events are pending, we're done */ |
| 2007 | 2012 | if ((info->flags & DEBUG_FLAG_OBSERVING) == 0 || mame_is_scheduled_event_pending(machine) || mame_is_save_or_load_pending(machine)) |
| r7356 | r7357 | |
|---|---|---|
| 274 | 274 | { |
| 275 | 275 | fatalerror("Am29000 instruction MMU translation enabled!"); |
| 276 | 276 | } |
| 277 | return 0; | |
| 277 | 278 | } |
| 278 | 279 | |
| 279 | 280 | /*************************************************************************** |
| r7356 | r7357 | |
|---|---|---|
| 116 | 116 | ***************************************************************************/ |
| 117 | 117 | |
| 118 | 118 | /* Official Intel MCS-48 parts */ |
| 119 | CPU_GET_INFO( i8021 ); /* 1k internal ROM, 64 bytes internal RAM */ | |
| 120 | CPU_GET_INFO( i8022 ); /* 2k internal ROM, 128 bytes internal RAM */ | |
| 119 | CPU_GET_INFO( i8021 ); /* 1k internal ROM, 64 bytes internal RAM */ | |
| 120 | CPU_GET_INFO( i8022 ); /* 2k internal ROM, 128 bytes internal RAM */ | |
| 121 | 121 | CPU_GET_INFO( i8035 ); /* external ROM, 64 bytes internal RAM */ |
| 122 | 122 | CPU_GET_INFO( i8048 ); /* 1k internal ROM, 64 bytes internal RAM */ |
| 123 | 123 | CPU_GET_INFO( i8648 ); /* 1k internal OTP ROM, 64 bytes internal RAM */ |
| r7356 | r7357 | |
|---|---|---|
| 1236 | 1236 | |
| 1237 | 1237 | |
| 1238 | 1238 | #------------------------------------------------- |
| 1239 | # Panasonic MN10200 | |
| 1240 | #------------------------------------------------- | |
| 1241 | ||
| 1242 | ifneq ($(filter MN10200,$(CPUS)),) | |
| 1243 | OBJDIRS += $(CPUOBJ)/mn10200 | |
| 1244 | CPUOBJS += $(CPUOBJ)/mn10200/mn10200.o | |
| 1245 | DASMOBJS += $(CPUOBJ)/mn10200/mn102dis.o | |
| 1246 | endif | |
| 1247 | ||
| 1248 | $(CPUOBJ)/mn10200/mn10200.o: $(CPUSRC)/mn10200/mn10200.c \ | |
| 1249 | $(CPUSRC)/mn10200/mn10200.h | |
| 1250 | ||
| 1251 | ||
| 1252 | #------------------------------------------------- | |
| 1239 | 1253 | # Saturn |
| 1240 | 1254 | #------------------------------------------------- |
| 1241 | 1255 |
| r7356 | r7357 | |
|---|---|---|
| 2813 | 2813 | { |
| 2814 | 2814 | UINT32 address, ea; |
| 2815 | 2815 | UINT8 modrm = FETCH(cpustate); |
| 2816 | I386_SREG seg; | |
| 2817 | 2816 | |
| 2818 | 2817 | switch( (modrm >> 3) & 0x7 ) |
| 2819 | 2818 | { |
| r7356 | r7357 | |
| 2865 | 2864 | CYCLES(cpustate,CYCLES_LLDT_MEM); |
| 2866 | 2865 | } |
| 2867 | 2866 | cpustate->ldtr.segment = READ16(cpustate,ea); |
| 2868 | memset(&seg, 0, sizeof(seg)); | |
| 2869 | seg.selector = cpustate->ldtr.segment; | |
| 2870 | i386_load_protected_mode_segment(cpustate,&seg); | |
| 2871 | cpustate->ldtr.limit = seg.limit; | |
| 2872 | cpustate->ldtr.base = seg.base; | |
| 2873 | 2867 | } |
| 2874 | 2868 | else |
| 2875 | 2869 | { |
| r7356 | r7357 | |
|---|---|---|
| 2652 | 2652 | { |
| 2653 | 2653 | UINT32 address, ea; |
| 2654 | 2654 | UINT8 modrm = FETCH(cpustate); |
| 2655 | I386_SREG seg; | |
| 2656 | 2655 | |
| 2657 | 2656 | switch( (modrm >> 3) & 0x7 ) |
| 2658 | 2657 | { |
| r7356 | r7357 | |
| 2704 | 2703 | CYCLES(cpustate,CYCLES_LLDT_MEM); |
| 2705 | 2704 | } |
| 2706 | 2705 | cpustate->ldtr.segment = READ32(cpustate,ea); |
| 2707 | memset(&seg, 0, sizeof(seg)); | |
| 2708 | seg.selector = cpustate->ldtr.segment; | |
| 2709 | i386_load_protected_mode_segment(cpustate,&seg); | |
| 2710 | cpustate->ldtr.limit = seg.limit; | |
| 2711 | cpustate->ldtr.base = seg.base; | |
| 2712 | 2706 | } |
| 2713 | 2707 | else |
| 2714 | 2708 | { |
| r0 | r7357 | |
|---|---|---|
| 1 | /* | |
| 2 | Panasonic MN10200 emulator | |
| 3 | ||
| 4 | Written by Olivier Galibert | |
| 5 | MAME conversion by R. Belmont | |
| 6 | ||
| 7 | */ | |
| 8 | ||
| 9 | #pragma once | |
| 10 | ||
| 11 | #ifndef MN10200_H | |
| 12 | #define MN10200_H | |
| 13 | ||
| 14 | enum | |
| 15 | { | |
| 16 | MN10200_PC, | |
| 17 | MN10200_PSW, | |
| 18 | MN10200_MDR, | |
| 19 | MN10200_D0, | |
| 20 | MN10200_D1, | |
| 21 | MN10200_D2, | |
| 22 | MN10200_D3, | |
| 23 | MN10200_A0, | |
| 24 | MN10200_A1, | |
| 25 | MN10200_A2, | |
| 26 | MN10200_A3, | |
| 27 | MN10200_NMICR, | |
| 28 | MN10200_IAGR | |
| 29 | }; | |
| 30 | ||
| 31 | enum | |
| 32 | { | |
| 33 | MN10200_PORT0, | |
| 34 | MN10200_PORT1, | |
| 35 | MN10200_PORT2, | |
| 36 | MN10200_PORT3, | |
| 37 | MN10200_PORT4 | |
| 38 | }; | |
| 39 | ||
| 40 | CPU_GET_INFO( mn10200 ); | |
| 41 | #define CPU_MN10200 CPU_GET_INFO_NAME( mn10200 ) | |
| 42 | ||
| 43 | CPU_DISASSEMBLE( mn10200 ); | |
| 44 | ||
| 45 | #endif |
| r0 | r7357 | |
|---|---|---|
| 1 | /* | |
| 2 | Panasonic MN10200 emulator | |
| 3 | ||
| 4 | Written by Olivier Galibert | |
| 5 | MAME conversion by R. Belmont | |
| 6 | ||
| 7 | */ | |
| 8 | ||
| 9 | #include "emu.h" | |
| 10 | #include "debugger.h" | |
| 11 | #include "mn10200.h" | |
| 12 | ||
| 13 | #define log_write(...) | |
| 14 | #define log_event(...) | |
| 15 | ||
| 16 | #define MEM_BYTE (0) | |
| 17 | #define MEM_WORD (1) | |
| 18 | ||
| 19 | extern int mn102_disassemble(char *buffer, UINT32 pc, const UINT8 *oprom); | |
| 20 | ||
| 21 | typedef struct _mn102_info mn102_info; | |
| 22 | struct _mn102_info | |
| 23 | { | |
| 24 | // The UINT32s are really UINT24 | |
| 25 | UINT32 pc; | |
| 26 | UINT32 d[4]; | |
| 27 | UINT32 a[4]; | |
| 28 | ||
| 29 | UINT8 nmicr, iagr; | |
| 30 | UINT8 icrl[31], icrh[31]; | |
| 31 | UINT16 psw; | |
| 32 | UINT16 mdr; | |
| 33 | ||
| 34 | struct { | |
| 35 | UINT8 mode; | |
| 36 | UINT8 base; | |
| 37 | UINT8 cur; | |
| 38 | } simple_timer[10]; | |
| 39 | ||
| 40 | struct { | |
| 41 | UINT8 mode; | |
| 42 | UINT8 base; | |
| 43 | UINT8 cur; | |
| 44 | } prescaler[2]; | |
| 45 | ||
| 46 | struct { | |
| 47 | UINT32 adr; | |
| 48 | UINT32 count; | |
| 49 | UINT16 iadr; | |
| 50 | UINT8 ctrll, ctrlh, irq; | |
| 51 | } dma[8]; | |
| 52 | ||
| 53 | struct { | |
| 54 | UINT8 ctrll, ctrlh; | |
| 55 | UINT8 buf; | |
| 56 | } serial[2]; | |
| 57 | ||
| 58 | UINT8 ddr[8]; | |
| 59 | ||
| 60 | int cycles; | |
| 61 | ||
| 62 | running_device *device; | |
| 63 | const address_space *program; | |
| 64 | const address_space *io; | |
| 65 | }; | |
| 66 | ||
| 67 | static void mn10200_w(mn102_info *mn102, UINT32 adr, UINT32 data, int type); | |
| 68 | static UINT32 mn10200_r(mn102_info *mn102, UINT32 adr, int type); | |
| 69 | ||
| 70 | INLINE UINT8 mn102_read_byte(mn102_info *mn102, UINT32 address) | |
| 71 | { | |
| 72 | if (address >= 0xfc00 && address < 0x10000) | |
| 73 | { | |
| 74 | return mn10200_r(mn102, address-0xfc00, MEM_BYTE); | |
| 75 | } | |
| 76 | ||
| 77 | return memory_read_byte_16le(mn102->program, address); | |
| 78 | } | |
| 79 | ||
| 80 | INLINE UINT16 mn102_read_word(mn102_info *mn102, UINT32 address) | |
| 81 | { | |
| 82 | if (address >= 0xfc00 && address < 0x10000) | |
| 83 | { | |
| 84 | return mn10200_r(mn102, address-0xfc00, MEM_WORD); | |
| 85 | } | |
| 86 | ||
| 87 | if (address & 1) | |
| 88 | { | |
| 89 | return memory_read_byte_16le(mn102->program, address) | (memory_read_byte_16le(mn102->program, address+1)<<8); | |
| 90 | } | |
| 91 | ||
| 92 | return memory_read_word_16le(mn102->program, address); | |
| 93 | } | |
| 94 | ||
| 95 | INLINE void mn102_write_byte(mn102_info *mn102, UINT32 address, UINT8 data) | |
| 96 | { | |
| 97 | if (address >= 0xfc00 && address < 0x10000) | |
| 98 | { | |
| 99 | mn10200_w(mn102, address-0xfc00, data, MEM_BYTE); | |
| 100 | return; | |
| 101 | } | |
| 102 | ||
| 103 | memory_write_byte_16le(mn102->program, address, data); | |
| 104 | } | |
| 105 | ||
| 106 | INLINE void mn102_write_word(mn102_info *mn102, UINT32 address, UINT16 data) | |
| 107 | { | |
| 108 | if (address >= 0xfc00 && address < 0x10000) | |
| 109 | { | |
| 110 | mn10200_w(mn102, address-0xfc00, data, MEM_WORD); | |
| 111 | return; | |
| 112 | } | |
| 113 | ||
| 114 | if (address & 1) | |
| 115 | { | |
| 116 | memory_write_byte_16le(mn102->program, address, data&0xff); | |
| 117 | memory_write_byte_16le(mn102->program, address+1, (data>>8)&0xff); | |
| 118 | return; | |
| 119 | } | |
| 120 | ||
| 121 | memory_write_word_16le(mn102->program, address, data); | |
| 122 | } | |
| 123 | ||
| 124 | INLINE mn102_info *get_safe_token(running_device *device) | |
| 125 | { | |
| 126 | assert(device != NULL); | |
| 127 | assert(device->token != NULL); | |
| 128 | assert(device->type == CPU); | |
| 129 | assert(cpu_get_type(device) == CPU_MN10200); | |
| 130 | ||
| 131 | return (mn102_info *)device->token; | |
| 132 | } | |
| 133 | ||
| 134 | static CPU_INIT(mn10200) | |
| 135 | { | |
| 136 | mn102_info *cpustate = get_safe_token(device); | |
| 137 | ||
| 138 | memset(cpustate, 0, sizeof(mn102_info)); | |
| 139 | ||
| 140 | cpustate->device = device; | |
| 141 | cpustate->program = device->space(AS_PROGRAM); | |
| 142 | cpustate->io = device->space(AS_IO); | |
| 143 | } | |
| 144 | ||
| 145 | static CPU_RESET(mn10200) | |
| 146 | { | |
| 147 | mn102_info *cpustate = get_safe_token(device); | |
| 148 | ||
| 149 | memset(cpustate->d, 0, sizeof(cpustate->d)); | |
| 150 | memset(cpustate->a, 0, sizeof(cpustate->a)); | |
| 151 | cpustate->pc = 0x80000; | |
| 152 | cpustate->psw = 0; | |
| 153 | cpustate->nmicr = 0; | |
| 154 | memset(cpustate->icrl, 0, sizeof(cpustate->icrl)); | |
| 155 | memset(cpustate->icrh, 0, sizeof(cpustate->icrh)); | |
| 156 | } | |
| 157 | ||
| 158 | static CPU_EXIT(mn10200) | |
| 159 | { | |
| 160 | } | |
| 161 | ||
| 162 | static void unemul(mn102_info *mn102) | |
| 163 | { | |
| 164 | fatalerror("MN10200: unknown opcode @ PC=%x\n", mn102->pc); | |
| 165 | } | |
| 166 | ||
| 167 | INLINE INT32 r24u(mn102_info *mn102, offs_t adr) | |
| 168 | { | |
| 169 | return mn102_read_word(mn102, adr)|(mn102_read_byte(mn102, adr+2)<<16); | |
| 170 | } | |
| 171 | ||
| 172 | INLINE void w24(mn102_info *mn102, offs_t adr, UINT32 val) | |
| 173 | { | |
| 174 | if(adr == 0x4075aa || adr == 0x40689a || adr == 0x4075a2) | |
| 175 | log_write("TRACE", adr, val, MEM_LONG); | |
| 176 | mn102_write_byte(mn102, adr, val); | |
| 177 | mn102_write_byte(mn102, adr+1, val>>8); | |
| 178 | mn102_write_byte(mn102, adr+2, val>>16); | |
| 179 | } | |
| 180 | ||
| 181 | static UINT32 do_add(mn102_info *mn102, UINT32 a, UINT32 b) | |
| 182 | { | |
| 183 | UINT32 r24, r16; | |
| 184 | r24 = (a & 0xffffff) + (b & 0xffffff); | |
| 185 | r16 = (a & 0xffff) + (b & 0xffff); | |
| 186 | ||
| 187 | mn102->psw &= 0xff00; | |
| 188 | if((~(a^b)) & (a^r24) & 0x00800000) | |
| 189 | mn102->psw |= 0x80; | |
| 190 | if(r24 & 0x01000000) | |
| 191 | mn102->psw |= 0x40; | |
| 192 | if(r24 & 0x00800000) | |
| 193 | mn102->psw |= 0x20; | |
| 194 | if(!(r24 & 0x00ffffff)) | |
| 195 | mn102->psw |= 0x10; | |
| 196 | if((~(a^b)) & (a^r16) & 0x00008000) | |
| 197 | mn102->psw |= 0x08; | |
| 198 | if(r16 & 0x00010000) | |
| 199 | mn102->psw |= 0x04; | |
| 200 | if(r16 & 0x00008000) | |
| 201 | mn102->psw |= 0x02; | |
| 202 | if(!(r16 & 0x0000ffff)) | |
| 203 | mn102->psw |= 0x01; | |
| 204 | return r24 & 0xffffff; | |
| 205 | } | |
| 206 | ||
| 207 | static UINT32 do_addc(mn102_info *mn102, UINT32 a, UINT32 b) | |
| 208 | { | |
| 209 | UINT32 r24, r16; | |
| 210 | r24 = (a & 0xffffff) + (b & 0xffffff); | |
| 211 | r16 = (a & 0xffff) + (b & 0xffff); | |
| 212 | ||
| 213 | if(mn102->psw & 0x04) { | |
| 214 | r24++; | |
| 215 | r16++; | |
| 216 | } | |
| 217 | ||
| 218 | mn102->psw &= 0xff00; | |
| 219 | if((~(a^b)) & (a^r24) & 0x00800000) | |
| 220 | mn102->psw |= 0x80; | |
| 221 | if(r24 & 0x01000000) | |
| 222 | mn102->psw |= 0x40; | |
| 223 | if(r24 & 0x00800000) | |
| 224 | mn102->psw |= 0x20; | |
| 225 | if(!(r24 & 0x00ffffff)) | |
| 226 | mn102->psw |= 0x10; | |
| 227 | if((~(a^b)) & (a^r16) & 0x00008000) | |
| 228 | mn102->psw |= 0x08; | |
| 229 | if(r16 & 0x00010000) | |
| 230 | mn102->psw |= 0x04; | |
| 231 | if(r16 & 0x00008000) | |
| 232 | mn102->psw |= 0x02; | |
| 233 | if(!(r16 & 0x0000ffff)) | |
| 234 | mn102->psw |= 0x01; | |
| 235 | return r24 & 0xffffff; | |
| 236 | } | |
| 237 | ||
| 238 | static UINT32 do_sub(mn102_info *mn102, UINT32 a, UINT32 b) | |
| 239 | { | |
| 240 | UINT32 r24, r16; | |
| 241 | r24 = (a & 0xffffff) - (b & 0xffffff); | |
| 242 | r16 = (a & 0xffff) - (b & 0xffff); | |
| 243 | ||
| 244 | mn102->psw &= 0xff00; | |
| 245 | if((a^b) & (a^r24) & 0x00800000) | |
| 246 | mn102->psw |= 0x80; | |
| 247 | if(r24 & 0x01000000) | |
| 248 | mn102->psw |= 0x40; | |
| 249 | if(r24 & 0x00800000) | |
| 250 | mn102->psw |= 0x20; | |
| 251 | if(!(r24 & 0x00ffffff)) | |
| 252 | mn102->psw |= 0x10; | |
| 253 | if((a^b) & (a^r16) & 0x00008000) | |
| 254 | mn102->psw |= 0x08; | |
| 255 | if(r16 & 0x00010000) | |
| 256 | mn102->psw |= 0x04; | |
| 257 | if(r16 & 0x00008000) | |
| 258 | mn102->psw |= 0x02; | |
| 259 | if(!(r16 & 0x0000ffff)) | |
| 260 | mn102->psw |= 0x01; | |
| 261 | return r24 & 0xffffff; | |
| 262 | } | |
| 263 | ||
| 264 | static UINT32 do_subc(mn102_info *mn102, UINT32 a, UINT32 b) | |
| 265 | { | |
| 266 | UINT32 r24, r16; | |
| 267 | r24 = (a & 0xffffff) - (b & 0xffffff); | |
| 268 | r16 = (a & 0xffff) - (b & 0xffff); | |
| 269 | ||
| 270 | if(mn102->psw & 0x04) { | |
| 271 | r24--; | |
| 272 | r16--; | |
| 273 | } | |
| 274 | ||
| 275 | mn102->psw &= 0xff00; | |
| 276 | if(r24 >= 0x00800000 && r24 < 0xff800000) | |
| 277 | mn102->psw |= 0x80; | |
| 278 | if(r24 & 0x01000000) | |
| 279 | mn102->psw |= 0x40; | |
| 280 | if(r24 & 0x00800000) | |
| 281 | mn102->psw |= 0x20; | |
| 282 | if(!(r24 & 0x00ffffff)) | |
| 283 | mn102->psw |= 0x10; | |
| 284 | if(r16 >= 0x00008000 && r16 < 0xffff8000) | |
| 285 | mn102->psw |= 0x08; | |
| 286 | if(r16 & 0x00010000) | |
| 287 | mn102->psw |= 0x04; | |
| 288 | if(r16 & 0x00008000) | |
| 289 | mn102->psw |= 0x02; | |
| 290 | if(!(r16 & 0x0000ffff)) | |
| 291 | mn102->psw |= 0x01; | |
| 292 | return r24 & 0xffffff; | |
| 293 | } | |
| 294 | ||
| 295 | INLINE void test_nz16(mn102_info *mn102, UINT16 v) | |
| 296 | { | |
| 297 | mn102->psw &= 0xfff0; | |
| 298 | if(v & 0x8000) | |
| 299 | mn102->psw |= 2; | |
| 300 | if(!v) | |
| 301 | mn102->psw |= 1; | |
| 302 | } | |
| 303 | ||
| 304 | INLINE void mn102_change_pc(mn102_info *mn102, UINT32 pc) | |
| 305 | { | |
| 306 | mn102->pc = pc & 0xffffff; | |
| 307 | } | |
| 308 | ||
| 309 | INLINE void do_jsr(mn102_info *mn102, UINT32 to, UINT32 ret) | |
| 310 | { | |
| 311 | mn102_change_pc(mn102, to & 0xffffff); | |
| 312 | mn102->a[3] -= 4; | |
| 313 | w24(mn102, mn102->a[3], ret); | |
| 314 | } | |
| 315 | ||
| 316 | #if 0 | |
| 317 | log_event("MN102", "PSW change S=%d irq=%s im=%d %c%c%c%c %c%c%c%c", | |
| 318 | (psw >> 12) & 3, | |
| 319 | psw & 0x0800 ? "on" : "off", | |
| 320 | (psw >> 8) & 7, | |
| 321 | psw & 0x0080 ? 'V' : '-', | |
| 322 | psw & 0x0040 ? 'C' : '-', | |
| 323 | psw & 0x0020 ? 'N' : '-', | |
| 324 | psw & 0x0010 ? 'Z' : '-', | |
| 325 | psw & 0x0008 ? 'v' : '-', | |
| 326 | psw & 0x0004 ? 'c' : '-', | |
| 327 | psw & 0x0002 ? 'n' : '-', | |
| 328 | psw & 0x0001 ? 'z' : '-'); | |
| 329 | #endif | |
| 330 | ||
| 331 | void mn102_force_irq(mn102_info *mn102, int level, int group, int entry) | |
| 332 | { | |
| 333 | if(!(mn102->psw & 0x800)) | |
| 334 | { | |
| 335 | if(group != 1 || entry != 3) | |
| 336 | log_event("MN102", "Dropping irq %d %d %d, pc=%x, a3=%x", level, group, entry, mn102->pc, mn102->a[3]); | |
| 337 | return; | |
| 338 | } | |
| 339 | ||
| 340 | if(group != 1 || entry != 3) | |
| 341 | log_event("MN102", "Taking irq %d %d %d, pc=%x, a3=%x", level, group, entry, mn102->pc, mn102->a[3]); | |
| 342 | mn102->a[3] -= 6; | |
| 343 | w24(mn102, mn102->a[3]+2, mn102->pc); | |
| 344 | mn102_write_word(mn102, mn102->a[3], mn102->psw); | |
| 345 | mn102_change_pc(mn102, 0x80008); | |
| 346 | mn102->psw = (mn102->psw & 0xf0ff) | (level << 8); | |
| 347 | mn102->iagr = group << 1; | |
| 348 | if(group != 0) | |
| 349 | mn102->icrl[group-1] |= 1 << entry; | |
| 350 | } | |
| 351 | ||
| 352 | static CPU_EXECUTE(mn10200) | |
| 353 | { | |
| 354 | mn102_info *mn102 = get_safe_token(device); | |
| 355 | ||
| 356 | mn102->cycles = cycles; | |
| 357 | ||
| 358 | while(mn102->cycles > 0) | |
| 359 | { | |
| 360 | UINT8 opcode; | |
| 361 | ||
| 362 | debugger_instruction_hook(device, mn102->pc); | |
| 363 | ||
| 364 | opcode = mn102_read_byte(mn102, mn102->pc); | |
| 365 | switch(opcode) { | |
| 366 | // mov dm, (an) | |
| 367 | case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: | |
| 368 | case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: | |
| 369 | mn102->cycles -= 1; | |
| 370 | mn102_write_word(mn102, mn102->a[(opcode>>2)&3], (UINT16)mn102->d[opcode & 3]); | |
| 371 | mn102->pc += 1; | |
| 372 | break; | |
| 373 | ||
| 374 | // movb dm, (an) | |
| 375 | case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: | |
| 376 | case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: | |
| 377 | mn102->cycles -= 1; | |
| 378 | mn102_write_byte(mn102, mn102->a[(opcode>>2)&3], (UINT8)mn102->d[opcode & 3]); | |
| 379 | mn102->pc += 1; | |
| 380 | break; | |
| 381 | ||
| 382 | // mov (an), dm | |
| 383 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: | |
| 384 | case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: | |
| 385 | mn102->cycles -= 1; | |
| 386 | mn102->d[opcode & 3] = (INT16)mn102_read_word(mn102, mn102->a[(opcode>>2)&3]); | |
| 387 | mn102->pc += 1; | |
| 388 | break; | |
| 389 | ||
| 390 | // movbu (an), dm | |
| 391 | case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: | |
| 392 | case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: | |
| 393 | mn102->cycles -= 1; | |
| 394 | mn102->d[opcode & 3] = mn102_read_byte(mn102, mn102->a[(opcode>>2)&3]); | |
| 395 | mn102->pc += 1; | |
| 396 | break; | |
| 397 | ||
| 398 | // mov dm, (d8, an) | |
| 399 | case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: | |
| 400 | case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: | |
| 401 | mn102->cycles -= 1; | |
| 402 | mn102_write_word(mn102, (mn102->a[(opcode>>2)&3]+(INT8)mn102_read_byte(mn102, mn102->pc+1)) & 0xffffff, (UINT16)mn102->d[opcode & 3]); | |
| 403 | mn102->pc += 2; | |
| 404 | break; | |
| 405 | ||
| 406 | // mov am, (d8, an) | |
| 407 | case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: | |
| 408 | case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: | |
| 409 | mn102->cycles -= 2; | |
| 410 | w24(mn102, (mn102->a[(opcode>>2)&3]+(INT8)mn102_read_byte(mn102, mn102->pc+1)) & 0xffffff, mn102->a[opcode & 3]); | |
| 411 | mn102->pc += 2; | |
| 412 | break; | |
| 413 | ||
| 414 | // mov (d8, an), dm | |
| 415 | case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67: | |
| 416 | case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: | |
| 417 | mn102->cycles -= 1; | |
| 418 | mn102->d[opcode & 3] = (INT16)mn102_read_word(mn102, (mn102->a[(opcode>>2) & 3] + (INT8)mn102_read_byte(mn102, mn102->pc+1)) & 0xffffff); | |
| 419 | mn102->pc += 2; | |
| 420 | break; | |
| 421 | ||
| 422 | // mov (d8, an), am | |
| 423 | case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: | |
| 424 | case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: | |
| 425 | mn102->cycles -= 2; | |
| 426 | mn102->a[opcode & 3] = r24u(mn102, (mn102->a[(opcode>>2) & 3] + (INT8)mn102_read_byte(mn102, mn102->pc+1)) & 0xffffff); | |
| 427 | mn102->pc += 2; | |
| 428 | break; | |
| 429 | ||
| 430 | // mov dm, dn | |
| 431 | case 0x81: case 0x82: case 0x83: case 0x84: case 0x86: case 0x87: | |
| 432 | case 0x88: case 0x89: case 0x8b: case 0x8c: case 0x8d: case 0x8e: | |
| 433 | mn102->cycles -= 1; | |
| 434 | mn102->d[opcode & 3] = mn102->d[(opcode>>2) & 3]; | |
| 435 | mn102->pc += 1; | |
| 436 | break; | |
| 437 | ||
| 438 | // mov imm8, dn | |
| 439 | case 0x80: case 0x85: case 0x8a: case 0x8f: | |
| 440 | mn102->cycles -= 1; | |
| 441 | mn102->d[opcode & 3] = (INT8)mn102_read_byte(mn102, mn102->pc+1); | |
| 442 | mn102->pc += 2; | |
| 443 | break; | |
| 444 | ||
| 445 | // add dn, dm | |
| 446 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 447 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 448 | mn102->cycles -= 1; | |
| 449 | mn102->d[opcode & 3] = do_add(mn102, mn102->d[opcode & 3], mn102->d[(opcode >> 2) & 3]); | |
| 450 | mn102->pc += 1; | |
| 451 | break; | |
| 452 | ||
| 453 | // sub dn, dm | |
| 454 | case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: | |
| 455 | case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: | |
| 456 | mn102->cycles -= 1; | |
| 457 | mn102->d[opcode & 3] = do_sub(mn102, mn102->d[opcode & 3], mn102->d[(opcode >> 2) & 3]); | |
| 458 | mn102->pc += 1; | |
| 459 | break; | |
| 460 | ||
| 461 | // extx dn | |
| 462 | case 0xb0: case 0xb1: case 0xb2: case 0xb3: | |
| 463 | mn102->cycles -= 1; | |
| 464 | mn102->d[opcode & 3] = (INT16)mn102->d[opcode & 3] & 0xffffff; | |
| 465 | mn102->pc += 1; | |
| 466 | break; | |
| 467 | ||
| 468 | // extxu dn | |
| 469 | case 0xb4: case 0xb5: case 0xb6: case 0xb7: | |
| 470 | mn102->cycles -= 1; | |
| 471 | mn102->d[opcode & 3] = (UINT16)mn102->d[opcode & 3]; | |
| 472 | mn102->pc += 1; | |
| 473 | break; | |
| 474 | ||
| 475 | // extxb dn | |
| 476 | case 0xb8: case 0xb9: case 0xba: case 0xbb: | |
| 477 | mn102->cycles -= 1; | |
| 478 | mn102->d[opcode & 3] = (INT8)mn102->d[opcode & 3] & 0xffffff; | |
| 479 | mn102->pc += 1; | |
| 480 | break; | |
| 481 | ||
| 482 | // extxbu dn | |
| 483 | case 0xbc: case 0xbd: case 0xbe: case 0xbf: | |
| 484 | mn102->cycles -= 1; | |
| 485 | mn102->d[opcode & 3] = (UINT8)mn102->d[opcode & 3]; | |
| 486 | mn102->pc += 1; | |
| 487 | break; | |
| 488 | ||
| 489 | // mov dn, (imm16) | |
| 490 | case 0xc0: case 0xc1: case 0xc2: case 0xc3: | |
| 491 | mn102->cycles -= 2; | |
| 492 | mn102_write_word(mn102, mn102_read_word(mn102, mn102->pc+1), (UINT16)mn102->d[opcode & 3]); | |
| 493 | mn102->pc += 3; | |
| 494 | break; | |
| 495 | ||
| 496 | // movb dn, (imm16) | |
| 497 | case 0xc4: case 0xc5: case 0xc6: case 0xc7: | |
| 498 | mn102->cycles -= 1; | |
| 499 | mn102_write_byte(mn102, mn102_read_word(mn102, mn102->pc+1), (UINT8)mn102->d[opcode & 3]); | |
| 500 | mn102->pc += 3; | |
| 501 | break; | |
| 502 | ||
| 503 | // mov (abs16), dn | |
| 504 | case 0xc8: case 0xc9: case 0xca: case 0xcb: | |
| 505 | mn102->cycles -= 1; | |
| 506 | mn102->d[opcode & 3] = (INT16)mn102_read_word(mn102, mn102_read_word(mn102, mn102->pc+1)); | |
| 507 | mn102->pc += 3; | |
| 508 | break; | |
| 509 | ||
| 510 | // movbu (abs16), dn | |
| 511 | case 0xcc: case 0xcd: case 0xce: case 0xcf: | |
| 512 | mn102->cycles -= 2; | |
| 513 | mn102->d[opcode & 3] = mn102_read_byte(mn102, mn102_read_word(mn102, mn102->pc+1)); | |
| 514 | mn102->pc += 3; | |
| 515 | break; | |
| 516 | ||
| 517 | // add imm8, an | |
| 518 | case 0xd0: case 0xd1: case 0xd2: case 0xd3: | |
| 519 | mn102->cycles -= 1; | |
| 520 | mn102->a[opcode & 3] = do_add(mn102, mn102->a[opcode & 3], (INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 521 | mn102->pc += 2; | |
| 522 | break; | |
| 523 | ||
| 524 | // add imm8, dn | |
| 525 | case 0xd4: case 0xd5: case 0xd6: case 0xd7: | |
| 526 | mn102->cycles -= 1; | |
| 527 | mn102->d[opcode & 3] = do_add(mn102, mn102->d[opcode & 3], (INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 528 | mn102->pc += 2; | |
| 529 | break; | |
| 530 | ||
| 531 | // cmp imm8, dn | |
| 532 | case 0xd8: case 0xd9: case 0xda: case 0xdb: | |
| 533 | mn102->cycles -= 1; | |
| 534 | do_sub(mn102, mn102->d[opcode & 3], (INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 535 | mn102->pc += 2; | |
| 536 | break; | |
| 537 | ||
| 538 | // mov imm16, an | |
| 539 | case 0xdc: case 0xdd: case 0xde: case 0xdf: | |
| 540 | mn102->cycles -= 1; | |
| 541 | mn102->a[opcode & 3] = mn102_read_word(mn102, mn102->pc+1); | |
| 542 | mn102->pc += 3; | |
| 543 | break; | |
| 544 | ||
| 545 | // blt label8 | |
| 546 | case 0xe0: | |
| 547 | if(((mn102->psw & 0x0a) == 2) || ((mn102->psw & 0x0a) == 8)) | |
| 548 | { | |
| 549 | mn102->cycles -= 2; | |
| 550 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 551 | } | |
| 552 | else | |
| 553 | { | |
| 554 | mn102->cycles -= 1; | |
| 555 | mn102->pc += 2; | |
| 556 | } | |
| 557 | break; | |
| 558 | ||
| 559 | // bgt label8 | |
| 560 | case 0xe1: | |
| 561 | if(((mn102->psw & 0x0b) == 0) || ((mn102->psw & 0x0b) == 0xa)) | |
| 562 | { | |
| 563 | mn102->cycles -= 2; | |
| 564 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 565 | } | |
| 566 | else | |
| 567 | { | |
| 568 | mn102->cycles -= 1; | |
| 569 | mn102->pc += 2; | |
| 570 | } | |
| 571 | break; | |
| 572 | ||
| 573 | // bge label8 | |
| 574 | case 0xe2: | |
| 575 | if(((mn102->psw & 0x0a) == 0) || ((mn102->psw & 0x0a) == 0xa)) | |
| 576 | { | |
| 577 | mn102->cycles -= 2; | |
| 578 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 579 | } | |
| 580 | else | |
| 581 | { | |
| 582 | mn102->cycles -= 1; | |
| 583 | mn102->pc += 2; | |
| 584 | } | |
| 585 | break; | |
| 586 | ||
| 587 | // ble label8 | |
| 588 | case 0xe3: | |
| 589 | if((mn102->psw & 0x01) || ((mn102->psw & 0x0a) == 2) || ((mn102->psw & 0x0a) == 8)) | |
| 590 | { | |
| 591 | mn102->cycles -= 2; | |
| 592 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 593 | } | |
| 594 | else | |
| 595 | { | |
| 596 | mn102->cycles -= 1; | |
| 597 | mn102->pc += 2; | |
| 598 | } | |
| 599 | break; | |
| 600 | ||
| 601 | // bcs label8 | |
| 602 | case 0xe4: | |
| 603 | if(mn102->psw & 0x04) | |
| 604 | { | |
| 605 | mn102->cycles -= 2; | |
| 606 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 607 | } | |
| 608 | else | |
| 609 | { | |
| 610 | mn102->cycles -= 1; | |
| 611 | mn102->pc += 2; | |
| 612 | } | |
| 613 | break; | |
| 614 | ||
| 615 | // bhi label8 | |
| 616 | case 0xe5: | |
| 617 | if(!(mn102->psw & 0x05)) | |
| 618 | { | |
| 619 | mn102->cycles -= 2; | |
| 620 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 621 | } | |
| 622 | else | |
| 623 | { | |
| 624 | mn102->cycles -= 1; | |
| 625 | mn102->pc += 2; | |
| 626 | } | |
| 627 | break; | |
| 628 | ||
| 629 | // bcc label8 | |
| 630 | case 0xe6: | |
| 631 | if(!(mn102->psw & 0x04)) | |
| 632 | { | |
| 633 | mn102->cycles -= 2; | |
| 634 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 635 | } | |
| 636 | else | |
| 637 | { | |
| 638 | mn102->cycles -= 1; | |
| 639 | mn102->pc += 2; | |
| 640 | } | |
| 641 | break; | |
| 642 | ||
| 643 | // bls label8 | |
| 644 | case 0xe7: | |
| 645 | if(mn102->psw & 0x05) | |
| 646 | { | |
| 647 | mn102->cycles -= 2; | |
| 648 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 649 | } | |
| 650 | else | |
| 651 | { | |
| 652 | mn102->cycles -= 1; | |
| 653 | mn102->pc += 2; | |
| 654 | } | |
| 655 | break; | |
| 656 | ||
| 657 | // beq label8 | |
| 658 | case 0xe8: | |
| 659 | if(mn102->psw & 0x01) | |
| 660 | { | |
| 661 | mn102->cycles -= 2; | |
| 662 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 663 | } | |
| 664 | else | |
| 665 | { | |
| 666 | mn102->cycles -= 1; | |
| 667 | mn102->pc += 2; | |
| 668 | } | |
| 669 | break; | |
| 670 | ||
| 671 | // bne label8 | |
| 672 | case 0xe9: | |
| 673 | if(!(mn102->psw & 0x01)) | |
| 674 | { | |
| 675 | mn102->cycles -= 2; | |
| 676 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 677 | } | |
| 678 | else | |
| 679 | { | |
| 680 | mn102->cycles -= 1; | |
| 681 | mn102->pc += 2; | |
| 682 | } | |
| 683 | break; | |
| 684 | ||
| 685 | // bra label8 | |
| 686 | case 0xea: | |
| 687 | mn102->cycles -= 2; | |
| 688 | mn102_change_pc(mn102, mn102->pc+2+(INT8)mn102_read_byte(mn102, mn102->pc+1)); | |
| 689 | break; | |
| 690 | ||
| 691 | // rti | |
| 692 | case 0xeb: | |
| 693 | mn102->cycles -= 6; | |
| 694 | mn102->psw = mn102_read_word(mn102, mn102->a[3]); | |
| 695 | mn102_change_pc(mn102, r24u(mn102, mn102->a[3]+2)); | |
| 696 | mn102->a[3] += 6; | |
| 697 | break; | |
| 698 | ||
| 699 | // cmp imm16, an | |
| 700 | case 0xec: case 0xed: case 0xee: case 0xef: | |
| 701 | mn102->cycles -= 1; | |
| 702 | do_sub(mn102, mn102->a[opcode & 3], mn102_read_word(mn102, mn102->pc+1)); | |
| 703 | mn102->pc += 3; | |
| 704 | break; | |
| 705 | ||
| 706 | case 0xf0: | |
| 707 | opcode = mn102_read_byte(mn102, mn102->pc+1); | |
| 708 | switch(opcode) { | |
| 709 | // jmp (an) | |
| 710 | case 0x00: case 0x04: case 0x08: case 0x0c: | |
| 711 | mn102->cycles -= 3; | |
| 712 | mn102_change_pc(mn102, mn102->a[(opcode>>2) & 3]); | |
| 713 | break; | |
| 714 | ||
| 715 | // jsr (an) | |
| 716 | case 0x01: case 0x05: case 0x09: case 0x0d: | |
| 717 | mn102->cycles -= 5; | |
| 718 | do_jsr(mn102, mn102->a[(opcode>>2) & 3], mn102->pc+2); | |
| 719 | break; | |
| 720 | ||
| 721 | // bset dm, (an) | |
| 722 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: | |
| 723 | case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: { | |
| 724 | UINT8 v; | |
| 725 | mn102->cycles -= 5; | |
| 726 | v = mn102_read_byte(mn102, mn102->a[(opcode>>2) & 3]); | |
| 727 | test_nz16(mn102, v & mn102->d[opcode & 3]); | |
| 728 | mn102_write_byte(mn102, mn102->a[(opcode>>2) & 3], v | mn102->d[opcode & 3]); | |
| 729 | mn102->pc += 2; | |
| 730 | break; | |
| 731 | } | |
| 732 | ||
| 733 | // bclr dm, (an) | |
| 734 | case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: | |
| 735 | case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: { | |
| 736 | UINT8 v; | |
| 737 | mn102->cycles -= 5; | |
| 738 | v = mn102_read_byte(mn102, mn102->a[(opcode>>2) & 3]); | |
| 739 | test_nz16(mn102, v & mn102->d[opcode & 3]); | |
| 740 | mn102_write_byte(mn102, mn102->a[(opcode>>2) & 3], v & ~mn102->d[opcode & 3]); | |
| 741 | mn102->pc += 2; | |
| 742 | break; | |
| 743 | } | |
| 744 | ||
| 745 | // movb (di, an), dm | |
| 746 | case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: | |
| 747 | case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: | |
| 748 | case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: | |
| 749 | case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: | |
| 750 | case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67: | |
| 751 | case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: | |
| 752 | case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: | |
| 753 | case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: | |
| 754 | mn102->cycles -= 2; | |
| 755 | mn102->d[opcode & 3] = (INT8)mn102_read_byte(mn102, (mn102->a[(opcode>>2) & 3] + mn102->d[(opcode>>4) & 3]) & 0xffffff); | |
| 756 | mn102->pc += 2; | |
| 757 | break; | |
| 758 | ||
| 759 | // movbu (di, an), dm | |
| 760 | case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: | |
| 761 | case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: | |
| 762 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 763 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 764 | case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: | |
| 765 | case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: | |
| 766 | case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: | |
| 767 | case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: | |
| 768 | mn102->cycles -= 2; | |
| 769 | mn102->d[opcode & 3] = mn102_read_byte(mn102, (mn102->a[(opcode>>2) & 3] + mn102->d[(opcode>>4) & 3]) & 0xffffff); | |
| 770 | mn102->pc += 2; | |
| 771 | break; | |
| 772 | ||
| 773 | // movb dm, (di, an) | |
| 774 | case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: | |
| 775 | case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: | |
| 776 | case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: | |
| 777 | case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: | |
| 778 | case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: case 0xe6: case 0xe7: | |
| 779 | case 0xe8: case 0xe9: case 0xea: case 0xeb: case 0xec: case 0xed: case 0xee: case 0xef: | |
| 780 | case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7: | |
| 781 | case 0xf8: case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff: | |
| 782 | mn102->cycles -= 2; | |
| 783 | mn102_write_byte(mn102, (mn102->a[(opcode>>2) & 3] + mn102->d[(opcode>>4) & 3]) & 0xffffff, mn102->d[opcode & 3]); | |
| 784 | mn102->pc += 2; | |
| 785 | break; | |
| 786 | ||
| 787 | default: | |
| 788 | unemul(mn102); | |
| 789 | break; | |
| 790 | } | |
| 791 | break; | |
| 792 | ||
| 793 | case 0xf1: | |
| 794 | opcode = mn102_read_byte(mn102, mn102->pc+1); | |
| 795 | switch(opcode>>6) { | |
| 796 | ||
| 797 | // mov (di, an), am | |
| 798 | case 0: | |
| 799 | mn102->cycles -= 3; | |
| 800 | mn102->a[opcode & 3] = r24u(mn102, (mn102->a[(opcode>>2) & 3] + mn102->d[(opcode>>4) & 3]) & 0xffffff); | |
| 801 | mn102->pc += 2; | |
| 802 | break; | |
| 803 | ||
| 804 | // mov (di, an), dm | |
| 805 | case 1: | |
| 806 | mn102->cycles -= 2; | |
| 807 | mn102->d[opcode & 3] = mn102_read_word(mn102, (mn102->a[(opcode>>2) & 3] + mn102->d[(opcode>>4) & 3]) & 0xffffff); | |
| 808 | mn102->pc += 2; | |
| 809 | break; | |
| 810 | ||
| 811 | // mov am, (di, an) | |
| 812 | case 2: | |
| 813 | mn102->cycles -= 3; | |
| 814 | w24(mn102, (mn102->a[(opcode>>2) & 3] + mn102->d[(opcode>>4) & 3]) & 0xffffff, mn102->a[opcode & 3]); | |
| 815 | mn102->pc += 2; | |
| 816 | break; | |
| 817 | ||
| 818 | // mov dm, (di, an) | |
| 819 | case 3: | |
| 820 | mn102->cycles -= 2; | |
| 821 | mn102_write_word(mn102, (mn102->a[(opcode>>2) & 3] + mn102->d[(opcode>>4) & 3]) & 0xffffff, mn102->d[opcode & 3]); | |
| 822 | mn102->pc += 2; | |
| 823 | break; | |
| 824 | ||
| 825 | default: | |
| 826 | unemul(mn102); | |
| 827 | break; | |
| 828 | } | |
| 829 | break; | |
| 830 | ||
| 831 | case 0xf2: | |
| 832 | opcode = mn102_read_byte(mn102, mn102->pc+1); | |
| 833 | switch(opcode>>4) { | |
| 834 | // add dm, an | |
| 835 | case 0x0: | |
| 836 | mn102->cycles -= 2; | |
| 837 | mn102->a[opcode & 3] = do_add(mn102, mn102->a[opcode & 3], mn102->d[(opcode>>2) & 3]); | |
| 838 | mn102->pc += 2; | |
| 839 | break; | |
| 840 | ||
| 841 | // sub dm, an | |
| 842 | case 0x1: | |
| 843 | mn102->cycles -= 2; | |
| 844 | mn102->a[opcode & 3] = do_sub(mn102, mn102->a[opcode & 3], mn102->d[(opcode>>2) & 3]); | |
| 845 | mn102->pc += 2; | |
| 846 | break; | |
| 847 | ||
| 848 | // cmp dm, an | |
| 849 | case 0x2: | |
| 850 | mn102->cycles -= 2; | |
| 851 | do_sub(mn102, mn102->a[opcode & 3], mn102->d[(opcode>>2) & 3]); | |
| 852 | mn102->pc += 2; | |
| 853 | break; | |
| 854 | ||
| 855 | // mov am, dn | |
| 856 | case 0x3: | |
| 857 | mn102->cycles -= 2; | |
| 858 | mn102->a[opcode & 3] = mn102->d[(opcode>>2) & 3]; | |
| 859 | mn102->pc += 2; | |
| 860 | break; | |
| 861 | ||
| 862 | // add am, an | |
| 863 | case 0x4: | |
| 864 | mn102->cycles -= 2; | |
| 865 | mn102->a[opcode & 3] = do_add(mn102, mn102->a[opcode & 3], mn102->a[(opcode>>2) & 3]); | |
| 866 | mn102->pc += 2; | |
| 867 | break; | |
| 868 | ||
| 869 | // sub am, an | |
| 870 | case 0x5: | |
| 871 | mn102->cycles -= 2; | |
| 872 | mn102->a[opcode & 3] = do_sub(mn102, mn102->a[opcode & 3], mn102->a[(opcode>>2) & 3]); | |
| 873 | mn102->pc += 2; | |
| 874 | break; | |
| 875 | ||
| 876 | // cmp am, an | |
| 877 | case 0x6: | |
| 878 | mn102->cycles -= 2; | |
| 879 | do_sub(mn102, mn102->a[opcode & 3], mn102->a[(opcode>>2) & 3]); | |
| 880 | mn102->pc += 2; | |
| 881 | break; | |
| 882 | ||
| 883 | // mov am, an | |
| 884 | case 0x7: | |
| 885 | mn102->cycles -= 2; | |
| 886 | mn102->a[opcode & 3] = mn102->a[(opcode>>2) & 3]; | |
| 887 | mn102->pc += 2; | |
| 888 | break; | |
| 889 | ||
| 890 | // addc dm, dn | |
| 891 | case 0x8: | |
| 892 | mn102->cycles -= 2; | |
| 893 | mn102->d[opcode & 3] = do_addc(mn102, mn102->d[opcode & 3], mn102->d[(opcode>>2) & 3]); | |
| 894 | mn102->pc += 2; | |
| 895 | break; | |
| 896 | ||
| 897 | // subc dm, dn | |
| 898 | case 0x9: | |
| 899 | mn102->cycles -= 2; | |
| 900 | mn102->d[opcode & 3] = do_subc(mn102, mn102->d[opcode & 3], mn102->d[(opcode>>2) & 3]); | |
| 901 | mn102->pc += 2; | |
| 902 | break; | |
| 903 | ||
| 904 | // add am, dn | |
| 905 | case 0xc: | |
| 906 | mn102->cycles -= 2; | |
| 907 | mn102->d[opcode & 3] = do_add(mn102, mn102->d[opcode & 3], mn102->a[(opcode>>2) & 3]); | |
| 908 | mn102->pc += 2; | |
| 909 | break; | |
| 910 | ||
| 911 | // sub am, dn | |
| 912 | case 0xd: | |
| 913 | mn102->cycles -= 2; | |
| 914 | mn102->d[opcode & 3] = do_sub(mn102, mn102->d[opcode & 3], mn102->a[(opcode>>2) & 3]); | |
| 915 | mn102->pc += 2; | |
| 916 | break; | |
| 917 | ||
| 918 | // cmp am, dn | |
| 919 | case 0xe: | |
| 920 | mn102->cycles -= 2; | |
| 921 | do_sub(mn102, mn102->d[opcode & 3], mn102->a[(opcode>>2) & 3]); | |
| 922 | mn102->pc += 2; | |
| 923 | break; | |
| 924 | ||
| 925 | // mov an, dm | |
| 926 | case 0xf: | |
| 927 | mn102->cycles -= 2; | |
| 928 | mn102->d[opcode & 3] = mn102->a[(opcode>>2) & 3]; | |
| 929 | mn102->pc += 2; | |
| 930 | break; | |
| 931 | ||
| 932 | default: | |
| 933 | unemul(mn102); | |
| 934 | break; | |
| 935 | } | |
| 936 | break; | |
| 937 | ||
| 938 | case 0xf3: | |
| 939 | opcode = mn102_read_byte(mn102, mn102->pc+1); | |
| 940 | switch(opcode) { | |
| 941 | // and dm, dn | |
| 942 | case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: | |
| 943 | case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: | |
| 944 | mn102->cycles -= 2; | |
| 945 | test_nz16(mn102, mn102->d[opcode & 3] &= 0xff0000|mn102->d[(opcode>>2) & 3]); | |
| 946 | mn102->pc += 2; | |
| 947 | break; | |
| 948 | ||
| 949 | // or dm, dn | |
| 950 | case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: | |
| 951 | case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: | |
| 952 | mn102->cycles -= 2; | |
| 953 | test_nz16(mn102, mn102->d[opcode & 3] |= 0x00ffff&mn102->d[(opcode>>2) & 3]); | |
| 954 | mn102->pc += 2; | |
| 955 | break; | |
| 956 | ||
| 957 | // xor dm, dn | |
| 958 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: | |
| 959 | case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: | |
| 960 | mn102->cycles -= 2; | |
| 961 | test_nz16(mn102, mn102->d[opcode & 3] ^= 0x00ffff&mn102->d[(opcode>>2) & 3]); | |
| 962 | mn102->pc += 2; | |
| 963 | break; | |
| 964 | ||
| 965 | // rol dn | |
| 966 | case 0x30: case 0x31: case 0x32: case 0x33: { | |
| 967 | UINT32 d = mn102->d[opcode & 3]; | |
| 968 | mn102->cycles -= 2; | |
| 969 | test_nz16(mn102, mn102->d[opcode & 3] = (d & 0xff0000) | ((d << 1) & 0x00fffe) | ((mn102->psw & 0x04) ? 1 : 0)); | |
| 970 | if(d & 0x8000) | |
| 971 | mn102->psw |= 0x04; | |
| 972 | mn102->pc += 2; | |
| 973 | break; | |
| 974 | } | |
| 975 | ||
| 976 | // ror dn | |
| 977 | case 0x34: case 0x35: case 0x36: case 0x37: { | |
| 978 | UINT32 d = mn102->d[opcode & 3]; | |
| 979 | mn102->cycles -= 2; | |
| 980 | test_nz16(mn102, mn102->d[opcode & 3] = (d & 0xff0000) | ((d >> 1) & 0x007fff) | ((mn102->psw & 0x04) ? 0x8000 : 0)); | |
| 981 | if(d & 1) | |
| 982 | mn102->psw |= 0x04; | |
| 983 | mn102->pc += 2; | |
| 984 | break; | |
| 985 | } | |
| 986 | ||
| 987 | // asr dn | |
| 988 | case 0x38: case 0x39: case 0x3a: case 0x3b: { | |
| 989 | UINT32 d = mn102->d[opcode & 3]; | |
| 990 | mn102->cycles -= 2; | |
| 991 | test_nz16(mn102, mn102->d[opcode & 3] = (d & 0xff8000) | ((d >> 1) & 0x007fff)); | |
| 992 | if(d & 1) | |
| 993 | mn102->psw |= 0x04; | |
| 994 | mn102->pc += 2; | |
| 995 | break; | |
| 996 | } | |
| 997 | ||
| 998 | // lsr dn | |
| 999 | case 0x3c: case 0x3d: case 0x3e: case 0x3f: { | |
| 1000 | UINT32 d = mn102->d[opcode & 3]; | |
| 1001 | mn102->cycles -= 2; | |
| 1002 | test_nz16(mn102, mn102->d[opcode & 3] = (d & 0xff0000) | ((d >> 1) & 0x007fff)); | |
| 1003 | if(d & 1) | |
| 1004 | mn102->psw |= 0x04; | |
| 1005 | mn102->pc += 2; | |
| 1006 | break; | |
| 1007 | } | |
| 1008 | ||
| 1009 | // mul dn, dm | |
| 1010 | case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: | |
| 1011 | case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: { | |
| 1012 | UINT32 res; | |
| 1013 | mn102->cycles -= 12; | |
| 1014 | res = ((INT16)mn102->d[opcode & 3])*((INT16)mn102->d[(opcode>>2) & 3]); | |
| 1015 | mn102->d[opcode & 3] = res & 0xffffff; | |
| 1016 | mn102->psw &= 0xff00; | |
| 1017 | if(res & 0x80000000) | |
| 1018 | mn102->psw |= 2; | |
| 1019 | if(!res) | |
| 1020 | mn102->psw |= 1; | |
| 1021 | mn102->mdr = res >> 16; | |
| 1022 | mn102->pc += 2; | |
| 1023 | break; | |
| 1024 | } | |
| 1025 | ||
| 1026 | // mulu dn, dm | |
| 1027 | case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: | |
| 1028 | case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: { | |
| 1029 | UINT32 res; | |
| 1030 | mn102->cycles -= 12; | |
| 1031 | res = ((UINT16)mn102->d[opcode & 3])*((UINT16)mn102->d[(opcode>>2) & 3]); | |
| 1032 | mn102->d[opcode & 3] = res & 0xffffff; | |
| 1033 | mn102->psw &= 0xff00; | |
| 1034 | if(res & 0x80000000) | |
| 1035 | mn102->psw |= 2; | |
| 1036 | if(!res) | |
| 1037 | mn102->psw |= 1; | |
| 1038 | mn102->mdr = res >> 16; | |
| 1039 | mn102->pc += 2; | |
| 1040 | break; | |
| 1041 | } | |
| 1042 | ||
| 1043 | // divu dn, dm | |
| 1044 | case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67: | |
| 1045 | case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: { | |
| 1046 | UINT32 n, d, q, r; | |
| 1047 | mn102->cycles -= 13; | |
| 1048 | mn102->pc += 2; | |
| 1049 | mn102->psw &= 0xff00; | |
| 1050 | ||
| 1051 | n = (mn102->mdr<<16)|(UINT16)mn102->d[opcode & 3]; | |
| 1052 | d = (UINT16)mn102->d[(opcode>>2) & 3]; | |
| 1053 | if(!d) { | |
| 1054 | mn102->psw |= 8; | |
| 1055 | break; | |
| 1056 | } | |
| 1057 | q = n/d; | |
| 1058 | r = n%d; | |
| 1059 | if(q >= 0x10000) { | |
| 1060 | mn102->psw |= 8; | |
| 1061 | break; | |
| 1062 | } | |
| 1063 | mn102->d[opcode & 3] = q; | |
| 1064 | mn102->mdr = r; | |
| 1065 | if(!q) | |
| 1066 | mn102->psw |= 0x11; | |
| 1067 | if(q & 0x8000) | |
| 1068 | mn102->psw |= 2; | |
| 1069 | break; | |
| 1070 | } | |
| 1071 | ||
| 1072 | // cmp dm, dn | |
| 1073 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 1074 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 1075 | mn102->cycles -= 2; | |
| 1076 | do_sub(mn102, mn102->d[opcode & 3], mn102->d[(opcode>>2) & 3]); | |
| 1077 | mn102->pc += 2; | |
| 1078 | break; | |
| 1079 | ||
| 1080 | // mov mdr, dn | |
| 1081 | case 0xc0: case 0xc4: case 0xc8: case 0xcc: | |
| 1082 | mn102->cycles -= 2; | |
| 1083 | mn102->mdr = mn102->d[(opcode>>2) & 3]; | |
| 1084 | mn102->pc += 2; | |
| 1085 | break; | |
| 1086 | ||
| 1087 | // ext dn | |
| 1088 | case 0xc1: case 0xc5: case 0xc9: case 0xcd: | |
| 1089 | mn102->cycles -= 3; | |
| 1090 | mn102->mdr = mn102->d[(opcode>>2) & 3] & 0x8000 ? 0xffff : 0x0000; | |
| 1091 | mn102->pc += 2; | |
| 1092 | break; | |
| 1093 | ||
| 1094 | // mov dn, psw | |
| 1095 | case 0xd0: case 0xd4: case 0xd8: case 0xdc: | |
| 1096 | mn102->cycles -= 3; | |
| 1097 | mn102->psw = mn102->d[(opcode>>2) & 3]; | |
| 1098 | mn102->pc += 2; | |
| 1099 | break; | |
| 1100 | ||
| 1101 | // mov dn, mdr | |
| 1102 | case 0xe0: case 0xe1: case 0xe2: case 0xe3: | |
| 1103 | mn102->cycles -= 2; | |
| 1104 | mn102->d[opcode & 3] = mn102->mdr; | |
| 1105 | mn102->pc += 2; | |
| 1106 | break; | |
| 1107 | ||
| 1108 | // not dn | |
| 1109 | case 0xe4: case 0xe5: case 0xe6: case 0xe7: | |
| 1110 | mn102->cycles -= 2; | |
| 1111 | test_nz16(mn102, mn102->d[opcode & 3] ^= 0x00ffff); | |
| 1112 | mn102->pc += 2; | |
| 1113 | break; | |
| 1114 | ||
| 1115 | // mov psw, dn | |
| 1116 | case 0xf0: case 0xf1: case 0xf2: case 0xf3: | |
| 1117 | mn102->cycles -= 3; | |
| 1118 | mn102->d[(opcode>>2) & 3] = mn102->psw; | |
| 1119 | mn102->pc += 2; | |
| 1120 | break; | |
| 1121 | ||
| 1122 | default: | |
| 1123 | unemul(mn102); | |
| 1124 | break; | |
| 1125 | } | |
| 1126 | break; | |
| 1127 | ||
| 1128 | case 0xf4: | |
| 1129 | opcode = mn102_read_byte(mn102, mn102->pc+1); | |
| 1130 | switch(opcode) { | |
| 1131 | // mov dm, (abs24, an) | |
| 1132 | case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: | |
| 1133 | case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: | |
| 1134 | mn102->cycles -= 3; | |
| 1135 | mn102_write_word(mn102, (r24u(mn102, mn102->pc+2) + mn102->a[(opcode>>2) & 3]) & 0xffffff, mn102->d[opcode & 3]); | |
| 1136 | mn102->pc += 5; | |
| 1137 | break; | |
| 1138 | ||
| 1139 | // mov am, (abs24, an) | |
| 1140 | case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: | |
| 1141 | case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: | |
| 1142 | mn102->cycles -= 4; | |
| 1143 | w24(mn102, (r24u(mn102, mn102->pc+2) + mn102->a[(opcode>>2) & 3]) & 0xffffff, mn102->a[opcode & 3]); | |
| 1144 | mn102->pc += 5; | |
| 1145 | break; | |
| 1146 | ||
| 1147 | // movb dm, (abs24, an) | |
| 1148 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: | |
| 1149 | case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: | |
| 1150 | mn102->cycles -= 3; | |
| 1151 | mn102_write_byte(mn102, (r24u(mn102, mn102->pc+2) + mn102->a[(opcode>>2) & 3]) & 0xffffff, mn102->d[opcode & 3]); | |
| 1152 | mn102->pc += 5; | |
| 1153 | break; | |
| 1154 | ||
| 1155 | // movx dm, (abs24, an) | |
| 1156 | case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: | |
| 1157 | case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: | |
| 1158 | mn102->cycles -= 4; | |
| 1159 | w24(mn102, (r24u(mn102, mn102->pc+2) + mn102->a[(opcode>>2) & 3]) & 0xffffff, mn102->d[opcode & 3]); | |
| 1160 | mn102->pc += 5; | |
| 1161 | break; | |
| 1162 | ||
| 1163 | // mov dn, (abs24) | |
| 1164 | case 0x40: case 0x41: case 0x42: case 0x43: | |
| 1165 | mn102->cycles -= 3; | |
| 1166 | mn102_write_word(mn102, r24u(mn102, mn102->pc+2), mn102->d[opcode & 3]); | |
| 1167 | mn102->pc += 5; | |
| 1168 | break; | |
| 1169 | ||
| 1170 | // movb dn, (abs24) | |
| 1171 | case 0x44: case 0x45: case 0x46: case 0x47: | |
| 1172 | mn102->cycles -= 3; | |
| 1173 | mn102_write_byte(mn102, r24u(mn102, mn102->pc+2), mn102->d[opcode & 3]); | |
| 1174 | mn102->pc += 5; | |
| 1175 | break; | |
| 1176 | ||
| 1177 | // mov an, (abs24) | |
| 1178 | case 0x50: case 0x51: case 0x52: case 0x53: | |
| 1179 | mn102->cycles -= 4; | |
| 1180 | w24(mn102, r24u(mn102, mn102->pc+2), mn102->a[opcode & 3]); | |
| 1181 | mn102->pc += 5; | |
| 1182 | break; | |
| 1183 | ||
| 1184 | // add abs24, dn | |
| 1185 | case 0x60: case 0x61: case 0x62: case 0x63: | |
| 1186 | mn102->cycles -= 3; | |
| 1187 | mn102->d[opcode & 3] = do_add(mn102, mn102->d[opcode & 3], r24u(mn102, mn102->pc+2)); | |
| 1188 | mn102->pc += 5; | |
| 1189 | break; | |
| 1190 | ||
| 1191 | // add abs24, an | |
| 1192 | case 0x64: case 0x65: case 0x66: case 0x67: | |
| 1193 | mn102->cycles -= 3; | |
| 1194 | mn102->a[opcode & 3] = do_add(mn102, mn102->a[opcode & 3], r24u(mn102, mn102->pc+2)); | |
| 1195 | mn102->pc += 5; | |
| 1196 | break; | |
| 1197 | ||
| 1198 | // sub abs24, dn | |
| 1199 | case 0x68: case 0x69: case 0x6a: case 0x6b: | |
| 1200 | mn102->cycles -= 3; | |
| 1201 | mn102->d[opcode & 3] = do_sub(mn102, mn102->d[opcode & 3], r24u(mn102, mn102->pc+2)); | |
| 1202 | mn102->pc += 5; | |
| 1203 | break; | |
| 1204 | ||
| 1205 | // sub abs24, an | |
| 1206 | case 0x6c: case 0x6d: case 0x6e: case 0x6f: | |
| 1207 | mn102->cycles -= 3; | |
| 1208 | mn102->a[opcode & 3] = do_sub(mn102, mn102->a[opcode & 3], r24u(mn102, mn102->pc+2)); | |
| 1209 | mn102->pc += 5; | |
| 1210 | break; | |
| 1211 | ||
| 1212 | // mov imm24, dn | |
| 1213 | case 0x70: case 0x71: case 0x72: case 0x73: | |
| 1214 | mn102->cycles -= 3; | |
| 1215 | mn102->d[opcode & 3] = r24u(mn102, mn102->pc+2); | |
| 1216 | mn102->pc += 5; | |
| 1217 | break; | |
| 1218 | ||
| 1219 | // mov imm24, an | |
| 1220 | case 0x74: case 0x75: case 0x76: case 0x77: | |
| 1221 | mn102->cycles -= 3; | |
| 1222 | mn102->a[opcode & 3] = r24u(mn102, mn102->pc+2); | |
| 1223 | mn102->pc += 5; | |
| 1224 | break; | |
| 1225 | ||
| 1226 | // cmp abs24, dn | |
| 1227 | case 0x78: case 0x79: case 0x7a: case 0x7b: | |
| 1228 | mn102->cycles -= 3; | |
| 1229 | do_sub(mn102, mn102->d[opcode & 3], r24u(mn102, mn102->pc+2)); | |
| 1230 | mn102->pc += 5; | |
| 1231 | break; | |
| 1232 | ||
| 1233 | // cmp abs24, an | |
| 1234 | case 0x7c: case 0x7d: case 0x7e: case 0x7f: | |
| 1235 | mn102->cycles -= 3; | |
| 1236 | do_sub(mn102, mn102->a[opcode & 3], r24u(mn102, mn102->pc+2)); | |
| 1237 | mn102->pc += 5; | |
| 1238 | break; | |
| 1239 | ||
| 1240 | // mov (abs24, an), dm | |
| 1241 | case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: | |
| 1242 | case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: | |
| 1243 | mn102->cycles -= 3; | |
| 1244 | mn102->d[opcode & 3] = (INT16)mn102_read_word(mn102, (mn102->a[(opcode>>2) & 3] + r24u(mn102, mn102->pc+2)) & 0xffffff); | |
| 1245 | mn102->pc += 5; | |
| 1246 | break; | |
| 1247 | ||
| 1248 | // movbu (abs24, an), dm | |
| 1249 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 1250 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 1251 | mn102->cycles -= 3; | |
| 1252 | mn102->d[opcode & 3] = mn102_read_byte(mn102, (mn102->a[(opcode>>2) & 3] + r24u(mn102, mn102->pc+2)) & 0xffffff); | |
| 1253 | mn102->pc += 5; | |
| 1254 | break; | |
| 1255 | ||
| 1256 | // movb (abs24, an), dm | |
| 1257 | case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: | |
| 1258 | case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: | |
| 1259 | mn102->cycles -= 3; | |
| 1260 | mn102->d[opcode & 3] = (INT8)mn102_read_byte(mn102, (mn102->a[(opcode>>2) & 3] + r24u(mn102, mn102->pc+2)) & 0xffffff); | |
| 1261 | mn102->pc += 5; | |
| 1262 | break; | |
| 1263 | ||
| 1264 | // movx (abs24, an), dm | |
| 1265 | case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: | |
| 1266 | case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: | |
| 1267 | mn102->cycles -= 4; | |
| 1268 | mn102->d[opcode & 3] = r24u(mn102, (mn102->a[(opcode>>2) & 3] + r24u(mn102, mn102->pc+2)) & 0xffffff); | |
| 1269 | mn102->pc += 5; | |
| 1270 | break; | |
| 1271 | ||
| 1272 | // mov (abs24), dn | |
| 1273 | case 0xc0: case 0xc1: case 0xc2: case 0xc3: | |
| 1274 | mn102->cycles -= 3; | |
| 1275 | mn102->d[opcode & 3] = (INT16)mn102_read_word(mn102, r24u(mn102, mn102->pc+2)); | |
| 1276 | mn102->pc += 5; | |
| 1277 | break; | |
| 1278 | ||
| 1279 | // movb (abs24), dn | |
| 1280 | case 0xc4: case 0xc5: case 0xc6: case 0xc7: | |
| 1281 | mn102->cycles -= 3; | |
| 1282 | mn102->d[opcode & 3] = (INT8)mn102_read_byte(mn102, r24u(mn102, mn102->pc+2)); | |
| 1283 | mn102->pc += 5; | |
| 1284 | break; | |
| 1285 | ||
| 1286 | // movbu (abs24), dn | |
| 1287 | case 0xc8: case 0xc9: case 0xca: case 0xcb: | |
| 1288 | mn102->cycles -= 3; | |
| 1289 | mn102->d[opcode & 3] = mn102_read_byte(mn102, r24u(mn102, mn102->pc+2)); | |
| 1290 | mn102->pc += 5; | |
| 1291 | break; | |
| 1292 | ||
| 1293 | // mov (abs24), an | |
| 1294 | case 0xd0: case 0xd1: case 0xd2: case 0xd3: | |
| 1295 | mn102->cycles -= 4; | |
| 1296 | mn102->a[opcode & 3] = r24u(mn102, r24u(mn102, mn102->pc+2)); | |
| 1297 | mn102->pc += 5; | |
| 1298 | break; | |
| 1299 | ||
| 1300 | // jmp imm24 | |
| 1301 | case 0xe0: | |
| 1302 | mn102->cycles -= 4; | |
| 1303 | mn102_change_pc(mn102, mn102->pc+5+r24u(mn102, mn102->pc+2)); | |
| 1304 | break; | |
| 1305 | ||
| 1306 | // jsr label24 | |
| 1307 | case 0xe1: | |
| 1308 | mn102->cycles -= 5; | |
| 1309 | do_jsr(mn102, mn102->pc+5+r24u(mn102, mn102->pc+2), mn102->pc+5); | |
| 1310 | break; | |
| 1311 | ||
| 1312 | ||
| 1313 | // mov (abs24, an), am | |
| 1314 | case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7: | |
| 1315 | case 0xf8: case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff: | |
| 1316 | mn102->cycles -= 4; | |
| 1317 | mn102->a[opcode & 3] = r24u(mn102, (mn102->a[(opcode>>2) & 3] + r24u(mn102, mn102->pc+2)) & 0xffffff); | |
| 1318 | mn102->pc += 5; | |
| 1319 | break; | |
| 1320 | ||
| 1321 | default: | |
| 1322 | unemul(mn102); | |
| 1323 | break; | |
| 1324 | } | |
| 1325 | break; | |
| 1326 | ||
| 1327 | case 0xf5: | |
| 1328 | opcode = mn102_read_byte(mn102, mn102->pc+1); | |
| 1329 | switch(opcode) { | |
| 1330 | ||
| 1331 | // and imm8, dn | |
| 1332 | case 0x00: case 0x01: case 0x02: case 0x03: | |
| 1333 | mn102->cycles -= 2; | |
| 1334 | test_nz16(mn102, mn102->d[opcode & 3] &= 0xff0000|mn102_read_byte(mn102, mn102->pc+2)); | |
| 1335 | mn102->pc += 3; | |
| 1336 | break; | |
| 1337 | ||
| 1338 | // btst imm8, dn | |
| 1339 | case 0x04: case 0x05: case 0x06: case 0x07: | |
| 1340 | mn102->cycles -= 2; | |
| 1341 | test_nz16(mn102, mn102->d[opcode & 3] & mn102_read_byte(mn102, mn102->pc+2)); | |
| 1342 | mn102->pc += 3; | |
| 1343 | break; | |
| 1344 | ||
| 1345 | // or imm8, dn | |
| 1346 | case 0x08: case 0x09: case 0x0a: case 0x0b: | |
| 1347 | mn102->cycles -= 2; | |
| 1348 | test_nz16(mn102, mn102->d[opcode & 3] |= mn102_read_byte(mn102, mn102->pc+2)); | |
| 1349 | mn102->pc += 3; | |
| 1350 | break; | |
| 1351 | ||
| 1352 | // addnf imm8, an | |
| 1353 | case 0x0c: case 0x0d: case 0x0e: case 0x0f: | |
| 1354 | mn102->cycles -= 2; | |
| 1355 | mn102->a[opcode & 3] = mn102->a[opcode & 3] +(INT8)mn102_read_byte(mn102, mn102->pc+2); | |
| 1356 | mn102->pc += 3; | |
| 1357 | break; | |
| 1358 | ||
| 1359 | // movb dm, (d8, an) | |
| 1360 | case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: | |
| 1361 | case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: | |
| 1362 | mn102->cycles -= 2; | |
| 1363 | mn102_write_byte(mn102, (mn102->a[(opcode>>2) & 3]+(INT8)mn102_read_byte(mn102, mn102->pc+2)) & 0xffffff, mn102->d[opcode & 3]); | |
| 1364 | mn102->pc += 3; | |
| 1365 | break; | |
| 1366 | ||
| 1367 | // movb (d8, an), dm | |
| 1368 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: | |
| 1369 | case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: | |
| 1370 | mn102->cycles -= 2; | |
| 1371 | mn102->d[opcode & 3] = (INT8)mn102_read_byte(mn102, (mn102->a[(opcode>>2) & 3]+(INT8)mn102_read_byte(mn102, mn102->pc+2)) & 0xffffff); | |
| 1372 | mn102->pc += 3; | |
| 1373 | break; | |
| 1374 | ||
| 1375 | // movbu (d8, an), dm | |
| 1376 | case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: | |
| 1377 | case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: | |
| 1378 | mn102->cycles -= 2; | |
| 1379 | mn102->d[opcode & 3] = mn102_read_byte(mn102, (mn102->a[(opcode>>2) & 3]+(INT8)mn102_read_byte(mn102, mn102->pc+2)) & 0xffffff); | |
| 1380 | mn102->pc += 3; | |
| 1381 | break; | |
| 1382 | ||
| 1383 | // movx dm, (d8, an) | |
| 1384 | case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: | |
| 1385 | case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: | |
| 1386 | mn102->cycles -= 3; | |
| 1387 | w24(mn102, (mn102->a[(opcode>>2) & 3]+(INT8)mn102_read_byte(mn102, mn102->pc+2)) & 0xffffff, mn102->d[opcode & 3]); | |
| 1388 | mn102->pc += 3; | |
| 1389 | break; | |
| 1390 | ||
| 1391 | // movx (d8, an), dm | |
| 1392 | case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: | |
| 1393 | case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: | |
| 1394 | mn102->cycles -= 3; | |
| 1395 | mn102->d[opcode & 3] = r24u(mn102, (mn102->a[(opcode>>2) & 3]+(INT8)mn102_read_byte(mn102, mn102->pc+2)) & 0xffffff); | |
| 1396 | mn102->pc += 3; | |
| 1397 | break; | |
| 1398 | ||
| 1399 | // bltx label8 | |
| 1400 | case 0xe0: | |
| 1401 | if(((mn102->psw & 0xa0) == 0x20) || ((mn102->psw & 0xa0) == 0x80)) { | |
| 1402 | mn102->cycles -= 3; | |
| 1403 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1404 | } else { | |
| 1405 | mn102->cycles -= 2; | |
| 1406 | mn102->pc += 3; | |
| 1407 | } | |
| 1408 | break; | |
| 1409 | ||
| 1410 | // bgtx label8 | |
| 1411 | case 0xe1: | |
| 1412 | if(((mn102->psw & 0xb0) == 0) || ((mn102->psw & 0xb0) == 0xa0)) { | |
| 1413 | mn102->cycles -= 3; | |
| 1414 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1415 | } else { | |
| 1416 | mn102->cycles -= 2; | |
| 1417 | mn102->pc += 3; | |
| 1418 | } | |
| 1419 | break; | |
| 1420 | ||
| 1421 | // bgex label8 | |
| 1422 | case 0xe2: | |
| 1423 | if(((mn102->psw & 0xa0) == 0) || ((mn102->psw & 0xa0) == 0xa0)) { | |
| 1424 | mn102->cycles -= 3; | |
| 1425 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1426 | } else { | |
| 1427 | mn102->cycles -= 2; | |
| 1428 | mn102->pc += 3; | |
| 1429 | } | |
| 1430 | break; | |
| 1431 | ||
| 1432 | // blex label8 | |
| 1433 | case 0xe3: | |
| 1434 | if((mn102->psw & 0x10) || ((mn102->psw & 0xa0) == 0x20) || ((mn102->psw & 0xa0) == 0x80)) { | |
| 1435 | mn102->cycles -= 3; | |
| 1436 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1437 | } else { | |
| 1438 | mn102->cycles -= 2; | |
| 1439 | mn102->pc += 3; | |
| 1440 | } | |
| 1441 | break; | |
| 1442 | ||
| 1443 | // bcsx label8 | |
| 1444 | case 0xe4: | |
| 1445 | if(mn102->psw & 0x40) { | |
| 1446 | mn102->cycles -= 3; | |
| 1447 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1448 | } else { | |
| 1449 | mn102->cycles -= 2; | |
| 1450 | mn102->pc += 3; | |
| 1451 | } | |
| 1452 | break; | |
| 1453 | ||
| 1454 | // bhix label8 | |
| 1455 | case 0xe5: | |
| 1456 | if(!(mn102->psw & 0x50)) { | |
| 1457 | mn102->cycles -= 3; | |
| 1458 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1459 | } else { | |
| 1460 | mn102->cycles -= 2; | |
| 1461 | mn102->pc += 3; | |
| 1462 | } | |
| 1463 | break; | |
| 1464 | ||
| 1465 | // bccx label8 | |
| 1466 | case 0xe6: | |
| 1467 | if(!(mn102->psw & 0x40)) { | |
| 1468 | mn102->cycles -= 3; | |
| 1469 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1470 | } else { | |
| 1471 | mn102->cycles -= 2; | |
| 1472 | mn102->pc += 3; | |
| 1473 | } | |
| 1474 | break; | |
| 1475 | ||
| 1476 | // blsx label8 | |
| 1477 | case 0xe7: | |
| 1478 | if(mn102->psw & 0x50) { | |
| 1479 | mn102->cycles -= 3; | |
| 1480 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1481 | } else { | |
| 1482 | mn102->cycles -= 2; | |
| 1483 | mn102->pc += 3; | |
| 1484 | } | |
| 1485 | break; | |
| 1486 | ||
| 1487 | // beqx label8 | |
| 1488 | case 0xe8: | |
| 1489 | if(mn102->psw & 0x10) { | |
| 1490 | mn102->cycles -= 3; | |
| 1491 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1492 | } else { | |
| 1493 | mn102->cycles -= 2; | |
| 1494 | mn102->pc += 3; | |
| 1495 | } | |
| 1496 | break; | |
| 1497 | ||
| 1498 | // bnex label8 | |
| 1499 | case 0xe9: | |
| 1500 | if(!(mn102->psw & 0x10)) { | |
| 1501 | mn102->cycles -= 3; | |
| 1502 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1503 | } else { | |
| 1504 | mn102->cycles -= 2; | |
| 1505 | mn102->pc += 3; | |
| 1506 | } | |
| 1507 | break; | |
| 1508 | ||
| 1509 | ||
| 1510 | // bnc label8 | |
| 1511 | case 0xfe: | |
| 1512 | if(!(mn102->psw & 0x02)) { | |
| 1513 | mn102->cycles -= 3; | |
| 1514 | mn102_change_pc(mn102, mn102->pc+3+(INT8)mn102_read_byte(mn102, mn102->pc+2)); | |
| 1515 | } else { | |
| 1516 | mn102->cycles -= 2; | |
| 1517 | mn102->pc += 3; | |
| 1518 | } | |
| 1519 | break; | |
| 1520 | ||
| 1521 | default: | |
| 1522 | unemul(mn102); | |
| 1523 | break; | |
| 1524 | } | |
| 1525 | break; | |
| 1526 | ||
| 1527 | case 0xf7: | |
| 1528 | opcode = mn102_read_byte(mn102, mn102->pc+1); | |
| 1529 | switch(opcode) { | |
| 1530 | // and imm16, dn | |
| 1531 | case 0x00: case 0x01: case 0x02: case 0x03: | |
| 1532 | mn102->cycles -= 2; | |
| 1533 | test_nz16(mn102, mn102->d[opcode & 3] &= 0xff0000|mn102_read_word(mn102, mn102->pc+2)); | |
| 1534 | mn102->pc += 4; | |
| 1535 | break; | |
| 1536 | ||
| 1537 | // btst imm16, dn | |
| 1538 | case 0x04: case 0x05: case 0x06: case 0x07: | |
| 1539 | mn102->cycles -= 2; | |
| 1540 | test_nz16(mn102, mn102->d[opcode & 3] & mn102_read_word(mn102, mn102->pc+2)); | |
| 1541 | mn102->pc += 4; | |
| 1542 | break; | |
| 1543 | ||
| 1544 | // add imm16, an | |
| 1545 | case 0x08: case 0x09: case 0x0a: case 0x0b: | |
| 1546 | mn102->cycles -= 2; | |
| 1547 | mn102->a[opcode & 3] = do_add(mn102, mn102->a[opcode & 3], (INT16)mn102_read_word(mn102, mn102->pc+2)); | |
| 1548 | mn102->pc += 4; | |
| 1549 | break; | |
| 1550 | ||
| 1551 | // sub imm16, an | |
| 1552 | case 0x0c: case 0x0d: case 0x0e: case 0x0f: | |
| 1553 | mn102->cycles -= 2; | |
| 1554 | mn102->a[opcode & 3] = do_sub(mn102, mn102->a[opcode & 3], (INT16)mn102_read_word(mn102, mn102->pc+2)); | |
| 1555 | mn102->pc += 4; | |
| 1556 | break; | |
| 1557 | ||
| 1558 | // and imm16, psw | |
| 1559 | case 0x10: | |
| 1560 | mn102->cycles -= 3; | |
| 1561 | mn102->psw &= mn102_read_word(mn102, mn102->pc+2); | |
| 1562 | mn102->pc += 4; | |
| 1563 | break; | |
| 1564 | ||
| 1565 | // or imm16, psw | |
| 1566 | case 0x14: | |
| 1567 | mn102->cycles -= 3; | |
| 1568 | mn102->psw |= mn102_read_word(mn102, mn102->pc+2); | |
| 1569 | mn102->pc += 4; | |
| 1570 | break; | |
| 1571 | ||
| 1572 | // add imm16, dn | |
| 1573 | case 0x18: case 0x19: case 0x1a: case 0x1b: | |
| 1574 | mn102->cycles -= 2; | |
| 1575 | mn102->d[opcode & 3] = do_add(mn102, mn102->d[opcode & 3], (INT16)mn102_read_word(mn102, mn102->pc+2)); | |
| 1576 | mn102->pc += 4; | |
| 1577 | break; | |
| 1578 | ||
| 1579 | // sub imm16, dn | |
| 1580 | case 0x1c: case 0x1d: case 0x1e: case 0x1f: | |
| 1581 | mn102->cycles -= 2; | |
| 1582 | mn102->d[opcode & 3] = do_sub(mn102, mn102->d[opcode & 3], (INT16)mn102_read_word(mn102, mn102->pc+2)); | |
| 1583 | mn102->pc += 4; | |
| 1584 | break; | |
| 1585 | ||
| 1586 | // or imm16, dn | |
| 1587 | case 0x40: case 0x41: case 0x42: case 0x43: | |
| 1588 | mn102->cycles -= 3; | |
| 1589 | test_nz16(mn102, mn102->d[opcode & 3] |= mn102_read_word(mn102, mn102->pc+2)); | |
| 1590 | mn102->pc += 4; | |
| 1591 | break; | |
| 1592 | ||
| 1593 | // cmp imm16, dn | |
| 1594 | case 0x48: case 0x49: case 0x4a: case 0x4b: | |
| 1595 | mn102->cycles -= 2; | |
| 1596 | do_sub(mn102, mn102->d[opcode & 3], (INT16)mn102_read_word(mn102, mn102->pc+2)); | |
| 1597 | mn102->pc += 4; | |
| 1598 | break; | |
| 1599 | ||
| 1600 | // xor imm16, dn | |
| 1601 | case 0x4c: case 0x4d: case 0x4e: case 0x4f: | |
| 1602 | mn102->cycles -= 3; | |
| 1603 | test_nz16(mn102, mn102->d[opcode & 3] ^= mn102_read_word(mn102, mn102->pc+2)); | |
| 1604 | mn102->pc += 4; | |
| 1605 | break; | |
| 1606 | ||
| 1607 | // mov dm, (imm16, an) | |
| 1608 | case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: | |
| 1609 | case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: | |
| 1610 | mn102->cycles -= 2; | |
| 1611 | mn102_write_word(mn102, (mn102->a[(opcode>>2)&3]+(INT16)mn102_read_word(mn102, mn102->pc+2)) & 0xffffff, (UINT16)mn102->d[opcode & 3]); | |
| 1612 | mn102->pc += 4; | |
| 1613 | break; | |
| 1614 | ||
| 1615 | // mov (imm16, an), dm | |
| 1616 | case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: | |
| 1617 | case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: | |
| 1618 | mn102->cycles -= 2; | |
| 1619 | mn102->d[opcode & 3] = (INT16)mn102_read_word(mn102, (mn102->a[(opcode>>2) & 3] + (INT16)mn102_read_byte(mn102, mn102->pc+2)) & 0xffffff) & 0xffffff; | |
| 1620 | mn102->pc += 4; | |
| 1621 | break; | |
| 1622 | ||
| 1623 | ||
| 1624 | default: | |
| 1625 | unemul(mn102); | |
| 1626 | break; | |
| 1627 | } | |
| 1628 | break; | |
| 1629 | ||
| 1630 | // mov imm16, dn | |
| 1631 | case 0xf8: case 0xf9: case 0xfa: case 0xfb: | |
| 1632 | mn102->cycles -= 1; | |
| 1633 | mn102->d[opcode & 3] = (INT16)mn102_read_word(mn102, mn102->pc+1); | |
| 1634 | mn102->pc += 3; | |
| 1635 | break; | |
| 1636 | ||
| 1637 | // jmp label16 | |
| 1638 | case 0xfc: | |
| 1639 | mn102->cycles -= 2; | |
| 1640 | mn102_change_pc(mn102, mn102->pc+3+(INT16)mn102_read_word(mn102, mn102->pc+1)); | |
| 1641 | break; | |
| 1642 | ||
| 1643 | // jsr label16 | |
| 1644 | case 0xfd: | |
| 1645 | mn102->cycles -= 4; | |
| 1646 | do_jsr(mn102, mn102->pc+3+(INT16)mn102_read_word(mn102, mn102->pc+1), mn102->pc+3); | |
| 1647 | break; | |
| 1648 | ||
| 1649 | // rts | |
| 1650 | case 0xfe: | |
| 1651 | mn102->cycles -= 5; | |
| 1652 | mn102_change_pc(mn102, r24u(mn102, mn102->a[3])); | |
| 1653 | mn102->a[3] += 4; | |
| 1654 | break; | |
| 1655 | ||
| 1656 | default: | |
| 1657 | unemul(mn102); | |
| 1658 | break; | |
| 1659 | } | |
| 1660 | } | |
| 1661 | ||
| 1662 | return cycles - mn102->cycles; | |
| 1663 | } | |
| 1664 | ||
| 1665 | const char *inames[10][4] = { | |
| 1666 | { "timer0", "timer1", "timer2", "timer3" }, | |
| 1667 | { "timer4", "timer5", "timer6", "timer7" }, | |
| 1668 | { "timer8", "timer9", "timer12a", "timer12b" }, | |
| 1669 | { "timer10u", "timer10a", "timer10b", "?" }, | |
| 1670 | { "timer11u", "timer11a", "timer11b", "?" }, | |
| 1671 | { "dma0", "dma1", "dma2", "dma3" }, | |
| 1672 | { "dma4", "dma5", "dma6", "dma7" }, | |
| 1673 | { "X0", "X1", "X2", "X3" }, | |
| 1674 | { "ser0tx", "ser0rx", "ser1tx", "ser1rx" }, | |
| 1675 | { "key", "a/d", "?", "?" } | |
| 1676 | }; | |
| 1677 | ||
| 1678 | static void mn10200_w(mn102_info *mn102, UINT32 adr, UINT32 data, int type) | |
| 1679 | { | |
| 1680 | if(type == MEM_WORD) { | |
| 1681 | mn10200_w(mn102, adr, data & 0xff, MEM_BYTE); | |
| 1682 | mn10200_w(mn102, adr+1, (data>>8) & 0xff, MEM_BYTE); | |
| 1683 | return; | |
| 1684 | } | |
| 1685 | ||
| 1686 | switch(adr) { | |
| 1687 | case 0x000: | |
| 1688 | if(data & 12) | |
| 1689 | log_event("CPU", "Stop request"); | |
| 1690 | break; | |
| 1691 | case 0x001: | |
| 1692 | log_event("WATCHDOG", "Write %d", data>>7); | |
| 1693 | break; | |
| 1694 | ||
| 1695 | case 0x002: case 0x003: // Memory control | |
| 1696 | break; | |
| 1697 | ||
| 1698 | case 0x030: case 0x031: // Memory mode reg 0 | |
| 1699 | case 0x032: case 0x033: // Memory mode reg 1 | |
| 1700 | case 0x034: case 0x035: // Memory mode reg 2 | |
| 1701 | case 0x036: case 0x037: // Memory mode reg 3 | |
| 1702 | break; | |
| 1703 | ||
| 1704 | // Non-Maskable irqs | |
| 1705 | case 0x040: | |
| 1706 | mn102->nmicr = data & 6; | |
| 1707 | break; | |
| 1708 | case 0x041: | |
| 1709 | break; | |
| 1710 | ||
| 1711 | // Maskable irq control | |
| 1712 | case 0x042: case 0x044: case 0x046: case 0x048: case 0x04a: | |
| 1713 | case 0x04c: case 0x04e: case 0x050: case 0x052: case 0x054: | |
| 1714 | mn102->icrl[((adr & 0x3f)>>1)-1] = data; | |
| 1715 | break; | |
| 1716 | ||
| 1717 | case 0x043: case 0x045: case 0x047: case 0x049: case 0x04b: | |
| 1718 | case 0x04d: case 0x04f: case 0x051: case 0x053: case 0x055: { | |
| 1719 | int irq = ((adr & 0x3f)>>1)-1; | |
| 1720 | if((mn102->icrh[irq] != data) && (data & 15)) | |
| 1721 | log_event("MN102", "irq %d enabled, level=%x, enable= %s %s %s %s", irq+1, (data >> 4) & 7, | |
| 1722 | data & 1 ? inames[irq][0] : "-", | |
| 1723 | data & 2 ? inames[irq][1] : "-", | |
| 1724 | data & 4 ? inames[irq][2] : "-", | |
| 1725 | data & 8 ? inames[irq][3] : "-"); | |
| 1726 | ||
| 1727 | if((mn102->icrh[irq] != data) && !(data & 15)) | |
| 1728 | log_event("MN102", "irq %d disabled", irq+1); | |
| 1729 | mn102->icrh[irq] = data; | |
| 1730 | break; | |
| 1731 | } | |
| 1732 | ||
| 1733 | case 0x056: { | |
| 1734 | // const char *modes[4] = { "l", "h", "fall", "rise" }; | |
| 1735 | // log_event("MN102", "irq3=%s irq2=%s irq1=%s irq0=%s", | |
| 1736 | // modes[(data >> 6) & 3], modes[(data >> 4) & 3], modes[(data >> 2) & 3], modes[data & 3]); | |
| 1737 | break; | |
| 1738 | } | |
| 1739 | ||
| 1740 | case 0x057: { | |
| 1741 | // const char *modes[4] = { "l", "1", "fall", "3" }; | |
| 1742 | // log_event("MN102", "irq_ki=%s", modes[data & 3]); | |
| 1743 | break; | |
| 1744 | } | |
| 1745 | ||
| 1746 | case 0x100: case 0x101: // DRAM control reg | |
| 1747 | case 0x102: case 0x103: // Refresh counter | |
| 1748 | break; | |
| 1749 | ||
| 1750 | case 0x180: case 0x190: { | |
| 1751 | int ser = (adr-0x180) >> 4; | |
| 1752 | // const char *parity[8] = { "no", "1", "2", "3", "l", "h", "even", "odd" }; | |
| 1753 | // const char *source[4] = { "sbt0", "timer 8", "2", "timer 9" }; | |
| 1754 | mn102->serial[ser].ctrll = data; | |
| 1755 | ||
| 1756 | // log_event("MN102", "Serial %d length=%c, parity=%s, stop=%c, source=%s", | |
| 1757 | // ser, | |
| 1758 | // data & 0x80 ? '8' : '7', parity[(data >> 4) & 7], | |
| 1759 | // data & 8 ? '2' : '1', source[data & 3]); | |
| 1760 | break; | |
| 1761 | } | |
| 1762 | ||
| 1763 | case 0x181: case 0x191: { | |
| 1764 | int ser = (adr-0x180) >> 4; | |
| 1765 | mn102->serial[ser].ctrlh = data; | |
| 1766 | // log_event("MN102", "Serial %d transmit=%s, recieve=%s, break=%s, proto=%s, order=%s", | |
| 1767 | // ser, | |
| 1768 | // data & 0x80 ? "on" : "off", data & 0x40 ? "on" : "off", | |
| 1769 | // data & 0x20 ? "on" : "off", data & 8 ? "sync" : "async", | |
| 1770 | // data & 2 ? "msb" : "lsb"); | |
| 1771 | break; | |
| 1772 | } | |
| 1773 | ||
| 1774 | case 0x182: case 0x192: { | |
| 1775 | int ser = (adr-0x180) >> 4; | |
| 1776 | mn102->serial[ser].buf = data; | |
| 1777 | log_event("MN102", "Serial %d buffer=%02x", ser, data); | |
| 1778 | break; | |
| 1779 | } | |
| 1780 | ||
| 1781 | case 0x1a0: | |
| 1782 | log_event("MN102", "AN %s timer7=%s /%d %s %s", | |
| 1783 | data & 0x80 ? "on" : "off", data & 0x40 ? "on" : "off", | |
| 1784 | 1 << ((data >> 2) & 3), data & 2 ? "continuous" : "single", data & 1 ? "one" : "multi"); | |
| 1785 | break; | |
| 1786 | ||
| 1787 | case 0x1a1: | |
| 1788 | log_event("MN102", "AN chans=0-%d current=%d", (data >> 4) & 7, data & 7); | |
| 1789 | break; | |
| 1790 | ||
| 1791 | case 0x210: case 0x211: case 0x212: case 0x213: case 0x214: | |
| 1792 | case 0x215: case 0x216: case 0x217: case 0x218: case 0x219: | |
| 1793 | log_event("MN102", "Timer %d value set %02x", adr-0x210, data); | |
| 1794 | break; | |
| 1795 | ||
| 1796 | case 0x21a: | |
| 1797 | log_event("MN102", "Prescale 0 cycle count %02x", data); | |
| 1798 | break; | |
| 1799 | ||
| 1800 | case 0x21b: | |
| 1801 | log_event("MN102", "Prescale 1 cycle count %02x", data); | |
| 1802 | break; | |
| 1803 | ||
| 1804 | case 0x220: case 0x221: case 0x222: case 0x223: case 0x224: | |
| 1805 | case 0x225: case 0x226: case 0x227: case 0x228: case 0x229: { | |
| 1806 | // const char *source[4] = { "TMxIO", "cascade", "prescale 0", "prescale 1" }; | |
| 1807 | // log_event("MN102", "Timer %d %s b6=%d, source=%s", adr-0x220, data & 0x80 ? "on" : "off", (data & 0x40) != 0, source[data & 3]); | |
| 1808 | break; | |
| 1809 | } | |
| 1810 | ||
| 1811 | case 0x22a: | |
| 1812 | log_event("MN102", "Prescale 0 %s, ps0bc %s", | |
| 1813 | data & 0x80 ? "on" : "off", data & 0x40 ? "-> ps0br" : "off"); | |
| 1814 | break; | |
| 1815 | ||
| 1816 | case 0x22b: | |
| 1817 | log_event("MN102", "Prescale 1 %s, ps1bc %s", | |
| 1818 | data & 0x80 ? "on" : "off", data & 0x40 ? "-> ps1br" : "off"); | |
| 1819 | break; | |
| 1820 | ||
| 1821 | case 0x230: case 0x240: case 0x250: { | |
| 1822 | // const char *modes[4] = { "single", "double", "ioa", "iob" }; | |
| 1823 | // const char *sources[8] = { "pres.0", "pres.1", "iob", "sysclk", "*4", "*1", "6", "7" }; | |
| 1824 | // log_event("MN102", "Timer %d comp=%s on_1=%s on_match=%s phase=%s source=%s", | |
| 1825 | // 10 + ((adr-0x230) >> 4), | |
| 1826 | // modes[data >> 6], data & 0x20 ? "cleared" : "not cleared", data & 0x10 ? "cleared" : "not cleared", | |
| 1827 | // data & 8 ? "tff" : "rsff", sources[data & 7]); | |
| 1828 | break; | |
| 1829 | } | |
| 1830 | ||
| 1831 | case 0x231: case 0x241: case 0x251: { | |
| 1832 | // const char *modes[4] = { "up", "down", "up on ioa", "up on iob" }; | |
| 1833 | // log_event("MN102", "Timer %d %s ff=%s op=%s ext_trig=%s %s", | |
| 1834 | // 10 + ((adr-0x230) >> 4), | |
| 1835 | // data & 0x80 ? "enable" : "disable", data & 0x40 ? "operate" : "clear", | |
| 1836 | // modes[(data >> 4) & 3], data & 2 ? "on" : "off", data & 1 ? "one-shot" : "repeat"); | |
| 1837 | ||
| 1838 | break; | |
| 1839 | } | |
| 1840 | ||
| 1841 | case 0x234: case 0x244: case 0x254: | |
| 1842 | log_event("MN102", "Timer %d ca=--%02x", 10 + ((adr-0x230) >> 4), data); | |
| 1843 | break; | |
| 1844 | ||
| 1845 | case 0x235: case 0x245: case 0x255: | |
| 1846 | log_event("MN102", "Timer %d ca=%02x--", 10 + ((adr-0x230) >> 4), data); | |
| 1847 | break; | |
| 1848 | ||
| 1849 | case 0x236: case 0x246: case 0x256: | |
| 1850 | log_event("MN102", "Timer %d ca read trigger", 10 + ((adr-0x230) >> 4)); | |
| 1851 | break; | |
| 1852 | ||
| 1853 | case 0x237: case 0x247: case 0x257: break; | |
| 1854 | ||
| 1855 | case 0x238: case 0x248: case 0x258: | |
| 1856 | log_event("MN102", "Timer %d cb=--%02x", 10 + ((adr-0x230) >> 4), data); | |
| 1857 | break; | |
| 1858 | ||
| 1859 | case 0x239: case 0x249: case 0x259: | |
| 1860 | log_event("MN102", "Timer %d cb=%02x--", 10 + ((adr-0x230) >> 4), data); | |
| 1861 | break; | |
| 1862 | ||
| 1863 | case 0x23a: case 0x24a: case 0x25a: | |
| 1864 | log_event("MN102", "Timer %d cb read trigger", 10 + ((adr-0x230) >> 4)); | |
| 1865 | break; | |
| 1866 | ||
| 1867 | case 0x23b: case 0x24b: case 0x25b: break; | |
| 1868 | ||
| 1869 | case 0x260: case 0x261: { | |
| 1870 | // const char *mode[4] = { "sysbuf", "4-phase", "4-phase 1/2", "3" }; | |
| 1871 | // log_event("MN102", "Sync Output %c timing=%s out=%s dir=%s mode=%s", | |
| 1872 | // adr == 0x261 ? 'B' : 'A', | |
| 1873 | // data & 0x10 ? "12A" : "1", data & 8 ? "sync a" :"P13-10", | |
| 1874 | // data & 4 ? "ccw" : "cw", mode[data & 3]); | |
| 1875 | break; | |
| 1876 | } | |
| 1877 | ||
| 1878 | case 0x262: | |
| 1879 | log_event("MN102", "Sync Output buffer = %02x", data); | |
| 1880 | break; | |
| 1881 | ||
| 1882 | case 0x264: | |
| 1883 | memory_write_byte_8le(mn102->io, MN10200_PORT1, data); | |
| 1884 | break; | |
| 1885 | ||
| 1886 | case 0x280: case 0x290: case 0x2a0: case 0x2b0: case 0x2c0: case 0x2d0: case 0x2e0: case 0x2f0: { | |
| 1887 | int dma = (adr-0x280) >> 4; | |
| 1888 | mn102->dma[dma].adr = (mn102->dma[dma].adr & 0x00ffff00) | data; | |
| 1889 | log_event("MN102", "DMA %d adr=%06x", dma, mn102->dma[dma].adr); | |
| 1890 | break; | |
| 1891 | } | |
| 1892 | ||
| 1893 | case 0x281: case 0x291: case 0x2a1: case 0x2b1: case 0x2c1: case 0x2d1: case 0x2e1: case 0x2f1: { | |
| 1894 | int dma = (adr-0x280) >> 4; | |
| 1895 | mn102->dma[dma].adr = (mn102->dma[dma].adr & 0x00ff00ff) | (data << 8); | |
| 1896 | log_event("MN102", "DMA %d adr=%06x", dma, mn102->dma[dma].adr); | |
| 1897 | break; | |
| 1898 | } | |
| 1899 | ||
| 1900 | case 0x282: case 0x292: case 0x2a2: case 0x2b2: case 0x2c2: case 0x2d2: case 0x2e2: case 0x2f2: { | |
| 1901 | int dma = (adr-0x280) >> 4; | |
| 1902 | mn102->dma[dma].adr = (mn102->dma[dma].adr & 0x0000ffff) | (data << 16); | |
| 1903 | log_event("MN102", "DMA %d adr=%06x", dma, mn102->dma[dma].adr); | |
| 1904 | break; | |
| 1905 | } | |
| 1906 | ||
| 1907 | case 0x283: case 0x293: case 0x2a3: case 0x2b3: case 0x2c3: case 0x2d3: case 0x2e3: case 0x2f3: | |
| 1908 | break; | |
| 1909 | ||
| 1910 | case 0x284: case 0x294: case 0x2a4: case 0x2b4: case 0x2c4: case 0x2d4: case 0x2e4: case 0x2f4: { | |
| 1911 | int dma = (adr-0x280) >> 4; | |
| 1912 | mn102->dma[dma].count = (mn102->dma[dma].count & 0x00ffff00) | data; | |
| 1913 | log_event("MN102", "DMA %d count=%06x", dma, mn102->dma[dma].count); | |
| 1914 | break; | |
| 1915 | } | |
| 1916 | ||
| 1917 | case 0x285: case 0x295: case 0x2a5: case 0x2b5: case 0x2c5: case 0x2d5: case 0x2e5: case 0x2f5: { | |
| 1918 | int dma = (adr-0x280) >> 4; | |
| 1919 | mn102->dma[dma].count = (mn102->dma[dma].count & 0x00ff00ff) | (data << 8); | |
| 1920 | log_event("MN102", "DMA %d count=%06x", dma, mn102->dma[dma].count); | |
| 1921 | break; | |
| 1922 | } | |
| 1923 | ||
| 1924 | case 0x286: case 0x296: case 0x2a6: case 0x2b6: case 0x2c6: case 0x2d6: case 0x2e6: case 0x2f6: { | |
| 1925 | int dma = (adr-0x280) >> 4; | |
| 1926 | mn102->dma[dma].count = (mn102->dma[dma].count & 0x0000ffff) | (data << 16); | |
| 1927 | log_event("MN102", "DMA %d count=%06x", dma, mn102->dma[dma].count); | |
| 1928 | break; | |
| 1929 | } | |
| 1930 | ||
| 1931 | case 0x287: case 0x297: case 0x2a7: case 0x2b7: case 0x2c7: case 0x2d7: case 0x2e7: case 0x2f7: | |
| 1932 | break; | |
| 1933 | ||
| 1934 | case 0x288: case 0x298: case 0x2a8: case 0x2b8: case 0x2c8: case 0x2d8: case 0x2e8: case 0x2f8: { | |
| 1935 | int dma = (adr-0x280) >> 4; | |
| 1936 | mn102->dma[dma].iadr = (mn102->dma[dma].iadr & 0xff00) | data; | |
| 1937 | log_event("MN102", "DMA %d iadr=%03x", dma, mn102->dma[dma].iadr); | |
| 1938 | break; | |
| 1939 | } | |
| 1940 | ||
| 1941 | case 0x289: case 0x299: case 0x2a9: case 0x2b9: case 0x2c9: case 0x2d9: case 0x2e9: case 0x2f9: { | |
| 1942 | int dma = (adr-0x280) >> 4; | |
| 1943 | mn102->dma[dma].iadr = (mn102->dma[dma].iadr & 0x00ff) | ((data & 3) << 8); | |
| 1944 | log_event("MN102", "DMA %d iadr=%03x", dma, mn102->dma[dma].iadr); | |
| 1945 | break; | |
| 1946 | } | |
| 1947 | ||
| 1948 | case 0x28a: case 0x29a: case 0x2aa: case 0x2ba: case 0x2ca: case 0x2da: case 0x2ea: case 0x2fa: { | |
| 1949 | /* static const char *trans[4] = { "M-IO", "M-M", "M-X1", "m-X2" }; | |
| 1950 | static const char *start[32] = { | |
| 1951 | "soft", "a/d", "ser0tx", "set0rx", "ser1tx", "ser1rx", | |
| 1952 | "timer0", "timer1", "timer2", "timer3", "timer4", "timer5", "timer6", "timer7", "timer8", "timer9", | |
| 1953 | "timer10u", "timer10a", "timer10b", | |
| 1954 | "timer11u", "timer11a", "timer12b", | |
| 1955 | "timer12a", "timer12b", | |
| 1956 | "irq0", "irq1", "irq2", "irq3", | |
| 1957 | "X0e", "X1e", "X0l", "X1l" | |
| 1958 | }; */ | |
| 1959 | ||
| 1960 | int dma = (adr-0x280) >> 4; | |
| 1961 | mn102->dma[dma].ctrll = data; | |
| 1962 | log_event("MN102", "DMA %d control ack=%s, trans=%s, start=%s", | |
| 1963 | dma, | |
| 1964 | data & 0x80 ? "level" : "pulse", | |
| 1965 | trans[(data >> 5) & 3], | |
| 1966 | start[data & 31]); | |
| 1967 | break; | |
| 1968 | } | |
| 1969 | ||
| 1970 | case 0x28b: case 0x29b: case 0x2ab: case 0x2bb: case 0x2cb: case 0x2db: case 0x2eb: case 0x2fb: { | |
| 1971 | // static const char *tradr[4] = { "inc", "dec", "fixed", "reserved" }; | |
| 1972 | int dma = (adr-0x280) >> 4; | |
| 1973 | mn102->dma[dma].ctrlh = data; | |
| 1974 | /* log_event("MN102", "DMA %d control %s irq=%s %s %s dir=%s %s %s", | |
| 1975 | dma, | |
| 1976 | data & 0x80 ? "enable" : "disable", | |
| 1977 | data & 0x40 ? "off" : "on", | |
| 1978 | data & 0x20 ? "byte" : "word", | |
| 1979 | data & 0x10 ? "burst" : "single", | |
| 1980 | data & 0x08 ? "dst" : "src", | |
| 1981 | data & 0x04 ? "continue" : "normal", | |
| 1982 | tradr[data & 3]);*/ | |
| 1983 | break; | |
| 1984 | } | |
| 1985 | ||
| 1986 | case 0x28c: case 0x29c: case 0x2ac: case 0x2bc: case 0x2cc: case 0x2dc: case 0x2ec: case 0x2fc: { | |
| 1987 | int dma = (adr-0x280) >> 4; | |
| 1988 | mn102->dma[dma].irq = data & 7; | |
| 1989 | log_event("MN102", "DMA %d irq=%d", dma, data & 7); | |
| 1990 | break; | |
| 1991 | } | |
| 1992 | ||
| 1993 | case 0x28d: case 0x29d: case 0x2ad: case 0x2bd: case 0x2cd: case 0x2dd: case 0x2ed: case 0x2fd: | |
| 1994 | break; | |
| 1995 | ||
| 1996 | case 0x3b0: | |
| 1997 | log_event("MN102", "Pull-ups 0-7 = -%c%c%c%c%c%c%c", | |
| 1998 | data & 0x40 ? '#' : '.', | |
| 1999 | data & 0x20 ? '#' : '.', | |
| 2000 | data & 0x10 ? '#' : '.', | |
| 2001 | data & 0x08 ? '#' : '.', | |
| 2002 | data & 0x04 ? '#' : '.', | |
| 2003 | data & 0x02 ? '#' : '.', | |
| 2004 | data & 0x01 ? '#' : '.'); | |
| 2005 | break; | |
| 2006 | ||
| 2007 | case 0x3b1: | |
| 2008 | log_event("MN102", "Pull-ups 8-f = --%c%c%c%c%c%c", | |
| 2009 | data & 0x20 ? '#' : '.', | |
| 2010 | data & 0x10 ? '#' : '.', | |
| 2011 | data & 0x08 ? '#' : '.', | |
| 2012 | data & 0x04 ? '#' : '.', | |
| 2013 | data & 0x02 ? '#' : '.', | |
| 2014 | data & 0x01 ? '#' : '.'); | |
| 2015 | break; | |
| 2016 | ||
| 2017 | case 0x3b2: | |
| 2018 | log_event("MN102", "Timer I/O 4-0 = %c%c%c%c%c", | |
| 2019 | data & 0x10 ? 'o' : 'i', | |
| 2020 | data & 0x08 ? 'o' : 'i', | |
| 2021 | data & 0x04 ? 'o' : 'i', | |
| 2022 | data & 0x02 ? 'o' : 'i', | |
| 2023 | data & 0x01 ? 'o' : 'i'); | |
| 2024 | break; | |
| 2025 | ||
| 2026 | case 0x3b3: | |
| 2027 | log_event("MN102", "Timer I/O 12b/a-10b/a = %c%c %c%c %c%c", | |
| 2028 | data & 0x20 ? 'o' : 'i', | |
| 2029 | data & 0x10 ? 'o' : 'i', | |
| 2030 | data & 0x08 ? 'o' : 'i', | |
| 2031 | data & 0x04 ? 'o' : 'i', | |
| 2032 | data & 0x02 ? 'o' : 'i', | |
| 2033 | data & 0x01 ? 'o' : 'i'); | |
| 2034 | break; | |
| 2035 | ||
| 2036 | case 0x3c0: // port 0 data | |
| 2037 | memory_write_byte_8le(mn102->io, MN10200_PORT0, data); | |
| 2038 | break; | |
| 2039 | ||
| 2040 | case 0x3c2: // port 2 data | |
| 2041 | memory_write_byte_8le(mn102->io, MN10200_PORT2, data); | |
| 2042 | break; | |
| 2043 | ||
| 2044 | case 0x3c3: // port 3 data | |
| 2045 | memory_write_byte_8le(mn102->io, MN10200_PORT3, data); | |
| 2046 | break; | |
| 2047 | ||
| 2048 | case 0x3e0: // port0 ddr | |
| 2049 | mn102->ddr[0] = data; | |
| 2050 | break; | |
| 2051 | ||
| 2052 | case 0x3e1: // port1 ddr | |
| 2053 | mn102->ddr[1] = data; | |
| 2054 | break; | |
| 2055 | ||
| 2056 | case 0x3e2: // port2 ddr | |
| 2057 | mn102->ddr[2] = data; | |
| 2058 | break; | |
| 2059 | ||
| 2060 | case 0x3e3: // port3 ddr | |
| 2061 | mn102->ddr[3] = data; | |
| 2062 | break; | |
| 2063 | ||
| 2064 | case 0x3f3: | |
| 2065 | /* log_event("MN102", "Port 3 bits 4=%s 3=%s 2=%s 1=%s 0=%s", | |
| 2066 | data & 0x10 ? data & 0x40 ? "serial_1" : "tm9" : "p34", | |
| 2067 | data & 0x08 ? data & 0x20 ? "serial_0" : "tm8" : "p33", | |
| 2068 | data & 0x04 ? "tm7" : "p32", | |
| 2069 | data & 0x04 ? "tm6" : "p31", | |
| 2070 | data & 0x04 ? "tm5" : "p30");*/ | |
| 2071 | break; | |
| 2072 | ||
| 2073 | ||
| 2074 | default: | |
| 2075 | log_event("MN102", "internal_w %04x, %02x (%03x)", adr+0xfc00, data, adr); | |
| 2076 | break; | |
| 2077 | } | |
| 2078 | } | |
| 2079 | ||
| 2080 | static UINT32 mn10200_r(mn102_info *mn102, UINT32 adr, int type) | |
| 2081 | { | |
| 2082 | if(type == MEM_WORD) | |
| 2083 | return mn10200_r(mn102, adr, MEM_BYTE) | (mn10200_r(mn102, adr+1, MEM_BYTE) << 8); | |
| 2084 | ||
| 2085 | switch(adr) { | |
| 2086 | case 0x00e: | |
| 2087 | return mn102->iagr; | |
| 2088 | ||
| 2089 | case 0x00f: | |
| 2090 | return 0; | |
| 2091 | ||
| 2092 | case 0x042: case 0x044: case 0x046: case 0x048: case 0x04a: | |
| 2093 | case 0x04c: case 0x04e: case 0x050: case 0x052: case 0x054: | |
| 2094 | return mn102->icrl[((adr & 0x3f)>>1)-1]; | |
| 2095 | ||
| 2096 | case 0x043: case 0x045: case 0x047: case 0x049: case 0x04b: | |
| 2097 | case 0x04d: case 0x04f: case 0x051: case 0x053: case 0x055: | |
| 2098 | return mn102->icrh[((adr & 0x3f)>>1)-1]; | |
| 2099 | ||
| 2100 | case 0x056: | |
| 2101 | return 0; | |
| 2102 | ||
| 2103 | // p4i1 = tms empty line | |
| 2104 | case 0x057: | |
| 2105 | return 0x20; | |
| 2106 | ||
| 2107 | case 0x180: case 0x190: | |
| 2108 | return mn102->serial[(adr-0x180) >> 4].ctrll; | |
| 2109 | ||
| 2110 | case 0x181: case 0x191: | |
| 2111 | return mn102->serial[(adr-0x180) >> 4].ctrlh; | |
| 2112 | ||
| 2113 | case 0x182: { | |
| 2114 | static int zz; | |
| 2115 | return zz++; | |
| 2116 | } | |
| 2117 | ||
| 2118 | case 0x183: | |
| 2119 | return 0x10; | |
| 2120 | ||
| 2121 | case 0x200: case 0x201: case 0x202: case 0x203: case 0x204: | |
| 2122 | case 0x205: case 0x206: case 0x207: case 0x208: case 0x209: | |
| 2123 | log_event("MN102", "timer %d value read", adr-0x200); | |
| 2124 | break; | |
| 2125 | ||
| 2126 | case 0x264: // port 1 data | |
| 2127 | return memory_read_byte_8le(mn102->io, MN10200_PORT1); | |
| 2128 | ||
| 2129 | case 0x3c0: // port 0 data | |
| 2130 | return memory_read_byte_8le(mn102->io, MN10200_PORT0); | |
| 2131 | ||
| 2132 | case 0x3c2: // port 2 data | |
| 2133 | return memory_read_byte_8le(mn102->io, MN10200_PORT2); | |
| 2134 | ||
| 2135 | case 0x3c3: // port 3 data | |
| 2136 | return memory_read_byte_8le(mn102->io, MN10200_PORT3); | |
| 2137 | ||
| 2138 | default: | |
| 2139 | log_event("MN102", "internal_r %04x (%03x)", adr+0xfc00, adr); | |
| 2140 | } | |
| 2141 | ||
| 2142 | return 0; | |
| 2143 | } | |
| 2144 | ||
| 2145 | static CPU_SET_INFO(mn10200) | |
| 2146 | { | |
| 2147 | mn102_info *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL; | |
| 2148 | ||
| 2149 | switch (state) | |
| 2150 | { | |
| 2151 | /* --- the following bits of info are set as 64-bit signed integers --- */ | |
| 2152 | case CPUINFO_INT_PC: /* intentional fallthrough */ | |
| 2153 | case CPUINFO_INT_REGISTER + MN10200_PC: cpustate->pc = info->i; break; | |
| 2154 | case CPUINFO_INT_REGISTER + MN10200_PSW: cpustate->psw = info->i; break; | |
| 2155 | case CPUINFO_INT_REGISTER + MN10200_MDR: cpustate->mdr = info->i; break; | |
| 2156 | case CPUINFO_INT_REGISTER + MN10200_D0: cpustate->d[0] = info->i; break; | |
| 2157 | case CPUINFO_INT_REGISTER + MN10200_D1: cpustate->d[1] = info->i; break; | |
| 2158 | case CPUINFO_INT_REGISTER + MN10200_D2: cpustate->d[2] = info->i; break; | |
| 2159 | case CPUINFO_INT_REGISTER + MN10200_D3: cpustate->d[3] = info->i; break; | |
| 2160 | case CPUINFO_INT_REGISTER + MN10200_A0: cpustate->a[0] = info->i; break; | |
| 2161 | case CPUINFO_INT_REGISTER + MN10200_A1: cpustate->a[1] = info->i; break; | |
| 2162 | case CPUINFO_INT_REGISTER + MN10200_A2: cpustate->a[2] = info->i; break; | |
| 2163 | case CPUINFO_INT_REGISTER + MN10200_A3: cpustate->a[3] = info->i; break; | |
| 2164 | case CPUINFO_INT_REGISTER + MN10200_NMICR: cpustate->nmicr = info->i; break; | |
| 2165 | case CPUINFO_INT_REGISTER + MN10200_IAGR: cpustate->iagr = info->i; break; | |
| 2166 | } | |
| 2167 | } | |
| 2168 | ||
| 2169 | CPU_GET_INFO( mn10200 ) | |
| 2170 | { | |
| 2171 | mn102_info *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL; | |
| 2172 | ||
| 2173 | switch(state) | |
| 2174 | { | |
| 2175 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 2176 | case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(mn102_info); break; | |
| 2177 | case CPUINFO_INT_INPUT_LINES: info->i = 0; break; | |
| 2178 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; | |
| 2179 | case DEVINFO_INT_ENDIANNESS: info->i = ENDIANNESS_LITTLE; break; | |
| 2180 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2181 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; | |
| 2182 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; | |
| 2183 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; | |
| 2184 | case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; | |
| 2185 | case CPUINFO_INT_MAX_CYCLES: info->i = 8; break; | |
| 2186 | ||
| 2187 | case DEVINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 16; break; | |
| 2188 | case DEVINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 24; break; | |
| 2189 | case DEVINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_PROGRAM: info->i = 0; break; | |
| 2190 | case DEVINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 0; break; | |
| 2191 | case DEVINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 0; break; | |
| 2192 | case DEVINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_DATA: info->i = 0; break; | |
| 2193 | case DEVINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_IO: info->i = 8; break; | |
| 2194 | case DEVINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_IO: info->i = 8; break; | |
| 2195 | case DEVINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_IO: info->i = 0; break; | |
| 2196 | ||
| 2197 | case CPUINFO_INT_PC: /* intentional fallthrough */ | |
| 2198 | case CPUINFO_INT_REGISTER + MN10200_PC: info->i = cpustate->pc; break; | |
| 2199 | case CPUINFO_INT_REGISTER + MN10200_PSW: info->i = cpustate->psw; break; | |
| 2200 | ||
| 2201 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 2202 | case CPUINFO_FCT_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(mn10200); break; | |
| 2203 | case CPUINFO_FCT_INIT: info->init = CPU_INIT_NAME(mn10200); break; | |
| 2204 | case CPUINFO_FCT_RESET: info->reset = CPU_RESET_NAME(mn10200); break; | |
| 2205 | case CPUINFO_FCT_EXIT: info->exit = CPU_EXIT_NAME(mn10200); break; | |
| 2206 | case CPUINFO_FCT_EXECUTE: info->execute = CPU_EXECUTE_NAME(mn10200); break; | |
| 2207 | case CPUINFO_FCT_BURN: info->burn = NULL; break; | |
| 2208 | case CPUINFO_FCT_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(mn10200); break; | |
| 2209 | case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cpustate->cycles; break; | |
| 2210 | ||
| 2211 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 2212 | case DEVINFO_STR_NAME: strcpy(info->s, "Panasonic MN10200"); break; | |
| 2213 | case DEVINFO_STR_FAMILY: strcpy(info->s, "MN10200"); break; | |
| 2214 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; | |
| 2215 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; | |
| 2216 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; | |
| 2217 | ||
| 2218 | case CPUINFO_STR_FLAGS: // intentional fallthrough | |
| 2219 | case CPUINFO_STR_REGISTER + MN10200_PSW: sprintf(info->s, "S=%d irq=%s im=%d %c%c%c%c %c%c%c%c", | |
| 2220 | (cpustate->psw >> 12) & 3, | |
| 2221 | cpustate->psw & 0x0800 ? "on" : "off", | |
| 2222 | (cpustate->psw >> 8) & 7, | |
| 2223 | cpustate->psw & 0x0080 ? 'V' : '-', | |
| 2224 | cpustate->psw & 0x0040 ? 'C' : '-', | |
| 2225 | cpustate->psw & 0x0020 ? 'N' : '-', | |
| 2226 | cpustate->psw & 0x0010 ? 'Z' : '-', | |
| 2227 | cpustate->psw & 0x0008 ? 'v' : '-', | |
| 2228 | cpustate->psw & 0x0004 ? 'c' : '-', | |
| 2229 | cpustate->psw & 0x0002 ? 'n' : '-', | |
| 2230 | cpustate->psw & 0x0001 ? 'z' : '-'); | |
| 2231 | break; | |
| 2232 | ||
| 2233 | case CPUINFO_STR_REGISTER + MN10200_MDR: sprintf(info->s, "MDR: %04x", cpustate->mdr); break; | |
| 2234 | ||
| 2235 | case CPUINFO_STR_REGISTER + MN10200_D0: sprintf(info->s, "D0: %08x", cpustate->d[0]); break; | |
| 2236 | case CPUINFO_STR_REGISTER + MN10200_D1: sprintf(info->s, "D1: %08x", cpustate->d[1]); break; | |
| 2237 | case CPUINFO_STR_REGISTER + MN10200_D2: sprintf(info->s, "D2: %08x", cpustate->d[2]); break; | |
| 2238 | case CPUINFO_STR_REGISTER + MN10200_D3: sprintf(info->s, "D3: %08x", cpustate->d[3]); break; | |
| 2239 | case CPUINFO_STR_REGISTER + MN10200_A0: sprintf(info->s, "A0: %08x", cpustate->a[0]); break; | |
| 2240 | case CPUINFO_STR_REGISTER + MN10200_A1: sprintf(info->s, "A1: %08x", cpustate->a[1]); break; | |
| 2241 | case CPUINFO_STR_REGISTER + MN10200_A2: sprintf(info->s, "A2: %08x", cpustate->a[2]); break; | |
| 2242 | case CPUINFO_STR_REGISTER + MN10200_A3: sprintf(info->s, "A3: %08x", cpustate->a[3]); break; | |
| 2243 | ||
| 2244 | case CPUINFO_STR_REGISTER + MN10200_NMICR: sprintf(info->s, "MNICR: %02x", cpustate->nmicr); break; | |
| 2245 | case CPUINFO_STR_REGISTER + MN10200_IAGR: sprintf(info->s, "IAGR: %02x", cpustate->iagr); break; | |
| 2246 | } | |
| 2247 | } |
| r0 | r7357 | |
|---|---|---|
| 1 | #include "emu.h" | |
| 2 | ||
| 3 | #include <stdio.h> | |
| 4 | ||
| 5 | static const UINT8 *sOpROM; // current opROM pointer | |
| 6 | static UINT32 sBasePC; | |
| 7 | ||
| 8 | UINT8 program_read_byte(offs_t pc) | |
| 9 | { | |
| 10 | return sOpROM[pc - sBasePC]; | |
| 11 | } | |
| 12 | ||
| 13 | static UINT32 r16u(offs_t pc) | |
| 14 | { | |
| 15 | return sOpROM[pc - sBasePC] | (sOpROM[pc - sBasePC + 1]<<8); | |
| 16 | } | |
| 17 | ||
| 18 | static INT32 r16s(offs_t pc) | |
| 19 | { | |
| 20 | return (INT16)(sOpROM[pc - sBasePC] | (sOpROM[pc - sBasePC + 1]<<8)); | |
| 21 | } | |
| 22 | ||
| 23 | static INT32 r24u(offs_t pc) | |
| 24 | { | |
| 25 | return sOpROM[pc - sBasePC] | (sOpROM[pc - sBasePC + 1]<<8) | (sOpROM[pc - sBasePC + 2]<<16); | |
| 26 | } | |
| 27 | ||
| 28 | static INT32 r24s(offs_t pc) | |
| 29 | { | |
| 30 | return sOpROM[pc - sBasePC] | (sOpROM[pc - sBasePC + 1]<<8) | ((INT8)sOpROM[pc - sBasePC + 2]<<16); | |
| 31 | } | |
| 32 | ||
| 33 | static const char *i8str(INT8 v) | |
| 34 | { | |
| 35 | static char res[4]; | |
| 36 | if(v>=0) | |
| 37 | sprintf(res, "%x", v); | |
| 38 | else | |
| 39 | sprintf(res, "-%x", (UINT8)(-v)); | |
| 40 | return res; | |
| 41 | } | |
| 42 | ||
| 43 | static const char *i16str(INT16 v) | |
| 44 | { | |
| 45 | static char res[6]; | |
| 46 | if(v>=0) | |
| 47 | sprintf(res, "%x", v); | |
| 48 | else | |
| 49 | sprintf(res, "-%x", (UINT16)(-v)); | |
| 50 | return res; | |
| 51 | } | |
| 52 | ||
| 53 | static const char *i24str(INT32 v) | |
| 54 | { | |
| 55 | static char res[8]; | |
| 56 | if(v>=0) | |
| 57 | sprintf(res, "%x", v); | |
| 58 | else | |
| 59 | sprintf(res, "-%x", -v); | |
| 60 | return res; | |
| 61 | } | |
| 62 | ||
| 63 | ||
| 64 | int mn102_disassemble(char *buffer, UINT32 pc, const UINT8 *oprom) | |
| 65 | { | |
| 66 | UINT8 opcode; | |
| 67 | ||
| 68 | sOpROM = oprom; | |
| 69 | sBasePC = pc; | |
| 70 | ||
| 71 | opcode = program_read_byte(pc); | |
| 72 | switch(opcode) { | |
| 73 | case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: | |
| 74 | case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: | |
| 75 | sprintf(buffer, "mov d%d, (a%d)", opcode & 3, (opcode>>2) & 3); | |
| 76 | return 1; | |
| 77 | ||
| 78 | case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: | |
| 79 | case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: | |
| 80 | sprintf(buffer, "movb d%d, (a%d)", opcode & 3, (opcode>>2) & 3); | |
| 81 | return 1; | |
| 82 | ||
| 83 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: | |
| 84 | case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: | |
| 85 | sprintf(buffer, "mov (a%d), d%d", (opcode>>2) & 3, opcode & 3); | |
| 86 | return 1; | |
| 87 | ||
| 88 | case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: | |
| 89 | case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: | |
| 90 | sprintf(buffer, "movbu (a%d), d%d", (opcode>>2) & 3, opcode & 3); | |
| 91 | return 1; | |
| 92 | ||
| 93 | case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: | |
| 94 | case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: | |
| 95 | sprintf(buffer, "mov d%d, (%s, a%d)", opcode & 3, i8str(program_read_byte(pc+1)), (opcode>>2) & 3); | |
| 96 | return 2; | |
| 97 | ||
| 98 | case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: | |
| 99 | case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: | |
| 100 | sprintf(buffer, "mov a%d, (%s, a%d)", opcode & 3, i8str(program_read_byte(pc+1)), (opcode>>2) & 3); | |
| 101 | return 2; | |
| 102 | ||
| 103 | case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67: | |
| 104 | case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: | |
| 105 | sprintf(buffer, "mov (%s, a%d), d%d", i8str(program_read_byte(pc+1)), (opcode>>2) & 3, opcode & 3); | |
| 106 | return 2; | |
| 107 | ||
| 108 | case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: | |
| 109 | case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: | |
| 110 | sprintf(buffer, "mov (%s, a%d), a%d", i8str(program_read_byte(pc+1)), (opcode>>2) & 3, opcode & 3); | |
| 111 | return 2; | |
| 112 | ||
| 113 | case 0x81: case 0x82: case 0x83: case 0x84: case 0x86: case 0x87: | |
| 114 | case 0x88: case 0x89: case 0x8b: case 0x8c: case 0x8d: case 0x8e: | |
| 115 | sprintf(buffer, "mov d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 116 | return 1; | |
| 117 | ||
| 118 | case 0x80: case 0x85: case 0x8a: case 0x8f: | |
| 119 | sprintf(buffer, "mov %s, d%d", i8str(program_read_byte(pc+1)), opcode & 3); | |
| 120 | return 2; | |
| 121 | ||
| 122 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 123 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 124 | sprintf(buffer, "add d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 125 | return 1; | |
| 126 | ||
| 127 | case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: | |
| 128 | case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: | |
| 129 | sprintf(buffer, "sub d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 130 | return 1; | |
| 131 | ||
| 132 | case 0xb0: case 0xb1: case 0xb2: case 0xb3: | |
| 133 | sprintf(buffer, "extx d%d", opcode & 3); | |
| 134 | return 1; | |
| 135 | ||
| 136 | case 0xb4: case 0xb5: case 0xb6: case 0xb7: | |
| 137 | sprintf(buffer, "extxu d%d", opcode & 3); | |
| 138 | return 1; | |
| 139 | ||
| 140 | case 0xb8: case 0xb9: case 0xba: case 0xbb: | |
| 141 | sprintf(buffer, "extxb d%d", opcode & 3); | |
| 142 | return 1; | |
| 143 | ||
| 144 | case 0xbc: case 0xbd: case 0xbe: case 0xbf: | |
| 145 | sprintf(buffer, "extxbu d%d", opcode & 3); | |
| 146 | return 1; | |
| 147 | ||
| 148 | case 0xc0: case 0xc1: case 0xc2: case 0xc3: | |
| 149 | sprintf(buffer, "mov d%d, (%x)", opcode & 3, r16u(pc+1)); | |
| 150 | return 3; | |
| 151 | ||
| 152 | case 0xc4: case 0xc5: case 0xc6: case 0xc7: | |
| 153 | sprintf(buffer, "movb d%d, (%04x)", opcode & 3, r16u(pc+1)); | |
| 154 | return 3; | |
| 155 | ||
| 156 | case 0xc8: case 0xc9: case 0xca: case 0xcb: | |
| 157 | sprintf(buffer, "mov (%04x), d%d", r16u(pc+1), opcode & 3); | |
| 158 | return 3; | |
| 159 | ||
| 160 | case 0xcc: case 0xcd: case 0xce: case 0xcf: | |
| 161 | sprintf(buffer, "movbu (%04x), d%d", r16u(pc+1), opcode & 3); | |
| 162 | return 3; | |
| 163 | ||
| 164 | case 0xd0: case 0xd1: case 0xd2: case 0xd3: | |
| 165 | sprintf(buffer, "add %s, a%d", i8str(program_read_byte(pc+1)), opcode & 3); | |
| 166 | return 2; | |
| 167 | ||
| 168 | case 0xd4: case 0xd5: case 0xd6: case 0xd7: | |
| 169 | sprintf(buffer, "add %s, d%d", i8str(program_read_byte(pc+1)), opcode & 3); | |
| 170 | return 2; | |
| 171 | ||
| 172 | case 0xd8: case 0xd9: case 0xda: case 0xdb: | |
| 173 | sprintf(buffer, "cmp %s, d%d", i8str(program_read_byte(pc+1)), opcode & 3); | |
| 174 | return 2; | |
| 175 | ||
| 176 | case 0xdc: case 0xdd: case 0xde: case 0xdf: | |
| 177 | sprintf(buffer, "move %x, a%d", r16u(pc+1), opcode & 3); | |
| 178 | return 3; | |
| 179 | ||
| 180 | case 0xe0: | |
| 181 | sprintf(buffer, "blt %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 182 | return 2; | |
| 183 | ||
| 184 | case 0xe1: | |
| 185 | sprintf(buffer, "bgt %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 186 | return 2; | |
| 187 | ||
| 188 | case 0xe2: | |
| 189 | sprintf(buffer, "bge %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 190 | return 2; | |
| 191 | ||
| 192 | case 0xe3: | |
| 193 | sprintf(buffer, "ble %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 194 | return 2; | |
| 195 | ||
| 196 | case 0xe4: | |
| 197 | sprintf(buffer, "bcs %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 198 | return 2; | |
| 199 | ||
| 200 | case 0xe5: | |
| 201 | sprintf(buffer, "bhi %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 202 | return 2; | |
| 203 | ||
| 204 | case 0xe6: | |
| 205 | sprintf(buffer, "bcc %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 206 | return 2; | |
| 207 | ||
| 208 | case 0xe7: | |
| 209 | sprintf(buffer, "bls %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 210 | return 2; | |
| 211 | ||
| 212 | case 0xe8: | |
| 213 | sprintf(buffer, "beq %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 214 | return 2; | |
| 215 | ||
| 216 | case 0xe9: | |
| 217 | sprintf(buffer, "bne %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 218 | return 2; | |
| 219 | ||
| 220 | case 0xea: | |
| 221 | sprintf(buffer, "bra %x", (pc+2+(INT8)program_read_byte(pc+1)) & 0xffffff); | |
| 222 | return 2; | |
| 223 | ||
| 224 | case 0xeb: | |
| 225 | sprintf(buffer, "rti"); | |
| 226 | return 1; | |
| 227 | ||
| 228 | case 0xec: case 0xed: case 0xee: case 0xef: | |
| 229 | sprintf(buffer, "cmp %x, a%d", r16u(pc+1), opcode & 3); | |
| 230 | return 3; | |
| 231 | ||
| 232 | case 0xf0: | |
| 233 | opcode = program_read_byte(pc+1); | |
| 234 | switch(opcode) { | |
| 235 | case 0x00: case 0x04: case 0x08: case 0x0c: | |
| 236 | sprintf(buffer, "jmp (a%d)", (opcode>>2) & 3); | |
| 237 | return 2; | |
| 238 | ||
| 239 | case 0x01: case 0x05: case 0x09: case 0x0d: | |
| 240 | sprintf(buffer, "jsr (a%d)", (opcode>>2) & 3); | |
| 241 | return 2; | |
| 242 | ||
| 243 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: | |
| 244 | case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: | |
| 245 | sprintf(buffer, "bset d%d, (a%d)", opcode & 3, (opcode>>2) & 3); | |
| 246 | return 2; | |
| 247 | ||
| 248 | case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: | |
| 249 | case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: | |
| 250 | sprintf(buffer, "bclr d%d, (a%d)", opcode & 3, (opcode>>2) & 3); | |
| 251 | return 2; | |
| 252 | ||
| 253 | case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: | |
| 254 | case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: | |
| 255 | case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: | |
| 256 | case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: | |
| 257 | case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67: | |
| 258 | case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: | |
| 259 | case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: | |
| 260 | case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: | |
| 261 | sprintf(buffer, "movb (d%d, a%d), d%d", (opcode>>4) & 3, (opcode>>2) & 3, opcode & 3); | |
| 262 | return 2; | |
| 263 | ||
| 264 | case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: | |
| 265 | case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: | |
| 266 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 267 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 268 | case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: | |
| 269 | case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: | |
| 270 | case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: | |
| 271 | case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: | |
| 272 | sprintf(buffer, "movbu (d%d, a%d), d%d", (opcode>>4) & 3, (opcode>>2) & 3, opcode & 3); | |
| 273 | return 2; | |
| 274 | ||
| 275 | case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: | |
| 276 | case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: | |
| 277 | case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: | |
| 278 | case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: | |
| 279 | case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: case 0xe6: case 0xe7: | |
| 280 | case 0xe8: case 0xe9: case 0xea: case 0xeb: case 0xec: case 0xed: case 0xee: case 0xef: | |
| 281 | case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7: | |
| 282 | case 0xf8: case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff: | |
| 283 | sprintf(buffer, "movb d%d, (d%d, a%d)", opcode & 3, (opcode>>4) & 3, (opcode>>2) & 3); | |
| 284 | return 2; | |
| 285 | ||
| 286 | default: | |
| 287 | goto illegal2; | |
| 288 | } | |
| 289 | break; | |
| 290 | ||
| 291 | case 0xf1: | |
| 292 | opcode = program_read_byte(pc+1); | |
| 293 | switch(opcode>>6) { | |
| 294 | case 0x00: | |
| 295 | sprintf(buffer, "mov (d%d, a%d), a%d", (opcode>>4) & 3, (opcode>>2) & 3, opcode & 3); | |
| 296 | return 2; | |
| 297 | ||
| 298 | case 0x01: | |
| 299 | sprintf(buffer, "mov (d%d, a%d), d%d", (opcode>>4) & 3, (opcode>>2) & 3, opcode & 3); | |
| 300 | return 2; | |
| 301 | ||
| 302 | case 0x02: | |
| 303 | sprintf(buffer, "mov a%d, (d%d, a%d)", opcode & 3, (opcode>>4) & 3, (opcode>>2) & 3); | |
| 304 | return 2; | |
| 305 | ||
| 306 | case 0x03: | |
| 307 | sprintf(buffer, "mov d%d, (d%d, a%d)", opcode & 3, (opcode>>4) & 3, (opcode>>2) & 3); | |
| 308 | return 2; | |
| 309 | ||
| 310 | default: | |
| 311 | goto illegal2; | |
| 312 | } | |
| 313 | break; | |
| 314 | ||
| 315 | case 0xf2: | |
| 316 | opcode = program_read_byte(pc+1); | |
| 317 | switch(opcode>>4) { | |
| 318 | case 0x0: | |
| 319 | sprintf(buffer, "add d%d, a%d", (opcode>>2) & 3, opcode & 3); | |
| 320 | return 2; | |
| 321 | ||
| 322 | case 0x1: | |
| 323 | sprintf(buffer, "sub d%d, a%d", (opcode>>2) & 3, opcode & 3); | |
| 324 | return 2; | |
| 325 | ||
| 326 | case 0x2: | |
| 327 | sprintf(buffer, "cmp d%d, a%d", (opcode>>2) & 3, opcode & 3); | |
| 328 | return 2; | |
| 329 | ||
| 330 | case 0x3: | |
| 331 | sprintf(buffer, "mov d%d, a%d", (opcode>>2) & 3, opcode & 3); | |
| 332 | return 2; | |
| 333 | ||
| 334 | case 0x4: | |
| 335 | sprintf(buffer, "add a%d, a%d", (opcode>>2) & 3, opcode & 3); | |
| 336 | return 2; | |
| 337 | ||
| 338 | case 0x5: | |
| 339 | sprintf(buffer, "sub a%d, a%d", (opcode>>2) & 3, opcode & 3); | |
| 340 | return 2; | |
| 341 | ||
| 342 | case 0x6: | |
| 343 | sprintf(buffer, "cmp a%d, a%d", (opcode>>2) & 3, opcode & 3); | |
| 344 | return 2; | |
| 345 | ||
| 346 | case 0x7: | |
| 347 | sprintf(buffer, "mov a%d, a%d", (opcode>>2) & 3, opcode & 3); | |
| 348 | return 2; | |
| 349 | ||
| 350 | case 0x8: | |
| 351 | sprintf(buffer, "addc d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 352 | return 2; | |
| 353 | ||
| 354 | case 0x9: | |
| 355 | sprintf(buffer, "subc d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 356 | return 2; | |
| 357 | ||
| 358 | case 0xc: | |
| 359 | sprintf(buffer, "add a%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 360 | return 2; | |
| 361 | ||
| 362 | case 0xd: | |
| 363 | sprintf(buffer, "sub a%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 364 | return 2; | |
| 365 | ||
| 366 | case 0xe: | |
| 367 | sprintf(buffer, "cmp a%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 368 | return 2; | |
| 369 | ||
| 370 | case 0xf: | |
| 371 | sprintf(buffer, "mov a%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 372 | return 2; | |
| 373 | ||
| 374 | default: | |
| 375 | goto illegal2; | |
| 376 | } | |
| 377 | break; | |
| 378 | ||
| 379 | case 0xf3: | |
| 380 | opcode = program_read_byte(pc+1); | |
| 381 | switch(opcode) { | |
| 382 | case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: | |
| 383 | case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: | |
| 384 | sprintf(buffer, "and d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 385 | return 2; | |
| 386 | ||
| 387 | case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: | |
| 388 | case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: | |
| 389 | sprintf(buffer, "or d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 390 | return 2; | |
| 391 | ||
| 392 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: | |
| 393 | case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: | |
| 394 | sprintf(buffer, "xor d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 395 | return 2; | |
| 396 | ||
| 397 | case 0x30: case 0x31: case 0x32: case 0x33: | |
| 398 | sprintf(buffer, "rol d%d", opcode & 3); | |
| 399 | return 2; | |
| 400 | ||
| 401 | case 0x34: case 0x35: case 0x36: case 0x37: | |
| 402 | sprintf(buffer, "ror d%d", opcode & 3); | |
| 403 | return 2; | |
| 404 | ||
| 405 | case 0x38: case 0x39: case 0x3a: case 0x3b: | |
| 406 | sprintf(buffer, "asr d%d", opcode & 3); | |
| 407 | return 2; | |
| 408 | ||
| 409 | case 0x3c: case 0x3d: case 0x3e: case 0x3f: | |
| 410 | sprintf(buffer, "lsr d%d", opcode & 3); | |
| 411 | return 2; | |
| 412 | ||
| 413 | case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: | |
| 414 | case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: | |
| 415 | sprintf(buffer, "mul d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 416 | return 2; | |
| 417 | ||
| 418 | case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: | |
| 419 | case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: | |
| 420 | sprintf(buffer, "mulu d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 421 | return 2; | |
| 422 | ||
| 423 | case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67: | |
| 424 | case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: | |
| 425 | sprintf(buffer, "divu d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 426 | return 2; | |
| 427 | ||
| 428 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 429 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 430 | sprintf(buffer, "cmp d%d, d%d", (opcode>>2) & 3, opcode & 3); | |
| 431 | return 2; | |
| 432 | ||
| 433 | case 0xc0: case 0xc4: case 0xc8: case 0xcc: | |
| 434 | sprintf(buffer, "mov d%d, mdr", (opcode>>2) & 3); | |
| 435 | return 2; | |
| 436 | ||
| 437 | case 0xc1: case 0xc5: case 0xc9: case 0xcd: | |
| 438 | sprintf(buffer, "ext d%d", (opcode>>2) & 3); | |
| 439 | return 2; | |
| 440 | ||
| 441 | case 0xd0: case 0xd4: case 0xd8: case 0xdc: | |
| 442 | sprintf(buffer, "mov d%d, psw", (opcode>>2) & 3); | |
| 443 | return 2; | |
| 444 | ||
| 445 | case 0xe0: case 0xe1: case 0xe2: case 0xe3: | |
| 446 | sprintf(buffer, "mov mdr, d%d", opcode & 3); | |
| 447 | return 2; | |
| 448 | ||
| 449 | case 0xe4: case 0xe5: case 0xe6: case 0xe7: | |
| 450 | sprintf(buffer, "not d%d", opcode & 3); | |
| 451 | return 2; | |
| 452 | ||
| 453 | case 0xf0: case 0xf1: case 0xf2: case 0xf3: | |
| 454 | sprintf(buffer, "mov psw, d%d", opcode & 3); | |
| 455 | return 2; | |
| 456 | ||
| 457 | case 0xfc: | |
| 458 | sprintf(buffer, "pxst"); | |
| 459 | return 2; | |
| 460 | ||
| 461 | case 0xfe: | |
| 462 | opcode = program_read_byte(pc+2); | |
| 463 | switch(opcode) { | |
| 464 | case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: | |
| 465 | sprintf(buffer, "tbz (%x) %d, %x", r24u(pc+3), opcode & 7, | |
| 466 | (pc+7+(INT8)program_read_byte(pc+6)) & 0xffffff); | |
| 467 | return 7; | |
| 468 | ||
| 469 | case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: | |
| 470 | sprintf(buffer, "tbnz (%x) %d, %x", r24u(pc+3), opcode & 7, | |
| 471 | (pc+7+(INT8)program_read_byte(pc+6)) & 0xffffff); | |
| 472 | return 7; | |
| 473 | ||
| 474 | case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: | |
| 475 | sprintf(buffer, "bset (%x) %d", r24u(pc+2), opcode & 7); | |
| 476 | return 6; | |
| 477 | ||
| 478 | case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: | |
| 479 | sprintf(buffer, "bclr (%x) %d", r24u(pc+2), opcode & 7); | |
| 480 | return 6; | |
| 481 | ||
| 482 | default: | |
| 483 | goto illegal3; | |
| 484 | } | |
| 485 | break; | |
| 486 | ||
| 487 | case 0xff: | |
| 488 | opcode = program_read_byte(pc+2); | |
| 489 | switch(opcode) { | |
| 490 | case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: | |
| 491 | case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: | |
| 492 | sprintf(buffer, "tbz (%s, a%d) %d, %x", i8str(program_read_byte(pc+3)), 2+((opcode>>3)&1), opcode & 7, | |
| 493 | (pc+5+(INT8)program_read_byte(pc+4)) & 0xffffff); | |
| 494 | return 5; | |
| 495 | ||
| 496 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 497 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 498 | sprintf(buffer, "bset (%s, a%d) %d", i8str(program_read_byte(pc+3)), 2+((opcode>>3)&1), opcode & 7); | |
| 499 | return 4; | |
| 500 | ||
| 501 | case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: | |
| 502 | case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: | |
| 503 | sprintf(buffer, "tbnz (%s, a%d) %d, %x", i8str(program_read_byte(pc+3)), 2+((opcode>>3)&1), opcode & 7, | |
| 504 | (pc+5+(INT8)program_read_byte(pc+4)) & 0xffffff); | |
| 505 | return 5; | |
| 506 | ||
| 507 | case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: | |
| 508 | case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: | |
| 509 | sprintf(buffer, "bclr (%s, a%d) %d", i8str(program_read_byte(pc+3)), 2+((opcode>>3)&1), opcode & 7); | |
| 510 | return 4; | |
| 511 | ||
| 512 | default: | |
| 513 | goto illegal3; | |
| 514 | } | |
| 515 | break; | |
| 516 | ||
| 517 | default: | |
| 518 | goto illegal2; | |
| 519 | } | |
| 520 | break; | |
| 521 | ||
| 522 | case 0xf4: | |
| 523 | opcode = program_read_byte(pc+1); | |
| 524 | switch(opcode) { | |
| 525 | case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: | |
| 526 | case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: | |
| 527 | sprintf(buffer, "mov d%d, (%s, a%d)", opcode & 3, i24str(r24s(pc+2)), (opcode>>2) & 3); | |
| 528 | return 5; | |
| 529 | ||
| 530 | case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: | |
| 531 | case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: | |
| 532 | sprintf(buffer, "mov a%d, (%s, a%d)", opcode & 3, i24str(r24s(pc+2)), (opcode>>2) & 3); | |
| 533 | return 5; | |
| 534 | ||
| 535 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: | |
| 536 | case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: | |
| 537 | sprintf(buffer, "movb d%d, (%s, a%d)", opcode & 3, i24str(r24s(pc+2)), (opcode>>2) & 3); | |
| 538 | return 5; | |
| 539 | ||
| 540 | case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: | |
| 541 | case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: | |
| 542 | sprintf(buffer, "movx d%d, (%s, a%d)", opcode & 3, i24str(r24s(pc+2)), (opcode>>2) & 3); | |
| 543 | return 5; | |
| 544 | ||
| 545 | case 0x40: case 0x41: case 0x42: case 0x43: | |
| 546 | sprintf(buffer, "mov d%d, (%x)", opcode & 3, r24u(pc+2)); | |
| 547 | return 5; | |
| 548 | ||
| 549 | case 0x44: case 0x45: case 0x46: case 0x47: | |
| 550 | sprintf(buffer, "movb d%d, (%x)", opcode & 3, r24u(pc+2)); | |
| 551 | return 5; | |
| 552 | ||
| 553 | #if 0 // huh? | |
| 554 | case 0x4b: | |
| 555 | sprintf(buffer, "bset %02x, (%x)", program_read_byte(pc+5), r24u(pc+2)); | |
| 556 | return 6; | |
| 557 | ||
| 558 | case 0x4f: | |
| 559 | sprintf(buffer, "bclr %02x, (%x)", program_read_byte(pc+5), r24u(pc+2)); | |
| 560 | return 6; | |
| 561 | #endif | |
| 562 | ||
| 563 | case 0x50: case 0x51: case 0x52: case 0x53: | |
| 564 | sprintf(buffer, "mov a%d, (%x)", opcode & 3, r24u(pc+2)); | |
| 565 | return 5; | |
| 566 | ||
| 567 | case 0x60: case 0x61: case 0x62: case 0x63: | |
| 568 | sprintf(buffer, "add %s, d%d", i24str(r24s(pc+2)), opcode & 3); | |
| 569 | return 5; | |
| 570 | ||
| 571 | case 0x64: case 0x65: case 0x66: case 0x67: | |
| 572 | sprintf(buffer, "add %s, a%d", i24str(r24s(pc+2)), opcode & 3); | |
| 573 | return 5; | |
| 574 | ||
| 575 | case 0x68: case 0x69: case 0x6a: case 0x6b: | |
| 576 | sprintf(buffer, "sub %s, d%d", i24str(r24s(pc+2)), opcode & 3); | |
| 577 | return 5; | |
| 578 | ||
| 579 | case 0x6c: case 0x6d: case 0x6e: case 0x6f: | |
| 580 | sprintf(buffer, "sub %s, a%d", i24str(r24s(pc+2)), opcode & 3); | |
| 581 | return 5; | |
| 582 | ||
| 583 | case 0x70: case 0x71: case 0x72: case 0x73: | |
| 584 | sprintf(buffer, "mov %s, d%d", i24str(r24s(pc+2)), opcode & 3); | |
| 585 | return 5; | |
| 586 | ||
| 587 | case 0x74: case 0x75: case 0x76: case 0x77: | |
| 588 | sprintf(buffer, "mov %x, a%d", r24u(pc+2), opcode & 3); | |
| 589 | return 5; | |
| 590 | ||
| 591 | case 0x78: case 0x79: case 0x7a: case 0x7b: | |
| 592 | sprintf(buffer, "cmp %s, d%d", i24str(r24s(pc+2)), opcode & 3); | |
| 593 | return 5; | |
| 594 | ||
| 595 | case 0x7c: case 0x7d: case 0x7e: case 0x7f: | |
| 596 | sprintf(buffer, "cmp %x, a%d", r24u(pc+2), opcode & 3); | |
| 597 | return 5; | |
| 598 | ||
| 599 | case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: | |
| 600 | case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: | |
| 601 | sprintf(buffer, "mov (%s, a%d), d%d", i24str(r24s(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 602 | return 5; | |
| 603 | ||
| 604 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 605 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 606 | sprintf(buffer, "movbu (%s, a%d), d%d", i24str(r24s(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 607 | return 5; | |
| 608 | ||
| 609 | case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: | |
| 610 | case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: | |
| 611 | sprintf(buffer, "movb (%s, a%d), d%d", i24str(r24s(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 612 | return 5; | |
| 613 | ||
| 614 | case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: | |
| 615 | case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: | |
| 616 | sprintf(buffer, "movx (%s, a%d), d%d", i24str(r24s(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 617 | return 5; | |
| 618 | ||
| 619 | case 0xc0: case 0xc1: case 0xc2: case 0xc3: | |
| 620 | sprintf(buffer, "mov (%x), d%d", r24u(pc+2), opcode & 3); | |
| 621 | return 5; | |
| 622 | ||
| 623 | case 0xc4: case 0xc5: case 0xc6: case 0xc7: | |
| 624 | sprintf(buffer, "movb (%x), d%d", r24u(pc+2), opcode & 3); | |
| 625 | return 5; | |
| 626 | ||
| 627 | case 0xc8: case 0xc9: case 0xca: case 0xcb: | |
| 628 | sprintf(buffer, "movbu (%x), d%d", r24u(pc+2), opcode & 3); | |
| 629 | return 5; | |
| 630 | ||
| 631 | case 0xd0: case 0xd1: case 0xd2: case 0xd3: | |
| 632 | sprintf(buffer, "mov (%x), a%d", r24u(pc+2), opcode & 3); | |
| 633 | return 5; | |
| 634 | ||
| 635 | case 0xe0: | |
| 636 | sprintf(buffer, "jmp %x", (pc+5+r24s(pc+2)) & 0xffffff); | |
| 637 | return 5; | |
| 638 | ||
| 639 | case 0xe1: | |
| 640 | sprintf(buffer, "jsr %x", (pc+5+r24s(pc+2)) & 0xffffff); | |
| 641 | return 5; | |
| 642 | ||
| 643 | case 0xe3: | |
| 644 | sprintf(buffer, "bset %02x, (%x)", program_read_byte(pc+4), r16u(pc+2)); | |
| 645 | return 6; | |
| 646 | ||
| 647 | case 0xe7: | |
| 648 | sprintf(buffer, "bclr %02x, (%x)", program_read_byte(pc+4), r16u(pc+2)); | |
| 649 | return 6; | |
| 650 | ||
| 651 | case 0xe8: case 0xe9: case 0xea: case 0xeb: | |
| 652 | sprintf(buffer, "bset %02x, (%s, a%d)", program_read_byte(pc+3), i8str(program_read_byte(pc+2)), opcode & 3); | |
| 653 | return 4; | |
| 654 | ||
| 655 | case 0xec: case 0xed: case 0xee: case 0xef: | |
| 656 | sprintf(buffer, "bclr %02x, (%s, a%d)", program_read_byte(pc+3), i8str(program_read_byte(pc+2)), opcode & 3); | |
| 657 | return 4; | |
| 658 | ||
| 659 | case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7: | |
| 660 | case 0xf8: case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff: | |
| 661 | sprintf(buffer, "mov (%s, a%d), a%d", i24str(r24s(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 662 | return 5; | |
| 663 | ||
| 664 | default: | |
| 665 | goto illegal2; | |
| 666 | } | |
| 667 | break; | |
| 668 | ||
| 669 | case 0xf5: | |
| 670 | opcode = program_read_byte(pc+1); | |
| 671 | switch(opcode) { | |
| 672 | case 0x00: case 0x01: case 0x02: case 0x03: | |
| 673 | sprintf(buffer, "and %02x, d%d", program_read_byte(pc+2), opcode & 3); | |
| 674 | return 3; | |
| 675 | ||
| 676 | case 0x04: case 0x05: case 0x06: case 0x07: | |
| 677 | sprintf(buffer, "btst %02x, d%d", program_read_byte(pc+2), opcode & 3); | |
| 678 | return 3; | |
| 679 | ||
| 680 | case 0x08: case 0x09: case 0x0a: case 0x0b: | |
| 681 | sprintf(buffer, "or %02x, d%d", program_read_byte(pc+2), opcode & 3); | |
| 682 | return 3; | |
| 683 | ||
| 684 | case 0x0c: case 0x0d: case 0x0e: case 0x0f: | |
| 685 | sprintf(buffer, "addnf %s, a%d", i8str(program_read_byte(pc+2)), opcode & 3); | |
| 686 | return 3; | |
| 687 | ||
| 688 | case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: | |
| 689 | case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: | |
| 690 | sprintf(buffer, "movb d%d, (%s, a%d)", opcode & 3, i8str(program_read_byte(pc+2)), (opcode>>2) & 3); | |
| 691 | return 3; | |
| 692 | ||
| 693 | case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: | |
| 694 | case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: | |
| 695 | sprintf(buffer, "movb (%s, a%d), d%d", i8str(program_read_byte(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 696 | return 3; | |
| 697 | ||
| 698 | case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: | |
| 699 | case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: | |
| 700 | sprintf(buffer, "movbu (%s, a%d), d%d", i8str(program_read_byte(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 701 | return 3; | |
| 702 | ||
| 703 | case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: | |
| 704 | case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: { | |
| 705 | UINT8 opcode2 = program_read_byte(pc+2); | |
| 706 | switch(opcode2) { | |
| 707 | case 0x00: | |
| 708 | sprintf(buffer, "mulql d%d, d%d", (opcode>>3) & 3, opcode & 3); | |
| 709 | return 3; | |
| 710 | ||
| 711 | case 0x01: | |
| 712 | sprintf(buffer, "mulqh d%d, d%d", (opcode>>3) & 3, opcode & 3); | |
| 713 | return 3; | |
| 714 | ||
| 715 | default: | |
| 716 | goto illegal3; | |
| 717 | } | |
| 718 | break; | |
| 719 | } | |
| 720 | ||
| 721 | case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: | |
| 722 | case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: | |
| 723 | sprintf(buffer, "movx d%d, (%s, a%d)", opcode & 3, i8str(program_read_byte(pc+2)), (opcode>>2) & 3); | |
| 724 | return 3; | |
| 725 | ||
| 726 | case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67: | |
| 727 | case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: { | |
| 728 | UINT8 opcode2 = program_read_byte(pc+2); | |
| 729 | switch(opcode2) { | |
| 730 | case 0x10: | |
| 731 | sprintf(buffer, "mulq d%d, d%d", (opcode>>3) & 3, opcode & 3); | |
| 732 | return 3; | |
| 733 | ||
| 734 | default: | |
| 735 | goto illegal3; | |
| 736 | } | |
| 737 | break; | |
| 738 | } | |
| 739 | ||
| 740 | case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: | |
| 741 | case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: | |
| 742 | sprintf(buffer, "movx (%s, a%d), d%d", i8str(program_read_byte(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 743 | return 3; | |
| 744 | ||
| 745 | case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: | |
| 746 | case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: | |
| 747 | sprintf(buffer, "tbz (%s, a%d) %d, %x", i8str(program_read_byte(pc+2)), (opcode>>3)&1, opcode & 7, | |
| 748 | (pc+4+(INT8)program_read_byte(pc+3)) & 0xffffff); | |
| 749 | return 4; | |
| 750 | ||
| 751 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 752 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 753 | sprintf(buffer, "bset (%s, a%d) %d", i8str(program_read_byte(pc+2)), (opcode>>3)&1, opcode & 7); | |
| 754 | return 3; | |
| 755 | ||
| 756 | case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: | |
| 757 | case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: | |
| 758 | sprintf(buffer, "tbnz (%s, a%d) %d, %x", i8str(program_read_byte(pc+2)), (opcode>>3)&1, opcode & 7, | |
| 759 | (pc+4+(INT8)program_read_byte(pc+3)) & 0xffffff); | |
| 760 | return 4; | |
| 761 | ||
| 762 | case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: | |
| 763 | case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: | |
| 764 | sprintf(buffer, "bclr (%s, a%d) %d", i8str(program_read_byte(pc+2)), (opcode>>3)&1, opcode & 7); | |
| 765 | return 3; | |
| 766 | ||
| 767 | case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: | |
| 768 | sprintf(buffer, "tbz (%x) %d, %x", r16u(pc+2), opcode & 7, | |
| 769 | (pc+5+(INT8)program_read_byte(pc+4)) & 0xffffff); | |
| 770 | return 5; | |
| 771 | ||
| 772 | case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: | |
| 773 | sprintf(buffer, "tbnz (%x) %d, %x", r16u(pc+2), opcode & 7, | |
| 774 | (pc+5+(INT8)program_read_byte(pc+4)) & 0xffffff); | |
| 775 | return 5; | |
| 776 | ||
| 777 | case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: | |
| 778 | sprintf(buffer, "bset (%x) %d", r16u(pc+2), opcode & 7); | |
| 779 | return 4; | |
| 780 | ||
| 781 | case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: | |
| 782 | sprintf(buffer, "bclr (%x) %d", r16u(pc+2), opcode & 7); | |
| 783 | return 4; | |
| 784 | ||
| 785 | case 0xe0: | |
| 786 | sprintf(buffer, "bltx %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 787 | return 3; | |
| 788 | ||
| 789 | case 0xe1: | |
| 790 | sprintf(buffer, "bgtx %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 791 | return 3; | |
| 792 | ||
| 793 | case 0xe2: | |
| 794 | sprintf(buffer, "bgex %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 795 | return 3; | |
| 796 | ||
| 797 | case 0xe3: | |
| 798 | sprintf(buffer, "blex %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 799 | return 3; | |
| 800 | ||
| 801 | case 0xe4: | |
| 802 | sprintf(buffer, "bcsx %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 803 | return 3; | |
| 804 | ||
| 805 | case 0xe5: | |
| 806 | sprintf(buffer, "bhix %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 807 | return 3; | |
| 808 | ||
| 809 | case 0xe6: | |
| 810 | sprintf(buffer, "bccx %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 811 | return 3; | |
| 812 | ||
| 813 | case 0xe7: | |
| 814 | sprintf(buffer, "blsx %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 815 | return 3; | |
| 816 | ||
| 817 | case 0xe8: | |
| 818 | sprintf(buffer, "beqx %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 819 | return 3; | |
| 820 | ||
| 821 | case 0xe9: | |
| 822 | sprintf(buffer, "bnex %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 823 | return 3; | |
| 824 | ||
| 825 | case 0xec: | |
| 826 | sprintf(buffer, "bvcx %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 827 | return 3; | |
| 828 | ||
| 829 | case 0xed: | |
| 830 | sprintf(buffer, "bvsx %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 831 | return 3; | |
| 832 | ||
| 833 | case 0xee: | |
| 834 | sprintf(buffer, "bncx %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 835 | return 3; | |
| 836 | ||
| 837 | case 0xef: | |
| 838 | sprintf(buffer, "bnsx %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 839 | return 3; | |
| 840 | ||
| 841 | case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7: { | |
| 842 | UINT8 opcode2 = program_read_byte(pc+2); | |
| 843 | switch(opcode2) { | |
| 844 | case 0x04: | |
| 845 | sprintf(buffer, "mulql %s, d%d", i8str(program_read_byte(pc+3)), opcode & 3); | |
| 846 | return 4; | |
| 847 | ||
| 848 | case 0x05: | |
| 849 | sprintf(buffer, "mulqh %s, d%d", i8str(program_read_byte(pc+3)), opcode & 3); | |
| 850 | return 4; | |
| 851 | ||
| 852 | case 0x08: | |
| 853 | sprintf(buffer, "mulql %s, d%d", i16str(r16s(pc+3)), opcode & 3); | |
| 854 | return 5; | |
| 855 | ||
| 856 | case 0x09: | |
| 857 | sprintf(buffer, "mulqh %s, d%d", i16str(r16s(pc+3)), opcode & 3); | |
| 858 | return 5; | |
| 859 | ||
| 860 | default: | |
| 861 | goto illegal3; | |
| 862 | } | |
| 863 | break; | |
| 864 | } | |
| 865 | ||
| 866 | case 0xfc: | |
| 867 | sprintf(buffer, "bvc %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 868 | return 3; | |
| 869 | ||
| 870 | case 0xfd: | |
| 871 | sprintf(buffer, "bvs %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 872 | return 3; | |
| 873 | ||
| 874 | case 0xfe: | |
| 875 | sprintf(buffer, "bnc %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 876 | return 3; | |
| 877 | ||
| 878 | case 0xff: | |
| 879 | sprintf(buffer, "bns %x", (pc+3+(INT8)program_read_byte(pc+2)) & 0xffffff); | |
| 880 | return 3; | |
| 881 | ||
| 882 | default: | |
| 883 | goto illegal2; | |
| 884 | } | |
| 885 | break; | |
| 886 | ||
| 887 | case 0xf6: | |
| 888 | sprintf(buffer, "nop"); | |
| 889 | return 1; | |
| 890 | ||
| 891 | case 0xf7: | |
| 892 | opcode = program_read_byte(pc+1); | |
| 893 | switch(opcode) { | |
| 894 | case 0x00: case 0x01: case 0x02: case 0x03: | |
| 895 | sprintf(buffer, "and %04x, d%d", r16u(pc+2), opcode & 3); | |
| 896 | return 4; | |
| 897 | ||
| 898 | case 0x04: case 0x05: case 0x06: case 0x07: | |
| 899 | sprintf(buffer, "btst %04x, d%d", r16u(pc+2), opcode & 3); | |
| 900 | return 4; | |
| 901 | ||
| 902 | case 0x08: case 0x09: case 0x0a: case 0x0b: | |
| 903 | sprintf(buffer, "add %s, a%d", i16str(r16s(pc+2)), opcode & 3); | |
| 904 | return 4; | |
| 905 | ||
| 906 | case 0x0c: case 0x0d: case 0x0e: case 0x0f: | |
| 907 | sprintf(buffer, "sub %s, a%d", i16str(r16s(pc+2)), opcode & 3); | |
| 908 | return 4; | |
| 909 | ||
| 910 | case 0x10: | |
| 911 | sprintf(buffer, "and %04x, psw", r16u(pc+2)); | |
| 912 | return 4; | |
| 913 | ||
| 914 | case 0x14: | |
| 915 | sprintf(buffer, "or %04x, psw", r16u(pc+2)); | |
| 916 | return 4; | |
| 917 | ||
| 918 | case 0x18: case 0x19: case 0x1a: case 0x1b: | |
| 919 | sprintf(buffer, "add %s, d%d", i16str(r16u(pc+2)), opcode & 3); | |
| 920 | return 4; | |
| 921 | ||
| 922 | case 0x1c: case 0x1d: case 0x1e: case 0x1f: | |
| 923 | sprintf(buffer, "sub %s, d%d", i16str(r16s(pc+2)), opcode & 3); | |
| 924 | return 4; | |
| 925 | ||
| 926 | case 0x20: case 0x21: case 0x22: case 0x23: | |
| 927 | sprintf(buffer, "move a%d, (%x)", opcode & 3, r16u(pc+2)); | |
| 928 | return 4; | |
| 929 | ||
| 930 | case 0x30: case 0x31: case 0x32: case 0x33: | |
| 931 | sprintf(buffer, "move (%x), a%d", r16u(pc+2), opcode & 3); | |
| 932 | return 4; | |
| 933 | ||
| 934 | case 0x40: case 0x41: case 0x42: case 0x43: | |
| 935 | sprintf(buffer, "or %04x, d%d", r16u(pc+2), opcode & 3); | |
| 936 | return 4; | |
| 937 | ||
| 938 | case 0x48: case 0x49: case 0x4a: case 0x4b: | |
| 939 | sprintf(buffer, "cmp %s, d%d", i16str(r16u(pc+2)), opcode & 3); | |
| 940 | return 4; | |
| 941 | ||
| 942 | case 0x4c: case 0x4d: case 0x4e: case 0x4f: | |
| 943 | sprintf(buffer, "xor %04x, d%d", r16u(pc+2), opcode & 3); | |
| 944 | return 4; | |
| 945 | ||
| 946 | case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: | |
| 947 | case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: | |
| 948 | sprintf(buffer, "movbu (%s, a%d), d%d", i16str(r16s(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 949 | return 4; | |
| 950 | ||
| 951 | case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67: | |
| 952 | case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: | |
| 953 | sprintf(buffer, "movx d%d, (%s, a%d)", opcode & 3, i16str(r16s(pc+2)), (opcode>>2) & 3); | |
| 954 | return 4; | |
| 955 | ||
| 956 | case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: | |
| 957 | case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: | |
| 958 | sprintf(buffer, "movx (%s, a%d), d%d", i16str(r16s(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 959 | return 4; | |
| 960 | ||
| 961 | case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: | |
| 962 | case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: | |
| 963 | sprintf(buffer, "mov d%d, (%s, a%d)", opcode & 3, i16str(r16s(pc+2)), (opcode>>2) & 3); | |
| 964 | return 4; | |
| 965 | ||
| 966 | case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: | |
| 967 | case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: | |
| 968 | sprintf(buffer, "movb d%d, (%s, a%d)", opcode & 3, i16str(r16s(pc+2)), (opcode>>2) & 3); | |
| 969 | return 4; | |
| 970 | ||
| 971 | case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: | |
| 972 | case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: | |
| 973 | sprintf(buffer, "mov a%d, (%s, a%d)", opcode & 3, i16str(r16s(pc+2)), (opcode>>2) & 3); | |
| 974 | return 4; | |
| 975 | ||
| 976 | case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: | |
| 977 | case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: | |
| 978 | sprintf(buffer, "mov (%s, a%d), a%d", i16str(r16s(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 979 | return 4; | |
| 980 | ||
| 981 | case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: | |
| 982 | case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: | |
| 983 | sprintf(buffer, "mov (%s, a%d), d%d", i16str(r16s(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 984 | return 4; | |
| 985 | ||
| 986 | case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: | |
| 987 | case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: | |
| 988 | sprintf(buffer, "movb (%s, a%d), d%d", i16str(r16s(pc+2)), (opcode>>2) & 3, opcode & 3); | |
| 989 | return 4; | |
| 990 | ||
| 991 | default: | |
| 992 | goto illegal2; | |
| 993 | } | |
| 994 | break; | |
| 995 | ||
| 996 | case 0xf8: case 0xf9: case 0xfa: case 0xfb: | |
| 997 | sprintf(buffer, "mov %s, d%d", i16str(r16s(pc+1)), opcode & 3); | |
| 998 | return 3; | |
| 999 | ||
| 1000 | case 0xfc: | |
| 1001 | sprintf(buffer, "jmp %x", (pc+3+r16s(pc+1)) & 0xffffff); | |
| 1002 | return 3; | |
| 1003 | ||
| 1004 | case 0xfd: | |
| 1005 | sprintf(buffer, "jsr %x", (pc+3+r16s(pc+1)) & 0xffffff); | |
| 1006 | return 3; | |
| 1007 | ||
| 1008 | case 0xfe: | |
| 1009 | sprintf(buffer, "rts"); | |
| 1010 | return 1; | |
| 1011 | ||
| 1012 | default: | |
| 1013 | goto illegal1; | |
| 1014 | }; | |
| 1015 | ||
| 1016 | illegal1: | |
| 1017 | sprintf(buffer, "dc.b %02x", program_read_byte(pc)); | |
| 1018 | return 1; | |
| 1019 | ||
| 1020 | illegal2: | |
| 1021 | sprintf(buffer, "dc.b %02x %02x", program_read_byte(pc), program_read_byte(pc+1)); | |
| 1022 | return 2; | |
| 1023 | ||
| 1024 | illegal3: | |
| 1025 | sprintf(buffer, "dc.b %02x %02x %02x", program_read_byte(pc), program_read_byte(pc+1), program_read_byte(pc+2)); | |
| 1026 | return 3; | |
| 1027 | } | |
| 1028 | ||
| 1029 | CPU_DISASSEMBLE( mn10200 ) | |
| 1030 | { | |
| 1031 | return mn102_disassemble(buffer, pc, oprom); | |
| 1032 | } | |
| 1033 |
| r7356 | r7357 | |
|---|---|---|
| 52 | 52 | For vector instructions, replace the first space on the right of the mnemonic |
| 53 | 53 | with a 'v'. |
| 54 | 54 | |
| 55 | 01-Feb-2010 (Robbbert): | |
| 56 | I've added the actual address, (as shown in the extreme left of the debugger | |
| 57 | output), so that you can see much easier how the program will flow. Example: | |
| 55 | 01-Feb-2010 (Robbbert): | |
| 56 | I've added the actual address, (as shown in the extreme left of the debugger | |
| 57 | output), so that you can see much easier how the program will flow. Example: | |
| 58 | 58 | |
| 59 | ||
| 59 | +C XXX(##/##) XXX(##/##) | |
| 60 | 60 | |
| 61 | The X value shows where the data word is located, and the Y value is the | |
| 62 | address of the next instruction. | |
| 61 | The X value shows where the data word is located, and the Y value is the | |
| 62 | address of the next instruction. | |
| 63 | 63 | */ |
| 64 | 64 | enum _format_type {branch, shiftl, shiftr, multiply, store, swap, one_address, two_address}; |
| 65 | 65 | typedef enum _format_type format_type; |
| r7356 | r7357 | |
|---|---|---|
| 6 | 6 | This chip is used in: |
| 7 | 7 | - shanghai.c |
| 8 | 8 | - adp.c |
| 9 | - sigmab52.c | |
| 9 | 10 | |
| 11 | ACRTC memory map: | |
| 12 | ||
| 13 | 00000-3ffff = RAM | |
| 14 | 40000-7ffff = ROM handled with a hack in the drivers | |
| 15 | 80000-bffff = unused | |
| 16 | c0000-fffff = unused | |
| 17 | ||
| 10 | 18 | ***************************************************************************/ |
| 11 | 19 | |
| 12 | 20 | #include "emu.h" |
| r7356 | r7357 | |
|---|---|---|
| 130 | 130 | { "joystick_deadzone;joy_deadzone;jdz", "0.3", 0, "center deadzone range for joystick where change is ignored (0.0 center, 1.0 end)" }, |
| 131 | 131 | { "joystick_saturation;joy_saturation;jsat", "0.85", 0, "end of axis saturation range for joystick where change is ignored (0.0 center, 1.0 end)" }, |
| 132 | 132 | { "natural;nat", "0", OPTION_BOOLEAN, "specifies whether to use a natural keyboard or not" }, |
| 133 | { "uimodekey;umk", "auto", 0, "specifies the key used to toggle between full and partial UI mode" }, | |
| 134 | ||
| 133 | { "uimodekey;umk", "auto", 0, "specifies the key used to toggle between full and partial UI mode" }, | |
| 135 | 134 | |
| 135 | ||
| 136 | 136 | /* input autoenable options */ |
| 137 | 137 | { NULL, NULL, OPTION_HEADER, "CORE INPUT AUTOMATIC ENABLE OPTIONS" }, |
| 138 | 138 | { "paddle_device;paddle", "keyboard", 0, "enable (none|keyboard|mouse|lightgun|joystick) if a paddle control is present" }, |
| r7356 | r7357 | |
| 151 | 151 | { "update_in_pause", "0", OPTION_BOOLEAN, "keep calling video updates while in pause" }, |
| 152 | 152 | { "debug;d", "0", OPTION_BOOLEAN, "enable/disable debugger" }, |
| 153 | 153 | { "debugscript", NULL, 0, "script for debugger" }, |
| 154 | { "debug_internal;di", "0", OPTION_BOOLEAN, "use the internal debugger for debugging" }, | |
| 154 | 155 | |
| 155 | 156 | /* misc options */ |
| 156 | 157 | { NULL, NULL, OPTION_HEADER, "CORE MISC OPTIONS" }, |
| r7356 | r7357 | |
|---|---|---|
| 59 | 59 | FUNCTION PROTOYPES |
| 60 | 60 | ***************************************************************************/ |
| 61 | 61 | |
| 62 | static void ui_input_frame_update(running_machine *machine); | |
| 62 | //static void ui_input_frame_update(running_machine *machine); | |
| 63 | 63 | |
| 64 | 64 | |
| 65 | 65 | |
| r7356 | r7357 | |
| 95 | 95 | corresponding IPT_UI_* events |
| 96 | 96 | -------------------------------------------------*/ |
| 97 | 97 | |
| 98 | ||
| 98 | ||
| 99 | 99 | { |
| 100 | 100 | ui_input_private *uidata = machine->ui_input_data; |
| 101 | 101 | int code; |
| r7356 | r7357 | |
|---|---|---|
| 144 | 144 | #define OPTION_VERBOSE "verbose" |
| 145 | 145 | #define OPTION_LOG "log" |
| 146 | 146 | #define OPTION_DEBUG "debug" |
| 147 | #define OPTION_DEBUG_INTERNAL "debug_internal" | |
| 147 | 148 | #define OPTION_DEBUGSCRIPT "debugscript" |
| 148 | 149 | #define OPTION_UPDATEINPAUSE "update_in_pause" |
| 149 | 150 |
| r7356 | r7357 | |
|---|---|---|
| 61 | 61 | |
| 62 | 62 | /* ----- event handling ----- */ |
| 63 | 63 | |
| 64 | void ui_input_frame_update(running_machine *machine); | |
| 65 | ||
| 64 | 66 | /* pushes a single event onto the queue */ |
| 65 | 67 | int ui_input_push_event(running_machine *machine, ui_event event); |
| 66 | 68 |
| r7356 | r7357 | |
|---|---|---|
| 1535 | 1535 | ui_mess_main_menu_populate(machine, menu); |
| 1536 | 1536 | #endif /* MESS */ |
| 1537 | 1537 | |
| 1538 | /* add keyboard mode menu */ | |
| 1539 | if (input_machine_has_keyboard(machine) && inputx_can_post(machine)) | |
| 1538 | /* add keyboard mode menu */ | |
| 1539 | if (input_machine_has_keyboard(machine) && inputx_can_post(machine)) | |
| 1540 | 1540 | ui_menu_item_append(menu, "Keyboard Mode", NULL, 0, (void *)ui_menu_keyboard_mode); |
| 1541 | 1541 | |
| 1542 | 1542 | /* add sliders menu */ |
| r7356 | r7357 | |
|---|---|---|
| 14 | 14 | #include "profiler.h" |
| 15 | 15 | #include "png.h" |
| 16 | 16 | #include "debugger.h" |
| 17 | #include "debugint/debugint.h" | |
| 17 | 18 | #include "rendutil.h" |
| 18 | 19 | #include "ui.h" |
| 19 | 20 | #include "aviio.h" |
| r7356 | r7357 | |
| 1301 | 1302 | /* draw the user interface */ |
| 1302 | 1303 | ui_update_and_render(machine, render_container_get_ui()); |
| 1303 | 1304 | |
| 1305 | /* update the internal render debugger */ | |
| 1306 | debugint_update_during_game(machine); | |
| 1307 | ||
| 1304 | 1308 | /* if we're throttling, synchronize before rendering */ |
| 1305 | 1309 | if (!debug && !skipped_it && effective_throttle(machine)) |
| 1306 | 1310 | update_throttle(machine, current_time); |
| r7356 | r7357 | |
|---|---|---|
| 23 | 23 | $(EMUOBJ)/cpu \ |
| 24 | 24 | $(EMUOBJ)/sound \ |
| 25 | 25 | $(EMUOBJ)/debug \ |
| 26 | $(EMUOBJ)/debugint \ | |
| 26 | 27 | $(EMUOBJ)/audio \ |
| 27 | 28 | $(EMUOBJ)/drivers \ |
| 28 | 29 | $(EMUOBJ)/machine \ |
| r7356 | r7357 | |
| 86 | 87 | $(EMUOBJ)/debug/debughlp.o \ |
| 87 | 88 | $(EMUOBJ)/debug/debugvw.o \ |
| 88 | 89 | $(EMUOBJ)/debug/express.o \ |
| 89 | $(EMUOBJ)/debug/textbuf.o | |
| 90 | $(EMUOBJ)/debug/textbuf.o \ | |
| 91 | $(EMUOBJ)/debugint/debugint.o | |
| 90 | 92 | |
| 91 | 93 | ifdef PROFILER |
| 92 | 94 | EMUOBJS += \ |
| r7356 | r7357 | |
| 182 | 184 | |
| 183 | 185 | EMUVIDEOOBJS = \ |
| 184 | 186 | $(EMUVIDEO)/generic.o \ |
| 187 | $(EMUVIDEO)/hd63484.o \ | |
| 185 | 188 | $(EMUVIDEO)/mc6845.o \ |
| 186 | 189 | $(EMUVIDEO)/poly.o \ |
| 187 | 190 | $(EMUVIDEO)/resnet.o \ |
| r7356 | r7357 | |
|---|---|---|
| 2524 | 2524 | |
| 2525 | 2525 | /* hook for MESS's natural keyboard support */ |
| 2526 | 2526 | input_port_update_hook(machine, port, &port->state->digital); |
| 2527 | ||
| 2527 | ||
| 2528 | 2528 | /* handle playback/record */ |
| 2529 | 2529 | playback_port(port); |
| 2530 | 2530 | record_port(port); |
| r7356 | r7357 | |
| 5303 | 5303 | void inputx_post_utf8_rate(running_machine *machine, const char *text, attotime rate) |
| 5304 | 5304 | { |
| 5305 | 5305 | inputx_postn_utf8_rate(machine, text, strlen(text), rate); |
| 5306 | } | |
| 5306 | } | |
| 5307 | 5307 | |
| 5308 | 5308 | /*************************************************************************** |
| 5309 | 5309 |
| r7356 | r7357 | |
|---|---|---|
| 1316 | 1316 | |
| 1317 | 1317 | /* fetch core options */ |
| 1318 | 1318 | sample_rate = options_get_int(mame_options(), OPTION_SAMPLERATE); |
| 1319 | debug_flags = options_get_bool(mame_options(), OPTION_DEBUG) ? (DEBUG_FLAG_ENABLED | DEBUG_FLAG_CALL_HOOK) : 0; | |
| 1319 | if (options_get_bool(mame_options(), OPTION_DEBUG)) | |
| 1320 | debug_flags = (DEBUG_FLAG_ENABLED | DEBUG_FLAG_CALL_HOOK) | (options_get_bool(mame_options(), OPTION_DEBUG_INTERNAL) ? 0 : DEBUG_FLAG_OSD_ENABLED); | |
| 1321 | else | |
| 1322 | debug_flags = 0; | |
| 1320 | 1323 | } |
| 1321 | 1324 | catch (std::bad_alloc &) |
| 1322 | 1325 | { |
| r7356 | r7357 | |
|---|---|---|
| 588 | 588 | i8255a->inte[PORT_A] = 0; |
| 589 | 589 | i8255a->inte1 = 0; |
| 590 | 590 | i8255a->inte2 = 0; |
| 591 | ||
| 591 | ||
| 592 | 592 | if (port_mode(i8255a, PORT_A) == MODE_OUTPUT) |
| 593 | 593 | { |
| 594 | 594 | devcb_call_write8(&i8255a->out_port_func[PORT_A], 0, i8255a->output[PORT_A]); |
| r7356 | r7357 | |
| 612 | 612 | i8255a->ibf[PORT_B] = 0; |
| 613 | 613 | i8255a->obf[PORT_B] = 1; |
| 614 | 614 | i8255a->inte[PORT_B] = 0; |
| 615 | ||
| 615 | ||
| 616 | 616 | if (port_mode(i8255a, PORT_B) == MODE_OUTPUT) |
| 617 | 617 | { |
| 618 | 618 | devcb_call_write8(&i8255a->out_port_func[PORT_B], 0, i8255a->output[PORT_B]); |
| r7356 | r7357 | |
|---|---|---|
| 62 | 62 | #define DEBUG_FLAG_WPW_PROGRAM 0x00000100 /* watchpoints are enabled for PROGRAM memory writes */ |
| 63 | 63 | #define DEBUG_FLAG_WPW_DATA 0x00000200 /* watchpoints are enabled for DATA memory writes */ |
| 64 | 64 | #define DEBUG_FLAG_WPW_IO 0x00000400 /* watchpoints are enabled for IO memory writes */ |
| 65 | #define DEBUG_FLAG_OSD_ENABLED 0x00001000 /* The OSD debugger is enabled */ | |
| 65 | 66 | |
| 66 | 67 | |
| 67 | 68 | /* MESS vs. MAME abstractions */ |
| r0 | r7357 | |
|---|---|---|
| 1 | /* | |
| 2 | ZOOM ZSG-2 custom wavetable synthesizer | |
| 3 | ||
| 4 | Written by Olivier Galibert | |
| 5 | MAME conversion by R. Belmont | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | --------------------------------------------------------- | |
| 11 | ||
| 12 | Additional notes on the sample format, reverse-engineered | |
| 13 | by Olivier Galibert and David Haywood: | |
| 14 | ||
| 15 | The zoom sample rom is decomposed in 0x40000 bytes pages. Each page | |
| 16 | starts by a header and is followed by compressed samples. | |
| 17 | ||
| 18 | The header is a vector of 16 bytes structures composed of 4 32bits | |
| 19 | little-endian values representing: | |
| 20 | - sample start position in bytes, always a multiple of 4 | |
| 21 | - sample end position in bytes, minus 4, always... | |
| 22 | - loop position in bytes, always.... | |
| 23 | - flags, probably | |
| 24 | ||
| 25 | It is interesting to note that this header is *not* parsed by the | |
| 26 | ZSG. The main program reads the rom through appropriate ZSG | |
| 27 | commands, and use the results in subsequent register setups. It's | |
| 28 | not even obvious that the ZSG cares about the pages, it may just | |
| 29 | see the address space as linear. In the same line, the | |
| 30 | interpretation of the flags is obviously dependant on the main | |
| 31 | program, not the ZSG, but some of the bits are directly copied to | |
| 32 | some of the registers. | |
| 33 | ||
| 34 | The samples are compressed with a 2:1 ratio. Each bloc of 4-bytes | |
| 35 | becomes 4 16-bits samples. Reading the 4 bytes as a *little-endian* | |
| 36 | 32bits values, the structure is: | |
| 37 | ||
| 38 | 1444 4444 1333 3333 1222 2222 ssss1111 | |
| 39 | ||
| 40 | 's' is a 4-bit scale value. '1', '2', '3', '4' are signed 7-bits | |
| 41 | values corresponding to the 4 samples. To compute the final 16bits | |
| 42 | value just shift left by (9-s). Yes, that simple. | |
| 43 | ||
| 44 | */ | |
| 45 | ||
| 46 | #include "emu.h" | |
| 47 | #include "streams.h" | |
| 48 | #include "zsg2.h" | |
| 49 | ||
| 50 | // 16 registers per channel, 48 channels | |
| 51 | typedef struct _zchan zchan; | |
| 52 | struct _zchan | |
| 53 | { | |
| 54 | UINT16 v[16]; | |
| 55 | }; | |
| 56 | ||
| 57 | typedef struct _zsg2_state zsg2_state; | |
| 58 | struct _zsg2_state | |
| 59 | { | |
| 60 | zchan zc[48]; | |
| 61 | UINT16 act[3]; | |
| 62 | UINT16 alow, ahigh; | |
| 63 | UINT8 *bank_samples; | |
| 64 | ||
| 65 | int sample_rate; | |
| 66 | sound_stream *stream; | |
| 67 | }; | |
| 68 | ||
| 69 | INLINE zsg2_state *get_safe_token(running_device *device) | |
| 70 | { | |
| 71 | assert(device != NULL); | |
| 72 | assert(device->token != NULL); | |
| 73 | assert(device->type == SOUND); | |
| 74 | assert(sound_get_type(device) == SOUND_ZSG2); | |
| 75 | return (zsg2_state *)device->token; | |
| 76 | } | |
| 77 | ||
| 78 | static STREAM_UPDATE( update_stereo ) | |
| 79 | { | |
| 80 | // zsg2_state *info = (zsg2_state *)param; | |
| 81 | stream_sample_t *dest1 = outputs[0]; | |
| 82 | stream_sample_t *dest2 = outputs[1]; | |
| 83 | ||
| 84 | memset(dest1, 0, sizeof(stream_sample_t) * samples); | |
| 85 | memset(dest2, 0, sizeof(stream_sample_t) * samples); | |
| 86 | } | |
| 87 | ||
| 88 | static void chan_w(zsg2_state *info, int chan, int reg, UINT16 data) | |
| 89 | { | |
| 90 | info->zc[chan].v[reg] = data; | |
| 91 | // log_event("ZOOMCHAN", "chan %02x reg %x = %04x", chan, reg, data); | |
| 92 | } | |
| 93 | ||
| 94 | static UINT16 chan_r(zsg2_state *info, int chan, int reg) | |
| 95 | { | |
| 96 | // log_event("ZOOMCHAN", "chan %02x read reg %x: %04x", chan, reg, zc[chan].v[reg]); | |
| 97 | return info->zc[chan].v[reg]; | |
| 98 | } | |
| 99 | ||
| 100 | static void check_channel(zsg2_state *info, int chan) | |
| 101 | { | |
| 102 | // log_event("ZOOM", "chan %02x e=%04x f=%04x", chan, zc[chan].v[14], zc[chan].v[15]); | |
| 103 | } | |
| 104 | ||
| 105 | static void keyon(zsg2_state *info, int chan) | |
| 106 | { | |
| 107 | #if 0 | |
| 108 | log_event("ZOOM", "keyon %02x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x", | |
| 109 | chan, | |
| 110 | info->zc[chan].v[0x0], info->zc[chan].v[0x1], info->zc[chan].v[0x2], info->zc[chan].v[0x3], | |
| 111 | info->zc[chan].v[0x4], info->zc[chan].v[0x5], info->zc[chan].v[0x6], info->zc[chan].v[0x7], | |
| 112 | info->zc[chan].v[0x8], info->zc[chan].v[0x9], info->zc[chan].v[0xa], info->zc[chan].v[0xb], | |
| 113 | info->zc[chan].v[0xc], info->zc[chan].v[0xd], info->zc[chan].v[0xe], info->zc[chan].v[0xf]); | |
| 114 | #endif | |
| 115 | } | |
| 116 | ||
| 117 | static void control_w(zsg2_state *info, int reg, UINT16 data) | |
| 118 | { | |
| 119 | switch(reg) | |
| 120 | { | |
| 121 | case 0x00: case 0x02: case 0x04: | |
| 122 | { | |
| 123 | int base = (reg & 6) << 3; | |
| 124 | int i; | |
| 125 | for(i=0; i<16; i++) | |
| 126 | if(data & (1<<i)) | |
| 127 | keyon(info, base+i); | |
| 128 | break; | |
| 129 | } | |
| 130 | ||
| 131 | case 0x08: case 0x0a: case 0x0c: | |
| 132 | { | |
| 133 | int base = (reg & 6) << 3; | |
| 134 | int i; | |
| 135 | for(i=0; i<16; i++) | |
| 136 | if(data & (1<<i)) | |
| 137 | check_channel(info, base+i); | |
| 138 | break; | |
| 139 | } | |
| 140 | ||
| 141 | case 0x30: | |
| 142 | break; | |
| 143 | ||
| 144 | case 0x38: | |
| 145 | info->alow = data; | |
| 146 | break; | |
| 147 | ||
| 148 | case 0x3a: | |
| 149 | info->ahigh = data; | |
| 150 | break; | |
| 151 | ||
| 152 | default: | |
| 153 | // log_event("ZOOMCTRL", "%02x = %04x", reg, data); | |
| 154 | break; | |
| 155 | } | |
| 156 | } | |
| 157 | ||
| 158 | static UINT16 control_r(zsg2_state *info, int reg) | |
| 159 | { | |
| 160 | switch(reg) | |
| 161 | { | |
| 162 | case 0x28: | |
| 163 | return 0xff00; | |
| 164 | ||
| 165 | case 0x3c: case 0x3e: | |
| 166 | { | |
| 167 | UINT32 adr = (info->ahigh << 16) | info->alow; | |
| 168 | UINT32 val = *(unsigned int *)(info->bank_samples+adr); | |
| 169 | // log_event("ZOOMCTRL", "rom read.%c %06x = %08x", reg == 0x3e ? 'h' : 'l', adr, val); | |
| 170 | return (reg == 0x3e) ? (val >> 16) : val; | |
| 171 | } | |
| 172 | } | |
| 173 | ||
| 174 | // log_event("ZOOMCTRL", "read %02x", reg); | |
| 175 | ||
| 176 | return 0xffff; | |
| 177 | } | |
| 178 | ||
| 179 | WRITE16_DEVICE_HANDLER( zsg2_w ) | |
| 180 | { | |
| 181 | zsg2_state *info = get_safe_token(device); | |
| 182 | int adr = offset * 2; | |
| 183 | ||
| 184 | assert(mem_mask == 0xffff); // we only support full 16-bit accesses | |
| 185 | ||
| 186 | stream_update(info->stream); | |
| 187 | ||
| 188 | if (adr < 0x600) | |
| 189 | { | |
| 190 | int chan = adr >> 5; | |
| 191 | int reg = (adr >> 1) & 15; | |
| 192 | ||
| 193 | chan_w(info, chan, reg, data); | |
| 194 | } | |
| 195 | else | |
| 196 | { | |
| 197 | control_w(info, adr - 0x600, data); | |
| 198 | } | |
| 199 | } | |
| 200 | ||
| 201 | READ16_DEVICE_HANDLER( zsg2_r ) | |
| 202 | { | |
| 203 | zsg2_state *info = get_safe_token(device); | |
| 204 | int adr = offset * 2; | |
| 205 | ||
| 206 | assert(mem_mask == 0xffff); // we only support full 16-bit accesses | |
| 207 | ||
| 208 | if (adr < 0x600) | |
| 209 | { | |
| 210 | int chan = adr >> 5; | |
| 211 | int reg = (adr >> 1) & 15; | |
| 212 | return chan_r(info, chan, reg); | |
| 213 | } | |
| 214 | else | |
| 215 | { | |
| 216 | return control_r(info, adr - 0x600); | |
| 217 | } | |
| 218 | ||
| 219 | return 0; | |
| 220 | } | |
| 221 | ||
| 222 | static DEVICE_START( zsg2 ) | |
| 223 | { | |
| 224 | const zsg2_interface *intf = (const zsg2_interface *)device->baseconfig().static_config; | |
| 225 | zsg2_state *info = get_safe_token(device); | |
| 226 | ||
| 227 | info->sample_rate = device->clock; | |
| 228 | ||
| 229 | memset(&info->zc, 0, sizeof(info->zc)); | |
| 230 | memset(&info->act, 0, sizeof(info->act)); | |
| 231 | ||
| 232 | info->stream = stream_create(device, 0, 2, info->sample_rate, info, update_stereo); | |
| 233 | ||
| 234 | info->bank_samples = memory_region(device->machine, intf->samplergn); | |
| 235 | } | |
| 236 | ||
| 237 | /************************************************************************** | |
| 238 | * Generic get_info | |
| 239 | **************************************************************************/ | |
| 240 | ||
| 241 | DEVICE_GET_INFO( zsg2 ) | |
| 242 | { | |
| 243 | switch (state) | |
| 244 | { | |
| 245 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 246 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(zsg2_state); break; | |
| 247 | ||
| 248 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 249 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME( zsg2 ); break; | |
| 250 | case DEVINFO_FCT_STOP: /* nothing */ break; | |
| 251 | case DEVINFO_FCT_RESET: /* nothing */ break; | |
| 252 | ||
| 253 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 254 | case DEVINFO_STR_NAME: strcpy(info->s, "ZSG-2"); break; | |
| 255 | case DEVINFO_STR_FAMILY: strcpy(info->s, "Zoom custom"); break; | |
| 256 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; | |
| 257 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; | |
| 258 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; | |
| 259 | } | |
| 260 | } | |
| 261 |
| r0 | r7357 | |
|---|---|---|
| 1 | /* | |
| 2 | ZOOM ZSG-2 custom wavetable synthesizer | |
| 3 | */ | |
| 4 | ||
| 5 | #pragma once | |
| 6 | ||
| 7 | #ifndef __ZSG2_H__ | |
| 8 | #define __ZSG2_H__ | |
| 9 | ||
| 10 | READ16_DEVICE_HANDLER( zsg2_r ); | |
| 11 | WRITE16_DEVICE_HANDLER( zsg2_w ); | |
| 12 | ||
| 13 | typedef struct _zsg2_interface zsg2_interface; | |
| 14 | struct _zsg2_interface | |
| 15 | { | |
| 16 | const char *samplergn; | |
| 17 | }; | |
| 18 | ||
| 19 | DEVICE_GET_INFO( zsg2 ); | |
| 20 | #define SOUND_ZSG2 DEVICE_GET_INFO_NAME( zsg2 ) | |
| 21 | ||
| 22 | #endif /* __ZSG2_H__ */ |
| r7356 | r7357 | |
|---|---|---|
| 648 | 648 | ifneq ($(filter YMZ280B,$(SOUNDS)),) |
| 649 | 649 | SOUNDOBJS += $(SOUNDOBJ)/ymz280b.o |
| 650 | 650 | endif |
| 651 | ||
| 652 | #------------------------------------------------- | |
| 653 | # ZOOM ZSG-2 | |
| 654 | #------------------------------------------------- | |
| 655 | ||
| 656 | ifneq ($(filter ZSG2,$(SOUNDS)),) | |
| 657 | SOUNDOBJS += $(SOUNDOBJ)/zsg2.o | |
| 658 | endif | |
| 659 |
| r7356 | r7357 | |
|---|---|---|
| 14 | 14 | const UINT8 *rom; |
| 15 | 15 | int bankshift; |
| 16 | 16 | int bankmask; |
| 17 | int rgnmask; | |
| 17 | 18 | sound_stream * stream; |
| 18 | 19 | }; |
| 19 | 20 | |
| r7356 | r7357 | |
| 29 | 30 | static STREAM_UPDATE( SEGAPCM_update ) |
| 30 | 31 | { |
| 31 | 32 | segapcm_state *spcm = (segapcm_state *)param; |
| 33 | int rgnmask = spcm->rgnmask; | |
| 32 | 34 | int ch; |
| 33 | 35 | |
| 34 | 36 | /* clear the buffers */ |
| r7356 | r7357 | |
| 70 | 72 | } |
| 71 | 73 | |
| 72 | 74 | /* fetch the sample */ |
| 73 | v = rom[addr >> 8] - 0x80; | |
| 75 | v = rom[(addr >> 8) & rgnmask] - 0x80; | |
| 74 | 76 | |
| 75 | 77 | /* apply panning and advance */ |
| 76 | 78 | outputs[0][i] += v * voll; |
| r7356 | r7357 | |
| 103 | 105 | mask = BANK_MASK7>>16; |
| 104 | 106 | |
| 105 | 107 | len = device->region->bytes(); |
| 108 | spcm->rgnmask = len - 1; | |
| 109 | ||
| 106 | 110 | for(rom_mask = 1; rom_mask < len; rom_mask *= 2); |
| 111 | ||
| 107 | 112 | rom_mask--; |
| 108 | 113 | |
| 109 | 114 | spcm->bankmask = mask & (rom_mask >> spcm->bankshift); |
| r7356 | r7357 | |
|---|---|---|
| 125 | 125 | static int ui_active; |
| 126 | 126 | /* natural keyboard info */ |
| 127 | 127 | static int ui_use_natural_keyboard; |
| 128 | static UINT8 non_char_keys_down[(ARRAY_LENGTH(non_char_keys) + 7) / 8]; | |
| 128 | static UINT8 non_char_keys_down[(ARRAY_LENGTH(non_char_keys) + 7) / 8]; | |
| 129 | 129 | |
| 130 | 130 | |
| 131 | 131 | /*************************************************************************** |
| r7356 | r7357 | |
| 254 | 254 | |
| 255 | 255 | /* reset globals */ |
| 256 | 256 | single_step = FALSE; |
| 257 | ui_set_handler(handler_messagebox, 0); | |
| 257 | ui_set_handler(handler_messagebox, 0); | |
| 258 | 258 | ui_active = 0; |
| 259 | 259 | /* retrieve options */ |
| 260 | 260 | ui_use_natural_keyboard = options_get_bool(mame_options(), OPTION_NATURAL_KEYBOARD); |
| 261 | ||
| 261 | ||
| 262 | 262 | return 0; |
| 263 | 263 | } |
| 264 | 264 |
| r7356 | r7357 | |
|---|---|---|
| 17 | 17 | #include "debug/debugcon.h" |
| 18 | 18 | #include "debug/express.h" |
| 19 | 19 | #include "debug/debugvw.h" |
| 20 | #include "debugint/debugint.h" | |
| 20 | 21 | #include <ctype.h> |
| 21 | 22 | |
| 22 | 23 | |
| r7356 | r7357 | |
| 73 | 74 | debug_view_init(machine); |
| 74 | 75 | debug_comment_init(machine); |
| 75 | 76 | |
| 77 | /* always initialize the internal render debugger */ | |
| 78 | debugint_init(machine); | |
| 79 | ||
| 76 | 80 | /* allocate a new entry for our global list */ |
| 77 | 81 | add_exit_callback(machine, debugger_exit); |
| 78 | 82 | entry = global_alloc(machine_entry); |
| r7356 | r7357 | |
|---|---|---|
| 21 | 21 | <bounds x="0" y="0" width="3" height="4" /> |
| 22 | 22 | </screen> |
| 23 | 23 | </view> |
| 24 | ||
| 25 | <element name="dbgdis"> | |
| 26 | </element> | |
| 27 | ||
| 28 | <view name="Debug"> | |
| 29 | <screen index="0"> | |
| 30 | <bounds left="0" top="0" right="3" bottom="4" /> | |
| 31 | </screen> | |
| 32 | <bezel element="dbgdis"> | |
| 33 | <bounds x="-2.5" y="0" width="8" height="6" /> | |
| 34 | </bezel> | |
| 35 | </view> | |
| 36 | ||
| 24 | 37 | </mamelayout> |
| r7356 | r7357 | |
|---|---|---|
| 43 | 43 | #define GAME_IS_BIOS_ROOT 0x00001000 /* this driver entry is a BIOS root */ |
| 44 | 44 | #define GAME_NO_STANDALONE 0x00002000 /* this driver cannot stand alone */ |
| 45 | 45 | #define GAME_REQUIRES_ARTWORK 0x00004000 /* the driver requires external artwork for key elements of the game */ |
| 46 | #define GAME_UNOFFICIAL | |
| 46 | #define GAME_UNOFFICIAL | |
| 47 | 47 | #define GAME_NO_SOUND_HW 0x00010000 /* sound hardware not available */ |
| 48 | 48 | |
| 49 | 49 |
| r7356 | r7357 | |
|---|---|---|
| 114 | 114 | float xscale, yscale; /* scale transforms */ |
| 115 | 115 | render_color color; /* color transform */ |
| 116 | 116 | int orientation; /* orientation transform */ |
| 117 | int no_center; /* center the container? */ | |
| 117 | 118 | }; |
| 118 | 119 | |
| 119 | 120 | |
| r7356 | r7357 | |
| 166 | 167 | int base_layerconfig; /* the layer configuration at the time of first frame */ |
| 167 | 168 | int maxtexwidth; /* maximum width of a texture */ |
| 168 | 169 | int maxtexheight; /* maximum height of a texture */ |
| 170 | render_container * debug_containers; | |
| 169 | 171 | }; |
| 170 | 172 | |
| 171 | 173 | |
| r7356 | r7357 | |
| 1640 | 1642 | } |
| 1641 | 1643 | } |
| 1642 | 1644 | |
| 1645 | /* process the debug containers */ | |
| 1646 | for (render_container *debug = target->debug_containers; debug != NULL; debug = debug->next) | |
| 1647 | { | |
| 1648 | ui_xform.xoffs = 0; | |
| 1649 | ui_xform.yoffs = 0; | |
| 1650 | ui_xform.xscale = (float) target->width; | |
| 1651 | ui_xform.yscale = (float) target->height; | |
| 1652 | ui_xform.color.r = ui_xform.color.g = ui_xform.color.b = ui_xform.color.a = 1.0f; | |
| 1653 | ui_xform.color.a = 0.9; | |
| 1654 | ui_xform.orientation = target->orientation; | |
| 1655 | ui_xform.no_center = TRUE; | |
| 1656 | ||
| 1657 | /* add UI elements */ | |
| 1658 | add_container_primitives(target, &target->primlist[listnum], &ui_xform, debug, BLENDMODE_ALPHA); | |
| 1659 | } | |
| 1660 | ||
| 1643 | 1661 | /* process the UI if we are the UI target */ |
| 1644 | 1662 | if (target == render_get_ui_target()) |
| 1645 | 1663 | { |
| r7356 | r7357 | |
| 1909 | 1927 | if (container_xform.orientation & ORIENTATION_FLIP_Y) yoffs = -yoffs; |
| 1910 | 1928 | container_xform.xscale = xform->xscale * xscale; |
| 1911 | 1929 | container_xform.yscale = xform->yscale * yscale; |
| 1912 | container_xform.xoffs = xform->xscale * (0.5f - 0.5f * xscale + xoffs) + xform->xoffs; | |
| 1913 | container_xform.yoffs = xform->yscale * (0.5f - 0.5f * yscale + yoffs) + xform->yoffs; | |
| 1930 | if (xform->no_center) | |
| 1931 | { | |
| 1932 | container_xform.xoffs = xform->xscale * (xoffs) + xform->xoffs; | |
| 1933 | container_xform.yoffs = xform->yscale * (yoffs) + xform->yoffs; | |
| 1934 | } | |
| 1935 | else | |
| 1936 | { | |
| 1937 | container_xform.xoffs = xform->xscale * (0.5f - 0.5f * xscale + xoffs) + xform->xoffs; | |
| 1938 | container_xform.yoffs = xform->yscale * (0.5f - 0.5f * yscale + yoffs) + xform->yoffs; | |
| 1939 | } | |
| 1914 | 1940 | container_xform.color = xform->color; |
| 1915 | 1941 | } |
| 1916 | 1942 | |
| r7356 | r7357 | |
| 3152 | 3178 | } |
| 3153 | 3179 | } |
| 3154 | 3180 | } |
| 3181 | ||
| 3182 | ||
| 3183 | render_container *render_debug_alloc(render_target *target) | |
| 3184 | { | |
| 3185 | render_container *container = render_container_alloc(target->machine); | |
| 3186 | ||
| 3187 | container->next = target->debug_containers; | |
| 3188 | target->debug_containers = container; | |
| 3189 | ||
| 3190 | return container; | |
| 3191 | } | |
| 3192 | ||
| 3193 | ||
| 3194 | void render_debug_free(render_target *target, render_container *container) | |
| 3195 | { | |
| 3196 | if (container == target->debug_containers) | |
| 3197 | { | |
| 3198 | target->debug_containers = container->next; | |
| 3199 | } | |
| 3200 | else | |
| 3201 | { | |
| 3202 | render_container *c; | |
| 3203 | ||
| 3204 | for (c = target->debug_containers; c != NULL; c = c->next) | |
| 3205 | if (c->next == container) | |
| 3206 | break; | |
| 3207 | c->next = container->next; | |
| 3208 | } | |
| 3209 | render_container_free(container); | |
| 3210 | } | |
| 3211 | ||
| 3212 | ||
| 3213 | void render_debug_top(render_target *target, render_container *container) | |
| 3214 | { | |
| 3215 | /* remove */ | |
| 3216 | if (container == target->debug_containers) | |
| 3217 | { | |
| 3218 | target->debug_containers = container->next; | |
| 3219 | } | |
| 3220 | else | |
| 3221 | { | |
| 3222 | render_container *c; | |
| 3223 | ||
| 3224 | for (c = target->debug_containers; c != NULL; c = c->next) | |
| 3225 | if (c->next == container) | |
| 3226 | break; | |
| 3227 | c->next = container->next; | |
| 3228 | } | |
| 3229 | /* add to end */ | |
| 3230 | if (target->debug_containers == NULL) | |
| 3231 | target->debug_containers = container; | |
| 3232 | else | |
| 3233 | { | |
| 3234 | render_container *c; | |
| 3235 | ||
| 3236 | for (c = target->debug_containers; c != NULL; c = c->next) | |
| 3237 | if (c->next == NULL) | |
| 3238 | break; | |
| 3239 | c->next = container; | |
| 3240 | } | |
| 3241 | container->next = NULL; | |
| 3242 | } | |
| 3243 | ||
| 3244 |
| r0 | r7357 | |
|---|---|---|
| 1 | /********************************************************************* | |
| 2 | ||
| 3 | debugint.c | |
| 4 | ||
| 5 | Internal debugger frontend using render interface. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | *********************************************************************/ | |
| 11 | ||
| 12 | #include "emu.h" | |
| 13 | #include "ui.h" | |
| 14 | #include "rendfont.h" | |
| 15 | #include "uimenu.h" | |
| 16 | #include "uiinput.h" | |
| 17 | #include "video.h" | |
| 18 | #include "osdepend.h" | |
| 19 | ||
| 20 | #include "debug/debugvw.h" | |
| 21 | #include "debug/debugcon.h" | |
| 22 | #include "debug/debugcpu.h" | |
| 23 | ||
| 24 | ||
| 25 | /*************************************************************************** | |
| 26 | CONSTANTS | |
| 27 | ***************************************************************************/ | |
| 28 | ||
| 29 | #define BORDER_YTHICKNESS 1 | |
| 30 | #define BORDER_XTHICKNESS 1 | |
| 31 | #define HSB_HEIGHT 20 | |
| 32 | #define VSB_WIDTH 20 | |
| 33 | #define TITLE_HEIGHT 20 | |
| 34 | ||
| 35 | enum | |
| 36 | { | |
| 37 | RECT_DVIEW, | |
| 38 | RECT_DVIEW_CLIENT, | |
| 39 | RECT_DVIEW_TITLE, | |
| 40 | RECT_DVIEW_HSB, | |
| 41 | RECT_DVIEW_VSB, | |
| 42 | RECT_DVIEW_SIZE, | |
| 43 | }; | |
| 44 | ||
| 45 | enum | |
| 46 | { | |
| 47 | VIEW_STATE_BUTTON = 0x01, | |
| 48 | VIEW_STATE_MOVING = 0x02, | |
| 49 | VIEW_STATE_SIZING = 0x04, | |
| 50 | VIEW_STATE_NEEDS_UPDATE = 0x08, | |
| 51 | VIEW_STATE_FOLLOW_CPU = 0x10, | |
| 52 | }; | |
| 53 | ||
| 54 | /*************************************************************************** | |
| 55 | MACROS | |
| 56 | ***************************************************************************/ | |
| 57 | ||
| 58 | //#define NX(_dv, _x) ((float) (_x)/(float)rect_get_width(&(_dv)->bounds)) | |
| 59 | //#define NY(_dv, _y) ((float) (_y)/(float)rect_get_height(&(_dv)->bounds)) | |
| 60 | #define NX(_dv, _x) ((float) (_x)/(float) (dv)->rt_width) | |
| 61 | #define NY(_dv, _y) ((float) (_y)/(float) (dv)->rt_height) | |
| 62 | ||
| 63 | ||
| 64 | #define LIST_ADD_FRONT(_list, _elem, _type) \ | |
| 65 | do { \ | |
| 66 | (_elem)->next = _list; \ | |
| 67 | _list = _elem; \ | |
| 68 | } while (0) | |
| 69 | ||
| 70 | #define LIST_GET_PREVIOUS(_list, _elem, _prev) \ | |
| 71 | do { \ | |
| 72 | _prev = NULL; \ | |
| 73 | if (_list != _elem) \ | |
| 74 | for (_prev = _list; _prev != NULL; _prev = _prev->next) \ | |
| 75 | if ((_prev)->next == _elem) \ | |
| 76 | break; \ | |
| 77 | } while (0) | |
| 78 | ||
| 79 | #define LIST_GET_LAST(_list, _last) \ | |
| 80 | do { \ | |
| 81 | for (_last = _list; _last != NULL; _last = _last->next) \ | |
| 82 | if ((_last)->next == NULL) \ | |
| 83 | break; \ | |
| 84 | } while (0) | |
| 85 | ||
| 86 | #define LIST_REMOVE(_list, _elem, _type) \ | |
| 87 | do { \ | |
| 88 | _type *_hlp; \ | |
| 89 | LIST_GET_PREVIOUS(_list, _elem, _hlp); \ | |
| 90 | if (_hlp != NULL) \ | |
| 91 | (_hlp)->next = (_elem)->next; \ | |
| 92 | else \ | |
| 93 | _list = (_elem)->next; \ | |
| 94 | } while (0) | |
| 95 | ||
| 96 | #define LIST_ADD_BACK(_list, _elem, _type) \ | |
| 97 | do { \ | |
| 98 | _type *_hlp; \ | |
| 99 | LIST_GET_LAST(_list, _hlp); \ | |
| 100 | if (_hlp != NULL) \ | |
| 101 | (_hlp)->next = _elem; \ | |
| 102 | else \ | |
| 103 | _list = _elem; \ | |
| 104 | } while (0) | |
| 105 | ||
| 106 | /*************************************************************************** | |
| 107 | TYPE DEFINITIONS | |
| 108 | ***************************************************************************/ | |
| 109 | ||
| 110 | typedef struct _adjustment adjustment; | |
| 111 | struct _adjustment | |
| 112 | { | |
| 113 | int visible; | |
| 114 | int lower; | |
| 115 | int upper; | |
| 116 | int value; | |
| 117 | int step_increment; | |
| 118 | int page_increment; | |
| 119 | int page_size; | |
| 120 | }; | |
| 121 | ||
| 122 | class DView; | |
| 123 | ||
| 124 | class DView_edit | |
| 125 | { | |
| 126 | DISABLE_COPYING(DView_edit); | |
| 127 | ||
| 128 | public: | |
| 129 | DView_edit() | |
| 130 | { } | |
| 131 | ~DView_edit() | |
| 132 | { } | |
| 133 | int active; | |
| 134 | render_container * container; | |
| 135 | astring str; | |
| 136 | }; | |
| 137 | ||
| 138 | /*************************************************************************** | |
| 139 | FUNCTION PROTOTYPES | |
| 140 | ***************************************************************************/ | |
| 141 | ||
| 142 | static void dview_update(debug_view *dw, void *osdprivate); | |
| 143 | static int map_point(DView *dv, INT32 target_x, INT32 target_y, INT32 *mapped_x, INT32 *mapped_y); | |
| 144 | ||
| 145 | class DView | |
| 146 | { | |
| 147 | DISABLE_COPYING(DView); | |
| 148 | ||
| 149 | public: | |
| 150 | DView(render_target *target, running_machine *machine, int type, int flags) | |
| 151 | : next(NULL), | |
| 152 | type(0), | |
| 153 | state(0), | |
| 154 | ofs_x(0), | |
| 155 | ofs_y(0) | |
| 156 | { | |
| 157 | this->target = target; | |
| 158 | //dv->container = render_target_get_component_container(target, name, &pos); | |
| 159 | this->container = render_debug_alloc(target); | |
| 160 | this->view = debug_view_alloc(machine, type, dview_update, this); | |
| 161 | this->type = type; | |
| 162 | this->machine = machine; | |
| 163 | this->state = flags | VIEW_STATE_NEEDS_UPDATE; | |
| 164 | ||
| 165 | // initial size | |
| 166 | this->bounds.min_x = 0; | |
| 167 | this->bounds.min_y = 0; | |
| 168 | this->bounds.max_x = 300; | |
| 169 | this->bounds.max_y = 300; | |
| 170 | ||
| 171 | /* specials */ | |
| 172 | switch (type) | |
| 173 | { | |
| 174 | case DVT_DISASSEMBLY: | |
| 175 | /* set up disasm view */ | |
| 176 | debug_view_begin_update(this->view); | |
| 177 | disasm_view_set_expression(this->view, "curpc"); | |
| 178 | //debug_view_ property_UINT32(dv->view, DVP_DASM_TRACK_LIVE, 1); | |
| 179 | debug_view_end_update(this->view); | |
| 180 | break; | |
| 181 | } | |
| 182 | } | |
| 183 | ~DView() | |
| 184 | { | |
| 185 | render_debug_free(this->target, this->container); | |
| 186 | debug_view_free(this->view); | |
| 187 | } | |
| 188 | ||
| 189 | DView * next; | |
| 190 | ||
| 191 | int type; | |
| 192 | debug_view * view; | |
| 193 | render_container * container; | |
| 194 | render_target * target; | |
| 195 | running_machine * machine; | |
| 196 | int state; | |
| 197 | // drawing | |
| 198 | rectangle bounds; | |
| 199 | int ofs_x; | |
| 200 | int ofs_y; | |
| 201 | astring title; | |
| 202 | int last_x; | |
| 203 | int last_y; | |
| 204 | // Scrollbars | |
| 205 | adjustment hsb; | |
| 206 | adjustment vsb; | |
| 207 | // render target tracking | |
| 208 | INT32 rt_width; | |
| 209 | INT32 rt_height; | |
| 210 | //optional | |
| 211 | DView_edit editor; | |
| 212 | }; | |
| 213 | ||
| 214 | ||
| 215 | /*************************************************************************** | |
| 216 | INLINE FUNCTIONS | |
| 217 | ***************************************************************************/ | |
| 218 | ||
| 219 | INLINE int rect_get_width(rectangle *r) | |
| 220 | { | |
| 221 | return r->max_x - r->min_x + 1; | |
| 222 | } | |
| 223 | ||
| 224 | INLINE int rect_get_height(rectangle *r) | |
| 225 | { | |
| 226 | return r->max_y - r->min_y + 1; | |
| 227 | } | |
| 228 | ||
| 229 | INLINE void rect_set_width(rectangle *r, int width) | |
| 230 | { | |
| 231 | r->max_x = r->min_x + width - 1; | |
| 232 | } | |
| 233 | ||
| 234 | INLINE void rect_set_height(rectangle *r, int height) | |
| 235 | { | |
| 236 | r->max_y = r->min_y + height - 1; | |
| 237 | } | |
| 238 | ||
| 239 | INLINE void rect_move(rectangle *r, int x, int y) | |
| 240 | { | |
| 241 | int dx = x - r->min_x; | |
| 242 | int dy = y - r->min_y; | |
| 243 | ||
| 244 | r->min_x += dx; | |
| 245 | r->max_x += dx; | |
| 246 | r->min_y += dy; | |
| 247 | r->max_y += dy; | |
| 248 | } | |
| 249 | ||
| 250 | INLINE int dview_is_state(DView *dv, int state) | |
| 251 | { | |
| 252 | return ((dv->state & state) ? TRUE : FALSE); | |
| 253 | } | |
| 254 | ||
| 255 | INLINE int dview_is_state_all(DView *dv, int state) | |
| 256 | { | |
| 257 | return ((dv->state & state) == state ? TRUE : FALSE); | |
| 258 | } | |
| 259 | ||
| 260 | INLINE void dview_set_state(DView *dv, int state, int onoff) | |
| 261 | { | |
| 262 | if (onoff) | |
| 263 | dv->state |= state; | |
| 264 | else | |
| 265 | dv->state &= ~state; | |
| 266 | } | |
| 267 | ||
| 268 | /*************************************************************************** | |
| 269 | LOCAL VARIABLES | |
| 270 | ***************************************************************************/ | |
| 271 | ||
| 272 | static render_font * debug_font; | |
| 273 | static int debug_font_width; | |
| 274 | static int debug_font_height; | |
| 275 | static float debug_font_aspect; | |
| 276 | static DView * list; | |
| 277 | static DView * focus_view; | |
| 278 | ||
| 279 | static ui_menu * menu; | |
| 280 | static DView_edit * cur_editor; | |
| 281 | ||
| 282 | static void set_focus_view(DView *dv) | |
| 283 | { | |
| 284 | if (focus_view != NULL) | |
| 285 | dview_set_state(focus_view, VIEW_STATE_NEEDS_UPDATE, TRUE); | |
| 286 | ||
| 287 | if (dv != NULL) | |
| 288 | dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE); | |
| 289 | ||
| 290 | if (focus_view != dv) | |
| 291 | { | |
| 292 | focus_view = dv; | |
| 293 | LIST_REMOVE(list, dv, DView); | |
| 294 | LIST_ADD_FRONT(list, dv, DView); | |
| 295 | render_debug_top(dv->target, dv->container); | |
| 296 | } | |
| 297 | } | |
| 298 | ||
| 299 | static DView *dview_alloc(render_target *target, running_machine *machine, int type, int flags) | |
| 300 | { | |
| 301 | DView *dv; | |
| 302 | ||
| 303 | dv = auto_alloc(machine, DView(target, machine, type, flags)); | |
| 304 | ||
| 305 | /* add to list */ | |
| 306 | ||
| 307 | LIST_ADD_BACK(list, dv, DView); | |
| 308 | ||
| 309 | return dv; | |
| 310 | } | |
| 311 | ||
| 312 | static void dview_free(DView *dv) | |
| 313 | { | |
| 314 | //astring_free(dv->title); | |
| 315 | LIST_REMOVE(list, dv, DView); | |
| 316 | auto_free(dv->machine, dv); | |
| 317 | } | |
| 318 | ||
| 319 | static void dview_get_rect(DView *dv, int type, rectangle *rect) | |
| 320 | { | |
| 321 | *rect = dv->bounds; | |
| 322 | switch (type) | |
| 323 | { | |
| 324 | case RECT_DVIEW: | |
| 325 | break; | |
| 326 | case RECT_DVIEW_CLIENT: | |
| 327 | rect->min_x += BORDER_XTHICKNESS; | |
| 328 | rect->max_x -= (BORDER_XTHICKNESS + dv->vsb.visible * VSB_WIDTH); | |
| 329 | rect->min_y += 2 * BORDER_YTHICKNESS + TITLE_HEIGHT; | |
| 330 | rect->max_y -= (BORDER_YTHICKNESS + dv->hsb.visible * HSB_HEIGHT); | |
| 331 | break; | |
| 332 | case RECT_DVIEW_HSB: | |
| 333 | rect->min_x += 0; | |
| 334 | rect->max_x -= /* dv->vsb.visible * */ VSB_WIDTH; | |
| 335 | rect->min_y = dv->bounds.max_y - HSB_HEIGHT; | |
| 336 | rect->max_y -= 0; | |
| 337 | break; | |
| 338 | case RECT_DVIEW_VSB: | |
| 339 | rect->min_x = dv->bounds.max_x - VSB_WIDTH; | |
| 340 | rect->max_x -= 0; | |
| 341 | rect->min_y += TITLE_HEIGHT; | |
| 342 | rect->max_y -= /* dv->hsb.visible * */ HSB_HEIGHT; | |
| 343 | break; | |
| 344 | case RECT_DVIEW_SIZE: | |
| 345 | rect->min_x = dv->bounds.max_x - VSB_WIDTH; | |
| 346 | rect->max_x -= 0; | |
| 347 | rect->min_y = dv->bounds.max_y - HSB_HEIGHT; | |
| 348 | rect->max_y -= 0; | |
| 349 | break; | |
| 350 | case RECT_DVIEW_TITLE: | |
| 351 | rect->min_x += 0; | |
| 352 | rect->max_x -= 0; | |
| 353 | rect->min_y += 0; | |
| 354 | rect->max_y = rect->min_y + TITLE_HEIGHT - 1; | |
| 355 | break; | |
| 356 | default: | |
| 357 | assert_always(FALSE, "unknown rectangle type"); | |
| 358 | } | |
| 359 | } | |
| 360 | ||
| 361 | ||
| 362 | static void dview_clear(DView *dv) | |
| 363 | { | |
| 364 | render_container_empty(dv->container); | |
| 365 | } | |
| 366 | ||
| 367 | static void dview_draw_outlined_box(DView *dv, int rtype, int x, int y, int w, int h, rgb_t bg) | |
| 368 | { | |
| 369 | rectangle r; | |
| 370 | ||
| 371 | dview_get_rect(dv, rtype, &r); | |
| 372 | ui_draw_outlined_box(dv->container, NX(dv, x + r.min_x), NY(dv, y + r.min_y), | |
| 373 | NX(dv, x + r.min_x + w), NY(dv, y + r.min_y + h), bg); | |
| 374 | } | |
| 375 | ||
| 376 | static void dview_draw_box(DView *dv, int rtype, int x, int y, int w, int h, rgb_t col) | |
| 377 | { | |
| 378 | rectangle r; | |
| 379 | ||
| 380 | dview_get_rect(dv, rtype, &r); | |
| 381 | render_container_add_rect(dv->container, NX(dv, x + r.min_x), NY(dv, y + r.min_y), | |
| 382 | NX(dv, x + r.min_x + w), NY(dv, y + r.min_y + h), col, | |
| 383 | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); | |
| 384 | } | |
| 385 | ||
| 386 | static void dview_draw_char(DView *dv, int rtype, int x, int y, int h, rgb_t col, UINT16 ch) | |
| 387 | { | |
| 388 | rectangle r; | |
| 389 | ||
| 390 | dview_get_rect(dv, rtype, &r); | |
| 391 | render_container_add_char(dv->container, | |
| 392 | NX(dv, x + r.min_x), | |
| 393 | NY(dv, y + r.min_y), | |
| 394 | NY(dv, h), | |
| 395 | debug_font_aspect, | |
| 396 | //(float) rect_get_height(&dv->bounds) / (float) rect_get_width(&dv->bounds), //render_get_ui_aspect(), | |
| 397 | col, | |
| 398 | debug_font, | |
| 399 | ch); | |
| 400 | } | |
| 401 | ||
| 402 | static int dview_xy_in_rect(DView *dv, int type, int x, int y) | |
| 403 | { | |
| 404 | rectangle r; | |
| 405 | ||
| 406 | dview_get_rect(dv, type, &r); | |
| 407 | if (x >= r.min_x && x <= r.max_x && y >= r.min_y && y <= r.max_y) | |
| 408 | return TRUE; | |
| 409 | return FALSE; | |
| 410 | } | |
| 411 | ||
| 412 | static void dview_draw_hsb(DView *dv) | |
| 413 | { | |
| 414 | int vt; | |
| 415 | int ts; | |
| 416 | //int sz = SLIDER_SIZE; | |
| 417 | int sz; | |
| 418 | rectangle r; | |
| 419 | adjustment *sb = &dv->hsb; | |
| 420 | ||
| 421 | dview_get_rect(dv, RECT_DVIEW_HSB, &r); | |
| 422 | ||
| 423 | dview_draw_outlined_box(dv, RECT_DVIEW_HSB, 0, 0, VSB_WIDTH,HSB_HEIGHT, MAKE_ARGB(0xff, 0xff, 0x00, 0x00)); | |
| 424 | dview_draw_outlined_box(dv, RECT_DVIEW_HSB, rect_get_width(&r) - VSB_WIDTH, 0, VSB_WIDTH, HSB_HEIGHT, MAKE_ARGB(0xff, 0xff, 0x00, 0x00)); | |
| 425 | ||
| 426 | ts = (r.max_x - r.min_x + 1) - 2 * VSB_WIDTH; | |
| 427 | ||
| 428 | sz = (ts * (sb->page_size)) / (sb->upper - sb->lower); | |
| 429 | ts = ts - sz; | |
| 430 | ||
| 431 | vt = (ts * (sb->value - sb->lower)) / (sb->upper - sb->lower - sb->page_size) + sz / 2 + r.min_x + VSB_WIDTH; | |
| 432 | ||
| 433 | dview_draw_outlined_box(dv, RECT_DVIEW_HSB, vt - sz / 2, 0, sz, HSB_HEIGHT, MAKE_ARGB(0xff, 0xff, 0x00, 0x00)); | |
| 434 | } | |
| 435 | ||
| 436 | static void dview_draw_vsb(DView *dv) | |
| 437 | { | |
| 438 | int vt; | |
| 439 | int ts; | |
| 440 | //int sz = SLIDER_SIZE; | |
| 441 | int sz; | |
| 442 | rectangle r; | |
| 443 | adjustment *sb = &dv->vsb; | |
| 444 | ||
| 445 | dview_get_rect(dv, RECT_DVIEW_VSB, &r); | |
| 446 | ||
| 447 | dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, rect_get_height(&r) - HSB_HEIGHT, VSB_WIDTH, HSB_HEIGHT, MAKE_ARGB(0xff, 0xff, 0x00, 0x00)); | |
| 448 | dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, 0, VSB_WIDTH, HSB_HEIGHT, MAKE_ARGB(0xff, 0xff, 0x00, 0x00)); | |
| 449 | ||
| 450 | ts = (r.max_y - r.min_y + 1) - 2 * HSB_HEIGHT; | |
| 451 | ||
| 452 | sz = (ts * (sb->page_size)) / (sb->upper - sb->lower); | |
| 453 | ts = ts - sz; | |
| 454 | ||
| 455 | vt = (ts * (sb->value - sb->lower)) / (sb->upper - sb->lower - sb->page_size) + sz / 2 + HSB_HEIGHT; | |
| 456 | ||
| 457 | dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, vt - sz / 2, VSB_WIDTH, sz, MAKE_ARGB(0xff, 0xff, 0x00, 0x00)); | |
| 458 | } | |
| 459 | ||
| 460 | static void dview_draw_size(DView *dv) | |
| 461 | { | |
| 462 | rectangle r; | |
| 463 | ||
| 464 | dview_get_rect(dv, RECT_DVIEW_SIZE, &r); | |
| 465 | ||
| 466 | dview_draw_outlined_box(dv, RECT_DVIEW_SIZE, 0, 0, | |
| 467 | rect_get_width(&r),rect_get_height(&r), MAKE_ARGB(0xff, 0xff, 0xff, 0x00)); | |
| 468 | } | |
| 469 | ||
| 470 | static void dview_set_title(DView *dv, astring title) | |
| 471 | { | |
| 472 | if (dv->title.cmp(title) != 0) | |
| 473 | { | |
| 474 | dv->title = title; | |
| 475 | dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE); | |
| 476 | } | |
| 477 | } | |
| 478 | ||
| 479 | static void dview_draw_title(DView *dv) | |
| 480 | { | |
| 481 | int i; | |
| 482 | rgb_t col = MAKE_ARGB(0xff,0x00,0x00,0xff); | |
| 483 | rectangle r; | |
| 484 | ||
| 485 | dview_get_rect(dv, RECT_DVIEW_TITLE, &r); | |
| 486 | ||
| 487 | if (dv == focus_view) | |
| 488 | col = MAKE_ARGB(0xff,0x00,0x7f,0x00); | |
| 489 | ||
| 490 | dview_draw_outlined_box(dv, RECT_DVIEW_TITLE, 0, 0, rect_get_width(&dv->bounds), TITLE_HEIGHT, col); | |
| 491 | ||
| 492 | if (dv->title == NULL) | |
| 493 | return; | |
| 494 | ||
| 495 | for (i=0; i<strlen(dv->title); i++) | |
| 496 | { | |
| 497 | dview_draw_char(dv, RECT_DVIEW_TITLE, i * debug_font_width + BORDER_XTHICKNESS, | |
| 498 | BORDER_YTHICKNESS, debug_font_height, //r.max_y - 2 * BORDER_YTHICKNESS, | |
| 499 | MAKE_ARGB(0xff,0xff,0xff,0xff), (UINT16) dv->title[i] ); | |
| 500 | } | |
| 501 | } | |
| 502 | ||
| 503 | static int dview_on_mouse(DView *dv, int mx, int my, int button) | |
| 504 | { | |
| 505 | int clicked = (button && !dview_is_state(dv, VIEW_STATE_BUTTON)); | |
| 506 | int handled = TRUE; | |
| 507 | int x,y; | |
| 508 | ||
| 509 | if (button && dview_is_state_all(dv, VIEW_STATE_BUTTON | VIEW_STATE_MOVING)) | |
| 510 | { | |
| 511 | int dx = mx - dv->last_x; | |
| 512 | int dy = my - dv->last_y; | |
| 513 | ||
| 514 | dv->ofs_x += dx; | |
| 515 | dv->ofs_y += dy; | |
| 516 | dv->last_x = mx; | |
| 517 | dv->last_y = my; | |
| 518 | dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE); | |
| 519 | return TRUE; | |
| 520 | } | |
| 521 | else if (button && dview_is_state_all(dv, VIEW_STATE_BUTTON | VIEW_STATE_SIZING)) | |
| 522 | { | |
| 523 | int dx = mx - dv->last_x; | |
| 524 | int dy = my - dv->last_y; | |
| 525 | ||
| 526 | dv->bounds.max_x += dx; | |
| 527 | dv->bounds.max_y += dy; | |
| 528 | dv->last_x = mx; | |
| 529 | dv->last_y = my; | |
| 530 | dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE); | |
| 531 | return TRUE; | |
| 532 | } | |
| 533 | else | |
| 534 | dview_set_state(dv, VIEW_STATE_MOVING | VIEW_STATE_SIZING, FALSE); | |
| 535 | ||
| 536 | if (!map_point(dv, mx, my, &x, &y)) | |
| 537 | return FALSE; | |
| 538 | ||
| 539 | if (dview_xy_in_rect(dv, RECT_DVIEW_TITLE, x, y)) | |
| 540 | { | |
| 541 | /* on title, do nothing */ | |
| 542 | if (clicked) { | |
| 543 | dv->last_x = mx; | |
| 544 | dv->last_y = my; | |
| 545 | set_focus_view(dv); | |
| 546 | dview_set_state(dv, VIEW_STATE_MOVING, TRUE); | |
| 547 | } | |
| 548 | } | |
| 549 | else if (dview_xy_in_rect(dv, RECT_DVIEW_HSB, x, y)) | |
| 550 | { | |
| 551 | /* on horizontal scrollbar */ | |
| 552 | debug_view_xy pos; | |
| 553 | adjustment *sb = &dv->hsb; | |
| 554 | ||
| 555 | if (clicked) | |
| 556 | { | |
| 557 | rectangle r; | |
| 558 | int xt; | |
| 559 | ||
| 560 | dview_get_rect(dv, RECT_DVIEW_HSB, &r); | |
| 561 | x -= r.min_x; | |
| 562 | ||
| 563 | xt = (x - VSB_WIDTH) * (sb->upper - sb->lower) / (rect_get_width(&r) - 2 * dv->vsb.visible * VSB_WIDTH) + sb->lower; | |
| 564 | if (x < VSB_WIDTH) | |
| 565 | sb->value -= sb->step_increment; | |
| 566 | else if (x > rect_get_width(&r) - VSB_WIDTH) | |
| 567 | sb->value += sb->step_increment; | |
| 568 | else if (xt < sb->value) | |
| 569 | sb->value -= sb->page_increment; | |
| 570 | else if (xt > sb->value) | |
| 571 | sb->value += sb->page_increment; | |
| 572 | ||
| 573 | if (sb->value < sb->lower) | |
| 574 | sb->value = sb->lower; | |
| 575 | if (sb->value > sb->upper) | |
| 576 | sb->value = sb->upper; | |
| 577 | } | |
| 578 | ||
| 579 | pos = debug_view_get_visible_position(dv->view); | |
| 580 | ||
| 581 | if (sb->value != pos.x) | |
| 582 | { | |
| 583 | pos.x = sb->value; | |
| 584 | debug_view_set_visible_position(dv->view, pos); | |
| 585 | dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE); | |
| 586 | } | |
| 587 | } | |
| 588 | else if (dview_xy_in_rect(dv, RECT_DVIEW_VSB, x, y) ) | |
| 589 | { | |
| 590 | /* on vertical scrollbar */ | |
| 591 | debug_view_xy pos; | |
| 592 | adjustment *sb = &dv->vsb; | |
| 593 | ||
| 594 | if (clicked) | |
| 595 | { | |
| 596 | rectangle r; | |
| 597 | int yt; | |
| 598 | ||
| 599 | dview_get_rect(dv, RECT_DVIEW_VSB, &r); | |
| 600 | y -= r.min_y; | |
| 601 | yt = (y - HSB_HEIGHT) * (sb->upper - sb->lower) / (rect_get_height(&r) - 2 * HSB_HEIGHT) + sb->lower; | |
| 602 | ||
| 603 | if (y < HSB_HEIGHT) | |
| 604 | sb->value -= sb->step_increment; | |
| 605 | else if (y > rect_get_height(&r) - HSB_HEIGHT) | |
| 606 | sb->value += sb->step_increment; | |
| 607 | else if (yt < sb->value) | |
| 608 | sb->value -= sb->page_increment; | |
| 609 | else if (yt > sb->value) | |
| 610 | sb->value += sb->page_increment; | |
| 611 | ||
| 612 | if (sb->value < sb->lower) | |
| 613 | sb->value = sb->lower; | |
| 614 | if (sb->value > sb->upper) | |
| 615 | sb->value = sb->upper; | |
| 616 | } | |
| 617 | ||
| 618 | pos = debug_view_get_visible_position(dv->view); | |
| 619 | ||
| 620 | if (sb->value != pos.y) | |
| 621 | { | |
| 622 | pos.y = sb->value; | |
| 623 | debug_view_set_visible_position(dv->view, pos); | |
| 624 | dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE); | |
| 625 | } | |
| 626 | } | |
| 627 | else if (dview_xy_in_rect(dv, RECT_DVIEW_SIZE, x, y)) | |
| 628 | { | |
| 629 | /* on sizing area */ | |
| 630 | if (clicked) | |
| 631 | { | |
| 632 | dv->last_x = mx; | |
| 633 | dv->last_y = my; | |
| 634 | set_focus_view(dv); | |
| 635 | dview_set_state(dv, VIEW_STATE_SIZING, TRUE); | |
| 636 | } | |
| 637 | } | |
| 638 | else if (dview_xy_in_rect(dv, RECT_DVIEW_CLIENT, x, y)) | |
| 639 | { | |
| 640 | y -= TITLE_HEIGHT; | |
| 641 | if (debug_view_get_cursor_supported(dv->view) && clicked && y >= 0) | |
| 642 | { | |
| 643 | debug_view_xy topleft = debug_view_get_visible_position(dv->view); | |
| 644 | debug_view_xy newpos; | |
| 645 | newpos.x = topleft.x + x / debug_font_width; | |
| 646 | newpos.y = topleft.y + y / debug_font_height; | |
| 647 | debug_view_set_cursor_position(dv->view, newpos); | |
| 648 | debug_view_set_cursor_visible(dv->view, TRUE); | |
| 649 | } | |
| 650 | if (clicked) | |
| 651 | set_focus_view(dv); | |
| 652 | } | |
| 653 | else | |
| 654 | { | |
| 655 | handled = FALSE; | |
| 656 | } | |
| 657 | dview_set_state(dv, VIEW_STATE_BUTTON, button); | |
| 658 | return handled; | |
| 659 | ||
| 660 | } | |
| 661 | ||
| 662 | INLINE void map_attr_to_fg_bg(unsigned char attr, rgb_t *fg, rgb_t *bg) | |
| 663 | { | |
| 664 | ||
| 665 | *bg = MAKE_ARGB(0xff,0xff,0xff,0xff); | |
| 666 | *fg = MAKE_ARGB(0xff,0x00,0x00,0x00); | |
| 667 | ||
| 668 | if(attr & DCA_ANCILLARY) | |
| 669 | *bg = MAKE_ARGB(0xff,0xe0,0xe0,0xe0); | |
| 670 | if(attr & DCA_SELECTED) { | |
| 671 | *bg = MAKE_ARGB(0xff,0xff,0x80,0x80); | |
| 672 | } | |
| 673 | if(attr & DCA_CURRENT) { | |
| 674 | *bg = MAKE_ARGB(0xff,0xff,0xff,0x00); | |
| 675 | } | |
| 676 | if(attr & DCA_CHANGED) { | |
| 677 | *fg = MAKE_ARGB(0xff,0xff,0x00,0x00); | |
| 678 | } | |
| 679 | if(attr & DCA_INVALID) { | |
| 680 | *fg = MAKE_ARGB(0xff,0x00,0x00,0xff); | |
| 681 | } | |
| 682 | if(attr & DCA_DISABLED) { | |
| 683 | *fg = MAKE_ARGB(RGB_ALPHA(*fg), | |
| 684 | (RGB_RED(*fg)+RGB_RED(*bg)) >> 1, | |
| 685 | (RGB_GREEN(*fg)+RGB_GREEN(*bg)) >> 1, | |
| 686 | (RGB_BLUE(*fg)+RGB_BLUE(*bg)) >> 1); | |
| 687 | } | |
| 688 | if(attr & DCA_COMMENT) { | |
| 689 | *fg = MAKE_ARGB(0xff,0x00,0x80,0x00); | |
| 690 | } | |
| 691 | } | |
| 692 | ||
| 693 | static void dview_draw(DView *dv) | |
| 694 | { | |
| 695 | const debug_view_char *viewdata; | |
| 696 | debug_view_xy vsize; | |
| 697 | UINT32 i, j, xx, yy; | |
| 698 | rgb_t bg_base, bg, fg; | |
| 699 | rectangle r; | |
| 700 | ||
| 701 | vsize = debug_view_get_visible_size(dv->view); | |
| 702 | ||
| 703 | bg_base = MAKE_ARGB(0xff,0xff,0xff,0xff); | |
| 704 | ||
| 705 | /* always start clean */ | |
| 706 | dview_clear(dv); | |
| 707 | ||
| 708 | dview_draw_title(dv); | |
| 709 | ||
| 710 | dview_get_rect(dv, RECT_DVIEW_CLIENT, &r); | |
| 711 | ||
| 712 | dview_draw_outlined_box(dv, RECT_DVIEW_CLIENT, 0, 0, | |
| 713 | rect_get_width(&r) /*- (dv->vs ? VSB_WIDTH : 0)*/, | |
| 714 | rect_get_height(&r) /*- (dv->hsb.visible ? HSB_HEIGHT : 0)*/, bg_base); | |
| 715 | ||
| 716 | /* background first */ | |
| 717 | viewdata = debug_view_get_chars(dv->view); | |
| 718 | ||
| 719 | yy = BORDER_YTHICKNESS; | |
| 720 | for(j=0; j<vsize.y; j++) | |
| 721 | { | |
| 722 | xx = BORDER_XTHICKNESS; | |
| 723 | for(i=0; i<vsize.x; i++) | |
| 724 | { | |
| 725 | map_attr_to_fg_bg(viewdata->attrib, &fg, &bg); | |
| 726 | ||
| 727 | if (bg != bg_base) | |
| 728 | dview_draw_box(dv, RECT_DVIEW_CLIENT, xx, yy, | |
| 729 | debug_font_width, debug_font_height, bg); | |
| 730 | xx += debug_font_width; | |
| 731 | viewdata++; | |
| 732 | } | |
| 733 | yy += debug_font_height; | |
| 734 | } | |
| 735 | ||
| 736 | /* now the text */ | |
| 737 | viewdata = debug_view_get_chars(dv->view); | |
| 738 | ||
| 739 | yy = BORDER_YTHICKNESS; | |
| 740 | for(j=0; j<vsize.y; j++) | |
| 741 | { | |
| 742 | xx = BORDER_XTHICKNESS; | |
| 743 | for(i=0; i<vsize.x; i++) | |
| 744 | { | |
| 745 | UINT16 s; | |
| 746 | unsigned char v = viewdata->byte; | |
| 747 | ||
| 748 | if (v != ' ') | |
| 749 | { | |
| 750 | if(v < 128) { | |
| 751 | s = v; | |
| 752 | } else { | |
| 753 | s = 0xc0 | (v>>6); | |
| 754 | s |= (0x80 | (v & 0x3f)); | |
| 755 | } | |
| 756 | map_attr_to_fg_bg(viewdata->attrib, &fg, &bg); | |
| 757 | ||
| 758 | dview_draw_char(dv, RECT_DVIEW_CLIENT, xx, yy, debug_font_height, fg, s); | |
| 759 | } | |
| 760 | xx += debug_font_width; | |
| 761 | viewdata++; | |
| 762 | } | |
| 763 | yy += debug_font_height; | |
| 764 | } | |
| 765 | ||
| 766 | if(dv->hsb.visible) | |
| 767 | dview_draw_hsb(dv); | |
| 768 | if(dv->vsb.visible) | |
| 769 | dview_draw_vsb(dv); | |
| 770 | dview_draw_size(dv); | |
| 771 | } | |
| 772 | ||
| 773 | ||
| 774 | static void dview_size_allocate(DView *dv) | |
| 775 | { | |
| 776 | debug_view_xy size, pos, col, vsize; | |
| 777 | render_container_user_settings rcus; | |
| 778 | rectangle r; | |
| 779 | ||
| 780 | render_container_get_user_settings(dv->container, &rcus); | |
| 781 | rcus.xoffset = (float) dv->ofs_x / (float) dv->rt_width; | |
| 782 | rcus.yoffset = (float) dv->ofs_y / (float) dv->rt_height; | |
| 783 | rcus.xscale = 1.0; //(float) rect_get_width(&dv->bounds) / (float) dv->rt_width; | |
| 784 | rcus.yscale = 1.0; //(float) rect_get_height(&dv->bounds) / (float) dv->rt_height; | |
| 785 | render_container_set_user_settings(dv->container, &rcus); | |
| 786 | //printf("%d %d %d %d\n", wpos.min_x, wpos.max_x, wpos.min_y, wpos.max_y); | |
| 787 | ||
| 788 | pos = debug_view_get_visible_position(dv->view); | |
| 789 | size = debug_view_get_total_size(dv->view); | |
| 790 | ||
| 791 | dv->hsb.visible = 0; | |
| 792 | dv->vsb.visible = 0; | |
| 793 | dview_get_rect(dv, RECT_DVIEW_CLIENT, &r); | |
| 794 | ||
| 795 | dv->hsb.visible = (size.x * debug_font_width > rect_get_width(&r) ? 1 : 0); | |
| 796 | dv->vsb.visible = (size.y * debug_font_height > rect_get_height(&r) ? 1 : 0); | |
| 797 | dview_get_rect(dv, RECT_DVIEW_CLIENT, &r); | |
| 798 | ||
| 799 | dv->hsb.visible = (size.x * debug_font_width > rect_get_width(&r) ? 1 : 0); | |
| 800 | dv->vsb.visible = (size.y * debug_font_height > rect_get_height(&r) ? 1 : 0); | |
| 801 | dview_get_rect(dv, RECT_DVIEW_CLIENT, &r); | |
| 802 | ||
| 803 | col.y = (rect_get_height(&r) - 2 * BORDER_YTHICKNESS /*+ debug_font_height - 1*/) / debug_font_height; | |
| 804 | col.x = (rect_get_width(&r) - 2 * BORDER_XTHICKNESS /*+ debug_font_width - 1*/) / debug_font_width; | |
| 805 | ||
| 806 | vsize.y = size.y - pos.y; | |
| 807 | vsize.x = size.x - pos.x; | |
| 808 | if(vsize.y > col.y) | |
| 809 | vsize.y = col.y; | |
| 810 | else if(vsize.y < col.y) { | |
| 811 | pos.y = size.y-col.y; | |
| 812 | if(pos.y < 0) | |
| 813 | pos.y = 0; | |
| 814 | vsize.y = size.y-pos.y; | |
| 815 | } | |
| 816 | if(vsize.x > col.x) | |
| 817 | vsize.x = col.x; | |
| 818 | else if(vsize.x < col.x) { | |
| 819 | pos.x = size.x-col.x; | |
| 820 | if(pos.x < 0) | |
| 821 | pos.x = 0; | |
| 822 | vsize.x = size.x-pos.x; | |
| 823 | } | |
| 824 | ||
| 825 | debug_view_set_visible_position(dv->view, pos); | |
| 826 | debug_view_set_visible_size(dv->view, vsize); | |
| 827 | ||
| 828 | if(dv->hsb.visible) { | |
| 829 | int span = (rect_get_width(&r) - 2 * BORDER_XTHICKNESS) / debug_font_width; | |
| 830 | ||
| 831 | if(pos.x + span > size.x) | |
| 832 | pos.x = size.x - span; | |
| 833 | if(pos.x < 0) | |
| 834 | pos.x = 0; | |
| 835 | dv->hsb.lower = 0; | |
| 836 | dv->hsb.upper = size.x; | |
| 837 | dv->hsb.value = pos.x; | |
| 838 | dv->hsb.step_increment = 1; | |
| 839 | dv->hsb.page_increment = span; | |
| 840 | dv->hsb.page_size = span; | |
| 841 | ||
| 842 | debug_view_set_visible_position(dv->view, pos); | |
| 843 | } | |
| 844 | ||
| 845 | if(dv->vsb.visible) { | |
| 846 | int span = (rect_get_height(&r) - 2 * BORDER_YTHICKNESS) / debug_font_height; | |
| 847 | ||
| 848 | if(pos.y + span > size.y) | |
| 849 | pos.y = size.y - span; | |
| 850 | if(pos.y < 0) | |
| 851 | pos.y = 0; | |
| 852 | dv->vsb.lower = 0; | |
| 853 | dv->vsb.upper = size.y; | |
| 854 | dv->vsb.value = pos.y; | |
| 855 | dv->vsb.step_increment = 1; | |
| 856 | dv->vsb.page_increment = span; | |
| 857 | dv->vsb.page_size = span; | |
| 858 | ||
| 859 | debug_view_set_visible_position(dv->view, pos); | |
| 860 | } | |
| 861 | } | |
| 862 | ||
| 863 | static void dview_update(debug_view *dw, void *osdprivate) | |
| 864 | { | |
| 865 | DView *dv = (DView *) osdprivate; | |
| 866 | ||
| 867 | dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE); | |
| 868 | ||
| 869 | #if 0 | |
| 870 | debug_view_xy size = debug_view_get_total_size(dw); | |
| 871 | ||
| 872 | if((dv->tr != size.y) || (dv->tc != size.x)) | |
| 873 | gtk_widget_queue_resize(GTK_WIDGET(dv)); | |
| 874 | else | |
| 875 | gtk_widget_queue_draw(GTK_WIDGET(dv)); | |
| 876 | #endif | |
| 877 | } | |
| 878 | ||
| 879 | static void debugint_exit(running_machine *machine) | |
| 880 | { | |
| 881 | for (DView *ndv = list; ndv != NULL; ) | |
| 882 | { | |
| 883 | DView *temp = ndv; | |
| 884 | ndv = ndv->next; | |
| 885 | dview_free(temp); | |
| 886 | } | |
| 887 | if (debug_font != NULL) | |
| 888 | { | |
| 889 | render_font_free(debug_font); | |
| 890 | debug_font = NULL; | |
| 891 | } | |
| 892 | ||
| 893 | } | |
| 894 | ||
| 895 | void debugint_init(running_machine *machine) | |
| 896 | { | |
| 897 | unicode_char ch; | |
| 898 | int chw; | |
| 899 | debug_font = render_font_alloc("ui.bdf"); //ui_get_font(); | |
| 900 | debug_font_width = 0; | |
| 901 | debug_font_height = 15; | |
| 902 | ||
| 903 | menu = NULL; | |
| 904 | cur_editor = NULL; | |
| 905 | list = NULL; | |
| 906 | focus_view = NULL; | |
| 907 | ||
| 908 | debug_font_aspect = render_get_ui_aspect(); | |
| 909 | ||
| 910 | for (ch=0;ch<=127;ch++) | |
| 911 | { | |
| 912 | chw = render_font_get_char_width(debug_font, debug_font_height, debug_font_aspect, ch); | |
| 913 | if (chw>debug_font_width) | |
| 914 | debug_font_width = chw; | |
| 915 | } | |
| 916 | debug_font_width++; | |
| 917 | /* FIXME: above does not really work */ | |
| 918 | debug_font_width = 10; | |
| 919 | add_exit_callback(machine, debugint_exit); | |
| 920 | } | |
| 921 | ||
| 922 | #if 0 | |
| 923 | static void set_view_by_name(render_target *target, const char *name) | |
| 924 | { | |
| 925 | int i = 0; | |
| 926 | const char *s; | |
| 927 | ||
| 928 | for (i = 0; ; i++ ) | |
| 929 | { | |
| 930 | s = render_target_get_view_name(target, i); | |
| 931 | if (s == NULL) | |
| 932 | return; | |
| 933 | //printf("%d %s\n", i, s); | |
| 934 | if (strcmp(name, s) == 0) | |
| 935 | { | |
| 936 | render_target_set_view(target, i); | |
| 937 | //printf("%d\n", render_target_get_view(target) ); | |
| 938 | return; | |
| 939 | } | |
| 940 | } | |
| 941 | } | |
| 942 | #endif | |
| 943 | ||
| 944 | /*------------------------------------------------- | |
| 945 | Menu Callbacks | |
| 946 | -------------------------------------------------*/ | |
| 947 | ||
| 948 | static void process_string(DView *dv, const char *str) | |
| 949 | { | |
| 950 | switch (dv->type) | |
| 951 | { | |
| 952 | case DVT_DISASSEMBLY: | |
| 953 | disasm_view_set_expression(dv->view, str); | |
| 954 | break; | |
| 955 | case DVT_CONSOLE: | |
| 956 | if(!dv->editor.str[0]) | |
| 957 | debug_cpu_single_step(dv->machine, 1); | |
| 958 | else | |
| 959 | debug_console_execute_command(dv->machine, str, 1); | |
| 960 | break; | |
| 961 | case DVT_MEMORY: | |
| 962 | memory_view_set_expression(dv->view, str); | |
| 963 | break; | |
| 964 | } | |
| 965 | } | |
| 966 | ||
| 967 | void on_memory_window_activate(DView *dv, const ui_menu_event *event) | |
| 968 | { | |
| 969 | } | |
| 970 | ||
| 971 | void on_disassembly_window_activate(DView *dv, const ui_menu_event *event) | |
| 972 | { | |
| 973 | DView *ndv; | |
| 974 | render_target *target; | |
| 975 | const disasm_subview_item *dasmsubitem; | |
| 976 | ||
| 977 | target = render_get_ui_target(); | |
| 978 | ||
| 979 | ndv = dview_alloc(target, dv->machine, DVT_DISASSEMBLY, 0); | |
| 980 | ndv->editor.active = TRUE; | |
| 981 | ndv->editor.container = render_container_get_ui(); | |
| 982 | dasmsubitem = disasm_view_get_current_subview(ndv->view); | |
| 983 | dview_set_title(ndv, dasmsubitem->name); | |
| 984 | set_focus_view(ndv); | |
| 985 | ||
| 986 | } | |
| 987 | ||
| 988 | void on_disasm_cpu_activate(DView *dv, const ui_menu_event *event) | |
| 989 | { | |
| 990 | const disasm_subview_item *subview; | |
| 991 | int current = disasm_view_get_subview(dv->view); | |
| 992 | ||
| 993 | if (event->iptkey == IPT_UI_RIGHT) | |
| 994 | { | |
| 995 | current++; | |
| 996 | subview = disasm_view_get_subview_by_index(disasm_view_get_subview_list(dv->view), current); | |
| 997 | if (subview == NULL) | |
| 998 | { | |
| 999 | current = 0; | |
| 1000 | subview = disasm_view_get_subview_by_index(disasm_view_get_subview_list(dv->view), current); | |
| 1001 | } | |
| 1002 | disasm_view_set_subview(dv->view, current); | |
| 1003 | dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE); | |
| 1004 | dview_set_title(dv, subview->name); | |
| 1005 | } | |
| 1006 | } | |
| 1007 | ||
| 1008 | void on_log_window_activate(DView *dv, const ui_menu_event *event) | |
| 1009 | { | |
| 1010 | DView *ndv; | |
| 1011 | render_target *target; | |
| 1012 | ||
| 1013 | target = render_get_ui_target(); | |
| 1014 | ndv = dview_alloc(target, dv->machine, DVT_LOG, 0); | |
| 1015 | dview_set_title(ndv, "Log"); | |
| 1016 | set_focus_view(ndv); | |
| 1017 | } | |
| 1018 | ||
| 1019 | void on_close_activate(DView *dv, const ui_menu_event *event) | |
| 1020 | { | |
| 1021 | if (focus_view == dv) | |
| 1022 | set_focus_view(dv->next); | |
| 1023 | dview_free(dv); | |
| 1024 | } | |
| 1025 | ||
| 1026 | void on_run_activate(DView *dv, const ui_menu_event *event) | |
| 1027 | { | |
| 1028 | debug_cpu_go(dv->machine, ~0); | |
| 1029 | } | |
| 1030 | ||
| 1031 | #if 0 | |
| 1032 | void on_run_h_activate(DView *dv, const ui_menu_event *event) | |
| 1033 | { | |
| 1034 | debugwin_show(0); | |
| 1035 | debug_cpu_go(dv->machine, ~0); | |
| 1036 | } | |
| 1037 | #endif | |
| 1038 | ||
| 1039 | void on_run_cpu_activate(DView *dv, const ui_menu_event *event) | |
| 1040 | { | |
| 1041 | debug_cpu_next_cpu(dv->machine); | |
| 1042 | } | |
| 1043 | ||
| 1044 | void on_run_irq_activate(DView *dv, const ui_menu_event *event) | |
| 1045 | { | |
| 1046 | debug_cpu_go_interrupt(dv->machine, -1); | |
| 1047 | } | |
| 1048 | ||
| 1049 | void on_run_vbl_activate(DView *dv, const ui_menu_event *event) | |
| 1050 | { | |
| 1051 | debug_cpu_go_vblank(dv->machine); | |
| 1052 | } | |
| 1053 | ||
| 1054 | void on_step_into_activate(DView *dv, const ui_menu_event *event) | |
| 1055 | { | |
| 1056 | debug_cpu_single_step(dv->machine, 1); | |
| 1057 | } | |
| 1058 | ||
| 1059 | void on_step_over_activate(DView *dv, const ui_menu_event *event) | |
| 1060 | { | |
| 1061 | debug_cpu_single_step_over(dv->machine, 1); | |
| 1062 | } | |
| 1063 | ||
| 1064 | void on_step_out_activate(DView *dv, const ui_menu_event *event) | |
| 1065 | { | |
| 1066 | debug_cpu_single_step_out(dv->machine); | |
| 1067 | } | |
| 1068 | ||
| 1069 | void on_hard_reset_activate(DView *dv, const ui_menu_event *event) | |
| 1070 | { | |
| 1071 | mame_schedule_hard_reset(dv->machine); | |
| 1072 | } | |
| 1073 | ||
| 1074 | void on_soft_reset_activate(DView *dv, const ui_menu_event *event) | |
| 1075 | { | |
| 1076 | mame_schedule_soft_reset(dv->machine); | |
| 1077 | debug_cpu_go(dv->machine, ~0); | |
| 1078 | } | |
| 1079 | ||
| 1080 | void on_exit_activate(DView *dv, const ui_menu_event *event) | |
| 1081 | { | |
| 1082 | mame_schedule_exit(dv->machine); | |
| 1083 | } | |
| 1084 | ||
| 1085 | void on_view_opcodes_activate(DView *dv, const ui_menu_event *event) | |
| 1086 | { | |
| 1087 | disasm_right_column rc = disasm_view_get_right_column(focus_view->view); | |
| 1088 | disasm_right_column new_rc = DASM_RIGHTCOL_NONE; | |
| 1089 | ||
| 1090 | if (event->iptkey == IPT_UI_RIGHT) | |
| 1091 | { | |
| 1092 | switch (rc) | |
| 1093 | { | |
| 1094 | case DASM_RIGHTCOL_RAW: new_rc = DASM_RIGHTCOL_ENCRYPTED; break; | |
| 1095 | case DASM_RIGHTCOL_ENCRYPTED: new_rc = DASM_RIGHTCOL_COMMENTS; break; | |
| 1096 | case DASM_RIGHTCOL_COMMENTS: new_rc = DASM_RIGHTCOL_RAW; break; | |
| 1097 | default: break; | |
| 1098 | } | |
| 1099 | disasm_view_set_right_column(dv->view, new_rc); | |
| 1100 | dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE); | |
| 1101 | } | |
| 1102 | } | |
| 1103 | ||
| 1104 | void on_run_to_cursor_activate(DView *dv, const ui_menu_event *event) | |
| 1105 | { | |
| 1106 | char command[64]; | |
| 1107 | ||
| 1108 | if (debug_view_get_cursor_visible(dv->view)) | |
| 1109 | { | |
| 1110 | const address_space *space = disasm_view_get_current_subview(dv->view)->space; | |
| 1111 | if (debug_cpu_get_visible_cpu(dv->machine) == space->cpu) | |
| 1112 | { | |
| 1113 | offs_t address = disasm_view_get_selected_address(dv->view); | |
| 1114 | sprintf(command, "go %X", address); | |
| 1115 | debug_console_execute_command(dv->machine, command, 1); | |
| 1116 | } | |
| 1117 | } | |
| 1118 | } | |
| 1119 | ||
| 1120 | /*------------------------------------------------- | |
| 1121 | editor | |
| 1122 | -------------------------------------------------*/ | |
| 1123 | ||
| 1124 | static void render_editor(DView_edit *editor) | |
| 1125 | { | |
| 1126 | float width, maxwidth; | |
| 1127 | float x1, y1, x2, y2; | |
| 1128 | ||
| 1129 | render_container_empty(editor->container); | |
| 1130 | /* get the size of the text */ | |
| 1131 | ui_draw_text_full(editor->container, editor->str, 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, | |
| 1132 | DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, NULL); | |
| 1133 | width += 2 * UI_BOX_LR_BORDER; | |
| 1134 | maxwidth = MAX(width, 0.5); | |
| 1135 | ||
| 1136 | /* compute our bounds */ | |
| 1137 | x1 = 0.5f - 0.5f * maxwidth; | |
| 1138 | x2 = x1 + maxwidth; | |
| 1139 | y1 = 0.25; | |
| 1140 | y2 = 0.45 - UI_BOX_TB_BORDER; | |
| 1141 | ||
| 1142 | /* draw a box */ | |
| 1143 | ui_draw_outlined_box(editor->container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); | |
| 1144 | ||
| 1145 | /* take off the borders */ | |
| 1146 | x1 += UI_BOX_LR_BORDER; | |
| 1147 | x2 -= UI_BOX_LR_BORDER; | |
| 1148 | y1 += UI_BOX_TB_BORDER; | |
| 1149 | y2 -= UI_BOX_TB_BORDER; | |
| 1150 | ||
| 1151 | /* draw the text within it */ | |
| 1152 | ui_draw_text_full(editor->container, editor->str, x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, | |
| 1153 | DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, NULL, NULL); | |
| 1154 | ||
| 1155 | } | |
| 1156 | ||
| 1157 | /*------------------------------------------------- | |
| 1158 | menu_main_populate - populate the main menu | |
| 1159 | -------------------------------------------------*/ | |
| 1160 | ||
| 1161 | static void CreateMainMenu(running_machine *machine) | |
| 1162 | { | |
| 1163 | const char *subtext = ""; | |
| 1164 | int rc; | |
| 1165 | astring title; | |
| 1166 | ||
| 1167 | if (menu != NULL) | |
| 1168 | ui_menu_free(menu); | |
| 1169 | menu = ui_menu_alloc(machine, render_container_get_ui(),NULL,NULL); | |
| 1170 | ||
| 1171 | switch (focus_view->type) | |
| 1172 | { | |
| 1173 | case DVT_DISASSEMBLY: | |
| 1174 | title = "Disassembly:"; | |
| 1175 | break; | |
| 1176 | case DVT_CONSOLE: | |
| 1177 | title = "Console:"; | |
| 1178 | break; | |
| 1179 | case DVT_LOG: | |
| 1180 | title = "Log:"; | |
| 1181 | break; | |
| 1182 | case DVT_MEMORY: | |
| 1183 | title = "Memory:"; | |
| 1184 | break; | |
| 1185 | case DVT_REGISTERS: | |
| 1186 | title = "Registers:"; | |
| 1187 | break; | |
| 1188 | } | |
| 1189 | ||
| 1190 | ui_menu_item_append(menu, title.cat(focus_view->title), NULL, MENU_FLAG_DISABLE, NULL); | |
| 1191 | ui_menu_item_append(menu, MENU_SEPARATOR_ITEM, NULL, 0, NULL); | |
| 1192 | ||
| 1193 | switch (focus_view->type) | |
| 1194 | { | |
| 1195 | case DVT_DISASSEMBLY: | |
| 1196 | rc = disasm_view_get_right_column(focus_view->view); | |
| 1197 | switch(rc) | |
| 1198 | { | |
| 1199 | case DASM_RIGHTCOL_RAW: subtext = "Raw Opcodes"; break; | |
| 1200 | case DASM_RIGHTCOL_ENCRYPTED: subtext = "Enc Opcodes"; break; | |
| 1201 | case DASM_RIGHTCOL_COMMENTS: subtext = "Comments"; break; | |
| 1202 | } | |
| 1203 | ui_menu_item_append(menu, "View", subtext, MENU_FLAG_RIGHT_ARROW, (void *)on_view_opcodes_activate); | |
| 1204 | ui_menu_item_append(menu, "Run to cursor", NULL, 0, (void *)on_run_to_cursor_activate); | |
| 1205 | ||
| 1206 | if (!dview_is_state(focus_view, VIEW_STATE_FOLLOW_CPU)) | |
| 1207 | { | |
| 1208 | const disasm_subview_item * dsi; | |
| 1209 | dsi = disasm_view_get_current_subview(focus_view->view); | |
| 1210 | ui_menu_item_append(menu, "CPU", dsi->name, MENU_FLAG_RIGHT_ARROW, (void *)on_disasm_cpu_activate); | |
| 1211 | } | |
| 1212 | ui_menu_item_append(menu, MENU_SEPARATOR_ITEM, NULL, 0, NULL); | |
| 1213 | break; | |
| 1214 | } | |
| 1215 | ||
| 1216 | /* add input menu items */ | |
| 1217 | ||
| 1218 | ui_menu_item_append(menu, "New Memory Window", NULL, 0, (void *)on_memory_window_activate); | |
| 1219 | ui_menu_item_append(menu, "New Disassembly Window", NULL, 0, (void *)on_disassembly_window_activate); | |
| 1220 | ui_menu_item_append(menu, "New Error Log Window", NULL, 0, (void *)on_log_window_activate); | |
| 1221 | ui_menu_item_append(menu, MENU_SEPARATOR_ITEM, NULL, 0, NULL); | |
| 1222 | ui_menu_item_append(menu, "Run", NULL, 0, (void *)on_run_activate); | |
| 1223 | ui_menu_item_append(menu, "Run to Next CPU", NULL, 0, (void *)on_run_cpu_activate); | |
| 1224 | ui_menu_item_append(menu, "Run until Next Interrupt on This CPU", NULL, 0, (void *)on_run_irq_activate); | |
| 1225 | ui_menu_item_append(menu, "Run until Next VBLANK", NULL, 0, (void *)on_run_vbl_activate); | |
| 1226 | ui_menu_item_append(menu, MENU_SEPARATOR_ITEM, NULL, 0, NULL); | |
| 1227 | ui_menu_item_append(menu, "Step Into", NULL, 0, (void *)on_step_into_activate); | |
| 1228 | ui_menu_item_append(menu, "Step Over", NULL, 0, (void *)on_step_over_activate); | |
| 1229 | ui_menu_item_append(menu, MENU_SEPARATOR_ITEM, NULL, 0, NULL); | |
| 1230 | ui_menu_item_append(menu, "Soft Reset", NULL, 0, (void *)on_soft_reset_activate); | |
| 1231 | ui_menu_item_append(menu, "Hard Reset", NULL, 0, (void *)on_hard_reset_activate); | |
| 1232 | ui_menu_item_append(menu, MENU_SEPARATOR_ITEM, NULL, 0, NULL); | |
| 1233 | if (!dview_is_state(focus_view, VIEW_STATE_FOLLOW_CPU)) | |
| 1234 | ui_menu_item_append(menu, "Close Window", NULL, 0, (void *)on_close_activate); | |
| 1235 | ui_menu_item_append(menu, "Exit", NULL, 0, (void *)on_exit_activate); | |
| 1236 | } | |
| 1237 | ||
| 1238 | static int map_point(DView *dv, INT32 target_x, INT32 target_y, INT32 *mapped_x, INT32 *mapped_y) | |
| 1239 | { | |
| 1240 | rectangle pos; | |
| 1241 | ||
| 1242 | /* default to point not mapped */ | |
| 1243 | *mapped_x = -1; | |
| 1244 | *mapped_y = -1; | |
| 1245 | ||
| 1246 | pos = dv->bounds; | |
| 1247 | pos.min_x += dv->ofs_x; | |
| 1248 | pos.max_x += dv->ofs_x; | |
| 1249 | pos.min_y += dv->ofs_y; | |
| 1250 | pos.max_y += dv->ofs_y; | |
| 1251 | //render_target_get_component_container(target, name, &pos); | |
| 1252 | ||
| 1253 | if (target_x >= pos.min_x && target_x <= pos.max_x && target_y >= pos.min_y && target_y <= pos.max_y) | |
| 1254 | { | |
| 1255 | *mapped_x = target_x - pos.min_x; | |
| 1256 | *mapped_y = target_y - pos.min_y; | |
| 1257 | return TRUE; | |
| 1258 | } | |
| 1259 | return FALSE; | |
| 1260 | } | |
| 1261 | ||
| 1262 | static void handle_mouse(running_machine *machine) | |
| 1263 | { | |
| 1264 | render_target * mouse_target; | |
| 1265 | INT32 x,y; | |
| 1266 | int button; | |
| 1267 | ||
| 1268 | if (menu != NULL) | |
| 1269 | return; | |
| 1270 | ||
| 1271 | mouse_target = ui_input_find_mouse(machine, &x, &y, &button); | |
| 1272 | ||
| 1273 | if (mouse_target == NULL) | |
| 1274 | return; | |
| 1275 | //printf("mouse %d %d %d\n", x, y, button); | |
| 1276 | ||
| 1277 | for (DView *dv = list; dv != NULL; dv = dv->next) | |
| 1278 | { | |
| 1279 | if (mouse_target == dv->target) | |
| 1280 | { | |
| 1281 | if (dview_on_mouse(dv, x, y, button)) | |
| 1282 | break; | |
| 1283 | } | |
| 1284 | } | |
| 1285 | } | |
| 1286 | ||
| 1287 | ||
| 1288 | /*------------------------------------------------- | |
| 1289 | handle_editor - handle the editor | |
| 1290 | -------------------------------------------------*/ | |
| 1291 | ||
| 1292 | static void handle_editor(running_machine *machine) | |
| 1293 | { | |
| 1294 | if (focus_view->editor.active) | |
| 1295 | { | |
| 1296 | ui_event event; | |
| 1297 | ||
| 1298 | /* loop while we have interesting events */ | |
| 1299 | while (ui_input_pop_event(machine, &event)) | |
| 1300 | { | |
| 1301 | switch (event.event_type) | |
| 1302 | { | |
| 1303 | case UI_EVENT_CHAR: | |
| 1304 | /* if it's a backspace and we can handle it, do so */ | |
| 1305 | if ((event.ch == 8 || event.ch == 0x7f) && focus_view->editor.str.len() > 0) | |
| 1306 | { | |
| 1307 | /* autoschow */ | |
| 1308 | cur_editor = &focus_view->editor; | |
| 1309 | cur_editor->str = cur_editor->str.substr(0, cur_editor->str.len()); | |
| 1310 | } | |
| 1311 | /* if it's any other key and we're not maxed out, update */ | |
| 1312 | else if (event.ch >= ' ' && event.ch < 0x7f) | |
| 1313 | { | |
| 1314 | char buf[10]; | |
| 1315 | int ret; | |
| 1316 | /* autoschow */ | |
| 1317 | cur_editor = &focus_view->editor; | |
| 1318 | ret = utf8_from_uchar(buf, 10, event.ch); | |
| 1319 | buf[ret] = 0; | |
| 1320 | cur_editor->str = cur_editor->str.cat(buf); | |
| 1321 | } | |
| 1322 | break; | |
| 1323 | default: | |
| 1324 | break; | |
| 1325 | } | |
| 1326 | } | |
| 1327 | if (cur_editor != NULL) | |
| 1328 | { | |
| 1329 | render_editor(cur_editor); | |
| 1330 | if (ui_input_pressed(machine, IPT_UI_SELECT)) | |
| 1331 | { | |
| 1332 | process_string(focus_view, focus_view->editor.str); | |
| 1333 | focus_view->editor.str = ""; | |
| 1334 | cur_editor = NULL; | |
| 1335 | } | |
| 1336 | if (ui_input_pressed(machine, IPT_UI_CANCEL)) | |
| 1337 | cur_editor = NULL; | |
| 1338 | } | |
| 1339 | } | |
| 1340 | ||
| 1341 | } | |
| 1342 | ||
| 1343 | ||
| 1344 | /*------------------------------------------------- | |
| 1345 | menu_main - handle the main menu | |
| 1346 | -------------------------------------------------*/ | |
| 1347 | ||
| 1348 | static void handle_menus(running_machine *machine) | |
| 1349 | { | |
| 1350 | const ui_menu_event *event; | |
| 1351 | ||
| 1352 | render_container_empty(render_container_get_ui()); | |
| 1353 | ui_input_frame_update(machine); | |
| 1354 | if (menu != NULL) | |
| 1355 | { | |
| 1356 | /* process the menu */ | |
| 1357 | event = ui_menu_process(machine, menu, 0); | |
| 1358 | if (event != NULL && (event->iptkey == IPT_UI_SELECT || (event->iptkey == IPT_UI_RIGHT))) | |
| 1359 | { | |
| 1360 | //ui_menu_free(menu); | |
| 1361 | //menu = NULL; | |
| 1362 | ((void (*)(DView *, const ui_menu_event *)) event->itemref)(focus_view, event); | |
| 1363 | //ui_menu_stack_push(ui_menu_alloc(machine, menu->container, (ui_menu_handler_func)event->itemref, NULL)); | |
| 1364 | CreateMainMenu(machine); | |
| 1365 | } | |
| 1366 | else if (ui_input_pressed(machine, IPT_UI_CONFIGURE)) | |
| 1367 | { | |
| 1368 | ui_menu_free(menu); | |
| 1369 | menu = NULL; | |
| 1370 | } | |
| 1371 | } | |
| 1372 | else | |
| 1373 | { | |
| 1374 | /* turn on menus if requested */ | |
| 1375 | if (ui_input_pressed(machine, IPT_UI_CONFIGURE)) | |
| 1376 | CreateMainMenu(machine); | |
| 1377 | /* turn on editor if requested */ | |
| 1378 | //if (ui_input_pressed(machine, IPT_UI_UP) && focus_view->editor.active) | |
| 1379 | // cur_editor = &focus_view->editor; | |
| 1380 | handle_editor(machine); | |
| 1381 | } | |
| 1382 | } | |
| 1383 | ||
| 1384 | //============================================================ | |
| 1385 | // followers_set_cpu | |
| 1386 | //============================================================ | |
| 1387 | ||
| 1388 | static void followers_set_cpu(running_device *device) | |
| 1389 | { | |
| 1390 | const registers_subview_item *regsubitem = NULL; | |
| 1391 | const disasm_subview_item *dasmsubitem; | |
| 1392 | char title[256]; | |
| 1393 | ||
| 1394 | for (DView *dv = list; dv != NULL; dv = dv->next) | |
| 1395 | { | |
| 1396 | if (dview_is_state(dv, VIEW_STATE_FOLLOW_CPU)) | |
| 1397 | { | |
| 1398 | switch (dv->type) | |
| 1399 | { | |
| 1400 | case DVT_DISASSEMBLY: | |
| 1401 | for (dasmsubitem = disasm_view_get_subview_list(dv->view); dasmsubitem != NULL; dasmsubitem = dasmsubitem->next) | |
| 1402 | if (dasmsubitem->space->cpu == device) | |
| 1403 | { | |
| 1404 | disasm_view_set_subview(dv->view, dasmsubitem->index); | |
| 1405 | snprintf(title, ARRAY_LENGTH(title), "%s", dasmsubitem->name.cstr()); | |
| 1406 | dview_set_title(dv, title); | |
| 1407 | break; | |
| 1408 | } | |
| 1409 | break; | |
| 1410 | case DVT_REGISTERS: | |
| 1411 | for (regsubitem = registers_view_get_subview_list(dv->view); regsubitem != NULL; regsubitem = regsubitem->next) | |
| 1412 | if (regsubitem->device == device) | |
| 1413 | { | |
| 1414 | registers_view_set_subview(dv->view, regsubitem->index); | |
| 1415 | snprintf(title, ARRAY_LENGTH(title), "%s", regsubitem->name.cstr()); | |
| 1416 | dview_set_title(dv, title); | |
| 1417 | break; | |
| 1418 | } | |
| 1419 | break; | |
| 1420 | } | |
| 1421 | } | |
| 1422 | } | |
| 1423 | // and recompute the children | |
| 1424 | //console_recompute_children(main_console); | |
| 1425 | } | |
| 1426 | ||
| 1427 | ||
| 1428 | static void dview_update_view(DView *dv) | |
| 1429 | { | |
| 1430 | INT32 old_rt_width = dv->rt_width; | |
| 1431 | INT32 old_rt_height = dv->rt_height; | |
| 1432 | ||
| 1433 | render_target_get_bounds(dv->target, &dv->rt_width, &dv->rt_height, NULL); | |
| 1434 | if (dview_is_state(dv, VIEW_STATE_NEEDS_UPDATE) || dv->rt_width != old_rt_width || dv->rt_height != old_rt_height) | |
| 1435 | { | |
| 1436 | dview_size_allocate(dv); | |
| 1437 | dview_draw(dv); | |
| 1438 | dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, FALSE); | |
| 1439 | } | |
| 1440 | } | |
| 1441 | ||
| 1442 | ||
| 1443 | static void update_views(void) | |
| 1444 | { | |
| 1445 | DView *dv, *prev; | |
| 1446 | ||
| 1447 | LIST_GET_LAST(list, dv); | |
| 1448 | while (dv != NULL) | |
| 1449 | { | |
| 1450 | dview_update_view(dv); | |
| 1451 | LIST_GET_PREVIOUS(list, dv, prev); | |
| 1452 | dv = prev; | |
| 1453 | } | |
| 1454 | } | |
| 1455 | ||
| 1456 | ||
| 1457 | void debugint_wait_for_debugger(running_device *device, int firststop) | |
| 1458 | { | |
| 1459 | ||
| 1460 | if (firststop && list == NULL) | |
| 1461 | { | |
| 1462 | DView *dv; | |
| 1463 | render_target *target; | |
| 1464 | ||
| 1465 | target = render_get_ui_target(); | |
| 1466 | ||
| 1467 | //set_view_by_name(target, "Debug"); | |
| 1468 | ||
| 1469 | dv = dview_alloc(target, device->machine, DVT_DISASSEMBLY, VIEW_STATE_FOLLOW_CPU); | |
| 1470 | dv->editor.active = TRUE; | |
| 1471 | dv->editor.container = render_container_get_ui(); | |
| 1472 | dv = dview_alloc(target, device->machine, DVT_REGISTERS, VIEW_STATE_FOLLOW_CPU); | |
| 1473 | dv = dview_alloc(target, device->machine, DVT_CONSOLE, VIEW_STATE_FOLLOW_CPU); | |
| 1474 | dview_set_title(dv, "Console"); | |
| 1475 | dv->editor.active = TRUE; | |
| 1476 | dv->editor.container = render_container_get_ui(); | |
| 1477 | set_focus_view(dv); | |
| 1478 | } | |
| 1479 | ||
| 1480 | followers_set_cpu(device); | |
| 1481 | ||
| 1482 | //ui_update_and_render(device->machine, render_container_get_ui()); | |
| 1483 | update_views(); | |
| 1484 | osd_update(device->machine, FALSE); | |
| 1485 | handle_menus(device->machine); | |
| 1486 | handle_mouse(device->machine); | |
| 1487 | //osd_sleep(osd_ticks_per_second()/60); | |
| 1488 | ||
| 1489 | } | |
| 1490 | ||
| 1491 | void debugint_update_during_game(running_machine *machine) | |
| 1492 | { | |
| 1493 | if (!debug_cpu_is_stopped(machine) && mame_get_phase(machine) == MAME_PHASE_RUNNING) | |
| 1494 | { | |
| 1495 | update_views(); | |
| 1496 | } | |
| 1497 | } |
| r0 | r7357 | |
|---|---|---|
| 1 | /********************************************************************* | |
| 2 | ||
| 3 | debugint.c | |
| 4 | ||
| 5 | Internal debugger frontend using render interface. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | *********************************************************************/ | |
| 11 | ||
| 12 | #pragma once | |
| 13 | ||
| 14 | #ifndef __DEBUGINT_H__ | |
| 15 | #define __DEBUGINT_H__ | |
| 16 | ||
| 17 | ||
| 18 | /*************************************************************************** | |
| 19 | CONSTANTS | |
| 20 | ***************************************************************************/ | |
| 21 | ||
| 22 | ||
| 23 | /*************************************************************************** | |
| 24 | TYPE DEFINITIONS | |
| 25 | ***************************************************************************/ | |
| 26 | ||
| 27 | ||
| 28 | ||
| 29 | /*************************************************************************** | |
| 30 | GLOBAL VARIABLES | |
| 31 | ***************************************************************************/ | |
| 32 | ||
| 33 | ||
| 34 | /*************************************************************************** | |
| 35 | FUNCTION PROTOTYPES | |
| 36 | ***************************************************************************/ | |
| 37 | ||
| 38 | /* initialize the internal debugger */ | |
| 39 | void debugint_init(running_machine *machine); | |
| 40 | ||
| 41 | /* process events for internal debugger */ | |
| 42 | void debugint_wait_for_debugger(running_device *device, int firststop); | |
| 43 | ||
| 44 | /* update the internal debugger during a game */ | |
| 45 | void debugint_update_during_game(running_machine *machine); | |
| 46 | ||
| 47 | #endif |
| r7356 | r7357 | |
|---|---|---|
| 460 | 460 | /* add a char item to the specified container */ |
| 461 | 461 | void render_container_add_char(render_container *container, float x0, float y0, float height, float aspect, rgb_t argb, render_font *font, UINT16 ch); |
| 462 | 462 | |
| 463 | /* "drawable" handling for internal debugger */ | |
| 464 | render_container *render_debug_alloc(render_target *target); | |
| 465 | void render_debug_free(render_target *target, render_container *container); | |
| 466 | void render_debug_top(render_target *target, render_container *container); | |
| 463 | 467 | |
| 464 | ||
| 465 | 468 | #endif /* __RENDER_H__ */ |
| r7356 | r7357 | |
|---|---|---|
| 405 | 405 | mame_printf_error("%s: both compatible_with and clone_of are specified\n", driver->name); |
| 406 | 406 | error = TRUE; |
| 407 | 407 | } |
| 408 | ||
| 408 | ||
| 409 | 409 | /* find any recursive dependencies on the current driver */ |
| 410 | 410 | for (other_drv = driver_get_compatible(driver); other_drv != NULL; other_drv = driver_get_compatible(other_drv)) |
| 411 | 411 | { |
| r7356 | r7357 | |
| 443 | 443 | int error = FALSE; |
| 444 | 444 | |
| 445 | 445 | /* check for duplicate ROM entries */ |
| 446 | /* | |
| 447 | if (driver->rom != NULL && (driver->flags & GAME_NO_STANDALONE) == 0) | |
| 448 | { | |
| 449 | char romaddr[20]; | |
| 450 | sprintf(romaddr, "%p", driver->rom); | |
| 451 | if (roms.add(romaddr, driver, FALSE) == TMERR_DUPLICATE) | |
| 452 | { | |
| 453 | const game_driver *match = roms.find(romaddr); | |
| 454 | mame_printf_error("%s: %s uses the same ROM set as (%s, %s)\n", driver->source_file, driver->description, match->source_file, match->name); | |
| 455 | error = TRUE; | |
| 456 | } | |
| 457 | } | |
| 446 | /* | |
| 447 | if (driver->rom != NULL && (driver->flags & GAME_NO_STANDALONE) == 0) | |
| 448 | { | |
| 449 | char romaddr[20]; | |
| 450 | sprintf(romaddr, "%p", driver->rom); | |
| 451 | if (roms.add(romaddr, driver, FALSE) == TMERR_DUPLICATE) | |
| 452 | { | |
| 453 | const game_driver *match = roms.find(romaddr); | |
| 454 | mame_printf_error("%s: %s uses the same ROM set as (%s, %s)\n", driver->source_file, driver->description, match->source_file, match->name); | |
| 455 | error = TRUE; | |
| 456 | } | |
| 457 | } | |
| 458 | 458 | */ |
| 459 | 459 | /* iterate, starting with the driver's ROMs and continuing with device ROMs */ |
| 460 | 460 | for (const rom_source *source = rom_first_source(driver, config); source != NULL; source = rom_next_source(driver, config, source)) |
| r7356 | r7357 | |
| 1192 | 1192 | } |
| 1193 | 1193 | } |
| 1194 | 1194 | } |
| 1195 | ||
| 1195 | ||
| 1196 | 1196 | error = error || validate_natural_keyboard_statics(); |
| 1197 | ||
| 1198 | /* free the config */ | |
| 1197 | ||
| 1198 | /* free the config */ | |
| 1199 | 1199 | return error; |
| 1200 | 1200 | } |
| 1201 | 1201 | |
| r7356 | r7357 | |
| 1575 | 1575 | |
| 1576 | 1576 | machine_config_free(config); |
| 1577 | 1577 | } |
| 1578 | ||
| 1578 | ||
| 1579 | 1579 | #if (REPORT_TIMES) |
| 1580 | 1580 | mame_printf_info("Prep: %8dm\n", (int)(prep / 1000000)); |
| 1581 | 1581 | mame_printf_info("Expansion: %8dm\n", (int)(expansion / 1000000)); |
| r7356 | r7357 | |
|---|---|---|
| 70 | 70 | XTAL_7_3728MHz = 7372800, |
| 71 | 71 | XTAL_7_8643MHz = 7864300, /* Used on InterFlip games as video clock */ |
| 72 | 72 | XTAL_8MHz = 8000000, /* Extremely common, used on 100's of PCBs */ |
| 73 | XTAL_8_2MHz = 8200000, /* Universal Mr. Do - Model 8021 PCB */ | |
| 73 | 74 | XTAL_8_4672MHz = 8467200, /* Subsino's Ying Hua Lian */ |
| 74 | 75 | XTAL_8_664MHz = 8664000, /* Touchmaster */ |
| 75 | 76 | XTAL_8_867238MHz = 8867238, /* ETI-660 */ |
| r7356 | r7357 | |
| 93 | 94 | XTAL_12MHz = 12000000, /* Extremely common, used on 100's of PCBs */ |
| 94 | 95 | XTAL_12_096MHz = 12096000, /* Some early 80's Atari games */ |
| 95 | 96 | XTAL_12_288MHz = 12288000, /* Sega Model 3 digital audio board */ |
| 96 | XTAL_12_48MHz | |
| 97 | XTAL_12_48MHz | |
| 97 | 98 | XTAL_12_5MHz = 12500000, /* Red Alert audio board */ |
| 98 | 99 | XTAL_12_9792MHz = 12979200, /* Exidy 440 */ |
| 99 | 100 | XTAL_13_3MHz = 13300000, /* BMC bowling */ |
| r7356 | r7357 | |
| 114 | 115 | XTAL_18MHz = 18000000, /* S.A.R, Ikari Warriors 3 */ |
| 115 | 116 | XTAL_18_432MHz = 18432000, /* Extremely common, used on 100's of PCBs */ |
| 116 | 117 | XTAL_18_720MHz = 18720000, /* Nokia MikroMikko 1 */ |
| 118 | XTAL_19_6MHz = 19600000, /* Universal Mr. Do - Model 8021 PCB */ | |
| 117 | 119 | XTAL_19_6608MHz = 19660800, /* Euro League (bootleg), labeled as "UKI 19.6608 20PF" */ |
| 118 | 120 | XTAL_19_923MHz = 19923000, /* Cinematronics vectors */ |
| 119 | 121 | XTAL_19_968MHz = 19968000, /* Used mostly by some Taito games */ |
| r7356 | r7357 | |
|---|---|---|
| 73 | 73 | CPUS += CCPU |
| 74 | 74 | CPUS += ADSP21XX |
| 75 | 75 | CPUS += ASAP |
| 76 | #CPUS += AM29000 | |
| 76 | 77 | CPUS += UPD7810 |
| 77 | 78 | CPUS += ARM |
| 78 | 79 | CPUS += ARM7 |
| r7356 | r7357 | |
| 127 | 128 | CPUS += Z8 |
| 128 | 129 | CPUS += I8008 |
| 129 | 130 | CPUS += SCMP |
| 131 | #CPUS += MN10200 | |
| 130 | 132 | CPUS += UNSP |
| 131 | 133 | |
| 132 | 134 | #------------------------------------------------- |
| r7356 | r7357 | |
| 227 | 229 | #SOUNDS += DIGITALKER |
| 228 | 230 | SOUNDS += CDP1863 |
| 229 | 231 | SOUNDS += CDP1864 |
| 232 | #SOUNDS += ZSG2 | |
| 230 | 233 | SOUNDS += SOCRATES |
| 231 | 234 | SOUNDS += TMC0285 |
| 232 | 235 | SOUNDS += TMS5200 |
| r7356 | r7357 | |
|---|---|---|
| 82 | 82 | |
| 83 | 83 | Source Changes: |
| 84 | 84 | ---------------- |
| 85 | - The core is based on MAME 0.136u | |
| 85 | - The core is based on MAME 0.136u3. This incorporates all features of the | |
| 86 | 86 | update to this core. [MAME team] |
| 87 | 87 | |
| 88 | 88 | - [CIA6526] Refactored interface, added SP/CNT callbacks, and fixed serial |
| r7356 | r7357 | |
|---|---|---|
| 69 | 69 | ifneq ($(CROSSBUILD),1) |
| 70 | 70 | |
| 71 | 71 | ifneq ($(OS2_SHELL),) |
| 72 | TARGETOS = | |
| 72 | TARGETOS = os | |
| 73 | 73 | else |
| 74 | 74 | |
| 75 | 75 | UNAME = $(shell uname -a) |
| Previous | 15994 Revisions | Next |