| Previous | 15994 Revisions | Next |
| r1528 Friday 18th January, 2008 at 03:22:44 UTC by Nathan Woods |
|---|
| Updated to MAME 0.122u6 core |
| [docs] | messnew.txt |
| [src/emu] | cheat.c cpuexec.c cpuexec.h cpuintrf.c cpuintrf.h emu.mak inptport.h sndintrf.c sndintrf.h ui.c uimenu.c validity.c video.c |
| [src/emu/cpu] | cpu.mak |
| [src/emu/cpu/adsp2100] | adsp2100.c |
| [src/emu/cpu/alph8201] | alph8201.c |
| [src/emu/cpu/apexc] | apexc.c |
| [src/emu/cpu/arm] | arm.c |
| [src/emu/cpu/arm7] | arm7.c |
| [src/emu/cpu/asap] | asap.c |
| [src/emu/cpu/ccpu] | ccpu.c |
| [src/emu/cpu/cdp1802] | cdp1802.c |
| [src/emu/cpu/cop400] | cop400.h cop410.c cop420.c |
| [src/emu/cpu/cp1610] | cp1610.c |
| [src/emu/cpu/dsp32] | dsp32.c |
| [src/emu/cpu/dsp56k] | dsp56k.c |
| [src/emu/cpu/e132xs] | e132xs.c |
| [src/emu/cpu/f8] | f8.c |
| [src/emu/cpu/g65816] | g65816.c |
| [src/emu/cpu/h6280] | h6280.c h6280ops.h |
| [src/emu/cpu/h83002] | h83002.c |
| [src/emu/cpu/hd6309] | hd6309.c |
| [src/emu/cpu/i386] | i386.c i386dasm.c |
| [src/emu/cpu/i8039] | i8039.c i8039.h |
| [src/emu/cpu/i8051] | i8051.c |
| [src/emu/cpu/i8085] | i8085.c |
| [src/emu/cpu/i86] | i286.c i86.c |
| [src/emu/cpu/i8x41] | i8x41.c i8x41.h |
| [src/emu/cpu/i960] | i960.c |
| [src/emu/cpu/jaguar] | jaguar.c |
| [src/emu/cpu/konami] | konami.c |
| [src/emu/cpu/lh5801] | lh5801.c |
| [src/emu/cpu/m37710] | m37710.c |
| [src/emu/cpu/m6502] | m4510.c m6502.c m6509.c |
| [src/emu/cpu/m6800] | m6800.c |
| [src/emu/cpu/m68000] | m68kmame.c |
| [src/emu/cpu/m6805] | m6805.c m6805.h |
| [src/emu/cpu/m6809] | m6809.c |
| [src/emu/cpu/mb86233] | mb86233.c |
| [src/emu/cpu/mb88xx] | mb88xx.c |
| [src/emu/cpu/mc68hc11] | mc68hc11.c |
| [src/emu/cpu/minx] | minx.c |
| [src/emu/cpu/mips] | mips3com.c mips3com.h mips3drc.c psx.c r3000.c r3000.h |
| [src/emu/cpu/nec] | nec.c |
| [src/emu/cpu/pdp1] | pdp1.c tx0.c |
| [src/emu/cpu/pic16c5x] | pic16c5x.c pic16c5x.h |
| [src/emu/cpu/powerpc] | ppc.c ppcdrc.c |
| [src/emu/cpu/rsp] | rsp.c |
| [src/emu/cpu/s2650] | s2650.c |
| [src/emu/cpu/saturn] | saturn.c |
| [src/emu/cpu/sc61860] | sc61860.c |
| [src/emu/cpu/se3208] | se3208.c |
| [src/emu/cpu/sh2] | sh2.c |
| [src/emu/cpu/sh4] | sh4.c |
| [src/emu/cpu/sharc] | sharc.c |
| [src/emu/cpu/sm8500] | sm8500.c |
| [src/emu/cpu/spc700] | spc700.c |
| [src/emu/cpu/ssp1610] | ssp1610.c |
| [src/emu/cpu/t11] | t11.c |
| [src/emu/cpu/tlcs90] | tlcs90.c |
| [src/emu/cpu/tms32010] | tms32010.c tms32010.h |
| [src/emu/cpu/tms32025] | tms32025.c |
| [src/emu/cpu/tms32031] | tms32031.c |
| [src/emu/cpu/tms32051] | tms32051.c |
| [src/emu/cpu/tms34010] | tms34010.c tms34010.h |
| [src/emu/cpu/tms7000] | tms7000.c |
| [src/emu/cpu/tms9900] | 99xxcore.h |
| [src/emu/cpu/upd7810] | upd7810.c |
| [src/emu/cpu/v30mz] | v30mz.c |
| [src/emu/cpu/v60] | v60.c |
| [src/emu/cpu/v810] | v810.c |
| [src/emu/cpu/z180] | z180.c |
| [src/emu/cpu/z80] | z80.c |
| [src/emu/cpu/z8000] | z8000.c |
| [src/emu/cpu/z80gb] | z80gb.c |
| [src/emu/drivers] | xtal.h |
| [src/emu/machine] | 6522via.c 6532riot.c 6821pia.c 6821pia.h tmp68301.c |
| [src/emu/sound] | 5220intf.c scsp.c sound.mak tms5220.c tms5220.h |
| [src/emu/video] | generic.c generic.h tlc34076.c tlc34076.h tms34061.c tms34061.h |
| [src/mame] | mame.mak mamedriv.c tiny.c |
| [src/mame/audio] | astrof.c cage.c carnival.c cchasm.c cinemat.c crbaloon.c dcs.c dkong.c exidy.c gorf.c irem.c mario.c mcr.c n8080.c phoenix.c polepos.c scramble.c segag80r.c segasnd.c seibu.c seibu.h senjyo.c targ.c tx1.c williams.c wow.c |
| [src/mame/drivers] | 40love.c acefruit.c alg.c amspdwy.c arcadia.c arkanoid.c artmagic.c astinvad.c astrocde.c astrof.c asuka.c ataxx.c atetris.c bagman.c berzerk.c bigevglf.c bionicc.c bishjan.c bking2.c blmbycar.c bloodbro.c btoads.c bublbobl.c buggychl.c cabal.c capbowl.c carjmbre.c ccastles.c cclimber.c changela.c cloud9.c cojag.c coolpool.c cosmic.c cps3.c crbaloon.c csk.c cvs.c darius.c darkhors.c dcon.c ddayjlc.c ddragon.c deadang.c dec8.c deco156.c decocass.c dlair.c dorachan.c drgnmst.c dunhuang.c dynadice.c dynduke.c enigma2.c eolithsp.c equites.c exerion.c exidy.c exterm.c f1gp.c fcombat.c finalizr.c firebeat.c flstory.c fuukifg2.c gaelco.c gaelco3d.c getrivia.c gladiatr.c goldstar.c goodejan.c gstream.c gsword.c gyruss.c harddriv.c hshavoc.c ikki.c imolagp.c itech8.c jedi.c jpmimpct.c junofrst.c kaneko16.c kchamp.c kickgoal.c kingobox.c kncljoe.c konamigq.c konamigv.c ksayakyu.c ksys573.c ladybug.c lasso.c lastduel.c legionna.c leland.c lethalj.c limenko.c lkage.c looping.c lsasquad.c ltcasino.c m72.c m92.c m92.h markham.c matmania.c maxaflex.c mcr3.c mcr68.c megaplay.c megazone.c merit.c metro.c mexico86.c micro3d.c midas.c midtunit.c midvunit.c midwunit.c midxunit.c midyunit.c midzeus.c missile.c momoko.c mouser.c msisaac.c munchmo.c mustache.c mw8080bw.c namcona1.c namcos10.c namcos11.c namcos12.c naomi.c naughtyb.c nbmj9195.c neogeo.c ninjakid.c ninjaw.c niyanpai.c nmk16.c nss.c nycaptor.c pacman.c pandoras.c paradise.c paranoia.c peplus.c phoenix.c pipeline.c pitnrun.c pkunwar.c playmark.c pturn.c punchout.c pushman.c qix.c quasar.c r2dtank.c raiden.c raiden2.c redalert.c retofinv.c rollerg.c rollrace.c sauro.c segag80v.c segas16a.c segas32.c sengokmj.c seta.c shanghai.c shangkid.c shougi.c sidepckt.c simpsons.c skyarmy.c skychut.c slapfght.c spcforce.c sprint4.c ssingles.c ssv.c stadhero.c strnskil.c subs.c superqix.c suprridr.c system1.c tail2nos.c taitosj.c tatsumi.c tempest.c thayers.c tickee.c tmnt.c tnzs.c toaplan1.c toki.c tp84.c troangel.c tunhunt.c twin16.c twincobr.c uapce.c ultratnk.c vicdual.c victory.c vigilant.c wardner.c wilytowr.c wiping.c wiz.c xain.c xtheball.c yamato.c zac2650.c zaxxon.c zn.c |
| [src/mame/includes] | amiga.h astrocde.h astrof.h berzerk.h crbaloon.h cvs.h eolithsp.h exidy.h itech8.h jaguar.h jedi.h mario.h mcr.h mw8080bw.h phoenix.h seta.h spacefb.h targ.h* victory.h* |
| [src/mame/machine] | amiga.c asic65.c leland.c mcr.c midwunit.c namcos1.c |
| [src/mame/video] | artmagic.c bionicc.c btoads.c buggychl.c capbowl.c carjmbre.c changela.c crbaloon.c csk.c cvs.c darius.c dc.c exidy.c finalizr.c galaxian.c goldstar.c itech8.c jagobj.c jaguar.c jedi.c konamiic.c konamiic.h lethalj.c matmania.c megazone.c mouser.c munchmo.c naughtyb.c nycaptor.c paradise.c phoenix.c pkunwar.c ppu2c0x.c punchout.c redalert.c seta.c skychut.c snk.c tagteam.c tatsumi.c thief.c tiamc1.c tmnt.c troangel.c tunhunt.c vdc.c vdc.h victory.c vigilant.c wiping.c wiz.c xxmissio.c |
| [src/mess] | device.c device.h filemngr.c mess.c mess.mak messcore.mak mesvalid.c mslegacy.c* mslegacy.h |
| [src/mess/drivers] | aquarius.c nascom1.c |
| [src/mess/machine] | mz700.c nascom1.c pet.c ti99_4x.c |
| [src/mess/osd/windows] | dialog.c menu.c |
| [src/mess/osd/winui] | devview.c messui.c messui.h |
| r1527 | r1528 | |
|---|---|---|
| 179 | 179 | sound_flags = 0; |
| 180 | 180 | output[0] = 0; output[1] = 0; |
| 181 | 181 | |
| 182 | ctc_intf.baseclock = | |
| 182 | ctc_intf.baseclock = | |
| 183 | 183 | z80ctc_init (0, &ctc_intf); |
| 184 | 184 | |
| 185 | 185 | timer_pulse(attotime_make(0, machine->screen[0].refresh), NULL, 0, cchasm_sh_update); |
| r1527 | r1528 | |
|---|---|---|
| 48 | 48 | #define VMIN 0 |
| 49 | 49 | #define VMAX 32767 |
| 50 | 50 | |
| 51 | static | |
| 51 | static UINT8 sound_latch_a; | |
| 52 | 52 | |
| 53 | 53 | static sound_stream * channel; |
| 54 | 54 | |
| r1527 | r1528 | |
| 386 | 386 | sound_latch_a = data; |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | SOUND_START( phoenix) | |
| 390 | { | |
| 391 | state_save_register_global(sound_latch_a); | |
| 392 | } | |
| 393 | ||
| 389 | 394 | WRITE8_HANDLER( phoenix_sound_control_b_w ) |
| 390 | 395 | { |
| 391 | 396 | discrete_sound_w(PHOENIX_EFFECT_1_DATA, data & 0x0f); |
| r1527 | r1528 | |
| 420 | 425 | |
| 421 | 426 | channel = stream_create(0, 1, Machine->sample_rate, 0, phoenix_sound_update); |
| 422 | 427 | |
| 428 | state_save_register_global_pointer(poly18, (1ul << (18-5)) ); | |
| 429 | ||
| 423 | 430 | /* a dummy token */ |
| 424 | 431 | return auto_malloc(1); |
| 425 | 432 | } |
| r1527 | r1528 | |
|---|---|---|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | |
| 178 | UINT | |
| 178 | CUSTOM_INPUT( | |
| 179 | 179 | { |
| 180 | 180 | return !sample_playing(0); |
| 181 | 181 | } |
| r1527 | r1528 | |
|---|---|---|
| 546 | 546 | MACHINE_DRIVER_START( spacefev_sound ) |
| 547 | 547 | |
| 548 | 548 | /* basic machine hardware */ |
| 549 | MDRV_CPU_ADD(I8035, 6000000 | |
| 549 | MDRV_CPU_ADD(I8035, 6000000 | |
| 550 | 550 | /* audio CPU */ |
| 551 | 551 | MDRV_CPU_PROGRAM_MAP(n8080_sound_cpu_map, 0) |
| 552 | 552 | MDRV_CPU_IO_MAP(n8080_sound_io_map, 0) |
| r1527 | r1528 | |
| 568 | 568 | MACHINE_DRIVER_START( sheriff_sound ) |
| 569 | 569 | |
| 570 | 570 | /* basic machine hardware */ |
| 571 | MDRV_CPU_ADD(I8035, 6000000 | |
| 571 | MDRV_CPU_ADD(I8035, 6000000 | |
| 572 | 572 | /* audio CPU */ |
| 573 | 573 | MDRV_CPU_PROGRAM_MAP(n8080_sound_cpu_map, 0) |
| 574 | 574 | MDRV_CPU_IO_MAP(n8080_sound_io_map, 0) |
| r1527 | r1528 | |
| 590 | 590 | MACHINE_DRIVER_START( helifire_sound ) |
| 591 | 591 | |
| 592 | 592 | /* basic machine hardware */ |
| 593 | MDRV_CPU_ADD(I8035, 6000000 | |
| 593 | MDRV_CPU_ADD(I8035, 6000000 | |
| 594 | 594 | /* audio CPU */ |
| 595 | 595 | MDRV_CPU_PROGRAM_MAP(n8080_sound_cpu_map, 0) |
| 596 | 596 | MDRV_CPU_IO_MAP(helifire_sound_io_map, 0) |
| r1527 | r1528 | |
|---|---|---|
| 1508 | 1508 | generic_init(machine, demon_sound_w); |
| 1509 | 1509 | |
| 1510 | 1510 | /* initialize the CTC interface */ |
| 1511 | demon_z80ctc_interface.baseclock = | |
| 1511 | demon_z80ctc_interface.baseclock = | |
| 1512 | 1512 | z80ctc_init(0, &demon_z80ctc_interface); |
| 1513 | 1513 | |
| 1514 | 1514 | /* reset the FIFO */ |
| r1527 | r1528 | |
|---|---|---|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | |
| 183 | UINT | |
| 183 | CUSTOM_INPUT( | |
| 184 | 184 | { |
| 185 | 185 | return !sample_playing(0); |
| 186 | 186 | } |
| r1527 | r1528 | |
|---|---|---|
| 193 | 193 | |
| 194 | 194 | /************************************* |
| 195 | 195 | * |
| 196 | * Space Fighter | |
| 197 | * | |
| 198 | *************************************/ | |
| 199 | ||
| 200 | WRITE8_HANDLER( spfghmk2_audio_w ) | |
| 201 | { | |
| 202 | /* nothing yet */ | |
| 203 | } | |
| 204 | ||
| 205 | ||
| 206 | MACHINE_DRIVER_START( spfghmk2_audio ) | |
| 207 | /* nothing yet */ | |
| 208 | MACHINE_DRIVER_END | |
| 209 | ||
| 210 | ||
| 211 | ||
| 212 | /************************************* | |
| 213 | * | |
| 196 | 214 | * Tomahawk |
| 197 | 215 | * |
| 198 | 216 | *************************************/ |
| r1527 | r1528 | |
|---|---|---|
| 161 | 161 | memory_set_bankptr(11, memory_region(boot_region + 1)); |
| 162 | 162 | |
| 163 | 163 | cage_cpu = mame_find_cpu_index(Machine, "cage"); |
| 164 | cage_cpu_clock_period = ATTOTIME_IN_HZ( | |
| 164 | cage_cpu_clock_period = ATTOTIME_IN_HZ( | |
| 165 | 165 | cage_cpu_h1_clock_period = attotime_mul(cage_cpu_clock_period, 2); |
| 166 | 166 | |
| 167 | 167 | dma_timer = timer_alloc(dma_timer_callback, NULL); |
| r1527 | r1528 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | Taito Crazy Balloon hardware | |
| 4 | ||
| 5 | Analog emulation - Jan 2006, Derrick Renaud | |
| 6 | ||
| 7 | ***************************************************************************/ | |
| 8 | ||
| 1 | 9 | #include "driver.h" |
| 2 | 10 | #include "crbaloon.h" |
| 11 | #include "sound/sn76477.h" | |
| 12 | #include "sound/discrete.h" | |
| 3 | 13 | |
| 4 | 14 | |
| 5 | /************************************************************************ | |
| 6 | * crbaloon Sound System Analog emulation | |
| 7 | * Jan 2006, Derrick Renaud | |
| 8 | ************************************************************************/ | |
| 15 | /* timing sources */ | |
| 16 | #define CRBALOON_16H (CRBALOON_MASTER_XTAL/2/2/16) | |
| 9 | 17 | |
| 18 | /* enables */ | |
| 19 | #define CRBALOON_LAUGH_EN NODE_01 | |
| 20 | #define CRBALOON_MUSIC_EN NODE_02 | |
| 21 | #define CRBALOON_MUSIC_DATA NODE_03 | |
| 10 | 22 | |
| 11 | /* Timing Sources */ | |
| 12 | #define CRBALOON_16H 9987000.0/2/2/16 | |
| 13 | ||
| 14 | /* Nodes - Adjusters */ | |
| 23 | /* nodes - adjusters */ | |
| 15 | 24 | #define CRBALOON_VR2 NODE_05 |
| 16 | 25 | #define CRBALOON_VR3 NODE_06 |
| 17 | 26 | |
| 18 | /* | |
| 27 | /* nodes - sounds */ | |
| 19 | 28 | #define CRBALOON_LAUGH_SND NODE_80 |
| 20 | 29 | #define CRBALOON_MUSIC_SND NODE_81 |
| 21 | 30 | |
| 31 | ||
| 32 | ||
| 33 | void crbaloon_audio_set_music_freq(UINT8 freq) | |
| 34 | { | |
| 35 | discrete_sound_w(CRBALOON_MUSIC_DATA, freq); | |
| 36 | } | |
| 37 | ||
| 38 | ||
| 39 | void crbaloon_audio_set_music_enable(int enabled) | |
| 40 | { | |
| 41 | discrete_sound_w(CRBALOON_MUSIC_EN, enabled); | |
| 42 | } | |
| 43 | ||
| 44 | ||
| 45 | void crbaloon_audio_set_explosion_enable(int enabled) | |
| 46 | { | |
| 47 | SN76477_enable_w(0, enabled); | |
| 48 | } | |
| 49 | ||
| 50 | ||
| 51 | void crbaloon_audio_set_breath_enable(int enabled) | |
| 52 | { | |
| 53 | /* changes slf_res to 10k (middle of two 10k resistors) | |
| 54 | it also puts a tantal capacitor against GND on the output, | |
| 55 | but this section of the schematics is not readable. */ | |
| 56 | SN76477_slf_res_w(0, enabled ? RES_K(10) : RES_K(20) ); | |
| 57 | } | |
| 58 | ||
| 59 | ||
| 60 | void crbaloon_audio_set_appear_enable(int enabled) | |
| 61 | { | |
| 62 | /* APPEAR is connected to MIXER B */ | |
| 63 | SN76477_mixer_b_w(0, enabled); | |
| 64 | } | |
| 65 | ||
| 66 | ||
| 67 | void crbaloon_audio_set_laugh_enable(int enabled) | |
| 68 | { | |
| 69 | discrete_sound_w(CRBALOON_LAUGH_EN, enabled); | |
| 70 | } | |
| 71 | ||
| 72 | ||
| 73 | ||
| 22 | 74 | static const discrete_555_desc desc_crbaloon_laugh_osc = |
| 23 | 75 | { |
| 24 | 76 | DISC_555_OUT_SQW | DISC_555_OUT_DC, |
| r1527 | r1528 | |
| 26 | 78 | DEFAULT_555_VALUES |
| 27 | 79 | }; |
| 28 | 80 | |
| 81 | ||
| 29 | 82 | static const discrete_dac_r1_ladder desc_crbaloon_music_dac = |
| 30 | 83 | { |
| 31 | 84 | 3, |
| r1527 | r1528 | |
| 33 | 86 | 5, RES_K(470), 0, 0 |
| 34 | 87 | }; |
| 35 | 88 | |
| 36 | DISCRETE_SOUND_START(crbaloon) | |
| 37 | 89 | |
| 90 | ||
| 91 | static DISCRETE_SOUND_START(crbaloon) | |
| 92 | ||
| 38 | 93 | /************************************************ |
| 39 | 94 | * Input register mapping |
| 40 | 95 | ************************************************/ |
| r1527 | r1528 | |
| 78 | 133 | DISCRETE_OUTPUT(NODE_91, 65000.0/12) |
| 79 | 134 | |
| 80 | 135 | DISCRETE_SOUND_END |
| 136 | ||
| 137 | ||
| 138 | ||
| 139 | static const struct SN76477interface sn76477_interface = | |
| 140 | { | |
| 141 | RES_K( 47), /* 4 noise_res */ | |
| 142 | RES_K(330), /* 5 filter_res */ | |
| 143 | CAP_P(470), /* 6 filter_cap */ | |
| 144 | RES_K(220), /* 7 decay_res */ | |
| 145 | CAP_U(1.0), /* 8 attack_decay_cap */ | |
| 146 | RES_K(4.7), /* 10 attack_res */ | |
| 147 | RES_M( 1), /* 11 amplitude_res */ | |
| 148 | RES_K(200), /* 12 feedback_res */ | |
| 149 | 5.0, /* 16 vco_voltage */ | |
| 150 | CAP_P(470), /* 17 vco_cap */ | |
| 151 | RES_K(330), /* 18 vco_res */ | |
| 152 | 5.0, /* 19 pitch_voltage */ | |
| 153 | RES_K( 20), /* 20 slf_res (variable) */ | |
| 154 | CAP_P(420), /* 21 slf_cap */ | |
| 155 | CAP_U(1.0), /* 23 oneshot_cap */ | |
| 156 | RES_K( 47), /* 24 oneshot_res */ | |
| 157 | 0, /* 22 vco */ | |
| 158 | 0, /* 26 mixer A */ | |
| 159 | 0, /* 25 mixer B (variable) */ | |
| 160 | 1, /* 27 mixer C */ | |
| 161 | 1, /* 1 envelope 1 */ | |
| 162 | 0, /* 28 envelope 2 */ | |
| 163 | 0 /* 9 enable (variable) */ | |
| 164 | }; | |
| 165 | ||
| 166 | ||
| 167 | ||
| 168 | MACHINE_DRIVER_START( crbaloon_audio ) | |
| 169 | ||
| 170 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 171 | ||
| 172 | MDRV_SOUND_ADD(SN76477, 0) | |
| 173 | MDRV_SOUND_CONFIG(sn76477_interface) | |
| 174 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0) | |
| 175 | ||
| 176 | MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0) | |
| 177 | MDRV_SOUND_CONFIG_DISCRETE(crbaloon) | |
| 178 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 179 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
|---|---|---|
| 69 | 69 | int i; |
| 70 | 70 | |
| 71 | 71 | /* z80 ctc init */ |
| 72 | ctc_intf.baseclock = | |
| 72 | ctc_intf.baseclock = | |
| 73 | 73 | z80ctc_init (0, &ctc_intf); |
| 74 | 74 | |
| 75 | 75 | /* z80 pio init */ |
| r1527 | r1528 | |
|---|---|---|
| 275 | 275 | |
| 276 | 276 | void *tx1_sh_start(int clock, const struct CustomSound_interface *config) |
| 277 | 277 | { |
| 278 | const int r0[4] = { 390e3, 180e3, 180e3, 180e3 }; | |
| 279 | const int r1[3] = { 180e3, 390e3, 56e3 }; | |
| 280 | const int r2[3] = { 390e3, 390e3, 180e3 }; | |
| 278 | static const int r0[4] = { 390e3, 180e3, 180e3, 180e3 }; | |
| 279 | static const int r1[3] = { 180e3, 390e3, 56e3 }; | |
| 280 | static const int r2[3] = { 390e3, 390e3, 180e3 }; | |
| 281 | 281 | |
| 282 | 282 | |
| 283 | 283 | /* Allocate the stream */ |
| r1527 | r1528 | |
|---|---|---|
| 25 | 25 | * |
| 26 | 26 | *************************************/ |
| 27 | 27 | |
| 28 | #define SSIO_CLOCK 16000000 | |
| 29 | #define CSDELUXE_CLOCK 15000000 | |
| 30 | #define SOUNDSGOOD_CLOCK 16000000 | |
| 31 | #define TURBOCS_CLOCK 8000000 | |
| 32 | #define SQUAWKTALK_CLOCK 3580000 | |
| 28 | #define SSIO_CLOCK XTAL_16MHz | |
| 29 | #define CSDELUXE_CLOCK XTAL_16MHz | |
| 30 | #define SOUNDSGOOD_CLOCK XTAL_16MHz | |
| 31 | #define TURBOCS_CLOCK XTAL_8MHz | |
| 32 | #define SQUAWKTALK_CLOCK XTAL_3_579545MHz | |
| 33 | 33 | |
| 34 | 34 | |
| 35 | 35 | |
| r1527 | r1528 | |
| 791 | 791 | |
| 792 | 792 | /********* machine driver ***********/ |
| 793 | 793 | MACHINE_DRIVER_START(turbo_chip_squeak) |
| 794 | MDRV_CPU_ADD_TAG("tcs", M6809, TURBOCS_CLOCK | |
| 794 | MDRV_CPU_ADD_TAG("tcs", M6809E, TURBOCS_CLOCK | |
| 795 | 795 | MDRV_CPU_PROGRAM_MAP(turbocs_map,0) |
| 796 | 796 | |
| 797 | 797 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r1527 | r1528 | |
| 818 | 818 | * |
| 819 | 819 | * MCR Squawk n Talk communications |
| 820 | 820 | * |
| 821 | * MC6802, 2 PIAs, TMS52 | |
| 821 | * MC6802, 2 PIAs, TMS5200, AY8912 (not used), 8-bit DAC (not used) | |
| 822 | 822 | * |
| 823 | 823 | *************************************/ |
| 824 | 824 | |
| r1527 | r1528 | |
| 840 | 840 | |
| 841 | 841 | static WRITE8_HANDLER( squawkntalk_portb2_w ) |
| 842 | 842 | { |
| 843 | /* bits 0-1 select read/write strobes on the TMS52 | |
| 843 | /* bits 0-1 select read/write strobes on the TMS5200 */ | |
| 844 | 844 | data &= 0x03; |
| 845 | 845 | |
| 846 | /* write strobe -- pass the current command to the TMS52 | |
| 846 | /* write strobe -- pass the current command to the TMS5200 */ | |
| 847 | 847 | if (((data ^ squawkntalk_tms_strobes) & 0x02) && !(data & 0x02)) |
| 848 | 848 | { |
| 849 | 849 | tms5220_data_w(offset, squawkntalk_tms_command); |
| r1527 | r1528 | |
| 853 | 853 | pia_1_ca2_w(0, 0); |
| 854 | 854 | } |
| 855 | 855 | |
| 856 | /* read strobe -- read the current status from the TMS52 | |
| 856 | /* read strobe -- read the current status from the TMS5200 */ | |
| 857 | 857 | else if (((data ^ squawkntalk_tms_strobes) & 0x01) && !(data & 0x01)) |
| 858 | 858 | { |
| 859 | 859 | pia_1_porta_w(0, tms5220_status_r(offset)); |
| r1527 | r1528 | |
| 941 | 941 | MDRV_CPU_PROGRAM_MAP(squawkntalk_map,0) |
| 942 | 942 | |
| 943 | 943 | /* only used on Discs of Tron, which is stereo */ |
| 944 | MDRV_SOUND_ADD_TAG("snt", TMS52 | |
| 944 | MDRV_SOUND_ADD_TAG("snt", TMS5200, 640000) | |
| 945 | 945 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.60) |
| 946 | 946 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.60) |
| 947 | 947 |
| r1527 | r1528 | |
|---|---|---|
| 280 | 280 | MACHINE_DRIVER_START( sega_speech_board ) |
| 281 | 281 | |
| 282 | 282 | /* CPU for the speech board */ |
| 283 | MDRV_CPU_ADD(I8035, SPEECH_MASTER_CLOCK | |
| 283 | MDRV_CPU_ADD(I8035, SPEECH_MASTER_CLOCK | |
| 284 | 284 | MDRV_CPU_PROGRAM_MAP(speech_map, 0) |
| 285 | 285 | MDRV_CPU_IO_MAP(speech_portmap, 0) |
| 286 | 286 | |
| r1527 | r1528 | |
| 918 | 918 | MACHINE_DRIVER_START( sega_universal_sound_board ) |
| 919 | 919 | |
| 920 | 920 | /* CPU for the usb board */ |
| 921 | MDRV_CPU_ADD_TAG("usb", I8035, USB_MASTER_CLOCK | |
| 921 | MDRV_CPU_ADD_TAG("usb", I8035, USB_MASTER_CLOCK | |
| 922 | 922 | MDRV_CPU_PROGRAM_MAP(usb_map, 0) |
| 923 | 923 | MDRV_CPU_IO_MAP(usb_portmap, 0) |
| 924 | 924 |
| r1527 | r1528 | |
|---|---|---|
| 153 | 153 | MACHINE_DRIVER_START( irem_audio ) |
| 154 | 154 | |
| 155 | 155 | /* basic machine hardware */ |
| 156 | MDRV_CPU_ADD(M6803, 3579545/4) | |
| 156 | MDRV_CPU_ADD(M6803, XTAL_3_579545MHz/4) /* verified on pcb */ | |
| 157 | 157 | /* audio CPU */ |
| 158 | 158 | MDRV_CPU_PROGRAM_MAP(irem_sound_readmem,irem_sound_writemem) |
| 159 | 159 | MDRV_CPU_IO_MAP(irem_sound_readport,irem_sound_writeport) |
| r1527 | r1528 | |
| 161 | 161 | /* sound hardware */ |
| 162 | 162 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 163 | 163 | |
| 164 | MDRV_SOUND_ADD(AY8910, 3579545/4) | |
| 164 | MDRV_SOUND_ADD(AY8910, XTAL_3_579545MHz/4) /* verified on pcb */ | |
| 165 | 165 | MDRV_SOUND_CONFIG(irem_ay8910_interface_1) |
| 166 | 166 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 167 | 167 | |
| 168 | MDRV_SOUND_ADD(AY8910, 3579545/4) | |
| 168 | MDRV_SOUND_ADD(AY8910, XTAL_3_579545MHz/4) /* verified on pcb */ | |
| 169 | 169 | MDRV_SOUND_CONFIG(irem_ay8910_interface_2) |
| 170 | 170 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 171 | 171 | |
| 172 | MDRV_SOUND_ADD(MSM5205, 384 | |
| 172 | MDRV_SOUND_ADD(MSM5205, XTAL_384kHz) /* verified on pcb */ | |
| 173 | 173 | MDRV_SOUND_CONFIG(irem_msm5205_interface_1) |
| 174 | 174 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 175 | 175 | |
| 176 | MDRV_SOUND_ADD(MSM5205, 384 | |
| 176 | MDRV_SOUND_ADD(MSM5205, XTAL_384kHz) /* verified on pcb */ | |
| 177 | 177 | MDRV_SOUND_CONFIG(irem_msm5205_interface_2) |
| 178 | 178 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 179 | 179 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
|---|---|---|
| 302 | 302 | |
| 303 | 303 | |
| 304 | 304 | MACHINE_DRIVER_START( carnival_audio ) |
| 305 | MDRV_CPU_ADD(I8039, | |
| 305 | MDRV_CPU_ADD(I8039, | |
| 306 | 306 | MDRV_CPU_PROGRAM_MAP(carnival_audio_map,0) |
| 307 | 307 | MDRV_CPU_IO_MAP(carnival_audio_io_map,0) |
| 308 | 308 |
| r1527 | r1528 | |
|---|---|---|
| 17 | 17 | * |
| 18 | 18 | ****************************************************************/ |
| 19 | 19 | |
| 20 | /* Set to 1 to disable DAC and post-mixer filters */ | |
| 21 | #define DK_NO_FILTERS (0) | |
| 22 | ||
| 23 | ||
| 20 | 24 | #define ACTIVELOW_PORT_BIT(P,A,D) (((P) & (~(1 << (A)))) | (((D) ^ 1) << (A))) |
| 21 | 25 | |
| 22 | 26 | /* Needed for dkongjr ... FIXME */ |
| r1527 | r1528 | |
| 99 | 103 | * |
| 100 | 104 | ****************************************************************/ |
| 101 | 105 | |
| 102 | /* Variable components */ | |
| 103 | ||
| 104 | #define DK_VR1 RES_K(10) | |
| 105 | ||
| 106 | 106 | /* Resistors */ |
| 107 | 107 | |
| 108 | 108 | #define DK_R1 RES_K(47) |
| r1527 | r1528 | |
| 166 | 166 | #define DK_C30 CAP_U(10) |
| 167 | 167 | #define DK_C32 CAP_U(10) |
| 168 | 168 | #define DK_C34 CAP_N(10) |
| 169 | #define DK_C1 | |
| 169 | #define DK_C159 CAP_N(0) /* 100nF in Schematics but sound is way off */ | |
| 170 | 170 | |
| 171 | 171 | |
| 172 | 172 | /* |
| r1527 | r1528 | |
| 215 | 215 | {DK_R2, DK_R24, DK_R1, DK_R14}, |
| 216 | 216 | {0,0,0}, // no variable resistors |
| 217 | 217 | {0,0,0}, // no node capacitors |
| 218 | 0, DK_VR1, | |
| 219 | DK_C160, | |
| 218 | 0, 0, | |
| 219 | DK_C159, | |
| 220 | 220 | DK_C12, |
| 221 | 221 | 0, 1}; |
| 222 | 222 | |
| r1527 | r1528 | |
| 345 | 345 | DISCRETE_FILTER2(NODE_73, 1, NODE_71, 1916, (1.0/0.74), DISC_FILTER_LOWPASS) |
| 346 | 346 | |
| 347 | 347 | /* Adjustment VR2 */ |
| 348 | #if DK_NO_FILTERS | |
| 349 | DISCRETE_MULTIPLY(DS_OUT_DAC, 1, NODE_71, DS_ADJ_DAC) | |
| 350 | #else | |
| 348 | 351 | DISCRETE_MULTIPLY(DS_OUT_DAC, 1, NODE_73, DS_ADJ_DAC) |
| 352 | #endif | |
| 349 | 353 | |
| 350 | 354 | /************************************************/ |
| 351 | 355 | /* Amplifier */ |
| r1527 | r1528 | |
| 356 | 360 | // Amplifier: internal amplifier |
| 357 | 361 | DISCRETE_ADDER2(NODE_289,1,NODE_288,5.0*43.0/(100.0+43.0)) |
| 358 | 362 | DISCRETE_RCINTEGRATE(NODE_294,1,NODE_289,0,150,1000, CAP_U(33),DK_SUP_V,DISC_RC_INTEGRATE_TYPE3) |
| 359 | DISCRETE_CRFILTER(NODE_295,1,NODE_294, 1000, DK_C13) | |
| 360 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 * 3) | |
| 363 | DISCRETE_CRFILTER(NODE_295,1,NODE_294, RES_K(50), DK_C13) | |
| 364 | // EZV20 equivalent filter circuit ... | |
| 365 | DISCRETE_CRFILTER(NODE_296,1,NODE_295, RES_K(1), CAP_U(4.7)) | |
| 361 | 366 | |
| 367 | #if DK_NO_FILTERS | |
| 368 | DISCRETE_OUTPUT(NODE_288, 32767.0/5.0 * 10) | |
| 369 | #else | |
| 370 | DISCRETE_OUTPUT(NODE_296, 32767.0/5.0 * 3) | |
| 371 | #endif | |
| 372 | ||
| 362 | 373 | DISCRETE_SOUND_END |
| 363 | 374 | |
| 364 | 375 | /**************************************************************** |
| r1527 | r1528 | |
| 635 | 646 | #define JR_R9 RES_K(47) |
| 636 | 647 | #define JR_R10 RES_K(10) |
| 637 | 648 | #define JR_R11 RES_K(20) |
| 649 | #define JR_R12 RES_K(10) | |
| 650 | #define JR_R13 RES_K(47) | |
| 638 | 651 | #define JR_R14 RES_K(30) |
| 639 | 652 | #define JR_R17 RES_K(47) |
| 640 | 653 | #define JR_R18 RES_K(100) |
| r1527 | r1528 | |
| 645 | 658 | #define JR_R27 RES_K(10) |
| 646 | 659 | #define JR_R28 RES_K(100) |
| 647 | 660 | |
| 661 | ||
| 648 | 662 | #define JR_C13 CAP_U(4.7) |
| 649 | 663 | #define JR_C14 CAP_U(4.7) |
| 650 | 664 | #define JR_C15 CAP_U(22) |
| r1527 | r1528 | |
| 656 | 670 | #define JR_C21 CAP_N(56) |
| 657 | 671 | #define JR_C22 CAP_N(220) |
| 658 | 672 | #define JR_C23 CAP_U(0.47) |
| 673 | #define JR_C24 CAP_U(47) | |
| 659 | 674 | #define JR_C25 CAP_U(1) |
| 660 | 675 | #define JR_C26 CAP_U(47) |
| 661 | 676 | #define JR_C27 CAP_U(22) |
| r1527 | r1528 | |
| 687 | 702 | {JR_R5, JR_R3, JR_R6, JR_R4, JR_R25}, |
| 688 | 703 | {0,0,0,0,0}, // no variable resistors |
| 689 | 704 | {0,0,0,0,0}, // no node capacitors |
| 690 | 0, | |
| 705 | 0, 0 | |
| 691 | 706 | JR_C155, |
| 692 | 707 | JR_C161, |
| 693 | 708 | 0, 1}; |
| 694 | 709 | |
| 695 | #define JR_R12 RES_K(10) | |
| 696 | #define JR_R13 RES_K(47) | |
| 697 | #define JR_C24 CAP_U(47) | |
| 698 | ||
| 699 | 710 | static const discrete_mixer_desc dkongjr_s1_mixer_desc = |
| 700 | 711 | {DISC_MIXER_IS_RESISTOR, |
| 701 | 712 | {JR_R13, JR_R12}, |
| r1527 | r1528 | |
| 866 | 877 | dkong_state *state = machine->driver_data; |
| 867 | 878 | |
| 868 | 879 | state->mcustatus = 0; |
| 869 | state->page = 0; | |
| 880 | state->page = 0x47; | |
| 881 | state->portT = 0; | |
| 870 | 882 | |
| 871 | 883 | I8035_T_W_AL(0,0); |
| 872 | 884 | I8035_T_W_AL(1,0); |
| 873 | I8035_P1_W(255); | |
| 874 | I8035_P2_W(255); | |
| 885 | I8035_P1_W(0xFF); | |
| 886 | I8035_P2_W(0xFF); | |
| 887 | soundlatch_w(0,0x0F); | |
| 875 | 888 | } |
| 876 | 889 | |
| 890 | static SOUND_RESET( dkongjr ) | |
| 891 | { | |
| 892 | sound_reset_dkong(machine); | |
| 893 | soundlatch_w(0,0x00); | |
| 894 | } | |
| 895 | ||
| 877 | 896 | /**************************************************************** |
| 878 | 897 | * |
| 879 | 898 | * M58817 Speech |
| r1527 | r1528 | |
| 1311 | 1330 | MDRV_CPU_IO_MAP(dkongjr_sound_io_map, 0) |
| 1312 | 1331 | |
| 1313 | 1332 | MDRV_SOUND_START(dkong) |
| 1314 | MDRV_SOUND_RESET(dkong) | |
| 1333 | MDRV_SOUND_RESET(dkongjr) | |
| 1315 | 1334 | |
| 1316 | 1335 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1317 | 1336 |
| r1527 | r1528 | |
|---|---|---|
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | void *seibu_adpcm_start(int clock, const struct CustomSound_interface *config) | |
| 170 | static void *seibu_adpcm_start(int clock, const struct CustomSound_interface *config) | |
| 171 | 171 | { |
| 172 | 172 | int i; |
| 173 | 173 | |
| r1527 | r1528 | |
| 185 | 185 | return NULL; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | void seibu_adpcm_stop(void *token) | |
| 188 | static void seibu_adpcm_stop(void *token) | |
| 189 | 189 | { |
| 190 | 190 | struct seibu_adpcm_state *state = token; |
| 191 | 191 | state->allocated = 0; |
| r1527 | r1528 | |
| 478 | 478 | |
| 479 | 479 | /***************************************************************************/ |
| 480 | 480 | |
| 481 | ADDRESS_MAP_START( seibu_sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 482 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_ROM) | |
| 483 | AM_RANGE(0x2000, 0x27ff) AM_READ(MRA8_RAM) | |
| 484 | AM_RANGE(0x4008, 0x4008) AM_READ(YM3812_status_port_0_r) | |
| 485 | AM_RANGE(0x4010, 0x4011) AM_READ(seibu_soundlatch_r) | |
| 486 | AM_RANGE(0x4012, 0x4012) AM_READ(seibu_main_data_pending_r) | |
| 487 | AM_RANGE(0x4013, 0x4013) AM_READ(input_port_0_r) | |
| 488 | AM_RANGE(0x6000, 0x6000) AM_READ(OKIM6295_status_0_r) | |
| 489 | AM_RANGE(0x8000, 0xffff) AM_READ(MRA8_BANK1) | |
| 490 | ADDRESS_MAP_END | |
| 481 | const struct YM3812interface seibu_ym3812_interface = | |
| 482 | { | |
| 483 | seibu_ym3812_irqhandler | |
| 484 | }; | |
| 491 | 485 | |
| 492 | ADDRESS_MAP_START( seibu_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 493 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_ROM) | |
| 494 | AM_RANGE(0x2000, 0x27ff) AM_WRITE(MWA8_RAM) | |
| 486 | const struct CustomSound_interface seibu_adpcm_interface = | |
| 487 | { | |
| 488 | seibu_adpcm_start, | |
| 489 | seibu_adpcm_stop | |
| 490 | }; | |
| 491 | ||
| 492 | const struct YM2151interface seibu_ym2151_interface = | |
| 493 | { | |
| 494 | seibu_ym2151_irqhandler | |
| 495 | }; | |
| 496 | ||
| 497 | const struct YM2203interface seibu_ym2203_interface = | |
| 498 | { | |
| 499 | 0,0,0,0,seibu_ym2203_irqhandler | |
| 500 | }; | |
| 501 | ||
| 502 | /***************************************************************************/ | |
| 503 | ||
| 504 | ADDRESS_MAP_START( seibu_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 505 | AM_RANGE(0x0000, 0x1fff) AM_ROM | |
| 506 | AM_RANGE(0x2000, 0x27ff) AM_RAM | |
| 495 | 507 | AM_RANGE(0x4000, 0x4000) AM_WRITE(seibu_pending_w) |
| 496 | 508 | AM_RANGE(0x4001, 0x4001) AM_WRITE(seibu_irq_clear_w) |
| 497 | 509 | AM_RANGE(0x4002, 0x4002) AM_WRITE(seibu_rst10_ack_w) |
| 498 | 510 | AM_RANGE(0x4003, 0x4003) AM_WRITE(seibu_rst18_ack_w) |
| 499 | 511 | AM_RANGE(0x4007, 0x4007) AM_WRITE(seibu_bank_w) |
| 500 | AM_RANGE(0x4008, 0x4008) AM_WRITE(YM3812_control_port_0_w) | |
| 512 | AM_RANGE(0x4008, 0x4008) AM_READWRITE(YM3812_status_port_0_r, YM3812_control_port_0_w) | |
| 501 | 513 | AM_RANGE(0x4009, 0x4009) AM_WRITE(YM3812_write_port_0_w) |
| 502 | AM_RANGE(0x4018, 0x4019) AM_WRITE(seibu_main_data_w) | |
| 503 | AM_RANGE(0x401b, 0x401b) AM_WRITE(seibu_coin_w) | |
| 504 | AM_RANGE(0x6000, 0x6000) AM_WRITE(OKIM6295_data_0_w) | |
| 505 | AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM) | |
| 506 | ADDRESS_MAP_END | |
| 507 | ||
| 508 | ADDRESS_MAP_START( seibu2_sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 509 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_ROM) | |
| 510 | AM_RANGE(0x2000, 0x27ff) AM_READ(MRA8_RAM) | |
| 511 | AM_RANGE(0x4009, 0x4009) AM_READ(YM2151_status_port_0_r) | |
| 512 | 514 | AM_RANGE(0x4010, 0x4011) AM_READ(seibu_soundlatch_r) |
| 513 | 515 | AM_RANGE(0x4012, 0x4012) AM_READ(seibu_main_data_pending_r) |
| 514 | 516 | AM_RANGE(0x4013, 0x4013) AM_READ(input_port_0_r) |
| 515 | AM_RANGE(0x6000, 0x6000) AM_READ(OKIM6295_status_0_r) | |
| 516 | AM_RANGE(0x8000, 0xffff) AM_READ(MRA8_BANK1) | |
| 517 | AM_RANGE(0x4018, 0x4019) AM_WRITE(seibu_main_data_w) | |
| 518 | AM_RANGE(0x401b, 0x401b) AM_WRITE(seibu_coin_w) | |
| 519 | AM_RANGE(0x6000, 0x6000) AM_READWRITE(OKIM6295_status_0_r, OKIM6295_data_0_w) | |
| 520 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK(1) | |
| 517 | 521 | ADDRESS_MAP_END |
| 518 | 522 | |
| 519 | ADDRESS_MAP_START( seibu2_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 520 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_ROM) | |
| 521 | AM_RANGE(0x2000, 0x27ff) AM_WRITE(MWA8_RAM) | |
| 523 | ||
| 524 | ADDRESS_MAP_START( seibu2_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 525 | AM_RANGE(0x0000, 0x1fff) AM_ROM | |
| 526 | AM_RANGE(0x2000, 0x27ff) AM_RAM | |
| 522 | 527 | AM_RANGE(0x4000, 0x4000) AM_WRITE(seibu_pending_w) |
| 523 | 528 | AM_RANGE(0x4001, 0x4001) AM_WRITE(seibu_irq_clear_w) |
| 524 | 529 | AM_RANGE(0x4002, 0x4002) AM_WRITE(seibu_rst10_ack_w) |
| 525 | 530 | AM_RANGE(0x4003, 0x4003) AM_WRITE(seibu_rst18_ack_w) |
| 526 | 531 | AM_RANGE(0x4007, 0x4007) AM_WRITE(seibu_bank_w) |
| 527 | 532 | AM_RANGE(0x4008, 0x4008) AM_WRITE(YM2151_register_port_0_w) |
| 528 | AM_RANGE(0x4009, 0x4009) AM_WRITE(YM2151_data_port_0_w) | |
| 529 | AM_RANGE(0x4018, 0x4019) AM_WRITE(seibu_main_data_w) | |
| 530 | AM_RANGE(0x401b, 0x401b) AM_WRITE(seibu_coin_w) | |
| 531 | AM_RANGE(0x6000, 0x6000) AM_WRITE(OKIM6295_data_0_w) | |
| 532 | AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM) | |
| 533 | ADDRESS_MAP_END | |
| 534 | ||
| 535 | ADDRESS_MAP_START( seibu3_sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 536 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_ROM) | |
| 537 | AM_RANGE(0x2000, 0x27ff) AM_READ(MRA8_RAM) | |
| 538 | AM_RANGE(0x4008, 0x4008) AM_READ(YM2203_status_port_0_r) | |
| 539 | AM_RANGE(0x4009, 0x4009) AM_READ(YM2203_read_port_0_r) | |
| 533 | AM_RANGE(0x4009, 0x4009) AM_READWRITE(YM2151_status_port_0_r, YM2151_data_port_0_w) | |
| 540 | 534 | AM_RANGE(0x4010, 0x4011) AM_READ(seibu_soundlatch_r) |
| 541 | 535 | AM_RANGE(0x4012, 0x4012) AM_READ(seibu_main_data_pending_r) |
| 542 | 536 | AM_RANGE(0x4013, 0x4013) AM_READ(input_port_0_r) |
| 543 | AM_RANGE(0x6008, 0x6008) AM_READ(YM2203_status_port_1_r) | |
| 544 | AM_RANGE(0x6009, 0x6009) AM_READ(YM2203_read_port_1_r) | |
| 545 | AM_RANGE(0x8000, 0xffff) AM_READ(MRA8_BANK1) | |
| 537 | AM_RANGE(0x4018, 0x4019) AM_WRITE(seibu_main_data_w) | |
| 538 | AM_RANGE(0x401b, 0x401b) AM_WRITE(seibu_coin_w) | |
| 539 | AM_RANGE(0x6000, 0x6000) AM_READWRITE(OKIM6295_status_0_r, OKIM6295_data_0_w) | |
| 540 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK(1) | |
| 546 | 541 | ADDRESS_MAP_END |
| 547 | 542 | |
| 548 | ADDRESS_MAP_START( seibu3_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 549 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_ROM) | |
| 550 | AM_RANGE(0x2000, 0x27ff) AM_WRITE(MWA8_RAM) | |
| 543 | ||
| 544 | ||
| 545 | ADDRESS_MAP_START( seibu3_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 546 | AM_RANGE(0x0000, 0x1fff) AM_ROM | |
| 547 | AM_RANGE(0x2000, 0x27ff) AM_RAM | |
| 551 | 548 | AM_RANGE(0x4000, 0x4000) AM_WRITE(seibu_pending_w) |
| 552 | 549 | AM_RANGE(0x4001, 0x4001) AM_WRITE(seibu_irq_clear_w) |
| 553 | 550 | AM_RANGE(0x4002, 0x4002) AM_WRITE(seibu_rst10_ack_w) |
| 554 | 551 | AM_RANGE(0x4003, 0x4003) AM_WRITE(seibu_rst18_ack_w) |
| 555 | 552 | AM_RANGE(0x4007, 0x4007) AM_WRITE(seibu_bank_w) |
| 556 | AM_RANGE(0x4008, 0x4008) AM_WRITE(YM2203_control_port_0_w) | |
| 557 | AM_RANGE(0x4009, 0x4009) AM_WRITE(YM2203_write_port_0_w) | |
| 553 | AM_RANGE(0x4008, 0x4008) AM_READWRITE(YM2203_status_port_0_r, YM2203_control_port_0_w) | |
| 554 | AM_RANGE(0x4009, 0x4009) AM_READWRITE(YM2203_read_port_0_r, YM2203_write_port_0_w) | |
| 555 | AM_RANGE(0x4010, 0x4011) AM_READ(seibu_soundlatch_r) | |
| 556 | AM_RANGE(0x4012, 0x4012) AM_READ(seibu_main_data_pending_r) | |
| 557 | AM_RANGE(0x4013, 0x4013) AM_READ(input_port_0_r) | |
| 558 | 558 | AM_RANGE(0x4018, 0x4019) AM_WRITE(seibu_main_data_w) |
| 559 | 559 | AM_RANGE(0x401b, 0x401b) AM_WRITE(seibu_coin_w) |
| 560 | AM_RANGE(0x6008, 0x6008) AM_WRITE(YM2203_control_port_1_w) | |
| 561 | AM_RANGE(0x6009, 0x6009) AM_WRITE(YM2203_write_port_1_w) | |
| 562 | AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM) | |
| 560 | AM_RANGE(0x6008, 0x6008) AM_READWRITE(YM2203_status_port_1_r, YM2203_control_port_1_w) | |
| 561 | AM_RANGE(0x6009, 0x6009) AM_READWRITE(YM2203_read_port_1_r, YM2203_write_port_1_w) | |
| 562 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK(1) | |
| 563 | 563 | ADDRESS_MAP_END |
| 564 | 564 | |
| 565 | ADDRESS_MAP_START( seibu3_adpcm_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 566 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_ROM) | |
| 567 | AM_RANGE(0x2000, 0x27ff) AM_WRITE(MWA8_RAM) | |
| 565 | ADDRESS_MAP_START( seibu3_adpcm_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 566 | AM_RANGE(0x0000, 0x1fff) AM_ROM | |
| 567 | AM_RANGE(0x2000, 0x27ff) AM_RAM | |
| 568 | 568 | AM_RANGE(0x4000, 0x4000) AM_WRITE(seibu_pending_w) |
| 569 | 569 | AM_RANGE(0x4001, 0x4001) AM_WRITE(seibu_irq_clear_w) |
| 570 | 570 | AM_RANGE(0x4002, 0x4002) AM_WRITE(seibu_rst10_ack_w) |
| 571 | 571 | AM_RANGE(0x4003, 0x4003) AM_WRITE(seibu_rst18_ack_w) |
| 572 | 572 | AM_RANGE(0x4005, 0x4006) AM_WRITE(seibu_adpcm_adr_1_w) |
| 573 | 573 | AM_RANGE(0x4007, 0x4007) AM_WRITE(seibu_bank_w) |
| 574 | AM_RANGE(0x4008, 0x4008) AM_WRITE(YM2203_control_port_0_w) | |
| 575 | AM_RANGE(0x4009, 0x4009) AM_WRITE(YM2203_write_port_0_w) | |
| 574 | AM_RANGE(0x4008, 0x4008) AM_READWRITE(YM2203_status_port_0_r, YM2203_control_port_0_w) | |
| 575 | AM_RANGE(0x4009, 0x4009) AM_READWRITE(YM2203_read_port_0_r, YM2203_write_port_0_w) | |
| 576 | AM_RANGE(0x4010, 0x4011) AM_READ(seibu_soundlatch_r) | |
| 577 | AM_RANGE(0x4012, 0x4012) AM_READ(seibu_main_data_pending_r) | |
| 578 | AM_RANGE(0x4013, 0x4013) AM_READ(input_port_0_r) | |
| 576 | 579 | AM_RANGE(0x4018, 0x4019) AM_WRITE(seibu_main_data_w) |
| 577 | 580 | AM_RANGE(0x401a, 0x401a) AM_WRITE(seibu_adpcm_ctl_1_w) |
| 578 | 581 | AM_RANGE(0x401b, 0x401b) AM_WRITE(seibu_coin_w) |
| 579 | 582 | AM_RANGE(0x6005, 0x6006) AM_WRITE(seibu_adpcm_adr_2_w) |
| 580 | AM_RANGE(0x6008, 0x6008) AM_WRITE(YM2203_control_port_1_w) | |
| 581 | AM_RANGE(0x6009, 0x6009) AM_WRITE(YM2203_write_port_1_w) | |
| 583 | AM_RANGE(0x6008, 0x6008) AM_READWRITE(YM2203_status_port_1_r, YM2203_control_port_1_w) | |
| 584 | AM_RANGE(0x6009, 0x6009) AM_READWRITE(YM2203_read_port_1_r, YM2203_write_port_1_w) | |
| 582 | 585 | AM_RANGE(0x601a, 0x601a) AM_WRITE(seibu_adpcm_ctl_2_w) |
| 583 | AM_RANGE(0x8000, 0xffff) AM_ | |
| 586 | AM_RANGE(0x8000, 0xffff) AM_ | |
| 584 | 587 | ADDRESS_MAP_END |
| 585 |
| r1527 | r1528 | |
|---|---|---|
| 29 | 29 | #include "sound/okim6295.h" |
| 30 | 30 | #include "sound/custom.h" |
| 31 | 31 | |
| 32 | ADDRESS_MAP_EXTERN(seibu_sound_readmem); | |
| 33 | ADDRESS_MAP_EXTERN(seibu_sound_writemem); | |
| 34 | ADDRESS_MAP_EXTERN(seibu2_sound_readmem); | |
| 35 | ADDRESS_MAP_EXTERN(seibu2_sound_writemem); | |
| 36 | ADDRESS_MAP_EXTERN(seibu3_sound_readmem); | |
| 37 | ADDRESS_MAP_EXTERN(seibu3_sound_writemem); | |
| 38 | ADDRESS_MAP_EXTERN(seibu3_adpcm_sound_writemem); | |
| 32 | ADDRESS_MAP_EXTERN(seibu_sound_map); | |
| 33 | ADDRESS_MAP_EXTERN(seibu2_sound_map); | |
| 34 | ADDRESS_MAP_EXTERN(seibu3_sound_map); | |
| 35 | ADDRESS_MAP_EXTERN(seibu3_adpcm_sound_map); | |
| 39 | 36 | |
| 40 | 37 | READ16_HANDLER( seibu_main_word_r ); |
| 41 | 38 | READ8_HANDLER( seibu_main_v30_r ); |
| r1527 | r1528 | |
| 59 | 56 | MACHINE_RESET( seibu_sound_2 ); |
| 60 | 57 | void seibu_sound_decrypt(int cpu_region,int length); |
| 61 | 58 | |
| 62 | void *seibu_adpcm_start(int clock, const struct CustomSound_interface *config); | |
| 63 | void seibu_adpcm_stop(void *token); | |
| 64 | 59 | void seibu_adpcm_decrypt(int region); |
| 65 | 60 | WRITE8_HANDLER( seibu_adpcm_adr_1_w ); |
| 66 | 61 | WRITE8_HANDLER( seibu_adpcm_ctl_1_w ); |
| 67 | 62 | WRITE8_HANDLER( seibu_adpcm_adr_2_w ); |
| 68 | 63 | WRITE8_HANDLER( seibu_adpcm_ctl_2_w ); |
| 69 | 64 | |
| 65 | extern const struct YM3812interface seibu_ym3812_interface; | |
| 66 | extern const struct CustomSound_interface seibu_adpcm_interface; | |
| 67 | extern const struct YM2151interface seibu_ym2151_interface; | |
| 68 | extern const struct YM2203interface seibu_ym2203_interface; | |
| 69 | ||
| 70 | 70 | /**************************************************************************/ |
| 71 | 71 | |
| 72 | 72 | #define SEIBU_COIN_INPUTS \ |
| r1527 | r1528 | |
| 74 | 74 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(4) \ |
| 75 | 75 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(4) |
| 76 | 76 | |
| 77 | #define SEIBU_SOUND_SYSTEM_YM3812_HARDWARE \ | |
| 78 | \ | |
| 79 | static const struct YM3812interface ym3812_interface = \ | |
| 80 | { \ | |
| 81 | seibu_ym3812_irqhandler \ | |
| 82 | }; | |
| 83 | 77 | |
| 84 | #define SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE \ | |
| 85 | \ | |
| 86 | static const struct CustomSound_interface adpcm_interface = \ | |
| 87 | { \ | |
| 88 | seibu_adpcm_start, \ | |
| 89 | seibu_adpcm_stop \ | |
| 90 | }; | |
| 91 | ||
| 92 | #define SEIBU_SOUND_SYSTEM_YM2151_HARDWARE \ | |
| 93 | \ | |
| 94 | static const struct YM2151interface ym2151_interface = \ | |
| 95 | { \ | |
| 96 | seibu_ym2151_irqhandler \ | |
| 97 | }; | |
| 98 | ||
| 99 | #define SEIBU_SOUND_SYSTEM_YM2203_HARDWARE \ | |
| 100 | \ | |
| 101 | static const struct YM2203interface ym2203_interface = \ | |
| 102 | { \ | |
| 103 | 0,0,0,0,seibu_ym2203_irqhandler \ | |
| 104 | }; | |
| 105 | ||
| 106 | 78 | #define SEIBU_SOUND_SYSTEM_CPU(freq) \ |
| 107 | 79 | MDRV_CPU_ADD(Z80, freq) \ |
| 108 | /* audio CPU */ \ | |
| 109 | MDRV_CPU_PROGRAM_MAP(seibu_sound_readmem,seibu_sound_writemem) \ | |
| 80 | MDRV_CPU_PROGRAM_MAP(seibu_sound_map,0) \ | |
| 110 | 81 | |
| 111 | 82 | #define SEIBU2_SOUND_SYSTEM_CPU(freq) \ |
| 112 | 83 | MDRV_CPU_ADD(Z80, freq) \ |
| 113 | /* audio CPU */ \ | |
| 114 | MDRV_CPU_PROGRAM_MAP(seibu2_sound_readmem,seibu2_sound_writemem) \ | |
| 84 | MDRV_CPU_PROGRAM_MAP(seibu2_sound_map,0) \ | |
| 115 | 85 | |
| 116 | 86 | #define SEIBU3_SOUND_SYSTEM_CPU(freq) \ |
| 117 | 87 | MDRV_CPU_ADD(Z80, freq) \ |
| 118 | /* audio CPU */ \ | |
| 119 | MDRV_CPU_PROGRAM_MAP(seibu3_sound_readmem,seibu3_sound_writemem) \ | |
| 88 | MDRV_CPU_PROGRAM_MAP(seibu3_sound_map,0) \ | |
| 120 | 89 | |
| 121 | 90 | #define SEIBU3A_SOUND_SYSTEM_CPU(freq) \ |
| 122 | 91 | MDRV_CPU_ADD(Z80, freq) \ |
| 123 | /* audio CPU */ \ | |
| 124 | MDRV_CPU_PROGRAM_MAP(seibu3_sound_readmem,seibu3_adpcm_sound_writemem) \ | |
| 92 | MDRV_CPU_PROGRAM_MAP(seibu3_adpcm_sound_map,0) \ | |
| 125 | 93 | |
| 126 | 94 | #define SEIBU_SOUND_SYSTEM_YM3812_INTERFACE(freq1,freq2,region) \ |
| 127 | 95 | MDRV_SPEAKER_STANDARD_MONO("mono") \ |
| 128 | 96 | \ |
| 129 | 97 | MDRV_SOUND_ADD(YM3812, freq1) \ |
| 130 | MDRV_SOUND_CONFIG(ym3812_interface) | |
| 98 | MDRV_SOUND_CONFIG(seibu_ym3812_interface) | |
| 131 | 99 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) \ |
| 132 | 100 | \ |
| 133 | 101 | MDRV_SOUND_ADD(OKIM6295, freq2) \ |
| r1527 | r1528 | |
| 138 | 106 | MDRV_SPEAKER_STANDARD_MONO("mono") \ |
| 139 | 107 | \ |
| 140 | 108 | MDRV_SOUND_ADD(YM3812, freq1) \ |
| 141 | MDRV_SOUND_CONFIG(ym3812_interface) | |
| 109 | MDRV_SOUND_CONFIG(seibu_ym3812_interface) | |
| 142 | 110 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) \ |
| 143 | 111 | \ |
| 144 | 112 | MDRV_SOUND_ADD(OKIM6295, freq2) \ |
| 145 | MDRV_SOUND_CONFIG(okim6295_interface_region_##region##_pin7high) | |
| 113 | MDRV_SOUND_CONFIG(okim6295_interface_region_##region##_pin7high) | |
| 146 | 114 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) \ |
| 147 | 115 | |
| 148 | 116 | #define SEIBU_SOUND_SYSTEM_YM2151_INTERFACE(freq1,freq2,region) \ |
| 149 | 117 | MDRV_SPEAKER_STANDARD_MONO("mono") \ |
| 150 | 118 | \ |
| 151 | 119 | MDRV_SOUND_ADD(YM2151, freq1) \ |
| 152 | MDRV_SOUND_CONFIG(ym2151_interface) | |
| 120 | MDRV_SOUND_CONFIG(seibu_ym2151_interface) | |
| 153 | 121 | MDRV_SOUND_ROUTE(0, "mono", 0.50) \ |
| 154 | 122 | MDRV_SOUND_ROUTE(1, "mono", 0.50) \ |
| 155 | 123 | \ |
| r1527 | r1528 | |
| 161 | 129 | MDRV_SPEAKER_STANDARD_MONO("mono") \ |
| 162 | 130 | \ |
| 163 | 131 | MDRV_SOUND_ADD(YM2203, freq) \ |
| 164 | MDRV_SOUND_CONFIG(ym2203_interface) | |
| 132 | MDRV_SOUND_CONFIG(seibu_ym2203_interface) | |
| 165 | 133 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) \ |
| 166 | 134 | \ |
| 167 | 135 | MDRV_SOUND_ADD(YM2203, freq) \ |
| r1527 | r1528 | |
| 169 | 137 | |
| 170 | 138 | #define SEIBU_SOUND_SYSTEM_ADPCM_INTERFACE \ |
| 171 | 139 | MDRV_SOUND_ADD(CUSTOM, 8000) \ |
| 172 | MDRV_SOUND_CONFIG(adpcm_interface) | |
| 140 | MDRV_SOUND_CONFIG(seibu_adpcm_interface) | |
| 173 | 141 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) \ |
| 174 | 142 | \ |
| 175 | 143 | MDRV_SOUND_ADD(CUSTOM, 8000) \ |
| 176 | MDRV_SOUND_CONFIG(adpcm_interface) | |
| 144 | MDRV_SOUND_CONFIG(seibu_adpcm_interface) | |
| 177 | 145 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) \ |
| 178 | 146 | |
| 179 | 147 |
| r1527 | r1528 | |
|---|---|---|
| 821 | 821 | MACHINE_DRIVER_START( monsterb_sound_board ) |
| 822 | 822 | |
| 823 | 823 | /* basic machine hardware */ |
| 824 | MDRV_CPU_ADD(N7751, 6000000 | |
| 824 | MDRV_CPU_ADD(N7751, 6000000 | |
| 825 | 825 | MDRV_CPU_PROGRAM_MAP(monsterb_7751_map,0) |
| 826 | 826 | MDRV_CPU_IO_MAP(monsterb_7751_portmap,0) |
| 827 | 827 |
| r1527 | r1528 | |
|---|---|---|
| 189 | 189 | ****************************************************************************/ |
| 190 | 190 | |
| 191 | 191 | MACHINE_DRIVER_START( williams_cvsd_sound ) |
| 192 | MDRV_CPU_ADD_TAG("cvsd", M6809E, CVSD_MASTER_CLOCK | |
| 192 | MDRV_CPU_ADD_TAG("cvsd", M6809E, CVSD_MASTER_CLOCK | |
| 193 | 193 | MDRV_CPU_PROGRAM_MAP(williams_cvsd_map,0) |
| 194 | 194 | |
| 195 | 195 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r1527 | r1528 | |
| 207 | 207 | |
| 208 | 208 | |
| 209 | 209 | MACHINE_DRIVER_START( williams_narc_sound ) |
| 210 | MDRV_CPU_ADD_TAG("narc1", M6809E, NARC_MASTER_CLOCK | |
| 210 | MDRV_CPU_ADD_TAG("narc1", M6809E, NARC_MASTER_CLOCK | |
| 211 | 211 | MDRV_CPU_PROGRAM_MAP(williams_narc_master_map,0) |
| 212 | 212 | |
| 213 | MDRV_CPU_ADD_TAG("narc2", M6809E, NARC_MASTER_CLOCK | |
| 213 | MDRV_CPU_ADD_TAG("narc2", M6809E, NARC_MASTER_CLOCK | |
| 214 | 214 | MDRV_CPU_PROGRAM_MAP(williams_narc_slave_map,0) |
| 215 | 215 | |
| 216 | 216 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| r1527 | r1528 | |
| 235 | 235 | |
| 236 | 236 | |
| 237 | 237 | MACHINE_DRIVER_START( williams_adpcm_sound ) |
| 238 | MDRV_CPU_ADD_TAG("adpcm", M6809E, ADPCM_MASTER_CLOCK | |
| 238 | MDRV_CPU_ADD_TAG("adpcm", M6809E, ADPCM_MASTER_CLOCK | |
| 239 | 239 | MDRV_CPU_PROGRAM_MAP(williams_adpcm_map,0) |
| 240 | 240 | |
| 241 | 241 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r1527 | r1528 | |
|---|---|---|
| 370 | 370 | |
| 371 | 371 | static WRITE8_HANDLER( ad2083_tms5110_ctrl_w ) |
| 372 | 372 | { |
| 373 | int tbl[8] = {0,4,2,6,1,5,3,7}; | |
| 373 | static const int tbl[8] = {0,4,2,6,1,5,3,7}; | |
| 374 | 374 | |
| 375 | 375 | speech_rom_bit = tbl[data & 0x07]; |
| 376 | 376 | switch (data>>3) |
| r1527 | r1528 | |
|---|---|---|
| 12 | 12 | * |
| 13 | 13 | ****************************************************************/ |
| 14 | 14 | |
| 15 | #define USE_8039 (0) /* set to 1 to try 8039 hack */ | |
| 16 | ||
| 15 | 17 | #define ACTIVELOW_PORT_BIT(P,A,D) ((P & (~(1 << A))) | ((D ^ 1) << A)) |
| 16 | 18 | #define ACTIVEHIGH_PORT_BIT(P,A,D) ((P & (~(1 << A))) | (D << A)) |
| 17 | 19 | |
| r1527 | r1528 | |
| 216 | 218 | * Just a 1:n amplifier without filters and no output capacitor |
| 217 | 219 | */ |
| 218 | 220 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 * 3 ) |
| 219 | DISCRETE_WAVELOG2(DS_SOUND7_INV, 32767/5, NODE_110, 32767/5) | |
| 220 | 221 | |
| 221 | 222 | DISCRETE_SOUND_END |
| 222 | 223 | |
| r1527 | r1528 | |
| 229 | 230 | static SOUND_START( mario ) |
| 230 | 231 | { |
| 231 | 232 | mario_state *state = machine->driver_data; |
| 233 | #if USE_8039 | |
| 234 | UINT8 *SND = memory_region(REGION_CPU2); | |
| 232 | 235 | |
| 236 | SND[1] = 0x01; | |
| 237 | #endif | |
| 238 | ||
| 233 | 239 | state_save_register_global(state->last); |
| 234 | 240 | state_save_register_global(state->portT); |
| 235 | soundlatch_clear_w(0,0); | |
| 236 | soundlatch2_clear_w(0,0); | |
| 237 | soundlatch3_clear_w(0,0); | |
| 238 | soundlatch4_clear_w(0,0); | |
| 239 | /* | |
| 240 | * The code below will play the correct start up sound | |
| 241 | * However, it is not backed by hardware at all. | |
| 242 | */ | |
| 243 | //soundlatch_w(0,2); | |
| 244 | 241 | } |
| 245 | 242 | |
| 246 | 243 | static SOUND_RESET( mario ) |
| 247 | 244 | { |
| 248 | 245 | mario_state *state = machine->driver_data; |
| 249 | 246 | |
| 247 | soundlatch_clear_w(0,0); | |
| 248 | soundlatch2_clear_w(0,0); | |
| 249 | soundlatch3_clear_w(0,0); | |
| 250 | soundlatch4_clear_w(0,0); | |
| 251 | I8035_P1_W(0x00); /* Input port */ | |
| 252 | I8035_P2_W(0xff); /* Port is in high impedance state after reset */ | |
| 253 | ||
| 250 | 254 | state->last = 0; |
| 251 | 255 | } |
| 252 | 256 | |
| r1527 | r1528 | |
| 263 | 267 | |
| 264 | 268 | static READ8_HANDLER( mario_sh_p2_r ) |
| 265 | 269 | { |
| 266 | return I8035_P2_R() & 0xE | |
| 270 | return I8035_P2_R() & 0xEF; /* Bit 4 connected to GND! */ | |
| 267 | 271 | } |
| 268 | 272 | |
| 269 | 273 | static READ8_HANDLER( mario_sh_t0_r ) |
| r1527 | r1528 | |
| 276 | 280 | return I8035_T_R(1); |
| 277 | 281 | } |
| 278 | 282 | |
| 283 | static READ8_HANDLER( mario_sh_ea_r ) | |
| 284 | { | |
| 285 | #if USE_8039 | |
| 286 | return 1; | |
| 287 | #else | |
| 288 | int p2 = (I8035_P2_R() >> 5) & 1; | |
| 289 | return p2 ^ 1; | |
| 290 | #endif | |
| 291 | } | |
| 292 | ||
| 279 | 293 | static READ8_HANDLER( mario_sh_tune_r ) |
| 280 | 294 | { |
| 281 | 295 | UINT8 *SND = memory_region(REGION_CPU2); |
| r1527 | r1528 | |
| 392 | 406 | AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(mario_sh_p2_r, mario_sh_p2_w) |
| 393 | 407 | AM_RANGE(I8039_t0, I8039_t0) AM_READ(mario_sh_t0_r) |
| 394 | 408 | AM_RANGE(I8039_t1, I8039_t1) AM_READ(mario_sh_t1_r) |
| 409 | AM_RANGE(I8039_ea, I8039_ea) AM_READ(mario_sh_ea_r) /* only for documentation purposes right now */ | |
| 395 | 410 | ADDRESS_MAP_END |
| 396 | 411 | |
| 397 | 412 | static ADDRESS_MAP_START( masao_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r1527 | r1528 | |
| 421 | 436 | |
| 422 | 437 | MACHINE_DRIVER_START( mario_audio ) |
| 423 | 438 | |
| 439 | #if USE_8039 | |
| 424 | 440 | MDRV_CPU_ADD(I8039, I8035_CLOCK) /* audio CPU */ /* 730 kHz */ |
| 441 | #else | |
| 442 | MDRV_CPU_ADD(M58715, I8035_CLOCK) /* audio CPU */ /* 730 kHz */ | |
| 443 | #endif | |
| 425 | 444 | MDRV_CPU_PROGRAM_MAP(mario_sound_map, 0) |
| 426 | 445 | MDRV_CPU_IO_MAP(mario_sound_io_map, 0) |
| 427 | 446 |
| r1527 | r1528 | |
|---|---|---|
| 1956 | 1956 | /* calculate how long until we generate an interrupt */ |
| 1957 | 1957 | |
| 1958 | 1958 | /* frequency the time per each bit sent */ |
| 1959 | attotime sample_period = attotime_mul(ATTOTIME_IN_HZ( | |
| 1959 | attotime sample_period = attotime_mul(ATTOTIME_IN_HZ( | |
| 1960 | 1960 | |
| 1961 | 1961 | /* now put it down to samples, so we know what the channel frequency has to be */ |
| 1962 | 1962 | sample_period = attotime_mul(sample_period, 16 * dcs.channels); |
| r1527 | r1528 | |
|---|---|---|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /* determine the effective clock rate */ |
| 66 | clock = ( | |
| 66 | clock = ( | |
| 67 | 67 | step = (clock << 12) / OUTPUT_RATE; |
| 68 | 68 | |
| 69 | 69 | /* determine the volume */ |
| r1527 | r1528 | |
|---|---|---|
| 5 | 5 | *************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "rescap.h" | |
| 8 | 9 | #include "streams.h" |
| 9 | 10 | #include "cpu/m6502/m6502.h" |
| 10 | 11 | #include "machine/6821pia.h" |
| 11 | 12 | #include "sound/hc55516.h" |
| 12 | 13 | #include "sound/5220intf.h" |
| 13 | #include "sound/discrete.h" | |
| 14 | #include "exidy.h" | |
| 14 | #include "sound/s14001a.h" | |
| 15 | #include "sound/custom.h" | |
| 16 | #include "berzerk.h" | |
| 15 | 17 | |
| 16 | 18 | |
| 17 | 19 | |
| r1527 | r1528 | |
| 21 | 23 | * |
| 22 | 24 | *************************************/ |
| 23 | 25 | |
| 24 | #define CRYSTAL_OSC (3579545) | |
| 25 | #define SH8253_CLOCK (CRYSTAL_OSC/2) | |
| 26 | #define SH6840_CLOCK (CRYSTAL_OSC/4) | |
| 27 | #define SH6532_CLOCK (CRYSTAL_OSC/4) | |
| 28 | #define CVSD_CLOCK_FREQ (1.0 / (0.693 * (RES_K(2.4) + 2.0 * RES_K(20)) * CAP_P(2200))) | |
| 29 | #define BASE_VOLUME (32767 / 6) | |
| 26 | #define CRYSTAL_OSC (XTAL_3_579545MHz) | |
| 27 | #define SH8253_CLOCK (CRYSTAL_OSC/2) | |
| 28 | #define SH6840_CLOCK (CRYSTAL_OSC/4) | |
| 29 | #define SH6532_CLOCK (CRYSTAL_OSC/4) | |
| 30 | #define CVSD_CLOCK_FREQ (1.0 / (0.693 * (RES_K(2.4) + 2.0 * RES_K(20)) * CAP_P(2200))) | |
| 31 | #define BASE_VOLUME (32767 / 6) | |
| 30 | 32 | |
| 31 | 33 | enum |
| 32 | 34 | { |
| r1527 | r1528 | |
| 43 | 45 | * |
| 44 | 46 | *************************************/ |
| 45 | 47 | |
| 46 | /* IRQ variables */ | |
| 47 | static UINT8 pia_irq_state; | |
| 48 | /* IRQ variable */ | |
| 48 | 49 | static UINT8 riot_irq_state; |
| 49 | 50 | |
| 50 | 51 | /* 6532 variables */ |
| r1527 | r1528 | |
| 87 | 88 | static UINT32 sh6840_LFSR_3 = 0xffffffff;/* ditto */ |
| 88 | 89 | static UINT32 sh6840_clocks_per_sample; |
| 89 | 90 | static UINT32 sh6840_clock_count; |
| 91 | ||
| 90 | 92 | static UINT8 exidy_sfxctrl; |
| 91 | 93 | |
| 92 | 94 | /* 8253 variables */ |
| r1527 | r1528 | |
| 113 | 115 | |
| 114 | 116 | /************************************* |
| 115 | 117 | * |
| 116 | * | |
| 118 | * | |
| 117 | 119 | * |
| 118 | 120 | *************************************/ |
| 119 | 121 | |
| 120 | static void exidy_irq(int state); | |
| 121 | ||
| 122 | WRITE8_HANDLER(victory_sound_response_w); | |
| 123 | WRITE8_HANDLER(victory_sound_irq_clear_w); | |
| 124 | WRITE8_HANDLER(victory_main_ack_w); | |
| 125 | ||
| 126 | /* PIA 0 */ | |
| 127 | static const pia6821_interface pia_0_intf = | |
| 122 | static void update_irq_state(/* unused */ int state) | |
| 128 | 123 | { |
| 129 | /*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0, | |
| 130 | /*outputs: A/B,CA/B2 */ pia_1_portb_w, pia_1_porta_w, pia_1_cb1_w, pia_1_ca1_w, | |
| 131 | /*irqs : A/B */ 0, 0 | |
| 132 | }; | |
| 133 | ||
| 134 | /* PIA 1 */ | |
| 135 | static const pia6821_interface pia_1_intf = | |
| 136 | { | |
| 137 | /*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0, | |
| 138 | /*outputs: A/B,CA/B2 */ pia_0_portb_w, pia_0_porta_w, pia_0_cb1_w, pia_0_ca1_w, | |
| 139 | /*irqs : A/B */ 0, exidy_irq | |
| 140 | }; | |
| 141 | ||
| 142 | /* Victory PIA 0 */ | |
| 143 | static const pia6821_interface victory_pia_0_intf = | |
| 144 | { | |
| 145 | /*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0, | |
| 146 | /*outputs: A/B,CA/B2 */ 0, victory_sound_response_w, victory_sound_irq_clear_w, victory_main_ack_w, | |
| 147 | /*irqs : A/B */ 0, exidy_irq | |
| 148 | }; | |
| 149 | ||
| 150 | ||
| 151 | ||
| 152 | /************************************* | |
| 153 | * | |
| 154 | * Interrupt generation helpers | |
| 155 | * | |
| 156 | *************************************/ | |
| 157 | ||
| 158 | INLINE void update_irq_state(void) | |
| 159 | { | |
| 160 | cpunum_set_input_line(1, M6502_IRQ_LINE, (pia_irq_state | riot_irq_state) ? ASSERT_LINE : CLEAR_LINE); | |
| 124 | cpunum_set_input_line(1, M6502_IRQ_LINE, (pia_get_irq_b(1) | riot_irq_state) ? ASSERT_LINE : CLEAR_LINE); | |
| 161 | 125 | } |
| 162 | 126 | |
| 163 | 127 | |
| 164 | static void exidy_irq(int state) | |
| 165 | { | |
| 166 | pia_irq_state = state; | |
| 167 | update_irq_state(); | |
| 168 | } | |
| 169 | 128 | |
| 170 | ||
| 171 | ||
| 172 | 129 | /************************************* |
| 173 | 130 | * |
| 174 | 131 | * 6840 clock counting helper |
| r1527 | r1528 | |
| 390 | 347 | |
| 391 | 348 | static TIMER_CALLBACK( riot_interrupt ); |
| 392 | 349 | |
| 393 | static void *common_start( | |
| 350 | static void *common_sh_start( | |
| 394 | 351 | { |
| 395 | 352 | int sample_rate = SH8253_CLOCK; |
| 396 | 353 | int i; |
| 397 | 354 | |
| 355 | has_sh8253 = _has_sh8253; | |
| 356 | has_tms5220 = _has_tms5220; | |
| 357 | ||
| 398 | 358 | /* determine which sound hardware is installed */ |
| 399 | 359 | has_hc55516 = FALSE; |
| 400 | has_tms5220 = FALSE; | |
| 401 | 360 | for (i = 0; i < MAX_SOUND; i++) |
| 402 | 361 | { |
| 403 | if (Machine->drv->sound[i].type == SOUND_TMS5220) | |
| 404 | has_tms5220 = TRUE; | |
| 405 | 362 | if (Machine->drv->sound[i].type == SOUND_HC55516) |
| 406 | 363 | has_hc55516 = TRUE; |
| 407 | 364 | } |
| r1527 | r1528 | |
| 409 | 366 | /* allocate the stream */ |
| 410 | 367 | exidy_stream = stream_create(0, 1, sample_rate, NULL, exidy_stream_update); |
| 411 | 368 | |
| 412 | /* Init PIA */ | |
| 369 | /* 6532 */ | |
| 370 | riot_timer = timer_alloc(riot_interrupt, NULL); | |
| 371 | ||
| 372 | /* 6840 */ | |
| 373 | sh6840_clocks_per_sample = (int)((double)SH6840_CLOCK / (double)sample_rate * (double)(1 << 24)); | |
| 374 | ||
| 375 | /* 8253 */ | |
| 376 | freq_to_step = (double)(1 << 24) / (double)sample_rate; | |
| 377 | ||
| 378 | return auto_malloc(1); | |
| 379 | } | |
| 380 | ||
| 381 | ||
| 382 | ||
| 383 | /************************************* | |
| 384 | * | |
| 385 | * Sound reset routines | |
| 386 | * | |
| 387 | *************************************/ | |
| 388 | ||
| 389 | static void common_sh_reset(void) | |
| 390 | { | |
| 391 | /* PIA */ | |
| 413 | 392 | pia_reset(); |
| 414 | 393 | |
| 415 | /* | |
| 394 | /* | |
| 416 | 395 | sh6840_LFSR_oldxor = 0; |
| 417 | 396 | sh6840_LFSR_0 = 0xffffffff; |
| 418 | 397 | sh6840_LFSR_1 = 0xffffffff; |
| 419 | 398 | sh6840_LFSR_2 = 0xffffffff; |
| 420 | 399 | sh6840_LFSR_3 = 0xffffffff; |
| 421 | 400 | |
| 422 | /* Init 6532 */ | |
| 423 | riot_timer = timer_alloc(riot_interrupt, NULL); | |
| 424 | riot_irq_flag = 0; | |
| 425 | riot_timer_irq_enable = 0; | |
| 401 | /* 6532 */ | |
| 402 | riot_irq_flag = 0; | |
| 403 | riot_timer_irq_enable = 0; | |
| 426 | 404 | riot_porta_data = 0xff; |
| 427 | 405 | riot_portb_data = 0xff; |
| 428 | riot_clock_divisor = 1; | |
| 429 | riot_state = RIOT_IDLE; | |
| 406 | riot_clock_divisor = 1; | |
| 407 | riot_state = RIOT_IDLE; | |
| 430 | 408 | |
| 431 | /* | |
| 409 | /* | |
| 432 | 410 | memset(sh6840_timer, 0, sizeof(sh6840_timer)); |
| 433 | sh6840_clocks_per_sample = (int)((double)SH6840_CLOCK / (double)sample_rate * (double)(1 << 24)); | |
| 434 | 411 | sh6840_MSB = 0; |
| 435 | 412 | sh6840_volume[0] = 0; |
| 436 | 413 | sh6840_volume[1] = 0; |
| 437 | 414 | sh6840_volume[2] = 0; |
| 438 | 415 | exidy_sfxctrl = 0; |
| 439 | 416 | |
| 440 | /* | |
| 417 | /* | |
| 441 | 418 | memset(sh8253_timer, 0, sizeof(sh8253_timer)); |
| 442 | freq_to_step = (double)(1 << 24) / (double)sample_rate; | |
| 443 | ||
| 444 | return auto_malloc(1); | |
| 445 | 419 | } |
| 446 | 420 | |
| 447 | 421 | |
| 448 | void *exidy_sh_start(int clock, const struct CustomSound_interface *config) | |
| 449 | { | |
| 450 | /* Init PIA */ | |
| 451 | pia_config(0, &pia_0_intf); | |
| 452 | pia_config(1, &pia_1_intf); | |
| 453 | has_sh8253 = TRUE; | |
| 454 | return common_start(); | |
| 455 | } | |
| 456 | 422 | |
| 457 | ||
| 458 | void *victory_sh_start(int clock, const struct CustomSound_interface *config) | |
| 459 | { | |
| 460 | /* Init PIA */ | |
| 461 | pia_config(0, &victory_pia_0_intf); | |
| 462 | pia_0_cb1_w(0, 1); | |
| 463 | has_sh8253 = TRUE; | |
| 464 | return common_start(); | |
| 465 | } | |
| 466 | ||
| 467 | ||
| 468 | void *berzerk_sh_start(int clock, const struct CustomSound_interface *config) | |
| 469 | { | |
| 470 | has_sh8253 = FALSE; | |
| 471 | return common_start(); | |
| 472 | } | |
| 473 | ||
| 474 | ||
| 475 | ||
| 476 | 423 | /************************************* |
| 477 | 424 | * |
| 478 | 425 | * 6532 RIOT timer callback |
| r1527 | r1528 | |
| 487 | 434 | /* generate the IRQ */ |
| 488 | 435 | riot_irq_flag |= 0x80; |
| 489 | 436 | riot_irq_state = riot_timer_irq_enable; |
| 490 | update_irq_state(); | |
| 437 | update_irq_state(0); | |
| 491 | 438 | |
| 492 | 439 | /* now start counting clock cycles down */ |
| 493 | 440 | riot_state = RIOT_POST_COUNT; |
| r1527 | r1528 | |
| 510 | 457 | * |
| 511 | 458 | *************************************/ |
| 512 | 459 | |
| 513 | WRITE8_HANDLER( exidy_shriot_w ) | |
| 460 | static WRITE8_HANDLER( exidy_shriot_w ) | |
| 514 | 461 | { |
| 515 | /* mask to the low 7 bits */ | |
| 516 | offset &= 0x7f; | |
| 517 | ||
| 518 | 462 | /* I/O is done if A2 == 0 */ |
| 519 | 463 | if ((offset & 0x04) == 0) |
| 520 | 464 | { |
| r1527 | r1528 | |
| 568 | 512 | if (riot_state != RIOT_COUNT) |
| 569 | 513 | riot_irq_flag &= ~0x80; |
| 570 | 514 | riot_irq_state = 0; |
| 571 | update_irq_state(); | |
| 515 | update_irq_state(0); | |
| 572 | 516 | |
| 573 | 517 | /* set the enable from the offset */ |
| 574 | riot_timer_irq_enable = offset & 0x08; | |
| 518 | riot_timer_irq_enable = (offset & 0x08) ? 1 : 0; | |
| 575 | 519 | |
| 576 | 520 | /* set a new timer */ |
| 577 | 521 | riot_clock_divisor = divisors[offset & 0x03]; |
| r1527 | r1528 | |
| 588 | 532 | * |
| 589 | 533 | *************************************/ |
| 590 | 534 | |
| 591 | READ8_HANDLER( exidy_shriot_r ) | |
| 535 | static READ8_HANDLER( exidy_shriot_r ) | |
| 592 | 536 | { |
| 593 | /* mask to the low 7 bits */ | |
| 594 | offset &= 0x7f; | |
| 595 | ||
| 596 | 537 | /* I/O is done if A2 == 0 */ |
| 597 | 538 | if ((offset & 0x04) == 0) |
| 598 | 539 | { |
| r1527 | r1528 | |
| 624 | 565 | int temp = riot_irq_flag; |
| 625 | 566 | riot_irq_flag = 0; |
| 626 | 567 | riot_irq_state = 0; |
| 627 | update_irq_state(); | |
| 568 | update_irq_state(0); | |
| 628 | 569 | return temp; |
| 629 | 570 | } |
| 630 | 571 | |
| r1527 | r1528 | |
| 660 | 601 | * |
| 661 | 602 | *************************************/ |
| 662 | 603 | |
| 663 | WRITE8_HANDLER( exidy_sh8253_w ) | |
| 604 | static WRITE8_HANDLER( exidy_sh8253_w ) | |
| 664 | 605 | { |
| 665 | 606 | int chan; |
| 666 | 607 | |
| 667 | 608 | stream_update(exidy_stream); |
| 668 | 609 | |
| 669 | offset &= 3; | |
| 670 | 610 | switch (offset) |
| 671 | 611 | { |
| 672 | 612 | case 0: |
| r1527 | r1528 | |
| 697 | 637 | } |
| 698 | 638 | |
| 699 | 639 | |
| 700 | READ8_HANDLER( exidy_sh8253_r ) | |
| 640 | static READ8_HANDLER( exidy_sh8253_r ) | |
| 701 | 641 | { |
| 702 | logerror("8253(R): %x\n",offset); | |
| 642 | logerror("8253(R): %x\n",offset); | |
| 643 | ||
| 703 | 644 | return 0; |
| 704 | 645 | } |
| 705 | 646 | |
| r1527 | r1528 | |
| 711 | 652 | * |
| 712 | 653 | *************************************/ |
| 713 | 654 | |
| 714 | READ8_HANDLER( exidy_sh6840_r ) | |
| 655 | static READ8_HANDLER( exidy_sh6840_r ) | |
| 715 | 656 | { |
| 716 | 657 | fatalerror("exidy_sh6840_r - unexpected read"); |
| 717 | return 0; | |
| 658 | ||
| 659 | return 0; | |
| 718 | 660 | } |
| 719 | 661 | |
| 720 | 662 | |
| 721 | WRITE8_HANDLER( exidy_sh6840_w ) | |
| 663 | static WRITE8_HANDLER( exidy_sh6840_w ) | |
| 722 | 664 | { |
| 723 | 665 | /* force an update of the stream */ |
| 724 | 666 | stream_update(exidy_stream); |
| 725 | 667 | |
| 726 | /* only look at the low 3 bits */ | |
| 727 | offset &= 7; | |
| 728 | 668 | switch (offset) |
| 729 | 669 | { |
| 730 | 670 | /* offset 0 writes to either channel 0 control or channel 2 control */ |
| r1527 | r1528 | |
| 780 | 720 | * |
| 781 | 721 | *************************************/ |
| 782 | 722 | |
| 783 | WRITE8_HANDLER( exidy_sfxctrl_w ) | |
| 723 | static WRITE8_HANDLER( exidy_sfxctrl_w ) | |
| 784 | 724 | { |
| 785 | 725 | stream_update(exidy_stream); |
| 786 | 726 | |
| 787 | offset &= 3; | |
| 788 | 727 | switch (offset) |
| 789 | 728 | { |
| 790 | 729 | case 0: |
| r1527 | r1528 | |
| 816 | 755 | |
| 817 | 756 | /************************************* |
| 818 | 757 | * |
| 758 | * Venture, etc. | |
| 759 | * | |
| 760 | *************************************/ | |
| 761 | ||
| 762 | static const pia6821_interface venture_pia_0_intf = | |
| 763 | { | |
| 764 | /*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0, | |
| 765 | /*outputs: A/B,CA/B2 */ pia_1_portb_w, pia_1_porta_w, pia_1_cb1_w, pia_1_ca1_w, | |
| 766 | /*irqs : A/B */ 0, 0 | |
| 767 | }; | |
| 768 | ||
| 769 | ||
| 770 | static const pia6821_interface venture_pia_1_intf = | |
| 771 | { | |
| 772 | /*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0, | |
| 773 | /*outputs: A/B,CA/B2 */ pia_0_portb_w, pia_0_porta_w, pia_0_cb1_w, pia_0_ca1_w, | |
| 774 | /*irqs : A/B */ 0, update_irq_state | |
| 775 | }; | |
| 776 | ||
| 777 | ||
| 778 | static void *venture_sh_start(int clock, const struct CustomSound_interface *config) | |
| 779 | { | |
| 780 | pia_config(0, &venture_pia_0_intf); | |
| 781 | pia_config(1, &venture_pia_1_intf); | |
| 782 | ||
| 783 | return common_sh_start(TRUE, FALSE); | |
| 784 | } | |
| 785 | ||
| 786 | ||
| 787 | static void venture_sh_reset(void *token) | |
| 788 | { | |
| 789 | common_sh_reset(); | |
| 790 | } | |
| 791 | ||
| 792 | ||
| 793 | static const struct CustomSound_interface venture_custom_interface = | |
| 794 | { | |
| 795 | venture_sh_start, | |
| 796 | 0, | |
| 797 | venture_sh_reset | |
| 798 | }; | |
| 799 | ||
| 800 | ||
| 801 | static ADDRESS_MAP_START( venture_audio_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 802 | ADDRESS_MAP_FLAGS( AMEF_ABITS(15) ) | |
| 803 | AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0780) AM_RAM | |
| 804 | AM_RANGE(0x0800, 0x087f) AM_MIRROR(0x0780) AM_READWRITE(exidy_shriot_r, exidy_shriot_w) | |
| 805 | AM_RANGE(0x1000, 0x1003) AM_MIRROR(0x07fc) AM_READWRITE(pia_1_r, pia_1_w) | |
| 806 | AM_RANGE(0x1800, 0x1803) AM_MIRROR(0x07fc) AM_READWRITE(exidy_sh8253_r, exidy_sh8253_w) | |
| 807 | AM_RANGE(0x2000, 0x27ff) AM_WRITE(exidy_sound_filter_w) | |
| 808 | AM_RANGE(0x2800, 0x2807) AM_MIRROR(0x07f8) AM_READWRITE(exidy_sh6840_r, exidy_sh6840_w) | |
| 809 | AM_RANGE(0x3000, 0x3003) AM_MIRROR(0x07fc) AM_WRITE(exidy_sfxctrl_w) | |
| 810 | AM_RANGE(0x5800, 0x7fff) AM_ROM | |
| 811 | ADDRESS_MAP_END | |
| 812 | ||
| 813 | ||
| 814 | MACHINE_DRIVER_START( venture_audio ) | |
| 815 | ||
| 816 | MDRV_CPU_ADD(M6502, 3579545/4) | |
| 817 | MDRV_CPU_PROGRAM_MAP(venture_audio_map,0) | |
| 818 | ||
| 819 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 820 | ||
| 821 | MDRV_SOUND_ADD(CUSTOM, 0) | |
| 822 | MDRV_SOUND_CONFIG(venture_custom_interface) | |
| 823 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 824 | MACHINE_DRIVER_END | |
| 825 | ||
| 826 | ||
| 827 | ||
| 828 | /************************************* | |
| 829 | * | |
| 819 | 830 | * CVSD sound for Mouse Trap |
| 820 | 831 | * |
| 821 | 832 | *************************************/ |
| 822 | 833 | |
| 823 | WRITE8_HANDLER( mtrap_voiceio_w ) | |
| 834 | static WRITE8_HANDLER( mtrap_voiceio_w ) | |
| 824 | 835 | { |
| 825 | if (!(offset & 0x10)) | |
| 826 | { | |
| 827 | hc55516_digit_clock_clear_w(0,data); | |
| 828 | hc55516_clock_set_w(0,data); | |
| 836 | if (!(offset & 0x10)) | |
| 837 | { | |
| 838 | hc55516_digit_clock_clear_w(0,data); | |
| 839 | hc55516_clock_set_w(0,data); | |
| 829 | 840 | } |
| 830 | if (!(offset & 0x20)) | |
| 841 | ||
| 842 | if (!(offset & 0x20)) | |
| 831 | 843 | riot_portb_data = data & 1; |
| 832 | 844 | } |
| 833 | 845 | |
| 834 | 846 | |
| 835 | READ8_HANDLER( mtrap_voiceio_r ) | |
| 847 | static READ8_HANDLER( mtrap_voiceio_r ) | |
| 836 | 848 | { |
| 837 | 849 | if (!(offset & 0x80)) |
| 838 | 850 | { |
| 839 | int data = (riot_porta_data & 0x06) >> 1; | |
| 840 | data |= (riot_porta_data & 0x01) << 2; | |
| 841 | data |= (riot_porta_data & 0x08); | |
| 842 | return data; | |
| 851 | int data = (riot_porta_data & 0x06) >> 1; | |
| 852 | data |= (riot_porta_data & 0x01) << 2; | |
| 853 | data |= (riot_porta_data & 0x08); | |
| 854 | ||
| 855 | return data; | |
| 843 | 856 | } |
| 844 | if (!(offset & 0x40)) | |
| 845 | { | |
| 846 | attotime curtime = timer_get_time(); | |
| 847 | int clock_pulse = curtime.attoseconds / HZ_TO_ATTOSECONDS(2 * CVSD_CLOCK_FREQ); | |
| 848 | return (clock_pulse & 1) << 7; | |
| 857 | ||
| 858 | if (!(offset & 0x40)) | |
| 859 | { | |
| 860 | attotime curtime = timer_get_time(); | |
| 861 | int clock_pulse = curtime.attoseconds / HZ_TO_ATTOSECONDS(2 * CVSD_CLOCK_FREQ); | |
| 862 | ||
| 863 | return (clock_pulse & 1) << 7; | |
| 849 | 864 | } |
| 850 | 865 | return 0; |
| 851 | 866 | } |
| 867 | ||
| 868 | ||
| 869 | static ADDRESS_MAP_START( cvsd_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 870 | ADDRESS_MAP_FLAGS( AMEF_ABITS(14) ) | |
| 871 | AM_RANGE(0x0000, 0x3fff) AM_ROM | |
| 872 | ADDRESS_MAP_END | |
| 873 | ||
| 874 | ||
| 875 | static ADDRESS_MAP_START( cvsd_iomap, ADDRESS_SPACE_IO, 8 ) | |
| 876 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 877 | AM_RANGE(0x00, 0xff) AM_READWRITE(mtrap_voiceio_r, mtrap_voiceio_w) | |
| 878 | ADDRESS_MAP_END | |
| 879 | ||
| 880 | ||
| 881 | MACHINE_DRIVER_START( mtrap_cvsd_audio ) | |
| 882 | ||
| 883 | MDRV_CPU_ADD(Z80, 3579545/2) | |
| 884 | MDRV_CPU_PROGRAM_MAP(cvsd_map,0) | |
| 885 | MDRV_CPU_IO_MAP(cvsd_iomap,0) | |
| 886 | ||
| 887 | /* audio hardware */ | |
| 888 | MDRV_SOUND_ADD(HC55516, 0) | |
| 889 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) | |
| 890 | MACHINE_DRIVER_END | |
| 891 | ||
| 892 | ||
| 893 | ||
| 894 | /************************************* | |
| 895 | * | |
| 896 | * Victory | |
| 897 | * | |
| 898 | *************************************/ | |
| 899 | ||
| 900 | #define VICTORY_AUDIO_CPU_CLOCK (XTAL_3_579545MHz / 4) | |
| 901 | #define VICTORY_LOG_SOUND 0 | |
| 902 | ||
| 903 | ||
| 904 | static UINT8 victory_sound_response_ack_clk; /* 7474 @ F4 */ | |
| 905 | ||
| 906 | ||
| 907 | READ8_HANDLER( victory_sound_response_r ) | |
| 908 | { | |
| 909 | UINT8 ret = pia_get_output_b(1); | |
| 910 | ||
| 911 | if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound response read = %02X\n", activecpu_get_previouspc(), ret); | |
| 912 | ||
| 913 | pia_set_input_cb1(1, 0); | |
| 914 | ||
| 915 | return ret; | |
| 916 | } | |
| 917 | ||
| 918 | ||
| 919 | READ8_HANDLER( victory_sound_status_r ) | |
| 920 | { | |
| 921 | UINT8 ret = (pia_get_input_ca1(1) << 7) | (pia_get_input_cb1(1) << 6); | |
| 922 | ||
| 923 | if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound status read = %02X\n", activecpu_get_previouspc(), ret); | |
| 924 | ||
| 925 | return ret; | |
| 926 | } | |
| 927 | ||
| 928 | ||
| 929 | static TIMER_CALLBACK( delayed_command_w ) | |
| 930 | { | |
| 931 | pia_set_input_a(1, param, 0); | |
| 932 | pia_set_input_ca1(1, 0); | |
| 933 | } | |
| 934 | ||
| 935 | WRITE8_HANDLER( victory_sound_command_w ) | |
| 936 | { | |
| 937 | if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound command = %02X\n", activecpu_get_previouspc(), data); | |
| 938 | ||
| 939 | timer_call_after_resynch(NULL, data, delayed_command_w); | |
| 940 | } | |
| 941 | ||
| 942 | ||
| 943 | static WRITE8_HANDLER( victory_sound_irq_clear_w ) | |
| 944 | { | |
| 945 | if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound IRQ clear = %02X\n", activecpu_get_previouspc(), data); | |
| 946 | ||
| 947 | if (!data) pia_set_input_ca1(1, 1); | |
| 948 | } | |
| 949 | ||
| 950 | ||
| 951 | static WRITE8_HANDLER( victory_main_ack_w ) | |
| 952 | { | |
| 953 | if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound Main ACK W = %02X\n", activecpu_get_previouspc(), data); | |
| 954 | ||
| 955 | if (victory_sound_response_ack_clk && !data) | |
| 956 | pia_set_input_cb1(1, 1); | |
| 957 | ||
| 958 | victory_sound_response_ack_clk = data; | |
| 959 | } | |
| 960 | ||
| 961 | ||
| 962 | static const pia6821_interface victory_pia_e5_intf = | |
| 963 | { | |
| 964 | /*inputs : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0, | |
| 965 | /*outputs: A/B,CA/B2 */ 0, 0, victory_sound_irq_clear_w, victory_main_ack_w, | |
| 966 | /*irqs : A/B */ 0, update_irq_state | |
| 967 | }; | |
| 968 | ||
| 969 | ||
| 970 | static void *victory_sh_start(int clock, const struct CustomSound_interface *config) | |
| 971 | { | |
| 972 | pia_config(1, &victory_pia_e5_intf); | |
| 973 | ||
| 974 | state_save_register_global(victory_sound_response_ack_clk); | |
| 975 | ||
| 976 | return common_sh_start(TRUE, TRUE); | |
| 977 | } | |
| 978 | ||
| 979 | ||
| 980 | static void victory_sh_reset(void *token) | |
| 981 | { | |
| 982 | common_sh_reset(); | |
| 983 | ||
| 984 | /* the flip-flop @ F4 is reset */ | |
| 985 | victory_sound_response_ack_clk = 0; | |
| 986 | pia_set_input_cb1(1, 1); | |
| 987 | ||
| 988 | /* these two lines shouldn't be needed, but it avoids the log entry | |
| 989 | as the sound CPU checks port A before the main CPU ever writes to it */ | |
| 990 | pia_set_input_a(1, 0, 0); | |
| 991 | pia_set_input_ca1(1, 1); | |
| 992 | } | |
| 993 | ||
| 994 | ||
| 995 | static const struct CustomSound_interface victory_custom_interface = | |
| 996 | { | |
| 997 | victory_sh_start, | |
| 998 | 0, | |
| 999 | victory_sh_reset, | |
| 1000 | }; | |
| 1001 | ||
| 1002 | ||
| 1003 | static ADDRESS_MAP_START( victory_audio_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1004 | AM_RANGE(0x0000, 0x00ff) AM_MIRROR(0x0f00) AM_RAM | |
| 1005 | AM_RANGE(0x1000, 0x107f) AM_MIRROR(0x0f80) AM_READWRITE(exidy_shriot_r, exidy_shriot_w) | |
| 1006 | AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x0ffc) AM_READWRITE(pia_1_r, pia_1_w) | |
| 1007 | AM_RANGE(0x3000, 0x3003) AM_MIRROR(0x0ffc) AM_READWRITE(exidy_sh8253_r, exidy_sh8253_w) | |
| 1008 | AM_RANGE(0x4000, 0x4fff) AM_NOP | |
| 1009 | AM_RANGE(0x5000, 0x5007) AM_MIRROR(0x0ff8) AM_READWRITE(exidy_sh6840_r, exidy_sh6840_w) | |
| 1010 | AM_RANGE(0x6000, 0x6003) AM_MIRROR(0x0ffc) AM_WRITE(exidy_sfxctrl_w) | |
| 1011 | AM_RANGE(0x7000, 0xafff) AM_NOP | |
| 1012 | AM_RANGE(0xb000, 0xffff) AM_ROM | |
| 1013 | ADDRESS_MAP_END | |
| 1014 | ||
| 1015 | ||
| 1016 | MACHINE_DRIVER_START( victory_audio ) | |
| 1017 | ||
| 1018 | MDRV_CPU_ADD(M6502, VICTORY_AUDIO_CPU_CLOCK) | |
| 1019 | MDRV_CPU_PROGRAM_MAP(victory_audio_map,0) | |
| 1020 | ||
| 1021 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1022 | ||
| 1023 | MDRV_SOUND_ADD(CUSTOM, 0) | |
| 1024 | MDRV_SOUND_CONFIG(victory_custom_interface) | |
| 1025 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 1026 | ||
| 1027 | MDRV_SOUND_ADD(TMS5220, 640000) | |
| 1028 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 1029 | MACHINE_DRIVER_END | |
| 1030 | ||
| 1031 | ||
| 1032 | ||
| 1033 | /************************************* | |
| 1034 | * | |
| 1035 | * Berzerk | |
| 1036 | * | |
| 1037 | * Copyright Alex Judd 1997/98 | |
| 1038 | * V1.1 for Mame 0.31 13March98 | |
| 1039 | * | |
| 1040 | *************************************/ | |
| 1041 | ||
| 1042 | #define BERZERK_S14001A_CLOCK (BERZERK_MASTER_CLOCK / 2) | |
| 1043 | ||
| 1044 | ||
| 1045 | static void *berzerk_sh_start(int clock, const struct CustomSound_interface *config) | |
| 1046 | { | |
| 1047 | return common_sh_start(FALSE, FALSE); | |
| 1048 | } | |
| 1049 | ||
| 1050 | ||
| 1051 | static void berzerk_sh_reset(void *token) | |
| 1052 | { | |
| 1053 | common_sh_reset(); | |
| 1054 | } | |
| 1055 | ||
| 1056 | ||
| 1057 | static const struct S14001A_interface berzerk_s14001a_interface = | |
| 1058 | { | |
| 1059 | REGION_SOUND1 /* voice data region */ | |
| 1060 | }; | |
| 1061 | ||
| 1062 | ||
| 1063 | static const struct CustomSound_interface berzerk_custom_interface = | |
| 1064 | { | |
| 1065 | berzerk_sh_start, | |
| 1066 | 0, | |
| 1067 | berzerk_sh_reset, | |
| 1068 | }; | |
| 1069 | ||
| 1070 | ||
| 1071 | MACHINE_DRIVER_START( berzerk_audio ) | |
| 1072 | ||
| 1073 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1074 | ||
| 1075 | MDRV_SOUND_ADD(S14001A, BERZERK_S14001A_CLOCK) /* CPU clock divided by 16 divided by a programmable TTL setup */ | |
| 1076 | MDRV_SOUND_CONFIG(berzerk_s14001a_interface) | |
| 1077 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 1078 | ||
| 1079 | MDRV_SOUND_ADD(CUSTOM, 0) | |
| 1080 | MDRV_SOUND_CONFIG(berzerk_custom_interface) | |
| 1081 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 1082 | MACHINE_DRIVER_END | |
| 1083 | ||
| 1084 | ||
| 1085 | WRITE8_HANDLER( berzerk_audio_w ) | |
| 1086 | { | |
| 1087 | switch (offset) | |
| 1088 | { | |
| 1089 | /* offsets 0-3, 5 and 7 write to the 6840 */ | |
| 1090 | case 0: | |
| 1091 | case 1: | |
| 1092 | case 2: | |
| 1093 | case 3: | |
| 1094 | case 5: | |
| 1095 | case 7: | |
| 1096 | exidy_sh6840_w(offset, data); | |
| 1097 | break; | |
| 1098 | ||
| 1099 | /* offset 6 writes to the sfxcontrol latch */ | |
| 1100 | case 6: | |
| 1101 | exidy_sfxctrl_w(data >> 6, data); | |
| 1102 | break; | |
| 1103 | ||
| 1104 | /* offset 4 writes to the S14001A */ | |
| 1105 | case 4: | |
| 1106 | if ((data & 0xc0) == 0x40) /* VSU-1000 control write */ | |
| 1107 | { | |
| 1108 | /* volume and frequency control goes here */ | |
| 1109 | /* mame_printf_debug("TODO: VSU-1000 Control write (ignored for now)\n");*/ | |
| 1110 | S14001A_set_volume(((data&0x38)>>3)+1); | |
| 1111 | S14001A_set_rate((16-(data&0x07))*16); /* second LS161 has load triggered by its own TC(when it equals 16) long before the first ls161 will TC and fire again, so effectively it only divides by 15 and not 16. If the clock, as opposed to the E enable, had been tied to the first LS161's TC instead, it would divide by 16 as expected */ | |
| 1112 | } | |
| 1113 | else if ((data & 0xc0) != 0x00) | |
| 1114 | { | |
| 1115 | /* vsu-1000 ignores these writes entirely */ | |
| 1116 | mame_printf_debug("bogus write ignored\n"); | |
| 1117 | } | |
| 1118 | else | |
| 1119 | { | |
| 1120 | /* select word input */ | |
| 1121 | if (S14001A_bsy_0_r()) /* skip if busy... */ | |
| 1122 | { | |
| 1123 | mame_printf_debug("S14001A busy, ignoring write\n"); | |
| 1124 | break; | |
| 1125 | } | |
| 1126 | ||
| 1127 | /* write to the register */ | |
| 1128 | S14001A_reg_0_w(data & 0x3f); | |
| 1129 | S14001A_rst_0_w(1); | |
| 1130 | S14001A_rst_0_w(0); | |
| 1131 | } | |
| 1132 | break; | |
| 1133 | } | |
| 1134 | } | |
| 1135 | ||
| 1136 | ||
| 1137 | READ8_HANDLER( berzerk_audio_r ) | |
| 1138 | { | |
| 1139 | return ((offset == 4) && !S14001A_bsy_0_r()) ? 0x40 : 0x00; | |
| 1140 | } |
| r1527 | r1528 | |
|---|---|---|
| 1 | 1 | /************************************************************************* |
| 2 | 2 | |
| 3 | | |
| 3 | Targ | |
| 4 | 4 | |
| 5 | 5 | *************************************************************************/ |
| 6 | 6 | |
| r1527 | r1528 | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | #include "driver.h" |
| 15 | #include "exidy.h" | |
| 16 | 15 | #include "sound/samples.h" |
| 17 | 16 | #include "sound/dac.h" |
| 17 | #include "targ.h" | |
| 18 | 18 | |
| 19 | UINT8 targ_spec_flag; | |
| 20 | static UINT8 targ_sh_ctrl0=0; | |
| 21 | static UINT8 targ_sh_ctrl1=0; | |
| 22 | static UINT8 tone_active; | |
| 23 | 19 | |
| 24 | #define MAXFREQ_A_TARG 125000 | |
| 25 | #define MAXFREQ_A_SPECTAR 525000 | |
| 26 | 20 | |
| 27 | static int sound_a_freq; | |
| 21 | #define SPECTAR_MAXFREQ 525000 | |
| 22 | #define TARG_MAXFREQ 125000 | |
| 23 | ||
| 24 | ||
| 25 | static int max_freq; | |
| 26 | ||
| 27 | static UINT8 port_1_last; | |
| 28 | static UINT8 port_2_last; | |
| 29 | ||
| 30 | static UINT8 tone_freq; | |
| 31 | static UINT8 tone_active; | |
| 28 | 32 | static UINT8 tone_pointer; |
| 29 | static UINT8 tone_offset; | |
| 30 | 33 | |
| 31 | static const UINT8 tone_prom[32] = | |
| 32 | { | |
| 33 | 0xE5,0xE5,0xED,0xED,0xE5,0xE5,0xED,0xED,0xE7,0xE7,0xEF,0xEF,0xE7,0xE7,0xEF,0xEF, | |
| 34 | 0xC1,0xE1,0xC9,0xE9,0xC5,0xE5,0xCD,0xED,0xC3,0xE3,0xCB,0xEB,0xC7,0xE7,0xCF,0xEF | |
| 35 | }; | |
| 36 | 34 | |
| 37 | /* waveforms for the audio hardware */ | |
| 38 | static const INT16 waveform1[32] = | |
| 35 | static const INT16 sine_wave[32] = | |
| 39 | 36 | { |
| 40 | /* sine-wave */ | |
| 41 | 0x0F0F, 0x0F0F, 0x0F0F, 0x0606, 0x0606, 0x0909, 0x0909, 0x0606, 0x0606, 0x0909, 0x0606, 0x0D0D, 0x0F0F, 0x0F0F, 0x0D0D, 0x0000, | |
| 42 | -0x191A, -0x2122, -0x1E1F, -0x191A, -0x1314, -0x191A, -0x1819, -0x1819, -0x1819, -0x1314, -0x1314, -0x1314, -0x1819, -0x1E1F, -0x1E1F, -0x1819 | |
| 37 | 0x0f0f, 0x0f0f, 0x0f0f, 0x0606, 0x0606, 0x0909, 0x0909, 0x0606, 0x0606, 0x0909, 0x0606, 0x0d0d, 0x0f0f, 0x0f0f, 0x0d0d, 0x0000, | |
| 38 | -0x191a, -0x2122, -0x1e1f, -0x191a, -0x1314, -0x191a, -0x1819, -0x1819, -0x1819, -0x1314, -0x1314, -0x1314, -0x1819, -0x1e1f, -0x1e1f, -0x1819 | |
| 43 | 39 | }; |
| 44 | 40 | |
| 41 | ||
| 45 | 42 | /* some macros to make detecting bit changes easier */ |
| 46 | #define RISING_EDGE(bit) ((data & bit) && !(targ_sh_ctrl0 & bit)) | |
| 47 | #define FALLING_EDGE(bit) (!(data & bit) && (targ_sh_ctrl0 & bit)) | |
| 43 | #define RISING_EDGE(bit) ( (data & bit) && !(port_1_last & bit)) | |
| 44 | #define FALLING_EDGE(bit) (!(data & bit) && (port_1_last & bit)) | |
| 48 | 45 | |
| 49 | 46 | |
| 50 | static void targ_tone_generator(int data) | |
| 47 | ||
| 48 | static void adjust_sample(UINT8 freq) | |
| 51 | 49 | { |
| 52 | | |
| 50 | | |
| 53 | 51 | |
| 52 | if ((tone_freq == 0xff) || (tone_freq == 0x00)) | |
| 53 | sample_set_volume(3, 0); | |
| 54 | else | |
| 55 | { | |
| 56 | sample_set_freq(3, 1.0 * max_freq / (0xff - tone_freq)); | |
| 57 | sample_set_volume(3, tone_active); | |
| 58 | } | |
| 59 | } | |
| 54 | 60 | |
| 55 | if (targ_spec_flag) maxfreq = MAXFREQ_A_TARG; | |
| 56 | else maxfreq = MAXFREQ_A_SPECTAR; | |
| 57 | 61 | |
| 58 | sound_a_freq = data; | |
| 59 | if (sound_a_freq == 0xFF || sound_a_freq == 0x00) | |
| 62 | WRITE8_HANDLER( targ_audio_1_w ) | |
| 63 | { | |
| 64 | /* CPU music */ | |
| 65 | if ((data & 0x01) != (port_1_last & 0x01)) | |
| 66 | DAC_data_w(0,(data & 0x01) * 0xff); | |
| 67 | ||
| 68 | /* shot */ | |
| 69 | if (FALLING_EDGE(0x02) && !sample_playing(0)) sample_start(0,1,0); | |
| 70 | if (RISING_EDGE(0x02)) sample_stop(0); | |
| 71 | ||
| 72 | /* crash */ | |
| 73 | if (RISING_EDGE(0x20)) | |
| 60 | 74 | { |
| 61 | sample_set_volume(3,0); | |
| 62 | } | |
| 63 | else | |
| 75 | if (data & 0x40) | |
| 76 | sample_start(1,2,0); | |
| 77 | else | |
| 78 | sample_start(1,0,0); | |
| 79 | } | |
| 80 | ||
| 81 | /* Sspec */ | |
| 82 | if (data & 0x10) | |
| 83 | sample_stop(2); | |
| 84 | else | |
| 64 | 85 | { |
| 65 | sample_set_freq(3,maxfreq/(0xFF-sound_a_freq)); | |
| 66 | sample_set_volume(3,tone_active*1.0); | |
| 86 | if ((data & 0x08) != (port_1_last & 0x08)) | |
| 87 | { | |
| 88 | if (data & 0x08) | |
| 89 | sample_start(2,3,1); | |
| 90 | else | |
| 91 | sample_start(2,4,1); | |
| 92 | } | |
| 67 | 93 | } |
| 94 | ||
| 95 | /* Game (tone generator enable) */ | |
| 96 | if (FALLING_EDGE(0x80)) | |
| 97 | { | |
| 98 | tone_pointer = 0; | |
| 99 | tone_active = 0; | |
| 100 | ||
| 101 | adjust_sample(tone_freq); | |
| 102 | } | |
| 103 | ||
| 104 | if (RISING_EDGE(0x80)) | |
| 105 | tone_active=1; | |
| 106 | ||
| 107 | port_1_last = data; | |
| 68 | 108 | } |
| 69 | 109 | |
| 70 | void targ_sh_start(void) | |
| 110 | ||
| 111 | WRITE8_HANDLER( targ_audio_2_w ) | |
| 71 | 112 | { |
| 72 | tone_pointer=0; | |
| 73 | tone_offset=0; | |
| 74 | tone_active=0; | |
| 75 | sound_a_freq = 0x00; | |
| 76 | sample_set_volume(3,0); | |
| 77 | sample_start_raw(3,waveform1,32,1000,1); | |
| 113 | if ((data & 0x01) && !(port_2_last & 0x01)) | |
| 114 | { | |
| 115 | UINT8 *prom = memory_region(TARG_TONE_REGION); | |
| 116 | ||
| 117 | tone_pointer = (tone_pointer + 1) & 0x0f; | |
| 118 | ||
| 119 | adjust_sample(prom[((data & 0x02) << 3) | tone_pointer]); | |
| 120 | } | |
| 121 | ||
| 122 | port_2_last = data; | |
| 78 | 123 | } |
| 79 | 124 | |
| 80 | WRITE8_HANDLER( targ_sh_w ) | |
| 125 | ||
| 126 | WRITE8_HANDLER( spectar_audio_2_w ) | |
| 81 | 127 | { |
| 82 | int maxfreq; | |
| 128 | adjust_sample(data); | |
| 129 | } | |
| 83 | 130 | |
| 84 | 131 | |
| 85 | if (targ_spec_flag) maxfreq = MAXFREQ_A_TARG; | |
| 86 | else maxfreq = MAXFREQ_A_SPECTAR; | |
| 132 | static const char *const sample_names[] = | |
| 133 | { | |
| 134 | "*targ", | |
| 135 | "expl.wav", | |
| 136 | "shot.wav", | |
| 137 | "sexpl.wav", | |
| 138 | "spslow.wav", | |
| 139 | "spfast.wav", | |
| 140 | 0 | |
| 141 | }; | |
| 87 | 142 | |
| 88 | if (offset) { | |
| 89 | if (targ_spec_flag) { | |
| 90 | if (data & 0x02) | |
| 91 | tone_offset=16; | |
| 92 | else | |
| 93 | tone_offset=0; | |
| 94 | 143 | |
| 95 | if ((data & 0x01) && !(targ_sh_ctrl1 & 0x01)) { | |
| 96 | tone_pointer++; | |
| 97 | if (tone_pointer > 15) tone_pointer = 0; | |
| 98 | targ_tone_generator(tone_prom[tone_pointer+tone_offset]); | |
| 99 | } | |
| 100 | } | |
| 101 | else { | |
| 102 | targ_tone_generator(data); | |
| 103 | } | |
| 104 | targ_sh_ctrl1=data; | |
| 105 | } | |
| 106 | else | |
| 107 | { | |
| 108 | /* cpu music */ | |
| 109 | if ((data & 0x01) != (targ_sh_ctrl0 & 0x01)) { | |
| 110 | DAC_data_w(0,(data & 0x01) * 0xFF); | |
| 111 | } | |
| 112 | /* Shoot */ | |
| 113 | if FALLING_EDGE(0x02) { | |
| 114 | if (!sample_playing(0)) sample_start(0,1,0); | |
| 115 | } | |
| 116 | if RISING_EDGE(0x02) { | |
| 117 | sample_stop(0); | |
| 118 | } | |
| 144 | static void common_audio_start(int freq) | |
| 145 | { | |
| 146 | max_freq = freq; | |
| 119 | 147 | |
| 120 | /* Crash */ | |
| 121 | if RISING_EDGE(0x20) { | |
| 122 | if (data & 0x40) { | |
| 123 | sample_start(1,2,0); } | |
| 124 | else { | |
| 125 | sample_start(1,0,0); } | |
| 126 | } | |
| 148 | tone_freq = 0; | |
| 149 | tone_active = 0; | |
| 127 | 150 | |
| 128 | /* Sspec */ | |
| 129 | if (data & 0x10) { | |
| 130 | sample_stop(2); | |
| 131 | } | |
| 132 | else { | |
| 133 | if ((data & 0x08) != (targ_sh_ctrl0 & 0x08)) { | |
| 134 | if (data & 0x08) { | |
| 135 | sample_start(2,3,1); } | |
| 136 | else { | |
| 137 | sample_start(2,4,1); } | |
| 138 | } | |
| 139 | } | |
| 151 | sample_set_volume(3, 0); | |
| 152 | sample_start_raw(3, sine_wave, 32, 1000, 1); | |
| 140 | 153 | |
| 141 | /* Game (tone generator enable) */ | |
| 142 | if FALLING_EDGE(0x80) { | |
| 143 | tone_pointer=0; | |
| 144 | tone_active=0; | |
| 145 | if (sound_a_freq == 0xFF || sound_a_freq == 0x00) | |
| 146 | { | |
| 147 | sample_set_volume(3,0); | |
| 148 | } | |
| 149 | else | |
| 150 | { | |
| 151 | sample_set_freq(3,maxfreq/(0xFF-sound_a_freq)); | |
| 152 | sample_set_volume(3,0); | |
| 153 | } | |
| 154 | } | |
| 155 | if RISING_EDGE(0x80) { | |
| 156 | tone_active=1; | |
| 157 | } | |
| 158 | targ_sh_ctrl0 = data; | |
| 159 | } | |
| 154 | state_save_register_global(port_1_last); | |
| 155 | state_save_register_global(port_2_last); | |
| 156 | state_save_register_global(tone_freq); | |
| 157 | state_save_register_global(tone_active); | |
| 160 | 158 | } |
| 161 | 159 | |
| 160 | ||
| 161 | static void spectar_audio_start(void) | |
| 162 | { | |
| 163 | common_audio_start(SPECTAR_MAXFREQ); | |
| 164 | } | |
| 165 | ||
| 166 | ||
| 167 | static void targ_audio_start(void) | |
| 168 | { | |
| 169 | common_audio_start(TARG_MAXFREQ); | |
| 170 | ||
| 171 | tone_pointer = 0; | |
| 172 | ||
| 173 | state_save_register_global(tone_pointer); | |
| 174 | } | |
| 175 | ||
| 176 | ||
| 177 | static const struct Samplesinterface spectar_samples_interface = | |
| 178 | { | |
| 179 | 4, /* number of channel */ | |
| 180 | sample_names, | |
| 181 | spectar_audio_start | |
| 182 | }; | |
| 183 | ||
| 184 | ||
| 185 | static const struct Samplesinterface targ_samples_interface = | |
| 186 | { | |
| 187 | 4, /* number of channel */ | |
| 188 | sample_names, | |
| 189 | targ_audio_start | |
| 190 | }; | |
| 191 | ||
| 192 | ||
| 193 | MACHINE_DRIVER_START( spectar_audio ) | |
| 194 | ||
| 195 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 196 | ||
| 197 | MDRV_SOUND_ADD(SAMPLES, 0) | |
| 198 | MDRV_SOUND_CONFIG(spectar_samples_interface) | |
| 199 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 200 | ||
| 201 | MDRV_SOUND_ADD(DAC, 0) | |
| 202 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 203 | MACHINE_DRIVER_END | |
| 204 | ||
| 205 | ||
| 206 | MACHINE_DRIVER_START( targ_audio ) | |
| 207 | ||
| 208 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 209 | ||
| 210 | MDRV_SOUND_ADD(SAMPLES, 0) | |
| 211 | MDRV_SOUND_CONFIG(targ_samples_interface) | |
| 212 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 213 | ||
| 214 | MDRV_SOUND_ADD(DAC, 0) | |
| 215 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 216 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
|---|---|---|
| 538 | 538 | MACHINE_DRIVER_START( asic65 ) |
| 539 | 539 | |
| 540 | 540 | /* ASIC65 */ |
| 541 | MDRV_CPU_ADD_TAG("asic65", TMS32010, 20000000 | |
| 541 | MDRV_CPU_ADD_TAG("asic65", TMS32010, 20000000 | |
| 542 | 542 | MDRV_CPU_PROGRAM_MAP(asic65_program_map,0) |
| 543 | 543 | MDRV_CPU_IO_MAP(asic65_io_map,0) |
| 544 | 544 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
|---|---|---|
| 155 | 155 | { |
| 156 | 156 | /* catch the case where they clear this memory location at PC $1827 and change */ |
| 157 | 157 | /* the value written to be a 1 */ |
| 158 | if ( | |
| 158 | if ( | |
| 159 | 159 | *alleymas_kludge_mem = 1; |
| 160 | 160 | else |
| 161 | 161 | *alleymas_kludge_mem = data; |
| r1527 | r1528 | |
|---|---|---|
| 1110 | 1110 | #if 0 |
| 1111 | 1111 | // resolves CPU deadlocks caused by sloppy coding(see driver\namcos1.c) |
| 1112 | 1112 | { |
| 1113 | UINT8 target[8] = {0x34,0x37,0x35,0x37,0x96,0x00,0x2e,0xed}; | |
| 1113 | static const UINT8 target[8] = {0x34,0x37,0x35,0x37,0x96,0x00,0x2e,0xed}; | |
| 1114 | 1114 | UINT8 *rombase, *srcptr, *endptr, *scanptr; |
| 1115 | 1115 | |
| 1116 | 1116 | rombase = memory_region(REGION_USER1); |
| r1527 | r1528 | |
|---|---|---|
| 33 | 33 | *************************************/ |
| 34 | 34 | |
| 35 | 35 | /* 715909 Hz for NTSC, 709379 for PAL */ |
| 36 | #define O2_CLOCK ( | |
| 36 | #define O2_CLOCK ( | |
| 37 | 37 | |
| 38 | 38 | /* How many CPU cycles we delay until we fire a pending interrupt */ |
| 39 | 39 | #define AMIGA_IRQ_DELAY_CYCLES 24 |
| r1527 | r1528 | |
| 443 | 443 | * |
| 444 | 444 | *************************************/ |
| 445 | 445 | |
| 446 | UINT | |
| 446 | CUSTOM_INPUT( | |
| 447 | 447 | { |
| 448 | 448 | UINT8 bits = readinputportbytag(param); |
| 449 | 449 | int up = (bits >> 0) & 1; |
| r1527 | r1528 | |
| 1137 | 1137 | |
| 1138 | 1138 | static void custom_reset(void) |
| 1139 | 1139 | { |
| 1140 | int clock = | |
| 1140 | int clock = | |
| 1141 | 1141 | UINT16 vidmode = (clock == AMIGA_68000_NTSC_CLOCK || clock == AMIGA_68EC020_NTSC_CLOCK ) ? 0x1000 : 0x0000; /* NTSC or PAL? */ |
| 1142 | 1142 | |
| 1143 | 1143 | CUSTOM_REG(REG_DDFSTRT) = 0x18; |
| r1527 | r1528 | |
| 1512 | 1512 | attotime amiga_get_serial_char_period(void) |
| 1513 | 1513 | { |
| 1514 | 1514 | UINT32 divisor = (CUSTOM_REG(REG_SERPER) & 0x7fff) + 1; |
| 1515 | UINT32 baud = | |
| 1515 | UINT32 baud = | |
| 1516 | 1516 | UINT32 numbits = 2 + ((CUSTOM_REG(REG_SERPER) & 0x8000) ? 9 : 8); |
| 1517 | 1517 | return attotime_mul(ATTOTIME_IN_HZ(baud), numbits); |
| 1518 | 1518 | } |
| r1527 | r1528 | |
|---|---|---|
| 160 | 160 | WRITE16_HANDLER( midxunit_unknown_w ) |
| 161 | 161 | { |
| 162 | 162 | int offs = offset / 0x40000; |
| 163 | ||
| 164 | if (offs == 1 && ACCESSING_LSB) | |
| 165 | dcs_reset_w(data & 2); | |
| 166 | ||
| 163 | 167 | if (ACCESSING_LSB && offset % 0x40000 == 0) |
| 164 | 168 | logerror("%08X:midxunit_unknown_w @ %d = %02X\n", activecpu_get_pc(), offs, data & 0xff); |
| 165 | 169 | } |
| 166 | 170 | |
| 167 | 171 | |
| 172 | ||
| 168 | 173 | /************************************* |
| 169 | 174 | * |
| 170 | 175 | * General I/O reads |
| r1527 | r1528 | |
| 246 | 251 | { |
| 247 | 252 | /* only signal if not in loopback state */ |
| 248 | 253 | if (uart[1] != 0x66) |
| 249 | cpunum_set_input_line( | |
| 254 | cpunum_set_input_line(0, 1, state ? ASSERT_LINE : CLEAR_LINE); | |
| 250 | 255 | } |
| 251 | 256 | |
| 252 | 257 |
| r1527 | r1528 | |
|---|---|---|
| 15 | 15 | #include "cpu/z80/z80daisy.h" |
| 16 | 16 | #include "mcr.h" |
| 17 | 17 | |
| 18 | #define VERBOSE | |
| 18 | #define VERBOSE | |
| 19 | 19 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 20 | 20 | |
| 21 | 21 | |
| r1527 | r1528 | |
| 267 | 267 | MACHINE_START( mcr ) |
| 268 | 268 | { |
| 269 | 269 | /* initialize the CTC */ |
| 270 | ctc_intf.baseclock = | |
| 270 | ctc_intf.baseclock = | |
| 271 | 271 | z80ctc_init(0, &ctc_intf); |
| 272 | 272 | |
| 273 | 273 | state_save_register_global(mcr_cocktail_flip); |
| r1527 | r1528 | |
| 277 | 277 | MACHINE_START( nflfoot ) |
| 278 | 278 | { |
| 279 | 279 | /* initialize the CTC */ |
| 280 | ctc_intf.baseclock = | |
| 280 | ctc_intf.baseclock = | |
| 281 | 281 | z80ctc_init(0, &ctc_intf); |
| 282 | 282 | |
| 283 | nflfoot_ctc_intf.baseclock = | |
| 283 | nflfoot_ctc_intf.baseclock = | |
| 284 | 284 | z80ctc_init(1, &nflfoot_ctc_intf); |
| 285 | 285 | |
| 286 | 286 | z80pio_init(0, &nflfoot_pio_intf); |
| 287 | 287 | z80pio_init(1, &nflfoot_pio_intf); |
| 288 | 288 | |
| 289 | nflfoot_sio_intf.baseclock = | |
| 289 | nflfoot_sio_intf.baseclock = | |
| 290 | 290 | z80sio_init(0, &nflfoot_sio_intf); |
| 291 | 291 | |
| 292 | 292 | /* allocate a timer for the IPU watchdog */ |
| r1527 | r1528 | |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | /* initialize the clock */ |
| 367 | m6840_internal_counter_period = ATTOTIME_IN_HZ( | |
| 367 | m6840_internal_counter_period = ATTOTIME_IN_HZ( | |
| 368 | 368 | |
| 369 | 369 | /* reset cocktail flip */ |
| 370 | 370 | mcr_cocktail_flip = 0; |
| r1527 | r1528 | |
|---|---|---|
| 43 | 43 | DRIVER( alienar ) /* (c) 1985 Duncan Brown */ |
| 44 | 44 | DRIVER( carpolo ) /* (c) 1977 Exidy */ |
| 45 | 45 | DRIVER( sidetrac ) /* (c) 1979 Exidy */ |
| 46 | DRIVER( targ ) /* (c) 1980 Exidy */ | |
| 47 | DRIVER( spectar ) /* (c) 1980 Exidy */ | |
| 46 | 48 | DRIVER( teetert ) /* (c) 1982 Exidy */ |
| 47 | 49 | DRIVER( circus ) /* (c) 1977 Exidy */ |
| 48 | 50 | DRIVER( robotbwl ) /* (c) 197? Exidy */ |
| r1527 | r1528 | |
|---|---|---|
| 4078 | 4078 | DRIVER( acombat ) /* bootleg */ |
| 4079 | 4079 | DRIVER( acombato ) /* bootleg */ |
| 4080 | 4080 | DRIVER( sstarbtl ) /* bootleg */ |
| 4081 | DRIVER( spfghmk2 ) /* (c) [1980] Data East Corporation */ | |
| 4082 | DRIVER( spfgmk22 ) /* (c) [1980] Data East Corporation */ | |
| 4081 | 4083 | DRIVER( tomahawk ) /* (c) 1980 Data East, Inc. */ |
| 4082 | 4084 | DRIVER( tomahaw1 ) /* (c) 1980 Data East, Inc. */ |
| 4083 | 4085 | DRIVER( progolf ) /* (c) 1981 */ |
| r1527 | r1528 | |
| 6262 | 6264 | DRIVER( heatbrl ) /* (c) 1992 Tad (World) */ |
| 6263 | 6265 | DRIVER( heatbrlo ) /* (c) 1992 Tad (World) */ |
| 6264 | 6266 | DRIVER( heatbrlu ) /* (c) 1992 Tad (US) */ |
| 6267 | DRIVER( hetbrlu2 ) /* (c) 1992 Tad (US) */ | |
| 6265 | 6268 | DRIVER( godzilla ) /* (c) 1993 Banpresto */ |
| 6266 | 6269 | DRIVER( denjinmk ) /* (c) 199? Banpresto */ |
| 6267 | 6270 | DRIVER( sdgndmrb ) /* (c) 1993 Banpresto */ |
| r1527 | r1528 | |
| 6622 | 6625 | DRIVER( ryouran ) /* (c) 1998 Electro Design Co. (Japan) */ |
| 6623 | 6626 | DRIVER( teljan ) /* (c) 1999 Electro Design Co. (Japan) */ |
| 6624 | 6627 | |
| 6625 | /* Seta games */ | |
| 6628 | /* Seta games (seta.c) */ | |
| 6626 | 6629 | DRIVER( hanaawas ) /* (c) SetaKikaku */ |
| 6627 | 6630 | DRIVER( speedatk ) /* CB-0 (c) SetaKikaku */ |
| 6628 | 6631 | DRIVER( srmp1 ) /* UB or UC?? (c) 1987 */ |
| r1527 | r1528 | |
| 6678 | 6681 | DRIVER( sokonuke ) /* (c) 1995 Sammy Industries */ |
| 6679 | 6682 | DRIVER( zombraid ) /* (c) 1995 American Sammy */ |
| 6680 | 6683 | DRIVER( crazyfgt ) /* (c) 1998 Subsino */ |
| 6684 | DRIVER( inttoote ) /* (c) 1998 Coinmaster */ | |
| 6681 | 6685 | |
| 6686 | /* Seta games (seta2.c) */ | |
| 6682 | 6687 | DRIVER( gundamex ) /* (c) 1994 Banpresto */ |
| 6683 | 6688 | DRIVER( grdians ) /* (c) 1995 Banpresto */ |
| 6684 | 6689 | DRIVER( mj4simai ) /* (c) 1996 Maboroshi Ware */ |
| r1527 | r1528 | |
| 7639 | 7644 | DRIVER( eggvntdx ) /* (c) 1997 The Game Room */ |
| 7640 | 7645 | DRIVER( ripribit ) /* (c) 1997 LAI Games */ |
| 7641 | 7646 | DRIVER( cfarm ) /* (c) 1999 LAI Games */ |
| 7642 | DRIVER( cclown ) /* (c) 1999 LAI Games */ | |
| 7647 | DRIVER( cclownz ) /* (c) 1999 LAI Games */ | |
| 7643 | 7648 | DRIVER( rotaryf ) |
| 7644 | 7649 | DRIVER( sbugger ) /* (c) 1981 Game-A-Tron */ |
| 7645 | 7650 | DRIVER( sbuggera ) /* (c) 1981 Game-A-Tron */ |
| r1527 | r1528 | |
| 7649 | 7654 | DRIVER( enigma2a ) /* (c) 1984 Zilec Electronics (bootleg?) */ |
| 7650 | 7655 | DRIVER( ltcasino ) /* (c) 1982 Digital Controls Inc */ |
| 7651 | 7656 | DRIVER( mv4in1 ) /* (c) 1983 Entertainment Enterprises */ |
| 7652 | DRIVER( ltcasin | |
| 7657 | DRIVER( ltcasinn ) /* (c) 1984 Digital Controls Inc */ | |
| 7653 | 7658 | DRIVER( coolmini ) /* (c) 1999 SemiCom */ |
| 7654 | 7659 | DRIVER( luplup ) /* (c) 1999 Omega System */ |
| 7655 | 7660 | DRIVER( luplup29 ) /* (c) 1999 Omega System */ |
| r1527 | r1528 | |
| 7731 | 7736 | DRIVER( phrcraze ) /* (c) 1986 Merit */ |
| 7732 | 7737 | DRIVER( phrcrazs ) /* (c) 1986 Merit */ |
| 7733 | 7738 | DRIVER( bigappg ) /* (c) 1986 Merit */ |
| 7739 | DRIVER( dodge ) /* (c) 1986 Merit */ | |
| 7734 | 7740 | DRIVER( couple ) /* (c) 1988 Merit */ |
| 7735 | 7741 | DRIVER( couplep ) /* (c) 1988 Merit */ |
| 7736 | 7742 | DRIVER( couplei ) /* (c) 1988 Merit */ |
| r1527 | r1528 | |
| 7893 | 7899 | DRIVER( pepp0158 ) /* (c) 1987 IGT - International Gaming Technology */ |
| 7894 | 7900 | DRIVER( pepp0188 ) /* (c) 1987 IGT - International Gaming Technology */ |
| 7895 | 7901 | DRIVER( pepp0516 ) /* (c) 1987 IGT - International Gaming Technology */ |
| 7896 | DRIVER( pebe0014 ) /* (c) 1994 IGT - International Gaming Technology */ | |
| 7897 | DRIVER( peke1012 ) /* (c) 1994 IGT - International Gaming Technology */ | |
| 7898 | DRIVER( peps0615 ) /* (c) 1996 IGT - International Gaming Technology */ | |
| 7902 | DRIVER( pebe0014 ) /* (c) 1994 IGT - International Gaming Technology */ | |
| 7903 | DRIVER( peke1012 ) /* (c) 1994 IGT - International Gaming Technology */ | |
| 7904 | DRIVER( peps0615 ) /* (c) 1996 IGT - International Gaming Technology */ | |
| 7899 | 7905 | DRIVER( peps0716 ) /* (c) 1996 IGT - International Gaming Technology */ |
| 7900 | DRIVER( pexp0019 ) /* (c) 1995 IGT - International Gaming Technology */ | |
| 7901 | DRIVER( pexs0006 ) /* (c) 1997 IGT - International Gaming Technology */ | |
| 7906 | DRIVER( pexp0019 ) /* (c) 1995 IGT - International Gaming Technology */ | |
| 7907 | DRIVER( pexs0006 ) /* (c) 1997 IGT - International Gaming Technology */ | |
| 7908 | DRIVER( pexmp006 ) /* (c) 1997 IGT - International Gaming Technology */ | |
| 7902 | 7909 | DRIVER( mirage ) /* (c) 1994 Mitchell */ |
| 7903 | 7910 | DRIVER( dominob ) /* (c) 1990 Wonwoo Systems */ |
| 7904 | 7911 | DRIVER( jongkyo ) /* (c) 1985 Kiwako */ |
| r1527 | r1528 | |
|---|---|---|
| 60 | 60 | #define INVADERS_P1_CONTROL_PORT_TAG ("CONTP1") |
| 61 | 61 | #define INVADERS_P2_CONTROL_PORT_TAG ("CONTP2") |
| 62 | 62 | |
| 63 | UINT | |
| 63 | CUSTOM_INPUT( | |
| 64 | 64 | UINT8 invaders_is_flip_screen(void); |
| 65 | 65 | void invaders_set_flip_screen(UINT8 data); |
| 66 | 66 | int invaders_is_cabinet_cocktail(void); |
| r1527 | r1528 | |
|---|---|---|
| 12 | 12 | |
| 13 | 13 | #define SPACEFB_MASTER_CLOCK (20160000) |
| 14 | 14 | #define SPACEFB_MAIN_CPU_CLOCK (6000000 / 2) |
| 15 | #define SPACEFB_AUDIO_CPU_CLOCK (6000000 | |
| 15 | #define SPACEFB_AUDIO_CPU_CLOCK (6000000 | |
| 16 | 16 | #define SPACEFB_PIXEL_CLOCK (SPACEFB_MASTER_CLOCK / 2) |
| 17 | 17 | #define SPACEFB_HTOTAL (0x280) |
| 18 | 18 | #define SPACEFB_HBEND (0x000) |
| r1527 | r1528 | |
|---|---|---|
| 12 | 12 | #endif /* MESS */ |
| 13 | 13 | #endif |
| 14 | 14 | |
| 15 | #define COJAG_PIXEL_CLOCK XTAL_14_31818MHz | |
| 15 | 16 | |
| 17 | ||
| 18 | ||
| 16 | 19 | /*----------- defined in drivers/cojag.c -----------*/ |
| 17 | 20 | |
| 18 | 21 | extern UINT8 cojag_is_r3000; |
| r1527 | r1528 | |
|---|---|---|
| 2 | 2 | #include "sound/custom.h" |
| 3 | 3 | |
| 4 | 4 | |
| 5 | /*----------- video timing -----------*/ | |
| 6 | ||
| 7 | #define MASTER_CLOCK XTAL_11MHz | |
| 8 | ||
| 9 | #define PIXEL_CLOCK (MASTER_CLOCK/2) | |
| 10 | #define CPU_CLOCK (PIXEL_CLOCK/2) | |
| 11 | #define HTOTAL (512-160) | |
| 12 | #define HBSTART (256) | |
| 13 | #define HBEND (0) | |
| 14 | #define VTOTAL (256) | |
| 15 | #define VBSTART (208) | |
| 16 | #define VBEND (0) | |
| 17 | ||
| 5 | 18 | /*----------- defined in audio/phoenix.c -----------*/ |
| 6 | 19 | |
| 20 | SOUND_START( phoenix ); | |
| 21 | ||
| 7 | 22 | DISCRETE_SOUND_EXTERN( phoenix ); |
| 8 | 23 | |
| 9 | 24 | WRITE8_HANDLER( phoenix_sound_control_a_w ); |
| r1527 | r1528 | |
| 27 | 42 | extern UINT8 *naughtyb_scrollreg; |
| 28 | 43 | extern int naughtyb_cocktail; |
| 29 | 44 | |
| 30 | WRITE8_HANDLER( naughtyb_videoram2_w ); | |
| 31 | 45 | WRITE8_HANDLER( naughtyb_videoreg_w ); |
| 32 | 46 | WRITE8_HANDLER( popflame_videoreg_w ); |
| 33 | 47 | |
| r1527 | r1528 | |
| 41 | 55 | PALETTE_INIT( phoenix ); |
| 42 | 56 | PALETTE_INIT( pleiads ); |
| 43 | 57 | VIDEO_START( phoenix ); |
| 58 | VIDEO_START( pleiads ); | |
| 44 | 59 | VIDEO_UPDATE( phoenix ); |
| 45 | 60 | |
| 46 | 61 | WRITE8_HANDLER( phoenix_videoram_w ); |
| r1527 | r1528 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | /*----------- defined in drivers/itech8.c -----------*/ |
| 9 | 9 | |
| 10 | void itech8_update_interrupts(int periodic, int tms34061, int blitter); | |
| 10 | void itech8_update_interrupts(running_machine *machine, int periodic, int tms34061, int blitter); | |
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | /*----------- defined in machine/slikshot.c -----------*/ |
| r1527 | r1528 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | extern mame_bitmap *cvs_collision_bitmap; | |
| 8 | extern mame_bitmap *cvs_collision_background; | |
| 9 | extern int cvs_collision_register; | |
| 10 | ||
| 11 | ||
| 12 | PALETTE_INIT( cvs ); | |
| 13 | VIDEO_UPDATE( cvs ); | |
| 14 | VIDEO_START( cvs ); | |
| 15 | ||
| 16 | WRITE8_HANDLER( cvs_scroll_w ); | |
| 17 | WRITE8_HANDLER( cvs_video_fx_w ); | |
| 18 | ||
| 19 | READ8_HANDLER( cvs_collision_r ); | |
| 20 | READ8_HANDLER( cvs_collision_clear ); | |
| 21 | ||
| 22 | ||
| 23 | 7 | /*----------- defined in driver/cvs.c -----------*/ |
| 24 | 8 | |
| 25 | 9 | extern UINT8 *cvs_color_ram; |
| r1527 | r1528 | |
| 28 | 12 | extern UINT8 *cvs_palette_ram; |
| 29 | 13 | extern UINT8 *cvs_character_ram; |
| 30 | 14 | |
| 15 | MACHINE_START( cvs ); | |
| 16 | ||
| 31 | 17 | READ8_HANDLER( cvs_video_or_color_ram_r ); |
| 32 | 18 | WRITE8_HANDLER( cvs_video_or_color_ram_w ); |
| 33 | 19 | |
| r1527 | r1528 | |
| 44 | 30 | UINT8 cvs_get_character_banking_mode(void); |
| 45 | 31 | |
| 46 | 32 | |
| 47 | ||
| 48 | 33 | /*----------- defined in video/cvs.c -----------*/ |
| 49 | 34 | |
| 35 | extern mame_bitmap *cvs_collision_bitmap; | |
| 36 | extern mame_bitmap *cvs_collision_background; | |
| 37 | extern int cvs_collision_register; | |
| 38 | ||
| 39 | PALETTE_INIT( cvs ); | |
| 40 | VIDEO_UPDATE( cvs ); | |
| 41 | VIDEO_START( cvs ); | |
| 42 | ||
| 43 | WRITE8_HANDLER( cvs_scroll_w ); | |
| 44 | WRITE8_HANDLER( cvs_video_fx_w ); | |
| 45 | ||
| 46 | READ8_HANDLER( cvs_collision_r ); | |
| 47 | READ8_HANDLER( cvs_collision_clear ); | |
| 48 | ||
| 50 | 49 | void cvs_scroll_stars(void); |
| 51 | 50 |
| r1527 | r1528 | |
|---|---|---|
| 26 | 26 | |
| 27 | 27 | PALETTE_INIT( blandia ); |
| 28 | 28 | PALETTE_INIT( gundhara ); |
| 29 | PALETTE_INIT( inttoote ); | |
| 29 | 30 | PALETTE_INIT( jjsquawk ); |
| 30 | 31 | PALETTE_INIT( usclssic ); |
| 31 | 32 | PALETTE_INIT( zingzip ); |
| r1527 | r1528 | |
|---|---|---|
| 3 | 3 | void eolith_speedup_read(void); |
| 4 | 4 | void init_eolith_speedup(running_machine *machine); |
| 5 | 5 | INTERRUPT_GEN( eolith_speedup ); |
| 6 | UINT | |
| 6 | CUSTOM_INPUT( |
| r1527 | r1528 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | |
| 8 | #define BERZERK_MASTER_CLOCK (10000000) | |
| 9 | #define BERZERK_S14001A_CLOCK (BERZERK_MASTER_CLOCK / 2) | |
| 10 | ||
| 11 | ||
| 12 | /*----------- defined in audio/berzerk.c -----------*/ | |
| 13 | ||
| 14 | MACHINE_DRIVER_EXTERN( berzerk_audio ); | |
| 15 | WRITE8_HANDLER( berzerk_audio_w ); | |
| 16 | READ8_HANDLER( berzerk_audio_r ); | |
| 8 | #define BERZERK_MASTER_CLOCK (XTAL_10MHz) |
| r1527 | r1528 | |
|---|---|---|
| 46 | 46 | extern const char *const wow_sample_names[]; |
| 47 | 47 | |
| 48 | 48 | READ8_HANDLER( wow_speech_r ); |
| 49 | UINT | |
| 49 | CUSTOM_INPUT( | |
| 50 | 50 | |
| 51 | 51 | |
| 52 | 52 | /*----------- defined in audio/gorf.c -----------*/ |
| r1527 | r1528 | |
| 54 | 54 | extern const char *const gorf_sample_names[]; |
| 55 | 55 | |
| 56 | 56 | READ8_HANDLER( gorf_speech_r ); |
| 57 | UINT | |
| 57 | CUSTOM_INPUT( |
| r1527 | r1528 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | /*----------- defined in video/jedi.c -----------*/ |
| 8 | 8 | |
| 9 | extern UINT8 *jedi_PIXIRAM; | |
| 10 | 9 | extern UINT8 *jedi_backgroundram; |
| 11 | 10 | extern size_t jedi_backgroundram_size; |
| 12 | 11 | |
| r1527 | r1528 | |
| 15 | 14 | |
| 16 | 15 | WRITE8_HANDLER( jedi_alpha_banksel_w ); |
| 17 | 16 | WRITE8_HANDLER( jedi_paletteram_w ); |
| 18 | WRITE8_HANDLER( jedi_backgroundram_w ); | |
| 19 | 17 | WRITE8_HANDLER( jedi_vscroll_w ); |
| 20 | 18 | WRITE8_HANDLER( jedi_hscroll_w ); |
| 21 | 19 | WRITE8_HANDLER( jedi_video_off_w ); |
| r1527 | r1528 | |
|---|---|---|
| 7 | 7 | #include "sound/custom.h" |
| 8 | 8 | |
| 9 | 9 | |
| 10 | #define EXIDY_MASTER_CLOCK (11289 | |
| 10 | #define EXIDY_MASTER_CLOCK (XTAL_11_289MHz) | |
| 11 | 11 | #define EXIDY_CPU_CLOCK (EXIDY_MASTER_CLOCK / 16) |
| 12 | 12 | #define EXIDY_PIXEL_CLOCK (EXIDY_MASTER_CLOCK / 2) |
| 13 | 13 | #define EXIDY_HTOTAL (0x150) |
| r1527 | r1528 | |
| 24 | 24 | |
| 25 | 25 | /*----------- defined in audio/exidy.c -----------*/ |
| 26 | 26 | |
| 27 | void *exidy_sh_start(int clock, const struct CustomSound_interface *config); | |
| 28 | void *victory_sh_start(int clock, const struct CustomSound_interface *config); | |
| 29 | void *berzerk_sh_start(int clock, const struct CustomSound_interface *config); | |
| 27 | MACHINE_DRIVER_EXTERN( venture_audio ); | |
| 30 | 28 | |
| 31 | WRITE8_HANDLER( exidy_shriot_w ); | |
| 32 | WRITE8_HANDLER( exidy_sfxctrl_w ); | |
| 33 | WRITE8_HANDLER( exidy_sh8253_w ); | |
| 34 | WRITE8_HANDLER( exidy_sh6840_w ); | |
| 35 | WRITE8_HANDLER( exidy_sound_filter_w ); | |
| 36 | READ8_HANDLER( exidy_shriot_r ); | |
| 37 | READ8_HANDLER( exidy_sh8253_r ); | |
| 38 | READ8_HANDLER( exidy_sh6840_r ); | |
| 29 | MACHINE_DRIVER_EXTERN( mtrap_cvsd_audio ); | |
| 39 | 30 | |
| 40 | WRITE8_HANDLER( mtrap_voiceio_w ); | |
| 41 | READ8_HANDLER( mtrap_voiceio_r ); | |
| 31 | MACHINE_DRIVER_EXTERN( victory_audio ); | |
| 32 | READ8_HANDLER( victory_sound_response_r ); | |
| 33 | READ8_HANDLER( victory_sound_status_r ); | |
| 34 | WRITE8_HANDLER( victory_sound_command_w ); | |
| 42 | 35 | |
| 36 | MACHINE_DRIVER_EXTERN( berzerk_audio ); | |
| 37 | WRITE8_HANDLER( berzerk_audio_w ); | |
| 38 | READ8_HANDLER( berzerk_audio_r ); | |
| 43 | 39 | |
| 44 | /*----------- defined in audio/targ.c -----------*/ | |
| 45 | 40 | |
| 46 | extern UINT8 targ_spec_flag; | |
| 47 | ||
| 48 | void targ_sh_start(void); | |
| 49 | ||
| 50 | WRITE8_HANDLER( targ_sh_w ); | |
| 51 | ||
| 52 | ||
| 53 | 41 | /*----------- defined in video/exidy.c -----------*/ |
| 54 | 42 | |
| 55 | 43 | extern UINT8 *exidy_videoram; |
| 56 | 44 | extern UINT8 *exidy_characterram; |
| 57 | ||
| 58 | 45 | extern UINT8 *exidy_color_latch; |
| 46 | extern UINT8 *exidy_sprite1_xpos; | |
| 47 | extern UINT8 *exidy_sprite1_ypos; | |
| 48 | extern UINT8 *exidy_sprite2_xpos; | |
| 49 | extern UINT8 *exidy_sprite2_ypos; | |
| 50 | extern UINT8 *exidy_spriteno; | |
| 51 | extern UINT8 *exidy_sprite_enable; | |
| 59 | 52 | |
| 60 | 53 | void exidy_video_config(UINT8 _collision_mask, UINT8 _collision_invert, int _is_2bpp); |
| 61 | 54 | VIDEO_START( exidy ); |
| 62 | VIDEO_EOF( exidy ); | |
| 63 | 55 | VIDEO_UPDATE( exidy ); |
| 64 | 56 | |
| 65 | 57 | INTERRUPT_GEN( exidy_vblank_interrupt ); |
| 66 | 58 | INTERRUPT_GEN( teetert_vblank_interrupt ); |
| 67 | 59 | |
| 68 | WRITE8_HANDLER( exidy_color_w ); | |
| 69 | WRITE8_HANDLER( exidy_sprite1_xpos_w ); | |
| 70 | WRITE8_HANDLER( exidy_sprite1_ypos_w ); | |
| 71 | WRITE8_HANDLER( exidy_sprite2_xpos_w ); | |
| 72 | WRITE8_HANDLER( exidy_sprite2_ypos_w ); | |
| 73 | WRITE8_HANDLER( exidy_spriteno_w ); | |
| 74 | WRITE8_HANDLER( exidy_sprite_enable_w ); | |
| 75 | ||
| 76 | 60 | READ8_HANDLER( exidy_interrupt_r ); |
| r0 | r1528 | |
|---|---|---|
| 1 | /************************************************************************* | |
| 2 | ||
| 3 | Targ hardware | |
| 4 | ||
| 5 | *************************************************************************/ | |
| 6 | ||
| 7 | ||
| 8 | #define TARG_TONE_REGION (REGION_USER1) | |
| 9 | ||
| 10 | ||
| 11 | /*----------- defined in audio/targ.c -----------*/ | |
| 12 | ||
| 13 | WRITE8_HANDLER( targ_audio_1_w ); | |
| 14 | WRITE8_HANDLER( targ_audio_2_w ); | |
| 15 | WRITE8_HANDLER( spectar_audio_2_w ); | |
| 16 | ||
| 17 | MACHINE_DRIVER_EXTERN( spectar_audio ); | |
| 18 | MACHINE_DRIVER_EXTERN( targ_audio ); | |
| 19 |
| r0 | r1528 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | Victory system | |
| 4 | ||
| 5 | ****************************************************************************/ | |
| 6 | ||
| 7 | ||
| 8 | #define VICTORY_MAIN_CPU_CLOCK (XTAL_8MHz / 2) | |
| 9 | ||
| 10 | ||
| 11 | /*----------- defined in video/victory.c -----------*/ | |
| 12 | ||
| 13 | extern UINT8 *victory_videoram; | |
| 14 | extern UINT8 *victory_charram; | |
| 15 | ||
| 16 | VIDEO_START( victory ); | |
| 17 | VIDEO_UPDATE( victory ); | |
| 18 | INTERRUPT_GEN( victory_vblank_interrupt ); | |
| 19 | ||
| 20 | READ8_HANDLER( victory_video_control_r ); | |
| 21 | WRITE8_HANDLER( victory_video_control_w ); | |
| 22 | WRITE8_HANDLER( victory_paletteram_w ); |
| r1527 | r1528 | |
|---|---|---|
| 379 | 379 | MACHINE_RESET( amiga ); |
| 380 | 380 | INTERRUPT_GEN( amiga_scanline_callback ); |
| 381 | 381 | |
| 382 | UINT | |
| 382 | CUSTOM_INPUT( | |
| 383 | 383 | |
| 384 | 384 | READ16_HANDLER( amiga_cia_r ); |
| 385 | 385 | WRITE16_HANDLER( amiga_cia_w ); |
| r1527 | r1528 | |
|---|---|---|
| 12 | 12 | WRITE8_HANDLER( astrof_audio_1_w ); |
| 13 | 13 | WRITE8_HANDLER( astrof_audio_2_w ); |
| 14 | 14 | |
| 15 | MACHINE_DRIVER_EXTERN( spfghmk2_audio ); | |
| 16 | WRITE8_HANDLER( spfghmk2_audio_w ); | |
| 17 | ||
| 15 | 18 | MACHINE_DRIVER_EXTERN( tomahawk_audio ); |
| 16 | 19 | WRITE8_HANDLER( tomahawk_audio_w ); |
| r1527 | r1528 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | *************************************************************************/ |
| 6 | 6 | |
| 7 | #include "sound/discrete.h" | |
| 8 | 7 | |
| 9 | #define CRBALOON_LAUGH_EN NODE_01 | |
| 10 | #define CRBALOON_MUSIC_EN NODE_02 | |
| 11 | #define CRBALOON_MUSIC_DATA NODE_03 | |
| 8 | #define CRBALOON_MASTER_XTAL (XTAL_9_987MHz) | |
| 12 | 9 | |
| 13 | 10 | |
| 14 | 11 | /*----------- defined in audio/crbaloon.c -----------*/ |
| 15 | 12 | |
| 16 | DISCRETE_SOUND_EXTERN( crbaloon ); | |
| 13 | void crbaloon_audio_set_music_freq(UINT8 freq); | |
| 14 | void crbaloon_audio_set_music_enable(int enabled); | |
| 15 | void crbaloon_audio_set_explosion_enable(int enabled); | |
| 16 | void crbaloon_audio_set_breath_enable(int enabled); | |
| 17 | void crbaloon_audio_set_appear_enable(int enabled); | |
| 18 | void crbaloon_audio_set_laugh_enable(int enabled); | |
| 17 | 19 | |
| 20 | MACHINE_DRIVER_EXTERN( crbaloon_audio ); | |
| 21 | ||
| 22 | ||
| 18 | 23 | /*----------- defined in video/crbaloon.c -----------*/ |
| 19 | 24 | |
| 20 | extern INT8 crbaloon_collision; | |
| 25 | extern UINT8 *crbaloon_videoram; | |
| 26 | extern UINT8 *crbaloon_colorram; | |
| 27 | extern UINT8 *crbaloon_spriteram; | |
| 21 | 28 | |
| 22 | WRITE8_HANDLER( crbaloon_videoram_w ); | |
| 23 | WRITE8_HANDLER( crbaloon_colorram_w ); | |
| 24 | WRITE8_HANDLER( crbaloon_spritectrl_w ); | |
| 25 | WRITE8_HANDLER( crbaloon_flipscreen_w ); | |
| 26 | ||
| 27 | 29 | PALETTE_INIT( crbaloon ); |
| 28 | 30 | VIDEO_START( crbaloon ); |
| 29 | 31 | VIDEO_UPDATE( crbaloon ); |
| 30 | 32 | |
| 33 | WRITE8_HANDLER( crbaloon_videoram_w ); | |
| 34 | WRITE8_HANDLER( crbaloon_colorram_w ); | |
| 35 | ||
| 36 | UINT16 crbaloon_get_collision_address(void); | |
| 37 | void crbaloon_set_clear_collision_address(int _crbaloon_collision_address_clear); | |
| 38 |
| r1527 | r1528 | |
|---|---|---|
| 7 | 7 | #include "cpu/z80/z80daisy.h" |
| 8 | 8 | |
| 9 | 9 | /* constants */ |
| 10 | #define MAIN_OSC_MCR_I 19968 | |
| 10 | #define MAIN_OSC_MCR_I XTAL_19_968MHz | |
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | /*----------- defined in drivers/mcr.c -----------*/ |
| r1527 | r1528 | |
|---|---|---|
| 26 | 26 | #define Z80_CLOCK (Z80_MASTER_CLOCK / 2) /* verified on pcb */ |
| 27 | 27 | |
| 28 | 28 | #define I8035_MASTER_CLOCK XTAL_11MHz /* verified on pcb: 730Khz */ |
| 29 | #define I8035_DIVIDER (15) | |
| 30 | #define I8035_CLOCK (I8035_MASTER_CLOCK/I8035_DIVIDER) | |
| 29 | #define I8035_CLOCK (I8035_MASTER_CLOCK) | |
| 31 | 30 | |
| 32 | 31 | #define MARIO_PALETTE_LENGTH (256) |
| 33 | 32 |
| r1527 | r1528 | |
|---|---|---|
| 66 | 66 | CPUS += I8039 |
| 67 | 67 | CPUS += I8048 |
| 68 | 68 | CPUS += N7751 |
| 69 | CPUS += MB8884 | |
| 70 | CPUS += M58715 | |
| 69 | 71 | CPUS += I8X41 |
| 70 | 72 | CPUS += I8051 |
| 71 | 73 | CPUS += I8052 |
| r1527 | r1528 | |
| 124 | 126 | CPUS += ARM7 |
| 125 | 127 | CPUS += JAGUAR |
| 126 | 128 | CPUS += R3000 |
| 129 | CPUS += R3041 | |
| 127 | 130 | CPUS += R4600 |
| 128 | 131 | CPUS += R4650 |
| 129 | 132 | CPUS += R4700 |
| r1527 | r1528 | |
| 241 | 244 | SOUNDS += TMS36XX |
| 242 | 245 | SOUNDS += TMS3615 |
| 243 | 246 | SOUNDS += TMS5110 |
| 247 | SOUNDS += TMC0285 | |
| 248 | SOUNDS += TMS5200 | |
| 244 | 249 | SOUNDS += TMS5220 |
| 245 | 250 | SOUNDS += VLM5030 |
| 246 | 251 | SOUNDS += ADPCM |
| r1527 | r1528 | |
| 1234 | 1239 | $(DRIVERS)/snk68.o $(VIDEO)/snk68.o \ |
| 1235 | 1240 | |
| 1236 | 1241 | $(MAMEOBJ)/stern.a: \ |
| 1237 | $(DRIVERS)/astinvad.o $(AUDIO)/astinvad.o $(VIDEO)/astinvad.o \ | |
| 1238 | $(DRIVERS)/berzerk.o $(AUDIO)/berzerk.o \ | |
| 1242 | $(DRIVERS)/astinvad.o \ | |
| 1243 | $(DRIVERS)/berzerk.o \ | |
| 1239 | 1244 | $(DRIVERS)/cliffhgr.o $(AUDIO)/cliffhgr.o \ |
| 1240 | 1245 | $(DRIVERS)/mazerbla.o \ |
| 1241 | 1246 | $(DRIVERS)/supdrapo.o \ |
| r1527 | r1528 | |
| 1603 | 1608 | $(DRIVERS)/thayers.o \ |
| 1604 | 1609 | $(DRIVERS)/thedeep.o $(VIDEO)/thedeep.o \ |
| 1605 | 1610 | $(DRIVERS)/tiamc1.o $(VIDEO)/tiamc1.o $(AUDIO)/tiamc1.o \ |
| 1606 | $(DRIVERS)/tickee.o | |
| 1611 | $(DRIVERS)/tickee.o | |
| 1607 | 1612 | $(DRIVERS)/truco.o $(VIDEO)/truco.o \ |
| 1608 | 1613 | $(DRIVERS)/trucocl.o $(VIDEO)/trucocl.o \ |
| 1609 | 1614 | $(DRIVERS)/trvmadns.o \ |
| r1527 | r1528 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | #include "driver.h" |
| 9 | 9 | |
| 10 | #ifdef MAME_DEBUG | |
| 10 | #define NYCAPTOR_DEBUG 0 | |
| 11 | ||
| 12 | #if NYCAPTOR_DEBUG | |
| 11 | 13 | static int nycaptor_mask=0; |
| 12 | 14 | #endif |
| 13 | 15 | |
| r1527 | r1528 | |
| 52 | 54 | if((!nycaptor_spot())&&(pal==6))tileinfo->group=1; |
| 53 | 55 | if(((nycaptor_spot()==3)&&(pal==8))||((nycaptor_spot()==1)&&(pal==0xc)))tileinfo->group=2; |
| 54 | 56 | if((nycaptor_spot()==1)&&(tileinfo->category==2))tileinfo->group=3; |
| 55 | #if | |
| 57 | #if | |
| 56 | 58 | if(nycaptor_mask&(1<<tileinfo->category)) |
| 57 | 59 | { |
| 58 | 60 | if(nycaptor_spot())pal=0xe;else pal=4; |
| r1527 | r1528 | |
| 160 | 162 | priori=(pr&0xe0)>>5; |
| 161 | 163 | if(priori==pri) |
| 162 | 164 | { |
| 163 | #if | |
| 165 | #if | |
| 164 | 166 | if(nycaptor_mask&(1<<(pri+4)))pal=0xd; |
| 165 | 167 | #endif |
| 166 | 168 | flipx = ((nycaptor_spriteram[offs+1]&0x40)>>6); |
| r1527 | r1528 | |
| 192 | 194 | |
| 193 | 195 | |
| 194 | 196 | |
| 195 | #if | |
| 197 | #if | |
| 196 | 198 | /* |
| 197 | 199 | Keys : |
| 198 | 200 | q/w/e/r - bg priority display select |
| r1527 | r1528 | |
| 226 | 228 | |
| 227 | 229 | VIDEO_UPDATE( nycaptor ) |
| 228 | 230 | { |
| 229 | #if | |
| 231 | #if | |
| 230 | 232 | nycaptor_setmask(); |
| 231 | 233 | if(nycaptor_mask&0x1000) |
| 232 | 234 | { |
| r1527 | r1528 | |
|---|---|---|
| 55 | 55 | tilemap_mark_tile_dirty(fg_tilemap, offset); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | WRITE8_HANDLER( tunhunt_mott_w ) | |
| 59 | { | |
| 60 | if( spriteram[offset]!=data ) | |
| 61 | { | |
| 62 | spriteram[offset] = data; | |
| 63 | dirtybuffer[offset>>4] = 1; | |
| 64 | } | |
| 65 | } | |
| 66 | ||
| 67 | 58 | static TILE_GET_INFO( get_fg_tile_info ) |
| 68 | 59 | { |
| 69 | 60 | int attr = videoram[tile_index]; |
| r1527 | r1528 | |
| 81 | 72 | We keep track of dirty lines and cache the expanded bitmap. |
| 82 | 73 | With max RLE expansion, bitmap size is 256x64. |
| 83 | 74 | */ |
| 84 | dirtybuffer = auto_malloc(64); | |
| 85 | ||
| 86 | memset( dirtybuffer, 1, 64 ); | |
| 87 | 75 | tmpbitmap = auto_bitmap_alloc( 256, 64, machine->screen[0].format ); |
| 88 | 76 | |
| 89 | 77 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, |
| r1527 | r1528 | |
| 226 | 214 | |
| 227 | 215 | for( line=0; line<64; line++ ) |
| 228 | 216 | { |
| 229 | if( dirtybuffer[line] ) | |
| 217 | x = 0; | |
| 218 | source = &spriteram[line*0x10]; | |
| 219 | for( span=0; span<0x10; span++ ) | |
| 230 | 220 | { |
| 231 | dirtybuffer[line] = 0; | |
| 232 | x = 0; | |
| 233 | source = &spriteram[line*0x10]; | |
| 234 | for( span=0; span<0x10; span++ ) | |
| 235 | { | |
| 236 | span_data = source[span]; | |
| 237 | if( span_data == 0xff ) break; | |
| 238 | color = ((span_data>>6)&0x3)^0x3; | |
| 239 | count = (span_data&0x1f)+1; | |
| 240 | while( count-- && x < 256 ) | |
| 241 | { | |
| 242 | *BITMAP_ADDR16(tmpbitmap, line, x++) = machine->pens[color]; | |
| 243 | } | |
| 244 | } | |
| 245 | while( x<256 ) | |
| 246 | { | |
| 247 | *BITMAP_ADDR16(tmpbitmap, line, x++) = machine->pens[0]; | |
| 248 | } | |
| 249 | } /* dirty line */ | |
| 221 | span_data = source[span]; | |
| 222 | if( span_data == 0xff ) break; | |
| 223 | color = ((span_data>>6)&0x3)^0x3; | |
| 224 | count = (span_data&0x1f)+1; | |
| 225 | while( count-- && x < 256 ) | |
| 226 | *BITMAP_ADDR16(tmpbitmap, line, x++) = machine->pens[color]; | |
| 227 | } | |
| 228 | while( x<256 ) | |
| 229 | *BITMAP_ADDR16(tmpbitmap, line, x++) = machine->pens[0]; | |
| 250 | 230 | } /* next line */ |
| 251 | 231 | |
| 252 | 232 | switch( tunhunt_ram[VSTRLO] ) |
| r1527 | r1528 | |
|---|---|---|
| 8 | 8 | #include "profiler.h" |
| 9 | 9 | #include "cpu/tms34010/tms34010.h" |
| 10 | 10 | #include "cpu/tms34010/34010ops.h" |
| 11 | #include "video/tlc34076.h" | |
| 11 | 12 | #include "artmagic.h" |
| 12 | 13 | |
| 13 | 14 | |
| r1527 | r1528 | |
| 349 | 350 | { |
| 350 | 351 | offs_t offset = (params->rowaddr << 12) & 0x7ff000; |
| 351 | 352 | UINT16 *vram = address_to_vram(&offset); |
| 352 | UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0); | |
| 353 | UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); | |
| 354 | const rgb_t *pens = tlc34076_get_pens(); | |
| 353 | 355 | int coladdr = params->coladdr << 1; |
| 354 | 356 | int x; |
| 355 | 357 | |
| 356 | 358 | vram += offset; |
| 357 | 359 | for (x = params->heblnk; x < params->hsblnk; x++) |
| 358 | dest[x] = vram[coladdr++ & 0x1ff] & 0xff; | |
| 360 | dest[x] = pens[vram[coladdr++ & 0x1ff] & 0xff]; | |
| 359 | 361 | } |
| r1527 | r1528 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | #include "driver.h" |
| 6 | 6 | |
| 7 | static mame_bitmap *thief_page0; | |
| 8 | static mame_bitmap *thief_page1; | |
| 9 | ||
| 10 | 7 | static UINT8 thief_read_mask, thief_write_mask; |
| 11 | 8 | static UINT8 thief_video_control; |
| 12 | 9 | |
| r1527 | r1528 | |
| 46 | 43 | /***************************************************************************/ |
| 47 | 44 | |
| 48 | 45 | WRITE8_HANDLER( thief_video_control_w ){ |
| 49 | if( (data^thief_video_control)&1 ){ | |
| 50 | /* screen flipped */ | |
| 51 | memset( dirtybuffer, 0x00, 0x2000*2 ); | |
| 52 | } | |
| 53 | ||
| 54 | 46 | thief_video_control = data; |
| 55 | 47 | /* |
| 56 | 48 | bit 0: screen flip |
| r1527 | r1528 | |
| 97 | 89 | |
| 98 | 90 | WRITE8_HANDLER( thief_videoram_w ){ |
| 99 | 91 | UINT8 *dest = &videoram[offset]; |
| 100 | if( thief_video_control&0x02 ) | |
| 92 | if( thief_video_control&0x02 ) | |
| 101 | 93 | dest+=0x2000*4; /* foreground/background */ |
| 102 | dirtybuffer[offset+0x2000] = 1; | |
| 103 | } | |
| 104 | else { | |
| 105 | dirtybuffer[offset] = 1; | |
| 106 | } | |
| 107 | 94 | if( thief_write_mask&0x1 ) dest[0x2000*0] = data; |
| 108 | 95 | if( thief_write_mask&0x2 ) dest[0x2000*1] = data; |
| 109 | 96 | if( thief_write_mask&0x4 ) dest[0x2000*2] = data; |
| r1527 | r1528 | |
| 115 | 102 | VIDEO_START( thief ){ |
| 116 | 103 | memset( &thief_coprocessor, 0x00, sizeof(thief_coprocessor) ); |
| 117 | 104 | |
| 118 | thief_page0 = auto_bitmap_alloc( 256,256,machine->screen[0].format ); | |
| 119 | thief_page1 = auto_bitmap_alloc( 256,256,machine->screen[0].format ); | |
| 120 | ||
| 121 | 105 | videoram = auto_malloc( 0x2000*4*2 ); |
| 122 | 106 | memset( videoram, 0, 0x2000*4*2 ); |
| 123 | 107 | |
| 124 | dirtybuffer = auto_malloc( 0x2000*2 ); | |
| 125 | memset( dirtybuffer, 1, 0x2000*2 ); | |
| 126 | ||
| 127 | 108 | thief_coprocessor.image_ram = auto_malloc( 0x2000 ); |
| 128 | 109 | thief_coprocessor.context_ram = auto_malloc( 0x400 ); |
| 129 | 110 | } |
| r1527 | r1528 | |
| 132 | 113 | UINT32 offs; |
| 133 | 114 | int flipscreen = thief_video_control&1; |
| 134 | 115 | const pen_t *pal_data = machine->pens; |
| 135 | UINT8 *dirty = dirtybuffer; | |
| 136 | 116 | const UINT8 *source = videoram; |
| 137 | mame_bitmap *page; | |
| 138 | 117 | |
| 139 | if( thief_video_control&4 ){ /* visible page */ | |
| 140 | dirty += 0x2000; | |
| 118 | if( thief_video_control&4 ) /* visible page */ | |
| 141 | 119 | source += 0x2000*4; |
| 142 | page = thief_page1; | |
| 143 | } | |
| 144 | else { | |
| 145 | page = thief_page0; | |
| 146 | } | |
| 147 | 120 | |
| 148 | 121 | for( offs=0; offs<0x2000; offs++ ){ |
| 149 | if( dirty[offs] ){ | |
| 150 | int ypos = offs/32; | |
| 151 | int xpos = (offs%32)*8; | |
| 152 | int plane0 = source[0x2000*0+offs]; | |
| 153 | int plane1 = source[0x2000*1+offs]; | |
| 154 | int plane2 = source[0x2000*2+offs]; | |
| 155 | int plane3 = source[0x2000*3+offs]; | |
| 156 | int bit; | |
| 157 | if( flipscreen ){ | |
| 158 | for( bit=0; bit<8; bit++ ){ | |
| 159 | *BITMAP_ADDR16(page, 0xff - ypos, 0xff - (xpos+bit)) = | |
| 160 | pal_data[ | |
| 161 | (((plane0<<bit)&0x80)>>7) | | |
| 162 | (((plane1<<bit)&0x80)>>6) | | |
| 163 | (((plane2<<bit)&0x80)>>5) | | |
| 164 | (((plane3<<bit)&0x80)>>4)]; | |
| 165 | } | |
| 122 | int ypos = offs/32; | |
| 123 | int xpos = (offs%32)*8; | |
| 124 | int plane0 = source[0x2000*0+offs]; | |
| 125 | int plane1 = source[0x2000*1+offs]; | |
| 126 | int plane2 = source[0x2000*2+offs]; | |
| 127 | int plane3 = source[0x2000*3+offs]; | |
| 128 | int bit; | |
| 129 | if( flipscreen ){ | |
| 130 | for( bit=0; bit<8; bit++ ){ | |
| 131 | *BITMAP_ADDR16(bitmap, 0xff - ypos, 0xff - (xpos+bit)) = | |
| 132 | pal_data[ | |
| 133 | (((plane0<<bit)&0x80)>>7) | | |
| 134 | (((plane1<<bit)&0x80)>>6) | | |
| 135 | (((plane2<<bit)&0x80)>>5) | | |
| 136 | (((plane3<<bit)&0x80)>>4)]; | |
| 166 | 137 | } |
| 167 | else { | |
| 168 | for( bit=0; bit<8; bit++ ){ | |
| 169 | *BITMAP_ADDR16(page, ypos, xpos+bit) = | |
| 170 | pal_data[ | |
| 171 | (((plane0<<bit)&0x80)>>7) | | |
| 172 | (((plane1<<bit)&0x80)>>6) | | |
| 173 | (((plane2<<bit)&0x80)>>5) | | |
| 174 | (((plane3<<bit)&0x80)>>4)]; | |
| 175 | } | |
| 138 | } | |
| 139 | else { | |
| 140 | for( bit=0; bit<8; bit++ ){ | |
| 141 | *BITMAP_ADDR16(bitmap, ypos, xpos+bit) = | |
| 142 | pal_data[ | |
| 143 | (((plane0<<bit)&0x80)>>7) | | |
| 144 | (((plane1<<bit)&0x80)>>6) | | |
| 145 | (((plane2<<bit)&0x80)>>5) | | |
| 146 | (((plane3<<bit)&0x80)>>4)]; | |
| 176 | 147 | } |
| 177 | dirty[offs] = 0; | |
| 178 | 148 | } |
| 179 | 149 | } |
| 180 | copybitmap(bitmap,page,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 181 | 150 | return 0; |
| 182 | 151 | } |
| 183 | 152 |
| r1527 | r1528 | |
|---|---|---|
| 11 | 11 | /* globals */ |
| 12 | 12 | UINT8 *jedi_backgroundram; |
| 13 | 13 | size_t jedi_backgroundram_size; |
| 14 | UINT8 *jedi_PIXIRAM; | |
| 15 | 14 | |
| 16 | 15 | |
| 17 | 16 | /* local variables */ |
| r1527 | r1528 | |
| 19 | 18 | static UINT32 jedi_hscroll; |
| 20 | 19 | static UINT32 jedi_alpha_bank; |
| 21 | 20 | static UINT8 video_off, smooth_table; |
| 22 | static UINT8 *fgdirty, *bgdirty; | |
| 23 | 21 | static mame_bitmap *fgbitmap, *mobitmap, *bgbitmap, *bgexbitmap; |
| 24 | 22 | |
| 25 | 23 | |
| r1527 | r1528 | |
| 30 | 28 | * |
| 31 | 29 | *************************************/ |
| 32 | 30 | |
| 33 | static void jedi_postload(void) | |
| 34 | { | |
| 35 | memset(fgdirty, 1, videoram_size); | |
| 36 | memset(bgdirty, 1, jedi_backgroundram_size); | |
| 37 | } | |
| 38 | ||
| 39 | ||
| 40 | 31 | VIDEO_START( jedi ) |
| 41 | 32 | { |
| 42 | /* allocate dirty buffer for the foreground characters */ | |
| 43 | fgdirty = dirtybuffer = auto_malloc(videoram_size); | |
| 44 | memset(fgdirty, 1, videoram_size); | |
| 45 | ||
| 46 | 33 | /* allocate an 8bpp bitmap for the raw foreground characters */ |
| 47 | 34 | fgbitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 48 | 35 | |
| r1527 | r1528 | |
| 50 | 37 | mobitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 51 | 38 | fillbitmap(mobitmap, 0, &machine->screen[0].visarea); |
| 52 | 39 | |
| 53 | /* allocate dirty buffer for the background characters */ | |
| 54 | bgdirty = auto_malloc(jedi_backgroundram_size); | |
| 55 | memset(bgdirty, 1, jedi_backgroundram_size); | |
| 56 | ||
| 57 | 40 | /* the background area is 256x256, doubled by the hardware*/ |
| 58 | 41 | bgbitmap = auto_bitmap_alloc(256, 256, machine->screen[0].format); |
| 59 | 42 | |
| r1527 | r1528 | |
| 69 | 52 | state_save_register_global(jedi_alpha_bank); |
| 70 | 53 | state_save_register_global(video_off); |
| 71 | 54 | state_save_register_global(smooth_table); |
| 72 | state_save_register_func_postload(jedi_postload); | |
| 73 | 55 | } |
| 74 | 56 | |
| 75 | 57 | |
| r1527 | r1528 | |
| 123 | 105 | |
| 124 | 106 | /************************************* |
| 125 | 107 | * |
| 126 | * Background access | |
| 127 | * | |
| 128 | *************************************/ | |
| 129 | ||
| 130 | WRITE8_HANDLER( jedi_backgroundram_w ) | |
| 131 | { | |
| 132 | if (jedi_backgroundram[offset] != data) | |
| 133 | { | |
| 134 | bgdirty[offset] = 1; | |
| 135 | jedi_backgroundram[offset] = data; | |
| 136 | } | |
| 137 | } | |
| 138 | ||
| 139 | ||
| 140 | ||
| 141 | /************************************* | |
| 142 | * | |
| 143 | 108 | * Foreground banking |
| 144 | 109 | * |
| 145 | 110 | *************************************/ |
| 146 | 111 | |
| 147 | 112 | WRITE8_HANDLER( jedi_alpha_banksel_w ) |
| 148 | 113 | { |
| 149 | if (jedi_alpha_bank != 2 * (data & 0x80)) | |
| 150 | { | |
| 151 | jedi_alpha_bank = 2 * (data & 0x80); | |
| 152 | memset(fgdirty, 1, videoram_size); | |
| 153 | } | |
| 114 | jedi_alpha_bank = 2 * (data & 0x80); | |
| 154 | 115 | } |
| 155 | 116 | |
| 156 | 117 | |
| r1527 | r1528 | |
| 189 | 150 | WRITE8_HANDLER( jedi_PIXIRAM_w ) |
| 190 | 151 | { |
| 191 | 152 | smooth_table = data & 0x03; |
| 192 | memset(bgdirty, 1, jedi_backgroundram_size); | |
| 193 | 153 | } |
| 194 | 154 | |
| 195 | 155 | |
| r1527 | r1528 | |
| 200 | 160 | * |
| 201 | 161 | *************************************/ |
| 202 | 162 | |
| 203 | static void update_smoothing(int bgtilerow | |
| 163 | static void update_smoothing(int bgtilerow | |
| 204 | 164 | { |
| 205 | 165 | UINT8 *prom = memory_region(REGION_PROMS) + smooth_table * 0x100; |
| 206 | 166 | UINT8 bgscan[2][256]; |
| 207 | 167 | UINT8 *bgcurr = bgscan[0], *bglast = bgscan[1]; |
| 208 | int x | |
| 168 | int x | |
| 209 | 169 | |
| 210 | 170 | /* |
| 211 | 171 | smoothing notes: |
| r1527 | r1528 | |
| 218 | 178 | * therefore, if we modify source pixels 8-15, we must update dest pixels 15-31 |
| 219 | 179 | */ |
| 220 | 180 | |
| 221 | /* compute x start/stop in destination coordinates */ | |
| 222 | xstart = first * 16 - 1; | |
| 223 | xstop = last * 16 + 15; | |
| 224 | ||
| 225 | 181 | /* extract the previous bg scanline */ |
| 226 | 182 | extract_scanline8(bgbitmap, 0, ((bgtilerow * 16 - 1) & 0x1ff) / 2, 256, bgcurr); |
| 227 | 183 | |
| r1527 | r1528 | |
| 239 | 195 | extract_scanline8(bgbitmap, 0, curry / 2, 256, bgcurr); |
| 240 | 196 | |
| 241 | 197 | /* loop over columns */ |
| 242 | for (x = | |
| 198 | for (x = -1 | |
| 243 | 199 | { |
| 244 | 200 | int tr = bglast[((x + 1) & 0x1ff) / 2]; |
| 245 | 201 | int br = bgcurr[((x + 1) & 0x1ff) / 2]; |
| r1527 | r1528 | |
| 269 | 225 | |
| 270 | 226 | VIDEO_UPDATE( jedi ) |
| 271 | 227 | { |
| 272 | int bgexdirty[32][2]; | |
| 273 | 228 | int offs; |
| 274 | 229 | |
| 275 | 230 | |
| r1527 | r1528 | |
| 289 | 244 | |
| 290 | 245 | /* update foreground bitmap as a raw bitmap*/ |
| 291 | 246 | for (offs = videoram_size - 1; offs >= 0; offs--) |
| 292 | if (fgdirty[offs]) | |
| 293 | { | |
| 294 | int sx = offs % 64; | |
| 295 | int sy = offs / 64; | |
| 247 | { | |
| 248 | int sx = offs % 64; | |
| 249 | int sy = offs / 64; | |
| 296 | 250 | |
| 297 | fgdirty[offs] = 0; | |
| 251 | drawgfx(fgbitmap, machine->gfx[0], videoram[offs] + jedi_alpha_bank, | |
| 252 | 0, 0, 0, 8*sx, 8*sy, &machine->screen[0].visarea, TRANSPARENCY_NONE_RAW, 0); | |
| 253 | } | |
| 298 | 254 | |
| 299 | drawgfx(fgbitmap, machine->gfx[0], videoram[offs] + jedi_alpha_bank, | |
| 300 | 0, 0, 0, 8*sx, 8*sy, &machine->screen[0].visarea, TRANSPARENCY_NONE_RAW, 0); | |
| 301 | } | |
| 302 | ||
| 303 | /* reset the expanded dirty array */ | |
| 304 | for (offs = 0; offs < 32; offs++) | |
| 305 | bgexdirty[offs][0] = bgexdirty[offs][1] = -1; | |
| 306 | ||
| 307 | 255 | /* update background bitmap as a raw bitmap */ |
| 308 | 256 | for (offs = jedi_backgroundram_size / 2 - 1; offs >= 0; offs--) |
| 309 | if (bgdirty[offs] || bgdirty[offs + 0x400]) | |
| 310 | { | |
| 311 | int sx = offs % 32; | |
| 312 | int sy = offs / 32; | |
| 313 | int code = (jedi_backgroundram[offs] & 0xFF); | |
| 314 | int bank = (jedi_backgroundram[offs + 0x400] & 0x0F); | |
| 257 | { | |
| 258 | int sx = offs % 32; | |
| 259 | int sy = offs / 32; | |
| 260 | int code = (jedi_backgroundram[offs] & 0xFF); | |
| 261 | int bank = (jedi_backgroundram[offs + 0x400] & 0x0F); | |
| 315 | 262 | |
| 316 | /* shuffle the bank bits in */ | |
| 317 | code |= (bank & 0x01) << 8; | |
| 318 | code |= (bank & 0x08) << 6; | |
| 319 | code |= (bank & 0x02) << 9; | |
| 263 | /* shuffle the bank bits in */ | |
| 264 | code |= (bank & 0x01) << 8; | |
| 265 | code |= (bank & 0x08) << 6; | |
| 266 | code |= (bank & 0x02) << 9; | |
| 320 | 267 | |
| 321 | bgdirty[offs] = bgdirty[offs + 0x400] = 0; | |
| 268 | drawgfx(bgbitmap, machine->gfx[1], code, | |
| 269 | 0, bank & 0x04, 0, 8*sx, 8*sy, 0, TRANSPARENCY_NONE_RAW, 0); | |
| 270 | } | |
| 322 | 271 | |
| 323 | /* update expanded dirty status (assumes we go right-to-left) */ | |
| 324 | if (bgexdirty[sy][1] == -1) | |
| 325 | bgexdirty[sy][1] = sx; | |
| 326 | bgexdirty[sy][0] = sx; | |
| 327 | ||
| 328 | drawgfx(bgbitmap, machine->gfx[1], code, | |
| 329 | 0, bank & 0x04, 0, 8*sx, 8*sy, 0, TRANSPARENCY_NONE_RAW, 0); | |
| 330 | } | |
| 331 | ||
| 332 | 272 | /* update smoothed version of background */ |
| 333 | 273 | for (offs = 0; offs < 32; offs++) |
| 334 | if (bgexdirty[offs][1] != -1) | |
| 335 | update_smoothing(offs, bgexdirty[offs][0], bgexdirty[offs][1]); | |
| 274 | update_smoothing(offs); | |
| 336 | 275 | |
| 337 | 276 | /* draw the motion objects */ |
| 338 | 277 | for (offs = 0; offs < 0x30; offs++) |
| r1527 | r1528 | |
|---|---|---|
| 166 | 166 | /* pixmap */ |
| 167 | 167 | tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 168 | 168 | |
| 169 | /* paletteram and videoram (pixmap) are accessed through CPU ports, that don't | |
| 170 | get memory automatically allocated for them */ | |
| 171 | paletteram = auto_malloc(0x1800); | |
| 172 | videoram = auto_malloc(0x8000); | |
| 173 | ||
| 174 | 169 | tilemap_set_transparent_pen(tilemap_0,0x0f); |
| 175 | 170 | tilemap_set_transparent_pen(tilemap_1,0xff); |
| 176 | 171 | tilemap_set_transparent_pen(tilemap_2,0xff); |
| r1527 | r1528 | |
|---|---|---|
| 53 | 53 | flip_screen_y_set(~data & 1); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | WRITE8_HANDLER( mouser_spriteram_w ) | |
| 57 | { | |
| 58 | /* Mark the entire row as dirty if row scrollram is written */ | |
| 59 | /* Only used by the MOUSER logo */ | |
| 60 | ||
| 61 | int i; | |
| 62 | ||
| 63 | if (offset < 32) | |
| 64 | { | |
| 65 | for(i=0;i<32;i++) | |
| 66 | dirtybuffer[offset+i*32] = 1; | |
| 67 | } | |
| 68 | spriteram_w(offset, data); | |
| 69 | } | |
| 70 | ||
| 71 | WRITE8_HANDLER( mouser_colorram_w ) | |
| 72 | { | |
| 73 | dirtybuffer[offset] = 1; | |
| 74 | colorram_w(offset, data); | |
| 75 | } | |
| 76 | ||
| 77 | 56 | VIDEO_UPDATE( mouser ) |
| 78 | 57 | { |
| 79 | 58 | int offs; |
| 80 | 59 | int sx,sy; |
| 81 | 60 | int flipx,flipy; |
| 82 | 61 | |
| 83 | /* for every character in the Video RAM, check if it has been modified */ | |
| 84 | /* since last time and update it accordingly. */ | |
| 62 | /* for every character in the Video RAM */ | |
| 85 | 63 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 86 | 64 | { |
| 87 | 65 | int scrolled_y_position; |
| 88 | 66 | int color_offs; |
| 89 | 67 | |
| 90 | if (dirtybuffer[offs]) | |
| 68 | sx = offs % 32; | |
| 69 | sy = offs / 32; | |
| 70 | ||
| 71 | if (flip_screen_x) | |
| 91 | 72 | { |
| 92 | dirtybuffer[offs] = 0; | |
| 73 | sx = 31 - sx; | |
| 74 | } | |
| 93 | 75 | |
| 94 | sx = offs % 32; | |
| 95 | sy = offs / 32; | |
| 76 | if (flip_screen_y) | |
| 77 | { | |
| 78 | sy = 31 - sy; | |
| 79 | } | |
| 96 | 80 | |
| 97 | if (flip_screen_x) | |
| 98 | { | |
| 99 | sx = 31 - sx; | |
| 100 | } | |
| 81 | /* This bit of spriteram appears to be for row scrolling */ | |
| 82 | /* Note: this is dependant on flipping in y */ | |
| 83 | scrolled_y_position = (256 + 8*sy - spriteram[offs%32])%256; | |
| 84 | /* I think we still need to fetch the colorram bits to from the ram underneath, which is not scrolled */ | |
| 85 | /* Ideally we would merge these on a pixel-by-pixel basis, but it's ok to do this char-by-char, */ | |
| 86 | /* Since it's only for the MOUSER logo and it looks fine */ | |
| 87 | /* Note: this is _not_ dependant on flipping */ | |
| 88 | color_offs = offs%32 + ((256 + 8*(offs/32) - spriteram[offs%32])%256)/8*32; | |
| 101 | 89 | |
| 102 | if (flip_screen_y) | |
| 103 | { | |
| 104 | sy = 31 - sy; | |
| 105 | } | |
| 106 | ||
| 107 | /* This bit of spriteram appears to be for row scrolling */ | |
| 108 | /* Note: this is dependant on flipping in y */ | |
| 109 | scrolled_y_position = (256 + 8*sy - spriteram[offs%32])%256; | |
| 110 | /* I think we still need to fetch the colorram bits to from the ram underneath, which is not scrolled */ | |
| 111 | /* Ideally we would merge these on a pixel-by-pixel basis, but it's ok to do this char-by-char, */ | |
| 112 | /* Since it's only for the MOUSER logo and it looks fine */ | |
| 113 | /* Note: this is _not_ dependant on flipping */ | |
| 114 | color_offs = offs%32 + ((256 + 8*(offs/32) - spriteram[offs%32])%256)/8*32; | |
| 115 | ||
| 116 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 117 | videoram[offs] | (colorram[color_offs]>>5)*256 | ((colorram[color_offs]>>4)&1)*512, | |
| 118 | colorram[color_offs]%16, | |
| 119 | flip_screen_x,flip_screen_y, | |
| 120 | 8*sx,scrolled_y_position, | |
| 121 | 0,TRANSPARENCY_NONE,0); | |
| 122 | } | |
| 90 | drawgfx(bitmap,machine->gfx[0], | |
| 91 | videoram[offs] | (colorram[color_offs]>>5)*256 | ((colorram[color_offs]>>4)&1)*512, | |
| 92 | colorram[color_offs]%16, | |
| 93 | flip_screen_x,flip_screen_y, | |
| 94 | 8*sx,scrolled_y_position, | |
| 95 | cliprect,TRANSPARENCY_NONE,0); | |
| 123 | 96 | } |
| 124 | 97 | |
| 125 | copyscrollbitmap(bitmap,tmpbitmap,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 126 | ||
| 127 | 98 | /* There seem to be two sets of sprites, each decoded identically */ |
| 128 | 99 | |
| 129 | 100 | /* This is the first set of 7 sprites */ |
| r1527 | r1528 | |
| 153 | 124 | spriteram[offs+1]%16, |
| 154 | 125 | flipx,flipy, |
| 155 | 126 | sx,sy, |
| 156 | | |
| 127 | | |
| 157 | 128 | } |
| 158 | 129 | |
| 159 | 130 | /* This is the second set of 8 sprites */ |
| r1527 | r1528 | |
| 183 | 154 | spriteram[offs+1]%16, |
| 184 | 155 | flipx,flipy, |
| 185 | 156 | sx,sy, |
| 186 | | |
| 157 | | |
| 187 | 158 | } |
| 188 | 159 | |
| 189 | 160 | return 0; |
| r1527 | r1528 | |
|---|---|---|
| 9 | 9 | #include "driver.h" |
| 10 | 10 | |
| 11 | 11 | |
| 12 | static tilemap *toptilemap; | |
| 13 | static tilemap *bottilemap; | |
| 12 | static tilemap *punchout_topTilemap; | |
| 13 | static tilemap *punchout_botTilemap; | |
| 14 | ||
| 14 | 15 | static tilemap *spr1tilemap; |
| 16 | static tilemap *spr1alttilemap; | |
| 15 | 17 | static tilemap *spr2tilemap; |
| 16 | 18 | static tilemap *fgtilemap; |
| 17 | 19 | |
| 18 | UINT8 *punchout_videoram2; | |
| 19 | UINT8 *armwrest_videoram3; | |
| 20 | UINT8 *punchout_topTilemap_ram; | |
| 21 | UINT8 *punchout_botTilemap_ram; | |
| 22 | UINT8 *punchout_botTilemap_scroll_ram; | |
| 23 | UINT8 *armwrest_fgTilemap_ram; | |
| 20 | 24 | UINT8 *punchout_bigsprite1ram; |
| 21 | 25 | UINT8 *punchout_bigsprite2ram; |
| 22 | UINT8 *punchout_scroll; | |
| 23 | 26 | UINT8 *punchout_bigsprite1; |
| 24 | 27 | UINT8 *punchout_bigsprite2; |
| 25 | 28 | UINT8 *punchout_palettebank; |
| r1527 | r1528 | |
| 187 | 190 | ***************************************************************************/ |
| 188 | 191 | static TILE_GET_INFO( top_get_info ) |
| 189 | 192 | { |
| 190 | int code = videoram[tile_index*2] + 256 * (videoram[tile_index*2 + 1] & 0x03); | |
| 191 | int color = ((videoram[tile_index*2 + 1] & 0x7c) >> 2) + 64 * top_palette_bank; | |
| 192 | int flipx = videoram[tile_index*2 + 1] & 0x80; | |
| 193 | int code = punchout_topTilemap_ram[tile_index*2] + 256 * (punchout_topTilemap_ram[tile_index*2 + 1] & 0x03); | |
| 194 | int color = ((punchout_topTilemap_ram[tile_index*2 + 1] & 0x7c) >> 2) + 64 * top_palette_bank; | |
| 195 | int flipx = punchout_topTilemap_ram[tile_index*2 + 1] & 0x80; | |
| 193 | 196 | SET_TILE_INFO(0, code, color, flipx ? TILE_FLIPX : 0); |
| 194 | 197 | } |
| 195 | 198 | |
| 196 | 199 | static TILE_GET_INFO( bot_get_info ) |
| 197 | 200 | { |
| 198 | int code = punchout_videoram2[tile_index*2] + 256 * (punchout_videoram2[tile_index*2 + 1] & 0x03); | |
| 199 | int color = ((punchout_videoram2[tile_index*2 + 1] & 0x7c) >> 2) + 64 * bottom_palette_bank; | |
| 200 | int flipx = punchout_videoram2[tile_index*2 + 1] & 0x80; | |
| 201 | int code = punchout_botTilemap_ram[tile_index*2] + 256 * (punchout_botTilemap_ram[tile_index*2 + 1] & 0x03); | |
| 202 | int color = ((punchout_botTilemap_ram[tile_index*2 + 1] & 0x7c) >> 2) + 64 * bottom_palette_bank; | |
| 203 | int flipx = punchout_botTilemap_ram[tile_index*2 + 1] & 0x80; | |
| 201 | 204 | SET_TILE_INFO(1, code, color, flipx ? TILE_FLIPX : 0); |
| 202 | 205 | } |
| 203 | 206 | |
| r1527 | r1528 | |
| 219 | 222 | |
| 220 | 223 | VIDEO_START( punchout ) |
| 221 | 224 | { |
| 222 | toptilemap = tilemap_create(top_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 223 | bottilemap = tilemap_create(bot_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 64,32); | |
| 224 | tilemap_set_scroll_rows(bottilemap, 32); | |
| 225 | punchout_topTilemap = tilemap_create(top_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 226 | punchout_botTilemap = tilemap_create(bot_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 64,32); | |
| 227 | tilemap_set_scroll_rows(punchout_botTilemap, 32); | |
| 225 | 228 | |
| 226 | 229 | spr1tilemap = tilemap_create(bs1_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 16,32); |
| 230 | spr1alttilemap = tilemap_create(bs1_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 16,32); | |
| 227 | 231 | spr2tilemap = tilemap_create(bs2_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 16,32); |
| 228 | 232 | |
| 229 | 233 | fgtilemap = NULL; |
| r1527 | r1528 | |
| 233 | 237 | |
| 234 | 238 | static TILE_GET_INFO( armwrest_top_get_info ) |
| 235 | 239 | { |
| 236 | int code = videoram[tile_index*2] + 256 * (videoram[tile_index*2 + 1] & 0x03) + | |
| 237 | 8 * (videoram[tile_index*2 + 1] & 0x80); | |
| 238 | int color = ((videoram[tile_index*2 + 1] & 0x7c) >> 2) + 64 * top_palette_bank; | |
| 240 | int code = punchout_topTilemap_ram[tile_index*2] + 256 * (punchout_topTilemap_ram[tile_index*2 + 1] & 0x03) + | |
| 241 | 8 * (punchout_topTilemap_ram[tile_index*2 + 1] & 0x80); | |
| 242 | int color = ((punchout_topTilemap_ram[tile_index*2 + 1] & 0x7c) >> 2) + 64 * top_palette_bank; | |
| 239 | 243 | SET_TILE_INFO(0, code, color, 0); |
| 240 | 244 | } |
| 241 | 245 | |
| 242 | 246 | static TILE_GET_INFO( armwrest_bot_get_info ) |
| 243 | 247 | { |
| 244 | int code = punchout_videoram2[tile_index*2] + 256 * (punchout_videoram2[tile_index*2 + 1] & 0x03); | |
| 245 | int color = 128 + ((punchout_videoram2[tile_index*2 + 1] & 0x7c) >> 2) + 64 * bottom_palette_bank; | |
| 246 | int flipx = punchout_videoram2[tile_index*2 + 1] & 0x80; | |
| 248 | int code = punchout_botTilemap_ram[tile_index*2] + 256 * (punchout_botTilemap_ram[tile_index*2 + 1] & 0x03); | |
| 249 | int color = 128 + ((punchout_botTilemap_ram[tile_index*2 + 1] & 0x7c) >> 2) + 64 * bottom_palette_bank; | |
| 250 | int flipx = punchout_botTilemap_ram[tile_index*2 + 1] & 0x80; | |
| 247 | 251 | SET_TILE_INFO(0, code, color, flipx ? TILE_FLIPX : 0); |
| 248 | 252 | } |
| 249 | 253 | |
| r1527 | r1528 | |
| 253 | 257 | return (col/halfcols)*(halfcols*num_rows) + row*halfcols + col%halfcols; |
| 254 | 258 | } |
| 255 | 259 | |
| 260 | static TILEMAP_MAPPER( armwrest_bs1alt_scan ) | |
| 261 | { | |
| 262 | int halfcols = num_cols/2; | |
| 263 | col ^=0x10; | |
| 264 | return (col/halfcols)*(halfcols*num_rows) + row*halfcols + col%halfcols; | |
| 265 | } | |
| 266 | ||
| 267 | ||
| 268 | ||
| 256 | 269 | static TILE_GET_INFO( armwrest_fg_get_info ) |
| 257 | 270 | { |
| 258 | int code = armwrest_videoram3[tile_index*2] + 256 * (armwrest_videoram3[tile_index*2 + 1] & 0x07); | |
| 259 | int color = ((armwrest_videoram3[tile_index*2 + 1] & 0xf8) >> 3) + 32 * bottom_palette_bank; | |
| 260 | int flipx = armwrest_videoram3[tile_index*2 + 1] & 0x80; | |
| 271 | int code = armwrest_fgTilemap_ram[tile_index*2] + 256 * (armwrest_fgTilemap_ram[tile_index*2 + 1] & 0x07); | |
| 272 | int color = ((armwrest_fgTilemap_ram[tile_index*2 + 1] & 0xf8) >> 3) + 32 * bottom_palette_bank; | |
| 273 | int flipx = armwrest_fgTilemap_ram[tile_index*2 + 1] & 0x80; | |
| 261 | 274 | SET_TILE_INFO(1, code, color, flipx ? TILE_FLIPX : 0); |
| 262 | 275 | } |
| 263 | 276 | |
| 264 | 277 | VIDEO_START( armwrest ) |
| 265 | 278 | { |
| 266 | toptilemap = tilemap_create(armwrest_top_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 267 | bottilemap = tilemap_create(armwrest_bot_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 279 | punchout_topTilemap = tilemap_create(armwrest_top_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 280 | punchout_botTilemap = tilemap_create(armwrest_bot_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 268 | 281 | |
| 269 | 282 | spr1tilemap = tilemap_create(bs1_get_info, armwrest_bs1_scan, TILEMAP_TYPE_PEN, 8,8, 32,16); |
| 283 | spr1alttilemap = tilemap_create(bs1_get_info, armwrest_bs1alt_scan, TILEMAP_TYPE_PEN, 8,8, 32,16); | |
| 270 | 284 | spr2tilemap = tilemap_create(bs2_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 16,32); |
| 271 | 285 | |
| 272 | 286 | fgtilemap = tilemap_create(armwrest_fg_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); |
| r1527 | r1528 | |
| 275 | 289 | |
| 276 | 290 | |
| 277 | 291 | |
| 278 | WRITE8_HANDLER( punchout_ | |
| 292 | WRITE8_HANDLER( punchout_topTilemap_ram_w ) | |
| 279 | 293 | { |
| 280 | videoram[offset] = data; | |
| 281 | tilemap_mark_tile_dirty(toptilemap, offset/2); | |
| 294 | punchout_topTilemap_ram[offset] = data; | |
| 295 | tilemap_mark_tile_dirty(punchout_topTilemap, offset/2); | |
| 282 | 296 | } |
| 283 | 297 | |
| 284 | WRITE8_HANDLER( punchout_ | |
| 298 | WRITE8_HANDLER( punchout_botTilemap_ram | |
| 285 | 299 | { |
| 286 | punchout_videoram2[offset] = data; | |
| 287 | tilemap_mark_tile_dirty(bottilemap, offset/2); | |
| 300 | punchout_botTilemap_ram[offset] = data; | |
| 301 | tilemap_mark_tile_dirty(punchout_botTilemap, offset/2); | |
| 288 | 302 | } |
| 289 | 303 | |
| 290 | WRITE8_HANDLER( armwrest_ | |
| 304 | WRITE8_HANDLER( armwrest_fgTilemap_ram | |
| 291 | 305 | { |
| 292 | armwrest_ | |
| 306 | armwrest_fgTilemap_ram | |
| 293 | 307 | tilemap_mark_tile_dirty(fgtilemap, offset/2); |
| 294 | 308 | } |
| 295 | 309 | |
| r1527 | r1528 | |
| 297 | 311 | { |
| 298 | 312 | punchout_bigsprite1ram[offset] = data; |
| 299 | 313 | tilemap_mark_tile_dirty(spr1tilemap, offset/4); |
| 314 | if (spr1alttilemap) tilemap_mark_tile_dirty(spr1alttilemap, offset/4); | |
| 300 | 315 | } |
| 301 | 316 | |
| 302 | 317 | WRITE8_HANDLER( punchout_bigsprite2ram_w ) |
| r1527 | r1528 | |
| 314 | 329 | if (top_palette_bank != ((data >> 1) & 0x01)) |
| 315 | 330 | { |
| 316 | 331 | top_palette_bank = (data >> 1) & 0x01; |
| 317 | tilemap_mark_all_tiles_dirty(top | |
| 332 | tilemap_mark_all_tiles_dirty(punchout_topTilemap); | |
| 318 | 333 | } |
| 319 | 334 | if (bottom_palette_bank != ((data >> 0) & 0x01)) |
| 320 | 335 | { |
| 321 | 336 | bottom_palette_bank = (data >> 0) & 0x01; |
| 322 | 337 | if (fgtilemap != NULL) |
| 323 | 338 | tilemap_mark_all_tiles_dirty(fgtilemap); |
| 324 | tilemap_mark_all_tiles_dirty(bot | |
| 339 | tilemap_mark_all_tiles_dirty(punchout_botTilemap); | |
| 325 | 340 | tilemap_mark_all_tiles_dirty(spr1tilemap); |
| 326 | 341 | tilemap_mark_all_tiles_dirty(spr2tilemap); |
| 327 | 342 | } |
| r1527 | r1528 | |
| 370 | 385 | } |
| 371 | 386 | } |
| 372 | 387 | |
| 388 | ||
| 389 | static void armwrest_draw_big_sprite(mame_bitmap *bitmap, const rectangle *cliprect) | |
| 390 | { | |
| 391 | int zoom; | |
| 392 | ||
| 393 | zoom = punchout_bigsprite1[0] + 256 * (punchout_bigsprite1[1] & 0x0f); | |
| 394 | if (zoom) | |
| 395 | { | |
| 396 | mame_bitmap *sprbitmap; | |
| 397 | int sx,sy; | |
| 398 | UINT32 startx,starty; | |
| 399 | int incxx,incyy; | |
| 400 | ||
| 401 | sx = 4096 - (punchout_bigsprite1[2] + 256 * (punchout_bigsprite1[3] & 0x0f)); | |
| 402 | if (sx > 2048) sx -= 4096; | |
| 403 | ||
| 404 | sy = -(punchout_bigsprite1[4] + 256 * (punchout_bigsprite1[5] & 1)); | |
| 405 | if (sy <= -256 + zoom/0x40) sy += 512; | |
| 406 | sy += 12; | |
| 407 | ||
| 408 | incxx = zoom << 6; | |
| 409 | incyy = zoom << 6; | |
| 410 | ||
| 411 | startx = -sx * 0x4000; | |
| 412 | starty = -sy * 0x10000; | |
| 413 | startx += 3740 * zoom; /* adjustment to match the screen shots */ | |
| 414 | starty -= 178 * zoom; /* and make the hall of fame picture nice */ | |
| 415 | ||
| 416 | sprbitmap = tilemap_get_pixmap(spr1tilemap); | |
| 417 | ||
| 418 | if (punchout_bigsprite1[6] & 1) /* flip x */ | |
| 419 | { | |
| 420 | sprbitmap = tilemap_get_pixmap(spr1alttilemap); // when you catch the money bag in armwrest it either expects wraparound, or a different layout.. | |
| 421 | startx = (bitmap->width << 16) - startx - 1; | |
| 422 | incxx = -incxx; | |
| 423 | } | |
| 424 | ||
| 425 | copyrozbitmap(bitmap,sprbitmap, | |
| 426 | startx,starty + 0x200*(2) * zoom, | |
| 427 | incxx,0,0,incyy, /* zoom, no rotation */ | |
| 428 | 0, /* no wraparound */ | |
| 429 | cliprect,TRANSPARENCY_COLOR,1024,0); | |
| 430 | } | |
| 431 | } | |
| 432 | ||
| 373 | 433 | static void drawbs2(mame_bitmap *bitmap, const rectangle *cliprect) |
| 374 | 434 | { |
| 375 | 435 | mame_bitmap *sprbitmap = tilemap_get_pixmap(spr2tilemap); |
| r1527 | r1528 | |
| 392 | 452 | { |
| 393 | 453 | if (screen == 1) |
| 394 | 454 | { |
| 395 | tilemap_draw(bitmap, cliprect, top | |
| 455 | tilemap_draw(bitmap, cliprect, punchout_topTilemap, 0, 0); | |
| 396 | 456 | |
| 397 | 457 | if (punchout_bigsprite1[7] & 1) /* display in top monitor */ |
| 398 | 458 | draw_big_sprite(bitmap, cliprect); |
| r1527 | r1528 | |
| 403 | 463 | |
| 404 | 464 | /* copy the character mapped graphics */ |
| 405 | 465 | for (offs = 0;offs < 32;offs++) |
| 406 | tilemap_set_scrollx(bot | |
| 466 | tilemap_set_scrollx(punchout_botTilemap, offs, 58 + punchout_botTilemap_scroll_ram[2*offs] + 256 * (punchout_botTilemap_scroll_ram[2*offs + 1] & 0x01)); | |
| 407 | 467 | |
| 408 | tilemap_draw(bitmap, cliprect, bot | |
| 468 | tilemap_draw(bitmap, cliprect, punchout_botTilemap, 0, 0); | |
| 409 | 469 | |
| 410 | 470 | if (punchout_bigsprite1[7] & 2) /* display in bottom monitor */ |
| 411 | 471 | draw_big_sprite(bitmap, cliprect); |
| r1527 | r1528 | |
| 419 | 479 | { |
| 420 | 480 | if (screen == 1) |
| 421 | 481 | { |
| 422 | tilemap_draw(bitmap, cliprect, top | |
| 482 | tilemap_draw(bitmap, cliprect, punchout_topTilemap, 0, 0); | |
| 423 | 483 | |
| 424 | 484 | if (punchout_bigsprite1[7] & 1) /* display in top monitor */ |
| 425 | draw_big_sprite(bitmap, cliprect); | |
| 485 | armwrest_draw_big_sprite(bitmap, cliprect); | |
| 426 | 486 | } |
| 427 | 487 | else |
| 428 | 488 | { |
| 429 | tilemap_draw(bitmap, cliprect, bot | |
| 489 | tilemap_draw(bitmap, cliprect, punchout_botTilemap, 0, 0); | |
| 430 | 490 | |
| 431 | 491 | if (punchout_bigsprite1[7] & 2) /* display in bottom monitor */ |
| 432 | draw_big_sprite(bitmap, cliprect); | |
| 492 | armwrest_draw_big_sprite(bitmap, cliprect); | |
| 433 | 493 | drawbs2(bitmap, cliprect); |
| 434 | 494 | |
| 435 | 495 | tilemap_draw(bitmap, cliprect, fgtilemap, 0, 0); |
| r1527 | r1528 | |
|---|---|---|
| 68 | 68 | |
| 69 | 69 | VIDEO_START( finalizr ) |
| 70 | 70 | { |
| 71 | dirtybuffer = 0; | |
| 72 | tmpbitmap = 0; | |
| 73 | ||
| 74 | dirtybuffer = auto_malloc(videoram_size); | |
| 75 | memset(dirtybuffer,1,videoram_size); | |
| 76 | ||
| 77 | 71 | tmpbitmap = auto_bitmap_alloc(256,256,machine->screen[0].format); |
| 78 | 72 | } |
| 79 | 73 | |
| r1527 | r1528 | |
| 81 | 75 | |
| 82 | 76 | WRITE8_HANDLER( finalizr_videoctrl_w ) |
| 83 | 77 | { |
| 84 | if (charbank != (data & 3)) | |
| 85 | { | |
| 86 | charbank = data & 3; | |
| 87 | memset(dirtybuffer,1,videoram_size); | |
| 88 | } | |
| 78 | charbank = data & 3; | |
| 89 | 79 | |
| 90 | 80 | spriterambank = data & 8; |
| 91 | 81 | |
| r1527 | r1528 | |
| 99 | 89 | int offs; |
| 100 | 90 | |
| 101 | 91 | |
| 102 | /* for every character in the Video RAM, check if it has been modified */ | |
| 103 | /* since last time and update it accordingly. */ | |
| 92 | /* for every character in the Video RAM */ | |
| 104 | 93 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 105 | 94 | { |
| 106 | if (dirtybuffer[offs]) | |
| 107 | { | |
| 108 | int sx,sy; | |
| 95 | int sx,sy; | |
| 109 | 96 | |
| 110 | 97 | |
| 111 | dirtybuffer[offs] = 0; | |
| 98 | sx = offs % 32; | |
| 99 | sy = offs / 32; | |
| 112 | 100 | |
| 113 | sx = offs % 32; | |
| 114 | sy = offs / 32; | |
| 115 | ||
| 116 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 117 | videoram[offs] + ((colorram[offs] & 0xc0) << 2) + (charbank<<10), | |
| 118 | (colorram[offs] & 0x0f), | |
| 119 | colorram[offs] & 0x10,colorram[offs] & 0x20, | |
| 120 | 8*sx,8*sy, | |
| 121 | 0,TRANSPARENCY_NONE,0); | |
| 122 | } | |
| 101 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 102 | videoram[offs] + ((colorram[offs] & 0xc0) << 2) + (charbank<<10), | |
| 103 | (colorram[offs] & 0x0f), | |
| 104 | colorram[offs] & 0x10,colorram[offs] & 0x20, | |
| 105 | 8*sx,8*sy, | |
| 106 | 0,TRANSPARENCY_NONE,0); | |
| 123 | 107 | } |
| 124 | 108 | |
| 125 | 109 |
| r1527 | r1528 | |
|---|---|---|
| 90 | 90 | /* Check if we need to draw more just the overscan color */ |
| 91 | 91 | if ( vdc[0].current_segment == STATE_VDW ) { |
| 92 | 92 | /* 0 - no sprite and background pixels drawn |
| 93 | 1 - background pixel drawn | |
| 94 | otherwise is 2 + sprite# */ | |
| 93 | 1 - background pixel drawn | |
| 94 | otherwise is 2 + sprite# */ | |
| 95 | 95 | UINT8 drawn[VDC_WPF]; |
| 96 | 96 | /* our line buffer */ |
| 97 | 97 | UINT16 *line_buffer = BITMAP_ADDR16( vce.bmp, vce.current_bitmap_line, 86 ); |
| r1527 | r1528 | |
| 130 | 130 | /* Check if we need to draw more just the overscan color */ |
| 131 | 131 | if ( vdc[0].current_segment == STATE_VDW ) { |
| 132 | 132 | /* 0 - no sprite and background pixels drawn |
| 133 | 1 - background pixel drawn | |
| 134 | otherwise is 2 + sprite# */ | |
| 133 | 1 - background pixel drawn | |
| 134 | otherwise is 2 + sprite# */ | |
| 135 | 135 | UINT8 drawn[2][512]; |
| 136 | 136 | UINT16 *line_buffer; |
| 137 | 137 | UINT16 temp_buffer[2][512]; |
| r1527 | r1528 | |
| 190 | 190 | } |
| 191 | 191 | break; |
| 192 | 192 | case 2: /* BG1 + SP1 => SP1 |
| 193 | BG0 + SP1 => BG0 | |
| 194 | BG0 + BG1 => BG0 | |
| 195 | BG0 + SP0 => SP0 | |
| 196 | BG1 + SP0 => BG1 | |
| 197 | SP0 + SP1 => SP0 */ | |
| 193 | BG0 + SP1 => BG0 | |
| 194 | BG0 + BG1 => BG0 | |
| 195 | BG0 + SP0 => SP0 | |
| 196 | BG1 + SP0 => BG1 | |
| 197 | SP0 + SP1 => SP0 */ | |
| 198 | 198 | if ( drawn[0][i] ) { |
| 199 | 199 | if ( drawn[0][i] > 1 ) { |
| 200 | 200 | if ( drawn[1][i] == 1 ) { |
| r1527 | r1528 | |
| 326 | 326 | int i; |
| 327 | 327 | |
| 328 | 328 | vdc[which].dvssr_write = 0; |
| 329 | ||
| 329 | #ifdef MAME_DEBUG | |
| 330 | 330 | assert(((vdc[which].vdc_data[DVSSR].w<<1) + 512) <= 0x10000); |
| 331 | ||
| 331 | #endif | |
| 332 | 332 | for( i = 0; i < 256; i++ ) { |
| 333 | 333 | vdc[which].sprite_ram[i] = ( vdc[which].vram[ ( vdc[which].vdc_data[DVSSR].w << 1 ) + i * 2 + 1 ] << 8 ) | vdc[which].vram[ ( vdc[which].vdc_data[DVSSR].w << 1 ) + i * 2 ]; |
| 334 | 334 | } |
| r1527 | r1528 | |
| 475 | 475 | break; |
| 476 | 476 | |
| 477 | 477 | case LENR: |
| 478 | // | |
| 478 | // logerror("LENR LSB = %02X\n", data); | |
| 479 | 479 | break; |
| 480 | 480 | case SOUR: |
| 481 | // | |
| 481 | // logerror("SOUR LSB = %02X\n", data); | |
| 482 | 482 | break; |
| 483 | 483 | case DESR: |
| 484 | // | |
| 484 | // logerror("DESR LSB = %02X\n", data); | |
| 485 | 485 | break; |
| 486 | 486 | } |
| 487 | 487 | break; |
| r1527 | r1528 | |
| 522 | 522 | vdc_do_dma( which ); |
| 523 | 523 | break; |
| 524 | 524 | case SOUR: |
| 525 | // | |
| 525 | // logerror("SOUR MSB = %02X\n", data); | |
| 526 | 526 | break; |
| 527 | 527 | case DESR: |
| 528 | // | |
| 528 | // logerror("DESR MSB = %02X\n", data); | |
| 529 | 529 | break; |
| 530 | 530 | } |
| 531 | 531 | break; |
| r1527 | r1528 | |
| 897 | 897 | } |
| 898 | 898 | |
| 899 | 899 | /* 32 pixel wide sprites are counted as 2 sprites and the right half |
| 900 | is only drawn if there are 2 open slots. | |
| 901 | */ | |
| 900 | is only drawn if there are 2 open slots. | |
| 901 | */ | |
| 902 | 902 | sprites_drawn++; |
| 903 | 903 | if( sprites_drawn > 16 ) { |
| 904 | 904 | vdc[which].status |= VDC_OR; |
| r1527 | r1528 | |
|---|---|---|
| 14 | 14 | size_t goldstar_video_size; |
| 15 | 15 | UINT8 *goldstar_scroll1, *goldstar_scroll2, *goldstar_scroll3; |
| 16 | 16 | |
| 17 | static UINT8 *dirtybuffer1, *dirtybuffer2, *dirtybuffer3; | |
| 18 | 17 | static mame_bitmap *tmpbitmap1, *tmpbitmap2, *tmpbitmap3; |
| 19 | 18 | static int bgcolor; |
| 20 | 19 | |
| r1527 | r1528 | |
| 31 | 30 | |
| 32 | 31 | video_start_generic(machine); |
| 33 | 32 | |
| 34 | dirtybuffer1 = auto_malloc(3 * goldstar_video_size * sizeof(UINT8)); | |
| 35 | dirtybuffer2 = dirtybuffer1 + goldstar_video_size; | |
| 36 | dirtybuffer3 = dirtybuffer2 + goldstar_video_size; | |
| 37 | ||
| 38 | 33 | /* the background area is half as high as the screen */ |
| 39 | 34 | tmpbitmap1 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 40 | 35 | tmpbitmap2 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| r1527 | r1528 | |
| 47 | 42 | |
| 48 | 43 | |
| 49 | 44 | |
| 50 | WRITE8_HANDLER( goldstar_video1_w ) | |
| 51 | { | |
| 52 | if (goldstar_video1[offset] != data) | |
| 53 | { | |
| 54 | dirtybuffer1[offset] = 1; | |
| 55 | goldstar_video1[offset] = data; | |
| 56 | } | |
| 57 | } | |
| 58 | WRITE8_HANDLER( goldstar_video2_w ) | |
| 59 | { | |
| 60 | if (goldstar_video2[offset] != data) | |
| 61 | { | |
| 62 | dirtybuffer2[offset] = 1; | |
| 63 | goldstar_video2[offset] = data; | |
| 64 | } | |
| 65 | } | |
| 66 | WRITE8_HANDLER( goldstar_video3_w ) | |
| 67 | { | |
| 68 | if (goldstar_video3[offset] != data) | |
| 69 | { | |
| 70 | dirtybuffer3[offset] = 1; | |
| 71 | goldstar_video3[offset] = data; | |
| 72 | } | |
| 73 | } | |
| 74 | ||
| 75 | ||
| 76 | ||
| 77 | 45 | WRITE8_HANDLER( goldstar_fa00_w ) |
| 78 | 46 | { |
| 79 | 47 | /* bit 1 toggles continuously - might be irq enable or watchdog reset */ |
| 80 | 48 | |
| 81 | 49 | /* bit 2 selects background gfx color (I think) */ |
| 82 | if (bgcolor != ((data & 0x04) >> 2)) | |
| 83 | { | |
| 84 | bgcolor = (data & 0x04) >> 2; | |
| 85 | memset(dirtybuffer1,1,goldstar_video_size); | |
| 86 | memset(dirtybuffer2,1,goldstar_video_size); | |
| 87 | memset(dirtybuffer3,1,goldstar_video_size); | |
| 88 | } | |
| 50 | bgcolor = (data & 0x04) >> 2; | |
| 89 | 51 | } |
| 90 | 52 | |
| 91 | 53 | |
| r1527 | r1528 | |
| 100 | 62 | int offs; |
| 101 | 63 | |
| 102 | 64 | |
| 103 | // if (palette_recalc()) | |
| 104 | { | |
| 105 | memset(dirtybuffer,1,videoram_size); | |
| 106 | memset(dirtybuffer1,1,goldstar_video_size); | |
| 107 | memset(dirtybuffer2,1,goldstar_video_size); | |
| 108 | memset(dirtybuffer3,1,goldstar_video_size); | |
| 109 | } | |
| 110 | ||
| 111 | 65 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 112 | 66 | { |
| 113 | if (dirtybuffer[offs]) | |
| 114 | { | |
| 115 | int sx,sy; | |
| 67 | int sx,sy; | |
| 116 | 68 | |
| 117 | 69 | |
| 118 | dirtybuffer[offs] = 0; | |
| 70 | sx = offs % 64; | |
| 71 | sy = offs / 64; | |
| 119 | 72 | |
| 120 | sx = offs % 64; | |
| 121 | sy = offs / 64; | |
| 122 | ||
| 123 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 124 | videoram[offs] + ((colorram[offs] & 0xf0) << 4), | |
| 125 | colorram[offs] & 0x0f, | |
| 126 | 0,0, | |
| 127 | 8*sx,8*sy, | |
| 128 | 0,TRANSPARENCY_NONE,0); | |
| 129 | } | |
| 73 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 74 | videoram[offs] + ((colorram[offs] & 0xf0) << 4), | |
| 75 | colorram[offs] & 0x0f, | |
| 76 | 0,0, | |
| 77 | 8*sx,8*sy, | |
| 78 | 0,TRANSPARENCY_NONE,0); | |
| 130 | 79 | } |
| 131 | 80 | |
| 132 | 81 | copybitmap(bitmap,tmpbitmap,0,0,0,0,cliprect,TRANSPARENCY_NONE,0); |
| r1527 | r1528 | |
| 138 | 87 | int sy = offs / 64; |
| 139 | 88 | |
| 140 | 89 | |
| 141 | if (dirtybuffer1[offs]) | |
| 142 | { | |
| 143 | dirtybuffer1[offs] = 0; | |
| 90 | drawgfx(tmpbitmap1,machine->gfx[1], | |
| 91 | goldstar_video1[offs], | |
| 92 | bgcolor, | |
| 93 | 0,0, | |
| 94 | sx*8,sy*32, | |
| 95 | 0,TRANSPARENCY_NONE,0); | |
| 144 | 96 | |
| 145 | drawgfx(tmpbitmap1,machine->gfx[1], | |
| 146 | goldstar_video1[offs], | |
| 147 | bgcolor, | |
| 148 | 0,0, | |
| 149 | sx*8,sy*32, | |
| 150 | 0,TRANSPARENCY_NONE,0); | |
| 151 | } | |
| 97 | drawgfx(tmpbitmap2,machine->gfx[1], | |
| 98 | goldstar_video2[offs], | |
| 99 | bgcolor, | |
| 100 | 0,0, | |
| 101 | sx*8,sy*32, | |
| 102 | 0,TRANSPARENCY_NONE,0); | |
| 152 | 103 | |
| 153 | if (dirtybuffer2[offs]) | |
| 154 | { | |
| 155 | dirtybuffer2[offs] = 0; | |
| 156 | ||
| 157 | drawgfx(tmpbitmap2,machine->gfx[1], | |
| 158 | goldstar_video2[offs], | |
| 159 | bgcolor, | |
| 160 | 0,0, | |
| 161 | sx*8,sy*32, | |
| 162 | 0,TRANSPARENCY_NONE,0); | |
| 163 | } | |
| 164 | ||
| 165 | if (dirtybuffer3[offs]) | |
| 166 | { | |
| 167 | dirtybuffer3[offs] = 0; | |
| 168 | ||
| 169 | drawgfx(tmpbitmap3,machine->gfx[1], | |
| 170 | goldstar_video3[offs], | |
| 171 | bgcolor, | |
| 172 | 0,0, | |
| 173 | sx*8,sy*32, | |
| 174 | 0,TRANSPARENCY_NONE,0); | |
| 175 | } | |
| 104 | drawgfx(tmpbitmap3,machine->gfx[1], | |
| 105 | goldstar_video3[offs], | |
| 106 | bgcolor, | |
| 107 | 0,0, | |
| 108 | sx*8,sy*32, | |
| 109 | 0,TRANSPARENCY_NONE,0); | |
| 176 | 110 | } |
| 177 | 111 | |
| 178 | 112 | { |
| r1527 | r1528 | |
|---|---|---|
| 1 | 1 | |
| 2 | 2 | #include "driver.h" |
| 3 | #include "video/generic.h" | |
| 3 | 4 | |
| 4 | 5 | VIDEO_START( pce ); |
| 5 | 6 | VIDEO_UPDATE( pce ); |
| r1527 | r1528 | |
|---|---|---|
| 90 | 90 | (redalert_backcolor[charnum] != backcolor)) |
| 91 | 91 | { |
| 92 | 92 | redalert_dirtyback[charnum] = 1; |
| 93 | dirtybuffer[charnum] = 1; | |
| 94 | 93 | redalert_backcolor[charnum] = backcolor; |
| 95 | 94 | |
| 96 | 95 | redalert_backram[offset] = data; |
| r1527 | r1528 | |
| 166 | 165 | { |
| 167 | 166 | int offs,i; |
| 168 | 167 | |
| 169 | /* for every character in the Video RAM, check if it has been modified */ | |
| 170 | /* since last time and update it accordingly. */ | |
| 168 | /* for every character in the Video RAM */ | |
| 171 | 169 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 172 | 170 | { |
| 173 | 171 | int charcode; |
| 174 | 172 | int stat_transparent; |
| 173 | int sx,sy,color; | |
| 175 | 174 | |
| 176 | ||
| 177 | 175 | charcode = videoram[offs]; |
| 178 | 176 | |
| 179 | if (dirtybuffer[offs] || redalert_dirtycharacter[charcode] || redalert_dirtycharacter2[charcode]) | |
| 177 | /* decode modified background */ | |
| 178 | if (redalert_dirtyback[offs] == 1) | |
| 180 | 179 | { |
| 181 | int sx,sy,color; | |
| 180 | decodechar(machine->gfx[0],offs,redalert_backram); | |
| 181 | redalert_dirtyback[offs] = 2; | |
| 182 | } | |
| 182 | 183 | |
| 184 | /* decode modified characters */ | |
| 185 | if (redalert_dirtycharacter[charcode] == 1) | |
| 186 | { | |
| 187 | if (charcode < 0x80) | |
| 188 | decodechar(machine->gfx[1],charcode,redalert_characterram); | |
| 189 | else | |
| 190 | decodechar(machine->gfx[2],charcode-0x80,redalert_spriteram1); | |
| 191 | redalert_dirtycharacter[charcode] = 2; | |
| 192 | } | |
| 183 | 193 | |
| 184 | /* decode modified background */ | |
| 185 | if (redalert_dirtyback[offs] == 1) | |
| 186 | { | |
| 187 | decodechar(machine->gfx[0],offs,redalert_backram); | |
| 188 | redalert_dirtyback[offs] = 2; | |
| 189 | } | |
| 194 | if (redalert_dirtycharacter2[charcode] == 1) | |
| 195 | { | |
| 196 | decodechar(machine->gfx[3],charcode-0x80,redalert_spriteram3); | |
| 197 | redalert_dirtycharacter2[charcode] = 2; | |
| 198 | } | |
| 190 | 199 | |
| 191 | /* decode modified characters */ | |
| 192 | if (redalert_dirtycharacter[charcode] == 1) | |
| 193 | { | |
| 194 | if (charcode < 0x80) | |
| 195 | decodechar(machine->gfx[1],charcode,redalert_characterram); | |
| 196 | else | |
| 197 | decodechar(machine->gfx[2],charcode-0x80,redalert_spriteram1); | |
| 198 | redalert_dirtycharacter[charcode] = 2; | |
| 199 | } | |
| 200 | sx = 31 - offs / 32; | |
| 201 | sy = offs % 32; | |
| 200 | 202 | |
| 201 | if (redalert_dirtycharacter2[charcode] == 1) | |
| 202 | { | |
| 203 | decodechar(machine->gfx[3],charcode-0x80,redalert_spriteram3); | |
| 204 | redalert_dirtycharacter2[charcode] = 2; | |
| 205 | } | |
| 203 | stat_transparent = TRANSPARENCY_NONE; | |
| 206 | 204 | |
| 207 | dirtybuffer[offs] = 0; | |
| 205 | /* First layer of color */ | |
| 206 | if (charcode >= 0xC0) | |
| 207 | { | |
| 208 | stat_transparent = TRANSPARENCY_COLOR; | |
| 208 | 209 | |
| 209 | sx = 31 - offs / 32; | |
| 210 | sy = offs % 32; | |
| 210 | color = color_lookup[charcode]; | |
| 211 | 211 | |
| 212 | stat_transparent = TRANSPARENCY_NONE; | |
| 212 | drawgfx(tmpbitmap,machine->gfx[2], | |
| 213 | charcode-0x80, | |
| 214 | color, | |
| 215 | 0,0, | |
| 216 | 8*sx,8*sy, | |
| 217 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 213 | 218 | |
| 214 | /* First layer of color */ | |
| 215 | if (charcode >= 0xC0) | |
| 216 | { | |
| 217 | stat_transparent = TRANSPARENCY_COLOR; | |
| 218 | ||
| 219 | color = color_lookup[charcode]; | |
| 220 | ||
| 221 | drawgfx(tmpbitmap,machine->gfx[2], | |
| 219 | if( redalert_dirtycharacter2[charcode] != 0 ) | |
| 220 | drawgfx(tmpbitmap,machine->gfx[3], | |
| 222 | 221 | charcode-0x80, |
| 223 | 222 | color, |
| 224 | 223 | 0,0, |
| 225 | 224 | 8*sx,8*sy, |
| 226 | &machine->screen[0].visarea,TRANSPARENCY_ | |
| 225 | &machine->screen[0].visarea,TRANSPARENCY_COLOR,0); | |
| 227 | 226 | |
| 228 | if( redalert_dirtycharacter2[charcode] != 0 ) | |
| 229 | drawgfx(tmpbitmap,machine->gfx[3], | |
| 230 | charcode-0x80, | |
| 231 | color, | |
| 232 | 0,0, | |
| 233 | 8*sx,8*sy, | |
| 234 | &machine->screen[0].visarea,TRANSPARENCY_COLOR,0); | |
| 227 | } | |
| 235 | 228 | |
| 236 | } | |
| 229 | /* Second layer - background */ | |
| 230 | color = redalert_backcolor[offs]; | |
| 231 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 232 | offs, | |
| 233 | color, | |
| 234 | 0,0, | |
| 235 | 8*sx,8*sy, | |
| 236 | &machine->screen[0].visarea,stat_transparent,0); | |
| 237 | 237 | |
| 238 | /* Second layer - background */ | |
| 239 | color = redalert_backcolor[offs]; | |
| 240 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 241 | offs, | |
| 238 | /* Third layer - alphanumerics & sprites */ | |
| 239 | if (charcode < 0x80) | |
| 240 | { | |
| 241 | color = color_lookup[charcode]; | |
| 242 | drawgfx(tmpbitmap,machine->gfx[1], | |
| 243 | charcode, | |
| 242 | 244 | color, |
| 243 | 245 | 0,0, |
| 244 | 246 | 8*sx,8*sy, |
| 245 | &machine->screen[0].visarea,stat_transparent,0); | |
| 247 | &machine->screen[0].visarea,TRANSPARENCY_COLOR,0); | |
| 248 | } | |
| 249 | else if (charcode < 0xC0) | |
| 250 | { | |
| 251 | color = color_lookup[charcode]; | |
| 252 | drawgfx(tmpbitmap,machine->gfx[2], | |
| 253 | charcode-0x80, | |
| 254 | color, | |
| 255 | 0,0, | |
| 256 | 8*sx,8*sy, | |
| 257 | &machine->screen[0].visarea,TRANSPARENCY_COLOR,0); | |
| 246 | 258 | |
| 247 | /* Third layer - alphanumerics & sprites */ | |
| 248 | if (charcode < 0x80) | |
| 249 | { | |
| 250 | color = color_lookup[charcode]; | |
| 251 | drawgfx(tmpbitmap,machine->gfx[1], | |
| 252 | charcode, | |
| 253 | color, | |
| 254 | 0,0, | |
| 255 | 8*sx,8*sy, | |
| 256 | &machine->screen[0].visarea,TRANSPARENCY_COLOR,0); | |
| 257 | } | |
| 258 | else if (charcode < 0xC0) | |
| 259 | { | |
| 260 | color = color_lookup[charcode]; | |
| 261 | drawgfx(tmpbitmap,machine->gfx[2], | |
| 259 | if( redalert_dirtycharacter2[charcode] != 0 ) | |
| 260 | drawgfx(tmpbitmap,machine->gfx[3], | |
| 262 | 261 | charcode-0x80, |
| 263 | 262 | color, |
| 264 | 263 | 0,0, |
| 265 | 264 | 8*sx,8*sy, |
| 266 | 265 | &machine->screen[0].visarea,TRANSPARENCY_COLOR,0); |
| 267 | 266 | |
| 268 | if( redalert_dirtycharacter2[charcode] != 0 ) | |
| 269 | drawgfx(tmpbitmap,machine->gfx[3], | |
| 270 | charcode-0x80, | |
| 271 | color, | |
| 272 | 0,0, | |
| 273 | 8*sx,8*sy, | |
| 274 | &machine->screen[0].visarea,TRANSPARENCY_COLOR,0); | |
| 275 | ||
| 276 | } | |
| 277 | ||
| 278 | 267 | } |
| 279 | 268 | } |
| 280 | 269 | |
| r1527 | r1528 | |
| 294 | 283 | } |
| 295 | 284 | |
| 296 | 285 | /* copy the character mapped graphics */ |
| 297 | copybitmap(bitmap,tmpbitmap,flip,flip,0,0, | |
| 286 | copybitmap(bitmap,tmpbitmap,flip,flip,0,0, | |
| 298 | 287 | |
| 299 | 288 | return 0; |
| 300 | 289 | } |
| r1527 | r1528 | |
|---|---|---|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | WRITE8_HANDLER( wiz_attributes_w ) | |
| 95 | { | |
| 96 | if ((offset & 1) && wiz_attributesram[offset] != data) | |
| 97 | { | |
| 98 | int i; | |
| 99 | ||
| 100 | ||
| 101 | for (i = offset / 2;i < videoram_size;i += 32) | |
| 102 | { | |
| 103 | dirtybuffer[i] = 1; | |
| 104 | } | |
| 105 | } | |
| 106 | ||
| 107 | wiz_attributesram[offset] = data; | |
| 108 | } | |
| 109 | ||
| 110 | 94 | WRITE8_HANDLER( wiz_palettebank_w ) |
| 111 | 95 | { |
| 112 | if (palbank[offset] != (data & 1)) | |
| 113 | { | |
| 114 | palbank[offset] = data & 1; | |
| 115 | palette_bank = palbank[0] + 2 * palbank[1]; | |
| 116 | ||
| 117 | memset(dirtybuffer,1,videoram_size); | |
| 118 | } | |
| 96 | palbank[offset] = data & 1; | |
| 97 | palette_bank = palbank[0] + 2 * palbank[1]; | |
| 119 | 98 | } |
| 120 | 99 | |
| 121 | 100 | WRITE8_HANDLER( wiz_bgcolor_w ) |
| r1527 | r1528 | |
| 125 | 104 | |
| 126 | 105 | WRITE8_HANDLER( wiz_char_bank_select_w ) |
| 127 | 106 | { |
| 128 | if (char_bank[offset] != (data & 1)) | |
| 129 | { | |
| 130 | char_bank[offset] = data & 1; | |
| 131 | memset(dirtybuffer,1,videoram_size); | |
| 132 | } | |
| 107 | char_bank[offset] = data & 1; | |
| 133 | 108 | } |
| 134 | 109 | |
| 135 | 110 | WRITE8_HANDLER( wiz_flipx_w ) |
| 136 | 111 | { |
| 137 | if (flipx != data) | |
| 138 | { | |
| 139 | flipx = data; | |
| 140 | ||
| 141 | memset(dirtybuffer, 1, videoram_size); | |
| 142 | } | |
| 112 | flipx = data; | |
| 143 | 113 | } |
| 144 | 114 | |
| 145 | 115 | |
| 146 | 116 | WRITE8_HANDLER( wiz_flipy_w ) |
| 147 | 117 | { |
| 148 | if (flipy != data) | |
| 149 | { | |
| 150 | flipy = data; | |
| 151 | ||
| 152 | memset(dirtybuffer, 1, videoram_size); | |
| 153 | } | |
| 118 | flipy = data; | |
| 154 | 119 | } |
| 155 | 120 | |
| 156 | 121 | static void draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int bank, int colortype) |
| r1527 | r1528 | |
|---|---|---|
| 17 | 17 | static UINT16 blitter_data[8]; |
| 18 | 18 | |
| 19 | 19 | static UINT16 *screenram; |
| 20 | static UINT8 vispage; | |
| 20 | 21 | static UINT16 *blitter_base; |
| 21 | 22 | static int blitter_rows; |
| 22 | 23 | |
| r1527 | r1528 | |
| 25 | 26 | |
| 26 | 27 | |
| 27 | 28 | |
| 29 | ||
| 28 | 30 | /************************************* |
| 29 | 31 | * |
| 30 | 32 | * Compute X/Y coordinates |
| 31 | 33 | * |
| 32 | 34 | *************************************/ |
| 33 | 35 | |
| 34 | INLINE void get_crosshair_xy(int player, int *x, int *y) | |
| 36 | INLINE void get_crosshair_xy(running_machine *machine, int player, int *x, int *y) | |
| 35 | 37 | { |
| 36 | *x = ((readinputport(2 + player * 2) & 0xff) * Machine->screen[0].width) / 255; | |
| 37 | *y = ((readinputport(3 + player * 2) & 0xff) * Machine->screen[0].height) / 255; | |
| 38 | int width = machine->screen[0].visarea.max_x + 1 - machine->screen[0].visarea.min_x; | |
| 39 | int height = machine->screen[0].visarea.max_y + 1 - machine->screen[0].visarea.min_y; | |
| 40 | *x = ((readinputport(2 + player * 2) & 0xff) * width) / 255; | |
| 41 | *y = ((readinputport(3 + player * 2) & 0xff) * height) / 255; | |
| 38 | 42 | } |
| 39 | 43 | |
| 40 | 44 | |
| r1527 | r1528 | |
| 55 | 59 | case 4: |
| 56 | 60 | case 5: |
| 57 | 61 | /* latch the crosshair position */ |
| 58 | get_crosshair_xy(offset - 4, &beamx, &beamy); | |
| 62 | get_crosshair_xy(Machine, offset - 4, &beamx, &beamy); | |
| 59 | 63 | gunx = beamx; |
| 60 | 64 | guny = beamy; |
| 61 | 65 | blank_palette = 1; |
| 62 | 66 | break; |
| 63 | 67 | |
| 64 | 68 | case 6: |
| 65 | result = gunx/2; | |
| 69 | result = gunx / 2; | |
| 66 | 70 | break; |
| 67 | 71 | |
| 68 | 72 | case 7: |
| r1527 | r1528 | |
| 110 | 114 | { |
| 111 | 115 | int dsty = (INT16)blitter_data[1]; |
| 112 | 116 | int srcx = (UINT16)blitter_data[2]; |
| 113 | int srcy = (UINT16)blitter_data[3]; | |
| 117 | int srcy = (UINT16)(blitter_data[3] + 1); | |
| 114 | 118 | int width = (UINT16)blitter_data[5]; |
| 115 | 119 | int dstx = (INT16)blitter_data[6]; |
| 116 | 120 | int height = (UINT16)blitter_data[7]; |
| 117 | 121 | int y; |
| 118 | ||
| 119 | if (srcy == 0xffff) | |
| 120 | { | |
| 121 | return; | |
| 122 | } | |
| 123 | ||
| 124 | /* logerror("blitter data = %04X %04X %04X %04X %04X %04X %04X %04X\n", | |
| 122 | /* | |
| 123 | logerror("blitter data = %04X %04X %04X %04X %04X %04X %04X %04X\n", | |
| 125 | 124 | blitter_data[0], blitter_data[1], blitter_data[2], blitter_data[3], |
| 126 | blitter_data[4], blitter_data[5], blitter_data[6], blitter_data[7]);*/ | |
| 127 | ||
| 125 | blitter_data[4], blitter_data[5], blitter_data[6], blitter_data[7]); | |
| 126 | */ | |
| 128 | 127 | /* loop over Y coordinates */ |
| 129 | 128 | for (y = 0; y <= height; y++, srcy++, dsty++) |
| 130 | 129 | { |
| 131 | UINT16 *source = blitter_base + srcy * BLITTER_SOURCE_WIDTH; | |
| 132 | UINT16 *dest = screenram + dsty * BLITTER_DEST_WIDTH; | |
| 133 | ||
| 134 | 130 | /* clip in Y */ |
| 135 | if (dsty >= 0 && dsty < BLITTER_DEST_HEIGHT) | |
| 131 | if (dsty >= 0 && dsty < BLITTER_DEST_HEIGHT/2) | |
| 136 | 132 | { |
| 133 | UINT16 *source = blitter_base + (srcy % blitter_rows) * BLITTER_SOURCE_WIDTH; | |
| 134 | UINT16 *dest = screenram + (dsty + (vispage ^ 1) * 256) * BLITTER_DEST_WIDTH; | |
| 137 | 135 | int sx = srcx; |
| 138 | 136 | int dx = dstx; |
| 139 | 137 | int x; |
| r1527 | r1528 | |
| 151 | 149 | } |
| 152 | 150 | |
| 153 | 151 | |
| 154 | ||
| 155 | 152 | WRITE16_HANDLER( lethalj_blitter_w ) |
| 156 | 153 | { |
| 157 | 154 | /* combine the data */ |
| r1527 | r1528 | |
| 160 | 157 | /* blit on a write to offset 7, and signal an IRQ */ |
| 161 | 158 | if (offset == 7) |
| 162 | 159 | { |
| 163 | do_blit(); | |
| 164 | timer_set(ATTOTIME_IN_USEC(10), NULL, 0, gen_ext1_int); | |
| 160 | if (blitter_data[6] == 2 && blitter_data[7] == 2) | |
| 161 | vispage ^= 1; | |
| 162 | else | |
| 163 | do_blit(); | |
| 164 | ||
| 165 | timer_set(attotime_mul(ATTOTIME_IN_HZ(XTAL_32MHz), (blitter_data[5] + 1) * (blitter_data[7] + 1)), NULL, 0, gen_ext1_int); | |
| 165 | 166 | } |
| 166 | 167 | |
| 167 | 168 | /* clear the IRQ on offset 0 */ |
| r1527 | r1528 | |
| 179 | 180 | |
| 180 | 181 | void lethalj_scanline_update(running_machine *machine, int screen, mame_bitmap *bitmap, int scanline, const tms34010_display_params *params) |
| 181 | 182 | { |
| 182 | UINT16 *src = &screenram[(params->rowaddr << 9) & 0x3fe00]; | |
| 183 | UINT16 *src = &screenram[(vispage << 17) | ((params->rowaddr << 9) & 0x3fe00)]; | |
| 183 | 184 | UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0); |
| 184 | 185 | int coladdr = params->coladdr << 1; |
| 185 | 186 | int x; |
| r1527 | r1528 | |
|---|---|---|
| 162 | 162 | * |
| 163 | 163 | *************************************/ |
| 164 | 164 | |
| 165 | static void generate_interrupt(int state) | |
| 165 | static void generate_interrupt(running_machine *machine, int state) | |
| 166 | 166 | { |
| 167 | itech8_update_interrupts(-1, state, -1); | |
| 167 | itech8_update_interrupts(machine, -1, state, -1); | |
| 168 | 168 | |
| 169 | 169 | if (FULL_LOGGING && state) logerror("------------ DISPLAY INT (%d) --------------\n", video_screen_get_vpos(0)); |
| 170 | 170 | } |
| r1527 | r1528 | |
| 189 | 189 | VIDEO_START( itech8 ) |
| 190 | 190 | { |
| 191 | 191 | /* initialize TMS34061 emulation */ |
| 192 | tms34061_start(&tms34061intf); | |
| 192 | tms34061_start(machine, &tms34061intf); | |
| 193 | 193 | |
| 194 | 194 | /* get the TMS34061 display state */ |
| 195 | 195 | tms34061_get_display_state(&tms_state); |
| r1527 | r1528 | |
| 443 | 443 | { |
| 444 | 444 | /* turn off blitting and generate an interrupt */ |
| 445 | 445 | blit_in_progress = 0; |
| 446 | itech8_update_interrupts(-1, -1, 1); | |
| 446 | itech8_update_interrupts(machine, -1, -1, 1); | |
| 447 | 447 | |
| 448 | 448 | if (FULL_LOGGING) logerror("------------ BLIT DONE (%d) --------------\n", video_screen_get_vpos(0)); |
| 449 | 449 | } |
| r1527 | r1528 | |
| 469 | 469 | /* a read from offset 3 clears the interrupt and returns the status */ |
| 470 | 470 | if (offset == 3) |
| 471 | 471 | { |
| 472 | itech8_update_interrupts(-1, -1, 0); | |
| 472 | itech8_update_interrupts(Machine, -1, -1, 0); | |
| 473 | 473 | if (blit_in_progress) |
| 474 | 474 | result |= 0x80; |
| 475 | 475 | else |
| r1527 | r1528 | |
| 573 | 573 | { |
| 574 | 574 | UINT32 page_offset; |
| 575 | 575 | int x, y; |
| 576 | const rgb_t *pens = tlc34076_get_pens(); | |
| 576 | 577 | |
| 577 | 578 | /* first get the current display state */ |
| 578 | 579 | tms34061_get_display_state(&tms_state); |
| r1527 | r1528 | |
| 592 | 593 | { |
| 593 | 594 | UINT8 *base0 = &tms_state.vram[(0x00000 + page_offset + y * 256) & 0x3ffff]; |
| 594 | 595 | UINT8 *base2 = &tms_state.vram[(0x20000 + page_offset + y * 256) & 0x3ffff]; |
| 595 | UINT | |
| 596 | UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0); | |
| 596 | 597 | |
| 597 | 598 | for (x = cliprect->min_x; x <= cliprect->max_x; x++) |
| 598 | 599 | { |
| 599 | 600 | int pix0 = base0[x] & 0x0f; |
| 600 | dest[x] = pix0 ? pix0 : base2[x]; | |
| 601 | dest[x] = pens[pix0 ? pix0 : base2[x]]; | |
| 601 | 602 | } |
| 602 | 603 | } |
| 603 | 604 | return 0; |
| r1527 | r1528 | |
| 608 | 609 | { |
| 609 | 610 | UINT32 page_offset; |
| 610 | 611 | int x, y; |
| 612 | const rgb_t *pens = tlc34076_get_pens(); | |
| 611 | 613 | |
| 612 | 614 | /* first get the current display state */ |
| 613 | 615 | tms34061_get_display_state(&tms_state); |
| r1527 | r1528 | |
| 625 | 627 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) |
| 626 | 628 | { |
| 627 | 629 | UINT8 *base = &tms_state.vram[(page_offset + y * 256) & 0x3ffff]; |
| 628 | UINT | |
| 630 | UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0); | |
| 629 | 631 | |
| 630 | 632 | for (x = cliprect->min_x; x <= cliprect->max_x; x++) |
| 631 | dest[x] = base[x]; | |
| 633 | dest[x] = pens[base[x]]; | |
| 632 | 634 | } |
| 633 | 635 | return 0; |
| 634 | 636 | } |
| r1527 | r1528 | |
| 638 | 640 | { |
| 639 | 641 | UINT32 page_offset; |
| 640 | 642 | int x, y; |
| 643 | const rgb_t *pens = tlc34076_get_pens(); | |
| 641 | 644 | |
| 642 | 645 | /* first get the current display state */ |
| 643 | 646 | tms34061_get_display_state(&tms_state); |
| r1527 | r1528 | |
| 658 | 661 | { |
| 659 | 662 | UINT8 *base = &tms_state.vram[(page_offset + y * 256) & 0x3ffff]; |
| 660 | 663 | UINT8 *latch = &tms_state.latchram[(page_offset + y * 256) & 0x3ffff]; |
| 661 | UINT | |
| 664 | UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0); | |
| 662 | 665 | |
| 663 | 666 | for (x = cliprect->min_x & ~1; x <= cliprect->max_x; x += 2) |
| 664 | 667 | { |
| 665 | dest[x + 0] = (latch[x/2] & 0xf0) | (base[x/2] >> 4); | |
| 666 | dest[x + 1] = ((latch[x/2] << 4) & 0xf0) | (base[x/2] & 0x0f); | |
| 668 | dest[x + 0] = pens[(latch[x/2] & 0xf0) | (base[x/2] >> 4)]; | |
| 669 | dest[x + 1] = pens[((latch[x/2] << 4) & 0xf0) | (base[x/2] & 0x0f)]; | |
| 667 | 670 | } |
| 668 | 671 | } |
| 669 | 672 | return 0; |
| r1527 | r1528 | |
|---|---|---|
| 515 | 515 | static void video_start_common(running_machine *machine, tilemap_mapper_callback get_memory_offset) |
| 516 | 516 | { |
| 517 | 517 | bg_tilemap = tilemap_create(get_tile_info,get_memory_offset,TILEMAP_TYPE_PEN,8,8,32,32); |
| 518 | tilemap_set_scrolldx(bg_tilemap, 0, -128); | |
| 519 | 518 | |
| 520 | 519 | tilemap_set_transparent_pen(bg_tilemap,0); |
| 521 | 520 | |
| r1527 | r1528 | |
| 680 | 679 | { |
| 681 | 680 | video_start_galaxian_plain(machine); |
| 682 | 681 | |
| 682 | tilemap_set_scrolldx(bg_tilemap, 0, 0); | |
| 683 | 683 | draw_bullets = darkplnt_draw_bullets; |
| 684 | 684 | } |
| 685 | 685 |
| r1527 | r1528 | |
|---|---|---|
| 67 | 67 | { |
| 68 | 68 | snk_blink_parity = 0; |
| 69 | 69 | |
| 70 | dirtybuffer = auto_malloc( MAX_VRAM_SIZE ); | |
| 71 | ||
| 72 | 70 | tmpbitmap = auto_bitmap_alloc( 512, 512, machine->screen[0].format ); |
| 73 | ||
| 74 | memset( dirtybuffer, 0xff, MAX_VRAM_SIZE ); | |
| 75 | 71 | } |
| 76 | 72 | |
| 77 | 73 | /**************************************************************************************/ |
| r1527 | r1528 | |
| 91 | 87 | tile_number = videoram[offs]; |
| 92 | 88 | attributes = videoram[offs+1]; |
| 93 | 89 | |
| 94 | if( | |
| 90 | if( | |
| 95 | 91 | { |
| 96 | dirtybuffer[offs] = tile_number; | |
| 97 | dirtybuffer[offs+1] = attributes; | |
| 92 | /* type tnk3 */ | |
| 93 | tile_number |= (attributes & 0x30) << 4; | |
| 94 | color = (attributes & 0xf) ^ 8; | |
| 95 | } | |
| 96 | else | |
| 97 | { | |
| 98 | /* type ikari */ | |
| 99 | tile_number |= (attributes & 0x03) << 8; | |
| 100 | color = attributes >> 4; | |
| 101 | } | |
| 98 | 102 | |
| 99 | if(bg_type == 0) | |
| 100 | { | |
| 101 | /* type tnk3 */ | |
| 102 | tile_number |= (attributes & 0x30) << 4; | |
| 103 | color = (attributes & 0xf) ^ 8; | |
| 104 | } | |
| 105 | else | |
| 106 | { | |
| 107 | /* type ikari */ | |
| 108 | tile_number |= (attributes & 0x03) << 8; | |
| 109 | color = attributes >> 4; | |
| 110 | } | |
| 103 | sx = x * 512 / x_size; | |
| 104 | sy = y * 512 / y_size; | |
| 111 | 105 | |
| 112 | sx = x * 512 / x_size; | |
| 113 | sy = y * 512 / y_size; | |
| 114 | ||
| 115 | drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0); | |
| 116 | } | |
| 106 | drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0); | |
| 117 | 107 | } |
| 118 | 108 | copyscrollbitmap(bitmap,tmpbitmap,1,&scrollx,1,&scrolly,cliprect,TRANSPARENCY_NONE,0); |
| 119 | 109 | } |
| r1527 | r1528 | |
| 251 | 241 | |
| 252 | 242 | VIDEO_START( sgladiat ) |
| 253 | 243 | { |
| 254 | dirtybuffer = auto_malloc( MAX_VRAM_SIZE ); | |
| 255 | 244 | tmpbitmap = auto_bitmap_alloc( 512, 256, machine->screen[0].format ); |
| 256 | memset( dirtybuffer, 0xff, MAX_VRAM_SIZE ); | |
| 257 | 245 | } |
| 258 | 246 | |
| 259 | 247 | static void sgladiat_draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int scrollx, int scrolly ) |
| r1527 | r1528 | |
| 268 | 256 | offs = (x<<5)+y; |
| 269 | 257 | tile_number = videoram[offs]; |
| 270 | 258 | |
| 271 | if(tile_number != dirtybuffer[offs]) | |
| 272 | { | |
| 273 | dirtybuffer[offs] = tile_number; | |
| 259 | color = 0; | |
| 260 | sx = x << 3; | |
| 261 | sy = y << 3; | |
| 274 | 262 | |
| 275 | color = 0; | |
| 276 | sx = x << 3; | |
| 277 | sy = y << 3; | |
| 278 | ||
| 279 | drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0); | |
| 280 | } | |
| 263 | drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0); | |
| 281 | 264 | } |
| 282 | 265 | copyscrollbitmap(bitmap,tmpbitmap,1,&scrollx,1,&scrolly,cliprect,TRANSPARENCY_NONE,0); |
| 283 | 266 | } |
| r1527 | r1528 | |
| 391 | 374 | tile_number = source[offs]; |
| 392 | 375 | attributes = source[offs+1]; |
| 393 | 376 | |
| 394 | if(tile_number != dirtybuffer[offs] || attributes != dirtybuffer[offs+1]) | |
| 395 | { | |
| 396 | dirtybuffer[offs] = tile_number; | |
| 397 | dirtybuffer[offs+1] = attributes; | |
| 398 | tile_number |= (attributes & 0xf) << 8; | |
| 377 | tile_number |= (attributes & 0xf) << 8; | |
| 399 | 378 | |
| 400 | color = attributes >> 4; | |
| 401 | sx = x << 4; | |
| 402 | sy = y << 4; | |
| 379 | color = attributes >> 4; | |
| 380 | sx = x << 4; | |
| 381 | sy = y << 4; | |
| 403 | 382 | |
| 404 | // intercept overflown tile indices | |
| 405 | if(tile_number >= gfx->total_elements) | |
| 406 | plot_box(tmpbitmap, sx, sy, gfx->width, gfx->height, get_black_pen(machine)); | |
| 407 | else | |
| 408 | drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0); | |
| 409 | } | |
| 383 | // intercept overflown tile indices | |
| 384 | if(tile_number >= gfx->total_elements) | |
| 385 | plot_box(tmpbitmap, sx, sy, gfx->width, gfx->height, get_black_pen(machine)); | |
| 386 | else | |
| 387 | drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0); | |
| 410 | 388 | } |
| 411 | 389 | copyscrollbitmap(bitmap,tmpbitmap,1,&xscroll,1,&yscroll,cliprect,TRANSPARENCY_NONE,0); |
| 412 | 390 | } |
| r1527 | r1528 | |
|---|---|---|
| 110 | 110 | /* screen flip is handled both by software and hardware */ |
| 111 | 111 | data ^= ~readinputport(4) & 1; |
| 112 | 112 | |
| 113 | if (flipscreen != (data & 1)) | |
| 114 | { | |
| 115 | flipscreen = data & 1; | |
| 116 | memset(dirtybuffer,1,videoram_size); | |
| 117 | } | |
| 113 | flipscreen = data & 1; | |
| 118 | 114 | |
| 119 | 115 | coin_counter_w(0,data & 0x02); |
| 120 | 116 | coin_counter_w(1,data & 0x20); |
| r1527 | r1528 | |
| 130 | 126 | |
| 131 | 127 | for (offs = videoram_size - 2;offs >= 0;offs -= 2) |
| 132 | 128 | { |
| 133 | if (dirtybuffer[offs] || dirtybuffer[offs+1]) | |
| 134 | { | |
| 135 | int sx,sy,code,attr,flipx,flipy; | |
| 129 | int sx,sy,code,attr,flipx,flipy; | |
| 136 | 130 | |
| 137 | 131 | |
| 138 | dirtybuffer[offs] = dirtybuffer[offs+1] = 0; | |
| 132 | sx = (offs/2) % 32; | |
| 133 | sy = (offs/2) / 32; | |
| 139 | 134 | |
| 140 | sx = (offs/2) % 32; | |
| 141 | sy = (offs/2) / 32; | |
| 135 | attr = videoram[offs+0]; | |
| 136 | code = videoram[offs+1] | ((attr & 0xc0) << 2); | |
| 137 | flipx = attr & 0x20; | |
| 138 | flipy = (attr & 0x10) >> 4; | |
| 142 | 139 | |
| 143 | attr = videoram[offs+0]; | |
| 144 | code = videoram[offs+1] | ((attr & 0xc0) << 2); | |
| 145 | flipx = attr & 0x20; | |
| 146 | flipy = (attr & 0x10) >> 4; | |
| 147 | ||
| 148 | if (flipscreen) | |
| 149 | { | |
| 150 | sx = 31 - sx; | |
| 151 | sy = 31 - sy; | |
| 152 | flipx = !flipx; | |
| 153 | } | |
| 154 | ||
| 155 | drawgfx(tmpbitmap,gfx, | |
| 156 | code, | |
| 157 | attr & 0x0f, | |
| 158 | flipx,flipy ^ flipscreen, | |
| 159 | 8*sx,8*sy, | |
| 160 | 0,TRANSPARENCY_NONE,0); | |
| 140 | if (flipscreen) | |
| 141 | { | |
| 142 | sx = 31 - sx; | |
| 143 | sy = 31 - sy; | |
| 144 | flipx = !flipx; | |
| 161 | 145 | } |
| 146 | ||
| 147 | drawgfx(tmpbitmap,gfx, | |
| 148 | code, | |
| 149 | attr & 0x0f, | |
| 150 | flipx,flipy ^ flipscreen, | |
| 151 | 8*sx,8*sy, | |
| 152 | 0,TRANSPARENCY_NONE,0); | |
| 162 | 153 | } |
| 163 | 154 | |
| 164 | 155 | { |
| r1527 | r1528 | |
|---|---|---|
| 64 | 64 | |
| 65 | 65 | WRITE8_HANDLER( wiping_flipscreen_w ) |
| 66 | 66 | { |
| 67 | if (flipscreen != (data & 1)) | |
| 68 | { | |
| 69 | flipscreen = (data & 1); | |
| 70 | memset(dirtybuffer,1,videoram_size); | |
| 71 | } | |
| 67 | flipscreen = (data & 1); | |
| 72 | 68 | } |
| 73 | 69 | |
| 74 | 70 | |
| r1527 | r1528 | |
| 78 | 74 | |
| 79 | 75 | for (offs = videoram_size - 1; offs > 0; offs--) |
| 80 | 76 | { |
| 81 | if (dirtybuffer[offs]) | |
| 82 | { | |
| 83 | int mx,my,sx,sy; | |
| 77 | int mx,my,sx,sy; | |
| 84 | 78 | |
| 85 | dirtybuffer[offs] = 0; | |
| 79 | mx = offs % 32; | |
| 80 | my = offs / 32; | |
| 86 | 81 | |
| 87 | mx = offs % 32; | |
| 88 | my = offs / 32; | |
| 82 | if (my < 2) | |
| 83 | { | |
| 84 | sx = my + 34; | |
| 85 | sy = mx - 2; | |
| 86 | } | |
| 87 | else if (my >= 30) | |
| 88 | { | |
| 89 | sx = my - 30; | |
| 90 | sy = mx - 2; | |
| 91 | } | |
| 92 | else | |
| 93 | { | |
| 94 | sx = mx + 2; | |
| 95 | sy = my - 2; | |
| 96 | } | |
| 89 | 97 | |
| 90 | if (my < 2) | |
| 91 | { | |
| 92 | sx = my + 34; | |
| 93 | sy = mx - 2; | |
| 94 | } | |
| 95 | else if (my >= 30) | |
| 96 | { | |
| 97 | sx = my - 30; | |
| 98 | sy = mx - 2; | |
| 99 | } | |
| 100 | else | |
| 101 | { | |
| 102 | sx = mx + 2; | |
| 103 | sy = my - 2; | |
| 104 | } | |
| 98 | if (flipscreen) | |
| 99 | { | |
| 100 | sx = 35 - sx; | |
| 101 | sy = 27 - sy; | |
| 102 | } | |
| 105 | 103 | |
| 106 | if (flipscreen) | |
| 107 | { | |
| 108 | sx = 35 - sx; | |
| 109 | sy = 27 - sy; | |
| 110 | } | |
| 111 | ||
| 112 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 113 | videoram[offs], | |
| 114 | colorram[offs] & 0x3f, | |
| 115 | flipscreen,flipscreen, | |
| 116 | sx*8,sy*8, | |
| 117 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 118 | } | |
| 104 | drawgfx(bitmap,machine->gfx[0], | |
| 105 | videoram[offs], | |
| 106 | colorram[offs] & 0x3f, | |
| 107 | flipscreen,flipscreen, | |
| 108 | sx*8,sy*8, | |
| 109 | cliprect,TRANSPARENCY_NONE,0); | |
| 119 | 110 | } |
| 120 | copybitmap(bitmap,tmpbitmap,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 121 | 111 | |
| 122 | 112 | /* Note, we're counting up on purpose ! */ |
| 123 | 113 | /* This way the vacuum cleaner is always on top */ |
| r1527 | r1528 | |
|---|---|---|
| 89 | 89 | PALETTE_INIT( tiamc1 ) |
| 90 | 90 | { |
| 91 | 91 | // Voltage computed by Proteus |
| 92 | //const float g_v[8]={1.05f,0.87f,0.81f,0.62f,0.44f,0.25f,0.19f,0.00f}; | |
| 93 | //const float r_v[8]={1.37f,1.13f,1.00f,0.75f,0.63f,0.38f,0.25f,0.00f}; | |
| 94 | //const float b_v[4]={1.16f,0.75f,0.42f,0.00f}; | |
| 92 | //static const float g_v[8]={1.05f,0.87f,0.81f,0.62f,0.44f,0.25f,0.19f,0.00f}; | |
| 93 | //static const float r_v[8]={1.37f,1.13f,1.00f,0.75f,0.63f,0.38f,0.25f,0.00f}; | |
| 94 | //static const float b_v[4]={1.16f,0.75f,0.42f,0.00f}; | |
| 95 | 95 | |
| 96 | 96 | // Voltage adjusted by Shiru |
| 97 | const float g_v[8] = { 1.2071f,0.9971f,0.9259f,0.7159f,0.4912f,0.2812f,0.2100f,0.0000f}; | |
| 98 | const float r_v[8] = { 1.5937f,1.3125f,1.1562f,0.8750f,0.7187f,0.4375f,0.2812f,0.0000f}; | |
| 99 | const float b_v[4] = { 1.3523f,0.8750f,0.4773f,0.0000f}; | |
| 97 | static const float g_v[8] = { 1.2071f,0.9971f,0.9259f,0.7159f,0.4912f,0.2812f,0.2100f,0.0000f}; | |
| 98 | static const float r_v[8] = { 1.5937f,1.3125f,1.1562f,0.8750f,0.7187f,0.4375f,0.2812f,0.0000f}; | |
| 99 | static const float b_v[4] = { 1.3523f,0.8750f,0.4773f,0.0000f}; | |
| 100 | 100 | |
| 101 | 101 | int col; |
| 102 | 102 | int r, g, b, ir, ig, ib; |
| r1527 | r1528 | |
|---|---|---|
| 63 | 63 | |
| 64 | 64 | static void cuebrick_tile_callback(int layer,int bank,int *code,int *color,int *flags,int *priority) |
| 65 | 65 | { |
| 66 | if (layer == 0) | |
| 66 | if ((K052109_get_RMRD_line() == CLEAR_LINE) && (layer == 0)) | |
| 67 | 67 | { |
| 68 | 68 | *code |= ((*color & 0x01) << 8); |
| 69 | 69 | *color = layer_colorbase[layer] + ((*color & 0x80) >> 5) + ((*color & 0x10) >> 1); |
| r1527 | r1528 | |
|---|---|---|
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | /* test video start */ |
| 363 | UINT32 dilate0(UINT32 value,int bits) // dilate first "bits" bits in "value" | |
| 363 | static UINT32 dilate0(UINT32 value,int bits) // dilate first "bits" bits in "value" | |
| 364 | 364 | { |
| 365 | 365 | UINT32 x,m1,m2,m3; |
| 366 | 366 | int a; |
| r1527 | r1528 | |
| 376 | 376 | return x; |
| 377 | 377 | } |
| 378 | 378 | |
| 379 | UINT32 dilate1(UINT32 value,int bits) // dilate first "bits" bits in "value" | |
| 379 | static UINT32 dilate1(UINT32 value,int bits) // dilate first "bits" bits in "value" | |
| 380 | 380 | { |
| 381 | 381 | UINT32 x,m1,m2,m3; |
| 382 | 382 | int a; |
| r1527 | r1528 | |
| 392 | 392 | return x; |
| 393 | 393 | } |
| 394 | 394 | |
| 395 | void computedilated(void) | |
| 395 | static void computedilated(void) | |
| 396 | 396 | { |
| 397 | 397 | int a,b; |
| 398 | 398 | |
| r1527 | r1528 | |
| 406 | 406 | dilatechose[(b << 3) + a]=3+(a < b ? a : b); |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | void testdrawscreen(bitmap_t *bitmap,const rectangle *cliprect) | |
| 409 | static void testdrawscreen(bitmap_t *bitmap,const rectangle *cliprect) | |
| 410 | 410 | { |
| 411 | 411 | int cs,x,y,dx,dy,xi,yi,a; |
| 412 | 412 | float iu,iv,u,v; |
| r1527 | r1528 | |
|---|---|---|
| 12 | 12 | #define LOG_OBJECTS 0 |
| 13 | 13 | |
| 14 | 14 | |
| 15 | static UINT16 scanline | |
| 15 | static UINT16 *scanline | |
| 16 | 16 | static UINT16 *clutbase; |
| 17 | 17 | static UINT8 *blend_y, *blend_cc; |
| 18 | 18 | |
| r1527 | r1528 | |
| 900 | 900 | * |
| 901 | 901 | *************************************/ |
| 902 | 902 | |
| 903 | static void process_object_list( | |
| 903 | static void process_object_list( | |
| 904 | 904 | { |
| 905 | int done = 0, count = 0; | |
| 905 | 906 | UINT32 *objdata; |
| 906 | int y, x, pass; | |
| 907 | 907 | int logit; |
| 908 | int x; | |
| 908 | 909 | |
| 909 | /* loop over all scanlines */ | |
| 910 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 911 | { | |
| 912 | /* erase the scanline first */ | |
| 913 | for (x = 0; x < 336; x++) | |
| 914 | scanline[x] = gpu_regs[BG]; | |
| 910 | /* erase the scanline first */ | |
| 911 | scanline = _scanline; | |
| 912 | for (x = 0; x < 336; x++) | |
| 913 | scanline[x] = gpu_regs[BG]; | |
| 915 | 914 | |
| 916 | 915 | #if LOG_OBJECTS |
| 917 | | |
| 916 | | |
| 918 | 917 | #else |
| 919 | | |
| 918 | | |
| 920 | 919 | #endif |
| 921 | 920 | |
| 922 | /* two passes per scanline */ | |
| 923 | for (pass = 0; pass < 1; pass++) | |
| 921 | /* fetch the object pointer */ | |
| 922 | objdata = (UINT32 *)get_jaguar_memory((gpu_regs[OLP_H] << 16) | gpu_regs[OLP_L]); | |
| 923 | while (!done && objdata && count++ < 100) | |
| 924 | { | |
| 925 | /* the low 3 bits determine the command */ | |
| 926 | switch (objdata[1] & 7) | |
| 924 | 927 | { |
| 925 | int vc = y * 2 + pass + gpu_regs[VBE]; | |
| 926 | int done = 0, count = 0; | |
| 928 | /* bitmap object */ | |
| 929 | case 0: | |
| 930 | if (logit) | |
| 931 | logerror("bitmap = %08X-%08X %08X-%08X\n", objdata[0], objdata[1], objdata[2], objdata[3]); | |
| 932 | objdata = process_bitmap(objdata, vc, logit); | |
| 933 | break; | |
| 927 | 934 | |
| 928 | /* fetch the object pointer */ | |
| 929 | objdata = (UINT32 *)get_jaguar_memory((gpu_regs[OLP_H] << 16) | gpu_regs[OLP_L]); | |
| 930 | while (!done && objdata && count++ < 100) | |
| 931 | { | |
| 932 | /* the low 3 bits determine the command */ | |
| 933 | switch (objdata[1] & 7) | |
| 934 | { | |
| 935 | /* bitmap object */ | |
| 936 | case 0: | |
| 937 | if (logit) | |
| 938 | logerror("bitmap = %08X-%08X %08X-%08X\n", objdata[0], objdata[1], objdata[2], objdata[3]); | |
| 939 | objdata = process_bitmap(objdata, vc, logit); | |
| 940 | break; | |
| 935 | /* scaled bitmap object */ | |
| 936 | case 1: | |
| 937 | if (logit) | |
| 938 | logerror("scaled = %08X-%08X %08X-%08X %08X-%08X\n", objdata[0], objdata[1], objdata[2], objdata[3], objdata[4], objdata[5]); | |
| 939 | objdata = process_scaled_bitmap(objdata, vc, logit); | |
| 940 | break; | |
| 941 | 941 | |
| 942 | /* scaled bitmap object */ | |
| 943 | case 1: | |
| 944 | if (logit) | |
| 945 | logerror("scaled = %08X-%08X %08X-%08X %08X-%08X\n", objdata[0], objdata[1], objdata[2], objdata[3], objdata[4], objdata[5]); | |
| 946 | objdata = process_scaled_bitmap(objdata, vc, logit); | |
| 947 | break; | |
| 942 | /* branch */ | |
| 943 | case 3: | |
| 944 | if (logit) | |
| 945 | logerror("branch = %08X-%08X\n", objdata[0], objdata[1]); | |
| 946 | objdata = process_branch(objdata, vc, logit); | |
| 947 | break; | |
| 948 | 948 | |
| 949 | /* branch */ | |
| 950 | case 3: | |
| 951 | if (logit) | |
| 952 | logerror("branch = %08X-%08X\n", objdata[0], objdata[1]); | |
| 953 | objdata = process_branch(objdata, vc, logit); | |
| 954 | break; | |
| 949 | /* stop */ | |
| 950 | case 4: | |
| 951 | { | |
| 952 | int interrupt = (objdata[1] >> 3) & 1; | |
| 953 | done = 1; | |
| 955 | 954 | |
| 956 | /* stop */ | |
| 957 | case 4: | |
| 958 | { | |
| 959 | int interrupt = (objdata[1] >> 3) & 1; | |
| 960 | done = 1; | |
| 961 | ||
| 962 | if (logit) | |
| 963 | logerror("stop = %08X-%08X\n", objdata[0], objdata[1]); | |
| 964 | if (interrupt) | |
| 965 | { | |
| 955 | if (logit) | |
| 956 | logerror("stop = %08X-%08X\n", objdata[0], objdata[1]); | |
| 957 | if (interrupt) | |
| 958 | { | |
| 966 | 959 | #ifndef MESS |
| 967 | | |
| 960 | | |
| 968 | 961 | #endif |
| 969 | cpu_irq_state |= 4; | |
| 970 | update_cpu_irq(); | |
| 971 | } | |
| 972 | break; | |
| 973 | } | |
| 974 | ||
| 975 | default: | |
| 976 | fprintf(stderr, "%08X %08X\n", objdata[0], objdata[1]); | |
| 977 | done = 1; | |
| 978 | break; | |
| 962 | cpu_irq_state |= 4; | |
| 963 | update_cpu_irq(); | |
| 979 | 964 | } |
| 965 | break; | |
| 980 | 966 | } |
| 981 | } | |
| 982 | 967 | |
| 983 | /* render this scanline */ | |
| 984 | draw_scanline16(bitmap, 0, y, 336, scanline, pen_table, -1); | |
| 968 | default: | |
| 969 | fprintf(stderr, "%08X %08X\n", objdata[0], objdata[1]); | |
| 970 | done = 1; | |
| 971 | break; | |
| 972 | } | |
| 985 | 973 | } |
| 986 | 974 | } |
| r1527 | r1528 | |
|---|---|---|
| 131 | 131 | |
| 132 | 132 | WRITE16_HANDLER( bionicc_paletteram_w ) |
| 133 | 133 | { |
| 134 | /* The bottom bits are 'intensity' here, but level 2 of Top Secret shows that even | |
| 135 | when intensity is zero the colour is not reduced to pure black, (the sky should stay | |
| 136 | at dark blue rather than absolute black) */ | |
| 134 | 137 | data = COMBINE_DATA(&paletteram16[offset]); |
| 135 | paletteram16_RRRRGGGGBBBBIIII_word_w(offset,(data & 0xfff0) | ((data & 0x0007) << 1),0); | |
| 138 | paletteram16_RRRRGGGGBBBBIIII_word_w(offset,(data & 0xfff0) | ((data & 0x0007) << 1) | 1, 0); | |
| 136 | 139 | } |
| 137 | 140 | |
| 138 | 141 | WRITE16_HANDLER( bionicc_scroll_w ) |
| r1527 | r1528 | |
|---|---|---|
| 21 | 21 | * |
| 22 | 22 | *************************************/ |
| 23 | 23 | |
| 24 | static void generate_interrupt(int state) | |
| 24 | static void generate_interrupt(running_machine *machine, int state) | |
| 25 | 25 | { |
| 26 | 26 | cpunum_set_input_line(0, M6809_FIRQ_LINE, state); |
| 27 | 27 | } |
| r1527 | r1528 | |
| 45 | 45 | VIDEO_START( capbowl ) |
| 46 | 46 | { |
| 47 | 47 | /* initialize TMS34061 emulation */ |
| 48 | tms34061_start(&tms34061intf); | |
| 48 | tms34061_start(machine, &tms34061intf); | |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | |
| r1527 | r1528 | |
| 156 | 156 | * |
| 157 | 157 | *************************************/ |
| 158 | 158 | |
| 159 | INLINE rgb_t pen_for_pixel(UINT8 *src, UINT8 pix) | |
| 160 | { | |
| 161 | return MAKE_RGB(pal4bit(src[(pix << 1) + 0] >> 0), | |
| 162 | pal4bit(src[(pix << 1) + 1] >> 4), | |
| 163 | pal4bit(src[(pix << 1) + 1] >> 0)); | |
| 164 | } | |
| 165 | ||
| 166 | ||
| 159 | 167 | VIDEO_UPDATE( capbowl ) |
| 160 | 168 | { |
| 161 | 169 | struct tms34061_display state; |
| r1527 | r1528 | |
| 174 | 182 | /* now regenerate the bitmap */ |
| 175 | 183 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) |
| 176 | 184 | { |
| 177 | UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0); | |
| 178 | 185 | UINT8 *src = &state.vram[256 * y]; |
| 179 | | |
| 186 | UINT32 *d | |
| 180 | 187 | |
| 181 | /* first update the palette for this scanline */ | |
| 182 | for (x = 0; x < 16; x++) | |
| 183 | { | |
| 184 | palette_set_color_rgb(machine, ybase + x, pal4bit(src[0]), pal4bit(src[1] >> 4), pal4bit(src[1])); | |
| 185 | src += 2; | |
| 186 | } | |
| 187 | ||
| 188 | /* expand row to 8bpp */ | |
| 189 | 188 | for (x = cliprect->min_x & ~1; x <= cliprect->max_x; x += 2) |
| 190 | 189 | { |
| 191 | int pix = src[x/2]; | |
| 192 | *dest++ = ybase + (pix >> 4); | |
| 193 | *dest++ = ybase + (pix & 0x0f); | |
| 190 | UINT8 pix = src[32 + (x / 2)]; | |
| 191 | *dest++ = pen_for_pixel(src, pix >> 4); | |
| 192 | *dest++ = pen_for_pixel(src, pix & 0x0f); | |
| 194 | 193 | } |
| 195 | 194 | } |
| 196 | 195 | return 0; |
| r1527 | r1528 | |
|---|---|---|
| 60 | 60 | |
| 61 | 61 | /***************************************************************************/ |
| 62 | 62 | |
| 63 | READ16_HANDLER( darius_fg_layer_r ) | |
| 64 | { | |
| 65 | return darius_fg_ram[offset]; | |
| 66 | } | |
| 67 | ||
| 68 | 63 | WRITE16_HANDLER( darius_fg_layer_w ) |
| 69 | 64 | { |
| 70 | 65 | COMBINE_DATA(&darius_fg_ram[offset]); |
| r1527 | r1528 | |
|---|---|---|
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "includes/crbaloon.h" |
| 11 | 11 | |
| 12 | static UINT8 spritectrl[3]; | |
| 13 | 12 | |
| 14 | INT8 crbaloon_collision; | |
| 13 | UINT8 *crbaloon_videoram; | |
| 14 | UINT8 *crbaloon_colorram; | |
| 15 | UINT8 *crbaloon_spriteram; | |
| 15 | 16 | |
| 17 | static UINT16 crbaloon_collision_address; | |
| 18 | static UINT8 crbaloon_collision_address_clear; | |
| 16 | 19 | static tilemap *bg_tilemap; |
| 17 | 20 | |
| 21 | ||
| 18 | 22 | /*************************************************************************** |
| 19 | 23 | |
| 20 | 24 | Convert the color PROMs into a more useable format. |
| r1527 | r1528 | |
| 27 | 31 | bit 0 RED |
| 28 | 32 | |
| 29 | 33 | ***************************************************************************/ |
| 34 | ||
| 30 | 35 | PALETTE_INIT( crbaloon ) |
| 31 | 36 | { |
| 32 | 37 | int i; |
| r1527 | r1528 | |
| 34 | 39 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) |
| 35 | 40 | |
| 36 | 41 | |
| 37 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 42 | for (i = 0; i < machine->drv->total_colors; i++) | |
| 38 | 43 | { |
| 39 | int i | |
| 44 | int h = (~i & 0x08) ? 0xff : 0x55; | |
| 40 | 45 | |
| 46 | int r = h * ((~i >> 0) & 1); | |
| 47 | int g = h * ((~i >> 1) & 1); | |
| 48 | int b = h * ((~i >> 2) & 1); | |
| 41 | 49 | |
| 42 | intensity = (~i & 0x08) ? 0xff : 0x55; | |
| 43 | ||
| 44 | /* red component */ | |
| 45 | r = intensity * ((~i >> 0) & 1); | |
| 46 | /* green component */ | |
| 47 | g = intensity * ((~i >> 1) & 1); | |
| 48 | /* blue component */ | |
| 49 | b = intensity * ((~i >> 2) & 1); | |
| 50 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 50 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | for (i = 0;i < TOTAL_COLORS(0);i += 2) | |
| 53 | for (i = 0; i < TOTAL_COLORS(0); i += 2) | |
| 54 | 54 | { |
| 55 | COLOR(0,i) = 15; /* black background */ | |
| 56 | COLOR(0,i + 1) = i / 2; /* colored foreground */ | |
| 55 | COLOR(0, i + 0) = 0x0f; /* black background */ | |
| 56 | COLOR(0, i + 1) = i / 2; /* colored foreground */ | |
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | ||
| 60 | 61 | WRITE8_HANDLER( crbaloon_videoram_w ) |
| 61 | 62 | { |
| 62 | videoram[offset] = data; | |
| 63 | crbaloon_videoram[offset] = data; | |
| 63 | 64 | tilemap_mark_tile_dirty(bg_tilemap, offset); |
| 64 | 65 | } |
| 65 | 66 | |
| 66 | 67 | WRITE8_HANDLER( crbaloon_colorram_w ) |
| 67 | 68 | { |
| 68 | colorram[offset] = data; | |
| 69 | crbaloon_colorram[offset] = data; | |
| 69 | 70 | tilemap_mark_tile_dirty(bg_tilemap, offset); |
| 70 | 71 | } |
| 71 | 72 | |
| 72 | WRITE8_HANDLER( crbaloon_spritectrl_w ) | |
| 73 | { | |
| 74 | spritectrl[offset] = data; | |
| 75 | } | |
| 76 | ||
| 77 | WRITE8_HANDLER( crbaloon_flipscreen_w ) | |
| 78 | { | |
| 79 | if (flip_screen != (data & 0x01)) | |
| 80 | { | |
| 81 | flip_screen_set(data & 0x01); | |
| 82 | tilemap_mark_all_tiles_dirty(ALL_TILEMAPS); | |
| 83 | } | |
| 84 | } | |
| 85 | ||
| 86 | 73 | static TILE_GET_INFO( get_bg_tile_info ) |
| 87 | 74 | { |
| 88 | int code = videoram[tile_index]; | |
| 89 | int color = colorram[tile_index] & 0x0f; | |
| 75 | int code = crbaloon_videoram[tile_index]; | |
| 76 | int color = crbaloon_colorram[tile_index] & 0x0f; | |
| 90 | 77 | |
| 91 | 78 | SET_TILE_INFO(0, code, color, 0); |
| 92 | 79 | } |
| 93 | 80 | |
| 94 | 81 | VIDEO_START( crbaloon ) |
| 95 | 82 | { |
| 96 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_xy, | |
| 97 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 83 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_xy, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 98 | 84 | |
| 99 | tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 85 | state_save_register_global(crbaloon_collision_address); | |
| 86 | state_save_register_global(crbaloon_collision_address_clear); | |
| 87 | } | |
| 100 | 88 | |
| 101 | state_save_register_global_array(spritectrl); | |
| 102 | state_save_register_global(crbaloon_collision); | |
| 89 | ||
| 90 | UINT16 crbaloon_get_collision_address(void) | |
| 91 | { | |
| 92 | return crbaloon_collision_address_clear ? 0xffff : crbaloon_collision_address; | |
| 103 | 93 | } |
| 104 | 94 | |
| 105 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) | |
| 95 | ||
| 96 | void crbaloon_set_clear_collision_address(int _crbaloon_collision_address_clear) | |
| 106 | 97 | { |
| 107 | int x,y; | |
| 98 | crbaloon_collision_address_clear = !_crbaloon_collision_address_clear; /* active LO */ | |
| 99 | } | |
| 108 | 100 | |
| 109 | /* Check Collision - Draw balloon in background colour, if no */ | |
| 110 | /* collision occured, bitmap will be same as tmpbitmap */ | |
| 111 | 101 | |
| 112 | int bx = spritectrl[1]; | |
| 113 | int by = spritectrl[2] - 32; | |
| 114 | 102 | |
| 115 | tilemap_draw(tmpbitmap, 0, bg_tilemap, 0, 0); | |
| 103 | static void draw_sprite_and_check_collision(running_machine *machine, mame_bitmap *bitmap) | |
| 104 | { | |
| 105 | int y; | |
| 106 | UINT8 code = crbaloon_spriteram[0] & 0x0f; | |
| 107 | UINT8 color = crbaloon_spriteram[0] >> 4; | |
| 108 | UINT8 sy = crbaloon_spriteram[2] - 32; | |
| 116 | 109 | |
| 110 | UINT8 *gfx = memory_region(REGION_GFX2) + (code << 7); | |
| 111 | ||
| 112 | ||
| 117 | 113 | if (flip_screen) |
| 114 | sy += 32; | |
| 115 | ||
| 116 | /* assume no collision */ | |
| 117 | crbaloon_collision_address = 0xffff; | |
| 118 | ||
| 119 | for (y = 0x1f; y >= 0; y--) | |
| 118 | 120 | { |
| 119 | by += 32; | |
| 120 | } | |
| 121 | int x; | |
| 122 | UINT8 data = 0; | |
| 123 | UINT8 sx = crbaloon_spriteram[1]; | |
| 121 | 124 | |
| 122 | drawgfx(bitmap,machine->gfx[1], | |
| 123 | spritectrl[0] & 0x0f, | |
| 124 | 15, | |
| 125 | 0,0, | |
| 126 | bx,by, | |
| 127 | cliprect,TRANSPARENCY_PEN,0); | |
| 125 | for (x = 0x1f; x >= 0; x--) | |
| 126 | { | |
| 127 | int bit; | |
| 128 | 128 | |
| 129 | crbaloon_collision = 0; | |
| 129 | if ((x & 0x07) == 0x07) | |
| 130 | /* get next byte to draw, but no drawing in VBLANK */ | |
| 131 | data = (sy >= 0xe0) ? 0 : gfx[((x >> 3) << 5) | y]; | |
| 130 | 132 | |
| 131 | for (x = bx; x < bx + machine->gfx[1]->width; x++) | |
| 132 | { | |
| 133 | for (y = by; y < by + machine->gfx[1]->height; y++) | |
| 134 | { | |
| 135 | if ((x < machine->screen[0].visarea.min_x) || | |
| 136 | (x > machine->screen[0].visarea.max_x) || | |
| 137 | (y < machine->screen[0].visarea.min_y) || | |
| 138 | (y > machine->screen[0].visarea.max_y)) | |
| 133 | bit = data & 0x80; | |
| 134 | ||
| 135 | /* draw the current pixel, but check collision first */ | |
| 136 | if (bit) | |
| 139 | 137 | { |
| 140 | continue; | |
| 141 | } | |
| 138 | if (*BITMAP_ADDR16(bitmap, sy, sx) != 0x0f) | |
| 139 | /* compute the collision address -- the +1 is via observation | |
| 140 | of the game code, probably wrong for cocktail mode */ | |
| 141 | crbaloon_collision_address = ((((sy ^ 0xff) >> 3) << 5) | ((sx ^ 0xff) >> 3)) + 1; | |
| 142 | 142 | |
| 143 | if (*BITMAP_ADDR16(bitmap, y, x) != *BITMAP_ADDR16(tmpbitmap, y, x)) | |
| 144 | { | |
| 145 | crbaloon_collision = -1; | |
| 146 | break; | |
| 143 | *BITMAP_ADDR16(bitmap, sy, sx) = color; | |
| 147 | 144 | } |
| 145 | ||
| 146 | sx = sx + 1; | |
| 147 | data = data << 1; | |
| 148 | 148 | } |
| 149 | } | |
| 150 | 149 | |
| 151 | ||
| 152 | /* actually draw the balloon */ | |
| 153 | ||
| 154 | drawgfx(bitmap,machine->gfx[1], | |
| 155 | spritectrl[0] & 0x0f, | |
| 156 | (spritectrl[0] & 0xf0) >> 4, | |
| 157 | 0,0, | |
| 158 | bx,by, | |
| 159 | cliprect,TRANSPARENCY_PEN,0); | |
| 150 | sy = sy + 1; | |
| 151 | } | |
| 160 | 152 | } |
| 161 | 153 | |
| 154 | ||
| 162 | 155 | VIDEO_UPDATE( crbaloon ) |
| 163 | 156 | { |
| 164 | 157 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); |
| 165 | draw_sprites(machine, bitmap, cliprect); | |
| 158 | ||
| 159 | draw_sprite_and_check_collision(machine, bitmap); | |
| 160 | ||
| 166 | 161 | return 0; |
| 167 | 162 | } |
| r1527 | r1528 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | WRITE8_HANDLER( mnchmobl_palette_bank_w ) |
| 41 | 41 | { |
| 42 | if( mnchmobl_palette_bank!=(data&0x3) ) | |
| 43 | { | |
| 44 | memset( dirtybuffer, 1, 0x100 ); | |
| 45 | mnchmobl_palette_bank = data&0x3; | |
| 46 | } | |
| 42 | mnchmobl_palette_bank = data&0x3; | |
| 47 | 43 | } |
| 48 | 44 | |
| 49 | 45 | WRITE8_HANDLER( mnchmobl_flipscreen_w ) |
| 50 | 46 | { |
| 51 | if( flipscreen!=data ) | |
| 52 | { | |
| 53 | memset( dirtybuffer, 1, 0x100 ); | |
| 54 | flipscreen = data; | |
| 55 | } | |
| 47 | flipscreen = data; | |
| 56 | 48 | } |
| 57 | 49 | |
| 58 | 50 | |
| r1527 | r1528 | |
| 67 | 59 | |
| 68 | 60 | VIDEO_START( mnchmobl ) |
| 69 | 61 | { |
| 70 | dirtybuffer = auto_malloc(0x100); | |
| 71 | memset( dirtybuffer, 1, 0x100 ); | |
| 72 | 62 | tmpbitmap = auto_bitmap_alloc(512,512,machine->screen[0].format); |
| 73 | 63 | } |
| 74 | 64 | |
| 75 | READ8_HANDLER( mnchmobl_videoram_r ) | |
| 76 | { | |
| 77 | return videoram[offset]; | |
| 78 | } | |
| 79 | ||
| 80 | WRITE8_HANDLER( mnchmobl_videoram_w ) | |
| 81 | { | |
| 82 | offset = offset&0xff; /* mirror the two banks? */ | |
| 83 | if( videoram[offset]!=data ) | |
| 84 | { | |
| 85 | videoram[offset] = data; | |
| 86 | dirtybuffer[offset] = 1; | |
| 87 | } | |
| 88 | } | |
| 89 | ||
| 90 | 65 | static void draw_status(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| 91 | 66 | { |
| 92 | 67 | const gfx_element *gfx = machine->gfx[0]; |
| r1527 | r1528 | |
| 126 | 101 | |
| 127 | 102 | for( offs=0; offs<0x100; offs++ ) |
| 128 | 103 | { |
| 129 | if( dirtybuffer[offs] ) | |
| 104 | int sy = (offs%16)*32; | |
| 105 | int sx = (offs/16)*32; | |
| 106 | int tile_number = videoram[offs]; | |
| 107 | int row,col; | |
| 108 | ||
| 109 | for( row=0; row<4; row++ ) | |
| 130 | 110 | { |
| 131 | int sy = (offs%16)*32; | |
| 132 | int sx = (offs/16)*32; | |
| 133 | int tile_number = videoram[offs]; | |
| 134 | int row,col; | |
| 135 | dirtybuffer[offs] = 0; | |
| 136 | for( row=0; row<4; row++ ) | |
| 111 | for( col=0; col<4; col++ ) | |
| 137 | 112 | { |
| 138 | for( col=0; col<4; col++ ) | |
| 139 | { | |
| 140 | drawgfx( tmpbitmap,gfx, | |
| 141 | rom[col+tile_number*4+row*0x400], | |
| 142 | mnchmobl_palette_bank, | |
| 143 | 0,0, /* flip */ | |
| 144 | sx+col*8, sy+row*8, | |
| 145 | 0, TRANSPARENCY_NONE, 0 ); | |
| 146 | } | |
| 113 | drawgfx( tmpbitmap,gfx, | |
| 114 | rom[col+tile_number*4+row*0x400], | |
| 115 | mnchmobl_palette_bank, | |
| 116 | 0,0, /* flip */ | |
| 117 | sx+col*8, sy+row*8, | |
| 118 | 0, TRANSPARENCY_NONE, 0 ); | |
| 147 | 119 | } |
| 148 | 120 | } |
| 149 | 121 | } |
| r1527 | r1528 | |
|---|---|---|
| 347 | 347 | UINT16 *bg0_base = &btoads_vram_bg0[(fulladdr + (yscroll0 << 10)) & 0x3fc00]; |
| 348 | 348 | UINT16 *bg1_base = &btoads_vram_bg1[(fulladdr + (yscroll1 << 10)) & 0x3fc00]; |
| 349 | 349 | UINT8 *spr_base = &vram_fg_display[fulladdr & 0x3fc00]; |
| 350 | UINT16 *dst = BITMAP_ADDR16(bitmap, scanline, 0); | |
| 350 | UINT32 *dst = BITMAP_ADDR32(bitmap, scanline, 0); | |
| 351 | const rgb_t *pens = tlc34076_get_pens(); | |
| 351 | 352 | int coladdr = fulladdr & 0x3ff; |
| 352 | 353 | int x; |
| 353 | 354 | |
| r1527 | r1528 | |
| 369 | 370 | |
| 370 | 371 | if (sprpix && !(sprpix & 0x80)) |
| 371 | 372 | { |
| 372 | dst[x + 0] = sprpix; | |
| 373 | dst[x + 1] = sprpix; | |
| 373 | dst[x + 0] = pens[sprpix]; | |
| 374 | dst[x + 1] = pens[sprpix]; | |
| 374 | 375 | } |
| 375 | 376 | else |
| 376 | 377 | { |
| r1527 | r1528 | |
| 379 | 380 | UINT8 sprpix = spr_base[coladdr & 0xff]; |
| 380 | 381 | |
| 381 | 382 | if (bg1pix & 0x80) |
| 382 | dst[x + 0] = bg1pix & 0xff; | |
| 383 | dst[x + 0] = pens[bg1pix & 0xff]; | |
| 383 | 384 | else if (sprpix) |
| 384 | dst[x + 0] = sprpix; | |
| 385 | dst[x + 0] = pens[sprpix]; | |
| 385 | 386 | else if (bg1pix & 0xff) |
| 386 | dst[x + 0] = bg1pix & 0xff; | |
| 387 | dst[x + 0] = pens[bg1pix & 0xff]; | |
| 387 | 388 | else |
| 388 | dst[x + 0] = bg0pix & 0xff; | |
| 389 | dst[x + 0] = pens[bg0pix & 0xff]; | |
| 389 | 390 | |
| 390 | 391 | if (bg1pix & 0x8000) |
| 391 | dst[x + 1] = bg1pix >> 8; | |
| 392 | dst[x + 1] = pens[bg1pix >> 8]; | |
| 392 | 393 | else if (sprpix) |
| 393 | dst[x + 1] = sprpix; | |
| 394 | dst[x + 1] = pens[sprpix]; | |
| 394 | 395 | else if (bg1pix >> 8) |
| 395 | dst[x + 1] = bg1pix >> 8; | |
| 396 | dst[x + 1] = pens[bg1pix >> 8]; | |
| 396 | 397 | else |
| 397 | dst[x + 1] = bg0pix >> 8; | |
| 398 | dst[x + 1] = pens[bg0pix >> 8]; | |
| 398 | 399 | } |
| 399 | 400 | } |
| 400 | 401 | break; |
| r1527 | r1528 | |
| 414 | 415 | |
| 415 | 416 | if (sprpix && !(sprpix & 0x80)) |
| 416 | 417 | { |
| 417 | dst[x + 0] = sprpix; | |
| 418 | dst[x + 1] = sprpix; | |
| 418 | dst[x + 0] = pens[sprpix]; | |
| 419 | dst[x + 1] = pens[sprpix]; | |
| 419 | 420 | } |
| 420 | 421 | else |
| 421 | 422 | { |
| r1527 | r1528 | |
| 423 | 424 | UINT16 bg1pix = bg1_base[(coladdr + xscroll1) & 0xff]; |
| 424 | 425 | |
| 425 | 426 | if (bg0pix & 0xff) |
| 426 | dst[x + 0] = bg0pix & 0xff; | |
| 427 | dst[x + 0] = pens[bg0pix & 0xff]; | |
| 427 | 428 | else if (bg1pix & 0x80) |
| 428 | dst[x + 0] = bg1pix & 0xff; | |
| 429 | dst[x + 0] = pens[bg1pix & 0xff]; | |
| 429 | 430 | else if (sprpix) |
| 430 | dst[x + 0] = sprpix; | |
| 431 | dst[x + 0] = pens[sprpix]; | |
| 431 | 432 | else |
| 432 | dst[x + 0] = bg1pix & 0xff; | |
| 433 | dst[x + 0] = pens[bg1pix & 0xff]; | |
| 433 | 434 | |
| 434 | 435 | if (bg0pix >> 8) |
| 435 | dst[x + 1] = bg0pix >> 8; | |
| 436 | dst[x + 1] = pens[bg0pix >> 8]; | |
| 436 | 437 | else if (bg1pix & 0x8000) |
| 437 | dst[x + 1] = bg1pix >> 8; | |
| 438 | dst[x + 1] = pens[bg1pix >> 8]; | |
| 438 | 439 | else if (sprpix) |
| 439 | dst[x + 1] = sprpix; | |
| 440 | dst[x + 1] = pens[sprpix]; | |
| 440 | 441 | else |
| 441 | dst[x + 1] = bg1pix >> 8; | |
| 442 | dst[x + 1] = pens[bg1pix >> 8]; | |
| 442 | 443 | } |
| 443 | 444 | } |
| 444 | 445 | break; |
| r1527 | r1528 | |
| 456 | 457 | |
| 457 | 458 | if (sprpix) |
| 458 | 459 | { |
| 459 | dst[x + 0] = sprpix; | |
| 460 | dst[x + 1] = sprpix; | |
| 460 | dst[x + 0] = pens[sprpix]; | |
| 461 | dst[x + 1] = pens[sprpix]; | |
| 461 | 462 | } |
| 462 | 463 | else |
| 463 | 464 | { |
| r1527 | r1528 | |
| 465 | 466 | UINT16 bg1pix = bg1_base[(coladdr + xscroll1) & 0xff]; |
| 466 | 467 | |
| 467 | 468 | if (bg1pix & 0xff) |
| 468 | dst[x + 0] = bg1pix & 0xff; | |
| 469 | dst[x + 0] = pens[bg1pix & 0xff]; | |
| 469 | 470 | else |
| 470 | dst[x + 0] = bg0pix & 0xff; | |
| 471 | dst[x + 0] = pens[bg0pix & 0xff]; | |
| 471 | 472 | |
| 472 | 473 | if (bg1pix >> 8) |
| 473 | dst[x + 1] = bg1pix >> 8; | |
| 474 | dst[x + 1] = pens[bg1pix >> 8]; | |
| 474 | 475 | else |
| 475 | dst[x + 1] = bg0pix >> 8; | |
| 476 | dst[x + 1] = pens[bg0pix >> 8]; | |
| 476 | 477 | } |
| 477 | 478 | } |
| 478 | 479 | break; |
| r1527 | r1528 | |
| 493 | 494 | UINT8 sprpix = spr_base[coladdr & 0xff]; |
| 494 | 495 | |
| 495 | 496 | if (bg1pix & 0x80) |
| 496 | dst[x + 0] = bg1pix & 0xff; | |
| 497 | dst[x + 0] = pens[bg1pix & 0xff]; | |
| 497 | 498 | else if (sprpix & 0x80) |
| 498 | dst[x + 0] = sprpix; | |
| 499 | dst[x + 0] = pens[sprpix]; | |
| 499 | 500 | else if (bg1pix & 0xff) |
| 500 | dst[x + 0] = bg1pix & 0xff; | |
| 501 | dst[x + 0] = pens[bg1pix & 0xff]; | |
| 501 | 502 | else if (sprpix) |
| 502 | dst[x + 0] = sprpix; | |
| 503 | dst[x + 0] = pens[sprpix]; | |
| 503 | 504 | else |
| 504 | dst[x + 0] = bg0pix & 0xff; | |
| 505 | dst[x + 0] = pens[bg0pix & 0xff]; | |
| 505 | 506 | |
| 506 | 507 | if (bg1pix & 0x8000) |
| 507 | dst[x + 1] = bg1pix >> 8; | |
| 508 | dst[x + 1] = pens[bg1pix >> 8]; | |
| 508 | 509 | else if (sprpix & 0x80) |
| 509 | dst[x + 1] = sprpix; | |
| 510 | dst[x + 1] = pens[sprpix]; | |
| 510 | 511 | else if (bg1pix >> 8) |
| 511 | dst[x + 1] = bg1pix >> 8; | |
| 512 | dst[x + 1] = pens[bg1pix >> 8]; | |
| 512 | 513 | else if (sprpix) |
| 513 | dst[x + 1] = sprpix; | |
| 514 | dst[x + 1] = pens[sprpix]; | |
| 514 | 515 | else |
| 515 | dst[x + 1] = bg0pix >> 8; | |
| 516 | dst[x + 1] = pens[bg0pix >> 8]; | |
| 516 | 517 | } |
| 517 | 518 | break; |
| 518 | 519 | } |
| r1527 | r1528 | |
|---|---|---|
| 63 | 63 | y = offset % 32; |
| 64 | 64 | offset = 32 * y + x; |
| 65 | 65 | |
| 66 | return videoram | |
| 66 | return videoram[ | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | READ8_HANDLER( tagteam_mirrorcolorram_r ) |
| r1527 | r1528 | |
| 75 | 75 | y = offset % 32; |
| 76 | 76 | offset = 32 * y + x; |
| 77 | 77 | |
| 78 | return colorram | |
| 78 | return colorram[ | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | WRITE8_HANDLER( tagteam_mirrorvideoram_w ) |
| r1527 | r1528 | |
|---|---|---|
| 143 | 143 | #include "jagblit.h" |
| 144 | 144 | |
| 145 | 145 | |
| 146 | #define ENABLE_BORDERS 0 | |
| 147 | ||
| 146 | 148 | #define LOG_BLITS 0 |
| 147 | 149 | #define LOG_BAD_BLITS 0 |
| 148 | 150 | #define LOG_BLITTER_STATS 0 |
| r1527 | r1528 | |
| 190 | 192 | static UINT32 blitter_regs[BLITTER_REGS]; |
| 191 | 193 | static UINT16 gpu_regs[GPU_REGS]; |
| 192 | 194 | |
| 193 | static emu_timer * | |
| 195 | static emu_timer *object_timer; | |
| 194 | 196 | static UINT8 cpu_irq_state; |
| 195 | 197 | |
| 198 | static mame_bitmap *screen_bitmap; | |
| 199 | ||
| 196 | 200 | static pen_t *pen_table; |
| 197 | 201 | |
| 198 | 202 | |
| r1527 | r1528 | |
| 205 | 209 | |
| 206 | 210 | /* from jagobj.c */ |
| 207 | 211 | static void jagobj_init(void); |
| 208 | static void process_object_list( | |
| 212 | static void process_object_list( | |
| 209 | 213 | |
| 210 | 214 | /* from jagblit.c */ |
| 211 | 215 | static void generic_blitter(UINT32 command, UINT32 a1flags, UINT32 a2flags); |
| r1527 | r1528 | |
| 229 | 233 | * |
| 230 | 234 | *************************************/ |
| 231 | 235 | |
| 232 | INLINE void get_crosshair_xy(int player, int *x, int *y) | |
| 236 | INLINE void get_crosshair_xy(running_machine *machine, int player, int *x, int *y) | |
| 233 | 237 | { |
| 234 | *x = ((readinputport(3 + player * 2) & 0xff) * Machine->screen[0].width) >> 8; | |
| 235 | *y = ((readinputport(4 + player * 2) & 0xff) * Machine->screen[0].height) >> 8; | |
| 238 | int width = machine->screen[0].visarea.max_x + 1 - machine->screen[0].visarea.min_x; | |
| 239 | int height = machine->screen[0].visarea.max_y + 1 - machine->screen[0].visarea.min_y; | |
| 240 | *x = machine->screen[0].visarea.min_x + (((readinputport(3 + player * 2) & 0xff) * width) >> 8); | |
| 241 | *y = machine->screen[0].visarea.min_y + (((readinputport(4 + player * 2) & 0xff) * height) >> 8); | |
| 236 | 242 | } |
| 237 | 243 | |
| 238 | 244 | |
| 239 | 245 | |
| 240 | 246 | /************************************* |
| 241 | 247 | * |
| 248 | * Horizontal display values | |
| 249 | * | |
| 250 | *************************************/ | |
| 251 | ||
| 252 | INLINE int effective_hvalue(int value) | |
| 253 | { | |
| 254 | if (!(value & 0x400)) | |
| 255 | return value & 0x3ff; | |
| 256 | else | |
| 257 | return (value & 0x3ff) + (gpu_regs[HP] & 0x3ff) + 1; | |
| 258 | } | |
| 259 | ||
| 260 | ||
| 261 | ||
| 262 | /************************************* | |
| 263 | * | |
| 264 | * Object processor timer | |
| 265 | * | |
| 266 | *************************************/ | |
| 267 | ||
| 268 | INLINE int adjust_object_timer(running_machine *machine, int vc) | |
| 269 | { | |
| 270 | int hdbpix[2]; | |
| 271 | int hdb = 0; | |
| 272 | ||
| 273 | /* extract the display begin registers */ | |
| 274 | hdbpix[0] = (gpu_regs[HDB1] & 0x7ff) / 2; | |
| 275 | hdbpix[1] = (gpu_regs[HDB2] & 0x7ff) / 2; | |
| 276 | ||
| 277 | /* sort */ | |
| 278 | if (hdbpix[0] > hdbpix[1]) | |
| 279 | { | |
| 280 | int temp = hdbpix[0]; | |
| 281 | hdbpix[0] = hdbpix[1]; | |
| 282 | hdbpix[1] = temp; | |
| 283 | } | |
| 284 | ||
| 285 | /* select the target one */ | |
| 286 | hdb = hdbpix[vc % 2]; | |
| 287 | ||
| 288 | /* if setting the second one in a line, make sure we will ever actually hit it */ | |
| 289 | if (vc % 2 == 1 && (hdbpix[1] == hdbpix[0] || hdbpix[1] >= machine->screen[0].width)) | |
| 290 | return FALSE; | |
| 291 | ||
| 292 | /* adjust the timer */ | |
| 293 | timer_adjust(object_timer, video_screen_get_time_until_pos(0, vc / 2, hdb), vc | (hdb << 16), attotime_never); | |
| 294 | return TRUE; | |
| 295 | } | |
| 296 | ||
| 297 | ||
| 298 | ||
| 299 | /************************************* | |
| 300 | * | |
| 242 | 301 | * GPU optimization control |
| 243 | 302 | * |
| 244 | 303 | *************************************/ |
| r1527 | r1528 | |
| 271 | 330 | } |
| 272 | 331 | |
| 273 | 332 | |
| 274 | static TIMER_CALLBACK( vi_callback ) | |
| 275 | { | |
| 276 | int scanline = param; | |
| 277 | ||
| 278 | cpu_irq_state |= 1; | |
| 279 | update_cpu_irq(); | |
| 280 | timer_adjust(vi_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline, attotime_zero); | |
| 281 | } | |
| 282 | ||
| 283 | ||
| 284 | 333 | void jaguar_gpu_cpu_int(void) |
| 285 | 334 | { |
| 286 | 335 | cpu_irq_state |= 2; |
| r1527 | r1528 | |
| 364 | 413 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 365 | 414 | }; |
| 366 | 415 | |
| 367 | int i | |
| 416 | int i | |
| 368 | 417 | |
| 369 | 418 | /* switch off the mode */ |
| 370 | 419 | switch (vmode & 0x106) |
| 371 | 420 | { |
| 372 | 421 | /* YCC full */ |
| 373 | 422 | case 0x000: |
| 374 | { | |
| 375 | /* set color 0 to black */ | |
| 376 | palette_set_color(Machine, colors++, MAKE_RGB(0, 0, 0)); | |
| 377 | ||
| 378 | /* due to the way YCC colorspace maps onto RGB, there are multiple entries for black */ | |
| 379 | /* take advantage of this so we don't have to use all 64k colors */ | |
| 380 | 423 | for (i = 0; i < 65536; i++) |
| 381 | 424 | { |
| 382 | 425 | UINT8 r = (red_lookup[i >> 8] * (i & 0xff)) >> 8; |
| 383 | 426 | UINT8 g = (grn_lookup[i >> 8] * (i & 0xff)) >> 8; |
| 384 | 427 | UINT8 b = (blu_lookup[i >> 8] * (i & 0xff)) >> 8; |
| 385 | ||
| 386 | if (r == 0 && g == 0 && b == 0) | |
| 387 | pen_table[i] = 0; | |
| 388 | else | |
| 389 | { | |
| 390 | pen_table[i] = colors; | |
| 391 | palette_set_color(Machine, colors++, MAKE_RGB(r, g, b)); | |
| 392 | } | |
| 428 | pen_table[i] = MAKE_RGB(r, g, b); | |
| 393 | 429 | } |
| 394 | 430 | break; |
| 395 | } | |
| 396 | 431 | |
| 397 | 432 | /* YCC/RGB VARMOD */ |
| 398 | 433 | case 0x100: |
| 399 | 434 | case 0x107: |
| 400 | { | |
| 401 | /* set color 0 to black */ | |
| 402 | palette_set_color(Machine, colors++, MAKE_RGB(0, 0, 0)); | |
| 403 | ||
| 404 | /* due to the way YCC colorspace maps onto RGB, there are multiple entries for black */ | |
| 405 | /* take advantage of this so we don't have to use all 64k colors */ | |
| 406 | 435 | for (i = 0; i < 65536; i++) |
| 407 | 436 | { |
| 408 | 437 | UINT8 r = (red_lookup[i >> 8] * (i & 0xff)) >> 8; |
| r1527 | r1528 | |
| 419 | 448 | g = (g << 3) | (g >> 2); |
| 420 | 449 | b = (b << 3) | (b >> 2); |
| 421 | 450 | } |
| 422 | ||
| 423 | if (r == 0 && g == 0 && b == 0) | |
| 424 | pen_table[i] = 0; | |
| 425 | else | |
| 426 | { | |
| 427 | pen_table[i] = colors; | |
| 428 | palette_set_color(Machine, colors++, MAKE_RGB(r, g, b)); | |
| 429 | } | |
| 451 | pen_table[i] = MAKE_RGB(r, g, b); | |
| 430 | 452 | } |
| 431 | 453 | break; |
| 432 | } | |
| 433 | 454 | |
| 434 | 455 | /* RGB full */ |
| 435 | 456 | case 0x006: |
| 436 | { | |
| 437 | /* we cheat a little here to squeeze into 65534 colors */ | |
| 438 | palette_set_color(Machine, colors++, MAKE_RGB(0, 0, 0)); | |
| 439 | palette_set_color(Machine, colors++, MAKE_RGB(0, 8, 0)); | |
| 440 | palette_set_color(Machine, colors++, MAKE_RGB(0, 16, 0)); | |
| 441 | pen_table[0] = 0; | |
| 442 | pen_table[1] = 1; | |
| 443 | pen_table[2] = 1; | |
| 444 | pen_table[3] = 2; | |
| 445 | pen_table[4] = 2; | |
| 446 | ||
| 447 | /* map the remaining colors normally */ | |
| 448 | for (i = 5; i < 65536; i++) | |
| 449 | { | |
| 450 | pen_table[i] = colors; | |
| 451 | palette_set_color_rgb(Machine, colors++, pal5bit(i >> 11), pal6bit(i >> 0), pal5bit(i >> 6)); | |
| 452 | } | |
| 457 | for (i = 0; i < 65536; i++) | |
| 458 | pen_table[i] = MAKE_RGB(pal5bit(i >> 11), pal6bit(i >> 0), pal5bit(i >> 6)); | |
| 453 | 459 | break; |
| 454 | } | |
| 455 | 460 | |
| 456 | 461 | /* others */ |
| 457 | 462 | default: |
| r1527 | r1528 | |
| 637 | 642 | |
| 638 | 643 | WRITE16_HANDLER( jaguar_tom_regs_w ) |
| 639 | 644 | { |
| 640 | int scanline; | |
| 641 | ||
| 642 | 645 | if (offset < GPU_REGS) |
| 643 | 646 | { |
| 644 | 647 | COMBINE_DATA(&gpu_regs[offset]); |
| 645 | 648 | |
| 646 | 649 | switch (offset) |
| 647 | 650 | { |
| 648 | case VI: | |
| 649 | scanline = (gpu_regs[VI] - gpu_regs[VBE]) / 2; | |
| 650 | timer_adjust(vi_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline, attotime_zero); | |
| 651 | break; | |
| 652 | ||
| 653 | 651 | case INT1: |
| 654 | 652 | cpu_irq_state &= ~(gpu_regs[INT1] >> 8); |
| 655 | 653 | update_cpu_irq(); |
| r1527 | r1528 | |
| 658 | 656 | case VMODE: |
| 659 | 657 | jaguar_set_palette(gpu_regs[VMODE]); |
| 660 | 658 | break; |
| 659 | ||
| 660 | case HP: | |
| 661 | case HBB: | |
| 662 | case HBE: | |
| 663 | case HDB1: | |
| 664 | case HDB2: | |
| 665 | case HDE: | |
| 666 | case VP: | |
| 667 | case VBB: | |
| 668 | case VBE: | |
| 669 | case VDB: | |
| 670 | case VDE: | |
| 671 | { | |
| 672 | int hperiod = 2 * ((gpu_regs[HP] & 0x3ff) + 1); | |
| 673 | int hbend = effective_hvalue(ENABLE_BORDERS ? gpu_regs[HBE] : MIN(gpu_regs[HDB1], gpu_regs[HDB2])); | |
| 674 | int hbstart = effective_hvalue(gpu_regs[ENABLE_BORDERS ? HBB : HDE]); | |
| 675 | int vperiod = (gpu_regs[VP] & 0x7ff) + 1; | |
| 676 | int vbend = gpu_regs[VBE] & 0x7ff; | |
| 677 | int vbstart = gpu_regs[VBB] & 0x7ff; | |
| 678 | ||
| 679 | /* adjust for the half-lines */ | |
| 680 | if (hperiod != 0 && vperiod != 0 && hbend < hbstart && vbend < vbstart && hbstart < hperiod) | |
| 681 | { | |
| 682 | rectangle visarea; | |
| 683 | visarea.min_x = hbend / 2; | |
| 684 | visarea.max_x = hbstart / 2 - 1; | |
| 685 | visarea.min_y = vbend / 2; | |
| 686 | visarea.max_y = vbstart / 2 - 1; | |
| 687 | video_screen_configure(0, hperiod / 2, vperiod / 2, &visarea, HZ_TO_ATTOSECONDS((double)COJAG_PIXEL_CLOCK * 2 / hperiod / vperiod)); | |
| 688 | } | |
| 689 | break; | |
| 690 | } | |
| 661 | 691 | } |
| 662 | 692 | } |
| 663 | 693 | |
| r1527 | r1528 | |
| 702 | 732 | switch (offset) |
| 703 | 733 | { |
| 704 | 734 | case 0: |
| 705 | get_crosshair_xy(1, &beamx, &beamy); | |
| 706 | beamx += 52; | |
| 707 | beamy += 17; | |
| 735 | get_crosshair_xy(Machine, 1, &beamx, &beamy); | |
| 708 | 736 | return (beamy << 16) | (beamx ^ 0x1ff); |
| 709 | 737 | |
| 710 | 738 | case 1: |
| 711 | get_crosshair_xy(0, &beamx, &beamy); | |
| 712 | beamx += 52; | |
| 713 | beamy += 17; | |
| 739 | get_crosshair_xy(Machine, 0, &beamx, &beamy); | |
| 714 | 740 | return (beamy << 16) | (beamx ^ 0x1ff); |
| 715 | 741 | |
| 716 | 742 | case 2: |
| r1527 | r1528 | |
| 727 | 753 | * |
| 728 | 754 | *************************************/ |
| 729 | 755 | |
| 756 | static TIMER_CALLBACK( cojag_scanline_update ) | |
| 757 | { | |
| 758 | int vc = param & 0xffff; | |
| 759 | int hdb = param >> 16; | |
| 760 | ||
| 761 | /* only run if video is enabled and we are past the "display begin" */ | |
| 762 | if ((gpu_regs[VMODE] & 1) && vc >= (gpu_regs[VDB] & 0x7ff)) | |
| 763 | { | |
| 764 | UINT32 *dest = BITMAP_ADDR32(screen_bitmap, vc / 2, 0); | |
| 765 | int maxx = machine->screen[0].visarea.max_x; | |
| 766 | int hde = effective_hvalue(gpu_regs[HDE]) / 2; | |
| 767 | UINT16 scanline[360]; | |
| 768 | int x; | |
| 769 | ||
| 770 | /* if we are first on this scanline, clear to the border color */ | |
| 771 | if (ENABLE_BORDERS && vc % 2 == 0) | |
| 772 | { | |
| 773 | rgb_t border = MAKE_RGB(gpu_regs[BORD1] & 0xff, gpu_regs[BORD1] >> 8, gpu_regs[BORD2] & 0xff); | |
| 774 | for (x = machine->screen[0].visarea.min_x; x <= machine->screen[0].visarea.max_x; x++) | |
| 775 | dest[x] = border; | |
| 776 | } | |
| 777 | ||
| 778 | /* process the object list for this counter value */ | |
| 779 | process_object_list(vc, scanline); | |
| 780 | ||
| 781 | /* copy the data to the target, clipping */ | |
| 782 | for (x = 0; x < 360 && hdb <= maxx && hdb < hde; x++, hdb++) | |
| 783 | dest[hdb] = pen_table[scanline[x]]; | |
| 784 | } | |
| 785 | ||
| 786 | /* adjust the timer in a loop, to handle missed cases */ | |
| 787 | do | |
| 788 | { | |
| 789 | /* handle vertical interrupts */ | |
| 790 | if (vc == gpu_regs[VI]) | |
| 791 | { | |
| 792 | cpu_irq_state |= 1; | |
| 793 | update_cpu_irq(); | |
| 794 | } | |
| 795 | ||
| 796 | /* point to the next counter value */ | |
| 797 | if (++vc / 2 >= machine->screen[0].height) | |
| 798 | vc = 0; | |
| 799 | ||
| 800 | } while (!adjust_object_timer(machine, vc)); | |
| 801 | } | |
| 802 | ||
| 803 | ||
| 730 | 804 | VIDEO_START( cojag ) |
| 731 | 805 | { |
| 806 | object_timer = timer_alloc(cojag_scanline_update, NULL); | |
| 807 | adjust_object_timer(machine, 0); | |
| 808 | ||
| 809 | screen_bitmap = auto_bitmap_alloc(720, 512, BITMAP_FORMAT_RGB32); | |
| 810 | ||
| 732 | 811 | jagobj_init(); |
| 733 | 812 | |
| 734 | 813 | pen_table = auto_malloc(65536 * sizeof(pen_t)); |
| 735 | 814 | |
| 736 | vi_timer = timer_alloc(vi_callback, NULL); | |
| 737 | ||
| 738 | 815 | state_save_register_global_pointer(pen_table, 65536); |
| 739 | 816 | state_save_register_global_array(blitter_regs); |
| 740 | 817 | state_save_register_global_array(gpu_regs); |
| r1527 | r1528 | |
| 760 | 837 | } |
| 761 | 838 | |
| 762 | 839 | /* render the object list */ |
| 763 | | |
| 840 | | |
| 764 | 841 | return 0; |
| 765 | 842 | } |
| 766 | 843 |
| r1527 | r1528 | |
|---|---|---|
| 210 | 210 | |
| 211 | 211 | VIDEO_UPDATE( cvs ) |
| 212 | 212 | { |
| 213 | const int ram_based_char_start_ind | |
| 213 | static const int ram_based_char_start_ind | |
| 214 | 214 | int code; |
| 215 | 215 | offs_t offs; |
| 216 | 216 | int scroll[8]; |
| r1527 | r1528 | |
| 232 | 232 | character_banking_mode = cvs_get_character_banking_mode(); |
| 233 | 233 | |
| 234 | 234 | /* ROM based tiles first */ |
| 235 | for (code = 0; code < ram_based_char_start_ind | |
| 235 | for (code = 0; code < ram_based_char_start_ind | |
| 236 | 236 | decodechar(machine->gfx[0], code, memory_region(REGION_GFX1)); |
| 237 | 237 | |
| 238 | 238 | /* now the RAM based ones */ |
| r1527 | r1528 | |
|---|---|---|
| 608 | 608 | colortable[color * 64 + pen + 32*16*2] = ((color * 16 + pen)%(32*16)) + 32*16*2; |
| 609 | 609 | } |
| 610 | 610 | |
| 611 | // color prom | |
| 612 | PALETTE_INIT( inttoote ) | |
| 613 | { | |
| 614 | int x; | |
| 615 | for (x = 0; x < 0x200 ; x++) | |
| 616 | { | |
| 617 | int data = (color_prom[x*2] <<8) | color_prom[x*2+1]; | |
| 618 | palette_set_color_rgb(machine, x, pal5bit(data >> 10),pal5bit(data >> 5),pal5bit(data >> 0)); | |
| 619 | } | |
| 620 | } | |
| 611 | 621 | |
| 612 | ||
| 613 | ||
| 614 | 622 | PALETTE_INIT( usclssic ) |
| 615 | 623 | { |
| 616 | 624 | int color, pen; |
| r1527 | r1528 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | if(oldbg!=carjmbre_bgcolor) |
| 56 | 56 | { |
| 57 | memset(dirtybuffer,1,videoram_size); | |
| 58 | ||
| 59 | 57 | for (i=0;i<64;i+=4) |
| 60 | 58 | palette_set_color_rgb(Machine, i, (carjmbre_bgcolor&0xff)*0x50, (carjmbre_bgcolor&0xff)*0x50, (carjmbre_bgcolor&0xff)!=0?0x50:0); |
| 61 | 59 | } |
| r1527 | r1528 | |
|---|---|---|
| 85 | 85 | |
| 86 | 86 | WRITE8_HANDLER( megazone_flipscreen_w ) |
| 87 | 87 | { |
| 88 | if (flipscreen != (data & 1)) | |
| 89 | { | |
| 90 | flipscreen = data & 1; | |
| 91 | memset(dirtybuffer,1,videoram_size); | |
| 92 | } | |
| 88 | flipscreen = data & 1; | |
| 93 | 89 | } |
| 94 | 90 | |
| 95 | 91 | VIDEO_START( megazone ) |
| 96 | 92 | { |
| 97 | dirtybuffer = 0; | |
| 98 | tmpbitmap = 0; | |
| 99 | ||
| 100 | dirtybuffer = auto_malloc(videoram_size); | |
| 101 | memset(dirtybuffer,1,videoram_size); | |
| 102 | ||
| 103 | 93 | tmpbitmap = auto_bitmap_alloc(256,256,machine->screen[0].format); |
| 104 | 94 | } |
| 105 | 95 | |
| r1527 | r1528 | |
| 109 | 99 | int offs; |
| 110 | 100 | int x,y; |
| 111 | 101 | |
| 112 | /* for every character in the Video RAM, check if it has been modified */ | |
| 113 | /* since last time and update it accordingly. */ | |
| 102 | /* for every character in the Video RAM */ | |
| 114 | 103 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 115 | 104 | { |
| 116 | if (dirtybuffer[offs]) | |
| 117 | { | |
| 118 | int sx,sy,flipx,flipy; | |
| 105 | int sx,sy,flipx,flipy; | |
| 119 | 106 | |
| 120 | dirtybuffer[offs] = 0; | |
| 121 | ||
| 122 | sx = offs % 32; | |
| 123 | sy = offs / 32; | |
| 124 | flipx = colorram[offs] & (1<<6); | |
| 125 | flipy = colorram[offs] & (1<<5); | |
| 126 | if (flipscreen) | |
| 127 | { | |
| 128 | sx = 31 - sx; | |
| 129 | sy = 31 - sy; | |
| 130 | flipx = !flipx; | |
| 131 | flipy = !flipy; | |
| 132 | } | |
| 133 | ||
| 134 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 135 | ((int)videoram[offs]) + ((colorram[offs] & (1<<7) ? 256 : 0) ), | |
| 136 | (colorram[offs] & 0x0f) + 0x10, | |
| 137 | flipx,flipy, | |
| 138 | 8*sx,8*sy, | |
| 139 | 0,TRANSPARENCY_NONE,0); | |
| 107 | sx = offs % 32; | |
| 108 | sy = offs / 32; | |
| 109 | flipx = colorram[offs] & (1<<6); | |
| 110 | flipy = colorram[offs] & (1<<5); | |
| 111 | if (flipscreen) | |
| 112 | { | |
| 113 | sx = 31 - sx; | |
| 114 | sy = 31 - sy; | |
| 115 | flipx = !flipx; | |
| 116 | flipy = !flipy; | |
| 140 | 117 | } |
| 118 | ||
| 119 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 120 | ((int)videoram[offs]) + ((colorram[offs] & (1<<7) ? 256 : 0) ), | |
| 121 | (colorram[offs] & 0x0f) + 0x10, | |
| 122 | flipx,flipy, | |
| 123 | 8*sx,8*sy, | |
| 124 | 0,TRANSPARENCY_NONE,0); | |
| 141 | 125 | } |
| 142 | 126 | |
| 143 | 127 | /* copy the temporary bitmap to the screen */ |
| r1527 | r1528 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "victory.h" | |
| 8 | 9 | |
| 9 | 10 | |
| 10 | 11 | /* globally-accessible storage */ |
| 12 | UINT8 *victory_videoram; | |
| 11 | 13 | UINT8 *victory_charram; |
| 12 | 14 | |
| 13 | 15 | /* local allocated storage */ |
| 16 | static UINT16 victory_paletteram[0x40]; /* 9 bits used */ | |
| 14 | 17 | static UINT8 *bgbitmap; |
| 15 | 18 | static UINT8 *fgbitmap; |
| 16 | static UINT8 *bgdirty; | |
| 17 | static UINT8 *chardirty; | |
| 18 | static UINT8 *scandirty; | |
| 19 | 19 | static UINT8 *rram, *gram, *bram; |
| 20 | 20 | |
| 21 | 21 | /* interrupt, collision, and control states */ |
| r1527 | r1528 | |
| 23 | 23 | static UINT8 fgcoll, fgcollx, fgcolly; |
| 24 | 24 | static UINT8 bgcoll, bgcollx, bgcolly; |
| 25 | 25 | static UINT8 scrollx, scrolly; |
| 26 | static UINT8 update_complete; | |
| 27 | 26 | static UINT8 video_control; |
| 28 | 27 | |
| 29 | 28 | /* microcode state */ |
| r1527 | r1528 | |
| 44 | 43 | /* from what I can tell, this should be divided by 32, not 8 */ |
| 45 | 44 | /* but the interrupt test does some precise timing, and fails */ |
| 46 | 45 | /* if it's not 8 */ |
| 47 | #define MICRO_STATE_CLOCK_PERIOD ATTOTIME_IN_HZ(11827000/8) | |
| 46 | #define VICTORY_MICRO_STATE_CLOCK (XTAL_11_289MHz) | |
| 47 | #define MICRO_STATE_CLOCK_PERIOD ATTOTIME_IN_HZ(VICTORY_MICRO_STATE_CLOCK / 8) | |
| 48 | 48 | |
| 49 | 49 | |
| 50 | 50 | /* debugging constants */ |
| r1527 | r1528 | |
| 79 | 79 | bgbitmap = auto_malloc(256 * 256); |
| 80 | 80 | fgbitmap = auto_malloc(256 * 256); |
| 81 | 81 | |
| 82 | /* allocate dirty maps */ | |
| 83 | bgdirty = auto_malloc(32 * 32); | |
| 84 | chardirty = auto_malloc(256); | |
| 85 | scandirty = auto_malloc(512); | |
| 86 | ||
| 87 | /* mark everything dirty */ | |
| 88 | memset(bgdirty, 1, 32 * 32); | |
| 89 | memset(chardirty, 1, 256); | |
| 90 | memset(scandirty, 1, 512); | |
| 91 | ||
| 92 | 82 | /* reset globals */ |
| 93 | 83 | vblank_irq = 0; |
| 94 | 84 | fgcoll = fgcollx = fgcolly = 0; |
| 95 | 85 | bgcoll = bgcollx = bgcolly = 0; |
| 96 | 86 | scrollx = scrolly = 0; |
| 97 | update_complete = 0; | |
| 98 | 87 | video_control = 0; |
| 99 | 88 | memset(µ, 0, sizeof(micro)); |
| 100 | 89 | micro.timer = timer_alloc(NULL, NULL); |
| 90 | ||
| 91 | /* register for state saving */ | |
| 92 | state_save_register_global_array(victory_paletteram); | |
| 101 | 93 | } |
| 102 | 94 | |
| 103 | 95 | |
| r1527 | r1528 | |
| 120 | 112 | INTERRUPT_GEN( victory_vblank_interrupt ) |
| 121 | 113 | { |
| 122 | 114 | vblank_irq = 1; |
| 115 | ||
| 123 | 116 | victory_update_irq(); |
| 124 | logerror("------------- VBLANK ----------------\n"); | |
| 125 | 117 | } |
| 126 | 118 | |
| 127 | 119 | |
| 128 | 120 | |
| 129 | 121 | /************************************* |
| 130 | 122 | * |
| 131 | * | |
| 123 | * Pale | |
| 132 | 124 | * |
| 133 | 125 | *************************************/ |
| 134 | 126 | |
| 135 | WRITE8_HANDLER( victory_ | |
| 127 | WRITE8_HANDLER( victory_paletteram_w ) | |
| 136 | 128 | { |
| 137 | if (videoram[offset] != data) | |
| 138 | { | |
| 139 | videoram[offset] = data; | |
| 140 | bgdirty[offset] = 1; | |
| 141 | } | |
| 129 | victory_paletteram[offset & 0x3f] = ((offset & 0x80) << 1) | data; | |
| 142 | 130 | } |
| 143 | 131 | |
| 144 | 132 | |
| 145 | ||
| 146 | /************************************* | |
| 147 | * | |
| 148 | * Character RAM write | |
| 149 | * | |
| 150 | *************************************/ | |
| 151 | ||
| 152 | WRITE8_HANDLER( victory_charram_w ) | |
| 133 | static void set_palette(running_machine *machine) | |
| 153 | 134 | { |
| 154 | if (victory_charram[offset] != data) | |
| 135 | offs_t offs; | |
| 136 | ||
| 137 | for (offs = 0; offs < 0x40; offs++) | |
| 155 | 138 | { |
| 156 | victory_charram[offset] = data; | |
| 157 | chardirty[(offset / 8) % 256] = 1; | |
| 139 | UINT16 data = victory_paletteram[offs]; | |
| 140 | ||
| 141 | palette_set_color_rgb(machine, offs, pal3bit(data >> 6), pal3bit(data >> 0), pal3bit(data >> 3)); | |
| 158 | 142 | } |
| 159 | 143 | } |
| 160 | 144 | |
| r1527 | r1528 | |
| 162 | 146 | |
| 163 | 147 | /************************************* |
| 164 | 148 | * |
| 165 | * Palette RAM write | |
| 166 | * | |
| 167 | *************************************/ | |
| 168 | ||
| 169 | WRITE8_HANDLER( victory_paletteram_w ) | |
| 170 | { | |
| 171 | palette_set_color_rgb(Machine, offset & 0x3f, pal3bit(((offset & 0x80) >> 5) | ((data & 0xc0) >> 6)), pal3bit(data >> 0), pal3bit(data >> 3)); | |
| 172 | } | |
| 173 | ||
| 174 | ||
| 175 | ||
| 176 | /************************************* | |
| 177 | * | |
| 178 | 149 | * Video control read |
| 179 | 150 | * |
| 180 | 151 | *************************************/ |
| r1527 | r1528 | |
| 185 | 156 | |
| 186 | 157 | switch (offset) |
| 187 | 158 | { |
| 188 | case 0: | |
| 159 | case 0x00: | |
| 189 | 160 | result = fgcollx; |
| 190 | 161 | if (LOG_COLLISION) logerror("%04X:5XFIQ read = %02X\n", activecpu_get_previouspc(), result); |
| 191 | 162 | return result; |
| 192 | 163 | |
| 193 | case 1: | |
| 164 | case 0x01: | |
| 194 | 165 | result = fgcolly; |
| 195 | 166 | if (fgcoll) |
| 196 | 167 | { |
| r1527 | r1528 | |
| 200 | 171 | if (LOG_COLLISION) logerror("%04X:5CLFIQ read = %02X\n", activecpu_get_previouspc(), result); |
| 201 | 172 | return result; |
| 202 | 173 | |
| 203 | case 2: | |
| 174 | case 0x02: | |
| 204 | 175 | result = bgcollx & 0xfc; |
| 205 | 176 | if (LOG_COLLISION) logerror("%04X:5BACKX read = %02X\n", activecpu_get_previouspc(), result); |
| 206 | 177 | return result; |
| 207 | 178 | |
| 208 | case 3: | |
| 179 | case 0x03: | |
| 209 | 180 | result = bgcolly; |
| 210 | 181 | if (bgcoll) |
| 211 | 182 | { |
| r1527 | r1528 | |
| 215 | 186 | if (LOG_COLLISION) logerror("%04X:5BACKY read = %02X\n", activecpu_get_previouspc(), result); |
| 216 | 187 | return result; |
| 217 | 188 | |
| 218 | case 4: | |
| 189 | case 0x04: | |
| 219 | 190 | // D7 = BUSY (9A1) -- microcode |
| 220 | 191 | // D6 = 5FCIRQ (3B1) |
| 221 | 192 | // D5 = 5VIRQ |
| r1527 | r1528 | |
| 249 | 220 | { |
| 250 | 221 | switch (offset) |
| 251 | 222 | { |
| 252 | case 0: | |
| 223 | case 0x00: | |
| 253 | 224 | if (LOG_MICROCODE) logerror("%04X:IL=%02X\n", activecpu_get_previouspc(), data); |
| 254 | 225 | micro.i = (micro.i & 0xff00) | (data & 0x00ff); |
| 255 | 226 | break; |
| 256 | 227 | |
| 257 | case 1: | |
| 228 | case 0x01: | |
| 258 | 229 | if (LOG_MICROCODE) logerror("%04X:IH=%02X\n", activecpu_get_previouspc(), data); |
| 259 | 230 | micro.i = (micro.i & 0x00ff) | ((data << 8) & 0xff00); |
| 260 | 231 | if (micro.cmdlo == 5) |
| r1527 | r1528 | |
| 264 | 235 | } |
| 265 | 236 | break; |
| 266 | 237 | |
| 267 | case 2: | |
| 238 | case 0x02: | |
| 268 | 239 | if (LOG_MICROCODE) logerror("%04X:CMD=%02X\n", activecpu_get_previouspc(), data); |
| 269 | 240 | micro.cmd = data; |
| 270 | 241 | micro.cmdlo = data & 7; |
| r1527 | r1528 | |
| 279 | 250 | } |
| 280 | 251 | break; |
| 281 | 252 | |
| 282 | case 3: | |
| 253 | case 0x03: | |
| 283 | 254 | if (LOG_MICROCODE) logerror("%04X:G=%02X\n", activecpu_get_previouspc(), data); |
| 284 | 255 | micro.g = data; |
| 285 | 256 | break; |
| 286 | 257 | |
| 287 | case 4: | |
| 258 | case 0x04: | |
| 288 | 259 | if (LOG_MICROCODE) logerror("%04X:X=%02X\n", activecpu_get_previouspc(), data); |
| 289 | 260 | micro.xp = data; |
| 290 | 261 | if (micro.cmdlo == 3) |
| r1527 | r1528 | |
| 294 | 265 | } |
| 295 | 266 | break; |
| 296 | 267 | |
| 297 | case 5: | |
| 268 | case 0x05: | |
| 298 | 269 | if (LOG_MICROCODE) logerror("%04X:Y=%02X\n", activecpu_get_previouspc(), data); |
| 299 | 270 | micro.yp = data; |
| 300 | 271 | if (micro.cmdlo == 4) |
| r1527 | r1528 | |
| 304 | 275 | } |
| 305 | 276 | break; |
| 306 | 277 | |
| 307 | case 6: | |
| 278 | case 0x06: | |
| 308 | 279 | if (LOG_MICROCODE) logerror("%04X:R=%02X\n", activecpu_get_previouspc(), data); |
| 309 | 280 | micro.r = data; |
| 310 | 281 | break; |
| 311 | 282 | |
| 312 | case 7: | |
| 283 | case 0x07: | |
| 313 | 284 | if (LOG_MICROCODE) logerror("%04X:B=%02X\n", activecpu_get_previouspc(), data); |
| 314 | 285 | micro.b = data; |
| 315 | 286 | if (micro.cmdlo == 2) |
| r1527 | r1528 | |
| 324 | 295 | } |
| 325 | 296 | break; |
| 326 | 297 | |
| 327 | case 8: | |
| 298 | case 0x08: | |
| 328 | 299 | if (LOG_MICROCODE) logerror("%04X:SCROLLX write = %02X\n", activecpu_get_previouspc(), data); |
| 329 | 300 | scrollx = data; |
| 330 | 301 | break; |
| 331 | 302 | |
| 332 | case 9: | |
| 303 | case 0x09: | |
| 333 | 304 | if (LOG_MICROCODE) logerror("%04X:SCROLLY write = %02X\n", activecpu_get_previouspc(), data); |
| 334 | 305 | scrolly = data; |
| 335 | 306 | break; |
| 336 | 307 | |
| 337 | case | |
| 308 | case | |
| 338 | 309 | // D7 = HLMBK |
| 339 | 310 | // D6 = VLMBK |
| 340 | 311 | // D5 = BIRQEA |
| r1527 | r1528 | |
| 346 | 317 | video_control = data; |
| 347 | 318 | break; |
| 348 | 319 | |
| 349 | case | |
| 320 | case 0x0b: /* CLRVIRQ */ | |
| 350 | 321 | if (LOG_MICROCODE) logerror("%04X:CLRVIRQ write = %02X\n", activecpu_get_previouspc(), data); |
| 351 | 322 | vblank_irq = 0; |
| 352 | 323 | victory_update_irq(); |
| r1527 | r1528 | |
| 601 | 572 | if (micro.cmd & 0x40) |
| 602 | 573 | rram[addr] = micro.r; |
| 603 | 574 | |
| 604 | scandirty[addr >> 5] = 1; | |
| 605 | 575 | count_states(3); |
| 606 | 576 | return 0; |
| 607 | 577 | } |
| r1527 | r1528 | |
| 708 | 678 | } |
| 709 | 679 | } |
| 710 | 680 | |
| 711 | /* mark scanlines dirty */ | |
| 712 | sy = micro.yp; | |
| 713 | for (y = 0; y < ycount; y++) | |
| 714 | scandirty[sy++ & 0xff] = 1; | |
| 715 | ||
| 716 | 681 | count_states(3 + (2 + 2 * ycount) * xcount); |
| 717 | 682 | |
| 718 | 683 | return micro.cmd & 0x80; |
| r1527 | r1528 | |
| 858 | 823 | bram[addr + 1] ^= micro.b << nshift; |
| 859 | 824 | rram[addr + 0] ^= micro.r >> shift; |
| 860 | 825 | rram[addr + 1] ^= micro.r << nshift; |
| 861 | scandirty[y] = 1; | |
| 862 | 826 | |
| 863 | 827 | acc += i; |
| 864 | 828 | if (acc & 0x100) |
| r1527 | r1528 | |
| 895 | 859 | bram[addr + 1] ^= micro.b << nshift; |
| 896 | 860 | rram[addr + 0] ^= micro.r >> shift; |
| 897 | 861 | rram[addr + 1] ^= micro.r << nshift; |
| 898 | scandirty[y] = 1; | |
| 899 | 862 | |
| 900 | 863 | acc += i; |
| 901 | 864 | if (acc & 0x100) |
| r1527 | r1528 | |
| 962 | 925 | bram[daddr] = bram[saddr]; |
| 963 | 926 | if (micro.cmd & 0x40) |
| 964 | 927 | rram[daddr] = rram[saddr]; |
| 965 | ||
| 966 | scandirty[daddr >> 5] = 1; | |
| 967 | 928 | } |
| 968 | 929 | |
| 969 | 930 | count_states(3 + 2 * (64 - (micro.r & 31) * 2)); |
| r1527 | r1528 | |
| 1047 | 1008 | |
| 1048 | 1009 | count_states(4); |
| 1049 | 1010 | |
| 1050 | scandirty[micro.yp] = 1; | |
| 1051 | 1011 | return micro.cmd & 0x80; |
| 1052 | 1012 | } |
| 1053 | 1013 | |
| r1527 | r1528 | |
| 1062 | 1022 | { |
| 1063 | 1023 | int x, y, row, offs; |
| 1064 | 1024 | |
| 1065 | /* update the background and any dirty characters in it */ | |
| 1066 | 1025 | for (y = offs = 0; y < 32; y++) |
| 1067 | 1026 | for (x = 0; x < 32; x++, offs++) |
| 1068 | 1027 | { |
| 1069 | int code = videoram[offs]; | |
| 1028 | int code = victory_videoram[offs]; | |
| 1070 | 1029 | |
| 1071 | /* see if the videoram or character RAM has changed, redraw it */ | |
| 1072 | if (bgdirty[offs] || chardirty[code]) | |
| 1030 | for (row = 0; row < 8; row++) | |
| 1073 | 1031 | { |
| 1074 | for (row = 0; row < 8; row++) | |
| 1075 | { | |
| 1076 | UINT8 pix2 = victory_charram[0x0000 + 8 * code + row]; | |
| 1077 | UINT8 pix1 = victory_charram[0x0800 + 8 * code + row]; | |
| 1078 | UINT8 pix0 = victory_charram[0x1000 + 8 * code + row]; | |
| 1079 | UINT8 *dst = &bgbitmap[(y * 8 + row) * 256 + x * 8]; | |
| 1032 | UINT8 pix2 = victory_charram[0x0000 + 8 * code + row]; | |
| 1033 | UINT8 pix1 = victory_charram[0x0800 + 8 * code + row]; | |
| 1034 | UINT8 pix0 = victory_charram[0x1000 + 8 * code + row]; | |
| 1035 | UINT8 *dst = &bgbitmap[(y * 8 + row) * 256 + x * 8]; | |
| 1080 | 1036 | |
| 1081 | *dst++ = ((pix2 & 0x80) >> 5) | ((pix1 & 0x80) >> 6) | ((pix0 & 0x80) >> 7); | |
| 1082 | *dst++ = ((pix2 & 0x40) >> 4) | ((pix1 & 0x40) >> 5) | ((pix0 & 0x40) >> 6); | |
| 1083 | *dst++ = ((pix2 & 0x20) >> 3) | ((pix1 & 0x20) >> 4) | ((pix0 & 0x20) >> 5); | |
| 1084 | *dst++ = ((pix2 & 0x10) >> 2) | ((pix1 & 0x10) >> 3) | ((pix0 & 0x10) >> 4); | |
| 1085 | *dst++ = ((pix2 & 0x08) >> 1) | ((pix1 & 0x08) >> 2) | ((pix0 & 0x08) >> 3); | |
| 1086 | *dst++ = ((pix2 & 0x04) ) | ((pix1 & 0x04) >> 1) | ((pix0 & 0x04) >> 2); | |
| 1087 | *dst++ = ((pix2 & 0x02) << 1) | ((pix1 & 0x02) ) | ((pix0 & 0x02) >> 1); | |
| 1088 | *dst++ = ((pix2 & 0x01) << 2) | ((pix1 & 0x01) << 1) | ((pix0 & 0x01) ); | |
| 1089 | } | |
| 1090 | bgdirty[offs] = 0; | |
| 1037 | *dst++ = ((pix2 & 0x80) >> 5) | ((pix1 & 0x80) >> 6) | ((pix0 & 0x80) >> 7); | |
| 1038 | *dst++ = ((pix2 & 0x40) >> 4) | ((pix1 & 0x40) >> 5) | ((pix0 & 0x40) >> 6); | |
| 1039 | *dst++ = ((pix2 & 0x20) >> 3) | ((pix1 & 0x20) >> 4) | ((pix0 & 0x20) >> 5); | |
| 1040 | *dst++ = ((pix2 & 0x10) >> 2) | ((pix1 & 0x10) >> 3) | ((pix0 & 0x10) >> 4); | |
| 1041 | *dst++ = ((pix2 & 0x08) >> 1) | ((pix1 & 0x08) >> 2) | ((pix0 & 0x08) >> 3); | |
| 1042 | *dst++ = ((pix2 & 0x04) ) | ((pix1 & 0x04) >> 1) | ((pix0 & 0x04) >> 2); | |
| 1043 | *dst++ = ((pix2 & 0x02) << 1) | ((pix1 & 0x02) ) | ((pix0 & 0x02) >> 1); | |
| 1044 | *dst++ = ((pix2 & 0x01) << 2) | ((pix1 & 0x01) << 1) | ((pix0 & 0x01) ); | |
| 1091 | 1045 | } |
| 1092 | 1046 | } |
| 1093 | ||
| 1094 | /* reset the char dirty array */ | |
| 1095 | memset(chardirty, 0, 256); | |
| 1096 | 1047 | } |
| 1097 | 1048 | |
| 1098 | 1049 | |
| r1527 | r1528 | |
| 1106 | 1057 | { |
| 1107 | 1058 | int x, y; |
| 1108 | 1059 | |
| 1109 | /* update the foreground's dirty scanlines */ | |
| 1110 | 1060 | for (y = 0; y < 256; y++) |
| 1111 | if (scandirty[y]) | |
| 1061 | { | |
| 1062 | UINT8 *dst = &fgbitmap[y * 256]; | |
| 1063 | ||
| 1064 | /* assemble the RGB bits for each 8-pixel chunk */ | |
| 1065 | for (x = 0; x < 256; x += 8) | |
| 1112 | 1066 | { |
| 1113 | UINT8 *dst = &fgbitmap[y * 256]; | |
| 1067 | UINT8 g = gram[y * 32 + x / 8]; | |
| 1068 | UINT8 b = bram[y * 32 + x / 8]; | |
| 1069 | UINT8 r = rram[y * 32 + x / 8]; | |
| 1114 | 1070 | |
| 1115 | /* assemble the RGB bits for each 8-pixel chunk */ | |
| 1116 | for (x = 0; x < 256; x += 8) | |
| 1117 | { | |
| 1118 | UINT8 g = gram[y * 32 + x / 8]; | |
| 1119 | UINT8 b = bram[y * 32 + x / 8]; | |
| 1120 | UINT8 r = rram[y * 32 + x / 8]; | |
| 1121 | ||
| 1122 | *dst++ = ((r & 0x80) >> 5) | ((b & 0x80) >> 6) | ((g & 0x80) >> 7); | |
| 1123 | *dst++ = ((r & 0x40) >> 4) | ((b & 0x40) >> 5) | ((g & 0x40) >> 6); | |
| 1124 | *dst++ = ((r & 0x20) >> 3) | ((b & 0x20) >> 4) | ((g & 0x20) >> 5); | |
| 1125 | *dst++ = ((r & 0x10) >> 2) | ((b & 0x10) >> 3) | ((g & 0x10) >> 4); | |
| 1126 | *dst++ = ((r & 0x08) >> 1) | ((b & 0x08) >> 2) | ((g & 0x08) >> 3); | |
| 1127 | *dst++ = ((r & 0x04) ) | ((b & 0x04) >> 1) | ((g & 0x04) >> 2); | |
| 1128 | *dst++ = ((r & 0x02) << 1) | ((b & 0x02) ) | ((g & 0x02) >> 1); | |
| 1129 | *dst++ = ((r & 0x01) << 2) | ((b & 0x01) << 1) | ((g & 0x01) ); | |
| 1130 | } | |
| 1131 | scandirty[y] = 0; | |
| 1071 | *dst++ = ((r & 0x80) >> 5) | ((b & 0x80) >> 6) | ((g & 0x80) >> 7); | |
| 1072 | *dst++ = ((r & 0x40) >> 4) | ((b & 0x40) >> 5) | ((g & 0x40) >> 6); | |
| 1073 | *dst++ = ((r & 0x20) >> 3) | ((b & 0x20) >> 4) | ((g & 0x20) >> 5); | |
| 1074 | *dst++ = ((r & 0x10) >> 2) | ((b & 0x10) >> 3) | ((g & 0x10) >> 4); | |
| 1075 | *dst++ = ((r & 0x08) >> 1) | ((b & 0x08) >> 2) | ((g & 0x08) >> 3); | |
| 1076 | *dst++ = ((r & 0x04) ) | ((b & 0x04) >> 1) | ((g & 0x04) >> 2); | |
| 1077 | *dst++ = ((r & 0x02) << 1) | ((b & 0x02) ) | ((g & 0x02) >> 1); | |
| 1078 | *dst++ = ((r & 0x01) << 2) | ((b & 0x01) << 1) | ((g & 0x01) ); | |
| 1132 | 1079 | } |
| 1080 | } | |
| 1133 | 1081 | } |
| 1134 | 1082 | |
| 1135 | 1083 | |
| r1527 | r1528 | |
| 1145 | 1093 | |
| 1146 | 1094 | /************************************* |
| 1147 | 1095 | * |
| 1148 | * End-of-frame callback | |
| 1149 | * | |
| 1150 | *************************************/ | |
| 1151 | ||
| 1152 | VIDEO_EOF( victory ) | |
| 1153 | { | |
| 1154 | int bgcollmask = (video_control & 4) ? 4 : 7; | |
| 1155 | int count = 0; | |
| 1156 | int x, y; | |
| 1157 | ||
| 1158 | /* if we already did it, skip it */ | |
| 1159 | if (update_complete) | |
| 1160 | { | |
| 1161 | update_complete = 0; | |
| 1162 | return; | |
| 1163 | } | |
| 1164 | update_complete = 0; | |
| 1165 | ||
| 1166 | /* update the foreground & background */ | |
| 1167 | update_foreground(); | |
| 1168 | update_background(); | |
| 1169 | ||
| 1170 | /* blend the bitmaps and do collision detection */ | |
| 1171 | for (y = 0; y < 256; y++) | |
| 1172 | { | |
| 1173 | int sy = (scrolly + y) & 255; | |
| 1174 | UINT8 *fg = &fgbitmap[y * 256]; | |
| 1175 | UINT8 *bg = &bgbitmap[sy * 256]; | |
| 1176 | ||
| 1177 | /* do the blending */ | |
| 1178 | for (x = 0; x < 256; x++) | |
| 1179 | { | |
| 1180 | int fpix = *fg++; | |
| 1181 | int bpix = bg[(x + scrollx) & 255]; | |
| 1182 | if (fpix && (bpix & bgcollmask) && count++ < 128) | |
| 1183 | timer_set(video_screen_get_time_until_pos(0, y, x), NULL, x | (y << 8), bgcoll_irq_callback); | |
| 1184 | } | |
| 1185 | } | |
| 1186 | } | |
| 1187 | ||
| 1188 | ||
| 1189 | ||
| 1190 | /************************************* | |
| 1191 | * | |
| 1192 | 1096 | * Standard screen refresh callback |
| 1193 | 1097 | * |
| 1194 | 1098 | *************************************/ |
| r1527 | r1528 | |
| 1199 | 1103 | int count = 0; |
| 1200 | 1104 | int x, y; |
| 1201 | 1105 | |
| 1106 | /* copy the palette from palette RAM */ | |
| 1107 | set_palette(machine); | |
| 1108 | ||
| 1202 | 1109 | /* update the foreground & background */ |
| 1203 | 1110 | update_foreground(); |
| 1204 | 1111 | update_background(); |
| r1527 | r1528 | |
| 1206 | 1113 | /* blend the bitmaps and do collision detection */ |
| 1207 | 1114 | for (y = 0; y < 256; y++) |
| 1208 | 1115 | { |
| 1209 | | |
| 1116 | UINT8 sy = | |
| 1210 | 1117 | UINT8 *fg = &fgbitmap[y * 256]; |
| 1211 | 1118 | UINT8 *bg = &bgbitmap[sy * 256]; |
| 1212 | 1119 | UINT8 scanline[256]; |
| r1527 | r1528 | |
| 1225 | 1132 | draw_scanline8(bitmap, 0, y, 256, scanline, machine->pens, -1); |
| 1226 | 1133 | } |
| 1227 | 1134 | |
| 1228 | /* indicate that we already did collision detection */ | |
| 1229 | update_complete = 1; | |
| 1230 | 1135 | return 0; |
| 1231 | 1136 | } |
| r1527 | r1528 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | VIDEO_START( vigilant ) |
| 42 | 42 | { |
| 43 | video_start_generic(machine); | |
| 44 | ||
| 45 | 43 | bg_bitmap = auto_bitmap_alloc(512*4,256,machine->screen[0].format); |
| 46 | 44 | } |
| 47 | 45 | |
| r1527 | r1528 | |
| 322 | 320 | int color = (attributes & 0xF0) >> 4; |
| 323 | 321 | int tile_number = videoram[offs] | ((attributes & 0x0F) << 8); |
| 324 | 322 | |
| 325 | if (dirtybuffer[offs] || dirtybuffer[offs+1]) | |
| 326 | { | |
| 327 | dirtybuffer[offs] = dirtybuffer[offs+1] = 0; | |
| 328 | ||
| 329 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 330 | tile_number, | |
| 331 | color, | |
| 332 | 0,0, | |
| 333 | sx,sy, | |
| 334 | 0,TRANSPARENCY_NONE,0); | |
| 335 | } | |
| 323 | drawgfx(bitmap,machine->gfx[0], | |
| 324 | tile_number, | |
| 325 | color, | |
| 326 | 0,0, | |
| 327 | sx,sy, | |
| 328 | cliprect,TRANSPARENCY_NONE,0); | |
| 336 | 329 | } |
| 337 | 330 | |
| 338 | copybitmap(bitmap,tmpbitmap,0,0,0,0,cliprect,TRANSPARENCY_NONE,0); | |
| 339 | ||
| 340 | 331 | draw_sprites(machine,bitmap,cliprect); |
| 341 | 332 | return 0; |
| 342 | 333 | } |
| r1527 | r1528 | |
|---|---|---|
| 12 | 12 | UINT16* tatsumi_sprite_control_ram; |
| 13 | 13 | static UINT16* roundup5_vram; |
| 14 | 14 | |
| 15 | extern UINT16 bigfight_a | |
| 15 | extern UINT16 bigfight_a | |
| 16 | 16 | static UINT16 bigfight_bank, bigfight_last_bank; |
| 17 | 17 | |
| 18 | 18 | static UINT8 roundupt_crt_selected_reg; |
| r1527 | r1528 | |
|---|---|---|
| 2270 | 2270 | K052109_RMRD_line = state; |
| 2271 | 2271 | } |
| 2272 | 2272 | |
| 2273 | int K052109_get_RMRD_line(void) | |
| 2274 | { | |
| 2275 | return K052109_RMRD_line; | |
| 2276 | } | |
| 2273 | 2277 | |
| 2278 | ||
| 2274 | 2279 | void K052109_tilemap_update(void) |
| 2275 | 2280 | { |
| 2276 | 2281 | #if 0 |
| r1527 | r1528 | |
|---|---|---|
| 75 | 75 | READ16_HANDLER( K052109_lsb_r ); |
| 76 | 76 | WRITE16_HANDLER( K052109_lsb_w ); |
| 77 | 77 | void K052109_set_RMRD_line(int state); |
| 78 | int K052109_get_RMRD_line(void); | |
| 78 | 79 | void K052109_tilemap_update(void); |
| 79 | 80 | int K052109_is_IRQ_enabled(void); |
| 80 | 81 | void K052109_set_layer_offsets(int layer, int dx, int dy); |
| r1527 | r1528 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | #define CPK_VIDEO_SIZE 0x800 |
| 12 | 12 | |
| 13 | static UINT8 * cpk_colorram; | |
| 14 | static UINT8 * cpk_videoram; | |
| 13 | UINT8 * cpk_colorram; | |
| 14 | UINT8 * cpk_videoram; | |
| 15 | UINT8 * cpk_expram; | |
| 15 | 16 | static UINT8 * cpk_palette; |
| 16 | 17 | static UINT8 * cpk_palette2; |
| 17 | static UINT8 * cpk_expram; | |
| 18 | 18 | |
| 19 | static UINT8 * dirtybuffer1; | |
| 20 | static mame_bitmap *tmpbitmap2; | |
| 21 | ||
| 22 | 19 | static int hopperOK = 0; |
| 23 | 20 | static int intstate1 = 0; /* unknown */ |
| 24 | 21 | static int intstate2 = 0; /* unknown */ |
| r1527 | r1528 | |
| 48 | 45 | |
| 49 | 46 | /* Video handling */ |
| 50 | 47 | |
| 51 | READ8_HANDLER( cpk_videoram_r ) | |
| 52 | { | |
| 53 | return cpk_videoram[offset]; | |
| 54 | } | |
| 55 | ||
| 56 | WRITE8_HANDLER( cpk_videoram_w ) | |
| 57 | { | |
| 58 | if (cpk_videoram[offset] != data) | |
| 59 | { | |
| 60 | cpk_videoram[offset] = data; | |
| 61 | dirtybuffer[offset] = 1; | |
| 62 | } | |
| 63 | } | |
| 64 | ||
| 65 | READ8_HANDLER( cpk_colorram_r ) | |
| 66 | { | |
| 67 | return cpk_colorram[offset]; | |
| 68 | } | |
| 69 | ||
| 70 | WRITE8_HANDLER( cpk_colorram_w ) | |
| 71 | { | |
| 72 | if (cpk_colorram[offset] != data) | |
| 73 | { | |
| 74 | cpk_colorram[offset] = data; | |
| 75 | dirtybuffer[offset] = 1; | |
| 76 | } | |
| 77 | } | |
| 78 | ||
| 79 | 48 | READ8_HANDLER( cpk_expansion_r ) |
| 80 | 49 | { |
| 81 | 50 | UINT8 * RAM = memory_region(REGION_GFX3); |
| r1527 | r1528 | |
| 83 | 52 | } |
| 84 | 53 | |
| 85 | 54 | |
| 86 | WRITE8_HANDLER( cpk_expansion_w ) | |
| 87 | { | |
| 88 | if (cpk_expram[offset] != data) | |
| 89 | { | |
| 90 | cpk_expram[offset] = data; | |
| 91 | dirtybuffer1[offset] = 1; | |
| 92 | } | |
| 93 | } | |
| 94 | ||
| 95 | 55 | /* Machine init/deinit */ |
| 96 | 56 | |
| 97 | 57 | VIDEO_START( cska ) |
| 98 | 58 | { |
| 99 | 59 | int i; |
| 100 | 60 | |
| 101 | dirtybuffer = auto_malloc(CPK_VIDEO_SIZE * sizeof(UINT8)); | |
| 102 | dirtybuffer1 = auto_malloc(CPK_VIDEO_SIZE * sizeof(UINT8)); | |
| 103 | cpk_colorram = auto_malloc(CPK_VIDEO_SIZE * sizeof(UINT8)); | |
| 104 | cpk_videoram = auto_malloc(CPK_VIDEO_SIZE * sizeof(UINT8)); | |
| 105 | cpk_expram = auto_malloc(CPK_VIDEO_SIZE * sizeof(UINT8)); | |
| 106 | ||
| 107 | 61 | cpk_palette = auto_malloc(0x800 * sizeof(UINT8)); |
| 108 | 62 | cpk_palette2 = auto_malloc(0x800 * sizeof(UINT8)); |
| 109 | 63 | |
| 110 | tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 111 | tmpbitmap2 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 112 | ||
| 113 | 64 | /* leave everything at the default, but map all foreground 0 pens as transparent */ |
| 114 | 65 | for (i = 0;i < 16;i++) |
| 115 | 66 | { |
| r1527 | r1528 | |
| 144 | 95 | memset(cpk_videoram, 0, CPK_VIDEO_SIZE); |
| 145 | 96 | memset(cpk_colorram, 0, CPK_VIDEO_SIZE); |
| 146 | 97 | memset(cpk_expram, 0, CPK_VIDEO_SIZE); |
| 147 | memset(dirtybuffer, 1, CPK_VIDEO_SIZE); | |
| 148 | memset(dirtybuffer1, 0, CPK_VIDEO_SIZE); | |
| 149 | 98 | memset(cpk_palette, 0, 0x800); |
| 150 | 99 | memset(cpk_palette2, 0, 0x800); |
| 151 | 100 | |
| r1527 | r1528 | |
| 198 | 147 | // memset(&palette_used_colors[64 * color + 1],PALETTE_COLOR_USED,63); |
| 199 | 148 | } |
| 200 | 149 | |
| 201 | if (abilityflag) | |
| 202 | // memset(&palette_used_colors[0], PALETTE_COLOR_USED, 64); | |
| 203 | ||
| 204 | // if (palette_recalc()) | |
| 205 | { | |
| 206 | memset(dirtybuffer, 1, CPK_VIDEO_SIZE); | |
| 207 | } | |
| 208 | ||
| 209 | 150 | #if 0 |
| 210 | 151 | if (keyboard_pressed(KEYCODE_9)) |
| 211 | 152 | { |
| r1527 | r1528 | |
| 223 | 164 | { |
| 224 | 165 | for (offs = (CPK_VIDEO_SIZE)-1; offs >= 0; offs--) |
| 225 | 166 | { |
| 226 | if (dirtybuffer1[offs] || dirtybuffer[offs]) | |
| 227 | { | |
| 228 | int sx,sy; | |
| 167 | int sx,sy; | |
| 229 | 168 | |
| 230 | 169 | |
| 231 | dirtybuffer1[offs] = 0; | |
| 170 | sx = offs % 64; | |
| 171 | sy = offs / 64; | |
| 232 | 172 | |
| 233 | sx = offs % 64; | |
| 234 | sy = offs / 64; | |
| 235 | ||
| 236 | drawgfx(tmpbitmap2,machine->gfx[1+(offs % 4)], | |
| 237 | cpk_expram[offs], | |
| 238 | 0, | |
| 239 | 0,0, | |
| 240 | 8*sx,32*sy, | |
| 241 | 0,TRANSPARENCY_NONE,0); | |
| 242 | } | |
| 173 | drawgfx(bitmap,machine->gfx[1+(offs % 4)], | |
| 174 | cpk_expram[offs], | |
| 175 | 0, | |
| 176 | 0,0, | |
| 177 | 8*sx,32*sy, | |
| 178 | cliprect,TRANSPARENCY_NONE,0); | |
| 243 | 179 | } |
| 244 | copybitmap(bitmap,tmpbitmap2,0,0,0,0,cliprect,TRANSPARENCY_NONE,0); | |
| 245 | 180 | } |
| 246 | 181 | |
| 247 | 182 | for (offs = CPK_VIDEO_SIZE-1; offs >= 0; offs--) |
| r1527 | r1528 | |
| 249 | 184 | int tile = cpk_videoram[offs] + ((cpk_colorram[offs] & 0x1f) << 8); |
| 250 | 185 | int color = (tile != 0x1fff) ? (((cpk_colorram[offs] & 0xe0) >> 4) + 1) : 0; |
| 251 | 186 | |
| 252 | if (dirtybuffer[offs]) | |
| 253 | { | |
| 254 | int sx,sy; | |
| 187 | int sx,sy; | |
| 255 | 188 | |
| 256 | 189 | |
| 257 | dirtybuffer[offs] = 0; | |
| 190 | sx = offs % 64; | |
| 191 | sy = offs / 64; | |
| 258 | 192 | |
| 259 | sx = offs % 64; | |
| 260 | sy = offs / 64; | |
| 261 | ||
| 262 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 263 | tile, | |
| 264 | color, | |
| 265 | 0,0, | |
| 266 | 8*sx,8*sy, | |
| 267 | 0, TRANSPARENCY_NONE, 0); | |
| 268 | } | |
| 193 | drawgfx(bitmap,machine->gfx[0], | |
| 194 | tile, | |
| 195 | color, | |
| 196 | 0,0, | |
| 197 | 8*sx,8*sy, | |
| 198 | cliprect, | |
| 199 | (abilityflag) ? TRANSPARENCY_COLOR : TRANSPARENCY_NONE, 0); | |
| 269 | 200 | } |
| 270 | 201 | |
| 271 | copybitmap(bitmap,tmpbitmap,0,0,0,0,cliprect, (abilityflag) ? TRANSPARENCY_COLOR : TRANSPARENCY_NONE, 0); | |
| 272 | 202 | return 0; |
| 273 | 203 | } |
| r1527 | r1528 | |
|---|---|---|
| 12 | 12 | |
| 13 | 13 | UINT8 *naughtyb_videoram2; |
| 14 | 14 | |
| 15 | static int videoreg; | |
| 16 | ||
| 17 | 15 | /* use these to draw charset B */ |
| 18 | 16 | UINT8 *naughtyb_scrollreg; |
| 19 | 17 | |
| r1527 | r1528 | |
| 150 | 148 | ***************************************************************************/ |
| 151 | 149 | VIDEO_START( naughtyb ) |
| 152 | 150 | { |
| 153 | | |
| 151 | | |
| 154 | 152 | |
| 155 | 153 | /* Naughty Boy has a virtual screen twice as large as the visible screen */ |
| 156 | dirtybuffer = auto_malloc(videoram_size); | |
| 157 | memset(dirtybuffer, 1, videoram_size); | |
| 158 | ||
| 159 | 154 | tmpbitmap = auto_bitmap_alloc(68*8,28*8,machine->screen[0].format); |
| 160 | 155 | } |
| 161 | 156 | |
| 162 | 157 | |
| 163 | 158 | |
| 164 | 159 | |
| 165 | WRITE8_HANDLER( naughtyb_videoram2_w ) | |
| 166 | { | |
| 167 | if (naughtyb_videoram2[offset] != data) | |
| 168 | { | |
| 169 | dirtybuffer[offset] = 1; | |
| 170 | ||
| 171 | naughtyb_videoram2[offset] = data; | |
| 172 | } | |
| 173 | } | |
| 174 | ||
| 175 | ||
| 176 | ||
| 177 | 160 | WRITE8_HANDLER( naughtyb_videoreg_w ) |
| 178 | 161 | { |
| 179 | 162 | // bits 4+5 control the sound circuit |
| 180 | 163 | |
| 181 | 164 | pleiads_sound_control_c_w(offset,data); |
| 182 | 165 | |
| 183 | if ((videoreg & 0x0f) != (data & 0x0f)) | |
| 184 | { | |
| 185 | videoreg = data; | |
| 186 | ||
| 187 | naughtyb_cocktail = | |
| 188 | ( ( input_port_2_r(0) & 0x80 ) && // cabinet == cocktail | |
| 189 | ( data & 0x01 ) ); // handling player 2 | |
| 190 | palreg = (data >> 1) & 0x03; // pallette sel is bit 1 & 2 | |
| 191 | bankreg = (data >> 2) & 0x01; // banksel is just bit 2 | |
| 192 | ||
| 193 | memset (dirtybuffer, 1, videoram_size); | |
| 194 | } | |
| 166 | naughtyb_cocktail = | |
| 167 | ( ( input_port_2_r(0) & 0x80 ) && // cabinet == cocktail | |
| 168 | ( data & 0x01 ) ); // handling player 2 | |
| 169 | palreg = (data >> 1) & 0x03; // pallette sel is bit 1 & 2 | |
| 170 | bankreg = (data >> 2) & 0x01; // banksel is just bit 2 | |
| 195 | 171 | } |
| 196 | 172 | |
| 197 | 173 | WRITE8_HANDLER( popflame_videoreg_w ) |
| r1527 | r1528 | |
| 200 | 176 | |
| 201 | 177 | pleiads_sound_control_c_w(offset,data); |
| 202 | 178 | |
| 203 | if ((videoreg & 0x0f) != (data & 0x0f)) | |
| 204 | { | |
| 205 | videoreg = data; | |
| 206 | ||
| 207 | naughtyb_cocktail = | |
| 208 | ( ( input_port_2_r(0) & 0x80 ) && // cabinet == cocktail | |
| 209 | ( data & 0x01 ) ); // handling player 2 | |
| 210 | palreg = (data >> 1) & 0x03; // pallette sel is bit 1 & 2 | |
| 211 | bankreg = (data >> 3) & 0x01; // banksel is just bit 3 | |
| 212 | ||
| 213 | memset (dirtybuffer, 1, videoram_size); | |
| 214 | } | |
| 179 | naughtyb_cocktail = | |
| 180 | ( ( input_port_2_r(0) & 0x80 ) && // cabinet == cocktail | |
| 181 | ( data & 0x01 ) ); // handling player 2 | |
| 182 | palreg = (data >> 1) & 0x03; // pallette sel is bit 1 & 2 | |
| 183 | bankreg = (data >> 3) & 0x01; // banksel is just bit 3 | |
| 215 | 184 | } |
| 216 | 185 | |
| 217 | 186 | |
| r1527 | r1528 | |
| 264 | 233 | { |
| 265 | 234 | int offs; |
| 266 | 235 | |
| 267 | // for every character in the Video RAM, check if it has been modified | |
| 268 | // since last time and update it accordingly. | |
| 236 | // for every character in the Video RAM | |
| 269 | 237 | |
| 270 | 238 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 271 | 239 | { |
| 272 | if (dirtybuffer[offs]) | |
| 273 | { | |
| 274 | int sx,sy; | |
| 240 | int sx,sy; | |
| 275 | 241 | |
| 276 | dirtybuffer[offs] = 0; | |
| 277 | ||
| 278 | if ( naughtyb_cocktail ) | |
| 242 | if ( naughtyb_cocktail ) | |
| 243 | { | |
| 244 | if (offs < 0x700) | |
| 279 | 245 | { |
| 280 | if (offs < 0x700) | |
| 281 | { | |
| 282 | sx = 63 - offs % 64; | |
| 283 | sy = 27 - offs / 64; | |
| 284 | } | |
| 285 | else | |
| 286 | { | |
| 287 | sx = 64 + ( 3 - (offs - 0x700) % 4 ); | |
| 288 | sy = 27 - (offs - 0x700) / 4; | |
| 289 | } | |
| 246 | sx = 63 - offs % 64; | |
| 247 | sy = 27 - offs / 64; | |
| 290 | 248 | } |
| 291 | 249 | else |
| 292 | 250 | { |
| 293 | if (offs < 0x700) | |
| 294 | { | |
| 295 | sx = offs % 64; | |
| 296 | sy = offs / 64; | |
| 297 | } | |
| 298 | else | |
| 299 | { | |
| 300 | sx = 64 + (offs - 0x700) % 4; | |
| 301 | sy = (offs - 0x700) / 4; | |
| 302 | } | |
| 251 | sx = 64 + ( 3 - (offs - 0x700) % 4 ); | |
| 252 | sy = 27 - (offs - 0x700) / 4; | |
| 303 | 253 | } |
| 254 | } | |
| 255 | else | |
| 256 | { | |
| 257 | if (offs < 0x700) | |
| 258 | { | |
| 259 | sx = offs % 64; | |
| 260 | sy = offs / 64; | |
| 261 | } | |
| 262 | else | |
| 263 | { | |
| 264 | sx = 64 + (offs - 0x700) % 4; | |
| 265 | sy = (offs - 0x700) / 4; | |
| 266 | } | |
| 267 | } | |
| 304 | 268 | |
| 305 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 306 | naughtyb_videoram2[offs] + 256 * bankreg, | |
| 307 | (naughtyb_videoram2[offs] >> 5) + 8 * palreg, | |
| 308 | naughtyb_cocktail,naughtyb_cocktail, | |
| 309 | 8*sx,8*sy, | |
| 310 | 0,TRANSPARENCY_NONE,0); | |
| 269 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 270 | naughtyb_videoram2[offs] + 256 * bankreg, | |
| 271 | (naughtyb_videoram2[offs] >> 5) + 8 * palreg, | |
| 272 | naughtyb_cocktail,naughtyb_cocktail, | |
| 273 | 8*sx,8*sy, | |
| 274 | 0,TRANSPARENCY_NONE,0); | |
| 311 | 275 | |
| 312 | drawgfx(tmpbitmap,machine->gfx[1], | |
| 313 | videoram[offs] + 256*bankreg, | |
| 314 | (videoram[offs] >> 5) + 8 * palreg, | |
| 315 | naughtyb_cocktail,naughtyb_cocktail, | |
| 316 | 8*sx,8*sy, | |
| 317 | 0,TRANSPARENCY_PEN,0); | |
| 318 | } | |
| 276 | drawgfx(tmpbitmap,machine->gfx[1], | |
| 277 | videoram[offs] + 256*bankreg, | |
| 278 | (videoram[offs] >> 5) + 8 * palreg, | |
| 279 | naughtyb_cocktail,naughtyb_cocktail, | |
| 280 | 8*sx,8*sy, | |
| 281 | 0,TRANSPARENCY_PEN,0); | |
| 319 | 282 | } |
| 320 | 283 | |
| 321 | 284 | // copy the temporary bitmap to the screen |
| r1527 | r1528 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "video/resnet.h" | |
| 10 | 11 | #include "phoenix.h" |
| 11 | 12 | |
| 12 | static UINT8 *videoram_pg1; | |
| 13 | static UINT8 *videoram_pg2; | |
| 14 | static UINT8 *current_videoram_pg; | |
| 15 | static int current_videoram_pg_index; | |
| 16 | static int palette_bank; | |
| 17 | static int cocktail_mode; | |
| 13 | static UINT8 *videoram_pg[2]; | |
| 14 | static UINT8 videoram_pg_index; | |
| 15 | static UINT8 palette_bank; | |
| 16 | static UINT8 cocktail_mode; | |
| 18 | 17 | static int pleiads_protection_question; |
| 19 | 18 | static int survival_protection_value; |
| 20 | 19 | static tilemap *fg_tilemap, *bg_tilemap; |
| r1527 | r1528 | |
| 42 | 41 | |
| 43 | 42 | ***************************************************************************/ |
| 44 | 43 | |
| 44 | static const res_net_decode_info phoenix_decode_info = | |
| 45 | { | |
| 46 | 2, // there may be two proms needed to construct color | |
| 47 | 0, // start at 0 | |
| 48 | 255, // end at 255 | |
| 49 | // R, G, B, R, G, B | |
| 50 | { 0, 0, 0, 256, 256, 256}, // offsets | |
| 51 | { 0, 2, 1, -1, 1, 0}, // shifts | |
| 52 | {0x01,0x01,0x01,0x02,0x02,0x02} // masks | |
| 53 | }; | |
| 54 | ||
| 55 | static const res_net_info phoenix_net_info = | |
| 56 | { | |
| 57 | RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_OPEN_COL, | |
| 58 | { | |
| 59 | { RES_NET_AMP_NONE, 270, 270, 2, { 270, 1 } }, | |
| 60 | { RES_NET_AMP_NONE, 270, 270, 2, { 270, 1 } }, | |
| 61 | { RES_NET_AMP_NONE, 270, 270, 2, { 270, 1 } } | |
| 62 | } | |
| 63 | }; | |
| 64 | ||
| 45 | 65 | PALETTE_INIT( phoenix ) |
| 46 | 66 | { |
| 47 | 67 | int i; |
| 68 | int t[4]= {0,1,2,3}; | |
| 69 | rgb_t *rgb; | |
| 48 | 70 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) |
| 49 | 71 | |
| 50 | ||
| 51 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 72 | rgb = compute_res_net_all(color_prom, &phoenix_decode_info, &phoenix_net_info); | |
| 73 | /* native order */ | |
| 74 | for (i=0;i<256;i++) | |
| 52 | 75 | { |
| 53 | int bit0,bit1,r,g,b; | |
| 54 | ||
| 55 | ||
| 56 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 57 | bit1 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 58 | r = 0x55 * bit0 + 0xaa * bit1; | |
| 59 | bit0 = (color_prom[0] >> 2) & 0x01; | |
| 60 | bit1 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 61 | g = 0x55 * bit0 + 0xaa * bit1; | |
| 62 | bit0 = (color_prom[0] >> 1) & 0x01; | |
| 63 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 64 | b = 0x55 * bit0 + 0xaa * bit1; | |
| 65 | ||
| 66 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 67 | color_prom++; | |
| 76 | int col; | |
| 77 | col = ((t[i & 0x03] << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0x60); | |
| 78 | palette_set_color(machine,i,rgb[col]); | |
| 68 | 79 | } |
| 80 | palette_normalize_range(machine->palette, 0, 255, 0, 255); | |
| 81 | free(rgb); | |
| 69 | 82 | |
| 70 | 83 | /* first bank of characters use colors 0x00-0x1f and 0x40-0x5f */ |
| 71 | 84 | /* second bank of characters use colors 0x20-0x3f and 0x60-0x7f */ |
| 72 | for (i = 0;i < 0x40;i++) | |
| 73 | { | |
| 74 | int col; | |
| 75 | ||
| 76 | ||
| 77 | col = ((i & 0x1c) >> 2) | ((i & 0x03) << 3) | ((i & 0x20) << 1); | |
| 78 | ||
| 79 | COLOR(0,i) = col; | |
| 80 | COLOR(1,i) = col | 0x20; | |
| 81 | } | |
| 82 | 85 | } |
| 83 | 86 | |
| 84 | 87 | PALETTE_INIT( pleiads ) |
| r1527 | r1528 | |
| 128 | 131 | |
| 129 | 132 | static TILE_GET_INFO( get_fg_tile_info ) |
| 130 | 133 | { |
| 134 | int code, col; | |
| 135 | ||
| 136 | code = videoram_pg[videoram_pg_index][tile_index]; | |
| 137 | col = (code >> 5); | |
| 138 | col = col | 0x08 | (palette_bank << 4); | |
| 139 | SET_TILE_INFO( | |
| 140 | 1, | |
| 141 | code, | |
| 142 | col, | |
| 143 | 0); | |
| 144 | } | |
| 145 | ||
| 146 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 147 | { | |
| 148 | int code, col; | |
| 149 | ||
| 150 | code = videoram_pg[videoram_pg_index][tile_index + 0x800]; | |
| 151 | col = (code >> 5); | |
| 152 | col = col | 0x00 | (palette_bank << 4); | |
| 153 | SET_TILE_INFO( | |
| 154 | 0, | |
| 155 | code, | |
| 156 | col, | |
| 157 | 0); | |
| 158 | } | |
| 159 | ||
| 160 | static TILE_GET_INFO( pleiads_get_fg_tile_info ) | |
| 161 | { | |
| 131 | 162 | int code; |
| 132 | 163 | |
| 133 | code = | |
| 164 | code = vid | |
| 134 | 165 | SET_TILE_INFO( |
| 135 | 166 | 1, |
| 136 | 167 | code, |
| r1527 | r1528 | |
| 138 | 169 | (tile_index & 0x1f) ? 0 : TILE_FORCE_LAYER0); /* first row (column) is opaque */ |
| 139 | 170 | } |
| 140 | 171 | |
| 141 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 172 | static TILE_GET_INFO( pleiads_get_bg_tile_info ) | |
| 142 | 173 | { |
| 143 | 174 | int code; |
| 144 | 175 | |
| 145 | code = | |
| 176 | code = vid | |
| 146 | 177 | SET_TILE_INFO( |
| 147 | 178 | 0, |
| 148 | 179 | code, |
| r1527 | r1528 | |
| 150 | 181 | 0); |
| 151 | 182 | } |
| 152 | 183 | |
| 153 | ||
| 154 | 184 | /*************************************************************************** |
| 155 | 185 | |
| 156 | 186 | Start the video hardware emulation. |
| r1527 | r1528 | |
| 159 | 189 | |
| 160 | 190 | VIDEO_START( phoenix ) |
| 161 | 191 | { |
| 162 | videoram_pg1 = auto_malloc(0x1000); | |
| 163 | videoram_pg2 = auto_malloc(0x1000); | |
| 192 | videoram_pg[0] = auto_malloc(0x1000); | |
| 193 | videoram_pg[1] = auto_malloc(0x1000); | |
| 164 | 194 | |
| 165 | memory_configure_bank(1, 0, 1, videoram_pg1, 0); | |
| 166 | memory_configure_bank(1, 1, 1, videoram_pg2, 0); | |
| 195 | memory_configure_bank(1, 0, 1, videoram_pg[0], 0); | |
| 196 | memory_configure_bank(1, 1, 1, videoram_pg[1], 0); | |
| 167 | 197 | memory_set_bank(1, 0); |
| 168 | 198 | |
| 169 | current_videoram_pg_index = -1; | |
| 170 | current_videoram_pg = videoram_pg1; /* otherwise, hiscore loading crashes */ | |
| 199 | videoram_pg_index = 0; | |
| 171 | 200 | |
| 172 | ||
| 173 | 201 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); |
| 174 | 202 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); |
| 175 | 203 | |
| 176 | 204 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 177 | tilemap_set_scrolldx(fg_tilemap,0,8); | |
| 178 | tilemap_set_scrolldy(fg_tilemap,0,48); | |
| 179 | tilemap_set_scrolldx(bg_tilemap,0,8); | |
| 180 | tilemap_set_scrolldy(bg_tilemap,0,48); | |
| 205 | ||
| 206 | tilemap_set_scrolldx(fg_tilemap, 0, (HTOTAL - HBSTART)); | |
| 207 | tilemap_set_scrolldx(bg_tilemap, 0, (HTOTAL - HBSTART)); | |
| 208 | tilemap_set_scrolldy(fg_tilemap, 0, (VTOTAL - VBSTART)); | |
| 209 | tilemap_set_scrolldy(bg_tilemap, 0, (VTOTAL - VBSTART)); | |
| 210 | ||
| 211 | state_save_register_global_pointer(videoram_pg[0], 0x1000); | |
| 212 | state_save_register_global_pointer(videoram_pg[1], 0x1000); | |
| 213 | state_save_register_global(videoram_pg_index); | |
| 214 | state_save_register_global(palette_bank); | |
| 215 | state_save_register_global(cocktail_mode); | |
| 181 | 216 | } |
| 182 | 217 | |
| 218 | VIDEO_START( pleiads ) | |
| 219 | { | |
| 220 | videoram_pg[0] = auto_malloc(0x1000); | |
| 221 | videoram_pg[1] = auto_malloc(0x1000); | |
| 183 | 222 | |
| 223 | memory_configure_bank(1, 0, 1, videoram_pg[0], 0); | |
| 224 | memory_configure_bank(1, 1, 1, videoram_pg[1], 0); | |
| 225 | memory_set_bank(1, 0); | |
| 226 | ||
| 227 | videoram_pg_index = 0; | |
| 228 | ||
| 229 | fg_tilemap = tilemap_create(pleiads_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 230 | bg_tilemap = tilemap_create(pleiads_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 231 | ||
| 232 | tilemap_set_transparent_pen(fg_tilemap,0); | |
| 233 | ||
| 234 | tilemap_set_scrolldx(fg_tilemap, 0, (HTOTAL - HBSTART)); | |
| 235 | tilemap_set_scrolldx(bg_tilemap, 0, (HTOTAL - HBSTART)); | |
| 236 | tilemap_set_scrolldy(fg_tilemap, 0, (VTOTAL - VBSTART)); | |
| 237 | tilemap_set_scrolldy(bg_tilemap, 0, (VTOTAL - VBSTART)); | |
| 238 | } | |
| 239 | ||
| 184 | 240 | /*************************************************************************** |
| 185 | 241 | |
| 186 | 242 | Memory handlers |
| r1527 | r1528 | |
| 191 | 247 | { |
| 192 | 248 | UINT8 *rom = memory_region(REGION_CPU1); |
| 193 | 249 | |
| 194 | | |
| 250 | vid | |
| 195 | 251 | |
| 196 | 252 | if ((offset & 0x7ff) < 0x340) |
| 197 | 253 | { |
| r1527 | r1528 | |
| 208 | 264 | |
| 209 | 265 | WRITE8_HANDLER( phoenix_videoreg_w ) |
| 210 | 266 | { |
| 211 | if ( | |
| 267 | if ( | |
| 212 | 268 | { |
| 213 | 269 | /* set memory bank */ |
| 214 | current_videoram_pg_index = data & 1; | |
| 215 | memory_set_bank(1, current_videoram_pg_index); | |
| 216 | current_videoram_pg = current_videoram_pg_index ? videoram_pg2 : videoram_pg1; | |
| 270 | videoram_pg_index = data & 1; | |
| 271 | memory_set_bank(1, videoram_pg_index); | |
| 217 | 272 | |
| 218 | cocktail_mode = | |
| 273 | cocktail_mode = | |
| 219 | 274 | |
| 220 | 275 | tilemap_set_flip(ALL_TILEMAPS, cocktail_mode ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0); |
| 221 | 276 | tilemap_mark_all_tiles_dirty(ALL_TILEMAPS); |
| r1527 | r1528 | |
| 232 | 287 | |
| 233 | 288 | WRITE8_HANDLER( pleiads_videoreg_w ) |
| 234 | 289 | { |
| 235 | if ( | |
| 290 | if ( | |
| 236 | 291 | { |
| 237 | 292 | /* set memory bank */ |
| 238 | current_videoram_pg_index = data & 1; | |
| 239 | current_videoram_pg = current_videoram_pg_index ? videoram_pg2 : videoram_pg1; | |
| 293 | videoram_pg_index = data & 1; | |
| 294 | memory_set_bank(1, videoram_pg_index); | |
| 240 | 295 | |
| 241 | cocktail_mode = | |
| 296 | cocktail_mode = | |
| 242 | 297 | |
| 243 | 298 | tilemap_set_flip(ALL_TILEMAPS, cocktail_mode ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0); |
| 244 | 299 | tilemap_mark_all_tiles_dirty(ALL_TILEMAPS); |
| r1527 | r1528 | |
|---|---|---|
| 145 | 145 | double Ku = 2.029; |
| 146 | 146 | double Kv = 1.140; |
| 147 | 147 | |
| 148 | double brightness[3][4] = | |
| 148 | static const double brightness[3][4] = | |
| 149 | 149 | { |
| 150 | 150 | { 0.50, 0.75, 1.0, 1.0 }, |
| 151 | 151 | { 0.29, 0.45, 0.73, 0.9 }, |
| r1527 | r1528 | |
|---|---|---|
| 28 | 28 | |
| 29 | 29 | VIDEO_START( buggychl ) |
| 30 | 30 | { |
| 31 | dirtybuffer = auto_malloc(videoram_size); | |
| 32 | 31 | dirtychar = auto_malloc(256 * sizeof(*dirtychar)); |
| 33 | 32 | tmpbitmap1 = auto_bitmap_alloc(256,256,machine->screen[0].format); |
| 34 | 33 | tmpbitmap2 = auto_bitmap_alloc(256,256,machine->screen[0].format); |
| 35 | 34 | |
| 36 | memset(dirtybuffer,1,videoram_size); | |
| 37 | 35 | memset(dirtychar,0xff,256 * sizeof(*dirtychar)); |
| 38 | 36 | } |
| 39 | 37 | |
| r1527 | r1528 | |
| 114 | 112 | { |
| 115 | 113 | int code = videoram[0x400+offs]; |
| 116 | 114 | |
| 117 | if (dirtybuffer[0x400+offs] || dirtychar[code]) | |
| 118 | { | |
| 119 | int sx = offs % 32; | |
| 120 | int sy = offs / 32; | |
| 115 | int sx = offs % 32; | |
| 116 | int sy = offs / 32; | |
| 121 | 117 | |
| 122 | dirtybuffer[0x400+offs] = 0; | |
| 118 | if (flip_screen_x) sx = 31 - sx; | |
| 119 | if (flip_screen_y) sy = 31 - sy; | |
| 123 | 120 | |
| 124 | if (flip_screen_x) sx = 31 - sx; | |
| 125 | if (flip_screen_y) sy = 31 - sy; | |
| 126 | ||
| 127 | drawgfx(tmpbitmap1,machine->gfx[0], | |
| 128 | code, | |
| 129 | 2, | |
| 130 | flip_screen_x,flip_screen_y, | |
| 131 | 8*sx,8*sy, | |
| 132 | NULL,TRANSPARENCY_NONE,0); | |
| 133 | } | |
| 121 | drawgfx(tmpbitmap1,machine->gfx[0], | |
| 122 | code, | |
| 123 | 2, | |
| 124 | flip_screen_x,flip_screen_y, | |
| 125 | 8*sx,8*sy, | |
| 126 | NULL,TRANSPARENCY_NONE,0); | |
| 134 | 127 | } |
| 135 | 128 | |
| 136 | 129 | /* first copy to a temp bitmap doing column scroll */ |
| r1527 | r1528 | |
|---|---|---|
| 5 | 5 | *************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "exidy.h" | |
| 9 | 8 | |
| 10 | 9 | |
| 11 | 10 | UINT8 *exidy_videoram; |
| 12 | 11 | UINT8 *exidy_characterram; |
| 13 | 12 | UINT8 *exidy_color_latch; |
| 13 | UINT8 *exidy_sprite1_xpos; | |
| 14 | UINT8 *exidy_sprite1_ypos; | |
| 15 | UINT8 *exidy_sprite2_xpos; | |
| 16 | UINT8 *exidy_sprite2_ypos; | |
| 17 | UINT8 *exidy_spriteno; | |
| 18 | UINT8 *exidy_sprite_enable; | |
| 14 | 19 | |
| 15 | 20 | static UINT8 collision_mask; |
| 16 | 21 | static UINT8 collision_invert; |
| 17 | 22 | static int is_2bpp; |
| 23 | static UINT8 int_condition; | |
| 18 | 24 | |
| 19 | 25 | static mame_bitmap *background_bitmap; |
| 20 | 26 | static mame_bitmap *motion_object_1_vid; |
| 21 | 27 | static mame_bitmap *motion_object_2_vid; |
| 22 | 28 | static mame_bitmap *motion_object_2_clip; |
| 23 | 29 | |
| 24 | static UINT8 update_complete; | |
| 25 | 30 | |
| 26 | static UINT8 int_condition; | |
| 27 | 31 | |
| 28 | static UINT8 spriteno; | |
| 29 | static UINT8 sprite_enable; | |
| 30 | static UINT8 sprite1_xpos; | |
| 31 | static UINT8 sprite1_ypos; | |
| 32 | static UINT8 sprite2_xpos; | |
| 33 | static UINT8 sprite2_ypos; | |
| 34 | ||
| 35 | ||
| 36 | ||
| 37 | 32 | /************************************* |
| 38 | 33 | * |
| 39 | 34 | * Video configuration |
| r1527 | r1528 | |
| 113 | 108 | |
| 114 | 109 | /************************************* |
| 115 | 110 | * |
| 116 | * Palette | |
| 111 | * Palette handling | |
| 117 | 112 | * |
| 118 | 113 | *************************************/ |
| 119 | 114 | |
| r1527 | r1528 | |
| 146 | 141 | |
| 147 | 142 | /************************************* |
| 148 | 143 | * |
| 149 | * Sprite controls | |
| 150 | * | |
| 151 | *************************************/ | |
| 152 | ||
| 153 | WRITE8_HANDLER( exidy_sprite1_xpos_w ) | |
| 154 | { | |
| 155 | sprite1_xpos = data; | |
| 156 | } | |
| 157 | ||
| 158 | WRITE8_HANDLER( exidy_sprite1_ypos_w ) | |
| 159 | { | |
| 160 | sprite1_ypos = data; | |
| 161 | } | |
| 162 | ||
| 163 | WRITE8_HANDLER( exidy_sprite2_xpos_w ) | |
| 164 | { | |
| 165 | sprite2_xpos = data; | |
| 166 | } | |
| 167 | ||
| 168 | WRITE8_HANDLER( exidy_sprite2_ypos_w ) | |
| 169 | { | |
| 170 | sprite2_ypos = data; | |
| 171 | } | |
| 172 | ||
| 173 | WRITE8_HANDLER( exidy_spriteno_w ) | |
| 174 | { | |
| 175 | spriteno = data; | |
| 176 | } | |
| 177 | ||
| 178 | WRITE8_HANDLER( exidy_sprite_enable_w ) | |
| 179 | { | |
| 180 | sprite_enable = data; | |
| 181 | } | |
| 182 | ||
| 183 | ||
| 184 | ||
| 185 | /************************************* | |
| 186 | * | |
| 187 | 144 | * Background update |
| 188 | 145 | * |
| 189 | 146 | *************************************/ |
| 190 | 147 | |
| 191 | static void draw_background( | |
| 148 | static void draw_background(v | |
| 192 | 149 | { |
| 193 | 150 | offs_t offs; |
| 194 | 151 | |
| r1527 | r1528 | |
| 226 | 183 | for (i = 0; i < 8; i++) |
| 227 | 184 | { |
| 228 | 185 | if (data1 & 0x80) |
| 229 | *BITMAP_ADDR16(bitmap, y, x) = (data2 & 0x80) ? on_pen_2 : on_pen_1; | |
| 186 | *BITMAP_ADDR16(background_bitmap, y, x) = (data2 & 0x80) ? on_pen_2 : on_pen_1; | |
| 230 | 187 | else |
| 231 | *BITMAP_ADDR16(bitmap, y, x) = off_pen; | |
| 188 | *BITMAP_ADDR16(background_bitmap, y, x) = off_pen; | |
| 232 | 189 | |
| 233 | 190 | x = x + 1; |
| 234 | 191 | data1 = data1 << 1; |
| r1527 | r1528 | |
| 242 | 199 | |
| 243 | 200 | for (i = 0; i < 8; i++) |
| 244 | 201 | { |
| 245 | *BITMAP_ADDR16(bitmap, y, x) = (data & 0x80) ? on_pen_1 : off_pen; | |
| 202 | *BITMAP_ADDR16(background_bitmap, y, x) = (data & 0x80) ? on_pen_1 : off_pen; | |
| 246 | 203 | |
| 247 | 204 | x = x + 1; |
| 248 | 205 | data = data << 1; |
| r1527 | r1528 | |
| 256 | 213 | |
| 257 | 214 | |
| 258 | 215 | |
| 259 | static TIMER_CALLBACK( collision_irq_callback ) | |
| 216 | /************************************* | |
| 217 | * | |
| 218 | * Sprite hardware | |
| 219 | * | |
| 220 | *************************************/ | |
| 221 | ||
| 222 | INLINE int sprite_1_enabled(void) | |
| 260 | 223 | { |
| 261 | /* latch the collision bits */ | |
| 262 | latch_condition(param); | |
| 224 | /* if the collision_mask is 0x00, then we are on old hardware that always has */ | |
| 225 | /* sprite 1 enabled regardless */ | |
| 226 | return (!(*exidy_sprite_enable & 0x80) || (*exidy_sprite_enable & 0x10) || (collision_mask == 0x00)); | |
| 227 | } | |
| 263 | 228 | |
| 264 | /* set the IRQ line */ | |
| 265 | cpunum_set_input_line(0, 0, ASSERT_LINE); | |
| 229 | ||
| 230 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) | |
| 231 | { | |
| 232 | /* draw sprite 2 first */ | |
| 233 | int sprite_set_2 = ((*exidy_sprite_enable & 0x40) != 0); | |
| 234 | ||
| 235 | int sx = 236 - *exidy_sprite2_xpos - 4; | |
| 236 | int sy = 244 - *exidy_sprite2_ypos - 4; | |
| 237 | ||
| 238 | drawgfx(bitmap, machine->gfx[0], | |
| 239 | ((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 1, | |
| 240 | 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); | |
| 241 | ||
| 242 | /* draw sprite 1 next */ | |
| 243 | if (sprite_1_enabled()) | |
| 244 | { | |
| 245 | int sprite_set_1 = ((*exidy_sprite_enable & 0x20) != 0); | |
| 246 | ||
| 247 | sx = 236 - *exidy_sprite1_xpos - 4; | |
| 248 | sy = 244 - *exidy_sprite1_ypos - 4; | |
| 249 | ||
| 250 | if (sy < 0) sy = 0; | |
| 251 | ||
| 252 | drawgfx(bitmap, machine->gfx[0], | |
| 253 | (*exidy_spriteno & 0x0f) + 16 * sprite_set_1, 0, | |
| 254 | 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); | |
| 255 | } | |
| 256 | ||
| 266 | 257 | } |
| 267 | 258 | |
| 268 | 259 | |
| 269 | 260 | |
| 270 | 261 | /************************************* |
| 271 | 262 | * |
| 272 | * | |
| 263 | * Collision d | |
| 273 | 264 | * |
| 274 | 265 | *************************************/ |
| 275 | 266 | |
| r1527 | r1528 | |
| 285 | 276 | |
| 286 | 277 | ***************************************************************************/ |
| 287 | 278 | |
| 288 | I | |
| 279 | static TIM | |
| 289 | 280 | { |
| 290 | /* if the collision_mask is 0x00, then we are on old hardware that always has */ | |
| 291 | /* sprite 1 enabled regardless */ | |
| 292 | return (!(sprite_enable & 0x80) || (sprite_enable & 0x10) || (collision_mask == 0x00)); | |
| 281 | /* latch the collision bits */ | |
| 282 | latch_condition(param); | |
| 283 | ||
| 284 | /* set the IRQ line */ | |
| 285 | cpunum_set_input_line(0, 0, ASSERT_LINE); | |
| 293 | 286 | } |
| 294 | 287 | |
| 295 | VIDEO_EOF( exidy ) | |
| 288 | ||
| 289 | static void check_collision(running_machine *machine) | |
| 296 | 290 | { |
| 297 | UINT8 enable_set_1 = ((sprite_enable & 0x20) != 0); | |
| 298 | UINT8 enable_set_2 = ((sprite_enable & 0x40) != 0); | |
| 291 | UINT8 sprite_set_1 = ((*exidy_sprite_enable & 0x20) != 0); | |
| 292 | UINT8 sprite_set_2 = ((*exidy_sprite_enable & 0x40) != 0); | |
| 299 | 293 | static const rectangle clip = { 0, 15, 0, 15 }; |
| 300 | int bgmask = machine->gfx[0]->color_granularity - 1; | |
| 301 | 294 | int org_1_x = 0, org_1_y = 0; |
| 302 | 295 | int org_2_x = 0, org_2_y = 0; |
| 303 | 296 | int sx, sy; |
| r1527 | r1528 | |
| 307 | 300 | if (collision_mask == 0) |
| 308 | 301 | return; |
| 309 | 302 | |
| 310 | /* update the background if necessary */ | |
| 311 | if (!update_complete) | |
| 312 | draw_background(machine, background_bitmap, NULL); | |
| 313 | update_complete = 0; | |
| 314 | ||
| 315 | 303 | /* draw sprite 1 */ |
| 316 | 304 | fillbitmap(motion_object_1_vid, 0xff, &clip); |
| 317 | 305 | if (sprite_1_enabled()) |
| 318 | 306 | { |
| 319 | org_1_x = 236 - sprite1_xpos - 4; | |
| 320 | org_1_y = 244 - sprite1_ypos - 4; | |
| 307 | org_1_x = 236 - *exidy_sprite1_xpos - 4; | |
| 308 | org_1_y = 244 - *exidy_sprite1_ypos - 4; | |
| 321 | 309 | drawgfx(motion_object_1_vid, machine->gfx[0], |
| 322 | (spriteno & 0x0f) + 16 * enable_set_1, 0, | |
| 323 | 0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0); | |
| 310 | (*exidy_spriteno & 0x0f) + 16 * sprite_set_1, 0, | |
| 311 | 0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0); | |
| 324 | 312 | } |
| 325 | 313 | |
| 326 | 314 | /* draw sprite 2 */ |
| 327 | 315 | fillbitmap(motion_object_2_vid, 0xff, &clip); |
| 328 | org_2_x = 236 - sprite2_xpos - 4; | |
| 329 | org_2_y = 244 - sprite2_ypos - 4; | |
| 316 | org_2_x = 236 - *exidy_sprite2_xpos - 4; | |
| 317 | org_2_y = 244 - *exidy_sprite2_ypos - 4; | |
| 330 | 318 | drawgfx(motion_object_2_vid, machine->gfx[0], |
| 331 | ((spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 0, | |
| 332 | 0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0); | |
| 319 | ((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 0, | |
| 320 | 0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0); | |
| 333 | 321 | |
| 334 | ||
| 322 | | |
| 335 | 323 | fillbitmap(motion_object_2_clip, 0xff, &clip); |
| 336 | 324 | if (sprite_1_enabled()) |
| 337 | 325 | { |
| 338 | 326 | sx = org_2_x - org_1_x; |
| 339 | 327 | sy = org_2_y - org_1_y; |
| 340 | 328 | drawgfx(motion_object_2_clip, machine->gfx[0], |
| 341 | ((spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 0, | |
| 342 | 0, 0, sx, sy, &clip, TRANSPARENCY_PEN, 0); | |
| 329 | ((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 0, | |
| 330 | 0, 0, sx, sy, &clip, TRANSPARENCY_PEN, 0); | |
| 343 | 331 | } |
| 344 | 332 | |
| 345 | /* scan for collisions */ | |
| 346 | for (sy = 0; sy < 16; sy++) | |
| 347 | for (sx = 0; sx < 16; sx++) | |
| 348 | { | |
| 333 | /* scan for collisions */ | |
| 334 | for (sy = 0; sy < 16; sy++) | |
| 335 | for (sx = 0; sx < 16; sx++) | |
| 336 | { | |
| 349 | 337 | if (*BITMAP_ADDR16(motion_object_1_vid, sy, sx) != 0xff) |
| 350 | { | |
| 351 | UINT8 collision_mask = 0; | |
| 338 | { | |
| 339 | UINT8 current_collision_mask = 0; | |
| 352 | 340 | |
| 353 | /* check for background collision (M1CHAR) */ | |
| 354 | if (((*BITMAP_ADDR16(background_bitmap, org_1_y + sy, org_1_x + sx) - 4) & bgmask) != 0) | |
| 355 | collision_mask |= 0x04; | |
| 341 | /* check for background collision (M1CHAR) */ | |
| 342 | if (*BITMAP_ADDR16(background_bitmap, org_1_y + sy, org_1_x + sx) != 0) | |
| 343 | current_collision_mask |= 0x04; | |
| 356 | 344 | |
| 357 | ||
| 345 | | |
| 358 | 346 | if (*BITMAP_ADDR16(motion_object_2_clip, sy, sx) != 0xff) |
| 359 | collision_mask |= 0x10; | |
| 347 | current_collision_mask |= 0x10; | |
| 360 | 348 | |
| 361 | 349 | /* if we got one, trigger an interrupt */ |
| 362 | if ((collision_mask & collision_mask) && count++ < 128) | |
| 363 | timer_set(video_screen_get_time_until_pos(0, org_1_x + sx, org_1_y + sy), NULL, collision_mask, collision_irq_callback); | |
| 364 | } | |
| 365 | if (*BITMAP_ADDR16(motion_object_2_vid, sy, sx) != 0xff) | |
| 366 | { | |
| 367 | /* check for background collision (M2CHAR) */ | |
| 368 | if (((*BITMAP_ADDR16(background_bitmap, org_2_y + sy, org_2_x + sx) - 4) & bgmask) != 0) | |
| 369 | if ((collision_mask & 0x08) && count++ < 128) | |
| 350 | if ((current_collision_mask & collision_mask) && (count++ < 128)) | |
| 351 | timer_set(video_screen_get_time_until_pos(0, org_1_x + sx, org_1_y + sy), NULL, current_collision_mask, collision_irq_callback); | |
| 352 | } | |
| 353 | ||
| 354 | if (*BITMAP_ADDR16(motion_object_2_vid, sy, sx) != 0xff) | |
| 355 | { | |
| 356 | /* check for background collision (M2CHAR) */ | |
| 357 | if (*BITMAP_ADDR16(background_bitmap, org_2_y + sy, org_2_x + sx) != 0) | |
| 358 | if ((collision_mask & 0x08) && (count++ < 128)) | |
| 370 | 359 | timer_set(video_screen_get_time_until_pos(0, org_2_x + sx, org_2_y + sy), NULL, 0x08, collision_irq_callback); |
| 371 | ||
| 360 | | |
| 372 | 361 | } |
| 373 | 362 | } |
| 374 | 363 | |
| r1527 | r1528 | |
| 382 | 371 | |
| 383 | 372 | VIDEO_UPDATE( exidy ) |
| 384 | 373 | { |
| 385 | int sx, sy; | |
| 386 | UINT8 enable_set_2; | |
| 387 | ||
| 388 | 374 | /* refresh the colors from the palette (static or dynamic) */ |
| 389 | 375 | set_colors(machine); |
| 390 | 376 | |
| 391 | 377 | /* update the background and draw it */ |
| 392 | draw_background( | |
| 378 | draw_background( | |
| 393 | 379 | copybitmap(bitmap, background_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENCY_NONE, 0); |
| 394 | 380 | |
| 395 | /* draw sprite 2 first */ | |
| 396 | enable_set_2 = ((sprite_enable & 0x40) != 0); | |
| 381 | /* draw the sprites */ | |
| 382 | draw_sprites(machine, bitmap, NULL); | |
| 397 | 383 | |
| 398 | sx = 236 - sprite2_xpos - 4; | |
| 399 | sy = 244 - sprite2_ypos - 4; | |
| 384 | /* check for collision, this will set the appropriate bits in collision_mask */ | |
| 385 | check_collision(machine); | |
| 400 | 386 | |
| 401 | drawgfx(bitmap, machine->gfx[0], | |
| 402 | ((spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 1, | |
| 403 | 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); | |
| 404 | ||
| 405 | /* draw sprite 1 next */ | |
| 406 | if (sprite_1_enabled()) | |
| 407 | { | |
| 408 | UINT8 enable_set_1 = ((sprite_enable & 0x20) != 0); | |
| 409 | ||
| 410 | sx = 236 - sprite1_xpos - 4; | |
| 411 | sy = 244 - sprite1_ypos - 4; | |
| 412 | ||
| 413 | if (sy < 0) sy = 0; | |
| 414 | ||
| 415 | drawgfx(bitmap, machine->gfx[0], | |
| 416 | (spriteno & 0x0f) + 16 * enable_set_1, 0, | |
| 417 | 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); | |
| 418 | } | |
| 419 | ||
| 420 | /* indicate that we already updated the background */ | |
| 421 | update_complete = 1; | |
| 422 | 387 | return 0; |
| 423 | 388 | } |
| r1527 | r1528 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | static UINT8 xxmissio_xscroll,xxmissio_yscroll; |
| 16 | 16 | static UINT8 flipscreen; |
| 17 | static UINT8 xxmissio_bg_redraw; | |
| 18 | 17 | |
| 19 | 18 | |
| 20 | 19 | WRITE8_HANDLER( xxmissio_scroll_x_w ) |
| r1527 | r1528 | |
| 28 | 27 | |
| 29 | 28 | WRITE8_HANDLER( xxmissio_flipscreen_w ) |
| 30 | 29 | { |
| 31 | if ((data & 0x01) != flipscreen) | |
| 32 | { | |
| 33 | flipscreen = data & 0x01; | |
| 34 | xxmissio_bg_redraw = 1; | |
| 35 | } | |
| 30 | flipscreen = data & 0x01; | |
| 36 | 31 | } |
| 37 | 32 | |
| 38 | 33 | WRITE8_HANDLER( xxmissio_videoram_w ) |
| r1527 | r1528 | |
| 42 | 37 | offs |= x; |
| 43 | 38 | |
| 44 | 39 | videoram[offs] = data; |
| 45 | dirtybuffer[offs & 0x3ff] = 1; | |
| 46 | 40 | } |
| 47 | 41 | READ8_HANDLER( xxmissio_videoram_r ) |
| 48 | 42 | { |
| r1527 | r1528 | |
| 56 | 50 | WRITE8_HANDLER( xxmissio_paletteram_w ) |
| 57 | 51 | { |
| 58 | 52 | paletteram_BBGGRRII_w(offset,data); |
| 59 | ||
| 60 | if (offset >= 0x200) | |
| 61 | xxmissio_bg_redraw = 1; | |
| 62 | 53 | } |
| 63 | 54 | |
| 64 | 55 | /****************************************************************************/ |
| r1527 | r1528 | |
| 71 | 62 | |
| 72 | 63 | int size = videoram_size/2; |
| 73 | 64 | |
| 74 | if (xxmissio_bg_redraw==1) | |
| 75 | memset(dirtybuffer,1,size); | |
| 76 | ||
| 77 | 65 | /* draw BG layer */ |
| 78 | 66 | |
| 79 | 67 | for (y=0; y<32; y++) |
| r1527 | r1528 | |
| 85 | 73 | if (flipscreen!=0) |
| 86 | 74 | offs = (size-1)-offs; |
| 87 | 75 | |
| 88 | if (dirtybuffer[offs] != 0) | |
| 89 | { | |
| 90 | dirtybuffer[offs]=0; | |
| 76 | px = x*16; | |
| 77 | py = y*8; | |
| 91 | 78 | |
| 92 | px = x*16; | |
| 93 | py = y*8; | |
| 79 | chr = videoram[ offs ] ; | |
| 80 | col = videoram[ offs + size]; | |
| 81 | chr = chr + ((col & 0xc0) << 2 ); | |
| 82 | col = col & 0x0f; | |
| 94 | 83 | |
| 95 | chr = videoram[ offs ] ; | |
| 96 | col = videoram[ offs + size]; | |
| 97 | chr = chr + ((col & 0xc0) << 2 ); | |
| 98 | col = col & 0x0f; | |
| 99 | ||
| 100 | drawgfx(tmpbitmap,machine->gfx[2], | |
| 101 | chr, | |
| 102 | col, | |
| 103 | flipscreen,flipscreen, | |
| 104 | px,py, | |
| 105 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 106 | } | |
| 84 | drawgfx(tmpbitmap,machine->gfx[2], | |
| 85 | chr, | |
| 86 | col, | |
| 87 | flipscreen,flipscreen, | |
| 88 | px,py, | |
| 89 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 107 | 90 | } |
| 108 | 91 | } |
| 109 | 92 | |
| r1527 | r1528 | |
| 119 | 102 | } |
| 120 | 103 | |
| 121 | 104 | copyscrollbitmap(bitmap,tmpbitmap,1,&sx,1,&sy,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); |
| 122 | xxmissio_bg_redraw = 0; | |
| 123 | 105 | |
| 124 | 106 | /* draw sprites */ |
| 125 | 107 |
| r1527 | r1528 | |
|---|---|---|
| 138 | 138 | { |
| 139 | 139 | irem_state *state = machine->driver_data; |
| 140 | 140 | int offs; |
| 141 | int color[4]= { 3, 3, 5, 5}; | |
| 142 | int xpos[4] = { 4*8, 26*8, 7*8, 6*8} ; | |
| 141 | static const int color[4]= { 3, 3, 5, 5 }; | |
| 142 | static const int xpos[4] = { 4*8, 26*8, 7*8, 6*8}; | |
| 143 | 143 | int i; |
| 144 | 144 | |
| 145 | 145 | fillbitmap(bitmap,machine->pens[7],cliprect); |
| r1527 | r1528 | |
|---|---|---|
| 22 | 22 | size_t matmania_videoram3_size; |
| 23 | 23 | UINT8 *matmania_scroll; |
| 24 | 24 | static mame_bitmap *tmpbitmap2; |
| 25 | static UINT8 *dirtybuffer2; | |
| 26 | 25 | |
| 27 | 26 | UINT8 *matmania_pageselect; |
| 28 | 27 | |
| r1527 | r1528 | |
| 125 | 124 | ***************************************************************************/ |
| 126 | 125 | VIDEO_START( matmania ) |
| 127 | 126 | { |
| 128 | dirtybuffer = auto_malloc(videoram_size); | |
| 129 | memset(dirtybuffer,1,videoram_size); | |
| 130 | ||
| 131 | dirtybuffer2 = auto_malloc(matmania_videoram3_size); | |
| 132 | memset(dirtybuffer2,1,matmania_videoram3_size); | |
| 133 | ||
| 134 | 127 | /* Mat Mania has a virtual screen twice as large as the visible screen */ |
| 135 | 128 | tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,2* machine->screen[0].height,machine->screen[0].format); |
| 136 | 129 | |
| r1527 | r1528 | |
| 140 | 133 | |
| 141 | 134 | |
| 142 | 135 | |
| 143 | WRITE8_HANDLER( matmania_videoram3_w ) | |
| 144 | { | |
| 145 | if (matmania_videoram3[offset] != data) | |
| 146 | { | |
| 147 | dirtybuffer2[offset] = 1; | |
| 148 | ||
| 149 | matmania_videoram3[offset] = data; | |
| 150 | } | |
| 151 | } | |
| 152 | ||
| 153 | ||
| 154 | ||
| 155 | WRITE8_HANDLER( matmania_colorram3_w ) | |
| 156 | { | |
| 157 | if (matmania_colorram3[offset] != data) | |
| 158 | { | |
| 159 | dirtybuffer2[offset] = 1; | |
| 160 | ||
| 161 | matmania_colorram3[offset] = data; | |
| 162 | } | |
| 163 | } | |
| 164 | ||
| 165 | ||
| 166 | 136 | VIDEO_UPDATE( matmania ) |
| 167 | 137 | { |
| 168 | 138 | int offs; |
| r1527 | r1528 | |
| 171 | 141 | /* Update the tiles in the left tile ram bank */ |
| 172 | 142 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 173 | 143 | { |
| 174 | if (dirtybuffer[offs]) | |
| 175 | { | |
| 176 | int sx,sy; | |
| 144 | int sx,sy; | |
| 177 | 145 | |
| 178 | 146 | |
| 179 | dirtybuffer[offs] = 0; | |
| 147 | sx = 15 - offs / 32; | |
| 148 | sy = offs % 32; | |
| 180 | 149 | |
| 181 | sx = 15 - offs / 32; | |
| 182 | sy = offs % 32; | |
| 183 | ||
| 184 | drawgfx(tmpbitmap,machine->gfx[1], | |
| 185 | videoram[offs] + ((colorram[offs] & 0x08) << 5), | |
| 186 | (colorram[offs] & 0x30) >> 4, | |
| 187 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ | |
| 188 | 16*sx,16*sy, | |
| 189 | 0,TRANSPARENCY_NONE,0); | |
| 190 | } | |
| 150 | drawgfx(tmpbitmap,machine->gfx[1], | |
| 151 | videoram[offs] + ((colorram[offs] & 0x08) << 5), | |
| 152 | (colorram[offs] & 0x30) >> 4, | |
| 153 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ | |
| 154 | 16*sx,16*sy, | |
| 155 | 0,TRANSPARENCY_NONE,0); | |
| 191 | 156 | } |
| 192 | 157 | |
| 193 | 158 | /* Update the tiles in the right tile ram bank */ |
| 194 | 159 | for (offs = matmania_videoram3_size - 1;offs >= 0;offs--) |
| 195 | 160 | { |
| 196 | if (dirtybuffer2[offs]) | |
| 197 | { | |
| 198 | 161 | int sx,sy; |
| 199 | 162 | |
| 200 | 163 | |
| 201 | dirtybuffer2[offs] = 0; | |
| 164 | sx = 15 - offs / 32; | |
| 165 | sy = offs % 32; | |
| 202 | 166 | |
| 203 | sx = 15 - offs / 32; | |
| 204 | sy = offs % 32; | |
| 205 | ||
| 206 | drawgfx(tmpbitmap2,machine->gfx[1], | |
| 207 | matmania_videoram3[offs] + ((matmania_colorram3[offs] & 0x08) << 5), | |
| 208 | (matmania_colorram3[offs] & 0x30) >> 4, | |
| 209 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ | |
| 210 | 16*sx,16*sy, | |
| 211 | 0,TRANSPARENCY_NONE,0); | |
| 212 | } | |
| 167 | drawgfx(tmpbitmap2,machine->gfx[1], | |
| 168 | matmania_videoram3[offs] + ((matmania_colorram3[offs] & 0x08) << 5), | |
| 169 | (matmania_colorram3[offs] & 0x30) >> 4, | |
| 170 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ | |
| 171 | 16*sx,16*sy, | |
| 172 | 0,TRANSPARENCY_NONE,0); | |
| 213 | 173 | } |
| 214 | 174 | |
| 215 | 175 | |
| r1527 | r1528 | |
| 268 | 228 | /* Update the tiles in the left tile ram bank */ |
| 269 | 229 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 270 | 230 | { |
| 271 | if (dirtybuffer[offs]) | |
| 272 | { | |
| 273 | int sx,sy; | |
| 231 | int sx,sy; | |
| 274 | 232 | |
| 275 | 233 | |
| 276 | dirtybuffer[offs] = 0; | |
| 234 | sx = 15 - offs / 32; | |
| 235 | sy = offs % 32; | |
| 277 | 236 | |
| 278 | sx = 15 - offs / 32; | |
| 279 | sy = offs % 32; | |
| 280 | ||
| 281 | drawgfx(tmpbitmap,machine->gfx[1], | |
| 282 | videoram[offs] + ((colorram[offs] & 0x03) << 8), | |
| 283 | (colorram[offs] & 0x30) >> 4, | |
| 284 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ | |
| 285 | 16*sx,16*sy, | |
| 286 | 0,TRANSPARENCY_NONE,0); | |
| 287 | } | |
| 237 | drawgfx(tmpbitmap,machine->gfx[1], | |
| 238 | videoram[offs] + ((colorram[offs] & 0x03) << 8), | |
| 239 | (colorram[offs] & 0x30) >> 4, | |
| 240 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ | |
| 241 | 16*sx,16*sy, | |
| 242 | 0,TRANSPARENCY_NONE,0); | |
| 288 | 243 | } |
| 289 | 244 | |
| 290 | 245 | /* Update the tiles in the right tile ram bank */ |
| 291 | 246 | for (offs = matmania_videoram3_size - 1;offs >= 0;offs--) |
| 292 | 247 | { |
| 293 | if (dirtybuffer2[offs]) | |
| 294 | { | |
| 295 | int sx,sy; | |
| 248 | int sx,sy; | |
| 296 | 249 | |
| 297 | 250 | |
| 298 | dirtybuffer2[offs] = 0; | |
| 251 | sx = 15 - offs / 32; | |
| 252 | sy = offs % 32; | |
| 299 | 253 | |
| 300 | sx = 15 - offs / 32; | |
| 301 | sy = offs % 32; | |
| 302 | ||
| 303 | drawgfx(tmpbitmap2,machine->gfx[1], | |
| 304 | matmania_videoram3[offs] + ((matmania_colorram3[offs] & 0x03) << 8), | |
| 305 | (matmania_colorram3[offs] & 0x30) >> 4, | |
| 306 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ | |
| 307 | 16*sx,16*sy, | |
| 308 | 0,TRANSPARENCY_NONE,0); | |
| 309 | } | |
| 254 | drawgfx(tmpbitmap2,machine->gfx[1], | |
| 255 | matmania_videoram3[offs] + ((matmania_colorram3[offs] & 0x03) << 8), | |
| 256 | (matmania_colorram3[offs] & 0x30) >> 4, | |
| 257 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ | |
| 258 | 16*sx,16*sy, | |
| 259 | 0,TRANSPARENCY_NONE,0); | |
| 310 | 260 | } |
| 311 | 261 | |
| 312 | 262 |
| r1527 | r1528 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | WRITE8_HANDLER( pkunwar_flipscreen_w ) |
| 16 | 16 | { |
| 17 | if (flipscreen[0] != (data & 1)) | |
| 18 | { | |
| 19 | flipscreen[0] = data & 1; | |
| 20 | memset(dirtybuffer,1,videoram_size); | |
| 21 | } | |
| 22 | if (flipscreen[1] != (data & 2)) | |
| 23 | { | |
| 24 | flipscreen[1] = data & 2; | |
| 25 | memset(dirtybuffer,1,videoram_size); | |
| 26 | } | |
| 17 | flipscreen[0] = data & 1; | |
| 18 | flipscreen[1] = data & 2; | |
| 27 | 19 | } |
| 28 | 20 | |
| 29 | 21 | |
| r1527 | r1528 | |
| 33 | 25 | int offs; |
| 34 | 26 | |
| 35 | 27 | |
| 36 | /* for every character in the Video RAM, check if it has been modified */ | |
| 37 | /* since last time and update it accordingly. */ | |
| 28 | /* for every character in the Video RAM */ | |
| 38 | 29 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 39 | 30 | { |
| 40 | if (dirtybuffer[offs]) | |
| 41 | { | |
| 42 | int sx,sy; | |
| 31 | int sx,sy; | |
| 43 | 32 | |
| 44 | 33 | |
| 45 | dirtybuffer[offs] = 0; | |
| 34 | sx = offs % 32; | |
| 35 | sy = offs / 32; | |
| 36 | if (flipscreen[0]) sx = 31 - sx; | |
| 37 | if (flipscreen[1]) sy = 31 - sy; | |
| 46 | 38 | |
| 47 | sx = offs % 32; | |
| 48 | sy = offs / 32; | |
| 49 | if (flipscreen[0]) sx = 31 - sx; | |
| 50 | if (flipscreen[1]) sy = 31 - sy; | |
| 51 | ||
| 52 | drawgfx(tmpbitmap,machine->gfx[0], | |
| 53 | videoram[offs] + ((colorram[offs] & 0x07) << 8), | |
| 54 | (colorram[offs] & 0xf0) >> 4, | |
| 55 | flipscreen[0],flipscreen[1], | |
| 56 | 8*sx,8*sy, | |
| 57 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 58 | } | |
| 39 | drawgfx(bitmap,machine->gfx[0], | |
| 40 | videoram[offs] + ((colorram[offs] & 0x07) << 8), | |
| 41 | (colorram[offs] & 0xf0) >> 4, | |
| 42 | flipscreen[0],flipscreen[1], | |
| 43 | 8*sx,8*sy, | |
| 44 | cliprect,TRANSPARENCY_NONE,0); | |
| 59 | 45 | } |
| 60 | 46 | |
| 61 | /* copy the character mapped graphics */ | |
| 62 | copybitmap(bitmap,tmpbitmap,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 63 | 47 | |
| 64 | ||
| 65 | 48 | /* Draw the sprites. */ |
| 66 | 49 | for (offs = 0;offs < spriteram_size;offs += 32) |
| 67 | 50 | { |
| r1527 | r1528 | |
|---|---|---|
| 768 | 768 | 111 | 3.819 (2.2k) |
| 769 | 769 | Which were normalized to produce the following table: */ |
| 770 | 770 | |
| 771 | UINT8 color_table[8] = { 0, 7, 18, 31, 58, 88, 146, 255 }; | |
| 771 | static const UINT8 color_table[8] = { 0, 7, 18, 31, 58, 88, 146, 255 }; | |
| 772 | 772 | |
| 773 | 773 | int r, g, b; |
| 774 | 774 | UINT32 c, color_index; |
| r1527 | r1528 | |
|---|---|---|
| 811 | 811 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 812 | 812 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* IRQ generated by ??? */ |
| 813 | 813 | |
| 814 | MDRV_CPU_ADD(M68705,2000000 | |
| 814 | MDRV_CPU_ADD(M68705,2000000 | |
| 815 | 815 | MDRV_CPU_PROGRAM_MAP(m68705_readmem,m68705_writemem) |
| 816 | 816 | |
| 817 | 817 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 864 | 864 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) |
| 865 | 865 | |
| 866 | 866 | #ifdef USE_MCU |
| 867 | MDRV_CPU_ADD(M68705,2000000 | |
| 867 | MDRV_CPU_ADD(M68705,2000000 | |
| 868 | 868 | MDRV_CPU_PROGRAM_MAP(m68705_readmem,m68705_writemem) |
| 869 | 869 | #endif |
| 870 | 870 |
| r1527 | r1528 | |
|---|---|---|
| 257 | 257 | GFXDECODE_ENTRY( REGION_GFX4, 0, spritelayout, 0x300, 32 ) |
| 258 | 258 | GFXDECODE_END |
| 259 | 259 | |
| 260 | /* Parameters: YM3812 frequency, Oki frequency, Oki memory region */ | |
| 261 | ||
| 262 | SEIBU_SOUND_SYSTEM_YM3812_HARDWARE | |
| 263 | ||
| 264 | 260 | /* Interrupt Generator */ |
| 265 | 261 | |
| 266 | 262 | static INTERRUPT_GEN( dynduke_interrupt ) |
| r1527 | r1528 | |
|---|---|---|
| 55 | 55 | UINT8 *tunhunt_ram; |
| 56 | 56 | |
| 57 | 57 | extern WRITE8_HANDLER( tunhunt_videoram_w ); |
| 58 | extern WRITE8_HANDLER( tunhunt_mott_w ); | |
| 59 | 58 | |
| 60 | 59 | extern PALETTE_INIT( tunhunt ); |
| 61 | 60 | extern VIDEO_START( tunhunt ); |
| r1527 | r1528 | |
| 165 | 164 | AM_RANGE(0x1a00, 0x1a00) AM_WRITE(MWA8_RAM) /* SHEL1H */ |
| 166 | 165 | AM_RANGE(0x1c00, 0x1c00) AM_WRITE(MWA8_RAM) /* MOBJV */ |
| 167 | 166 | AM_RANGE(0x1e00, 0x1eff) AM_WRITE(tunhunt_videoram_w) AM_BASE(&videoram) /* ALPHA */ |
| 168 | AM_RANGE(0x2c00, 0x2fff) AM_WRITE( | |
| 167 | AM_RANGE(0x2c00, 0x2fff) AM_WRITE(MWA8 | |
| 169 | 168 | AM_RANGE(0x2000, 0x2000) AM_WRITE(MWA8_NOP) /* watchdog */ |
| 170 | 169 | AM_RANGE(0x2400, 0x2400) AM_WRITE(MWA8_NOP) /* INT ACK */ |
| 171 | 170 | AM_RANGE(0x2800, 0x2800) AM_WRITE(tunhunt_control_w) |
| r1527 | r1528 | |
|---|---|---|
| 313 | 313 | * |
| 314 | 314 | *************************************/ |
| 315 | 315 | |
| 316 | static UINT | |
| 316 | static CUSTOM_INPUT( | |
| 317 | 317 | { |
| 318 | 318 | UINT32 ret; |
| 319 | 319 | |
| r1527 | r1528 | |
| 329 | 329 | return ret; |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | static UINT | |
| 332 | static CUSTOM_INPUT( | |
| 333 | 333 | { |
| 334 | 334 | UINT32 ret; |
| 335 | 335 |
| r1527 | r1528 | |
|---|---|---|
| 830 | 830 | MDRV_IMPORT_FROM(bublbobl) |
| 831 | 831 | MDRV_CPU_REMOVE("mcu") |
| 832 | 832 | |
| 833 | MDRV_CPU_ADD_TAG("mcu", M68705, 4000000 | |
| 833 | MDRV_CPU_ADD_TAG("mcu", M68705, 4000000 | |
| 834 | 834 | MDRV_CPU_PROGRAM_MAP(bootlegmcu_map, 0) |
| 835 | 835 | MDRV_CPU_VBLANK_INT(bublbobl_m68705_interrupt, 2) // ??? should come from the same clock which latches the INT pin on the second Z80 |
| 836 | 836 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
|---|---|---|
| 149 | 149 | * |
| 150 | 150 | *************************************/ |
| 151 | 151 | |
| 152 | static UINT | |
| 152 | static CUSTOM_INPUT( | |
| 153 | 153 | { |
| 154 | 154 | return (williams_narc_talkback_r() >> 8) & 1; |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | |
| 158 | static UINT | |
| 158 | static CUSTOM_INPUT( | |
| 159 | 159 | { |
| 160 | 160 | return williams_narc_talkback_r() & 0xff; |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | |
| 164 | static UINT | |
| 164 | static CUSTOM_INPUT( | |
| 165 | 165 | { |
| 166 | 166 | return williams_adpcm_sound_irq_r() & 1; |
| 167 | 167 | } |
| r1527 | r1528 | |
| 257 | 257 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(narc_talkback_strobe_r, NULL) |
| 258 | 258 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) /* memory protect interlock */ |
| 259 | 259 | PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 260 | PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Language ) ) /* Is this a REAL dip or toggle? or software enable? */ | |
| 261 | PORT_DIPSETTING( 0xc000, DEF_STR( English ) ) | |
| 262 | PORT_DIPSETTING( 0x8000, DEF_STR( French ) ) | |
| 263 | PORT_DIPSETTING( 0x4000, DEF_STR( German ) ) | |
| 264 | // PORT_DIPSETTING( 0x0000, DEF_STR( Unknown ) ) | |
| 260 | PORT_BIT( 0xc000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 261 | /* | |
| 262 | Test mode indicates "Cut for French" and "Cut for German", hinting that these | |
| 263 | are jumpers or wires that can be modified on the PCB. However, there are no | |
| 264 | French or German strings in the ROMs, and this "feature" was clearly never | |
| 265 | actually implemented | |
| 266 | PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Language ) ) | |
| 267 | PORT_DIPSETTING( 0xc000, DEF_STR( English ) ) | |
| 268 | PORT_DIPSETTING( 0x8000, DEF_STR( French ) ) | |
| 269 | PORT_DIPSETTING( 0x4000, DEF_STR( German ) ) | |
| 270 | */ | |
| 265 | 271 | |
| 266 | 272 | PORT_START |
| 267 | 273 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(narc_talkback_data_r, NULL) |
| r1527 | r1528 | |
| 1003 | 1009 | static MACHINE_DRIVER_START( zunit ) |
| 1004 | 1010 | |
| 1005 | 1011 | /* basic machine hardware */ |
| 1006 | MDRV_CPU_ADD(TMS34010, FAST_MASTER_CLOCK | |
| 1012 | MDRV_CPU_ADD(TMS34010, FAST_MASTER_CLOCK | |
| 1007 | 1013 | MDRV_CPU_CONFIG(zunit_tms_config) |
| 1008 | 1014 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 1009 | 1015 | |
| r1527 | r1528 | |
| 1036 | 1042 | static MACHINE_DRIVER_START( yunit_core ) |
| 1037 | 1043 | |
| 1038 | 1044 | /* basic machine hardware */ |
| 1039 | MDRV_CPU_ADD_TAG("main", TMS34010, SLOW_MASTER_CLOCK | |
| 1045 | MDRV_CPU_ADD_TAG("main", TMS34010, SLOW_MASTER_CLOCK | |
| 1040 | 1046 | MDRV_CPU_CONFIG(yunit_tms_config) |
| 1041 | 1047 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 1042 | 1048 | |
| r1527 | r1528 | |
| 1071 | 1077 | |
| 1072 | 1078 | /* basic machine hardware */ |
| 1073 | 1079 | MDRV_IMPORT_FROM(yunit_core) |
| 1074 | MDRV_CPU_REPLACE("main", TMS34010, FAST_MASTER_CLOCK | |
| 1080 | MDRV_CPU_REPLACE("main", TMS34010, FAST_MASTER_CLOCK | |
| 1075 | 1081 | MDRV_IMPORT_FROM(williams_cvsd_sound) |
| 1076 | 1082 | |
| 1077 | 1083 | /* video hardware */ |
| r1527 | r1528 | |
| 1096 | 1102 | |
| 1097 | 1103 | /* basic machine hardware */ |
| 1098 | 1104 | MDRV_IMPORT_FROM(yunit_core) |
| 1099 | MDRV_CPU_REPLACE("main", TMS34010, FAST_MASTER_CLOCK | |
| 1105 | MDRV_CPU_REPLACE("main", TMS34010, FAST_MASTER_CLOCK | |
| 1100 | 1106 | MDRV_IMPORT_FROM(williams_adpcm_sound) |
| 1101 | 1107 | |
| 1102 | 1108 | /* video hardware */ |
| r1527 | r1528 | |
| 1109 | 1115 | |
| 1110 | 1116 | /* basic machine hardware */ |
| 1111 | 1117 | MDRV_IMPORT_FROM(yunit_core) |
| 1112 | MDRV_CPU_REPLACE("main", TMS34010, FASTER_MASTER_CLOCK | |
| 1118 | MDRV_CPU_REPLACE("main", TMS34010, FASTER_MASTER_CLOCK | |
| 1113 | 1119 | MDRV_IMPORT_FROM(williams_adpcm_sound) |
| 1114 | 1120 | |
| 1115 | 1121 | /* video hardware */ |
| r1527 | r1528 | |
|---|---|---|
| 526 | 526 | static void tmpz84c011_init(running_machine *machine) |
| 527 | 527 | { |
| 528 | 528 | // initialize the CTC |
| 529 | ctc_intf_1.baseclock = machine->drv->cpu[0].clock; | |
| 530 | ctc_intf_2.baseclock = machine->drv->cpu[1].clock; | |
| 529 | ctc_intf_1.baseclock = cpunum_get_clock(0); | |
| 530 | ctc_intf_2.baseclock = cpunum_get_clock(1); | |
| 531 | 531 | z80ctc_init(0, &ctc_intf_1); |
| 532 | 532 | z80ctc_init(1, &ctc_intf_2); |
| 533 | 533 | } |
| r1527 | r1528 | |
|---|---|---|
| 263 | 263 | GFXDECODE_ENTRY( REGION_GFX5, 0x000000, spritelayout, 0, 16 ) |
| 264 | 264 | GFXDECODE_END |
| 265 | 265 | |
| 266 | /* Sound Interfaces */ | |
| 267 | ||
| 268 | SEIBU_SOUND_SYSTEM_YM2203_HARDWARE | |
| 269 | ||
| 270 | SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE | |
| 271 | ||
| 272 | 266 | /* Interrupt Generators */ |
| 273 | 267 | |
| 274 | 268 | static INTERRUPT_GEN( deadang_interrupt ) |
| r1527 | r1528 | |
|---|---|---|
| 38 | 38 | static UINT8 prot_bit_index; |
| 39 | 39 | static UINT16 prot_save; |
| 40 | 40 | |
| 41 | static void (*protection_handler)( | |
| 41 | static void (*protection_handler)(running_machine *); | |
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | |
| r1527 | r1528 | |
| 152 | 152 | * |
| 153 | 153 | *************************************/ |
| 154 | 154 | |
| 155 | static void ultennis_protection( | |
| 155 | static void ultennis_protection(running_machine *machine) | |
| 156 | 156 | { |
| 157 | 157 | /* check the command byte */ |
| 158 | 158 | switch (prot_input[0]) |
| 159 | 159 | { |
| 160 | 160 | case 0x00: /* reset */ |
| 161 | 161 | prot_input_index = prot_output_index = 0; |
| 162 | prot_output[0] = mame_rand( | |
| 162 | prot_output[0] = mame_rand(machine); | |
| 163 | 163 | break; |
| 164 | 164 | |
| 165 | 165 | case 0x01: /* 01 aaaa bbbb cccc dddd (xxxx) */ |
| r1527 | r1528 | |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | |
| 245 | static void cheesech_protection( | |
| 245 | static void cheesech_protection(running_machine *machine) | |
| 246 | 246 | { |
| 247 | 247 | /* check the command byte */ |
| 248 | 248 | switch (prot_input[0]) |
| 249 | 249 | { |
| 250 | 250 | case 0x00: /* reset */ |
| 251 | 251 | prot_input_index = prot_output_index = 0; |
| 252 | prot_output[0] = mame_rand( | |
| 252 | prot_output[0] = mame_rand(machine); | |
| 253 | 253 | break; |
| 254 | 254 | |
| 255 | 255 | case 0x01: /* 01 aaaa bbbb (xxxx) */ |
| r1527 | r1528 | |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | |
| 305 | static void stonebal_protection( | |
| 305 | static void stonebal_protection(running_machine *machine) | |
| 306 | 306 | { |
| 307 | 307 | /* check the command byte */ |
| 308 | 308 | switch (prot_input[0]) |
| r1527 | r1528 | |
| 394 | 394 | prot_bit_index = 0; |
| 395 | 395 | |
| 396 | 396 | /* update the protection state */ |
| 397 | (*protection_handler)(); | |
| 397 | (*protection_handler)(Machine); | |
| 398 | 398 | } |
| 399 | 399 | } |
| 400 | 400 | |
| r1527 | r1528 | |
| 723 | 723 | MDRV_CPU_ADD_TAG("main", M68000, MASTER_CLOCK_25MHz/2) |
| 724 | 724 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 725 | 725 | |
| 726 | MDRV_CPU_ADD_TAG("tms", TMS34010, MASTER_CLOCK_40MHz | |
| 726 | MDRV_CPU_ADD_TAG("tms", TMS34010, MASTER_CLOCK_40MHz | |
| 727 | 727 | MDRV_CPU_CONFIG(tms_config) |
| 728 | 728 | MDRV_CPU_PROGRAM_MAP(tms_map,0) |
| 729 | 729 | |
| r1527 | r1528 | |
| 733 | 733 | |
| 734 | 734 | /* video hardware */ |
| 735 | 735 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 736 | MDRV_PALETTE_LENGTH(256) | |
| 736 | MDRV_VIDEO_START(artmagic) | |
| 737 | MDRV_VIDEO_UPDATE(tms340x0) | |
| 737 | 738 | |
| 738 | 739 | MDRV_SCREEN_ADD("main", 0) |
| 739 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 740 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32 | |
| 740 | 741 | MDRV_SCREEN_RAW_PARAMS(MASTER_CLOCK_40MHz/6, 428, 0, 320, 313, 0, 256) |
| 741 | 742 | |
| 742 | MDRV_VIDEO_START(artmagic) | |
| 743 | MDRV_VIDEO_UPDATE(tms340x0) | |
| 744 | ||
| 745 | 743 | /* sound hardware */ |
| 746 | 744 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 747 | 745 |
| r1527 | r1528 | |
|---|---|---|
| 656 | 656 | MDRV_CPU_PROGRAM_MAP(sound_program_map, 0) |
| 657 | 657 | MDRV_CPU_IO_MAP(sound_io_map, 0) |
| 658 | 658 | |
| 659 | MDRV_CPU_ADD(TMS32010, | |
| 659 | MDRV_CPU_ADD(TMS32010, | |
| 660 | 660 | MDRV_CPU_PROGRAM_MAP(DSP_program_map, 0) |
| 661 | 661 | /* Data Map is internal to the CPU */ |
| 662 | 662 | MDRV_CPU_IO_MAP(DSP_io_map, 0) |
| r1527 | r1528 | |
|---|---|---|
| 162 | 162 | |
| 163 | 163 | for (offs = 0;offs <0x4000; offs++) |
| 164 | 164 | { |
| 165 | // if (dirtybuffer[offs]) | |
| 166 | { | |
| 167 | int sx, sy, x, data1, data2, color, data; | |
| 165 | int sx, sy, x, data1, data2, color, data; | |
| 168 | 166 | |
| 169 | // dirtybuffer[offs] = 0; | |
| 167 | sx = offs >> 8; /*00..0x3f (64*4=256)*/ | |
| 168 | sy = offs & 0xff; /*00..0xff*/ | |
| 169 | // if (flipscreen[0]) sx = 31 - sx; | |
| 170 | // if (flipscreen[1]) sy = 31 - sy; | |
| 170 | 171 | |
| 171 | sx = offs >> 8; /*00..0x3f (64*4=256)*/ | |
| 172 | sy = offs & 0xff; /*00..0xff*/ | |
| 173 | // if (flipscreen[0]) sx = 31 - sx; | |
| 174 | // if (flipscreen[1]) sy = 31 - sy; | |
| 172 | data1 = videoram[offs]; /* color */ | |
| 173 | data2 = videoram[0x4000 + offs]; /* pixel data */ | |
| 175 | 174 | |
| 176 | data1 = videoram[offs]; /* color */ | |
| 177 | data2 = videoram[0x4000 + offs]; /* pixel data */ | |
| 175 | for (x=0; x<4; x++) /*4 pixels per byte (2 bitplanes in 2 nibbles: 1st=bits 7-4, 2nd=bits 3-0)*/ | |
| 176 | { | |
| 177 | color= ((data1>>x) & 1) | (((data1>>(4+x)) & 1)<<1); | |
| 178 | data = ((data2>>x) & 1) | (((data2>>(4+x)) & 1)<<1); | |
| 178 | 179 | |
| 179 | for (x=0; x<4; x++) /*4 pixels per byte (2 bitplanes in 2 nibbles: 1st=bits 7-4, 2nd=bits 3-0)*/ | |
| 180 | { | |
| 181 | color= ((data1>>x) & 1) | (((data1>>(4+x)) & 1)<<1); | |
| 182 | data = ((data2>>x) & 1) | (((data2>>(4+x)) & 1)<<1); | |
| 183 | ||
| 184 | *BITMAP_ADDR16(bitmap, 255-sy, 255-(sx*4 + x)) = color*4 + data; | |
| 185 | } | |
| 180 | *BITMAP_ADDR16(bitmap, 255-sy, 255-(sx*4 + x)) = color*4 + data; | |
| 186 | 181 | } |
| 187 | 182 | } |
| 188 | 183 | /* copy the character mapped graphics */ |
| r1527 | r1528 | |
| 301 | 296 | // AM_RANGE(0x7800, 0x78ff) AM_WRITE(cpu_sharedram_main_w) AM_BASE(&cpu_sharedram)/* sharedram main/sub */ |
| 302 | 297 | // AM_RANGE(0x7800, 0x7bff) AM_READ(cpu_sharedram_r)/* 2114 x 2 (0x400 x 4bit each) */ |
| 303 | 298 | |
| 304 | AM_RANGE(0x8000, 0xffff) AM_ | |
| 299 | AM_RANGE(0x8000, 0xffff) AM_ | |
| 305 | 300 | ADDRESS_MAP_END |
| 306 | 301 | |
| 307 | 302 | /* sub */ |
| r1527 | r1528 | |
|---|---|---|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | |
| 188 | static UINT | |
| 188 | static CUSTOM_INPUT( | |
| 189 | 189 | { |
| 190 | 190 | int scanline = video_screen_get_vpos(0); |
| 191 | 191 | return syncprom[scanline & 0xff] & 1; |
| r1527 | r1528 | |
|---|---|---|
| 476 | 476 | static MACHINE_DRIVER_START( exterm ) |
| 477 | 477 | |
| 478 | 478 | /* basic machine hardware */ |
| 479 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 479 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 480 | 480 | MDRV_CPU_CONFIG(master_config) |
| 481 | 481 | MDRV_CPU_PROGRAM_MAP(master_map,0) |
| 482 | 482 | |
| 483 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 483 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 484 | 484 | MDRV_CPU_CONFIG(slave_config) |
| 485 | 485 | MDRV_CPU_PROGRAM_MAP(slave_map,0) |
| 486 | 486 |
| r1527 | r1528 | |
|---|---|---|
| 78 | 78 | static void amerdart_scanline(running_machine *machine, int screen, mame_bitmap *bitmap, int scanline, const tms34010_display_params *params) |
| 79 | 79 | { |
| 80 | 80 | UINT16 *vram = &vram_base[(params->rowaddr << 8) & 0xff00]; |
| 81 | UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0); | |
| 81 | UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); | |
| 82 | rgb_t pens[16]; | |
| 82 | 83 | int coladdr = params->coladdr; |
| 83 | 84 | int x; |
| 84 | 85 | |
| r1527 | r1528 | |
| 87 | 88 | for (x = 0; x < 16; x++) |
| 88 | 89 | { |
| 89 | 90 | UINT16 pal = vram_base[x]; |
| 90 | p | |
| 91 | p | |
| 91 | 92 | } |
| 92 | 93 | |
| 93 | 94 | for (x = params->heblnk; x < params->hsblnk; x += 4) |
| 94 | 95 | { |
| 95 | 96 | UINT16 pixels = vram[coladdr++ & 0xff]; |
| 96 | dest[x + 0] = scanline * 16 + ((pixels >> 0) & 15); | |
| 97 | dest[x + 1] = scanline * 16 + ((pixels >> 4) & 15); | |
| 98 | dest[x + 2] = scanline * 16 + ((pixels >> 8) & 15); | |
| 99 | dest[x + 3] = scanline * 16 + ((pixels >> 12) & 15); | |
| 97 | dest[x + 0] = pens[(pixels >> 0) & 15]; | |
| 98 | dest[x + 1] = pens[(pixels >> 4) & 15]; | |
| 99 | dest[x + 2] = pens[(pixels >> 8) & 15]; | |
| 100 | dest[x + 3] = pens[(pixels >> 12) & 15]; | |
| 100 | 101 | } |
| 101 | 102 | } |
| 102 | 103 | |
| r1527 | r1528 | |
| 104 | 105 | static void coolpool_scanline(running_machine *machine, int screen, mame_bitmap *bitmap, int scanline, const tms34010_display_params *params) |
| 105 | 106 | { |
| 106 | 107 | UINT16 *vram = &vram_base[(params->rowaddr << 8) & 0x1ff00]; |
| 107 | UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0); | |
| 108 | UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); | |
| 109 | const rgb_t *pens = tlc34076_get_pens(); | |
| 108 | 110 | int coladdr = params->coladdr; |
| 109 | 111 | int x; |
| 110 | 112 | |
| 111 | 113 | for (x = params->heblnk; x < params->hsblnk; x += 2) |
| 112 | 114 | { |
| 113 | 115 | UINT16 pixels = vram[coladdr++ & 0xff]; |
| 114 | dest[x + 0] = pixels & 0xff; | |
| 115 | dest[x + 1] = pixels >> 8; | |
| 116 | dest[x + 0] = pens[pixels & 0xff]; | |
| 117 | dest[x + 1] = pens[pixels >> 8]; | |
| 116 | 118 | } |
| 117 | 119 | } |
| 118 | 120 | |
| r1527 | r1528 | |
| 682 | 684 | static MACHINE_DRIVER_START( amerdart ) |
| 683 | 685 | |
| 684 | 686 | /* basic machine hardware */ |
| 685 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 687 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 686 | 688 | MDRV_CPU_CONFIG(tms_config_amerdart) |
| 687 | 689 | MDRV_CPU_PROGRAM_MAP(amerdart_map,0) |
| 688 | 690 | |
| 689 | MDRV_CPU_ADD(TMS32010, 15000000/ | |
| 691 | MDRV_CPU_ADD(TMS32010, 15000000/2) | |
| 690 | 692 | MDRV_CPU_FLAGS(CPU_DISABLE) |
| 691 | 693 | MDRV_CPU_PROGRAM_MAP(amerdart_dsp_map,0) |
| 692 | 694 | |
| r1527 | r1528 | |
| 695 | 697 | |
| 696 | 698 | /* video hardware */ |
| 697 | 699 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 698 | MDRV_PA | |
| 700 | MDRV_VIDEO_UPDA | |
| 699 | 701 | |
| 700 | 702 | MDRV_SCREEN_ADD("main", 0) |
| 701 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 703 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32 | |
| 702 | 704 | MDRV_SCREEN_RAW_PARAMS(40000000/6, 212*2, 0, 161*2, 262, 0, 241) |
| 703 | 705 | |
| 704 | MDRV_VIDEO_UPDATE(tms340x0) | |
| 705 | ||
| 706 | 706 | /* sound hardware */ |
| 707 | 707 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 708 | 708 | |
| r1527 | r1528 | |
| 714 | 714 | static MACHINE_DRIVER_START( coolpool ) |
| 715 | 715 | |
| 716 | 716 | /* basic machine hardware */ |
| 717 | MDRV_CPU_ADD_TAG("main", TMS34010, 40000000 | |
| 717 | MDRV_CPU_ADD_TAG("main", TMS34010, 40000000 | |
| 718 | 718 | MDRV_CPU_CONFIG(tms_config_coolpool) |
| 719 | 719 | MDRV_CPU_PROGRAM_MAP(coolpool_map,0) |
| 720 | 720 | |
| r1527 | r1528 | |
| 727 | 727 | |
| 728 | 728 | /* video hardware */ |
| 729 | 729 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 730 | MDRV_PA | |
| 730 | MDRV_VIDEO_UPDA | |
| 731 | 731 | |
| 732 | 732 | MDRV_SCREEN_ADD("main", 0) |
| 733 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 733 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32 | |
| 734 | 734 | MDRV_SCREEN_RAW_PARAMS(40000000/6, 424, 0, 320, 262, 0, 240) |
| 735 | 735 | |
| 736 | MDRV_VIDEO_UPDATE(tms340x0) | |
| 737 | ||
| 738 | 736 | /* sound hardware */ |
| 739 | 737 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 740 | 738 |
| r1527 | r1528 | |
|---|---|---|
| 336 | 336 | 16*16 /* every sprite takes 32 consecutive bytes */ |
| 337 | 337 | }; |
| 338 | 338 | |
| 339 | const struct sp0256_interface sauro_sp256 = | |
| 339 | static const struct sp0256_interface sauro_sp256 = | |
| 340 | 340 | { |
| 341 | 341 | lrq_callback, |
| 342 | 342 | 0, |
| 343 | REGION_SOUND1}; | |
| 343 | REGION_SOUND1 | |
| 344 | }; | |
| 344 | 345 | |
| 345 | 346 | static GFXDECODE_START( sauro ) |
| 346 | 347 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 64 ) |
| r1527 | r1528 | |
| 471 | 472 | ROM_LOAD( "trckydoc.a1", 0x0c000, 0x4000, CRC(436c59ba) SHA1(2aa9c155c432a3c81420520c53bb944dcc613a94) ) |
| 472 | 473 | |
| 473 | 474 | ROM_REGION( 0x0c00, REGION_PROMS, 0 ) // colour proms |
| 474 | ROM_LOAD( "tdclr3.prm", 0x0000, 0x0400, CRC(671d0140) SHA1(7d5fcd9589c46590b0a240cac428f993201bec2a) ) | |
| 475 | ROM_LOAD( "tdclr2.prm", 0x0400, 0x0400, CRC(874f9050) SHA1(db40d68f5166657fce0eadcd82143112b0388894) ) | |
| 476 | ROM_LOAD( "tdclr1.prm", 0x0800, 0x0400, CRC(57f127b0) SHA1(3d2b18a7a31933579f06d92fa0cc3f0e1fe8b98a) ) | |
| 475 | ROM_LOAD( "tdclr3.prm", 0x0000, 0x0100, CRC(671d0140) SHA1(7d5fcd9589c46590b0a240cac428f993201bec2a) ) | |
| 476 | ROM_LOAD( "tdclr2.prm", 0x0400, 0x0100, CRC(874f9050) SHA1(db40d68f5166657fce0eadcd82143112b0388894) ) | |
| 477 | ROM_LOAD( "tdclr1.prm", 0x0800, 0x0100, CRC(57f127b0) SHA1(3d2b18a7a31933579f06d92fa0cc3f0e1fe8b98a) ) | |
| 477 | 478 | |
| 478 | 479 | ROM_REGION( 0x0200, REGION_USER1, 0 ) // unknown |
| 479 | 480 | ROM_LOAD( "tdprm.prm", 0x0000, 0x0200, CRC(5261bc11) SHA1(1cc7a9a7376e65f4587b75ef9382049458656372) ) |
| r1527 | r1528 | |
| 495 | 496 | ROM_LOAD( "trckydoc.a1", 0x0c000, 0x4000, CRC(436c59ba) SHA1(2aa9c155c432a3c81420520c53bb944dcc613a94) ) |
| 496 | 497 | |
| 497 | 498 | ROM_REGION( 0x0c00, REGION_PROMS, 0 ) // colour proms |
| 498 | ROM_LOAD( "tdclr3.prm", 0x0000, 0x0400, CRC(671d0140) SHA1(7d5fcd9589c46590b0a240cac428f993201bec2a) ) | |
| 499 | ROM_LOAD( "tdclr2.prm", 0x0400, 0x0400, CRC(874f9050) SHA1(db40d68f5166657fce0eadcd82143112b0388894) ) | |
| 500 | ROM_LOAD( "tdclr1.prm", 0x0800, 0x0400, CRC(57f127b0) SHA1(3d2b18a7a31933579f06d92fa0cc3f0e1fe8b98a) ) | |
| 499 | ROM_LOAD( "tdclr3.prm", 0x0000, 0x0100, CRC(671d0140) SHA1(7d5fcd9589c46590b0a240cac428f993201bec2a) ) | |
| 500 | ROM_LOAD( "tdclr2.prm", 0x0400, 0x0100, CRC(874f9050) SHA1(db40d68f5166657fce0eadcd82143112b0388894) ) | |
| 501 | ROM_LOAD( "tdclr1.prm", 0x0800, 0x0100, CRC(57f127b0) SHA1(3d2b18a7a31933579f06d92fa0cc3f0e1fe8b98a) ) | |
| 501 | 502 | |
| 502 | 503 | ROM_REGION( 0x0200, REGION_USER1, 0 ) // unknown |
| 503 | 504 | ROM_LOAD( "tdprm.prm", 0x0000, 0x0200, CRC(5261bc11) SHA1(1cc7a9a7376e65f4587b75ef9382049458656372) ) |
| r1527 | r1528 | |
|---|---|---|
| 603 | 603 | static MACHINE_DRIVER_START( tunit_core ) |
| 604 | 604 | |
| 605 | 605 | /* basic machine hardware */ |
| 606 | MDRV_CPU_ADD_TAG("main", TMS34010, CPU_CLOCK | |
| 606 | MDRV_CPU_ADD_TAG("main", TMS34010, CPU_CLOCK | |
| 607 | 607 | MDRV_CPU_CONFIG(tms_config) |
| 608 | 608 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 609 | 609 |
| r1527 | r1528 | |
|---|---|---|
| 2156 | 2156 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 2157 | 2157 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 2158 | 2158 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 2159 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 2160 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2161 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2159 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) | |
| 2160 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2161 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 2162 | 2162 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) |
| 2163 | 2163 | PORT_DIPSETTING( 0x00, "1" ) |
| 2164 | 2164 | PORT_DIPSETTING( 0x08, "2" ) |
| r1527 | r1528 | |
|---|---|---|
| 202 | 202 | static void tmpz84c011_init(running_machine *machine) |
| 203 | 203 | { |
| 204 | 204 | // initialize the CTC |
| 205 | ctc_intf.baseclock = | |
| 205 | ctc_intf.baseclock = | |
| 206 | 206 | z80ctc_init(0, &ctc_intf); |
| 207 | 207 | } |
| 208 | 208 | |
| r1527 | r1528 | |
| 768 | 768 | PORT_DIPNAME( 0x04, 0x04, "DIPSW 1-3" ) |
| 769 | 769 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 770 | 770 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 771 | PORT_DIPNAME( 0x08, 0x00, "DIPSW 1-4" ) | |
| 772 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 773 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 771 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) | |
| 772 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) | |
| 773 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) ) | |
| 774 | 774 | PORT_DIPNAME( 0x10, 0x00, "DIPSW 1-5" ) |
| 775 | 775 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 776 | 776 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r1527 | r1528 | |
|---|---|---|
| 386 | 386 | AM_RANGE(0x1e87, 0x1e87) AM_WRITE(jedi_video_off_w) |
| 387 | 387 | AM_RANGE(0x1f00, 0x1f00) AM_WRITE(sound_latch_w) |
| 388 | 388 | AM_RANGE(0x1f80, 0x1f80) AM_WRITE(rom_banksel_w) |
| 389 | AM_RANGE(0x2000, 0x27ff) AM_R | |
| 389 | AM_RANGE(0x2000, 0x27ff) AM_R | |
| 390 | 390 | AM_RANGE(0x2800, 0x2fff) AM_READWRITE(MRA8_RAM, jedi_paletteram_w) AM_BASE(&paletteram) |
| 391 | AM_RANGE(0x3000, 0x37bf) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 392 | AM_RANGE(0x37c0, 0x3bff) AM_READWRITE(MRA8_RAM, MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 391 | AM_RANGE(0x3000, 0x37bf) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 392 | AM_RANGE(0x37c0, 0x3bff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 393 | 393 | AM_RANGE(0x3c00, 0x3c01) AM_WRITE(jedi_vscroll_w) |
| 394 | 394 | AM_RANGE(0x3d00, 0x3d01) AM_WRITE(jedi_hscroll_w) |
| 395 | AM_RANGE(0x3e00, 0x3fff) AM_WRITE(jedi_PIXIRAM_w) | |
| 395 | AM_RANGE(0x3e00, 0x3fff) AM_WRITE(jedi_PIXIRAM_w) | |
| 396 | 396 | AM_RANGE(0x4000, 0x7fff) AM_ROMBANK(1) |
| 397 | 397 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 398 | 398 | ADDRESS_MAP_END |
| r1527 | r1528 | |
|---|---|---|
| 621 | 621 | |
| 622 | 622 | static MACHINE_DRIVER_START( coh1000c ) |
| 623 | 623 | /* basic machine hardware */ |
| 624 | MDRV_CPU_ADD( PSXCPU, | |
| 624 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 625 | 625 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 626 | 626 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 627 | 627 | |
| r1527 | r1528 | |
| 664 | 664 | |
| 665 | 665 | static MACHINE_DRIVER_START( coh1002c ) |
| 666 | 666 | /* basic machine hardware */ |
| 667 | MDRV_CPU_ADD( PSXCPU, | |
| 667 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 668 | 668 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 669 | 669 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 670 | 670 | |
| r1527 | r1528 | |
| 873 | 873 | |
| 874 | 874 | static MACHINE_DRIVER_START( coh3002c ) |
| 875 | 875 | /* basic machine hardware */ |
| 876 | MDRV_CPU_ADD( PSXCPU, | |
| 876 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 877 | 877 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 878 | 878 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 879 | 879 | |
| r1527 | r1528 | |
| 1314 | 1314 | |
| 1315 | 1315 | static MACHINE_DRIVER_START( coh1000ta ) |
| 1316 | 1316 | /* basic machine hardware */ |
| 1317 | MDRV_CPU_ADD( PSXCPU, | |
| 1317 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 1318 | 1318 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 1319 | 1319 | MDRV_CPU_VBLANK_INT( coh1000t_vblank, 1 ) |
| 1320 | 1320 | |
| r1527 | r1528 | |
| 1421 | 1421 | |
| 1422 | 1422 | static MACHINE_DRIVER_START( coh1000tb ) |
| 1423 | 1423 | /* basic machine hardware */ |
| 1424 | MDRV_CPU_ADD( PSXCPU, | |
| 1424 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 1425 | 1425 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 1426 | 1426 | MDRV_CPU_VBLANK_INT( coh1000t_vblank, 1 ) |
| 1427 | 1427 | |
| r1527 | r1528 | |
| 1611 | 1611 | |
| 1612 | 1612 | static MACHINE_DRIVER_START( coh3002t ) |
| 1613 | 1613 | /* basic machine hardware */ |
| 1614 | MDRV_CPU_ADD( PSXCPU, | |
| 1614 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 1615 | 1615 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 1616 | 1616 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 1617 | 1617 | |
| r1527 | r1528 | |
| 1825 | 1825 | |
| 1826 | 1826 | static MACHINE_DRIVER_START( coh1000w ) |
| 1827 | 1827 | /* basic machine hardware */ |
| 1828 | MDRV_CPU_ADD( PSXCPU, | |
| 1828 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 1829 | 1829 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 1830 | 1830 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 1831 | 1831 | |
| r1527 | r1528 | |
| 2067 | 2067 | |
| 2068 | 2068 | static MACHINE_DRIVER_START( coh1002e ) |
| 2069 | 2069 | /* basic machine hardware */ |
| 2070 | MDRV_CPU_ADD( PSXCPU, | |
| 2070 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 2071 | 2071 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 2072 | 2072 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 2073 | 2073 | |
| r1527 | r1528 | |
| 2412 | 2412 | |
| 2413 | 2413 | static MACHINE_DRIVER_START( coh1000a ) |
| 2414 | 2414 | /* basic machine hardware */ |
| 2415 | MDRV_CPU_ADD( PSXCPU, | |
| 2415 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 2416 | 2416 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 2417 | 2417 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 2418 | 2418 | |
| r1527 | r1528 | |
| 2579 | 2579 | |
| 2580 | 2580 | static MACHINE_DRIVER_START( coh1001l ) |
| 2581 | 2581 | /* basic machine hardware */ |
| 2582 | MDRV_CPU_ADD( PSXCPU, | |
| 2582 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 2583 | 2583 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 2584 | 2584 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 2585 | 2585 | |
| r1527 | r1528 | |
| 2668 | 2668 | |
| 2669 | 2669 | static MACHINE_DRIVER_START( coh1002v ) |
| 2670 | 2670 | /* basic machine hardware */ |
| 2671 | MDRV_CPU_ADD( PSXCPU, | |
| 2671 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 2672 | 2672 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 2673 | 2673 | MDRV_CPU_VBLANK_INT( coh1002v_vblank, 1 ) |
| 2674 | 2674 | |
| r1527 | r1528 | |
| 2937 | 2937 | |
| 2938 | 2938 | static MACHINE_DRIVER_START( coh1002m ) |
| 2939 | 2939 | /* basic machine hardware */ |
| 2940 | MDRV_CPU_ADD( PSXCPU, | |
| 2940 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 2941 | 2941 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 2942 | 2942 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 2943 | 2943 | |
| r1527 | r1528 | |
| 2969 | 2969 | |
| 2970 | 2970 | static MACHINE_DRIVER_START( coh1002msnd ) |
| 2971 | 2971 | /* basic machine hardware */ |
| 2972 | MDRV_CPU_ADD( PSXCPU, | |
| 2972 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 2973 | 2973 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 2974 | 2974 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 2975 | 2975 | |
| r1527 | r1528 | |
| 3011 | 3011 | |
| 3012 | 3012 | static MACHINE_DRIVER_START( coh1002ml ) |
| 3013 | 3013 | /* basic machine hardware */ |
| 3014 | MDRV_CPU_ADD( PSXCPU, | |
| 3014 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 3015 | 3015 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 3016 | 3016 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 3017 | 3017 |
| r1527 | r1528 | |
|---|---|---|
| 104 | 104 | AM_RANGE(0x2022, 0x2022) AM_READ(input_port_2_r ) // P1 |
| 105 | 105 | AM_RANGE(0x2023, 0x2023) AM_READ(input_port_3_r ) // P2 |
| 106 | 106 | AM_RANGE(0x2024, 0x2024) AM_READ(input_port_4_r ) // Coins |
| 107 | AM_RANGE(0x8000, 0xffff) AM_READ( | |
| 107 | AM_RANGE(0x8000, 0xffff) AM_READ(MRA8 | |
| 108 | 108 | ADDRESS_MAP_END |
| 109 | 109 | |
| 110 | 110 | static ADDRESS_MAP_START( paradise_writeport, ADDRESS_SPACE_IO, 8 ) |
| 111 | AM_RANGE(0x0000, 0x17ff) AM_WRITE(paradise_palette_w ) // Palette | |
| 111 | AM_RANGE(0x0000, 0x17ff) AM_WRITE(paradise_palette_w ) AM_BASE(&paletteram) // Palette | |
| 112 | 112 | AM_RANGE(0x1800, 0x1800) AM_WRITE(paradise_priority_w ) // Layers priority |
| 113 | 113 | AM_RANGE(0x2001, 0x2001) AM_WRITE(paradise_flipscreen_w ) // Flip Screen |
| 114 | 114 | AM_RANGE(0x2004, 0x2004) AM_WRITE(paradise_palbank_w ) // Layers palette bank |
| r1527 | r1528 | |
| 116 | 116 | AM_RANGE(0x2007, 0x2007) AM_WRITE(paradise_okibank_w ) // OKI 1 samples bank |
| 117 | 117 | AM_RANGE(0x2010, 0x2010) AM_WRITE(OKIM6295_data_0_w ) // OKI 0 |
| 118 | 118 | AM_RANGE(0x2030, 0x2030) AM_WRITE(OKIM6295_data_1_w ) // OKI 1 |
| 119 | AM_RANGE(0x8000, 0xffff) AM_WRITE(paradise_pixmap_w ) // Pixmap | |
| 119 | AM_RANGE(0x8000, 0xffff) AM_WRITE(paradise_pixmap_w ) AM_BASE(&videoram) // Pixmap | |
| 120 | 120 | ADDRESS_MAP_END |
| 121 | 121 | |
| 122 | 122 |
| r1527 | r1528 | |
|---|---|---|
| 387 | 387 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 388 | 388 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 389 | 389 | |
| 390 | MDRV_CPU_ADD_TAG("mcu", M68705, 4000000 | |
| 390 | MDRV_CPU_ADD_TAG("mcu", M68705, 4000000 | |
| 391 | 391 | MDRV_CPU_PROGRAM_MAP(m68705_readmem,m68705_writemem) |
| 392 | 392 | MDRV_CPU_VBLANK_INT(mexico86_m68705_interrupt,2) |
| 393 | 393 |
| r1527 | r1528 | |
|---|---|---|
| 56 | 56 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 57 | 57 | AM_RANGE(0x0000, 0x5fff) AM_READ(MRA8_ROM) |
| 58 | 58 | AM_RANGE(0x6000, 0x6bff) AM_READ(MRA8_RAM) |
| 59 | AM_RANGE(0x9000, 0x93ff) AM_READ( | |
| 59 | AM_RANGE(0x9000, 0x93ff) AM_READ(MRA8 | |
| 60 | 60 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) |
| 61 | 61 | AM_RANGE(0xa800, 0xa800) AM_READ(input_port_1_r) |
| 62 | 62 | AM_RANGE(0xb000, 0xb000) AM_READ(input_port_2_r) |
| r1527 | r1528 | |
| 68 | 68 | AM_RANGE(0x0000, 0x5fff) AM_WRITE(MWA8_ROM) |
| 69 | 69 | AM_RANGE(0x6000, 0x6bff) AM_WRITE(MWA8_RAM) |
| 70 | 70 | AM_RANGE(0x8800, 0x88ff) AM_WRITE(MWA8_NOP) /* unknown */ |
| 71 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 72 | AM_RANGE(0x9800, 0x9cff) AM_WRITE(mouser_spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 73 | AM_RANGE(0x9c00, 0x9fff) AM_WRITE(mouser_colorram_w) AM_BASE(&colorram) | |
| 71 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 72 | AM_RANGE(0x9800, 0x9cff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 73 | AM_RANGE(0x9c00, 0x9fff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram) | |
| 74 | 74 | AM_RANGE(0xa000, 0xa000) AM_WRITE(mouser_nmi_enable_w) /* bit 0 = NMI Enable */ |
| 75 | 75 | AM_RANGE(0xa001, 0xa001) AM_WRITE(mouser_flip_screen_x_w) |
| 76 | 76 | AM_RANGE(0xa002, 0xa002) AM_WRITE(mouser_flip_screen_y_w) |
| r1527 | r1528 | |
| 221 | 221 | MDRV_PALETTE_LENGTH(64) |
| 222 | 222 | |
| 223 | 223 | MDRV_PALETTE_INIT(mouser) |
| 224 | MDRV_VIDEO_START(generic) | |
| 225 | 224 | MDRV_VIDEO_UPDATE(mouser) |
| 226 | 225 | |
| 227 | 226 | /* sound hardware */ |
| r1527 | r1528 | |
|---|---|---|
| 446 | 446 | * |
| 447 | 447 | *************************************/ |
| 448 | 448 | |
| 449 | static UINT | |
| 449 | static CUSTOM_INPUT( | |
| 450 | 450 | { |
| 451 | 451 | static const UINT8 translate49[7] = { 0x8, 0xc, 0xe, 0xf, 0x3, 0x1, 0x0 }; |
| 452 | 452 | const char *namex = param; |
| r1527 | r1528 | |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | |
| 465 | static UINT | |
| 465 | static CUSTOM_INPUT( | |
| 466 | 466 | { |
| 467 | 467 | UINT32 bits = readinputportbytag(param); |
| 468 | 468 | UINT8 select = keypad_select; |
| r1527 | r1528 | |
|---|---|---|
| 332 | 332 | MDRV_CPU_ADD(Z80, 6000000) |
| 333 | 333 | MDRV_CPU_PROGRAM_MAP(readmem_sound,writemem_sound) |
| 334 | 334 | /* IRQs are triggered by the YM2203 */ |
| 335 | MDRV_CPU_ADD(M68705,4000000 | |
| 335 | MDRV_CPU_ADD(M68705,4000000 | |
| 336 | 336 | MDRV_CPU_PROGRAM_MAP(m68705_readmem,m68705_writemem) |
| 337 | 337 | |
| 338 | 338 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 263 | 263 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0x100, 0x10 ) /* Text */ |
| 264 | 264 | GFXDECODE_END |
| 265 | 265 | |
| 266 | SEIBU_SOUND_SYSTEM_YM3812_HARDWARE | |
| 267 | ||
| 268 | 266 | static INTERRUPT_GEN( goodejan_interrupt ) |
| 269 | 267 | { |
| 270 | 268 | if (cpu_getiloops()) |
| r1527 | r1528 | |
|---|---|---|
| 96 | 96 | AM_RANGE(0xa002, 0xa002) AM_READ(ninjakun_io_A002_r) |
| 97 | 97 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) /* tilemaps */ |
| 98 | 98 | AM_RANGE(0xc800, 0xcfff) AM_READ(ninjakid_bg_videoram_r) |
| 99 | AM_RANGE(0xd000, 0xd7ff) AM_READ(MRA8_RAM) /* spriteram */ | |
| 100 | 99 | AM_RANGE(0xd800, 0xd9ff) AM_READ(paletteram_r) |
| 101 | 100 | AM_RANGE(0xe000, 0xe7ff) AM_READ(MRA8_RAM) |
| 102 | 101 | ADDRESS_MAP_END |
| r1527 | r1528 | |
| 109 | 108 | AM_RANGE(0xa003, 0xa003) AM_WRITE(ninjakun_flipscreen_w) |
| 110 | 109 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(ninjakid_fg_videoram_w) AM_BASE(&videoram) |
| 111 | 110 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(ninjakid_bg_videoram_w) |
| 112 | AM_RANGE(0xd000, 0xd7ff) AM_ | |
| 111 | AM_RANGE(0xd000, 0xd7ff) AM_ | |
| 113 | 112 | AM_RANGE(0xd800, 0xd9ff) AM_WRITE(ninjakun_paletteram_w) AM_BASE(&paletteram) |
| 114 | 113 | AM_RANGE(0xe000, 0xe7ff) AM_WRITE(MWA8_RAM) AM_BASE(&shareram) |
| 115 | 114 | ADDRESS_MAP_END |
| r1527 | r1528 | |
| 121 | 120 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) |
| 122 | 121 | AM_RANGE(0xa001, 0xa001) AM_READ(input_port_1_r) |
| 123 | 122 | AM_RANGE(0xa002, 0xa002) AM_READ(ninjakun_io_A002_r) |
| 124 | AM_RANGE(0xc000, 0xc7ff) AM_READ( | |
| 123 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8 | |
| 125 | 124 | AM_RANGE(0xc800, 0xcfff) AM_READ(ninjakid_bg_videoram_r) |
| 126 | AM_RANGE(0xd000, 0xd7ff) AM_READ(spriteram_r) /* shareram */ | |
| 127 | 125 | AM_RANGE(0xd800, 0xd9ff) AM_READ(paletteram_r) |
| 128 | 126 | AM_RANGE(0xe000, 0xe7ff) AM_READ(shareram_r) |
| 129 | 127 | ADDRESS_MAP_END |
| r1527 | r1528 | |
| 135 | 133 | AM_RANGE(0xa003, 0xa003) AM_WRITE(ninjakun_flipscreen_w) |
| 136 | 134 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(ninjakid_fg_videoram_w) |
| 137 | 135 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(ninjakid_bg_videoram_w) |
| 138 | AM_RANGE(0xd000, 0xd7ff) AM_ | |
| 136 | AM_RANGE(0xd000, 0xd7ff) AM_ | |
| 139 | 137 | AM_RANGE(0xd800, 0xd9ff) AM_WRITE(ninjakun_paletteram_w) |
| 140 | 138 | AM_RANGE(0xe000, 0xe7ff) AM_WRITE(shareram_w) |
| 141 | 139 | ADDRESS_MAP_END |
| r1527 | r1528 | |
|---|---|---|
| 316 | 316 | * |
| 317 | 317 | *************************************/ |
| 318 | 318 | |
| 319 | #define MASTER_CLOCK 48660000 | |
| 320 | #define SOUND_CLOCK 4000000 | |
| 319 | #define MASTER_CLOCK XTAL_48_66MHz | |
| 320 | #define SOUND_CLOCK XTAL_4MHz | |
| 321 | 321 | |
| 322 | 322 | #define PIXEL_CLOCK (MASTER_CLOCK/8) |
| 323 | 323 | |
| r1527 | r1528 | |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | |
| 417 | static UINT | |
| 417 | static CUSTOM_INPUT( | |
| 418 | 418 | { |
| 419 | 419 | static const char *const dialname[2] = { "DIAL0", "DIAL1" }; |
| 420 | 420 | int num = (FPTR)param; |
| r1527 | r1528 | |
|---|---|---|
| 384 | 384 | static MACHINE_DRIVER_START( chinhero ) |
| 385 | 385 | |
| 386 | 386 | /* basic machine hardware */ |
| 387 | MDRV_CPU_ADD_TAG("main", Z80, 3 | |
| 387 | MDRV_CPU_ADD_TAG("main", Z80, XTAL_18_432MHz/6) /* verified on pcb */ | |
| 388 | 388 | MDRV_CPU_PROGRAM_MAP(chinhero_main_map,0) |
| 389 | 389 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 390 | 390 | |
| 391 | MDRV_CPU_ADD_TAG("bbx", Z80, 3 | |
| 391 | MDRV_CPU_ADD_TAG("bbx", Z80, XTAL_18_432MHz/6) /* verified on pcb */ | |
| 392 | 392 | MDRV_CPU_PROGRAM_MAP(chinhero_bbx_map,0) |
| 393 | 393 | MDRV_CPU_IO_MAP(chinhero_bbx_portmap,0) |
| 394 | 394 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 395 | 395 | |
| 396 | MDRV_CPU_ADD_TAG("audio", Z80, 3 | |
| 396 | MDRV_CPU_ADD_TAG("audio", Z80, XTAL_18_432MHz/6) /* verified on pcb */ | |
| 397 | 397 | MDRV_CPU_PROGRAM_MAP(chinhero_sound_map,0) |
| 398 | 398 | MDRV_CPU_IO_MAP(sound_portmap,0) |
| 399 | 399 | |
| r1527 | r1528 | |
| 421 | 421 | MDRV_SOUND_ADD(DAC, 0) |
| 422 | 422 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 423 | 423 | |
| 424 | MDRV_SOUND_ADD(AY8910, 2 | |
| 424 | MDRV_SOUND_ADD(AY8910, XTAL_18_432MHz/12) /* verified on pcb */ | |
| 425 | 425 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) |
| 426 | 426 | MACHINE_DRIVER_END |
| 427 | 427 |
| r1527 | r1528 | |
|---|---|---|
| 10 | 10 | * Astro Fire |
| 11 | 11 | * Astro Combat (2 sets) |
| 12 | 12 | * Super Star Battle |
| 13 | * Space Fighter Mark II (2 sets) | |
| 13 | 14 | * Tomahawk 777 late version with changed game play |
| 14 | 15 | * Tomahawk 777 early version |
| 15 | 16 | |
| 16 | 17 | Notes: |
| 17 | 18 | * Astro Battle added by HIGHWAYMAN with help from Reip. |
| 18 | 19 | 2 sets, 1 may be a bad set, or they may simply be different - don't know yet. |
| 19 | protection involves the | |
| 20 | protection involves the EPROM datalines being routed through an 8bit x 256byte PROM. | |
| 20 | 21 | it *may* have a more complex palette, it needs to be investigated when i get more time. |
| 21 | 22 | |
| 22 | 23 | * Astro Fighter set differences: |
| r1527 | r1528 | |
| 35 | 36 | Blue/Solid empty fuel bar. |
| 36 | 37 | 300 points for every seven bombs destroyed. |
| 37 | 38 | |
| 38 | * I know there must be at least one other | |
| 39 | * I know there must be at least one other ROM set for Astro Fighter | |
| 39 | 40 | I have played one that stoped between waves to show the next enemy |
| 40 | 41 | |
| 41 | 42 | Known issues/to-do's: |
| 42 | 43 | * Is Astro Fighter supposed to have a blue background??? |
| 43 | 44 | * Analog sound in all games |
| 44 | 45 | * Verify DIPs for clones |
| 46 | * Figure out unknown DIPs for Space Fighter Mark II (set 2) | |
| 45 | 47 | |
| 46 | 48 | ****************************************************************************/ |
| 47 | 49 | |
| r1527 | r1528 | |
| 50 | 52 | #include "astrof.h" |
| 51 | 53 | |
| 52 | 54 | |
| 53 | #define MASTER_CLOCK (10595 | |
| 55 | #define MASTER_CLOCK (XTAL_10_595MHz) | |
| 54 | 56 | #define MAIN_CPU_CLOCK (MASTER_CLOCK / 16) |
| 55 | 57 | #define PIXEL_CLOCK (MASTER_CLOCK / 2) |
| 56 | 58 | #define HTOTAL (0x150) |
| 57 | 59 | #define HBEND (0x000) |
| 58 | 60 | #define HBSTART (0x100) |
| 59 | #define ASTROF_VTOTAL (0x107) | |
| 60 | #define ASTROF_VBEND (0x008) | |
| 61 | #define VTOTAL (0x118) | |
| 62 | #define VBEND (0x000) | |
| 61 | 63 | #define VBSTART (0x100) |
| 62 | #define TOMAHAWK_VTOTAL (0x118) | |
| 63 | #define TOMAHAWK_VBEND (0x000) | |
| 64 | 64 | |
| 65 | 65 | |
| 66 | 66 | |
| r1527 | r1528 | |
| 118 | 118 | |
| 119 | 119 | /************************************* |
| 120 | 120 | * |
| 121 | * Machine setup | |
| 122 | * | |
| 123 | *************************************/ | |
| 124 | ||
| 125 | static MACHINE_START( tomahawk ) | |
| 126 | { | |
| 127 | create_irq_timer(); | |
| 128 | ||
| 129 | /* register for state saving */ | |
| 130 | state_save_register_global(red_on); | |
| 131 | state_save_register_global(flipscreen); | |
| 132 | state_save_register_global(screen_off); | |
| 133 | } | |
| 134 | ||
| 135 | ||
| 136 | static MACHINE_START( astrof ) | |
| 137 | { | |
| 138 | /* register for state saving */ | |
| 139 | state_save_register_global(astrof_palette_bank); | |
| 140 | ||
| 141 | machine_start_astrof_audio(machine); | |
| 142 | machine_start_tomahawk(machine); | |
| 143 | } | |
| 144 | ||
| 145 | ||
| 146 | static MACHINE_START( abattle ) | |
| 147 | { | |
| 148 | /* register for state saving */ | |
| 149 | state_save_register_global(abattle_count); | |
| 150 | ||
| 151 | machine_start_astrof(machine); | |
| 152 | } | |
| 153 | ||
| 154 | ||
| 155 | ||
| 156 | /************************************* | |
| 157 | * | |
| 158 | * Machine reset | |
| 159 | * | |
| 160 | *************************************/ | |
| 161 | ||
| 162 | static MACHINE_RESET( astrof ) | |
| 163 | { | |
| 164 | start_irq_timer(); | |
| 165 | } | |
| 166 | ||
| 167 | ||
| 168 | static MACHINE_RESET( abattle ) | |
| 169 | { | |
| 170 | machine_reset_astrof(machine); | |
| 171 | ||
| 172 | abattle_count = 0; | |
| 173 | } | |
| 174 | ||
| 175 | ||
| 176 | ||
| 177 | /************************************* | |
| 178 | * | |
| 179 | 121 | * Input handling |
| 180 | 122 | * |
| 181 | 123 | *************************************/ |
| r1527 | r1528 | |
| 198 | 140 | } |
| 199 | 141 | |
| 200 | 142 | |
| 201 | static UINT | |
| 143 | static CUSTOM_INPUT( | |
| 202 | 144 | { |
| 203 | 145 | return readinputportbytag("P1"); |
| 204 | 146 | } |
| 205 | 147 | |
| 206 | 148 | |
| 207 | static UINT | |
| 149 | static CUSTOM_INPUT( | |
| 208 | 150 | { |
| 209 | 151 | UINT32 ret; |
| 210 | 152 | |
| r1527 | r1528 | |
| 241 | 183 | |
| 242 | 184 | static rgb_t make_pen(UINT8 data) |
| 243 | 185 | { |
| 244 | UINT8 r1_bit = ((data >> 0) & 0x01) | red_on; | |
| 245 | UINT8 r2_bit = ((data >> 1) & 0x01) | red_on; | |
| 246 | UINT8 g1_bit = ( data >> 2) & 0x01; | |
| 247 | UINT8 g2_bit = ( data >> 3) & 0x01; | |
| 248 | UINT8 b1_bit = ( data >> 4) & 0x01; | |
| 249 | UINT8 b2_bit = ( data >> 5) & 0x01; | |
| 186 | UINT8 r1_bit = red_on ? 0x01 : (data >> 0) & 0x01; | |
| 187 | UINT8 r2_bit = red_on ? 0x01 : (data >> 1) & 0x01; | |
| 188 | UINT8 g1_bit = (data >> 2) & 0x01; | |
| 189 | UINT8 g2_bit = (data >> 3) & 0x01; | |
| 190 | UINT8 b1_bit = (data >> 4) & 0x01; | |
| 191 | UINT8 b2_bit = (data >> 5) & 0x01; | |
| 250 | 192 | |
| 251 | 193 | /* this is probably not quite right, but I don't have the |
| 252 | 194 | knowledge to figure out the actual weights - ZV */ |
| r1527 | r1528 | |
| 264 | 206 | |
| 265 | 207 | for (i = 0; i < ASTROF_NUM_PENS; i++) |
| 266 | 208 | { |
| 267 | UINT8 data = memory_region(REGION_PROMS)[(astrof_palette_bank | |
| 209 | UINT8 data = memory_region(REGION_PROMS)[(astrof_palette_bank ? | |
| 268 | 210 | |
| 269 | 211 | pens[i] = make_pen(data); |
| 270 | 212 | } |
| r1527 | r1528 | |
| 303 | 245 | flipscreen = ((data >> 0) & 0x01) & readinputportbytag("FLIP"); |
| 304 | 246 | |
| 305 | 247 | /* this ties to the CLR pin of the shift registers */ |
| 306 | screen_off = ( | |
| 248 | screen_off = ( | |
| 307 | 249 | |
| 308 | /* D2 - not connected in the schematics, but at one point Astro Fighter sets it to 1*/ | |
| 250 | /* D2 - not connected in the schematics, but at one point Astro Fighter sets it to 1 */ | |
| 309 | 251 | /* D3-D7 - not connected */ |
| 310 | 252 | |
| 311 | 253 | video_screen_update_partial(0, video_screen_get_vpos(0)); |
| 312 | 254 | } |
| 313 | 255 | |
| 314 | 256 | |
| 315 | static | |
| 257 | static void | |
| 316 | 258 | { |
| 317 | 259 | /* D0 - OUT0 - goes to edge conn. pin A10 - was perhaps meant to be a start lamp */ |
| 318 | 260 | /* D1 - OUT1 - goes to edge conn. pin A11 - was perhaps meant to be a start lamp */ |
| 319 | 261 | |
| 320 | astrof_palette_bank = (data >> 2) & 0x01; | |
| 262 | /* D2 - selects one of the two palette banks */ | |
| 263 | astrof_palette_bank = (data & 0x04) ? TRUE : FALSE; | |
| 321 | 264 | |
| 322 | red_on = (data >> 3) & 0x01; | |
| 265 | /* D3 - turns on the red color gun regardless of the value in the color PROM */ | |
| 266 | red_on = (data & 0x08) ? TRUE : FALSE; | |
| 323 | 267 | |
| 324 | 268 | /* D4-D7 - not connected */ |
| 269 | } | |
| 325 | 270 | |
| 271 | static WRITE8_HANDLER( astrof_video_control_2_w ) | |
| 272 | { | |
| 273 | astrof_set_video_control_2(data); | |
| 326 | 274 | video_screen_update_partial(0, video_screen_get_vpos(0)); |
| 327 | 275 | } |
| 328 | 276 | |
| 329 | 277 | |
| 330 | static | |
| 278 | static v | |
| 331 | 279 | { |
| 332 | 280 | /* D0 - OUT0 - goes to edge conn. pin A10 - was perhaps meant to be a start lamp */ |
| 333 | 281 | /* D1 - OUT1 - goes to edge conn. pin A11 - was perhaps meant to be a start lamp */ |
| 282 | ||
| 283 | /* D2 - selects one of the two palette banks */ | |
| 284 | astrof_palette_bank = (data & 0x04) ? TRUE : FALSE; | |
| 285 | ||
| 286 | /* D3-D7 - not connected */ | |
| 287 | } | |
| 288 | ||
| 289 | static WRITE8_HANDLER( spfghmk2_video_control_2_w ) | |
| 290 | { | |
| 291 | spfghmk2_set_video_control_2(data); | |
| 292 | video_screen_update_partial(0, video_screen_get_vpos(0)); | |
| 293 | } | |
| 294 | ||
| 295 | ||
| 296 | static void tomahawk_set_video_control_2(UINT8 data) | |
| 297 | { | |
| 298 | /* D0 - OUT0 - goes to edge conn. pin A10 - was perhaps meant to be a start lamp */ | |
| 299 | /* D1 - OUT1 - goes to edge conn. pin A11 - was perhaps meant to be a start lamp */ | |
| 334 | 300 | /* D2 - not connected */ |
| 335 | 301 | |
| 336 | red_on = (data >> 3) & 0x01; | |
| 302 | /* D3 - turns on the red color gun regardless of the value in the color PROM */ | |
| 303 | red_on = (data & 0x08) ? TRUE : FALSE; | |
| 304 | } | |
| 337 | 305 | |
| 306 | static WRITE8_HANDLER( tomahawk_video_control_2_w ) | |
| 307 | { | |
| 308 | tomahawk_set_video_control_2(data); | |
| 338 | 309 | video_screen_update_partial(0, video_screen_get_vpos(0)); |
| 339 | 310 | } |
| 340 | 311 | |
| r1527 | r1528 | |
| 447 | 418 | |
| 448 | 419 | /************************************* |
| 449 | 420 | * |
| 421 | * Machine setup | |
| 422 | * | |
| 423 | *************************************/ | |
| 424 | ||
| 425 | static MACHINE_START( astrof ) | |
| 426 | { | |
| 427 | create_irq_timer(); | |
| 428 | ||
| 429 | /* the 74175 outputs all HI's if not otherwise set */ | |
| 430 | astrof_set_video_control_2(0xff); | |
| 431 | ||
| 432 | /* register for state saving */ | |
| 433 | state_save_register_global(red_on); | |
| 434 | state_save_register_global(flipscreen); | |
| 435 | state_save_register_global(screen_off); | |
| 436 | state_save_register_global(astrof_palette_bank); | |
| 437 | ||
| 438 | machine_start_astrof_audio(machine); | |
| 439 | } | |
| 440 | ||
| 441 | ||
| 442 | static MACHINE_START( abattle ) | |
| 443 | { | |
| 444 | /* register for state saving */ | |
| 445 | state_save_register_global(abattle_count); | |
| 446 | ||
| 447 | machine_start_astrof(machine); | |
| 448 | } | |
| 449 | ||
| 450 | ||
| 451 | static MACHINE_START( spfghmk2 ) | |
| 452 | { | |
| 453 | create_irq_timer(); | |
| 454 | ||
| 455 | /* the 74175 outputs all HI's if not otherwise set */ | |
| 456 | spfghmk2_set_video_control_2(0xff); | |
| 457 | ||
| 458 | /* the red background circuit is disabled */ | |
| 459 | red_on = FALSE; | |
| 460 | ||
| 461 | /* register for state saving */ | |
| 462 | state_save_register_global(flipscreen); | |
| 463 | state_save_register_global(screen_off); | |
| 464 | state_save_register_global(astrof_palette_bank); | |
| 465 | } | |
| 466 | ||
| 467 | ||
| 468 | static MACHINE_START( tomahawk ) | |
| 469 | { | |
| 470 | create_irq_timer(); | |
| 471 | ||
| 472 | /* the 74175 outputs all HI's if not otherwise set */ | |
| 473 | tomahawk_set_video_control_2(0xff); | |
| 474 | ||
| 475 | /* register for state saving */ | |
| 476 | state_save_register_global(red_on); | |
| 477 | state_save_register_global(flipscreen); | |
| 478 | state_save_register_global(screen_off); | |
| 479 | } | |
| 480 | ||
| 481 | ||
| 482 | ||
| 483 | /************************************* | |
| 484 | * | |
| 485 | * Machine reset | |
| 486 | * | |
| 487 | *************************************/ | |
| 488 | ||
| 489 | static MACHINE_RESET( astrof ) | |
| 490 | { | |
| 491 | start_irq_timer(); | |
| 492 | } | |
| 493 | ||
| 494 | ||
| 495 | static MACHINE_RESET( abattle ) | |
| 496 | { | |
| 497 | machine_reset_astrof(machine); | |
| 498 | ||
| 499 | abattle_count = 0; | |
| 500 | } | |
| 501 | ||
| 502 | ||
| 503 | ||
| 504 | /************************************* | |
| 505 | * | |
| 450 | 506 | * Memory handlers |
| 451 | 507 | * |
| 452 | 508 | *************************************/ |
| r1527 | r1528 | |
| 462 | 518 | AM_RANGE(0x8005, 0x8005) AM_MIRROR(0x1ff8) AM_READWRITE(MRA8_NOP, astrof_video_control_2_w) |
| 463 | 519 | AM_RANGE(0x8006, 0x8006) AM_MIRROR(0x1ff8) AM_READWRITE(MRA8_NOP, astrof_audio_1_w) |
| 464 | 520 | AM_RANGE(0x8007, 0x8007) AM_MIRROR(0x1ff8) AM_READWRITE(MRA8_NOP, astrof_audio_2_w) |
| 465 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ff8) AM_READ_PORT("IN") AM_WRITE(MWA8_NOP) | |
| 466 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ff8) AM_READ_PORT("DSW") AM_WRITE(MWA8_NOP) | |
| 521 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ff8) AM_READWRITE(port_tag_to_handler("IN"), MWA8_NOP) | |
| 522 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ff8) AM_READWRITE(port_tag_to_handler("DSW"), MWA8_NOP) | |
| 467 | 523 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_ack_r, MWA8_NOP) |
| 468 | 524 | AM_RANGE(0xa003, 0xa007) AM_MIRROR(0x1ff8) AM_NOP |
| 469 | 525 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 470 | 526 | ADDRESS_MAP_END |
| 471 | 527 | |
| 472 | 528 | |
| 529 | static ADDRESS_MAP_START( spfghmk2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 530 | AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x1c00) AM_RAM | |
| 531 | AM_RANGE(0x2000, 0x3fff) AM_NOP | |
| 532 | AM_RANGE(0x4000, 0x5fff) AM_RAM AM_WRITE(astrof_videoram_w) AM_BASE(&astrof_videoram) AM_SIZE(&astrof_videoram_size) | |
| 533 | AM_RANGE(0x6000, 0x7fff) AM_NOP | |
| 534 | AM_RANGE(0x8000, 0x8002) AM_MIRROR(0x1ff8) AM_NOP | |
| 535 | AM_RANGE(0x8003, 0x8003) AM_MIRROR(0x1ff8) AM_READWRITE(MRA8_NOP, MWA8_RAM) AM_BASE(&astrof_color) | |
| 536 | AM_RANGE(0x8004, 0x8004) AM_MIRROR(0x1ff8) AM_READWRITE(MRA8_NOP, video_control_1_w) | |
| 537 | AM_RANGE(0x8005, 0x8005) AM_MIRROR(0x1ff8) AM_READWRITE(MRA8_NOP, spfghmk2_video_control_2_w) | |
| 538 | AM_RANGE(0x8006, 0x8006) AM_MIRROR(0x1ff8) AM_READWRITE(MRA8_NOP, spfghmk2_audio_w) | |
| 539 | AM_RANGE(0x8007, 0x8007) AM_MIRROR(0x1ff8) AM_NOP | |
| 540 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ff8) AM_READWRITE(port_tag_to_handler("IN"), MWA8_NOP) | |
| 541 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ff8) AM_READWRITE(port_tag_to_handler("DSW"), MWA8_NOP) | |
| 542 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_ack_r, MWA8_NOP) | |
| 543 | AM_RANGE(0xa003, 0xa007) AM_MIRROR(0x1ff8) AM_NOP | |
| 544 | AM_RANGE(0xc000, 0xffff) AM_ROM | |
| 545 | ADDRESS_MAP_END | |
| 546 | ||
| 547 | ||
| 473 | 548 | static ADDRESS_MAP_START( tomahawk_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 474 | 549 | AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x1c00) AM_RAM |
| 475 | 550 | AM_RANGE(0x2000, 0x3fff) AM_NOP |
| r1527 | r1528 | |
| 546 | 621 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 547 | 622 | |
| 548 | 623 | PORT_START_TAG("FLIP") |
| 549 | PORT_DIPNAME( 0x01, 0x00, "Flip Screen for Player 2" ) | |
| 624 | PORT_DIPNAME( 0x01, 0x00, "Flip Screen for Player 2" ) | |
| 550 | 625 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 551 | 626 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 552 | 627 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| r1527 | r1528 | |
| 556 | 631 | PORT_CONFSETTING( 0x00, DEF_STR( Upright ) ) |
| 557 | 632 | PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 558 | 633 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 634 | ||
| 635 | // PORT_START_TAG("WIREMOD") | |
| 636 | // PORT_CONFNAME( 0x01, 0x00, "Wire Mod for Background Color" ) | |
| 637 | // PORT_CONFSETTING( 0x00, "Blue Background" ) | |
| 638 | // PORT_CONFSETTING( 0x01, "Black Background" ) | |
| 639 | // PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 559 | 640 | INPUT_PORTS_END |
| 560 | 641 | |
| 561 | 642 | |
| r1527 | r1528 | |
| 621 | 702 | INPUT_PORTS_END |
| 622 | 703 | |
| 623 | 704 | |
| 705 | static INPUT_PORTS_START( spfghmk2 ) | |
| 706 | PORT_START_TAG("IN") | |
| 707 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) | |
| 708 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) | |
| 709 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p1_controls_r, 0) | |
| 710 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p2_controls_r, 0) | |
| 711 | ||
| 712 | PORT_START_TAG("DSW") | |
| 713 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) /* most likely not used */ | |
| 714 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 715 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 716 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) | |
| 717 | PORT_DIPSETTING( 0x00, "3" ) | |
| 718 | PORT_DIPSETTING( 0x02, "5" ) | |
| 719 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) | |
| 720 | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) | |
| 721 | /*PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) )*/ | |
| 722 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 723 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) | |
| 724 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) | |
| 725 | PORT_DIPSETTING( 0x00, "1500" ) | |
| 726 | PORT_DIPSETTING( 0x10, "2000" ) | |
| 727 | PORT_DIPSETTING( 0x20, "2500" ) | |
| 728 | PORT_DIPSETTING( 0x30, "3000" ) | |
| 729 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) /* most likely not used */ | |
| 730 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 731 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 732 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) | |
| 733 | ||
| 734 | PORT_START_TAG("P1") | |
| 735 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 736 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 737 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 738 | PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 739 | ||
| 740 | PORT_START_TAG("P2") | |
| 741 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 742 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 743 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 744 | PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 745 | ||
| 746 | PORT_START_TAG("COIN") | |
| 747 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) | |
| 748 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 749 | ||
| 750 | PORT_START_TAG("SERVICE") | |
| 751 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_IMPULSE(1) | |
| 752 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 753 | ||
| 754 | PORT_START_TAG("FLIP") | |
| 755 | PORT_DIPNAME( 0x01, 0x00, "Flip Screen for Player 2" ) | |
| 756 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 757 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 758 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 759 | ||
| 760 | PORT_START_TAG("CAB") | |
| 761 | PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 762 | PORT_CONFSETTING( 0x00, DEF_STR( Upright ) ) | |
| 763 | PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 764 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 765 | INPUT_PORTS_END | |
| 766 | ||
| 767 | ||
| 768 | static INPUT_PORTS_START( spfgmk22 ) | |
| 769 | PORT_START_TAG("IN") | |
| 770 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) | |
| 771 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) | |
| 772 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p1_controls_r, 0) | |
| 773 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p2_controls_r, 0) | |
| 774 | ||
| 775 | PORT_START_TAG("DSW") | |
| 776 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) /* used */ | |
| 777 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 778 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 779 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) | |
| 780 | PORT_DIPSETTING( 0x00, "3" ) | |
| 781 | PORT_DIPSETTING( 0x02, "5" ) | |
| 782 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) | |
| 783 | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) | |
| 784 | /*PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) )*/ | |
| 785 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 786 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) | |
| 787 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) | |
| 788 | PORT_DIPSETTING( 0x00, "2000" ) | |
| 789 | PORT_DIPSETTING( 0x10, "3000" ) | |
| 790 | PORT_DIPSETTING( 0x20, "4000" ) | |
| 791 | PORT_DIPSETTING( 0x30, "5000" ) | |
| 792 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) /* used */ | |
| 793 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 794 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 795 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) | |
| 796 | ||
| 797 | PORT_START_TAG("P1") | |
| 798 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 799 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 800 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 801 | PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 802 | ||
| 803 | PORT_START_TAG("P2") | |
| 804 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 805 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 806 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 807 | PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 808 | ||
| 809 | PORT_START_TAG("COIN") | |
| 810 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) | |
| 811 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 812 | ||
| 813 | PORT_START_TAG("SERVICE") | |
| 814 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_IMPULSE(1) | |
| 815 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 816 | ||
| 817 | PORT_START_TAG("FLIP") | |
| 818 | PORT_DIPNAME( 0x01, 0x00, "Flip Screen for Player 2" ) | |
| 819 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 820 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 821 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 822 | ||
| 823 | PORT_START_TAG("CAB") | |
| 824 | PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 825 | PORT_CONFSETTING( 0x00, DEF_STR( Upright ) ) | |
| 826 | PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 827 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 828 | INPUT_PORTS_END | |
| 829 | ||
| 830 | ||
| 624 | 831 | static INPUT_PORTS_START( tomahawk ) |
| 625 | 832 | PORT_START_TAG("IN") |
| 626 | 833 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| r1527 | r1528 | |
| 690 | 897 | |
| 691 | 898 | MDRV_SCREEN_ADD("main", 0) |
| 692 | 899 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 900 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) | |
| 693 | 901 | |
| 694 | 902 | MACHINE_DRIVER_END |
| 695 | 903 | |
| r1527 | r1528 | |
| 706 | 914 | /* video hardware */ |
| 707 | 915 | MDRV_VIDEO_UPDATE(astrof) |
| 708 | 916 | |
| 709 | MDRV_SCREEN_MODIFY("main") | |
| 710 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, ASTROF_VTOTAL, ASTROF_VBEND, VBSTART) | |
| 711 | ||
| 712 | 917 | /* audio hardware */ |
| 713 | 918 | MDRV_IMPORT_FROM(astrof_audio) |
| 714 | 919 | |
| r1527 | r1528 | |
| 726 | 931 | MACHINE_DRIVER_END |
| 727 | 932 | |
| 728 | 933 | |
| 934 | static MACHINE_DRIVER_START( spfghmk2 ) | |
| 935 | ||
| 936 | /* basic machine hardware */ | |
| 937 | MDRV_IMPORT_FROM(base) | |
| 938 | MDRV_CPU_MODIFY("main") | |
| 939 | MDRV_CPU_PROGRAM_MAP(spfghmk2_map,0) | |
| 940 | ||
| 941 | MDRV_MACHINE_START(spfghmk2) | |
| 942 | ||
| 943 | /* video hardware */ | |
| 944 | MDRV_VIDEO_UPDATE(astrof) | |
| 945 | ||
| 946 | /* audio hardware */ | |
| 947 | MDRV_IMPORT_FROM(spfghmk2_audio) | |
| 948 | ||
| 949 | MACHINE_DRIVER_END | |
| 950 | ||
| 951 | ||
| 729 | 952 | static MACHINE_DRIVER_START( tomahawk ) |
| 730 | 953 | |
| 731 | 954 | /* basic machine hardware */ |
| r1527 | r1528 | |
| 738 | 961 | /* video hardware */ |
| 739 | 962 | MDRV_VIDEO_UPDATE(tomahawk) |
| 740 | 963 | |
| 741 | MDRV_SCREEN_MODIFY("main") | |
| 742 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, TOMAHAWK_VTOTAL, TOMAHAWK_VBEND, VBSTART) | |
| 743 | ||
| 744 | 964 | /* audio hardware */ |
| 745 | 965 | MDRV_IMPORT_FROM(tomahawk_audio) |
| 746 | 966 | |
| r1527 | r1528 | |
| 938 | 1158 | ROM_END |
| 939 | 1159 | |
| 940 | 1160 | |
| 1161 | ROM_START( spfghmk2 ) | |
| 1162 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1163 | ROM_LOAD( "2708.5e", 0xe400, 0x0400, CRC(cd5f66de) SHA1(aea3d88eb1d59a9279361369991fcace90c4b61a) ) | |
| 1164 | ROM_LOAD( "2708.5d", 0xe800, 0x0400, CRC(385cca72) SHA1(8d38a127f7603f1573df24cb028e1f41098a61c1) ) | |
| 1165 | ROM_LOAD( "2708.5c", 0xec00, 0x0400, CRC(e6eaac70) SHA1(3af366f190ed0aed43cc584c6bd472da957c725a) ) | |
| 1166 | ROM_LOAD( "2708.4h", 0xf000, 0x0400, CRC(27945183) SHA1(7907d3d2b90d38c35fb6cf194408d2be23769c8c) ) | |
| 1167 | ROM_LOAD( "2708.4e", 0xf400, 0x0400, CRC(2115e25f) SHA1(a7c529f42d9bf70c7f81df949ba4666bde8da4c5) ) | |
| 1168 | ROM_LOAD( "2708.4d", 0xf800, 0x0400, CRC(b9655874) SHA1(22e53bc0b68acc8483bd18b15a020af19cf3e151) ) | |
| 1169 | ROM_LOAD( "2708.4c", 0xfc00, 0x0400, CRC(7d67f6b5) SHA1(aed42c2c48d50fb9e3c2860cdc9d448024a554ae) ) | |
| 1170 | ||
| 1171 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 1172 | ROM_LOAD( "709-5.1a", 0x0000, 0x0020, CRC(61329fd1) SHA1(15782d8757d4dda5a8b97815e94c90218f0e08dd) ) | |
| 1173 | ROM_END | |
| 1174 | ||
| 1175 | ||
| 1176 | ROM_START( spfgmk22 ) | |
| 1177 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1178 | ROM_LOAD( "2708.5e", 0xe400, 0x0400, CRC(27d7060d) SHA1(796c44a395e1c54769dc57050503b4b111bde7ef) ) | |
| 1179 | ROM_LOAD( "2708.5d", 0xe800, 0x0400, CRC(6ccb3b0a) SHA1(566104ca2e0fae741d4650e7159c9ddb48f59e8b) ) | |
| 1180 | ROM_LOAD( "2708.5c", 0xec00, 0x0400, CRC(68eb0ad5) SHA1(d303685ffd67898cec3e7c51b3831558a837e5a3) ) | |
| 1181 | ROM_LOAD( "2708.4h", 0xf000, 0x0400, CRC(ea8d1f2f) SHA1(35b01e76284080d5bd0270e4004a54386d9eb697) ) | |
| 1182 | ROM_LOAD( "2708.4e", 0xf400, 0x0400, CRC(6e7f00ae) SHA1(91ca17d5dc75be641c059fd84bed7cced2a2ef69) ) | |
| 1183 | ROM_LOAD( "2708.4d", 0xf800, 0x0400, CRC(29501dba) SHA1(978d7009eab8da40ccf0d026c9dabc0a3fa95d76) ) | |
| 1184 | ROM_LOAD( "2708.4c", 0xfc00, 0x0400, CRC(9bd589a6) SHA1(bce92fcab5220ff68526bc8c1c88ab0f317fe400) ) | |
| 1185 | ||
| 1186 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 1187 | ROM_LOAD( "709-5.1a", 0x0000, 0x0020, CRC(61329fd1) SHA1(15782d8757d4dda5a8b97815e94c90218f0e08dd) ) | |
| 1188 | ROM_END | |
| 1189 | ||
| 1190 | ||
| 941 | 1191 | ROM_START( tomahawk ) |
| 942 | 1192 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 943 | 1193 | ROM_LOAD( "thawk.l8", 0xdc00, 0x0400, CRC(b01dab4b) SHA1(d8b4266359a3b18d649f539fad8dce4d73cec412) ) |
| r1527 | r1528 | |
| 981 | 1231 | |
| 982 | 1232 | static DRIVER_INIT( abattle ) |
| 983 | 1233 | { |
| 984 | /* use the protection | |
| 1234 | /* use the protection PROM to decrypt the ROMs */ | |
| 985 | 1235 | UINT8 *rom = memory_region(REGION_CPU1); |
| 986 | 1236 | UINT8 *prom = memory_region(REGION_USER1); |
| 987 | 1237 | int i; |
| r1527 | r1528 | |
| 1039 | 1289 | GAME( 1979, acombat, astrof, abattle, abattle, afire, ROT90, "bootleg", "Astro Combat (newer, CB)", GAME_SUPPORTS_SAVE ) |
| 1040 | 1290 | GAME( 1979, acombato, astrof, abattle, abattle, afire, ROT90, "bootleg", "Astro Combat (older, PZ)", GAME_SUPPORTS_SAVE ) |
| 1041 | 1291 | GAME( 1979, sstarbtl, astrof, abattle, abattle, sstarbtl,ROT90, "bootleg", "Super Star Battle", GAME_SUPPORTS_SAVE ) |
| 1042 | GAME( 1980, tomahawk, 0, tomahawk, tomahawk, 0, ROT90, "Data East", "Tomahawk 777 (Revision 5)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1043 | GAME( 1980, tomahaw1, tomahawk, tomahawk, tomahawk, 0, ROT90, "Data East", "Tomahawk 777 (Revision 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1292 | GAME( 1980, spfghmk2, 0, spfghmk2, spfghmk2, 0, ROT90, "Data East", "Space Fighter Mark II (set 1)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1293 | GAME( 1980, spfgmk22, spfghmk2, spfghmk2, spfgmk22, 0, ROT90, "Data East", "Space Fighter Mark II (set 2)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1294 | GAME( 1980, tomahawk, 0, tomahawk, tomahawk, 0, ROT90, "Data East", "Tomahawk 777 (rev 5)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1295 | GAME( 1980, tomahaw1, tomahawk, tomahawk, tomahawk, 0, ROT90, "Data East", "Tomahawk 777 (rev 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| r1527 | r1528 | |
|---|---|---|
| 48 | 48 | static void xtheball_scanline_update(running_machine *machine, int screen, mame_bitmap *bitmap, int scanline, const tms34010_display_params *params) |
| 49 | 49 | { |
| 50 | 50 | UINT16 *srcbg = &vram_bg[(params->rowaddr << 8) & 0xff00]; |
| 51 | UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0); | |
| 51 | UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); | |
| 52 | const rgb_t *pens = tlc34076_get_pens(); | |
| 52 | 53 | int coladdr = params->coladdr; |
| 53 | 54 | int x; |
| 54 | 55 | |
| r1527 | r1528 | |
| 63 | 64 | UINT16 fgpix = srcfg[coladdr & 0xff]; |
| 64 | 65 | UINT16 bgpix = srcbg[coladdr & 0xff]; |
| 65 | 66 | |
| 66 | dest[x + 0] = ((fgpix & 0x00ff) != 0) ? (fgpix & 0xff) : (bgpix & 0xff); | |
| 67 | dest[x + 1] = ((fgpix & 0xff00) != 0) ? (fgpix >> 8) : (bgpix >> 8); | |
| 67 | dest[x + 0] = pens[((fgpix & 0x00ff) != 0) ? (fgpix & 0xff) : (bgpix & 0xff)]; | |
| 68 | dest[x + 1] = pens[((fgpix & 0xff00) != 0) ? (fgpix >> 8) : (bgpix >> 8)]; | |
| 68 | 69 | } |
| 69 | 70 | } |
| 70 | 71 | else |
| r1527 | r1528 | |
| 78 | 79 | UINT16 fgpix = srcfg[(coladdr >> 1) & 0xff] >> (8 * (coladdr & 1)); |
| 79 | 80 | UINT16 bgpix = srcbg[coladdr & 0xff]; |
| 80 | 81 | |
| 81 | dest[x + 0] = ((fgpix & 0x00ff) != 0) ? (fgpix & 0xff) : (bgpix & 0xff); | |
| 82 | dest[x + 1] = ((fgpix & 0x00ff) != 0) ? (fgpix & 0xff) : (bgpix >> 8); | |
| 82 | dest[x + 0] = pens[((fgpix & 0x00ff) != 0) ? (fgpix & 0xff) : (bgpix & 0xff)]; | |
| 83 | dest[x + 1] = pens[((fgpix & 0x00ff) != 0) ? (fgpix & 0xff) : (bgpix >> 8)]; | |
| 83 | 84 | } |
| 84 | 85 | } |
| 85 | 86 | |
| r1527 | r1528 | |
| 355 | 356 | |
| 356 | 357 | static MACHINE_DRIVER_START( xtheball ) |
| 357 | 358 | |
| 358 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 359 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 359 | 360 | MDRV_CPU_CONFIG(tms_config) |
| 360 | 361 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 361 | 362 | MDRV_CPU_PERIODIC_INT(irq1_line_pulse,15000) |
| r1527 | r1528 | |
| 365 | 366 | |
| 366 | 367 | /* video hardware */ |
| 367 | 368 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 368 | MDRV_PA | |
| 369 | MDRV_VIDEO_UPDA | |
| 369 | 370 | |
| 370 | 371 | MDRV_SCREEN_ADD("main", 0) |
| 371 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 372 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32 | |
| 372 | 373 | MDRV_SCREEN_SIZE(512,256) |
| 373 | 374 | MDRV_SCREEN_VISIBLE_AREA(0,511, 24,247) |
| 374 | 375 | MDRV_SCREEN_REFRESH_RATE(60) |
| 375 | 376 | |
| 376 | MDRV_VIDEO_UPDATE(tms340x0) | |
| 377 | ||
| 378 | 377 | /* sound hardware */ |
| 379 | 378 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 380 | 379 |
| r1527 | r1528 | |
|---|---|---|
| 436 | 436 | MDRV_CPU_VBLANK_INT(a800xl_interrupt, TOTAL_LINES_60HZ) |
| 437 | 437 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 438 | 438 | |
| 439 | MDRV_CPU_ADD(M68705, 3579545 | |
| 439 | MDRV_CPU_ADD(M68705, 3579545 | |
| 440 | 440 | MDRV_CPU_PROGRAM_MAP(mcu_mem,0) |
| 441 | 441 | MDRV_CPU_PERIODIC_INT( supervisor_board_check_coin_input, 10 ) |
| 442 | 442 |
| r1527 | r1528 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Punch Out memory map (preliminary) |
| 4 | 4 | Arm Wrestling runs on about the same hardware, but the video board is different. |
| 5 | The most significant changes are that Punchout has a larger bottom tilemap, | |
| 6 | with scrolling, while Arm Wrestling has an additional FG tilemap displayed on | |
| 7 | the bottom screen. | |
| 5 | 8 | |
| 6 | TODO: | |
| 7 | - The money bag is misplaced in armwrest bonus rounds. | |
| 9 | - money bag placement might not be 100% correct in Arm Wrestingly, however, | |
| 10 | the more serious part of armwrest35b9yel (unplayable bonus round after rounds | |
| 11 | 5 and 9) is now fixed. | |
| 8 | 12 | |
| 9 | ||
| 10 | 13 | driver by Nicola Salmoria |
| 11 | 14 | |
| 12 | 15 | |
| r1527 | r1528 | |
| 101 | 104 | |
| 102 | 105 | #include "rendlay.h" |
| 103 | 106 | |
| 104 | ||
| 105 | extern UINT8 *punchout_videoram2; | |
| 106 | extern UINT8 *armwrest_videoram3; | |
| 107 | extern UINT8 *punchout_topTilemap_ram; | |
| 108 | extern UINT8 *punchout_botTilemap_ram; | |
| 109 | extern UINT8 *punchout_botTilemap_scroll_ram; | |
| 110 | extern UINT8 *armwrest_fgTilemap_ram; | |
| 107 | 111 | extern UINT8 *punchout_bigsprite1ram; |
| 108 | 112 | extern UINT8 *punchout_bigsprite2ram; |
| 109 | extern UINT8 *punchout_scroll; | |
| 110 | 113 | extern UINT8 *punchout_bigsprite1; |
| 111 | 114 | extern UINT8 *punchout_bigsprite2; |
| 112 | 115 | extern UINT8 *punchout_palettebank; |
| 113 | WRITE8_HANDLER( punchout_videoram_w ); | |
| 114 | WRITE8_HANDLER( punchout_videoram2_w ); | |
| 115 | WRITE8_HANDLER( armwrest_videoram3_w ); | |
| 116 | WRITE8_HANDLER( punchout_topTilemap_ram_w ); | |
| 117 | WRITE8_HANDLER( punchout_botTilemap_ram_w ); | |
| 118 | WRITE8_HANDLER( armwrest_fgTilemap_ram_w ); | |
| 116 | 119 | WRITE8_HANDLER( punchout_bigsprite1ram_w ); |
| 117 | 120 | WRITE8_HANDLER( punchout_bigsprite2ram_w ); |
| 118 | 121 | WRITE8_HANDLER( punchout_palettebank_w ); |
| r1527 | r1528 | |
| 396 | 399 | AM_RANGE(0xdff0, 0xdff7) AM_RAM AM_BASE(&punchout_bigsprite1) |
| 397 | 400 | AM_RANGE(0xdff8, 0xdffc) AM_RAM AM_BASE(&punchout_bigsprite2) |
| 398 | 401 | AM_RANGE(0xdffd, 0xdffd) AM_READWRITE(MRA8_RAM, punchout_palettebank_w) AM_BASE(&punchout_palettebank) |
| 399 | AM_RANGE(0xd800, 0xdfff) AM_READWRITE(MRA8_RAM, punchout_ | |
| 402 | AM_RANGE(0xd800, 0xdfff) AM_READWRITE(MRA8_RAM, punchout_topTilemap_ram_w) AM_BASE(&punchout_topTilemap_ram) | |
| 400 | 403 | AM_RANGE(0xe000, 0xe7ff) AM_READWRITE(MRA8_RAM, punchout_bigsprite1ram_w) AM_BASE(&punchout_bigsprite1ram) |
| 401 | 404 | AM_RANGE(0xe800, 0xefff) AM_READWRITE(MRA8_RAM, punchout_bigsprite2ram_w) AM_BASE(&punchout_bigsprite2ram) |
| 402 | AM_RANGE(0xf000, 0xf03f) AM_RAM AM_BASE(&punchout_scroll) | |
| 403 | AM_RANGE(0xf000, 0xffff) AM_READWRITE(MRA8_RAM, punchout_videoram2_w) AM_BASE(&punchout_videoram2) | |
| 405 | AM_RANGE(0xf000, 0xf03f) AM_RAM AM_BASE(&punchout_botTilemap_scroll_ram) | |
| 406 | AM_RANGE(0xf000, 0xffff) AM_READWRITE(MRA8_RAM, punchout_botTilemap_ram_w) AM_BASE(&punchout_botTilemap_ram) | |
| 404 | 407 | ADDRESS_MAP_END |
| 405 | 408 | |
| 406 | 409 | |
| r1527 | r1528 | |
| 411 | 414 | AM_RANGE(0xdff0, 0xdff7) AM_RAM AM_BASE(&punchout_bigsprite1) |
| 412 | 415 | AM_RANGE(0xdff8, 0xdffc) AM_RAM AM_BASE(&punchout_bigsprite2) |
| 413 | 416 | AM_RANGE(0xdffd, 0xdffd) AM_READWRITE(MRA8_RAM, punchout_palettebank_w) AM_BASE(&punchout_palettebank) |
| 414 | AM_RANGE(0xd800, 0xdfff) AM_READWRITE(MRA8_RAM, armwrest_ | |
| 417 | AM_RANGE(0xd800, 0xdfff) AM_READWRITE(MRA8_RAM, armwrest_fgTilemap_ram | |
| 415 | 418 | AM_RANGE(0xe000, 0xe7ff) AM_READWRITE(MRA8_RAM, punchout_bigsprite1ram_w) AM_BASE(&punchout_bigsprite1ram) |
| 416 | 419 | AM_RANGE(0xe800, 0xefff) AM_READWRITE(MRA8_RAM, punchout_bigsprite2ram_w) AM_BASE(&punchout_bigsprite2ram) |
| 417 | AM_RANGE(0xf000, 0xf03f) AM_RAM AM_BASE(&punchout_scroll) | |
| 418 | AM_RANGE(0xf000, 0xf7ff) AM_READWRITE(MRA8_RAM, punchout_videoram2_w) AM_BASE(&punchout_videoram2) | |
| 419 | AM_RANGE(0xf800, 0xffff) AM_READWRITE(MRA8_RAM, punchout_videoram_w) AM_BASE(&videoram) | |
| 420 | AM_RANGE(0xf000, 0xf7ff) AM_READWRITE(MRA8_RAM, punchout_botTilemap_ram_w) AM_BASE(&punchout_botTilemap_ram) | |
| 421 | AM_RANGE(0xf800, 0xffff) AM_READWRITE(MRA8_RAM, punchout_topTilemap_ram_w) AM_BASE(&punchout_topTilemap_ram) | |
| 420 | 422 | ADDRESS_MAP_END |
| 421 | 423 | |
| 422 | 424 | |
| r1527 | r1528 | |
| 427 | 429 | AM_RANGE(0x02, 0x02) AM_READ(input_port_2_r) |
| 428 | 430 | AM_RANGE(0x03, 0x03) AM_READ(punchout_input_3_r) |
| 429 | 431 | |
| 430 | /* protection ports */ | |
| 432 | /* protection ports - Super Punchout only (move to install handler?) */ | |
| 431 | 433 | AM_RANGE(0x07, 0x07) AM_READ(spunchout_prot_0_r) |
| 432 | 434 | AM_RANGE(0x17, 0x17) AM_READ(spunchout_prot_1_r) |
| 433 | 435 | AM_RANGE(0x27, 0x27) AM_READ(spunchout_prot_2_r) |
| r1527 | r1528 | |
|---|---|---|
| 122 | 122 | AM_RANGE(0x081b, 0x081b) AM_WRITE(MWA8_NOP) /* Loads the snd command into the snd latch */ |
| 123 | 123 | AM_RANGE(0x081c, 0x081c) AM_WRITE(finalizr_i8039_irq_w) /* custom sound chip */ |
| 124 | 124 | AM_RANGE(0x081d, 0x081d) AM_WRITE(soundlatch_w) /* custom sound chip */ |
| 125 | AM_RANGE(0x2000, 0x23ff) AM_WRITE(colorram_w) AM_BASE(&colorram) | |
| 126 | AM_RANGE(0x2400, 0x27ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 125 | AM_RANGE(0x2000, 0x23ff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram) | |
| 126 | AM_RANGE(0x2400, 0x27ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 127 | 127 | AM_RANGE(0x2800, 0x2bff) AM_WRITE(MWA8_RAM) AM_BASE(&finalizr_colorram2) |
| 128 | 128 | AM_RANGE(0x2c00, 0x2fff) AM_WRITE(MWA8_RAM) AM_BASE(&finalizr_videoram2) |
| 129 | 129 | AM_RANGE(0x3000, 0x31ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| r1527 | r1528 | |
| 408 | 408 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 409 | 409 | MDRV_CPU_VBLANK_INT(finalizr_interrupt,16) /* 1 IRQ + 8 NMI (generated by a custom IC) */ |
| 410 | 410 | |
| 411 | MDRV_CPU_ADD(I8039, | |
| 411 | MDRV_CPU_ADD(I8039, | |
| 412 | 412 | /* audio CPU */ /* DAC */ |
| 413 | 413 | MDRV_CPU_PROGRAM_MAP(i8039_readmem,i8039_writemem) |
| 414 | 414 | MDRV_CPU_IO_MAP(i8039_readport,i8039_writeport) |
| r1527 | r1528 | |
|---|---|---|
| 131 | 131 | #include "includes/cclimber.h" |
| 132 | 132 | |
| 133 | 133 | |
| 134 | #define MASTER_CLOCK XTAL_18_432MHz | |
| 135 | ||
| 136 | ||
| 137 | ||
| 134 | 138 | static WRITE8_HANDLER( cannonb_flip_screen_w ) |
| 135 | 139 | { |
| 136 | 140 | flip_screen_set(data); |
| r1527 | r1528 | |
| 175 | 179 | /* Note that River Patrol reads/writes to a000-a4f0. This is a bug in the code. |
| 176 | 180 | The instruction at 0x0593 should say LD DE,$8000 */ |
| 177 | 181 | |
| 178 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 179 | AM_RANGE(0x0000, 0x5fff) AM_READ(MRA8_ROM) | |
| 180 | AM_RANGE(0x6000, 0x6bff) AM_READ(MRA8_RAM) /* Crazy Kong only */ | |
| 181 | AM_RANGE(0x8000, 0x83ff) AM_READ(MRA8_RAM) | |
| 182 | AM_RANGE(0x8800, 0x8bff) AM_READ(MRA8_RAM) | |
| 183 | AM_RANGE(0x9000, 0x93ff) AM_READ(MRA8_RAM) /* video RAM */ | |
| 184 | AM_RANGE(0x9800, 0x9bff) AM_READ(MRA8_RAM) /* column scroll registers */ | |
| 185 | AM_RANGE(0x9c00, 0x9fff) AM_READ(MRA8_RAM) /* color RAM */ | |
| 186 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) /* IN0 */ | |
| 187 | AM_RANGE(0xa800, 0xa800) AM_READ(input_port_1_r) /* IN1 */ | |
| 188 | AM_RANGE(0xb000, 0xb000) AM_READ(input_port_2_r) /* DSW */ | |
| 189 | AM_RANGE(0xb800, 0xb800) AM_READ(input_port_3_r) /* IN2 */ | |
| 190 | ADDRESS_MAP_END | |
| 191 | ||
| 192 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 193 | AM_RANGE(0x0000, 0x5fff) AM_WRITE(MWA8_ROM) | |
| 194 | AM_RANGE(0x6000, 0x6bff) AM_WRITE(MWA8_RAM) /* Crazy Kong only */ | |
| 195 | AM_RANGE(0x8000, 0x83ff) AM_WRITE(MWA8_RAM) | |
| 196 | AM_RANGE(0x8800, 0x88ff) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size) | |
| 197 | AM_RANGE(0x8900, 0x8bff) AM_WRITE(MWA8_RAM) /* not used, but initialized */ | |
| 198 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 199 | AM_RANGE(0x9400, 0x97ff) AM_WRITE(videoram_w) /* mirror address, used by Crazy Climber to draw windows */ | |
| 182 | static ADDRESS_MAP_START( cclimber_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 183 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 184 | AM_RANGE(0x6000, 0x6bff) AM_RAM /* Crazy Kong only */ | |
| 185 | AM_RANGE(0x8000, 0x83ff) AM_RAM | |
| 186 | AM_RANGE(0x8800, 0x88ff) AM_READWRITE(MRA8_RAM, cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size) | |
| 187 | AM_RANGE(0x8900, 0x8bff) AM_RAM /* not used, but initialized */ | |
| 188 | AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 200 | 189 | /* 9800-9bff and 9c00-9fff share the same RAM, interleaved */ |
| 201 | 190 | /* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */ |
| 202 | AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_column_scroll) | |
| 203 | AM_RANGE(0x9880, 0x989f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 204 | AM_RANGE(0x98dc, 0x98df) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_bigspriteram) | |
| 205 | AM_RANGE(0x9800, 0x9bff) AM_WRITE(MWA8_RAM) /* not used, but initialized */ | |
| 206 | AM_RANGE(0x9c00, 0x9fff) AM_WRITE(cclimber_colorram_w) AM_BASE(&colorram) | |
| 207 | AM_RANGE(0xa000, 0xa000) AM_WRITE(interrupt_enable_w) | |
| 191 | AM_RANGE(0x9800, 0x981f) AM_RAM AM_BASE(&cclimber_column_scroll) | |
| 192 | AM_RANGE(0x9880, 0x989f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 193 | AM_RANGE(0x98dc, 0x98df) AM_RAM AM_BASE(&cclimber_bigspriteram) | |
| 194 | AM_RANGE(0x9800, 0x9bff) AM_RAM /* not used, but initialized */ | |
| 195 | AM_RANGE(0x9c00, 0x9fff) AM_READWRITE(MRA8_RAM, cclimber_colorram_w) AM_BASE(&colorram) | |
| 196 | AM_RANGE(0xa000, 0xa000) AM_READWRITE(input_port_0_r, interrupt_enable_w) /* IN0 */ | |
| 208 | 197 | AM_RANGE(0xa001, 0xa001) AM_WRITE(flip_screen_x_w) |
| 209 | 198 | AM_RANGE(0xa002, 0xa002) AM_WRITE(flip_screen_y_w) |
| 210 | 199 | AM_RANGE(0xa003, 0xa003) AM_WRITE(interrupt_enable_w) //used by Crazy Kong Bootleg with alt levels and speed up |
| 211 | 200 | AM_RANGE(0xa004, 0xa004) AM_WRITE(cclimber_sample_trigger_w) |
| 212 | AM_RANGE(0xa800, 0xa800) AM_WRITE(cclimber_sample_rate_w) | |
| 213 | AM_RANGE(0xb000, 0xb000) AM_WRITE(cclimber_sample_volume_w) | |
| 214 | ADDRESS_MAP_END | |
| 215 | ||
| 216 | static ADDRESS_MAP_START( cannonb_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 217 | AM_RANGE(0x0000, 0x5fff) AM_READ(MRA8_ROM) | |
| 218 | AM_RANGE(0x6000, 0x6bff) AM_READ(MRA8_RAM) /* Crazy Kong only, Cannon Ball also*/ | |
| 219 | AM_RANGE(0x8000, 0x83ff) AM_READ(MRA8_RAM) | |
| 220 | AM_RANGE(0x8800, 0x8800) AM_READ(MRA8_NOP) /* must not return what's written (game will reset after coin insert if it returns 0xff)*/ | |
| 221 | //AM_RANGE(0x8800, 0x8bff) AM_READ(MRA8_RAM) | |
| 222 | AM_RANGE(0x9000, 0x93ff) AM_READ(MRA8_RAM) /* video RAM */ | |
| 223 | AM_RANGE(0x9800, 0x981f) AM_READ(MRA8_RAM) /* column scroll registers */ | |
| 224 | AM_RANGE(0x9820, 0x9bff) AM_READ(MRA8_RAM) /* */ | |
| 225 | AM_RANGE(0x9c00, 0x9fff) AM_READ(MRA8_RAM) /* color RAM */ | |
| 226 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) /* IN0 */ | |
| 227 | AM_RANGE(0xa800, 0xa800) AM_READ(input_port_1_r) /* IN1 */ | |
| 228 | AM_RANGE(0xb000, 0xb000) AM_READ(input_port_2_r) /* DSW */ | |
| 201 | AM_RANGE(0xa800, 0xa800) AM_READWRITE(input_port_1_r, cclimber_sample_rate_w) /* IN1 */ | |
| 202 | AM_RANGE(0xb000, 0xb000) AM_READWRITE(input_port_2_r, cclimber_sample_volume_w) /* DSW */ | |
| 229 | 203 | AM_RANGE(0xb800, 0xb800) AM_READ(input_port_3_r) /* IN2 */ |
| 230 | 204 | ADDRESS_MAP_END |
| 231 | 205 | |
| 232 | static ADDRESS_MAP_START( cannonb_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 233 | 206 | |
| 234 | AM_RANGE(0x5045, 0x505f) AM_WRITE(MWA8_NOP) /* do not errorlog this */ | |
| 235 | AM_RANGE(0x0000, 0x5fff) AM_WRITE(MWA8_ROM) | |
| 236 | AM_RANGE(0x6000, 0x6bff) AM_WRITE(MWA8_RAM) /* Crazy Kong only, Cannon Ball also */ | |
| 237 | AM_RANGE(0x8000, 0x83ff) AM_WRITE(MWA8_RAM) | |
| 238 | AM_RANGE(0x8800, 0x88ff) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size) | |
| 207 | static ADDRESS_MAP_START( cannonb_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 208 | AM_RANGE(0x5045, 0x505f) AM_WRITENOP /* do not errorlog this */ | |
| 209 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 210 | AM_RANGE(0x6000, 0x6bff) AM_RAM /* Crazy Kong only, Cannon Ball also */ | |
| 211 | AM_RANGE(0x8000, 0x83ff) AM_RAM | |
| 212 | AM_RANGE(0x8800, 0x8800) AM_READNOP /* must not return what's written (game will reset after coin insert if it returns 0xff)*/ | |
| 213 | AM_RANGE(0x8800, 0x88ff) AM_READWRITE(MRA8_RAM, cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size) | |
| 239 | 214 | //AM_RANGE(0x8900, 0x8bff) AM_WRITE(MWA8_RAM) /* not used, but initialized */ |
| 240 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 241 | AM_RANGE(0x9400, 0x97ff) AM_WRITE(videoram_w) /* mirror address, used by Crazy Climber to draw windows */ | |
| 215 | AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 242 | 216 | /* 9800-9bff and 9c00-9fff share the same RAM, interleaved */ |
| 243 | 217 | /* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */ |
| 244 | AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_column_scroll) | |
| 245 | AM_RANGE(0x9880, 0x989f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 246 | AM_RANGE(0x98dc, 0x98df) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_bigspriteram) | |
| 247 | AM_RANGE(0x9800, 0x9bff) AM_WRITE(MWA8_RAM) /* not used, but initialized */ | |
| 248 | AM_RANGE(0x9c00, 0x9fff) AM_WRITE(cclimber_colorram_w) AM_BASE(&colorram) | |
| 249 | AM_RANGE(0xa000, 0xa000) AM_WRITE(interrupt_enable_w) | |
| 218 | AM_RANGE(0x9800, 0x981f) AM_RAM AM_BASE(&cclimber_column_scroll) | |
| 219 | AM_RANGE(0x9880, 0x989f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 220 | AM_RANGE(0x98dc, 0x98df) AM_RAM AM_BASE(&cclimber_bigspriteram) | |
| 221 | AM_RANGE(0x9800, 0x9bff) AM_RAM /* not used, but initialized */ | |
| 222 | AM_RANGE(0x9c00, 0x9fff) AM_READWRITE(MRA8_RAM, cclimber_colorram_w) AM_BASE(&colorram) | |
| 223 | AM_RANGE(0xa000, 0xa000) AM_READWRITE(input_port_0_r, interrupt_enable_w) | |
| 250 | 224 | AM_RANGE(0xa001, 0xa001) AM_WRITE(cannonb_flip_screen_w) |
| 251 | 225 | AM_RANGE(0xa004, 0xa004) AM_WRITE(cclimber_sample_trigger_w) |
| 252 | AM_RANGE(0xa800, 0xa800) AM_WRITE(cclimber_sample_rate_w) | |
| 253 | AM_RANGE(0xb000, 0xb000) AM_WRITE(cclimber_sample_volume_w) | |
| 226 | AM_RANGE(0xa800, 0xa800) AM_READWRITE(input_port_1_r, cclimber_sample_rate_w) | |
| 227 | AM_RANGE(0xb000, 0xb000) AM_READWRITE(input_port_2_r, cclimber_sample_volume_w) | |
| 228 | AM_RANGE(0xb800, 0xb800) AM_READ(input_port_3_r) /* IN2 */ | |
| 254 | 229 | ADDRESS_MAP_END |
| 255 | 230 | |
| 256 | static ADDRESS_MAP_START( swimmer_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 257 | AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM) | |
| 258 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) | |
| 259 | AM_RANGE(0x9000, 0x93ff) AM_READ(MRA8_RAM) | |
| 260 | AM_RANGE(0x9400, 0x97ff) AM_READ(videoram_r) /* mirror address (used by Swimmer) */ | |
| 261 | AM_RANGE(0x9c00, 0x9fff) AM_READ(MRA8_RAM) | |
| 262 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) | |
| 263 | AM_RANGE(0xa800, 0xa800) AM_READ(input_port_1_r) | |
| 264 | AM_RANGE(0xb000, 0xb000) AM_READ(input_port_2_r) | |
| 265 | AM_RANGE(0xb800, 0xb800) AM_READ(input_port_3_r) | |
| 266 | AM_RANGE(0xb880, 0xb880) AM_READ(input_port_4_r) | |
| 267 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) /* ??? used by Guzzler */ | |
| 268 | AM_RANGE(0xe000, 0xffff) AM_READ(MRA8_ROM) /* Guzzler only */ | |
| 269 | ADDRESS_MAP_END | |
| 270 | 231 | |
| 271 | static ADDRESS_MAP_START( swimmer_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 272 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) | |
| 273 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) | |
| 274 | AM_RANGE(0x8800, 0x88ff) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size) | |
| 275 | AM_RANGE(0x8900, 0x89ff) AM_WRITE(cclimber_bigsprite_videoram_w) /* mirror for the above (Guzzler writes to both) */ | |
| 276 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 277 | AM_RANGE(0x9400, 0x97ff) AM_WRITE(videoram_w) /* mirror address (used by Guzzler) */ | |
| 232 | static ADDRESS_MAP_START( swimmer_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 233 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 234 | AM_RANGE(0x8000, 0x87ff) AM_RAM | |
| 235 | AM_RANGE(0x8800, 0x88ff) AM_MIRROR(0x0100) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size) | |
| 236 | AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 278 | 237 | AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_column_scroll) |
| 279 | 238 | AM_RANGE(0x9880, 0x989f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 280 | 239 | AM_RANGE(0x98fc, 0x98ff) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_bigspriteram) |
| 281 | AM_RANGE(0x9c00, 0x9fff) AM_WRITE(cclimber_colorram_w) AM_BASE(&colorram) | |
| 282 | AM_RANGE(0xa000, 0xa000) AM_WRITE(interrupt_enable_w) | |
| 240 | AM_RANGE(0x9c00, 0x9fff) AM_READWRITE(MRA8_RAM, cclimber_colorram_w) AM_BASE(&colorram) | |
| 241 | AM_RANGE(0xa000, 0xa000) AM_READWRITE(input_port_0_r, interrupt_enable_w) | |
| 283 | 242 | AM_RANGE(0xa001, 0xa001) AM_WRITE(flip_screen_x_w) |
| 284 | 243 | AM_RANGE(0xa002, 0xa002) AM_WRITE(flip_screen_y_w) |
| 285 | 244 | AM_RANGE(0xa003, 0xa003) AM_WRITE(swimmer_sidepanel_enable_w) |
| 286 | 245 | AM_RANGE(0xa004, 0xa004) AM_WRITE(swimmer_palettebank_w) |
| 287 | AM_RANGE(0xa800, 0xa800) AM_WRITE(swimmer_sh_soundlatch_w) | |
| 288 | AM_RANGE(0xb800, 0xb800) AM_WRITE(swimmer_bgcolor_w) /* river color in Swimmer */ | |
| 289 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM) /* ??? used by Guzzler */ | |
| 290 | AM_RANGE(0xe000, 0xffff) AM_WRITE(MWA8_ROM) /* Guzzler only */ | |
| 246 | AM_RANGE(0xa800, 0xa800) AM_READWRITE(input_port_1_r, swimmer_sh_soundlatch_w) | |
| 247 | AM_RANGE(0xb000, 0xb000) AM_READ(input_port_2_r) | |
| 248 | AM_RANGE(0xb800, 0xb800) AM_READWRITE(input_port_3_r, swimmer_bgcolor_w) /* river color in Swimmer */ | |
| 249 | AM_RANGE(0xb880, 0xb880) AM_READ(input_port_4_r) | |
| 250 | AM_RANGE(0xc000, 0xc7ff) AM_RAM /* ??? used by Guzzler */ | |
| 251 | AM_RANGE(0xe000, 0xffff) AM_ROM /* Guzzler only */ | |
| 291 | 252 | ADDRESS_MAP_END |
| 292 | 253 | |
| 293 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 294 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 295 | AM_RANGE(0x0c, 0x0c) AM_READ(AY8910_read_port_0_r) | |
| 296 | ADDRESS_MAP_END | |
| 297 | 254 | |
| 298 | static ADDRESS_MAP_START( | |
| 255 | static ADDRESS_MAP_START( cclimber_portmap, ADDRESS_SPACE_IO, 8 ) | |
| 299 | 256 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 300 | 257 | AM_RANGE(0x08, 0x08) AM_WRITE(AY8910_control_port_0_w) |
| 301 | 258 | AM_RANGE(0x09, 0x09) AM_WRITE(AY8910_write_port_0_w) |
| 259 | AM_RANGE(0x0c, 0x0c) AM_READ(AY8910_read_port_0_r) | |
| 302 | 260 | ADDRESS_MAP_END |
| 303 | 261 | |
| 304 | static ADDRESS_MAP_START( swimmer_sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 305 | AM_RANGE(0x0000, 0x0fff) AM_READ(MRA8_ROM) | |
| 306 | AM_RANGE(0x2000, 0x23ff) AM_READ(MRA8_RAM) | |
| 262 | ||
| 263 | static ADDRESS_MAP_START( swimmer_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 264 | AM_RANGE(0x0000, 0x0fff) AM_ROM | |
| 265 | AM_RANGE(0x2000, 0x23ff) AM_RAM | |
| 307 | 266 | AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) |
| 308 | AM_RANGE(0x4000, 0x4001) AM_R | |
| 267 | AM_RANGE(0x4000, 0x4001) AM_R | |
| 309 | 268 | ADDRESS_MAP_END |
| 310 | 269 | |
| 311 | static ADDRESS_MAP_START( swimmer_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 312 | AM_RANGE(0x0000, 0x0fff) AM_WRITE(MWA8_ROM) | |
| 313 | AM_RANGE(0x2000, 0x23ff) AM_WRITE(MWA8_RAM) | |
| 314 | AM_RANGE(0x4000, 0x4000) AM_WRITE(MWA8_RAM) /* ??? */ | |
| 315 | ADDRESS_MAP_END | |
| 316 | ||
| 317 | static ADDRESS_MAP_START( swimmer_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 270 | static ADDRESS_MAP_START( swimmer_sound_portmap, ADDRESS_SPACE_IO, 8 ) | |
| 318 | 271 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 319 | 272 | AM_RANGE(0x00, 0x00) AM_WRITE(AY8910_write_port_0_w) |
| 320 | 273 | AM_RANGE(0x01, 0x01) AM_WRITE(AY8910_control_port_0_w) |
| r1527 | r1528 | |
| 829 | 782 | static MACHINE_DRIVER_START( cclimber ) |
| 830 | 783 | |
| 831 | 784 | /* basic machine hardware */ |
| 832 | MDRV_CPU_ADD(Z80, 3072000) /* 3.072 MHz */ | |
| 833 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) | |
| 834 | MDRV_CPU_IO_MAP(readport,writeport) | |
| 785 | MDRV_CPU_ADD_TAG("main", Z80, MASTER_CLOCK/3/2) /* 3.072 MHz */ | |
| 786 | MDRV_CPU_PROGRAM_MAP(cclimber_map,0) | |
| 787 | MDRV_CPU_IO_MAP(cclimber_portmap,0) | |
| 835 | 788 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 836 | 789 | |
| 837 | 790 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 854 | 807 | /* sound hardware */ |
| 855 | 808 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 856 | 809 | |
| 857 | MDRV_SOUND_ADD(AY8910, | |
| 810 | MDRV_SOUND_ADD(AY8910, MASTER_CLOCK/3/2/2) | |
| 858 | 811 | MDRV_SOUND_CONFIG(cclimber_ay8910_interface) |
| 859 | 812 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 860 | 813 | |
| r1527 | r1528 | |
| 863 | 816 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 864 | 817 | MACHINE_DRIVER_END |
| 865 | 818 | |
| 866 | ||
| 819 | ||
| 867 | 820 | static MACHINE_DRIVER_START( cannonb ) |
| 868 | 821 | |
| 822 | MDRV_IMPORT_FROM(cclimber) | |
| 823 | ||
| 869 | 824 | /* basic machine hardware */ |
| 870 | MDRV_CPU_ADD(Z80, 3072000) /* 3.072 MHz */ | |
| 871 | MDRV_CPU_PROGRAM_MAP(cannonb_readmem,cannonb_writemem) | |
| 872 | MDRV_CPU_IO_MAP(readport,writeport) | |
| 873 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) | |
| 825 | MDRV_CPU_MODIFY("main") | |
| 826 | MDRV_CPU_PROGRAM_MAP(cannonb_map,0) | |
| 874 | 827 | |
| 875 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 876 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 877 | MDRV_MACHINE_RESET(cclimber) | |
| 878 | ||
| 879 | 828 | /* video hardware */ |
| 880 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 881 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 882 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 883 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) | |
| 884 | MDRV_GFXDECODE(cclimber) | |
| 885 | MDRV_PALETTE_LENGTH(96) | |
| 886 | MDRV_COLORTABLE_LENGTH(16*4+8*4) | |
| 887 | ||
| 888 | MDRV_PALETTE_INIT(cclimber) | |
| 889 | MDRV_VIDEO_START(generic) | |
| 890 | 829 | MDRV_VIDEO_UPDATE(cannonb) |
| 891 | ||
| 892 | /* sound hardware */ | |
| 893 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 894 | ||
| 895 | MDRV_SOUND_ADD(AY8910, 1536000) | |
| 896 | MDRV_SOUND_CONFIG(cclimber_ay8910_interface) | |
| 897 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 898 | ||
| 899 | MDRV_SOUND_ADD(SAMPLES, 0) | |
| 900 | MDRV_SOUND_CONFIG(cclimber_samples_interface) | |
| 901 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 902 | 830 | MACHINE_DRIVER_END |
| 903 | 831 | |
| 832 | ||
| 904 | 833 | static MACHINE_DRIVER_START( swimmer ) |
| 905 | 834 | |
| 906 | 835 | /* basic machine hardware */ |
| 907 | 836 | MDRV_CPU_ADD(Z80, 3072000) /* 3.072 MHz */ |
| 908 | MDRV_CPU_PROGRAM_MAP(swimmer_ | |
| 837 | MDRV_CPU_PROGRAM_MAP(swimmer_ | |
| 909 | 838 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 910 | 839 | |
| 911 | 840 | MDRV_CPU_ADD(Z80,4000000/2) |
| 912 | /* audio CPU */ /* 2 MHz */ | |
| 913 | MDRV_CPU_PROGRAM_MAP(swimmer_sound_readmem,swimmer_sound_writemem) | |
| 914 | MDRV_CPU_IO_MAP(0,swimmer_sound_writeport) | |
| 841 | MDRV_CPU_PROGRAM_MAP(swimmer_sound_map,0) | |
| 842 | MDRV_CPU_IO_MAP(swimmer_sound_portmap,0) | |
| 915 | 843 | MDRV_CPU_PERIODIC_INT(nmi_line_pulse, (double)4000000/16384) /* IRQs are triggered by the main CPU */ |
| 916 | 844 | |
| 917 | 845 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 376 | 376 | } |
| 377 | 377 | |
| 378 | 378 | |
| 379 | static UINT | |
| 379 | static CUSTOM_INPUT( | |
| 380 | 380 | { |
| 381 | 381 | return readinputportbytag("P1CONTROLS"); |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | |
| 385 | static UINT | |
| 385 | static CUSTOM_INPUT( | |
| 386 | 386 | { |
| 387 | 387 | if (engima2_flip_screen) |
| 388 | 388 | return readinputportbytag("P2CONTROLS"); |
| r1527 | r1528 | |
|---|---|---|
| 646 | 646 | */ |
| 647 | 647 | static void write_version_info( void ) |
| 648 | 648 | { |
| 649 | const UINT16 source[0x8] = | |
| 649 | static const UINT16 source[0x8] = | |
| 650 | 650 | { /* "NSA-BIOS ver"... */ |
| 651 | 651 | 0x534e,0x2d41,0x4942,0x534f,0x7620,0x7265,0x2e31,0x3133 |
| 652 | 652 | }; |
| r1527 | r1528 | |
| 778 | 778 | if( offset==4 ) keyseq = 0; |
| 779 | 779 | if( offset==3 ) |
| 780 | 780 | { |
| 781 | const UINT16 data[] = | |
| 781 | static const UINT16 data[] = | |
| 782 | 782 | { |
| 783 | 783 | 0x0000,0x2000,0x2100,0x2104,0x0106,0x0007,0x4003,0x6021, |
| 784 | 784 | 0x61a0,0x31a4,0x9186,0x9047,0xc443,0x6471,0x6db0,0x39bc, |
| r1527 | r1528 | |
|---|---|---|
| 84 | 84 | { |
| 85 | 85 | int y; |
| 86 | 86 | int x; |
| 87 | int spriteskip[] = { 1, 2, 4 }; | |
| 87 | static const int spriteskip[] = { 1, 2, 4 }; | |
| 88 | 88 | int spritesize = spriteskip[ color - 5 ]; |
| 89 | 89 | const gfx_element *gfx = machine->gfx[ 0 ]; |
| 90 | 90 | |
| r1527 | r1528 | |
| 139 | 139 | return 0; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | static UINT | |
| 142 | static CUSTOM_INPUT( | |
| 143 | 143 | { |
| 144 | 144 | int bit_mask = (FPTR)param; |
| 145 | 145 | |
| r1527 | r1528 | |
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | static UINT | |
| 158 | static CUSTOM_INPUT( | |
| 159 | 159 | { |
| 160 | 160 | int bit_mask = (FPTR)param; |
| 161 | 161 | |
| r1527 | r1528 | |
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | static UINT | |
| 178 | static CUSTOM_INPUT( | |
| 179 | 179 | { |
| 180 | 180 | int bit_mask = (FPTR)param; |
| 181 | 181 |
| r1527 | r1528 | |
|---|---|---|
| 33 | 33 | static int gear[4]; |
| 34 | 34 | |
| 35 | 35 | |
| 36 | static UINT | |
| 36 | static CUSTOM_INPUT( | |
| 37 | 37 | { |
| 38 | 38 | int n = (FPTR) param; |
| 39 | 39 | |
| r1527 | r1528 | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | |
| 44 | static UINT | |
| 44 | static CUSTOM_INPUT( | |
| 45 | 45 | { |
| 46 | 46 | int n = (FPTR) param; |
| 47 | 47 | |
| r1527 | r1528 | |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | |
| 52 | static UINT | |
| 52 | static CUSTOM_INPUT( | |
| 53 | 53 | { |
| 54 | 54 | int n = (FPTR) param; |
| 55 | 55 |
| r1527 | r1528 | |
|---|---|---|
| 1832 | 1832 | static MACHINE_DRIVER_START( bakubrkr ) |
| 1833 | 1833 | |
| 1834 | 1834 | /* basic machine hardware */ |
| 1835 | MDRV_CPU_ADD(M68000, 12 | |
| 1835 | MDRV_CPU_ADD(M68000, XTAL_12MHz | |
| 1836 | 1836 | MDRV_CPU_PROGRAM_MAP(bakubrkr,0) |
| 1837 | 1837 | MDRV_CPU_VBLANK_INT(kaneko16_interrupt,KANEKO16_INTERRUPTS_NUM) |
| 1838 | 1838 | |
| r1527 | r1528 | |
| 1856 | 1856 | /* sound hardware */ |
| 1857 | 1857 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1858 | 1858 | |
| 1859 | MDRV_SOUND_ADD(AY8910, 2 | |
| 1859 | MDRV_SOUND_ADD(AY8910, XTAL_12MHz/6 | |
| 1860 | 1860 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1861 | 1861 | |
| 1862 | MDRV_SOUND_ADD(AY8910, 2 | |
| 1862 | MDRV_SOUND_ADD(AY8910, XTAL_12MHz/6 | |
| 1863 | 1863 | MDRV_SOUND_CONFIG(ay8910_intf_eeprom) |
| 1864 | 1864 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1865 | 1865 | |
| 1866 | MDRV_SOUND_ADD(OKIM6295, 12000000/6) | |
| 1867 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) | |
| 1866 | MDRV_SOUND_ADD(OKIM6295, XTAL_12MHz/6) /* verified on pcb */ | |
| 1867 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) /* verified on pcb */ | |
| 1868 | 1868 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1869 | 1869 | MACHINE_DRIVER_END |
| 1870 | 1870 | |
| r1527 | r1528 | |
| 2027 | 2027 | static MACHINE_DRIVER_START( mgcrystl ) |
| 2028 | 2028 | |
| 2029 | 2029 | /* basic machine hardware */ |
| 2030 | MDRV_CPU_ADD(M68000, 12 | |
| 2030 | MDRV_CPU_ADD(M68000, XTAL_12MHz | |
| 2031 | 2031 | MDRV_CPU_PROGRAM_MAP(mgcrystl,0) |
| 2032 | 2032 | MDRV_CPU_VBLANK_INT(kaneko16_interrupt,KANEKO16_INTERRUPTS_NUM) |
| 2033 | 2033 | |
| r1527 | r1528 | |
| 2051 | 2051 | /* sound hardware */ |
| 2052 | 2052 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 2053 | 2053 | |
| 2054 | MDRV_SOUND_ADD(AY8910, 2 | |
| 2054 | MDRV_SOUND_ADD(AY8910, XTAL_12MHz/6 | |
| 2055 | 2055 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 2056 | 2056 | |
| 2057 | MDRV_SOUND_ADD(AY8910, 2 | |
| 2057 | MDRV_SOUND_ADD(AY8910, XTAL_12MHz/6 | |
| 2058 | 2058 | MDRV_SOUND_CONFIG(ay8910_intf_eeprom) |
| 2059 | 2059 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 2060 | 2060 | |
| 2061 | MDRV_SOUND_ADD(OKIM6295, 12000000/4) | |
| 2062 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7low) | |
| 2061 | MDRV_SOUND_ADD(OKIM6295, XTAL_12MHz/6) /* verified on pcb */ | |
| 2062 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) /* verified on pcb */ | |
| 2063 | 2063 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 2064 | 2064 | MACHINE_DRIVER_END |
| 2065 | 2065 |
| r1527 | r1528 | |
|---|---|---|
| 16 | 16 | extern size_t goldstar_video_size; |
| 17 | 17 | extern UINT8 *goldstar_scroll1, *goldstar_scroll2, *goldstar_scroll3; |
| 18 | 18 | |
| 19 | WRITE8_HANDLER( goldstar_video1_w ); | |
| 20 | WRITE8_HANDLER( goldstar_video2_w ); | |
| 21 | WRITE8_HANDLER( goldstar_video3_w ); | |
| 22 | 19 | WRITE8_HANDLER( goldstar_fa00_w ); |
| 23 | 20 | VIDEO_START( goldstar ); |
| 24 | 21 | VIDEO_UPDATE( goldstar ); |
| r1527 | r1528 | |
| 59 | 56 | static ADDRESS_MAP_START( map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 60 | 57 | AM_RANGE(0x0000, 0xb7ff) AM_ROM |
| 61 | 58 | AM_RANGE(0xb800, 0xbfff) AM_RAM AM_BASE(&nvram) AM_SIZE(&nvram_size) |
| 62 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_ROM) | |
| 63 | AM_RANGE(0xc800, 0xd9ff) AM_READ(MRA8_RAM) | |
| 64 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 65 | AM_RANGE(0xd000, 0xd7ff) AM_WRITE(colorram_w) AM_BASE(&colorram) | |
| 66 | AM_RANGE(0xe000, 0xe1ff) AM_READWRITE(MRA8_RAM,goldstar_video2_w) AM_BASE(&goldstar_video2) | |
| 67 | AM_RANGE(0xd800, 0xd9ff) AM_READWRITE(MRA8_RAM,goldstar_video1_w) AM_BASE(&goldstar_video1) AM_SIZE(&goldstar_video_size) | |
| 68 | AM_RANGE(0xe800, 0xe9ff) AM_WRITE(goldstar_video3_w) AM_BASE(&goldstar_video3) | |
| 59 | AM_RANGE(0xc000, 0xc7ff) AM_ROM | |
| 60 | AM_RANGE(0xc800, 0xcfff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 61 | AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_BASE(&colorram) | |
| 62 | AM_RANGE(0xd800, 0xd9ff) AM_RAM AM_BASE(&goldstar_video1) AM_SIZE(&goldstar_video_size) | |
| 63 | AM_RANGE(0xe000, 0xe1ff) AM_RAM AM_BASE(&goldstar_video2) | |
| 64 | AM_RANGE(0xe800, 0xe9ff) AM_WRITE(MWA8_RAM) AM_BASE(&goldstar_video3) | |
| 69 | 65 | AM_RANGE(0xf040, 0xf07f) AM_WRITE(MWA8_RAM) AM_BASE(&goldstar_scroll1) |
| 70 | 66 | AM_RANGE(0xf800, 0xf800) AM_READ(input_port_0_r) |
| 71 | 67 | AM_RANGE(0xf801, 0xf801) AM_READ(input_port_1_r) /* Test Mode */ |
| r1527 | r1528 | |
|---|---|---|
| 377 | 377 | |
| 378 | 378 | static MACHINE_DRIVER_START( namcos10 ) |
| 379 | 379 | /* basic machine hardware */ |
| 380 | MDRV_CPU_ADD( PSXCPU, | |
| 380 | MDRV_CPU_ADD( PSXCPU, XTAL_101_4912 | |
| 381 | 381 | MDRV_CPU_PROGRAM_MAP( namcos10_map, 0 ) |
| 382 | 382 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 383 | 383 |
| r1527 | r1528 | |
|---|---|---|
| 802 | 802 | ROM_LOAD( "sou_rom1", 0x000000, 0x40000, CRC(5791195b) SHA1(de0df8f89f395cbf3508b01aeea05675e110ad04) ) |
| 803 | 803 | ROM_END |
| 804 | 804 | |
| 805 | static int irq_active(void) | |
| 806 | { | |
| 807 | UINT32 FCR = activecpu_get_reg(27); | |
| 808 | if( !(FCR&(1<<28)) ) // int 1 (irq 5) | |
| 809 | return 1; | |
| 810 | else | |
| 811 | return 0; | |
| 812 | } | |
| 813 | 805 | |
| 806 | ||
| 814 | 807 | static READ32_HANDLER( dynabomb_speedup_r ) |
| 815 | 808 | { |
| 816 | 809 | if(activecpu_get_pc() == 0xc25b8) |
| 817 | 810 | { |
| 818 | if(irq_active()) | |
| 819 | cpu_spinuntil_int(); | |
| 820 | else | |
| 821 | activecpu_eat_cycles(50); | |
| 811 | activecpu_eat_cycles(50); | |
| 822 | 812 | } |
| 823 | 813 | |
| 824 | 814 | return mainram[0xe2784/4]; |
| r1527 | r1528 | |
| 828 | 818 | { |
| 829 | 819 | if(activecpu_get_pc() == 0x23e32) |
| 830 | 820 | { |
| 831 | if(irq_active()) | |
| 832 | cpu_spinuntil_int(); | |
| 833 | else | |
| 834 | activecpu_eat_cycles(50); | |
| 821 | activecpu_eat_cycles(50); | |
| 835 | 822 | } |
| 836 | 823 | |
| 837 | 824 | return mainram[0x32ab0/4]; |
| r1527 | r1528 | |
| 841 | 828 | { |
| 842 | 829 | if(activecpu_get_pc() == 0x26da4) |
| 843 | 830 | { |
| 844 | if(irq_active()) | |
| 845 | cpu_spinuntil_int(); | |
| 846 | else | |
| 847 | activecpu_eat_cycles(50); | |
| 831 | activecpu_eat_cycles(50); | |
| 848 | 832 | } |
| 849 | 833 | |
| 850 | 834 | return mainram[0x135800/4]; |
| r1527 | r1528 | |
| 854 | 838 | { |
| 855 | 839 | if(activecpu_get_pc() == 0x8560) |
| 856 | 840 | { |
| 857 | if(irq_active()) | |
| 858 | cpu_spinuntil_int(); | |
| 859 | else | |
| 860 | activecpu_eat_cycles(50); | |
| 841 | activecpu_eat_cycles(50); | |
| 861 | 842 | } |
| 862 | 843 | |
| 863 | 844 | return mainram[0x6626c/4]; |
| r1527 | r1528 | |
|---|---|---|
| 62 | 62 | AM_RANGE(0x0200, 0x0fff) AM_WRITE(MWA8_RAM) /* ? */ |
| 63 | 63 | AM_RANGE(0x1000, 0x1fff) AM_WRITE(MWA8_RAM) /* Scratchpad video RAM */ |
| 64 | 64 | AM_RANGE(0x2000, 0x3fff) AM_WRITE(redalert_backram_w) AM_BASE(&redalert_backram) |
| 65 | AM_RANGE(0x4000, 0x43ff) AM_WRITE( | |
| 65 | AM_RANGE(0x4000, 0x43ff) AM_WRITE(MWA8 | |
| 66 | 66 | AM_RANGE(0x4400, 0x47ff) AM_WRITE(redalert_spriteram1_w) AM_BASE(&redalert_spriteram1) |
| 67 | 67 | AM_RANGE(0x4800, 0x4bff) AM_WRITE(redalert_characterram_w) AM_BASE(&redalert_characterram) |
| 68 | 68 | AM_RANGE(0x4c00, 0x4fff) AM_WRITE(redalert_spriteram2_w) AM_BASE(&redalert_spriteram2) |
| r1527 | r1528 | |
| 123 | 123 | AM_RANGE(0x4400, 0x47ff) AM_WRITE(redalert_spriteram1_w) AM_BASE(&redalert_spriteram1) |
| 124 | 124 | AM_RANGE(0x4800, 0x4bff) AM_WRITE(redalert_characterram2_w) AM_BASE(&redalert_characterram2) |
| 125 | 125 | AM_RANGE(0x4c00, 0x4fff) AM_WRITE(redalert_spriteram2_w) AM_BASE(&redalert_spriteram2) |
| 126 | AM_RANGE(0x5000, 0x53ff) AM_WRITE( | |
| 126 | AM_RANGE(0x5000, 0x53ff) AM_WRITE(MWA8 | |
| 127 | 127 | AM_RANGE(0x5400, 0x57ff) AM_WRITE(redalert_spriteram3_w) AM_BASE(&redalert_spriteram3) |
| 128 | 128 | AM_RANGE(0x5800, 0x5bff) AM_WRITE(MWA8_RAM) //??? |
| 129 | 129 | AM_RANGE(0x5c00, 0x5fff) AM_WRITE(MWA8_RAM) //??? |
| r1527 | r1528 | |
|---|---|---|
| 88 | 88 | #include "mcr.h" |
| 89 | 89 | |
| 90 | 90 | |
| 91 | #define MASTER_CLOCK XTAL_20MHz | |
| 91 | 92 | |
| 93 | ||
| 94 | ||
| 92 | 95 | /************************************* |
| 93 | 96 | * |
| 94 | 97 | * Local variables and tables |
| r1527 | r1528 | |
| 1049 | 1052 | static MACHINE_DRIVER_START( mcr3_base ) |
| 1050 | 1053 | |
| 1051 | 1054 | /* basic machine hardware */ |
| 1052 | MDRV_CPU_ADD_TAG("main", Z80, | |
| 1055 | MDRV_CPU_ADD_TAG("main", Z80, MASTER_CLOCK/4) | |
| 1053 | 1056 | MDRV_CPU_CONFIG(mcr_daisy_chain) |
| 1054 | 1057 | MDRV_CPU_VBLANK_INT(mcr_interrupt,2) |
| 1055 | 1058 |
| r1527 | r1528 | |
|---|---|---|
| 346 | 346 | |
| 347 | 347 | static MACHINE_RESET( pipeline ) |
| 348 | 348 | { |
| 349 | ctc_intf.baseclock = | |
| 349 | ctc_intf.baseclock = | |
| 350 | 350 | z80ctc_init(0, &ctc_intf); |
| 351 | 351 | ppi8255_init(&ppi8255_intf); |
| 352 | 352 | } |
| r1527 | r1528 | |
| 363 | 363 | MDRV_CPU_PROGRAM_MAP(cpu1_mem, 0) |
| 364 | 364 | MDRV_CPU_IO_MAP(sound_port, 0) |
| 365 | 365 | |
| 366 | MDRV_CPU_ADD(M68705, 7372800/2 | |
| 366 | MDRV_CPU_ADD(M68705, 7372800/2 | |
| 367 | 367 | MDRV_CPU_PROGRAM_MAP(mcu_mem, 0) |
| 368 | 368 | |
| 369 | 369 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 177 | 177 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 178 | 178 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) |
| 179 | 179 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) |
| 180 | PORT_DIPNAME( 0x10, 0x | |
| 180 | PORT_DIPNAME( 0x10, 0x | |
| 181 | 181 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 182 | 182 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 183 | 183 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| r1527 | r1528 | |
|---|---|---|
| 276 | 276 | static MACHINE_DRIVER_START( simpsons ) |
| 277 | 277 | |
| 278 | 278 | /* basic machine hardware */ |
| 279 | MDRV_CPU_ADD(KONAMI, | |
| 279 | MDRV_CPU_ADD(KONAMI, XTAL_24MHz/2/4) /* pin 18 of konami cpu is 12Mhz, while pin 17 is 3mhz. Clock probably divided internally by 4 */ | |
| 280 | 280 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 281 | 281 | MDRV_CPU_VBLANK_INT(simpsons_irq,1) /* IRQ triggered by the 052109, FIRQ by the sprite hardware */ |
| 282 | 282 | |
| 283 | MDRV_CPU_ADD(Z80, 3579545) /* Reznor007 verified with schematics + PCB trace */ | |
| 284 | /* audio CPU */ | |
| 283 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) /* verified on pcb */ | |
| 285 | 284 | MDRV_CPU_PROGRAM_MAP(z80_map,0) |
| 286 | 285 | /* NMIs are generated by the 053260 */ |
| 287 | 286 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 303 | 302 | /* sound hardware */ |
| 304 | 303 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 305 | 304 | |
| 306 | MDRV_SOUND_ADD(YM2151, 3579545) | |
| 305 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) /* verified on pcb */ | |
| 307 | 306 | MDRV_SOUND_ROUTE(0, "left", 1.0) /* only left channel is connected */ |
| 308 | 307 | MDRV_SOUND_ROUTE(0, "right", 1.0) |
| 309 | 308 | MDRV_SOUND_ROUTE(1, "left", 0.0) |
| 310 | 309 | MDRV_SOUND_ROUTE(1, "right", 0.0) |
| 311 | 310 | |
| 312 | MDRV_SOUND_ADD(K053260, 3579545) /* | |
| 311 | MDRV_SOUND_ADD(K053260, XTAL_3_579545MHz) /* ve | |
| 313 | 312 | MDRV_SOUND_CONFIG(k053260_interface) |
| 314 | 313 | MDRV_SOUND_ROUTE(0, "left", 0.75) |
| 315 | 314 | MDRV_SOUND_ROUTE(1, "right", 0.75) |
| r1527 | r1528 | |
|---|---|---|
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | ADDRESS_MAP_START(paranoia_8085_map, ADDRESS_SPACE_PROGRAM, 8) | |
| 87 | static ADDRESS_MAP_START(paranoia_8085_map, ADDRESS_SPACE_PROGRAM, 8) | |
| 88 | 88 | AM_RANGE( 0x0000, 0x7fff) AM_ROM |
| 89 | 89 | AM_RANGE( 0x8000, 0x80ff) AM_RAM |
| 90 | 90 | AM_RANGE( 0x8100, 0x8105) AM_WRITE( paranoia_8085_8155_w ) |
| r1527 | r1528 | |
| 92 | 92 | AM_RANGE( 0xe000, 0xe1ff) AM_RAM |
| 93 | 93 | ADDRESS_MAP_END |
| 94 | 94 | |
| 95 | ADDRESS_MAP_START(paranoia_8085_io_map, ADDRESS_SPACE_IO, 8) | |
| 95 | static ADDRESS_MAP_START(paranoia_8085_io_map, ADDRESS_SPACE_IO, 8) | |
| 96 | 96 | ADDRESS_MAP_END |
| 97 | 97 | |
| 98 | ADDRESS_MAP_START(paranoia_z80_map, ADDRESS_SPACE_PROGRAM, 8) | |
| 98 | static ADDRESS_MAP_START(paranoia_z80_map, ADDRESS_SPACE_PROGRAM, 8) | |
| 99 | 99 | AM_RANGE( 0x0000, 0x3fff) AM_ROM |
| 100 | 100 | AM_RANGE( 0x6000, 0x67ff) AM_RAM |
| 101 | 101 | AM_RANGE( 0x7000, 0x73ff) AM_RAM |
| r1527 | r1528 | |
| 119 | 119 | { |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | ADDRESS_MAP_START(paranoia_z80_io_map, ADDRESS_SPACE_IO, 8) | |
| 122 | static ADDRESS_MAP_START(paranoia_z80_io_map, ADDRESS_SPACE_IO, 8) | |
| 123 | 123 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 124 | 124 | AM_RANGE( 0x01, 0x01 ) AM_READ( paranoia_z80_io_01_r ) |
| 125 | 125 | AM_RANGE( 0x02, 0x02 ) AM_READ( paranoia_z80_io_02_r ) |
| r1527 | r1528 | |
|---|---|---|
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | |
| 320 | static UINT | |
| 320 | static CUSTOM_INPUT( | |
| 321 | 321 | { |
| 322 | 322 | return readinputportbytag(SEAWOLF_ERASE_SW_PORT_TAG) & |
| 323 | 323 | readinputportbytag(SEAWOLF_ERASE_DIP_PORT_TAG); |
| r1527 | r1528 | |
| 548 | 548 | } |
| 549 | 549 | |
| 550 | 550 | |
| 551 | static UINT | |
| 551 | static CUSTOM_INPUT( | |
| 552 | 552 | { |
| 553 | 553 | return readinputportbytag(TORNBASE_L_HIT_PORT_TAG); |
| 554 | 554 | } |
| 555 | 555 | |
| 556 | 556 | |
| 557 | static UINT | |
| 557 | static CUSTOM_INPUT( | |
| 558 | 558 | { |
| 559 | 559 | UINT32 ret; |
| 560 | 560 | |
| r1527 | r1528 | |
| 575 | 575 | } |
| 576 | 576 | |
| 577 | 577 | |
| 578 | static UINT | |
| 578 | static CUSTOM_INPUT( | |
| 579 | 579 | { |
| 580 | 580 | UINT32 ret; |
| 581 | 581 | |
| r1527 | r1528 | |
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | |
| 599 | static UINT | |
| 599 | static CUSTOM_INPUT( | |
| 600 | 600 | { |
| 601 | 601 | return readinputportbytag(TORNBASE_L_PITCH_PORT_TAG); |
| 602 | 602 | } |
| 603 | 603 | |
| 604 | 604 | |
| 605 | static UINT | |
| 605 | static CUSTOM_INPUT( | |
| 606 | 606 | { |
| 607 | 607 | return readinputportbytag(TORNBASE_SCORE_SW_PORT_TAG) & |
| 608 | 608 | readinputportbytag(TORNBASE_SCORE_DIP_PORT_TAG); |
| r1527 | r1528 | |
| 1177 | 1177 | } |
| 1178 | 1178 | |
| 1179 | 1179 | |
| 1180 | static UINT | |
| 1180 | static CUSTOM_INPUT( | |
| 1181 | 1181 | { |
| 1182 | 1182 | UINT32 ret; |
| 1183 | 1183 | |
| r1527 | r1528 | |
| 1190 | 1190 | } |
| 1191 | 1191 | |
| 1192 | 1192 | |
| 1193 | static UINT | |
| 1193 | static CUSTOM_INPUT( | |
| 1194 | 1194 | { |
| 1195 | 1195 | UINT32 ret; |
| 1196 | 1196 | |
| r1527 | r1528 | |
| 1304 | 1304 | #define DPLAY_CAB_TYPE_COCKTAIL (1) |
| 1305 | 1305 | |
| 1306 | 1306 | |
| 1307 | static UINT | |
| 1307 | static CUSTOM_INPUT( | |
| 1308 | 1308 | { |
| 1309 | 1309 | UINT32 ret; |
| 1310 | 1310 | |
| r1527 | r1528 | |
| 1317 | 1317 | } |
| 1318 | 1318 | |
| 1319 | 1319 | |
| 1320 | static UINT | |
| 1320 | static CUSTOM_INPUT( | |
| 1321 | 1321 | { |
| 1322 | 1322 | return readinputportbytag(DPLAY_L_PITCH_PORT_TAG); |
| 1323 | 1323 | } |
| r1527 | r1528 | |
| 1692 | 1692 | } |
| 1693 | 1693 | |
| 1694 | 1694 | |
| 1695 | static UINT | |
| 1695 | static CUSTOM_INPUT( | |
| 1696 | 1696 | { |
| 1697 | 1697 | UINT32 ret; |
| 1698 | 1698 | |
| r1527 | r1528 | |
| 2479 | 2479 | } |
| 2480 | 2480 | |
| 2481 | 2481 | |
| 2482 | static UINT | |
| 2482 | static CUSTOM_INPUT( | |
| 2483 | 2483 | { |
| 2484 | 2484 | UINT32 ret = readinputportbytag(INVADERS_COIN_INPUT_PORT_TAG); |
| 2485 | 2485 | |
| r1527 | r1528 | |
| 2489 | 2489 | } |
| 2490 | 2490 | |
| 2491 | 2491 | |
| 2492 | static UINT | |
| 2492 | static CUSTOM_INPUT( | |
| 2493 | 2493 | { |
| 2494 | 2494 | UINT32 ret; |
| 2495 | 2495 | |
| r1527 | r1528 | |
| 2505 | 2505 | } |
| 2506 | 2506 | |
| 2507 | 2507 | |
| 2508 | static UINT | |
| 2508 | static CUSTOM_INPUT( | |
| 2509 | 2509 | { |
| 2510 | 2510 | UINT32 ret; |
| 2511 | 2511 | |
| r1527 | r1528 | |
| 2521 | 2521 | } |
| 2522 | 2522 | |
| 2523 | 2523 | |
| 2524 | static UINT | |
| 2524 | static CUSTOM_INPUT( | |
| 2525 | 2525 | { |
| 2526 | 2526 | UINT32 ret; |
| 2527 | 2527 | |
| r1527 | r1528 | |
| 2537 | 2537 | } |
| 2538 | 2538 | |
| 2539 | 2539 | |
| 2540 | UINT | |
| 2540 | CUSTOM_INPUT( | |
| 2541 | 2541 | { |
| 2542 | 2542 | UINT32 ret; |
| 2543 | 2543 | |
| r1527 | r1528 | |
| 2679 | 2679 | #define BLUESHRK_COIN_INPUT_PORT_TAG ("COIN") |
| 2680 | 2680 | |
| 2681 | 2681 | |
| 2682 | static UINT | |
| 2682 | static CUSTOM_INPUT( | |
| 2683 | 2683 | { |
| 2684 | 2684 | UINT32 ret = readinputportbytag(BLUESHRK_COIN_INPUT_PORT_TAG); |
| 2685 | 2685 | |
| r1527 | r1528 | |
| 2927 | 2927 | ROM_LOAD( "9316.1h", 0x0000, 0x0800, CRC(c0030d7c) SHA1(4d0a3a59d4f8181c6e30966a6b1d19ba5b29c398) ) |
| 2928 | 2928 | ROM_LOAD( "9316.1g", 0x0800, 0x0800, CRC(1ddde10b) SHA1(8fb8e85844a8ec6c0722883013ecdd4eeaeb08c1) ) |
| 2929 | 2929 | ROM_LOAD( "9316.1f", 0x1000, 0x0800, CRC(808e46f1) SHA1(1cc4e9b0aa7e9546c133bd40d40ede6f2fbe93ba) ) |
| 2930 | ROM_LOAD( "9316.1e", 0x1800, 0x0800, | |
| 2930 | ROM_LOAD( "9316.1e", 0x1800, 0x0800, | |
| 2931 | 2931 | ROM_END |
| 2932 | 2932 | |
| 2933 | 2933 | |
| r1527 | r1528 | |
| 3098 | 3098 | /* 612 */ GAME( 1977, boothill, 0, boothill, boothill, 0, ROT0, "Midway", "Boot Hill" , GAME_SUPPORTS_SAVE ) |
| 3099 | 3099 | /* 615 */ GAME( 1977, checkmat, 0, checkmat, checkmat, 0, ROT0, "Midway", "Checkmate", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 3100 | 3100 | /* 618 */ GAME( 1977, desertgu, 0, desertgu, desertgu, 0, ROT0, "Midway", "Desert Gun", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 3101 | /* 618 */ GAME( 1977, roadrunm, desertgu, desertgu, desertgu, 0, ROT0, "Midway", "Road Runner (Midway)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE | |
| 3101 | /* 618 */ GAME( 1977, roadrunm, desertgu, desertgu, desertgu, 0, ROT0, "Midway", "Road Runner (Midway)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE | |
| 3102 | 3102 | /* 619 */ GAME( 1977, dplay, 0, dplay, dplay, 0, ROT0, "Midway", "Double Play", GAME_SUPPORTS_SAVE ) |
| 3103 | 3103 | /* 622 */ GAME( 1977, lagunar, 0, zzzap, lagunar, 0, ROT90, "Midway", "Laguna Racer", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) |
| 3104 | 3104 | /* 623 */ GAME( 1977, gmissile, 0, gmissile, gmissile, 0, ROT0, "Taito / Midway", "Missile X / Guided Missile", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| r1527 | r1528 | |
|---|---|---|
| 168 | 168 | extern UINT8 *wiz_sprite_bank; |
| 169 | 169 | |
| 170 | 170 | WRITE8_HANDLER( wiz_char_bank_select_w ); |
| 171 | WRITE8_HANDLER( wiz_attributes_w ); | |
| 172 | 171 | WRITE8_HANDLER( wiz_palettebank_w ); |
| 173 | 172 | WRITE8_HANDLER( wiz_bgcolor_w ); |
| 174 | 173 | WRITE8_HANDLER( wiz_flipx_w ); |
| r1527 | r1528 | |
| 246 | 245 | AM_RANGE(0xd400, 0xd7ff) AM_WRITE(MWA8_RAM) AM_BASE(&wiz_colorram2) |
| 247 | 246 | AM_RANGE(0xd800, 0xd83f) AM_WRITE(MWA8_RAM) AM_BASE(&wiz_attributesram2) |
| 248 | 247 | AM_RANGE(0xd840, 0xd85f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram_2) AM_SIZE(&spriteram_size) |
| 249 | AM_RANGE(0xe000, 0xe3ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 250 | AM_RANGE(0xe400, 0xe7ff) AM_WRITE(colorram_w) AM_BASE(&colorram) | |
| 251 | AM_RANGE(0xe800, 0xe83f) AM_WRITE(wiz_attributes_w) AM_BASE(&wiz_attributesram) | |
| 248 | AM_RANGE(0xe000, 0xe3ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 249 | AM_RANGE(0xe400, 0xe7ff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram) | |
| 250 | AM_RANGE(0xe800, 0xe83f) AM_WRITE(MWA8_RAM) AM_BASE(&wiz_attributesram) | |
| 252 | 251 | AM_RANGE(0xe840, 0xe85f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) |
| 253 | 252 | AM_RANGE(0xf000, 0xf000) AM_WRITE(MWA8_RAM) AM_BASE(&wiz_sprite_bank) |
| 254 | 253 | AM_RANGE(0xf001, 0xf001) AM_WRITE(interrupt_enable_w) |
| r1527 | r1528 | |
|---|---|---|
| 358 | 358 | static READ32_HANDLER( input_port_3_020_r ) { return readinputport(3) << 16; } |
| 359 | 359 | |
| 360 | 360 | |
| 361 | static UINT | |
| 361 | static CUSTOM_INPUT( | |
| 362 | 362 | { |
| 363 | 363 | int which = (FPTR)param; |
| 364 | 364 | return (analog_ports[which] >> 7) & 0x01; |
| r1527 | r1528 | |
| 632 | 632 | /* calculate how long until we generate an interrupt */ |
| 633 | 633 | |
| 634 | 634 | /* period per each bit sent */ |
| 635 | sample_period = attotime_mul(ATTOTIME_IN_HZ( | |
| 635 | sample_period = attotime_mul(ATTOTIME_IN_HZ( | |
| 636 | 636 | |
| 637 | 637 | /* now put it down to samples, so we know what the channel frequency has to be */ |
| 638 | 638 | sample_period = attotime_mul(sample_period, 16 * SOUND_CHANNELS); |
| r1527 | r1528 | |
|---|---|---|
| 896 | 896 | |
| 897 | 897 | static MACHINE_DRIVER_START( coh100 ) |
| 898 | 898 | /* basic machine hardware */ |
| 899 | MDRV_CPU_ADD( PSXCPU, | |
| 899 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 900 | 900 | MDRV_CPU_PROGRAM_MAP( namcos11_map, 0 ) |
| 901 | 901 | MDRV_CPU_VBLANK_INT( namcos11_vblank, 1 ) |
| 902 | 902 |
| r1527 | r1528 | |
|---|---|---|
| 7 | 7 | Games supported: |
| 8 | 8 | * Lethal Justice |
| 9 | 9 | * Egg Venture |
| 10 | * Ripper Ribit | |
| 11 | * Chicken Farm | |
| 12 | * Crazzy Clownz | |
| 10 | 13 | |
| 11 | 14 | Known bugs: |
| 12 | 15 | * some DIP switches not understood |
| 13 | 16 | |
| 14 | Note: | |
| 15 | Even though Egg Venture looks like it has a few extra scanlines at | |
| 16 | the bottom, the video hardware is explicitly programmed to only | |
| 17 | display 236 lines. Altering this will lead to bad flickering. | |
| 18 | ||
| 19 | 17 | **************************************************************************** |
| 20 | 18 | |
| 21 | 19 | EU21 EU18 EU20 32.000MHz |
| r1527 | r1528 | |
| 46 | 44 | #include "driver.h" |
| 47 | 45 | #include "cpu/tms34010/tms34010.h" |
| 48 | 46 | #include "lethalj.h" |
| 47 | #include "machine/ticket.h" | |
| 49 | 48 | #include "sound/okim6295.h" |
| 50 | 49 | |
| 51 | #define VIDEO_CLOCK 11289600 | |
| 52 | #define VIDEO_CLOCK_LETHALJ 11059200 | |
| 53 | 50 | |
| 51 | #define MASTER_CLOCK XTAL_40MHz | |
| 52 | #define SOUND_CLOCK XTAL_2MHz | |
| 54 | 53 | |
| 54 | #define VIDEO_CLOCK XTAL_11_289MHz | |
| 55 | #define VIDEO_CLOCK_LETHALJ XTAL_11_0592MHz | |
| 55 | 56 | |
| 57 | ||
| 58 | ||
| 56 | 59 | /************************************* |
| 57 | 60 | * |
| 61 | * Custom inputs | |
| 62 | * | |
| 63 | *************************************/ | |
| 64 | ||
| 65 | static CUSTOM_INPUT( ticket_status ) | |
| 66 | { | |
| 67 | return ticket_dispenser_0_r(0) >> 7; | |
| 68 | } | |
| 69 | ||
| 70 | ||
| 71 | static CUSTOM_INPUT( cclownz_paddle ) | |
| 72 | { | |
| 73 | int value = readinputportbytag("PADDLE"); | |
| 74 | return ((value << 4) & 0xf00) | (value & 0x00f); | |
| 75 | } | |
| 76 | ||
| 77 | ||
| 78 | ||
| 79 | /************************************* | |
| 80 | * | |
| 81 | * Output controls | |
| 82 | * | |
| 83 | *************************************/ | |
| 84 | ||
| 85 | static WRITE16_HANDLER( ripribit_control_w ) | |
| 86 | { | |
| 87 | coin_counter_w(0, data & 1); | |
| 88 | ticket_dispenser_0_w(0, ((data >> 1) & 1) << 7); | |
| 89 | output_set_lamp_value(0, (data >> 2) & 1); | |
| 90 | } | |
| 91 | ||
| 92 | ||
| 93 | static WRITE16_HANDLER( cfarm_control_w ) | |
| 94 | { | |
| 95 | ticket_dispenser_0_w(0, ((data >> 0) & 1) << 7); | |
| 96 | output_set_lamp_value(0, (data >> 2) & 1); | |
| 97 | output_set_lamp_value(1, (data >> 3) & 1); | |
| 98 | output_set_lamp_value(2, (data >> 4) & 1); | |
| 99 | coin_counter_w(0, (data >> 7) & 1); | |
| 100 | } | |
| 101 | ||
| 102 | ||
| 103 | static WRITE16_HANDLER( cclownz_control_w ) | |
| 104 | { | |
| 105 | ticket_dispenser_0_w(0, ((data >> 0) & 1) << 7); | |
| 106 | output_set_lamp_value(0, (data >> 2) & 1); | |
| 107 | output_set_lamp_value(1, (data >> 4) & 1); | |
| 108 | output_set_lamp_value(2, (data >> 5) & 1); | |
| 109 | coin_counter_w(0, (data >> 6) & 1); | |
| 110 | } | |
| 111 | ||
| 112 | ||
| 113 | ||
| 114 | /************************************* | |
| 115 | * | |
| 58 | 116 | * Memory maps |
| 59 | 117 | * |
| 60 | 118 | *************************************/ |
| r1527 | r1528 | |
| 64 | 122 | AM_RANGE(0x04000000, 0x0400000f) AM_READWRITE(OKIM6295_status_0_lsb_r, OKIM6295_data_0_lsb_w) |
| 65 | 123 | AM_RANGE(0x04000010, 0x0400001f) AM_READWRITE(OKIM6295_status_1_lsb_r, OKIM6295_data_1_lsb_w) |
| 66 | 124 | AM_RANGE(0x04100000, 0x0410000f) AM_READWRITE(OKIM6295_status_2_lsb_r, OKIM6295_data_2_lsb_w) |
| 67 | ||
| 125 | // AM_RANGE(0x04100010, 0x0410001f) AM_READNOP /* read but never examined */ | |
| 68 | 126 | AM_RANGE(0x04200000, 0x0420001f) AM_WRITENOP /* clocks bits through here */ |
| 69 | 127 | AM_RANGE(0x04300000, 0x0430007f) AM_READ(lethalj_gun_r) |
| 70 | 128 | AM_RANGE(0x04400000, 0x0440000f) AM_WRITENOP /* clocks bits through here */ |
| 71 | 129 | AM_RANGE(0x04500010, 0x0450001f) AM_READ(input_port_0_word_r) |
| 72 | 130 | AM_RANGE(0x04600000, 0x0460000f) AM_READ(input_port_1_word_r) |
| 73 | AM_RANGE(0x04700000, 0x047000 | |
| 131 | AM_RANGE(0x04700000, 0x0470007f) AM_WRITE(lethalj_blitter_w) | |
| 74 | 132 | AM_RANGE(0xc0000000, 0xc00001ff) AM_READWRITE(tms34010_io_register_r, tms34010_io_register_w) |
| 75 | 133 | AM_RANGE(0xc0000240, 0xc000025f) AM_WRITENOP /* seems to be a bug in their code, one of many. */ |
| 76 | 134 | AM_RANGE(0xff800000, 0xffffffff) AM_ROM AM_REGION(REGION_USER1, 0) |
| r1527 | r1528 | |
| 252 | 310 | INPUT_PORTS_END |
| 253 | 311 | |
| 254 | 312 | |
| 255 | static INPUT_PORTS_START( laigames ) | |
| 256 | /* No Idea about the inputs */ | |
| 313 | static INPUT_PORTS_START( ripribit ) | |
| 257 | 314 | PORT_START |
| 315 | PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 316 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 317 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ticket_status, NULL) | |
| 318 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 319 | ||
| 320 | PORT_START | |
| 258 | 321 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 259 | PORT_ | |
| 322 | PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_HIGH | |
| 260 | 323 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 261 | 324 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 262 | 325 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) |
| 263 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 264 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 265 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 266 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 267 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 268 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 269 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 270 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 271 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 272 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 273 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 274 | PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) | |
| 275 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) | |
| 276 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 277 | PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) | |
| 278 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 279 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 280 | PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) | |
| 281 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) | |
| 282 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 283 | PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) | |
| 284 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) | |
| 285 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 286 | PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) | |
| 287 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 288 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 289 | PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) | |
| 290 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 291 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 292 | PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) | |
| 293 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 294 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 295 | PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) | |
| 296 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 297 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 326 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 327 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 328 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 329 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 330 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 331 | PORT_DIPNAME( 0x00c0, 0x0000, DEF_STR( Coinage )) | |
| 332 | PORT_DIPSETTING( 0x0080, DEF_STR( 3C_1C )) | |
| 333 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C )) | |
| 334 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C )) | |
| 335 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C )) | |
| 336 | PORT_DIPNAME( 0x0700, 0x0200, "Starting Jackpot" ) | |
| 337 | PORT_DIPSETTING( 0x0000, "0" ) | |
| 338 | PORT_DIPSETTING( 0x0100, "5" ) | |
| 339 | PORT_DIPSETTING( 0x0200, "10" ) | |
| 340 | PORT_DIPSETTING( 0x0300, "15" ) | |
| 341 | PORT_DIPSETTING( 0x0400, "20" ) | |
| 342 | PORT_DIPSETTING( 0x0500, "25" ) | |
| 343 | PORT_DIPSETTING( 0x0600, "30" ) | |
| 344 | PORT_DIPSETTING( 0x0700, "35" ) | |
| 345 | PORT_DIPNAME( 0x1800, 0x1800, DEF_STR( Unknown ) ) | |
| 346 | PORT_DIPSETTING( 0x0000, "0" ) | |
| 347 | PORT_DIPSETTING( 0x0800, "1" ) | |
| 348 | PORT_DIPSETTING( 0x1000, "2" ) | |
| 349 | PORT_DIPSETTING( 0x1800, "3" ) | |
| 350 | PORT_DIPNAME( 0xe000, 0x8000, "Points per Ticket" ) | |
| 351 | PORT_DIPSETTING( 0xe000, "200" ) | |
| 352 | PORT_DIPSETTING( 0xc000, "300" ) | |
| 353 | PORT_DIPSETTING( 0xa000, "400" ) | |
| 354 | PORT_DIPSETTING( 0x8000, "500" ) | |
| 355 | PORT_DIPSETTING( 0x6000, "600" ) | |
| 356 | PORT_DIPSETTING( 0x4000, "700" ) | |
| 357 | PORT_DIPSETTING( 0x2000, "800" ) | |
| 358 | PORT_DIPSETTING( 0x0000, "1000" ) | |
| 298 | 359 | |
| 360 | PORT_START /* fake analog X */ | |
| 361 | PORT_START /* fake analog Y */ | |
| 362 | PORT_START /* fake analog X */ | |
| 363 | PORT_START /* fake analog Y */ | |
| 364 | INPUT_PORTS_END | |
| 365 | ||
| 366 | ||
| 367 | static INPUT_PORTS_START( cfarm ) | |
| 299 | 368 | PORT_START |
| 300 | PORT_DIPNAME( 0x0001, 0x0001, "1" ) | |
| 301 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 302 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 303 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) | |
| 304 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 305 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 306 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) | |
| 307 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 308 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 309 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) | |
| 310 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 311 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 369 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 370 | PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_HIGH ) | |
| 371 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 372 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 312 | 373 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) |
| 313 | 374 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) |
| 314 | 375 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 315 | 376 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) |
| 316 | 377 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) |
| 317 | 378 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 318 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 319 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 320 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 321 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 322 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 323 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 324 | PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) | |
| 325 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) | |
| 326 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 327 | PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) | |
| 328 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 329 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 330 | PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) | |
| 331 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) | |
| 332 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 333 | PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) | |
| 334 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) | |
| 335 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 336 | PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) | |
| 337 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 338 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 339 | PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) | |
| 340 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 341 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 342 | PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) | |
| 343 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 344 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 345 | PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) | |
| 346 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 347 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 379 | PORT_DIPNAME( 0x00c0, 0x0000, DEF_STR( Coinage )) | |
| 380 | PORT_DIPSETTING( 0x0080, DEF_STR( 3C_1C )) | |
| 381 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C )) | |
| 382 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C )) | |
| 383 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C )) | |
| 384 | PORT_DIPNAME( 0x0700, 0x0300, "Starting Jackpot" ) | |
| 385 | PORT_DIPSETTING( 0x0000, "0" ) | |
| 386 | PORT_DIPSETTING( 0x0100, "5" ) | |
| 387 | PORT_DIPSETTING( 0x0200, "8" ) | |
| 388 | PORT_DIPSETTING( 0x0300, "10" ) | |
| 389 | PORT_DIPSETTING( 0x0400, "12" ) | |
| 390 | PORT_DIPSETTING( 0x0500, "15" ) | |
| 391 | PORT_DIPSETTING( 0x0600, "18" ) | |
| 392 | PORT_DIPSETTING( 0x0700, "20" ) | |
| 393 | PORT_DIPNAME( 0x1800, 0x1800, DEF_STR( Unknown ) ) | |
| 394 | PORT_DIPSETTING( 0x0000, "0" ) | |
| 395 | PORT_DIPSETTING( 0x0800, "1" ) | |
| 396 | PORT_DIPSETTING( 0x1000, "2" ) | |
| 397 | PORT_DIPSETTING( 0x1800, "3" ) | |
| 398 | PORT_DIPNAME( 0xe000, 0x8000, "Eggs per Ticket" ) | |
| 399 | PORT_DIPSETTING( 0xe000, "1" ) | |
| 400 | PORT_DIPSETTING( 0xc000, "2" ) | |
| 401 | PORT_DIPSETTING( 0xa000, "3" ) | |
| 402 | PORT_DIPSETTING( 0x8000, "4" ) | |
| 403 | PORT_DIPSETTING( 0x6000, "5" ) | |
| 404 | PORT_DIPSETTING( 0x4000, "6" ) | |
| 405 | PORT_DIPSETTING( 0x2000, "8" ) | |
| 406 | PORT_DIPSETTING( 0x0000, "10" ) | |
| 348 | 407 | |
| 408 | PORT_START | |
| 409 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ticket_status, NULL) | |
| 410 | PORT_BIT( 0x0006, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 411 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 412 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 413 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 414 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 415 | ||
| 349 | 416 | PORT_START /* fake analog X */ |
| 350 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) | |
| 351 | ||
| 352 | 417 | PORT_START /* fake analog Y */ |
| 353 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) | |
| 354 | ||
| 355 | 418 | PORT_START /* fake analog X */ |
| 356 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2) | |
| 357 | ||
| 358 | 419 | PORT_START /* fake analog Y */ |
| 359 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2) | |
| 360 | 420 | INPUT_PORTS_END |
| 361 | 421 | |
| 362 | 422 | |
| 363 | static INPUT_PORTS_START( ripribit ) | |
| 364 | /* No Idea about the inputs */ | |
| 423 | static INPUT_PORTS_START( cclownz ) | |
| 365 | 424 | PORT_START |
| 366 | PORT_DIPNAME( 0x0001, 0x0001, "0" ) | |
| 367 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 368 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 369 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) | |
| 370 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 371 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 372 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) | |
| 373 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 374 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 375 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) | |
| 376 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 377 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 378 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 379 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 380 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 381 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 382 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 383 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 384 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 385 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 386 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 387 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 388 | PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) | |
| 389 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) | |
| 390 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 391 | PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) | |
| 392 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 393 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 394 | PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) | |
| 395 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) | |
| 396 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 397 | PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) | |
| 398 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) | |
| 399 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 400 | PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) | |
| 401 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 402 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 403 | PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) | |
| 404 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 405 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 406 | PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) | |
| 407 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 408 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 409 | PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) | |
| 410 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 411 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 412 | ||
| 413 | PORT_START | |
| 414 | 425 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 415 | PORT_ | |
| 426 | PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_HIGH | |
| 416 | 427 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 417 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 418 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) | |
| 428 | PORT_BIT( 0x0018, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 429 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) | |
| 419 | 430 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) |
| 420 | 431 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 421 | 432 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) |
| 422 | 433 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) |
| 423 | 434 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 424 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 425 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 426 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 427 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 428 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 429 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 430 | PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unknown ) ) | |
| 431 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) | |
| 432 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 433 | PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Unknown ) ) | |
| 434 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 435 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 436 | PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Unknown ) ) | |
| 437 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) | |
| 438 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 439 | PORT_DIPNAME( 0x0800, 0x0000, DEF_STR( Unknown ) ) | |
| 440 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) | |
| 441 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 442 | PORT_DIPNAME( 0x1000, 0x0000, DEF_STR( Unknown ) ) | |
| 443 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 444 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 445 | PORT_DIPNAME( 0x2000, 0x0000, DEF_STR( Unknown ) ) | |
| 446 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 447 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 448 | PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unknown ) ) | |
| 449 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 450 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 451 | PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Unknown ) ) | |
| 452 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 453 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 435 | PORT_DIPNAME( 0x00c0, 0x0000, DEF_STR( Coinage )) | |
| 436 | PORT_DIPSETTING( 0x0080, DEF_STR( 3C_1C )) | |
| 437 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C )) | |
| 438 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C )) | |
| 439 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C )) | |
| 440 | PORT_DIPNAME( 0x0700, 0x0700, "Starting Jackpot" ) | |
| 441 | PORT_DIPSETTING( 0x0000, "0" ) | |
| 442 | PORT_DIPSETTING( 0x0100, "2" ) | |
| 443 | PORT_DIPSETTING( 0x0200, "5" ) | |
| 444 | PORT_DIPSETTING( 0x0300, "8" ) | |
| 445 | PORT_DIPSETTING( 0x0400, "10" ) | |
| 446 | PORT_DIPSETTING( 0x0500, "15" ) | |
| 447 | PORT_DIPSETTING( 0x0600, "20" ) | |
| 448 | PORT_DIPSETTING( 0x0700, "30" ) | |
| 449 | PORT_DIPNAME( 0x1800, 0x1800, DEF_STR( Unknown ) ) | |
| 450 | PORT_DIPSETTING( 0x0000, "0" ) | |
| 451 | PORT_DIPSETTING( 0x0800, "1" ) | |
| 452 | PORT_DIPSETTING( 0x1000, "2" ) | |
| 453 | PORT_DIPSETTING( 0x1800, "3" ) | |
| 454 | PORT_DIPNAME( 0xe000, 0x8000, "Points per Ticket" ) | |
| 455 | PORT_DIPSETTING( 0xe000, "700" ) | |
| 456 | PORT_DIPSETTING( 0xc000, "900" ) | |
| 457 | PORT_DIPSETTING( 0xa000, "1200" ) | |
| 458 | PORT_DIPSETTING( 0x8000, "1500" ) | |
| 459 | PORT_DIPSETTING( 0x6000, "1800" ) | |
| 460 | PORT_DIPSETTING( 0x4000, "2100" ) | |
| 461 | PORT_DIPSETTING( 0x2000, "2400" ) | |
| 462 | PORT_DIPSETTING( 0x0000, "3000" ) | |
| 454 | 463 | |
| 464 | PORT_START | |
| 465 | PORT_BIT( 0x0f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cclownz_paddle, NULL) | |
| 466 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ticket_status, NULL) | |
| 467 | PORT_BIT( 0x0060, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 468 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) | |
| 469 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 470 | ||
| 455 | 471 | PORT_START /* fake analog X */ |
| 456 | ||
| 457 | 472 | PORT_START /* fake analog Y */ |
| 458 | ||
| 459 | 473 | PORT_START /* fake analog X */ |
| 474 | PORT_START /* fake analog Y */ | |
| 460 | 475 | |
| 461 | PORT_START /* fake analog Y */ | |
| 476 | PORT_START_TAG("PADDLE") | |
| 477 | PORT_BIT( 0x00ff, 0x0000, IPT_PADDLE ) PORT_PLAYER(1) PORT_SENSITIVITY(50) PORT_KEYDELTA(8) PORT_CENTERDELTA(0) PORT_REVERSE | |
| 462 | 478 | INPUT_PORTS_END |
| 463 | 479 | |
| 464 | 480 | |
| r1527 | r1528 | |
| 504 | 520 | static MACHINE_DRIVER_START( gameroom ) |
| 505 | 521 | |
| 506 | 522 | /* basic machine hardware */ |
| 507 | MDRV_CPU_ADD_TAG("main", TMS34010, | |
| 523 | MDRV_CPU_ADD_TAG("main", TMS34010, | |
| 508 | 524 | MDRV_CPU_CONFIG(tms_config) |
| 509 | 525 | MDRV_CPU_PROGRAM_MAP(lethalj_map,0) |
| 510 | 526 | |
| 511 | 527 | /* video hardware */ |
| 512 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | |
| 528 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | |
| 513 | 529 | MDRV_PALETTE_LENGTH(32768) |
| 514 | 530 | |
| 515 | 531 | MDRV_SCREEN_ADD("main", 0) |
| r1527 | r1528 | |
| 522 | 538 | /* sound hardware */ |
| 523 | 539 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 524 | 540 | |
| 525 | MDRV_SOUND_ADD(OKIM6295, | |
| 541 | MDRV_SOUND_ADD(OKIM6295, SOUND_CLOCK) | |
| 526 | 542 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) |
| 527 | 543 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 528 | 544 | |
| 529 | MDRV_SOUND_ADD(OKIM6295, | |
| 545 | MDRV_SOUND_ADD(OKIM6295, SOUND_CLOCK) | |
| 530 | 546 | MDRV_SOUND_CONFIG(okim6295_interface_region_2_pin7high) |
| 531 | 547 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 532 | 548 | |
| 533 | MDRV_SOUND_ADD(OKIM6295, | |
| 549 | MDRV_SOUND_ADD(OKIM6295, SOUND_CLOCK) | |
| 534 | 550 | MDRV_SOUND_CONFIG(okim6295_interface_region_3_pin7high) |
| 535 | 551 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 536 | 552 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
| 654 | 670 | ROM_END |
| 655 | 671 | |
| 656 | 672 | |
| 657 | ROM_START( cclown ) | |
| 673 | ROM_START( cclownz ) | |
| 658 | 674 | ROM_REGION16_LE( 0x100000, REGION_USER1, 0 ) /* 34010 code */ |
| 659 | 675 | ROM_LOAD16_BYTE( "cc-v1-vc8.bin", 0x000000, 0x080000, CRC(433fe6ac) SHA1(dea7aede9882ee52be88927418b7395418757d12) ) |
| 660 | 676 | ROM_LOAD16_BYTE( "cc-v1-vc9.bin", 0x000001, 0x080000, CRC(9d1b3dae) SHA1(44a97c38bc9685e97721722c67505832fa06b44d) ) |
| r1527 | r1528 | |
| 685 | 701 | /* 25 / 26 are secure? */ |
| 686 | 702 | ROM_END |
| 687 | 703 | |
| 704 | ||
| 688 | 705 | ROM_START( ripribit ) |
| 689 | 706 | ROM_REGION16_LE( 0x100000, REGION_USER1, 0 ) /* 34010 code */ |
| 690 | 707 | ROM_LOAD16_BYTE( "rr_v2-84-vc8.bin", 0x000000, 0x080000, CRC(5ecc432d) SHA1(073062528fbcf63be7e3c6695d60d048430f6e4b) ) |
| r1527 | r1528 | |
| 716 | 733 | /* 25 / 26 are secure? */ |
| 717 | 734 | ROM_END |
| 718 | 735 | |
| 736 | ||
| 719 | 737 | ROM_START( cfarm ) |
| 720 | 738 | ROM_REGION16_LE( 0x100000, REGION_USER1, 0 ) /* 34010 code */ |
| 721 | 739 | ROM_LOAD16_BYTE( "cf-v2-vc8.bin", 0x000000, 0x080000, CRC(93bcf145) SHA1(134ac3ee4fd837f56fb0b338289cf03108346539) ) |
| r1527 | r1528 | |
| 751 | 769 | |
| 752 | 770 | /************************************* |
| 753 | 771 | * |
| 772 | * Driver-specific initialization | |
| 773 | * | |
| 774 | *************************************/ | |
| 775 | ||
| 776 | static DRIVER_INIT( ripribit ) | |
| 777 | { | |
| 778 | ticket_dispenser_init(200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); | |
| 779 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x04100010, 0x0410001f, 0, 0, ripribit_control_w); | |
| 780 | } | |
| 781 | ||
| 782 | ||
| 783 | static DRIVER_INIT( cfarm ) | |
| 784 | { | |
| 785 | ticket_dispenser_init(200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); | |
| 786 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x04100010, 0x0410001f, 0, 0, cfarm_control_w); | |
| 787 | } | |
| 788 | ||
| 789 | ||
| 790 | static DRIVER_INIT( cclownz ) | |
| 791 | { | |
| 792 | ticket_dispenser_init(200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); | |
| 793 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x04100010, 0x0410001f, 0, 0, cclownz_control_w); | |
| 794 | } | |
| 795 | ||
| 796 | ||
| 797 | ||
| 798 | /************************************* | |
| 799 | * | |
| 754 | 800 | * Game drivers |
| 755 | 801 | * |
| 756 | 802 | *************************************/ |
| 757 | 803 | |
| 758 | GAME( 1996, lethalj, 0, lethalj, lethalj, 0, ROT0, "The Game Room", "Lethal Justice", 0 ) | |
| 759 | GAME( 1997, eggventr, 0, gameroom, eggventr, 0, ROT0, "The Game Room", "Egg Venture (Release 10)", 0 ) | |
| 760 | GAME( 1997, eggvent7, eggventr, gameroom, eggventr, 0, ROT0, "The Game Room", "Egg Venture (Release 7)", 0 ) | |
| 761 | GAME( 1997, eggvntdx, eggventr, gameroom, eggvntdx, 0, ROT0, "The Game Room", "Egg Venture Deluxe", 0 ) | |
| 762 | GAME( 1997, ripribit, 0, gameroom, ripribit, 0, ROT0, "LAI Games", "Ripper Ribbit (Version 2.8.4)", GAME_NOT_WORKING ) | |
| 763 | GAME( 1999, cfarm, 0, gameroom, laigames, 0, ROT90, "LAI Games", "Chicken Farm (Version 2.0)", GAME_NOT_WORKING ) | |
| 764 | GAME( 1999, cclown, 0, gameroom, laigames, 0, ROT0, "LAI Games", "Crazzy Clownz (Version 1.0)", GAME_NOT_WORKING ) | |
| 804 | GAME( 1996, lethalj, 0, lethalj, lethalj, 0, ROT0, "The Game Room", "Lethal Justice", 0 ) | |
| 805 | GAME( 1997, eggventr, 0, gameroom, eggventr, 0, ROT0, "The Game Room", "Egg Venture (Release 10)", 0 ) | |
| 806 | GAME( 1997, eggvent7, eggventr, gameroom, eggventr, 0, ROT0, "The Game Room", "Egg Venture (Release 7)", 0 ) | |
| 807 | GAME( 1997, eggvntdx, eggventr, gameroom, eggvntdx, 0, ROT0, "The Game Room", "Egg Venture Deluxe", 0 ) | |
| 808 | GAME( 1997, ripribit, 0, gameroom, ripribit, ripribit, ROT0, "LAI Games", "Ripper Ribbit (Version 2.8.4)", 0 ) | |
| 809 | GAME( 1999, cfarm, 0, gameroom, cfarm, cfarm, ROT90, "LAI Games", "Chicken Farm (Version 2.0)", 0 ) | |
| 810 | GAME( 1999, cclownz, 0, gameroom, cclownz, cclownz, ROT0, "LAI Games", "Crazzy Clownz (Version 1.0)", 0 ) |
| r1527 | r1528 | |
|---|---|---|
| 272 | 272 | |
| 273 | 273 | /******************************************************************************/ |
| 274 | 274 | |
| 275 | /* Parameters: YM3812 frequency, Oki frequency, Oki memory region */ | |
| 276 | SEIBU_SOUND_SYSTEM_YM3812_HARDWARE | |
| 277 | SEIBU_SOUND_SYSTEM_YM2151_HARDWARE | |
| 278 | ||
| 279 | 275 | static MACHINE_DRIVER_START( dcon ) |
| 280 | 276 | |
| 281 | 277 | /* basic machine hardware */ |
| r1527 | r1528 | |
|---|---|---|
| 668 | 668 | MDRV_CPU_VBLANK_INT(irq6_line_hold,1) |
| 669 | 669 | MDRV_CPU_PERIODIC_INT(kickgoal_interrupt, 240) |
| 670 | 670 | |
| 671 | MDRV_CPU_ADD(PIC16C57, | |
| 671 | MDRV_CPU_ADD(PIC16C57, | |
| 672 | 672 | MDRV_CPU_FLAGS(CPU_DISABLE) /* Disables since the internal rom isn't dumped */ |
| 673 | 673 | /* Program and Data Maps are internal to the MCU */ |
| 674 | 674 | MDRV_CPU_IO_MAP(kickgoal_sound_io_map, 0) |
| r1527 | r1528 | |
| 703 | 703 | MDRV_CPU_PROGRAM_MAP(kickgoal_program_map, 0) |
| 704 | 704 | MDRV_CPU_VBLANK_INT(irq6_line_hold,1) |
| 705 | 705 | |
| 706 | MDRV_CPU_ADD(PIC16C57, | |
| 706 | MDRV_CPU_ADD(PIC16C57, | |
| 707 | 707 | MDRV_CPU_FLAGS(CPU_DISABLE) /* Disables since the internal rom isn't dumped */ |
| 708 | 708 | /* Program and Data Maps are internal to the MCU */ |
| 709 | 709 | MDRV_CPU_IO_MAP(actionhw_io_map, 0) |
| r1527 | r1528 | |
|---|---|---|
| 463 | 463 | #include "sound/2203intf.h" |
| 464 | 464 | #include "sound/3812intf.h" |
| 465 | 465 | #include "sound/okim6295.h" |
| 466 | #include <math.h> | |
| 467 | 466 | |
| 468 | 467 | |
| 469 | 468 | #define FULL_LOGGING 0 |
| r1527 | r1528 | |
| 538 | 537 | * |
| 539 | 538 | *************************************/ |
| 540 | 539 | |
| 541 | void itech8_update_interrupts(int periodic, int tms34061, int blitter) | |
| 540 | void itech8_update_interrupts(running_machine *machine, int periodic, int tms34061, int blitter) | |
| 542 | 541 | { |
| 543 | 542 | /* update the states */ |
| 544 | 543 | if (periodic != -1) periodic_int = periodic; |
| r1527 | r1528 | |
| 546 | 545 | if (blitter != -1) blitter_int = blitter; |
| 547 | 546 | |
| 548 | 547 | /* handle the 6809 case */ |
| 549 | if ( | |
| 548 | if (machine->drv->cpu[0].type == CPU_M6809) | |
| 550 | 549 | { |
| 551 | 550 | /* just modify lines that have changed */ |
| 552 | 551 | if (periodic != -1) cpunum_set_input_line(0, INPUT_LINE_NMI, periodic ? ASSERT_LINE : CLEAR_LINE); |
| r1527 | r1528 | |
| 582 | 581 | static INTERRUPT_GEN( generate_nmi ) |
| 583 | 582 | { |
| 584 | 583 | /* signal the NMI */ |
| 585 | itech8_update_interrupts(1, -1, -1); | |
| 586 | itech8_update_interrupts(0, -1, -1); | |
| 584 | itech8_update_interrupts(machine, 1, -1, -1); | |
| 585 | itech8_update_interrupts(machine, 0, -1, -1); | |
| 587 | 586 | |
| 588 | 587 | if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", video_screen_get_vpos(0)); |
| 589 | 588 | } |
| r1527 | r1528 | |
| 1774 | 1773 | |
| 1775 | 1774 | /* video hardware */ |
| 1776 | 1775 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_BEFORE_VBLANK) |
| 1777 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1778 | MDRV_SCREEN_SIZE(512, 263) | |
| 1779 | MDRV_PALETTE_LENGTH(256) | |
| 1780 | ||
| 1781 | 1776 | MDRV_VIDEO_START(itech8) |
| 1782 | 1777 | |
| 1778 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 1779 | MDRV_SCREEN_SIZE(512, 263) | |
| 1780 | ||
| 1783 | 1781 | /* sound hardware */ |
| 1784 | 1782 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1785 | 1783 |
| r1527 | r1528 | |
|---|---|---|
| 691 | 691 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* IRQ generated by ??? */ |
| 692 | 692 | /* NMI generated by the main CPU */ |
| 693 | 693 | |
| 694 | MDRV_CPU_ADD(M68705,4000000 | |
| 694 | MDRV_CPU_ADD(M68705,4000000 | |
| 695 | 695 | MDRV_CPU_PROGRAM_MAP(flstory_m68705_map,0) |
| 696 | 696 | |
| 697 | 697 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 738 | 738 | MDRV_CPU_PROGRAM_MAP(sound_map,0) |
| 739 | 739 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* IRQ generated by ??? */ |
| 740 | 740 | /* NMI generated by the main CPU */ |
| 741 | // MDRV_CPU_ADD(M68705,4000000 | |
| 741 | // MDRV_CPU_ADD(M68705,4000000 | |
| 742 | 742 | // MDRV_CPU_PROGRAM_MAP(m68705_readmem,m68705_writemem) |
| 743 | 743 | |
| 744 | 744 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 785 | 785 | MDRV_CPU_PROGRAM_MAP(sound_map,0) |
| 786 | 786 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* IRQ generated by ??? */ |
| 787 | 787 | /* NMI generated by the main CPU */ |
| 788 | // MDRV_CPU_ADD(M68705,4000000 | |
| 788 | // MDRV_CPU_ADD(M68705,4000000 | |
| 789 | 789 | // MDRV_CPU_PROGRAM_MAP(m68705_readmem,m68705_writemem) |
| 790 | 790 | |
| 791 | 791 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 124 | 124 | |
| 125 | 125 | static ADDRESS_MAP_START( strnskil_readmem2, ADDRESS_SPACE_PROGRAM, 8 ) |
| 126 | 126 | AM_RANGE(0x0000, 0x5fff) AM_READ(MRA8_ROM) |
| 127 | AM_RANGE(0xc000, 0xc7ff) AM_READ( | |
| 127 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8 | |
| 128 | 128 | AM_RANGE(0xc800, 0xcfff) AM_READ(MRA8_RAM) |
| 129 | 129 | ADDRESS_MAP_END |
| 130 | 130 |
| r1527 | r1528 | |
|---|---|---|
| 53 | 53 | #include "atetris.h" |
| 54 | 54 | #include "sound/sn76496.h" |
| 55 | 55 | #include "sound/pokey.h" |
| 56 | #include "state.h" | |
| 56 | 57 | |
| 57 | 58 | |
| 58 | #define ATARI_CLOCK_14MHz 14318180 | |
| 59 | #define MASTER_CLOCK XTAL_14_31818MHz | |
| 60 | #define BOOTLEG_CLOCK XTAL_14_7456MHz | |
| 59 | 61 | |
| 60 | 62 | |
| 61 | 63 | /* Local variables */ |
| 62 | 64 | static UINT8 *slapstic_source; |
| 63 | 65 | static UINT8 *slapstic_base; |
| 64 | 66 | static UINT8 current_bank; |
| 65 | ||
| 66 | 67 | static UINT8 nvram_write_enable; |
| 68 | static emu_timer *interrupt_timer; | |
| 67 | 69 | |
| 68 | 70 | |
| 69 | 71 | |
| r1527 | r1528 | |
| 84 | 86 | scanline += 32; |
| 85 | 87 | if (scanline >= 256) |
| 86 | 88 | scanline -= 256; |
| 87 | timer_s | |
| 89 | timer_adjus | |
| 88 | 90 | } |
| 89 | 91 | |
| 90 | 92 | |
| r1527 | r1528 | |
| 101 | 103 | * |
| 102 | 104 | *************************************/ |
| 103 | 105 | |
| 106 | static void reset_bank(void) | |
| 107 | { | |
| 108 | memcpy(slapstic_base, &slapstic_source[current_bank * 0x4000], 0x4000); | |
| 109 | } | |
| 110 | ||
| 111 | ||
| 112 | static MACHINE_START( atetris ) | |
| 113 | { | |
| 114 | /* Allocate interrupt timer */ | |
| 115 | interrupt_timer = timer_alloc(interrupt_gen, NULL); | |
| 116 | ||
| 117 | /* Set up save state */ | |
| 118 | state_save_register_global(current_bank); | |
| 119 | state_save_register_global(nvram_write_enable); | |
| 120 | state_save_register_func_postload(reset_bank); | |
| 121 | } | |
| 122 | ||
| 123 | ||
| 104 | 124 | static MACHINE_RESET( atetris ) |
| 105 | 125 | { |
| 106 | 126 | /* reset the slapstic */ |
| 107 | 127 | slapstic_reset(); |
| 108 | 128 | current_bank = slapstic_bank() & 1; |
| 109 | | |
| 129 | re | |
| 110 | 130 | |
| 111 | 131 | /* start interrupts going (32V clocked by 16V) */ |
| 112 | timer_s | |
| 132 | timer_adjus | |
| 113 | 133 | } |
| 114 | 134 | |
| 115 | 135 | |
| r1527 | r1528 | |
| 177 | 197 | * |
| 178 | 198 | *************************************/ |
| 179 | 199 | |
| 200 | /* full address map derived from schematics */ | |
| 180 | 201 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 181 | 202 | AM_RANGE(0x0000, 0x0fff) AM_RAM |
| 182 | 203 | AM_RANGE(0x1000, 0x1fff) AM_READWRITE(MRA8_RAM, atetris_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 183 | AM_RANGE(0x2000, 0x20ff) AM_READWRITE(MRA8_RAM, paletteram_RRRGGGBB_w) AM_BASE(&paletteram) | |
| 184 | AM_RANGE(0x2400, 0x25ff) AM_READWRITE(MRA8_RAM, nvram_w) AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 185 | AM_RANGE(0x2800, 0x280f) AM_READWRITE(pokey1_r, pokey1_w) | |
| 186 | AM_RANGE(0x2810, 0x281f) AM_READWRITE(pokey2_r, pokey2_w) | |
| 187 | AM_RANGE(0x3000, 0x3000) AM_WRITE(watchdog_reset_w) | |
| 188 | AM_RANGE(0x3400, 0x3400) AM_WRITE(nvram_enable_w) | |
| 189 | AM_RANGE(0x3800, 0x3800) AM_WRITE(irq_ack_w) | |
| 190 | AM_RANGE(0x3c00, 0x3c00) AM_WRITE(coincount_w) | |
| 204 | AM_RANGE(0x2000, 0x20ff) AM_MIRROR(0x0300) AM_READWRITE(MRA8_RAM, paletteram_RRRGGGBB_w) AM_BASE(&paletteram) | |
| 205 | AM_RANGE(0x2400, 0x25ff) AM_MIRROR(0x0200) AM_READWRITE(MRA8_RAM, nvram_w) AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 206 | AM_RANGE(0x2800, 0x280f) AM_MIRROR(0x03e0) AM_READWRITE(pokey1_r, pokey1_w) | |
| 207 | AM_RANGE(0x2810, 0x281f) AM_MIRROR(0x03e0) AM_READWRITE(pokey2_r, pokey2_w) | |
| 208 | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_WRITE(watchdog_reset_w) | |
| 209 | AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_WRITE(nvram_enable_w) | |
| 210 | AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x03ff) AM_WRITE(irq_ack_w) | |
| 211 | AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE(coincount_w) | |
| 191 | 212 | AM_RANGE(0x4000, 0x5fff) AM_ROM |
| 192 | 213 | AM_RANGE(0x6000, 0x7fff) AM_READ(atetris_slapstic_r) |
| 193 | 214 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| r1527 | r1528 | |
| 330 | 351 | static MACHINE_DRIVER_START( atetris ) |
| 331 | 352 | |
| 332 | 353 | /* basic machine hardware */ |
| 333 | MDRV_CPU_ADD(M6502,AT | |
| 354 | MDRV_CPU_ADD(M6502,MASTER | |
| 334 | 355 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 335 | 356 | |
| 357 | MDRV_MACHINE_START(atetris) | |
| 336 | 358 | MDRV_MACHINE_RESET(atetris) |
| 337 | 359 | MDRV_NVRAM_HANDLER(generic_1fill) |
| 338 | 360 | |
| r1527 | r1528 | |
| 345 | 367 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 346 | 368 | /* note: these parameters are from published specs, not derived */ |
| 347 | 369 | /* the board uses an SOS-2 chip to generate video signals */ |
| 348 | MDRV_SCREEN_RAW_PARAMS(AT | |
| 370 | MDRV_SCREEN_RAW_PARAMS(MASTER | |
| 349 | 371 | |
| 350 | 372 | MDRV_VIDEO_START(atetris) |
| 351 | 373 | MDRV_VIDEO_UPDATE(atetris) |
| r1527 | r1528 | |
| 353 | 375 | /* sound hardware */ |
| 354 | 376 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 355 | 377 | |
| 356 | MDRV_SOUND_ADD(POKEY, AT | |
| 378 | MDRV_SOUND_ADD(POKEY, MASTER | |
| 357 | 379 | MDRV_SOUND_CONFIG(pokey_interface_1) |
| 358 | 380 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 359 | 381 | |
| 360 | MDRV_SOUND_ADD(POKEY, AT | |
| 382 | MDRV_SOUND_ADD(POKEY, MASTER | |
| 361 | 383 | MDRV_SOUND_CONFIG(pokey_interface_2) |
| 362 | 384 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 363 | 385 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
| 366 | 388 | static MACHINE_DRIVER_START( atetrsb2 ) |
| 367 | 389 | |
| 368 | 390 | /* basic machine hardware */ |
| 369 | MDRV_CPU_ADD(M6502, | |
| 391 | MDRV_CPU_ADD(M6502,BOOTLEG_CLOCK/8) | |
| 370 | 392 | MDRV_CPU_PROGRAM_MAP(atetrsb2_map,0) |
| 371 | 393 | |
| 372 | 394 | MDRV_SCREEN_REFRESH_RATE(60) |
| 373 | 395 | |
| 396 | MDRV_MACHINE_START(atetris) | |
| 374 | 397 | MDRV_MACHINE_RESET(atetris) |
| 375 | 398 | MDRV_NVRAM_HANDLER(generic_1fill) |
| 376 | 399 | |
| r1527 | r1528 | |
| 383 | 406 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 384 | 407 | /* note: these parameters are from published specs, not derived */ |
| 385 | 408 | /* the board uses an SOS-2 chip to generate video signals */ |
| 386 | MDRV_SCREEN_RAW_PARAMS(AT | |
| 409 | MDRV_SCREEN_RAW_PARAMS(MASTER | |
| 387 | 410 | |
| 388 | 411 | MDRV_VIDEO_START(atetris) |
| 389 | 412 | MDRV_VIDEO_UPDATE(atetris) |
| r1527 | r1528 | |
| 391 | 414 | /* sound hardware */ |
| 392 | 415 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 393 | 416 | |
| 394 | MDRV_SOUND_ADD(SN76496, | |
| 417 | MDRV_SOUND_ADD(SN76496, BOOTLEG_CLOCK/8) | |
| 395 | 418 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 396 | 419 | |
| 397 | MDRV_SOUND_ADD(SN76496, | |
| 420 | MDRV_SOUND_ADD(SN76496, BOOTLEG_CLOCK/8) | |
| 398 | 421 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 399 | 422 | |
| 400 | MDRV_SOUND_ADD(SN76496, | |
| 423 | MDRV_SOUND_ADD(SN76496, BOOTLEG_CLOCK/8) | |
| 401 | 424 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 402 | 425 | MACHINE_DRIVER_END |
| 403 | 426 | |
| r1527 | r1528 | |
| 496 | 519 | * |
| 497 | 520 | *************************************/ |
| 498 | 521 | |
| 499 | GAME( 1988, atetris, 0, atetris, atetris, atetris, ROT0, "Atari Games", "Tetris (set 1)", 0 ) | |
| 500 | GAME( 1988, atetrisa, atetris, atetris, atetris, atetris, ROT0, "Atari Games", "Tetris (set 2)", 0 ) | |
| 501 | GAME( 1988, atetrisb, atetris, atetris, atetris, atetris, ROT0, "bootleg", "Tetris (bootleg set 1)", 0 ) | |
| 502 | GAME( 1988, atetrsb2, atetris, atetrsb2, atetris, atetris, ROT0, "bootleg", "Tetris (bootleg set 2)", 0 ) | |
| 503 | GAME( 1989, atetcktl, atetris, atetris, atetcktl, atetris, ROT270, "Atari Games", "Tetris (Cocktail set 1)", 0 ) | |
| 504 | GAME( 1989, atetckt2, atetris, atetris, atetcktl, atetris, ROT270, "Atari Games", "Tetris (Cocktail set 2)", 0 ) | |
| 522 | GAME( 1988, atetris, 0, atetris, atetris, atetris, ROT0, "Atari Games", "Tetris (set 1)", GAME_SUPPORTS_SAVE ) | |
| 523 | GAME( 1988, atetrisa, atetris, atetris, atetris, atetris, ROT0, "Atari Games", "Tetris (set 2)", GAME_SUPPORTS_SAVE ) | |
| 524 | GAME( 1988, atetrisb, atetris, atetris, atetris, atetris, ROT0, "bootleg", "Tetris (bootleg set 1)", GAME_SUPPORTS_SAVE ) | |
| 525 | GAME( 1988, atetrsb2, atetris, atetrsb2, atetris, atetris, ROT0, "bootleg", "Tetris (bootleg set 2)", GAME_SUPPORTS_SAVE ) | |
| 526 | GAME( 1989, atetcktl, atetris, atetris, atetcktl, atetris, ROT270, "Atari Games", "Tetris (Cocktail set 1)", GAME_SUPPORTS_SAVE ) | |
| 527 | GAME( 1989, atetckt2, atetris, atetris, atetcktl, atetris, ROT270, "Atari Games", "Tetris (Cocktail set 2)", GAME_SUPPORTS_SAVE ) |
| r1527 | r1528 | |
|---|---|---|
| 62 | 62 | |
| 63 | 63 | static ADDRESS_MAP_START( troangel_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 64 | 64 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) |
| 65 | AM_RANGE(0x8000, 0x87ff) AM_WRITE( | |
| 65 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8 | |
| 66 | 66 | // AM_RANGE(0x8800, 0x8fff) AM_WRITE(MWA8_RAM) |
| 67 | 67 | AM_RANGE(0x9000, 0x91ff) AM_WRITE(MWA8_RAM) AM_BASE(&troangel_scroll) |
| 68 | 68 | AM_RANGE(0xc820, 0xc8ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| r1527 | r1528 | |
| 200 | 200 | static MACHINE_DRIVER_START( troangel ) |
| 201 | 201 | |
| 202 | 202 | /* basic machine hardware */ |
| 203 | MDRV_CPU_ADD(Z80, 3 | |
| 203 | MDRV_CPU_ADD(Z80, XTAL_18_432MHz/6) /* verified on | |
| 204 | 204 | MDRV_CPU_PROGRAM_MAP(troangel_readmem,troangel_writemem) |
| 205 | 205 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 206 | 206 |
| r1527 | r1528 | |
|---|---|---|
| 1508 | 1508 | static DRIVER_INIT( nomnlnd ) |
| 1509 | 1509 | { |
| 1510 | 1510 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5000, 0x5001, 0, 0, nomnlnd_port_0_1_r); |
| 1511 | ||
| 1511 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x4800, 0, 0, MWA8_NOP); | |
| 1512 | 1512 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x4807, 0x4807, 0, 0, cosmic_background_enable_w); |
| 1513 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x480a, 0x480a, 0, 0, DAC_0_data_w); | |
| 1513 | 1514 | } |
| 1514 | 1515 | |
| 1515 | 1516 |
| r1527 | r1528 | |
|---|---|---|
| 33 | 33 | #include "sound/custom.h" |
| 34 | 34 | |
| 35 | 35 | |
| 36 | #define MASTER_CLOCK XTAL_28_63636MHz | |
| 37 | #define MCU_CLOCK XTAL_16MHz | |
| 36 | 38 | |
| 39 | ||
| 40 | ||
| 37 | 41 | /************************************* |
| 38 | 42 | * |
| 39 | 43 | * Master CPU memory handlers |
| r1527 | r1528 | |
| 334 | 338 | MDRV_CPU_PROGRAM_MAP(slave_map_program,0) |
| 335 | 339 | MDRV_CPU_IO_MAP(slave_map_io,0) |
| 336 | 340 | |
| 337 | MDRV_CPU_ADD_TAG("sound", I80186, 16 | |
| 341 | MDRV_CPU_ADD_TAG("sound", I80186, XTAL_16MHz | |
| 338 | 342 | /* audio CPU */ |
| 339 | 343 | MDRV_CPU_PROGRAM_MAP(leland_80186_map_program,0) |
| 340 | 344 | MDRV_CPU_IO_MAP(ataxx_80186_map_io,0) |
| r1527 | r1528 | |
|---|---|---|
| 104 | 104 | |
| 105 | 105 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 106 | 106 | AM_RANGE(0x0000, 0x5fff) AM_WRITE(MWA8_ROM) |
| 107 | AM_RANGE(0x8000, 0x83ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 108 | AM_RANGE(0x8400, 0x87ff) AM_WRITE(colorram_w) AM_BASE(&colorram) | |
| 107 | AM_RANGE(0x8000, 0x83ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 108 | AM_RANGE(0x8400, 0x87ff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram) | |
| 109 | 109 | AM_RANGE(0x8800, 0x88ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 110 | 110 | AM_RANGE(0x8900, 0x8bff) AM_WRITE(MWA8_RAM) |
| 111 | 111 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(shared1_w) AM_BASE(&sharedram1) |
| r1527 | r1528 | |
| 329 | 329 | MDRV_COLORTABLE_LENGTH(64*4+64*4) |
| 330 | 330 | |
| 331 | 331 | MDRV_PALETTE_INIT(wiping) |
| 332 | MDRV_VIDEO_START(generic) | |
| 333 | 332 | MDRV_VIDEO_UPDATE(wiping) |
| 334 | 333 | |
| 335 | 334 | /* sound hardware */ |
| r1527 | r1528 | |
|---|---|---|
| 47 | 47 | #include "sound/custom.h" |
| 48 | 48 | |
| 49 | 49 | |
| 50 | #define MASTER_CLOCK XTAL_12MHz | |
| 51 | #define VIDEO_CLOCK XTAL_14_31818MHz | |
| 52 | #define MCU_CLOCK XTAL_16MHz | |
| 53 | ||
| 54 | ||
| 55 | ||
| 50 | 56 | /************************************* |
| 51 | 57 | * |
| 52 | 58 | * Master CPU memory handlers |
| r1527 | r1528 | |
| 733 | 739 | static MACHINE_DRIVER_START( leland ) |
| 734 | 740 | |
| 735 | 741 | /* basic machine hardware */ |
| 736 | MDRV_CPU_ADD_TAG("master", Z80, | |
| 742 | MDRV_CPU_ADD_TAG("master", Z80, MASTER_CLOCK/2) | |
| 737 | 743 | MDRV_CPU_PROGRAM_MAP(master_map_program,0) |
| 738 | 744 | MDRV_CPU_IO_MAP(master_map_io,0) |
| 739 | 745 | MDRV_CPU_VBLANK_INT(leland_master_interrupt,1) |
| 740 | 746 | |
| 741 | MDRV_CPU_ADD_TAG("slave", Z80, | |
| 747 | MDRV_CPU_ADD_TAG("slave", Z80, MASTER_CLOCK/2) | |
| 742 | 748 | MDRV_CPU_PROGRAM_MAP(slave_small_map_program,0) |
| 743 | 749 | MDRV_CPU_IO_MAP(slave_map_io,0) |
| 744 | 750 | |
| r1527 | r1528 | |
| 781 | 787 | |
| 782 | 788 | /* basic machine hardware */ |
| 783 | 789 | MDRV_IMPORT_FROM(leland) |
| 784 | MDRV_CPU_ADD_TAG("sound", I80186, 16000000/2) | |
| 785 | /* audio CPU */ | |
| 790 | ||
| 791 | MDRV_CPU_ADD_TAG("sound", I80186, MCU_CLOCK) | |
| 786 | 792 | MDRV_CPU_PROGRAM_MAP(leland_80186_map_program,0) |
| 787 | 793 | MDRV_CPU_IO_MAP(redline_80186_map_io,0) |
| 788 | 794 | |
| r1527 | r1528 | |
| 797 | 803 | |
| 798 | 804 | /* basic machine hardware */ |
| 799 | 805 | MDRV_IMPORT_FROM(redline) |
| 806 | ||
| 800 | 807 | MDRV_CPU_MODIFY("sound") |
| 801 | 808 | MDRV_CPU_IO_MAP(leland_80186_map_io,0) |
| 802 | 809 | |
| r1527 | r1528 | |
| 811 | 818 | |
| 812 | 819 | /* basic machine hardware */ |
| 813 | 820 | MDRV_IMPORT_FROM(quarterb) |
| 821 | ||
| 814 | 822 | MDRV_CPU_MODIFY("slave") |
| 815 | 823 | MDRV_CPU_PROGRAM_MAP(slave_large_map_program,0) |
| 816 | 824 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
|---|---|---|
| 457 | 457 | { |
| 458 | 458 | if (activecpu_get_pc()==0xc0001592) |
| 459 | 459 | { |
| 460 | cpu_ | |
| 460 | activecpu_ea | |
| 461 | 461 | } |
| 462 | 462 | |
| 463 | 463 | return gstream_workram[0xd1ee0/4]; |
| r1527 | r1528 | |
|---|---|---|
| 442 | 442 | MDRV_CPU_IO_MAP(0,sound_writeport) |
| 443 | 443 | |
| 444 | 444 | /* ElSemi. Reversed the CPU order so the sound callback works with bballs */ |
| 445 | MDRV_CPU_ADD(M68705, 4000000 | |
| 445 | MDRV_CPU_ADD(M68705, 4000000 | |
| 446 | 446 | MDRV_CPU_PROGRAM_MAP(mcu_readmem,mcu_writemem) |
| 447 | 447 | |
| 448 | 448 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 1738 | 1738 | MDRV_CPU_PROGRAM_MAP(toaplan1_sound_map, 0) |
| 1739 | 1739 | MDRV_CPU_IO_MAP(demonwld_sound_io_map, 0) |
| 1740 | 1740 | |
| 1741 | MDRV_CPU_ADD(TMS32010, | |
| 1741 | MDRV_CPU_ADD(TMS32010, | |
| 1742 | 1742 | MDRV_CPU_PROGRAM_MAP(DSP_program_map,0) |
| 1743 | 1743 | MDRV_CPU_IO_MAP(DSP_io_map,0) |
| 1744 | 1744 |
| r1527 | r1528 | |
|---|---|---|
| 1043 | 1043 | MDRV_SOUND_ROUTE(3, "mono", 0.80) |
| 1044 | 1044 | MACHINE_DRIVER_END |
| 1045 | 1045 | |
| 1046 | SEIBU_SOUND_SYSTEM_YM2203_HARDWARE | |
| 1047 | 1046 | |
| 1048 | SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE | |
| 1049 | ||
| 1050 | ||
| 1051 | 1047 | static MACHINE_DRIVER_START( kothello ) |
| 1052 | 1048 | |
| 1053 | 1049 | /* basic machine hardware */ |
| r1527 | r1528 | |
|---|---|---|
| 2348 | 2348 | /* sound hardware */ |
| 2349 | 2349 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 2350 | 2350 | |
| 2351 | MDRV_SOUND_ADD(YM2151, 3579545) | |
| 2351 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) | |
| 2352 | 2352 | MDRV_SOUND_CONFIG(ym2151_interface_cbj) |
| 2353 | 2353 | MDRV_SOUND_ROUTE(0, "mono", 1.0) |
| 2354 | 2354 | MDRV_SOUND_ROUTE(1, "mono", 1.0) |
| 2355 | 2355 | MACHINE_DRIVER_END |
| 2356 | 2356 | |
| 2357 | ||
| 2357 | 2358 | static MACHINE_DRIVER_START( mia ) |
| 2358 | 2359 | |
| 2359 | 2360 | /* basic machine hardware */ |
| 2360 | MDRV_CPU_ADD(M68000, | |
| 2361 | MDRV_CPU_ADD(M68000, XTAL_24 | |
| 2361 | 2362 | MDRV_CPU_PROGRAM_MAP(mia_main_map,0) |
| 2362 | 2363 | MDRV_CPU_VBLANK_INT(irq5_line_hold,1) |
| 2363 | 2364 | |
| 2364 | MDRV_CPU_ADD(Z80, 3579545) | |
| 2365 | /* audio CPU */ /* 3.579545 MHz */ | |
| 2365 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) | |
| 2366 | 2366 | MDRV_CPU_PROGRAM_MAP(mia_audio_map,0) |
| 2367 | 2367 | |
| 2368 | 2368 | MDRV_SCREEN_REFRESH_RATE(60) |
| 2369 | 2369 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) |
| 2370 | 2370 | |
| 2371 | 2371 | /* video hardware */ |
| 2372 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | |
| 2372 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | |
| 2373 | 2373 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 2374 | 2374 | MDRV_SCREEN_SIZE(64*8, 32*8) |
| 2375 | 2375 | MDRV_SCREEN_VISIBLE_AREA(13*8, (64-13)*8-1, 2*8, 30*8-1 ) |
| r1527 | r1528 | |
| 2381 | 2381 | /* sound hardware */ |
| 2382 | 2382 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 2383 | 2383 | |
| 2384 | MDRV_SOUND_ADD(YM2151, 3579545) | |
| 2384 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) | |
| 2385 | 2385 | MDRV_SOUND_ROUTE(0, "mono", 1.0) |
| 2386 | 2386 | MDRV_SOUND_ROUTE(1, "mono", 1.0) |
| 2387 | 2387 | |
| 2388 | MDRV_SOUND_ADD(K007232, 3579545) | |
| 2388 | MDRV_SOUND_ADD(K007232, XTAL_3_579545MHz) | |
| 2389 | 2389 | MDRV_SOUND_CONFIG(k007232_interface) |
| 2390 | 2390 | MDRV_SOUND_ROUTE(0, "mono", 0.20) |
| 2391 | 2391 | MDRV_SOUND_ROUTE(1, "mono", 0.20) |
| r1527 | r1528 | |
| 2402 | 2402 | static MACHINE_DRIVER_START( tmnt ) |
| 2403 | 2403 | |
| 2404 | 2404 | /* basic machine hardware */ |
| 2405 | MDRV_CPU_ADD(M68000, | |
| 2405 | MDRV_CPU_ADD(M68000, XTAL_24 | |
| 2406 | 2406 | MDRV_CPU_PROGRAM_MAP(tmnt_main_map,0) |
| 2407 | 2407 | MDRV_CPU_VBLANK_INT(irq5_line_hold,1) |
| 2408 | 2408 | |
| 2409 | MDRV_CPU_ADD(Z80, 3579545) | |
| 2410 | /* audio CPU */ /* 3.579545 MHz */ | |
| 2409 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) | |
| 2411 | 2410 | MDRV_CPU_PROGRAM_MAP(tmnt_audio_map,0) |
| 2412 | 2411 | |
| 2413 | 2412 | MDRV_MACHINE_RESET(tmnt); |
| r1527 | r1528 | |
| 2428 | 2427 | /* sound hardware */ |
| 2429 | 2428 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 2430 | 2429 | |
| 2431 | MDRV_SOUND_ADD(YM2151, 3579545) | |
| 2430 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) | |
| 2432 | 2431 | MDRV_SOUND_ROUTE(0, "mono", 1.0) |
| 2433 | 2432 | MDRV_SOUND_ROUTE(1, "mono", 1.0) |
| 2434 | 2433 | |
| 2435 | MDRV_SOUND_ADD(K007232, 3579545) | |
| 2434 | MDRV_SOUND_ADD(K007232, XTAL_3_579545MHz) | |
| 2436 | 2435 | MDRV_SOUND_CONFIG(k007232_interface) |
| 2437 | 2436 | MDRV_SOUND_ROUTE(0, "mono", 0.20) |
| 2438 | 2437 | MDRV_SOUND_ROUTE(1, "mono", 0.20) |
| 2439 | 2438 | |
| 2440 | MDRV_SOUND_ADD(UPD7759, | |
| 2439 | MDRV_SOUND_ADD(UPD7759, X | |
| 2441 | 2440 | MDRV_SOUND_CONFIG(upd7759_interface) |
| 2442 | 2441 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) |
| 2443 | 2442 | |
| r1527 | r1528 | |
| 2450 | 2449 | static MACHINE_DRIVER_START( punkshot ) |
| 2451 | 2450 | |
| 2452 | 2451 | /* basic machine hardware */ |
| 2453 | MDRV_CPU_ADD(M68000, 12000000) /* CPU is 68000/12, but this doesn't necessarily mean it's */ | |
| 2454 | /* running at 12MHz. TMNT uses 8MHz */ | |
| 2452 | MDRV_CPU_ADD(M68000, XTAL_24MHz/2) | |
| 2455 | 2453 | MDRV_CPU_PROGRAM_MAP(punkshot_main_map,0) |
| 2456 | 2454 | MDRV_CPU_VBLANK_INT(punkshot_interrupt,1) |
| 2457 | 2455 | |
| 2458 | MDRV_CPU_ADD(Z80, 3579545) | |
| 2459 | /* audio CPU */ /* 3.579545 MHz */ | |
| 2456 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) | |
| 2460 | 2457 | MDRV_CPU_PROGRAM_MAP(punkshot_audio_map,0) |
| 2461 | 2458 | /* NMIs are generated by the 053260 */ |
| 2462 | 2459 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 2475 | 2472 | /* sound hardware */ |
| 2476 | 2473 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 2477 | 2474 | |
| 2478 | MDRV_SOUND_ADD(YM2151, 3579545) | |
| 2475 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) | |
| 2479 | 2476 | MDRV_SOUND_ROUTE(0, "mono", 1.0) |
| 2480 | 2477 | MDRV_SOUND_ROUTE(1, "mono", 1.0) |
| 2481 | 2478 | |
| 2482 | MDRV_SOUND_ADD(K053260, 3579545) | |
| 2479 | MDRV_SOUND_ADD(K053260, XTAL_3_579545MHz) | |
| 2483 | 2480 | MDRV_SOUND_CONFIG(k053260_interface) |
| 2484 | 2481 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) |
| 2485 | 2482 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
| 2488 | 2485 | static MACHINE_DRIVER_START( lgtnfght ) |
| 2489 | 2486 | |
| 2490 | 2487 | /* basic machine hardware */ |
| 2491 | MDRV_CPU_ADD(M68000, | |
| 2488 | MDRV_CPU_ADD(M68000, XTAL_24 | |
| 2492 | 2489 | MDRV_CPU_PROGRAM_MAP(lgtnfght_main_map,0) |
| 2493 | 2490 | MDRV_CPU_VBLANK_INT(lgtnfght_interrupt,1) |
| 2494 | 2491 | |
| 2495 | MDRV_CPU_ADD(Z80, 3579545) | |
| 2496 | /* audio CPU */ /* 3.579545 MHz */ | |
| 2492 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) | |
| 2497 | 2493 | MDRV_CPU_PROGRAM_MAP(lgtnfght_audio_map,0) |
| 2498 | 2494 | |
| 2499 | 2495 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 2512 | 2508 | /* sound hardware */ |
| 2513 | 2509 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 2514 | 2510 | |
| 2515 | MDRV_SOUND_ADD(YM2151, 3579545) | |
| 2511 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) | |
| 2516 | 2512 | MDRV_SOUND_ROUTE(0, "left", 1.0) |
| 2517 | 2513 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| 2518 | 2514 | |
| 2519 | MDRV_SOUND_ADD(K053260, 3579545) | |
| 2515 | MDRV_SOUND_ADD(K053260, XTAL_3_579545MHz) | |
| 2520 | 2516 | MDRV_SOUND_CONFIG(k053260_interface) |
| 2521 | 2517 | MDRV_SOUND_ROUTE(0, "left", 0.70) |
| 2522 | 2518 | MDRV_SOUND_ROUTE(1, "right", 0.70) |
| r1527 | r1528 | |
| 2530 | 2526 | MDRV_CPU_PROGRAM_MAP(blswhstl_main_map,0) |
| 2531 | 2527 | MDRV_CPU_VBLANK_INT(punkshot_interrupt,1) |
| 2532 | 2528 | |
| 2533 | MDRV_CPU_ADD(Z80, 3579545) | |
| 2534 | /* audio CPU */ /* ????? */ | |
| 2529 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) | |
| 2535 | 2530 | MDRV_CPU_PROGRAM_MAP(ssriders_audio_map,0) |
| 2536 | 2531 | /* NMIs are generated by the 053260 */ |
| 2537 | 2532 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 2553 | 2548 | /* sound hardware */ |
| 2554 | 2549 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 2555 | 2550 | |
| 2556 | MDRV_SOUND_ADD(YM2151, 3579545) | |
| 2551 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) | |
| 2557 | 2552 | MDRV_SOUND_ROUTE(0, "left", 1.0) |
| 2558 | 2553 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| 2559 | 2554 | |
| 2560 | MDRV_SOUND_ADD(K053260, 3579545) | |
| 2555 | MDRV_SOUND_ADD(K053260, XTAL_3_579545MHz) | |
| 2561 | 2556 | MDRV_SOUND_CONFIG(k053260_interface) |
| 2562 | 2557 | MDRV_SOUND_ROUTE(0, "right", 0.75) /* fixed inverted stereo channels */ |
| 2563 | 2558 | MDRV_SOUND_ROUTE(1, "left", 0.75) |
| r1527 | r1528 | |
| 2588 | 2583 | MDRV_CPU_PROGRAM_MAP(glfgreat_main_map,0) |
| 2589 | 2584 | MDRV_CPU_VBLANK_INT(lgtnfght_interrupt,1) |
| 2590 | 2585 | |
| 2591 | MDRV_CPU_ADD(Z80, 3579545) | |
| 2592 | /* audio CPU */ /* ? */ | |
| 2586 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) | |
| 2593 | 2587 | MDRV_CPU_PROGRAM_MAP(glfgreat_audio_map,0) |
| 2594 | 2588 | /* NMIs are generated by the 053260 */ |
| 2595 | 2589 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 2609 | 2603 | /* sound hardware */ |
| 2610 | 2604 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 2611 | 2605 | |
| 2612 | MDRV_SOUND_ADD(K053260, 3579545) | |
| 2606 | MDRV_SOUND_ADD(K053260, XTAL_3_579545MHz) | |
| 2613 | 2607 | MDRV_SOUND_CONFIG(k053260_interface) |
| 2614 | 2608 | MDRV_SOUND_ROUTE(0, "left", 1.0) |
| 2615 | 2609 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| r1527 | r1528 | |
| 2668 | 2662 | static MACHINE_DRIVER_START( tmnt2 ) |
| 2669 | 2663 | |
| 2670 | 2664 | /* basic machine hardware */ |
| 2671 | MDRV_CPU_ADD(M68000, | |
| 2665 | MDRV_CPU_ADD(M68000, XTAL_32 | |
| 2672 | 2666 | MDRV_CPU_PROGRAM_MAP(tmnt2_main_map,0) |
| 2673 | 2667 | MDRV_CPU_VBLANK_INT(punkshot_interrupt,1) |
| 2674 | 2668 | |
| r1527 | r1528 | |
| 2698 | 2692 | /* sound hardware */ |
| 2699 | 2693 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 2700 | 2694 | |
| 2701 | MDRV_SOUND_ADD(YM2151, 3579545) | |
| 2695 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) | |
| 2702 | 2696 | MDRV_SOUND_ROUTE(0, "left", 1.0) |
| 2703 | 2697 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| 2704 | 2698 | |
| 2705 | MDRV_SOUND_ADD(K053260, 3579545) | |
| 2699 | MDRV_SOUND_ADD(K053260, XTAL_3_579545MHz) | |
| 2706 | 2700 | MDRV_SOUND_CONFIG(k053260_interface) |
| 2707 | 2701 | MDRV_SOUND_ROUTE(0, "left", 0.70) |
| 2708 | 2702 | MDRV_SOUND_ROUTE(1, "right", 0.70) |
| r1527 | r1528 | |
| 2712 | 2706 | static MACHINE_DRIVER_START( ssriders ) |
| 2713 | 2707 | |
| 2714 | 2708 | /* basic machine hardware */ |
| 2715 | MDRV_CPU_ADD(M68000, | |
| 2709 | MDRV_CPU_ADD(M68000, XTAL_32 | |
| 2716 | 2710 | MDRV_CPU_PROGRAM_MAP(ssriders_main_map,0) |
| 2717 | 2711 | MDRV_CPU_VBLANK_INT(punkshot_interrupt,1) |
| 2718 | 2712 | |
| r1527 | r1528 | |
| 2738 | 2732 | /* sound hardware */ |
| 2739 | 2733 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 2740 | 2734 | |
| 2741 | MDRV_SOUND_ADD(YM2151, 3579545) | |
| 2735 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) | |
| 2742 | 2736 | MDRV_SOUND_ROUTE(0, "left", 1.0) |
| 2743 | 2737 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| 2744 | 2738 | |
| 2745 | MDRV_SOUND_ADD(K053260, 3579545) | |
| 2739 | MDRV_SOUND_ADD(K053260, XTAL_3_579545MHz) | |
| 2746 | 2740 | MDRV_SOUND_CONFIG(k053260_interface) |
| 2747 | 2741 | MDRV_SOUND_ROUTE(0, "left", 0.75) |
| 2748 | 2742 | MDRV_SOUND_ROUTE(1, "right", 0.75) |
| r1527 | r1528 | |
| 2787 | 2781 | MDRV_CPU_PROGRAM_MAP(thndrx2_main_map,0) |
| 2788 | 2782 | MDRV_CPU_VBLANK_INT(punkshot_interrupt,1) |
| 2789 | 2783 | |
| 2790 | MDRV_CPU_ADD(Z80, 3579545) | |
| 2791 | /* audio CPU */ /* ????? */ | |
| 2784 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) | |
| 2792 | 2785 | MDRV_CPU_PROGRAM_MAP(thndrx2_audio_map,0) |
| 2793 | 2786 | /* NMIs are generated by the 053260 */ |
| 2794 | 2787 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 2809 | 2802 | /* sound hardware */ |
| 2810 | 2803 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 2811 | 2804 | |
| 2812 | MDRV_SOUND_ADD(YM2151, 3579545) | |
| 2805 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) | |
| 2813 | 2806 | MDRV_SOUND_ROUTE(0, "left", 1.0) |
| 2814 | 2807 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| 2815 | 2808 | |
| 2816 | MDRV_SOUND_ADD(K053260, 3579545) | |
| 2809 | MDRV_SOUND_ADD(K053260, XTAL_3_579545MHz) | |
| 2817 | 2810 | MDRV_SOUND_CONFIG(k053260_interface) |
| 2818 | 2811 | MDRV_SOUND_ROUTE(0, "left", 0.70) |
| 2819 | 2812 | MDRV_SOUND_ROUTE(1, "right", 0.70) |
| r1527 | r1528 | |
|---|---|---|
| 840 | 840 | MDRV_CPU_ADD(M68000, 8000000) |
| 841 | 841 | MDRV_CPU_PROGRAM_MAP(m68k_program_map, 0) |
| 842 | 842 | |
| 843 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 843 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 844 | 844 | MDRV_CPU_CONFIG(tms_config) |
| 845 | 845 | MDRV_CPU_PROGRAM_MAP(tms_program_map, 0) |
| 846 | 846 |
| r1527 | r1528 | |
|---|---|---|
| 1496 | 1496 | |
| 1497 | 1497 | static MACHINE_DRIVER_START( coh700 ) |
| 1498 | 1498 | /* basic machine hardware */ |
| 1499 | MDRV_CPU_ADD( PSXCPU, | |
| 1499 | MDRV_CPU_ADD( PSXCPU, XTAL_100 | |
| 1500 | 1500 | MDRV_CPU_PROGRAM_MAP( namcos12_map, 0 ) |
| 1501 | 1501 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 1502 | 1502 |
| r1527 | r1528 | |
|---|---|---|
| 2262 | 2262 | |
| 2263 | 2263 | |
| 2264 | 2264 | |
| 2265 | DRIVER_INIT(rdx_v33) | |
| 2265 | static DRIVER_INIT(rdx_v33) | |
| 2266 | 2266 | { |
| 2267 | 2267 | memory_set_bankptr(1,&memory_region(REGION_CPU1)[0x020000]); |
| 2268 | 2268 | memory_set_bankptr(2,&memory_region(REGION_CPU1)[0x030000]); |
| r1527 | r1528 | |
|---|---|---|
| 124 | 124 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) |
| 125 | 125 | AM_RANGE(0x8800, 0x8fff) AM_READ(pitnrun_videoram_r) |
| 126 | 126 | AM_RANGE(0x9000, 0x9fff) AM_READ(pitnrun_videoram2_r) |
| 127 | AM_RANGE(0xa000, 0xa0ff) AM_READ( | |
| 127 | AM_RANGE(0xa000, 0xa0ff) AM_READ(MRA8 | |
| 128 | 128 | AM_RANGE(0xa800, 0xa800) AM_READ(input_port_0_r) |
| 129 | 129 | AM_RANGE(0xb000, 0xb000) AM_READ(input_port_1_r) |
| 130 | 130 | AM_RANGE(0xb800, 0xb800) AM_READ(input_port_2_r) |
| r1527 | r1528 | |
| 138 | 138 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) |
| 139 | 139 | AM_RANGE(0x8800, 0x8fff) AM_WRITE(pitnrun_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 140 | 140 | AM_RANGE(0x9000, 0x9fff) AM_WRITE(pitnrun_videoram2_w) AM_BASE(&pitnrun_videoram2) |
| 141 | AM_RANGE(0xa000, 0xa0ff) AM_WRITE( | |
| 141 | AM_RANGE(0xa000, 0xa0ff) AM_WRITE(MWA8 | |
| 142 | 142 | AM_RANGE(0xa800, 0xa807) AM_WRITE(MWA8_NOP) /* Analog Sound */ |
| 143 | 143 | AM_RANGE(0xb000, 0xb000) AM_WRITE(nmi_enable_w) |
| 144 | 144 | AM_RANGE(0xb001, 0xb001) AM_WRITE(pitnrun_color_select_w) |
| r1527 | r1528 | |
| 298 | 298 | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) |
| 299 | 299 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 300 | 300 | |
| 301 | MDRV_CPU_ADD(M68705,3000000 | |
| 301 | MDRV_CPU_ADD(M68705,3000000 | |
| 302 | 302 | MDRV_CPU_PROGRAM_MAP(mcu_readmem,mcu_writemem) |
| 303 | 303 | |
| 304 | 304 | MDRV_MACHINE_RESET(pitnrun) |
| r1527 | r1528 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | 12 | #include "berzerk.h" |
| 13 | #include "exidy.h" | |
| 13 | 14 | #include "machine/74181.h" |
| 14 | 15 | #include "video/resnet.h" |
| 15 | 16 |
| r1527 | r1528 | |
|---|---|---|
| 20 | 20 | as USA (TSU) had an red stripe on the sticker. The intermixing |
| 21 | 21 | of TSE and TSU roms in the parent set is correct and verified. |
| 22 | 22 | Note: Euro set simply states the game cannot be operated in Japan.... |
| 23 | ||
| 24 | ToDo: | |
| 25 | - finish video driver | |
| 26 | Some attributes are unknown. I don't remember the original game but | |
| 27 | seems there are some problems: | |
| 28 | - misplaced sprites ? ( see beginning of level 1 or 2 for example ) | |
| 29 | - sprite / sprite priority ? ( see level 2 the reflectors ) | |
| 30 | - sprite / background priority ? ( see level 1: birds walk through | |
| 23 | Note: These issues have been verified on a real PCB and are not emulation bugs: | |
| 24 | - misplaced sprites ( see beginning of level 1 or 2 for example ) | |
| 25 | - sprite / sprite priority ( see level 2 the reflectors ) | |
| 26 | - sprite / background priority ( see level 1: birds walk through | |
| 31 | 27 | branches of different trees ) |
| 32 | - see the beginning of level 3: | |
| 28 | - see the beginning of level 3: | |
| 33 | 29 | |
| 30 | ToDo: | |
| 34 | 31 | - get rid of input port hack |
| 35 | 32 | |
| 36 | 33 | Controls appear to be mapped at 0xFE4000, alongside dip switches, but there |
| r1527 | r1528 | |
|---|---|---|
| 222 | 222 | #define SUPRRIDR_P1_CONTROL_PORT_TAG ("CONTP1") |
| 223 | 223 | #define SUPRRIDR_P2_CONTROL_PORT_TAG ("CONTP2") |
| 224 | 224 | |
| 225 | static UINT | |
| 225 | static CUSTOM_INPUT( | |
| 226 | 226 | { |
| 227 | 227 | UINT32 ret; |
| 228 | 228 |
| r1527 | r1528 | |
|---|---|---|
| 67 | 67 | |
| 68 | 68 | static ADDRESS_MAP_START( dynadice_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 69 | 69 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 70 | AM_RANGE(0x2000, 0x23ff) AM_WRITE(dynadice_videoram_w | |
| 70 | AM_RANGE(0x2000, 0x23ff) AM_READWRITE(MRA8_RAM, dynadice_videoram_w | |
| 71 | 71 | AM_RANGE(0x4000, 0x40ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 72 | 72 | ADDRESS_MAP_END |
| 73 | 73 |
| r1527 | r1528 | |
|---|---|---|
| 972 | 972 | MDRV_CPU_PROGRAM_MAP(bigtwin_main_map, 0) |
| 973 | 973 | MDRV_CPU_VBLANK_INT(irq2_line_hold,1) |
| 974 | 974 | |
| 975 | MDRV_CPU_ADD(PIC16C57, | |
| 975 | MDRV_CPU_ADD(PIC16C57, | |
| 976 | 976 | /* Program and Data Maps are internal to the MCU */ |
| 977 | 977 | MDRV_CPU_IO_MAP(playmark_sound_io_map, 0) |
| 978 | 978 | |
| r1527 | r1528 | |
| 1006 | 1006 | MDRV_CPU_PROGRAM_MAP(wbeachvl_main_map, 0) |
| 1007 | 1007 | MDRV_CPU_VBLANK_INT(irq2_line_hold,1) |
| 1008 | 1008 | |
| 1009 | // MDRV_CPU_ADD(PIC16C57, | |
| 1009 | // MDRV_CPU_ADD(PIC16C57, | |
| 1010 | 1010 | /* Program and Data Maps are internal to the MCU */ |
| 1011 | 1011 | // MDRV_CPU_IO_MAP(playmark_sound_io_map, 0) |
| 1012 | 1012 | |
| r1527 | r1528 | |
| 1041 | 1041 | MDRV_CPU_PROGRAM_MAP(excelsr_main_map, 0) |
| 1042 | 1042 | MDRV_CPU_VBLANK_INT(irq2_line_hold,1) |
| 1043 | 1043 | |
| 1044 | MDRV_CPU_ADD(PIC16C57, | |
| 1044 | MDRV_CPU_ADD(PIC16C57, | |
| 1045 | 1045 | /* Program and Data Maps are internal to the MCU */ |
| 1046 | 1046 | MDRV_CPU_IO_MAP(playmark_sound_io_map, 0) |
| 1047 | 1047 | |
| r1527 | r1528 | |
| 1074 | 1074 | MDRV_CPU_PROGRAM_MAP(hotmind_main_map, 0) |
| 1075 | 1075 | MDRV_CPU_VBLANK_INT(irq2_line_hold,1) |
| 1076 | 1076 | |
| 1077 | MDRV_CPU_ADD(PIC16C57, | |
| 1077 | MDRV_CPU_ADD(PIC16C57, | |
| 1078 | 1078 | /* Program and Data Maps are internal to the MCU */ |
| 1079 | 1079 | MDRV_CPU_IO_MAP(playmark_sound_io_map, 0) |
| 1080 | 1080 | |
| r1527 | r1528 | |
| 1109 | 1109 | MDRV_CPU_PROGRAM_MAP(hrdtimes_main_map, 0) |
| 1110 | 1110 | MDRV_CPU_VBLANK_INT(irq6_line_hold,1) |
| 1111 | 1111 | |
| 1112 | // MDRV_CPU_ADD(PIC16C57, | |
| 1112 | // MDRV_CPU_ADD(PIC16C57, | |
| 1113 | 1113 | /* Program and Data Maps are internal to the MCU */ |
| 1114 | 1114 | // MDRV_CPU_IO_MAP(playmark_sound_io_map, 0) |
| 1115 | 1115 |
| r1527 | r1528 | |
|---|---|---|
| 40 | 40 | AM_RANGE(0x0000, 0x9fff) AM_ROM |
| 41 | 41 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 42 | 42 | AM_RANGE(0xc800, 0xcfff) AM_RAM AM_SHARE(1) |
| 43 | AM_RANGE(0xd000, 0xd7ff) AM_R | |
| 43 | AM_RANGE(0xd000, 0xd7ff) AM_R | |
| 44 | 44 | AM_RANGE(0xe000, 0xe000) AM_READ(ikki_e000_r) |
| 45 | 45 | AM_RANGE(0xe001, 0xe001) AM_READ(input_port_0_r) /* dsw 1 */ |
| 46 | 46 | AM_RANGE(0xe002, 0xe002) AM_READ(input_port_1_r) /* dsw 2 */ |
| r1527 | r1528 | |
|---|---|---|
| 349 | 349 | static MACHINE_DRIVER_START( capbowl ) |
| 350 | 350 | |
| 351 | 351 | /* basic machine hardware */ |
| 352 | MDRV_CPU_ADD_TAG("main", M6809E, MASTER_CLOCK | |
| 352 | MDRV_CPU_ADD_TAG("main", M6809E, MASTER_CLOCK | |
| 353 | 353 | MDRV_CPU_PROGRAM_MAP(capbowl_map,0) |
| 354 | 354 | MDRV_CPU_VBLANK_INT(capbowl_interrupt,1) |
| 355 | 355 | |
| 356 | MDRV_CPU_ADD(M6809E, MASTER_CLOCK/4) | |
| 357 | 356 | /* audio CPU */ |
| 357 | MDRV_CPU_ADD(M6809E, MASTER_CLOCK) | |
| 358 | 358 | MDRV_CPU_PROGRAM_MAP(sound_map,0) |
| 359 | 359 | |
| 360 | MDRV_SCREEN_REFRESH_RATE(57) | |
| 361 | ||
| 362 | 360 | MDRV_MACHINE_RESET(capbowl) |
| 363 | 361 | MDRV_NVRAM_HANDLER(capbowl) |
| 364 | 362 | |
| 365 | 363 | /* video hardware */ |
| 366 | 364 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 367 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 368 | MDRV_SCREEN_SIZE(360, 256) | |
| 369 | MDRV_SCREEN_VISIBLE_AREA(0, 359, 0, 244) | |
| 370 | MDRV_PALETTE_LENGTH(4096) | |
| 371 | ||
| 372 | 365 | MDRV_VIDEO_START(capbowl) |
| 373 | 366 | MDRV_VIDEO_UPDATE(capbowl) |
| 374 | 367 | |
| 368 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 369 | MDRV_SCREEN_SIZE(360, 256) | |
| 370 | MDRV_SCREEN_VISIBLE_AREA(0, 359, 0, 244) | |
| 371 | MDRV_SCREEN_REFRESH_RATE(57) | |
| 372 | ||
| 375 | 373 | /* sound hardware */ |
| 376 | 374 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 377 | 375 |
| r1527 | r1528 | |
|---|---|---|
| 149 | 149 | static UINT16 coin_word=0; |
| 150 | 150 | |
| 151 | 151 | extern UINT16 *darius_fg_ram; |
| 152 | READ16_HANDLER ( darius_fg_layer_r ); | |
| 153 | 152 | WRITE16_HANDLER( darius_fg_layer_w ); |
| 154 | 153 | |
| 155 | static size_t sharedram_size; | |
| 156 | static UINT16 *sharedram; | |
| 157 | 154 | |
| 158 | ||
| 159 | static READ16_HANDLER( sharedram_r ) | |
| 160 | { | |
| 161 | return sharedram[offset]; | |
| 162 | } | |
| 163 | ||
| 164 | static WRITE16_HANDLER( sharedram_w ) | |
| 165 | { | |
| 166 | COMBINE_DATA(&sharedram[offset]); | |
| 167 | } | |
| 168 | ||
| 169 | 155 | static void parse_control( void ) /* assumes Z80 sandwiched between 68Ks */ |
| 170 | 156 | { |
| 171 | 157 | /* bit 0 enables cpu B */ |
| r1527 | r1528 | |
| 191 | 177 | watchdog_reset_w(0,data); |
| 192 | 178 | } |
| 193 | 179 | |
| 194 | static READ16_HANDLER( paletteram16_r ) | |
| 195 | { | |
| 196 | return paletteram16[offset]; | |
| 197 | } | |
| 198 | 180 | |
| 199 | ||
| 200 | 181 | /********************************************************** |
| 201 | 182 | GAME INPUTS |
| 202 | 183 | **********************************************************/ |
| r1527 | r1528 | |
| 272 | 253 | AM_RANGE(0x080000, 0x08ffff) AM_READ(MRA16_RAM) /* main RAM */ |
| 273 | 254 | AM_RANGE(0xc00000, 0xc0001f) AM_READ(darius_ioc_r) /* inputs, sound */ |
| 274 | 255 | AM_RANGE(0xd00000, 0xd0ffff) AM_READ(PC080SN_word_0_r) /* tilemaps */ |
| 275 | AM_RANGE(0xd80000, 0xd80fff) AM_READ(paletteram16_r) /* palette */ | |
| 276 | AM_RANGE(0xe00100, 0xe00fff) AM_READ(MRA16_RAM) /* sprite ram */ | |
| 277 | AM_RANGE(0xe01000, 0xe02fff) AM_READ(sharedram_r) | |
| 278 | AM_RANGE(0xe08000, 0xe0ffff) AM_READ(darius_fg_layer_r) /* front tilemap */ | |
| 256 | AM_RANGE(0xd80000, 0xd80fff) AM_READ(MRA16_RAM) /* palette */ | |
| 257 | AM_RANGE(0xe00100, 0xe00fff) AM_RAM AM_SHARE(1) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) | |
| 258 | AM_RANGE(0xe01000, 0xe02fff) AM_RAM AM_SHARE(2) | |
| 259 | AM_RANGE(0xe08000, 0xe0ffff) AM_READWRITE(MRA16_RAM, darius_fg_layer_w) AM_SHARE(3) AM_BASE(&darius_fg_ram) | |
| 279 | 260 | AM_RANGE(0xe10000, 0xe10fff) AM_READ(MRA16_RAM) /* ??? */ |
| 280 | 261 | ADDRESS_MAP_END |
| 281 | 262 | |
| r1527 | r1528 | |
| 290 | 271 | AM_RANGE(0xd40000, 0xd40003) AM_WRITE(PC080SN_xscroll_word_0_w) |
| 291 | 272 | AM_RANGE(0xd50000, 0xd50003) AM_WRITE(PC080SN_ctrl_word_0_w) |
| 292 | 273 | AM_RANGE(0xd80000, 0xd80fff) AM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16) |
| 293 | AM_RANGE(0xe00100, 0xe00fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) | |
| 294 | AM_RANGE(0xe01000, 0xe02fff) AM_WRITE(sharedram_w) AM_BASE(&sharedram) AM_SIZE(&sharedram_size) | |
| 295 | AM_RANGE(0xe08000, 0xe0ffff) AM_WRITE(darius_fg_layer_w) AM_BASE(&darius_fg_ram) | |
| 296 | 274 | AM_RANGE(0xe10000, 0xe10fff) AM_WRITE(MWA16_RAM) |
| 297 | 275 | ADDRESS_MAP_END |
| 298 | 276 | |
| 299 | 277 | static ADDRESS_MAP_START( darius_cpub_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 300 | 278 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) |
| 301 | 279 | AM_RANGE(0x040000, 0x04ffff) AM_READ(MRA16_RAM) /* local RAM */ |
| 302 | AM_RANGE(0xe01000, 0xe02fff) AM_READ(sharedram_r) | |
| 280 | AM_RANGE(0xe00100, 0xe00fff) AM_RAM AM_SHARE(1) | |
| 281 | AM_RANGE(0xe01000, 0xe02fff) AM_RAM AM_SHARE(2) | |
| 282 | AM_RANGE(0xe08000, 0xe0ffff) AM_READWRITE(MRA16_RAM, darius_fg_layer_w) AM_SHARE(3) | |
| 303 | 283 | ADDRESS_MAP_END |
| 304 | 284 | |
| 305 | 285 | static ADDRESS_MAP_START( darius_cpub_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r1527 | r1528 | |
| 307 | 287 | AM_RANGE(0x040000, 0x04ffff) AM_WRITE(MWA16_RAM) |
| 308 | 288 | AM_RANGE(0xc00000, 0xc0007f) AM_WRITE(darius_ioc_w) /* only writes $c00050 (?) */ |
| 309 | 289 | AM_RANGE(0xd80000, 0xd80fff) AM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) |
| 310 | AM_RANGE(0xe00100, 0xe00fff) AM_WRITE(spriteram16_w) /* some writes */ | |
| 311 | AM_RANGE(0xe01000, 0Xe02fff) AM_WRITE(sharedram_w) | |
| 312 | AM_RANGE(0xe08000, 0xe0ffff) AM_WRITE(darius_fg_layer_w) /* a few writes */ | |
| 313 | 290 | ADDRESS_MAP_END |
| 314 | 291 | |
| 315 | 292 |
| r1527 | r1528 | |
|---|---|---|
| 2 | 2 | 'Swinging Singles' by Ent. Ent. Ltd |
| 3 | 3 | driver by Tomasz Slanina |
| 4 | 4 | |
| 5 | ||
| 5 | 6 | Crap XXX game. |
| 6 | 7 | Three roms contains text "BY YACHIYO" |
| 7 | 8 | |
| 8 | 9 | Upper half of 7.bin = upper half of 8.bin = intentional or bad dump ? |
| 9 | 10 | |
| 10 | 11 | TODO: |
| 11 | - colors ( | |
| 12 | - colors ( | |
| 12 | 13 | - samples (at least two of unused roms contains samples (unkn. format , adpcm ?) |
| 13 | 14 | - dips (one is tested in game (difficulty related?), another 2 are tested at start) |
| 14 | 15 | |
| 15 | 16 | Unknown reads/writes: |
| 16 | 17 | - AY i/o ports (writes) |
| 17 | 18 | - mem $c000, $c001 = protection device ? if tests fails, game crashes (problems with stack - skipped code with "pop af") |
| 18 | - i/o port $8 = data read used for $e command arg for onr of AY chips (volume? - could be a sample player (based on volume changes?) | |
| 19 | - i/o port $1a = 1 or 0, rarely accessed | |
| 20 | - i/o ports $fe,$ff (pair, unknown device , $fe = register, $ff = data ?? sample player) | |
| 21 | initialized with data: | |
| 19 | - i/o port $8 = data read used for $e command arg for one of AY chips (volume? - could be a sample player (based on volume changes?) | |
| 20 | - i/o port $1a = 1 or 0, rarely accessed, related to crt writes | |
| 22 | 21 | |
| 23 | 0 34 | |
| 24 | 1 24 | |
| 25 | 2 2c | |
| 26 | 3 14 | |
| 27 | 4 f | |
| 28 | 5 0 | |
| 29 | 6 e | |
| 30 | 7 e | |
| 31 | 8 0 | |
| 32 | 9 f | |
| 33 | a 0 | |
| 34 | b 0 | |
| 35 | c 0 | |
| 36 | d 0 | |
| 37 | e 0 | |
| 38 | f 0 | |
| 39 | ||
| 40 | 22 | */ |
| 41 | 23 | |
| 42 | 24 | #include "driver.h" |
| 43 | 25 | #include "sound/ay8910.h" |
| 26 | #include "video/crtc6845.h" | |
| 44 | 27 | |
| 45 | static UINT8* ssingles_vram; | |
| 28 | static UINT8 *ssingles_videoram; | |
| 29 | static UINT8 *ssingles_colorram; | |
| 30 | static UINT8 prot_data; | |
| 46 | 31 | |
| 47 | static WRITE8_HANDLER(ssingles_vram_w) | |
| 32 | #define NUM_PENS (4*8) | |
| 33 | #define VMEM_SIZE 0x100 | |
| 34 | static pen_t pens[NUM_PENS]; | |
| 35 | ||
| 36 | //fake palette | |
| 37 | static const UINT8 ssingles_colors[NUM_PENS*3]= | |
| 48 | 38 | { |
| 49 | ssingles_vram[offset]=data; | |
| 50 | } | |
| 39 | 0x00,0x00,0x00, 0xff,0xff,0xff, 0xff,0x00,0x00, 0x80,0x00,0x00, | |
| 40 | 0x00,0x00,0x00, 0xf0,0xf0,0xf0, 0xff,0xff,0x00, 0x40,0x40,0x40, | |
| 41 | 0x00,0x00,0x00, 0xff,0xff,0xff, 0xff,0x00,0x00, 0xff,0xff,0x00, | |
| 42 | 0x00,0x00,0x00, 0xff,0xff,0x00, 0xd0,0x00,0x00, 0x80,0x00,0x00, | |
| 43 | 0x00,0x00,0x00, 0xff,0x00,0x00, 0xff,0xff,0x00, 0x80,0x80,0x00, | |
| 44 | 0x00,0x00,0x00, 0xff,0x00,0x00, 0x40,0x40,0x40, 0xd0,0xd0,0xd0, | |
| 45 | 0x00,0x00,0x00, 0x00,0x00,0xff, 0x60,0x40,0x30, 0xff,0xff,0x00, | |
| 46 | 0x00,0x00,0x00, 0xff,0x00,0xff, 0x80,0x00,0x80, 0x40,0x00,0x40 | |
| 47 | }; | |
| 51 | 48 | |
| 52 | static VIDEO_START(ssingles) | |
| 49 | static void update_row(mame_bitmap *bitmap, const rectangle *cliprect, | |
| 50 | UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, void *param) | |
| 53 | 51 | { |
| 54 | } | |
| 52 | int cx,x; | |
| 53 | UINT32 tile_address; | |
| 54 | UINT16 cell,palette; | |
| 55 | UINT8 b0,b1; | |
| 55 | 56 | |
| 56 | static VIDEO_UPDATE(ssingles) | |
| 57 | { | |
| 58 | int x,y; | |
| 59 | int addr=0; | |
| 60 | for(y=0;y<32;y++) | |
| 57 | for(cx=0;cx<x_count;++cx) | |
| 61 | 58 | { |
| 62 | for(x=0;x<18;x++) | |
| 59 | int address=((ma>>1)+(cx>>1))&0xff; | |
| 60 | ||
| 61 | cell=ssingles_videoram[address]+(ssingles_colorram[address]<<8); | |
| 62 | ||
| 63 | tile_address=((cell&0x3ff)<<4)+ra; | |
| 64 | palette=(cell>>10)&0x1c; | |
| 65 | ||
| 66 | if(cx&1) | |
| 63 | 67 | { |
| 64 | int code=ssingles_vram[addr]+256*(ssingles_vram[addr+0x800]&3); | |
| 65 | addr++; | |
| 68 | b0=memory_region(REGION_GFX1)[tile_address+0x0000]; /* 9.bin */ | |
| 69 | b1=memory_region(REGION_GFX1)[tile_address+0x8000]; /* 11.bin */ | |
| 70 | } | |
| 71 | else | |
| 72 | { | |
| 73 | b0=memory_region(REGION_GFX1)[tile_address+0x4000]; /* 10.bin */ | |
| 74 | b1=memory_region(REGION_GFX1)[tile_address+0xc000]; /* 12.bin */ | |
| 75 | } | |
| 66 | 76 | |
| 67 | drawgfx(bitmap,machine->gfx[0], | |
| 68 | code, | |
| 69 | 0, | |
| 70 | 0,0, | |
| 71 | x<<4, y<<4, | |
| 72 | 0,TRANSPARENCY_NONE,0); | |
| 77 | for(x=7;x>=0;--x) | |
| 78 | { | |
| 79 | *BITMAP_ADDR32(bitmap, y, (cx<<3)|(x)) = pens[palette+((b1&1)|((b0&1)<<1))]; | |
| 80 | b0>>=1; | |
| 81 | b1>>=1; | |
| 73 | 82 | } |
| 74 | 83 | } |
| 75 | return 0; | |
| 76 | 84 | } |
| 77 | 85 | |
| 78 | static | |
| 86 | static const crtc6845_inte | |
| 79 | 87 | { |
| 80 | int address=activecpu_get_pc(); | |
| 81 | switch(address) | |
| 82 | { | |
| 83 | case 0x638c: | |
| 84 | case 0x638e: return 0; // not used = device reset /clear ? | |
| 85 | case 0x6392: return 0x80; //1st check | |
| 86 | case 0x639c: return 0xc4; //2nd check | |
| 87 | default: logerror("unk protection read @ %x\n",address); | |
| 88 | } | |
| 89 | return 0; | |
| 88 | 0, | |
| 89 | 1000000, /* ? MHz */ | |
| 90 | 8, | |
| 91 | NULL, | |
| 92 | update_row, | |
| 93 | NULL, | |
| 94 | NULL | |
| 95 | }; | |
| 96 | ||
| 97 | static WRITE8_HANDLER(ssingles_videoram_w) | |
| 98 | { | |
| 99 | ssingles_videoram[offset]=data; | |
| 90 | 100 | } |
| 91 | 101 | |
| 92 | static WRITE8_HANDLER( | |
| 102 | static WRITE8_HANDLER(ssingles_colorram_w) | |
| 93 | 103 | { |
| 94 | int address=activecpu_get_pc(); | |
| 95 | switch(address) | |
| 104 | ssingles_colorram[offset]=data; | |
| 105 | } | |
| 106 | ||
| 107 | static VIDEO_START(ssingles) | |
| 108 | { | |
| 109 | crtc6845_config(0, &crtc6845_intf); | |
| 110 | ||
| 111 | { | |
| 112 | int i; | |
| 113 | for(i=0;i<NUM_PENS;++i) | |
| 96 | 114 | { |
| 97 | case 0x6390: | |
| 98 | case 0x639a: break;// do nothing | |
| 99 | default: logerror("unk protection write %x @ %x\n",data,address); | |
| 115 | pens[i]=MAKE_RGB(ssingles_colors[3*i], ssingles_colors[3*i+1], ssingles_colors[3*i+2]); | |
| 100 | 116 | } |
| 117 | } | |
| 101 | 118 | } |
| 102 | 119 | |
| 120 | ||
| 121 | static READ8_HANDLER(c000_r) | |
| 122 | { | |
| 123 | return prot_data; | |
| 124 | } | |
| 125 | ||
| 126 | static READ8_HANDLER(c001_r) | |
| 127 | { | |
| 128 | prot_data=0xc4; | |
| 129 | return 0; | |
| 130 | } | |
| 131 | ||
| 132 | static WRITE8_HANDLER(c001_w) | |
| 133 | { | |
| 134 | prot_data^=data^0x11; | |
| 135 | } | |
| 136 | ||
| 103 | 137 | static READ8_HANDLER(controls_r) |
| 104 | 138 | { |
| 105 | 139 | int data=7; |
| r1527 | r1528 | |
| 117 | 151 | } |
| 118 | 152 | |
| 119 | 153 | static ADDRESS_MAP_START( ssingles_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 120 | AM_RANGE(0x0000, 0x1fff) AM_READ( MRA8_ROM ) AM_WRITE(ssingles_vram_w) | |
| 121 | AM_RANGE(0xc000, 0xc001) AM_READWRITE( prot_r, prot_w ) //protection | |
| 154 | AM_RANGE(0x0000, 0x00ff) AM_WRITE(ssingles_videoram_w) | |
| 155 | AM_RANGE(0x0800, 0x08ff) AM_WRITE(ssingles_colorram_w) | |
| 156 | AM_RANGE(0x0000, 0x1fff) AM_READ( MRA8_ROM ) | |
| 157 | AM_RANGE(0xc000, 0xc000) AM_READ( c000_r ) | |
| 158 | AM_RANGE(0xc001, 0xc001) AM_READWRITE( c001_r, c001_w ) | |
| 122 | 159 | AM_RANGE(0x6000, 0xbfff) AM_ROM |
| 123 | 160 | AM_RANGE(0xf800, 0xffff) AM_RAM |
| 124 | 161 | ADDRESS_MAP_END |
| r1527 | r1528 | |
| 133 | 170 | AM_RANGE(0x16, 0x16) AM_READ(input_port_2_r) |
| 134 | 171 | AM_RANGE(0x18, 0x18) AM_READ(input_port_3_r) |
| 135 | 172 | AM_RANGE(0x1c, 0x1c) AM_READ(controls_r) |
| 136 | AM_RANGE(0x1a, 0x1a) AM_WRITENOP | |
| 137 | AM_RANGE(0xfe, 0xff) AM_WRITENOP | |
| 173 | AM_RANGE(0x1a, 0x1a) AM_WRITENOP //video/crt related | |
| 174 | AM_RANGE(0xfe, 0xfe) AM_WRITE(crtc6845_address_w) | |
| 175 | AM_RANGE(0xff, 0xff) AM_WRITE(crtc6845_register_w) | |
| 176 | ||
| 138 | 177 | ADDRESS_MAP_END |
| 139 | 178 | |
| 140 | 179 | static INPUT_PORTS_START( ssingles ) |
| r1527 | r1528 | |
| 208 | 247 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 209 | 248 | INPUT_PORTS_END |
| 210 | 249 | |
| 211 | static const gfx_layout charlayout = | |
| 212 | { | |
| 213 | 16,16, | |
| 214 | RGN_FRAC(1,4), | |
| 215 | 2, | |
| 216 | { 0, RGN_FRAC(1,2) }, | |
| 217 | { RGN_FRAC(1,4),RGN_FRAC(1,4)+ 1,RGN_FRAC(1,4)+ 2,RGN_FRAC(1,4)+ 3,RGN_FRAC(1,4)+ 4,RGN_FRAC(1,4)+ 5,RGN_FRAC(1,4) + 6,RGN_FRAC(1,4) + 7,0,1,2,3,4,5,6,7 }, | |
| 218 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8}, | |
| 219 | 8*8*2 | |
| 220 | }; | |
| 221 | ||
| 222 | static GFXDECODE_START( ssingles ) | |
| 223 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0x0000, 1 ) | |
| 224 | GFXDECODE_END | |
| 225 | ||
| 226 | 250 | static MACHINE_DRIVER_START( ssingles ) |
| 227 | 251 | MDRV_CPU_ADD(Z80,4000000) /* ? MHz */ |
| 228 | 252 | MDRV_CPU_PROGRAM_MAP(ssingles_map,0) |
| 229 | 253 | MDRV_CPU_IO_MAP(ssingles_io_map,0) |
| 230 | 254 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 255 | ||
| 231 | 256 | MDRV_SCREEN_REFRESH_RATE(60) |
| 232 | 257 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) |
| 233 | 258 | |
| 234 | 259 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER ) |
| 235 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 236 | MDRV_SCREEN_SIZE(288, 288) | |
| 260 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 261 | MDRV_SCREEN_RAW_PARAMS(4000000, 256, 0, 256, 256, 0, 256) /* temporary, CRTC will configure screen */ | |
| 237 | 262 | |
| 238 | MDRV_ | |
| 263 | MDRV_PALETTE | |
| 239 | 264 | |
| 240 | MDRV_GFXDECODE(ssingles) | |
| 241 | MDRV_PALETTE_LENGTH(16*4) //guess | |
| 242 | ||
| 243 | 265 | MDRV_VIDEO_START(ssingles) |
| 244 | MDRV_VIDEO_UPDATE( | |
| 266 | MDRV_VIDEO_UPDATE(crtc6845) | |
| 245 | 267 | |
| 246 | 268 | /* sound hardware */ |
| 247 | 269 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r1527 | r1528 | |
| 267 | 289 | ROM_LOAD( "11.bin", 0x8000, 0x4000, CRC(f7107b29) SHA1(a405926fd3cb4b3d2a1c705dcde25d961dba5884) ) |
| 268 | 290 | ROM_LOAD( "12.bin", 0xc000, 0x4000, CRC(e5585a93) SHA1(04d55699b56d869066f2be2c6ac48042aa6c3108) ) |
| 269 | 291 | |
| 270 | ROM_REGION( 0x08000, REGION_USER1, 0 | |
| 292 | ROM_REGION( 0x08000, REGION_USER1, 0 | |
| 271 | 293 | ROM_LOAD( "5.bin", 0x00000, 0x2000, CRC(242a8dda) SHA1(e140893cc05fb8cee75904d98b02626f2565ed1b) ) |
| 272 | 294 | ROM_LOAD( "6.bin", 0x02000, 0x2000, CRC(85ab8aab) SHA1(566f034e1ba23382442f27457447133a0e0f1cfc) ) |
| 273 | 295 | ROM_LOAD( "7.bin", 0x04000, 0x2000, CRC(57cc112d) SHA1(fc861c58ae39503497f04d302a9f16fca19b37fb) ) |
| r1527 | r1528 | |
| 277 | 299 | |
| 278 | 300 | static DRIVER_INIT(ssingles) |
| 279 | 301 | { |
| 280 | ssingles_vram=auto_malloc(0x2000); | |
| 281 | memset(ssingles_vram,0,0x2000); | |
| 282 | state_save_register_global_pointer(ssingles_vram, 0x2000); | |
| 302 | ssingles_videoram=auto_malloc(VMEM_SIZE); | |
| 303 | ssingles_colorram=auto_malloc(VMEM_SIZE); | |
| 304 | memset(ssingles_videoram,0,VMEM_SIZE); | |
| 305 | memset(ssingles_colorram,0,VMEM_SIZE); | |
| 306 | state_save_register_global_pointer(ssingles_videoram, VMEM_SIZE); | |
| 307 | state_save_register_global_pointer(ssingles_colorram, VMEM_SIZE); | |
| 283 | 308 | } |
| 284 | 309 | |
| 285 | 310 | GAME ( 1983, ssingles, 0, ssingles, ssingles, ssingles, ROT90, "Ent. Ent. Ltd", "Swinging Singles", GAME_SUPPORTS_SAVE | GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND ) |
| r1527 | r1528 | |
|---|---|---|
| 170 | 170 | AM_RANGE(0x8000, 0x87FF) AM_WRITE(MWA8_RAM) |
| 171 | 171 | AM_RANGE(0x8800, 0x8BFF) AM_WRITE(skyarmy_videoram_w) AM_BASE(&skyarmy_videoram) /* Video RAM */ |
| 172 | 172 | AM_RANGE(0x9000, 0x93FF) AM_WRITE(skyarmy_colorram_w) AM_BASE(&skyarmy_colorram) /* Color RAM */ |
| 173 | AM_RANGE(0x9800, 0x983F) AM_WRITE( | |
| 173 | AM_RANGE(0x9800, 0x983F) AM_WRITE(MWA8 | |
| 174 | 174 | AM_RANGE(0x9840, 0x985F) AM_WRITE(skyarmy_scrollram_w) AM_BASE(&skyarmy_scrollram) /* Sprites */ |
| 175 | 175 | AM_RANGE(0xa004, 0xa004) AM_WRITE(nmi_enable_w) // ??? |
| 176 | 176 | AM_RANGE(0xa005, 0xa005) AM_WRITE(MWA8_NOP) |
| r1527 | r1528 | |
|---|---|---|
| 117 | 117 | AM_RANGE(0xa806, 0xa806) AM_READ(sound_status_r) |
| 118 | 118 | AM_RANGE(0xa807, 0xa807) AM_READ(MRA8_NOP) /* watchdog ? */ |
| 119 | 119 | AM_RANGE(0xa808, 0xa808) AM_WRITE(bank_select_w) |
| 120 | AM_RANGE(0xb000, 0xb7ff) AM_READWRITE( | |
| 120 | AM_RANGE(0xb000, 0xb7ff) AM_READWRITE(MRA8 | |
| 121 | 121 | AM_RANGE(0xb800, 0xbfff) AM_READWRITE(MRA8_RAM, MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 122 | 122 | ADDRESS_MAP_END |
| 123 | 123 |
| r1527 | r1528 | |
|---|---|---|
| 654 | 654 | /* basic machine hardware */ |
| 655 | 655 | MDRV_IMPORT_FROM(qix) |
| 656 | 656 | |
| 657 | MDRV_CPU_ADD(M68705, COIN_CLOCK_OSC | |
| 657 | MDRV_CPU_ADD(M68705, COIN_CLOCK_OSC | |
| 658 | 658 | MDRV_CPU_PROGRAM_MAP(mcu_map,0) |
| 659 | 659 | |
| 660 | 660 | MDRV_MACHINE_START(qixmcu) |
| r1527 | r1528 | |
|---|---|---|
| 143 | 143 | cpunum_set_input_line(1, INPUT_LINE_RESET, ( data & 0x40 ) ? CLEAR_LINE : ASSERT_LINE ); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | static UINT | |
| 146 | static CUSTOM_INPUT( | |
| 147 | 147 | { |
| 148 | 148 | return EEPROM_read_bit(); |
| 149 | 149 | } |
| r1527 | r1528 | |
| 373 | 373 | |
| 374 | 374 | static MACHINE_DRIVER_START( konamigq ) |
| 375 | 375 | /* basic machine hardware */ |
| 376 | MDRV_CPU_ADD( PSXCPU, | |
| 376 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 377 | 377 | MDRV_CPU_PROGRAM_MAP( konamigq_map, 0 ) |
| 378 | 378 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 379 | 379 |
| r1527 | r1528 | |
|---|---|---|
| 1142 | 1142 | int xsizedraw2 = ((value3 & 0x007f0000)>>16); |
| 1143 | 1143 | int xx,yy; |
| 1144 | 1144 | |
| 1145 | int tilestable[4] = { 8,1,2,4 }; | |
| 1145 | static const int tilestable[4] = { 8,1,2,4 }; | |
| 1146 | 1146 | int ysize2 = ((value3 & 0x0000000c)>>2); |
| 1147 | 1147 | int xsize2 = ((value3 & 0x00000003)>>0); |
| 1148 | 1148 | UINT32 xinc,yinc; |
| r1527 | r1528 | |
| 1967 | 1967 | } |
| 1968 | 1968 | } |
| 1969 | 1969 | |
| 1970 | static UINT32* tilemap20_regs_base; | |
| 1971 | static UINT32* tilemap30_regs_base; | |
| 1972 | static UINT32* tilemap40_regs_base; | |
| 1973 | static UINT32* tilemap50_regs_base; | |
| 1974 | ||
| 1975 | 1970 | //<ElSemi> +0 X +2 Y +4 unknown +6 enable (&0x8000) +8 low part tilemap base, high part linescroll base |
| 1976 | 1971 | //<ElSemi> (a word each) |
| 1977 | 1972 |
| r1527 | r1528 | |
|---|---|---|
| 663 | 663 | |
| 664 | 664 | static int decrypt(int game, int key, int high_word, int low_word) |
| 665 | 665 | { |
| 666 | int swaps[4][16] = | |
| 666 | static const int swaps[4][16] = | |
| 667 | 667 | { |
| 668 | 668 | { 5,7,9,12,2,14,13,15,3,6,8,11,4,10,0,1 }, |
| 669 | 669 | { 11,2,5,14,8,13,10,4,7,12,0,6,15,9,1,3 }, |
| r1527 | r1528 | |
| 673 | 673 | |
| 674 | 674 | int dst[16],carry[16]; |
| 675 | 675 | int i; |
| 676 | int *s = swaps[key & 3]; | |
| 676 | const int *s = swaps[key & 3]; | |
| 677 | 677 | int flag1 = BIT(high_word, 9) ^ BIT(high_word, 12) ^ 1; |
| 678 | 678 | int flag2 = game ? BIT(high_word, 10) : (BIT(high_word, 9) ^ BIT(high_word, 10)); |
| 679 | 679 |
| r1527 | r1528 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | Crazy Balloon | |
| 3 | Taito Crazy Balloon h | |
| 4 | 4 | |
| 5 | 0000-2fff ROM | |
| 6 | 4000-43ff RAM | |
| 7 | 4800-4bff Video RAM | |
| 8 | 5000-53ff Color RAM | |
| 5 | Copyright Nicola Salmoria and the MAME Team. | |
| 9 | 6 | |
| 10 | I/O: | |
| 7 | To-Do: | |
| 8 | * Video timing from schematics | |
| 9 | * Watchdog length from schematics | |
| 10 | * Interrupt timing from schematics | |
| 11 | * DIP switches | |
| 12 | * Faithfully implement the custom chips | |
| 13 | * Coin counter and lock-out | |
| 11 | 14 | |
| 12 | read: | |
| 13 | 00 dsw | |
| 14 | 01 joystick | |
| 15 | 02 bit 0-3 from chip PC3259 (bit 3 is the sprite/char collision detection) | |
| 16 | bit 4-7 dsw | |
| 17 | 03 bit 0 dsw | |
| 18 | bit 1 high score name reset | |
| 19 | bit 2 service | |
| 20 | bit 3 tilt | |
| 21 | bit 4-7 from chip PC3092; coin inputs & start buttons | |
| 22 | 06-0a-0e mirror addresses for 02; address lines 2 and 3 go to the PC3256 chip | |
| 23 | so they probably alter its output, while the dsw bits (4-7) stay the same. | |
| 24 | ||
| 25 | write: | |
| 26 | 01 ? | |
| 27 | 02 bit 0-3 sprite code bit 4-7 sprite color | |
| 28 | 03 sprite X pos | |
| 29 | 04 sprite Y pos | |
| 30 | 05 music?? to a counter? | |
| 31 | 06 sound | |
| 32 | bit 0 IRQ enable/acknowledge | |
| 33 | bit 1 sound enable | |
| 34 | bit 2 sound related (to amplifier) | |
| 35 | bit 3 explosion (to 76477) | |
| 36 | bit 4 breath (to 76477) | |
| 37 | bit 5 appear (to 76477) | |
| 38 | bit 6 sound related (to 555) | |
| 39 | bit 7 to chip PC3259 | |
| 40 | 07 to chip PC3092 (bits 0-3) | |
| 41 | 08 to chip PC3092 (bits 0-3) | |
| 42 | bit 0 seems to be flip screen | |
| 43 | bit 1 might enable coin input | |
| 44 | 09 to chip PC3092 (bits 0-3) | |
| 45 | 0a to chip PC3092 (bits 0-3) | |
| 46 | 0b to chip PC3092 (bits 0-3) | |
| 47 | 0c MSK (to chip PC3259) | |
| 48 | 0d CC (not used) | |
| 49 | ||
| 50 | 15 | ***************************************************************************/ |
| 51 | 16 | |
| 52 | 17 | #include "driver.h" |
| 53 | #include "sound/sn76477.h" | |
| 54 | #include "sound/custom.h" | |
| 55 | 18 | #include "crbaloon.h" |
| 56 | 19 | |
| 57 | 20 | |
| 21 | static UINT8 *pc3092_data; | |
| 58 | 22 | |
| 59 | static UINT8 val06,val08,val0a; | |
| 60 | 23 | |
| 61 | static MACHINE_START( crbaloon ) | |
| 24 | ||
| 25 | /************************************* | |
| 26 | * | |
| 27 | * PC3092 custom chip | |
| 28 | * | |
| 29 | * Inputs: pins 1-4 - D0-D3 of data bus | |
| 30 | * pin 5 - 1P ENTRY (start button 1) | |
| 31 | * pin 6 - 2P ENTRY (start button 2) | |
| 32 | * pin 7 - COIN | |
| 33 | * pin 8 - /4HN (pixel timing) | |
| 34 | * pin 9 - port 0x0a written to | |
| 35 | * pin 10 - port 0x08 written to | |
| 36 | * pin 11 - port 0x07 written to | |
| 37 | * pin 13 - /RESET | |
| 38 | * pin 14 - port 0x09 written to | |
| 39 | * pin 15 - port 0x0b written to | |
| 40 | * | |
| 41 | * Outputs: pins 16-19 - D28-D31 of I/O bus | |
| 42 | * pin 20 - /V-INV (flip screen) | |
| 43 | * pin 21 - coin counter | |
| 44 | * | |
| 45 | *************************************/ | |
| 46 | ||
| 47 | #define LOG_PC3092 0 | |
| 48 | ||
| 49 | ||
| 50 | static void pc3092_reset(void) | |
| 62 | 51 | { |
| 63 | state_save_register_global(val06); | |
| 64 | state_save_register_global(val08); | |
| 65 | state_save_register_global(val0a); | |
| 52 | /* nothing yet */ | |
| 66 | 53 | } |
| 67 | 54 | |
| 68 | static WRITE8_HANDLER( crbaloon_06_w ) | |
| 55 | ||
| 56 | static void pc3092_update(void) | |
| 69 | 57 | { |
| 70 | val06 = data; | |
| 58 | flip_screen_set((pc3092_data[1] & 0x01) ? TRUE : FALSE); | |
| 59 | } | |
| 71 | 60 | |
| 72 | interrupt_enable_w(offset,data & 1); | |
| 73 | 61 | |
| 74 | /* SOUND STOP is really sound enable */ | |
| 75 | sound_global_enable(data & 0x02); | |
| 62 | static WRITE8_HANDLER( pc3092_w ) | |
| 63 | { | |
| 64 | pc3092_data[offset] = data & 0x0f; | |
| 76 | 65 | |
| 77 | /* enable is connected to EXPLOSION */ | |
| 78 | SN76477_enable_w(0, (data & 0x08) ? 1 : 0); | |
| 66 | if (LOG_PC3092) logerror("%04X: write PC3092 #%d = 0x%02x\n", safe_activecpu_get_pc(), offset, pc3092_data[offset]); | |
| 79 | 67 | |
| 80 | /* BREATH changes slf_res to 10k (middle of two 10k resistors) */ | |
| 81 | /* it also puts a tantal capacitor against GND on the output, | |
| 82 | but this section of the schematics is not readable. */ | |
| 83 | SN76477_slf_res_w(0, (data & 0x10) ? RES_K(10) : RES_K(20) ); | |
| 68 | pc3092_update(); | |
| 69 | } | |
| 84 | 70 | |
| 85 | /* APPEAR is connected to MIXER B */ | |
| 86 | SN76477_mixer_b_w(0, (data & 0x20) ? 1 : 0); | |
| 87 | 71 | |
| 88 | discrete_sound_w(CRBALOON_MUSIC_EN, data & 0x04); | |
| 89 | discrete_sound_w(CRBALOON_LAUGH_EN, data & 0x40); | |
| 90 | } | |
| 91 | ||
| 92 | static WRITE8_HANDLER( crbaloon_08_w ) | |
| 72 | static CUSTOM_INPUT( pc3092_r ) | |
| 93 | 73 | { |
| 94 | | |
| 74 | UINT32 re | |
| 95 | 75 | |
| 96 | crbaloon_flipscreen_w(offset,data & 1); | |
| 76 | /* enable coin & start input? Wild guess!!! */ | |
| 77 | if (pc3092_data[1] & 0x02) | |
| 78 | ret = readinputportbytag("PC3092"); | |
| 79 | else | |
| 80 | ret = 0x00; | |
| 81 | ||
| 82 | if (LOG_PC3092) logerror("%04X: read PC3092 = 0x%02x\n", safe_activecpu_get_pc(), ret); | |
| 83 | ||
| 84 | return ret; | |
| 97 | 85 | } |
| 98 | 86 | |
| 99 | static WRITE8_HANDLER( crbaloon_0a_w ) | |
| 87 | ||
| 88 | ||
| 89 | /************************************* | |
| 90 | * | |
| 91 | * PC3259 custom chip - | |
| 92 | * collision detection | |
| 93 | * | |
| 94 | * Inputs: pins 1-10 - 128V/64V/32V/16V/8V | |
| 95 | * 128H/64H/32H/16H/8H | |
| 96 | * video timing lines | |
| 97 | * pin 11 - CLK | |
| 98 | * pin 13 - /HTCLR | |
| 99 | * pin 14 - MVID | |
| 100 | * pin 15 - T1 | |
| 101 | * pin 16 - D7 of SOUND port buffer | |
| 102 | * pin 21/22 - AD2/AD3 of address bus | |
| 103 | * pin 23 - MSK (port 0x0c written to) | |
| 104 | * | |
| 105 | * Outputs: pins 17-20 - D24-D27 of I/O bus | |
| 106 | * | |
| 107 | *************************************/ | |
| 108 | ||
| 109 | #define LOG_PC3259 0 | |
| 110 | ||
| 111 | ||
| 112 | static void pc3259_update(void) | |
| 100 | 113 | { |
| 101 | | |
| 114 | /* | |
| 102 | 115 | } |
| 103 | 116 | |
| 104 | static READ8_HANDLER( crbaloon_IN2_r ) | |
| 117 | ||
| 118 | static READ8_HANDLER( pc3259_r ) | |
| 105 | 119 | { |
| 106 | if (crbaloon_collision != 0) | |
| 120 | UINT8 ret = 0; | |
| 121 | UINT8 reg = offset >> 2; | |
| 122 | ||
| 123 | UINT16 collision_address = crbaloon_get_collision_address(); | |
| 124 | int collided = (collision_address != 0xffff); | |
| 125 | ||
| 126 | switch (reg) | |
| 107 | 127 | { |
| 108 | return (input_port_2_r(0) & 0xf0) | 0x08; | |
| 109 | } | |
| 128 | case 0x00: | |
| 129 | ret = collided ? (collision_address & 0x0f) : 0; | |
| 130 | break; | |
| 110 | 131 | |
| 111 | /* the following is needed for the game to boot up */ | |
| 112 | if (val06 & 0x80) | |
| 113 | { | |
| 114 | logerror("PC %04x: %02x high\n",activecpu_get_pc(),offset); | |
| 115 | return (input_port_2_r(0) & 0xf0) | 0x07; | |
| 132 | case 0x01: | |
| 133 | ret = collided ? ((collision_address >> 4) & 0x0f) : 0; | |
| 134 | break; | |
| 135 | ||
| 136 | case 0x02:; | |
| 137 | ret = collided ? (collision_address >> 8) : 0; | |
| 138 | break; | |
| 139 | ||
| 140 | default: | |
| 141 | case 0x03: | |
| 142 | ret = collided ? 0x08 : 0x07; | |
| 143 | break; | |
| 116 | 144 | } |
| 117 | else | |
| 118 | { | |
| 119 | logerror("PC %04x: %02x low\n",activecpu_get_pc(),offset); | |
| 120 | return (input_port_2_r(0) & 0xf0) | 0x07; | |
| 121 | } | |
| 122 | } | |
| 123 | 145 | |
| 124 | static READ8_HANDLER( crbaloon_IN3_r ) | |
| 125 | { | |
| 126 | if (val08 & 0x02) | |
| 127 | /* enable coin & start input? Wild guess!!! */ | |
| 128 | return input_port_3_r(0); | |
| 146 | if (LOG_PC3259) logerror("%04X: read PC3259 #%d = 0x%02x\n", safe_activecpu_get_pc(), reg, ret); | |
| 129 | 147 | |
| 130 | /* the following is needed for the game to boot up */ | |
| 131 | if (val0a & 0x01) | |
| 132 | { | |
| 133 | logerror("PC %04x: 03 high\n",activecpu_get_pc()); | |
| 134 | return (input_port_3_r(0) & 0x0f) | 0x00; | |
| 135 | } | |
| 136 | else | |
| 137 | { | |
| 138 | logerror("PC %04x: 03 low\n",activecpu_get_pc()); | |
| 139 | return (input_port_3_r(0) & 0x0f) | 0x00; | |
| 140 | } | |
| 148 | return ret | (readinputportbytag("DSW1") & 0xf0); | |
| 141 | 149 | } |
| 142 | 150 | |
| 143 | 151 | |
| 144 | static READ8_HANDLER( crbaloon_IN_r ) | |
| 152 | ||
| 153 | /************************************* | |
| 154 | * | |
| 155 | * I/O ports | |
| 156 | * | |
| 157 | *************************************/ | |
| 158 | ||
| 159 | static WRITE8_HANDLER( port_sound_w ) | |
| 145 | 160 | { |
| 146 | switch (offset & 0x03) | |
| 147 | { | |
| 148 | case 0: | |
| 149 | return input_port_0_r(offset); | |
| 161 | /* D0 - interrupt enable - also goes to PC3259 as /HTCTRL */ | |
| 162 | cpu_interrupt_enable(0, (data & 0x01) ? TRUE : FALSE); | |
| 163 | crbaloon_set_clear_collision_address((data & 0x01) ? TRUE : FALSE); | |
| 150 | 164 | |
| 151 | case 1: | |
| 152 | return input_port_1_r(offset); | |
| 165 | /* D1 - SOUND STOP */ | |
| 166 | sound_global_enable((data & 0x02) ? TRUE : FALSE); | |
| 153 | 167 | |
| 154 | case 2: | |
| 155 | return crbaloon_IN2_r(offset); | |
| 168 | /* D2 - unlabeled - music enable */ | |
| 169 | crbaloon_audio_set_music_enable((data & 0x04) ? TRUE : FALSE); | |
| 156 | 170 | |
| 157 | case 3: | |
| 158 | return crbaloon_IN3_r(offset); | |
| 159 | } | |
| 171 | /* D3 - EXPLOSION */ | |
| 172 | crbaloon_audio_set_explosion_enable((data & 0x08) ? TRUE : FALSE); | |
| 160 | 173 | |
| 161 | return 0; | |
| 174 | /* D4 - BREATH */ | |
| 175 | crbaloon_audio_set_breath_enable((data & 0x10) ? TRUE : FALSE); | |
| 176 | ||
| 177 | /* D5 - APPEAR */ | |
| 178 | crbaloon_audio_set_appear_enable((data & 0x20) ? TRUE : FALSE); | |
| 179 | ||
| 180 | /* D6 - unlabeled - laugh enable */ | |
| 181 | crbaloon_audio_set_laugh_enable((data & 0x40) ? TRUE : FALSE); | |
| 182 | ||
| 183 | /* D7 - unlabeled - goes to PC3259 pin 16 */ | |
| 184 | ||
| 185 | pc3259_update(); | |
| 162 | 186 | } |
| 163 | 187 | |
| 164 | static WRITE8_HANDLER( crbaloon_tone_w ) | |
| 188 | ||
| 189 | static WRITE8_HANDLER( port_music_w ) | |
| 165 | 190 | { |
| 166 | dis | |
| 191 | crbaloon_audio_s | |
| 167 | 192 | } |
| 168 | 193 | |
| 169 | 194 | |
| 170 | 195 | |
| 171 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 172 | AM_RANGE(0x0000, 0x2fff) AM_READ(MRA8_ROM) | |
| 173 | AM_RANGE(0x4000, 0x43ff) AM_READ(MRA8_RAM) | |
| 174 | AM_RANGE(0x4800, 0x4bff) AM_READ(MRA8_RAM) | |
| 175 | AM_RANGE(0x5000, 0x53ff) AM_READ(MRA8_RAM) | |
| 176 | ADDRESS_MAP_END | |
| 196 | /************************************* | |
| 197 | * | |
| 198 | * Memory handlers | |
| 199 | * | |
| 200 | *************************************/ | |
| 177 | 201 | |
| 178 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 179 | AM_RANGE(0x0000, 0x2fff) AM_WRITE(MWA8_ROM) | |
| 180 | AM_RANGE(0x4000, 0x43ff) AM_WRITE(MWA8_RAM) | |
| 181 | AM_RANGE(0x4800, 0x4bff) AM_WRITE(crbaloon_videoram_w) AM_BASE(&videoram) | |
| 182 | AM_RANGE(0x5000, 0x53ff) AM_WRITE(crbaloon_colorram_w) AM_BASE(&colorram) | |
| 202 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 203 | ADDRESS_MAP_FLAGS( AMEF_ABITS(15) ) /* A15 is not decoded */ | |
| 204 | AM_RANGE(0x0000, 0x3fff) AM_ROM /* not fully populated */ | |
| 205 | AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0400) AM_RAM | |
| 206 | AM_RANGE(0x4800, 0x4bff) AM_MIRROR(0x0400) AM_READWRITE(MRA8_RAM, crbaloon_videoram_w) AM_BASE(&crbaloon_videoram) | |
| 207 | AM_RANGE(0x5000, 0x53ff) AM_MIRROR(0x0400) AM_READWRITE(MRA8_RAM, crbaloon_colorram_w) AM_BASE(&crbaloon_colorram) | |
| 208 | AM_RANGE(0x5800, 0x7fff) AM_NOP | |
| 183 | 209 | ADDRESS_MAP_END |
| 184 | 210 | |
| 185 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 186 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 187 | AM_RANGE(0x00, 0x0f) AM_READ(crbaloon_IN_r) | |
| 188 | ADDRESS_MAP_END | |
| 189 | 211 | |
| 190 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 191 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 192 | AM_RANGE(0x02, 0x04) AM_WRITE(crbaloon_spritectrl_w) | |
| 193 | AM_RANGE(0x05, 0x05) AM_WRITE(crbaloon_tone_w) | |
| 194 | AM_RANGE(0x06, 0x06) AM_WRITE(crbaloon_06_w) | |
| 195 | AM_RANGE(0x08, 0x08) AM_WRITE(crbaloon_08_w) | |
| 196 | AM_RANGE(0x0a, 0x0a) AM_WRITE(crbaloon_0a_w) | |
| 212 | ||
| 213 | /************************************* | |
| 214 | * | |
| 215 | * Port handlers | |
| 216 | * | |
| 217 | *************************************/ | |
| 218 | ||
| 219 | static ADDRESS_MAP_START( main_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 220 | ADDRESS_MAP_FLAGS( AMEF_ABITS(4) ) | |
| 221 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x0c) AM_READ(port_tag_to_handler8("DSW0")) | |
| 222 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x0c) AM_READ(port_tag_to_handler8("IN0")) | |
| 223 | /* AM_SPACE(0x02, 0x03) AM_READ(pc3259_r) crashes if not at the end */ | |
| 224 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x0c) AM_READ(port_tag_to_handler8("IN1")) | |
| 225 | ||
| 226 | AM_RANGE(0x00, 0x00) AM_WRITE(MWA8_NOP) /* not connected */ | |
| 227 | AM_RANGE(0x01, 0x01) AM_WRITE(MWA8_NOP) /* watchdog */ | |
| 228 | AM_RANGE(0x02, 0x04) AM_WRITE(MWA8_RAM) AM_BASE(&crbaloon_spriteram) | |
| 229 | AM_RANGE(0x05, 0x05) AM_WRITE(port_music_w) | |
| 230 | AM_RANGE(0x06, 0x06) AM_WRITE(port_sound_w) | |
| 231 | AM_RANGE(0x07, 0x0b) AM_WRITE(pc3092_w) AM_BASE(&pc3092_data) | |
| 232 | AM_RANGE(0x0c, 0x0c) AM_WRITE(MWA8_NOP) /* MSK - to PC3259 */ | |
| 233 | AM_RANGE(0x0d, 0x0d) AM_WRITE(MWA8_NOP) /* schematics has it in a box marked "NOT USE" */ | |
| 234 | AM_RANGE(0x0e, 0x0f) AM_WRITE(MWA8_NOP) | |
| 235 | ||
| 236 | AM_SPACE(0x02, 0x03) AM_READ(pc3259_r) | |
| 197 | 237 | ADDRESS_MAP_END |
| 198 | 238 | |
| 199 | 239 | |
| 200 | 240 | |
| 241 | /************************************* | |
| 242 | * | |
| 243 | * Port definition | |
| 244 | * | |
| 245 | *************************************/ | |
| 246 | ||
| 201 | 247 | static INPUT_PORTS_START( crbaloon ) |
| 202 | PORT_START_TAG("DSW0") // 0 | |
| 203 | PORT_DIPNAME( 0x01, 0x01, "Test?" ) | |
| 248 | PORT_START_TAG("DSW0") | |
| 249 | PORT_DIPNAME( 0x01, 0x01, "Test?" ) PORT_DIPLOCATION("SW A:1") | |
| 204 | 250 | PORT_DIPSETTING( 0x01, "I/O Check?" ) |
| 205 | 251 | PORT_DIPSETTING( 0x00, "RAM Check?" ) |
| 206 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) | |
| 252 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW A:2") | |
| 207 | 253 | PORT_DIPSETTING( 0x02, DEF_STR( Upright ) ) |
| 208 | 254 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 209 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) ) | |
| 255 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW A:3,4") | |
| 210 | 256 | PORT_DIPSETTING( 0x00, "2" ) |
| 211 | 257 | PORT_DIPSETTING( 0x04, "3" ) |
| 212 | 258 | PORT_DIPSETTING( 0x08, "4" ) |
| 213 | 259 | PORT_DIPSETTING( 0x0c, "5" ) |
| 214 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Bonus_Life ) ) | |
| 260 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW A:5") | |
| 215 | 261 | PORT_DIPSETTING( 0x00, "5000" ) |
| 216 | 262 | PORT_DIPSETTING( 0x10, "10000" ) |
| 217 | PORT_DIPNAME( 0xe0, 0x80, DEF_STR( Coinage ) ) | |
| 263 | PORT_DIPNAME( 0xe0, 0x80, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW A:6,7,8") | |
| 218 | 264 | PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) |
| 219 | 265 | PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) ) |
| 220 | 266 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) ) |
| r1527 | r1528 | |
| 224 | 270 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_4C ) ) |
| 225 | 271 | PORT_DIPSETTING( 0x00, "Disable" ) |
| 226 | 272 | |
| 227 | PORT_START_TAG("IN0") | |
| 273 | PORT_START_TAG("IN0") | |
| 228 | 274 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 229 | 275 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 230 | 276 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| r1527 | r1528 | |
| 234 | 280 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 235 | 281 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 236 | 282 | |
| 237 | PORT_START_TAG("DSW1") // 2 | |
| 238 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* from chip PC3259 */ | |
| 239 | PORT_DIPNAME( 0x10, 0x10, "Invulnerability (Cheat)") | |
| 283 | PORT_START_TAG("DSW1") | |
| 284 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* PC3259 */ | |
| 285 | PORT_DIPNAME( 0x10, 0x10, "Invulnerability") PORT_DIPLOCATION("SW B:1") | |
| 240 | 286 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 241 | 287 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 242 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 288 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW B:2") | |
| 243 | 289 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 244 | 290 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 245 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 291 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW B:3") | |
| 246 | 292 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 247 | 293 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 248 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 294 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW B:4") | |
| 249 | 295 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 250 | 296 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 251 | 297 | |
| 252 | PORT_START_TAG("IN1") // 3 | |
| 253 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) | |
| 298 | PORT_START_TAG("IN1") | |
| 299 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW B:5") | |
| 254 | 300 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 255 | 301 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 256 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("High Score Name Reset") | |
| 257 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) /* should be COIN2 */ | |
| 302 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Name Reset") | |
| 303 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 258 | 304 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT ) |
| 259 | /* the following four bits come from chip PC3092 */ | |
| 260 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) | |
| 261 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 262 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 263 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 305 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(pc3092_r, 0) | |
| 264 | 306 | |
| 265 | PORT_START_TAG("VR2") // 4 | |
| 307 | PORT_START_TAG("PC3092") | |
| 308 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) | |
| 309 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) | |
| 310 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 311 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 312 | ||
| 313 | PORT_START_TAG("VR2") | |
| 266 | 314 | PORT_ADJUSTER(50, "VR2 - Beep") |
| 267 | 315 | |
| 268 | PORT_START_TAG("VR3") | |
| 316 | PORT_START_TAG("VR3") | |
| 269 | 317 | PORT_ADJUSTER(50, "VR3 - Music") |
| 270 | 318 | |
| 271 | 319 | INPUT_PORTS_END |
| r1527 | r1528 | |
| 282 | 330 | { 7*8, 6*8, 5*8, 4*8, 3*8, 2*8, 1*8, 0*8 }, |
| 283 | 331 | 8*8 /* every char takes 8 consecutive bytes */ |
| 284 | 332 | }; |
| 285 | static const gfx_layout spritelayout = | |
| 286 | { | |
| 287 | 32,32, /* 32*32 sprites */ | |
| 288 | 16, /* 16 sprites */ | |
| 289 | 1, /* 1 bit per pixel */ | |
| 290 | { 0 }, | |
| 291 | { 3*32*8+0, 3*32*8+1, 3*32*8+2, 3*32*8+3, 3*32*8+4, 3*32*8+5, 3*32*8+6, 3*32*8+7, | |
| 292 | 2*32*8+0, 2*32*8+1, 2*32*8+2, 2*32*8+3, 2*32*8+4, 2*32*8+5, 2*32*8+6, 2*32*8+7, | |
| 293 | 1*32*8+0, 1*32*8+1, 1*32*8+2, 1*32*8+3, 1*32*8+4, 1*32*8+5, 1*32*8+6, 1*32*8+7, | |
| 294 | 0*32*8+0, 0*32*8+1, 0*32*8+2, 0*32*8+3, 0*32*8+4, 0*32*8+5, 0*32*8+6, 0*32*8+7 }, | |
| 295 | { 31*8, 30*8, 29*8, 28*8, 27*8, 26*8, 25*8, 24*8, | |
| 296 | 23*8, 22*8, 21*8, 20*8, 19*8, 18*8, 17*8, 16*8, | |
| 297 | 15*8, 14*8, 13*8, 12*8, 11*8, 10*8, 9*8, 8*8, | |
| 298 | 7*8, 6*8, 5*8, 4*8, 3*8, 2*8, 1*8, 0*8 }, | |
| 299 | 32*4*8 /* every sprite takes 128 consecutive bytes */ | |
| 300 | }; | |
| 301 | 333 | |
| 302 | 334 | |
| 303 | 335 | static GFXDECODE_START( crbaloon ) |
| 304 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) | |
| 305 | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 0, 16 ) | |
| 336 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) | |
| 306 | 337 | GFXDECODE_END |
| 307 | 338 | |
| 308 | 339 | |
| 309 | static const struct SN76477interface sn76477_interface = | |
| 340 | ||
| 341 | /************************************* | |
| 342 | * | |
| 343 | * Machine reset | |
| 344 | * | |
| 345 | *************************************/ | |
| 346 | ||
| 347 | MACHINE_RESET( crballoon ) | |
| 310 | 348 | { |
| 311 | RES_K( 47), /* 4 noise_res */ | |
| 312 | RES_K(330), /* 5 filter_res */ | |
| 313 | CAP_P(470), /* 6 filter_cap */ | |
| 314 | RES_K(220), /* 7 decay_res */ | |
| 315 | CAP_U(1.0), /* 8 attack_decay_cap */ | |
| 316 | RES_K(4.7), /* 10 attack_res */ | |
| 317 | RES_M( 1), /* 11 amplitude_res */ | |
| 318 | RES_K(200), /* 12 feedback_res */ | |
| 319 | 5.0, /* 16 vco_voltage */ | |
| 320 | CAP_P(470), /* 17 vco_cap */ | |
| 321 | RES_K(330), /* 18 vco_res */ | |
| 322 | 5.0, /* 19 pitch_voltage */ | |
| 323 | RES_K( 20), /* 20 slf_res (variable) */ | |
| 324 | CAP_P(420), /* 21 slf_cap */ | |
| 325 | CAP_U(1.0), /* 23 oneshot_cap */ | |
| 326 | RES_K( 47), /* 24 oneshot_res */ | |
| 327 | 0, /* 22 vco */ | |
| 328 | 0, /* 26 mixer A */ | |
| 329 | 0, /* 25 mixer B (variable) */ | |
| 330 | 1, /* 27 mixer C */ | |
| 331 | 1, /* 1 envelope 1 */ | |
| 332 | 0, /* 28 envelope 2 */ | |
| 333 | 0 /* 9 enable (variable) */ | |
| 334 | }; | |
| 349 | pc3092_reset(); | |
| 350 | port_sound_w(0, 0); | |
| 351 | port_music_w(0, 0); | |
| 352 | } | |
| 335 | 353 | |
| 336 | 354 | |
| 355 | ||
| 356 | /************************************* | |
| 357 | * | |
| 358 | * Machine driver | |
| 359 | * | |
| 360 | *************************************/ | |
| 361 | ||
| 337 | 362 | static MACHINE_DRIVER_START( crbaloon ) |
| 338 | 363 | |
| 339 | 364 | /* basic machine hardware */ |
| 340 | MDRV_CPU_ADD(Z80, 3072000) /* 3.072 MHz ????? */ | |
| 341 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) | |
| 342 | MDRV_CPU_IO_MAP(readport,writeport) | |
| 365 | MDRV_CPU_ADD(Z80, CRBALOON_MASTER_XTAL / 3) | |
| 366 | MDRV_CPU_PROGRAM_MAP(main_map,0) | |
| 367 | MDRV_CPU_IO_MAP(main_io_map,0) | |
| 343 | 368 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 344 | 369 | |
| 345 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 346 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 370 | MDRV_MACHINE_RESET(crballoon) | |
| 347 | 371 | |
| 348 | MDRV_MACHINE_START(crbaloon) | |
| 372 | /* video hardware */ | |
| 373 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_ALWAYS_UPDATE) | |
| 374 | MDRV_VIDEO_START(crbaloon) | |
| 375 | MDRV_VIDEO_UPDATE(crbaloon) | |
| 349 | 376 | |
| 350 | /* video hardware */ | |
| 351 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 352 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 353 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 354 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1) | |
| 355 | 377 | MDRV_GFXDECODE(crbaloon) |
| 356 | 378 | MDRV_PALETTE_LENGTH(16) |
| 379 | MDRV_PALETTE_INIT(crbaloon) | |
| 357 | 380 | MDRV_COLORTABLE_LENGTH(16*2) |
| 358 | 381 | |
| 359 | MDRV_PALETTE_INIT(crbaloon) | |
| 360 | MDRV_VIDEO_START(crbaloon) | |
| 361 | MDRV_VIDEO_UPDATE(crbaloon) | |
| 382 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 383 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 384 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 385 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 386 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1) | |
| 362 | 387 | |
| 363 | /* sound hardware */ | |
| 364 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 388 | /* audio hardware */ | |
| 389 | MDRV_IMPORT_FROM(crbaloon_audio) | |
| 365 | 390 | |
| 366 | MDRV_SOUND_ADD(SN76477, 0) | |
| 367 | MDRV_SOUND_CONFIG(sn76477_interface) | |
| 368 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0) | |
| 369 | ||
| 370 | MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0) | |
| 371 | MDRV_SOUND_CONFIG_DISCRETE(crbaloon) | |
| 372 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 373 | 391 | MACHINE_DRIVER_END |
| 374 | 392 | |
| 375 | 393 | |
| 376 | 394 | |
| 377 | /*************************************************************************** | |
| 395 | /************************************* | |
| 396 | * | |
| 397 | * ROM definitions | |
| 398 | * | |
| 399 | *************************************/ | |
| 378 | 400 | |
| 379 | Game driver(s) | |
| 380 | ||
| 381 | ***************************************************************************/ | |
| 382 | ||
| 383 | 401 | ROM_START( crbaloon ) |
| 384 | 402 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 385 | 403 | ROM_LOAD( "cl01.bin", 0x0000, 0x0800, CRC(9d4eef0b) SHA1(a8dd814ac2612073982123c91fa62deaf5bee242) ) |
| r1527 | r1528 | |
| 392 | 410 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 393 | 411 | ROM_LOAD( "cl07.bin", 0x0000, 0x0800, CRC(2c1fbea8) SHA1(41cf2aef74d56173057886512d989f6fa3682056) ) |
| 394 | 412 | |
| 395 | ROM_REGION( 0x0800, REGION_GFX2, | |
| 413 | ROM_REGION( 0x0800, REGION_GFX2, 0 | |
| 396 | 414 | ROM_LOAD( "cl08.bin", 0x0000, 0x0800, CRC(ba898659) SHA1(4291059b113ff91896f1f61a4c14956716edfe1e) ) |
| 397 | 415 | ROM_END |
| 398 | 416 | |
| 417 | ||
| 399 | 418 | ROM_START( crbalon2 ) |
| 400 | 419 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 401 | 420 | ROM_LOAD( "cl01.bin", 0x0000, 0x0800, CRC(9d4eef0b) SHA1(a8dd814ac2612073982123c91fa62deaf5bee242) ) |
| r1527 | r1528 | |
| 408 | 427 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 409 | 428 | ROM_LOAD( "cl07.bin", 0x0000, 0x0800, CRC(2c1fbea8) SHA1(41cf2aef74d56173057886512d989f6fa3682056) ) |
| 410 | 429 | |
| 411 | ROM_REGION( 0x0800, REGION_GFX2, | |
| 430 | ROM_REGION( 0x0800, REGION_GFX2, 0 | |
| 412 | 431 | ROM_LOAD( "cl08.bin", 0x0000, 0x0800, CRC(ba898659) SHA1(4291059b113ff91896f1f61a4c14956716edfe1e) ) |
| 413 | 432 | ROM_END |
| 414 | 433 | |
| 415 | 434 | |
| 416 | 435 | |
| 436 | /************************************* | |
| 437 | * | |
| 438 | * Game drivers | |
| 439 | * | |
| 440 | *************************************/ | |
| 441 | ||
| 417 | 442 | GAME( 1980, crbaloon, 0, crbaloon, crbaloon, 0, ROT90, "Taito Corporation", "Crazy Balloon (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 418 | 443 | GAME( 1980, crbalon2, crbaloon, crbaloon, crbaloon, 0, ROT90, "Taito Corporation", "Crazy Balloon (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| r1527 | r1528 | |
|---|---|---|
| 35 | 35 | WRITE8_HANDLER( mnchmobl_sprite_attr_w ); |
| 36 | 36 | READ8_HANDLER( mnchmobl_sprite_tile_r ); |
| 37 | 37 | WRITE8_HANDLER( mnchmobl_sprite_tile_w ); |
| 38 | READ8_HANDLER( mnchmobl_videoram_r ); | |
| 39 | WRITE8_HANDLER( mnchmobl_videoram_w ); | |
| 40 | 38 | VIDEO_UPDATE( mnchmobl ); |
| 41 | 39 | |
| 42 | 40 | |
| r1527 | r1528 | |
| 77 | 75 | AM_RANGE(0xac00, 0xafff) AM_READ(mnchmobl_sprite_tile_r) /* mirrored */ |
| 78 | 76 | AM_RANGE(0xb000, 0xb3ff) AM_READ(MRA8_RAM) |
| 79 | 77 | AM_RANGE(0xb400, 0xb7ff) AM_READ(mnchmobl_sprite_attr_r) /* mirrored */ |
| 80 | AM_RANGE(0xb800, 0xb8ff) AM_READ(MRA8_RAM) | |
| 81 | AM_RANGE(0xb900, 0xb9ff) AM_READ(mnchmobl_videoram_r) /* mirrored */ | |
| 78 | AM_RANGE(0xb800, 0xb8ff) AM_MIRROR(0x0100) AM_READ(MRA8_RAM) | |
| 82 | 79 | AM_RANGE(0xbe02, 0xbe02) AM_READ(input_port_3_r) /* DSW1 */ |
| 83 | 80 | AM_RANGE(0xbe03, 0xbe03) AM_READ(input_port_4_r) /* DSW2 */ |
| 84 | 81 | AM_RANGE(0xbf01, 0xbf01) AM_READ(input_port_0_r) /* coin, start */ |
| r1527 | r1528 | |
| 95 | 92 | AM_RANGE(0xac00, 0xafff) AM_WRITE(mnchmobl_sprite_tile_w) |
| 96 | 93 | AM_RANGE(0xb000, 0xb3ff) AM_WRITE(MWA8_RAM) AM_BASE(&mnchmobl_sprite_attr) |
| 97 | 94 | AM_RANGE(0xb400, 0xb7ff) AM_WRITE(mnchmobl_sprite_attr_w) |
| 98 | AM_RANGE(0xb800, 0xb | |
| 95 | AM_RANGE(0xb800, 0xb8ff) AM_MIRROR(0x0100) AM_WRITE(MWA8 | |
| 99 | 96 | AM_RANGE(0xba00, 0xbbff) AM_WRITE(MWA8_RAM) |
| 100 | 97 | AM_RANGE(0xbc00, 0xbc7f) AM_WRITE(MWA8_RAM) AM_BASE(&mnchmobl_status_vram) |
| 101 | 98 | AM_RANGE(0xbe00, 0xbe00) AM_WRITE(mnchmobl_soundlatch_w) |
| r1527 | r1528 | |
|---|---|---|
| 339 | 339 | |
| 340 | 340 | static MACHINE_DRIVER_START( btoads ) |
| 341 | 341 | |
| 342 | MDRV_CPU_ADD(TMS34020, CPU_CLOCK/2 | |
| 342 | MDRV_CPU_ADD(TMS34020, CPU_CLOCK/2 | |
| 343 | 343 | MDRV_CPU_CONFIG(tms_config) |
| 344 | 344 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 345 | 345 | |
| r1527 | r1528 | |
| 354 | 354 | |
| 355 | 355 | /* video hardware */ |
| 356 | 356 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 357 | MDRV_PALETTE_LENGTH(256) | |
| 357 | MDRV_VIDEO_START(btoads) | |
| 358 | MDRV_VIDEO_UPDATE(tms340x0) | |
| 358 | 359 | |
| 359 | 360 | MDRV_SCREEN_ADD("main", 0) |
| 360 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 361 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32 | |
| 361 | 362 | MDRV_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 640, 0, 512, 257, 0, 224) |
| 362 | 363 | |
| 363 | MDRV_VIDEO_START(btoads) | |
| 364 | MDRV_VIDEO_UPDATE(tms340x0) | |
| 365 | ||
| 366 | 364 | /* sound hardware */ |
| 367 | 365 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 368 | 366 |
| r1527 | r1528 | |
|---|---|---|
| 296 | 296 | MDRV_CPU_PROGRAM_MAP(madgear_readmem,madgear_writemem) |
| 297 | 297 | MDRV_CPU_VBLANK_INT(madgear_interrupt,3) /* 1 for vbl, 2 for control reads?? */ |
| 298 | 298 | |
| 299 | MDRV_CPU_ADD(Z80, 3579545) | |
| 300 | /* audio CPU */ /* Accurate */ | |
| 299 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) /* verified on pcb */ | |
| 300 | /* audio CPU */ | |
| 301 | 301 | MDRV_CPU_PROGRAM_MAP(mg_sound_readmem,mg_sound_writemem) |
| 302 | 302 | |
| 303 | 303 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 318 | 318 | /* sound hardware */ |
| 319 | 319 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 320 | 320 | |
| 321 | MDRV_SOUND_ADD(YM2203, 3579545) | |
| 321 | MDRV_SOUND_ADD(YM2203, XTAL_3_579545MHz) /* verified on pcb */ | |
| 322 | 322 | MDRV_SOUND_CONFIG(ym2203_interface) |
| 323 | 323 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 324 | 324 | |
| 325 | MDRV_SOUND_ADD(YM2203, 3579545) | |
| 325 | MDRV_SOUND_ADD(YM2203, XTAL_3_579545MHz) /* verified on pcb */ | |
| 326 | 326 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 327 | 327 | |
| 328 | MDRV_SOUND_ADD(OKIM6295, 1024188) | |
| 329 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) // clock frequency & pin 7 not verified | |
| 328 | MDRV_SOUND_ADD(OKIM6295, XTAL_10MHz/10) | |
| 329 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) /* verified on pcb */ | |
| 330 | 330 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.98) |
| 331 | 331 | MACHINE_DRIVER_END |
| 332 | 332 |
| r1527 | r1528 | |
|---|---|---|
| 362 | 362 | MDRV_CPU_PROGRAM_MAP(drgnmst_main_map, 0) |
| 363 | 363 | MDRV_CPU_VBLANK_INT(irq2_line_hold,1) |
| 364 | 364 | |
| 365 | MDRV_CPU_ADD(PIC16C55, | |
| 365 | MDRV_CPU_ADD(PIC16C55, | |
| 366 | 366 | /* Program and Data Maps are internal to the MCU */ |
| 367 | 367 | MDRV_CPU_IO_MAP(drgnmst_sound_io_map, 0) |
| 368 | 368 |
| r1527 | r1528 | |
|---|---|---|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | |
| 85 | static UINT | |
| 85 | static CUSTOM_INPUT( | |
| 86 | 86 | { |
| 87 | 87 | UINT32 coin_input = readinputportbytag(COIN_PORT_TAG); |
| 88 | 88 | |
| r1527 | r1528 | |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | |
| 146 | static UINT | |
| 146 | static CUSTOM_INPUT( | |
| 147 | 147 | { |
| 148 | 148 | return (get_vcounter() >> 6) & 0x01; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | |
| 152 | static UINT | |
| 152 | static CUSTOM_INPUT( | |
| 153 | 153 | { |
| 154 | 154 | return (get_vcounter() < VICDUAL_VBSTART); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | |
| 158 | static UINT | |
| 158 | static CUSTOM_INPUT( | |
| 159 | 159 | { |
| 160 | 160 | return (vicdual_get_vblank_comp(0) && !video_screen_get_hblank(0)); |
| 161 | 161 | } |
| r1527 | r1528 | |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | |
| 170 | static UINT | |
| 170 | static CUSTOM_INPUT( | |
| 171 | 171 | { |
| 172 | 172 | /* start the timer, if this is the first call */ |
| 173 | 173 | if (!timer_started) |
| r1527 | r1528 | |
| 2030 | 2030 | } |
| 2031 | 2031 | |
| 2032 | 2032 | |
| 2033 | static UINT | |
| 2033 | static CUSTOM_INPUT( | |
| 2034 | 2034 | { |
| 2035 | int offset = (FPTR)param; | |
| 2035 | 2036 | UINT32 answer = 0; |
| 2036 | 2037 | |
| 2037 | 2038 | if (samurai_protection_data == 0xab) |
| r1527 | r1528 | |
|---|---|---|
| 278 | 278 | |
| 279 | 279 | AM_RANGE(0xdfe0, 0xdfe0) AM_NOP |
| 280 | 280 | |
| 281 | AM_RANGE(0xe000, 0xe3ff) AM_WRITE(pturn_videoram_w | |
| 281 | AM_RANGE(0xe000, 0xe3ff) AM_READWRITE(MRA8_RAM, pturn_videoram_w | |
| 282 | 282 | AM_RANGE(0xe400, 0xe400) AM_WRITE(fgpalette_w) |
| 283 | 283 | AM_RANGE(0xe800, 0xe800) AM_WRITE(sound_w) |
| 284 | 284 |
| r1527 | r1528 | |
|---|---|---|
| 726 | 726 | ROM_LOAD( "high_icb_6-25a", 0x0e000, 0x2000, CRC(6ddc1750) SHA1(ee19206b7f4a98e3e7647414127f4e09b3e9134f) ) |
| 727 | 727 | /* Banked roms */ |
| 728 | 728 | ROM_LOAD( "jokerpoker_cb_10-19-88", 0x10000, 0x2000, CRC(a590af75) SHA1(63bc64fbc9ac0c489b1f4894d77a4be13d7251e7) ) |
| 729 | ROM_LOAD( "horserace_icb_1-1-87", 0x12000, 0x2000, CRC(6d5092e3) SHA1(ef99d1b858aef3c438c61c2b17e371dc6aca6623) ) | |
| 729 | 730 | ROM_END |
| 730 | 731 | |
| 731 | 732 | GAME( 1982, m075, 0, gselect, gselect, 0, ROT0, "Greyhound Electronics", "M075 Poker (Version 16.03B)", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| r1527 | r1528 | |
|---|---|---|
| 951 | 951 | Twin Eagle II |
| 952 | 952 | ***************************************************************************/ |
| 953 | 953 | |
| 954 | /* standalone board | |
| 954 | /* comes as either a standalone board or a standard | |
| 955 | 955 | |
| 956 | 956 | static ADDRESS_MAP_START( twineag2_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 957 | 957 | AM_RANGE(0x010000, 0x03ffff) AM_READ(MRA16_RAM ) // More RAM |
| r1527 | r1528 | |
|---|---|---|
| 23 | 23 | --------------------------------------------------------------------------- |
| 24 | 24 | 92 Last Fortress - Toride VG420 14100 |
| 25 | 25 | 92 Last Fortress - Toride (Ger)VG460-(A) 14100 |
| 26 | 92 Pang Poms | |
| 26 | 92 Pang Pom's | |
| 27 | 27 | 92 Sky Alert VG420 14100 |
| 28 | 28 | 92 The Karate Tournament VG460-B 14100 |
| 29 | 29 | 93? Lady Killer / Moeyo Gonta!! VG460-B 14100 |
| r1527 | r1528 | |
| 1681 | 1681 | |
| 1682 | 1682 | |
| 1683 | 1683 | /*************************************************************************** |
| 1684 | Pang Poms | |
| 1684 | Pang Pom's | |
| 1685 | 1685 | ***************************************************************************/ |
| 1686 | 1686 | |
| 1687 | 1687 | static ADDRESS_MAP_START( pangpoms_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r1527 | r1528 | |
| 2595 | 2595 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) |
| 2596 | 2596 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) |
| 2597 | 2597 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 2598 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START3 ) | |
| 2599 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START4 ) | |
| 2598 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2599 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2600 | 2600 | INPUT_PORTS_END |
| 2601 | 2601 | |
| 2602 | 2602 | /*************************************************************************** |
| r1527 | r1528 | |
| 3211 | 3211 | |
| 3212 | 3212 | |
| 3213 | 3213 | /*************************************************************************** |
| 3214 | Pang Poms | |
| 3214 | Pang Pom's | |
| 3215 | 3215 | ***************************************************************************/ |
| 3216 | 3216 | |
| 3217 | 3217 | static INPUT_PORTS_START( pangpoms ) |
| r1527 | r1528 | |
| 5509 | 5509 | |
| 5510 | 5510 | /*************************************************************************** |
| 5511 | 5511 | |
| 5512 | Pang Poms (c) 1992 Metro | |
| 5512 | Pang Pom's (c) 1992 Metro | |
| 5513 | 5513 | |
| 5514 | 5514 | Pcb code: VG420 (Same as Toride) |
| 5515 | 5515 | |
| r1527 | r1528 | |
| 5878 | 5878 | |
| 5879 | 5879 | /* year rom clone machine inputs init */ |
| 5880 | 5880 | GAME( 1992, karatour, 0, karatour, karatour, karatour, ROT0, "Mitchell", "The Karate Tournament", GAME_IMPERFECT_GRAPHICS ) |
| 5881 | GAME( 1992, pangpoms, 0, pangpoms, pangpoms, metro, ROT0, "Metro", "Pang Poms" , 0 ) | |
| 5882 | GAME( 1992, pangpomm, pangpoms, pangpoms, pangpoms, metro, ROT0, "Metro (Mitchell license)", "Pang Poms (Mitchell)" , 0 ) | |
| 5881 | GAME( 1992, pangpoms, 0, pangpoms, pangpoms, metro, ROT0, "Metro", "Pang Pom's" , 0 ) | |
| 5882 | GAME( 1992, pangpomm, pangpoms, pangpoms, pangpoms, metro, ROT0, "Metro (Mitchell license)", "Pang Pom's (Mitchell)" , 0 ) | |
| 5883 | 5883 | GAME( 1992, skyalert, 0, skyalert, skyalert, metro, ROT270, "Metro", "Sky Alert" , 0 ) |
| 5884 | 5884 | GAME( 1993?,ladykill, 0, karatour, ladykill, karatour, ROT90, "Yanyaka (Mitchell license)", "Lady Killer", GAME_IMPERFECT_GRAPHICS ) |
| 5885 | 5885 | GAME( 1993?,moegonta, ladykill, karatour, moegonta, karatour, ROT90, "Yanyaka", "Moeyo Gonta!! (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| r1527 | r1528 | |
|---|---|---|
| 214 | 214 | int x; |
| 215 | 215 | UINT16 *src = (UINT16 *)memory_region(REGION_CPU1); |
| 216 | 216 | |
| 217 | UINT16 typedat[16] = { | |
| 217 | static const UINT16 typedat[16] = { | |
| 218 | 218 | 1,1,1,1, 1,1,1,1, |
| 219 | 219 | 1,0,0,1, 1,0,1,1 |
| 220 | 220 | }; |
| r1527 | r1528 | |
|---|---|---|
| 301 | 301 | |
| 302 | 302 | /* bit 0x200 selects internal clocking, which is 1/2 the main CPU clock rate */ |
| 303 | 303 | if (data & 0x200) |
| 304 | timer_rate = (double) | |
| 304 | timer_rate = (double)( | |
| 305 | 305 | else |
| 306 | 306 | timer_rate = 10000000.; |
| 307 | 307 | } |
| r1527 | r1528 | |
|---|---|---|
| 1461 | 1461 | |
| 1462 | 1462 | static TIMER_CALLBACK( keyboard_timer_callback ) |
| 1463 | 1463 | { |
| 1464 | const int kb_uart_channel[2] = { 1, 0 }; | |
| 1464 | static const int kb_uart_channel[2] = { 1, 0 }; | |
| 1465 | 1465 | int keyboard; |
| 1466 | 1466 | int i; |
| 1467 | 1467 |
| r1527 | r1528 | |
|---|---|---|
| 492 | 492 | 2 irqs/frame give good music tempo but also SOUND ERROR in test mode, |
| 493 | 493 | 4 irqs/frame give SOUND OK in test mode but music seems to be running too fast */ |
| 494 | 494 | |
| 495 | MDRV_CPU_ADD(M68705,2000000 | |
| 495 | MDRV_CPU_ADD(M68705,2000000 | |
| 496 | 496 | MDRV_CPU_PROGRAM_MAP(m68705_readmem,m68705_writemem) |
| 497 | 497 | |
| 498 | 498 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 212 | 212 | AM_RANGE(0xc000, 0xffff) AM_WRITE(MWA8_ROM) /* Super Bagman only */ |
| 213 | 213 | AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* hidden portion of color RAM */ |
| 214 | 214 | /* here only to initialize the pointer, */ |
| 215 | /* writes are handled by colorram_w */ | |
| 215 | /* writes are handled by bagman_colorram_w */ | |
| 216 | 216 | AM_RANGE(0xa800, 0xa805) AM_WRITE(bagman_ls259_w) /* TMS5110 driving state machine */ |
| 217 | 217 | AM_RANGE(0x9c00, 0x9fff) AM_WRITE(MWA8_NOP) /* written to, but unused */ |
| 218 | 218 | AM_RANGE(0xa004, 0xa004) AM_WRITE(bagman_coin_counter_w) |
| r1527 | r1528 | |
| 243 | 243 | AM_RANGE(0xa003, 0xa003) AM_WRITE(MWA8_RAM) AM_BASE(&bagman_video_enable) |
| 244 | 244 | AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* hidden portion of color RAM */ |
| 245 | 245 | /* here only to initialize the pointer, */ |
| 246 | /* writes are handled by colorram_w */ | |
| 246 | /* writes are handled by bagman_colorram_w */ | |
| 247 | 247 | AM_RANGE(0x9c00, 0x9fff) AM_WRITE(MWA8_NOP) /* written to, but unused */ |
| 248 | 248 | AM_RANGE(0xa004, 0xa004) AM_WRITE(bagman_coin_counter_w) |
| 249 | 249 | #if 0 |
| r1527 | r1528 | |
|---|---|---|
| 54 | 54 | #include "sound/okim6295.h" |
| 55 | 55 | #include "sound/2413intf.h" |
| 56 | 56 | |
| 57 | #define DUNHUANG_DEBUG 0 | |
| 58 | ||
| 57 | 59 | /*************************************************************************** |
| 58 | 60 | Video Hardware |
| 59 | 61 | ***************************************************************************/ |
| r1527 | r1528 | |
| 113 | 115 | { |
| 114 | 116 | int layers_ctrl = -1; |
| 115 | 117 | |
| 116 | #if | |
| 118 | #if | |
| 117 | 119 | if (input_code_pressed(KEYCODE_Z)) |
| 118 | 120 | { |
| 119 | 121 | int msk = 0; |
| r1527 | r1528 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 41 | 41 | AM_RANGE(0x0000, 0xbfff) AM_READ(MRA8_ROM) |
| 42 | AM_RANGE(0xc000, 0xcfff) AM_READ( | |
| 42 | AM_RANGE(0xc000, 0xcfff) AM_READ(MRA8 | |
| 43 | 43 | AM_RANGE(0xd800, 0xd800) AM_READ(input_port_0_r) /* IN 0 */ |
| 44 | 44 | AM_RANGE(0xd801, 0xd801) AM_READ(input_port_1_r) /* IN 1 */ |
| 45 | 45 | AM_RANGE(0xd802, 0xd802) AM_READ(input_port_2_r) /* IN 2 */ |
| r1527 | r1528 | |
|---|---|---|
| 472 | 472 | * |
| 473 | 473 | *************************************/ |
| 474 | 474 | |
| 475 | ||
| 475 | ||
| 476 | 476 | { |
| 477 | 477 | /* allocate memory */ |
| 478 | 478 | cvs_color_ram = auto_malloc(0x400); |
| r1527 | r1528 | |
| 651 | 651 | |
| 652 | 652 | static GFXDECODE_START( cvs ) |
| 653 | 653 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 256+3 ) /* chars */ |
| 654 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, (256+3)*8, 8 ) /* s2636 #1 */ | |
| 655 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, (256+3)*8, 8 ) /* s2636 #2 */ | |
| 656 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, (256+3)*8, 8 ) /* s2636 #3 */ | |
| 654 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, (256+3)*8, 8 ) /* s2636 #1 */ | |
| 655 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, (256+3)*8, 8 ) /* s2636 #2 */ | |
| 656 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, (256+3)*8, 8 ) /* s2636 #3 */ | |
| 657 | 657 | GFXDECODE_END |
| 658 | 658 | |
| 659 | 659 | |
| r1527 | r1528 | |
| 683 | 683 | MDRV_MACHINE_START(cvs) |
| 684 | 684 | |
| 685 | 685 | /* video hardware */ |
| 686 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 686 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_ALWAYS_UPDATE) | |
| 687 | 687 | MDRV_VIDEO_START(cvs) |
| 688 | 688 | MDRV_VIDEO_UPDATE(cvs) |
| 689 | 689 |
| r1527 | r1528 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | CPU : 68000 + [65C02] (only in the earlier games) |
| 9 | Custom : X1-001A X1-002A | |
| 9 | Custom : X1-001A X1-002A (SDIP64) Sprites | |
| 10 | 10 | X1-001 |
| 11 | 11 | X1-002 |
| 12 | 12 | X1-003 |
| 13 | X1-004 | |
| 13 | X1-004 (SDIP52) Inputs | |
| 14 | 14 | X1-005 X0-005 |
| 15 | 15 | X1-006 X0-006 |
| 16 | X1-007 | |
| 17 | X1-010 Sound: 16 Bit PCM | |
| 18 | X1-011 [x2] X1-012 [x2] Tilemaps | |
| 16 | X1-007 (SDIP42) Vide DAC | |
| 17 | X1-010 (QFP80) Sound: 16 Bit PCM | |
| 18 | X1-011 X1-012 (QFP100) Tilemaps | |
| 19 | 19 | X1-014 Sprites? |
| 20 | 20 | |
| 21 | 21 | ------------------------------------------------------------------------------- |
| r1527 | r1528 | |
| 35 | 35 | P0-055-B 89 Wit's Athena |
| 36 | 36 | P0-055-D 90 Thunder & Lightning Romstar / Visco |
| 37 | 37 | Promat PCB 94 Wiggie Waggie(5) -- |
| 38 | P0-058-C 98 Internation Toote (6) Coinmaster | |
| 38 | 39 | P0-063-A 91 Rezon Allumer |
| 39 | 40 | P0-068-B (M6100723A) 92 Block Carnival Visco |
| 40 | 41 | P0-072-2 (prototype) 92 Blandia (prototype) Allumer |
| r1527 | r1528 | |
| 62 | 63 | P0-120-A (BP954KA) 95 Gundhara Banpresto |
| 63 | 64 | PO-122-A (SZR-001) 95 Zombie Raid American Sammy |
| 64 | 65 | ? 96 Crazy Fight Subsino |
| 65 | ||
| 66 | 66 | ------------------------------------------------------------------------------- |
| 67 | 67 | (1) YM2203 + YM3812 instead of X1-010 |
| 68 | 68 | (2) wrong colors |
| r1527 | r1528 | |
| 75 | 75 | there are a few gfx emulation bugs (flipping of some border tiles and |
| 76 | 76 | sprites not leaving the screen correctly) its possible the custom hw |
| 77 | 77 | doesn't behave *exactly* the same as the original seta hw |
| 78 | (6) To enter test mode press 9 (open door), then F2 (turn function key), then E (bet 3-4). | |
| 78 | 79 | |
| 79 | 80 | Notes: |
| 80 | 81 | - The NEC D4701 used by Caliber 50 is a mouse interface IC (uPD4701c). |
| r1527 | r1528 | |
| 1256 | 1257 | |
| 1257 | 1258 | ***************************************************************************/ |
| 1258 | 1259 | |
| 1260 | /*************************************************************************** | |
| 1261 | Internation Toote | |
| 1259 | 1262 | |
| 1263 | Main PCB (P0-058C): | |
| 1264 | ||
| 1265 | TOSHIBA TMP68HC000N-16 | |
| 1266 | X1-010 | |
| 1267 | X1-001A | |
| 1268 | X1-002A | |
| 1269 | X1-004 (x2) | |
| 1270 | X1-007 | |
| 1271 | X1-011 | |
| 1272 | X1-012 | |
| 1273 | HD63B50P | |
| 1274 | ||
| 1275 | Horse Race I/O Expansion (PCB-HRE-000): | |
| 1276 | ||
| 1277 | MC68B50CP (x2) | |
| 1278 | EF68B21P (x2) | |
| 1279 | ||
| 1280 | Note: on screen copyright is (c)1998 Coinmaster. | |
| 1281 | The I/O board has (c)1993 Coinmaster. | |
| 1282 | ||
| 1283 | ***************************************************************************/ | |
| 1284 | ||
| 1260 | 1285 | #include "driver.h" |
| 1261 | 1286 | #include "seta.h" |
| 1287 | #include "machine/6821pia.h" | |
| 1288 | #include "machine/6850acia.h" | |
| 1289 | #include "machine/msm6242.h" | |
| 1262 | 1290 | #include "sound/2203intf.h" |
| 1263 | 1291 | #include "sound/2612intf.h" |
| 1264 | 1292 | #include "sound/3812intf.h" |
| r1527 | r1528 | |
| 1291 | 1319 | UINT16 max = uPD71054.max[no]&0xffff; |
| 1292 | 1320 | |
| 1293 | 1321 | if( max != 0 ) { |
| 1294 | attotime period = attotime_mul(ATTOTIME_IN_HZ( | |
| 1322 | attotime period = attotime_mul(ATTOTIME_IN_HZ( | |
| 1295 | 1323 | timer_adjust( uPD71054.timer[no], period, no, attotime_zero ); |
| 1296 | 1324 | } else { |
| 1297 | 1325 | timer_adjust( uPD71054.timer[no], attotime_never, no, attotime_never); |
| r1527 | r1528 | |
| 3071 | 3099 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE(&spriteram16_2) // Sprites Code + X + Attr |
| 3072 | 3100 | ADDRESS_MAP_END |
| 3073 | 3101 | |
| 3102 | /*************************************************************************** | |
| 3103 | International Toote | |
| 3104 | ***************************************************************************/ | |
| 3074 | 3105 | |
| 3106 | static READ16_HANDLER( inttoote_dsw_r ) | |
| 3107 | { | |
| 3108 | int shift = offset * 4; | |
| 3109 | return ((((readinputport(0) >> shift) & 0xf)) << 0) | | |
| 3110 | ((((readinputport(1) >> shift) & 0xf)) << 4) | | |
| 3111 | ((((readinputport(1) >> (shift+8)) & 0xf)) << 8) ; | |
| 3112 | } | |
| 3113 | ||
| 3114 | static UINT16 *inttoote_key_select; | |
| 3115 | static READ16_HANDLER( inttoote_key_r ) | |
| 3116 | { | |
| 3117 | switch( *inttoote_key_select ) | |
| 3118 | { | |
| 3119 | case 0x08: return readinputport(4+0); | |
| 3120 | case 0x10: return readinputport(4+1); | |
| 3121 | case 0x20: return readinputport(4+2); | |
| 3122 | case 0x40: return readinputport(4+3); | |
| 3123 | case 0x80: return readinputport(4+4); | |
| 3124 | } | |
| 3125 | logerror("%06X: unknown read, select = %04x\n",activecpu_get_pc(),*inttoote_key_select); | |
| 3126 | return 0xffff; | |
| 3127 | } | |
| 3128 | ||
| 3129 | static UINT16 *inttoote_700000; | |
| 3130 | static READ16_HANDLER( inttoote_700000_r ) | |
| 3131 | { | |
| 3132 | return inttoote_700000[offset] & 0x3f; | |
| 3133 | } | |
| 3134 | ||
| 3135 | static ADDRESS_MAP_START( inttoote_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 3136 | AM_RANGE(0x000000, 0x1fffff) AM_ROM // ROM (up to 2MB) | |
| 3137 | ||
| 3138 | AM_RANGE(0x200000, 0x200001) AM_READWRITE(inttoote_key_r, MWA16_RAM) AM_BASE(&inttoote_key_select) | |
| 3139 | AM_RANGE(0x200002, 0x200003) AM_READ(input_port_2_word_r) | |
| 3140 | AM_RANGE(0x200010, 0x200011) AM_READWRITE(input_port_3_word_r, MWA16_NOP) | |
| 3141 | ||
| 3142 | AM_RANGE(0x300000, 0x300001) AM_WRITE(watchdog_reset16_w) // Watchdog | |
| 3143 | ||
| 3144 | AM_RANGE(0x300010, 0x300011) AM_WRITE(MWA16_NOP) // lev1 ack | |
| 3145 | AM_RANGE(0x300020, 0x300021) AM_WRITE(MWA16_NOP) // lev2 ack | |
| 3146 | AM_RANGE(0x300040, 0x300041) AM_WRITE(MWA16_NOP) // lev4 ack | |
| 3147 | AM_RANGE(0x300060, 0x300061) AM_WRITE(MWA16_NOP) // lev6 ack | |
| 3148 | ||
| 3149 | AM_RANGE(0x500000, 0x500003) AM_READ(inttoote_dsw_r) // DSW x 3 | |
| 3150 | ||
| 3151 | AM_RANGE(0x700000, 0x700101) AM_READWRITE(inttoote_700000_r,MWA16_RAM) AM_BASE(&inttoote_700000) | |
| 3152 | ||
| 3153 | AM_RANGE(0x800000, 0x80001f) AM_READWRITE(msm6242_lsb_r,msm6242_lsb_w) // 6242RTC | |
| 3154 | ||
| 3155 | AM_RANGE(0x900000, 0x903fff) AM_READWRITE( seta_sound_word_r, seta_sound_word_w ) // Sound | |
| 3156 | ||
| 3157 | AM_RANGE(0xa00000, 0xa00005) AM_WRITE(MWA16_RAM) AM_BASE(&seta_vctrl_0 ) // VRAM 0&1 Ctrl | |
| 3158 | AM_RANGE(0xb00000, 0xb03fff) AM_READWRITE(MRA16_RAM,seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM 0&1 | |
| 3159 | ||
| 3160 | AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000 | |
| 3161 | ||
| 3162 | AM_RANGE(0xd00000, 0xd00607) AM_RAM AM_BASE(&spriteram16 ) // Sprites Y | |
| 3163 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr | |
| 3164 | ||
| 3165 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // RAM | |
| 3166 | ADDRESS_MAP_END | |
| 3167 | ||
| 3168 | ||
| 3075 | 3169 | /*************************************************************************** |
| 3076 | 3170 | |
| 3077 | 3171 | |
| r1527 | r1528 | |
| 6249 | 6343 | PORT_DIPSETTING( 0x0000, "3" ) |
| 6250 | 6344 | INPUT_PORTS_END |
| 6251 | 6345 | |
| 6346 | /*************************************************************************** | |
| 6347 | International Toote | |
| 6348 | ***************************************************************************/ | |
| 6252 | 6349 | |
| 6350 | static INPUT_PORTS_START( inttoote ) | |
| 6351 | PORT_START_TAG("IN0") // DSW 1 | |
| 6352 | PORT_DIPNAME( 0x03, 0x03, "Max Bet" ) | |
| 6353 | PORT_DIPSETTING( 0x03, "10" ) | |
| 6354 | PORT_DIPSETTING( 0x02, "20" ) | |
| 6355 | PORT_DIPSETTING( 0x01, "99" ) | |
| 6356 | // PORT_DIPSETTING( 0x00, "99" ) | |
| 6357 | PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coinage ) ) | |
| 6358 | PORT_DIPSETTING( 0x1c, DEF_STR( 1C_1C ) ) | |
| 6359 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) | |
| 6360 | PORT_DIPSETTING( 0x14, DEF_STR( 1C_3C ) ) | |
| 6361 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_4C ) ) | |
| 6362 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) | |
| 6363 | PORT_DIPSETTING( 0x08, "1 Coin/10 Credits" ) | |
| 6364 | PORT_DIPSETTING( 0x04, "1 Coin/20 Credits" ) | |
| 6365 | PORT_DIPSETTING( 0x00, "1 Coin/50 Credits" ) | |
| 6366 | PORT_DIPNAME( 0x08, 0x08, "Unknown 1-3" ) | |
| 6367 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 6368 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 6369 | PORT_DIPNAME( 0x10, 0x10, "Unknown 1-4" ) | |
| 6370 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 6371 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 6372 | PORT_DIPNAME( 0x20, 0x20, "Unknown 1-5" ) | |
| 6373 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 6374 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 6375 | PORT_DIPNAME( 0x40, 0x40, "Unknown 1-6" ) | |
| 6376 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 6377 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 6378 | PORT_DIPNAME( 0x80, 0x80, "Unknown 1-7" ) | |
| 6379 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 6380 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 6381 | ||
| 6382 | PORT_START_TAG("IN1") // DSW 2&3 | |
| 6383 | PORT_DIPNAME( 0x0001, 0x0001, "Unknown 2-0" ) | |
| 6384 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 6385 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 6386 | PORT_DIPNAME( 0x0002, 0x0002, "Unknown 2-1" ) | |
| 6387 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 6388 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 6389 | PORT_DIPNAME( 0x0004, 0x0004, "Unknown 2-2" ) | |
| 6390 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 6391 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 6392 | PORT_DIPNAME( 0x0018, 0x0018, "Betting Clock Speed" ) | |
| 6393 | PORT_DIPSETTING( 0x0018, "Slowest" ) | |
| 6394 | PORT_DIPSETTING( 0x0010, "Slower" ) | |
| 6395 | PORT_DIPSETTING( 0x0008, "Faster" ) | |
| 6396 | PORT_DIPSETTING( 0x0000, "Fastest" ) | |
| 6397 | PORT_DIPNAME( 0x01e0, 0x01e0, "Payout Rate" ) | |
| 6398 | PORT_DIPSETTING( 0x01e0, "80%" ) | |
| 6399 | PORT_DIPSETTING( 0x01c0, "81%" ) | |
| 6400 | PORT_DIPSETTING( 0x01a0, "82%" ) | |
| 6401 | PORT_DIPSETTING( 0x0180, "83%" ) | |
| 6402 | PORT_DIPSETTING( 0x0160, "84%" ) | |
| 6403 | PORT_DIPSETTING( 0x0140, "85%" ) | |
| 6404 | PORT_DIPSETTING( 0x0120, "86%" ) | |
| 6405 | PORT_DIPSETTING( 0x0100, "87%" ) | |
| 6406 | PORT_DIPSETTING( 0x00e0, "88%" ) | |
| 6407 | PORT_DIPSETTING( 0x00c0, "89%" ) | |
| 6408 | PORT_DIPSETTING( 0x00a0, "90%" ) | |
| 6409 | PORT_DIPSETTING( 0x0080, "91%" ) | |
| 6410 | PORT_DIPSETTING( 0x0060, "92%" ) | |
| 6411 | PORT_DIPSETTING( 0x0040, "93%" ) | |
| 6412 | PORT_DIPSETTING( 0x0020, "94%" ) | |
| 6413 | PORT_DIPSETTING( 0x0000, "95%" ) | |
| 6414 | PORT_DIPNAME( 0x0200, 0x0200, "Unknown 3-1" ) | |
| 6415 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 6416 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 6417 | PORT_DIPNAME( 0x0400, 0x0400, "Payout" ) | |
| 6418 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) | |
| 6419 | PORT_DIPSETTING( 0x0400, DEF_STR( On ) ) | |
| 6420 | PORT_DIPNAME( 0x0800, 0x0800, "Horses" ) | |
| 6421 | PORT_DIPSETTING( 0x0800, "Random" ) | |
| 6422 | PORT_DIPSETTING( 0x0000, "Cyclic" ) | |
| 6423 | PORT_DIPNAME( 0x1000, 0x1000, "Higher Odds" ) | |
| 6424 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 6425 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 6426 | PORT_DIPNAME( 0x2000, 0x2000, "Unknown 3-5" ) | |
| 6427 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 6428 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 6429 | PORT_DIPNAME( 0x4000, 0x4000, "Unknown 3-6" ) | |
| 6430 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 6431 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 6432 | PORT_DIPNAME( 0x8000, 0x8000, "Unknown 3-7" ) | |
| 6433 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 6434 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 6435 | ||
| 6436 | PORT_START_TAG("IN2") | |
| 6437 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6438 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6439 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) // P1 coin out | |
| 6440 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6441 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6442 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6443 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6444 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6445 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6446 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6447 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SPECIAL ) // P2 coin out | |
| 6448 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6449 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6450 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6451 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6452 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6453 | ||
| 6454 | PORT_START_TAG("IN3") | |
| 6455 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Door Open") PORT_TOGGLE | |
| 6456 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START1 ) | |
| 6457 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Question Mark") | |
| 6458 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6459 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6460 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6461 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6462 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6463 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6464 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6465 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6466 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6467 | PORT_SERVICE( 0x1000, IP_ACTIVE_LOW ) // Function menu (electronic key switch, fitted beneath the front panel) | |
| 6468 | PORT_BIT( 0x6000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6469 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // Battery (0 = OK, 1 = NG) | |
| 6470 | /* | |
| 6471 | Betting Panel (keys) | |
| 6472 | ||
| 6473 | 1 1-2 2-3 3-4 4-5 5-6 (1QWERT) | |
| 6474 | 2 1-3 2-4 3-5 4-6 (2ASDF) | |
| 6475 | 3 1-4 2-5 3-6 (3ZXC) | |
| 6476 | 4 1-5 2-6 (4YU) | |
| 6477 | 5 1-6 (5H) | |
| 6478 | 6 (6) | |
| 6479 | */ | |
| 6480 | PORT_START_TAG("IN4") // 200000.w (0x08) | |
| 6481 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 1") PORT_CODE(KEYCODE_1_PAD) | |
| 6482 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 2") PORT_CODE(KEYCODE_2_PAD) | |
| 6483 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 3") PORT_CODE(KEYCODE_3_PAD) | |
| 6484 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 4") PORT_CODE(KEYCODE_4_PAD) | |
| 6485 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 5") PORT_CODE(KEYCODE_5_PAD) | |
| 6486 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6487 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6488 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6489 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 1") //PORT_CODE(KEYCODE_) | |
| 6490 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 2") //PORT_CODE(KEYCODE_) | |
| 6491 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 3") //PORT_CODE(KEYCODE_) | |
| 6492 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 4") //PORT_CODE(KEYCODE_) | |
| 6493 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 5") //PORT_CODE(KEYCODE_) | |
| 6494 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6495 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6496 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6497 | ||
| 6498 | PORT_START_TAG("IN5") // 200000.w (0x10) | |
| 6499 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 6") PORT_CODE(KEYCODE_6_PAD) | |
| 6500 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Collect") | |
| 6501 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6502 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6503 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Cancel") | |
| 6504 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6505 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6506 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6507 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 6") //PORT_CODE(KEYCODE_) | |
| 6508 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Collect") //PORT_CODE(KEYCODE_) | |
| 6509 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6510 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6511 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Cancel") //PORT_CODE(KEYCODE_) | |
| 6512 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6513 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6514 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6515 | ||
| 6516 | PORT_START_TAG("IN6") // 200000.w (0x20) | |
| 6517 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 1-2") PORT_CODE(KEYCODE_Q) | |
| 6518 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 1-3") PORT_CODE(KEYCODE_A) | |
| 6519 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 1-4") PORT_CODE(KEYCODE_Z) | |
| 6520 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 1-5") PORT_CODE(KEYCODE_Y) | |
| 6521 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 1-6") PORT_CODE(KEYCODE_H) | |
| 6522 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6523 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6524 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6525 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 1-2") //PORT_CODE(KEYCODE_) | |
| 6526 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 1-3") //PORT_CODE(KEYCODE_) | |
| 6527 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 1-4") //PORT_CODE(KEYCODE_) | |
| 6528 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 1-5") //PORT_CODE(KEYCODE_) | |
| 6529 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 1-6") //PORT_CODE(KEYCODE_) | |
| 6530 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6531 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6532 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6533 | ||
| 6534 | PORT_START_TAG("IN7") // 200000.w (0x40) | |
| 6535 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 2-3") PORT_CODE(KEYCODE_W) | |
| 6536 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 2-4") PORT_CODE(KEYCODE_S) | |
| 6537 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 2-5") PORT_CODE(KEYCODE_X) | |
| 6538 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 2-6") PORT_CODE(KEYCODE_U) | |
| 6539 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 3-4") PORT_CODE(KEYCODE_E) | |
| 6540 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6541 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6542 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6543 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 2-3") //PORT_CODE(KEYCODE_) | |
| 6544 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 2-4") //PORT_CODE(KEYCODE_) | |
| 6545 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 2-5") //PORT_CODE(KEYCODE_) | |
| 6546 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 2-6") //PORT_CODE(KEYCODE_) | |
| 6547 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 3-4") //PORT_CODE(KEYCODE_) | |
| 6548 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6549 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6550 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6551 | ||
| 6552 | PORT_START_TAG("IN8") // 200000.w (0x80) | |
| 6553 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 3-5") PORT_CODE(KEYCODE_D) | |
| 6554 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 3-6") PORT_CODE(KEYCODE_C) | |
| 6555 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 4-5") PORT_CODE(KEYCODE_R) | |
| 6556 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 4-6") PORT_CODE(KEYCODE_F) | |
| 6557 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 5-6") PORT_CODE(KEYCODE_T) | |
| 6558 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6559 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6560 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6561 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 3-5") //PORT_CODE(KEYCODE_) | |
| 6562 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 3-6") //PORT_CODE(KEYCODE_) | |
| 6563 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 4-5") //PORT_CODE(KEYCODE_) | |
| 6564 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 4-6") //PORT_CODE(KEYCODE_) | |
| 6565 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Bet 5-6") //PORT_CODE(KEYCODE_) | |
| 6566 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6567 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6568 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 6569 | INPUT_PORTS_END | |
| 6570 | ||
| 6571 | ||
| 6253 | 6572 | /*************************************************************************** |
| 6254 | 6573 | |
| 6255 | 6574 | |
| r1527 | r1528 | |
| 6482 | 6801 | GFXDECODE_ENTRY( REGION_GFX3, 0, layout_packed_6bits_3roms, 16*32, 32 ) // [2] Layer 2 |
| 6483 | 6802 | GFXDECODE_END |
| 6484 | 6803 | |
| 6804 | /*************************************************************************** | |
| 6805 | International Toote | |
| 6806 | ***************************************************************************/ | |
| 6485 | 6807 | |
| 6808 | static GFXDECODE_START( inttoote ) | |
| 6809 | GFXDECODE_ENTRY( REGION_GFX1, 0, layout_planes, 0, 32 ) // [0] Sprites | |
| 6810 | GFXDECODE_ENTRY( REGION_GFX2, 0, layout_planes_2roms_split, 16*32*0, 32 ) // [1] Layer 1 | |
| 6811 | GFXDECODE_END | |
| 6486 | 6812 | |
| 6487 | 6813 | /*************************************************************************** |
| 6488 | 6814 | |
| r1527 | r1528 | |
| 7954 | 8280 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 7955 | 8281 | MACHINE_DRIVER_END |
| 7956 | 8282 | |
| 8283 | /*************************************************************************** | |
| 8284 | International Toote | |
| 8285 | ***************************************************************************/ | |
| 7957 | 8286 | |
| 8287 | // Test mode shows a 16ms and 2ms counters | |
| 8288 | static INTERRUPT_GEN( inttoote_interrupt ) | |
| 8289 | { | |
| 8290 | switch (cpu_getiloops()) | |
| 8291 | { | |
| 8292 | case 0: | |
| 8293 | case 1: | |
| 8294 | case 2: | |
| 8295 | case 3: | |
| 8296 | case 4: | |
| 8297 | case 5: | |
| 8298 | case 6: | |
| 8299 | case 7: cpunum_set_input_line(0, 6, HOLD_LINE); break; | |
| 7958 | 8300 | |
| 8301 | case 8: cpunum_set_input_line(0, 2, HOLD_LINE); break; | |
| 8302 | ||
| 8303 | case 9: cpunum_set_input_line(0, 1, HOLD_LINE); break; | |
| 8304 | ||
| 8305 | case 10: cpunum_set_input_line(0, 4, HOLD_LINE); break; | |
| 8306 | } | |
| 8307 | } | |
| 8308 | ||
| 8309 | static MACHINE_DRIVER_START( inttoote ) | |
| 8310 | ||
| 8311 | /* basic machine hardware */ | |
| 8312 | MDRV_CPU_ADD(M68000, 16000000) | |
| 8313 | MDRV_CPU_PROGRAM_MAP(inttoote_map,0) | |
| 8314 | MDRV_CPU_VBLANK_INT(inttoote_interrupt,8+1+1+1) | |
| 8315 | ||
| 8316 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 8317 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 8318 | ||
| 8319 | /* video hardware */ | |
| 8320 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 8321 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 8322 | MDRV_SCREEN_SIZE(64*8, 32*8) | |
| 8323 | MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 1*8, 31*8-1) | |
| 8324 | MDRV_GFXDECODE(inttoote) | |
| 8325 | MDRV_PALETTE_LENGTH(512 * 1) /* sprites, layer1, layer2 */ | |
| 8326 | ||
| 8327 | MDRV_PALETTE_INIT(inttoote) | |
| 8328 | MDRV_VIDEO_START(seta_1_layer) | |
| 8329 | MDRV_VIDEO_UPDATE(seta) | |
| 8330 | ||
| 8331 | /* sound hardware */ | |
| 8332 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") | |
| 8333 | ||
| 8334 | MDRV_SOUND_ADD(X1_010, 16000000) | |
| 8335 | MDRV_SOUND_CONFIG(seta_sound_intf) | |
| 8336 | MDRV_SOUND_ROUTE(0, "left", 1.0) | |
| 8337 | MDRV_SOUND_ROUTE(1, "right", 1.0) | |
| 8338 | MACHINE_DRIVER_END | |
| 8339 | ||
| 8340 | ||
| 7959 | 8341 | /*************************************************************************** |
| 7960 | 8342 | |
| 7961 | 8343 | ROMs Loading |
| r1527 | r1528 | |
| 9003 | 9385 | ROM_LOAD( "rom.u85", 0x00000, 0x40000, CRC(7b95d0bb) SHA1(f16dfd639eed6856e3ab93704caef592a07ba367) ) |
| 9004 | 9386 | ROM_END |
| 9005 | 9387 | |
| 9388 | ROM_START( inttoote ) | |
| 9389 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* 68000 Code */ | |
| 9390 | ROM_LOAD16_BYTE( "p523.v01_horse_prog_2.002", 0x000000, 0x10000, CRC(6ce6f1ad) SHA1(82e7100721ca5b1a736f6523610b1f1edf225c12) ) | |
| 9391 | ROM_LOAD16_BYTE( "p523.v01_horse_prog_1.003", 0x000001, 0x10000, CRC(921fcff5) SHA1(cabc4e9936621132a6fbaa1a925d205c5f04a2ae) ) | |
| 9392 | ROM_FILL( 0x020000, 0x60000, 0xff ) | |
| 9393 | ROM_LOAD16_WORD_SWAP( "ya_002_001.u18", 0x100000, 0x80000, CRC(dd108016) SHA1(1554de4cc1a9436a1e62400cd96c9752a2098f99) ) | |
| 9394 | ROM_FILL( 0x180000, 0x80000, 0xff ) | |
| 9006 | 9395 | |
| 9396 | ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ | |
| 9397 | ROM_LOAD( "ya_011_004.u10", 0x000000, 0x80000, CRC(eb74d2e0) SHA1(221ff6cc03ce57a7fcbe418f1c12a293990f8a7d) ) | |
| 9398 | ROM_LOAD( "p523.v01_horse_fore_1.u135", 0x070000, 0x10000, CRC(3a75df30) SHA1(f3b3a7428e3e125921686bc9aacde6b28b1947b5) ) | |
| 9399 | ||
| 9400 | ROM_LOAD( "ya_011_005.u17", 0x080000, 0x80000, CRC(4a6c804b) SHA1(b596b9b0b3b453c26f9c7f976ff4d56eac4fac04) ) | |
| 9401 | ROM_LOAD( "p523.v01_horse_fore_2.u134", 0x0f0000, 0x10000, CRC(26fb0339) SHA1(a134ecef00f690c82c8bddf26498b357ccf8d5c3) ) | |
| 9402 | ||
| 9403 | ROM_LOAD( "ya_011_006.u22", 0x100000, 0x80000, CRC(bfae01a5) SHA1(3be83972c3987e9bf722cd6db7770f074587301c) ) | |
| 9404 | ROM_LOAD( "p523.v01_horse_fore_3.u133", 0x170000, 0x10000, CRC(c38596af) SHA1(d27141e28d8f8352f065c55121412e604c199a9a) ) | |
| 9405 | ||
| 9406 | ROM_LOAD( "ya_011_007.u27", 0x180000, 0x80000, CRC(2dc7a294) SHA1(97f2aa9939a45aaa94d4aeb2fcd5b7f30204b942) ) | |
| 9407 | ROM_LOAD( "p523.v01_horse_fore_4.u132", 0x1f0000, 0x10000, CRC(64ef345e) SHA1(ef5d9f293ded44a2be91278549f5db8673fc7571) ) | |
| 9408 | ||
| 9409 | ROM_REGION( 0xc0000, REGION_GFX2, ROMREGION_DISPOSE ) /* Layer 1 */ | |
| 9410 | ROM_LOAD( "ya_011_008.u35", 0x000000, 0x40000, CRC(4b890f83) SHA1(fde6544898a0691b550f3045803f2e81cfeb5fe9) ) | |
| 9411 | ROM_LOAD( "p523.v01_horse_back_1.u137", 0x040000, 0x20000, CRC(39b221ea) SHA1(3b3367430733ed36d6a981cd2ec6df731d07c089) ) | |
| 9412 | ||
| 9413 | ROM_LOAD( "ya_011_009.u41", 0x060000, 0x40000, CRC(caa5e3c1) SHA1(63cccc5479040a02872febc8d7f2d46096e138d1) ) | |
| 9414 | ROM_LOAD( "p523.v01_horse_back_2.u136", 0x0a0000, 0x20000, CRC(9c5e32a0) SHA1(964734a626b5c7b9d7130addc642895df520dcb7) ) | |
| 9415 | ||
| 9416 | ROM_REGION( 0x400, REGION_PROMS, 0 ) /* Colours */ | |
| 9417 | ROM_LOAD16_BYTE( "ya-010.prom", 0x000, 0x200, CRC(778094b3) SHA1(270329a0d544dc7a8240d6dab08ccd54ea87ab70) ) | |
| 9418 | ROM_LOAD16_BYTE( "ya-011.prom", 0x001, 0x200, CRC(bd4fe2f6) SHA1(83d9f9db3fbfa2d172f5227c397ea4d5a9687015) ) | |
| 9419 | ||
| 9420 | ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* Samples */ | |
| 9421 | ROM_LOAD( "ya_011_013.u71", 0x00000, 0x80000, CRC(2bccaf47) SHA1(1658643444d575410f11b648e0d7ae6c43fcf1ea) ) | |
| 9422 | ROM_LOAD( "ya_011_012.u64", 0x80000, 0x80000, CRC(a8015ce6) SHA1(bb0b589856ec82e1fd42be9af89b07ba1d17e595) ) | |
| 9423 | ROM_END | |
| 9424 | ||
| 9425 | ||
| 9007 | 9426 | static READ16_HANDLER( twineagl_debug_r ) |
| 9008 | 9427 | { |
| 9009 | 9428 | /* At several points in the code, the program checks if four |
| r1527 | r1528 | |
| 9239 | 9658 | } |
| 9240 | 9659 | |
| 9241 | 9660 | /*************************************************************************** |
| 9661 | International Toote | |
| 9662 | ***************************************************************************/ | |
| 9242 | 9663 | |
| 9664 | static const pia6821_interface inttoote_pia0_intf = | |
| 9665 | { | |
| 9666 | /* PIA inputs: A, B, CA1, CB1, CA2, CB2 */ | |
| 9667 | 0, 0, 0, 0, 0, 0, | |
| 9668 | ||
| 9669 | /* PIA outputs: A, B, CA2, CB2 */ | |
| 9670 | 0, 0, 0, 0, | |
| 9671 | ||
| 9672 | /* PIA IRQs: A, B */ | |
| 9673 | 0, 0 | |
| 9674 | }; | |
| 9675 | ||
| 9676 | static const pia6821_interface inttoote_pia1_intf = | |
| 9677 | { | |
| 9678 | /* PIA inputs: A, B, CA1, CB1, CA2, CB2 */ | |
| 9679 | 0, 0, 0, 0, 0, 0, | |
| 9680 | ||
| 9681 | /* PIA outputs: A, B, CA2, CB2 */ | |
| 9682 | 0, 0, 0, 0, | |
| 9683 | ||
| 9684 | /* PIA IRQs: A, B */ | |
| 9685 | 0, 0 | |
| 9686 | }; | |
| 9687 | ||
| 9688 | static DRIVER_INIT( inttoote ) | |
| 9689 | { | |
| 9690 | UINT16 *ROM = (UINT16 *)memory_region( REGION_CPU1 ); | |
| 9691 | static UINT16 seta_vregs_unused[3] = {0,0,0}; | |
| 9692 | ||
| 9693 | // missing / unused video regs | |
| 9694 | seta_vregs = seta_vregs_unused; | |
| 9695 | ||
| 9696 | // code patches (to be removed...) | |
| 9697 | ROM[0x4de0/2] = 0x4e71; // hardware test errors | |
| 9698 | ROM[0x4de2/2] = 0x4e71; | |
| 9699 | ||
| 9700 | ROM[0x368a/2] = 0x50f9; // betting count down | |
| 9701 | ||
| 9702 | /* Initializing PIAs... (to be done) */ | |
| 9703 | pia_config(0, &inttoote_pia0_intf); | |
| 9704 | pia_config(1, &inttoote_pia1_intf); | |
| 9705 | } | |
| 9706 | ||
| 9707 | /*************************************************************************** | |
| 9708 | ||
| 9243 | 9709 | Game Drivers |
| 9244 | 9710 | |
| 9245 | 9711 | ***************************************************************************/ |
| 9246 | 9712 | |
| 9247 | /* Working Games: */ | |
| 9248 | ||
| 9249 | 9713 | /* 68000 + 65C02 */ |
| 9250 | 9714 | GAME( 1987, tndrcade, 0, tndrcade, tndrcade, 0, ROT270, "[Seta] (Taito license)", "Thundercade / Twin Formation" , 0) // Title/License: DSW |
| 9251 | 9715 | GAME( 1987, tndrcadj, tndrcade, tndrcade, tndrcadj, 0, ROT270, "[Seta] (Taito license)", "Tokusyu Butai U.A.G. (Japan)" , 0) // License: DSW |
| r1527 | r1528 | |
| 9295 | 9759 | GAME( 1995, sokonuke, 0, extdwnhl, sokonuke, 0, ROT0, "Sammy Industries", "Sokonuke Taisen Game (Japan)", GAME_IMPERFECT_SOUND ) |
| 9296 | 9760 | GAME( 1995, zombraid, 0, gundhara, zombraid, zombraid, ROT0, "American Sammy", "Zombie Raid (US)", GAME_NO_COCKTAIL ) |
| 9297 | 9761 | GAME( 1996, crazyfgt, 0, crazyfgt, crazyfgt, crazyfgt, ROT0, "Subsino", "Crazy Fight", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 9762 | GAME( 1998, inttoote, 0, inttoote, inttoote, inttoote, ROT0, "Coinmaster", "International Toote (Germany)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION ) |
| r1527 | r1528 | |
|---|---|---|
| 1373 | 1373 | MDRV_CPU_PROGRAM_MAP(sub_readmem,sub_writemem) |
| 1374 | 1374 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 1375 | 1375 | |
| 1376 | MDRV_CPU_ADD(I8X41, | |
| 1376 | MDRV_CPU_ADD(I8X41, | |
| 1377 | 1377 | MDRV_CPU_PROGRAM_MAP(i8742_readmem,i8742_writemem) |
| 1378 | 1378 | MDRV_CPU_IO_MAP(i8742_readport,i8742_writeport) |
| 1379 | 1379 |
| r1527 | r1528 | |
|---|---|---|
| 471 | 471 | static MACHINE_DRIVER_START( tp84 ) |
| 472 | 472 | |
| 473 | 473 | /* basic machine hardware */ |
| 474 | MDRV_CPU_ADD_TAG("cpu1",M6809, 1 | |
| 474 | MDRV_CPU_ADD_TAG("cpu1",M6809, XTAL_18_432MHz/12) /* verified on pcb */ | |
| 475 | 475 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 476 | 476 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 477 | 477 | |
| 478 | MDRV_CPU_ADD(M6809, 1 | |
| 478 | MDRV_CPU_ADD(M6809, XTAL_18_432MHz/12) /* verified on pcb */ | |
| 479 | 479 | MDRV_CPU_PROGRAM_MAP(readmem_cpu2,writemem_cpu2) |
| 480 | 480 | MDRV_CPU_VBLANK_INT(tp84_6809_interrupt,256) |
| 481 | 481 | |
| 482 | MDRV_CPU_ADD(Z80,1431818 | |
| 482 | MDRV_CPU_ADD(Z80,XTAL_14_31818MHz/4) /* verified on pcb */ | |
| 483 | 483 | /* audio CPU */ |
| 484 | 484 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 485 | 485 | |
| r1527 | r1528 | |
| 504 | 504 | /* sound hardware */ |
| 505 | 505 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 506 | 506 | |
| 507 | MDRV_SOUND_ADD(SN76489A, 1431818 | |
| 507 | MDRV_SOUND_ADD(SN76489A, XTAL_14_31818MHz/8) /* verified on pcb */ | |
| 508 | 508 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 0.75) |
| 509 | 509 | |
| 510 | MDRV_SOUND_ADD(SN76489A, 1431818 | |
| 510 | MDRV_SOUND_ADD(SN76489A, XTAL_14_31818MHz/8) /* verified on pcb */ | |
| 511 | 511 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "filter2", 0.75) |
| 512 | 512 | |
| 513 | MDRV_SOUND_ADD(SN76489A, 1431818 | |
| 513 | MDRV_SOUND_ADD(SN76489A, XTAL_14_31818MHz/8) /* verified on pcb */ | |
| 514 | 514 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "filter3", 0.75) |
| 515 | 515 | |
| 516 | 516 | MDRV_SOUND_ADD_TAG("filter1", FILTER_RC, 0) |
| r1527 | r1528 | |
|---|---|---|
| 520 | 520 | dc_vblank(); |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | READ64_HANDLER( naomi_arm_r ) | |
| 523 | static READ64_HANDLER( naomi_arm_r ) | |
| 524 | 524 | { |
| 525 | 525 | return *((UINT64 *)dc_sound_ram+offset); |
| 526 | 526 | } |
| 527 | 527 | |
| 528 | WRITE64_HANDLER( naomi_arm_w ) | |
| 528 | static WRITE64_HANDLER( naomi_arm_w ) | |
| 529 | 529 | { |
| 530 | 530 | COMBINE_DATA((UINT64 *)dc_sound_ram + offset); |
| 531 | 531 | } |
| 532 | 532 | |
| 533 | READ64_HANDLER( naomi_unknown1_r ) | |
| 533 | static READ64_HANDLER( naomi_unknown1_r ) | |
| 534 | 534 | { |
| 535 | 535 | if ((offset * 8) == 0xc0) // trick so that it does not "wait for multiboard sync" |
| 536 | 536 | return -1; |
| 537 | 537 | return 0; |
| 538 | 538 | } |
| 539 | 539 | |
| 540 | WRITE64_HANDLER( naomi_unknown1_w ) | |
| 540 | static WRITE64_HANDLER( naomi_unknown1_w ) | |
| 541 | 541 | { |
| 542 | 542 | } |
| 543 | 543 | |
| 544 | READ32_HANDLER( dc_aica_arm_r ) | |
| 544 | static READ32_HANDLER( dc_aica_arm_r ) | |
| 545 | 545 | { |
| 546 | 546 | return 0; |
| 547 | 547 | } |
| 548 | 548 | |
| 549 | WRITE32_HANDLER( dc_aica_arm_w ) | |
| 549 | static WRITE32_HANDLER( dc_aica_arm_w ) | |
| 550 | 550 | { |
| 551 | 551 | } |
| 552 | 552 | |
| r1527 | r1528 | |
| 572 | 572 | |
| 573 | 573 | // NOTE: all accesses are 16 or 32 bits wide but only 16 bits are valid |
| 574 | 574 | |
| 575 | READ64_HANDLER( naomi_rom_board_r ) | |
| 575 | static READ64_HANDLER( naomi_rom_board_r ) | |
| 576 | 576 | { |
| 577 | 577 | UINT8 *ROM = (UINT8 *)memory_region(REGION_USER1); |
| 578 | 578 | |
| r1527 | r1528 | |
| 595 | 595 | return U64(0xffffffffffffffff); |
| 596 | 596 | } |
| 597 | 597 | |
| 598 | WRITE64_HANDLER( naomi_rom_board_w ) | |
| 598 | static WRITE64_HANDLER( naomi_rom_board_w ) | |
| 599 | 599 | { |
| 600 | 600 | if ((offset == 1) && ((mem_mask & U64(0xffff)) == 0)) |
| 601 | 601 | { |
| r1527 | r1528 | |
| 652 | 652 | AM_RANGE(0xa0000000, 0xa01fffff) AM_ROM AM_REGION(REGION_CPU1, 0) |
| 653 | 653 | ADDRESS_MAP_END |
| 654 | 654 | |
| 655 | READ32_HANDLER( test1 ) | |
| 655 | static READ32_HANDLER( test1 ) | |
| 656 | 656 | { |
| 657 | 657 | return -1; |
| 658 | 658 | } |
| r1527 | r1528 | |
|---|---|---|
| 521 | 521 | GFXDECODE_ENTRY( REGION_GFX3, 0x00000, weststry_spritelayout, 0*16, 0x10 ) |
| 522 | 522 | GFXDECODE_END |
| 523 | 523 | |
| 524 | /* Sound Interfaces */ | |
| 525 | 524 | |
| 526 | // Parameters: YM3812 frequency, Oki frequency, Oki memory region | |
| 527 | SEIBU_SOUND_SYSTEM_YM3812_HARDWARE | |
| 528 | ||
| 529 | 525 | /* Machine Drivers */ |
| 530 | 526 | |
| 531 | 527 | static MACHINE_DRIVER_START( bloodbro ) |
| r1527 | r1528 | |
|---|---|---|
| 221 | 221 | |
| 222 | 222 | /******************************************************************************/ |
| 223 | 223 | |
| 224 | /* Parameters: YM3812 frequency, Oki frequency, Oki memory region */ | |
| 225 | SEIBU_SOUND_SYSTEM_YM3812_HARDWARE | |
| 226 | ||
| 227 | 224 | static INTERRUPT_GEN( raiden_interrupt ) |
| 228 | 225 | { |
| 229 | 226 | cpunum_set_input_line_and_vector(cpunum, 0, HOLD_LINE, 0xc8/4); /* VBL */ |
| r1527 | r1528 | |
|---|---|---|
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | |
| 229 | static UINT | |
| 229 | static CUSTOM_INPUT( | |
| 230 | 230 | { |
| 231 | 231 | int x = 0, y = 0; |
| 232 | 232 | |
| r1527 | r1528 | |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | |
| 239 | static UINT | |
| 239 | static CUSTOM_INPUT( | |
| 240 | 240 | { |
| 241 | 241 | /* read the trigger control based on the input select */ |
| 242 | 242 | return (readinputportbytag("TRIGGERS") >> input_select) & 1; |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | |
| 246 | static UINT | |
| 246 | static CUSTOM_INPUT( | |
| 247 | 247 | { |
| 248 | 248 | /* read the holster control based on the input select */ |
| 249 | 249 | return (readinputportbytag("TRIGGERS") >> (2 + input_select)) & 1; |
| r1527 | r1528 | |
|---|---|---|
| 598 | 598 | MDRV_CPU_MODIFY("main_cpu") |
| 599 | 599 | MDRV_CPU_IO_MAP(bking3_io_map,0) |
| 600 | 600 | |
| 601 | MDRV_CPU_ADD(M68705, XTAL_3MHz | |
| 601 | MDRV_CPU_ADD(M68705, XTAL_3MHz | |
| 602 | 602 | MDRV_CPU_PROGRAM_MAP(m68705_map,0) |
| 603 | 603 | |
| 604 | 604 | MDRV_MACHINE_RESET(buggychl) |
| r1527 | r1528 | |
|---|---|---|
| 82 | 82 | * |
| 83 | 83 | *************************************/ |
| 84 | 84 | |
| 85 | static UINT | |
| 85 | static CUSTOM_INPUT( | |
| 86 | 86 | { |
| 87 | 87 | /* return coin counter values */ |
| 88 | 88 | return *(UINT8 *)param & 3; |
| r1527 | r1528 | |
|---|---|---|
| 314 | 314 | * |
| 315 | 315 | *************************************/ |
| 316 | 316 | |
| 317 | static UINT | |
| 317 | static CUSTOM_INPUT( | |
| 318 | 318 | { |
| 319 | 319 | return (readinputportbytag("COINS") & 0xf) != 0xf; |
| 320 | 320 | } |
| r1527 | r1528 | |
|---|---|---|
| 56 | 56 | AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM) |
| 57 | 57 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) |
| 58 | 58 | AM_RANGE(0x8800, 0x8800) AM_READ(MRA8_NOP) //?? possibly watchdog |
| 59 | AM_RANGE(0x9000, 0x97ff) AM_READ( | |
| 59 | AM_RANGE(0x9000, 0x97ff) AM_READ(MRA8 | |
| 60 | 60 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) |
| 61 | 61 | AM_RANGE(0xa800, 0xa800) AM_READ(input_port_1_r) |
| 62 | 62 | AM_RANGE(0xb800, 0xb800) AM_READ(input_port_2_r) |
| r1527 | r1528 | |
| 71 | 71 | AM_RANGE(0x8fc1, 0x8fc1) AM_WRITE(MWA8_NOP) //overrun during initial screen clear |
| 72 | 72 | AM_RANGE(0x8fe1, 0x8fe1) AM_WRITE(MWA8_NOP) //overrun during initial screen clear |
| 73 | 73 | AM_RANGE(0x9000, 0x97ff) AM_WRITE(carjmbre_videoram_w) AM_BASE(&videoram) |
| 74 | AM_RANGE(0x9800, 0x985f) AM_WRITE( | |
| 74 | AM_RANGE(0x9800, 0x985f) AM_WRITE(MWA8 | |
| 75 | 75 | AM_RANGE(0x9880, 0x98df) AM_WRITE(MWA8_RAM) //spriteram mirror |
| 76 | 76 | AM_RANGE(0xb800, 0xb800) AM_WRITE(soundlatch_w) |
| 77 | 77 | ADDRESS_MAP_END |
| r1527 | r1528 | |
|---|---|---|
| 486 | 486 | /* audio CPU */ |
| 487 | 487 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 488 | 488 | |
| 489 | // MDRV_CPU_ADD(M68705, 3000000 | |
| 489 | // MDRV_CPU_ADD(M68705, 3000000 | |
| 490 | 490 | // MDRV_CPU_PROGRAM_MAP(mcu_readmem,mcu_writemem) |
| 491 | 491 | |
| 492 | 492 | MDRV_MACHINE_START(xsleena) |
| r1527 | r1528 | |
|---|---|---|
| 244 | 244 | * |
| 245 | 245 | *************************************/ |
| 246 | 246 | |
| 247 | static UINT | |
| 247 | static CUSTOM_INPUT( | |
| 248 | 248 | { |
| 249 | 249 | static const char *const names[] = { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" }; |
| 250 | 250 | return readinputportbytag(names[input_select]); |
| r1527 | r1528 | |
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | |
| 463 | static UINT | |
| 463 | static CUSTOM_INPUT( | |
| 464 | 464 | { |
| 465 | 465 | static const char *const names[] = { "MOVEX", "MOVEY" }; |
| 466 | 466 | return readinputportbytag(names[input_select]); |
| r1527 | r1528 | |
| 506 | 506 | static MACHINE_START( tenpindx ) |
| 507 | 507 | { |
| 508 | 508 | /* initialize the CTC */ |
| 509 | ctc_intf.baseclock = | |
| 509 | ctc_intf.baseclock = | |
| 510 | 510 | z80ctc_init(0, &ctc_intf); |
| 511 | 511 | machine_start_astrocde(machine); |
| 512 | 512 | } |
| r1527 | r1528 | |
|---|---|---|
| 20 | 20 | extern UINT8 *megazone_scrollx; |
| 21 | 21 | extern UINT8 *megazone_scrolly; |
| 22 | 22 | |
| 23 | static UINT8 *megazone_sharedram; | |
| 24 | ||
| 25 | 23 | extern UINT8 *megazone_videoram2; |
| 26 | 24 | extern UINT8 *megazone_colorram2; |
| 27 | 25 | extern size_t megazone_videoram2_size; |
| r1527 | r1528 | |
| 75 | 73 | } |
| 76 | 74 | } |
| 77 | 75 | |
| 78 | static WRITE8_HANDLER( megazone_videoram2_w ) | |
| 79 | { | |
| 80 | if (megazone_videoram2[offset] != data) | |
| 81 | { | |
| 82 | megazone_videoram2[offset] = data; | |
| 83 | } | |
| 84 | } | |
| 85 | ||
| 86 | static WRITE8_HANDLER( megazone_colorram2_w ) | |
| 87 | { | |
| 88 | if (megazone_colorram2[offset] != data) | |
| 89 | { | |
| 90 | megazone_colorram2[offset] = data; | |
| 91 | } | |
| 92 | } | |
| 93 | ||
| 94 | static READ8_HANDLER( megazone_sharedram_r ) | |
| 95 | { | |
| 96 | return(megazone_sharedram[offset]); | |
| 97 | } | |
| 98 | ||
| 99 | static WRITE8_HANDLER( megazone_sharedram_w ) | |
| 100 | { | |
| 101 | megazone_sharedram[offset] = data; | |
| 102 | } | |
| 103 | ||
| 104 | 76 | static WRITE8_HANDLER( megazone_i8039_irq_w ) |
| 105 | 77 | { |
| 106 | 78 | cpunum_set_input_line(2, 0, ASSERT_LINE); |
| r1527 | r1528 | |
| 123 | 95 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 124 | 96 | AM_RANGE(0x2000, 0x2fff) AM_READ(MRA8_RAM) |
| 125 | 97 | AM_RANGE(0x3000, 0x33ff) AM_READ(MRA8_RAM) |
| 126 | AM_RANGE(0x3800, 0x3fff) AM_R | |
| 98 | AM_RANGE(0x3800, 0x3fff) AM_R | |
| 127 | 99 | AM_RANGE(0x4000, 0xffff) AM_READ(MRA8_ROM) /* 4000->5FFF is a debug rom */ |
| 128 | 100 | ADDRESS_MAP_END |
| 129 | 101 | |
| r1527 | r1528 | |
| 134 | 106 | AM_RANGE(0x0800, 0x0800) AM_WRITE(watchdog_reset_w) |
| 135 | 107 | AM_RANGE(0x1800, 0x1800) AM_WRITE(MWA8_RAM) AM_BASE(&megazone_scrollx) |
| 136 | 108 | AM_RANGE(0x1000, 0x1000) AM_WRITE(MWA8_RAM) AM_BASE(&megazone_scrolly) |
| 137 | AM_RANGE(0x2000, 0x23ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 138 | AM_RANGE(0x2400, 0x27ff) AM_WRITE(megazone_videoram2_w) AM_BASE(&megazone_videoram2) AM_SIZE(&megazone_videoram2_size) | |
| 139 | AM_RANGE(0x2800, 0x2bff) AM_WRITE(colorram_w) AM_BASE(&colorram) | |
| 140 | AM_RANGE(0x2c00, 0x2fff) AM_WRITE(megazone_colorram2_w) AM_BASE(&megazone_colorram2) | |
| 109 | AM_RANGE(0x2000, 0x23ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 110 | AM_RANGE(0x2400, 0x27ff) AM_WRITE(MWA8_RAM) AM_BASE(&megazone_videoram2) AM_SIZE(&megazone_videoram2_size) | |
| 111 | AM_RANGE(0x2800, 0x2bff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram) | |
| 112 | AM_RANGE(0x2c00, 0x2fff) AM_WRITE(MWA8_RAM) AM_BASE(&megazone_colorram2) | |
| 141 | 113 | AM_RANGE(0x3000, 0x33ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 142 | AM_RANGE(0x3800, 0x3fff) AM_WRITE(megazone_sharedram_w) AM_BASE(&megazone_sharedram) | |
| 143 | 114 | AM_RANGE(0x4000, 0xffff) AM_WRITE(MWA8_ROM) |
| 144 | 115 | ADDRESS_MAP_END |
| 145 | 116 | |
| r1527 | r1528 | |
| 150 | 121 | AM_RANGE(0x6002, 0x6002) AM_READ(input_port_2_r) /* P2 IO */ |
| 151 | 122 | AM_RANGE(0x8000, 0x8000) AM_READ(input_port_3_r) /* DIP 1 */ |
| 152 | 123 | AM_RANGE(0x8001, 0x8001) AM_READ(input_port_4_r) /* DIP 2 */ |
| 153 | AM_RANGE(0xe000, 0xe7ff) AM_R | |
| 124 | AM_RANGE(0xe000, 0xe7ff) AM_R | |
| 154 | 125 | ADDRESS_MAP_END |
| 155 | 126 | |
| 156 | 127 | static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r1527 | r1528 | |
| 160 | 131 | AM_RANGE(0xa000, 0xa000) AM_WRITE(MWA8_RAM) /* INTMAIN - Interrupts main CPU (unused) */ |
| 161 | 132 | AM_RANGE(0xc000, 0xc000) AM_WRITE(MWA8_RAM) /* INT (Actually is NMI) enable/disable (unused)*/ |
| 162 | 133 | AM_RANGE(0xc001, 0xc001) AM_WRITE(watchdog_reset_w) |
| 163 | AM_RANGE(0xe000, 0xe7ff) AM_WRITE(megazone_sharedram_w) /* Shared with $3800->3fff of main CPU */ | |
| 164 | 134 | ADDRESS_MAP_END |
| 165 | 135 | |
| 166 | 136 | static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 ) |
| r1527 | r1528 | |
| 337 | 307 | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) |
| 338 | 308 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 339 | 309 | |
| 340 | MDRV_CPU_ADD(I8039, | |
| 310 | MDRV_CPU_ADD(I8039, | |
| 341 | 311 | /* audio CPU */ /* 1/2 14MHz crystal */ |
| 342 | 312 | MDRV_CPU_PROGRAM_MAP(i8039_readmem,i8039_writemem) |
| 343 | 313 | MDRV_CPU_IO_MAP(i8039_readport,i8039_writeport) |
| r1527 | r1528 | |
|---|---|---|
| 423 | 423 | static MACHINE_DRIVER_START( hvysmsh ) |
| 424 | 424 | |
| 425 | 425 | /* basic machine hardware */ |
| 426 | MDRV_CPU_ADD(ARM, 28000000 | |
| 426 | MDRV_CPU_ADD(ARM, 28000000 | |
| 427 | 427 | MDRV_CPU_PROGRAM_MAP(hvysmsh_map,0) |
| 428 | 428 | MDRV_CPU_VBLANK_INT(deco32_vbl_interrupt,1) |
| 429 | 429 | |
| r1527 | r1528 | |
| 459 | 459 | static MACHINE_DRIVER_START( wcvol95 ) |
| 460 | 460 | |
| 461 | 461 | /* basic machine hardware */ |
| 462 | MDRV_CPU_ADD(ARM, 28000000 | |
| 462 | MDRV_CPU_ADD(ARM, 28000000 | |
| 463 | 463 | MDRV_CPU_PROGRAM_MAP(wcvol95_map,0) |
| 464 | 464 | MDRV_CPU_VBLANK_INT(deco32_vbl_interrupt,1) |
| 465 | 465 |
| r1527 | r1528 | |
|---|---|---|
| 425 | 425 | |
| 426 | 426 | /*****************************************************************************/ |
| 427 | 427 | |
| 428 | /* Parameters: YM3812 frequency, Oki frequency, Oki memory region */ | |
| 429 | SEIBU_SOUND_SYSTEM_YM3812_HARDWARE | |
| 430 | ||
| 431 | ||
| 432 | 428 | static const struct MSM5205interface msm5205_interface = |
| 433 | 429 | { |
| 434 | 430 | toki_adpcm_int, /* interrupt function */ |
| r1527 | r1528 | |
|---|---|---|
| 1105 | 1105 | MDRV_CPU_PROGRAM_MAP(sound_map,0) |
| 1106 | 1106 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* source/number of IRQs is unknown */ |
| 1107 | 1107 | |
| 1108 | MDRV_CPU_ADD(M68705,18432000/6 | |
| 1108 | MDRV_CPU_ADD(M68705,18432000/6 | |
| 1109 | 1109 | MDRV_CPU_PROGRAM_MAP(mcu_map,0) |
| 1110 | 1110 | |
| 1111 | 1111 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 1152 | 1152 | MDRV_CPU_PROGRAM_MAP(sound_map,0) |
| 1153 | 1153 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* source/number of IRQs is unknown */ |
| 1154 | 1154 | |
| 1155 | // MDRV_CPU_ADD(M68705,18432000/6 | |
| 1155 | // MDRV_CPU_ADD(M68705,18432000/6 | |
| 1156 | 1156 | // MDRV_CPU_PROGRAM_MAP(mcu_map,0) |
| 1157 | 1157 | |
| 1158 | 1158 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 351 | 351 | /* audio CPU */ /* 1.78975 MHz */ |
| 352 | 352 | MDRV_CPU_PROGRAM_MAP(audio_map,0) |
| 353 | 353 | |
| 354 | MDRV_CPU_ADD(I8039,8000000 | |
| 354 | MDRV_CPU_ADD(I8039,8000000 | |
| 355 | 355 | /* audio CPU */ /* 8MHz crystal */ |
| 356 | 356 | MDRV_CPU_PROGRAM_MAP(mcu_map,0) |
| 357 | 357 | MDRV_CPU_IO_MAP(mcu_io_map,0) |
| r1527 | r1528 | |
|---|---|---|
| 576 | 576 | MDRV_CPU_ADD_TAG("audio", M6502, 600000) |
| 577 | 577 | MDRV_CPU_PROGRAM_MAP(lasso_audio_map, 0) |
| 578 | 578 | |
| 579 | MDRV_SCREEN_REFRESH_RATE( | |
| 579 | MDRV_SCREEN_REFRESH_RATE(57) /* guess, but avoids glitching of Chameleon's high score table */ | |
| 580 | 580 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) |
| 581 | ||
| 581 | 582 | MDRV_CPU_VBLANK_INT(lasso_interrupt,2) /* IRQ = VBlank, NMI = Coin Insertion */ |
| 582 | 583 | MDRV_INTERLEAVE(100) |
| 583 | 584 |
| r1527 | r1528 | |
|---|---|---|
| 264 | 264 | static MACHINE_DRIVER_START( tail2nos ) |
| 265 | 265 | |
| 266 | 266 | /* basic machine hardware */ |
| 267 | MDRV_CPU_ADD(M68000,20 | |
| 267 | MDRV_CPU_ADD(M68000,XTAL_20MHz | |
| 268 | 268 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 269 | 269 | MDRV_CPU_VBLANK_INT(irq6_line_hold,1) |
| 270 | 270 | |
| 271 | MDRV_CPU_ADD(Z80,8000000/2) | |
| 272 | /* audio CPU */ /* 4 MHz ??? */ | |
| 271 | MDRV_CPU_ADD(Z80,XTAL_20MHz/4) /* verified on pcb */ | |
| 272 | /* audio CPU */ | |
| 273 | 273 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 274 | 274 | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) |
| 275 | 275 | /* IRQs are triggered by the YM2608 */ |
| r1527 | r1528 | |
| 292 | 292 | /* sound hardware */ |
| 293 | 293 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 294 | 294 | |
| 295 | MDRV_SOUND_ADD(YM2608, 8 | |
| 295 | MDRV_SOUND_ADD(YM2608, XTAL_8MHz | |
| 296 | 296 | MDRV_SOUND_CONFIG(ym2608_interface) |
| 297 | 297 | MDRV_SOUND_ROUTE(0, "left", 0.25) |
| 298 | 298 | MDRV_SOUND_ROUTE(0, "right", 0.25) |
| r1527 | r1528 | |
|---|---|---|
| 386 | 386 | MDRV_CPU_IO_MAP(quasar_io,0) |
| 387 | 387 | MDRV_CPU_VBLANK_INT(quasar_interrupt,1) |
| 388 | 388 | |
| 389 | MDRV_CPU_ADD_TAG("sound",I8035,6000000 | |
| 389 | MDRV_CPU_ADD_TAG("sound",I8035,6000000 | |
| 390 | 390 | /* audio CPU */ |
| 391 | 391 | MDRV_CPU_PROGRAM_MAP(readmem_sound,writemem_sound) |
| 392 | 392 | MDRV_CPU_IO_MAP(readport_sound,writeport_sound) |
| 393 | 393 | |
| 394 | MDRV_MACHINE_START( cvs ) | |
| 395 | ||
| 394 | 396 | MDRV_SCREEN_REFRESH_RATE(50) /* From dot clock */ |
| 395 | 397 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) |
| 396 | 398 | MDRV_INTERLEAVE(100) |
| r1527 | r1528 | |
|---|---|---|
| 78 | 78 | ======================================================================== |
| 79 | 79 | CPU #2 |
| 80 | 80 | ======================================================================== |
| 81 | 0000-0 | |
| 81 | 0000-00FF R/W xxxxxxxx Program RAM | |
| 82 | 82 | 1000-1FFF R/W xxxxxxxx 6532 RIOT timer and I/O |
| 83 | 83 | 2000-2FFF R/W xxxxxxxx 6821 PIA I/O |
| 84 | 84 | 3000-3FFF R/W xxxxxxxx 8253 timer |
| r1527 | r1528 | |
| 86 | 86 | 6000-6FFF W ------xx Control bits |
| 87 | 87 | W ------x- (6840 Channel 1 output enable) |
| 88 | 88 | W -------x (sound effects noise frequency select) |
| 89 | | |
| 89 | B000-FFFF R xxxxxxxx Program ROM | |
| 90 | 90 | ======================================================================== |
| 91 | 91 | Interrupts: |
| 92 | INT generated by 6532 RIOT | |
| 92 | INT generated by 6821 PIA and 6532 RIOT | |
| 93 | 93 | ======================================================================== |
| 94 | 94 | |
| 95 | 95 | ***************************************************************************/ |
| 96 | 96 | |
| 97 | ||
| 98 | 97 | #include "driver.h" |
| 99 | 98 | #include "exidy.h" |
| 100 | #include "machine/6821pia.h" | |
| 101 | #include "sound/5220intf.h" | |
| 99 | #include "victory.h" | |
| 102 | 100 | |
| 103 | 101 | |
| 104 | #define LOG_SOUND 0 | |
| 105 | 102 | |
| 106 | ||
| 107 | static UINT8 sound_response; | |
| 108 | static UINT8 sound_response_ack_clk; | |
| 109 | ||
| 110 | ||
| 111 | /* video driver data & functions */ | |
| 112 | extern UINT8 *victory_charram; | |
| 113 | ||
| 114 | VIDEO_START( victory ); | |
| 115 | VIDEO_EOF( victory ); | |
| 116 | VIDEO_UPDATE( victory ); | |
| 117 | INTERRUPT_GEN( victory_vblank_interrupt ); | |
| 118 | ||
| 119 | READ8_HANDLER( victory_video_control_r ); | |
| 120 | WRITE8_HANDLER( victory_video_control_w ); | |
| 121 | WRITE8_HANDLER( victory_paletteram_w ); | |
| 122 | WRITE8_HANDLER( victory_videoram_w ); | |
| 123 | WRITE8_HANDLER( victory_charram_w ); | |
| 124 | ||
| 125 | ||
| 126 | ||
| 127 | 103 | /************************************* |
| 128 | 104 | * |
| 129 | * Sound CPU control | |
| 130 | * | |
| 131 | *************************************/ | |
| 132 | ||
| 133 | static READ8_HANDLER( sound_response_r ) | |
| 134 | { | |
| 135 | if (LOG_SOUND) logerror("%04X:!!!! Sound response read = %02X\n", activecpu_get_previouspc(), sound_response); | |
| 136 | pia_0_cb1_w(0, 0); | |
| 137 | return sound_response; | |
| 138 | } | |
| 139 | ||
| 140 | ||
| 141 | static READ8_HANDLER( sound_status_r ) | |
| 142 | { | |
| 143 | if (LOG_SOUND) logerror("%04X:!!!! Sound status read = %02X\n", activecpu_get_previouspc(), (pia_0_ca1_r(0) << 7) | (pia_0_cb1_r(0) << 6)); | |
| 144 | return (pia_0_ca1_r(0) << 7) | (pia_0_cb1_r(0) << 6); | |
| 145 | } | |
| 146 | ||
| 147 | ||
| 148 | static TIMER_CALLBACK( delayed_command_w ) | |
| 149 | { | |
| 150 | pia_0_porta_w(0, param); | |
| 151 | pia_0_ca1_w(0, 0); | |
| 152 | if (LOG_SOUND) logerror("%04X:!!!! Sound command = %02X\n", activecpu_get_previouspc(), param); | |
| 153 | } | |
| 154 | ||
| 155 | static WRITE8_HANDLER( sound_command_w ) | |
| 156 | { | |
| 157 | timer_call_after_resynch(NULL, data, delayed_command_w); | |
| 158 | } | |
| 159 | ||
| 160 | ||
| 161 | WRITE8_HANDLER( victory_sound_response_w ) | |
| 162 | { | |
| 163 | sound_response = data; | |
| 164 | if (LOG_SOUND) logerror("%04X:!!!! Sound response = %02X\n", activecpu_get_previouspc(), data); | |
| 165 | } | |
| 166 | ||
| 167 | ||
| 168 | WRITE8_HANDLER( victory_sound_irq_clear_w ) | |
| 169 | { | |
| 170 | if (LOG_SOUND) logerror("%04X:!!!! Sound IRQ clear = %02X\n", activecpu_get_previouspc(), data); | |
| 171 | if (!data) pia_0_ca1_w(0, 1); | |
| 172 | } | |
| 173 | ||
| 174 | ||
| 175 | WRITE8_HANDLER( victory_main_ack_w ) | |
| 176 | { | |
| 177 | if (LOG_SOUND) logerror("%04X:!!!! Sound ack = %02X\n", activecpu_get_previouspc(), data); | |
| 178 | if (sound_response_ack_clk && !data) | |
| 179 | pia_0_cb1_w(0, 1); | |
| 180 | sound_response_ack_clk = data; | |
| 181 | } | |
| 182 | ||
| 183 | ||
| 184 | ||
| 185 | /************************************* | |
| 186 | * | |
| 187 | 105 | * Misc I/O |
| 188 | 106 | * |
| 189 | 107 | *************************************/ |
| 190 | 108 | |
| 191 | 109 | static WRITE8_HANDLER( lamp_control_w ) |
| 192 | 110 | { |
| 193 | set_led_status(0,data & 0x80); | |
| 194 | set_led_status(1,data & 0x40); | |
| 195 | set_led_status(2,data & 0x20); | |
| 196 | set_led_status(3,data & 0x10); | |
| 111 | set_led_status(0, data & 0x80); | |
| 112 | set_led_status(1, data & 0x40); | |
| 113 | set_led_status(2, data & 0x20); | |
| 114 | set_led_status(3, data & 0x10); | |
| 197 | 115 | } |
| 198 | 116 | |
| 199 | 117 | |
| r1527 | r1528 | |
| 208 | 126 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 209 | 127 | AM_RANGE(0xc000, 0xc0ff) AM_READ(victory_video_control_r) |
| 210 | 128 | AM_RANGE(0xc100, 0xc1ff) AM_WRITE(victory_video_control_w) |
| 211 | AM_RANGE(0xc200, 0xc3ff) AM_WRITE(victory_paletteram_w) AM_BASE(&paletteram) | |
| 212 | AM_RANGE(0xc400, 0xc7ff) AM_READWRITE(MRA8_RAM, victory_videoram_w) AM_BASE(&videoram) | |
| 213 | AM_RANGE(0xc800, 0xdfff) AM_READWRITE(MRA8_RAM, victory_charram_w) AM_BASE(&victory_charram) | |
| 129 | AM_RANGE(0xc200, 0xc3ff) AM_WRITE(victory_paletteram_w) | |
| 130 | AM_RANGE(0xc400, 0xc7ff) AM_RAM AM_BASE(&victory_videoram) | |
| 131 | AM_RANGE(0xc800, 0xdfff) AM_RAM AM_BASE(&victory_charram) | |
| 214 | 132 | AM_RANGE(0xe000, 0xefff) AM_RAM |
| 215 | 133 | AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 216 | AM_RANGE(0xf800, 0xf800) AM_READWRITE(sound_response_r, sound_command_w) | |
| 217 | AM_RANGE(0xf801, 0xf801) AM_READ(sound_status_r) | |
| 134 | AM_RANGE(0xf800, 0xf800) AM_MIRROR(0x07fc) AM_READWRITE(victory_sound_response_r, victory_sound_command_w) | |
| 135 | AM_RANGE(0xf801, 0xf801) AM_MIRROR(0x07fc) AM_READ(victory_sound_status_r) | |
| 218 | 136 | ADDRESS_MAP_END |
| 219 | 137 | |
| 220 | 138 | |
| 221 | static ADDRESS_MAP_START( main_iomap, ADDRESS_SPACE_IO, 8 ) | |
| 139 | static ADDRESS_MAP_START( main_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 222 | 140 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 223 | AM_RANGE(0x00, 0x03) AM_READ(input_port_0_r) | |
| 224 | AM_RANGE(0x04, 0x07) AM_READ(input_port_1_r) | |
| 141 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x03) AM_READ(input_port_0_r) | |
| 142 | AM_RANGE(0x04, 0x04) AM_MIRROR(0x03) AM_READ(input_port_1_r) | |
| 225 | 143 | AM_RANGE(0x08, 0x08) AM_READ(input_port_2_r) |
| 226 | 144 | AM_RANGE(0x0a, 0x0a) AM_READ(input_port_3_r) |
| 227 | 145 | AM_RANGE(0x0c, 0x0c) AM_READ(input_port_4_r) |
| 228 | 146 | AM_RANGE(0x0e, 0x0e) AM_READ(input_port_5_r) |
| 229 | AM_RANGE(0x10, 0x13) AM_WRITE(lamp_control_w) | |
| 147 | AM_RANGE(0x10, 0x10) AM_MIRROR(0x03) AM_WRITE(lamp_control_w) | |
| 148 | AM_RANGE(0x14, 0xff) AM_NOP | |
| 230 | 149 | ADDRESS_MAP_END |
| 231 | 150 | |
| 232 | 151 | |
| 233 | 152 | |
| 234 | 153 | /************************************* |
| 235 | 154 | * |
| 236 | * Sound CPU memory handlers | |
| 237 | * | |
| 238 | *************************************/ | |
| 239 | ||
| 240 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 241 | AM_RANGE(0x0000, 0x00ff) AM_MIRROR(0xf00) AM_RAM | |
| 242 | AM_RANGE(0x1000, 0x1fff) AM_READWRITE(exidy_shriot_r, exidy_shriot_w) | |
| 243 | AM_RANGE(0x2000, 0x27ff) AM_READWRITE(pia_0_r, pia_0_w) | |
| 244 | AM_RANGE(0x3000, 0x3fff) AM_READWRITE(exidy_sh8253_r, exidy_sh8253_w) | |
| 245 | AM_RANGE(0x4000, 0x4fff) AM_WRITE(exidy_sound_filter_w) | |
| 246 | AM_RANGE(0x5000, 0x5fff) AM_READWRITE(exidy_sh6840_r, exidy_sh6840_w) | |
| 247 | AM_RANGE(0x6000, 0x6fff) AM_WRITE(exidy_sfxctrl_w) | |
| 248 | AM_RANGE(0xc000, 0xffff) AM_ROM | |
| 249 | ADDRESS_MAP_END | |
| 250 | ||
| 251 | ||
| 252 | ||
| 253 | /************************************* | |
| 254 | * | |
| 255 | 155 | * Port definitions |
| 256 | 156 | * |
| 257 | 157 | *************************************/ |
| r1527 | r1528 | |
| 302 | 202 | |
| 303 | 203 | /************************************* |
| 304 | 204 | * |
| 305 | * Sound definitions | |
| 306 | * | |
| 307 | *************************************/ | |
| 308 | ||
| 309 | static const struct CustomSound_interface custom_interface = | |
| 310 | { | |
| 311 | victory_sh_start, | |
| 312 | 0, | |
| 313 | 0 | |
| 314 | }; | |
| 315 | ||
| 316 | ||
| 317 | ||
| 318 | /************************************* | |
| 319 | * | |
| 320 | 205 | * Machine driver |
| 321 | 206 | * |
| 322 | 207 | *************************************/ |
| r1527 | r1528 | |
| 324 | 209 | static MACHINE_DRIVER_START( victory ) |
| 325 | 210 | |
| 326 | 211 | /* basic machine hardware */ |
| 327 | MDRV_CPU_ADD(Z80, | |
| 212 | MDRV_CPU_ADD(Z80, VICTORY_MAIN_CPU_CLOCK) | |
| 328 | 213 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 329 | MDRV_CPU_IO_MAP(main_iomap,0) | |
| 214 | MDRV_CPU_IO_MAP(main_io_map,0) | |
| 330 | 215 | MDRV_CPU_VBLANK_INT(victory_vblank_interrupt,1) |
| 331 | 216 | |
| 332 | MDRV_CPU_ADD(M6502,3579545/4) | |
| 333 | /* audio CPU */ | |
| 334 | MDRV_CPU_PROGRAM_MAP(sound_map,0) | |
| 335 | ||
| 336 | 217 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 337 | 218 | |
| 338 | 219 | /* video hardware */ |
| 339 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_BEFORE_VBLANK) | |
| 220 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_BEFORE_VBLANK | VIDEO_ALWAYS_UPDATE) | |
| 340 | 221 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 341 | 222 | /* using the standard Exidy video parameters for now, needs to be confirmed */ |
| 342 | 223 | MDRV_SCREEN_RAW_PARAMS(EXIDY_PIXEL_CLOCK, EXIDY_HTOTAL, EXIDY_HBEND, EXIDY_HBSTART, EXIDY_VTOTAL, EXIDY_VBEND, EXIDY_VBSTART) |
| 343 | 224 | MDRV_PALETTE_LENGTH(64) |
| 344 | 225 | |
| 345 | 226 | MDRV_VIDEO_START(victory) |
| 346 | MDRV_VIDEO_EOF(victory) | |
| 347 | 227 | MDRV_VIDEO_UPDATE(victory) |
| 348 | 228 | |
| 349 | /* sound hardware */ | |
| 350 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 351 | MDRV_SOUND_ADD(CUSTOM, 0) | |
| 352 | MDRV_SOUND_CONFIG(custom_interface) | |
| 353 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 229 | /* audio hardware */ | |
| 230 | MDRV_IMPORT_FROM(victory_audio) | |
| 354 | 231 | |
| 355 | MDRV_SOUND_ADD(TMS5220, 640000) | |
| 356 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 357 | 232 | MACHINE_DRIVER_END |
| 358 | 233 | |
| 359 | 234 | |
| r1527 | r1528 | |
| 437 | 312 | * |
| 438 | 313 | *************************************/ |
| 439 | 314 | |
| 440 | GAME( 1982, victory, 0, victory, victory, 0, ROT0, "Exidy", "Victory", 0 ) | |
| 441 | GAME( 1982, victorba, victory, victory, victory, 0, ROT0, "Exidy", "Victor Banana", 0 ) | |
| 315 | GAME( 1982, victory, 0, victory, victory, 0, ROT0, "Exidy", "Victory", 0 ) | |
| 316 | GAME( 1982, victorba, victory, victory, victory, 0, ROT0, "Exidy", "Victor Banana", 0 ) |
| r1527 | r1528 | |
|---|---|---|
| 470 | 470 | MDRV_CPU_PROGRAM_MAP(sound_program_map, 0) |
| 471 | 471 | MDRV_CPU_IO_MAP(sound_io_map, 0) |
| 472 | 472 | |
| 473 | MDRV_CPU_ADD(TMS32010,14000000 | |
| 473 | MDRV_CPU_ADD(TMS32010,14000000 | |
| 474 | 474 | MDRV_CPU_PROGRAM_MAP(DSP_program_map, 0) |
| 475 | 475 | /* Data Map is internal to the CPU */ |
| 476 | 476 | MDRV_CPU_IO_MAP(DSP_io_map, 0) |
| r1527 | r1528 | |
|---|---|---|
| 624 | 624 | ROM_START( nss_smw ) |
| 625 | 625 | NSS_BIOS |
| 626 | 626 | ROM_REGION( 0x100000, REGION_USER3, ROMREGION_DISPOSE ) |
| 627 | ROM_LOAD( "nss-mw-0_prg.ic1", 0x000000, 0x | |
| 627 | ROM_LOAD( "nss-mw-0_prg.ic1", 0x000000, 0x80000 | |
| 628 | 628 | |
| 629 | 629 | /* instruction / data rom for bios */ |
| 630 | 630 | ROM_REGION( 0x8000, REGION_USER4, 0 ) |
| r1527 | r1528 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Issues: |
| 4 | 4 | -sound effects missing |
| 5 | -cpu speeds are guessed | |
| 6 | 5 | ***************************************************************************/ |
| 7 | 6 | |
| 8 | 7 | #include "driver.h" |
| r1527 | r1528 | |
| 56 | 55 | AM_RANGE(0x8000, 0x9fff) AM_WRITE(MWA8_ROM) |
| 57 | 56 | AM_RANGE(0xc000, 0xcfff) AM_WRITE(MWA8_RAM) |
| 58 | 57 | AM_RANGE(0xd900, 0xd900) AM_WRITE(ra_fake_d800_w) /* protection ?? */ |
| 59 | AM_RANGE(0xe000, 0xe3ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 60 | AM_RANGE(0xe400, 0xe47f) AM_WRITE(colorram_w) AM_BASE(&colorram) | |
| 58 | AM_RANGE(0xe000, 0xe3ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 59 | AM_RANGE(0xe400, 0xe47f) AM_WRITE(MWA8_RAM) AM_BASE(&colorram) | |
| 61 | 60 | AM_RANGE(0xe800, 0xe800) AM_WRITE(soundlatch_w) |
| 62 | 61 | AM_RANGE(0xec00, 0xec0f) AM_WRITE(MWA8_NOP) /* Analog sound effects ?? ec00 sound enable ?*/ |
| 63 | 62 | AM_RANGE(0xf000, 0xf0ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| r1527 | r1528 | |
| 236 | 235 | static MACHINE_DRIVER_START( rollrace ) |
| 237 | 236 | |
| 238 | 237 | /* basic machine hardware */ |
| 239 | MDRV_CPU_ADD(Z80, | |
| 238 | MDRV_CPU_ADD(Z80,XTAL_24MHz | |
| 240 | 239 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 241 | 240 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 242 | 241 | |
| 243 | MDRV_CPU_ADD(Z80,12000000/3) | |
| 244 | /* audio CPU */ /* ?? */ | |
| 242 | MDRV_CPU_ADD(Z80,XTAL_24MHz/16) /* verified on pcb */ | |
| 243 | /* audio CPU */ | |
| 245 | 244 | MDRV_CPU_PROGRAM_MAP(readmem_snd,writemem_snd) |
| 246 | 245 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,4) |
| 247 | 246 | |
| r1527 | r1528 | |
| 263 | 262 | /* sound hardware */ |
| 264 | 263 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 265 | 264 | |
| 266 | MDRV_SOUND_ADD(AY8910, | |
| 265 | MDRV_SOUND_ADD(AY8910,XTAL_24MHz | |
| 267 | 266 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.10) |
| 268 | 267 | |
| 269 | MDRV_SOUND_ADD(AY8910, | |
| 268 | MDRV_SOUND_ADD(AY8910,XTAL_24MHz | |
| 270 | 269 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.10) |
| 271 | 270 | |
| 272 | MDRV_SOUND_ADD(AY8910, | |
| 271 | MDRV_SOUND_ADD(AY8910,XTAL_24MHz | |
| 273 | 272 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.10) |
| 274 | 273 | MACHINE_DRIVER_END |
| 275 | 274 |
| r1527 | r1528 | |
|---|---|---|
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | |
| 328 | static UINT | |
| 328 | static CUSTOM_INPUT( | |
| 329 | 329 | { |
| 330 | 330 | int v = scanline_to_v(video_screen_get_vpos(0)); |
| 331 | 331 | return v < 24; |
| r1527 | r1528 | |
|---|---|---|
| 236 | 236 | input_port_4_f0 = data >> 4; |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | static UINT | |
| 239 | static CUSTOM_INPUT( | |
| 240 | 240 | { |
| 241 | 241 | return input_port_4_f0; |
| 242 | 242 | } |
| r1527 | r1528 | |
| 325 | 325 | /* seems the most logical way to do the gears */ |
| 326 | 326 | static UINT8 kikstart_gears[2]; |
| 327 | 327 | |
| 328 | static | |
| 328 | static CUSTOM_INPUT( kikstart_gear_r | |
| 329 | 329 | { |
| 330 | 330 | const char *port_tag; |
| 331 | 331 | |
| 332 | int player = (int)param; | |
| 332 | int player = (int)(FPTR)param; | |
| 333 | 333 | |
| 334 | 334 | if (player == 0) |
| 335 | 335 | port_tag = "GEARP1"; |
| r1527 | r1528 | |
| 1923 | 1923 | MDRV_CPU_MODIFY("main") |
| 1924 | 1924 | MDRV_CPU_PROGRAM_MAP(taitosj_main_mcu_map,0) |
| 1925 | 1925 | |
| 1926 | MDRV_CPU_ADD(M68705,3000000 | |
| 1926 | MDRV_CPU_ADD(M68705,3000000 | |
| 1927 | 1927 | MDRV_CPU_PROGRAM_MAP(taitosj_mcu_map,0) |
| 1928 | 1928 | MACHINE_DRIVER_END |
| 1929 | 1929 |
| r1527 | r1528 | |
|---|---|---|
| 74 | 74 | AM_RANGE(0x8000, 0xbfff) AM_READ(MRA8_BANK1) |
| 75 | 75 | AM_RANGE(0xc020, 0xc0df) AM_READ(MRA8_RAM) |
| 76 | 76 | AM_RANGE(0xc800, 0xcfff) AM_READ(MRA8_RAM) |
| 77 | AM_RANGE(0xd000, 0xdfff) AM_READ( | |
| 77 | AM_RANGE(0xd000, 0xdfff) AM_READ(MRA8 | |
| 78 | 78 | AM_RANGE(0xe000, 0xefff) AM_READ(MRA8_RAM) |
| 79 | 79 | ADDRESS_MAP_END |
| 80 | 80 | |
| r1527 | r1528 | |
| 82 | 82 | AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM) |
| 83 | 83 | AM_RANGE(0xc020, 0xc0df) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 84 | 84 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(vigilant_paletteram_w) AM_BASE(&paletteram) |
| 85 | AM_RANGE(0xd000, 0xdfff) AM_WRITE( | |
| 85 | AM_RANGE(0xd000, 0xdfff) AM_WRITE(MWA8 | |
| 86 | 86 | AM_RANGE(0xe000, 0xefff) AM_WRITE(MWA8_RAM) |
| 87 | 87 | ADDRESS_MAP_END |
| 88 | 88 | |
| r1527 | r1528 | |
| 110 | 110 | AM_RANGE(0x8000, 0xbfff) AM_READ(MRA8_BANK1) |
| 111 | 111 | AM_RANGE(0xc000, 0xc0ff) AM_READ(MRA8_RAM) |
| 112 | 112 | AM_RANGE(0xc800, 0xcaff) AM_READ(MRA8_RAM) |
| 113 | AM_RANGE(0xd000, 0xdfff) AM_READ( | |
| 113 | AM_RANGE(0xd000, 0xdfff) AM_READ(MRA8 | |
| 114 | 114 | AM_RANGE(0xe000, 0xffff) AM_READ(MRA8_RAM) |
| 115 | 115 | ADDRESS_MAP_END |
| 116 | 116 | |
| r1527 | r1528 | |
| 118 | 118 | AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM) |
| 119 | 119 | AM_RANGE(0xc000, 0xc0ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 120 | 120 | AM_RANGE(0xc800, 0xcaff) AM_WRITE(vigilant_paletteram_w) AM_BASE(&paletteram) |
| 121 | AM_RANGE(0xd000, 0xdfff) AM_WRITE( | |
| 121 | AM_RANGE(0xd000, 0xdfff) AM_WRITE(MWA8 | |
| 122 | 122 | AM_RANGE(0xe000, 0xffff) AM_WRITE(MWA8_RAM) |
| 123 | 123 | ADDRESS_MAP_END |
| 124 | 124 |
| r1527 | r1528 | |
|---|---|---|
| 110 | 110 | AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_ROM) |
| 111 | 111 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) /* work ram */ |
| 112 | 112 | AM_RANGE(0xa000, 0xa7ff) AM_READ(video_shared_r) /* shared with main */ |
| 113 | AM_RANGE(0xc000, 0xc0ff) AM_READ(videoram_r) /* background vram */ | |
| 114 | AM_RANGE(0xc400, 0xc4ff) AM_READ(colorram_r) /* background colorram */ | |
| 113 | AM_RANGE(0xc000, 0xc0ff) AM_READ(MRA8_RAM) /* background vram */ | |
| 114 | AM_RANGE(0xc400, 0xc4ff) AM_READ(MRA8_RAM) /* background colorram */ | |
| 115 | 115 | AM_RANGE(0xc800, 0xcbff) AM_READ(MRA8_RAM) /* foreground vram */ |
| 116 | 116 | AM_RANGE(0xcc00, 0xcfff) AM_READ(MRA8_RAM) /* foreground colorram */ |
| 117 | 117 | ADDRESS_MAP_END |
| r1527 | r1528 | |
| 130 | 130 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_ROM) |
| 131 | 131 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) /* work ram */ |
| 132 | 132 | AM_RANGE(0xa000, 0xa7ff) AM_READ(sprite_shared_r) /* shared with main */ |
| 133 | AM_RANGE(0xc000, 0xc3ff) AM_READ( | |
| 133 | AM_RANGE(0xc000, 0xc3ff) AM_READ(MRA8 | |
| 134 | 134 | AM_RANGE(0xc400, 0xc43f) AM_READ(MRA8_RAM) /* something related to scroll? */ |
| 135 | 135 | ADDRESS_MAP_END |
| 136 | 136 | |
| r1527 | r1528 | |
| 138 | 138 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_ROM) |
| 139 | 139 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) /* work ram */ |
| 140 | 140 | AM_RANGE(0xa000, 0xa7ff) AM_WRITE(sprite_shared_w) AM_BASE(&sprite_shared) /* shared with main */ |
| 141 | AM_RANGE(0xc000, 0xc3ff) AM_WRITE( | |
| 141 | AM_RANGE(0xc000, 0xc3ff) AM_WRITE(MWA8 | |
| 142 | 142 | AM_RANGE(0xc400, 0xc43f) AM_WRITE(MWA8_RAM) /* something related to scroll? */ |
| 143 | 143 | ADDRESS_MAP_END |
| 144 | 144 | |
| r1527 | r1528 | |
| 197 | 197 | AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_ROM) |
| 198 | 198 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) /* work ram */ |
| 199 | 199 | AM_RANGE(0xc000, 0xc7ff) AM_READ(video_shared_r) /* shared with main */ |
| 200 | AM_RANGE(0xa800, 0xa8ff) AM_READ(videoram_r) /* background vram */ | |
| 201 | AM_RANGE(0xac00, 0xacff) AM_READ(colorram_r) /* background colorram */ | |
| 200 | AM_RANGE(0xa800, 0xa8ff) AM_READ(MRA8_RAM) /* background vram */ | |
| 201 | AM_RANGE(0xac00, 0xacff) AM_READ(MRA8_RAM) /* background colorram */ | |
| 202 | 202 | AM_RANGE(0xa000, 0xa3ff) AM_READ(MRA8_RAM) /* foreground vram */ |
| 203 | 203 | AM_RANGE(0xa400, 0xa7ff) AM_READ(MRA8_RAM) /* foreground colorram */ |
| 204 | 204 | ADDRESS_MAP_END |
| r1527 | r1528 | |
| 217 | 217 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_ROM) |
| 218 | 218 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) /* work ram */ |
| 219 | 219 | AM_RANGE(0xc800, 0xcfff) AM_READ(sprite_shared_r) /* shared with main */ |
| 220 | AM_RANGE(0xa000, 0xa3ff) AM_READ( | |
| 220 | AM_RANGE(0xa000, 0xa3ff) AM_READ(MRA8 | |
| 221 | 221 | AM_RANGE(0xa400, 0xa43f) AM_READ(MRA8_RAM) /* something related to scroll? */ |
| 222 | 222 | ADDRESS_MAP_END |
| 223 | 223 | |
| r1527 | r1528 | |
| 225 | 225 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_ROM) |
| 226 | 226 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) /* work ram */ |
| 227 | 227 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(sprite_shared_w) AM_BASE(&sprite_shared) /* shared with main */ |
| 228 | AM_RANGE(0xa000, 0xa3ff) AM_WRITE( | |
| 228 | AM_RANGE(0xa000, 0xa3ff) AM_WRITE(MWA8 | |
| 229 | 229 | AM_RANGE(0xa400, 0xa43f) AM_WRITE(MWA8_RAM) /* something related to scroll? */ |
| 230 | 230 | ADDRESS_MAP_END |
| 231 | 231 |
| r1527 | r1528 | |
|---|---|---|
| 565 | 565 | static MACHINE_DRIVER_START( f1gp ) |
| 566 | 566 | |
| 567 | 567 | /* basic machine hardware */ |
| 568 | MDRV_CPU_ADD_TAG("main",M68000, | |
| 568 | MDRV_CPU_ADD_TAG("main",M68000,XTAL_20MHz/2 | |
| 569 | 569 | MDRV_CPU_PROGRAM_MAP(f1gp_readmem1,f1gp_writemem1) |
| 570 | 570 | MDRV_CPU_VBLANK_INT(irq1_line_hold,1) |
| 571 | 571 | |
| 572 | MDRV_CPU_ADD(M68000, | |
| 572 | MDRV_CPU_ADD(M68000,XTAL_20MHz/2 | |
| 573 | 573 | MDRV_CPU_PROGRAM_MAP(readmem2,writemem2) |
| 574 | 574 | MDRV_CPU_VBLANK_INT(irq1_line_hold,1) |
| 575 | 575 | |
| 576 | MDRV_CPU_ADD(Z80, | |
| 576 | MDRV_CPU_ADD(Z80,XTAL_20MHz | |
| 577 | 577 | /* audio CPU */ |
| 578 | 578 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 579 | 579 | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) |
| r1527 | r1528 | |
| 595 | 595 | /* sound hardware */ |
| 596 | 596 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 597 | 597 | |
| 598 | MDRV_SOUND_ADD(YM2610, 8 | |
| 598 | MDRV_SOUND_ADD(YM2610, XTAL_8MHz | |
| 599 | 599 | MDRV_SOUND_CONFIG(ym2610_interface) |
| 600 | 600 | MDRV_SOUND_ROUTE(0, "left", 0.25) |
| 601 | 601 | MDRV_SOUND_ROUTE(0, "right", 0.25) |
| r1527 | r1528 | |
|---|---|---|
| 633 | 633 | |
| 634 | 634 | static MACHINE_DRIVER_START( wunit ) |
| 635 | 635 | |
| 636 | MDRV_CPU_ADD(TMS34010, 50000000 | |
| 636 | MDRV_CPU_ADD(TMS34010, 50000000 | |
| 637 | 637 | MDRV_CPU_CONFIG(tms_config) |
| 638 | 638 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 639 | 639 |
| r1527 | r1528 | |
|---|---|---|
| 98 | 98 | return ram_ic[offset]; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | static UINT | |
| 101 | static CUSTOM_INPUT( | |
| 102 | 102 | { |
| 103 | 103 | if (discinfo == NULL) |
| 104 | 104 | return 0; |
| r1527 | r1528 | |
| 107 | 107 | return (laserdisc_line_r(discinfo, LASERDISC_LINE_STATUS) == ASSERT_LINE) ? 0 : 1; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | static UINT | |
| 110 | static CUSTOM_INPUT( | |
| 111 | 111 | { |
| 112 | 112 | if (discinfo == NULL) |
| 113 | 113 | return 0; |
| r1527 | r1528 | |
|---|---|---|
| 1188 | 1188 | ROM_LOAD( "sex1_1a.bin", 0x90000, 0x8000, CRC(ed7604b8) SHA1(b1e841b50b8ef6ae95fafac1c34b6d0337a05d18) ) |
| 1189 | 1189 | ROM_END |
| 1190 | 1190 | |
| 1191 | ROM_START( dodge ) | |
| 1192 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1193 | ROM_LOAD( "2131-82.u5", 0x0000, 0x8000, CRC(eb82515d) SHA1(d2c15bd633472f50b621ba90598559e345246d01) ) | |
| 1191 | 1194 | |
| 1195 | ROM_REGION( 0x18000, REGION_GFX1, 0 ) | |
| 1196 | /* | |
| 1197 | dodge.u37 1ST AND 2ND HALF IDENTICAL | |
| 1198 | dodge.u38 1ST AND 2ND HALF IDENTICAL | |
| 1199 | dodge.u39 1ST AND 2ND HALF IDENTICAL */ | |
| 1200 | ||
| 1201 | ROM_LOAD( "dodge.u39", 0x00000, 0x8000, CRC(3b3376a1) SHA1(6880cdc29686ff7328717c3833ff826c278b023e) ) | |
| 1202 | ROM_LOAD( "dodge.u38", 0x08000, 0x8000, CRC(654d5b00) SHA1(9e16330b2dc8821fc20a39eb42176fda23085bfc) ) | |
| 1203 | ROM_LOAD( "dodge.u37", 0x10000, 0x8000, CRC(bc9e63d4) SHA1(2320f5a0545f18e1e42a3a45fedce912c36fbe13) ) | |
| 1204 | ||
| 1205 | ROM_REGION( 0x2000, REGION_GFX2, ROMREGION_ERASEFF ) | |
| 1206 | /* socket at position u40 is unpopulated */ | |
| 1207 | ROM_END | |
| 1208 | ||
| 1209 | ||
| 1210 | ||
| 1192 | 1211 | static DRIVER_INIT( key_0 ) |
| 1193 | 1212 | { |
| 1194 | 1213 | decryption_key = 0; |
| r1527 | r1528 | |
| 1228 | 1247 | GAME( 1986, phrcraze, 0, phrcraze, phrcraze, key_7, ROT0, "Merit", "Phraze Craze", GAME_WRONG_COLORS ) |
| 1229 | 1248 | GAME( 1986, phrcrazs, 0, phrcraze, phrcrazs, key_7, ROT90, "Merit", "Phraze Craze (Sex Kit)", GAME_WRONG_COLORS ) |
| 1230 | 1249 | GAME( 1986, bigappg, 0, bigappg, bigappg, 0, ROT0, "Merit", "Big Apple Games ?", GAME_WRONG_COLORS | GAME_NOT_WORKING ) |
| 1250 | GAME( 1986, dodge, 0, bigappg, bigappg, 0, ROT0, "Merit", "Dodge City", GAME_WRONG_COLORS | GAME_NOT_WORKING ) |
| r1527 | r1528 | |
|---|---|---|
| 148 | 148 | UINT8 *tatsumi_rom_sprite_lookup1, *tatsumi_rom_sprite_lookup2; |
| 149 | 149 | UINT8 *tatsumi_rom_clut0, *tatsumi_rom_clut1; |
| 150 | 150 | UINT16 *roundup5_unknown0, *roundup5_unknown1, *roundup5_unknown2; |
| 151 | UINT16 bigfight_a20000[8], bigfight_a40000[2], bigfight_a60000[2]; | |
| 151 | static UINT16 bigfight_a20000[8]; | |
| 152 | UINT16 bigfight_a40000[2]; | |
| 153 | static UINT16 bigfight_a60000[2]; | |
| 152 | 154 | extern UINT16 bigfight_bank; |
| 153 | 155 | static UINT8 *apache3_bg_ram; |
| 154 | 156 |
| r1527 | r1528 | |
|---|---|---|
| 212 | 212 | static INPUT_PORTS_START( blmbycar ) |
| 213 | 213 | |
| 214 | 214 | PORT_START // IN0 - $700000.w |
| 215 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) | |
| 215 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:8,7") | |
| 216 | 216 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) |
| 217 | 217 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) |
| 218 | 218 | PORT_DIPSETTING( 0x0001, DEF_STR( Hard ) ) |
| 219 | 219 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) |
| 220 | PORT_DIPNAME( 0x0004, 0x0004, "Joysticks" ) | |
| 220 | PORT_DIPNAME( 0x0004, 0x0004, "Joysticks" ) PORT_DIPLOCATION("SW1:6") | |
| 221 | 221 | PORT_DIPSETTING( 0x0000, "1" ) |
| 222 | 222 | PORT_DIPSETTING( 0x0004, "2" ) |
| 223 | PORT_DIPNAME( 0x0018, 0x0018, DEF_STR( Controls ) ) | |
| 223 | PORT_DIPNAME( 0x0018, 0x0018, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW1:5,4") | |
| 224 | 224 | PORT_DIPSETTING( 0x0018, DEF_STR( Joystick ) ) |
| 225 | 225 | // PORT_DIPSETTING( 0x0010, "Pot Wheel" ) // Preliminary |
| 226 | 226 | // PORT_DIPSETTING( 0x0008, "Opt Wheel" ) // Preliminary |
| 227 | 227 | // PORT_DIPSETTING( 0x0000, DEF_STR( Unused ) ) // Time goes to 0 rally fast! |
| 228 | PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Demo_Sounds ) ) | |
| 228 | PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:3") | |
| 229 | 229 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) |
| 230 | 230 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 231 | PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1- | |
| 231 | PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1-2" ) PORT_DIPLOCATION("SW1:2") | |
| 232 | 232 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) |
| 233 | 233 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 234 | PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) | |
| 234 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:1" ) | |
| 235 | 235 | |
| 236 | PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Coin_A ) ) | |
| 236 | PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:8,7,6") | |
| 237 | 237 | PORT_DIPSETTING( 0x0700, DEF_STR( 1C_1C ) ) |
| 238 | 238 | PORT_DIPSETTING( 0x0000, DEF_STR( 3C_4C ) ) |
| 239 | 239 | PORT_DIPSETTING( 0x0100, DEF_STR( 2C_3C ) ) |
| r1527 | r1528 | |
| 242 | 242 | PORT_DIPSETTING( 0x0400, DEF_STR( 1C_4C ) ) |
| 243 | 243 | PORT_DIPSETTING( 0x0300, DEF_STR( 1C_5C ) ) |
| 244 | 244 | PORT_DIPSETTING( 0x0200, DEF_STR( 1C_6C ) ) |
| 245 | PORT_DIPNAME( 0x3800, 0x3800, DEF_STR( Coin_B ) ) | |
| 245 | PORT_DIPNAME( 0x3800, 0x3800, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:5,4,3") | |
| 246 | 246 | PORT_DIPSETTING( 0x1000, DEF_STR( 6C_1C ) ) |
| 247 | 247 | PORT_DIPSETTING( 0x1800, DEF_STR( 5C_1C ) ) |
| 248 | 248 | PORT_DIPSETTING( 0x2000, DEF_STR( 4C_1C ) ) |
| r1527 | r1528 | |
| 251 | 251 | PORT_DIPSETTING( 0x0800, DEF_STR( 3C_2C ) ) |
| 252 | 252 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_3C ) ) |
| 253 | 253 | PORT_DIPSETTING( 0x3800, DEF_STR( 1C_1C ) ) |
| 254 | PORT_DIPNAME( 0x4000, 0x4000, "Credits To Start" ) | |
| 254 | PORT_DIPNAME( 0x4000, 0x4000, "Credits To Start" ) PORT_DIPLOCATION("SW2:2") | |
| 255 | 255 | PORT_DIPSETTING( 0x4000, "1" ) |
| 256 | 256 | PORT_DIPSETTING( 0x0000, "2" ) |
| 257 | PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Free_Play ) ) | |
| 257 | PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:1") | |
| 258 | 258 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 259 | 259 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 260 | 260 | |
| r1527 | r1528 | |
| 288 | 288 | |
| 289 | 289 | static INPUT_PORTS_START( watrball ) |
| 290 | 290 | PORT_START /* dips */ |
| 291 | PORT_DIPNAME( 0x0001, 0x0001, "1" ) | |
| 292 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 293 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 294 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) | |
| 295 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 296 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 297 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) | |
| 298 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 299 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 300 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) | |
| 301 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 302 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 303 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) | |
| 304 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 305 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 306 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 291 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:8,7") /* Affects timer */ | |
| 292 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) /* 180 Seconds */ | |
| 293 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) /* 150 Seconds */ | |
| 294 | PORT_DIPSETTING( 0x0001, DEF_STR( Hard ) ) /* 120 Seconds */ | |
| 295 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) /* 100 Seconds */ | |
| 296 | PORT_DIPUNUSED_DIPLOC( 0x0004, 0x0004, "SW1:6" ) | |
| 297 | PORT_DIPUNUSED_DIPLOC( 0x0008, 0x0008, "SW1:5" ) | |
| 298 | PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW1:4" ) | |
| 299 | PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:3") | |
| 307 | 300 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) |
| 308 | 301 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 309 | PORT_DIPNAME( 0x0040, 0x0040, | |
| 302 | PORT_DIPNAME( 0x0040, 0x0040, " | |
| 310 | 303 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) |
| 311 | 304 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 312 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 313 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 314 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 315 | PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) | |
| 316 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) | |
| 317 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 318 | PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) | |
| 319 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 320 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 321 | PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) | |
| 322 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) | |
| 323 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 324 | PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) | |
| 325 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) | |
| 326 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 327 | PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) | |
| 328 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 329 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 330 | PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) | |
| 331 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 332 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 333 | PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) | |
| 334 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 335 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 336 | PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) | |
| 337 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 338 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 305 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:1" ) | |
| 339 | 306 | |
| 307 | PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:8,7,6") | |
| 308 | PORT_DIPSETTING( 0x0700, DEF_STR( 1C_1C ) ) | |
| 309 | PORT_DIPSETTING( 0x0000, DEF_STR( 3C_4C ) ) | |
| 310 | PORT_DIPSETTING( 0x0100, DEF_STR( 2C_3C ) ) | |
| 311 | PORT_DIPSETTING( 0x0600, DEF_STR( 1C_2C ) ) | |
| 312 | PORT_DIPSETTING( 0x0500, DEF_STR( 1C_3C ) ) | |
| 313 | PORT_DIPSETTING( 0x0400, DEF_STR( 1C_4C ) ) | |
| 314 | PORT_DIPSETTING( 0x0300, DEF_STR( 1C_5C ) ) | |
| 315 | PORT_DIPSETTING( 0x0200, DEF_STR( 1C_6C ) ) | |
| 316 | PORT_DIPNAME( 0x3800, 0x3800, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:5,4,3") | |
| 317 | PORT_DIPSETTING( 0x1000, DEF_STR( 6C_1C ) ) | |
| 318 | PORT_DIPSETTING( 0x1800, DEF_STR( 5C_1C ) ) | |
| 319 | PORT_DIPSETTING( 0x2000, DEF_STR( 4C_1C ) ) | |
| 320 | PORT_DIPSETTING( 0x2800, DEF_STR( 3C_1C ) ) | |
| 321 | PORT_DIPSETTING( 0x3000, DEF_STR( 2C_1C ) ) | |
| 322 | PORT_DIPSETTING( 0x0800, DEF_STR( 3C_2C ) ) | |
| 323 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_3C ) ) | |
| 324 | PORT_DIPSETTING( 0x3800, DEF_STR( 1C_1C ) ) | |
| 325 | PORT_DIPUNUSED_DIPLOC( 0x4000, 0x4000, "SW2:2" ) | |
| 326 | PORT_DIPUNUSED_DIPLOC( 0x8000, 0x8000, "SW2:1" ) | |
| 327 | ||
| 340 | 328 | PORT_START /* 16bit */ |
| 341 | 329 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 342 | 330 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| r1527 | r1528 | |
|---|---|---|
| 376 | 376 | MDRV_CPU_PROGRAM_MAP(sound_map,0) |
| 377 | 377 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,2) |
| 378 | 378 | |
| 379 | MDRV_CPU_ADD_TAG("68705", M68705,18432000/6 | |
| 379 | MDRV_CPU_ADD_TAG("68705", M68705,18432000/6 | |
| 380 | 380 | MDRV_CPU_PROGRAM_MAP(mcu_map,0) |
| 381 | 381 | |
| 382 | 382 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 464 | 464 | UINT8* game = memory_region(REGION_CPU1); |
| 465 | 465 | |
| 466 | 466 | if(game_banksel == 0x142) // Genesis I/O |
| 467 | return megaplay_genesis_io_r((offset | |
| 467 | return megaplay_genesis_io_r((offset | |
| 468 | 468 | |
| 469 | 469 | if(bios_mode & MP_ROM) |
| 470 | 470 | { |
| r1527 | r1528 | |
| 497 | 497 | static WRITE8_HANDLER ( bank_w ) |
| 498 | 498 | { |
| 499 | 499 | if(game_banksel == 0x142) // Genesis I/O |
| 500 | genesis_io_w((offset | |
| 500 | genesis_io_w((offset | |
| 501 | 501 | |
| 502 | 502 | if(offset <= 0x1fff && (bios_width & 0x08)) |
| 503 | 503 | ic37_ram[(0x2000 * (bios_bank & 0x03)) + offset] = data; |
| r1527 | r1528 | |
|---|---|---|
| 966 | 966 | MDRV_CPU_VBLANK_INT(atarigen_video_int_gen,1) |
| 967 | 967 | MDRV_CPU_PERIODIC_INT(hd68k_irq_gen, (double)32000000/16/16/16/16/2) |
| 968 | 968 | |
| 969 | MDRV_CPU_ADD_TAG("gsp", TMS34010, 48000000 | |
| 969 | MDRV_CPU_ADD_TAG("gsp", TMS34010, 48000000 | |
| 970 | 970 | MDRV_CPU_PROGRAM_MAP(driver_gsp_map,0) |
| 971 | 971 | MDRV_CPU_CONFIG(gsp_config_driver) |
| 972 | 972 | |
| r1527 | r1528 | |
| 994 | 994 | MDRV_IMPORT_FROM(driver_nomsp) |
| 995 | 995 | |
| 996 | 996 | /* basic machine hardware */ |
| 997 | MDRV_CPU_ADD_TAG("msp", TMS34010, 50000000 | |
| 997 | MDRV_CPU_ADD_TAG("msp", TMS34010, 50000000 | |
| 998 | 998 | MDRV_CPU_PROGRAM_MAP(driver_msp_map,0) |
| 999 | 999 | MDRV_CPU_CONFIG(msp_config) |
| 1000 | 1000 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
| 1023 | 1023 | MDRV_IMPORT_FROM(multisync_nomsp) |
| 1024 | 1024 | |
| 1025 | 1025 | /* basic machine hardware */ |
| 1026 | MDRV_CPU_ADD_TAG("msp", TMS34010, 50000000 | |
| 1026 | MDRV_CPU_ADD_TAG("msp", TMS34010, 50000000 | |
| 1027 | 1027 | MDRV_CPU_PROGRAM_MAP(driver_msp_map,0) |
| 1028 | 1028 | MDRV_CPU_CONFIG(msp_config) |
| 1029 | 1029 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
| 1143 | 1143 | MDRV_CPU_ADD_TAG("sound", M68000, 16000000/2) |
| 1144 | 1144 | MDRV_CPU_PROGRAM_MAP(driversnd_68k_map,0) |
| 1145 | 1145 | |
| 1146 | MDRV_CPU_ADD_TAG("sounddsp", TMS32010, 20000000 | |
| 1146 | MDRV_CPU_ADD_TAG("sounddsp", TMS32010, 20000000 | |
| 1147 | 1147 | MDRV_CPU_PROGRAM_MAP(driversnd_dsp_program_map,0) |
| 1148 | 1148 | /* Data Map is internal to the CPU */ |
| 1149 | 1149 | MDRV_CPU_IO_MAP(driversnd_dsp_io_map,0) |
| r1527 | r1528 | |
|---|---|---|
| 2184 | 2184 | MDRV_SCREEN_RAW_PARAMS(MASTER_CLOCK/4, 512, 64, 448, 284, 0, 256) |
| 2185 | 2185 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 2186 | 2186 | |
| 2187 | MDRV_VIDEO_START(m72) | |
| 2188 | MDRV_VIDEO_UPDATE(m72) | |
| 2189 | ||
| 2187 | 2190 | /* sound hardware */ |
| 2188 | 2191 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 2189 | 2192 |
| r1527 | r1528 | |
|---|---|---|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | |
| 223 | static UINT | |
| 223 | static CUSTOM_INPUT( | |
| 224 | 224 | { |
| 225 | 225 | return ttl74123_output; |
| 226 | 226 | } |
| r1527 | r1528 | |
|---|---|---|
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | static UINT | |
| 158 | static CUSTOM_INPUT( | |
| 159 | 159 | { |
| 160 | 160 | return EEPROM_read_bit(); |
| 161 | 161 | } |
| r1527 | r1528 | |
| 347 | 347 | |
| 348 | 348 | static MACHINE_DRIVER_START( konamigv ) |
| 349 | 349 | /* basic machine hardware */ |
| 350 | MDRV_CPU_ADD( PSXCPU, | |
| 350 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 351 | 351 | MDRV_CPU_PROGRAM_MAP( konamigv_map, 0 ) |
| 352 | 352 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 353 | 353 |
| r1527 | r1528 | |
|---|---|---|
| 74 | 74 | static ADDRESS_MAP_START( amspdwy_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 75 | 75 | AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM ) // ROM |
| 76 | 76 | // AM_RANGE(0x8000, 0x801f) AM_READ(MRA8_RAM ) // Palette |
| 77 | AM_RANGE(0x9000, 0x93ff) AM_READ(videoram_r ) // Layer | |
| 78 | AM_RANGE(0x9400, 0x97ff) AM_READ(videoram_r ) // Mirror? | |
| 79 | AM_RANGE(0x9800, 0x9bff) AM_READ(colorram_r ) // Layer | |
| 77 | AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_READ(MRA8_RAM) // Layer, mirrored? | |
| 78 | AM_RANGE(0x9800, 0x9bff) AM_READ(MRA8_RAM ) // Layer | |
| 80 | 79 | AM_RANGE(0x9c00, 0x9fff) AM_READ(MRA8_RAM ) // Unused? |
| 81 | 80 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r ) // DSW 1 |
| 82 | 81 | AM_RANGE(0xa400, 0xa400) AM_READ(input_port_1_r ) // DSW 2 |
| r1527 | r1528 | |
| 90 | 89 | static ADDRESS_MAP_START( amspdwy_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 91 | 90 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM ) // ROM |
| 92 | 91 | AM_RANGE(0x8000, 0x801f) AM_WRITE(amspdwy_paletteram_w) AM_BASE(&paletteram ) // Palette |
| 93 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(amspdwy_videoram_w) AM_BASE(&videoram ) // Layer | |
| 94 | AM_RANGE(0x9400, 0x97ff) AM_WRITE(amspdwy_videoram_w ) // Mirror? | |
| 92 | AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_WRITE(amspdwy_videoram_w) AM_BASE(&videoram) // Layer, mirrored? | |
| 95 | 93 | AM_RANGE(0x9800, 0x9bff) AM_WRITE(amspdwy_colorram_w) AM_BASE(&colorram ) // Layer |
| 96 | 94 | AM_RANGE(0x9c00, 0x9fff) AM_WRITE(MWA8_RAM ) // Unused? |
| 97 | 95 | // AM_RANGE(0xa000, 0xa000) AM_WRITE(MWA8_NOP ) // ? |
| r1527 | r1528 | |
|---|---|---|
| 1878 | 1878 | verboselog( 2, "stage: %dp data clk=%d state=%d d0=%d shift=%08x bit=%d stage_mask=%08x\n", offset + 1, clk, stage[ offset ].state, stage[ offset ].DO, stage[ offset ].shift, stage[ offset ].bit, stage_mask ); |
| 1879 | 1879 | } |
| 1880 | 1880 | |
| 1881 | static UINT | |
| 1881 | static CUSTOM_INPUT( | |
| 1882 | 1882 | { |
| 1883 | 1883 | return readinputportbytag( "STAGE" ) & stage_mask; |
| 1884 | 1884 | } |
| r1527 | r1528 | |
| 2725 | 2725 | |
| 2726 | 2726 | static MACHINE_DRIVER_START( konami573 ) |
| 2727 | 2727 | /* basic machine hardware */ |
| 2728 | MDRV_CPU_ADD( PSXCPU, | |
| 2728 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7 | |
| 2729 | 2729 | MDRV_CPU_PROGRAM_MAP( konami573_map, 0 ) |
| 2730 | 2730 | MDRV_CPU_VBLANK_INT( sys573_vblank, 1 ) |
| 2731 | 2731 |
| r1527 | r1528 | |
|---|---|---|
| 3459 | 3459 | |
| 3460 | 3460 | /*****************************************************************************/ |
| 3461 | 3461 | |
| 3462 | /* Parameters: YM3812 frequency, Oki frequency, Oki memory region */ | |
| 3463 | SEIBU_SOUND_SYSTEM_YM3812_HARDWARE | |
| 3464 | ||
| 3465 | SEIBU_SOUND_SYSTEM_YM2151_HARDWARE | |
| 3466 | ||
| 3467 | /*****************************************************************************/ | |
| 3468 | ||
| 3469 | 3462 | static MACHINE_DRIVER_START( legionna ) |
| 3470 | 3463 | |
| 3471 | 3464 | /* basic machine hardware */ |
| r1527 | r1528 | |
| 3858 | 3851 | ROM_LOAD( "barrel.8", 0x00000, 0x20000, CRC(489e5b1d) SHA1(ecd69d87ed354d1d08dbe6c2890af5f05d9d67d0) ) |
| 3859 | 3852 | ROM_END |
| 3860 | 3853 | |
| 3854 | ROM_START( hetbrlu2 ) | |
| 3855 | ROM_REGION( 0x80000, REGION_CPU1, 0 ) /* 68000 code */ | |
| 3856 | ROM_LOAD32_BYTE( "hb1", 0x00000, 0x20000, CRC(16a3754f) SHA1(3e070f2d004fc17d8ae9171955dc48ec5d14cf8a) ) | |
| 3857 | ROM_LOAD32_BYTE( "hb2", 0x00001, 0x20000, CRC(b34dc60c) SHA1(f9d1438469bf0d36d53d3f148bdf7f04dee5eae0) ) | |
| 3858 | ROM_LOAD32_BYTE( "hb3", 0x00002, 0x20000, CRC(3b035081) SHA1(b7ecbacd85102eda21dd162427a0e57cc6d24661) ) | |
| 3859 | ROM_LOAD32_BYTE( "hb4", 0x00003, 0x20000, CRC(fae85c88) SHA1(1b0316e66d4e0c5b3aa4045d6bfcc8a5464dc74e) ) | |
| 3860 | ||
| 3861 | ROM_REGION( 0x20000*2, REGION_CPU2, 0 ) /* Z80 code, banked data */ | |
| 3862 | ROM_LOAD( "barrel.7", 0x00000, 0x08000, CRC(0784dbd8) SHA1(bdf7f8a3a3eb346eb2aeaf4f9bfc49af059d04c9) ) | |
| 3863 | ROM_CONTINUE( 0x10000, 0x08000 ) /* banked stuff */ | |
| 3864 | ||
| 3865 | ROM_REGION( 0x020000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 3866 | ROM_LOAD( "barrel.6", 0x000000, 0x10000, CRC(bea3c581) SHA1(7f7f0a74bf106acaf57c182d47f0c707da2011bd) ) /* chars */ | |
| 3867 | ROM_LOAD( "barrel.5", 0x010000, 0x10000, CRC(5604d155) SHA1(afc30347b1e1316ec25056c0c1576f78be5f1a72) ) | |
| 3868 | ||
| 3869 | ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 3870 | ROM_LOAD( "obj1", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) ) /* sprites */ | |
| 3871 | ROM_LOAD( "obj2", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) ) | |
| 3872 | ||
| 3873 | ROM_REGION( 0x100000, REGION_GFX3, ROMREGION_DISPOSE ) /* MBK tiles */ | |
| 3874 | ROM_LOAD( "bg-1", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) ) | |
| 3875 | ||
| 3876 | ROM_REGION( 0x020000, REGION_GFX4, ROMREGION_DISPOSE ) /* not used */ | |
| 3877 | ||
| 3878 | ROM_REGION( 0x080000, REGION_GFX5, ROMREGION_DISPOSE ) /* BK3 tiles */ | |
| 3879 | ROM_LOAD( "bg-3", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) ) | |
| 3880 | ||
| 3881 | ROM_REGION( 0x080000, REGION_GFX6, ROMREGION_DISPOSE ) /* LBK tiles */ | |
| 3882 | ROM_LOAD( "bg-2", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) ) | |
| 3883 | ||
| 3884 | ROM_REGION( 0x020000, REGION_SOUND1, 0 ) /* ADPCM samples */ | |
| 3885 | ROM_LOAD( "barrel.8", 0x00000, 0x20000, CRC(489e5b1d) SHA1(ecd69d87ed354d1d08dbe6c2890af5f05d9d67d0) ) | |
| 3886 | ROM_END | |
| 3887 | ||
| 3861 | 3888 | /* |
| 3862 | 3889 | |
| 3863 | 3890 | Godzilla |
| r1527 | r1528 | |
| 4380 | 4407 | GAME( 1992, heatbrl, 0, heatbrl, heatbrl, 0, ROT0, "Tad", "Heated Barrel (World)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 4381 | 4408 | GAME( 1992, heatbrlo, heatbrl, heatbrl, heatbrl, 0, ROT0, "Tad", "Heated Barrel (World old version)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 4382 | 4409 | GAME( 1992, heatbrlu, heatbrl, heatbrl, heatbrl, 0, ROT0, "Tad", "Heated Barrel (US)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 4410 | GAME( 1992, hetbrlu2, heatbrl, heatbrl, heatbrl, 0, ROT0, "Tad", "Heated Barrel (US set 2)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 4383 | 4411 | |
| 4384 | 4412 | GAME( 1993, godzilla, 0, godzilla, godzilla, 0, ROT0, "Banpresto", "Godzilla", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 4385 | 4413 | GAME( 1993, sdgndmrb, 0, sdgndmrb, sdgndmrb, 0, ROT0, "Banpresto", "SD Gundam Sangokushi Rainbow Tairiku Senki", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| r1527 | r1528 | |
|---|---|---|
| 49 | 49 | #include "sound/ymz280b.h" |
| 50 | 50 | #include "machine/eeprom.h" |
| 51 | 51 | |
| 52 | #define MIDAS_DEBUG 0 | |
| 53 | ||
| 52 | 54 | static UINT16 *livequiz_gfxram, *livequiz_gfxregs; |
| 53 | 55 | |
| 54 | 56 | static VIDEO_START( livequiz ); |
| r1527 | r1528 | |
| 158 | 160 | { |
| 159 | 161 | int layers_ctrl = -1; |
| 160 | 162 | |
| 161 | #if | |
| 163 | #if | |
| 162 | 164 | if ( input_code_pressed(KEYCODE_Z) ) |
| 163 | 165 | { |
| 164 | 166 | int msk = 0; |
| r1527 | r1528 | |
|---|---|---|
| 878 | 878 | static MACHINE_DRIVER_START( zwackery ) |
| 879 | 879 | |
| 880 | 880 | /* basic machine hardware */ |
| 881 | MDRV_CPU_ADD(M68000, 7652400) | |
| 881 | MDRV_CPU_ADD(M68000, 7652400) /* should be XTAL_16MHz/2 */ | |
| 882 | 882 | MDRV_CPU_PROGRAM_MAP(zwackery_map,0) |
| 883 | 883 | MDRV_CPU_VBLANK_INT(mcr68_interrupt,1) |
| 884 | 884 | |
| r1527 | r1528 | |
| 1321 | 1321 | mcr68_common_init(MCR_CHIP_SQUEAK_DELUXE, 0, 0); |
| 1322 | 1322 | |
| 1323 | 1323 | /* Zwackery doesn't care too much about this value; currently taken from Blasted */ |
| 1324 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1324 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1325 | 1325 | } |
| 1326 | 1326 | |
| 1327 | 1327 | |
| r1527 | r1528 | |
| 1330 | 1330 | mcr68_common_init(MCR_SOUNDS_GOOD, 0, 0); |
| 1331 | 1331 | |
| 1332 | 1332 | /* Xenophobe doesn't care too much about this value; currently taken from Blasted */ |
| 1333 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1333 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1334 | 1334 | |
| 1335 | 1335 | /* install control port handler */ |
| 1336 | 1336 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x0c0000, 0x0cffff, 0, 0, xenophobe_control_w); |
| r1527 | r1528 | |
| 1342 | 1342 | mcr68_common_init(MCR_TURBO_CHIP_SQUEAK | MCR_SOUNDS_GOOD, 0, -6); |
| 1343 | 1343 | |
| 1344 | 1344 | /* Spy Hunter 2 doesn't care too much about this value; currently taken from Blasted */ |
| 1345 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1345 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1346 | 1346 | |
| 1347 | 1347 | /* analog port handling is a bit tricky */ |
| 1348 | 1348 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x0c0000, 0x0cffff, 0, 0, spyhunt2_control_w); |
| r1527 | r1528 | |
| 1358 | 1358 | /* Blasted checks the timing of VBLANK relative to the 493 interrupt */ |
| 1359 | 1359 | /* VBLANK is required to come within 220-256 E clocks (i.e., 2200-2560 CPU clocks) */ |
| 1360 | 1360 | /* after the 493; we also allow 16 E clocks for latency */ |
| 1361 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1361 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1362 | 1362 | |
| 1363 | 1363 | /* handle control writes */ |
| 1364 | 1364 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x0c0000, 0x0cffff, 0, 0, blasted_control_w); |
| r1527 | r1528 | |
| 1374 | 1374 | mcr68_common_init(MCR_WILLIAMS_SOUND, 16, 0); |
| 1375 | 1375 | |
| 1376 | 1376 | /* Arch Rivals doesn't care too much about this value; currently taken from Blasted */ |
| 1377 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1377 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1378 | 1378 | |
| 1379 | 1379 | /* handle control writes */ |
| 1380 | 1380 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x0c0000, 0x0cffff, 0, 0, archrivl_control_w); |
| r1527 | r1528 | |
| 1393 | 1393 | mcr68_common_init(MCR_WILLIAMS_SOUND, 16, 0); |
| 1394 | 1394 | |
| 1395 | 1395 | /* Pigskin doesn't care too much about this value; currently taken from Tri-Sports */ |
| 1396 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1396 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1397 | 1397 | |
| 1398 | 1398 | state_save_register_global_array(protection_data); |
| 1399 | 1399 | } |
| r1527 | r1528 | |
| 1406 | 1406 | /* Tri-Sports checks the timing of VBLANK relative to the 493 interrupt */ |
| 1407 | 1407 | /* VBLANK is required to come within 87-119 E clocks (i.e., 870-1190 CPU clocks) */ |
| 1408 | 1408 | /* after the 493 */ |
| 1409 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1409 | mcr68_timing_factor = attotime_make(0, HZ_TO_ATTOSECONDS( | |
| 1410 | 1410 | } |
| 1411 | 1411 | |
| 1412 | 1412 |
| r1527 | r1528 | |
|---|---|---|
| 255 | 255 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 256 | 256 | MDRV_CPU_VBLANK_INT(irq3_line_hold,1) |
| 257 | 257 | |
| 258 | MDRV_CPU_ADD(I8035,6144000 | |
| 258 | MDRV_CPU_ADD(I8035,6144000 | |
| 259 | 259 | /* audio CPU */ /* divisor ??? */ |
| 260 | 260 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 261 | 261 | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) |
| r1527 | r1528 | |
|---|---|---|
| 687 | 687 | static MACHINE_DRIVER_START( gsword ) |
| 688 | 688 | |
| 689 | 689 | /* basic machine hardware */ |
| 690 | MDRV_CPU_ADD(Z80, | |
| 690 | MDRV_CPU_ADD(Z80, XTAL_18MHz/6) /* verified on pcb */ | |
| 691 | 691 | MDRV_CPU_PROGRAM_MAP(cpu1_map,0) |
| 692 | 692 | MDRV_CPU_IO_MAP(cpu1_io_map,0) |
| 693 | 693 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 694 | 694 | |
| 695 | MDRV_CPU_ADD(Z80, | |
| 695 | MDRV_CPU_ADD(Z80, XTAL_18MHz/6) /* verified on pcb */ | |
| 696 | 696 | MDRV_CPU_PROGRAM_MAP(cpu2_map,0) |
| 697 | 697 | MDRV_CPU_IO_MAP(cpu2_io_map,0) |
| 698 | 698 | MDRV_CPU_VBLANK_INT(gsword_snd_interrupt,4) |
| 699 | 699 | |
| 700 | MDRV_CPU_ADD(Z80, | |
| 700 | MDRV_CPU_ADD(Z80, XTAL_18MHz/6) /* verified on pcb */ | |
| 701 | 701 | /* audio CPU */ |
| 702 | 702 | MDRV_CPU_PROGRAM_MAP(cpu3_map,0) |
| 703 | 703 | |
| r1527 | r1528 | |
| 728 | 728 | /* sound hardware */ |
| 729 | 729 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 730 | 730 | |
| 731 | MDRV_SOUND_ADD(AY8910, 1 | |
| 731 | MDRV_SOUND_ADD(AY8910, XTAL_18MHz/12) /* verified on pcb */ | |
| 732 | 732 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 733 | 733 | |
| 734 | 734 | MDRV_SOUND_ADD(AY8910, 1500000) |
| 735 | 735 | MDRV_SOUND_CONFIG(ay8910_interface) |
| 736 | 736 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 737 | 737 | |
| 738 | MDRV_SOUND_ADD(MSM5205, | |
| 738 | MDRV_SOUND_ADD(MSM5205, XTAL_400kHz) /* verified on pcb */ | |
| 739 | 739 | MDRV_SOUND_CONFIG(msm5205_interface) |
| 740 | 740 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) |
| 741 | 741 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
|---|---|---|
| 134 | 134 | |
| 135 | 135 | extern UINT8 * cpk_colorram; |
| 136 | 136 | extern UINT8 * cpk_videoram; |
| 137 | extern UINT8 * cpk_palette; | |
| 138 | extern UINT8 * cpk_palette2; | |
| 139 | 137 | extern UINT8 * cpk_expram; |
| 140 | 138 | |
| 141 | 139 | |
| r1527 | r1528 | |
| 146 | 144 | |
| 147 | 145 | WRITE8_HANDLER( cpk_palette_w ); |
| 148 | 146 | WRITE8_HANDLER( cpk_palette2_w ); |
| 149 | READ8_HANDLER( cpk_videoram_r ); | |
| 150 | WRITE8_HANDLER( cpk_videoram_w ); | |
| 151 | READ8_HANDLER( cpk_colorram_r ); | |
| 152 | WRITE8_HANDLER( cpk_colorram_w ); | |
| 153 | 147 | READ8_HANDLER( cpk_expansion_r ); |
| 154 | WRITE8_HANDLER( cpk_expansion_w ); | |
| 155 | 148 | |
| 156 | 149 | |
| 157 | 150 | |
| r1527 | r1528 | |
| 207 | 200 | AM_RANGE(0x5082, 0x5082) AM_READ(input_port_6_r) /* Coing & Kbd */ |
| 208 | 201 | AM_RANGE(0x5091, 0x5091) AM_READ(input_port_7_r) /* Keyboard */ |
| 209 | 202 | AM_RANGE(0x50a0, 0x50a0) AM_READ(input_port_8_r) /* Not connected */ |
| 210 | AM_RANGE(0x6800, 0x6fff) AM_WRITE(cpk_expansion_w) | |
| 211 | AM_RANGE(0x7000, 0x77ff) AM_READWRITE(cpk_videoram_r,cpk_videoram_w) | |
| 212 | AM_RANGE(0x7800, 0x7fff) AM_READWRITE(cpk_colorram_r,cpk_colorram_w) | |
| 203 | AM_RANGE(0x6800, 0x6fff) AM_WRITE(MWA8_RAM) AM_BASE(&cpk_expram) | |
| 204 | AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE(&cpk_videoram) | |
| 205 | AM_RANGE(0x7800, 0x7fff) AM_RAM AM_BASE(&cpk_colorram) | |
| 213 | 206 | AM_RANGE(0x8000, 0xffff) AM_READ(cpk_expansion_r) |
| 214 | 207 | ADDRESS_MAP_END |
| 215 | 208 | |
| r1527 | r1528 | |
| 226 | 219 | AM_RANGE(0x5090, 0x5090) AM_WRITE(custom_io_w) |
| 227 | 220 | AM_RANGE(0x5091, 0x5091) AM_READ(custom_io_r) /* used for protection and other */ |
| 228 | 221 | AM_RANGE(0x50a0, 0x50a0) AM_READ(input_port_8_r) /* Not connected */ |
| 229 | AM_RANGE(0x6800, 0x6fff) AM_WRITE(cpk_expansion_w) | |
| 230 | AM_RANGE(0x7000, 0x77ff) AM_READWRITE(cpk_videoram_r,cpk_videoram_w) | |
| 231 | AM_RANGE(0x7800, 0x7fff) AM_READWRITE(cpk_colorram_r,cpk_colorram_w) | |
| 222 | AM_RANGE(0x6800, 0x6fff) AM_WRITE(MWA8_RAM) AM_BASE(&cpk_expram) | |
| 223 | AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE(&cpk_videoram) | |
| 224 | AM_RANGE(0x7800, 0x7fff) AM_RAM AM_BASE(&cpk_colorram) | |
| 232 | 225 | AM_RANGE(0x8000, 0xffff) AM_READ(cpk_expansion_r) |
| 233 | 226 | ADDRESS_MAP_END |
| 234 | 227 |
| r1527 | r1528 | |
|---|---|---|
| 186 | 186 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 187 | 187 | AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM) |
| 188 | 188 | AM_RANGE(0x4000, 0x7fff) AM_WRITE(MWA8_RAM) |
| 189 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 190 | AM_RANGE(0x8800, 0x8fff) AM_WRITE(naughtyb_videoram2_w) AM_BASE(&naughtyb_videoram2) | |
| 189 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 190 | AM_RANGE(0x8800, 0x8fff) AM_WRITE(MWA8_RAM) AM_BASE(&naughtyb_videoram2) | |
| 191 | 191 | AM_RANGE(0x9000, 0x97ff) AM_WRITE(naughtyb_videoreg_w) |
| 192 | 192 | AM_RANGE(0x9800, 0x9fff) AM_WRITE(MWA8_RAM) AM_BASE(&naughtyb_scrollreg) |
| 193 | 193 | AM_RANGE(0xa000, 0xa7ff) AM_WRITE(pleiads_sound_control_a_w) |
| r1527 | r1528 | |
| 197 | 197 | static ADDRESS_MAP_START( popflame_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 198 | 198 | AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM) |
| 199 | 199 | AM_RANGE(0x4000, 0x7fff) AM_WRITE(MWA8_RAM) |
| 200 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 201 | AM_RANGE(0x8800, 0x8fff) AM_WRITE(naughtyb_videoram2_w) AM_BASE(&naughtyb_videoram2) | |
| 200 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 201 | AM_RANGE(0x8800, 0x8fff) AM_WRITE(MWA8_RAM) AM_BASE(&naughtyb_videoram2) | |
| 202 | 202 | AM_RANGE(0x9000, 0x97ff) AM_WRITE(popflame_videoreg_w) |
| 203 | 203 | AM_RANGE(0x9800, 0x9fff) AM_WRITE(MWA8_RAM) AM_BASE(&naughtyb_scrollreg) |
| 204 | 204 | AM_RANGE(0xa000, 0xa7ff) AM_WRITE(pleiads_sound_control_a_w) |
| r1527 | r1528 | |
|---|---|---|
| 863 | 863 | MDRV_CPU_PROGRAM_MAP(hostmem,0) |
| 864 | 864 | MDRV_CPU_VBLANK_INT(micro3d_vblank,1) |
| 865 | 865 | |
| 866 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 866 | MDRV_CPU_ADD(TMS34010, 40000000 | |
| 867 | 867 | MDRV_CPU_CONFIG(vgb_config) |
| 868 | 868 | MDRV_CPU_PROGRAM_MAP(vgbmem,0) |
| 869 | 869 |
| r1527 | r1528 | |
|---|---|---|
| 78 | 78 | AM_RANGE(0xdc01, 0xdc01) AM_WRITE(momoko_fg_scrollx_w) |
| 79 | 79 | AM_RANGE(0xdc02, 0xdc02) AM_WRITE(momoko_fg_select_w) |
| 80 | 80 | |
| 81 | AM_RANGE(0xe000, 0xe3ff) AM_WRITE( | |
| 81 | AM_RANGE(0xe000, 0xe3ff) AM_WRITE(MWA8 | |
| 82 | 82 | |
| 83 | 83 | AM_RANGE(0xe800, 0xe800) AM_WRITE(momoko_text_scrolly_w) |
| 84 | 84 | AM_RANGE(0xe801, 0xe801) AM_WRITE(momoko_text_mode_w) |
| r1527 | r1528 | |
|---|---|---|
| 97 | 97 | AM_RANGE(0xc000, 0xcfff) AM_WRITE(MWA8_RAM) |
| 98 | 98 | AM_RANGE(0xd000, 0xd3ff) AM_WRITE(kchamp_videoram_w) AM_BASE(&videoram) |
| 99 | 99 | AM_RANGE(0xd400, 0xd7ff) AM_WRITE(kchamp_colorram_w) AM_BASE(&colorram) |
| 100 | AM_RANGE(0xd800, 0xd8ff) AM_WRITE( | |
| 100 | AM_RANGE(0xd800, 0xd8ff) AM_WRITE(MWA8 | |
| 101 | 101 | AM_RANGE(0xd900, 0xdfff) AM_WRITE(MWA8_RAM) |
| 102 | 102 | AM_RANGE(0xe000, 0xffff) AM_WRITE(MWA8_ROM) |
| 103 | 103 | ADDRESS_MAP_END |
| r1527 | r1528 | |
| 188 | 188 | AM_RANGE(0xc000, 0xdfff) AM_WRITE(MWA8_RAM) |
| 189 | 189 | AM_RANGE(0xe000, 0xe3ff) AM_WRITE(kchamp_videoram_w) AM_BASE(&videoram) |
| 190 | 190 | AM_RANGE(0xe400, 0xe7ff) AM_WRITE(kchamp_colorram_w) AM_BASE(&colorram) |
| 191 | AM_RANGE(0xea00, 0xeaff) AM_WRITE( | |
| 191 | AM_RANGE(0xea00, 0xeaff) AM_WRITE(MWA8 | |
| 192 | 192 | AM_RANGE(0xeb00, 0xffff) AM_WRITE(MWA8_RAM) |
| 193 | 193 | ADDRESS_MAP_END |
| 194 | 194 |
| r1527 | r1528 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | |
| 23 | static UINT | |
| 23 | static CUSTOM_INPUT( | |
| 24 | 24 | { |
| 25 | 25 | return ultratnk_collision[(FPTR) param]; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | |
| 29 | static UINT | |
| 29 | static CUSTOM_INPUT( | |
| 30 | 30 | { |
| 31 | 31 | UINT8 joy = readinputportbytag(param) & 3; |
| 32 | 32 |
| r1527 | r1528 | |
|---|---|---|
| 664 | 664 | }; |
| 665 | 665 | |
| 666 | 666 | static GFXDECODE_START( phoenix ) |
| 667 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) | |
| 668 | GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 16*4, 16 ) | |
| 667 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) | |
| 668 | GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 0, 16 ) | |
| 669 | 669 | GFXDECODE_END |
| 670 | 670 | |
| 671 | 671 | static GFXDECODE_START( pleiads ) |
| r1527 | r1528 | |
| 720 | 720 | static MACHINE_DRIVER_START( phoenix ) |
| 721 | 721 | |
| 722 | 722 | /* basic machine hardware */ |
| 723 | MDRV_CPU_ADD_TAG("main", 8085A, | |
| 723 | MDRV_CPU_ADD_TAG("main", 8085A, CPU_CLOCK | |
| 724 | 724 | MDRV_CPU_PROGRAM_MAP(phoenix_readmem,phoenix_writemem) |
| 725 | 725 | |
| 726 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 727 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION /* frames per second, vblank duration */) | |
| 726 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) | |
| 728 | 727 | |
| 729 | 728 | MDRV_MACHINE_RESET(phoenix) |
| 730 | 729 | |
| 731 | 730 | /* video hardware */ |
| 732 | 731 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 733 | 732 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 734 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 735 | MDRV_SCREEN_VISIBLE_AREA(0*8, 31*8-1, 0*8, 26*8-1) | |
| 736 | 733 | MDRV_GFXDECODE(phoenix) |
| 737 | 734 | MDRV_PALETTE_LENGTH(256) |
| 738 | MDRV_COLORTABLE_LENGTH(16*4+16*4) | |
| 739 | 735 | |
| 740 | 736 | MDRV_PALETTE_INIT(phoenix) |
| 741 | 737 | MDRV_VIDEO_START(phoenix) |
| 742 | 738 | MDRV_VIDEO_UPDATE(phoenix) |
| 743 | 739 | |
| 740 | MDRV_SOUND_START(phoenix) | |
| 741 | ||
| 744 | 742 | /* sound hardware */ |
| 745 | 743 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 746 | 744 | |
| r1527 | r1528 | |
| 770 | 768 | MDRV_COLORTABLE_LENGTH(32*4+32*4) |
| 771 | 769 | |
| 772 | 770 | MDRV_PALETTE_INIT(pleiads) |
| 771 | MDRV_VIDEO_START(pleiads) | |
| 773 | 772 | |
| 774 | 773 | /* sound hardware */ |
| 775 | 774 | MDRV_SOUND_REPLACE("tms", TMS36XX, 247) |
| r1527 | r1528 | |
| 1307 | 1306 | |
| 1308 | 1307 | |
| 1309 | 1308 | |
| 1310 | GAME( 1980, phoenix, 0, phoenix, phoenix, 0, ROT90, "Amstar", "Phoenix (Amstar)", 0 ) | |
| 1311 | GAME( 1980, phoenixa, phoenix, phoenix, phoenixa, 0, ROT90, "Amstar (Centuri license)", "Phoenix (Centuri), Set 1", 0 ) | |
| 1312 | GAME( 1980, phoenixb, phoenix, phoenix, phoenixa, 0, ROT90, "Amstar (Centuri license)", "Phoenix (Centuri), Set 2", 0 ) | |
| 1313 | GAME( 1980, phoenixt, phoenix, phoenix, phoenixt, 0, ROT90, "Taito", "Phoenix (Taito)", 0 ) | |
| 1314 | GAME( 1980, phoenix3, phoenix, phoenix, phoenix3, 0, ROT90, "bootleg", "Phoenix (T.P.N.)", 0 ) | |
| 1315 | GAME( 1981, phoenixc, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg?", "Phoenix (IRECSA, G.G.I Corp)", 0 ) | |
| 1309 | GAME( 1980, phoenix, 0, phoenix, phoenix, 0, ROT90, "Amstar", "Phoenix (Amstar)", GAME_SUPPORTS_SAVE ) | |
| 1310 | GAME( 1980, phoenixa, phoenix, phoenix, phoenixa, 0, ROT90, "Amstar (Centuri license)", "Phoenix (Centuri), Set 1", GAME_SUPPORTS_SAVE ) | |
| 1311 | GAME( 1980, phoenixb, phoenix, phoenix, phoenixa, 0, ROT90, "Amstar (Centuri license)", "Phoenix (Centuri), Set 2", GAME_SUPPORTS_SAVE ) | |
| 1312 | GAME( 1980, phoenixt, phoenix, phoenix, phoenixt, 0, ROT90, "Taito", "Phoenix (Taito)", GAME_SUPPORTS_SAVE ) | |
| 1313 | GAME( 1980, phoenix3, phoenix, phoenix, phoenix3, 0, ROT90, "bootleg", "Phoenix (T.P.N.)", GAME_SUPPORTS_SAVE ) | |
| 1314 | GAME( 1981, phoenixc, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg?", "Phoenix (IRECSA, G.G.I Corp)", GAME_SUPPORTS_SAVE ) | |
| 1316 | 1315 | |
| 1317 | 1316 | |
| 1318 | 1317 | GAME( 1981, condor, phoenix, condor, condor, condor, ROT90, "Sidam (bootleg)", "Condor (bootleg of Phoenix)", 0 ) |
| 1319 | 1318 | // the following 2 were common bootlegs in england & france respectively |
| 1320 | GAME( 1980, falcon, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg", "Falcon (bootleg of Phoenix) (set 1)", 0 ) | |
| 1321 | GAME( 1980, vautour, phoenix, phoenix, phoenixt, 0, ROT90, "Jeutel (bootleg)", "Vautour (bootleg of Phoenix) (set 1)", 0 ) | |
| 1319 | GAME( 1980, falcon, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg", "Falcon (bootleg of Phoenix) (set 1)", GAME_SUPPORTS_SAVE ) | |
| 1320 | GAME( 1980, vautour, phoenix, phoenix, phoenixt, 0, ROT90, "Jeutel (bootleg)", "Vautour (bootleg of Phoenix) (set 1)", GAME_SUPPORTS_SAVE ) | |
| 1322 | 1321 | GAME( 1980, vautour2, phoenix, condor, condor, condor, ROT90, "bootleg", "Vautour (bootleg of Phoenix) (set 2)", 0 ) |
| 1323 | 1322 | // fenix is an italian bootleg based on vautour |
| 1324 | 1323 | GAME( 1980, fenix, phoenix, condor, condor, condor, ROT90, "bootleg", "Fenix (bootleg of Phoenix)", GAME_NOT_WORKING ) |
| r1527 | r1528 | |
|---|---|---|
| 45 | 45 | AM_RANGE(0x0000, 0x5fff) AM_READ(MRA8_ROM) |
| 46 | 46 | |
| 47 | 47 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) |
| 48 | AM_RANGE(0xc800, 0xcfff) AM_READ( | |
| 48 | AM_RANGE(0xc800, 0xcfff) AM_READ(MRA8 | |
| 49 | 49 | AM_RANGE(0xd000, 0xd7ff) AM_READ(MRA8_RAM) |
| 50 | 50 | AM_RANGE(0xd800, 0xdfff) AM_READ(markham_sharedram_r) |
| 51 | 51 |
| r1527 | r1528 | |
|---|---|---|
| 538 | 538 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) /* source of IRQs is unknown */ |
| 539 | 539 | |
| 540 | 540 | #ifdef USE_MCU |
| 541 | MDRV_CPU_ADD(M68705,8000000/2 | |
| 541 | MDRV_CPU_ADD(M68705,8000000/2 | |
| 542 | 542 | MDRV_CPU_PROGRAM_MAP(mcu_readmem,mcu_writemem) |
| 543 | 543 | #endif |
| 544 | 544 |
| r1527 | r1528 | |
|---|---|---|
| 962 | 962 | MDRV_CPU_IO_MAP(hotsmash_port_map,0) |
| 963 | 963 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 964 | 964 | |
| 965 | MDRV_CPU_ADD(M68705, 4000000 | |
| 965 | MDRV_CPU_ADD(M68705, 4000000 | |
| 966 | 966 | MDRV_CPU_PROGRAM_MAP(m68705_map,0) |
| 967 | 967 | |
| 968 | 968 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 177 | 177 | #include "jaguar.h" |
| 178 | 178 | |
| 179 | 179 | |
| 180 | #define JAGUAR_CLOCK XTAL_52MHz | |
| 181 | #define R3000_CLOCK XTAL_40MHz | |
| 182 | #define M68K_CLOCK XTAL_50MHz | |
| 180 | 183 | |
| 184 | ||
| 185 | ||
| 181 | 186 | /************************************* |
| 182 | 187 | * |
| 183 | 188 | * Global variables |
| r1527 | r1528 | |
| 987 | 992 | static MACHINE_DRIVER_START( cojagr3k ) |
| 988 | 993 | |
| 989 | 994 | /* basic machine hardware */ |
| 990 | MDRV_CPU_ADD(R30 | |
| 995 | MDRV_CPU_ADD_TAG("main", R3041BE, R3000_CLOCK) | |
| 991 | 996 | MDRV_CPU_CONFIG(config) |
| 992 | 997 | MDRV_CPU_PROGRAM_MAP(r3000_map,0) |
| 993 | 998 | |
| 994 | MDRV_CPU_ADD(JAGUARGPU, | |
| 999 | MDRV_CPU_ADD(JAGUARGPU, JAGUAR_CLOCK/2) | |
| 995 | 1000 | MDRV_CPU_CONFIG(gpu_config) |
| 996 | 1001 | MDRV_CPU_PROGRAM_MAP(gpu_map,0) |
| 997 | 1002 | |
| 998 | MDRV_CPU_ADD(JAGUARDSP, | |
| 1003 | MDRV_CPU_ADD(JAGUARDSP, JAGUAR_CLOCK/2) | |
| 999 | 1004 | MDRV_CPU_CONFIG(dsp_config) |
| 1000 | 1005 | MDRV_CPU_PROGRAM_MAP(dsp_map,0) |
| 1001 | 1006 | |
| 1002 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1003 | ||
| 1004 | 1007 | MDRV_MACHINE_RESET(cojag) |
| 1005 | 1008 | MDRV_NVRAM_HANDLER(generic_1fill) |
| 1006 | 1009 | |
| 1007 | 1010 | /* video hardware */ |
| 1008 | 1011 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_BEFORE_VBLANK) |
| 1009 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1010 | MDRV_SCREEN_SIZE(42*8, 262) /* guess -- TOM registers should be used to configure screen */ | |
| 1011 | MDRV_SCREEN_VISIBLE_AREA(0*8, 42*8-1, 0*8, 30*8-1) | |
| 1012 | MDRV_PALETTE_LENGTH(65534) | |
| 1013 | 1012 | |
| 1013 | MDRV_SCREEN_ADD("main", 0) | |
| 1014 | MDRV_SCREEN_RAW_PARAMS(COJAG_PIXEL_CLOCK/2, 456, 42, 402, 262, 17, 257) | |
| 1015 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 1016 | ||
| 1014 | 1017 | MDRV_VIDEO_START(cojag) |
| 1015 | 1018 | MDRV_VIDEO_UPDATE(cojag) |
| 1016 | 1019 | |
| r1527 | r1528 | |
| 1025 | 1028 | MACHINE_DRIVER_END |
| 1026 | 1029 | |
| 1027 | 1030 | |
| 1028 | static MACHINE_DRIVER_START( | |
| 1031 | static MACHINE_DRIVER_START( c | |
| 1029 | 1032 | MDRV_IMPORT_FROM(cojagr3k) |
| 1030 | 1033 | |
| 1031 | /* video hardware */ | |
| 1032 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1) | |
| 1033 | MACHINE_DRIVER_END | |
| 1034 | ||
| 1035 | ||
| 1036 | static MACHINE_DRIVER_START( cojag68k ) | |
| 1037 | ||
| 1038 | 1034 | /* basic machine hardware */ |
| 1039 | MDRV_CPU_A | |
| 1035 | MDRV_CPU_REPLACE("main", M68EC020, M68K_CLOCK/2) | |
| 1040 | 1036 | MDRV_CPU_PROGRAM_MAP(m68020_map,0) |
| 1041 | ||
| 1042 | MDRV_CPU_ADD(JAGUARGPU, 52000000/2) | |
| 1043 | MDRV_CPU_CONFIG(gpu_config) | |
| 1044 | MDRV_CPU_PROGRAM_MAP(gpu_map,0) | |
| 1045 | ||
| 1046 | MDRV_CPU_ADD(JAGUARDSP, 52000000/2) | |
| 1047 | MDRV_CPU_CONFIG(dsp_config) | |
| 1048 | MDRV_CPU_PROGRAM_MAP(dsp_map,0) | |
| 1049 | ||
| 1050 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1051 | ||
| 1052 | MDRV_MACHINE_RESET(cojag) | |
| 1053 | MDRV_NVRAM_HANDLER(generic_1fill) | |
| 1054 | ||
| 1055 | /* video hardware */ | |
| 1056 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_BEFORE_VBLANK) | |
| 1057 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1058 | MDRV_SCREEN_SIZE(42*8, 262) /* guess -- TOM registers should be used to configure screen */ | |
| 1059 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1) | |
| 1060 | MDRV_PALETTE_LENGTH(65534) | |
| 1061 | ||
| 1062 | MDRV_VIDEO_START(cojag) | |
| 1063 | MDRV_VIDEO_UPDATE(cojag) | |
| 1064 | ||
| 1065 | /* sound hardware */ | |
| 1066 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") | |
| 1067 | ||
| 1068 | MDRV_SOUND_ADD(DAC, 0) | |
| 1069 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 1.0) | |
| 1070 | ||
| 1071 | MDRV_SOUND_ADD(DAC, 0) | |
| 1072 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 1.0) | |
| 1073 | 1037 | MACHINE_DRIVER_END |
| 1074 | 1038 | |
| 1075 | 1039 | |
| r1527 | r1528 | |
| 1423 | 1387 | static void cojag_common_init(running_machine *machine, UINT16 gpu_jump_offs, UINT16 spin_pc) |
| 1424 | 1388 | { |
| 1425 | 1389 | /* copy over the ROM */ |
| 1426 | cojag_is_r3000 = (machine->drv->cpu[0].type == CPU_R30 | |
| 1390 | cojag_is_r3000 = (machine->drv->cpu[0].type == CPU_R3041BE); | |
| 1427 | 1391 | |
| 1428 | 1392 | /* install synchronization hooks for GPU */ |
| 1429 | 1393 | if (cojag_is_r3000) |
| r1527 | r1528 | |
| 1560 | 1524 | * |
| 1561 | 1525 | *************************************/ |
| 1562 | 1526 | |
| 1563 | GAME( 1996, area51, 0, r3k | |
| 1527 | GAME( 1996, area51, 0, cojagr3k | |
| 1564 | 1528 | GAME( 1995, area51t, area51, cojag68k, area51, area51a, ROT0, "Time Warner", "Area 51 (Time Warner License)", 0 ) |
| 1565 | 1529 | GAME( 1995, area51a, area51, cojag68k, area51, area51a, ROT0, "Atari Games", "Area 51 (Atari Games License)", 0 ) |
| 1566 | 1530 | GAME( 1995, fishfren, 0, cojagr3k, fishfren, fishfren, ROT0, "Time Warner Interactive", "Fishin' Frenzy (prototype)", 0 ) |
| r1527 | r1528 | |
| 1571 | 1535 | GAME( 1996, freezea4, freezeat, cojagr3k, freezeat, freezea4, ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/03)", 0 ) |
| 1572 | 1536 | GAME( 1996, freezea5, freezeat, cojagr3k, freezeat, freezea5, ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/09/20, AMOA-96)", 0 ) |
| 1573 | 1537 | GAME( 1996, freezea6, freezeat, cojagr3k, freezeat, freezea6, ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/09/07, Jamma-96)", 0 ) |
| 1574 | GAME( 1996, maxforce, 0, r3knarrow, area51, maxforce, ROT0, "Atari Games", "Maximum Force v1.05", 0 ) | |
| 1575 | GAME( 1996, maxf_102, maxforce, r3knarrow, area51, maxforce, ROT0, "Atari Games", "Maximum Force v1.02", 0 ) | |
| 1576 | GAME( 1996, maxf_ng, maxforce, r3knarrow, area51, maxforce, ROT0, "Atari Games", "Maximum Force (No Gore version)", 0 ) | |
| 1538 | GAME( 1996, maxforce, 0, cojagr3k, area51, maxforce, ROT0, "Atari Games", "Maximum Force v1.05", 0 ) | |
| 1539 | GAME( 1996, maxf_102, maxforce, cojagr3k, area51, maxforce, ROT0, "Atari Games", "Maximum Force v1.02", 0 ) | |
| 1540 | GAME( 1996, maxf_ng, maxforce, cojagr3k, area51, maxforce, ROT0, "Atari Games", "Maximum Force (No Gore version)", 0 ) | |
| 1577 | 1541 | GAME( 1998, area51mx, 0, cojag68k, area51, area51mx, ROT0, "Atari Games", "Area 51 / Maximum Force Duo v2.0", 0 ) |
| 1578 | GAME( 1998, a51mxr3k, area51mx, r3k | |
| 1542 | GAME( 1998, a51mxr3k, area51mx, cojagr3k | |
| 1579 | 1543 | GAME( 1996, vcircle, 0, cojagr3k, vcircle, vcircle, ROT0, "Atari Games", "Vicious Circle (prototype)", 0 ) |
| r1527 | r1528 | |
|---|---|---|
| 113 | 113 | jamma_if_control_latch = 0; |
| 114 | 114 | }; |
| 115 | 115 | |
| 116 | ADDRESS_MAP_START( z80_map, ADDRESS_SPACE_PROGRAM, 8) | |
| 116 | static ADDRESS_MAP_START( z80_map, ADDRESS_SPACE_PROGRAM, 8) | |
| 117 | 117 | AM_RANGE( 0x0000, 0x07FF) AM_ROM |
| 118 | 118 | AM_RANGE( 0x0800, 0x0FFF) AM_RAM |
| 119 | 119 | AM_RANGE( 0x1000, 0x17FF) AM_WRITE( jamma_if_control_latch_w ) |
| r1527 | r1528 | |
|---|---|---|
| 516 | 516 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 517 | 517 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 518 | 518 | |
| 519 | MDRV_CPU_ADD(I8039,8000000 | |
| 519 | MDRV_CPU_ADD(I8039,8000000 | |
| 520 | 520 | /* audio CPU */ |
| 521 | 521 | MDRV_CPU_PROGRAM_MAP(i8039_readmem,i8039_writemem) |
| 522 | 522 | MDRV_CPU_IO_MAP(i8039_readport,i8039_writeport) |
| r1527 | r1528 | |
| 553 | 553 | MDRV_CPU_PROGRAM_MAP(fghtbskt_map,0) |
| 554 | 554 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 555 | 555 | |
| 556 | MDRV_CPU_ADD(I8039,12000000/4 | |
| 556 | MDRV_CPU_ADD(I8039,12000000/4 | |
| 557 | 557 | /* audio CPU */ |
| 558 | 558 | MDRV_CPU_PROGRAM_MAP(i8039_readmem,i8039_writemem) |
| 559 | 559 | MDRV_CPU_IO_MAP(i8039_readport,i8039_writeport) |
| r1527 | r1528 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | #define MAIN_CPU_CLOCK (12000000) |
| 68 | 68 | #define SOUND_CLOCK (8000000) |
| 69 | #define COP_CLOCK ( | |
| 69 | #define COP_CLOCK (SOUND_CLOCK/2) /* unknown guess */ | |
| 70 | 70 | #define TMS_CLOCK (640000) |
| 71 | 71 | |
| 72 | 72 | /* the schematics are very blurry here and don't actually specify the clock */ |
| r1527 | r1528 | |
|---|---|---|
| 584 | 584 | * |
| 585 | 585 | *************************************/ |
| 586 | 586 | |
| 587 | static UINT | |
| 587 | static CUSTOM_INPUT( | |
| 588 | 588 | { |
| 589 | 589 | return EEPROM_read_bit(); |
| 590 | 590 | } |
| r1527 | r1528 | |
|---|---|---|
| 945 | 945 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 946 | 946 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,6) /* ??? */ |
| 947 | 947 | |
| 948 | MDRV_CPU_ADD(M68705,4000000 | |
| 948 | MDRV_CPU_ADD(M68705,4000000 | |
| 949 | 949 | MDRV_CPU_PROGRAM_MAP(m68705_readmem,m68705_writemem) |
| 950 | 950 | |
| 951 | 951 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 1649 | 1649 | static READ8_HANDLER( slapfigh_mcu_r ) |
| 1650 | 1650 | { |
| 1651 | 1651 | /* pass initial checks */ |
| 1652 | int protvalues[] = { 0xc7, 0x55, -1 }; | |
| 1652 | static const int protvalues[] = { 0xc7, 0x55, -1 }; | |
| 1653 | 1653 | |
| 1654 | 1654 | if ((activecpu_get_pc()==0x1369) || // slapfigh |
| 1655 | 1655 | (activecpu_get_pc()==0x136d)) // slapfiga |
| r1527 | r1528 | |
|---|---|---|
| 14 | 14 | ***************************************************************************/ |
| 15 | 15 | |
| 16 | 16 | #include "driver.h" |
| 17 | #include "machine/8255ppi.h" | |
| 17 | 18 | #include "sound/samples.h" |
| 18 | #include "includes/astinvad.h" | |
| 19 | 19 | |
| 20 | 20 | |
| 21 | static ADDRESS_MAP_START( kamikaze_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 22 | AM_RANGE(0x0000, 0x1bff) AM_READ(MRA8_ROM) | |
| 23 | AM_RANGE(0x1c00, 0x3fff) AM_READ(MRA8_RAM) | |
| 24 | ADDRESS_MAP_END | |
| 21 | #define MASTER_CLOCK XTAL_2MHz | |
| 22 | #define VIDEO_CLOCK XTAL_4_9152MHz | |
| 25 | 23 | |
| 26 | static ADDRESS_MAP_START( kamikaze_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 27 | AM_RANGE(0x0000, 0x1bff) AM_WRITE(MWA8_ROM) | |
| 28 | AM_RANGE(0x1c00, 0x1fff) AM_WRITE(MWA8_RAM) | |
| 29 | AM_RANGE(0x2000, 0x3fff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 30 | AM_RANGE(0x4000, 0x4fff) AM_WRITE(MWA8_NOP) /* sloppy game code writes here */ | |
| 31 | ADDRESS_MAP_END | |
| 32 | 24 | |
| 25 | /* sample sound IDs - must match sample file name table below */ | |
| 26 | enum | |
| 27 | { | |
| 28 | SND_UFO = 0, | |
| 29 | SND_SHOT, | |
| 30 | SND_BASEHIT, | |
| 31 | SND_INVADERHIT, | |
| 32 | SND_FLEET1, | |
| 33 | SND_FLEET2, | |
| 34 | SND_FLEET3, | |
| 35 | SND_FLEET4, | |
| 36 | SND_UFOHIT | |
| 37 | }; | |
| 33 | 38 | |
| 34 | static ADDRESS_MAP_START( spaceint_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 35 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_ROM) | |
| 36 | AM_RANGE(0x2000, 0x23ff) AM_READ(MRA8_RAM) | |
| 37 | AM_RANGE(0x4000, 0x5fff) AM_READ(MRA8_RAM) | |
| 38 | ADDRESS_MAP_END | |
| 39 | 39 | |
| 40 | static ADDRESS_MAP_START( spaceint_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 41 | AM_RANGE(0x0000, 0x17ff) AM_WRITE(MWA8_ROM) | |
| 42 | AM_RANGE(0x2000, 0x23ff) AM_WRITE(MWA8_RAM) | |
| 43 | AM_RANGE(0x4000, 0x5fff) AM_WRITE(spaceint_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 40 | ||
| 41 | /************************************* | |
| 42 | * | |
| 43 | * Globals | |
| 44 | * | |
| 45 | *************************************/ | |
| 46 | ||
| 47 | static emu_timer *int_timer; | |
| 48 | static UINT8 sound_state[2]; | |
| 49 | static UINT8 screen_flip; | |
| 50 | static UINT8 screen_red; | |
| 51 | static UINT8 flip_yoffs; | |
| 52 | static UINT8 color_latch; | |
| 53 | ||
| 54 | ||
| 55 | ||
| 56 | /************************************* | |
| 57 | * | |
| 58 | * Prototypes and interfaces | |
| 59 | * | |
| 60 | *************************************/ | |
| 61 | ||
| 62 | static WRITE8_HANDLER( astinvad_sound1_w ); | |
| 63 | static WRITE8_HANDLER( astinvad_sound2_w ); | |
| 64 | ||
| 65 | static const ppi8255_interface ppi8255_intf = | |
| 66 | { | |
| 67 | 2, | |
| 68 | { input_port_0_r, NULL }, | |
| 69 | { input_port_1_r, input_port_3_r }, | |
| 70 | { input_port_2_r, NULL }, | |
| 71 | { NULL, astinvad_sound1_w }, | |
| 72 | { NULL, astinvad_sound2_w }, | |
| 73 | { NULL, NULL }, | |
| 74 | }; | |
| 75 | ||
| 76 | ||
| 77 | ||
| 78 | /************************************* | |
| 79 | * | |
| 80 | * Spaceint color RAM handling | |
| 81 | * | |
| 82 | *************************************/ | |
| 83 | ||
| 84 | static VIDEO_START( spaceint ) | |
| 85 | { | |
| 86 | colorram = auto_malloc(videoram_size); | |
| 87 | } | |
| 88 | ||
| 89 | ||
| 90 | static WRITE8_HANDLER( color_latch_w ) | |
| 91 | { | |
| 92 | color_latch = data & 0x0f; | |
| 93 | } | |
| 94 | ||
| 95 | ||
| 96 | static WRITE8_HANDLER( spaceint_videoram_w ) | |
| 97 | { | |
| 98 | videoram[offset] = data; | |
| 99 | colorram[offset] = color_latch; | |
| 100 | } | |
| 101 | ||
| 102 | ||
| 103 | ||
| 104 | /************************************* | |
| 105 | * | |
| 106 | * Spaceint color RAM handling | |
| 107 | * | |
| 108 | *************************************/ | |
| 109 | ||
| 110 | static void plot_byte(mame_bitmap *bitmap, UINT8 y, UINT8 x, UINT8 data, UINT8 color) | |
| 111 | { | |
| 112 | pen_t fore_pen = MAKE_RGB(pal1bit(color >> 0), pal1bit(color >> 2), pal1bit(color >> 1)); | |
| 113 | UINT8 flip_xor = screen_flip & 7; | |
| 114 | ||
| 115 | *BITMAP_ADDR32(bitmap, y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : RGB_BLACK; | |
| 116 | *BITMAP_ADDR32(bitmap, y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : RGB_BLACK; | |
| 117 | *BITMAP_ADDR32(bitmap, y, x + (2 ^ flip_xor)) = (data & 0x04) ? fore_pen : RGB_BLACK; | |
| 118 | *BITMAP_ADDR32(bitmap, y, x + (3 ^ flip_xor)) = (data & 0x08) ? fore_pen : RGB_BLACK; | |
| 119 | *BITMAP_ADDR32(bitmap, y, x + (4 ^ flip_xor)) = (data & 0x10) ? fore_pen : RGB_BLACK; | |
| 120 | *BITMAP_ADDR32(bitmap, y, x + (5 ^ flip_xor)) = (data & 0x20) ? fore_pen : RGB_BLACK; | |
| 121 | *BITMAP_ADDR32(bitmap, y, x + (6 ^ flip_xor)) = (data & 0x40) ? fore_pen : RGB_BLACK; | |
| 122 | *BITMAP_ADDR32(bitmap, y, x + (7 ^ flip_xor)) = (data & 0x80) ? fore_pen : RGB_BLACK; | |
| 123 | } | |
| 124 | ||
| 125 | ||
| 126 | static VIDEO_UPDATE( astinvad ) | |
| 127 | { | |
| 128 | const UINT8 *color_prom = memory_region(REGION_PROMS); | |
| 129 | UINT8 yoffs = flip_yoffs & screen_flip; | |
| 130 | int x, y; | |
| 131 | ||
| 132 | /* render the visible pixels */ | |
| 133 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 134 | for (x = cliprect->min_x & ~7; x <= cliprect->max_x; x += 8) | |
| 135 | { | |
| 136 | UINT8 color = color_prom[((y & 0xf8) << 2) | (x >> 3)] >> (screen_flip ? 0 : 4); | |
| 137 | UINT8 data = videoram[(((y ^ screen_flip) + yoffs) << 5) | ((x ^ screen_flip) >> 3)]; | |
| 138 | plot_byte(bitmap, y, x, data, screen_red ? 1 : color); | |
| 139 | } | |
| 140 | ||
| 141 | return 0; | |
| 142 | } | |
| 143 | ||
| 144 | ||
| 145 | static VIDEO_UPDATE( spaceint ) | |
| 146 | { | |
| 147 | int offs; | |
| 148 | ||
| 149 | for (offs = 0; offs < videoram_size; offs++) | |
| 150 | { | |
| 151 | UINT8 data = videoram[offs]; | |
| 152 | UINT8 color = colorram[offs]; | |
| 153 | ||
| 154 | UINT8 y = ~offs; | |
| 155 | UINT8 x = offs >> 8 << 3; | |
| 156 | ||
| 157 | /* this is almost certainly wrong */ | |
| 158 | offs_t n = ((offs >> 5) & 0xf0) | color; | |
| 159 | color = memory_region(REGION_PROMS)[n] & 0x07; | |
| 160 | ||
| 161 | plot_byte(bitmap, y, x, data, color); | |
| 162 | } | |
| 163 | ||
| 164 | return 0; | |
| 165 | } | |
| 166 | ||
| 167 | ||
| 168 | ||
| 169 | /************************************* | |
| 170 | * | |
| 171 | * Interrupts | |
| 172 | * | |
| 173 | *************************************/ | |
| 174 | ||
| 175 | static TIMER_CALLBACK( kamikaze_int_off ) | |
| 176 | { | |
| 177 | cpunum_set_input_line(0, 0, CLEAR_LINE); | |
| 178 | } | |
| 179 | ||
| 180 | ||
| 181 | static TIMER_CALLBACK( kamizake_int_gen ) | |
| 182 | { | |
| 183 | /* interrupts are asserted on every state change of the 128V line */ | |
| 184 | cpunum_set_input_line(0, 0, ASSERT_LINE); | |
| 185 | param ^= 128; | |
| 186 | timer_adjust(int_timer, video_screen_get_time_until_pos(0, param, 0), param, attotime_never); | |
| 187 | ||
| 188 | /* an RC circuit turns the interrupt off after a short amount of time */ | |
| 189 | timer_set(double_to_attotime(300 * 0.1e-6), NULL, 0, kamikaze_int_off); | |
| 190 | } | |
| 191 | ||
| 192 | ||
| 193 | static MACHINE_START( kamikaze ) | |
| 194 | { | |
| 195 | ppi8255_init(&ppi8255_intf); | |
| 196 | int_timer = timer_alloc(kamizake_int_gen, NULL); | |
| 197 | timer_adjust(int_timer, video_screen_get_time_until_pos(0, 128, 0), 128, attotime_never); | |
| 198 | } | |
| 199 | ||
| 200 | ||
| 201 | static INTERRUPT_GEN( spaceint_interrupt ) | |
| 202 | { | |
| 203 | if (readinputport(2) & 1) /* coin */ | |
| 204 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); | |
| 205 | ||
| 206 | cpunum_set_input_line(0, 0, HOLD_LINE); | |
| 207 | } | |
| 208 | ||
| 209 | ||
| 210 | ||
| 211 | /************************************* | |
| 212 | * | |
| 213 | * 8255 PPI handlers | |
| 214 | * | |
| 215 | *************************************/ | |
| 216 | ||
| 217 | static READ8_HANDLER( kamikaze_ppi_r ) | |
| 218 | { | |
| 219 | UINT8 result = 0xff; | |
| 220 | ||
| 221 | /* the address lines are used for /CS; yes, they can overlap! */ | |
| 222 | if (!(offset & 4)) | |
| 223 | result &= ppi8255_0_r(offset); | |
| 224 | if (!(offset & 8)) | |
| 225 | result &= ppi8255_1_r(offset); | |
| 226 | return result; | |
| 227 | } | |
| 228 | ||
| 229 | ||
| 230 | static WRITE8_HANDLER( kamikaze_ppi_w ) | |
| 231 | { | |
| 232 | /* the address lines are used for /CS; yes, they can overlap! */ | |
| 233 | if (!(offset & 4)) | |
| 234 | ppi8255_0_w(offset, data); | |
| 235 | if (!(offset & 8)) | |
| 236 | ppi8255_1_w(offset, data); | |
| 237 | } | |
| 238 | ||
| 239 | ||
| 240 | ||
| 241 | /************************************* | |
| 242 | * | |
| 243 | * Sound and I/O port handlers | |
| 244 | * | |
| 245 | *************************************/ | |
| 246 | ||
| 247 | static WRITE8_HANDLER( astinvad_sound1_w ) | |
| 248 | { | |
| 249 | int bits_gone_hi = data & ~sound_state[0]; | |
| 250 | sound_state[0] = data; | |
| 251 | ||
| 252 | if (bits_gone_hi & 0x01) sample_start(0, SND_UFO, 1); | |
| 253 | if (!(data & 0x01)) sample_stop(0); | |
| 254 | if (bits_gone_hi & 0x02) sample_start(1, SND_SHOT, 0); | |
| 255 | if (bits_gone_hi & 0x04) sample_start(2, SND_BASEHIT, 0); | |
| 256 | if (bits_gone_hi & 0x08) sample_start(3, SND_INVADERHIT, 0); | |
| 257 | ||
| 258 | sound_global_enable(data & 0x20); | |
| 259 | screen_red = data & 0x04; | |
| 260 | } | |
| 261 | ||
| 262 | ||
| 263 | static WRITE8_HANDLER( astinvad_sound2_w ) | |
| 264 | { | |
| 265 | int bits_gone_hi = data & ~sound_state[1]; | |
| 266 | sound_state[1] = data; | |
| 267 | ||
| 268 | if (bits_gone_hi & 0x01) sample_start(5, SND_FLEET1, 0); | |
| 269 | if (bits_gone_hi & 0x02) sample_start(5, SND_FLEET2, 0); | |
| 270 | if (bits_gone_hi & 0x04) sample_start(5, SND_FLEET3, 0); | |
| 271 | if (bits_gone_hi & 0x08) sample_start(5, SND_FLEET4, 0); | |
| 272 | if (bits_gone_hi & 0x10) sample_start(4, SND_UFOHIT, 0); | |
| 273 | ||
| 274 | screen_flip = (readinputport(3) & data & 0x20) ? 0xff : 0x00; | |
| 275 | } | |
| 276 | ||
| 277 | ||
| 278 | static WRITE8_HANDLER( spaceint_sound1_w ) | |
| 279 | { | |
| 280 | int bits_gone_hi = data & ~sound_state[0]; | |
| 281 | sound_state[0] = data; | |
| 282 | ||
| 283 | if (bits_gone_hi & 0x01) sample_start(1, SND_SHOT, 0); | |
| 284 | if (bits_gone_hi & 0x02) sample_start(2, SND_BASEHIT, 0); | |
| 285 | if (bits_gone_hi & 0x04) sample_start(4, SND_UFOHIT, 0); | |
| 286 | if (bits_gone_hi & 0x08) sample_start(0, SND_UFO, 1); | |
| 287 | if (!(data & 0x08)) sample_stop(0); | |
| 288 | ||
| 289 | if (bits_gone_hi & 0x10) sample_start(5, SND_FLEET1, 0); | |
| 290 | if (bits_gone_hi & 0x20) sample_start(5, SND_FLEET2, 0); | |
| 291 | if (bits_gone_hi & 0x40) sample_start(5, SND_FLEET3, 0); | |
| 292 | if (bits_gone_hi & 0x80) sample_start(5, SND_FLEET4, 0); | |
| 293 | } | |
| 294 | ||
| 295 | ||
| 296 | static WRITE8_HANDLER( spaceint_sound2_w ) | |
| 297 | { | |
| 298 | int bits_gone_hi = data & ~sound_state[1]; | |
| 299 | sound_state[1] = data; | |
| 300 | ||
| 301 | sound_global_enable(data & 0x02); | |
| 302 | ||
| 303 | if (bits_gone_hi & 0x04) sample_start(3, SND_INVADERHIT, 0); | |
| 304 | ||
| 305 | screen_flip = (readinputport(3) & data & 0x80) ? 0xff : 0x00; | |
| 306 | } | |
| 307 | ||
| 308 | ||
| 309 | ||
| 310 | /************************************* | |
| 311 | * | |
| 312 | * Main CPU memory handlers | |
| 313 | * | |
| 314 | *************************************/ | |
| 315 | ||
| 316 | static ADDRESS_MAP_START( kamikaze_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 317 | ADDRESS_MAP_FLAGS( AMEF_ABITS(14) ) | |
| 318 | AM_RANGE(0x0000, 0x1bff) AM_ROM | |
| 319 | AM_RANGE(0x1c00, 0x1fff) AM_RAM | |
| 320 | AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 44 | 321 | ADDRESS_MAP_END |
| 45 | 322 | |
| 46 | 323 | |
| 47 | static ADDRESS_MAP_START( kamikaze_readport, ADDRESS_SPACE_IO, 8 ) | |
| 48 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 49 | AM_RANGE(0x08, 0x08) AM_READ(input_port_0_r) | |
| 50 | AM_RANGE(0x09, 0x09) AM_READ(input_port_1_r) | |
| 51 | AM_RANGE(0x0a, 0x0a) AM_READ(input_port_2_r) | |
| 324 | static ADDRESS_MAP_START( spaceint_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 325 | AM_RANGE(0x0000, 0x17ff) AM_ROM | |
| 326 | AM_RANGE(0x2000, 0x23ff) AM_RAM | |
| 327 | AM_RANGE(0x4000, 0x5fff) AM_READWRITE(MRA8_RAM, spaceint_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 52 | 328 | ADDRESS_MAP_END |
| 53 | 329 | |
| 54 | static ADDRESS_MAP_START( kamikaze_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 330 | ||
| 331 | static ADDRESS_MAP_START( kamikaze_portmap, ADDRESS_SPACE_IO, 8 ) | |
| 55 | 332 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 56 | AM_RANGE(0x04, 0x04) AM_WRITE(astinvad_sound1_w) | |
| 57 | AM_RANGE(0x05, 0x05) AM_WRITE(astinvad_sound2_w) | |
| 333 | AM_RANGE(0x00, 0xff) AM_READWRITE(kamikaze_ppi_r, kamikaze_ppi_w) | |
| 58 | 334 | ADDRESS_MAP_END |
| 59 | 335 | |
| 60 | 336 | |
| 61 | static ADDRESS_MAP_START( spaceint_ | |
| 337 | static ADDRESS_MAP_START( spaceint_ | |
| 62 | 338 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 63 | 339 | AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) |
| 64 | 340 | AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r) |
| 65 | ADDRESS_MAP_END | |
| 66 | ||
| 67 | static ADDRESS_MAP_START( spaceint_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 68 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 69 | 341 | AM_RANGE(0x02, 0x02) AM_WRITE(spaceint_sound1_w) |
| 70 | AM_RANGE(0x03, 0x03) AM_WRITE( | |
| 342 | AM_RANGE(0x03, 0x03) AM_WRITE( | |
| 71 | 343 | AM_RANGE(0x04, 0x04) AM_WRITE(spaceint_sound2_w) |
| 72 | 344 | ADDRESS_MAP_END |
| 73 | 345 | |
| 74 | 346 | |
| 75 | #define COMMON_INPUT_BITS \ | |
| 76 | PORT_START_TAG("IN0") \ | |
| 77 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) \ | |
| 78 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) \ | |
| 79 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) \ | |
| 80 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) \ | |
| 81 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) \ | |
| 82 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY \ | |
| 83 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY \ | |
| 84 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) \ | |
| 85 | 347 | |
| 348 | /************************************* | |
| 349 | * | |
| 350 | * Port definitions | |
| 351 | * | |
| 352 | *************************************/ | |
| 86 | 353 | |
| 87 | 354 | static INPUT_PORTS_START( kamikaze ) |
| 88 | COMMON_INPUT_BITS | |
| 355 | PORT_START_TAG("IN0") | |
| 356 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 357 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 358 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 359 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 360 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 361 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 362 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 363 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 89 | 364 | |
| 90 | 365 | PORT_START_TAG("IN1") |
| 91 | 366 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) |
| r1527 | r1528 | |
| 93 | 368 | PORT_DIPSETTING( 0x01, "4" ) |
| 94 | 369 | PORT_DIPSETTING( 0x02, "5" ) |
| 95 | 370 | PORT_DIPSETTING( 0x00, "6" ) |
| 96 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 97 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 98 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 371 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 99 | 372 | PORT_DIPNAME( 0x88, 0x88, DEF_STR( Bonus_Life ) ) |
| 100 | 373 | PORT_DIPSETTING( 0x88, "5000" ) |
| 101 | 374 | PORT_DIPSETTING( 0x80, "10000" ) |
| 102 | 375 | PORT_DIPSETTING( 0x08, "15000" ) |
| 103 | 376 | PORT_DIPSETTING( 0x00, "20000" ) |
| 104 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 105 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) | |
| 106 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) | |
| 377 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 378 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 379 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 107 | 380 | |
| 108 | 381 | PORT_START_TAG("IN2") |
| 109 | 382 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| r1527 | r1528 | |
| 115 | 388 | PORT_DIPSETTING( 0xff, DEF_STR( Cocktail ) ) |
| 116 | 389 | INPUT_PORTS_END |
| 117 | 390 | |
| 391 | ||
| 118 | 392 | static INPUT_PORTS_START( astinvad ) |
| 119 | | |
| 393 | PORT | |
| 120 | 394 | |
| 121 | PORT_ | |
| 395 | PORT_MODIFY | |
| 122 | 396 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) |
| 123 | 397 | PORT_DIPSETTING( 0x00, "3" ) |
| 124 | 398 | PORT_DIPSETTING( 0x01, "4" ) |
| r1527 | r1528 | |
| 131 | 405 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) |
| 132 | 406 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 133 | 407 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) |
| 408 | INPUT_PORTS_END | |
| 134 | 409 | |
| 135 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 136 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 137 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 138 | 410 | |
| 139 | PORT_START_TAG("IN2") | |
| 140 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 141 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 142 | ||
| 143 | PORT_START_TAG("IN3") | |
| 144 | PORT_DIPNAME( 0xff, 0x00, DEF_STR( Cabinet ) ) | |
| 145 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 146 | PORT_DIPSETTING( 0xff, DEF_STR( Cocktail ) ) | |
| 147 | INPUT_PORTS_END | |
| 148 | ||
| 149 | 411 | static INPUT_PORTS_START( spcking2 ) |
| 150 | | |
| 412 | PORT | |
| 151 | 413 | |
| 152 | PORT_ | |
| 414 | PORT_MODIFY | |
| 153 | 415 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) |
| 154 | 416 | PORT_DIPSETTING( 0x00, "3" ) |
| 155 | 417 | PORT_DIPSETTING( 0x01, "4" ) |
| 156 | 418 | PORT_DIPSETTING( 0x02, "5" ) |
| 157 | 419 | PORT_DIPSETTING( 0x03, "6" ) |
| 158 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 159 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 160 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 161 | 420 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) |
| 162 | 421 | PORT_DIPSETTING( 0x08, "1000" ) |
| 163 | 422 | PORT_DIPSETTING( 0x00, "2000" ) |
| 164 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 165 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 166 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 167 | 423 | PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) |
| 168 | 424 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 169 | 425 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 426 | INPUT_PORTS_END | |
| 170 | 427 | |
| 171 | PORT_START_TAG("IN2") | |
| 172 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 173 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 174 | 428 | |
| 175 | PORT_START_TAG("IN3") | |
| 176 | PORT_DIPNAME( 0xff, 0x00, DEF_STR( Cabinet ) ) | |
| 177 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 178 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 179 | INPUT_PORTS_END | |
| 180 | ||
| 181 | 429 | static INPUT_PORTS_START( spaceint ) |
| 182 | 430 | PORT_START_TAG("IN0") |
| 183 | 431 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| r1527 | r1528 | |
| 211 | 459 | INPUT_PORTS_END |
| 212 | 460 | |
| 213 | 461 | |
| 214 | static INTERRUPT_GEN( spaceint_interrupt ) | |
| 462 | ||
| 463 | /************************************* | |
| 464 | * | |
| 465 | * Sound definitions | |
| 466 | * | |
| 467 | *************************************/ | |
| 468 | ||
| 469 | static const char *const astinvad_sample_names[] = | |
| 215 | 470 | { |
| 216 | if (readinputport(2) & 1) /* coin */ | |
| 217 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); | |
| 471 | "*invaders", | |
| 472 | "0.wav", | |
| 473 | "1.wav", | |
| 474 | "2.wav", | |
| 475 | "3.wav", | |
| 476 | "4.wav", | |
| 477 | "5.wav", | |
| 478 | "6.wav", | |
| 479 | "7.wav", | |
| 480 | "8.wav", | |
| 481 | 0 | |
| 482 | }; | |
| 218 | 483 | |
| 219 | cpunum_set_input_line(0, 0, HOLD_LINE); | |
| 220 | } | |
| 484 | static const struct Samplesinterface astinvad_samples_interface = | |
| 485 | { | |
| 486 | 6, /* channels */ | |
| 487 | astinvad_sample_names | |
| 488 | }; | |
| 221 | 489 | |
| 222 | 490 | |
| 491 | ||
| 492 | /************************************* | |
| 493 | * | |
| 494 | * Machine drivers | |
| 495 | * | |
| 496 | *************************************/ | |
| 497 | ||
| 223 | 498 | static MACHINE_DRIVER_START( kamikaze ) |
| 224 | 499 | |
| 225 | 500 | /* basic machine hardware */ |
| 226 | MDRV_CPU_ADD(Z80, 2000000) | |
| 227 | MDRV_CPU_PROGRAM_MAP(kamikaze_readmem,kamikaze_writemem) | |
| 228 | MDRV_CPU_IO_MAP(kamikaze_readport,kamikaze_writeport) | |
| 229 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* two interrupts per frame */ | |
| 501 | MDRV_CPU_ADD(Z80, MASTER_CLOCK) | |
| 502 | MDRV_CPU_PROGRAM_MAP(kamikaze_map,0) | |
| 503 | MDRV_CPU_IO_MAP(kamikaze_portmap,0) | |
| 230 | 504 | |
| 505 | MDRV_MACHINE_START(kamikaze) | |
| 506 | ||
| 231 | 507 | /* video hardware */ |
| 232 | 508 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 233 | 509 | MDRV_VIDEO_UPDATE(astinvad) |
| 234 | 510 | |
| 235 | 511 | MDRV_SCREEN_ADD("main", 0) |
| 236 | 512 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 237 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 238 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 32*8-1) | |
| 239 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 240 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) | |
| 513 | MDRV_SCREEN_RAW_PARAMS(VIDEO_CLOCK, 320, 0, 256, 256, 32, 256) | |
| 241 | 514 | |
| 242 | 515 | /* sound hardware */ |
| 243 | 516 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r1527 | r1528 | |
| 252 | 525 | |
| 253 | 526 | /* basic machine hardware */ |
| 254 | 527 | MDRV_IMPORT_FROM(kamikaze) |
| 255 | ||
| 256 | /* video hardware */ | |
| 257 | MDRV_VIDEO_UPDATE( spcking2 ) | |
| 258 | ||
| 259 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) | |
| 528 | MDRV_SCREEN_MODIFY("main") | |
| 529 | MDRV_SCREEN_RAW_PARAMS(VIDEO_CLOCK, 320, 0, 256, 256, 16, 240) | |
| 260 | 530 | MACHINE_DRIVER_END |
| 261 | 531 | |
| 262 | 532 | |
| 263 | 533 | static MACHINE_DRIVER_START( spaceint ) |
| 264 | 534 | |
| 265 | 535 | /* basic machine hardware */ |
| 266 | MDRV_CPU_ADD(Z80, 2000000) /* 2 MHz? */ | |
| 267 | MDRV_CPU_PROGRAM_MAP(spaceint_readmem,spaceint_writemem) | |
| 268 | MDRV_CPU_IO_MAP(spaceint_readport,spaceint_writeport) | |
| 536 | MDRV_CPU_ADD(Z80, MASTER_CLOCK) /* a guess */ | |
| 537 | MDRV_CPU_PROGRAM_MAP(spaceint_map,0) | |
| 538 | MDRV_CPU_IO_MAP(spaceint_portmap,0) | |
| 269 | 539 | MDRV_CPU_VBLANK_INT(spaceint_interrupt,1) |
| 270 | 540 | |
| 271 | 541 | /* video hardware */ |
| r1527 | r1528 | |
| 288 | 558 | MACHINE_DRIVER_END |
| 289 | 559 | |
| 290 | 560 | |
| 561 | ||
| 562 | /************************************* | |
| 563 | * | |
| 564 | * ROM definitions | |
| 565 | * | |
| 566 | *************************************/ | |
| 567 | ||
| 291 | 568 | ROM_START( kamikaze ) |
| 292 | 569 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 293 | 570 | ROM_LOAD( "km01", 0x0000, 0x0800, CRC(8aae7414) SHA1(91cb5c268a03960d50401000903d70dc29f904fb) ) |
| r1527 | r1528 | |
| 365 | 642 | ROM_END |
| 366 | 643 | |
| 367 | 644 | |
| 368 | GAME( 1979, kamikaze, 0, kamikaze, kamikaze, 0, ROT270, "Leijac Corporation", "Kamikaze", 0 ) | |
| 369 | GAME( 1980, astinvad, kamikaze, kamikaze, astinvad, 0, ROT270, "Stern", "Astro Invader", 0 ) | |
| 370 | GAME( 19??, kosmokil, kamikaze, kamikaze, kamikaze, 0, ROT270, "bootleg", "Kosmo Killer", 0 ) // says >BEM< Mi Italy but it looks hacked in, dif revision of game tho. | |
| 371 | GAME( 1979, spcking2, 0, spcking2, spcking2, 0, ROT270, "Konami", "Space King 2", 0 ) | |
| 372 | GAME( 1980, spaceint, 0, spaceint, spaceint, 0, ROT90, "Shoei", "Space Intruder", GAME_WRONG_COLORS ) | |
| 373 | GAME( 1980, spaceinj, spaceint, spaceint, spaceint, 0, ROT90, "Shoei", "Space Intruder (Japan)", GAME_WRONG_COLORS ) | |
| 645 | ||
| 646 | /************************************* | |
| 647 | * | |
| 648 | * Driver initialization | |
| 649 | * | |
| 650 | *************************************/ | |
| 651 | ||
| 652 | static DRIVER_INIT( kamikaze ) | |
| 653 | { | |
| 654 | /* the flip screen logic adds 32 to the Y after flipping */ | |
| 655 | flip_yoffs = 32; | |
| 656 | } | |
| 657 | ||
| 658 | ||
| 659 | static DRIVER_INIT( spcking2 ) | |
| 660 | { | |
| 661 | /* don't have the schematics, but the blanking must center the screen here */ | |
| 662 | flip_yoffs = 0; | |
| 663 | } | |
| 664 | ||
| 665 | ||
| 666 | ||
| 667 | /************************************* | |
| 668 | * | |
| 669 | * Game drivers | |
| 670 | * | |
| 671 | *************************************/ | |
| 672 | ||
| 673 | GAME( 1979, kamikaze, 0, kamikaze, kamikaze, kamikaze, ROT270, "Leijac Corporation", "Kamikaze", 0 ) | |
| 674 | GAME( 1980, astinvad, kamikaze, kamikaze, astinvad, kamikaze, ROT270, "Stern", "Astro Invader", 0 ) | |
| 675 | GAME( 19??, kosmokil, kamikaze, kamikaze, kamikaze, kamikaze, ROT270, "bootleg", "Kosmo Killer", 0 ) // says >BEM< Mi Italy but it looks hacked in, dif revision of game tho. | |
| 676 | GAME( 1979, spcking2, 0, spcking2, spcking2, spcking2, ROT270, "Konami", "Space King 2", 0 ) | |
| 677 | GAME( 1980, spaceint, 0, spaceint, spaceint, 0, ROT90, "Shoei", "Space Intruder", GAME_WRONG_COLORS ) | |
| 678 | GAME( 1980, spaceinj, spaceint, spaceint, spaceint, 0, ROT90, "Shoei", "Space Intruder (Japan)", GAME_WRONG_COLORS ) |
| r1527 | r1528 | |
|---|---|---|
| 58 | 58 | #include "machine/eeprom.h" |
| 59 | 59 | #include "sound/okim6295.h" |
| 60 | 60 | |
| 61 | #define DARKHORS_DEBUG 0 | |
| 62 | ||
| 61 | 63 | /*************************************************************************** |
| 62 | 64 | |
| 63 | 65 | |
| r1527 | r1528 | |
| 151 | 153 | { |
| 152 | 154 | int layers_ctrl = -1; |
| 153 | 155 | |
| 154 | #if | |
| 156 | #if | |
| 155 | 157 | if (input_code_pressed(KEYCODE_Z)) |
| 156 | 158 | { |
| 157 | 159 | int mask = 0; |
| r1527 | r1528 | |
| 174 | 176 | |
| 175 | 177 | if (layers_ctrl & 4) draw_sprites(machine,bitmap,cliprect); |
| 176 | 178 | |
| 177 | #if | |
| 179 | #if | |
| 178 | 180 | #if 0 |
| 179 | 181 | popmessage("%04X-%04X %04X-%04X %04X-%04X %04X-%04X %04X-%04X %04X-%04X", |
| 180 | 182 | darkhors_tmapscroll[0] >> 16, darkhors_tmapscroll[0] & 0xffff, |
| r1527 | r1528 | |
|---|---|---|
| 48 | 48 | #include "driver.h" |
| 49 | 49 | #include "cpu/h83002/h83002.h" |
| 50 | 50 | |
| 51 | #define BISHJAN_DEBUG 0 | |
| 52 | ||
| 51 | 53 | /*************************************************************************** |
| 52 | 54 | Video Hardware |
| 53 | 55 | ***************************************************************************/ |
| r1527 | r1528 | |
| 89 | 91 | int scroll2_x = ((bishjan_scroll[2] & 0x0f)<<8) | (bishjan_scroll[1] & 0xff); |
| 90 | 92 | int scroll2_y = ((bishjan_scroll[2] & 0xf0)<<4) | (bishjan_scroll[2] >> 8); |
| 91 | 93 | |
| 92 | #if | |
| 94 | #if | |
| 93 | 95 | if (input_code_pressed(KEYCODE_Z)) |
| 94 | 96 | { |
| 95 | 97 | int msk = 0; |
| r1527 | r1528 | |
|---|---|---|
| 95 | 95 | |
| 96 | 96 | The following ROMs need redump: |
| 97 | 97 | |
| 98 | - Bull Fighter's RGB PROMs (the ones in use are fake make-up's) | |
| 99 | 98 | - The Koukouyakyuh's epr-6706.bin (the one in use is patched) |
| 100 | 99 | |
| 101 | 100 | |
| r1527 | r1528 | |
| 106 | 105 | - Scale factors in High Voltage and Splendor Blast are inaccurate. Actual values are believed |
| 107 | 106 | to be in the three unknown ROM s3.8l, 1.9j and 4.7m but the equations are unknown. |
| 108 | 107 | |
| 109 | - MSM5232 clock speed and capacitor values are not known. | |
| 110 | - There seems to be a rheostat on Equites' soundboard to adjust the MSM5232's music pitch. | |
| 111 | - It hasn't been confirmed whether music tempos are the same across all games. | |
| 108 | - MSM5232 capacitor values are not known. | |
| 109 | - There is a potentiometer on the soundboard to adjust the MSM5232's music pitch. Clock speed ranges | |
| 110 | from 6.144mhz (OSC value) to few khz | |
| 111 | - All games have the same sound board with only rom swaps | |
| 112 | 112 | |
| 113 | ||
| 114 | 113 | * Special Thanks to: |
| 115 | 114 | |
| 116 | 115 | Jarek Burczynski for a superb MSM5232 emulation |
| r1527 | r1528 | |
| 143 | 142 | |
| 144 | 143 | // Common Hardware Start |
| 145 | 144 | #define EQUITES_ADD_SOUNDBOARD7 \ |
| 146 | MDRV_CPU_ADD(8085A, | |
| 145 | MDRV_CPU_ADD(8085A, XTAL_6_144MHz/2) /* verified on pcb */ \ | |
| 147 | 146 | /* audio CPU */ \ |
| 148 | 147 | MDRV_CPU_PROGRAM_MAP(equites_s_readmem, equites_s_writemem) \ |
| 149 | 148 | MDRV_CPU_IO_MAP(0, equites_s_writeport) \ |
| 150 | 149 | MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 4000) \ |
| 151 | 150 | MDRV_SPEAKER_STANDARD_MONO("mono") \ |
| 152 | 151 | \ |
| 153 | MDRV_SOUND_ADD(MSM5232, 2500000) \ | |
| 152 | MDRV_SOUND_ADD(MSM5232, XTAL_6_144MHz/2) \ | |
| 153 | /* OSC is connected to a pot which varies the frequency of M5232 from 6.144mhz to few Khz. Here I assume a value which gives a good pitch */ \ | |
| 154 | 154 | MDRV_SOUND_CONFIG(equites_5232intf) \ |
| 155 | 155 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) \ |
| 156 | 156 | \ |
| 157 | MDRV_SOUND_ADD(AY8910, 6144 | |
| 157 | MDRV_SOUND_ADD(AY8910, XTAL_6_144MHz/4) /* verified on pcb */ \ | |
| 158 | 158 | MDRV_SOUND_CONFIG(equites_8910intf) \ |
| 159 | 159 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) \ |
| 160 | 160 | \ |
| r1527 | r1528 | |
| 686 | 686 | static MACHINE_DRIVER_START( equites ) |
| 687 | 687 | |
| 688 | 688 | /* basic machine hardware */ |
| 689 | MDRV_CPU_ADD(M68000, 12 | |
| 689 | MDRV_CPU_ADD(M68000, XTAL_12MHz | |
| 690 | 690 | MDRV_CPU_PROGRAM_MAP(equites_readmem, equites_writemem) |
| 691 | 691 | MDRV_CPU_VBLANK_INT(equites_interrupt, 2) |
| 692 | 692 | |
| r1527 | r1528 | |
| 713 | 713 | static MACHINE_DRIVER_START( splndrbt ) |
| 714 | 714 | |
| 715 | 715 | /* basic machine hardware */ |
| 716 | MDRV_CPU_ADD(M68000, | |
| 716 | MDRV_CPU_ADD(M68000, XTAL_24MHz | |
| 717 | 717 | MDRV_CPU_PROGRAM_MAP(splndrbt_readmem, splndrbt_writemem) |
| 718 | 718 | MDRV_CPU_VBLANK_INT(splndrbt_interrupt, 2) |
| 719 | 719 |
| r1527 | r1528 | |
|---|---|---|
| 389 | 389 | MDRV_CPU_ADD(M6502,500000) /* 500 kHz */ |
| 390 | 390 | MDRV_CPU_PROGRAM_MAP(decocass_sound_map,0) |
| 391 | 391 | |
| 392 | MDRV_CPU_ADD(I8X41,500000) /* 500 kHz ( I doubt it is 400kHz Al! )*/ | |
| 392 | MDRV_CPU_ADD(I8X41,500000*15) /* 500 kHz ( I doubt it is 400kHz Al! )*/ | |
| 393 | 393 | MDRV_CPU_PROGRAM_MAP(decocass_mcu_map,0) |
| 394 | 394 | MDRV_CPU_IO_MAP(decocass_mcu_portmap,0) |
| 395 | 395 |
| r1527 | r1528 | |
|---|---|---|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | UINT | |
| 98 | CUSTOM_INPUT( | |
| 99 | 99 | { |
| 100 | 100 | return eolith_vblank&1; |
| 101 | 101 | } |
| r1527 | r1528 | |
|---|---|---|
| 279 | 279 | static MACHINE_START( dleuro ) |
| 280 | 280 | { |
| 281 | 281 | /* initialize the CTC and SIO peripherals */ |
| 282 | ctc_intf.baseclock = machine->drv->cpu[0].clock; | |
| 283 | sio_intf.baseclock = machine->drv->cpu[0].clock; | |
| 282 | ctc_intf.baseclock = cpunum_get_clock(0); | |
| 283 | sio_intf.baseclock = cpunum_get_clock(0); | |
| 284 | 284 | z80ctc_init(0, &ctc_intf); |
| 285 | 285 | z80sio_init(0, &sio_intf); |
| 286 | 286 | |
| r1527 | r1528 | |
| 397 | 397 | * |
| 398 | 398 | *************************************/ |
| 399 | 399 | |
| 400 | static UINT | |
| 400 | static CUSTOM_INPUT( | |
| 401 | 401 | { |
| 402 | 402 | if (discinfo == NULL) |
| 403 | 403 | return 0; |
| r1527 | r1528 | |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | |
| 420 | static UINT | |
| 420 | static CUSTOM_INPUT( | |
| 421 | 421 | { |
| 422 | 422 | if (discinfo == NULL) |
| 423 | 423 | return 0; |
| r1527 | r1528 | |
|---|---|---|
| 762 | 762 | AM_RANGE(0xd000, 0xdfff) AM_RAM AM_READWRITE(peplus_sd000_r, peplus_sd000_w) AM_BASE(&sd000_ram) |
| 763 | 763 | |
| 764 | 764 | // DUART |
| 765 | AM_RANGE(0xe000, 0xe00 | |
| 765 | AM_RANGE(0xe000, 0xe00a) AM_READWRITE(peplus_duart_r, peplus_duart_w) | |
| 766 | 766 | |
| 767 | 767 | // Superboard Data |
| 768 | 768 | AM_RANGE(0xf000, 0xffff) AM_RAM AM_READWRITE(peplus_sf000_r, peplus_sf000_w) AM_BASE(&sf000_ram) |
| r1527 | r1528 | |
| 1131 | 1131 | program_ram[0x9e9c] = 0x22; // RET - Disable 2nd Memory Test |
| 1132 | 1132 | } |
| 1133 | 1133 | |
| 1134 | static DRIVER_INIT( pexmp006 ) | |
| 1135 | { | |
| 1136 | peplussb_init(); | |
| 1134 | 1137 | |
| 1138 | // For testing only, cannot stay in final driver | |
| 1139 | program_ram[0xbfc6] = 0x22; // RET - Disable Memory Test | |
| 1140 | program_ram[0xc2a2] = 0x22; // RET - Disable 2nd Memory Test | |
| 1141 | } | |
| 1142 | ||
| 1143 | ||
| 1135 | 1144 | /************************* |
| 1136 | 1145 | * Rom Load * |
| 1137 | 1146 | *************************/ |
| 1138 | 1147 | |
| 1139 | 1148 | ROM_START( peset038 ) |
| 1140 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1149 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) /* Normal board : Set Chip (Set038) */ | |
| 1141 | 1150 | ROM_LOAD( "set038.u68", 0x00000, 0x10000, CRC(9c4b1d1a) SHA1(8a65cd1d8e2d74c7b66f4dfc73e7afca8458e979) ) |
| 1142 | 1151 | |
| 1143 | 1152 | ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) |
| r1527 | r1528 | |
| 1150 | 1159 | ROM_LOAD( "cap740.u50", 0x0000, 0x0100, CRC(6fe619c4) SHA1(49e43dafd010ce0fe9b2a63b96a4ddedcb933c6d) ) |
| 1151 | 1160 | ROM_END |
| 1152 | 1161 | |
| 1153 | ROM_START( pepp0158 ) | |
| 1162 | ROM_START( pepp0158 ) /* Normal board : 4 of a Kind Bonus Poker (PP0158) */ | |
| 1154 | 1163 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1155 | 1164 | ROM_LOAD( "pp0158.u68", 0x00000, 0x10000, CRC(5976cd19) SHA1(6a461ea9ddf78dffa3cf8b65903ebf3127f23d45) ) |
| 1156 | 1165 | |
| r1527 | r1528 | |
| 1164 | 1173 | ROM_LOAD( "cap740.u50", 0x0000, 0x0100, CRC(6fe619c4) SHA1(49e43dafd010ce0fe9b2a63b96a4ddedcb933c6d) ) |
| 1165 | 1174 | ROM_END |
| 1166 | 1175 | |
| 1167 | ROM_START( pepp0188 ) | |
| 1176 | ROM_START( pepp0188 ) /* Normal board : Standard Draw Poker (PP0188) */ | |
| 1168 | 1177 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1169 | 1178 | ROM_LOAD( "pp0188.u68", 0x00000, 0x10000, CRC(cf36a53c) SHA1(99b578538ab24d9ff91971b1f77599272d1dbfc6) ) |
| 1170 | 1179 | |
| r1527 | r1528 | |
| 1178 | 1187 | ROM_LOAD( "cap740.u50", 0x0000, 0x0100, CRC(6fe619c4) SHA1(49e43dafd010ce0fe9b2a63b96a4ddedcb933c6d) ) |
| 1179 | 1188 | ROM_END |
| 1180 | 1189 | |
| 1181 | ROM_START( pepp0516 ) | |
| 1190 | ROM_START( pepp0516 ) /* Normal board : Double Bonus Poker (PP0516) */ | |
| 1182 | 1191 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1183 | 1192 | ROM_LOAD( "pp0516.u68", 0x00000, 0x10000, CRC(d9da6e13) SHA1(421678d9cb42daaf5b21074cc3900db914dd26cf) ) |
| 1184 | 1193 | |
| r1527 | r1528 | |
| 1192 | 1201 | ROM_LOAD( "cap740.u50", 0x0000, 0x0100, CRC(6fe619c4) SHA1(49e43dafd010ce0fe9b2a63b96a4ddedcb933c6d) ) |
| 1193 | 1202 | ROM_END |
| 1194 | 1203 | |
| 1195 | ROM_START( pebe0014 ) | |
| 1204 | ROM_START( pebe0014 ) /* Normal board : Blackjack (BE0014) */ | |
| 1196 | 1205 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1197 | 1206 | ROM_LOAD( "be0014.u68", 0x00000, 0x10000, CRC(232b32b7) SHA1(a3af9414577642fedc23b4c1911901cd31e9d6e0) ) |
| 1198 | 1207 | |
| r1527 | r1528 | |
| 1206 | 1215 | ROM_LOAD( "cap707.u50", 0x0000, 0x0100, CRC(9851ba36) SHA1(5a0a43c1e212ae8c173102ede9c57a3d95752f99) ) |
| 1207 | 1216 | ROM_END |
| 1208 | 1217 | |
| 1209 | ROM_START( peke1012 ) | |
| 1218 | ROM_START( peke1012 ) /* Normal board : Keno (KE1012) */ | |
| 1210 | 1219 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1211 | 1220 | ROM_LOAD( "ke1012.u68", 0x00000, 0x10000, CRC(470e8c10) SHA1(f8a65a3a73477e9e9d2f582eeefa93b470497dfa) ) |
| 1212 | 1221 | |
| r1527 | r1528 | |
| 1220 | 1229 | ROM_LOAD( "cap1267.u50", 0x0000, 0x0100, CRC(7051db57) SHA1(76751a3cc47d506983205decb07e99ca0c178a42) ) |
| 1221 | 1230 | ROM_END |
| 1222 | 1231 | |
| 1223 | ROM_START( peps0615 ) | |
| 1232 | ROM_START( peps0615 ) /* Normal board : Chaos Slots (PS0615) */ | |
| 1224 | 1233 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1225 | 1234 | ROM_LOAD( "ps0615.u68", 0x00000, 0x10000, CRC(d27dd6ab) SHA1(b3f065f507191682edbd93b07b72ed87bf6ae9b1) ) |
| 1226 | 1235 | |
| r1527 | r1528 | |
| 1234 | 1243 | ROM_LOAD( "cap2234.u50", 0x0000, 0x0100, CRC(a930e283) SHA1(61bce50fa13b3e980ece3e72d068835e19bd5049) ) |
| 1235 | 1244 | ROM_END |
| 1236 | 1245 | |
| 1237 | ROM_START( peps0716 ) | |
| 1246 | ROM_START( peps0716 ) /* Normal board : Quarter Mania Slots (PS0716) */ | |
| 1238 | 1247 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1239 | 1248 | ROM_LOAD( "ps0716.u68", 0x00000, 0x10000, CRC(7615d7b6) SHA1(91fe62eec720a0dc2ebf48835065148f19499d16) ) |
| 1240 | 1249 | |
| r1527 | r1528 | |
| 1248 | 1257 | ROM_LOAD( "cap2265.u50", 0x0000, 0x0100, CRC(dfb82a2f) SHA1(c96947bb475bf4497ff2e44053941625a3a7bf62) ) |
| 1249 | 1258 | ROM_END |
| 1250 | 1259 | |
| 1251 | ROM_START( pexp0019 ) | |
| 1260 | ROM_START( pexp0019 ) /* Superboard : Deuces Wild Poker (XP000019) */ | |
| 1252 | 1261 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1253 | ||
| 1262 | | |
| 1254 | 1263 | |
| 1255 | ROM_REGION( 0x10000, REGION_USER1, 0 ) | |
| 1256 | ROM_LOAD( "x002025p.u66", 0x00000, 0x10000, CRC(f3dac423) SHA1(e9394d330deb3b8a1001e57e72a506cd9098f161) ) | |
| 1264 | ROM_REGION( 0x10000, REGION_USER1, 0 ) | |
| 1265 | ROM_LOAD( "x002025p.u66", 0x00000, 0x10000, CRC(f3dac423) SHA1(e9394d330deb3b8a1001e57e72a506cd9098f161) ) | |
| 1257 | 1266 | |
| 1258 | 1267 | ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1259 | 1268 | ROM_LOAD( "mro-cg2185.u77", 0x00000, 0x8000, CRC(7e64bd1a) SHA1(e988a380ee58078bf5bdc7747e83aed1393cfad8) ) |
| r1527 | r1528 | |
| 1265 | 1274 | ROM_LOAD( "cap2234.u43", 0x0000, 0x0100, CRC(a930e283) SHA1(61bce50fa13b3e980ece3e72d068835e19bd5049) ) |
| 1266 | 1275 | ROM_END |
| 1267 | 1276 | |
| 1268 | ROM_START( pexs0006 ) | |
| 1277 | ROM_START( pexs0006 ) /* Superboard : Triple Triple Diamond Slots (XS000006) */ | |
| 1269 | 1278 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1270 | ||
| 1279 | | |
| 1271 | 1280 | |
| 1272 | ROM_REGION( 0x10000, REGION_USER1, 0 ) | |
| 1273 | ROM_LOAD( "x000998s.u66", 0x00000, 0x10000, CRC(e29d4346) SHA1(93901ff65c8973e34ac1f0dd68bb4c4973da5621) ) | |
| 1281 | ROM_REGION( 0x10000, REGION_USER1, 0 ) | |
| 1282 | ROM_LOAD( "x000998s.u66", 0x00000, 0x10000, CRC(e29d4346) SHA1(93901ff65c8973e34ac1f0dd68bb4c4973da5621) ) | |
| 1274 | 1283 | |
| 1275 | 1284 | ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1276 | 1285 | ROM_LOAD( "mro-cg2361.u77", 0x00000, 0x8000, CRC(c0eba866) SHA1(8f217aeb3e8028a5633d95e5612f1b55e601650f) ) |
| r1527 | r1528 | |
| 1282 | 1291 | ROM_LOAD( "cap2361.u43", 0x0000, 0x0100, CRC(051aea66) SHA1(2abf32caaeb821ca50a6398581de69bbfe5930e9) ) |
| 1283 | 1292 | ROM_END |
| 1284 | 1293 | |
| 1294 | ROM_START( pexmp006 ) /* Superboard : Multi-Poker (XMP00006) */ | |
| 1295 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1296 | ROM_LOAD( "xmp00006.u67", 0x00000, 0x10000, CRC(d61f1677) SHA1(2eca1315d6aa310a54de2dfa369e443a07495b76) ) | |
| 1285 | 1297 | |
| 1298 | ROM_REGION( 0x10000, REGION_USER1, 0 ) | |
| 1299 | ROM_LOAD( "xm00002p.u66", 0x00000, 0x10000, CRC(96cf471c) SHA1(9597bf6a80c392ee22dc4606db610fdaf032377f) ) | |
| 1300 | ||
| 1301 | ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1302 | ROM_LOAD( "mro-cg2174.u77", 0x00000, 0x8000, CRC(bb666733) SHA1(dcaa1980b051a554cb0f443b1183a680edc9ad3f) ) | |
| 1303 | ROM_LOAD( "mgo-cg2174.u78", 0x08000, 0x8000, CRC(cc46adb0) SHA1(6065aa5dcb9091ad80e499c7ee6dc629e79c865a) ) | |
| 1304 | ROM_LOAD( "mbo-cg2174.u79", 0x10000, 0x8000, CRC(7291a0c8) SHA1(1068f35e6ef5fd88c584922860231840a90fb623) ) | |
| 1305 | ROM_LOAD( "mxo-cg2174.u80", 0x18000, 0x8000, CRC(14f9480c) SHA1(59323f9fc5995277aea86d088893b6eb95b4e89b) ) | |
| 1306 | ||
| 1307 | ROM_REGION( 0x100, REGION_PROMS, 0 ) | |
| 1308 | ROM_LOAD( "cap2174.u43", 0x0000, 0x0100, CRC(cbff3f26) SHA1(9e145676f2871c2369042a13cbeabb7efe2728e1) ) | |
| 1309 | ROM_END | |
| 1310 | ||
| 1286 | 1311 | /************************* |
| 1287 | 1312 | * Game Drivers * |
| 1288 | 1313 | *************************/ |
| r1527 | r1528 | |
| 1310 | 1335 | /* Superboard : poker */ |
| 1311 | 1336 | GAMEL(1995, pexp0019, 0, peplus, peplus_poker, pexp0019, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (XP000019) Deuces Wild Poker", 0, layout_pe_poker ) |
| 1312 | 1337 | |
| 1338 | /* Superboard : multi-poker */ | |
| 1339 | GAMEL(1995, pexmp006, 0, peplus, peplus_poker, pexmp006, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (XMP00006) Multi-Poker", 0, layout_pe_poker ) | |
| 1340 | ||
| 1313 | 1341 | /* Superboard : slots machine */ |
| 1314 | 1342 | GAMEL(1997, pexs0006, 0, peplus, peplus_slots, pexs0006, ROT0, "IGT - International Gaming Technology", "Player's Edge Plus (XS000006) Triple Triple Diamond Slots", 0, layout_pe_slots ) |
| r1527 | r1528 | |
|---|---|---|
| 62 | 62 | static ADDRESS_MAP_START( memmap, ADDRESS_SPACE_PROGRAM, 8 ) |
| 63 | 63 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 64 | 64 | AM_RANGE(0x8000, 0xbfff) AM_ROM |
| 65 | AM_RANGE(0xc000, 0xcfff) AM_READWRITE( | |
| 65 | AM_RANGE(0xc000, 0xcfff) AM_READWRITE(MRA8 | |
| 66 | 66 | AM_RANGE(0xd000, 0xd000) AM_WRITE(t5182_sound_irq_w) |
| 67 | 67 | AM_RANGE(0xd001, 0xd001) AM_READ(t5182_sharedram_semaphore_snd_r) |
| 68 | 68 | AM_RANGE(0xd002, 0xd002) AM_WRITE(t5182_sharedram_semaphore_main_acquire_w) |
| r1527 | r1528 | |
|---|---|---|
| 207 | 207 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 208 | 208 | AM_RANGE(0x8000, 0x8fff) AM_RAM AM_BASE(&mainram) |
| 209 | 209 | AM_RANGE(0x9000, 0x93ff) AM_RAM AM_BASE(&spriteram) |
| 210 | AM_RANGE(0x9400, 0x97ff) AM_READWRITE( | |
| 210 | AM_RANGE(0x9400, 0x97ff) AM_READWRITE(MRA8 | |
| 211 | 211 | AM_RANGE(0x9800, 0x9fff) AM_READWRITE(MRA8_RAM, ddayjlc_bgram_w) AM_BASE(&bgram) /* 9800-981f - videoregs */ |
| 212 | 212 | AM_RANGE(0xa000, 0xdfff) AM_ROMBANK(1) AM_WRITENOP |
| 213 | 213 | AM_RANGE(0xe000, 0xe003) AM_WRITE(i8257_CH0_w) |
| r1527 | r1528 | |
|---|---|---|
| 1798 | 1798 | MDRV_CPU_PROGRAM_MAP(sound_map,0) |
| 1799 | 1799 | MDRV_CPU_IO_MAP(sound_portmap,0) |
| 1800 | 1800 | |
| 1801 | MDRV_CPU_ADD_TAG("n7751", N7751, 6000000 | |
| 1801 | MDRV_CPU_ADD_TAG("n7751", N7751, 6000000 | |
| 1802 | 1802 | /* audio CPU */ |
| 1803 | 1803 | MDRV_CPU_PROGRAM_MAP(n7751_map,0) |
| 1804 | 1804 | MDRV_CPU_IO_MAP(n7751_portmap,0) |
| r1527 | r1528 | |
|---|---|---|
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | |
| 328 | static UINT | |
| 328 | static CUSTOM_INPUT( | |
| 329 | 329 | { |
| 330 | 330 | char tag[6]; |
| 331 | 331 | |
| r1527 | r1528 | |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | |
| 338 | static UINT | |
| 338 | static CUSTOM_INPUT( | |
| 339 | 339 | { |
| 340 | 340 | UINT32 ret; |
| 341 | 341 | |
| r1527 | r1528 | |
| 441 | 441 | } |
| 442 | 442 | |
| 443 | 443 | |
| 444 | static UINT | |
| 444 | static CUSTOM_INPUT( | |
| 445 | 445 | { |
| 446 | 446 | return (pd4990a_databit_r(0) << 1) | pd4990a_testbit_r(0); |
| 447 | 447 | } |
| r1527 | r1528 | |
| 500 | 500 | } |
| 501 | 501 | |
| 502 | 502 | |
| 503 | static UINT | |
| 503 | static CUSTOM_INPUT( | |
| 504 | 504 | { |
| 505 | 505 | /* D0 and D1 are memcard presence indicators, D2 indicates memcard |
| 506 | 506 | write protect status (we are always write enabled) */ |
| r1527 | r1528 | |
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | |
| 599 | static UINT | |
| 599 | static CUSTOM_INPUT( | |
| 600 | 600 | { |
| 601 | 601 | UINT32 ret = audio_result; |
| 602 | 602 |
| r1527 | r1528 | |
|---|---|---|
| 26 | 26 | * |
| 27 | 27 | *************************************/ |
| 28 | 28 | |
| 29 | static | |
| 29 | static CUSTOM_I | |
| 30 | 30 | { |
| 31 | 31 | UINT8 ret = 0; |
| 32 | 32 | |
| r1527 | r1528 | |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | |
| 117 | static | |
| 117 | static CUSTOM_I | |
| 118 | 118 | { |
| 119 | 119 | /* to avoid resetting (when player 2 starts) bit 0 need to be |
| 120 | 120 | inverted when screen is flipped */ |
| r1527 | r1528 | |
|---|---|---|
| 119 | 119 | #define LADYBUG_P1_CONTROL_PORT_TAG ("CONTP1") |
| 120 | 120 | #define LADYBUG_P2_CONTROL_PORT_TAG ("CONTP2") |
| 121 | 121 | |
| 122 | static UINT | |
| 122 | static CUSTOM_INPUT( | |
| 123 | 123 | { |
| 124 | 124 | return readinputportbytag(LADYBUG_P1_CONTROL_PORT_TAG); |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | static UINT | |
| 127 | static CUSTOM_INPUT( | |
| 128 | 128 | { |
| 129 | 129 | UINT32 ret; |
| 130 | 130 |
| r1527 | r1528 | |
|---|---|---|
| 246 | 246 | AM_RANGE(0x7000, 0x7fff) AM_WRITE(MWA8_ROM) |
| 247 | 247 | AM_RANGE(0x8800, 0x88ff) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size) |
| 248 | 248 | AM_RANGE(0x8900, 0x8bff) AM_WRITE(MWA8_RAM) /* not used, but initialized */ |
| 249 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 250 | //AM_RANGE(0x9400, 0x97ff) AM_WRITE(videoram_w) /* mirror address, used by Crazy Climber to draw windows */ | |
| 249 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 250 | //AM_RANGE(0x9400, 0x97ff) AM_WRITE(MWA8_RAM) /* mirror address, used by Crazy Climber to draw windows */ | |
| 251 | 251 | /* 9800-9bff and 9c00-9fff share the same RAM, interleaved */ |
| 252 | 252 | /* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */ |
| 253 | 253 | AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_column_scroll) |
| r1527 | r1528 | |
|---|---|---|
| 192 | 192 | static MACHINE_DRIVER_START( midxunit ) |
| 193 | 193 | |
| 194 | 194 | /* basic machine hardware */ |
| 195 | MDRV_CPU_ADD(TMS34020, 40000000 | |
| 195 | MDRV_CPU_ADD(TMS34020, 40000000 | |
| 196 | 196 | MDRV_CPU_CONFIG(tms_config) |
| 197 | 197 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 198 | 198 |
| r1527 | r1528 | |
|---|---|---|
| 164 | 164 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) /* 6116 SRAM (36) */ |
| 165 | 165 | AM_RANGE(0x8800, 0x8fff) AM_READ(MRA8_RAM) /* 6116 SRAM (35) */ |
| 166 | 166 | AM_RANGE(0xa000, 0xbfff) AM_READ(MRA8_BANK1) |
| 167 | AM_RANGE(0xc800, 0xcfff) AM_READ( | |
| 167 | AM_RANGE(0xc800, 0xcfff) AM_READ(MRA8 | |
| 168 | 168 | AM_RANGE(0xd400, 0xd400) AM_READ(buggychl_mcu_r) |
| 169 | 169 | AM_RANGE(0xd401, 0xd401) AM_READ(buggychl_mcu_status_r) |
| 170 | 170 | AM_RANGE(0xd600, 0xd600) AM_READ(input_port_0_r) /* dsw */ |
| r1527 | r1528 | |
| 184 | 184 | AM_RANGE(0x8800, 0x8fff) AM_WRITE(MWA8_RAM) /* 6116 SRAM (35) */ |
| 185 | 185 | AM_RANGE(0x9000, 0x9fff) AM_WRITE(buggychl_sprite_lookup_w) |
| 186 | 186 | AM_RANGE(0xa000, 0xbfff) AM_WRITE(buggychl_chargen_w) AM_BASE(&buggychl_character_ram) |
| 187 | AM_RANGE(0xc800, 0xcfff) AM_WRITE( | |
| 187 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(MWA8 | |
| 188 | 188 | // { 0xd000, 0xd000, horizon |
| 189 | 189 | AM_RANGE(0xd100, 0xd100) AM_WRITE(buggychl_ctrl_w) |
| 190 | 190 | AM_RANGE(0xd200, 0xd200) AM_WRITE(bankswitch_w) |
| r1527 | r1528 | |
| 439 | 439 | MDRV_CPU_VBLANK_INT(irq0_line_hold,60) /* irq is timed, tied to the cpu clock and not to vblank */ |
| 440 | 440 | /* nmi is caused by the main cpu */ |
| 441 | 441 | |
| 442 | MDRV_CPU_ADD(M68705,8000000/2 | |
| 442 | MDRV_CPU_ADD(M68705,8000000/2 | |
| 443 | 443 | MDRV_CPU_PROGRAM_MAP(mcu_readmem,mcu_writemem) |
| 444 | 444 | |
| 445 | 445 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 409 | 409 | /* audio CPU */ |
| 410 | 410 | MDRV_CPU_PROGRAM_MAP(pandoras_readmem_snd,pandoras_writemem_snd) |
| 411 | 411 | |
| 412 | MDRV_CPU_ADD(I8039, | |
| 412 | MDRV_CPU_ADD(I8039, | |
| 413 | 413 | /* audio CPU */ |
| 414 | 414 | MDRV_CPU_PROGRAM_MAP(i8039_readmem,i8039_writemem) |
| 415 | 415 | MDRV_CPU_IO_MAP(i8039_readport,i8039_writeport) |
| r1527 | r1528 | |
|---|---|---|
| 1051 | 1051 | /* audio CPU */ /* ? */ |
| 1052 | 1052 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 1053 | 1053 | |
| 1054 | MDRV_CPU_ADD(M68705,8000000/2 | |
| 1054 | MDRV_CPU_ADD(M68705,8000000/2 | |
| 1055 | 1055 | MDRV_CPU_PROGRAM_MAP(mcu_readmem,mcu_writemem) |
| 1056 | 1056 | |
| 1057 | 1057 | MDRV_SCREEN_REFRESH_RATE(((12000000.0 / 256.0) / 3.0) / 272.0) |
| r1527 | r1528 | |
|---|---|---|
| 126 | 126 | ***************************************************************************/ |
| 127 | 127 | |
| 128 | 128 | #include "driver.h" |
| 129 | #include "machine/6821pia.h" | |
| 130 | 129 | #include "exidy.h" |
| 131 | #include "sound/custom.h" | |
| 132 | #include "sound/samples.h" | |
| 133 | #include "sound/hc55516.h" | |
| 130 | #include "targ.h" | |
| 131 | #include "machine/6821pia.h" | |
| 134 | 132 | |
| 135 | 133 | |
| 136 | 134 | static UINT8 last_dial; |
| 137 | 135 | |
| 138 | 136 | |
| 137 | ||
| 139 | 138 | /************************************* |
| 140 | 139 | * |
| 141 | 140 | * Special Teeter Torture input |
| 142 | 141 | * |
| 143 | 142 | *************************************/ |
| 144 | 143 | |
| 145 | static | |
| 144 | static CUSTOM_I | |
| 146 | 145 | { |
| 147 | | |
| 146 | int | |
| 148 | 147 | UINT8 dial = readinputportbytag("DIAL"); |
| 149 | 148 | |
| 150 | 149 | if (dial != last_dial) |
| 151 | 150 | { |
| 152 | result |= 0x40; | |
| 153 | 151 | if (((dial - last_dial) & 0xff) < 0x80) |
| 154 | 152 | { |
| 155 | result | |
| 153 | result | |
| 156 | 154 | last_dial++; |
| 157 | 155 | } |
| 158 | 156 | else |
| r1527 | r1528 | |
| 163 | 161 | } |
| 164 | 162 | |
| 165 | 163 | |
| 164 | static CUSTOM_INPUT( teetert_input_movement_r ) | |
| 165 | { | |
| 166 | UINT8 dial = readinputportbytag("DIAL"); | |
| 166 | 167 | |
| 168 | return (dial != last_dial) ? 1 : 0; | |
| 169 | } | |
| 170 | ||
| 171 | ||
| 172 | ||
| 167 | 173 | /************************************* |
| 168 | 174 | * |
| 169 | 175 | * Bankswitcher |
| r1527 | r1528 | |
| 174 | 180 | { |
| 175 | 181 | UINT8 *RAM = memory_region(REGION_CPU1); |
| 176 | 182 | |
| 177 | memory_set_bankptr(1, &RAM[0x10000 + (0x2000 * (data & 0x1F))]); | |
| 178 | if ((data & 0x1F) > 0x17) | |
| 179 | logerror("Banking to unpopulated ROM bank %02X!\n",data & 0x1F); | |
| 183 | memory_set_bankptr(1, &RAM[0x10000 + (0x2000 * (data & 0x1f))]); | |
| 184 | if ((data & 0x1f) > 0x17) | |
| 185 | logerror("Banking to unpopulated ROM bank %02X!\n",data & 0x1f); | |
| 180 | 186 | } |
| 181 | 187 | |
| 182 | 188 | |
| r1527 | r1528 | |
| 187 | 193 | * |
| 188 | 194 | *************************************/ |
| 189 | 195 | |
| 190 | static ADDRESS_MAP_START( | |
| 196 | static ADDRESS_MAP_START( exidy | |
| 191 | 197 | AM_RANGE(0x0000, 0x03ff) AM_RAM |
| 192 | 198 | AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&exidy_videoram) |
| 193 | AM_RANGE(0x5000, 0x503f) AM_WRITE(exidy_sprite1_xpos_w) | |
| 194 | AM_RANGE(0x5040, 0x507f) AM_WRITE(exidy_sprite1_ypos_w) | |
| 195 | AM_RANGE(0x5080, 0x50bf) AM_WRITE(exidy_sprite2_xpos_w) | |
| 196 | AM_RANGE(0x50c0, 0x50ff) AM_WRITE(exidy_sprite2_ypos_w) | |
| 197 | AM_RANGE(0x5100, 0x5100) AM_MIRROR(0xfc) AM_READ_PORT("DSW") | |
| 198 | AM_RANGE(0x5101, 0x5101) AM_MIRROR(0xfc) AM_READ_PORT("IN0") | |
| 199 | AM_RANGE(0x5100, 0x5100) AM_MIRROR(0xfc) AM_WRITE(exidy_spriteno_w) | |
| 200 | AM_RANGE(0x5101, 0x5101) AM_MIRROR(0xfc) AM_WRITE(exidy_sprite_enable_w) | |
| 201 | AM_RANGE(0x5103, 0x5103) AM_MIRROR(0xfc) AM_READ(exidy_interrupt_r) | |
| 199 | AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x003f) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_sprite1_xpos) | |
| 200 | AM_RANGE(0x5040, 0x5040) AM_MIRROR(0x003f) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_sprite1_ypos) | |
| 201 | AM_RANGE(0x5080, 0x5080) AM_MIRROR(0x003f) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_sprite2_xpos) | |
| 202 | AM_RANGE(0x50c0, 0x50c0) AM_MIRROR(0x003f) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_sprite2_ypos) | |
| 203 | AM_RANGE(0x5100, 0x5100) AM_MIRROR(0x00fc) AM_READ_PORT("DSW") | |
| 204 | AM_RANGE(0x5100, 0x5100) AM_MIRROR(0x00fc) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_spriteno) | |
| 205 | AM_RANGE(0x5101, 0x5101) AM_MIRROR(0x00fc) AM_READ_PORT("IN0") | |
| 206 | AM_RANGE(0x5101, 0x5101) AM_MIRROR(0x00fc) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_sprite_enable) | |
| 207 | AM_RANGE(0x5103, 0x5103) AM_MIRROR(0x00fc) AM_READ(exidy_interrupt_r) | |
| 202 | 208 | AM_RANGE(0x5210, 0x5212) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_color_latch) |
| 203 | 209 | AM_RANGE(0x5213, 0x5213) AM_READ_PORT("IN2") |
| 204 | 210 | ADDRESS_MAP_END |
| r1527 | r1528 | |
| 207 | 213 | static ADDRESS_MAP_START( sidetrac_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 208 | 214 | AM_RANGE(0x0800, 0x3fff) AM_ROM |
| 209 | 215 | AM_RANGE(0x4800, 0x4fff) AM_ROM AM_BASE(&exidy_characterram) |
| 210 | AM_RANGE(0x5200, 0x5201) AM_WRITE(targ_sh_w) | |
| 216 | AM_RANGE(0x5200, 0x5200) AM_WRITE(targ_audio_1_w) | |
| 217 | AM_RANGE(0x5201, 0x5201) AM_WRITE(spectar_audio_2_w) | |
| 211 | 218 | AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION(REGION_CPU1, 0x3f00) |
| 212 | 219 | ADDRESS_MAP_END |
| 213 | 220 | |
| r1527 | r1528 | |
| 215 | 222 | static ADDRESS_MAP_START( targ_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 216 | 223 | AM_RANGE(0x0800, 0x3fff) AM_ROM |
| 217 | 224 | AM_RANGE(0x4800, 0x4fff) AM_RAM AM_BASE(&exidy_characterram) |
| 218 | AM_RANGE(0x5200, 0x5201) AM_WRITE(targ_sh_w) | |
| 225 | AM_RANGE(0x5200, 0x5200) AM_WRITE(targ_audio_1_w) | |
| 226 | AM_RANGE(0x5201, 0x5201) AM_WRITE(targ_audio_2_w) | |
| 219 | 227 | AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION(REGION_CPU1, 0x3f00) |
| 220 | 228 | ADDRESS_MAP_END |
| 221 | 229 | |
| 222 | 230 | |
| 231 | static ADDRESS_MAP_START( spectar_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 232 | AM_RANGE(0x0800, 0x3fff) AM_ROM | |
| 233 | AM_RANGE(0x4800, 0x4fff) AM_RAM AM_BASE(&exidy_characterram) | |
| 234 | AM_RANGE(0x5200, 0x5200) AM_WRITE(targ_audio_1_w) | |
| 235 | AM_RANGE(0x5201, 0x5201) AM_WRITE(spectar_audio_2_w) | |
| 236 | AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION(REGION_CPU1, 0x3f00) | |
| 237 | ADDRESS_MAP_END | |
| 238 | ||
| 239 | ||
| 240 | static ADDRESS_MAP_START( rallys_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 241 | AM_RANGE(0x0000, 0x03ff) AM_RAM | |
| 242 | AM_RANGE(0x0800, 0x3fff) AM_ROM | |
| 243 | AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&exidy_videoram) | |
| 244 | AM_RANGE(0x4800, 0x4fff) AM_RAM AM_BASE(&exidy_characterram) | |
| 245 | AM_RANGE(0x5000, 0x5000) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_sprite1_xpos) | |
| 246 | AM_RANGE(0x5001, 0x5001) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_sprite1_ypos) | |
| 247 | AM_RANGE(0x5100, 0x5100) AM_MIRROR(0x00fc) AM_READ_PORT("DSW") | |
| 248 | AM_RANGE(0x5100, 0x5100) AM_MIRROR(0x00fc) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_spriteno) | |
| 249 | AM_RANGE(0x5101, 0x5101) AM_MIRROR(0x00fc) AM_READ_PORT("IN0") | |
| 250 | AM_RANGE(0x5101, 0x5101) AM_MIRROR(0x00fc) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_sprite_enable) | |
| 251 | AM_RANGE(0x5103, 0x5103) AM_MIRROR(0x00fc) AM_READ(exidy_interrupt_r) | |
| 252 | AM_RANGE(0x5200, 0x5200) AM_WRITE(targ_audio_1_w) | |
| 253 | AM_RANGE(0x5201, 0x5201) AM_WRITE(spectar_audio_2_w) | |
| 254 | AM_RANGE(0x5210, 0x5212) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_color_latch) | |
| 255 | AM_RANGE(0x5213, 0x5213) AM_READ_PORT("IN2") | |
| 256 | AM_RANGE(0x5300, 0x5300) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_sprite2_xpos) | |
| 257 | AM_RANGE(0x5301, 0x5301) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_sprite2_ypos) | |
| 258 | AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION(REGION_CPU1, 0x3f00) | |
| 259 | ADDRESS_MAP_END | |
| 260 | ||
| 261 | ||
| 223 | 262 | static ADDRESS_MAP_START( venture_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 224 | 263 | AM_RANGE(0x4800, 0x4fff) AM_RAM AM_BASE(&exidy_characterram) |
| 225 | 264 | AM_RANGE(0x5200, 0x520f) AM_READWRITE(pia_0_r, pia_0_w) |
| r1527 | r1528 | |
| 228 | 267 | |
| 229 | 268 | |
| 230 | 269 | static ADDRESS_MAP_START( pepper2_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 270 | AM_RANGE(0x4800, 0x4fff) AM_NOP | |
| 231 | 271 | AM_RANGE(0x5200, 0x520f) AM_READWRITE(pia_0_r, pia_0_w) |
| 232 | 272 | AM_RANGE(0x6000, 0x6fff) AM_RAM AM_BASE(&exidy_characterram) |
| 233 | 273 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| r1527 | r1528 | |
| 241 | 281 | AM_RANGE(0x2000, 0x2000) AM_WRITE(fax_bank_select_w) |
| 242 | 282 | AM_RANGE(0x2000, 0x3fff) AM_ROMBANK(1) |
| 243 | 283 | AM_RANGE(0x5200, 0x520f) AM_READWRITE(pia_0_r, pia_0_w) |
| 244 | AM_RANGE(0x5213, 0x5217) AM_WRITE(MWA8_NOP) | |
| 284 | AM_RANGE(0x5213, 0x5217) AM_WRITE(MWA8_NOP) | |
| 245 | 285 | AM_RANGE(0x6000, 0x6fff) AM_RAM AM_BASE(&exidy_characterram) |
| 246 | 286 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 247 | 287 | ADDRESS_MAP_END |
| r1527 | r1528 | |
| 250 | 290 | |
| 251 | 291 | /************************************* |
| 252 | 292 | * |
| 253 | * Sound CPU memory handlers | |
| 254 | * | |
| 255 | *************************************/ | |
| 256 | ||
| 257 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 258 | ADDRESS_MAP_FLAGS( AMEF_ABITS(15) ) | |
| 259 | AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x780) AM_RAM | |
| 260 | AM_RANGE(0x0800, 0x0fff) AM_READWRITE(exidy_shriot_r, exidy_shriot_w) | |
| 261 | AM_RANGE(0x1000, 0x17ff) AM_READWRITE(pia_1_r, pia_1_w) | |
| 262 | AM_RANGE(0x1800, 0x1fff) AM_READWRITE(exidy_sh8253_r, exidy_sh8253_w) | |
| 263 | AM_RANGE(0x2000, 0x27ff) AM_WRITE(exidy_sound_filter_w) | |
| 264 | AM_RANGE(0x2800, 0x2fff) AM_READWRITE(exidy_sh6840_r, exidy_sh6840_w) | |
| 265 | AM_RANGE(0x3000, 0x37ff) AM_WRITE(exidy_sfxctrl_w) | |
| 266 | AM_RANGE(0x5800, 0x7fff) AM_ROM | |
| 267 | ADDRESS_MAP_END | |
| 268 | ||
| 269 | ||
| 270 | static ADDRESS_MAP_START( cvsd_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 271 | ADDRESS_MAP_FLAGS( AMEF_ABITS(14) ) | |
| 272 | AM_RANGE(0x0000, 0x3fff) AM_ROM | |
| 273 | ADDRESS_MAP_END | |
| 274 | ||
| 275 | ||
| 276 | static ADDRESS_MAP_START( cvsd_iomap, ADDRESS_SPACE_IO, 8 ) | |
| 277 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 278 | AM_RANGE(0x00, 0xff) AM_READWRITE(mtrap_voiceio_r, mtrap_voiceio_w) | |
| 279 | ADDRESS_MAP_END | |
| 280 | ||
| 281 | ||
| 282 | ||
| 283 | /************************************* | |
| 284 | * | |
| 285 | 293 | * Port definitions |
| 286 | 294 | * |
| 287 | 295 | *************************************/ |
| r1527 | r1528 | |
| 581 | 589 | PORT_START_TAG("IN0") |
| 582 | 590 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 583 | 591 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 584 | PORT_BIT( 0x04, IP_ACTIVE_ | |
| 592 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) | |
| 585 | 593 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 586 | 594 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 587 | 595 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 588 | PORT_BIT( 0x40, IP_ACTIVE_ | |
| 596 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) | |
| 589 | 597 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 590 | 598 | |
| 591 | 599 | PORT_START_TAG("INTSOURCE") |
| r1527 | r1528 | |
| 759 | 767 | |
| 760 | 768 | |
| 761 | 769 | static GFXDECODE_START( exidy ) |
| 762 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, spritelayout, | |
| 770 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, spritelayout, | |
| 763 | 771 | GFXDECODE_END |
| 764 | 772 | |
| 765 | 773 | |
| 766 | 774 | |
| 767 | 775 | /************************************* |
| 768 | 776 | * |
| 769 | * | |
| 777 | * Machine | |
| 770 | 778 | * |
| 771 | 779 | *************************************/ |
| 772 | 780 | |
| 773 | static const char *const targ_sample_names[] = | |
| 774 | { | |
| 775 | "*targ", | |
| 776 | "expl.wav", | |
| 777 | "shot.wav", | |
| 778 | "sexpl.wav", | |
| 779 | "spslow.wav", | |
| 780 | "spfast.wav", | |
| 781 | 0 | |
| 782 | }; | |
| 781 | static MACHINE_DRIVER_START( base ) | |
| 783 | 782 | |
| 783 | /* basic machine hardware */ | |
| 784 | MDRV_CPU_ADD_TAG("main", M6502, EXIDY_CPU_CLOCK) | |
| 785 | MDRV_CPU_VBLANK_INT(exidy_vblank_interrupt,1) | |
| 784 | 786 | |
| 785 | static const struct Samplesinterface targ_samples_interface = | |
| 786 | { | |
| 787 | 4, /* 3 Channels */ | |
| 788 | targ_sample_names, | |
| 789 | targ_sh_start | |
| 790 | }; | |
| 787 | /* video hardware */ | |
| 788 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_ALWAYS_UPDATE) | |
| 789 | MDRV_VIDEO_START(exidy) | |
| 790 | MDRV_VIDEO_UPDATE(exidy) | |
| 791 | MDRV_GFXDECODE(exidy) | |
| 792 | MDRV_PALETTE_LENGTH(8) | |
| 791 | 793 | |
| 794 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 795 | MDRV_SCREEN_RAW_PARAMS(EXIDY_PIXEL_CLOCK, EXIDY_HTOTAL, EXIDY_HBEND, EXIDY_HBSTART, EXIDY_VTOTAL, EXIDY_VBEND, EXIDY_VBSTART) | |
| 792 | 796 | |
| 793 | static const struct CustomSound_interface exidy_custom_interface = | |
| 794 | { | |
| 795 | exidy_sh_start | |
| 796 | }; | |
| 797 | MACHINE_DRIVER_END | |
| 797 | 798 | |
| 798 | 799 | |
| 800 | static MACHINE_DRIVER_START( sidetrac ) | |
| 799 | 801 | |
| 800 | /************************************* | |
| 801 | * | |
| 802 | * Machine drivers | |
| 803 | * | |
| 804 | *************************************/ | |
| 802 | /* basic machine hardware */ | |
| 803 | MDRV_IMPORT_FROM(base) | |
| 804 | MDRV_CPU_MODIFY("main") | |
| 805 | MDRV_CPU_PROGRAM_MAP(exidy_map,sidetrac_map) | |
| 805 | 806 | |
| 806 | static MACHINE_DRIVER_START( sidetrac ) | |
| 807 | /* audio hardware */ | |
| 808 | MDRV_IMPORT_FROM(spectar_audio) | |
| 809 | MACHINE_DRIVER_END | |
| 807 | 810 | |
| 811 | ||
| 812 | static MACHINE_DRIVER_START( targ ) | |
| 813 | ||
| 808 | 814 | /* basic machine hardware */ |
| 809 | MDRV_CPU_ADD_TAG("main", M6502, EXIDY_CPU_CLOCK) | |
| 810 | MDRV_CPU_PROGRAM_MAP(common_map,sidetrac_map) | |
| 811 | MDRV_CPU_VBLANK_INT(exidy_vblank_interrupt,1) | |
| 815 | MDRV_IMPORT_FROM(base) | |
| 816 | MDRV_CPU_MODIFY("main") | |
| 817 | MDRV_CPU_PROGRAM_MAP(exidy_map,targ_map) | |
| 812 | 818 | |
| 813 | /* video hardware */ | |
| 814 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 815 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 816 | MDRV_SCREEN_RAW_PARAMS(EXIDY_PIXEL_CLOCK, EXIDY_HTOTAL, EXIDY_HBEND, EXIDY_HBSTART, EXIDY_VTOTAL, EXIDY_VBEND, EXIDY_VBSTART) | |
| 817 | MDRV_GFXDECODE(exidy) | |
| 818 | MDRV_PALETTE_LENGTH(8) | |
| 819 | /* audio hardware */ | |
| 820 | MDRV_IMPORT_FROM(targ_audio) | |
| 821 | MACHINE_DRIVER_END | |
| 819 | 822 | |
| 820 | MDRV_VIDEO_START(exidy) | |
| 821 | MDRV_VIDEO_EOF(exidy) | |
| 822 | MDRV_VIDEO_UPDATE(exidy) | |
| 823 | 823 | |
| 824 | /* sound hardware */ | |
| 825 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 824 | static MACHINE_DRIVER_START( spectar ) | |
| 826 | 825 | |
| 827 | MDRV_SOUND_ADD_TAG("sample", SAMPLES, 0) | |
| 828 | MDRV_SOUND_CONFIG(targ_samples_interface) | |
| 829 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 826 | /* basic machine hardware */ | |
| 827 | MDRV_IMPORT_FROM(base) | |
| 828 | MDRV_CPU_MODIFY("main") | |
| 829 | MDRV_CPU_PROGRAM_MAP(exidy_map,spectar_map) | |
| 830 | 830 | |
| 831 | MDRV_SOUND_ADD_TAG("dac", DAC, 0) | |
| 832 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 831 | /* audio hardware */ | |
| 832 | MDRV_IMPORT_FROM(spectar_audio) | |
| 833 | 833 | MACHINE_DRIVER_END |
| 834 | 834 | |
| 835 | 835 | |
| 836 | static MACHINE_DRIVER_START( | |
| 836 | static MACHINE_DRIVER_START( | |
| 837 | 837 | |
| 838 | 838 | /* basic machine hardware */ |
| 839 | MDRV_IMPORT_FROM(s | |
| 839 | MDRV_IMPORT_FROM(sp | |
| 840 | 840 | MDRV_CPU_MODIFY("main") |
| 841 | MDRV_CPU_PROGRAM_MAP( | |
| 841 | MDRV_CPU_PROGRAM_MAP( | |
| 842 | 842 | MACHINE_DRIVER_END |
| 843 | 843 | |
| 844 | 844 | |
| 845 | 845 | static MACHINE_DRIVER_START( venture ) |
| 846 | 846 | |
| 847 | 847 | /* basic machine hardware */ |
| 848 | MDRV_IMPORT_FROM( | |
| 848 | MDRV_IMPORT_FROM(base) | |
| 849 | 849 | MDRV_CPU_MODIFY("main") |
| 850 | MDRV_CPU_PROGRAM_MAP( | |
| 850 | MDRV_CPU_PROGRAM_MAP(exidy | |
| 851 | 851 | |
| 852 | MDRV_CPU_ADD(M6502, 3579545/4) | |
| 853 | /* audio CPU */ | |
| 854 | MDRV_CPU_PROGRAM_MAP(sound_map,0) | |
| 855 | ||
| 856 | 852 | MDRV_INTERLEAVE(10) |
| 857 | 853 | |
| 858 | /* sound hardware */ | |
| 859 | MDRV_SOUND_REPLACE("sample", CUSTOM, 0) | |
| 860 | MDRV_SOUND_CONFIG(exidy_custom_interface) | |
| 861 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 862 | ||
| 863 | MDRV_SOUND_REMOVE("dac") | |
| 854 | /* audio hardware */ | |
| 855 | MDRV_IMPORT_FROM(venture_audio) | |
| 864 | 856 | MACHINE_DRIVER_END |
| 865 | 857 | |
| 866 | 858 | |
| r1527 | r1528 | |
| 878 | 870 | /* basic machine hardware */ |
| 879 | 871 | MDRV_IMPORT_FROM(venture) |
| 880 | 872 | |
| 881 | MDRV_CPU_ADD(Z80, 3579545/2) | |
| 882 | MDRV_CPU_PROGRAM_MAP(cvsd_map,0) | |
| 883 | MDRV_CPU_IO_MAP(cvsd_iomap,0) | |
| 884 | ||
| 885 | 873 | MDRV_INTERLEAVE(32) |
| 886 | 874 | |
| 887 | /* sound hardware */ | |
| 888 | MDRV_SOUND_ADD(HC55516, 0) | |
| 889 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) | |
| 875 | /* audio hardware */ | |
| 876 | MDRV_IMPORT_FROM(mtrap_cvsd_audio) | |
| 890 | 877 | MACHINE_DRIVER_END |
| 891 | 878 | |
| 892 | 879 | |
| r1527 | r1528 | |
| 895 | 882 | /* basic machine hardware */ |
| 896 | 883 | MDRV_IMPORT_FROM(venture) |
| 897 | 884 | MDRV_CPU_MODIFY("main") |
| 898 | MDRV_CPU_PROGRAM_MAP( | |
| 885 | MDRV_CPU_PROGRAM_MAP(exidy | |
| 899 | 886 | MACHINE_DRIVER_END |
| 900 | 887 | |
| 901 | 888 | |
| r1527 | r1528 | |
| 904 | 891 | /* basic machine hardware */ |
| 905 | 892 | MDRV_IMPORT_FROM(pepper2) |
| 906 | 893 | MDRV_CPU_MODIFY("main") |
| 907 | MDRV_CPU_PROGRAM_MAP( | |
| 894 | MDRV_CPU_PROGRAM_MAP(exidy | |
| 908 | 895 | MACHINE_DRIVER_END |
| 909 | 896 | |
| 910 | 897 | |
| r1527 | r1528 | |
| 917 | 904 | |
| 918 | 905 | ROM_START( sidetrac ) |
| 919 | 906 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 920 | ROM_LOAD( "stl8a-1", 0x2800, 0x0800, CRC(e41750ff) SHA1(3868a0d7e34a5118b39b31cff9e4fc839df541ff) ) | |
| 921 | ROM_LOAD( "stl7a-2", 0x3000, 0x0800, CRC(57fb28dc) SHA1(6addd633d655d6a56b3e509d18e5f7c0ab2d0fbb) ) | |
| 922 | ROM_LOAD( "stl6a-2", 0x3800, 0x0800, CRC(4226d469) SHA1(fd18b732b66082988b01e04adc2b1e5dae410c98) ) | |
| 923 | ROM_LOAD( "stl9c-1", 0x4800, 0x0400, CRC(08710a84) SHA1(4bff254a14af7c968656ccc85277d31ab5a8f0c4) ) /* PROM instead of RAM char generator */ | |
| 907 | ROM_LOAD( "stl8a-1", 0x2800, 0x0800, CRC(e41750ff) SHA1(3868a0d7e34a5118b39b31cff9e4fc839df541ff) ) | |
| 908 | ROM_LOAD( "stl7a-2", 0x3000, 0x0800, CRC(57fb28dc) SHA1(6addd633d655d6a56b3e509d18e5f7c0ab2d0fbb) ) | |
| 909 | ROM_LOAD( "stl6a-2", 0x3800, 0x0800, CRC(4226d469) SHA1(fd18b732b66082988b01e04adc2b1e5dae410c98) ) | |
| 910 | ROM_LOAD( "stl9c-1", 0x4800, 0x0400, CRC(08710a84) SHA1(4bff254a14af7c968656ccc85277d31ab5a8f0c4) ) /* PROM instead of RAM char generator */ | |
| 924 | 911 | |
| 925 | 912 | ROM_REGION( 0x0200, REGION_GFX1, ROMREGION_DISPOSE ) |
| 926 | ROM_LOAD( "stl11d", 0x0000, 0x0200, CRC(3bd1acc1) SHA1(06f900cb8f56cd4215c5fbf58a852426d390e0c1) ) | |
| 913 | ROM_LOAD( "stl11d", 0x0000, 0x0200, CRC(3bd1acc1) SHA1(06f900cb8f56cd4215c5fbf58a852426d390e0c1) ) | |
| 927 | 914 | ROM_END |
| 928 | 915 | |
| 929 | 916 | |
| r1527 | r1528 | |
| 938 | 925 | ROM_REGION( 0x0400, REGION_GFX1, ROMREGION_DISPOSE ) |
| 939 | 926 | ROM_LOAD( "hrl11d-1", 0x0000, 0x0400, CRC(9f03513e) SHA1(aa4763e49df65e5686a96431543580b8d8285893) ) |
| 940 | 927 | |
| 941 | ROM_REGION( 0x01 | |
| 928 | ROM_REGION( 0x0140, REGION_PROMS, 0 ) | |
| 942 | 929 | ROM_LOAD( "hrl5c-1", 0x0000, 0x0100, CRC(a24290d0) SHA1(5f2888d168de874021b51c5d19a62fb8165e4454) ) /* address decoder */ |
| 943 | 930 | ROM_LOAD( "stl6d-1", 0x0100, 0x0020, CRC(e26f9053) SHA1(eec35b6aa2c2d305418306bf4a1754a0583f109f) ) /* unknown */ |
| 944 | ROM_LOAD( "hra2b-1", 0x0120, 0x0020, CRC(38e8024b) SHA1(adf1c1770695f7614c95eceb803f662c5b096a76) ) /* unknown */ | |
| 945 | ROM_LOAD( "hrl14h-1", 0x0140, 0x0020, CRC(f76b4fcf) SHA1(197e0cc508ffeb5cefa4046bdfb158939d598225) ) /* unknown */ | |
| 931 | ROM_LOAD( "hrl14h-1", 0x0120, 0x0020, CRC(f76b4fcf) SHA1(197e0cc508ffeb5cefa4046bdfb158939d598225) ) /* unknown */ | |
| 932 | ||
| 933 | ROM_REGION( 0x0020, TARG_TONE_REGION, 0 ) | |
| 934 | ROM_LOAD( "hra2b-1", 0x0000, 0x0020, CRC(38e8024b) SHA1(adf1c1770695f7614c95eceb803f662c5b096a76) ) /* unknown */ | |
| 946 | 935 | ROM_END |
| 947 | 936 | |
| 937 | ||
| 948 | 938 | ROM_START( targc ) |
| 949 | 939 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 950 | 940 | ROM_LOAD( "ctl.10a", 0x1800, 0x0800, CRC(058b3983) SHA1(8079667613c9273e95131c3c68cd92ce34c18148) ) |
| r1527 | r1528 | |
| 955 | 945 | |
| 956 | 946 | ROM_REGION( 0x0400, REGION_GFX1, ROMREGION_DISPOSE ) |
| 957 | 947 | ROM_LOAD( "hrl11d-1", 0x0000, 0x0400, CRC(9f03513e) SHA1(aa4763e49df65e5686a96431543580b8d8285893) ) |
| 948 | ||
| 949 | ROM_REGION( 0x0020, TARG_TONE_REGION, 0 ) | |
| 950 | ROM_LOAD( "hra2b-1", 0x0000, 0x0020, CRC(38e8024b) SHA1(adf1c1770695f7614c95eceb803f662c5b096a76) ) /* unknown */ | |
| 958 | 951 | ROM_END |
| 959 | 952 | |
| 960 | 953 | |
| r1527 | r1528 | |
| 972 | 965 | ROM_CONTINUE( 0x0000, 0x0400 ) /* overwrite with the real one */ |
| 973 | 966 | ROM_END |
| 974 | 967 | |
| 968 | ||
| 975 | 969 | ROM_START( spectar1 ) |
| 976 | 970 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 977 | 971 | ROM_LOAD( "spl12a1", 0x0800, 0x0800, CRC(7002efb4) SHA1(fbb19ccd2aee49b78606eadcbef94e842e1be905) ) |
| r1527 | r1528 | |
| 987 | 981 | ROM_CONTINUE( 0x0000, 0x0400 ) /* overwrite with the real one */ |
| 988 | 982 | ROM_END |
| 989 | 983 | |
| 984 | ||
| 990 | 985 | ROM_START( rallys ) |
| 991 | 986 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 992 | ROM_LOAD( "rallys.01", 0x1000, 0x0400, CRC(a192b22b) SHA1(aaae0b1822f934df30b354f787ffa8848c71b52f) ) | |
| 993 | ROM_LOAD( "rallys.02", 0x1400, 0x0400, CRC(19e730aa) SHA1(4f4e87d26c14a9ff2be5b4173c4e5804db551e33) ) | |
| 994 | ROM_LOAD( "rallys.03", 0x1800, 0x0400, CRC(2a3e7b69) SHA1(d31a3e6acca87881741e88e70d46a4a0ee59fcf8) ) | |
| 995 | ROM_LOAD( "rallys.04", 0x1c00, 0x0400, CRC(6d224696) SHA1(586bc8efdc8ac0a73e4a4300459efaf89021f6f5) ) | |
| 996 | ROM_LOAD( "rallys.05", 0x2000, 0x0400, CRC(af943b5e) SHA1(819fa8a6ee78a39cdade49789cd42b4a215f82f0) ) | |
| 997 | ROM_LOAD( "rallys.06", 0x2400, 0x0400, CRC(9b3d9e61) SHA1(b183e0844706713eb0a241a6e45c09c53e4077a3) ) | |
| 998 | ROM_LOAD( "rallys.07", 0x2800, 0x0400, CRC(8ef8bc67) SHA1(c8d80cc8e89a9bc5d957d648d704e4c66b17932d) ) | |
| 999 | ROM_LOAD( "rallys.08", 0x2c00, 0x0400, CRC(243c54f2) SHA1(813b3ecbd5642034b5de0bae96698ed2b036fc7b) ) | |
| 1000 | ROM_LOAD( "rallys.10", 0x3400, 0x0400, CRC(46f473d2) SHA1(e6a180fdcf2ac13ffab624554ef8aab128e80321) ) | |
| 1001 | ROM_LOAD( "rallys.09", 0x3c00, 0x0400, CRC(56ce8a94) SHA1(becd31cda58e59267517a39c82ccfa70abdd31c6) ) | |
| 987 | ROM_LOAD( "rallys.01", 0x1000, 0x0400, CRC(a192b22b) SHA1(aaae0b1822f934df30b354f787ffa8848c71b52f) ) | |
| 988 | ROM_LOAD( "rallys.02", 0x1400, 0x0400, CRC(19e730aa) SHA1(4f4e87d26c14a9ff2be5b4173c4e5804db551e33) ) | |
| 989 | ROM_LOAD( "rallys.03", 0x1800, 0x0400, CRC(2a3e7b69) SHA1(d31a3e6acca87881741e88e70d46a4a0ee59fcf8) ) | |
| 990 | ROM_LOAD( "rallys.04", 0x1c00, 0x0400, CRC(6d224696) SHA1(586bc8efdc8ac0a73e4a4300459efaf89021f6f5) ) | |
| 991 | ROM_LOAD( "rallys.05", 0x2000, 0x0400, CRC(af943b5e) SHA1(819fa8a6ee78a39cdade49789cd42b4a215f82f0) ) | |
| 992 | ROM_LOAD( "rallys.06", 0x2400, 0x0400, CRC(9b3d9e61) SHA1(b183e0844706713eb0a241a6e45c09c53e4077a3) ) | |
| 993 | ROM_LOAD( "rallys.07", 0x2800, 0x0400, CRC(8ef8bc67) SHA1(c8d80cc8e89a9bc5d957d648d704e4c66b17932d) ) | |
| 994 | ROM_LOAD( "rallys.08", 0x2c00, 0x0400, CRC(243c54f2) SHA1(813b3ecbd5642034b5de0bae96698ed2b036fc7b) ) | |
| 995 | ROM_LOAD( "rallys.10", 0x3400, 0x0400, CRC(46f473d2) SHA1(e6a180fdcf2ac13ffab624554ef8aab128e80321) ) | |
| 996 | ROM_LOAD( "rallys.09", 0x3c00, 0x0400, CRC(56ce8a94) SHA1(becd31cda58e59267517a39c82ccfa70abdd31c6) ) | |
| 1002 | 997 | |
| 1003 | 998 | ROM_REGION( 0x0400, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1004 | ROM_LOAD( "hrl11d-1", 0x0000, 0x0400, CRC(9f03513e) SHA1(aa4763e49df65e5686a96431543580b8d8285893) ) | |
| 999 | ROM_LOAD( "hrl11d-1", 0x0000, 0x0400, CRC(9f03513e) SHA1(aa4763e49df65e5686a96431543580b8d8285893) ) | |
| 1005 | 1000 | |
| 1006 | 1001 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) |
| 1007 | 1002 | ROM_LOAD( "targ82s.123", 0x0000, 0x0020, CRC(9eb9125c) SHA1(660ad9b2c7c28c3fda4b10c1401c03165d131c61) ) /* unknown */ |
| 1008 | 1003 | ROM_END |
| 1009 | 1004 | |
| 1005 | ||
| 1010 | 1006 | ROM_START( phantoma ) |
| 1011 | 1007 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1012 | ROM_LOAD( "156_a2", 0x1000, 0x0800, CRC(c5af9d34) SHA1(4c9f9a06cc7f6caf13a79fa8491db17b01b24774) ) | |
| 1013 | ROM_LOAD( "156_a3", 0x1800, 0x0800, CRC(30121e69) SHA1(1588cfb61eb9aa9598b3ff600cc02b0f1ac622bf) ) | |
| 1014 | ROM_LOAD( "156_a4", 0x2000, 0x0800, CRC(02d7fb94) SHA1(634e952a6a0d4c1a42692100e1913ecd5ab9faed) ) | |
| 1015 | ROM_LOAD( "156_a5", 0x2800, 0x0800, CRC(0127bc8d) SHA1(c555507f2662d1b45caf0b696147f70749292930) ) | |
| 1016 | ROM_LOAD( "156_a1", 0xf800, 0x0800, CRC(26292c0a) SHA1(d4157e261f6247cfafb948d1a9dbf0b02b2b84de) ) | |
| 1008 | ROM_LOAD( "156_a2", 0x1000, 0x0800, CRC(c5af9d34) SHA1(4c9f9a06cc7f6caf13a79fa8491db17b01b24774) ) | |
| 1009 | ROM_LOAD( "156_a3", 0x1800, 0x0800, CRC(30121e69) SHA1(1588cfb61eb9aa9598b3ff600cc02b0f1ac622bf) ) | |
| 1010 | ROM_LOAD( "156_a4", 0x2000, 0x0800, CRC(02d7fb94) SHA1(634e952a6a0d4c1a42692100e1913ecd5ab9faed) ) | |
| 1011 | ROM_LOAD( "156_a5", 0x2800, 0x0800, CRC(0127bc8d) SHA1(c555507f2662d1b45caf0b696147f70749292930) ) | |
| 1012 | ROM_LOAD( "156_a1", 0xf800, 0x0800, CRC(26292c0a) SHA1(d4157e261f6247cfafb948d1a9dbf0b02b2b84de) ) | |
| 1017 | 1013 | |
| 1018 | 1014 | ROM_REGION( 0x800, REGION_GFX1, 0 ) |
| 1019 | ROM_LOAD( "156_d1", 0x0000, 0x0800, CRC(d18e5f14) SHA1(5cd327500e74eca378ad5d0924949f96dd955cf8) ) | |
| 1015 | ROM_LOAD( "156_d1", 0x0000, 0x0800, CRC(d18e5f14) SHA1(5cd327500e74eca378ad5d0924949f96dd955cf8) ) | |
| 1020 | 1016 | |
| 1021 | 1017 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) |
| 1022 | ROM_LOAD( "156_pal", 0x0000, 0x0020, CRC(9fb1daee) SHA1(2ec1189a57c95d7ad820eb12343fcf2c3fb08431) ) | |
| 1018 | ROM_LOAD( "156_pal", 0x0000, 0x0020, CRC(9fb1daee) SHA1(2ec1189a57c95d7ad820eb12343fcf2c3fb08431) ) | |
| 1023 | 1019 | ROM_END |
| 1024 | 1020 | |
| 1025 | 1021 | |
| r1527 | r1528 | |
| 1032 | 1028 | ROM_LOAD( "mtl7a.bin", 0xe000, 0x1000, CRC(caafbb6d) SHA1(96823ac4e49f192121c53f70382a20f7c52e290b) ) |
| 1033 | 1029 | ROM_LOAD( "mtl6a.bin", 0xf000, 0x1000, CRC(d85e52ca) SHA1(51296247e365a468fe9458b722bbdbbeeed59fa0) ) |
| 1034 | 1030 | |
| 1035 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1031 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1036 | 1032 | ROM_LOAD( "mta5a.bin", 0x6800, 0x0800, CRC(dbe4ec02) SHA1(34e965428dbb4b9c558927bb80d19cb550b53228) ) |
| 1037 | 1033 | ROM_LOAD( "mta6a.bin", 0x7000, 0x0800, CRC(c00f0c05) SHA1(398b0bc2a7e54b1e2326ed067bf6bb15cc52ed39) ) |
| 1038 | 1034 | ROM_LOAD( "mta7a.bin", 0x7800, 0x0800, CRC(f3f16ca7) SHA1(3928c5da246c43036a7b4cbb140a1734d5f1fb03) ) |
| 1039 | 1035 | |
| 1040 | 1036 | ROM_REGION( 0x4000, REGION_CPU3, 0 ) /* 16k for digital sound processor */ |
| 1041 | ROM_LOAD( "mta2a.bin", 0x0000, 0x1000, CRC(13db8ed3) SHA1(939352323bdcd7df25db5eb2e30f269bcaebe6af) ) | |
| 1042 | ROM_LOAD( "mta3a.bin", 0x1000, 0x1000, CRC(31bdfe5c) SHA1(b10bfe9e56dd617c5b4cd8b5bfec9c7f537b1086) ) | |
| 1043 | ROM_LOAD( "mta4a.bin", 0x2000, 0x1000, CRC(1502d0e8) SHA1(8ef51ad4601299016f1821a5c65bec0199dd5474) ) | |
| 1044 | ROM_LOAD( "mta1a.bin", 0x3000, 0x1000, CRC(658482a6) SHA1(c0d770fbeaa7cb3e0eef47d8caa0f8a78841692e) ) | |
| 1037 | ROM_LOAD( "mta2a.bin", 0x0000, 0x1000, CRC(13db8ed3) SHA1(939352323bdcd7df25db5eb2e30f269bcaebe6af) ) | |
| 1038 | ROM_LOAD( "mta3a.bin", 0x1000, 0x1000, CRC(31bdfe5c) SHA1(b10bfe9e56dd617c5b4cd8b5bfec9c7f537b1086) ) | |
| 1039 | ROM_LOAD( "mta4a.bin", 0x2000, 0x1000, CRC(1502d0e8) SHA1(8ef51ad4601299016f1821a5c65bec0199dd5474) ) | |
| 1040 | ROM_LOAD( "mta1a.bin", 0x3000, 0x1000, CRC(658482a6) SHA1(c0d770fbeaa7cb3e0eef47d8caa0f8a78841692e) ) | |
| 1045 | 1041 | |
| 1046 | 1042 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1047 | 1043 | ROM_LOAD( "mtl11d.bin", 0x0000, 0x0800, CRC(c6e4d339) SHA1(b091923e4d52e93d7c567afba217a10b2a3735fc) ) |
| 1048 | 1044 | ROM_END |
| 1049 | 1045 | |
| 1046 | ||
| 1050 | 1047 | ROM_START( mtrap3 ) |
| 1051 | 1048 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1052 | 1049 | ROM_LOAD( "mtl-3.11a", 0xa000, 0x1000, CRC(4091be6e) SHA1(a4432f4588915276583f4b2e8db527fd24eb4291) ) |
| r1527 | r1528 | |
| 1056 | 1053 | ROM_LOAD( "mtl-3.7a", 0xe000, 0x1000, CRC(ea8ec479) SHA1(785557a242d9343c83cdc403b1f726cbea9d230f) ) |
| 1057 | 1054 | ROM_LOAD( "mtl-3.6a", 0xf000, 0x1000, CRC(d72ba72d) SHA1(4c5b311bc7ecfc6133bc09e586635844e2f1d6a9) ) |
| 1058 | 1055 | |
| 1059 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1056 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1060 | 1057 | ROM_LOAD( "mta5a.bin", 0x6800, 0x0800, CRC(dbe4ec02) SHA1(34e965428dbb4b9c558927bb80d19cb550b53228) ) |
| 1061 | 1058 | ROM_LOAD( "mta6a.bin", 0x7000, 0x0800, CRC(c00f0c05) SHA1(398b0bc2a7e54b1e2326ed067bf6bb15cc52ed39) ) |
| 1062 | 1059 | ROM_LOAD( "mta7a.bin", 0x7800, 0x0800, CRC(f3f16ca7) SHA1(3928c5da246c43036a7b4cbb140a1734d5f1fb03) ) |
| 1063 | 1060 | |
| 1064 | 1061 | ROM_REGION( 0x4000, REGION_CPU3, 0 ) /* 16k for digital sound processor */ |
| 1065 | ROM_LOAD( "mta2a.bin", 0x0000, 0x1000, CRC(13db8ed3) SHA1(939352323bdcd7df25db5eb2e30f269bcaebe6af) ) | |
| 1066 | ROM_LOAD( "mta3a.bin", 0x1000, 0x1000, CRC(31bdfe5c) SHA1(b10bfe9e56dd617c5b4cd8b5bfec9c7f537b1086) ) | |
| 1067 | ROM_LOAD( "mta4a.bin", 0x2000, 0x1000, CRC(1502d0e8) SHA1(8ef51ad4601299016f1821a5c65bec0199dd5474) ) | |
| 1068 | ROM_LOAD( "mta1a.bin", 0x3000, 0x1000, CRC(658482a6) SHA1(c0d770fbeaa7cb3e0eef47d8caa0f8a78841692e) ) | |
| 1062 | ROM_LOAD( "mta2a.bin", 0x0000, 0x1000, CRC(13db8ed3) SHA1(939352323bdcd7df25db5eb2e30f269bcaebe6af) ) | |
| 1063 | ROM_LOAD( "mta3a.bin", 0x1000, 0x1000, CRC(31bdfe5c) SHA1(b10bfe9e56dd617c5b4cd8b5bfec9c7f537b1086) ) | |
| 1064 | ROM_LOAD( "mta4a.bin", 0x2000, 0x1000, CRC(1502d0e8) SHA1(8ef51ad4601299016f1821a5c65bec0199dd5474) ) | |
| 1065 | ROM_LOAD( "mta1a.bin", 0x3000, 0x1000, CRC(658482a6) SHA1(c0d770fbeaa7cb3e0eef47d8caa0f8a78841692e) ) | |
| 1069 | 1066 | |
| 1070 | 1067 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1071 | 1068 | ROM_LOAD( "mtl11d.bin", 0x0000, 0x0800, CRC(c6e4d339) SHA1(b091923e4d52e93d7c567afba217a10b2a3735fc) ) |
| 1072 | 1069 | ROM_END |
| 1073 | 1070 | |
| 1071 | ||
| 1074 | 1072 | ROM_START( mtrap4 ) |
| 1075 | 1073 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1076 | 1074 | ROM_LOAD( "mta411a.bin", 0xa000, 0x1000, CRC(2879cb8d) SHA1(738bd3cd968fd733adcfe0fb5efdb2e2fcfb344e) ) |
| r1527 | r1528 | |
| 1080 | 1078 | ROM_LOAD( "mta47a.bin", 0xe000, 0x1000, CRC(cdf8c6a8) SHA1(932ae9c0ea5700bd79862efa94742136d8e15641) ) |
| 1081 | 1079 | ROM_LOAD( "mta46a.bin", 0xf000, 0x1000, CRC(77d3f2e6) SHA1(2c21dd7ee326ccb41d3c64eec90a19198382edea) ) |
| 1082 | 1080 | |
| 1083 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1081 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1084 | 1082 | ROM_LOAD( "mta5a.bin", 0x6800, 0x0800, CRC(dbe4ec02) SHA1(34e965428dbb4b9c558927bb80d19cb550b53228) ) |
| 1085 | 1083 | ROM_LOAD( "mta6a.bin", 0x7000, 0x0800, CRC(c00f0c05) SHA1(398b0bc2a7e54b1e2326ed067bf6bb15cc52ed39) ) |
| 1086 | 1084 | ROM_LOAD( "mta7a.bin", 0x7800, 0x0800, CRC(f3f16ca7) SHA1(3928c5da246c43036a7b4cbb140a1734d5f1fb03) ) |
| 1087 | 1085 | |
| 1088 | 1086 | ROM_REGION( 0x4000, REGION_CPU3, 0 ) /* 16k for digital sound processor */ |
| 1089 | ROM_LOAD( "mta2a.bin", 0x0000,0x1000,CRC(13db8ed3) SHA1(939352323bdcd7df25db5eb2e30f269bcaebe6af) ) | |
| 1090 | ROM_LOAD( "mta3a.bin", 0x1000,0x1000,CRC(31bdfe5c) SHA1(b10bfe9e56dd617c5b4cd8b5bfec9c7f537b1086) ) | |
| 1091 | ROM_LOAD( "mta4a.bin", 0x2000,0x1000,CRC(1502d0e8) SHA1(8ef51ad4601299016f1821a5c65bec0199dd5474) ) | |
| 1092 | ROM_LOAD( "mta1a.bin", 0x3000,0x1000,CRC(658482a6) SHA1(c0d770fbeaa7cb3e0eef47d8caa0f8a78841692e) ) | |
| 1087 | ROM_LOAD( "mta2a.bin", 0x0000,0x1000,CRC(13db8ed3) SHA1(939352323bdcd7df25db5eb2e30f269bcaebe6af) ) | |
| 1088 | ROM_LOAD( "mta3a.bin", 0x1000,0x1000,CRC(31bdfe5c) SHA1(b10bfe9e56dd617c5b4cd8b5bfec9c7f537b1086) ) | |
| 1089 | ROM_LOAD( "mta4a.bin", 0x2000,0x1000,CRC(1502d0e8) SHA1(8ef51ad4601299016f1821a5c65bec0199dd5474) ) | |
| 1090 | ROM_LOAD( "mta1a.bin", 0x3000,0x1000,CRC(658482a6) SHA1(c0d770fbeaa7cb3e0eef47d8caa0f8a78841692e) ) | |
| 1093 | 1091 | |
| 1094 | 1092 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1095 | 1093 | ROM_LOAD( "mtl11d.bin", 0x0000, 0x0800, CRC(c6e4d339) SHA1(b091923e4d52e93d7c567afba217a10b2a3735fc) ) |
| r1527 | r1528 | |
| 1098 | 1096 | |
| 1099 | 1097 | ROM_START( venture ) |
| 1100 | 1098 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1101 | ROM_LOAD( "13a-cpu", 0x8000, 0x1000, CRC(f4e4d991) SHA1(6683c1552b56b20f2296e461aff697af73563792) ) | |
| 1102 | ROM_LOAD( "12a-cpu", 0x9000, 0x1000, CRC(c6d8cb04) SHA1(3b9ae8fdc35117c73c91daed66e93e5344bdcd7e) ) | |
| 1103 | ROM_LOAD( "11a-cpu", 0xa000, 0x1000, CRC(3bdb01f4) SHA1(3c1f43a3c37a21524b64d69e4dae58af8c2e0d90) ) | |
| 1104 | ROM_LOAD( "10a-cpu", 0xb000, 0x1000, CRC(0da769e9) SHA1(3604dc08c63461b2ea957a396887fb32e4a1a970) ) | |
| 1105 | ROM_LOAD( "9a-cpu", 0xc000, 0x1000, CRC(0ae05855) SHA1(29b3c2ca9740aa753e90131e6edcc61f414277e1) ) | |
| 1106 | ROM_LOAD( "8a-cpu", 0xd000, 0x1000, CRC(4ae59676) SHA1(36fc9dce9dd0c764a861634859ca0d7f98e20382) ) | |
| 1107 | ROM_LOAD( "7a-cpu", 0xe000, 0x1000, CRC(48d66220) SHA1(97b1605170c67b3a945b4d5f088df79328e163ce) ) | |
| 1108 | ROM_LOAD( "6a-cpu", 0xf000, 0x1000, CRC(7b78cf49) SHA1(1d484172465d3db6c4fc3733aa2b409e3a2e228f) ) | |
| 1099 | ROM_LOAD( "13a-cpu", 0x8000, 0x1000, CRC(f4e4d991) SHA1(6683c1552b56b20f2296e461aff697af73563792) ) | |
| 1100 | ROM_LOAD( "12a-cpu", 0x9000, 0x1000, CRC(c6d8cb04) SHA1(3b9ae8fdc35117c73c91daed66e93e5344bdcd7e) ) | |
| 1101 | ROM_LOAD( "11a-cpu", 0xa000, 0x1000, CRC(3bdb01f4) SHA1(3c1f43a3c37a21524b64d69e4dae58af8c2e0d90) ) | |
| 1102 | ROM_LOAD( "10a-cpu", 0xb000, 0x1000, CRC(0da769e9) SHA1(3604dc08c63461b2ea957a396887fb32e4a1a970) ) | |
| 1103 | ROM_LOAD( "9a-cpu", 0xc000, 0x1000, CRC(0ae05855) SHA1(29b3c2ca9740aa753e90131e6edcc61f414277e1) ) | |
| 1104 | ROM_LOAD( "8a-cpu", 0xd000, 0x1000, CRC(4ae59676) SHA1(36fc9dce9dd0c764a861634859ca0d7f98e20382) ) | |
| 1105 | ROM_LOAD( "7a-cpu", 0xe000, 0x1000, CRC(48d66220) SHA1(97b1605170c67b3a945b4d5f088df79328e163ce) ) | |
| 1106 | ROM_LOAD( "6a-cpu", 0xf000, 0x1000, CRC(7b78cf49) SHA1(1d484172465d3db6c4fc3733aa2b409e3a2e228f) ) | |
| 1109 | 1107 | |
| 1110 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) /* 32k for audio */ | |
| 1111 | ROM_LOAD( "3a-ac", 0x5800, 0x0800, CRC(4ea1c3d9) SHA1(d0c99c9d5b887d717c68e8745906ae4e65aec6ad) ) | |
| 1112 | ROM_LOAD( "4a-ac", 0x6000, 0x0800, CRC(5154c39e) SHA1(e6f011630eb1aa4116a0e5824ad6b65c1be2455f) ) | |
| 1113 | ROM_LOAD( "5a-ac", 0x6800, 0x0800, CRC(1e1e3916) SHA1(867e586583e07cd01e0e852f6ea52a040995725d) ) | |
| 1114 | ROM_LOAD( "6a-ac", 0x7000, 0x0800, CRC(80f3357a) SHA1(f1ee638251e8676a526e6367c11866b1d52f5910) ) | |
| 1115 | ROM_LOAD( "7a-ac", 0x7800, 0x0800, CRC(466addc7) SHA1(0230b5365d6aeee3ca47666a9eadee4141de125b) ) | |
| 1108 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1109 | ROM_LOAD( "3a-ac", 0x5800, 0x0800, CRC(4ea1c3d9) SHA1(d0c99c9d5b887d717c68e8745906ae4e65aec6ad) ) | |
| 1110 | ROM_LOAD( "4a-ac", 0x6000, 0x0800, CRC(5154c39e) SHA1(e6f011630eb1aa4116a0e5824ad6b65c1be2455f) ) | |
| 1111 | ROM_LOAD( "5a-ac", 0x6800, 0x0800, CRC(1e1e3916) SHA1(867e586583e07cd01e0e852f6ea52a040995725d) ) | |
| 1112 | ROM_LOAD( "6a-ac", 0x7000, 0x0800, CRC(80f3357a) SHA1(f1ee638251e8676a526e6367c11866b1d52f5910) ) | |
| 1113 | ROM_LOAD( "7a-ac", 0x7800, 0x0800, CRC(466addc7) SHA1(0230b5365d6aeee3ca47666a9eadee4141de125b) ) | |
| 1116 | 1114 | |
| 1117 | 1115 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1118 | ROM_LOAD( "11d-cpu", | |
| 1116 | ROM_LOAD( "11d-cpu", | |
| 1119 | 1117 | ROM_END |
| 1120 | 1118 | |
| 1119 | ||
| 1121 | 1120 | ROM_START( venture2 ) |
| 1122 | 1121 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1123 | 1122 | ROM_LOAD( "vent_a13.cpu", 0x8000, 0x1000, CRC(4c833f99) SHA1(1ff4eafe48b9f0ab8a123659d78c3dfa0bf56d7d) ) |
| r1527 | r1528 | |
| 1129 | 1128 | ROM_LOAD( "vent_a7.cpu", 0xe000, 0x1000, CRC(1aab27c2) SHA1(66c7274dbb8bda3c78cc61d96a6cb1a9b29939b5) ) |
| 1130 | 1129 | ROM_LOAD( "vent_a6.cpu", 0xf000, 0x1000, CRC(767bdd71) SHA1(334a903e05fc86186f90aa2d9ce3b0d367d7e516) ) |
| 1131 | 1130 | |
| 1132 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1131 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1133 | 1132 | ROM_LOAD( "3a-ac", 0x5800, 0x0800, CRC(4ea1c3d9) SHA1(d0c99c9d5b887d717c68e8745906ae4e65aec6ad) ) |
| 1134 | 1133 | ROM_LOAD( "4a-ac", 0x6000, 0x0800, CRC(5154c39e) SHA1(e6f011630eb1aa4116a0e5824ad6b65c1be2455f) ) |
| 1135 | 1134 | ROM_LOAD( "5a-ac", 0x6800, 0x0800, CRC(1e1e3916) SHA1(867e586583e07cd01e0e852f6ea52a040995725d) ) |
| r1527 | r1528 | |
| 1140 | 1139 | ROM_LOAD( "11d-cpu", 0x0000, 0x0800, CRC(b4bb2503) SHA1(67303603b7c5e6301e976ef19f81c7519648b179) ) |
| 1141 | 1140 | ROM_END |
| 1142 | 1141 | |
| 1142 | ||
| 1143 | 1143 | ROM_START( venture4 ) |
| 1144 | 1144 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1145 | ROM_LOAD( "vel13a-4", 0x8000, 0x1000, CRC(1c5448f9) SHA1(59d3ca2a2d7048f5f7bd23fa5d9c9a2cc0734cb8) ) | |
| 1146 | ROM_LOAD( "vel12a-4", 0x9000, 0x1000, CRC(e62491cc) SHA1(a98b6c6e60d83fd4591d0de145a99c5e4576121a) ) | |
| 1147 | ROM_LOAD( "vel11a-4", 0xa000, 0x1000, CRC(e91faeaf) SHA1(ce50a9f1016671282d16f2d0ad3553598e0c7e89) ) | |
| 1148 | ROM_LOAD( "vel10a-4", 0xb000, 0x1000, CRC(da3a2991) SHA1(2b5175b0f3642e735b6d87fbd5b75118cf6b7faa) ) | |
| 1149 | ROM_LOAD( "vel9a-4", 0xc000, 0x1000, CRC(d1887b11) SHA1(40ed1e1bdcb95d6e317cb5e4fb8572a314b3fbf8) ) | |
| 1150 | ROM_LOAD( "vel8a-4", 0xd000, 0x1000, CRC(8e8153fc) SHA1(409cf0ed39ef04c1e9359f0499d7cba3aed8f36e) ) | |
| 1151 | ROM_LOAD( "vel7a-4", 0xe000, 0x1000, CRC(0a091701) SHA1(ffdea1d60371779d0c28fb3c6111639cace79dad) ) | |
| 1152 | ROM_LOAD( "vel6a-4", 0xf000, 0x1000, CRC(7b165f67) SHA1(4109797bcfd33c870234930790e3cecaaf90b706) ) | |
| 1145 | ROM_LOAD( "vel13a-4", 0x8000, 0x1000, CRC(1c5448f9) SHA1(59d3ca2a2d7048f5f7bd23fa5d9c9a2cc0734cb8) ) | |
| 1146 | ROM_LOAD( "vel12a-4", 0x9000, 0x1000, CRC(e62491cc) SHA1(a98b6c6e60d83fd4591d0de145a99c5e4576121a) ) | |
| 1147 | ROM_LOAD( "vel11a-4", 0xa000, 0x1000, CRC(e91faeaf) SHA1(ce50a9f1016671282d16f2d0ad3553598e0c7e89) ) | |
| 1148 | ROM_LOAD( "vel10a-4", 0xb000, 0x1000, CRC(da3a2991) SHA1(2b5175b0f3642e735b6d87fbd5b75118cf6b7faa) ) | |
| 1149 | ROM_LOAD( "vel9a-4", 0xc000, 0x1000, CRC(d1887b11) SHA1(40ed1e1bdcb95d6e317cb5e4fb8572a314b3fbf8) ) | |
| 1150 | ROM_LOAD( "vel8a-4", 0xd000, 0x1000, CRC(8e8153fc) SHA1(409cf0ed39ef04c1e9359f0499d7cba3aed8f36e) ) | |
| 1151 | ROM_LOAD( "vel7a-4", 0xe000, 0x1000, CRC(0a091701) SHA1(ffdea1d60371779d0c28fb3c6111639cace79dad) ) | |
| 1152 | ROM_LOAD( "vel6a-4", 0xf000, 0x1000, CRC(7b165f67) SHA1(4109797bcfd33c870234930790e3cecaaf90b706) ) | |
| 1153 | 1153 | |
| 1154 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) /* 32k for audio */ | |
| 1155 | ROM_LOAD( "vea3a-2", 0x5800, 0x0800, CRC(83b8836f) SHA1(ec0e2de62caea61ceff56e924449213997bff8cd) ) | |
| 1156 | ROM_LOAD( "4a-ac", 0x6000, 0x0800, CRC(5154c39e) SHA1(e6f011630eb1aa4116a0e5824ad6b65c1be2455f) ) | |
| 1157 | ROM_LOAD( "5a-ac", 0x6800, 0x0800, CRC(1e1e3916) SHA1(867e586583e07cd01e0e852f6ea52a040995725d) ) | |
| 1158 | ROM_LOAD( "6a-ac", 0x7000, 0x0800, CRC(80f3357a) SHA1(f1ee638251e8676a526e6367c11866b1d52f5910) ) | |
| 1159 | ROM_LOAD( "7a-ac", 0x7800, 0x0800, CRC(466addc7) SHA1(0230b5365d6aeee3ca47666a9eadee4141de125b) ) | |
| 1154 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1155 | ROM_LOAD( "vea3a-2", 0x5800, 0x0800, CRC(83b8836f) SHA1(ec0e2de62caea61ceff56e924449213997bff8cd) ) | |
| 1156 | ROM_LOAD( "4a-ac", 0x6000, 0x0800, CRC(5154c39e) SHA1(e6f011630eb1aa4116a0e5824ad6b65c1be2455f) ) | |
| 1157 | ROM_LOAD( "5a-ac", 0x6800, 0x0800, CRC(1e1e3916) SHA1(867e586583e07cd01e0e852f6ea52a040995725d) ) | |
| 1158 | ROM_LOAD( "6a-ac", 0x7000, 0x0800, CRC(80f3357a) SHA1(f1ee638251e8676a526e6367c11866b1d52f5910) ) | |
| 1159 | ROM_LOAD( "7a-ac", 0x7800, 0x0800, CRC(466addc7) SHA1(0230b5365d6aeee3ca47666a9eadee4141de125b) ) | |
| 1160 | 1160 | |
| 1161 | 1161 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1162 | ROM_LOAD( "vel11d-2", | |
| 1162 | ROM_LOAD( "vel11d-2", | |
| 1163 | 1163 | ROM_END |
| 1164 | 1164 | |
| 1165 | 1165 | |
| 1166 | 1166 | ROM_START( pepper2 ) |
| 1167 | 1167 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1168 | ROM_LOAD( "main_12a", 0x9000, 0x1000, CRC(33db4737) SHA1(d8f7a5d340ddbc4d06d403c3bff0102ce637d24e) ) | |
| 1169 | ROM_LOAD( "main_11a", 0xa000, 0x1000, CRC(a1f43b1f) SHA1(a669f2ef55d9a0617110f65863822fdcaf153511) ) | |
| 1170 | ROM_LOAD( "main_10a", 0xb000, 0x1000, CRC(4d7d7786) SHA1(ea1390b887404a67ea556720219e81007b954a7d) ) | |
| 1171 | ROM_LOAD( "main_9a", 0xc000, 0x1000, CRC(b3362298) SHA1(7adad138ec5f94caa39f9c0fabece538d5db4913) ) | |
| 1172 | ROM_LOAD( "main_8a", 0xd000, 0x1000, CRC(64d106ed) SHA1(49646a97def9e1793cac6ee0044f68232b294e4f) ) | |
| 1173 | ROM_LOAD( "main_7a", 0xe000, 0x1000, CRC(b1c6f07c) SHA1(53d07211d014336bb43671c51f4190c6515e9cde) ) | |
| 1174 | ROM_LOAD( "main_6a", 0xf000, 0x1000, CRC(515b1046) SHA1(bdcccd4e415c00ee8e5ec185597df75ecafe7d3d) ) | |
| 1168 | ROM_LOAD( "main_12a", 0x9000, 0x1000, CRC(33db4737) SHA1(d8f7a5d340ddbc4d06d403c3bff0102ce637d24e) ) | |
| 1169 | ROM_LOAD( "main_11a", 0xa000, 0x1000, CRC(a1f43b1f) SHA1(a669f2ef55d9a0617110f65863822fdcaf153511) ) | |
| 1170 | ROM_LOAD( "main_10a", 0xb000, 0x1000, CRC(4d7d7786) SHA1(ea1390b887404a67ea556720219e81007b954a7d) ) | |
| 1171 | ROM_LOAD( "main_9a", 0xc000, 0x1000, CRC(b3362298) SHA1(7adad138ec5f94caa39f9c0fabece538d5db4913) ) | |
| 1172 | ROM_LOAD( "main_8a", 0xd000, 0x1000, CRC(64d106ed) SHA1(49646a97def9e1793cac6ee0044f68232b294e4f) ) | |
| 1173 | ROM_LOAD( "main_7a", 0xe000, 0x1000, CRC(b1c6f07c) SHA1(53d07211d014336bb43671c51f4190c6515e9cde) ) | |
| 1174 | ROM_LOAD( "main_6a", 0xf000, 0x1000, CRC(515b1046) SHA1(bdcccd4e415c00ee8e5ec185597df75ecafe7d3d) ) | |
| 1175 | 1175 | |
| 1176 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) /* 32k for audio */ | |
| 1177 | ROM_LOAD( "audio_5a", 0x6800, 0x0800, CRC(90e3c781) SHA1(d51a9e011167a132e8af9f4b1201600a58e86b62) ) | |
| 1178 | ROM_LOAD( "audio_6a", 0x7000, 0x0800, CRC(dd343e34) SHA1(4ec55bb73d6afbd167fa91d2606d1d55a15b5c39) ) | |
| 1179 | ROM_LOAD( "audio_7a", 0x7800, 0x0800, CRC(e02b4356) SHA1(9891e14d84221c1d6f2d15a29813eb41024290ca) ) | |
| 1176 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1177 | ROM_LOAD( "audio_5a", 0x6800, 0x0800, CRC(90e3c781) SHA1(d51a9e011167a132e8af9f4b1201600a58e86b62) ) | |
| 1178 | ROM_LOAD( "audio_6a", 0x7000, 0x0800, CRC(dd343e34) SHA1(4ec55bb73d6afbd167fa91d2606d1d55a15b5c39) ) | |
| 1179 | ROM_LOAD( "audio_7a", 0x7800, 0x0800, CRC(e02b4356) SHA1(9891e14d84221c1d6f2d15a29813eb41024290ca) ) | |
| 1180 | 1180 | |
| 1181 | 1181 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1182 | ROM_LOAD( "main_11d", | |
| 1182 | ROM_LOAD( "main_11d", | |
| 1183 | 1183 | ROM_END |
| 1184 | 1184 | |
| 1185 | 1185 | |
| 1186 | 1186 | ROM_START( hardhat ) |
| 1187 | 1187 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1188 | ROM_LOAD( "hhl-2.11a", 0xa000, 0x1000, CRC(7623deea) SHA1(3c47c0439c80e66536af42c5ee4e522fea5f8374) ) | |
| 1189 | ROM_LOAD( "hhl-2.10a", 0xb000, 0x1000, CRC(e6bf2fb1) SHA1(ad41859129774fc51462726a825c0ae16ed81a6e) ) | |
| 1190 | ROM_LOAD( "hhl-2.9a", 0xc000, 0x1000, CRC(acc2bce5) SHA1(0f7b8cfbd2628b8587c423fbc2c8310d71d8ad2a) ) | |
| 1191 | ROM_LOAD( "hhl-2.8a", 0xd000, 0x1000, CRC(23c7a2f8) SHA1(5eb1d512d73ba6bd1c23501664b582e9d3cf777f) ) | |
| 1192 | ROM_LOAD( "hhl-2.7a", 0xe000, 0x1000, CRC(6f7ce1c2) SHA1(356dcea22e50c95a8552566a0fb5f9b4e3e5de2a) ) | |
| 1193 | ROM_LOAD( "hhl-2.6a", 0xf000, 0x1000, CRC(2a20cf10) SHA1(31eb4556647e78e3d9be1c30d970eac8aaa5cf18) ) | |
| 1188 | ROM_LOAD( "hhl-2.11a", 0xa000, 0x1000, CRC(7623deea) SHA1(3c47c0439c80e66536af42c5ee4e522fea5f8374) ) | |
| 1189 | ROM_LOAD( "hhl-2.10a", 0xb000, 0x1000, CRC(e6bf2fb1) SHA1(ad41859129774fc51462726a825c0ae16ed81a6e) ) | |
| 1190 | ROM_LOAD( "hhl-2.9a", 0xc000, 0x1000, CRC(acc2bce5) SHA1(0f7b8cfbd2628b8587c423fbc2c8310d71d8ad2a) ) | |
| 1191 | ROM_LOAD( "hhl-2.8a", 0xd000, 0x1000, CRC(23c7a2f8) SHA1(5eb1d512d73ba6bd1c23501664b582e9d3cf777f) ) | |
| 1192 | ROM_LOAD( "hhl-2.7a", 0xe000, 0x1000, CRC(6f7ce1c2) SHA1(356dcea22e50c95a8552566a0fb5f9b4e3e5de2a) ) | |
| 1193 | ROM_LOAD( "hhl-2.6a", 0xf000, 0x1000, CRC(2a20cf10) SHA1(31eb4556647e78e3d9be1c30d970eac8aaa5cf18) ) | |
| 1194 | 1194 | |
| 1195 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) /* 32k for audio */ | |
| 1196 | ROM_LOAD( "hha-1.5a", 0x6800, 0x0800, CRC(16a5a183) SHA1(cf3fed55db9c61fd33c222275d472fa109bed081) ) | |
| 1197 | ROM_LOAD( "hha-1.6a", 0x7000, 0x0800, CRC(bde64021) SHA1(a403590d5a27b859eaa299e47df4ebd6ce4a5772) ) | |
| 1198 | ROM_LOAD( "hha-1.7a", 0x7800, 0x0800, CRC(505ee5d3) SHA1(efa228465688f2bb30f00dc1511cc5f3a287356c) ) | |
| 1195 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1196 | ROM_LOAD( "hha-1.5a", 0x6800, 0x0800, CRC(16a5a183) SHA1(cf3fed55db9c61fd33c222275d472fa109bed081) ) | |
| 1197 | ROM_LOAD( "hha-1.6a", 0x7000, 0x0800, CRC(bde64021) SHA1(a403590d5a27b859eaa299e47df4ebd6ce4a5772) ) | |
| 1198 | ROM_LOAD( "hha-1.7a", 0x7800, 0x0800, CRC(505ee5d3) SHA1(efa228465688f2bb30f00dc1511cc5f3a287356c) ) | |
| 1199 | 1199 | |
| 1200 | 1200 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1201 | ROM_LOAD( "hhl-1.11d", | |
| 1201 | ROM_LOAD( "hhl-1.11d", | |
| 1202 | 1202 | ROM_END |
| 1203 | 1203 | |
| 1204 | 1204 | |
| 1205 | 1205 | ROM_START( teetert ) |
| 1206 | 1206 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1207 | ROM_LOAD( "13a-cpu", 0x8000, 0x1000, CRC(f4e4d991) SHA1(6683c1552b56b20f2296e461aff697af73563792) ) | |
| 1208 | ROM_LOAD( "12a-cpu", 0x9000, 0x1000, CRC(c6d8cb04) SHA1(3b9ae8fdc35117c73c91daed66e93e5344bdcd7e) ) | |
| 1209 | ROM_LOAD( "11a-cpu", 0xa000, 0x1000, CRC(bac9b259) SHA1(0265cbd683fadf42f8a6b71958cbe782a732c257) ) | |
| 1210 | ROM_LOAD( "10a-cpu", 0xb000, 0x1000, CRC(3ae7e445) SHA1(e511ce4c553ac58e87b6ee623f8c42d7653de972) ) | |
| 1211 | ROM_LOAD( "9a-cpu", 0xc000, 0x1000, CRC(0cba424d) SHA1(54377163a8b8082639baf56b960eb26268462d46) ) | |
| 1212 | ROM_LOAD( "8a-cpu", 0xd000, 0x1000, CRC(68de66e7) SHA1(70a0cc950f16f2c408fae717e6fdb75eb0fd8039) ) | |
| 1213 | ROM_LOAD( "7a-cpu", 0xe000, 0x1000, CRC(84491333) SHA1(db9f8e4c49057a4574a3784d71e627da7f7a4b44) ) | |
| 1214 | ROM_LOAD( "6a-cpu", 0xf000, 0x1000, CRC(3600d465) SHA1(84d633e042f73bfd6bf4a4d0ffee1cd2027c65d2) ) | |
| 1207 | ROM_LOAD( "13a-cpu", 0x8000, 0x1000, CRC(f4e4d991) SHA1(6683c1552b56b20f2296e461aff697af73563792) ) | |
| 1208 | ROM_LOAD( "12a-cpu", 0x9000, 0x1000, CRC(c6d8cb04) SHA1(3b9ae8fdc35117c73c91daed66e93e5344bdcd7e) ) | |
| 1209 | ROM_LOAD( "11a-cpu", 0xa000, 0x1000, CRC(bac9b259) SHA1(0265cbd683fadf42f8a6b71958cbe782a732c257) ) | |
| 1210 | ROM_LOAD( "10a-cpu", 0xb000, 0x1000, CRC(3ae7e445) SHA1(e511ce4c553ac58e87b6ee623f8c42d7653de972) ) | |
| 1211 | ROM_LOAD( "9a-cpu", 0xc000, 0x1000, CRC(0cba424d) SHA1(54377163a8b8082639baf56b960eb26268462d46) ) | |
| 1212 | ROM_LOAD( "8a-cpu", 0xd000, 0x1000, CRC(68de66e7) SHA1(70a0cc950f16f2c408fae717e6fdb75eb0fd8039) ) | |
| 1213 | ROM_LOAD( "7a-cpu", 0xe000, 0x1000, CRC(84491333) SHA1(db9f8e4c49057a4574a3784d71e627da7f7a4b44) ) | |
| 1214 | ROM_LOAD( "6a-cpu", 0xf000, 0x1000, CRC(3600d465) SHA1(84d633e042f73bfd6bf4a4d0ffee1cd2027c65d2) ) | |
| 1215 | 1215 | |
| 1216 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) /* 32k for audio */ | |
| 1217 | ROM_LOAD( "3a-ac", 0x5800, 0x0800, CRC(83b8836f) SHA1(ec0e2de62caea61ceff56e924449213997bff8cd) ) | |
| 1218 | ROM_LOAD( "4a-ac", 0x6000, 0x0800, CRC(5154c39e) SHA1(e6f011630eb1aa4116a0e5824ad6b65c1be2455f) ) | |
| 1219 | ROM_LOAD( "5a-ac", 0x6800, 0x0800, CRC(1e1e3916) SHA1(867e586583e07cd01e0e852f6ea52a040995725d) ) | |
| 1220 | ROM_LOAD( "6a-ac", 0x7000, 0x0800, CRC(80f3357a) SHA1(f1ee638251e8676a526e6367c11866b1d52f5910) ) | |
| 1221 | ROM_LOAD( "7a-ac", 0x7800, 0x0800, CRC(466addc7) SHA1(0230b5365d6aeee3ca47666a9eadee4141de125b) ) | |
| 1216 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1217 | ROM_LOAD( "3a-ac", 0x5800, 0x0800, CRC(83b8836f) SHA1(ec0e2de62caea61ceff56e924449213997bff8cd) ) | |
| 1218 | ROM_LOAD( "4a-ac", 0x6000, 0x0800, CRC(5154c39e) SHA1(e6f011630eb1aa4116a0e5824ad6b65c1be2455f) ) | |
| 1219 | ROM_LOAD( "5a-ac", 0x6800, 0x0800, CRC(1e1e3916) SHA1(867e586583e07cd01e0e852f6ea52a040995725d) ) | |
| 1220 | ROM_LOAD( "6a-ac", 0x7000, 0x0800, CRC(80f3357a) SHA1(f1ee638251e8676a526e6367c11866b1d52f5910) ) | |
| 1221 | ROM_LOAD( "7a-ac", 0x7800, 0x0800, CRC(466addc7) SHA1(0230b5365d6aeee3ca47666a9eadee4141de125b) ) | |
| 1222 | 1222 | |
| 1223 | 1223 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1224 | ROM_LOAD( "11d-cpu", | |
| 1224 | ROM_LOAD( "11d-cpu", | |
| 1225 | 1225 | ROM_END |
| 1226 | 1226 | |
| 1227 | 1227 | |
| 1228 | 1228 | ROM_START( fax ) |
| 1229 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 64k for code + 192k for extra memory */ | |
| 1230 | ROM_LOAD( "fxl8-13a.32", 0x8000, 0x1000, CRC(8e30bf6b) SHA1(1fdf010da0258bc038554cf33c26e539a1f6b648) ) | |
| 1231 | ROM_LOAD( "fxl8-12a.32", 0x9000, 0x1000, CRC(60a41ff1) SHA1(1703dbedd09354d89c6014644d0ffe13ec657b8b) ) | |
| 1232 | ROM_LOAD( "fxl8-11a.32", 0xa000, 0x1000, CRC(2c9cee8a) SHA1(169045b4d840730cfbaa0b9a8a8d82907ea09d0c) ) | |
| 1233 | ROM_LOAD( "fxl8-10a.32", 0xb000, 0x1000, CRC(9b03938f) SHA1(af4c27b06a1f1be917316910b88d026b67cc60c0) ) | |
| 1234 | ROM_LOAD( "fxl8-9a.32", 0xc000, 0x1000, CRC(fb869f62) SHA1(cea6ff423c60662a1b36e9565940432707d5299b) ) | |
| 1235 | ROM_LOAD( "fxl8-8a.32", 0xd000, 0x1000, CRC(db3470bc) SHA1(7786f84ab41765ea91ab241d14a207044eda0e93) ) | |
| 1236 | ROM_LOAD( "fxl8-7a.32", 0xe000, 0x1000, CRC(1471fef5) SHA1(89308f3c2a0d7ea699e99622d37c5c95e3eaaf95) ) | |
| 1237 | ROM_LOAD( "fxl8-6a.32", 0xf000, 0x1000, CRC(812e39f3) SHA1(41c99f8483c69617f9c8dd82f979630ea9190454) ) | |
| 1229 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) | |
| 1230 | ROM_LOAD( "fxl8-13a.32", 0x08000, 0x1000, CRC(8e30bf6b) SHA1(1fdf010da0258bc038554cf33c26e539a1f6b648) ) | |
| 1231 | ROM_LOAD( "fxl8-12a.32", 0x09000, 0x1000, CRC(60a41ff1) SHA1(1703dbedd09354d89c6014644d0ffe13ec657b8b) ) | |
| 1232 | ROM_LOAD( "fxl8-11a.32", 0x0a000, 0x1000, CRC(2c9cee8a) SHA1(169045b4d840730cfbaa0b9a8a8d82907ea09d0c) ) | |
| 1233 | ROM_LOAD( "fxl8-10a.32", 0x0b000, 0x1000, CRC(9b03938f) SHA1(af4c27b06a1f1be917316910b88d026b67cc60c0) ) | |
| 1234 | ROM_LOAD( "fxl8-9a.32", 0x0c000, 0x1000, CRC(fb869f62) SHA1(cea6ff423c60662a1b36e9565940432707d5299b) ) | |
| 1235 | ROM_LOAD( "fxl8-8a.32", 0x0d000, 0x1000, CRC(db3470bc) SHA1(7786f84ab41765ea91ab241d14a207044eda0e93) ) | |
| 1236 | ROM_LOAD( "fxl8-7a.32", 0x0e000, 0x1000, CRC(1471fef5) SHA1(89308f3c2a0d7ea699e99622d37c5c95e3eaaf95) ) | |
| 1237 | ROM_LOAD( "fxl8-6a.32", 0x0f000, 0x1000, CRC(812e39f3) SHA1(41c99f8483c69617f9c8dd82f979630ea9190454) ) | |
| 1238 | 1238 | /* Banks of question ROMs */ |
| 1239 | ROM_LOAD( "fxd-1c.64", 0x10000, 0x2000, CRC(fd7e3137) SHA1(6fda53737cd7c886c66c60436ae3ed5c62e6b178) ) | |
| 1240 | ROM_LOAD( "fxd-2c.64", 0x12000, 0x2000, CRC(e78cb16f) SHA1(d58dfa2385368ccf00ecfbaeccaf5ba82ef7da9b) ) | |
| 1241 | ROM_LOAD( "fxd-3c.64", 0x14000, 0x2000, CRC(57a94c6f) SHA1(fc27fe805c4cc29f797bfc0e4cd13a570ac5c1ec) ) | |
| 1242 | ROM_LOAD( "fxd-4c.64", 0x16000, 0x2000, CRC(9036c5a2) SHA1(b7a01e4002f615702cb691764cfae93707bf3c0f) ) | |
| 1243 | ROM_LOAD( "fxd-5c.64", 0x18000, 0x2000, CRC(38c03405) SHA1(c490252825dc3c4bf91255c7cb70a5ead92de85b) ) | |
| 1244 | ROM_LOAD( "fxd-6c.64", 0x1a000, 0x2000, CRC(f48fc308) SHA1(bfaf43e57a4d92b593d51d8cd61fe4d5c06e836c) ) | |
| 1245 | ROM_LOAD( "fxd-7c.64", 0x1c000, 0x2000, CRC(cf93b924) SHA1(892e6e6aa33bbcd271f5e0a63c1e8393df62f360) ) | |
| 1246 | ROM_LOAD( "fxd-8c.64", 0x1e000, 0x2000, CRC(607b48da) SHA1(6c8f2f207f3dd936c529b86cef917a0f0699a21c) ) | |
| 1247 | ROM_LOAD( "fxd-1b.64", 0x20000, 0x2000, CRC(62872d4f) SHA1(c020fdeae6c2e7d04c16048fdaa99ecf3e40af31) ) | |
| 1248 | ROM_LOAD( "fxd-2b.64", 0x22000, 0x2000, CRC(625778d0) SHA1(6c8d6b50653bff3774f5ccef0e000a2ef3f7030c) ) | |
| 1249 | ROM_LOAD( "fxd-3b.64", 0x24000, 0x2000, CRC(c3473dee) SHA1(8675f9b93bbbae4f5a5682c5b1623afeeacc0a4b) ) | |
| 1250 | ROM_LOAD( "fxd-4b.64", 0x26000, 0x2000, CRC(e39a15f5) SHA1(43b04cc2e4750b649116ade5b1004c2580293134) ) | |
| 1251 | ROM_LOAD( "fxd-5b.64", 0x28000, 0x2000, CRC(101a9d70) SHA1(2b839cd707e03b0e50037e1ffabcb8fe375dc4c0) ) | |
| 1252 | ROM_LOAD( "fxd-6b.64", 0x2a000, 0x2000, CRC(374a8f05) SHA1(ec41470932823242fff36ab6e6f158fa5c07d0a8) ) | |
| 1253 | ROM_LOAD( "fxd-7b.64", 0x2c000, 0x2000, CRC(f7e7f824) SHA1(1bed1ee07032b25675ace612a883cba4ab4b2f77) ) | |
| 1254 | ROM_LOAD( "fxd-8b.64", 0x2e000, 0x2000, CRC(8f1a5287) SHA1(a1102d49bacb25887eaa67ae64bcf64c8cad94fe) ) | |
| 1255 | ROM_LOAD( "fxd-1a.64", 0x30000, 0x2000, CRC(fc5e6344) SHA1(c61aad5100819f2fe98c3a159b64739fa6322d09) ) | |
| 1256 | ROM_LOAD( "fxd-2a.64", 0x32000, 0x2000, CRC(43cf60b3) SHA1(5169196d0a95450801b3a57703cb9f2861a25948) ) | |
| 1257 | ROM_LOAD( "fxd-3a.64", 0x34000, 0x2000, CRC(6b7d29cb) SHA1(fd4006efd24b33f8e2baf7f97d4b776d5ef90959) ) | |
| 1258 | ROM_LOAD( "fxd-4a.64", 0x36000, 0x2000, CRC(b9de3c2d) SHA1(229f9f0762d4d659acf516c2c1a42e70d2f98652) ) | |
| 1259 | ROM_LOAD( "fxd-5a.64", 0x38000, 0x2000, CRC(67285bc6) SHA1(f929c916fb19dbc91fc3a75dfed6375b63cb2043) ) | |
| 1260 | ROM_LOAD( "fxd-6a.64", 0x3a000, 0x2000, CRC(ba67b7b2) SHA1(12265f678b1e4dfc3b36a964f78b0103112753ee) ) | |
| 1239 | ROM_LOAD( "fxd-1c.64", 0x10000, 0x2000, CRC(fd7e3137) SHA1(6fda53737cd7c886c66c60436ae3ed5c62e6b178) ) | |
| 1240 | ROM_LOAD( "fxd-2c.64", 0x12000, 0x2000, CRC(e78cb16f) SHA1(d58dfa2385368ccf00ecfbaeccaf5ba82ef7da9b) ) | |
| 1241 | ROM_LOAD( "fxd-3c.64", 0x14000, 0x2000, CRC(57a94c6f) SHA1(fc27fe805c4cc29f797bfc0e4cd13a570ac5c1ec) ) | |
| 1242 | ROM_LOAD( "fxd-4c.64", 0x16000, 0x2000, CRC(9036c5a2) SHA1(b7a01e4002f615702cb691764cfae93707bf3c0f) ) | |
| 1243 | ROM_LOAD( "fxd-5c.64", 0x18000, 0x2000, CRC(38c03405) SHA1(c490252825dc3c4bf91255c7cb70a5ead92de85b) ) | |
| 1244 | ROM_LOAD( "fxd-6c.64", 0x1a000, 0x2000, CRC(f48fc308) SHA1(bfaf43e57a4d92b593d51d8cd61fe4d5c06e836c) ) | |
| 1245 | ROM_LOAD( "fxd-7c.64", 0x1c000, 0x2000, CRC(cf93b924) SHA1(892e6e6aa33bbcd271f5e0a63c1e8393df62f360) ) | |
| 1246 | ROM_LOAD( "fxd-8c.64", 0x1e000, 0x2000, CRC(607b48da) SHA1(6c8f2f207f3dd936c529b86cef917a0f0699a21c) ) | |
| 1247 | ROM_LOAD( "fxd-1b.64", 0x20000, 0x2000, CRC(62872d4f) SHA1(c020fdeae6c2e7d04c16048fdaa99ecf3e40af31) ) | |
| 1248 | ROM_LOAD( "fxd-2b.64", 0x22000, 0x2000, CRC(625778d0) SHA1(6c8d6b50653bff3774f5ccef0e000a2ef3f7030c) ) | |
| 1249 | ROM_LOAD( "fxd-3b.64", 0x24000, 0x2000, CRC(c3473dee) SHA1(8675f9b93bbbae4f5a5682c5b1623afeeacc0a4b) ) | |
| 1250 | ROM_LOAD( "fxd-4b.64", 0x26000, 0x2000, CRC(e39a15f5) SHA1(43b04cc2e4750b649116ade5b1004c2580293134) ) | |
| 1251 | ROM_LOAD( "fxd-5b.64", 0x28000, 0x2000, CRC(101a9d70) SHA1(2b839cd707e03b0e50037e1ffabcb8fe375dc4c0) ) | |
| 1252 | ROM_LOAD( "fxd-6b.64", 0x2a000, 0x2000, CRC(374a8f05) SHA1(ec41470932823242fff36ab6e6f158fa5c07d0a8) ) | |
| 1253 | ROM_LOAD( "fxd-7b.64", 0x2c000, 0x2000, CRC(f7e7f824) SHA1(1bed1ee07032b25675ace612a883cba4ab4b2f77) ) | |
| 1254 | ROM_LOAD( "fxd-8b.64", 0x2e000, 0x2000, CRC(8f1a5287) SHA1(a1102d49bacb25887eaa67ae64bcf64c8cad94fe) ) | |
| 1255 | ROM_LOAD( "fxd-1a.64", 0x30000, 0x2000, CRC(fc5e6344) SHA1(c61aad5100819f2fe98c3a159b64739fa6322d09) ) | |
| 1256 | ROM_LOAD( "fxd-2a.64", 0x32000, 0x2000, CRC(43cf60b3) SHA1(5169196d0a95450801b3a57703cb9f2861a25948) ) | |
| 1257 | ROM_LOAD( "fxd-3a.64", 0x34000, 0x2000, CRC(6b7d29cb) SHA1(fd4006efd24b33f8e2baf7f97d4b776d5ef90959) ) | |
| 1258 | ROM_LOAD( "fxd-4a.64", 0x36000, 0x2000, CRC(b9de3c2d) SHA1(229f9f0762d4d659acf516c2c1a42e70d2f98652) ) | |
| 1259 | ROM_LOAD( "fxd-5a.64", 0x38000, 0x2000, CRC(67285bc6) SHA1(f929c916fb19dbc91fc3a75dfed6375b63cb2043) ) | |
| 1260 | ROM_LOAD( "fxd-6a.64", 0x3a000, 0x2000, CRC(ba67b7b2) SHA1(12265f678b1e4dfc3b36a964f78b0103112753ee) ) | |
| 1261 | 1261 | /* The last two ROM sockets were apparently never populated */ |
| 1262 | // ROM_LOAD( "fxd-7a.64", 0x3c000, 0x2000, NO_DUMP ) | |
| 1263 | // ROM_LOAD( "fxd-8a.64", 0x3e000, 0x2000, NO_DUMP ) | |
| 1262 | // ROM_LOAD( "fxd-7a.64", 0x3c000, 0x2000, NO_DUMP ) | |
| 1263 | // ROM_LOAD( "fxd-8a.64", 0x3e000, 0x2000, NO_DUMP ) | |
| 1264 | 1264 | |
| 1265 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1265 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1266 | 1266 | ROM_LOAD( "fxa2-5a.16", 0x6800, 0x0800, CRC(7c525aec) SHA1(f3afd3bfc0ba4265106e6ca217d113d23ad66016) ) |
| 1267 | 1267 | ROM_LOAD( "fxa2-6a.16", 0x7000, 0x0800, CRC(2b3bfc44) SHA1(7e3b9133916c8121b2145942155601b3ade420da) ) |
| 1268 | 1268 | ROM_LOAD( "fxa2-7a.16", 0x7800, 0x0800, CRC(578c62b7) SHA1(1bcb987e8730c001b7339c3dfab2467bf76421c7) ) |
| r1527 | r1528 | |
| 1271 | 1271 | ROM_LOAD( "fxl1-11d.32", 0x0000, 0x0800, CRC(62083db2) SHA1(0c6e90b73419bff53f991e66d4faa9495c7d8e09) ) |
| 1272 | 1272 | ROM_END |
| 1273 | 1273 | |
| 1274 | ||
| 1274 | 1275 | ROM_START( fax2 ) |
| 1275 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 64k for code + 192k for extra memory */ | |
| 1276 | ROM_LOAD( "fxl8-13a.32", 0x8000, 0x1000, CRC(8e30bf6b) SHA1(1fdf010da0258bc038554cf33c26e539a1f6b648) ) | |
| 1277 | ROM_LOAD( "fxl8-12a.32", 0x9000, 0x1000, CRC(60a41ff1) SHA1(1703dbedd09354d89c6014644d0ffe13ec657b8b) ) | |
| 1278 | ROM_LOAD( "fxl8-11a.32", 0xA000, 0x1000, CRC(2c9cee8a) SHA1(169045b4d840730cfbaa0b9a8a8d82907ea09d0c) ) | |
| 1279 | ROM_LOAD( "fxl8-10a.32", 0xB000, 0x1000, CRC(9b03938f) SHA1(af4c27b06a1f1be917316910b88d026b67cc60c0) ) | |
| 1280 | ROM_LOAD( "fxl8-9a.32", 0xC000, 0x1000, CRC(fb869f62) SHA1(cea6ff423c60662a1b36e9565940432707d5299b) ) | |
| 1281 | ROM_LOAD( "fxl8-8a.32", 0xD000, 0x1000, CRC(db3470bc) SHA1(7786f84ab41765ea91ab241d14a207044eda0e93) ) | |
| 1282 | ROM_LOAD( "fxl8-7a.32", 0xE000, 0x1000, CRC(1471fef5) SHA1(89308f3c2a0d7ea699e99622d37c5c95e3eaaf95) ) | |
| 1283 | ROM_LOAD( "fxl8-6a.32", 0xF000, 0x1000, CRC(812e39f3) SHA1(41c99f8483c69617f9c8dd82f979630ea9190454) ) | |
| 1276 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) | |
| 1277 | ROM_LOAD( "fxl8-13a.32", 0x08000, 0x1000, CRC(8e30bf6b) SHA1(1fdf010da0258bc038554cf33c26e539a1f6b648) ) | |
| 1278 | ROM_LOAD( "fxl8-12a.32", 0x09000, 0x1000, CRC(60a41ff1) SHA1(1703dbedd09354d89c6014644d0ffe13ec657b8b) ) | |
| 1279 | ROM_LOAD( "fxl8-11a.32", 0x0a000, 0x1000, CRC(2c9cee8a) SHA1(169045b4d840730cfbaa0b9a8a8d82907ea09d0c) ) | |
| 1280 | ROM_LOAD( "fxl8-10a.32", 0x0b000, 0x1000, CRC(9b03938f) SHA1(af4c27b06a1f1be917316910b88d026b67cc60c0) ) | |
| 1281 | ROM_LOAD( "fxl8-9a.32", 0x0c000, 0x1000, CRC(fb869f62) SHA1(cea6ff423c60662a1b36e9565940432707d5299b) ) | |
| 1282 | ROM_LOAD( "fxl8-8a.32", 0x0d000, 0x1000, CRC(db3470bc) SHA1(7786f84ab41765ea91ab241d14a207044eda0e93) ) | |
| 1283 | ROM_LOAD( "fxl8-7a.32", 0x0e000, 0x1000, CRC(1471fef5) SHA1(89308f3c2a0d7ea699e99622d37c5c95e3eaaf95) ) | |
| 1284 | ROM_LOAD( "fxl8-6a.32", 0x0f000, 0x1000, CRC(812e39f3) SHA1(41c99f8483c69617f9c8dd82f979630ea9190454) ) | |
| 1284 | 1285 | /* Banks of question ROMs */ |
| 1285 | 1286 | ROM_LOAD( "fxdb1-1c.bin", 0x10000, 0x2000, CRC(0e42a2a4) SHA1(f7021aad36b49338cdaae8e13638dbdd12327afc) ) |
| 1286 | 1287 | ROM_LOAD( "fxdb1-2c.bin", 0x12000, 0x2000, CRC(cef8d49a) SHA1(a3005ab21add22ffb4c6f4cb9843db8964fef49c) ) |
| r1527 | r1528 | |
| 1307 | 1308 | ROM_LOAD( "fxdb1-7a.bin", 0x3c000, 0x2000, CRC(0f97b874) SHA1(5790d3ed9eed2ce05947bc28cc252f720a7f3aeb) ) |
| 1308 | 1309 | ROM_LOAD( "fxdb1-8a.bin", 0x3e000, 0x2000, CRC(1d055bea) SHA1(96531db0a3a36319bc0a28096e601302eb2eb115) ) |
| 1309 | 1310 | |
| 1310 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) /* 32k for audio */ | |
| 1311 | ROM_LOAD( "fxa2-5a.16", 0x6800, 0x0800, CRC(7c525aec) SHA1(f3afd3bfc0ba4265106e6ca217d113d23ad66016) ) | |
| 1312 | ROM_LOAD( "fxa2-6a.16", 0x7000, 0x0800, CRC(2b3bfc44) SHA1(7e3b9133916c8121b2145942155601b3ade420da) ) | |
| 1313 | ROM_LOAD( "fxa2-7a.16", 0x7800, 0x0800, CRC(578c62b7) SHA1(1bcb987e8730c001b7339c3dfab2467bf76421c7) ) | |
| 1311 | ROM_REGION( 0x8000, REGION_CPU2, 0 ) | |
| 1312 | ROM_LOAD( "fxa2-5a.16", 0x6800, 0x0800, CRC(7c525aec) SHA1(f3afd3bfc0ba4265106e6ca217d113d23ad66016) ) | |
| 1313 | ROM_LOAD( "fxa2-6a.16", 0x7000, 0x0800, CRC(2b3bfc44) SHA1(7e3b9133916c8121b2145942155601b3ade420da) ) | |
| 1314 | ROM_LOAD( "fxa2-7a.16", 0x7800, 0x0800, CRC(578c62b7) SHA1(1bcb987e8730c001b7339c3dfab2467bf76421c7) ) | |
| 1314 | 1315 | |
| 1315 | 1316 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1316 | ROM_LOAD( "fxl1-11d.32", 0x0000, 0x0800, CRC(62083db2) SHA1(0c6e90b73419bff53f991e66d4faa9495c7d8e09) ) | |
| 1317 | ROM_LOAD( "fxl1-11d.32", 0x0000, 0x0800, CRC(62083db2) SHA1(0c6e90b73419bff53f991e66d4faa9495c7d8e09) ) | |
| 1317 | 1318 | ROM_END |
| 1318 | 1319 | |
| 1319 | 1320 | |
| r1527 | r1528 | |
| 1327 | 1328 | static DRIVER_INIT( sidetrac ) |
| 1328 | 1329 | { |
| 1329 | 1330 | exidy_video_config(0x00, 0x00, FALSE); |
| 1330 | targ_spec_flag = 0; | |
| 1331 | 1331 | |
| 1332 | 1332 | /* hard-coded palette controlled via 8x3 DIP switches on the board */ |
| 1333 | 1333 | exidy_color_latch[2] = 0xf8; |
| r1527 | r1528 | |
| 1339 | 1339 | static DRIVER_INIT( targ ) |
| 1340 | 1340 | { |
| 1341 | 1341 | exidy_video_config(0x00, 0x00, FALSE); |
| 1342 | targ_spec_flag = 1; | |
| 1343 | 1342 | |
| 1344 | 1343 | /* hard-coded palette controlled via 8x3 DIP switches on the board */ |
| 1345 | 1344 | exidy_color_latch[2] = 0x5c; |
| r1527 | r1528 | |
| 1351 | 1350 | static DRIVER_INIT( spectar ) |
| 1352 | 1351 | { |
| 1353 | 1352 | exidy_video_config(0x00, 0x00, FALSE); |
| 1354 | targ_spec_flag = 0; | |
| 1355 | 1353 | |
| 1356 | 1354 | /* hard-coded palette controlled via 8x3 DIP switches on the board */ |
| 1357 | 1355 | exidy_color_latch[2] = 0x58; |
| r1527 | r1528 | |
| 1362 | 1360 | static DRIVER_INIT( rallys ) |
| 1363 | 1361 | { |
| 1364 | 1362 | exidy_video_config(0x00, 0x00, FALSE); |
| 1365 | targ_spec_flag = 0; | |
| 1366 | 1363 | |
| 1367 | 1364 | /* hard-coded palette controlled via 8x3 DIP switches on the board */ |
| 1368 | 1365 | exidy_color_latch[2] = 0x58; |
| 1369 | 1366 | exidy_color_latch[1] = 0xee; |
| 1370 | 1367 | exidy_color_latch[0] = 0x09; |
| 1371 | ||
| 1372 | /* sprite locations are slightly different */ | |
| 1373 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5000, 0x5000, 0, 0, exidy_sprite1_xpos_w); | |
| 1374 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5001, 0x5001, 0, 0, exidy_sprite1_ypos_w); | |
| 1375 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5300, 0x5300, 0, 0, exidy_sprite2_xpos_w); | |
| 1376 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5301, 0x5301, 0, 0, exidy_sprite2_ypos_w); | |
| 1377 | 1368 | } |
| 1378 | 1369 | |
| 1379 | 1370 | static DRIVER_INIT( phantoma ) |
| 1380 | 1371 | { |
| 1381 | 1372 | exidy_video_config(0x00, 0x00, FALSE); |
| 1382 | targ_spec_flag = 0; | |
| 1383 | 1373 | |
| 1384 | 1374 | /* hard-coded palette controlled via 8x3 DIP switches on the board */ |
| 1385 | 1375 | exidy_color_latch[2] = 0x58; |
| 1386 | 1376 | exidy_color_latch[1] = 0xee; |
| 1387 | 1377 | exidy_color_latch[0] = 0x09; |
| 1388 | 1378 | |
| 1389 | /* sprite locations are slightly different */ | |
| 1390 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5000, 0x5000, 0, 0, exidy_sprite1_xpos_w); | |
| 1391 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5001, 0x5001, 0, 0, exidy_sprite1_ypos_w); | |
| 1392 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5300, 0x5300, 0, 0, exidy_sprite2_xpos_w); | |
| 1393 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5301, 0x5301, 0, 0, exidy_sprite2_ypos_w); | |
| 1394 | ||
| 1395 | 1379 | /* the ROM is actually mapped high */ |
| 1396 | 1380 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0xf800, 0xffff, 0, 0, MRA8_BANK1); |
| 1397 | 1381 | memory_set_bankptr(1, memory_region(REGION_CPU1) + 0xf800); |
| r1527 | r1528 | |
| 1401 | 1385 | static DRIVER_INIT( mtrap ) |
| 1402 | 1386 | { |
| 1403 | 1387 | exidy_video_config(0x14, 0x00, FALSE); |
| 1404 | targ_spec_flag = 0; | |
| 1405 | 1388 | } |
| 1406 | 1389 | |
| 1407 | 1390 | |
| 1408 | 1391 | static DRIVER_INIT( venture ) |
| 1409 | 1392 | { |
| 1410 | 1393 | exidy_video_config(0x04, 0x04, FALSE); |
| 1411 | targ_spec_flag = 0; | |
| 1412 | 1394 | } |
| 1413 | 1395 | |
| 1414 | 1396 | |
| 1415 | 1397 | static DRIVER_INIT( teetert ) |
| 1416 | 1398 | { |
| 1417 | 1399 | exidy_video_config(0x0c, 0x0c, FALSE); |
| 1418 | targ_spec_flag = 0; | |
| 1419 | ||
| 1420 | /* special input handler for the dial */ | |
| 1421 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5101, 0x5101, 0, 0, teetert_input_r); | |
| 1422 | 1400 | } |
| 1423 | 1401 | |
| 1424 | 1402 | |
| 1425 | 1403 | static DRIVER_INIT( pepper2 ) |
| 1426 | 1404 | { |
| 1427 | 1405 | exidy_video_config(0x14, 0x04, TRUE); |
| 1428 | targ_spec_flag = 0; | |
| 1429 | ||
| 1430 | /* two 6116 character RAMs */ | |
| 1431 | exidy_characterram = memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x6000, 0x6fff, 0, 0, MRA8_RAM); | |
| 1432 | exidy_characterram = memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x6000, 0x6fff, 0, 0, MWA8_RAM); | |
| 1433 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x4fff, 0, 0, MRA8_NOP); | |
| 1434 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x4fff, 0, 0, MWA8_NOP); | |
| 1435 | 1406 | } |
| 1436 | 1407 | |
| 1437 | 1408 | |
| 1438 | 1409 | static DRIVER_INIT( fax ) |
| 1439 | 1410 | { |
| 1440 | 1411 | exidy_video_config(0x04, 0x04, TRUE); |
| 1441 | targ_spec_flag = 0; | |
| 1442 | 1412 | |
| 1443 | 1413 | /* reset the ROM bank */ |
| 1444 | 1414 | fax_bank_select_w(0,0); |
| r1527 | r1528 | |
| 1452 | 1422 | * |
| 1453 | 1423 | *************************************/ |
| 1454 | 1424 | |
| 1455 | GAME( 1979, sidetrac, 0, sidetrac, sidetrac, sidetrac, ROT0, "Exidy", "Side Trak", 0 ) | |
| 1425 | GAME( 1979, sidetrac, 0, sidetrac, sidetrac, sidetrac, ROT0, "Exidy", "Side Track", 0 ) | |
| 1456 | 1426 | GAME( 1980, targ, 0, targ, targ, targ, ROT0, "Exidy", "Targ", 0 ) |
| 1457 | 1427 | GAME( 1980, targc, targ, targ, targ, targ, ROT0, "Exidy", "Targ (cocktail?)", 0 ) |
| 1458 | GAME( 1980, spectar, 0, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 3)", 0 ) | |
| 1459 | GAME( 1980, spectar1, spectar, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 1?)", 0 ) | |
| 1460 | GAME( 1980, rallys, spectar, targ, rallys, rallys, ROT0, "Novar", "Rallys (bootleg?)", 0 ) | |
| 1461 | GAME( 1980, phantoma, spectar, targ, phantoma, phantoma, ROT0, "Jeutel","Phantomas", 0 ) | |
| 1428 | GAME( 1980, spectar, 0, spectar, spectar, spectar, ROT0, "Exidy", "Spectar (revision 3)", 0 ) | |
| 1429 | GAME( 1980, spectar1, spectar, spectar, spectar, spectar, ROT0, "Exidy", "Spectar (revision 1?)", 0 ) | |
| 1430 | GAME( 1980, rallys, spectar, rallys, rallys, rallys, ROT0, "Novar", "Rallys (bootleg?)", 0 ) | |
| 1431 | GAME( 1980, phantoma, spectar, rallys, phantoma, phantoma, ROT0, "Jeutel","Phantomas", 0 ) | |
| 1462 | 1432 | |
| 1463 | 1433 | GAME( 1981, mtrap, 0, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 5)", 0 ) |
| 1464 | 1434 | GAME( 1981, mtrap3, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 3)", 0 ) |
| r1527 | r1528 | |
|---|---|---|
| 679 | 679 | static MACHINE_DRIVER_START( ppking ) |
| 680 | 680 | |
| 681 | 681 | /* basic machine hardware */ |
| 682 | MDRV_CPU_ADD(Z80, 12 | |
| 682 | MDRV_CPU_ADD(Z80, XTAL_12MHz | |
| 683 | 683 | MDRV_CPU_PROGRAM_MAP(ppking_cpu1_map,0) |
| 684 | 684 | MDRV_CPU_IO_MAP(ppking_cpu1_io,0) |
| 685 | 685 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 686 | 686 | |
| 687 | MDRV_CPU_ADD(Z80, 12 | |
| 687 | MDRV_CPU_ADD(Z80, XTAL_12MHz | |
| 688 | 688 | MDRV_CPU_PROGRAM_MAP(cpu2_map,0) |
| 689 | 689 | MDRV_CPU_IO_MAP(ppking_cpu2_io,0) |
| 690 | 690 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 691 | 691 | |
| 692 | MDRV_CPU_ADD(M6809, 12 | |
| 692 | MDRV_CPU_ADD(M6809, XTAL_12MHz | |
| 693 | 693 | /* audio CPU */ |
| 694 | 694 | MDRV_CPU_PROGRAM_MAP(ppking_cpu3_map,0) |
| 695 | 695 | |
| r1527 | r1528 | |
| 713 | 713 | /* sound hardware */ |
| 714 | 714 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 715 | 715 | |
| 716 | MDRV_SOUND_ADD(YM2203, 12 | |
| 716 | MDRV_SOUND_ADD(YM2203, XTAL_12MHz | |
| 717 | 717 | MDRV_SOUND_CONFIG(ppking_ym2203_interface) |
| 718 | 718 | MDRV_SOUND_ROUTE(0, "mono", 0.60) |
| 719 | 719 | MDRV_SOUND_ROUTE(1, "mono", 0.60) |
| 720 | 720 | MDRV_SOUND_ROUTE(2, "mono", 0.60) |
| 721 | 721 | MDRV_SOUND_ROUTE(3, "mono", 0.50) |
| 722 | 722 | |
| 723 | MDRV_SOUND_ADD(MSM5205, | |
| 723 | MDRV_SOUND_ADD(MSM5205, XTAL_455kHz) /* verified on pcb */ | |
| 724 | 724 | MDRV_SOUND_CONFIG(msm5205_interface) |
| 725 | 725 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) |
| 726 | 726 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
| 728 | 728 | static MACHINE_DRIVER_START( gladiatr ) |
| 729 | 729 | |
| 730 | 730 | /* basic machine hardware */ |
| 731 | MDRV_CPU_ADD(Z80, 12 | |
| 731 | MDRV_CPU_ADD(Z80, XTAL_12MHz | |
| 732 | 732 | MDRV_CPU_PROGRAM_MAP(gladiatr_cpu1_map,0) |
| 733 | 733 | MDRV_CPU_IO_MAP(gladiatr_cpu1_io,0) |
| 734 | 734 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 735 | 735 | |
| 736 | MDRV_CPU_ADD(Z80, 12 | |
| 736 | MDRV_CPU_ADD(Z80, XTAL_12MHz | |
| 737 | 737 | MDRV_CPU_PROGRAM_MAP(cpu2_map,0) |
| 738 | 738 | MDRV_CPU_IO_MAP(gladiatr_cpu2_io,0) |
| 739 | 739 | |
| 740 | MDRV_CPU_ADD(M6809, 12 | |
| 740 | MDRV_CPU_ADD(M6809, XTAL_12MHz | |
| 741 | 741 | /* audio CPU */ |
| 742 | 742 | MDRV_CPU_PROGRAM_MAP(gladiatr_cpu3_map,0) |
| 743 | 743 | |
| r1527 | r1528 | |
| 762 | 762 | /* sound hardware */ |
| 763 | 763 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 764 | 764 | |
| 765 | MDRV_SOUND_ADD(YM2203, 12 | |
| 765 | MDRV_SOUND_ADD(YM2203, XTAL_12MHz | |
| 766 | 766 | MDRV_SOUND_CONFIG(gladiatr_ym2203_interface) |
| 767 | 767 | MDRV_SOUND_ROUTE(0, "mono", 0.60) |
| 768 | 768 | MDRV_SOUND_ROUTE(1, "mono", 0.60) |
| 769 | 769 | MDRV_SOUND_ROUTE(2, "mono", 0.60) |
| 770 | 770 | MDRV_SOUND_ROUTE(3, "mono", 0.50) |
| 771 | 771 | |
| 772 | MDRV_SOUND_ADD(MSM5205, | |
| 772 | MDRV_SOUND_ADD(MSM5205, XTAL_455kHz) /* verified on pcb */ | |
| 773 | 773 | MDRV_SOUND_CONFIG(msm5205_interface) |
| 774 | 774 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) |
| 775 | 775 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
|---|---|---|
| 131 | 131 | static void |
| 132 | 132 | InitializeColors( void ) |
| 133 | 133 | { /* optional runtime remapping of colors */ |
| 134 | const UINT8 color[0x10][3] = | |
| 134 | static const UINT8 color[0x10][3] = | |
| 135 | 135 | { /* wrong! need color-accurate screenshots to fix */ |
| 136 | 136 | { 0x44,0x44,0x00 }, |
| 137 | 137 | { 0x7f,0xff,0xff }, |
| r1527 | r1528 | |
|---|---|---|
| 173 | 173 | * 0x06: SAUCER HIT |
| 174 | 174 | */ |
| 175 | 175 | |
| 176 | WRITE8_HANDLER( iremm10_ctrl_w ) | |
| 176 | static WRITE8_HANDLER( iremm10_ctrl_w ) | |
| 177 | 177 | { |
| 178 | 178 | irem_state *state = Machine->driver_data; |
| 179 | 179 | |
| r1527 | r1528 | |
| 250 | 250 | * Will be updated only in attract mode |
| 251 | 251 | */ |
| 252 | 252 | |
| 253 | WRITE8_HANDLER( iremm11_ctrl_w ) | |
| 253 | static WRITE8_HANDLER( iremm11_ctrl_w ) | |
| 254 | 254 | { |
| 255 | 255 | irem_state *state = Machine->driver_data; |
| 256 | 256 | |
| r1527 | r1528 | |
| 283 | 283 | * Will be updated only in attract mode |
| 284 | 284 | */ |
| 285 | 285 | |
| 286 | WRITE8_HANDLER( iremm15_ctrl_w ) | |
| 286 | static WRITE8_HANDLER( iremm15_ctrl_w ) | |
| 287 | 287 | { |
| 288 | 288 | irem_state *state = Machine->driver_data; |
| 289 | 289 | |
| r1527 | r1528 | |
| 311 | 311 | * Will be updated only in attract mode |
| 312 | 312 | */ |
| 313 | 313 | |
| 314 | WRITE8_HANDLER( iremm10_a500_w ) | |
| 314 | static WRITE8_HANDLER( iremm10_a500_w ) | |
| 315 | 315 | { |
| 316 | 316 | #if DEBUG |
| 317 | 317 | if (data & 0xFC) |
| r1527 | r1528 | |
| 319 | 319 | #endif |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | WRITE8_HANDLER( iremm11_a100_w ) | |
| 322 | static WRITE8_HANDLER( iremm11_a100_w ) | |
| 323 | 323 | { |
| 324 | 324 | static int last = 0x00; |
| 325 | 325 | int raising_bits = data & ~last; |
| r1527 | r1528 | |
| 353 | 353 | |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | WRITE8_HANDLER( iremm15_a100_w ) | |
| 356 | static WRITE8_HANDLER( iremm15_a100_w ) | |
| 357 | 357 | { |
| 358 | 358 | static int last = 0x00; |
| 359 | 359 | //int raising_bits = data & ~last; |
| r1527 | r1528 | |
| 411 | 411 | last = data; |
| 412 | 412 | } |
| 413 | 413 | |
| 414 | READ8_HANDLER( iremm10_a700_r ) | |
| 414 | static READ8_HANDLER( iremm10_a700_r ) | |
| 415 | 415 | { |
| 416 | 416 | //printf("rd:%d\n",video_screen_get_vpos(0)); |
| 417 | 417 | cpunum_set_input_line(0, 0, CLEAR_LINE); |
| 418 | 418 | return 0x00; |
| 419 | 419 | } |
| 420 | 420 | |
| 421 | READ8_HANDLER( iremm11_a700_r ) | |
| 421 | static READ8_HANDLER( iremm11_a700_r ) | |
| 422 | 422 | { |
| 423 | 423 | //printf("rd:%d\n",video_screen_get_vpos(0)); |
| 424 | 424 | return 0x00; |
| r1527 | r1528 | |
| 430 | 430 | * |
| 431 | 431 | *************************************/ |
| 432 | 432 | |
| 433 | TIMER_CALLBACK( skychut_callback ) | |
| 433 | static TIMER_CALLBACK( skychut_callback ) | |
| 434 | 434 | { |
| 435 | 435 | if (param==0) |
| 436 | 436 | { |
| r1527 | r1528 | |
| 447 | 447 | |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | INTERRUPT_GEN( iremm11_interrupt ) | |
| 450 | static INTERRUPT_GEN( iremm11_interrupt ) | |
| 451 | 451 | { |
| 452 | 452 | if (readinputport(2) & 1) /* Left Coin */ |
| 453 | 453 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); |
| r1527 | r1528 | |
| 458 | 458 | } |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | INTERRUPT_GEN( iremm10_interrupt ) | |
| 461 | static INTERRUPT_GEN( iremm10_interrupt ) | |
| 462 | 462 | { |
| 463 | 463 | if (readinputport(2) & 1) /* Left Coin */ |
| 464 | 464 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); |
| r1527 | r1528 | |
| 466 | 466 | cpunum_set_input_line(0, 0, ASSERT_LINE); |
| 467 | 467 | } |
| 468 | 468 | |
| 469 | INTERRUPT_GEN( iremm15_interrupt ) | |
| 469 | static INTERRUPT_GEN( iremm15_interrupt ) | |
| 470 | 470 | { |
| 471 | 471 | if (readinputport(2) & 1) /* Left Coin */ |
| 472 | 472 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); |
| r1527 | r1528 | |
| 486 | 486 | static ADDRESS_MAP_START( iremm10_main, ADDRESS_SPACE_PROGRAM, 8 ) |
| 487 | 487 | AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(irem_state, memory) /* scratch ram */ |
| 488 | 488 | AM_RANGE(0x1000, 0x2fff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(irem_state, rom) |
| 489 | AM_RANGE(0x4000, 0x43ff) AM_R | |
| 489 | AM_RANGE(0x4000, 0x43ff) AM_R | |
| 490 | 490 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */ |
| 491 | 491 | AM_RANGE(0x5000, 0x53ff) AM_RAM AM_BASE_MEMBER(irem_state, chargen) /* background ????? */ |
| 492 | 492 | AM_RANGE(0xa200, 0xa200) AM_READ(input_port_1_r) |
| r1527 | r1528 | |
| 500 | 500 | static ADDRESS_MAP_START( iremm11_main, ADDRESS_SPACE_PROGRAM, 8 ) |
| 501 | 501 | AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(irem_state, memory) /* scratch ram */ |
| 502 | 502 | AM_RANGE(0x1000, 0x2fff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(irem_state, rom) |
| 503 | AM_RANGE(0x4000, 0x43ff) AM_R | |
| 503 | AM_RANGE(0x4000, 0x43ff) AM_R | |
| 504 | 504 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */ |
| 505 | 505 | AM_RANGE(0x5000, 0x53ff) AM_RAM AM_BASE_MEMBER(irem_state, chargen) /* background ????? */ |
| 506 | 506 | AM_RANGE(0xa100, 0xa100) AM_WRITE(iremm11_a100_w) /* sound writes ???? */ |
| r1527 | r1528 | |
| 514 | 514 | static ADDRESS_MAP_START( iremm15_main, ADDRESS_SPACE_PROGRAM, 8 ) |
| 515 | 515 | AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(irem_state, memory) /* scratch ram */ |
| 516 | 516 | AM_RANGE(0x1000, 0x33ff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(irem_state, rom) |
| 517 | AM_RANGE(0x4000, 0x43ff) AM_R | |
| 517 | AM_RANGE(0x4000, 0x43ff) AM_R | |
| 518 | 518 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */ |
| 519 | 519 | AM_RANGE(0x5000, 0x57ff) AM_READWRITE(MRA8_RAM, iremm15_chargen_w) AM_BASE_MEMBER(irem_state, chargen) /* background ????? */ |
| 520 | 520 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_3_r) |
| r1527 | r1528 | |
| 543 | 543 | PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 544 | 544 | |
| 545 | 545 | |
| 546 | INPUT_PORTS_START( skychut ) | |
| 546 | static INPUT_PORTS_START( skychut ) | |
| 547 | 547 | PORT_START |
| 548 | 548 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 549 | 549 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| r1527 | r1528 | |
| 584 | 584 | CAB_PORTENV |
| 585 | 585 | INPUT_PORTS_END |
| 586 | 586 | |
| 587 | INPUT_PORTS_START( ipminvad ) | |
| 587 | static INPUT_PORTS_START( ipminvad ) | |
| 588 | 588 | PORT_START |
| 589 | 589 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 590 | 590 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| r1527 | r1528 | |
| 625 | 625 | CAB_PORTENV |
| 626 | 626 | INPUT_PORTS_END |
| 627 | 627 | |
| 628 | INPUT_PORTS_START( spacebeam ) | |
| 628 | static INPUT_PORTS_START( spacebeam ) | |
| 629 | 629 | PORT_START |
| 630 | 630 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 631 | 631 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| r1527 | r1528 | |
| 659 | 659 | CAB_PORTENV |
| 660 | 660 | INPUT_PORTS_END |
| 661 | 661 | |
| 662 | INPUT_PORTS_START( headoni ) | |
| 662 | static INPUT_PORTS_START( headoni ) | |
| 663 | 663 | PORT_START |
| 664 | 664 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 665 | 665 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| r1527 | r1528 | |
|---|---|---|
| 377 | 377 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 378 | 378 | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) |
| 379 | 379 | |
| 380 | MDRV_CPU_ADD(I8039,8000000 | |
| 380 | MDRV_CPU_ADD(I8039,8000000 | |
| 381 | 381 | /* audio CPU */ /* 8MHz crystal */ |
| 382 | 382 | MDRV_CPU_PROGRAM_MAP(i8039_readmem,i8039_writemem) |
| 383 | 383 | MDRV_CPU_IO_MAP(i8039_readport,i8039_writeport) |
| r1527 | r1528 | |
|---|---|---|
| 513 | 513 | GFXDECODE_END |
| 514 | 514 | |
| 515 | 515 | |
| 516 | static const struct YM2151interface ym2151_interface = | |
| 517 | { | |
| 518 | seibu_ym3812_irqhandler | |
| 519 | }; | |
| 520 | ||
| 521 | 516 | static void irqhandler(int irq) |
| 522 | 517 | { |
| 523 | 518 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| r1527 | r1528 | |
| 528 | 523 | irqhandler |
| 529 | 524 | }; |
| 530 | 525 | |
| 531 | SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE | |
| 532 | ||
| 533 | 526 | static const struct MSM5205interface msm5205_interface_1 = |
| 534 | 527 | { |
| 535 | 528 | 0, |
| r1527 | r1528 | |
| 573 | 566 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 574 | 567 | |
| 575 | 568 | MDRV_SOUND_ADD(YM2151, 3579580) /* verified on pcb */ |
| 576 | MDRV_SOUND_CONFIG(ym2151_interface) | |
| 569 | MDRV_SOUND_CONFIG(seibu_ym2151_interface) | |
| 577 | 570 | MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.80) |
| 578 | 571 | |
| 579 | 572 | MDRV_SOUND_ADD(CUSTOM, 8000) |
| 580 | MDRV_SOUND_CONFIG(adpcm_interface) | |
| 573 | MDRV_SOUND_CONFIG(seibu_adpcm_interface) | |
| 581 | 574 | MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.40) |
| 582 | 575 | |
| 583 | ||
| 584 | 576 | MDRV_SOUND_ADD(CUSTOM, 8000) |
| 585 | MDRV_SOUND_CONFIG(adpcm_interface) | |
| 577 | MDRV_SOUND_CONFIG(seibu_adpcm_interface) | |
| 586 | 578 | MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.40) |
| 587 | 579 | MACHINE_DRIVER_END |
| 588 | 580 |
| r1527 | r1528 | |
|---|---|---|
| 18 | 18 | #include "cpu/tms34010/tms34010.h" |
| 19 | 19 | #include "machine/ticket.h" |
| 20 | 20 | #include "video/tlc34076.h" |
| 21 | #include "tickee.h" | |
| 22 | 21 | #include "sound/ay8910.h" |
| 23 | 22 | |
| 24 | 23 | |
| 25 | UINT16 *tickee_control; | |
| 24 | #define CPU_CLOCK XTAL_40MHz | |
| 25 | #define VIDEO_CLOCK XTAL_14_31818MHz | |
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | |
| 29 | /* local variables */ | |
| 30 | static UINT16 *tickee_control; | |
| 31 | static UINT16 *tickee_vram; | |
| 32 | static emu_timer *setup_gun_timer; | |
| 33 | ||
| 34 | ||
| 35 | ||
| 29 | 36 | /************************************* |
| 30 | 37 | * |
| 38 | * Compute X/Y coordinates | |
| 39 | * | |
| 40 | *************************************/ | |
| 41 | ||
| 42 | INLINE void get_crosshair_xy(running_machine *machine, int player, int *x, int *y) | |
| 43 | { | |
| 44 | *x = (((readinputport(4 + player * 2) & 0xff) * (machine->screen[0].visarea.max_x - machine->screen[0].visarea.min_x)) >> 8) + machine->screen[0].visarea.min_x; | |
| 45 | *y = (((readinputport(5 + player * 2) & 0xff) * (machine->screen[0].visarea.max_y - machine->screen[0].visarea.min_y)) >> 8) + machine->screen[0].visarea.min_y; | |
| 46 | } | |
| 47 | ||
| 48 | ||
| 49 | ||
| 50 | /************************************* | |
| 51 | * | |
| 52 | * Light gun interrupts | |
| 53 | * | |
| 54 | *************************************/ | |
| 55 | ||
| 56 | static TIMER_CALLBACK( trigger_gun_interrupt ) | |
| 57 | { | |
| 58 | /* fire the IRQ at the correct moment */ | |
| 59 | cpunum_set_input_line(0, param, ASSERT_LINE); | |
| 60 | } | |
| 61 | ||
| 62 | ||
| 63 | static TIMER_CALLBACK( clear_gun_interrupt ) | |
| 64 | { | |
| 65 | /* clear the IRQ on the next scanline? */ | |
| 66 | cpunum_set_input_line(0, param, CLEAR_LINE); | |
| 67 | } | |
| 68 | ||
| 69 | ||
| 70 | static TIMER_CALLBACK( setup_gun_interrupts ) | |
| 71 | { | |
| 72 | int beamx, beamy; | |
| 73 | ||
| 74 | /* set a timer to do this again next frame */ | |
| 75 | timer_adjust(setup_gun_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero); | |
| 76 | ||
| 77 | /* only do work if the palette is flashed */ | |
| 78 | if (!tickee_control[2]) | |
| 79 | return; | |
| 80 | ||
| 81 | /* generate interrupts for player 1's gun */ | |
| 82 | get_crosshair_xy(machine, 0, &beamx, &beamy); | |
| 83 | timer_set(video_screen_get_time_until_pos(0, beamy, beamx + 50), NULL, 0, trigger_gun_interrupt); | |
| 84 | timer_set(video_screen_get_time_until_pos(0, beamy + 1, beamx + 50), NULL, 0, clear_gun_interrupt); | |
| 85 | ||
| 86 | /* generate interrupts for player 2's gun */ | |
| 87 | get_crosshair_xy(machine, 1, &beamx, &beamy); | |
| 88 | timer_set(video_screen_get_time_until_pos(0, beamy, beamx + 50), NULL, 1, trigger_gun_interrupt); | |
| 89 | timer_set(video_screen_get_time_until_pos(0, beamy + 1, beamx + 50), NULL, 1, clear_gun_interrupt); | |
| 90 | } | |
| 91 | ||
| 92 | ||
| 93 | ||
| 94 | /************************************* | |
| 95 | * | |
| 96 | * Video startup | |
| 97 | * | |
| 98 | *************************************/ | |
| 99 | ||
| 100 | static VIDEO_START( tickee ) | |
| 101 | { | |
| 102 | /* start a timer going on the first scanline of every frame */ | |
| 103 | setup_gun_timer = timer_alloc(setup_gun_interrupts, NULL); | |
| 104 | timer_adjust(setup_gun_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero); | |
| 105 | } | |
| 106 | ||
| 107 | ||
| 108 | ||
| 109 | /************************************* | |
| 110 | * | |
| 111 | * Video update | |
| 112 | * | |
| 113 | *************************************/ | |
| 114 | ||
| 115 | static void scanline_update(running_machine *machine, int screen, mame_bitmap *bitmap, int scanline, const tms34010_display_params *params) | |
| 116 | { | |
| 117 | UINT16 *src = &tickee_vram[(params->rowaddr << 8) & 0x3ff00]; | |
| 118 | UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); | |
| 119 | const rgb_t *pens = tlc34076_get_pens(); | |
| 120 | int coladdr = params->coladdr << 1; | |
| 121 | int x; | |
| 122 | ||
| 123 | /* blank palette: fill with pen 255 */ | |
| 124 | if (tickee_control[2]) | |
| 125 | { | |
| 126 | for (x = params->heblnk; x < params->hsblnk; x++) | |
| 127 | dest[x] = pens[0xff]; | |
| 128 | } | |
| 129 | else | |
| 130 | /* copy the non-blanked portions of this scanline */ | |
| 131 | for (x = params->heblnk; x < params->hsblnk; x += 2) | |
| 132 | { | |
| 133 | UINT16 pixels = src[coladdr++ & 0xff]; | |
| 134 | dest[x + 0] = pens[pixels & 0xff]; | |
| 135 | dest[x + 1] = pens[pixels >> 8]; | |
| 136 | } | |
| 137 | } | |
| 138 | ||
| 139 | ||
| 140 | /************************************* | |
| 141 | * | |
| 31 | 142 | * Machine init |
| 32 | 143 | * |
| 33 | 144 | *************************************/ |
| r1527 | r1528 | |
| 285 | 396 | { |
| 286 | 397 | FALSE, /* halt on reset */ |
| 287 | 398 | 0, /* the screen operated on */ |
| 288 | | |
| 399 | VIDEO_CLOCK/2, | |
| 289 | 400 | 1, /* pixels per clock */ |
| 290 | | |
| 401 | | |
| 291 | 402 | NULL, /* generate interrupt */ |
| 292 | 403 | NULL, /* write to shiftreg function */ |
| 293 | 404 | NULL /* read from shiftreg function */ |
| r1527 | r1528 | |
| 304 | 415 | static MACHINE_DRIVER_START( tickee ) |
| 305 | 416 | |
| 306 | 417 | /* basic machine hardware */ |
| 307 | MDRV_CPU_ADD_TAG("main", TMS34010, | |
| 418 | MDRV_CPU_ADD_TAG("main", TMS34010, X | |
| 308 | 419 | MDRV_CPU_CONFIG(tms_config) |
| 309 | 420 | MDRV_CPU_PROGRAM_MAP(tickee_map,0) |
| 310 | 421 | |
| r1527 | r1528 | |
| 313 | 424 | |
| 314 | 425 | /* video hardware */ |
| 315 | 426 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 316 | MDRV_PALETTE_LENGTH(256) | |
| 427 | MDRV_VIDEO_START(tickee) | |
| 428 | MDRV_VIDEO_UPDATE(tms340x0) | |
| 317 | 429 | |
| 318 | 430 | MDRV_SCREEN_ADD("main", 0) |
| 319 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 320 | MDRV_SCREEN_RAW_PARAMS(14318180/2, 444, 0, 320, 233, 0, 200) | |
| 431 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 432 | MDRV_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 444, 0, 320, 233, 0, 200) | |
| 321 | 433 | |
| 322 | MDRV_VIDEO_START(tickee) | |
| 323 | MDRV_VIDEO_UPDATE(tms340x0) | |
| 324 | ||
| 325 | 434 | /* sound hardware */ |
| 326 | 435 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 327 | 436 | |
| 328 | MDRV_SOUND_ADD( | |
| 437 | MDRV_SOUND_ADD( | |
| 329 | 438 | MDRV_SOUND_CONFIG(ay8910_interface_1) |
| 330 | 439 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 331 | 440 | |
| 332 | MDRV_SOUND_ADD( | |
| 441 | MDRV_SOUND_ADD( | |
| 333 | 442 | MDRV_SOUND_CONFIG(ay8910_interface_2) |
| 334 | 443 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 335 | 444 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
|---|---|---|
| 297 | 297 | } |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | static UINT | |
| 300 | static CUSTOM_INPUT( | |
| 301 | 301 | { |
| 302 | 302 | return m92_sprite_buffer_busy; |
| 303 | 303 | } |
| r1527 | r1528 | |
|---|---|---|
| 207 | 207 | static ADDRESS_MAP_START( fcombat_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 208 | 208 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) |
| 209 | 209 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM) |
| 210 | AM_RANGE(0xd000, 0xd7ff) AM_WRITE( | |
| 210 | AM_RANGE(0xd000, 0xd7ff) AM_WRITE(MWA8 | |
| 211 | 211 | AM_RANGE(0xd800, 0xd8ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 212 | 212 | |
| 213 | 213 | AM_RANGE(0xe800, 0xe800) AM_WRITE(fcombat_videoreg_w) // at least bit 0 for flip screen and joystick input multiplexor |
| r1527 | r1528 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | *******************************************************************************/ |
| 8 | 8 | |
| 9 | /* Player 1 and 2 have the same IN */ | |
| 10 | #define IREM_JOYSTICK_1_2(_n_) \ | |
| 11 | PORT_START \ | |
| 12 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(_n_) \ | |
| 13 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(_n_) \ | |
| 14 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(_n_) \ | |
| 15 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(_n_) \ | |
| 16 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) \ | |
| 17 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) \ | |
| 18 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ | |
| 19 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) | |
| 20 | ||
| 21 | 9 | #define IREM_JOYSTICKS_1_2 \ |
| 22 | 10 | PORT_START_TAG("JOY12") \ |
| 23 | 11 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) \ |
| r1527 | r1528 | |
| 37 | 25 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) \ |
| 38 | 26 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 39 | 27 | |
| 40 | /* Player 3 and 4 have IN similar to Player 1 and 2, but have the COIN and START buttons */ | |
| 41 | #define IREM_JOYSTICK_3_4(_n_) \ | |
| 42 | PORT_START \ | |
| 43 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(_n_) \ | |
| 44 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(_n_) \ | |
| 45 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(_n_) \ | |
| 46 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(_n_) \ | |
| 47 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START##_n_ ) /* If common slots, Coin3 if separate */ \ | |
| 48 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN##_n_ ) \ | |
| 49 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ | |
| 50 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) | |
| 51 | ||
| 52 | 28 | #define IREM_JOYSTICKS_3_4 \ |
| 53 | 29 | PORT_START_TAG("JOY34") \ |
| 54 | 30 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) \ |
| r1527 | r1528 | |
| 130 | 106 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \ |
| 131 | 107 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) |
| 132 | 108 | |
| 133 | ||
| 134 | #define IREM_SYSTEM_DIPSWITCH_4PLAYERS \ | |
| 135 | PORT_START \ | |
| 136 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) \ | |
| 137 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) \ | |
| 138 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ | |
| 139 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) \ | |
| 140 | PORT_DIPSETTING( 0x02, "2 Players" ) \ | |
| 141 | PORT_DIPSETTING( 0x00, "4 Players" ) \ | |
| 142 | PORT_DIPNAME( 0x04, 0x04, "Coin Slots" ) \ | |
| 143 | PORT_DIPSETTING( 0x04, "Common" ) \ | |
| 144 | PORT_DIPSETTING( 0x00, "Separate" ) \ | |
| 145 | PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) /* Default 1 */ \ | |
| 146 | PORT_DIPSETTING( 0x08, "1" ) \ | |
| 147 | PORT_DIPSETTING( 0x00, "2" ) \ | |
| 148 | IREM_COIN_MODE_1_NEW | |
| 149 | ||
| 150 | #define IREM_SYSTEM_DIPSWITCH_3PLAYERS \ | |
| 151 | PORT_START \ | |
| 152 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) \ | |
| 153 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) \ | |
| 154 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ | |
| 155 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) \ | |
| 156 | PORT_DIPSETTING( 0x02, "2 Players" ) \ | |
| 157 | PORT_DIPSETTING( 0x00, "3 Players" ) \ | |
| 158 | PORT_DIPNAME( 0x04, 0x04, "Coin Slots" ) \ | |
| 159 | PORT_DIPSETTING( 0x04, "Common" ) \ | |
| 160 | PORT_DIPSETTING( 0x00, "Separate" ) \ | |
| 161 | PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) /* Default 1 */ \ | |
| 162 | PORT_DIPSETTING( 0x08, "1" ) \ | |
| 163 | PORT_DIPSETTING( 0x00, "2" ) \ | |
| 164 | IREM_COIN_MODE_1_NEW | |
| 165 | ||
| 166 | #define IREM_SYSTEM_DIPSWITCH_CABINET \ | |
| 167 | PORT_START \ | |
| 168 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) \ | |
| 169 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) \ | |
| 170 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ | |
| 171 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) \ | |
| 172 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) \ | |
| 173 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) \ | |
| 174 | PORT_DIPNAME( 0x04, 0x04, "Coin Slots" ) \ | |
| 175 | PORT_DIPSETTING( 0x04, "Common" ) \ | |
| 176 | PORT_DIPSETTING( 0x00, "Separate" ) \ | |
| 177 | PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) /* Default 1 */ \ | |
| 178 | PORT_DIPSETTING( 0x08, "1" ) \ | |
| 179 | PORT_DIPSETTING( 0x00, "2" ) \ | |
| 180 | IREM_COIN_MODE_1_NEW | |
| 181 | ||
| 182 | #define IREM_SYSTEM_DIPSWITCH \ | |
| 183 | PORT_START \ | |
| 184 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) \ | |
| 185 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) \ | |
| 186 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ | |
| 187 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) \ | |
| 188 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) \ | |
| 189 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ | |
| 190 | PORT_DIPNAME( 0x04, 0x04, "Coin Slots" ) \ | |
| 191 | PORT_DIPSETTING( 0x04, "Common" ) \ | |
| 192 | PORT_DIPSETTING( 0x00, "Separate" ) \ | |
| 193 | PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) /* Default 1 */ \ | |
| 194 | PORT_DIPSETTING( 0x08, "1" ) \ | |
| 195 | PORT_DIPSETTING( 0x00, "2" ) \ | |
| 196 | IREM_COIN_MODE_1_NEW | |
| 197 | ||
| 198 | #define IREM_COINS_SYSTEMDIPS(custom) \ | |
| 199 | PORT_START_TAG("COINS_DIPS") \ | |
| 200 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) \ | |
| 201 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 ) \ | |
| 202 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) \ | |
| 203 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN2 ) \ | |
| 204 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) \ | |
| 205 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE ) \ | |
| 206 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) \ | |
| 207 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom, 0) /* Actually vblank, handled above */ \ | |
| 208 | PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Flip_Screen ) ) \ | |
| 209 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) \ | |
| 210 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) \ | |
| 211 | PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) \ | |
| 212 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) \ | |
| 213 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) \ | |
| 214 | PORT_DIPNAME( 0x0400, 0x0400, "Coin Slots" ) \ | |
| 215 | PORT_DIPSETTING( 0x0400, "Common" ) \ | |
| 216 | PORT_DIPSETTING( 0x0000, "Separate" ) \ | |
| 217 | PORT_DIPNAME( 0x0800, 0x0800, "Coin Mode" ) /* Default 1 */ \ | |
| 218 | PORT_DIPSETTING( 0x0800, "1" ) \ | |
| 219 | PORT_DIPSETTING( 0x0000, "2" ) \ | |
| 220 | PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:5,6,7,8") \ | |
| 221 | PORT_DIPSETTING( 0xa000, DEF_STR( 6C_1C ) ) \ | |
| 222 | PORT_DIPSETTING( 0xb000, DEF_STR( 5C_1C ) ) \ | |
| 223 | PORT_DIPSETTING( 0xc000, DEF_STR( 4C_1C ) ) \ | |
| 224 | PORT_DIPSETTING( 0xd000, DEF_STR( 3C_1C ) ) \ | |
| 225 | PORT_DIPSETTING( 0xe000, DEF_STR( 2C_1C ) ) \ | |
| 226 | PORT_DIPSETTING( 0x1000, "2 Coins to Start/1 to Continue") \ | |
| 227 | PORT_DIPSETTING( 0x3000, DEF_STR( 3C_2C ) ) \ | |
| 228 | PORT_DIPSETTING( 0x2000, DEF_STR( 4C_3C ) ) \ | |
| 229 | PORT_DIPSETTING( 0xf000, DEF_STR( 1C_1C ) ) \ | |
| 230 | PORT_DIPSETTING( 0x4000, DEF_STR( 2C_3C ) ) \ | |
| 231 | PORT_DIPSETTING( 0x9000, DEF_STR( 1C_2C ) ) \ | |
| 232 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_3C ) ) \ | |
| 233 | PORT_DIPSETTING( 0x7000, DEF_STR( 1C_4C ) ) \ | |
| 234 | PORT_DIPSETTING( 0x6000, DEF_STR( 1C_5C ) ) \ | |
| 235 | PORT_DIPSETTING( 0x5000, DEF_STR( 1C_6C ) ) \ | |
| 236 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) | |
| 237 | ||
| 238 | ||
| 239 | #define IREM_PORT_UNUSED \ | |
| 240 | PORT_START \ | |
| 241 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 242 |
| r1527 | r1528 | |
|---|---|---|
| 88 | 88 | AM_RANGE(0x000000, 0x0fffff) AM_READ(MRA16_ROM ) // ROM |
| 89 | 89 | AM_RANGE(0x400000, 0x40ffff) AM_READ(MRA16_RAM ) // RAM |
| 90 | 90 | AM_RANGE(0x500000, 0x507fff) AM_READ(MRA16_RAM ) // Layers |
| 91 | AM_RANGE(0x600000, 0x601fff) AM_READ(spriteram16_r ) // Sprites | |
| 92 | AM_RANGE(0x608000, 0x609fff) AM_READ(spriteram16_r ) // Sprites (? Mirror ?) | |
| 91 | AM_RANGE(0x600000, 0x601fff) AM_MIRROR(0x008000) AM_READ(MRA16_RAM ) // Sprites, mirrored? | |
| 93 | 92 | AM_RANGE(0x700000, 0x703fff) AM_READ(MRA16_RAM ) // Palette |
| 94 | 93 | AM_RANGE(0x800000, 0x800001) AM_READ(input_port_0_word_r ) // Buttons (Inputs) |
| 95 | 94 | AM_RANGE(0x810000, 0x810001) AM_READ(input_port_1_word_r ) // P1 + P2 |
| r1527 | r1528 | |
| 107 | 106 | AM_RANGE(0x504000, 0x505fff) AM_WRITE(fuuki16_vram_2_w) AM_BASE(&fuuki16_vram_2 ) // |
| 108 | 107 | AM_RANGE(0x506000, 0x507fff) AM_WRITE(fuuki16_vram_3_w) AM_BASE(&fuuki16_vram_3 ) // |
| 109 | 108 | AM_RANGE(0x506000, 0x507fff) AM_WRITE(MWA16_RAM ) // |
| 110 | AM_RANGE(0x600000, 0x601fff) AM_WRITE(spriteram16_w) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size ) // Sprites | |
| 111 | AM_RANGE(0x608000, 0x609fff) AM_WRITE(spriteram16_w ) // Sprites (? Mirror ?) | |
| 109 | AM_RANGE(0x600000, 0x601fff) AM_MIRROR(0x008000) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size ) // Sprites, mirrored? | |
| 112 | 110 | AM_RANGE(0x700000, 0x703fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette |
| 113 | 111 | AM_RANGE(0x8c0000, 0x8c001f) AM_WRITE(fuuki16_vregs_w) AM_BASE(&fuuki16_vregs ) // Video Registers |
| 114 | 112 | AM_RANGE(0x8a0000, 0x8a0001) AM_WRITE(fuuki16_sound_command_w ) // To Sound CPU |
| r1527 | r1528 | |
|---|---|---|
| 15 | 15 | #include "tinv2650.lh" |
| 16 | 16 | |
| 17 | 17 | WRITE8_HANDLER( tinvader_videoram_w ); |
| 18 | WRITE8_HANDLER( tinvader_sound_w ); | |
| 18 | static WRITE8_HANDLER( tinvader_sound_w ); | |
| 19 | 19 | READ8_HANDLER( zac_s2636_r ); |
| 20 | 20 | READ8_HANDLER( tinvader_port_0_r ); |
| 21 | 21 | |
| r1527 | r1528 | |
| 343 | 343 | /* sound hardware */ |
| 344 | 344 | MACHINE_DRIVER_END |
| 345 | 345 | |
| 346 | WRITE8_HANDLER( tinvader_sound_w ) | |
| 346 | static WRITE8_HANDLER( tinvader_sound_w ) | |
| 347 | 347 | { |
| 348 | 348 | /* sounds are NOT the same as space invaders */ |
| 349 | 349 |
| r1527 | r1528 | |
|---|---|---|
| 207 | 207 | |
| 208 | 208 | static UINT16 cpua_ctrl = 0xff; |
| 209 | 209 | |
| 210 | static size_t sharedram_size; | |
| 211 | static UINT16 *sharedram; | |
| 212 | ||
| 213 | ||
| 214 | static READ16_HANDLER( sharedram_r ) | |
| 215 | { | |
| 216 | return sharedram[offset]; | |
| 217 | } | |
| 218 | ||
| 219 | static WRITE16_HANDLER( sharedram_w ) | |
| 220 | { | |
| 221 | COMBINE_DATA(&sharedram[offset]); | |
| 222 | } | |
| 223 | ||
| 224 | 210 | static void parse_control(void) /* assumes Z80 sandwiched between 68Ks */ |
| 225 | 211 | { |
| 226 | 212 | /* bit 0 enables cpu B */ |
| r1527 | r1528 | |
| 301 | 287 | AM_RANGE(0x200000, 0x200001) AM_READ(TC0220IOC_halfword_portreg_r) |
| 302 | 288 | AM_RANGE(0x200002, 0x200003) AM_READ(TC0220IOC_halfword_port_r) |
| 303 | 289 | AM_RANGE(0x220000, 0x220003) AM_READ(ninjaw_sound_r) |
| 304 | AM_RANGE(0x240000, 0x24ffff) AM_READ(sharedram_r) | |
| 305 | AM_RANGE(0x260000, 0x263fff) AM_READ(MRA16_RAM) /* sprite ram */ | |
| 306 | 290 | AM_RANGE(0x280000, 0x293fff) AM_READ(TC0100SCN_word_0_r) /* tilemaps (1st screen) */ |
| 307 | 291 | AM_RANGE(0x2a0000, 0x2a000f) AM_READ(TC0100SCN_ctrl_word_0_r) |
| 308 | 292 | AM_RANGE(0x2c0000, 0x2d3fff) AM_READ(TC0100SCN_word_1_r) /* tilemaps (2nd screen) */ |
| r1527 | r1528 | |
| 321 | 305 | AM_RANGE(0x200002, 0x200003) AM_WRITE(TC0220IOC_halfword_port_w) |
| 322 | 306 | AM_RANGE(0x210000, 0x210001) AM_WRITE(cpua_ctrl_w) |
| 323 | 307 | AM_RANGE(0x220000, 0x220003) AM_WRITE(ninjaw_sound_w) |
| 324 | AM_RANGE(0x240000, 0x24ffff) AM_WRITE(sharedram_w) AM_BASE(&sharedram) AM_SIZE(&sharedram_size) | |
| 325 | AM_RANGE(0x260000, 0x263fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) | |
| 308 | AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE(1) | |
| 309 | AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE(2) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) | |
| 326 | 310 | AM_RANGE(0x280000, 0x293fff) AM_WRITE(TC0100SCN_triple_screen_w) /* tilemaps (all screens) */ |
| 327 | 311 | AM_RANGE(0x2a0000, 0x2a000f) AM_WRITE(TC0100SCN_ctrl_word_0_w) |
| 328 | 312 | AM_RANGE(0x2c0000, 0x2d3fff) AM_WRITE(TC0100SCN_word_1_w) /* tilemaps (2nd screen) */ |
| r1527 | r1528 | |
| 342 | 326 | AM_RANGE(0x080000, 0x08ffff) AM_READ(MRA16_RAM) /* main ram */ |
| 343 | 327 | AM_RANGE(0x200000, 0x200001) AM_READ(TC0220IOC_halfword_portreg_r) |
| 344 | 328 | AM_RANGE(0x200002, 0x200003) AM_READ(TC0220IOC_halfword_port_r) |
| 345 | AM_RANGE(0x240000, 0x24ffff) AM_READ(sharedram_r) | |
| 346 | AM_RANGE(0x260000, 0x263fff) AM_READ(spriteram16_r) /* sprite ram */ | |
| 347 | 329 | AM_RANGE(0x280000, 0x293fff) AM_READ(TC0100SCN_word_0_r) /* tilemaps (1st screen) */ |
| 348 | 330 | AM_RANGE(0x340000, 0x340007) AM_READ(TC0110PCR_word_r) /* palette (1st screen) */ |
| 349 | 331 | AM_RANGE(0x350000, 0x350007) AM_READ(TC0110PCR_word_1_r) /* palette (2nd screen) */ |
| r1527 | r1528 | |
| 355 | 337 | AM_RANGE(0x080000, 0x08ffff) AM_WRITE(MWA16_RAM) |
| 356 | 338 | AM_RANGE(0x200000, 0x200001) AM_WRITE(TC0220IOC_halfword_portreg_w) |
| 357 | 339 | AM_RANGE(0x200002, 0x200003) AM_WRITE(TC0220IOC_halfword_port_w) |
| 358 | AM_RANGE(0x240000, 0x24ffff) AM_WRITE(sharedram_w) AM_BASE(&sharedram) | |
| 359 | AM_RANGE(0x260000, 0x263fff) AM_WRITE(spriteram16_w) | |
| 340 | AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE(1) | |
| 341 | AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE(2) | |
| 360 | 342 | AM_RANGE(0x280000, 0x293fff) AM_WRITE(TC0100SCN_triple_screen_w) /* tilemaps (all screens) */ |
| 361 | 343 | AM_RANGE(0x340000, 0x340007) AM_WRITE(TC0110PCR_step1_word_w) /* palette (1st screen) */ |
| 362 | 344 | AM_RANGE(0x350000, 0x350007) AM_WRITE(TC0110PCR_step1_word_1_w) /* palette (2nd screen) */ |
| r1527 | r1528 | |
| 370 | 352 | AM_RANGE(0x200000, 0x200001) AM_READ(TC0220IOC_halfword_portreg_r) |
| 371 | 353 | AM_RANGE(0x200002, 0x200003) AM_READ(TC0220IOC_halfword_port_r) |
| 372 | 354 | AM_RANGE(0x220000, 0x220003) AM_READ(ninjaw_sound_r) |
| 373 | AM_RANGE(0x240000, 0x24ffff) AM_READ(sharedram_r) | |
| 374 | AM_RANGE(0x260000, 0x263fff) AM_READ(MRA16_RAM) /* sprite ram */ | |
| 375 | 355 | AM_RANGE(0x280000, 0x293fff) AM_READ(TC0100SCN_word_0_r) /* tilemaps (1st screen) */ |
| 376 | 356 | AM_RANGE(0x2a0000, 0x2a000f) AM_READ(TC0100SCN_ctrl_word_0_r) |
| 377 | 357 | AM_RANGE(0x2c0000, 0x2d3fff) AM_READ(TC0100SCN_word_1_r) /* tilemaps (2nd screen) */ |
| r1527 | r1528 | |
| 390 | 370 | AM_RANGE(0x200002, 0x200003) AM_WRITE(TC0220IOC_halfword_port_w) |
| 391 | 371 | AM_RANGE(0x210000, 0x210001) AM_WRITE(cpua_ctrl_w) |
| 392 | 372 | AM_RANGE(0x220000, 0x220003) AM_WRITE(ninjaw_sound_w) |
| 393 | AM_RANGE(0x240000, 0x24ffff) AM_WRITE(sharedram_w) AM_BASE(&sharedram) AM_SIZE(&sharedram_size) | |
| 394 | AM_RANGE(0x260000, 0x263fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) | |
| 373 | AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE(1) | |
| 374 | AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE(2) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) | |
| 395 | 375 | AM_RANGE(0x280000, 0x293fff) AM_WRITE(TC0100SCN_triple_screen_w) /* tilemaps (all screens) */ |
| 396 | 376 | AM_RANGE(0x2a0000, 0x2a000f) AM_WRITE(TC0100SCN_ctrl_word_0_w) |
| 397 | 377 | AM_RANGE(0x2c0000, 0x2d3fff) AM_WRITE(TC0100SCN_word_1_w) /* tilemaps (2nd screen) */ |
| r1527 | r1528 | |
| 408 | 388 | AM_RANGE(0x080000, 0x08ffff) AM_READ(MRA16_RAM) /* main ram */ |
| 409 | 389 | AM_RANGE(0x200000, 0x200001) AM_READ(TC0220IOC_halfword_portreg_r) |
| 410 | 390 | AM_RANGE(0x200002, 0x200003) AM_READ(TC0220IOC_halfword_port_r) |
| 411 | AM_RANGE(0x240000, 0x24ffff) AM_READ(sharedram_r) | |
| 412 | AM_RANGE(0x260000, 0x263fff) AM_READ(spriteram16_r) /* sprite ram */ | |
| 413 | 391 | AM_RANGE(0x280000, 0x293fff) AM_READ(TC0100SCN_word_0_r) /* tilemaps (1st screen) */ |
| 414 | 392 | ADDRESS_MAP_END |
| 415 | 393 | |
| r1527 | r1528 | |
| 418 | 396 | AM_RANGE(0x080000, 0x08ffff) AM_WRITE(MWA16_RAM) |
| 419 | 397 | AM_RANGE(0x200000, 0x200001) AM_WRITE(TC0220IOC_halfword_portreg_w) |
| 420 | 398 | AM_RANGE(0x200002, 0x200003) AM_WRITE(TC0220IOC_halfword_port_w) |
| 421 | AM_RANGE(0x240000, 0x24ffff) AM_WRITE(sharedram_w) AM_BASE(&sharedram) | |
| 422 | AM_RANGE(0x260000, 0x263fff) AM_WRITE(spriteram16_w) | |
| 399 | AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE(1) | |
| 400 | AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE(2) | |
| 423 | 401 | AM_RANGE(0x280000, 0x293fff) AM_WRITE(TC0100SCN_triple_screen_w) /* tilemaps (all screens) */ |
| 424 | 402 | ADDRESS_MAP_END |
| 425 | 403 |
| r1527 | r1528 | |
|---|---|---|
| 39 | 39 | PALETTE_INIT( matmania ); |
| 40 | 40 | VIDEO_UPDATE( matmania ); |
| 41 | 41 | VIDEO_UPDATE( maniach ); |
| 42 | WRITE8_HANDLER( matmania_videoram3_w ); | |
| 43 | WRITE8_HANDLER( matmania_colorram3_w ); | |
| 44 | 42 | VIDEO_START( matmania ); |
| 45 | 43 | VIDEO_UPDATE( matmania ); |
| 46 | 44 | |
| r1527 | r1528 | |
| 95 | 93 | AM_RANGE(0x0780, 0x07df) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 96 | 94 | AM_RANGE(0x1000, 0x13ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_videoram2) AM_SIZE(&matmania_videoram2_size) |
| 97 | 95 | AM_RANGE(0x1400, 0x17ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_colorram2) |
| 98 | AM_RANGE(0x2000, 0x21ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 99 | AM_RANGE(0x2200, 0x23ff) AM_WRITE(colorram_w) AM_BASE(&colorram) | |
| 100 | AM_RANGE(0x2400, 0x25ff) AM_WRITE(matmania_videoram3_w) AM_BASE(&matmania_videoram3) AM_SIZE(&matmania_videoram3_size) | |
| 101 | AM_RANGE(0x2600, 0x27ff) AM_WRITE(matmania_colorram3_w) AM_BASE(&matmania_colorram3) | |
| 96 | AM_RANGE(0x2000, 0x21ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 97 | AM_RANGE(0x2200, 0x23ff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram) | |
| 98 | AM_RANGE(0x2400, 0x25ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_videoram3) AM_SIZE(&matmania_videoram3_size) | |
| 99 | AM_RANGE(0x2600, 0x27ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_colorram3) | |
| 102 | 100 | AM_RANGE(0x3000, 0x3000) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_pageselect) |
| 103 | 101 | AM_RANGE(0x3010, 0x3010) AM_WRITE(matmania_sh_command_w) |
| 104 | 102 | AM_RANGE(0x3020, 0x3020) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_scroll) |
| r1527 | r1528 | |
| 125 | 123 | AM_RANGE(0x0780, 0x07df) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 126 | 124 | AM_RANGE(0x1000, 0x13ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_videoram2) AM_SIZE(&matmania_videoram2_size) |
| 127 | 125 | AM_RANGE(0x1400, 0x17ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_colorram2) |
| 128 | AM_RANGE(0x2000, 0x21ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 129 | AM_RANGE(0x2200, 0x23ff) AM_WRITE(colorram_w) AM_BASE(&colorram) | |
| 130 | AM_RANGE(0x2400, 0x25ff) AM_WRITE(matmania_videoram3_w) AM_BASE(&matmania_videoram3) AM_SIZE(&matmania_videoram3_size) | |
| 131 | AM_RANGE(0x2600, 0x27ff) AM_WRITE(matmania_colorram3_w) AM_BASE(&matmania_colorram3) | |
| 126 | AM_RANGE(0x2000, 0x21ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 127 | AM_RANGE(0x2200, 0x23ff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram) | |
| 128 | AM_RANGE(0x2400, 0x25ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_videoram3) AM_SIZE(&matmania_videoram3_size) | |
| 129 | AM_RANGE(0x2600, 0x27ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_colorram3) | |
| 132 | 130 | AM_RANGE(0x3000, 0x3000) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_pageselect) |
| 133 | 131 | AM_RANGE(0x3010, 0x3010) AM_WRITE(maniach_sh_command_w) |
| 134 | 132 | AM_RANGE(0x3020, 0x3020) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_scroll) |
| r1527 | r1528 | |
| 400 | 398 | /* audio CPU */ /* 1.5 MHz ???? */ |
| 401 | 399 | MDRV_CPU_PROGRAM_MAP(maniach_sound_readmem,maniach_sound_writemem) |
| 402 | 400 | /* IRQs are caused by the main CPU */ |
| 403 | MDRV_CPU_ADD(M68705, 1500000*2 | |
| 401 | MDRV_CPU_ADD(M68705, 1500000*2 | |
| 404 | 402 | MDRV_CPU_PROGRAM_MAP(mcu_readmem,mcu_writemem) |
| 405 | 403 | |
| 406 | 404 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 767 | 767 | MDRV_CPU_PROGRAM_MAP(arkanoid_map, 0) |
| 768 | 768 | MDRV_CPU_VBLANK_INT(irq0_line_hold, 1) |
| 769 | 769 | |
| 770 | MDRV_CPU_ADD_TAG("mcu", M68705, 3000000 | |
| 770 | MDRV_CPU_ADD_TAG("mcu", M68705, 3000000 | |
| 771 | 771 | MDRV_CPU_PROGRAM_MAP(mcu_map, 0) |
| 772 | 772 | |
| 773 | 773 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 296 | 296 | AM_RANGE(0x100000, 0x103fff) AM_READ(MRA16_RAM) |
| 297 | 297 | AM_RANGE(0x104000, 0x105fff) AM_READ(MRA16_RAM) // miaj |
| 298 | 298 | AM_RANGE(0x120000, 0x123fff) AM_READ(MRA16_RAM) |
| 299 | AM_RANGE(0x140000, 0x143fff) AM_READ(MRA16_RAM) | |
| 300 | 299 | ADDRESS_MAP_END |
| 301 | 300 | |
| 302 | 301 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r1527 | r1528 | |
| 315 | 314 | AM_RANGE(0x100000, 0x103fff) AM_WRITE(twin16_videoram2_w) AM_BASE(&twin16_videoram2) |
| 316 | 315 | AM_RANGE(0x104000, 0x105fff) AM_WRITE(MWA16_RAM) // miaj |
| 317 | 316 | AM_RANGE(0x120000, 0x123fff) AM_WRITE(MWA16_RAM) AM_BASE(&videoram16) |
| 318 | AM_RANGE(0x140000, 0x143fff) AM_ | |
| 317 | AM_RANGE(0x140000, 0x143fff) AM_ | |
| 319 | 318 | ADDRESS_MAP_END |
| 320 | 319 | |
| 321 | 320 | static ADDRESS_MAP_START( readmem_sub, ADDRESS_SPACE_PROGRAM, 16 ) |
| r1527 | r1528 | |
| 324 | 323 | AM_RANGE(0x044000, 0x04ffff) AM_READ(MRA16_RAM) // miaj |
| 325 | 324 | AM_RANGE(0x060000, 0x063fff) AM_READ(MRA16_RAM) |
| 326 | 325 | AM_RANGE(0x080000, 0x09ffff) AM_READ(extra_rom_r) |
| 327 | AM_RANGE(0x400000, 0x403fff) AM_READ(spriteram16_r) | |
| 328 | 326 | AM_RANGE(0x480000, 0x483fff) AM_READ(videoram16_r) |
| 329 | 327 | AM_RANGE(0x500000, 0x53ffff) AM_READ(MRA16_RAM) |
| 330 | 328 | AM_RANGE(0x600000, 0x6fffff) AM_READ(twin16_gfx_rom1_r) |
| r1527 | r1528 | |
| 338 | 336 | AM_RANGE(0x044000, 0x04ffff) AM_WRITE(MWA16_RAM) // miaj |
| 339 | 337 | AM_RANGE(0x060000, 0x063fff) AM_WRITE(MWA16_RAM) |
| 340 | 338 | AM_RANGE(0x0a0000, 0x0a0001) AM_WRITE(twin16_CPUB_register_w) |
| 341 | AM_RANGE(0x400000, 0x403fff) AM_ | |
| 339 | AM_RANGE(0x400000, 0x403fff) AM_ | |
| 342 | 340 | AM_RANGE(0x480000, 0x483fff) AM_WRITE(videoram16_w) |
| 343 | 341 | AM_RANGE(0x500000, 0x53ffff) AM_WRITE(MWA16_RAM) AM_BASE(&twin16_tile_gfx_ram) |
| 344 | 342 | AM_RANGE(0x780000, 0x79ffff) AM_WRITE(MWA16_RAM) AM_BASE(&twin16_sprite_gfx_ram) |
| r1527 | r1528 | |
|---|---|---|
| 1118 | 1118 | AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_READ(input_port_1_r) |
| 1119 | 1119 | ADDRESS_MAP_END |
| 1120 | 1120 | |
| 1121 | ||
| 1122 | ||
| 1121 | 1123 | /************************************* |
| 1122 | 1124 | * |
| 1123 | 1125 | * Main CPU port handlers |
| r1527 | r1528 | |
| 1204 | 1206 | AM_RANGE(0x01, 0x01) AM_WRITE(AY8910_control_port_0_w) |
| 1205 | 1207 | ADDRESS_MAP_END |
| 1206 | 1208 | |
| 1209 | ||
| 1210 | ||
| 1207 | 1211 | /************************************* |
| 1208 | 1212 | * |
| 1209 | 1213 | * Port definitions |
| r1527 | r1528 | |
| 2966 | 2970 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 2967 | 2971 | INPUT_PORTS_END |
| 2968 | 2972 | |
| 2973 | ||
| 2974 | ||
| 2969 | 2975 | /************************************* |
| 2970 | 2976 | * |
| 2971 | 2977 | * Graphics layouts |
| r1527 | r1528 | |
| 3334 | 3340 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 3335 | 3341 | MACHINE_DRIVER_END |
| 3336 | 3342 | |
| 3343 | ||
| 3344 | ||
| 3337 | 3345 | /************************************* |
| 3338 | 3346 | * |
| 3339 | 3347 | * ROM definitions |
| r1527 | r1528 | |
|---|---|---|
| 596 | 596 | /* audio CPU */ /* 4 MHz? */ |
| 597 | 597 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 598 | 598 | /* IRQs are triggered by the YM2203 */ |
| 599 | MDRV_CPU_ADD(M68705,4000000 | |
| 599 | MDRV_CPU_ADD(M68705,4000000 | |
| 600 | 600 | MDRV_CPU_PROGRAM_MAP(m68705_readmem,m68705_writemem) |
| 601 | 601 | |
| 602 | 602 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 278 | 278 | GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 0x700, 0x10 ) /* Text */ |
| 279 | 279 | GFXDECODE_END |
| 280 | 280 | |
| 281 | SEIBU_SOUND_SYSTEM_YM3812_HARDWARE | |
| 282 | ||
| 283 | 281 | static INTERRUPT_GEN( sengokmj_interrupt ) |
| 284 | 282 | { |
| 285 | 283 | cpunum_set_input_line_and_vector(0,0,HOLD_LINE,0xcb/4); |
| r1527 | r1528 | |
|---|---|---|
| 570 | 570 | |
| 571 | 571 | static ADDRESS_MAP_START( ghostb_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 572 | 572 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_RAM) |
| 573 | AM_RANGE(0x1800, 0x1fff) AM_READ( | |
| 573 | AM_RANGE(0x1800, 0x1fff) AM_READ(MRA8 | |
| 574 | 574 | AM_RANGE(0x2000, 0x27ff) AM_READ(dec8_pf0_data_r) |
| 575 | 575 | AM_RANGE(0x2800, 0x2dff) AM_READ(MRA8_RAM) |
| 576 | 576 | AM_RANGE(0x3000, 0x37ff) AM_READ(MRA8_RAM) |
| r1527 | r1528 | |
| 634 | 634 | |
| 635 | 635 | static ADDRESS_MAP_START( gondo_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 636 | 636 | AM_RANGE(0x0000, 0x17ff) AM_READ(MRA8_RAM) |
| 637 | AM_RANGE(0x1800, 0x1fff) AM_READ( | |
| 637 | AM_RANGE(0x1800, 0x1fff) AM_READ(MRA8 | |
| 638 | 638 | AM_RANGE(0x2000, 0x27ff) AM_READ(dec8_pf0_data_r) |
| 639 | 639 | AM_RANGE(0x2800, 0x2bff) AM_READ(paletteram_r) |
| 640 | 640 | AM_RANGE(0x2c00, 0x2fff) AM_READ(paletteram_2_r) |
| r1527 | r1528 | |
| 669 | 669 | AM_RANGE(0x0000, 0x0eff) AM_READ(MRA8_RAM) AM_SHARE(1) |
| 670 | 670 | AM_RANGE(0x0f00, 0x0fff) AM_READ(MRA8_RAM) |
| 671 | 671 | AM_RANGE(0x1000, 0x1fff) AM_READ(MRA8_RAM) AM_SHARE(2) |
| 672 | AM_RANGE(0x2000, 0x27ff) AM_READ( | |
| 672 | AM_RANGE(0x2000, 0x27ff) AM_READ(MRA8 | |
| 673 | 673 | AM_RANGE(0x2800, 0x2fff) AM_READ(dec8_pf0_data_r) |
| 674 | 674 | AM_RANGE(0x3000, 0x37ff) AM_READ(MRA8_RAM) /* Sprites */ |
| 675 | 675 | AM_RANGE(0x3800, 0x3bff) AM_READ(paletteram_r) |
| r1527 | r1528 | |
| 725 | 725 | AM_RANGE(0x1804, 0x1804) AM_READ(input_port_4_r) /* Dip 2 */ |
| 726 | 726 | AM_RANGE(0x1806, 0x1806) AM_READ(i8751_h_r) |
| 727 | 727 | AM_RANGE(0x1807, 0x1807) AM_READ(i8751_l_r) |
| 728 | AM_RANGE(0x2000, 0x27ff) AM_READ( | |
| 728 | AM_RANGE(0x2000, 0x27ff) AM_READ(MRA8 | |
| 729 | 729 | AM_RANGE(0x2800, 0x2fff) AM_READ(MRA8_RAM) |
| 730 | 730 | AM_RANGE(0x3000, 0x37ff) AM_READ(MRA8_RAM) AM_SHARE(2) |
| 731 | 731 | AM_RANGE(0x3800, 0x3fff) AM_READ(dec8_pf0_data_r) |
| r1527 | r1528 | |
| 761 | 761 | AM_RANGE(0x1802, 0x1802) AM_READ(input_port_2_r) |
| 762 | 762 | AM_RANGE(0x1803, 0x1803) AM_READ(input_port_3_r) /* Dip 1 */ |
| 763 | 763 | AM_RANGE(0x1804, 0x1804) AM_READ(input_port_4_r) /* Dip 2 */ |
| 764 | AM_RANGE(0x2000, 0x27ff) AM_READ( | |
| 764 | AM_RANGE(0x2000, 0x27ff) AM_READ(MRA8 | |
| 765 | 765 | AM_RANGE(0x3000, 0x37ff) AM_READ(MRA8_RAM) AM_SHARE(2) |
| 766 | 766 | AM_RANGE(0x3800, 0x3fff) AM_READ(dec8_pf0_data_r) |
| 767 | 767 | AM_RANGE(0x4000, 0xffff) AM_READ(MRA8_ROM) |
| r1527 | r1528 | |
| 791 | 791 | AM_RANGE(0x1802, 0x1802) AM_READ(input_port_2_r) |
| 792 | 792 | AM_RANGE(0x1803, 0x1803) AM_READ(input_port_3_r) |
| 793 | 793 | AM_RANGE(0x1804, 0x1804) AM_READ(input_port_4_r) |
| 794 | AM_RANGE(0x2000, 0x27ff) AM_READ( | |
| 794 | AM_RANGE(0x2000, 0x27ff) AM_READ(MRA8 | |
| 795 | 795 | AM_RANGE(0x2800, 0x2fff) AM_READ(shackled_sprite_r) |
| 796 | 796 | AM_RANGE(0x3000, 0x37ff) AM_READ(MRA8_RAM) AM_SHARE(2) |
| 797 | 797 | AM_RANGE(0x3800, 0x3fff) AM_READ(dec8_pf0_data_r) |
| r1527 | r1528 | |
| 828 | 828 | AM_RANGE(0x1804, 0x1804) AM_READ(input_port_4_r) |
| 829 | 829 | AM_RANGE(0x1806, 0x1806) AM_READ(i8751_h_r) |
| 830 | 830 | AM_RANGE(0x1807, 0x1807) AM_READ(i8751_l_r) |
| 831 | AM_RANGE(0x2000, 0x27ff) AM_READ( | |
| 831 | AM_RANGE(0x2000, 0x27ff) AM_READ(MRA8 | |
| 832 | 832 | AM_RANGE(0x2800, 0x2fff) AM_READ(MRA8_RAM) |
| 833 | 833 | AM_RANGE(0x3000, 0x37ff) AM_READ(MRA8_RAM) AM_SHARE(2) |
| 834 | 834 | AM_RANGE(0x3800, 0x3fff) AM_READ(dec8_pf0_data_r) |
| r1527 | r1528 | |
| 865 | 865 | AM_RANGE(0x1805, 0x1805) AM_READ(input_port_3_r) /* Dip 1 */ |
| 866 | 866 | AM_RANGE(0x1c00, 0x1c00) AM_READ(i8751_h_r) |
| 867 | 867 | AM_RANGE(0x1e00, 0x1e00) AM_READ(i8751_l_r) |
| 868 | AM_RANGE(0x2000, 0x27ff) AM_READ( | |
| 868 | AM_RANGE(0x2000, 0x27ff) AM_READ(MRA8 | |
| 869 | 869 | AM_RANGE(0x2800, 0x2fff) AM_READ(shackled_sprite_r) |
| 870 | 870 | AM_RANGE(0x3000, 0x37ff) AM_READ(MRA8_RAM) AM_SHARE(2) |
| 871 | 871 | AM_RANGE(0x3800, 0x3fff) AM_READ(dec8_pf0_data_r) |
| r1527 | r1528 | |
| 898 | 898 | AM_RANGE(0x1803, 0x1803) AM_READ(input_port_2_r) |
| 899 | 899 | AM_RANGE(0x1804, 0x1804) AM_READ(input_port_4_r) |
| 900 | 900 | AM_RANGE(0x1805, 0x1805) AM_READ(input_port_3_r) |
| 901 | AM_RANGE(0x2000, 0x27ff) AM_READ( | |
| 901 | AM_RANGE(0x2000, 0x27ff) AM_READ(MRA8 | |
| 902 | 902 | AM_RANGE(0x2800, 0x2fff) AM_READ(MRA8_RAM) |
| 903 | 903 | AM_RANGE(0x3000, 0x37ff) AM_READ(MRA8_RAM) AM_SHARE(2) |
| 904 | 904 | AM_RANGE(0x3800, 0x3fff) AM_READ(dec8_pf0_data_r) |
| r1527 | r1528 | |
| 921 | 921 | |
| 922 | 922 | static ADDRESS_MAP_START( garyoret_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 923 | 923 | AM_RANGE(0x0000, 0x17ff) AM_READ(MRA8_RAM) |
| 924 | AM_RANGE(0x1800, 0x1fff) AM_READ( | |
| 924 | AM_RANGE(0x1800, 0x1fff) AM_READ(MRA8 | |
| 925 | 925 | AM_RANGE(0x2000, 0x27ff) AM_READ(dec8_pf0_data_r) |
| 926 | 926 | AM_RANGE(0x2800, 0x2bff) AM_READ(paletteram_r) |
| 927 | 927 | AM_RANGE(0x2c00, 0x2fff) AM_READ(paletteram_2_r) |
| r1527 | r1528 | |
|---|---|---|
| 29 | 29 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 30 | 30 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) |
| 31 | 31 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 32 | AM_RANGE(0x8800, 0x8bff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 33 | AM_RANGE(0x8c00, 0x8fff) AM_WRITE(colorram_w) AM_BASE(&colorram) | |
| 32 | AM_RANGE(0x8800, 0x8bff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 33 | AM_RANGE(0x8c00, 0x8fff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram) | |
| 34 | 34 | AM_RANGE(0xa000, 0xa000) AM_WRITE(&AY8910_control_port_0_w) |
| 35 | 35 | AM_RANGE(0xa001, 0xa001) AM_WRITE(&AY8910_write_port_0_w) |
| 36 | 36 | AM_RANGE(0xa002, 0xa002) AM_WRITE(&AY8910_control_port_1_w) |
| r1527 | r1528 | |
| 184 | 184 | MDRV_COLORTABLE_LENGTH(32*16) |
| 185 | 185 | |
| 186 | 186 | MDRV_PALETTE_INIT(nova2001) |
| 187 | MDRV_VIDEO_START(generic) | |
| 188 | 187 | MDRV_VIDEO_UPDATE(pkunwar) |
| 189 | 188 | |
| 190 | 189 | /* sound hardware */ |
| r1527 | r1528 | |
|---|---|---|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | |
| 155 | static UINT | |
| 155 | static CUSTOM_INPUT( | |
| 156 | 156 | { |
| 157 | 157 | int scanline = video_screen_get_vpos(0); |
| 158 | 158 | return (~syncprom[scanline & 0xff] >> 1) & 1; |
| r1527 | r1528 | |
|---|---|---|
| 481 | 481 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 482 | 482 | MDRV_CPU_VBLANK_INT(chl_interrupt,4) |
| 483 | 483 | |
| 484 | MDRV_CPU_ADD(M68705,2500000 | |
| 484 | MDRV_CPU_ADD(M68705,2500000 | |
| 485 | 485 | MDRV_CPU_PROGRAM_MAP(mcu_readmem,mcu_writemem) |
| 486 | 486 | |
| 487 | 487 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
|---|---|---|
| 885 | 885 | static MACHINE_DRIVER_START( asuka ) |
| 886 | 886 | |
| 887 | 887 | /* basic machine hardware */ |
| 888 | MDRV_CPU_ADD(M68000, | |
| 888 | MDRV_CPU_ADD(M68000, XTAL_16MHz/2) /* verified on | |
| 889 | 889 | MDRV_CPU_PROGRAM_MAP(asuka_readmem,asuka_writemem) |
| 890 | 890 | MDRV_CPU_VBLANK_INT(irq5_line_hold,1) |
| 891 | 891 | |
| 892 | MDRV_CPU_ADD(Z80, 4 | |
| 892 | MDRV_CPU_ADD(Z80, XTAL_16MHz/4 | |
| 893 | 893 | MDRV_CPU_PROGRAM_MAP(z80_readmem,z80_writemem) |
| 894 | 894 | |
| 895 | 895 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 911 | 911 | /* sound hardware */ |
| 912 | 912 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 913 | 913 | |
| 914 | MDRV_SOUND_ADD(YM2151, 4 | |
| 914 | MDRV_SOUND_ADD(YM2151, XTAL_16MHz/4 | |
| 915 | 915 | MDRV_SOUND_CONFIG(ym2151_interface) |
| 916 | 916 | MDRV_SOUND_ROUTE(0, "mono", 0.50) |
| 917 | 917 | MDRV_SOUND_ROUTE(1, "mono", 0.50) |
| 918 | 918 | |
| 919 | MDRV_SOUND_ADD(MSM5205, 384 | |
| 919 | MDRV_SOUND_ADD(MSM5205, XTAL_384kHz) /* verified on pcb */ | |
| 920 | 920 | MDRV_SOUND_CONFIG(msm5205_interface) |
| 921 | 921 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 922 | 922 | MACHINE_DRIVER_END |
| r1527 | r1528 | |
| 924 | 924 | static MACHINE_DRIVER_START( cadash ) |
| 925 | 925 | |
| 926 | 926 | /* basic machine hardware */ |
| 927 | MDRV_CPU_ADD(M68000, | |
| 927 | MDRV_CPU_ADD(M68000, XTAL_32MHz/2 | |
| 928 | 928 | MDRV_CPU_PROGRAM_MAP(cadash_readmem,cadash_writemem) |
| 929 | 929 | MDRV_CPU_VBLANK_INT(cadash_interrupt,1) |
| 930 | 930 | |
| 931 | MDRV_CPU_ADD(Z80, | |
| 931 | MDRV_CPU_ADD(Z80, XTAL_8MHz/2) /* verified on | |
| 932 | 932 | MDRV_CPU_PROGRAM_MAP(z80_readmem,cadash_z80_writemem) |
| 933 | 933 | |
| 934 | 934 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1527 | r1528 | |
| 950 | 950 | /* sound hardware */ |
| 951 | 951 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 952 | 952 | |
| 953 | MDRV_SOUND_ADD(YM2151, | |
| 953 | MDRV_SOUND_ADD(YM2151, XTAL_8MHz/2) /* verified on pcb */ | |
| 954 | 954 | MDRV_SOUND_CONFIG(ym2151_interface) |
| 955 | 955 | MDRV_SOUND_ROUTE(0, "mono", 0.50) |
| 956 | 956 | MDRV_SOUND_ROUTE(1, "mono", 0.50) |
| r1527 | r1528 | |
|---|---|---|
| 225 | 225 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 226 | 226 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 227 | 227 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 228 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_ | |
| 228 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 229 | 229 | INPUT_PORTS_END |
| 230 | 230 | |
| 231 | 231 |
| r1527 | r1528 | |
|---|---|---|
| 127 | 127 | |
| 128 | 128 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 129 | 129 | AM_RANGE(0x0000, 0x0fff) AM_READ(MRA8_RAM) |
| 130 | AM_RANGE(0x1000, 0x17ff) AM_READ(videoram_r) | |
| 131 | AM_RANGE(0x1800, 0x1fff) AM_READ(colorram_r) | |
| 130 | AM_RANGE(0x1000, 0x13ff) AM_READ(MRA8_RAM) | |
| 131 | AM_RANGE(0x1800, 0x1bff) AM_READ(MRA8_RAM) | |
| 132 | 132 | AM_RANGE(0x2000, 0x20ff) AM_READ(MRA8_RAM) |
| 133 | 133 | AM_RANGE(0x3000, 0x3000) AM_READ(input_port_0_r) |
| 134 | 134 | AM_RANGE(0x3001, 0x3001) AM_READ(input_port_1_r) |
| r1527 | r1528 | |
|---|---|---|
| 89 | 89 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 90 | 90 | AM_RANGE(0x6008, 0x600b) AM_READ(exerion_protection_r) |
| 91 | 91 | AM_RANGE(0x6000, 0x67ff) AM_RAM AM_BASE(&exerion_ram) |
| 92 | AM_RANGE(0x8000, 0x87ff) AM_R | |
| 92 | AM_RANGE(0x8000, 0x87ff) AM_R | |
| 93 | 93 | AM_RANGE(0x8800, 0x887f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 94 | 94 | AM_RANGE(0x8800, 0x8bff) AM_RAM |
| 95 | 95 | AM_RANGE(0xa000, 0xa000) AM_READ(exerion_port01_r) |
| r1527 | r1528 | |
|---|---|---|
| 272 | 272 | |
| 273 | 273 | INPUT_PORTS_END |
| 274 | 274 | |
| 275 | static INPUT_PORTS_START( ltcasin | |
| 275 | static INPUT_PORTS_START( ltcasinn ) | |
| 276 | 276 | PORT_START /* Q in service */ |
| 277 | 277 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) //start? |
| 278 | 278 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) |
| r1527 | r1528 | |
| 687 | 687 | ROM_END |
| 688 | 688 | |
| 689 | 689 | |
| 690 | ROM_START( ltcasin | |
| 690 | ROM_START( ltcasinn ) | |
| 691 | 691 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 692 | 692 | ROM_LOAD( "lc2_ra.bin", 0x8000, 0x1000, CRC(1a595442) SHA1(b8fe3e5ed2024a57187c0ce547c1bbef2429ed63) ) |
| 693 | 693 | ROM_LOAD( "lc2_rb.bin", 0x9000, 0x1000, CRC(4f5502c1) SHA1(cd1b7c08d26fed71c45e44ebd208bd18dc262e8f) ) |
| r1527 | r1528 | |
| 722 | 722 | |
| 723 | 723 | |
| 724 | 724 | |
| 725 | GAME( 1982, ltcasino, 0, ltcasino, ltcasino, 0, ROT0, "Digital Controls Inc.", "Little Casino", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) | |
| 725 | GAME( 1982, ltcasino, 0, ltcasino, ltcasino, 0, ROT0, "Digital Controls Inc.", "Little Casino (older)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) | |
| 726 | 726 | GAME( 1983, mv4in1, ltcasino, ltcasino, mv4in1, mv4in1, ROT0, "Entertainment Enterprises", "Mini Vegas 4in1", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) |
| 727 | GAME( 1984, ltcasin | |
| 727 | GAME( 1984, ltcasinn, 0, ltcasino, ltcasinn, 0, ROT0, "Digital Controls Inc.", "Little Casino (newer)", GAME_NOT_WORKING ) |
| r1527 | r1528 | |
|---|---|---|
| 68 | 68 | AM_RANGE(0x006a, 0x006b) AM_WRITE(subs_crash_w) |
| 69 | 69 | AM_RANGE(0x006c, 0x006d) AM_WRITE(subs_invert1_w) |
| 70 | 70 | AM_RANGE(0x006e, 0x006f) AM_WRITE(subs_invert2_w) |
| 71 | AM_RANGE(0x0090, 0x009f) AM_WRITE( | |
| 71 | AM_RANGE(0x0090, 0x009f) AM_WRITE(MWA8 | |
| 72 | 72 | AM_RANGE(0x0000, 0x07ff) AM_WRITE(MWA8_RAM) |
| 73 | AM_RANGE(0x0800, 0x0bff) AM_WRITE( | |
| 73 | AM_RANGE(0x0800, 0x0bff) AM_WRITE(MWA8 | |
| 74 | 74 | AM_RANGE(0x2000, 0x3fff) AM_WRITE(MWA8_ROM) |
| 75 | 75 | ADDRESS_MAP_END |
| 76 | 76 |
| r1527 | r1528 | |
|---|---|---|
| 3687 | 3687 | } |
| 3688 | 3688 | |
| 3689 | 3689 | |
| 3690 | /* Parameters: YM3812 frequency, Oki frequency, Oki memory region */ | |
| 3691 | SEIBU_SOUND_SYSTEM_YM3812_HARDWARE | |
| 3692 | ||
| 3693 | ||
| 3694 | 3690 | static MACHINE_DRIVER_START( tharrier ) |
| 3695 | 3691 | |
| 3696 | 3692 | /* basic machine hardware */ |
| r1527 | r1528 | |
| 4007 | 4003 | MDRV_CPU_VBLANK_INT(nmk_interrupt,2) |
| 4008 | 4004 | MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */ |
| 4009 | 4005 | |
| 4010 | MDRV_CPU_ADD(PIC16C57, | |
| 4006 | MDRV_CPU_ADD(PIC16C57, | |
| 4011 | 4007 | MDRV_CPU_FLAGS(CPU_DISABLE) |
| 4012 | 4008 | |
| 4013 | 4009 | MDRV_SCREEN_REFRESH_RATE(56) |
| r1527 | r1528 | |
|---|---|---|
| 899 | 899 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 900 | 900 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 901 | 901 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 902 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = M6805_CLOCK_DIVIDER; break; | |
| 902 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 903 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 4; break; | |
| 903 | 904 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 904 | 905 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; |
| 905 | 906 | case CPUINFO_INT_MIN_CYCLES: info->i = 2; break; |
| r1527 | r1528 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | #define M6805_IRQ_LINE 0 |
| 11 | 11 | |
| 12 | #define M6805_CLOCK_DIVIDER 4 | |
| 13 | ||
| 14 | 12 | extern void m6805_get_info(UINT32 state, cpuinfo *info); |
| 15 | 13 | |
| 16 | 14 | /**************************************************************************** |
| r1527 | r1528 | |
| 28 | 26 | #define M68705_IRQ_LINE M6805_IRQ_LINE |
| 29 | 27 | #define M68705_INT_TIMER 0x01 |
| 30 | 28 | |
| 31 | #define M68705_CLOCK_DIVIDER M6805_CLOCK_DIVIDER | |
| 32 | ||
| 33 | 29 | extern void m68705_get_info(UINT32 state, cpuinfo *info); |
| 34 | 30 | #endif |
| 35 | 31 | |
| r1527 | r1528 | |
| 59 | 55 | #define HD63705_INT_ADCONV 0x07 |
| 60 | 56 | #define HD63705_INT_NMI 0x08 |
| 61 | 57 | |
| 62 | #define HD3705_CLOCK_DIVIDER M6805_CLOCK_DIVIDER | |
| 63 | ||
| 64 | 58 | extern void hd63705_get_info(UINT32 state, cpuinfo *info); |
| 65 | 59 | #endif |
| 66 | 60 |
| r1527 | r1528 | |
|---|---|---|
| 1047 | 1047 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 1048 | 1048 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 1049 | 1049 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1050 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1050 | 1051 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1051 | 1052 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 1052 | 1053 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 5; break; |
| r1527 | r1528 | |
|---|---|---|
| 192 | 192 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 193 | 193 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 194 | 194 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 195 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 195 | 196 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 196 | 197 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 197 | 198 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 5; break; |
| r1527 | r1528 | |
|---|---|---|
| 1129 | 1129 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 1130 | 1130 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1131 | 1131 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 1132 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1132 | 1133 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1133 | 1134 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 1134 | 1135 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 5; break; |
| r1527 | r1528 | |
| 1218 | 1219 | switch (state) |
| 1219 | 1220 | { |
| 1220 | 1221 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 1222 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1221 | 1223 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 4; break; |
| 1222 | 1224 | |
| 1223 | 1225 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| r1527 | r1528 | |
|---|---|---|
| 3828 | 3828 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 3829 | 3829 | case CPUINFO_STR_FLAGS: strcpy(info->s, h8_get_ccr_str()); break; |
| 3830 | 3830 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 3831 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 3832 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; | |
| 3831 | 3833 | case CPUINFO_INT_INPUT_LINES: info->i = 16; break; |
| 3832 | 3834 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = -1; break; |
| 3833 | 3835 |
| r1527 | r1528 | |
|---|---|---|
| 510 | 510 | case CPUINFO_INT_INPUT_LINES: info->i = 8; break; |
| 511 | 511 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = -1; break; |
| 512 | 512 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 513 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 513 | 514 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 514 | 515 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 515 | 516 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 10; break; |
| r1527 | r1528 | |
| 689 | 690 | case CPUINFO_INT_INPUT_LINES: info->i = 8; break; |
| 690 | 691 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = -1; break; |
| 691 | 692 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 693 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 692 | 694 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 693 | 695 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 694 | 696 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 10; break; |
| r1527 | r1528 | |
| 923 | 925 | case CPUINFO_INT_INPUT_LINES: info->i = 8; break; |
| 924 | 926 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = -1; break; |
| 925 | 927 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 928 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 926 | 929 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 927 | 930 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 928 | 931 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 16; break; |
| r1527 | r1528 | |
| 1164 | 1167 | case CPUINFO_INT_INPUT_LINES: info->i = 8; break; |
| 1165 | 1168 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = -1; break; |
| 1166 | 1169 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 1170 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1167 | 1171 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1168 | 1172 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 1169 | 1173 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 16; break; |
| r1527 | r1528 | |
|---|---|---|
| 717 | 717 | case CPUINFO_INT_INPUT_LINES: info->i = 0; break; |
| 718 | 718 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 719 | 719 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 720 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 720 | 721 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 721 | 722 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 722 | 723 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; |
| r1527 | r1528 | |
|---|---|---|
| 403 | 403 | case CPUINFO_INT_INPUT_LINES: info->i = 5; break; |
| 404 | 404 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 405 | 405 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 406 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 406 | 407 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 407 | 408 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 408 | 409 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 14 | 14 | #include "driver.h" |
| 15 | 15 | |
| 16 | 16 | |
| 17 | /* the TMS34010 input clock is divided by 8; the 34020 by 4 */ | |
| 18 | #define TMS34010_CLOCK_DIVIDER 8 | |
| 19 | #define TMS34020_CLOCK_DIVIDER 4 | |
| 20 | ||
| 21 | ||
| 22 | 17 | /* register indexes for get_reg and set_reg */ |
| 23 | 18 | enum |
| 24 | 19 | { |
| r1527 | r1528 | |
|---|---|---|
| 1508 | 1508 | /* have an IRQ handler. For this reason, we return it signalled a bit early in order */ |
| 1509 | 1509 | /* to make it past these loops. */ |
| 1510 | 1510 | if (SMART_IOREG(VCOUNT) + 1 == SMART_IOREG(DPYINT) && |
| 1511 | attotime_compare(timer_timeleft(state.scantimer), ATTOTIME_IN_HZ(40000000/ | |
| 1511 | attotime_compare(timer_timeleft(state.scantimer), ATTOTIME_IN_HZ(40000000/8 | |
| 1512 | 1512 | result |= TMS34010_DI; |
| 1513 | 1513 | return result; |
| 1514 | 1514 | } |
| r1527 | r1528 | |
| 1798 | 1798 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 1799 | 1799 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1800 | 1800 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1801 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = TMS34010_CLOCK_DIVIDER; break; | |
| 1801 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1802 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 8; break; | |
| 1802 | 1803 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 1803 | 1804 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 10; break; |
| 1804 | 1805 | case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; |
| r1527 | r1528 | |
| 1946 | 1947 | { |
| 1947 | 1948 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 1948 | 1949 | case CPUINFO_INT_CONTEXT_SIZE: info->i = TMS34020_STATE_SIZE; break; |
| 1949 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = TMS34020_CLOCK_DIVIDER; break; | |
| 1950 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1951 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 4; break; | |
| 1950 | 1952 | |
| 1951 | 1953 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 1952 | 1954 | case CPUINFO_PTR_GET_CONTEXT: info->getcontext = tms34020_get_context; break; |
| r1527 | r1528 | |
|---|---|---|
| 733 | 733 | case CPUINFO_INT_INPUT_LINES: info->i = 11; break; |
| 734 | 734 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 735 | 735 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 736 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 736 | 737 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 737 | 738 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 738 | 739 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 531 | 531 | CPUDEFS += -DHAS_I8039=$(if $(filter I8039,$(CPUS)),1,0) |
| 532 | 532 | CPUDEFS += -DHAS_I8048=$(if $(filter I8048,$(CPUS)),1,0) |
| 533 | 533 | CPUDEFS += -DHAS_N7751=$(if $(filter N7751,$(CPUS)),1,0) |
| 534 | CPUDEFS += -DHAS_MB8884=$(if $(filter MB8884,$(CPUS)),1,0) | |
| 535 | CPUDEFS += -DHAS_M58715=$(if $(filter M58715,$(CPUS)),1,0) | |
| 534 | 536 | |
| 535 | 537 | ifneq ($(filter I8035 I8039 I8048 N7751,$(CPUS)),) |
| 536 | 538 | OBJDIRS += $(CPUOBJ)/i8039 |
| r1527 | r1528 | |
| 764 | 766 | #------------------------------------------------- |
| 765 | 767 | |
| 766 | 768 | CPUDEFS += -DHAS_R3000=$(if $(filter R3000,$(CPUS)),1,0) |
| 769 | CPUDEFS += -DHAS_R3041=$(if $(filter R3041,$(CPUS)),1,0) | |
| 767 | 770 | |
| 768 | ifneq ($(filter R3000,$(CPUS)),) | |
| 771 | ifneq ($(filter R3000 R3041,$(CPUS)),) | |
| 769 | 772 | OBJDIRS += $(CPUOBJ)/mips |
| 770 | 773 | CPUOBJS += $(CPUOBJ)/mips/r3000.o |
| 771 | 774 | DBGOBJS += $(CPUOBJ)/mips/r3kdasm.o |
| r1527 | r1528 | |
|---|---|---|
| 1174 | 1174 | case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(m37710i_cpu); break; |
| 1175 | 1175 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1176 | 1176 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1177 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1177 | 1178 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1178 | 1179 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 1179 | 1180 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 6; break; |
| r1527 | r1528 | |
|---|---|---|
| 965 | 965 | case CPUINFO_INT_INPUT_LINES: info->i = 32; break; |
| 966 | 966 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 967 | 967 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 968 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 968 | 969 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 969 | 970 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 8; break; |
| 970 | 971 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 8; break; |
| r1527 | r1528 | |
|---|---|---|
| 2461 | 2461 | case CPUINFO_INT_INPUT_LINES: info->i = 3; break; |
| 2462 | 2462 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 2463 | 2463 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 2464 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2464 | 2465 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 2465 | 2466 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 2466 | 2467 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 383 | 383 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 384 | 384 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 385 | 385 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 386 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 386 | 387 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 387 | 388 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 388 | 389 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 15; break; |
| r1527 | r1528 | |
| 521 | 522 | { |
| 522 | 523 | switch (state) |
| 523 | 524 | { |
| 525 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 526 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 527 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 2; break; | |
| 528 | ||
| 524 | 529 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 525 | 530 | case CPUINFO_PTR_EXECUTE: info->execute = i80186_execute; break; |
| 526 | 531 |
| r1527 | r1528 | |
|---|---|---|
| 384 | 384 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 385 | 385 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 386 | 386 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 387 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 387 | 388 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 388 | 389 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 389 | 390 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 8; break; |
| r1527 | r1528 | |
|---|---|---|
| 1832 | 1832 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 1833 | 1833 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1834 | 1834 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1835 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1835 | 1836 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1836 | 1837 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 1837 | 1838 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 177 | 177 | case CPUINFO_INT_INPUT_LINES: info->i = 0; break; |
| 178 | 178 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 179 | 179 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 180 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 180 | 181 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 181 | 182 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 182 | 183 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 238 | 238 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 239 | 239 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 240 | 240 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 241 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 241 | 242 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 242 | 243 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 243 | 244 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 5; break; |
| r1527 | r1528 | |
|---|---|---|
| 549 | 549 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 550 | 550 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 551 | 551 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 552 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 552 | 553 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 553 | 554 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 554 | 555 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 22; break; |
| r1527 | r1528 | |
|---|---|---|
| 1751 | 1751 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 1752 | 1752 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1753 | 1753 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1754 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1754 | 1755 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1755 | 1756 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 1756 | 1757 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; |
| r1527 | r1528 | |
|---|---|---|
| 1147 | 1147 | case CPUINFO_INT_INPUT_LINES: info->i = 4; break; |
| 1148 | 1148 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1149 | 1149 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1150 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1150 | 1151 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1151 | 1152 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 1152 | 1153 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 25 | 25 | (Each instruction cycle passes through 5 machine states). |
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | #define I8039_CLOCK_DIVIDER (3*5) | |
| 29 | 28 | |
| 30 | ||
| 31 | ||
| 32 | 29 | enum { I8039_PC=1, I8039_SP, I8039_PSW, I8039_A, I8039_TC, |
| 33 | 30 | I8039_P1, I8039_P2, I8039_R0, I8039_R1, I8039_R2, |
| 34 | I8039_R3, I8039_R4, I8039_R5, I8039_R6, I8039_R7 | |
| 31 | I8039_R3, I8039_R4, I8039_R5, I8039_R6, I8039_R7, | |
| 32 | I8039_EA | |
| 35 | 33 | }; |
| 36 | 34 | |
| 37 | 35 | extern void i8039_get_info(UINT32 state, cpuinfo *info); |
| r1527 | r1528 | |
| 49 | 47 | #define I8039_p7 0x107 |
| 50 | 48 | #define I8039_t0 0x110 |
| 51 | 49 | #define I8039_t1 0x111 |
| 50 | /* EA is activelow input on real hardware. It is treated | |
| 51 | * as active high here to remain compatible with existing drivers! */ | |
| 52 | #define I8039_ea 0x112 | |
| 52 | 53 | #define I8039_bus 0x120 |
| 53 | 54 | |
| 54 | 55 | /************************************************************************** |
| r1527 | r1528 | |
| 71 | 72 | #define I8035_R6 I8039_R6 |
| 72 | 73 | #define I8035_R7 I8039_R7 |
| 73 | 74 | |
| 74 | #define I8035_CLOCK_DIVIDER I8039_CLOCK_DIVIDER | |
| 75 | 75 | #define i8035_ICount i8039_ICount |
| 76 | 76 | |
| 77 | 77 | extern void i8035_get_info(UINT32 state, cpuinfo *info); |
| r1527 | r1528 | |
| 97 | 97 | #define I8048_R6 I8039_R6 |
| 98 | 98 | #define I8048_R7 I8039_R7 |
| 99 | 99 | |
| 100 | #define I8048_CLOCK_DIVIDER I8039_CLOCK_DIVIDER | |
| 101 | 100 | #define i8048_ICount i8039_ICount |
| 102 | 101 | |
| 103 | 102 | extern void i8048_get_info(UINT32 state, cpuinfo *info); |
| r1527 | r1528 | |
| 123 | 122 | #define N7751_R6 I8039_R6 |
| 124 | 123 | #define N7751_R7 I8039_R7 |
| 125 | 124 | |
| 126 | #define N7751_CLOCK_DIVIDER I8039_CLOCK_DIVIDER | |
| 127 | 125 | #define n7751_ICount i8039_ICount |
| 128 | 126 | |
| 129 | 127 | extern void n7751_get_info(UINT32 state, cpuinfo *info); |
| 130 | 128 | #endif |
| 131 | 129 | |
| 130 | /************************************************************************** | |
| 131 | * MB8884 section | |
| 132 | **************************************************************************/ | |
| 133 | #if (HAS_MB8884) | |
| 134 | #define MB8884_PC I8039_PC | |
| 135 | #define MB8884_SP I8039_SP | |
| 136 | #define MB8884_PSW I8039_PSW | |
| 137 | #define MB8884_A I8039_A | |
| 138 | #define MB8884_TC I8039_TC | |
| 139 | #define MB8884_P1 I8039_P1 | |
| 140 | #define MB8884_P2 I8039_P2 | |
| 141 | #define MB8884_R0 I8039_R0 | |
| 142 | #define MB8884_R1 I8039_R1 | |
| 143 | #define MB8884_R2 I8039_R2 | |
| 144 | #define MB8884_R3 I8039_R3 | |
| 145 | #define MB8884_R4 I8039_R4 | |
| 146 | #define MB8884_R5 I8039_R5 | |
| 147 | #define MB8884_R6 I8039_R6 | |
| 148 | #define MB8884_R7 I8039_R7 | |
| 149 | ||
| 150 | #define mb8884_ICount i8039_ICount | |
| 151 | ||
| 152 | extern void mb8884_get_info(UINT32 state, cpuinfo *info); | |
| 153 | #endif | |
| 154 | ||
| 155 | /************************************************************************** | |
| 156 | * M58715 section | |
| 157 | **************************************************************************/ | |
| 158 | #if (HAS_M58715) | |
| 159 | #define M58715_PC I8039_PC | |
| 160 | #define M58715_SP I8039_SP | |
| 161 | #define M58715_PSW I8039_PSW | |
| 162 | #define M58715_A I8039_A | |
| 163 | #define M58715_TC I8039_TC | |
| 164 | #define M58715_P1 I8039_P1 | |
| 165 | #define M58715_P2 I8039_P2 | |
| 166 | #define M58715_R0 I8039_R0 | |
| 167 | #define M58715_R1 I8039_R1 | |
| 168 | #define M58715_R2 I8039_R2 | |
| 169 | #define M58715_R3 I8039_R3 | |
| 170 | #define M58715_R4 I8039_R4 | |
| 171 | #define M58715_R5 I8039_R5 | |
| 172 | #define M58715_R6 I8039_R6 | |
| 173 | #define M58715_R7 I8039_R7 | |
| 174 | ||
| 175 | #define m58715_ICount i8039_ICount | |
| 176 | ||
| 177 | extern void m58715_get_info(UINT32 state, cpuinfo *info); | |
| 178 | #endif | |
| 179 | ||
| 132 | 180 | /* |
| 133 | 181 | * Input a UINT8 from given I/O port |
| 134 | 182 | */ |
| r1527 | r1528 | |
|---|---|---|
| 50 | 50 | #define ADJUST_CYCLES { } /* User Manual cycles setting */ |
| 51 | 51 | #endif |
| 52 | 52 | |
| 53 | /* There are certain differences between the processors */ | |
| 54 | #define FEATURE_M58715 1 | |
| 53 | 55 | |
| 54 | ||
| 55 | 56 | /* HJB 01/05/99 changed to positive values to use pending_irq as a flag */ |
| 56 | 57 | #define I8039_NO_INT 0 /* No Interrupts pending or executing */ |
| 57 | 58 | #define I8039_EXTERNAL_INT 1 /* Execute a normal external interrupt */ |
| r1527 | r1528 | |
| 62 | 63 | static int Timer_IRQ(void); |
| 63 | 64 | |
| 64 | 65 | #define M_RDMEM(A) I8039_RDMEM(A) |
| 65 | #define M_RDOP(A) I8039_RDOP(A) | |
| 66 | #define M_RDOP_ARG(A) I8039_RDOP_ARG(A) | |
| 66 | //#define M_RDOP(A) I8039_RDOP(A) | |
| 67 | //#define M_RDOP_ARG(A) I8039_RDOP_ARG(A) | |
| 67 | 68 | #define M_IN(A) I8039_In(A) |
| 68 | 69 | #define M_OUT(A,V) I8039_Out(A,V) |
| 69 | 70 | |
| r1527 | r1528 | |
| 74 | 75 | #define bus_r() I8039_In(I8039_bus) |
| 75 | 76 | #define bus_w(V) I8039_Out(I8039_bus,V) |
| 76 | 77 | |
| 78 | #define INTRAM_R(A) (intRAM[(A) & R.ram_mask]) | |
| 79 | #define INTRAM_W(A,V) do { intRAM[(A) & R.ram_mask] = V; } while (0); | |
| 80 | ||
| 77 | 81 | #define C_FLAG 0x80 |
| 78 | 82 | #define A_FLAG 0x40 |
| 79 | 83 | #define F_FLAG 0x20 |
| r1527 | r1528 | |
| 87 | 91 | UINT8 RAM[128]; |
| 88 | 92 | UINT8 bus, f1; /* Bus data, and flag1 */ |
| 89 | 93 | UINT8 P1, P2; /* Internal Port 1 and 2 latched outputs */ |
| 90 | ||
| 94 | UINT8 EA; /* latched EA input */ | |
| 95 | UINT8 cpu_feature; /* process feature */ | |
| 96 | UINT8 ram_mask; /* internal ram size - 1 */ | |
| 97 | UINT16 int_rom_size; /* internal rom size */ | |
| 91 | 98 | UINT8 pending_irq, irq_executing, masterClock, regPtr; |
| 92 | 99 | UINT8 t_flag, timer, timerON, countON, xirq_en, tirq_en; |
| 93 | 100 | UINT16 A11; |
| 94 | 101 | UINT8 irq_state, irq_extra_cycles; |
| 95 | 102 | int (*irq_callback)(int irqline); |
| 103 | int inst_cycles; | |
| 96 | 104 | UINT8 Old_T1; |
| 97 | 105 | } I8039_Regs; |
| 98 | 106 | |
| 99 | 107 | static I8039_Regs R; |
| 100 | 108 | static int i8039_ICount; |
| 101 | static int inst_cycles; | |
| 102 | 109 | |
| 103 | 110 | /* The opcode table now is a combination of cycle counts and function pointers */ |
| 104 | 111 | typedef struct { |
| r1527 | r1528 | |
| 130 | 137 | #define R6 intRAM[regPTR+6] |
| 131 | 138 | #define R7 intRAM[regPTR+7] |
| 132 | 139 | |
| 140 | INLINE UINT8 ea_r(void) | |
| 141 | { | |
| 142 | R.EA = I8039_In(I8039_ea); | |
| 143 | return R.EA; | |
| 144 | } | |
| 133 | 145 | |
| 146 | INLINE UINT8 M_RDOP(int A) | |
| 147 | { | |
| 148 | if (R.cpu_feature & FEATURE_M58715) | |
| 149 | if ((A<R.int_rom_size) && !ea_r()) | |
| 150 | return 0x00; | |
| 151 | return I8039_RDOP(A); | |
| 152 | } | |
| 153 | ||
| 154 | INLINE UINT8 M_RDOP_ARG(int A) | |
| 155 | { | |
| 156 | if (R.cpu_feature & FEATURE_M58715) | |
| 157 | if ((A<R.int_rom_size) && !ea_r()) | |
| 158 | return 0x00; | |
| 159 | return I8039_RDOP_ARG(A); | |
| 160 | } | |
| 161 | ||
| 134 | 162 | INLINE void CLR (UINT8 flag) { R.PSW &= ~flag; } |
| 135 | 163 | INLINE void SET (UINT8 flag) { R.PSW |= flag; } |
| 136 | 164 | |
| r1527 | r1528 | |
| 205 | 233 | INLINE void M_XCHD(UINT8 addr) |
| 206 | 234 | { |
| 207 | 235 | UINT8 dat = R.A & 0x0f; |
| 236 | UINT8 val = INTRAM_R(addr); | |
| 208 | 237 | R.A &= 0xf0; |
| 209 | R.A |= intRAM[addr] & 0x0f; | |
| 210 | intRAM[addr] &= 0xf0; | |
| 211 | intRAM[addr] |= dat; | |
| 238 | R.A |= val & 0x0f; | |
| 239 | val &= 0xf0; | |
| 240 | val |= dat; | |
| 241 | INTRAM_W(addr, val); | |
| 212 | 242 | } |
| 213 | 243 | |
| 214 | 244 | |
| r1527 | r1528 | |
| 233 | 263 | static void add_a_r5(void) { M_ADD(R5); } |
| 234 | 264 | static void add_a_r6(void) { M_ADD(R6); } |
| 235 | 265 | static void add_a_r7(void) { M_ADD(R7); } |
| 236 | static void add_a_xr0(void) { M_ADD(intRAM[R0 & 0x7f]); } | |
| 237 | static void add_a_xr1(void) { M_ADD(intRAM[R1 & 0x7f]); } | |
| 266 | static void add_a_xr0(void) { M_ADD(INTRAM_R(R0)); } | |
| 267 | static void add_a_xr1(void) { M_ADD(INTRAM_R(R1)); } | |
| 238 | 268 | static void adc_a_n(void) { M_ADDC(M_RDMEM_OPCODE()); } |
| 239 | 269 | static void adc_a_r0(void) { M_ADDC(R0); } |
| 240 | 270 | static void adc_a_r1(void) { M_ADDC(R1); } |
| r1527 | r1528 | |
| 244 | 274 | static void adc_a_r5(void) { M_ADDC(R5); } |
| 245 | 275 | static void adc_a_r6(void) { M_ADDC(R6); } |
| 246 | 276 | static void adc_a_r7(void) { M_ADDC(R7); } |
| 247 | static void adc_a_xr0(void) { M_ADDC(intRAM[R0 & 0x7f]); } | |
| 248 | static void adc_a_xr1(void) { M_ADDC(intRAM[R1 & 0x7f]); } | |
| 277 | static void adc_a_xr0(void) { M_ADDC(INTRAM_R(R0)); } | |
| 278 | static void adc_a_xr1(void) { M_ADDC(INTRAM_R(R1)); } | |
| 249 | 279 | static void anl_a_n(void) { R.A &= M_RDMEM_OPCODE(); } |
| 250 | 280 | static void anl_a_r0(void) { R.A &= R0; } |
| 251 | 281 | static void anl_a_r1(void) { R.A &= R1; } |
| r1527 | r1528 | |
| 255 | 285 | static void anl_a_r5(void) { R.A &= R5; } |
| 256 | 286 | static void anl_a_r6(void) { R.A &= R6; } |
| 257 | 287 | static void anl_a_r7(void) { R.A &= R7; } |
| 258 | static void anl_a_xr0(void) { R.A &= intRAM[R0 & 0x7f]; } | |
| 259 | static void anl_a_xr1(void) { R.A &= intRAM[R1 & 0x7f]; } | |
| 288 | static void anl_a_xr0(void) { R.A &= INTRAM_R(R0); } | |
| 289 | static void anl_a_xr1(void) { R.A &= INTRAM_R(R1); } | |
| 260 | 290 | static void anl_bus_n(void) { bus_w( bus_r() & M_RDMEM_OPCODE() ); } |
| 261 | static void anl_p1_n(void) { R.P1 &= M_RDMEM_OPCODE(); port_w( 1, R.P1 ); } | |
| 262 | static void anl_p2_n(void) { R.P2 &= M_RDMEM_OPCODE(); port_w( 2, R.P2 ); } | |
| 263 | static void anld_p4_a(void) { port_w( 4, port_r(4) & M_RDMEM_OPCODE() ); } | |
| 264 | static void anld_p5_a(void) { port_w( 5, port_r(5) & M_RDMEM_OPCODE() ); } | |
| 265 | static void anld_p6_a(void) { port_w( 6, port_r(6) & M_RDMEM_OPCODE() ); } | |
| 266 | static void anld_p7_a(void) { port_w( 7, port_r(7) & M_RDMEM_OPCODE() ); } | |
| 291 | ||
| 292 | static void anl_p1_n(void) | |
| 293 | { | |
| 294 | R.P1 &= M_RDMEM_OPCODE(); | |
| 295 | port_w( 1, R.P1 ); | |
| 296 | } | |
| 297 | ||
| 298 | static void anl_p2_n(void) | |
| 299 | { | |
| 300 | R.P2 &= M_RDMEM_OPCODE(); | |
| 301 | port_w( 2, R.P2 ); | |
| 302 | } | |
| 303 | ||
| 304 | static void anld_p4_a(void) { port_w( 4, (port_r(4) & M_RDMEM_OPCODE()) & 0x0f ); } | |
| 305 | static void anld_p5_a(void) { port_w( 5, (port_r(5) & M_RDMEM_OPCODE()) & 0x0f ); } | |
| 306 | static void anld_p6_a(void) { port_w( 6, (port_r(6) & M_RDMEM_OPCODE()) & 0x0f ); } | |
| 307 | static void anld_p7_a(void) { port_w( 7, (port_r(7) & M_RDMEM_OPCODE()) & 0x0f ); } | |
| 267 | 308 | static void call(void) { UINT8 i=M_RDMEM_OPCODE(); UINT16 a11 = (R.irq_executing == I8039_NO_INT) ? R.A11 : 0; M_CALL(i | a11); } |
| 268 | 309 | static void call_1(void) { UINT8 i=M_RDMEM_OPCODE(); UINT16 a11 = (R.irq_executing == I8039_NO_INT) ? R.A11 : 0; M_CALL(i | 0x100 | a11); } |
| 269 | 310 | static void call_2(void) { UINT8 i=M_RDMEM_OPCODE(); UINT16 a11 = (R.irq_executing == I8039_NO_INT) ? R.A11 : 0; M_CALL(i | 0x200 | a11); } |
| r1527 | r1528 | |
| 314 | 355 | static void inc_r5(void) { R5++; } |
| 315 | 356 | static void inc_r6(void) { R6++; } |
| 316 | 357 | static void inc_r7(void) { R7++; } |
| 317 | static void inc_xr0(void) { intRAM[R0 & 0x7f]++; } | |
| 318 | static void inc_xr1(void) { intRAM[R1 & 0x7f]++; } | |
| 358 | static void inc_xr0(void) { INTRAM_W(R0, INTRAM_R(R0) + 1); } | |
| 359 | static void inc_xr1(void) { INTRAM_W(R1, INTRAM_R(R1) + 1); } | |
| 319 | 360 | |
| 320 | 361 | static void jmp(void) |
| 321 | 362 | { |
| r1527 | r1528 | |
| 370 | 411 | static void mov_a_r6(void) { R.A = R6; } |
| 371 | 412 | static void mov_a_r7(void) { R.A = R7; } |
| 372 | 413 | static void mov_a_psw(void) { R.A = R.PSW; } |
| 373 | static void mov_a_xr0(void) { R.A = intRAM[R0 & 0x7f]; } | |
| 374 | static void mov_a_xr1(void) { R.A = intRAM[R1 & 0x7f]; } | |
| 414 | static void mov_a_xr0(void) { R.A = INTRAM_R(R0); } | |
| 415 | static void mov_a_xr1(void) { R.A = INTRAM_R(R1); } | |
| 375 | 416 | static void mov_r0_a(void) { R0 = R.A; } |
| 376 | 417 | static void mov_r1_a(void) { R1 = R.A; } |
| 377 | 418 | static void mov_r2_a(void) { R2 = R.A; } |
| r1527 | r1528 | |
| 391 | 432 | static void mov_r7_n(void) { R7 = M_RDMEM_OPCODE(); } |
| 392 | 433 | static void mov_a_t(void) { R.A = R.timer; } |
| 393 | 434 | static void mov_t_a(void) { R.timer = R.A; } |
| 394 | static void mov_xr0_a(void) { intRAM[R0 & 0x7f] = R.A; } | |
| 395 | static void mov_xr1_a(void) { intRAM[R1 & 0x7f] = R.A; } | |
| 396 | static void mov_xr0_n(void) { intRAM[R0 & 0x7f] = M_RDMEM_OPCODE(); } | |
| 397 | static void mov_xr1_n(void) { intRAM[R1 & 0x7f] = M_RDMEM_OPCODE(); } | |
| 398 | static void movd_a_p4(void) { R.A = port_r(4); } | |
| 399 | static void movd_a_p5(void) { R.A = port_r(5); } | |
| 400 | static void movd_a_p6(void) { R.A = port_r(6); } | |
| 401 | static void movd_a_p7(void) { R.A = port_r(7); } | |
| 402 | static void movd_p4_a(void) { port_w(4, R.A); } | |
| 403 | static void movd_p5_a(void) { port_w(5, R.A); } | |
| 404 | static void movd_p6_a(void) { port_w(6, R.A); } | |
| 405 | static void movd_p7_a(void) { port_w(7, R.A); } | |
| 435 | static void mov_xr0_a(void) { INTRAM_W(R0, R.A); } | |
| 436 | static void mov_xr1_a(void) { INTRAM_W(R1, R.A); } | |
| 437 | static void mov_xr0_n(void) { INTRAM_W(R0, M_RDMEM_OPCODE()); } | |
| 438 | static void mov_xr1_n(void) { INTRAM_W(R1, M_RDMEM_OPCODE()); } | |
| 439 | static void movd_a_p4(void) { R.A = port_r(4) & 0x0F; } | |
| 440 | static void movd_a_p5(void) { R.A = port_r(5) & 0x0F; } | |
| 441 | static void movd_a_p6(void) { R.A = port_r(6) & 0x0F; } | |
| 442 | static void movd_a_p7(void) { R.A = port_r(7) & 0x0F; } | |
| 443 | static void movd_p4_a(void) { port_w(4, R.A & 0x0F); } | |
| 444 | static void movd_p5_a(void) { port_w(5, R.A & 0x0F); } | |
| 445 | static void movd_p6_a(void) { port_w(6, R.A & 0x0F); } | |
| 446 | static void movd_p7_a(void) { port_w(7, R.A & 0x0F); } | |
| 406 | 447 | static void movp_a_xa(void) { R.A = M_RDMEM((R.PC.w.l & 0x0f00) | R.A); } |
| 407 | 448 | static void movp3_a_xa(void) { R.A = M_RDMEM(0x300 | R.A); } |
| 408 | 449 | static void movx_a_xr0(void) { R.A = M_IN(R0); } |
| r1527 | r1528 | |
| 419 | 460 | static void orl_a_r5(void) { R.A |= R5; } |
| 420 | 461 | static void orl_a_r6(void) { R.A |= R6; } |
| 421 | 462 | static void orl_a_r7(void) { R.A |= R7; } |
| 422 | static void orl_a_xr0(void) { R.A |= intRAM[R0 & 0x7f]; } | |
| 423 | static void orl_a_xr1(void) { R.A |= intRAM[R1 & 0x7f]; } | |
| 463 | static void orl_a_xr0(void) { R.A |= INTRAM_R(R0); } | |
| 464 | static void orl_a_xr1(void) { R.A |= INTRAM_R(R1); } | |
| 424 | 465 | static void orl_bus_n(void) { bus_w( bus_r() | M_RDMEM_OPCODE() ); } |
| 425 | static void orl_p1_n(void) { R.P1 |= M_RDMEM_OPCODE(); port_w(1, R.P1); } | |
| 426 | static void orl_p2_n(void) { R.P2 |= M_RDMEM_OPCODE(); port_w(2, R.P2); } | |
| 466 | static void orl_p1_n(void) | |
| 467 | { | |
| 468 | R.P1 |= M_RDMEM_OPCODE(); | |
| 469 | port_w(1, R.P1); | |
| 470 | } | |
| 471 | ||
| 472 | static void orl_p2_n(void) | |
| 473 | { | |
| 474 | R.P2 |= M_RDMEM_OPCODE(); | |
| 475 | port_w(2, R.P2); | |
| 476 | } | |
| 477 | ||
| 427 | 478 | static void orld_p4_a(void) { port_w(4, port_r(4) | R.A ); } |
| 428 | 479 | static void orld_p5_a(void) { port_w(5, port_r(5) | R.A ); } |
| 429 | 480 | static void orld_p6_a(void) { port_w(6, port_r(6) | R.A ); } |
| r1527 | r1528 | |
| 473 | 524 | static void xch_a_r5(void) { UINT8 i=R.A; R.A=R5; R5=i; } |
| 474 | 525 | static void xch_a_r6(void) { UINT8 i=R.A; R.A=R6; R6=i; } |
| 475 | 526 | static void xch_a_r7(void) { UINT8 i=R.A; R.A=R7; R7=i; } |
| 476 | static void xch_a_xr0(void) { UINT8 i=R.A; R.A=intRAM[R0 & 0x7f]; intRAM[R0 & 0x7f]=i; } | |
| 477 | static void xch_a_xr1(void) { UINT8 i=R.A; R.A=intRAM[R1 & 0x7f]; intRAM[R1 & 0x7f]=i; } | |
| 478 | static void xchd_a_xr0(void) { M_XCHD(R0 & 0x7f); } | |
| 479 | static void xchd_a_xr1(void) { M_XCHD(R1 & 0x7f); } | |
| 527 | static void xch_a_xr0(void) { UINT8 i=R.A; R.A=INTRAM_R(R0); INTRAM_W(R0, i); } | |
| 528 | static void xch_a_xr1(void) { UINT8 i=R.A; R.A=INTRAM_R(R1); INTRAM_W(R1, i); } | |
| 529 | static void xchd_a_xr0(void) { M_XCHD(R0); } | |
| 530 | static void xchd_a_xr1(void) { M_XCHD(R1); } | |
| 480 | 531 | static void xrl_a_n(void) { R.A ^= M_RDMEM_OPCODE(); } |
| 481 | 532 | static void xrl_a_r0(void) { R.A ^= R0; } |
| 482 | 533 | static void xrl_a_r1(void) { R.A ^= R1; } |
| r1527 | r1528 | |
| 486 | 537 | static void xrl_a_r5(void) { R.A ^= R5; } |
| 487 | 538 | static void xrl_a_r6(void) { R.A ^= R6; } |
| 488 | 539 | static void xrl_a_r7(void) { R.A ^= R7; } |
| 489 | static void xrl_a_xr0(void) { R.A ^= intRAM[R0 & 0x7f]; } | |
| 490 | static void xrl_a_xr1(void) { R.A ^= intRAM[R1 & 0x7f]; } | |
| 540 | static void xrl_a_xr0(void) { R.A ^= INTRAM_R(R0); } | |
| 541 | static void xrl_a_xr1(void) { R.A ^= INTRAM_R(R1); } | |
| 491 | 542 | |
| 492 | 543 | static const s_opcode opcode_main[256]= |
| 493 | 544 | { |
| 494 | {1, nop },{0, illegal },{2, outl_bus_a },{2, add_a_n },{2, jmp },{1, en_i },{0, illegal },{1, dec_a }, | |
| 495 | {2, ins_a_bus },{2, in_a_p1 },{2, in_a_p2 },{0, illegal },{2, movd_a_p4 },{2, movd_a_p5 },{2, movd_a_p6 },{2, movd_a_p7 }, | |
| 496 | {1, inc_xr0 },{1, inc_xr1 },{2, jb_0 },{2, adc_a_n },{2, call },{1, dis_i },{2, jtf },{1, inc_a }, | |
| 497 | {1, inc_r0 },{1, inc_r1 },{1, inc_r2 },{1, inc_r3 },{1, inc_r4 },{1, inc_r5 },{1, inc_r6 },{1, inc_r7 }, | |
| 498 | {1, xch_a_xr0 },{1, xch_a_xr1 },{0, illegal },{2, mov_a_n },{2, jmp_1 },{1, en_tcnti },{2, jnt_0 },{1, clr_a }, | |
| 499 | {1, xch_a_r0 },{1, xch_a_r1 },{1, xch_a_r2 },{1, xch_a_r3 },{1, xch_a_r4 },{1, xch_a_r5 },{1, xch_a_r6 },{1, xch_a_r7 }, | |
| 500 | {1, xchd_a_xr0 },{1, xchd_a_xr1 },{2, jb_1 },{0, illegal },{2, call_1 },{1, dis_tcnti },{2, jt_0 },{1, cpl_a }, | |
| 501 | {0, illegal },{2, outl_p1_a },{2, outl_p2_a },{0, illegal },{2, movd_p4_a },{2, movd_p5_a },{2, movd_p6_a },{2, movd_p7_a }, | |
| 502 | {1, orl_a_xr0 },{1, orl_a_xr1 },{1, mov_a_t },{2, orl_a_n },{2, jmp_2 },{1, strt_cnt },{2, jnt_1 },{1, swap_a }, | |
| 503 | {1, orl_a_r0 },{1, orl_a_r1 },{1, orl_a_r2 },{1, orl_a_r3 },{1, orl_a_r4 },{1, orl_a_r5 },{1, orl_a_r6 },{1, orl_a_r7 }, | |
| 504 | {1, anl_a_xr0 },{1, anl_a_xr1 },{2, jb_2 },{2, anl_a_n },{2, call_2 },{1, strt_t },{2, jt_1 },{1, daa_a }, | |
| 505 | {1, anl_a_r0 },{1, anl_a_r1 },{1, anl_a_r2 },{1, anl_a_r3 },{1, anl_a_r4 },{1, anl_a_r5 },{1, anl_a_r6 },{1, anl_a_r7 }, | |
| 506 | {1, add_a_xr0 },{1, add_a_xr1 },{1, mov_t_a },{0, illegal },{2, jmp_3 },{1, stop_tcnt },{0, illegal },{1, rrc_a }, | |
| 507 | {1, add_a_r0 },{1, add_a_r1 },{1, add_a_r2 },{1, add_a_r3 },{1, add_a_r4 },{1, add_a_r5 },{1, add_a_r6 },{1, add_a_r7 }, | |
| 508 | {1, adc_a_xr0 },{1, adc_a_xr1 },{2, jb_3 },{0, illegal },{2, call_3 },{1, ento_clk },{2, jf1 },{1, rr_a }, | |
| 509 | {1, adc_a_r0 },{1, adc_a_r1 },{1, adc_a_r2 },{1, adc_a_r3 },{1, adc_a_r4 },{1, adc_a_r5 },{1, adc_a_r6 },{1, adc_a_r7 }, | |
| 510 | {2, movx_a_xr0 },{2, movx_a_xr1 },{0, illegal },{2, ret },{2, jmp_4 },{1, clr_f0 },{2, jni },{0, illegal }, | |
| 511 | {2, orl_bus_n },{2, orl_p1_n },{2, orl_p2_n },{0, illegal },{2, orld_p4_a },{2, orld_p5_a },{2, orld_p6_a },{2, orld_p7_a }, | |
| 512 | {2, movx_xr0_a },{2, movx_xr1_a },{2, jb_4 },{2, retr },{2, call_4 },{1, cpl_f0 },{2, jnz },{1, clr_c }, | |
| 513 | {2, anl_bus_n },{2, anl_p1_n },{2, anl_p2_n },{0, illegal },{2, anld_p4_a },{2, anld_p5_a },{2, anld_p6_a },{2, anld_p7_a }, | |
| 514 | {1, mov_xr0_a },{1, mov_xr1_a },{0, illegal },{2, movp_a_xa },{2, jmp_5 },{1, clr_f1 },{0, illegal },{1, cpl_c }, | |
| 515 | {1, mov_r0_a },{1, mov_r1_a },{1, mov_r2_a },{1, mov_r3_a },{1, mov_r4_a },{1, mov_r5_a },{1, mov_r6_a },{1, mov_r7_a }, | |
| 516 | {2, mov_xr0_n },{2, mov_xr1_n },{2, jb_5 },{2, jmpp_xa },{2, call_5 },{1, cpl_f1 },{2, jf0 },{0, illegal }, | |
| 517 | {2, mov_r0_n },{2, mov_r1_n },{2, mov_r2_n },{2, mov_r3_n },{2, mov_r4_n },{2, mov_r5_n },{2, mov_r6_n },{2, mov_r7_n }, | |
| 518 | {0, illegal },{0, illegal },{0, illegal },{0, illegal },{2, jmp_6 },{1, sel_rb0 },{2, jz },{1, mov_a_psw }, | |
| 519 | {1, dec_r0 },{1, dec_r1 },{1, dec_r2 },{1, dec_r3 },{1, dec_r4 },{1, dec_r5 },{1, dec_r6 },{1, dec_r7 }, | |
| 520 | {1, xrl_a_xr0 },{1, xrl_a_xr1 },{2, jb_6 },{2, xrl_a_n },{2, call_6 },{1, sel_rb1 },{0, illegal },{1, mov_psw_a }, | |
| 521 | {1, xrl_a_r0 },{1, xrl_a_r1 },{1, xrl_a_r2 },{1, xrl_a_r3 },{1, xrl_a_r4 },{1, xrl_a_r5 },{1, xrl_a_r6 },{1, xrl_a_r7 }, | |
| 522 | {0, illegal },{0, illegal },{0, illegal },{2, movp3_a_xa },{2, jmp_7 },{1, sel_mb0 },{2, jnc },{1, rl_a }, | |
| 523 | {2, djnz_r0 },{2, djnz_r1 },{2, djnz_r2 },{2, djnz_r3 },{2, djnz_r4 },{2, djnz_r5 },{2, djnz_r6 },{2, djnz_r7 }, | |
| 524 | {1, mov_a_xr0 },{1, mov_a_xr1 },{2, jb_7 },{0, illegal },{2, call_7 },{1, sel_mb1 },{2, jc },{1, rlc_a }, | |
| 525 | {1, mov_a_r0 },{1, mov_a_r1 },{1, mov_a_r2 },{1, mov_a_r3 },{1, mov_a_r4 },{1, mov_a_r5 },{1, mov_a_r6 },{1, mov_a_r7 } | |
| 545 | {1, nop },{0, illegal },{2, outl_bus_a},{2, add_a_n },{2, jmp },{1, en_i },{0, illegal },{1, dec_a }, | |
| 546 | {2, ins_a_bus },{2, in_a_p1 },{2, in_a_p2 },{0, illegal },{2, movd_a_p4 },{2, movd_a_p5 },{2, movd_a_p6 },{2, movd_a_p7 }, | |
| 547 | {1, inc_xr0 },{1, inc_xr1 },{2, jb_0 },{2, adc_a_n },{2, call },{1, dis_i },{2, jtf },{1, inc_a }, | |
| 548 | {1, inc_r0 },{1, inc_r1 },{1, inc_r2 },{1, inc_r3 },{1, inc_r4 },{1, inc_r5 },{1, inc_r6 },{1, inc_r7 }, | |
| 549 | {1, xch_a_xr0 },{1, xch_a_xr1 },{0, illegal },{2, mov_a_n },{2, jmp_1 },{1, en_tcnti },{2, jnt_0 },{1, clr_a }, | |
| 550 | {1, xch_a_r0 },{1, xch_a_r1 },{1, xch_a_r2 },{1, xch_a_r3 },{1, xch_a_r4 },{1, xch_a_r5 },{1, xch_a_r6 },{1, xch_a_r7 }, | |
| 551 | {1, xchd_a_xr0 },{1, xchd_a_xr1 },{2, jb_1 },{0, illegal },{2, call_1 },{1, dis_tcnti },{2, jt_0 },{1, cpl_a }, | |
| 552 | {0, illegal },{2, outl_p1_a },{2, outl_p2_a },{0, illegal },{2, movd_p4_a },{2, movd_p5_a },{2, movd_p6_a },{2, movd_p7_a }, | |
| 553 | {1, orl_a_xr0 },{1, orl_a_xr1 },{1, mov_a_t },{2, orl_a_n },{2, jmp_2 },{1, strt_cnt },{2, jnt_1 },{1, swap_a }, | |
| 554 | {1, orl_a_r0 },{1, orl_a_r1 },{1, orl_a_r2 },{1, orl_a_r3 },{1, orl_a_r4 },{1, orl_a_r5 },{1, orl_a_r6 },{1, orl_a_r7 }, | |
| 555 | {1, anl_a_xr0 },{1, anl_a_xr1 },{2, jb_2 },{2, anl_a_n },{2, call_2 },{1, strt_t },{2, jt_1 },{1, daa_a }, | |
| 556 | {1, anl_a_r0 },{1, anl_a_r1 },{1, anl_a_r2 },{1, anl_a_r3 },{1, anl_a_r4 },{1, anl_a_r5 },{1, anl_a_r6 },{1, anl_a_r7 }, | |
| 557 | {1, add_a_xr0 },{1, add_a_xr1 },{1, mov_t_a },{0, illegal },{2, jmp_3 },{1, stop_tcnt },{0, illegal },{1, rrc_a }, | |
| 558 | {1, add_a_r0 },{1, add_a_r1 },{1, add_a_r2 },{1, add_a_r3 },{1, add_a_r4 },{1, add_a_r5 },{1, add_a_r6 },{1, add_a_r7 }, | |
| 559 | {1, adc_a_xr0 },{1, adc_a_xr1 },{2, jb_3 },{0, illegal },{2, call_3 },{1, ento_clk },{2, jf1 },{1, rr_a }, | |
| 560 | {1, adc_a_r0 },{1, adc_a_r1 },{1, adc_a_r2 },{1, adc_a_r3 },{1, adc_a_r4 },{1, adc_a_r5 },{1, adc_a_r6 },{1, adc_a_r7 }, | |
| 561 | {2, movx_a_xr0 },{2, movx_a_xr1 },{0, illegal },{2, ret },{2, jmp_4 },{1, clr_f0 },{2, jni },{0, illegal }, | |
| 562 | {2, orl_bus_n },{2, orl_p1_n },{2, orl_p2_n },{0, illegal },{2, orld_p4_a },{2, orld_p5_a },{2, orld_p6_a },{2, orld_p7_a }, | |
| 563 | {2, movx_xr0_a },{2, movx_xr1_a },{2, jb_4 },{2, retr },{2, call_4 },{1, cpl_f0 },{2, jnz },{1, clr_c }, | |
| 564 | {2, anl_bus_n },{2, anl_p1_n },{2, anl_p2_n },{0, illegal },{2, anld_p4_a },{2, anld_p5_a },{2, anld_p6_a },{2, anld_p7_a }, | |
| 565 | {1, mov_xr0_a },{1, mov_xr1_a },{0, illegal },{2, movp_a_xa },{2, jmp_5 },{1, clr_f1 },{0, illegal },{1, cpl_c }, | |
| 566 | {1, mov_r0_a },{1, mov_r1_a },{1, mov_r2_a },{1, mov_r3_a },{1, mov_r4_a },{1, mov_r5_a },{1, mov_r6_a },{1, mov_r7_a }, | |
| 567 | {2, mov_xr0_n },{2, mov_xr1_n },{2, jb_5 },{2, jmpp_xa },{2, call_5 },{1, cpl_f1 },{2, jf0 },{0, illegal }, | |
| 568 | {2, mov_r0_n },{2, mov_r1_n },{2, mov_r2_n },{2, mov_r3_n },{2, mov_r4_n },{2, mov_r5_n },{2, mov_r6_n },{2, mov_r7_n }, | |
| 569 | {0, illegal },{0, illegal },{0, illegal },{0, illegal },{2, jmp_6 },{1, sel_rb0 },{2, jz },{1, mov_a_psw }, | |
| 570 | {1, dec_r0 },{1, dec_r1 },{1, dec_r2 },{1, dec_r3 },{1, dec_r4 },{1, dec_r5 },{1, dec_r6 },{1, dec_r7 }, | |
| 571 | {1, xrl_a_xr0 },{1, xrl_a_xr1 },{2, jb_6 },{2, xrl_a_n },{2, call_6 },{1, sel_rb1 },{0, illegal },{1, mov_psw_a }, | |
| 572 | {1, xrl_a_r0 },{1, xrl_a_r1 },{1, xrl_a_r2 },{1, xrl_a_r3 },{1, xrl_a_r4 },{1, xrl_a_r5 },{1, xrl_a_r6 },{1, xrl_a_r7 }, | |
| 573 | {0, illegal },{0, illegal },{0, illegal },{2, movp3_a_xa},{2, jmp_7 },{1, sel_mb0 },{2, jnc },{1, rl_a }, | |
| 574 | {2, djnz_r0 },{2, djnz_r1 },{2, djnz_r2 },{2, djnz_r3 },{2, djnz_r4 },{2, djnz_r5 },{2, djnz_r6 },{2, djnz_r7 }, | |
| 575 | {1, mov_a_xr0 },{1, mov_a_xr1 },{2, jb_7 },{0, illegal },{2, call_7 },{1, sel_mb1 },{2, jc },{1, rlc_a }, | |
| 576 | {1, mov_a_r0 },{1, mov_a_r1 },{1, mov_a_r2 },{1, mov_a_r3 },{1, mov_a_r4 },{1, mov_a_r5 },{1, mov_a_r6 },{1, mov_a_r7 } | |
| 526 | 577 | }; |
| 527 | 578 | |
| 528 | 579 | |
| r1527 | r1528 | |
| 559 | 610 | state_save_register_item("i8039", index, R.irq_state); |
| 560 | 611 | state_save_register_item("i8039", index, R.irq_extra_cycles); |
| 561 | 612 | state_save_register_item("i8039", index, R.Old_T1); |
| 613 | ||
| 614 | R.cpu_feature = 0; | |
| 615 | R.ram_mask = 0x7F; | |
| 616 | R.int_rom_size = 0x800; | |
| 617 | /* not changed on reset*/ | |
| 618 | memset(R.RAM, 0x00, 128); | |
| 619 | R.timer = 0; | |
| 562 | 620 | } |
| 563 | 621 | |
| 622 | static void i8035_init (int index, int clock, const void *config, int (*irqcallback)(int)) | |
| 623 | { | |
| 624 | i8039_init(index, clock, config, irqcallback); | |
| 625 | R.ram_mask = 0x3F; | |
| 626 | R.int_rom_size = 0x400; | |
| 627 | } | |
| 628 | ||
| 629 | #if (HAS_M58715) | |
| 630 | static void m58715_init (int index, int clock, const void *config, int (*irqcallback)(int)) | |
| 631 | { | |
| 632 | i8039_init(index, clock, config, irqcallback); | |
| 633 | R.cpu_feature = FEATURE_M58715; | |
| 634 | } | |
| 635 | #endif | |
| 636 | ||
| 564 | 637 | /**************************************************************************** |
| 565 | 638 | * Reset registers to their initial values |
| 566 | 639 | ****************************************************************************/ |
| r1527 | r1528 | |
| 569 | 642 | R.PC.w.l = 0; |
| 570 | 643 | R.SP = 0; |
| 571 | 644 | R.A = 0; |
| 572 | R.PSW = 0x08; /* Start with Carry SET, Bit 4 is always SET */ | |
| 573 | memset(R.RAM, 0x0, 128); | |
| 645 | R.PSW = 0x08; /* Start with No Carry, Bit 4 is always SET */ | |
| 646 | //R.PSW = C_FLAG | 0x08; | |
| 574 | 647 | R.P1 = 0xff; |
| 575 | 648 | R.P2 = 0xff; |
| 576 | 649 | R.bus = 0; |
| r1527 | r1528 | |
| 580 | 653 | R.A11 = 0; |
| 581 | 654 | R.tirq_en = R.xirq_en = 0; |
| 582 | 655 | R.timerON = R.countON = 0; |
| 583 | R.timerON = 1; /* Mario Bros. doesn't work without this */ | |
| 656 | ||
| 657 | if (R.cpu_feature & FEATURE_M58715) | |
| 658 | { | |
| 659 | //R.timerON = 1; /* Mario Bros. doesn't work without this */ | |
| 660 | //R.PSW |= C_FLAG; //MB will play startup sound, but wrong # */ | |
| 661 | } | |
| 584 | 662 | R.irq_extra_cycles = 0; |
| 585 | 663 | R.masterClock = 0; |
| 586 | 664 | } |
| r1527 | r1528 | |
| 657 | 735 | ****************************************************************************/ |
| 658 | 736 | static int i8039_execute(int cycles) |
| 659 | 737 | { |
| 660 | unsigned opcode, T1; | |
| 738 | unsigned opcode, T1, timerInt; | |
| 661 | 739 | int count; |
| 662 | 740 | |
| 663 | 741 | i8039_ICount = (cycles - R.irq_extra_cycles); |
| r1527 | r1528 | |
| 674 | 752 | /* logerror("I8039: PC = %04x, opcode = %02x\n", R.PC.w.l, opcode); */ |
| 675 | 753 | |
| 676 | 754 | R.PC.w.l++; |
| 677 | inst_cycles = opcode_main[opcode].cycles; | |
| 755 | R.inst_cycles = opcode_main[opcode].cycles; | |
| 678 | 756 | (*(opcode_main[opcode].function))(); |
| 679 | i8039_ICount -= inst_cycles; /// | |
| 757 | i8039_ICount -= R.inst_cycles; /// | |
| 680 | 758 | |
| 759 | timerInt = 0; | |
| 681 | 760 | if (R.countON) /* NS990113 */ |
| 682 | 761 | { |
| 683 | for ( ; inst_cycles > 0; inst_cycles-- ) | |
| 762 | for ( ; R.inst_cycles > 0; R.inst_cycles-- ) | |
| 684 | 763 | { |
| 685 | 764 | T1 = test_r(1); |
| 686 | 765 | if (POSITIVE_EDGE_T1) |
| 687 | 766 | { |
| 688 | 767 | R.timer++; |
| 689 | if (R.timer == 0) { | |
| 690 | count = Timer_IRQ(); /* Handle Counter IRQ */ | |
| 691 | i8039_ICount -= count; | |
| 692 | } | |
| 768 | if (R.timer == 0) | |
| 769 | timerInt = 1; | |
| 693 | 770 | } |
| 694 | 771 | R.Old_T1 = T1; |
| 695 | 772 | } |
| r1527 | r1528 | |
| 700 | 777 | if (R.masterClock >= 32) { /* NS990113 */ |
| 701 | 778 | R.masterClock -= 32; |
| 702 | 779 | R.timer++; |
| 703 | if (R.timer == 0) { | |
| 704 | count = Timer_IRQ(); /* Handle Timer IRQ */ | |
| 705 | i8039_ICount -= count; | |
| 706 | } | |
| 780 | if (R.timer == 0) | |
| 781 | timerInt = 1; | |
| 707 | 782 | } |
| 708 | 783 | } |
| 784 | ||
| 785 | if (timerInt) | |
| 786 | { | |
| 787 | count = Timer_IRQ(); /* Handle Timer IRQ */ | |
| 788 | i8039_ICount -= count; | |
| 789 | } | |
| 790 | ||
| 709 | 791 | } while (i8039_ICount>0); |
| 710 | 792 | |
| 711 | 793 | i8039_ICount -= R.irq_extra_cycles; |
| r1527 | r1528 | |
| 790 | 872 | case CPUINFO_INT_REGISTER + I8039_R5: R5 = info->i; break; |
| 791 | 873 | case CPUINFO_INT_REGISTER + I8039_R6: R6 = info->i; break; |
| 792 | 874 | case CPUINFO_INT_REGISTER + I8039_R7: R7 = info->i; break; |
| 875 | case CPUINFO_INT_REGISTER + I8039_EA: R.EA = info->i; break; | |
| 793 | 876 | } |
| 794 | 877 | } |
| 795 | 878 | |
| r1527 | r1528 | |
| 808 | 891 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 809 | 892 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 810 | 893 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 811 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = I8039_CLOCK_DIVIDER; break; | |
| 894 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 895 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 3*5; break; | |
| 812 | 896 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 813 | 897 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| 814 | 898 | case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; |
| r1527 | r1528 | |
| 845 | 929 | case CPUINFO_INT_REGISTER + I8039_R5: info->i = R5; break; |
| 846 | 930 | case CPUINFO_INT_REGISTER + I8039_R6: info->i = R6; break; |
| 847 | 931 | case CPUINFO_INT_REGISTER + I8039_R7: info->i = R7; break; |
| 932 | case CPUINFO_INT_REGISTER + I8039_EA: info->i = R.EA; break; | |
| 848 | 933 | |
| 849 | 934 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 850 | 935 | case CPUINFO_PTR_SET_INFO: info->setinfo = i8039_set_info; break; |
| r1527 | r1528 | |
| 868 | 953 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Mirko Buffoni\nBased on the original work Copyright Dan Boris"); break; |
| 869 | 954 | |
| 870 | 955 | case CPUINFO_STR_FLAGS: |
| 871 | sprintf(info->s, "%c%c%c%c%c%c%c%c", | |
| 956 | sprintf(info->s, "%c %c%c%c%c%c%c%c%c", | |
| 957 | R.A11 ? 'M':'.', | |
| 872 | 958 | R.PSW & 0x80 ? 'C':'.', |
| 873 | 959 | R.PSW & 0x40 ? 'A':'.', |
| 874 | 960 | R.PSW & 0x20 ? 'F':'.', |
| r1527 | r1528 | |
| 894 | 980 | case CPUINFO_STR_REGISTER + I8039_R5: sprintf(info->s, "R5:%02X", R.RAM[R.regPtr+5]); break; |
| 895 | 981 | case CPUINFO_STR_REGISTER + I8039_R6: sprintf(info->s, "R6:%02X", R.RAM[R.regPtr+6]); break; |
| 896 | 982 | case CPUINFO_STR_REGISTER + I8039_R7: sprintf(info->s, "R7:%02X", R.RAM[R.regPtr+7]); break; |
| 983 | case CPUINFO_STR_REGISTER + I8039_EA: sprintf(info->s, "EA:%02X", R.EA); break; | |
| 897 | 984 | } |
| 898 | 985 | } |
| 899 | 986 | |
| r1527 | r1528 | |
| 909 | 996 | { |
| 910 | 997 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 911 | 998 | case CPUINFO_STR_NAME: strcpy(info->s, "I8035"); break; |
| 999 | case CPUINFO_PTR_INIT: info->init = i8035_init; break; | |
| 912 | 1000 | |
| 913 | 1001 | default: i8039_get_info(state, info); break; |
| 914 | 1002 | } |
| r1527 | r1528 | |
| 926 | 1014 | { |
| 927 | 1015 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 928 | 1016 | case CPUINFO_STR_NAME: strcpy(info->s, "I8048"); break; |
| 1017 | case CPUINFO_PTR_INIT: info->init = i8035_init; break; | |
| 929 | 1018 | |
| 930 | 1019 | default: i8039_get_info(state, info); break; |
| 931 | 1020 | } |
| r1527 | r1528 | |
| 943 | 1032 | { |
| 944 | 1033 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 945 | 1034 | case CPUINFO_STR_NAME: strcpy(info->s, "N7751"); break; |
| 1035 | case CPUINFO_PTR_INIT: info->init = i8039_init; break; | |
| 946 | 1036 | |
| 947 | 1037 | default: i8039_get_info(state, info); break; |
| 948 | 1038 | } |
| 949 | 1039 | } |
| 950 | 1040 | #endif |
| 1041 | ||
| 1042 | #if (HAS_MB8884) | |
| 1043 | /************************************************************************** | |
| 1044 | * CPU-specific get_info/set_info | |
| 1045 | **************************************************************************/ | |
| 1046 | void mb8884_get_info(UINT32 state, cpuinfo *info) | |
| 1047 | { | |
| 1048 | switch (state) | |
| 1049 | { | |
| 1050 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 1051 | case CPUINFO_STR_NAME: strcpy(info->s, "MB8884"); break; | |
| 1052 | case CPUINFO_PTR_INIT: info->init = i8035_init; break; | |
| 1053 | ||
| 1054 | default: i8039_get_info(state, info); break; | |
| 1055 | } | |
| 1056 | } | |
| 1057 | #endif | |
| 1058 | ||
| 1059 | #if (HAS_M58715) | |
| 1060 | /************************************************************************** | |
| 1061 | * CPU-specific get_info/set_info | |
| 1062 | **************************************************************************/ | |
| 1063 | void m58715_get_info(UINT32 state, cpuinfo *info) | |
| 1064 | { | |
| 1065 | switch (state) | |
| 1066 | { | |
| 1067 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 1068 | case CPUINFO_STR_NAME: strcpy(info->s, "M58715"); break; | |
| 1069 | case CPUINFO_PTR_INIT: info->init = m58715_init; break; | |
| 1070 | ||
| 1071 | default: i8039_get_info(state, info); break; | |
| 1072 | } | |
| 1073 | } | |
| 1074 | #endif |
| r1527 | r1528 | |
|---|---|---|
| 1243 | 1243 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 1244 | 1244 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1245 | 1245 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 1246 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1246 | 1247 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1247 | 1248 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 1248 | 1249 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 5; break; |
| r1527 | r1528 | |
|---|---|---|
| 2730 | 2730 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 2731 | 2731 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 2732 | 2732 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 2733 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2733 | 2734 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 2734 | 2735 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 2735 | 2736 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 6; break; |
| r1527 | r1528 | |
|---|---|---|
| 1519 | 1519 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 1520 | 1520 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1521 | 1521 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1522 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1522 | 1523 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1523 | 1524 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 1524 | 1525 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; |
| r1527 | r1528 | |
|---|---|---|
| 941 | 941 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 942 | 942 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 943 | 943 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 944 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 944 | 945 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 945 | 946 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 946 | 947 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; |
| r1527 | r1528 | |
|---|---|---|
| 1860 | 1860 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 1861 | 1861 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1862 | 1862 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1863 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1863 | 1864 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1864 | 1865 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 1865 | 1866 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| r1527 | r1528 | |
|---|---|---|
| 4913 | 4913 | case CPUINFO_INT_INPUT_LINES: info->i = 8; break; |
| 4914 | 4914 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 4915 | 4915 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 4916 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 4916 | 4917 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 4917 | 4918 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 4918 | 4919 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 6; break; |
| r1527 | r1528 | |
|---|---|---|
| 2112 | 2112 | sprintf(s, "???"); |
| 2113 | 2113 | } |
| 2114 | 2114 | |
| 2115 | int i386_dasm_one_ex(char *buffer, UINT64 eip, const UINT8 *oprom, int mode) | |
| 2115 | static int i386_dasm_one_ex(char *buffer, UINT64 eip, const UINT8 *oprom, int mode) | |
| 2116 | 2116 | { |
| 2117 | 2117 | UINT8 op; |
| 2118 | 2118 |
| r1527 | r1528 | |
|---|---|---|
| 855 | 855 | case CPUINFO_INT_INPUT_LINES: info->i = 32; break; |
| 856 | 856 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 857 | 857 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 858 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 858 | 859 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 859 | 860 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 860 | 861 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 15; break; |
| r1527 | r1528 | |
|---|---|---|
| 423 | 423 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 424 | 424 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 425 | 425 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 426 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 426 | 427 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 427 | 428 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 428 | 429 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 5; break; |
| r1527 | r1528 | |
|---|---|---|
| 1821 | 1821 | case CPUINFO_INT_INPUT_LINES: /* set per CPU */ break; |
| 1822 | 1822 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1823 | 1823 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1824 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1824 | 1825 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1825 | 1826 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 1826 | 1827 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 787 | 787 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 788 | 788 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 789 | 789 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 790 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 790 | 791 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 791 | 792 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 792 | 793 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 49 | 49 | VECTOR_REG v[32]; |
| 50 | 50 | UINT16 flag[4]; |
| 51 | 51 | UINT32 sr; |
| 52 | UINT32 step_count; | |
| 52 | 53 | |
| 53 | 54 | INT64 accum[8]; |
| 54 | 55 | INT32 square_root_res; |
| r1527 | r1528 | |
| 344 | 345 | |
| 345 | 346 | static void rsp_init(int index, int clock, const void *_config, int (*irqcallback)(int)) |
| 346 | 347 | { |
| 347 | //int regIdx, accumIdx; | |
| 348 | // int regIdx; | |
| 349 | int accumIdx; | |
| 348 | 350 | config = (rsp_config *)_config; |
| 349 | 351 | |
| 350 | 352 | #if LOG_INSTRUCTION_EXECUTION |
| r1527 | r1528 | |
| 352 | 354 | #endif |
| 353 | 355 | |
| 354 | 356 | rsp.irq_callback = irqcallback; |
| 357 | ||
| 355 | 358 | #if 0 |
| 359 | // Do not enable! RSP registers are in a *random* state at powerup... | |
| 356 | 360 | for(regIdx = 0; regIdx < 32; regIdx++ ) |
| 357 | 361 | { |
| 358 | 362 | rsp.r[regIdx] = 0; |
| 359 | 363 | rsp.v[regIdx].d[0] = 0; |
| 360 | 364 | rsp.v[regIdx].d[1] = 0; |
| 361 | 365 | } |
| 362 | for(accumIdx = 0; accumIdx < 8; accumIdx++ ) | |
| 363 | { | |
| 364 | rsp.accum[accumIdx] = 0; | |
| 365 | } | |
| 366 | 366 | rsp.flag[0] = 0; |
| 367 | 367 | rsp.flag[1] = 0; |
| 368 | 368 | rsp.flag[2] = 0; |
| r1527 | r1528 | |
| 372 | 372 | rsp.reciprocal_res = 0; |
| 373 | 373 | rsp.reciprocal_high = 0; |
| 374 | 374 | #endif |
| 375 | ||
| 376 | // ...except for the accumulators. | |
| 377 | for(accumIdx = 0; accumIdx < 8; accumIdx++ ) | |
| 378 | { | |
| 379 | rsp.accum[accumIdx] = 0; | |
| 380 | } | |
| 381 | ||
| 375 | 382 | rsp.sr = RSP_STATUS_HALT; |
| 383 | rsp.step_count = 0; | |
| 376 | 384 | } |
| 377 | 385 | |
| 378 | 386 | static void rsp_exit(void) |
| r1527 | r1528 | |
| 2783 | 2791 | |
| 2784 | 2792 | if( rsp.sr & RSP_STATUS_SSTEP ) |
| 2785 | 2793 | { |
| 2786 | rsp.sr |= RSP_STATUS_BROKE; | |
| 2794 | if( rsp.step_count ) | |
| 2795 | { | |
| 2796 | rsp.step_count--; | |
| 2797 | } | |
| 2798 | else | |
| 2799 | { | |
| 2800 | rsp.sr |= RSP_STATUS_BROKE; | |
| 2801 | } | |
| 2787 | 2802 | } |
| 2788 | 2803 | |
| 2789 | 2804 | if( rsp.sr & ( RSP_STATUS_HALT | RSP_STATUS_BROKE ) ) |
| r1527 | r1528 | |
| 2869 | 2884 | case CPUINFO_INT_REGISTER + RSP_R30: rsp.r[30] = info->i; break; |
| 2870 | 2885 | case CPUINFO_INT_SP: |
| 2871 | 2886 | case CPUINFO_INT_REGISTER + RSP_R31: rsp.r[31] = info->i; break; |
| 2872 | case CPUINFO_INT_REGISTER + RSP_SR: rsp.sr = info->i; break; | |
| 2887 | case CPUINFO_INT_REGISTER + RSP_SR: | |
| 2888 | rsp.sr = info->i; | |
| 2889 | if( info->i & RSP_STATUS_SSTEP ) | |
| 2890 | { | |
| 2891 | rsp.step_count = 1; | |
| 2892 | } | |
| 2893 | break; | |
| 2873 | 2894 | case CPUINFO_INT_REGISTER + RSP_NEXTPC: rsp.nextpc = info->i; break; |
| 2874 | 2895 | } |
| 2875 | 2896 | } |
| r1527 | r1528 | |
| 2883 | 2904 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 2884 | 2905 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 2885 | 2906 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 2907 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2886 | 2908 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 2887 | 2909 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 2888 | 2910 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 308 | 308 | case CPUINFO_INT_INPUT_LINES: info->i = 0; break; |
| 309 | 309 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 310 | 310 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 311 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = COP400_CLOCK_DIVIDER; break; | |
| 311 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 312 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 4; break; | |
| 312 | 313 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 313 | 314 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| 314 | 315 | case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; |
| r1527 | r1528 | |
|---|---|---|
| 336 | 336 | case CPUINFO_INT_INPUT_LINES: info->i = 0; break; |
| 337 | 337 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 338 | 338 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 339 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = COP400_CLOCK_DIVIDER; break; | |
| 339 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 340 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 4; break; | |
| 340 | 341 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 341 | 342 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| 342 | 343 | case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; |
| r1527 | r1528 | |
|---|---|---|
| 16 | 16 | #define INLINE static inline |
| 17 | 17 | #endif |
| 18 | 18 | |
| 19 | #define COP400_CLOCK_DIVIDER 4 | |
| 20 | ||
| 21 | 19 | #define COP400_PORT_L 0x100 |
| 22 | 20 | #define COP400_PORT_G 0x101 |
| 23 | 21 | #define COP400_PORT_D 0x102 |
| r1527 | r1528 | |
|---|---|---|
| 433 | 433 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 434 | 434 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 435 | 435 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 436 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 436 | 437 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 437 | 438 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 438 | 439 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; |
| r1527 | r1528 | |
|---|---|---|
| 699 | 699 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 700 | 700 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 701 | 701 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 702 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 702 | 703 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 703 | 704 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 704 | 705 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 323 | 323 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 324 | 324 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 325 | 325 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 326 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 326 | 327 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 327 | 328 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 328 | 329 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; |
| r1527 | r1528 | |
|---|---|---|
| 1581 | 1581 | case CPUINFO_INT_INPUT_LINES: info->i = 5; break; |
| 1582 | 1582 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1583 | 1583 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 1584 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1584 | 1585 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1585 | 1586 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 1586 | 1587 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 6; break; |
| r1527 | r1528 | |
|---|---|---|
| 758 | 758 | case CPUINFO_INT_INPUT_LINES: info->i = 3; break; |
| 759 | 759 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 760 | 760 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 761 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 761 | 762 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 762 | 763 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 763 | 764 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 1630 | 1630 | case CPUINFO_INT_INPUT_LINES: info->i = 4; break; |
| 1631 | 1631 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 1632 | 1632 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1633 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1633 | 1634 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1634 | 1635 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 1635 | 1636 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; |
| r1527 | r1528 | |
|---|---|---|
| 1740 | 1740 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 1741 | 1741 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1742 | 1742 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 1743 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1743 | 1744 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1744 | 1745 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 1745 | 1746 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 2085 | 2085 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 2086 | 2086 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 2087 | 2087 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 2088 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2088 | 2089 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 2089 | 2090 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 2090 | 2091 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 1468 | 1468 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 1469 | 1469 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1470 | 1470 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1471 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1471 | 1472 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1472 | 1473 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 1473 | 1474 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 629 | 629 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 630 | 630 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 631 | 631 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 632 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 632 | 633 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 633 | 634 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 634 | 635 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 6; break; |
| r1527 | r1528 | |
|---|---|---|
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | |
| 22 | /************************************************************************** | |
| 23 | * Internal Clock divisor | |
| 24 | * | |
| 25 | * External Clock is divided internally by 4, to produce the states | |
| 26 | * used in carrying out an instruction (machine) cycle. | |
| 27 | */ | |
| 28 | ||
| 29 | #define TMS32010_CLOCK_DIVIDER 4 | |
| 30 | ||
| 31 | ||
| 32 | 22 | /**************************************************************************** |
| 33 | 23 | * Use this in the I/O port address fields of your driver for the BIO pin |
| 34 | 24 | * i.e, |
| r1527 | r1528 | |
|---|---|---|
| 57 | 57 | #include "debugger.h" |
| 58 | 58 | |
| 59 | 59 | |
| 60 | /* 1 cycle equals 4 clock ticks */ | |
| 61 | #if 0 | |
| 62 | #define CLK TMS32010_CLOCK_DIVIDER | |
| 63 | #else | |
| 64 | 60 | #define CLK 1 /* Moved the clock timing back into the driver */ |
| 65 | #endif | |
| 66 | 61 | |
| 67 | 62 | |
| 68 | 63 | #ifndef INLINE |
| r1527 | r1528 | |
| 892 | 887 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 893 | 888 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 894 | 889 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 895 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = TMS32010_CLOCK_DIVIDER; break; | |
| 890 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 891 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 4; break; | |
| 896 | 892 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 897 | 893 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| 898 | 894 | case CPUINFO_INT_MIN_CYCLES: info->i = 1*CLK; break; |
| r1527 | r1528 | |
|---|---|---|
| 429 | 429 | case CPUINFO_INT_INPUT_LINES: info->i = 8; break; |
| 430 | 430 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 431 | 431 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 432 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 432 | 433 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 433 | 434 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 434 | 435 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 5; break; |
| r1527 | r1528 | |
|---|---|---|
| 3055 | 3055 | case CPUINFO_INT_INPUT_LINES: info->i = 16; break; |
| 3056 | 3056 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 3057 | 3057 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 3058 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 3058 | 3059 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 3059 | 3060 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 3060 | 3061 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| r1527 | r1528 | |
|---|---|---|
| 572 | 572 | case CPUINFO_INT_INPUT_LINES: info->i = 6; break; |
| 573 | 573 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 574 | 574 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 575 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 575 | 576 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 576 | 577 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 577 | 578 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 4918 | 4918 | case CPUINFO_INT_INPUT_LINES: info->i = 5; break; |
| 4919 | 4919 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 4920 | 4920 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 4921 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 4921 | 4922 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 4922 | 4923 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 4923 | 4924 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| r1527 | r1528 | |
|---|---|---|
| 799 | 799 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 800 | 800 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 801 | 801 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 802 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 802 | 803 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 803 | 804 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 804 | 805 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| r1527 | r1528 | |
|---|---|---|
| 895 | 895 | case CPUINFO_INT_INPUT_LINES: info->i = 0; break; |
| 896 | 896 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 897 | 897 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 898 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 898 | 899 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 899 | 900 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 900 | 901 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| r1527 | r1528 | |
|---|---|---|
| 853 | 853 | switch (state) |
| 854 | 854 | { |
| 855 | 855 | case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(apexc); break; |
| 856 | case CPUINFO_INT_INPUT_LINES: | |
| 856 | case CPUINFO_INT_INPUT_LINES: | |
| 857 | 857 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 858 | 858 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; /*don't care*/ break; |
| 859 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 859 | 860 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 860 | 861 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 861 | 862 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 379 | 379 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 380 | 380 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 381 | 381 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 382 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 382 | 383 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 383 | 384 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 384 | 385 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 1312 | 1312 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 1313 | 1313 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 1314 | 1314 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1315 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1315 | 1316 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1316 | 1317 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 1317 | 1318 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 15; break; |
| r1527 | r1528 | |
|---|---|---|
| 2430 | 2430 | case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(i8051); break; |
| 2431 | 2431 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 2432 | 2432 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 2433 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2433 | 2434 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 2434 | 2435 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 2435 | 2436 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 5; break; |
| r1527 | r1528 | |
|---|---|---|
| 193 | 193 | UINT32 system_clock; |
| 194 | 194 | UINT32 cpu_clock; |
| 195 | 195 | UINT64 count_zero_time; |
| 196 | emu_timer * compare_int_timer; | |
| 196 | emu_timer * compare_int_timer; | |
| 197 | 197 | |
| 198 | 198 | /* memory accesses */ |
| 199 | 199 | UINT8 bigendian; |
| r1527 | r1528 | |
|---|---|---|
| 1214 | 1214 | case CPUINFO_INT_INPUT_LINES: info->i = 6; break; |
| 1215 | 1215 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1216 | 1216 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1217 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1217 | 1218 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1218 | 1219 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 1219 | 1220 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
| 1377 | 1378 | default: r3000_get_info(state, info); break; |
| 1378 | 1379 | } |
| 1379 | 1380 | } |
| 1381 | ||
| 1382 | ||
| 1383 | void r3041be_get_info(UINT32 state, cpuinfo *info) | |
| 1384 | { | |
| 1385 | switch (state) | |
| 1386 | { | |
| 1387 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 1388 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; | |
| 1389 | ||
| 1390 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 1391 | case CPUINFO_PTR_RESET: info->reset = r3000be_reset; break; | |
| 1392 | ||
| 1393 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 1394 | case CPUINFO_STR_NAME: strcpy(info->s, "R3041 (big)"); break; | |
| 1395 | ||
| 1396 | default: r3000_get_info(state, info); break; | |
| 1397 | } | |
| 1398 | } | |
| 1399 | ||
| 1400 | ||
| 1401 | void r3041le_get_info(UINT32 state, cpuinfo *info) | |
| 1402 | { | |
| 1403 | switch (state) | |
| 1404 | { | |
| 1405 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 1406 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; | |
| 1407 | ||
| 1408 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 1409 | case CPUINFO_PTR_RESET: info->reset = r3000le_reset; break; | |
| 1410 | ||
| 1411 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 1412 | case CPUINFO_STR_NAME: strcpy(info->s, "R3041 (little)"); break; | |
| 1413 | ||
| 1414 | default: r3000_get_info(state, info); break; | |
| 1415 | } | |
| 1416 | } |
| r1527 | r1528 | |
|---|---|---|
| 62 | 62 | extern void r3000be_get_info(UINT32 state, cpuinfo *info); |
| 63 | 63 | extern void r3000le_get_info(UINT32 state, cpuinfo *info); |
| 64 | 64 | |
| 65 | extern void r3041be_get_info(UINT32 state, cpuinfo *info); | |
| 66 | extern void r3041le_get_info(UINT32 state, cpuinfo *info); | |
| 67 | ||
| 65 | 68 | #endif /* _JAGUAR_H */ |
| r1527 | r1528 | |
|---|---|---|
| 3300 | 3300 | case CPUINFO_INT_INPUT_LINES: info->i = 6; break; |
| 3301 | 3301 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 3302 | 3302 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 3303 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; | |
| 3303 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 3304 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 2 * 2; break; | |
| 3304 | 3305 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 3305 | 3306 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| 3306 | 3307 | case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; |
| r1527 | r1528 | |
|---|---|---|
| 188 | 188 | allocatedsize = CACHE_SIZE + sizeof(*mips3.core) + memsize; |
| 189 | 189 | mips3.core = osd_alloc_executable(allocatedsize); |
| 190 | 190 | if (mips3.core == NULL) |
| 191 | fatalerror("Unable to allocate cache of size %d\n", allocatedsize); | |
| 191 | fatalerror("Unable to allocate cache of size %d\n", (UINT32)allocatedsize); | |
| 192 | 192 | mips3.cache = (UINT8 *)(mips3.core + 1) + memsize; |
| 193 | 193 | |
| 194 | 194 | /* initialize the core */ |
| r1527 | r1528 | |
|---|---|---|
| 532 | 532 | case CPUINFO_INT_INPUT_LINES: info->i = 6; break; |
| 533 | 533 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 534 | 534 | case CPUINFO_INT_ENDIANNESS: info->i = mips->bigendian ? CPU_IS_BE : CPU_IS_LE; break; |
| 535 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 535 | 536 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 536 | 537 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 537 | 538 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 289 | 289 | case CPUINFO_INT_INPUT_LINES: info->i = 3; break; |
| 290 | 290 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 291 | 291 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 292 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 292 | 293 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 293 | 294 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 294 | 295 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 2008 | 2008 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 2009 | 2009 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 2010 | 2010 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 2011 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2011 | 2012 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 2012 | 2013 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 2013 | 2014 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; |
| r1527 | r1528 | |
|---|---|---|
| 3696 | 3696 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 3697 | 3697 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 3698 | 3698 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 3699 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 3699 | 3700 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 3700 | 3701 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 3701 | 3702 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 1739 | 1739 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 1740 | 1740 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1741 | 1741 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1742 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1742 | 1743 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1743 | 1744 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 1744 | 1745 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 12; break; |
| r1527 | r1528 | |
|---|---|---|
| 4689 | 4689 | case CPUINFO_INT_INPUT_LINES: info->i = 3; break; |
| 4690 | 4690 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 4691 | 4691 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 4692 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 4692 | 4693 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 4693 | 4694 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 4694 | 4695 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 6;/*8 with 990/12, 99105, 99110*/break; |
| r1527 | r1528 | |
|---|---|---|
| 593 | 593 | x = program_read_dword(i960.r[I960_FP]-16); |
| 594 | 594 | y = program_read_dword(i960.r[I960_FP]-12); |
| 595 | 595 | do_ret_0(); |
| 596 | i960.AC = | |
| 596 | i960.AC = y; | |
| 597 | 597 | // #### test supervisor |
| 598 | i960.PC = | |
| 598 | i960.PC = x; | |
| 599 | 599 | |
| 600 | 600 | // check for another IRQ now that we're back |
| 601 | 601 | check_irqs(); |
| r1527 | r1528 | |
| 2152 | 2152 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 2153 | 2153 | case CPUINFO_INT_INPUT_LINES: info->i = 4; break; |
| 2154 | 2154 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = -1; break; |
| 2155 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2156 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; | |
| 2155 | 2157 | |
| 2156 | 2158 | // CPU main state |
| 2157 | 2159 | case CPUINFO_INT_PC: info->i = i960.IP; break; |
| r1527 | r1528 | |
|---|---|---|
| 1104 | 1104 | case CPUINFO_INT_INPUT_LINES: info->i = 9; break; |
| 1105 | 1105 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1106 | 1106 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1107 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1107 | 1108 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1108 | 1109 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 1109 | 1110 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 2315 | 2315 | case CPUINFO_INT_INPUT_LINES: info->i = 6; break; |
| 2316 | 2316 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 2317 | 2317 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 2318 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2318 | 2319 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 2319 | 2320 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 2320 | 2321 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 966 | 966 | case CPUINFO_INT_INPUT_LINES: info->i = 0; break; |
| 967 | 967 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 968 | 968 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 969 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = PIC16C5x_CLOCK_DIVIDER; break; | |
| 969 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 970 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 4; break; | |
| 970 | 971 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 971 | 972 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| 972 | 973 | case CPUINFO_INT_MIN_CYCLES: info->i = 1*CLK; break; |
| r1527 | r1528 | |
|---|---|---|
| 20 | 20 | * Internal Clock divisor |
| 21 | 21 | * |
| 22 | 22 | * External Clock is divided internally by 4 for the instruction cycle |
| 23 | * times. (Each instruction cycle passes through 4 machine states). | |
| 23 | * times. (Each instruction cycle passes through 4 machine states). This | |
| 24 | * is handled by the cpu execution engine. | |
| 24 | 25 | */ |
| 25 | 26 | |
| 26 | #define PIC16C5x_CLOCK_DIVIDER 4 | |
| 27 | ||
| 28 | ||
| 29 | 27 | enum { |
| 30 | 28 | PIC16C5x_PC=1, PIC16C5x_STK0, PIC16C5x_STK1, PIC16C5x_FSR, |
| 31 | 29 | PIC16C5x_W, PIC16C5x_ALU, PIC16C5x_STR, PIC16C5x_OPT, |
| r1527 | r1528 | |
|---|---|---|
| 942 | 942 | case CPUINFO_INT_INPUT_LINES: info->i = 16; break; |
| 943 | 943 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 944 | 944 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; /*don't care*/ break; |
| 945 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 945 | 946 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 946 | 947 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 947 | 948 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 450 | 450 | case CPUINFO_INT_INPUT_LINES: info->i = 0; break; |
| 451 | 451 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 452 | 452 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; /*don't care*/ break; |
| 453 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 453 | 454 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 454 | 455 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 455 | 456 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
| 578 | 579 | case CPUINFO_INT_INPUT_LINES: info->i = 0; break; |
| 579 | 580 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 580 | 581 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; /*don't care*/ break; |
| 582 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 581 | 583 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 582 | 584 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 583 | 585 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 1585 | 1585 | case CPUINFO_INT_INPUT_LINES: info->i = 0; break; |
| 1586 | 1586 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1587 | 1587 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1588 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1588 | 1589 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1589 | 1590 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; |
| 1590 | 1591 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 460 | 460 | case CPUINFO_INT_INPUT_LINES: info->i = 4; break; |
| 461 | 461 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 462 | 462 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 463 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 463 | 464 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 464 | 465 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 465 | 466 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 6; break; |
| r1527 | r1528 | |
|---|---|---|
| 256 | 256 | case CPUINFO_INT_INPUT_LINES: info->i = ARM7_NUM_LINES; break; |
| 257 | 257 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 258 | 258 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 259 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 259 | 260 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 260 | 261 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 261 | 262 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 1375 | 1375 | * CSL Set CPU in low speed mode |
| 1376 | 1376 | ***************************************************************/ |
| 1377 | 1377 | #define CSL \ |
| 1378 | ||
| 1378 | h6280.clocks_per_cycle = 4; | |
| 1379 | 1379 |
| r1527 | r1528 | |
|---|---|---|
| 130 | 130 | UINT8 irq_mask; /* interrupt enable/disable */ |
| 131 | 131 | UINT8 timer_status; /* timer status */ |
| 132 | 132 | UINT8 timer_ack; /* timer acknowledge */ |
| 133 | ||
| 133 | UINT8 clocks_per_cycle; /* 4 = low speed mode, 1 = high speed mode */ | |
| 134 | 134 | INT32 timer_value; /* timer interrupt */ |
| 135 | 135 | INT32 timer_load; /* reload value */ |
| 136 | 136 | UINT8 nmi_state; |
| r1527 | r1528 | |
| 209 | 209 | CHANGE_PC; |
| 210 | 210 | |
| 211 | 211 | /* CPU starts in low speed mode */ |
| 212 | ||
| 212 | h6280.clocks_per_cycle = 4; | |
| 213 | 213 | |
| 214 | 214 | /* timer off by default */ |
| 215 | 215 | h6280.timer_status=0; |
| r1527 | r1528 | |
| 454 | 454 | case CPUINFO_INT_INPUT_LINES: info->i = 3; break; |
| 455 | 455 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 456 | 456 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 457 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 457 | 458 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 458 | 459 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 459 | 460 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 7; break; |
| r1527 | r1528 | |
|---|---|---|
| 2610 | 2610 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 2611 | 2611 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 2612 | 2612 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 2613 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2613 | 2614 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 2614 | 2615 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 2615 | 2616 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 3447 | 3447 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 3448 | 3448 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 3449 | 3449 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 3450 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 3450 | 3451 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 3451 | 3452 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 3452 | 3453 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 8; break; |
| r1527 | r1528 | |
|---|---|---|
| 316 | 316 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 317 | 317 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 318 | 318 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 319 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 319 | 320 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 320 | 321 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 321 | 322 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 20; /* 20 nibbles max */ break; |
| r1527 | r1528 | |
|---|---|---|
| 29 | 29 | #include "cpuintrf.h" |
| 30 | 30 | |
| 31 | 31 | |
| 32 | /* The i8x41/i8x42 input clock is divided by 15 | |
| 32 | /* The i8x41/i8x42 input clock is divided by 15 | |
| 33 | 33 | #define I8X41_CLOCK_DIVIDER 15 |
| 34 | 34 | |
| 35 | 35 | /* Note: |
| r1527 | r1528 | |
|---|---|---|
| 2197 | 2197 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 2198 | 2198 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 2199 | 2199 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 2200 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 2200 | 2201 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = I8X41_CLOCK_DIVIDER; break; |
| 2201 | 2202 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 2202 | 2203 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| r1527 | r1528 | |
|---|---|---|
| 565 | 565 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; |
| 566 | 566 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 567 | 567 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 568 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 568 | 569 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 569 | 570 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 570 | 571 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 4; break; |
| r1527 | r1528 | |
|---|---|---|
| 35 | 35 | UINT8 * shiftreg; |
| 36 | 36 | emu_timer * timer; |
| 37 | 37 | struct tms34061_interface intf; |
| 38 | running_machine *machine; | |
| 38 | 39 | }; |
| 39 | 40 | |
| 40 | 41 | |
| r1527 | r1528 | |
| 74 | 75 | * |
| 75 | 76 | *************************************/ |
| 76 | 77 | |
| 77 | void tms34061_start(const struct tms34061_interface *interface) | |
| 78 | void tms34061_start(running_machine *machine, const struct tms34061_interface *interface) | |
| 78 | 79 | { |
| 79 | 80 | /* reset the data */ |
| 80 | 81 | memset(&tms34061, 0, sizeof(tms34061)); |
| 82 | tms34061.machine = machine; | |
| 81 | 83 | tms34061.intf = *interface; |
| 82 | 84 | tms34061.vrammask = tms34061.intf.vramsize - 1; |
| 83 | 85 | |
| r1527 | r1528 | |
| 135 | 137 | { |
| 136 | 138 | /* if the status bit is set, and ints are enabled, turn it on */ |
| 137 | 139 | if ((tms34061.regs[TMS34061_STATUS] & 0x0001) && (tms34061.regs[TMS34061_CONTROL1] & 0x0400)) |
| 138 | (*tms34061.intf.interrupt)(ASSERT_LINE); | |
| 140 | (*tms34061.intf.interrupt)(tms34061.machine, ASSERT_LINE); | |
| 139 | 141 | else |
| 140 | (*tms34061.intf.interrupt)(CLEAR_LINE); | |
| 142 | (*tms34061.intf.interrupt)(tms34061.machine, CLEAR_LINE); | |
| 141 | 143 | } |
| 142 | 144 | } |
| 143 | 145 |
| r1527 | r1528 | |
|---|---|---|
| 37 | 37 | /* interface structure */ |
| 38 | 38 | struct tms34061_interface |
| 39 | 39 | { |
| 40 | int scrnum; /* the screen we are acting on */ | |
| 41 | UINT8 rowshift; /* VRAM address is (row << rowshift) | col */ | |
| 42 | UINT32 vramsize; /* size of video RAM */ | |
| 43 | void (*interrupt)(int state); /* interrupt gen callback */ | |
| 40 | int scrnum; /* the screen we are acting on */ | |
| 41 | UINT8 rowshift; /* VRAM address is (row << rowshift) | col */ | |
| 42 | UINT32 vramsize; /* size of video RAM */ | |
| 43 | void (*interrupt)(running_machine *machine, int state); /* interrupt gen callback */ | |
| 44 | 44 | }; |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | /* display state structure */ |
| 48 | 48 | struct tms34061_display |
| 49 | 49 | { |
| 50 | UINT8 blanked; /* true if blanked */ | |
| 51 | UINT8 * vram; /* base of VRAM */ | |
| 52 | UINT8 * latchram; /* base of latch RAM */ | |
| 53 | UINT16 * regs; /* pointer to array of registers */ | |
| 54 | offs_t dispstart; /* display start */ | |
| 50 | UINT8 blanked; /* true if blanked */ | |
| 51 | UINT8 *vram; /* base of VRAM */ | |
| 52 | UINT8 *latchram; /* base of latch RAM */ | |
| 53 | UINT16 *regs; /* pointer to array of registers */ | |
| 54 | offs_t dispstart; /* display start */ | |
| 55 | 55 | }; |
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | /* starts/stops the emulator */ |
| 59 | void tms34061_start(const struct tms34061_interface *interface); | |
| 59 | void tms34061_start(running_machine *machine, const struct tms34061_interface *interface); | |
| 60 | 60 | |
| 61 | 61 | /* reads/writes to the 34061 */ |
| 62 | 62 | UINT8 tms34061_r(int col, int row, int func); |
| r1527 | r1528 | |
|---|---|---|
| 51 | 51 | size_t spriteram_2_size; |
| 52 | 52 | size_t spriteram_3_size; |
| 53 | 53 | |
| 54 | UINT8 *dirtybuffer; | |
| 55 | UINT16 *dirtybuffer16; | |
| 56 | UINT32 *dirtybuffer32; | |
| 57 | ||
| 58 | 54 | UINT8 *paletteram; |
| 59 | 55 | UINT16 *paletteram16; |
| 60 | 56 | UINT32 *paletteram32; |
| r1527 | r1528 | |
| 296 | 292 | spriteram_size = 0; /* ... here just for convenience */ |
| 297 | 293 | spriteram_2_size = 0; |
| 298 | 294 | spriteram_3_size = 0; |
| 299 | dirtybuffer = NULL; | |
| 300 | dirtybuffer16 = NULL; | |
| 301 | dirtybuffer32 = NULL; | |
| 302 | 295 | tmpbitmap = NULL; |
| 303 | 296 | flip_screen_x = flip_screen_y = 0; |
| 304 | 297 | } |
| r1527 | r1528 | |
| 310 | 303 | ***************************************************************************/ |
| 311 | 304 | |
| 312 | 305 | /*------------------------------------------------- |
| 313 | video_generic_postload - post-load callback | |
| 314 | that marks all videoram as dirty | |
| 315 | -------------------------------------------------*/ | |
| 316 | ||
| 317 | static void video_generic_postload(void) | |
| 318 | { | |
| 319 | memset(dirtybuffer, 1, videoram_size); | |
| 320 | } | |
| 321 | ||
| 322 | ||
| 323 | /*------------------------------------------------- | |
| 324 | 306 | video_start_generic - general video system |
| 325 | with dirty buffer support | |
| 326 | 307 | -------------------------------------------------*/ |
| 327 | 308 | |
| 328 | 309 | VIDEO_START( generic ) |
| 329 | 310 | { |
| 330 | 311 | assert_always(videoram_size != 0, "VIDEO_START(generic) requires non-zero videoram_size"); |
| 331 | 312 | |
| 332 | /* allocate memory for the dirty buffer */ | |
| 333 | dirtybuffer = auto_malloc(videoram_size); | |
| 334 | memset(dirtybuffer, 1, videoram_size); | |
| 335 | ||
| 336 | 313 | /* allocate the temporary bitmap */ |
| 337 | 314 | tmpbitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 338 | ||
| 339 | /* on a restore, we automatically zap the dirty buffer */ | |
| 340 | state_save_register_func_postload(video_generic_postload); | |
| 341 | 315 | } |
| 342 | 316 | |
| 343 | 317 | |
| r1527 | r1528 | |
| 370 | 344 | |
| 371 | 345 | |
| 372 | 346 | /*************************************************************************** |
| 373 | GENERIC READ/WRITE HANDLERS | |
| 374 | ***************************************************************************/ | |
| 375 | ||
| 376 | /*------------------------------------------------- | |
| 377 | videoram_r/w - 8-bit access to videoram with | |
| 378 | dirty buffer marking | |
| 379 | -------------------------------------------------*/ | |
| 380 | ||
| 381 | READ8_HANDLER( videoram_r ) | |
| 382 | { | |
| 383 | return videoram[offset]; | |
| 384 | } | |
| 385 | ||
| 386 | WRITE8_HANDLER( videoram_w ) | |
| 387 | { | |
| 388 | dirtybuffer[offset] = 1; | |
| 389 | videoram[offset] = data; | |
| 390 | } | |
| 391 | ||
| 392 | ||
| 393 | /*------------------------------------------------- | |
| 394 | colorram_r/w - 8-bit access to colorram with | |
| 395 | dirty buffer marking | |
| 396 | -------------------------------------------------*/ | |
| 397 | ||
| 398 | READ8_HANDLER( colorram_r ) | |
| 399 | { | |
| 400 | return colorram[offset]; | |
| 401 | } | |
| 402 | ||
| 403 | WRITE8_HANDLER( colorram_w ) | |
| 404 | { | |
| 405 | dirtybuffer[offset] = 1; | |
| 406 | colorram[offset] = data; | |
| 407 | } | |
| 408 | ||
| 409 | ||
| 410 | /*------------------------------------------------- | |
| 411 | spriteram_r/w - 8-bit access to spriteram | |
| 412 | -------------------------------------------------*/ | |
| 413 | ||
| 414 | READ8_HANDLER( spriteram_r ) | |
| 415 | { | |
| 416 | return spriteram[offset]; | |
| 417 | } | |
| 418 | ||
| 419 | WRITE8_HANDLER( spriteram_w ) | |
| 420 | { | |
| 421 | spriteram[offset] = data; | |
| 422 | } | |
| 423 | ||
| 424 | ||
| 425 | /*------------------------------------------------- | |
| 426 | spriteram16_r/w - 16-bit access to spriteram16 | |
| 427 | -------------------------------------------------*/ | |
| 428 | ||
| 429 | READ16_HANDLER( spriteram16_r ) | |
| 430 | { | |
| 431 | return spriteram16[offset]; | |
| 432 | } | |
| 433 | ||
| 434 | WRITE16_HANDLER( spriteram16_w ) | |
| 435 | { | |
| 436 | COMBINE_DATA(spriteram16+offset); | |
| 437 | } | |
| 438 | ||
| 439 | ||
| 440 | /*------------------------------------------------- | |
| 441 | spriteram_r/w - 8-bit access to spriteram2 | |
| 442 | -------------------------------------------------*/ | |
| 443 | ||
| 444 | READ8_HANDLER( spriteram_2_r ) | |
| 445 | { | |
| 446 | return spriteram_2[offset]; | |
| 447 | } | |
| 448 | ||
| 449 | WRITE8_HANDLER( spriteram_2_w ) | |
| 450 | { | |
| 451 | spriteram_2[offset] = data; | |
| 452 | } | |
| 453 | ||
| 454 | ||
| 455 | ||
| 456 | /*************************************************************************** | |
| 457 | 347 | GENERIC SPRITE BUFFERING |
| 458 | 348 | ***************************************************************************/ |
| 459 | 349 |
| r1527 | r1528 | |
|---|---|---|
| 95 | 95 | /* set up all the common systems */ |
| 96 | 96 | void generic_video_init(running_machine *machine); |
| 97 | 97 | |
| 98 | /* generic video start | |
| 98 | /* generic video start | |
| 99 | 99 | VIDEO_START( generic ); |
| 100 | 100 | |
| 101 | 101 | /* generic video start with a temporary bitmap */ |
| r1527 | r1528 | |
| 106 | 106 | |
| 107 | 107 | |
| 108 | 108 | |
| 109 | /* ----- core video/color/spriteram access ----- */ | |
| 110 | ||
| 111 | /* video RAM read/write handlers */ | |
| 112 | READ8_HANDLER( videoram_r ); | |
| 113 | WRITE8_HANDLER( videoram_w ); | |
| 114 | ||
| 115 | /* color RAM read/write handlers */ | |
| 116 | READ8_HANDLER( colorram_r ); | |
| 117 | WRITE8_HANDLER( colorram_w ); | |
| 118 | ||
| 119 | /* sprite RAM read/write handlers */ | |
| 120 | READ8_HANDLER( spriteram_r ); | |
| 121 | WRITE8_HANDLER( spriteram_w ); | |
| 122 | READ16_HANDLER( spriteram16_r ); | |
| 123 | WRITE16_HANDLER( spriteram16_w ); | |
| 124 | READ8_HANDLER( spriteram_2_r ); | |
| 125 | WRITE8_HANDLER( spriteram_2_w ); | |
| 126 | ||
| 127 | ||
| 128 | ||
| 129 | 109 | /* ----- sprite buffering ----- */ |
| 130 | 110 | |
| 131 | 111 | /* buffered sprite RAM write handlers */ |
| r1527 | r1528 | |
|---|---|---|
| 16 | 16 | static UINT8 writeindex, readindex; |
| 17 | 17 | static UINT8 dacbits; |
| 18 | 18 | |
| 19 | static rgb_t pens[0x100]; | |
| 19 | 20 | |
| 20 | 21 | #define PALETTE_WRITE_ADDR 0x00 |
| 21 | 22 | #define PALETTE_DATA 0x01 |
| r1527 | r1528 | |
| 33 | 34 | |
| 34 | 35 | /************************************* |
| 35 | 36 | * |
| 36 | * | |
| 37 | * R | |
| 37 | 38 | * |
| 38 | 39 | *************************************/ |
| 39 | 40 | |
| 40 | st | |
| 41 | const | |
| 41 | 42 | { |
| 42 | int totalcolors = (Machine->drv->total_colors <= 256) ? Machine->drv->total_colors : 256; | |
| 43 | int i, mask = regs[PIXEL_READ_MASK]; | |
| 43 | offs_t i; | |
| 44 | 44 | |
| 45 | for (i = 0; i < totalcolors; i++) | |
| 46 | if (which == -1 || (i & mask) == which) | |
| 45 | for (i = 0; i < 0x100; i++) | |
| 46 | { | |
| 47 | int r, g, b; | |
| 48 | ||
| 49 | if ((i & regs[PIXEL_READ_MASK]) == i) | |
| 47 | 50 | { |
| 48 | int r = local_paletteram[3 * i + 0]; | |
| 49 | int g = local_paletteram[3 * i + 1]; | |
| 50 | int b = local_paletteram[3 * i + 2]; | |
| 51 | r = local_paletteram[3 * i + 0]; | |
| 52 | g = local_paletteram[3 * i + 1]; | |
| 53 | b = local_paletteram[3 * i + 2]; | |
| 54 | ||
| 51 | 55 | if (dacbits == 6) |
| 52 | 56 | { |
| 53 | 57 | r = pal6bit(r); |
| 54 | 58 | g = pal6bit(g); |
| 55 | 59 | b = pal6bit(b); |
| 56 | 60 | } |
| 57 | palette_set_color(Machine, i, MAKE_RGB(r, g, b)); | |
| 58 | 61 | } |
| 62 | else | |
| 63 | { | |
| 64 | r = 0; | |
| 65 | g = 0; | |
| 66 | b = 0; | |
| 67 | } | |
| 68 | ||
| 69 | pens[i] = MAKE_RGB(r, g, b); | |
| 70 | } | |
| 71 | ||
| 72 | return pens; | |
| 59 | 73 | } |
| 60 | 74 | |
| 61 | 75 | |
| r1527 | r1528 | |
| 68 | 82 | |
| 69 | 83 | void tlc34076_reset(int dacwidth) |
| 70 | 84 | { |
| 71 | /* set the DAC width */ | |
| 85 | assert_always((dacbits == 6) || (dacbits != 8), "tlc34076_reset: dacwidth must be 6 or 8!"); | |
| 86 | ||
| 72 | 87 | dacbits = dacwidth; |
| 73 | if (dacbits != 6 && dacbits != 8) | |
| 74 | { | |
| 75 | logerror("tlc34076_reset: dacwidth must be 6 or 8!\n"); | |
| 76 | dacbits = 6; | |
| 77 | } | |
| 78 | 88 | |
| 79 | 89 | /* reset the registers */ |
| 80 | 90 | regs[PIXEL_READ_MASK] = 0xff; |
| r1527 | r1528 | |
| 156 | 166 | local_paletteram[3 * regs[PALETTE_WRITE_ADDR] + 0] = palettedata[0]; |
| 157 | 167 | local_paletteram[3 * regs[PALETTE_WRITE_ADDR] + 1] = palettedata[1]; |
| 158 | 168 | local_paletteram[3 * regs[PALETTE_WRITE_ADDR] + 2] = palettedata[2]; |
| 159 | update_palette(regs[PALETTE_WRITE_ADDR]); | |
| 160 | 169 | writeindex = 0; |
| 161 | 170 | regs[PALETTE_WRITE_ADDR]++; |
| 162 | 171 | } |
| r1527 | r1528 | |
| 219 | 228 | */ |
| 220 | 229 | break; |
| 221 | 230 | |
| 222 | case PIXEL_READ_MASK: | |
| 223 | case PALETTE_PAGE: | |
| 224 | update_palette(-1); | |
| 225 | break; | |
| 226 | ||
| 227 | 231 | case RESET_STATE: |
| 228 | 232 | tlc34076_reset(dacbits); |
| 229 | 233 | break; |
| r1527 | r1528 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | void tlc34076_reset(int dacwidth); |
| 11 | 11 | |
| 12 | const pen_t *tlc34076_get_pens(void); | |
| 13 | ||
| 12 | 14 | READ8_HANDLER( tlc34076_r ); |
| 13 | 15 | WRITE8_HANDLER( tlc34076_w ); |
| 14 | 16 |
| r1527 | r1528 | |
|---|---|---|
| 13 | 13 | #include "rendutil.h" |
| 14 | 14 | #include "cheat.h" |
| 15 | 15 | #include "uimenu.h" |
| 16 | #include "uitext.h" | |
| 17 | 16 | #include "audit.h" |
| 18 | 17 | |
| 19 | 18 | #ifdef MESS |
| r1527 | r1528 | |
| 184 | 183 | static void switches_menu_select_previous(input_port_entry *in, int switch_entry); |
| 185 | 184 | static void switches_menu_select_next(input_port_entry *in, int switch_entry); |
| 186 | 185 | //static int switches_menu_compare_items(const void *i1, const void *i2); |
| 187 | static void analog_menu_add_item(ui_menu_item *item, const input_port_entry *in, | |
| 186 | static void analog_menu_add_item(ui_menu_item *item, const input_port_entry *in, const char *append_string, int which_item); | |
| 188 | 187 | |
| 189 | 188 | /* DIP switch helpers */ |
| 190 | 189 | static void dip_switch_build_model(input_port_entry *entry, int item_is_selected); |
| r1527 | r1528 | |
| 533 | 532 | |
| 534 | 533 | static void ui_menu_draw_text_box(const char *text) |
| 535 | 534 | { |
| 536 | const char *priortext = | |
| 535 | const char *priortext = "R | |
| 537 | 536 | float line_height = ui_get_line_height(); |
| 538 | 537 | float lr_arrow_width = 0.4f * line_height * render_get_ui_aspect(); |
| 539 | 538 | float gutter_width = lr_arrow_width; |
| r1527 | r1528 | |
| 756 | 755 | { |
| 757 | 756 | #define ADD_MENU(name, _handler, _param) \ |
| 758 | 757 | do { \ |
| 759 | item_list[menu_items].text = | |
| 758 | item_list[menu_items].text = | |
| 760 | 759 | handler_list[menu_items].handler = _handler; \ |
| 761 | 760 | handler_list[menu_items].state = _param; \ |
| 762 | 761 | menu_items++; \ |
| r1527 | r1528 | |
| 790 | 789 | memset(item_list, 0, sizeof(item_list)); |
| 791 | 790 | |
| 792 | 791 | /* add input menu items */ |
| 793 | ADD_MENU(UI_inputgeneral, menu_input_groups, 0); | |
| 794 | ADD_MENU(UI_inputspecific, menu_input, 1000 << 16); | |
| 792 | ADD_MENU("Input (general)", menu_input_groups, 0); | |
| 793 | ADD_MENU("Input (this " CAPSTARTGAMENOUN ")", menu_input, 1000 << 16); | |
| 795 | 794 | |
| 796 | 795 | /* add optional input-related menus */ |
| 797 | 796 | if (has_dips) |
| 798 | ADD_MENU( | |
| 797 | ADD_MENU("D | |
| 799 | 798 | if (has_configs) |
| 800 | ADD_MENU( | |
| 799 | ADD_MENU("Driver Configuration", menu_switches, (IPT_CONFIG_NAME << 16) | (IPT_CONFIG_SETTING << 24)); | |
| 801 | 800 | #ifdef MESS |
| 802 | 801 | if (has_categories) |
| 803 | ADD_MENU( | |
| 802 | ADD_MENU("C | |
| 804 | 803 | #endif |
| 805 | 804 | if (has_analog) |
| 806 | ADD_MENU( | |
| 805 | ADD_MENU("A | |
| 807 | 806 | |
| 808 | 807 | #ifndef MESS |
| 809 | 808 | /* add bookkeeping menu */ |
| 810 | ADD_MENU( | |
| 809 | ADD_MENU("B | |
| 811 | 810 | #endif |
| 812 | 811 | |
| 813 | 812 | /* add game info menu */ |
| 814 | ADD_MENU(UI | |
| 813 | ADD_MENU(CAPSTARTGAMENOUN " I | |
| 815 | 814 | |
| 816 | 815 | #ifdef MESS |
| 817 | 816 | /* add image info menu */ |
| 818 | ADD_MENU( | |
| 817 | ADD_MENU("I | |
| 819 | 818 | |
| 820 | 819 | /* add image info menu */ |
| 821 | ADD_MENU( | |
| 820 | ADD_MENU("F | |
| 822 | 821 | |
| 823 | 822 | #if HAS_WAVE |
| 824 | 823 | /* add tape control menu */ |
| 825 | 824 | if (device_find(Machine->devices, IO_CASSETTE)) |
| 826 | ADD_MENU( | |
| 825 | ADD_MENU("T | |
| 827 | 826 | #endif /* HAS_WAVE */ |
| 828 | 827 | #endif /* MESS */ |
| 829 | 828 | |
| 830 | 829 | /* add video options menu */ |
| 831 | ADD_MENU( | |
| 830 | ADD_MENU("V | |
| 832 | 831 | |
| 833 | 832 | /* add cheat menu */ |
| 834 | 833 | if (options_get_bool(mame_options(), OPTION_CHEAT)) |
| 835 | ADD_MENU( | |
| 834 | ADD_MENU("C | |
| 836 | 835 | |
| 837 | 836 | /* add memory card menu */ |
| 838 | 837 | if (Machine->drv->memcard_handler != NULL) |
| 839 | ADD_MENU( | |
| 838 | ADD_MENU("M | |
| 840 | 839 | |
| 841 | 840 | /* add reset and exit menus */ |
| 842 | ADD_MENU(UI_selectgame, menu_select_game, 1 << 16); | |
| 843 | ADD_MENU(UI_returntogame, NULL, 0); | |
| 841 | ADD_MENU("Select New " CAPSTARTGAMENOUN, menu_select_game, 1 << 16); | |
| 842 | ADD_MENU("Return to " CAPSTARTGAMENOUN, NULL, 0); | |
| 844 | 843 | |
| 845 | 844 | /* draw the menu */ |
| 846 | 845 | visible_items = ui_menu_draw(item_list, menu_items, state, NULL); |
| r1527 | r1528 | |
| 867 | 866 | ui_menu_item item_list[IPG_TOTAL_GROUPS + 2]; |
| 868 | 867 | int menu_items = 0; |
| 869 | 868 | int visible_items; |
| 869 | int player; | |
| 870 | 870 | |
| 871 | 871 | /* reset the menu */ |
| 872 | 872 | memset(item_list, 0, sizeof(item_list)); |
| 873 | 873 | |
| 874 | 874 | /* build up the menu */ |
| 875 | for (menu_items = 0; menu_items < IPG_TOTAL_GROUPS; menu_items++) | |
| 876 | item_list[menu_items].text = ui_getstring(UI_uigroup + menu_items); | |
| 875 | item_list[menu_items++].text = "User Interface"; | |
| 876 | for (player = 0; player < MAX_PLAYERS; player++) | |
| 877 | item_list[menu_items++].text = menu_string_pool_add("Player %d Controls", player + 1); | |
| 878 | item_list[menu_items++].text = "Other Controls"; | |
| 877 | 879 | |
| 878 | 880 | /* add an item for the return */ |
| 879 | item_list[menu_items++].text = | |
| 881 | item_list[menu_items++].text = "R | |
| 880 | 882 | |
| 881 | 883 | /* draw the menu */ |
| 882 | 884 | visible_items = ui_menu_draw(item_list, menu_items, state, NULL); |
| r1527 | r1528 | |
| 932 | 934 | qsort(item_list, menu_items, sizeof(item_list[0]), input_menu_compare_items); |
| 933 | 935 | |
| 934 | 936 | /* add an item to return */ |
| 935 | item_list[menu_items++].text = | |
| 937 | item_list[menu_items++].text = "R | |
| 936 | 938 | |
| 937 | 939 | /* if we're polling, just put an empty entry and arrows for the subitem */ |
| 938 | 940 | if (polling) |
| r1527 | r1528 | |
| 1037 | 1039 | selected_in = item_list[selected].ref; |
| 1038 | 1040 | |
| 1039 | 1041 | /* add an item to return */ |
| 1040 | item_list[menu_items++].text = | |
| 1042 | item_list[menu_items++].text = "R | |
| 1041 | 1043 | |
| 1042 | 1044 | /* configure the extra menu */ |
| 1043 | 1045 | extra.top = 0; |
| r1527 | r1528 | |
| 1140 | 1142 | } |
| 1141 | 1143 | |
| 1142 | 1144 | /* add the needed items for each analog input */ |
| 1143 | analog_menu_add_item(&item_list[menu_items++], in, | |
| 1145 | analog_menu_add_item(&item_list[menu_items++], in, "Digital Speed", ANALOG_ITEM_KEYSPEED); | |
| 1144 | 1146 | if (use_autocenter) |
| 1145 | analog_menu_add_item(&item_list[menu_items++], in, UI_centerspeed, ANALOG_ITEM_CENTERSPEED); | |
| 1146 | analog_menu_add_item(&item_list[menu_items++], in, UI_reverse, ANALOG_ITEM_REVERSE); | |
| 1147 | analog_menu_add_item(&item_list[menu_items++], in, UI_sensitivity, ANALOG_ITEM_SENSITIVITY); | |
| 1147 | analog_menu_add_item(&item_list[menu_items++], in, "Autocenter Speed", ANALOG_ITEM_CENTERSPEED); | |
| 1148 | analog_menu_add_item(&item_list[menu_items++], in, "Reverse", ANALOG_ITEM_REVERSE); | |
| 1149 | analog_menu_add_item(&item_list[menu_items++], in, "Sensitivity", ANALOG_ITEM_SENSITIVITY); | |
| 1148 | 1150 | } |
| 1149 | 1151 | |
| 1150 | 1152 | /* add an item to return */ |
| 1151 | item_list[menu_items++].text = | |
| 1153 | item_list[menu_items++].text = "R | |
| 1152 | 1154 | |
| 1153 | 1155 | /* draw the menu */ |
| 1154 | 1156 | visible_items = ui_menu_draw(item_list, menu_items, state, NULL); |
| r1527 | r1528 | |
| 1196 | 1198 | /* show total time first */ |
| 1197 | 1199 | total_time = timer_get_time(); |
| 1198 | 1200 | if (total_time.seconds >= 60 * 60) |
| 1199 | bufptr += sprintf(bufptr, " | |
| 1201 | bufptr += sprintf(bufptr, "Uptime: %d:%02d:%02d\n\n" | |
| 1200 | 1202 | else |
| 1201 | bufptr += sprintf(bufptr, " | |
| 1203 | bufptr += sprintf(bufptr, "Uptime: %d:%02d\n\n" | |
| 1202 | 1204 | |
| 1203 | 1205 | /* show tickets at the top */ |
| 1204 | 1206 | if (dispensed_tickets) |
| 1205 | bufptr += sprintf(bufptr, " | |
| 1207 | bufptr += sprintf(bufptr, "Tickets dispensed: %d\n\n" | |
| 1206 | 1208 | |
| 1207 | 1209 | /* loop over coin counters */ |
| 1208 | 1210 | for (ctrnum = 0; ctrnum < COIN_COUNTERS; ctrnum++) |
| 1209 | 1211 | { |
| 1210 | 1212 | /* display the coin counter number */ |
| 1211 | bufptr += sprintf(bufptr, " | |
| 1213 | bufptr += sprintf(bufptr, "Coin %c: " | |
| 1212 | 1214 | |
| 1213 | 1215 | /* display how many coins */ |
| 1214 | 1216 | if (!coin_count[ctrnum]) |
| 1215 | bufptr += sprintf(bufptr, " | |
| 1217 | bufptr += sprintf(bufptr, " | |
| 1216 | 1218 | else |
| 1217 | 1219 | bufptr += sprintf(bufptr, "%d", coin_count[ctrnum]); |
| 1218 | 1220 | |
| 1219 | 1221 | /* display whether or not we are locked out */ |
| 1220 | 1222 | if (coinlockedout[ctrnum]) |
| 1221 | bufptr += sprintf(bufptr, " | |
| 1223 | bufptr += sprintf(bufptr, " | |
| 1222 | 1224 | *bufptr++ = '\n'; |
| 1223 | 1225 | } |
| 1224 | 1226 | *bufptr = 0; |
| r1527 | r1528 | |
| 1288 | 1290 | menu_string_pool_offset = 0; |
| 1289 | 1291 | |
| 1290 | 1292 | /* add the card select menu */ |
| 1291 | item_list[menu_items].text = | |
| 1293 | item_list[menu_items].text = "C | |
| 1292 | 1294 | item_list[menu_items].subtext = menu_string_pool_add("%d", cardnum); |
| 1293 | 1295 | if (cardnum > 0) |
| 1294 | 1296 | item_list[menu_items].flags |= MENU_FLAG_LEFT_ARROW; |
| r1527 | r1528 | |
| 1297 | 1299 | menu_items++; |
| 1298 | 1300 | |
| 1299 | 1301 | /* add the remaining items */ |
| 1300 | item_list[insertindex = menu_items++].text = | |
| 1302 | item_list[insertindex = menu_items++].text = "L | |
| 1301 | 1303 | if (memcard_present() != -1) |
| 1302 | item_list[ejectindex = menu_items++].text = ui_getstring(UI_ejectcard); | |
| 1303 | item_list[createindex = menu_items++].text = ui_getstring(UI_createcard); | |
| 1304 | item_list[ejectindex = menu_items++].text = "Eject Current Card"; | |
| 1305 | item_list[createindex = menu_items++].text = "Create New Card"; | |
| 1304 | 1306 | |
| 1305 | 1307 | /* add an item for the return */ |
| 1306 | item_list[menu_items++].text = | |
| 1308 | item_list[menu_items++].text = "R | |
| 1307 | 1309 | |
| 1308 | 1310 | /* draw the menu */ |
| 1309 | 1311 | visible_items = ui_menu_draw(item_list, menu_items, selected, NULL); |
| r1527 | r1528 | |
| 1324 | 1326 | { |
| 1325 | 1327 | if (memcard_insert(cardnum) == 0) |
| 1326 | 1328 | { |
| 1327 | popmessage(" | |
| 1329 | popmessage("M | |
| 1328 | 1330 | ui_menu_stack_reset(); |
| 1329 | 1331 | return 0; |
| 1330 | 1332 | } |
| 1331 | 1333 | else |
| 1332 | popmessage(" | |
| 1334 | popmessage("E | |
| 1333 | 1335 | } |
| 1334 | 1336 | |
| 1335 | 1337 | /* handle eject */ |
| 1336 | 1338 | else if (selected == ejectindex) |
| 1337 | 1339 | { |
| 1338 | 1340 | memcard_eject(Machine); |
| 1339 | popmessage(" | |
| 1341 | popmessage("M | |
| 1340 | 1342 | } |
| 1341 | 1343 | |
| 1342 | 1344 | /* handle create */ |
| 1343 | 1345 | else if (selected == createindex) |
| 1344 | 1346 | { |
| 1345 | 1347 | if (memcard_create(cardnum, FALSE) == 0) |
| 1346 | popmessage(" | |
| 1348 | popmessage("M | |
| 1347 | 1349 | else |
| 1348 | popmessage(" | |
| 1350 | popmessage("E | |
| 1349 | 1351 | } |
| 1350 | 1352 | } |
| 1351 | 1353 | |
| r1527 | r1528 | |
| 1384 | 1386 | { |
| 1385 | 1387 | /* count up the targets, creating menu items for them */ |
| 1386 | 1388 | for (; menu_items < targets; menu_items++) |
| 1387 | item_list[menu_items].text = menu_string_pool_add(" | |
| 1389 | item_list[menu_items].text = menu_string_pool_add("S | |
| 1388 | 1390 | |
| 1389 | 1391 | /* if we only ended up with one, auto-select it */ |
| 1390 | 1392 | if (menu_items == 1) |
| r1527 | r1528 | |
| 1394 | 1396 | item_list[menu_items++].text = "Move User Interface"; |
| 1395 | 1397 | |
| 1396 | 1398 | /* add an item to return */ |
| 1397 | item_list[menu_items++].text = | |
| 1399 | item_list[menu_items++].text = "R | |
| 1398 | 1400 | |
| 1399 | 1401 | /* draw the menu */ |
| 1400 | 1402 | visible_items = ui_menu_draw(item_list, menu_items, selected, NULL); |
| r1527 | r1528 | |
| 1469 | 1471 | item_list[menu_items++].text = "Crop to Screen"; |
| 1470 | 1472 | |
| 1471 | 1473 | /* add an item to return */ |
| 1472 | item_list[menu_items++].text = | |
| 1474 | item_list[menu_items++].text = "R | |
| 1473 | 1475 | |
| 1474 | 1476 | /* draw the menu */ |
| 1475 | 1477 | visible_items = ui_menu_draw(item_list, menu_items, selected, NULL); |
| r1527 | r1528 | |
| 1604 | 1606 | |
| 1605 | 1607 | /* add an item to return, but only if we're not going to pop to the quit handler */ |
| 1606 | 1608 | if (!ui_menu_is_force_game_select()) |
| 1607 | item_list[menu_items++].text = | |
| 1609 | item_list[menu_items++].text = "R | |
| 1608 | 1610 | |
| 1609 | 1611 | /* otherwise, add a general input configuration and exit menus */ |
| 1610 | 1612 | else |
| 1611 | 1613 | { |
| 1612 | 1614 | item_list[menu_items++].text = "Configure General Inputs"; |
| 1613 | item_list[menu_items++].text = | |
| 1615 | item_list[menu_items++].text = "E | |
| 1614 | 1616 | } |
| 1615 | 1617 | |
| 1616 | 1618 | /* configure the extra menu */ |
| r1527 | r1528 | |
| 2025 | 2027 | |
| 2026 | 2028 | /* if no matches, we're invalid */ |
| 2027 | 2029 | if (!item->subtext) |
| 2028 | item->subtext = | |
| 2030 | item->subtext = " | |
| 2029 | 2031 | |
| 2030 | 2032 | /* stash our reference */ |
| 2031 | 2033 | item->ref = ref; |
| r1527 | r1528 | |
| 2110 | 2112 | analog controls menu |
| 2111 | 2113 | -------------------------------------------------*/ |
| 2112 | 2114 | |
| 2113 | static void analog_menu_add_item(ui_menu_item *item, const input_port_entry *in, | |
| 2115 | static void analog_menu_add_item(ui_menu_item *item, const input_port_entry *in, const char *append_string, int which_item) | |
| 2114 | 2116 | { |
| 2115 | 2117 | int value, minval, maxval; |
| 2116 | 2118 | |
| 2117 | 2119 | /* set the item text using the formatting string provided */ |
| 2118 | item->text = menu_string_pool_add("%s %s", input_port_name(in), | |
| 2120 | item->text = menu_string_pool_add("%s %s", input_port_name(in), | |
| 2119 | 2121 | |
| 2120 | 2122 | /* set the subitem text */ |
| 2121 | 2123 | switch (which_item) |
| r1527 | r1528 | |
| 2139 | 2141 | value = in->analog.reverse; |
| 2140 | 2142 | minval = 0; |
| 2141 | 2143 | maxval = 1; |
| 2142 | item->subtext = value ? | |
| 2144 | item->subtext = value ? "O | |
| 2143 | 2145 | break; |
| 2144 | 2146 | |
| 2145 | 2147 | case ANALOG_ITEM_SENSITIVITY: |
| r1527 | r1528 | |
|---|---|---|
| 584 | 584 | int base = gfxdecodeinfo[i].start; |
| 585 | 585 | int end = region_length/8; |
| 586 | 586 | int linemod = gl->yoffset[0]; |
| 587 | while ( | |
| 587 | while ( | |
| 588 | 588 | { |
| 589 | 589 | int elementbase = base + (total - 1) * charincrement / 8; |
| 590 | 590 | int lastpixelbase = elementbase + height * linemod / 8 - 1; |
| r1527 | r1528 | |
|---|---|---|
| 73 | 73 | $(EMUOBJ)/ui.o \ |
| 74 | 74 | $(EMUOBJ)/uigfx.o \ |
| 75 | 75 | $(EMUOBJ)/uimenu.o \ |
| 76 | $(EMUOBJ)/uitext.o \ | |
| 77 | 76 | $(EMUOBJ)/validity.o \ |
| 78 | 77 | $(EMUOBJ)/video.o \ |
| 79 | 78 |
| r1527 | r1528 | |
|---|---|---|
| 177 | 177 | { |
| 178 | 178 | const pia6821_interface *intf = pias[i].intf; |
| 179 | 179 | |
| 180 | if (intf == NULL) continue; | |
| 181 | ||
| 180 | 182 | memset(&pias[i], 0, sizeof(pias[i])); |
| 181 | 183 | |
| 182 | 184 | pias[i].intf = intf; |
| r1527 | r1528 | |
| 190 | 192 | pias[i].in_a = 0xff; |
| 191 | 193 | pias[i].in_ca1 = TRUE; |
| 192 | 194 | pias[i].in_ca2 = TRUE; |
| 193 | } | |
| 194 | } | |
| 195 | 195 | |
| 196 | ||
| 197 | ||
| 198 | /************************************* | |
| 199 | * | |
| 200 | * Wire-OR for all interrupt handlers | |
| 201 | * | |
| 202 | *************************************/ | |
| 203 | ||
| 204 | static void update_shared_irq_handler(void (*irq_func)(int state)) | |
| 205 | { | |
| 206 | int i; | |
| 207 | ||
| 208 | /* search all PIAs for this same IRQ function */ | |
| 209 | for (i = 0; i < MAX_PIA; i++) | |
| 210 | { | |
| 211 | if (pias[i].intf) | |
| 212 | { | |
| 213 | /* check IRQ A */ | |
| 214 | if ((pias[i].intf->irq_a_func == irq_func) && pias[i].irq_a_state) | |
| 215 | { | |
| 216 | (*irq_func)(TRUE); | |
| 217 | return; | |
| 218 | } | |
| 219 | ||
| 220 | /* check IRQ B */ | |
| 221 | if ((pias[i].intf->irq_b_func == irq_func) && pias[i].irq_b_state) | |
| 222 | { | |
| 223 | (*irq_func)(TRUE); | |
| 224 | return; | |
| 225 | } | |
| 226 | } | |
| 196 | /* clear the IRQs */ | |
| 197 | if (intf->irq_a_func) (*intf->irq_a_func)(FALSE); | |
| 198 | if (intf->irq_b_func) (*intf->irq_b_func)(FALSE); | |
| 227 | 199 | } |
| 228 | ||
| 229 | /* if we found nothing, the state is off */ | |
| 230 | (*irq_func)(FALSE); | |
| 231 | 200 | } |
| 232 | 201 | |
| 233 | 202 | |
| r1527 | r1528 | |
| 249 | 218 | { |
| 250 | 219 | p->irq_a_state = new_state; |
| 251 | 220 | |
| 252 | if (p->intf->irq_a_func) | |
| 221 | if (p->intf->irq_a_func) | |
| 253 | 222 | } |
| 254 | 223 | |
| 255 | 224 | /* then do IRQ B */ |
| r1527 | r1528 | |
| 259 | 228 | { |
| 260 | 229 | p->irq_b_state = new_state; |
| 261 | 230 | |
| 262 | if (p->intf->irq_b_func) | |
| 231 | if (p->intf->irq_b_func) | |
| 263 | 232 | } |
| 264 | 233 | } |
| 265 | 234 | |
| r1527 | r1528 | |
| 879 | 848 | * |
| 880 | 849 | *************************************/ |
| 881 | 850 | |
| 851 | UINT8 pia_get_input_a(int which) | |
| 852 | { | |
| 853 | pia6821 *p = &pias[which]; | |
| 854 | ||
| 855 | return p->in_a; | |
| 856 | } | |
| 857 | ||
| 858 | ||
| 882 | 859 | void pia_set_input_a(int which, UINT8 data, UINT8 z_mask) |
| 883 | 860 | { |
| 884 | 861 | pia6821 *p = &pias[which]; |
| 885 | 862 | |
| 886 | 863 | assert_always(p->intf->in_a_func == NULL, "pia_set_input_a() called when in_a_func implemented"); |
| 887 | 864 | |
| 865 | LOG(("cpu #%d (PC=%08X): PIA #%d: set input port A = %02X\n", cpu_getactivecpu(), safe_activecpu_get_pc(), which, data)); | |
| 866 | ||
| 888 | 867 | p->in_a = data; |
| 889 | 868 | p->port_a_z_mask = z_mask; |
| 890 | 869 | p->in_a_pushed = TRUE; |
| r1527 | r1528 | |
| 908 | 887 | * |
| 909 | 888 | *************************************/ |
| 910 | 889 | |
| 890 | int pia_get_input_ca1(int which) | |
| 891 | { | |
| 892 | pia6821 *p = &pias[which]; | |
| 893 | ||
| 894 | return p->in_ca1; | |
| 895 | } | |
| 896 | ||
| 897 | ||
| 911 | 898 | void pia_set_input_ca1(int which, int data) |
| 912 | 899 | { |
| 913 | 900 | pia6821 *p = &pias[which]; |
| r1527 | r1528 | |
| 915 | 902 | /* limit the data to 0 or 1 */ |
| 916 | 903 | data = data ? TRUE : FALSE; |
| 917 | 904 | |
| 905 | LOG(("cpu #%d (PC=%08X): PIA #%d: set input CA1 = %d\n", cpu_getactivecpu(), safe_activecpu_get_pc(), which, data)); | |
| 906 | ||
| 918 | 907 | /* the new state has caused a transition */ |
| 919 | 908 | if ((p->in_ca1 != data) && |
| 920 | 909 | ((data && C1_LOW_TO_HIGH(p->ctl_a)) || (!data && C1_HIGH_TO_LOW(p->ctl_a)))) |
| 921 | 910 | { |
| 911 | LOG(("cpu #%d (PC=%08X): PIA #%d: CA1 triggering\n", cpu_getactivecpu(), safe_activecpu_get_pc(), which)); | |
| 912 | ||
| 922 | 913 | /* mark the IRQ */ |
| 923 | 914 | p->irq_a1 = TRUE; |
| 924 | 915 | |
| r1527 | r1528 | |
| 943 | 934 | * |
| 944 | 935 | *************************************/ |
| 945 | 936 | |
| 937 | int pia_get_input_ca2(int which) | |
| 938 | { | |
| 939 | pia6821 *p = &pias[which]; | |
| 940 | ||
| 941 | return p->in_ca2; | |
| 942 | } | |
| 943 | ||
| 944 | ||
| 946 | 945 | void pia_set_input_ca2(int which, int data) |
| 947 | 946 | { |
| 948 | 947 | pia6821 *p = &pias[which]; |
| r1527 | r1528 | |
| 950 | 949 | /* limit the data to 0 or 1 */ |
| 951 | 950 | data = data ? 1 : 0; |
| 952 | 951 | |
| 952 | LOG(("cpu #%d (PC=%08X): PIA #%d: set input CA2 = %d\n", cpu_getactivecpu(), safe_activecpu_get_pc(), which, data)); | |
| 953 | ||
| 953 | 954 | /* if input mode and the new state has caused a transition */ |
| 954 | 955 | if (C2_INPUT(p->ctl_a) && |
| 955 | 956 | (p->in_ca2 != data) && |
| 956 | 957 | ((data && C2_LOW_TO_HIGH(p->ctl_a)) || (!data && C2_HIGH_TO_LOW(p->ctl_a)))) |
| 957 | 958 | { |
| 959 | LOG(("cpu #%d (PC=%08X): PIA #%d: CA2 triggering\n", cpu_getactivecpu(), safe_activecpu_get_pc(), which)); | |
| 960 | ||
| 958 | 961 | /* mark the IRQ */ |
| 959 | 962 | p->irq_a2 = TRUE; |
| 960 | 963 | |
| r1527 | r1528 | |
| 985 | 988 | * |
| 986 | 989 | *************************************/ |
| 987 | 990 | |
| 991 | UINT8 pia_get_input_b(int which) | |
| 992 | { | |
| 993 | pia6821 *p = &pias[which]; | |
| 994 | ||
| 995 | return p->in_b; | |
| 996 | } | |
| 997 | ||
| 998 | ||
| 988 | 999 | void pia_set_input_b(int which, UINT8 data) |
| 989 | 1000 | { |
| 990 | 1001 | pia6821 *p = &pias[which]; |
| 991 | 1002 | |
| 992 | 1003 | assert_always(p->intf->in_b_func == NULL, "pia_set_input_b() called when in_b_func implemented"); |
| 993 | 1004 | |
| 1005 | LOG(("cpu #%d (PC=%08X): PIA #%d: set input port B = %02X\n", cpu_getactivecpu(), safe_activecpu_get_pc(), which, data)); | |
| 1006 | ||
| 994 | 1007 | p->in_b = data; |
| 995 | 1008 | p->in_b_pushed = TRUE; |
| 996 | 1009 | } |
| r1527 | r1528 | |
| 1014 | 1027 | * |
| 1015 | 1028 | *************************************/ |
| 1016 | 1029 | |
| 1030 | int pia_get_input_cb1(int which) | |
| 1031 | { | |
| 1032 | pia6821 *p = &pias[which]; | |
| 1033 | ||
| 1034 | return p->in_cb1; | |
| 1035 | } | |
| 1036 | ||
| 1037 | ||
| 1017 | 1038 | void pia_set_input_cb1(int which, int data) |
| 1018 | 1039 | { |
| 1019 | 1040 | pia6821 *p = &pias[which]; |
| r1527 | r1528 | |
| 1021 | 1042 | /* limit the data to 0 or 1 */ |
| 1022 | 1043 | data = data ? 1 : 0; |
| 1023 | 1044 | |
| 1045 | LOG(("cpu #%d (PC=%08X): PIA #%d: set input CB1 = %d\n", cpu_getactivecpu(), safe_activecpu_get_pc(), which, data)); | |
| 1046 | ||
| 1024 | 1047 | /* the new state has caused a transition */ |
| 1025 | 1048 | if ((p->in_cb1 != data) && |
| 1026 | 1049 | ((data && C1_LOW_TO_HIGH(p->ctl_b)) || (!data && C1_HIGH_TO_LOW(p->ctl_b)))) |
| 1027 | 1050 | { |
| 1051 | LOG(("cpu #%d (PC=%08X): PIA #%d: CB1 triggering\n", cpu_getactivecpu(), safe_activecpu_get_pc(), which)); | |
| 1052 | ||
| 1028 | 1053 | /* mark the IRQ */ |
| 1029 | 1054 | p->irq_b1 = 1; |
| 1030 | 1055 | |
| r1527 | r1528 | |
| 1050 | 1075 | * |
| 1051 | 1076 | *************************************/ |
| 1052 | 1077 | |
| 1078 | int pia_get_input_cb2(int which) | |
| 1079 | { | |
| 1080 | pia6821 *p = &pias[which]; | |
| 1081 | ||
| 1082 | return p->in_cb2; | |
| 1083 | } | |
| 1084 | ||
| 1085 | ||
| 1053 | 1086 | void pia_set_input_cb2(int which, int data) |
| 1054 | 1087 | { |
| 1055 | 1088 | pia6821 *p = &pias[which]; |
| r1527 | r1528 | |
| 1057 | 1090 | /* limit the data to 0 or 1 */ |
| 1058 | 1091 | data = data ? 1 : 0; |
| 1059 | 1092 | |
| 1093 | LOG(("cpu #%d (PC=%08X): PIA #%d: set input CB2 = %d\n", cpu_getactivecpu(), safe_activecpu_get_pc(), which, data)); | |
| 1094 | ||
| 1060 | 1095 | /* if input mode and the new state has caused a transition */ |
| 1061 | 1096 | if (C2_INPUT(p->ctl_b) && |
| 1062 | 1097 | (p->in_cb2 != data) && |
| 1063 | 1098 | ((data && C2_LOW_TO_HIGH(p->ctl_b)) || (!data && C2_HIGH_TO_LOW(p->ctl_b)))) |
| 1064 | 1099 | { |
| 1100 | LOG(("cpu #%d (PC=%08X): PIA #%d: CB2 triggering\n", cpu_getactivecpu(), safe_activecpu_get_pc(), which)); | |
| 1101 | ||
| 1065 | 1102 | /* mark the IRQ */ |
| 1066 | 1103 | p->irq_b2 = 1; |
| 1067 | 1104 | |
| r1527 | r1528 | |
| 1256 | 1293 | WRITE8_HANDLER( pia_6_portb_w ) { pia_set_input_b(6, data); } |
| 1257 | 1294 | WRITE8_HANDLER( pia_7_portb_w ) { pia_set_input_b(7, data); } |
| 1258 | 1295 | |
| 1259 | READ8_HANDLER( pia_0_porta_r ) { return pias[0].in_a; } | |
| 1260 | READ8_HANDLER( pia_1_porta_r ) { return pias[1].in_a; } | |
| 1261 | READ8_HANDLER( pia_2_porta_r ) { return pias[2].in_a; } | |
| 1262 | READ8_HANDLER( pia_3_porta_r ) { return pias[3].in_a; } | |
| 1263 | READ8_HANDLER( pia_4_porta_r ) { return pias[4].in_a; } | |
| 1264 | READ8_HANDLER( pia_5_porta_r ) { return pias[5].in_a; } | |
| 1265 | READ8_HANDLER( pia_6_porta_r ) { return pias[6].in_a; } | |
| 1266 | READ8_HANDLER( pia_7_porta_r ) { return pias[7].in_a; } | |
| 1296 | READ8_HANDLER( pia_0_porta_r ) { return pia_get_input_a(0); } | |
| 1297 | READ8_HANDLER( pia_1_porta_r ) { return pia_get_input_a(1); } | |
| 1298 | READ8_HANDLER( pia_2_porta_r ) { return pia_get_input_a(2); } | |
| 1299 | READ8_HANDLER( pia_3_porta_r ) { return pia_get_input_a(3); } | |
| 1300 | READ8_HANDLER( pia_4_porta_r ) { return pia_get_input_a(4); } | |
| 1301 | READ8_HANDLER( pia_5_porta_r ) { return pia_get_input_a(5); } | |
| 1302 | READ8_HANDLER( pia_6_porta_r ) { return pia_get_input_a(6); } | |
| 1303 | READ8_HANDLER( pia_7_porta_r ) { return pia_get_input_a(7); } | |
| 1267 | 1304 | |
| 1268 | READ8_HANDLER( pia_0_portb_r ) { return pias[0].in_b; } | |
| 1269 | READ8_HANDLER( pia_1_portb_r ) { return pias[1].in_b; } | |
| 1270 | READ8_HANDLER( pia_2_portb_r ) { return pias[2].in_b; } | |
| 1271 | READ8_HANDLER( pia_3_portb_r ) { return pias[3].in_b; } | |
| 1272 | READ8_HANDLER( pia_4_portb_r ) { return pias[4].in_b; } | |
| 1273 | READ8_HANDLER( pia_5_portb_r ) { return pias[5].in_b; } | |
| 1274 | READ8_HANDLER( pia_6_portb_r ) { return pias[6].in_b; } | |
| 1275 | READ8_HANDLER( pia_7_portb_r ) { return pias[7].in_b; } | |
| 1305 | READ8_HANDLER( pia_0_portb_r ) { return pia_get_input_b(0); } | |
| 1306 | READ8_HANDLER( pia_1_portb_r ) { return pia_get_input_b(1); } | |
| 1307 | READ8_HANDLER( pia_2_portb_r ) { return pia_get_input_b(2); } | |
| 1308 | READ8_HANDLER( pia_3_portb_r ) { return pia_get_input_b(3); } | |
| 1309 | READ8_HANDLER( pia_4_portb_r ) { return pia_get_input_b(4); } | |
| 1310 | READ8_HANDLER( pia_5_portb_r ) { return pia_get_input_b(5); } | |
| 1311 | READ8_HANDLER( pia_6_portb_r ) { return pia_get_input_b(6); } | |
| 1312 | READ8_HANDLER( pia_7_portb_r ) { return pia_get_input_b(7); } | |
| 1276 | 1313 | |
| 1277 | 1314 | /******************* 1-bit CA1/CA2/CB1/CB2 port interfaces *******************/ |
| 1278 | 1315 | |
| r1527 | r1528 | |
| 1312 | 1349 | WRITE8_HANDLER( pia_6_cb2_w ) { pia_set_input_cb2(6, data); } |
| 1313 | 1350 | WRITE8_HANDLER( pia_7_cb2_w ) { pia_set_input_cb2(7, data); } |
| 1314 | 1351 | |
| 1315 | READ8_HANDLER( pia_0_ca1_r ) { return pias[0].in_ca1; } | |
| 1316 | READ8_HANDLER( pia_1_ca1_r ) { return pias[1].in_ca1; } | |
| 1317 | READ8_HANDLER( pia_2_ca1_r ) { return pias[2].in_ca1; } | |
| 1318 | READ8_HANDLER( pia_3_ca1_r ) { return pias[3].in_ca1; } | |
| 1319 | READ8_HANDLER( pia_4_ca1_r ) { return pias[4].in_ca1; } | |
| 1320 | READ8_HANDLER( pia_5_ca1_r ) { return pias[5].in_ca1; } | |
| 1321 | READ8_HANDLER( pia_6_ca1_r ) { return pias[6].in_ca1; } | |
| 1322 | READ8_HANDLER( pia_7_ca1_r ) { return pias[7].in_ca1; } | |
| 1352 | READ8_HANDLER( pia_0_ca1_r ) { return pia_get_input_ca1(0); } | |
| 1353 | READ8_HANDLER( pia_1_ca1_r ) { return pia_get_input_ca1(1); } | |
| 1354 | READ8_HANDLER( pia_2_ca1_r ) { return pia_get_input_ca1(2); } | |
| 1355 | READ8_HANDLER( pia_3_ca1_r ) { return pia_get_input_ca1(3); } | |
| 1356 | READ8_HANDLER( pia_4_ca1_r ) { return pia_get_input_ca1(4); } | |
| 1357 | READ8_HANDLER( pia_5_ca1_r ) { return pia_get_input_ca1(5); } | |
| 1358 | READ8_HANDLER( pia_6_ca1_r ) { return pia_get_input_ca1(6); } | |
| 1359 | READ8_HANDLER( pia_7_ca1_r ) { return pia_get_input_ca1(7); } | |
| 1323 | 1360 | |
| 1324 | READ8_HANDLER( pia_0_ca2_r ) { return pias[0].in_ca2; } | |
| 1325 | READ8_HANDLER( pia_1_ca2_r ) { return pias[1].in_ca2; } | |
| 1326 | READ8_HANDLER( pia_2_ca2_r ) { return pias[2].in_ca2; } | |
| 1327 | READ8_HANDLER( pia_3_ca2_r ) { return pias[3].in_ca2; } | |
| 1328 | READ8_HANDLER( pia_4_ca2_r ) { return pias[4].in_ca2; } | |
| 1329 | READ8_HANDLER( pia_5_ca2_r ) { return pias[5].in_ca2; } | |
| 1330 | READ8_HANDLER( pia_6_ca2_r ) { return pias[6].in_ca2; } | |
| 1331 | READ8_HANDLER( pia_7_ca2_r ) { return pias[7].in_ca2; } | |
| 1361 | READ8_HANDLER( pia_0_ca2_r ) { return pia_get_input_ca2(0); } | |
| 1362 | READ8_HANDLER( pia_1_ca2_r ) { return pia_get_input_ca2(1); } | |
| 1363 | READ8_HANDLER( pia_2_ca2_r ) { return pia_get_input_ca2(2); } | |
| 1364 | READ8_HANDLER( pia_3_ca2_r ) { return pia_get_input_ca2(3); } | |
| 1365 | READ8_HANDLER( pia_4_ca2_r ) { return pia_get_input_ca2(4); } | |
| 1366 | READ8_HANDLER( pia_5_ca2_r ) { return pia_get_input_ca2(5); } | |
| 1367 | READ8_HANDLER( pia_6_ca2_r ) { return pia_get_input_ca2(6); } | |
| 1368 | READ8_HANDLER( pia_7_ca2_r ) { return pia_get_input_ca2(7); } | |
| 1332 | 1369 | |
| 1333 | READ8_HANDLER( pia_0_cb1_r ) { return pias[0].in_cb1; } | |
| 1334 | READ8_HANDLER( pia_1_cb1_r ) { return pias[1].in_cb1; } | |
| 1335 | READ8_HANDLER( pia_2_cb1_r ) { return pias[2].in_cb1; } | |
| 1336 | READ8_HANDLER( pia_3_cb1_r ) { return pias[3].in_cb1; } | |
| 1337 | READ8_HANDLER( pia_4_cb1_r ) { return pias[4].in_cb1; } | |
| 1338 | READ8_HANDLER( pia_5_cb1_r ) { return pias[5].in_cb1; } | |
| 1339 | READ8_HANDLER( pia_6_cb1_r ) { return pias[6].in_cb1; } | |
| 1340 | READ8_HANDLER( pia_7_cb1_r ) { return pias[7].in_cb1; } | |
| 1370 | READ8_HANDLER( pia_0_cb1_r ) { return pia_get_input_cb1(0); } | |
| 1371 | READ8_HANDLER( pia_1_cb1_r ) { return pia_get_input_cb1(1); } | |
| 1372 | READ8_HANDLER( pia_2_cb1_r ) { return pia_get_input_cb1(2); } | |
| 1373 | READ8_HANDLER( pia_3_cb1_r ) { return pia_get_input_cb1(3); } | |
| 1374 | READ8_HANDLER( pia_4_cb1_r ) { return pia_get_input_cb1(4); } | |
| 1375 | READ8_HANDLER( pia_5_cb1_r ) { return pia_get_input_cb1(5); } | |
| 1376 | READ8_HANDLER( pia_6_cb1_r ) { return pia_get_input_cb1(6); } | |
| 1377 | READ8_HANDLER( pia_7_cb1_r ) { return pia_get_input_cb1(7); } | |
| 1341 | 1378 | |
| 1342 | READ8_HANDLER( pia_0_cb2_r ) { return pias[0].in_cb2; } | |
| 1343 | READ8_HANDLER( pia_1_cb2_r ) { return pias[1].in_cb2; } | |
| 1344 | READ8_HANDLER( pia_2_cb2_r ) { return pias[2].in_cb2; } | |
| 1345 | READ8_HANDLER( pia_3_cb2_r ) { return pias[3].in_cb2; } | |
| 1346 | READ8_HANDLER( pia_4_cb2_r ) { return pias[4].in_cb2; } | |
| 1347 | READ8_HANDLER( pia_5_cb2_r ) { return pias[5].in_cb2; } | |
| 1348 | READ8_HANDLER( pia_6_cb2_r ) { return pias[6].in_cb2; } | |
| 1349 | READ8_HANDLER( pia_7_cb2_r ) { return pias[7].in_cb2; } | |
| 1379 | READ8_HANDLER( pia_0_cb2_r ) { return pia_get_input_cb2(0); } | |
| 1380 | READ8_HANDLER( pia_1_cb2_r ) { return pia_get_input_cb2(1); } | |
| 1381 | READ8_HANDLER( pia_2_cb2_r ) { return pia_get_input_cb2(2); } | |
| 1382 | READ8_HANDLER( pia_3_cb2_r ) { return pia_get_input_cb2(3); } | |
| 1383 | READ8_HANDLER( pia_4_cb2_r ) { return pia_get_input_cb2(4); } | |
| 1384 | READ8_HANDLER( pia_5_cb2_r ) { return pia_get_input_cb2(5); } | |
| 1385 | READ8_HANDLER( pia_6_cb2_r ) { return pia_get_input_cb2(6); } | |
| 1386 | READ8_HANDLER( pia_7_cb2_r ) { return pia_get_input_cb2(7); } |
| r1527 | r1528 | |
|---|---|---|
| 313 | 313 | r6532[which].intf = intf; |
| 314 | 314 | |
| 315 | 315 | /* Default clock is CPU #0 clock */ |
| 316 | r6532_set_clock( which, | |
| 316 | r6532_set_clock( which, | |
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 |
| r1527 | r1528 | |
|---|---|---|
| 165 | 165 | via[which].time2 = via[which].time1 = timer_get_time(); |
| 166 | 166 | |
| 167 | 167 | /* Default clock is from CPU1 */ |
| 168 | via_set_clock (which, | |
| 168 | via_set_clock (which, | |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /******************* external interrupt check *******************/ |
| r1527 | r1528 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | /*------------- Device interface for port A --------------*/ |
| 78 | 78 | |
| 79 | UINT8 pia_get_input_a(int which); | |
| 79 | 80 | void pia_set_input_a(int which, UINT8 data, UINT8 z_mask); |
| 80 | 81 | UINT8 pia_get_output_a(int which); |
| 81 | 82 | |
| r1527 | r1528 | |
| 83 | 84 | |
| 84 | 85 | /*----------- Device interface for the CA1 pin -----------*/ |
| 85 | 86 | |
| 87 | int pia_get_input_ca1(int which); | |
| 86 | 88 | void pia_set_input_ca1(int which, int data); |
| 87 | 89 | |
| 88 | 90 | |
| 89 | 91 | |
| 90 | 92 | /*----------- Device interface for the CA2 pin -----------*/ |
| 91 | 93 | |
| 94 | int pia_get_input_ca2(int which); | |
| 92 | 95 | void pia_set_input_ca2(int which, int data); |
| 93 | 96 | int pia_get_output_ca2(int which); |
| 94 | 97 | |
| 95 | 98 | |
| 96 | 99 | |
| 97 | /*------------- Device interface for port | |
| 100 | /*------------- Device interface for port B --------------*/ | |
| 98 | 101 | |
| 102 | UINT8 pia_get_input_b(int which); | |
| 99 | 103 | void pia_set_input_b(int which, UINT8 data); |
| 100 | 104 | UINT8 pia_get_output_b(int which); |
| 101 | 105 | |
| r1527 | r1528 | |
| 103 | 107 | |
| 104 | 108 | /*----------- Device interface for the CB1 pin -----------*/ |
| 105 | 109 | |
| 110 | int pia_get_input_cb1(int which); | |
| 106 | 111 | void pia_set_input_cb1(int which, int data); |
| 107 | 112 | |
| 108 | 113 | |
| 109 | 114 | |
| 110 | 115 | /*----------- Device interface for the CB2 pin -----------*/ |
| 111 | 116 | |
| 117 | int pia_get_input_cb2(int which); | |
| 112 | 118 | void pia_set_input_cb2(int which, int data); |
| 113 | 119 | int pia_get_output_cb2(int which); |
| 114 | 120 | int pia_get_output_cb2_z(int which); /* see first note */ |
| r1527 | r1528 | |
|---|---|---|
| 90 | 90 | { |
| 91 | 91 | int scale = (TCR & 0x3c00)>>10; // P4..1 |
| 92 | 92 | if (scale > 8) scale = 8; |
| 93 | duration = attotime_mul(ATTOTIME_IN_HZ( | |
| 93 | duration = attotime_mul(ATTOTIME_IN_HZ( | |
| 94 | 94 | } |
| 95 | 95 | break; |
| 96 | 96 | } |
| r1527 | r1528 | |
|---|---|---|
| 35 | 35 | #define IP_ACTIVE_LOW 0xffffffff |
| 36 | 36 | |
| 37 | 37 | |
| 38 | /* macro for a custom callback functions (PORT_CUSTOM) */ | |
| 39 | #define CUSTOM_INPUT(name) UINT32 name(void *param) | |
| 40 | ||
| 41 | ||
| 38 | 42 | /* sequence types for input_port_seq() call */ |
| 39 | 43 | enum _input_seq_type |
| 40 | 44 | { |
| r1527 | r1528 | |
| 44 | 48 | }; |
| 45 | 49 | typedef enum _input_seq_type input_seq_type; |
| 46 | 50 | |
| 51 | ||
| 47 | 52 | /* conditions for DIP switches */ |
| 48 | 53 | enum |
| 49 | 54 | { |
| r1527 | r1528 | |
|---|---|---|
| 53 | 53 | void i8039_get_info(UINT32 state, cpuinfo *info); |
| 54 | 54 | void i8048_get_info(UINT32 state, cpuinfo *info); |
| 55 | 55 | void n7751_get_info(UINT32 state, cpuinfo *info); |
| 56 | void mb8884_get_info(UINT32 state, cpuinfo *info); | |
| 57 | void m58715_get_info(UINT32 state, cpuinfo *info); | |
| 56 | 58 | void i8x41_get_info(UINT32 state, cpuinfo *info); |
| 57 | 59 | void i8051_get_info(UINT32 state, cpuinfo *info); |
| 58 | 60 | void i8052_get_info(UINT32 state, cpuinfo *info); |
| r1527 | r1528 | |
| 113 | 115 | void jaguardsp_get_info(UINT32 state, cpuinfo *info); |
| 114 | 116 | void r3000be_get_info(UINT32 state, cpuinfo *info); |
| 115 | 117 | void r3000le_get_info(UINT32 state, cpuinfo *info); |
| 118 | void r3041be_get_info(UINT32 state, cpuinfo *info); | |
| 119 | void r3041le_get_info(UINT32 state, cpuinfo *info); | |
| 116 | 120 | void r4600be_get_info(UINT32 state, cpuinfo *info); |
| 117 | 121 | void r4600le_get_info(UINT32 state, cpuinfo *info); |
| 118 | 122 | void r4650be_get_info(UINT32 state, cpuinfo *info); |
| r1527 | r1528 | |
| 365 | 369 | #if (HAS_N7751) |
| 366 | 370 | { CPU_N7751, n7751_get_info }, |
| 367 | 371 | #endif |
| 372 | #if (HAS_MB8884) | |
| 373 | { CPU_MB8884, mb8884_get_info }, | |
| 374 | #endif | |
| 375 | #if (HAS_M58715) | |
| 376 | { CPU_M58715, m58715_get_info }, | |
| 377 | #endif | |
| 368 | 378 | #if (HAS_I8X41) |
| 369 | 379 | { CPU_I8X41, i8x41_get_info }, |
| 370 | 380 | #endif |
| r1527 | r1528 | |
| 541 | 551 | { CPU_R3000BE, r3000be_get_info }, |
| 542 | 552 | { CPU_R3000LE, r3000le_get_info }, |
| 543 | 553 | #endif |
| 554 | #if (HAS_R3041) | |
| 555 | { CPU_R3041BE, r3041be_get_info }, | |
| 556 | { CPU_R3041LE, r3041le_get_info }, | |
| 557 | #endif | |
| 544 | 558 | #if (HAS_R4600) |
| 545 | 559 | { CPU_R4600BE, r4600be_get_info }, |
| 546 | 560 | { CPU_R4600LE, r4600le_get_info }, |
| r1527 | r1528 | |
| 989 | 1003 | totalcpu = 0; |
| 990 | 1004 | |
| 991 | 1005 | /* compute information about the CPUs now if we have a machine */ |
| 992 | if ( | |
| 1006 | if (machine != NULL) | |
| 993 | 1007 | { |
| 994 | 1008 | /* loop over all defined CPUs */ |
| 995 | 1009 | for (totalcpu = 0; totalcpu < CPU_COUNT; totalcpu++) |
| 996 | 1010 | { |
| 997 | cpu_type cputype = | |
| 1011 | cpu_type cputype = machine->drv->cpu[totalcpu].type; | |
| 998 | 1012 | char familyname[256]; |
| 999 | 1013 | int j; |
| 1000 | 1014 | |
| r1527 | r1528 | |
| 1607 | 1621 | case CPUINFO_INT_INPUT_LINES: info->i = 1; break; |
| 1608 | 1622 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 1609 | 1623 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 1624 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 1610 | 1625 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 1611 | 1626 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; |
| 1612 | 1627 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 1; break; |
| r1527 | r1528 | |
|---|---|---|
| 215 | 215 | /* initialize the cpuinfo struct */ |
| 216 | 216 | memset(&cpu[cpunum], 0, sizeof(cpu[cpunum])); |
| 217 | 217 | cpu[cpunum].suspend = SUSPEND_REASON_RESET; |
| 218 | cpu[cpunum].clock = machine->drv->cpu[cpunum].clock; | |
| 218 | cpu[cpunum].clock = (UINT64)machine->drv->cpu[cpunum].clock * cputype_clock_multiplier(cputype) / cputype_clock_divider(cputype); | |
| 219 | 219 | cpu[cpunum].clockscale = 1.0; |
| 220 | 220 | cpu[cpunum].localtime = attotime_zero; |
| 221 | 221 |
| r1527 | r1528 | |
|---|---|---|
| 81 | 81 | CPUINFO_INT_OUTPUT_LINES, /* R/O: number of output lines */ |
| 82 | 82 | CPUINFO_INT_DEFAULT_IRQ_VECTOR, /* R/O: default IRQ vector */ |
| 83 | 83 | CPUINFO_INT_ENDIANNESS, /* R/O: either CPU_IS_BE or CPU_IS_LE */ |
| 84 | CPUINFO_INT_CLOCK_MULTIPLIER, /* R/O: internal clock multiplier */ | |
| 84 | 85 | CPUINFO_INT_CLOCK_DIVIDER, /* R/O: internal clock divider */ |
| 85 | 86 | CPUINFO_INT_MIN_INSTRUCTION_BYTES, /* R/O: minimum bytes per instruction */ |
| 86 | 87 | CPUINFO_INT_MAX_INSTRUCTION_BYTES, /* R/O: maximum bytes per instruction */ |
| r1527 | r1528 | |
| 332 | 333 | #define activecpu_output_lines() activecpu_get_info_int(CPUINFO_INT_OUTPUT_LINES) |
| 333 | 334 | #define activecpu_default_irq_vector() activecpu_get_info_int(CPUINFO_INT_DEFAULT_IRQ_VECTOR) |
| 334 | 335 | #define activecpu_endianness() activecpu_get_info_int(CPUINFO_INT_ENDIANNESS) |
| 336 | #define activecpu_clock_multiplier() activecpu_get_info_int(CPUINFO_INT_CLOCK_MULTIPLIER) | |
| 335 | 337 | #define activecpu_clock_divider() activecpu_get_info_int(CPUINFO_INT_CLOCK_DIVIDER) |
| 336 | 338 | #define activecpu_min_instruction_bytes() activecpu_get_info_int(CPUINFO_INT_MIN_INSTRUCTION_BYTES) |
| 337 | 339 | #define activecpu_max_instruction_bytes() activecpu_get_info_int(CPUINFO_INT_MAX_INSTRUCTION_BYTES) |
| r1527 | r1528 | |
| 402 | 404 | #define cpunum_output_lines(cpunum) cpunum_get_info_int(cpunum, CPUINFO_INT_OUTPUT_LINES) |
| 403 | 405 | #define cpunum_default_irq_vector(cpunum) cpunum_get_info_int(cpunum, CPUINFO_INT_DEFAULT_IRQ_VECTOR) |
| 404 | 406 | #define cpunum_endianness(cpunum) cpunum_get_info_int(cpunum, CPUINFO_INT_ENDIANNESS) |
| 407 | #define cpunum_clock_multiplier(cpunum) cpunum_get_info_int(cpunum, CPUINFO_INT_CLOCK_MULTIPLIER) | |
| 405 | 408 | #define cpunum_clock_divider(cpunum) cpunum_get_info_int(cpunum, CPUINFO_INT_CLOCK_DIVIDER) |
| 406 | 409 | #define cpunum_min_instruction_bytes(cpunum) cpunum_get_info_int(cpunum, CPUINFO_INT_MIN_INSTRUCTION_BYTES) |
| 407 | 410 | #define cpunum_max_instruction_bytes(cpunum) cpunum_get_info_int(cpunum, CPUINFO_INT_MAX_INSTRUCTION_BYTES) |
| r1527 | r1528 | |
| 442 | 445 | #define cputype_output_lines(cputype) cputype_get_info_int(cputype, CPUINFO_INT_OUTPUT_LINES) |
| 443 | 446 | #define cputype_default_irq_vector(cputype) cputype_get_info_int(cputype, CPUINFO_INT_DEFAULT_IRQ_VECTOR) |
| 444 | 447 | #define cputype_endianness(cputype) cputype_get_info_int(cputype, CPUINFO_INT_ENDIANNESS) |
| 448 | #define cputype_clock_multiplier(cputype) cputype_get_info_int(cputype, CPUINFO_INT_CLOCK_MULTIPLIER) | |
| 445 | 449 | #define cputype_clock_divider(cputype) cputype_get_info_int(cputype, CPUINFO_INT_CLOCK_DIVIDER) |
| 446 | 450 | #define cputype_min_instruction_bytes(cputype) cputype_get_info_int(cputype, CPUINFO_INT_MIN_INSTRUCTION_BYTES) |
| 447 | 451 | #define cputype_max_instruction_bytes(cputype) cputype_get_info_int(cputype, CPUINFO_INT_MAX_INSTRUCTION_BYTES) |
| r1527 | r1528 | |
|---|---|---|
| 55 | 55 | CPU_I8039, |
| 56 | 56 | CPU_I8048, |
| 57 | 57 | CPU_N7751, |
| 58 | CPU_MB8884, | |
| 59 | CPU_M58715, | |
| 58 | 60 | CPU_I8X41, |
| 59 | 61 | CPU_I8051, |
| 60 | 62 | CPU_I8052, |
| r1527 | r1528 | |
| 116 | 118 | CPU_JAGUARDSP, |
| 117 | 119 | CPU_R3000BE, |
| 118 | 120 | CPU_R3000LE, |
| 121 | CPU_R3041BE, | |
| 122 | CPU_R3041LE, | |
| 119 | 123 | CPU_R4600BE, |
| 120 | 124 | CPU_R4600LE, |
| 121 | 125 | CPU_R4650BE, |
| r1527 | r1528 | |
|---|---|---|
| 960 | 960 | if(MDL(slot)!=0 || MDXSL(slot)!=0 || MDYSL(slot)!=0) |
| 961 | 961 | { |
| 962 | 962 | INT32 smp=(SCSP->RINGBUF[(SCSP->BUFPTR+MDXSL(slot))&63]+SCSP->RINGBUF[(SCSP->BUFPTR+MDYSL(slot))&63])/2; |
| 963 | INT32 cycle=LEA(slot)-LSA(slot); // cycle corresponds to 2 pi | |
| 964 | 963 | |
| 965 | 964 | smp<<=0xA; // associate cycle with 1024 |
| 966 | 965 | smp>>=0x1A-MDL(slot); // ex. for MDL=0xF, sample range corresponds to +/- 64 pi (32=2^5 cycles) so shift by 11 (16-5 == 0x1A-0xF) |
| 967 | while(smp<0) smp+=cycle; smp%=cycle; // keep modulation sampler within a single cycle | |
| 968 | 966 | if(!PCM8B(slot)) smp<<=1; |
| 969 | 967 | |
| 970 | 968 | addr1+=smp; addr2+=smp; |
| r1527 | r1528 | |
|---|---|---|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | |
| 76 | static void *tms5200_start(int sndindex, int clock, const void *config) | |
| 77 | { | |
| 78 | struct tms5220_info *info = tms5220_start(sndindex, clock, config); | |
| 79 | tms5220_set_variant(info->chip, variant_tmc0285); | |
| 80 | return info; | |
| 81 | } | |
| 76 | 82 | |
| 83 | ||
| 84 | ||
| 77 | 85 | /********************************************************************************************** |
| 78 | 86 | |
| 79 | 87 | tms5220_stop -- free buffers |
| r1527 | r1528 | |
| 244 | 252 | switch (state) |
| 245 | 253 | { |
| 246 | 254 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 255 | case SNDINFO_INT_ALIAS: info->i = SOUND_TMS5220; break; | |
| 247 | 256 | |
| 248 | 257 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 249 | 258 | case SNDINFO_PTR_SET_INFO: info->set_info = tms5220_set_info; break; |
| r1527 | r1528 | |
| 260 | 269 | } |
| 261 | 270 | } |
| 262 | 271 | |
| 272 | void tmc0285_get_info(void *token, UINT32 state, sndinfo *info) | |
| 273 | { | |
| 274 | switch (state) | |
| 275 | { | |
| 276 | case SNDINFO_PTR_START: info->start = tms5200_start; break; | |
| 277 | case SNDINFO_STR_NAME: info->s = "TMC0285"; break; | |
| 278 | default: tms5220_get_info(token, state, info); break; | |
| 279 | } | |
| 280 | } | |
| 281 | ||
| 282 | void tms5200_get_info(void *token, UINT32 state, sndinfo *info) | |
| 283 | { | |
| 284 | switch (state) | |
| 285 | { | |
| 286 | case SNDINFO_PTR_START: info->start = tms5200_start; break; | |
| 287 | case SNDINFO_STR_NAME: info->s = "TMS5200"; break; | |
| 288 | default: tms5220_get_info(token, state, info); break; | |
| 289 | } | |
| 290 | } | |
| 291 |
| r1527 | r1528 | |
|---|---|---|
| 581 | 581 | #------------------------------------------------- |
| 582 | 582 | |
| 583 | 583 | SOUNDDEFS += -DHAS_TMS5110=$(if $(filter TMS5110,$(SOUNDS)),1,0) |
| 584 | SOUNDDEFS += -DHAS_TMC0285=$(if $(filter TMC0285,$(SOUNDS)),1,0) | |
| 585 | SOUNDDEFS += -DHAS_TMS5200=$(if $(filter TMS5200,$(SOUNDS)),1,0) | |
| 584 | 586 | SOUNDDEFS += -DHAS_TMS5220=$(if $(filter TMS5220,$(SOUNDS)),1,0) |
| 585 | 587 | |
| 586 | 588 | ifneq ($(filter TMS5110,$(SOUNDS)),) |
| 587 | 589 | SOUNDOBJS += $(SOUNDOBJ)/tms5110.o $(SOUNDOBJ)/5110intf.o |
| 588 | 590 | endif |
| 589 | 591 | |
| 590 | ifneq ($(filter TMS5220,$(SOUNDS)),) | |
| 592 | ifneq ($(filter TMC0285 TMS5200 TMS5220,$(SOUNDS)),) | |
| 591 | 593 | SOUNDOBJS += $(SOUNDOBJ)/tms5220.o $(SOUNDOBJ)/5220intf.o |
| 592 | 594 | endif |
| 593 | 595 |
| r1527 | r1528 | |
|---|---|---|
| 26 | 26 | * modified code so that the beast only start speaking at the start of next frame, like the data |
| 27 | 27 | sheet says |
| 28 | 28 | */ |
| 29 | #define USE_OBSOLETE_HACK 0 | |
| 30 | 29 | |
| 31 | 30 | |
| 32 | 31 | #ifndef TRUE |
| r1527 | r1528 | |
| 58 | 57 | */ |
| 59 | 58 | UINT8 tms5220_speaking; /* Speak or Speak External command in progress */ |
| 60 | 59 | UINT8 speak_external; /* Speak External command in progress */ |
| 61 | #if USE_OBSOLETE_HACK | |
| 62 | UINT8 speak_delay_frames; | |
| 63 | #endif | |
| 64 | 60 | UINT8 talk_status; /* tms5220 is really currently speaking */ |
| 65 | 61 | UINT8 first_frame; /* we have just started speaking, and we are to parse the first frame */ |
| 66 | 62 | UINT8 last_frame; /* we are doing the frame of sound */ |
| r1527 | r1528 | |
| 112 | 108 | UINT8 data_register; /* data register, used by read command */ |
| 113 | 109 | UINT8 RDB_flag; /* whether we should read data register or status register */ |
| 114 | 110 | |
| 115 | /* flag for variant tm | |
| 111 | /* flag for variant tmc0285/tms5200 emulation */ | |
| 116 | 112 | /* The TMC0285 AKA TMS5200 is an early variant of the TMS5220 used in |
| 117 | 113 | the early releases of the Speech Module for the TI-99/4(a) computer, |
| 118 | 114 | in Zaccaria's 'Money Money', and in a few other places. |
| r1527 | r1528 | |
| 231 | 227 | /* initialize the chip state */ |
| 232 | 228 | /* Note that we do not actually clear IRQ on start-up : IRQ is even raised if tms->buffer_empty or tms->buffer_low are 0 */ |
| 233 | 229 | tms->tms5220_speaking = tms->speak_external = tms->talk_status = tms->first_frame = tms->last_frame = tms->irq_pin = 0; |
| 234 | #if USE_OBSOLETE_HACK | |
| 235 | tms->speak_delay_frames = 0; | |
| 236 | #endif | |
| 237 | 230 | if (tms->irq_func) tms->irq_func(0); |
| 238 | 231 | tms->buffer_empty = tms->buffer_low = 1; |
| 239 | 232 | |
| r1527 | r1528 | |
| 315 | 308 | |
| 316 | 309 | /********************************************************************************************** |
| 317 | 310 | |
| 318 | tms5220_set_variant -- sets the tms5220 core to emulate its buggy forerunner, the tm | |
| 311 | tms5220_set_variant -- sets the tms5220 core to emulate its buggy forerunner, the tmc0285 | |
| 319 | 312 | |
| 320 | 313 | ***********************************************************************************************/ |
| 321 | 314 | |
| r1527 | r1528 | |
| 511 | 504 | tms->buffer_empty = 0; |
| 512 | 505 | } |
| 513 | 506 | |
| 514 | #if 0 | |
| 515 | /* we are to speak, yet we fill with 0s until start of next frame */ | |
| 516 | if (tms->first_frame) | |
| 517 | { | |
| 518 | while ((size > 0) && ((tms->sample_count != 0) || (tms->interp_count != 0))) | |
| 519 | { | |
| 520 | tms->sample_count = (tms->sample_count + 1) % 200; | |
| 521 | tms->interp_count = (tms->interp_count + 1) % 25; | |
| 522 | buffer[buf_count] = 0x00; /* should be (-1 << 8) ??? (cf note in data sheet, p 10, table 4) */ | |
| 523 | buf_count++; | |
| 524 | size--; | |
| 525 | } | |
| 526 | } | |
| 527 | #endif | |
| 528 | ||
| 529 | #if USE_OBSOLETE_HACK | |
| 530 | /* apply some delay before we actually consume data; Victory requires this */ | |
| 531 | if (tms->speak_delay_frames) | |
| 532 | { | |
| 533 | if (size <= tms->speak_delay_frames) | |
| 534 | { | |
| 535 | tms->speak_delay_frames -= size; | |
| 536 | size = 0; | |
| 537 | } | |
| 538 | else | |
| 539 | { | |
| 540 | size -= tms->speak_delay_frames; | |
| 541 | tms->speak_delay_frames = 0; | |
| 542 | } | |
| 543 | } | |
| 544 | #endif | |
| 545 | ||
| 546 | 507 | /* loop until the buffer is full or we've stopped speaking */ |
| 547 | 508 | while ((size > 0) && tms->talk_status) |
| 548 | 509 | { |
| r1527 | r1528 | |
| 847 | 808 | |
| 848 | 809 | case 0x60 : /* speak external */ |
| 849 | 810 | tms->tms5220_speaking = tms->speak_external = 1; |
| 850 | #if USE_OBSOLETE_HACK | |
| 851 | tms->speak_delay_frames = 10; | |
| 852 | #endif | |
| 853 | ||
| 854 | 811 | tms->RDB_flag = FALSE; |
| 855 | 812 | |
| 856 | 813 | /* according to the datasheet, this will cause an interrupt due to a BE condition */ |
| r1527 | r1528 | |
| 946 | 903 | |
| 947 | 904 | /* if the previous frame was a stop frame, don't do anything */ |
| 948 | 905 | if ((! the_first_frame) && (tms->old_energy == (energytable[15] >> 6))) |
| 949 | /*return 1;*/ | |
| 950 | { | |
| 951 | tms->buffer_empty = 1; | |
| 952 | 906 | return 1; |
| 953 | } | |
| 907 | // WARNING: This code below breaks Victory's power-on test! If you change it | |
| 908 | // make sure you test Victory. | |
| 909 | // { | |
| 910 | // if (DEBUG_5220) logerror("Buffer Empty set - Last frame stop frame\n"); | |
| 954 | 911 | |
| 912 | // tms->buffer_empty = 1; | |
| 913 | // return 1; | |
| 914 | // } | |
| 915 | ||
| 955 | 916 | if (tms->speak_external) |
| 956 | 917 | /* count the total number of bits available */ |
| 957 | 918 | bits = tms->fifo_count * 8 - tms->fifo_bits_taken; |
| r1527 | r1528 | |
| 1023 | 984 | tms->new_k[0] = k1table[extract_bits(tms, 5)]; |
| 1024 | 985 | tms->new_k[1] = k2table[extract_bits(tms, 5)]; |
| 1025 | 986 | tms->new_k[2] = k3table[extract_bits(tms, 4)]; |
| 1026 | if (tms->variant == variant_tm | |
| 987 | if (tms->variant == variant_tmc0285) | |
| 1027 | 988 | tms->new_k[3] = k3table[extract_bits(tms, 4)]; /* ??? */ |
| 1028 | 989 | else |
| 1029 | 990 | tms->new_k[3] = k4table[extract_bits(tms, 4)]; |
| r1527 | r1528 | |
| 1043 | 1004 | tms->new_k[0] = k1table[extract_bits(tms, 5)]; |
| 1044 | 1005 | tms->new_k[1] = k2table[extract_bits(tms, 5)]; |
| 1045 | 1006 | tms->new_k[2] = k3table[extract_bits(tms, 4)]; |
| 1046 | if (tms->variant == variant_tm | |
| 1007 | if (tms->variant == variant_tmc0285) | |
| 1047 | 1008 | tms->new_k[3] = k3table[extract_bits(tms, 4)]; /* ??? */ |
| 1048 | 1009 | else |
| 1049 | 1010 | tms->new_k[3] = k4table[extract_bits(tms, 4)]; |
| r1527 | r1528 | |
|---|---|---|
| 25 | 25 | typedef enum |
| 26 | 26 | { |
| 27 | 27 | variant_tms5220, /* TMS5220_IS_TMS5220, TMS5220_IS_TMS5220C, TMS5220_IS_TSP5220C */ |
| 28 | variant_tm | |
| 28 | variant_tmc0285 /* TMS5220_IS_TMS5200, TMS5220_IS_CD2501 */ | |
| 29 | 29 | } tms5220_variant; |
| 30 | 30 | |
| 31 | 31 | void tms5220_set_variant(void *chip, tms5220_variant new_variant); |
| r1527 | r1528 | |
|---|---|---|
| 19 | 19 | #include "ui.h" |
| 20 | 20 | #include "uimenu.h" |
| 21 | 21 | #include "uigfx.h" |
| 22 | #include "uitext.h" | |
| 23 | 22 | |
| 24 | 23 | #ifdef MESS |
| 25 | 24 | #include "mess.h" |
| r1527 | r1528 | |
| 248 | 247 | /* make sure we clean up after ourselves */ |
| 249 | 248 | add_exit_callback(machine, ui_exit); |
| 250 | 249 | |
| 251 | /* load the localization file */ | |
| 252 | /* fix me -- need to find a real way to do this */ | |
| 253 | uistring_init(NULL); | |
| 254 | ||
| 255 | 250 | /* allocate the font */ |
| 256 | 251 | ui_font = render_font_alloc("ui.bdf"); |
| 257 | 252 | |
| r1527 | r1528 | |
| 946 | 941 | static int sprintf_disclaimer(char *buffer) |
| 947 | 942 | { |
| 948 | 943 | char *bufptr = buffer; |
| 949 | bufptr += sprintf(bufptr, "%s\n\n", ui_getstring(UI_copyright1)); | |
| 950 | bufptr += sprintf(bufptr, ui_getstring(UI_copyright2), Machine->gamedrv->description); | |
| 951 | bufptr += sprintf(bufptr, "\n\n%s", ui_getstring(UI_copyright3)); | |
| 944 | bufptr += sprintf(bufptr, "Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n"); | |
| 945 | bufptr += sprintf(bufptr, "IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", Machine->gamedrv->description); | |
| 946 | bufptr += sprintf(bufptr, "Otherwise, type OK or move the joystick left then right to continue"); | |
| 952 | 947 | return bufptr - buffer; |
| 953 | 948 | } |
| 954 | 949 | |
| r1527 | r1528 | |
| 978 | 973 | /* add a warning if any ROMs were loaded with warnings */ |
| 979 | 974 | if (rom_load_warnings() > 0) |
| 980 | 975 | { |
| 981 | bufptr += sprintf(bufptr, " | |
| 976 | bufptr += sprintf(bufptr, "O | |
| 982 | 977 | if (Machine->gamedrv->flags & WARNING_FLAGS) |
| 983 | 978 | *bufptr++ = '\n'; |
| 984 | 979 | } |
| r1527 | r1528 | |
| 986 | 981 | /* if we have at least one warning flag, print the general header */ |
| 987 | 982 | if (Machine->gamedrv->flags & WARNING_FLAGS) |
| 988 | 983 | { |
| 989 | bufptr += sprintf(bufptr, " | |
| 984 | bufptr += sprintf(bufptr, "Th | |
| 990 | 985 | |
| 991 | 986 | /* add one line per warning flag */ |
| 992 | 987 | #ifdef MESS |
| 993 | 988 | if (Machine->gamedrv->flags & GAME_COMPUTER) |
| 994 | bufptr += sprintf(bufptr, "%s\n\n%s\n", | |
| 989 | bufptr += sprintf(bufptr, "%s\n\n%s\n", "Th | |
| 995 | 990 | #endif |
| 996 | 991 | if (Machine->gamedrv->flags & GAME_IMPERFECT_COLORS) |
| 997 | bufptr += sprintf(bufptr, " | |
| 992 | bufptr += sprintf(bufptr, "Th | |
| 998 | 993 | if (Machine->gamedrv->flags & GAME_WRONG_COLORS) |
| 999 | bufptr += sprintf(bufptr, " | |
| 994 | bufptr += sprintf(bufptr, "The colors | |
| 1000 | 995 | if (Machine->gamedrv->flags & GAME_IMPERFECT_GRAPHICS) |
| 1001 | bufptr += sprintf(bufptr, " | |
| 996 | bufptr += sprintf(bufptr, "The | |
| 1002 | 997 | if (Machine->gamedrv->flags & GAME_IMPERFECT_SOUND) |
| 1003 | bufptr += sprintf(bufptr, " | |
| 998 | bufptr += sprintf(bufptr, "The sound | |
| 1004 | 999 | if (Machine->gamedrv->flags & GAME_NO_SOUND) |
| 1005 | bufptr += sprintf(bufptr, " | |
| 1000 | bufptr += sprintf(bufptr, "The | |
| 1006 | 1001 | if (Machine->gamedrv->flags & GAME_NO_COCKTAIL) |
| 1007 | bufptr += sprintf(bufptr, " | |
| 1002 | bufptr += sprintf(bufptr, "Screen | |
| 1008 | 1003 | |
| 1009 | 1004 | /* if there's a NOT WORKING or UNEMULATED PROTECTION warning, make it stronger */ |
| 1010 | 1005 | if (Machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION)) |
| r1527 | r1528 | |
| 1015 | 1010 | |
| 1016 | 1011 | /* add the strings for these warnings */ |
| 1017 | 1012 | if (Machine->gamedrv->flags & GAME_NOT_WORKING) |
| 1018 | bufptr += sprintf(bufptr, " | |
| 1013 | bufptr += sprintf(bufptr, "THIS " | |
| 1019 | 1014 | if (Machine->gamedrv->flags & GAME_UNEMULATED_PROTECTION) |
| 1020 | bufptr += sprintf(bufptr, " | |
| 1015 | bufptr += sprintf(bufptr, "The | |
| 1021 | 1016 | |
| 1022 | 1017 | /* find the parent of this driver */ |
| 1023 | 1018 | clone_of = driver_get_clone(Machine->gamedrv); |
| r1527 | r1528 | |
| 1034 | 1029 | { |
| 1035 | 1030 | /* this one works, add a header and display the name of the clone */ |
| 1036 | 1031 | if (foundworking == 0) |
| 1037 | bufptr += sprintf(bufptr, "\n\n | |
| 1032 | bufptr += sprintf(bufptr, "\n\nTh | |
| 1038 | 1033 | bufptr += sprintf(bufptr, "%s\n", drivers[i]->name); |
| 1039 | 1034 | foundworking = 1; |
| 1040 | 1035 | } |
| r1527 | r1528 | |
| 1042 | 1037 | } |
| 1043 | 1038 | |
| 1044 | 1039 | /* add the 'press OK' string */ |
| 1045 | bufptr += sprintf(bufptr, "\n\n | |
| 1040 | bufptr += sprintf(bufptr, "\n\nType OK or move the joyst | |
| 1046 | 1041 | return bufptr - buffer; |
| 1047 | 1042 | } |
| 1048 | 1043 | |
| r1527 | r1528 | |
| 1059 | 1054 | int count; |
| 1060 | 1055 | |
| 1061 | 1056 | /* print description, manufacturer, and CPU: */ |
| 1062 | bufptr += sprintf(bufptr, "%s\n%s %s\n\n | |
| 1057 | bufptr += sprintf(bufptr, "%s\n%s %s\n\nCPU:\n", Machine->gamedrv->description, Machine->gamedrv->year, Machine->gamedrv->manufacturer | |
| 1063 | 1058 | |
| 1064 | 1059 | /* loop over all CPUs */ |
| 1065 | 1060 | for (cpunum = 0; cpunum < MAX_CPU && Machine->drv->cpu[cpunum].type != CPU_DUMMY; cpunum += count) |
| r1527 | r1528 | |
| 1086 | 1081 | } |
| 1087 | 1082 | |
| 1088 | 1083 | /* append the Sound: string */ |
| 1089 | bufptr += sprintf(bufptr, "\n | |
| 1084 | bufptr += sprintf(bufptr, "\nS | |
| 1090 | 1085 | |
| 1091 | 1086 | /* loop over all sound chips */ |
| 1092 | 1087 | for (sndnum = 0; sndnum < MAX_SOUND && Machine->drv->sound[sndnum].type != SOUND_DUMMY; sndnum += count) |
| r1527 | r1528 | |
| 1116 | 1111 | |
| 1117 | 1112 | /* display vector information for vector games */ |
| 1118 | 1113 | if (Machine->drv->video_attributes & VIDEO_TYPE_VECTOR) |
| 1119 | bufptr += sprintf(bufptr, "\n | |
| 1114 | bufptr += sprintf(bufptr, "\nV | |
| 1120 | 1115 | |
| 1121 | 1116 | /* display screen resolution and refresh rate info for raster games */ |
| 1122 | 1117 | else if (Machine->drv->video_attributes & VIDEO_TYPE_RASTER) |
| 1123 | bufptr += sprintf(bufptr,"\n%s:\n%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", | |
| 1124 | ui_getstring(UI_screenres), | |
| 1118 | bufptr += sprintf(bufptr,"\nScreen Resolution:\n%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", | |
| 1125 | 1119 | Machine->screen[0].visarea.max_x - Machine->screen[0].visarea.min_x + 1, |
| 1126 | 1120 | Machine->screen[0].visarea.max_y - Machine->screen[0].visarea.min_y + 1, |
| 1127 | 1121 | (Machine->gamedrv->flags & ORIENTATION_SWAP_XY) ? "V" : "H", |
| r1527 | r1528 | |
| 1668 | 1662 | if (buffer != NULL) |
| 1669 | 1663 | { |
| 1670 | 1664 | sound_set_attenuation(newval); |
| 1671 | sprintf(buffer, " | |
| 1665 | sprintf(buffer, "Volume %3ddB" | |
| 1672 | 1666 | } |
| 1673 | 1667 | return sound_get_attenuation(); |
| 1674 | 1668 | } |
| r1527 | r1528 | |
| 1684 | 1678 | if (buffer != NULL) |
| 1685 | 1679 | { |
| 1686 | 1680 | sound_set_user_gain(arg, (float)newval * 0.001f); |
| 1687 | sprintf(buffer, "%s | |
| 1681 | sprintf(buffer, "%s Volume %4.2f", sound_get_user_gain_name(arg | |
| 1688 | 1682 | } |
| 1689 | 1683 | return floor(sound_get_user_gain(arg) * 1000.0f + 0.5f); |
| 1690 | 1684 | } |
| r1527 | r1528 | |
| 1717 | 1711 | if (buffer != NULL) |
| 1718 | 1712 | { |
| 1719 | 1713 | cpunum_set_clockscale(arg, (float)newval * 0.001f); |
| 1720 | sprintf(buffer, " | |
| 1714 | sprintf(buffer, "Overclock CPU % | |
| 1721 | 1715 | } |
| 1722 | 1716 | return floor(cpunum_get_clockscale(arg) * 1000.0f + 0.5f); |
| 1723 | 1717 | } |
| r1527 | r1528 | |
| 1736 | 1730 | { |
| 1737 | 1731 | screen_state *state = &Machine->screen[arg]; |
| 1738 | 1732 | video_screen_configure(arg, state->width, state->height, &state->visarea, HZ_TO_ATTOSECONDS(defrefresh + (double)newval * 0.001)); |
| 1739 | sprintf(buffer, "Screen %d | |
| 1733 | sprintf(buffer, "Screen %d Refresh rate %.3f", arg | |
| 1740 | 1734 | } |
| 1741 | 1735 | refresh = ATTOSECONDS_TO_HZ(Machine->screen[arg].refresh); |
| 1742 | 1736 | return floor((refresh - defrefresh) * 1000.0f + 0.5f); |
| r1527 | r1528 | |
| 1754 | 1748 | if (buffer != NULL) |
| 1755 | 1749 | { |
| 1756 | 1750 | render_container_set_brightness(container, (float)newval * 0.001f); |
| 1757 | sprintf(buffer, "Screen %d | |
| 1751 | sprintf(buffer, "Screen %d Brightness %.3f", arg | |
| 1758 | 1752 | } |
| 1759 | 1753 | return floor(render_container_get_brightness(container) * 1000.0f + 0.5f); |
| 1760 | 1754 | } |
| r1527 | r1528 | |
| 1771 | 1765 | if (buffer != NULL) |
| 1772 | 1766 | { |
| 1773 | 1767 | render_container_set_contrast(container, (float)newval * 0.001f); |
| 1774 | sprintf(buffer, "Screen %d | |
| 1768 | sprintf(buffer, "Screen %d Contrast %.3f", arg | |
| 1775 | 1769 | } |
| 1776 | 1770 | return floor(render_container_get_contrast(container) * 1000.0f + 0.5f); |
| 1777 | 1771 | } |
| r1527 | r1528 | |
| 1787 | 1781 | if (buffer != NULL) |
| 1788 | 1782 | { |
| 1789 | 1783 | render_container_set_gamma(container, (float)newval * 0.001f); |
| 1790 | sprintf(buffer, "Screen %d | |
| 1784 | sprintf(buffer, "Screen %d Gamma %.3f", arg | |
| 1791 | 1785 | } |
| 1792 | 1786 | return floor(render_container_get_gamma(container) * 1000.0f + 0.5f); |
| 1793 | 1787 | } |
| r1527 | r1528 | |
| 1871 | 1865 | if (buffer != NULL) |
| 1872 | 1866 | { |
| 1873 | 1867 | vector_set_flicker((float)newval * 0.1f); |
| 1874 | sprintf(buffer, " | |
| 1868 | sprintf(buffer, "V | |
| 1875 | 1869 | } |
| 1876 | 1870 | return floor(vector_get_flicker() * 10.0f + 0.5f); |
| 1877 | 1871 | } |
| r1527 | r1528 | |
|---|---|---|
| 108 | 108 | void tms36xx_get_info(void *token, UINT32 state, sndinfo *info); |
| 109 | 109 | void tms3615_get_info(void *token, UINT32 state, sndinfo *info); |
| 110 | 110 | void tms5110_get_info(void *token, UINT32 state, sndinfo *info); |
| 111 | void tmc0285_get_info(void *token, UINT32 state, sndinfo *info); | |
| 112 | void tms5200_get_info(void *token, UINT32 state, sndinfo *info); | |
| 111 | 113 | void tms5220_get_info(void *token, UINT32 state, sndinfo *info); |
| 112 | 114 | void vlm5030_get_info(void *token, UINT32 state, sndinfo *info); |
| 113 | 115 | void adpcm_get_info(void *token, UINT32 state, sndinfo *info); |
| r1527 | r1528 | |
| 287 | 289 | #if (HAS_TMS5110) |
| 288 | 290 | { SOUND_TMS5110, tms5110_get_info }, |
| 289 | 291 | #endif |
| 292 | #if (HAS_TMC0285) | |
| 293 | { SOUND_TMC0285, tmc0285_get_info }, | |
| 294 | #endif | |
| 295 | #if (HAS_TMS5200) | |
| 296 | { SOUND_TMS5200, tms5200_get_info }, | |
| 297 | #endif | |
| 290 | 298 | #if (HAS_TMS5220) |
| 291 | 299 | { SOUND_TMS5220, tms5220_get_info }, |
| 292 | 300 | #endif |
| r1527 | r1528 | |
|---|---|---|
| 73 | 73 | SOUND_TMS36XX, |
| 74 | 74 | SOUND_TMS3615, |
| 75 | 75 | SOUND_TMS5110, |
| 76 | SOUND_TMC0285, | |
| 77 | SOUND_TMS5200, | |
| 76 | 78 | SOUND_TMS5220, |
| 77 | 79 | SOUND_VLM5030, |
| 78 | 80 | SOUND_OKIM6295, |
| r1527 | r1528 | |
|---|---|---|
| 12 | 12 | #include "driver.h" |
| 13 | 13 | #include "ui.h" |
| 14 | 14 | #include "uimenu.h" |
| 15 | #include "uitext.h" | |
| 16 | 15 | #include "machine/eeprom.h" |
| 17 | 16 | #include "cheat.h" |
| 18 | 17 | #include <ctype.h> |
| r1527 | r1528 | |
| 1675 | 1674 | } |
| 1676 | 1675 | |
| 1677 | 1676 | /********** MENU CONSTRUCION **********/ |
| 1678 | menu_item[total++].text = | |
| 1677 | menu_item[total++].text = "E | |
| 1679 | 1678 | |
| 1680 | menu_item[total++].text = | |
| 1679 | menu_item[total++].text = "A | |
| 1681 | 1680 | |
| 1682 | 1681 | switch(EXTRACT_FIELD(cheatOptions, SearchBox)) // Search a Cheat |
| 1683 | 1682 | { |
| r1527 | r1528 | |
| 1694 | 1693 | break; |
| 1695 | 1694 | } |
| 1696 | 1695 | |
| 1697 | menu_item[total++].text = | |
| 1696 | menu_item[total++].text = "Confi | |
| 1698 | 1697 | |
| 1699 | menu_item[total++].text = | |
| 1698 | menu_item[total++].text = "R | |
| 1700 | 1699 | |
| 1701 | menu_item[total++].text = | |
| 1700 | menu_item[total++].text = "O | |
| 1702 | 1701 | |
| 1703 | menu_item[total++].text = | |
| 1702 | menu_item[total++].text = "R | |
| 1704 | 1703 | |
| 1705 | 1704 | menu_item[total].text = NULL; // terminate array |
| 1706 | 1705 | |
| r1527 | r1528 | |
| 2030 | 2029 | |
| 2031 | 2030 | /* ----- print it ----- */ |
| 2032 | 2031 | if(TEST_FIELD(action->type, UserSelectBCD)) |
| 2033 | sprintf(buf, "\t | |
| 2032 | sprintf(buf, "\tSelect a value\n\t%.2X\n" | |
| 2034 | 2033 | else |
| 2035 | sprintf(buf, "\t | |
| 2034 | sprintf(buf, "\tSelect a value\n\t%.2X (%d)\n" | |
| 2036 | 2035 | |
| 2037 | 2036 | /* ----- create fake menu strings ----- */ |
| 2038 | strcat(buf, "\t"); | |
| 2039 | strcat(buf, ui_getstring(UI_lefthilight)); | |
| 2040 | strcat(buf, " "); | |
| 2041 | strcat(buf, ui_getstring(UI_OK)); | |
| 2042 | strcat(buf, " "); | |
| 2043 | strcat(buf, ui_getstring(UI_righthilight)); | |
| 2037 | strcat(buf, "\t OK "); | |
| 2044 | 2038 | |
| 2045 | 2039 | /* ----- print it ----- */ |
| 2046 | 2040 | ui_draw_message_window(buf); |
| r1527 | r1528 | |
| 2184 | 2178 | else |
| 2185 | 2179 | comment = "(none)"; |
| 2186 | 2180 | |
| 2187 | sprintf(buf, "%s\n\t | |
| 2181 | sprintf(buf, "%s\n\t | |
| 2188 | 2182 | |
| 2189 | 2183 | /* ----- print it ----- */ |
| 2190 | 2184 | ui_draw_message_window(buf); |
| r1527 | r1528 | |
| 2276 | 2270 | if(traverse->selection && (traverse->selection < traverse->actionListLength)) |
| 2277 | 2271 | menu_subitem[total] = traverse->actionList[traverse->selection].optionalName; |
| 2278 | 2272 | else |
| 2279 | menu_subitem[total] = | |
| 2273 | menu_subitem[total] = "O | |
| 2280 | 2274 | } |
| 2281 | 2275 | else // others get "ON" or "OFF" |
| 2282 | 2276 | { |
| r1527 | r1528 | |
| 2284 | 2278 | if(!(traverse->flags & kCheatFlag_Null)) |
| 2285 | 2279 | { |
| 2286 | 2280 | if(traverse->flags & kCheatFlag_OneShot) |
| 2287 | menu_subitem[total] = | |
| 2281 | menu_subitem[total] = "S | |
| 2288 | 2282 | else |
| 2289 | 2283 | { |
| 2290 | 2284 | if(traverse->flags & kCheatFlag_Active) |
| 2291 | menu_subitem[total] = | |
| 2285 | menu_subitem[total] = "O | |
| 2292 | 2286 | else |
| 2293 | menu_subitem[total] = | |
| 2287 | menu_subitem[total] = "O | |
| 2294 | 2288 | } |
| 2295 | 2289 | } |
| 2296 | 2290 | } |
| r1527 | r1528 | |
| 2324 | 2318 | } |
| 2325 | 2319 | |
| 2326 | 2320 | /* ----- set return item ----- */ |
| 2327 | menu_item[total] = | |
| 2321 | menu_item[total] = "R | |
| 2328 | 2322 | menu_subitem[total] = NULL; |
| 2329 | 2323 | flagBuf[total++] = 0; |
| 2330 | 2324 | |
| r1527 | r1528 | |
| 2691 | 2685 | menu_item[total++] = "(none)"; |
| 2692 | 2686 | } |
| 2693 | 2687 | |
| 2694 | menu_item[total++] = | |
| 2688 | menu_item[total++] = "R | |
| 2695 | 2689 | |
| 2696 | 2690 | menu_item[total] = NULL; // terminate array |
| 2697 | 2691 | |
| r1527 | r1528 | |
| 3176 | 3170 | menuItemInfo[total].subcheat = i; |
| 3177 | 3171 | menuItemInfo[total].fieldType = kType_LinkExtension; |
| 3178 | 3172 | menuItem[total] = "Link Extension"; |
| 3179 | menuSubItem[total++] = | |
| 3173 | menuSubItem[total++] = | |
| 3180 | 3174 | } |
| 3181 | 3175 | |
| 3182 | 3176 | { |
| r1527 | r1528 | |
| 3221 | 3215 | menuItemInfo[total].subcheat = i; |
| 3222 | 3216 | menuItemInfo[total].fieldType = kType_OneShot; |
| 3223 | 3217 | menuItem[total] = "One Shot"; |
| 3224 | menuSubItem[total++] = | |
| 3218 | menuSubItem[total++] = | |
| 3225 | 3219 | } |
| 3226 | 3220 | |
| 3227 | 3221 | { |
| r1527 | r1528 | |
| 3229 | 3223 | menuItemInfo[total].subcheat = i; |
| 3230 | 3224 | menuItemInfo[total].fieldType = kType_RestorePreviousValue; |
| 3231 | 3225 | menuItem[total] = "Restore Previous Value"; |
| 3232 | menuSubItem[total++] = | |
| 3226 | menuSubItem[total++] = | |
| 3233 | 3227 | } |
| 3234 | 3228 | } |
| 3235 | 3229 | |
| r1527 | r1528 | |
| 3319 | 3313 | menuItemInfo[total].subcheat = i; |
| 3320 | 3314 | menuItemInfo[total].fieldType = kType_WatchLabel; |
| 3321 | 3315 | menuItem[total] = "Watch Label"; |
| 3322 | menuSubItem[total++] = | |
| 3316 | menuSubItem[total++] = | |
| 3323 | 3317 | } |
| 3324 | 3318 | } |
| 3325 | 3319 | else |
| r1527 | r1528 | |
| 3491 | 3485 | menuItemInfo[total].subcheat = i; |
| 3492 | 3486 | menuItemInfo[total].fieldType = kType_UserSelect; |
| 3493 | 3487 | menuItem[total] = "User Select"; |
| 3494 | menuSubItem[total++] = u | |
| 3488 | menuSubItem[total++] = u | |
| 3495 | 3489 | } |
| 3496 | 3490 | |
| 3497 | 3491 | if(!i && userSelect) |
| r1527 | r1528 | |
| 3519 | 3513 | menuItemInfo[total].subcheat = i; |
| 3520 | 3514 | menuItemInfo[total].fieldType = kType_UserSelectBCD; |
| 3521 | 3515 | menuItem[total] = "BCD"; |
| 3522 | menuSubItem[total++] = | |
| 3516 | menuSubItem[total++] = | |
| 3523 | 3517 | } |
| 3524 | 3518 | |
| 3525 | 3519 | if(userSelect || isSelect) |
| r1527 | r1528 | |
| 3537 | 3531 | menuItemInfo[total].subcheat = i; |
| 3538 | 3532 | menuItemInfo[total].fieldType = kType_CopyPrevious; |
| 3539 | 3533 | menuItem[total] = "Copy Previous Value"; |
| 3540 | menuSubItem[total++] = | |
| 3534 | menuSubItem[total++] = | |
| 3541 | 3535 | } |
| 3542 | 3536 | } |
| 3543 | 3537 | |
| r1527 | r1528 | |
| 3680 | 3674 | |
| 3681 | 3675 | menuItemInfo[total].subcheat = 0; // return |
| 3682 | 3676 | menuItemInfo[total].fieldType = kType_Return; |
| 3683 | menuItem[total] = | |
| 3677 | menuItem[total] = "R | |
| 3684 | 3678 | menuSubItem[total++] = NULL; |
| 3685 | 3679 | |
| 3686 | 3680 | menuItemInfo[total].subcheat = 0; // terminate arrey |
| r1527 | r1528 | |
| 4774 | 4768 | |
| 4775 | 4769 | /********** MENU CONSTRUCTION **********/ |
| 4776 | 4770 | sprintf(cpuBuffer, "%d", search->targetIdx); // CPU |
| 4777 | menuItem[total] = | |
| 4771 | menuItem[total] = "CP | |
| 4778 | 4772 | menuSubItem[total++] = cpuBuffer; |
| 4779 | 4773 | |
| 4780 | 4774 | if(search->sign && (search->oldOptions.value & kSearchByteSignBitTable[search->bytes])) |
| r1527 | r1528 | |
| 4852 | 4846 | menuItem[total] = "Save Memory"; |
| 4853 | 4847 | menuSubItem[total++] = NULL; |
| 4854 | 4848 | |
| 4855 | menuItem[total] = | |
| 4849 | menuItem[total] = "Vi | |
| 4856 | 4850 | menuSubItem[total++] = NULL; |
| 4857 | 4851 | |
| 4858 | menuItem[total] = | |
| 4852 | menuItem[total] = "R | |
| 4859 | 4853 | menuSubItem[total++] = NULL; |
| 4860 | 4854 | |
| 4861 | menuItem[total] = | |
| 4855 | menuItem[total] = "R | |
| 4862 | 4856 | menuSubItem[total++] = NULL; |
| 4863 | 4857 | |
| 4864 | 4858 | menuItem[total] = NULL; // terminate array |
| r1527 | r1528 | |
| 5397 | 5391 | menuSubItem[total++] = NULL; |
| 5398 | 5392 | |
| 5399 | 5393 | sprintf(cpuBuffer, "%d", search->targetIdx); |
| 5400 | menuItem[total] = | |
| 5394 | menuItem[total] = "CP | |
| 5401 | 5395 | menuSubItem[total++] = cpuBuffer; |
| 5402 | 5396 | |
| 5403 | 5397 | if(search->sign && (search->oldOptions.value & kSearchByteSignBitTable[search->bytes])) |
| r1527 | r1528 | |
| 5441 | 5435 | menuItem[total] = "--------------------"; |
| 5442 | 5436 | menuSubItem[total++] = NULL; |
| 5443 | 5437 | |
| 5444 | menuItem[total] = | |
| 5438 | menuItem[total] = "Vi | |
| 5445 | 5439 | menuSubItem[total++] = NULL; |
| 5446 | 5440 | |
| 5447 | menuItem[total] = | |
| 5441 | menuItem[total] = "R | |
| 5448 | 5442 | menuSubItem[total++] = NULL; |
| 5449 | 5443 | |
| 5450 | menuItem[total] = | |
| 5444 | menuItem[total] = "R | |
| 5451 | 5445 | menuSubItem[total++] = NULL; |
| 5452 | 5446 | |
| 5453 | 5447 | menuItem[total] = NULL; // terminate array |
| r1527 | r1528 | |
| 5952 | 5946 | menu_subitem[total++] = kSearchByteNameTable[search->bytes]; |
| 5953 | 5947 | |
| 5954 | 5948 | menu_item[total] = "Swap"; |
| 5955 | menu_subitem[total++] = | |
| 5949 | menu_subitem[total++] = | |
| 5956 | 5950 | |
| 5957 | 5951 | menu_item[total] = "Signed"; |
| 5958 | menu_subitem[total++] = | |
| 5952 | menu_subitem[total++] = | |
| 5959 | 5953 | |
| 5960 | 5954 | sprintf(cpuBuffer, "%d", search->targetIdx); |
| 5961 | 5955 | menu_item[total] = "CPU"; |
| r1527 | r1528 | |
| 5979 | 5973 | menu_item[total] = "---"; |
| 5980 | 5974 | menu_subitem[total++] = NULL; |
| 5981 | 5975 | |
| 5982 | menu_item[total] = | |
| 5976 | menu_item[total] = "Vi | |
| 5983 | 5977 | menu_subitem[total++] = NULL; |
| 5984 | 5978 | |
| 5985 | menu_item[total] = | |
| 5979 | menu_item[total] = "R | |
| 5986 | 5980 | menu_subitem[total++] = NULL; |
| 5987 | 5981 | |
| 5988 | menu_item[total] = | |
| 5982 | menu_item[total] = "R | |
| 5989 | 5983 | menu_subitem[total++] = NULL; |
| 5990 | 5984 | |
| 5991 | 5985 | menu_item[total] = NULL; // terminate array |
| r1527 | r1528 | |
| 6321 | 6315 | SearchRegion * traverse = &search->regionList[i]; |
| 6322 | 6316 | |
| 6323 | 6317 | menuItem[total] = traverse->name; |
| 6324 | menuSubItem[total++] = | |
| 6318 | menuSubItem[total++] = | |
| 6325 | 6319 | } |
| 6326 | 6320 | |
| 6327 | 6321 | menuItem[total] = "Search Speed"; |
| 6328 | 6322 | menuSubItem[total++] = kSearchSpeedList[search->searchSpeed]; |
| 6329 | 6323 | |
| 6330 | menuItem[total] = | |
| 6324 | menuItem[total] = "R | |
| 6331 | 6325 | menuSubItem[total++] = NULL; |
| 6332 | 6326 | |
| 6333 | 6327 | menuItem[total] = NULL; // terminate array |
| r1527 | r1528 | |
| 6604 | 6598 | menu_item[total++] = "no results found"; |
| 6605 | 6599 | } |
| 6606 | 6600 | |
| 6607 | menu_item[total++] = | |
| 6601 | menu_item[total++] = "R | |
| 6608 | 6602 | |
| 6609 | 6603 | menu_item[total] = NULL; // terminate array |
| 6610 | 6604 | |
| r1527 | r1528 | |
| 6869 | 6863 | total++; |
| 6870 | 6864 | } |
| 6871 | 6865 | |
| 6872 | menuItem[total++] = | |
| 6866 | menuItem[total++] = "R | |
| 6873 | 6867 | |
| 6874 | 6868 | menuItem[total] = NULL; // terminate array |
| 6875 | 6869 | |
| r1527 | r1528 | |
| 7174 | 7168 | menuSubItem[total] = buf[total]; |
| 7175 | 7169 | total++; |
| 7176 | 7170 | |
| 7177 | menuItem[total] = | |
| 7171 | menuItem[total] = "R | |
| 7178 | 7172 | menuSubItem[total++] = NULL; |
| 7179 | 7173 | |
| 7180 | 7174 | menuItem[total] = NULL; // terminate array |
| r1527 | r1528 | |
| 7612 | 7606 | } |
| 7613 | 7607 | |
| 7614 | 7608 | menuItem[total] = "Show Search Labels"; |
| 7615 | menuSubItem[total++] = | |
| 7609 | menuSubItem[total++] = | |
| 7616 | 7610 | |
| 7617 | 7611 | menuItem[total] = "Auto Save Cheats"; |
| 7618 | menuSubItem[total++] = | |
| 7612 | menuSubItem[total++] = | |
| 7619 | 7613 | |
| 7620 | 7614 | menuItem[total] = "Show Activation Key Message"; |
| 7621 | menuSubItem[total++] = | |
| 7615 | menuSubItem[total++] = | |
| 7622 | 7616 | |
| 7623 | 7617 | menuItem[total] = "Load Old Format Code"; |
| 7624 | menuSubItem[total++] = | |
| 7618 | menuSubItem[total++] = | |
| 7625 | 7619 | |
| 7626 | 7620 | menuItem[total] = "Debug"; |
| 7627 | menuSubItem[total++] = | |
| 7621 | menuSubItem[total++] = | |
| 7628 | 7622 | |
| 7629 | menuItem[total] = | |
| 7623 | menuItem[total] = "R | |
| 7630 | 7624 | menuSubItem[total++] = NULL; |
| 7631 | 7625 | |
| 7632 | 7626 | menuItem[total] = NULL; // terminate array |
| r1527 | r1528 | |
| 7800 | 7794 | total++; |
| 7801 | 7795 | } |
| 7802 | 7796 | |
| 7803 | menuItem[total++] = | |
| 7797 | menuItem[total++] = "R | |
| 7804 | 7798 | |
| 7805 | 7799 | menuItem[total] = NULL; // terminate array |
| 7806 | 7800 | |
| r1527 | r1528 | |
| 7895 | 7889 | /* ------ toggle watchpoint display if shift + toggle cheat ----- */ |
| 7896 | 7890 | watchesDisabled ^= 1; |
| 7897 | 7891 | |
| 7898 | ui_popup_time(1, " | |
| 7892 | ui_popup_time(1, "W | |
| 7899 | 7893 | } |
| 7900 | 7894 | else |
| 7901 | 7895 | { |
| 7902 | 7896 | /* ------ toggle cheat ----- */ |
| 7903 | 7897 | cheatsDisabled ^= 1; |
| 7904 | 7898 | |
| 7905 | ui_popup_time(1, " | |
| 7899 | ui_popup_time(1, "Cheats %s", | |
| 7906 | 7900 | |
| 7907 | 7901 | if(cheatsDisabled) |
| 7908 | 7902 | { |
| r1527 | r1528 | |
|---|---|---|
| 15 | 15 | #include "hash.h" |
| 16 | 16 | #include <ctype.h> |
| 17 | 17 | #include <stdarg.h> |
| 18 | #include "uitext.h" | |
| 19 | 18 | #include "unicode.h" |
| 20 | 19 | #include <zlib.h> |
| 21 | 20 |
| r1527 | r1528 | |
|---|---|---|
| 52 | 52 | XTAL_4_433619MHz = 4433619, /* PAL subcarrier */ |
| 53 | 53 | XTAL_4_9152MHz = 4915200, |
| 54 | 54 | XTAL_6MHz = 6000000, |
| 55 | XTAL_6_144MHz = 6144000, /* Used on Alpha Denshi early 80's games sound board */ | |
| 55 | 56 | XTAL_7_3728MHz = 7372800, |
| 56 | 57 | XTAL_8MHz = 8000000, |
| 58 | XTAL_9_987MHz = 9987000, /* Crazy Balloon */ | |
| 57 | 59 | XTAL_10MHz = 10000000, |
| 58 | 60 | XTAL_10_595MHz = 10595000, /* Mad Alien */ |
| 59 | 61 | XTAL_11MHz = 11000000, /* Mario I8039 sound */ |
| 62 | XTAL_11_0592MHz = 11059200, /* Lethal Justice */ | |
| 60 | 63 | XTAL_11_289MHz = 11289000, /* Vanguard */ |
| 61 | 64 | XTAL_12MHz = 12000000, |
| 62 | 65 | XTAL_12_096MHz = 12096000, /* Some early 80's Atari games */ |
| r1527 | r1528 | |
| 104 | 107 | XTAL_45MHz = 45000000, /* Eolith with Hyperstone CPUs */ |
| 105 | 108 | XTAL_45_158MHz = 45158000, /* Sega Model 2A video board, Model 3 CPU board */ |
| 106 | 109 | XTAL_48MHz = 48000000, |
| 110 | XTAL_48_66MHz = 48660000, /* Zaxxon */ | |
| 107 | 111 | XTAL_49_152MHz = 49152000, /* Used on some Namco PCBs, Baraduke h/w, System 21, Super System 22 */ |
| 108 | 112 | XTAL_50MHz = 50000000, |
| 109 | 113 | XTAL_52MHz = 52000000, /* Cojag */ |
| r1527 | r1528 | |
| 121 | 125 | /* Resonators (There are probably more. Almost always used for driving OKI sound chips) */ |
| 122 | 126 | |
| 123 | 127 | XTAL_384kHz = 384000, |
| 128 | XTAL_400kHz = 400000, /* Used on Great Swordman h/w */ | |
| 129 | XTAL_455kHz = 455000, /* Used on Gladiator h/w */ | |
| 124 | 130 | XTAL_640kHz = 640000 |
| 125 | 131 | }; |
| 126 | 132 |
| r1527 | r1528 | |
|---|---|---|
| 1 | #include "uitext.h" | |
| 2 | ||
| 3 | const char *mess_default_text[] = | |
| 4 | { | |
| 5 | "The emulated system is a computer: ", | |
| 6 | "The keyboard emulation may not be 100% accurate.", | |
| 7 | "Keyboard Emulation Status", | |
| 8 | "-------------------------", | |
| 9 | "Mode: PARTIAL Emulation", | |
| 10 | "Mode: FULL Emulation", | |
| 11 | "UI: Enabled", | |
| 12 | "UI: Disabled", | |
| 13 | "**Use ScrLock to toggle**", | |
| 14 | ||
| 15 | "Image Information", | |
| 16 | "File Manager", | |
| 17 | "Tape Control", | |
| 18 | ||
| 19 | "No Tape Image loaded", | |
| 20 | "recording", | |
| 21 | "playing", | |
| 22 | "(recording)", | |
| 23 | "(playing)", | |
| 24 | "stopped", | |
| 25 | "Pause/Stop", | |
| 26 | "Record", | |
| 27 | "Play", | |
| 28 | "Rewind", | |
| 29 | "Fast Forward", | |
| 30 | "Mount...", | |
| 31 | "Create...", | |
| 32 | "Unmount", | |
| 33 | "[empty slot]", | |
| 34 | "Input Devices", | |
| 35 | "Quit Fileselector", | |
| 36 | "File Specification", /* IMPORTANT: be careful to ensure that the following */ | |
| 37 | "Cartridge", /* device list matches the order found in device.h */ | |
| 38 | "Floppy Disk", /* and is ALWAYS placed after "File Specification" */ | |
| 39 | "Hard Disk", | |
| 40 | "Cylinder", | |
| 41 | "Cassette", | |
| 42 | "Punched Card", | |
| 43 | "Punched Tape", | |
| 44 | "Printer", | |
| 45 | "Serial Port", | |
| 46 | "Parallel Port", | |
| 47 | "Snapshot", | |
| 48 | "Quickload", | |
| 49 | "Memory Card", | |
| 50 | "CD-ROM" | |
| 51 | }; |
| r1527 | r1528 | |
|---|---|---|
| 1 | #ifndef MUI_TEXT_H | |
| 2 | #define MUI_TEXT_H | |
| 3 | ||
| 4 | enum | |
| 5 | { | |
| 6 | UI_comp1 = UI_last_mame_entry, | |
| 7 | UI_comp2, | |
| 8 | UI_keyb1, | |
| 9 | UI_keyb2, | |
| 10 | UI_keyb3, | |
| 11 | UI_keyb4, | |
| 12 | UI_keyb5, | |
| 13 | UI_keyb6, | |
| 14 | UI_keyb7, | |
| 15 | ||
| 16 | UI_imageinfo, | |
| 17 | UI_filemanager, | |
| 18 | UI_tapecontrol, | |
| 19 | ||
| 20 | UI_notapeimageloaded, | |
| 21 | UI_recording, | |
| 22 | UI_playing, | |
| 23 | UI_recording_inhibited, | |
| 24 | UI_playing_inhibited, | |
| 25 | UI_stopped, | |
| 26 | UI_pauseorstop, | |
| 27 | UI_record, | |
| 28 | UI_play, | |
| 29 | UI_rewind, | |
| 30 | UI_fastforward, | |
| 31 | UI_mount, | |
| 32 | UI_create, | |
| 33 | UI_unmount, | |
| 34 | UI_emptyslot, | |
| 35 | UI_categories, | |
| 36 | UI_quitfileselector, | |
| 37 | UI_filespecification, /* IMPORTANT: be careful to ensure that the following */ | |
| 38 | UI_cartridge, /* device list matches the order found in device.h */ | |
| 39 | UI_floppydisk, /* and is ALWAYS placed after UI_filespecification */ | |
| 40 | UI_harddisk, | |
| 41 | UI_cylinder, | |
| 42 | UI_cassette, | |
| 43 | UI_punchcard, | |
| 44 | UI_punchtape, | |
| 45 | UI_printer, | |
| 46 | UI_serial, | |
| 47 | UI_parallel, | |
| 48 | UI_snapshot, | |
| 49 | UI_quickload, | |
| 50 | UI_memcard, | |
| 51 | UI_cdrom | |
| 52 | }; | |
| 53 | ||
| 54 | #endif /* MUI_TEXT_H */ |
| r0 | r1528 | |
|---|---|---|
| 1 | /********************************************************************* | |
| 2 | ||
| 3 | mslegacy.c | |
| 4 | ||
| 5 | Defines since removed from MAME, but kept in MESS for legacy | |
| 6 | reasons | |
| 7 | ||
| 8 | *********************************************************************/ | |
| 9 | ||
| 10 | #include "mslegacy.h" | |
| 11 | ||
| 12 | UINT8 *dirtybuffer; | |
| 13 | ||
| 14 | ||
| 15 | ||
| 16 | static const char *mess_default_text[] = | |
| 17 | { | |
| 18 | "OK", | |
| 19 | "Off", | |
| 20 | "On", | |
| 21 | "Dip Switches", | |
| 22 | "Driver Configuration", | |
| 23 | "Analog Controls", | |
| 24 | "Digital Speed", | |
| 25 | "Autocenter Speed", | |
| 26 | "Reverse", | |
| 27 | "Sensitivity", | |
| 28 | "\xc2\xab", | |
| 29 | "\xc2\xbb", | |
| 30 | "Return to Main Menu", | |
| 31 | ||
| 32 | "Keyboard Emulation Status", | |
| 33 | "-------------------------", | |
| 34 | "Mode: PARTIAL Emulation", | |
| 35 | "Mode: FULL Emulation", | |
| 36 | "UI: Enabled", | |
| 37 | "UI: Disabled", | |
| 38 | "**Use ScrLock to toggle**", | |
| 39 | ||
| 40 | "Image Information", | |
| 41 | "File Manager", | |
| 42 | "Tape Control", | |
| 43 | ||
| 44 | "No Tape Image loaded", | |
| 45 | "recording", | |
| 46 | "playing", | |
| 47 | "(recording)", | |
| 48 | "(playing)", | |
| 49 | "stopped", | |
| 50 | "Pause/Stop", | |
| 51 | "Record", | |
| 52 | "Play", | |
| 53 | "Rewind", | |
| 54 | "Fast Forward", | |
| 55 | "Mount...", | |
| 56 | "Create...", | |
| 57 | "Unmount", | |
| 58 | "[empty slot]", | |
| 59 | "Input Devices", | |
| 60 | "Quit Fileselector", | |
| 61 | "File Specification", /* IMPORTANT: be careful to ensure that the following */ | |
| 62 | "Cartridge", /* device list matches the order found in device.h */ | |
| 63 | "Floppy Disk", /* and is ALWAYS placed after "File Specification" */ | |
| 64 | "Hard Disk", | |
| 65 | "Cylinder", | |
| 66 | "Cassette", | |
| 67 | "Punched Card", | |
| 68 | "Punched Tape", | |
| 69 | "Printer", | |
| 70 | "Serial Port", | |
| 71 | "Parallel Port", | |
| 72 | "Snapshot", | |
| 73 | "Quickload", | |
| 74 | "Memory Card", | |
| 75 | "CD-ROM" | |
| 76 | }; | |
| 77 | ||
| 78 | ||
| 79 | ||
| 80 | /*************************************************************************** | |
| 81 | PALETTE | |
| 82 | ***************************************************************************/ | |
| 83 | ||
| 84 | void palette_set_colors_rgb(running_machine *machine, pen_t color_base, const UINT8 *colors, int color_count) | |
| 85 | { | |
| 86 | while (color_count--) | |
| 87 | { | |
| 88 | UINT8 r = *colors++; | |
| 89 | UINT8 g = *colors++; | |
| 90 | UINT8 b = *colors++; | |
| 91 | palette_set_color_rgb(machine, color_base++, r, g, b); | |
| 92 | } | |
| 93 | } | |
| 94 | ||
| 95 | ||
| 96 | ||
| 97 | /*************************************************************************** | |
| 98 | GENERIC READ/WRITE HANDLERS | |
| 99 | ***************************************************************************/ | |
| 100 | ||
| 101 | /*------------------------------------------------- | |
| 102 | videoram_r/w - 8-bit access to videoram with | |
| 103 | dirty buffer marking | |
| 104 | -------------------------------------------------*/ | |
| 105 | ||
| 106 | READ8_HANDLER( videoram_r ) | |
| 107 | { | |
| 108 | return videoram[offset]; | |
| 109 | } | |
| 110 | ||
| 111 | WRITE8_HANDLER( videoram_w ) | |
| 112 | { | |
| 113 | dirtybuffer[offset] = 1; | |
| 114 | videoram[offset] = data; | |
| 115 | } | |
| 116 | ||
| 117 | /*------------------------------------------------- | |
| 118 | colorram_w - 8-bit access to colorram with | |
| 119 | dirty buffer marking | |
| 120 | -------------------------------------------------*/ | |
| 121 | ||
| 122 | WRITE8_HANDLER( colorram_w ) | |
| 123 | { | |
| 124 | dirtybuffer[offset] = 1; | |
| 125 | colorram[offset] = data; | |
| 126 | } | |
| 127 | ||
| 128 | ||
| 129 | ||
| 130 | /*************************************************************************** | |
| 131 | UI TEXT | |
| 132 | ***************************************************************************/ | |
| 133 | ||
| 134 | const char * ui_getstring (int string_num) | |
| 135 | { | |
| 136 | return mess_default_text[string_num]; | |
| 137 | } | |
| 138 |
| r1527 | r1528 | |
|---|---|---|
| 7 | 7 | *********************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "mame.h" |
| 10 | #include " | |
| 10 | #include "mslegacy.h" | |
| 11 | 11 | #include "uimenu.h" |
| 12 | 12 | #include "uimess.h" |
| 13 | 13 | #include "input.h" |
| r1527 | r1528 | |
|---|---|---|
| 88 | 88 | $(MESSOBJ)/utils.o \ |
| 89 | 89 | $(MESSOBJ)/eventlst.o \ |
| 90 | 90 | $(MESSOBJ)/mscommon.o \ |
| 91 | $(MESSOBJ)/mslegacy.o \ | |
| 91 | 92 | $(MESSOBJ)/tagpool.o \ |
| 92 | 93 | $(MESSOBJ)/cheatms.o \ |
| 93 | 94 | $(MESSOBJ)/opresolv.o \ |
| 94 | $(MESSOBJ)/muitext.o \ | |
| 95 | 95 | $(MESSOBJ)/infomess.o \ |
| 96 | 96 | $(MESSOBJ)/climess.o \ |
| 97 | 97 |
| r1527 | r1528 | |
|---|---|---|
| 13 | 13 | #include "driver.h" |
| 14 | 14 | #include "devices/flopdrv.h" |
| 15 | 15 | #include "utils.h" |
| 16 | #include " | |
| 16 | #include "mslegacy.h" | |
| 17 | 17 | #include "image.h" |
| 18 | 18 | #include "hash.h" |
| 19 | 19 | #include "messopts.h" |
| r1527 | r1528 | |
|---|---|---|
| 10 | 10 | #ifndef MSLEGACY_H |
| 11 | 11 | #define MSLEGACY_H |
| 12 | 12 | |
| 13 | INLINE void palette_set_colors_rgb(running_machine *machine, pen_t color_base, const UINT8 *colors, int color_count) | |
| 13 | #include "driver.h" | |
| 14 | ||
| 15 | extern UINT8 *dirtybuffer; | |
| 16 | ||
| 17 | enum | |
| 14 | 18 | { |
| 15 | while (color_count--) | |
| 16 | { | |
| 17 | UINT8 r = *colors++; | |
| 18 | UINT8 g = *colors++; | |
| 19 | UINT8 b = *colors++; | |
| 20 | palette_set_color_rgb(machine, color_base++, r, g, b); | |
| 21 | } | |
| 22 | } | |
| 19 | UI_OK, | |
| 20 | UI_off, | |
| 21 | UI_on, | |
| 22 | UI_dipswitches, | |
| 23 | UI_configuration, | |
| 24 | UI_analogcontrols, | |
| 25 | UI_keyjoyspeed, | |
| 26 | UI_centerspeed, | |
| 27 | UI_reverse, | |
| 28 | UI_sensitivity, | |
| 29 | UI_lefthilight, | |
| 30 | UI_righthilight, | |
| 31 | UI_returntomain, | |
| 23 | 32 | |
| 33 | UI_last_mame_entry, | |
| 34 | UI_keyb1 = UI_last_mame_entry, | |
| 35 | UI_keyb2, | |
| 36 | UI_keyb3, | |
| 37 | UI_keyb4, | |
| 38 | UI_keyb5, | |
| 39 | UI_keyb6, | |
| 40 | UI_keyb7, | |
| 24 | 41 | |
| 42 | UI_imageinfo, | |
| 43 | UI_filemanager, | |
| 44 | UI_tapecontrol, | |
| 45 | ||
| 46 | UI_notapeimageloaded, | |
| 47 | UI_recording, | |
| 48 | UI_playing, | |
| 49 | UI_recording_inhibited, | |
| 50 | UI_playing_inhibited, | |
| 51 | UI_stopped, | |
| 52 | UI_pauseorstop, | |
| 53 | UI_record, | |
| 54 | UI_play, | |
| 55 | UI_rewind, | |
| 56 | UI_fastforward, | |
| 57 | UI_mount, | |
| 58 | UI_create, | |
| 59 | UI_unmount, | |
| 60 | UI_emptyslot, | |
| 61 | UI_categories, | |
| 62 | UI_quitfileselector, | |
| 63 | UI_filespecification, /* IMPORTANT: be careful to ensure that the following */ | |
| 64 | UI_cartridge, /* device list matches the order found in device.h */ | |
| 65 | UI_floppydisk, /* and is ALWAYS placed after UI_filespecification */ | |
| 66 | UI_harddisk, | |
| 67 | UI_cylinder, | |
| 68 | UI_cassette, | |
| 69 | UI_punchcard, | |
| 70 | UI_punchtape, | |
| 71 | UI_printer, | |
| 72 | UI_serial, | |
| 73 | UI_parallel, | |
| 74 | UI_snapshot, | |
| 75 | UI_quickload, | |
| 76 | UI_memcard, | |
| 77 | UI_cdrom | |
| 78 | }; | |
| 79 | ||
| 80 | ||
| 81 | ||
| 82 | /* palette */ | |
| 83 | void palette_set_colors_rgb(running_machine *machine, pen_t color_base, const UINT8 *colors, int color_count); | |
| 84 | ||
| 85 | /* read/write handlers */ | |
| 86 | READ8_HANDLER( videoram_r ); | |
| 87 | WRITE8_HANDLER( videoram_w ); | |
| 88 | WRITE8_HANDLER( colorram_w ); | |
| 89 | ||
| 90 | /* uitext */ | |
| 91 | const char * ui_getstring (int string_num); | |
| 92 | ||
| 93 | ||
| 94 | ||
| 25 | 95 | #endif /* MSLEGACY_H */ |
| r1527 | r1528 | |
|---|---|---|
| 10 | 10 | #include "image.h" |
| 11 | 11 | #include "ui.h" |
| 12 | 12 | #include "uimenu.h" |
| 13 | #include " | |
| 13 | #include "mslegacy.h" | |
| 14 | 14 | #include "devices/cassette.h" |
| 15 | 15 | |
| 16 | 16 | void tapecontrol_gettime(char *timepos, size_t timepos_size, mess_image *img, int *curpos, int *endpos) |
| r1527 | r1528 | |
|---|---|---|
| 9 | 9 | #include <stddef.h> |
| 10 | 10 | |
| 11 | 11 | #include "device.h" |
| 12 | #include " | |
| 12 | #include "mslegacy.h" | |
| 13 | 13 | #include "driver.h" |
| 14 | 14 | #include "pool.h" |
| 15 | 15 | |
| r1527 | r1528 | |
| 138 | 138 | * |
| 139 | 139 | *************************************/ |
| 140 | 140 | |
| 141 | ||
| 141 | ||
| 142 | 142 | { |
| 143 | const char *name; | |
| 144 | ||
| 145 | if (Machine != NULL) | |
| 146 | { | |
| 147 | name = ui_getstring((UI_cartridge - IO_CARTSLOT) + devtype); | |
| 148 | } | |
| 149 | else | |
| 150 | { | |
| 151 | /* man I really hate this; may god have mercy on my soul */ | |
| 152 | extern const char *mess_default_text[]; | |
| 153 | name = mess_default_text[(UI_cartridge - IO_CARTSLOT) + devtype - UI_last_mame_entry]; | |
| 154 | } | |
| 155 | return name; | |
| 143 | return ui_getstring((UI_cartridge - IO_CARTSLOT) + devtype); | |
| 156 | 144 | } |
| 157 | 145 | |
| 158 | 146 | |
| r1527 | r1528 | |
| 170 | 158 | return buf; |
| 171 | 159 | } |
| 172 | 160 | |
| 173 | name = | |
| 161 | name = | |
| 174 | 162 | if (dev->count > 1) |
| 175 | 163 | { |
| 176 | 164 | /* for the average user counting starts at #1 ;-) */ |
| r1527 | r1528 | |
|---|---|---|
| 11 | 11 | #include "image.h" |
| 12 | 12 | #include "ui.h" |
| 13 | 13 | #include "uimenu.h" |
| 14 | #include " | |
| 14 | #include "mslegacy.h" | |
| 15 | 15 | |
| 16 | 16 | #define SEL_BITS 12 |
| 17 | 17 | #define SEL_MASK ((1<<SEL_BITS)-1) |
| r1527 | r1528 | |
|---|---|---|
| 273 | 273 | |
| 274 | 274 | |
| 275 | 275 | /* device naming */ |
| 276 | const char *device_uiname(iodevice_t devtype); | |
| 276 | 277 | const char *device_typename(iodevice_t type); |
| 277 | 278 | const char *device_brieftypename(iodevice_t type); |
| 278 | 279 | int device_typeid(const char *name); |
| r1527 | r1528 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | #include "mess.h" |
| 12 | 12 | #include "device.h" |
| 13 | #include " | |
| 13 | #include "mslegacy.h" | |
| 14 | 14 | #include "inputx.h" |
| 15 | 15 | |
| 16 | 16 | |
| r1527 | r1528 | |
| 288 | 288 | const char *name; |
| 289 | 289 | input_port_entry *inputports = NULL; |
| 290 | 290 | extern int device_valididtychecks(void); |
| 291 | extern const char *mess_default_text[]; | |
| 292 | 291 | |
| 293 | 292 | /* make sure that all of the UI_* strings are set for all devices */ |
| 294 | 293 | for (devtype = 0; devtype < IO_COUNT; devtype++) |
| 295 | 294 | { |
| 296 | name = | |
| 295 | name = | |
| 297 | 296 | if (!name || !name[0]) |
| 298 | 297 | { |
| 299 | 298 | mame_printf_error("Device type %d does not have an associated UI string\n", devtype); |
| r1527 | r1528 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | #include "dialog.h" |
| 13 | 13 | #include "mame.h" |
| 14 | #include " | |
| 14 | #include "mslegacy.h" | |
| 15 | 15 | #include "inputx.h" |
| 16 | 16 | #include "utils.h" |
| 17 | 17 | #include "strconv.h" |
| r1527 | r1528 | |
|---|---|---|
| 21 | 21 | #include "windows/input.h" |
| 22 | 22 | #include "dialog.h" |
| 23 | 23 | #include "opcntrl.h" |
| 24 | #include " | |
| 24 | #include "mslegacy.h" | |
| 25 | 25 | #include "strconv.h" |
| 26 | 26 | #include "utils.h" |
| 27 | 27 | #include "tapedlg.h" |
| r1527 | r1528 | |
| 31 | 31 | #include "devices/cassette.h" |
| 32 | 32 | #include "windows/window.h" |
| 33 | 33 | #include "uimess.h" |
| 34 | #include "mslegacy.h" | |
| 34 | 35 | #include "winutf8.h" |
| 35 | 36 | |
| 36 | 37 | #ifdef UNDER_CE |
| r1527 | r1528 | |
|---|---|---|
| 30 | 30 | #include "devview.h" |
| 31 | 31 | #include "windows/window.h" |
| 32 | 32 | #include "utils.h" |
| 33 | #include " | |
| 33 | #include "mslegacy.h" | |
| 34 | 34 | #include "strconv.h" |
| 35 | 35 | #include "messui.h" |
| 36 | 36 | #include "winutf8.h" |
| r1527 | r1528 | |
|---|---|---|
| 16 | 16 | #include "driver.h" |
| 17 | 17 | #include "devview.h" |
| 18 | 18 | #include "optionsms.h" |
| 19 | #include " | |
| 19 | #include "mslegacy.h" | |
| 20 | 20 | #include "strconv.h" |
| 21 | 21 | #include "winutf8.h" |
| 22 | 22 | #include "mui_util.h" |
| r1527 | r1528 | |
|---|---|---|
| 4 | 4 | #include "driver.h" |
| 5 | 5 | #include "resourcems.h" |
| 6 | 6 | #include "devview.h" |
| 7 | #include "uitext.h" | |
| 8 | 7 | #include "options.h" |
| 9 | 8 | |
| 10 | 9 | extern char g_szSelectedItem[MAX_PATH]; |
| r1527 | r1528 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | /* Core includes */ |
| 13 | 13 | #include "driver.h" |
| 14 | #include "mslegacy.h" | |
| 14 | 15 | #include "includes/mz700.h" |
| 15 | 16 | |
| 16 | 17 | /* Components */ |
| r1527 | r1528 | |
|---|---|---|
| 3 | 3 | |
| 4 | 4 | peter.trauner@jk.uni-linz.ac.at |
| 5 | 5 | ***************************************************************************/ |
| 6 | ||
| 6 | 7 | #include "driver.h" |
| 8 | #include "mslegacy.h" | |
| 7 | 9 | #include "cpu/m6502/m6502.h" |
| 8 | 10 | #include "cpu/m6809/m6809.h" |
| 9 | 11 |
| r1527 | r1528 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | #include <stdio.h> |
| 11 | 11 | #include "driver.h" |
| 12 | #include "mslegacy.h" | |
| 12 | 13 | #include "image.h" |
| 13 | 14 | #include "includes/nascom1.h" |
| 14 | 15 | #include "cpu/z80/z80.h" |
| r1527 | r1528 | |
|---|---|---|
| 824 | 824 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x9000, 0x93ff, 0, 0, ti99_rspeech_r); |
| 825 | 825 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x9400, 0x97ff, 0, 0, ti99_wspeech_w); |
| 826 | 826 | |
| 827 | sndti_set_info_int(SOUND_TMS5220, 0, SNDINFO_INT_TMS5220_VARIANT, variant_tm | |
| 827 | sndti_set_info_int(SOUND_TMS5220, 0, SNDINFO_INT_TMS5220_VARIANT, variant_tmc0285); | |
| 828 | 828 | } |
| 829 | 829 | } |
| 830 | 830 | else |
| r1527 | r1528 | |
|---|---|---|
| 73 | 73 | CPUS += I8039 |
| 74 | 74 | CPUS += I8048 |
| 75 | 75 | #CPUS += N7751 |
| 76 | #CPUS += MB8884 | |
| 77 | #CPUS += M58715 | |
| 76 | 78 | #CPUS += I8X41 |
| 77 | 79 | #CPUS += I8051 |
| 78 | 80 | #CPUS += I8052 |
| r1527 | r1528 | |
| 131 | 133 | CPUS += ARM7 |
| 132 | 134 | CPUS += JAGUAR |
| 133 | 135 | CPUS += R3000 |
| 136 | #CPUS += R3041 | |
| 134 | 137 | CPUS += R4600 |
| 135 | 138 | #CPUS += R4650 |
| 136 | 139 | #CPUS += R4700 |
| r1527 | r1528 | |
| 254 | 257 | #SOUNDS += TMS36XX |
| 255 | 258 | #SOUNDS += TMS3615 |
| 256 | 259 | #SOUNDS += TMS5110 |
| 260 | #SOUNDS += TMC0285 | |
| 261 | #SOUNDS += TMS5200 | |
| 257 | 262 | SOUNDS += TMS5220 |
| 258 | 263 | #SOUNDS += VLM5030 |
| 259 | 264 | #SOUNDS += ADPCM |
| r1527 | r1528 | |
|---|---|---|
| 27 | 27 | #include "driver.h" |
| 28 | 28 | #include "cpu/z80/z80.h" |
| 29 | 29 | #include "includes/aquarius.h" |
| 30 | #include "mslegacy.h" | |
| 30 | 31 | |
| 31 | 32 | /* structures */ |
| 32 | 33 |
| r1527 | r1528 | |
|---|---|---|
| 49 | 49 | ************************************************************************/ |
| 50 | 50 | |
| 51 | 51 | #include "driver.h" |
| 52 | #include "mslegacy.h" | |
| 52 | 53 | #include "includes/nascom1.h" |
| 53 | 54 | #include "cpu/z80/z80.h" |
| 54 | 55 | #include "devices/cartslot.h" |
| r1527 | r1528 | |
|---|---|---|
| 38 | 38 | |
| 39 | 39 | Source Changes: |
| 40 | 40 | ---------------- |
| 41 | - The core is based on MAME 0.122u | |
| 41 | - The core is based on MAME 0.122u6. This incorporates all features of the | |
| 42 | 42 | update to this core. [MAME team] |
| 43 | 43 | |
| 44 | 44 | - Conditional logging and core callback cleanups. [Atari Ace] |
| Previous | 15994 Revisions | Next |