| Previous | 15994 Revisions | Next |
| r1387 Thursday 6th December, 2007 at 21:01:50 UTC by Nathan Woods |
|---|
| Updated to MAME 0.121u3 core |
| [ROOT] | makefile |
| [docs] | messnew.txt |
| [src/emu] | audit.c clifront.c cpuexec.h cpuintrf.c emu.mak info.c |
| [src/emu/audio] | generic.c |
| [src/emu/cpu] | cpu.mak x86drc.c |
| [src/emu/cpu/adsp2100] | 2100dasm.c 2100ops.c |
| [src/emu/cpu/alph8201] | 8201dasm.c |
| [src/emu/cpu/arm] | armdasm.c |
| [src/emu/cpu/arm7] | arm7dasm.c |
| [src/emu/cpu/asap] | asapdasm.c |
| [src/emu/cpu/cop400] | cop410.c cop420.c |
| [src/emu/cpu/dsp32] | dsp32.c dsp32dis.c dsp32ops.c |
| [src/emu/cpu/e132xs] | 32xsdasm.c e132xsop.c |
| [src/emu/cpu/f8] | f8dasm.c |
| [src/emu/cpu/g65816] | g65816.c g65816cm.h g65816ds.c g65816op.h |
| [src/emu/cpu/h6280] | 6280dasm.c h6280.c |
| [src/emu/cpu/h83002] | h8disasm.c |
| [src/emu/cpu/hd6309] | 6309dasm.c 6309tbl.c hd6309.c |
| [src/emu/cpu/i386] | cycles.h i386dasm.c |
| [src/emu/cpu/i8039] | 8039dasm.c i8039.c |
| [src/emu/cpu/i8051] | i8051.c |
| [src/emu/cpu/i8085] | i8085daa.h |
| [src/emu/cpu/i86] | table186.h table286.h table86.h tablev30.h |
| [src/emu/cpu/i8x41] | i8x41.c |
| [src/emu/cpu/i960] | i960.c i960dis.c |
| [src/emu/cpu/jaguar] | jagdasm.c jaguar.c |
| [src/emu/cpu/konami] | knmidasm.c konami.c |
| [src/emu/cpu/lh5801] | 5801dasm.c |
| [src/emu/cpu/m37710] | m37710.c m37710cm.h m37710op.h m7700ds.c |
| [src/emu/cpu/m6502] | 6502dasm.c m4510.c m6502.c m6509.c t6502.c t6509.c t65c02.c t65ce02.c t65sc02.c tdeco16.c tn2a03.c |
| [src/emu/cpu/m6800] | 6800dasm.c 6800tbl.c |
| [src/emu/cpu/m6805] | 6805dasm.c m6805.c |
| [src/emu/cpu/m6809] | 6809dasm.c m6809.c |
| [src/emu/cpu/mc68hc11] | hc11dasm.c hc11ops.h |
| [src/emu/cpu/minx] | minxd.c minxopce.h minxopcf.h minxops.h |
| [src/emu/cpu/mips] | dismips.c mdrc64.c mips3.c mips3dsm.c mipsdasm.c psx.c r3kdasm.c |
| [src/emu/cpu/nec] | nec.c necdasm.c |
| [src/emu/cpu/pic16c5x] | 16c5xdsm.c |
| [src/emu/cpu/powerpc] | drc_ops.c drc_ops.h ppc.c ppc.h ppc403.c ppc602.c ppc603.c ppc_dasm.c ppcdrc.c |
| [src/emu/cpu/rsp] | rsp_dasm.c |
| [src/emu/cpu/s2650] | 2650dasm.c s2650.c |
| [src/emu/cpu/saturn] | saturnds.c |
| [src/emu/cpu/sh2] | sh2dasm.c |
| [src/emu/cpu/sh4] | sh4dasm.c |
| [src/emu/cpu/sm8500] | sm8500.c sm8500d.c |
| [src/emu/cpu/spc700] | spc700ds.c |
| [src/emu/cpu/ssp1610] | ssp1610d.c |
| [src/emu/cpu/t11] | t11dasm.c t11table.c |
| [src/emu/cpu/tlcs90] | tlcs90.c |
| [src/emu/cpu/tms32010] | 32010dsm.c tms32010.c |
| [src/emu/cpu/tms32025] | 32025dsm.c tms32025.c |
| [src/emu/cpu/tms32031] | 32031ops.c dis32031.c |
| [src/emu/cpu/tms32051] | 32051ops.h dis32051.c |
| [src/emu/cpu/tms34010] | 34010fld.c 34010gfx.c 34010tbl.c dis34010.c tms34010.c |
| [src/emu/cpu/tms7000] | 7000dasm.c |
| [src/emu/cpu/tms9900] | 99xxcore.h |
| [src/emu/cpu/upd7810] | 7810dasm.c 7810tbl.c |
| [src/emu/cpu/v30mz] | v30mz.c |
| [src/emu/cpu/v60] | v60.c v60.h |
| [src/emu/cpu/v810] | v810.c v810dasm.c |
| [src/emu/cpu/z180] | z180.c z180daa.h z180dasm.c z180tbl.h |
| [src/emu/cpu/z80] | z80dasm.c |
| [src/emu/cpu/z8000] | 8000dasm.c makedab.c z8000dab.h z8000tbl.c |
| [src/emu/cpu/z80gb] | z80gb.c z80gbd.c |
| [src/emu/machine] | 8257dma.c* 8257dma.h* at28c16.c at28c16.h eeprom.c eeprom.h |
| [src/emu/sound] | k054539.c samples.c samples.h scsp.c sn76477.c votrax.c |
| [src/mame] | mame.mak mamedriv.c |
| [src/mame/audio] | 8080bw.c astinvad.c astrof.c blockade.c carnival.c cclimber.c cinemat.c circus.c depthch.c dkong.c galaxian.c gorf.c gottlieb.c invinco.c meadows.c mw8080bw.c n8080.c polyplay.c pulsar.c rockola.c segag80r.c spacefb.c targ.c triplhnt.c turbo.c vicdual.c wow.c zaxxon.c |
| [src/mame/drivers] | 20pacgal.c ashnojoe.c asterix.c asteroid.c astrocde.c bfcobra.c bmcbowl.c cave.c cbasebal.c clayshoo.c cosmic.c couple.c cps1.c cps2.c crbaloon.c darkhors.c deco32.c dkong.c dribling.c drw80pkr.c* eolith.c eolith16.c epos.c exidy.c filetto.c findout.c freekick.c galaga.c gaplus.c getrivia.c gijoe.c gottlieb.c gotya.c gridlee.c groundfx.c gticlub.c gunbustr.c homerun.c imolagp.c iqblock.c jack.c kickgoal.c konamigq.c laserbat.c lethal.c lordgun.c m72.c malzak.c mario.c mcr.c meadows.c megatech.c merit.c mitchell.c model3.c moo.c mpu4drvr.c mystwarr.c namcond1.c namcos11.c namcos12.c ninjakd2.c omegrace.c othunder.c overdriv.c pipeline.c pirates.c playmark.c plygonet.c pntnpuzl.c policetr.c polyplay.c powerbal.c psikyo.c psikyo4.c psikyosh.c rallyx.c rockola.c route16.c rungun.c segag80r.c segag80v.c segahang.c segaorun.c segas16a.c seibuspi.c senjyo.c simpl156.c smstrv.c starcrus.c statriv2.c stlforce.c stv.c stvinit.c suna8.c superchs.c superqix.c system1.c taito_b.c taito_z.c tankbatt.c taxidrvr.c tcl.c thief.c tmnt.c tnzs.c toaplan2.c toratora.c turbo.c tx1.c undrfire.c unico.c vamphalf.c vegaeo.c vendetta.c vroulet.c wilytowr.c xexex.c xmen.c zaccaria.c zn.c |
| [src/mame/includes] | 8080bw.h astinvad.h astrocde.h blockade.h cclimber.h circus.h dkong.h galaxian.h triplhnt.h |
| [src/mame/machine] | asteroid.c chaknpop.c drakton.c exctsccr.c flstory.c gaelco2.c kanekotb.h leland.c scramble.c simpsons.c slapstic.c steppers.c steppers.h strtheat.c |
| [src/mame/video] | atari.c avgdvg.c cps1.c dkong.c midzeus.c |
| [src/mess] | artworkx.c artworkx.h |
| [src/mess/osd/windows] | menu.c |
| [src/osd/windows] | drawd3d.c winprefix.h |
| [src/tools] | src2html.c |
| r1386 | r1387 | |
|---|---|---|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | |
| 69 | static const char *spacefb_sample_names[] = | |
| 69 | static const char *const spacefb_sample_names[] = | |
| 70 | 70 | { |
| 71 | 71 | "*spacefb", |
| 72 | 72 | "ekilled.wav", |
| r1386 | r1387 | |
| 77 | 77 | }; |
| 78 | 78 | |
| 79 | 79 | |
| 80 | static struct Samplesinterface spacefb_samples_interface = | |
| 80 | static const struct Samplesinterface spacefb_samples_interface = | |
| 81 | 81 | { |
| 82 | 82 | 3, |
| 83 | 83 | spacefb_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | /* sample file names */ |
| 23 | static const char *invinco_sample_names[] = | |
| 23 | static const char *const invinco_sample_names[] = | |
| 24 | 24 | { |
| 25 | 25 | "*invinco", |
| 26 | 26 | "saucer.wav", |
| r1386 | r1387 | |
| 35 | 35 | }; |
| 36 | 36 | |
| 37 | 37 | |
| 38 | static struct Samplesinterface invinco_samples_interface = | |
| 38 | static const struct Samplesinterface invinco_samples_interface = | |
| 39 | 39 | { |
| 40 | 40 | 8, |
| 41 | 41 | invinco_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 33 | 33 | |
| 34 | 34 | |
| 35 | 35 | /* sample file names */ |
| 36 | static const char *pulsar_sample_names[] = | |
| 36 | static const char *const pulsar_sample_names[] = | |
| 37 | 37 | { |
| 38 | 38 | "*pulsar", |
| 39 | 39 | "clang.wav", |
| r1386 | r1387 | |
| 52 | 52 | }; |
| 53 | 53 | |
| 54 | 54 | |
| 55 | static struct Samplesinterface pulsar_samples_interface = | |
| 55 | static const struct Samplesinterface pulsar_samples_interface = | |
| 56 | 56 | { |
| 57 | 57 | 12, |
| 58 | 58 | pulsar_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 29 | 29 | * 64 Phonemes - currently 1 sample per phoneme, will be combined sometime! |
| 30 | 30 | ****************************************************************************/ |
| 31 | 31 | |
| 32 | static const char *PhonemeTable[65] = | |
| 32 | static const char *const PhonemeTable[65] = | |
| 33 | 33 | { |
| 34 | 34 | "EH3","EH2","EH1","PA0","DT" ,"A1" ,"A2" ,"ZH", |
| 35 | 35 | "AH2","I3" ,"I2" ,"I1" ,"M" ,"N" ,"B" ,"V", |
| r1386 | r1387 | |
| 48 | 48 | doom.wav pop.wav |
| 49 | 49 | Problems with YOU and YOU'LL and YOU'DD */ |
| 50 | 50 | |
| 51 | static const char *wowWordTable[] = | |
| 51 | static const char *const wowWordTable[] = | |
| 52 | 52 | { |
| 53 | 53 | "AH1I3Y1", "UH1GA1EH1N", "AHAH2", "AE1EH3M", "AE1EH3ND", |
| 54 | 54 | "anew.wav", "AH1NUHTHER", "AE1NY", "anyone.wav", "appear.wav", "AH1UH3R", "UHR", "BABYY1S", "BAE1EH3K", |
| r1386 | r1387 | |
| 75 | 75 | #define num_samples (sizeof(wowWordTable)/sizeof(char *)) |
| 76 | 76 | |
| 77 | 77 | |
| 78 | const char *wow_sample_names[] = | |
| 78 | const char *const wow_sample_names[] = | |
| 79 | 79 | { |
| 80 | 80 | "*wow", |
| 81 | 81 | "a.wav", "again.wav", "ahh.wav", "am.wav", "and.wav", |
| r1386 | r1387 | |
|---|---|---|
| 30 | 30 | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | static struct SN76477interface sheriff_sn76477_interface = | |
| 33 | static const struct SN76477interface sheriff_sn76477_interface = | |
| 34 | 34 | { |
| 35 | 35 | RES_K(36) , /* 04 */ |
| 36 | 36 | RES_K(100) , /* 05 */ |
| r1386 | r1387 | |
| 58 | 58 | }; |
| 59 | 59 | |
| 60 | 60 | |
| 61 | static struct SN76477interface spacefev_sn76477_interface = | |
| 61 | static const struct SN76477interface spacefev_sn76477_interface = | |
| 62 | 62 | { |
| 63 | 63 | RES_K(36) , /* 04 */ |
| 64 | 64 | RES_K(150) , /* 05 */ |
| r1386 | r1387 | |
|---|---|---|
| 136 | 136 | * |
| 137 | 137 | *************************************/ |
| 138 | 138 | |
| 139 | static const char *spacewar_sample_names[] = | |
| 139 | static const char *const spacewar_sample_names[] = | |
| 140 | 140 | { |
| 141 | 141 | "*spacewar", |
| 142 | 142 | "explode1.wav", |
| r1386 | r1387 | |
| 150 | 150 | 0 |
| 151 | 151 | }; |
| 152 | 152 | |
| 153 | static struct Samplesinterface spacewar_samples_interface = | |
| 153 | static const struct Samplesinterface spacewar_samples_interface = | |
| 154 | 154 | { |
| 155 | 155 | 8, |
| 156 | 156 | spacewar_sample_names |
| r1386 | r1387 | |
| 218 | 218 | * |
| 219 | 219 | *************************************/ |
| 220 | 220 | |
| 221 | static const char *barrier_sample_names[] = | |
| 221 | static const char *const barrier_sample_names[] = | |
| 222 | 222 | { |
| 223 | 223 | "*barrier", |
| 224 | 224 | "playrdie.wav", |
| r1386 | r1387 | |
| 227 | 227 | 0 |
| 228 | 228 | }; |
| 229 | 229 | |
| 230 | static struct Samplesinterface barrier_samples_interface = | |
| 230 | static const struct Samplesinterface barrier_samples_interface = | |
| 231 | 231 | { |
| 232 | 232 | 3, |
| 233 | 233 | barrier_sample_names |
| r1386 | r1387 | |
| 271 | 271 | * |
| 272 | 272 | *************************************/ |
| 273 | 273 | |
| 274 | static const char *speedfrk_sample_names[] = | |
| 274 | static const char *const speedfrk_sample_names[] = | |
| 275 | 275 | { |
| 276 | 276 | "*speedfrk", |
| 277 | 277 | "offroad.wav", |
| 278 | 278 | NULL |
| 279 | 279 | }; |
| 280 | 280 | |
| 281 | static struct Samplesinterface speedfrk_samples_interface = | |
| 281 | static const struct Samplesinterface speedfrk_samples_interface = | |
| 282 | 282 | { |
| 283 | 283 | 1, |
| 284 | 284 | speedfrk_sample_names |
| r1386 | r1387 | |
| 329 | 329 | * |
| 330 | 330 | *************************************/ |
| 331 | 331 | |
| 332 | static const char *starhawk_sample_names[] = | |
| 332 | static const char *const starhawk_sample_names[] = | |
| 333 | 333 | { |
| 334 | 334 | "*starhawk", |
| 335 | 335 | "explode.wav", |
| r1386 | r1387 | |
| 341 | 341 | NULL |
| 342 | 342 | }; |
| 343 | 343 | |
| 344 | static struct Samplesinterface starhawk_samples_interface = | |
| 344 | static const struct Samplesinterface starhawk_samples_interface = | |
| 345 | 345 | { |
| 346 | 346 | 5, |
| 347 | 347 | starhawk_sample_names |
| r1386 | r1387 | |
| 403 | 403 | * |
| 404 | 404 | *************************************/ |
| 405 | 405 | |
| 406 | static const char *sundance_sample_names[] = | |
| 406 | static const char *const sundance_sample_names[] = | |
| 407 | 407 | { |
| 408 | 408 | "*sundance", |
| 409 | 409 | "bong.wav", |
| r1386 | r1387 | |
| 415 | 415 | 0 |
| 416 | 416 | }; |
| 417 | 417 | |
| 418 | static struct Samplesinterface sundance_samples_interface = | |
| 418 | static const struct Samplesinterface sundance_samples_interface = | |
| 419 | 419 | { |
| 420 | 420 | 6, |
| 421 | 421 | sundance_sample_names |
| r1386 | r1387 | |
| 471 | 471 | * |
| 472 | 472 | *************************************/ |
| 473 | 473 | |
| 474 | static const char *tailg_sample_names[] = | |
| 474 | static const char *const tailg_sample_names[] = | |
| 475 | 475 | { |
| 476 | 476 | "*tailg", |
| 477 | 477 | "sexplode.wav", |
| r1386 | r1387 | |
| 483 | 483 | NULL |
| 484 | 484 | }; |
| 485 | 485 | |
| 486 | static struct Samplesinterface tailg_samples_interface = | |
| 486 | static const struct Samplesinterface tailg_samples_interface = | |
| 487 | 487 | { |
| 488 | 488 | 6, |
| 489 | 489 | tailg_sample_names |
| r1386 | r1387 | |
| 558 | 558 | * |
| 559 | 559 | *************************************/ |
| 560 | 560 | |
| 561 | static const char *warrior_sample_names[] = | |
| 561 | static const char *const warrior_sample_names[] = | |
| 562 | 562 | { |
| 563 | 563 | "*warrior", |
| 564 | 564 | "bgmhum1.wav", |
| r1386 | r1387 | |
| 569 | 569 | NULL |
| 570 | 570 | }; |
| 571 | 571 | |
| 572 | static struct Samplesinterface warrior_samples_interface = | |
| 572 | static const struct Samplesinterface warrior_samples_interface = | |
| 573 | 573 | { |
| 574 | 574 | 5, |
| 575 | 575 | warrior_sample_names |
| r1386 | r1387 | |
| 625 | 625 | * |
| 626 | 626 | *************************************/ |
| 627 | 627 | |
| 628 | static const char *armora_sample_names[] = | |
| 628 | static const char *const armora_sample_names[] = | |
| 629 | 629 | { |
| 630 | 630 | "*armora", |
| 631 | 631 | "loexp.wav", |
| r1386 | r1387 | |
| 638 | 638 | NULL |
| 639 | 639 | }; |
| 640 | 640 | |
| 641 | static struct Samplesinterface armora_samples_interface = | |
| 641 | static const struct Samplesinterface armora_samples_interface = | |
| 642 | 642 | { |
| 643 | 643 | 7, |
| 644 | 644 | armora_sample_names |
| r1386 | r1387 | |
| 718 | 718 | * |
| 719 | 719 | *************************************/ |
| 720 | 720 | |
| 721 | static const char *ripoff_sample_names[] = | |
| 721 | static const char *const ripoff_sample_names[] = | |
| 722 | 722 | { |
| 723 | 723 | "*ripoff", |
| 724 | 724 | "bonuslvl.wav", |
| r1386 | r1387 | |
| 737 | 737 | NULL |
| 738 | 738 | }; |
| 739 | 739 | |
| 740 | static struct Samplesinterface ripoff_samples_interface = | |
| 740 | static const struct Samplesinterface ripoff_samples_interface = | |
| 741 | 741 | { |
| 742 | 742 | 6, |
| 743 | 743 | ripoff_sample_names |
| r1386 | r1387 | |
| 808 | 808 | * |
| 809 | 809 | *************************************/ |
| 810 | 810 | |
| 811 | static const char *starcas_sample_names[] = | |
| 811 | static const char *const starcas_sample_names[] = | |
| 812 | 812 | { |
| 813 | 813 | "*starcas", |
| 814 | 814 | "cfire.wav", |
| r1386 | r1387 | |
| 822 | 822 | 0 |
| 823 | 823 | }; |
| 824 | 824 | |
| 825 | static struct Samplesinterface starcas_samples_interface = | |
| 825 | static const struct Samplesinterface starcas_samples_interface = | |
| 826 | 826 | { |
| 827 | 827 | 8, |
| 828 | 828 | starcas_sample_names |
| r1386 | r1387 | |
| 920 | 920 | * |
| 921 | 921 | *************************************/ |
| 922 | 922 | |
| 923 | static const char *solarq_sample_names[] = | |
| 923 | static const char *const solarq_sample_names[] = | |
| 924 | 924 | { |
| 925 | 925 | "*solarq", |
| 926 | 926 | "bigexpl.wav", |
| r1386 | r1387 | |
| 934 | 934 | NULL |
| 935 | 935 | }; |
| 936 | 936 | |
| 937 | static struct Samplesinterface solarq_samples_interface = | |
| 937 | static const struct Samplesinterface solarq_samples_interface = | |
| 938 | 938 | { |
| 939 | 939 | 8, |
| 940 | 940 | solarq_sample_names |
| r1386 | r1387 | |
| 1055 | 1055 | * |
| 1056 | 1056 | *************************************/ |
| 1057 | 1057 | |
| 1058 | static const char *boxingb_sample_names[] = | |
| 1058 | static const char *const boxingb_sample_names[] = | |
| 1059 | 1059 | { |
| 1060 | 1060 | "*boxingb", |
| 1061 | 1061 | "softexpl.wav", |
| r1386 | r1387 | |
| 1073 | 1073 | NULL |
| 1074 | 1074 | }; |
| 1075 | 1075 | |
| 1076 | static struct Samplesinterface boxingb_samples_interface = | |
| 1076 | static const struct Samplesinterface boxingb_samples_interface = | |
| 1077 | 1077 | { |
| 1078 | 1078 | 12, |
| 1079 | 1079 | boxingb_sample_names |
| r1386 | r1387 | |
| 1188 | 1188 | * |
| 1189 | 1189 | *************************************/ |
| 1190 | 1190 | |
| 1191 | static const char *wotw_sample_names[] = | |
| 1191 | static const char *const wotw_sample_names[] = | |
| 1192 | 1192 | { |
| 1193 | 1193 | "*wotw", |
| 1194 | 1194 | "cfire.wav", |
| r1386 | r1387 | |
| 1202 | 1202 | 0 |
| 1203 | 1203 | }; |
| 1204 | 1204 | |
| 1205 | static struct Samplesinterface wotw_samples_interface = | |
| 1205 | static const struct Samplesinterface wotw_samples_interface = | |
| 1206 | 1206 | { |
| 1207 | 1207 | 8, |
| 1208 | 1208 | wotw_sample_names |
| r1386 | r1387 | |
| 1300 | 1300 | * |
| 1301 | 1301 | *************************************/ |
| 1302 | 1302 | |
| 1303 | static const char *wotwc_sample_names[] = | |
| 1303 | static const char *const wotwc_sample_names[] = | |
| 1304 | 1304 | { |
| 1305 | 1305 | "*wotwc", |
| 1306 | 1306 | "cfire.wav", |
| r1386 | r1387 | |
| 1314 | 1314 | 0 |
| 1315 | 1315 | }; |
| 1316 | 1316 | |
| 1317 | static struct Samplesinterface wotwc_samples_interface = | |
| 1317 | static const struct Samplesinterface wotwc_samples_interface = | |
| 1318 | 1318 | { |
| 1319 | 1319 | 8, |
| 1320 | 1320 | wotwc_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 57 | 57 | static INT32 counter, countdown; |
| 58 | 58 | static INT32 lfobit[4]; |
| 59 | 59 | |
| 60 | static INT16 backgroundwave[32] = | |
| 60 | static const INT16 backgroundwave[32] = | |
| 61 | 61 | { |
| 62 | 62 | 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, |
| 63 | 63 | 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, |
| r1386 | r1387 | |
| 357 | 357 | sample_start_raw(CHANNEL_SHOOT,shootwave,SHOOT_LENGTH,SHOOT_RATE,1); |
| 358 | 358 | |
| 359 | 359 | sample_set_volume(CHANNEL_LFO+0,0); |
| 360 | sample_start_raw(CHANNEL_LFO+0,backgroundwave, | |
| 360 | sample_start_raw(CHANNEL_LFO+0,backgroundwave,ARRAY_LENGTH(backgroundwave) | |
| 361 | 361 | sample_set_volume(CHANNEL_LFO+1,0); |
| 362 | sample_start_raw(CHANNEL_LFO+1,backgroundwave, | |
| 362 | sample_start_raw(CHANNEL_LFO+1,backgroundwave,ARRAY_LENGTH(backgroundwave) | |
| 363 | 363 | sample_set_volume(CHANNEL_LFO+2,0); |
| 364 | sample_start_raw(CHANNEL_LFO+2,backgroundwave, | |
| 364 | sample_start_raw(CHANNEL_LFO+2,backgroundwave,ARRAY_LENGTH(backgroundwave) | |
| 365 | 365 | |
| 366 | 366 | noisetimer = timer_alloc(noise_timer_cb, NULL); |
| 367 | 367 | timer_adjust(noisetimer, ATTOTIME_IN_NSEC((155000+22000)/100*693*22), 0, ATTOTIME_IN_NSEC((155000+22000)/100*693*22)); |
| r1386 | r1387 | |
| 525 | 525 | } |
| 526 | 526 | |
| 527 | 527 | |
| 528 | struct Samplesinterface galaxian_samples_interface = | |
| 528 | const struct Samplesinterface galaxian_samples_interface = | |
| 529 | 529 | { |
| 530 | 530 | 5, |
| 531 | 531 | NULL, |
| r1386 | r1387 | |
|---|---|---|
| 81 | 81 | * |
| 82 | 82 | *************************************/ |
| 83 | 83 | |
| 84 | static const char *zaxxon_sample_names[] = | |
| 84 | static const char *const zaxxon_sample_names[] = | |
| 85 | 85 | { |
| 86 | 86 | "*zaxxon", |
| 87 | 87 | "03.wav", /* 0 - Homing Missile */ |
| r1386 | r1387 | |
| 100 | 100 | }; |
| 101 | 101 | |
| 102 | 102 | |
| 103 | static struct Samplesinterface zaxxon_samples_interface = | |
| 103 | static const struct Samplesinterface zaxxon_samples_interface = | |
| 104 | 104 | { |
| 105 | 105 | 12, |
| 106 | 106 | zaxxon_sample_names |
| r1386 | r1387 | |
| 194 | 194 | * |
| 195 | 195 | *************************************/ |
| 196 | 196 | |
| 197 | static const char *congo_sample_names[] = | |
| 197 | static const char *const congo_sample_names[] = | |
| 198 | 198 | { |
| 199 | 199 | "*congo", |
| 200 | 200 | "gorilla.wav", /* 0 */ |
| r1386 | r1387 | |
| 206 | 206 | }; |
| 207 | 207 | |
| 208 | 208 | |
| 209 | static struct Samplesinterface congo_samples_interface = | |
| 209 | static const struct Samplesinterface congo_samples_interface = | |
| 210 | 210 | { |
| 211 | 211 | 5, /* 5 channels */ |
| 212 | 212 | congo_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | int circus_game; |
| 6 | 6 | |
| 7 | static const char *circus_sample_names[] = | |
| 7 | static const char *const circus_sample_names[] = | |
| 8 | 8 | { |
| 9 | 9 | "*circus", |
| 10 | 10 | "pop.wav", |
| r1386 | r1387 | |
| 13 | 13 | 0 |
| 14 | 14 | }; |
| 15 | 15 | |
| 16 | struct Samplesinterface circus_samples_interface = | |
| 16 | const struct Samplesinterface circus_samples_interface = | |
| 17 | 17 | { |
| 18 | 18 | 3, /* 3 channels */ |
| 19 | 19 | circus_sample_names |
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | static const char *crash_sample_names[] = | |
| 22 | static const char *const crash_sample_names[] = | |
| 23 | 23 | { |
| 24 | 24 | "*crash", |
| 25 | 25 | "crash.wav", |
| 26 | 26 | 0 |
| 27 | 27 | }; |
| 28 | 28 | |
| 29 | struct Samplesinterface crash_samples_interface = | |
| 29 | const struct Samplesinterface crash_samples_interface = | |
| 30 | 30 | { |
| 31 | 31 | 1, /* 1 channel */ |
| 32 | 32 | crash_sample_names |
| 33 | 33 | }; |
| 34 | 34 | |
| 35 | static const char *ripcord_sample_names[] = | |
| 35 | static const char *const ripcord_sample_names[] = | |
| 36 | 36 | { |
| 37 | 37 | "*ripcord", |
| 38 | 38 | "splash.wav", |
| r1386 | r1387 | |
| 42 | 42 | 0 |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | struct Samplesinterface ripcord_samples_interface = | |
| 45 | const struct Samplesinterface ripcord_samples_interface = | |
| 46 | 46 | { |
| 47 | 47 | 4, /* 4 channels */ |
| 48 | 48 | ripcord_sample_names |
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | static const char *robotbwl_sample_names[] = | |
| 51 | static const char *const robotbwl_sample_names[] = | |
| 52 | 52 | { |
| 53 | 53 | "*robotbwl", |
| 54 | 54 | "hit.wav", |
| r1386 | r1387 | |
| 59 | 59 | 0 |
| 60 | 60 | }; |
| 61 | 61 | |
| 62 | struct Samplesinterface robotbwl_samples_interface = | |
| 62 | const struct Samplesinterface robotbwl_samples_interface = | |
| 63 | 63 | { |
| 64 | 64 | 5, /* 5 channels */ |
| 65 | 65 | robotbwl_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 164 | 164 | * |
| 165 | 165 | *************************************/ |
| 166 | 166 | |
| 167 | static const char *turbo_sample_names[] = | |
| 167 | static const char *const turbo_sample_names[] = | |
| 168 | 168 | { |
| 169 | 169 | "*turbo", |
| 170 | 170 | "01.wav", /* 0: Trig1 */ |
| r1386 | r1387 | |
| 180 | 180 | }; |
| 181 | 181 | |
| 182 | 182 | |
| 183 | static struct Samplesinterface turbo_samples_interface = | |
| 183 | static const struct Samplesinterface turbo_samples_interface = | |
| 184 | 184 | { |
| 185 | 185 | 10, |
| 186 | 186 | turbo_sample_names |
| r1386 | r1387 | |
| 418 | 418 | * |
| 419 | 419 | *************************************/ |
| 420 | 420 | |
| 421 | static const char *subroc3d_sample_names[] = | |
| 421 | static const char *const subroc3d_sample_names[] = | |
| 422 | 422 | { |
| 423 | 423 | "*subroc3d", |
| 424 | 424 | "01.wav", /* 0: enemy missile */ |
| r1386 | r1387 | |
| 436 | 436 | }; |
| 437 | 437 | |
| 438 | 438 | |
| 439 | static struct Samplesinterface subroc3d_samples_interface = | |
| 439 | static const struct Samplesinterface subroc3d_samples_interface = | |
| 440 | 440 | { |
| 441 | 441 | 12, |
| 442 | 442 | subroc3d_sample_names |
| r1386 | r1387 | |
| 571 | 571 | * |
| 572 | 572 | *************************************/ |
| 573 | 573 | |
| 574 | static const char *buckrog_sample_names[]= | |
| 574 | static const char *const buckrog_sample_names[]= | |
| 575 | 575 | { |
| 576 | 576 | "*buckrog", |
| 577 | 577 | "alarm0.wav", /* 0 */ |
| r1386 | r1387 | |
| 589 | 589 | }; |
| 590 | 590 | |
| 591 | 591 | |
| 592 | static struct Samplesinterface buckrog_samples_interface = | |
| 592 | static const struct Samplesinterface buckrog_samples_interface = | |
| 593 | 593 | { |
| 594 | 594 | 6, /* 6 channels */ |
| 595 | 595 | buckrog_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 28 | 28 | * 64 Phonemes - currently 1 sample per phoneme, will be combined sometime! |
| 29 | 29 | ****************************************************************************/ |
| 30 | 30 | |
| 31 | static const char *PhonemeTable[65] = | |
| 31 | static const char *const PhonemeTable[65] = | |
| 32 | 32 | { |
| 33 | 33 | "EH3","EH2","EH1","PA0","DT" ,"A1" ,"A2" ,"ZH", |
| 34 | 34 | "AH2","I3" ,"I2" ,"I1" ,"M" ,"N" ,"B" ,"V", |
| r1386 | r1387 | |
| 41 | 41 | 0 |
| 42 | 42 | }; |
| 43 | 43 | |
| 44 | static const char *GorfWordTable[] = | |
| 44 | static const char *const GorfWordTable[] = | |
| 45 | 45 | { |
| 46 | 46 | "A2AYY1","A2E1","UH1GEH1I3N","AE1EH2M","AEM", |
| 47 | 47 | "AE1EH3ND","UH1NAH2I1YLA2SHUH2N","AH2NUHTHER","AH1NUHTHVRR", |
| r1386 | r1387 | |
| 78 | 78 | |
| 79 | 79 | #define num_samples (sizeof(GorfWordTable)/sizeof(char *)) |
| 80 | 80 | |
| 81 | const char *gorf_sample_names[] = | |
| 81 | const char *const gorf_sample_names[] = | |
| 82 | 82 | { |
| 83 | 83 | "*gorf","a.wav","a.wav","again.wav","am.wav","am.wav","and.wav","anhilatn.wav", |
| 84 | 84 | "another.wav","another.wav","are.wav","are.wav", |
| r1386 | r1387 | |
|---|---|---|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | |
| 159 | static const char *astrof_sample_names[] = | |
| 159 | static const char *const astrof_sample_names[] = | |
| 160 | 160 | { |
| 161 | 161 | "*astrof", |
| 162 | 162 | "fire.wav", |
| r1386 | r1387 | |
| 174 | 174 | }; |
| 175 | 175 | |
| 176 | 176 | |
| 177 | static struct Samplesinterface astrof_samples_interface = | |
| 177 | static const struct Samplesinterface astrof_samples_interface = | |
| 178 | 178 | { |
| 179 | 179 | 4, /* 4 channels */ |
| 180 | 180 | astrof_sample_names |
| r1386 | r1387 | |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | |
| 222 | static struct SN76477interface tomahawk_sn76477_interface = | |
| 222 | static const struct SN76477interface tomahawk_sn76477_interface = | |
| 223 | 223 | { |
| 224 | 224 | 0, /* 4 noise_res (N/C) */ |
| 225 | 225 | 0, /* 5 filter_res (N/C) */ |
| r1386 | r1387 | |
|---|---|---|
| 18 | 18 | #include "sound/samples.h" |
| 19 | 19 | #include "includes/astinvad.h" |
| 20 | 20 | |
| 21 | static const char *astinvad_sample_names[] = | |
| 21 | static const char *const astinvad_sample_names[] = | |
| 22 | 22 | { |
| 23 | 23 | "*invaders", |
| 24 | 24 | "0.wav", |
| r1386 | r1387 | |
| 48 | 48 | }; |
| 49 | 49 | |
| 50 | 50 | |
| 51 | struct Samplesinterface astinvad_samples_interface = | |
| 51 | const struct Samplesinterface astinvad_samples_interface = | |
| 52 | 52 | { |
| 53 | 53 | 6, /* channels */ |
| 54 | 54 | astinvad_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 50 | 50 | if (data) { |
| 51 | 51 | freq1 = 2457600 / 16 / data / 8; |
| 52 | 52 | sample_set_volume(0, channel_playing1 * 1.0); |
| 53 | sample_start_raw(0, backgroundwave, | |
| 53 | sample_start_raw(0, backgroundwave, ARRAY_LENGTH(backgroundwave) | |
| 54 | 54 | } |
| 55 | 55 | else { |
| 56 | 56 | sample_stop(0); |
| r1386 | r1387 | |
| 63 | 63 | if (data) { |
| 64 | 64 | freq2 = 2457600 / 16 / data / 8; |
| 65 | 65 | sample_set_volume(1, channel_playing2 * 1.0); |
| 66 | sample_start_raw(1, backgroundwave, | |
| 66 | sample_start_raw(1, backgroundwave, ARRAY_LENGTH(backgroundwave) | |
| 67 | 67 | } |
| 68 | 68 | else { |
| 69 | 69 | sample_stop(0); |
| r1386 | r1387 | |
|---|---|---|
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | /* sample file names */ |
| 21 | static const char *depthch_sample_names[] = | |
| 21 | static const char *const depthch_sample_names[] = | |
| 22 | 22 | { |
| 23 | 23 | "*depthch", |
| 24 | 24 | "longex.wav", |
| r1386 | r1387 | |
| 29 | 29 | }; |
| 30 | 30 | |
| 31 | 31 | |
| 32 | static struct Samplesinterface depthch_samples_interface = | |
| 32 | static const struct Samplesinterface depthch_samples_interface = | |
| 33 | 33 | { |
| 34 | 34 | 4, |
| 35 | 35 | depthch_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 83 | 83 | 0 |
| 84 | 84 | }; |
| 85 | 85 | |
| 86 | struct Samplesinterface cclimber_samples_interface = | |
| 86 | const struct Samplesinterface cclimber_samples_interface = | |
| 87 | 87 | { |
| 88 | 88 | 1, |
| 89 | 89 | NULL, |
| r1386 | r1387 | |
|---|---|---|
| 101 | 101 | |
| 102 | 102 | DISCRETE_SOUND_END |
| 103 | 103 | |
| 104 | static const char *frogs_sample_names[] = | |
| 104 | static const char *const frogs_sample_names[] = | |
| 105 | 105 | { |
| 106 | 106 | "*frogs", |
| 107 | 107 | "boing.wav", |
| r1386 | r1387 | |
| 113 | 113 | 0 |
| 114 | 114 | }; |
| 115 | 115 | |
| 116 | static struct Samplesinterface frogs_samples_interface = | |
| 116 | static const struct Samplesinterface frogs_samples_interface = | |
| 117 | 117 | { |
| 118 | 118 | 5, /* 5 channels */ |
| 119 | 119 | frogs_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 50 | 50 | static int Sound0StopOnRollover; |
| 51 | 51 | static UINT8 LastPort1; |
| 52 | 52 | |
| 53 | const char *sasuke_sample_names[] = | |
| 53 | const char *const sasuke_sample_names[] = | |
| 54 | 54 | { |
| 55 | 55 | "*sasuke", |
| 56 | 56 | |
| r1386 | r1387 | |
| 63 | 63 | 0 |
| 64 | 64 | }; |
| 65 | 65 | |
| 66 | const char *vanguard_sample_names[] = | |
| 66 | const char *const vanguard_sample_names[] = | |
| 67 | 67 | { |
| 68 | 68 | "*vanguard", |
| 69 | 69 | |
| r1386 | r1387 | |
| 92 | 92 | 0 |
| 93 | 93 | }; |
| 94 | 94 | |
| 95 | const char *fantasy_sample_names[] = | |
| 95 | const char *const fantasy_sample_names[] = | |
| 96 | 96 | { |
| 97 | 97 | "*fantasy", |
| 98 | 98 |
| r1386 | r1387 | |
|---|---|---|
| 32 | 32 | static int channel; |
| 33 | 33 | static int freq1 = 1000; |
| 34 | 34 | static int freq2 = 1000; |
| 35 | static | |
| 35 | static const INT16 waveform[2] = { -120*256, 120*256 }; | |
| 36 | 36 | |
| 37 | 37 | /************************************/ |
| 38 | 38 | /* Sound handler start */ |
| r1386 | r1387 | |
| 44 | 44 | vol[0]=vol[1]=255; |
| 45 | 45 | |
| 46 | 46 | sample_set_volume(0,0); |
| 47 | sample_start_raw(0,waveform, | |
| 47 | sample_start_raw(0,waveform,ARRAY_LENGTH(waveform) | |
| 48 | 48 | sample_set_volume(1,0); |
| 49 | sample_start_raw(1,waveform, | |
| 49 | sample_start_raw(1,waveform,ARRAY_LENGTH(waveform) | |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /************************************/ |
| r1386 | r1387 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | |
| 83 | 83 | /* sample file names */ |
| 84 | static const char *carnival_sample_names[] = | |
| 84 | static const char *const carnival_sample_names[] = | |
| 85 | 85 | { |
| 86 | 86 | "*carnival", |
| 87 | 87 | "bear.wav", |
| r1386 | r1387 | |
| 98 | 98 | }; |
| 99 | 99 | |
| 100 | 100 | |
| 101 | static struct Samplesinterface carnival_samples_interface = | |
| 101 | static const struct Samplesinterface carnival_samples_interface = | |
| 102 | 102 | { |
| 103 | 103 | 10, |
| 104 | 104 | carnival_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | 2 | #include "cpu/i8039/i8039.h" |
| 3 | #include "cpu/m6502/m6502.h" | |
| 4 | #include "sound/nes_apu.h" | |
| 3 | 5 | #include "sound/samples.h" |
| 4 | #include "includes/dkong.h" | |
| 5 | 6 | #include "sound/discrete.h" |
| 6 | 7 | #include "sound/dac.h" |
| 7 | 8 | |
| 9 | #include "includes/dkong.h" | |
| 8 | 10 | |
| 9 | 11 | /**************************************************************** |
| 10 | 12 | * |
| 11 | * Di | |
| 13 | * Defin | |
| 12 | 14 | * |
| 13 | 15 | ****************************************************************/ |
| 14 | 16 | |
| 17 | #define DEBUG_SPEECH (0) | |
| 18 | ||
| 19 | #define ACTIVELOW_PORT_BIT(P,A,D) (((P) & (~(1 << (A)))) | (((D) ^ 1) << (A))) | |
| 20 | ||
| 21 | /* Needed for dkongjr ... FIXME */ | |
| 22 | #define I8035_T_R(N) ((portT >> (N)) & 1) | |
| 23 | #define I8035_T_W_AL(N,D) do { portT = ACTIVELOW_PORT_BIT(portT,N,D); soundlatch2_w(0, portT); } while (0) | |
| 24 | ||
| 25 | #define I8035_P1_R() (soundlatch3_r(0)) | |
| 26 | #define I8035_P2_R() (soundlatch4_r(0)) | |
| 27 | #define I8035_P1_W(D) soundlatch3_w(0,D) | |
| 28 | #define I8035_P2_W(D) soundlatch4_w(0,D) | |
| 29 | ||
| 30 | #define I8035_P1_W_AL(B,D) I8035_P1_W(ACTIVELOW_PORT_BIT(I8035_P1_R(),B,(D))) | |
| 31 | #define I8035_P2_W_AL(B,D) I8035_P2_W(ACTIVELOW_PORT_BIT(I8035_P2_R(),B,(D))) | |
| 32 | ||
| 33 | ||
| 34 | /**************************************************************** | |
| 35 | * | |
| 36 | * Discrete Sound defines | |
| 37 | * | |
| 38 | ****************************************************************/ | |
| 39 | ||
| 15 | 40 | /* Discrete sound inputs */ |
| 16 | 41 | |
| 17 | 42 | #define DS_SOUND0_INV NODE_01 |
| r1386 | r1387 | |
| 63 | 88 | static UINT8 dkongjr_latch[10]; |
| 64 | 89 | static UINT8 sh_climb_count; |
| 65 | 90 | |
| 66 | static UINT8 has_discrete_interface | |
| 91 | static UINT8 has_discrete_interface | |
| 67 | 92 | |
| 68 | 93 | static UINT8 page,mcustatus; |
| 69 | static UINT8 p[8]; | |
| 70 | static UINT8 t[2]; | |
| 71 | 94 | static double envelope,tt; |
| 72 | 95 | static UINT8 decay; |
| 73 | static UINT8 sh1_count = 0; | |
| 96 | static UINT8 sh1_count; | |
| 97 | static UINT8 portT; | |
| 74 | 98 | |
| 75 | enum | |
| 76 | { | |
| 99 | enum { | |
| 77 | 100 | WAIT_CMD, |
| 78 | 101 | WAIT_WRITE, |
| 79 | 102 | WAIT_DONE1, |
| 80 | 103 | WAIT_DONE2 |
| 81 | }; | |
| 104 | } m58817_states; | |
| 82 | 105 | |
| 83 | 106 | static UINT8 m58817_state; |
| 84 | 107 | static UINT8 m58817_drq; |
| r1386 | r1387 | |
| 160 | 183 | #define DK_C29 CAP_U_AGED(3.3) |
| 161 | 184 | #define DK_C30 CAP_U_AGED(10) |
| 162 | 185 | #define DK_C32 CAP_U_AGED(10) |
| 163 | #define DK_C34 CAP_N(10 | |
| 186 | #define DK_C34 CAP_N(10 | |
| 164 | 187 | #define DK_C160 CAP_N(100) |
| 165 | 188 | |
| 166 | 189 | |
| r1386 | r1387 | |
| 234 | 257 | DISC_OSC_INVERTER_IS_TYPE2 |
| 235 | 258 | }; |
| 236 | 259 | |
| 237 | DISCRETE_SOUND_START(dkong) | |
| 260 | static DISCRETE_SOUND_START(dkong2b) | |
| 238 | 261 | |
| 239 | 262 | /************************************************/ |
| 240 | 263 | /* Input register mapping for dkong */ |
| r1386 | r1387 | |
| 331 | 354 | |
| 332 | 355 | /* following the DAC are two opamps. The first is a current-to-voltage changer |
| 333 | 356 | * for the DAC08 which delivers a variable output current. |
| 334 | * The second opamp I tried to modell in the transform. | |
| 357 | * | |
| 358 | * The second one is a Sallen Key filter ... | |
| 359 | * http://www.t-linespeakers.org/tech/filters/Sallen-Key.html | |
| 360 | * f = w / 2 / pi = 1 / ( 2 * pi * 5.6k*sqrt(22n*10n)) = 1916 Hz | |
| 361 | * Q = 1/2 * sqrt(22n/10n)= 0.74 | |
| 335 | 362 | */ |
| 363 | DISCRETE_FILTER2(NODE_73, 1, NODE_71, 1916, (1.0/0.74), DISC_FILTER_LOWPASS) | |
| 336 | 364 | |
| 337 | DISCRETE_RCFILTER(NODE_72,1,NODE_71,(DK_R21+DK_R22),DK_C34) | |
| 338 | DISCRETE_TRANSFORM4(NODE_73,1,NODE_72,NODE_71,-1,NODE_73,"012*3+-") | |
| 339 | ||
| 340 | 365 | /* Adjustment VR2 */ |
| 341 | 366 | DISCRETE_MULTIPLY(DS_OUT_DAC, 1, NODE_73, DS_ADJ_DAC) |
| 342 | 367 | |
| r1386 | r1387 | |
| 346 | 371 | |
| 347 | 372 | DISCRETE_MIXER4(NODE_288, 1, DS_OUT_SOUND0, DS_OUT_SOUND1, DS_OUT_DAC, DS_OUT_SOUND2, &dkong_mixer_desc) |
| 348 | 373 | |
| 349 | #if | |
| 374 | #if | |
| 350 | 375 | /* This filter should simulate gain vs. frequency behaviour of MB3712 */ |
| 351 | 376 | //DISCRETE_FILTER1(NODE_294,1,NODE_288,80,DISC_FILTER_HIGHPASS) |
| 352 | 377 | |
| 353 | 378 | /* The following is the CR filter by the speaker and C8 */ |
| 354 | 379 | /* 4 Ohm is from MB3712 Spec Sheet */ |
| 355 | 380 | DISCRETE_CRFILTER(NODE_295,1,NODE_288, 4, DK_C8) |
| 356 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0* | |
| 381 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0*15) | |
| 357 | 382 | #else |
| 358 | 383 | // Amplifier: internal amplifier |
| 359 | DISCRETE_ADDER2(NODE_289,1,NODE_288,0.5+5.0*150.0/(150.0+1000.0)) | |
| 384 | //DISCRETE_ADDER2(NODE_289,1,NODE_288,0.3+5.0*150.0/(150.0+1000.0)) | |
| 385 | DISCRETE_ADDER2(NODE_289,1,NODE_288,5.0*43.0/(100.0+43.0)) | |
| 360 | 386 | DISCRETE_RCINTEGRATE(NODE_294,1,NODE_289,0,150,1000, CAP_U(33),DK_SUP_V,DISC_RC_INTEGRATE_TYPE3) |
| 361 | 387 | DISCRETE_CRFILTER(NODE_295,1,NODE_294, 50, DK_C13) |
| 362 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0) | |
| 388 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 ) | |
| 363 | 389 | #endif |
| 364 | 390 | |
| 365 | 391 | DISCRETE_SOUND_END |
| r1386 | r1387 | |
| 382 | 408 | #define RS_R14 RES_K(10) |
| 383 | 409 | #define RS_R15 RES_K(5.6) // ???? |
| 384 | 410 | #define RS_R16 RES_K(5.6) |
| 385 | #define RS_R18 RES_K(4.7) | |
| 411 | #define RS_R18 RES_K(4.7) | |
| 386 | 412 | #define RS_R22 RES_K(5.6) |
| 387 | 413 | #define RS_R23 RES_K(5.6) |
| 388 | 414 | #define RS_R25 RES_K(10) |
| r1386 | r1387 | |
| 431 | 457 | #define RS_C45 CAP_U(22) |
| 432 | 458 | #define RS_C46 CAP_U(1) |
| 433 | 459 | #define RS_C47 CAP_U(22) |
| 460 | #define RS_C48 CAP_N(33) | |
| 461 | #define RS_C49 CAP_N(10) | |
| 462 | #define RS_C50 CAP_U(3.3) | |
| 434 | 463 | #define RS_C51 CAP_U(3.3) |
| 435 | 464 | #define RS_C53 CAP_U(3.3) |
| 436 | 465 | #define RS_C54 CAP_U(1) |
| r1386 | r1387 | |
| 465 | 494 | {0,0,0}, // no variable resistors |
| 466 | 495 | {0,0,0}, // no node capacitors |
| 467 | 496 | 0, 0, |
| 468 | RS_C5 | |
| 497 | RS_C50, | |
| 469 | 498 | 0, |
| 470 | 499 | 0, 1}; |
| 471 | 500 | |
| r1386 | r1387 | |
| 488 | 517 | DISC_OSC_INVERTER_IS_TYPE3 |
| 489 | 518 | }; |
| 490 | 519 | |
| 491 | DISCRETE_SOUND_START(radarscp) | |
| 520 | static DISCRETE_SOUND_START(radarscp) | |
| 492 | 521 | |
| 493 | 522 | /************************************************/ |
| 494 | 523 | /* Input register mapping for radarscp */ |
| r1386 | r1387 | |
| 563 | 592 | DISCRETE_MIXER3(NODE_42, 1, NODE_41, DK_SUP_V, 0,&radarscp_mixer_desc_0) |
| 564 | 593 | |
| 565 | 594 | /* 555 Voltage controlled */ |
| 566 | DISCRETE_555_ASTABLE_CV(NODE_43, DS_SOUND6, RES_K(47), RES_K(27), | |
| 595 | DISCRETE_555_ASTABLE_CV(NODE_43, DS_SOUND6, RES_K(47), RES_K(27), RS | |
| 567 | 596 | |
| 568 | 597 | DISCRETE_RCDISC_MODULATED(NODE_44,1,DS_SOUND0_INV,NODE_43,RS_R39,RS_R18,RS_R37,RS_R38,RS_C22,DK_SUP_V) |
| 569 | 598 | DISCRETE_CRFILTER(NODE_45, 1, NODE_44, RS_R15+RS_R16, RS_C33) |
| r1386 | r1387 | |
| 579 | 608 | |
| 580 | 609 | DISCRETE_MIXER3(NODE_53, 1, NODE_51, DK_SUP_V, 0,&radarscp_mixer_desc_7) |
| 581 | 610 | /* 555 Voltage controlled */ |
| 582 | DISCRETE_555_ASTABLE_CV(NODE_54, DS_SOUND7, RES_K(47), RES_K(27), | |
| 611 | DISCRETE_555_ASTABLE_CV(NODE_54, DS_SOUND7, RES_K(47), RES_K(27), RS | |
| 583 | 612 | |
| 584 | 613 | DISCRETE_RCINTEGRATE(NODE_55,1,NODE_52,RS_R46, RS_R46,0,RS_C45,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1) |
| 585 | 614 | DISCRETE_TRANSFORM4(NODE_56, 1, NODE_55, DS_SOUND7,NODE_54,2.5, "01*23<*") |
| r1386 | r1387 | |
| 595 | 624 | |
| 596 | 625 | /* following the DAC are two opamps. The first is a current-to-voltage changer |
| 597 | 626 | * for the DAC08 which delivers a variable output current. |
| 598 | * The second opamp I tried to modell in the transform. | |
| 627 | * | |
| 628 | * The second one is a Sallen Key filter ... | |
| 629 | * http://www.t-linespeakers.org/tech/filters/Sallen-Key.html | |
| 630 | * f = w / 2 / pi = 1 / ( 2 * pi * 5.6k*sqrt(22n*10n)) = 1916 Hz | |
| 631 | * Q = 1/2 * sqrt(22n/10n)= 0.74 | |
| 599 | 632 | */ |
| 633 | DISCRETE_FILTER2(NODE_173, 1, NODE_171, 1916, (1.0/0.74), DISC_FILTER_LOWPASS) | |
| 600 | 634 | |
| 601 | DISCRETE_RCFILTER(NODE_172,1,NODE_171,(RS_R22+RS_R23),RS_C38) | |
| 602 | DISCRETE_TRANSFORM4(NODE_173,1,NODE_172,NODE_171,-1,NODE_173,"012*3+-") | |
| 603 | ||
| 604 | 635 | /* Adjustment VR3 */ |
| 605 | 636 | DISCRETE_MULTIPLY(DS_OUT_DAC, 1, NODE_173, DS_ADJ_DAC) |
| 606 | 637 | |
| r1386 | r1387 | |
| 610 | 641 | |
| 611 | 642 | DISCRETE_MIXER5(NODE_288, 1, DS_OUT_SOUND0, DS_OUT_SOUND1, DS_OUT_SOUND2, DS_OUT_SOUND7, DS_OUT_DAC, &radarscp_mixer_desc) |
| 612 | 643 | |
| 613 | #if | |
| 644 | #if | |
| 614 | 645 | /* This filter should simulate gain vs. frequency behaviour of MB3712 */ |
| 615 | 646 | //DISCRETE_FILTER1(NODE_291,1,NODE_289,80,DISC_FILTER_HIGHPASS) |
| 616 | 647 | |
| 617 | 648 | /* The following is the CR filter by the speaker and C8 */ |
| 618 | 649 | /* 4 Ohm is from MB3712 Spec Sheet */ |
| 619 | 650 | DISCRETE_CRFILTER(NODE_295,1,NODE_288, 4, RS_C5) |
| 620 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0* | |
| 651 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0*20) | |
| 621 | 652 | #else |
| 622 | 653 | // Amplifier: internal amplifier |
| 623 | DISCRETE_ADDER2(NODE_289,1,NODE_288,0.5+5.0*150.0/(150.0+1000.0)) | |
| 654 | //DISCRETE_ADDER2(NODE_289,1,NODE_288,0.5+5.0*150.0/(150.0+1000.0)) | |
| 655 | DISCRETE_ADDER2(NODE_289,1,NODE_288,5.0*43.0/(100.0+43.0)) | |
| 624 | 656 | DISCRETE_RCINTEGRATE(NODE_294,1,NODE_289,0,150,1000, CAP_U(33),DK_SUP_V,DISC_RC_INTEGRATE_TYPE3) |
| 625 | 657 | DISCRETE_CRFILTER(NODE_295,1,NODE_294, 50, DK_C13) |
| 626 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0) | |
| 658 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 * 3) | |
| 627 | 659 | #endif |
| 628 | 660 | |
| 629 | //DISCRETE_CSVLOG3(DS_SOUND2,NODE_13,NODE_14) | |
| 630 | //DISCRETE_CSVLOG3(DS_SOUND0,NODE_54,NODE_51) | |
| 631 | //DISCRETE_CRFILTER(NODE_299,1,NODE_288, 50, DK_C13) | |
| 632 | //DISCRETE_WAVELOG2(NODE_295, 32767/5.0, NODE_299, 32767.0/5.0*20) | |
| 633 | //DISCRETE_WAVELOG2(NODE_57, 32767/5.0, NODE_56, 32767/5.0) | |
| 634 | 661 | DISCRETE_SOUND_END |
| 635 | 662 | |
| 636 | 663 | |
| r1386 | r1387 | |
| 640 | 667 | * |
| 641 | 668 | ****************************************************************/ |
| 642 | 669 | |
| 643 | SOUND_START( dkong ) | |
| 670 | static SOUND_START( dkong ) | |
| 644 | 671 | { |
| 645 | 672 | state_save_register_global(page); |
| 646 | 673 | state_save_register_global(mcustatus); |
| 647 | state_save_register_global_array(p); | |
| 648 | state_save_register_global_array(t); | |
| 649 | 674 | state_save_register_global(envelope); |
| 650 | 675 | state_save_register_global(tt); |
| 651 | 676 | state_save_register_global(decay); |
| 652 | 677 | state_save_register_global(sh1_count); |
| 678 | state_save_register_global(portT); | |
| 653 | 679 | |
| 680 | has_discrete_interface = 1; | |
| 681 | ||
| 682 | ||
| 683 | } | |
| 684 | ||
| 685 | static SOUND_RESET( dkong ) | |
| 686 | { | |
| 687 | ||
| 654 | 688 | sh1_count = 0; |
| 655 | 689 | mcustatus = 0; |
| 656 | 690 | envelope = 0; |
| r1386 | r1387 | |
| 658 | 692 | decay = 0; |
| 659 | 693 | |
| 660 | 694 | page = 0; |
| 661 | p[0] = p[1] = p[2] = p[3] = p[4] = p[5] = p[6] = p[7] = 255; | |
| 662 | t[0] = t[1] = 1; | |
| 663 | 695 | |
| 664 | has_discrete_interface = 1; | |
| 696 | I8035_T_W_AL(0,0); | |
| 697 | I8035_T_W_AL(1,0); | |
| 698 | I8035_P1_W(255); | |
| 699 | I8035_P2_W(255); | |
| 700 | ||
| 665 | 701 | } |
| 666 | 702 | |
| 667 | SOUND_START( dkongjr ) | |
| 703 | static SOUND_START( dkongjr ) | |
| 668 | 704 | { |
| 669 | 705 | sound_start_dkong(machine); |
| 670 | 706 | |
| r1386 | r1387 | |
| 676 | 712 | has_discrete_interface = 0; |
| 677 | 713 | } |
| 678 | 714 | |
| 679 | SOUND_START( | |
| 715 | static SOUND_START( ra | |
| 680 | 716 | { |
| 681 | 717 | sound_start_dkong(machine); |
| 682 | 718 | |
| 683 | has_discrete_interface = 0; | |
| 719 | state_save_register_global(m58817_state); | |
| 720 | state_save_register_global(m58817_drq); | |
| 721 | state_save_register_global_array(m58817_nibbles); | |
| 722 | state_save_register_global(m58817_count); | |
| 723 | state_save_register_global(m58817_address); | |
| 724 | ||
| 725 | has_discrete_interface = 1; | |
| 684 | 726 | } |
| 685 | 727 | |
| 686 | static int dumpframe(int startbit); | |
| 687 | ||
| 688 | SOUND_START( radarsc1 ) | |
| 728 | static SOUND_RESET( radarsc1 ) | |
| 689 | 729 | { |
| 690 | sound_ | |
| 730 | sound_ | |
| 691 | 731 | |
| 692 | 732 | m58817_state=WAIT_CMD; |
| 693 | 733 | m58817_drq=0; |
| 694 | 734 | m58817_count=0; |
| 695 | 735 | m58817_address=0; |
| 696 | 736 | |
| 697 | state_save_register_global(m58817_state); | |
| 698 | state_save_register_global(m58817_drq); | |
| 699 | state_save_register_global_array(m58817_nibbles); | |
| 700 | state_save_register_global(m58817_count); | |
| 701 | state_save_register_global(m58817_address); | |
| 702 | ||
| 703 | has_discrete_interface = 1; | |
| 704 | 737 | } |
| 705 | 738 | |
| 706 | 739 | /**************************************************************** |
| 707 | 740 | * |
| 708 | * | |
| 741 | * M58817 Sp | |
| 709 | 742 | * |
| 743 | * Fixme: Move to src/emu/audio | |
| 744 | * | |
| 710 | 745 | ****************************************************************/ |
| 711 | 746 | |
| 712 | ||
| 713 | READ8_HANDLER( dkong_sh_p1_r ) | |
| 714 | { | |
| 715 | return p[1]; | |
| 716 | } | |
| 717 | ||
| 718 | READ8_HANDLER( dkong_sh_p2_r ) | |
| 719 | { | |
| 720 | return p[2]; | |
| 721 | } | |
| 722 | ||
| 723 | READ8_HANDLER( dkong_sh_t0_r ) | |
| 724 | { | |
| 725 | return t[0]; | |
| 726 | } | |
| 727 | ||
| 728 | READ8_HANDLER( dkong_sh_t1_r ) | |
| 729 | { | |
| 730 | return t[1]; | |
| 731 | } | |
| 732 | ||
| 733 | READ8_HANDLER( dkong_sh_tune_r ) | |
| 734 | { | |
| 735 | UINT8 *SND = memory_region(REGION_CPU2); | |
| 736 | if ((page & 0x40) && (offset==0x20)) | |
| 737 | return soundlatch_r(0); | |
| 738 | else | |
| 739 | return (SND[2048+(page & 7)*256+offset]); | |
| 740 | } | |
| 741 | ||
| 742 | #define TSTEP 0.001 | |
| 743 | ||
| 744 | WRITE8_HANDLER( dkong_sh_p1_w ) | |
| 745 | { | |
| 746 | ||
| 747 | if (has_discrete_interface) | |
| 748 | discrete_sound_w(DS_DAC,data); | |
| 749 | else | |
| 750 | { | |
| 751 | envelope=exp(-tt); | |
| 752 | DAC_data_w(0,(int)(data*envelope)); | |
| 753 | if (decay) | |
| 754 | tt+=TSTEP; | |
| 755 | else | |
| 756 | tt=0; | |
| 757 | } | |
| 758 | } | |
| 759 | ||
| 760 | READ8_HANDLER( radarsc1_sh_tune_r ) | |
| 761 | { | |
| 762 | // always offset 0x20 | |
| 763 | return soundlatch_r(0); | |
| 764 | } | |
| 765 | ||
| 766 | ||
| 767 | 747 | /* @0x510, cpu2 |
| 768 | 748 | 10: 0000 00 00000000 ... 50 53 01010000 01010011 "scramble" |
| 769 | 749 | 12: 007a 44 01000100 ... 00 0f 00000000 00001111 "all pilots climb up" |
| r1386 | r1387 | |
| 788 | 768 | 271 |
| 789 | 769 | |
| 790 | 770 | Samples |
| 791 | 0: 14 16 | |
| 792 | 1: 14 18 | |
| 793 | 2: 14 1A | |
| 794 | 3: 1C | |
| 795 | 4: 1E 1E | |
| 796 | 5: 10 10 10 | |
| 797 | 6: 12 12 | |
| 798 | 7: 20 | |
| 771 | 0: 14 16 ... checkpoint charlie | |
| 772 | 1: 14 18 ... checkpoint bravo | |
| 773 | 2: 14 1A ... checkpoint alpha | |
| 774 | 3: 1C You'll notice | |
| 775 | 4: 1E 1E Complete attack mission | |
| 776 | 5: 10 10 10 trouble, trouble, trouble | |
| 777 | 6: 12 12 all pilots climb up | |
| 778 | 7: 20 engine trouble | |
| 799 | 779 | */ |
| 800 | 780 | |
| 781 | #if DEBUG_SPEECH | |
| 801 | 782 | static UINT8 m58817_getbit(int bitnum) |
| 802 | 783 | { |
| 803 | 784 | const UINT8 *table = memory_region(REGION_SOUND1); |
| r1386 | r1387 | |
| 817 | 798 | return r; |
| 818 | 799 | } |
| 819 | 800 | |
| 820 | static int decodeframe(int startbit) | |
| 801 | static int m58817_decodeframe(int startbit) | |
| 821 | 802 | { |
| 822 | 803 | int energy; |
| 823 | 804 | int pitch; |
| r1386 | r1387 | |
| 866 | 847 | } |
| 867 | 848 | } |
| 868 | 849 | |
| 869 | static int dumpframe(int startbit) | |
| 850 | static int m58817_dumpframe(int startbit) | |
| 870 | 851 | { |
| 871 | 852 | while (startbit>=0) |
| 872 | startbit=decodeframe(startbit); | |
| 853 | startbit=m58817_decodeframe(startbit); | |
| 873 | 854 | logerror("\n"); |
| 874 | 855 | return startbit; |
| 875 | 856 | } |
| 857 | #endif | |
| 876 | 858 | |
| 859 | static void m58817_sampleframe(int addr) | |
| 860 | { | |
| 861 | printf("0x%x\n", addr); | |
| 862 | switch (addr) | |
| 863 | { | |
| 864 | case 0x0000: /* 10 */ | |
| 865 | sample_start (0,0,0); | |
| 866 | break; | |
| 867 | case 0x007a: /* 12 */ | |
| 868 | sample_start (0,1,0); | |
| 869 | break; | |
| 870 | case 0x018b: /* 14 */ | |
| 871 | sample_start (0,2,0); | |
| 872 | break; | |
| 873 | case 0x0320: /* 16 */ | |
| 874 | sample_start (0,3,0); | |
| 875 | break; | |
| 876 | case 0x036c: /* 18 */ | |
| 877 | sample_start (0,4,0); | |
| 878 | break; | |
| 879 | case 0x03c4: /* 1A */ | |
| 880 | sample_start (0,5,0); | |
| 881 | break; | |
| 882 | case 0x041c: /* 1C */ | |
| 883 | sample_start (0,6,0); | |
| 884 | break; | |
| 885 | case 0x0520: /* 1E */ | |
| 886 | sample_start (0,7,0); | |
| 887 | break; | |
| 888 | case 0x063e: /* 20 */ | |
| 889 | sample_start (0,8,0); | |
| 890 | break; | |
| 891 | } | |
| 892 | } | |
| 893 | ||
| 877 | 894 | static void m58817_state_loop(int data) |
| 878 | 895 | { |
| 879 | 896 | int i; |
| r1386 | r1387 | |
| 908 | 925 | m58817_address |= (m58817_nibbles[i] << (i*4)); |
| 909 | 926 | } |
| 910 | 927 | logerror("m58817: address: 0x%04x\n", m58817_address); |
| 911 | dumpframe(m58817_address * 8); | |
| 928 | //m58817_dumpframe(m58817_address * 8); | |
| 929 | m58817_sampleframe(m58817_address); | |
| 912 | 930 | m58817_state=WAIT_CMD; |
| 913 | 931 | break; |
| 914 | 932 | } |
| 915 | 933 | } |
| 916 | 934 | |
| 917 | static READ8_HANDLER( M58817_status_r) | |
| 935 | ||
| 936 | static READ8_HANDLER( M58817_status_r ) | |
| 918 | 937 | { |
| 919 | return !(m58817_state == WAIT_CMD); | |
| 938 | //return !(m58817_state == WAIT_CMD); | |
| 939 | return sample_playing(0); | |
| 920 | 940 | } |
| 921 | 941 | |
| 922 | static WRITE8_HANDLER( M58817_command_w) | |
| 942 | static WRITE8_HANDLER( M58817_command_w ) | |
| 923 | 943 | { |
| 924 | 944 | int drq = (data>>4) & 0x01; // FIXME 0x20 ?? |
| 925 | 945 | int dat = data & 0x0f; |
| r1386 | r1387 | |
| 929 | 949 | m58817_drq = drq; |
| 930 | 950 | } |
| 931 | 951 | |
| 932 | READ8_HANDLER( radarsc1_sh_p1_r ) | |
| 952 | /**************************************************************** | |
| 953 | * | |
| 954 | * I/O Handlers - static | |
| 955 | * | |
| 956 | ****************************************************************/ | |
| 957 | ||
| 958 | static READ8_HANDLER( dkong_sh_p1_r ) | |
| 933 | 959 | { |
| 960 | return I8035_P1_R(); | |
| 961 | } | |
| 962 | ||
| 963 | static READ8_HANDLER( dkong_sh_p2_r ) | |
| 964 | { | |
| 965 | return I8035_P2_R(); | |
| 966 | } | |
| 967 | ||
| 968 | static READ8_HANDLER( dkong_sh_t0_r ) | |
| 969 | { | |
| 970 | return I8035_T_R(0); | |
| 971 | } | |
| 972 | ||
| 973 | static READ8_HANDLER( dkong_sh_t1_r ) | |
| 974 | { | |
| 975 | return I8035_T_R(1); | |
| 976 | } | |
| 977 | ||
| 978 | static READ8_HANDLER( dkong_sh_tune_r ) | |
| 979 | { | |
| 980 | UINT8 *SND = memory_region(REGION_CPU2); | |
| 981 | if ( page & 0x40 ) | |
| 982 | { | |
| 983 | return soundlatch_r(0); | |
| 984 | } | |
| 985 | else | |
| 986 | return (SND[2048+(page & 7)*256+offset]); | |
| 987 | } | |
| 988 | ||
| 989 | #define TSTEP 0.001 | |
| 990 | ||
| 991 | static WRITE8_HANDLER( dkong_sh_p1_w ) | |
| 992 | { | |
| 993 | ||
| 994 | if (has_discrete_interface) | |
| 995 | discrete_sound_w(DS_DAC,data); | |
| 996 | else | |
| 997 | { | |
| 998 | envelope=exp(-tt); | |
| 999 | DAC_data_w(0,(int)(data*envelope)); | |
| 1000 | if (decay) | |
| 1001 | tt+=TSTEP; | |
| 1002 | else | |
| 1003 | tt=0; | |
| 1004 | } | |
| 1005 | } | |
| 1006 | ||
| 1007 | ||
| 1008 | static READ8_HANDLER( radarsc1_sh_p1_r ) | |
| 1009 | { | |
| 934 | 1010 | int r; |
| 935 | ||
| 936 | r = (p[1] & 0x80) | (M58817_status_r(0)<<6); | |
| 937 | //logerror("PA Ret %x\n", r); | |
| 1011 | r = (I8035_P1_R() & 0x80) | (M58817_status_r(0)<<6); | |
| 938 | 1012 | return r; |
| 939 | 1013 | } |
| 940 | 1014 | |
| 941 | WRITE8_HANDLER( radarsc1_sh_p1_w ) | |
| 1015 | static WRITE8_HANDLER( radarsc1_sh_p1_w ) | |
| 942 | 1016 | { |
| 943 | 1017 | M58817_command_w(0,data); |
| 944 | 1018 | } |
| 945 | 1019 | |
| 946 | WRITE8_HANDLER( radarsc1_sh_p2_w ) | |
| 1020 | static WRITE8_HANDLER( radarsc1_sh_p2_w ) | |
| 947 | 1021 | { |
| 948 | 1022 | /* If P2.Bit7 -> external signal decay |
| 949 | 1023 | * If P2.Bit6 -> not connected |
| r1386 | r1387 | |
| 961 | 1035 | radarsc1_ansn_w(0, (data & 0x20) >> 5); |
| 962 | 1036 | } |
| 963 | 1037 | |
| 964 | WRITE8_HANDLER( dkong_sh_p2_w ) | |
| 1038 | static WRITE8_HANDLER( dkong_sh_p2_w ) | |
| 965 | 1039 | { |
| 966 | 1040 | /* If P2.Bit7 -> is apparently an external signal decay or other output control |
| 967 | 1041 | * If P2.Bit6 -> activates the external compressed sample ROM |
| r1386 | r1387 | |
| 977 | 1051 | mcustatus = ((~data & 0x10) >> 4); |
| 978 | 1052 | } |
| 979 | 1053 | |
| 980 | #define ACTIVELOW_PORT_BIT(P,A,D) ((P & (~(1 << A))) | (((D) ^ 1) << A)) | |
| 981 | ||
| 982 | WRITE8_HANDLER( dkong_sh_tuneselect_w ) | |
| 1054 | static READ8_HANDLER( radarsc1_sh_tune_r ) | |
| 983 | 1055 | { |
| 984 | soundlatch_ | |
| 1056 | return soundlatch_r( | |
| 985 | 1057 | } |
| 986 | 1058 | |
| 1059 | ||
| 1060 | /**************************************************************** | |
| 1061 | * | |
| 1062 | * I/O Handlers - global | |
| 1063 | * | |
| 1064 | ****************************************************************/ | |
| 1065 | ||
| 987 | 1066 | WRITE8_HANDLER( dkongjr_sh_test6_w ) |
| 988 | 1067 | { |
| 989 | | |
| 1068 | | |
| 990 | 1069 | } |
| 991 | 1070 | |
| 992 | WRITE8_HANDLER( dkongjr_sh_test5_w ) | |
| 993 | { | |
| 994 | p[2] = ACTIVELOW_PORT_BIT(p[2],5,data); | |
| 995 | } | |
| 996 | 1071 | |
| 997 | WRITE8_HANDLER( dkongjr_sh_test | |
| 1072 | WRITE8_HANDLER( dkongjr_sh_tuneselect | |
| 998 | 1073 | { |
| 999 | | |
| 1074 | soundlatch | |
| 1000 | 1075 | } |
| 1001 | 1076 | |
| 1002 | ||
| 1077 | ||
| 1003 | 1078 | { |
| 1004 | | |
| 1079 | return m | |
| 1005 | 1080 | } |
| 1006 | 1081 | |
| 1007 | ||
| 1008 | WRITE8_HANDLER( dkong_sh_w ) | |
| 1082 | WRITE8_HANDLER( dkong_audio_irq_w ) | |
| 1009 | 1083 | { |
| 1010 | 1084 | if (data) |
| 1011 | 1085 | cpunum_set_input_line(1, 0, ASSERT_LINE); |
| r1386 | r1387 | |
| 1015 | 1089 | |
| 1016 | 1090 | WRITE8_HANDLER( dkong_snd_disc_w ) |
| 1017 | 1091 | { |
| 1092 | dkong_state *state = Machine->driver_data; | |
| 1093 | ||
| 1018 | 1094 | if (!has_discrete_interface && (offset<3)) |
| 1019 | 1095 | { |
| 1020 | 1096 | logerror("dkong.c: Write to snd port %d (%d)\n", offset, data); |
| r1386 | r1387 | |
| 1033 | 1109 | radarscp_snd02_w(0, data & 1); |
| 1034 | 1110 | break; |
| 1035 | 1111 | case 3: |
| 1036 | p[2] = ACTIVELOW_PORT_BIT(p[2],5,data); | |
| 1112 | if (state->hardware_type == HARDWARE_TRS01) | |
| 1113 | //SOUND3 ==> PA7 | |
| 1114 | I8035_P1_W_AL(7,data & 1); | |
| 1115 | else | |
| 1116 | I8035_P2_W_AL(5,data & 1); | |
| 1037 | 1117 | break; |
| 1038 | 1118 | case 4: |
| 1039 | | |
| 1119 | I8035_T_W_AL(1, | |
| 1040 | 1120 | break; |
| 1041 | 1121 | case 5: |
| 1042 | | |
| 1122 | I8035_T_W_AL(0, | |
| 1043 | 1123 | break; |
| 1044 | 1124 | case 6: |
| 1045 | 1125 | if (has_discrete_interface) |
| r1386 | r1387 | |
| 1049 | 1129 | if (has_discrete_interface) |
| 1050 | 1130 | discrete_sound_w(DS_SOUND7_INP,data & 1); |
| 1051 | 1131 | break; |
| 1052 | } | |
| 1132 | } | |
| 1053 | 1133 | return; |
| 1054 | 1134 | } |
| 1055 | 1135 | |
| 1056 | WRITE8_HANDLER( | |
| 1136 | WRITE8_HANDLER( | |
| 1057 | 1137 | { |
| 1058 | if (!has_discrete_interface && (offset<3)) | |
| 1059 | { | |
| 1060 | logerror("dkong.c: Write to snd port %d (%d)\n", offset, data); | |
| 1061 | if (offset == 2) | |
| 1062 | radarscp_snd02_w(0, data & 1); | |
| 1063 | return; | |
| 1064 | } | |
| 1065 | switch (offset) | |
| 1066 | { | |
| 1067 | case 0: | |
| 1068 | discrete_sound_w(DS_SOUND0_INP,data & 1); | |
| 1069 | break; | |
| 1070 | case 1: | |
| 1071 | discrete_sound_w(DS_SOUND1_INP,data & 1); | |
| 1072 | break; | |
| 1073 | case 2: | |
| 1074 | discrete_sound_w(DS_SOUND2_INP,data & 1); | |
| 1075 | radarscp_snd02_w(0, data & 1); | |
| 1076 | break; | |
| 1077 | case 3: //SOUND3 ==> PA7 | |
| 1078 | p[1] = ACTIVELOW_PORT_BIT(p[1],7,data & 1); | |
| 1079 | break; | |
| 1080 | case 4: | |
| 1081 | t[1] = ~data & 1; | |
| 1082 | break; | |
| 1083 | case 5: | |
| 1084 | t[0] = ~data & 1; | |
| 1085 | break; | |
| 1086 | case 6: | |
| 1087 | if (has_discrete_interface) | |
| 1088 | discrete_sound_w(DS_SOUND6_INP,data & 1); | |
| 1089 | break; | |
| 1090 | case 7: | |
| 1091 | if (has_discrete_interface) | |
| 1092 | discrete_sound_w(DS_SOUND7_INP,data & 1); | |
| 1093 | break; | |
| 1094 | } | |
| 1095 | return; | |
| 1138 | soundlatch_w(offset,data ^ 0x0f); | |
| 1096 | 1139 | } |
| 1097 | 1140 | |
| 1098 | READ8_HANDLER( dkong_in2_r ) | |
| 1099 | { | |
| 1100 | return input_port_2_r(offset) | (mcustatus << 6); | |
| 1101 | } | |
| 1102 | ||
| 1103 | 1141 | WRITE8_HANDLER( dkongjr_snd_w1 ) |
| 1104 | 1142 | { |
| 1105 | 1143 | static const int sample_order[7] = {1,2,1,2,0,1,0}; |
| r1386 | r1387 | |
| 1123 | 1161 | } |
| 1124 | 1162 | break; |
| 1125 | 1163 | case 1: /* jump */ |
| 1126 | if (data) | |
| 1127 | sample_start (6,0,0); | |
| 1164 | if (data) | |
| 1165 | sample_start (6,0,0); | |
| 1128 | 1166 | break; |
| 1129 | 1167 | case 2: /* land */ |
| 1130 | 1168 | if (data) |
| r1386 | r1387 | |
| 1136 | 1174 | sample_start (7,2,0); |
| 1137 | 1175 | break; |
| 1138 | 1176 | case 4: /* Port 4 write */ |
| 1139 | | |
| 1177 | I8035_T_W_AL(1, | |
| 1140 | 1178 | break; |
| 1141 | 1179 | case 5: /* Port 5 write */ |
| 1142 | | |
| 1180 | I8 | |
| 1143 | 1181 | break; |
| 1144 | 1182 | case 6: /* snapjaw */ |
| 1145 | 1183 | if (data) |
| r1386 | r1387 | |
| 1173 | 1211 | dkongjr_latch[offset+8] = data; |
| 1174 | 1212 | } |
| 1175 | 1213 | } |
| 1214 | ||
| 1215 | ||
| 1216 | ||
| 1217 | /************************************* | |
| 1218 | * | |
| 1219 | * Sound CPU memory handlers | |
| 1220 | * | |
| 1221 | *************************************/ | |
| 1222 | ||
| 1223 | static ADDRESS_MAP_START( dkong_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1224 | AM_RANGE(0x0000, 0x0fff) AM_ROM | |
| 1225 | ADDRESS_MAP_END | |
| 1226 | ||
| 1227 | static ADDRESS_MAP_START( dkong_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 1228 | AM_RANGE(0x00, 0xff) AM_READ(dkong_sh_tune_r) | |
| 1229 | AM_RANGE(I8039_bus, I8039_bus) AM_READ(dkong_sh_tune_r) | |
| 1230 | AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(dkong_sh_p1_r, dkong_sh_p1_w) | |
| 1231 | AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, dkong_sh_p2_w) | |
| 1232 | AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r) | |
| 1233 | AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r) | |
| 1234 | ADDRESS_MAP_END | |
| 1235 | ||
| 1236 | static ADDRESS_MAP_START( radarsc1_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 1237 | AM_RANGE(0x00, 0xff) AM_READ(radarsc1_sh_tune_r) | |
| 1238 | AM_RANGE(0x00, 0xff) AM_WRITE(dkong_sh_p1_w) // DAC here | |
| 1239 | AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(radarsc1_sh_p1_r, radarsc1_sh_p1_w) | |
| 1240 | AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, radarsc1_sh_p2_w) | |
| 1241 | AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r) | |
| 1242 | AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r) | |
| 1243 | ADDRESS_MAP_END | |
| 1244 | ||
| 1245 | static ADDRESS_MAP_START( dkong3_sound1_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1246 | AM_RANGE(0x0000, 0x01ff) AM_RAM | |
| 1247 | AM_RANGE(0x4016, 0x4016) AM_READ(soundlatch_r) // overwrite default | |
| 1248 | AM_RANGE(0x4017, 0x4017) AM_READ(soundlatch2_r) | |
| 1249 | AM_RANGE(0x4000, 0x4017) AM_READ(NESPSG_0_r) | |
| 1250 | AM_RANGE(0x4000, 0x4017) AM_WRITE(NESPSG_0_w) | |
| 1251 | AM_RANGE(0xe000, 0xffff) AM_ROM | |
| 1252 | ADDRESS_MAP_END | |
| 1253 | ||
| 1254 | static ADDRESS_MAP_START( dkong3_sound2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1255 | AM_RANGE(0x0000, 0x01ff) AM_RAM | |
| 1256 | AM_RANGE(0x4016, 0x4016) AM_READ(soundlatch3_r) // overwrite default | |
| 1257 | AM_RANGE(0x4000, 0x4017) AM_READ(NESPSG_1_r) | |
| 1258 | AM_RANGE(0x4000, 0x4017) AM_WRITE(NESPSG_1_w) | |
| 1259 | AM_RANGE(0xe000, 0xffff) AM_ROM | |
| 1260 | ADDRESS_MAP_END | |
| 1261 | ||
| 1262 | /************************************* | |
| 1263 | * | |
| 1264 | * Sound interfaces | |
| 1265 | * | |
| 1266 | *************************************/ | |
| 1267 | ||
| 1268 | static const char *dkongjr_sample_names[] = | |
| 1269 | { | |
| 1270 | "*dkongjr", | |
| 1271 | "jump.wav", | |
| 1272 | "land.wav", | |
| 1273 | "roar.wav", | |
| 1274 | "climb0.wav", | |
| 1275 | "climb1.wav", | |
| 1276 | "climb2.wav", | |
| 1277 | "death.wav", | |
| 1278 | "drop.wav", | |
| 1279 | "walk0.wav", | |
| 1280 | "walk1.wav", | |
| 1281 | "walk2.wav", | |
| 1282 | "snapjaw.wav", | |
| 1283 | 0 /* end of array */ | |
| 1284 | }; | |
| 1285 | ||
| 1286 | static struct Samplesinterface dkongjr_samples_interface = | |
| 1287 | { | |
| 1288 | 8, /* 8 channels */ | |
| 1289 | dkongjr_sample_names | |
| 1290 | }; | |
| 1291 | ||
| 1292 | static const char *radarsc1_sample_names[] = | |
| 1293 | { | |
| 1294 | "*radarsc1", | |
| 1295 | "10.wav", | |
| 1296 | "12.wav", | |
| 1297 | "14.wav", | |
| 1298 | "16.wav", | |
| 1299 | "18.wav", | |
| 1300 | "1A.wav", | |
| 1301 | "1C.wav", | |
| 1302 | "1E.wav", | |
| 1303 | "20.wav", | |
| 1304 | 0 /* end of array */ | |
| 1305 | }; | |
| 1306 | ||
| 1307 | static struct Samplesinterface radarsc1_samples_interface = | |
| 1308 | { | |
| 1309 | 8, /* 8 channels */ | |
| 1310 | radarsc1_sample_names | |
| 1311 | }; | |
| 1312 | ||
| 1313 | static struct NESinterface nes_interface_1 = { REGION_CPU2 }; | |
| 1314 | static struct NESinterface nes_interface_2 = { REGION_CPU3 }; | |
| 1315 | ||
| 1316 | /************************************* | |
| 1317 | * | |
| 1318 | * Machine driver | |
| 1319 | * | |
| 1320 | *************************************/ | |
| 1321 | ||
| 1322 | MACHINE_DRIVER_START( dkong2b_audio ) | |
| 1323 | ||
| 1324 | MDRV_CPU_ADD_TAG("sound", I8035,I8035_CLOCK) | |
| 1325 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0) | |
| 1326 | MDRV_CPU_IO_MAP(dkong_sound_io_map, 0) | |
| 1327 | ||
| 1328 | MDRV_SOUND_START(dkong) | |
| 1329 | MDRV_SOUND_RESET(dkong) | |
| 1330 | ||
| 1331 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1332 | MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0) | |
| 1333 | MDRV_SOUND_CONFIG_DISCRETE(dkong2b) | |
| 1334 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 1335 | ||
| 1336 | MACHINE_DRIVER_END | |
| 1337 | ||
| 1338 | MACHINE_DRIVER_START( radarscp_audio ) | |
| 1339 | ||
| 1340 | MDRV_IMPORT_FROM( dkong2b_audio ) | |
| 1341 | MDRV_SOUND_MODIFY("discrete") | |
| 1342 | MDRV_SOUND_CONFIG_DISCRETE(radarscp) | |
| 1343 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 1344 | ||
| 1345 | MACHINE_DRIVER_END | |
| 1346 | ||
| 1347 | ||
| 1348 | MACHINE_DRIVER_START( radarsc1_audio ) | |
| 1349 | ||
| 1350 | MDRV_IMPORT_FROM( radarscp_audio ) | |
| 1351 | MDRV_CPU_MODIFY("sound") | |
| 1352 | MDRV_CPU_IO_MAP(radarsc1_sound_io_map, 0) | |
| 1353 | ||
| 1354 | MDRV_SOUND_START(radarsc1) | |
| 1355 | MDRV_SOUND_RESET(radarsc1) | |
| 1356 | ||
| 1357 | MDRV_SOUND_ADD(SAMPLES, 0) | |
| 1358 | MDRV_SOUND_CONFIG(radarsc1_samples_interface) | |
| 1359 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 3.0) | |
| 1360 | ||
| 1361 | MACHINE_DRIVER_END | |
| 1362 | ||
| 1363 | MACHINE_DRIVER_START( dkongjr_audio ) | |
| 1364 | ||
| 1365 | MDRV_CPU_ADD(I8035,I8035_CLOCK) | |
| 1366 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0) | |
| 1367 | MDRV_CPU_IO_MAP(dkong_sound_io_map, 0) | |
| 1368 | ||
| 1369 | MDRV_SOUND_START(dkongjr) | |
| 1370 | MDRV_SOUND_RESET(dkong) | |
| 1371 | ||
| 1372 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1373 | MDRV_SOUND_ADD(DAC, 0) | |
| 1374 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55) | |
| 1375 | ||
| 1376 | MDRV_SOUND_ADD(SAMPLES, 0) | |
| 1377 | MDRV_SOUND_CONFIG(dkongjr_samples_interface) | |
| 1378 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 1379 | ||
| 1380 | MACHINE_DRIVER_END | |
| 1381 | ||
| 1382 | MACHINE_DRIVER_START( dkong3_audio ) | |
| 1383 | ||
| 1384 | MDRV_CPU_ADD_TAG("n2a03a", N2A03,N2A03_DEFAULTCLOCK) | |
| 1385 | MDRV_CPU_PROGRAM_MAP(dkong3_sound1_map, 0) | |
| 1386 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) | |
| 1387 | ||
| 1388 | MDRV_CPU_ADD_TAG("n2a03b", N2A03,N2A03_DEFAULTCLOCK) | |
| 1389 | MDRV_CPU_PROGRAM_MAP(dkong3_sound2_map, 0) | |
| 1390 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) | |
| 1391 | ||
| 1392 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1393 | MDRV_SOUND_ADD(NES, N2A03_DEFAULTCLOCK) | |
| 1394 | MDRV_SOUND_CONFIG(nes_interface_1) | |
| 1395 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 1396 | ||
| 1397 | MDRV_SOUND_ADD(NES, N2A03_DEFAULTCLOCK) | |
| 1398 | MDRV_SOUND_CONFIG(nes_interface_2) | |
| 1399 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 1400 | ||
| 1401 | MACHINE_DRIVER_END | |
| 1402 | ||
| 1403 |
| r1386 | r1387 | |
|---|---|---|
| 57 | 57 | return; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | static const char *blockade_sample_names[] = | |
| 60 | static const char *const blockade_sample_names[] = | |
| 61 | 61 | { |
| 62 | 62 | "*blockade", |
| 63 | 63 | "boom.wav", |
| 64 | 64 | 0 |
| 65 | 65 | }; |
| 66 | 66 | |
| 67 | struct Samplesinterface blockade_samples_interface = | |
| 67 | const struct Samplesinterface blockade_samples_interface = | |
| 68 | 68 | { |
| 69 | 69 | 1, /* 1 channel */ |
| 70 | 70 | blockade_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 173 | 173 | |
| 174 | 174 | */ |
| 175 | 175 | |
| 176 | static const char *astrob_sample_names[] = | |
| 176 | static const char *const astrob_sample_names[] = | |
| 177 | 177 | { |
| 178 | 178 | "*astrob", |
| 179 | 179 | "invadr1.wav", /* 0 */ |
| r1386 | r1387 | |
| 196 | 196 | }; |
| 197 | 197 | |
| 198 | 198 | |
| 199 | static struct Samplesinterface astrob_samples_interface = | |
| 199 | static const struct Samplesinterface astrob_samples_interface = | |
| 200 | 200 | { |
| 201 | 201 | 11, |
| 202 | 202 | astrob_sample_names |
| r1386 | r1387 | |
| 397 | 397 | The 4391 output is the final output. |
| 398 | 398 | */ |
| 399 | 399 | |
| 400 | static const char *sega005_sample_names[] = | |
| 400 | static const char *const sega005_sample_names[] = | |
| 401 | 401 | { |
| 402 | 402 | "*005", |
| 403 | 403 | "lexplode.wav", /* 0 */ |
| r1386 | r1387 | |
| 411 | 411 | }; |
| 412 | 412 | |
| 413 | 413 | |
| 414 | static struct Samplesinterface sega005_samples_interface = | |
| 414 | static const struct Samplesinterface sega005_samples_interface = | |
| 415 | 415 | { |
| 416 | 416 | 7, |
| 417 | 417 | sega005_sample_names |
| r1386 | r1387 | |
| 632 | 632 | |
| 633 | 633 | static SOUND_START( spaceod ); |
| 634 | 634 | |
| 635 | static const char *spaceod_sample_names[] = | |
| 635 | static const char *const spaceod_sample_names[] = | |
| 636 | 636 | { |
| 637 | 637 | "*spaceod", |
| 638 | 638 | "fire.wav", /* 0 */ |
| r1386 | r1387 | |
| 650 | 650 | }; |
| 651 | 651 | |
| 652 | 652 | |
| 653 | static struct Samplesinterface spaceod_samples_interface = | |
| 653 | static const struct Samplesinterface spaceod_samples_interface = | |
| 654 | 654 | { |
| 655 | 655 | 11, |
| 656 | 656 | spaceod_sample_names |
| r1386 | r1387 | |
| 766 | 766 | */ |
| 767 | 767 | |
| 768 | 768 | |
| 769 | static const char *monsterb_sample_names[] = | |
| 769 | static const char *const monsterb_sample_names[] = | |
| 770 | 770 | { |
| 771 | 771 | "*monsterb", |
| 772 | 772 | "zap.wav", |
| r1386 | r1387 | |
| 775 | 775 | }; |
| 776 | 776 | |
| 777 | 777 | |
| 778 | static struct Samplesinterface monsterb_samples_interface = | |
| 778 | static const struct Samplesinterface monsterb_samples_interface = | |
| 779 | 779 | { |
| 780 | 780 | 2, |
| 781 | 781 | monsterb_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 8 | 8 | #include "sound/discrete.h" |
| 9 | 9 | |
| 10 | 10 | |
| 11 | static const char *triplhnt_sample_names[] = | |
| 11 | static const char *const triplhnt_sample_names[] = | |
| 12 | 12 | { |
| 13 | 13 | "*triplhnt", |
| 14 | 14 | "bear_rac.wav", |
| r1386 | r1387 | |
| 16 | 16 | 0 |
| 17 | 17 | }; |
| 18 | 18 | |
| 19 | struct Samplesinterface triplhnt_samples_interface = | |
| 19 | const struct Samplesinterface triplhnt_samples_interface = | |
| 20 | 20 | { |
| 21 | 21 | 2, /* 2 channels */ |
| 22 | 22 | triplhnt_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 103 | 103 | cpunum_set_input_line(1,INPUT_LINE_NMI,PULSE_LINE); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | static const char *PhonemeTable[65] = | |
| 106 | static const char *const PhonemeTable[65] = | |
| 107 | 107 | { |
| 108 | 108 | "EH3","EH2","EH1","PA0","DT" ,"A1" ,"A2" ,"ZH", |
| 109 | 109 | "AH2","I3" ,"I2" ,"I1" ,"M" ,"N" ,"B" ,"V", |
| r1386 | r1387 | |
|---|---|---|
| 94 | 94 | /* */ |
| 95 | 95 | /*******************************************************/ |
| 96 | 96 | |
| 97 | static const char *lrescue_sample_names[] = | |
| 97 | static const char *const lrescue_sample_names[] = | |
| 98 | 98 | { |
| 99 | 99 | "*lrescue", |
| 100 | 100 | "alienexplosion.wav", |
| r1386 | r1387 | |
| 109 | 109 | 0 |
| 110 | 110 | }; |
| 111 | 111 | |
| 112 | struct Samplesinterface lrescue_samples_interface = | |
| 112 | const struct Samplesinterface lrescue_samples_interface = | |
| 113 | 113 | { |
| 114 | 114 | 4, /* 4 channels */ |
| 115 | 115 | lrescue_sample_names |
| r1386 | r1387 | |
| 664 | 664 | #define SCHASER_4V SCHASER_HSYNC /2 /4 |
| 665 | 665 | #define SCHASER_8V SCHASER_HSYNC /2 /8 |
| 666 | 666 | |
| 667 | struct SN76477interface schaser_sn76477_interface = | |
| 667 | const struct SN76477interface schaser_sn76477_interface = | |
| 668 | 668 | { |
| 669 | 669 | RES_K( 47), /* 4 noise_res */ |
| 670 | 670 | RES_K(330), /* 5 filter_res */ |
| r1386 | r1387 | |
|---|---|---|
| 115 | 115 | * |
| 116 | 116 | *************************************/ |
| 117 | 117 | |
| 118 | static const char *seawolf_sample_names[] = | |
| 118 | static const char *const seawolf_sample_names[] = | |
| 119 | 119 | { |
| 120 | 120 | "*seawolf", |
| 121 | 121 | "shiphit.wav", |
| r1386 | r1387 | |
| 127 | 127 | }; |
| 128 | 128 | |
| 129 | 129 | |
| 130 | static struct Samplesinterface seawolf_samples_interface = | |
| 130 | static const struct Samplesinterface seawolf_samples_interface = | |
| 131 | 131 | { |
| 132 | 132 | 5, /* 5 channels */ |
| 133 | 133 | seawolf_sample_names |
| r1386 | r1387 | |
| 178 | 178 | * |
| 179 | 179 | *************************************/ |
| 180 | 180 | |
| 181 | static const char *gunfight_sample_names[] = | |
| 181 | static const char *const gunfight_sample_names[] = | |
| 182 | 182 | { |
| 183 | 183 | "*gunfight", |
| 184 | 184 | "gunshot.wav", |
| r1386 | r1387 | |
| 187 | 187 | }; |
| 188 | 188 | |
| 189 | 189 | |
| 190 | static struct Samplesinterface gunfight_samples_interface = | |
| 190 | static const struct Samplesinterface gunfight_samples_interface = | |
| 191 | 191 | { |
| 192 | 192 | 1, /* 1 channel */ |
| 193 | 193 | gunfight_sample_names |
| r1386 | r1387 | |
| 1597 | 1597 | * |
| 1598 | 1598 | *************************************/ |
| 1599 | 1599 | |
| 1600 | static const char *gmissile_sample_names[] = | |
| 1600 | static const char *const gmissile_sample_names[] = | |
| 1601 | 1601 | { |
| 1602 | 1602 | "*gmissile", |
| 1603 | 1603 | "1.wav", /* missle */ |
| r1386 | r1387 | |
| 1606 | 1606 | }; |
| 1607 | 1607 | |
| 1608 | 1608 | |
| 1609 | static struct Samplesinterface gmissile_samples_interface = | |
| 1609 | static const struct Samplesinterface gmissile_samples_interface = | |
| 1610 | 1610 | { |
| 1611 | 1611 | 1, /* 1 channel */ |
| 1612 | 1612 | gmissile_sample_names |
| r1386 | r1387 | |
| 1695 | 1695 | |
| 1696 | 1696 | /* Noise clock was breadboarded and measured at 3760Hz */ |
| 1697 | 1697 | |
| 1698 | static const char *m4_sample_names[] = | |
| 1698 | static const char *const m4_sample_names[] = | |
| 1699 | 1699 | { |
| 1700 | 1700 | "*m4", |
| 1701 | 1701 | "1.wav", /* missle */ |
| r1386 | r1387 | |
| 1704 | 1704 | }; |
| 1705 | 1705 | |
| 1706 | 1706 | |
| 1707 | static struct Samplesinterface m4_samples_interface = | |
| 1707 | static const struct Samplesinterface m4_samples_interface = | |
| 1708 | 1708 | { |
| 1709 | 1709 | 2, /* 2 channels */ |
| 1710 | 1710 | m4_sample_names |
| r1386 | r1387 | |
| 1985 | 1985 | DISCRETE_SOUND_END |
| 1986 | 1986 | |
| 1987 | 1987 | |
| 1988 | static const char *clowns_sample_names[] = | |
| 1988 | static const char *const clowns_sample_names[] = | |
| 1989 | 1989 | { |
| 1990 | 1990 | "*clowns", |
| 1991 | 1991 | "miss.wav", |
| 1992 | 1992 | 0 |
| 1993 | 1993 | }; |
| 1994 | 1994 | |
| 1995 | static struct Samplesinterface clowns_samples_interface = | |
| 1995 | static const struct Samplesinterface clowns_samples_interface = | |
| 1996 | 1996 | { |
| 1997 | 1997 | 1, /* 1 channel */ |
| 1998 | 1998 | clowns_sample_names |
| r1386 | r1387 | |
| 2177 | 2177 | * Apr 2007, D.R. |
| 2178 | 2178 | *************************************/ |
| 2179 | 2179 | |
| 2180 | static struct SN76477interface spcenctr_sn76477_interface = | |
| 2180 | static const struct SN76477interface spcenctr_sn76477_interface = | |
| 2181 | 2181 | { |
| 2182 | 2182 | 0, /* 4 noise_res (N/C) */ |
| 2183 | 2183 | 0, /* 5 filter_res (N/C) */ |
| r1386 | r1387 | |
| 2750 | 2750 | * |
| 2751 | 2751 | *************************************/ |
| 2752 | 2752 | |
| 2753 | static const char *phantom2_sample_names[] = | |
| 2753 | static const char *const phantom2_sample_names[] = | |
| 2754 | 2754 | { |
| 2755 | 2755 | "*phantom2", |
| 2756 | 2756 | "1.wav", /* shot */ |
| r1386 | r1387 | |
| 2759 | 2759 | }; |
| 2760 | 2760 | |
| 2761 | 2761 | |
| 2762 | static struct Samplesinterface phantom2_samples_interface = | |
| 2762 | static const struct Samplesinterface phantom2_samples_interface = | |
| 2763 | 2763 | { |
| 2764 | 2764 | 2, /* 2 channels */ |
| 2765 | 2765 | phantom2_sample_names |
| r1386 | r1387 | |
| 2993 | 2993 | * |
| 2994 | 2994 | *************************************/ |
| 2995 | 2995 | |
| 2996 | static struct SN76477interface invaders_sn76477_interface = | |
| 2996 | static const struct SN76477interface invaders_sn76477_interface = | |
| 2997 | 2997 | { |
| 2998 | 2998 | 0, /* 4 noise_res (N/C) */ |
| 2999 | 2999 | 0, /* 5 filter_res (N/C) */ |
| r1386 | r1387 | |
| 3022 | 3022 | |
| 3023 | 3023 | |
| 3024 | 3024 | |
| 3025 | static const char *invaders_sample_names[] = | |
| 3025 | static const char *const invaders_sample_names[] = | |
| 3026 | 3026 | { |
| 3027 | 3027 | "*invaders", |
| 3028 | 3028 | "1.wav", /* shot/missle */ |
| r1386 | r1387 | |
| 3038 | 3038 | }; |
| 3039 | 3039 | |
| 3040 | 3040 | |
| 3041 | static struct Samplesinterface invaders_samples_interface = | |
| 3041 | static const struct Samplesinterface invaders_samples_interface = | |
| 3042 | 3042 | { |
| 3043 | 3043 | 6, /* 6 channels */ |
| 3044 | 3044 | invaders_sample_names |
| r1386 | r1387 | |
| 3816 | 3816 | * |
| 3817 | 3817 | *************************************/ |
| 3818 | 3818 | |
| 3819 | static struct SN76477interface invad2ct_p1_sn76477_interface = | |
| 3819 | static const struct SN76477interface invad2ct_p1_sn76477_interface = | |
| 3820 | 3820 | { |
| 3821 | 3821 | 0, /* 4 noise_res (N/C) */ |
| 3822 | 3822 | 0, /* 5 filter_res (N/C) */ |
| r1386 | r1387 | |
| 3844 | 3844 | }; |
| 3845 | 3845 | |
| 3846 | 3846 | |
| 3847 | static struct SN76477interface invad2ct_p2_sn76477_interface = | |
| 3847 | static const struct SN76477interface invad2ct_p2_sn76477_interface = | |
| 3848 | 3848 | { |
| 3849 | 3849 | 0, /* 4 noise_res (N/C) */ |
| 3850 | 3850 | 0, /* 5 filter_res (N/C) */ |
| r1386 | r1387 | |
|---|---|---|
| 35 | 35 | }; |
| 36 | 36 | |
| 37 | 37 | /* waveforms for the audio hardware */ |
| 38 | static INT16 waveform1[32] = | |
| 38 | static const INT16 waveform1[32] = | |
| 39 | 39 | { |
| 40 | 40 | /* sine-wave */ |
| 41 | 41 | 0x0F0F, 0x0F0F, 0x0F0F, 0x0606, 0x0606, 0x0909, 0x0909, 0x0606, 0x0606, 0x0909, 0x0606, 0x0D0D, 0x0F0F, 0x0F0F, 0x0D0D, 0x0000, |
| r1386 | r1387 | |
|---|---|---|
| 180 | 180 | |
| 181 | 181 | #define VICTNINE_MCU_SEED (memory_region(REGION_CPU1)[0xE685]) |
| 182 | 182 | |
| 183 | static UINT8 victnine_mcu_data[0x100] = | |
| 183 | static const UINT8 victnine_mcu_data[0x100] = | |
| 184 | 184 | { |
| 185 | 185 | 0x3e, 0x08, 0xdd, 0x29, 0xcb, 0x14, 0xfd, 0x29, |
| 186 | 186 | 0xcb, 0x15, 0xd9, 0x29, 0xd9, 0x30, 0x0d, 0xd9, |
| r1386 | r1387 | |
|---|---|---|
| 107 | 107 | int bitmask; |
| 108 | 108 | |
| 109 | 109 | res=readinputport(1); |
| 110 | bitmask = (1 << offset); | |
| 110 | bitmask = (1 << (offset & 0x7)); | |
| 111 | 111 | |
| 112 | 112 | if (res & bitmask) |
| 113 | 113 | res = 0x80; |
| r1386 | r1387 | |
| 186 | 186 | |
| 187 | 187 | if (avgdvg_done()) |
| 188 | 188 | res |= 0x01; |
| 189 | else | |
| 190 | res &= ~0x01; | |
| 191 | ||
| 189 | 192 | if (activecpu_gettotalcycles() & 0x100) |
| 190 | 193 | res |= 0x40; |
| 194 | else | |
| 195 | res &= ~0x40; | |
| 191 | 196 | |
| 192 | 197 | return res; |
| 193 | 198 | } |
| r1386 | r1387 | |
|---|---|---|
| 676 | 676 | |
| 677 | 677 | void leland_init_eeprom(UINT8 default_val, const UINT16 *data, UINT8 serial_offset, UINT8 serial_type) |
| 678 | 678 | { |
| 679 | static struct EEPROM_interface eeprom_interface = | |
| 679 | static const struct EEPROM_interface eeprom_interface = | |
| 680 | 680 | { |
| 681 | 681 | 6, |
| 682 | 682 | 16, |
| r1386 | r1387 | |
| 769 | 769 | |
| 770 | 770 | void ataxx_init_eeprom(UINT8 default_val, const UINT16 *data, UINT8 serial_offset) |
| 771 | 771 | { |
| 772 | static struct EEPROM_interface eeprom_interface = | |
| 772 | static const struct EEPROM_interface eeprom_interface = | |
| 773 | 773 | { |
| 774 | 774 | 7, |
| 775 | 775 | 16, |
| r1386 | r1387 | |
|---|---|---|
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | |
| 291 | static ppi8255_interface ppi8255_intf = | |
| 291 | static const ppi8255_interface ppi8255_intf = | |
| 292 | 292 | { |
| 293 | 293 | 2, /* 2 chips */ |
| 294 | 294 | {input_port_0_r, 0}, /* Port A read */ |
| r1386 | r1387 | |
| 300 | 300 | }; |
| 301 | 301 | |
| 302 | 302 | /* extra chip for sample latch */ |
| 303 | static ppi8255_interface sfx_ppi8255_intf = | |
| 303 | static const ppi8255_interface sfx_ppi8255_intf = | |
| 304 | 304 | { |
| 305 | 305 | 3, /* 3 chips */ |
| 306 | 306 | {input_port_0_r, 0, soundlatch2_r}, /* Port A read */ |
| r1386 | r1387 | |
| 312 | 312 | }; |
| 313 | 313 | |
| 314 | 314 | /* extra chip for sample latch */ |
| 315 | static ppi8255_interface monsterz_ppi8255_intf = | |
| 315 | static const ppi8255_interface monsterz_ppi8255_intf = | |
| 316 | 316 | { |
| 317 | 317 | 3, /* 3 chips */ |
| 318 | 318 | {input_port_0_r, 0, 0}, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 17 | 17 | // MCU executed command: 4300 0100 - factory settings |
| 18 | 18 | // this command is issued whenever the nvram settings are corrupted |
| 19 | 19 | // the MCU writes directly to NVRAM |
| 20 | static UINT16 bonkadv_mcu_43[] = { | |
| 20 | static const UINT16 bonkadv_mcu_43[] = { | |
| 21 | 21 | 0x8BE0,0x8E71,0x0102,0x0102,0x0300,0x010C,0x0202,0x0202, |
| 22 | 22 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, |
| 23 | 23 | 0x0030,0x0020,0x4F6B,0x0305,0x0000,0x0000,0x0000,0x0000, |
| r1386 | r1387 | |
| 40 | 40 | 200E0E: 7E7F moveq #$7f, D7 |
| 41 | 41 | 200E10: 4E75 rts |
| 42 | 42 | */ |
| 43 | static UINT16 bonkadv_mcu_4_34[] = { | |
| 43 | static const UINT16 bonkadv_mcu_4_34[] = { | |
| 44 | 44 | 0x7071,0x7273,0x7475,0x7677,0x7879,0x7a7b,0x7c7d,0x7e7f, |
| 45 | 45 | 0x4e75 |
| 46 | 46 | }; |
| 47 | 47 | // MCU executed command: 0400 0180 0032 - 128 bytes at $200180 |
| 48 | static UINT16 bonkadv_mcu_4_32[] = { | |
| 48 | static const UINT16 bonkadv_mcu_4_32[] = { | |
| 49 | 49 | 0x00cc,0xcc0c,0xc0c0,0xc080,0x0484,0xb6a6,0x0404,0x80c0, |
| 50 | 50 | 0x80b1,0xb1a1,0xa1b2,0xa2b3,0xb3a3,0xa3b1,0xb1b1,0xb1c0, |
| 51 | 51 | 0xc0a1,0xa1a1,0xa1b2,0xb2a2,0xa290,0x9090,0xb9b9,0xa9a9, |
| r1386 | r1387 | |
| 56 | 56 | 0xc0c0,0xa1a1,0xa1a1,0xb2b2,0xa2a2,0x9090,0x9000,0x0000 |
| 57 | 57 | }; |
| 58 | 58 | // MCU executed command: 0400 0280 0031 - 112 bytes at $200280 |
| 59 | static UINT16 bonkadv_mcu_4_31[] = { | |
| 59 | static const UINT16 bonkadv_mcu_4_31[] = { | |
| 60 | 60 | 0x1013,0x1411,0x1216,0x1519,0x1a17,0x1824,0x2322,0x211f, |
| 61 | 61 | 0x201e,0x1d1c,0x1b27,0x2825,0x2629,0x2a2b,0x2e2f,0x2c2d, |
| 62 | 62 | 0x3130,0x3435,0x3233,0x3f3e,0x3d3c,0x3a3b,0x3938,0x3736, |
| r1386 | r1387 | |
| 66 | 66 | 0x7071,0x6f6e,0x6d6c,0x7879,0x7677,0x7a7b,0x7c7d,0x7e7f |
| 67 | 67 | }; |
| 68 | 68 | // MCU executed command: 0400 0E50 0030 - 655 bytes at $200E50 (656 here) |
| 69 | static UINT16 bonkadv_mcu_4_30[] = { | |
| 69 | static const UINT16 bonkadv_mcu_4_30[] = { | |
| 70 | 70 | 0x8c00,0x9700,0xa000,0xa700,0xb200,0xb700,0xc000,0xcc00, |
| 71 | 71 | 0xd600,0xdf00,0xef00,0xf500,0xfd00,0x0501,0x0b01,0x1801, |
| 72 | 72 | 0x1e01,0x2901,0x3101,0x3701,0x4101,0x4901,0x0b01,0x5d01, |
| r1386 | r1387 | |
| 112 | 112 | 0xff00,0x0005,0x2495,0x96ff,0x0000,0x009a,0xff00,0x0000 |
| 113 | 113 | }; |
| 114 | 114 | // MCU executed command: 0400 0400 0033 - 2560 bytes at $200400 |
| 115 | static UINT16 bonkadv_mcu_4_33[] = { | |
| 115 | static const UINT16 bonkadv_mcu_4_33[] = { | |
| 116 | 116 | 0x00a4,0x0001,0x00a5,0x005a,0x00a6,0x0074,0x00a7,0x009b, |
| 117 | 117 | 0x00a8,0x00d0,0x00a9,0x00fe,0x00aa,0x015d,0x00ab,0x01b0, |
| 118 | 118 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, |
| r1386 | r1387 | |
| 285 | 285 | }; |
| 286 | 286 | // dynamic, per-level (29), in level order |
| 287 | 287 | // PC=078896 : MCU executed command: 0400 0300 00xx - xx = subcmd |
| 288 | static UINT16 bonkadv_mcu_4_00[] = { 0x0000,0x04C0,0x0000,0x0100,0x0600,0x0100 }; | |
| 289 | static UINT16 bonkadv_mcu_4_02[] = { 0x0000,0x0760,0x0000,0x0100,0x0270,0x0100,0x0320,0x01B0, | |
| 288 | static const UINT16 bonkadv_mcu_4_00[] = { 0x0000,0x04C0,0x0000,0x0100,0x0600,0x0100 }; | |
| 289 | static const UINT16 bonkadv_mcu_4_02[] = { 0x0000,0x0760,0x0000,0x0100,0x0270,0x0100,0x0320,0x01B0, | |
| 290 | 290 | 0x0460,0x01B0,0x0510,0x0100,0x05E0,0x0100,0x0620,0x0120, |
| 291 | 291 | 0x08A0,0x0120 }; |
| 292 | static UINT16 bonkadv_mcu_4_01[] = { 0x0000,0x0670,0x0000,0x0100,0x0200,0x0100,0x02E0,0x0090, | |
| 292 | static const UINT16 bonkadv_mcu_4_01[] = { 0x0000,0x0670,0x0000,0x0100,0x0200,0x0100,0x02E0,0x0090, | |
| 293 | 293 | 0x0400,0x0090,0x04E0,0x0100,0x07B0,0x0100 }; |
| 294 | static UINT16 bonkadv_mcu_4_05[] = { 0x0000,0x0610,0x0000,0x0100,0x0750,0x0100 }; | |
| 295 | static UINT16 bonkadv_mcu_4_07[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 }; | |
| 296 | static UINT16 bonkadv_mcu_4_06[] = { 0x0000,0x05F0,0x0000,0x0100,0x0730,0x0100 }; | |
| 297 | static UINT16 bonkadv_mcu_4_09[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 298 | static UINT16 bonkadv_mcu_4_0D[] = { 0x0000,0x07A0,0x0000,0x0100,0x08E0,0x0100 }; | |
| 299 | static UINT16 bonkadv_mcu_4_03[] = { 0x0000,0x0920,0x0000,0x0100,0x0A60,0x0100 }; | |
| 300 | static UINT16 bonkadv_mcu_4_08[] = { 0x0000,0x0730,0x0000,0x0100,0x0870,0x0100 }; | |
| 301 | static UINT16 bonkadv_mcu_4_04[] = { 0x0000,0x05C0,0x0000,0x0100,0x0200,0x0100,0x0280,0x00C0, | |
| 294 | static const UINT16 bonkadv_mcu_4_05[] = { 0x0000,0x0610,0x0000,0x0100,0x0750,0x0100 }; | |
| 295 | static const UINT16 bonkadv_mcu_4_07[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 }; | |
| 296 | static const UINT16 bonkadv_mcu_4_06[] = { 0x0000,0x05F0,0x0000,0x0100,0x0730,0x0100 }; | |
| 297 | static const UINT16 bonkadv_mcu_4_09[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 298 | static const UINT16 bonkadv_mcu_4_0D[] = { 0x0000,0x07A0,0x0000,0x0100,0x08E0,0x0100 }; | |
| 299 | static const UINT16 bonkadv_mcu_4_03[] = { 0x0000,0x0920,0x0000,0x0100,0x0A60,0x0100 }; | |
| 300 | static const UINT16 bonkadv_mcu_4_08[] = { 0x0000,0x0730,0x0000,0x0100,0x0870,0x0100 }; | |
| 301 | static const UINT16 bonkadv_mcu_4_04[] = { 0x0000,0x05C0,0x0000,0x0100,0x0200,0x0100,0x0280,0x00C0, | |
| 302 | 302 | 0x02E0,0x0060,0x03A0,0x0000,0x0700,0x0000 }; |
| 303 | static UINT16 bonkadv_mcu_4_0C[] = { 0x0000,0x06E0,0x0000,0x0100,0x0820,0x0100 }; | |
| 304 | static UINT16 bonkadv_mcu_4_0A[] = { 0x0000,0x05A0,0x0000,0x0100,0x06E0,0x0100 }; | |
| 305 | static UINT16 bonkadv_mcu_4_0B[] = { 0x0000,0x0470,0x0000,0x0100,0x05B0,0x0100 }; | |
| 306 | static UINT16 bonkadv_mcu_4_10[] = { 0x0000,0x06C0,0x0000,0x0100,0x03B0,0x0100,0x0460,0x0050, | |
| 303 | static const UINT16 bonkadv_mcu_4_0C[] = { 0x0000,0x06E0,0x0000,0x0100,0x0820,0x0100 }; | |
| 304 | static const UINT16 bonkadv_mcu_4_0A[] = { 0x0000,0x05A0,0x0000,0x0100,0x06E0,0x0100 }; | |
| 305 | static const UINT16 bonkadv_mcu_4_0B[] = { 0x0000,0x0470,0x0000,0x0100,0x05B0,0x0100 }; | |
| 306 | static const UINT16 bonkadv_mcu_4_10[] = { 0x0000,0x06C0,0x0000,0x0100,0x03B0,0x0100,0x0460,0x0050, | |
| 307 | 307 | 0x05E0,0x0050,0x0650,0xFFE0,0x0800,0xFFE0 }; |
| 308 | static UINT16 bonkadv_mcu_4_0E[] = { 0x0000,0x0630,0x0000,0x0100,0x0770,0x0100 }; | |
| 309 | static UINT16 bonkadv_mcu_4_13[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 310 | static UINT16 bonkadv_mcu_4_0F[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 311 | static UINT16 bonkadv_mcu_4_11[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 312 | static UINT16 bonkadv_mcu_4_14[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 313 | static UINT16 bonkadv_mcu_4_12[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 314 | static UINT16 bonkadv_mcu_4_17[] = { 0x0000,0x0520,0x0000,0x0100,0x0660,0x0100 }; | |
| 315 | static UINT16 bonkadv_mcu_4_1A[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 }; | |
| 316 | static UINT16 bonkadv_mcu_4_15[] = { 0x0000,0x02C0,0x0000,0x0100,0x0400,0x0100 }; | |
| 317 | static UINT16 bonkadv_mcu_4_18[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 }; | |
| 318 | static UINT16 bonkadv_mcu_4_16[] = { 0x0000,0x02F0,0x0000,0x0100,0x0430,0x0100 }; | |
| 319 | static UINT16 bonkadv_mcu_4_19[] = { 0x0000,0x03A0,0x0000,0x0100,0x04E0,0x0100 }; | |
| 320 | static UINT16 bonkadv_mcu_4_1B[] = { 0x0000,0x0460,0x0000,0x0100,0x05A0,0x0100 }; | |
| 321 | static UINT16 bonkadv_mcu_4_1C[] = { 0x0000,0x02C0,0x0000,0x0100,0x0400,0x0100 }; | |
| 308 | static const UINT16 bonkadv_mcu_4_0E[] = { 0x0000,0x0630,0x0000,0x0100,0x0770,0x0100 }; | |
| 309 | static const UINT16 bonkadv_mcu_4_13[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 310 | static const UINT16 bonkadv_mcu_4_0F[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 311 | static const UINT16 bonkadv_mcu_4_11[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 312 | static const UINT16 bonkadv_mcu_4_14[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 313 | static const UINT16 bonkadv_mcu_4_12[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 }; | |
| 314 | static const UINT16 bonkadv_mcu_4_17[] = { 0x0000,0x0520,0x0000,0x0100,0x0660,0x0100 }; | |
| 315 | static const UINT16 bonkadv_mcu_4_1A[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 }; | |
| 316 | static const UINT16 bonkadv_mcu_4_15[] = { 0x0000,0x02C0,0x0000,0x0100,0x0400,0x0100 }; | |
| 317 | static const UINT16 bonkadv_mcu_4_18[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 }; | |
| 318 | static const UINT16 bonkadv_mcu_4_16[] = { 0x0000,0x02F0,0x0000,0x0100,0x0430,0x0100 }; | |
| 319 | static const UINT16 bonkadv_mcu_4_19[] = { 0x0000,0x03A0,0x0000,0x0100,0x04E0,0x0100 }; | |
| 320 | static const UINT16 bonkadv_mcu_4_1B[] = { 0x0000,0x0460,0x0000,0x0100,0x05A0,0x0100 }; | |
| 321 | static const UINT16 bonkadv_mcu_4_1C[] = { 0x0000,0x02C0,0x0000,0x0100,0x0400,0x0100 }; | |
| 322 | 322 | |
| 323 | 323 | |
| 324 | 324 | /*************************************************************************** |
| r1386 | r1387 | |
| 336 | 336 | // fighter: order is unclear - cmd 26 is probably the last (ends with 0xff) |
| 337 | 337 | |
| 338 | 338 | // --- unknown data --- |
| 339 | static UINT16 bloodwar_mcu_4_01[] = { 0x00E6,0x00C6,0x00E8,0x00D0,0xFC9A,0x05C0,0x0F00,0x08C0, // Warrior 1 | |
| 339 | static const UINT16 bloodwar_mcu_4_01[] = { 0x00E6,0x00C6,0x00E8,0x00D0,0xFC9A,0x05C0,0x0F00,0x08C0, // Warrior 1 | |
| 340 | 340 | 0x0001,0x0120,0x0090,0x021B,0x00B4,0x0094,0x00AC,0x0094 }; |
| 341 | static UINT16 bloodwar_mcu_4_02[] = { 0x00B4,0x0094,0x00AC,0x0094,0xFCD2,0x03C0,0x1000,0x0900, // Warrior 2 | |
| 341 | static const UINT16 bloodwar_mcu_4_02[] = { 0x00B4,0x0094,0x00AC,0x0094,0xFCD2,0x03C0,0x1000,0x0900, // Warrior 2 | |
| 342 | 342 | 0x0001,0x0100,0x0080,0x0118,0x00F0,0x00D0,0x00F4,0x00DC }; |
| 343 | static UINT16 bloodwar_mcu_4_03[] = { 0x00F0,0x00D0,0x00F4,0x00DC,0xFC90,0x03C0,0x0C00,0x0CC0, // Warrior 3 | |
| 343 | static const UINT16 bloodwar_mcu_4_03[] = { 0x00F0,0x00D0,0x00F4,0x00DC,0xFC90,0x03C0,0x0C00,0x0CC0, // Warrior 3 | |
| 344 | 344 | 0x0001,0x0200,0x0100,0x0930,0x00D2,0x00B2,0x00CA,0x00B0 }; |
| 345 | static UINT16 bloodwar_mcu_4_04[] = { 0x00D2,0x00B2,0x00CA,0x00B0,0xFCB5,0x05C0,0x1000,0x0C00, // Warrior 4 | |
| 345 | static const UINT16 bloodwar_mcu_4_04[] = { 0x00D2,0x00B2,0x00CA,0x00B0,0xFCB5,0x05C0,0x1000,0x0C00, // Warrior 4 | |
| 346 | 346 | 0x0001,0x0140,0x00A0,0x031E,0x00A0,0x0080,0x00DC,0x00C4 }; |
| 347 | static UINT16 bloodwar_mcu_4_05[] = { 0x00A0,0x0080,0x00DC,0x00C4,0xFCA2,0x05C0,0x0AC0,0x0880, // Warrior 5 | |
| 347 | static const UINT16 bloodwar_mcu_4_05[] = { 0x00A0,0x0080,0x00DC,0x00C4,0xFCA2,0x05C0,0x0AC0,0x0880, // Warrior 5 | |
| 348 | 348 | 0x0001,0x01A0,0x00D0,0x0627,0x00BE,0x009E,0x00C2,0x00A8 }; |
| 349 | static UINT16 bloodwar_mcu_4_06[] = { 0x00BE,0x009E,0x00C2,0x00A8,0xFCBF,0x04C0,0x1100,0x0C00, // Warrior 6 | |
| 349 | static const UINT16 bloodwar_mcu_4_06[] = { 0x00BE,0x009E,0x00C2,0x00A8,0xFCBF,0x04C0,0x1100,0x0C00, // Warrior 6 | |
| 350 | 350 | 0x0001,0x0180,0x00C0,0x0524,0x00C8,0x00A8,0x00D6,0x009C }; |
| 351 | static UINT16 bloodwar_mcu_4_07[] = { 0x00C8,0x00A8,0x00D6,0x009C,0xFCC8,0x05C0,0x0F40,0x0CC0, // Warrior 7 | |
| 351 | static const UINT16 bloodwar_mcu_4_07[] = { 0x00C8,0x00A8,0x00D6,0x009C,0xFCC8,0x05C0,0x0F40,0x0CC0, // Warrior 7 | |
| 352 | 352 | 0x0001,0x0160,0x00B0,0x0421,0x00AA,0x008A,0x00A0,0x0086 }; |
| 353 | static UINT16 bloodwar_mcu_4_08[] = { 0x00AA,0x008A,0x00A0,0x0086,0xFCDB,0x05C0,0x1380,0x0F80, // Warrior 8 | |
| 353 | static const UINT16 bloodwar_mcu_4_08[] = { 0x00AA,0x008A,0x00A0,0x0086,0xFCDB,0x05C0,0x1380,0x0F80, // Warrior 8 | |
| 354 | 354 | 0x0000,0x01E0,0x00F0,0x082D,0x00DC,0x00BC,0x00D6,0x00BC }; |
| 355 | static UINT16 bloodwar_mcu_4_09[] = { 0x00DC,0x00BC,0x00D6,0x00BC,0xFCAC,0x04C0,0x10C0,0x1000, // Warrior 9 | |
| 355 | static const UINT16 bloodwar_mcu_4_09[] = { 0x00DC,0x00BC,0x00D6,0x00BC,0xFCAC,0x04C0,0x10C0,0x1000, // Warrior 9 | |
| 356 | 356 | 0x0001,0x01C0,0x00E0,0x072A,0xFF08,0xFF02,0x0000,0xFF03 }; |
| 357 | 357 | |
| 358 | 358 | // --- palette data --- |
| 359 | 359 | // number of palettes (>=1) |
| 360 | 360 | // palette data follows (each palette is 0x200 bytes long) |
| 361 | 361 | // a negative word will end the palette |
| 362 | static UINT16 bloodwar_mcu_4_0a[] = { // Warrior 1 Player 1 | |
| 362 | static const UINT16 bloodwar_mcu_4_0a[] = { // Warrior 1 Player 1 | |
| 363 | 363 | 0x000B,0x0000,0x4232,0x56F8,0x2D8D,0x27FF,0x3BFF,0x53FF, |
| 364 | 364 | 0x63FF,0x381F,0x4C1F,0x581F,0x6C1F,0x7C1F,0x7E1F,0x7EBF, |
| 365 | 365 | 0x7BDE,0x2DAF,0x296E,0x298E,0x29AE,0x2DAE,0x31CF,0x31D0, |
| r1386 | r1387 | |
| 544 | 544 | 0x2340,0x2B60,0x3380,0x3FA0,0x47A0,0x4FC1,0x5BC0,0x67E2, |
| 545 | 545 | 0x6FE4,0x77E6,0x7BEF,0x7FF4,0x7FFB,0x7BDE,0xFFFF,0x000B |
| 546 | 546 | }; |
| 547 | static UINT16 bloodwar_mcu_4_0b[] = { // Warrior 1 Player 2 | |
| 547 | static const UINT16 bloodwar_mcu_4_0b[] = { // Warrior 1 Player 2 | |
| 548 | 548 | 0x000B,0x292A,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 549 | 549 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 550 | 550 | 0x7BDE,0x2E2A,0x29E9,0x2609,0x29E9,0x2629,0x2A4A,0x2A4B, |
| r1386 | r1387 | |
| 729 | 729 | 0x2340,0x2B60,0x3380,0x3FA0,0x47A0,0x4FC1,0x5BC0,0x67E2, |
| 730 | 730 | 0x6FE4,0x77E6,0x7BEF,0x7FF4,0x7FFB,0x7BDE,0xFFFF,0x0004 |
| 731 | 731 | }; |
| 732 | static UINT16 bloodwar_mcu_4_0c[] = { // Warrior 5 Player 1 | |
| 732 | static const UINT16 bloodwar_mcu_4_0c[] = { // Warrior 5 Player 1 | |
| 733 | 733 | 0x0004,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 734 | 734 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 735 | 735 | 0x7BDE,0x1422,0x1423,0x2044,0x1803,0x1C23,0x2CA6,0x2445, |
| r1386 | r1387 | |
| 810 | 810 | 0x270A,0x32F1,0x2EAB,0x3BCF,0x3BD2,0x4BEE,0x53F6,0x5B94, |
| 811 | 811 | 0x6BB5,0x6FFB,0x7BDE,0xFFFF,0x0004,0x0000,0x4232,0x56F8 |
| 812 | 812 | }; |
| 813 | static UINT16 bloodwar_mcu_4_0d[] = { // Warrior 5 Player 2 | |
| 813 | static const UINT16 bloodwar_mcu_4_0d[] = { // Warrior 5 Player 2 | |
| 814 | 814 | 0x0004,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 815 | 815 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 816 | 816 | 0x7BDE,0x0C29,0x0C2A,0x184B,0x100A,0x142A,0x24AD,0x1C4C, |
| r1386 | r1387 | |
| 891 | 891 | 0x270A,0x32F1,0x2EAB,0x3BCF,0x3BD2,0x4BEE,0x53F6,0x5B94, |
| 892 | 892 | 0x6BB5,0x6FFB,0x7BDE,0xFFFF,0x0005,0x40CE,0x4232,0x56F8 |
| 893 | 893 | }; |
| 894 | static UINT16 bloodwar_mcu_4_0e[] = { // Warrior 4 Player 2 | |
| 894 | static const UINT16 bloodwar_mcu_4_0e[] = { // Warrior 4 Player 2 | |
| 895 | 895 | 0x0005,0x40CE,0x4232,0x56F8,0x2D8D,0x1D08,0x254A,0x2D8C, |
| 896 | 896 | 0x35CE,0x3E10,0x4652,0x4E94,0x56D6,0x5F18,0x675A,0x6F9C, |
| 897 | 897 | 0x7BDE,0x7BF9,0x6FF5,0x6BD4,0x63F1,0x538D,0x63F2,0x57EE, |
| r1386 | r1387 | |
| 934 | 934 | 0x4340,0x4760,0x4F80,0x57A1,0x5BC0,0x67E2,0x6FE4,0x77E6, |
| 935 | 935 | 0x7BEF,0x7FF4,0x7FFB,0x7BDE,0xFFFF,0x0005,0x40CE,0x4232 |
| 936 | 936 | }; |
| 937 | static UINT16 bloodwar_mcu_4_0f[] = { // Warrior 4 Player 1 | |
| 937 | static const UINT16 bloodwar_mcu_4_0f[] = { // Warrior 4 Player 1 | |
| 938 | 938 | 0x0005,0x40CE,0x4232,0x56F8,0x2D8D,0x20E9,0x292B,0x316D, |
| 939 | 939 | 0x39AF,0x41F1,0x4A33,0x5275,0x5AB7,0x62F9,0x6B3B,0x737D, |
| 940 | 940 | 0x7BDF,0x7FFA,0x73F6,0x6FF5,0x67F2,0x57CE,0x67F3,0x5BEF, |
| r1386 | r1387 | |
| 977 | 977 | 0x4340,0x4760,0x4F80,0x57A1,0x5BC0,0x67E2,0x6FE4,0x77E6, |
| 978 | 978 | 0x7BEF,0x7FF4,0x7FFB,0x7BDE,0xFFFF,0x0009,0x0000,0x4232 |
| 979 | 979 | }; |
| 980 | static UINT16 bloodwar_mcu_4_10[] = { // Warrior 6 Player 1 | |
| 980 | static const UINT16 bloodwar_mcu_4_10[] = { // Warrior 6 Player 1 | |
| 981 | 981 | 0x0009,0x0000,0x4232,0x56F8,0x2D8D,0x27FF,0x3BFF,0x53FF, |
| 982 | 982 | 0x63FF,0x401E,0x4C1F,0x581F,0x6C1F,0x7C1F,0x7E1F,0x7EBF, |
| 983 | 983 | 0x7BDE,0x4BCD,0x47EC,0x43CA,0x3BC8,0x2F45,0x2703,0x22E2, |
| r1386 | r1387 | |
| 1046 | 1046 | 0x7C00,0x7C05,0x780A,0x7C0F,0x7C14,0x7C19,0x7C1F,0x7BDE, |
| 1047 | 1047 | 0xFFFF,0x0009,0x0000,0x4232,0x56F8,0x2D8D,0x6C1F,0x7C1F |
| 1048 | 1048 | }; |
| 1049 | static UINT16 bloodwar_mcu_4_11[] = { // Warrior 6 Player 2 | |
| 1049 | static const UINT16 bloodwar_mcu_4_11[] = { // Warrior 6 Player 2 | |
| 1050 | 1050 | 0x0009,0x0000,0x4232,0x56F8,0x2D8D,0x6C1F,0x7C1F,0x7E1F, |
| 1051 | 1051 | 0x7EBF,0x5C13,0x5C52,0x6432,0x7075,0x7992,0x7DF6,0x7EF9, |
| 1052 | 1052 | 0x7BDE,0x52F2,0x4F11,0x4AEF,0x42CD,0x368A,0x2E48,0x2A27, |
| r1386 | r1387 | |
| 1115 | 1115 | 0x7C00,0x7C05,0x780A,0x7C0F,0x7C14,0x7C19,0x7C1F,0x7BDE, |
| 1116 | 1116 | 0xFFFF,0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A |
| 1117 | 1117 | }; |
| 1118 | static UINT16 bloodwar_mcu_4_12[] = { // Warrior 9 Player 1 | |
| 1118 | static const UINT16 bloodwar_mcu_4_12[] = { // Warrior 9 Player 1 | |
| 1119 | 1119 | 0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 1120 | 1120 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 1121 | 1121 | 0x7BDE,0x1AC2,0x1AE2,0x1B02,0x1703,0x1723,0x1743,0x1763, |
| r1386 | r1387 | |
| 1175 | 1175 | 0x7FB6,0x7FB7,0x7FB8,0x7FB9,0x7FBF,0x7FBB,0x7FFF,0x7FFF, |
| 1176 | 1176 | 0x0000,0xFFFF,0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108 |
| 1177 | 1177 | }; |
| 1178 | static UINT16 bloodwar_mcu_4_13[] = { // Warrior 9 Player 2 | |
| 1178 | static const UINT16 bloodwar_mcu_4_13[] = { // Warrior 9 Player 2 | |
| 1179 | 1179 | 0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 1180 | 1180 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 1181 | 1181 | 0x7BDE,0x146D,0x1CAF,0x24EF,0x24EF,0x2910,0x3553,0x3DB7, |
| r1386 | r1387 | |
| 1235 | 1235 | 0x7FB6,0x7FB7,0x7FB8,0x7FB9,0x7FBF,0x7FBB,0x7FFF,0x7FFF, |
| 1236 | 1236 | 0x0000,0xFFFF,0x0006,0x0000,0x4232,0x56F8,0x2D8D,0x2108 |
| 1237 | 1237 | }; |
| 1238 | static UINT16 bloodwar_mcu_4_14[] = { // Warrior 7 Player 1 | |
| 1238 | static const UINT16 bloodwar_mcu_4_14[] = { // Warrior 7 Player 1 | |
| 1239 | 1239 | 0x0006,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 1240 | 1240 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 1241 | 1241 | 0x7BDE,0x0D00,0x0D00,0x0D40,0x0D40,0x0D60,0x0D80,0x1140, |
| r1386 | r1387 | |
| 1376 | 1376 | 0x77E2,0x77E4,0x77E6,0x77E8,0x7BEA,0x7BED,0x7BF0,0x7BF3, |
| 1377 | 1377 | 0x7BF6,0x7BF9,0x7BFB,0x7FFF,0x0000,0xFFFF,0x0006,0x3CB1 |
| 1378 | 1378 | }; |
| 1379 | static UINT16 bloodwar_mcu_4_15[] = { // Warrior 7 Player 2 | |
| 1379 | static const UINT16 bloodwar_mcu_4_15[] = { // Warrior 7 Player 2 | |
| 1380 | 1380 | 0x0006,0x3CB1,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 1381 | 1381 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 1382 | 1382 | 0x7BDE,0x1CCB,0x1049,0x184A,0x18E9,0x1CAA,0x1C4C,0x20AE, |
| r1386 | r1387 | |
| 1517 | 1517 | 0x77E2,0x77E4,0x77E6,0x77E8,0x7BEA,0x7BED,0x7BF0,0x7BF3, |
| 1518 | 1518 | 0x7BF6,0x7BF9,0x7BFB,0x7FFF,0x0000,0xFFFF,0x0002,0x0000 |
| 1519 | 1519 | }; |
| 1520 | static UINT16 bloodwar_mcu_4_16[] = { // Warrior 8 Player 1 | |
| 1520 | static const UINT16 bloodwar_mcu_4_16[] = { // Warrior 8 Player 1 | |
| 1521 | 1521 | 0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 1522 | 1522 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 1523 | 1523 | 0x7BDE,0x29A9,0x2DCA,0x31EB,0x360C,0x3A0D,0x3A2D,0x3A4D, |
| r1386 | r1387 | |
| 1554 | 1554 | |
| 1555 | 1555 | 0x7BDE,0xFFFF,0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108 |
| 1556 | 1556 | }; |
| 1557 | static UINT16 bloodwar_mcu_4_17[] = { // Warrior 8 Player 2 | |
| 1557 | static const UINT16 bloodwar_mcu_4_17[] = { // Warrior 8 Player 2 | |
| 1558 | 1558 | 0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 1559 | 1559 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 1560 | 1560 | 0x7BDE,0x296A,0x2D8B,0x31AC,0x35CD,0x35EF,0x39F0,0x3A10, |
| r1386 | r1387 | |
| 1591 | 1591 | |
| 1592 | 1592 | 0x7BDE,0xFFFF,0x0003,0x0000,0x4232,0x56F8,0x2D8D,0x2108 |
| 1593 | 1593 | }; |
| 1594 | static UINT16 bloodwar_mcu_4_18[] = { // Warrior 2 Player 2 | |
| 1594 | static const UINT16 bloodwar_mcu_4_18[] = { // Warrior 2 Player 2 | |
| 1595 | 1595 | 0x0003,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 1596 | 1596 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 1597 | 1597 | 0x7BDE,0x1524,0x0CC2,0x0CE2,0x0CE3,0x10E3,0x1103,0x14E3, |
| r1386 | r1387 | |
| 1651 | 1651 | 0x294A,0x318C,0x39CE,0x03A0,0x23E0,0x37E0,0x3FE0,0x4FE0, |
| 1652 | 1652 | 0x67ED,0x77EE,0x7FFF,0xFFFF,0x0003,0x0000,0x4232,0x56F8 |
| 1653 | 1653 | }; |
| 1654 | static UINT16 bloodwar_mcu_4_19[] = { // Warrior 2 Player 1 | |
| 1654 | static const UINT16 bloodwar_mcu_4_19[] = { // Warrior 2 Player 1 | |
| 1655 | 1655 | 0x0003,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 1656 | 1656 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 1657 | 1657 | 0x7BDE,0x1524,0x0CC2,0x0CE2,0x0CE3,0x10E3,0x1103,0x14E3, |
| r1386 | r1387 | |
| 1711 | 1711 | 0x294A,0x318C,0x39CE,0x03A0,0x23E0,0x37E0,0x3FE0,0x4FE0, |
| 1712 | 1712 | 0x67ED,0x77EE,0x7FFF,0xFFFF,0x0005,0x0000,0x4232,0x56F8 |
| 1713 | 1713 | }; |
| 1714 | static UINT16 bloodwar_mcu_4_1a[] = { // Warrior 3 Player 1 | |
| 1714 | static const UINT16 bloodwar_mcu_4_1a[] = { // Warrior 3 Player 1 | |
| 1715 | 1715 | 0x0005,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 1716 | 1716 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 1717 | 1717 | 0x7BDE,0x08A0,0x0D02,0x1142,0x19C2,0x3EEB,0x430D,0x4B6C, |
| r1386 | r1387 | |
| 1839 | 1839 | 0x0192,0x0194,0x0195,0x2597,0x2998,0x3599,0x3D99,0x0195, |
| 1840 | 1840 | 0x0999,0x1199,0x21CF,0x25D4,0xFFFF,0x0005,0x0000,0x4232 |
| 1841 | 1841 | }; |
| 1842 | static UINT16 bloodwar_mcu_4_1b[] = { // Warrior 3 Player 2 | |
| 1842 | static const UINT16 bloodwar_mcu_4_1b[] = { // Warrior 3 Player 2 | |
| 1843 | 1843 | 0x0005,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C, |
| 1844 | 1844 | 0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C, |
| 1845 | 1845 | 0x7BDE,0x08A0,0x0D02,0x1142,0x19C2,0x3EEB,0x430D,0x4B6C, |
| r1386 | r1387 | |
| 1970 | 1970 | |
| 1971 | 1971 | // --- tilemap data --- |
| 1972 | 1972 | // tile data (ff means no tiles) followed by routine index (end marker: 0xff00) |
| 1973 | static UINT16 bloodwar_mcu_4_1c[] = { // Warrior 8 | |
| 1973 | static const UINT16 bloodwar_mcu_4_1c[] = { // Warrior 8 | |
| 1974 | 1974 | 0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0D00,0xFF06, |
| 1975 | 1975 | 0x01BF,0xFF06,0x00FF,0xFF06,0x0008,0x2C01,0xFF06,0x0001, |
| 1976 | 1976 | 0xFF05,0x0002,0x2C02,0xFF06,0x0001,0xFF05,0x0002,0x2C55, |
| r1386 | r1387 | |
| 2033 | 2033 | 0x000A,0x38BD,0xFF06,0x0004,0xFF06,0x000E,0xFF05,0x000A, |
| 2034 | 2034 | 0x38C9,0xFF06,0x0004,0xFF06,0x00BF,0xFF00,0xFF08,0xFF02 |
| 2035 | 2035 | }; |
| 2036 | static UINT16 bloodwar_mcu_4_1d[] = { // Warrior 2 | |
| 2036 | static const UINT16 bloodwar_mcu_4_1d[] = { // Warrior 2 | |
| 2037 | 2037 | 0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0000,0xFF06, |
| 2038 | 2038 | 0x01BF,0xFF06,0x0003,0x4401,0xFF06,0x0002,0x4401,0xFF05, |
| 2039 | 2039 | 0x0001,0x340B,0xFF06,0x0000,0x4401,0xFF06,0x0005,0xFF04, |
| r1386 | r1387 | |
| 2180 | 2180 | 0xFF05,0x0007,0x2070,0xFF06,0x0003,0xFF06,0x009F,0xFF00, |
| 2181 | 2181 | 0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0200,0xFF06 |
| 2182 | 2182 | }; |
| 2183 | static UINT16 bloodwar_mcu_4_1e[] = { // Warrior 3 | |
| 2183 | static const UINT16 bloodwar_mcu_4_1e[] = { // Warrior 3 | |
| 2184 | 2184 | 0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0200,0xFF06, |
| 2185 | 2185 | 0x01BF,0xFF05,0x000F,0x2C01,0xFF05,0x000F,0x2C01,0xFF05, |
| 2186 | 2186 | 0x000F,0x2C11,0xFF05,0x000F,0x2C11,0xFF05,0x0001,0x3C27, |
| r1386 | r1387 | |
| 2319 | 2319 | |
| 2320 | 2320 | 0x007F,0xFF00,0xFF08,0xFF02,0x0000,0xFF03,0x0200,0xFF01 |
| 2321 | 2321 | }; |
| 2322 | static UINT16 bloodwar_mcu_4_1f[] = { // Warrior 5 | |
| 2322 | static const UINT16 bloodwar_mcu_4_1f[] = { // Warrior 5 | |
| 2323 | 2323 | 0xFF08,0xFF02,0x0000,0xFF03,0x0200,0xFF01,0x0800,0xFF06, |
| 2324 | 2324 | 0x01BF,0xFF06,0x007F,0xFF06,0x0009,0xFF05,0x0002,0x2801, |
| 2325 | 2325 | 0xFF05,0x0004,0x3429,0xFF06,0x0000,0xFF05,0x0002,0x342E, |
| r1386 | r1387 | |
| 2402 | 2402 | 0xFF05,0x0001,0x2C6B,0x2C6A,0xFF06,0x000C,0xFF05,0x0001, |
| 2403 | 2403 | 0x2C6B,0x2C6A,0xFF06,0x0006,0xFF06,0x003F,0xFF00,0xFF08 |
| 2404 | 2404 | }; |
| 2405 | static UINT16 bloodwar_mcu_4_20[] = { // Warrior 4 | |
| 2405 | static const UINT16 bloodwar_mcu_4_20[] = { // Warrior 4 | |
| 2406 | 2406 | 0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x1100,0xFF06, |
| 2407 | 2407 | 0x01BF,0xFF06,0x00DF,0xFF06,0x0001,0xFF04,0x0002,0xFF09, |
| 2408 | 2408 | 0x0001,0x2402,0xFF04,0x0000,0xFF06,0x0017,0xFF05,0x0001, |
| r1386 | r1387 | |
| 2477 | 2477 | 0x2111,0xFF05,0x000F,0x2111,0xFF05,0x000F,0x2121,0xFF05, |
| 2478 | 2478 | 0x000F,0x2121,0xFF06,0x013F,0xFF00,0xFF08,0xFF02,0x0000 |
| 2479 | 2479 | }; |
| 2480 | static UINT16 bloodwar_mcu_4_21[] = { // Warrior 6 | |
| 2480 | static const UINT16 bloodwar_mcu_4_21[] = { // Warrior 6 | |
| 2481 | 2481 | 0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0F00,0xFF06, |
| 2482 | 2482 | 0x01BF,0xFF06,0x005F,0xFF06,0x000F,0x4401,0xFF06,0x000E, |
| 2483 | 2483 | 0xFF06,0x000C,0xFF05,0x0005,0x4402,0xFF06,0x000C,0xFF06, |
| r1386 | r1387 | |
| 2641 | 2641 | 0x30EF,0xFF05,0x000F,0x3141,0xFF05,0x000F,0x3101,0xFF05, |
| 2642 | 2642 | 0x000F,0x3151,0xFF05,0x000F,0x3111,0xFF00,0xFF08,0xFF02 |
| 2643 | 2643 | }; |
| 2644 | static UINT16 bloodwar_mcu_4_22[] = { // Warrior 1 | |
| 2644 | static const UINT16 bloodwar_mcu_4_22[] = { // Warrior 1 | |
| 2645 | 2645 | 0xFF08,0xFF02,0x0000,0xFF03,0x0300,0xFF01,0x0B00,0xFF06, |
| 2646 | 2646 | 0x01BF,0xFF06,0x0001,0x3401,0xFF06,0x0000,0xFF05,0x0002, |
| 2647 | 2647 | 0x3402,0xFF06,0x0010,0xFF05,0x0001,0x3440,0xFF06,0x0001, |
| r1386 | r1387 | |
| 2764 | 2764 | 0x0005,0xFF05,0x0006,0x2CF7,0xFF06,0x0008,0xFF05,0x0006, |
| 2765 | 2765 | 0x2CF7,0xFF06,0x0002,0xFF06,0x007F,0xFF00,0xFF08,0xFF02 |
| 2766 | 2766 | }; |
| 2767 | static UINT16 bloodwar_mcu_4_23[] = { // Warrior 9 | |
| 2767 | static const UINT16 bloodwar_mcu_4_23[] = { // Warrior 9 | |
| 2768 | 2768 | 0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0A00,0xFF06, |
| 2769 | 2769 | 0x01BF,0xFF06,0x0006,0xFF05,0x0001,0x3C88,0xFF06,0x0005, |
| 2770 | 2770 | 0xFF05,0x0001,0x4001,0xFF06,0x0005,0xFF04,0x0002,0xFF09, |
| r1386 | r1387 | |
| 2926 | 2926 | 0xFF05,0x0007,0x2881,0xFF05,0x0007,0x2881,0xFF05,0x0007, |
| 2927 | 2927 | 0x2881,0xFF05,0x0007,0x2881,0xFF06,0x007F,0xFF00,0xFF08 |
| 2928 | 2928 | }; |
| 2929 | static UINT16 bloodwar_mcu_4_24[] = { // Warrior 7 | |
| 2929 | static const UINT16 bloodwar_mcu_4_24[] = { // Warrior 7 | |
| 2930 | 2930 | 0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0300,0xFF06, |
| 2931 | 2931 | 0x01BF,0xFF06,0x0000,0x3402,0xFF05,0x0005,0x4C14,0x3402, |
| 2932 | 2932 | 0xFF05,0x0006,0x4C14,0xFF05,0x0006,0x4C14,0xFF04,0x0002, |
| r1386 | r1387 | |
| 3041 | 3041 | }; |
| 3042 | 3042 | |
| 3043 | 3043 | // --- fighter data: pointers to ROM --- |
| 3044 | static UINT16 bloodwar_mcu_4_25[] = { // Warrior 1 | |
| 3044 | static const UINT16 bloodwar_mcu_4_25[] = { // Warrior 1 | |
| 3045 | 3045 | 0x0007,0x2B72,0x0007,0x2B9E,0x0007,0x2C52,0x0007,0x2D36, |
| 3046 | 3046 | 0x0007,0x3584,0x0007,0x2E3A,0x0007,0x2E54,0x0007,0x2E74, |
| 3047 | 3047 | 0x0007,0x2F28,0x0007,0x3022,0x0007,0x35A0,0x0007,0x377C, |
| r1386 | r1387 | |
| 3113 | 3113 | 0x0007,0x862A,0x0007,0x8644,0x0007,0x869C,0x0007,0x86A6, |
| 3114 | 3114 | 0x0007,0xCC3C,0x0007,0xCC68,0x0007,0xCD1C,0x0007,0xCD9A |
| 3115 | 3115 | }; |
| 3116 | static UINT16 bloodwar_mcu_4_26[] = { // Warrior 2 | |
| 3116 | static const UINT16 bloodwar_mcu_4_26[] = { // Warrior 2 | |
| 3117 | 3117 | 0x000B,0xB188,0x000B,0xB1C0,0x000B,0xB308,0x000B,0xB590, |
| 3118 | 3118 | 0x000B,0xCF38,0x000B,0xBA00,0x000B,0xBA1A,0x000B,0xBA3A, |
| 3119 | 3119 | 0x000B,0xBE62,0x000B,0xC4AA,0x000B,0xCF54,0x000B,0xD130, |
| r1386 | r1387 | |
| 3181 | 3181 | 0x000C,0x1F4A,0x000C,0x1F5E,0x000C,0x1FC2,0x000C,0x1FCC, |
| 3182 | 3182 | 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF |
| 3183 | 3183 | }; |
| 3184 | static UINT16 bloodwar_mcu_4_27[] = { // Warrior 3 | |
| 3184 | static const UINT16 bloodwar_mcu_4_27[] = { // Warrior 3 | |
| 3185 | 3185 | 0x0008,0x631C,0x0008,0x6348,0x0008,0x63EC,0x0008,0x6494, |
| 3186 | 3186 | 0x0008,0x6C5C,0x0008,0x6598,0x0008,0x65B2,0x0008,0x65D2, |
| 3187 | 3187 | 0x0008,0x6676,0x0008,0x674A,0x0008,0x6C78,0x0008,0x6E54, |
| r1386 | r1387 | |
| 3254 | 3254 | 0x0008,0xB786,0x0008,0xB8F0,0x0008,0xB912,0x0008,0xB93A, |
| 3255 | 3255 | 0x0008,0xF128,0x0008,0xF148,0x0008,0xF1EC,0x0008,0xF2AA |
| 3256 | 3256 | }; |
| 3257 | static UINT16 bloodwar_mcu_4_28[] = { // Warrior 4 | |
| 3257 | static const UINT16 bloodwar_mcu_4_28[] = { // Warrior 4 | |
| 3258 | 3258 | 0x0008,0xF128,0x0008,0xF148,0x0008,0xF1EC,0x0008,0xF2AA, |
| 3259 | 3259 | 0x0008,0xFA80,0x0008,0xF3AA,0x0008,0xF3C4,0x0008,0xF3E4, |
| 3260 | 3260 | 0x0008,0xF4A8,0x0008,0xF56C,0x0008,0xFA9C,0x0008,0xFC78, |
| r1386 | r1387 | |
| 3325 | 3325 | |
| 3326 | 3326 | 0x0009,0x4A2A,0x0009,0x81A8,0x0009,0x81C8,0x0009,0x8270 |
| 3327 | 3327 | }; |
| 3328 | static UINT16 bloodwar_mcu_4_29[] = { // Warrior 5 | |
| 3328 | static const UINT16 bloodwar_mcu_4_29[] = { // Warrior 5 | |
| 3329 | 3329 | 0x0007,0xCC3C,0x0007,0xCC68,0x0007,0xCD1C,0x0007,0xCD9A, |
| 3330 | 3330 | 0x0007,0xD616,0x0007,0xCE38,0x0007,0xCE52,0x0007,0xCE72, |
| 3331 | 3331 | 0x0007,0xCF16,0x0007,0xCFAA,0x0007,0xD632,0x0007,0xD80E, |
| r1386 | r1387 | |
| 3396 | 3396 | |
| 3397 | 3397 | 0x0008,0x1E9A,0x0008,0x1EAC,0x0008,0x631C,0x0008,0x6348 |
| 3398 | 3398 | }; |
| 3399 | static UINT16 bloodwar_mcu_4_2a[] = { // Warrior 6 | |
| 3399 | static const UINT16 bloodwar_mcu_4_2a[] = { // Warrior 6 | |
| 3400 | 3400 | 0x000A,0x0E3C,0x000A,0x0E5C,0x000A,0x0F00,0x000A,0x0FA8, |
| 3401 | 3401 | 0x000A,0x16E2,0x000A,0x105C,0x000A,0x1076,0x000A,0x1096, |
| 3402 | 3402 | 0x000A,0x113A,0x000A,0x11DE,0x000A,0x16FE,0x000A,0x18DA, |
| r1386 | r1387 | |
| 3465 | 3465 | 0x000A,0x62DA,0x000A,0x62A0,0x000A,0x62B4,0x000A,0x631E, |
| 3466 | 3466 | 0x000A,0x6338,0x000A,0x94A4,0x000A,0x94C4,0x000A,0x9568 |
| 3467 | 3467 | }; |
| 3468 | static UINT16 bloodwar_mcu_4_2b[] = { // Warrior 7 | |
| 3468 | static const UINT16 bloodwar_mcu_4_2b[] = { // Warrior 7 | |
| 3469 | 3469 | 0x000A,0x94A4,0x000A,0x94C4,0x000A,0x9568,0x000A,0x9646, |
| 3470 | 3470 | 0x000A,0x9DFC,0x000A,0x9746,0x000A,0x9760,0x000A,0x9780, |
| 3471 | 3471 | 0x000A,0x9824,0x000A,0x98C8,0x000A,0x9E18,0x000A,0x9FF4, |
| r1386 | r1387 | |
| 3533 | 3533 | 0x000A,0xF31E,0x000A,0xF344,0x000A,0xF39C,0x000A,0xF3A6, |
| 3534 | 3534 | 0x000B,0x272C,0x000B,0x274C,0x000B,0x284C,0x000B,0x2924 |
| 3535 | 3535 | }; |
| 3536 | static UINT16 bloodwar_mcu_4_2c[] = { // Warrior 8 | |
| 3536 | static const UINT16 bloodwar_mcu_4_2c[] = { // Warrior 8 | |
| 3537 | 3537 | 0x000B,0x272C,0x000B,0x274C,0x000B,0x284C,0x000B,0x2924, |
| 3538 | 3538 | 0x000B,0x3242,0x000B,0x2A0E,0x000B,0x2A28,0x000B,0x2A48, |
| 3539 | 3539 | 0x000B,0x2B4C,0x000B,0x2C1A,0x000B,0x325E,0x000B,0x343A, |
| r1386 | r1387 | |
| 3602 | 3602 | 0x000B,0x80C8,0x000B,0x808E,0x000B,0x80A2,0x000B,0x811C, |
| 3603 | 3603 | 0x000B,0x813E,0x000B,0xB188,0x000B,0xB1C0,0x000B,0xB308 |
| 3604 | 3604 | }; |
| 3605 | static UINT16 bloodwar_mcu_4_2d[] = { // Warrior 9 | |
| 3605 | static const UINT16 bloodwar_mcu_4_2d[] = { // Warrior 9 | |
| 3606 | 3606 | 0x0009,0x81A8,0x0009,0x81C8,0x0009,0x8270,0x0009,0x8328, |
| 3607 | 3607 | 0x0009,0x8A98,0x0009,0x8416,0x0009,0x8430,0x0009,0x8450, |
| 3608 | 3608 | 0x0009,0x84E8,0x0009,0x8580,0x0009,0x8AB4,0x0009,0x8C90, |
| r1386 | r1387 | |
|---|---|---|
| 17 | 17 | |
| 18 | 18 | /* mcu data that is extracted from the real board! */ |
| 19 | 19 | /* updated on 2st Jun 2003 */ |
| 20 | static UINT8 mcu_data[256] = { | |
| 20 | static const UINT8 mcu_data[256] = { | |
| 21 | 21 | 0x3a, 0xe6, 0x80, 0xc6, 0x0e, 0xdd, 0x77, 0xfd, |
| 22 | 22 | 0x7e, 0xfe, 0x10, 0x38, 0x10, 0xdd, 0x7e, 0x03, |
| 23 | 23 | 0xc6, 0x08, 0xdd, 0x77, 0x03, 0xdd, 0x7e, 0xff, |
| r1386 | r1387 | |
|---|---|---|
| 346 | 346 | 0, //0001->0110 1->6 |
| 347 | 347 | 0, //0001->0111 1->7 |
| 348 | 348 | 0, //0001->1000 1->8 |
| 349 | -1, | |
| 349 | -1, | |
| 350 | 350 | 0, //0001->1010 1->A |
| 351 | 351 | 0, //0001->1011 1->B |
| 352 | 352 | 0, //0001->1100 1->C |
| r1386 | r1387 | |
| 357 | 357 | 0, //0010->0000 2->0 |
| 358 | 358 | 0, //0010->0001 2->1 |
| 359 | 359 | 0, //0010->0010 2->2 |
| 360 | -1, | |
| 360 | -1, | |
| 361 | 361 | 0, //0010->0100 2->4 |
| 362 | 362 | 0, //0010->0101 2->5 |
| 363 | 363 | 1, //0010->0110 2->6 |
| 364 | 364 | 0, //0010->0111 2->7 |
| 365 | 0,//0010->1000 2->8 | |
| 365 | 0, //0010->1000 2->8 | |
| 366 | 366 | 0, //0010->1001 2->9 |
| 367 | 0,//0010->1010 2->A | |
| 367 | 0, //0010->1010 2->A | |
| 368 | 368 | 0, //0010->1011 2->B |
| 369 | 369 | 0, //0010->1100 2->C |
| 370 | 370 | 0, //0010->1101 2->D |
| r1386 | r1387 | |
| 372 | 372 | 0, //0010->1111 2->F |
| 373 | 373 | |
| 374 | 374 | 0, //0011->0000 3->0 |
| 375 | -1, | |
| 375 | -1, | |
| 376 | 376 | 1, //0011->0010 3->2 |
| 377 | 377 | 0, //0011->0011 3->3 |
| 378 | 378 | 0, //0011->0100 3->4 |
| r1386 | r1387 | |
| 380 | 380 | 2, //0011->0110 3->6 |
| 381 | 381 | 0, //0011->0111 3->7 |
| 382 | 382 | 0, //0011->1000 3->8 |
| 383 | -2, | |
| 383 | -2, | |
| 384 | 384 | 0, //0011->1010 3->A |
| 385 | 385 | 0, //0011->1011 3->B |
| 386 | 386 | 0, //0011->1100 3->C |
| r1386 | r1387 | |
| 390 | 390 | |
| 391 | 391 | 0, //0100->0000 4->0 |
| 392 | 392 | 0, //0100->0001 4->1 |
| 393 | 0,//0100->0010 4->2 | |
| 393 | 0, //0100->0010 4->2 | |
| 394 | 394 | 0, //0100->0011 4->3 |
| 395 | 395 | 0, //0100->0100 4->4 |
| 396 | 396 | 0, //0100->0101 4->5 |
| r1386 | r1387 | |
| 409 | 409 | 0, //0101->0001 5->1 |
| 410 | 410 | 0, //0101->0010 5->2 |
| 411 | 411 | 0, //0101->0011 5->3 |
| 412 | 0,//0101->0100 5->4 | |
| 412 | 0, //0101->0100 5->4 | |
| 413 | 413 | 0, //0101->0101 5->5 |
| 414 | 0,//0101->0110 5->6 | |
| 414 | 0, //0101->0110 5->6 | |
| 415 | 415 | 0, //0101->0111 5->7 |
| 416 | 416 | 0, //0101->1000 5->8 |
| 417 | 417 | 0, //0101->1001 5->9 |
| r1386 | r1387 | |
| 432 | 432 | 0, //0110->0111 6->7 |
| 433 | 433 | 0, //0110->1000 6->8 |
| 434 | 434 | 0, //0110->1001 6->9 |
| 435 | 0,//0110->1010 6->A | |
| 435 | 0, //0110->1010 6->A | |
| 436 | 436 | 0, //0110->1011 6->B |
| 437 | 437 | 2, //0110->1100 6->C |
| 438 | 438 | 0, //0110->1101 6->D |
| r1386 | r1387 | |
| 457 | 457 | 0, //0111->1111 7->F |
| 458 | 458 | |
| 459 | 459 | 0, //1000->0000 8->0 |
| 460 | 0,//1000->0001 8->1 | |
| 460 | 0, //1000->0001 8->1 | |
| 461 | 461 | 0, //1000->0010 8->2 |
| 462 | 462 | 0, //1000->0011 8->3 |
| 463 | 463 | 0, //1000->0100 8->4 |
| r1386 | r1387 | |
| 468 | 468 | 1, //1000->1001 8->9 |
| 469 | 469 | 0, //1000->1010 8->A |
| 470 | 470 | 0, //1000->1011 8->B |
| 471 | -1, | |
| 471 | -1, | |
| 472 | 472 | 0, //1000->1101 8->D |
| 473 | 473 | 0, //1000->1110 8->E |
| 474 | 474 | 0, //1000->1111 8->F |
| r1386 | r1387 | |
| 478 | 478 | 0, //1001->0010 9->2 |
| 479 | 479 | 2, //1001->0011 9->3 |
| 480 | 480 | 0, //1001->0100 9->4 |
| 481 | 0,//1001->0101 9->5 | |
| 481 | 0, //1001->0101 9->5 | |
| 482 | 482 | 0, //1001->0110 9->6 |
| 483 | 483 | 0, //1001->0111 9->7 |
| 484 | -1, | |
| 484 | -1, | |
| 485 | 485 | 0, //1001->1001 9->9 |
| 486 | 486 | 0, //1001->1010 9->A |
| 487 | 487 | 0, //1001->1011 9->B |
| 488 | -2, | |
| 488 | -2, | |
| 489 | 489 | 0, //1001->1101 9->D |
| 490 | 490 | 0, //1001->1110 9->E |
| 491 | 491 | 0, //1001->1111 9->F |
| r1386 | r1387 | |
| 498 | 498 | 0, //1010->0101 A->5 |
| 499 | 499 | 0, //1010->0110 A->6 |
| 500 | 500 | 0, //1010->0111 A->7 |
| 501 | 0,//1010->1000 A->8 | |
| 502 | 0,//1010->1001 A->9 | |
| 501 | 0, //1010->1000 A->8 | |
| 502 | 0, //1010->1001 A->9 | |
| 503 | 503 | 0, //1010->1010 A->A |
| 504 | 504 | 0, //1010->1011 A->B |
| 505 | 505 | 0, //1010->1100 A->C |
| r1386 | r1387 | |
| 528 | 528 | 0, //1100->0001 C->1 |
| 529 | 529 | 0, //1100->0010 C->2 |
| 530 | 530 | 0, //1100->0011 C->3 |
| 531 | -1, | |
| 531 | -1, | |
| 532 | 532 | 0, //1100->0101 C->5 |
| 533 | -2, | |
| 533 | -2, | |
| 534 | 534 | 0, //1100->0111 C->7 |
| 535 | 535 | 1, //1100->1000 C->8 |
| 536 | 536 | 2, //1100->1001 C->9 |
| r1386 | r1387 | |
| 605 | 605 | steppers[id].pattern = 0; |
| 606 | 606 | steppers[id].old_pattern = 0; |
| 607 | 607 | steppers[id].step_pos = 0; |
| 608 | steppers[id].max_steps = (48*2) | |
| 608 | steppers[id].max_steps = (48*2) | |
| 609 | 609 | steppers[id].type = type; |
| 610 | 610 | |
| 611 | 611 | switch ( steppers[id].type ) |
| 612 | 612 | { |
| 613 | case ST | |
| 613 | case STA | |
| 614 | 614 | break; |
| 615 | case BARCREST_48STEP_REEL : // Barcrest reel units have different coil windings | |
| 616 | steppers[id].index_pos = 0; | |
| 617 | steppers[id].index_len = 16; | |
| 618 | steppers[id].index_patt = 0x09; | |
| 615 | case BARCREST_48STEP_REEL : // Barcrest reel units have different coil windings and optic tabs | |
| 616 | Stepper_set_index(id,0,16,0x09); | |
| 619 | 617 | break; |
| 620 | case STEPPER_144STEPS_DICE : // STARPOINT 1DCU DICE mechanism | |
| 621 | steppers[id].max_steps = (144*2)-1; | |
| 618 | case STARPOINT_144STEPS_DICE :// STARPOINT 1DCU DICE mechanism | |
| 619 | steppers[id].max_steps = (144*2); | |
| 622 | 620 | break; |
| 623 | 621 | } |
| 624 | 622 | state_save_register_item("Stepper", id, steppers[id].index_pos); |
| r1386 | r1387 | |
| 636 | 634 | void Stepper_set_index(int id,int position,int length,int pattern) |
| 637 | 635 | { |
| 638 | 636 | steppers[id].index_pos = position;//location of first index value in half steps |
| 639 | steppers[id].index_len = length;//number of half steps the index lasts | |
| 640 | steppers[id].index_patt = pattern;//hex value of coil pattern | |
| 637 | steppers[id].index_len = length; //number of half steps the index lasts | |
| 638 | steppers[id].index_patt = pattern; //hex value of coil pattern | |
| 641 | 639 | } |
| 642 | 640 | |
| 643 | 641 | int Stepper_get_position(int id) |
| r1386 | r1387 | |
| 719 | 717 | switch ( steppers[id].type ) |
| 720 | 718 | { |
| 721 | 719 | default: |
| 722 | case STEPPER_48STEP_REEL : // STARPOINT RMxxx | |
| 723 | case STEPPER_144STEPS_DICE : // STARPOINT 1DCU DICE mechanism | |
| 720 | case STARPOINT_48STEP_REEL : // STARPOINT RMxxx | |
| 721 | case STARPOINT_144STEPS_DICE : // STARPOINT 1DCU DICE mechanism | |
| 724 | 722 | steps = StarpointStepTab[ index ]; |
| 725 | 723 | break; |
| 726 | case BARCREST_48STEP_REEL : // Barcrest reel units have different | |
| 724 | case BARCREST_48STEP_REEL : // Barcrest reel units have different w | |
| 727 | 725 | steps = BarcrestStepTab[ index ]; |
| 728 | 726 | break; |
| 729 | 727 | } |
| r1386 | r1387 | |
|---|---|---|
| 18 | 18 | #ifndef INC_STEPPERS |
| 19 | 19 | #define INC_STEPPERS |
| 20 | 20 | |
| 21 | #define MAX_STEPPERS | |
| 21 | #define MAX_STEPPERS 8 // maximum number of steppers | |
| 22 | 22 | |
| 23 | #define STEPPER_48STEP_REEL 0 // STARPOINT RMXXX reel unit | |
| 24 | #define BARCREST_48STEP_REEL 1 // Barcrest bespoke reel unit | |
| 25 | #define STEPPER_144STEPS_DICE 2 // STARPOINT 1DCU DICE mechanism - tech sheet available on request | |
| 23 | #define STARPOINT_48STEP_REEL 0 // STARPOINT RMXXX reel unit | |
| 24 | #define BARCREST_48STEP_REEL 1 // Barcrest bespoke reel unit | |
| 25 | #define STARPOINT_144STEPS_DICE 2 // STARPOINT 1DCU DICE mechanism - tech sheet available on request | |
| 26 | 26 | |
| 27 | 27 | void Stepper_init( int id, int type); // init a stepper motor |
| 28 | 28 |
| r1386 | r1387 | |
|---|---|---|
| 164 | 164 | |
| 165 | 165 | ***************************************************************************/ |
| 166 | 166 | |
| 167 | static struct EEPROM_interface gaelco2_eeprom_interface = | |
| 167 | static const struct EEPROM_interface gaelco2_eeprom_interface = | |
| 168 | 168 | { |
| 169 | 169 | 8, /* address bits */ |
| 170 | 170 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 180 | 180 | |
| 181 | 181 | DRIVER_INIT( strtheat ) |
| 182 | 182 | { |
| 183 | ||
| 184 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x3fff, 0, 0, MRA8_BANK1 ); | |
| 185 | ||
| 183 | 186 | /* While the PAL supports up to 16 decryption methods, only four |
| 184 | 187 | are actually used in the PAL. Therefore, we'll take a little |
| 185 | 188 | memory overhead and decrypt the ROMs using each method in advance. */ |
| r1386 | r1387 | |
|---|---|---|
| 103 | 103 | |
| 104 | 104 | DRIVER_INIT( drakton ) |
| 105 | 105 | { |
| 106 | ||
| 107 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x3fff, 0, 0, MRA8_BANK1 ); | |
| 108 | ||
| 106 | 109 | /* While the PAL supports up to 16 decryption methods, only four |
| 107 | 110 | are actually used in the PAL. Therefore, we'll take a little |
| 108 | 111 | memory overhead and decrypt the ROMs using each method in advance. */ |
| 112 | ||
| 109 | 113 | drakton_decrypt_rom_8(); |
| 110 | 114 | drakton_decrypt_rom_9(); |
| 111 | 115 | drakton_decrypt_rom_A(); |
| r1386 | r1387 | |
|---|---|---|
| 19 | 19 | static int init_eeprom_count; |
| 20 | 20 | |
| 21 | 21 | |
| 22 | static struct EEPROM_interface eeprom_interface = | |
| 22 | static const struct EEPROM_interface eeprom_interface = | |
| 23 | 23 | { |
| 24 | 24 | 7, /* address bits */ |
| 25 | 25 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 37 | 37 | /* Exciting Soccer */ |
| 38 | 38 | |
| 39 | 39 | /* input = 0x6009 - data = 0x6170 */ |
| 40 | static UINT8 mcu_table1[MCU_KEY_TABLE_SIZE] = { | |
| 40 | static const UINT8 mcu_table1[MCU_KEY_TABLE_SIZE] = { | |
| 41 | 41 | 0x23, 0x05, 0xfb, 0x07, 0x4d, 0x3b, 0x7d, 0x03, |
| 42 | 42 | 0x9a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | 45 | /* input = 0x600d - data = 0x61f0 */ |
| 46 | static UINT8 mcu_table2[MCU_KEY_TABLE_SIZE] = { | |
| 46 | static const UINT8 mcu_table2[MCU_KEY_TABLE_SIZE] = { | |
| 47 | 47 | 0x75, 0x25, 0x4b, 0x10, 0xa6, 0x06, 0x9a, 0x02, |
| 48 | 48 | 0x04, 0x11, 0x09, 0x09, 0x2a, 0x10, 0x3a, 0x10 |
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | 51 | /* input = ?????? - data = 0x6300 */ |
| 52 | static UINT8 mcu_table3[MCU_KEY_TABLE_SIZE*4] = { | |
| 52 | static const UINT8 mcu_table3[MCU_KEY_TABLE_SIZE*4] = { | |
| 53 | 53 | 0xba, 0x26, 0x53, 0x0d, 0x01, 0x24, 0x1d, 0x15, |
| 54 | 54 | 0xd0, 0x1d, 0x35, 0x1f, 0x32, 0x22, 0xa0, 0x2c, |
| 55 | 55 | |
| r1386 | r1387 | |
| 64 | 64 | }; |
| 65 | 65 | |
| 66 | 66 | /* input = 0x6007 - data = 0x629b */ |
| 67 | static UINT8 mcu_table4[MCU_KEY_TABLE_SIZE] = { | |
| 67 | static const UINT8 mcu_table4[MCU_KEY_TABLE_SIZE] = { | |
| 68 | 68 | 0xc5, 0x24, 0xc5, 0x24, 0x27, 0x3f, 0xd0, 0x07, |
| 69 | 69 | 0x07, 0x0b, 0xd8, 0x02, 0x9a, 0x08, 0x00, 0x00 |
| 70 | 70 | }; |
| 71 | 71 | |
| 72 | 72 | /* input = 0x6007 - data = 0x629b */ |
| 73 | static UINT8 mcu_table5[MCU_KEY_TABLE_SIZE] = { | |
| 73 | static const UINT8 mcu_table5[MCU_KEY_TABLE_SIZE] = { | |
| 74 | 74 | 0x54, 0x43, 0xd0, 0x07, 0xd8, 0x02, 0x9a, 0x08, |
| 75 | 75 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 76 | 76 | }; |
| 77 | 77 | |
| 78 | 78 | /* input = 0x6007 - data = 0x629b */ |
| 79 | static UINT8 mcu_table6[MCU_KEY_TABLE_SIZE] = { | |
| 79 | static const UINT8 mcu_table6[MCU_KEY_TABLE_SIZE] = { | |
| 80 | 80 | 0x2b, 0x03, 0xd0, 0x07, 0xd8, 0x02, 0x9a, 0x08, |
| 81 | 81 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 82 | 82 | }; |
| 83 | 83 | |
| 84 | 84 | /* input = 0x6007 - data = 0x629b */ |
| 85 | static UINT8 mcu_table7[MCU_KEY_TABLE_SIZE] = { | |
| 85 | static const UINT8 mcu_table7[MCU_KEY_TABLE_SIZE] = { | |
| 86 | 86 | 0xfa, 0x0e, 0x9a, 0x08, 0x00, 0x00, 0x00, 0x00, |
| 87 | 87 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 88 | 88 | }; |
| 89 | 89 | |
| 90 | 90 | /* input = 0x6011 - data = 0x607f */ |
| 91 | static UINT8 mcu_table8[MCU_KEY_TABLE_SIZE*2] = { | |
| 91 | static const UINT8 mcu_table8[MCU_KEY_TABLE_SIZE*2] = { | |
| 92 | 92 | 0x0b, 0x78, 0x47, 0x04, 0x36, 0x18, 0x23, 0xf1, |
| 93 | 93 | 0x10, 0xee, 0x16, 0x04, 0x11, 0x94, 0x16, 0xdd, |
| 94 | 94 | |
| r1386 | r1387 | |
| 199 | 199 | /* Exciting Soccer II */ |
| 200 | 200 | |
| 201 | 201 | /* input = 0x6009 - data = 0x6170 */ |
| 202 | static UINT8 exctscc2_mcu_table1[MCU_KEY_TABLE_SIZE] = { | |
| 202 | static const UINT8 exctscc2_mcu_table1[MCU_KEY_TABLE_SIZE] = { | |
| 203 | 203 | 0x56, 0x05, 0x90, 0x08, 0x19, 0x3e, 0xa8, 0x03, |
| 204 | 204 | 0x2f, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 205 | 205 | }; |
| 206 | 206 | |
| 207 | 207 | /* input = 0x600d - data = 0x61f0 */ |
| 208 | static UINT8 exctscc2_mcu_table2[MCU_KEY_TABLE_SIZE] = { | |
| 208 | static const UINT8 exctscc2_mcu_table2[MCU_KEY_TABLE_SIZE] = { | |
| 209 | 209 | 0xff, 0x27, 0x35, 0x10, 0xd9, 0x06, 0xc3, 0x02, |
| 210 | 210 | 0x4d, 0x12, 0x9e, 0x09, 0x14, 0x10, 0x24, 0x10 |
| 211 | 211 | }; |
| 212 | 212 | |
| 213 | 213 | /* input = ?????? - data = 0x6300 */ |
| 214 | static UINT8 exctscc2_mcu_table3[MCU_KEY_TABLE_SIZE*4] = { | |
| 214 | static const UINT8 exctscc2_mcu_table3[MCU_KEY_TABLE_SIZE*4] = { | |
| 215 | 215 | 0x41, 0x29, 0xb2, 0x12, 0x91, 0x26, 0xa6, 0x16, //0x12b2? |
| 216 | 216 | 0x5f, 0x20, 0xc4, 0x21, 0xc1, 0x24, 0x3e, 0x2f, |
| 217 | 217 | |
| r1386 | r1387 | |
| 226 | 226 | }; |
| 227 | 227 | |
| 228 | 228 | /* input = 0x6007 - data = 0x629b */ |
| 229 | static UINT8 exctscc2_mcu_table4[MCU_KEY_TABLE_SIZE] = { | |
| 229 | static const UINT8 exctscc2_mcu_table4[MCU_KEY_TABLE_SIZE] = { | |
| 230 | 230 | 0x55, 0x27, 0x55, 0x27, 0xf3, 0x41, 0x65, 0x08, |
| 231 | 231 | 0xe3, 0x0b, 0x01, 0x03, 0x2f, 0x09, 0x00, 0x00 |
| 232 | 232 | }; |
| 233 | 233 | |
| 234 | 234 | /* input = 0x6007 - data = 0x629b */ |
| 235 | static UINT8 exctscc2_mcu_table5[MCU_KEY_TABLE_SIZE] = { | |
| 235 | static const UINT8 exctscc2_mcu_table5[MCU_KEY_TABLE_SIZE] = { | |
| 236 | 236 | 0xdd, 0x45, 0x65, 0x08, 0x01, 0x03, 0x2f, 0x09, |
| 237 | 237 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 238 | 238 | }; |
| 239 | 239 | |
| 240 | 240 | /* input = 0x6007 - data = 0x629b */ |
| 241 | static UINT8 exctscc2_mcu_table6[MCU_KEY_TABLE_SIZE] = { | |
| 241 | static const UINT8 exctscc2_mcu_table6[MCU_KEY_TABLE_SIZE] = { | |
| 242 | 242 | 0x54, 0x03, 0x65, 0x08, 0x01, 0x03, 0x2f, 0x09, |
| 243 | 243 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 244 | 244 | }; |
| 245 | 245 | |
| 246 | 246 | /* input = 0x6007 - data = 0x629b */ |
| 247 | static UINT8 exctscc2_mcu_table7[MCU_KEY_TABLE_SIZE] = { | |
| 247 | static const UINT8 exctscc2_mcu_table7[MCU_KEY_TABLE_SIZE] = { | |
| 248 | 248 | 0xe4, 0x0e, 0x2f, 0x09, 0x00, 0x00, 0x00, 0x00, |
| 249 | 249 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 250 | 250 | }; |
| 251 | 251 | |
| 252 | 252 | /* input = 0x6011 - data = 0x607f */ |
| 253 | static UINT8 exctscc2_mcu_table8[MCU_KEY_TABLE_SIZE*2] = { | |
| 253 | static const UINT8 exctscc2_mcu_table8[MCU_KEY_TABLE_SIZE*2] = { | |
| 254 | 254 | 0x0c, 0x54, 0x4b, 0x0d, 0x38, 0xbd, 0x26, 0x81, |
| 255 | 255 | 0x12, 0x37, 0x18, 0x4a, 0x13, 0x0f, 0x19, 0x23, |
| 256 | 256 |
| r1386 | r1387 | |
|---|---|---|
| 278 | 278 | *************************************/ |
| 279 | 279 | |
| 280 | 280 | /* slapstic 137412-101: Empire Strikes Back/Tetris (NOT confirmed) */ |
| 281 | static struct slapstic_data slapstic101 = | |
| 281 | static const struct slapstic_data slapstic101 = | |
| 282 | 282 | { |
| 283 | 283 | /* basic banking */ |
| 284 | 284 | 3, /* starting bank */ |
| r1386 | r1387 | |
| 305 | 305 | |
| 306 | 306 | |
| 307 | 307 | /* slapstic 137412-103: Marble Madness (confirmed) */ |
| 308 | static struct slapstic_data slapstic103 = | |
| 308 | static const struct slapstic_data slapstic103 = | |
| 309 | 309 | { |
| 310 | 310 | /* basic banking */ |
| 311 | 311 | 3, /* starting bank */ |
| r1386 | r1387 | |
| 332 | 332 | |
| 333 | 333 | |
| 334 | 334 | /* slapstic 137412-104: Gauntlet (confirmed) */ |
| 335 | static struct slapstic_data slapstic104 = | |
| 335 | static const struct slapstic_data slapstic104 = | |
| 336 | 336 | { |
| 337 | 337 | /* basic banking */ |
| 338 | 338 | 3, /* starting bank */ |
| r1386 | r1387 | |
| 359 | 359 | |
| 360 | 360 | |
| 361 | 361 | /* slapstic 137412-105: Indiana Jones/Paperboy (confirmed) */ |
| 362 | static struct slapstic_data slapstic105 = | |
| 362 | static const struct slapstic_data slapstic105 = | |
| 363 | 363 | { |
| 364 | 364 | /* basic banking */ |
| 365 | 365 | 3, /* starting bank */ |
| r1386 | r1387 | |
| 386 | 386 | |
| 387 | 387 | |
| 388 | 388 | /* slapstic 137412-106: Gauntlet II (confirmed) */ |
| 389 | static struct slapstic_data slapstic106 = | |
| 389 | static const struct slapstic_data slapstic106 = | |
| 390 | 390 | { |
| 391 | 391 | /* basic banking */ |
| 392 | 392 | 3, /* starting bank */ |
| r1386 | r1387 | |
| 413 | 413 | |
| 414 | 414 | |
| 415 | 415 | /* slapstic 137412-107: Peter Packrat/Xybots/2p Gauntlet/720 (confirmed) */ |
| 416 | static struct slapstic_data slapstic107 = | |
| 416 | static const struct slapstic_data slapstic107 = | |
| 417 | 417 | { |
| 418 | 418 | /* basic banking */ |
| 419 | 419 | 3, /* starting bank */ |
| r1386 | r1387 | |
| 440 | 440 | |
| 441 | 441 | |
| 442 | 442 | /* slapstic 137412-108: Road Runner/Super Sprint (confirmed) */ |
| 443 | static struct slapstic_data slapstic108 = | |
| 443 | static const struct slapstic_data slapstic108 = | |
| 444 | 444 | { |
| 445 | 445 | /* basic banking */ |
| 446 | 446 | 3, /* starting bank */ |
| r1386 | r1387 | |
| 467 | 467 | |
| 468 | 468 | |
| 469 | 469 | /* slapstic 137412-109: Championship Sprint/Road Blasters (confirmed) */ |
| 470 | static struct slapstic_data slapstic109 = | |
| 470 | static const struct slapstic_data slapstic109 = | |
| 471 | 471 | { |
| 472 | 472 | /* basic banking */ |
| 473 | 473 | 3, /* starting bank */ |
| r1386 | r1387 | |
| 494 | 494 | |
| 495 | 495 | |
| 496 | 496 | /* slapstic 137412-110: Road Blasters/APB (confirmed) */ |
| 497 | static struct slapstic_data slapstic110 = | |
| 497 | static const struct slapstic_data slapstic110 = | |
| 498 | 498 | { |
| 499 | 499 | /* basic banking */ |
| 500 | 500 | 3, /* starting bank */ |
| r1386 | r1387 | |
| 528 | 528 | *************************************/ |
| 529 | 529 | |
| 530 | 530 | /* slapstic 137412-111: Pit Fighter (confirmed) */ |
| 531 | static struct slapstic_data slapstic111 = | |
| 531 | static const struct slapstic_data slapstic111 = | |
| 532 | 532 | { |
| 533 | 533 | /* basic banking */ |
| 534 | 534 | 0, /* starting bank */ |
| r1386 | r1387 | |
| 554 | 554 | |
| 555 | 555 | |
| 556 | 556 | /* slapstic 137412-112: Pit Fighter (Japan) (confirmed) */ |
| 557 | static struct slapstic_data slapstic112 = | |
| 557 | static const struct slapstic_data slapstic112 = | |
| 558 | 558 | { |
| 559 | 559 | /* basic banking */ |
| 560 | 560 | 0, /* starting bank */ |
| r1386 | r1387 | |
| 580 | 580 | |
| 581 | 581 | |
| 582 | 582 | /* slapstic 137412-113: Unknown (Europe) (confirmed) */ |
| 583 | static struct slapstic_data slapstic113 = | |
| 583 | static const struct slapstic_data slapstic113 = | |
| 584 | 584 | { |
| 585 | 585 | /* basic banking */ |
| 586 | 586 | 0, /* starting bank */ |
| r1386 | r1387 | |
| 606 | 606 | |
| 607 | 607 | |
| 608 | 608 | /* slapstic 137412-114: Unknown (Europe) (unconfirmed) */ |
| 609 | static struct slapstic_data slapstic114 = | |
| 609 | static const struct slapstic_data slapstic114 = | |
| 610 | 610 | { |
| 611 | 611 | /* basic banking */ |
| 612 | 612 | 0, /* starting bank */ |
| r1386 | r1387 | |
| 632 | 632 | |
| 633 | 633 | |
| 634 | 634 | /* slapstic 137412-115: Race Drivin' DSK board (confirmed) */ |
| 635 | static struct slapstic_data slapstic115 = | |
| 635 | static const struct slapstic_data slapstic115 = | |
| 636 | 636 | { |
| 637 | 637 | /* basic banking */ |
| 638 | 638 | 0, /* starting bank */ |
| r1386 | r1387 | |
| 658 | 658 | |
| 659 | 659 | |
| 660 | 660 | /* slapstic 137412-116: Hydra (confirmed) */ |
| 661 | static struct slapstic_data slapstic116 = | |
| 661 | static const struct slapstic_data slapstic116 = | |
| 662 | 662 | { |
| 663 | 663 | /* basic banking */ |
| 664 | 664 | 0, /* starting bank */ |
| r1386 | r1387 | |
| 684 | 684 | |
| 685 | 685 | |
| 686 | 686 | /* slapstic 137412-117: Race Drivin' main board (confirmed) */ |
| 687 | static struct slapstic_data slapstic117 = | |
| 687 | static const struct slapstic_data slapstic117 = | |
| 688 | 688 | { |
| 689 | 689 | /* basic banking */ |
| 690 | 690 | 0, /* starting bank */ |
| r1386 | r1387 | |
| 710 | 710 | |
| 711 | 711 | |
| 712 | 712 | /* slapstic 137412-118: Rampart/Vindicators II (confirmed) */ |
| 713 | static struct slapstic_data slapstic118 = | |
| 713 | static const struct slapstic_data slapstic118 = | |
| 714 | 714 | { |
| 715 | 715 | /* basic banking */ |
| 716 | 716 | 0, /* starting bank */ |
| r1386 | r1387 | |
| 743 | 743 | *************************************/ |
| 744 | 744 | |
| 745 | 745 | /* master table */ |
| 746 | static struct slapstic_data *slapstic_table[] = | |
| 746 | static const struct slapstic_data *const slapstic_table[] = | |
| 747 | 747 | { |
| 748 | 748 | &slapstic101, /* NOT confirmed! */ |
| 749 | 749 | NULL, /* never seen */ |
| r1386 | r1387 | |
|---|---|---|
| 1701 | 1701 | DRIVER( slapshot ) /* D71 (c) 1994 Taito Corporation (Japan) */ |
| 1702 | 1702 | DRIVER( opwolf3 ) /* D74 (c) 1994 Taito */ |
| 1703 | 1703 | DRIVER( opwolf3u ) /* D74 (c) 1994 Taito */ |
| 1704 | DRIVER( scessjoe ) /* ??? (c) 1990 Wave / Taito */ | |
| 1704 | 1705 | DRIVER( ashnojoe ) /* ??? (c) 1990 Wave / Taito */ |
| 1705 | 1706 | |
| 1706 | 1707 | /* Taito multi-screen games */ |
| r1386 | r1387 | |
| 2740 | 2741 | DRIVER( glpracr3 ) /* Gallop Racer 3 (JAPAN) */ |
| 2741 | 2742 | DRIVER( flamegun ) /* Flame Gunner (USA) */ |
| 2742 | 2743 | DRIVER( flameguj ) /* Flame Gunner (JAPAN) */ |
| 2744 | DRIVER( tblkkuzu ) /* The Block Kuzushi (JAPAN) */ | |
| 2745 | DRIVER( 1on1gov ) /* 1 on 1 Government (JAPAN) */ | |
| 2743 | 2746 | DRIVER( tecmowcm ) /* Tecmo World Cup Millenium (JAPAN) */ |
| 2744 | 2747 | DRIVER( mfjump ) /* Monster Farm Jump (JAPAN) */ |
| 2745 | 2748 | |
| r1386 | r1387 | |
| 3271 | 3274 | DRIVER( sscandal ) /* 834-5755 (c) 1985 Coreland / Sega (S1) */ |
| 3272 | 3275 | DRIVER( myherok ) /* 834-5755 (c) 1985 Coreland / Sega (S1) */ |
| 3273 | 3276 | DRIVER( shtngmst ) /* 834-5719/5720 (c) 1985 (S2) */ |
| 3274 | DRIVER( shtngmsa ) /* 834-5719/5720 (c) 1985 (S2) */ | |
| 3275 | DRIVER( shtngmsb ) /* 834-5719/5720 (c) 1985 (S2) */ | |
| 3277 | DRIVER( shtngms1 ) /* 834-5719/5720 (c) 1985 (S2) */ | |
| 3278 | DRIVER( shtngmsa ) /* 834-5719/5720 (c) 1985 (S2) */ | |
| 3276 | 3279 | DRIVER( chplft ) /* 834-5795 (c) 1985, (c) 1982 Dan Gorlin (S2) */ |
| 3277 | 3280 | DRIVER( chplftb ) /* 834-5795 (c) 1985, (c) 1982 Dan Gorlin (S2) */ |
| 3278 | 3281 | DRIVER( chplftbl ) /* bootleg (S2) */ |
| r1386 | r1387 | |
| 3679 | 3682 | DRIVER( puyosun ) /* (c) 1996 Compile */ |
| 3680 | 3683 | DRIVER( rsgun ) /* (c) 1998 Treasure */ |
| 3681 | 3684 | DRIVER( sandor ) /* (c) 1995 */ |
| 3685 | DRIVER( sanjeon ) /* (c) 1999 Sega / Deniam */ | |
| 3682 | 3686 | DRIVER( thunt ) /* (c) 1995 Sega (Deniam License) */ |
| 3687 | DRIVER( thuntk ) /* (c) 1995 Sega (Deniam License) */ | |
| 3683 | 3688 | DRIVER( sasissu ) /* (c) 1992 */ |
| 3684 | 3689 | DRIVER( seabass ) /* (c) 1998 A wave Inc (Able License) */ |
| 3685 | 3690 | DRIVER( shanhigw ) /* (c) 1996 */ |
| r1386 | r1387 | |
| 3689 | 3694 | DRIVER( sss ) /* (c) 1998 Capcom / Cave / Victor */ |
| 3690 | 3695 | DRIVER( suikoenb ) /* (c) 1995 Data East */ |
| 3691 | 3696 | DRIVER( twcup98 ) /* (c) 1998 Techmo */ |
| 3697 | DRIVER( stress ) /* (c) 1997 Sega */ | |
| 3692 | 3698 | DRIVER( vfkids ) /* (c) 1995 */ |
| 3693 | 3699 | DRIVER( vfremix ) /* (c) 1996 */ |
| 3694 | 3700 | DRIVER( vmahjong ) /* (c) 1997 Micronet */ |
| r1386 | r1387 | |
| 3703 | 3709 | |
| 3704 | 3710 | DRIVER( sfish2 ) /* (c) 1995 */ |
| 3705 | 3711 | DRIVER( sfish2j ) /* (c) 1995 */ |
| 3712 | DRIVER( magzun ) /* (c) 1995 */ | |
| 3706 | 3713 | |
| 3707 | 3714 | /* Sega Model 2 Games */ |
| 3708 | 3715 | |
| r1386 | r1387 | |
| 3916 | 3923 | /* 45 */ |
| 3917 | 3924 | /* 46 */ |
| 3918 | 3925 | DRIVER( mt_astrm ) /* 47 */ |
| 3919 | | |
| 3926 | DRIVER( mt_wwar ) /* 48 */ | |
| 3920 | 3927 | DRIVER( mt_bbros ) /* 49 */ |
| 3921 | 3928 | /* 50 */ |
| 3922 | 3929 | /* 51 */ |
| r1386 | r1387 | |
| 7868 | 7875 | DRIVER( jongkyo ) /* (c) 1985 Kiwako */ |
| 7869 | 7876 | DRIVER( gtipoker ) /* (c) 1983 GTI Inc */ |
| 7870 | 7877 | DRIVER( gamecstl ) /* MAME based bootleg */ |
| 7878 | DRIVER( drw80pkr ) | |
| 7871 | 7879 | |
| 7872 | 7880 | #endif /* DRIVER_RECURSIVE */ |
| r1386 | r1387 | |
|---|---|---|
| 207 | 207 | |
| 208 | 208 | /*----------- defined in audio/galaxian.c -----------*/ |
| 209 | 209 | |
| 210 | extern struct Samplesinterface galaxian_samples_interface; | |
| 210 | extern const struct Samplesinterface galaxian_samples_interface; | |
| 211 | 211 | WRITE8_HANDLER( galaxian_pitch_w ); |
| 212 | 212 | WRITE8_HANDLER( galaxian_vol_w ); |
| 213 | 213 | WRITE8_HANDLER( galaxian_noise_enable_w ); |
| r1386 | r1387 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | /*----------- defined in audio/astinvad.c -----------*/ |
| 18 | 18 | |
| 19 | extern struct Samplesinterface astinvad_samples_interface; | |
| 19 | extern const struct Samplesinterface astinvad_samples_interface; | |
| 20 | 20 | |
| 21 | 21 | WRITE8_HANDLER( astinvad_sound1_w ); |
| 22 | 22 | WRITE8_HANDLER( astinvad_sound2_w ); |
| r1386 | r1387 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | /*----------- defined in audio/blockade.c -----------*/ |
| 11 | 11 | |
| 12 | extern struct Samplesinterface blockade_samples_interface; | |
| 12 | extern const struct Samplesinterface blockade_samples_interface; | |
| 13 | 13 | DISCRETE_SOUND_EXTERN( blockade ); |
| 14 | 14 | |
| 15 | 15 | WRITE8_HANDLER( blockade_sound_freq_w ); |
| r1386 | r1387 | |
|---|---|---|
| 43 | 43 | |
| 44 | 44 | /*----------- defined in audio/wow.c -----------*/ |
| 45 | 45 | |
| 46 | extern const char *wow_sample_names[]; | |
| 46 | extern const char *const wow_sample_names[]; | |
| 47 | 47 | |
| 48 | 48 | READ8_HANDLER( wow_speech_r ); |
| 49 | 49 | UINT32 wow_speech_status_r(void *param); |
| r1386 | r1387 | |
| 51 | 51 | |
| 52 | 52 | /*----------- defined in audio/gorf.c -----------*/ |
| 53 | 53 | |
| 54 | extern const char *gorf_sample_names[]; | |
| 54 | extern const char *const gorf_sample_names[]; | |
| 55 | 55 | |
| 56 | 56 | READ8_HANDLER( gorf_speech_r ); |
| 57 | 57 | UINT32 gorf_speech_status_r(void *param); |
| r1386 | r1387 | |
|---|---|---|
| 24 | 24 | |
| 25 | 25 | WRITE8_HANDLER( lrescue_sh_port_1_w ); |
| 26 | 26 | WRITE8_HANDLER( lrescue_sh_port_2_w ); |
| 27 | extern struct Samplesinterface lrescue_samples_interface; | |
| 27 | extern const struct Samplesinterface lrescue_samples_interface; | |
| 28 | 28 | |
| 29 | 29 | WRITE8_HANDLER( cosmo_sh_port_2_w ); |
| 30 | 30 | |
| r1386 | r1387 | |
| 45 | 45 | MACHINE_START( schaser ); |
| 46 | 46 | WRITE8_HANDLER( schaser_sh_port_1_w ); |
| 47 | 47 | WRITE8_HANDLER( schaser_sh_port_2_w ); |
| 48 | extern struct SN76477interface schaser_sn76477_interface; | |
| 48 | extern const struct SN76477interface schaser_sn76477_interface; | |
| 49 | 49 | DISCRETE_SOUND_EXTERN( schaser ); |
| 50 | 50 | |
| 51 | 51 | WRITE8_HANDLER( rollingc_sh_port_w ); |
| r1386 | r1387 | |
|---|---|---|
| 13 | 13 | DISCRETE_SOUND_EXTERN( circus ); |
| 14 | 14 | DISCRETE_SOUND_EXTERN( robotbwl ); |
| 15 | 15 | DISCRETE_SOUND_EXTERN( crash ); |
| 16 | extern struct Samplesinterface circus_samples_interface; | |
| 17 | extern struct Samplesinterface crash_samples_interface; | |
| 18 | extern struct Samplesinterface ripcord_samples_interface; | |
| 19 | extern struct Samplesinterface robotbwl_samples_interface; | |
| 16 | extern const struct Samplesinterface circus_samples_interface; | |
| 17 | extern const struct Samplesinterface crash_samples_interface; | |
| 18 | extern const struct Samplesinterface ripcord_samples_interface; | |
| 19 | extern const struct Samplesinterface robotbwl_samples_interface; | |
| 20 | 20 | |
| 21 | 21 | /*----------- defined in video/circus.c -----------*/ |
| 22 | 22 |
| r1386 | r1387 | |
|---|---|---|
| 39 | 39 | /*----------- defined in audio/cclimber.c -----------*/ |
| 40 | 40 | |
| 41 | 41 | extern struct AY8910interface cclimber_ay8910_interface; |
| 42 | extern struct Samplesinterface cclimber_samples_interface; | |
| 42 | extern const struct Samplesinterface cclimber_samples_interface; | |
| 43 | 43 | WRITE8_HANDLER( cclimber_sample_trigger_w ); |
| 44 | 44 | WRITE8_HANDLER( cclimber_sample_rate_w ); |
| 45 | 45 | WRITE8_HANDLER( cclimber_sample_volume_w ); |
| r1386 | r1387 | |
|---|---|---|
| 43 | 43 | #define I8035_DIVIDER (15) |
| 44 | 44 | #define I8035_CLOCK (I8035_MASTER_CLOCK/I8035_DIVIDER) |
| 45 | 45 | |
| 46 | #define HARDWARE_TYPE_TAG "HARDWARE_TYPE" | |
| 47 | #define HARDWARE_TKG04 0 | |
| 48 | #define HARDWARE_TRS01 1 | |
| 49 | #define HARDWARE_TRS02 2 | |
| 50 | #define HARDWARE_TKG02 3 | |
| 46 | 51 | |
| 52 | #define DK2B_PALETTE_LENGTH (256+256+8+1) // (256) | |
| 53 | #define DK4B_PALETTE_LENGTH (256+256+8+1) // (256) | |
| 54 | #define DK3_PALETTE_LENGTH (256+256+8+1) // (256) | |
| 55 | #define RS_PALETTE_LENGTH (256+256+8+1) | |
| 56 | ||
| 57 | typedef struct _dkong_state dkong_state; | |
| 58 | struct _dkong_state | |
| 59 | { | |
| 60 | /* memory pointers */ | |
| 61 | ||
| 62 | /* machine states */ | |
| 63 | UINT8 hardware_type; | |
| 64 | ||
| 65 | /* sound state */ | |
| 66 | ||
| 67 | /* video state */ | |
| 68 | tilemap *bg_tilemap; | |
| 69 | ||
| 70 | mame_bitmap * bg_bits; | |
| 71 | const UINT8 * color_codes; | |
| 72 | emu_timer * scanline_timer; | |
| 73 | INT8 vidhw; /* Selected video hardware RS Conversion / TKG04 */ | |
| 74 | ||
| 75 | /* radar scope */ | |
| 76 | UINT8 sig30Hz; | |
| 77 | UINT8 grid_sig; | |
| 78 | UINT8 rflip_sig; | |
| 79 | UINT8 star_ff; | |
| 80 | UINT8 blue_level; | |
| 81 | double cd4049_a; | |
| 82 | double cd4049_b; | |
| 83 | ||
| 84 | /* Specific states */ | |
| 85 | INT8 decrypt_counter; | |
| 86 | int hunchloopback; | |
| 87 | ||
| 88 | /* Save state relevant */ | |
| 89 | UINT8 gfx_bank, palette_bank; | |
| 90 | UINT8 grid_on; | |
| 91 | UINT8 snd02_enable; | |
| 92 | UINT8 sig_ansn; | |
| 93 | UINT16 grid_col; | |
| 94 | UINT8 sprite_bank; | |
| 95 | UINT8 dma_latch; | |
| 96 | ||
| 97 | /* reverse address lookup map - hunchbkd */ | |
| 98 | INT16 rev_map[0x200]; | |
| 99 | ||
| 100 | }; | |
| 101 | ||
| 47 | 102 | /*----------- defined in video/dkong.c -----------*/ |
| 48 | 103 | |
| 49 | 104 | WRITE8_HANDLER( radarscp_snd02_w ); /* to daisy chain sound 02 signal */ |
| r1386 | r1387 | |
| 59 | 114 | |
| 60 | 115 | WRITE8_HANDLER( dkong_videoram_w ); |
| 61 | 116 | |
| 62 | PALETTE_INIT( dkong ); | |
| 117 | PALETTE_INIT( dkong2b ); | |
| 118 | PALETTE_INIT( dkong4b ); | |
| 63 | 119 | PALETTE_INIT( radarscp ); |
| 64 | 120 | PALETTE_INIT( radarsc1 ); |
| 65 | 121 | PALETTE_INIT( dkong3 ); |
| 66 | 122 | |
| 67 | 123 | VIDEO_START( dkong ); |
| 68 | VIDEO_START( radarsc1 ); | |
| 69 | VIDEO_START( radarscp ); | |
| 70 | VIDEO_UPDATE( radarscp ); | |
| 71 | 124 | VIDEO_UPDATE( dkong ); |
| 72 | 125 | VIDEO_UPDATE( pestplce ); |
| 73 | 126 | VIDEO_UPDATE( spclforc ); |
| r1386 | r1387 | |
| 86 | 139 | |
| 87 | 140 | /*----------- defined in audio/dkong.c -----------*/ |
| 88 | 141 | |
| 89 | READ8_HANDLER( dkong_sh_p1_r ); | |
| 90 | READ8_HANDLER( dkong_sh_p2_r ); | |
| 91 | READ8_HANDLER( dkong_sh_t0_r ); | |
| 92 | READ8_HANDLER( dkong_sh_t1_r ); | |
| 93 | READ8_HANDLER( dkong_sh_tune_r ); | |
| 94 | READ8_HANDLER( dkong_in2_r ); | |
| 142 | READ8_HANDLER( dkong_audio_status_r ); | |
| 143 | WRITE8_HANDLER( dkong_audio_irq_w ); | |
| 95 | 144 | |
| 96 | WRITE8_HANDLER( radarsc1_snd_disc_w ); | |
| 97 | WRITE8_HANDLER( dkong_sh_w ); | |
| 98 | WRITE8_HANDLER( dkong_sh_p1_w ); | |
| 99 | WRITE8_HANDLER( dkong_sh_p2_w ); | |
| 100 | ||
| 101 | 145 | WRITE8_HANDLER( dkong_snd_disc_w ); |
| 102 | 146 | WRITE8_HANDLER( dkong_sh_tuneselect_w ); |
| 103 | 147 | |
| 104 | 148 | WRITE8_HANDLER( dkongjr_sh_test6_w ); |
| 105 | WRITE8_HANDLER( dkongjr_sh_test5_w ); | |
| 106 | WRITE8_HANDLER( dkongjr_sh_test4_w ); | |
| 107 | 149 | WRITE8_HANDLER( dkongjr_sh_tuneselect_w ); |
| 108 | 150 | |
| 109 | 151 | WRITE8_HANDLER( dkongjr_snd_w1 ); |
| 110 | 152 | WRITE8_HANDLER( dkongjr_snd_w2 ); |
| 111 | 153 | |
| 112 | READ8_HANDLER( radarsc1_sh_tune_r ); | |
| 113 | READ8_HANDLER( radarsc1_sh_p1_r ); | |
| 114 | WRITE8_HANDLER( radarsc1_sh_p1_w ); | |
| 115 | WRITE8_HANDLER( radarsc1_sh_p2_w ); | |
| 154 | MACHINE_DRIVER_EXTERN( radarscp_audio ); | |
| 155 | MACHINE_DRIVER_EXTERN( dkong2b_audio ); | |
| 156 | MACHINE_DRIVER_EXTERN( dkongjr_audio ); | |
| 157 | MACHINE_DRIVER_EXTERN( dkong3_audio ); | |
| 158 | MACHINE_DRIVER_EXTERN( radarsc1_audio ); | |
| 116 | 159 | |
| 117 | SOUND_START( dkong ); | |
| 118 | SOUND_START( dkongjr ); | |
| 119 | SOUND_START( hunchbkd ); | |
| 120 | SOUND_START( radarsc1 ); | |
| 121 | ||
| 122 | DISCRETE_SOUND_EXTERN( dkong ); | |
| 123 | DISCRETE_SOUND_EXTERN( radarscp ); | |
| 124 |
| r1386 | r1387 | |
|---|---|---|
| 23 | 23 | /*----------- defined in audio/triplhnt.c -----------*/ |
| 24 | 24 | |
| 25 | 25 | DISCRETE_SOUND_EXTERN( triplhnt ); |
| 26 | extern struct Samplesinterface triplhnt_samples_interface; | |
| 26 | extern const struct Samplesinterface triplhnt_samples_interface; | |
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | /*----------- defined in video/triplhnt.c -----------*/ |
| r1386 | r1387 | |
|---|---|---|
| 1513 | 1513 | $(DRIVERS)/dorachan.o \ |
| 1514 | 1514 | $(DRIVERS)/dreamwld.o \ |
| 1515 | 1515 | $(DRIVERS)/dribling.o $(VIDEO)/dribling.o \ |
| 1516 | $(DRIVERS)/drw80pkr.o \ | |
| 1516 | 1517 | $(DRIVERS)/dwarfd.o \ |
| 1517 | 1518 | $(DRIVERS)/dynadice.o \ |
| 1518 | 1519 | $(DRIVERS)/epos.o $(VIDEO)/epos.o \ |
| r1386 | r1387 | |
|---|---|---|
| 18 | 18 | *************************************/ |
| 19 | 19 | |
| 20 | 20 | #define WAVERAM_WIDTH 512 |
| 21 | #define WAVERAM_HEIGHT | |
| 21 | #define WAVERAM_HEIGHT 2048 | |
| 22 | 22 | |
| 23 | 23 | |
| 24 | 24 | |
| r1386 | r1387 | |
| 31 | 31 | typedef struct _poly_extra_data poly_extra_data; |
| 32 | 32 | struct _poly_extra_data |
| 33 | 33 | { |
| 34 | const UINT32 * palbase; | |
| 35 | const UINT32 * texbase; | |
| 34 | const UINT64 * palbase; | |
| 35 | const UINT64 * texbase; | |
| 36 | 36 | UINT16 transcolor; |
| 37 | 37 | UINT16 texwidth; |
| 38 | 38 | UINT16 color; |
| r1386 | r1387 | |
| 56 | 56 | static UINT8 zeuscmd_buffer_expected_words; |
| 57 | 57 | static INT16 zeus_matrix[3][3]; |
| 58 | 58 | static INT32 zeus_point[3]; |
| 59 | static UINT32 *zeus_palbase; | |
| 59 | static UINT64 *zeus_renderbase; | |
| 60 | static UINT64 *zeus_palbase; | |
| 60 | 61 | static int zeus_enable_logging; |
| 61 | 62 | static UINT32 zeus_blend; |
| 62 | 63 | static UINT32 zeus_texdata; |
| 63 | 64 | static UINT32 zeus_objdata; |
| 64 | 65 | |
| 65 | static UINT | |
| 66 | static UINT64 *waveram[2]; | |
| 66 | 67 | |
| 67 | 68 | static UINT8 single_step; |
| 68 | 69 | static poly_extra_data single_step_extra; |
| r1386 | r1387 | |
| 95 | 96 | * |
| 96 | 97 | *************************************/ |
| 97 | 98 | |
| 98 | INLINE UINT | |
| 99 | INLINE UINT64 *waveram_ptr_from_block_addr(UINT8 bank, UINT32 addr) | |
| 99 | 100 | { |
| 100 | return &waveram[( | |
| 101 | return &waveram[bank][( | |
| 101 | 102 | } |
| 102 | 103 | |
| 103 | 104 | |
| 104 | INLINE UINT | |
| 105 | INLINE UINT64 *waveram_ptr_from_expanded_addr(UINT8 bank, UINT32 addr | |
| 105 | 106 | { |
| 106 | return &waveram[bank | |
| 107 | return &waveram[bank][(addr % | |
| 107 | 108 | } |
| 108 | 109 | |
| 109 | 110 | |
| 111 | INLINE UINT64 *waveram_ptr_from_texture_addr(UINT8 bank, UINT32 addr, int width) | |
| 112 | { | |
| 113 | return &waveram[bank][(addr * width) / 8]; | |
| 114 | } | |
| 115 | ||
| 116 | ||
| 117 | INLINE UINT16 *waveram_pixel_ptr(UINT64 *base, int y, int x, UINT16 **depthptr) | |
| 118 | { | |
| 119 | UINT16 *baseptr = (UINT16 *)base + y * 512*2 + (x & ~1) * 2; | |
| 120 | if (depthptr != NULL) | |
| 121 | *depthptr = baseptr + BYTE4_XOR_LE((x & 1) + 2); | |
| 122 | return baseptr + BYTE4_XOR_LE(x & 1); | |
| 123 | } | |
| 124 | ||
| 125 | ||
| 110 | 126 | INLINE void waveram_plot(int y, int x, UINT16 color) |
| 111 | 127 | { |
| 112 | 128 | if (x >= 0 && x < 400 && y >= 0 && y < 256) |
| 113 | 129 | { |
| 114 | UINT32 *ptr = waveram_pixel_ptr(1, y, x); | |
| 115 | if (x & 1) | |
| 116 | *ptr = (*ptr & 0x0000ffff) | (color << 16); | |
| 117 | else | |
| 118 | *ptr = (*ptr & 0xffff0000) | color; | |
| 130 | UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, y, x, NULL); | |
| 131 | *ptr = color; | |
| 119 | 132 | } |
| 120 | 133 | } |
| 121 | 134 | |
| r1386 | r1387 | |
| 124 | 137 | { |
| 125 | 138 | if (x >= 0 && x < 400 && y >= 0 && y < 256) |
| 126 | 139 | { |
| 127 | UINT32 *ptr = waveram_pixel_ptr(1, y, x); | |
| 128 | if (x & 1) | |
| 129 | { | |
| 130 | ptr[0] = (ptr[0] & 0x0000ffff) | (color << 16); | |
| 131 | ptr[1] = (ptr[1] & 0x0000ffff) | (depth << 16); | |
| 132 | } | |
| 133 | else | |
| 134 | { | |
| 135 | ptr[0] = (ptr[0] & 0xffff0000) | color; | |
| 136 | ptr[1] = (ptr[1] & 0xffff0000) | depth; | |
| 137 | } | |
| 140 | UINT16 *depthptr; | |
| 141 | UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, y, x, &depthptr); | |
| 142 | *ptr = color; | |
| 143 | *depthptr = depth; | |
| 138 | 144 | } |
| 139 | 145 | } |
| 140 | 146 | |
| r1386 | r1387 | |
| 143 | 149 | { |
| 144 | 150 | if (x >= 0 && x < 400 && y >= 0 && y < 256) |
| 145 | 151 | { |
| 146 | UINT32 *ptr = waveram_pixel_ptr(1, y, x); | |
| 147 | if (x & 1) | |
| 152 | UINT16 *depthptr; | |
| 153 | UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, y, x, &depthptr); | |
| 154 | if (depth <= *depthptr) | |
| 148 | 155 | { |
| 149 | if (depth <= (ptr[1] >> 16)) | |
| 150 | { | |
| 151 | ptr[0] = (ptr[0] & 0x0000ffff) | (color << 16); | |
| 152 | ptr[1] = (ptr[1] & 0x0000ffff) | (depth << 16); | |
| 153 | } | |
| 156 | *ptr = color; | |
| 157 | *depthptr = depth; | |
| 154 | 158 | } |
| 155 | else | |
| 156 | { | |
| 157 | if (depth <= (ptr[1] & 0xffff)) | |
| 158 | { | |
| 159 | ptr[0] = (ptr[0] & 0xffff0000) | color; | |
| 160 | ptr[1] = (ptr[1] & 0xffff0000) | depth; | |
| 161 | } | |
| 162 | } | |
| 163 | 159 | } |
| 164 | 160 | } |
| 165 | 161 | |
| 166 | 162 | |
| 167 | INLINE UINT | |
| 163 | INLINE UINT8 | |
| 168 | 164 | { |
| 169 | int bank = (zeusbase[0xb6] >> 31) & 1; | |
| 170 | int x = (zeusbase[0xb4] & 0xff) << 1; | |
| 171 | int y = ((zeusbase[0xb4] >> 15) & 0xffe) | ((zeusbase[0xb4] >> 8) & 0x01); | |
| 172 | return waveram_pixel_ptr(bank, y, x); | |
| 165 | const UINT8 *base8 = (const UINT8 *)base; | |
| 166 | x &= width - 1; | |
| 167 | base8 += BYTE8_XOR_LE((y / 2) * (width * 2) + (x / 4) * 8 + (y & 1) * 4 + (x & 3)); | |
| 168 | return *base8; | |
| 173 | 169 | } |
| 174 | 170 | |
| 175 | 171 | |
| 176 | INLINE UINT8 get_texel_ | |
| 172 | INLINE UINT8 get_texel_4bit(const UINT64 *base, int y, int x, int width) | |
| 177 | 173 | { |
| 178 | if (x >= width) | |
| 179 | return 0; | |
| 180 | base += (y / 2) * (width / 2) + (x / 4) * 2 + (y & 1); | |
| 181 | return *base >> (8 * (x & 3)); | |
| 174 | const UINT8 *base8 = (const UINT8 *)base; | |
| 175 | x &= (width * 2) - 1; | |
| 176 | base8 += BYTE8_XOR_LE((y / 2) * (width * 2) + (x / 8) * 8 + (y & 1) * 4 + ((x / 2) & 3)); | |
| 177 | return (*base8 >> (4 * (x & 1))) & 0x0f; | |
| 182 | 178 | } |
| 183 | 179 | |
| 184 | 180 | |
| 185 | INLINE UINT | |
| 181 | INLINE UINT16 get_palette | |
| 186 | 182 | { |
| 187 | if (x >= width * 2) | |
| 188 | return 0; | |
| 189 | base += (y / 2) * (width / 2) + (x / 8) * 2 + (y & 1); | |
| 190 | return (*base >> (4 * (x & 7))) & 0x0f; | |
| 183 | const UINT16 *base16 = (const UINT16 *)palbase; | |
| 184 | return base16[BYTE4_XOR_LE(texel)]; | |
| 191 | 185 | } |
| 192 | 186 | |
| 193 | 187 | |
| r1386 | r1387 | |
| 203 | 197 | int i; |
| 204 | 198 | |
| 205 | 199 | /* allocate memory for "wave" RAM */ |
| 206 | waveram = auto_malloc(2 * WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram)); | |
| 207 | state_save_register_global_pointer(waveram, 2 * WAVERAM_WIDTH * WAVERAM_HEIGHT); | |
| 200 | waveram[0] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram)); | |
| 201 | waveram[1] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram)); | |
| 202 | state_save_register_global_pointer(waveram[0], WAVERAM_WIDTH * WAVERAM_HEIGHT); | |
| 203 | state_save_register_global_pointer(waveram[1], WAVERAM_WIDTH * WAVERAM_HEIGHT); | |
| 208 | 204 | |
| 209 | 205 | /* initialize a 5-5-5 palette */ |
| 210 | 206 | for (i = 0; i < 32768; i++) |
| r1386 | r1387 | |
| 215 | 211 | |
| 216 | 212 | /* we need to cleanup on exit */ |
| 217 | 213 | add_exit_callback(machine, exit_handler); |
| 214 | ||
| 215 | zeus_renderbase = waveram[1]; | |
| 218 | 216 | } |
| 219 | 217 | |
| 220 | 218 | |
| 221 | 219 | static void exit_handler(running_machine *machine) |
| 222 | 220 | { |
| 223 | 221 | FILE *f = fopen("waveram.dmp", "w"); |
| 222 | int bank; | |
| 224 | 223 | int i; |
| 225 | 224 | |
| 226 | for (i = 0; i < 2 * WAVERAM_WIDTH * WAVERAM_HEIGHT; i += 2) | |
| 227 | { | |
| 228 | if (i % 8 == 0) fprintf(f, "%03X%03X: ", (i / 1024), (i / 2) & 0x1ff); | |
| 229 | fprintf(f, " %08X %08X ", waveram[i+0], waveram[i+1]); | |
| 230 | if (i % 8 == 6) fprintf(f, "\n"); | |
| 231 | } | |
| 225 | for (bank = 0; bank < 2; bank++) | |
| 226 | for (i = 0; i < WAVERAM_WIDTH * WAVERAM_HEIGHT; i++) | |
| 227 | { | |
| 228 | if (i % 4 == 0) fprintf(f, "%03X%03X: ", i / WAVERAM_WIDTH, i % WAVERAM_WIDTH); | |
| 229 | fprintf(f, " %08X %08X ", (UINT32)(waveram[bank][i] >> 32), (UINT32)waveram[bank][i]); | |
| 230 | if (i % 4 == 3) fprintf(f, "\n"); | |
| 231 | } | |
| 232 | 232 | fclose(f); |
| 233 | ||
| 234 | poly_free(poly); | |
| 233 | 235 | } |
| 234 | 236 | |
| 235 | 237 | |
| r1386 | r1387 | |
| 247 | 249 | /* normal update case */ |
| 248 | 250 | if (!input_code_pressed(KEYCODE_W)) |
| 249 | 251 | { |
| 252 | UINT64 *base = waveram_ptr_from_expanded_addr(1, zeusbase[0xcc]); | |
| 250 | 253 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) |
| 251 | 254 | { |
| 252 | UINT32 *src = waveram_pixel_ptr(1, y, 0); | |
| 253 | 255 | UINT16 *dest = (UINT16 *)bitmap->base + y * bitmap->rowpixels; |
| 254 | for (x = cliprect->min_x; x <= cliprect->max_x; x += 2) | |
| 255 | { | |
| 256 | UINT32 pixels = *src; | |
| 257 | dest[x+0] = pixels & 0x7fff; | |
| 258 | dest[x+1] = (pixels >> 16) & 0x7fff; | |
| 259 | src += 2; | |
| 260 | } | |
| 256 | for (x = cliprect->min_x; x <= cliprect->max_x; x++) | |
| 257 | dest[x] = *waveram_pixel_ptr(base, y, x, NULL); | |
| 261 | 258 | } |
| 262 | 259 | |
| 263 | 260 | if (single_step) |
| 264 | 261 | { |
| 265 | 262 | int texwshift = ((single_step_val2 >> 6) + single_step_dx) & 7; |
| 266 | const UINT32 *texbase = &waveram[(single_step_val1 << ((7 + single_step_dy) - texwshift)) & 0x3fffff]; | |
| 267 | 263 | int texwidth = 512 >> texwshift; |
| 268 | 264 | int texdepth = (single_step_val2 & 0x20) ? 8 : 4; |
| 265 | const UINT64 *texbase = waveram_ptr_from_texture_addr(0, single_step_val1, texwidth); | |
| 269 | 266 | int x, y; |
| 270 | 267 | |
| 271 | 268 | for (y = 0; y < 256; y++) |
| r1386 | r1387 | |
| 274 | 271 | for (x = 0; x < 256; x++) |
| 275 | 272 | { |
| 276 | 273 | if (x < texwidth) |
| 277 | dest[x] = single_step_extra.palbase[(texdepth == 8) ? | |
| 278 | get_texel_8bit(texbase, y, x, texwidth) : | |
| 279 | get_texel_4bit(texbase, y, x, texwidth)]; | |
| 274 | dest[x] = get_palette_entry(single_step_extra.palbase, (texdepth == 8) ? get_texel_8bit(texbase, y, x, texwidth) : get_texel_4bit(texbase, y, x, texwidth)); | |
| 280 | 275 | else |
| 281 | 276 | dest[x] = 0; |
| 282 | 277 | } |
| r1386 | r1387 | |
| 297 | 292 | { |
| 298 | 293 | static int yoffs = 0; |
| 299 | 294 | static int width = 256; |
| 300 | UINT | |
| 295 | const UINT64 *base; | |
| 301 | 296 | |
| 302 | 297 | if (input_code_pressed(KEYCODE_DOWN)) yoffs += input_code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; |
| 303 | 298 | if (input_code_pressed(KEYCODE_UP)) yoffs -= input_code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; |
| r1386 | r1387 | |
| 305 | 300 | if (input_code_pressed(KEYCODE_RIGHT) && width < 512) { width <<= 1; while (input_code_pressed(KEYCODE_RIGHT)) ; } |
| 306 | 301 | |
| 307 | 302 | if (yoffs < 0) yoffs = 0; |
| 308 | base = waveram_ptr_from_addr(yoffs << 12); | |
| 303 | base = waveram_ptr_from_block_addr(0, yoffs << 12); | |
| 309 | 304 | |
| 310 | 305 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) |
| 311 | 306 | { |
| r1386 | r1387 | |
| 940 | 935 | float doozdx = extent->param[0].dpdx; |
| 941 | 936 | float duozdx = extent->param[1].dpdx; |
| 942 | 937 | float dvozdx = extent->param[2].dpdx; |
| 943 | const UINT32 *texbase = extra->texbase; | |
| 944 | const UINT32 *palbase = extra->palbase; | |
| 938 | const UINT64 *texbase = extra->texbase; | |
| 939 | const UINT64 *palbase = extra->palbase; | |
| 945 | 940 | UINT16 transcolor = extra->transcolor; |
| 946 | 941 | int texwidth = extra->texwidth; |
| 947 | 942 | int x; |
| r1386 | r1387 | |
| 957 | 952 | UINT8 texel = get_texel_4bit(texbase, v, u, texwidth); |
| 958 | 953 | if (texel != transcolor) |
| 959 | 954 | { |
| 960 | UINT16 color = palbase[texel >> 1] >> (16 * (texel & 1)); | |
| 961 | INT32 depth = z * 256.0f; | |
| 955 | UINT16 color = get_palette_entry(palbase, texel); | |
| 956 | INT32 depth = z; | |
| 962 | 957 | if (depth > 0x7fff) depth = 0x7fff; |
| 963 | 958 | if (depth >= 0) |
| 964 | 959 | waveram_plot_check_depth(scanline, x, color, depth); |
| r1386 | r1387 | |
| 980 | 975 | float doozdx = extent->param[0].dpdx; |
| 981 | 976 | float duozdx = extent->param[1].dpdx; |
| 982 | 977 | float dvozdx = extent->param[2].dpdx; |
| 983 | const UINT32 *texbase = extra->texbase; | |
| 984 | const UINT32 *palbase = extra->palbase; | |
| 978 | const UINT64 *texbase = extra->texbase; | |
| 979 | const UINT64 *palbase = extra->palbase; | |
| 985 | 980 | UINT16 transcolor = extra->transcolor; |
| 986 | 981 | int texwidth = extra->texwidth; |
| 987 | 982 | int x; |
| r1386 | r1387 | |
| 997 | 992 | UINT8 texel = get_texel_8bit(texbase, v, u, texwidth); |
| 998 | 993 | if (texel != transcolor) |
| 999 | 994 | { |
| 1000 | UINT16 color = palbase[texel >> 1] >> (16 * (texel & 1)); | |
| 1001 | INT32 depth = z * 256.0f; | |
| 995 | UINT16 color = get_palette_entry(palbase, texel); | |
| 996 | INT32 depth = z; | |
| 1002 | 997 | if (depth > 0x7fff) depth = 0x7fff; |
| 1003 | 998 | if (depth >= 0) |
| 1004 | 999 | waveram_plot_check_depth(scanline, x, color, depth); |
| r1386 | r1387 | |
| 1011 | 1006 | } |
| 1012 | 1007 | |
| 1013 | 1008 | |
| 1009 | static void render_poly_solid(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid) | |
| 1010 | { | |
| 1011 | const poly_extra_data *extra = extradata; | |
| 1012 | UINT16 color = extra->transcolor; | |
| 1013 | int x; | |
| 1014 | ||
| 1015 | for (x = extent->startx; x < extent->stopx; x++) | |
| 1016 | waveram_plot_depth(scanline, x, color, 0x7fff); | |
| 1017 | } | |
| 1018 | ||
| 1019 | ||
| 1014 | 1020 | static void zeus_draw_model(UINT32 addr_and_count, UINT32 texdata, int logcmd) |
| 1015 | 1021 | { |
| 1016 | static UINT32 *loglist[1000]; | |
| 1017 | static int loglist_last = 0; | |
| 1018 | UINT32 *data = waveram_ptr_from_addr(addr_and_count); | |
| 1019 | 1022 | UINT32 val1, val2; |
| 1020 | int i, logit = FALSE; | |
| 1021 | 1023 | int texwshift; |
| 1022 | 1024 | int testbit = 0; |
| 1023 | 1025 | |
| r1386 | r1387 | |
| 1037 | 1039 | ); |
| 1038 | 1040 | } |
| 1039 | 1041 | |
| 1040 | if (logcmd) | |
| 1041 | { | |
| 1042 | for (i = 0; i < loglist_last; i++) | |
| 1043 | if (loglist[i] == data) | |
| 1044 | break; | |
| 1045 | logit = (i == loglist_last); | |
| 1046 | if (i == loglist_last) | |
| 1047 | loglist[loglist_last++] = data; | |
| 1048 | } | |
| 1049 | ||
| 1050 | 1042 | if (input_code_pressed(KEYCODE_Z)) testbit = 1; |
| 1051 | 1043 | if (input_code_pressed(KEYCODE_X)) testbit = 2; |
| 1052 | 1044 | if (input_code_pressed(KEYCODE_C)) testbit = 3; |
| r1386 | r1387 | |
| 1060 | 1052 | |
| 1061 | 1053 | while (1) |
| 1062 | 1054 | { |
| 1063 | const UINT32 *data = waveram_ptr_from_addr(addr_and_count); | |
| 1064 | int count = ((addr_and_count >> 24) + 1) * 2; | |
| 1055 | const UINT64 *data = waveram_ptr_from_block_addr(0, addr_and_count); | |
| 1056 | int count = (addr_and_count >> 24) + 1; | |
| 1065 | 1057 | UINT32 next_addr_and_count = 0; |
| 1066 | 1058 | int datanum; |
| 1067 | 1059 | int length; |
| 1068 | 1060 | |
| 1069 | for (datanum = 0; datanum < count; datanum += length | |
| 1061 | for (datanum = 0; datanum < count; datanum += length | |
| 1070 | 1062 | { |
| 1063 | UINT8 cmd = data[datanum] >> 24; | |
| 1071 | 1064 | int offs; |
| 1072 | 1065 | |
| 1073 | length = ( | |
| 1066 | length = (c | |
| 1074 | 1067 | |
| 1075 | if (log | |
| 1068 | if (logcmd) | |
| 1076 | 1069 | { |
| 1077 | logerror("\t%08X", data[datanum]); | |
| 1078 | for (offs = 1; offs < length * 2; offs++) | |
| 1079 | logerror(" %08X", data[datanum + offs]); | |
| 1070 | logerror("\t"); | |
| 1071 | for (offs = 0; offs < length; offs++) | |
| 1072 | logerror("%08X %08X ", (UINT32)data[datanum + offs], (UINT32)(data[datanum + offs] >> 32)); | |
| 1080 | 1073 | logerror("\n"); |
| 1081 | 1074 | } |
| 1082 | 1075 | |
| 1083 | if ( | |
| 1076 | if (c | |
| 1084 | 1077 | { |
| 1085 | 1078 | poly_draw_scanline callback; |
| 1086 | 1079 | poly_extra_data *extra; |
| 1080 | poly_vertex clipvert[8]; | |
| 1087 | 1081 | poly_vertex vert[4]; |
| 1082 | int numverts; | |
| 1088 | 1083 | int i; |
| 1089 | 1084 | |
| 1090 | 1085 | callback = (val2 & 0x20) ? render_poly_8bit : render_poly_4bit; |
| 1091 | 1086 | |
| 1092 | 1087 | for (i = 0; i < 4; i++) |
| 1093 | 1088 | { |
| 1094 | UINT32 ixy = data[datanum + 2 + 2*i]; | |
| 1095 | UINT32 iuvz = data[datanum + 3 + 2*i]; | |
| 1089 | UINT32 ixy = data[datanum + 1 + i]; | |
| 1090 | UINT32 iuvz = data[datanum + 1 + i] >> 32; | |
| 1096 | 1091 | INT32 xo = (INT16)ixy; |
| 1097 | 1092 | INT32 yo = (INT16)(ixy >> 16); |
| 1098 | 1093 | INT32 zo = (INT16)iuvz; |
| 1099 | 1094 | UINT8 u = iuvz >> 16; |
| 1100 | 1095 | UINT8 v = iuvz >> 24; |
| 1101 | float z, ooz; | |
| 1102 | 1096 | |
| 1103 | 1097 | vert[i].x = (xo * zeus_matrix[0][0] + yo * zeus_matrix[0][1] + zo * zeus_matrix[0][2] + zeus_point[0]) * (1.0f / 65536.0f); |
| 1104 | 1098 | vert[i].y = (xo * zeus_matrix[1][0] + yo * zeus_matrix[1][1] + zo * zeus_matrix[1][2] + zeus_point[1]) * (1.0f / 65536.0f); |
| 1105 | z = (xo * zeus_matrix[2][0] + yo * zeus_matrix[2][1] + zo * zeus_matrix[2][2] + zeus_point[2]) * (1.0f / (512.0f * 65536.0f)); | |
| 1099 | vert[i].p[0] = (xo * zeus_matrix[2][0] + yo * zeus_matrix[2][1] + zo * zeus_matrix[2][2] + zeus_point[2]) * (1.0f / (512.0f * 65536.0f)); | |
| 1100 | vert[i].p[1] = u; | |
| 1101 | vert[i].p[2] = v; | |
| 1106 | 1102 | |
| 1107 | ooz = 1.0f / z; | |
| 1108 | vert[i].x *= ooz; | |
| 1109 | vert[i].y *= ooz; | |
| 1110 | vert[i].p[0] = ooz; | |
| 1111 | vert[i].p[1] = u * ooz; | |
| 1112 | vert[i].p[2] = v * ooz; | |
| 1103 | if (logcmd) | |
| 1104 | logerror(" (%f,%f,%f) (%02X,%02X)\n", vert[i].x, vert[i].y, vert[i].p[0], (int)vert[i].p[1], (int)vert[i].p[2]); | |
| 1105 | } | |
| 1113 | 1106 | |
| 1114 | vert[i].x += 200.0f; | |
| 1115 | vert[i].y += 128.0f; | |
| 1107 | numverts = poly_zclip_if_less(4, &vert[0], &clipvert[0], 3, 0.0f); | |
| 1108 | if (numverts < 3) | |
| 1109 | continue; | |
| 1110 | ||
| 1111 | for (i = 0; i < numverts; i++) | |
| 1112 | { | |
| 1113 | float ooz = 1.0f / (0.005f + clipvert[i].p[0]); | |
| 1114 | ||
| 1115 | clipvert[i].x *= ooz; | |
| 1116 | clipvert[i].y *= ooz; | |
| 1117 | clipvert[i].x += 200.0f; | |
| 1118 | clipvert[i].y += 128.0f; | |
| 1119 | ||
| 1120 | ooz *= 1.0f / 512.0f; | |
| 1121 | clipvert[i].p[0] = ooz; | |
| 1122 | clipvert[i].p[1] *= ooz; | |
| 1123 | clipvert[i].p[2] *= ooz; | |
| 1116 | 1124 | } |
| 1117 | 1125 | |
| 1118 | 1126 | extra = poly_get_extra_data(poly); |
| 1119 | 1127 | extra->transcolor = 0x100; |
| 1120 | extra->texbase = &waveram[(val1 << (7 - texwshift)) & 0x3fffff]; | |
| 1121 | 1128 | extra->texwidth = 512 >> texwshift; |
| 1129 | extra->texbase = waveram_ptr_from_texture_addr(0, val1, extra->texwidth); | |
| 1122 | 1130 | extra->palbase = zeus_palbase; |
| 1123 | 1131 | extra->alpha = zeus_blend; |
| 1124 | 1132 | |
| r1386 | r1387 | |
| 1131 | 1139 | single_step_advance = FALSE; |
| 1132 | 1140 | } |
| 1133 | 1141 | |
| 1134 | poly_render_ | |
| 1142 | poly_render_triangle_fan(poly, NULL, &Machine->screen[0].visarea, callback, 3, numverts | |
| 1135 | 1143 | poly_wait(poly, "Normal"); |
| 1136 | 1144 | |
| 1137 | 1145 | if (single_step) |
| 1138 | 1146 | while (!single_step_advance) video_frame_update(TRUE); |
| 1139 | 1147 | } |
| 1140 | else if (data[datanum] == 0x0c018000/* mk4 */ || data[datanum] == 0x0c008000/* invasn */) | |
| 1141 | next_addr_and_count = data[datanum + 1]; | |
| 1148 | else if ((UINT32)data[datanum] == 0x0c018000/* mk4 */ || (UINT32)data[datanum] == 0x0c008000/* invasn */) | |
| 1149 | next_addr_and_count = data[datanum] >> 32; | |
| 1142 | 1150 | } |
| 1143 | 1151 | if (datanum != count) |
| 1144 | 1152 | logerror("Overran data\n"); |
| r1386 | r1387 | |
| 1183 | 1191 | break; |
| 1184 | 1192 | |
| 1185 | 1193 | case 0xf6: // status -- they wait for this & 9 == 0 |
| 1194 | // value & $9600 must == $9600 to pass Zeus system test | |
| 1195 | result = 0x9600; | |
| 1186 | 1196 | if (zeusbase[0xb6] == 0x80040000) |
| 1187 | result = 1; | |
| 1188 | else | |
| 1189 | result = 0; | |
| 1197 | result |= 1; | |
| 1190 | 1198 | logit = 0; |
| 1191 | 1199 | break; |
| 1192 | 1200 | } |
| r1386 | r1387 | |
| 1252 | 1260 | |
| 1253 | 1261 | static void zeus_write_16bit(offs_t offset, UINT16 data, int logit) |
| 1254 | 1262 | { |
| 1263 | /* writes to register $CC need to force a partial update */ | |
| 1264 | if ((offset & ~1) == 0xcc) | |
| 1265 | video_screen_update_partial(0, video_screen_get_vpos(0)); | |
| 1266 | ||
| 1255 | 1267 | /* write to high part on odd addresses */ |
| 1256 | 1268 | if (offset & 1) |
| 1257 | 1269 | zeusbase[offset & ~1] = (zeusbase[offset & ~1] & 0x0000ffff) | (data << 16); |
| r1386 | r1387 | |
| 1272 | 1284 | |
| 1273 | 1285 | static void zeus_write_32bit(offs_t offset, UINT32 data, int logit) |
| 1274 | 1286 | { |
| 1287 | /* writes to register $CC need to force a partial update */ | |
| 1288 | if ((offset & ~1) == 0xcc) | |
| 1289 | video_screen_update_partial(0, video_screen_get_vpos(0)); | |
| 1290 | ||
| 1275 | 1291 | /* always write to low word? */ |
| 1276 | 1292 | zeusbase[offset & ~1] = data; |
| 1277 | 1293 | |
| r1386 | r1387 | |
| 1439 | 1455 | { |
| 1440 | 1456 | if ((zeusbase[0x80] & 0xffffff) == 0x22FCFF) |
| 1441 | 1457 | { |
| 1442 | int startx, stopx, starty, stopy; | |
| 1443 | int x, y; | |
| 1444 | 1458 | // zeusbase[0x00] = color |
| 1445 | 1459 | // zeusbase[0x02] = ??? = 0x000C0000 |
| 1446 | 1460 | // zeusbase[0x04] = ??? = 0x00000E01 |
| r1386 | r1387 | |
| 1463 | 1477 | // zeusbase[0x46] = ??? = 0x00000000 |
| 1464 | 1478 | // zeusbase[0x4c] = ??? = 0x00808080 (brightness?) |
| 1465 | 1479 | // zeusbase[0x4e] = ??? = 0x00808080 (brightness?) |
| 1466 | startx = (zeusbase[0x08] & 0xffff); | |
| 1467 | starty = zeusbase[0x08] >> 16; | |
| 1468 | stopx = (zeusbase[0x0c] & 0xffff); | |
| 1469 | stopy = zeusbase[0x0c] >> 16; | |
| 1470 | for (y = starty; y <= stopy; y++) | |
| 1471 | for (x = startx; x <= stopx; x++) | |
| 1472 | waveram[(1 * WAVERAM_HEIGHT + (y % WAVERAM_HEIGHT)) * WAVERAM_WIDTH + x] = zeusbase[0x00]; | |
| 1480 | poly_extra_data *extra = poly_get_extra_data(poly); | |
| 1481 | poly_vertex vert[4]; | |
| 1482 | ||
| 1483 | vert[0].x = (INT16)zeusbase[0x08]; | |
| 1484 | vert[0].y = (INT16)(zeusbase[0x08] >> 16); | |
| 1485 | vert[1].x = (INT16)zeusbase[0x0a]; | |
| 1486 | vert[1].y = (INT16)(zeusbase[0x0a] >> 16); | |
| 1487 | vert[2].x = (INT16)zeusbase[0x0c]; | |
| 1488 | vert[2].y = (INT16)(zeusbase[0x0c] >> 16); | |
| 1489 | vert[3].x = (INT16)zeusbase[0x0e]; | |
| 1490 | vert[3].y = (INT16)(zeusbase[0x0e] >> 16); | |
| 1491 | ||
| 1492 | extra->transcolor = zeusbase[0x00]; | |
| 1493 | ||
| 1494 | poly_render_quad(poly, NULL, &Machine->screen[0].visarea, render_poly_solid, 0, &vert[0], &vert[1], &vert[2], &vert[3]); | |
| 1495 | poly_wait(poly, "Normal"); | |
| 1496 | ||
| 1473 | 1497 | single_step = input_code_pressed(KEYCODE_S); |
| 1474 | 1498 | if (single_step) |
| 1475 | 1499 | popmessage("Single Step"); |
| r1386 | r1387 | |
| 1483 | 1507 | case 0xb2: |
| 1484 | 1508 | if ((zeusbase[0xb6] >> 16) != 0) |
| 1485 | 1509 | { |
| 1486 | UINT32 *dest = zeus_pixaddr(); | |
| 1487 | 1510 | if ((offset == 0xb0 && (zeusbase[0xb6] & 0x02000000) == 0) || |
| 1488 | 1511 | (offset == 0xb2 && (zeusbase[0xb6] & 0x02000000) != 0)) |
| 1489 | 1512 | { |
| 1513 | UINT16 *dest = (UINT16 *)waveram_ptr_from_expanded_addr(zeusbase[0xb6] >> 31, zeusbase[0xb4]); | |
| 1490 | 1514 | if (zeusbase[0xb6] & 0x00100000) |
| 1491 | dest[0] = | |
| 1515 | dest[BYTE4_XOR_LE(0)] = | |
| 1492 | 1516 | if (zeusbase[0xb6] & 0x00200000) |
| 1493 | dest[ | |
| 1517 | dest[BYTE4_XOR_LE(1)] = | |
| 1494 | 1518 | if (zeusbase[0xb6] & 0x00400000) |
| 1495 | dest[ | |
| 1519 | dest[BYTE4_XOR_LE(2)] = | |
| 1496 | 1520 | if (zeusbase[0xb6] & 0x00800000) |
| 1497 | dest[ | |
| 1521 | dest[BYTE4_XOR_LE(3)] = | |
| 1498 | 1522 | if (zeusbase[0xb6] & 0x00020000) |
| 1499 | 1523 | zeusbase[0xb4]++; |
| 1500 | 1524 | } |
| r1386 | r1387 | |
| 1504 | 1528 | case 0xb4: |
| 1505 | 1529 | if (zeusbase[0xb6] & 0x00010000) |
| 1506 | 1530 | { |
| 1507 | UINT32 *src = zeus_pixaddr(); | |
| 1508 | zeusbase[0xb0] = src[0]; | |
| 1509 | zeusbase[0xb2] = src[1]; | |
| 1531 | const UINT64 *src = waveram_ptr_from_expanded_addr(zeusbase[0xb6] >> 31, zeusbase[0xb4]); | |
| 1532 | zeusbase[0xb0] = *src; | |
| 1533 | zeusbase[0xb2] = *src >> 32; | |
| 1510 | 1534 | } |
| 1511 | 1535 | break; |
| 1512 | 1536 | |
| 1513 | case 0x84: | |
| 1514 | /* MK4: Written in tandem with 0xcc */ | |
| 1515 | /* MK4: Writes either 0x80 (and 0x000000 to 0xcc) or 0x00 (and 0x800000 to 0xcc) */ | |
| 1516 | break; | |
| 1517 | ||
| 1518 | case 0xcc: | |
| 1519 | /* see 0x84 above */ | |
| 1520 | break; | |
| 1521 | ||
| 1522 | 1537 | case 0x70: |
| 1523 | 1538 | zeus_point[0] = zeusbase[0x70] << 16; |
| 1524 | 1539 | break; |
| r1386 | r1387 | |
| 1534 | 1549 | case 0x4e: |
| 1535 | 1550 | zeus_blend = zeusbase[0x4e]; |
| 1536 | 1551 | break; |
| 1537 | // if ((zeuscmd_buffer[0] >> 16) == 0x1770) | |
| 1538 | // zeus_point[0] = zeuscmd_buffer[0] << 16; | |
| 1539 | // if ((zeuscmd_buffer[0] >> 16) == 0x1772) | |
| 1540 | // zeus_point[1] = zeuscmd_buffer[0] << 16; | |
| 1541 | // if ((zeuscmd_buffer[0] >> 16) == 0x1774) | |
| 1542 | // zeus_point[2] = zeuscmd_buffer[0] << 16; | |
| 1543 | // if ((zeuscmd_buffer[0] >> 16) == 0x18ce) | |
| 1544 | // zeus_blend = zeuscmd_buffer[1]; | |
| 1545 | 1552 | |
| 1546 | 1553 | case 0x52: |
| 1547 | 1554 | zeusbase[0xb2] = zeusbase[0x52]; |
| 1548 | 1555 | break; |
| 1549 | // if ((zeuscmd_buffer[0] >> 16) == 0x1752) | |
| 1550 | // { | |
| 1551 | // zeusbase[0xb2] = zeuscmd_buffer[0]; | |
| 1552 | // zeus_enable_logging = 1; | |
| 1553 | // } | |
| 1554 | 1556 | |
| 1557 | case 0xcc: | |
| 1558 | video_screen_update_partial(0, video_screen_get_vpos(0)); | |
| 1559 | break; | |
| 1560 | ||
| 1561 | case 0x84: | |
| 1562 | /* MK4: Written in tandem with 0xcc */ | |
| 1563 | /* MK4: Writes either 0x80 (and 0x000000 to 0xcc) or 0x00 (and 0x800000 to 0xcc) */ | |
| 1564 | zeus_renderbase = waveram_ptr_from_expanded_addr(1, zeusbase[0x84] << 16); | |
| 1565 | break; | |
| 1566 | ||
| 1555 | 1567 | case 0xe0: |
| 1556 | 1568 | zeuscmd_buffer[zeuscmd_buffer_words++] = zeusbase[0xe0]; |
| 1557 | 1569 | if (zeuscmd_buffer_words == 1) |
| r1386 | r1387 | |
| 1570 | 1582 | { |
| 1571 | 1583 | static struct |
| 1572 | 1584 | { |
| 1573 | UINT32 lab, checksum; | |
| 1585 | UINT32 lab; | |
| 1586 | UINT64 checksum; | |
| 1574 | 1587 | } recent_entries[100]; |
| 1575 | 1588 | |
| 1576 | 1589 | UINT32 numoctets = (length_and_base >> 24) + 1; |
| 1577 | const UINT32 *ptr = waveram_ptr_from_addr(length_and_base); | |
| 1578 | UINT32 checksum = length_and_base; | |
| 1590 | const UINT64 *ptr = waveram_ptr_from_block_addr(0, length_and_base); | |
| 1591 | UINT64 checksum = length_and_base; | |
| 1579 | 1592 | int foundit = FALSE; |
| 1580 | 1593 | int i; |
| 1581 | 1594 | |
| 1582 | 1595 | for (i = 0; i < numoctets; i++) |
| 1583 | checksum += ptr[i | |
| 1596 | checksum += ptr[i | |
| 1584 | 1597 | |
| 1585 | 1598 | for (i = 0; i < ARRAY_LENGTH(recent_entries); i++) |
| 1586 | 1599 | if (recent_entries[i].lab == length_and_base && recent_entries[i].checksum == checksum) |
| r1386 | r1387 | |
| 1601 | 1614 | return; |
| 1602 | 1615 | |
| 1603 | 1616 | for (i = 0; i < numoctets; i++) |
| 1604 | logerror("\t%02X: %08X %08X\n", i, ptr[i | |
| 1617 | logerror("\t%02X: %08X %08X\n", i, (UINT32)ptr[i | |
| 1605 | 1618 | } |
| 1606 | 1619 | |
| 1607 | 1620 | |
| 1608 | 1621 | static void zeuscmd_execute(int words) |
| 1609 | 1622 | { |
| 1610 | 1623 | static int colorcount; |
| 1611 | int logcmd = | |
| 1624 | int logcmd = | |
| 1612 | 1625 | int wordnum; |
| 1613 | 1626 | |
| 1614 | 1627 | /* command observations: |
| r1386 | r1387 | |
| 1661 | 1674 | 25000000 007F0018 01000400 B0F60008 -- during diagnostics screen |
| 1662 | 1675 | 25000080 007F0018 01000400 B0F60008 -- alternate frames during text screen |
| 1663 | 1676 | |
| 1677 | 25008000 0000F833 A8040E4C 0000F8C0 A8FC0BD9 0000F731 08FC0B7F 0000F6A4 08040DF2 21010000 | |
| 1678 | 25800000 FE58FD0C 00000000 FE58FD10 00000000 FE74FD10 00000000 FE74FD0C 00000000 200C0000 | |
| 1664 | 1679 | |
| 1680 | ||
| 1665 | 1681 | write to ($60) = 1 after setting up: |
| 1666 | 1682 | |
| 1667 | 1683 | |
| r1386 | r1387 | |
| 1698 | 1714 | case 0x00c040: |
| 1699 | 1715 | if (logcmd) |
| 1700 | 1716 | logerror(" -- setptr(palbase)\n"); |
| 1701 | zeus_palbase = waveram_ptr_from_addr(zeuscmd_buffer[1]); | |
| 1717 | zeus_palbase = waveram_ptr_from_block_addr(0, zeuscmd_buffer[1]); | |
| 1702 | 1718 | break; |
| 1703 | 1719 | |
| 1704 | 1720 | case 0x80c0a5: |
| r1386 | r1387 | |
| 1833 | 1849 | |
| 1834 | 1850 | case 0x25: |
| 1835 | 1851 | case 0x30: /* invasn */ |
| 1852 | if (word & 0x808000) | |
| 1853 | return 10; | |
| 1836 | 1854 | return 4; /* ??? */ |
| 1837 | 1855 | |
| 1838 | 1856 | case 0x1c: |
| r1386 | r1387 | |
|---|---|---|
| 15 | 15 | #define RADARSCP_GRID_COL_OFFSET (RADARSCP_BCK_COL_OFFSET + 256) |
| 16 | 16 | #define RADARSCP_STAR_COL (RADARSCP_GRID_COL_OFFSET + 8) |
| 17 | 17 | |
| 18 | #define HW_TRS01 1 | |
| 19 | #define HW_TRS02 2 | |
| 20 | #define HW_DK4 4 | |
| 21 | ||
| 22 | static tilemap *bg_tilemap; | |
| 23 | ||
| 24 | static mame_bitmap *bg_bits; | |
| 25 | static const UINT8 *color_codes; | |
| 26 | static emu_timer *scanline_timer; | |
| 27 | ||
| 28 | 18 | static const double cd4049_vl = 1.5/5.0; |
| 29 | 19 | static const double cd4049_vh = 3.5/5.0; |
| 30 | 20 | static const double cd4049_al = 0.01; |
| 31 | 21 | |
| 32 | static UINT8 sig30Hz = 0; | |
| 33 | static UINT8 grid_sig = 0; | |
| 34 | static UINT8 rflip_sig = 0; | |
| 35 | static UINT8 star_ff = 0; | |
| 36 | ||
| 37 | static int blue_level = 0; | |
| 38 | static double cd4049_a, cd4049_b; | |
| 39 | ||
| 40 | /* Save state relevant */ | |
| 41 | ||
| 42 | static UINT8 gfx_bank, palette_bank; | |
| 43 | static UINT8 grid_on; | |
| 44 | static UINT8 snd02_enable; | |
| 45 | static UINT8 sig_ansn; | |
| 46 | static UINT16 grid_col; | |
| 47 | static UINT8 vid_hw; | |
| 48 | static UINT8 sprite_bank; | |
| 49 | ||
| 50 | 22 | /*************************************************************************** |
| 51 | 23 | |
| 52 | 24 | Convert the color PROMs into a more useable format. |
| r1386 | r1387 | |
| 156 | 128 | } |
| 157 | 129 | }; |
| 158 | 130 | |
| 131 | static const res_net_info radarscp_net_bck_info = | |
| 132 | { | |
| 133 | RES_NET_VCC_5V | RES_NET_VBIAS_TTL | RES_NET_VIN_MB7052 | RES_NET_MONITOR_SANYO_EZV20, | |
| 134 | { | |
| 135 | { RES_NET_AMP_DARLINGTON, 470, 0, 0, { 0 } }, | |
| 136 | { RES_NET_AMP_DARLINGTON, 470, 0, 0, { 0 } }, | |
| 137 | { RES_NET_AMP_DARLINGTON, 680, 150000, 0, { 0 } } // radarscp | |
| 138 | } | |
| 139 | }; | |
| 140 | ||
| 159 | 141 | /* |
| 160 | 142 | radarsc1 interface |
| 161 | 143 | |
| r1386 | r1387 | |
| 188 | 170 | |
| 189 | 171 | /* Dummy struct to generate background palette entries */ |
| 190 | 172 | |
| 191 | static const res_net_info radarscp_b | |
| 173 | static const res_net_info radarscp_blue_net_info = | |
| 192 | 174 | { |
| 193 | 175 | RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_VCC | RES_NET_MONITOR_SANYO_EZV20, |
| 194 | 176 | { |
| 195 | { RES_NET_AMP_DARLINGTON, 1, 0, 0, { 0 } }, // bias/gnd exist in schematics, but not readable | |
| 196 | { RES_NET_AMP_DARLINGTON, 1, 0, 0, { 0 } }, // bias/gnd exist in schematics, but not readable | |
| 197 | { RES_NET_AMP_DARLINGTON, 0, 0, 8, { 128,64,32,16,8,4,2,1 } }, // dummy | |
| 177 | { RES_NET_AMP_DARLINGTON, 470, 4700, 0, { 0 } }, // bias/gnd exist in schematics, readable in TKG3 schematics | |
| 178 | { RES_NET_AMP_DARLINGTON, 470, 4700, 0, { 0 } }, // bias/gnd exist in schematics, readable in TKG3 schematics | |
| 179 | { RES_NET_AMP_DARLINGTON, 0, 0, 8, { 128,64,32,16,8,4,2,1 } }, // dummy | |
| 198 | 180 | } |
| 199 | 181 | }; |
| 200 | 182 | |
| r1386 | r1387 | |
| 216 | 198 | |
| 217 | 199 | ***************************************************************************/ |
| 218 | 200 | |
| 219 | PALETTE_INIT( dkong | |
| 201 | PALETTE_INIT( dkong2b) | |
| 220 | 202 | { |
| 203 | dkong_state *state = Machine->driver_data; | |
| 221 | 204 | rgb_t *rgb; |
| 222 | 205 | int i; |
| 223 | 206 | |
| r1386 | r1387 | |
| 240 | 223 | |
| 241 | 224 | color_prom += 512; |
| 242 | 225 | /* color_prom now points to the beginning of the character color codes */ |
| 243 | color_codes = color_prom; /* we'll need it later */ | |
| 226 | state->color_codes = color_prom; /* we'll need it later */ | |
| 244 | 227 | free(rgb); |
| 245 | 228 | } |
| 246 | 229 | |
| 230 | PALETTE_INIT( dkong4b ) | |
| 231 | { | |
| 232 | dkong_state *state = Machine->driver_data; | |
| 233 | int i; | |
| 234 | int r,g,b; | |
| 235 | ||
| 236 | for (i = 0;i < 256;i++) | |
| 237 | { | |
| 238 | ||
| 239 | /* red component */ | |
| 240 | r = compute_res_net( (color_prom[256]>>1) & 0x07, 0, &radarscp_net_info ); | |
| 241 | /* green component */ | |
| 242 | g = compute_res_net( ((color_prom[256]<<2) & 0x04) | ((color_prom[0]>>2) & 0x03), 1, &radarscp_net_info ); | |
| 243 | /* blue component */ | |
| 244 | b = compute_res_net( (color_prom[0]>>0) & 0x03, 2, &radarscp_net_info ); | |
| 245 | ||
| 246 | palette_set_color_rgb(machine,i,r,g,b); | |
| 247 | color_prom++; | |
| 248 | } | |
| 249 | ||
| 250 | /* Now treat tri-state black background generation */ | |
| 251 | ||
| 252 | for (i=0;i<256;i++) | |
| 253 | if ( (i & 0x03) == 0x00 ) // NOR => CS=1 => Tristate => real black | |
| 254 | { | |
| 255 | r = compute_res_net( 1, 0, &radarscp_net_bck_info ); | |
| 256 | g = compute_res_net( 1, 1, &radarscp_net_bck_info ); | |
| 257 | b = compute_res_net( 1, 2, &radarscp_net_bck_info ); | |
| 258 | palette_set_color_rgb(machine,i,r,g,b); | |
| 259 | } | |
| 260 | ||
| 261 | palette_normalize_range(machine->palette, 0, 255, 0, 255); | |
| 262 | ||
| 263 | color_prom += 256; | |
| 264 | /* color_prom now points to the beginning of the character color codes */ | |
| 265 | state->color_codes = color_prom; /* we'll need it later */ | |
| 266 | } | |
| 267 | ||
| 247 | 268 | PALETTE_INIT( radarscp ) |
| 248 | 269 | { |
| 270 | dkong_state *state = Machine->driver_data; | |
| 249 | 271 | int i; |
| 250 | 272 | int r,g,b; |
| 251 | 273 | |
| r1386 | r1387 | |
| 268 | 290 | for (i=0;i<256;i++) |
| 269 | 291 | if ( (i & 0x03) == 0x00 ) // NOR => CS=1 => Tristate => real black |
| 270 | 292 | { |
| 271 | r = compute_res_net( 1, 0, &dkong_net_bck_info ); | |
| 272 | g = compute_res_net( 1, 1, &dkong_net_bck_info ); | |
| 273 | b = compute_res_net( 1, 2, &dkong_net_bck_info ); | |
| 293 | r = compute_res_net( 1, 0, &radarscp_net_bck_info ); | |
| 294 | g = compute_res_net( 1, 1, &radarscp_net_bck_info ); | |
| 295 | b = compute_res_net( 1, 2, &radarscp_net_bck_info ); | |
| 274 | 296 | palette_set_color_rgb(machine,i,r,g,b); |
| 275 | 297 | } |
| 276 | 298 | |
| r1386 | r1387 | |
| 283 | 305 | /* Oscillating background */ |
| 284 | 306 | for (i = 0;i < 256;i++) |
| 285 | 307 | { |
| 286 | r = compute_res_net( 0, 0, &radarscp_bck_net_info ); | |
| 287 | g = compute_res_net( 0, 1, &radarscp_bck_net_info ); | |
| 288 | b = compute_res_net( i, 2, &radarscp_bck_net_info ); | |
| 308 | r = compute_res_net( 0, 0, &radarscp_blue_net_info ); | |
| 309 | g = compute_res_net( 0, 1, &radarscp_blue_net_info ); | |
| 310 | b = compute_res_net( i, 2, &radarscp_blue_net_info ); | |
| 289 | 311 | |
| 290 | 312 | palette_set_color_rgb(machine,RADARSCP_BCK_COL_OFFSET + i,r,g,b); |
| 291 | 313 | } |
| r1386 | r1387 | |
| 299 | 321 | |
| 300 | 322 | palette_set_color_rgb(machine,RADARSCP_GRID_COL_OFFSET + i,r,g,b); |
| 301 | 323 | } |
| 324 | ||
| 302 | 325 | palette_normalize_range(machine->palette, 0, RADARSCP_GRID_COL_OFFSET+7, 0, 255); |
| 303 | 326 | |
| 304 | ||
| 305 | ||
| 306 | 327 | color_prom += 256; |
| 307 | 328 | /* color_prom now points to the beginning of the character color codes */ |
| 308 | color_codes = color_prom; /* we'll need it later */ | |
| 329 | state->color_codes = color_prom; /* we'll need it later */ | |
| 309 | 330 | } |
| 310 | 331 | |
| 311 | 332 | PALETTE_INIT( radarsc1 ) |
| 312 | 333 | { |
| 334 | dkong_state *state = Machine->driver_data; | |
| 313 | 335 | int i; |
| 314 | 336 | int r,g,b; |
| 315 | 337 | |
| 316 | printf("Here\n"); | |
| 317 | 338 | for (i = 0;i < 256;i++) |
| 318 | 339 | { |
| 319 | 340 | |
| r1386 | r1387 | |
| 348 | 369 | /* Oscillating background */ |
| 349 | 370 | for (i = 0;i < 256;i++) |
| 350 | 371 | { |
| 351 | r = compute_res_net( 0, 0, &radarscp_bck_net_info ); | |
| 352 | g = compute_res_net( 0, 1, &radarscp_bck_net_info ); | |
| 353 | b = compute_res_net( i, 2, &radarscp_bck_net_info ); | |
| 372 | r = compute_res_net( 0, 0, &radarscp_blue_net_info ); | |
| 373 | g = compute_res_net( 0, 1, &radarscp_blue_net_info ); | |
| 374 | b = compute_res_net( i, 2, &radarscp_blue_net_info ); | |
| 354 | 375 | |
| 355 | 376 | palette_set_color_rgb(machine,RADARSCP_BCK_COL_OFFSET + i,r,g,b); |
| 356 | 377 | } |
| r1386 | r1387 | |
| 368 | 389 | |
| 369 | 390 | color_prom += 512; |
| 370 | 391 | /* color_prom now points to the beginning of the character color codes */ |
| 371 | color_codes = color_prom; /* we'll need it later */ | |
| 392 | state->color_codes = color_prom; /* we'll need it later */ | |
| 372 | 393 | } |
| 373 | 394 | |
| 374 | 395 | |
| 396 | ||
| 375 | 397 | /*************************************************************************** |
| 376 | 398 | |
| 377 | 399 | Convert the color PROMs into a more useable format. |
| r1386 | r1387 | |
| 409 | 431 | |
| 410 | 432 | PALETTE_INIT( dkong3 ) |
| 411 | 433 | { |
| 412 | ||
| 434 | dkong_state *state = Machine->driver_data; | |
| 413 | 435 | rgb_t *rgb; |
| 414 | 436 | |
| 415 | 437 | rgb = compute_res_net_all(color_prom, &dkong3_decode_info, &dkong3_net_info); |
| r1386 | r1387 | |
| 419 | 441 | |
| 420 | 442 | color_prom += 1024; |
| 421 | 443 | /* color_prom now points to the beginning of the character color codes */ |
| 422 | color_codes = color_prom; /* we'll need it later */ | |
| 444 | state->color_codes = color_prom; /* we'll need it later */ | |
| 423 | 445 | } |
| 424 | 446 | |
| 425 | 447 | static TILE_GET_INFO( dkong_bg_tile_info ) |
| 426 | 448 | { |
| 427 | int code = videoram[tile_index] + 256 * gfx_bank; | |
| 428 | int color = (color_codes[tile_index % 32 + 32 * (tile_index / 32 / 4)] & 0x0f) + 0x10 * palette_bank; | |
| 449 | dkong_state *state = machine->driver_data; | |
| 450 | int code = videoram[tile_index] + 256 * state->gfx_bank; | |
| 451 | int color = (state->color_codes[tile_index % 32 + 32 * (tile_index / 32 / 4)] & 0x0f) + 0x10 * state->palette_bank; | |
| 429 | 452 | |
| 430 | 453 | SET_TILE_INFO(0, code, color, 0); |
| 431 | 454 | } |
| 432 | 455 | |
| 433 | 456 | static TILE_GET_INFO( radarsc1_bg_tile_info ) |
| 434 | 457 | { |
| 435 | int code = videoram[tile_index] + 256 * gfx_bank; | |
| 436 | int color = (color_codes[tile_index % 32] & 0x0f); | |
| 437 | color = color | (palette_bank<<4); | |
| 458 | dkong_state *state = machine->driver_data; | |
| 459 | int code = videoram[tile_index] + 256 * state->gfx_bank; | |
| 460 | int color = (state->color_codes[tile_index % 32] & 0x0f); | |
| 461 | color = color | (state->palette_bank<<4); | |
| 438 | 462 | |
| 439 | 463 | SET_TILE_INFO(0, code, color, 0); |
| 440 | 464 | } |
| r1386 | r1387 | |
| 447 | 471 | |
| 448 | 472 | WRITE8_HANDLER( dkong_videoram_w ) |
| 449 | 473 | { |
| 474 | dkong_state *state = Machine->driver_data; | |
| 475 | ||
| 450 | 476 | if (videoram[offset] != data) |
| 451 | 477 | { |
| 452 | 478 | videoram[offset] = data; |
| 453 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 479 | tilemap_mark_tile_dirty(state->bg_tilemap, offset); | |
| 454 | 480 | } |
| 455 | 481 | } |
| 456 | 482 | |
| 457 | 483 | WRITE8_HANDLER( radarscp_snd02_w ) |
| 458 | 484 | { |
| 459 | snd02_enable = data & 0x01; | |
| 485 | dkong_state *state = Machine->driver_data; | |
| 486 | ||
| 487 | state->snd02_enable = data & 0x01; | |
| 460 | 488 | } |
| 461 | 489 | |
| 462 | 490 | WRITE8_HANDLER( radarsc1_ansn_w ) |
| 463 | 491 | { |
| 464 | sig_ansn = data & 0x01; | |
| 492 | dkong_state *state = Machine->driver_data; | |
| 493 | ||
| 494 | state->sig_ansn = data & 0x01; | |
| 465 | 495 | } |
| 466 | 496 | |
| 467 | 497 | WRITE8_HANDLER( dkongjr_gfxbank_w ) |
| 468 | 498 | { |
| 469 | if (gfx_bank != (data & 0x01)) | |
| 499 | dkong_state *state = Machine->driver_data; | |
| 500 | ||
| 501 | if (state->gfx_bank != (data & 0x01)) | |
| 470 | 502 | { |
| 471 | gfx_bank = data & 0x01; | |
| 472 | tilemap_mark_all_tiles_dirty(bg_tilemap); | |
| 503 | state->gfx_bank = data & 0x01; | |
| 504 | tilemap_mark_all_tiles_dirty(state->bg_tilemap); | |
| 473 | 505 | } |
| 474 | 506 | } |
| 475 | 507 | |
| 476 | 508 | WRITE8_HANDLER( dkong3_gfxbank_w ) |
| 477 | 509 | { |
| 478 | if (gfx_bank != (~data & 0x01)) | |
| 510 | dkong_state *state = Machine->driver_data; | |
| 511 | ||
| 512 | if (state->gfx_bank != (~data & 0x01)) | |
| 479 | 513 | { |
| 480 | gfx_bank = ~data & 0x01; | |
| 481 | tilemap_mark_all_tiles_dirty(bg_tilemap); | |
| 514 | state->gfx_bank = ~data & 0x01; | |
| 515 | tilemap_mark_all_tiles_dirty(state->bg_tilemap); | |
| 482 | 516 | } |
| 483 | 517 | } |
| 484 | 518 | |
| 485 | 519 | WRITE8_HANDLER( dkong_palettebank_w ) |
| 486 | 520 | { |
| 521 | dkong_state *state = Machine->driver_data; | |
| 487 | 522 | int newbank; |
| 488 | 523 | |
| 489 | newbank = palette_bank; | |
| 524 | newbank = state->palette_bank; | |
| 490 | 525 | |
| 491 | 526 | if (data & 1) |
| 492 | 527 | newbank |= 1 << offset; |
| 493 | 528 | else |
| 494 | 529 | newbank &= ~(1 << offset); |
| 495 | 530 | |
| 496 | if (palette_bank != newbank) | |
| 531 | if (state->palette_bank != newbank) | |
| 497 | 532 | { |
| 498 | palette_bank = newbank; | |
| 499 | tilemap_mark_all_tiles_dirty(bg_tilemap); | |
| 533 | state->palette_bank = newbank; | |
| 534 | tilemap_mark_all_tiles_dirty(state->bg_tilemap); | |
| 500 | 535 | } |
| 501 | 536 | } |
| 502 | 537 | |
| 503 | 538 | WRITE8_HANDLER( radarscp_grid_enable_w ) |
| 504 | 539 | { |
| 505 | grid_on = data & 0x01; | |
| 540 | dkong_state *state = Machine->driver_data; | |
| 541 | ||
| 542 | state->grid_on = data & 0x01; | |
| 506 | 543 | } |
| 507 | 544 | |
| 508 | 545 | WRITE8_HANDLER( radarscp_grid_color_w ) |
| 509 | 546 | { |
| 510 | grid_col = (data & 0x07) ^ 0x07; | |
| 511 | popmessage("Gridcol: %d", grid_col); | |
| 547 | dkong_state *state = Machine->driver_data; | |
| 548 | ||
| 549 | state->grid_col = (data & 0x07) ^ 0x07; | |
| 550 | popmessage("Gridcol: %d", state->grid_col); | |
| 512 | 551 | } |
| 513 | 552 | |
| 514 | 553 | WRITE8_HANDLER( dkong_flipscreen_w ) |
| r1386 | r1387 | |
| 518 | 557 | |
| 519 | 558 | WRITE8_HANDLER( dkong_spritebank_w ) |
| 520 | 559 | { |
| 521 | sprite_bank = data & 0x01; | |
| 560 | dkong_state *state = Machine->driver_data; | |
| 561 | ||
| 562 | state->sprite_bank = data & 0x01; | |
| 522 | 563 | } |
| 523 | 564 | |
| 524 | 565 | /*************************************************************************** |
| r1386 | r1387 | |
| 529 | 570 | |
| 530 | 571 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, UINT32 mask_bank, UINT32 shift_bits) |
| 531 | 572 | { |
| 573 | dkong_state *state = machine->driver_data; | |
| 532 | 574 | int offs; |
| 533 | 575 | |
| 534 | 576 | /* Draw the sprites. */ |
| 535 | for (offs = sprite_bank<<9;offs < (sprite_bank<<9) + spriteram_size; offs += 4) | |
| 577 | for (offs = state->sprite_bank<<9;offs < (state->sprite_bank<<9) + 0x200 /* spriteram_size */; offs += 4) | |
| 536 | 578 | { |
| 537 | 579 | if (spriteram[offs]) |
| 538 | 580 | { |
| r1386 | r1387 | |
| 554 | 596 | |
| 555 | 597 | drawgfx(bitmap,machine->gfx[1], |
| 556 | 598 | (spriteram[offs + 1] & 0x7f) + ((spriteram[offs + 2] & mask_bank) << shift_bits), |
| 557 | (spriteram[offs + 2] & 0x0f) + 16 * palette_bank, | |
| 599 | (spriteram[offs + 2] & 0x0f) + 16 * state->palette_bank, | |
| 558 | 600 | !(spriteram[offs + 2] & 0x80),!(spriteram[offs + 1] & 0x80), |
| 559 | 601 | x,y, |
| 560 | 602 | cliprect,TRANSPARENCY_PEN,0); |
| r1386 | r1387 | |
| 562 | 604 | /* draw with wrap around - this fixes the 'beheading' bug */ |
| 563 | 605 | drawgfx(bitmap,machine->gfx[1], |
| 564 | 606 | (spriteram[offs + 1] & 0x7f) + ((spriteram[offs + 2] & mask_bank) << shift_bits), |
| 565 | (spriteram[offs + 2] & 0x0f) + 16 * palette_bank, | |
| 607 | (spriteram[offs + 2] & 0x0f) + 16 * state->palette_bank, | |
| 566 | 608 | (spriteram[offs + 2] & 0x80),(spriteram[offs + 1] & 0x80), |
| 567 | 609 | x-256,y, |
| 568 | 610 | cliprect,TRANSPARENCY_PEN,0); |
| r1386 | r1387 | |
| 571 | 613 | { |
| 572 | 614 | drawgfx(bitmap,machine->gfx[1], |
| 573 | 615 | (spriteram[offs + 1] & 0x7f) + ((spriteram[offs + 2] & mask_bank) << shift_bits), |
| 574 | (spriteram[offs + 2] & 0x0f) + 16 * palette_bank, | |
| 616 | (spriteram[offs + 2] & 0x0f) + 16 * state->palette_bank, | |
| 575 | 617 | (spriteram[offs + 2] & 0x80),(spriteram[offs + 1] & 0x80), |
| 576 | 618 | x,y, |
| 577 | 619 | cliprect,TRANSPARENCY_PEN,0); |
| r1386 | r1387 | |
| 579 | 621 | /* draw with wrap around - this fixes the 'beheading' bug */ |
| 580 | 622 | drawgfx(bitmap,machine->gfx[1], |
| 581 | 623 | (spriteram[offs + 1] & 0x7f) + ((spriteram[offs + 2] & mask_bank) << shift_bits), |
| 582 | (spriteram[offs + 2] & 0x0f) + 16 * palette_bank, | |
| 624 | (spriteram[offs + 2] & 0x0f) + 16 * state->palette_bank, | |
| 583 | 625 | (spriteram[offs + 2] & 0x80),(spriteram[offs + 1] & 0x80), |
| 584 | 626 | x+256,y, |
| 585 | 627 | cliprect,TRANSPARENCY_PEN,0); |
| r1386 | r1387 | |
| 606 | 648 | * TODO: This should be part of the vblank routine |
| 607 | 649 | */ |
| 608 | 650 | |
| 609 | INLINE double CD4049(double x) | |
| 651 | INLINE double CD4049(running_machine *machine, double x) | |
| 610 | 652 | { |
| 653 | dkong_state *state = machine->driver_data; | |
| 654 | ||
| 611 | 655 | if (x>0) |
| 612 | return exp(-cd4049_a * pow(x,cd4049_b)); | |
| 656 | return exp(-state->cd4049_a * pow(x,state->cd4049_b)); | |
| 613 | 657 | else |
| 614 | 658 | return 1.0; |
| 615 | 659 | } |
| r1386 | r1387 | |
| 618 | 662 | * a period of roughly 4.4 ms |
| 619 | 663 | */ |
| 620 | 664 | |
| 621 | static void radarscp_step(int line_cnt) | |
| 665 | static void radarscp_step(running_machine *machine, int line_cnt) | |
| 622 | 666 | { |
| 667 | dkong_state *state = machine->driver_data; | |
| 623 | 668 | /* Condensator is illegible in schematics for TRS2 board. |
| 624 | 669 | * TRS1 board states 3.3u. |
| 625 | 670 | */ |
| r1386 | r1387 | |
| 649 | 694 | if (line_cnt>=512) |
| 650 | 695 | line_cnt=512-VTOTAL; |
| 651 | 696 | if ( ( !(line_cnt & 0x40) && ((line_cnt+1) & 0x40) ) && (mame_rand(Machine) > RAND_MAX/2)) |
| 652 | sig30Hz = (1-sig30Hz); | |
| 653 | rflip_sig = snd02_enable & sig30Hz; | |
| 654 | sig = rflip_sig ^ ((line_cnt & 0x80)>>7); | |
| 655 | if (vid_hw & HW_TRS01) | |
| 656 | rflip_sig = !rflip_sig; | |
| 697 | state->sig30Hz = (1-state->sig30Hz); | |
| 698 | state->rflip_sig = state->snd02_enable & state->sig30Hz; | |
| 699 | sig = state->rflip_sig ^ ((line_cnt & 0x80)>>7); | |
| 700 | if (state->hardware_type == HARDWARE_TRS01) | |
| 701 | state->rflip_sig = !state->rflip_sig; | |
| 657 | 702 | if (sig) // 128VF |
| 658 | 703 | diff = (0.0 - cv1); |
| 659 | 704 | else |
| r1386 | r1387 | |
| 666 | 711 | cv2 += diff; |
| 667 | 712 | |
| 668 | 713 | vg1 = (cv1 - cv2)*0.9 + 0.1 * vg2; |
| 669 | vg2 = 5*CD4049(vg1/5); | |
| 714 | vg2 = 5*CD4049(machine, vg1/5); | |
| 670 | 715 | |
| 671 | 716 | /* on the real hardware, the gain would be 1. |
| 672 | 717 | * This will not work here. |
| 673 | 718 | */ |
| 674 | 719 | vg3i = 0.9*vg2 + 0.1 * vg3; |
| 675 | vg3 = 5*CD4049(vg3i/5); | |
| 720 | vg3 = 5*CD4049(machine, vg3i/5); | |
| 676 | 721 | |
| 677 | blue_level = (int)(vg3/5.0*255); | |
| 722 | state->blue_level = (int)(vg3/5.0*255); | |
| 678 | 723 | |
| 679 | 724 | // Grid signal |
| 680 | if (grid_on && sig_ansn) | |
| 725 | if (state->grid_on && state->sig_ansn) | |
| 681 | 726 | { |
| 682 | 727 | diff = (0.0 - cv3); |
| 683 | 728 | diff = diff - diff*exp(0.0 - (1.0/RC32 * dt) ); |
| r1386 | r1387 | |
| 693 | 738 | diff = diff - diff*exp(0.0 - (1.0/RC4 * dt) ); |
| 694 | 739 | cv4 += diff; |
| 695 | 740 | |
| 696 | if (CD4049(CD4049(vg2 - cv4))>2.4/5.0) //TTL - Level | |
| 697 | grid_sig = 0; | |
| 741 | if (CD4049(machine, CD4049(machine, vg2 - cv4))>2.4/5.0) //TTL - Level | |
| 742 | state->grid_sig = 0; | |
| 698 | 743 | else |
| 699 | grid_sig = 1; | |
| 744 | state->grid_sig = 1; | |
| 700 | 745 | |
| 701 | 746 | /* stars */ |
| 702 | 747 | pixelcnt += HTOTAL; |
| 703 | 748 | if (pixelcnt > period2 ) |
| 704 | 749 | { |
| 705 | star_ff = !star_ff; | |
| 750 | state->star_ff = !state->star_ff; | |
| 706 | 751 | pixelcnt = pixelcnt - period2; |
| 707 | 752 | } |
| 708 | 753 | |
| r1386 | r1387 | |
| 710 | 755 | |
| 711 | 756 | static void radarscp_draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| 712 | 757 | { |
| 758 | dkong_state *state = machine->driver_data; | |
| 713 | 759 | const UINT8 *htable = NULL; |
| 714 | 760 | int x,y; |
| 715 | 761 | UINT8 draw_ok; |
| 716 | 762 | UINT16 *pixel; |
| 717 | 763 | |
| 718 | if ( | |
| 764 | if (state->hardware_type == HARDWARE_TRS01) | |
| 719 | 765 | htable = memory_region(REGION_GFX4); |
| 720 | 766 | |
| 721 | 767 | y = machine->screen[0].visarea.min_y; |
| r1386 | r1387 | |
| 726 | 772 | { |
| 727 | 773 | pixel = BITMAP_ADDR16(bitmap, y, x); |
| 728 | 774 | draw_ok = !(*pixel & 0x01) && !(*pixel & 0x02); |
| 729 | if (vid_hw & HW_TRS01) // Check again from schematics | |
| 730 | draw_ok = draw_ok && !((htable[ (!rflip_sig<<7) | (x>>2)] >>2) & 0x01); | |
| 775 | if (state->hardware_type == HARDWARE_TRS01) // Check again from schematics | |
| 776 | draw_ok = draw_ok && !((htable[ (!state->rflip_sig<<7) | (x>>2)] >>2) & 0x01); | |
| 731 | 777 | if (draw_ok) |
| 732 | *pixel = *(BITMAP_ADDR16(bg_bits, y, x)); | |
| 778 | *pixel = *(BITMAP_ADDR16(state->bg_bits, y, x)); | |
| 733 | 779 | x++; |
| 734 | 780 | } |
| 735 | 781 | y++; |
| r1386 | r1387 | |
| 739 | 785 | |
| 740 | 786 | static TIMER_CALLBACK( scanline_callback ) |
| 741 | 787 | { |
| 788 | dkong_state *state = machine->driver_data; | |
| 742 | 789 | const UINT8 *table = memory_region(REGION_GFX3); |
| 743 | 790 | int table_len = memory_region_length(REGION_GFX3); |
| 744 | 791 | int x,y,offset; |
| r1386 | r1387 | |
| 747 | 794 | int scanline = param; |
| 748 | 795 | |
| 749 | 796 | y = scanline; |
| 750 | radarscp_step(y); | |
| 797 | radarscp_step(machine, y); | |
| 751 | 798 | if (y <= machine->screen[0].visarea.min_y || y > machine->screen[0].visarea.max_y) |
| 752 | 799 | counter = 0; |
| 753 | offset = ((-flip_screen) ^ rflip_sig) ? 0x000 : 0x400; | |
| 800 | offset = ((-flip_screen) ^ state->rflip_sig) ? 0x000 : 0x400; | |
| 754 | 801 | x = 0; |
| 755 | 802 | while (x < machine->screen[0].width) |
| 756 | 803 | { |
| 757 | pixel = BITMAP_ADDR16(bg_bits, y, x); | |
| 804 | pixel = BITMAP_ADDR16(state->bg_bits, y, x); | |
| 758 | 805 | if ((counter < table_len) && (x == 4 * (table[counter|offset] & 0x7f))) |
| 759 | 806 | { |
| 760 | if ( star_ff && (table[counter|offset] & 0x80) ) /* star */ | |
| 807 | if ( state->star_ff && (table[counter|offset] & 0x80) ) /* star */ | |
| 761 | 808 | *pixel = machine->pens[RADARSCP_STAR_COL]; |
| 762 | else if (grid_sig && !(table[counter|offset] & 0x80)) /* radar */ | |
| 763 | *pixel = machine->pens[RADARSCP_GRID_COL_OFFSET+grid_col]; | |
| 809 | else if (state->grid_sig && !(table[counter|offset] & 0x80)) /* radar */ | |
| 810 | *pixel = machine->pens[RADARSCP_GRID_COL_OFFSET+state->grid_col]; | |
| 764 | 811 | else |
| 765 | *pixel = machine->pens[RADARSCP_BCK_COL_OFFSET + blue_level]; | |
| 812 | *pixel = machine->pens[RADARSCP_BCK_COL_OFFSET + state->blue_level]; | |
| 766 | 813 | counter++; |
| 767 | 814 | } |
| 768 | 815 | else |
| 769 | *pixel = machine->pens[RADARSCP_BCK_COL_OFFSET + blue_level]; | |
| 816 | *pixel = machine->pens[RADARSCP_BCK_COL_OFFSET + state->blue_level]; | |
| 770 | 817 | x++; |
| 771 | 818 | } |
| 772 | 819 | while ((counter < table_len) && ( x < 4 * (table[counter|offset] & 0x7f))) |
| 773 | 820 | counter++; |
| 774 | 821 | scanline = (scanline+1) % VTOTAL; |
| 775 | 822 | /* come back at the next appropriate scanline */ |
| 776 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline, attotime_zero); | |
| 823 | timer_adjust(state->scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline, attotime_zero); | |
| 777 | 824 | } |
| 778 | 825 | |
| 826 | static void check_palette(running_machine *machine) | |
| 827 | { | |
| 828 | dkong_state *state = machine->driver_data; | |
| 829 | int newset; | |
| 830 | int num; | |
| 831 | ||
| 832 | num = port_tag_to_index("VIDHW"); | |
| 833 | if (num>=0) | |
| 834 | { | |
| 835 | newset = readinputport(num); | |
| 836 | if (newset != state->vidhw) | |
| 837 | { | |
| 838 | state->vidhw = newset; | |
| 839 | switch (newset) | |
| 840 | { | |
| 841 | case 0x00: | |
| 842 | palette_init_radarscp(machine, (UINT16 *) machine->game_colortable, memory_region(REGION_PROMS)); | |
| 843 | break; | |
| 844 | case 0x01: | |
| 845 | palette_init_dkong2b(machine, (UINT16 *) machine->game_colortable, memory_region(REGION_PROMS)); | |
| 846 | break; | |
| 847 | } | |
| 848 | } | |
| 849 | } | |
| 850 | } | |
| 851 | ||
| 779 | 852 | static VIDEO_START( dkong_base ) |
| 780 | 853 | { |
| 854 | dkong_state *state = machine->driver_data; | |
| 781 | 855 | |
| 782 | cd4049_b = (log(0.0 - log(cd4049_al)) - log(0.0 - log((1.0-cd4049_al))) ) / log(cd4049_vh/cd4049_vl); | |
| 783 | cd4049_a = log(0.0 - log(cd4049_al)) - cd4049_b * log(cd4049_vh); | |
| 856 | state->cd4049_b = (log(0.0 - log(cd4049_al)) - log(0.0 - log((1.0-cd4049_al))) ) / log(cd4049_vh/cd4049_vl); | |
| 857 | state->cd4049_a = log(0.0 - log(cd4049_al)) - state->cd4049_b * log(cd4049_vh); | |
| 784 | 858 | |
| 785 | gfx_bank = 0; | |
| 786 | palette_bank = 0; | |
| 787 | sprite_bank = 0; | |
| 788 | sig_ansn = 1; | |
| 789 | vid_hw = HW_DK4; | |
| 859 | state->gfx_bank = 0; | |
| 860 | state->palette_bank = 0; | |
| 861 | state->sprite_bank = 0; | |
| 862 | state->sig_ansn = 1; | |
| 863 | state->vidhw = -1; | |
| 790 | 864 | |
| 791 | state_save_register_global(gfx_bank); | |
| 792 | state_save_register_global(palette_bank); | |
| 793 | state_save_register_global(sprite_bank); | |
| 794 | state_save_register_global(grid_on); | |
| 865 | state_save_register_global(state->gfx_bank); | |
| 866 | state_save_register_global(state->palette_bank); | |
| 867 | state_save_register_global(state->sprite_bank); | |
| 868 | state_save_register_global(state->grid_on); | |
| 795 | 869 | |
| 796 | state_save_register_global(snd02_enable); | |
| 797 | state_save_register_global(sig_ansn); | |
| 798 | state_save_register_global(grid_col); | |
| 870 | state_save_register_global(state->snd02_enable); | |
| 871 | state_save_register_global(state->sig_ansn); | |
| 872 | state_save_register_global(state->grid_col); | |
| 799 | 873 | |
| 800 | 874 | /* this must be registered here - hmmm */ |
| 801 | 875 | state_save_register_global(flip_screen); |
| r1386 | r1387 | |
| 804 | 878 | |
| 805 | 879 | VIDEO_START( dkong ) |
| 806 | 880 | { |
| 881 | dkong_state *state = machine->driver_data; | |
| 807 | 882 | |
| 808 | 883 | video_start_dkong_base(machine); |
| 809 | 884 | |
| 810 | bg_tilemap = tilemap_create(dkong_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 811 | tilemap_set_scrolldx(bg_tilemap, 0, 128); | |
| 812 | } | |
| 885 | switch (state->hardware_type) | |
| 886 | { | |
| 887 | case HARDWARE_TRS02: | |
| 888 | state->bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 889 | state->scanline_timer = timer_alloc(scanline_callback, NULL); | |
| 890 | timer_adjust(state->scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero); | |
| 891 | /* fall through */ | |
| 892 | case HARDWARE_TKG04: | |
| 893 | case HARDWARE_TKG02: | |
| 894 | state->bg_tilemap = tilemap_create(dkong_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 895 | tilemap_set_scrolldx(state->bg_tilemap, 0, 128); | |
| 896 | break; | |
| 897 | case HARDWARE_TRS01: | |
| 898 | state->bg_tilemap = tilemap_create(radarsc1_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 899 | tilemap_set_scrolldx(state->bg_tilemap, 0, 128); | |
| 813 | 900 | |
| 814 | VIDEO_START( radarscp ) | |
| 815 | { | |
| 901 | state->bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 816 | 902 | |
| 817 | video_start_dkong(machine); | |
| 818 | ||
| 819 | vid_hw = HW_TRS02; | |
| 820 | ||
| 821 | bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 822 | ||
| 823 | scanline_timer = timer_alloc(scanline_callback, NULL); | |
| 824 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero); | |
| 825 | ||
| 903 | state->scanline_timer = timer_alloc(scanline_callback, NULL); | |
| 904 | timer_adjust(state->scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero); | |
| 905 | break; | |
| 906 | default: | |
| 907 | fatalerror("Invalid hardware type in dkong_video_start"); | |
| 908 | } | |
| 826 | 909 | } |
| 827 | 910 | |
| 828 | VIDEO_ | |
| 911 | VIDEO_UPDA | |
| 829 | 912 | { |
| 913 | dkong_state *state = machine->driver_data; | |
| 830 | 914 | |
| 831 | video_start_dkong_base(machine); | |
| 832 | ||
| 833 | vid_hw = HW_TRS01; | |
| 834 | ||
| 835 | bg_tilemap = tilemap_create(radarsc1_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 836 | tilemap_set_scrolldx(bg_tilemap, 0, 128); | |
| 837 | ||
| 838 | bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 839 | ||
| 840 | scanline_timer = timer_alloc(scanline_callback, NULL); | |
| 841 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero); | |
| 842 | ||
| 843 | } | |
| 844 | ||
| 845 | VIDEO_UPDATE( radarscp ) | |
| 846 | { | |
| 847 | ||
| 848 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 849 | draw_sprites(machine, bitmap, cliprect, 0x40, 1); | |
| 850 | radarscp_draw_background(machine, bitmap, cliprect); | |
| 851 | ||
| 915 | switch (state->hardware_type) | |
| 916 | { | |
| 917 | case HARDWARE_TKG02: | |
| 918 | case HARDWARE_TKG04: | |
| 919 | check_palette(machine); | |
| 920 | tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0); | |
| 921 | draw_sprites(machine, bitmap, cliprect, 0x40, 1); | |
| 922 | break; | |
| 923 | case HARDWARE_TRS01: | |
| 924 | case HARDWARE_TRS02: | |
| 925 | tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0); | |
| 926 | draw_sprites(machine, bitmap, cliprect, 0x40, 1); | |
| 927 | radarscp_draw_background(machine, bitmap, cliprect); | |
| 928 | break; | |
| 929 | default: | |
| 930 | fatalerror("Invalid hardware type in dkong_video_update"); | |
| 931 | } | |
| 852 | 932 | return 0; |
| 853 | 933 | } |
| 854 | 934 | |
| 855 | VIDEO_UPDATE( dkong ) | |
| 856 | { | |
| 857 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 858 | draw_sprites(machine, bitmap, cliprect, 0x40, 1); | |
| 859 | return 0; | |
| 860 | } | |
| 861 | ||
| 862 | 935 | VIDEO_UPDATE( pestplce ) |
| 863 | 936 | { |
| 937 | dkong_state *state = machine->driver_data; | |
| 864 | 938 | int offs; |
| 865 | 939 | |
| 866 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 940 | tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0); | |
| 867 | 941 | |
| 868 | 942 | /* Draw the sprites. */ |
| 869 | 943 | for (offs = 0;offs < spriteram_size;offs += 4) |
| r1386 | r1387 | |
| 872 | 946 | { |
| 873 | 947 | drawgfx(bitmap,machine->gfx[1], |
| 874 | 948 | spriteram[offs + 2], |
| 875 | (spriteram[offs + 1] & 0x0f) + 16 * palette_bank, | |
| 949 | (spriteram[offs + 1] & 0x0f) + 16 * state->palette_bank, | |
| 876 | 950 | spriteram[offs + 1] & 0x80,spriteram[offs + 1] & 0x40, |
| 877 | 951 | spriteram[offs + 3] - 8,240 - spriteram[offs] + 8, |
| 878 | 952 | cliprect,TRANSPARENCY_PEN,0); |
| r1386 | r1387 | |
| 883 | 957 | |
| 884 | 958 | VIDEO_UPDATE( spclforc ) |
| 885 | 959 | { |
| 886 | t | |
| 960 | dkong_state *sta | |
| 887 | 961 | |
| 962 | tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0); | |
| 963 | ||
| 888 | 964 | /* it uses spriteram[offs + 2] & 0x10 for sprite bank */ |
| 889 | 965 | draw_sprites(machine, bitmap, cliprect, 0x10, 3); |
| 890 | 966 | return 0; |
| r1386 | r1387 | |
|---|---|---|
| 230 | 230 | int kludge; /* Ghouls n Ghosts sprite kludge */ |
| 231 | 231 | }; |
| 232 | 232 | |
| 233 | static struct CPS1config *cps1_game_config; | |
| 233 | static const struct CPS1config *cps1_game_config; | |
| 234 | 234 | |
| 235 | 235 | /* CPSB ID multiply protection ctrl priority masks unknwn layer enable masks */ |
| 236 | 236 | #define CPS_B_01 0x00,0x0000, 0,0,0,0, /* n/a */ 0x66,{0x68,0x6a,0x6c,0x6e},0x70, {0x02,0x04,0x08,0x30,0x30} |
| r1386 | r1387 | |
| 262 | 262 | #define HACK_B_1 0x00,0x0000, 0x00,0x00,0x00,0x00, 0x54,{0x52,0x50,0x4e,0x4c},0x5c, {0xff,0xff,0xff,0x00,0x00} |
| 263 | 263 | |
| 264 | 264 | |
| 265 | static struct CPS1config cps1_config_table[]= | |
| 265 | static const struct CPS1config cps1_config_table[]= | |
| 266 | 266 | { |
| 267 | 267 | /* name CPSB banks tile limits kludge */ |
| 268 | 268 | {"forgottn",CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 7 }, |
| r1386 | r1387 | |
| 430 | 430 | static MACHINE_RESET( cps ) |
| 431 | 431 | { |
| 432 | 432 | const char *gamename = machine->gamedrv->name; |
| 433 | struct CPS1config *pCFG=&cps1_config_table[0]; | |
| 433 | const struct CPS1config *pCFG=&cps1_config_table[0]; | |
| 434 | 434 | |
| 435 | 435 | while(pCFG->name) |
| 436 | 436 | { |
| r1386 | r1387 | |
|---|---|---|
| 263 | 263 | static void dvg_draw_to(int x, int y, int intensity) |
| 264 | 264 | { |
| 265 | 265 | if (((x | y) & 0x400) == 0) |
| 266 | vg_add_point_buf(xcenter + ((x - 0x200) << 16), | |
| 267 | ycenter - ((y - 0x200) << 16), | |
| 266 | vg_add_point_buf((xmin + x - 512) << 16, | |
| 267 | (ymin + 512 - y) << 16, | |
| 268 | 268 | VECTOR_COLOR111(7), intensity << 4); |
| 269 | 269 | } |
| 270 | 270 | |
| r1386 | r1387 | |
| 1270 | 1270 | |
| 1271 | 1271 | /************************************* |
| 1272 | 1272 | * |
| 1273 | * Vector generator init | |
| 1274 | * | |
| 1275 | ************************************/ | |
| 1276 | ||
| 1277 | static VIDEO_START( avgdvg ) | |
| 1278 | { | |
| 1279 | xmin = machine->screen[0].visarea.min_x; | |
| 1280 | ymin = machine->screen[0].visarea.min_y; | |
| 1281 | xmax = machine->screen[0].visarea.max_x; | |
| 1282 | ymax = machine->screen[0].visarea.max_y; | |
| 1283 | ||
| 1284 | xcenter = ((xmax + xmin) / 2) << 16; | |
| 1285 | ycenter = ((ymax + ymin) / 2) << 16; | |
| 1286 | ||
| 1287 | flip_x = flip_y = 0; | |
| 1288 | ||
| 1289 | vg_halt_timer = timer_alloc(vg_set_halt_callback, NULL); | |
| 1290 | vg_run_timer = timer_alloc(run_state_machine, NULL); | |
| 1291 | ||
| 1292 | /* | |
| 1293 | * The x and y DACs use 10 bit of the counter values which are in | |
| 1294 | * two's complement representation. The DAC input is xored with | |
| 1295 | * 0x200 to convert the value to unsigned. | |
| 1296 | */ | |
| 1297 | vg->xdac_xor = 0x200; | |
| 1298 | vg->ydac_xor = 0x200; | |
| 1299 | ||
| 1300 | state_save_register_item("AVG", 0, vg->pc); | |
| 1301 | state_save_register_item("AVG", 0, vg->sp); | |
| 1302 | state_save_register_item("AVG", 0, vg->dvx); | |
| 1303 | state_save_register_item("AVG", 0, vg->dvy); | |
| 1304 | state_save_register_item("AVG", 0, vg->dvy12); | |
| 1305 | state_save_register_item("AVG", 0, vg->timer); | |
| 1306 | state_save_register_item_array("AVG", 0, vg->stack); | |
| 1307 | state_save_register_item("AVG", 0, vg->data); | |
| 1308 | state_save_register_item("AVG", 0, vg->state_latch); | |
| 1309 | state_save_register_item("AVG", 0, vg->int_latch); | |
| 1310 | state_save_register_item("AVG", 0, vg->scale); | |
| 1311 | state_save_register_item("AVG", 0, vg->bin_scale); | |
| 1312 | state_save_register_item("AVG", 0, vg->intensity); | |
| 1313 | state_save_register_item("AVG", 0, vg->color); | |
| 1314 | state_save_register_item("AVG", 0, vg->enspkl); | |
| 1315 | state_save_register_item("AVG", 0, vg->spkl_shift); | |
| 1316 | state_save_register_item("AVG", 0, vg->map); | |
| 1317 | state_save_register_item("AVG", 0, vg->hst); | |
| 1318 | state_save_register_item("AVG", 0, vg->lst); | |
| 1319 | state_save_register_item("AVG", 0, vg->izblank); | |
| 1320 | state_save_register_item("AVG", 0, vg->op); | |
| 1321 | state_save_register_item("AVG", 0, vg->halt); | |
| 1322 | state_save_register_item("AVG", 0, vg->sync_halt); | |
| 1323 | state_save_register_item("AVG", 0, vg->xdac_xor); | |
| 1324 | state_save_register_item("AVG", 0, vg->ydac_xor); | |
| 1325 | state_save_register_item("AVG", 0, vg->xpos); | |
| 1326 | state_save_register_item("AVG", 0, vg->ypos); | |
| 1327 | state_save_register_item("AVG", 0, vg->clipx_min); | |
| 1328 | state_save_register_item("AVG", 0, vg->clipy_min); | |
| 1329 | state_save_register_item("AVG", 0, vg->clipx_max); | |
| 1330 | state_save_register_item("AVG", 0, vg->clipy_max); | |
| 1331 | ||
| 1332 | video_start_vector(machine); | |
| 1333 | } | |
| 1334 | ||
| 1335 | ||
| 1336 | /************************************* | |
| 1337 | * | |
| 1338 | 1273 | * Configuration of VG variants |
| 1339 | 1274 | * |
| 1340 | 1275 | *************************************/ |
| r1386 | r1387 | |
| 1468 | 1403 | |
| 1469 | 1404 | /************************************* |
| 1470 | 1405 | * |
| 1471 | * V | |
| 1406 | * V | |
| 1472 | 1407 | * |
| 1473 | 1408 | ************************************/ |
| 1474 | 1409 | |
| 1410 | static void register_state (void) | |
| 1411 | { | |
| 1412 | state_save_register_item("AVG", 0, vg->pc); | |
| 1413 | state_save_register_item("AVG", 0, vg->sp); | |
| 1414 | state_save_register_item("AVG", 0, vg->dvx); | |
| 1415 | state_save_register_item("AVG", 0, vg->dvy); | |
| 1416 | state_save_register_item("AVG", 0, vg->dvy12); | |
| 1417 | state_save_register_item("AVG", 0, vg->timer); | |
| 1418 | state_save_register_item_array("AVG", 0, vg->stack); | |
| 1419 | state_save_register_item("AVG", 0, vg->data); | |
| 1420 | state_save_register_item("AVG", 0, vg->state_latch); | |
| 1421 | state_save_register_item("AVG", 0, vg->int_latch); | |
| 1422 | state_save_register_item("AVG", 0, vg->scale); | |
| 1423 | state_save_register_item("AVG", 0, vg->bin_scale); | |
| 1424 | state_save_register_item("AVG", 0, vg->intensity); | |
| 1425 | state_save_register_item("AVG", 0, vg->color); | |
| 1426 | state_save_register_item("AVG", 0, vg->enspkl); | |
| 1427 | state_save_register_item("AVG", 0, vg->spkl_shift); | |
| 1428 | state_save_register_item("AVG", 0, vg->map); | |
| 1429 | state_save_register_item("AVG", 0, vg->hst); | |
| 1430 | state_save_register_item("AVG", 0, vg->lst); | |
| 1431 | state_save_register_item("AVG", 0, vg->izblank); | |
| 1432 | state_save_register_item("AVG", 0, vg->op); | |
| 1433 | state_save_register_item("AVG", 0, vg->halt); | |
| 1434 | state_save_register_item("AVG", 0, vg->sync_halt); | |
| 1435 | state_save_register_item("AVG", 0, vg->xdac_xor); | |
| 1436 | state_save_register_item("AVG", 0, vg->ydac_xor); | |
| 1437 | state_save_register_item("AVG", 0, vg->xpos); | |
| 1438 | state_save_register_item("AVG", 0, vg->ypos); | |
| 1439 | state_save_register_item("AVG", 0, vg->clipx_min); | |
| 1440 | state_save_register_item("AVG", 0, vg->clipy_min); | |
| 1441 | state_save_register_item("AVG", 0, vg->clipx_max); | |
| 1442 | state_save_register_item("AVG", 0, vg->clipy_max); | |
| 1443 | } | |
| 1444 | ||
| 1445 | static VIDEO_START( avg_common ) | |
| 1446 | { | |
| 1447 | xmin = machine->screen[0].visarea.min_x; | |
| 1448 | ymin = machine->screen[0].visarea.min_y; | |
| 1449 | xmax = machine->screen[0].visarea.max_x; | |
| 1450 | ymax = machine->screen[0].visarea.max_y; | |
| 1451 | ||
| 1452 | xcenter = ((xmax - xmin) / 2) << 16; | |
| 1453 | ycenter = ((ymax - ymin) / 2) << 16; | |
| 1454 | ||
| 1455 | flip_x = flip_y = 0; | |
| 1456 | ||
| 1457 | vg_halt_timer = timer_alloc(vg_set_halt_callback, NULL); | |
| 1458 | vg_run_timer = timer_alloc(run_state_machine, NULL); | |
| 1459 | ||
| 1460 | /* | |
| 1461 | * The x and y DACs use 10 bit of the counter values which are in | |
| 1462 | * two's complement representation. The DAC input is xored with | |
| 1463 | * 0x200 to convert the value to unsigned. | |
| 1464 | */ | |
| 1465 | vg->xdac_xor = 0x200; | |
| 1466 | vg->ydac_xor = 0x200; | |
| 1467 | ||
| 1468 | register_state (); | |
| 1469 | video_start_vector(machine); | |
| 1470 | } | |
| 1471 | ||
| 1475 | 1472 | VIDEO_START( dvg ) |
| 1476 | 1473 | { |
| 1477 | 1474 | vgc = &dvg_default; |
| 1478 | 1475 | vg = &vgd; |
| 1479 | video_start_avgdvg(machine); | |
| 1476 | ||
| 1477 | xmin = machine->screen[0].visarea.min_x; | |
| 1478 | ymin = machine->screen[0].visarea.min_y; | |
| 1479 | ||
| 1480 | vg_halt_timer = timer_alloc(vg_set_halt_callback, NULL); | |
| 1481 | vg_run_timer = timer_alloc(run_state_machine, NULL); | |
| 1482 | ||
| 1483 | register_state (); | |
| 1484 | video_start_vector(machine); | |
| 1480 | 1485 | } |
| 1481 | 1486 | |
| 1482 | 1487 | VIDEO_START( avg ) |
| 1483 | 1488 | { |
| 1484 | 1489 | vgc = &avg_default; |
| 1485 | 1490 | vg = &vgd; |
| 1486 | video_start_avg | |
| 1491 | video_start_avg_common(machine); | |
| 1487 | 1492 | } |
| 1488 | 1493 | |
| 1489 | 1494 | VIDEO_START( avg_starwars ) |
| 1490 | 1495 | { |
| 1491 | 1496 | vgc = &avg_starwars; |
| 1492 | 1497 | vg = &vgd; |
| 1493 | video_start_avg | |
| 1498 | video_start_avg_common(machine); | |
| 1494 | 1499 | } |
| 1495 | 1500 | |
| 1496 | 1501 | VIDEO_START( avg_tempest ) |
| 1497 | 1502 | { |
| 1498 | 1503 | vgc = &avg_tempest; |
| 1499 | 1504 | vg = &vgd; |
| 1500 | video_start_avg | |
| 1505 | video_start_avg_common(machine); | |
| 1501 | 1506 | } |
| 1502 | 1507 | |
| 1503 | 1508 | VIDEO_START( avg_mhavoc ) |
| 1504 | 1509 | { |
| 1505 | 1510 | vgc = &avg_mhavoc; |
| 1506 | 1511 | vg = &vgd; |
| 1507 | video_start_avg | |
| 1512 | video_start_avg_common(machine); | |
| 1508 | 1513 | } |
| 1509 | 1514 | |
| 1510 | 1515 | VIDEO_START( avg_bzone ) |
| 1511 | 1516 | { |
| 1512 | 1517 | vgc = &avg_bzone; |
| 1513 | 1518 | vg = &vgd; |
| 1514 | video_start_avg | |
| 1519 | video_start_avg_common(machine); | |
| 1515 | 1520 | } |
| 1516 | 1521 | |
| 1517 | 1522 | VIDEO_START( avg_quantum ) |
| 1518 | 1523 | { |
| 1519 | 1524 | vgc = &avg_quantum; |
| 1520 | 1525 | vg = &vgd; |
| 1521 | video_start_avg | |
| 1526 | video_start_avg_common(machine); | |
| 1522 | 1527 | } |
| 1523 | 1528 |
| r1386 | r1387 | |
|---|---|---|
| 93 | 93 | * player/missile colors calculated for the first part (00-1F). |
| 94 | 94 | * The priorities of combining priority bits (which games use!) are: |
| 95 | 95 | ************************************************************************/ |
| 96 | static | |
| 96 | static const UINT8 _pm_colors[32][8*2*8] = { | |
| 97 | 97 | { |
| 98 | 98 | M0, PL0,P0, PL0,M1, PL1,P1, PL1,M2, PL2,P2, PL2,M3, PL3,P3, PL3, // 00 |
| 99 | 99 | M0, PL0,P0, PL0,M1, PL1,P1, PL1,M2, PL2,P2, PL2,M3, PL3,P3, PL3, |
| r1386 | r1387 | |
| 423 | 423 | static void prio_init(void) |
| 424 | 424 | { |
| 425 | 425 | int i, j, pm, p, c; |
| 426 | UINT8 * prio; | |
| 426 | const UINT8 * prio; | |
| 427 | 427 | |
| 428 | 428 | /* 32 priority bit combinations */ |
| 429 | 429 | for( i = 0; i < 32; i++ ) |
| r1386 | r1387 | |
|---|---|---|
| 67 | 67 | * escounts: Colours are completely wrong. Is there a palette register |
| 68 | 68 | somewhere that affects blitter/video output? |
| 69 | 69 | * qos: Game clock and score dividers aren't drawn (needs line draw mode) |
| 70 | ||
| 70 | * all games bar qos: NVRAM not saved. | |
| 71 | 71 | ******************************************************************************/ |
| 72 | 72 | #include "driver.h" |
| 73 | 73 | #include "debugger.h" |
| 74 | 74 | #include "machine/6850acia.h" |
| 75 | #include "machine/meters.h" | |
| 75 | 76 | #include "cpu/z80/z80.h" |
| 76 | 77 | #include "cpu/m6809/m6809.h" |
| 77 | 78 | #include "sound/upd7759.h" |
| r1386 | r1387 | |
| 1134 | 1135 | return meter_latch; |
| 1135 | 1136 | } |
| 1136 | 1137 | |
| 1137 | /* TODO */ | |
| 1138 | /* TODO: This is borrowed from Scorpion 1 */ | |
| 1138 | 1139 | static WRITE8_HANDLER( meter_w ) |
| 1139 | 1140 | { |
| 1140 | //int changed = meter_latch ^ data; | |
| 1141 | int i; | |
| 1142 | int changed = meter_latch ^ data; | |
| 1143 | long cycles = ATTOTIME_TO_CYCLES(0, timer_get_time() ); | |
| 1141 | 1144 | |
| 1142 | 1145 | meter_latch = data; |
| 1143 | 1146 | |
| r1386 | r1387 | |
| 1145 | 1148 | When a meter is triggered, the current drawn is sensed. If a meter |
| 1146 | 1149 | is connected, the /FIRQ line will be pulsed. |
| 1147 | 1150 | */ |
| 1148 | if ( data ) | |
| 1149 | { | |
| 1150 | cpunum_set_input_line(1, M6809_FIRQ_LINE, PULSE_LINE ); | |
| 1151 | } | |
| 1151 | ||
| 1152 | for (i = 0; i<8; i++) | |
| 1153 | { | |
| 1154 | if ( changed & (1 << i) ) | |
| 1155 | { | |
| 1156 | Mechmtr_update(i, cycles, data & (1 << i) ); | |
| 1157 | cpunum_set_input_line(1, M6809_FIRQ_LINE, PULSE_LINE ); | |
| 1158 | } | |
| 1159 | } | |
| 1152 | 1160 | } |
| 1153 | 1161 | |
| 1154 | 1162 | /* TODO */ |
| r1386 | r1387 | |
| 1227 | 1235 | ADDRESS_MAP_END |
| 1228 | 1236 | |
| 1229 | 1237 | static INPUT_PORTS_START( bfcobra ) |
| 1230 | PORT_START_TAG("STROBE0") | |
| 1238 | PORT_START_TAG("STROBE0") | |
| 1231 | 1239 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Coin: 10p") |
| 1232 | 1240 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_NAME("Coin: 20p") |
| 1233 | 1241 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_NAME("Coin: 50p") |
| 1234 | 1242 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN4 ) PORT_NAME("Coin: 1 pound") |
| 1235 | 1243 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1236 | 1244 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Green Test?") PORT_CODE(KEYCODE_F1) |
| 1237 | PORT_BIT( 0x40, IP_ACTIVE_ | |
| 1245 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Red Test?") | |
| 1238 | 1246 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1239 | 1247 | |
| 1240 | 1248 | PORT_START_TAG("STROBE1") |
| r1386 | r1387 | |
| 1258 | 1266 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1259 | 1267 | |
| 1260 | 1268 | PORT_START_TAG("STROBE3") |
| 1261 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Cash box door") PORT_CODE(KEYCODE_Y) PORT_TOGGLE | |
| 1262 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Unknown (resets)") PORT_CODE(KEYCODE_T) PORT_TOGGLE | |
| 1269 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_INTERLOCK) PORT_NAME("Cash box door") PORT_CODE(KEYCODE_Y) PORT_TOGGLE | |
| 1270 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Front Door? (resets)") PORT_CODE(KEYCODE_T) PORT_TOGGLE | |
| 1263 | 1271 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Refill Key") PORT_CODE(KEYCODE_R) PORT_TOGGLE |
| 1264 | 1272 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1265 | 1273 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r1386 | r1387 | |
|---|---|---|
| 138 | 138 | |
| 139 | 139 | ***************************************************************************/ |
| 140 | 140 | |
| 141 | static struct EEPROM_interface eeprom_interface = | |
| 141 | static const struct EEPROM_interface eeprom_interface = | |
| 142 | 142 | { |
| 143 | 143 | 6, /* address bits */ |
| 144 | 144 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 57 | 57 | static int rng_z80_control; |
| 58 | 58 | static int rng_sound_status; |
| 59 | 59 | |
| 60 | static struct EEPROM_interface eeprom_interface = | |
| 60 | static const struct EEPROM_interface eeprom_interface = | |
| 61 | 61 | { |
| 62 | 62 | 7, /* address bits */ |
| 63 | 63 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 649 | 649 | |
| 650 | 650 | |
| 651 | 651 | |
| 652 | static struct Samplesinterface senjyo_samples_interface = | |
| 652 | static const struct Samplesinterface senjyo_samples_interface = | |
| 653 | 653 | { |
| 654 | 654 | 1, |
| 655 | 655 | NULL, |
| r1386 | r1387 | |
|---|---|---|
| 99 | 99 | #include "deco16ic.h" |
| 100 | 100 | |
| 101 | 101 | static UINT32 *simpl156_systemram; |
| 102 | static UINT8 *simpl156_default_eeprom; | |
| 102 | static const UINT8 *simpl156_default_eeprom; | |
| 103 | 103 | |
| 104 | 104 | extern VIDEO_START( simpl156 ); |
| 105 | 105 | extern VIDEO_UPDATE( simpl156 ); |
| r1386 | r1387 | |
| 1040 | 1040 | |
| 1041 | 1041 | /* some default eeproms */ |
| 1042 | 1042 | |
| 1043 | static UINT8 chainrec_eeprom[128] = { | |
| 1043 | static const UINT8 chainrec_eeprom[128] = { | |
| 1044 | 1044 | 0x52, 0x54, 0x00, 0x50, 0x00, 0x00, 0x39, 0x11, 0x41, 0x54, 0x00, 0x43, 0x00, 0x50, 0xFF, 0xFF, |
| 1045 | 1045 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1046 | 1046 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| r1386 | r1387 | |
| 1109 | 1109 | |
| 1110 | 1110 | */ |
| 1111 | 1111 | |
| 1112 | static UINT8 osman_eeprom[128] = { | |
| 1112 | static const UINT8 osman_eeprom[128] = { | |
| 1113 | 1113 | 0xFF, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1114 | 1114 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1115 | 1115 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| r1386 | r1387 | |
| 1119 | 1119 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1120 | 1120 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF |
| 1121 | 1121 | }; |
| 1122 | static UINT8 candance_eeprom[128] = { | |
| 1122 | static const UINT8 candance_eeprom[128] = { | |
| 1123 | 1123 | 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1124 | 1124 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1125 | 1125 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| r1386 | r1387 | |
| 1129 | 1129 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1130 | 1130 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF |
| 1131 | 1131 | }; |
| 1132 | static UINT8 prtytime_eeprom[128] = { | |
| 1132 | static const UINT8 prtytime_eeprom[128] = { | |
| 1133 | 1133 | 0xAF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1134 | 1134 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1135 | 1135 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| r1386 | r1387 | |
| 1140 | 1140 | 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0x7F, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF |
| 1141 | 1141 | }; |
| 1142 | 1142 | |
| 1143 | static UINT8 gangonta_eeprom[128] = { | |
| 1143 | static const UINT8 gangonta_eeprom[128] = { | |
| 1144 | 1144 | 0x2F, 0xFF, 0x2F, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xED, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1145 | 1145 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 1146 | 1146 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| r1386 | r1387 | |
|---|---|---|
| 417 | 417 | |
| 418 | 418 | /***********************************************************/ |
| 419 | 419 | |
| 420 | static const char *sharkatt_sample_names[] = | |
| 420 | static const char *const sharkatt_sample_names[] = | |
| 421 | 421 | { |
| 422 | 422 | "*sharkatt", |
| 423 | 423 | "talk.wav", |
| r1386 | r1387 | |
| 425 | 425 | 0 /* end of array */ |
| 426 | 426 | }; |
| 427 | 427 | |
| 428 | static struct Samplesinterface sharkatt_samples_interface = | |
| 428 | static const struct Samplesinterface sharkatt_samples_interface = | |
| 429 | 429 | { |
| 430 | 430 | 2, /* number of channels */ |
| 431 | 431 | sharkatt_sample_names |
| r1386 | r1387 | |
| 433 | 433 | |
| 434 | 434 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
| 435 | 435 | |
| 436 | static const char *thief_sample_names[] = | |
| 436 | static const char *const thief_sample_names[] = | |
| 437 | 437 | { |
| 438 | 438 | "*thief", |
| 439 | 439 | "talk.wav", |
| r1386 | r1387 | |
| 441 | 441 | 0 /* end of array */ |
| 442 | 442 | }; |
| 443 | 443 | |
| 444 | static struct Samplesinterface thief_samples_interface = | |
| 444 | static const struct Samplesinterface thief_samples_interface = | |
| 445 | 445 | { |
| 446 | 446 | 2, /* number of channels */ |
| 447 | 447 | thief_sample_names |
| r1386 | r1387 | |
| 449 | 449 | |
| 450 | 450 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
| 451 | 451 | |
| 452 | static const char *natodef_sample_names[] = | |
| 452 | static const char *const natodef_sample_names[] = | |
| 453 | 453 | { |
| 454 | 454 | "*natodef", |
| 455 | 455 | "talk.wav", |
| r1386 | r1387 | |
| 457 | 457 | 0 /* end of array */ |
| 458 | 458 | }; |
| 459 | 459 | |
| 460 | static struct Samplesinterface natodef_samples_interface = | |
| 460 | static const struct Samplesinterface natodef_samples_interface = | |
| 461 | 461 | { |
| 462 | 462 | 2, /* number of channels */ |
| 463 | 463 | natodef_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 269 | 269 | * |
| 270 | 270 | *************************************/ |
| 271 | 271 | |
| 272 | static struct EEPROM_interface eeprom_interface_policetr = | |
| 272 | static const struct EEPROM_interface eeprom_interface_policetr = | |
| 273 | 273 | { |
| 274 | 274 | 8, // address bits 8 |
| 275 | 275 | 16, // data bits 16 |
| r1386 | r1387 | |
|---|---|---|
| 1699 | 1699 | } |
| 1700 | 1700 | |
| 1701 | 1701 | /* this is a 93C46 but with reset delay */ |
| 1702 | static struct EEPROM_interface eeprom_interface = | |
| 1702 | static const struct EEPROM_interface eeprom_interface = | |
| 1703 | 1703 | { |
| 1704 | 1704 | 6, /* address bits */ |
| 1705 | 1705 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 737 | 737 | REGION_SOUND1 /* memory region */ |
| 738 | 738 | }; |
| 739 | 739 | |
| 740 | static const char *gaplus_sample_names[] = | |
| 740 | static const char *const gaplus_sample_names[] = | |
| 741 | 741 | { |
| 742 | 742 | "*gaplus", |
| 743 | 743 | "bang.wav", |
| 744 | 744 | 0 |
| 745 | 745 | }; |
| 746 | 746 | |
| 747 | static struct Samplesinterface samples_interface = | |
| 747 | static const struct Samplesinterface samples_interface = | |
| 748 | 748 | { |
| 749 | 749 | 1, /* one channel */ |
| 750 | 750 | gaplus_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 232 | 232 | static WRITE8_HANDLER( ppi8255_b_w ){}// lamps ? |
| 233 | 233 | static WRITE8_HANDLER( ppi8255_c_w ){} |
| 234 | 234 | |
| 235 | static ppi8255_interface ppi8255_intf = | |
| 235 | static const ppi8255_interface ppi8255_intf = | |
| 236 | 236 | { |
| 237 | 237 | 2, // 2 chips |
| 238 | 238 | { input_port_0_r, NULL }, // Port A read |
| r1386 | r1387 | |
|---|---|---|
| 2632 | 2632 | ROM_LOAD( "epr-5318.86", 0x0000, 0x4000, CRC(6f2e1fd3) SHA1(326d538551245fce67d0fdba85975e27093b7a93) ) |
| 2633 | 2633 | ROM_LOAD( "epr-5319.93", 0x4000, 0x4000, CRC(ebee4999) SHA1(bb331be270dc1da63699533d9f02d73ce28f1bc5) ) |
| 2634 | 2634 | |
| 2635 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2635 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2636 | 2636 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2637 | 2637 | ROM_END |
| 2638 | 2638 | |
| r1386 | r1387 | |
| 2660 | 2660 | ROM_LOAD( "a1_ic86.86", 0x0000, 0x4000, CRC(6f2e1fd3) SHA1(326d538551245fce67d0fdba85975e27093b7a93) ) |
| 2661 | 2661 | ROM_LOAD( "a1_ic93.93", 0x4000, 0x4000, CRC(07987244) SHA1(8468b95684b1f62c6de6af1b1d405bfb333e4e26) ) |
| 2662 | 2662 | |
| 2663 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2663 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2664 | 2664 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2665 | 2665 | ROM_END |
| 2666 | 2666 | |
| 2667 | 2667 | ROM_START( regulus ) |
| 2668 | 2668 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 2669 | ROM_LOAD( "epr5640a.129", 0x0000, 0x2000, CRC(dafb1528) SHA1(9140c5507bd931df3f8ef8d2910bc74f737b1a5a) ) /* encrypted */ | |
| 2670 | ROM_LOAD( "epr5641a.130", 0x2000, 0x2000, CRC(0fcc850e) SHA1(d2d6b06bf1e2dc404aa5451cc9f1b919fb5be0f5) ) /* encrypted */ | |
| 2671 | ROM_LOAD( "epr5642a.131", 0x4000, 0x2000, CRC(4feffa17) SHA1(9d9f4227c4e60a5cc53c369e7c9ce59ea8df3553) ) /* encrypted */ | |
| 2672 | ROM_LOAD( "epr5643a.132", 0x6000, 0x2000, CRC(b8ac7eb4) SHA1(f96bcde021060a8c1c5270b73487e24d1893e8e5) ) /* encrypted */ | |
| 2669 | ROM_LOAD( "epr-5640a.129", 0x0000, 0x2000, CRC(dafb1528) SHA1(9140c5507bd931df3f8ef8d2910bc74f737b1a5a) ) /* encrypted */ | |
| 2670 | ROM_LOAD( "epr-5641a.130", 0x2000, 0x2000, CRC(0fcc850e) SHA1(d2d6b06bf1e2dc404aa5451cc9f1b919fb5be0f5) ) /* encrypted */ | |
| 2671 | ROM_LOAD( "epr-5642a.131", 0x4000, 0x2000, CRC(4feffa17) SHA1(9d9f4227c4e60a5cc53c369e7c9ce59ea8df3553) ) /* encrypted */ | |
| 2672 | ROM_LOAD( "epr-5643a.132", 0x6000, 0x2000, CRC(b8ac7eb4) SHA1(f96bcde021060a8c1c5270b73487e24d1893e8e5) ) /* encrypted */ | |
| 2673 | 2673 | ROM_LOAD( "epr-5644.133", 0x8000, 0x2000, CRC(ffd05b7d) SHA1(6fe471548d227d834c012d5d148b1ea1c12dfd00) ) |
| 2674 | ROM_LOAD( "epr5645a.134", 0xa000, 0x2000, CRC(6b4bf77c) SHA1(0200efb58b85a6873db44ffa70c3c14dbca958a6) ) | |
| 2674 | ROM_LOAD( "epr-5645a.134", 0xa000, 0x2000, CRC(6b4bf77c) SHA1(0200efb58b85a6873db44ffa70c3c14dbca958a6) ) | |
| 2675 | 2675 | |
| 2676 | 2676 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 2677 | 2677 | ROM_LOAD( "epr-5652.3", 0x0000, 0x2000, CRC(74edcb98) SHA1(bc181c73a6009ca723e715650adb920b77bd311c) ) |
| r1386 | r1387 | |
| 2688 | 2688 | ROM_LOAD( "epr-5638.86", 0x0000, 0x4000, CRC(617363dd) SHA1(c8024f541086a8a940e21219fa4522646aeb365a) ) |
| 2689 | 2689 | ROM_LOAD( "epr-5639.93", 0x4000, 0x4000, CRC(a4ec5131) SHA1(033bf46d2625f99544a784fe3fa299cc1b1b48e1) ) |
| 2690 | 2690 | |
| 2691 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2691 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2692 | 2692 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2693 | 2693 | ROM_END |
| 2694 | 2694 | |
| r1386 | r1387 | |
| 2716 | 2716 | ROM_LOAD( "epr-5638.86", 0x0000, 0x4000, CRC(617363dd) SHA1(c8024f541086a8a940e21219fa4522646aeb365a) ) |
| 2717 | 2717 | ROM_LOAD( "epr-5639.93", 0x4000, 0x4000, CRC(a4ec5131) SHA1(033bf46d2625f99544a784fe3fa299cc1b1b48e1) ) |
| 2718 | 2718 | |
| 2719 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2719 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2720 | 2720 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2721 | 2721 | ROM_END |
| 2722 | 2722 | |
| r1386 | r1387 | |
| 2744 | 2744 | ROM_LOAD( "epr-5638.86", 0x0000, 0x4000, CRC(617363dd) SHA1(c8024f541086a8a940e21219fa4522646aeb365a) ) |
| 2745 | 2745 | ROM_LOAD( "epr-5639.93", 0x4000, 0x4000, CRC(a4ec5131) SHA1(033bf46d2625f99544a784fe3fa299cc1b1b48e1) ) |
| 2746 | 2746 | |
| 2747 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2747 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2748 | 2748 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2749 | 2749 | ROM_END |
| 2750 | 2750 | |
| r1386 | r1387 | |
| 2772 | 2772 | ROM_LOAD( "epr-5514.86", 0x0000, 0x4000, CRC(fcc0a88b) SHA1(ca7db3df10deb6720096e6c50eddd9b74c47f0a0) ) |
| 2773 | 2773 | ROM_LOAD( "epr-5515.93", 0x4000, 0x4000, CRC(60908838) SHA1(aedff8ce07ab16942037e5aff212652e51c19e71) ) |
| 2774 | 2774 | |
| 2775 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2775 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2776 | 2776 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2777 | 2777 | ROM_END |
| 2778 | 2778 | |
| r1386 | r1387 | |
| 2800 | 2800 | ROM_LOAD( "epr-5514.86", 0x0000, 0x4000, CRC(fcc0a88b) SHA1(ca7db3df10deb6720096e6c50eddd9b74c47f0a0) ) |
| 2801 | 2801 | ROM_LOAD( "epr-5515.93", 0x4000, 0x4000, CRC(60908838) SHA1(aedff8ce07ab16942037e5aff212652e51c19e71) ) |
| 2802 | 2802 | |
| 2803 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2803 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2804 | 2804 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2805 | 2805 | ROM_END |
| 2806 | 2806 | |
| r1386 | r1387 | |
| 2828 | 2828 | ROM_LOAD( "epr-5749.86", 0x0000, 0x4000, CRC(e24682cd) SHA1(3f626f3e5e2db486ccf727e9869ab488643b4a8c) ) |
| 2829 | 2829 | ROM_LOAD( "epr-5750.93", 0x4000, 0x4000, CRC(6564d1ad) SHA1(f246afee7e73bc30054b0e5dcb83fa0edd2d2164) ) |
| 2830 | 2830 | |
| 2831 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2831 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2832 | 2832 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2833 | 2833 | ROM_END |
| 2834 | 2834 | |
| r1386 | r1387 | |
| 2856 | 2856 | ROM_LOAD( "epr-5749.86", 0x0000, 0x4000, CRC(e24682cd) SHA1(3f626f3e5e2db486ccf727e9869ab488643b4a8c) ) |
| 2857 | 2857 | ROM_LOAD( "epr-5750.93", 0x4000, 0x4000, CRC(6564d1ad) SHA1(f246afee7e73bc30054b0e5dcb83fa0edd2d2164) ) |
| 2858 | 2858 | |
| 2859 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2859 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2860 | 2860 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2861 | 2861 | ROM_END |
| 2862 | 2862 | |
| r1386 | r1387 | |
| 2884 | 2884 | ROM_LOAD( "epr-5805.86", 0x0000, 0x4000, CRC(5a732865) SHA1(55c54e54f052187ddd957131e56400c9c432a6b2) ) |
| 2885 | 2885 | ROM_LOAD( "epr-5806.93", 0x4000, 0x4000, CRC(26ac258c) SHA1(e4e9f929ab8ae7da74f885481cf94335d7553a1c) ) |
| 2886 | 2886 | |
| 2887 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2887 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2888 | 2888 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2889 | 2889 | ROM_END |
| 2890 | 2890 | |
| r1386 | r1387 | |
| 2908 | 2908 | ROM_LOAD( "epr-5855.117", 0x0000, 0x4000, CRC(b5f894a1) SHA1(2c72dc16739dad155fcd572e1add067a7647f5bd) ) |
| 2909 | 2909 | ROM_LOAD( "epr-5856.110", 0x4000, 0x4000, CRC(266af78f) SHA1(dcbfce550d10a1f2b3ce3e7e081fc008cb575708) ) |
| 2910 | 2910 | |
| 2911 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2911 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2912 | 2912 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2913 | 2913 | ROM_END |
| 2914 | 2914 | |
| r1386 | r1387 | |
| 2932 | 2932 | ROM_LOAD( "epr-5855.117", 0x0000, 0x4000, CRC(b5f894a1) SHA1(2c72dc16739dad155fcd572e1add067a7647f5bd) ) |
| 2933 | 2933 | ROM_LOAD( "epr-5856.110", 0x4000, 0x4000, CRC(266af78f) SHA1(dcbfce550d10a1f2b3ce3e7e081fc008cb575708) ) |
| 2934 | 2934 | |
| 2935 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2935 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2936 | 2936 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2937 | 2937 | ROM_END |
| 2938 | 2938 | |
| r1386 | r1387 | |
| 2960 | 2960 | ROM_LOAD( "epr-5855.117", 0x0000, 0x4000, CRC(b5f894a1) SHA1(2c72dc16739dad155fcd572e1add067a7647f5bd) ) |
| 2961 | 2961 | ROM_LOAD( "epr-5856.110", 0x4000, 0x4000, CRC(266af78f) SHA1(dcbfce550d10a1f2b3ce3e7e081fc008cb575708) ) |
| 2962 | 2962 | |
| 2963 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2963 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2964 | 2964 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2965 | 2965 | ROM_END |
| 2966 | 2966 | |
| r1386 | r1387 | |
| 2986 | 2986 | ROM_LOAD( "epr-5855.117", 0x0000, 0x4000, CRC(b5f894a1) SHA1(2c72dc16739dad155fcd572e1add067a7647f5bd) ) |
| 2987 | 2987 | ROM_LOAD( "epr-5856.110", 0x4000, 0x4000, CRC(266af78f) SHA1(dcbfce550d10a1f2b3ce3e7e081fc008cb575708) ) |
| 2988 | 2988 | |
| 2989 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 2989 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 2990 | 2990 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 2991 | 2991 | ROM_END |
| 2992 | 2992 | |
| r1386 | r1387 | |
| 3014 | 3014 | ROM_LOAD( "wm.86", 0x0000, 0x4000, CRC(238ae0e5) SHA1(af18cfe7f8103358a0ce2aef9bbd949fdc0bfbfc) ) |
| 3015 | 3015 | ROM_LOAD( "wm.93", 0x4000, 0x4000, CRC(a2f19170) SHA1(47dacc380b09c6365c737d320145cedad54ecedb) ) |
| 3016 | 3016 | |
| 3017 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3017 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3018 | 3018 | ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3019 | 3019 | ROM_END |
| 3020 | 3020 | |
| r1386 | r1387 | |
| 3042 | 3042 | ROM_LOAD( "epr-6069.86", 0x0000, 0x4000, CRC(fe691e41) SHA1(90faf26685202e2a25bb3024750456014d0722b3) ) /* epr-6069.86 */ |
| 3043 | 3043 | ROM_LOAD( "epr-6070.93", 0x4000, 0x4000, CRC(34f080df) SHA1(0e7d28e3325c8c3f06438fde29ea0ffe57fc325f) ) /* epr-6070.93 */ |
| 3044 | 3044 | |
| 3045 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3045 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3046 | 3046 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3047 | 3047 | /* pr-5317.106 */ |
| 3048 | 3048 | ROM_END |
| r1386 | r1387 | |
| 3068 | 3068 | ROM_LOAD( "epr-6069.117", 0x0000, 0x4000, CRC(fe691e41) SHA1(90faf26685202e2a25bb3024750456014d0722b3) ) |
| 3069 | 3069 | ROM_LOAD( "epr-6070.110", 0x4000, 0x4000, CRC(34f080df) SHA1(0e7d28e3325c8c3f06438fde29ea0ffe57fc325f) ) |
| 3070 | 3070 | |
| 3071 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3071 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3072 | 3072 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3073 | 3073 | ROM_END |
| 3074 | 3074 | |
| r1386 | r1387 | |
| 3093 | 3093 | ROM_LOAD( "epr6454a.117", 0x0000, 0x4000, CRC(a5d96780) SHA1(e0571f6fd031bbe2d971c3be7b96a017b0ea4be9) ) |
| 3094 | 3094 | ROM_LOAD( "epr-6455.05", 0x4000, 0x4000, CRC(32ee64a1) SHA1(21743f78735fc9105fbbfac420bdaa2965b4b56f) ) |
| 3095 | 3095 | |
| 3096 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3096 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3097 | 3097 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3098 | 3098 | ROM_END |
| 3099 | 3099 | |
| r1386 | r1387 | |
| 3118 | 3118 | ROM_LOAD( "epr6454a.117", 0x0000, 0x4000, CRC(a5d96780) SHA1(e0571f6fd031bbe2d971c3be7b96a017b0ea4be9) ) |
| 3119 | 3119 | ROM_LOAD( "epr-6455.05", 0x4000, 0x4000, CRC(32ee64a1) SHA1(21743f78735fc9105fbbfac420bdaa2965b4b56f) ) |
| 3120 | 3120 | |
| 3121 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3121 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3122 | 3122 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3123 | 3123 | ROM_END |
| 3124 | 3124 | |
| r1386 | r1387 | |
| 3145 | 3145 | ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) ) |
| 3146 | 3146 | ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) ) |
| 3147 | 3147 | |
| 3148 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3148 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3149 | 3149 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3150 | 3150 | ROM_END |
| 3151 | 3151 | |
| r1386 | r1387 | |
| 3172 | 3172 | ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) ) |
| 3173 | 3173 | ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) ) |
| 3174 | 3174 | |
| 3175 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3175 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3176 | 3176 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3177 | 3177 | ROM_END |
| 3178 | 3178 | |
| r1386 | r1387 | |
| 3202 | 3202 | ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) ) /* epr-6547.4 */ |
| 3203 | 3203 | ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) ) /* epr-6549.2 */ |
| 3204 | 3204 | |
| 3205 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3205 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3206 | 3206 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3207 | 3207 | /* pr-5317.106 */ |
| 3208 | 3208 | ROM_END |
| r1386 | r1387 | |
| 3230 | 3230 | ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) ) |
| 3231 | 3231 | ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) ) |
| 3232 | 3232 | |
| 3233 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3233 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3234 | 3234 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3235 | 3235 | ROM_END |
| 3236 | 3236 | |
| r1386 | r1387 | |
| 3260 | 3260 | ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) ) /* epr-6547.4 */ |
| 3261 | 3261 | ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) ) /* epr-6549.2 */ |
| 3262 | 3262 | |
| 3263 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3263 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3264 | 3264 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3265 | 3265 | ROM_END |
| 3266 | 3266 | |
| r1386 | r1387 | |
| 3287 | 3287 | ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) ) |
| 3288 | 3288 | ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) ) |
| 3289 | 3289 | |
| 3290 | ROM_REGION( 0x0220, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3290 | ROM_REGION( 0x0220, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3291 | 3291 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3292 | 3292 | ROM_LOAD( "nprinces.129", 0x0100, 0x0100, CRC(ae765f62) SHA1(9434b5a23d118a9c62015b479719826b38269cd4) ) /* decryption table (not used) */ |
| 3293 | 3293 | ROM_LOAD( "nprinces.123", 0x0200, 0x0020, CRC(ed5146e9) SHA1(7044035c07636e4029f4b746c1a92e15173869e9) ) /* decryption table (not used) */ |
| r1386 | r1387 | |
| 3316 | 3316 | ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) ) |
| 3317 | 3317 | ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) ) |
| 3318 | 3318 | |
| 3319 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3319 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3320 | 3320 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3321 | 3321 | ROM_END |
| 3322 | 3322 | |
| r1386 | r1387 | |
| 3341 | 3341 | ROM_LOAD( "epr-6645.117", 0x0000, 0x4000, CRC(1ba167ee) SHA1(5a105cc3112f2533e7c5982233405d365402fba2) ) |
| 3342 | 3342 | ROM_LOAD( "epr-6646.04", 0x4000, 0x4000, CRC(edda7ad6) SHA1(eef7dcde632787283c4cb522380b138060018204) ) |
| 3343 | 3343 | |
| 3344 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3344 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3345 | 3345 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3346 | 3346 | ROM_END |
| 3347 | 3347 | |
| r1386 | r1387 | |
| 3366 | 3366 | ROM_LOAD( "epr-6645.117", 0x0000, 0x4000, CRC(1ba167ee) SHA1(5a105cc3112f2533e7c5982233405d365402fba2) ) |
| 3367 | 3367 | ROM_LOAD( "epr-6646.04", 0x4000, 0x4000, CRC(edda7ad6) SHA1(eef7dcde632787283c4cb522380b138060018204) ) |
| 3368 | 3368 | |
| 3369 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3369 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3370 | 3370 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3371 | 3371 | ROM_END |
| 3372 | 3372 | |
| r1386 | r1387 | |
| 3393 | 3393 | ROM_LOAD( "epr-6736.110", 0x8000, 0x4000, CRC(565c25d0) SHA1(5ae524ef01138c5042b223286d65eb9043c0f0d5) ) |
| 3394 | 3394 | ROM_LOAD( "epr-6738.05", 0xc000, 0x4000, CRC(e116285f) SHA1(b6fb50b02a981b3b23385200045ae537092d26d6) ) |
| 3395 | 3395 | |
| 3396 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3396 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3397 | 3397 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3398 | 3398 | ROM_END |
| 3399 | 3399 | |
| r1386 | r1387 | |
| 3420 | 3420 | ROM_LOAD( "epr-6736.110", 0x8000, 0x4000, CRC(565c25d0) SHA1(5ae524ef01138c5042b223286d65eb9043c0f0d5) ) |
| 3421 | 3421 | ROM_LOAD( "epr-6738.05", 0xc000, 0x4000, CRC(e116285f) SHA1(b6fb50b02a981b3b23385200045ae537092d26d6) ) |
| 3422 | 3422 | |
| 3423 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3423 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3424 | 3424 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3425 | 3425 | ROM_END |
| 3426 | 3426 | |
| r1386 | r1387 | |
| 3478 | 3478 | ROM_LOAD( "epr-6922.110", 0x8000, 0x4000, CRC(37f77a78) SHA1(01d8bd41303bd5e3a6f1cdafa4a1d682e4c659a2) ) |
| 3479 | 3479 | ROM_LOAD( "epr-6924.05", 0xc000, 0x4000, CRC(42bdc8f6) SHA1(f31d82641187a7cc77a4a19189b5a15d5168cbd7) ) |
| 3480 | 3480 | |
| 3481 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3481 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3482 | 3482 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3483 | 3483 | ROM_END |
| 3484 | 3484 | |
| r1386 | r1387 | |
| 3505 | 3505 | ROM_LOAD( "epr-6922.110", 0x8000, 0x4000, CRC(37f77a78) SHA1(01d8bd41303bd5e3a6f1cdafa4a1d682e4c659a2) ) |
| 3506 | 3506 | ROM_LOAD( "epr-6924.05", 0xc000, 0x4000, CRC(42bdc8f6) SHA1(f31d82641187a7cc77a4a19189b5a15d5168cbd7) ) |
| 3507 | 3507 | |
| 3508 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3508 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3509 | 3509 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3510 | 3510 | ROM_END |
| 3511 | 3511 | |
| r1386 | r1387 | |
| 3533 | 3533 | ROM_LOAD( "epr-6922.110", 0x8000, 0x4000, CRC(37f77a78) SHA1(01d8bd41303bd5e3a6f1cdafa4a1d682e4c659a2) ) |
| 3534 | 3534 | ROM_LOAD( "epr-6924.05", 0xc000, 0x4000, CRC(42bdc8f6) SHA1(f31d82641187a7cc77a4a19189b5a15d5168cbd7) ) |
| 3535 | 3535 | |
| 3536 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3536 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3537 | 3537 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3538 | 3538 | ROM_END |
| 3539 | 3539 | |
| 3540 | 3540 | /* |
| 3541 | Shooting Master (SEGA) - | |
| 3541 | Shooting Master (SEGA) - Rev A, 8751 315-5159a | |
| 3542 | 3542 | Year: 1985 |
| 3543 | 3543 | System 2 |
| 3544 | 3544 | |
| r1386 | r1387 | |
| 3549 | 3549 | ROM_START( shtngmst ) |
| 3550 | 3550 | ROM_REGION( 0x20000, REGION_CPU1, 0 ) |
| 3551 | 3551 | /* This rom is located on the daughter board .*/ |
| 3552 | ROM_LOAD( "epr7100.ic18", | |
| 3552 | ROM_LOAD( "epr7100a.ic18", | |
| 3553 | 3553 | /* These roms are located on the main board. */ |
| 3554 | 3554 | ROM_LOAD( "epr7101.ic91", 0x10000, 0x8000, CRC(ebf5ff72) SHA1(13ae06e3a81cf00b80ec939d5baf30143d61d480) ) |
| 3555 | 3555 | ROM_LOAD( "epr7102.ic92", 0x18000, 0x8000, CRC(c890a4ad) SHA1(4b59d37902ace3a69b380ff40652ee37c85f0e9d) ) |
| r1386 | r1387 | |
| 3560 | 3560 | |
| 3561 | 3561 | /* This mcu is located on the main board. */ |
| 3562 | 3562 | ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Internal i8751 MCU code */ |
| 3563 | ROM_LOAD( "315-5159.ic74", 0x00000, 0x1000, NO_DUMP ) | |
| 3563 | ROM_LOAD( "315-5159a.ic74", 0x00000, 0x1000, NO_DUMP ) | |
| 3564 | 3564 | |
| 3565 | 3565 | /* These roms are located on the main board. */ |
| 3566 | 3566 | ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) |
| r1386 | r1387 | |
| 3596 | 3596 | ROM_END |
| 3597 | 3597 | |
| 3598 | 3598 | /* |
| 3599 | Shooting Master (SEGA) - Set | |
| 3599 | Shooting Master (SEGA) - Set 1, 8751 315-5159 | |
| 3600 | 3600 | Year: 1985 |
| 3601 | 3601 | System 2 |
| 3602 | 3602 | |
| r1386 | r1387 | |
| 3604 | 3604 | Light Gun Board? 834-5720 |
| 3605 | 3605 | */ |
| 3606 | 3606 | |
| 3607 | ROM_START( shtngms | |
| 3607 | ROM_START( shtngms1 ) | |
| 3608 | 3608 | ROM_REGION( 0x20000, REGION_CPU1, 0 ) |
| 3609 | 3609 | /* This rom is located on the daughter board .*/ |
| 3610 | ROM_LOAD( "epr7100 | |
| 3610 | ROM_LOAD( "epr7100 | |
| 3611 | 3611 | /* These roms are located on the main board. */ |
| 3612 | 3612 | ROM_LOAD( "epr7101.ic91", 0x10000, 0x8000, CRC(ebf5ff72) SHA1(13ae06e3a81cf00b80ec939d5baf30143d61d480) ) |
| 3613 | 3613 | ROM_LOAD( "epr7102.ic92", 0x18000, 0x8000, CRC(c890a4ad) SHA1(4b59d37902ace3a69b380ff40652ee37c85f0e9d) ) |
| r1386 | r1387 | |
| 3618 | 3618 | |
| 3619 | 3619 | /* This mcu is located on the main board. */ |
| 3620 | 3620 | ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* Internal i8751 MCU code */ |
| 3621 | ROM_LOAD( "315-5159 | |
| 3621 | ROM_LOAD( "315-5159 | |
| 3622 | 3622 | |
| 3623 | 3623 | /* These roms are located on the main board. */ |
| 3624 | 3624 | ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) |
| r1386 | r1387 | |
| 3706 | 3706 | ROM_START( shtngmsa ) |
| 3707 | 3707 | ROM_REGION( 0x20000, REGION_CPU1, 0 ) |
| 3708 | 3708 | ROM_LOAD( "7100.18", 0x00000, 0x8000, CRC(268ecb1d) SHA1(a9274c9718f7244235cc6df76331d6a0b7e4e4c8) ) // different.. |
| 3709 | ROM_LOAD( "epr7101", 0x10000, 0x8000, CRC(ebf5ff72) SHA1(13ae06e3a81cf00b80ec939d5baf30143d61d480) ) | |
| 3710 | ROM_LOAD( "epr7102", 0x18000, 0x8000, CRC(c890a4ad) SHA1(4b59d37902ace3a69b380ff40652ee37c85f0e9d) ) | |
| 3709 | ROM_LOAD( "epr7101.ic91", 0x10000, 0x8000, CRC(ebf5ff72) SHA1(13ae06e3a81cf00b80ec939d5baf30143d61d480) ) | |
| 3710 | ROM_LOAD( "epr7102.ic92", 0x18000, 0x8000, CRC(c890a4ad) SHA1(4b59d37902ace3a69b380ff40652ee37c85f0e9d) ) | |
| 3711 | 3711 | |
| 3712 | 3712 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 3713 | ROM_LOAD( "epr7043", | |
| 3713 | ROM_LOAD( "epr7043.ic126", | |
| 3714 | 3714 | |
| 3715 | 3715 | ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 3716 | ROM_LOAD( "epr7040", 0x00000, 0x8000, CRC(f30769fa) SHA1(366c1fbe4e1c8943b209f6c831c9a6b7e4372105) ) | |
| 3717 | ROM_LOAD( "epr7041", 0x08000, 0x8000, CRC(f3e273f9) SHA1(b8715c528299dc1e4f0c19c50d91ca9861a423a1) ) | |
| 3718 | ROM_LOAD( "epr7042", 0x10000, 0x8000, CRC(6841c917) SHA1(6553843eea0131eb7b5a9aa29dddf641e41d8cc3) ) | |
| 3716 | ROM_LOAD( "epr7040.ic4", 0x00000, 0x8000, CRC(f30769fa) SHA1(366c1fbe4e1c8943b209f6c831c9a6b7e4372105) ) | |
| 3717 | ROM_LOAD( "epr7041.ic5", 0x08000, 0x8000, CRC(f3e273f9) SHA1(b8715c528299dc1e4f0c19c50d91ca9861a423a1) ) | |
| 3718 | ROM_LOAD( "epr7042.ic6", 0x10000, 0x8000, CRC(6841c917) SHA1(6553843eea0131eb7b5a9aa29dddf641e41d8cc3) ) | |
| 3719 | 3719 | |
| 3720 | 3720 | ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_ERASEFF ) |
| 3721 | 3721 | ROM_LOAD( "epr7110", 0x00000, 0x8000, CRC(5d1a5048) SHA1(d1626ab1981080451c912df7e4ad7f76c0cb3459) ) |
| r1386 | r1387 | |
| 3727 | 3727 | ROM_LOAD( "epr7107", 0x30000, 0x8000, CRC(8f50ea24) SHA1(781687e202dedca7b72c9bd5b97d9d46fcfd601c) ) |
| 3728 | 3728 | |
| 3729 | 3729 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) |
| 3730 | ROM_LOAD( "epr7113", 0x0000, 0x0100, CRC(5c0e1360) SHA1(2011b3eef2a58f9bd3f3b1bb9e6c201db85727c2) ) /* palette red component */ | |
| 3731 | ROM_LOAD( "epr7112", 0x0100, 0x0100, CRC(46fbd351) SHA1(1fca7fbc5d5f8e13e58bbac735511bd0af392446) ) /* palette green component */ | |
| 3732 | ROM_LOAD( "epr7111", 0x0200, 0x0100, CRC(8123b6b9) SHA1(fb2c5498f0603b5cd270402a738c891a85453666) ) /* palette blue component */ | |
| 3733 | ROM_LOAD( "epr5317", 0x0300, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ | |
| 3730 | ROM_LOAD( "epr7113.ic20", 0x00000, 0x0100, CRC(5c0e1360) SHA1(2011b3eef2a58f9bd3f3b1bb9e6c201db85727c2) ) /* palette red component */ | |
| 3731 | ROM_LOAD( "epr7112.ic14", 0x00100, 0x0100, CRC(46fbd351) SHA1(1fca7fbc5d5f8e13e58bbac735511bd0af392446) ) /* palette green component */ | |
| 3732 | ROM_LOAD( "epr7111.ic8", 0x00200, 0x0100, CRC(8123b6b9) SHA1(fb2c5498f0603b5cd270402a738c891a85453666) ) /* palette blue component - N82S129AN */ | |
| 3733 | ROM_LOAD( "epr5317.ic37", 0x00300, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) - N82S129AN */ | |
| 3734 | 3734 | |
| 3735 | 3735 | ROM_REGION( 0x0400, REGION_PLDS, ROMREGION_DISPOSE ) |
| 3736 | ROM_LOAD( "pal16r4a.ic9", 0x0000, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) ) /* label on chip is: 315-5137 */ | |
| 3737 | ROM_LOAD( "pal16r4a(315-5137).bin", 0x0200, 0x0104, CRC(6ffd9e6f) SHA1(a60a3a2ec5bc256b18bfff0fec0172ee2e4fd955) ) | |
| 3736 | ROM_LOAD( "315-5137.bin", 0x00000, 0x0104, CRC(6ffd9e6f) SHA1(a60a3a2ec5bc256b18bfff0fec0172ee2e4fd955) ) /* TI PAL16R4A-2CN Located at IC10 */ | |
| 3737 | ROM_LOAD( "315-5138.bin", 0x00000, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) ) /* TI PAL16R4ACN Located at IC11 */ | |
| 3738 | 3738 | ROM_END |
| 3739 | 3739 | |
| 3740 | 3740 | /* |
| r1386 | r1387 | |
| 3888 | 3888 | ROM_LOAD( "4d.110", 0x8000, 0x4000, CRC(6ec5990a) SHA1(a26dbd470744c38a26a016e5d4792ac2f2b9bc4b) ) |
| 3889 | 3889 | ROM_LOAD( "4d.05", 0xc000, 0x4000, CRC(f31a1e6a) SHA1(f49dbc4b381e7096d5ffe3c16660dd63121dabf7) ) |
| 3890 | 3890 | |
| 3891 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3891 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3892 | 3892 | ROM_LOAD( "pr5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3893 | 3893 | ROM_END |
| 3894 | 3894 | |
| r1386 | r1387 | |
| 3944 | 3944 | ROM_LOAD( "epr-7408.110", 0x8000, 0x4000, CRC(3189f33c) SHA1(8476c2c01920f0492cf643929d4f023f3afe0164) ) /* epr-7408.4 */ |
| 3945 | 3945 | ROM_LOAD( "epr-7410.05", 0xc000, 0x4000, CRC(ced74789) SHA1(d0ad845bfe83412ac8d43125e1c50d0581a5b47e) ) /* epr-7410.2 */ |
| 3946 | 3946 | |
| 3947 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3947 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3948 | 3948 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3949 | 3949 | /* pr-5317.106 */ |
| 3950 | 3950 | ROM_END |
| r1386 | r1387 | |
| 3972 | 3972 | ROM_LOAD( "epr-6307.05", 0x8000, 0x4000, CRC(0a5ad543) SHA1(5acada30c1affc4ffbebc8365a9ba4465f213d47) ) |
| 3973 | 3973 | ROM_LOAD( "epr-6309.110", 0xc000, 0x4000, CRC(7423ad98) SHA1(e19b4c64795f30e1491520160d315e4148d58df2) ) |
| 3974 | 3974 | |
| 3975 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 3975 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 3976 | 3976 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 3977 | 3977 | /* pr-5317.106 */ |
| 3978 | 3978 | ROM_END |
| r1386 | r1387 | |
| 4000 | 4000 | ROM_LOAD( "epr-6307.05", 0x8000, 0x4000, CRC(0a5ad543) SHA1(5acada30c1affc4ffbebc8365a9ba4465f213d47) ) |
| 4001 | 4001 | ROM_LOAD( "epr-6309.110", 0xc000, 0x4000, CRC(7423ad98) SHA1(e19b4c64795f30e1491520160d315e4148d58df2) ) |
| 4002 | 4002 | |
| 4003 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4003 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4004 | 4004 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4005 | 4005 | /* pr-5317.106 */ |
| 4006 | 4006 | ROM_END |
| r1386 | r1387 | |
| 4028 | 4028 | ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) ) |
| 4029 | 4029 | ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) |
| 4030 | 4030 | |
| 4031 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4031 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4032 | 4032 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4033 | 4033 | ROM_END |
| 4034 | 4034 | |
| r1386 | r1387 | |
| 4055 | 4055 | ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) ) |
| 4056 | 4056 | ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) |
| 4057 | 4057 | |
| 4058 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4058 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4059 | 4059 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4060 | 4060 | ROM_END |
| 4061 | 4061 | |
| r1386 | r1387 | |
| 4085 | 4085 | ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) ) /* epr-7486.4 */ |
| 4086 | 4086 | ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) /* epr-7488.2 */ |
| 4087 | 4087 | |
| 4088 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4088 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4089 | 4089 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4090 | 4090 | /* pr-5317.106 */ |
| 4091 | 4091 | ROM_END |
| r1386 | r1387 | |
| 4116 | 4116 | ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) ) /* epr-7486.4 */ |
| 4117 | 4117 | ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) /* epr-7488.2 */ |
| 4118 | 4118 | |
| 4119 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4119 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4120 | 4120 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4121 | 4121 | /* pr-5317.106 */ |
| 4122 | 4122 | ROM_END |
| r1386 | r1387 | |
| 4144 | 4144 | ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) ) |
| 4145 | 4145 | ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) |
| 4146 | 4146 | |
| 4147 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4147 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4148 | 4148 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4149 | 4149 | ROM_END |
| 4150 | 4150 | |
| r1386 | r1387 | |
| 4178 | 4178 | ROM_LOAD( "7578.87", 0x00000, 0x8000, CRC(6ff1637f) SHA1(9a6ddbd7b8d53273b30c3529b028c1f28bf3c63b) ) // epr7577.ic110 |
| 4179 | 4179 | ROM_LOAD( "7577.86", 0x08000, 0x8000, CRC(58b3705e) SHA1(1a8ff3f1765a3b21145bd1a6c85441f806f7b17d) ) // epr7576.ic117 |
| 4180 | 4180 | |
| 4181 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4181 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4182 | 4182 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4183 | 4183 | ROM_END |
| 4184 | 4184 | |
| r1386 | r1387 | |
| 4205 | 4205 | ROM_LOAD( "ic110_86.bin", 0x8000, 0x4000, CRC(26d0fac4) SHA1(2e6a06f6850b2d19e3dd7dcdc6b700d0eda878cb) ) |
| 4206 | 4206 | ROM_LOAD( "ic005_88.bin", 0xc000, 0x4000, CRC(2602e519) SHA1(00e94ec7ae37b5063137d4d49af7806fb0357c4b) ) |
| 4207 | 4207 | |
| 4208 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4208 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4209 | 4209 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4210 | 4210 | ROM_END |
| 4211 | 4211 | |
| r1386 | r1387 | |
| 4259 | 4259 | ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) ) /* epr-7486.4 */ |
| 4260 | 4260 | ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) /* epr-7488.2 */ |
| 4261 | 4261 | |
| 4262 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4262 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4263 | 4263 | ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4264 | 4264 | /* pr-5317.106 */ |
| 4265 | 4265 | ROM_END |
| r1386 | r1387 | |
| 4344 | 4344 | ROM_LOAD( "bg.110", 0x8000, 0x4000, CRC(064c812c) SHA1(673790dc5131fd280333386a0e9915fb94e9f3e1) ) |
| 4345 | 4345 | ROM_LOAD( "bg.05", 0xc000, 0x4000, CRC(02e0b040) SHA1(fb626fc31dfe25bf9fac0c8d76d5041609b06e82) ) |
| 4346 | 4346 | |
| 4347 | ROM_REGION( 0x0100, REGION_USER2, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4347 | ROM_REGION( 0x0100, REGION_USER2, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4348 | 4348 | ROM_LOAD( "pr5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4349 | 4349 | ROM_END |
| 4350 | 4350 | |
| r1386 | r1387 | |
| 4370 | 4370 | ROM_LOAD( "bg.110", 0x8000, 0x4000, CRC(064c812c) SHA1(673790dc5131fd280333386a0e9915fb94e9f3e1) ) |
| 4371 | 4371 | ROM_LOAD( "bg.05", 0xc000, 0x4000, CRC(02e0b040) SHA1(fb626fc31dfe25bf9fac0c8d76d5041609b06e82) ) |
| 4372 | 4372 | |
| 4373 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */ | |
| 4373 | ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */ | |
| 4374 | 4374 | ROM_LOAD( "pr5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ |
| 4375 | 4375 | ROM_END |
| 4376 | 4376 | |
| r1386 | r1387 | |
| 4821 | 4821 | } |
| 4822 | 4822 | |
| 4823 | 4823 | |
| 4824 | GAME( 1983, starjack, 0, small, starjack, 0, ROT270, "Sega", "Star Jacker (Sega)", GAME_SUPPORTS_SAVE ) | |
| 4825 | GAME( 1983, starjacs, starjack, small, starjacs, 0, ROT270, "Stern", "Star Jacker (Stern)", GAME_SUPPORTS_SAVE ) | |
| 4826 | GAME( 1983, regulus, 0, small, regulus, regulus, ROT270, "Sega", "Regulus (315-5033, New Ver.)", GAME_SUPPORTS_SAVE ) | |
| 4827 | GAME( 1983, reguluso, regulus, small, reguluso, regulus, ROT270, "Sega", "Regulus (315-5033, Old Ver.)", GAME_SUPPORTS_SAVE ) | |
| 4828 | GAME( 1983, regulusu, regulus, small, regulus, 0, ROT270, "Sega", "Regulus (not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4829 | GAME( 1983, upndown, 0, system1, upndown, nprinces, ROT270, "Sega", "Up'n Down (315-5030)", GAME_SUPPORTS_SAVE ) | |
| 4830 | GAME( 1983, upndownu, upndown, system1, upndown, 0, ROT270, "Sega", "Up'n Down (not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4831 | GAME( 1984, mrviking, 0, small, mrviking, mrviking, ROT270, "Sega", "Mister Viking (315-5041)", GAME_SUPPORTS_SAVE ) | |
| 4832 | GAME( 1984, mrvikngj, mrviking, small, mrvikngj, mrviking, ROT270, "Sega", "Mister Viking (315-5041, Japan)", GAME_SUPPORTS_SAVE ) | |
| 4833 | GAME( 1984, swat, 0, system1, swat, swat, ROT270, "Coreland / Sega", "SWAT (315-5048)", GAME_SUPPORTS_SAVE ) | |
| 4834 | GAME( 1984, flicky, 0, system1, flicky, flicky, ROT0, "Sega", "Flicky (128k Version, System 2, 315-5051)", GAME_SUPPORTS_SAVE ) | |
| 4835 | GAME( 1984, flicks2, flicky, system1, flicky, 0, ROT0, "Sega", "Flicky (128k Version, System 2, not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4836 | GAME( 1984, flickyo, flicky, system1, flicky, flicky, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 1)", GAME_SUPPORTS_SAVE ) | |
| 4837 | GAME( 1984, flicks1, flicky, system1, flicky, flicky, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 2)", GAME_SUPPORTS_SAVE ) | |
| 4838 | GAME( 1984, wmatch, 0, small, wmatch, wmatch, ROT270, "Sega", "Water Match (315-5064)", GAME_SUPPORTS_SAVE ) | |
| 4839 | GAME( 1984, bullfgt, 0, system1, bullfgt, bullfgtj, ROT0, "Coreland / Sega", "Bullfight (315-5065)", GAME_SUPPORTS_SAVE ) | |
| 4840 | GAME( 1984, thetogyu, bullfgt, system1, bullfgt, bullfgtj, ROT0, "Coreland / Sega", "The Togyu (315-5065, Japan)", GAME_SUPPORTS_SAVE ) | |
| 4841 | GAME( 1984, spatter, 0, small, spatter, spatter, ROT0, "Sega", "Spatter", GAME_SUPPORTS_SAVE ) | |
| 4842 | GAME( 1984, ssanchan, spatter, small, spatter, spatter, ROT0, "Sega", "Sanrin San Chan (Japan)", GAME_SUPPORTS_SAVE ) | |
| 4843 | GAME( 1985, pitfall2, 0, pitfall2, pitfall2, pitfall2, ROT0, "Sega", "Pitfall II (315-5093)", GAME_SUPPORTS_SAVE ) | |
| 4844 | GAME( 1985, pitfallu, pitfall2, pitfall2, pitfallu, 0, ROT0, "Sega", "Pitfall II (not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4845 | GAME( 1985, seganinj, 0, system1, seganinj, seganinj, ROT0, "Sega", "Sega Ninja (315-5102)", GAME_SUPPORTS_SAVE ) | |
| 4846 | GAME( 1985, seganinu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Sega Ninja (not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4847 | GAME( 1985, ninja, seganinj, system1, seganinj, seganinj, ROT0, "Sega", "Ninja (315-5102)", GAME_SUPPORTS_SAVE ) | |
| 4848 | GAME( 1985, nprinces, seganinj, system1, seganinj, flicky, ROT0, "bootleg?", "Ninja Princess (315-5051, 64k Ver. bootleg?)", GAME_SUPPORTS_SAVE ) | |
| 4849 | GAME( 1985, nprincso, seganinj, system1, seganinj, nprinces, ROT0, "Sega", "Ninja Princess (315-5098, 128k Ver.)", GAME_SUPPORTS_SAVE ) | |
| 4850 | GAME( 1985, nprincsu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Ninja Princess (64k Ver. not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4851 | GAME( 1985, nprincsb, seganinj, system1, seganinj, flicky, ROT0, "bootleg?", "Ninja Princess (315-5051?, 128k Ver. bootleg?)", GAME_SUPPORTS_SAVE ) | |
| 4852 | GAME( 1985, imsorry, 0, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "I'm Sorry (315-5110, US)", GAME_SUPPORTS_SAVE ) | |
| 4853 | GAME( 1985, imsorryj, imsorry, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "Gonbee no I'm Sorry (315-5110, Japan)", GAME_SUPPORTS_SAVE ) | |
| 4854 | GAME( 1985, teddybb, 0, system1, teddybb, teddybb, ROT0, "Sega", "TeddyBoy Blues (315-5115, New Ver.)", GAME_SUPPORTS_SAVE ) | |
| 4855 | GAME( 1985, teddybbo, teddybb, system1, teddybb, teddybb, ROT0, "Sega", "TeddyBoy Blues (315-5115, Old Ver.)", GAME_SUPPORTS_SAVE ) | |
| 4856 | GAME( 1985, myhero, 0, system1, myhero, 0, ROT0, "Sega", "My Hero (US, not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4857 | GAME( 1985, sscandal, myhero, system1, myhero, myheroj, ROT0, "Coreland / Sega", "Seishun Scandal (315-5132, Japan)", GAME_SUPPORTS_SAVE ) | |
| 4858 | GAME( 1985, myherok, myhero, system1, myhero, myherok, ROT0, "Coreland / Sega", "My Hero (Korea)", GAME_SUPPORTS_SAVE ) | |
| 4859 | GAME( 1985, hvymetal, 0, hvymetal, hvymetal, hvymetal, ROT0, "Sega", "Heavy Metal (315-5135)", GAME_SUPPORTS_SAVE ) | |
| 4860 | GAME( 1985, shtngmst, 0, shtngmst, shtngmst, 0, ROT0, "Sega", "Shooting Master (set 1, 8751 315-5159)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) /* 8751 protection, mcu = 315-5159 */ | |
| 4861 | GAME( 1985, shtngmsa, shtngmst, shtngmst, shtngmst, 0, ROT0, "Sega [EVG]", "Shooting Master (EVG)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) /* 8751 protection, mcu = 315-5159 */ | |
| 4862 | GAME( 1985, shtngmsb, shtngmst, shtngmst, shtngmst, 0, ROT0, "Sega", "Shooting Master (set 2, 8751 315-5159a)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) /* 8751 protection, mcu = 315-5159a */ | |
| 4863 | GAME( 1985, chplft, 0, chplft, chplft, 0, ROT0, "Sega", "Choplifter (8751 315-5151)", GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) /* 8751 protection */ | |
| 4864 | GAME( 1985, chplftb, chplft, chplft, chplft, 0, ROT0, "Sega", "Choplifter (unprotected)", GAME_SUPPORTS_SAVE ) | |
| 4865 | GAME( 1985, chplftbl, chplft, chplft, chplft, 0, ROT0, "bootleg", "Choplifter (bootleg)", GAME_SUPPORTS_SAVE ) | |
| 4866 | GAME( 1985, 4dwarrio, 0, system1, 4dwarrio, 4dwarrio, ROT0, "Coreland / Sega", "4-D Warriors (315-5162)", GAME_SUPPORTS_SAVE ) | |
| 4867 | GAME( 1986, brain, 0, brain, brain, 0, ROT0, "Coreland / Sega", "Brain", GAME_SUPPORTS_SAVE ) | |
| 4868 | GAME( 1986, raflesia, 0, system1, raflesia, 4dwarrio, ROT270, "Coreland / Sega", "Rafflesia (315-5162)", GAME_SUPPORTS_SAVE ) | |
| 4824 | GAME( 1983, starjack, 0, small, starjack, 0, ROT270, "Sega", "Star Jacker (Sega)", GAME_SUPPORTS_SAVE ) | |
| 4825 | GAME( 1983, starjacs, starjack, small, starjacs, 0, ROT270, "Stern", "Star Jacker (Stern)", GAME_SUPPORTS_SAVE ) | |
| 4826 | GAME( 1983, regulus, 0, small, regulus, regulus, ROT270, "Sega", "Regulus (315-5033, Rev A.)", GAME_SUPPORTS_SAVE ) | |
| 4827 | GAME( 1983, reguluso, regulus, small, reguluso, regulus, ROT270, "Sega", "Regulus (315-5033)", GAME_SUPPORTS_SAVE ) | |
| 4828 | GAME( 1983, regulusu, regulus, small, regulus, 0, ROT270, "Sega", "Regulus (not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4829 | GAME( 1983, upndown, 0, system1, upndown, nprinces, ROT270, "Sega", "Up'n Down (315-5030)", GAME_SUPPORTS_SAVE ) | |
| 4830 | GAME( 1983, upndownu, upndown, system1, upndown, 0, ROT270, "Sega", "Up'n Down (not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4831 | GAME( 1984, mrviking, 0, small, mrviking, mrviking, ROT270, "Sega", "Mister Viking (315-5041)", GAME_SUPPORTS_SAVE ) | |
| 4832 | GAME( 1984, mrvikngj, mrviking, small, mrvikngj, mrviking, ROT270, "Sega", "Mister Viking (315-5041, Japan)", GAME_SUPPORTS_SAVE ) | |
| 4833 | GAME( 1984, swat, 0, system1, swat, swat, ROT270, "Coreland / Sega", "SWAT (315-5048)", GAME_SUPPORTS_SAVE ) | |
| 4834 | GAME( 1984, flicky, 0, system1, flicky, flicky, ROT0, "Sega", "Flicky (128k Version, System 2, 315-5051)", GAME_SUPPORTS_SAVE ) | |
| 4835 | GAME( 1984, flicks2, flicky, system1, flicky, 0, ROT0, "Sega", "Flicky (128k Version, System 2, not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4836 | GAME( 1984, flickyo, flicky, system1, flicky, flicky, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 1)", GAME_SUPPORTS_SAVE ) | |
| 4837 | GAME( 1984, flicks1, flicky, system1, flicky, flicky, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 2)", GAME_SUPPORTS_SAVE ) | |
| 4838 | GAME( 1984, wmatch, 0, small, wmatch, wmatch, ROT270, "Sega", "Water Match (315-5064)", GAME_SUPPORTS_SAVE ) | |
| 4839 | GAME( 1984, bullfgt, 0, system1, bullfgt, bullfgtj, ROT0, "Coreland / Sega", "Bullfight (315-5065)", GAME_SUPPORTS_SAVE ) | |
| 4840 | GAME( 1984, thetogyu, bullfgt, system1, bullfgt, bullfgtj, ROT0, "Coreland / Sega", "The Togyu (315-5065, Japan)", GAME_SUPPORTS_SAVE ) | |
| 4841 | GAME( 1984, spatter, 0, small, spatter, spatter, ROT0, "Sega", "Spatter", GAME_SUPPORTS_SAVE ) | |
| 4842 | GAME( 1984, ssanchan, spatter, small, spatter, spatter, ROT0, "Sega", "Sanrin San Chan (Japan)", GAME_SUPPORTS_SAVE ) | |
| 4843 | GAME( 1985, pitfall2, 0, pitfall2, pitfall2, pitfall2, ROT0, "Sega", "Pitfall II (315-5093)", GAME_SUPPORTS_SAVE ) | |
| 4844 | GAME( 1985, pitfallu, pitfall2, pitfall2, pitfallu, 0, ROT0, "Sega", "Pitfall II (not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4845 | GAME( 1985, seganinj, 0, system1, seganinj, seganinj, ROT0, "Sega", "Sega Ninja (315-5102)", GAME_SUPPORTS_SAVE ) | |
| 4846 | GAME( 1985, seganinu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Sega Ninja (not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4847 | GAME( 1985, ninja, seganinj, system1, seganinj, seganinj, ROT0, "Sega", "Ninja (315-5102)", GAME_SUPPORTS_SAVE ) | |
| 4848 | GAME( 1985, nprinces, seganinj, system1, seganinj, flicky, ROT0, "bootleg?", "Ninja Princess (315-5051, 64k Ver. bootleg?)", GAME_SUPPORTS_SAVE ) | |
| 4849 | GAME( 1985, nprincso, seganinj, system1, seganinj, nprinces, ROT0, "Sega", "Ninja Princess (315-5098, 128k Ver.)", GAME_SUPPORTS_SAVE ) | |
| 4850 | GAME( 1985, nprincsu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Ninja Princess (64k Ver. not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4851 | GAME( 1985, nprincsb, seganinj, system1, seganinj, flicky, ROT0, "bootleg?", "Ninja Princess (315-5051?, 128k Ver. bootleg?)", GAME_SUPPORTS_SAVE ) | |
| 4852 | GAME( 1985, imsorry, 0, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "I'm Sorry (315-5110, US)", GAME_SUPPORTS_SAVE ) | |
| 4853 | GAME( 1985, imsorryj, imsorry, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "Gonbee no I'm Sorry (315-5110, Japan)", GAME_SUPPORTS_SAVE ) | |
| 4854 | GAME( 1985, teddybb, 0, system1, teddybb, teddybb, ROT0, "Sega", "TeddyBoy Blues (315-5115, New Ver.)", GAME_SUPPORTS_SAVE ) | |
| 4855 | GAME( 1985, teddybbo, teddybb, system1, teddybb, teddybb, ROT0, "Sega", "TeddyBoy Blues (315-5115, Old Ver.)", GAME_SUPPORTS_SAVE ) | |
| 4856 | GAME( 1985, myhero, 0, system1, myhero, 0, ROT0, "Sega", "My Hero (US, not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4857 | GAME( 1985, sscandal, myhero, system1, myhero, myheroj, ROT0, "Coreland / Sega", "Seishun Scandal (315-5132, Japan)", GAME_SUPPORTS_SAVE ) | |
| 4858 | GAME( 1985, myherok, myhero, system1, myhero, myherok, ROT0, "Coreland / Sega", "My Hero (Korea)", GAME_SUPPORTS_SAVE ) | |
| 4859 | GAME( 1985, hvymetal, 0, hvymetal, hvymetal, hvymetal, ROT0, "Sega", "Heavy Metal (315-5135)", GAME_SUPPORTS_SAVE ) | |
| 4860 | GAME( 1985, shtngmst, 0, shtngmst, shtngmst, 0, ROT0, "Sega", "Shooting Master (Rev A, 8751 315-5159a)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) | |
| 4861 | GAME( 1985, shtngms1, shtngmst, shtngmst, shtngmst, 0, ROT0, "Sega", "Shooting Master (8751 315-5159)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) | |
| 4862 | GAME( 1985, shtngmsa, shtngmst, shtngmst, shtngmst, 0, ROT0, "Sega [EVG]", "Shooting Master (EVG, 8751 315-5159)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) | |
| 4863 | GAME( 1985, chplft, 0, chplft, chplft, 0, ROT0, "Sega", "Choplifter (8751 315-5151)", GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) | |
| 4864 | GAME( 1985, chplftb, chplft, chplft, chplft, 0, ROT0, "Sega", "Choplifter (unprotected)", GAME_SUPPORTS_SAVE ) | |
| 4865 | GAME( 1985, chplftbl, chplft, chplft, chplft, 0, ROT0, "bootleg", "Choplifter (bootleg)", GAME_SUPPORTS_SAVE ) | |
| 4866 | GAME( 1985, 4dwarrio, 0, system1, 4dwarrio, 4dwarrio, ROT0, "Coreland / Sega", "4-D Warriors (315-5162)", GAME_SUPPORTS_SAVE ) | |
| 4867 | GAME( 1986, brain, 0, brain, brain, 0, ROT0, "Coreland / Sega", "Brain", GAME_SUPPORTS_SAVE ) | |
| 4868 | GAME( 1986, raflesia, 0, system1, raflesia, 4dwarrio, ROT270, "Coreland / Sega", "Rafflesia (315-5162)", GAME_SUPPORTS_SAVE ) | |
| 4869 | 4869 | GAME( 1986, wboy, 0, system1, wboy, wboy, ROT0, "Sega (Escape license)", "Wonder Boy (set 1, 315-5177)", GAME_SUPPORTS_SAVE ) |
| 4870 | 4870 | GAME( 1986, wboyo, wboy, system1, wboy, hvymetal, ROT0, "Sega (Escape license)", "Wonder Boy (set 1, 315-5135)", GAME_SUPPORTS_SAVE ) |
| 4871 | 4871 | GAME( 1986, wboy2, wboy, system1, wboy, wboy2, ROT0, "Sega (Escape license)", "Wonder Boy (set 2, 315-5178)", GAME_SUPPORTS_SAVE ) |
| r1386 | r1387 | |
| 4875 | 4875 | GAME( 1986, wboyu, wboy, system1, wboyu, 0, ROT0, "Sega (Escape license)", "Wonder Boy (not encrypted)", GAME_SUPPORTS_SAVE ) |
| 4876 | 4876 | GAME( 1986, wboysys2, wboy, wbml, wboysys2, wboy, ROT0, "Sega (Escape license)", "Wonder Boy (system 2)", GAME_SUPPORTS_SAVE ) |
| 4877 | 4877 | GAME( 1986, wbdeluxe, wboy, system1, wbdeluxe, 0, ROT0, "Sega (Escape license)", "Wonder Boy Deluxe", GAME_SUPPORTS_SAVE ) |
| 4878 | GAME( 1986, gardia, 0, brain, gardia, gardia, ROT270, "Sega / Coreland", "Gardia (317-0006)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE) | |
| 4879 | GAME( 1986, gardiab, gardia, brain, gardia, gardiab, ROT270, "bootleg", "Gardia (317-0007?, bootleg)", GAME_NOT_WORKING | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4880 | GAME( 1986, noboranb, 0, noboranb, noboranb, noboranb, ROT270, "bootleg", "Noboranka (Japan)", GAME_SUPPORTS_SAVE ) | |
| 4881 | GAME( 1987, blockgal, 0, system1, blockgal, blockgal, ROT90, "Sega / Vic Tokai", "Block Gal (MC-8123B, 317-0029)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE) | |
| 4882 | GAME( 1987, blckgalb, blockgal, blckgalb, blockgal, bootleg, ROT90, "bootleg", "Block Gal (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4883 | GAME( 1987, tokisens, 0, wbml, tokisens, 0, ROT90, "Sega", "Toki no Senshi - Chrono Soldier", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4884 | GAME( 1987, wbml, 0, wbml, wbml, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan New Ver., MC-8123, 317-0043)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4885 | GAME( 1987, wbmljo, wbml, wbml, wbml, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan Old Ver., MC-8123, 317-0043)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4886 | GAME( 1987, wbmljb, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (Japan not encrypted)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4887 | GAME( 1987, wbmlb, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (English bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE) | |
| 4888 | GAME( 1987, wbmlbg, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (Galaxy Electronics English bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE) | |
| 4889 | GAME( 1987, dakkochn, 0, wbml, wbml, dakkochn, ROT0, "Whiteboard", "DakkoChan House (MC-8123, 317-0014)", GAME_NOT_WORKING | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4890 | GAME( 1988, ufosensi, 0, ufosensi, ufosensi, ufosensi, ROT0, "Sega", "Ufo Senshi Yohko Chan (MC-8123, 317-0064)", GAME_SUPPORTS_SAVE ) | |
| 4891 | GAME( 1988, ufosensb, ufosensi, ufosensi, ufosensi, bootlegb, ROT0, "bootleg", "Ufo Senshi Yohko Chan (not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 4878 | GAME( 1986, gardia, 0, brain, gardia, gardia, ROT270, "Sega / Coreland", "Gardia (317-0006)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE) | |
| 4879 | GAME( 1986, gardiab, gardia, brain, gardia, gardiab, ROT270, "bootleg", "Gardia (317-0007?, bootleg)", GAME_NOT_WORKING | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4880 | GAME( 1986, noboranb, 0, noboranb, noboranb, noboranb, ROT270, "bootleg", "Noboranka (Japan)", GAME_SUPPORTS_SAVE ) | |
| 4881 | GAME( 1987, blockgal, 0, system1, blockgal, blockgal, ROT90, "Sega / Vic Tokai", "Block Gal (MC-8123B, 317-0029)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE) | |
| 4882 | GAME( 1987, blckgalb, blockgal, blckgalb, blockgal, bootleg, ROT90, "bootleg", "Block Gal (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4883 | GAME( 1987, tokisens, 0, wbml, tokisens, 0, ROT90, "Sega", "Toki no Senshi - Chrono Soldier", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4884 | GAME( 1987, wbml, 0, wbml, wbml, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan New Ver., MC-8123, 317-0043)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4885 | GAME( 1987, wbmljo, wbml, wbml, wbml, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan Old Ver., MC-8123, 317-0043)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4886 | GAME( 1987, wbmljb, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (Japan not encrypted)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4887 | GAME( 1987, wbmlb, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (English bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE) | |
| 4888 | GAME( 1987, wbmlbg, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (Galaxy Electronics English bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE) | |
| 4889 | GAME( 1987, dakkochn, 0, wbml, wbml, dakkochn, ROT0, "Whiteboard", "DakkoChan House (MC-8123, 317-0014)", GAME_NOT_WORKING | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) | |
| 4890 | GAME( 1988, ufosensi, 0, ufosensi, ufosensi, ufosensi, ROT0, "Sega", "Ufo Senshi Yohko Chan (MC-8123, 317-0064)", GAME_SUPPORTS_SAVE ) | |
| 4891 | GAME( 1988, ufosensb, ufosensi, ufosensi, ufosensi, bootlegb, ROT0, "bootleg", "Ufo Senshi Yohko Chan (not encrypted)", GAME_SUPPORTS_SAVE ) |
| r1386 | r1387 | |
|---|---|---|
| 86 | 86 | static const UINT8 mg06[ 8 ] = { 0xc0, 0xe2, 0xe1, 0xfd, 0x04, 0x78, 0x70, 0xf0 }; |
| 87 | 87 | static const UINT8 mg08[ 8 ] = { 0xf0, 0xfa, 0xf9, 0xc1, 0x20, 0x1c, 0x7c, 0x80 }; |
| 88 | 88 | static const UINT8 mg09[ 8 ] = { 0xf0, 0x03, 0xe2, 0x18, 0x78, 0x7c, 0x3c, 0xc0 }; /* brute forced */ |
| 89 | static const UINT8 mg10[ 8 ] = { 0xfc, 0xf2, 0x30, 0xc1, 0xf9, 0x78, 0x60, 0xe0 }; | |
| 89 | 90 | static const UINT8 mg11[ 8 ] = { 0x80, 0xc2, 0x38, 0xf9, 0xfd, 0x1c, 0x10, 0xf0 }; |
| 91 | static const UINT8 mg12[ 8 ] = { 0x02, 0x40, 0x38, 0xf9, 0xfd, 0x1c, 0x10, 0xf0 }; | |
| 90 | 92 | static const UINT8 mg13[ 8 ] = { 0xc0, 0xe2, 0xe1, 0xf9, 0x04, 0x0c, 0x70, 0x80 }; |
| 91 | 93 | static const UINT8 mg14[ 8 ] = { 0xfc, 0xf2, 0xfa, 0x18, 0x20, 0x40, 0x81, 0x01 }; |
| 92 | 94 | static const UINT8 tt01[ 8 ] = { 0xe0, 0xf9, 0xfd, 0x7c, 0x70, 0x30, 0xc2, 0x02 }; |
| r1386 | r1387 | |
| 156 | 158 | { "flameguj", mg01, mg06 }, /* OK, geometry issues */ |
| 157 | 159 | { "glpracr3", mg01, mg08 }, |
| 158 | 160 | { "tondemo", mg01, mg09 }, /* OK */ |
| 161 | { "1on1gov", mg01, mg10 }, /* OK */ | |
| 159 | 162 | { "brvblade", mg01, mg11 }, /* OK */ |
| 163 | { "tblkkuzu", mg01, mg12 }, /* OK */ | |
| 160 | 164 | { "tecmowcm", mg01, mg13 }, /* OK */ |
| 161 | 165 | { "mfjump", mg01, mg14 }, /* OK */ |
| 162 | 166 | { "sfchamp", tt01, tt02 }, /* stuck in test mode */ |
| r1386 | r1387 | |
| 399 | 403 | } |
| 400 | 404 | n_game++; |
| 401 | 405 | } |
| 406 | ||
| 407 | at28c16_init( 0, memory_region( REGION_USER4 ), NULL ); | |
| 402 | 408 | } |
| 403 | 409 | |
| 404 | 410 | static struct PSXSPUinterface psxspu_interface = |
| r1386 | r1387 | |
| 4015 | 4021 | ROM_LOAD( "mfj.216", 0x0400000, 0x400000, CRC(0d518dba) SHA1(100cd4d0a1e678e660336027f067a9a1f5cbad3e) ) |
| 4016 | 4022 | ROM_END |
| 4017 | 4023 | |
| 4024 | ROM_START( tblkkuzu ) | |
| 4025 | TPS_BIOS | |
| 4026 | ||
| 4027 | ROM_REGION32_LE( 0x02800000, REGION_USER2, 0 ) | |
| 4028 | ROM_LOAD16_BYTE( "tbk.u119", 0x0000001, 0x100000, CRC(621b07e1) SHA1(30773aaa333fdee7ef55db2f8adde010688abce1) ) | |
| 4029 | ROM_LOAD16_BYTE( "tbk.u120", 0x0000000, 0x100000, CRC(bb390f7d) SHA1(6bce88448fbb5308952f8c221e786be8aa51ceff) ) | |
| 4030 | ROM_LOAD( "tbk.u0216", 0x0400000, 0x400000, CRC(41f8285f) SHA1(3326ab83d96d51ed31fb5c2f30630ff480d45282) ) | |
| 4031 | ROM_END | |
| 4032 | ||
| 4033 | ROM_START( 1on1gov ) | |
| 4034 | TPS_BIOS | |
| 4035 | ||
| 4036 | ROM_REGION32_LE( 0x02800000, REGION_USER2, 0 ) | |
| 4037 | ROM_LOAD16_BYTE( "1on1.u119", 0x0000001, 0x100000, CRC(10aecc19) SHA1(ad2fe6011551935907568cc3b4028f481034537c) ) | |
| 4038 | ROM_LOAD16_BYTE( "1on1.u120", 0x0000000, 0x100000, CRC(eea158bd) SHA1(2b2a56fcce46557201bbbab7b170ee64549ddafe) ) | |
| 4039 | ROM_LOAD( "ooo-0.u0217", 0x0800000, 0x400000, CRC(8b42f365) SHA1(6035a370f477f0f33894f642717fa0b012540d36) ) | |
| 4040 | ROM_LOAD( "ooo-1.u0218", 0x0c00000, 0x400000, CRC(65162f46) SHA1(db420a2f0d996b32cd4b6e9352d46a36fa31eaaa) ) | |
| 4041 | ROM_LOAD( "ooo-2.u0219", 0x1000000, 0x400000, CRC(14cf3a84) SHA1(60175a1fb2c765e4c3d0e30e77961f84cfa8485c) ) | |
| 4042 | ROM_LOAD( "ooo-3.u0220", 0x1400000, 0x400000, CRC(9a45f6ff) SHA1(e0ee90c545c821bf1d6b4709b1e40f93314c51a6) ) | |
| 4043 | ROM_LOAD( "ooo-4.u0221", 0x1800000, 0x400000, CRC(ba20a1fd) SHA1(7893f50de730624b8447f39fc7e25e4e334df845) ) | |
| 4044 | ROM_LOAD( "ooo-5.u0222", 0x1c00000, 0x400000, CRC(eed1953d) SHA1(8d3e738a07b9c6b6ca55be7b47444b5e3725065c) ) | |
| 4045 | ROM_LOAD( "ooo-6.u0223", 0x2000000, 0x400000, CRC(f74f38b6) SHA1(ff7f0ebff85fc982f8d1c13d6649d4c7c5da6c45) ) | |
| 4046 | ROM_LOAD( "ooo-7.u0323", 0x2400000, 0x400000, CRC(0e58777c) SHA1(9f8ee3c6d6d8b1482522500e18217577056d8c98) ) | |
| 4047 | ||
| 4048 | ROM_REGION( 0x800, REGION_USER4, 0 ) /* at28c16 */ | |
| 4049 | ROM_LOAD( "at28c16", 0x0000000, 0x000800, BAD_DUMP CRC(ff7b63e3) SHA1(febf073c91041394cabdc1c37cbce344b14cd6bd) ) | |
| 4050 | ROM_END | |
| 4051 | ||
| 4018 | 4052 | /* video system */ |
| 4019 | 4053 | |
| 4020 | 4054 | #define KN_BIOS \ |
| r1386 | r1387 | |
| 4600 | 4634 | GAME( 1999, glpracr3, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "Gallop Racer 3 (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4601 | 4635 | GAME( 1999, flamegun, tps, coh1002m, zn, coh1002m, ROT0, "GAPS Inc.", "Flame Gunner", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4602 | 4636 | GAME( 1999, flameguj, flamegun, coh1002m, zn, coh1002m, ROT0, "GAPS Inc.", "Flame Gunner (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4637 | GAME( 2000, tblkkuzu, tps, coh1002m, zn, coh1002m, ROT0, "Tamsoft/D3 Publisher", "The Block Kuzushi (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 4638 | GAME( 2000, 1on1gov, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "1 on 1 Government (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) | |
| 4603 | 4639 | GAME( 2000, tecmowcm, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "Tecmo World Cup Millennium (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4604 | 4640 | GAME( 2001, mfjump, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "Monster Farm Jump (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4605 | 4641 |
| r1386 | r1387 | |
|---|---|---|
| 186 | 186 | * |
| 187 | 187 | *************************************/ |
| 188 | 188 | |
| 189 | static ppi8255_interface ppi8255_intf = | |
| 189 | static const ppi8255_interface ppi8255_intf = | |
| 190 | 190 | { |
| 191 | 191 | 2, |
| 192 | 192 | { dsr_r, NULL }, |
| r1386 | r1387 | |
|---|---|---|
| 475 | 475 | } |
| 476 | 476 | |
| 477 | 477 | |
| 478 | static ppi8255_interface filetto_ppi8255_intf = | |
| 478 | static const ppi8255_interface filetto_ppi8255_intf = | |
| 479 | 479 | { |
| 480 | 480 | 2, /* 2 chips */ |
| 481 | 481 | { port_a_r,NULL }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | ||
| 4 | 4 | |
| 5 | 5 | driver by David Haywood and bits from Pierpaolo Prazzoli |
| 6 | 6 | |
| r1386 | r1387 | |
| 9 | 9 | - frequencies |
| 10 | 10 | - 1 unused rom |
| 11 | 11 | |
| 12 | ||
| 12 | Upper | |
| 13 | 13 | |
| 14 | Tow sub-boards: | |
| 14 | Sticker on the upper pcb of Success Joe (World) labelled: | |
| 15 | M6100506A | |
| 16 | SUCCESS JOE | |
| 17 | 900110149 | |
| 15 | 18 | |
| 19 | Two sub-boards: | |
| 20 | ||
| 16 | 21 | Upper: |
| 17 | 22 | |
| 18 | 23 | Program |
| r1386 | r1387 | |
| 29 | 34 | GFX? |
| 30 | 35 | Mask ROMs 401, 402 & 403 (Hitachi HN62414 Mask ROMs) |
| 31 | 36 | |
| 37 | Note: the pcb has a place for a battery circuit but the components are not soldered. | |
| 38 | ||
| 32 | 39 | Lower: |
| 33 | 40 | |
| 34 | 41 | GFX? |
| r1386 | r1387 | |
| 382 | 389 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 383 | 390 | MACHINE_DRIVER_END |
| 384 | 391 | |
| 392 | ROM_START( scessjoe ) | |
| 393 | ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */ | |
| 394 | ROM_LOAD16_BYTE( "5.4q", 0x00000, 0x10000, CRC(c805f9e7) SHA1(e1e85701bde496b1fd64211b94bfb0def597ae51) ) | |
| 395 | ROM_LOAD16_BYTE( "6.4s", 0x00001, 0x10000, CRC(eda7a537) SHA1(3bb19fbdfb6c8af4e2078958fa445ac1f4434d0d) ) | |
| 396 | ROM_LOAD16_WORD_SWAP( "sj201-nw.6m", 0x80000, 0x40000, CRC(5a64ca42) SHA1(660b8bca21ef3c2230adce7cb7e7d1f018714f23) ) | |
| 397 | ||
| 398 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 32k for Z80 code */ | |
| 399 | ROM_LOAD( "9.8q", 0x0000, 0x8000, CRC(8767e212) SHA1(13bf927febedff9d7d164fbf0da7fb3a588c2a94) ) | |
| 400 | ||
| 401 | ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 402 | ROM_LOAD( "8.5e", 0x00000, 0x10000, CRC(9bcb160e) SHA1(1677048e5ce26562ff7ba36fcc2d0ed5a652b91e) ) | |
| 403 | ROM_LOAD( "7.5c", 0x10000, 0x10000, CRC(b250c69d) SHA1(594b1bb94a162b07944a971b7fedddca5c37f2cb) ) | |
| 404 | ||
| 405 | ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 406 | ROM_LOAD( "4.4e", 0x00000, 0x10000, CRC(aa6336d3) SHA1(43f70cc3223f11d7929dd44b0edf0a31f5fe41c3) ) | |
| 407 | ROM_LOAD( "3.4c", 0x10000, 0x10000, CRC(7e2d86b5) SHA1(8b8d1b9240a700e29afc109eddf6e58a0a7666a4) ) | |
| 408 | ||
| 409 | ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE ) | |
| 410 | ROM_LOAD( "2.3m", 0x00000, 0x10000, CRC(c3254938) SHA1(fd57163f740cd4fdecca94cced91314c289741ae) ) | |
| 411 | ROM_LOAD( "1.1m", 0x10000, 0x10000, CRC(5d16a6fa) SHA1(2af907b0fcb9ff93340de3301da4b10e945455e5) ) | |
| 412 | ||
| 413 | ROM_REGION( 0x100000, REGION_GFX4, ROMREGION_DISPOSE ) | |
| 414 | ROM_LOAD16_WORD_SWAP( "sj402-nw.8e", 0x000000, 0x80000, CRC(b6d33d06) SHA1(688ccf467a5112ec522811894e2626ab5f155903) ) | |
| 415 | ROM_LOAD16_WORD_SWAP( "sj403-nw.7e", 0x080000, 0x80000, CRC(07143f56) SHA1(1b953c8826d3993a486eed6b9d94d37145fd2e79) ) | |
| 416 | ||
| 417 | ROM_REGION( 0x300000, REGION_GFX5, ROMREGION_DISPOSE ) | |
| 418 | ROM_LOAD16_WORD_SWAP( "sj404-nw.7a", 0x000000, 0x80000, CRC(8f134128) SHA1(026a6076d54cd5f1d06b29c51031cb79a6b2c11d) ) | |
| 419 | ROM_LOAD16_WORD_SWAP( "sj405-nw.7c", 0x080000, 0x80000, CRC(6fd81699) SHA1(8a4f9e47dd39b4b0213c3682da2221ca53bba658) ) | |
| 420 | ROM_LOAD16_WORD_SWAP( "sj406-nw.7d", 0x100000, 0x80000, CRC(634e33e6) SHA1(1d6a72a4ca80cd1c1fd6ce9359c304b45091cdfe) ) | |
| 421 | ROM_LOAD16_WORD_SWAP( "sj407-nw.7f", 0x180000, 0x80000, CRC(5c66ff06) SHA1(9923ba00679e1b47b5da63c1a13e0f8dd4c78bb5) ) | |
| 422 | ROM_LOAD16_WORD_SWAP( "sj408-nw.7g", 0x200000, 0x80000, CRC(6a3b1ea1) SHA1(e39a6e52d930f291bf237cf9db3d4b3d2fad53e0) ) | |
| 423 | ROM_LOAD16_WORD_SWAP( "sj409-nw.7j", 0x280000, 0x80000, CRC(d8764213) SHA1(89eadefb956863216c8e3d0380394aba35e8c856) ) | |
| 424 | ||
| 425 | ROM_REGION( 0x80000, REGION_SOUND1, 0 ) /* samples? */ | |
| 426 | ROM_LOAD( "sj401-nw.10r", 0x00000, 0x80000, CRC(25dfab59) SHA1(7d50159204ba05323a2442778f35192e66117dda) ) | |
| 427 | ROM_END | |
| 428 | ||
| 385 | 429 | ROM_START( ashnojoe ) |
| 386 | 430 | ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */ |
| 387 | 431 | ROM_LOAD16_BYTE( "5.bin", 0x00000, 0x10000, CRC(c61e1569) SHA1(422c18f5810539b5a9e3a9bd4e3b4d70bde8d1d5) ) |
| 388 | 432 | ROM_LOAD16_BYTE( "6.bin", 0x00001, 0x10000, CRC(c0a16338) SHA1(fb127b9d38f2c9807b6e23ff71935fc8a22a2e8f) ) |
| 389 | ROM_LOAD16_WORD_SWAP( "sj201-nw. | |
| 433 | ROM_LOAD16_WORD_SWAP( "sj201-nw.6m | |
| 390 | 434 | |
| 391 | 435 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 32k for Z80 code */ |
| 392 | ROM_LOAD( "9. | |
| 436 | ROM_LOAD( "9.8q | |
| 393 | 437 | |
| 394 | 438 | ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 395 | ROM_LOAD( "8. | |
| 439 | ROM_LOAD( "8.5e | |
| 396 | 440 | ROM_LOAD( "7.bin", 0x10000, 0x10000, CRC(7e1efc42) SHA1(e3c282072fdaa0b98c2a1bf25fd02c680d9ca4d7) ) |
| 397 | 441 | |
| 398 | 442 | ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 399 | ROM_LOAD( "4.bin", 0x00000, 0x10000, CRC(aa6336d3) SHA1(43f70cc3223f11d7929dd44b0edf0a31f5fe41c3) ) | |
| 400 | ROM_LOAD( "3.bin", 0x10000, 0x10000, CRC(7e2d86b5) SHA1(8b8d1b9240a700e29afc109eddf6e58a0a7666a4) ) | |
| 443 | ROM_LOAD( "4.4e", 0x00000, 0x10000, CRC(aa6336d3) SHA1(43f70cc3223f11d7929dd44b0edf0a31f5fe41c3) ) | |
| 444 | ROM_LOAD( "3.4c", 0x10000, 0x10000, CRC(7e2d86b5) SHA1(8b8d1b9240a700e29afc109eddf6e58a0a7666a4) ) | |
| 401 | 445 | |
| 402 | 446 | ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE ) |
| 403 | ROM_LOAD( "2. | |
| 447 | ROM_LOAD( "2.3m | |
| 404 | 448 | ROM_LOAD( "1.bin", 0x10000, 0x10000, CRC(1bf585f0) SHA1(4003941636e7fded95e880109c3c9dd1d8f28b07) ) |
| 405 | 449 | |
| 406 | 450 | ROM_REGION( 0x100000, REGION_GFX4, ROMREGION_DISPOSE ) |
| 407 | ROM_LOAD16_WORD_SWAP( "sj402-nw.bin", 0x000000, 0x80000, CRC(b6d33d06) SHA1(688ccf467a5112ec522811894e2626ab5f155903) ) | |
| 408 | ROM_LOAD16_WORD_SWAP( "sj403-nw.bin", 0x080000, 0x80000, CRC(07143f56) SHA1(1b953c8826d3993a486eed6b9d94d37145fd2e79) ) | |
| 451 | ROM_LOAD16_WORD_SWAP( "sj402-nw.8e", 0x000000, 0x80000, CRC(b6d33d06) SHA1(688ccf467a5112ec522811894e2626ab5f155903) ) | |
| 452 | ROM_LOAD16_WORD_SWAP( "sj403-nw.7e", 0x080000, 0x80000, CRC(07143f56) SHA1(1b953c8826d3993a486eed6b9d94d37145fd2e79) ) | |
| 409 | 453 | |
| 410 | 454 | ROM_REGION( 0x300000, REGION_GFX5, ROMREGION_DISPOSE ) |
| 411 | ROM_LOAD16_WORD_SWAP( "sj404-nw.bin", 0x000000, 0x80000, CRC(8f134128) SHA1(026a6076d54cd5f1d06b29c51031cb79a6b2c11d) ) | |
| 412 | ROM_LOAD16_WORD_SWAP( "sj405-nw.bin", 0x080000, 0x80000, CRC(6fd81699) SHA1(8a4f9e47dd39b4b0213c3682da2221ca53bba658) ) | |
| 413 | ROM_LOAD16_WORD_SWAP( "sj406-nw.bin", 0x100000, 0x80000, CRC(634e33e6) SHA1(1d6a72a4ca80cd1c1fd6ce9359c304b45091cdfe) ) | |
| 414 | ROM_LOAD16_WORD_SWAP( "sj407-nw.bin", 0x180000, 0x80000, CRC(5c66ff06) SHA1(9923ba00679e1b47b5da63c1a13e0f8dd4c78bb5) ) | |
| 415 | ROM_LOAD16_WORD_SWAP( "sj408-nw.bin", 0x200000, 0x80000, CRC(6a3b1ea1) SHA1(e39a6e52d930f291bf237cf9db3d4b3d2fad53e0) ) | |
| 416 | ROM_LOAD16_WORD_SWAP( "sj409-nw.bin", 0x280000, 0x80000, CRC(d8764213) SHA1(89eadefb956863216c8e3d0380394aba35e8c856) ) | |
| 455 | ROM_LOAD16_WORD_SWAP( "sj404-nw.7a", 0x000000, 0x80000, CRC(8f134128) SHA1(026a6076d54cd5f1d06b29c51031cb79a6b2c11d) ) | |
| 456 | ROM_LOAD16_WORD_SWAP( "sj405-nw.7c", 0x080000, 0x80000, CRC(6fd81699) SHA1(8a4f9e47dd39b4b0213c3682da2221ca53bba658) ) | |
| 457 | ROM_LOAD16_WORD_SWAP( "sj406-nw.7d", 0x100000, 0x80000, CRC(634e33e6) SHA1(1d6a72a4ca80cd1c1fd6ce9359c304b45091cdfe) ) | |
| 458 | ROM_LOAD16_WORD_SWAP( "sj407-nw.7f", 0x180000, 0x80000, CRC(5c66ff06) SHA1(9923ba00679e1b47b5da63c1a13e0f8dd4c78bb5) ) | |
| 459 | ROM_LOAD16_WORD_SWAP( "sj408-nw.7g", 0x200000, 0x80000, CRC(6a3b1ea1) SHA1(e39a6e52d930f291bf237cf9db3d4b3d2fad53e0) ) | |
| 460 | ROM_LOAD16_WORD_SWAP( "sj409-nw.7j", 0x280000, 0x80000, CRC(d8764213) SHA1(89eadefb956863216c8e3d0380394aba35e8c856) ) | |
| 417 | 461 | |
| 418 | 462 | ROM_REGION( 0x80000, REGION_SOUND1, 0 ) /* samples? */ |
| 419 | ROM_LOAD( "sj401-nw. | |
| 463 | ROM_LOAD( "sj401-nw.10r", 0x00000, 0x80000, CRC(25dfab59) SHA1(7d50159204ba05323a2442778f35192e66117dda) ) | |
| 420 | 464 | ROM_END |
| 421 | 465 | |
| 422 | GAME( 1990, ashnojoe, 0, ashnojoe, ashnojoe, ashnojoe, ROT0, "WAVE / Taito Corporation", "Ashita no Joe (Japan)", GAME_IMPERFECT_SOUND ) | |
| 466 | GAME( 1990, scessjoe, 0, ashnojoe, ashnojoe, ashnojoe, ROT0, "WAVE / Taito Corporation", "Success Joe (World)", GAME_IMPERFECT_SOUND ) | |
| 467 | GAME( 1990, ashnojoe, scessjoe, ashnojoe, ashnojoe, ashnojoe, ROT0, "WAVE / Taito Corporation", "Ashita no Joe (Japan)", GAME_IMPERFECT_SOUND ) | |
| 468 |
| r1386 | r1387 | |
|---|---|---|
| 110 | 110 | // popmessage("%02x",data); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | static ppi8255_interface ppi8255_intf = | |
| 113 | static const ppi8255_interface ppi8255_intf = | |
| 114 | 114 | { |
| 115 | 115 | 2, /* 2 chips */ |
| 116 | 116 | { input_port_0_r, input_port_2_r }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 174 | 174 | EPROM |
| 175 | 175 | **********************************************************/ |
| 176 | 176 | |
| 177 | static UINT8 default_eeprom[128]= | |
| 177 | static const UINT8 default_eeprom[128]= | |
| 178 | 178 | { |
| 179 | 179 | 0x02,0x01,0x11,0x12,0x01,0x01,0x01,0x00,0x80,0x80,0x30,0x01,0x00,0x00,0x62,0x45, |
| 180 | 180 | 0xe0,0xa0,0xff,0x28,0xff,0xff,0xfa,0xd7,0x33,0x28,0x00,0x00,0x33,0x28,0x00,0x00, |
| r1386 | r1387 | |
| 186 | 186 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
| 187 | 187 | }; |
| 188 | 188 | |
| 189 | static struct EEPROM_interface undrfire_eeprom_interface = | |
| 189 | static const struct EEPROM_interface undrfire_eeprom_interface = | |
| 190 | 190 | { |
| 191 | 191 | 6, /* address bits */ |
| 192 | 192 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | |
| 417 | static struct SN76477interface sn76477_intf = | |
| 417 | static const struct SN76477interface sn76477_intf = | |
| 418 | 418 | { |
| 419 | 419 | 0, /* N/C */ /* 4 noise_res */ |
| 420 | 420 | 0, /* N/C */ /* 5 filter_res */ |
| r1386 | r1387 | |
|---|---|---|
| 1836 | 1836 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
| 1837 | 1837 | }; |
| 1838 | 1838 | |
| 1839 | static struct EEPROM_interface eeprom_interface_tattass = | |
| 1839 | static const struct EEPROM_interface eeprom_interface_tattass = | |
| 1840 | 1840 | { |
| 1841 | 1841 | 10, // address bits 10 ==> } 1024 byte eprom |
| 1842 | 1842 | 8, // data bits 8 |
| r0 | r1387 | |
|---|---|---|
| 1 | /********************************************************************************** | |
| 2 | ||
| 3 | ||
| 4 | DRAW 80 POKER | |
| 5 | ||
| 6 | Driver by Jim Stolis. | |
| 7 | ||
| 8 | ||
| 9 | --- Technical Notes --- | |
| 10 | ||
| 11 | Name: Draw 80 Poker | |
| 12 | Company: IGT - International Gaming Technology | |
| 13 | Year: 1983 | |
| 14 | ||
| 15 | Hardware: | |
| 16 | ||
| 17 | CPU = INTEL 8039 ; I8039 compatible | |
| 18 | VIDEO = SYS 6545 ; CRTC6845 compatible | |
| 19 | SND = AY-3-8912 ; AY8910 compatible | |
| 20 | ||
| 21 | History: | |
| 22 | ||
| 23 | This is one of the first video machines produced by IGT. Originally, the | |
| 24 | company was called SIRCOMA and was founded in 1979. It became a public | |
| 25 | company in 1981 and changed its name to IGT. The motherboard has a date | |
| 26 | of 1982 (c) IGT, but the game rom labels and backglass are dated 1983. | |
| 27 | ||
| 28 | ***********************************************************************************/ | |
| 29 | #include "driver.h" | |
| 30 | #include "sound/ay8910.h" | |
| 31 | #include "cpu/i8039/i8039.h" | |
| 32 | #include "video/crtc6845.h" | |
| 33 | ||
| 34 | static tilemap *bg_tilemap; | |
| 35 | ||
| 36 | static UINT8 p1, p2, p4, bus; | |
| 37 | ||
| 38 | static UINT8 *pkr_cmos_ram; | |
| 39 | ||
| 40 | ||
| 41 | /***************** | |
| 42 | * Write Handlers * | |
| 43 | ******************/ | |
| 44 | ||
| 45 | WRITE8_HANDLER( p1_w ) | |
| 46 | { | |
| 47 | p1 = data; | |
| 48 | } | |
| 49 | ||
| 50 | WRITE8_HANDLER( p2_w ) | |
| 51 | { | |
| 52 | p2 = data; | |
| 53 | } | |
| 54 | ||
| 55 | WRITE8_HANDLER( p4_w ) | |
| 56 | { | |
| 57 | p4 = data; | |
| 58 | } | |
| 59 | ||
| 60 | WRITE8_HANDLER( bus_w ) | |
| 61 | { | |
| 62 | bus = data; | |
| 63 | } | |
| 64 | ||
| 65 | WRITE8_HANDLER( drw80pkr_cmos_w ) | |
| 66 | { | |
| 67 | //if (p2 == 0xc7) CRTC Register | |
| 68 | //if (p2 == 0xd7) CRTC Address | |
| 69 | pkr_cmos_ram[offset] = data; | |
| 70 | } | |
| 71 | ||
| 72 | /**************** | |
| 73 | * Read Handlers * | |
| 74 | ****************/ | |
| 75 | ||
| 76 | READ8_HANDLER( p1_r ) | |
| 77 | { | |
| 78 | return p1; | |
| 79 | } | |
| 80 | ||
| 81 | READ8_HANDLER( p2_r ) | |
| 82 | { | |
| 83 | return p2; | |
| 84 | } | |
| 85 | ||
| 86 | READ8_HANDLER( bus_r ) | |
| 87 | { | |
| 88 | return bus; | |
| 89 | } | |
| 90 | ||
| 91 | READ8_HANDLER( drw80pkr_cmos_r ) | |
| 92 | { | |
| 93 | return pkr_cmos_ram[offset]; | |
| 94 | } | |
| 95 | ||
| 96 | /**************************** | |
| 97 | * Video/Character functions * | |
| 98 | ****************************/ | |
| 99 | ||
| 100 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 101 | { | |
| 102 | int vr = 0; | |
| 103 | int code = vr; | |
| 104 | int color = 0; | |
| 105 | ||
| 106 | SET_TILE_INFO(0, code, color, 0); | |
| 107 | } | |
| 108 | ||
| 109 | VIDEO_START( drw80pkr ) | |
| 110 | { | |
| 111 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 40, 25); | |
| 112 | } | |
| 113 | ||
| 114 | VIDEO_UPDATE( drw80pkr ) | |
| 115 | { | |
| 116 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 117 | ||
| 118 | return 0; | |
| 119 | } | |
| 120 | ||
| 121 | PALETTE_INIT( drw80pkr ) | |
| 122 | { | |
| 123 | /* prom bits | |
| 124 | 7654 3210 | |
| 125 | ---- -xxx red component. | |
| 126 | --xx x--- green component. | |
| 127 | xx-- ---- blue component. | |
| 128 | */ | |
| 129 | int i; | |
| 130 | ||
| 131 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 132 | { | |
| 133 | int bit0, bit1, bit2, r, g, b; | |
| 134 | ||
| 135 | /* red component */ | |
| 136 | bit0 = (~color_prom[i] >> 0) & 0x01; | |
| 137 | bit1 = (~color_prom[i] >> 1) & 0x01; | |
| 138 | bit2 = (~color_prom[i] >> 2) & 0x01; | |
| 139 | r = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0; | |
| 140 | ||
| 141 | /* green component */ | |
| 142 | bit0 = (~color_prom[i] >> 3) & 0x01; | |
| 143 | bit1 = (~color_prom[i] >> 4) & 0x01; | |
| 144 | bit2 = (~color_prom[i] >> 5) & 0x01; | |
| 145 | g = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0; | |
| 146 | ||
| 147 | /* blue component */ | |
| 148 | bit0 = (~color_prom[i] >> 6) & 0x01; | |
| 149 | bit1 = (~color_prom[i] >> 7) & 0x01; | |
| 150 | bit2 = 0; | |
| 151 | b = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0; | |
| 152 | ||
| 153 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 154 | } | |
| 155 | } | |
| 156 | ||
| 157 | ||
| 158 | /************************* | |
| 159 | * Graphics Layouts * | |
| 160 | *************************/ | |
| 161 | ||
| 162 | static const gfx_layout charlayout = | |
| 163 | { | |
| 164 | 8,8, /* 8x8 characters */ | |
| 165 | 0x200, /* 512 characters */ | |
| 166 | 2, /* 2 bitplanes */ | |
| 167 | { 0x200*8*8*1, 0x200*8*8*0 }, /* bitplane offsets */ | |
| 168 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 169 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 170 | 8*8 | |
| 171 | }; | |
| 172 | ||
| 173 | ||
| 174 | /****************************** | |
| 175 | * Graphics Decode Information * | |
| 176 | ******************************/ | |
| 177 | ||
| 178 | static GFXDECODE_START( drw80pkr ) | |
| 179 | GFXDECODE_ENTRY( REGION_GFX1, 0x00000, charlayout, 0, 16 ) | |
| 180 | GFXDECODE_END | |
| 181 | ||
| 182 | ||
| 183 | /************** | |
| 184 | * Driver Init * | |
| 185 | ***************/ | |
| 186 | ||
| 187 | static DRIVER_INIT( drw80pkr ) | |
| 188 | { | |
| 189 | ||
| 190 | } | |
| 191 | ||
| 192 | ||
| 193 | /************************* | |
| 194 | * Memory map information * | |
| 195 | *************************/ | |
| 196 | ||
| 197 | static ADDRESS_MAP_START( drw80pkr_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 198 | AM_RANGE(0x0000, 0x1fff) AM_READWRITE(MRA8_ROM, MWA8_ROM) | |
| 199 | ADDRESS_MAP_END | |
| 200 | ||
| 201 | static ADDRESS_MAP_START( drw80pkr_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 202 | AM_RANGE(0x00, 0xff) AM_RAM AM_READWRITE(drw80pkr_cmos_r, drw80pkr_cmos_w) AM_BASE(&pkr_cmos_ram) | |
| 203 | AM_RANGE(I8039_t1, I8039_t1) AM_RAM | |
| 204 | AM_RANGE(I8039_p1, I8039_p1) AM_RAM AM_READWRITE(p1_r, p1_w) | |
| 205 | AM_RANGE(I8039_p2, I8039_p2) AM_RAM AM_READWRITE(p2_r, p2_w) | |
| 206 | AM_RANGE(I8039_p4, I8039_p4) AM_RAM AM_WRITE(p4_w) | |
| 207 | AM_RANGE(I8039_bus, I8039_bus) AM_RAM AM_READWRITE(bus_r, bus_w) | |
| 208 | ADDRESS_MAP_END | |
| 209 | ||
| 210 | /************************* | |
| 211 | * Input ports * | |
| 212 | *************************/ | |
| 213 | ||
| 214 | static INPUT_PORTS_START( drw80pkr ) | |
| 215 | // Unknown at this time | |
| 216 | INPUT_PORTS_END | |
| 217 | ||
| 218 | /************************* | |
| 219 | * Machine Driver * | |
| 220 | *************************/ | |
| 221 | ||
| 222 | static MACHINE_DRIVER_START( drw80pkr ) | |
| 223 | // basic machine hardware | |
| 224 | MDRV_CPU_ADD_TAG("main", I8039, 7864300) | |
| 225 | MDRV_CPU_PROGRAM_MAP(drw80pkr_map, 0) | |
| 226 | MDRV_CPU_IO_MAP(drw80pkr_io_map, 0) | |
| 227 | MDRV_CPU_VBLANK_INT(irq0_line_hold, 1) | |
| 228 | ||
| 229 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 230 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 231 | ||
| 232 | // video hardware | |
| 233 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 234 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 235 | MDRV_SCREEN_SIZE((31+1)*8, (31+1)*8) | |
| 236 | MDRV_SCREEN_VISIBLE_AREA(0*8, 24*8-1, 0*8, 27*8-1) | |
| 237 | ||
| 238 | MDRV_GFXDECODE(drw80pkr) | |
| 239 | MDRV_PALETTE_LENGTH(16*16) | |
| 240 | ||
| 241 | MDRV_PALETTE_INIT(drw80pkr) | |
| 242 | MDRV_VIDEO_START(drw80pkr) | |
| 243 | MDRV_VIDEO_UPDATE(drw80pkr) | |
| 244 | ||
| 245 | // sound hardware | |
| 246 | MDRV_SOUND_ADD(AY8912, 20000000/12) | |
| 247 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 248 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) | |
| 249 | MACHINE_DRIVER_END | |
| 250 | ||
| 251 | /************************* | |
| 252 | * Rom Load * | |
| 253 | *************************/ | |
| 254 | ||
| 255 | ROM_START( drw80pkr ) | |
| 256 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 257 | ROM_LOAD( "pm0.u81", 0x0000, 0x1000, CRC(0f3e97d2) SHA1(aa9e4015246284f32435d7320de667e075412e5b) ) | |
| 258 | ROM_LOAD( "pm1.u82", 0x1000, 0x1000, CRC(5a6ad467) SHA1(0128bd70b65244a0f68031d5f451bf115eeb7609) ) | |
| 259 | ||
| 260 | ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 261 | ROM_LOAD( "cg0-a.u74", 0x0000, 0x1000, CRC(97f5eb92) SHA1(f6c7bb42ccef8a78e8d56104ad942ae5b8e5b0df) ) | |
| 262 | ROM_LOAD( "cg1-a.u76", 0x1000, 0x1000, CRC(2a3a750d) SHA1(db6183d11b2865b011c3748dc472cf5858dde78f) ) | |
| 263 | ||
| 264 | ROM_REGION( 0x100, REGION_PROMS, 0 ) // WRONG CAP | |
| 265 | ROM_LOAD( "cap13.u92", 0x0000, 0x0100, CRC(42d6e973) SHA1(5c2983d5c80333ca45033070a2296fe58c339ee1) ) | |
| 266 | ROM_END | |
| 267 | ||
| 268 | ||
| 269 | /************************* | |
| 270 | * Game Drivers * | |
| 271 | *************************/ | |
| 272 | ||
| 273 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */ | |
| 274 | GAME( 1983, drw80pkr, 0, drw80pkr, drw80pkr, drw80pkr, ROT0, "IGT - International Gaming Technology", "Draw 80 Poker", GAME_NOT_WORKING ) |
| r1386 | r1387 | |
|---|---|---|
| 76 | 76 | * |
| 77 | 77 | *************************************/ |
| 78 | 78 | |
| 79 | static ppi8255_interface single_ppi_intf = | |
| 79 | static const ppi8255_interface single_ppi_intf = | |
| 80 | 80 | { |
| 81 | 81 | 1, |
| 82 | 82 | { unknown_porta_r }, |
| r1386 | r1387 | |
|---|---|---|
| 119 | 119 | /******************************************************************/ |
| 120 | 120 | |
| 121 | 121 | /* 93C56 EEPROM */ |
| 122 | static struct EEPROM_interface eeprom_interface = | |
| 122 | static const struct EEPROM_interface eeprom_interface = | |
| 123 | 123 | { |
| 124 | 124 | 8, /* address bits */ |
| 125 | 125 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | - dkongjr discrete interface |
| 6 | 6 | - write a shootgal palette_init |
| 7 | - when i am retired: implement 8257 DMA controller | |
| 7 | - Pestplce colors and origin | |
| 8 | - Shooting Gallery: Shootgal.txt mentions speech pcb, mikesarcade.com dk conversion | |
| 9 | Clarify | |
| 10 | - 8ballact: read 1507 no mapped | |
| 11 | - drakton - add dkongjr conversion | |
| 12 | - implement 74LS259 (8bit addressable latches), 74LS175 (QUAD D FlipFlop), 74LS373 (Octal transparent latch) | |
| 8 | 13 | |
| 14 | ||
| 15 | Done: | |
| 16 | - when i am retired: implement 8257 DMA controller | |
| 9 | 17 | - radarscp_grid_color_w() is wrong, it probably isn't supposed to change |
| 10 | 18 | the grid color. There are reports of the grid being constantly blue in |
| 11 | 19 | the real game, the flyer confirms this. |
| r1386 | r1387 | |
| 23 | 31 | - combined memory maps |
| 24 | 32 | - first attempts on decoding m58815 |
| 25 | 33 | |
| 34 | Couriersud: 11/2007 | |
| 35 | ||
| 36 | - Added configuration switch to change palette between TKG02 (radarscp conversion) and TKG04 (dkong 2board) | |
| 37 | - Added speech support (samples) to radarsc1 | |
| 38 | - Hooked up and written 8257 dma controller | |
| 39 | All dkong and dkongjr based games now use the 8257 | |
| 40 | All epos and 2650 based games now use the 8257 | |
| 41 | - Fixed 2650 games to use dkong audio as well - only cpu replaced by addon board ... | |
| 42 | - straightened memory maps | |
| 43 | - Fixed bug in dkong3b memory map | |
| 44 | - Externalized sound drivers to MACHINE_START in audio/dkong.c | |
| 45 | - DAC Filter now uses lowpass sallen key filter | |
| 46 | - Reorganized INPUT_PORTS | |
| 47 | - Fixed sound for drakton and strtheat | |
| 48 | - Added Dip-Switch locations to 8ballact | |
| 49 | - Fixed 8ballact according to conversion manual | |
| 50 | - Reorganized code | |
| 51 | - http://members.cox.net/rcolbert/mame_cocktail_project.htm mentions, that radarscp to dkong conversions | |
| 52 | have a sticker TKG-2 over the TRS-02 label. | |
| 53 | - PCB Info (Dkong.txt) mentions, that TKG-3 is a 4 board set. This seems to be based on the radarscp 4-board set trs-02. | |
| 54 | Schematics show, that these boards actually were based on TRS-02 | |
| 55 | - TKG-4 is a 2 board set. | |
| 56 | ||
| 26 | 57 | Donkey Kong and Donkey Kong Jr. memory map (preliminary) (DKong 3 follows) |
| 27 | 58 | |
| 28 | 59 | 0000-3fff ROM (Donkey Kong Jr.and Donkey Kong 3: 0000-5fff) |
| r1386 | r1387 | |
| 174 | 205 | ***************************************************************************/ |
| 175 | 206 | |
| 176 | 207 | #include "driver.h" |
| 177 | #include "cpu/i8039/i8039.h" | |
| 178 | 208 | #include "cpu/s2650/s2650.h" |
| 179 | 209 | #include "cpu/m6502/m6502.h" |
| 180 | #include "sound/dac.h" | |
| 181 | #include "sound/samples.h" | |
| 182 | #include "sound/nes_apu.h" | |
| 183 | 210 | #include "includes/dkong.h" |
| 211 | #include "machine/8257dma.h" | |
| 184 | 212 | #include <math.h> |
| 185 | 213 | |
| 186 | 214 | /************************************* |
| 187 | 215 | * |
| 188 | * | |
| 216 | * prototypes | |
| 189 | 217 | * |
| 190 | 218 | *************************************/ |
| 191 | 219 | |
| 192 | static INT8 counter; | |
| 193 | static int hunchloopback; | |
| 220 | static UINT8 hb_dma_read_byte(int channel, offs_t offset); | |
| 221 | static void hb_dma_write_byte(int channel, offs_t offset, UINT8 data); | |
| 222 | static UINT8 dk_dma_read_byte(int channel, offs_t offset); | |
| 223 | static void dk_dma_write_byte(int channel, offs_t offset, UINT8 data); | |
| 224 | static UINT8 p8257_ctl_r(void); | |
| 225 | static void p8257_ctl_w(UINT8 data); | |
| 194 | 226 | |
| 195 | 227 | /************************************* |
| 196 | 228 | * |
| 229 | * statics | |
| 230 | * | |
| 231 | *************************************/ | |
| 232 | ||
| 233 | static struct dma8257_interface dk_dma = | |
| 234 | { | |
| 235 | 0, | |
| 236 | CLOCK_1H, | |
| 237 | ||
| 238 | dk_dma_read_byte, | |
| 239 | dk_dma_write_byte, | |
| 240 | ||
| 241 | { 0, p8257_ctl_r, 0, 0 }, | |
| 242 | { p8257_ctl_w, 0, 0, 0 }, | |
| 243 | { 0, 0, 0, 0 } | |
| 244 | }; | |
| 245 | ||
| 246 | static struct dma8257_interface hb_dma = | |
| 247 | { | |
| 248 | 0, | |
| 249 | CLOCK_1H, | |
| 250 | ||
| 251 | hb_dma_read_byte, | |
| 252 | hb_dma_write_byte, | |
| 253 | ||
| 254 | { 0, p8257_ctl_r, 0, 0 }, | |
| 255 | { p8257_ctl_w, 0, 0, 0 }, | |
| 256 | { 0, 0, 0, 0 } | |
| 257 | }; | |
| 258 | ||
| 259 | /************************************* | |
| 260 | * | |
| 197 | 261 | * VBLANK and IRQ generation |
| 198 | 262 | * |
| 199 | 263 | *************************************/ |
| r1386 | r1387 | |
| 209 | 273 | * |
| 210 | 274 | *************************************/ |
| 211 | 275 | |
| 212 | /* EPOS games */ | |
| 276 | static MACHINE_START( dkong2b ) | |
| 277 | { | |
| 278 | dkong_state *state = machine->driver_data; | |
| 213 | 279 | |
| 280 | dma8257_init(1); | |
| 281 | dma8257_config(0, &dk_dma); | |
| 282 | ||
| 283 | state->hardware_type = HARDWARE_TKG04; | |
| 284 | ||
| 285 | state_save_register_global(state->decrypt_counter); | |
| 286 | state_save_register_global(state->dma_latch); | |
| 287 | ||
| 288 | } | |
| 289 | ||
| 290 | ||
| 291 | static MACHINE_START( hunchbkd ) | |
| 292 | { | |
| 293 | UINT8 *p = memory_region(REGION_PROMS); | |
| 294 | int i; | |
| 295 | ||
| 296 | dkong_state *state = Machine->driver_data; | |
| 297 | ||
| 298 | machine_start_dkong2b(machine); | |
| 299 | dma8257_config(0, &hb_dma); | |
| 300 | ||
| 301 | for (i=0;i<0x200;i++) | |
| 302 | state->rev_map[i] = -1; | |
| 303 | for (i=0;i<0x200;i++) | |
| 304 | state->rev_map[p[0x300+i]] = i; | |
| 305 | ||
| 306 | state_save_register_global(state->hunchloopback); | |
| 307 | ||
| 308 | state->hunchloopback = 0; | |
| 309 | ||
| 310 | } | |
| 311 | ||
| 312 | ||
| 313 | static MACHINE_START( radarscp ) | |
| 314 | { | |
| 315 | dkong_state *state = Machine->driver_data; | |
| 316 | ||
| 317 | machine_start_dkong2b(machine); | |
| 318 | state->hardware_type = HARDWARE_TRS02; | |
| 319 | } | |
| 320 | ||
| 321 | static MACHINE_START( radarsc1 ) | |
| 322 | { | |
| 323 | dkong_state *state = Machine->driver_data; | |
| 324 | ||
| 325 | machine_start_dkong2b(machine); | |
| 326 | state->hardware_type = HARDWARE_TRS01; | |
| 327 | } | |
| 328 | ||
| 329 | ||
| 214 | 330 | static MACHINE_RESET( dkong ) |
| 215 | 331 | { |
| 332 | ||
| 333 | dma8257_reset(); | |
| 334 | ||
| 216 | 335 | } |
| 217 | 336 | |
| 218 | 337 | static MACHINE_RESET( strtheat ) |
| 219 | 338 | { |
| 339 | dkong_state *state = machine->driver_data; | |
| 220 | 340 | UINT8 *ROM = memory_region(REGION_CPU1); |
| 221 | 341 | |
| 222 | 342 | machine_reset_dkong(machine); |
| 223 | 343 | |
| 224 | 344 | /* The initial state of the counter is 0x08 */ |
| 225 | 345 | memory_configure_bank(1, 0, 4, &ROM[0x10000], 0x4000); |
| 226 | counter = 0x08; | |
| 346 | state->decrypt_counter = 0x08; | |
| 227 | 347 | memory_set_bank(1, 0); |
| 228 | 348 | } |
| 229 | 349 | |
| 230 | 350 | static MACHINE_RESET( drakton ) |
| 231 | 351 | { |
| 352 | dkong_state *state = machine->driver_data; | |
| 232 | 353 | UINT8 *ROM = memory_region(REGION_CPU1); |
| 233 | 354 | |
| 234 | 355 | machine_reset_dkong(machine); |
| 235 | 356 | |
| 236 | 357 | /* The initial state of the counter is 0x09 */ |
| 237 | 358 | memory_configure_bank(1, 0, 4, &ROM[0x10000], 0x4000); |
| 238 | counter = 0x09; | |
| 359 | state->decrypt_counter = 0x09; | |
| 239 | 360 | memory_set_bank(1, 1); |
| 240 | 361 | } |
| 241 | 362 | |
| 242 | static MACHINE_START( dkong ) | |
| 363 | /************************************* | |
| 364 | * | |
| 365 | * DMA handling | |
| 366 | * | |
| 367 | *************************************/ | |
| 368 | ||
| 369 | static UINT8 dk_dma_read_byte(int channel, offs_t offset) | |
| 243 | 370 | { |
| 244 | state_save_register_global(counter); | |
| 245 | state_save_register_global(hunchloopback); | |
| 246 | hunchloopback = 0; | |
| 371 | UINT8 result; | |
| 372 | ||
| 373 | cpuintrf_push_context(0); | |
| 374 | result = program_read_byte(offset); | |
| 375 | cpuintrf_pop_context(); | |
| 376 | ||
| 377 | return result; | |
| 247 | 378 | } |
| 248 | 379 | |
| 380 | static void dk_dma_write_byte(int channel, offs_t offset, UINT8 data) | |
| 381 | { | |
| 382 | cpuintrf_push_context(0); | |
| 383 | program_write_byte(offset, data); | |
| 384 | cpuintrf_pop_context(); | |
| 385 | } | |
| 386 | ||
| 387 | static UINT8 hb_dma_read_byte(int channel, offs_t offset) | |
| 388 | { | |
| 389 | dkong_state *state = Machine->driver_data; | |
| 390 | int bucket = state->rev_map[(offset>>10) & 0x1ff]; | |
| 391 | int addr; | |
| 392 | UINT8 data; | |
| 393 | ||
| 394 | if (bucket<0) | |
| 395 | fatalerror("hb_dma_read_byte - unmapped access for 0x%02x - bucket 0x%02x\n", offset, bucket); | |
| 396 | ||
| 397 | addr = ((bucket<<7) & 0x7c00) | (offset & 0x3ff); | |
| 398 | ||
| 399 | cpuintrf_push_context(0); | |
| 400 | data = program_read_byte(addr); | |
| 401 | cpuintrf_pop_context(); | |
| 402 | ||
| 403 | return data; | |
| 404 | } | |
| 405 | ||
| 406 | static void hb_dma_write_byte(int channel, offs_t offset, UINT8 data) | |
| 407 | { | |
| 408 | dkong_state *state = Machine->driver_data; | |
| 409 | int bucket = state->rev_map[(offset>>10) & 0x1ff]; | |
| 410 | int addr; | |
| 411 | ||
| 412 | if (bucket<0) | |
| 413 | fatalerror("hb_dma_read_byte - unmapped access for 0x%02x - bucket 0x%02x\n", offset, bucket); | |
| 414 | ||
| 415 | addr = ((bucket<<7) & 0x7c00) | (offset & 0x3ff); | |
| 416 | ||
| 417 | cpuintrf_push_context(0); | |
| 418 | program_write_byte(addr, data); | |
| 419 | cpuintrf_pop_context(); | |
| 420 | } | |
| 421 | ||
| 422 | static UINT8 p8257_ctl_r(void) | |
| 423 | { | |
| 424 | dkong_state *state = Machine->driver_data; | |
| 425 | return state->dma_latch; | |
| 426 | } | |
| 427 | ||
| 428 | static void p8257_ctl_w(UINT8 data) | |
| 429 | { | |
| 430 | dkong_state *state = Machine->driver_data; | |
| 431 | state->dma_latch = data; | |
| 432 | } | |
| 433 | ||
| 434 | ||
| 249 | 435 | /************************************* |
| 250 | 436 | * |
| 251 | 437 | * Output ports |
| 252 | 438 | * |
| 253 | 439 | *************************************/ |
| 254 | 440 | |
| 441 | static WRITE8_HANDLER( p8257_drq_w ) | |
| 442 | { | |
| 443 | dma8257_drq_write(0, 0, data & 0x01); | |
| 444 | dma8257_drq_write(0, 1, data & 0x01); | |
| 445 | } | |
| 446 | ||
| 447 | static READ8_HANDLER( dkong_in2_r ) | |
| 448 | { | |
| 449 | return (readinputportbytag("IN2") & 0xBF) | (dkong_audio_status_r(0) << 6); | |
| 450 | } | |
| 451 | ||
| 255 | 452 | static READ8_HANDLER( hunchbkd_mirror_r ) |
| 256 | 453 | { |
| 257 | 454 | return program_read_byte(0x1000+offset); |
| r1386 | r1387 | |
| 264 | 461 | |
| 265 | 462 | static READ8_HANDLER( epos_decrypt_rom ) |
| 266 | 463 | { |
| 464 | dkong_state *state = Machine->driver_data; | |
| 465 | ||
| 267 | 466 | if (offset & 0x01) |
| 268 | 467 | { |
| 269 | counter = counter - 1; | |
| 270 | if (counter < 0) | |
| 271 | counter = 0x0F; | |
| 468 | state->decrypt_counter = state->decrypt_counter - 1; | |
| 469 | if (state->decrypt_counter < 0) | |
| 470 | state->decrypt_counter = 0x0F; | |
| 272 | 471 | } |
| 273 | 472 | else |
| 274 | 473 | { |
| 275 | counter = (counter + 1) & 0x0F; | |
| 474 | state->decrypt_counter = (state->decrypt_counter + 1) & 0x0F; | |
| 276 | 475 | } |
| 277 | 476 | |
| 278 | switch(counter) | |
| 477 | switch(state->decrypt_counter) | |
| 279 | 478 | { |
| 280 | 479 | case 0x08: memory_set_bank(1, 0); break; |
| 281 | 480 | case 0x09: memory_set_bank(1, 1); break; |
| 282 | 481 | case 0x0A: memory_set_bank(1, 2); break; |
| 283 | 482 | case 0x0B: memory_set_bank(1, 3); break; |
| 284 | 483 | default: |
| 285 | logerror("Invalid counter = %02X\n",counter); | |
| 484 | logerror("Invalid counter = %02X\n",state->decrypt_counter); | |
| 286 | 485 | break; |
| 287 | 486 | } |
| 288 | 487 | |
| r1386 | r1387 | |
| 291 | 490 | |
| 292 | 491 | static WRITE8_HANDLER( hunchbkd_data_w ) |
| 293 | 492 | { |
| 294 | hunchloopback=data; | |
| 493 | dkong_state *state = Machine->driver_data; | |
| 494 | ||
| 495 | state->hunchloopback = data; | |
| 295 | 496 | } |
| 296 | 497 | |
| 297 | 498 | static READ8_HANDLER( hunchbkd_port0_r ) |
| r1386 | r1387 | |
| 309 | 510 | |
| 310 | 511 | static READ8_HANDLER( hunchbkd_port1_r ) |
| 311 | 512 | { |
| 312 | return hunchloopback; | |
| 513 | dkong_state *state = Machine->driver_data; | |
| 514 | ||
| 515 | return state->hunchloopback; | |
| 313 | 516 | } |
| 314 | 517 | |
| 315 | 518 | static READ8_HANDLER( herbiedk_port1_r ) |
| r1386 | r1387 | |
| 387 | 590 | |
| 388 | 591 | static ADDRESS_MAP_START( dkong_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 389 | 592 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 390 | AM_RANGE(0x6000, 0x73ff) AM_RAM | |
| 391 | AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ | |
| 392 | AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */ | |
| 593 | AM_RANGE(0x6000, 0x6bff) AM_RAM | |
| 594 | AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ | |
| 393 | 595 | AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) |
| 394 | AM_RANGE(0x7800, 0x780f) AM_ | |
| 596 | AM_RANGE(0x7800, 0x780f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */ | |
| 395 | 597 | AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w) /* IN0, sound CPU intf */ |
| 396 | AM_RANGE(0x7c80, 0x7c80) AM_READ(input_port_1_r) | |
| 598 | AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, radarscp_grid_color_w) | |
| 397 | 599 | AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */ |
| 398 | 600 | AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkong_snd_disc_w) /* Sound signals */ |
| 399 | AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(input_port_3_r, dkong_sh_w) /* DSW1 */ | |
| 601 | AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(input_port_3_r, dkong_audio_irq_w) /* DSW1 */ | |
| 602 | AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w) | |
| 400 | 603 | AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w) |
| 401 | 604 | AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ |
| 402 | 605 | AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w) |
| 403 | AM_RANGE(0x7d85, 0x7d85) AM_ | |
| 606 | AM_RANGE(0x7d85, 0x7d85) AM_WRITE(p8257_drq_w) /* P8257 ==> /DRQ0 /DRQ1 */ | |
| 404 | 607 | AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w) |
| 405 | AM_RANGE(0xb000, 0xbfff) AM_READ(MRA8_ROM) /* Pest Place only */ | |
| 406 | 608 | ADDRESS_MAP_END |
| 407 | 609 | |
| 408 | static ADDRESS_MAP_START( epos_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 409 | AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_BANK1) /* DK: 0000-3fff */ | |
| 410 | AM_RANGE(0x6000, 0x61ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 411 | AM_RANGE(0x6200, 0x6fff) AM_RAM | |
| 412 | AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) | |
| 413 | AM_RANGE(0x7800, 0x780f) AM_NOP /* P8257 control registers */ | |
| 414 | AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w) | |
| 415 | AM_RANGE(0x7c80, 0x7c80) AM_READ(input_port_1_r) /* IN1 */ | |
| 416 | AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */ | |
| 417 | AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkong_snd_disc_w) /* sound */ | |
| 418 | AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(dkong_in2_r, dkong_sh_w) | |
| 419 | AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w) | |
| 420 | AM_RANGE(0x7d83, 0x7d83) AM_NOP | |
| 421 | AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w) | |
| 422 | AM_RANGE(0x7d85, 0x7d85) AM_NOP /* P8257 ==> /DRQ0 /DRQ1 */ | |
| 423 | AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w) | |
| 424 | ADDRESS_MAP_END | |
| 425 | ||
| 426 | 610 | static ADDRESS_MAP_START( epos_readport, ADDRESS_SPACE_IO, 8 ) |
| 427 | 611 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 428 | 612 | AM_RANGE(0x00, 0xff) AM_READ(epos_decrypt_rom) /* Switch protection logic */ |
| 429 | 613 | ADDRESS_MAP_END |
| 430 | 614 | |
| 431 | static ADDRESS_MAP_START( radarscp_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 432 | AM_RANGE(0x0000, 0x3fff) AM_ROM | |
| 433 | AM_RANGE(0x6000, 0x73ff) AM_RAM | |
| 434 | AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ | |
| 435 | AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */ | |
| 436 | AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) | |
| 437 | AM_RANGE(0x7800, 0x780f) AM_NOP /* P8257 control registers */ | |
| 438 | AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w) /* IN0, sound CPU intf */ | |
| 439 | AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, radarscp_grid_color_w)/* IN1 */ | |
| 440 | AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */ | |
| 441 | AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkong_snd_disc_w) /* Sound signals */ | |
| 442 | AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(input_port_3_r, dkong_sh_w) /* DSW1 */ | |
| 443 | AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w) | |
| 444 | AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w) | |
| 445 | AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ | |
| 446 | AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w) | |
| 447 | AM_RANGE(0x7d85, 0x7d85) AM_NOP /* P8257 ==> /DRQ0 /DRQ1 */ | |
| 448 | AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w) | |
| 449 | AM_RANGE(0xb000, 0xbfff) AM_READ(MRA8_ROM) /* Pest Place only */ | |
| 450 | ADDRESS_MAP_END | |
| 451 | ||
| 452 | static ADDRESS_MAP_START( radarsc1_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 453 | AM_RANGE(0x0000, 0x3fff) AM_ROM | |
| 454 | AM_RANGE(0x6000, 0x73ff) AM_RAM | |
| 455 | AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ | |
| 456 | AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */ | |
| 457 | AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) | |
| 458 | AM_RANGE(0x7800, 0x780f) AM_NOP /* P8257 control registers */ | |
| 459 | AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w) /* IN0, sound CPU intf */ | |
| 460 | AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, radarscp_grid_color_w)/* IN1 */ | |
| 461 | AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */ | |
| 462 | AM_RANGE(0x7d00, 0x7d07) AM_WRITE(radarsc1_snd_disc_w) /* Sound signals */ | |
| 463 | AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(input_port_3_r, dkong_sh_w) /* DSW1 */ | |
| 464 | AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w) | |
| 465 | AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w) | |
| 466 | AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ | |
| 467 | AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w) | |
| 468 | AM_RANGE(0x7d85, 0x7d85) AM_NOP /* P8257 ==> /DRQ0 /DRQ1 */ | |
| 469 | AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w) | |
| 470 | AM_RANGE(0xb000, 0xbfff) AM_READ(MRA8_ROM) /* Pest Place only */ | |
| 471 | ADDRESS_MAP_END | |
| 472 | ||
| 473 | 615 | static ADDRESS_MAP_START( hunchbkd_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 474 | 616 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 617 | AM_RANGE(0x1000, 0x13ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* 0x7000 */ | |
| 475 | 618 | AM_RANGE(0x1400, 0x1400) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w) |
| 476 | AM_RANGE(0x1480, 0x1480) AM_READ | |
| 619 | AM_RANGE(0x1480, 0x1480) AM_READ | |
| 477 | 620 | AM_RANGE(0x1500, 0x1500) AM_READ(input_port_2_r) /* IN2/DSW2 */ |
| 478 | AM_RANGE(0x1580, 0x1580) AM_READWRITE(input_port_3_r, dkong_ | |
| 621 | AM_RANGE(0x1580, 0x1580) AM_READWRITE(input_port_3_r, dkong_audio_irq_w) /* DSW1 */ | |
| 479 | 622 | AM_RANGE(0x1582, 0x1582) AM_WRITE(dkong_flipscreen_w) |
| 480 | 623 | AM_RANGE(0x1584, 0x1584) AM_NOP /* Possibly still interupt enable */ |
| 481 | AM_RANGE(0x1585, 0x1585) AM_ | |
| 624 | AM_RANGE(0x1585, 0x1585) AM_WRITE(p8257_drq_w) /* P8257 | |
| 482 | 625 | AM_RANGE(0x1586, 0x1587) AM_WRITE(dkong_palettebank_w) |
| 483 | AM_RANGE(0x1600, 0x17ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 484 | AM_RANGE(0x1800, 0x1bff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) | |
| 485 | AM_RANGE(0x1C00, 0x1fff) AM_RAM | |
| 626 | AM_RANGE(0x1600, 0x17ff) AM_RAM /* 0x6400 spriteram location */ | |
| 627 | AM_RANGE(0x1800, 0x1bff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) /* 0x7400 */ | |
| 628 | AM_RANGE(0x1C00, 0x1f7f) AM_RAM /* 0x6000 */ | |
| 629 | AM_RANGE(0x1f80, 0x1f8f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */ | |
| 630 | /* 0x6800 not remapped */ | |
| 486 | 631 | AM_RANGE(0x2000, 0x2fff) AM_ROM |
| 487 | 632 | AM_RANGE(0x3000, 0x3fff) AM_READWRITE(hunchbkd_mirror_r, hunchbkd_mirror_w) |
| 488 | 633 | AM_RANGE(0x4000, 0x4fff) AM_ROM |
| r1386 | r1387 | |
| 548 | 693 | |
| 549 | 694 | static ADDRESS_MAP_START( dkongjr_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 550 | 695 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 551 | AM_RANGE(0x6000, 0x68ff) AM_RAM | |
| 552 | AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ | |
| 553 | AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */ | |
| 554 | AM_RANGE(0x6d00, 0x6fff) AM_RAM | |
| 696 | AM_RANGE(0x6000, 0x6bff) AM_RAM | |
| 697 | AM_RANGE(0x6c00, 0x6fff) AM_RAM /* DK3 bootleg only */ | |
| 698 | AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ | |
| 555 | 699 | AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) |
| 556 | AM_RANGE(0x7800, 0x780f) AM_ | |
| 700 | AM_RANGE(0x7800, 0x780f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */ | |
| 557 | 701 | AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkongjr_sh_tuneselect_w) |
| 558 | 702 | AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, dkongjr_gfxbank_w) |
| 559 | 703 | AM_RANGE(0x7c81, 0x7c81) AM_WRITE(dkongjr_sh_test6_w) |
| r1386 | r1387 | |
| 564 | 708 | AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w) |
| 565 | 709 | AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ |
| 566 | 710 | AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w) |
| 567 | AM_RANGE(0x7d85, 0x7d85) AM_ | |
| 711 | AM_RANGE(0x7d85, 0x7d85) AM_WRITE(p8257_drq_w) /* P8257 ==> /DRQ0 /DRQ1 */ | |
| 568 | 712 | AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w) |
| 569 | AM_RANGE(0x8000, 0x9fff) AM_WRITE(MWA8_ROM) /* bootleg DKjr only */ | |
| 570 | AM_RANGE(0xd000, 0xdfff) AM_WRITE(MWA8_ROM) /* DK3 bootleg only */ | |
| 713 | AM_RANGE(0x8000, 0x9fff) AM_ROM /* bootleg DKjr only */ | |
| 714 | AM_RANGE(0xb000, 0xbfff) AM_ROM /* pestplce only */ | |
| 715 | AM_RANGE(0xd000, 0xdfff) AM_ROM /* DK3 bootleg only */ | |
| 571 | 716 | ADDRESS_MAP_END |
| 572 | 717 | |
| 573 | static ADDRESS_MAP_START( pestplce_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 574 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 575 | AM_RANGE(0x6000, 0x68ff) AM_RAM | |
| 576 | AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ | |
| 577 | AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */ | |
| 578 | AM_RANGE(0x6d00, 0x6fff) AM_RAM | |
| 579 | AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) | |
| 580 | AM_RANGE(0x7800, 0x780f) AM_NOP /* P8257 control registers */ | |
| 581 | AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkongjr_sh_tuneselect_w) | |
| 582 | AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, dkongjr_gfxbank_w) | |
| 583 | AM_RANGE(0x7c81, 0x7c81) AM_WRITE(dkongjr_sh_test6_w) | |
| 584 | AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */ | |
| 585 | AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkong_snd_disc_w) /* walk/jump/boom sample trigger */ | |
| 586 | AM_RANGE(0x7d80, 0x7d80) AM_READ(input_port_3_r) AM_WRITENOP //(dkong_sh_w) | |
| 587 | AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w) | |
| 588 | //AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ | |
| 589 | AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w) | |
| 590 | AM_RANGE(0x7d85, 0x7d85) AM_NOP /* P8257 ==> /DRQ0 /DRQ1 */ | |
| 591 | AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w) | |
| 592 | AM_RANGE(0xb000, 0xbfff) AM_ROM | |
| 593 | ADDRESS_MAP_END | |
| 594 | 718 | |
| 595 | 719 | /************************************* |
| 596 | 720 | * |
| 597 | * | |
| 721 | * | |
| 598 | 722 | * |
| 599 | 723 | *************************************/ |
| 600 | 724 | |
| 601 | static ADDRESS_MAP_START( dkong_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 602 | AM_RANGE(0x0000, 0x0fff) AM_ROM | |
| 603 | ADDRESS_MAP_END | |
| 725 | static INPUT_PORTS_START( radarscp_in0_2 ) | |
| 726 | PORT_START_TAG("IN0") /* IN0 */ | |
| 727 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 728 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 729 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */ | |
| 730 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */ | |
| 731 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 732 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */ | |
| 733 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */ | |
| 734 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */ | |
| 735 | INPUT_PORTS_END | |
| 604 | 736 | |
| 605 | static ADDRESS_MAP_START( dkong_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 606 | AM_RANGE(0x00, 0xff) AM_READ(dkong_sh_tune_r) | |
| 607 | AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(dkong_sh_p1_r, dkong_sh_p1_w) | |
| 608 | AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, dkong_sh_p2_w) | |
| 609 | AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r) | |
| 610 | AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r) | |
| 611 | ADDRESS_MAP_END | |
| 737 | static INPUT_PORTS_START( radarscp_in1_2 ) | |
| 738 | PORT_START_TAG("IN1") /* IN1 */ | |
| 739 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 740 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 741 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */ | |
| 742 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */ | |
| 743 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 744 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 745 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 746 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 747 | INPUT_PORTS_END | |
| 612 | 748 | |
| 613 | static ADDRESS_MAP_START( radarsc1_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 614 | AM_RANGE(0x00, 0xff) AM_READ(radarsc1_sh_tune_r) | |
| 615 | AM_RANGE(0x00, 0xff) AM_WRITE(dkong_sh_p1_w) // DAC here | |
| 616 | AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(radarsc1_sh_p1_r, radarsc1_sh_p1_w) | |
| 617 | AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, radarsc1_sh_p2_w) | |
| 618 | AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r) | |
| 619 | AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r) | |
| 620 | ADDRESS_MAP_END | |
| 621 | ||
| 622 | static ADDRESS_MAP_START( hunchbkd_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 623 | AM_RANGE(I8039_bus, I8039_bus) AM_READ(soundlatch_r) | |
| 624 | AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(dkong_sh_p1_r, dkong_sh_p1_w) | |
| 625 | AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, dkong_sh_p2_w) | |
| 626 | AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r) | |
| 627 | AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r) | |
| 628 | ADDRESS_MAP_END | |
| 629 | ||
| 630 | static ADDRESS_MAP_START( dkong3_sound1_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 631 | AM_RANGE(0x0000, 0x01ff) AM_RAM | |
| 632 | AM_RANGE(0x4016, 0x4016) AM_READ(soundlatch_r) // overwrite default | |
| 633 | AM_RANGE(0x4017, 0x4017) AM_READ(soundlatch2_r) | |
| 634 | AM_RANGE(0x4000, 0x4017) AM_READ(NESPSG_0_r) | |
| 635 | AM_RANGE(0x4000, 0x4017) AM_WRITE(NESPSG_0_w) | |
| 636 | AM_RANGE(0xe000, 0xffff) AM_ROM | |
| 637 | ADDRESS_MAP_END | |
| 638 | ||
| 639 | static ADDRESS_MAP_START( dkong3_sound2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 640 | AM_RANGE(0x0000, 0x01ff) AM_RAM | |
| 641 | AM_RANGE(0x4016, 0x4016) AM_READ(soundlatch3_r) // overwrite default | |
| 642 | AM_RANGE(0x4000, 0x4017) AM_READ(NESPSG_1_r) | |
| 643 | AM_RANGE(0x4000, 0x4017) AM_WRITE(NESPSG_1_w) | |
| 644 | AM_RANGE(0xe000, 0xffff) AM_ROM | |
| 645 | ADDRESS_MAP_END | |
| 646 | ||
| 647 | /************************************* | |
| 648 | * | |
| 649 | * Port definitions | |
| 650 | * | |
| 651 | *************************************/ | |
| 652 | ||
| 653 | static INPUT_PORTS_START( dkong ) | |
| 654 | PORT_START /* IN0 */ | |
| 749 | static INPUT_PORTS_START( dkong_in0_4 ) | |
| 750 | PORT_START_TAG("IN0") /* IN0 */ | |
| 655 | 751 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 656 | 752 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 657 | 753 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY |
| r1386 | r1387 | |
| 660 | 756 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ |
| 661 | 757 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ |
| 662 | 758 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ |
| 759 | INPUT_PORTS_END | |
| 663 | 760 | |
| 664 | PORT_START /* IN1 */ | |
| 761 | static INPUT_PORTS_START( dkong_in1_4 ) | |
| 762 | PORT_START_TAG("IN1") /* IN1 */ | |
| 665 | 763 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 666 | 764 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL |
| 667 | 765 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| r1386 | r1387 | |
| 670 | 768 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ |
| 671 | 769 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ |
| 672 | 770 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ |
| 771 | INPUT_PORTS_END | |
| 673 | 772 | |
| 773 | static INPUT_PORTS_START( dkong_in0_8 ) | |
| 774 | PORT_START_TAG("IN0") /* IN0 */ | |
| 775 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 776 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 777 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 778 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 779 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 780 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 781 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 782 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 783 | INPUT_PORTS_END | |
| 784 | ||
| 785 | static INPUT_PORTS_START( dkong_in1_8 ) | |
| 786 | PORT_START_TAG("IN1") /* IN1 */ | |
| 787 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 788 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 789 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 790 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 791 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 792 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 793 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 794 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 795 | INPUT_PORTS_END | |
| 796 | ||
| 797 | static INPUT_PORTS_START( dkong_in2 ) | |
| 674 | 798 | /* Bit 0x80 is (SERVICE OR COIN) ! |
| 675 | 799 | * Bit 0x01 is going to the connector but it is not labeled |
| 676 | 800 | * It should be a IPT_UNKNOWN. In fact, it will reset the game. |
| 677 | 801 | */ |
| 678 | PORT_START /* IN2 */ | |
| 802 | PORT_START_TAG("IN2") /* IN2 */ | |
| 679 | 803 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME(DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) |
| 680 | 804 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* connection not labeled in schematics */ |
| 681 | 805 | /* This may freeze or reset dkong */ |
| r1386 | r1387 | |
| 685 | 809 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ |
| 686 | 810 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ |
| 687 | 811 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 812 | INPUT_PORTS_END | |
| 688 | 813 | |
| 689 | PORT_START /* DSW0 */ | |
| 814 | static INPUT_PORTS_START( dkong_dsw0 ) | |
| 815 | PORT_START_TAG("DSW0") /* DSW0 */ | |
| 690 | 816 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:!1,!2" ) |
| 691 | 817 | PORT_DIPSETTING( 0x00, "3" ) |
| 692 | 818 | PORT_DIPSETTING( 0x01, "4" ) |
| r1386 | r1387 | |
| 709 | 835 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION( "SW1:!8" ) |
| 710 | 836 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) |
| 711 | 837 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 838 | INPUT_PORTS_END | |
| 712 | 839 | |
| 840 | static INPUT_PORTS_START( dkong_config ) | |
| 713 | 841 | PORT_START_TAG("VR2") |
| 714 | 842 | PORT_ADJUSTER( 90, "VR2 - DAC Volume" ) |
| 715 | 843 | |
| 844 | PORT_START_TAG("VIDHW") | |
| 845 | PORT_CONFNAME( 0x01, 0x01, "Video Hardware" ) | |
| 846 | PORT_CONFSETTING( 0x00, "TKG-02 (Radarscope Conversion)" ) | |
| 847 | PORT_CONFSETTING( 0x01, "TKG-04 (Two board set)" ) | |
| 848 | ||
| 716 | 849 | INPUT_PORTS_END |
| 717 | 850 | |
| 718 | static INPUT_PORTS_START( radarscp ) | |
| 719 | PORT_START /* IN0 */ | |
| 720 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 721 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 722 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */ | |
| 723 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */ | |
| 724 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 725 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */ | |
| 726 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */ | |
| 727 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */ | |
| 851 | static INPUT_PORTS_START( dkong ) | |
| 852 | PORT_INCLUDE( dkong_in0_4 ) | |
| 853 | PORT_INCLUDE( dkong_in1_4 ) | |
| 854 | PORT_INCLUDE( dkong_in2 ) | |
| 855 | PORT_INCLUDE( dkong_dsw0 ) | |
| 728 | 856 | |
| 729 | PORT_START /* IN1 */ | |
| 730 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 731 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 732 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */ | |
| 733 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */ | |
| 734 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 735 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 736 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 737 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ | |
| 857 | PORT_INCLUDE( dkong_config ) | |
| 858 | INPUT_PORTS_END | |
| 738 | 859 | |
| 860 | static INPUT_PORTS_START( radarscp ) | |
| 861 | PORT_INCLUDE( radarscp_in0_2 ) | |
| 862 | PORT_INCLUDE( radarscp_in1_2 ) | |
| 739 | 863 | /* Bit 0x80 is (SERVICE OR COIN) ! |
| 740 | 864 | * Bit 0x01 is going to the connector and is labeled test switch |
| 741 | 865 | * It should be a IPT_UNUSED. In fact, it will reset the game. |
| 742 | 866 | */ |
| 743 | PORT_START /* IN2 */ | |
| 744 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME(DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 745 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* connection not labeled in schematics */ | |
| 746 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 747 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 867 | PORT_INCLUDE( dkong_in2 ) | |
| 868 | PORT_MODIFY("IN2") | |
| 748 | 869 | PORT_DIPNAME( 0x10, 0x10, "TP3" ) |
| 749 | 870 | PORT_DIPSETTING( 0x00, "Gnd" ) |
| 750 | 871 | PORT_DIPSETTING( 0x10, "Open" ) |
| 751 | 872 | PORT_DIPNAME( 0x20, 0x20, "TP5" ) |
| 752 | 873 | PORT_DIPSETTING( 0x00, "Gnd" ) |
| 753 | 874 | PORT_DIPSETTING( 0x20, "Open" ) |
| 754 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* SACA - Sound Acknowledge*/ | |
| 755 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 756 | 875 | |
| 757 | PORT_START /* DSW0 */ | |
| 758 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 759 | PORT_DIPSETTING( 0x00, "3" ) | |
| 760 | PORT_DIPSETTING( 0x01, "4" ) | |
| 761 | PORT_DIPSETTING( 0x02, "5" ) | |
| 762 | PORT_DIPSETTING( 0x03, "6" ) | |
| 763 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) | |
| 764 | PORT_DIPSETTING( 0x00, "7000" ) | |
| 765 | PORT_DIPSETTING( 0x04, "10000" ) | |
| 766 | PORT_DIPSETTING( 0x08, "15000" ) | |
| 767 | PORT_DIPSETTING( 0x0c, "20000" ) | |
| 768 | PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) ) | |
| 769 | PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) ) | |
| 770 | PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) | |
| 771 | PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) ) | |
| 772 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 773 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 774 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) | |
| 775 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 776 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) ) | |
| 777 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) | |
| 778 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) | |
| 779 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 876 | PORT_INCLUDE( dkong_dsw0 ) | |
| 780 | 877 | |
| 781 | 878 | PORT_START_TAG("VR2") |
| 782 | 879 | PORT_ADJUSTER( 35, "VR2 - DAC Volume" ) |
| r1386 | r1387 | |
| 784 | 881 | INPUT_PORTS_END |
| 785 | 882 | |
| 786 | 883 | static INPUT_PORTS_START( dkong3 ) |
| 787 | PORT_START /* IN0 */ | |
| 884 | PORT_START_TAG("IN0") /* IN0 */ | |
| 788 | 885 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 789 | 886 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 790 | 887 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY |
| r1386 | r1387 | |
| 794 | 891 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) |
| 795 | 892 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN3 ) |
| 796 | 893 | |
| 797 | PORT_START /* IN1 */ | |
| 894 | PORT_START_TAG("IN1") /* IN1 */ | |
| 798 | 895 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 799 | 896 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL |
| 800 | 897 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| r1386 | r1387 | |
| 804 | 901 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1) |
| 805 | 902 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 806 | 903 | |
| 807 | PORT_START /* DSW0 */ | |
| 904 | PORT_START_TAG("DSW0") /* DSW0 */ | |
| 808 | 905 | PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:!1,!2,!3") |
| 809 | 906 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 810 | 907 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| r1386 | r1387 | |
| 822 | 919 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 823 | 920 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 824 | 921 | |
| 825 | PORT_START /* DSW1 */ | |
| 922 | PORT_START_TAG("DSW1") /* DSW1 */ | |
| 826 | 923 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:!1,!2") |
| 827 | 924 | PORT_DIPSETTING( 0x00, "3" ) |
| 828 | 925 | PORT_DIPSETTING( 0x01, "4" ) |
| r1386 | r1387 | |
| 846 | 943 | INPUT_PORTS_END |
| 847 | 944 | |
| 848 | 945 | static INPUT_PORTS_START( dkong3b ) |
| 849 | PORT_START /* IN0 */ | |
| 850 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 851 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 852 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 853 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 854 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 855 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 856 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 857 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 946 | PORT_INCLUDE( dkong_in0_4 ) | |
| 947 | PORT_INCLUDE( dkong_in1_4 ) | |
| 858 | 948 | |
| 859 | PORT_START /* IN1 */ | |
| 860 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 861 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 862 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 863 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 864 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 865 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 866 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 867 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 949 | PORT_INCLUDE( dkong_in2 ) | |
| 868 | 950 | |
| 869 | PORT_START /* IN2 */ | |
| 870 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 871 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 872 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 873 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 874 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 875 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 876 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 877 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 878 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 879 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 880 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 881 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 882 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 883 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 884 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ | |
| 885 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) | |
| 886 | ||
| 887 | PORT_START /* DSW0 */ | |
| 951 | PORT_START_TAG("DSW0") /* DSW0 */ | |
| 888 | 952 | PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) ) |
| 889 | 953 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 890 | 954 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| r1386 | r1387 | |
| 911 | 975 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 912 | 976 | INPUT_PORTS_END |
| 913 | 977 | |
| 978 | static INPUT_PORTS_START( dkongjr ) | |
| 979 | PORT_INCLUDE( dkong_in0_4 ) | |
| 980 | PORT_INCLUDE( dkong_in1_4 ) | |
| 981 | PORT_INCLUDE( dkong_in2 ) | |
| 982 | PORT_INCLUDE( dkong_dsw0 ) | |
| 983 | INPUT_PORTS_END | |
| 984 | ||
| 914 | 985 | static INPUT_PORTS_START( hunchbkd ) |
| 915 | PORT_START /* IN0 */ | |
| 916 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 917 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 918 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 919 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 920 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 921 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 922 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 923 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 924 | 986 | |
| 925 | PORT_START /* IN1 */ | |
| 926 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 927 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 928 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 929 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 930 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 931 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 932 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 933 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 987 | PORT_INCLUDE( dkong_in0_8 ) | |
| 988 | PORT_INCLUDE( dkong_in1_8 ) | |
| 934 | 989 | |
| 935 | PORT_START /* IN2 */ | |
| 990 | PORT_INCLUDE( dkong_in2 ) | |
| 991 | PORT_MODIFY("IN2") | |
| 936 | 992 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) |
| 937 | 993 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 938 | 994 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 939 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 940 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 941 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 942 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 943 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 944 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ | |
| 945 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 946 | 995 | |
| 947 | PORT_START /* DSW0 */ | |
| 948 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 996 | PORT_INCLUDE( dkong_dsw0 ) | |
| 997 | PORT_MODIFY("DSW0") | |
| 998 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!1" ) | |
| 949 | 999 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 950 | 1000 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 951 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) | |
| 1001 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:!2" ) | |
| 952 | 1002 | PORT_DIPSETTING( 0x00, "3" ) |
| 953 | 1003 | PORT_DIPSETTING( 0x02, "5" ) |
| 954 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) | |
| 1004 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION( "SW1:!3,!4" ) | |
| 955 | 1005 | PORT_DIPSETTING( 0x00, "10000" ) |
| 956 | 1006 | PORT_DIPSETTING( 0x04, "20000" ) |
| 957 | 1007 | PORT_DIPSETTING( 0x08, "40000" ) |
| 958 | 1008 | PORT_DIPSETTING( 0x0c, "80000" ) |
| 959 | PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) ) | |
| 960 | PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) ) | |
| 961 | PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) | |
| 962 | PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) ) | |
| 963 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 964 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 965 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) | |
| 966 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 967 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) ) | |
| 968 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) | |
| 969 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) | |
| 970 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 971 | 1009 | |
| 972 | 1010 | PORT_START /* Sense */ |
| 973 | 1011 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 1012 | ||
| 1013 | PORT_INCLUDE( dkong_config ) | |
| 974 | 1014 | INPUT_PORTS_END |
| 975 | 1015 | |
| 976 | 1016 | static INPUT_PORTS_START( shootgal ) |
| 977 | PORT_START /* IN0 */ | |
| 1017 | PORT_START_TAG("IN0") /* IN0 */ | |
| 978 | 1018 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(4) PORT_REVERSE |
| 979 | 1019 | |
| 980 | PORT_START /* IN1 */ | |
| 1020 | PORT_START_TAG("IN1") /* IN1 */ | |
| 981 | 1021 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(4) PORT_REVERSE |
| 982 | 1022 | |
| 983 | PORT_START /* IN2 */ | |
| 1023 | PORT_INCLUDE( dkong_in2 ) | |
| 1024 | PORT_MODIFY("IN2") | |
| 984 | 1025 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 985 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 986 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 987 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 988 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 989 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 990 | 1026 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 991 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 992 | 1027 | |
| 993 | PORT_START /* DSW0 */ | |
| 1028 | PORT_START_TAG("DSW0") /* DSW0 */ | |
| 994 | 1029 | PORT_DIPNAME( 0x01, 0x00, "1" ) |
| 995 | 1030 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 996 | 1031 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| r1386 | r1387 | |
| 1014 | 1049 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1015 | 1050 | PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) |
| 1016 | 1051 | |
| 1017 | PORT_START /* Sense */ | |
| 1052 | PORT_START_TAG("SENSE") /* Sense */ | |
| 1018 | 1053 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 1054 | ||
| 1055 | PORT_INCLUDE( dkong_config ) | |
| 1056 | ||
| 1019 | 1057 | INPUT_PORTS_END |
| 1020 | 1058 | |
| 1021 | 1059 | static INPUT_PORTS_START( sbdk ) |
| 1022 | PORT_START /* IN0 */ | |
| 1023 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1024 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1025 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1026 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1027 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1028 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1029 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1030 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1060 | PORT_INCLUDE( dkong_in0_8 ) | |
| 1061 | PORT_INCLUDE( dkong_in1_8 ) | |
| 1031 | 1062 | |
| 1032 | PORT_START /* IN1 */ | |
| 1033 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1034 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1035 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1036 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1037 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1038 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1039 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1040 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1063 | PORT_INCLUDE( dkong_in2 ) | |
| 1064 | PORT_MODIFY("IN2") | |
| 1065 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1) | |
| 1066 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1) | |
| 1041 | 1067 | |
| 1042 | PORT_START /* IN2 */ | |
| 1043 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1068 | PORT_INCLUDE( dkong_dsw0 ) | |
| 1069 | PORT_MODIFY("DSW0") | |
| 1070 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!1" ) | |
| 1044 | 1071 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1045 | 1072 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 1046 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1047 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1048 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1049 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1050 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1051 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ | |
| 1052 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1053 | ||
| 1054 | PORT_START /* DSW0 */ | |
| 1055 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1056 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1057 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1058 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) | |
| 1073 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:!2" ) | |
| 1059 | 1074 | PORT_DIPSETTING( 0x00, "3" ) |
| 1060 | 1075 | PORT_DIPSETTING( 0x02, "5" ) |
| 1061 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 1076 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!3" ) | |
| 1062 | 1077 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1063 | 1078 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| 1064 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 1079 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!4" ) | |
| 1065 | 1080 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1066 | 1081 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1067 | PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) ) | |
| 1068 | PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) ) | |
| 1069 | PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) | |
| 1070 | PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) ) | |
| 1071 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 1072 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1073 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) | |
| 1074 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 1075 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) ) | |
| 1076 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) | |
| 1077 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) | |
| 1078 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 1079 | 1082 | |
| 1080 | PORT_START /* Sense */ | |
| 1083 | PORT_START_TAG("SENSE") /* Sense */ | |
| 1081 | 1084 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 1085 | ||
| 1086 | PORT_INCLUDE( dkong_config ) | |
| 1087 | ||
| 1082 | 1088 | INPUT_PORTS_END |
| 1083 | 1089 | |
| 1084 | 1090 | static INPUT_PORTS_START( herbiedk ) |
| 1085 | PORT_START /* IN0 */ | |
| 1086 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1087 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1088 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1089 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1090 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1091 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1092 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1093 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1091 | PORT_INCLUDE( dkong_in0_8 ) | |
| 1092 | PORT_INCLUDE( dkong_in1_8 ) | |
| 1094 | 1093 | |
| 1095 | PORT_START /* IN1 */ | |
| 1096 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1097 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1098 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1099 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1100 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1101 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1102 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1103 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1094 | PORT_INCLUDE( dkong_in2 ) | |
| 1104 | 1095 | |
| 1105 | PORT_START /* IN2 */ | |
| 1106 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1096 | PORT_INCLUDE( dkong_dsw0 ) | |
| 1097 | PORT_MODIFY("DSW0") | |
| 1098 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!1" ) | |
| 1107 | 1099 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1108 | 1100 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 1109 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1110 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1) | |
| 1111 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1) | |
| 1112 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1113 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1114 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ | |
| 1115 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1116 | ||
| 1117 | PORT_START /* DSW0 */ | |
| 1118 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1101 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!2" ) | |
| 1119 | 1102 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1120 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1121 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 1122 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1123 | 1103 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 1124 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 1104 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!3" ) | |
| 1125 | 1105 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1126 | 1106 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| 1127 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 1107 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!4" ) | |
| 1128 | 1108 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1129 | 1109 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1130 | PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) ) | |
| 1131 | PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) ) | |
| 1132 | PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) | |
| 1133 | PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) ) | |
| 1134 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 1135 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1136 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) | |
| 1137 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 1138 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) ) | |
| 1139 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) | |
| 1140 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) | |
| 1141 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 1142 | 1110 | |
| 1143 | PORT_START /* Sense */ | |
| 1111 | PORT_START_TAG("SENSE") /* Sense */ | |
| 1144 | 1112 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 1113 | ||
| 1114 | PORT_INCLUDE( dkong_config ) | |
| 1145 | 1115 | INPUT_PORTS_END |
| 1146 | 1116 | |
| 1147 | 1117 | /* Notes : |
| 1148 | 1118 | - you ALWAYS get an extra life at 150000 points. |
| 1149 | 1119 | - having more than 6 lives will reset the game. |
| 1150 | 1120 | */ |
| 1121 | ||
| 1151 | 1122 | static INPUT_PORTS_START( herodk ) |
| 1152 | PORT_START /* IN0 */ | |
| 1153 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1154 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1155 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1156 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1157 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1123 | PORT_INCLUDE( dkong_in0_8 ) | |
| 1124 | PORT_MODIFY("IN0") | |
| 1158 | 1125 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) |
| 1159 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1160 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1161 | 1126 | |
| 1162 | PORT_START /* IN1 */ | |
| 1163 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1164 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1165 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1166 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1167 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1127 | PORT_INCLUDE( dkong_in1_8 ) | |
| 1128 | PORT_MODIFY("IN1") | |
| 1168 | 1129 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL |
| 1169 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1170 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1171 | 1130 | |
| 1172 | PORT_START /* IN2 */ | |
| 1173 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1174 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1175 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1176 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1177 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1178 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1179 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1180 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1181 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ | |
| 1182 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1131 | PORT_INCLUDE( dkong_in2 ) | |
| 1183 | 1132 | |
| 1184 | PORT_START /* DSW0 */ | |
| 1185 | PORT_DIPUNUSED( 0x01, IP_ACTIVE_HIGH ) | |
| 1186 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) | |
| 1133 | PORT_INCLUDE( dkong_dsw0 ) | |
| 1134 | PORT_MODIFY("DSW0") | |
| 1135 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:!1" ) | |
| 1136 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:!2" ) | |
| 1187 | 1137 | PORT_DIPSETTING( 0x00, "3" ) |
| 1188 | 1138 | PORT_DIPSETTING( 0x02, "5" ) |
| 1189 | PORT_DIPNAME( 0x0c, 0x00, "Difficulty?" ) // Stored at 0x1c99 | |
| 1139 | PORT_DIPNAME( 0x0c, 0x00, "Difficulty?" ) PORT_DIPLOCATION( "SW1:!3,!4" ) // Stored at 0x1c99 | |
| 1190 | 1140 | PORT_DIPSETTING( 0x00, "0" ) |
| 1191 | 1141 | PORT_DIPSETTING( 0x04, "1" ) |
| 1192 | 1142 | PORT_DIPSETTING( 0x08, "2" ) |
| 1193 | 1143 | PORT_DIPSETTING( 0x0c, "3" ) |
| 1194 | PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) ) | |
| 1195 | PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) ) | |
| 1196 | PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) | |
| 1197 | PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) ) | |
| 1198 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 1199 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1200 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) | |
| 1201 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 1202 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) ) | |
| 1203 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) | |
| 1204 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) | |
| 1205 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 1206 | 1144 | |
| 1207 | PORT_START /* Sense */ | |
| 1145 | PORT_START_TAG("SENSE") /* Sense */ | |
| 1208 | 1146 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 1147 | ||
| 1148 | PORT_INCLUDE( dkong_config ) | |
| 1209 | 1149 | INPUT_PORTS_END |
| 1210 | 1150 | |
| 1211 | 1151 | |
| 1212 | 1152 | static INPUT_PORTS_START( pestplce ) |
| 1213 | PORT_START /* IN0 */ | |
| 1153 | PORT_START_TAG("IN0") /* IN0 */ | |
| 1214 | 1154 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) |
| 1215 | 1155 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) |
| 1216 | 1156 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1) |
| r1386 | r1387 | |
| 1220 | 1160 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1221 | 1161 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1222 | 1162 | |
| 1223 | PORT_START /* IN1 */ | |
| 1163 | PORT_START_TAG("IN1") /* IN1 */ | |
| 1224 | 1164 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) |
| 1225 | 1165 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) |
| 1226 | 1166 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) |
| r1386 | r1387 | |
| 1230 | 1170 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1231 | 1171 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1232 | 1172 | |
| 1233 | PORT_START /* IN2 */ | |
| 1173 | PORT_INCLUDE( dkong_in2 ) | |
| 1174 | PORT_MODIFY("IN2") | |
| 1234 | 1175 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1235 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1236 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1237 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1238 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1239 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1240 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ | |
| 1241 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1242 | 1176 | |
| 1243 | PORT_START /* DSW0 */ | |
| 1177 | PORT_START_TAG("DSW0") /* DSW0 */ | |
| 1244 | 1178 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) |
| 1245 | 1179 | PORT_DIPSETTING( 0x00, "3" ) |
| 1246 | 1180 | PORT_DIPSETTING( 0x01, "4" ) |
| r1386 | r1387 | |
| 1263 | 1197 | PORT_DIPSETTING( 0x40, "30000" ) |
| 1264 | 1198 | PORT_DIPSETTING( 0x80, "40000" ) |
| 1265 | 1199 | PORT_DIPSETTING( 0xc0, DEF_STR ( None ) ) |
| 1200 | ||
| 1201 | PORT_INCLUDE( dkong_config ) | |
| 1266 | 1202 | INPUT_PORTS_END |
| 1267 | 1203 | |
| 1268 | 1204 | |
| 1269 | 1205 | static INPUT_PORTS_START( spclforc ) |
| 1270 | PORT_START /* IN0 */ | |
| 1271 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1272 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1273 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1274 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1206 | PORT_INCLUDE( dkong_in0_8 ) | |
| 1207 | PORT_MODIFY("IN0") | |
| 1275 | 1208 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1276 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1277 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1278 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1279 | 1209 | |
| 1280 | PORT_START /* IN1 */ | |
| 1281 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1282 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1283 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1284 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1210 | PORT_INCLUDE( dkong_in1_8 ) | |
| 1211 | PORT_MODIFY("IN1") | |
| 1285 | 1212 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL |
| 1286 | 1213 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1287 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1288 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1289 | 1214 | |
| 1290 | PORT_START /* IN2 */ | |
| 1291 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1292 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1215 | PORT_INCLUDE( dkong_in2 ) | |
| 1216 | PORT_MODIFY("IN2") | |
| 1293 | 1217 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1) |
| 1294 | 1218 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1) |
| 1295 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1296 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1297 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ | |
| 1298 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1299 | 1219 | |
| 1300 | PORT_START /* DSW0 */ | |
| 1220 | PORT_START_TAG("DSW0") /* DSW0 */ | |
| 1301 | 1221 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) |
| 1302 | 1222 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1303 | 1223 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| r1386 | r1387 | |
| 1322 | 1242 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) |
| 1323 | 1243 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) |
| 1324 | 1244 | |
| 1325 | PORT_START /* Sense */ | |
| 1245 | PORT_START_TAG("SENSE") /* Sense */ | |
| 1326 | 1246 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 1247 | ||
| 1248 | PORT_INCLUDE( dkong_config ) | |
| 1249 | ||
| 1327 | 1250 | INPUT_PORTS_END |
| 1328 | 1251 | |
| 1329 | 1252 | |
| 1330 | 1253 | static INPUT_PORTS_START( 8ballact ) |
| 1331 | PORT_START /* IN0 */ | |
| 1332 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1333 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1334 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1335 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1336 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1337 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1338 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1339 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1254 | PORT_INCLUDE( dkong_in0_8 ) | |
| 1255 | PORT_INCLUDE( dkong_in1_8 ) | |
| 1340 | 1256 | |
| 1341 | PORT_START /* IN1 */ | |
| 1342 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1343 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1344 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1345 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1346 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1347 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1348 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1349 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1257 | PORT_INCLUDE( dkong_in2 ) | |
| 1350 | 1258 | |
| 1351 | PORT_START /* IN2 */ | |
| 1352 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1353 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1354 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1355 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1356 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1357 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1358 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1359 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1360 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ | |
| 1361 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1362 | ||
| 1363 | PORT_START /* DSW0 */ | |
| 1364 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1365 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1366 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1367 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 1368 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1369 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1370 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 1371 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1372 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 1373 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) | |
| 1259 | PORT_START_TAG("DSW0") /* DSW0 */ | |
| 1260 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:!1" ) | |
| 1261 | PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW1:!2" ) | |
| 1262 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION( "SW1:!3" ) | |
| 1374 | 1263 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1375 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) | |
| 1376 | PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) ) | |
| 1264 | PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) ) | |
| 1265 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!4" ) | |
| 1266 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1267 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1268 | PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW1:!5,!6,!7" ) | |
| 1377 | 1269 | PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) ) |
| 1378 | 1270 | PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) |
| 1379 | 1271 | PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) ) |
| r1386 | r1387 | |
| 1382 | 1274 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) |
| 1383 | 1275 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) |
| 1384 | 1276 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) ) |
| 1385 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 1386 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1387 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1277 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:!8" ) | |
| 1388 | 1278 | |
| 1389 | PORT_START /* Sense */ | |
| 1279 | PORT_START_TAG("SENSE") /* Sense */ | |
| 1390 | 1280 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 1391 | INPUT_PORTS_END | |
| 1392 | 1281 | |
| 1282 | PORT_INCLUDE( dkong_config ) | |
| 1393 | 1283 | |
| 1284 | INPUT_PORTS_END | |
| 1285 | ||
| 1394 | 1286 | static INPUT_PORTS_START( drakton ) |
| 1395 | PORT_START /* IN0 */ | |
| 1396 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 1397 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 1398 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 1399 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 1400 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1401 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1402 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1403 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1287 | PORT_INCLUDE( dkong_in0_4 ) | |
| 1288 | PORT_INCLUDE( dkong_in1_4 ) | |
| 1404 | 1289 | |
| 1405 | PORT_START /* IN1 */ | |
| 1406 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 1407 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 1408 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 1409 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 1410 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1411 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1412 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1413 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1414 | ||
| 1415 | PORT_START /* IN2 */ | |
| 1290 | PORT_INCLUDE( dkong_in2 ) | |
| 1291 | PORT_MODIFY("IN2") | |
| 1416 | 1292 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1417 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1418 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1419 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1420 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1421 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1422 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ | |
| 1423 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1424 | 1293 | |
| 1425 | PORT_START /* DSW0 */ | |
| 1294 | PORT_START_TAG("DSW0") /* DSW0 */ | |
| 1426 | 1295 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) |
| 1427 | 1296 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1428 | 1297 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| r1386 | r1387 | |
| 1446 | 1315 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) |
| 1447 | 1316 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1448 | 1317 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 1318 | ||
| 1319 | PORT_INCLUDE( dkong_config ) | |
| 1320 | ||
| 1449 | 1321 | INPUT_PORTS_END |
| 1450 | 1322 | |
| 1451 | 1323 | |
| 1452 | 1324 | static INPUT_PORTS_START( strtheat ) |
| 1453 | PORT_START /* IN0 */ | |
| 1325 | PORT_START_TAG("IN0") /* IN0 */ | |
| 1454 | 1326 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 1455 | 1327 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 1456 | 1328 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| r1386 | r1387 | |
| 1460 | 1332 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1461 | 1333 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1462 | 1334 | |
| 1463 | PORT_START /* IN1 */ | |
| 1335 | PORT_START_TAG("IN1") /* IN1 */ | |
| 1464 | 1336 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL |
| 1465 | 1337 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL |
| 1466 | 1338 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| r1386 | r1387 | |
| 1470 | 1342 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1471 | 1343 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1472 | 1344 | |
| 1473 | PORT_START /* IN2 */ | |
| 1345 | PORT_INCLUDE( dkong_in2 ) | |
| 1346 | PORT_MODIFY("IN2") | |
| 1474 | 1347 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1475 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1476 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 1477 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 1478 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1479 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1480 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ | |
| 1481 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1482 | 1348 | |
| 1483 | PORT_START /* DSW0 */ | |
| 1349 | PORT_START_TAG("DSW0") /* DSW0 */ | |
| 1484 | 1350 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) |
| 1485 | 1351 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1486 | 1352 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| r1386 | r1387 | |
| 1505 | 1371 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1506 | 1372 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 1507 | 1373 | |
| 1508 | PORT_START /* IN4 */ | |
| 1374 | PORT_START_TAG("IN4") /* IN4 */ | |
| 1509 | 1375 | PORT_BIT( 0x03, 0x00, IPT_DIAL ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_REVERSE |
| 1510 | 1376 | |
| 1511 | PORT_START /* IN5 */ | |
| 1377 | PORT_START_TAG("IN5") /* IN5 */ | |
| 1512 | 1378 | PORT_BIT( 0x03, 0x00, IPT_DIAL ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL |
| 1379 | ||
| 1380 | PORT_INCLUDE( dkong_config ) | |
| 1381 | ||
| 1513 | 1382 | INPUT_PORTS_END |
| 1514 | 1383 | |
| 1515 | 1384 | /************************************* |
| r1386 | r1387 | |
| 1571 | 1440 | * |
| 1572 | 1441 | *************************************/ |
| 1573 | 1442 | |
| 1574 | static const char *dkongjr_sample_names[] = | |
| 1575 | { | |
| 1576 | "*dkongjr", | |
| 1577 | "jump.wav", | |
| 1578 | "land.wav", | |
| 1579 | "roar.wav", | |
| 1580 | "climb0.wav", | |
| 1581 | "climb1.wav", | |
| 1582 | "climb2.wav", | |
| 1583 | "death.wav", | |
| 1584 | "drop.wav", | |
| 1585 | "walk0.wav", | |
| 1586 | "walk1.wav", | |
| 1587 | "walk2.wav", | |
| 1588 | "snapjaw.wav", | |
| 1589 | 0 /* end of array */ | |
| 1590 | }; | |
| 1591 | 1443 | |
| 1592 | static struct Samplesinterface dkongjr_samples_interface = | |
| 1593 | { | |
| 1594 | 8, /* 8 channels */ | |
| 1595 | dkongjr_sample_names | |
| 1596 | }; | |
| 1597 | ||
| 1598 | static struct NESinterface nes_interface_1 = { REGION_CPU2 }; | |
| 1599 | static struct NESinterface nes_interface_2 = { REGION_CPU3 }; | |
| 1600 | ||
| 1601 | 1444 | /************************************* |
| 1602 | 1445 | * |
| 1603 | 1446 | * Machine driver |
| 1604 | 1447 | * |
| 1605 | 1448 | *************************************/ |
| 1606 | 1449 | |
| 1607 | static MACHINE_DRIVER_START( | |
| 1450 | static MACHINE_DRIVER_START( | |
| 1608 | 1451 | |
| 1452 | /* driver data */ | |
| 1453 | MDRV_DRIVER_DATA(dkong_state) | |
| 1454 | ||
| 1609 | 1455 | /* basic machine hardware */ |
| 1610 | MDRV_CPU_ADD(Z80, CLOCK_1H) /* 3.072 MHz (?) */ | |
| 1611 | MDRV_CPU_PROGRAM_MAP(radarscp_map, 0) | |
| 1456 | MDRV_CPU_ADD_TAG("main", Z80, CLOCK_1H) | |
| 1457 | MDRV_CPU_PROGRAM_MAP(dkong_map, 0) | |
| 1612 | 1458 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 1613 | 1459 | |
| 1614 | MDRV_CPU_ADD(I8035,I8035_CLOCK) | |
| 1615 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map, 0) | |
| 1616 | MDRV_CPU_IO_MAP(dkong_sound_io_map, 0) | |
| 1617 | ||
| 1618 | MDRV_MACHINE_START(dkong) | |
| 1460 | MDRV_MACHINE_START(dkong2b) | |
| 1619 | 1461 | MDRV_MACHINE_RESET(dkong) |
| 1620 | 1462 | |
| 1621 | 1463 | /* video hardware */ |
| r1386 | r1387 | |
| 1623 | 1465 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1624 | 1466 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) |
| 1625 | 1467 | MDRV_GFXDECODE(dkong) |
| 1626 | MDRV_PALETTE_LENGTH(2 | |
| 1468 | MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH) | |
| 1627 | 1469 | |
| 1470 | MDRV_PALETTE_INIT(dkong2b) | |
| 1471 | MDRV_VIDEO_START(dkong) | |
| 1472 | MDRV_VIDEO_UPDATE(dkong) | |
| 1473 | ||
| 1474 | MACHINE_DRIVER_END | |
| 1475 | ||
| 1476 | static MACHINE_DRIVER_START( radarscp ) | |
| 1477 | ||
| 1478 | MDRV_IMPORT_FROM(dkong_base) | |
| 1479 | ||
| 1480 | MDRV_MACHINE_START(radarscp) | |
| 1481 | MDRV_PALETTE_LENGTH(RS_PALETTE_LENGTH) | |
| 1628 | 1482 | MDRV_PALETTE_INIT(radarscp) |
| 1629 | MDRV_VIDEO_START(radarscp) | |
| 1630 | MDRV_VIDEO_UPDATE(radarscp) | |
| 1631 | 1483 | |
| 1632 | 1484 | /* sound hardware */ |
| 1633 | MDRV_ | |
| 1485 | MDRV_IMPO | |
| 1634 | 1486 | |
| 1635 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1636 | MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0) | |
| 1637 | MDRV_SOUND_CONFIG_DISCRETE(radarscp) | |
| 1638 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 1639 | ||
| 1640 | 1487 | MACHINE_DRIVER_END |
| 1641 | 1488 | |
| 1642 | 1489 | static MACHINE_DRIVER_START( radarsc1 ) |
| 1643 | 1490 | |
| 1644 | /* basic machine hardware */ | |
| 1645 | MDRV_CPU_ADD(Z80, CLOCK_1H) /* 3.072 MHz (?) */ | |
| 1646 | MDRV_CPU_PROGRAM_MAP(radarsc1_map, 0) | |
| 1647 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) | |
| 1491 | MDRV_IMPORT_FROM(dkong_base) | |
| 1648 | 1492 | |
| 1649 | MDRV_CPU_ADD(I8035,I8035_CLOCK) | |
| 1650 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0) | |
| 1651 | MDRV_CPU_IO_MAP(radarsc1_sound_io_map, 0) | |
| 1652 | ||
| 1653 | MDRV_MACHINE_START(dkong) | |
| 1654 | MDRV_MACHINE_RESET(dkong) | |
| 1655 | ||
| 1656 | /* video hardware */ | |
| 1657 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 1658 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1659 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) | |
| 1660 | MDRV_GFXDECODE(dkong) | |
| 1661 | MDRV_PALETTE_LENGTH(256+256+8+1) | |
| 1662 | ||
| 1493 | MDRV_MACHINE_START(radarsc1) | |
| 1494 | MDRV_PALETTE_LENGTH(RS_PALETTE_LENGTH) | |
| 1663 | 1495 | MDRV_PALETTE_INIT(radarsc1) |
| 1664 | MDRV_VIDEO_START(radarsc1) | |
| 1665 | MDRV_VIDEO_UPDATE(radarscp) | |
| 1666 | 1496 | |
| 1667 | 1497 | /* sound hardware */ |
| 1668 | MDRV_ | |
| 1498 | MDRV_IMPO | |
| 1669 | 1499 | |
| 1670 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1671 | ||
| 1672 | MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0) | |
| 1673 | MDRV_SOUND_CONFIG_DISCRETE(radarscp) | |
| 1674 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 1675 | 1500 | MACHINE_DRIVER_END |
| 1676 | 1501 | |
| 1677 | static MACHINE_DRIVER_START( dkong ) | |
| 1678 | 1502 | |
| 1679 | /* basic machine hardware */ | |
| 1680 | MDRV_CPU_ADD(Z80, CLOCK_1H) | |
| 1681 | MDRV_CPU_PROGRAM_MAP(dkong_map, 0) | |
| 1682 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) | |
| 1503 | static MACHINE_DRIVER_START( dkong2b ) | |
| 1683 | 1504 | |
| 1684 | MDRV_CPU_ADD(I8035,I8035_CLOCK) | |
| 1685 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0) | |
| 1686 | MDRV_CPU_IO_MAP(dkong_sound_io_map, 0) | |
| 1505 | MDRV_IMPORT_FROM(dkong_base) | |
| 1687 | 1506 | |
| 1688 | MDRV_MACHINE_START(dkong) | |
| 1689 | MDRV_MACHINE_RESET(dkong) | |
| 1507 | MDRV_MACHINE_START(dkong2b) | |
| 1508 | MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH) | |
| 1690 | 1509 | |
| 1691 | /* video hardware */ | |
| 1692 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 1693 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1694 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) | |
| 1695 | MDRV_GFXDECODE(dkong) | |
| 1696 | MDRV_PALETTE_LENGTH(256) | |
| 1697 | ||
| 1698 | MDRV_PALETTE_INIT(dkong) | |
| 1699 | MDRV_VIDEO_START(dkong) | |
| 1700 | MDRV_VIDEO_UPDATE(dkong) | |
| 1701 | ||
| 1702 | 1510 | /* sound hardware */ |
| 1703 | MDRV_ | |
| 1511 | MDRV_IMPO | |
| 1704 | 1512 | |
| 1705 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1706 | MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0) | |
| 1707 | MDRV_SOUND_CONFIG_DISCRETE(dkong) | |
| 1708 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.7) | |
| 1709 | 1513 | MACHINE_DRIVER_END |
| 1710 | 1514 | |
| 1515 | ||
| 1711 | 1516 | static MACHINE_DRIVER_START( hunchbkd ) |
| 1712 | 1517 | |
| 1518 | MDRV_IMPORT_FROM(dkong2b) | |
| 1519 | ||
| 1713 | 1520 | /* basic machine hardware */ |
| 1714 | MDRV_CPU_A | |
| 1521 | MDRV_CPU_REPLACE | |
| 1715 | 1522 | MDRV_CPU_PROGRAM_MAP(hunchbkd_map, 0) |
| 1716 | 1523 | MDRV_CPU_IO_MAP(hunchbkd_io_map, 0) |
| 1717 | 1524 | MDRV_CPU_VBLANK_INT(hunchbkd_interrupt,1) |
| 1718 | 1525 | |
| 1719 | MDRV_CPU_ADD_TAG("sound", I8035,I8035_CLOCK) | |
| 1720 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map, 0) | |
| 1721 | MDRV_CPU_IO_MAP(hunchbkd_sound_io_map, 0) | |
| 1526 | MDRV_MACHINE_START(hunchbkd) | |
| 1722 | 1527 | |
| 1723 | MDRV_MACHINE_START(dkong) | |
| 1724 | MDRV_MACHINE_RESET(dkong) | |
| 1725 | ||
| 1726 | /* video hardware */ | |
| 1727 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 1728 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1729 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) | |
| 1730 | MDRV_GFXDECODE(dkong) | |
| 1731 | MDRV_PALETTE_LENGTH(256) | |
| 1732 | ||
| 1733 | MDRV_PALETTE_INIT(dkong) | |
| 1734 | MDRV_VIDEO_START(dkong) | |
| 1735 | MDRV_VIDEO_UPDATE(dkong) | |
| 1736 | ||
| 1737 | /* sound hardware */ | |
| 1738 | MDRV_SOUND_START(hunchbkd) | |
| 1739 | ||
| 1740 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1741 | MDRV_SOUND_ADD(DAC, 0) | |
| 1742 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55) | |
| 1743 | 1528 | MACHINE_DRIVER_END |
| 1744 | 1529 | |
| 1745 | 1530 | static MACHINE_DRIVER_START( epos ) |
| 1746 | 1531 | |
| 1747 | /* basic machine hardware */ | |
| 1748 | MDRV_CPU_ADD(Z80, CLOCK_1H) | |
| 1749 | MDRV_CPU_PROGRAM_MAP(epos_map, 0) | |
| 1532 | MDRV_IMPORT_FROM(dkong2b) | |
| 1533 | ||
| 1534 | MDRV_CPU_MODIFY("main") | |
| 1750 | 1535 | MDRV_CPU_IO_MAP(epos_readport,0) |
| 1751 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) | |
| 1752 | 1536 | |
| 1753 | MDRV_CPU_ADD(I8035,I8035_CLOCK) | |
| 1754 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0) | |
| 1755 | MDRV_CPU_IO_MAP(dkong_sound_io_map, 0) | |
| 1756 | ||
| 1757 | MDRV_MACHINE_START(dkong) | |
| 1758 | MDRV_MACHINE_RESET(dkong) | |
| 1759 | ||
| 1760 | /* video hardware */ | |
| 1761 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 1762 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1763 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) | |
| 1764 | MDRV_GFXDECODE(dkong) | |
| 1765 | MDRV_PALETTE_LENGTH(256) | |
| 1766 | ||
| 1767 | MDRV_PALETTE_INIT(dkong) | |
| 1768 | MDRV_VIDEO_START(dkong) | |
| 1769 | MDRV_VIDEO_UPDATE(dkong) | |
| 1770 | ||
| 1771 | /* sound hardware */ | |
| 1772 | MDRV_SOUND_START(hunchbkd) | |
| 1773 | ||
| 1774 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1775 | MDRV_SOUND_ADD(DAC, 0) | |
| 1776 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55) | |
| 1777 | 1537 | MACHINE_DRIVER_END |
| 1778 | 1538 | |
| 1779 | 1539 | static MACHINE_DRIVER_START( dkong3 ) |
| 1780 | 1540 | |
| 1541 | /* driver data */ | |
| 1542 | MDRV_DRIVER_DATA(dkong_state) | |
| 1543 | ||
| 1781 | 1544 | /* basic machine hardware */ |
| 1782 | 1545 | MDRV_CPU_ADD(Z80,8000000/2) /* 4 MHz */ |
| 1783 | 1546 | MDRV_CPU_PROGRAM_MAP(dkong3_map, 0) |
| 1784 | 1547 | MDRV_CPU_IO_MAP(0, dkong3_io_map) |
| 1785 | 1548 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 1786 | 1549 | |
| 1787 | MDRV_CPU_ADD(N2A03,N2A03_DEFAULTCLOCK) | |
| 1788 | MDRV_CPU_PROGRAM_MAP(dkong3_sound1_map, 0) | |
| 1789 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) | |
| 1790 | ||
| 1791 | MDRV_CPU_ADD(N2A03,N2A03_DEFAULTCLOCK) | |
| 1792 | MDRV_CPU_PROGRAM_MAP(dkong3_sound2_map, 0) | |
| 1793 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) | |
| 1794 | ||
| 1795 | MDRV_MACHINE_START(dkong) | |
| 1550 | MDRV_MACHINE_START(dkong2b) | |
| 1796 | 1551 | MDRV_MACHINE_RESET(dkong) |
| 1797 | 1552 | |
| 1798 | 1553 | /* video hardware */ |
| r1386 | r1387 | |
| 1800 | 1555 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1801 | 1556 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) |
| 1802 | 1557 | MDRV_GFXDECODE(dkong) |
| 1803 | MDRV_PALETTE_LENGTH( | |
| 1558 | MDRV_PALETTE_LENGTH(DK3_PALETTE_LENGTH) | |
| 1804 | 1559 | |
| 1805 | 1560 | MDRV_PALETTE_INIT(dkong3) |
| 1806 | 1561 | MDRV_VIDEO_START(dkong) |
| 1807 | 1562 | MDRV_VIDEO_UPDATE(dkong) |
| 1808 | 1563 | |
| 1809 | 1564 | /* sound hardware */ |
| 1810 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1811 | MDRV_SOUND_ADD(NES, N2A03_DEFAULTCLOCK) | |
| 1812 | MDRV_SOUND_CONFIG(nes_interface_1) | |
| 1813 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 1814 | ||
| 1815 | MDRV_SOUND_ADD(NES, N2A03_DEFAULTCLOCK) | |
| 1816 | MDRV_SOUND_CONFIG(nes_interface_2) | |
| 1817 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 1565 | MDRV_IMPORT_FROM(dkong3_audio) | |
| 1818 | 1566 | MACHINE_DRIVER_END |
| 1819 | 1567 | |
| 1820 | 1568 | static MACHINE_DRIVER_START( dkongjr ) |
| 1821 | 1569 | |
| 1822 | /* basic machine hardware */ | |
| 1823 | MDRV_CPU_ADD(Z80, CLOCK_1H) | |
| 1570 | MDRV_IMPORT_FROM(dkong_base) | |
| 1571 | ||
| 1572 | MDRV_CPU_MODIFY("main") | |
| 1824 | 1573 | MDRV_CPU_PROGRAM_MAP(dkongjr_map, 0) |
| 1825 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) | |
| 1826 | 1574 | |
| 1827 | MDRV_CPU_ADD(I8035,I8035_CLOCK) | |
| 1828 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0) | |
| 1829 | MDRV_CPU_IO_MAP(dkong_sound_io_map, 0) | |
| 1830 | ||
| 1831 | MDRV_MACHINE_START(dkong) | |
| 1832 | MDRV_MACHINE_RESET(dkong) | |
| 1833 | ||
| 1834 | /* video hardware */ | |
| 1835 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 1836 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1837 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) | |
| 1838 | MDRV_GFXDECODE(dkong) | |
| 1839 | MDRV_PALETTE_LENGTH(256) | |
| 1840 | ||
| 1841 | MDRV_PALETTE_INIT(dkong) | |
| 1842 | MDRV_VIDEO_START(dkong) | |
| 1843 | MDRV_VIDEO_UPDATE(dkong) | |
| 1844 | ||
| 1845 | 1575 | /* sound hardware */ |
| 1846 | MDRV_ | |
| 1576 | MDRV_IMPO | |
| 1847 | 1577 | |
| 1848 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1849 | MDRV_SOUND_ADD(DAC, 0) | |
| 1850 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55) | |
| 1851 | ||
| 1852 | MDRV_SOUND_ADD(SAMPLES, 0) | |
| 1853 | MDRV_SOUND_CONFIG(dkongjr_samples_interface) | |
| 1854 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 1855 | 1578 | MACHINE_DRIVER_END |
| 1856 | 1579 | |
| 1857 | 1580 | static MACHINE_DRIVER_START( pestplce ) |
| 1858 | 1581 | |
| 1859 | /* basic machine hardware */ | |
| 1860 | MDRV_CPU_ADD(Z80, 3072000) /* 3.072 MHz (?) */ | |
| 1861 | MDRV_CPU_PROGRAM_MAP(pestplce_map, 0) | |
| 1862 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) | |
| 1582 | MDRV_IMPORT_FROM(dkongjr) | |
| 1863 | 1583 | |
| 1864 | MDRV_CPU_ADD(I8035,I8035_CLOCK) | |
| 1865 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map, 0) | |
| 1866 | MDRV_CPU_IO_MAP(dkong_sound_io_map, 0) | |
| 1867 | ||
| 1868 | MDRV_MACHINE_START(dkong) | |
| 1869 | MDRV_MACHINE_RESET(dkong) | |
| 1870 | ||
| 1871 | /* video hardware */ | |
| 1872 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 1873 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1874 | MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) | |
| 1875 | 1584 | MDRV_GFXDECODE(pestplce) |
| 1876 | MDRV_PALETTE_LENGTH(256) | |
| 1877 | ||
| 1878 | MDRV_PALETTE_INIT(dkong) // wrong! | |
| 1879 | MDRV_VIDEO_START(dkong) | |
| 1585 | MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH) | |
| 1586 | MDRV_PALETTE_INIT(dkong2b) // wrong! | |
| 1880 | 1587 | MDRV_VIDEO_UPDATE(pestplce) |
| 1881 | 1588 | |
| 1882 | /* sound hardware */ | |
| 1883 | MDRV_SOUND_START(hunchbkd) | |
| 1884 | ||
| 1885 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1886 | MDRV_SOUND_ADD(DAC, 0) | |
| 1887 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55) | |
| 1888 | ||
| 1889 | /* samples */ | |
| 1890 | 1589 | MACHINE_DRIVER_END |
| 1891 | 1590 | |
| 1892 | 1591 | static MACHINE_DRIVER_START( herbiedk ) |
| r1386 | r1387 | |
| 1896 | 1595 | MDRV_CPU_MODIFY("main") |
| 1897 | 1596 | MDRV_CPU_IO_MAP(herbiedk_io_map, 0) |
| 1898 | 1597 | |
| 1899 | //MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(1000)) | |
| 1900 | 1598 | MACHINE_DRIVER_END |
| 1901 | 1599 | |
| 1902 | 1600 | static MACHINE_DRIVER_START( spclforc ) |
| r1386 | r1387 | |
| 2056 | 1754 | ROM_LOAD( "c-2k.bpr", 0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */ |
| 2057 | 1755 | ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */ |
| 2058 | 1756 | ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */ |
| 2059 | ||
| 2060 | /********************************************************* | |
| 2061 | I use more appropreate filenames for color PROMs. | |
| 2062 | ROM_REGION( 0x0300, REGION_PROMS, 0 ) | |
| 2063 | ROM_LOAD( "dkong.2k", 0x0000, 0x0100, CRC(1e82d375) ) | |
| 2064 | ROM_LOAD( "dkong.2j", 0x0100, 0x0100, CRC(2ab01dc8) ) | |
| 2065 | ROM_LOAD( "dkong.5f", 0x0200, 0x0100, CRC(44988665) ) | |
| 2066 | *********************************************************/ | |
| 2067 | 1757 | ROM_END |
| 2068 | 1758 | |
| 2069 | 1759 | ROM_START( dkongo ) |
| r1386 | r1387 | |
| 2092 | 1782 | ROM_LOAD( "c-2k.bpr", 0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */ |
| 2093 | 1783 | ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */ |
| 2094 | 1784 | ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */ |
| 2095 | ||
| 2096 | /********************************************************* | |
| 2097 | I use more appropreate filenames for color PROMs. | |
| 2098 | ROM_REGION( 0x0300, REGION_PROMS, 0 ) | |
| 2099 | ROM_LOAD( "dkong.2k", 0x0000, 0x0100, CRC(1e82d375) ) | |
| 2100 | ROM_LOAD( "dkong.2j", 0x0100, 0x0100, CRC(2ab01dc8) ) | |
| 2101 | ROM_LOAD( "dkong.5f", 0x0200, 0x0100, CRC(44988665) ) | |
| 2102 | *********************************************************/ | |
| 2103 | 1785 | ROM_END |
| 2104 | 1786 | |
| 2105 | 1787 | ROM_START( dkongjp ) |
| r1386 | r1387 | |
| 2127 | 1809 | ROM_LOAD( "c-2k.bpr", 0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */ |
| 2128 | 1810 | ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */ |
| 2129 | 1811 | ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */ |
| 2130 | ||
| 2131 | /********************************************************* | |
| 2132 | I use more appropreate filenames for color PROMs. | |
| 2133 | ROM_REGION( 0x0300, REGION_PROMS, 0 ) | |
| 2134 | ROM_LOAD( "dkong.2k", 0x0000, 0x0100, CRC(1e82d375) ) | |
| 2135 | ROM_LOAD( "dkong.2j", 0x0100, 0x0100, CRC(2ab01dc8) ) | |
| 2136 | ROM_LOAD( "dkong.5f", 0x0200, 0x0100, CRC(44988665) ) | |
| 2137 | *********************************************************/ | |
| 2138 | 1812 | ROM_END |
| 2139 | 1813 | |
| 2140 | 1814 | ROM_START( dkongjo ) |
| r1386 | r1387 | |
| 2162 | 1836 | ROM_LOAD( "c-2k.bpr", 0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */ |
| 2163 | 1837 | ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */ |
| 2164 | 1838 | ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */ |
| 2165 | ||
| 2166 | /********************************************************* | |
| 2167 | I use more appropreate filenames for color PROMs. | |
| 2168 | ROM_REGION( 0x0300, REGION_PROMS, 0 ) | |
| 2169 | ROM_LOAD( "dkong.2k", 0x0000, 0x0100, CRC(1e82d375) ) | |
| 2170 | ROM_LOAD( "dkong.2j", 0x0100, 0x0100, CRC(2ab01dc8) ) | |
| 2171 | ROM_LOAD( "dkong.5f", 0x0200, 0x0100, CRC(44988665) ) | |
| 2172 | *********************************************************/ | |
| 2173 | 1839 | ROM_END |
| 2174 | 1840 | |
| 2175 | 1841 | ROM_START( dkongjo1 ) |
| r1386 | r1387 | |
| 2198 | 1864 | ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */ |
| 2199 | 1865 | ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */ |
| 2200 | 1866 | |
| 2201 | /********************************************************* | |
| 2202 | I use more appropreate filenames for color PROMs. | |
| 2203 | ROM_REGION( 0x0300, REGION_PROMS, 0 ) | |
| 2204 | ROM_LOAD( "dkong.2k", 0x0000, 0x0100, CRC(1e82d375) ) | |
| 2205 | ROM_LOAD( "dkong.2j", 0x0100, 0x0100, CRC(2ab01dc8) ) | |
| 2206 | ROM_LOAD( "dkong.5f", 0x0200, 0x0100, CRC(44988665) ) | |
| 2207 | *********************************************************/ | |
| 2208 | 1867 | ROM_END |
| 2209 | 1868 | |
| 2210 | 1869 | ROM_START( dkongjr ) |
| r1386 | r1387 | |
| 2518 | 2177 | ROM_LOAD( "hbprom.2e", 0x0000, 0x0100, CRC(37aab98f) SHA1(0b002ab82158854bdd4a9db05eee037711017313) ) /* palette low 4 bits (inverted) */ |
| 2519 | 2178 | ROM_LOAD( "hbprom.2f", 0x0100, 0x0100, CRC(845b8dcc) SHA1(eebd0c024172e54b509f1f99d9159438d5f3a905) ) /* palette high 4 bits (inverted) */ |
| 2520 | 2179 | ROM_LOAD( "hbprom.2n", 0x0200, 0x0100, CRC(dff9070a) SHA1(307b95749343b5106247d842f773b2b445faa156) ) /* character color codes on a per-column basis */ |
| 2521 | ROM_LOAD( "82s147.prm", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* unknown */ | |
| 2180 | ROM_LOAD( "82s147.prm", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */ | |
| 2181 | ||
| 2182 | ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 2183 | ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ | |
| 2522 | 2184 | ROM_END |
| 2523 | 2185 | |
| 2524 | 2186 | ROM_START( sbdk ) |
| r1386 | r1387 | |
| 2541 | 2203 | ROM_LOAD( "sb-dk.7e", 0x1000, 0x0800, CRC(8e48b13e) SHA1(b4589685a60a8463f656a4f5b0dedfb265c3b3e4) ) |
| 2542 | 2204 | ROM_LOAD( "sb-dk.7f", 0x1800, 0x0800, CRC(989969f3) SHA1(de641082476ac3da3872461263566dfb398ea43a) ) |
| 2543 | 2205 | |
| 2544 | ROM_REGION( 0x0 | |
| 2206 | ROM_REGION( 0x0500, REGION_PROMS, 0 ) | |
| 2545 | 2207 | ROM_LOAD( "sb.2e", 0x0000, 0x0100, CRC(4f06f789) SHA1(0b2775dd8da1c20121639871ed291a015a34e1f6) ) |
| 2546 | 2208 | ROM_LOAD( "sb.2f", 0x0100, 0x0100, CRC(2c15b1b2) SHA1(7c80eb77ba47e2f4d889fc10663a0391d4329a1d) ) |
| 2547 | 2209 | ROM_LOAD( "sb.2n", 0x0200, 0x0100, CRC(dff9070a) SHA1(307b95749343b5106247d842f773b2b445faa156) ) |
| 2210 | ROM_LOAD( "82s147.prm", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */ | |
| 2211 | ||
| 2212 | ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 2213 | ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ | |
| 2548 | 2214 | ROM_END |
| 2549 | 2215 | |
| 2550 | 2216 | ROM_START( herbiedk ) |
| r1386 | r1387 | |
| 2571 | 2237 | ROM_LOAD( "74s287.2k", 0x0000, 0x0100, CRC(7dc0a381) SHA1(7d974b2249392160e3b800e7113d4899c3600b7f) ) /* palette high 4 bits (inverted) */ |
| 2572 | 2238 | ROM_LOAD( "74s287.2j", 0x0100, 0x0100, CRC(0a440c00) SHA1(e3249a646cd8aa50739e09ae101e796ea3aac37a) ) /* palette low 4 bits (inverted) */ |
| 2573 | 2239 | ROM_LOAD( "74s287.vid", 0x0200, 0x0100, CRC(5a3446cc) SHA1(158de015006e6c400cb7ee758fda7ff760eb5835) ) /* character color codes on a per-column basis */ |
| 2574 | ROM_LOAD( "82s147.hh", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* | |
| 2240 | ROM_LOAD( "82s147.hh", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping | |
| 2575 | 2241 | |
| 2576 | 2242 | ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) |
| 2577 | 2243 | ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, CRC(d6a04bcc) SHA1(ef1ed4311869d46dec95c2bfb31875c2f022da4f) ) |
| r1386 | r1387 | |
| 2602 | 2268 | ROM_LOAD( "yellow.7e", 0x1000, 0x0800, CRC(f6272e96) SHA1(a9608966613aedb36cfb04f85730efed9a44d17c) ) |
| 2603 | 2269 | ROM_LOAD( "violet.7f", 0x1800, 0x0800, CRC(ca020685) SHA1(fe0d8d85c3bf244384e9c94f6a7f17db31083245) ) |
| 2604 | 2270 | |
| 2605 | ROM_REGION( 0x0 | |
| 2271 | ROM_REGION( 0x0500, REGION_PROMS, 0 ) | |
| 2606 | 2272 | ROM_LOAD( "82s129.2e", 0x0000, 0x0100, CRC(da4b47e6) SHA1(2cfc7d489002113eb91048cc29d24831dadbfabb) ) /* palette low 4 bits (inverted) */ |
| 2607 | 2273 | ROM_LOAD( "82s129.2f", 0x0100, 0x0100, CRC(96e213a4) SHA1(38f21e7bce96fd2159aa61e64d66aa574d85873c) ) /* palette high 4 bits (inverted) */ |
| 2608 | 2274 | ROM_LOAD( "82s126.2n", 0x0200, 0x0100, CRC(37aece4b) SHA1(08dbb470644278132b8126649fe41d70e7750bee) ) /* character color codes on a per-column basis */ |
| 2275 | ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ | |
| 2276 | ||
| 2277 | ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 2278 | ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ | |
| 2609 | 2279 | ROM_END |
| 2610 | 2280 | |
| 2611 | 2281 | ROM_START( herodku ) |
| r1386 | r1387 | |
| 2631 | 2301 | ROM_LOAD( "yellow.7e", 0x1000, 0x0800, CRC(f6272e96) SHA1(a9608966613aedb36cfb04f85730efed9a44d17c) ) |
| 2632 | 2302 | ROM_LOAD( "violet.7f", 0x1800, 0x0800, CRC(ca020685) SHA1(fe0d8d85c3bf244384e9c94f6a7f17db31083245) ) |
| 2633 | 2303 | |
| 2634 | ROM_REGION( 0x0 | |
| 2304 | ROM_REGION( 0x0500, REGION_PROMS, 0 ) | |
| 2635 | 2305 | ROM_LOAD( "82s129.2e", 0x0000, 0x0100, CRC(da4b47e6) SHA1(2cfc7d489002113eb91048cc29d24831dadbfabb) ) /* palette low 4 bits (inverted) */ |
| 2636 | 2306 | ROM_LOAD( "82s129.2f", 0x0100, 0x0100, CRC(96e213a4) SHA1(38f21e7bce96fd2159aa61e64d66aa574d85873c) ) /* palette high 4 bits (inverted) */ |
| 2637 | 2307 | ROM_LOAD( "82s126.2n", 0x0200, 0x0100, CRC(37aece4b) SHA1(08dbb470644278132b8126649fe41d70e7750bee) ) /* character color codes on a per-column basis */ |
| 2308 | ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ | |
| 2309 | ||
| 2310 | ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 2311 | ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ | |
| 2638 | 2312 | ROM_END |
| 2639 | 2313 | |
| 2640 | 2314 | ROM_START( spclforc ) |
| r1386 | r1387 | |
| 2654 | 2328 | ROM_LOAD( "2732.7e", 0x2000, 0x1000, CRC(f6a113bd) SHA1(2f8776780284081f7858334766be6a6fde3a3371) ) |
| 2655 | 2329 | ROM_LOAD( "2732.7f", 0x3000, 0x1000, CRC(42857a7a) SHA1(267dd954480bc87f14c758803cb26b7812d323b8) ) |
| 2656 | 2330 | |
| 2657 | ROM_REGION( 0x0 | |
| 2331 | ROM_REGION( 0x0500, REGION_PROMS, 0 ) | |
| 2658 | 2332 | ROM_LOAD( "82s126.2e", 0x0000, 0x0100, CRC(b3751a25) SHA1(4b444e8fd02ac8674ecaba2fee083cb9feb99fa0) ) |
| 2659 | 2333 | ROM_LOAD( "82s126.2f", 0x0100, 0x0100, CRC(1026d438) SHA1(927009e6ed520c39c36c1d7966589c6778df1a3a) ) |
| 2660 | 2334 | ROM_LOAD( "82s126.2n", 0x0200, 0x0100, CRC(9735998d) SHA1(c3f50f97369547b1fd25da64507a5c8b725de6d0) ) |
| 2335 | ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ | |
| 2336 | ||
| 2337 | ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 2338 | ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ | |
| 2661 | 2339 | ROM_END |
| 2662 | 2340 | |
| 2663 | 2341 | ROM_START( spcfrcii ) |
| r1386 | r1387 | |
| 2677 | 2355 | ROM_LOAD( "spfc2.7e", 0x2000, 0x1000, CRC(f6a113bd) SHA1(2f8776780284081f7858334766be6a6fde3a3371) ) |
| 2678 | 2356 | ROM_LOAD( "spfc2.7f", 0x3000, 0x1000, CRC(42857a7a) SHA1(267dd954480bc87f14c758803cb26b7812d323b8) ) |
| 2679 | 2357 | |
| 2680 | ROM_REGION( 0x0 | |
| 2358 | ROM_REGION( 0x0500, REGION_PROMS, 0 ) | |
| 2681 | 2359 | ROM_LOAD( "spfc2.2e", 0x0000, 0x0100, CRC(b3751a25) SHA1(4b444e8fd02ac8674ecaba2fee083cb9feb99fa0) ) |
| 2682 | 2360 | ROM_LOAD( "spfc2.2f", 0x0100, 0x0100, CRC(1026d438) SHA1(927009e6ed520c39c36c1d7966589c6778df1a3a) ) |
| 2683 | 2361 | ROM_LOAD( "spfc2.2n", 0x0200, 0x0100, CRC(9735998d) SHA1(c3f50f97369547b1fd25da64507a5c8b725de6d0) ) |
| 2362 | ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ | |
| 2363 | ||
| 2364 | ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 2365 | ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ | |
| 2684 | 2366 | ROM_END |
| 2685 | 2367 | |
| 2686 | 2368 | ROM_START( 8ballact ) |
| r1386 | r1387 | |
| 2706 | 2388 | ROM_LOAD( "8b-dk.7e", 0x1000, 0x0800, CRC(655af8a8) SHA1(d434efc89226d28d24e858186fab9aff0e476deb) ) |
| 2707 | 2389 | ROM_LOAD( "8b-dk.7f", 0x1800, 0x0800, CRC(a29b2763) SHA1(6b2ee88e96a1b74193f12f4fa64a6705f17557b1) ) |
| 2708 | 2390 | |
| 2709 | ROM_REGION( 0x0 | |
| 2391 | ROM_REGION( 0x0500, REGION_PROMS, 0 ) | |
| 2710 | 2392 | ROM_LOAD( "8b.2e", 0x0000, 0x0100, CRC(c7379a12) SHA1(e128e7d7c71ec61b934651c29648d0d2fc69e306) ) |
| 2711 | 2393 | ROM_LOAD( "8b.2f", 0x0100, 0x0100, CRC(116612b4) SHA1(9a7c5329f211b13d5a757fdac761d7096d78b65a) ) |
| 2712 | 2394 | ROM_LOAD( "8b.2n", 0x0200, 0x0100, CRC(30586988) SHA1(a9c246fd01cb3ff371ad33b55d5b2fe4898c4d1b) ) |
| 2395 | ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ | |
| 2396 | ||
| 2397 | ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 2398 | ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ | |
| 2713 | 2399 | ROM_END |
| 2714 | 2400 | |
| 2715 | 2401 | ROM_START( 8ballat2 ) |
| r1386 | r1387 | |
| 2735 | 2421 | ROM_LOAD( "8b-jr.7e", 0x1000, 0x0800, CRC(655af8a8) SHA1(d434efc89226d28d24e858186fab9aff0e476deb) ) |
| 2736 | 2422 | ROM_LOAD( "8b-jr.7f", 0x1800, 0x0800, CRC(a29b2763) SHA1(6b2ee88e96a1b74193f12f4fa64a6705f17557b1) ) |
| 2737 | 2423 | |
| 2738 | ROM_REGION( 0x0 | |
| 2424 | ROM_REGION( 0x0500, REGION_PROMS, 0 ) | |
| 2739 | 2425 | ROM_LOAD( "8b.2e", 0x0000, 0x0100, CRC(c7379a12) SHA1(e128e7d7c71ec61b934651c29648d0d2fc69e306) ) |
| 2740 | 2426 | ROM_LOAD( "8b.2f", 0x0100, 0x0100, CRC(116612b4) SHA1(9a7c5329f211b13d5a757fdac761d7096d78b65a) ) |
| 2741 | 2427 | ROM_LOAD( "8b.2n", 0x0200, 0x0100, CRC(30586988) SHA1(a9c246fd01cb3ff371ad33b55d5b2fe4898c4d1b) ) |
| 2428 | ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ | |
| 2429 | ||
| 2430 | ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 2431 | ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ | |
| 2742 | 2432 | ROM_END |
| 2743 | 2433 | |
| 2744 | 2434 | /* encrypted */ |
| r1386 | r1387 | |
| 2749 | 2439 | |
| 2750 | 2440 | ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ |
| 2751 | 2441 | /* one is used for dkong conversions, the other one for dkongjr conversions */ |
| 2752 | ROM_LOAD( "2716.3h", 0x0000, 0x0800, CRC(3489a35b) SHA1(9ebcf4b20b212d54e6b1a6d9abbda3109298631b) ) | |
| 2753 | ROM_LOAD( "2716.3h1", 0x0000, 0x0800, CRC(2a6ec016) SHA1(c95e185a39c8029f00798ce0a00759a4deb45677) ) | |
| 2442 | ROM_LOAD( "2716.3h", 0x0000, 0x0800, CRC(3489a35b) SHA1(9ebcf4b20b212d54e6b1a6d9abbda3109298631b) ) /* dkong */ | |
| 2443 | ROM_LOAD( "2716.3h1", 0x0800, 0x0800, CRC(2a6ec016) SHA1(c95e185a39c8029f00798ce0a00759a4deb45677) ) /* dkongjr */ | |
| 2754 | 2444 | |
| 2755 | 2445 | ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 2756 | 2446 | ROM_LOAD( "2716.3n", 0x0000, 0x0800, CRC(ea0e7f9a) SHA1(a8e2b43e15281d45e414eaae98e5248bad79c41b) ) |
| r1386 | r1387 | |
| 2901 | 2591 | int A; |
| 2902 | 2592 | UINT8 *rom = memory_region(REGION_CPU1); |
| 2903 | 2593 | |
| 2904 | ||
| 2905 | 2594 | /* swap data lines D3 and D4 */ |
| 2906 | 2595 | for (A = 0;A < 0x8000;A++) |
| 2907 | 2596 | { |
| r1386 | r1387 | |
| 2915 | 2604 | } |
| 2916 | 2605 | } |
| 2917 | 2606 | |
| 2607 | ||
| 2608 | ||
| 2918 | 2609 | /************************************* |
| 2919 | 2610 | * |
| 2920 | 2611 | * Game drivers |
| 2921 | 2612 | * |
| 2922 | 2613 | *************************************/ |
| 2923 | 2614 | |
| 2924 | GAME( 1980, radarscp, 0, radarscp, radarscp, 0, ROT90, "Nintendo", "Radar Scope", GAME_SUPPORTS_SAVE ) | |
| 2925 | GAME( 1980, radarsc1, 0, radarsc1, radarscp, 0, ROT90, "Nintendo", "Radar Scope (TRS01)", GAME_SUPPORTS_SAVE ) | |
| 2926 | GAME( 1981, dkong, 0, dkong, dkong, 0, ROT90, "Nintendo of America", "Donkey Kong (US set 1)", GAME_SUPPORTS_SAVE ) | |
| 2927 | GAME( 1981, dkongo, dkong, dkong, dkong, 0, ROT90, "Nintendo", "Donkey Kong (US set 2)", GAME_SUPPORTS_SAVE ) | |
| 2928 | GAME( 1981, dkongjp, dkong, dkong, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 1)", GAME_SUPPORTS_SAVE ) | |
| 2929 | GAME( 1981, dkongjo, dkong, dkong, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 2)", GAME_SUPPORTS_SAVE ) | |
| 2930 | GAME( 1981, dkongjo1, dkong, dkong, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 3) (bad dump?)", GAME_SUPPORTS_SAVE ) | |
| 2615 | GAME( 1980, radarscp, 0, radarscp, radarscp, 0, ROT90, "Nintendo", "Radar Scope", GAME_SUPPORTS_SAVE ) | |
| 2616 | GAME( 1980, radarsc1, radarscp, radarsc1, radarscp, 0, ROT90, "Nintendo", "Radar Scope (TRS01)", GAME_SUPPORTS_SAVE ) | |
| 2931 | 2617 | |
| 2932 | GAME( 1982, dkongjr, 0, dkongjr, dkong, 0, ROT90, "Nintendo of America", "Donkey Kong Junior (US)", GAME_SUPPORTS_SAVE ) | |
| 2933 | GAME( 1982, dkongjrj, dkongjr, dkongjr, dkong, 0, ROT90, "Nintendo", "Donkey Kong Jr. (Japan)", GAME_SUPPORTS_SAVE ) | |
| 2934 | GAME( 1982, dkngjnrj, dkongjr, dkongjr, dkong, 0, ROT90, "Nintendo", "Donkey Kong Junior (Japan?)", GAME_SUPPORTS_SAVE ) | |
| 2935 | GAME( 1982, dkongjrb, dkongjr, dkongjr, dkong, 0, ROT90, "bootleg", "Donkey Kong Jr. (bootleg)", GAME_SUPPORTS_SAVE ) | |
| 2936 | GAME( 1982, dkngjnrb, dkongjr, dkongjr, dkong, 0, ROT90, "Nintendo of America", "Donkey Kong Junior (bootleg?)", GAME_SUPPORTS_SAVE ) | |
| 2618 | GAME( 1981, dkong, 0, dkong2b, dkong, 0, ROT90, "Nintendo of America", "Donkey Kong (US set 1)", GAME_SUPPORTS_SAVE ) | |
| 2619 | GAME( 1981, dkongo, dkong, dkong2b, dkong, 0, ROT90, "Nintendo", "Donkey Kong (US set 2)", GAME_SUPPORTS_SAVE ) | |
| 2620 | GAME( 1981, dkongjp, dkong, dkong2b, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 1)", GAME_SUPPORTS_SAVE ) | |
| 2621 | GAME( 1981, dkongjo, dkong, dkong2b, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 2)", GAME_SUPPORTS_SAVE ) | |
| 2622 | GAME( 1981, dkongjo1, dkong, dkong2b, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 3) (bad dump?)", GAME_SUPPORTS_SAVE ) | |
| 2937 | 2623 | |
| 2938 | GAME( 1983, dkong3, 0, dkong3, dkong3, 0, ROT90, "Nintendo of America", "Donkey Kong 3 (US)", GAME_SUPPORTS_SAVE ) | |
| 2939 | GAME( 1983, dkong3j, dkong3, dkong3, dkong3, 0, ROT90, "Nintendo", "Donkey Kong 3 (Japan)", GAME_SUPPORTS_SAVE ) | |
| 2940 | GAME( 1984, dkong3b, dkong3, dkong3b, dkong3b, 0, ROT90, "bootleg", "Donkey Kong 3 (bootleg on Donkey Kong Jr. hardware)", GAME_SUPPORTS_SAVE ) | |
| 2624 | GAME( 1982, dkongjr, 0, dkongjr, dkongjr, 0, ROT90, "Nintendo of America", "Donkey Kong Junior (US)", GAME_SUPPORTS_SAVE ) | |
| 2625 | GAME( 1982, dkongjrj, dkongjr, dkongjr, dkongjr, 0, ROT90, "Nintendo", "Donkey Kong Jr. (Japan)", GAME_SUPPORTS_SAVE ) | |
| 2626 | GAME( 1982, dkngjnrj, dkongjr, dkongjr, dkongjr, 0, ROT90, "Nintendo", "Donkey Kong Junior (Japan?)", GAME_SUPPORTS_SAVE ) | |
| 2627 | GAME( 1982, dkongjrb, dkongjr, dkongjr, dkongjr, 0, ROT90, "bootleg", "Donkey Kong Jr. (bootleg)", GAME_SUPPORTS_SAVE ) | |
| 2628 | GAME( 1982, dkngjnrb, dkongjr, dkongjr, dkongjr, 0, ROT90, "Nintendo of America", "Donkey Kong Junior (bootleg?)", GAME_SUPPORTS_SAVE ) | |
| 2941 | 2629 | |
| 2942 | GAME( 1984, herbiedk, huncholy, herbiedk, herbiedk, 0, ROT90, "CVS", "Herbie at the Olympics (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 2630 | GAME( 1983, dkong3, 0, dkong3, dkong3, 0, ROT90, "Nintendo of America", "Donkey Kong 3 (US)", GAME_SUPPORTS_SAVE ) | |
| 2631 | GAME( 1983, dkong3j, dkong3, dkong3, dkong3, 0, ROT90, "Nintendo", "Donkey Kong 3 (Japan)", GAME_SUPPORTS_SAVE ) | |
| 2632 | GAME( 1984, dkong3b, dkong3, dkong3b, dkong3b, 0, ROT90, "bootleg", "Donkey Kong 3 (bootleg on Donkey Kong Jr. hardware)", GAME_SUPPORTS_SAVE ) | |
| 2943 | 2633 | |
| 2944 | GAME( 198 | |
| 2634 | GAME( 1984, her | |
| 2945 | 2635 | |
| 2946 | GAME( 198 | |
| 2636 | GAME( 1983, hunchb | |
| 2947 | 2637 | |
| 2638 | GAME( 1984, sbdk, superbik, hunchbkd, sbdk, 0, ROT90, "Century Electronics", "Super Bike (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 2639 | ||
| 2948 | 2640 | GAME( 1984, herodk, hero, hunchbkd, herodk, herodk, ROT90, "Seatongrove Ltd (Crown license)", "Hero in the Castle of Doom (DK conversion)", GAME_SUPPORTS_SAVE ) |
| 2949 | GAME( 1984, herodku, hero, hunchbkd, herodk, | |
| 2641 | GAME( 1984, herodku, hero, hunchbkd, herodk, | |
| 2950 | 2642 | |
| 2951 | GAME( 1984, 8ballact, 0, eightact, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 2952 | GAME( 1984, 8ballat2, 8ballact, eightact, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DKJr conversion)", GAME_SUPPORTS_SAVE ) | |
| 2643 | GAME( 1984, 8ballact, 0, eightact, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 2644 | GAME( 1984, 8ballat2, 8ballact, eightact, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DKJr conversion)", GAME_SUPPORTS_SAVE ) | |
| 2953 | 2645 | |
| 2954 | GAME( 1984, shootgal, 0, shootgal, shootgal, 0, | |
| 2646 | GAME( 1984, shootgal, 0, shootgal, shootgal, 0, | |
| 2955 | 2647 | |
| 2956 | GAME( 1983, pestplce, mario, pestplce, pestplce, | |
| 2648 | GAME( 1983, pestplce, mario, pestplce, pestplce, | |
| 2957 | 2649 | |
| 2958 | GAME( 1985, spclforc, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) | |
| 2959 | GAME( 1985, spcfrcii, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces II", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) | |
| 2650 | GAME( 1985, spclforc, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) | |
| 2651 | GAME( 1985, spcfrcii, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces II", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) | |
| 2960 | 2652 | |
| 2961 | GAME( 1984, drakton, 0, drakton, drakton, drakton, ROT90, "Epos Corporation", "Drakton", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) | |
| 2962 | GAME( 1985, strtheat, 0, strtheat, strtheat, strtheat, ROT90, "Epos Corporation", "Street Heat - Cardinal Amusements", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) | |
| 2653 | //FIXME: move DRIVER_INIT here | |
| 2654 | GAME( 1984, drakton, 0, drakton, drakton, drakton, ROT90, "Epos Corporation", "Drakton", GAME_SUPPORTS_SAVE ) | |
| 2655 | GAME( 1985, strtheat, 0, strtheat, strtheat, strtheat, ROT90, "Epos Corporation", "Street Heat - Cardinal Amusements", GAME_SUPPORTS_SAVE ) |
| r1386 | r1387 | |
|---|---|---|
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | |
| 59 | static struct EEPROM_interface eeprom_interface = | |
| 59 | static const struct EEPROM_interface eeprom_interface = | |
| 60 | 60 | { |
| 61 | 61 | 7, /* address bits */ |
| 62 | 62 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 306 | 306 | { 0, 0, 0, 0, -1 } /* end mark */ |
| 307 | 307 | }; |
| 308 | 308 | |
| 309 | static ppi8255_interface ppi8255_intf = | |
| 309 | static const ppi8255_interface ppi8255_intf = | |
| 310 | 310 | { |
| 311 | 311 | 3, |
| 312 | 312 | { input_port_0_r, input_port_1_r, NULL }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 382 | 382 | |
| 383 | 383 | ***************************************************************************/ |
| 384 | 384 | |
| 385 | static struct EEPROM_interface eeprom_interface = | |
| 385 | static const struct EEPROM_interface eeprom_interface = | |
| 386 | 386 | { |
| 387 | 387 | 6, /* address bits */ |
| 388 | 388 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 1539 | 1539 | suna8_samples_number_w |
| 1540 | 1540 | }; |
| 1541 | 1541 | |
| 1542 | static struct Samplesinterface suna8_samples_interface = | |
| 1542 | static const struct Samplesinterface suna8_samples_interface = | |
| 1543 | 1543 | { |
| 1544 | 1544 | 1, |
| 1545 | 1545 | NULL, |
| r1386 | r1387 | |
|---|---|---|
| 381 | 381 | ********************************************************************/ |
| 382 | 382 | |
| 383 | 383 | #ifndef MESS |
| 384 | static struct EEPROM_interface qsound_eeprom_interface = | |
| 384 | static const struct EEPROM_interface qsound_eeprom_interface = | |
| 385 | 385 | { |
| 386 | 386 | 7, /* address bits */ |
| 387 | 387 | 8, /* data bits */ |
| r1386 | r1387 | |
| 390 | 390 | "0111" /* erase command */ |
| 391 | 391 | }; |
| 392 | 392 | |
| 393 | static struct EEPROM_interface pang3_eeprom_interface = | |
| 393 | static const struct EEPROM_interface pang3_eeprom_interface = | |
| 394 | 394 | { |
| 395 | 395 | 6, /* address bits */ |
| 396 | 396 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 161 | 161 | memcpy(colortable,colortable_source,sizeof(colortable_source)); |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | static const char *starcrus_sample_names[] = | |
| 164 | static const char *const starcrus_sample_names[] = | |
| 165 | 165 | { |
| 166 | 166 | "*starcrus", |
| 167 | 167 | "engine.wav", /* engine sound, channel 0 */ |
| r1386 | r1387 | |
| 171 | 171 | 0 |
| 172 | 172 | }; |
| 173 | 173 | |
| 174 | static struct Samplesinterface samples_interface = | |
| 174 | static const struct Samplesinterface samples_interface = | |
| 175 | 175 | { |
| 176 | 176 | 4, /* 4 channels */ |
| 177 | 177 | starcrus_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 881 | 881 | } |
| 882 | 882 | |
| 883 | 883 | state_save_register_global( m_n_oldcoin ); |
| 884 | ||
| 885 | at28c16_init( 0, NULL, NULL ); | |
| 884 | 886 | } |
| 885 | 887 | |
| 886 | 888 | static MACHINE_RESET( namcos11 ) |
| r1386 | r1387 | |
|---|---|---|
| 427 | 427 | } |
| 428 | 428 | |
| 429 | 429 | |
| 430 | static UINT8 *kickgoal_default_eeprom; | |
| 430 | static const UINT8 *kickgoal_default_eeprom; | |
| 431 | 431 | static int kickgoal_default_eeprom_length; |
| 432 | 432 | |
| 433 | static UINT8 kickgoal_default_eeprom_type1[128] = { | |
| 433 | static const UINT8 kickgoal_default_eeprom_type1[128] = { | |
| 434 | 434 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 435 | 435 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 436 | 436 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| r1386 | r1387 | |
|---|---|---|
| 944 | 944 | GFXDECODE_END |
| 945 | 945 | |
| 946 | 946 | |
| 947 | static const char *panic_sample_names[] = | |
| 947 | static const char *const panic_sample_names[] = | |
| 948 | 948 | { |
| 949 | 949 | "*panic", |
| 950 | 950 | "walk.wav", |
| r1386 | r1387 | |
| 961 | 961 | 0 |
| 962 | 962 | }; |
| 963 | 963 | |
| 964 | static struct Samplesinterface panic_samples_interface = | |
| 964 | static const struct Samplesinterface panic_samples_interface = | |
| 965 | 965 | { |
| 966 | 966 | 9, /* 9 channels */ |
| 967 | 967 | panic_sample_names |
| 968 | 968 | }; |
| 969 | 969 | |
| 970 | static const char *cosmicg_sample_names[] = | |
| 970 | static const char *const cosmicg_sample_names[] = | |
| 971 | 971 | { |
| 972 | 972 | "*cosmicg", |
| 973 | 973 | "cg_m0.wav", /* 8 Different pitches of March Sound */ |
| r1386 | r1387 | |
| 988 | 988 | 0 |
| 989 | 989 | }; |
| 990 | 990 | |
| 991 | static struct Samplesinterface cosmicg_samples_interface = | |
| 991 | static const struct Samplesinterface cosmicg_samples_interface = | |
| 992 | 992 | { |
| 993 | 993 | 9, /* 9 channels */ |
| 994 | 994 | cosmicg_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 252 | 252 | |
| 253 | 253 | // 'working' NVRAM |
| 254 | 254 | |
| 255 | static int bmc_nv1[]= | |
| 255 | #ifdef NVRAM_HACK | |
| 256 | static const UINT8 bmc_nv1[]= | |
| 256 | 257 | { |
| 257 | 258 | 0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x13,0x88,0x46,0xDD,0x0F,0xA0, |
| 258 | 259 | 0x5A,0xF5,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x6E,0x55, |
| r1386 | r1387 | |
| 270 | 271 | 0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 271 | 272 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00, |
| 272 | 273 | 0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 273 | 0x00,0x00,0xDC,0x00,0xFF,0xFF,0xFF,0xFF | |
| 274 | 0x00,0x00,0xDC,0x00,0xFF,0xFF,0xFF,0xFF | |
| 274 | 275 | }; |
| 275 | 276 | |
| 276 | static | |
| 277 | static const UINT8 bmc_nv2[]= | |
| 277 | 278 | { |
| 278 | 279 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, |
| 279 | 280 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x03,0x00,0x09,0x00,0x00,0x2B,0xF1, |
| 280 | 0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF | |
| 281 | 0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF | |
| 281 | 282 | }; |
| 282 | 283 | |
| 283 | static | |
| 284 | static const UINT8 bmc_nv3[]= | |
| 284 | 285 | { |
| 285 | 0xFA,0xFF,0x01,0x02,0x04,0x0A,0x1E,0xC8,0x02,0x01,0xFF,0xFF,0xFF,0xFF,0xFF | |
| 286 | 0xFA,0xFF,0x01,0x02,0x04,0x0A,0x1E,0xC8,0x02,0x01,0xFF,0xFF,0xFF,0xFF,0xFF | |
| 286 | 287 | }; |
| 287 | 288 | |
| 288 | 289 | |
| 289 | static void init_stats( | |
| 290 | static void init_stats(const UINT8 *table, int table_len, int address) | |
| 290 | 291 | { |
| 291 | while(*table>=0) | |
| 292 | { | |
| 293 | stats_ram[address]=*table; | |
| 294 | address+=2; | |
| 295 | table++; | |
| 296 | } | |
| 292 | int i; | |
| 293 | for (i=0; i<table_len; i++) | |
| 294 | stats_ram[address+2*i]=table[i]; | |
| 297 | 295 | } |
| 296 | #endif | |
| 298 | 297 | |
| 299 | 298 | static NVRAM_HANDLER( bmcbowl ) |
| 300 | 299 | { |
| r1386 | r1387 | |
| 306 | 305 | |
| 307 | 306 | #ifdef NVRAM_HACK |
| 308 | 307 | for (i = 0; i < stats_ram_size; i++) |
| 309 | { | |
| 310 | stats_ram[i] = 0xff; | |
| 311 | init_stats(bmc_nv1,0); | |
| 312 | init_stats(bmc_nv2,0x3b0); | |
| 313 | init_stats(bmc_nv3,0xfe2); | |
| 314 | } | |
| 308 | stats_ram[i] = 0xff; | |
| 309 | ||
| 310 | init_stats(bmc_nv1,ARRAY_LENGTH(bmc_nv1),0); | |
| 311 | init_stats(bmc_nv2,ARRAY_LENGTH(bmc_nv2),0x3b0); | |
| 312 | init_stats(bmc_nv3,ARRAY_LENGTH(bmc_nv3),0xfe2); | |
| 315 | 313 | #else |
| 316 | 314 | if (file) |
| 317 | 315 | mame_fread(file, stats_ram, stats_ram_size); |
| r1386 | r1387 | |
|---|---|---|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | |
| 96 | static ppi8255_interface ppi8255_intf = | |
| 96 | static const ppi8255_interface ppi8255_intf = | |
| 97 | 97 | { |
| 98 | 98 | 5, /* 5 chips */ |
| 99 | 99 | { p0a_r, NULL, NULL, NULL, NULL }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 634 | 634 | |
| 635 | 635 | |
| 636 | 636 | |
| 637 | static struct EEPROM_interface cps2_eeprom_interface = | |
| 637 | static const struct EEPROM_interface cps2_eeprom_interface = | |
| 638 | 638 | { |
| 639 | 639 | 6, /* address bits */ |
| 640 | 640 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 408 | 408 | |
| 409 | 409 | ***************************************************************************/ |
| 410 | 410 | |
| 411 | static ppi8255_interface ppi8255_intf = | |
| 411 | static const ppi8255_interface ppi8255_intf = | |
| 412 | 412 | { |
| 413 | 413 | 2, // 2 chips |
| 414 | 414 | { lordgun_eeprom_r, input_port_1_r }, // Port A read |
| r1386 | r1387 | |
|---|---|---|
| 1542 | 1542 | |
| 1543 | 1543 | static DRIVER_INIT( sindbadm ) |
| 1544 | 1544 | { |
| 1545 | ppi8255_interface ppi_intf = | |
| 1545 | static ppi8255_interface ppi_intf = | |
| 1546 | 1546 | { |
| 1547 | 1547 | 1, |
| 1548 | 1548 | { 0 }, |
| r1386 | r1387 | |
|---|---|---|
| 455 | 455 | static int init_eeprom_count; |
| 456 | 456 | |
| 457 | 457 | |
| 458 | static struct EEPROM_interface eeprom_interface = | |
| 458 | static const struct EEPROM_interface eeprom_interface = | |
| 459 | 459 | { |
| 460 | 460 | 7, /* address bits */ |
| 461 | 461 | 8, /* data bits */ |
| r1386 | r1387 | |
| 565 | 565 | WRITE16_HANDLER( ssriders_eeprom_w ); /* in video/tmnt.c */ |
| 566 | 566 | |
| 567 | 567 | |
| 568 | static struct EEPROM_interface thndrx2_eeprom_interface = | |
| 568 | static const struct EEPROM_interface thndrx2_eeprom_interface = | |
| 569 | 569 | { |
| 570 | 570 | 7, /* address bits */ |
| 571 | 571 | 8, /* data bits */ |
| r1386 | r1387 | |
| 2485 | 2485 | REGION_SOUND2 /* memory region */ |
| 2486 | 2486 | }; |
| 2487 | 2487 | |
| 2488 | static struct Samplesinterface samples_interface = | |
| 2488 | static const struct Samplesinterface samples_interface = | |
| 2489 | 2489 | { |
| 2490 | 2490 | 1, /* 1 channel for the title music */ |
| 2491 | 2491 | NULL, |
| r1386 | r1387 | |
|---|---|---|
| 1338 | 1338 | psx_driver_init(); |
| 1339 | 1339 | |
| 1340 | 1340 | psx_dma_install_read_handler( 5, namcos12_rom_read ); |
| 1341 | ||
| 1342 | at28c16_init( 0, NULL, NULL ); | |
| 1341 | 1343 | } |
| 1342 | 1344 | |
| 1343 | 1345 | static DRIVER_INIT( ptblank2 ) |
| r1386 | r1387 | |
|---|---|---|
| 184 | 184 | timer_call_after_resynch(NULL, (data >> 16) & 0xff, psikyo_soundlatch_callback); |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | static UINT8 s1945_table[256] = { | |
| 187 | static const UINT8 s1945_table[256] = { | |
| 188 | 188 | 0x00, 0x00, 0x64, 0xae, 0x00, 0x00, 0x26, 0x2c, 0x00, 0x00, 0x2c, 0xda, 0x00, 0x00, 0x2c, 0xbc, |
| 189 | 189 | 0x00, 0x00, 0x2c, 0x9e, 0x00, 0x00, 0x2f, 0x0e, 0x00, 0x00, 0x31, 0x10, 0x00, 0x00, 0xc5, 0x1e, |
| 190 | 190 | 0x00, 0x00, 0x32, 0x90, 0x00, 0x00, 0xac, 0x5c, 0x00, 0x00, 0x2b, 0xc0 |
| 191 | 191 | }; |
| 192 | 192 | |
| 193 | static UINT8 s1945a_table[256] = { | |
| 193 | static const UINT8 s1945a_table[256] = { | |
| 194 | 194 | 0x00, 0x00, 0x64, 0xbe, 0x00, 0x00, 0x26, 0x2c, 0x00, 0x00, 0x2c, 0xda, 0x00, 0x00, 0x2c, 0xbc, |
| 195 | 195 | 0x00, 0x00, 0x2c, 0x9e, 0x00, 0x00, 0x2f, 0x0e, 0x00, 0x00, 0x31, 0x10, 0x00, 0x00, 0xc7, 0x2a, |
| 196 | 196 | 0x00, 0x00, 0x32, 0x90, 0x00, 0x00, 0xad, 0x4c, 0x00, 0x00, 0x2b, 0xc0 |
| 197 | 197 | }; |
| 198 | 198 | |
| 199 | static UINT8 s1945j_table[256] = { | |
| 199 | static const UINT8 s1945j_table[256] = { | |
| 200 | 200 | 0x00, 0x00, 0x64, 0xb6, 0x00, 0x00, 0x26, 0x2c, 0x00, 0x00, 0x2c, 0xda, 0x00, 0x00, 0x2c, 0xbc, |
| 201 | 201 | 0x00, 0x00, 0x2c, 0x9e, 0x00, 0x00, 0x2f, 0x0e, 0x00, 0x00, 0x31, 0x10, 0x00, 0x00, 0xc5, 0x92, |
| 202 | 202 | 0x00, 0x00, 0x32, 0x90, 0x00, 0x00, 0xac, 0x64, 0x00, 0x00, 0x2b, 0xc0 |
| r1386 | r1387 | |
|---|---|---|
| 97 | 97 | |
| 98 | 98 | ***************************************************************************/ |
| 99 | 99 | |
| 100 | static struct EEPROM_interface eeprom_interface = | |
| 100 | static const struct EEPROM_interface eeprom_interface = | |
| 101 | 101 | { |
| 102 | 102 | 6, /* address bits */ |
| 103 | 103 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 916 | 916 | /*****************************************************************************/ |
| 917 | 917 | |
| 918 | 918 | /* this is a 93C46 but with reset delay that is needed by Lost World */ |
| 919 | static struct EEPROM_interface eeprom_interface = | |
| 919 | static const struct EEPROM_interface eeprom_interface = | |
| 920 | 920 | { |
| 921 | 921 | 6, /* address bits */ |
| 922 | 922 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 110 | 110 | /* bit 7 could be a second coin counter, but coin 2 doesn't seem to work... */ |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | static ppi8255_interface ppi8255_intf = | |
| 113 | static const ppi8255_interface ppi8255_intf = | |
| 114 | 114 | { |
| 115 | 115 | 1, /* 1 chip */ |
| 116 | 116 | { input_port_0_r }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 93 | 93 | |
| 94 | 94 | ***************************************************************************/ |
| 95 | 95 | |
| 96 | static struct EEPROM_interface eeprom_interface = | |
| 96 | static const struct EEPROM_interface eeprom_interface = | |
| 97 | 97 | { |
| 98 | 98 | 6, /* address bits */ |
| 99 | 99 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 204 | 204 | return 0; |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | static ppi8255_interface ppi8255_intf = | |
| 207 | static const ppi8255_interface ppi8255_intf = | |
| 208 | 208 | { |
| 209 | 209 | 2, /* 2 chips */ |
| 210 | 210 | { r1, r4 }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 85 | 85 | static emu_timer *dmadelay_timer; |
| 86 | 86 | |
| 87 | 87 | |
| 88 | static struct EEPROM_interface eeprom_interface = | |
| 88 | static const struct EEPROM_interface eeprom_interface = | |
| 89 | 89 | { |
| 90 | 90 | 7, /* address bits */ |
| 91 | 91 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 118 | 118 | } |
| 119 | 119 | else |
| 120 | 120 | { |
| 121 | static UINT8 def_eeprom[ 128 ] = | |
| 121 | static const UINT8 def_eeprom[ 128 ] = | |
| 122 | 122 | { |
| 123 | 123 | 0x29, 0x2b, 0x52, 0x56, 0x20, 0x94, 0x41, 0x55, 0x00, 0x41, 0x14, 0x14, 0x00, 0x03, 0x01, 0x01, |
| 124 | 124 | 0x01, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0xaa, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| r1386 | r1387 | |
|---|---|---|
| 120 | 120 | // AM_RANGE(0x40, 0x40) AM_WRITE(watchdog_reset_w) |
| 121 | 121 | ADDRESS_MAP_END |
| 122 | 122 | |
| 123 | static ppi8255_interface ppi8255_intf = | |
| 123 | static const ppi8255_interface ppi8255_intf = | |
| 124 | 124 | { |
| 125 | 125 | 1, /* 1 chip */ |
| 126 | 126 | { input_port_2_r }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 1212 | 1212 | /*###################### Battle Bakraid ##############################*/ |
| 1213 | 1213 | |
| 1214 | 1214 | /* EEPROM contents with Battle Bakraid Unlimited version features unlocked */ |
| 1215 | static UINT8 bbakraid_unlimited_nvram[512] = { | |
| 1215 | static const UINT8 bbakraid_unlimited_nvram[512] = { | |
| 1216 | 1216 | 0xc2,0x49,0x00,0x07,0xa1,0x20,0x2a,0x2a,0x2a,0x90,0x90,0x90,0x00,0x00,0x00,0x00, |
| 1217 | 1217 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x06,0x1a,0x80,0x2a,0x2a,0x2a,0x94, |
| 1218 | 1218 | 0x94,0x94,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x04, |
| r1386 | r1387 | |
| 1249 | 1249 | |
| 1250 | 1250 | |
| 1251 | 1251 | |
| 1252 | static struct EEPROM_interface eeprom_interface_93C66 = | |
| 1252 | static const struct EEPROM_interface eeprom_interface_93C66 = | |
| 1253 | 1253 | { |
| 1254 | 1254 | /* Pin 6 of the 93C66 is connected to Gnd! |
| 1255 | 1255 | So it's configured for 512 bytes */ |
| r1386 | r1387 | |
|---|---|---|
| 125 | 125 | }; |
| 126 | 126 | #endif |
| 127 | 127 | |
| 128 | static ppi8255_interface ppi8255_intf = | |
| 128 | static const ppi8255_interface ppi8255_intf = | |
| 129 | 129 | { |
| 130 | 130 | 2, |
| 131 | 131 | { input_port_0_r, input_port_1_r }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 306 | 306 | GFXDECODE_END |
| 307 | 307 | |
| 308 | 308 | |
| 309 | static struct SN76477interface sn76477_interface = | |
| 309 | static const struct SN76477interface sn76477_interface = | |
| 310 | 310 | { |
| 311 | 311 | RES_K( 47), /* 4 noise_res */ |
| 312 | 312 | RES_K(330), /* 5 filter_res */ |
| r1386 | r1387 | |
|---|---|---|
| 86 | 86 | GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout2, 0, 16 ) /* wrong */ |
| 87 | 87 | GFXDECODE_END |
| 88 | 88 | |
| 89 | static ppi8255_interface ppi8255_intf = | |
| 89 | static const ppi8255_interface ppi8255_intf = | |
| 90 | 90 | { |
| 91 | 91 | 2, |
| 92 | 92 | { NULL, NULL }, |
| r1386 | r1387 | |
|---|---|---|
| 597 | 597 | return memory_region(REGION_USER1)[romaddr & 0x7fff]; |
| 598 | 598 | } |
| 599 | 599 | |
| 600 | static ppi8255_interface ppi8255_intf = | |
| 600 | static const ppi8255_interface ppi8255_intf = | |
| 601 | 601 | { |
| 602 | 602 | 2, /* 1 chips */ |
| 603 | 603 | { NULL, input_port_0_r }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 158 | 158 | |
| 159 | 159 | /* audio */ |
| 160 | 160 | |
| 161 | extern const char *sasuke_sample_names[]; | |
| 162 | extern const char *vanguard_sample_names[]; | |
| 163 | extern const char *fantasy_sample_names[]; | |
| 161 | extern const char *const sasuke_sample_names[]; | |
| 162 | extern const char *const vanguard_sample_names[]; | |
| 163 | extern const char *const fantasy_sample_names[]; | |
| 164 | 164 | |
| 165 | 165 | extern WRITE8_HANDLER( sasuke_sound_w ); |
| 166 | 166 | extern WRITE8_HANDLER( satansat_sound_w ); |
| r1386 | r1387 | |
| 713 | 713 | rockola_sh_start |
| 714 | 714 | }; |
| 715 | 715 | |
| 716 | static struct Samplesinterface sasuke_samples_interface = | |
| 716 | static const struct Samplesinterface sasuke_samples_interface = | |
| 717 | 717 | { |
| 718 | 718 | 4, /* 4 channels */ |
| 719 | 719 | sasuke_sample_names |
| 720 | 720 | }; |
| 721 | 721 | |
| 722 | static struct Samplesinterface vanguard_samples_interface = | |
| 722 | static const struct Samplesinterface vanguard_samples_interface = | |
| 723 | 723 | { |
| 724 | 724 | 3, /* 3 channel */ |
| 725 | 725 | vanguard_sample_names |
| 726 | 726 | }; |
| 727 | 727 | |
| 728 | static struct Samplesinterface fantasy_samples_interface = | |
| 728 | static const struct Samplesinterface fantasy_samples_interface = | |
| 729 | 729 | { |
| 730 | 730 | 1, /* 1 channel */ |
| 731 | 731 | fantasy_sample_names |
| 732 | 732 | }; |
| 733 | 733 | |
| 734 | 734 | |
| 735 | static struct SN76477interface sasuke_sn76477_intf_1 = | |
| 735 | static const struct SN76477interface sasuke_sn76477_intf_1 = | |
| 736 | 736 | { |
| 737 | 737 | RES_K(470), /* 4 noise_res */ |
| 738 | 738 | RES_K(150), /* 5 filter_res */ |
| r1386 | r1387 | |
| 761 | 761 | // ic48 GND: 2,22,26,27,28 +5V: 1,15,25 |
| 762 | 762 | }; |
| 763 | 763 | |
| 764 | static struct SN76477interface sasuke_sn76477_intf_2 = | |
| 764 | static const struct SN76477interface sasuke_sn76477_intf_2 = | |
| 765 | 765 | { |
| 766 | 766 | RES_K(340), /* 4 noise_res */ |
| 767 | 767 | RES_K(47), /* 5 filter_res */ |
| r1386 | r1387 | |
| 790 | 790 | // ic51 GND: 2,26,27 +5V: 1,15,22,25,28 |
| 791 | 791 | }; |
| 792 | 792 | |
| 793 | static struct SN76477interface sasuke_sn76477_intf_3 = | |
| 793 | static const struct SN76477interface sasuke_sn76477_intf_3 = | |
| 794 | 794 | { |
| 795 | 795 | RES_K(330), /* 4 noise_res */ |
| 796 | 796 | RES_K(47), /* 5 filter_res */ |
| r1386 | r1387 | |
| 819 | 819 | // ic52 GND: 2,22,27,28 +5V: 1,15,25,26 |
| 820 | 820 | }; |
| 821 | 821 | |
| 822 | static struct SN76477interface satansat_sn76477_intf = | |
| 822 | static const struct SN76477interface satansat_sn76477_intf = | |
| 823 | 823 | { |
| 824 | 824 | RES_K(470), /* 4 noise_res */ |
| 825 | 825 | RES_M(1.5), /* 5 filter_res */ |
| r1386 | r1387 | |
| 848 | 848 | // ??? GND: 2,26,27 +5V: 15,25 |
| 849 | 849 | }; |
| 850 | 850 | |
| 851 | static struct SN76477interface vanguard_sn76477_intf_1 = | |
| 851 | static const struct SN76477interface vanguard_sn76477_intf_1 = | |
| 852 | 852 | { |
| 853 | 853 | RES_K(470), /* 4 noise_res */ |
| 854 | 854 | RES_M(1.5), /* 5 filter_res */ |
| r1386 | r1387 | |
| 877 | 877 | // SHOT A GND: 2,9,26,27 +5V: 15,25 |
| 878 | 878 | }; |
| 879 | 879 | |
| 880 | static struct SN76477interface vanguard_sn76477_intf_2 = | |
| 880 | static const struct SN76477interface vanguard_sn76477_intf_2 = | |
| 881 | 881 | { |
| 882 | 882 | RES_K(10), /* 4 noise_res */ |
| 883 | 883 | RES_K(30), /* 5 filter_res */ |
| r1386 | r1387 | |
| 906 | 906 | // SHOT B GND: 1,2,26,27 +5V: 15,25,28 |
| 907 | 907 | }; |
| 908 | 908 | |
| 909 | static struct SN76477interface fantasy_sn76477_intf = | |
| 909 | static const struct SN76477interface fantasy_sn76477_intf = | |
| 910 | 910 | { |
| 911 | 911 | RES_K(470), /* 4 noise_res */ |
| 912 | 912 | RES_M(1.5), /* 5 filter_res */ |
| r1386 | r1387 | |
|---|---|---|
| 359 | 359 | |
| 360 | 360 | |
| 361 | 361 | |
| 362 | static ppi8255_interface getrivia_ppi8255_intf = | |
| 362 | static const ppi8255_interface getrivia_ppi8255_intf = | |
| 363 | 363 | { |
| 364 | 364 | 2, /* 2 chips */ |
| 365 | 365 | { input_port_0_r, input_port_2_r }, /* Port A read */ |
| r1386 | r1387 | |
| 370 | 370 | { sound_w, lamps2_w }, /* Port C write */ |
| 371 | 371 | }; |
| 372 | 372 | |
| 373 | static ppi8255_interface gselect_ppi8255_intf = | |
| 373 | static const ppi8255_interface gselect_ppi8255_intf = | |
| 374 | 374 | { |
| 375 | 375 | 2, /* 2 chips */ |
| 376 | 376 | { input_port_0_r, input_port_2_r }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 272 | 272 | /* set the new state of the IRQ lines */ |
| 273 | 273 | if (newstate) |
| 274 | 274 | { |
| 275 | LOG(("68k IRQ, %x\n", newstate)); | |
| 275 | LOGSTUFF(("68k IRQ, %x\n", newstate)); | |
| 276 | 276 | cpunum_set_input_line(1, newstate, ASSERT_LINE); |
| 277 | 277 | } |
| 278 | 278 | else |
| 279 | 279 | { |
| 280 | LOG(("68k IRQ Clear, %x\n", newstate)); | |
| 280 | LOGSTUFF(("68k IRQ Clear, %x\n", newstate)); | |
| 281 | 281 | cpunum_set_input_line(1, 7, CLEAR_LINE); |
| 282 | 282 | } |
| 283 | 283 | } |
| r1386 | r1387 | |
|---|---|---|
| 277 | 277 | } |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | static DRIVER_INIT( namcond1 ) | |
| 281 | { | |
| 282 | at28c16_init( 0, NULL, NULL ); | |
| 283 | } | |
| 284 | ||
| 280 | 285 | /****************************************** |
| 281 | 286 | ND-1 Master clock = 49.152MHz |
| 282 | 287 | - 680000 = 12288000 (CLK/4) |
| r1386 | r1387 | |
| 405 | 410 | ROM_LOAD( "ncs1voic.7c", 0x000000, 0x200000, CRC(ed05fd88) SHA1(ad88632c89a9946708fc6b4c9247e1bae9b2944b) ) |
| 406 | 411 | ROM_END |
| 407 | 412 | |
| 408 | GAME( 1995, ncv1, 0, namcond1, namcond1, 0, ROT90, "Namco", "Namco Classics Collection Vol.1", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 409 | GAME( 1995, ncv1j, ncv1, namcond1, namcond1, 0, ROT90, "Namco", "Namco Classics Collection Vol.1 (Japan, v1.00)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 410 | GAME( 1995, ncv1j2, ncv1, namcond1, namcond1, 0, ROT90, "Namco", "Namco Classics Collection Vol.1 (Japan, v1.03)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 411 | GAME( 1996, ncv2, 0, namcond1, namcond1, 0, ROT90, "Namco", "Namco Classics Collection Vol.2", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) | |
| 412 | GAME( 1996, ncv2j, ncv2, namcond1, namcond1, 0, ROT90, "Namco", "Namco Classics Collection Vol.2 (Japan)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) | |
| 413 | GAME( 1995, ncv1, 0, namcond1, namcond1, namcond1, ROT90, "Namco", "Namco Classics Collection Vol.1", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 414 | GAME( 1995, ncv1j, ncv1, namcond1, namcond1, namcond1, ROT90, "Namco", "Namco Classics Collection Vol.1 (Japan, v1.00)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 415 | GAME( 1995, ncv1j2, ncv1, namcond1, namcond1, namcond1, ROT90, "Namco", "Namco Classics Collection Vol.1 (Japan, v1.03)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 416 | GAME( 1996, ncv2, 0, namcond1, namcond1, namcond1, ROT90, "Namco", "Namco Classics Collection Vol.2", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) | |
| 417 | GAME( 1996, ncv2j, ncv2, namcond1, namcond1, namcond1, ROT90, "Namco", "Namco Classics Collection Vol.2 (Japan)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) |
| r1386 | r1387 | |
|---|---|---|
| 229 | 229 | }; |
| 230 | 230 | |
| 231 | 231 | |
| 232 | static ppi8255_interface ppi8255_intf = | |
| 232 | static const ppi8255_interface ppi8255_intf = | |
| 233 | 233 | { |
| 234 | 234 | 1, /* 1 chip */ |
| 235 | 235 | {input_port_3_r}, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 132 | 132 | * |
| 133 | 133 | *************************************/ |
| 134 | 134 | |
| 135 | static ppi8255_interface ppi8255_intf = | |
| 135 | static const ppi8255_interface ppi8255_intf = | |
| 136 | 136 | { |
| 137 | 137 | 2, /* 2 chips */ |
| 138 | 138 | { 0, 0 }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 66 | 66 | #include "eolithsp.h" |
| 67 | 67 | |
| 68 | 68 | // It's configured for 512 bytes |
| 69 | static struct EEPROM_interface eeprom_interface_93C66 = | |
| 69 | static const struct EEPROM_interface eeprom_interface_93C66 = | |
| 70 | 70 | { |
| 71 | 71 | 9, // address bits 9 |
| 72 | 72 | 8, // data bits 8 |
| r1386 | r1387 | |
|---|---|---|
| 449 | 449 | GFXDECODE_ENTRY( REGION_GFX3, 0, charlayout, 32*16, 16 ) |
| 450 | 450 | GFXDECODE_END |
| 451 | 451 | |
| 452 | static struct Samplesinterface samples_interface = | |
| 452 | static const struct Samplesinterface samples_interface = | |
| 453 | 453 | { |
| 454 | 454 | 1, /* 1 channel */ |
| 455 | 455 | NULL, |
| r1386 | r1387 | |
|---|---|---|
| 1526 | 1526 | |
| 1527 | 1527 | static DRIVER_INIT( turbo ) |
| 1528 | 1528 | { |
| 1529 | static ppi8255_interface turbo_8255_intf = | |
| 1529 | static const ppi8255_interface turbo_8255_intf = | |
| 1530 | 1530 | { |
| 1531 | 1531 | 4, |
| 1532 | 1532 | { NULL, NULL, NULL, turbo_analog_r }, |
| r1386 | r1387 | |
| 1548 | 1548 | |
| 1549 | 1549 | static DRIVER_INIT( subroc3d ) |
| 1550 | 1550 | { |
| 1551 | static ppi8255_interface subroc3d_8255_intf = | |
| 1551 | static const ppi8255_interface subroc3d_8255_intf = | |
| 1552 | 1552 | { |
| 1553 | 1553 | 2, |
| 1554 | 1554 | { NULL, NULL }, |
| r1386 | r1387 | |
| 1564 | 1564 | |
| 1565 | 1565 | static DRIVER_INIT( buckrog ) |
| 1566 | 1566 | { |
| 1567 | static ppi8255_interface buckrog_8255_intf = | |
| 1567 | static const ppi8255_interface buckrog_8255_intf = | |
| 1568 | 1568 | { |
| 1569 | 1569 | 2, |
| 1570 | 1570 | { NULL, NULL }, |
| r1386 | r1387 | |
|---|---|---|
| 558 | 558 | |
| 559 | 559 | /* Laser Battle sound **********************************/ |
| 560 | 560 | |
| 561 | static struct SN76477interface sn76477_interface = | |
| 561 | static const struct SN76477interface sn76477_interface = | |
| 562 | 562 | { |
| 563 | 563 | RES_K(47), /* 4 noise_res R21 47K */ |
| 564 | 564 | 0, /* 5 filter_res (variable) */ |
| r1386 | r1387 | |
|---|---|---|
| 1279 | 1279 | irqhandler |
| 1280 | 1280 | }; |
| 1281 | 1281 | |
| 1282 | static struct Samplesinterface samples_interface = | |
| 1282 | static const struct Samplesinterface samples_interface = | |
| 1283 | 1283 | { |
| 1284 | 1284 | 1, |
| 1285 | 1285 | NULL, |
| r1386 | r1387 | |
|---|---|---|
| 70 | 70 | static UINT16 *dsp56k_bank02_ram ; |
| 71 | 71 | static UINT16 *dsp56k_bank04_ram ; |
| 72 | 72 | |
| 73 | static struct EEPROM_interface eeprom_interface = | |
| 73 | static const struct EEPROM_interface eeprom_interface = | |
| 74 | 74 | { |
| 75 | 75 | 7, /* address bits */ |
| 76 | 76 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 639 | 639 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_VECTOR ) |
| 640 | 640 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15) |
| 641 | 641 | MDRV_SCREEN_SIZE(400,300) |
| 642 | MDRV_SCREEN_VISIBLE_AREA( | |
| 642 | MDRV_SCREEN_VISIBLE_AREA(522, 1566, 394, 1182 | |
| 643 | 643 | MDRV_PALETTE_LENGTH(32768) |
| 644 | 644 | |
| 645 | 645 | MDRV_VIDEO_START(dvg) |
| r1386 | r1387 | |
| 693 | 693 | MDRV_SCREEN_REFRESH_RATE(40) |
| 694 | 694 | MDRV_MACHINE_RESET(avgdvg) |
| 695 | 695 | |
| 696 | MDRV_SCREEN_VISIBLE_AREA( | |
| 696 | MDRV_SCREEN_VISIBLE_AREA(522, 1566, 270, 1070) | |
| 697 | 697 | MDRV_VIDEO_START(dvg) |
| 698 | 698 | MDRV_VIDEO_UPDATE(vector) |
| 699 | 699 |
| r1386 | r1387 | |
|---|---|---|
| 27 | 27 | static int xoffset; |
| 28 | 28 | static int yoffset; |
| 29 | 29 | |
| 30 | static struct EEPROM_interface eeprom_interface = | |
| 30 | static const struct EEPROM_interface eeprom_interface = | |
| 31 | 31 | { |
| 32 | 32 | 6, /* address bits */ |
| 33 | 33 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 3306 | 3306 | ROM_LOAD16_WORD_SWAP( "th-e-5.ic5", 0x1000000, 0x0400000, CRC(3914b805) SHA1(1331ce82ba0bdfc76fe3456a5252e69c00e2cf1f) ) |
| 3307 | 3307 | ROM_END |
| 3308 | 3308 | |
| 3309 | ROM_START( thuntk ) | |
| 3310 | STV_BIOS | |
| 3311 | ||
| 3312 | ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */ | |
| 3313 | ROM_FILL( 0x0000000, 0x0400000, 0x00 ) | |
| 3314 | ROM_LOAD16_BYTE( "2.ic13_2", 0x0200000, 0x0080000, CRC(6cae2926) SHA1(e8d5745b4228de24672da5017cb3dab58344f59f) ) | |
| 3315 | ROM_LOAD16_BYTE( "1.ic13_1", 0x0200001, 0x0080000, CRC(460727c8) SHA1(da7171b65734264e10692e3408ac93beb374c65e) ) | |
| 3316 | ||
| 3317 | ROM_LOAD( "bom210-10.ic2", 0x1c00000, 0x0400000, CRC(f59d0827) SHA1(2bed4b2c78e9b4e9332f576e1b264a6343f4cfff) ) | |
| 3318 | ROM_RELOAD( 0x0400000, 0x0400000 ) | |
| 3319 | ROM_LOAD( "bom210-11.ic3", 0x2000000, 0x0400000, CRC(44e5a13e) SHA1(aee3c06662a1d083f3bd01292cf2694132f63533) ) | |
| 3320 | ROM_RELOAD( 0x0800000, 0x0400000 ) | |
| 3321 | ROM_LOAD( "bom210-12.ic4", 0x2400000, 0x0400000, CRC(deabc701) SHA1(cb313ae9bf6f115682fc76647a999e12c98f6120) ) | |
| 3322 | ROM_RELOAD( 0x0c00000, 0x0400000 ) | |
| 3323 | ROM_LOAD( "bom210-13.ic5", 0x2800000, 0x0400000, CRC(5ece1d5c) SHA1(6d88f71b485bf2b3c164fa22f1c7ecaba4b3f5b1) ) | |
| 3324 | ROM_RELOAD( 0x1000000, 0x0400000 ) | |
| 3325 | ROM_END | |
| 3326 | ||
| 3327 | ||
| 3328 | ROM_START( sanjeon ) | |
| 3329 | STV_BIOS | |
| 3330 | ||
| 3331 | ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */ | |
| 3332 | ROM_LOAD( "ic11", 0x0000000, 0x0200000, CRC(9abae8d4) SHA1(ddbe4c8fff8fa59d63e278e95f245145d2da8aeb) ) // ic13 bad | |
| 3333 | ROM_RELOAD ( 0x0100000, 0x0200000 ) | |
| 3334 | ROM_RELOAD ( 0x0200000, 0x0200000 ) | |
| 3335 | ROM_RELOAD ( 0x0300000, 0x0200000 ) | |
| 3336 | ||
| 3337 | ROM_LOAD( "ic13", 0x0400000, 0x0200000, CRC(f72c1d13) SHA1(a2b168d187034024b83fbbe2f5eec78816285da9) ) // ic2 good | |
| 3338 | ROM_LOAD( "ic14", 0x0600000, 0x0200000, CRC(bcd72105) SHA1(fb88a1f2589fef5d9845027646259ec8e781771b) ) // ic2 good | |
| 3339 | ROM_LOAD( "ic15", 0x0800000, 0x0200000, CRC(8c9c8352) SHA1(312e9e6435c6e9a4a19b72e234b087d4f5b069a5) ) // ic3 good | |
| 3340 | ROM_LOAD( "ic16", 0x0a00000, 0x0200000, CRC(07e11512) SHA1(5fb5e93a167aae501bd799aba98f7dbc3762a795) ) // ic3 good | |
| 3341 | ROM_LOAD( "ic17", 0x0c00000, 0x0200000, CRC(46b7b344) SHA1(a325b724e6346f585582bb2581d3063b1c8ddee9) ) // ic4 good | |
| 3342 | ROM_LOAD( "ic18", 0x0e00000, 0x0200000, CRC(d48404e1) SHA1(e4927d17cb19f6825f41b41056b89de224cf97de) ) // ic4 good | |
| 3343 | ROM_LOAD( "ic19", 0x1000000, 0x0200000, CRC(33d23bb9) SHA1(0179438a0b14ad7eb553a24d86fae778671fcc49) ) // ic5 good | |
| 3344 | ROM_LOAD( "ic20", 0x1200000, 0x0200000, CRC(f8cc1038) SHA1(06bcb25eb5df77bd503b0692a96ec66c00976fe9) ) // ic5 good | |
| 3345 | ROM_LOAD( "ic21", 0x1400000, 0x0200000, CRC(74ceb649) SHA1(91b7eb699b7167f890528149178644a74ef3ad17) ) // ic6 good | |
| 3346 | ROM_LOAD( "ic22", 0x1600000, 0x0200000, CRC(85f31277) SHA1(277c28d44cabd9081a8151d6ec27d47b5606435a) ) // ic6 good | |
| 3347 | ROM_LOAD( "ic12", 0x1800000, 0x0400000, CRC(d5ebc84e) SHA1(f990b793cdfadbbac69c680191660f4a2f282ba2) ) // ic1 good | |
| 3348 | ROM_END | |
| 3349 | ||
| 3350 | ||
| 3309 | 3351 | ROM_START( sasissu ) |
| 3310 | 3352 | STV_BIOS |
| 3311 | 3353 | |
| r1386 | r1387 | |
| 3668 | 3710 | ROM_END |
| 3669 | 3711 | |
| 3670 | 3712 | |
| 3713 | ROM_START( magzun ) | |
| 3714 | STV_BIOS | |
| 3715 | ||
| 3716 | ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */ | |
| 3717 | ROM_LOAD( "flash.ic13", 0x0000000, 0x0100000, CRC(e6f0aca0) SHA1(251d4d9c5a332d13af3a144c5eb9d8e7836bdd1b) ) // good | |
| 3718 | ROM_RELOAD ( 0x0100000, 0x0100000 ) | |
| 3719 | ROM_RELOAD ( 0x0200000, 0x0100000 ) | |
| 3720 | ROM_RELOAD ( 0x0300000, 0x0100000 ) | |
| 3721 | ||
| 3722 | ROM_LOAD16_WORD_SWAP( "mpr-19354.ic2", 0x0400000, 0x0400000, CRC(a23822e7) SHA1(10ca5d39dcaaf35b80168a08d8a18d77fba1d2ce) ) // good | |
| 3723 | ROM_LOAD16_WORD_SWAP( "mpr-19355.ic3", 0x0800000, 0x0400000, CRC(d70e5ebc) SHA1(2d560f6b6e693b2b91cf5ff5c4f0890cc2176f91) ) // good | |
| 3724 | ROM_LOAD16_WORD_SWAP( "mpr-19356.ic4", 0x0c00000, 0x0400000, CRC(3bc43fe9) SHA1(f72b0f3208e2f411f4c9cc76c317a605acd32a67) ) // good | |
| 3725 | ROM_LOAD16_WORD_SWAP( "mpr-19357.ic5", 0x1000000, 0x0400000, CRC(aa749370) SHA1(f09b0aa94fcc983419aaf2465dae5c9c64606158) ) // good | |
| 3726 | ROM_LOAD16_WORD_SWAP( "mpr-19358.ic6", 0x1400000, 0x0400000, CRC(0969f1ec) SHA1(25b9671f0975172f283458d46e160080dd1d19e9) ) // good | |
| 3727 | ROM_LOAD16_WORD_SWAP( "mpr-19359.ic1", 0x1800000, 0x0400000, CRC(b0d06f9c) SHA1(19e04c9c3a0bea5950aba8e1975962fa37722f32) ) // good | |
| 3728 | ROM_END | |
| 3729 | ||
| 3730 | ||
| 3731 | ROM_START( stress ) | |
| 3732 | STV_BIOS | |
| 3733 | ||
| 3734 | ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */ | |
| 3735 | ROM_LOAD( "epr-21300a.ic13", 0x0000000, 0x0100000, CRC(899d829e) SHA1(b6c6da92dc108353998b29c0659d288645541519) ) // good | |
| 3736 | ROM_RELOAD ( 0x0100000, 0x0100000 ) | |
| 3737 | ROM_RELOAD ( 0x0200000, 0x0100000 ) | |
| 3738 | ROM_RELOAD ( 0x0300000, 0x0100000 ) | |
| 3739 | ROM_LOAD16_WORD_SWAP( "mpr-21290.ic2", 0x0400000, 0x0400000, CRC(a49d29f3) SHA1(8f6c26fd9e94a9e03dd0029026d205cf481fe151) ) // good | |
| 3740 | ROM_LOAD16_WORD_SWAP( "mpr-21291.ic3", 0x0800000, 0x0400000, CRC(9452ba20) SHA1(8a9ff546901715f99bb911616c74ae30ebd7c6d7) ) // good | |
| 3741 | ROM_LOAD16_WORD_SWAP( "mpr-21292.ic4", 0x0c00000, 0x0400000, CRC(f60268e2) SHA1(5c2febb94553a941a68e9611617750a89c82e783) ) // good | |
| 3742 | ROM_LOAD16_WORD_SWAP( "mpr-21293.ic5", 0x1000000, 0x0400000, CRC(794946e0) SHA1(7881adb92fbf3efecb88f30834cdd1ed863b0b0e) ) // good | |
| 3743 | ROM_LOAD16_WORD_SWAP( "mpr-21294.ic6", 0x1400000, 0x0400000, CRC(550843bb) SHA1(5e278a0ae60f7bee23b5f1ee10b8ce31effc9718) ) // good | |
| 3744 | ROM_LOAD16_WORD_SWAP( "mpr-21289.ic1", 0x1800000, 0x0400000, CRC(c2ee8bea) SHA1(5fa0e6b492cc272c33b01adbef9233e6c8098827) ) // good | |
| 3745 | ROM_LOAD16_WORD_SWAP( "mpr-21296.ic8", 0x1c00000, 0x0400000, CRC(b825c42a) SHA1(7c6f737b69b9283345f8fa23cb1d110b9b5f3d7e) ) // good | |
| 3746 | ROM_LOAD16_WORD_SWAP( "mpr-21297.ic9", 0x2000000, 0x0400000, CRC(4bff7469) SHA1(8a36405a1a292d60b5918e604b460ed98740fae3) ) // good | |
| 3747 | ROM_LOAD16_WORD_SWAP( "mpr-21298.ic10", 0x2400000, 0x0400000, CRC(68d07144) SHA1(5021f43d19105b484135ebddd3fa203233096c98) ) // good | |
| 3748 | ROM_LOAD16_WORD_SWAP( "mpr-21299.ic11", 0x2800000, 0x0400000, CRC(ecc521c6) SHA1(f7ed4dd1cbe179652fdfdde34929b41a1fdcf9e2) ) // good | |
| 3749 | ROM_END | |
| 3750 | ||
| 3671 | 3751 | /* |
| 3672 | 3752 | country codes: |
| 3673 | 3753 | J = Japan |
| r1386 | r1387 | |
| 3689 | 3769 | by Sega titles,and this is a Sunsoft game)It's likely to be a left-over... |
| 3690 | 3770 | */ |
| 3691 | 3771 | |
| 3772 | DRIVER_INIT( sanjeon ) | |
| 3773 | { | |
| 3774 | UINT8 *src = memory_region ( REGION_USER1 ); | |
| 3775 | int x; | |
| 3776 | ||
| 3777 | for (x=0;x<0x3000000;x++) | |
| 3778 | { | |
| 3779 | src[x] = src[x]^0xff; | |
| 3780 | ||
| 3781 | src[x] = BITSWAP8(src[x],7,2,5,1, 3,6,4,0); | |
| 3782 | src[x] = BITSWAP8(src[x],4,6,5,7, 3,2,1,0); | |
| 3783 | src[x] = BITSWAP8(src[x],7,6,5,4, 2,3,1,0); | |
| 3784 | src[x] = BITSWAP8(src[x],7,0,5,4, 3,2,1,6); | |
| 3785 | src[x] = BITSWAP8(src[x],3,6,5,4, 7,2,1,0); | |
| 3786 | ||
| 3787 | } | |
| 3788 | ||
| 3789 | ||
| 3790 | driver_init_sasissu(Machine); | |
| 3791 | } | |
| 3792 | ||
| 3692 | 3793 | GAME( 1996, stvbios, 0, stv, stv, stv, ROT0, "Sega", "ST-V Bios", GAME_IS_BIOS_ROOT ) |
| 3693 | 3794 | |
| 3694 | 3795 | //GBX YEAR, NAME, PARENT, BIOS, MACH,INP, INIT, MONITOR |
| 3695 | 3796 | /* Playable */ |
| 3696 | GAME( 1998, astrass, stvbios, stv, stv, astrass, ROT0, "Sunsoft", | |
| 3797 | GAME( 1998, astrass, stvbios, stv, stv, astrass, ROT0, "Sunsoft", | |
| 3697 | 3798 | GAME( 1995, bakubaku, stvbios, stv, stv, bakubaku, ROT0, "Sega", "Baku Baku Animal (J 950407 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3698 | GAME( 1996, batmanfr, stvbios, stv, stv, batmanfr, ROT0, "Acclaim", | |
| 3799 | GAME( 1996, batmanfr, stvbios, stv, stv, batmanfr, ROT0, "Acclaim", | |
| 3699 | 3800 | GAME( 1996, colmns97, stvbios, stv, stv, colmns97, ROT0, "Sega", "Columns '97 (JET 961209 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3700 | 3801 | GAME( 1997, cotton2, stvbios, stv, stv, cotton2, ROT0, "Success", "Cotton 2 (JUET 970902 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3701 | 3802 | GAME( 1998, cottonbm, stvbios, stv, stv, cottonbm, ROT0, "Success", "Cotton Boomerang (JUET 980709 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3702 | GAME( 1995, critcrsh, stvbios, stv, critcrsh, ic13, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3703 | GAME( 1999, danchih, stvbios, stv, stvmp,danchih, ROT0, "Altron (Tecmo license)", "Danchi de Hanafuda (J 990607 V1.400)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3803 | GAME( 1995, critcrsh, stvbios, stv, critcrsh, ic13, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3804 | GAME( 1999, danchih, stvbios, stv, stvmp,danchih, ROT0, "Altron (Tecmo license)", "Danchi de Hanafuda (J 990607 V1.400)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3704 | 3805 | GAME( 1996, diehard, stvbios, stv, stv, diehard, ROT0, "Sega", "Die Hard Arcade (UET 960515 V1.000)", GAME_IMPERFECT_SOUND ) |
| 3705 | 3806 | GAME( 1996, dnmtdeka, diehard, stv, stv, dnmtdeka, ROT0, "Sega", "Dynamite Deka (J 960515 V1.000)", GAME_IMPERFECT_SOUND ) |
| 3706 | 3807 | GAME( 1995, ejihon, stvbios, stv, stv, ic13, ROT0, "Sega", "Ejihon Tantei Jimusyo (J 950613 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3707 | 3808 | GAME( 1995, fhboxers, stvbios, stv, stv, fhboxers, ROT0, "Sega", "Funky Head Boxers (JUETBKAL 951218 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3708 | GAME( 1994, gaxeduel, stvbios, stv, stv, gaxeduel, | |
| 3809 | GAME( 1994, gaxeduel, stvbios, stv, stv, gaxeduel, ROT0, "Sega", "Golden Axe - The Duel (JUETL 950117 V1.000)", GAME_IMPERFECT_SOUND ) | |
| 3709 | 3810 | GAME( 1998, grdforce, stvbios, stv, stv, grdforce, ROT0, "Success", "Guardian Force (JUET 980318 V0.105)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3710 | 3811 | GAME( 1998, groovef, stvbios, stv, stv, groovef, ROT0, "Atlus", "Power Instinct 3 - Groove On Fight (J 970416 V1.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3711 | 3812 | GAME( 1997, hanagumi, stvbios, stv, stv, hanagumi, ROT0, "Sega", "Hanagumi Taisen Columns - Sakura Wars (J 971007 V1.010)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 3712 | GAME( 1996, introdon, stvbios, stv, stv, ic13, | |
| 3813 | GAME( 1996, introdon, stvbios, stv, stv, ic13, ROT0, "Sunsoft / Success", "Karaoke Quiz Intro Don Don! (J 960213 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3713 | 3814 | GAME( 1995, kiwames, stvbios, stv, stvmp,ic13, ROT0, "Athena", "Pro Mahjong Kiwame S (J 951020 V1.208)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3714 | 3815 | GAME( 1997, maruchan, stvbios, stv, stv, maruchan, ROT0, "Sega / Toyosuisan", "Maru-Chan de Goo! (J 971216 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3715 | 3816 | GAME( 1996, mausuke, stvbios, stv, stv, mausuke, ROT0, "Data East", "Mausuke no Ojama the World (J 960314 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3716 | 3817 | GAME( 1998, othellos, stvbios, stv, stv, othellos, ROT0, "Success", "Othello Shiyouyo (J 980423 V1.002)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3717 | GAME( 1995, pblbeach, stvbios, stv, stv, pblbeach, ROT0, "T&E Soft", | |
| 3818 | GAME( 1995, pblbeach, stvbios, stv, stv, pblbeach, ROT0, "T&E Soft", "Pebble Beach - The Great Shot (JUE 950913 V0.990)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3718 | 3819 | GAME( 1996, prikura, stvbios, stv, stv, prikura, ROT0, "Atlus", "Princess Clara Daisakusen (J 960910 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3719 | 3820 | GAME( 1996, puyosun, stvbios, stv, stv, puyosun, ROT0, "Compile", "Puyo Puyo Sun (J 961115 V0.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3720 | GAME( 1998, rsgun, stvbios, stv, stv, rsgun, ROT0, "Treasure", | |
| 3821 | GAME( 1998, rsgun, stvbios, stv, stv, rsgun, ROT0, "Treasure", | |
| 3721 | 3822 | GAME( 1998, sasissu, stvbios, stv, stv, sasissu, ROT0, "Sega", "Taisen Tanto-R Sashissu!! (J 980216 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3823 | GAME( 1999, sanjeon, sasissu, stv, stv, sanjeon, ROT0, "Sega / Deniam", "DaeJeon! SanJeon SuJeon (Korea)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3722 | 3824 | GAME( 1997, seabass, stvbios, stv, stv, seabass, ROT0, "A wave inc. (Able license)","Sea Bass Fishing (JUET 971110 V0.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3723 | GAME( 1995, shanhigw, stvbios, stv, stv, shanhigw, | |
| 3825 | GAME( 1995, shanhigw, stvbios, stv, stv, shanhigw, ROT0, "Sunsoft / Activision", "Shanghai - The Great Wall / Shanghai Triple Threat (JUE 950623 V1.005)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3724 | 3826 | GAME( 1997, shienryu, stvbios, stv, stv, shienryu, ROT270, "Warashi", "Shienryu (JUET 961226 V1.000)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 3725 | 3827 | GAME( 1995, smleague, stvbios, stv, stv, smleague, ROT0, "Sega", "Super Major League (U 960108 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3726 | GAME( 1995, finlarch, smleague, | |
| 3828 | GAME( 1995, finlarch, smleague, | |
| 3727 | 3829 | GAME( 1998, sss, stvbios, stv, stv, sss, ROT0, "Capcom / Cave / Victor", "Steep Slope Sliders (JUET 981110 V1.000)", GAME_IMPERFECT_SOUND ) |
| 3728 | 3830 | GAME( 1995, sandor, stvbios, stv, stv, sandor, ROT0, "Sega", "Puzzle & Action: Sando-R (J 951114 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3831 | GAME( 1997, thunt, sandor, stv, stv, thunt, ROT0, "Sega", "Puzzle & Action: Treasure Hunt (JUET 970901 V2.00E)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3832 | GAME( 1997, thuntk, sandor, stv, stv, sandor, ROT0, "Sega / Deniam", "Puzzle & Action: BoMulEul Chajara (Korea)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3729 | 3833 | GAME( 1996, sokyugrt, stvbios, stv, stv, sokyugrt, ROT0, "Raizing / 8ing", "Soukyugurentai / Terra Diver (JUET 960821 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3730 | GAME( 1995, suikoenb, stvbios, stv, stv, suikoenb, ROT0, "Data East", "Suikoenbu / Outlaws of the Lost Dynasty (JUETL 950314 V2.001)", GAME_IMPERFECT_SOUND ) | |
| 3731 | GAME( 1997, thunt, sandor, stv, stv, thunt, ROT0, "Sega", "Puzzle & Action: Treasure Hunt (JUET 970901 V2.00E)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3834 | GAME( 1995, suikoenb, stvbios, stv, stv, suikoenb, ROT0, "Data East", "Suikoenbu / Outlaws of the Lost Dynasty (JUETL 950314 V2.001)", GAME_IMPERFECT_SOUND ) | |
| 3732 | 3835 | GAME( 1996, vfkids, stvbios, stv, stv, ic13, ROT0, "Sega", "Virtua Fighter Kids (JUET 960319 V0.000)", GAME_IMPERFECT_SOUND ) |
| 3733 | 3836 | GAME( 1997, winterht, stvbios, stv, stv, winterht, ROT0, "Sega", "Winter Heat (JUET 971012 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3734 | 3837 | GAME( 1997, znpwfv, stvbios, stv, stv, znpwfv, ROT0, "Sega", "Zen Nippon Pro-Wrestling Featuring Virtua (J 971123 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3735 | 3838 | |
| 3736 | 3839 | /* Almost */ |
| 3737 | GAME( 1997, vmahjong, stvbios, stv, stvmp,stv, ROT0, "Micronet", "Virtual Mahjong (J 961214 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3738 | GAME( 1998, myfairld, stvbios, stv, stvmp,stv, ROT0, "Micronet", "Virtual Mahjong 2 - My Fair Lady (J 980608 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) | |
| 3739 | GAME( 1998, twcup98, stvbios, stv, stv, twcup98, ROT0, "Tecmo", "Tecmo World Cup '98 (JUET 980410 V1.000)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // player movement | |
| 3840 | GAME( 1997, vmahjong, stvbios, stv, stvmp,stv, ROT0, "Micronet", "Virtual Mahjong (J 961214 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3841 | GAME( 1998, myfairld, stvbios, stv, stvmp,stv, ROT0, "Micronet", "Virtual Mahjong 2 - My Fair Lady (J 980608 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) | |
| 3842 | GAME( 1998, twcup98, stvbios, stv, stv, twcup98, ROT0, "Tecmo", "Tecmo World Cup '98 (JUET 980410 V1.000)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // player movement | |
| 3843 | GAME( 1997, stress, stvbios, stv, stv, ic13, ROT0, "Sega", "Stress Busters", GAME_NOT_WORKING ) // needs printer | |
| 3740 | 3844 | |
| 3741 | 3845 | /* Doing Something.. but not enough yet */ |
| 3742 | 3846 | GAME( 1998, elandore, stvbios, stv, stv, elandore, ROT0, "Sai-Mate", "Elan Doree - Legend of Dragon (JUET 980922 V1.006)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )//japanese name? |
| r1386 | r1387 | |
| 3749 | 3853 | /* CD games */ |
| 3750 | 3854 | GAME( 1995, sfish2, 0, stv, stv, ic13, ROT0, "Sega", "Sport Fishing 2 (UET 951106 V1.10e)", GAME_NO_SOUND | GAME_NOT_WORKING ) |
| 3751 | 3855 | GAME( 1995, sfish2j, sfish2, stv, stv, ic13, ROT0, "Sega", "Sport Fishing 2 (J 951201 V1.100)", GAME_NO_SOUND | GAME_NOT_WORKING ) |
| 3856 | GAME( 1997, magzun, stvbios, stv, stv, ic13, ROT0, "Sega", "Magical Zunou Power", GAME_NOT_WORKING ) | |
| 3752 | 3857 | |
| 3753 | 3858 | /* |
| 3754 | 3859 | This is the known list of undumped ST-V games: |
| r1386 | r1387 | |
|---|---|---|
| 68 | 68 | Ghouls & Ghosts 171-5869A - 610-0239-23 MPR-12605 (40 pins) MPR-12606 (40 pins) EPR-12368-23 (27256) |
| 69 | 69 | Super Hang On 171-5782 837-6963-24 610-0239-24 MPR-12640 (234000) EPR-12368-24 (27256) n/a |
| 70 | 70 | Forgotten Worlds 171-5782 837-6963-26 610-0239-26 MPR-12672-H (Mask) EPR-12368-26 (27256) n/a |
| 71 | Arnold Palmer Tour Golf 171-5782 837-6963-31 610-0239-31 MPR-12645F (23C4000) EPR-12368-31 (27256) n/a | |
| 71 | 72 | Super Real Basket Ball 171-5782 837-6963-32 610-0239-32 MPR-12904F (838200A) EPR-12368-32 (27256) n/a |
| 73 | Wrestle War 171-5782 837-6963-48 610-0239-48 MPR-14025-F (23C4000) EPR-12368-48 (27256) n/a | |
| 74 | Bonanza Bros. 171-5782 837-6963-49 610-0239-49 MPR-13905A-F (23C4000) EPR-12368-49 (27256) n/a | |
| 75 | Mario Lemeux Hockey 171-5782 837-6963-59 610-0239-59 MPR-14376-H (234000) EPR-12368-59 (27256) n/a | |
| 72 | 76 | Sonic Hedgehog 2 171-6215A 837-6963-62 610-0239-62 MPR-15000A-F (838200) EPR-12368-62 (27256) n/a |
| 73 | Mario Lemeux Hockey 171-5782 837-6963-59 610-0239-59 MPR-14376-H (234000) EPR-12368-59 (27256) n/a | |
| 74 | 77 | |
| 75 | 78 | |
| 76 | 79 | */ |
| r1386 | r1387 | |
| 878 | 881 | MEGATECH_GAME49(REGION_USER1, REGION_USER2) |
| 879 | 882 | ROM_END |
| 880 | 883 | |
| 884 | /* Game 48 - Wrestle War */ | |
| 885 | ||
| 886 | #define MEGATECH_GAME48(GAME_REGION, INSTRUCTION_REGION) \ | |
| 887 | ROM_REGION16_BE( 0x300000, GAME_REGION, 0 ) \ | |
| 888 | ROM_LOAD16_WORD_SWAP( "mpr-14025-f.ic1", 0x000000, 0x080000, CRC(26e899fe) SHA1(6d28e154ae2e4196097a2aa96c5acd5dfe7e3d2b) ) \ | |
| 889 | MEGATECH_INSTRUCTION_REGION( INSTRUCTION_REGION, MEGATECH_GAME_IS_GEN ) \ | |
| 890 | ROM_LOAD( "12368-48.ic2", 0x000000, 0x08000, CRC(25817bc2) SHA1(ba1bbb952aff12fb4d3ecfb10d82c54128439395) ) \ | |
| 891 | ||
| 892 | ROM_START( mt_wwar ) /* Wrestle War */ | |
| 893 | MEGATECH_BIOS | |
| 894 | MEGATECH_GAME48(REGION_USER1, REGION_USER2) | |
| 895 | ROM_END | |
| 896 | ||
| 881 | 897 | /* Game 62 - Sonic 2 */ |
| 882 | 898 | |
| 883 | 899 | #define MEGATECH_GAME62(GAME_REGION, INSTRUCTION_REGION) \ |
| r1386 | r1387 | |
| 1293 | 1309 | /* 45 */ // unknown |
| 1294 | 1310 | /* 46 */ // unknown |
| 1295 | 1311 | /* 47 */ GAME( 1990, mt_astrm, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Alien Storm (Mega-Tech", GAME_NOT_WORKING ) |
| 1296 | /* 48 */ | |
| 1312 | /* 48 */ GAME( 1991, mt_wwar, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Wrestle War (Mega-Tech)", GAME_NOT_WORKING ) /* Copyright 1989, 1991 Sega */ | |
| 1297 | 1313 | /* 49 */ GAME( 1991, mt_bbros, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Bonanza Bros. (Mega-Tech)", GAME_NOT_WORKING ) |
| 1298 | 1314 | /* 50 */ // unknown |
| 1299 | 1315 | /* 51 */ // unknown |
| r1386 | r1387 | |
| 1309 | 1325 | /* 60 */ GAME( 1992, mt_kcham, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Kid Chameleon (Mega-Tech)", GAME_NOT_WORKING ) |
| 1310 | 1326 | /* 61 */ // unknown |
| 1311 | 1327 | /* 62 */ GAME( 1992, mt_soni2, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Sonic The Hedgehog 2 (Mega-Tech)", GAME_NOT_WORKING ) |
| 1312 | /* | |
| 1313 | Known to Exist, but nn number currently not known: | |
| 1314 | Wrestle War | |
| 1315 | */ | |
| 1328 | ||
| 1316 | 1329 | /* more? */ |
| 1317 | 1330 | |
| 1318 | 1331 | /* Compilations to test multi-game support */ |
| r1386 | r1387 | |
|---|---|---|
| 513 | 513 | GFXDECODE_END |
| 514 | 514 | |
| 515 | 515 | |
| 516 | static UINT8 suplup_default_nvram[128] = { | |
| 516 | static const UINT8 suplup_default_nvram[128] = { | |
| 517 | 517 | 0xE8, 0xFE, 0xFF, 0xFF, 0x10, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x96, 0x2D, 0xB4, 0x80, 0x00, |
| 518 | 518 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| 519 | 519 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| r1386 | r1387 | |
| 524 | 524 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xAA |
| 525 | 525 | }; |
| 526 | 526 | |
| 527 | static UINT8 misncrft_default_nvram[128] = { | |
| 527 | static const UINT8 misncrft_default_nvram[128] = { | |
| 528 | 528 | 0x67, 0xBE, 0x00, 0x01, 0x80, 0xFE, 0x04, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 529 | 529 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 530 | 530 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
| r1386 | r1387 | |
|---|---|---|
| 265 | 265 | static DRIVER_INIT( vegaeo ) |
| 266 | 266 | { |
| 267 | 267 | init_eolith_speedup(machine); |
| 268 | ||
| 269 | at28c16_init( 0, NULL, NULL ); | |
| 268 | 270 | } |
| 269 | 271 | |
| 270 | 272 | GAME( 2002, crazywar, 0, vega, crazywar, vegaeo, ROT0, "Eolith", "Crazy War", GAME_NO_SOUND ) |
| r1386 | r1387 | |
|---|---|---|
| 408 | 408 | }; |
| 409 | 409 | |
| 410 | 410 | |
| 411 | static const char *sample_names[] = | |
| 411 | static const char *const sample_names[] = | |
| 412 | 412 | { |
| 413 | 413 | "*gridlee", |
| 414 | 414 | "bounce1.wav", |
| r1386 | r1387 | |
| 416 | 416 | 0 /* end of array */ |
| 417 | 417 | }; |
| 418 | 418 | |
| 419 | static struct Samplesinterface samples_interface = | |
| 419 | static const struct Samplesinterface samples_interface = | |
| 420 | 420 | { |
| 421 | 421 | 8, /* 8 channels */ |
| 422 | 422 | sample_names |
| r1386 | r1387 | |
|---|---|---|
| 817 | 817 | REGION_SOUND1 /* memory region */ |
| 818 | 818 | }; |
| 819 | 819 | |
| 820 | static const char *rallyx_sample_names[] = | |
| 820 | static const char *const rallyx_sample_names[] = | |
| 821 | 821 | { |
| 822 | 822 | "*rallyx", |
| 823 | 823 | "bang.wav", |
| 824 | 824 | 0 /* end of array */ |
| 825 | 825 | }; |
| 826 | 826 | |
| 827 | static struct Samplesinterface samples_interface = | |
| 827 | static const struct Samplesinterface samples_interface = | |
| 828 | 828 | { |
| 829 | 829 | 1, /* 1 channel */ |
| 830 | 830 | rallyx_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 642 | 642 | } |
| 643 | 643 | |
| 644 | 644 | |
| 645 | static struct EEPROM_interface zeropnt2_eeprom_interface = | |
| 645 | static const struct EEPROM_interface zeropnt2_eeprom_interface = | |
| 646 | 646 | { |
| 647 | 647 | 7, // address bits 7 |
| 648 | 648 | 8, // data bits 8 |
| r1386 | r1387 | |
|---|---|---|
| 812 | 812 | * |
| 813 | 813 | *************************************/ |
| 814 | 814 | |
| 815 | static const char *elim_sample_names[] = | |
| 815 | static const char *const elim_sample_names[] = | |
| 816 | 816 | { |
| 817 | 817 | "*elim2", |
| 818 | 818 | "elim1.wav", |
| r1386 | r1387 | |
| 830 | 830 | 0 /* end of array */ |
| 831 | 831 | }; |
| 832 | 832 | |
| 833 | static struct Samplesinterface elim2_samples_interface = | |
| 833 | static const struct Samplesinterface elim2_samples_interface = | |
| 834 | 834 | { |
| 835 | 835 | 8, /* 8 channels */ |
| 836 | 836 | elim_sample_names |
| r1386 | r1387 | |
| 844 | 844 | * |
| 845 | 845 | *************************************/ |
| 846 | 846 | |
| 847 | static const char *spacfury_sample_names[] = | |
| 847 | static const char *const spacfury_sample_names[] = | |
| 848 | 848 | { |
| 849 | 849 | "*spacfury", |
| 850 | 850 | /* Sound samples */ |
| r1386 | r1387 | |
| 862 | 862 | }; |
| 863 | 863 | |
| 864 | 864 | |
| 865 | static struct Samplesinterface spacfury_samples_interface = | |
| 865 | static const struct Samplesinterface spacfury_samples_interface = | |
| 866 | 866 | { |
| 867 | 867 | 8, /* 8 channels */ |
| 868 | 868 | spacfury_sample_names |
| r1386 | r1387 | |
| 875 | 875 | * |
| 876 | 876 | *************************************/ |
| 877 | 877 | |
| 878 | static const char *zektor_sample_names[] = | |
| 878 | static const char *const zektor_sample_names[] = | |
| 879 | 879 | { |
| 880 | 880 | "*zektor", |
| 881 | 881 | "elim1.wav", /* 0 fireball */ |
| r1386 | r1387 | |
| 893 | 893 | }; |
| 894 | 894 | |
| 895 | 895 | |
| 896 | static struct Samplesinterface zektor_samples_interface = | |
| 896 | static const struct Samplesinterface zektor_samples_interface = | |
| 897 | 897 | { |
| 898 | 898 | 8, |
| 899 | 899 | zektor_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 374 | 374 | f3_68681_reset(); |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | static struct EEPROM_interface superchs_eeprom_interface = | |
| 377 | static const struct EEPROM_interface superchs_eeprom_interface = | |
| 378 | 378 | { |
| 379 | 379 | 6, /* address bits */ |
| 380 | 380 | 16, /* data bits */ |
| r1386 | r1387 | |
| 385 | 385 | "0100110000", /* lock command */ |
| 386 | 386 | }; |
| 387 | 387 | |
| 388 | static UINT8 default_eeprom[128]={ | |
| 388 | static const UINT8 default_eeprom[128]={ | |
| 389 | 389 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, |
| 390 | 390 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x53,0x00,0x2e,0x00,0x43,0x00,0x00, |
| 391 | 391 | 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0xff,0xff,0xff,0xff,0x00,0x01, |
| r1386 | r1387 | |
|---|---|---|
| 1189 | 1189 | * |
| 1190 | 1190 | *************************************/ |
| 1191 | 1191 | |
| 1192 | static const char *seawolf_sample_names[] = | |
| 1192 | static const char *const seawolf_sample_names[] = | |
| 1193 | 1193 | { |
| 1194 | 1194 | "*seawolf", |
| 1195 | 1195 | "shiphit.wav", |
| r1386 | r1387 | |
| 1200 | 1200 | 0 |
| 1201 | 1201 | }; |
| 1202 | 1202 | |
| 1203 | static struct Samplesinterface seawolf2_samples_interface = | |
| 1203 | static const struct Samplesinterface seawolf2_samples_interface = | |
| 1204 | 1204 | { |
| 1205 | 1205 | 10, /* 5*2 channels */ |
| 1206 | 1206 | seawolf_sample_names |
| 1207 | 1207 | }; |
| 1208 | 1208 | |
| 1209 | static struct Samplesinterface wow_samples_interface = | |
| 1209 | static const struct Samplesinterface wow_samples_interface = | |
| 1210 | 1210 | { |
| 1211 | 1211 | 1, |
| 1212 | 1212 | wow_sample_names |
| 1213 | 1213 | }; |
| 1214 | 1214 | |
| 1215 | static struct Samplesinterface gorf_samples_interface = | |
| 1215 | static const struct Samplesinterface gorf_samples_interface = | |
| 1216 | 1216 | { |
| 1217 | 1217 | 1, |
| 1218 | 1218 | gorf_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 1599 | 1599 | .25 /* Combined gain of both filters */ |
| 1600 | 1600 | }; |
| 1601 | 1601 | |
| 1602 | static const char *battles_sample_names[] = | |
| 1602 | static const char *const battles_sample_names[] = | |
| 1603 | 1603 | { |
| 1604 | 1604 | "*battles", |
| 1605 | 1605 | "explo1.wav", /* ground target explosion */ |
| r1386 | r1387 | |
| 1607 | 1607 | 0 /* end of array */ |
| 1608 | 1608 | }; |
| 1609 | 1609 | |
| 1610 | static struct Samplesinterface battles_samples_interface = | |
| 1610 | static const struct Samplesinterface battles_samples_interface = | |
| 1611 | 1611 | { |
| 1612 | 1612 | 1, /* one channel */ |
| 1613 | 1613 | battles_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 316 | 316 | bits are different. |
| 317 | 317 | ******************************************************************/ |
| 318 | 318 | |
| 319 | static UINT8 default_eeprom[128]= | |
| 319 | static const UINT8 default_eeprom[128]= | |
| 320 | 320 | { |
| 321 | 321 | 0x00,0x00,0x00,0xff,0x00,0x01,0x41,0x41,0x00,0x00,0x00,0xff,0x00,0x00,0xf0,0xf0, |
| 322 | 322 | 0x00,0x00,0x00,0xff,0x00,0x01,0x41,0x41,0x00,0x00,0x00,0xff,0x00,0x00,0xf0,0xf0, |
| r1386 | r1387 | |
| 328 | 328 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
| 329 | 329 | }; |
| 330 | 330 | |
| 331 | static struct EEPROM_interface eeprom_interface = | |
| 331 | static const struct EEPROM_interface eeprom_interface = | |
| 332 | 332 | { |
| 333 | 333 | 6, /* address bits */ |
| 334 | 334 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 160 | 160 | GFXDECODE_ENTRY( REGION_GFX1, 0, layout_16x16x8, 0x000, 0x80 ) // 8bpp tiles |
| 161 | 161 | GFXDECODE_END |
| 162 | 162 | |
| 163 | static struct EEPROM_interface eeprom_interface_93C56 = | |
| 163 | static const struct EEPROM_interface eeprom_interface_93C56 = | |
| 164 | 164 | { |
| 165 | 165 | 8, // address bits 8 |
| 166 | 166 | 8, // data bits 8 |
| r1386 | r1387 | |
|---|---|---|
| 1226 | 1226 | ROM_LOAD( "lover.s0", 0x0000, 0x1000, CRC(ec38111c) SHA1(09efded9e905658bdbcde4ad4f0b4cb9585bdb33) ) |
| 1227 | 1227 | |
| 1228 | 1228 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) /* gfx - 8x8x3bpp */ |
| 1229 | ROM_LOAD( "lover.p | |
| 1229 | ROM_LOAD( "lover.p3", 0x0000, 0x2000, CRC(1 | |
| 1230 | 1230 | ROM_LOAD( "lover.p2", 0x2000, 0x2000, CRC(e465372f) SHA1(345b769ebc33f60daa9692b64e8ef43062552a33) ) |
| 1231 | ROM_LOAD( "lover.p | |
| 1231 | ROM_LOAD( "lover.p1", 0x4000, 0x2000, CRC( | |
| 1232 | 1232 | |
| 1233 | ROM_REGION( 0x100, REGION_PROMS, 0 ) /* colours - not from this board, from joinem */ | |
| 1234 | ROM_LOAD_NIB_LOW( "l82s129.11n", 0x0000, 0x100, BAD_DUMP CRC(7b724211) SHA1(7396c773e8d48dea856d9482d6c48de966616c83) ) | |
| 1235 | ROM_LOAD_NIB_HIGH( "h82s129.12n", 0x0000, 0x100, BAD_DUMP CRC(2e81c5ff) SHA1(e103c8813af704d5de11fe705de5105ff3a691c3) ) | |
| 1233 | ROM_REGION( 0x200, REGION_PROMS, 0 ) | |
| 1234 | ROM_LOAD_NIB_LOW( "color.n11", 0x0000, 0x200, CRC(cf4a16ae) SHA1(e17c5dfd73c5bc55c0a929cf65ee5b516c9776a5) ) | |
| 1235 | ROM_LOAD_NIB_HIGH( "color.n12", 0x0000, 0x200, CRC(4b11ac21) SHA1(d9e7cecfb7237335288ab6f94bb35696d8291bdf) ) | |
| 1236 | 1236 | ROM_END |
| 1237 | 1237 | |
| 1238 | 1238 |
| r1386 | r1387 | |
|---|---|---|
| 575 | 575 | }; |
| 576 | 576 | |
| 577 | 577 | |
| 578 | static struct SN76477interface sn76477_interface = | |
| 578 | static const struct SN76477interface sn76477_interface = | |
| 579 | 579 | { |
| 580 | 580 | RES_K(47), /* 4 noise_res */ |
| 581 | 581 | RES_K(150), /* 5 filter_res */ |
| r1386 | r1387 | |
|---|---|---|
| 113 | 113 | |
| 114 | 114 | |
| 115 | 115 | /* Polyplay Sound Interface */ |
| 116 | static struct Samplesinterface polyplay_samples_interface = | |
| 116 | static const struct Samplesinterface polyplay_samples_interface = | |
| 117 | 117 | { |
| 118 | 118 | 2, |
| 119 | 119 | NULL, |
| r1386 | r1387 | |
|---|---|---|
| 808 | 808 | coin_counter_w(0,data & 0x80); |
| 809 | 809 | coin_counter_w(1,data & 0x40); |
| 810 | 810 | } |
| 811 | static ppi8255_interface tx1_ppi8255_intf = | |
| 811 | static const ppi8255_interface tx1_ppi8255_intf = | |
| 812 | 812 | { |
| 813 | 813 | 1, |
| 814 | 814 | { input_port_2_r }, /* Accelerator and brake */ |
| r1386 | r1387 | |
| 821 | 821 | |
| 822 | 822 | |
| 823 | 823 | /* Buggy Boy (3-monitor) uses a 8255 instead of the YM2149 ports for inputs */ |
| 824 | static ppi8255_interface buggyboy_ppi8255_intf = | |
| 824 | static const ppi8255_interface buggyboy_ppi8255_intf = | |
| 825 | 825 | { |
| 826 | 826 | 1, |
| 827 | 827 | { input_port_2_r }, |
| r1386 | r1387 | |
|---|---|---|
| 769 | 769 | GFXDECODE_ENTRY( REGION_GFX2, 8, tiles8x8x1_layout, 0, 128 ) // flipped tiles |
| 770 | 770 | GFXDECODE_END |
| 771 | 771 | |
| 772 | static ppi8255_interface ppi8255_intf = | |
| 772 | static const ppi8255_interface ppi8255_intf = | |
| 773 | 773 | { |
| 774 | 774 | 2, /* 2 chips */ |
| 775 | 775 | { input_port_0_r, input_port_3_r }, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 146 | 146 | GFXDECODE_END |
| 147 | 147 | |
| 148 | 148 | |
| 149 | static const char *sample_names[] = | |
| 149 | static const char *const sample_names[] = | |
| 150 | 150 | { // Address triggered at |
| 151 | 151 | "*thehand", |
| 152 | 152 | "01.wav", /* game start tune */ // 075f |
| r1386 | r1387 | |
| 182 | 182 | 0 |
| 183 | 183 | }; |
| 184 | 184 | |
| 185 | static struct Samplesinterface samples_interface = | |
| 185 | static const struct Samplesinterface samples_interface = | |
| 186 | 186 | { |
| 187 | 187 | 4, /* 4 channels */ |
| 188 | 188 | sample_names |
| r1386 | r1387 | |
|---|---|---|
| 167 | 167 | * |
| 168 | 168 | *************************************/ |
| 169 | 169 | |
| 170 | static struct SN76477interface sn76477_interface = | |
| 170 | static const struct SN76477interface sn76477_interface = | |
| 171 | 171 | { |
| 172 | 172 | RES_K(47), /* 4 noise_res */ |
| 173 | 173 | // RES_K(120), /* 5 filter_res */ |
| r1386 | r1387 | |
|---|---|---|
| 578 | 578 | * |
| 579 | 579 | *************************************/ |
| 580 | 580 | |
| 581 | static struct Samplesinterface meadows_samples_interface = | |
| 581 | static const struct Samplesinterface meadows_samples_interface = | |
| 582 | 582 | { |
| 583 | 583 | 2, |
| 584 | 584 | NULL, |
| 585 | 585 | meadows_sh_start |
| 586 | 586 | }; |
| 587 | 587 | |
| 588 | static const char *bowl3d_sample_names[] = | |
| 588 | static const char *const bowl3d_sample_names[] = | |
| 589 | 589 | { |
| 590 | 590 | "*bowl3d", |
| 591 | 591 | "roll.wav", /* "roll" */ |
| r1386 | r1387 | |
| 597 | 597 | 0 /* end of array */ |
| 598 | 598 | }; |
| 599 | 599 | |
| 600 | static struct Samplesinterface bowl3d_samples_interface = | |
| 600 | static const struct Samplesinterface bowl3d_samples_interface = | |
| 601 | 601 | { |
| 602 | 602 | 1, /* one channel */ |
| 603 | 603 | bowl3d_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 234 | 234 | #define CRC_LEN 18 |
| 235 | 235 | |
| 236 | 236 | /* Battle Chopper / Mr. Heli */ |
| 237 | static UINT8 bchopper_code[CODE_LEN] = | |
| 237 | static const UINT8 bchopper_code[CODE_LEN] = | |
| 238 | 238 | { |
| 239 | 239 | 0x68,0x00,0xa0, // push 0a000h |
| 240 | 240 | 0x1f, // pop ds |
| r1386 | r1387 | |
| 258 | 258 | 0xc6,0x06,0x70,0x16,0x77, // mov [1670h], byte 077h |
| 259 | 259 | 0xea,0x68,0x01,0x40,0x00 // jmp 0040:$0168 |
| 260 | 260 | }; |
| 261 | static UINT8 bchopper_crc[CRC_LEN] = { 0x1a,0x12,0x5c,0x08, 0x84,0xb6,0x73,0xd1, | |
| 261 | static const UINT8 bchopper_crc[CRC_LEN] = { 0x1a,0x12,0x5c,0x08, 0x84,0xb6,0x73,0xd1, | |
| 262 | 262 | 0x54,0x91,0x94,0xeb, 0x00,0x00 }; |
| 263 | static UINT8 mrheli_crc[CRC_LEN] = { 0x24,0x21,0x1f,0x14, 0xf9,0x28,0xfb,0x47, | |
| 263 | static const UINT8 mrheli_crc[CRC_LEN] = { 0x24,0x21,0x1f,0x14, 0xf9,0x28,0xfb,0x47, | |
| 264 | 264 | 0x4c,0x77,0x9e,0xc2, 0x00,0x00 }; |
| 265 | 265 | |
| 266 | 266 | /* Ninja Spirit */ |
| 267 | static UINT8 nspirit_code[CODE_LEN] = | |
| 267 | static const UINT8 nspirit_code[CODE_LEN] = | |
| 268 | 268 | { |
| 269 | 269 | 0x68,0x00,0xa0, // push 0a000h |
| 270 | 270 | 0x1f, // pop ds |
| r1386 | r1387 | |
| 288 | 288 | 0xc6,0x06,0x71,0x16,0x00, // mov [1671h], byte 000h |
| 289 | 289 | 0xea,0x00,0x00,0x40,0x00 // jmp 0040:$0000 |
| 290 | 290 | }; |
| 291 | static UINT8 nspirit_crc[CRC_LEN] = { 0xfe,0x94,0x6e,0x4e, 0xc8,0x33,0xa7,0x2d, | |
| 291 | static const UINT8 nspirit_crc[CRC_LEN] = { 0xfe,0x94,0x6e,0x4e, 0xc8,0x33,0xa7,0x2d, | |
| 292 | 292 | 0xf2,0xa3,0xf9,0xe1, 0xa9,0x6c,0x02,0x95, 0x00,0x00 }; |
| 293 | static UINT8 nspiritj_crc[CRC_LEN] = { 0x26,0xa3,0xa5,0xe9, 0xc8,0x33,0xa7,0x2d, | |
| 293 | static const UINT8 nspiritj_crc[CRC_LEN] = { 0x26,0xa3,0xa5,0xe9, 0xc8,0x33,0xa7,0x2d, | |
| 294 | 294 | 0xf2,0xa3,0xf9,0xe1, 0xbc,0x6c,0x01,0x95, 0x00,0x00 }; |
| 295 | 295 | |
| 296 | 296 | /* Image Fight */ |
| 297 | static UINT8 imgfight_code[CODE_LEN] = | |
| 297 | static const UINT8 imgfight_code[CODE_LEN] = | |
| 298 | 298 | { |
| 299 | 299 | 0x68,0x00,0xa0, // push 0a000h |
| 300 | 300 | 0x1f, // pop ds |
| r1386 | r1387 | |
| 321 | 321 | 0xc6,0x06,0xb0,0x1c,0x57, // mov [1cb0h], byte 057h |
| 322 | 322 | 0xea,0x00,0x00,0x40,0x00 // jmp 0040:$0000 |
| 323 | 323 | }; |
| 324 | static UINT8 imgfight_crc[CRC_LEN] = { 0x7e,0xcc,0xec,0x03, 0x04,0x33,0xb6,0xc5, | |
| 324 | static const UINT8 imgfight_crc[CRC_LEN] = { 0x7e,0xcc,0xec,0x03, 0x04,0x33,0xb6,0xc5, | |
| 325 | 325 | 0xbf,0x37,0x92,0x94, 0x00,0x00 }; |
| 326 | 326 | |
| 327 | 327 | /* Legend of Hero Tonma */ |
| 328 | static UINT8 loht_code[CODE_LEN] = | |
| 328 | static const UINT8 loht_code[CODE_LEN] = | |
| 329 | 329 | { |
| 330 | 330 | 0x68,0x00,0xa0, // push 0a000h |
| 331 | 331 | 0x1f, // pop ds |
| r1386 | r1387 | |
| 346 | 346 | 0xea,0x5d,0x01,0x40,0x00 // jmp 0040:$015d |
| 347 | 347 | |
| 348 | 348 | }; |
| 349 | static UINT8 loht_crc[CRC_LEN] = { 0x39,0x00,0x82,0xae, 0x2c,0x9d,0x4b,0x73, | |
| 349 | static const UINT8 loht_crc[CRC_LEN] = { 0x39,0x00,0x82,0xae, 0x2c,0x9d,0x4b,0x73, | |
| 350 | 350 | 0xfb,0xac,0xd4,0x6d, 0x6d,0x5b,0x77,0xc0, 0x00,0x00 }; |
| 351 | 351 | /* service mode crashes at the moment (119u2), so I can't add the CRCs for lohtj */ |
| 352 | 352 | |
| 353 | 353 | /* X Multiply */ |
| 354 | static UINT8 xmultipl_code[CODE_LEN] = | |
| 354 | static const UINT8 xmultipl_code[CODE_LEN] = | |
| 355 | 355 | { |
| 356 | 356 | 0xea,0x30,0x02,0x00,0x0e // jmp 0e00:$0230 |
| 357 | 357 | }; |
| 358 | static UINT8 xmultipl_crc[CRC_LEN] = { 0x73,0x82,0x4e,0x3f, 0xfc,0x56,0x59,0x06, | |
| 358 | static const UINT8 xmultipl_crc[CRC_LEN] = { 0x73,0x82,0x4e,0x3f, 0xfc,0x56,0x59,0x06, | |
| 359 | 359 | 0x05,0x48,0xa8,0xf4, 0x00,0x00 }; |
| 360 | 360 | |
| 361 | 361 | /* Dragon Breed */ |
| 362 | static UINT8 dbreed72_code[CODE_LEN] = | |
| 362 | static const UINT8 dbreed72_code[CODE_LEN] = | |
| 363 | 363 | { |
| 364 | 364 | 0xea,0x6c,0x00,0x00,0x00 // jmp 0000:$006c |
| 365 | 365 | }; |
| 366 | static UINT8 dbreed72_crc[CRC_LEN] = { 0xa4,0x96,0x5f,0xc0, 0xab,0x49,0x9f,0x19, | |
| 366 | static const UINT8 dbreed72_crc[CRC_LEN] = { 0xa4,0x96,0x5f,0xc0, 0xab,0x49,0x9f,0x19, | |
| 367 | 367 | 0x84,0xe6,0xd6,0xca, 0x00,0x00 }; |
| 368 | 368 | |
| 369 | 369 | /* Air Duel */ |
| 370 | static UINT8 airduel_code[CODE_LEN] = | |
| 370 | static const UINT8 airduel_code[CODE_LEN] = | |
| 371 | 371 | { |
| 372 | 372 | 0x68,0x00,0xd0, // push 0d000h |
| 373 | 373 | 0x1f, // pop ds |
| r1386 | r1387 | |
| 377 | 377 | 0xc6,0x06,0xc0,0x1c,0x57, // mov [1cc0h], byte 057h |
| 378 | 378 | 0xea,0x69,0x0b,0x00,0x00 // jmp 0000:$0b69 |
| 379 | 379 | }; |
| 380 | static UINT8 airduel_crc[CRC_LEN] = { 0x72,0x9c,0xca,0x85, 0xc9,0x12,0xcc,0xea, | |
| 380 | static const UINT8 airduel_crc[CRC_LEN] = { 0x72,0x9c,0xca,0x85, 0xc9,0x12,0xcc,0xea, | |
| 381 | 381 | 0x00,0x00 }; |
| 382 | 382 | |
| 383 | 383 | /* Daiku no Gensan */ |
| 384 | static UINT8 dkgenm72_code[CODE_LEN] = | |
| 384 | static const UINT8 dkgenm72_code[CODE_LEN] = | |
| 385 | 385 | { |
| 386 | 386 | 0xea,0x3d,0x00,0x00,0x10 // jmp 1000:$003d |
| 387 | 387 | }; |
| 388 | static UINT8 dkgenm72_crc[CRC_LEN] = { 0xc8,0xb4,0xdc,0xf8, 0xd3,0xba,0x48,0xed, | |
| 388 | static const UINT8 dkgenm72_crc[CRC_LEN] = { 0xc8,0xb4,0xdc,0xf8, 0xd3,0xba,0x48,0xed, | |
| 389 | 389 | 0x79,0x08,0x1c,0xb3, 0x00,0x00 }; |
| 390 | 390 | |
| 391 | 391 | |
| r1386 | r1387 | |
| 416 | 416 | copy_le(&protection_ram[0x0fe0],protection_crc,CRC_LEN); |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | static void install_protection_handler(UINT8 *code,UINT8 *crc) | |
| 419 | static void install_protection_handler(const UINT8 *code,const UINT8 *crc) | |
| 420 | 420 | { |
| 421 | 421 | protection_ram = auto_malloc(0x1000); |
| 422 | 422 | protection_code = code; |
| r1386 | r1387 | |
|---|---|---|
| 74 | 74 | UINT16 *stlforce_bg_videoram, *stlforce_mlow_videoram, *stlforce_mhigh_videoram, *stlforce_tx_videoram; |
| 75 | 75 | UINT16 *stlforce_bg_scrollram, *stlforce_mlow_scrollram, *stlforce_mhigh_scrollram, *stlforce_vidattrram; |
| 76 | 76 | UINT16 *stlforce_spriteram; |
| 77 | static UINT8 | |
| 77 | static const UINT8 | |
| 78 | 78 | extern int stlforce_sprxoffs; |
| 79 | 79 | |
| 80 | 80 | VIDEO_START( stlforce ); |
| r1386 | r1387 | |
| 197 | 197 | GFXDECODE_ENTRY( REGION_GFX2, 0, stlforce_splayout, 0, 256 ) |
| 198 | 198 | GFXDECODE_END |
| 199 | 199 | |
| 200 | static UINT8 stlforce_default_eeprom[128] = { | |
| 200 | static const UINT8 stlforce_default_eeprom[128] = { | |
| 201 | 201 | 0x7e, 0x01, 0x00, 0x00, 0x01, 0x03, 0x05, 0x01, 0x01, 0x00, 0x4e, 0x20, 0x00, 0x00, 0x4a, 0x4d, |
| 202 | 202 | 0x42, 0x00, 0x02, 0x01, 0x4e, 0x20, 0x00, 0x00, 0x4d, 0x41, 0x43, 0x00, 0x02, 0x01, 0x00, 0x64, |
| 203 | 203 | 0x00, 0x00, 0x41, 0x41, 0x41, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x41, 0x41, 0x41, 0x00, |
| r1386 | r1387 | |
| 208 | 208 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff |
| 209 | 209 | }; |
| 210 | 210 | |
| 211 | static UINT8 twinbrat_default_eeprom[128] = { | |
| 211 | static const UINT8 twinbrat_default_eeprom[128] = { | |
| 212 | 212 | 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x03, |
| 213 | 213 | 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, |
| 214 | 214 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, |
| r1386 | r1387 | |
|---|---|---|
| 83 | 83 | |
| 84 | 84 | ***************************************************************************/ |
| 85 | 85 | |
| 86 | static UINT8 default_eeprom[128] = | |
| 86 | static const UINT8 default_eeprom[128] = | |
| 87 | 87 | { |
| 88 | 88 | 0x77,0x58,0xFF,0xFF,0x00,0x78,0x90,0x00,0x00,0x78,0x70,0x00,0x00,0x78,0x50,0x00, |
| 89 | 89 | 0x54,0x41,0x4B,0x51,0x31,0x36,0x46,0x55,0x4A,0xFF,0x03,0x00,0x02,0x70,0x02,0x50, |
| r1386 | r1387 | |
| 96 | 96 | }; |
| 97 | 97 | |
| 98 | 98 | |
| 99 | static struct EEPROM_interface eeprom_interface = | |
| 99 | static const struct EEPROM_interface eeprom_interface = | |
| 100 | 100 | { |
| 101 | 101 | 6, /* address bits */ |
| 102 | 102 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 353 | 353 | |
| 354 | 354 | |
| 355 | 355 | |
| 356 | static const char *mario_sample_names[] = | |
| 356 | static const char *const mario_sample_names[] = | |
| 357 | 357 | { |
| 358 | 358 | "*mario", |
| 359 | 359 | |
| r1386 | r1387 | |
| 371 | 371 | 0 /* end of array */ |
| 372 | 372 | }; |
| 373 | 373 | |
| 374 | static struct Samplesinterface samples_interface = | |
| 374 | static const struct Samplesinterface samples_interface = | |
| 375 | 375 | { |
| 376 | 376 | 3, /* 3 channels */ |
| 377 | 377 | mario_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 38 | 38 | static int init_eeprom_count; |
| 39 | 39 | |
| 40 | 40 | |
| 41 | static struct EEPROM_interface eeprom_interface = | |
| 41 | static const struct EEPROM_interface eeprom_interface = | |
| 42 | 42 | { |
| 43 | 43 | 7, /* address bits */ |
| 44 | 44 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 184 | 184 | |
| 185 | 185 | /* Default Eeprom for the parent.. otherwise it will always complain first boot */ |
| 186 | 186 | /* its easy to init but this saves me a bit of time.. */ |
| 187 | static UINT8 lethalen_default_eeprom[48] = { | |
| 187 | static const UINT8 lethalen_default_eeprom[48] = { | |
| 188 | 188 | 0x02, 0x1E, 0x00, 0x00, 0x39, 0x31, 0x39, 0x31, 0x55, 0x45, 0x77, 0x00, 0x00, 0x00, 0x00, 0x01, |
| 189 | 189 | 0x02, 0x01, 0x00, 0x03, 0x05, 0x01, 0x01, 0x02, 0x28, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 190 | 190 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF |
| 191 | 191 | }; |
| 192 | 192 | |
| 193 | static struct EEPROM_interface eeprom_interface = | |
| 193 | static const struct EEPROM_interface eeprom_interface = | |
| 194 | 194 | { |
| 195 | 195 | 7, /* address bits */ |
| 196 | 196 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | |
| 339 | static UINT8 default_eeprom[128]={ | |
| 339 | static const UINT8 default_eeprom[128]={ | |
| 340 | 340 | 0x00,0x01,0x00,0x85,0x00,0xfd,0x00,0xff,0x00,0x67,0x00,0x02,0x00,0x00,0x00,0x7b, |
| 341 | 341 | 0x00,0xff,0x00,0xff,0x00,0x78,0x00,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, |
| 342 | 342 | 0x01,0x01,0x00,0x00,0x01,0x02,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x10,0x00,0x00, |
| r1386 | r1387 | |
|---|---|---|
| 943 | 943 | EEPROM |
| 944 | 944 | ******************************************************************/ |
| 945 | 945 | |
| 946 | static UINT8 default_eeprom[128]= | |
| 946 | static const UINT8 default_eeprom[128]= | |
| 947 | 947 | { |
| 948 | 948 | 0x00,0x00,0x00,0xff,0x00,0x01,0x41,0x41,0x00,0x00,0x00,0xff,0x00,0x00,0xf0,0xf0, |
| 949 | 949 | 0x00,0x00,0x00,0xff,0x00,0x01,0x41,0x41,0x00,0x00,0x00,0xff,0x00,0x00,0xf0,0xf0, |
| r1386 | r1387 | |
| 955 | 955 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
| 956 | 956 | }; |
| 957 | 957 | |
| 958 | static struct EEPROM_interface eeprom_interface = | |
| 958 | static const struct EEPROM_interface eeprom_interface = | |
| 959 | 959 | { |
| 960 | 960 | 6, /* address bits */ |
| 961 | 961 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 862 | 862 | |
| 863 | 863 | |
| 864 | 864 | |
| 865 | static struct Samplesinterface pbillian_samples_interface = | |
| 865 | static const struct Samplesinterface pbillian_samples_interface = | |
| 866 | 866 | { |
| 867 | 867 | 1, |
| 868 | 868 | NULL, |
| r1386 | r1387 | |
|---|---|---|
| 124 | 124 | #include "machine/eeprom.h" |
| 125 | 125 | |
| 126 | 126 | |
| 127 | static struct EEPROM_interface eeprom_interface = | |
| 127 | static const struct EEPROM_interface eeprom_interface = | |
| 128 | 128 | { |
| 129 | 129 | 6, /* address bits */ |
| 130 | 130 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 52 | 52 | static int init_eeprom_count; |
| 53 | 53 | static emu_timer *dmadelay_timer; |
| 54 | 54 | |
| 55 | static struct EEPROM_interface eeprom_interface = | |
| 55 | static const struct EEPROM_interface eeprom_interface = | |
| 56 | 56 | { |
| 57 | 57 | 7, /* address bits */ |
| 58 | 58 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 501 | 501 | GFXDECODE_END |
| 502 | 502 | |
| 503 | 503 | |
| 504 | static struct Samplesinterface fghtbskt_samples_interface = | |
| 504 | static const struct Samplesinterface fghtbskt_samples_interface = | |
| 505 | 505 | { |
| 506 | 506 | 1, |
| 507 | 507 | NULL, |
| r1386 | r1387 | |
|---|---|---|
| 279 | 279 | |
| 280 | 280 | #define ROMTEST 1 /* Does necessary stuff to perform rom test, uses RAM as it doesn't dispose of GFX after decoding */ |
| 281 | 281 | |
| 282 | static UINT8 factory_eeprom[16] = { 0x00,0x02,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00 }; | |
| 283 | static UINT8 daraku_eeprom[16] = { 0x03,0x02,0x00,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; | |
| 284 | static UINT8 s1945iii_eeprom[16] = { 0x00,0x00,0x00,0x00,0x00,0x01,0x11,0x70,0x25,0x25,0x25,0x00,0x01,0x00,0x11,0xe0 }; | |
| 285 | static UINT8 dragnblz_eeprom[16] = { 0x00,0x01,0x11,0x70,0x25,0x25,0x25,0x00,0x01,0x00,0x11,0xe0,0x00,0x00,0x00,0x00 }; | |
| 286 | static UINT8 gnbarich_eeprom[16] = { 0x00,0x0f,0x42,0x40,0x08,0x0a,0x00,0x00,0x01,0x06,0x42,0x59,0x00,0x00,0x00,0x00 }; | |
| 287 | static UINT8 mjgtaste_eeprom[16] = { 0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00 }; | |
| 282 | static const UINT8 factory_eeprom[16] = { 0x00,0x02,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00 }; | |
| 283 | static const UINT8 daraku_eeprom[16] = { 0x03,0x02,0x00,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; | |
| 284 | static const UINT8 s1945iii_eeprom[16] = { 0x00,0x00,0x00,0x00,0x00,0x01,0x11,0x70,0x25,0x25,0x25,0x00,0x01,0x00,0x11,0xe0 }; | |
| 285 | static const UINT8 dragnblz_eeprom[16] = { 0x00,0x01,0x11,0x70,0x25,0x25,0x25,0x00,0x01,0x00,0x11,0xe0,0x00,0x00,0x00,0x00 }; | |
| 286 | static const UINT8 gnbarich_eeprom[16] = { 0x00,0x0f,0x42,0x40,0x08,0x0a,0x00,0x00,0x01,0x06,0x42,0x59,0x00,0x00,0x00,0x00 }; | |
| 287 | static const UINT8 mjgtaste_eeprom[16] = { 0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00 }; | |
| 288 | 288 | |
| 289 | 289 | static int use_factory_eeprom; |
| 290 | 290 |
| r1386 | r1387 | |
|---|---|---|
| 197 | 197 | |
| 198 | 198 | ***************************************************************************/ |
| 199 | 199 | |
| 200 | static struct EEPROM_interface eeprom_interface = | |
| 200 | static const struct EEPROM_interface eeprom_interface = | |
| 201 | 201 | { |
| 202 | 202 | 7, // address bits 7 |
| 203 | 203 | 8, // data bits 8 |
| r1386 | r1387 | |
|---|---|---|
| 503 | 503 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_VECTOR ) |
| 504 | 504 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15) |
| 505 | 505 | MDRV_SCREEN_SIZE(400, 300) |
| 506 | MDRV_SCREEN_VISIBLE_AREA( | |
| 506 | MDRV_SCREEN_VISIBLE_AREA(522, 1566, 522, 1566) | |
| 507 | 507 | MDRV_PALETTE_LENGTH(32768) |
| 508 | 508 | |
| 509 | 509 | MDRV_VIDEO_START(dvg) |
| r1386 | r1387 | |
|---|---|---|
| 54 | 54 | static INT32 init_eeprom_count; |
| 55 | 55 | static UINT8 mw_irq_control; |
| 56 | 56 | |
| 57 | static struct EEPROM_interface eeprom_interface = | |
| 57 | static const struct EEPROM_interface eeprom_interface = | |
| 58 | 58 | { |
| 59 | 59 | 7, /* address bits */ |
| 60 | 60 | 8, /* data bits */ |
| r1386 | r1387 | |
| 67 | 67 | |
| 68 | 68 | /* Gaiapolis and Polygonet Commanders use the ER5911, |
| 69 | 69 | but the command formats are slightly different. Why? */ |
| 70 | static struct EEPROM_interface eeprom_interface_gaia = | |
| 70 | static const struct EEPROM_interface eeprom_interface_gaia = | |
| 71 | 71 | { |
| 72 | 72 | 7, /* address bits */ |
| 73 | 73 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 183 | 183 | * |
| 184 | 184 | *************************************/ |
| 185 | 185 | |
| 186 | static ppi8255_interface single_ppi_intf = | |
| 186 | static const ppi8255_interface single_ppi_intf = | |
| 187 | 187 | { |
| 188 | 188 | 1, |
| 189 | 189 | { NULL }, |
| r1386 | r1387 | |
|---|---|---|
| 62 | 62 | * |
| 63 | 63 | *************************************/ |
| 64 | 64 | |
| 65 | static ppi8255_interface hangon_ppi_intf = | |
| 65 | static const ppi8255_interface hangon_ppi_intf = | |
| 66 | 66 | { |
| 67 | 67 | 2, |
| 68 | 68 | { NULL, NULL }, |
| r1386 | r1387 | |
|---|---|---|
| 65 | 65 | /* Default NVram, we seem to need one or statriv2 crashes during attract |
| 66 | 66 | attempting to display an unterminated message */ |
| 67 | 67 | |
| 68 | static UINT8 statriv2_default_eeprom[256] = { | |
| 68 | static const UINT8 statriv2_default_eeprom[256] = { | |
| 69 | 69 | 0x24,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 70 | 70 | 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x11,0x00, |
| 71 | 71 | 0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x05,0x00,0x00,0x11,0x49,0x41,0x41,0x00,0x00, |
| r1386 | r1387 | |
| 84 | 84 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
| 85 | 85 | }; |
| 86 | 86 | |
| 87 | static UINT8 quaquiz2_default_eeprom[256] = { | |
| 87 | static const UINT8 quaquiz2_default_eeprom[256] = { | |
| 88 | 88 | 0x6f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 89 | 89 | 0x00,0x00,0x02,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0xa5,0x6e,0x03,0xff, |
| 90 | 90 | 0x50,0x03,0xff,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| r1386 | r1387 | |
|---|---|---|
| 100 | 100 | EEPROM write ffff to address 3e |
| 101 | 101 | EEPROM write ffff to address 3f |
| 102 | 102 | */ |
| 103 | /*static UINT8 stv_default_eeprom[128] = { | |
| 103 | #if 0 | |
| 104 | static const UINT8 stv_default_eeprom[128] = { | |
| 104 | 105 | 0x53,0x45,0xff,0xff,0xff,0xff,0x3b,0xe2, |
| 105 | 106 | 0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00, |
| 106 | 107 | 0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x08, |
| r1386 | r1387 | |
| 117 | 118 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, |
| 118 | 119 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, |
| 119 | 120 | 0xff,0xff,0xff,0xff |
| 120 | };*/ | |
| 121 | }; | |
| 122 | #endif | |
| 121 | 123 | |
| 122 | static UINT8 shienryu_default_eeprom[128] = { | |
| 124 | static const UINT8 shienryu_default_eeprom[128] = { | |
| 123 | 125 | 0x53,0x45,0x47,0x41,0x3b,0xe2,0x5e,0x09, |
| 124 | 126 | 0x5e,0x09,0x00,0x00,0x00,0x00,0x00,0x02, |
| 125 | 127 | 0x01,0x00,0x01,0x01,0x00,0x00,0x00,0x00, |
| r1386 | r1387 | |
| 138 | 140 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
| 139 | 141 | }; |
| 140 | 142 | |
| 141 | static UINT8 *stv_default_eeprom; | |
| 143 | static const UINT8 *stv_default_eeprom; | |
| 142 | 144 | static int stv_default_eeprom_length; |
| 143 | 145 | |
| 144 | 146 | NVRAM_HANDLER( stv ) |
| r1386 | r1387 | |
|---|---|---|
| 1431 | 1431 | GFXDECODE_END |
| 1432 | 1432 | |
| 1433 | 1433 | |
| 1434 | static const char *reactor_sample_names[] = | |
| 1434 | static const char *const reactor_sample_names[] = | |
| 1435 | 1435 | { |
| 1436 | 1436 | "*reactor", |
| 1437 | 1437 | "fx_53.wav", /* "8 left" */ |
| r1386 | r1387 | |
| 1457 | 1457 | 0 /* end of array */ |
| 1458 | 1458 | }; |
| 1459 | 1459 | |
| 1460 | static const char *qbert_sample_names[] = | |
| 1460 | static const char *const qbert_sample_names[] = | |
| 1461 | 1461 | { |
| 1462 | 1462 | "*qbert", |
| 1463 | 1463 | "fx_17a.wav", /* random speech, voice clock 255 */ |
| r1386 | r1387 | |
| 1508 | 1508 | 0 /* end of array */ |
| 1509 | 1509 | }; |
| 1510 | 1510 | |
| 1511 | static struct Samplesinterface qbert_samples_interface = | |
| 1511 | static const struct Samplesinterface qbert_samples_interface = | |
| 1512 | 1512 | { |
| 1513 | 1513 | 1, /* one channel */ |
| 1514 | 1514 | qbert_sample_names |
| 1515 | 1515 | }; |
| 1516 | 1516 | |
| 1517 | static struct Samplesinterface reactor_samples_interface = | |
| 1517 | static const struct Samplesinterface reactor_samples_interface = | |
| 1518 | 1518 | { |
| 1519 | 1519 | 1, /* one channel */ |
| 1520 | 1520 | reactor_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 23 | 23 | static UINT8 cur_control2; |
| 24 | 24 | static int init_eeprom_count; |
| 25 | 25 | |
| 26 | static struct EEPROM_interface eeprom_interface = | |
| 26 | static const struct EEPROM_interface eeprom_interface = | |
| 27 | 27 | { |
| 28 | 28 | 7, /* address bits */ |
| 29 | 29 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 791 | 791 | * |
| 792 | 792 | *************************************/ |
| 793 | 793 | |
| 794 | static const char *targ_sample_names[] = | |
| 794 | static const char *const targ_sample_names[] = | |
| 795 | 795 | { |
| 796 | 796 | "*targ", |
| 797 | 797 | "expl.wav", |
| r1386 | r1387 | |
| 803 | 803 | }; |
| 804 | 804 | |
| 805 | 805 | |
| 806 | static struct Samplesinterface targ_samples_interface = | |
| 806 | static const struct Samplesinterface targ_samples_interface = | |
| 807 | 807 | { |
| 808 | 808 | 4, /* 3 Channels */ |
| 809 | 809 | targ_sample_names, |
| r1386 | r1387 | |
|---|---|---|
| 510 | 510 | ROM_LOAD( "xe.bin", 0x3c00, 0x400, CRC(e0e81120) SHA1(14a77dfd069be342df4dbb1b747443c6d121d3fe) ) // ? car+misc |
| 511 | 511 | ROM_END |
| 512 | 512 | |
| 513 | static ppi8255_interface ppi8255_intf = | |
| 513 | static const ppi8255_interface ppi8255_intf = | |
| 514 | 514 | { |
| 515 | 515 | 1, /* 1 chips */ |
| 516 | 516 | {0}, /* Port A read */ |
| r1386 | r1387 | |
|---|---|---|
| 60 | 60 | static UINT16 cur_control2; |
| 61 | 61 | |
| 62 | 62 | |
| 63 | static struct EEPROM_interface eeprom_interface = | |
| 63 | static const struct EEPROM_interface eeprom_interface = | |
| 64 | 64 | { |
| 65 | 65 | 7, /* address bits */ |
| 66 | 66 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 18 | 18 | static int vbuffer = 0; |
| 19 | 19 | |
| 20 | 20 | // It's configured for 512 bytes |
| 21 | static struct EEPROM_interface eeprom_interface_93C66 = | |
| 21 | static const struct EEPROM_interface eeprom_interface_93C66 = | |
| 22 | 22 | { |
| 23 | 23 | 9, // address bits 9 |
| 24 | 24 | 8, // data bits 8 |
| r1386 | r1387 | |
|---|---|---|
| 115 | 115 | EPROM |
| 116 | 116 | **********************************************************/ |
| 117 | 117 | |
| 118 | static UINT8 default_eeprom[128]= | |
| 118 | static const UINT8 default_eeprom[128]= | |
| 119 | 119 | { |
| 120 | 120 | 0x02,0x01,0x11,0x12,0x01,0x01,0x01,0x00,0x80,0x80,0x30,0x01,0x00,0x00,0x62,0x45, |
| 121 | 121 | 0xe0,0xa0,0xff,0x28,0xff,0xff,0xfa,0xd7,0x33,0x28,0x00,0x00,0x33,0x28,0x00,0x00, |
| r1386 | r1387 | |
|---|---|---|
| 112 | 112 | static int init_eeprom_count; |
| 113 | 113 | |
| 114 | 114 | |
| 115 | static struct EEPROM_interface eeprom_interface = | |
| 115 | static const struct EEPROM_interface eeprom_interface = | |
| 116 | 116 | { |
| 117 | 117 | 7, /* address bits */ |
| 118 | 118 | 8, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 34 | 34 | static WRITE8_HANDLER(pb_w){homerun_xpb=data;} |
| 35 | 35 | static WRITE8_HANDLER(pc_w){homerun_xpc=data;} |
| 36 | 36 | |
| 37 | static ppi8255_interface ppi8255_intf = | |
| 37 | static const ppi8255_interface ppi8255_intf = | |
| 38 | 38 | { |
| 39 | 39 | 1, |
| 40 | 40 | { 0 }, |
| r1386 | r1387 | |
|---|---|---|
| 1478 | 1478 | * |
| 1479 | 1479 | *************************************/ |
| 1480 | 1480 | |
| 1481 | static const char *journey_sample_names[] = | |
| 1481 | static const char *const journey_sample_names[] = | |
| 1482 | 1482 | { |
| 1483 | 1483 | "*journey", |
| 1484 | 1484 | "sepways.wav", |
| 1485 | 1485 | 0 |
| 1486 | 1486 | }; |
| 1487 | 1487 | |
| 1488 | static struct Samplesinterface journey_samples_interface = | |
| 1488 | static const struct Samplesinterface journey_samples_interface = | |
| 1489 | 1489 | { |
| 1490 | 1490 | 1, |
| 1491 | 1491 | journey_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 292 | 292 | |
| 293 | 293 | ***************************************************************************/ |
| 294 | 294 | |
| 295 | static UINT8 cave_default_eeprom_type1[16] = {0x00,0x0C,0x11,0x0D,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x11,0x11,0xFF,0xFF,0xFF,0xFF}; /* DFeveron, Guwange */ | |
| 296 | static UINT8 cave_default_eeprom_type1feversos[18] = {0x00,0x0C,0x16,0x27,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x11,0x11,0xFF,0xFF,0xFF,0xFF,0x05,0x19}; /* Fever SOS (code checks for the 0x0519 or it won't boot) */ | |
| 297 | static UINT8 cave_default_eeprom_type2[16] = {0x00,0x0C,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; /* Esprade, DonPachi, DDonPachi */ | |
| 298 | static UINT8 cave_default_eeprom_type3[16] = {0x00,0x03,0x08,0x00,0xFF,0xFF,0xFF,0xFF,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF}; /* UoPoko */ | |
| 299 | static UINT8 cave_default_eeprom_type4[16] = {0xF3,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; /* Hotdog Storm */ | |
| 300 | static UINT8 cave_default_eeprom_type5[16] = {0xED,0xFF,0x00,0x00,0x12,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; /* Mazinger Z (6th byte is country code) */ | |
| 301 | static UINT8 cave_default_eeprom_type6[18] = {0xa5,0x00,0xa5,0x00,0xa5,0x00,0xa5,0x00,0xa5,0x01,0xa5,0x01,0xa5,0x04,0xa5,0x01,0xa5,0x02}; /* Sailor Moon (last byte is country code) */ | |
| 295 | static const UINT8 cave_default_eeprom_type1[16] = {0x00,0x0C,0x11,0x0D,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x11,0x11,0xFF,0xFF,0xFF,0xFF}; /* DFeveron, Guwange */ | |
| 296 | static const UINT8 cave_default_eeprom_type1feversos[18] = {0x00,0x0C,0x16,0x27,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x11,0x11,0xFF,0xFF,0xFF,0xFF,0x05,0x19}; /* Fever SOS (code checks for the 0x0519 or it won't boot) */ | |
| 297 | static const UINT8 cave_default_eeprom_type2[16] = {0x00,0x0C,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; /* Esprade, DonPachi, DDonPachi */ | |
| 298 | static const UINT8 cave_default_eeprom_type3[16] = {0x00,0x03,0x08,0x00,0xFF,0xFF,0xFF,0xFF,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF}; /* UoPoko */ | |
| 299 | static const UINT8 cave_default_eeprom_type4[16] = {0xF3,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; /* Hotdog Storm */ | |
| 300 | static const UINT8 cave_default_eeprom_type5[16] = {0xED,0xFF,0x00,0x00,0x12,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; /* Mazinger Z (6th byte is country code) */ | |
| 301 | static const UINT8 cave_default_eeprom_type6[18] = {0xa5,0x00,0xa5,0x00,0xa5,0x00,0xa5,0x00,0xa5,0x01,0xa5,0x01,0xa5,0x04,0xa5,0x01,0xa5,0x02}; /* Sailor Moon (last byte is country code) */ | |
| 302 | 302 | // Air Gallet. Byte 1f is the country code (0==JAPAN,U.S.A,EUROPE,HONGKONG,TAIWAN,KOREA) |
| 303 | static UINT8 cave_default_eeprom_type7[48] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, | |
| 303 | static const UINT8 cave_default_eeprom_type7[48] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, | |
| 304 | 304 | 0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02, |
| 305 | 305 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff}; |
| 306 | 306 | |
| 307 | static UINT8 *cave_default_eeprom; | |
| 307 | static const UINT8 *cave_default_eeprom; | |
| 308 | 308 | static int cave_default_eeprom_length; |
| 309 | 309 | static int cave_region_byte; |
| 310 | 310 |
| r1386 | r1387 | |
|---|---|---|
| 103 | 103 | |
| 104 | 104 | |
| 105 | 105 | |
| 106 | static struct EEPROM_interface eeprom_interface = | |
| 106 | static const struct EEPROM_interface eeprom_interface = | |
| 107 | 107 | { |
| 108 | 108 | 6, /* address bits */ |
| 109 | 109 | 16, /* data bits */ |
| r1386 | r1387 | |
|---|---|---|
| 257 | 257 | |
| 258 | 258 | |
| 259 | 259 | |
| 260 | static const char *tankbatt_sample_names[] = | |
| 260 | static const char *const tankbatt_sample_names[] = | |
| 261 | 261 | { |
| 262 | 262 | "*tankbatt", |
| 263 | 263 | "fire.wav", |
| r1386 | r1387 | |
| 267 | 267 | 0 /* end of array */ |
| 268 | 268 | }; |
| 269 | 269 | |
| 270 | static struct Samplesinterface samples_interface = | |
| 270 | static const struct Samplesinterface samples_interface = | |
| 271 | 271 | { |
| 272 | 272 | 3, /* 3 channels */ |
| 273 | 273 | tankbatt_sample_names |
| r1386 | r1387 | |
|---|---|---|
| 67 | 67 | }; |
| 68 | 68 | |
| 69 | 69 | |
| 70 | typedef struct _list_entry list_entry; | |
| 71 | struct _list_entry | |
| 72 | { | |
| 73 | list_entry * next; | |
| 74 | const astring * name; | |
| 75 | }; | |
| 70 | 76 | |
| 77 | ||
| 78 | ||
| 71 | 79 | /*************************************************************************** |
| 72 | 80 | GLOBAL VARIABLES |
| 73 | 81 | ***************************************************************************/ |
| r1386 | r1387 | |
| 246 | 254 | CORE OUTPUT FUNCTIONS |
| 247 | 255 | ***************************************************************************/ |
| 248 | 256 | |
| 257 | static int compare_list_entries(const void *p1, const void *p2) | |
| 258 | { | |
| 259 | const list_entry *entry1 = *(const list_entry **)p1; | |
| 260 | const list_entry *entry2 = *(const list_entry **)p2; | |
| 261 | return strcmp(astring_c(entry1->name), astring_c(entry2->name)); | |
| 262 | } | |
| 263 | ||
| 264 | ||
| 249 | 265 | /*------------------------------------------------- |
| 250 | 266 | recurse_dir - recurse through a directory |
| 251 | 267 | -------------------------------------------------*/ |
| r1386 | r1387 | |
| 281 | 297 | { |
| 282 | 298 | osd_dir_entry_type entry_type = typelist[entindex]; |
| 283 | 299 | const osd_directory_entry *entry; |
| 300 | list_entry *list = NULL; | |
| 301 | list_entry **listarray; | |
| 302 | list_entry *curlist; | |
| 284 | 303 | osd_directory *dir; |
| 285 | 304 | int found = 0; |
| 286 | 305 | |
| r1386 | r1387 | |
| 292 | 311 | goto error; |
| 293 | 312 | } |
| 294 | 313 | |
| 295 | /* iterate through each file */ | |
| 296 | while ((entry = osd_readdir(dir)) != NULL && result == 0) | |
| 314 | /* build up the list of files */ | |
| 315 | while ((entry = osd_readdir(dir)) != NULL) | |
| 297 | 316 | if (entry->type == entry_type && entry->name[0] != '.') |
| 298 | 317 | { |
| 299 | astring *srcfile, *dstfile; | |
| 318 | list_entry *lentry = malloc(sizeof(*lentry)); | |
| 319 | lentry->name = astring_dupc(entry->name); | |
| 320 | lentry->next = list; | |
| 321 | list = lentry; | |
| 322 | found++; | |
| 323 | } | |
| 300 | 324 | |
| 301 | /* add a header */ | |
| 302 | if (++found == 1) | |
| 303 | core_fprintf(indexfile, "\t<h2>%s</h2>\n\t<ul>\n", (entry_type == ENTTYPE_DIR) ? "Directories" : "Files"); | |
| 325 | /* close the directory */ | |
| 326 | osd_closedir(dir); | |
| 304 | 327 | |
| 305 | /* build the source filename */ | |
| 306 | srcfile = astring_alloc(); | |
| 307 | astring_printf(srcfile, "%s%c%s", astring_c(srcdir), PATH_SEPARATOR[0], entry->name); | |
| 328 | /* skip if nothing found */ | |
| 329 | if (found == 0) | |
| 330 | continue; | |
| 308 | 331 | |
| 309 | /* if we have a file, output it */ | |
| 310 | dstfile = astring_alloc(); | |
| 311 | if (entry->type == ENTTYPE_FILE) | |
| 312 | { | |
| 313 | file_type type = FILE_TYPE_INVALID; | |
| 314 | int extnum; | |
| 332 | /* allocate memory for sorting */ | |
| 333 | listarray = malloc(sizeof(list_entry *) * found); | |
| 334 | found = 0; | |
| 335 | for (curlist = list; curlist != NULL; curlist = curlist->next) | |
| 336 | listarray[found++] = curlist; | |
| 315 | 337 | |
| 316 | /* make sure we care, first */ | |
| 317 | for (extnum = 0; extnum < ARRAY_LENGTH(extension_lookup); extnum++) | |
| 318 | if (core_filename_ends_with(entry->name, extension_lookup[extnum].extension)) | |
| 319 | { | |
| 320 | type = extension_lookup[extnum].type; | |
| 321 | break; | |
| 322 | } | |
| 338 | /* sort the list */ | |
| 339 | qsort(listarray, found, sizeof(listarray[0]), compare_list_entries); | |
| 323 | 340 | |
| 324 | /* if we got a valid file, process it */ | |
| 325 | if (type != FILE_TYPE_INVALID) | |
| 341 | /* rebuild the list */ | |
| 342 | list = NULL; | |
| 343 | while (--found >= 0) | |
| 344 | { | |
| 345 | listarray[found]->next = list; | |
| 346 | list = listarray[found]; | |
| 347 | } | |
| 348 | ||
| 349 | /* iterate through each file */ | |
| 350 | for (curlist = list; curlist != NULL && result == 0; curlist = curlist->next) | |
| 351 | { | |
| 352 | astring *srcfile, *dstfile; | |
| 353 | ||
| 354 | /* add a header */ | |
| 355 | if (curlist == list) | |
| 356 | core_fprintf(indexfile, "\t<h2>%s</h2>\n\t<ul>\n", (entry_type == ENTTYPE_DIR) ? "Directories" : "Files"); | |
| 357 | ||
| 358 | /* build the source filename */ | |
| 359 | srcfile = astring_alloc(); | |
| 360 | astring_printf(srcfile, "%s%c%s", astring_c(srcdir), PATH_SEPARATOR[0], astring_c(curlist->name)); | |
| 361 | ||
| 362 | /* if we have a file, output it */ | |
| 363 | dstfile = astring_alloc(); | |
| 364 | if (entry_type == ENTTYPE_FILE) | |
| 365 | { | |
| 366 | file_type type = FILE_TYPE_INVALID; | |
| 367 | int extnum; | |
| 368 | ||
| 369 | /* make sure we care, first */ | |
| 370 | for (extnum = 0; extnum < ARRAY_LENGTH(extension_lookup); extnum++) | |
| 371 | if (core_filename_ends_with(astring_c(curlist->name), extension_lookup[extnum].extension)) | |
| 326 | 372 | { |
| 327 | astring_printf(dstfile, "%s%c%s.html", astring_c(dstdir), PATH_SEPARATOR[0], entry->name); | |
| 328 | if (indexfile != NULL) | |
| 329 | core_fprintf(indexfile, "\t<li><a href=\"%s.html\">%s</a></li>\n", entry->name, entry->name); | |
| 330 | result = output_file(type, srcrootlen, dstrootlen, srcfile, dstfile); | |
| 373 | type = extension_lookup[extnum].type; | |
| 374 | break; | |
| 331 | 375 | } |
| 332 | } | |
| 333 | 376 | |
| 334 | /* if we have a directory, recurse */ | |
| 335 | else | |
| 377 | /* if we got a valid file, process it */ | |
| 378 | if (type != FILE_TYPE_INVALID) | |
| 336 | 379 | { |
| 337 | astring_printf(dstfile, "%s%c%s", astring_c(dstdir), PATH_SEPARATOR[0], | |
| 380 | astring_printf(dstfile, "%s%c%s.html", astring_c(dstdir), PATH_SEPARATOR[0], astring_c(curlist->name)); | |
| 338 | 381 | if (indexfile != NULL) |
| 339 | core_fprintf(indexfile, "\t<li><a href=\"%s/index.html\">%s/</a></li>\n", entry->name, entry->name); | |
| 340 | result = recurse_dir(srcrootlen, dstrootlen, srcfile, dstfile); | |
| 382 | core_fprintf(indexfile, "\t<li><a href=\"%s.html\">%s</a></li>\n", astring_c(curlist->name), astring_c(curlist->name)); | |
| 383 | result = output_file(type, srcrootlen, dstrootlen, srcfile, dstfile); | |
| 341 | 384 | } |
| 385 | } | |
| 342 | 386 | |
| 343 | /* free memory for the names */ | |
| 344 | astring_free(srcfile); | |
| 345 | astring_free(dstfile); | |
| 387 | /* if we have a directory, recurse */ | |
| 388 | else | |
| 389 | { | |
| 390 | astring_printf(dstfile, "%s%c%s", astring_c(dstdir), PATH_SEPARATOR[0], astring_c(curlist->name)); | |
| 391 | if (indexfile != NULL) | |
| 392 | core_fprintf(indexfile, "\t<li><a href=\"%s/index.html\">%s/</a></li>\n", astring_c(curlist->name), astring_c(curlist->name)); | |
| 393 | result = recurse_dir(srcrootlen, dstrootlen, srcfile, dstfile); | |
| 346 | 394 | } |
| 347 | 395 | |
| 396 | /* free memory for the names */ | |
| 397 | astring_free(srcfile); | |
| 398 | astring_free(dstfile); | |
| 399 | } | |
| 400 | ||
| 348 | 401 | /* close the list if we found some stuff */ |
| 349 | if ( | |
| 402 | if (list | |
| 350 | 403 | core_fprintf(indexfile, "\t</ul>\n"); |
| 351 | 404 | |
| 352 | /* close the directory */ | |
| 353 | osd_closedir(dir); | |
| 405 | /* free all the allocated entries */ | |
| 406 | while (list != NULL) | |
| 407 | { | |
| 408 | list_entry *next = list->next; | |
| 409 | astring_free((astring *)list->name); | |
| 410 | free(list); | |
| 411 | list = next; | |
| 412 | } | |
| 354 | 413 | } |
| 355 | 414 | |
| 356 | 415 | error: |
| r1386 | r1387 | |
|---|---|---|
| 26 | 26 | #ifdef _MSC_VER |
| 27 | 27 | void *__cdecl _alloca(size_t); |
| 28 | 28 | #define alloca _alloca |
| 29 | #if _MSC_VER < 1 | |
| 29 | #if _MSC_VER < 1500 | |
| 30 | 30 | #define vsnprintf _vsnprintf |
| 31 | 31 | #endif |
| 32 | 32 | #endif |
| r1386 | r1387 | |
|---|---|---|
| 207 | 207 | // INLINES |
| 208 | 208 | //============================================================ |
| 209 | 209 | |
| 210 | INLINE BOOL GetClientRectExceptMenu(HWND hWnd, PRECT pRect, BOOL fullscreen) | |
| 211 | { | |
| 212 | static HMENU last_menu; | |
| 213 | static RECT last_rect; | |
| 214 | static RECT cached_rect; | |
| 215 | HMENU menu = GetMenu(hWnd); | |
| 216 | BOOL result = GetClientRect(hWnd, pRect); | |
| 217 | ||
| 218 | if (!fullscreen || !menu) | |
| 219 | return result; | |
| 220 | ||
| 221 | // to avoid flicker use cache if we can use | |
| 222 | if (last_menu != menu || memcmp(&last_rect, pRect, sizeof *pRect) != 0) | |
| 223 | { | |
| 224 | last_menu = menu; | |
| 225 | last_rect = *pRect; | |
| 226 | ||
| 227 | SetMenu(hWnd, NULL); | |
| 228 | result = GetClientRect(hWnd, &cached_rect); | |
| 229 | SetMenu(hWnd, menu); | |
| 230 | } | |
| 231 | ||
| 232 | *pRect = cached_rect; | |
| 233 | return result; | |
| 234 | } | |
| 235 | ||
| 236 | ||
| 210 | 237 | INLINE UINT32 ycc_to_rgb(UINT8 y, UINT8 cb, UINT8 cr) |
| 211 | 238 | { |
| 212 | 239 | /* original equations: |
| r1386 | r1387 | |
| 535 | 562 | d3d_info *d3d = window->drawdata; |
| 536 | 563 | RECT client; |
| 537 | 564 | |
| 538 | GetClientRect(window->hwnd, &client); | |
| 565 | GetClientRectExceptMenu(window->hwnd, &client, window->fullscreen); | |
| 539 | 566 | if (rect_width(&client) > 0 && rect_height(&client) > 0) |
| 540 | 567 | { |
| 541 | 568 | render_target_set_bounds(window->target, rect_width(&client), rect_height(&client), winvideo_monitor_get_aspect(window->monitor)); |
| r1386 | r1387 | |
| 706 | 733 | d3d->presentation.MultiSampleType = D3DMULTISAMPLE_NONE; |
| 707 | 734 | d3d->presentation.SwapEffect = D3DSWAPEFFECT_DISCARD; |
| 708 | 735 | d3d->presentation.hDeviceWindow = window->hwnd; |
| 709 | d3d->presentation.Windowed = !window->fullscreen || HAS_WINDOW_MENU; | |
| 736 | d3d->presentation.Windowed = (!video_config.switchres || !window->fullscreen) || HAS_WINDOW_MENU; | |
| 710 | 737 | d3d->presentation.EnableAutoDepthStencil = FALSE; |
| 711 | 738 | d3d->presentation.AutoDepthStencilFormat = D3DFMT_D16; |
| 712 | 739 | d3d->presentation.Flags = 0; |
| r1386 | r1387 | |
| 1112 | 1139 | RECT client; |
| 1113 | 1140 | |
| 1114 | 1141 | // bounds are from the window client rect |
| 1115 | GetClientRect(window->hwnd, &client); | |
| 1142 | GetClientRectExceptMenu(window->hwnd, &client, window->fullscreen); | |
| 1116 | 1143 | d3d->width = client.right - client.left; |
| 1117 | 1144 | d3d->height = client.bottom - client.top; |
| 1118 | 1145 | |
| r1386 | r1387 | |
| 1291 | 1318 | RECT client; |
| 1292 | 1319 | |
| 1293 | 1320 | // get the current window bounds |
| 1294 | GetClientRect(window->hwnd, &client); | |
| 1321 | GetClientRectExceptMenu(window->hwnd, &client, window->fullscreen); | |
| 1295 | 1322 | |
| 1296 | 1323 | // if we have a device and matching width/height, nothing to do |
| 1297 | 1324 | if (d3d->device != NULL && rect_width(&client) == d3d->width && rect_height(&client) == d3d->height) |
| r1386 | r1387 | |
|---|---|---|
| 121 | 121 | #define SET_H(a,b,r) CC|=((a^b^r)&0x10) |
| 122 | 122 | #define SET_C8(a) CC|=((a&0x100)>>8) |
| 123 | 123 | |
| 124 | static UINT8 flags8i[256]= /* increment */ | |
| 124 | static const UINT8 flags8i[256]= /* increment */ | |
| 125 | 125 | { |
| 126 | 126 | 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 127 | 127 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| r1386 | r1387 | |
| 140 | 140 | 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04, |
| 141 | 141 | 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04 |
| 142 | 142 | }; |
| 143 | static UINT8 flags8d[256]= /* decrement */ | |
| 143 | static const UINT8 flags8d[256]= /* decrement */ | |
| 144 | 144 | { |
| 145 | 145 | 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 146 | 146 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| r1386 | r1387 | |
|---|---|---|
| 38 | 38 | tstx, txa |
| 39 | 39 | }; |
| 40 | 40 | |
| 41 | static const char *op_name_str[] = { | |
| 41 | static const char *const op_name_str[] = { | |
| 42 | 42 | "adca", "adda", "anda", "asl", "asla", "aslx", "asr", "asra", |
| 43 | 43 | "asrx", "bcc", "bclr", "bcs", "beq", "bhcc", "bhcs", "bhi", |
| 44 | 44 | "bih", "bil", "bita", "bls", "bmc", "bmi", "bms", "bne", |
| r1386 | r1387 | |
| 120 | 120 | }; |
| 121 | 121 | |
| 122 | 122 | #if 0 |
| 123 | static char *opcode_strings[0x0100] = | |
| 123 | static const char *const opcode_strings[0x0100] = | |
| 124 | 124 | { |
| 125 | 125 | "brset0", "brclr0", "brset1", "brclr1", "brset2", "brclr2", "brset3", "brclr3", /*00*/ |
| 126 | 126 | "brset4", "brclr4", "brset5", "brclr5", "brset6", "brclr6", "brset7", "brclr7", |
| r1386 | r1387 | |
|---|---|---|
| 925 | 925 | |
| 926 | 926 | static void nec_init(int index, int clock, const void *config, int (*irqcallback)(int), int type) |
| 927 | 927 | { |
| 928 | static const char *names[]={"V20","V30","V33","V30MZ"}; | |
| 928 | static const char *const names[]={"V20","V30","V33","V30MZ"}; | |
| 929 | 929 | |
| 930 | 930 | state_save_register_item_array(names[type], index, I.regs.w); |
| 931 | 931 | state_save_register_item_array(names[type], index, I.sregs); |
| r1386 | r1387 | |
|---|---|---|
| 54 | 54 | P, S |
| 55 | 55 | } Regs; |
| 56 | 56 | |
| 57 | static const char *RegNames[]= { | |
| 57 | static const char *const RegNames[]= { | |
| 58 | 58 | 0, "A", "XL", "XH", "X", "YL", "YH", "Y", "UL", "UH", "U", "P", "S" |
| 59 | 59 | }; |
| 60 | 60 | |
| r1386 | r1387 | |
| 92 | 92 | RPV, SPV,// flip flop pv off |
| 93 | 93 | } Ins; |
| 94 | 94 | |
| 95 | static const char *InsNames[]={ | |
| 95 | static const char *const InsNames[]={ | |
| 96 | 96 | "ILL", "ILL", 0, "NOP", |
| 97 | 97 | "LDA", "STA", "LDI", "LDX", "STX", |
| 98 | 98 | "LDE", "SDE", "LIN", "SIN", |
| r1386 | r1387 | |
|---|---|---|
| 258 | 258 | #define SET_V8(a,b,r) CC|=(((a^b^r^(r>>1))&0x80)>>6) |
| 259 | 259 | #define SET_V16(a,b,r) CC|=(((a^b^r^(r>>1))&0x8000)>>14) |
| 260 | 260 | |
| 261 | static UINT8 flags8i[256]= /* increment */ | |
| 261 | static const UINT8 flags8i[256]= /* increment */ | |
| 262 | 262 | { |
| 263 | 263 | CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 264 | 264 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| r1386 | r1387 | |
| 277 | 277 | CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N, |
| 278 | 278 | CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N |
| 279 | 279 | }; |
| 280 | static UINT8 flags8d[256]= /* decrement */ | |
| 280 | static const UINT8 flags8d[256]= /* decrement */ | |
| 281 | 281 | { |
| 282 | 282 | CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 283 | 283 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| r1386 | r1387 | |
| 360 | 360 | |
| 361 | 361 | #if (!BIG_SWITCH) |
| 362 | 362 | /* timings for 1-byte opcodes */ |
| 363 | static UINT8 cycles1[] = | |
| 363 | static const UINT8 cycles1[] = | |
| 364 | 364 | { |
| 365 | 365 | /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ |
| 366 | 366 | /*0*/ 6, 0, 0, 6, 6, 0, 6, 6, 6, 6, 6, 0, 6, 6, 3, 6, |
| r1386 | r1387 | |
|---|---|---|
| 354 | 354 | sizeof(m6809_pg2opcodes) / sizeof(m6809_pg2opcodes[0]) |
| 355 | 355 | }; |
| 356 | 356 | |
| 357 | static const char *m6809_regs[5] = { "X", "Y", "U", "S", "PC" }; | |
| 357 | static const char *const m6809_regs[5] = { "X", "Y", "U", "S", "PC" }; | |
| 358 | 358 | |
| 359 | static const char *m6809_regs_te[16] = | |
| 359 | static const char *const m6809_regs_te[16] = | |
| 360 | 360 | { |
| 361 | 361 | "D", "X", "Y", "U", "S", "PC", "inv", "inv", |
| 362 | 362 | "A", "B", "CC", "DP", "inv", "inv", "inv", "inv" |
| r1386 | r1387 | |
|---|---|---|
| 11 | 11 | #include "debugger.h" |
| 12 | 12 | #include "h83002.h" |
| 13 | 13 | |
| 14 | static const char *bit_instr[8] = {"bset", "bnot", "bclr", "btst", "bor", "bxor", "band", "bld"}; | |
| 15 | static const char *bit_instr2[8] = {"bset", "bnot", "bclr", "btst", "bior", "bixor", "biand", "bild"}; | |
| 16 | static const char *imm32l_instr[8] = {"mov", "add", "cmp", "sub", "or", "xor", "and", "?"}; | |
| 17 | static const char *branch_instr[16] = {"bt", "bf", "bhi", "bls", "bcc", "bcs", "bne", "beq", "bvc", "bvs", "bpl", "bmi", "bge", "blt", "bgt", "ble"}; | |
| 18 | static const char *reg_names32[8] = {"ER0", "ER1", "ER2", "ER3", "ER4", "ER5", "ER6", "SP"}; | |
| 19 | static const char *reg_names16[16] = {"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "E0", "E1", "E2", "E3", "E4", "E5", "E6", "E7"}; | |
| 20 | static const char *reg_names8[16] = {"R0H", "R1H", "R2H", "R3H", "R4H", "R5H", "R6H", "R7H","R0L", "R1L", "R2L", "R3L", "R4L", "R5L", "R6L", "R7L"}; | |
| 14 | static const char *const bit_instr[8] = {"bset", "bnot", "bclr", "btst", "bor", "bxor", "band", "bld"}; | |
| 15 | static const char *const bit_instr2[8] = {"bset", "bnot", "bclr", "btst", "bior", "bixor", "biand", "bild"}; | |
| 16 | static const char *const imm32l_instr[8] = {"mov", "add", "cmp", "sub", "or", "xor", "and", "?"}; | |
| 17 | static const char *const branch_instr[16] = {"bt", "bf", "bhi", "bls", "bcc", "bcs", "bne", "beq", "bvc", "bvs", "bpl", "bmi", "bge", "blt", "bgt", "ble"}; | |
| 18 | static const char *const reg_names32[8] = {"ER0", "ER1", "ER2", "ER3", "ER4", "ER5", "ER6", "SP"}; | |
| 19 | static const char *const reg_names16[16] = {"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "E0", "E1", "E2", "E3", "E4", "E5", "E6", "E7"}; | |
| 20 | static const char *const reg_names8[16] = {"R0H", "R1H", "R2H", "R3H", "R4H", "R5H", "R6H", "R7H","R0L", "R1L", "R2L", "R3L", "R4L", "R5L", "R6L", "R7L"}; | |
| 21 | 21 | |
| 22 | 22 | static UINT32 h8disasm_0(UINT32 address, UINT32 opcode, char *output, const UINT8 *oprom); |
| 23 | 23 | static UINT32 h8disasm_1(UINT32 address, UINT32 opcode, char *output, const UINT8 *oprom); |
| r1386 | r1387 | |
|---|---|---|
| 33 | 33 | zSTOP, zSUB, zXOR, zSWAP |
| 34 | 34 | }; |
| 35 | 35 | |
| 36 | static const char *s_mnemonic[] = | |
| 36 | static const char *const s_mnemonic[] = | |
| 37 | 37 | { |
| 38 | 38 | "adc", "add", "and", "bit", "call","ccf", "cp", |
| 39 | 39 | "cpl", "daa", "db", "dec", "di", "ei", "halt", |
| r1386 | r1387 | |
| 63 | 63 | const char *arguments; |
| 64 | 64 | } z80gbdasm; |
| 65 | 65 | |
| 66 | static z80gbdasm mnemonic_cb[256] = { | |
| 66 | static const z80gbdasm mnemonic_cb[256] = { | |
| 67 | 67 | {zRLC,"b"}, {zRLC,"c"}, {zRLC,"d"}, {zRLC,"e"}, |
| 68 | 68 | {zRLC,"h"}, {zRLC,"l"}, {zRLC,"(hl)"}, {zRLC,"a"}, |
| 69 | 69 | {zRRC,"b"}, {zRRC,"c"}, {zRRC,"d"}, {zRRC,"e"}, |
| r1386 | r1387 | |
| 130 | 130 | {zSET,"7,h"}, {zSET,"7,l"}, {zSET,"7,(hl)"},{zSET,"7,a"} |
| 131 | 131 | }; |
| 132 | 132 | |
| 133 | static z80gbdasm mnemonic_main[256]= { | |
| 133 | static const z80gbdasm mnemonic_main[256]= { | |
| 134 | 134 | {zNOP,0}, {zLD,"bc,N"}, {zLD,"(bc),a"}, {zINC,"bc"}, |
| 135 | 135 | {zINC,"b"}, {zDEC,"b"}, {zLD,"b,B"}, {zRLCA,0}, |
| 136 | 136 | {zLD,"(W),sp"}, {zADD,"hl,bc"}, {zLD,"a,(bc)"}, {zDEC,"bc"}, |
| r1386 | r1387 | |
| 203 | 203 | |
| 204 | 204 | unsigned z80gb_dasm( char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram ) |
| 205 | 205 | { |
| 206 | z80gbdasm *d; | |
| 206 | const z80gbdasm *d; | |
| 207 | 207 | const char *symbol, *src; |
| 208 | 208 | char *dst; |
| 209 | 209 | INT8 offset = 0; |
| r1386 | r1387 | |
|---|---|---|
| 131 | 131 | /* Nr of cycles to run */ |
| 132 | 132 | static int z80gb_ICount; |
| 133 | 133 | |
| 134 | static int Cycles[256] = | |
| 134 | static const int Cycles[256] = | |
| 135 | 135 | { |
| 136 | 136 | 4,12, 8, 8, 4, 4, 8, 4,20, 8, 8, 8, 4, 4, 8, 4, |
| 137 | 137 | 4,12, 8, 8, 4, 4, 8, 4,12, 8, 8, 8, 4, 4, 8, 4, |
| r1386 | r1387 | |
| 151 | 151 | 12,12, 8, 4, 4,16, 8,16,12, 8,16, 4, 4, 4, 8,16 |
| 152 | 152 | }; |
| 153 | 153 | |
| 154 | static int CyclesCB[256] = | |
| 154 | static const int CyclesCB[256] = | |
| 155 | 155 | { |
| 156 | 156 | 8, 8, 8, 8, 8, 8,16, 8, 8, 8, 8, 8, 8, 8,16, 8, |
| 157 | 157 | 8, 8, 8, 8, 8, 8,16, 8, 8, 8, 8, 8, 8, 8,16, 8, |
| r1386 | r1387 | |
|---|---|---|
| 9 | 9 | #include "34010dsm.c" |
| 10 | 10 | |
| 11 | 11 | |
| 12 | static char *Options[]= | |
| 12 | static const char *const Options[]= | |
| 13 | 13 | { |
| 14 | 14 | "begin","end","offset",0 |
| 15 | 15 | }; |
| r1386 | r1387 | |
|---|---|---|
| 394 | 394 | |
| 395 | 395 | |
| 396 | 396 | /* Opcode Table */ |
| 397 | static void (*opcode_table[65536 >> 4])(void) = | |
| 397 | static void (*const opcode_table[65536 >> 4])(void) = | |
| 398 | 398 | { |
| 399 | 399 | /* 0x0000 0x0010 0x0020 0x0030 ... 0x00f0 */ |
| 400 | 400 | unimpl, unimpl, rev_a, rev_b, idle, unimpl, unimpl, unimpl, |
| r1386 | r1387 | |
|---|---|---|
| 825 | 825 | PIXEL OPS |
| 826 | 826 | ***************************************************************************/ |
| 827 | 827 | |
| 828 | static void (*pixel_write_ops[4][5])(offs_t offset,UINT32 data) = | |
| 828 | static void (*const pixel_write_ops[4][5])(offs_t offset,UINT32 data) = | |
| 829 | 829 | { |
| 830 | 830 | { write_pixel_1, write_pixel_2, write_pixel_4, write_pixel_8, write_pixel_16 }, |
| 831 | 831 | { write_pixel_r_1, write_pixel_r_2, write_pixel_r_4, write_pixel_r_8, write_pixel_r_16 }, |
| r1386 | r1387 | |
| 833 | 833 | { write_pixel_r_t_1, write_pixel_r_t_2, write_pixel_r_t_4, write_pixel_r_t_8, write_pixel_r_t_16 } |
| 834 | 834 | }; |
| 835 | 835 | |
| 836 | static UINT32 (*pixel_read_ops[5])(offs_t offset) = | |
| 836 | static UINT32 (*const pixel_read_ops[5])(offs_t offset) = | |
| 837 | 837 | { |
| 838 | 838 | read_pixel_1, read_pixel_2, read_pixel_4, read_pixel_8, read_pixel_16 |
| 839 | 839 | }; |
| r1386 | r1387 | |
| 876 | 876 | RASTER OPS |
| 877 | 877 | ***************************************************************************/ |
| 878 | 878 | |
| 879 | static INT32 (*raster_ops[32]) (INT32 newpix, INT32 oldpix) = | |
| 879 | static INT32 (*const raster_ops[32]) (INT32 newpix, INT32 oldpix) = | |
| 880 | 880 | { |
| 881 | 881 | 0, raster_op_1 , raster_op_2 , raster_op_3, |
| 882 | 882 | raster_op_4 , raster_op_5 , raster_op_6 , raster_op_7, |
| r1386 | r1387 | |
| 1120 | 1120 | I/O REGISTER WRITES |
| 1121 | 1121 | ***************************************************************************/ |
| 1122 | 1122 | |
| 1123 | static const char *ioreg_name[] = | |
| 1123 | static const char *const ioreg_name[] = | |
| 1124 | 1124 | { |
| 1125 | 1125 | "HESYNC", "HEBLNK", "HSBLNK", "HTOTAL", |
| 1126 | 1126 | "VESYNC", "VEBLNK", "VSBLNK", "VTOTAL", |
| r1386 | r1387 | |
| 1247 | 1247 | } |
| 1248 | 1248 | |
| 1249 | 1249 | |
| 1250 | static const char *ioreg020_name[] = | |
| 1250 | static const char *const ioreg020_name[] = | |
| 1251 | 1251 | { |
| 1252 | 1252 | "VESYNC", "HESYNC", "VEBLNK", "HEBLNK", |
| 1253 | 1253 | "VSBLNK", "HSBLNK", "VTOTAL", "HTOTAL", |
| r1386 | r1387 | |
|---|---|---|
| 251 | 251 | static UINT32 pixel_op20(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix > dstpix) ? srcpix : dstpix; } |
| 252 | 252 | static UINT32 pixel_op21(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix < dstpix) ? srcpix : dstpix; } |
| 253 | 253 | |
| 254 | static UINT32 (*pixel_op_table[])(UINT32, UINT32, UINT32) = | |
| 254 | static UINT32 (*const pixel_op_table[])(UINT32, UINT32, UINT32) = | |
| 255 | 255 | { |
| 256 | 256 | pixel_op00, pixel_op01, pixel_op02, pixel_op03, pixel_op04, pixel_op05, pixel_op06, pixel_op07, |
| 257 | 257 | pixel_op08, pixel_op09, pixel_op10, pixel_op11, pixel_op12, pixel_op13, pixel_op14, pixel_op15, |
| 258 | 258 | pixel_op16, pixel_op17, pixel_op18, pixel_op19, pixel_op20, pixel_op21, pixel_op00, pixel_op00, |
| 259 | 259 | pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00 |
| 260 | 260 | }; |
| 261 | static UINT8 pixel_op_timing_table[] = | |
| 261 | static const UINT8 pixel_op_timing_table[] = | |
| 262 | 262 | { |
| 263 | 263 | 2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,6,5,5,2,2,2,2,2,2,2,2,2,2,2 |
| 264 | 264 | }; |
| r1386 | r1387 | |
| 353 | 353 | |
| 354 | 354 | |
| 355 | 355 | /* tables */ |
| 356 | static void (*pixblt_op_table[])(int, int) = | |
| 356 | static void (*const pixblt_op_table[])(int, int) = | |
| 357 | 357 | { |
| 358 | 358 | pixblt_1_op0, pixblt_1_op0_trans, pixblt_1_opx, pixblt_1_opx_trans, |
| 359 | 359 | pixblt_1_opx, pixblt_1_opx_trans, pixblt_1_opx, pixblt_1_opx_trans, |
| r1386 | r1387 | |
| 441 | 441 | pixblt_16_opx, pixblt_16_opx_trans, pixblt_16_opx, pixblt_16_opx_trans |
| 442 | 442 | }; |
| 443 | 443 | |
| 444 | static void (*pixblt_r_op_table[])(int, int) = | |
| 444 | static void (*const pixblt_r_op_table[])(int, int) = | |
| 445 | 445 | { |
| 446 | 446 | pixblt_r_1_op0, pixblt_r_1_op0_trans, pixblt_r_1_opx, pixblt_r_1_opx_trans, |
| 447 | 447 | pixblt_r_1_opx, pixblt_r_1_opx_trans, pixblt_r_1_opx, pixblt_r_1_opx_trans, |
| r1386 | r1387 | |
| 529 | 529 | pixblt_r_16_opx,pixblt_r_16_opx_trans, pixblt_r_16_opx,pixblt_r_16_opx_trans |
| 530 | 530 | }; |
| 531 | 531 | |
| 532 | static void (*pixblt_b_op_table[])(int) = | |
| 532 | static void (*const pixblt_b_op_table[])(int) = | |
| 533 | 533 | { |
| 534 | 534 | pixblt_b_1_op0, pixblt_b_1_op0_trans, pixblt_b_1_opx, pixblt_b_1_opx_trans, |
| 535 | 535 | pixblt_b_1_opx, pixblt_b_1_opx_trans, pixblt_b_1_opx, pixblt_b_1_opx_trans, |
| r1386 | r1387 | |
| 617 | 617 | pixblt_b_16_opx,pixblt_b_16_opx_trans, pixblt_b_16_opx,pixblt_b_16_opx_trans |
| 618 | 618 | }; |
| 619 | 619 | |
| 620 | static void (*fill_op_table[])(int) = | |
| 620 | static void (*const fill_op_table[])(int) = | |
| 621 | 621 | { |
| 622 | 622 | fill_1_op0, fill_1_op0_trans, fill_1_opx, fill_1_opx_trans, |
| 623 | 623 | fill_1_opx, fill_1_opx_trans, fill_1_opx, fill_1_opx_trans, |
| r1386 | r1387 | |
| 893 | 893 | #undef PIXEL_OP_TIMING |
| 894 | 894 | #undef PIXEL_OP |
| 895 | 895 | |
| 896 | static UINT8 pixelsize_lookup[32] = | |
| 896 | static const UINT8 pixelsize_lookup[32] = | |
| 897 | 897 | { |
| 898 | 898 | 0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 |
| 899 | 899 | }; |
| r1386 | r1387 | |
|---|---|---|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | |
| 187 | void (*tms34010_wfield_functions[32])(offs_t offset,UINT32 data) = | |
| 187 | void (*const tms34010_wfield_functions[32])(offs_t offset,UINT32 data) = | |
| 188 | 188 | { |
| 189 | 189 | wfield_32, wfield_01, wfield_02, wfield_03, wfield_04, wfield_05, |
| 190 | 190 | wfield_06, wfield_07, wfield_08, wfield_09, wfield_10, wfield_11, |
| r1386 | r1387 | |
| 665 | 665 | return ((INT32)(ret << 1)) >> 1; |
| 666 | 666 | } |
| 667 | 667 | |
| 668 | UINT32 (*tms34010_rfield_functions[64])(offs_t offset) = | |
| 668 | UINT32 (*const tms34010_rfield_functions[64])(offs_t offset) = | |
| 669 | 669 | { |
| 670 | 670 | rfield_32 , rfield_z_01, rfield_z_02, rfield_z_03, rfield_z_04, rfield_z_05, |
| 671 | 671 | rfield_z_06, rfield_z_07, rfield_z_08, rfield_z_09, rfield_z_10, rfield_z_11, |
| r1386 | r1387 | |
|---|---|---|
| 37 | 37 | return temp; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | static const char *regname[32] = | |
| 40 | static const char *const regname[32] = | |
| 41 | 41 | { |
| 42 | 42 | "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", |
| 43 | 43 | "AR0", "AR1", "AR2", "AR3", "AR4", "AR5", "AR6", "AR7", |
| r1386 | r1387 | |
| 45 | 45 | "IOF", "RS", "RE", "RC", "??", "??", "??", "??" |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | static const char *condition[32] = | |
| 48 | static const char *const condition[32] = | |
| 49 | 49 | { |
| 50 | 50 | "U", "LO", "LS", "HI", "HS", "EQ", "NE", "LT", |
| 51 | 51 | "LE", "GT", "GE", "??", "NV", "V", "NUF", "UF", |
| r1386 | r1387 | |
|---|---|---|
| 66 | 66 | FORWARD DECLARATIONS |
| 67 | 67 | ***************************************************************************/ |
| 68 | 68 | |
| 69 | void (*tms32031ops[])(void); | |
| 69 | void (*const tms32031ops[])(void); | |
| 70 | 70 | |
| 71 | 71 | |
| 72 | 72 | |
| r1386 | r1387 | |
| 1231 | 1231 | |
| 1232 | 1232 | /* tables */ |
| 1233 | 1233 | |
| 1234 | static UINT32 (*indirect_d[0x20])(UINT8) = | |
| 1234 | static UINT32 (*const indirect_d[0x20])(UINT8) = | |
| 1235 | 1235 | { |
| 1236 | 1236 | mod00_d, mod01_d, mod02_d, mod03_d, mod04_d, mod05_d, mod06_d, mod07_d, |
| 1237 | 1237 | mod08, mod09, mod0a, mod0b, mod0c, mod0d, mod0e, mod0f, |
| r1386 | r1387 | |
| 1240 | 1240 | }; |
| 1241 | 1241 | |
| 1242 | 1242 | |
| 1243 | static UINT32 (*indirect_1[0x20])(UINT8) = | |
| 1243 | static UINT32 (*const indirect_1[0x20])(UINT8) = | |
| 1244 | 1244 | { |
| 1245 | 1245 | mod00_1, mod01_1, mod02_1, mod03_1, mod04_1, mod05_1, mod06_1, mod07_1, |
| 1246 | 1246 | mod08, mod09, mod0a, mod0b, mod0c, mod0d, mod0e, mod0f, |
| r1386 | r1387 | |
| 1249 | 1249 | }; |
| 1250 | 1250 | |
| 1251 | 1251 | |
| 1252 | static UINT32 (*indirect_1_def[0x20])(UINT8) = | |
| 1252 | static UINT32 (*const indirect_1_def[0x20])(UINT8) = | |
| 1253 | 1253 | { |
| 1254 | 1254 | mod00_1, mod01_1, mod02_1_def,mod03_1_def,mod04_1_def,mod05_1_def,mod06_1_def,mod07_1_def, |
| 1255 | 1255 | mod08, mod09, mod0a_def, mod0b_def, mod0c_def, mod0d_def, mod0e_def, mod0f_def, |
| r1386 | r1387 | |
| 6103 | 6103 | FUNCTION TABLE |
| 6104 | 6104 | ***************************************************************************/ |
| 6105 | 6105 | |
| 6106 | void (*tms32031ops[])(void) = | |
| 6106 | void (*const tms32031ops[])(void) = | |
| 6107 | 6107 | { |
| 6108 | 6108 | absf_reg, absf_dir, absf_ind, absf_imm, /* 0x00 */ |
| 6109 | 6109 | absi_reg, absi_dir, absi_ind, absi_imm, |
| r1386 | r1387 | |
|---|---|---|
| 1085 | 1085 | CPUDEFS += -DHAS_PPC601=$(if $(filter PPC601,$(CPUS)),1,0) |
| 1086 | 1086 | CPUDEFS += -DHAS_PPC602=$(if $(filter PPC602,$(CPUS)),1,0) |
| 1087 | 1087 | CPUDEFS += -DHAS_PPC603=$(if $(filter PPC603,$(CPUS)),1,0) |
| 1088 | CPUDEFS += -DHAS_PPC604=$(if $(filter PPC604,$(CPUS)),1,0) | |
| 1088 | 1089 | CPUDEFS += -DHAS_MPC8240=$(if $(filter MPC8240,$(CPUS)),1,0) |
| 1089 | 1090 | |
| 1090 | ifneq ($(filter PPC403 PPC601 PPC602 PPC603 MPC8240,$(CPUS)),) | |
| 1091 | ifneq ($(filter PPC403 PPC601 PPC602 PPC603 PPC604 MPC8240,$(CPUS)),) | |
| 1091 | 1092 | OBJDIRS += $(CPUOBJ)/powerpc |
| 1092 | 1093 | DBGOBJS += $(CPUOBJ)/powerpc/ppc_dasm.o |
| 1093 | 1094 |
| r1386 | r1387 | |
|---|---|---|
| 70 | 70 | |
| 71 | 71 | /* interrupt control mapping */ |
| 72 | 72 | |
| 73 | int m37710_irq_levels[M37710_LINE_MAX] = | |
| 73 | const int m37710_irq_levels[M37710_LINE_MAX] = | |
| 74 | 74 | { |
| 75 | 75 | // maskable |
| 76 | 76 | 0x70, // ADC |
| r1386 | r1387 | |
| 98 | 98 | 0, // reset |
| 99 | 99 | }; |
| 100 | 100 | |
| 101 | static int m37710_irq_vectors[M37710_LINE_MAX] = | |
| 101 | static const int m37710_irq_vectors[M37710_LINE_MAX] = | |
| 102 | 102 | { |
| 103 | 103 | // maskable C74 |
| 104 | 104 | 0xffd6, // A-D converter c68b |
| r1386 | r1387 | |
| 129 | 129 | // M37710 internal peripherals |
| 130 | 130 | |
| 131 | 131 | #if M37710_DEBUG |
| 132 | static const char *m37710_rnames[128] = | |
| 132 | static const char *const m37710_rnames[128] = | |
| 133 | 133 | { |
| 134 | 134 | "", |
| 135 | 135 | "", |
| r1386 | r1387 | |
| 261 | 261 | "INT2 IRQ ctrl", |
| 262 | 262 | }; |
| 263 | 263 | |
| 264 | static const char *m37710_tnames[8] = | |
| 264 | static const char *const m37710_tnames[8] = | |
| 265 | 265 | { |
| 266 | 266 | "A0", "A1", "A2", "A3", "A4", "B0", "B1", "B2" |
| 267 | 267 | }; |
| r1386 | r1387 | |
| 684 | 684 | } |
| 685 | 685 | } |
| 686 | 686 | |
| 687 | extern void (*m37710i_opcodes_M0X0[])(void); | |
| 688 | extern void (*m37710i_opcodes42_M0X0[])(void); | |
| 689 | extern void (*m37710i_opcodes89_M0X0[])(void); | |
| 687 | extern void (*const m37710i_opcodes_M0X0[])(void); | |
| 688 | extern void (*const m37710i_opcodes42_M0X0[])(void); | |
| 689 | extern void (*const m37710i_opcodes89_M0X0[])(void); | |
| 690 | 690 | extern uint m37710i_get_reg_M0X0(int regnum); |
| 691 | 691 | extern void m37710i_set_reg_M0X0(int regnum, uint val); |
| 692 | 692 | extern void m37710i_set_line_M0X0(int line, int state); |
| 693 | 693 | extern int m37710i_execute_M0X0(int cycles); |
| 694 | 694 | |
| 695 | extern void (*m37710i_opcodes_M0X1[])(void); | |
| 696 | extern void (*m37710i_opcodes42_M0X1[])(void); | |
| 697 | extern void (*m37710i_opcodes89_M0X1[])(void); | |
| 695 | extern void (*const m37710i_opcodes_M0X1[])(void); | |
| 696 | extern void (*const m37710i_opcodes42_M0X1[])(void); | |
| 697 | extern void (*const m37710i_opcodes89_M0X1[])(void); | |
| 698 | 698 | extern uint m37710i_get_reg_M0X1(int regnum); |
| 699 | 699 | extern void m37710i_set_reg_M0X1(int regnum, uint val); |
| 700 | 700 | extern void m37710i_set_line_M0X1(int line, int state); |
| 701 | 701 | extern int m37710i_execute_M0X1(int cycles); |
| 702 | 702 | |
| 703 | extern void (*m37710i_opcodes_M1X0[])(void); | |
| 704 | extern void (*m37710i_opcodes42_M1X0[])(void); | |
| 705 | extern void (*m37710i_opcodes89_M1X0[])(void); | |
| 703 | extern void (*const m37710i_opcodes_M1X0[])(void); | |
| 704 | extern void (*const m37710i_opcodes42_M1X0[])(void); | |
| 705 | extern void (*const m37710i_opcodes89_M1X0[])(void); | |
| 706 | 706 | extern uint m37710i_get_reg_M1X0(int regnum); |
| 707 | 707 | extern void m37710i_set_reg_M1X0(int regnum, uint val); |
| 708 | 708 | extern void m37710i_set_line_M1X0(int line, int state); |
| 709 | 709 | extern int m37710i_execute_M1X0(int cycles); |
| 710 | 710 | |
| 711 | extern void (*m37710i_opcodes_M1X1[])(void); | |
| 712 | extern void (*m37710i_opcodes42_M1X1[])(void); | |
| 713 | extern void (*m37710i_opcodes89_M1X1[])(void); | |
| 711 | extern void (*const m37710i_opcodes_M1X1[])(void); | |
| 712 | extern void (*const m37710i_opcodes42_M1X1[])(void); | |
| 713 | extern void (*const m37710i_opcodes89_M1X1[])(void); | |
| 714 | 714 | extern uint m37710i_get_reg_M1X1(int regnum); |
| 715 | 715 | extern void m37710i_set_reg_M1X1(int regnum, uint val); |
| 716 | 716 | extern void m37710i_set_line_M1X1(int line, int state); |
| 717 | 717 | extern int m37710i_execute_M1X1(int cycles); |
| 718 | 718 | |
| 719 | void (**m37710i_opcodes[4])(void) = | |
| 719 | void (*const *const m37710i_opcodes[4])(void) = | |
| 720 | 720 | { |
| 721 | 721 | m37710i_opcodes_M0X0, |
| 722 | 722 | m37710i_opcodes_M0X1, |
| r1386 | r1387 | |
| 724 | 724 | m37710i_opcodes_M1X1, |
| 725 | 725 | }; |
| 726 | 726 | |
| 727 | void (**m37710i_opcodes2[4])(void) = | |
| 727 | void (*const *const m37710i_opcodes2[4])(void) = | |
| 728 | 728 | { |
| 729 | 729 | m37710i_opcodes42_M0X0, |
| 730 | 730 | m37710i_opcodes42_M0X1, |
| r1386 | r1387 | |
| 732 | 732 | m37710i_opcodes42_M1X1, |
| 733 | 733 | }; |
| 734 | 734 | |
| 735 | void (**m37710i_opcodes3[4])(void) = | |
| 735 | void (*const *const m37710i_opcodes3[4])(void) = | |
| 736 | 736 | { |
| 737 | 737 | m37710i_opcodes89_M0X0, |
| 738 | 738 | m37710i_opcodes89_M0X1, |
| r1386 | r1387 | |
| 740 | 740 | m37710i_opcodes89_M1X1, |
| 741 | 741 | }; |
| 742 | 742 | |
| 743 | uint (*m37710i_get_reg[4])(int regnum) = | |
| 743 | uint (*const m37710i_get_reg[4])(int regnum) = | |
| 744 | 744 | { |
| 745 | 745 | m37710i_get_reg_M0X0, |
| 746 | 746 | m37710i_get_reg_M0X1, |
| r1386 | r1387 | |
| 748 | 748 | m37710i_get_reg_M1X1, |
| 749 | 749 | }; |
| 750 | 750 | |
| 751 | void (*m37710i_set_reg[4])(int regnum, uint val) = | |
| 751 | void (*const m37710i_set_reg[4])(int regnum, uint val) = | |
| 752 | 752 | { |
| 753 | 753 | m37710i_set_reg_M0X0, |
| 754 | 754 | m37710i_set_reg_M0X1, |
| r1386 | r1387 | |
| 756 | 756 | m37710i_set_reg_M1X1, |
| 757 | 757 | }; |
| 758 | 758 | |
| 759 | void (*m37710i_set_line[4])(int line, int state) = | |
| 759 | void (*const m37710i_set_line[4])(int line, int state) = | |
| 760 | 760 | { |
| 761 | 761 | m37710i_set_line_M0X0, |
| 762 | 762 | m37710i_set_line_M0X1, |
| r1386 | r1387 | |
| 764 | 764 | m37710i_set_line_M1X1, |
| 765 | 765 | }; |
| 766 | 766 | |
| 767 | int (*m37710i_execute[4])(int cycles) = | |
| 767 | int (*const m37710i_execute[4])(int cycles) = | |
| 768 | 768 | { |
| 769 | 769 | m37710i_execute_M0X0, |
| 770 | 770 | m37710i_execute_M0X1, |
| r1386 | r1387 | |
|---|---|---|
| 58 | 58 | BBC, BBS, TBY, ANDB, PUL , PSH , PLAB, XAB , PHB |
| 59 | 59 | }; |
| 60 | 60 | |
| 61 | static const char* g_opnames[] = | |
| 61 | static const char *const g_opnames[] = | |
| 62 | 62 | { |
| 63 | 63 | "ADC", "AND", "ASL", "BCC", "BCS", "BEQ", "BIT", "BMI", "BNE", "BPL", "BRA", |
| 64 | 64 | "BRK", "BRL", "BVC", "BVS", "CLC", "CLD", "CLI", "CLV", "CMP", "COP", "CPX", |
| r1386 | r1387 | |
| 74 | 74 | "BBC", "BBS", "TBY", "ANDB","PUL", "PSH", "PLB", "XAB", "PHB", |
| 75 | 75 | }; |
| 76 | 76 | |
| 77 | static opcode_struct g_opcodes[256] = | |
| 77 | static const opcode_struct g_opcodes[256] = | |
| 78 | 78 | { |
| 79 | 79 | {BRK, I, SIG }, {ORA, M, DXI }, {UNK, I, SIG }, {ORA, M, S }, |
| 80 | 80 | {SEB, M, LDM4 }, {ORA, M, D }, {ASL, M, D }, {ORA, M, DLI }, |
| r1386 | r1387 | |
| 157 | 157 | {JSR, I, AXI }, {SBC, M, AX }, {INC, M, AX }, {SBC, M, ALX } |
| 158 | 158 | }; |
| 159 | 159 | |
| 160 | static opcode_struct g_opcodes_prefix42[256] = | |
| 160 | static const opcode_struct g_opcodes_prefix42[256] = | |
| 161 | 161 | { |
| 162 | 162 | {BRK, I, SIG }, {ORB, M, DXI }, {COP, I, SIG }, {ORB, M, S }, |
| 163 | 163 | {TSB, M, D }, {ORB, M, D }, {ASL, M, D }, {ORB, M, DLI }, |
| r1386 | r1387 | |
| 240 | 240 | {JSR, I, AXI }, {SBCB, M, AX }, {INC, M, AX }, {SBCB, M, ALX } |
| 241 | 241 | }; |
| 242 | 242 | |
| 243 | static opcode_struct g_opcodes_prefix89[256] = | |
| 243 | static const opcode_struct g_opcodes_prefix89[256] = | |
| 244 | 244 | { |
| 245 | 245 | {BRK, I, SIG }, {MPY, M, DXI }, {COP, I, SIG }, {MPY, M, S }, |
| 246 | 246 | {TSB, M, D }, {MPY, M, D }, {ASL, M, D }, {MPY, M, DLI }, |
| r1386 | r1387 | |
| 373 | 373 | int m7700_disassemble(char* buff, unsigned int pc, unsigned int pb, const UINT8 *oprom, int m_flag, int x_flag) |
| 374 | 374 | { |
| 375 | 375 | unsigned int instruction; |
| 376 | opcode_struct *opcode; | |
| 376 | const opcode_struct *opcode; | |
| 377 | 377 | char* ptr; |
| 378 | 378 | int var; |
| 379 | 379 | signed char varS; |
| r1386 | r1387 | |
|---|---|---|
| 2335 | 2335 | #if !FLAG_SET_M && !FLAG_SET_X |
| 2336 | 2336 | #define OP(CODE, OPERATION) static void m37710i_ ## CODE ## _M0X0(void) {OPERATION;} |
| 2337 | 2337 | #define O(CODE) m37710i_ ## CODE ## _M0X0 |
| 2338 | #define TABLE_OPCODES void (*m37710i_opcodes_M0X0[256])(void) | |
| 2339 | #define TABLE_OPCODES2 void (*m37710i_opcodes42_M0X0[256])(void) | |
| 2340 | #define TABLE_OPCODES3 void (*m37710i_opcodes89_M0X0[256])(void) | |
| 2338 | #define TABLE_OPCODES void (*const m37710i_opcodes_M0X0[256])(void) | |
| 2339 | #define TABLE_OPCODES2 void (*const m37710i_opcodes42_M0X0[256])(void) | |
| 2340 | #define TABLE_OPCODES3 void (*const m37710i_opcodes89_M0X0[256])(void) | |
| 2341 | 2341 | #define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE m37710i_ ## NAME ## _M0X0 ARGS |
| 2342 | 2342 | |
| 2343 | 2343 | #elif !FLAG_SET_M && FLAG_SET_X |
| 2344 | 2344 | |
| 2345 | 2345 | #define OP(CODE, OPERATION) static void m37710i_ ## CODE ## _M0X1(void) {OPERATION;} |
| 2346 | 2346 | #define O(CODE) m37710i_ ## CODE ## _M0X1 |
| 2347 | #define TABLE_OPCODES void (*m37710i_opcodes_M0X1[256])(void) | |
| 2348 | #define TABLE_OPCODES2 void (*m37710i_opcodes42_M0X1[256])(void) | |
| 2349 | #define TABLE_OPCODES3 void (*m37710i_opcodes89_M0X1[256])(void) | |
| 2347 | #define TABLE_OPCODES void (*const m37710i_opcodes_M0X1[256])(void) | |
| 2348 | #define TABLE_OPCODES2 void (*const m37710i_opcodes42_M0X1[256])(void) | |
| 2349 | #define TABLE_OPCODES3 void (*const m37710i_opcodes89_M0X1[256])(void) | |
| 2350 | 2350 | #define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE m37710i_ ## NAME ## _M0X1 ARGS |
| 2351 | 2351 | |
| 2352 | 2352 | #elif FLAG_SET_M && !FLAG_SET_X |
| 2353 | 2353 | |
| 2354 | 2354 | #define OP(CODE, OPERATION) static void m37710i_ ## CODE ## _M1X0(void) {OPERATION;} |
| 2355 | 2355 | #define O(CODE) m37710i_ ## CODE ## _M1X0 |
| 2356 | #define TABLE_OPCODES void (*m37710i_opcodes_M1X0[256])(void) | |
| 2357 | #define TABLE_OPCODES2 void (*m37710i_opcodes42_M1X0[256])(void) | |
| 2358 | #define TABLE_OPCODES3 void (*m37710i_opcodes89_M1X0[256])(void) | |
| 2356 | #define TABLE_OPCODES void (*const m37710i_opcodes_M1X0[256])(void) | |
| 2357 | #define TABLE_OPCODES2 void (*const m37710i_opcodes42_M1X0[256])(void) | |
| 2358 | #define TABLE_OPCODES3 void (*const m37710i_opcodes89_M1X0[256])(void) | |
| 2359 | 2359 | #define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE m37710i_ ## NAME ## _M1X0 ARGS |
| 2360 | 2360 | |
| 2361 | 2361 | #elif FLAG_SET_M && FLAG_SET_X |
| 2362 | 2362 | |
| 2363 | 2363 | #define OP(CODE, OPERATION) static void m37710i_ ## CODE ## _M1X1(void) {OPERATION;} |
| 2364 | 2364 | #define O(CODE) m37710i_ ## CODE ## _M1X1 |
| 2365 | #define TABLE_OPCODES void (*m37710i_opcodes_M1X1[256])(void) | |
| 2366 | #define TABLE_OPCODES2 void (*m37710i_opcodes42_M1X1[256])(void) | |
| 2367 | #define TABLE_OPCODES3 void (*m37710i_opcodes89_M1X1[256])(void) | |
| 2365 | #define TABLE_OPCODES void (*const m37710i_opcodes_M1X1[256])(void) | |
| 2366 | #define TABLE_OPCODES2 void (*const m37710i_opcodes42_M1X1[256])(void) | |
| 2367 | #define TABLE_OPCODES3 void (*const m37710i_opcodes89_M1X1[256])(void) | |
| 2368 | 2368 | #define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE m37710i_ ## NAME ## _M1X1 ARGS |
| 2369 | 2369 | |
| 2370 | 2370 | #endif |
| r1386 | r1387 | |
|---|---|---|
| 95 | 95 | uint irq_level; /* irq level */ |
| 96 | 96 | int (*int_ack)(int); /* Interrupt Acknowledge */ |
| 97 | 97 | uint stopped; /* Sets how the CPU is stopped */ |
| 98 | void (**opcodes)(void); /* opcodes with no prefix */ | |
| 99 | void (**opcodes42)(void); /* opcodes with 0x42 prefix */ | |
| 100 | void (**opcodes89)(void); /* opcodes with 0x89 prefix */ | |
| 98 | void (*const *opcodes)(void); /* opcodes with no prefix */ | |
| 99 | void (*const *opcodes42)(void); /* opcodes with 0x42 prefix */ | |
| 100 | void (*const *opcodes89)(void); /* opcodes with 0x89 prefix */ | |
| 101 | 101 | uint (*get_reg)(int regnum); |
| 102 | 102 | void (*set_reg)(int regnum, uint val); |
| 103 | 103 | void (*set_line)(int line, int state); |
| r1386 | r1387 | |
| 116 | 116 | extern uint m37710i_adc_tbl[]; |
| 117 | 117 | extern uint m37710i_sbc_tbl[]; |
| 118 | 118 | |
| 119 | extern void (**m37710i_opcodes[])(void); | |
| 120 | extern void (**m37710i_opcodes2[])(void); | |
| 121 | extern void (**m37710i_opcodes3[])(void); | |
| 122 | extern uint (*m37710i_get_reg[])(int regnum); | |
| 123 | extern void (*m37710i_set_reg[])(int regnum, uint val); | |
| 124 | extern void (*m37710i_set_line[])(int line, int state); | |
| 125 | extern int (*m37710i_execute[])(int cycles); | |
| 119 | extern void (*const *const m37710i_opcodes[])(void); | |
| 120 | extern void (*const *const m37710i_opcodes2[])(void); | |
| 121 | extern void (*const *const m37710i_opcodes3[])(void); | |
| 122 | extern uint (*const m37710i_get_reg[])(int regnum); | |
| 123 | extern void (*const m37710i_set_reg[])(int regnum, uint val); | |
| 124 | extern void (*const m37710i_set_line[])(int line, int state); | |
| 125 | extern int (*const m37710i_execute[])(int cycles); | |
| 126 | 126 | |
| 127 | 127 | #define REG_A m37710i_cpu.a /* Accumulator */ |
| 128 | 128 | #define REG_B m37710i_cpu.b /* Accumulator hi byte */ |
| r1386 | r1387 | |
|---|---|---|
| 2589 | 2589 | #endif /* MAME_DEBUG */ |
| 2590 | 2590 | case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &z180_icount; break; |
| 2591 | 2591 | case CPUINFO_PTR_TRANSLATE: info->translate = z180_translate; break; |
| 2592 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_op: info->p = cc[Z180_TABLE_op]; break; | |
| 2593 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_cb: info->p = cc[Z180_TABLE_cb]; break; | |
| 2594 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_ed: info->p = cc[Z180_TABLE_ed]; break; | |
| 2595 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_xy: info->p = cc[Z180_TABLE_xy]; break; | |
| 2596 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_xycb: info->p = cc[Z180_TABLE_xycb]; break; | |
| 2597 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_ex: info->p = cc[Z180_TABLE_ex]; break; | |
| 2592 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_op: info->p = (void *)cc[Z180_TABLE_op]; break; | |
| 2593 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_cb: info->p = (void *)cc[Z180_TABLE_cb]; break; | |
| 2594 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_ed: info->p = (void *)cc[Z180_TABLE_ed]; break; | |
| 2595 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_xy: info->p = (void *)cc[Z180_TABLE_xy]; break; | |
| 2596 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_xycb: info->p = (void *)cc[Z180_TABLE_xycb]; break; | |
| 2597 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_ex: info->p = (void *)cc[Z180_TABLE_ex]; break; | |
| 2598 | 2598 | |
| 2599 | 2599 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 2600 | 2600 | case CPUINFO_STR_NAME: strcpy(info->s, "Z180"); break; |
| r1386 | r1387 | |
|---|---|---|
| 61 | 61 | zSLP ,zSRA ,zSRL ,zSUB ,zTST ,zTSTIO ,zXOR |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | static const char *s_mnemonic[] = { | |
| 64 | static const char *const s_mnemonic[] = { | |
| 65 | 65 | "adc" ,"add" ,"and" ,"bit" ,"call" ,"ccf" ,"cp" ,"cpd" , |
| 66 | 66 | "cpdr" ,"cpi" ,"cpir" ,"cpl" ,"daa" ,"db" ,"dec" ,"di" , |
| 67 | 67 | "djnz" ,"ei" ,"ex" ,"exx" ,"halt" ,"im" ,"in" ,"in0" , |
| r1386 | r1387 | |
| 79 | 79 | const char *arguments; |
| 80 | 80 | } z80dasm; |
| 81 | 81 | |
| 82 | static z80dasm mnemonic_xx_cb[256]= { | |
| 82 | static const z80dasm mnemonic_xx_cb[256]= { | |
| 83 | 83 | {zRLC,"b=Y"}, {zRLC,"c=Y"}, {zRLC,"d=Y"}, {zRLC,"e=Y"}, |
| 84 | 84 | {zRLC,"h=Y"}, {zRLC,"l=Y"}, {zRLC,"Y"}, {zRLC,"a=Y"}, |
| 85 | 85 | {zRRC,"b=Y"}, {zRRC,"c=Y"}, {zRRC,"d=Y"}, {zRRC,"e=Y"}, |
| r1386 | r1387 | |
| 146 | 146 | {zSET,"h=7,Y"}, {zSET,"l=7,Y"}, {zSET,"7,Y"}, {zSET,"a=7,Y"} |
| 147 | 147 | }; |
| 148 | 148 | |
| 149 | static z80dasm mnemonic_cb[256] = { | |
| 149 | static const z80dasm mnemonic_cb[256] = { | |
| 150 | 150 | {zRLC,"b"}, {zRLC,"c"}, {zRLC,"d"}, {zRLC,"e"}, |
| 151 | 151 | {zRLC,"h"}, {zRLC,"l"}, {zRLC,"(hl)"}, {zRLC,"a"}, |
| 152 | 152 | {zRRC,"b"}, {zRRC,"c"}, {zRRC,"d"}, {zRRC,"e"}, |
| r1386 | r1387 | |
| 213 | 213 | {zSET,"7,h"}, {zSET,"7,l"}, {zSET,"7,(hl)"},{zSET,"7,a"} |
| 214 | 214 | }; |
| 215 | 215 | |
| 216 | static z80dasm mnemonic_ed[256]= { | |
| 216 | static const z80dasm mnemonic_ed[256]= { | |
| 217 | 217 | {zIN0,"b,(B)"}, {zOUT0,"(B),b"},{zDB,"?"}, {zDB,"?"}, |
| 218 | 218 | {zTST,"b"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, |
| 219 | 219 | {zIN0,"c,(B)"}, {zOUT0,"(B),c"},{zDB,"?"}, {zDB,"?"}, |
| r1386 | r1387 | |
| 280 | 280 | {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"} |
| 281 | 281 | }; |
| 282 | 282 | |
| 283 | static z80dasm mnemonic_xx[256]= { | |
| 283 | static const z80dasm mnemonic_xx[256]= { | |
| 284 | 284 | {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, |
| 285 | 285 | {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, |
| 286 | 286 | {zDB,"?"}, {zADD,"I,bc"}, {zDB,"?"}, {zDB,"?"}, |
| r1386 | r1387 | |
| 347 | 347 | {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"} |
| 348 | 348 | }; |
| 349 | 349 | |
| 350 | static z80dasm mnemonic_main[256]= { | |
| 350 | static const z80dasm mnemonic_main[256]= { | |
| 351 | 351 | {zNOP,0}, {zLD,"bc,N"}, {zLD,"(bc),a"}, {zINC,"bc"}, |
| 352 | 352 | {zINC,"b"}, {zDEC,"b"}, {zLD,"b,B"}, {zRLCA,0}, |
| 353 | 353 | {zEX,"af,af'"}, {zADD,"hl,bc"}, {zLD,"a,(bc)"}, {zDEC,"bc"}, |
| r1386 | r1387 | |
| 430 | 430 | ****************************************************************************/ |
| 431 | 431 | offs_t z180_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) |
| 432 | 432 | { |
| 433 | z80dasm *d; | |
| 433 | const z80dasm *d; | |
| 434 | 434 | const char *src, *ixy; |
| 435 | 435 | char *dst; |
| 436 | 436 | unsigned PC = pc; |
| r1386 | r1387 | |
|---|---|---|
| 1 | 1 | #if Z180_EXACT |
| 2 | 2 | /* tmp1 value for ini/inir/outi/otir for [C.1-0][io.1-0] */ |
| 3 | static UINT8 irep_tmp1[4][4] = { | |
| 3 | static const UINT8 irep_tmp1[4][4] = { | |
| 4 | 4 | {0,0,1,0},{0,1,0,1},{1,0,1,1},{0,1,1,0} |
| 5 | 5 | }; |
| 6 | 6 | |
| 7 | 7 | /* tmp1 value for ind/indr/outd/otdr for [C.1-0][io.1-0] */ |
| 8 | static UINT8 drep_tmp1[4][4] = { | |
| 8 | static const UINT8 drep_tmp1[4][4] = { | |
| 9 | 9 | {0,1,0,0},{1,0,0,1},{0,0,1,0},{0,1,0,1} |
| 10 | 10 | }; |
| 11 | 11 | |
| 12 | 12 | /* tmp2 value for all in/out repeated opcodes for B.7-0 */ |
| 13 | static UINT8 breg_tmp2[256] = { | |
| 13 | static const UINT8 breg_tmp2[256] = { | |
| 14 | 14 | 0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1, |
| 15 | 15 | 0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0, |
| 16 | 16 | 1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0, |
| r1386 | r1387 | |
| 30 | 30 | }; |
| 31 | 31 | #endif |
| 32 | 32 | |
| 33 | static UINT8 cc_op[0x100] = { | |
| 33 | static const UINT8 cc_op[0x100] = { | |
| 34 | 34 | /*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */ |
| 35 | 35 | 3, 9, 7, 4, 4, 4, 6, 3, 4, 7, 6, 4, 4, 4, 6, 3, |
| 36 | 36 | 7, 9, 7, 4, 4, 4, 6, 3, 8, 7, 6, 4, 4, 4, 6, 3, |
| r1386 | r1387 | |
| 50 | 50 | 5, 9, 6, 3, 6,11, 6,11, 5, 4, 6, 3, 6, 0, 6,11 |
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | static UINT8 cc_cb[0x100] = { | |
| 53 | static const UINT8 cc_cb[0x100] = { | |
| 54 | 54 | /*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */ |
| 55 | 55 | 7, 7, 7, 7, 7, 7,13, 7, 7, 7, 7, 7, 7, 7,13, 7, |
| 56 | 56 | 7, 7, 7, 7, 7, 7,13, 7, 7, 7, 7, 7, 7, 7,13, 7, |
| r1386 | r1387 | |
| 70 | 70 | 7, 7, 7, 7, 7, 7,13, 7, 7, 7, 7, 7, 7, 7,13, 7 |
| 71 | 71 | }; |
| 72 | 72 | |
| 73 | static UINT8 cc_ed[0x100] = { | |
| 73 | static const UINT8 cc_ed[0x100] = { | |
| 74 | 74 | /*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */ |
| 75 | 75 | 12,13, 6, 6, 9, 6, 6, 6,12,13, 6, 6, 9, 6, 6, 6, |
| 76 | 76 | 12,13, 6, 6, 9, 6, 6, 6,12,13, 6, 6, 9, 6, 6, 6, |
| r1386 | r1387 | |
| 90 | 90 | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 |
| 91 | 91 | }; |
| 92 | 92 | |
| 93 | static UINT8 cc_xy[0x100] = { | |
| 93 | static const UINT8 cc_xy[0x100] = { | |
| 94 | 94 | /*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */ |
| 95 | 95 | 4, 4, 4, 4, 4, 4, 4, 4, 4,10, 4, 4, 4, 4, 4, 4, |
| 96 | 96 | 4, 4, 4, 4, 4, 4, 4, 4, 4,10, 4, 4, 4, 4, 4, 4, |
| r1386 | r1387 | |
| 110 | 110 | 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4 |
| 111 | 111 | }; |
| 112 | 112 | |
| 113 | static UINT8 cc_xycb[0x100] = { | |
| 113 | static const UINT8 cc_xycb[0x100] = { | |
| 114 | 114 | /*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */ |
| 115 | 115 | 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19, |
| 116 | 116 | 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19, |
| r1386 | r1387 | |
| 131 | 131 | }; |
| 132 | 132 | |
| 133 | 133 | /* extra cycles if jr/jp/call taken and 'interrupt latency' on rst 0-7 */ |
| 134 | static UINT8 cc_ex[0x100] = { | |
| 134 | static const UINT8 cc_ex[0x100] = { | |
| 135 | 135 | /*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */ |
| 136 | 136 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 137 | 137 | 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* DJNZ */ |
| r1386 | r1387 | |
| 151 | 151 | 5, 0, 3, 0,10, 0, 0, 2, 5, 0, 3, 0,10, 0, 0, 2 |
| 152 | 152 | }; |
| 153 | 153 | |
| 154 | static UINT8 *cc[6] = { cc_op, cc_cb, cc_ed, cc_xy, cc_xycb, cc_ex }; | |
| 154 | static const UINT8 *cc[6] = { cc_op, cc_cb, cc_ed, cc_xy, cc_xycb, cc_ex }; | |
| 155 | 155 | #define Z180_TABLE_dd Z180_TABLE_xy |
| 156 | 156 | #define Z180_TABLE_fd Z180_TABLE_xy |
| 157 | 157 | |
| r1386 | r1387 | |
| 222 | 222 | INLINE void prefix##_f4(void); INLINE void prefix##_f5(void); INLINE void prefix##_f6(void); INLINE void prefix##_f7(void); \ |
| 223 | 223 | INLINE void prefix##_f8(void); INLINE void prefix##_f9(void); INLINE void prefix##_fa(void); INLINE void prefix##_fb(void); \ |
| 224 | 224 | INLINE void prefix##_fc(void); INLINE void prefix##_fd(void); INLINE void prefix##_fe(void); INLINE void prefix##_ff(void); \ |
| 225 | static void (*tablename[0x100])(void) = { \ | |
| 225 | static void (*const tablename[0x100])(void) = { \ | |
| 226 | 226 | prefix##_00,prefix##_01,prefix##_02,prefix##_03,prefix##_04,prefix##_05,prefix##_06,prefix##_07, \ |
| 227 | 227 | prefix##_08,prefix##_09,prefix##_0a,prefix##_0b,prefix##_0c,prefix##_0d,prefix##_0e,prefix##_0f, \ |
| 228 | 228 | prefix##_10,prefix##_11,prefix##_12,prefix##_13,prefix##_14,prefix##_15,prefix##_16,prefix##_17, \ |
| r1386 | r1387 | |
|---|---|---|
| 1 | static UINT16 DAATable[0x800] = { | |
| 1 | static const UINT16 DAATable[0x800] = { | |
| 2 | 2 | (0x00<<8) +ZF +VF , |
| 3 | 3 | (0x01<<8) , |
| 4 | 4 | (0x02<<8) , |
| r1386 | r1387 | |
|---|---|---|
| 1 | static void (*PREFIX186(_instruction)[256])(void) = | |
| 1 | static void (*const PREFIX186(_instruction)[256])(void) = | |
| 2 | 2 | { |
| 3 | 3 | PREFIX86(_add_br8), /* 0x00 */ |
| 4 | 4 | PREFIX86(_add_wr16), /* 0x01 */ |
| r1386 | r1387 | |
|---|---|---|
| 3 | 3 | * at the time the same like table186.h |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | static void (*PREFIX286(_instruction)[256])(void) = | |
| 6 | static void (*const PREFIX286(_instruction)[256])(void) = | |
| 7 | 7 | { |
| 8 | 8 | PREFIX86(_add_br8), /* 0x00 */ |
| 9 | 9 | PREFIX86(_add_wr16), /* 0x01 */ |
| r1386 | r1387 | |
|---|---|---|
| 1 | static void (*PREFIX86(_instruction)[256])(void) = | |
| 1 | static void (*const PREFIX86(_instruction)[256])(void) = | |
| 2 | 2 | { |
| 3 | 3 | PREFIX86(_add_br8), /* 0x00 */ |
| 4 | 4 | PREFIX86(_add_wr16), /* 0x01 */ |
| r1386 | r1387 | |
|---|---|---|
| 1 | 1 | // special nec instructions missing |
| 2 | 2 | // at the time the same like table186.h |
| 3 | 3 | |
| 4 | static void (*PREFIXV30(_instruction)[256])(void) = | |
| 4 | static void (*const PREFIXV30(_instruction)[256])(void) = | |
| 5 | 5 | { |
| 6 | 6 | PREFIX86(_add_br8), /* 0x00 */ |
| 7 | 7 | PREFIX86(_add_wr16), /* 0x01 */ |
| r1386 | r1387 | |
|---|---|---|
| 1024 | 1024 | static void XRI_TMM_xx(void); |
| 1025 | 1025 | static void XRI_V_xx(void); |
| 1026 | 1026 | |
| 1027 | static struct opcode_s op48[256] = | |
| 1027 | static const struct opcode_s op48[256] = | |
| 1028 | 1028 | { |
| 1029 | 1029 | {illegal, 2, 8, 8,L0|L1}, /* 00: 0100 1000 0000 0000 */ |
| 1030 | 1030 | {SLRC_A, 2, 8, 8,L0|L1}, /* 01: 0100 1000 0000 0001 */ |
| r1386 | r1387 | |
| 1303 | 1303 | }; |
| 1304 | 1304 | |
| 1305 | 1305 | /* prefix 4C */ |
| 1306 | static struct opcode_s op4C[256] = | |
| 1306 | static const struct opcode_s op4C[256] = | |
| 1307 | 1307 | { |
| 1308 | 1308 | {illegal2, 2, 8, 8,L0|L1}, /* 00: 0100 1100 0000 0000 */ |
| 1309 | 1309 | {illegal2, 2, 8, 8,L0|L1}, /* 01: 0100 1100 0000 0001 */ |
| r1386 | r1387 | |
| 1580 | 1580 | }; |
| 1581 | 1581 | |
| 1582 | 1582 | /* prefix 4D */ |
| 1583 | static struct opcode_s op4D[256] = | |
| 1583 | static const struct opcode_s op4D[256] = | |
| 1584 | 1584 | { |
| 1585 | 1585 | {illegal2, 2, 8, 8,L0|L1}, /* 00: 0100 1101 0000 0000 */ |
| 1586 | 1586 | {illegal2, 2, 8, 8,L0|L1}, /* 01: 0100 1101 0000 0001 */ |
| r1386 | r1387 | |
| 1856 | 1856 | }; |
| 1857 | 1857 | |
| 1858 | 1858 | /* prefix 60 */ |
| 1859 | static struct opcode_s op60[256] = | |
| 1859 | static const struct opcode_s op60[256] = | |
| 1860 | 1860 | { |
| 1861 | 1861 | {illegal2, 2, 8, 8,L0|L1}, /* 00: 0110 0000 0000 0000 */ |
| 1862 | 1862 | {illegal2, 2, 8, 8,L0|L1}, /* 01: 0110 0000 0000 0001 */ |
| r1386 | r1387 | |
| 2132 | 2132 | }; |
| 2133 | 2133 | |
| 2134 | 2134 | /* prefix 64 */ |
| 2135 | static struct opcode_s op64[256] = | |
| 2135 | static const struct opcode_s op64[256] = | |
| 2136 | 2136 | { |
| 2137 | 2137 | {MVI_PA_xx, 3,14,11,L0|L1}, /* 00: 0110 0100 0000 0000 xxxx xxxx */ |
| 2138 | 2138 | {MVI_PB_xx, 3,14,11,L0|L1}, /* 01: 0110 0100 0000 0001 xxxx xxxx */ |
| r1386 | r1387 | |
| 2408 | 2408 | }; |
| 2409 | 2409 | |
| 2410 | 2410 | /* prefix 70 */ |
| 2411 | static struct opcode_s op70[256] = | |
| 2411 | static const struct opcode_s op70[256] = | |
| 2412 | 2412 | { |
| 2413 | 2413 | {illegal2, 2, 8, 8,L0|L1}, /* 00: 0111 0000 0000 0000 */ |
| 2414 | 2414 | {illegal2, 2, 8, 8,L0|L1}, /* 01: 0111 0000 0000 0001 */ |
| r1386 | r1387 | |
| 2685 | 2685 | }; |
| 2686 | 2686 | |
| 2687 | 2687 | /* prefix 74 */ |
| 2688 | static struct opcode_s op74[256] = | |
| 2688 | static const struct opcode_s op74[256] = | |
| 2689 | 2689 | { |
| 2690 | 2690 | {illegal2, 2, 8, 8,L0|L1}, /* 00: 0111 0100 0000 0000 */ |
| 2691 | 2691 | {illegal2, 2, 8, 8,L0|L1}, /* 01: 0111 0100 0000 0001 */ |
| r1386 | r1387 | |
| 2961 | 2961 | }; |
| 2962 | 2962 | |
| 2963 | 2963 | /* main opcodes */ |
| 2964 | static struct opcode_s opXX_7810[256] = | |
| 2964 | static const struct opcode_s opXX_7810[256] = | |
| 2965 | 2965 | { |
| 2966 | 2966 | {NOP, 1, 4, 4,L0|L1}, /* 00: 0000 0000 */ |
| 2967 | 2967 | {LDAW_wa, 2,10,10,L0|L1}, /* 01: 0000 0001 oooo oooo */ |
| r1386 | r1387 | |
| 3236 | 3236 | {JR, 1,10,10,L0|L1} /* ff: 1111 1111 */ |
| 3237 | 3237 | }; |
| 3238 | 3238 | |
| 3239 | static struct opcode_s opXX_7807[256] = | |
| 3239 | static const struct opcode_s opXX_7807[256] = | |
| 3240 | 3240 | { |
| 3241 | 3241 | {NOP, 1, 4, 4,L0|L1}, /* 00: 0000 0000 */ |
| 3242 | 3242 | {LDAW_wa, 2,10,10,L0|L1}, /* 01: 0000 0001 oooo oooo */ |
| r1386 | r1387 | |
|---|---|---|
| 189 | 189 | XRI |
| 190 | 190 | }; |
| 191 | 191 | |
| 192 | static const char* token[] = | |
| 192 | static const char *const token[] = | |
| 193 | 193 | { |
| 194 | 194 | "", |
| 195 | 195 | "illegal", |
| r1386 | r1387 | |
| 364 | 364 | |
| 365 | 365 | |
| 366 | 366 | /* prefix 48 */ |
| 367 | static struct dasm_s dasm48_7810[256] = | |
| 367 | static const struct dasm_s dasm48_7810[256] = | |
| 368 | 368 | { |
| 369 | 369 | {illegal,0, 2, 8}, /* 00: 0100 1000 0000 0000 */ |
| 370 | 370 | {SLRC,"A", 2, 8}, /* 01: 0100 1000 0000 0001 */ |
| r1386 | r1387 | |
| 639 | 639 | {illegal,0, 2, 8} /* ff: 0100 1000 1111 1111 */ |
| 640 | 640 | }; |
| 641 | 641 | |
| 642 | static struct dasm_s dasm48_7807[256] = | |
| 642 | static const struct dasm_s dasm48_7807[256] = | |
| 643 | 643 | { |
| 644 | 644 | {illegal,0, 2, 8}, /* 00: 0100 1000 0000 0000 */ |
| 645 | 645 | {SLRC,"A", 2, 8}, /* 01: 0100 1000 0000 0001 */ |
| r1386 | r1387 | |
| 915 | 915 | }; |
| 916 | 916 | |
| 917 | 917 | /* prefix 4C */ |
| 918 | static struct dasm_s dasm4C_7810[256] = | |
| 918 | static const struct dasm_s dasm4C_7810[256] = | |
| 919 | 919 | { |
| 920 | 920 | {illegal,0, 2, 8}, /* 00: 0100 1100 0000 0000 */ |
| 921 | 921 | {illegal,0, 2, 8}, /* 01: 0100 1100 0000 0001 */ |
| r1386 | r1387 | |
| 1190 | 1190 | {illegal,0, 2,10} /* ff: 0100 1100 1111 1111 */ |
| 1191 | 1191 | }; |
| 1192 | 1192 | |
| 1193 | static struct dasm_s dasm4C_7807[256] = | |
| 1193 | static const struct dasm_s dasm4C_7807[256] = | |
| 1194 | 1194 | { |
| 1195 | 1195 | {illegal,0, 2, 8}, /* 00: 0100 1100 0000 0000 */ |
| 1196 | 1196 | {illegal,0, 2, 8}, /* 01: 0100 1100 0000 0001 */ |
| r1386 | r1387 | |
| 1466 | 1466 | }; |
| 1467 | 1467 | |
| 1468 | 1468 | /* prefix 4D */ |
| 1469 | static struct dasm_s dasm4D_7810[256] = | |
| 1469 | static const struct dasm_s dasm4D_7810[256] = | |
| 1470 | 1470 | { |
| 1471 | 1471 | {illegal,0, 2, 8}, /* 00: 0100 1101 0000 0000 */ |
| 1472 | 1472 | {illegal,0, 2, 8}, /* 01: 0100 1101 0000 0001 */ |
| r1386 | r1387 | |
| 1741 | 1741 | {illegal,0, 2,10} /* ff: 0100 1101 1111 1111 */ |
| 1742 | 1742 | }; |
| 1743 | 1743 | |
| 1744 | static struct dasm_s dasm4D_7807[256] = | |
| 1744 | static const struct dasm_s dasm4D_7807[256] = | |
| 1745 | 1745 | { |
| 1746 | 1746 | {illegal,0, 2, 8}, /* 00: 0100 1101 0000 0000 */ |
| 1747 | 1747 | {illegal,0, 2, 8}, /* 01: 0100 1101 0000 0001 */ |
| r1386 | r1387 | |
| 2017 | 2017 | }; |
| 2018 | 2018 | |
| 2019 | 2019 | /* prefix 60 */ |
| 2020 | static struct dasm_s dasm60[256] = | |
| 2020 | static const struct dasm_s dasm60[256] = | |
| 2021 | 2021 | { |
| 2022 | 2022 | {illegal,0, 2, 8}, /* 00: 0110 0000 0000 0000 */ |
| 2023 | 2023 | {illegal,0, 2, 8}, /* 01: 0110 0000 0000 0001 */ |
| r1386 | r1387 | |
| 2293 | 2293 | }; |
| 2294 | 2294 | |
| 2295 | 2295 | /* prefix 64 */ |
| 2296 | static struct dasm_s dasm64_7810[256] = | |
| 2296 | static const struct dasm_s dasm64_7810[256] = | |
| 2297 | 2297 | { |
| 2298 | 2298 | {MVI,"PA,%b", 3,14}, /* 00: 0110 0100 0000 0000 xxxx xxxx */ |
| 2299 | 2299 | {MVI,"PB,%b", 3,14}, /* 01: 0110 0100 0000 0001 xxxx xxxx */ |
| r1386 | r1387 | |
| 2568 | 2568 | {illegal,0, 3,20} /* ff: 0110 0100 1111 1111 xxxx xxxx */ |
| 2569 | 2569 | }; |
| 2570 | 2570 | |
| 2571 | static struct dasm_s dasm64_7807[256] = | |
| 2571 | static const struct dasm_s dasm64_7807[256] = | |
| 2572 | 2572 | { |
| 2573 | 2573 | {MVI,"PA,%b", 3,14}, /* 00: 0110 0100 0000 0000 xxxx xxxx */ |
| 2574 | 2574 | {MVI,"PB,%b", 3,14}, /* 01: 0110 0100 0000 0001 xxxx xxxx */ |
| r1386 | r1387 | |
| 2844 | 2844 | }; |
| 2845 | 2845 | |
| 2846 | 2846 | /* prefix 70 */ |
| 2847 | static struct dasm_s dasm70[256] = | |
| 2847 | static const struct dasm_s dasm70[256] = | |
| 2848 | 2848 | { |
| 2849 | 2849 | {illegal,0, 2, 8}, /* 00: 0111 0000 0000 0000 */ |
| 2850 | 2850 | {illegal,0, 2, 8}, /* 01: 0111 0000 0000 0001 */ |
| r1386 | r1387 | |
| 3120 | 3120 | }; |
| 3121 | 3121 | |
| 3122 | 3122 | /* prefix 74 */ |
| 3123 | static struct dasm_s dasm74[256] = | |
| 3123 | static const struct dasm_s dasm74[256] = | |
| 3124 | 3124 | { |
| 3125 | 3125 | {illegal,0, 2, 8}, /* 00: 0111 0100 0000 0000 */ |
| 3126 | 3126 | {illegal,0, 2, 8}, /* 01: 0111 0100 0000 0001 */ |
| r1386 | r1387 | |
| 3396 | 3396 | }; |
| 3397 | 3397 | |
| 3398 | 3398 | /* main opcodes */ |
| 3399 | static struct dasm_s dasmXX_7810[256] = | |
| 3399 | static const struct dasm_s dasmXX_7810[256] = | |
| 3400 | 3400 | { |
| 3401 | 3401 | {NOP,0, 1, 4}, /* 00: 0000 0000 */ |
| 3402 | 3402 | {LDAW,"%a", 2,10}, /* 01: 0000 0001 oooo oooo */ |
| r1386 | r1387 | |
| 3671 | 3671 | {JR,"%o", 1,10} /* ff: 11oo oooo */ |
| 3672 | 3672 | }; |
| 3673 | 3673 | |
| 3674 | static struct dasm_s dasmXX_7807[256] = | |
| 3674 | static const struct dasm_s dasmXX_7807[256] = | |
| 3675 | 3675 | { |
| 3676 | 3676 | {NOP,0, 1, 4}, /* 00: 0000 0000 */ |
| 3677 | 3677 | {LDAW,"%a", 2,10}, /* 01: 0000 0001 oooo oooo */ |
| r1386 | r1387 | |
| 3947 | 3947 | |
| 3948 | 3948 | |
| 3949 | 3949 | /* register names for bit manipulation instructions */ |
| 3950 | static const char *regname[32] = | |
| 3950 | static const char *const regname[32] = | |
| 3951 | 3951 | { |
| 3952 | 3952 | "illegal", "illegal", "illegal", "illegal", |
| 3953 | 3953 | "illegal", "illegal", "illegal", "illegal", |
| r1386 | r1387 | |
| 3961 | 3961 | |
| 3962 | 3962 | static unsigned upd7810_get_reg(int reg) { cpuinfo info; upd7810_get_info(CPUINFO_INT_REGISTER + (reg), &info); return info.i; } |
| 3963 | 3963 | |
| 3964 | static unsigned Dasm( char *buffer, unsigned pc, struct dasm_s *dasmXX, const UINT8 *oprom, const UINT8 *opram ) | |
| 3964 | static unsigned Dasm( char *buffer, unsigned pc, const struct dasm_s *dasmXX, const UINT8 *oprom, const UINT8 *opram ) | |
| 3965 | 3965 | { |
| 3966 | 3966 | unsigned opc = pc; |
| 3967 | 3967 | UINT8 op = oprom[pc++ - opc], op2, t, l; |
| r1386 | r1387 | |
|---|---|---|
| 59 | 59 | OP, OP1 |
| 60 | 60 | }; |
| 61 | 61 | |
| 62 | static const char *s_mnemonic[] = { | |
| 62 | static const char *const s_mnemonic[] = { | |
| 63 | 63 | "add", "addc", "and", "bcdd", "bcde", "bcdx", "call", "callc", "callg", "callge", "calll", |
| 64 | 64 | "callle", "calln", "callnc", "callno", "callnz", "callo", "callp", "callnx0", |
| 65 | 65 | "callnx1", "callnx2", "callnx3", "callx0", "callx1", "callx2", "callx3", "callz", |
| r1386 | r1387 | |
|---|---|---|
| 274 | 274 | OP(FE) { /* illegal operation? */ } |
| 275 | 275 | OP(FF) { } |
| 276 | 276 | |
| 277 | static void (*insnminx[256])(void) = { | |
| 277 | static void (*const insnminx[256])(void) = { | |
| 278 | 278 | minx_00, minx_01, minx_02, minx_03, minx_04, minx_05, minx_06, minx_07, |
| 279 | 279 | minx_08, minx_09, minx_0A, minx_0B, minx_0C, minx_0D, minx_0E, minx_0F, |
| 280 | 280 | minx_10, minx_11, minx_12, minx_13, minx_14, minx_15, minx_16, minx_17, |
| r1386 | r1387 | |
| 309 | 309 | minx_F8, minx_F9, minx_FA, minx_FB, minx_FC, minx_FD, minx_FE, minx_FF |
| 310 | 310 | }; |
| 311 | 311 | |
| 312 | static int insnminx_cycles[256] = { | |
| 312 | static const int insnminx_cycles[256] = { | |
| 313 | 313 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 314 | 314 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 315 | 315 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| r1386 | r1387 | |
|---|---|---|
| 274 | 274 | OP(FE) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_X2 ) ) { CALL( regs.PC + d8 - 1 ); } } |
| 275 | 275 | OP(FF) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_DZ ) ) { CALL( regs.PC + d8 - 1 ); } } |
| 276 | 276 | |
| 277 | static void (*insnminx_CE[256])(void) = { | |
| 277 | static void (*const insnminx_CE[256])(void) = { | |
| 278 | 278 | minx_CE_00, minx_CE_01, minx_CE_02, minx_CE_03, minx_CE_04, minx_CE_05, minx_CE_06, minx_CE_07, |
| 279 | 279 | minx_CE_08, minx_CE_09, minx_CE_0A, minx_CE_0B, minx_CE_0C, minx_CE_0D, minx_CE_0E, minx_CE_0F, |
| 280 | 280 | minx_CE_10, minx_CE_11, minx_CE_12, minx_CE_13, minx_CE_14, minx_CE_15, minx_CE_16, minx_CE_17, |
| r1386 | r1387 | |
| 309 | 309 | minx_CE_F8, minx_CE_F9, minx_CE_FA, minx_CE_FB, minx_CE_FC, minx_CE_FD, minx_CE_FE, minx_CE_FF |
| 310 | 310 | }; |
| 311 | 311 | |
| 312 | static int insnminx_cycles_CE[256] = { | |
| 312 | static const int insnminx_cycles_CE[256] = { | |
| 313 | 313 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 314 | 314 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 315 | 315 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| r1386 | r1387 | |
|---|---|---|
| 274 | 274 | OP(FE) { regs.Y = regs.SP; } |
| 275 | 275 | OP(FF) { /* illegal instruction? */ } |
| 276 | 276 | |
| 277 | static void (*insnminx_CF[256])(void) = { | |
| 277 | static void (*const insnminx_CF[256])(void) = { | |
| 278 | 278 | minx_CF_00, minx_CF_01, minx_CF_02, minx_CF_03, minx_CF_04, minx_CF_05, minx_CF_06, minx_CF_07, |
| 279 | 279 | minx_CF_08, minx_CF_09, minx_CF_0A, minx_CF_0B, minx_CF_0C, minx_CF_0D, minx_CF_0E, minx_CF_0F, |
| 280 | 280 | minx_CF_10, minx_CF_11, minx_CF_12, minx_CF_13, minx_CF_14, minx_CF_15, minx_CF_16, minx_CF_17, |
| r1386 | r1387 | |
| 309 | 309 | minx_CF_F8, minx_CF_F9, minx_CF_FA, minx_CF_FB, minx_CF_FC, minx_CF_FD, minx_CF_FE, minx_CF_FF |
| 310 | 310 | }; |
| 311 | 311 | |
| 312 | static int insnminx_cycles_CF[256] = { | |
| 312 | static const int insnminx_cycles_CF[256] = { | |
| 313 | 313 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 314 | 314 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 315 | 315 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| r1386 | r1387 | |
|---|---|---|
| 160 | 160 | //29-31 reserved |
| 161 | 161 | |
| 162 | 162 | // Register names |
| 163 | const char *v60_reg_names[69] = { | |
| 163 | const char *const v60_reg_names[69] = { | |
| 164 | 164 | "R0", "R1", "R2", "R3", |
| 165 | 165 | "R4", "R5", "R6", "R7", |
| 166 | 166 | "R8", "R9", "R10", "R11", |
| r1386 | r1387 | |
|---|---|---|
| 75 | 75 | V60_REGMAX |
| 76 | 76 | }; |
| 77 | 77 | |
| 78 | extern const char *v60_reg_names[]; | |
| 78 | extern const char *const v60_reg_names[]; | |
| 79 | 79 | void v60_stall(void); |
| 80 | 80 | |
| 81 | 81 | #if HAS_V60 |
| r1386 | r1387 | |
|---|---|---|
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | 56 | |
| 57 | static const char* g_opnames[] = | |
| 57 | static const char *const g_opnames[] = | |
| 58 | 58 | { |
| 59 | 59 | "ADC ", "ADDW ", "AND ", "AND1 ", "ASL ", "BBC ", "BBS ", "BCC ", |
| 60 | 60 | "BCS ", "BEQ ", "BMI ", "BNE ", "BPL ", "BRA ", "BRK ", "BVC ", |
| r1386 | r1387 | |
| 67 | 67 | "TCLR1", "TSET1", "XCN " |
| 68 | 68 | }; |
| 69 | 69 | |
| 70 | static opcode_struct g_opcodes[256] = | |
| 70 | static const opcode_struct g_opcodes[256] = | |
| 71 | 71 | { |
| 72 | 72 | /* 00 */ {NOP , {IMP , IMP }}, |
| 73 | 73 | /* 01 */ {TCALL , {N0 , IMP }}, |
| r1386 | r1387 | |
| 346 | 346 | |
| 347 | 347 | offs_t spc700_dasm(char *buff, offs_t pc, const UINT8 *oprom, const UINT8 *opram) |
| 348 | 348 | { |
| 349 | opcode_struct* opcode; | |
| 349 | const opcode_struct* opcode; | |
| 350 | 350 | UINT32 flags = 0; |
| 351 | 351 | char* ptr; |
| 352 | 352 | int var; |
| r1386 | r1387 | |
|---|---|---|
| 29 | 29 | #define FMT(a,b) a, b |
| 30 | 30 | #define PTRS_PER_FORMAT 2 |
| 31 | 31 | |
| 32 | static const char *Formats[] = { | |
| 32 | static const char *const Formats[] = { | |
| 33 | 33 | FMT("00000011dddddddd", "add a,#$%X"), |
| 34 | 34 | FMT("01101rrr", "add a,%R"), |
| 35 | 35 | FMT("0110000r", "add a,@%R"), |
| r1386 | r1387 | |
| 148 | 148 | |
| 149 | 149 | static void InitDasm8039(void) |
| 150 | 150 | { |
| 151 | const char *p, **ops; | |
| 151 | const char *p; | |
| 152 | const char *const *ops; | |
| 152 | 153 | byte mask, bits; |
| 153 | 154 | int bit; |
| 154 | 155 | int i; |
| r1386 | r1387 | |
|---|---|---|
| 93 | 93 | UINT16 A11; |
| 94 | 94 | UINT8 irq_state, irq_extra_cycles; |
| 95 | 95 | int (*irq_callback)(int irqline); |
| 96 | UINT8 Old_T1; | |
| 96 | 97 | } I8039_Regs; |
| 97 | 98 | |
| 98 | 99 | static I8039_Regs R; |
| 99 | 100 | static int i8039_ICount; |
| 100 | 101 | static int inst_cycles; |
| 101 | static UINT8 Old_T1; | |
| 102 | 102 | |
| 103 | 103 | /* The opcode table now is a combination of cycle counts and function pointers */ |
| 104 | 104 | typedef struct { |
| r1386 | r1387 | |
| 106 | 106 | void (*function) (void); |
| 107 | 107 | } s_opcode; |
| 108 | 108 | |
| 109 | #define POSITIVE_EDGE_T1 (( (int)(T1-Old_T1) > 0) ? 1 : 0) | |
| 110 | #define NEGATIVE_EDGE_T1 (( (int)(Old_T1-T1) > 0) ? 1 : 0) | |
| 109 | #define POSITIVE_EDGE_T1 (( (int)(T1-R.Old_T1) > 0) ? 1 : 0) | |
| 110 | #define NEGATIVE_EDGE_T1 (( (int)(R.Old_T1-T1) > 0) ? 1 : 0) | |
| 111 | 111 | |
| 112 | 112 | #define M_Cy ((R.PSW & C_FLAG) >> 7) |
| 113 | 113 | #define M_Cn (!M_Cy) |
| r1386 | r1387 | |
| 462 | 462 | static void sel_rb0(void) { CLR(B_FLAG); regPTR = 0; } |
| 463 | 463 | static void sel_rb1(void) { SET(B_FLAG); regPTR = 24; } |
| 464 | 464 | static void stop_tcnt(void) { R.timerON = R.countON = 0; } |
| 465 | static void strt_cnt(void) { R.countON = 1; R.timerON = 0; Old_T1 = test_r(1); } /* NS990113 */ | |
| 465 | static void strt_cnt(void) { R.countON = 1; R.timerON = 0; R.Old_T1 = test_r(1); } /* NS990113 */ | |
| 466 | 466 | static void strt_t(void) { R.timerON = 1; R.countON = 0; R.masterClock = 0; } /* NS990113 */ |
| 467 | 467 | static void swap_a(void) { UINT8 i=R.A >> 4; R.A <<= 4; R.A |= i; } |
| 468 | 468 | static void xch_a_r0(void) { UINT8 i=R.A; R.A=R0; R0=i; } |
| r1386 | r1387 | |
| 489 | 489 | static void xrl_a_xr0(void) { R.A ^= intRAM[R0 & 0x7f]; } |
| 490 | 490 | static void xrl_a_xr1(void) { R.A ^= intRAM[R1 & 0x7f]; } |
| 491 | 491 | |
| 492 | static s_opcode opcode_main[256]= | |
| 492 | static const s_opcode opcode_main[256]= | |
| 493 | 493 | { |
| 494 | 494 | {1, nop },{0, illegal },{2, outl_bus_a },{2, add_a_n },{2, jmp },{1, en_i },{0, illegal },{1, dec_a }, |
| 495 | 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 }, |
| r1386 | r1387 | |
| 558 | 558 | state_save_register_item("i8039", index, R.A11); |
| 559 | 559 | state_save_register_item("i8039", index, R.irq_state); |
| 560 | 560 | state_save_register_item("i8039", index, R.irq_extra_cycles); |
| 561 | state_save_register_item("i8039", index, R.Old_T1); | |
| 561 | 562 | } |
| 562 | 563 | |
| 563 | 564 | /**************************************************************************** |
| r1386 | r1387 | |
| 690 | 691 | i8039_ICount -= count; |
| 691 | 692 | } |
| 692 | 693 | } |
| 693 | Old_T1 = T1; | |
| 694 | R.Old_T1 = T1; | |
| 694 | 695 | } |
| 695 | 696 | } |
| 696 | 697 |
| r1386 | r1387 | |
|---|---|---|
| 439 | 439 | INLINE void pref10( void ); |
| 440 | 440 | INLINE void pref11( void ); |
| 441 | 441 | |
| 442 | static UINT8 flags8i[256]= /* increment */ | |
| 442 | static const UINT8 flags8i[256]= /* increment */ | |
| 443 | 443 | { |
| 444 | 444 | CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 445 | 445 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| r1386 | r1387 | |
| 458 | 458 | CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N, |
| 459 | 459 | CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N |
| 460 | 460 | }; |
| 461 | static UINT8 flags8d[256]= /* decrement */ | |
| 461 | static const UINT8 flags8d[256]= /* decrement */ | |
| 462 | 462 | { |
| 463 | 463 | CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 464 | 464 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| r1386 | r1387 | |
| 478 | 478 | CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N |
| 479 | 479 | }; |
| 480 | 480 | |
| 481 | static UINT8 index_cycle_em[256] = { /* Index Loopup cycle counts, emulated 6809 */ | |
| 481 | static const UINT8 index_cycle_em[256] = { /* Index Loopup cycle counts, emulated 6809 */ | |
| 482 | 482 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 483 | 483 | |
| 484 | 484 | /* 0x0X */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| r1386 | r1387 | |
| 499 | 499 | /* 0xFX */ 4, 6, 20, 6, 3, 4, 4, 4, 4, 7, 4, 7, 4, 8, 7, 20 |
| 500 | 500 | }; |
| 501 | 501 | |
| 502 | static UINT8 index_cycle_na[256] = { /* Index Loopup cycle counts, | |
| 502 | static const UINT8 index_cycle_na[256] = { /* Index Loopup cycle counts, | |
| 503 | 503 | native 6309 */ |
| 504 | 504 | /* X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, XA, XB, XC, XD, XE, XF */ |
| 505 | 505 | |
| r1386 | r1387 | |
| 524 | 524 | #define IIP0 19 /* Illegal instruction cycle count page 0 */ |
| 525 | 525 | #define IIP1 20 /* Illegal instruction cycle count page 01 & 11 */ |
| 526 | 526 | |
| 527 | static UINT8 ccounts_page0_em[256] = /* Cycle Counts Page zero, Emulated 6809 */ | |
| 527 | static const UINT8 ccounts_page0_em[256] = /* Cycle Counts Page zero, Emulated 6809 */ | |
| 528 | 528 | { |
| 529 | 529 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 530 | 530 | /* 0x0X */ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, |
| r1386 | r1387 | |
| 545 | 545 | /* 0xFX */ 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6 |
| 546 | 546 | }; |
| 547 | 547 | |
| 548 | static UINT8 ccounts_page0_na[256] = /* Cycle Counts Page zero, Native 6309 */ | |
| 548 | static const UINT8 ccounts_page0_na[256] = /* Cycle Counts Page zero, Native 6309 */ | |
| 549 | 549 | { |
| 550 | 550 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 551 | 551 | /* 0x0X */ 5, 6, 6, 5, 5, 6, 5, 5, 5, 5, 5, 6, 5, 4, 2, 5, |
| r1386 | r1387 | |
| 566 | 566 | /* 0xFX */ 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5 |
| 567 | 567 | }; |
| 568 | 568 | |
| 569 | static UINT8 ccounts_page01_em[256] = /* Cycle Counts Page 01, Emulated 6809 */ | |
| 569 | static const UINT8 ccounts_page01_em[256] = /* Cycle Counts Page 01, Emulated 6809 */ | |
| 570 | 570 | { |
| 571 | 571 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 572 | 572 | /* 0x0X */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, |
| r1386 | r1387 | |
| 587 | 587 | /* 0xFX */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, 9, 9, 7, 7 |
| 588 | 588 | }; |
| 589 | 589 | |
| 590 | static UINT8 ccounts_page01_na[256] = /* Cycle Counts Page 01, Native 6309 */ | |
| 590 | static const UINT8 ccounts_page01_na[256] = /* Cycle Counts Page 01, Native 6309 */ | |
| 591 | 591 | { |
| 592 | 592 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 593 | 593 | /* 0x0X */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, |
| r1386 | r1387 | |
| 608 | 608 | /* 0xFX */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, 8, 8, 6, 6 |
| 609 | 609 | }; |
| 610 | 610 | |
| 611 | static UINT8 ccounts_page11_em[256] = /* Cycle Counts Page 11, Emulated 6809 */ | |
| 611 | static const UINT8 ccounts_page11_em[256] = /* Cycle Counts Page 11, Emulated 6809 */ | |
| 612 | 612 | { |
| 613 | 613 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 614 | 614 | /* 0x0X */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, |
| r1386 | r1387 | |
| 629 | 629 | /* 0xFX */ 6, 6, IIP1, IIP1, IIP1, IIP1, 6, 6, IIP1, IIP1, IIP1, 6, IIP1, IIP1, IIP1, IIP1 |
| 630 | 630 | }; |
| 631 | 631 | |
| 632 | static UINT8 ccounts_page11_na[256] = /* Cycle Counts Page 11, Native 6309 */ | |
| 632 | static const UINT8 ccounts_page11_na[256] = /* Cycle Counts Page 11, Native 6309 */ | |
| 633 | 633 | { |
| 634 | 634 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 635 | 635 | /* 0x0X */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, |
| r1386 | r1387 | |
| 652 | 652 | |
| 653 | 653 | #ifndef BIG_SWITCH |
| 654 | 654 | |
| 655 | static void (*hd6309_main[0x100])(void) = { | |
| 655 | static void (*const hd6309_main[0x100])(void) = { | |
| 656 | 656 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, |
| 657 | 657 | 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 658 | 658 | |
| r1386 | r1387 | |
| 705 | 705 | eorb_ex, adcb_ex, orb_ex, addb_ex, ldd_ex, std_ex, ldu_ex, stu_ex |
| 706 | 706 | }; |
| 707 | 707 | |
| 708 | static void (*hd6309_page01[0x100])(void) = { | |
| 708 | static void (*const hd6309_page01[0x100])(void) = { | |
| 709 | 709 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, |
| 710 | 710 | 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 711 | 711 | |
| r1386 | r1387 | |
| 757 | 757 | /* 0xFX */ IIError, IIError, IIError, IIError, IIError, IIError, IIError, IIError, |
| 758 | 758 | IIError, IIError, IIError, IIError, ldq_ex, stq_ex, lds_ex, sts_ex |
| 759 | 759 | }; |
| 760 | static void (*hd6309_page11[0x100])(void) = { | |
| 760 | static void (*const hd6309_page11[0x100])(void) = { | |
| 761 | 761 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, |
| 762 | 762 | 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 763 | 763 |
| r1386 | r1387 | |
|---|---|---|
| 586 | 586 | sizeof(hd6309_pg2opcodes) / sizeof(hd6309_pg2opcodes[0]) |
| 587 | 587 | }; |
| 588 | 588 | |
| 589 | static const char *hd6309_regs[5] = { "X", "Y", "U", "S", "PC" }; | |
| 589 | static const char *const hd6309_regs[5] = { "X", "Y", "U", "S", "PC" }; | |
| 590 | 590 | |
| 591 | static const char *hd6309_btwregs[5] = { "CC", "A", "B", "inv" }; | |
| 591 | static const char *const hd6309_btwregs[5] = { "CC", "A", "B", "inv" }; | |
| 592 | 592 | |
| 593 | static const char *hd6309_teregs[16] = | |
| 593 | static const char *const hd6309_teregs[16] = | |
| 594 | 594 | { |
| 595 | 595 | "D", "X", "Y", "U", "S", "PC", "W", "V", |
| 596 | 596 | "A", "B", "CC", "DP", "0", "0", "E", "F" |
| 597 | 597 | }; |
| 598 | 598 | |
| 599 | static const char *hd6309_tfmregs[16] = { | |
| 599 | static const char *const hd6309_tfmregs[16] = { | |
| 600 | 600 | "D", "X", "Y", "U", "S", "inv", "inv", "inv", |
| 601 | 601 | "inv", "inv", "inv", "inv", "inv", "inv", "inv", "inv" |
| 602 | 602 | }; |
| 603 | 603 | |
| 604 | static const char *tfm_s[] = { "%s+,%s+", "%s-,%s-", "%s+,%s", "%s,%s+" }; | |
| 604 | static const char *const tfm_s[] = { "%s+,%s+", "%s-,%s-", "%s+,%s", "%s,%s+" }; | |
| 605 | 605 | |
| 606 | 606 | offs_t hd6309_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) |
| 607 | 607 | { |
| r1386 | r1387 | |
|---|---|---|
| 277 | 277 | #define SET_FLAGS8I(a) {CC|=flags8i[(a)&0xff];} |
| 278 | 278 | #define SET_FLAGS8D(a) {CC|=flags8d[(a)&0xff];} |
| 279 | 279 | |
| 280 | static UINT8 *cycle_counts_page0; | |
| 281 | static UINT8 *cycle_counts_page01; | |
| 282 | static UINT8 *cycle_counts_page11; | |
| 283 | static UINT8 *index_cycle; | |
| 280 | static UINT8 const *cycle_counts_page0; | |
| 281 | static UINT8 const *cycle_counts_page01; | |
| 282 | static UINT8 const *cycle_counts_page11; | |
| 283 | static UINT8 const *index_cycle; | |
| 284 | 284 | |
| 285 | 285 | /* combos */ |
| 286 | 286 | #define SET_NZ8(a) {SET_N8(a);SET_Z(a);} |
| r1386 | r1387 | |
|---|---|---|
| 63 | 63 | typedef UINT16 e_r; |
| 64 | 64 | #define F T90.af.b.l |
| 65 | 65 | |
| 66 | static const char *r8_names[] = { "b", "c", "d", "e", "h", "l", "a" }; | |
| 67 | static const char *r16_names[] = { "bc", "de", "hl", "??", "ix", "iy", "sp", "af", "af'", "pc" }; | |
| 66 | static const char *const r8_names[] = { "b", "c", "d", "e", "h", "l", "a" }; | |
| 67 | static const char *const r16_names[] = { "bc", "de", "hl", "??", "ix", "iy", "sp", "af", "af'", "pc" }; | |
| 68 | 68 | |
| 69 | 69 | // Condition Codes |
| 70 | 70 | |
| r1386 | r1387 | |
| 107 | 107 | static UINT8 SZHV_inc[256]; /* zero, sign, half carry and overflow flags INC r8 */ |
| 108 | 108 | static UINT8 SZHV_dec[256]; /* zero, sign, half carry and overflow flags DEC r8 */ |
| 109 | 109 | |
| 110 | static const char *cc_names[] = { "f", "lt", "le", "ule", "ov", "mi", "z", "c", "", "ge", "gt", "ugt", "nov", "pl", "nz", "nc" }; | |
| 110 | static const char *const cc_names[] = { "f", "lt", "le", "ule", "ov", "mi", "z", "c", "", "ge", "gt", "ugt", "nov", "pl", "nz", "nc" }; | |
| 111 | 111 | |
| 112 | 112 | // Opcodes |
| 113 | 113 | |
| 114 | 114 | #define OP_16 0x80 |
| 115 | 115 | typedef enum { UNKNOWN, NOP, EX, EXX, LD, LDW, LDA, LDI, LDIR, LDD, LDDR, CPI, CPIR, CPD, CPDR, PUSH, POP, JP, JR, CALL, CALLR, RET, RETI, HALT, DI, EI, SWI, DAA, CPL, NEG, LDAR, RCF, SCF, CCF, TSET, BIT, SET, RES, INC, DEC, INCX, DECX, INCW, DECW, ADD, ADC, SUB, SBC, AND, XOR, OR, CP, RLC, RRC, RL, RR, SLA, SRA, SLL, SRL, RLD, RRD, DJNZ, MUL, DIV } e_op; |
| 116 | static const char *op_names[] = { "??", "nop", "ex", "exx", "ld", "ldw", "lda", "ldi", "ldir", "ldd", "lddr", "cpi", "cpir", "cpd", "cpdr", "push", "pop", "jp", "jr", "call", "callr", "ret", "reti", "halt", "di", "ei", "swi", "daa", "cpl", "neg", "ldar", "rcf", "scf", "ccf", "tset", "bit", "set", "res", "inc", "dec", "incx", "decx", "incw", "decw", "add", "adc", "sub", "sbc", "and", "xor", "or", "cp", "rlc", "rrc", "rl", "rr", "sla", "sra", "sll", "srl", "rld", "rrd", "djnz", "mul", "div" }; | |
| 116 | static const char *const op_names[] = { "??", "nop", "ex", "exx", "ld", "ldw", "lda", "ldi", "ldir", "ldd", "lddr", "cpi", "cpir", "cpd", "cpdr", "push", "pop", "jp", "jr", "call", "callr", "ret", "reti", "halt", "di", "ei", "swi", "daa", "cpl", "neg", "ldar", "rcf", "scf", "ccf", "tset", "bit", "set", "res", "inc", "dec", "incx", "decx", "incw", "decw", "add", "adc", "sub", "sbc", "and", "xor", "or", "cp", "rlc", "rrc", "rl", "rr", "sla", "sra", "sll", "srl", "rld", "rrd", "djnz", "mul", "div" }; | |
| 117 | 117 | |
| 118 | 118 | typedef enum { |
| 119 | 119 | MODE_NONE, MODE_BIT8, MODE_CC, |
| r1386 | r1387 | |
| 936 | 936 | OP( UNKNOWN,2 ) NONE( 1 ) NONE( 2 ) |
| 937 | 937 | } |
| 938 | 938 | |
| 939 | static const char *ir_names[] = { | |
| 939 | static const char *const ir_names[] = { | |
| 940 | 940 | "P0", "P1", "P01CR/IRFL", "IRFH", "P2", "P2CR", "P3", "P3CR", |
| 941 | 941 | "P4", "P4CR", "P5", "SMMOD", "P6", "P7", "P67CR", "SMCR", |
| 942 | 942 | "P8", "P8CR", "WDMOD", "WDCR", "TREG0", "TREG1", "TREG2", "TREG3", |
| r1386 | r1387 | |
|---|---|---|
| 200 | 200 | * handy table to build PC relative offsets |
| 201 | 201 | * from HR (holding register) |
| 202 | 202 | ***************************************************************/ |
| 203 | static | |
| 203 | static const int | |
| 204 | 204 | { |
| 205 | 205 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 206 | 206 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, |
| r1386 | r1387 | |
|---|---|---|
| 21 | 21 | #define MNEMO 1 |
| 22 | 22 | |
| 23 | 23 | /* handy table to build relative offsets from HR (holding register) */ |
| 24 | static int rel[0x100] = { | |
| 24 | static const int rel[0x100] = { | |
| 25 | 25 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 26 | 26 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, |
| 27 | 27 | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, |
| r1386 | r1387 | |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | #if MNEMO |
| 68 | static | |
| 68 | static const char cc[4] = { 'z', 'p', 'm', 'a' }; | |
| 69 | 69 | |
| 70 | 70 | /* format an immediate for PSL */ |
| 71 | 71 | static char *IMM_PSL(int pc) |
| r1386 | r1387 | |
| 136 | 136 | return buff; |
| 137 | 137 | } |
| 138 | 138 | #else |
| 139 | static | |
| 139 | static const char cc[4] = { '0', '1', '2', '3' }; | |
| 140 | 140 | #define IMM_PSL IMM |
| 141 | 141 | #define IMM_PSU IMM |
| 142 | 142 | #endif |
| r1386 | r1387 | |
|---|---|---|
| 9 | 9 | #include "debugger.h" |
| 10 | 10 | #include "e132xs.h" |
| 11 | 11 | |
| 12 | static const char *L_REG[] = | |
| 12 | static const char *const L_REG[] = | |
| 13 | 13 | { |
| 14 | 14 | "L0", "L1", "L2", "L3", "L4", "L5", "L6", "L7", "L8", "L9", |
| 15 | 15 | "L10", "L11", "L12", "L13", "L14", "L15", "L16", "L17", "L18", "L19", |
| r1386 | r1387 | |
| 20 | 20 | "L60", "L61", "L62", "L63" |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | static const char *G_REG[] = | |
| 23 | static const char *const G_REG[] = | |
| 24 | 24 | { |
| 25 | 25 | "PC", "SR", "FER", "G03", "G04", "G05", "G06", "G07", "G08", "G09", |
| 26 | 26 | "G10", "G11", "G12", "G13", "G14", "G15", "G16", "G17", "SP", "UB", |
| r1386 | r1387 | |
| 28 | 28 | "G30", "G31" |
| 29 | 29 | }; |
| 30 | 30 | |
| 31 | static const char *SETxx[] = | |
| 31 | static const char *const SETxx[] = | |
| 32 | 32 | { |
| 33 | 33 | "SETADR", "Reserved", "SET1", "SET0", "SETLE", "SETGT", "SETLT", "SETGE", |
| 34 | 34 | "SETSE", "SETHT", "SETST", "SETHE", "SETE", "SETNE", "SETV", "SETNV", |
| r1386 | r1387 | |
|---|---|---|
| 1842 | 1842 | } |
| 1843 | 1843 | |
| 1844 | 1844 | |
| 1845 | static void (*hyperstone_op[0x100])(UINT16 opcode) = | |
| 1845 | static void (*const hyperstone_op[0x100])(UINT16 opcode) = | |
| 1846 | 1846 | { |
| 1847 | 1847 | hyperstone_op00, hyperstone_op01, hyperstone_op02, hyperstone_op03, |
| 1848 | 1848 | hyperstone_op04, hyperstone_op05, hyperstone_op06, hyperstone_op07, |
| r1386 | r1387 | |
|---|---|---|
| 1079 | 1079 | |
| 1080 | 1080 | |
| 1081 | 1081 | |
| 1082 | static const char *i386_reg[3][16] = | |
| 1082 | static const char *const i386_reg[3][16] = | |
| 1083 | 1083 | { |
| 1084 | 1084 | {"ax", "cx", "dx", "bx", "sp", "bp", "si", "di", "r8w", "r9w", "r10w","r11w","r12w","r13w","r14w","r15w"}, |
| 1085 | 1085 | {"eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", "r8d", "r9d", "r10d","r11d","r12d","r13d","r14d","r15d"}, |
| 1086 | 1086 | {"rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"} |
| 1087 | 1087 | }; |
| 1088 | 1088 | |
| 1089 | static const char *i386_reg8[8] = {"al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"}; | |
| 1090 | static const char *i386_reg8rex[16] = {"al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil", "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l"}; | |
| 1091 | static const char *i386_sreg[8] = {"es", "cs", "ss", "ds", "fs", "gs", "???", "???"}; | |
| 1089 | static const char *const i386_reg8[8] = {"al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"}; | |
| 1090 | static const char *const i386_reg8rex[16] = {"al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil", "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l"}; | |
| 1091 | static const char *const i386_sreg[8] = {"es", "cs", "ss", "ds", "fs", "gs", "???", "???"}; | |
| 1092 | 1092 | |
| 1093 | 1093 | static int address_size; |
| 1094 | 1094 | static int operand_size; |
| r1386 | r1387 | |
|---|---|---|
| 337 | 337 | UINT8 cpu_cycles[X86_NUM_CPUS][2]; |
| 338 | 338 | } X86_CYCLE_TABLE; |
| 339 | 339 | |
| 340 | static X86_CYCLE_TABLE x86_cycle_table[] = | |
| 340 | static const X86_CYCLE_TABLE x86_cycle_table[] = | |
| 341 | 341 | { |
| 342 | 342 | // opcode rm/pmode |
| 343 | 343 | // i386 i486 pentium mediagx |
| r1386 | r1387 | |
|---|---|---|
| 31 | 31 | int address_mode; |
| 32 | 32 | } M68HC11_OPCODE; |
| 33 | 33 | |
| 34 | static M68HC11_OPCODE opcode_table[256] = | |
| 34 | static const M68HC11_OPCODE opcode_table[256] = | |
| 35 | 35 | { |
| 36 | 36 | /* 0x00 - 0x0f */ |
| 37 | 37 | { "test", 0, }, |
| r1386 | r1387 | |
| 311 | 311 | /*****************************************************************************/ |
| 312 | 312 | |
| 313 | 313 | |
| 314 | static M68HC11_OPCODE opcode_table_page2[256] = | |
| 314 | static const M68HC11_OPCODE opcode_table_page2[256] = | |
| 315 | 315 | { |
| 316 | 316 | /* 0x00 - 0x0f */ |
| 317 | 317 | { "?", 0, }, |
| r1386 | r1387 | |
| 591 | 591 | /*****************************************************************************/ |
| 592 | 592 | |
| 593 | 593 | |
| 594 | static M68HC11_OPCODE opcode_table_page3[256] = | |
| 594 | static const M68HC11_OPCODE opcode_table_page3[256] = | |
| 595 | 595 | { |
| 596 | 596 | /* 0x00 - 0x0f */ |
| 597 | 597 | { "?", 0, }, |
| r1386 | r1387 | |
| 871 | 871 | /*****************************************************************************/ |
| 872 | 872 | |
| 873 | 873 | |
| 874 | static M68HC11_OPCODE opcode_table_page4[256] = | |
| 874 | static const M68HC11_OPCODE opcode_table_page4[256] = | |
| 875 | 875 | { |
| 876 | 876 | /* 0x00 - 0x0f */ |
| 877 | 877 | { "?", 0, }, |
| r1386 | r1387 | |
| 1175 | 1175 | return w; |
| 1176 | 1176 | } |
| 1177 | 1177 | |
| 1178 | static UINT32 decode_opcode(UINT32 pc, M68HC11_OPCODE *op_table) | |
| 1178 | static UINT32 decode_opcode(UINT32 pc, const M68HC11_OPCODE *op_table) | |
| 1179 | 1179 | { |
| 1180 | 1180 | UINT8 imm8, mask; |
| 1181 | 1181 | INT8 rel8; |
| r1386 | r1387 | |
|---|---|---|
| 4 | 4 | void (*handler)(void); |
| 5 | 5 | } HC11_OPCODE_LIST; |
| 6 | 6 | |
| 7 | static HC11_OPCODE_LIST hc11_opcode_list[] = | |
| 7 | static const HC11_OPCODE_LIST hc11_opcode_list[] = | |
| 8 | 8 | { |
| 9 | 9 | /* page opcode handler */ |
| 10 | 10 | { 0, 0x1b, HC11OP(aba) }, |
| r1386 | r1387 | |
|---|---|---|
| 501 | 501 | |
| 502 | 502 | #define READ_REG(grp,reg) ((*rd_reg[grp][reg])()) |
| 503 | 503 | |
| 504 | static INT32 (*rd_reg[4][16])(void) = | |
| 504 | static INT32 (*const rd_reg[4][16])(void) = | |
| 505 | 505 | { |
| 506 | 506 | { |
| 507 | 507 | rd_ax0, rd_ax1, rd_mx0, rd_mx1, rd_ay0, rd_ay1, rd_my0, rd_my1, |
| r1386 | r1387 | |
|---|---|---|
| 1 | 1 | #include "adsp2100.h" |
| 2 | 2 | |
| 3 | static const char *flag_change[] = { "", "TOGGLE %s ", "RESET %s ", "SET %s " }; | |
| 4 | static const char *mode_change[] = { "", "", "DIS %s ", "ENA %s " }; | |
| 3 | static const char *const flag_change[] = { "", "TOGGLE %s ", "RESET %s ", "SET %s " }; | |
| 4 | static const char *const mode_change[] = { "", "", "DIS %s ", "ENA %s " }; | |
| 5 | 5 | |
| 6 | static const char *alu_xop[] = { "AX0", "AX1", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" }; | |
| 7 | static const char *alu_yop[] = { "AY0", "AY1", "AF", "0" }; | |
| 8 | static const char *alu_dst[] = { "AR", "AF", "NONE" }; | |
| 6 | static const char *const alu_xop[] = { "AX0", "AX1", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" }; | |
| 7 | static const char *const alu_yop[] = { "AY0", "AY1", "AF", "0" }; | |
| 8 | static const char *const alu_dst[] = { "AR", "AF", "NONE" }; | |
| 9 | 9 | |
| 10 | static const char *mac_xop[] = { "MX0", "MX1", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" }; | |
| 11 | static const char *mac_yop[] = { "MY0", "MY1", "MF", "0" }; | |
| 12 | static const char *mac_dst[] = { "MR", "MF" }; | |
| 10 | static const char *const mac_xop[] = { "MX0", "MX1", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" }; | |
| 11 | static const char *const mac_yop[] = { "MY0", "MY1", "MF", "0" }; | |
| 12 | static const char *const mac_dst[] = { "MR", "MF" }; | |
| 13 | 13 | |
| 14 | static const char *shift_xop[] = { "SI", "??", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" }; | |
| 14 | static const char *const shift_xop[] = { "SI", "??", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" }; | |
| 15 | 15 | |
| 16 | static const char *reg_grp[][16] = | |
| 16 | static const char *const reg_grp[][16] = | |
| 17 | 17 | { |
| 18 | 18 | { "AX0", "AX1", "MX0", "MX1", "AY0", "AY1", "MY0", "MY1", "SI", "SE", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" }, |
| 19 | 19 | { "I0", "I1", "I2", "I3", "M0", "M1", "M2", "M3", "L0", "L1", "L2", "L3", "??", "??", "??", "??" }, |
| 20 | 20 | { "I4", "I5", "I6", "I7", "M4", "M5", "M6", "M7", "L4", "L5", "L6", "L7", "??", "??", "??", "??" }, |
| 21 | 21 | { "ASTAT", "MSTAT", "SSTAT", "IMASK", "ICNTL", "CNTR", "SB", "PX", "RX0", "TX0", "RX1", "TX1", "IFC", "OWRCNTR", "??", "??" } |
| 22 | 22 | }; |
| 23 | static const char *dual_xreg[] = { "AX0", "AX1", "MX0", "MX1" }; | |
| 24 | static const char *dual_yreg[] = { "AY0", "AY1", "MY0", "MY1" }; | |
| 23 | static const char *const dual_xreg[] = { "AX0", "AX1", "MX0", "MX1" }; | |
| 24 | static const char *const dual_yreg[] = { "AY0", "AY1", "MY0", "MY1" }; | |
| 25 | 25 | |
| 26 | static const char *condition[] = | |
| 26 | static const char *const condition[] = | |
| 27 | 27 | { |
| 28 | 28 | "IF EQ ", |
| 29 | 29 | "IF NE ", |
| r1386 | r1387 | |
| 43 | 43 | "" |
| 44 | 44 | }; |
| 45 | 45 | |
| 46 | static const char *do_condition[] = | |
| 46 | static const char *const do_condition[] = | |
| 47 | 47 | { |
| 48 | 48 | "NE", |
| 49 | 49 | "EQ", |
| r1386 | r1387 | |
| 63 | 63 | "FOREVER" |
| 64 | 64 | }; |
| 65 | 65 | |
| 66 | static const char *alumac_op[][2] = | |
| 66 | static const char *const alumac_op[][2] = | |
| 67 | 67 | { |
| 68 | 68 | { "", "" }, |
| 69 | 69 | { "%s = %s * %s (RND)", "%s = %s * %s (RND)" }, |
| r1386 | r1387 | |
| 100 | 100 | { "%s = ABS %s", "%s = ABS %s" } |
| 101 | 101 | }; |
| 102 | 102 | |
| 103 | static const char *shift_op[] = | |
| 103 | static const char *const shift_op[] = | |
| 104 | 104 | { |
| 105 | 105 | "SR = LSHIFT %s (HI)", |
| 106 | 106 | "SR = SR OR LSHIFT %s (HI)", |
| r1386 | r1387 | |
| 120 | 120 | "SB = EXPADJ %s", |
| 121 | 121 | }; |
| 122 | 122 | |
| 123 | static const char *shift_by_op[] = | |
| 123 | static const char *const shift_by_op[] = | |
| 124 | 124 | { |
| 125 | 125 | "SR = LSHIFT %s BY %d (HI)", |
| 126 | 126 | "SR = SR OR LSHIFT %s BY %d (HI)", |
| r1386 | r1387 | |
| 140 | 140 | "???" |
| 141 | 141 | }; |
| 142 | 142 | |
| 143 | static const char *constants[] = | |
| 143 | static const char *const constants[] = | |
| 144 | 144 | { |
| 145 | 145 | "$0001", |
| 146 | 146 | "$FFFE", |
| r1386 | r1387 | |
|---|---|---|
| 458 | 458 | return context; |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | static UINT32 regmap[4][16] = | |
| 461 | static const UINT32 regmap[4][16] = | |
| 462 | 462 | { |
| 463 | 463 | { /* DSP32 compatible mode */ |
| 464 | 464 | PIO_PAR|LOWER, PIO_PAR|UPPER, PIO_PDR|LOWER, PIO_PDR|UPPER, |
| r1386 | r1387 | |
|---|---|---|
| 22 | 22 | CODE CODE |
| 23 | 23 | ***************************************************************************/ |
| 24 | 24 | |
| 25 | static const char *sizesuffix[] = { "", "e" }; | |
| 26 | static const char *unarysign[] = { "", "-" }; | |
| 27 | static const char *sign[] = { "+", "-" }; | |
| 28 | static const char *aMvals[] = { "a0", "a1", "a2", "a3", "0.0", "1.0", "Format 4", "Reserved" }; | |
| 29 | static const char *memsuffix[] = { "h", "l", "", "e" }; | |
| 30 | static const char *functable[] = | |
| 25 | static const char *const sizesuffix[] = { "", "e" }; | |
| 26 | static const char *const unarysign[] = { "", "-" }; | |
| 27 | static const char *const sign[] = { "+", "-" }; | |
| 28 | static const char *const aMvals[] = { "a0", "a1", "a2", "a3", "0.0", "1.0", "Format 4", "Reserved" }; | |
| 29 | static const char *const memsuffix[] = { "h", "l", "", "e" }; | |
| 30 | static const char *const functable[] = | |
| 31 | 31 | { |
| 32 | 32 | "ic", "oc", "float", "int", "round", "ifalt", "ifaeq", "ifagt", |
| 33 | 33 | "reserved8", "reserved9", "float24", "int24", "ieee", "dsp", "seed", "reservedf" |
| 34 | 34 | }; |
| 35 | static const char *condtable[] = | |
| 35 | static const char *const condtable[] = | |
| 36 | 36 | { |
| 37 | 37 | "false", "true", |
| 38 | 38 | "pl", "mi", |
| r1386 | r1387 | |
| 67 | 67 | "!?1e", "?1e", |
| 68 | 68 | "!?1f", "?1f" |
| 69 | 69 | }; |
| 70 | static const char *regname[] = | |
| 70 | static const char *const regname[] = | |
| 71 | 71 | { |
| 72 | 72 | "0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", |
| 73 | 73 | "r8", "r9", "r10", "r11", "r12", "r13", "r14", "pc", |
| 74 | 74 | "0", "r15", "r16", "r17", "r18", "r19", "-1", "1", |
| 75 | 75 | "r20", "r21", "dauc", "ioc", "res1c", "r22", "pcsh", "res1f" |
| 76 | 76 | }; |
| 77 | static const char *regnamee[] = | |
| 77 | static const char *const regnamee[] = | |
| 78 | 78 | { |
| 79 | 79 | "0", "r1e", "r2e", "r3e", "r4e", "r5e", "r6e", "r7e", |
| 80 | 80 | "r8e", "r9e", "r10e", "r11e", "r12e", "r13e", "r14e", "pce", |
| r1386 | r1387 | |
|---|---|---|
| 96 | 96 | FORWARD DECLARATIONS |
| 97 | 97 | ***************************************************************************/ |
| 98 | 98 | |
| 99 | extern void (*dsp32ops[])(void); | |
| 99 | extern void (*const dsp32ops[])(void); | |
| 100 | 100 | |
| 101 | 101 | |
| 102 | 102 | |
| r1386 | r1387 | |
| 2534 | 2534 | FUNCTION TABLE |
| 2535 | 2535 | ***************************************************************************/ |
| 2536 | 2536 | |
| 2537 | void (*dsp32ops[])(void) = | |
| 2537 | void (*const dsp32ops[])(void) = | |
| 2538 | 2538 | { |
| 2539 | 2539 | nop, goto_t, goto_pl, goto_mi, goto_ne, goto_eq, goto_vc, goto_vs, /* 00 */ |
| 2540 | 2540 | goto_cc, goto_cs, goto_ge, goto_lt, goto_gt, goto_le, goto_hi, goto_ls, |
| r1386 | r1387 | |
|---|---|---|
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | |
| 22 | static UINT16 fp_control[4] = { 0x023f, 0x063f, 0x0a3f, 0x0e3f }; | |
| 23 | static UINT32 sse_control[4] = { 0x9fc0, 0xbfc0, 0xdfc0, 0xffc0 }; | |
| 22 | static const UINT16 fp_control[4] = { 0x023f, 0x063f, 0x0a3f, 0x0e3f }; | |
| 23 | static const UINT32 sse_control[4] = { 0x9fc0, 0xbfc0, 0xdfc0, 0xffc0 }; | |
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | static void append_entry_point(drc_core *drc); |
| r1386 | r1387 | |
|---|---|---|
| 7 | 7 | #include "cpuintrf.h" |
| 8 | 8 | #include <stdarg.h> |
| 9 | 9 | |
| 10 | static const char *reg[32] = | |
| 10 | static const char *const reg[32] = | |
| 11 | 11 | { |
| 12 | 12 | "0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", |
| 13 | 13 | "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", |
| r1386 | r1387 | |
| 15 | 15 | "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31" |
| 16 | 16 | }; |
| 17 | 17 | |
| 18 | static const char *vreg[32] = | |
| 18 | static const char *const vreg[32] = | |
| 19 | 19 | { |
| 20 | 20 | " v0", " v1", " v2", " v3", " v4", " v5", " v6", " v7", |
| 21 | 21 | " v8", " v9", "v10", "v11", "v12", "v13", "v14", "v15", |
| r1386 | r1387 | |
| 23 | 23 | "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31" |
| 24 | 24 | }; |
| 25 | 25 | |
| 26 | static const char *cop0_regs[32] = | |
| 26 | static const char *const cop0_regs[32] = | |
| 27 | 27 | { |
| 28 | 28 | "SP_MEM_ADDR", "SP_DRAM_ADDR", "SP_RD_LEN", "SP_WR_LEN", |
| 29 | 29 | "SP_STATUS", "SP_DMA_FULL", "SP_DMA_BUSY", "SP_SEMAPHORE", |
| r1386 | r1387 | |
| 35 | 35 | "???", "???", "???", "???" |
| 36 | 36 | }; |
| 37 | 37 | |
| 38 | static const char *element[16] = | |
| 38 | static const char *const element[16] = | |
| 39 | 39 | { |
| 40 | 40 | "", "[???]", "[00224466]", "[11335577]", "[00004444]", "[11115555]", "[22226666]", "[33337777]", |
| 41 | 41 | "[00000000]", "[11111111]", "[22222222]", "[33333333]", "[44444444]", "[55555555]", "[66666666]", "[77777777]" |
| 42 | 42 | }; |
| 43 | 43 | |
| 44 | static const char *element2[16] = | |
| 44 | static const char *const element2[16] = | |
| 45 | 45 | { |
| 46 | 46 | "01234567", "????????", "00224466", "11335577", "00004444", "11115555", "22226666", "33337777", |
| 47 | 47 | "00000000", "11111111", "22222222", "33333333", "44444444", "55555555", "66666666", "77777777" |
| r1386 | r1387 | |
|---|---|---|
| 53 | 53 | |
| 54 | 54 | #include "410ops.c" |
| 55 | 55 | |
| 56 | static s_opcode cop410_opcode_op33[256]= | |
| 56 | static const s_opcode cop410_opcode_op33[256]= | |
| 57 | 57 | { |
| 58 | 58 | {1, illegal },{1, skgbz0 },{1, illegal },{1, skgbz2 },{1, illegal },{1, illegal },{1, illegal },{1, illegal }, |
| 59 | 59 | {1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal }, |
| r1386 | r1387 | |
| 94 | 94 | (*(cop410_opcode_op33[ROM(PC++)].function))(); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | static s_opcode cop410_opcode_main[256]= | |
| 97 | static const s_opcode cop410_opcode_main[256]= | |
| 98 | 98 | { |
| 99 | 99 | {1, clra },{1, skmbz0 },{1, xor },{1, skmbz2 },{1, xis0 },{1, ld0 },{1, x0 },{1, xds0 }, |
| 100 | 100 | {1, lbi0_9 },{1, lbi0_10 },{1, lbi0_11 },{1, lbi0_12 },{1, lbi0_13 },{1, lbi0_14 },{1, lbi0_15 },{1, lbi0_0 }, |
| r1386 | r1387 | |
|---|---|---|
| 57 | 57 | |
| 58 | 58 | #include "420ops.c" |
| 59 | 59 | |
| 60 | static s_opcode cop420_opcode_op33[256]= | |
| 60 | static const s_opcode cop420_opcode_op33[256]= | |
| 61 | 61 | { |
| 62 | 62 | {1, inil },{1, skgbz0 },{1, illegal },{1, skgbz2 },{1, illegal },{1, illegal },{1, illegal },{1, illegal }, |
| 63 | 63 | {1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal }, |
| r1386 | r1387 | |
| 98 | 98 | (*(cop420_opcode_op33[ROM(PC++)].function))(); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | static s_opcode cop420_opcode_main[256]= | |
| 101 | static const s_opcode cop420_opcode_main[256]= | |
| 102 | 102 | { |
| 103 | 103 | {1, clra },{1, skmbz0 },{1, xor },{1, skmbz2 },{1, xis0 },{1, ld0 },{1, x0 },{1, xds0 }, |
| 104 | 104 | {1, lbi0_9 },{1, lbi0_10 },{1, lbi0_11 },{1, lbi0_12 },{1, lbi0_13 },{1, lbi0_14 },{1, lbi0_15 },{1, lbi0_0 }, |
| r1386 | r1387 | |
|---|---|---|
| 97 | 97 | }; |
| 98 | 98 | |
| 99 | 99 | |
| 100 | static const char *token[]= | |
| 100 | static const char *const token[]= | |
| 101 | 101 | { |
| 102 | 102 | "adc", "and", "asl", "bcc", "bcs", "beq", "bit", "bmi", |
| 103 | 103 | "bne", "bpl", "m6502_brk", "bvc", "bvs", "clc", "cld", "cli", |
| r1386 | r1387 | |
|---|---|---|
| 393 | 393 | OP(df) { RD_DUM; ILL; } /* 2 ILL / 5 BBS5 ZPG ?? */ |
| 394 | 394 | OP(ff) { RD_DUM; ILL; } /* 2 ILL / 5 BBS7 ZPG ?? */ |
| 395 | 395 | |
| 396 | static void (*insndeco16[0x100])(void) = { | |
| 396 | static void (*const insndeco16[0x100])(void) = { | |
| 397 | 397 | deco16_00,deco16_01,deco16_02,deco16_03,deco16_04,deco16_05,deco16_06,deco16_07, |
| 398 | 398 | deco16_08,deco16_09,deco16_0a,deco16_0b,deco16_0c,deco16_0d,deco16_0e,deco16_0f, |
| 399 | 399 | deco16_10,deco16_11,deco16_12,deco16_13,deco16_14,deco16_15,deco16_16,deco16_17, |
| r1386 | r1387 | |
|---|---|---|
| 125 | 125 | |
| 126 | 126 | |
| 127 | 127 | typedef struct { |
| 128 | void (**insn)(void); /* pointer to the function pointer table */ | |
| 128 | void (*const *insn)(void); /* pointer to the function pointer table */ | |
| 129 | 129 | PAIR ppc; /* previous program counter */ |
| 130 | 130 | PAIR pc; /* program counter */ |
| 131 | 131 | PAIR sp; /* stack pointer (always 100 - 1FF) */ |
| r1386 | r1387 | |
|---|---|---|
| 43 | 43 | * op temp cycles rdmem opc wrmem ********************/ |
| 44 | 44 | OP(63) { BSR; } /* 5? BSR */ |
| 45 | 45 | |
| 46 | static void (*insn65sc02[0x100])(void) = { | |
| 46 | static void (*const insn65sc02[0x100])(void) = { | |
| 47 | 47 | m65c02_00,m65c02_01,m65c02_02,m65c02_03,m65c02_04,m65c02_05,m65c02_06,m65c02_07, |
| 48 | 48 | m65c02_08,m65c02_09,m65c02_0a,m65c02_0b,m65c02_0c,m65c02_0d,m65c02_0e,m65c02_0f, |
| 49 | 49 | m65c02_10,m65c02_11,m65c02_12,m65c02_13,m65c02_14,m65c02_15,m65c02_16,m65c02_17, |
| r1386 | r1387 | |
|---|---|---|
| 60 | 60 | OP(7d) { int tmp; RD_ABX_P; ADC_NES; } /* 4 ADC ABX page penalty */ |
| 61 | 61 | OP(fd) { int tmp; RD_ABX_P; SBC_NES; } /* 4 SBC ABX page penalty */ |
| 62 | 62 | |
| 63 | static void (*insn2a03[0x100])(void) = { | |
| 63 | static void (*const insn2a03[0x100])(void) = { | |
| 64 | 64 | m6502_00,m6502_01,m6502_02,m6502_03,m6502_04,m6502_05,m6502_06,m6502_07, |
| 65 | 65 | m6502_08,m6502_09,m6502_0a,m6502_0b,m6502_0c,m6502_0d,m6502_0e,m6502_0f, |
| 66 | 66 | m6502_10,m6502_11,m6502_12,m6502_13,m6502_14,m6502_15,m6502_16,m6502_17, |
| r1386 | r1387 | |
| 94 | 94 | m6502_f0,n2a03_f1,m6502_f2,m6502_f3,m6502_f4,n2a03_f5,m6502_f6,m6502_f7, |
| 95 | 95 | m6502_f8,n2a03_f9,m6502_fa,m6502_fb,m6502_fc,n2a03_fd,m6502_fe,m6502_ff |
| 96 | 96 | }; |
| 97 |
| r1386 | r1387 | |
|---|---|---|
| 59 | 59 | typedef struct |
| 60 | 60 | { |
| 61 | 61 | UINT8 subtype; /* currently selected cpu sub type */ |
| 62 | void (**insn)(void); /* pointer to the function pointer table */ | |
| 62 | void (*const *insn)(void); /* pointer to the function pointer table */ | |
| 63 | 63 | PAIR ppc; /* previous program counter */ |
| 64 | 64 | PAIR pc; /* program counter */ |
| 65 | 65 | PAIR sp; /* stack pointer (always 100 - 1FF) */ |
| r1386 | r1387 | |
| 127 | 127 | * |
| 128 | 128 | *****************************************************************************/ |
| 129 | 129 | |
| 130 | static void m6502_common_init(int index, int clock, const void *config, int (*irqcallback)(int), UINT8 subtype, void (**insn)(void), const char *type) | |
| 130 | static void m6502_common_init(int index, int clock, const void *config, int (*irqcallback)(int), UINT8 subtype, void (*const *insn)(void), const char *type) | |
| 131 | 131 | { |
| 132 | 132 | memset(&m6502, 0, sizeof(m6502)); |
| 133 | 133 | m6502.irq_callback = irqcallback; |
| r1386 | r1387 | |
|---|---|---|
| 62 | 62 | |
| 63 | 63 | typedef struct { |
| 64 | 64 | UINT8 subtype; /* currently selected cpu sub type */ |
| 65 | void (**insn)(void); /* pointer to the function pointer table */ | |
| 65 | void (*const *insn)(void); /* pointer to the function pointer table */ | |
| 66 | 66 | PAIR ppc; /* previous program counter */ |
| 67 | 67 | /* pc.w.h contains the current page pc_bank.w.h for better speed */ |
| 68 | 68 | PAIR pc; /* program counter */ |
| r1386 | r1387 | |
|---|---|---|
| 323 | 323 | |
| 324 | 324 | /* and here's the array of function pointers */ |
| 325 | 325 | |
| 326 | static void (*insn6502[0x100])(void) = { | |
| 326 | static void (*const insn6502[0x100])(void) = { | |
| 327 | 327 | m6502_00,m6502_01,m6502_02,m6502_03,m6502_04,m6502_05,m6502_06,m6502_07, |
| 328 | 328 | m6502_08,m6502_09,m6502_0a,m6502_0b,m6502_0c,m6502_0d,m6502_0e,m6502_0f, |
| 329 | 329 | m6502_10,m6502_11,m6502_12,m6502_13,m6502_14,m6502_15,m6502_16,m6502_17, |
| r1386 | r1387 | |
|---|---|---|
| 326 | 326 | OP(df) { int tmp; RD_ZPG; BBS(5); } /* 5-7 BBS5 ZPG */ |
| 327 | 327 | OP(ff) { int tmp; RD_ZPG; BBS(7); } /* 5-7 BBS7 ZPG */ |
| 328 | 328 | |
| 329 | static void (*insn65c02[0x100])(void) = { | |
| 329 | static void (*const insn65c02[0x100])(void) = { | |
| 330 | 330 | m65c02_00,m65c02_01,m65c02_02,m65c02_03,m65c02_04,m65c02_05,m65c02_06,m65c02_07, |
| 331 | 331 | m65c02_08,m65c02_09,m65c02_0a,m65c02_0b,m65c02_0c,m65c02_0d,m65c02_0e,m65c02_0f, |
| 332 | 332 | m65c02_10,m65c02_11,m65c02_12,m65c02_13,m65c02_14,m65c02_15,m65c02_16,m65c02_17, |
| r1386 | r1387 | |
|---|---|---|
| 314 | 314 | OP(df) { int tmp; RD_ABX_NP; WB_EA; DCP; WB_EA; } /* 7 DCP ABX */ |
| 315 | 315 | OP(ff) { int tmp; RD_ABX_NP; WB_EA; ISB; WB_EA; } /* 7 ISB ABX */ |
| 316 | 316 | |
| 317 | static void (*insn6509[0x100])(void) = { | |
| 317 | static void (*const insn6509[0x100])(void) = { | |
| 318 | 318 | m6509_00,m6509_01,m6509_02,m6509_03,m6509_04,m6509_05,m6509_06,m6509_07, |
| 319 | 319 | m6509_08,m6509_09,m6509_0a,m6509_0b,m6509_0c,m6509_0d,m6509_0e,m6509_0f, |
| 320 | 320 | m6509_10,m6509_11,m6509_12,m6509_13,m6509_14,m6509_15,m6509_16,m6509_17, |
| r1386 | r1387 | |
|---|---|---|
| 326 | 326 | OP(ff) { int tmp; RD_ZPG; BBS(7); } /* 4 BBS7 ZPG */ |
| 327 | 327 | |
| 328 | 328 | #ifdef M4510 |
| 329 | static void (*insn4510[0x100])(void) = { | |
| 329 | static void (*const insn4510[0x100])(void) = { | |
| 330 | 330 | m4510_00,m4510_01,m4510_02,m4510_03,m4510_04,m4510_05,m4510_06,m4510_07, |
| 331 | 331 | m4510_08,m4510_09,m4510_0a,m4510_0b,m4510_0c,m4510_0d,m4510_0e,m4510_0f, |
| 332 | 332 | m4510_10,m4510_11,m4510_12,m4510_13,m4510_14,m4510_15,m4510_16,m4510_17, |
| r1386 | r1387 | |
| 361 | 361 | m4510_f8,m4510_f9,m4510_fa,m4510_fb,m4510_fc,m4510_fd,m4510_fe,m4510_ff |
| 362 | 362 | }; |
| 363 | 363 | #else |
| 364 | static void (*insn65ce02[0x100])(void) = { | |
| 364 | static void (*const insn65ce02[0x100])(void) = { | |
| 365 | 365 | m65ce02_00,m65ce02_01,m65ce02_02,m65ce02_03,m65ce02_04,m65ce02_05,m65ce02_06,m65ce02_07, |
| 366 | 366 | m65ce02_08,m65ce02_09,m65ce02_0a,m65ce02_0b,m65ce02_0c,m65ce02_0d,m65ce02_0e,m65ce02_0f, |
| 367 | 367 | m65ce02_10,m65ce02_11,m65ce02_12,m65ce02_13,m65ce02_14,m65ce02_15,m65ce02_16,m65ce02_17, |
| r1386 | r1387 | |
|---|---|---|
| 23 | 23 | static const UINT8 convert_zero[32] = |
| 24 | 24 | { 32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 }; |
| 25 | 25 | |
| 26 | static const char *condition[32] = | |
| 26 | static const char *const condition[32] = | |
| 27 | 27 | { |
| 28 | 28 | "", |
| 29 | 29 | "nz,", |
| r1386 | r1387 | |
|---|---|---|
| 92 | 92 | int isdsp; |
| 93 | 93 | int op; |
| 94 | 94 | int interrupt_cycles; |
| 95 | void (**table)(void); | |
| 95 | void (*const *table)(void); | |
| 96 | 96 | int (*irq_callback)(int irqline); |
| 97 | 97 | void (*cpu_interrupt)(void); |
| 98 | 98 | } jaguar_regs; |
| r1386 | r1387 | |
| 197 | 197 | static void subqt_n_rn(void); |
| 198 | 198 | static void xor_rn_rn(void); |
| 199 | 199 | |
| 200 | static void (*gpu_op_table[64])(void) = | |
| 200 | static void (*const gpu_op_table[64])(void) = | |
| 201 | 201 | { |
| 202 | 202 | /* 00-03 */ add_rn_rn, addc_rn_rn, addq_n_rn, addqt_n_rn, |
| 203 | 203 | /* 04-07 */ sub_rn_rn, subc_rn_rn, subq_n_rn, subqt_n_rn, |
| r1386 | r1387 | |
| 217 | 217 | /* 60-63 */ store_rn_r14rn, store_rn_r15rn, sat24_rn, pack_rn |
| 218 | 218 | }; |
| 219 | 219 | |
| 220 | static void (*dsp_op_table[64])(void) = | |
| 220 | static void (*const dsp_op_table[64])(void) = | |
| 221 | 221 | { |
| 222 | 222 | /* 00-03 */ add_rn_rn, addc_rn_rn, addq_n_rn, addqt_n_rn, |
| 223 | 223 | /* 04-07 */ sub_rn_rn, subc_rn_rn, subq_n_rn, subqt_n_rn, |
| r1386 | r1387 | |
|---|---|---|
| 10 | 10 | #include "cpuintrf.h" |
| 11 | 11 | |
| 12 | 12 | |
| 13 | static const char* reg[] = | |
| 13 | static const char *const reg[] = | |
| 14 | 14 | { |
| 15 | 15 | "-", "X", "Y", "A", "ST", "STACK", "PC", "P", "AL", "?", "?", "XST", "PL", "?", "?", "SRCR", "BRCR", "BRER", |
| 16 | 16 | "XRD0", "XRD1", "AE", "DIOR", "GR22", "GR23", "EXT0", "EXT1", "EXT2", "EXT3", "EXT4", "EXT5", "EXT6", "EXT7" |
| 17 | 17 | }; |
| 18 | 18 | |
| 19 | static const char* rij[] = | |
| 19 | static const char *const rij[] = | |
| 20 | 20 | { |
| 21 | 21 | "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7" |
| 22 | 22 | }; |
| 23 | 23 | |
| 24 | static const char* erij[] = | |
| 24 | static const char *const erij[] = | |
| 25 | 25 | { |
| 26 | 26 | "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7" |
| 27 | 27 | }; |
| 28 | 28 | |
| 29 | static const char* modifier[] = | |
| 29 | static const char *const modifier[] = | |
| 30 | 30 | { |
| 31 | 31 | "", "+!", "-", "+" |
| 32 | 32 | }; |
| 33 | 33 | |
| 34 | static const char* cond[] = | |
| 34 | static const char *const cond[] = | |
| 35 | 35 | { |
| 36 | 36 | "always", "always", "RESERVED", "RESERVED", "gpi0=0", "gpi0=1", "gpi1=0", "gpi1=1", "l=0", "l=1", "z=0", "z=1", "ov=0", "ov=1", "n=0", "n=1", |
| 37 | 37 | "diof=0", "diof=1", "gpi2=0", "gpi2=1", "gpi3=0", "gpi3=1", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED" |
| 38 | 38 | }; |
| 39 | 39 | |
| 40 | static const char* acc_op[] = | |
| 40 | static const char *const acc_op[] = | |
| 41 | 41 | { |
| 42 | 42 | "ror", "rol", "shr", "shl", "inc", "dec", "neg", "abs" |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | 45 | // pag. 81 uses different addresses! |
| 46 | static const char* flag_op[] = | |
| 46 | static const char *const flag_op[] = | |
| 47 | 47 | { |
| 48 | 48 | "?", "?", "resl", "setl", "resie", "setie", "?", "?", "resop", "setop", "?", "?", "?", "?", "res", "set" |
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | 51 | |
| 52 | static const char* st_mod[] = | |
| 52 | static const char *const st_mod[] = | |
| 53 | 53 | { |
| 54 | 54 | "macs", "rpl", "gpo", "rb", "gpo0", "gpo1", "gpo2", "gpo3", "wte", "diof", "bre", "reserved", "reserved", "reserved", "reserved", "reserved" |
| 55 | 55 | }; |
| r1386 | r1387 | |
|---|---|---|
| 1 | static UINT16 DAA[2048] = { | |
| 1 | static const UINT16 DAA[2048] = { | |
| 2 | 2 | (0x00<<8) +ZF +VF , |
| 3 | 3 | (0x01<<8) , |
| 4 | 4 | (0x02<<8) , |
| r1386 | r1387 | |
|---|---|---|
| 1 | static PPC_OPCODE ppcdrc_opcode_common[] = | |
| 1 | static const PPC_OPCODE ppcdrc_opcode_common[] = | |
| 2 | 2 | { |
| 3 | 3 | /*code subcode handler */ |
| 4 | 4 | { 31, 266, recompile_addx }, |
| r1386 | r1387 | |
|---|---|---|
| 4 | 4 | #include "ppc.h" |
| 5 | 5 | #include "debugger.h" |
| 6 | 6 | |
| 7 | #if (HAS_PPC603 || HAS_PPC601) | |
| 7 | #if (HAS_PPC603 || HAS_PPC601 || HAS_PPC604) | |
| 8 | 8 | void ppc603_exception(int exception); |
| 9 | 9 | #endif |
| 10 | 10 | #if (HAS_PPC602) |
| r1386 | r1387 | |
| 71 | 71 | if((ppc.msr & 0x2000) == 0){ \ |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 74 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240) | |
| 75 | 75 | static UINT32 ppc_field_xlat[256]; |
| 76 | 76 | #endif |
| 77 | 77 | |
| r1386 | r1387 | |
| 249 | 249 | FPR fpr[32]; |
| 250 | 250 | UINT32 sr[16]; |
| 251 | 251 | |
| 252 | #if HAS_PPC603 || HAS_PPC601 || HAS_MPC8240 | |
| 252 | #if HAS_PPC603 || HAS_PPC601 || HAS_MPC8240 || HAS_PPC604 | |
| 253 | 253 | int is603; |
| 254 | 254 | #endif |
| 255 | 255 | #if HAS_PPC602 |
| r1386 | r1387 | |
| 281 | 281 | void (*write16_unaligned)(offs_t address, UINT16 data); |
| 282 | 282 | void (*write32_unaligned)(offs_t address, UINT32 data); |
| 283 | 283 | void (*write64_unaligned)(offs_t address, UINT64 data); |
| 284 | ||
| 285 | void (* optable19[1024])(UINT32); | |
| 286 | void (* optable31[1024])(UINT32); | |
| 287 | void (* optable59[1024])(UINT32); | |
| 288 | void (* optable63[1024])(UINT32); | |
| 289 | void (* optable[64])(UINT32); | |
| 284 | 290 | } PPC_REGS; |
| 285 | 291 | |
| 286 | 292 | |
| r1386 | r1387 | |
| 317 | 323 | |
| 318 | 324 | INLINE int IS_PPC603(void) |
| 319 | 325 | { |
| 320 | #if HAS_PPC603 || HAS_PPC601 | |
| 326 | #if HAS_PPC603 || HAS_PPC601 || HAS_PPC604 | |
| 321 | 327 | return ppc.is603; |
| 322 | 328 | #else |
| 323 | 329 | return 0; |
| r1386 | r1387 | |
| 480 | 486 | case SPR_PVR: return; |
| 481 | 487 | } |
| 482 | 488 | |
| 483 | #if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601) | |
| 489 | #if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601 || HAS_PPC604) | |
| 484 | 490 | if(IS_PPC602() || IS_PPC603()) { |
| 485 | 491 | switch(spr) |
| 486 | 492 | { |
| r1386 | r1387 | |
| 492 | 498 | if (IS_PPC602()) |
| 493 | 499 | ppc602_exception(EXCEPTION_DECREMENTER); |
| 494 | 500 | #endif |
| 495 | #if HAS_PPC603 || HAS_PPC601 | |
| 501 | #if HAS_PPC603 || HAS_PPC601 || HAS_PPC604 | |
| 496 | 502 | if (IS_PPC603()) |
| 497 | 503 | ppc603_exception(EXCEPTION_DECREMENTER); |
| 498 | 504 | #endif |
| r1386 | r1387 | |
| 691 | 697 | } |
| 692 | 698 | #endif |
| 693 | 699 | |
| 694 | #if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601) | |
| 700 | #if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601 || HAS_PPC604) | |
| 695 | 701 | if (IS_PPC603() || IS_PPC602()) |
| 696 | 702 | { |
| 697 | 703 | switch (spr) |
| r1386 | r1387 | |
| 817 | 823 | |
| 818 | 824 | /***********************************************************************/ |
| 819 | 825 | |
| 820 | static void (* optable19[1024])(UINT32); | |
| 821 | static void (* optable31[1024])(UINT32); | |
| 822 | static void (* optable59[1024])(UINT32); | |
| 823 | static void (* optable63[1024])(UINT32); | |
| 824 | static void (* optable[64])(UINT32); | |
| 825 | ||
| 826 | 826 | #include "ppc_mem.c" |
| 827 | 827 | |
| 828 | 828 | #if (HAS_PPC403) |
| r1386 | r1387 | |
| 833 | 833 | #include "ppc602.c" |
| 834 | 834 | #endif |
| 835 | 835 | |
| 836 | #if (HAS_PPC603 || HAS_PPC601 || HAS_MPC8240) | |
| 836 | #if (HAS_PPC603 || HAS_PPC601 || HAS_MPC8240 || HAS_PPC604) | |
| 837 | 837 | #include "ppc603.c" |
| 838 | 838 | #endif |
| 839 | 839 | |
| r1386 | r1387 | |
| 851 | 851 | memset(&ppc, 0, sizeof(ppc)); |
| 852 | 852 | |
| 853 | 853 | for( i=0; i < 64; i++ ) { |
| 854 | optable[i] = ppc_invalid; | |
| 854 | ppc.optable[i] = ppc_invalid; | |
| 855 | 855 | } |
| 856 | 856 | for( i=0; i < 1024; i++ ) { |
| 857 | optable19[i] = ppc_invalid; | |
| 858 | optable31[i] = ppc_invalid; | |
| 859 | optable59[i] = ppc_invalid; | |
| 860 | optable63[i] = ppc_invalid; | |
| 857 | ppc.optable19[i] = ppc_invalid; | |
| 858 | ppc.optable31[i] = ppc_invalid; | |
| 859 | ppc.optable59[i] = ppc_invalid; | |
| 860 | ppc.optable63[i] = ppc_invalid; | |
| 861 | 861 | } |
| 862 | 862 | |
| 863 | 863 | /* Fill the opcode tables */ |
| r1386 | r1387 | |
| 866 | 866 | switch(ppc_opcode_common[i].code) |
| 867 | 867 | { |
| 868 | 868 | case 19: |
| 869 | optable19[ppc_opcode_common[i].subcode] = ppc_opcode_common[i].handler; | |
| 869 | ppc.optable19[ppc_opcode_common[i].subcode] = ppc_opcode_common[i].handler; | |
| 870 | 870 | break; |
| 871 | 871 | |
| 872 | 872 | case 31: |
| 873 | optable31[ppc_opcode_common[i].subcode] = ppc_opcode_common[i].handler; | |
| 873 | ppc.optable31[ppc_opcode_common[i].subcode] = ppc_opcode_common[i].handler; | |
| 874 | 874 | break; |
| 875 | 875 | |
| 876 | 876 | case 59: |
| r1386 | r1387 | |
| 878 | 878 | break; |
| 879 | 879 | |
| 880 | 880 | default: |
| 881 | optable[ppc_opcode_common[i].code] = ppc_opcode_common[i].handler; | |
| 881 | ppc.optable[ppc_opcode_common[i].code] = ppc_opcode_common[i].handler; | |
| 882 | 882 | } |
| 883 | 883 | |
| 884 | 884 | } |
| r1386 | r1387 | |
| 908 | 908 | ppc_init(); |
| 909 | 909 | |
| 910 | 910 | /* PPC403 specific opcodes */ |
| 911 | optable31[454] = ppc_dccci; | |
| 912 | optable31[486] = ppc_dcread; | |
| 913 | optable31[262] = ppc_icbt; | |
| 914 | optable31[966] = ppc_iccci; | |
| 915 | optable31[998] = ppc_icread; | |
| 916 | optable31[323] = ppc_mfdcr; | |
| 917 | optable31[451] = ppc_mtdcr; | |
| 918 | optable31[131] = ppc_wrtee; | |
| 919 | optable31[163] = ppc_wrteei; | |
| 911 | ppc.optable31[454] = ppc_dccci; | |
| 912 | ppc.optable31[486] = ppc_dcread; | |
| 913 | ppc.optable31[262] = ppc_icbt; | |
| 914 | ppc.optable31[966] = ppc_iccci; | |
| 915 | ppc.optable31[998] = ppc_icread; | |
| 916 | ppc.optable31[323] = ppc_mfdcr; | |
| 917 | ppc.optable31[451] = ppc_mtdcr; | |
| 918 | ppc.optable31[131] = ppc_wrtee; | |
| 919 | ppc.optable31[163] = ppc_wrteei; | |
| 920 | 920 | |
| 921 | 921 | // !!! why is rfci here !!! |
| 922 | optable19[51] = ppc_rfci; | |
| 922 | ppc.optable19[51] = ppc_rfci; | |
| 923 | 923 | |
| 924 | 924 | ppc.spu.rx_timer = timer_alloc(ppc403_spu_rx_callback, NULL); |
| 925 | 925 | ppc.spu.tx_timer = timer_alloc(ppc403_spu_tx_callback, NULL); |
| r1386 | r1387 | |
| 957 | 957 | |
| 958 | 958 | ppc_init() ; |
| 959 | 959 | |
| 960 | optable[48] = ppc_lfs; | |
| 961 | optable[49] = ppc_lfsu; | |
| 962 | optable[50] = ppc_lfd; | |
| 963 | optable[51] = ppc_lfdu; | |
| 964 | optable[52] = ppc_stfs; | |
| 965 | optable[53] = ppc_stfsu; | |
| 966 | optable[54] = ppc_stfd; | |
| 967 | optable[55] = ppc_stfdu; | |
| 968 | optable31[631] = ppc_lfdux; | |
| 969 | optable31[599] = ppc_lfdx; | |
| 970 | optable31[567] = ppc_lfsux; | |
| 971 | optable31[535] = ppc_lfsx; | |
| 972 | optable31[595] = ppc_mfsr; | |
| 973 | optable31[659] = ppc_mfsrin; | |
| 974 | optable31[371] = ppc_mftb; | |
| 975 | optable31[210] = ppc_mtsr; | |
| 976 | optable31[242] = ppc_mtsrin; | |
| 977 | optable31[758] = ppc_dcba; | |
| 978 | optable31[759] = ppc_stfdux; | |
| 979 | optable31[727] = ppc_stfdx; | |
| 980 | optable31[983] = ppc_stfiwx; | |
| 981 | optable31[695] = ppc_stfsux; | |
| 982 | optable31[663] = ppc_stfsx; | |
| 983 | optable31[370] = ppc_tlbia; | |
| 984 | optable31[306] = ppc_tlbie; | |
| 985 | optable31[566] = ppc_tlbsync; | |
| 986 | optable31[310] = ppc_eciwx; | |
| 987 | optable31[438] = ppc_ecowx; | |
| 960 | ppc.optable[48] = ppc_lfs; | |
| 961 | ppc.optable[49] = ppc_lfsu; | |
| 962 | ppc.optable[50] = ppc_lfd; | |
| 963 | ppc.optable[51] = ppc_lfdu; | |
| 964 | ppc.optable[52] = ppc_stfs; | |
| 965 | ppc.optable[53] = ppc_stfsu; | |
| 966 | ppc.optable[54] = ppc_stfd; | |
| 967 | ppc.optable[55] = ppc_stfdu; | |
| 968 | ppc.optable31[631] = ppc_lfdux; | |
| 969 | ppc.optable31[599] = ppc_lfdx; | |
| 970 | ppc.optable31[567] = ppc_lfsux; | |
| 971 | ppc.optable31[535] = ppc_lfsx; | |
| 972 | ppc.optable31[595] = ppc_mfsr; | |
| 973 | ppc.optable31[659] = ppc_mfsrin; | |
| 974 | ppc.optable31[371] = ppc_mftb; | |
| 975 | ppc.optable31[210] = ppc_mtsr; | |
| 976 | ppc.optable31[242] = ppc_mtsrin; | |
| 977 | ppc.optable31[758] = ppc_dcba; | |
| 978 | ppc.optable31[759] = ppc_stfdux; | |
| 979 | ppc.optable31[727] = ppc_stfdx; | |
| 980 | ppc.optable31[983] = ppc_stfiwx; | |
| 981 | ppc.optable31[695] = ppc_stfsux; | |
| 982 | ppc.optable31[663] = ppc_stfsx; | |
| 983 | ppc.optable31[370] = ppc_tlbia; | |
| 984 | ppc.optable31[306] = ppc_tlbie; | |
| 985 | ppc.optable31[566] = ppc_tlbsync; | |
| 986 | ppc.optable31[310] = ppc_eciwx; | |
| 987 | ppc.optable31[438] = ppc_ecowx; | |
| 988 | 988 | |
| 989 | optable63[264] = ppc_fabsx; | |
| 990 | optable63[21] = ppc_faddx; | |
| 991 | optable63[32] = ppc_fcmpo; | |
| 992 | optable63[0] = ppc_fcmpu; | |
| 993 | optable63[14] = ppc_fctiwx; | |
| 994 | optable63[15] = ppc_fctiwzx; | |
| 995 | optable63[18] = ppc_fdivx; | |
| 996 | optable63[72] = ppc_fmrx; | |
| 997 | optable63[136] = ppc_fnabsx; | |
| 998 | optable63[40] = ppc_fnegx; | |
| 999 | optable63[12] = ppc_frspx; | |
| 1000 | optable63[26] = ppc_frsqrtex; | |
| 1001 | optable63[22] = ppc_fsqrtx; | |
| 1002 | optable63[20] = ppc_fsubx; | |
| 1003 | optable63[583] = ppc_mffsx; | |
| 1004 | optable63[70] = ppc_mtfsb0x; | |
| 1005 | optable63[38] = ppc_mtfsb1x; | |
| 1006 | optable63[711] = ppc_mtfsfx; | |
| 1007 | optable63[134] = ppc_mtfsfix; | |
| 1008 | optable63[64] = ppc_mcrfs; | |
| 989 | ppc.optable63[264] = ppc_fabsx; | |
| 990 | ppc.optable63[21] = ppc_faddx; | |
| 991 | ppc.optable63[32] = ppc_fcmpo; | |
| 992 | ppc.optable63[0] = ppc_fcmpu; | |
| 993 | ppc.optable63[14] = ppc_fctiwx; | |
| 994 | ppc.optable63[15] = ppc_fctiwzx; | |
| 995 | ppc.optable63[18] = ppc_fdivx; | |
| 996 | ppc.optable63[72] = ppc_fmrx; | |
| 997 | ppc.optable63[136] = ppc_fnabsx; | |
| 998 | ppc.optable63[40] = ppc_fnegx; | |
| 999 | ppc.optable63[12] = ppc_frspx; | |
| 1000 | ppc.optable63[26] = ppc_frsqrtex; | |
| 1001 | ppc.optable63[22] = ppc_fsqrtx; | |
| 1002 | ppc.optable63[20] = ppc_fsubx; | |
| 1003 | ppc.optable63[583] = ppc_mffsx; | |
| 1004 | ppc.optable63[70] = ppc_mtfsb0x; | |
| 1005 | ppc.optable63[38] = ppc_mtfsb1x; | |
| 1006 | ppc.optable63[711] = ppc_mtfsfx; | |
| 1007 | ppc.optable63[134] = ppc_mtfsfix; | |
| 1008 | ppc.optable63[64] = ppc_mcrfs; | |
| 1009 | 1009 | |
| 1010 | optable59[21] = ppc_faddsx; | |
| 1011 | optable59[18] = ppc_fdivsx; | |
| 1012 | optable59[24] = ppc_fresx; | |
| 1013 | optable59[22] = ppc_fsqrtsx; | |
| 1014 | optable59[20] = ppc_fsubsx; | |
| 1010 | ppc.optable59[21] = ppc_faddsx; | |
| 1011 | ppc.optable59[18] = ppc_fdivsx; | |
| 1012 | ppc.optable59[24] = ppc_fresx; | |
| 1013 | ppc.optable59[22] = ppc_fsqrtsx; | |
| 1014 | ppc.optable59[20] = ppc_fsubsx; | |
| 1015 | 1015 | |
| 1016 | 1016 | for(i = 0; i < 32; i++) |
| 1017 | 1017 | { |
| 1018 | optable63[i * 32 | 29] = ppc_fmaddx; | |
| 1019 | optable63[i * 32 | 28] = ppc_fmsubx; | |
| 1020 | optable63[i * 32 | 25] = ppc_fmulx; | |
| 1021 | optable63[i * 32 | 31] = ppc_fnmaddx; | |
| 1022 | optable63[i * 32 | 30] = ppc_fnmsubx; | |
| 1023 | optable63[i * 32 | 23] = ppc_fselx; | |
| 1018 | ppc.optable63[i * 32 | 29] = ppc_fmaddx; | |
| 1019 | ppc.optable63[i * 32 | 28] = ppc_fmsubx; | |
| 1020 | ppc.optable63[i * 32 | 25] = ppc_fmulx; | |
| 1021 | ppc.optable63[i * 32 | 31] = ppc_fnmaddx; | |
| 1022 | ppc.optable63[i * 32 | 30] = ppc_fnmsubx; | |
| 1023 | ppc.optable63[i * 32 | 23] = ppc_fselx; | |
| 1024 | 1024 | |
| 1025 | optable59[i * 32 | 29] = ppc_fmaddsx; | |
| 1026 | optable59[i * 32 | 28] = ppc_fmsubsx; | |
| 1027 | optable59[i * 32 | 25] = ppc_fmulsx; | |
| 1028 | optable59[i * 32 | 31] = ppc_fnmaddsx; | |
| 1029 | optable59[i * 32 | 30] = ppc_fnmsubsx; | |
| 1025 | ppc.optable59[i * 32 | 29] = ppc_fmaddsx; | |
| 1026 | ppc.optable59[i * 32 | 28] = ppc_fmsubsx; | |
| 1027 | ppc.optable59[i * 32 | 25] = ppc_fmulsx; | |
| 1028 | ppc.optable59[i * 32 | 31] = ppc_fnmaddsx; | |
| 1029 | ppc.optable59[i * 32 | 30] = ppc_fnmsubsx; | |
| 1030 | 1030 | } |
| 1031 | 1031 | |
| 1032 | ppc.optable31[978] = ppc_tlbld; | |
| 1033 | ||
| 1032 | 1034 | for(i = 0; i < 256; i++) |
| 1033 | 1035 | { |
| 1034 | 1036 | ppc_field_xlat[i] = |
| r1386 | r1387 | |
| 1099 | 1101 | |
| 1100 | 1102 | ppc_init() ; |
| 1101 | 1103 | |
| 1102 | optable[48] = ppc_lfs; | |
| 1103 | optable[49] = ppc_lfsu; | |
| 1104 | optable[50] = ppc_lfd; | |
| 1105 | optable[51] = ppc_lfdu; | |
| 1106 | optable[52] = ppc_stfs; | |
| 1107 | optable[53] = ppc_stfsu; | |
| 1108 | optable[54] = ppc_stfd; | |
| 1109 | optable[55] = ppc_stfdu; | |
| 1110 | optable31[631] = ppc_lfdux; | |
| 1111 | optable31[599] = ppc_lfdx; | |
| 1112 | optable31[567] = ppc_lfsux; | |
| 1113 | optable31[535] = ppc_lfsx; | |
| 1114 | optable31[595] = ppc_mfsr; | |
| 1115 | optable31[659] = ppc_mfsrin; | |
| 1116 | optable31[371] = ppc_mftb; | |
| 1117 | optable31[210] = ppc_mtsr; | |
| 1118 | optable31[242] = ppc_mtsrin; | |
| 1119 | optable31[758] = ppc_dcba; | |
| 1120 | optable31[759] = ppc_stfdux; | |
| 1121 | optable31[727] = ppc_stfdx; | |
| 1122 | optable31[983] = ppc_stfiwx; | |
| 1123 | optable31[695] = ppc_stfsux; | |
| 1124 | optable31[663] = ppc_stfsx; | |
| 1125 | optable31[370] = ppc_tlbia; | |
| 1126 | optable31[306] = ppc_tlbie; | |
| 1127 | optable31[566] = ppc_tlbsync; | |
| 1128 | optable31[310] = ppc_eciwx; | |
| 1129 | optable31[438] = ppc_ecowx; | |
| 1104 | ppc.optable[48] = ppc_lfs; | |
| 1105 | ppc.optable[49] = ppc_lfsu; | |
| 1106 | ppc.optable[50] = ppc_lfd; | |
| 1107 | ppc.optable[51] = ppc_lfdu; | |
| 1108 | ppc.optable[52] = ppc_stfs; | |
| 1109 | ppc.optable[53] = ppc_stfsu; | |
| 1110 | ppc.optable[54] = ppc_stfd; | |
| 1111 | ppc.optable[55] = ppc_stfdu; | |
| 1112 | ppc.optable31[631] = ppc_lfdux; | |
| 1113 | ppc.optable31[599] = ppc_lfdx; | |
| 1114 | ppc.optable31[567] = ppc_lfsux; | |
| 1115 | ppc.optable31[535] = ppc_lfsx; | |
| 1116 | ppc.optable31[595] = ppc_mfsr; | |
| 1117 | ppc.optable31[659] = ppc_mfsrin; | |
| 1118 | ppc.optable31[371] = ppc_mftb; | |
| 1119 | ppc.optable31[210] = ppc_mtsr; | |
| 1120 | ppc.optable31[242] = ppc_mtsrin; | |
| 1121 | ppc.optable31[758] = ppc_dcba; | |
| 1122 | ppc.optable31[759] = ppc_stfdux; | |
| 1123 | ppc.optable31[727] = ppc_stfdx; | |
| 1124 | ppc.optable31[983] = ppc_stfiwx; | |
| 1125 | ppc.optable31[695] = ppc_stfsux; | |
| 1126 | ppc.optable31[663] = ppc_stfsx; | |
| 1127 | ppc.optable31[370] = ppc_tlbia; | |
| 1128 | ppc.optable31[306] = ppc_tlbie; | |
| 1129 | ppc.optable31[566] = ppc_tlbsync; | |
| 1130 | ppc.optable31[310] = ppc_eciwx; | |
| 1131 | ppc.optable31[438] = ppc_ecowx; | |
| 1130 | 1132 | |
| 1131 | optable63[264] = ppc_fabsx; | |
| 1132 | optable63[21] = ppc_faddx; | |
| 1133 | optable63[32] = ppc_fcmpo; | |
| 1134 | optable63[0] = ppc_fcmpu; | |
| 1135 | optable63[14] = ppc_fctiwx; | |
| 1136 | optable63[15] = ppc_fctiwzx; | |
| 1137 | optable63[18] = ppc_fdivx; | |
| 1138 | optable63[72] = ppc_fmrx; | |
| 1139 | optable63[136] = ppc_fnabsx; | |
| 1140 | optable63[40] = ppc_fnegx; | |
| 1141 | optable63[12] = ppc_frspx; | |
| 1142 | optable63[26] = ppc_frsqrtex; | |
| 1143 | optable63[22] = ppc_fsqrtx; | |
| 1144 | optable63[20] = ppc_fsubx; | |
| 1145 | optable63[583] = ppc_mffsx; | |
| 1146 | optable63[70] = ppc_mtfsb0x; | |
| 1147 | optable63[38] = ppc_mtfsb1x; | |
| 1148 | optable63[711] = ppc_mtfsfx; | |
| 1149 | optable63[134] = ppc_mtfsfix; | |
| 1150 | optable63[64] = ppc_mcrfs; | |
| 1133 | ppc.optable63[264] = ppc_fabsx; | |
| 1134 | ppc.optable63[21] = ppc_faddx; | |
| 1135 | ppc.optable63[32] = ppc_fcmpo; | |
| 1136 | ppc.optable63[0] = ppc_fcmpu; | |
| 1137 | ppc.optable63[14] = ppc_fctiwx; | |
| 1138 | ppc.optable63[15] = ppc_fctiwzx; | |
| 1139 | ppc.optable63[18] = ppc_fdivx; | |
| 1140 | ppc.optable63[72] = ppc_fmrx; | |
| 1141 | ppc.optable63[136] = ppc_fnabsx; | |
| 1142 | ppc.optable63[40] = ppc_fnegx; | |
| 1143 | ppc.optable63[12] = ppc_frspx; | |
| 1144 | ppc.optable63[26] = ppc_frsqrtex; | |
| 1145 | ppc.optable63[22] = ppc_fsqrtx; | |
| 1146 | ppc.optable63[20] = ppc_fsubx; | |
| 1147 | ppc.optable63[583] = ppc_mffsx; | |
| 1148 | ppc.optable63[70] = ppc_mtfsb0x; | |
| 1149 | ppc.optable63[38] = ppc_mtfsb1x; | |
| 1150 | ppc.optable63[711] = ppc_mtfsfx; | |
| 1151 | ppc.optable63[134] = ppc_mtfsfix; | |
| 1152 | ppc.optable63[64] = ppc_mcrfs; | |
| 1151 | 1153 | |
| 1152 | optable59[21] = ppc_faddsx; | |
| 1153 | optable59[18] = ppc_fdivsx; | |
| 1154 | optable59[24] = ppc_fresx; | |
| 1155 | optable59[22] = ppc_fsqrtsx; | |
| 1156 | optable59[20] = ppc_fsubsx; | |
| 1154 | ppc.optable59[21] = ppc_faddsx; | |
| 1155 | ppc.optable59[18] = ppc_fdivsx; | |
| 1156 | ppc.optable59[24] = ppc_fresx; | |
| 1157 | ppc.optable59[22] = ppc_fsqrtsx; | |
| 1158 | ppc.optable59[20] = ppc_fsubsx; | |
| 1157 | 1159 | |
| 1158 | 1160 | for(i = 0; i < 32; i++) |
| 1159 | 1161 | { |
| 1160 | optable63[i * 32 | 29] = ppc_fmaddx; | |
| 1161 | optable63[i * 32 | 28] = ppc_fmsubx; | |
| 1162 | optable63[i * 32 | 25] = ppc_fmulx; | |
| 1163 | optable63[i * 32 | 31] = ppc_fnmaddx; | |
| 1164 | optable63[i * 32 | 30] = ppc_fnmsubx; | |
| 1165 | optable63[i * 32 | 23] = ppc_fselx; | |
| 1162 | ppc.optable63[i * 32 | 29] = ppc_fmaddx; | |
| 1163 | ppc.optable63[i * 32 | 28] = ppc_fmsubx; | |
| 1164 | ppc.optable63[i * 32 | 25] = ppc_fmulx; | |
| 1165 | ppc.optable63[i * 32 | 31] = ppc_fnmaddx; | |
| 1166 | ppc.optable63[i * 32 | 30] = ppc_fnmsubx; | |
| 1167 | ppc.optable63[i * 32 | 23] = ppc_fselx; | |
| 1166 | 1168 | |
| 1167 | optable59[i * 32 | 29] = ppc_fmaddsx; | |
| 1168 | optable59[i * 32 | 28] = ppc_fmsubsx; | |
| 1169 | optable59[i * 32 | 25] = ppc_fmulsx; | |
| 1170 | optable59[i * 32 | 31] = ppc_fnmaddsx; | |
| 1171 | optable59[i * 32 | 30] = ppc_fnmsubsx; | |
| 1169 | ppc.optable59[i * 32 | 29] = ppc_fmaddsx; | |
| 1170 | ppc.optable59[i * 32 | 28] = ppc_fmsubsx; | |
| 1171 | ppc.optable59[i * 32 | 25] = ppc_fmulsx; | |
| 1172 | ppc.optable59[i * 32 | 31] = ppc_fnmaddsx; | |
| 1173 | ppc.optable59[i * 32 | 30] = ppc_fnmsubsx; | |
| 1172 | 1174 | } |
| 1173 | 1175 | |
| 1174 | 1176 | for(i = 0; i < 256; i++) |
| r1386 | r1387 | |
| 1185 | 1187 | } |
| 1186 | 1188 | |
| 1187 | 1189 | // PPC602 specific opcodes |
| 1188 | optable31[596] = ppc_esa; | |
| 1189 | optable31[628] = ppc_dsa; | |
| 1190 | optable31[1010] = ppc_tlbli; | |
| 1191 | optable31[978] = ppc_tlbld; | |
| 1190 | ppc.optable31[596] = ppc_esa; | |
| 1191 | ppc.optable31[628] = ppc_dsa; | |
| 1192 | ppc.optable31[1010] = ppc_tlbli; | |
| 1193 | ppc.optable31[978] = ppc_tlbld; | |
| 1192 | 1194 | |
| 1193 | 1195 | ppc.is602 = 1; |
| 1194 | 1196 | |
| r1386 | r1387 | |
| 1243 | 1245 | |
| 1244 | 1246 | ppc_init(); |
| 1245 | 1247 | |
| 1246 | optable[48] = ppc_lfs; | |
| 1247 | optable[49] = ppc_lfsu; | |
| 1248 | optable[50] = ppc_lfd; | |
| 1249 | optable[51] = ppc_lfdu; | |
| 1250 | optable[52] = ppc_stfs; | |
| 1251 | optable[53] = ppc_stfsu; | |
| 1252 | optable[54] = ppc_stfd; | |
| 1253 | optable[55] = ppc_stfdu; | |
| 1254 | optable31[631] = ppc_lfdux; | |
| 1255 | optable31[599] = ppc_lfdx; | |
| 1256 | optable31[567] = ppc_lfsux; | |
| 1257 | optable31[535] = ppc_lfsx; | |
| 1258 | optable31[595] = ppc_mfsr; | |
| 1259 | optable31[659] = ppc_mfsrin; | |
| 1260 | optable31[371] = ppc_mftb; | |
| 1261 | optable31[210] = ppc_mtsr; | |
| 1262 | optable31[242] = ppc_mtsrin; | |
| 1263 | optable31[758] = ppc_dcba; | |
| 1264 | optable31[759] = ppc_stfdux; | |
| 1265 | optable31[727] = ppc_stfdx; | |
| 1266 | optable31[983] = ppc_stfiwx; | |
| 1267 | optable31[695] = ppc_stfsux; | |
| 1268 | optable31[663] = ppc_stfsx; | |
| 1269 | optable31[370] = ppc_tlbia; | |
| 1270 | optable31[306] = ppc_tlbie; | |
| 1271 | optable31[566] = ppc_tlbsync; | |
| 1272 | optable31[310] = ppc_eciwx; | |
| 1273 | optable31[438] = ppc_ecowx; | |
| 1248 | ppc.optable[48] = ppc_lfs; | |
| 1249 | ppc.optable[49] = ppc_lfsu; | |
| 1250 | ppc.optable[50] = ppc_lfd; | |
| 1251 | ppc.optable[51] = ppc_lfdu; | |
| 1252 | ppc.optable[52] = ppc_stfs; | |
| 1253 | ppc.optable[53] = ppc_stfsu; | |
| 1254 | ppc.optable[54] = ppc_stfd; | |
| 1255 | ppc.optable[55] = ppc_stfdu; | |
| 1256 | ppc.optable31[631] = ppc_lfdux; | |
| 1257 | ppc.optable31[599] = ppc_lfdx; | |
| 1258 | ppc.optable31[567] = ppc_lfsux; | |
| 1259 | ppc.optable31[535] = ppc_lfsx; | |
| 1260 | ppc.optable31[595] = ppc_mfsr; | |
| 1261 | ppc.optable31[659] = ppc_mfsrin; | |
| 1262 | ppc.optable31[371] = ppc_mftb; | |
| 1263 | ppc.optable31[210] = ppc_mtsr; | |
| 1264 | ppc.optable31[242] = ppc_mtsrin; | |
| 1265 | ppc.optable31[758] = ppc_dcba; | |
| 1266 | ppc.optable31[759] = ppc_stfdux; | |
| 1267 | ppc.optable31[727] = ppc_stfdx; | |
| 1268 | ppc.optable31[983] = ppc_stfiwx; | |
| 1269 | ppc.optable31[695] = ppc_stfsux; | |
| 1270 | ppc.optable31[663] = ppc_stfsx; | |
| 1271 | ppc.optable31[370] = ppc_tlbia; | |
| 1272 | ppc.optable31[306] = ppc_tlbie; | |
| 1273 | ppc.optable31[566] = ppc_tlbsync; | |
| 1274 | ppc.optable31[310] = ppc_eciwx; | |
| 1275 | ppc.optable31[438] = ppc_ecowx; | |
| 1274 | 1276 | |
| 1275 | optable63[264] = ppc_fabsx; | |
| 1276 | optable63[21] = ppc_faddx; | |
| 1277 | optable63[32] = ppc_fcmpo; | |
| 1278 | optable63[0] = ppc_fcmpu; | |
| 1279 | optable63[14] = ppc_fctiwx; | |
| 1280 | optable63[15] = ppc_fctiwzx; | |
| 1281 | optable63[18] = ppc_fdivx; | |
| 1282 | optable63[72] = ppc_fmrx; | |
| 1283 | optable63[136] = ppc_fnabsx; | |
| 1284 | optable63[40] = ppc_fnegx; | |
| 1285 | optable63[12] = ppc_frspx; | |
| 1286 | optable63[26] = ppc_frsqrtex; | |
| 1287 | optable63[22] = ppc_fsqrtx; | |
| 1288 | optable63[20] = ppc_fsubx; | |
| 1289 | optable63[583] = ppc_mffsx; | |
| 1290 | optable63[70] = ppc_mtfsb0x; | |
| 1291 | optable63[38] = ppc_mtfsb1x; | |
| 1292 | optable63[711] = ppc_mtfsfx; | |
| 1293 | optable63[134] = ppc_mtfsfix; | |
| 1294 | optable63[64] = ppc_mcrfs; | |
| 1277 | ppc.optable63[264] = ppc_fabsx; | |
| 1278 | ppc.optable63[21] = ppc_faddx; | |
| 1279 | ppc.optable63[32] = ppc_fcmpo; | |
| 1280 | ppc.optable63[0] = ppc_fcmpu; | |
| 1281 | ppc.optable63[14] = ppc_fctiwx; | |
| 1282 | ppc.optable63[15] = ppc_fctiwzx; | |
| 1283 | ppc.optable63[18] = ppc_fdivx; | |
| 1284 | ppc.optable63[72] = ppc_fmrx; | |
| 1285 | ppc.optable63[136] = ppc_fnabsx; | |
| 1286 | ppc.optable63[40] = ppc_fnegx; | |
| 1287 | ppc.optable63[12] = ppc_frspx; | |
| 1288 | ppc.optable63[26] = ppc_frsqrtex; | |
| 1289 | ppc.optable63[22] = ppc_fsqrtx; | |
| 1290 | ppc.optable63[20] = ppc_fsubx; | |
| 1291 | ppc.optable63[583] = ppc_mffsx; | |
| 1292 | ppc.optable63[70] = ppc_mtfsb0x; | |
| 1293 | ppc.optable63[38] = ppc_mtfsb1x; | |
| 1294 | ppc.optable63[711] = ppc_mtfsfx; | |
| 1295 | ppc.optable63[134] = ppc_mtfsfix; | |
| 1296 | ppc.optable63[64] = ppc_mcrfs; | |
| 1295 | 1297 | |
| 1296 | optable59[21] = ppc_faddsx; | |
| 1297 | optable59[18] = ppc_fdivsx; | |
| 1298 | optable59[24] = ppc_fresx; | |
| 1299 | optable59[22] = ppc_fsqrtsx; | |
| 1300 | optable59[20] = ppc_fsubsx; | |
| 1298 | ppc.optable59[21] = ppc_faddsx; | |
| 1299 | ppc.optable59[18] = ppc_fdivsx; | |
| 1300 | ppc.optable59[24] = ppc_fresx; | |
| 1301 | ppc.optable59[22] = ppc_fsqrtsx; | |
| 1302 | ppc.optable59[20] = ppc_fsubsx; | |
| 1301 | 1303 | |
| 1302 | 1304 | for(i = 0; i < 32; i++) |
| 1303 | 1305 | { |
| 1304 | optable63[i * 32 | 29] = ppc_fmaddx; | |
| 1305 | optable63[i * 32 | 28] = ppc_fmsubx; | |
| 1306 | optable63[i * 32 | 25] = ppc_fmulx; | |
| 1307 | optable63[i * 32 | 31] = ppc_fnmaddx; | |
| 1308 | optable63[i * 32 | 30] = ppc_fnmsubx; | |
| 1309 | optable63[i * 32 | 23] = ppc_fselx; | |
| 1306 | ppc.optable63[i * 32 | 29] = ppc_fmaddx; | |
| 1307 | ppc.optable63[i * 32 | 28] = ppc_fmsubx; | |
| 1308 | ppc.optable63[i * 32 | 25] = ppc_fmulx; | |
| 1309 | ppc.optable63[i * 32 | 31] = ppc_fnmaddx; | |
| 1310 | ppc.optable63[i * 32 | 30] = ppc_fnmsubx; | |
| 1311 | ppc.optable63[i * 32 | 23] = ppc_fselx; | |
| 1310 | 1312 | |
| 1311 | optable59[i * 32 | 29] = ppc_fmaddsx; | |
| 1312 | optable59[i * 32 | 28] = ppc_fmsubsx; | |
| 1313 | optable59[i * 32 | 25] = ppc_fmulsx; | |
| 1314 | optable59[i * 32 | 31] = ppc_fnmaddsx; | |
| 1315 | optable59[i * 32 | 30] = ppc_fnmsubsx; | |
| 1313 | ppc.optable59[i * 32 | 29] = ppc_fmaddsx; | |
| 1314 | ppc.optable59[i * 32 | 28] = ppc_fmsubsx; | |
| 1315 | ppc.optable59[i * 32 | 25] = ppc_fmulsx; | |
| 1316 | ppc.optable59[i * 32 | 31] = ppc_fnmaddsx; | |
| 1317 | ppc.optable59[i * 32 | 30] = ppc_fnmsubsx; | |
| 1316 | 1318 | } |
| 1317 | 1319 | |
| 1318 | 1320 | for(i = 0; i < 256; i++) |
| r1386 | r1387 | |
| 1329 | 1331 | } |
| 1330 | 1332 | |
| 1331 | 1333 | // MPC8240 specific opcodes |
| 1332 | optable31[978] = mpc8240_tlbld; | |
| 1333 | optable31[1010] = mpc8240_tlbli; | |
| 1334 | ppc.optable31[978] = mpc8240_tlbld; | |
| 1335 | ppc.optable31[1010] = mpc8240_tlbli; | |
| 1334 | 1336 | |
| 1335 | 1337 | ppc.is603 = 1; |
| 1336 | 1338 | |
| r1386 | r1387 | |
| 1374 | 1376 | |
| 1375 | 1377 | ppc_init() ; |
| 1376 | 1378 | |
| 1377 | optable[48] = ppc_lfs; | |
| 1378 | optable[49] = ppc_lfsu; | |
| 1379 | optable[50] = ppc_lfd; | |
| 1380 | optable[51] = ppc_lfdu; | |
| 1381 | optable[52] = ppc_stfs; | |
| 1382 | optable[53] = ppc_stfsu; | |
| 1383 | optable[54] = ppc_stfd; | |
| 1384 | optable[55] = ppc_stfdu; | |
| 1385 | optable31[631] = ppc_lfdux; | |
| 1386 | optable31[599] = ppc_lfdx; | |
| 1387 | optable31[567] = ppc_lfsux; | |
| 1388 | optable31[535] = ppc_lfsx; | |
| 1389 | optable31[595] = ppc_mfsr; | |
| 1390 | optable31[659] = ppc_mfsrin; | |
| 1391 | optable31[371] = ppc_mftb; | |
| 1392 | optable31[210] = ppc_mtsr; | |
| 1393 | optable31[242] = ppc_mtsrin; | |
| 1394 | optable31[758] = ppc_dcba; | |
| 1395 | optable31[759] = ppc_stfdux; | |
| 1396 | optable31[727] = ppc_stfdx; | |
| 1397 | optable31[983] = ppc_stfiwx; | |
| 1398 | optable31[695] = ppc_stfsux; | |
| 1399 | optable31[663] = ppc_stfsx; | |
| 1400 | optable31[370] = ppc_tlbia; | |
| 1401 | optable31[306] = ppc_tlbie; | |
| 1402 | optable31[566] = ppc_tlbsync; | |
| 1403 | optable31[310] = ppc_eciwx; | |
| 1404 | optable31[438] = ppc_ecowx; | |
| 1379 | ppc.optable[48] = ppc_lfs; | |
| 1380 | ppc.optable[49] = ppc_lfsu; | |
| 1381 | ppc.optable[50] = ppc_lfd; | |
| 1382 | ppc.optable[51] = ppc_lfdu; | |
| 1383 | ppc.optable[52] = ppc_stfs; | |
| 1384 | ppc.optable[53] = ppc_stfsu; | |
| 1385 | ppc.optable[54] = ppc_stfd; | |
| 1386 | ppc.optable[55] = ppc_stfdu; | |
| 1387 | ppc.optable31[631] = ppc_lfdux; | |
| 1388 | ppc.optable31[599] = ppc_lfdx; | |
| 1389 | ppc.optable31[567] = ppc_lfsux; | |
| 1390 | ppc.optable31[535] = ppc_lfsx; | |
| 1391 | ppc.optable31[595] = ppc_mfsr; | |
| 1392 | ppc.optable31[659] = ppc_mfsrin; | |
| 1393 | ppc.optable31[371] = ppc_mftb; | |
| 1394 | ppc.optable31[210] = ppc_mtsr; | |
| 1395 | ppc.optable31[242] = ppc_mtsrin; | |
| 1396 | ppc.optable31[758] = ppc_dcba; | |
| 1397 | ppc.optable31[759] = ppc_stfdux; | |
| 1398 | ppc.optable31[727] = ppc_stfdx; | |
| 1399 | ppc.optable31[983] = ppc_stfiwx; | |
| 1400 | ppc.optable31[695] = ppc_stfsux; | |
| 1401 | ppc.optable31[663] = ppc_stfsx; | |
| 1402 | ppc.optable31[370] = ppc_tlbia; | |
| 1403 | ppc.optable31[306] = ppc_tlbie; | |
| 1404 | ppc.optable31[566] = ppc_tlbsync; | |
| 1405 | ppc.optable31[310] = ppc_eciwx; | |
| 1406 | ppc.optable31[438] = ppc_ecowx; | |
| 1405 | 1407 | |
| 1406 | optable63[264] = ppc_fabsx; | |
| 1407 | optable63[21] = ppc_faddx; | |
| 1408 | optable63[32] = ppc_fcmpo; | |
| 1409 | optable63[0] = ppc_fcmpu; | |
| 1410 | optable63[14] = ppc_fctiwx; | |
| 1411 | optable63[15] = ppc_fctiwzx; | |
| 1412 | optable63[18] = ppc_fdivx; | |
| 1413 | optable63[72] = ppc_fmrx; | |
| 1414 | optable63[136] = ppc_fnabsx; | |
| 1415 | optable63[40] = ppc_fnegx; | |
| 1416 | optable63[12] = ppc_frspx; | |
| 1417 | optable63[26] = ppc_frsqrtex; | |
| 1418 | optable63[22] = ppc_fsqrtx; | |
| 1419 | optable63[20] = ppc_fsubx; | |
| 1420 | optable63[583] = ppc_mffsx; | |
| 1421 | optable63[70] = ppc_mtfsb0x; | |
| 1422 | optable63[38] = ppc_mtfsb1x; | |
| 1423 | optable63[711] = ppc_mtfsfx; | |
| 1424 | optable63[134] = ppc_mtfsfix; | |
| 1425 | optable63[64] = ppc_mcrfs; | |
| 1408 | ppc.optable63[264] = ppc_fabsx; | |
| 1409 | ppc.optable63[21] = ppc_faddx; | |
| 1410 | ppc.optable63[32] = ppc_fcmpo; | |
| 1411 | ppc.optable63[0] = ppc_fcmpu; | |
| 1412 | ppc.optable63[14] = ppc_fctiwx; | |
| 1413 | ppc.optable63[15] = ppc_fctiwzx; | |
| 1414 | ppc.optable63[18] = ppc_fdivx; | |
| 1415 | ppc.optable63[72] = ppc_fmrx; | |
| 1416 | ppc.optable63[136] = ppc_fnabsx; | |
| 1417 | ppc.optable63[40] = ppc_fnegx; | |
| 1418 | ppc.optable63[12] = ppc_frspx; | |
| 1419 | ppc.optable63[26] = ppc_frsqrtex; | |
| 1420 | ppc.optable63[22] = ppc_fsqrtx; | |
| 1421 | ppc.optable63[20] = ppc_fsubx; | |
| 1422 | ppc.optable63[583] = ppc_mffsx; | |
| 1423 | ppc.optable63[70] = ppc_mtfsb0x; | |
| 1424 | ppc.optable63[38] = ppc_mtfsb1x; | |
| 1425 | ppc.optable63[711] = ppc_mtfsfx; | |
| 1426 | ppc.optable63[134] = ppc_mtfsfix; | |
| 1427 | ppc.optable63[64] = ppc_mcrfs; | |
| 1426 | 1428 | |
| 1427 | optable59[21] = ppc_faddsx; | |
| 1428 | optable59[18] = ppc_fdivsx; | |
| 1429 | optable59[24] = ppc_fresx; | |
| 1430 | optable59[22] = ppc_fsqrtsx; | |
| 1431 | optable59[20] = ppc_fsubsx; | |
| 1429 | ppc.optable59[21] = ppc_faddsx; | |
| 1430 | ppc.optable59[18] = ppc_fdivsx; | |
| 1431 | ppc.optable59[24] = ppc_fresx; | |
| 1432 | ppc.optable59[22] = ppc_fsqrtsx; | |
| 1433 | ppc.optable59[20] = ppc_fsubsx; | |
| 1432 | 1434 | |
| 1433 | 1435 | for(i = 0; i < 32; i++) |
| 1434 | 1436 | { |
| 1435 | optable63[i * 32 | 29] = ppc_fmaddx; | |
| 1436 | optable63[i * 32 | 28] = ppc_fmsubx; | |
| 1437 | optable63[i * 32 | 25] = ppc_fmulx; | |
| 1438 | optable63[i * 32 | 31] = ppc_fnmaddx; | |
| 1439 | optable63[i * 32 | 30] = ppc_fnmsubx; | |
| 1440 | optable63[i * 32 | 23] = ppc_fselx; | |
| 1437 | ppc.optable63[i * 32 | 29] = ppc_fmaddx; | |
| 1438 | ppc.optable63[i * 32 | 28] = ppc_fmsubx; | |
| 1439 | ppc.optable63[i * 32 | 25] = ppc_fmulx; | |
| 1440 | ppc.optable63[i * 32 | 31] = ppc_fnmaddx; | |
| 1441 | ppc.optable63[i * 32 | 30] = ppc_fnmsubx; | |
| 1442 | ppc.optable63[i * 32 | 23] = ppc_fselx; | |
| 1441 | 1443 | |
| 1442 | optable59[i * 32 | 29] = ppc_fmaddsx; | |
| 1443 | optable59[i * 32 | 28] = ppc_fmsubsx; | |
| 1444 | optable59[i * 32 | 25] = ppc_fmulsx; | |
| 1445 | optable59[i * 32 | 31] = ppc_fnmaddsx; | |
| 1446 | optable59[i * 32 | 30] = ppc_fnmsubsx; | |
| 1444 | ppc.optable59[i * 32 | 29] = ppc_fmaddsx; | |
| 1445 | ppc.optable59[i * 32 | 28] = ppc_fmsubsx; | |
| 1446 | ppc.optable59[i * 32 | 25] = ppc_fmulsx; | |
| 1447 | ppc.optable59[i * 32 | 31] = ppc_fnmaddsx; | |
| 1448 | ppc.optable59[i * 32 | 30] = ppc_fnmsubsx; | |
| 1447 | 1449 | } |
| 1448 | 1450 | |
| 1449 | 1451 | for(i = 0; i < 256; i++) |
| r1386 | r1387 | |
| 1493 | 1495 | } |
| 1494 | 1496 | #endif |
| 1495 | 1497 | |
| 1498 | #if (HAS_PPC604) | |
| 1499 | static void ppc604_init(int index, int clock, const void *_config, int (*irqcallback)(int)) | |
| 1500 | { | |
| 1501 | const ppc_config *config = _config; | |
| 1502 | float multiplier; | |
| 1503 | int i ; | |
| 1496 | 1504 | |
| 1505 | ppc_init() ; | |
| 1497 | 1506 | |
| 1507 | ppc.optable[48] = ppc_lfs; | |
| 1508 | ppc.optable[49] = ppc_lfsu; | |
| 1509 | ppc.optable[50] = ppc_lfd; | |
| 1510 | ppc.optable[51] = ppc_lfdu; | |
| 1511 | ppc.optable[52] = ppc_stfs; | |
| 1512 | ppc.optable[53] = ppc_stfsu; | |
| 1513 | ppc.optable[54] = ppc_stfd; | |
| 1514 | ppc.optable[55] = ppc_stfdu; | |
| 1515 | ppc.optable31[631] = ppc_lfdux; | |
| 1516 | ppc.optable31[599] = ppc_lfdx; | |
| 1517 | ppc.optable31[567] = ppc_lfsux; | |
| 1518 | ppc.optable31[535] = ppc_lfsx; | |
| 1519 | ppc.optable31[595] = ppc_mfsr; | |
| 1520 | ppc.optable31[659] = ppc_mfsrin; | |
| 1521 | ppc.optable31[371] = ppc_mftb; | |
| 1522 | ppc.optable31[210] = ppc_mtsr; | |
| 1523 | ppc.optable31[242] = ppc_mtsrin; | |
| 1524 | ppc.optable31[758] = ppc_dcba; | |
| 1525 | ppc.optable31[759] = ppc_stfdux; | |
| 1526 | ppc.optable31[727] = ppc_stfdx; | |
| 1527 | ppc.optable31[983] = ppc_stfiwx; | |
| 1528 | ppc.optable31[695] = ppc_stfsux; | |
| 1529 | ppc.optable31[663] = ppc_stfsx; | |
| 1530 | ppc.optable31[370] = ppc_tlbia; | |
| 1531 | ppc.optable31[306] = ppc_tlbie; | |
| 1532 | ppc.optable31[566] = ppc_tlbsync; | |
| 1533 | ppc.optable31[310] = ppc_eciwx; | |
| 1534 | ppc.optable31[438] = ppc_ecowx; | |
| 1535 | ||
| 1536 | ppc.optable63[264] = ppc_fabsx; | |
| 1537 | ppc.optable63[21] = ppc_faddx; | |
| 1538 | ppc.optable63[32] = ppc_fcmpo; | |
| 1539 | ppc.optable63[0] = ppc_fcmpu; | |
| 1540 | ppc.optable63[14] = ppc_fctiwx; | |
| 1541 | ppc.optable63[15] = ppc_fctiwzx; | |
| 1542 | ppc.optable63[18] = ppc_fdivx; | |
| 1543 | ppc.optable63[72] = ppc_fmrx; | |
| 1544 | ppc.optable63[136] = ppc_fnabsx; | |
| 1545 | ppc.optable63[40] = ppc_fnegx; | |
| 1546 | ppc.optable63[12] = ppc_frspx; | |
| 1547 | ppc.optable63[26] = ppc_frsqrtex; | |
| 1548 | ppc.optable63[22] = ppc_fsqrtx; | |
| 1549 | ppc.optable63[20] = ppc_fsubx; | |
| 1550 | ppc.optable63[583] = ppc_mffsx; | |
| 1551 | ppc.optable63[70] = ppc_mtfsb0x; | |
| 1552 | ppc.optable63[38] = ppc_mtfsb1x; | |
| 1553 | ppc.optable63[711] = ppc_mtfsfx; | |
| 1554 | ppc.optable63[134] = ppc_mtfsfix; | |
| 1555 | ppc.optable63[64] = ppc_mcrfs; | |
| 1556 | ||
| 1557 | ppc.optable59[21] = ppc_faddsx; | |
| 1558 | ppc.optable59[18] = ppc_fdivsx; | |
| 1559 | ppc.optable59[24] = ppc_fresx; | |
| 1560 | ppc.optable59[22] = ppc_fsqrtsx; | |
| 1561 | ppc.optable59[20] = ppc_fsubsx; | |
| 1562 | ||
| 1563 | for(i = 0; i < 32; i++) | |
| 1564 | { | |
| 1565 | ppc.optable63[i * 32 | 29] = ppc_fmaddx; | |
| 1566 | ppc.optable63[i * 32 | 28] = ppc_fmsubx; | |
| 1567 | ppc.optable63[i * 32 | 25] = ppc_fmulx; | |
| 1568 | ppc.optable63[i * 32 | 31] = ppc_fnmaddx; | |
| 1569 | ppc.optable63[i * 32 | 30] = ppc_fnmsubx; | |
| 1570 | ppc.optable63[i * 32 | 23] = ppc_fselx; | |
| 1571 | ||
| 1572 | ppc.optable59[i * 32 | 29] = ppc_fmaddsx; | |
| 1573 | ppc.optable59[i * 32 | 28] = ppc_fmsubsx; | |
| 1574 | ppc.optable59[i * 32 | 25] = ppc_fmulsx; | |
| 1575 | ppc.optable59[i * 32 | 31] = ppc_fnmaddsx; | |
| 1576 | ppc.optable59[i * 32 | 30] = ppc_fnmsubsx; | |
| 1577 | } | |
| 1578 | ||
| 1579 | ppc.optable31[978] = ppc_tlbld; | |
| 1580 | ||
| 1581 | for(i = 0; i < 256; i++) | |
| 1582 | { | |
| 1583 | ppc_field_xlat[i] = | |
| 1584 | ((i & 0x80) ? 0xF0000000 : 0) | | |
| 1585 | ((i & 0x40) ? 0x0F000000 : 0) | | |
| 1586 | ((i & 0x20) ? 0x00F00000 : 0) | | |
| 1587 | ((i & 0x10) ? 0x000F0000 : 0) | | |
| 1588 | ((i & 0x08) ? 0x0000F000 : 0) | | |
| 1589 | ((i & 0x04) ? 0x00000F00 : 0) | | |
| 1590 | ((i & 0x02) ? 0x000000F0 : 0) | | |
| 1591 | ((i & 0x01) ? 0x0000000F : 0); | |
| 1592 | } | |
| 1593 | ||
| 1594 | ppc.is603 = 1; | |
| 1595 | ||
| 1596 | ppc.read8 = program_read_byte_64be; | |
| 1597 | ppc.read16 = program_read_word_64be; | |
| 1598 | ppc.read32 = program_read_dword_64be; | |
| 1599 | ppc.read64 = program_read_qword_64be; | |
| 1600 | ppc.write8 = program_write_byte_64be; | |
| 1601 | ppc.write16 = program_write_word_64be; | |
| 1602 | ppc.write32 = program_write_dword_64be; | |
| 1603 | ppc.write64 = program_write_qword_64be; | |
| 1604 | ppc.read16_unaligned = ppc_read16_unaligned; | |
| 1605 | ppc.read32_unaligned = ppc_read32_unaligned; | |
| 1606 | ppc.read64_unaligned = ppc_read64_unaligned; | |
| 1607 | ppc.write16_unaligned = ppc_write16_unaligned; | |
| 1608 | ppc.write32_unaligned = ppc_write32_unaligned; | |
| 1609 | ppc.write64_unaligned = ppc_write64_unaligned; | |
| 1610 | ||
| 1611 | ppc.irq_callback = irqcallback; | |
| 1612 | ||
| 1613 | ppc.pvr = config->pvr; | |
| 1614 | ||
| 1615 | multiplier = (float)((config->bus_frequency_multiplier >> 4) & 0xf) + | |
| 1616 | (float)(config->bus_frequency_multiplier & 0xf) / 10.0f; | |
| 1617 | bus_freq_multiplier = (int)(multiplier * 2); | |
| 1618 | ||
| 1619 | ppc.hid1 = 0; | |
| 1620 | } | |
| 1621 | ||
| 1622 | static void ppc604_exit(void) | |
| 1623 | { | |
| 1624 | ||
| 1625 | } | |
| 1626 | #endif | |
| 1627 | ||
| 1628 | ||
| 1629 | ||
| 1498 | 1630 | static void ppc_get_context(void *dst) |
| 1499 | 1631 | { |
| 1500 | 1632 | /* copy the context */ |
| r1386 | r1387 | |
| 1936 | 2068 | } |
| 1937 | 2069 | } |
| 1938 | 2070 | #endif |
| 2071 | ||
| 2072 | /* PPC604 */ | |
| 2073 | ||
| 2074 | #if (HAS_PPC604) | |
| 2075 | static void ppc604_set_info(UINT32 state, cpuinfo *info) | |
| 2076 | { | |
| 2077 | if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 5) | |
| 2078 | { | |
| 2079 | ppc603_set_irq_line(state-CPUINFO_INT_INPUT_STATE, info->i); | |
| 2080 | return; | |
| 2081 | } | |
| 2082 | switch(state) | |
| 2083 | { | |
| 2084 | default: ppc_set_info(state, info); break; | |
| 2085 | } | |
| 2086 | } | |
| 2087 | ||
| 2088 | void ppc604_get_info(UINT32 state, cpuinfo *info) | |
| 2089 | { | |
| 2090 | switch(state) | |
| 2091 | { | |
| 2092 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 2093 | case CPUINFO_INT_INPUT_LINES: info->i = 5; break; | |
| 2094 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; | |
| 2095 | ||
| 2096 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 64; break; | |
| 2097 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 32; break; | |
| 2098 | ||
| 2099 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 2100 | case CPUINFO_PTR_SET_INFO: info->setinfo = ppc604_set_info; break; | |
| 2101 | case CPUINFO_PTR_INIT: info->init = ppc604_init; break; | |
| 2102 | case CPUINFO_PTR_RESET: info->reset = ppc603_reset; break; | |
| 2103 | case CPUINFO_PTR_EXIT: info->exit = ppc604_exit; break; | |
| 2104 | case CPUINFO_PTR_EXECUTE: info->execute = ppc603_execute; break; | |
| 2105 | case CPUINFO_PTR_READ: info->read = ppc_read; break; | |
| 2106 | case CPUINFO_PTR_WRITE: info->write = ppc_write; break; | |
| 2107 | case CPUINFO_PTR_READOP: info->readop = ppc_readop; break; | |
| 2108 | ||
| 2109 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 2110 | case CPUINFO_STR_NAME: strcpy(info->s, "PPC604"); break; | |
| 2111 | ||
| 2112 | default: ppc_get_info(state, info); break; | |
| 2113 | } | |
| 2114 | } | |
| 2115 | #endif |
| r1386 | r1387 | |
|---|---|---|
| 208 | 208 | * and print instructions. |
| 209 | 209 | */ |
| 210 | 210 | |
| 211 | static IDESCR itab[] = | |
| 211 | static const IDESCR itab[] = | |
| 212 | 212 | { |
| 213 | 213 | { "add", D_OP(31)|D_XO(266), M_RT|M_RA|M_RB|M_OE|M_RC, F_RT_RA_RB, FL_OE|FL_RC }, |
| 214 | 214 | { "addc", D_OP(31)|D_XO(10), M_RT|M_RA|M_RB|M_OE|M_RC, F_RT_RA_RB, FL_OE|FL_RC }, |
| r1386 | r1387 | |
| 423 | 423 | * Use an index of BI&3 into this table to obtain the CR field bit name. |
| 424 | 424 | */ |
| 425 | 425 | |
| 426 | static char crbit | |
| 426 | static const char *const crbit | |
| 427 | 427 | |
| 428 | 428 | |
| 429 | 429 | /* |
| r1386 | r1387 | |
|---|---|---|
| 360 | 360 | void ppc601_get_info(UINT32 state, cpuinfo *info); |
| 361 | 361 | #endif |
| 362 | 362 | |
| 363 | #if (HAS_PPC604) | |
| 364 | void ppc604_get_info(UINT32 state, cpuinfo *info); | |
| 365 | #endif | |
| 366 | ||
| 363 | 367 | #ifdef MAME_DEBUG |
| 364 | 368 | extern offs_t ppc_dasm_one(char *buffer, offs_t pc, UINT32 op); |
| 365 | 369 | #endif |
| r1386 | r1387 | |
|---|---|---|
| 295 | 295 | if (opcode != 0) { // this is a little workaround for VF3 |
| 296 | 296 | switch(opcode >> 26) |
| 297 | 297 | { |
| 298 | case 19: return optable19[(opcode >> 1) & 0x3ff](drc, opcode); | |
| 299 | case 31: return optable31[(opcode >> 1) & 0x3ff](drc, opcode); | |
| 300 | case 59: return optable59[(opcode >> 1) & 0x3ff](drc, opcode); | |
| 301 | case 63: return optable63[(opcode >> 1) & 0x3ff](drc, opcode); | |
| 302 | default: return optable[opcode >> 26](drc, opcode); | |
| 298 | case 19: return ppc.optable19[(opcode >> 1) & 0x3ff](drc, opcode); | |
| 299 | case 31: return ppc.optable31[(opcode >> 1) & 0x3ff](drc, opcode); | |
| 300 | case 59: return ppc.optable59[(opcode >> 1) & 0x3ff](drc, opcode); | |
| 301 | case 63: return ppc.optable63[(opcode >> 1) & 0x3ff](drc, opcode); | |
| 302 | default: return ppc.optable[opcode >> 26](drc, opcode); | |
| 303 | 303 | } |
| 304 | 304 | } |
| 305 | 305 | return RECOMPILE_SUCCESSFUL | RECOMPILE_END_OF_STRING; |
| r1386 | r1387 | |
| 484 | 484 | |
| 485 | 485 | /* |
| 486 | 486 | // this table translates x86 SF and ZF flags to PPC CR values |
| 487 | static UINT8 condition_table[4] = | |
| 487 | static const UINT8 condition_table[4] = | |
| 488 | 488 | { |
| 489 | 489 | 0x4, // x86 SF == 0, ZF == 0 --> PPC GT (positive) |
| 490 | 490 | 0x2, // x86 SF == 0, ZF == 1 --> PPC EQ (zero) |
| r1386 | r1387 | |
|---|---|---|
| 184 | 184 | |
| 185 | 185 | switch(opcode >> 26) |
| 186 | 186 | { |
| 187 | case 19: optable19[(opcode >> 1) & 0x3ff](opcode); break; | |
| 188 | case 31: optable31[(opcode >> 1) & 0x3ff](opcode); break; | |
| 189 | case 59: optable59[(opcode >> 1) & 0x3ff](opcode); break; | |
| 190 | case 63: optable63[(opcode >> 1) & 0x3ff](opcode); break; | |
| 191 | default: optable[opcode >> 26](opcode); break; | |
| 187 | case 19: ppc.optable19[(opcode >> 1) & 0x3ff](opcode); break; | |
| 188 | case 31: ppc.optable31[(opcode >> 1) & 0x3ff](opcode); break; | |
| 189 | case 59: ppc.optable59[(opcode >> 1) & 0x3ff](opcode); break; | |
| 190 | case 63: ppc.optable63[(opcode >> 1) & 0x3ff](opcode); break; | |
| 191 | default: ppc.optable[opcode >> 26](opcode); break; | |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | ppc_icount--; |
| r1386 | r1387 | |
|---|---|---|
| 264 | 264 | ppc.npc = ppc.pc + 4; |
| 265 | 265 | switch(opcode >> 26) |
| 266 | 266 | { |
| 267 | case 19: optable19[(opcode >> 1) & 0x3ff](opcode); break; | |
| 268 | case 31: optable31[(opcode >> 1) & 0x3ff](opcode); break; | |
| 269 | case 59: optable59[(opcode >> 1) & 0x3ff](opcode); break; | |
| 270 | case 63: optable63[(opcode >> 1) & 0x3ff](opcode); break; | |
| 271 | default: optable[opcode >> 26](opcode); break; | |
| 267 | case 19: ppc.optable19[(opcode >> 1) & 0x3ff](opcode); break; | |
| 268 | case 31: ppc.optable31[(opcode >> 1) & 0x3ff](opcode); break; | |
| 269 | case 59: ppc.optable59[(opcode >> 1) & 0x3ff](opcode); break; | |
| 270 | case 63: ppc.optable63[(opcode >> 1) & 0x3ff](opcode); break; | |
| 271 | default: ppc.optable[opcode >> 26](opcode); break; | |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | ppc_icount--; |
| r1386 | r1387 | |
|---|---|---|
| 272 | 272 | ppc.npc = ppc.pc + 4; |
| 273 | 273 | switch(opcode >> 26) |
| 274 | 274 | { |
| 275 | case 19: optable19[(opcode >> 1) & 0x3ff](opcode); break; | |
| 276 | case 31: optable31[(opcode >> 1) & 0x3ff](opcode); break; | |
| 277 | case 59: optable59[(opcode >> 1) & 0x3ff](opcode); break; | |
| 278 | case 63: optable63[(opcode >> 1) & 0x3ff](opcode); break; | |
| 279 | default: optable[opcode >> 26](opcode); break; | |
| 275 | case 19: ppc.optable19[(opcode >> 1) & 0x3ff](opcode); break; | |
| 276 | case 31: ppc.optable31[(opcode >> 1) & 0x3ff](opcode); break; | |
| 277 | case 59: ppc.optable59[(opcode >> 1) & 0x3ff](opcode); break; | |
| 278 | case 63: ppc.optable63[(opcode >> 1) & 0x3ff](opcode); break; | |
| 279 | default: ppc.optable[opcode >> 26](opcode); break; | |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | ppc_icount--; |
| r1386 | r1387 | |
|---|---|---|
| 20 | 20 | static void ppcdrc603_init(int index, int clock, const void *_config, int (*irqcallback)(int)); |
| 21 | 21 | static void ppcdrc603_exit(void); |
| 22 | 22 | #endif |
| 23 | #if (HAS_PPC601 || HAS_PPC603 || HAS_MPC8240) | |
| 23 | #if (HAS_PPC601 || HAS_PPC603 || HAS_MPC8240 || HAS_PPC604) | |
| 24 | 24 | static void ppcdrc603_reset(void); |
| 25 | 25 | static int ppcdrc603_execute(int cycles); |
| 26 | 26 | static void ppcdrc603_set_irq_line(int irqline, int state); |
| r1386 | r1387 | |
| 102 | 102 | if((ppc.msr & 0x2000) == 0){ \ |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 105 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240) | |
| 106 | 106 | static UINT32 ppc_field_xlat[256]; |
| 107 | 107 | #endif |
| 108 | 108 | |
| r1386 | r1387 | |
| 317 | 317 | |
| 318 | 318 | /* saved ESP when entering entry point */ |
| 319 | 319 | UINT32 host_esp; |
| 320 | ||
| 321 | UINT32 (* optable19[1024])(drc_core *, UINT32); | |
| 322 | UINT32 (* optable31[1024])(drc_core *, UINT32); | |
| 323 | UINT32 (* optable59[1024])(drc_core *, UINT32); | |
| 324 | UINT32 (* optable63[1024])(drc_core *, UINT32); | |
| 325 | UINT32 (* optable[64])(drc_core *, UINT32); | |
| 320 | 326 | } PPC_REGS; |
| 321 | 327 | |
| 322 | 328 | |
| r1386 | r1387 | |
| 522 | 528 | case SPR_PVR: return; |
| 523 | 529 | } |
| 524 | 530 | |
| 525 | #if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601) | |
| 531 | #if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601 || HAS_PPC604) | |
| 526 | 532 | if(ppc.is603 || ppc.is602) { |
| 527 | 533 | switch(spr) |
| 528 | 534 | { |
| r1386 | r1387 | |
| 735 | 741 | } |
| 736 | 742 | #endif |
| 737 | 743 | |
| 738 | #if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601) | |
| 744 | #if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601 || HAS_PPC604) | |
| 739 | 745 | if (ppc.is603 || ppc.is602) |
| 740 | 746 | { |
| 741 | 747 | switch (spr) |
| r1386 | r1387 | |
| 861 | 867 | |
| 862 | 868 | /***********************************************************************/ |
| 863 | 869 | |
| 864 | static UINT32 (* optable19[1024])(drc_core *, UINT32); | |
| 865 | static UINT32 (* optable31[1024])(drc_core *, UINT32); | |
| 866 | static UINT32 (* optable59[1024])(drc_core *, UINT32); | |
| 867 | static UINT32 (* optable63[1024])(drc_core *, UINT32); | |
| 868 | static UINT32 (* optable[64])(drc_core *, UINT32); | |
| 869 | ||
| 870 | 870 | #include "ppc_mem.c" |
| 871 | 871 | |
| 872 | 872 | #if (HAS_PPC403) |
| r1386 | r1387 | |
| 1007 | 1007 | int i,j; |
| 1008 | 1008 | |
| 1009 | 1009 | for( i=0; i < 64; i++ ) { |
| 1010 | optable[i] = recompile_invalid; | |
| 1010 | ppc.optable[i] = recompile_invalid; | |
| 1011 | 1011 | } |
| 1012 | 1012 | for( i=0; i < 1024; i++ ) { |
| 1013 | optable19[i] = recompile_invalid; | |
| 1014 | optable31[i] = recompile_invalid; | |
| 1015 | optable59[i] = recompile_invalid; | |
| 1016 | optable63[i] = recompile_invalid; | |
| 1013 | ppc.optable19[i] = recompile_invalid; | |
| 1014 | ppc.optable31[i] = recompile_invalid; | |
| 1015 | ppc.optable59[i] = recompile_invalid; | |
| 1016 | ppc.optable63[i] = recompile_invalid; | |
| 1017 | 1017 | } |
| 1018 | 1018 | |
| 1019 | 1019 | /* Fill the opcode tables */ |
| r1386 | r1387 | |
| 1022 | 1022 | switch(ppcdrc_opcode_common[i].code) |
| 1023 | 1023 | { |
| 1024 | 1024 | case 19: |
| 1025 | optable19[ppcdrc_opcode_common[i].subcode] = ppcdrc_opcode_common[i].handler; | |
| 1025 | ppc.optable19[ppcdrc_opcode_common[i].subcode] = ppcdrc_opcode_common[i].handler; | |
| 1026 | 1026 | break; |
| 1027 | 1027 | |
| 1028 | 1028 | case 31: |
| 1029 | optable31[ppcdrc_opcode_common[i].subcode] = ppcdrc_opcode_common[i].handler; | |
| 1029 | ppc.optable31[ppcdrc_opcode_common[i].subcode] = ppcdrc_opcode_common[i].handler; | |
| 1030 | 1030 | break; |
| 1031 | 1031 | |
| 1032 | 1032 | case 59: |
| r1386 | r1387 | |
| 1034 | 1034 | break; |
| 1035 | 1035 | |
| 1036 | 1036 | default: |
| 1037 | optable[ppcdrc_opcode_common[i].code] = ppcdrc_opcode_common[i].handler; | |
| 1037 | ppc.optable[ppcdrc_opcode_common[i].code] = ppcdrc_opcode_common[i].handler; | |
| 1038 | 1038 | } |
| 1039 | 1039 | |
| 1040 | 1040 | } |
| r1386 | r1387 | |
| 1063 | 1063 | ppcdrc_init(); |
| 1064 | 1064 | |
| 1065 | 1065 | /* PPC403 specific opcodes */ |
| 1066 | optable31[454] = recompile_dccci; | |
| 1067 | optable31[486] = recompile_dcread; | |
| 1068 | optable31[262] = recompile_icbt; | |
| 1069 | optable31[966] = recompile_iccci; | |
| 1070 | optable31[998] = recompile_icread; | |
| 1071 | optable31[323] = recompile_mfdcr; | |
| 1072 | optable31[451] = recompile_mtdcr; | |
| 1073 | optable31[131] = recompile_wrtee; | |
| 1074 | optable31[163] = recompile_wrteei; | |
| 1075 | optable19[51] = recompile_rfci; | |
| 1066 | ppc.optable31[454] = recompile_dccci; | |
| 1067 | ppc.optable31[486] = recompile_dcread; | |
| 1068 | ppc.optable31[262] = recompile_icbt; | |
| 1069 | ppc.optable31[966] = recompile_iccci; | |
| 1070 | ppc.optable31[998] = recompile_icread; | |
| 1071 | ppc.optable31[323] = recompile_mfdcr; | |
| 1072 | ppc.optable31[451] = recompile_mtdcr; | |
| 1073 | ppc.optable31[131] = recompile_wrtee; | |
| 1074 | ppc.optable31[163] = recompile_wrteei; | |
| 1075 | ppc.optable19[51] = recompile_rfci; | |
| 1076 | 1076 | |
| 1077 | 1077 | ppc.spu.rx_timer = timer_alloc(ppc403_spu_rx_callback, NULL); |
| 1078 | 1078 | ppc.spu.tx_timer = timer_alloc(ppc403_spu_tx_callback, NULL); |
| r1386 | r1387 | |
| 1208 | 1208 | ppc_init(); |
| 1209 | 1209 | ppcdrc_init(); |
| 1210 | 1210 | |
| 1211 | optable[48] = recompile_lfs; | |
| 1212 | optable[49] = recompile_lfsu; | |
| 1213 | optable[50] = recompile_lfd; | |
| 1214 | optable[51] = recompile_lfdu; | |
| 1215 | optable[52] = recompile_stfs; | |
| 1216 | optable[53] = recompile_stfsu; | |
| 1217 | optable[54] = recompile_stfd; | |
| 1218 | optable[55] = recompile_stfdu; | |
| 1219 | optable31[631] = recompile_lfdux; | |
| 1220 | optable31[599] = recompile_lfdx; | |
| 1221 | optable31[567] = recompile_lfsux; | |
| 1222 | optable31[535] = recompile_lfsx; | |
| 1223 | optable31[595] = recompile_mfsr; | |
| 1224 | optable31[659] = recompile_mfsrin; | |
| 1225 | optable31[371] = recompile_mftb; | |
| 1226 | optable31[210] = recompile_mtsr; | |
| 1227 | optable31[242] = recompile_mtsrin; | |
| 1228 | optable31[758] = recompile_dcba; | |
| 1229 | optable31[759] = recompile_stfdux; | |
| 1230 | optable31[727] = recompile_stfdx; | |
| 1231 | optable31[983] = recompile_stfiwx; | |
| 1232 | optable31[695] = recompile_stfsux; | |
| 1233 | optable31[663] = recompile_stfsx; | |
| 1234 | optable31[370] = recompile_tlbia; | |
| 1235 | optable31[306] = recompile_tlbie; | |
| 1236 | optable31[566] = recompile_tlbsync; | |
| 1237 | optable31[310] = recompile_eciwx; | |
| 1238 | optable31[438] = recompile_ecowx; | |
| 1211 | ppc.optable[48] = recompile_lfs; | |
| 1212 | ppc.optable[49] = recompile_lfsu; | |
| 1213 | ppc.optable[50] = recompile_lfd; | |
| 1214 | ppc.optable[51] = recompile_lfdu; | |
| 1215 | ppc.optable[52] = recompile_stfs; | |
| 1216 | ppc.optable[53] = recompile_stfsu; | |
| 1217 | ppc.optable[54] = recompile_stfd; | |
| 1218 | ppc.optable[55] = recompile_stfdu; | |
| 1219 | ppc.optable31[631] = recompile_lfdux; | |
| 1220 | ppc.optable31[599] = recompile_lfdx; | |
| 1221 | ppc.optable31[567] = recompile_lfsux; | |
| 1222 | ppc.optable31[535] = recompile_lfsx; | |
| 1223 | ppc.optable31[595] = recompile_mfsr; | |
| 1224 | ppc.optable31[659] = recompile_mfsrin; | |
| 1225 | ppc.optable31[371] = recompile_mftb; | |
| 1226 | ppc.optable31[210] = recompile_mtsr; | |
| 1227 | ppc.optable31[242] = recompile_mtsrin; | |
| 1228 | ppc.optable31[758] = recompile_dcba; | |
| 1229 | ppc.optable31[759] = recompile_stfdux; | |
| 1230 | ppc.optable31[727] = recompile_stfdx; | |
| 1231 | ppc.optable31[983] = recompile_stfiwx; | |
| 1232 | ppc.optable31[695] = recompile_stfsux; | |
| 1233 | ppc.optable31[663] = recompile_stfsx; | |
| 1234 | ppc.optable31[370] = recompile_tlbia; | |
| 1235 | ppc.optable31[306] = recompile_tlbie; | |
| 1236 | ppc.optable31[566] = recompile_tlbsync; | |
| 1237 | ppc.optable31[310] = recompile_eciwx; | |
| 1238 | ppc.optable31[438] = recompile_ecowx; | |
| 1239 | 1239 | |
| 1240 | optable63[264] = recompile_fabsx; | |
| 1241 | optable63[21] = recompile_faddx; | |
| 1242 | optable63[32] = recompile_fcmpo; | |
| 1243 | optable63[0] = recompile_fcmpu; | |
| 1244 | optable63[14] = recompile_fctiwx; | |
| 1245 | optable63[15] = recompile_fctiwzx; | |
| 1246 | optable63[18] = recompile_fdivx; | |
| 1247 | optable63[72] = recompile_fmrx; | |
| 1248 | optable63[136] = recompile_fnabsx; | |
| 1249 | optable63[40] = recompile_fnegx; | |
| 1250 | optable63[12] = recompile_frspx; | |
| 1251 | optable63[26] = recompile_frsqrtex; | |
| 1252 | optable63[22] = recompile_fsqrtx; | |
| 1253 | optable63[20] = recompile_fsubx; | |
| 1254 | optable63[583] = recompile_mffsx; | |
| 1255 | optable63[70] = recompile_mtfsb0x; | |
| 1256 | optable63[38] = recompile_mtfsb1x; | |
| 1257 | optable63[711] = recompile_mtfsfx; | |
| 1258 | optable63[134] = recompile_mtfsfix; | |
| 1259 | optable63[64] = recompile_mcrfs; | |
| 1240 | ppc.optable63[264] = recompile_fabsx; | |
| 1241 | ppc.optable63[21] = recompile_faddx; | |
| 1242 | ppc.optable63[32] = recompile_fcmpo; | |
| 1243 | ppc.optable63[0] = recompile_fcmpu; | |
| 1244 | ppc.optable63[14] = recompile_fctiwx; | |
| 1245 | ppc.optable63[15] = recompile_fctiwzx; | |
| 1246 | ppc.optable63[18] = recompile_fdivx; | |
| 1247 | ppc.optable63[72] = recompile_fmrx; | |
| 1248 | ppc.optable63[136] = recompile_fnabsx; | |
| 1249 | ppc.optable63[40] = recompile_fnegx; | |
| 1250 | ppc.optable63[12] = recompile_frspx; | |
| 1251 | ppc.optable63[26] = recompile_frsqrtex; | |
| 1252 | ppc.optable63[22] = recompile_fsqrtx; | |
| 1253 | ppc.optable63[20] = recompile_fsubx; | |
| 1254 | ppc.optable63[583] = recompile_mffsx; | |
| 1255 | ppc.optable63[70] = recompile_mtfsb0x; | |
| 1256 | ppc.optable63[38] = recompile_mtfsb1x; | |
| 1257 | ppc.optable63[711] = recompile_mtfsfx; | |
| 1258 | ppc.optable63[134] = recompile_mtfsfix; | |
| 1259 | ppc.optable63[64] = recompile_mcrfs; | |
| 1260 | 1260 | |
| 1261 | optable59[21] = recompile_faddsx; | |
| 1262 | optable59[18] = recompile_fdivsx; | |
| 1263 | optable59[24] = recompile_fresx; | |
| 1264 | optable59[22] = recompile_fsqrtsx; | |
| 1265 | optable59[20] = recompile_fsubsx; | |
| 1261 | ppc.optable59[21] = recompile_faddsx; | |
| 1262 | ppc.optable59[18] = recompile_fdivsx; | |
| 1263 | ppc.optable59[24] = recompile_fresx; | |
| 1264 | ppc.optable59[22] = recompile_fsqrtsx; | |
| 1265 | ppc.optable59[20] = recompile_fsubsx; | |
| 1266 | 1266 | |
| 1267 | 1267 | for(i = 0; i < 32; i++) |
| 1268 | 1268 | { |
| 1269 | optable63[i * 32 | 29] = recompile_fmaddx; | |
| 1270 | optable63[i * 32 | 28] = recompile_fmsubx; | |
| 1271 | optable63[i * 32 | 25] = recompile_fmulx; | |
| 1272 | optable63[i * 32 | 31] = recompile_fnmaddx; | |
| 1273 | optable63[i * 32 | 30] = recompile_fnmsubx; | |
| 1274 | optable63[i * 32 | 23] = recompile_fselx; | |
| 1269 | ppc.optable63[i * 32 | 29] = recompile_fmaddx; | |
| 1270 | ppc.optable63[i * 32 | 28] = recompile_fmsubx; | |
| 1271 | ppc.optable63[i * 32 | 25] = recompile_fmulx; | |
| 1272 | ppc.optable63[i * 32 | 31] = recompile_fnmaddx; | |
| 1273 | ppc.optable63[i * 32 | 30] = recompile_fnmsubx; | |
| 1274 | ppc.optable63[i * 32 | 23] = recompile_fselx; | |
| 1275 | 1275 | |
| 1276 | optable59[i * 32 | 29] = recompile_fmaddsx; | |
| 1277 | optable59[i * 32 | 28] = recompile_fmsubsx; | |
| 1278 | optable59[i * 32 | 25] = recompile_fmulsx; | |
| 1279 | optable59[i * 32 | 31] = recompile_fnmaddsx; | |
| 1280 | optable59[i * 32 | 30] = recompile_fnmsubsx; | |
| 1276 | ppc.optable59[i * 32 | 29] = recompile_fmaddsx; | |
| 1277 | ppc.optable59[i * 32 | 28] = recompile_fmsubsx; | |
| 1278 | ppc.optable59[i * 32 | 25] = recompile_fmulsx; | |
| 1279 | ppc.optable59[i * 32 | 31] = recompile_fnmaddsx; | |
| 1280 | ppc.optable59[i * 32 | 30] = recompile_fnmsubsx; | |
| 1281 | 1281 | } |
| 1282 | 1282 | |
| 1283 | #if (HAS_PPC602 || HAS_MPC8240) | |
| 1284 | ppc.optable31[978] = recompile_tlbld; | |
| 1285 | #endif /* (HAS_PPC602 || HAS_MPC8240) */ | |
| 1286 | ||
| 1283 | 1287 | for(i = 0; i < 256; i++) |
| 1284 | 1288 | { |
| 1285 | 1289 | ppc_field_xlat[i] = |
| r1386 | r1387 | |
| 1343 | 1347 | } |
| 1344 | 1348 | #endif |
| 1345 | 1349 | |
| 1346 | #if (HAS_PPC601 || HAS_PPC603 || HAS_MPC8240) | |
| 1350 | #if (HAS_PPC601 || HAS_PPC603 || HAS_MPC8240 || HAS_PPC604) | |
| 1347 | 1351 | static void ppcdrc603_reset(void) |
| 1348 | 1352 | { |
| 1349 | 1353 | ppc.pc = ppc.npc = 0xfff00100; |
| r1386 | r1387 | |
| 1407 | 1411 | ppc_init(); |
| 1408 | 1412 | ppcdrc_init(); |
| 1409 | 1413 | |
| 1410 | optable[48] = recompile_lfs; | |
| 1411 | optable[49] = recompile_lfsu; | |
| 1412 | optable[50] = recompile_lfd; | |
| 1413 | optable[51] = recompile_lfdu; | |
| 1414 | optable[52] = recompile_stfs; | |
| 1415 | optable[53] = recompile_stfsu; | |
| 1416 | optable[54] = recompile_stfd; | |
| 1417 | optable[55] = recompile_stfdu; | |
| 1418 | optable31[631] = recompile_lfdux; | |
| 1419 | optable31[599] = recompile_lfdx; | |
| 1420 | optable31[567] = recompile_lfsux; | |
| 1421 | optable31[535] = recompile_lfsx; | |
| 1422 | optable31[595] = recompile_mfsr; | |
| 1423 | optable31[659] = recompile_mfsrin; | |
| 1424 | optable31[371] = recompile_mftb; | |
| 1425 | optable31[210] = recompile_mtsr; | |
| 1426 | optable31[242] = recompile_mtsrin; | |
| 1427 | optable31[758] = recompile_dcba; | |
| 1428 | optable31[759] = recompile_stfdux; | |
| 1429 | optable31[727] = recompile_stfdx; | |
| 1430 | optable31[983] = recompile_stfiwx; | |
| 1431 | optable31[695] = recompile_stfsux; | |
| 1432 | optable31[663] = recompile_stfsx; | |
| 1433 | optable31[370] = recompile_tlbia; | |
| 1434 | optable31[306] = recompile_tlbie; | |
| 1435 | optable31[566] = recompile_tlbsync; | |
| 1436 | optable31[310] = recompile_eciwx; | |
| 1437 | optable31[438] = recompile_ecowx; | |
| 1414 | ppc.optable[48] = recompile_lfs; | |
| 1415 | ppc.optable[49] = recompile_lfsu; | |
| 1416 | ppc.optable[50] = recompile_lfd; | |
| 1417 | ppc.optable[51] = recompile_lfdu; | |
| 1418 | ppc.optable[52] = recompile_stfs; | |
| 1419 | ppc.optable[53] = recompile_stfsu; | |
| 1420 | ppc.optable[54] = recompile_stfd; | |
| 1421 | ppc.optable[55] = recompile_stfdu; | |
| 1422 | ppc.optable31[631] = recompile_lfdux; | |
| 1423 | ppc.optable31[599] = recompile_lfdx; | |
| 1424 | ppc.optable31[567] = recompile_lfsux; | |
| 1425 | ppc.optable31[535] = recompile_lfsx; | |
| 1426 | ppc.optable31[595] = recompile_mfsr; | |
| 1427 | ppc.optable31[659] = recompile_mfsrin; | |
| 1428 | ppc.optable31[371] = recompile_mftb; | |
| 1429 | ppc.optable31[210] = recompile_mtsr; | |
| 1430 | ppc.optable31[242] = recompile_mtsrin; | |
| 1431 | ppc.optable31[758] = recompile_dcba; | |
| 1432 | ppc.optable31[759] = recompile_stfdux; | |
| 1433 | ppc.optable31[727] = recompile_stfdx; | |
| 1434 | ppc.optable31[983] = recompile_stfiwx; | |
| 1435 | ppc.optable31[695] = recompile_stfsux; | |
| 1436 | ppc.optable31[663] = recompile_stfsx; | |
| 1437 | ppc.optable31[370] = recompile_tlbia; | |
| 1438 | ppc.optable31[306] = recompile_tlbie; | |
| 1439 | ppc.optable31[566] = recompile_tlbsync; | |
| 1440 | ppc.optable31[310] = recompile_eciwx; | |
| 1441 | ppc.optable31[438] = recompile_ecowx; | |
| 1438 | 1442 | |
| 1439 | optable63[264] = recompile_fabsx; | |
| 1440 | optable63[21] = recompile_faddx; | |
| 1441 | optable63[32] = recompile_fcmpo; | |
| 1442 | optable63[0] = recompile_fcmpu; | |
| 1443 | optable63[14] = recompile_fctiwx; | |
| 1444 | optable63[15] = recompile_fctiwzx; | |
| 1445 | optable63[18] = recompile_fdivx; | |
| 1446 | optable63[72] = recompile_fmrx; | |
| 1447 | optable63[136] = recompile_fnabsx; | |
| 1448 | optable63[40] = recompile_fnegx; | |
| 1449 | optable63[12] = recompile_frspx; | |
| 1450 | optable63[26] = recompile_frsqrtex; | |
| 1451 | optable63[22] = recompile_fsqrtx; | |
| 1452 | optable63[20] = recompile_fsubx; | |
| 1453 | optable63[583] = recompile_mffsx; | |
| 1454 | optable63[70] = recompile_mtfsb0x; | |
| 1455 | optable63[38] = recompile_mtfsb1x; | |
| 1456 | optable63[711] = recompile_mtfsfx; | |
| 1457 | optable63[134] = recompile_mtfsfix; | |
| 1458 | optable63[64] = recompile_mcrfs; | |
| 1443 | ppc.optable63[264] = recompile_fabsx; | |
| 1444 | ppc.optable63[21] = recompile_faddx; | |
| 1445 | ppc.optable63[32] = recompile_fcmpo; | |
| 1446 | ppc.optable63[0] = recompile_fcmpu; | |
| 1447 | ppc.optable63[14] = recompile_fctiwx; | |
| 1448 | ppc.optable63[15] = recompile_fctiwzx; | |
| 1449 | ppc.optable63[18] = recompile_fdivx; | |
| 1450 | ppc.optable63[72] = recompile_fmrx; | |
| 1451 | ppc.optable63[136] = recompile_fnabsx; | |
| 1452 | ppc.optable63[40] = recompile_fnegx; | |
| 1453 | ppc.optable63[12] = recompile_frspx; | |
| 1454 | ppc.optable63[26] = recompile_frsqrtex; | |
| 1455 | ppc.optable63[22] = recompile_fsqrtx; | |
| 1456 | ppc.optable63[20] = recompile_fsubx; | |
| 1457 | ppc.optable63[583] = recompile_mffsx; | |
| 1458 | ppc.optable63[70] = recompile_mtfsb0x; | |
| 1459 | ppc.optable63[38] = recompile_mtfsb1x; | |
| 1460 | ppc.optable63[711] = recompile_mtfsfx; | |
| 1461 | ppc.optable63[134] = recompile_mtfsfix; | |
| 1462 | ppc.optable63[64] = recompile_mcrfs; | |
| 1459 | 1463 | |
| 1460 | optable59[21] = recompile_faddsx; | |
| 1461 | optable59[18] = recompile_fdivsx; | |
| 1462 | optable59[24] = recompile_fresx; | |
| 1463 | optable59[22] = recompile_fsqrtsx; | |
| 1464 | optable59[20] = recompile_fsubsx; | |
| 1464 | ppc.optable59[21] = recompile_faddsx; | |
| 1465 | ppc.optable59[18] = recompile_fdivsx; | |
| 1466 | ppc.optable59[24] = recompile_fresx; | |
| 1467 | ppc.optable59[22] = recompile_fsqrtsx; | |
| 1468 | ppc.optable59[20] = recompile_fsubsx; | |
| 1465 | 1469 | |
| 1466 | 1470 | for(i = 0; i < 32; i++) |
| 1467 | 1471 | { |
| 1468 | optable63[i * 32 | 29] = recompile_fmaddx; | |
| 1469 | optable63[i * 32 | 28] = recompile_fmsubx; | |
| 1470 | optable63[i * 32 | 25] = recompile_fmulx; | |
| 1471 | optable63[i * 32 | 31] = recompile_fnmaddx; | |
| 1472 | optable63[i * 32 | 30] = recompile_fnmsubx; | |
| 1473 | optable63[i * 32 | 23] = recompile_fselx; | |
| 1472 | ppc.optable63[i * 32 | 29] = recompile_fmaddx; | |
| 1473 | ppc.optable63[i * 32 | 28] = recompile_fmsubx; | |
| 1474 | ppc.optable63[i * 32 | 25] = recompile_fmulx; | |
| 1475 | ppc.optable63[i * 32 | 31] = recompile_fnmaddx; | |
| 1476 | ppc.optable63[i * 32 | 30] = recompile_fnmsubx; | |
| 1477 | ppc.optable63[i * 32 | 23] = recompile_fselx; | |
| 1474 | 1478 | |
| 1475 | optable59[i * 32 | 29] = recompile_fmaddsx; | |
| 1476 | optable59[i * 32 | 28] = recompile_fmsubsx; | |
| 1477 | optable59[i * 32 | 25] = recompile_fmulsx; | |
| 1478 | optable59[i * 32 | 31] = recompile_fnmaddsx; | |
| 1479 | optable59[i * 32 | 30] = recompile_fnmsubsx; | |
| 1479 | ppc.optable59[i * 32 | 29] = recompile_fmaddsx; | |
| 1480 | ppc.optable59[i * 32 | 28] = recompile_fmsubsx; | |
| 1481 | ppc.optable59[i * 32 | 25] = recompile_fmulsx; | |
| 1482 | ppc.optable59[i * 32 | 31] = recompile_fnmaddsx; | |
| 1483 | ppc.optable59[i * 32 | 30] = recompile_fnmsubsx; | |
| 1480 | 1484 | } |
| 1481 | 1485 | |
| 1482 | 1486 | for(i = 0; i < 256; i++) |
| r1386 | r1387 | |
| 1493 | 1497 | } |
| 1494 | 1498 | |
| 1495 | 1499 | // PPC602 specific opcodes |
| 1496 | optable31[596] = recompile_esa; | |
| 1497 | optable31[628] = recompile_dsa; | |
| 1498 | optable31[1010] = recompile_tlbli; | |
| 1499 | optable31[978] = recompile_tlbld; | |
| 1500 | ppc.optable31[596] = recompile_esa; | |
| 1501 | ppc.optable31[628] = recompile_dsa; | |
| 1502 | ppc.optable31[1010] = recompile_tlbli; | |
| 1503 | ppc.optable31[978] = recompile_tlbld; | |
| 1500 | 1504 | |
| 1501 | 1505 | ppc.is603 = 0; |
| 1502 | 1506 | ppc.is602 = 1; |
| r1386 | r1387 | |
| 1597 | 1601 | ppc_init(); |
| 1598 | 1602 | ppcdrc_init(); |
| 1599 | 1603 | |
| 1600 | optable[48] = recompile_lfs; | |
| 1601 | optable[49] = recompile_lfsu; | |
| 1602 | optable[50] = recompile_lfd; | |
| 1603 | optable[51] = recompile_lfdu; | |
| 1604 | optable[52] = recompile_stfs; | |
| 1605 | optable[53] = recompile_stfsu; | |
| 1606 | optable[54] = recompile_stfd; | |
| 1607 | optable[55] = recompile_stfdu; | |
| 1608 | optable31[631] = recompile_lfdux; | |
| 1609 | optable31[599] = recompile_lfdx; | |
| 1610 | optable31[567] = recompile_lfsux; | |
| 1611 | optable31[535] = recompile_lfsx; | |
| 1612 | optable31[595] = recompile_mfsr; | |
| 1613 | optable31[659] = recompile_mfsrin; | |
| 1614 | optable31[371] = recompile_mftb; | |
| 1615 | optable31[210] = recompile_mtsr; | |
| 1616 | optable31[242] = recompile_mtsrin; | |
| 1617 | optable31[758] = recompile_dcba; | |
| 1618 | optable31[759] = recompile_stfdux; | |
| 1619 | optable31[727] = recompile_stfdx; | |
| 1620 | optable31[983] = recompile_stfiwx; | |
| 1621 | optable31[695] = recompile_stfsux; | |
| 1622 | optable31[663] = recompile_stfsx; | |
| 1623 | optable31[370] = recompile_tlbia; | |
| 1624 | optable31[306] = recompile_tlbie; | |
| 1625 | optable31[566] = recompile_tlbsync; | |
| 1626 | optable31[310] = recompile_eciwx; | |
| 1627 | optable31[438] = recompile_ecowx; | |
| 1604 | ppc.optable[48] = recompile_lfs; | |
| 1605 | ppc.optable[49] = recompile_lfsu; | |
| 1606 | ppc.optable[50] = recompile_lfd; | |
| 1607 | ppc.optable[51] = recompile_lfdu; | |
| 1608 | ppc.optable[52] = recompile_stfs; | |
| 1609 | ppc.optable[53] = recompile_stfsu; | |
| 1610 | ppc.optable[54] = recompile_stfd; | |
| 1611 | ppc.optable[55] = recompile_stfdu; | |
| 1612 | ppc.optable31[631] = recompile_lfdux; | |
| 1613 | ppc.optable31[599] = recompile_lfdx; | |
| 1614 | ppc.optable31[567] = recompile_lfsux; | |
| 1615 | ppc.optable31[535] = recompile_lfsx; | |
| 1616 | ppc.optable31[595] = recompile_mfsr; | |
| 1617 | ppc.optable31[659] = recompile_mfsrin; | |
| 1618 | ppc.optable31[371] = recompile_mftb; | |
| 1619 | ppc.optable31[210] = recompile_mtsr; | |
| 1620 | ppc.optable31[242] = recompile_mtsrin; | |
| 1621 | ppc.optable31[758] = recompile_dcba; | |
| 1622 | ppc.optable31[759] = recompile_stfdux; | |
| 1623 | ppc.optable31[727] = recompile_stfdx; | |
| 1624 | ppc.optable31[983] = recompile_stfiwx; | |
| 1625 | ppc.optable31[695] = recompile_stfsux; | |
| 1626 | ppc.optable31[663] = recompile_stfsx; | |
| 1627 | ppc.optable31[370] = recompile_tlbia; | |
| 1628 | ppc.optable31[306] = recompile_tlbie; | |
| 1629 | ppc.optable31[566] = recompile_tlbsync; | |
| 1630 | ppc.optable31[310] = recompile_eciwx; | |
| 1631 | ppc.optable31[438] = recompile_ecowx; | |
| 1628 | 1632 | |
| 1629 | optable63[264] = recompile_fabsx; | |
| 1630 | optable63[21] = recompile_faddx; | |
| 1631 | optable63[32] = recompile_fcmpo; | |
| 1632 | optable63[0] = recompile_fcmpu; | |
| 1633 | optable63[14] = recompile_fctiwx; | |
| 1634 | optable63[15] = recompile_fctiwzx; | |
| 1635 | optable63[18] = recompile_fdivx; | |
| 1636 | optable63[72] = recompile_fmrx; | |
| 1637 | optable63[136] = recompile_fnabsx; | |
| 1638 | optable63[40] = recompile_fnegx; | |
| 1639 | optable63[12] = recompile_frspx; | |
| 1640 | optable63[26] = recompile_frsqrtex; | |
| 1641 | optable63[22] = recompile_fsqrtx; | |
| 1642 | optable63[20] = recompile_fsubx; | |
| 1643 | optable63[583] = recompile_mffsx; | |
| 1644 | optable63[70] = recompile_mtfsb0x; | |
| 1645 | optable63[38] = recompile_mtfsb1x; | |
| 1646 | optable63[711] = recompile_mtfsfx; | |
| 1647 | optable63[134] = recompile_mtfsfix; | |
| 1648 | optable63[64] = recompile_mcrfs; | |
| 1633 | ppc.optable63[264] = recompile_fabsx; | |
| 1634 | ppc.optable63[21] = recompile_faddx; | |
| 1635 | ppc.optable63[32] = recompile_fcmpo; | |
| 1636 | ppc.optable63[0] = recompile_fcmpu; | |
| 1637 | ppc.optable63[14] = recompile_fctiwx; | |
| 1638 | ppc.optable63[15] = recompile_fctiwzx; | |
| 1639 | ppc.optable63[18] = recompile_fdivx; | |
| 1640 | ppc.optable63[72] = recompile_fmrx; | |
| 1641 | ppc.optable63[136] = recompile_fnabsx; | |
| 1642 | ppc.optable63[40] = recompile_fnegx; | |
| 1643 | ppc.optable63[12] = recompile_frspx; | |
| 1644 | ppc.optable63[26] = recompile_frsqrtex; | |
| 1645 | ppc.optable63[22] = recompile_fsqrtx; | |
| 1646 | ppc.optable63[20] = recompile_fsubx; | |
| 1647 | ppc.optable63[583] = recompile_mffsx; | |
| 1648 | ppc.optable63[70] = recompile_mtfsb0x; | |
| 1649 | ppc.optable63[38] = recompile_mtfsb1x; | |
| 1650 | ppc.optable63[711] = recompile_mtfsfx; | |
| 1651 | ppc.optable63[134] = recompile_mtfsfix; | |
| 1652 | ppc.optable63[64] = recompile_mcrfs; | |
| 1649 | 1653 | |
| 1650 | optable59[21] = recompile_faddsx; | |
| 1651 | optable59[18] = recompile_fdivsx; | |
| 1652 | optable59[24] = recompile_fresx; | |
| 1653 | optable59[22] = recompile_fsqrtsx; | |
| 1654 | optable59[20] = recompile_fsubsx; | |
| 1654 | ppc.optable59[21] = recompile_faddsx; | |
| 1655 | ppc.optable59[18] = recompile_fdivsx; | |
| 1656 | ppc.optable59[24] = recompile_fresx; | |
| 1657 | ppc.optable59[22] = recompile_fsqrtsx; | |
| 1658 | ppc.optable59[20] = recompile_fsubsx; | |
| 1655 | 1659 | |
| 1656 | 1660 | for(i = 0; i < 32; i++) |
| 1657 | 1661 | { |
| 1658 | optable63[i * 32 | 29] = recompile_fmaddx; | |
| 1659 | optable63[i * 32 | 28] = recompile_fmsubx; | |
| 1660 | optable63[i * 32 | 25] = recompile_fmulx; | |
| 1661 | optable63[i * 32 | 31] = recompile_fnmaddx; | |
| 1662 | optable63[i * 32 | 30] = recompile_fnmsubx; | |
| 1663 | optable63[i * 32 | 23] = recompile_fselx; | |
| 1662 | ppc.optable63[i * 32 | 29] = recompile_fmaddx; | |
| 1663 | ppc.optable63[i * 32 | 28] = recompile_fmsubx; | |
| 1664 | ppc.optable63[i * 32 | 25] = recompile_fmulx; | |
| 1665 | ppc.optable63[i * 32 | 31] = recompile_fnmaddx; | |
| 1666 | ppc.optable63[i * 32 | 30] = recompile_fnmsubx; | |
| 1667 | ppc.optable63[i * 32 | 23] = recompile_fselx; | |
| 1664 | 1668 | |
| 1665 | optable59[i * 32 | 29] = recompile_fmaddsx; | |
| 1666 | optable59[i * 32 | 28] = recompile_fmsubsx; | |
| 1667 | optable59[i * 32 | 25] = recompile_fmulsx; | |
| 1668 | optable59[i * 32 | 31] = recompile_fnmaddsx; | |
| 1669 | optable59[i * 32 | 30] = recompile_fnmsubsx; | |
| 1669 | ppc.optable59[i * 32 | 29] = recompile_fmaddsx; | |
| 1670 | ppc.optable59[i * 32 | 28] = recompile_fmsubsx; | |
| 1671 | ppc.optable59[i * 32 | 25] = recompile_fmulsx; | |
| 1672 | ppc.optable59[i * 32 | 31] = recompile_fnmaddsx; | |
| 1673 | ppc.optable59[i * 32 | 30] = recompile_fnmsubsx; | |
| 1670 | 1674 | } |
| 1671 | 1675 | |
| 1672 | 1676 | for(i = 0; i < 256; i++) |
| r1386 | r1387 | |
| 1683 | 1687 | } |
| 1684 | 1688 | |
| 1685 | 1689 | // MPC8240 specific opcodes |
| 1686 | optable31[978] = recompile_tlbld; | |
| 1687 | optable31[1010] = recompile_tlbli; | |
| 1690 | ppc.optable31[978] = recompile_tlbld; | |
| 1691 | ppc.optable31[1010] = recompile_tlbli; | |
| 1688 | 1692 | |
| 1689 | 1693 | ppc.is603 = 1; |
| 1690 | 1694 | |
| r1386 | r1387 | |
| 1730 | 1734 | ppc_init(); |
| 1731 | 1735 | ppcdrc_init(); |
| 1732 | 1736 | |
| 1733 | optable[48] = recompile_lfs; | |
| 1734 | optable[49] = recompile_lfsu; | |
| 1735 | optable[50] = recompile_lfd; | |
| 1736 | optable[51] = recompile_lfdu; | |
| 1737 | optable[52] = recompile_stfs; | |
| 1738 | optable[53] = recompile_stfsu; | |
| 1739 | optable[54] = recompile_stfd; | |
| 1740 | optable[55] = recompile_stfdu; | |
| 1741 | optable31[631] = recompile_lfdux; | |
| 1742 | optable31[599] = recompile_lfdx; | |
| 1743 | optable31[567] = recompile_lfsux; | |
| 1744 | optable31[535] = recompile_lfsx; | |
| 1745 | optable31[595] = recompile_mfsr; | |
| 1746 | optable31[659] = recompile_mfsrin; | |
| 1747 | optable31[371] = recompile_mftb; | |
| 1748 | optable31[210] = recompile_mtsr; | |
| 1749 | optable31[242] = recompile_mtsrin; | |
| 1750 | optable31[758] = recompile_dcba; | |
| 1751 | optable31[759] = recompile_stfdux; | |
| 1752 | optable31[727] = recompile_stfdx; | |
| 1753 | optable31[983] = recompile_stfiwx; | |
| 1754 | optable31[695] = recompile_stfsux; | |
| 1755 | optable31[663] = recompile_stfsx; | |
| 1756 | optable31[370] = recompile_tlbia; | |
| 1757 | optable31[306] = recompile_tlbie; | |
| 1758 | optable31[566] = recompile_tlbsync; | |
| 1759 | optable31[310] = recompile_eciwx; | |
| 1760 | optable31[438] = recompile_ecowx; | |
| 1737 | ppc.optable[48] = recompile_lfs; | |
| 1738 | ppc.optable[49] = recompile_lfsu; | |
| 1739 | ppc.optable[50] = recompile_lfd; | |
| 1740 | ppc.optable[51] = recompile_lfdu; | |
| 1741 | ppc.optable[52] = recompile_stfs; | |
| 1742 | ppc.optable[53] = recompile_stfsu; | |
| 1743 | ppc.optable[54] = recompile_stfd; | |
| 1744 | ppc.optable[55] = recompile_stfdu; | |
| 1745 | ppc.optable31[631] = recompile_lfdux; | |
| 1746 | ppc.optable31[599] = recompile_lfdx; | |
| 1747 | ppc.optable31[567] = recompile_lfsux; | |
| 1748 | ppc.optable31[535] = recompile_lfsx; | |
| 1749 | ppc.optable31[595] = recompile_mfsr; | |
| 1750 | ppc.optable31[659] = recompile_mfsrin; | |
| 1751 | ppc.optable31[371] = recompile_mftb; | |
| 1752 | ppc.optable31[210] = recompile_mtsr; | |
| 1753 | ppc.optable31[242] = recompile_mtsrin; | |
| 1754 | ppc.optable31[758] = recompile_dcba; | |
| 1755 | ppc.optable31[759] = recompile_stfdux; | |
| 1756 | ppc.optable31[727] = recompile_stfdx; | |
| 1757 | ppc.optable31[983] = recompile_stfiwx; | |
| 1758 | ppc.optable31[695] = recompile_stfsux; | |
| 1759 | ppc.optable31[663] = recompile_stfsx; | |
| 1760 | ppc.optable31[370] = recompile_tlbia; | |
| 1761 | ppc.optable31[306] = recompile_tlbie; | |
| 1762 | ppc.optable31[566] = recompile_tlbsync; | |
| 1763 | ppc.optable31[310] = recompile_eciwx; | |
| 1764 | ppc.optable31[438] = recompile_ecowx; | |
| 1761 | 1765 | |
| 1762 | optable63[264] = recompile_fabsx; | |
| 1763 | optable63[21] = recompile_faddx; | |
| 1764 | optable63[32] = recompile_fcmpo; | |
| 1765 | optable63[0] = recompile_fcmpu; | |
| 1766 | optable63[14] = recompile_fctiwx; | |
| 1767 | optable63[15] = recompile_fctiwzx; | |
| 1768 | optable63[18] = recompile_fdivx; | |
| 1769 | optable63[72] = recompile_fmrx; | |
| 1770 | optable63[136] = recompile_fnabsx; | |
| 1771 | optable63[40] = recompile_fnegx; | |
| 1772 | optable63[12] = recompile_frspx; | |
| 1773 | optable63[26] = recompile_frsqrtex; | |
| 1774 | optable63[22] = recompile_fsqrtx; | |
| 1775 | optable63[20] = recompile_fsubx; | |
| 1776 | optable63[583] = recompile_mffsx; | |
| 1777 | optable63[70] = recompile_mtfsb0x; | |
| 1778 | optable63[38] = recompile_mtfsb1x; | |
| 1779 | optable63[711] = recompile_mtfsfx; | |
| 1780 | optable63[134] = recompile_mtfsfix; | |
| 1781 | optable63[64] = recompile_mcrfs; | |
| 1766 | ppc.optable63[264] = recompile_fabsx; | |
| 1767 | ppc.optable63[21] = recompile_faddx; | |
| 1768 | ppc.optable63[32] = recompile_fcmpo; | |
| 1769 | ppc.optable63[0] = recompile_fcmpu; | |
| 1770 | ppc.optable63[14] = recompile_fctiwx; | |
| 1771 | ppc.optable63[15] = recompile_fctiwzx; | |
| 1772 | ppc.optable63[18] = recompile_fdivx; | |
| 1773 | ppc.optable63[72] = recompile_fmrx; | |
| 1774 | ppc.optable63[136] = recompile_fnabsx; | |
| 1775 | ppc.optable63[40] = recompile_fnegx; | |
| 1776 | ppc.optable63[12] = recompile_frspx; | |
| 1777 | ppc.optable63[26] = recompile_frsqrtex; | |
| 1778 | ppc.optable63[22] = recompile_fsqrtx; | |
| 1779 | ppc.optable63[20] = recompile_fsubx; | |
| 1780 | ppc.optable63[583] = recompile_mffsx; | |
| 1781 | ppc.optable63[70] = recompile_mtfsb0x; | |
| 1782 | ppc.optable63[38] = recompile_mtfsb1x; | |
| 1783 | ppc.optable63[711] = recompile_mtfsfx; | |
| 1784 | ppc.optable63[134] = recompile_mtfsfix; | |
| 1785 | ppc.optable63[64] = recompile_mcrfs; | |
| 1782 | 1786 | |
| 1783 | optable59[21] = recompile_faddsx; | |
| 1784 | optable59[18] = recompile_fdivsx; | |
| 1785 | optable59[24] = recompile_fresx; | |
| 1786 | optable59[22] = recompile_fsqrtsx; | |
| 1787 | optable59[20] = recompile_fsubsx; | |
| 1787 | ppc.optable59[21] = recompile_faddsx; | |
| 1788 | ppc.optable59[18] = recompile_fdivsx; | |
| 1789 | ppc.optable59[24] = recompile_fresx; | |
| 1790 | ppc.optable59[22] = recompile_fsqrtsx; | |
| 1791 | ppc.optable59[20] = recompile_fsubsx; | |
| 1788 | 1792 | |
| 1789 | 1793 | for(i = 0; i < 32; i++) |
| 1790 | 1794 | { |
| 1791 | optable63[i * 32 | 29] = recompile_fmaddx; | |
| 1792 | optable63[i * 32 | 28] = recompile_fmsubx; | |
| 1793 | optable63[i * 32 | 25] = recompile_fmulx; | |
| 1794 | optable63[i * 32 | 31] = recompile_fnmaddx; | |
| 1795 | optable63[i * 32 | 30] = recompile_fnmsubx; | |
| 1796 | optable63[i * 32 | 23] = recompile_fselx; | |
| 1795 | ppc.optable63[i * 32 | 29] = recompile_fmaddx; | |
| 1796 | ppc.optable63[i * 32 | 28] = recompile_fmsubx; | |
| 1797 | ppc.optable63[i * 32 | 25] = recompile_fmulx; | |
| 1798 | ppc.optable63[i * 32 | 31] = recompile_fnmaddx; | |
| 1799 | ppc.optable63[i * 32 | 30] = recompile_fnmsubx; | |
| 1800 | ppc.optable63[i * 32 | 23] = recompile_fselx; | |
| 1797 | 1801 | |
| 1798 | optable59[i * 32 | 29] = recompile_fmaddsx; | |
| 1799 | optable59[i * 32 | 28] = recompile_fmsubsx; | |
| 1800 | optable59[i * 32 | 25] = recompile_fmulsx; | |
| 1801 | optable59[i * 32 | 31] = recompile_fnmaddsx; | |
| 1802 | optable59[i * 32 | 30] = recompile_fnmsubsx; | |
| 1802 | ppc.optable59[i * 32 | 29] = recompile_fmaddsx; | |
| 1803 | ppc.optable59[i * 32 | 28] = recompile_fmsubsx; | |
| 1804 | ppc.optable59[i * 32 | 25] = recompile_fmulsx; | |
| 1805 | ppc.optable59[i * 32 | 31] = recompile_fnmaddsx; | |
| 1806 | ppc.optable59[i * 32 | 30] = recompile_fnmsubsx; | |
| 1803 | 1807 | } |
| 1804 | 1808 | |
| 1805 | 1809 | for(i = 0; i < 256; i++) |
| r1386 | r1387 | |
| 1866 | 1870 | #endif |
| 1867 | 1871 | |
| 1868 | 1872 | |
| 1873 | #if (HAS_PPC604) | |
| 1874 | static void ppc604drc_init(int index, int clock, const void *_config, int (*irqcallback)(int)) | |
| 1875 | { | |
| 1876 | float multiplier; | |
| 1877 | const ppc_config *config = _config; | |
| 1878 | int i; | |
| 1879 | ||
| 1880 | ppc_init(); | |
| 1881 | ppcdrc_init(); | |
| 1882 | ||
| 1883 | ppc.optable[48] = recompile_lfs; | |
| 1884 | ppc.optable[49] = recompile_lfsu; | |
| 1885 | ppc.optable[50] = recompile_lfd; | |
| 1886 | ppc.optable[51] = recompile_lfdu; | |
| 1887 | ppc.optable[52] = recompile_stfs; | |
| 1888 | ppc.optable[53] = recompile_stfsu; | |
| 1889 | ppc.optable[54] = recompile_stfd; | |
| 1890 | ppc.optable[55] = recompile_stfdu; | |
| 1891 | ppc.optable31[631] = recompile_lfdux; | |
| 1892 | ppc.optable31[599] = recompile_lfdx; | |
| 1893 | ppc.optable31[567] = recompile_lfsux; | |
| 1894 | ppc.optable31[535] = recompile_lfsx; | |
| 1895 | ppc.optable31[595] = recompile_mfsr; | |
| 1896 | ppc.optable31[659] = recompile_mfsrin; | |
| 1897 | ppc.optable31[371] = recompile_mftb; | |
| 1898 | ppc.optable31[210] = recompile_mtsr; | |
| 1899 | ppc.optable31[242] = recompile_mtsrin; | |
| 1900 | ppc.optable31[758] = recompile_dcba; | |
| 1901 | ppc.optable31[759] = recompile_stfdux; | |
| 1902 | ppc.optable31[727] = recompile_stfdx; | |
| 1903 | ppc.optable31[983] = recompile_stfiwx; | |
| 1904 | ppc.optable31[695] = recompile_stfsux; | |
| 1905 | ppc.optable31[663] = recompile_stfsx; | |
| 1906 | ppc.optable31[370] = recompile_tlbia; | |
| 1907 | ppc.optable31[306] = recompile_tlbie; | |
| 1908 | ppc.optable31[566] = recompile_tlbsync; | |
| 1909 | ppc.optable31[310] = recompile_eciwx; | |
| 1910 | ppc.optable31[438] = recompile_ecowx; | |
| 1911 | ||
| 1912 | ppc.optable63[264] = recompile_fabsx; | |
| 1913 | ppc.optable63[21] = recompile_faddx; | |
| 1914 | ppc.optable63[32] = recompile_fcmpo; | |
| 1915 | ppc.optable63[0] = recompile_fcmpu; | |
| 1916 | ppc.optable63[14] = recompile_fctiwx; | |
| 1917 | ppc.optable63[15] = recompile_fctiwzx; | |
| 1918 | ppc.optable63[18] = recompile_fdivx; | |
| 1919 | ppc.optable63[72] = recompile_fmrx; | |
| 1920 | ppc.optable63[136] = recompile_fnabsx; | |
| 1921 | ppc.optable63[40] = recompile_fnegx; | |
| 1922 | ppc.optable63[12] = recompile_frspx; | |
| 1923 | ppc.optable63[26] = recompile_frsqrtex; | |
| 1924 | ppc.optable63[22] = recompile_fsqrtx; | |
| 1925 | ppc.optable63[20] = recompile_fsubx; | |
| 1926 | ppc.optable63[583] = recompile_mffsx; | |
| 1927 | ppc.optable63[70] = recompile_mtfsb0x; | |
| 1928 | ppc.optable63[38] = recompile_mtfsb1x; | |
| 1929 | ppc.optable63[711] = recompile_mtfsfx; | |
| 1930 | ppc.optable63[134] = recompile_mtfsfix; | |
| 1931 | ppc.optable63[64] = recompile_mcrfs; | |
| 1932 | ||
| 1933 | ppc.optable59[21] = recompile_faddsx; | |
| 1934 | ppc.optable59[18] = recompile_fdivsx; | |
| 1935 | ppc.optable59[24] = recompile_fresx; | |
| 1936 | ppc.optable59[22] = recompile_fsqrtsx; | |
| 1937 | ppc.optable59[20] = recompile_fsubsx; | |
| 1938 | ||
| 1939 | for(i = 0; i < 32; i++) | |
| 1940 | { | |
| 1941 | ppc.optable63[i * 32 | 29] = recompile_fmaddx; | |
| 1942 | ppc.optable63[i * 32 | 28] = recompile_fmsubx; | |
| 1943 | ppc.optable63[i * 32 | 25] = recompile_fmulx; | |
| 1944 | ppc.optable63[i * 32 | 31] = recompile_fnmaddx; | |
| 1945 | ppc.optable63[i * 32 | 30] = recompile_fnmsubx; | |
| 1946 | ppc.optable63[i * 32 | 23] = recompile_fselx; | |
| 1947 | ||
| 1948 | ppc.optable59[i * 32 | 29] = recompile_fmaddsx; | |
| 1949 | ppc.optable59[i * 32 | 28] = recompile_fmsubsx; | |
| 1950 | ppc.optable59[i * 32 | 25] = recompile_fmulsx; | |
| 1951 | ppc.optable59[i * 32 | 31] = recompile_fnmaddsx; | |
| 1952 | ppc.optable59[i * 32 | 30] = recompile_fnmsubsx; | |
| 1953 | } | |
| 1954 | ||
| 1955 | ppc.optable31[978] = recompile_tlbld; | |
| 1956 | ||
| 1957 | for(i = 0; i < 256; i++) | |
| 1958 | { | |
| 1959 | ppc_field_xlat[i] = | |
| 1960 | ((i & 0x80) ? 0xF0000000 : 0) | | |
| 1961 | ((i & 0x40) ? 0x0F000000 : 0) | | |
| 1962 | ((i & 0x20) ? 0x00F00000 : 0) | | |
| 1963 | ((i & 0x10) ? 0x000F0000 : 0) | | |
| 1964 | ((i & 0x08) ? 0x0000F000 : 0) | | |
| 1965 | ((i & 0x04) ? 0x00000F00 : 0) | | |
| 1966 | ((i & 0x02) ? 0x000000F0 : 0) | | |
| 1967 | ((i & 0x01) ? 0x0000000F : 0); | |
| 1968 | } | |
| 1969 | ||
| 1970 | ppc.is603 = 1; | |
| 1971 | ||
| 1972 | ppc.read8 = program_read_byte_64be; | |
| 1973 | ppc.read16 = program_read_word_64be; | |
| 1974 | ppc.read32 = program_read_dword_64be; | |
| 1975 | ppc.read64 = program_read_qword_64be; | |
| 1976 | ppc.write8 = program_write_byte_64be; | |
| 1977 | ppc.write16 = program_write_word_64be; | |
| 1978 | ppc.write32 = program_write_dword_64be; | |
| 1979 | ppc.write64 = program_write_qword_64be; | |
| 1980 | ppc.read16_unaligned = ppc_read16_unaligned; | |
| 1981 | ppc.read32_unaligned = ppc_read32_unaligned; | |
| 1982 | ppc.read64_unaligned = ppc_read64_unaligned; | |
| 1983 | ppc.write16_unaligned = ppc_write16_unaligned; | |
| 1984 | ppc.write32_unaligned = ppc_write32_unaligned; | |
| 1985 | ppc.write64_unaligned = ppc_write64_unaligned; | |
| 1986 | ||
| 1987 | ppc.irq_callback = irqcallback; | |
| 1988 | ||
| 1989 | ppc.pvr = config->pvr; | |
| 1990 | ||
| 1991 | multiplier = (float)((config->bus_frequency_multiplier >> 4) & 0xf) + | |
| 1992 | (float)(config->bus_frequency_multiplier & 0xf) / 10.0f; | |
| 1993 | bus_freq_multiplier = (int)(multiplier * 2); | |
| 1994 | } | |
| 1995 | ||
| 1996 | static void ppc604drc_exit(void) | |
| 1997 | { | |
| 1998 | #if LOG_CODE | |
| 1999 | //if (symfile) fclose(symfile); | |
| 2000 | #endif | |
| 2001 | drc_exit(ppc.drc); | |
| 2002 | } | |
| 2003 | #endif | |
| 2004 | ||
| 2005 | ||
| 1869 | 2006 | static void ppc_get_context(void *dst) |
| 1870 | 2007 | { |
| 1871 | 2008 | /* copy the context */ |
| r1386 | r1387 | |
| 2300 | 2437 | } |
| 2301 | 2438 | } |
| 2302 | 2439 | #endif |
| 2440 | ||
| 2441 | /* PPC604 */ | |
| 2442 | ||
| 2443 | #if (HAS_PPC604) | |
| 2444 | static void ppc604_set_info(UINT32 state, cpuinfo *info) | |
| 2445 | { | |
| 2446 | if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 5) | |
| 2447 | { | |
| 2448 | ppcdrc603_set_irq_line(state-CPUINFO_INT_INPUT_STATE, info->i); | |
| 2449 | return; | |
| 2450 | } | |
| 2451 | switch(state) | |
| 2452 | { | |
| 2453 | default: ppc_set_info(state, info); break; | |
| 2454 | } | |
| 2455 | } | |
| 2456 | ||
| 2457 | void ppc604_get_info(UINT32 state, cpuinfo *info) | |
| 2458 | { | |
| 2459 | switch(state) | |
| 2460 | { | |
| 2461 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 2462 | case CPUINFO_INT_INPUT_LINES: info->i = 5; break; | |
| 2463 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; | |
| 2464 | ||
| 2465 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 64; break; | |
| 2466 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 32; break; | |
| 2467 | ||
| 2468 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 2469 | case CPUINFO_PTR_SET_INFO: info->setinfo = ppc604_set_info; break; | |
| 2470 | case CPUINFO_PTR_INIT: info->init = ppc604drc_init; break; | |
| 2471 | case CPUINFO_PTR_RESET: info->reset = ppcdrc603_reset; break; | |
| 2472 | case CPUINFO_PTR_EXIT: info->exit = ppc604drc_exit; break; | |
| 2473 | case CPUINFO_PTR_EXECUTE: info->execute = ppcdrc603_execute; break; | |
| 2474 | case CPUINFO_PTR_READ: info->read = ppc_read; break; | |
| 2475 | case CPUINFO_PTR_WRITE: info->write = ppc_write; break; | |
| 2476 | case CPUINFO_PTR_READOP: info->readop = ppc_readop; break; | |
| 2477 | ||
| 2478 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 2479 | case CPUINFO_STR_NAME: strcpy(info->s, "PPC604"); break; | |
| 2480 | ||
| 2481 | default: ppc_get_info(state, info); break; | |
| 2482 | } | |
| 2483 | } | |
| 2484 | #endif |
| r1386 | r1387 | |
|---|---|---|
| 22 | 22 | static char *WriteDataProcessingOperand( char *pBuf, UINT32 opcode, int printOp0, int printOp1, int printOp2 ) |
| 23 | 23 | { |
| 24 | 24 | /* ccccctttmmmm */ |
| 25 | static const char *pRegOp[4] = { "LSL","LSR","ASR","ROR" }; | |
| 25 | static const char *const pRegOp[4] = { "LSL","LSR","ASR","ROR" }; | |
| 26 | 26 | |
| 27 | 27 | if (printOp0) |
| 28 | 28 | pBuf += sprintf(pBuf,"R%d, ", (opcode>>12)&0xf); |
| r1386 | r1387 | |
| 55 | 55 | static char *WriteRegisterOperand1( char *pBuf, UINT32 opcode ) |
| 56 | 56 | { |
| 57 | 57 | /* ccccctttmmmm */ |
| 58 | static const char *pRegOp[4] = { "LSL","LSR","ASR","ROR" }; | |
| 58 | static const char *const pRegOp[4] = { "LSL","LSR","ASR","ROR" }; | |
| 59 | 59 | |
| 60 | 60 | pBuf += sprintf( |
| 61 | 61 | pBuf, |
| r1386 | r1387 | |
| 103 | 103 | { |
| 104 | 104 | const char *pBuf0; |
| 105 | 105 | |
| 106 | static const char *pConditionCodeTable[16] = | |
| 106 | static const char *const pConditionCodeTable[16] = | |
| 107 | 107 | { |
| 108 | 108 | "EQ","NE","CS","CC", |
| 109 | 109 | "MI","PL","VS","VC", |
| 110 | 110 | "HI","LS","GE","LT", |
| 111 | 111 | "GT","LE","","NV" |
| 112 | 112 | }; |
| 113 | static const char *pOperation[16] = | |
| 113 | static const char *const pOperation[16] = | |
| 114 | 114 | { |
| 115 | 115 | "AND","EOR","SUB","RSB", |
| 116 | 116 | "ADD","ADC","SBC","RSC", |
| r1386 | r1387 | |
|---|---|---|
| 21 | 21 | * |
| 22 | 22 | *****************************************************************************/ |
| 23 | 23 | |
| 24 | static Z8000_init table[] = { | |
| 24 | static const Z8000_init table[] = { | |
| 25 | 25 | {0x0000,0x000f, 1,2, 7,Z00_0000_dddd_imm8, "addb %rb3,%#b3"}, |
| 26 | 26 | {0x0010,0x00ff, 1,1, 7,Z00_ssN0_dddd, "addb %rb3,@%rw2"}, |
| 27 | 27 | {0x0100,0x010f, 1,2, 7,Z01_0000_dddd_imm16, "add %rw3,%#w1"}, |
| r1386 | r1387 | |
| 538 | 538 | void z8000_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 539 | 539 | { |
| 540 | 540 | int i; |
| 541 | Z8000_init *init; | |
| 541 | const Z8000_init *init; | |
| 542 | 542 | |
| 543 | 543 | /* already initialized? */ |
| 544 | 544 | if( z8000_exec ) |
| r1386 | r1387 | |
|---|---|---|
| 69 | 69 | printf(" * 0..7 result value \n"); |
| 70 | 70 | printf(" * 8 carry flag after \n"); |
| 71 | 71 | printf(" ************************************************/\n"); |
| 72 | printf("static UINT16 Z8000_dab[0x800] = {\n"); | |
| 72 | printf("static const UINT16 Z8000_dab[0x800] = {\n"); | |
| 73 | 73 | for (i = 0; i < 0x800; i++) { |
| 74 | 74 | if ((i & 0x3ff) == 0) { |
| 75 | 75 | if (i & 0x400) |
| r1386 | r1387 | |
|---|---|---|
| 64 | 64 | n[i*4+3] = opcode & 0x0f; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | static const char *cc[16] = { | |
| 67 | static const char *const cc[16] = { | |
| 68 | 68 | "n", "lt", "le", "ule", "pe/ov", "mi", "eq/z", "c/ult", |
| 69 | 69 | "a", "ge", "gt", "ugt", "po/nov", "pl", "ne/nz", "nc/uge" |
| 70 | 70 | }; |
| 71 | 71 | |
| 72 | static const char *flg[16] = { | |
| 72 | static const char *const flg[16] = { | |
| 73 | 73 | "", "p/v", "s", "p/v,s", "z", "p/v,z", "s,z", "p/v,s,z", |
| 74 | 74 | "c", "p/v,c","s,c", "p/v,s,c", "z,c", "p/v,z,c","s,z,c","p/v,s,z,c" |
| 75 | 75 | }; |
| 76 | 76 | |
| 77 | static const char *ints[4] = { | |
| 77 | static const char *const ints[4] = { | |
| 78 | 78 | "", "vi", "nvi", "vi,nvi" |
| 79 | 79 | }; |
| 80 | 80 |
| r1386 | r1387 | |
|---|---|---|
| 13 | 13 | * 0..7 result value |
| 14 | 14 | * 8 carry flag after |
| 15 | 15 | ************************************************/ |
| 16 | static UINT16 Z8000_dab[0x800] = { | |
| 16 | static const UINT16 Z8000_dab[0x800] = { | |
| 17 | 17 | /* add/adc results */ |
| 18 | 18 | 0x000,0x001,0x002,0x003,0x004,0x005,0x006,0x007, |
| 19 | 19 | 0x008,0x009,0x010,0x011,0x012,0x013,0x014,0x015, |
| r1386 | r1387 | |
|---|---|---|
| 52 | 52 | #define FMT(a,b) a, b |
| 53 | 53 | #define PTRS_PER_FORMAT 2 |
| 54 | 54 | |
| 55 | static const char *arith[4] = { "*" , "*-" , "*+" , "??" } ; | |
| 56 | static const char *nextar[4] = { ",AR0" , ",AR1" , "" , "" } ; | |
| 55 | static const char *const arith[4] = { "*" , "*-" , "*+" , "??" } ; | |
| 56 | static const char *const nextar[4] = { ",AR0" , ",AR1" , "" , "" } ; | |
| 57 | 57 | |
| 58 | 58 | |
| 59 | static const char *TMS32010Formats[] = { | |
| 59 | static const char *const TMS32010Formats[] = { | |
| 60 | 60 | FMT("0000ssss0aaaaaaa", "add %A%S"), |
| 61 | 61 | FMT("0000ssss10mmn00n", "add %M%S%N"), |
| 62 | 62 | FMT("0001ssss0aaaaaaa", "sub %A%S"), |
| r1386 | r1387 | |
| 183 | 183 | |
| 184 | 184 | static void InitDasm32010(void) |
| 185 | 185 | { |
| 186 | const char *p, **ops; | |
| 186 | const char *p; | |
| 187 | const char *const *ops; | |
| 187 | 188 | word mask, bits; |
| 188 | 189 | int bit; |
| 189 | 190 | int i; |
| r1386 | r1387 | |
|---|---|---|
| 665 | 665 | * Opcode Table |
| 666 | 666 | ***********************************************************************/ |
| 667 | 667 | |
| 668 | static opcode_fn opcode_main[256]= | |
| 668 | static const opcode_fn opcode_main[256]= | |
| 669 | 669 | { |
| 670 | 670 | /*00*/ add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh |
| 671 | 671 | /*08*/ ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh |
| r1386 | r1387 | |
| 701 | 701 | /*F8*/ ,call ,br ,blz ,blez ,bgz ,bgez ,bnz ,bz |
| 702 | 702 | }; |
| 703 | 703 | |
| 704 | static opcode_fn opcode_7F_other[32]= | |
| 704 | static const opcode_fn opcode_7F_other[32]= | |
| 705 | 705 | { |
| 706 | 706 | /*80*/ nop ,dint ,eint ,illegal ,illegal ,illegal ,illegal ,illegal |
| 707 | 707 | /*88*/ ,abst ,zac ,rovm ,sovm ,cala ,ret ,pac ,apac |
| r1386 | r1387 | |
|---|---|---|
| 32 | 32 | 5A, 5B, |
| 33 | 33 | */ |
| 34 | 34 | |
| 35 | static const char *s_mnemonic[] = | |
| 35 | static const char *const s_mnemonic[] = | |
| 36 | 36 | { |
| 37 | 37 | "adc", "adcw", "add", "addw", "and", "andw", "band", "bbc", "bbs", |
| 38 | 38 | "bclr", "bcmp", "bmov", "bor", "br", "btst", "bset", "bxor", "call", "cals", "clr", |
| r1386 | r1387 | |
| 71 | 71 | UINT8 arguments; |
| 72 | 72 | } sm8500dasm; |
| 73 | 73 | |
| 74 | static const char *sm8500_cond[16] = { | |
| 74 | static const char *const sm8500_cond[16] = { | |
| 75 | 75 | "F", "LT", "LE", "ULE", "OV", "MI", "Z", "C", |
| 76 | 76 | "T", "GE", "GT", "UGT", "NOV", "PL", "NZ", "NC" |
| 77 | 77 | }; |
| r1386 | r1387 | |
|---|---|---|
| 55 | 55 | /* nr of cycles to run */ |
| 56 | 56 | static int sm8500_icount; |
| 57 | 57 | |
| 58 | static UINT8 sm8500_b2w[8] = { | |
| 58 | static const UINT8 sm8500_b2w[8] = { | |
| 59 | 59 | 0, 8, 2, 10, 4, 12, 6, 14 |
| 60 | 60 | }; |
| 61 | 61 |
| r1386 | r1387 | |
|---|---|---|
| 7 | 7 | #define Rn ((opcode >> 8) & 15) |
| 8 | 8 | #define Rm ((opcode >> 4) & 15) |
| 9 | 9 | |
| 10 | static const char *regname[16] = { | |
| 10 | static const char *const regname[16] = { | |
| 11 | 11 | "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", |
| 12 | 12 | "R8", "R9", "R10","R11","R12","R13","R14","SP" |
| 13 | 13 | }; |
| r1386 | r1387 | |
|---|---|---|
| 1 | static void (* tms32051_opcode_table[256])(void) = | |
| 1 | static void (*const tms32051_opcode_table[256])(void) = | |
| 2 | 2 | { |
| 3 | 3 | /* 0x00 - 0x0f */ |
| 4 | 4 | op_lar_mem, op_lar_mem, op_lar_mem, op_lar_mem, |
| r1386 | r1387 | |
| 82 | 82 | op_retcd, op_retcd, op_retcd, op_retcd |
| 83 | 83 | }; |
| 84 | 84 | |
| 85 | static void (* tms32051_opcode_table_be[256])(void) = | |
| 85 | static void (*const tms32051_opcode_table_be[256])(void) = | |
| 86 | 86 | { |
| 87 | 87 | /* 0x00 - 0x0f */ |
| 88 | 88 | op_abs, op_cmpl, op_neg, op_pac, |
| r1386 | r1387 | |
| 166 | 166 | op_invalid, op_invalid, op_invalid, op_invalid, |
| 167 | 167 | }; |
| 168 | 168 | |
| 169 | static void (* tms32051_opcode_table_bf[256])(void) = | |
| 169 | static void (*const tms32051_opcode_table_bf[256])(void) = | |
| 170 | 170 | { |
| 171 | 171 | /* 0x00 - 0x0f */ |
| 172 | 172 | op_spm, op_spm, op_spm, op_spm, |
| r1386 | r1387 | |
|---|---|---|
| 3 | 3 | |
| 4 | 4 | |
| 5 | 5 | |
| 6 | static const char *zl_condition_codes[] = | |
| 6 | static const char *const zl_condition_codes[] = | |
| 7 | 7 | { |
| 8 | 8 | // bit 3, 2 (ZL), bit 1, 0 (MASK) |
| 9 | 9 | "", // Z=0, L=0, ZM=0, ZL=0 |
| r1386 | r1387 | |
| 24 | 24 | "leq", // Z=1, L=1, ZM=1, ZL=1 |
| 25 | 25 | }; |
| 26 | 26 | |
| 27 | static const char *cv_condition_codes[16] = | |
| 27 | static const char *const cv_condition_codes[16] = | |
| 28 | 28 | { |
| 29 | 29 | "", // C=0, V=0, CM=0, VM=0 |
| 30 | 30 | "nov", // C=0, V=0, CM=0, VM=1 |
| r1386 | r1387 | |
| 44 | 44 | "c ov", // C=1, V=1, CM=1, VM=1 |
| 45 | 45 | }; |
| 46 | 46 | |
| 47 | static const char *tp_condition_codes[4] = | |
| 47 | static const char *const tp_condition_codes[4] = | |
| 48 | 48 | { |
| 49 | 49 | "bio", |
| 50 | 50 | "tc", |
| r1386 | r1387 | |
|---|---|---|
| 7 | 7 | #define Rn ((opcode >> 8) & 15) |
| 8 | 8 | #define Rm ((opcode >> 4) & 15) |
| 9 | 9 | |
| 10 | static const char *regname[16] = { | |
| 10 | static const char *const regname[16] = { | |
| 11 | 11 | "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", |
| 12 | 12 | "R8", "R9", "R10","R11","R12","R13","R14","SP" |
| 13 | 13 | }; |
| r1386 | r1387 | |
|---|---|---|
| 15 | 15 | #define FMT(a,b) a, b |
| 16 | 16 | #define PTRS_PER_FORMAT 2 |
| 17 | 17 | |
| 18 | static const char *Formats[] = { | |
| 18 | static const char *const Formats[] = { | |
| 19 | 19 | FMT("0000_0000", "NOP"), // 00 |
| 20 | 20 | FMT("0000_0001", "RRCA"), // 01 |
| 21 | 21 | FMT("0000_0010", "RLCA"), // 02 |
| r1386 | r1387 | |
|---|---|---|
| 102 | 102 | return 1; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | extern void (*g65816i_opcodes_M0X0[])(void); | |
| 105 | extern void (*const g65816i_opcodes_M0X0[])(void); | |
| 106 | 106 | extern uint g65816i_get_reg_M0X0(int regnum); |
| 107 | 107 | extern void g65816i_set_reg_M0X0(int regnum, uint val); |
| 108 | 108 | extern void g65816i_set_line_M0X0(int line, int state); |
| 109 | 109 | extern int g65816i_execute_M0X0(int cycles); |
| 110 | 110 | |
| 111 | extern void (*g65816i_opcodes_M0X1[])(void); | |
| 111 | extern void (*const g65816i_opcodes_M0X1[])(void); | |
| 112 | 112 | extern uint g65816i_get_reg_M0X1(int regnum); |
| 113 | 113 | extern void g65816i_set_reg_M0X1(int regnum, uint val); |
| 114 | 114 | extern void g65816i_set_line_M0X1(int line, int state); |
| 115 | 115 | extern int g65816i_execute_M0X1(int cycles); |
| 116 | 116 | |
| 117 | extern void (*g65816i_opcodes_M1X0[])(void); | |
| 117 | extern void (*const g65816i_opcodes_M1X0[])(void); | |
| 118 | 118 | extern uint g65816i_get_reg_M1X0(int regnum); |
| 119 | 119 | extern void g65816i_set_reg_M1X0(int regnum, uint val); |
| 120 | 120 | extern void g65816i_set_line_M1X0(int line, int state); |
| 121 | 121 | extern int g65816i_execute_M1X0(int cycles); |
| 122 | 122 | |
| 123 | extern void (*g65816i_opcodes_M1X1[])(void); | |
| 123 | extern void (*const g65816i_opcodes_M1X1[])(void); | |
| 124 | 124 | extern uint g65816i_get_reg_M1X1(int regnum); |
| 125 | 125 | extern void g65816i_set_reg_M1X1(int regnum, uint val); |
| 126 | 126 | extern void g65816i_set_line_M1X1(int line, int state); |
| 127 | 127 | extern int g65816i_execute_M1X1(int cycles); |
| 128 | 128 | |
| 129 | extern void (*g65816i_opcodes_E[])(void); | |
| 129 | extern void (*const g65816i_opcodes_E[])(void); | |
| 130 | 130 | extern uint g65816i_get_reg_E(int regnum); |
| 131 | 131 | extern void g65816i_set_reg_E(int regnum, uint val); |
| 132 | 132 | extern void g65816i_set_line_E(int line, int state); |
| 133 | 133 | extern int g65816i_execute_E(int cycles); |
| 134 | 134 | |
| 135 | void (**g65816i_opcodes[5])(void) = | |
| 135 | void (*const *const g65816i_opcodes[5])(void) = | |
| 136 | 136 | { |
| 137 | 137 | g65816i_opcodes_M0X0, |
| 138 | 138 | g65816i_opcodes_M0X1, |
| r1386 | r1387 | |
| 141 | 141 | g65816i_opcodes_E |
| 142 | 142 | }; |
| 143 | 143 | |
| 144 | uint (*g65816i_get_reg[5])(int regnum) = | |
| 144 | uint (*const g65816i_get_reg[5])(int regnum) = | |
| 145 | 145 | { |
| 146 | 146 | g65816i_get_reg_M0X0, |
| 147 | 147 | g65816i_get_reg_M0X1, |
| r1386 | r1387 | |
| 150 | 150 | g65816i_get_reg_E |
| 151 | 151 | }; |
| 152 | 152 | |
| 153 | void (*g65816i_set_reg[5])(int regnum, uint val) = | |
| 153 | void (*const g65816i_set_reg[5])(int regnum, uint val) = | |
| 154 | 154 | { |
| 155 | 155 | g65816i_set_reg_M0X0, |
| 156 | 156 | g65816i_set_reg_M0X1, |
| r1386 | r1387 | |
| 159 | 159 | g65816i_set_reg_E |
| 160 | 160 | }; |
| 161 | 161 | |
| 162 | void (*g65816i_set_line[5])(int line, int state) = | |
| 162 | void (*const g65816i_set_line[5])(int line, int state) = | |
| 163 | 163 | { |
| 164 | 164 | g65816i_set_line_M0X0, |
| 165 | 165 | g65816i_set_line_M0X1, |
| r1386 | r1387 | |
| 168 | 168 | g65816i_set_line_E |
| 169 | 169 | }; |
| 170 | 170 | |
| 171 | int (*g65816i_execute[5])(int cycles) = | |
| 171 | int (*const g65816i_execute[5])(int cycles) = | |
| 172 | 172 | { |
| 173 | 173 | g65816i_execute_M0X0, |
| 174 | 174 | g65816i_execute_M0X1, |
| r1386 | r1387 | |
|---|---|---|
| 1954 | 1954 | #if FLAG_SET_E |
| 1955 | 1955 | #define OP(CODE, OPERATION) static void g65816i_ ## CODE ## _E(void) {OPERATION;} |
| 1956 | 1956 | #define O(CODE) g65816i_ ## CODE ## _E |
| 1957 | #define TABLE_OPCODES void (*g65816i_opcodes_E[256])(void) | |
| 1957 | #define TABLE_OPCODES void (*const g65816i_opcodes_E[256])(void) | |
| 1958 | 1958 | #define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE g65816i_ ## NAME ## _E ARGS |
| 1959 | 1959 | |
| 1960 | 1960 | #else |
| r1386 | r1387 | |
| 1962 | 1962 | #if !FLAG_SET_M && !FLAG_SET_X |
| 1963 | 1963 | #define OP(CODE, OPERATION) static void g65816i_ ## CODE ## _M0X0(void) {OPERATION;} |
| 1964 | 1964 | #define O(CODE) g65816i_ ## CODE ## _M0X0 |
| 1965 | #define TABLE_OPCODES void (*g65816i_opcodes_M0X0[256])(void) | |
| 1965 | #define TABLE_OPCODES void (*const g65816i_opcodes_M0X0[256])(void) | |
| 1966 | 1966 | #define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE g65816i_ ## NAME ## _M0X0 ARGS |
| 1967 | 1967 | |
| 1968 | 1968 | #elif !FLAG_SET_M && FLAG_SET_X |
| 1969 | 1969 | |
| 1970 | 1970 | #define OP(CODE, OPERATION) static void g65816i_ ## CODE ## _M0X1(void) {OPERATION;} |
| 1971 | 1971 | #define O(CODE) g65816i_ ## CODE ## _M0X1 |
| 1972 | #define TABLE_OPCODES void (*g65816i_opcodes_M0X1[256])(void) | |
| 1972 | #define TABLE_OPCODES void (*const g65816i_opcodes_M0X1[256])(void) | |
| 1973 | 1973 | #define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE g65816i_ ## NAME ## _M0X1 ARGS |
| 1974 | 1974 | |
| 1975 | 1975 | #elif FLAG_SET_M && !FLAG_SET_X |
| 1976 | 1976 | |
| 1977 | 1977 | #define OP(CODE, OPERATION) static void g65816i_ ## CODE ## _M1X0(void) {OPERATION;} |
| 1978 | 1978 | #define O(CODE) g65816i_ ## CODE ## _M1X0 |
| 1979 | #define TABLE_OPCODES void (*g65816i_opcodes_M1X0[256])(void) | |
| 1979 | #define TABLE_OPCODES void (*const g65816i_opcodes_M1X0[256])(void) | |
| 1980 | 1980 | #define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE g65816i_ ## NAME ## _M1X0 ARGS |
| 1981 | 1981 | |
| 1982 | 1982 | #elif FLAG_SET_M && FLAG_SET_X |
| 1983 | 1983 | |
| 1984 | 1984 | #define OP(CODE, OPERATION) static void g65816i_ ## CODE ## _M1X1(void) {OPERATION;} |
| 1985 | 1985 | #define O(CODE) g65816i_ ## CODE ## _M1X1 |
| 1986 | #define TABLE_OPCODES void (*g65816i_opcodes_M1X1[256])(void) | |
| 1986 | #define TABLE_OPCODES void (*const g65816i_opcodes_M1X1[256])(void) | |
| 1987 | 1987 | #define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE g65816i_ ## NAME ## _M1X1 ARGS |
| 1988 | 1988 | |
| 1989 | 1989 | #endif |
| r1386 | r1387 | |
|---|---|---|
| 89 | 89 | int (*int_ack)(int); /* Interrupt Acknowledge */ |
| 90 | 90 | read8_handler read_vector; /* Read vector override */ |
| 91 | 91 | uint stopped; /* Sets how the CPU is stopped */ |
| 92 | void (**opcodes)(void); | |
| 92 | void (*const *opcodes)(void); | |
| 93 | 93 | uint (*get_reg)(int regnum); |
| 94 | 94 | void (*set_reg)(int regnum, uint val); |
| 95 | 95 | void (*set_line)(int line, int state); |
| r1386 | r1387 | |
| 101 | 101 | extern uint g65816i_source; |
| 102 | 102 | extern uint g65816i_destination; |
| 103 | 103 | |
| 104 | extern void (**g65816i_opcodes[])(void); | |
| 105 | extern uint (*g65816i_get_reg[])(int regnum); | |
| 106 | extern void (*g65816i_set_reg[])(int regnum, uint val); | |
| 107 | extern void (*g65816i_set_line[])(int line, int state); | |
| 108 | extern int (*g65816i_execute[])(int cycles); | |
| 104 | extern void (*const *const g65816i_opcodes[])(void); | |
| 105 | extern uint (*const g65816i_get_reg[])(int regnum); | |
| 106 | extern void (*const g65816i_set_reg[])(int regnum, uint val); | |
| 107 | extern void (*const g65816i_set_line[])(int line, int state); | |
| 108 | extern int (*const g65816i_execute[])(int cycles); | |
| 109 | 109 | |
| 110 | 110 | #define REGISTER_A g65816i_cpu.a /* Accumulator */ |
| 111 | 111 | #define REGISTER_B g65816i_cpu.b /* Accumulator hi byte */ |
| r1386 | r1387 | |
|---|---|---|
| 63 | 63 | TYA , TYX , WAI , WDM , XBA , XCE |
| 64 | 64 | }; |
| 65 | 65 | |
| 66 | static const char* g_opnames[] = | |
| 66 | static const char *const g_opnames[] = | |
| 67 | 67 | { |
| 68 | 68 | "ADC", "AND", "ASL", "BCC", "BCS", "BEQ", "BIT", "BMI", "BNE", "BPL", "BRA", |
| 69 | 69 | "BRK", "BRL", "BVC", "BVS", "CLC", "CLD", "CLI", "CLV", "CMP", "COP", "CPX", |
| r1386 | r1387 | |
|---|---|---|
| 1006 | 1006 | |
| 1007 | 1007 | static void nec_init(int index, int clock, const void *config, int (*irqcallback)(int), int type) |
| 1008 | 1008 | { |
| 1009 | static const char *names[]={"V20","V30","V33"}; | |
| 1009 | static const char *const names[]={"V20","V30","V33"}; | |
| 1010 | 1010 | |
| 1011 | 1011 | state_save_register_item_array(names[type], index, I.regs.w); |
| 1012 | 1012 | state_save_register_item_array(names[type], index, I.sregs); |
| r1386 | r1387 | |
|---|---|---|
| 802 | 802 | |
| 803 | 803 | |
| 804 | 804 | |
| 805 | static const char *nec_reg[8] = { "aw", "cw", "dw", "bw", "sp", "bp", "ix", "iy" }; | |
| 806 | static const char *neg_reg8[8] = { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" }; | |
| 807 | static const char *nec_sreg[8] = { "ds1", "ps", "ss", "ds0", "???", "???", "???", "???" }; | |
| 805 | static const char *const nec_reg[8] = { "aw", "cw", "dw", "bw", "sp", "bp", "ix", "iy" }; | |
| 806 | static const char *const neg_reg8[8] = { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" }; | |
| 807 | static const char *const nec_sreg[8] = { "ds1", "ps", "ss", "ds0", "???", "???", "???", "???" }; | |
| 808 | 808 | |
| 809 | 809 | static UINT32 pc; |
| 810 | 810 | static UINT8 modrm; |
| r1386 | r1387 | |
|---|---|---|
| 456 | 456 | #define R_B i8051.b |
| 457 | 457 | |
| 458 | 458 | /* # of oscilations each opcode requires*/ |
| 459 | static UINT8 i8051_cycles[] = { | |
| 459 | static const UINT8 i8051_cycles[] = { | |
| 460 | 460 | 12,24,24,12,12,12,12,12,12,12,12,12,12,12,12,12, |
| 461 | 461 | 24,24,24,12,12,12,12,12,12,12,12,12,12,12,12,12, |
| 462 | 462 | 24,24,24,12,12,12,12,12,12,12,12,12,12,12,12,12, |
| r1386 | r1387 | |
|---|---|---|
| 9 | 9 | #include "cpuintrf.h" |
| 10 | 10 | |
| 11 | 11 | |
| 12 | static const char *reg[32] = | |
| 12 | static const char *const reg[32] = | |
| 13 | 13 | { |
| 14 | 14 | "0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", |
| 15 | 15 | "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", |
| r1386 | r1387 | |
| 18 | 18 | }; |
| 19 | 19 | |
| 20 | 20 | |
| 21 | static const char *cpreg[4][32] = | |
| 21 | static const char *const cpreg[4][32] = | |
| 22 | 22 | { |
| 23 | 23 | { |
| 24 | 24 | "Index","Random","EntryLo0","EntryLo1","Context","PageMask","Wired","Error", |
| r1386 | r1387 | |
| 47 | 47 | }; |
| 48 | 48 | |
| 49 | 49 | |
| 50 | static const char *ccreg[4][32] = | |
| 50 | static const char *const ccreg[4][32] = | |
| 51 | 51 | { |
| 52 | 52 | { |
| 53 | 53 | "ccr0", "ccr1", "ccr2", "ccr3", "ccr4", "ccr5", "ccr6", "ccr7", |
| r1386 | r1387 | |
| 148 | 148 | |
| 149 | 149 | static UINT32 dasm_cop1(UINT32 pc, UINT32 op, char *buffer) |
| 150 | 150 | { |
| 151 | static const char *format_table[] = | |
| 151 | static const char *const format_table[] = | |
| 152 | 152 | { |
| 153 | 153 | "?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?", |
| 154 | 154 | "s","d","?","?","w","l","?","?","?","?","?","?","?","?","?","?" |
| r1386 | r1387 | |
| 231 | 231 | |
| 232 | 232 | static UINT32 dasm_cop1x(UINT32 pc, UINT32 op, char *buffer) |
| 233 | 233 | { |
| 234 | static const char *format3_table[] = | |
| 234 | static const char *const format3_table[] = | |
| 235 | 235 | { |
| 236 | 236 | "s","d","?","?","w","l","?","?" |
| 237 | 237 | }; |
| r1386 | r1387 | |
|---|---|---|
| 351 | 351 | |
| 352 | 352 | static const UINT8 nvreg[] = { REG_NV0, REG_NV1, REG_NV2, REG_NV3, REG_NV4, REG_NV5, REG_NV6 }; |
| 353 | 353 | |
| 354 | static const char *x86regname[] = {"rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}; | |
| 354 | static const char *const x86regname[] = {"rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}; | |
| 355 | 355 | |
| 356 | 356 | |
| 357 | 357 |
| r1386 | r1387 | |
|---|---|---|
| 9 | 9 | #include "cpuintrf.h" |
| 10 | 10 | |
| 11 | 11 | |
| 12 | static const char *reg[32] = | |
| 12 | static const char *const reg[32] = | |
| 13 | 13 | { |
| 14 | 14 | "0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", |
| 15 | 15 | "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", |
| r1386 | r1387 | |
| 18 | 18 | }; |
| 19 | 19 | |
| 20 | 20 | |
| 21 | static const char *cpreg[4][32] = | |
| 21 | static const char *const cpreg[4][32] = | |
| 22 | 22 | { |
| 23 | 23 | { |
| 24 | 24 | "Index","Random","EntryLo","cpr3", "Context", "cpr5", "cpr6", "cpr7", |
| r1386 | r1387 | |
| 47 | 47 | }; |
| 48 | 48 | |
| 49 | 49 | |
| 50 | static const char *ccreg[4][32] = | |
| 50 | static const char *const ccreg[4][32] = | |
| 51 | 51 | { |
| 52 | 52 | { |
| 53 | 53 | "ccr0", "ccr1", "ccr2", "ccr3", "ccr4", "ccr5", "ccr6", "ccr7", |
| r1386 | r1387 | |
|---|---|---|
| 42 | 42 | |
| 43 | 43 | static UINT8 *filebuf; |
| 44 | 44 | static UINT32 offset; |
| 45 | static UINT8 order[] = { 0, 1, 2, 3 }; | |
| 45 | static const UINT8 order[] = { 0, 1, 2, 3 }; | |
| 46 | 46 | |
| 47 | static char *Options[]= | |
| 47 | static const char *const Options[]= | |
| 48 | 48 | { |
| 49 | 49 | "begin", "end", "offset", "order", "format", "cpu", 0 |
| 50 | 50 | }; |
| r1386 | r1387 | |
|---|---|---|
| 62 | 62 | #define CAUSE_CE2 ( 2L << 28 ) |
| 63 | 63 | #define CAUSE_BD ( 1L << 31 ) |
| 64 | 64 | |
| 65 | static const char *delayn[] = | |
| 65 | static const char *const delayn[] = | |
| 66 | 66 | { |
| 67 | 67 | "pc", "at", "v0", "v1", "a0", "a1", "a2", "a3", |
| 68 | 68 | "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", |
| r1386 | r1387 | |
| 92 | 92 | |
| 93 | 93 | static int mips_ICount = 0; |
| 94 | 94 | |
| 95 | static UINT32 mips_mtc0_writemask[]= | |
| 95 | static const UINT32 mips_mtc0_writemask[]= | |
| 96 | 96 | { |
| 97 | 97 | 0xffffffff, /* INDEX */ |
| 98 | 98 | 0x00000000, /* RANDOM */ |
| r1386 | r1387 | |
| 2513 | 2513 | UINT16 n_v1; |
| 2514 | 2514 | UINT16 n_v2; |
| 2515 | 2515 | UINT16 n_v3; |
| 2516 | const UINT16 **p_n_mx; | |
| 2517 | const UINT32 **p_n_cv; | |
| 2516 | const UINT16 *const *p_n_mx; | |
| 2517 | const UINT32 *const *p_n_cv; | |
| 2518 | 2518 | static const UINT16 n_zm = 0; |
| 2519 | 2519 | static const UINT32 n_zc = 0; |
| 2520 | static const UINT16 *p_n_vx[] = { &VX0, &VX1, &VX2 }; | |
| 2521 | static const UINT16 *p_n_vy[] = { &VY0, &VY1, &VY2 }; | |
| 2522 | static const UINT16 *p_n_vz[] = { &VZ0, &VZ1, &VZ2 }; | |
| 2523 | static const UINT16 *p_n_rm[] = { &R11, &R12, &R13, &R21, &R22, &R23, &R31, &R32, &R33 }; | |
| 2524 | static const UINT16 *p_n_lm[] = { &L11, &L12, &L13, &L21, &L22, &L23, &L31, &L32, &L33 }; | |
| 2525 | static const UINT16 *p_n_cm[] = { &LR1, &LR2, &LR3, &LG1, &LG2, &LG3, &LB1, &LB2, &LB3 }; | |
| 2526 | static const UINT16 *p_n_zm[] = { &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm }; | |
| 2527 | static const UINT16 **p_p_n_mx[] = { p_n_rm, p_n_lm, p_n_cm, p_n_zm }; | |
| 2528 | static const UINT32 *p_n_tr[] = { &TRX, &TRY, &TRZ }; | |
| 2529 | static const UINT32 *p_n_bk[] = { &RBK, &GBK, &BBK }; | |
| 2530 | static const UINT32 *p_n_fc[] = { &RFC, &GFC, &BFC }; | |
| 2531 | static const UINT32 *p_n_zc[] = { &n_zc, &n_zc, &n_zc }; | |
| 2532 | static const UINT32 **p_p_n_cv[] = { p_n_tr, p_n_bk, p_n_fc, p_n_zc }; | |
| 2520 | static const UINT16 *const p_n_vx[] = { &VX0, &VX1, &VX2 }; | |
| 2521 | static const UINT16 *const p_n_vy[] = { &VY0, &VY1, &VY2 }; | |
| 2522 | static const UINT16 *const p_n_vz[] = { &VZ0, &VZ1, &VZ2 }; | |
| 2523 | static const UINT16 *const p_n_rm[] = { &R11, &R12, &R13, &R21, &R22, &R23, &R31, &R32, &R33 }; | |
| 2524 | static const UINT16 *const p_n_lm[] = { &L11, &L12, &L13, &L21, &L22, &L23, &L31, &L32, &L33 }; | |
| 2525 | static const UINT16 *const p_n_cm[] = { &LR1, &LR2, &LR3, &LG1, &LG2, &LG3, &LB1, &LB2, &LB3 }; | |
| 2526 | static const UINT16 *const p_n_zm[] = { &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm }; | |
| 2527 | static const UINT16 *const *p_p_n_mx[] = { p_n_rm, p_n_lm, p_n_cm, p_n_zm }; | |
| 2528 | static const UINT32 *const p_n_tr[] = { &TRX, &TRY, &TRZ }; | |
| 2529 | static const UINT32 *const p_n_bk[] = { &RBK, &GBK, &BBK }; | |
| 2530 | static const UINT32 *const p_n_fc[] = { &RFC, &GFC, &BFC }; | |
| 2531 | static const UINT32 *const p_n_zc[] = { &n_zc, &n_zc, &n_zc }; | |
| 2532 | static const UINT32 *const *p_p_n_cv[] = { p_n_tr, p_n_bk, p_n_fc, p_n_zc }; | |
| 2533 | 2533 | |
| 2534 | 2534 | switch( GTE_FUNCT( gteop ) ) |
| 2535 | 2535 | { |
| r1386 | r1387 | |
|---|---|---|
| 21 | 21 | return s_hex; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | static const char *s_cpugenreg[] = | |
| 24 | static const char *const s_cpugenreg[] = | |
| 25 | 25 | { |
| 26 | 26 | "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3", |
| 27 | 27 | "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", |
| r1386 | r1387 | |
| 29 | 29 | "t8", "t9", "k0", "k1", "gp", "sp", "fp", "ra" |
| 30 | 30 | }; |
| 31 | 31 | |
| 32 | static const char *s_cp0genreg[] = | |
| 32 | static const char *const s_cp0genreg[] = | |
| 33 | 33 | { |
| 34 | 34 | "Index", "Random", "EntryLo", "cp0r3", "Context", "cp0r5", "cp0r6", "cp0r7", |
| 35 | 35 | "BadVAddr", "cp0r9", "EntryHi", "cp0r11", "SR", "Cause", "EPC", "PRId", |
| r1386 | r1387 | |
| 37 | 37 | "cp0r24", "cp0r25", "cp0r26", "cp0r27", "cp0r28", "cp0r29", "cp0r30", "cp0r31" |
| 38 | 38 | }; |
| 39 | 39 | |
| 40 | static const char *s_cp1genreg[] = | |
| 40 | static const char *const s_cp1genreg[] = | |
| 41 | 41 | { |
| 42 | 42 | "cp1r0", "cp1r1", "cp1r2", "cp1r3", "cp1r4", "cp1r5", "cp1r6", "cp1r7", |
| 43 | 43 | "cp1r8", "cp1r9", "cp1r10", "cp1r11", "cp1r12", "cp1r13", "cp1r14", "cp1r15", |
| r1386 | r1387 | |
| 45 | 45 | "cp1r23", "cp1r24", "cp1r25", "cp1r26", "cp1r27", "cp1r28", "cp1r29", "cp1r30" |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | static const char *s_cp1ctlreg[] = | |
| 48 | static const char *const s_cp1ctlreg[] = | |
| 49 | 49 | { |
| 50 | 50 | "cp1cr0", "cp1cr1", "cp1cr2", "cp1cr3", "cp1cr4", "cp1cr5", "cp1cr6", "cp1cr7", |
| 51 | 51 | "cp1cr8", "cp1cr9", "cp1cr10", "cp1cr11", "cp1cr12", "cp1cr13", "cp1cr14", "cp1cr15", |
| r1386 | r1387 | |
| 53 | 53 | "cp1cr24", "cp1cr25", "cp1cr26", "cp1cr27", "cp1cr28", "cp1cr29", "cp1cr30", "cp1cr31" |
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | static const char *s_cp2genreg[] = | |
| 56 | static const char *const s_cp2genreg[] = | |
| 57 | 57 | { |
| 58 | 58 | "vxy0", "vz0", "vxy1", "vz1", "vxy2", "vz2", "rgb", "otz", |
| 59 | 59 | "ir0", "ir1", "ir2", "ir3", "sxy0", "sxy1", "sxy2", "sxyp", |
| r1386 | r1387 | |
| 61 | 61 | "mac0", "mac1", "mac2", "mac3", "irgb", "orgb", "lzcs", "lzcr" |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | static const char *s_cp2ctlreg[] = | |
| 64 | static const char *const s_cp2ctlreg[] = | |
| 65 | 65 | { |
| 66 | 66 | "r11r12", "r13r21", "r22r23", "r31r32", "r33", "trx", "try", "trz", |
| 67 | 67 | "l11l12", "l13l21", "l22l23", "l31l32", "l33", "rbk", "gbk", "bbk", |
| r1386 | r1387 | |
| 69 | 69 | "ofx", "ofy", "h", "dqa", "dqb", "zsf3", "zsf4", "flag" |
| 70 | 70 | }; |
| 71 | 71 | |
| 72 | static const char *s_gtesf[] = | |
| 72 | static const char *const s_gtesf[] = | |
| 73 | 73 | { |
| 74 | 74 | "0", "12" |
| 75 | 75 | }; |
| 76 | 76 | |
| 77 | static const char *s_gtemx[] = | |
| 77 | static const char *const s_gtemx[] = | |
| 78 | 78 | { |
| 79 | 79 | "rm", "lm", "cm", "0" |
| 80 | 80 | }; |
| 81 | 81 | |
| 82 | static const char *s_gtev[] = | |
| 82 | static const char *const s_gtev[] = | |
| 83 | 83 | { |
| 84 | 84 | "v0", "v1", "v2", "ir" |
| 85 | 85 | }; |
| 86 | 86 | |
| 87 | static const char *s_gtecv[] = | |
| 87 | static const char *const s_gtecv[] = | |
| 88 | 88 | { |
| 89 | 89 | "tr", "bk", "fc", "0" |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | static const char *s_gtelm[] = | |
| 92 | static const char *const s_gtelm[] = | |
| 93 | 93 | { |
| 94 | 94 | "0", "1" |
| 95 | 95 | }; |
| r1386 | r1387 | |
|---|---|---|
| 136 | 136 | static void sdl_le(UINT32 op); |
| 137 | 137 | static void sdr_le(UINT32 op); |
| 138 | 138 | |
| 139 | static UINT8 fcc_shift[8] = { 23, 25, 26, 27, 28, 29, 30, 31 }; | |
| 139 | static const UINT8 fcc_shift[8] = { 23, 25, 26, 27, 28, 29, 30, 31 }; | |
| 140 | 140 | |
| 141 | 141 | |
| 142 | 142 |
| r1386 | r1387 | |
|---|---|---|
| 15 | 15 | UINT32 s_flag; |
| 16 | 16 | } opcodeinfo; |
| 17 | 17 | |
| 18 | static oprandinfo of[] = { | |
| 18 | static const oprandinfo of[] = { | |
| 19 | 19 | /* 00 */ { {" B,A", "", "", ""}, {NONE, DONE, DONE, DONE} }, |
| 20 | 20 | /* 01 */ { {" R%u", ",A", "", ""}, {UI8, NONE, DONE, DONE} }, |
| 21 | 21 | /* 02 */ { {" R%u", ",B", "", ""}, {UI8, NONE, DONE, DONE} }, |
| r1386 | r1387 | |
| 75 | 75 | /* 45 */ { {" *R%u", "", "", ""}, {UI8, DONE, DONE, DONE} } |
| 76 | 76 | }; |
| 77 | 77 | |
| 78 | static opcodeinfo opcodes[] = { | |
| 78 | static const opcodeinfo opcodes[] = { | |
| 79 | 79 | {0x69, "ADC", 0, 0 }, |
| 80 | 80 | {0x19, "ADC", 1, 0 }, |
| 81 | 81 | {0x39, "ADC", 2, 0 }, |
| r1386 | r1387 | |
|---|---|---|
| 2 | 2 | #include "debugger.h" |
| 3 | 3 | #include "f8.h" |
| 4 | 4 | |
| 5 | static const char *rname[16] = { | |
| 5 | static const char *const rname[16] = { | |
| 6 | 6 | "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", |
| 7 | 7 | "R8", "J", "HU", "HL", "KU", "KL", "QU", "QL" |
| 8 | 8 | }; |
| r1386 | r1387 | |
|---|---|---|
| 35 | 35 | zSLL ,zSRA ,zSRL ,zSUB ,zXOR |
| 36 | 36 | }; |
| 37 | 37 | |
| 38 | static const char *s_mnemonic[] = | |
| 38 | static const char *const s_mnemonic[] = | |
| 39 | 39 | { |
| 40 | 40 | "adc" ,"add" ,"and" ,"bit" ,"call","ccf" ,"cp" ,"cpd" , |
| 41 | 41 | "cpdr","cpi" ,"cpir","cpl" ,"daa" ,"db" ,"dec" ,"di" , |
| r1386 | r1387 | |
|---|---|---|
| 9 | 9 | #include "asap.h" |
| 10 | 10 | |
| 11 | 11 | |
| 12 | static const char *reg[32] = | |
| 12 | static const char *const reg[32] = | |
| 13 | 13 | { |
| 14 | 14 | "0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", |
| 15 | 15 | "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", |
| r1386 | r1387 | |
| 17 | 17 | "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31" |
| 18 | 18 | }; |
| 19 | 19 | |
| 20 | static const char *setcond[2] = | |
| 20 | static const char *const setcond[2] = | |
| 21 | 21 | { |
| 22 | 22 | " ", ".c" |
| 23 | 23 | }; |
| 24 | 24 | |
| 25 | static const char *condition[16] = | |
| 25 | static const char *const condition[16] = | |
| 26 | 26 | { |
| 27 | 27 | "sp", "mz", "gt", "le", "ge", "lt", "hi", "ls", "cc", "cs", "pl", "mi", "ne", "eq", "vc", "vs" |
| 28 | 28 | }; |
| r1386 | r1387 | |
|---|---|---|
| 2377 | 2377 | |
| 2378 | 2378 | static int readCRU(int CRUAddr, int Number) |
| 2379 | 2379 | { |
| 2380 | static int BitMask[] = | |
| 2380 | static const int BitMask[] = | |
| 2381 | 2381 | { |
| 2382 | 2382 | 0, /* filler - saves a subtract to find mask */ |
| 2383 | 2383 | 0x0001,0x0003,0x0007,0x000F,0x001F,0x003F,0x007F,0x00FF, |
| r1386 | r1387 | |
| 4527 | 4527 | |
| 4528 | 4528 | /* tms9900-like instruction set*/ |
| 4529 | 4529 | |
| 4530 | static void (* jumptable[128])(UINT16) = | |
| 4530 | static void (*const jumptable[128])(UINT16) = | |
| 4531 | 4531 | { |
| 4532 | 4532 | &illegal,&h0200,&h0400,&h0400,&h0800,&h0800,&illegal,&illegal, |
| 4533 | 4533 | &h1000,&h1000,&h1000,&h1000,&h1000,&h1000,&h1000,&h1000, |
| r1386 | r1387 | |
| 4554 | 4554 | /* tms9989 and tms9995 include 4 extra instructions, and one additionnal instruction type */ |
| 4555 | 4555 | /* tms99000 includes yet another additional instruction */ |
| 4556 | 4556 | |
| 4557 | static void (* jumptable[256])(UINT16) = | |
| 4557 | static void (*const jumptable[256])(UINT16) = | |
| 4558 | 4558 | { |
| 4559 | 4559 | &h0040,&h0100,&h0200,&h0200,&h0400,&h0400,&h0400,&h0400, |
| 4560 | 4560 | &h0800,&h0800,&h0800,&h0800,&illegal,&illegal,&illegal,&illegal, |
| r1386 | r1387 | |
|---|---|---|
| 396 | 396 | |
| 397 | 397 | static const char *i960_get_strflags(void) |
| 398 | 398 | { |
| 399 | static const char *conditions[8] = | |
| 399 | static const char *const conditions[8] = | |
| 400 | 400 | { |
| 401 | 401 | "no", "g", "e", "ge", "l", "ne", "le", "o" |
| 402 | 402 | }; |
| r1386 | r1387 | |
|---|---|---|
| 90 | 90 | { "ending_code",0 } |
| 91 | 91 | }; |
| 92 | 92 | |
| 93 | static const char *constnames[32] = | |
| 93 | static const char *const constnames[32] = | |
| 94 | 94 | { |
| 95 | 95 | "0x0", "0x1", "0x2", "0x3", "0x4", "0x5", "0x6", "0x7", "0x8", "0x9", "0xa", "0xb", "0xc", "0xd", "0xe", "0xf", |
| 96 | 96 | "0x10", "0x11", "0x12", "0x13", "0x14", "0x15", "0x16", "0x17", "0x18", "0x19", "0x1a", "0x1b", "0x1c", "0x1d", "0x1e", "0x1f" |
| 97 | 97 | }; |
| 98 | 98 | |
| 99 | static const char *regnames[32] = | |
| 99 | static const char *const regnames[32] = | |
| 100 | 100 | { |
| 101 | 101 | "pfp","sp","rip","r3", "r4","r5","r6","r7", "r8","r9","r10","r11", "r12","r13","r14","r15", |
| 102 | 102 | "g0","g1","g2","g3", "g4","g5","g6","g7", "g8","g9","g10","g11", "g12","g13","g14","fp", |
| r1386 | r1387 | |
|---|---|---|
| 877 | 877 | return clkIF+1; |
| 878 | 878 | } |
| 879 | 879 | |
| 880 | static UINT32 (*OpCodeTable[64])(void) = | |
| 880 | static UINT32 (*const OpCodeTable[64])(void) = | |
| 881 | 881 | { |
| 882 | 882 | /* 0x00 */ opMOVr, // mov r1,r2 1 |
| 883 | 883 | /* 0x01 */ opADDr, // add r1,r2 1 |
| r1386 | r1387 | |
|---|---|---|
| 7 | 7 | #include "debugger.h" |
| 8 | 8 | #include "v810.h" |
| 9 | 9 | |
| 10 | const static char *dRegs[]={ | |
| 10 | static const char *const dRegs[]= | |
| 11 | { | |
| 11 | 12 | "R0","R1","R2","SP","R4", |
| 12 | 13 | "R5","R6","R7","R8","R9", |
| 13 | 14 | "R10","R11","R12","R13", |
| r1386 | r1387 | |
|---|---|---|
| 60 | 60 | #define FMT(a,b) a, b |
| 61 | 61 | #define PTRS_PER_FORMAT 2 |
| 62 | 62 | |
| 63 | static const char *arith[8] = { "*", "*-", "*+", "??", "BR0-", "*0-", "*0+", "*BR0+" } ; | |
| 64 | static const char *nextar[16] = { "", "", "", "", "", "", "", "", ",AR0", ",AR1", ",AR2", ",AR3", ",AR4", ",AR5", ",AR6", ",AR7" } ; | |
| 65 | static const char *cmpmode[4] = { "0 (ARx = AR0)" , "1 (ARx < AR0)" , "2 (ARx > AR0)" , "3 (ARx <> AR0)" } ; | |
| 63 | static const char *const arith[8] = { "*", "*-", "*+", "??", "BR0-", "*0-", "*0+", "*BR0+" } ; | |
| 64 | static const char *const nextar[16] = { "", "", "", "", "", "", "", "", ",AR0", ",AR1", ",AR2", ",AR3", ",AR4", ",AR5", ",AR6", ",AR7" } ; | |
| 65 | static const char *const cmpmode[4] = { "0 (ARx = AR0)" , "1 (ARx < AR0)" , "2 (ARx > AR0)" , "3 (ARx <> AR0)" } ; | |
| 66 | 66 | |
| 67 | 67 | |
| 68 | static const char *TMS32025Formats[] = { | |
| 68 | static const char *const TMS32025Formats[] = { | |
| 69 | 69 | FMT("0000tttt0aaaaaaa", "add %A,%T"), /* 0xxx */ |
| 70 | 70 | FMT("0000tttt1mmmnnnn", "add %M,%T%N"), |
| 71 | 71 | FMT("0001tttt0aaaaaaa", "sub %A,%T"), /* 1xxx */ |
| r1386 | r1387 | |
| 347 | 347 | |
| 348 | 348 | static void InitDasm32025(void) |
| 349 | 349 | { |
| 350 | const char *p, **ops; | |
| 350 | const char *p; | |
| 351 | const char *const *ops; | |
| 351 | 352 | word mask, bits; |
| 352 | 353 | int bit; |
| 353 | 354 | int i; |
| r1386 | r1387 | |
|---|---|---|
| 1643 | 1643 | * Opcode Table |
| 1644 | 1644 | ***********************************************************************/ |
| 1645 | 1645 | |
| 1646 | static opcode_fn opcode_main[256]= | |
| 1646 | static const opcode_fn opcode_main[256]= | |
| 1647 | 1647 | { |
| 1648 | 1648 | /*00*/ add, add, add, add, add, add, add, add, |
| 1649 | 1649 | /*08*/ add, add, add, add, add, add, add, add, |
| r1386 | r1387 | |
| 1679 | 1679 | /*F8*/ bbz, bbnz, bioz, banz, blkp, blkd, call, br |
| 1680 | 1680 | }; |
| 1681 | 1681 | |
| 1682 | static opcode_fn opcode_DX_subset[8]= /* Instructions living under the Dxxx opcode */ | |
| 1682 | static const opcode_fn opcode_DX_subset[8]= /* Instructions living under the Dxxx opcode */ | |
| 1683 | 1683 | { |
| 1684 | 1684 | /*00*/ lrlk, lalk, adlk, sblk, andk, ork, xork, illegal |
| 1685 | 1685 | }; |
| 1686 | 1686 | |
| 1687 | static opcode_fn opcode_CE_subset[256]= | |
| 1687 | static const opcode_fn opcode_CE_subset[256]= | |
| 1688 | 1688 | { |
| 1689 | 1689 | /*00*/ eint, dint, rovm, sovm, cnfd, cnfp, rsxm, ssxm, |
| 1690 | 1690 | /*08*/ spm, spm, spm, spm, rxf, sxf, fort, fort, |
| r1386 | r1387 | |
|---|---|---|
| 52 | 52 | #define FMT(a,b) a, b |
| 53 | 53 | #define PTRS_PER_FORMAT 2 |
| 54 | 54 | |
| 55 | static const char *regfile[32] = { "Reg$00 (IND)", "Reg$01 (TMR)", "Reg$02 (PCL)", "Reg$03 (ST)", "Reg$04 (FSR)", "Reg$05 (PTA)", "Reg$06 (PTB)", "Reg$07 (PTC)", | |
| 55 | static const char *const regfile[32] = { "Reg$00 (IND)", "Reg$01 (TMR)", "Reg$02 (PCL)", "Reg$03 (ST)", "Reg$04 (FSR)", "Reg$05 (PTA)", "Reg$06 (PTB)", "Reg$07 (PTC)", | |
| 56 | 56 | "Reg$08", "Reg$09", "Reg$0A", "Reg$0B", "Reg$0C", "Reg$0D", "Reg$0E", "Reg$0F", |
| 57 | 57 | "Reg$10", "Reg$11", "Reg$12", "Reg$13", "Reg$14", "Reg$15", "Reg$16", "Reg$17", |
| 58 | 58 | "Reg$18", "Reg$19", "Reg$1A", "Reg$1B", "Reg$1C", "Reg$1D", "Reg$1E", "Reg$1F" }; |
| 59 | 59 | |
| 60 | static const char *dest[2] = { "W", "Reg" }; | |
| 60 | static const char *const dest[2] = { "W", "Reg" }; | |
| 61 | 61 | |
| 62 | static const char *PIC16C5xFormats[] = { | |
| 62 | static const char *const PIC16C5xFormats[] = { | |
| 63 | 63 | FMT("000000000000", "nop"), |
| 64 | 64 | FMT("000000000010", "option"), |
| 65 | 65 | FMT("000000000011", "sleep"), |
| r1386 | r1387 | |
| 113 | 113 | |
| 114 | 114 | static void InitDasm16C5x(void) |
| 115 | 115 | { |
| 116 | const char *p, **ops; | |
| 116 | const char *p; | |
| 117 | const char *const *ops; | |
| 117 | 118 | word mask, bits; |
| 118 | 119 | int bit; |
| 119 | 120 | int i; |
| r1386 | r1387 | |
|---|---|---|
| 10 | 10 | #include "debugger.h" |
| 11 | 11 | #include "t11.h" |
| 12 | 12 | |
| 13 | static const char *regs[8] = { "R0", "R1", "R2", "R3", "R4", "R5", "SP", "PC" }; | |
| 13 | static const char *const regs[8] = { "R0", "R1", "R2", "R3", "R4", "R5", "SP", "PC" }; | |
| 14 | 14 | |
| 15 | 15 | static const UINT8 *rombase; |
| 16 | 16 | static offs_t pcbase; |
| r1386 | r1387 | |
|---|---|---|
| 1109 | 1109 | |
| 1110 | 1110 | |
| 1111 | 1111 | |
| 1112 | static void (*opcode_table[65536 >> 3])(void) = | |
| 1112 | static void (*const opcode_table[65536 >> 3])(void) = | |
| 1113 | 1113 | { |
| 1114 | 1114 | /* 0x0000 */ |
| 1115 | 1115 | op_0000, illegal, illegal, illegal, illegal, illegal, illegal, illegal, |
| r1386 | r1387 | |
|---|---|---|
| 119 | 119 | static char *WriteDataProcessingOperand( char *pBuf, UINT32 opcode, int printOp0, int printOp1, int printOp2 ) |
| 120 | 120 | { |
| 121 | 121 | /* ccccctttmmmm */ |
| 122 | static const char *pRegOp[4] = { "LSL","LSR","ASR","ROR" }; | |
| 122 | static const char *const pRegOp[4] = { "LSL","LSR","ASR","ROR" }; | |
| 123 | 123 | |
| 124 | 124 | if (printOp0) |
| 125 | 125 | pBuf += sprintf(pBuf,"R%d, ", (opcode>>12)&0xf); |
| r1386 | r1387 | |
| 158 | 158 | static char *WriteRegisterOperand1( char *pBuf, UINT32 opcode ) |
| 159 | 159 | { |
| 160 | 160 | /* ccccctttmmmm */ |
| 161 | static const char *pRegOp[4] = { "LSL","LSR","ASR","ROR" }; | |
| 161 | static const char *const pRegOp[4] = { "LSL","LSR","ASR","ROR" }; | |
| 162 | 162 | |
| 163 | 163 | pBuf += sprintf( |
| 164 | 164 | pBuf, |
| r1386 | r1387 | |
| 202 | 202 | { |
| 203 | 203 | const char *pBuf0; |
| 204 | 204 | |
| 205 | static const char *pConditionCodeTable[16] = | |
| 205 | static const char *const pConditionCodeTable[16] = | |
| 206 | 206 | { |
| 207 | 207 | "EQ","NE","CS","CC", |
| 208 | 208 | "MI","PL","VS","VC", |
| 209 | 209 | "HI","LS","GE","LT", |
| 210 | 210 | "GT","LE","","NV" |
| 211 | 211 | }; |
| 212 | static const char *pOperation[16] = | |
| 212 | static const char *const pOperation[16] = | |
| 213 | 213 | { |
| 214 | 214 | "AND","EOR","SUB","RSB", |
| 215 | 215 | "ADD","ADC","SBC","RSC", |
| r1386 | r1387 | |
|---|---|---|
| 76 | 76 | }; |
| 77 | 77 | |
| 78 | 78 | |
| 79 | static const char *token[]= | |
| 79 | static const char *const token[]= | |
| 80 | 80 | { |
| 81 | 81 | /* 6502 opcodes */ |
| 82 | 82 | "adc", "and", "asl", "bcc", "bcs", "beq", "bit", "bmi", |
| r1386 | r1387 | |
|---|---|---|
| 213 | 213 | |
| 214 | 214 | /* timer off by default */ |
| 215 | 215 | h6280.timer_status=0; |
| 216 | h6280.timer_load = 128 * 1024; | |
| 216 | 217 | |
| 217 | 218 | /* clear pending interrupts */ |
| 218 | 219 | for (i = 0; i < 3; i++) |
| r1386 | r1387 | |
|---|---|---|
| 251 | 251 | static void trap(void); |
| 252 | 252 | #endif |
| 253 | 253 | |
| 254 | static void (*m6800_insn[0x100])(void) = { | |
| 254 | static void (*const m6800_insn[0x100])(void) = { | |
| 255 | 255 | illegal,nop, illegal,illegal,illegal,illegal,tap, tpa, |
| 256 | 256 | inx, dex, clv, sev, clc, sec, cli, sei, |
| 257 | 257 | sba, cba, illegal,illegal,illegal,illegal,tab, tba, |
| r1386 | r1387 | |
| 287 | 287 | }; |
| 288 | 288 | |
| 289 | 289 | #if (HAS_M6801||HAS_M6803) |
| 290 | static void (*m6803_insn[0x100])(void) = { | |
| 290 | static void (*const m6803_insn[0x100])(void) = { | |
| 291 | 291 | illegal,nop, illegal,illegal,lsrd, asld, tap, tpa, |
| 292 | 292 | inx, dex, clv, sev, clc, sec, cli, sei, |
| 293 | 293 | sba, cba, illegal,illegal,illegal,illegal,tab, tba, |
| r1386 | r1387 | |
| 324 | 324 | #endif |
| 325 | 325 | |
| 326 | 326 | #if (HAS_HD63701) |
| 327 | static void (*hd63701_insn[0x100])(void) = { | |
| 327 | static void (*const hd63701_insn[0x100])(void) = { | |
| 328 | 328 | trap ,nop, trap ,trap ,lsrd, asld, tap, tpa, |
| 329 | 329 | inx, dex, clv, sev, clc, sec, cli, sei, |
| 330 | 330 | sba, cba, undoc1, undoc2, trap ,trap ,tab, tba, |
| r1386 | r1387 | |
| 361 | 361 | #endif |
| 362 | 362 | |
| 363 | 363 | #if (HAS_NSC8105) |
| 364 | static void (*nsc8105_insn[0x100])(void) = { | |
| 364 | static void (*const nsc8105_insn[0x100])(void) = { | |
| 365 | 365 | illegal,illegal,nop, illegal,illegal,tap, illegal,tpa, |
| 366 | 366 | inx, clv, dex, sev, clc, cli, sec, sei, |
| 367 | 367 | sba, illegal,cba, illegal,illegal,tab, illegal,tba, |
| r1386 | r1387 | |
|---|---|---|
| 52 | 52 | tstb, tsx, txs, asx1, asx2, xgdx, addx, adcx |
| 53 | 53 | }; |
| 54 | 54 | |
| 55 | static const char *op_name_str[] = { | |
| 55 | static const char *const op_name_str[] = { | |
| 56 | 56 | "aba", "abx", "adca", "adcb", "adda", "addb", "addd", "aim", |
| 57 | 57 | "anda", "andb", "asl", "asla", "aslb", "asld", "asr", "asra", |
| 58 | 58 | "asrb", "bcc", "bcs", "beq", "bge", "bgt", "bhi", "bita", |
| r1386 | r1387 | |
| 79 | 79 | * 2 invalid opcode for 1:6800/6802/6808, 2:6801/6803, 4:HD63701 |
| 80 | 80 | */ |
| 81 | 81 | |
| 82 | static UINT8 table[0x102][3] = { | |
| 82 | static const UINT8 table[0x102][3] = { | |
| 83 | 83 | {ill, inh,7},{nop, inh,0},{ill, inh,7},{ill, inh,7},/* 00 */ |
| 84 | 84 | {lsrd,inh,1},{asld,inh,1},{tap, inh,0},{tpa, inh,0}, |
| 85 | 85 | {inx, inh,0},{dex, inh,0},{clv, inh,0},{sev, inh,0}, |
| r1386 | r1387 | |
|---|---|---|
| 44 | 44 | #define W "W" |
| 45 | 45 | #define A "A" |
| 46 | 46 | |
| 47 | static const char *adr_b[]= | |
| 47 | static const char *const adr_b[]= | |
| 48 | 48 | { P, WP, XS, X, S, M, B, W }; |
| 49 | 49 | |
| 50 | static const char *adr_af[]= | |
| 50 | static const char *const adr_af[]= | |
| 51 | 51 | { P, WP, XS, X, S, M, B, W, 0, 0, 0, 0, 0, 0, 0, A }; |
| 52 | 52 | |
| 53 | static const char *adr_a[]= | |
| 53 | static const char *const adr_a[]= | |
| 54 | 54 | { P, WP, XS, X, S, M, B, W }; |
| 55 | 55 | |
| 56 | 56 | static const char number_2_hex[]= |
| r1386 | r1387 | |
| 587 | 587 | return 0; |
| 588 | 588 | } |
| 589 | 589 | |
| 590 | static OPCODE opcodes[][0x10]= { | |
| 590 | static const OPCODE opcodes[][0x10]= { | |
| 591 | 591 | { |
| 592 | 592 | // first digit |
| 593 | 593 | { Opcode0 }, |
| r1386 | r1387 | |
| 1261 | 1261 | int cont=1; // operation still not complete disassembled |
| 1262 | 1262 | char bin[10]; int binsize=0; // protocollizing fetched nibbles |
| 1263 | 1263 | char number[17]; |
| 1264 | OPCODE *level=opcodes[0]; //pointer to current digit | |
| 1264 | const OPCODE *level=opcodes[0]; //pointer to current digit | |
| 1265 | 1265 | int op; // currently fetched nibble |
| 1266 | 1266 | int pos = 0; |
| 1267 | 1267 |
| r1386 | r1387 | |
|---|---|---|
| 1282 | 1282 | * Cycle Timings |
| 1283 | 1283 | ***********************************************************************/ |
| 1284 | 1284 | |
| 1285 | static UINT8 i8x41_cycles[] = { | |
| 1285 | static const UINT8 i8x41_cycles[] = { | |
| 1286 | 1286 | 1,1,1,2,2,1,1,1,2,2,2,2,2,2,2,2, |
| 1287 | 1287 | 1,1,2,2,2,1,2,1,1,1,1,1,1,1,1,1, |
| 1288 | 1288 | 1,1,1,2,2,1,2,1,1,1,1,1,1,1,1,1, |
| r1386 | r1387 | |
|---|---|---|
| 213 | 213 | #define SET_V8(a,b,r) CC|=(((a^b^r^(r>>1))&0x80)>>6) |
| 214 | 214 | #define SET_V16(a,b,r) CC|=(((a^b^r^(r>>1))&0x8000)>>14) |
| 215 | 215 | |
| 216 | static UINT8 flags8i[256]= /* increment */ | |
| 216 | static const UINT8 flags8i[256]= /* increment */ | |
| 217 | 217 | { |
| 218 | 218 | CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 219 | 219 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| r1386 | r1387 | |
| 232 | 232 | CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N, |
| 233 | 233 | CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N |
| 234 | 234 | }; |
| 235 | static UINT8 flags8d[256]= /* decrement */ | |
| 235 | static const UINT8 flags8d[256]= /* decrement */ | |
| 236 | 236 | { |
| 237 | 237 | CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 238 | 238 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| r1386 | r1387 | |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | /* opcode timings */ |
| 335 | static UINT8 cycles1[] = | |
| 335 | static const UINT8 cycles1[] = | |
| 336 | 336 | { |
| 337 | 337 | /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ |
| 338 | 338 | /*0*/ 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 5, 5, 5, 5, |
| r1386 | r1387 | |
|---|---|---|
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | /* Table for indexed operations */ |
| 299 | static char index_reg[8][3] = { | |
| 299 | static const char index_reg[8][3] = { | |
| 300 | 300 | "?", /* 0 - extended mode */ |
| 301 | 301 | "?", /* 1 */ |
| 302 | 302 | "x", /* 2 */ |
| r1386 | r1387 | |
| 308 | 308 | }; |
| 309 | 309 | |
| 310 | 310 | /* Table for tfr/exg operations */ |
| 311 | static char tfrexg_reg[8][3] = { | |
| 311 | static const char tfrexg_reg[8][3] = { | |
| 312 | 312 | "a", /* 0 */ |
| 313 | 313 | "b", /* 1 */ |
| 314 | 314 | "x", /* 2 */ |
| r1386 | r1387 | |
| 320 | 320 | }; |
| 321 | 321 | |
| 322 | 322 | /* Table for stack S operations */ |
| 323 | static char stack_reg_s[8][3] = { | |
| 323 | static const char stack_reg_s[8][3] = { | |
| 324 | 324 | "cc", |
| 325 | 325 | "a", |
| 326 | 326 | "b", |
| r1386 | r1387 | |
| 332 | 332 | }; |
| 333 | 333 | |
| 334 | 334 | /* Table for stack U operations */ |
| 335 | static char stack_reg_u[8][3] = { | |
| 335 | static const char stack_reg_u[8][3] = { | |
| 336 | 336 | "cc", |
| 337 | 337 | "a", |
| 338 | 338 | "b", |
| r1386 | r1387 | |
| 1585 | 1585 | int confirmed; |
| 1586 | 1586 | } konami_opcode_def; |
| 1587 | 1587 | |
| 1588 | static konami_opcode_def op_table[256] = { | |
| 1588 | static const konami_opcode_def op_table[256] = { | |
| 1589 | 1589 | /* 00 */ { illegal, 0 }, |
| 1590 | 1590 | /* 01 */ { illegal, 0 }, |
| 1591 | 1591 | /* 02 */ { illegal, 0 }, |
| r1386 | r1387 | |
|---|---|---|
| 158 | 158 | |
| 159 | 159 | void soundlatch_setclearedvalue(int value) |
| 160 | 160 | { |
| 161 | assert_always(mame_get_phase(Machine) == MAME_PHASE_INIT, "Can only call soundlatch_setclearedvalue at init time!"); | |
| 161 | 162 | latch_clear_value = value; |
| 162 | 163 | } |
| r1386 | r1387 | |
|---|---|---|
| 560 | 560 | |
| 561 | 561 | for( i = 0; i < MAX_SOUND && drv.sound[i].type != SOUND_DUMMY; i++ ) |
| 562 | 562 | { |
| 563 | const char **samplenames = NULL; | |
| 563 | const char *const *samplenames = NULL; | |
| 564 | 564 | if( drv.sound[i].type == SOUND_SAMPLES ) |
| 565 | samplenames = ((struct Samplesinterface *)drv.sound[i].config)->samplenames; | |
| 565 | samplenames = ((const struct Samplesinterface *)drv.sound[i].config)->samplenames; | |
| 566 | 566 | if (samplenames != 0 && samplenames[0] != 0) { |
| 567 | 567 | int k = 0; |
| 568 | 568 | if (samplenames[k][0]=='*') |
| r1386 | r1387 | |
| 587 | 587 | |
| 588 | 588 | for( i = 0; i < MAX_SOUND && drv.sound[i].type != SOUND_DUMMY; i++ ) |
| 589 | 589 | { |
| 590 | const char **samplenames = NULL; | |
| 590 | const char *const *samplenames = NULL; | |
| 591 | 591 | if( drv.sound[i].type == SOUND_SAMPLES ) |
| 592 | samplenames = ((struct Samplesinterface *)drv.sound[i].config)->samplenames; | |
| 592 | samplenames = ((const struct Samplesinterface *)drv.sound[i].config)->samplenames; | |
| 593 | 593 | if (samplenames != 0 && samplenames[0] != 0) { |
| 594 | 594 | int k = 0; |
| 595 | 595 | if (samplenames[k][0]=='*') |
| r1386 | r1387 | |
|---|---|---|
| 131 | 131 | for (sndnum = 0; sndnum < ARRAY_LENGTH(config.sound); sndnum++) |
| 132 | 132 | if (config.sound[sndnum].type == SOUND_SAMPLES) |
| 133 | 133 | { |
| 134 | struct Samplesinterface *intf = (struct Samplesinterface *)config.sound[sndnum].config; | |
| 134 | const struct Samplesinterface *intf = (const struct Samplesinterface *)config.sound[sndnum].config; | |
| 135 | 135 | |
| 136 | 136 | if (intf->samplenames != NULL) |
| 137 | 137 | { |
| r1386 | r1387 | |
| 156 | 156 | for (sndnum = 0; sndnum < ARRAY_LENGTH(config.sound); sndnum++) |
| 157 | 157 | if (config.sound[sndnum].type == SOUND_SAMPLES) |
| 158 | 158 | { |
| 159 | struct Samplesinterface *intf = (struct Samplesinterface *)config.sound[sndnum].config; | |
| 159 | const struct Samplesinterface *intf = (const struct Samplesinterface *)config.sound[sndnum].config; | |
| 160 | 160 | const char *sharedname = NULL; |
| 161 | 161 | |
| 162 | 162 | if (intf->samplenames != NULL) |
| r1386 | r1387 | |
|---|---|---|
| 121 | 121 | $(EMUMACHINE)/74181.o \ |
| 122 | 122 | $(EMUMACHINE)/8042kbdc.o \ |
| 123 | 123 | $(EMUMACHINE)/8237dma.o \ |
| 124 | $(EMUMACHINE)/8257dma.o \ | |
| 124 | 125 | $(EMUMACHINE)/8255ppi.o \ |
| 125 | 126 | $(EMUMACHINE)/adc083x.o \ |
| 126 | 127 | $(EMUMACHINE)/adc1213x.o \ |
| r1386 | r1387 | |
|---|---|---|
| 11 | 11 | #include "driver.h" |
| 12 | 12 | #include "machine/at28c16.h" |
| 13 | 13 | |
| 14 | #define DATA_SIZE ( 0x800 ) | |
| 15 | #define ID_SIZE ( 0x020 ) | |
| 16 | #define ID_OFFSET ( DATA_SIZE - ID_SIZE ) | |
| 14 | #define SIZE_DATA ( 0x800 ) | |
| 15 | #define SIZE_ID ( 0x020 ) | |
| 16 | #define OFFSET_ID ( SIZE_DATA - SIZE_ID ) | |
| 17 | 17 | |
| 18 | 18 | struct at28c16_chip |
| 19 | 19 | { |
| 20 | UINT8 data[ DATA_SIZE ]; | |
| 21 | UINT8 id[ ID_SIZE ]; | |
| 20 | UINT8 *data; | |
| 21 | UINT8 *id; | |
| 22 | 22 | UINT8 a9_12v; |
| 23 | 23 | }; |
| 24 | 24 | |
| r1386 | r1387 | |
| 39 | 39 | |
| 40 | 40 | /* nvram handlers */ |
| 41 | 41 | |
| 42 | ||
| 42 | ||
| 43 | 43 | { |
| 44 | 44 | struct at28c16_chip *c; |
| 45 | 45 | if( chip >= MAX_AT28C16_CHIPS ) |
| r1386 | r1387 | |
| 50 | 50 | c = &at28c16[ chip ]; |
| 51 | 51 | |
| 52 | 52 | c->a9_12v = 0; |
| 53 | memset( c->data, 0, DATA_SIZE ); | |
| 54 | memset( c->id, 0, ID_SIZE ); | |
| 55 | 53 | |
| 56 | state_save_register_item_array( "at28c16", chip, c->data ); | |
| 57 | state_save_register_item_array( "at28c16", chip, c->id ); | |
| 54 | if( data == NULL ) | |
| 55 | { | |
| 56 | data = auto_malloc( SIZE_DATA ); | |
| 57 | } | |
| 58 | ||
| 59 | if( id == NULL ) | |
| 60 | { | |
| 61 | id = auto_malloc( SIZE_ID ); | |
| 62 | } | |
| 63 | ||
| 64 | c->data = data; | |
| 65 | c->id = id; | |
| 66 | ||
| 67 | state_save_register_item_pointer( "at28c16", chip, c->data, SIZE_DATA ); | |
| 68 | state_save_register_item_pointer( "at28c16", chip, c->id, SIZE_ID ); | |
| 58 | 69 | state_save_register_item( "at28c16", chip, c->a9_12v ); |
| 59 | 70 | } |
| 60 | 71 | |
| r1386 | r1387 | |
| 70 | 81 | |
| 71 | 82 | if( read_or_write ) |
| 72 | 83 | { |
| 73 | mame_fwrite( file, c->data, DATA_SIZE ); | |
| 74 | mame_fwrite( file, c->id, ID_SIZE ); | |
| 84 | mame_fwrite( file, c->data, SIZE_DATA ); | |
| 85 | mame_fwrite( file, c->id, SIZE_ID ); | |
| 75 | 86 | } |
| 76 | 87 | else |
| 77 | 88 | { |
| 78 | at28c16_init( chip ); | |
| 79 | 89 | if( file ) |
| 80 | 90 | { |
| 81 | mame_fread( file, c->data, DATA_SIZE ); | |
| 82 | mame_fread( file, c->id, ID_SIZE ); | |
| 91 | mame_fread( file, c->data, SIZE_DATA ); | |
| 92 | mame_fread( file, c->id, SIZE_ID ); | |
| 83 | 93 | } |
| 84 | 94 | } |
| 85 | 95 | } |
| r1386 | r1387 | |
| 101 | 111 | } |
| 102 | 112 | c = &at28c16[ chip ]; |
| 103 | 113 | |
| 104 | if( offset >= | |
| 114 | if( offset >= | |
| 105 | 115 | { |
| 106 | 116 | logerror( "at28c16_read( %04x ) id\n", offset ); |
| 107 | return c->id[ offset - | |
| 117 | return c->id[ offset - | |
| 108 | 118 | } |
| 109 | 119 | else |
| 110 | 120 | { |
| 111 | // logerror( "at28c16_read( %04x ) data\n", offset ); | |
| 121 | // logerror( "%08x: at28c16_read( %d, %04x ) %02x data\n", activecpu_get_pc(), chip, offset, c->data[ offset ] ); | |
| 112 | 122 | return c->data[ offset ]; |
| 113 | 123 | } |
| 114 | 124 | } |
| r1386 | r1387 | |
| 123 | 133 | } |
| 124 | 134 | c = &at28c16[ chip ]; |
| 125 | 135 | |
| 126 | if( offset >= | |
| 136 | if( offset >= | |
| 127 | 137 | { |
| 128 | 138 | logerror( "at28c16_write( %d, %04x, %02x ) id\n", chip, offset, data ); |
| 129 | c->id[ offset - | |
| 139 | c->id[ offset - | |
| 130 | 140 | } |
| 131 | 141 | else |
| 132 | 142 | { |
| 133 | // logerror( "at28c16_write( %d, %04x, %02x ) data\n", chip, offset, data ); | |
| 143 | // logerror( "%08x: at28c16_write( %d, %04x, %02x ) data\n", activecpu_get_pc(), chip, offset, data ); | |
| 134 | 144 | c->data[ offset ] = data; |
| 135 | 145 | } |
| 136 | 146 | } |
| r1386 | r1387 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | #define MAX_AT28C16_CHIPS ( 4 ) |
| 12 | 12 | |
| 13 | extern void at28c16_init( int chip, UINT8 *data, UINT8 *id ); | |
| 13 | 14 | extern void at28c16_a9_12v( int chip, int a9_12v ); |
| 14 | 15 | |
| 15 | 16 | /* nvram handlers */ |
| r1386 | r1387 | |
|---|---|---|
| 6 | 6 | #define SERIAL_BUFFER_LENGTH 40 |
| 7 | 7 | #define MEMORY_SIZE 1024 |
| 8 | 8 | |
| 9 | static struct EEPROM_interface *intf; | |
| 9 | static const struct EEPROM_interface *intf; | |
| 10 | 10 | |
| 11 | 11 | static int serial_count; |
| 12 | 12 | static UINT8 serial_buffer[SERIAL_BUFFER_LENGTH]; |
| r1386 | r1387 | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | |
| 79 | struct EEPROM_interface eeprom_interface_93C46 = | |
| 79 | const struct EEPROM_interface eeprom_interface_93C46 = | |
| 80 | 80 | { |
| 81 | 81 | 6, // address bits 6 |
| 82 | 82 | 16, // data bits 16 |
| r1386 | r1387 | |
| 90 | 90 | // "*10010xxxx" // erase all 1 00 10xxxx |
| 91 | 91 | }; |
| 92 | 92 | |
| 93 | struct EEPROM_interface eeprom_interface_93C66B = | |
| 93 | const struct EEPROM_interface eeprom_interface_93C66B = | |
| 94 | 94 | { |
| 95 | 95 | 8, /* address bits */ |
| 96 | 96 | 16, /* data bits */ |
| r1386 | r1387 | |
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | void EEPROM_init(struct EEPROM_interface *interface) | |
| 129 | void EEPROM_init(const struct EEPROM_interface *interface) | |
| 130 | 130 | { |
| 131 | 131 | intf = interface; |
| 132 | 132 |
| r0 | r1387 | |
|---|---|---|
| 1 | /********************************************************************** | |
| 2 | ||
| 3 | 8257 DMA interface and emulation | |
| 4 | ||
| 5 | For datasheet http://www.threedee.com/jcm/library/index.html | |
| 6 | ||
| 7 | 2007/11 couriersud | |
| 8 | ||
| 9 | - architecture copied from 8237 DMA | |
| 10 | - significant changes to implementation | |
| 11 | ||
| 12 | The DMA works like this: | |
| 13 | ||
| 14 | 1. The device asserts the DRQn line | |
| 15 | 2. The DMA clears the TC (terminal count) line | |
| 16 | 3. The DMA asserts the CPU's HRQ (halt request) line | |
| 17 | 4. Upon acknowledgement of the halt, the DMA will let the device | |
| 18 | know that it needs to send information by asserting the DACKn | |
| 19 | line | |
| 20 | 5. The DMA will read the byte from the device | |
| 21 | 6. The device clears the DRQn line | |
| 22 | 7. The DMA clears the CPU's HRQ line | |
| 23 | 8. (steps 3-7 are repeated for every byte in the chain) | |
| 24 | ||
| 25 | **********************************************************************/ | |
| 26 | ||
| 27 | #include "driver.h" | |
| 28 | #include "memconv.h" | |
| 29 | #include "8257dma.h" | |
| 30 | ||
| 31 | struct dma8257 | |
| 32 | { | |
| 33 | const struct dma8257_interface *intf; | |
| 34 | emu_timer *timer; | |
| 35 | emu_timer *msbflip_timer; | |
| 36 | ||
| 37 | UINT16 registers[DMA8257_NUM_CHANNELS*2]; | |
| 38 | ||
| 39 | UINT16 address[DMA8257_NUM_CHANNELS]; | |
| 40 | UINT16 count[DMA8257_NUM_CHANNELS]; | |
| 41 | UINT8 rwmode[DMA8257_NUM_CHANNELS]; | |
| 42 | ||
| 43 | UINT8 mode; | |
| 44 | UINT8 rr; | |
| 45 | ||
| 46 | UINT8 msb; | |
| 47 | UINT8 drq; | |
| 48 | ||
| 49 | /* bits 0- 3 : Terminal count for channels 0-3 */ | |
| 50 | UINT8 status; | |
| 51 | }; | |
| 52 | ||
| 53 | static struct dma8257 *dma; | |
| 54 | static int dma_count; | |
| 55 | ||
| 56 | #define DMA_MODE_AUTOLOAD(mode) ((mode) & 0x80) | |
| 57 | #define DMA_MODE_TCSTOP(mode) ((mode) & 0x40) | |
| 58 | #define DMA_MODE_EXWRITE(mode) ((mode) & 0x20) | |
| 59 | #define DMA_MODE_ROTPRIO(mode) ((mode) & 0x10) | |
| 60 | #define DMA_MODE_CH_EN(mode, chan) ((mode) & (1 << (chan))) | |
| 61 | ||
| 62 | static TIMER_CALLBACK( dma8257_timerproc ); | |
| 63 | static TIMER_CALLBACK( dma8257_msbflip_timerproc ); | |
| 64 | static void dma8257_update_status(int which); | |
| 65 | ||
| 66 | /* ----------------------------------------------------------------------- */ | |
| 67 | ||
| 68 | int dma8257_init(int count) | |
| 69 | { | |
| 70 | int which; | |
| 71 | ||
| 72 | dma = auto_malloc(count * sizeof(struct dma8257)); | |
| 73 | memset(dma, 0, count * sizeof(struct dma8257)); | |
| 74 | dma_count = count; | |
| 75 | ||
| 76 | for (which = 0; which < dma_count; which++) | |
| 77 | { | |
| 78 | dma[which].status = 0x0F; | |
| 79 | dma[which].timer = timer_alloc(dma8257_timerproc, NULL); | |
| 80 | dma[which].msbflip_timer = timer_alloc(dma8257_msbflip_timerproc, NULL); | |
| 81 | ||
| 82 | state_save_register_item_array("8257", which, dma[which].address); | |
| 83 | state_save_register_item_array("8257", which, dma[which].count); | |
| 84 | state_save_register_item_array("8257", which, dma[which].rwmode); | |
| 85 | state_save_register_item_array("8257", which, dma[which].registers); | |
| 86 | ||
| 87 | state_save_register_item("8257", which, dma[which].mode); | |
| 88 | state_save_register_item("8257", which, dma[which].rr); | |
| 89 | state_save_register_item("8257", which, dma[which].msb); | |
| 90 | state_save_register_item("8257", which, dma[which].drq); | |
| 91 | state_save_register_item("8257", which, dma[which].status); | |
| 92 | ||
| 93 | } | |
| 94 | ||
| 95 | return 0; | |
| 96 | } | |
| 97 | ||
| 98 | ||
| 99 | ||
| 100 | void dma8257_config(int which, const struct dma8257_interface *intf) | |
| 101 | { | |
| 102 | dma[which].intf = intf; | |
| 103 | } | |
| 104 | ||
| 105 | ||
| 106 | ||
| 107 | void dma8257_reset(void) | |
| 108 | { | |
| 109 | int which; | |
| 110 | ||
| 111 | for (which = 0; which < dma_count; which++) | |
| 112 | { | |
| 113 | dma[which].status &= 0xF0; | |
| 114 | dma[which].mode = 0; | |
| 115 | dma8257_update_status(which); | |
| 116 | } | |
| 117 | } | |
| 118 | ||
| 119 | ||
| 120 | ||
| 121 | /* ----------------------------------------------------------------------- */ | |
| 122 | ||
| 123 | ||
| 124 | ||
| 125 | static int dma8257_do_operation(int which, int channel) | |
| 126 | { | |
| 127 | int done; | |
| 128 | UINT8 data; | |
| 129 | UINT8 mode; | |
| 130 | ||
| 131 | mode = dma[which].rwmode[channel]; | |
| 132 | if (dma[which].count[channel] == 0x0000) | |
| 133 | { | |
| 134 | dma[which].status |= (0x01 << channel); | |
| 135 | if (dma[which].intf->out_tc_func[channel]) | |
| 136 | dma[which].intf->out_tc_func[channel](ASSERT_LINE); | |
| 137 | } | |
| 138 | switch(mode) { | |
| 139 | case 1: | |
| 140 | data = dma[which].intf->memory_read_func(channel, dma[which].address[channel]); | |
| 141 | dma[which].intf->channel_write_func[channel](data); | |
| 142 | ||
| 143 | dma[which].address[channel]++; | |
| 144 | dma[which].count[channel]--; | |
| 145 | done = (dma[which].count[channel] == 0xFFFF); | |
| 146 | break; | |
| 147 | ||
| 148 | case 2: | |
| 149 | data = dma[which].intf->channel_read_func[channel](); | |
| 150 | dma[which].intf->memory_write_func(channel, dma[which].address[channel], data); | |
| 151 | ||
| 152 | dma[which].address[channel]++; | |
| 153 | dma[which].count[channel]--; | |
| 154 | done = (dma[which].count[channel] == 0xFFFF); | |
| 155 | break; | |
| 156 | case 0: /* verify */ | |
| 157 | dma[which].address[channel]++; | |
| 158 | dma[which].count[channel]--; | |
| 159 | done = (dma[which].count[channel] == 0xFFFF); | |
| 160 | break; | |
| 161 | default: | |
| 162 | fatalerror("dma8257_do_operation: invalid mode!\n"); | |
| 163 | break; | |
| 164 | } | |
| 165 | if (done) | |
| 166 | { | |
| 167 | if (dma[which].intf->out_tc_func[channel]) | |
| 168 | dma[which].intf->out_tc_func[channel](CLEAR_LINE); | |
| 169 | } | |
| 170 | return done; | |
| 171 | } | |
| 172 | ||
| 173 | ||
| 174 | ||
| 175 | static TIMER_CALLBACK( dma8257_timerproc ) | |
| 176 | { | |
| 177 | int which = param; | |
| 178 | int i, channel = 0, rr; | |
| 179 | int done; | |
| 180 | ||
| 181 | rr = DMA_MODE_ROTPRIO(dma[which].mode) ? dma[which].rr : 0; | |
| 182 | for (i = 0; i < DMA8257_NUM_CHANNELS; i++) | |
| 183 | { | |
| 184 | channel = (i + rr) % DMA8257_NUM_CHANNELS; | |
| 185 | if ((dma[which].status & (1 << channel)) == 0) | |
| 186 | if (dma[which].mode & dma[which].drq & (1 << channel)) | |
| 187 | break; | |
| 188 | } | |
| 189 | done = dma8257_do_operation(which, channel); | |
| 190 | ||
| 191 | dma[which].rr = (channel + 1) & 0x03; | |
| 192 | ||
| 193 | if (done) | |
| 194 | { | |
| 195 | dma[which].drq &= ~(0x01 << channel); | |
| 196 | dma8257_update_status(which); | |
| 197 | if (DMA_MODE_TCSTOP(dma[which].mode)) | |
| 198 | dma[which].mode &= ~(0x01 << channel); | |
| 199 | } | |
| 200 | } | |
| 201 | ||
| 202 | ||
| 203 | ||
| 204 | static TIMER_CALLBACK( dma8257_msbflip_timerproc ) | |
| 205 | { | |
| 206 | dma[param].msb ^= 1; | |
| 207 | } | |
| 208 | ||
| 209 | ||
| 210 | ||
| 211 | static void dma8257_update_status(int which) | |
| 212 | { | |
| 213 | UINT16 pending_transfer; | |
| 214 | attotime next; | |
| 215 | ||
| 216 | /* no transfer is active right now; is there a transfer pending right now? */ | |
| 217 | pending_transfer = dma[which].drq & (dma[which].mode & 0x0F); | |
| 218 | ||
| 219 | if (pending_transfer) | |
| 220 | { | |
| 221 | next = ATTOTIME_IN_HZ(dma[which].intf->clockhz / 4 ); | |
| 222 | timer_adjust(dma[which].timer, | |
| 223 | attotime_zero, | |
| 224 | which, | |
| 225 | /* 1 byte transferred in 4 clock cycles */ | |
| 226 | next); | |
| 227 | } | |
| 228 | else | |
| 229 | { | |
| 230 | /* no transfers active right now */ | |
| 231 | timer_reset(dma[which].timer, attotime_never); | |
| 232 | } | |
| 233 | ||
| 234 | /* set the halt line */ | |
| 235 | if (dma[which].intf && dma[which].intf->cpunum >= 0) | |
| 236 | { | |
| 237 | cpunum_set_input_line(dma[which].intf->cpunum, INPUT_LINE_HALT, | |
| 238 | pending_transfer ? ASSERT_LINE : CLEAR_LINE); | |
| 239 | } | |
| 240 | ||
| 241 | } | |
| 242 | ||
| 243 | ||
| 244 | ||
| 245 | /* ----------------------------------------------------------------------- */ | |
| 246 | ||
| 247 | static void prepare_msb_flip(int which) | |
| 248 | { | |
| 249 | timer_adjust(dma[which].msbflip_timer, attotime_zero, which, attotime_zero); | |
| 250 | } | |
| 251 | ||
| 252 | ||
| 253 | ||
| 254 | static UINT8 dma8257_read(int which, offs_t offset) | |
| 255 | { | |
| 256 | UINT8 data = 0xFF; | |
| 257 | ||
| 258 | switch(offset) { | |
| 259 | case 0: | |
| 260 | case 1: | |
| 261 | case 2: | |
| 262 | case 3: | |
| 263 | case 4: | |
| 264 | case 5: | |
| 265 | case 6: | |
| 266 | case 7: | |
| 267 | /* DMA address/count register */ | |
| 268 | data = ( dma[which].registers[offset] >> (dma[which].msb ? 8 : 0) ) & 0xFF; | |
| 269 | prepare_msb_flip(which); | |
| 270 | break; | |
| 271 | ||
| 272 | case 8: | |
| 273 | /* DMA status register */ | |
| 274 | data = (UINT8) dma[which].status; | |
| 275 | /* read resets status ! */ | |
| 276 | dma[which].status &= 0xF0; | |
| 277 | ||
| 278 | break; | |
| 279 | ||
| 280 | default: | |
| 281 | logerror("8257: Read from register %d.\n", offset); | |
| 282 | data = 0xFF; | |
| 283 | break; | |
| 284 | } | |
| 285 | return data; | |
| 286 | } | |
| 287 | ||
| 288 | ||
| 289 | ||
| 290 | static void dma8257_write(int which, offs_t offset, UINT8 data) | |
| 291 | { | |
| 292 | ||
| 293 | switch(offset) { | |
| 294 | case 0: | |
| 295 | case 1: | |
| 296 | case 2: | |
| 297 | case 3: | |
| 298 | case 4: | |
| 299 | case 5: | |
| 300 | case 6: | |
| 301 | case 7: | |
| 302 | /* DMA address/count register */ | |
| 303 | if (dma[which].msb) | |
| 304 | dma[which].registers[offset] |= ((UINT16) data) << 8; | |
| 305 | else | |
| 306 | dma[which].registers[offset] = data; | |
| 307 | prepare_msb_flip(which); | |
| 308 | break; | |
| 309 | ||
| 310 | case 8: | |
| 311 | /* DMA mode register */ | |
| 312 | if (DMA_MODE_AUTOLOAD(data) ) | |
| 313 | fatalerror("8257: Autoload not supported!\n"); | |
| 314 | dma[which].mode = data; | |
| 315 | break; | |
| 316 | ||
| 317 | default: | |
| 318 | logerror("8257: Write to register %d.\n", offset); | |
| 319 | break; | |
| 320 | } | |
| 321 | } | |
| 322 | ||
| 323 | ||
| 324 | ||
| 325 | static TIMER_CALLBACK( dma8257_drq_write_callback ) | |
| 326 | { | |
| 327 | int which = param >> 3; | |
| 328 | int channel = (param >> 1) & 0x03; | |
| 329 | int state = param & 0x01; | |
| 330 | ||
| 331 | /* normalize state */ | |
| 332 | if (state) | |
| 333 | { | |
| 334 | dma[which].drq |= 0x01 << channel; | |
| 335 | dma[which].address[channel] = dma[which].registers[channel * 2]; | |
| 336 | dma[which].count[channel] = dma[which].registers[channel * 2 + 1] & 0x3FF; | |
| 337 | dma[which].rwmode[channel] = dma[which].registers[channel * 2 + 1] >> 14; | |
| 338 | /* clear channel TC */ | |
| 339 | dma[which].status &= ~(0x01 << channel); | |
| 340 | } | |
| 341 | else | |
| 342 | dma[which].drq &= ~(0x01 << channel); | |
| 343 | ||
| 344 | dma8257_update_status(which); | |
| 345 | } | |
| 346 | ||
| 347 | ||
| 348 | ||
| 349 | void dma8257_drq_write(int which, int channel, int state) | |
| 350 | { | |
| 351 | int param; | |
| 352 | ||
| 353 | param = (which << 3) | (channel << 1) | (state ? 1 : 0); | |
| 354 | timer_call_after_resynch(NULL, param, dma8257_drq_write_callback); | |
| 355 | } | |
| 356 | ||
| 357 | ||
| 358 | /******************* Standard 8-bit/32-bit/64-bit CPU interfaces *******************/ | |
| 359 | ||
| 360 | READ8_HANDLER( dma8257_0_r ) { return dma8257_read(0, offset); } | |
| 361 | READ8_HANDLER( dma8257_1_r ) { return dma8257_read(1, offset); } | |
| 362 | WRITE8_HANDLER( dma8257_0_w ) { dma8257_write(0, offset, data); } | |
| 363 | WRITE8_HANDLER( dma8257_1_w ) { dma8257_write(1, offset, data); } | |
| 364 | ||
| 365 | READ16_HANDLER( dma8257_16le_0_r ) { return read16le_with_read8_handler(dma8257_0_r, offset, mem_mask); } | |
| 366 | READ16_HANDLER( dma8257_16le_1_r ) { return read16le_with_read8_handler(dma8257_1_r, offset, mem_mask); } | |
| 367 | WRITE16_HANDLER( dma8257_16le_0_w ) { write16le_with_write8_handler(dma8257_0_w, offset, data, mem_mask); } | |
| 368 | WRITE16_HANDLER( dma8257_16le_1_w ) { write16le_with_write8_handler(dma8257_1_w, offset, data, mem_mask); } | |
| 369 | ||
| 370 | READ32_HANDLER( dma8257_32le_0_r ) { return read32le_with_read8_handler(dma8257_0_r, offset, mem_mask); } | |
| 371 | READ32_HANDLER( dma8257_32le_1_r ) { return read32le_with_read8_handler(dma8257_1_r, offset, mem_mask); } | |
| 372 | WRITE32_HANDLER( dma8257_32le_0_w ) { write32le_with_write8_handler(dma8257_0_w, offset, data, mem_mask); } | |
| 373 | WRITE32_HANDLER( dma8257_32le_1_w ) { write32le_with_write8_handler(dma8257_1_w, offset, data, mem_mask); } | |
| 374 | ||
| 375 | READ64_HANDLER( dma8257_64be_0_r ) { return read64be_with_read8_handler(dma8257_0_r, offset, mem_mask); } | |
| 376 | READ64_HANDLER( dma8257_64be_1_r ) { return read64be_with_read8_handler(dma8257_1_r, offset, mem_mask); } | |
| 377 | WRITE64_HANDLER( dma8257_64be_0_w ) { write64be_with_write8_handler(dma8257_0_w, offset, data, mem_mask); } | |
| 378 | WRITE64_HANDLER( dma8257_64be_1_w ) { write64be_with_write8_handler(dma8257_1_w, offset, data, mem_mask); } |
| r1386 | r1387 | |
|---|---|---|
| 16 | 16 | }; |
| 17 | 17 | |
| 18 | 18 | |
| 19 | void EEPROM_init(struct EEPROM_interface *interface); | |
| 19 | void EEPROM_init(const struct EEPROM_interface *interface); | |
| 20 | 20 | |
| 21 | 21 | void EEPROM_write_bit(int bit); |
| 22 | 22 | int EEPROM_read_bit(void); |
| r1386 | r1387 | |
| 30 | 30 | UINT8 * EEPROM_get_data_pointer(int * length); |
| 31 | 31 | |
| 32 | 32 | /* 93C46 */ |
| 33 | extern struct EEPROM_interface eeprom_interface_93C46; | |
| 33 | extern const struct EEPROM_interface eeprom_interface_93C46; | |
| 34 | 34 | NVRAM_HANDLER( 93C46 ); |
| 35 | 35 | |
| 36 | 36 | /* 93C66B */ |
| 37 | extern struct EEPROM_interface eeprom_interface_93C66B; | |
| 37 | extern const struct EEPROM_interface eeprom_interface_93C66B; | |
| 38 | 38 | NVRAM_HANDLER( 93C66B ); |
| 39 | 39 | |
| 40 | 40 | #endif |
| r0 | r1387 | |
|---|---|---|
| 1 | /********************************************************************** | |
| 2 | ||
| 3 | 8257 DMA interface and emulation | |
| 4 | ||
| 5 | **********************************************************************/ | |
| 6 | ||
| 7 | #ifndef DMA8257_H | |
| 8 | #define DMA8257_H | |
| 9 | ||
| 10 | #define DMA8257_STATUS_UPDATE 0x10 | |
| 11 | #define DMA8257_STATUS_TC_CH3 0x08 | |
| 12 | #define DMA8257_STATUS_TC_CH2 0x04 | |
| 13 | #define DMA8257_STATUS_TC_CH1 0x02 | |
| 14 | #define DMA8257_STATUS_TC_CH0 0x01 | |
| 15 | ||
| 16 | #define DMA8257_NUM_CHANNELS (4) | |
| 17 | ||
| 18 | ||
| 19 | struct dma8257_interface | |
| 20 | { | |
| 21 | /* CPU to halt when DMA is active */ | |
| 22 | int cpunum; | |
| 23 | ||
| 24 | /* speed of DMA accesses (per byte) */ | |
| 25 | int clockhz; | |
| 26 | ||
| 27 | /* accessors to main memory */ | |
| 28 | UINT8 (*memory_read_func)(int channel, offs_t offset); | |
| 29 | void (*memory_write_func)(int channel, offs_t offset, UINT8 data); | |
| 30 | ||
| 31 | /* channel accesors */ | |
| 32 | UINT8 (*channel_read_func[DMA8257_NUM_CHANNELS])(void); | |
| 33 | void (*channel_write_func[DMA8257_NUM_CHANNELS])(UINT8 data); | |
| 34 | ||
| 35 | /* function to call when DMA completes */ | |
| 36 | void (*out_tc_func[DMA8257_NUM_CHANNELS])(int state); | |
| 37 | }; | |
| 38 | ||
| 39 | ||
| 40 | ||
| 41 | int dma8257_init(int count); | |
| 42 | void dma8257_config(int which, const struct dma8257_interface *intf); | |
| 43 | void dma8257_reset(void); | |
| 44 | ||
| 45 | void dma8257_drq_write(int which, int channel, int state); | |
| 46 | ||
| 47 | READ8_HANDLER( dma8257_0_r ); | |
| 48 | READ8_HANDLER( dma8257_1_r ); | |
| 49 | WRITE8_HANDLER( dma8257_0_w ); | |
| 50 | WRITE8_HANDLER( dma8257_1_w ); | |
| 51 | ||
| 52 | READ16_HANDLER( dma8257_16le_0_r ); | |
| 53 | READ16_HANDLER( dma8257_16le_1_r ); | |
| 54 | WRITE16_HANDLER( dma8257_16le_0_w ); | |
| 55 | WRITE16_HANDLER( dma8257_16le_1_w ); | |
| 56 | ||
| 57 | READ32_HANDLER( dma8257_32le_0_r ); | |
| 58 | READ32_HANDLER( dma8257_32le_1_r ); | |
| 59 | WRITE32_HANDLER( dma8257_32le_0_w ); | |
| 60 | WRITE32_HANDLER( dma8257_32le_1_w ); | |
| 61 | ||
| 62 | READ64_HANDLER( dma8257_64be_0_r ); | |
| 63 | READ64_HANDLER( dma8257_64be_1_r ); | |
| 64 | WRITE64_HANDLER( dma8257_64be_0_w ); | |
| 65 | WRITE64_HANDLER( dma8257_64be_1_w ); | |
| 66 | ||
| 67 | #endif /* DMA8257_H */ |
| r1386 | r1387 | |
|---|---|---|
| 164 | 164 | void ppc601_get_info(UINT32 state, cpuinfo *info); |
| 165 | 165 | void ppc602_get_info(UINT32 state, cpuinfo *info); |
| 166 | 166 | void ppc603_get_info(UINT32 state, cpuinfo *info); |
| 167 | void ppc604_get_info(UINT32 state, cpuinfo *info); | |
| 167 | 168 | void mpc8240_get_info(UINT32 state, cpuinfo *info); |
| 168 | 169 | void SE3208_get_info(UINT32 state, cpuinfo *info); |
| 169 | 170 | void mc68hc11_get_info(UINT32 state, cpuinfo *info); |
| r1386 | r1387 | |
| 685 | 686 | #if (HAS_PPC603) |
| 686 | 687 | { CPU_PPC603, ppc603_get_info }, |
| 687 | 688 | #endif |
| 689 | #if (HAS_PPC604) | |
| 690 | { CPU_PPC604, ppc604_get_info }, | |
| 691 | #endif | |
| 688 | 692 | #if (HAS_MPC8240) |
| 689 | 693 | { CPU_MPC8240, mpc8240_get_info }, |
| 690 | 694 | #endif |
| r1386 | r1387 | |
|---|---|---|
| 168 | 168 | CPU_PPC601, |
| 169 | 169 | CPU_PPC602, |
| 170 | 170 | CPU_PPC603, |
| 171 | CPU_PPC604, | |
| 171 | 172 | CPU_MPC8240, |
| 172 | 173 | CPU_SE3208, |
| 173 | 174 | CPU_MC68HC11, |
| r1386 | r1387 | |
|---|---|---|
| 129 | 129 | }; |
| 130 | 130 | |
| 131 | 131 | int ch, reverb_pos; |
| 132 | short *rev_max; | |
| 133 | short *rbase, *rbuffer, *rev_top; | |
| 132 | short *rbase; | |
| 134 | 133 | unsigned char *samples; |
| 135 | 134 | UINT32 rom_mask; |
| 136 | 135 | |
| 137 | 136 | unsigned char *base1, *base2; |
| 138 | 137 | struct K054539_channel *chan; |
| 139 | 138 | stream_sample_t *bufl, *bufr; |
| 140 | short *revb; | |
| 141 | 139 | int cur_pos, cur_pfrac, cur_val, cur_pval; |
| 142 | 140 | int delta, rdelta, fdelta, pdelta; |
| 143 | 141 | int vol, bval, pan, i; |
| r1386 | r1387 | |
| 146 | 144 | |
| 147 | 145 | reverb_pos = info->reverb_pos; |
| 148 | 146 | rbase = (short *)(info->ram); |
| 149 | rbuffer = rbase + reverb_pos; | |
| 150 | rev_max = rev_top = rbase + 0x4000; | |
| 151 | 147 | |
| 152 | 148 | memset(buffer[0], 0, length*sizeof(*buffer[0])); |
| 153 | 149 | memset(buffer[1], 0, length*sizeof(*buffer[1])); |
| r1386 | r1387 | |
| 199 | 195 | rdelta = (base1[6] | (base1[7] << 8)) >> 3; |
| 200 | 196 | // rdelta = (reverb_pos + (int)((rdelta - 0x2000) * info->freq_ratio)) & 0x3fff; |
| 201 | 197 | rdelta = (int)(rdelta + reverb_pos) & 0x3fff; |
| 202 | revb = rbase + rdelta; | |
| 203 | 198 | |
| 204 | 199 | cur_pos = (base1[0x0c] | (base1[0x0d] << 8) | (base1[0x0e] << 16)) & rom_mask; |
| 205 | 200 | |
| r1386 | r1387 | |
| 231 | 226 | do { \ |
| 232 | 227 | *bufl++ += (INT16)(cur_val*lvol); \ |
| 233 | 228 | *bufr++ += (INT16)(cur_val*rvol); \ |
| 234 | *revb++ += (INT16)(cur_val*rbvol); \ | |
| 229 | rbase[rdelta++] += (INT16)(cur_val*rbvol); \ | |
| 230 | rdelta &= 0x3fff; \ | |
| 235 | 231 | } while(0) |
| 236 | 232 | |
| 237 | 233 | switch(base2[0] & 0xc) { |
| r1386 | r1387 | |
| 351 | 347 | base1[0x0d] = cur_pos>> 8 & 0xff; |
| 352 | 348 | base1[0x0e] = cur_pos>>16 & 0xff; |
| 353 | 349 | } |
| 354 | ||
| 355 | if(revb > rev_max) | |
| 356 | rev_max = revb; | |
| 357 | 350 | } |
| 358 | 351 | |
| 359 | while(rev_max >= rev_top) { | |
| 360 | rev_max[-0x4000] += rev_max[0]; | |
| 361 | rev_max[0] = 0; | |
| 362 | rev_max--; | |
| 363 | } | |
| 364 | ||
| 365 | 352 | //* drivers should be given the option to disable reverb when things go terribly wrong |
| 366 | 353 | if(!(info->K054539_flags & K054539_DISABLE_REVERB)) |
| 367 | 354 | { |
| r1386 | r1387 | |
| 372 | 359 | } |
| 373 | 360 | } |
| 374 | 361 | |
| 375 | if(rbuffer+length > rev_top) { | |
| 376 | i = rev_top-rbuffer; // delta | |
| 377 | memset(rbuffer, 0, i*2); | |
| 362 | if(reverb_pos + length > 0x4000) { | |
| 363 | i = 0x4000 - reverb_pos; | |
| 364 | memset(rbase + reverb_pos, 0, i*2); | |
| 378 | 365 | memset(rbase, 0, (length-i)*2); |
| 379 | 366 | } else |
| 380 | memset(rb | |
| 367 | memset(rbas | |
| 381 | 368 | |
| 382 | 369 | #if CHANNEL_DEBUG |
| 383 | 370 | { |
| r1386 | r1387 | |
|---|---|---|
| 45 | 45 | * 64 Phonemes - currently 1 sample per phoneme, will be combined sometime! |
| 46 | 46 | ****************************************************************************/ |
| 47 | 47 | |
| 48 | static const char *VotraxTable[65] = | |
| 48 | static const char *const VotraxTable[65] = | |
| 49 | 49 | { |
| 50 | 50 | "EH3","EH2","EH1","PA0","DT" ,"A1" ,"A2" ,"ZH", |
| 51 | 51 | "AH2","I3" ,"I2" ,"I1" ,"M" ,"N" ,"B" ,"V", |
| r1386 | r1387 | |
|---|---|---|
| 6 | 6 | struct sample_channel |
| 7 | 7 | { |
| 8 | 8 | sound_stream *stream; |
| 9 | INT16 * | |
| 9 | const INT16 * | |
| 10 | 10 | INT32 source_length; |
| 11 | 11 | INT32 source_num; |
| 12 | 12 | UINT32 pos; |
| r1386 | r1387 | |
| 174 | 174 | readsamples - load all samples |
| 175 | 175 | -------------------------------------------------*/ |
| 176 | 176 | |
| 177 | struct loaded_samples *readsamples(const char **samplenames, const char *basename) | |
| 177 | struct loaded_samples *readsamples(const char *const *samplenames, const char *basename) | |
| 178 | 178 | { |
| 179 | 179 | struct loaded_samples *samples; |
| 180 | 180 | int skipfirst = 0; |
| r1386 | r1387 | |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | |
| 273 | void sample_start_raw_n(int num,int channel,INT16 *sampledata,int samples,int frequency,int loop) | |
| 273 | void sample_start_raw_n(int num,int channel,const INT16 *sampledata,int samples,int frequency,int loop) | |
| 274 | 274 | { |
| 275 | 275 | struct samples_info *info = sndti_token(SOUND_SAMPLES, num); |
| 276 | 276 | struct sample_channel *chan; |
| r1386 | r1387 | |
| 293 | 293 | chan->loop = loop; |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | void sample_start_raw(int channel,INT16 *sampledata,int samples,int frequency,int loop) | |
| 296 | void sample_start_raw(int channel,const INT16 *sampledata,int samples,int frequency,int loop) | |
| 297 | 297 | { |
| 298 | 298 | sample_start_raw_n(0,channel,sampledata,samples,frequency,loop); |
| 299 | 299 | } |
| r1386 | r1387 | |
| 452 | 452 | UINT32 pos = chan->pos; |
| 453 | 453 | UINT32 frac = chan->frac; |
| 454 | 454 | UINT32 step = chan->step; |
| 455 | INT16 *sample = chan->source; | |
| 455 | const INT16 *sample = chan->source; | |
| 456 | 456 | UINT32 sample_length = chan->source_length; |
| 457 | 457 | |
| 458 | 458 | while (length--) |
| r1386 | r1387 | |
|---|---|---|
| 38 | 38 | #define FIX(v) ((UINT32) ((float) (1<<SHIFT)*(v))) |
| 39 | 39 | |
| 40 | 40 | |
| 41 | #define EG_SHIFT | |
| 41 | #define EG_SHIFT 16 | |
| 42 | 42 | |
| 43 | 43 | // include the LFO handling code |
| 44 | 44 | #include "scsplfo.c" |
| r1386 | r1387 | |
| 108 | 108 | 920.0,790.0,690.0,550.0,460.0,390.0,340.0,270.0,230.0,200.0,170.0,140.0,110.0,98.0,85.0,68.0,57.0,49.0,43.0,34.0, |
| 109 | 109 | 28.0,25.0,22.0,18.0,14.0,12.0,11.0,8.5,7.1,6.1,5.4,4.3,3.6,3.1}; |
| 110 | 110 | static UINT32 FNS_Table[0x400]; |
| 111 | static INT32 EG_TABLE[0x400]; | |
| 111 | 112 | |
| 112 | 113 | typedef enum {ATTACK,DECAY1,DECAY2,RELEASE} _STATE; |
| 113 | 114 | struct _EG |
| r1386 | r1387 | |
| 365 | 366 | int Rate=base+(R<<1); |
| 366 | 367 | if(Rate>63) Rate=63; |
| 367 | 368 | if(Rate<0) Rate=0; |
| 368 | return SCSP-> | |
| 369 | return SCSP->DRTABLE[ | |
| 369 | 370 | } |
| 370 | 371 | |
| 371 | 372 | static void Compute_EG(struct _SCSP *SCSP,struct _SLOT *slot) |
| r1386 | r1387 | |
| 378 | 379 | else |
| 379 | 380 | rate=0; //rate=((FNS(slot)>>9)&1); |
| 380 | 381 | |
| 381 | slot->EG.volume=0; | |
| 382 | slot->EG.volume=0x17F<<EG_SHIFT; | |
| 382 | 383 | slot->EG.AR=Get_AR(SCSP,rate,AR(slot)); |
| 383 | 384 | slot->EG.D1R=Get_DR(SCSP,rate,D1R(slot)); |
| 384 | 385 | slot->EG.D2R=Get_DR(SCSP,rate,D2R(slot)); |
| r1386 | r1387 | |
| 410 | 411 | break; |
| 411 | 412 | case DECAY1: |
| 412 | 413 | slot->EG.volume-=slot->EG.D1R; |
| 413 | if(slot->EG.volume>>(EG_SHIFT+5)< | |
| 414 | if(slot->EG.volume>>(EG_SHIFT+5)< | |
| 414 | 415 | slot->EG.state=DECAY2; |
| 415 | 416 | break; |
| 416 | 417 | case DECAY2: |
| r1386 | r1387 | |
| 425 | 426 | slot->EG.volume-=slot->EG.RR; |
| 426 | 427 | if(slot->EG.volume<=0) |
| 427 | 428 | { |
| 429 | slot->EG.volume=0; | |
| 428 | 430 | SCSP_StopSlot(slot,0); |
| 429 | slot->EG.volume=0; | |
| 430 | slot->EG.state=ATTACK; | |
| 431 | //slot->EG.volume=0x17F<<EG_SHIFT; | |
| 432 | //slot->EG.state=ATTACK; | |
| 431 | 433 | } |
| 432 | 434 | break; |
| 433 | 435 | default: |
| r1386 | r1387 | |
| 461 | 463 | |
| 462 | 464 | static void SCSP_StartSlot(struct _SCSP *SCSP, struct _SLOT *slot) |
| 463 | 465 | { |
| 466 | UINT32 start_offset; | |
| 467 | ||
| 464 | 468 | slot->active=1; |
| 465 | slot->base=SCSP->SCSPRAM+SA(slot); | |
| 469 | start_offset = PCM8B(slot) ? SA(slot) : SA(slot) & 0x7FFFE; | |
| 470 | slot->base=SCSP->SCSPRAM + start_offset; | |
| 466 | 471 | slot->cur_addr=0; |
| 467 | 472 | slot->step=SCSP_Step(slot); |
| 468 | 473 | Compute_EG(SCSP,slot); |
| 469 | 474 | slot->EG.state=ATTACK; |
| 470 | slot->EG.volume=0; | |
| 475 | slot->EG.volume=0x17F<<EG_SHIFT; | |
| 471 | 476 | slot->Prev=0; |
| 472 | 477 | slot->Backwards=0; |
| 473 | 478 | Compute_LFO(slot); |
| r1386 | r1387 | |
| 477 | 482 | |
| 478 | 483 | static void SCSP_StopSlot(struct _SLOT *slot,int keyoff) |
| 479 | 484 | { |
| 480 | if(keyoff && slot->EG.state!=RELEASE) | |
| 485 | if(keyoff /*&& slot->EG.state!=RELEASE*/) | |
| 481 | 486 | { |
| 482 | 487 | slot->EG.state=RELEASE; |
| 483 | 488 | } |
| r1386 | r1387 | |
| 485 | 490 | { |
| 486 | 491 | slot->active=0; |
| 487 | 492 | } |
| 488 | ||
| 489 | 493 | slot->udata.data[0]&=~0x800; |
| 490 | 494 | } |
| 491 | 495 | |
| r1386 | r1387 | |
| 536 | 540 | FNS_Table[i]=(float) (1<<SHIFT) *fcent; |
| 537 | 541 | } |
| 538 | 542 | |
| 543 | for(i=0;i<0x400;++i) | |
| 544 | { | |
| 545 | float envDB=((float)(3*(i-0x3ff)))/32.0; | |
| 546 | float scale=(float)(1<<SHIFT); | |
| 547 | EG_TABLE[i]=(INT32)(pow(10.0,envDB/20.0)*scale); | |
| 548 | } | |
| 549 | ||
| 539 | 550 | for(i=0;i<0x10000;++i) |
| 540 | 551 | { |
| 541 | 552 | int iTL =(i>>0x0)&0xff; |
| r1386 | r1387 | |
| 613 | 624 | { |
| 614 | 625 | SCSP->Slots[i].slot=i; |
| 615 | 626 | SCSP->Slots[i].active=0; |
| 616 | SCSP->Slots[i].active=0; | |
| 617 | 627 | SCSP->Slots[i].base=NULL; |
| 618 | 628 | } |
| 619 | 629 | |
| r1386 | r1387 | |
| 645 | 655 | { |
| 646 | 656 | struct _SLOT *s2=SCSP->Slots+sl; |
| 647 | 657 | { |
| 648 | if(KEYONB(s2) && !s2->active) | |
| 658 | if(KEYONB(s2) && s2->EG.state==RELEASE/*&& !s2->active*/) | |
| 649 | 659 | { |
| 650 | 660 | SCSP_StartSlot(SCSP, s2); |
| 651 | 661 | } |
| 652 | if(!KEYONB(s2) && s2->active) | |
| 662 | if(!KEYONB(s2) /*&& s2->active*/) | |
| 653 | 663 | { |
| 654 | 664 | SCSP_StopSlot(s2,1); |
| 655 | 665 | } |
| r1386 | r1387 | |
| 1257 | 1267 | if(!STWINH(slot)) |
| 1258 | 1268 | *RBUFDST=sample; |
| 1259 | 1269 | |
| 1260 | sample=(sample*EG_Update(slot))>>SHIFT; | |
| 1270 | if(slot->EG.state==ATTACK) | |
| 1271 | sample=(sample*EG_Update(slot))>>SHIFT; | |
| 1272 | else | |
| 1273 | sample=(sample*EG_TABLE[EG_Update(slot)>>(SHIFT-10)])>>SHIFT; | |
| 1261 | 1274 | |
| 1262 | 1275 | return sample; |
| 1263 | 1276 | } |
| r1386 | r1387 | |
| 1308 | 1321 | if(EFSDL(slot)) |
| 1309 | 1322 | { |
| 1310 | 1323 | unsigned short Enc=(TL(slot))|((EFPAN(slot))<<0x8)|((EFSDL(slot))<<0xd); |
| 1311 | smpl+=(SCSP->DSP.EFREG[i]*SCSP->LPANTABLE[Enc])>>(SHIFT-5); | |
| 1312 | smpr+=(SCSP->DSP.EFREG[i]*SCSP->RPANTABLE[Enc])>>(SHIFT-5); | |
| 1324 | smpl+=(SCSP->DSP.EFREG[i]*SCSP->LPANTABLE[Enc])>>(SHIFT-4); | |
| 1325 | smpr+=(SCSP->DSP.EFREG[i]*SCSP->RPANTABLE[Enc])>>(SHIFT-4); | |
| 1313 | 1326 | } |
| 1314 | 1327 | } |
| 1315 | 1328 |
| r1386 | r1387 | |
|---|---|---|
| 17 | 17 | struct Samplesinterface |
| 18 | 18 | { |
| 19 | 19 | int channels; /* number of discrete audio channels needed */ |
| 20 | ||
| 20 | const char *const *samplenames; | |
| 21 | 21 | void (*start)(void); |
| 22 | 22 | }; |
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | void sample_start_n(int num,int channel,int samplenum,int loop); |
| 26 | void sample_start_raw_n(int num,int channel,INT16 *sampledata,int samples,int frequency,int loop); | |
| 26 | void sample_start_raw_n(int num,int channel,const INT16 *sampledata,int samples,int frequency,int loop); | |
| 27 | 27 | void sample_set_freq_n(int num,int channel,int freq); |
| 28 | 28 | void sample_set_volume_n(int num,int channel,float volume); |
| 29 | 29 | void sample_set_pause_n(int num,int channel,int pause); |
| r1386 | r1387 | |
| 34 | 34 | |
| 35 | 35 | /* shortcuts for backwards compatibilty */ |
| 36 | 36 | void sample_start(int channel,int samplenum,int loop); |
| 37 | void sample_start_raw(int channel,INT16 *sampledata,int samples,int frequency,int loop); | |
| 37 | void sample_start_raw(int channel,const INT16 *sampledata,int samples,int frequency,int loop); | |
| 38 | 38 | void sample_set_freq(int channel,int freq); |
| 39 | 39 | void sample_set_volume(int channel,float volume); |
| 40 | 40 | void sample_set_pause(int channel,int pause); |
| r1386 | r1387 | |
| 45 | 45 | |
| 46 | 46 | /* helper function that reads samples from disk - this can be used by other */ |
| 47 | 47 | /* drivers as well (e.g. a sound chip emulator needing drum samples) */ |
| 48 | struct loaded_samples *readsamples(const char **samplenames, const char *name); | |
| 48 | struct loaded_samples *readsamples(const char *const *samplenames, const char *name); | |
| 49 | 49 | |
| 50 | 50 | #endif |
| r1386 | r1387 | |
|---|---|---|
| 100 | 100 | #if TEST_MODE |
| 101 | 101 | #include "input.h" |
| 102 | 102 | |
| 103 | static struct SN76477interface empty_interface = | |
| 103 | static const struct SN76477interface empty_interface = | |
| 104 | 104 | { |
| 105 | 105 | 0, /* 4 noise_clock_res */ |
| 106 | 106 | 0, /* 5 filter_res */ |
| r1386 | r1387 | |
|---|---|---|
| 566 | 566 | for (sndnum = 0; sndnum < MAX_SOUND && drv.sound[sndnum].type != SOUND_DUMMY; sndnum++) |
| 567 | 567 | if (drv.sound[sndnum].type == SOUND_SAMPLES) |
| 568 | 568 | { |
| 569 | const char **samplenames = ((struct Samplesinterface *)drv.sound[sndnum].config)->samplenames; | |
| 569 | const char *const *samplenames = ((const struct Samplesinterface *)drv.sound[sndnum].config)->samplenames; | |
| 570 | 570 | int sampnum; |
| 571 | 571 | |
| 572 | 572 | /* if the list is legit, walk it and print the sample info */ |
| r1386 | r1387 | |
|---|---|---|
| 118 | 118 | // customize_input |
| 119 | 119 | //============================================================ |
| 120 | 120 | |
| 121 | static void customize_input(HWND wnd, const char *title, | |
| 121 | static void customize_input(HWND wnd, const char *title, artwork_cust_type cust_type, int player, int inputclass, const char *section) | |
| 122 | 122 | { |
| 123 | 123 | dialog_box *dlg; |
| 124 | 124 | input_port_entry *in; |
| r1386 | r1387 | |
|---|---|---|
| 80 | 80 | |
| 81 | 81 | /********************************************************************/ |
| 82 | 82 | |
| 83 | int artwork_get_inputscreen_customizations(png_info *png, | |
| 83 | int artwork_get_inputscreen_customizations(png_info *png, artwork_cust_type cust_type, | |
| 84 | 84 | const char *section, |
| 85 | 85 | struct inputform_customization *customizations, |
| 86 | 86 | int customizations_length) |
| r1386 | r1387 | |
|---|---|---|
| 21 | 21 | |
| 22 | 22 | ***************************************************************************/ |
| 23 | 23 | |
| 24 | enum | |
| 24 | typedef enum | |
| 25 | 25 | { |
| 26 | 26 | ARTWORK_CUSTTYPE_JOYSTICK = 0, |
| 27 | 27 | ARTWORK_CUSTTYPE_KEYBOARD, |
| 28 | 28 | ARTWORK_CUSTTYPE_MISC, |
| 29 | 29 | ARTWORK_CUSTTYPE_INVALID |
| 30 | } | |
| 30 | } artwork_cust_type; | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | |
| r1386 | r1387 | |
| 54 | 54 | |
| 55 | 55 | void artwork_use_device_art(mess_image *img, const char *defaultartfile); |
| 56 | 56 | |
| 57 | int artwork_get_inputscreen_customizations(png_info *png, | |
| 57 | int artwork_get_inputscreen_customizations(png_info *png, artwork_cust_type cust_type, | |
| 58 | 58 | const char *section, |
| 59 | 59 | struct inputform_customization *customizations, |
| 60 | 60 | int customizations_length); |
| r1386 | r1387 | |
|---|---|---|
| 9 | 9 | System Driver Changes: |
| 10 | 10 | ---------------------- |
| 11 | 11 | - [FAMICOM] Fixed reads to $4031-2 when a disk is not mounted. [MAMEPlus Team] |
| 12 | ||
| 12 | 13 | - [QL] Added sound. [Curt Coder] |
| 13 | 14 | |
| 14 | 15 | |
| r1386 | r1387 | |
| 27 | 28 | |
| 28 | 29 | Source Changes: |
| 29 | 30 | ---------------- |
| 30 | - The core is based on MAME 0.121u | |
| 31 | - The core is based on MAME 0.121u3. This incorporates all features of the | |
| 31 | 32 | update to this core. [MAME team] |
| 32 | 33 | |
| 33 | 34 | - Changed spacing between natural keyboard key names. [Nate Woods] |
| r1386 | r1387 | |
|---|---|---|
| 105 | 105 | # uncomment next line to use DRC PowerPC engine |
| 106 | 106 | X86_PPC_DRC = 1 |
| 107 | 107 | |
| 108 | # uncomment next line to use DRC Voodoo rasterizers | |
| 109 | # X86_VOODOO_DRC = 1 | |
| 110 | 108 | |
| 111 | 109 | |
| 112 | ||
| 113 | 110 | #------------------------------------------------- |
| 114 | 111 | # specify build options; see each option below |
| 115 | 112 | # for details |
| r1386 | r1387 | |
| 191 | 188 | AR = @ar |
| 192 | 189 | CC = @gcc |
| 193 | 190 | LD = @gcc |
| 194 | HHC = @-hhc | |
| 195 | 191 | MD = -mkdir$(EXE) |
| 196 | 192 | RM = @rm -f |
| 197 | 193 | |
| r1386 | r1387 | |
| 273 | 269 | DEFS += -DMAME_PROFILER |
| 274 | 270 | endif |
| 275 | 271 | |
| 276 | # define VOODOO_DRC if we are building the DRC Voodoo engine | |
| 277 | ifdef X86_VOODOO_DRC | |
| 278 | DEFS += -DVOODOO_DRC | |
| 279 | endif | |
| 280 | 272 | |
| 281 | 273 | |
| 282 | ||
| 283 | 274 | #------------------------------------------------- |
| 284 | 275 | # compile flags |
| 285 | 276 | #------------------------------------------------- |
| r1386 | r1387 | |
| 403 | 394 | LIBSOUND = $(OBJ)/libsound.a |
| 404 | 395 | LIBUTIL = $(OBJ)/libutil.a |
| 405 | 396 | LIBOCORE = $(OBJ)/libocore.a |
| 406 | LIBOCORE_NOMAIN = $(OBJ)/libocore_nomain.a | |
| 407 | 397 | LIBOSD = $(OBJ)/libosd.a |
| 408 | 398 | |
| 409 | 399 | VERSIONOBJ = $(OBJ)/version.o |
| r1386 | r1387 | |
| 476 | 466 | |
| 477 | 467 | tools: maketree $(TOOLS) |
| 478 | 468 | |
| 479 | help: maketree $(HELP) | |
| 480 | ||
| 481 | 469 | maketree: $(sort $(OBJDIRS)) |
| 482 | 470 | |
| 483 | 471 | clean: |
| r1386 | r1387 | |
| 507 | 495 | # executable targets and dependencies |
| 508 | 496 | #------------------------------------------------- |
| 509 | 497 | |
| 510 | ifndef EXECUTABLE_DEFINED | |
| 511 | ||
| 512 | 498 | $(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE) |
| 513 | 499 | # always recompile the version string |
| 514 | 500 | $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ) |
| 515 | 501 | @echo Linking $@... |
| 516 | 502 | $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@ |
| 517 | 503 | |
| 518 | endif | |
| 519 | 504 | |
| 520 | 505 | |
| 521 | ||
| 522 | 506 | #------------------------------------------------- |
| 523 | 507 | # generic rules |
| 524 | 508 | #------------------------------------------------- |
| Previous | 15994 Revisions | Next |