| Previous | 15994 Revisions | Next |
| r3172 Friday 5th September, 2008 at 02:09:31 UTC by Nathan Woods |
|---|
| Updated to MAME 0.127u2 core |
| [docs] | messnew.txt |
| [src/emu] | debugger.h emu.mak memory.c sndintrf.c sndintrf.h video.c |
| [src/emu/cpu] | drcbec.c drcbex86.c |
| [src/emu/cpu/adsp2100] | adsp2100.c |
| [src/emu/cpu/alph8201] | alph8201.c |
| [src/emu/cpu/apexc] | apexc.c |
| [src/emu/cpu/arm] | arm.c |
| [src/emu/cpu/arm7] | arm7.c arm7dasm.c |
| [src/emu/cpu/asap] | asap.c |
| [src/emu/cpu/ccpu] | ccpu.c |
| [src/emu/cpu/cop400] | cop410.c cop420.c |
| [src/emu/cpu/cubeqcpu] | cubeqcpu.c |
| [src/emu/cpu/dsp32] | dsp32.c |
| [src/emu/cpu/dsp56k] | dsp56k.c |
| [src/emu/cpu/e132xs] | e132xs.c |
| [src/emu/cpu/f8] | f8.c |
| [src/emu/cpu/g65816] | g65816.h |
| [src/emu/cpu/h6280] | h6280.c |
| [src/emu/cpu/i8085] | i8085.c |
| [src/emu/cpu/i86] | i286.c i86.c |
| [src/emu/cpu/i8x41] | i8x41.c |
| [src/emu/cpu/i960] | i960.c |
| [src/emu/cpu/konami] | konami.c |
| [src/emu/cpu/lh5801] | lh5801.c |
| [src/emu/cpu/lr35902] | lr35902.c |
| [src/emu/cpu/m37710] | m37710.c m37710op.h |
| [src/emu/cpu/m6502] | m4510.c m6502.c m6509.c m65ce02.c |
| [src/emu/cpu/m6800] | m6800.c |
| [src/emu/cpu/m68000] | m68kmame.h |
| [src/emu/cpu/m6805] | m6805.c |
| [src/emu/cpu/m6809] | m6809.c |
| [src/emu/cpu/mb86233] | mb86233.c |
| [src/emu/cpu/mb88xx] | mb88xx.c |
| [src/emu/cpu/mc68hc11] | mc68hc11.c |
| [src/emu/cpu/mcs48] | mcs48.c |
| [src/emu/cpu/minx] | minx.c |
| [src/emu/cpu/mips] | r3000.c |
| [src/emu/cpu/nec] | nec.c |
| [src/emu/cpu/pdp1] | pdp1.c tx0.c |
| [src/emu/cpu/pic16c5x] | pic16c5x.c |
| [src/emu/cpu/s2650] | s2650.c |
| [src/emu/cpu/saturn] | saturn.c |
| [src/emu/cpu/sc61860] | sc61860.c |
| [src/emu/cpu/se3208] | se3208.c |
| [src/emu/cpu/sharc] | sharc.c |
| [src/emu/cpu/sm8500] | sm8500.c |
| [src/emu/cpu/spc700] | spc700.c |
| [src/emu/cpu/ssp1601] | ssp1601.c |
| [src/emu/cpu/t11] | t11.c |
| [src/emu/cpu/tlcs90] | tlcs90.c |
| [src/emu/cpu/tms32010] | tms32010.c |
| [src/emu/cpu/tms32025] | tms32025.c |
| [src/emu/cpu/tms32031] | tms32031.c |
| [src/emu/cpu/tms32051] | tms32051.c |
| [src/emu/cpu/upd7810] | upd7810.c |
| [src/emu/cpu/v30mz] | v30mz.c |
| [src/emu/cpu/v60] | v60.c |
| [src/emu/cpu/v810] | v810.c |
| [src/emu/cpu/z180] | z180.c |
| [src/emu/cpu/z80] | z80.c |
| [src/emu/cpu/z8000] | z8000.c |
| [src/emu/debug] | debugcmd.c debugcmt.c debugcmt.h debugcpu.c debugcpu.h |
| [src/emu/drivers] | xtal.h |
| [src/emu/machine] | 6840ptm.c 6840ptm.h generic.c generic.h laserdsc.h ldcore.c* ldcore.h* ldpr8210.c* ldv1000.c* mc146818.c rescap.h timekpr.c timekpr.h z80pio.c z80pio.h z80sio.c z80sio.h |
| [src/emu/sound] | disc_dev.c disc_flt.c disc_mth.c discrete.c discrete.h namco.c namco.h snkwave.c* snkwave.h* sound.mak tms5110r.c |
| [src/ldplayer] | ldplayer.c |
| [src/mame] | mame.mak mamedriv.c |
| [src/mame/audio] | 8080bw.c asteroid.c atarifb.c dkong.c firetrk.c hitme.c madalien.c mario.c mw8080bw.c phoenix.c poolshrk.c qix.c spiders.c sprint2.c sprint4.c starshp1.c subs.c triplhnt.c turbo.c vicdual.c |
| [src/mame/drivers] | 39in1.c atarigt.c battlex.c bwing.c carjmbre.c carrera.c cchasm.c champbas.c chinagat.c circus.c cojag.c cosmic.c crospang.c crshrace.c cshooter.c darius.c dbz.c ddragon.c deniam.c discoboy.c dkong.c dlair.c dotrikun.c dreamwld.c dribling.c drmicro.c egghunt.c epos.c esd16.c esh.c espial.c f1gp.c finalizr.c freekick.c fromanc2.c funkybee.c funybubl.c fuukifg2.c fuukifg3.c galaxi.c galaxia.c galaxold.c galdrvr.c galivan.c gpworld.c gstriker.c guab.c hanaawas.c hikaru.c hnayayoi.c holeland.c homedata.c hornet.c hyhoo.c inufuku.c istellar.c itech32.c jackal.c kchamp.c kingobox.c ksys573.c kyugo.c lethal.c lethalj.c lgp.c liberate.c magmax.c mainsnk.c marinedt.c mario.c mayumi.c mcatadv.c megaplay.c megazone.c meritm.c midvunit.c midzeus.c mjkjidai.c mjsister.c mogura.c mosaic.c mouser.c mpu4.c mpu4drvr.c mrflea.c mrjong.c namcos11.c namcos22.c naomi.c niyanpai.c nmk16.c nwk-tr.c pandoras.c paradise.c pass.c pastelg.c pbaction.c pitnrun.c popeye.c prehisle.c psychic5.c punchout.c pushman.c raiden2.c rallyx.c sangho.c sauro.c scregg.c segald.c segas24.c senjyo.c seta.c sf.c sg1000a.c shadfrce.c shangha3.c shisen.c skyarmy.c skylncr.c slapshot.c snk.c spcforce.c speedatk.c speedspn.c sspeedr.c stadhero.c starcrus.c superdq.c suprslam.c taito_f3.c tecmosys.c tiamc1.c timelimt.c toaplan2.c vicdual.c videopkr.c* viper.c wallc.c wardner.c wc90.c wc90b.c welltris.c williams.c wiz.c wldarrow.c wolfpack.c wrally.c wwfsstar.c wwfwfest.c xain.c xexex.c xmen.c xorworld.c xxmissio.c xybots.c yiear.c yunsun16.c yunsung8.c zaccaria.c zerozone.c zodiack.c |
| [src/mame/includes] | dkong.h snk.h |
| [src/mame/machine] | mcr.c |
| [src/mame/video] | jaguar.c shadfrce.c snk.c xmen.c |
| [src/mess] | mess.mak |
| [src/mess/drivers] | abc80.c abc80x.c einstein.c super80.c |
| [src/mess/machine] | kc.c mbee.c |
| r3171 | r3172 | |
|---|---|---|
| 56 | 56 | DISCRETE_INPUT_DATA (QIX_VOL_DATA) |
| 57 | 57 | |
| 58 | 58 | /* Seperate the two 4-bit channels. */ |
| 59 | DISCRETE_TRANSFORM3(QIX_VOL_DATA_L, 1, QIX_VOL_DATA, 16, 0x0f, "01/2&") | |
| 60 | DISCRETE_TRANSFORM2(QIX_VOL_DATA_R, 1, QIX_VOL_DATA, 0x0f, "01&") | |
| 59 | DISCRETE_TRANSFORM3(QIX_VOL_DATA_L, QIX_VOL_DATA, 16, 0x0f, "01/2&") | |
| 60 | DISCRETE_TRANSFORM2(QIX_VOL_DATA_R, QIX_VOL_DATA, 0x0f, "01&") | |
| 61 | 61 | |
| 62 | 62 | /* Work out the parallel resistance of the selected resistors. */ |
| 63 | 63 | DISCRETE_COMP_ADDER(NODE_10, 1, QIX_VOL_DATA_L, &qix_attn_table) |
| 64 | 64 | DISCRETE_COMP_ADDER(NODE_20, 1, QIX_VOL_DATA_R, &qix_attn_table) |
| 65 | 65 | |
| 66 | 66 | /* Then use it for the resistor divider network. */ |
| 67 | DISCRETE_TRANSFORM3(NODE_11, 1, NODE_10, RES_K(10), QIX_DAC_DATA, "001+/2*") | |
| 68 | DISCRETE_TRANSFORM3(NODE_21, 1, NODE_20, RES_K(10), QIX_DAC_DATA, "001+/2*") | |
| 67 | DISCRETE_TRANSFORM3(NODE_11, NODE_10, RES_K(10), QIX_DAC_DATA, "001+/2*") | |
| 68 | DISCRETE_TRANSFORM3(NODE_21, NODE_20, RES_K(10), QIX_DAC_DATA, "001+/2*") | |
| 69 | 69 | |
| 70 | 70 | /* If no resistors are selected (0), then the volume is full. */ |
| 71 | 71 | DISCRETE_SWITCH(NODE_12, 1, QIX_VOL_DATA_L, QIX_DAC_DATA, NODE_11) |
| r3171 | r3172 | |
|---|---|---|
| 120 | 120 | |
| 121 | 121 | /* Web sound */ |
| 122 | 122 | DISCRETE_NOTE(NODE_20, 1, SPIDERS_SOUND_CLK/8, SPIDERS_WEB_SOUND_DATA, 255, 15, DISC_CLK_IS_FREQ) |
| 123 | DISCRETE_TRANSFORM2(NODE_21, | |
| 123 | DISCRETE_TRANSFORM2(NODE_21, | |
| 124 | 124 | DISCRETE_DAC_R1(NODE_22, 1, NODE_21, DEFAULT_TTL_V_LOGIC_1, &spiders_sound_dac) |
| 125 | 125 | |
| 126 | 126 | /* Noise */ |
| r3171 | r3172 | |
| 136 | 136 | // Fire envelope |
| 137 | 137 | DISCRETE_MULTIPLY(NODE_41, 1, DEFAULT_TTL_V_LOGIC_1, SPIDERS_FIRE_EN) |
| 138 | 138 | DISCRETE_RCFILTER(NODE_42, 1, NODE_41,RES_K(2.2),CAP_U(47)) //R11, C11 |
| 139 | DISCRETE_TRANSFORM4(NODE_43, | |
| 139 | DISCRETE_TRANSFORM4(NODE_43, | |
| 140 | 140 | |
| 141 | 141 | DISCRETE_555_ASTABLE_CV(NODE_44, 1, RES_K(10), RES_K(22), CAP_N(100), NODE_43, &spiders_fire_555a) //R10, R18, C12 |
| 142 | 142 | DISCRETE_MULTIPLY(NODE_45, 1, DEFAULT_TTL_V_LOGIC_1-0.7, SPIDERS_FIRE_EN) // Diode drop D2 |
| r3171 | r3172 | |
|---|---|---|
| 394 | 394 | &phoenix_effect2_cap_sel) |
| 395 | 395 | /* Part of the frequency select also effects the gain */ |
| 396 | 396 | DISCRETE_TRANSFORM2(NODE_31, /* 0/1 state of PHOENIX_EFFECT_2_FREQ high bit */ |
| 397 | 1, /* ENAB */ | |
| 398 | 397 | PHOENIX_EFFECT_2_FREQ, 2, "01&1/") // get bit 0x02 |
| 399 | 398 | DISCRETE_SWITCH(NODE_32, /* voltage level */ |
| 400 | 399 | 1, /* ENAB */ |
| r3171 | r3172 | |
|---|---|---|
| 664 | 664 | // which clocks a 74393 dual 4-bit counter, clocked on the falling edge |
| 665 | 665 | DISCRETE_COUNTER(NODE_51,1,0,NODE_50,15,1,0,DISC_CLK_ON_F_EDGE) |
| 666 | 666 | // the high bit of this counter |
| 667 | DISCRETE_TRANSFORM2(NODE_52, | |
| 667 | DISCRETE_TRANSFORM2(NODE_52, | |
| 668 | 668 | // clocks the other half of the 74393 |
| 669 | 669 | DISCRETE_COUNTER(NODE_53,1,0,NODE_52,15,1,0,DISC_CLK_ON_F_EDGE) |
| 670 | 670 | |
| 671 | 671 | // trig1 triggers a LS123 retriggerable multivibrator |
| 672 | 672 | DISCRETE_ONESHOT(NODE_60,TURBO_TRIG1_INV,5.0,(0.33e-9)*47*1e6, DISC_ONESHOT_FEDGE|DISC_ONESHOT_RETRIG|DISC_OUT_ACTIVE_HIGH) |
| 673 | 673 | // which interacts with bit 0 of the second counter |
| 674 | DISCRETE_TRANSFORM2(NODE_61, | |
| 674 | DISCRETE_TRANSFORM2(NODE_61, | |
| 675 | 675 | // via a NAND |
| 676 | 676 | DISCRETE_LOGIC_NAND(NODE_62,1,NODE_60,NODE_61) |
| 677 | 677 | |
| r3171 | r3172 | |
| 683 | 683 | // trig3 triggers a LS123 retriggerable multivibrator |
| 684 | 684 | DISCRETE_ONESHOT(NODE_70,TURBO_TRIG3_INV,5.0,(0.33e-9)*47*33e6,DISC_ONESHOT_FEDGE|DISC_ONESHOT_RETRIG|DISC_OUT_ACTIVE_HIGH) |
| 685 | 685 | // which interacts with bit 2 of the first counter |
| 686 | DISCRETE_TRANSFORM3(NODE_71, | |
| 686 | DISCRETE_TRANSFORM3(NODE_71, | |
| 687 | 687 | // via a NAND |
| 688 | 688 | DISCRETE_LOGIC_NAND(NODE_72,1,NODE_70,NODE_71) |
| 689 | 689 | |
| 690 | 690 | // trig4 triggers a LS123 retriggerable multivibrator |
| 691 | 691 | DISCRETE_ONESHOT(NODE_75,TURBO_TRIG4_INV,5.0,(0.33e-9)*47*10e6,DISC_ONESHOT_FEDGE|DISC_ONESHOT_RETRIG|DISC_OUT_ACTIVE_HIGH) |
| 692 | 692 | // which interacts with bit 1 of the first counter |
| 693 | DISCRETE_TRANSFORM3(NODE_76, | |
| 693 | DISCRETE_TRANSFORM3(NODE_76, | |
| 694 | 694 | // via a NAND |
| 695 | 695 | DISCRETE_LOGIC_NAND(NODE_77,1,NODE_75,NODE_76) |
| 696 | 696 |
| r3171 | r3172 | |
|---|---|---|
| 52 | 52 | * 1.0/(0.45*R*C). We compute that frequency and use a standard 50% duty cycle square wave. |
| 53 | 53 | * This is because the "off time" of the clock is very small (559kHz), and we will miss |
| 54 | 54 | * edges if we model it perfectly accurately. */ |
| 55 | DISCRETE_TRANSFORM3(NODE_16,1, | |
| 55 | DISCRETE_TRANSFORM3(NODE_16,1, | |
| 56 | 56 | DISCRETE_SQUAREWAVE(NODE_17,1,NODE_16,1,50,0.5,0) |
| 57 | 57 | |
| 58 | 58 | /* There are 2 cascaded 4-bit downcounters (2R = low, 2P = high), effectively |
| r3171 | r3172 | |
| 60 | 60 | * The initial count is latched by writing OUT0. */ |
| 61 | 61 | DISCRETE_COUNTER(NODE_20,1,HITME_OUT0,NODE_17,255,0,HITME_DOWNCOUNT_VAL,DISC_CLK_ON_F_EDGE) |
| 62 | 62 | /* When the counter rolls over from 0->255, we clock a D-type flipflop at 2N. */ |
| 63 | DISCRETE_TRANSFORM2(NODE_21, | |
| 63 | DISCRETE_TRANSFORM2(NODE_21, | |
| 64 | 64 | |
| 65 | 65 | /* This flipflop represents the latch at 1L. It is clocked when OUT1 is written and latches |
| 66 | 66 | * the value from the processor. When the downcounter above rolls over, it clears the latch. */ |
| r3171 | r3172 | |
|---|---|---|
| 132 | 132 | DISCRETE_MULTADD(NODE_40, 1, ASTEROID_SAUCER_SEL, -2.5, 8.25) // Saucer Warble rate (5.75 or 8.25Hz) |
| 133 | 133 | DISCRETE_TRIANGLEWAVE(NODE_41, 1, NODE_40, 920.0, 920.0/2, 0) // (amount of warble) |
| 134 | 134 | |
| 135 | DISCRETE_TRANSFORM4(NODE_42, | |
| 135 | DISCRETE_TRANSFORM4(NODE_42, | |
| 136 | 136 | |
| 137 | 137 | DISCRETE_TRIANGLEWAVE(NODE_43, ASTEROID_SAUCER_SND_EN, NODE_42, 76.1, 0, 0) |
| 138 | 138 | DISCRETE_RCFILTER(ASTEROID_SAUCER_SND, 1, NODE_43, 1, 1.0e-5) |
| r3171 | r3172 | |
| 145 | 145 | DISCRETE_RAMP(NODE_50, ASTEROID_SHIP_FIRE_EN, ASTEROID_SHIP_FIRE_EN, (820.0-110.0)/0.28, 820.0, 110.0, 0) /* Decay - Freq */ |
| 146 | 146 | DISCRETE_RCDISC(NODE_51, ASTEROID_SHIP_FIRE_EN, 53.0-7.0, 2700.0*3, 1e-5) /* Decay - Amplitude */ |
| 147 | 147 | DISCRETE_ADDER2(NODE_52, 1, NODE_51, 7.0) /* Amplitude */ |
| 148 | DISCRETE_TRANSFORM3(NODE_53, | |
| 148 | DISCRETE_TRANSFORM3(NODE_53, | |
| 149 | 149 | DISCRETE_SQUAREWAVE(NODE_54, ASTEROID_SHIP_FIRE_EN, NODE_50, NODE_52, NODE_53, 0, 0) |
| 150 | 150 | DISCRETE_RCFILTER(ASTEROID_SHIP_FIRE_SND, 1, NODE_54, 1, 1.0e-5) |
| 151 | 151 | |
| r3171 | r3172 | |
| 157 | 157 | DISCRETE_RAMP(NODE_60, ASTEROID_SAUCER_FIRE_EN, ASTEROID_SAUCER_FIRE_EN, (830.0-630.0)/0.28, 830.0, 630.0, 0) /* Decay - Freq */ |
| 158 | 158 | DISCRETE_RCDISC(NODE_61, ASTEROID_SAUCER_FIRE_EN, 49.5-7.0, 10000.0*3, 1e-5) /* Decay - Amplitude */ |
| 159 | 159 | DISCRETE_ADDER2(NODE_62, 1, NODE_61, 7.0) /* Amplitude */ |
| 160 | DISCRETE_TRANSFORM3(NODE_63, | |
| 160 | DISCRETE_TRANSFORM3(NODE_63, | |
| 161 | 161 | DISCRETE_SQUAREWAVE(NODE_64, ASTEROID_SAUCER_FIRE_EN, NODE_60, NODE_62, NODE_63, 0, 0) |
| 162 | 162 | DISCRETE_RCFILTER(ASTEROID_SAUCER_FIRE_SND, 1, NODE_64, 2, 1.0e-5) |
| 163 | 163 |
| r3171 | r3172 | |
|---|---|---|
| 90 | 90 | * of the output stage on the charge stage. So I added some values |
| 91 | 91 | * to get a similar waveshape to the breadboarded circuit. |
| 92 | 92 | */ |
| 93 | DISCRETE_TRANSFORM5(NODE_31, 1 | |
| 93 | DISCRETE_TRANSFORM5(NODE_31, 1 | |
| 94 | 94 | |
| 95 | 95 | DISCRETE_555_CC(NODE_32, 1, NODE_31, RES_K(1.1), CAP_U(0.14), 0, RES_K(100), 500, &frogsZip555cc) |
| 96 | 96 | |
| r3171 | r3172 | |
| 351 | 351 | DISCRETE_COUNTER(NODE_26, 1, 0, NODE_25, 1, DISC_COUNT_UP, 0, DISC_CLK_ON_R_EDGE) //divide by 2 |
| 352 | 352 | DISCRETE_COUNTER(NODE_27, 1, 0, NODE_25, 3, DISC_COUNT_UP, 0, DISC_CLK_ON_R_EDGE) //divide by 4 |
| 353 | 353 | DISCRETE_COUNTER(NODE_28, 1, 0, NODE_25, 2, DISC_COUNT_UP, 0, DISC_CLK_ON_R_EDGE) //divide by 3 |
| 354 | DISCRETE_TRANSFORM5(NODE_29, | |
| 354 | DISCRETE_TRANSFORM5(NODE_29, | |
| 355 | 355 | DISCRETE_MULTIPLY(HEADON_PLAYER_CAR_OUT, 1, NODE_29, 12 / 3) |
| 356 | 356 | |
| 357 | 357 | /************************************************ |
| r3171 | r3172 | |
| 370 | 370 | DISCRETE_COUNTER(NODE_36, 1, 0, NODE_35, 1, DISC_COUNT_UP, 0, DISC_CLK_ON_R_EDGE) //divide by 2 |
| 371 | 371 | DISCRETE_COUNTER(NODE_37, 1, 0, NODE_35, 3, DISC_COUNT_UP, 0, DISC_CLK_ON_R_EDGE) //divide by 4 |
| 372 | 372 | DISCRETE_COUNTER(NODE_38, 1, 0, NODE_35, 2, DISC_COUNT_UP, 0, DISC_CLK_ON_R_EDGE) //divide by 3 |
| 373 | DISCRETE_TRANSFORM5(NODE_39, | |
| 373 | DISCRETE_TRANSFORM5(NODE_39, | |
| 374 | 374 | DISCRETE_MULTIPLY(HEADON_COMP_CAR_OUT, 1, NODE_39, 12 / 3) |
| 375 | 375 | |
| 376 | 376 | /************************************************ |
| r3171 | r3172 | |
| 406 | 406 | * This is not emulated exactly. We will just use 200k for R1. |
| 407 | 407 | * |
| 408 | 408 | */ |
| 409 | DISCRETE_TRANSFORM3(NODE_74, | |
| 409 | DISCRETE_TRANSFORM3(NODE_74, | |
| 410 | 410 | DISCRETE_555_ASTABLE(NODE_75, 1, NODE_74, RES_K(100), CAP_N(10), &headon_555_bonus) |
| 411 | 411 | DISCRETE_MULTIPLY(HEADON_BONUS_OUT,1,NODE_75,HEADON_BONUS_EN) |
| 412 | 412 | |
| r3171 | r3172 | |
| 435 | 435 | DISCRETE_SALLEN_KEY_FILTER(NODE_88, 1, NODE_87, DISC_SALLEN_KEY_LOW_PASS, &headon_sallen_key_info) |
| 436 | 436 | |
| 437 | 437 | DISCRETE_MIXER2(NODE_95, 1, NODE_85, NODE_88, &headon_crash_mixer) |
| 438 | DISCRETE_TRANSFORM2(HEADON_CRASH_OUT, | |
| 438 | DISCRETE_TRANSFORM2(HEADON_CRASH_OUT, | |
| 439 | 439 | |
| 440 | 440 | /************************************************ |
| 441 | 441 | * Mixer Stage |
| r3171 | r3172 | |
| 547 | 547 | OPTIONS) |
| 548 | 548 | DISCRETE_COUNTER(NODE_21, 1, 1, NODE_20,MAX,DIR,INIT0, DISC_CLK_BY_COUNT) |
| 549 | 549 | DISCRETE_COUNTER(NODE_22, 1, 1, NODE_20,MAX,DIR,INIT0, DISC_CLK_BY_COUNT) |
| 550 | DISCRETE_TRANSFORM3(NODE, | |
| 550 | DISCRETE_TRANSFORM3(NODE, | |
| 551 | 551 | DISCRETE_DAC_R1(NODE,ENAB,DATA,VDATA,LADDER) |
| 552 | 552 | |
| 553 | 553 | /************************************************ |
| r3171 | r3172 | |
|---|---|---|
| 94 | 94 | 15750.0/2.0/64.0, // 64V signal |
| 95 | 95 | 15, 1, // 4 bit binary up counter |
| 96 | 96 | 0, DISC_CLK_IS_FREQ) // Cleared to 0 |
| 97 | DISCRETE_TRANSFORM2(NODE_31, | |
| 97 | DISCRETE_TRANSFORM2(NODE_31, | |
| 98 | 98 | |
| 99 | 99 | DISCRETE_DAC_R1(NODE_32, 1, // Base of Q3 |
| 100 | 100 | NODE_30, // IC E8, Q0-Q3 |
| r3171 | r3172 | |
| 138 | 138 | 15750.0/2.0/2.0, // 2V signal |
| 139 | 139 | 15, 1, // 4 bit binary up counter |
| 140 | 140 | 0, DISC_CLK_IS_FREQ) // Cleared to 0 |
| 141 | DISCRETE_TRANSFORM2(NODE_42, 1, NODE_41, 15, "01=!") // TC output of J9, pin 15. Modified to function as F8 clock enable | |
| 142 | DISCRETE_TRANSFORM3(POOLSHRK_CLICK_SND, 1, NODE_41, 1, 3.4, "01&2*") // Q0 output of J9, pin 14. Set to proper amplitude | |
| 141 | DISCRETE_TRANSFORM2(NODE_42, NODE_41, 15, "01=!") // TC output of J9, pin 15. Modified to function as F8 clock enable | |
| 142 | DISCRETE_TRANSFORM3(POOLSHRK_CLICK_SND, NODE_41, 1, 3.4, "01&2*") // Q0 output of J9, pin 14. Set to proper amplitude | |
| 143 | 143 | |
| 144 | 144 | /************************************************/ |
| 145 | 145 | /* Final mix and output. */ |
| r3171 | r3172 | |
|---|---|---|
| 142 | 142 | DISCRETE_COUNTER_7492(NODE_23, 1, SPRINT2_ATTRACT_EN, NODE_22, DISC_CLK_ON_F_EDGE) |
| 143 | 143 | |
| 144 | 144 | /* Mask the bits and XOR for clock input */ |
| 145 | DISCRETE_TRANSFORM2(NODE_24, 1, NODE_23, 1, "01&") | |
| 146 | DISCRETE_TRANSFORM2(NODE_25, 1, NODE_23, 4, "01&") | |
| 145 | DISCRETE_TRANSFORM2(NODE_24, NODE_23, 1, "01&") | |
| 146 | DISCRETE_TRANSFORM2(NODE_25, NODE_23, 4, "01&") | |
| 147 | 147 | DISCRETE_LOGIC_XOR(NODE_26, 1, NODE_24, NODE_25) |
| 148 | 148 | |
| 149 | 149 | /* QA of 7492 */ |
| 150 | 150 | DISCRETE_COUNTER(NODE_27, 1, SPRINT2_ATTRACT_EN, NODE_26, 1, 1, 0, DISC_CLK_ON_F_EDGE) |
| 151 | 151 | |
| 152 | 152 | /* Mix QA and QB-D together */ |
| 153 | DISCRETE_TRANSFORM3(NODE_28, | |
| 153 | DISCRETE_TRANSFORM3(NODE_28, | |
| 154 | 154 | |
| 155 | 155 | DISCRETE_DAC_R1(SPRINT2_MOTORSND1, 1, NODE_28, |
| 156 | 156 | DEFAULT_TTL_V_LOGIC_1, |
| r3171 | r3172 | |
| 180 | 180 | DISCRETE_COUNTER_7492(NODE_43, 1, SPRINT2_ATTRACT_EN, NODE_42, DISC_CLK_ON_F_EDGE) |
| 181 | 181 | |
| 182 | 182 | /* Mask the bits and XOR for clock input */ |
| 183 | DISCRETE_TRANSFORM2(NODE_44, 1, NODE_43, 1, "01&") | |
| 184 | DISCRETE_TRANSFORM2(NODE_45, 1, NODE_43, 4, "01&") | |
| 183 | DISCRETE_TRANSFORM2(NODE_44, NODE_43, 1, "01&") | |
| 184 | DISCRETE_TRANSFORM2(NODE_45, NODE_43, 4, "01&") | |
| 185 | 185 | DISCRETE_LOGIC_XOR(NODE_46, 1, NODE_44, NODE_45) |
| 186 | 186 | |
| 187 | 187 | /* QA of 7492 */ |
| 188 | 188 | DISCRETE_COUNTER(NODE_47, 1, SPRINT2_ATTRACT_EN, NODE_46, 1, 1, 0, DISC_CLK_ON_F_EDGE) |
| 189 | 189 | |
| 190 | 190 | /* Mix QA and QB-D together */ |
| 191 | DISCRETE_TRANSFORM3(NODE_48, | |
| 191 | DISCRETE_TRANSFORM3(NODE_48, | |
| 192 | 192 | |
| 193 | 193 | DISCRETE_DAC_R1(SPRINT2_MOTORSND2, 1, NODE_48, |
| 194 | 194 | DEFAULT_TTL_V_LOGIC_1, |
| r3171 | r3172 | |
| 265 | 265 | DISCRETE_COUNTER_7492(NODE_23, 1, SPRINT2_ATTRACT_EN, NODE_22, DISC_CLK_ON_F_EDGE) |
| 266 | 266 | |
| 267 | 267 | /* Mask the bits and XOR for clock input */ |
| 268 | DISCRETE_TRANSFORM2(NODE_24, 1, NODE_23, 1, "01&") | |
| 269 | DISCRETE_TRANSFORM2(NODE_25, 1, NODE_23, 4, "01&") | |
| 268 | DISCRETE_TRANSFORM2(NODE_24, NODE_23, 1, "01&") | |
| 269 | DISCRETE_TRANSFORM2(NODE_25, NODE_23, 4, "01&") | |
| 270 | 270 | DISCRETE_LOGIC_XOR(NODE_26, 1, NODE_24, NODE_25) |
| 271 | 271 | |
| 272 | 272 | /* QA of 7492 */ |
| 273 | 273 | DISCRETE_COUNTER(NODE_27, 1, SPRINT2_ATTRACT_EN, NODE_26, 1, 1, 0, DISC_CLK_ON_F_EDGE) |
| 274 | 274 | |
| 275 | 275 | /* Mix QA and QB-D together */ |
| 276 | DISCRETE_TRANSFORM3(NODE_28, | |
| 276 | DISCRETE_TRANSFORM3(NODE_28, | |
| 277 | 277 | |
| 278 | 278 | DISCRETE_DAC_R1(SPRINT2_MOTORSND1, 1, NODE_28, |
| 279 | 279 | DEFAULT_TTL_V_LOGIC_1, |
| r3171 | r3172 | |
| 380 | 380 | DISCRETE_555_CC(NODE_21, 1, NODE_20, DOMINOS_R23, CAP_U(.01), 0, 0, 0, &dominos_tone_vco) |
| 381 | 381 | DISCRETE_COUNTER_7492(NODE_22, 1, DOMINOS_ATTRACT_EN, // IC D8, QB-QD |
| 382 | 382 | NODE_21, DISC_CLK_ON_F_EDGE) // from IC D7/8, pin 3 |
| 383 | DISCRETE_TRANSFORM2(NODE_23, | |
| 383 | DISCRETE_TRANSFORM2(NODE_23, | |
| 384 | 384 | DISCRETE_SWITCH(NODE_24, 1, NODE_23, 0, // Enable gate C5 |
| 385 | 385 | DOMINOS_AMP_DATA) // IC C4 |
| 386 | 386 | DISCRETE_DAC_R1(DOMINOS_TONE_SND, 1, NODE_24, DEFAULT_TTL_V_LOGIC_1, &dominos_tone_dac) |
| r3171 | r3172 | |
|---|---|---|
| 80 | 80 | #define DK_SUP_V 5.0 |
| 81 | 81 | #define NE555_INTERNAL_R RES_K(5) |
| 82 | 82 | |
| 83 | #define R_PARALLEL(R1,R2) ((R1)*(R2)/((R1)+(R2))) | |
| 84 | #define R_SERIE(R1,R2) ((R1)+(R2)) | |
| 83 | #define R_SERIES(R1,R2) ((R1)+(R2)) | |
| 85 | 84 | |
| 86 | 85 | /**************************************************************** |
| 87 | 86 | * |
| r3171 | r3172 | |
| 282 | 281 | /* Noise */ |
| 283 | 282 | DISCRETE_LFSR_NOISE(NODE_11, 1, 1, CLOCK_2VF, 1.0, 0, 0.5, &dkong_lfsr) |
| 284 | 283 | DISCRETE_COUNTER(NODE_12, 1, 0, NODE_11, 7, DISC_COUNT_UP, 0, DISC_CLK_ON_R_EDGE) /* LS161, IC 3J */ |
| 285 | DISCRETE_TRANSFORM3(NODE_13, | |
| 284 | DISCRETE_TRANSFORM3(NODE_13, | |
| 286 | 285 | |
| 287 | 286 | /* Stomp */ |
| 288 | 287 | /* C21 is discharged via Q5 BE */ |
| 289 | DISCRETE_RCDISC_MODULATED(NODE_15, | |
| 288 | DISCRETE_RCDISC_MODULATED(NODE_15, | |
| 290 | 289 | /* Q5 */ |
| 291 | DISCRETE_TRANSFORM2(NODE_16, | |
| 290 | DISCRETE_TRANSFORM2(NODE_16, | |
| 292 | 291 | DISCRETE_RCDISC2(NODE_17,NODE_16,DK_SUP_V,DK_R8+DK_R7,0.0,DK_R7,DK_C20) |
| 293 | 292 | |
| 294 | DISCRETE_DIODE_MIXER2(NODE_18, 1, DK_1N5553_V, NODE_13, NODE_13) /* D3 */ | |
| 295 | DISCRETE_DIODE_MIXER2(NODE_20, 1, DK_1N5553_V, NODE_17, NODE_18) /* D1, D2 */ | |
| 293 | DISCRETE_DIODE_MIXER2(NODE_18, DK_1N5553_V, NODE_13, NODE_13) /* D3 */ | |
| 294 | DISCRETE_DIODE_MIXER2(NODE_20, DK_1N5553_V, NODE_17, NODE_18) /* D1, D2 */ | |
| 296 | 295 | |
| 297 | DISCRETE_RCINTEGRATE(NODE_22,1,NODE_20,DK_R5, R_PARALLEL(DK_R4+DK_R3,DK_R6),0,DK_C19,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1) | |
| 298 | DISCRETE_MULTIPLY(DS_OUT_SOUND0,1,NODE_22,DK_R3/R_SERIE(DK_R3,DK_R4)) | |
| 296 | DISCRETE_RCINTEGRATE(NODE_22,NODE_20,DK_R5, RES_2_PARALLEL(DK_R4+DK_R3,DK_R6),0,DK_C19,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1) | |
| 297 | DISCRETE_MULTIPLY(DS_OUT_SOUND0,1,NODE_22,DK_R3/R_SERIES(DK_R3,DK_R4)) | |
| 299 | 298 | |
| 300 | 299 | /************************************************/ |
| 301 | 300 | /* Jump */ |
| r3171 | r3172 | |
| 305 | 304 | /* 4049B Inverter Oscillator build from 3 inverters */ |
| 306 | 305 | DISCRETE_INVERTER_OSC(NODE_25,1,0,DK_R38,DK_R39,DK_C26,0,&dkong_inverter_osc_desc_jump) |
| 307 | 306 | |
| 308 | DISCRETE_TRANSFORM3(NODE_26, | |
| 307 | DISCRETE_TRANSFORM3(NODE_26, | |
| 309 | 308 | DISCRETE_MIXER4(NODE_28, 1, NODE_24, NODE_25, DK_SUP_V, 0,&dkong_rc_jump_desc) |
| 310 | 309 | /* 555 Voltage controlled */ |
| 311 | 310 | DISCRETE_555_ASTABLE_CV(NODE_29, 1, RES_K(47), RES_K(27), CAP_N(47), NODE_28, |
| 312 | 311 | &dkong_555_vco_desc) |
| 313 | 312 | |
| 314 | 313 | /* Jump trigger */ |
| 315 | DISCRETE_RCDISC_MODULATED(NODE_33, | |
| 314 | DISCRETE_RCDISC_MODULATED(NODE_33, | |
| 316 | 315 | |
| 317 | DISCRETE_TRANSFORM2(NODE_34, 1, NODE_33, 0.6, "01>") | |
| 318 | DISCRETE_RCDISC2(NODE_35, NODE_34,DK_SUP_V,R_SERIE(DK_R30,DK_R29),0.0,DK_R29,DK_C17) | |
| 316 | DISCRETE_TRANSFORM2(NODE_34, NODE_33, 0.6, "01>") | |
| 317 | DISCRETE_RCDISC2(NODE_35, NODE_34,DK_SUP_V,R_SERIES(DK_R30,DK_R29),0.0,DK_R29,DK_C17) | |
| 319 | 318 | |
| 320 | DISCRETE_DIODE_MIXER2(NODE_36, 1, DK_1N5553_V, NODE_29, NODE_29) | |
| 321 | DISCRETE_DIODE_MIXER2(NODE_38, 1, DK_1N5553_V, NODE_36, NODE_35) | |
| 319 | DISCRETE_DIODE_MIXER2(NODE_36, DK_1N5553_V, NODE_29, NODE_29) | |
| 320 | DISCRETE_DIODE_MIXER2(NODE_38, DK_1N5553_V, NODE_36, NODE_35) | |
| 322 | 321 | |
| 323 | DISCRETE_RCINTEGRATE(NODE_39, | |
| 322 | DISCRETE_RCINTEGRATE(NODE_39, | |
| 324 | 323 | DISCRETE_MULTIPLY(DS_OUT_SOUND1,1,NODE_39,DK_R25/(DK_R26+DK_R25)) |
| 325 | 324 | |
| 326 | 325 | /************************************************/ |
| r3171 | r3172 | |
| 329 | 328 | DISCRETE_MULTIPLY(NODE_50,1,DS_SOUND0,DK_SUP_V) |
| 330 | 329 | DISCRETE_INVERTER_OSC(NODE_51,1,0,DK_R47,DK_R48,DK_C30,0,&dkong_inverter_osc_desc_walk) |
| 331 | 330 | |
| 332 | DISCRETE_TRANSFORM3(NODE_52, | |
| 331 | DISCRETE_TRANSFORM3(NODE_52, | |
| 333 | 332 | DISCRETE_MIXER4(NODE_54, 1, NODE_50, NODE_51, DK_SUP_V, 0,&dkong_rc_walk_desc) |
| 334 | 333 | |
| 335 | 334 | /* 555 Voltage controlled */ |
| 336 | 335 | DISCRETE_555_ASTABLE_CV(NODE_55, 1, RES_K(47), RES_K(27), CAP_N(33), NODE_54, &dkong_555_vco_desc) |
| 337 | 336 | /* Trigger */ |
| 338 | DISCRETE_RCDISC_MODULATED(NODE_60, | |
| 337 | DISCRETE_RCDISC_MODULATED(NODE_60, | |
| 339 | 338 | /* Filter and divide - omitted C22 */ |
| 340 | 339 | DISCRETE_CRFILTER(NODE_61, 1, NODE_60, DK_R15+DK_R16, DK_C23) |
| 341 | 340 | DISCRETE_MULTIPLY(DS_OUT_SOUND2, 1, NODE_61, DK_R15/(DK_R15+DK_R16)) |
| r3171 | r3172 | |
| 346 | 345 | |
| 347 | 346 | /* Signal decay circuit Q7, R20, C32 */ |
| 348 | 347 | DISCRETE_RCDISC(NODE_70, DS_DISCHARGE_INV, 1, DK_R20, DK_C32) |
| 349 | DISCRETE_TRANSFORM4(NODE_71, | |
| 348 | DISCRETE_TRANSFORM4(NODE_71, | |
| 350 | 349 | |
| 351 | 350 | /* following the DAC are two opamps. The first is a current-to-voltage changer |
| 352 | 351 | * for the DAC08 which delivers a variable output current. |
| r3171 | r3172 | |
| 373 | 372 | |
| 374 | 373 | /* Amplifier: internal amplifier */ |
| 375 | 374 | DISCRETE_ADDER2(NODE_289,1,NODE_288,5.0*43.0/(100.0+43.0)) |
| 376 | DISCRETE_RCINTEGRATE(NODE_294, | |
| 375 | DISCRETE_RCINTEGRATE(NODE_294, | |
| 377 | 376 | DISCRETE_CRFILTER(NODE_295,1,NODE_294, RES_K(50), DK_C13) |
| 378 | 377 | /*DISCRETE_CRFILTER(NODE_295,1,NODE_294, 1000, DK_C13) */ |
| 379 | 378 | /* EZV20 equivalent filter circuit ... */ |
| r3171 | r3172 | |
| 381 | 380 | #if DK_NO_FILTERS |
| 382 | 381 | DISCRETE_OUTPUT(NODE_288, 32767.0/5.0 * 10) |
| 383 | 382 | #else |
| 384 | DISCRETE_OUTPUT(NODE_296, 32767.0/5.0 * | |
| 383 | DISCRETE_OUTPUT(NODE_296, 32767.0/5.0 * 3.41) | |
| 385 | 384 | #endif |
| 386 | 385 | |
| 387 | 386 | DISCRETE_SOUND_END |
| r3171 | r3172 | |
| 476 | 475 | |
| 477 | 476 | static const discrete_mixer_desc radarscp_mixer_desc_0 = |
| 478 | 477 | {DISC_MIXER_IS_RESISTOR, |
| 479 | {RS_R56+RS_R54,NE555_INTERNAL_R,R_PARALLEL(2*NE555_INTERNAL_R,RS_R55) }, | |
| 478 | {RS_R56+RS_R54,NE555_INTERNAL_R,RES_2_PARALLEL(2*NE555_INTERNAL_R,RS_R55) }, | |
| 480 | 479 | {0,0,0}, |
| 481 | 480 | {0,0,0,0}, /* no node capacitors */ |
| 482 | 481 | 0, 0, |
| r3171 | r3172 | |
| 486 | 485 | |
| 487 | 486 | static const discrete_mixer_desc radarscp_mixer_desc_7 = |
| 488 | 487 | {DISC_MIXER_IS_RESISTOR, |
| 489 | {RS_R63+RS_R59, NE555_INTERNAL_R,R_PARALLEL(2*NE555_INTERNAL_R,RS_R60)}, | |
| 488 | {RS_R63+RS_R59, NE555_INTERNAL_R,RES_2_PARALLEL(2*NE555_INTERNAL_R,RS_R60)}, | |
| 490 | 489 | {0,0,0}, /* no variable resistors */ |
| 491 | 490 | {0,0,0}, /* no node capacitors */ |
| 492 | 491 | 0, 0, |
| r3171 | r3172 | |
| 541 | 540 | DISCRETE_LFSR_NOISE(NODE_11, 1, 1, CLOCK_2VF, 1.0, 0, 0.5, &dkong_lfsr) |
| 542 | 541 | /* Clear (1) from SOUND6 */ |
| 543 | 542 | DISCRETE_COUNTER(NODE_12, 1, DS_SOUND6_INV, NODE_11, 15, DISC_COUNT_UP, 0, DISC_CLK_ON_R_EDGE) /* LS161, IC 3J */ |
| 544 | DISCRETE_TRANSFORM3(NODE_13,1,NODE_12,0x04,DK_SUP_V,"01&1=2*") /*QC => SND02 */ | |
| 545 | DISCRETE_TRANSFORM3(NODE_14,1,NODE_12,0x02,DK_SUP_V,"01&1=2*") /*QB => SND01 */ | |
| 543 | DISCRETE_TRANSFORM3(NODE_13,NODE_12,0x04,DK_SUP_V,"01&1=2*") /*QC => SND02 */ | |
| 544 | DISCRETE_TRANSFORM3(NODE_14,NODE_12,0x02,DK_SUP_V,"01&1=2*") /*QB => SND01 */ | |
| 546 | 545 | |
| 547 | 546 | /************************************************/ |
| 548 | 547 | /* SOUND2 */ |
| r3171 | r3172 | |
| 550 | 549 | |
| 551 | 550 | /* C21 is discharged via Q5 BE */ |
| 552 | 551 | |
| 553 | DISCRETE_RCDISC_MODULATED(NODE_16,1,DS_SOUND2_INV,0,RS_R_NN01,0,0,RS_R9*2,RS_C20,DK_SUP_V) | |
| 554 | DISCRETE_TRANSFORM2(NODE_17, 1, NODE_16, 0.6, "01>") /* TR2 */ | |
| 552 | DISCRETE_RCDISC_MODULATED(NODE_16,DS_SOUND2_INV,0,RS_R_NN01,0,0,RS_R9*2,RS_C20,DK_SUP_V) | |
| 553 | DISCRETE_TRANSFORM2(NODE_17, NODE_16, 0.6, "01>") /* TR2 */ | |
| 555 | 554 | DISCRETE_RCDISC2(NODE_18,NODE_17,DK_SUP_V,RS_R8+RS_R7,0.0,RS_R7,RS_C19) |
| 556 | 555 | |
| 557 | DISCRETE_DIODE_MIXER2(NODE_19, 1, DK_1N5553_V, NODE_13, NODE_13) /* D3 */ | |
| 558 | DISCRETE_DIODE_MIXER2(NODE_20, 1, DK_1N5553_V, NODE_18, NODE_19) /* D1, D2 */ | |
| 556 | DISCRETE_DIODE_MIXER2(NODE_19, DK_1N5553_V, NODE_13, NODE_13) /* D3 */ | |
| 557 | DISCRETE_DIODE_MIXER2(NODE_20, DK_1N5553_V, NODE_18, NODE_19) /* D1, D2 */ | |
| 559 | 558 | |
| 560 | DISCRETE_RCINTEGRATE(NODE_22,1,NODE_20,RS_R5, R_PARALLEL(RS_R4+RS_R3,RS_R6),0,RS_C18,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1) | |
| 561 | DISCRETE_MULTIPLY(DS_OUT_SOUND2,1,NODE_22,RS_R3/R_SERIE(RS_R3,RS_R4)) | |
| 559 | DISCRETE_RCINTEGRATE(NODE_22,NODE_20,RS_R5, RES_2_PARALLEL(RS_R4+RS_R3,RS_R6),0,RS_C18,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1) | |
| 560 | DISCRETE_MULTIPLY(DS_OUT_SOUND2,1,NODE_22,RS_R3/R_SERIES(RS_R3,RS_R4)) | |
| 562 | 561 | |
| 563 | 562 | /************************************************/ |
| 564 | 563 | /* SOUND1 */ |
| r3171 | r3172 | |
| 566 | 565 | |
| 567 | 566 | /* C21 is discharged via Q5 BE */ |
| 568 | 567 | |
| 569 | DISCRETE_RCDISC_MODULATED(NODE_26,1,DS_SOUND1_INV,0,RS_R_NN02,0,0,RS_R32,RS_C31,DK_SUP_V) | |
| 570 | DISCRETE_TRANSFORM2(NODE_27, 1, NODE_26, 0.6, "01>") /* TR5 */ | |
| 568 | DISCRETE_RCDISC_MODULATED(NODE_26,DS_SOUND1_INV,0,RS_R_NN02,0,0,RS_R32,RS_C31,DK_SUP_V) | |
| 569 | DISCRETE_TRANSFORM2(NODE_27, NODE_26, 0.6, "01>") /* TR5 */ | |
| 571 | 570 | DISCRETE_RCDISC2(NODE_28,NODE_27,DK_SUP_V,RS_R31+RS_R30,0.0,RS_R30,RS_C30) |
| 572 | 571 | |
| 573 | DISCRETE_DIODE_MIXER2(NODE_29, 1, DK_1N5553_V, NODE_14, NODE_14) /* D3 */ | |
| 574 | DISCRETE_DIODE_MIXER2(NODE_30, 1, DK_1N5553_V, NODE_28, NODE_29) /* D1, D2 */ | |
| 572 | DISCRETE_DIODE_MIXER2(NODE_29, DK_1N5553_V, NODE_14, NODE_14) /* D3 */ | |
| 573 | DISCRETE_DIODE_MIXER2(NODE_30, DK_1N5553_V, NODE_28, NODE_29) /* D1, D2 */ | |
| 575 | 574 | |
| 576 | DISCRETE_RCINTEGRATE(NODE_31,1,NODE_30,RS_R28, R_PARALLEL(RS_R27+RS_R26,RS_R29),0,RS_C29,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1) | |
| 577 | DISCRETE_MULTIPLY(DS_OUT_SOUND1,1,NODE_31,RS_R26/R_SERIE(RS_R26,RS_R27)) | |
| 575 | DISCRETE_RCINTEGRATE(NODE_31,NODE_30,RS_R28, RES_2_PARALLEL(RS_R27+RS_R26,RS_R29),0,RS_C29,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1) | |
| 576 | DISCRETE_MULTIPLY(DS_OUT_SOUND1,1,NODE_31,RS_R26/R_SERIES(RS_R26,RS_R27)) | |
| 578 | 577 | |
| 579 | 578 | /************************************************/ |
| 580 | 579 | /* SOUND0 */ |
| r3171 | r3172 | |
| 586 | 585 | /* 555 Voltage controlled */ |
| 587 | 586 | DISCRETE_555_ASTABLE_CV(NODE_43, DS_SOUND6, RES_K(47), RES_K(27), RS_C49, NODE_42, &radarscp_555_vco_desc) |
| 588 | 587 | |
| 589 | DISCRETE_RCDISC_MODULATED(NODE_44, | |
| 588 | DISCRETE_RCDISC_MODULATED(NODE_44, | |
| 590 | 589 | DISCRETE_CRFILTER(NODE_45, 1, NODE_44, RS_R15+RS_R16, RS_C33) |
| 591 | 590 | DISCRETE_MULTIPLY(DS_OUT_SOUND0, 1, NODE_45, RS_R15/(RS_R15+RS_R16)) |
| 592 | 591 | |
| r3171 | r3172 | |
| 602 | 601 | /* 555 Voltage controlled */ |
| 603 | 602 | DISCRETE_555_ASTABLE_CV(NODE_54, DS_SOUND7, RES_K(47), RES_K(27), RS_C48, NODE_53, &radarscp_555_vco_desc) |
| 604 | 603 | |
| 605 | DISCRETE_RCINTEGRATE(NODE_55,1,NODE_52,RS_R46, RS_R46,0,RS_C45,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1) | |
| 606 | DISCRETE_TRANSFORM4(NODE_56, 1, NODE_55, DS_SOUND7,NODE_54,2.5, "01*23<*") | |
| 604 | DISCRETE_RCINTEGRATE(NODE_55,NODE_52,RS_R46, RS_R46,0,RS_C45,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1) | |
| 605 | DISCRETE_TRANSFORM4(NODE_56, NODE_55, DS_SOUND7,NODE_54,2.5, "01*23<*") | |
| 607 | 606 | DISCRETE_CRFILTER(NODE_57, 1, NODE_56, RS_R43+RS_R44, RS_C46) |
| 608 | 607 | DISCRETE_MULTIPLY(DS_OUT_SOUND7, 1, NODE_57, RS_R44/(RS_R43+RS_R44)) |
| 609 | 608 | |
| r3171 | r3172 | |
| 612 | 611 | /************************************************/ |
| 613 | 612 | /* Signal decay circuit Q7, R20, C32 */ |
| 614 | 613 | DISCRETE_RCDISC(NODE_170, DS_DISCHARGE_INV, 1, RS_R40, RS_C40) |
| 615 | DISCRETE_TRANSFORM4(NODE_171, | |
| 614 | DISCRETE_TRANSFORM4(NODE_171, | |
| 616 | 615 | |
| 617 | 616 | /* following the DAC are two opamps. The first is a current-to-voltage changer |
| 618 | 617 | * for the DAC08 which delivers a variable output current. |
| r3171 | r3172 | |
| 635 | 634 | |
| 636 | 635 | /* Amplifier: internal amplifier */ |
| 637 | 636 | DISCRETE_ADDER2(NODE_289,1,NODE_288,5.0*43.0/(100.0+43.0)) |
| 638 | DISCRETE_RCINTEGRATE(NODE_294, | |
| 637 | DISCRETE_RCINTEGRATE(NODE_294, | |
| 639 | 638 | DISCRETE_CRFILTER(NODE_295,1,NODE_294, 1000, DK_C13) |
| 640 | 639 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 * 3) |
| 641 | 640 | |
| r3171 | r3172 | |
| 704 | 703 | #define DISCRETE_LS123_INV(_N, _T, _R, _C) \ |
| 705 | 704 | DISCRETE_ONESHOTR(_N, 0, _T, TTL_HIGH, (0.25 * (_R) * (_C) * (1.0+700./(_R))), DISC_ONESHOT_RETRIG | DISC_ONESHOT_REDGE | DISC_OUT_ACTIVE_LOW) |
| 706 | 705 | |
| 707 | #define DISCRETE_BITSET(_N, _N1, _B) DISCRETE_TRANSFORM3(_N, 1, _N1, 1 << ((_B)-1), 0, "01&2>") | |
| 708 | #define DISCRETE_ENERGY_NAND(_N, _E, _N1, _N2) DISCRETE_TRANSFORM3(_N, _E, _N1, _N2, 1, "201*-") | |
| 706 | #define DISCRETE_BITSET(_N, _N1, _B) DISCRETE_TRANSFORM3(_N, _N1, 1 << ((_B)-1), 0, "01&2>") | |
| 707 | #define DISCRETE_ENERGY_NAND(_N, _N1, _N2) DISCRETE_TRANSFORM3(_N, _N1, _N2, 1, "201*-") | |
| 709 | 708 | |
| 710 | 709 | static const discrete_mixer_desc dkongjr_mixer_desc = |
| 711 | 710 | {DISC_MIXER_IS_RESISTOR, |
| r3171 | r3172 | |
| 770 | 769 | /************************************************/ |
| 771 | 770 | |
| 772 | 771 | DISCRETE_LS123(NODE_10, DS_SOUND1_INV, JR_R9, JR_C15) |
| 773 | DISCRETE_TRANSFORM2(NODE_11, | |
| 772 | DISCRETE_TRANSFORM2(NODE_11, | |
| 774 | 773 | DISCRETE_LOGIC_INVERT(NODE_12,1,NODE_10) |
| 775 | 774 | DISCRETE_MIXER2(NODE_13, 1, NODE_10, NODE_11, &dkongjr_s1_mixer_desc) |
| 776 | 775 | DISCRETE_74LS624( NODE_14, 1, NODE_13, 0.98*DK_SUP_V, JR_C22, DISC_LS624_OUT_ENERGY) |
| 777 | DISCRETE_RCDISC_MODULATED(NODE_15, | |
| 776 | DISCRETE_RCDISC_MODULATED(NODE_15, | |
| 778 | 777 | /* The following circuit does not match 100%, however works. |
| 779 | 778 | * To be exact, we need a C-R-C-R circuit, we actually do not have. |
| 780 | 779 | */ |
| r3171 | r3172 | |
| 788 | 787 | DISCRETE_74LS624( NODE_20, 1, 0, 0.98*DK_SUP_V, JR_C20, DISC_LS624_OUT_COUNT_F) |
| 789 | 788 | DISCRETE_LFSR_NOISE(NODE_21, 1, 1, NODE_20, 1.0, 0, 0.5, &dkongjr_lfsr) |
| 790 | 789 | DISCRETE_LS123_INV(NODE_25, DS_SOUND2_INV, JR_R17, JR_C27) |
| 791 | DISCRETE_RCDISC_MODULATED(NODE_26, | |
| 790 | DISCRETE_RCDISC_MODULATED(NODE_26, | |
| 792 | 791 | /* The following circuit does not match 100%, however works. |
| 793 | 792 | * To be exact, we need a C-R-C-R circuit, we actually do not have. |
| 794 | 793 | */ |
| r3171 | r3172 | |
| 802 | 801 | DISCRETE_RCFILTER(NODE_90, 1, DS_SOUND9_INV, JR_R14, JR_C26) |
| 803 | 802 | DISCRETE_MULTIPLY(NODE_91, 1, NODE_90, TTL_HIGH) |
| 804 | 803 | DISCRETE_74LS624( NODE_92, 1, NODE_91, DK_SUP_V, JR_C37, DISC_LS624_OUT_ENERGY) |
| 805 | DISCRETE_ENERGY_NAND(NODE_93, | |
| 804 | DISCRETE_ENERGY_NAND(NODE_93, | |
| 806 | 805 | DISCRETE_MULTIPLY(DS_OUT_SOUND9, 1, NODE_93, TTL_HIGH) |
| 807 | 806 | |
| 808 | 807 | /************************************************/ |
| r3171 | r3172 | |
| 822 | 821 | DISCRETE_SWITCH(NODE_107, 1, DS_SOUND7_INV, NODE_103, NODE_104) /* Switch 3 */ |
| 823 | 822 | |
| 824 | 823 | DISCRETE_LS123(NODE_110, DS_SOUND0_INV, JR_R8, JR_C14) |
| 825 | DISCRETE_TRANSFORM2(NODE_111, | |
| 824 | DISCRETE_TRANSFORM2(NODE_111, | |
| 826 | 825 | DISCRETE_RCFILTER(NODE_112, 1, NODE_111, JR_R10, JR_C17) |
| 827 | 826 | DISCRETE_74LS624(NODE_113, 1, NODE_112, DK_SUP_V, JR_C18, DISC_LS624_OUT_ENERGY) |
| 828 | 827 | |
| 829 | 828 | DISCRETE_LOGIC_XOR(NODE_115, 1, NODE_105, NODE_106) |
| 830 | 829 | |
| 831 | DISCRETE_TRANSFORM2(NODE_116, | |
| 830 | DISCRETE_TRANSFORM2(NODE_116, | |
| 832 | 831 | DISCRETE_RCFILTER(NODE_117, 1, NODE_116, JR_R11, JR_C16) |
| 833 | 832 | DISCRETE_74LS624(NODE_118, 1, NODE_117, DK_SUP_V, JR_C19, DISC_LS624_OUT_COUNT_F) |
| 834 | 833 | |
| r3171 | r3172 | |
| 840 | 839 | /************************************************/ |
| 841 | 840 | /* Signal decay circuit Q7, R20, C32 */ |
| 842 | 841 | DISCRETE_RCDISC(NODE_170, DS_DISCHARGE_INV, 1, JR_R20, JR_C32) |
| 843 | DISCRETE_TRANSFORM4(NODE_171, | |
| 842 | DISCRETE_TRANSFORM4(NODE_171, | |
| 844 | 843 | |
| 845 | 844 | /* following the DAC are two opamps. The first is a current-to-voltage changer |
| 846 | 845 | * for the DAC08 which delivers a variable output current. |
| r3171 | r3172 | |
| 1133 | 1132 | MDRV_LATCH8_DEVREAD(5, LATCH8, "ls259.6h", latch8_r, 3) |
| 1134 | 1133 | MDRV_LATCH8_DISCRETE_NODE(7, DS_DISCHARGE_INV) |
| 1135 | 1134 | |
| 1136 | MDRV_CPU_ADD("sound", | |
| 1135 | MDRV_CPU_ADD("sound", MB8884, I8035_CLOCK) | |
| 1137 | 1136 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0) |
| 1138 | 1137 | MDRV_CPU_IO_MAP(dkong_sound_io_map, 0) |
| 1139 | 1138 | |
| r3171 | r3172 | |
| 1196 | 1195 | MDRV_LATCH8_DEVREAD(4, LATCH8, "ls259.6h", latch8_r, 6) |
| 1197 | 1196 | MDRV_LATCH8_DISCRETE_NODE(7, DS_DISCHARGE_INV) |
| 1198 | 1197 | |
| 1199 | MDRV_CPU_ADD("sound", | |
| 1198 | MDRV_CPU_ADD("sound", MB8884, I8035_CLOCK) | |
| 1200 | 1199 | MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0) |
| 1201 | 1200 | MDRV_CPU_IO_MAP(dkongjr_sound_io_map, 0) |
| 1202 | 1201 |
| r3171 | r3172 | |
|---|---|---|
| 193 | 193 | SPRINT4_PLAYER_MOTOR_NODE(3, _plr), /* CLK */ \ |
| 194 | 194 | DISC_CLK_ON_F_EDGE) \ |
| 195 | 195 | DISCRETE_TRANSFORM3(SPRINT4_PLAYER_MOTOR_NODE(5, _plr), /* IC B10, pin 3 */ \ |
| 196 | 1, /* ENAB */ \ | |
| 197 | 196 | SPRINT4_PLAYER_MOTOR_NODE(4, _plr), /* INP0 */ \ |
| 198 | 197 | 0x01, /* INP1 */ \ |
| 199 | 198 | 0x04, /* INP2 */ \ |
| r3171 | r3172 | |
| 207 | 206 | 0, /* INIT0 */ \ |
| 208 | 207 | DISC_CLK_ON_F_EDGE) /* CLKTYPE */ \ |
| 209 | 208 | DISCRETE_TRANSFORM3(SPRINT4_PLAYER_MOTOR_NODE(7, _plr), /* */ \ |
| 210 | 1, /* ENAB */ \ | |
| 211 | 209 | SPRINT4_PLAYER_MOTOR_NODE(4, _plr), /* INP0 */ \ |
| 212 | 210 | SPRINT4_PLAYER_MOTOR_NODE(6, _plr), /* INP1 */ \ |
| 213 | 211 | 0x08, /* INP2 */ \ |
| r3171 | r3172 | |
|---|---|---|
| 222 | 222 | &firetrk_motor_vco) |
| 223 | 223 | DISCRETE_COUNTER_7492(NODE_23, 1, FIRETRUCK_ATTRACT_EN, // IC A9, QB-QD |
| 224 | 224 | NODE_22, DISC_CLK_ON_F_EDGE) // from IC B9, pin 3 |
| 225 | DISCRETE_TRANSFORM2(NODE_24, | |
| 225 | DISCRETE_TRANSFORM2(NODE_24, | |
| 226 | 226 | DISCRETE_COUNTER(NODE_25, 1, FIRETRUCK_ATTRACT_EN, // IC A9, pin 12 |
| 227 | 227 | NODE_24, // from IC A9, pin 8 |
| 228 | 228 | 1, 1, 0, DISC_CLK_ON_F_EDGE) |
| 229 | DISCRETE_TRANSFORM3(NODE_26, | |
| 229 | DISCRETE_TRANSFORM3(NODE_26, | |
| 230 | 230 | DISCRETE_DAC_R1(FIRETRUCK_MOTORSND, 1, NODE_26, |
| 231 | 231 | DEFAULT_TTL_V_LOGIC_1, |
| 232 | 232 | &firetrk_motor_out_dac) |
| r3171 | r3172 | |
| 290 | 290 | 4.4, 10, // Q3 instantally charges C42 |
| 291 | 291 | 0, RES_K(33), // discharges thru R66 |
| 292 | 292 | CAP_U(10)) // C42 |
| 293 | DISCRETE_TRANSFORM2(NODE_71, | |
| 293 | DISCRETE_TRANSFORM2(NODE_71, | |
| 294 | 294 | 5.0 * 680 / (RES_K(10) + 680), // vRef = 5V * R64 / (R65 + R64) |
| 295 | 295 | "01<") // Output is low until vIn drops below vRef |
| 296 | 296 | DISCRETE_COUNTER(NODE_72, 1, NODE_71, FIRETRUCK_HSYNC, 15, 1, 0, DISC_CLK_IS_FREQ) // IC B10 |
| 297 | DISCRETE_TRANSFORM4(FIRETRUCK_BELLSND, | |
| 297 | DISCRETE_TRANSFORM4(FIRETRUCK_BELLSND, | |
| 298 | 298 | 8, // count 0-7 allow cap voltage to output. 8-15 ground output. |
| 299 | 299 | NODE_70, // scale logic to cap voltage |
| 300 | 300 | RES_K(47) / (RES_K(47) + RES_K(47) + RES_K(47)), // to drop voltage per divider R72 / (R70+R71+R72) |
| r3171 | r3172 | |
| 425 | 425 | &superbug_motor_vco) |
| 426 | 426 | DISCRETE_COUNTER_7492(NODE_23, 1, SUPERBUG_ATTRACT_EN, // IC A7, QB-QD |
| 427 | 427 | NODE_22, DISC_CLK_ON_F_EDGE) // from IC A6, pin 3 |
| 428 | DISCRETE_TRANSFORM2(NODE_24, 1, NODE_23, 0x04, "01&") // IC A7, pin 8-QD | |
| 429 | DISCRETE_TRANSFORM2(NODE_25, 1, NODE_23, 0x01, "01&") // IC A7, pin 11-QB | |
| 428 | DISCRETE_TRANSFORM2(NODE_24, NODE_23, 0x04, "01&") // IC A7, pin 8-QD | |
| 429 | DISCRETE_TRANSFORM2(NODE_25, NODE_23, 0x01, "01&") // IC A7, pin 11-QB | |
| 430 | 430 | DISCRETE_LOGIC_XOR(NODE_26, 1, NODE_24, NODE_25) // Gate A9, pin 8 |
| 431 | 431 | DISCRETE_COUNTER(NODE_27, 1, SUPERBUG_ATTRACT_EN, // IC A7, pin 12-QA |
| 432 | 432 | NODE_26, // from IC A9, pin 8 |
| 433 | 433 | 1, 1, 0, DISC_CLK_ON_F_EDGE) |
| 434 | DISCRETE_TRANSFORM3(NODE_28, | |
| 434 | DISCRETE_TRANSFORM3(NODE_28, | |
| 435 | 435 | DISCRETE_DAC_R1(SUPERBUG_MOTORSND, 1, NODE_28, |
| 436 | 436 | DEFAULT_TTL_V_LOGIC_1, |
| 437 | 437 | &superbug_motor_out_dac) |
| r3171 | r3172 | |
| 609 | 609 | &montecar_motor_vco) |
| 610 | 610 | DISCRETE_COUNTER_7492(NODE_23, 1, MONTECAR_ATTRACT_EN, // IC B/C9, QB-QD |
| 611 | 611 | NODE_22, DISC_CLK_ON_F_EDGE) // from IC C9, pin 9 |
| 612 | DISCRETE_TRANSFORM2(NODE_24, 1, NODE_23, 0x04, "01&") // IC B/C9, pin 8-QD | |
| 613 | DISCRETE_TRANSFORM2(NODE_25, 1, NODE_23, 0x01, "01&") // IC B/C9, pin 11-QB | |
| 612 | DISCRETE_TRANSFORM2(NODE_24, NODE_23, 0x04, "01&") // IC B/C9, pin 8-QD | |
| 613 | DISCRETE_TRANSFORM2(NODE_25, NODE_23, 0x01, "01&") // IC B/C9, pin 11-QB | |
| 614 | 614 | DISCRETE_LOGIC_XOR(NODE_26, 1, NODE_24, NODE_25) // Gate A9, pin 11 |
| 615 | 615 | DISCRETE_COUNTER(NODE_27, 1, MONTECAR_ATTRACT_EN, // IC B/C9, pin 12-QA |
| 616 | 616 | NODE_26, // from IC A9, pin 11 |
| 617 | 617 | 1, 1, 0, DISC_CLK_ON_F_EDGE) |
| 618 | DISCRETE_TRANSFORM3(NODE_28, | |
| 618 | DISCRETE_TRANSFORM3(NODE_28, | |
| 619 | 619 | DISCRETE_DAC_R1(MONTECAR_MOTORSND, 1, NODE_28, |
| 620 | 620 | DEFAULT_TTL_V_LOGIC_1, |
| 621 | 621 | &montecar_motor_out_dac) |
| r3171 | r3172 | |
| 644 | 644 | &montecar_motor_vco) |
| 645 | 645 | DISCRETE_COUNTER_7492(NODE_43, 1, MONTECAR_ATTRACT_EN, // IC A/B9, QB-QD |
| 646 | 646 | NODE_42, DISC_CLK_ON_F_EDGE) // from IC C9, pin 5 |
| 647 | DISCRETE_TRANSFORM2(NODE_44, 1, NODE_43, 0x04, "01&") // IC A/B9, pin 8-QD | |
| 648 | DISCRETE_TRANSFORM2(NODE_45, 1, NODE_43, 0x01, "01&") // IC A/B9, pin 11-QB | |
| 647 | DISCRETE_TRANSFORM2(NODE_44, NODE_43, 0x04, "01&") // IC A/B9, pin 8-QD | |
| 648 | DISCRETE_TRANSFORM2(NODE_45, NODE_43, 0x01, "01&") // IC A/B9, pin 11-QB | |
| 649 | 649 | DISCRETE_LOGIC_XOR(NODE_46, 1, NODE_44, NODE_45) // Gate A9, pin 6 |
| 650 | 650 | DISCRETE_COUNTER(NODE_47, 1, MONTECAR_ATTRACT_EN, // IC A/B9, pin 12-QA |
| 651 | 651 | NODE_46, // from IC A9, pin 6 |
| 652 | 652 | 1, 1, 0, DISC_CLK_ON_F_EDGE) |
| 653 | DISCRETE_TRANSFORM3(NODE_48, | |
| 653 | DISCRETE_TRANSFORM3(NODE_48, | |
| 654 | 654 | DISCRETE_DAC_R1(MONTECAR_DRONE_MOTORSND, 1, NODE_48, |
| 655 | 655 | DEFAULT_TTL_V_LOGIC_1, |
| 656 | 656 | &montecar_motor_out_dac) |
| r3171 | r3172 | |
|---|---|---|
| 137 | 137 | // Port A is used to turn filtering on/off. |
| 138 | 138 | // 1 - player shot, siren, music |
| 139 | 139 | // turn bit into 4066 Ron value of 270 ohms @ 5V |
| 140 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTA_1, | |
| 140 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTA_1, | |
| 141 | 141 | // 2 - player explosion |
| 142 | DISCRETE_TRANSFORM2(MADALIEN_8910_PORTA_2, | |
| 142 | DISCRETE_TRANSFORM2(MADALIEN_8910_PORTA_2, | |
| 143 | 143 | // 3 - rub wall |
| 144 | DISCRETE_TRANSFORM2(MADALIEN_8910_PORTA_3, | |
| 144 | DISCRETE_TRANSFORM2(MADALIEN_8910_PORTA_3, | |
| 145 | 145 | // 4 - is it even triggered? |
| 146 | DISCRETE_TRANSFORM2(MADALIEN_8910_PORTA_4, | |
| 146 | DISCRETE_TRANSFORM2(MADALIEN_8910_PORTA_4, | |
| 147 | 147 | // 5 - siren, music (out of phase copy of 1 for echo effect) |
| 148 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTA_5, | |
| 148 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTA_5, | |
| 149 | 149 | // 6 - enemy explosions |
| 150 | DISCRETE_TRANSFORM2(MADALIEN_8910_PORTA_6, | |
| 150 | DISCRETE_TRANSFORM2(MADALIEN_8910_PORTA_6, | |
| 151 | 151 | // 8 - enemy spin, beep |
| 152 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTA_8, | |
| 152 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTA_8, | |
| 153 | 153 | |
| 154 | 154 | //Port B controls motor sounds |
| 155 | 155 | // 1,2,3 - Player motor volume |
| 156 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTB_1, 1, MADALIEN_8910_PORTB, 0x01, 270, "01&2*") | |
| 157 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTB_23, 1, MADALIEN_8910_PORTB, 0x06, 2, "01&2/") | |
| 156 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTB_1, MADALIEN_8910_PORTB, 0x01, 270, "01&2*") | |
| 157 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTB_23, MADALIEN_8910_PORTB, 0x06, 2, "01&2/") | |
| 158 | 158 | // 4,5 - Player motor speed |
| 159 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTB_45, | |
| 159 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTB_45, | |
| 160 | 160 | // 6 - Enemy motor enable |
| 161 | DISCRETE_TRANSFORM2(MADALIEN_8910_PORTB_6, | |
| 161 | DISCRETE_TRANSFORM2(MADALIEN_8910_PORTB_6, | |
| 162 | 162 | // 7 - Enemy motor speed |
| 163 | 163 | // convert bit 7 to voltage level |
| 164 | 164 | // 2 diodes reduce voltage by 1V. |
| 165 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTB_7, | |
| 165 | DISCRETE_TRANSFORM3(MADALIEN_8910_PORTB_7, | |
| 166 | 166 | |
| 167 | 167 | /************************************************ |
| 168 | 168 | * PSG input streams |
| r3171 | r3172 | |
| 183 | 183 | // pin 3 |
| 184 | 184 | DISCRETE_MULTIPLY(NODE_30, MADALIEN_8910_PORTA_4, MADALIEN_8910_PSG_B, RES_K(3.3)/(RES_K(3.3)+RES_K(3.3))) |
| 185 | 185 | // pin 2 |
| 186 | DISCRETE_TRANSFORM3(NODE_31, | |
| 186 | DISCRETE_TRANSFORM3(NODE_31, | |
| 187 | 187 | // pin 1 |
| 188 | 188 | DISCRETE_SWITCH(NODE_32, 1, MADALIEN_8910_PORTA_3, NODE_30, NODE_31) |
| 189 | 189 | DISCRETE_CLAMP(NODE_33, 1, NODE_32, -5, 5.0-1.5, 0) |
| r3171 | r3172 | |
|---|---|---|
| 147 | 147 | DISCRETE_COUNTER(NODE_23, 1, TRIPLHNT_BEAR_EN, // IC B6, QB-QD |
| 148 | 148 | NODE_22, // from IC C11, pin 3 |
| 149 | 149 | 5, 1, 0, DISC_CLK_ON_R_EDGE) // /6 counter on rising edge |
| 150 | DISCRETE_TRANSFORM2(NODE_24, | |
| 150 | DISCRETE_TRANSFORM2(NODE_24, | |
| 151 | 151 | DISCRETE_LOGIC_INVERT(NODE_25, 1, NODE_22) // IC D9, pin 3 |
| 152 | 152 | DISCRETE_LOGIC_NAND(NODE_26, 1, NODE_25, TRIPLHNT_NOISE) // IC D9, pin 11 |
| 153 | 153 | DISCRETE_LOGIC_XOR(NODE_27, 1, NODE_24, NODE_26) // IC B8, pin 6 |
| 154 | 154 | DISCRETE_COUNTER(NODE_28, 1, TRIPLHNT_BEAR_EN, // IC B6, pin 12 |
| 155 | 155 | NODE_27, // from IC B8, pin 6 |
| 156 | 156 | 1, 1, 0, DISC_CLK_ON_R_EDGE) // /2 counter on rising edge |
| 157 | DISCRETE_TRANSFORM5(NODE_29, | |
| 157 | DISCRETE_TRANSFORM5(NODE_29, | |
| 158 | 158 | DISCRETE_DAC_R1(TRIPLHNT_BEAR_ROAR_SND, 1, NODE_29, |
| 159 | 159 | DEFAULT_TTL_V_LOGIC_1, |
| 160 | 160 | &triplhnt_bear_roar_out_dac) |
| r3171 | r3172 | |
|---|---|---|
| 13 | 13 | |
| 14 | 14 | #define OP_AMP_NON_INVERT_GAIN(ri, rf) ((double)rf / (double)ri + 1) |
| 15 | 15 | |
| 16 | /* vin --/\r1/\-- out --/\r2/\-- gnd */ | |
| 17 | #define RES_VOLTAGE_DIVIDER(r1, r2) ((double)r2 / ((double)r1 + (double)r2)) | |
| 18 | ||
| 19 | #define RES_2_PARALLEL(r1, r2) (1.0 / (1.0 / r1 + 1.0 / r2)) | |
| 20 | ||
| 21 | 16 | /* Discrete Sound Input Nodes */ |
| 22 | 17 | /* see "starshp1.h" */ |
| 23 | 18 |
| r3171 | r3172 | |
|---|---|---|
| 23 | 23 | #define I8035_P1_R(M) (soundlatch3_r(M,0)) |
| 24 | 24 | #define I8035_P2_R(M) (soundlatch4_r(M,0)) |
| 25 | 25 | #define I8035_P1_W(M,D) soundlatch3_w(M,0,D) |
| 26 | #define I8035_P2_W(M,D) do { soundlatch4_w(M,0,D); cputag_set_input_line(machine, "audio", MCS48_INPUT_EA, ((D) & 0x20) ? ASSERT_LINE : CLEAR_LINE); } while (0) | |
| 27 | 26 | |
| 27 | #if (USE_8039) | |
| 28 | #define I8035_P2_W(M,D) do { soundlatch4_w(M,0,D); } while (0) | |
| 29 | #else | |
| 30 | #define I8035_P2_W(M,D) do { set_ea(M, ((D) & 0x20) ? 0 : 1); soundlatch4_w(M,0,D); } while (0) | |
| 31 | #endif | |
| 28 | 32 | |
| 29 | 33 | #define I8035_P1_W_AH(M,B,D) I8035_P1_W(M,ACTIVEHIGH_PORT_BIT(I8035_P1_R(M),B,(D))) |
| 30 | 34 | #define I8035_P2_W_AH(M,B,D) I8035_P2_W(M,ACTIVEHIGH_PORT_BIT(I8035_P2_R(M),B,(D))) |
| r3171 | r3172 | |
| 118 | 122 | #define DISCRETE_LS123_INV(_N, _T, _R, _C) \ |
| 119 | 123 | DISCRETE_ONESHOTR(_N, 0, _T, TTL_HIGH, (0.25 * (_R) * (_C) * (1.0+700./(_R))), DISC_ONESHOT_RETRIG | DISC_ONESHOT_REDGE | DISC_OUT_ACTIVE_LOW) |
| 120 | 124 | |
| 121 | #define DISCRETE_BITSET(_N, _N1, _B) DISCRETE_TRANSFORM3(_N, 1, _N1, 1 << ((_B)-1), 0, "01&2>") | |
| 122 | #define DISCRETE_ENERGY_NAND(_N, _E, _N1, _N2) DISCRETE_TRANSFORM3(_N, _E, _N1, _N2, 1, "201*-") | |
| 125 | #define DISCRETE_BITSET(_N, _N1, _B) DISCRETE_TRANSFORM3(_N, _N1, 1 << ((_B)-1), 0, "01&2>") | |
| 126 | #define DISCRETE_ENERGY_NAND(_N, _E, _N1, _N2) DISCRETE_TRANSFORM3(_N, _N1, _N2, 1, "201*-") | |
| 123 | 127 | |
| 124 | 128 | |
| 125 | 129 | static const discrete_mixer_desc mario_mixer_desc = |
| r3171 | r3172 | |
| 188 | 192 | DISCRETE_BITSET(NODE_104, NODE_100, 12) //LS157 3B |
| 189 | 193 | |
| 190 | 194 | DISCRETE_LS123(NODE_110, DS_SOUND7_INV, MR_R61, MR_C41) |
| 191 | DISCRETE_TRANSFORM2(NODE_111, | |
| 195 | DISCRETE_TRANSFORM2(NODE_111, | |
| 192 | 196 | DISCRETE_RCFILTER(NODE_112, 1, NODE_111, MR_R65, MR_C44) |
| 193 | 197 | DISCRETE_74LS624(NODE_113, 1, NODE_112, VSS, MR_C40, DISC_LS624_OUT_LOGIC) |
| 194 | 198 | |
| 195 | 199 | DISCRETE_LOGIC_XOR(NODE_115, 1, NODE_102, NODE_113) |
| 196 | 200 | |
| 197 | DISCRETE_TRANSFORM2(NODE_116, | |
| 201 | DISCRETE_TRANSFORM2(NODE_116, | |
| 198 | 202 | DISCRETE_RCFILTER(NODE_117, 1, NODE_116, MR_R64, MR_C43) |
| 199 | 203 | DISCRETE_74LS624(NODE_118, 1, NODE_117, VSS, MR_C39, DISC_LS624_OUT_COUNT_F) |
| 200 | 204 | |
| r3171 | r3172 | |
| 230 | 234 | |
| 231 | 235 | /**************************************************************** |
| 232 | 236 | * |
| 237 | * EA / Banking | |
| 238 | * | |
| 239 | ****************************************************************/ | |
| 240 | ||
| 241 | static void set_ea(running_machine *machine, int ea) | |
| 242 | { | |
| 243 | //printf("ea: %d\n", ea); | |
| 244 | cputag_set_input_line(machine, "audio", MCS48_INPUT_EA, (ea) ? ASSERT_LINE : CLEAR_LINE); | |
| 245 | //memory_set_bank(MCS48_INTERNAL_ROMBANK, ea); | |
| 246 | } | |
| 247 | ||
| 248 | /**************************************************************** | |
| 249 | * | |
| 233 | 250 | * Initialization |
| 234 | 251 | * |
| 235 | 252 | ****************************************************************/ |
| r3171 | r3172 | |
| 240 | 257 | #if USE_8039 |
| 241 | 258 | UINT8 *SND = memory_region(machine, "audio"); |
| 242 | 259 | |
| 243 | SND[1] = 0x01; | |
| 260 | SND[0x1001] = 0x01; | |
| 244 | 261 | #endif |
| 245 | 262 | |
| 246 | state_save_register_global(state->last); | |
| 263 | memory_configure_bank(MCS48_INTERNAL_ROMBANK, 0, 1, memory_region(machine, "audio"), 0); | |
| 264 | memory_configure_bank(MCS48_INTERNAL_ROMBANK, 1, 1, memory_region(machine, "audio") + 0x1000, 0x800); | |
| 265 | ||
| 266 | state_save_register_global(state->last); | |
| 247 | 267 | state_save_register_global(state->portT); |
| 248 | 268 | } |
| 249 | 269 | |
| r3171 | r3172 | |
| 251 | 271 | { |
| 252 | 272 | mario_state *state = machine->driver_data; |
| 253 | 273 | |
| 274 | #if USE_8039 | |
| 275 | set_ea(machine, 1); | |
| 276 | #endif | |
| 277 | ||
| 254 | 278 | soundlatch_clear_w(machine,0,0); |
| 255 | 279 | soundlatch2_clear_w(machine,0,0); |
| 256 | 280 | soundlatch3_clear_w(machine,0,0); |
| r3171 | r3172 | |
| 394 | 418 | *************************************/ |
| 395 | 419 | |
| 396 | 420 | static ADDRESS_MAP_START( mario_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 397 | AM_RANGE(0x0000, 0x0fff) AM_ROM | |
| 421 | #if USE_8039 | |
| 422 | AM_RANGE(0x0000, 0x07ff) AM_ROMBANK(MCS48_INTERNAL_ROMBANK) | |
| 423 | #endif | |
| 424 | AM_RANGE(0x0800, 0x0fff) AM_ROM | |
| 398 | 425 | ADDRESS_MAP_END |
| 399 | 426 | |
| 400 | 427 | static ADDRESS_MAP_START( mario_sound_io_map, ADDRESS_SPACE_IO, 8 ) |
| r3171 | r3172 | |
|---|---|---|
| 108 | 108 | DISCRETE_555_ASTABLE(NODE_30, ATARIFB_WHISTLE_EN, |
| 109 | 109 | RES_K(2.2), RES_K(2.2), CAP_U(0.1), // r34, r33, c44 |
| 110 | 110 | &atarifbWhistl555) |
| 111 | DISCRETE_TRANSFORM3(ATARIFB_WHISTLE_SND, | |
| 111 | DISCRETE_TRANSFORM3(ATARIFB_WHISTLE_SND, | |
| 112 | 112 | |
| 113 | 113 | /************************************************/ |
| 114 | 114 | /* Mixing stage - A9 */ |
| r3171 | r3172 | |
| 198 | 198 | DISCRETE_555_ASTABLE(NODE_30, ATARIFB_WHISTLE_EN, |
| 199 | 199 | RES_K(2.2), RES_K(2.2), CAP_U(0.1), // r34, r33, c44 |
| 200 | 200 | &atarifbWhistl555) |
| 201 | DISCRETE_TRANSFORM3(ABASEB_WHISTLE_SND, | |
| 201 | DISCRETE_TRANSFORM3(ABASEB_WHISTLE_SND, | |
| 202 | 202 | |
| 203 | 203 | /************************************************/ |
| 204 | 204 | /* Mixing stage - A9 */ |
| r3171 | r3172 | |
|---|---|---|
| 116 | 116 | /* Explode filters the crash sound. */ |
| 117 | 117 | /* I'm not sure of the exact filter freq. */ |
| 118 | 118 | /************************************************/ |
| 119 | DISCRETE_TRANSFORM3(NODE_30, | |
| 119 | DISCRETE_TRANSFORM3(NODE_30, | |
| 120 | 120 | DISCRETE_FILTER2(SUBS_EXPLODE_SND, SUBS_EXPLODE_EN, NODE_30, 100.0, (1.0 / 7.6), DISC_FILTER_BANDPASS) |
| 121 | 121 | |
| 122 | 122 | /************************************************/ |
| r3171 | r3172 | |
|---|---|---|
| 230 | 230 | DISCRETE_NOTE(NODE_20, 1, INDIANBT_MUSIC_CLK, INDIANBT_MUSIC_DATA, 255, 5, DISC_CLK_IS_FREQ) |
| 231 | 231 | |
| 232 | 232 | // Convert count to 7492 output |
| 233 | DISCRETE_TRANSFORM2(NODE_21, | |
| 233 | DISCRETE_TRANSFORM2(NODE_21, | |
| 234 | 234 | |
| 235 | 235 | DISCRETE_DAC_R1(NODE_22, 1, NODE_21, DEFAULT_TTL_V_LOGIC_1, &indianbt_music_dac) |
| 236 | 236 | |
| r3171 | r3172 | |
| 473 | 473 | ******************************************************************************/ |
| 474 | 474 | DISCRETE_SQUAREWFIX(NODE_40, 1, 60.0/16, 1, 50, 1.0/2, 0) // IC 5L, pin 6 |
| 475 | 475 | DISCRETE_COUNTER(NODE_41, 1, 0, NODE_40, 31, 1, 0, DISC_CLK_ON_F_EDGE) // IC 5L & 5F |
| 476 | DISCRETE_TRANSFORM2(NODE_42, 1, NODE_41, 4, "01&") // IC 5L, pin 9 | |
| 477 | DISCRETE_TRANSFORM2(NODE_43, 1, NODE_41, 16, "01&!") // IC 5F, pin 8 | |
| 476 | DISCRETE_TRANSFORM2(NODE_42, NODE_41, 4, "01&") // IC 5L, pin 9 | |
| 477 | DISCRETE_TRANSFORM2(NODE_43, NODE_41, 16, "01&!") // IC 5F, pin 8 | |
| 478 | 478 | DISCRETE_ONESHOT(NODE_44, NODE_43, 1, 0.0015, DISC_ONESHOT_REDGE | DISC_ONESHOT_NORETRIG | DISC_OUT_ACTIVE_HIGH) |
| 479 | 479 | |
| 480 | 480 | DISCRETE_LOGIC_OR(NODE_45, 1, NODE_42, POLARIS_SX3_EN) |
| r3171 | r3172 | |
|---|---|---|
| 59 | 59 | DISCRETE_INPUT_LOGIC(MIDWAY_TONE_EN) \ |
| 60 | 60 | DISCRETE_INPUT_DATA (MIDWAY_TONE_DATA_L) \ |
| 61 | 61 | DISCRETE_INPUT_DATA (MIDWAY_TONE_DATA_H) \ |
| 62 | DISCRETE_TRANSFORM4(MIDWAY_TONE_TRASFORM_OUT, | |
| 62 | DISCRETE_TRANSFORM4(MIDWAY_TONE_TRASFORM_OUT, | |
| 63 | 63 | DISCRETE_NOTE(MIDWAY_TONE_BEFORE_AMP_SND, 1, (double)MW8080BW_MASTER_CLOCK/10/2, MIDWAY_TONE_TRASFORM_OUT, 0xfff, 1, DISC_CLK_IS_FREQ) \ |
| 64 | 64 | DISCRETE_OP_AMP_TRIG_VCA(MIDWAY_TONE_SND, MIDWAY_TONE_BEFORE_AMP_SND, MIDWAY_TONE_EN, 0, 12, 0, &discrete_op_amp_tvca_info) |
| 65 | 65 |
| r3171 | r3172 | |
|---|---|---|
| 936 | 936 | |
| 937 | 937 | READ8_HANDLER( mcr_ipu_pio_0_r ) |
| 938 | 938 | { |
| 939 | return (offset & 2) ? z80pio_c_r(0, offset & 1) : z80pio_d_r(0, offset & 1); | |
| 939 | return (offset & 2) ? z80pio_c_r(0, offset & 1) : z80pio_d_r(machine, 0, offset & 1); | |
| 940 | 940 | } |
| 941 | 941 | |
| 942 | 942 | |
| 943 | 943 | READ8_HANDLER( mcr_ipu_pio_1_r ) |
| 944 | 944 | { |
| 945 | return (offset & 2) ? z80pio_c_r(1, offset & 1) : z80pio_d_r(1, offset & 1); | |
| 945 | return (offset & 2) ? z80pio_c_r(1, offset & 1) : z80pio_d_r(machine, 1, offset & 1); | |
| 946 | 946 | } |
| 947 | 947 | |
| 948 | 948 | |
| 949 | 949 | READ8_HANDLER( mcr_ipu_sio_r ) |
| 950 | 950 | { |
| 951 | return (offset & 2) ? z80sio_c_r(0, offset & 1) : z80sio_d_r(0, offset & 1); | |
| 951 | return (offset & 2) ? z80sio_c_r(0, offset & 1) : z80sio_d_r(machine, 0, offset & 1); | |
| 952 | 952 | } |
| 953 | 953 | |
| 954 | 954 | |
| 955 | 955 | WRITE8_HANDLER( mcr_ipu_pio_0_w ) |
| 956 | 956 | { |
| 957 | 957 | if (offset & 2) |
| 958 | z80pio_c_w(0, offset & 1, data); | |
| 958 | z80pio_c_w(machine, 0, offset & 1, data); | |
| 959 | 959 | else |
| 960 | z80pio_d_w(0, offset & 1, data); | |
| 960 | z80pio_d_w(machine, 0, offset & 1, data); | |
| 961 | 961 | } |
| 962 | 962 | |
| 963 | 963 | |
| 964 | 964 | WRITE8_HANDLER( mcr_ipu_pio_1_w ) |
| 965 | 965 | { |
| 966 | 966 | if (offset & 2) |
| 967 | z80pio_c_w(1, offset & 1, data); | |
| 967 | z80pio_c_w(machine, 1, offset & 1, data); | |
| 968 | 968 | else |
| 969 | z80pio_d_w(1, offset & 1, data); | |
| 969 | z80pio_d_w(machine, 1, offset & 1, data); | |
| 970 | 970 | } |
| 971 | 971 | |
| 972 | 972 | |
| 973 | 973 | WRITE8_HANDLER( mcr_ipu_sio_w ) |
| 974 | 974 | { |
| 975 | 975 | if (offset & 2) |
| 976 | z80sio_c_w(0, offset & 1, data); | |
| 976 | z80sio_c_w(machine, 0, offset & 1, data); | |
| 977 | 977 | else |
| 978 | z80sio_d_w(0, offset & 1, data); | |
| 978 | z80sio_d_w(machine, 0, offset & 1, data); | |
| 979 | 979 | } |
| 980 | 980 | |
| 981 | 981 |
| r3171 | r3172 | |
|---|---|---|
| 4085 | 4085 | |
| 4086 | 4086 | /* Atomiswave (Dreamcast-based) games */ |
| 4087 | 4087 | DRIVER( awbios ) |
| 4088 | DRIVER( fotns ) | |
| 4089 | DRIVER( demofist ) | |
| 4088 | 4090 | |
| 4089 | 4091 | /* Hikaru */ |
| 4090 | 4092 | DRIVER( hikaru ) /* BIOS (c)2000 */ |
| r3171 | r3172 | |
| 5461 | 5463 | DRIVER( vangrd2 ) /* A2005 (c) 1984 */ |
| 5462 | 5464 | DRIVER( mainsnk ) /* fill in */ |
| 5463 | 5465 | DRIVER( canvas ) /* (c) 1985 */ |
| 5464 | DRIVER( jcross ) /* | |
| 5466 | DRIVER( jcross ) /* A3006 (c) 1984 */ | |
| 5465 | 5467 | DRIVER( sgladiat ) /* A3006 (c) 1984 */ |
| 5466 | 5468 | DRIVER( hal21 ) /* A4031 (c) 1985 */ |
| 5467 | 5469 | DRIVER( hal21j ) /* (c) 1985 (Japan) */ |
| r3171 | r3172 | |
| 5476 | 5478 | DRIVER( countryc ) /* A7004 'CC' (c) 1988 */ |
| 5477 | 5479 | DRIVER( ikari ) /* A5004 'IW' (c) 1986 */ |
| 5478 | 5480 | DRIVER( ikaria ) /* A5004 'IW' (c) 1986 */ |
| 5481 | DRIVER( ikarinc ) /* A5004 'IW' (c) 1986 */ | |
| 5479 | 5482 | DRIVER( ikarijp ) /* A5004 'IW' (c) 1986 (Japan) */ |
| 5480 | 5483 | DRIVER( ikarijpb ) /* bootleg */ |
| 5481 | 5484 | DRIVER( victroad ) /* A6002 (c) 1986 */ |
| r3171 | r3172 | |
| 5879 | 5882 | DRIVER( ddragnba ) /* bootleg */ |
| 5880 | 5883 | DRIVER( ddgn6809 ) /* bootleg */ |
| 5881 | 5884 | DRIVER( dd6809a ) /* bootleg */ |
| 5885 | DRIVER( ddragob2 ) /* bootleg */ | |
| 5882 | 5886 | DRIVER( spdodgeb ) /* TA-0022 (c) 1987 */ |
| 5883 | 5887 | DRIVER( nkdodge ) /* TA-0022 (c) 1987 (Japan) */ |
| 5884 | 5888 | DRIVER( nkdodgeb ) /* TA-0022 (c) 1987 (Japan) */ |
| r3171 | r3172 | |
| 6310 | 6314 | DRIVER( raiden2e ) /* (c) 1993 Seibu Kaihatsu */ |
| 6311 | 6315 | DRIVER( raiden2f ) /* (c) 1993 Seibu Kaihatsu */ |
| 6312 | 6316 | DRIVER( raidndx ) /* (c) 1993 Seibu Kaihatsu */ |
| 6313 | DRIVER( raidndxa ) /* (c) 1993 Seibu Kaihatsu */ | |
| 6314 | 6317 | DRIVER( raidndxj ) /* (c) 1993 Seibu Kaihatsu */ |
| 6315 | 6318 | DRIVER( raidndxm ) /* (c) 1993 Seibu Kaihatsu + Metrotainment license */ |
| 6319 | DRIVER( raidndxt ) /* (c) 1993 Seibu Kaihatsu + Tuning license*/ | |
| 6316 | 6320 | DRIVER( zeroteam ) /* (c) 1993 Seibu Kaihatsu */ |
| 6317 | 6321 | DRIVER( zeroteaa ) /* (c) 1993 Seibu Kaihatsu */ |
| 6318 | 6322 | DRIVER( zeroteab ) /* (c) 1993 Seibu Kaihatsu */ |
| r3171 | r3172 | |
| 7805 | 7809 | DRIVER( lethalj ) /* (c) 1996 The Game Room */ |
| 7806 | 7810 | DRIVER( eggventr ) /* (c) 1997 The Game Room */ |
| 7807 | 7811 | DRIVER( eggvent7 ) /* (c) 1997 The Game Room */ |
| 7812 | DRIVER( eggventa ) /* (c) 1997 The Game Room (Allied Leisure license) */ | |
| 7808 | 7813 | DRIVER( eggvntdx ) /* (c) 1997 The Game Room */ |
| 7809 | 7814 | DRIVER( ripribit ) /* (c) 1997 LAI Games */ |
| 7810 | 7815 | DRIVER( cfarm ) /* (c) 1999 LAI Games */ |
| r3171 | r3172 | |
| 8038 | 8043 | DRIVER( hotslot ) /* (c) 1996 ABM Electronics */ |
| 8039 | 8044 | DRIVER( mcolors ) /* 1999 unknown */ |
| 8040 | 8045 | DRIVER( galaxi ) /* (c) 2000 BRL S.R.L. Bologna */ |
| 8046 | DRIVER( magjoker ) /* (c) 2000 BRL S.R.L. Bologna */ | |
| 8041 | 8047 | DRIVER( dwarfd ) /* (c) 198? Electro-Sports */ |
| 8042 | 8048 | DRIVER( trvquest ) /* (c) 1984 Sunn / Techstar */ |
| 8043 | 8049 | DRIVER( wheelfir ) /* (c) 199? TCH */ |
| r3171 | r3172 | |
| 8132 | 8138 | DRIVER( tetriunk ) |
| 8133 | 8139 | DRIVER( smstrv ) /* (c) 1984 SMS MFG CORP */ |
| 8134 | 8140 | DRIVER( skylncr ) /* (c) 1995 Bordun International */ |
| 8141 | DRIVER( madzoo ) /* (c) 1995 Bordun International */ | |
| 8135 | 8142 | DRIVER( livequiz ) /* (c) 1999 Andamiro */ |
| 8136 | 8143 | DRIVER( cowrace ) /* (c) 19?? unknown */ |
| 8137 | 8144 | DRIVER( mjsiyoub ) /* (c) 1986 Visco */ |
| r3171 | r3172 | |
| 8191 | 8198 | DRIVER( lucky74 ) /* (c) 1988 Wing Co., Ltd */ |
| 8192 | 8199 | DRIVER( lucky74a ) /* (c) 1988 Wing Co., Ltd */ |
| 8193 | 8200 | |
| 8201 | /* InterFlip */ | |
| 8202 | DRIVER( videopkr ) /* (c) 1984 InterFlip */ | |
| 8203 | DRIVER( blckjack ) /* (c) 1984 InterFlip */ | |
| 8204 | DRIVER( videodad ) /* (c) 1987 InterFlip */ | |
| 8205 | DRIVER( videocba ) /* (c) 1987 InterFlip */ | |
| 8206 | ||
| 8194 | 8207 | /* H8/3048 italian gambling games */ |
| 8195 | 8208 | DRIVER( laperla ) /* (c) 2002 Nazionale Elettronica */ |
| 8196 | 8209 | DRIVER( laperlag ) /* (c) 2001 Nazionale Elettronica */ |
| r3171 | r3172 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | #define I8035_CLOCK (XTAL_6MHz) |
| 43 | 43 | |
| 44 | /**************************************************************************** | |
| 45 | * CONSTANTS | |
| 46 | ****************************************************************************/ | |
| 47 | ||
| 44 | 48 | #define HARDWARE_TYPE_TAG "HARDWARE_TYPE" |
| 45 | #define HARDWARE_TKG04 0 | |
| 46 | #define HARDWARE_TRS01 1 | |
| 47 | #define HARDWARE_TRS02 2 | |
| 48 | #define HARDWARE_TKG02 3 | |
| 49 | 49 | |
| 50 | enum | |
| 51 | { | |
| 52 | HARDWARE_TKG04 = 0, | |
| 53 | HARDWARE_TRS01, | |
| 54 | HARDWARE_TRS02, | |
| 55 | HARDWARE_TKG02 | |
| 56 | }; | |
| 57 | ||
| 58 | enum | |
| 59 | { | |
| 60 | DK2650_HERBIEDK = 0, | |
| 61 | DK2650_HUNCHBKD, | |
| 62 | DK2650_EIGHTACT, | |
| 63 | DK2650_SHOOTGAL, | |
| 64 | DK2650_SPCLFORC | |
| 65 | }; | |
| 66 | ||
| 50 | 67 | #define DK2B_PALETTE_LENGTH (256+256+8+1) /* (256) */ |
| 51 | 68 | #define DK4B_PALETTE_LENGTH (256+256+8+1) /* (256) */ |
| 52 | 69 | #define DK3_PALETTE_LENGTH (256+256+8+1) /* (256) */ |
| r3171 | r3172 | |
| 84 | 101 | |
| 85 | 102 | /* Specific states */ |
| 86 | 103 | INT8 decrypt_counter; |
| 104 | ||
| 105 | /* 2650 protection */ | |
| 106 | UINT8 protect_type; | |
| 87 | 107 | UINT8 hunchloopback; |
| 88 | 108 | |
| 89 | 109 | /* Save state relevant */ |
| r3171 | r3172 | |
|---|---|---|
| 19 | 19 | |
| 20 | 20 | extern PALETTE_INIT( tnk3 ); |
| 21 | 21 | |
| 22 | extern VIDEO_START( marvins ); | |
| 23 | extern VIDEO_START( madcrash ); | |
| 22 | 24 | extern VIDEO_START( jcross ); |
| 23 | 25 | extern VIDEO_START( sgladiat ); |
| 26 | extern VIDEO_START( hal21 ); | |
| 27 | extern VIDEO_START( aso ); | |
| 24 | 28 | extern VIDEO_START( tnk3 ); |
| 25 | extern VIDEO_START( aso ); | |
| 26 | 29 | extern VIDEO_START( ikari ); |
| 27 | 30 | extern VIDEO_START( gwar ); |
| 28 | 31 | extern VIDEO_START( tdfever ); |
| 29 | 32 | |
| 33 | extern VIDEO_UPDATE( marvins ); | |
| 30 | 34 | extern VIDEO_UPDATE( tnk3 ); |
| 31 | 35 | extern VIDEO_UPDATE( ikari ); |
| 32 | 36 | extern VIDEO_UPDATE( gwar ); |
| 33 | 37 | extern VIDEO_UPDATE( tdfever ); |
| 34 | 38 | |
| 39 | extern WRITE8_HANDLER( snk_fg_scrollx_w ); | |
| 40 | extern WRITE8_HANDLER( snk_fg_scrolly_w ); | |
| 35 | 41 | extern WRITE8_HANDLER( snk_bg_scrollx_w ); |
| 36 | 42 | extern WRITE8_HANDLER( snk_bg_scrolly_w ); |
| 37 | 43 | extern WRITE8_HANDLER( snk_sp16_scrollx_w ); |
| r3171 | r3172 | |
| 39 | 45 | extern WRITE8_HANDLER( snk_sp32_scrollx_w ); |
| 40 | 46 | extern WRITE8_HANDLER( snk_sp32_scrolly_w ); |
| 41 | 47 | |
| 48 | extern WRITE8_HANDLER( snk_sprite_split_point_w ); | |
| 49 | extern WRITE8_HANDLER( marvins_palette_bank_w ); | |
| 50 | extern WRITE8_HANDLER( marvins_scroll_msb_w ); | |
| 42 | 51 | extern WRITE8_HANDLER( jcross_scroll_msb_w ); |
| 43 | 52 | extern WRITE8_HANDLER( sgladiat_scroll_msb_w ); |
| 53 | extern WRITE8_HANDLER( marvins_flipscreen_w ); | |
| 44 | 54 | extern WRITE8_HANDLER( sgladiat_flipscreen_w ); |
| 55 | extern WRITE8_HANDLER( hal21_flipscreen_w ); | |
| 45 | 56 | extern WRITE8_HANDLER( tnk3_videoattrs_w ); |
| 46 | 57 | extern WRITE8_HANDLER( aso_videoattrs_w ); |
| 47 | 58 | extern WRITE8_HANDLER( aso_bg_bank_w ); |
| 48 | 59 | extern WRITE8_HANDLER( ikari_bg_scroll_msb_w ); |
| 49 | 60 | extern WRITE8_HANDLER( ikari_sp_scroll_msb_w ); |
| 50 | 61 | extern WRITE8_HANDLER( ikari_unknown_video_w ); |
| 51 | extern WRITE8_HANDLER( gwar_ | |
| 62 | extern WRITE8_HANDLER( gwar_tx_bank_w ); | |
| 52 | 63 | extern WRITE8_HANDLER( gwar_videoattrs_w ); |
| 53 | extern WRITE8_HANDLER( gwar_sprite_split_point_w ); | |
| 54 | 64 | extern WRITE8_HANDLER( gwara_videoattrs_w ); |
| 55 | 65 | extern WRITE8_HANDLER( gwara_sp_scroll_msb_w ); |
| 56 | 66 | extern WRITE8_HANDLER( tdfever_sp_scroll_msb_w ); |
| 57 | 67 | extern WRITE8_HANDLER( tdfever_spriteram_w ); |
| 58 | 68 | |
| 69 | extern UINT8 *snk_tx_videoram; | |
| 59 | 70 | extern UINT8 *snk_fg_videoram; |
| 60 | 71 | extern UINT8 *snk_bg_videoram; |
| 61 | extern WRITE8_HANDLER( snk_ | |
| 72 | extern WRITE8_HANDLER( snk_tx_videoram_w ); | |
| 62 | 73 | extern WRITE8_HANDLER( snk_bg_videoram_w ); |
| 63 | extern WRITE8_HANDLER( aso_bg_videoram_w ); | |
| 74 | extern WRITE8_HANDLER( marvins_fg_videoram_w ); | |
| 75 | extern WRITE8_HANDLER( marvins_bg_videoram_w ); | |
| 64 | 76 | |
| 65 | 77 | /*----------- defined in drivers/hal21.c -----------*/ |
| 66 | 78 |
| r3171 | r3172 | |
|---|---|---|
| 264 | 264 | SOUNDS += NAMCO_52XX |
| 265 | 265 | SOUNDS += NAMCO_63701X |
| 266 | 266 | SOUNDS += NAMCONA |
| 267 | SOUNDS += SNKWAVE | |
| 267 | 268 | SOUNDS += C140 |
| 268 | 269 | SOUNDS += C352 |
| 269 | 270 | SOUNDS += TMS36XX |
| r3171 | r3172 | |
| 1263 | 1264 | $(MAMEOBJ)/snk.a: \ |
| 1264 | 1265 | $(DRIVERS)/bbusters.o $(VIDEO)/bbusters.o \ |
| 1265 | 1266 | $(DRIVERS)/dmndrby.o \ |
| 1266 | $(DRIVERS)/hal21.o \ | |
| 1267 | 1267 | $(DRIVERS)/hng64.o $(VIDEO)/hng64.o \ |
| 1268 | 1268 | $(DRIVERS)/lasso.o $(VIDEO)/lasso.o \ |
| 1269 | 1269 | $(DRIVERS)/mainsnk.o $(VIDEO)/mainsnk.o \ |
| 1270 | $(DRIVERS)/marvins.o $(VIDEO)/marvins.o \ | |
| 1271 | 1270 | $(DRIVERS)/munchmo.o $(VIDEO)/munchmo.o \ |
| 1272 | 1271 | $(DRIVERS)/prehisle.o $(VIDEO)/prehisle.o \ |
| 1273 | 1272 | $(DRIVERS)/rockola.o $(AUDIO)/rockola.o $(VIDEO)/rockola.o \ |
| r3171 | r3172 | |
| 1655 | 1654 | $(DRIVERS)/usgames.o $(VIDEO)/usgames.o \ |
| 1656 | 1655 | $(DRIVERS)/vamphalf.o \ |
| 1657 | 1656 | $(DRIVERS)/vcombat.o \ |
| 1657 | $(DRIVERS)/videopkr.o \ | |
| 1658 | 1658 | $(DRIVERS)/vroulet.o \ |
| 1659 | 1659 | $(DRIVERS)/wldarrow.o \ |
| 1660 | 1660 | $(DRIVERS)/xyonix.o $(VIDEO)/xyonix.o \ |
| r3171 | r3172 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | *******************************************************************************/ |
| 24 | 24 | |
| 25 | UINT8 *snk_tx_videoram; | |
| 25 | 26 | UINT8 *snk_fg_videoram; |
| 26 | 27 | UINT8 *snk_bg_videoram; |
| 27 | 28 | |
| 29 | static tilemap *tx_tilemap; | |
| 28 | 30 | static tilemap *fg_tilemap; |
| 29 | 31 | static tilemap *bg_tilemap; |
| 30 | static int bg_scrollx, bg_scrolly, sp16_scrollx, sp16_scrolly, sp32_scrollx, sp32_scrolly; | |
| 32 | static int fg_scrollx, fg_scrolly, bg_scrollx, bg_scrolly; | |
| 33 | static int sp16_scrollx, sp16_scrolly, sp32_scrollx, sp32_scrolly; | |
| 31 | 34 | static UINT8 sprite_split_point; |
| 32 | 35 | static int num_sprites, yscroll_mask; |
| 33 | 36 | |
| r3171 | r3172 | |
| 40 | 43 | int i; |
| 41 | 44 | int num_colors = 0x400; |
| 42 | 45 | |
| 43 | /* | |
| 44 | palette format is RRRG GGBB B??? the three unknown bits are used but | |
| 45 | I'm not sure how, I'm currently using them as least significant bit. | |
| 46 | */ | |
| 47 | 46 | for( i=0; i<num_colors; i++ ) |
| 48 | 47 | { |
| 49 | 48 | int bit0=0,bit1,bit2,bit3,r,g,b; |
| 50 | 49 | |
| 51 | bit0 = (color_prom[i + 2*num_colors] >> | |
| 50 | bit0 = (color_prom[i + 2*num_colors] >> 3) & 0x01; | |
| 52 | 51 | bit1 = (color_prom[i] >> 1) & 0x01; |
| 53 | 52 | bit2 = (color_prom[i] >> 2) & 0x01; |
| 54 | 53 | bit3 = (color_prom[i] >> 3) & 0x01; |
| 55 | 54 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; |
| 56 | 55 | |
| 57 | bit0 = (color_prom[i + 2*num_colors] >> | |
| 56 | bit0 = (color_prom[i + 2*num_colors] >> 2) & 0x01; | |
| 58 | 57 | bit1 = (color_prom[i + num_colors] >> 2) & 0x01; |
| 59 | 58 | bit2 = (color_prom[i + num_colors] >> 3) & 0x01; |
| 60 | 59 | bit3 = (color_prom[i] >> 0) & 0x01; |
| 61 | 60 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; |
| 62 | 61 | |
| 63 | 62 | bit0 = (color_prom[i + 2*num_colors] >> 0) & 0x01; |
| 64 | bit1 = (color_prom[i + 2*num_colors] >> | |
| 63 | bit1 = (color_prom[i + 2*num_colors] >> 1) & 0x01; | |
| 65 | 64 | bit2 = (color_prom[i + num_colors] >> 0) & 0x01; |
| 66 | 65 | bit3 = (color_prom[i + num_colors] >> 1) & 0x01; |
| 67 | 66 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; |
| r3171 | r3172 | |
| 72 | 71 | |
| 73 | 72 | /**************************************************************************************/ |
| 74 | 73 | |
| 75 | static TILEMAP_MAPPER( | |
| 74 | static TILEMAP_MAPPER( marvins | |
| 76 | 75 | { |
| 77 | 76 | // tilemap is 36x28, the central part is from the first RAM page and the |
| 78 | 77 | // extra 4 columns are from the second page |
| r3171 | r3172 | |
| 83 | 82 | return row + (col << 5); |
| 84 | 83 | } |
| 85 | 84 | |
| 86 | static TILE_GET_INFO( | |
| 85 | static TILE_GET_INFO( marvins | |
| 87 | 86 | { |
| 88 | int code = snk_ | |
| 87 | int code = snk_tx_videoram[tile_index]; | |
| 89 | 88 | int color = code >> 5; |
| 90 | 89 | SET_TILE_INFO(0, |
| 91 | 90 | code, |
| r3171 | r3172 | |
| 93 | 92 | tile_index & 0x400 ? TILE_FORCE_LAYER0 : 0); |
| 94 | 93 | } |
| 95 | 94 | |
| 96 | static TILE_GET_INFO( ikari_get_ | |
| 95 | static TILE_GET_INFO( ikari_get_tx_tile_info ) | |
| 97 | 96 | { |
| 98 | int code = snk_ | |
| 97 | int code = snk_tx_videoram[tile_index]; | |
| 99 | 98 | SET_TILE_INFO(0, |
| 100 | 99 | code, |
| 101 | 100 | 0, |
| 102 | 101 | tile_index & 0x400 ? TILE_FORCE_LAYER0 : 0); |
| 103 | 102 | } |
| 104 | 103 | |
| 105 | static TILE_GET_INFO( gwar_get_ | |
| 104 | static TILE_GET_INFO( gwar_get_tx_tile_info ) | |
| 106 | 105 | { |
| 107 | int code = snk_ | |
| 106 | int code = snk_tx_videoram[tile_index]; | |
| 108 | 107 | SET_TILE_INFO(0, |
| 109 | 108 | code, |
| 110 | 109 | 0, |
| r3171 | r3172 | |
| 112 | 111 | } |
| 113 | 112 | |
| 114 | 113 | |
| 114 | static TILE_GET_INFO( marvins_get_fg_tile_info ) | |
| 115 | { | |
| 116 | int code = snk_fg_videoram[tile_index]; | |
| 117 | SET_TILE_INFO(1, | |
| 118 | code, | |
| 119 | 0, | |
| 120 | 0); | |
| 121 | } | |
| 122 | ||
| 123 | static TILE_GET_INFO( marvins_get_bg_tile_info ) | |
| 124 | { | |
| 125 | int code = snk_bg_videoram[tile_index]; | |
| 126 | SET_TILE_INFO(2, | |
| 127 | code, | |
| 128 | 0, | |
| 129 | 0); | |
| 130 | } | |
| 131 | ||
| 132 | ||
| 115 | 133 | static TILE_GET_INFO( aso_get_bg_tile_info ) |
| 116 | 134 | { |
| 117 | 135 | int code = snk_bg_videoram[tile_index]; |
| r3171 | r3172 | |
| 200 | 218 | } |
| 201 | 219 | |
| 202 | 220 | |
| 221 | VIDEO_START( marvins ) | |
| 222 | { | |
| 223 | VIDEO_START_CALL(snk_3bpp_shadow); | |
| 224 | ||
| 225 | tx_tilemap = tilemap_create(marvins_get_tx_tile_info, marvins_tx_scan_cols, 8, 8, 36, 28); | |
| 226 | fg_tilemap = tilemap_create(marvins_get_fg_tile_info, tilemap_scan_cols, 8, 8, 64, 32); | |
| 227 | bg_tilemap = tilemap_create(marvins_get_bg_tile_info, tilemap_scan_cols, 8, 8, 64, 32); | |
| 228 | ||
| 229 | tilemap_set_transparent_pen(tx_tilemap,15); | |
| 230 | tilemap_set_scrolldy(tx_tilemap, 8, 8); | |
| 231 | ||
| 232 | tilemap_set_transparent_pen(fg_tilemap,15); | |
| 233 | tilemap_set_scrolldx(fg_tilemap, 15, 31); | |
| 234 | tilemap_set_scrolldy(fg_tilemap, 8, -32); | |
| 235 | ||
| 236 | tilemap_set_scrolldx(bg_tilemap, 15, 31); | |
| 237 | tilemap_set_scrolldy(bg_tilemap, 8, -32); | |
| 238 | } | |
| 239 | ||
| 203 | 240 | VIDEO_START( jcross ) |
| 204 | 241 | { |
| 205 | 242 | VIDEO_START_CALL(snk_3bpp_shadow); |
| 206 | 243 | |
| 207 | fg_tilemap = tilemap_create(tnk3_get_fg_tile_info, tnk3_fg_scan_cols, 8, 8, 36, 28); | |
| 208 | bg_tilemap = tilemap_create(aso_get_bg_tile_info, tilemap_scan_cols, 8, 8, 64, 64); | |
| 244 | tx_tilemap = tilemap_create(marvins_get_tx_tile_info, marvins_tx_scan_cols, 8, 8, 36, 28); | |
| 245 | bg_tilemap = tilemap_create(aso_get_bg_tile_info, tilemap_scan_cols, 8, 8, 64, 64); | |
| 209 | 246 | |
| 210 | tilemap_set_transparent_pen(fg_tilemap, 15); | |
| 211 | tilemap_set_scrolldy(fg_tilemap, 8, 8); | |
| 247 | tilemap_set_transparent_pen(tx_tilemap, 15); | |
| 248 | tilemap_set_scrolldy(tx_tilemap, 8, 8); | |
| 212 | 249 | |
| 213 | 250 | tilemap_set_scrolldx(bg_tilemap, 15, 24); |
| 214 | 251 | tilemap_set_scrolldy(bg_tilemap, 8, -32); |
| r3171 | r3172 | |
| 221 | 258 | { |
| 222 | 259 | VIDEO_START_CALL(snk_3bpp_shadow); |
| 223 | 260 | |
| 224 | fg_tilemap = tilemap_create(tnk3_get_fg_tile_info, tnk3_fg_scan_cols, 8, 8, 36, 28); | |
| 225 | bg_tilemap = tilemap_create(aso_get_bg_tile_info, tilemap_scan_cols, 8, 8, 64, 32); | |
| 261 | tx_tilemap = tilemap_create(marvins_get_tx_tile_info, marvins_tx_scan_cols, 8, 8, 36, 28); | |
| 262 | bg_tilemap = tilemap_create(aso_get_bg_tile_info, tilemap_scan_cols, 8, 8, 64, 32); | |
| 226 | 263 | |
| 227 | tilemap_set_transparent_pen(fg_tilemap, 15); | |
| 228 | tilemap_set_scrolldy(fg_tilemap, 8, 8); | |
| 264 | tilemap_set_transparent_pen(tx_tilemap, 15); | |
| 265 | tilemap_set_scrolldy(tx_tilemap, 8, 8); | |
| 229 | 266 | |
| 230 | 267 | tilemap_set_scrolldx(bg_tilemap, 15, 24); |
| 231 | 268 | tilemap_set_scrolldy(bg_tilemap, 8, -32); |
| r3171 | r3172 | |
| 234 | 271 | yscroll_mask = 0x0ff; |
| 235 | 272 | } |
| 236 | 273 | |
| 237 | VIDEO_START( a | |
| 274 | VIDEO_START( hal21 ) | |
| 238 | 275 | { |
| 239 | VIDEO_START_CALL(s | |
| 276 | VIDEO_START_CALL(jcros | |
| 240 | 277 | |
| 241 | fg_tilemap = tilemap_create(tnk3_get_fg_tile_info, tnk3_fg_scan_cols, 8, 8, 36, 28); | |
| 242 | bg_tilemap = tilemap_create(aso_get_bg_tile_info, tilemap_scan_cols, 8, 8, 64, 64); | |
| 278 | tilemap_set_scrolldy(bg_tilemap, 8, -32+256); | |
| 243 | 279 | |
| 244 | tilemap_set_transparent_pen(fg_tilemap, 15); | |
| 245 | tilemap_set_scrolldy(fg_tilemap, 8, 8); | |
| 280 | num_sprites = 50; | |
| 281 | yscroll_mask = 0x1ff; | |
| 282 | } | |
| 246 | 283 | |
| 284 | VIDEO_START( aso ) | |
| 285 | { | |
| 286 | VIDEO_START_CALL(jcross); | |
| 287 | ||
| 247 | 288 | tilemap_set_scrolldx(bg_tilemap, 15+256, 24+256); |
| 248 | tilemap_set_scrolldy(bg_tilemap, 8, -32); | |
| 249 | 289 | |
| 250 | 290 | num_sprites = 50; |
| 251 | 291 | yscroll_mask = 0x1ff; |
| 252 | 292 | } |
| 253 | 293 | |
| 294 | ||
| 254 | 295 | VIDEO_START( tnk3 ) |
| 255 | 296 | { |
| 256 | 297 | VIDEO_START_CALL(snk_3bpp_shadow); |
| 257 | 298 | |
| 258 | fg_tilemap = tilemap_create(tnk3_get_fg_tile_info, tnk3_fg_scan_cols, 8, 8, 36, 28); | |
| 259 | bg_tilemap = tilemap_create(tnk3_get_bg_tile_info, tilemap_scan_cols, 8, 8, 64, 64); | |
| 299 | tx_tilemap = tilemap_create(marvins_get_tx_tile_info, marvins_tx_scan_cols, 8, 8, 36, 28); | |
| 300 | bg_tilemap = tilemap_create(tnk3_get_bg_tile_info, tilemap_scan_cols, 8, 8, 64, 64); | |
| 260 | 301 | |
| 261 | tilemap_set_transparent_pen(fg_tilemap, 15); | |
| 262 | tilemap_set_scrolldy(fg_tilemap, 8, 8); | |
| 302 | tilemap_set_transparent_pen(tx_tilemap, 15); | |
| 303 | tilemap_set_scrolldy(tx_tilemap, 8, 8); | |
| 263 | 304 | |
| 264 | 305 | tilemap_set_scrolldx(bg_tilemap, 15, 24); |
| 265 | 306 | tilemap_set_scrolldy(bg_tilemap, 8, -32); |
| r3171 | r3172 | |
| 272 | 313 | { |
| 273 | 314 | VIDEO_START_CALL(snk_3bpp_shadow); |
| 274 | 315 | |
| 275 | fg_tilemap = tilemap_create(ikari_get_fg_tile_info, tnk3_fg_scan_cols, 8, 8, 36, 28); | |
| 276 | bg_tilemap = tilemap_create(ikari_get_bg_tile_info, tilemap_scan_cols, 16, 16, 32, 32); | |
| 316 | tx_tilemap = tilemap_create(ikari_get_tx_tile_info, marvins_tx_scan_cols, 8, 8, 36, 28); | |
| 317 | bg_tilemap = tilemap_create(ikari_get_bg_tile_info, tilemap_scan_cols, 16, 16, 32, 32); | |
| 277 | 318 | |
| 278 | tilemap_set_transparent_pen(fg_tilemap, 15); | |
| 279 | tilemap_set_scrolldy(fg_tilemap, 8, 8); | |
| 319 | tilemap_set_transparent_pen(tx_tilemap, 15); | |
| 320 | tilemap_set_scrolldy(tx_tilemap, 8, 8); | |
| 280 | 321 | |
| 281 | 322 | tilemap_set_scrolldx(bg_tilemap, 15, 24); |
| 282 | 323 | tilemap_set_scrolldy(bg_tilemap, 8, -32); |
| r3171 | r3172 | |
| 286 | 327 | { |
| 287 | 328 | memset(empty_tile,0xf,sizeof(empty_tile)); |
| 288 | 329 | |
| 289 | | |
| 330 | tx_tilemap = tilemap_create(gwar_get_tx_tile_info, tilemap_scan_cols, 8, 8, 50, 32); | |
| 290 | 331 | bg_tilemap = tilemap_create(gwar_get_bg_tile_info, tilemap_scan_cols, 16, 16, 32, 32); |
| 291 | 332 | |
| 292 | tilemap_set_transparent_pen( | |
| 333 | tilemap_set_transparent_pen(tx_tilemap, 15); | |
| 293 | 334 | |
| 294 | 335 | tilemap_set_scrolldx(bg_tilemap, 16, 143); |
| 295 | 336 | tilemap_set_scrolldy(bg_tilemap, 0, -32); |
| r3171 | r3172 | |
| 304 | 345 | |
| 305 | 346 | /**************************************************************************************/ |
| 306 | 347 | |
| 307 | WRITE8_HANDLER( snk_ | |
| 348 | WRITE8_HANDLER( snk_tx_videoram_w ) | |
| 308 | 349 | { |
| 350 | snk_tx_videoram[offset] = data; | |
| 351 | tilemap_mark_tile_dirty(tx_tilemap, offset); | |
| 352 | } | |
| 353 | ||
| 354 | WRITE8_HANDLER( marvins_fg_videoram_w ) | |
| 355 | { | |
| 309 | 356 | snk_fg_videoram[offset] = data; |
| 310 | 357 | tilemap_mark_tile_dirty(fg_tilemap, offset); |
| 311 | 358 | } |
| 312 | 359 | |
| 360 | WRITE8_HANDLER( marvins_bg_videoram_w ) | |
| 361 | { | |
| 362 | snk_bg_videoram[offset] = data; | |
| 363 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 364 | } | |
| 365 | ||
| 313 | 366 | WRITE8_HANDLER( snk_bg_videoram_w ) |
| 314 | 367 | { |
| 315 | 368 | snk_bg_videoram[offset] = data; |
| 316 | 369 | tilemap_mark_tile_dirty(bg_tilemap, offset >> 1); |
| 317 | 370 | } |
| 318 | 371 | |
| 319 | WRITE8_HANDLER( aso_bg_videoram_w ) | |
| 372 | ||
| 373 | WRITE8_HANDLER( snk_fg_scrollx_w ) | |
| 320 | 374 | { |
| 321 | snk_bg_videoram[offset] = data; | |
| 322 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 375 | fg_scrollx = (fg_scrollx & ~0xff) | data; | |
| 323 | 376 | } |
| 324 | 377 | |
| 378 | WRITE8_HANDLER( snk_fg_scrolly_w ) | |
| 379 | { | |
| 380 | fg_scrolly = (fg_scrolly & ~0xff) | data; | |
| 381 | } | |
| 382 | ||
| 325 | 383 | WRITE8_HANDLER( snk_bg_scrollx_w ) |
| 326 | 384 | { |
| 327 | 385 | bg_scrollx = (bg_scrollx & ~0xff) | data; |
| r3171 | r3172 | |
| 352 | 410 | sp32_scrolly = (sp32_scrolly & ~0xff) | data; |
| 353 | 411 | } |
| 354 | 412 | |
| 413 | WRITE8_HANDLER( snk_sprite_split_point_w ) | |
| 414 | { | |
| 415 | sprite_split_point = data; | |
| 416 | } | |
| 355 | 417 | |
| 418 | ||
| 419 | WRITE8_HANDLER( marvins_palette_bank_w ) | |
| 420 | { | |
| 421 | tilemap_set_palette_offset(bg_tilemap, data & 0x70); | |
| 422 | tilemap_set_palette_offset(fg_tilemap, (data & 0x07) << 4); | |
| 423 | } | |
| 424 | ||
| 425 | WRITE8_HANDLER( marvins_flipscreen_w ) | |
| 426 | { | |
| 427 | flip_screen_set(data & 0x80); | |
| 428 | ||
| 429 | // other bits unknown | |
| 430 | } | |
| 431 | ||
| 356 | 432 | WRITE8_HANDLER( sgladiat_flipscreen_w ) |
| 357 | 433 | { |
| 358 | 434 | flip_screen_set(data & 0x80); |
| r3171 | r3172 | |
| 362 | 438 | // other bits unknown |
| 363 | 439 | } |
| 364 | 440 | |
| 441 | WRITE8_HANDLER( hal21_flipscreen_w ) | |
| 442 | { | |
| 443 | flip_screen_set(data & 0x80); | |
| 444 | ||
| 445 | tilemap_set_palette_offset(bg_tilemap, ((data & 0xf) ^ 8) << 4); | |
| 446 | tilemap_set_pen_data_offset(bg_tilemap, ((data & 0x20) << 3) * machine->gfx[1]->char_modulo); | |
| 447 | ||
| 448 | // other bits unknown | |
| 449 | } | |
| 450 | ||
| 451 | WRITE8_HANDLER( marvins_scroll_msb_w ) | |
| 452 | { | |
| 453 | bg_scrollx = (bg_scrollx & 0xff) | ((data & 0x04) << 6); | |
| 454 | fg_scrollx = (fg_scrollx & 0xff) | ((data & 0x02) << 7); | |
| 455 | sp16_scrollx = (sp16_scrollx & 0xff) | ((data & 0x01) << 8); | |
| 456 | } | |
| 457 | ||
| 365 | 458 | WRITE8_HANDLER( jcross_scroll_msb_w ) |
| 366 | 459 | { |
| 367 | 460 | bg_scrolly = (bg_scrolly & 0xff) | ((data & 0x10) << 4); |
| r3171 | r3172 | |
| 414 | 507 | |
| 415 | 508 | flip_screen_set(data & 0x80); |
| 416 | 509 | |
| 417 | tilemap_set_pen_data_offset( | |
| 510 | tilemap_set_pen_data_offset(tx_tilemap, ((data & 0x40) << 2) * machine->gfx[0]->char_modulo); | |
| 418 | 511 | |
| 419 | 512 | bg_scrolly = (bg_scrolly & 0xff) | ((data & 0x10) << 4); |
| 420 | 513 | sp16_scrolly = (sp16_scrolly & 0xff) | ((data & 0x08) << 5); |
| r3171 | r3172 | |
| 455 | 548 | data != 0xaa) // victroad spurious during boot |
| 456 | 549 | popmessage("attrs %02x contact MAMEDEV", data); |
| 457 | 550 | |
| 458 | tilemap_set_palette_offset(fg_tilemap, (data & 0x01) << 4); | |
| 459 | tilemap_set_pen_data_offset(fg_tilemap, ((data & 0x10) << 4) * machine->gfx[0]->char_modulo); | |
| 551 | tilemap_set_palette_offset(tx_tilemap, (data & 0x01) << 4); | |
| 552 | tilemap_set_pen_data_offset(tx_tilemap, ((data & 0x10) << 4) * machine->gfx[0]->char_modulo); | |
| 460 | 553 | } |
| 461 | 554 | |
| 462 | WRITE8_HANDLER( gwar_ | |
| 555 | WRITE8_HANDLER( gwar_tx_bank_w ) | |
| 463 | 556 | { |
| 464 | tilemap_set_palette_offset(fg_tilemap, (data & 0xf) << 4); | |
| 465 | tilemap_set_pen_data_offset(fg_tilemap, ((data & 0x30) << 4) * machine->gfx[0]->char_modulo); | |
| 557 | tilemap_set_palette_offset(tx_tilemap, (data & 0xf) << 4); | |
| 558 | tilemap_set_pen_data_offset(tx_tilemap, ((data & 0x30) << 4) * machine->gfx[0]->char_modulo); | |
| 466 | 559 | } |
| 467 | 560 | |
| 468 | 561 | WRITE8_HANDLER( gwar_videoattrs_w ) |
| r3171 | r3172 | |
| 493 | 586 | sp16_scrolly = (sp16_scrolly & 0xff) | ((data & 0x04) << 6); |
| 494 | 587 | } |
| 495 | 588 | |
| 496 | WRITE8_HANDLER( gwar_sprite_split_point_w ) | |
| 497 | { | |
| 498 | sprite_split_point = data; | |
| 499 | } | |
| 500 | ||
| 501 | 589 | WRITE8_HANDLER( tdfever_sp_scroll_msb_w ) |
| 502 | 590 | { |
| 503 | 591 | sp32_scrolly = (sp32_scrolly & 0xff) | ((data & 0x80) << 1); |
| r3171 | r3172 | |
| 520 | 608 | |
| 521 | 609 | /**************************************************************************************/ |
| 522 | 610 | |
| 611 | static void marvins_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, | |
| 612 | const int scrollx, const int scrolly, const int from, const int to) | |
| 613 | { | |
| 614 | const gfx_element *gfx = machine->gfx[3]; | |
| 615 | const UINT8 *source, *finish; | |
| 616 | ||
| 617 | source = spriteram + from*4; | |
| 618 | finish = spriteram + to*4; | |
| 619 | ||
| 620 | while( source<finish ) | |
| 621 | { | |
| 622 | int attributes = source[3]; /* Y?F? CCCC */ | |
| 623 | int tile_number = source[1]; | |
| 624 | int sx = scrollx + 301 - 15 - source[2] + ((attributes&0x80)?256:0); | |
| 625 | int sy = -scrolly - 8 + source[0]; | |
| 626 | int color = attributes&0xf; | |
| 627 | int flipy = (attributes&0x20); | |
| 628 | int flipx = 0; | |
| 629 | ||
| 630 | if (flip_screen_get()) | |
| 631 | { | |
| 632 | sx = 89 - 16 - sx; | |
| 633 | sy = 262 - 16 - sy; | |
| 634 | flipx = !flipx; | |
| 635 | flipy = !flipy; | |
| 636 | } | |
| 637 | ||
| 638 | sx &= 0x1ff; | |
| 639 | sy &= 0xff; | |
| 640 | if (sx > 512-16) sx -= 512; | |
| 641 | if (sy > 256-16) sy -= 256; | |
| 642 | ||
| 643 | drawgfx( bitmap,gfx, | |
| 644 | tile_number, | |
| 645 | color, | |
| 646 | flipx, flipy, | |
| 647 | sx, sy, | |
| 648 | cliprect,TRANSPARENCY_PEN_TABLE,7); | |
| 649 | ||
| 650 | source+=4; | |
| 651 | } | |
| 652 | } | |
| 653 | ||
| 654 | ||
| 523 | 655 | static void tnk3_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, const int xscroll, const int yscroll) |
| 524 | 656 | { |
| 525 | 657 | const gfx_element *gfx = machine->gfx[2]; |
| r3171 | r3172 | |
| 530 | 662 | |
| 531 | 663 | /* jcross and sgladiat have only 25 sprites, the others 50 */ |
| 532 | 664 | |
| 533 | /* jcross has 256 tiles, attribute bit 6 | |
| 665 | /* jcross has 256 tiles, attribute bit 6 is | |
| 534 | 666 | /* sgladiat and tnk3 have 512 tiles, bit 6 is bank and bit 5 is y-flip */ |
| 535 | 667 | /* athena has 1024 tiles, bit 6 and bit 5 are bank */ |
| 536 | 668 | |
| r3171 | r3172 | |
| 550 | 682 | { |
| 551 | 683 | tile_number |= (attributes & 0x40) << 2; |
| 552 | 684 | } |
| 553 | else // jcross | |
| 554 | { | |
| 555 | xflip = attributes & 0x40; // uncertain (not used?) | |
| 556 | } | |
| 557 | 685 | |
| 558 | 686 | if (gfx->total_elements > 512) // athena |
| 559 | 687 | { |
| r3171 | r3172 | |
| 721 | 849 | |
| 722 | 850 | /**************************************************************/ |
| 723 | 851 | |
| 852 | VIDEO_UPDATE( marvins ) | |
| 853 | { | |
| 854 | tilemap_set_scrollx(bg_tilemap, 0, bg_scrollx); | |
| 855 | tilemap_set_scrolly(bg_tilemap, 0, bg_scrolly); | |
| 856 | tilemap_set_scrollx(fg_tilemap, 0, fg_scrollx); | |
| 857 | tilemap_set_scrolly(fg_tilemap, 0, fg_scrolly); | |
| 858 | ||
| 859 | tilemap_draw(bitmap,cliprect,bg_tilemap,0 ,0); | |
| 860 | marvins_draw_sprites(screen->machine,bitmap,cliprect, sp16_scrollx, sp16_scrolly, 0, sprite_split_point>>2 ); | |
| 861 | tilemap_draw(bitmap,cliprect,fg_tilemap,0 ,0); | |
| 862 | marvins_draw_sprites(screen->machine,bitmap,cliprect, sp16_scrollx, sp16_scrolly, sprite_split_point>>2, 25 ); | |
| 863 | tilemap_draw(bitmap,cliprect,tx_tilemap,0 ,0); | |
| 864 | ||
| 865 | return 0; | |
| 866 | } | |
| 867 | ||
| 868 | ||
| 724 | 869 | VIDEO_UPDATE( tnk3 ) |
| 725 | 870 | { |
| 726 | 871 | tilemap_set_scrollx(bg_tilemap, 0, bg_scrollx); |
| r3171 | r3172 | |
| 728 | 873 | |
| 729 | 874 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); |
| 730 | 875 | tnk3_draw_sprites(screen->machine, bitmap, cliprect, sp16_scrollx, sp16_scrolly); |
| 731 | tilemap_draw(bitmap, cliprect, | |
| 876 | tilemap_draw(bitmap, cliprect, tx_tilemap, 0, 0); | |
| 732 | 877 | |
| 733 | 878 | return 0; |
| 734 | 879 | } |
| r3171 | r3172 | |
| 745 | 890 | ikari_draw_sprites(screen->machine, bitmap, cliprect, 0, sp32_scrollx, sp32_scrolly, spriteram, 3 ); |
| 746 | 891 | ikari_draw_sprites(screen->machine, bitmap, cliprect, 25, sp16_scrollx, sp16_scrolly, spriteram + 0x800, 2 ); |
| 747 | 892 | |
| 748 | tilemap_draw(bitmap, cliprect, | |
| 893 | tilemap_draw(bitmap, cliprect, tx_tilemap, 0, 0); | |
| 749 | 894 | return 0; |
| 750 | 895 | } |
| 751 | 896 | |
| r3171 | r3172 | |
| 761 | 906 | tdfever_draw_sprites(screen->machine, bitmap, cliprect, sp32_scrollx, sp32_scrolly, spriteram, 3, 0, 0, 32 ); |
| 762 | 907 | tdfever_draw_sprites(screen->machine, bitmap, cliprect, sp16_scrollx, sp16_scrolly, spriteram + 0x800, 2, 0, sprite_split_point, 64 ); |
| 763 | 908 | |
| 764 | tilemap_draw(bitmap, cliprect, | |
| 909 | tilemap_draw(bitmap, cliprect, tx_tilemap, 0, 0); | |
| 765 | 910 | |
| 766 | 911 | return 0; |
| 767 | 912 | } |
| r3171 | r3172 | |
| 776 | 921 | |
| 777 | 922 | tdfever_draw_sprites(screen->machine, bitmap, cliprect, sp32_scrollx, sp32_scrolly, spriteram, 2, 1, 0, 32 ); |
| 778 | 923 | |
| 779 | tilemap_draw(bitmap, cliprect, | |
| 924 | tilemap_draw(bitmap, cliprect, tx_tilemap, 0, 0); | |
| 780 | 925 | |
| 781 | 926 | return 0; |
| 782 | 927 | } |
| r3171 | r3172 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | static tilemap *shadfrce_fgtilemap, *shadfrce_bg0tilemap, *shadfrce_bg1tilemap; |
| 4 | 4 | extern UINT16 *shadfrce_fgvideoram, *shadfrce_bg0videoram, *shadfrce_bg1videoram, *shadfrce_spvideoram; |
| 5 | /* extern UINT16 *shadfrce_videoregs; */ | |
| 6 | 5 | |
| 6 | extern int shadfrce_video_enable; | |
| 7 | ||
| 7 | 8 | static UINT16 *shadfrce_spvideoram_old; /* I *think* the sprites need to be delayed anyway */ |
| 8 | 9 | |
| 9 | 10 | |
| r3171 | r3172 | |
| 66 | 67 | |
| 67 | 68 | VIDEO_START( shadfrce ) |
| 68 | 69 | { |
| 69 | shadfrce_fgtilemap = tilemap_create(get_shadfrce_fgtile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 70 | tilemap_set_transparent_pen(shadfrce_fgtilemap,0); | |
| 70 | shadfrce_fgtilemap = tilemap_create(get_shadfrce_fgtile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 71 | tilemap_set_transparent_pen(shadfrce_fgtilemap,0); | |
| 71 | 72 | |
| 72 | 73 | shadfrce_bg0tilemap = tilemap_create(get_shadfrce_bg0tile_info,tilemap_scan_rows, 16, 16,32,32); |
| 73 | | |
| 74 | | |
| 74 | 75 | |
| 75 | 76 | shadfrce_bg1tilemap = tilemap_create(get_shadfrce_bg1tile_info,tilemap_scan_rows, 16, 16,32,32); |
| 76 | 77 | |
| r3171 | r3172 | |
| 152 | 153 | { |
| 153 | 154 | fillbitmap(priority_bitmap,0,cliprect); |
| 154 | 155 | |
| 155 | tilemap_draw(bitmap,cliprect,shadfrce_bg1tilemap,0,0); | |
| 156 | tilemap_draw(bitmap,cliprect,shadfrce_bg0tilemap,0,1); | |
| 156 | if(shadfrce_video_enable) | |
| 157 | { | |
| 158 | tilemap_draw(bitmap,cliprect,shadfrce_bg1tilemap,0,0); | |
| 159 | tilemap_draw(bitmap,cliprect,shadfrce_bg0tilemap,0,1); | |
| 160 | draw_sprites(screen->machine, bitmap,cliprect); | |
| 161 | tilemap_draw(bitmap,cliprect,shadfrce_fgtilemap, 0,0); | |
| 162 | } | |
| 163 | else | |
| 164 | { | |
| 165 | fillbitmap(bitmap, get_black_pen(screen->machine), cliprect); | |
| 166 | } | |
| 157 | 167 | |
| 158 | draw_sprites(screen->machine, bitmap,cliprect); | |
| 159 | ||
| 160 | tilemap_draw(bitmap,cliprect,shadfrce_fgtilemap, 0,0); | |
| 161 | ||
| 162 | /* | |
| 163 | popmessage ("Regs %04x %04x %04x %04x %04x %04x %04x", | |
| 164 | shadfrce_videoregs[0], | |
| 165 | shadfrce_videoregs[1], | |
| 166 | shadfrce_videoregs[2], | |
| 167 | shadfrce_videoregs[3], | |
| 168 | shadfrce_videoregs[4], | |
| 169 | shadfrce_videoregs[5], | |
| 170 | shadfrce_videoregs[6]); | |
| 171 | */ | |
| 172 | ||
| 173 | 168 | return 0; |
| 174 | 169 | } |
| 175 | 170 |
| r3171 | r3172 | |
|---|---|---|
| 741 | 741 | return (beamy << 16) | (beamx ^ 0x1ff); |
| 742 | 742 | |
| 743 | 743 | case 2: |
| 744 | return input_port_read(machine, "IN3") | |
| 744 | return input_port_read(machine, "IN3") | |
| 745 | 745 | } |
| 746 | 746 | return 0; |
| 747 | 747 | } |
| r3171 | r3172 | |
|---|---|---|
| 174 | 174 | rectangle cliprect; |
| 175 | 175 | int offset; |
| 176 | 176 | |
| 177 | xmen_current_frame ^=0x | |
| 177 | xmen_current_frame ^= 0x | |
| 178 | 178 | |
| 179 | 179 | // const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen); |
| 180 | 180 | // cliprect.min_x = visarea->min_x; |
| r3171 | r3172 | |
| 190 | 190 | |
| 191 | 191 | |
| 192 | 192 | |
| 193 | if (xmen_current_frame&0x | |
| 193 | if (xmen_current_frame & 0x | |
| 194 | 194 | { |
| 195 | 195 | |
| 196 | 196 | /* copy the desired spritelist to the chip */ |
| r3171 | r3172 | |
|---|---|---|
| 306 | 306 | |
| 307 | 307 | static ADDRESS_MAP_START( arwritemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 308 | 308 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(SMH_ROM) |
| 309 | ||
| 310 | ||
| 311 | 309 | AM_RANGE(0xc500, 0xc500) AM_WRITE(cshooter_c500_w) |
| 312 | 310 | AM_RANGE(0xc600, 0xc600) AM_WRITE(SMH_NOP) // see notes |
| 313 | 311 | AM_RANGE(0xc700, 0xc700) AM_WRITE(cshooter_c700_w) |
| 314 | 312 | AM_RANGE(0xc801, 0xc801) AM_WRITE(SMH_NOP) // see notes |
| 315 | 313 | AM_RANGE(0xd000, 0xd7ff) AM_WRITE(cshooter_txram_w) AM_BASE(&cshooter_txram) |
| 316 | ||
| 317 | 314 | ADDRESS_MAP_END |
| 318 | 315 | |
| 319 | 316 | |
| 320 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 321 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 322 | ADDRESS_MAP_END | |
| 323 | ||
| 324 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 325 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 326 | ADDRESS_MAP_END | |
| 327 | ||
| 328 | ||
| 329 | 317 | /* Sound CPU */ |
| 330 | 318 | |
| 331 | 319 | static ADDRESS_MAP_START( s_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 348 | 336 | ADDRESS_MAP_END |
| 349 | 337 | |
| 350 | 338 | static ADDRESS_MAP_START( s2_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 351 | ||
| 352 | 339 | AM_RANGE(0x4000, 0x4000) AM_WRITE(SMH_NOP) // ym2203_control_port_0_w ? |
| 353 | 340 | AM_RANGE(0x4001, 0x4001) AM_WRITE(SMH_NOP) // ym2203_write_port_0_w |
| 354 | 341 | |
| 355 | 342 | AM_RANGE(0x4008, 0x4008) AM_WRITE(SMH_NOP) // ym2203_control_port_0_w ? |
| 356 | 343 | AM_RANGE(0x4009, 0x4009) AM_WRITE(SMH_NOP) // ym2203_write_port_0_w |
| 357 | ||
| 358 | ||
| 359 | 344 | ADDRESS_MAP_END |
| 360 | 345 | |
| 361 | static ADDRESS_MAP_START( s_readport, ADDRESS_SPACE_IO, 8 ) | |
| 362 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 363 | ADDRESS_MAP_END | |
| 364 | 346 | |
| 365 | static ADDRESS_MAP_START( s_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 366 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 367 | ADDRESS_MAP_END | |
| 368 | 347 | |
| 369 | ||
| 370 | ||
| 371 | ||
| 372 | 348 | static INPUT_PORTS_START( cshooter ) |
| 373 | 349 | PORT_START("IN0") /* IN0 (0xc200) */ |
| 374 | 350 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r3171 | r3172 | |
| 471 | 447 | static MACHINE_DRIVER_START( cshooter ) |
| 472 | 448 | MDRV_CPU_ADD("main", Z80,XTAL_12MHz/2) /* verified on pcb */ |
| 473 | 449 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 474 | MDRV_CPU_IO_MAP(readport,writeport) | |
| 475 | 450 | MDRV_CPU_VBLANK_INT_HACK(cshooter_interrupt,2) |
| 476 | 451 | |
| 477 | 452 | MDRV_CPU_ADD("audio", Z80,XTAL_14_31818MHz/4) /* verified on pcb */ |
| 478 | 453 | MDRV_CPU_PROGRAM_MAP(s_readmem,s_writemem) |
| 479 | MDRV_CPU_IO_MAP(s_readport,s_writeport) | |
| 480 | 454 | |
| 481 | 455 | MDRV_MACHINE_RESET(cshooter) |
| 482 | 456 | |
| r3171 | r3172 | |
| 502 | 476 | static MACHINE_DRIVER_START( airraid ) |
| 503 | 477 | MDRV_CPU_ADD("main", Z80,XTAL_12MHz/2) /* verified on pcb */ |
| 504 | 478 | MDRV_CPU_PROGRAM_MAP(arreadmem,arwritemem) |
| 505 | MDRV_CPU_IO_MAP(readport,writeport) | |
| 506 | 479 | MDRV_CPU_VBLANK_INT_HACK(cshooter_interrupt,2) |
| 507 | 480 | |
| 508 | 481 | MDRV_CPU_ADD("audio", Z80,XTAL_14_31818MHz/4) /* verified on pcb */ |
| 509 | 482 | MDRV_CPU_PROGRAM_MAP(s2_readmem,s2_writemem) |
| 510 | MDRV_CPU_IO_MAP(s_readport,s_writeport) | |
| 511 | 483 | |
| 512 | 484 | MDRV_MACHINE_RESET(cshooter) |
| 513 | 485 | |
| r3171 | r3172 | |
| 756 | 728 | GAME( 1987, cshooter, 0, cshooter, cshooter, cshooter, ROT270, "[Seibu Kaihatsu] (Taito license)", "Cross Shooter (not encrypted)", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| 757 | 729 | GAME( 1987, cshootre, cshooter, airraid, cshooter, cshootre, ROT270, "[Seibu Kaihatsu] (J.K.H. license)", "Cross Shooter (encrypted)", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| 758 | 730 | GAME( 1987, airraid, cshooter, airraid, cshooter, cshootre, ROT270, "Seibu Kaihatsu", "Air Raid (encrypted)", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| 731 |
| r3171 | r3172 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | #include "driver.h" |
| 74 | 74 | #include "sound/ay8910.h" |
| 75 | #include "sound/na | |
| 75 | #include "sound/snkwave | |
| 76 | 76 | |
| 77 | 77 | extern UINT8 *mainsnk_fgram; |
| 78 | 78 | extern UINT8 *mainsnk_bgram; |
| r3171 | r3172 | |
| 135 | 135 | ADDRESS_MAP_END |
| 136 | 136 | |
| 137 | 137 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 138 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 138 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 139 | 139 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 140 | 140 | AM_RANGE(0xa000, 0xa000) AM_READ(sound_command_r) |
| 141 | 141 | AM_RANGE(0xc000, 0xc000) AM_READ(sound_ack_r) |
| r3171 | r3172 | |
| 356 | 356 | 256 |
| 357 | 357 | }; |
| 358 | 358 | |
| 359 | static const namco_interface snkwave_interface = | |
| 360 | { | |
| 361 | 1, | |
| 362 | 0 /* stereo */ | |
| 363 | }; | |
| 364 | 359 | |
| 365 | ||
| 366 | 360 | static GFXDECODE_START( mainsnk ) |
| 367 | 361 | GFXDECODE_ENTRY( "gfx1", 0x0, tile_layout, 0, 8 ) |
| 368 | 362 | GFXDECODE_ENTRY( "gfx2", 0x0, sprite_layout, 0, 16 ) |
| r3171 | r3172 | |
| 400 | 394 | MDRV_SOUND_ADD("ay2", AY8910, 2000000) |
| 401 | 395 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35) |
| 402 | 396 | |
| 403 | MDRV_SOUND_ADD("namco", NAMCO, 24000) | |
| 404 | MDRV_SOUND_CONFIG(snkwave_interface) | |
| 397 | MDRV_SOUND_ADD("wave", SNKWAVE, 8000000) | |
| 405 | 398 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08) |
| 406 | 399 | MACHINE_DRIVER_END |
| 407 | 400 |
| r3171 | r3172 | |
|---|---|---|
| 291 | 291 | static WRITE8_HANDLER( pio_w ) |
| 292 | 292 | { |
| 293 | 293 | if (offset & 1) |
| 294 | z80pio_c_w(0, (offset >> 1) & 1, data); | |
| 294 | z80pio_c_w(machine, 0, (offset >> 1) & 1, data); | |
| 295 | 295 | else |
| 296 | z80pio_d_w(0, (offset >> 1) & 1, data); | |
| 296 | z80pio_d_w(machine, 0, (offset >> 1) & 1, data); | |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | static READ8_HANDLER( pio_r ) |
| 300 | 300 | { |
| 301 | return (offset & 1) ? z80pio_c_r(0, (offset >> 1) & 1) : z80pio_d_r(0, (offset >> 1) & 1); | |
| 301 | return (offset & 1) ? z80pio_c_r(0, (offset >> 1) & 1) : z80pio_d_r(machine, 0, (offset >> 1) & 1); | |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | static ADDRESS_MAP_START( sound_ | |
| 304 | static ADDRESS_MAP_START( sound_io_ma | |
| 305 | 305 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 306 | AM_RANGE(0x00, 0x03) AM_READ(pio_r) | |
| 307 | AM_RANGE(0x08, 0x0b) AM_READ(z80ctc_0_r) | |
| 306 | AM_RANGE(0x00, 0x03) AM_READWRITE(pio_r, pio_w) | |
| 307 | AM_RANGE(0x08, 0x0b) AM_READWRITE(z80ctc_0_r, z80ctc_0_w) | |
| 308 | 308 | ADDRESS_MAP_END |
| 309 | 309 | |
| 310 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 311 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 312 | AM_RANGE(0x00, 0x03) AM_WRITE(pio_w) | |
| 313 | AM_RANGE(0x08, 0x0b) AM_WRITE(z80ctc_0_w) | |
| 314 | ADDRESS_MAP_END | |
| 315 | 310 | |
| 316 | 311 | |
| 317 | ||
| 318 | ||
| 319 | 312 | static INPUT_PORTS_START( senjyo ) |
| 320 | 313 | PORT_START("P1") |
| 321 | 314 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| r3171 | r3172 | |
| 654 | 647 | MDRV_CPU_ADD("sub", Z80, 2000000) /* 2 MHz? */ |
| 655 | 648 | MDRV_CPU_CONFIG(daisy_chain) |
| 656 | 649 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 657 | MDRV_CPU_IO_MAP(sound_ | |
| 650 | MDRV_CPU_IO_MAP(sound_i | |
| 658 | 651 | |
| 659 | 652 | MDRV_MACHINE_RESET(senjyo) |
| 660 | 653 | |
| r3171 | r3172 | |
| 1023 | 1016 | GAME( 1984, starfora, starforc, senjyo, starforc, starfora, ROT90, "Tehkan", "Star Force (encrypted, set 2)", 0 ) |
| 1024 | 1017 | GAME( 1985, megaforc, starforc, senjyo, starforc, starforc, ROT90, "Tehkan (Video Ware license)", "Mega Force", 0 ) |
| 1025 | 1018 | GAME( 1986, baluba, 0, senjyo, baluba, starforc, ROT90, "Able Corp, Ltd.", "Baluba-louk no Densetsu", GAME_IMPERFECT_COLORS ) |
| 1019 |
| r3171 | r3172 | |
|---|---|---|
| 93 | 93 | AM_RANGE(0x4900, 0x4900) AM_WRITE(konami_SN76496_0_w) |
| 94 | 94 | AM_RANGE(0x4a00, 0x4a00) AM_WRITE(yiear_VLM5030_control_w) |
| 95 | 95 | AM_RANGE(0x4b00, 0x4b00) AM_WRITE(vlm5030_data_w) |
| 96 | AM_RANGE(0x4c00, 0x4c00) AM_READ(input_port_3_r) | |
| 97 | AM_RANGE(0x4d00, 0x4d00) AM_READ(input_port_4_r) | |
| 98 | AM_RANGE(0x4e00, 0x4e00) AM_READ(input_port_0_r) | |
| 99 | AM_RANGE(0x4e01, 0x4e01) AM_READ(input_port_1_r) | |
| 100 | AM_RANGE(0x4e02, 0x4e02) AM_READ(input_port_2_r) | |
| 101 | AM_RANGE(0x4e03, 0x4e03) AM_READ(input_port_5_r) | |
| 96 | AM_RANGE(0x4c00, 0x4c00) AM_READ_PORT("DSW1") | |
| 97 | AM_RANGE(0x4d00, 0x4d00) AM_READ_PORT("DSW2") | |
| 98 | AM_RANGE(0x4e00, 0x4e00) AM_READ_PORT("SYSTEM") | |
| 99 | AM_RANGE(0x4e01, 0x4e01) AM_READ_PORT("P1") | |
| 100 | AM_RANGE(0x4e02, 0x4e02) AM_READ_PORT("P2") | |
| 101 | AM_RANGE(0x4e03, 0x4e03) AM_READ_PORT("DSW3") | |
| 102 | 102 | AM_RANGE(0x4f00, 0x4f00) AM_WRITE(watchdog_reset_w) |
| 103 | 103 | AM_RANGE(0x5000, 0x502f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 104 | 104 | AM_RANGE(0x5400, 0x542f) AM_RAM AM_BASE(&spriteram_2) |
| r3171 | r3172 | |
| 108 | 108 | ADDRESS_MAP_END |
| 109 | 109 | |
| 110 | 110 | |
| 111 | ||
| 112 | ||
| 113 | 111 | static INPUT_PORTS_START( yiear ) |
| 114 | PORT_START("SYSTEM") | |
| 112 | PORT_START("SYSTEM") | |
| 115 | 113 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 116 | 114 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 117 | 115 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r3171 | r3172 | |
| 121 | 119 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 122 | 120 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 123 | 121 | |
| 124 | PORT_START("P1") | |
| 122 | PORT_START("P1") | |
| 125 | 123 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 126 | 124 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 127 | 125 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r3171 | r3172 | |
| 131 | 129 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 132 | 130 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 133 | 131 | |
| 134 | PORT_START("P2") | |
| 132 | PORT_START("P2") | |
| 135 | 133 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 136 | 134 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 137 | 135 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| r3171 | r3172 | |
| 141 | 139 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 142 | 140 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 143 | 141 | |
| 144 | PORT_START("DSW1") | |
| 142 | PORT_START("DSW1") | |
| 145 | 143 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) |
| 146 | 144 | PORT_DIPSETTING( 0x03, "1" ) |
| 147 | 145 | PORT_DIPSETTING( 0x02, "2" ) |
| r3171 | r3172 | |
| 163 | 161 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 164 | 162 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 165 | 163 | |
| 166 | PORT_START("DSW2") | |
| 164 | PORT_START("DSW2") | |
| 167 | 165 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) |
| 168 | 166 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 169 | 167 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r3171 | r3172 | |
| 173 | 171 | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 174 | 172 | PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 175 | 173 | |
| 176 | PORT_START("DSW3") | |
| 174 | PORT_START("DSW3") | |
| 177 | 175 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) |
| 178 | 176 | PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) |
| 179 | 177 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) |
| r3171 | r3172 | |
|---|---|---|
| 88 | 88 | /* clear */ |
| 89 | 89 | fillbitmap(bitmap, 0, cliprect); |
| 90 | 90 | |
| 91 | /* display disc information */ | |
| 92 | popmessage("%s", laserdisc_describe_state(laserdisc)); | |
| 93 | ||
| 94 | 91 | /* Draw tiles */ |
| 95 | 92 | for (charx = 0; charx < 32; charx++) |
| 96 | 93 | { |
| r3171 | r3172 | |
|---|---|---|
| 323 | 323 | static UINT32 *sharc_dataram[2]; |
| 324 | 324 | static UINT8 *jvs_sdata; |
| 325 | 325 | static UINT32 jvs_sdata_ptr = 0; |
| 326 | static UINT8 *backup_ram; | |
| 327 | 326 | |
| 328 | 327 | |
| 329 | 328 | /* K037122 Tilemap chip (move to konamiic.c ?) */ |
| r3171 | r3172 | |
| 817 | 816 | AM_RANGE(0x780c0000, 0x780c0003) AM_READWRITE(cgboard_dsp_comm_r_ppc, cgboard_dsp_comm_w_ppc) |
| 818 | 817 | AM_RANGE(0x7d000000, 0x7d00ffff) AM_READ8(sysreg_r, 0xffffffff) |
| 819 | 818 | AM_RANGE(0x7d010000, 0x7d01ffff) AM_WRITE8(sysreg_w, 0xffffffff) |
| 820 | AM_RANGE(0x7d020000, 0x7d021fff) AM_READWRITE8(timekeeper_ | |
| 819 | AM_RANGE(0x7d020000, 0x7d021fff) AM_DEVREADWRITE8(M48T58, "m48t58", timekeeper_ | |
| 821 | 820 | AM_RANGE(0x7d030000, 0x7d030007) AM_READWRITE(K056800_host_r, K056800_host_w) |
| 822 | 821 | AM_RANGE(0x7d042000, 0x7d043fff) AM_RAM /* COMM BOARD 0 */ |
| 823 | 822 | AM_RANGE(0x7d044000, 0x7d044007) AM_READ(comm0_unk_r) |
| r3171 | r3172 | |
| 1040 | 1039 | |
| 1041 | 1040 | static NVRAM_HANDLER( hornet ) |
| 1042 | 1041 | { |
| 1043 | NVRAM_HANDLER_CALL(timekeeper_0); | |
| 1044 | 1042 | NVRAM_HANDLER_CALL(93C46); |
| 1045 | 1043 | } |
| 1046 | 1044 | |
| 1045 | static const timekeeper_config timekeeper_intf = | |
| 1046 | { | |
| 1047 | "m48t58" | |
| 1048 | }; | |
| 1049 | ||
| 1047 | 1050 | static MACHINE_DRIVER_START( hornet ) |
| 1048 | 1051 | |
| 1049 | 1052 | /* basic machine hardware */ |
| r3171 | r3172 | |
| 1086 | 1089 | MDRV_SOUND_ROUTE(0, "left", 1.0) |
| 1087 | 1090 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| 1088 | 1091 | |
| 1092 | MDRV_DEVICE_ADD( "m48t58", M48T58 ) | |
| 1093 | MDRV_DEVICE_CONFIG( timekeeper_intf ) | |
| 1089 | 1094 | MACHINE_DRIVER_END |
| 1090 | 1095 | |
| 1091 | 1096 | static MACHINE_RESET( hornet_2board ) |
| r3171 | r3172 | |
| 1307 | 1312 | cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ2, PULSE_LINE); |
| 1308 | 1313 | } |
| 1309 | 1314 | |
| 1310 | static | |
| 1315 | static DRIVER | |
| 1311 | 1316 | { |
| 1312 | 1317 | init_konami_cgboard(1, CGBOARD_TYPE_HORNET); |
| 1313 | 1318 | set_cgboard_texture_bank(0, 5, memory_region(machine, "user5")); |
| r3171 | r3172 | |
| 1316 | 1321 | K033906_init(); |
| 1317 | 1322 | |
| 1318 | 1323 | led_reg0 = led_reg1 = 0x7f; |
| 1319 | timekeeper_init(machine, 0, TIMEKEEPER_M48T58, backup_ram); | |
| 1320 | 1324 | |
| 1321 | 1325 | ppc4xx_spu_set_tx_handler(0, jamma_jvs_w); |
| 1322 | 1326 | } |
| 1323 | 1327 | |
| 1324 | static | |
| 1328 | static DRIVER | |
| 1325 | 1329 | { |
| 1326 | 1330 | init_konami_cgboard(2, CGBOARD_TYPE_HORNET); |
| 1327 | 1331 | set_cgboard_texture_bank(0, 5, memory_region(machine, "user5")); |
| r3171 | r3172 | |
| 1331 | 1335 | K033906_init(); |
| 1332 | 1336 | |
| 1333 | 1337 | led_reg0 = led_reg1 = 0x7f; |
| 1334 | timekeeper_init(machine, 0, TIMEKEEPER_M48T58, backup_ram); | |
| 1335 | 1338 | |
| 1336 | 1339 | ppc4xx_spu_set_tx_handler(0, jamma_jvs_w); |
| 1337 | 1340 | } |
| 1338 | 1341 | |
| 1339 | static DRIVER_INIT(gradius4) | |
| 1340 | { | |
| 1341 | UINT8 *backupdef; | |
| 1342 | ||
| 1343 | backupdef = auto_malloc(0x2000); | |
| 1344 | memset(backupdef, 0, 0x2000); | |
| 1345 | ||
| 1346 | /* RTC data */ | |
| 1347 | backupdef[0x00] = 0x47; // 'G' | |
| 1348 | backupdef[0x01] = 0x58; // 'X' | |
| 1349 | backupdef[0x02] = 0x38; // '8' | |
| 1350 | backupdef[0x03] = 0x33; // '3' | |
| 1351 | backupdef[0x04] = 0x37; // '7' | |
| 1352 | backupdef[0x05] = 0x00; // | |
| 1353 | backupdef[0x06] = 0x11; // | |
| 1354 | backupdef[0x07] = 0x06; // 06 / 11 | |
| 1355 | backupdef[0x08] = 0x19; // | |
| 1356 | backupdef[0x09] = 0x98; // 1998 | |
| 1357 | backupdef[0x0a] = 0x4a; // 'J' | |
| 1358 | backupdef[0x0b] = 0x41; // 'A' | |
| 1359 | backupdef[0x0c] = 0x43; // 'C' | |
| 1360 | backupdef[0x0d] = 0x00; // | |
| 1361 | backupdef[0x0e] = 0x02; // checksum | |
| 1362 | backupdef[0x0f] = 0xd7; // checksum | |
| 1363 | ||
| 1364 | backup_ram = backupdef; | |
| 1365 | init_hornet(machine); | |
| 1366 | } | |
| 1367 | ||
| 1368 | static DRIVER_INIT(nbapbp) | |
| 1369 | { | |
| 1370 | UINT8 *backupdef; | |
| 1371 | int i; | |
| 1372 | UINT16 checksum; | |
| 1373 | ||
| 1374 | backupdef = auto_malloc(0x2000); | |
| 1375 | memset(backupdef, 0, 0x2000); | |
| 1376 | ||
| 1377 | /* RTC data */ | |
| 1378 | backupdef[0x00] = 0x47; // 'G' | |
| 1379 | backupdef[0x01] = 0x58; // 'X' | |
| 1380 | backupdef[0x02] = 0x37; // '7' | |
| 1381 | backupdef[0x03] = 0x37; // '7' | |
| 1382 | backupdef[0x04] = 0x38; // '8' | |
| 1383 | backupdef[0x05] = 0x00; // | |
| 1384 | backupdef[0x06] = 0x00; // | |
| 1385 | backupdef[0x07] = 0x00; // | |
| 1386 | backupdef[0x08] = 0x19; // | |
| 1387 | backupdef[0x09] = 0x98; // 1998 | |
| 1388 | backupdef[0x0a] = 0x4a; // 'J' | |
| 1389 | backupdef[0x0b] = 0x41; // 'A' | |
| 1390 | backupdef[0x0c] = 0x41; // 'A' | |
| 1391 | backupdef[0x0d] = 0x00; // | |
| 1392 | ||
| 1393 | checksum = 0; | |
| 1394 | for (i=0; i < 14; i++) | |
| 1395 | { | |
| 1396 | checksum += backupdef[i]; | |
| 1397 | checksum &= 0xffff; | |
| 1398 | } | |
| 1399 | backupdef[0x0e] = (checksum >> 8) & 0xff; // checksum | |
| 1400 | backupdef[0x0f] = (checksum >> 0) & 0xff; // checksum | |
| 1401 | ||
| 1402 | backup_ram = backupdef; | |
| 1403 | init_hornet(machine); | |
| 1404 | } | |
| 1405 | ||
| 1406 | static DRIVER_INIT(terabrst) | |
| 1407 | { | |
| 1408 | UINT8 *backupdef; | |
| 1409 | int i; | |
| 1410 | UINT16 checksum; | |
| 1411 | ||
| 1412 | backupdef = auto_malloc(0x2000); | |
| 1413 | memset(backupdef, 0, 0x2000); | |
| 1414 | ||
| 1415 | /* RTC data */ | |
| 1416 | backupdef[0x00] = 0x47; // 'G' | |
| 1417 | backupdef[0x01] = 0x4e; // 'N' | |
| 1418 | backupdef[0x02] = 0x37; // '7' | |
| 1419 | backupdef[0x03] = 0x31; // '1' | |
| 1420 | backupdef[0x04] = 0x35; // '5' | |
| 1421 | backupdef[0x05] = 0x00; // | |
| 1422 | backupdef[0x06] = 0x00; // | |
| 1423 | backupdef[0x07] = 0x00; // | |
| 1424 | backupdef[0x08] = 0x19; // | |
| 1425 | backupdef[0x09] = 0x98; // 1998 | |
| 1426 | backupdef[0x0a] = 0x41; // 'J' | |
| 1427 | backupdef[0x0b] = 0x41; // 'A' | |
| 1428 | backupdef[0x0c] = 0x45; // 'E' | |
| 1429 | backupdef[0x0d] = 0x00; // | |
| 1430 | ||
| 1431 | checksum = 0; | |
| 1432 | for (i=0; i < 14; i+=2) | |
| 1433 | { | |
| 1434 | checksum += (backupdef[i] << 8) | (backupdef[i+1]); | |
| 1435 | } | |
| 1436 | checksum = ~checksum - 0; | |
| 1437 | backupdef[0x0e] = (checksum >> 8) & 0xff; // checksum | |
| 1438 | backupdef[0x0f] = (checksum >> 0) & 0xff; // checksum | |
| 1439 | ||
| 1440 | backup_ram = backupdef; | |
| 1441 | init_hornet_2board(machine); | |
| 1442 | } | |
| 1443 | ||
| 1444 | static DRIVER_INIT(sscope) | |
| 1445 | { | |
| 1446 | UINT8 *backupdef; | |
| 1447 | int i; | |
| 1448 | UINT16 checksum; | |
| 1449 | ||
| 1450 | backupdef = auto_malloc(0x2000); | |
| 1451 | memset(backupdef, 0, 0x2000); | |
| 1452 | ||
| 1453 | /* RTC data */ | |
| 1454 | backupdef[0x00] = 0x47; // 'G' | |
| 1455 | backupdef[0x01] = 0x51; // 'Q' | |
| 1456 | backupdef[0x02] = 0x38; // '8' | |
| 1457 | backupdef[0x03] = 0x33; // '3' | |
| 1458 | backupdef[0x04] = 0x30; // '0' | |
| 1459 | backupdef[0x05] = 0x00; // | |
| 1460 | backupdef[0x06] = 0x00; // | |
| 1461 | backupdef[0x07] = 0x00; // | |
| 1462 | backupdef[0x08] = 0x20; // | |
| 1463 | backupdef[0x09] = 0x00; // 2000 | |
| 1464 | backupdef[0x0a] = 0x55; // 'U' | |
| 1465 | backupdef[0x0b] = 0x41; // 'A' | |
| 1466 | backupdef[0x0c] = 0x41; // 'A' | |
| 1467 | backupdef[0x0d] = 0x00; // | |
| 1468 | ||
| 1469 | checksum = 0; | |
| 1470 | for (i=0; i < 14; i+=2) | |
| 1471 | { | |
| 1472 | checksum += (backupdef[i] << 8) | (backupdef[i+1]); | |
| 1473 | } | |
| 1474 | checksum = ~checksum - 1; | |
| 1475 | backupdef[0x0e] = (checksum >> 8) & 0xff; // checksum | |
| 1476 | backupdef[0x0f] = (checksum >> 0) & 0xff; // checksum | |
| 1477 | ||
| 1478 | backup_ram = backupdef; | |
| 1479 | init_hornet_2board(machine); | |
| 1480 | } | |
| 1481 | ||
| 1482 | static DRIVER_INIT(sscope2) | |
| 1483 | { | |
| 1484 | UINT8 *backupdef; | |
| 1485 | int i; | |
| 1486 | int checksum; | |
| 1487 | ||
| 1488 | backupdef = auto_malloc(0x2000); | |
| 1489 | memset(backupdef, 0, 0x2000); | |
| 1490 | ||
| 1491 | /* RTC data */ | |
| 1492 | backupdef[0x00] = 0x47; // 'G' | |
| 1493 | backupdef[0x01] = 0x4b; // 'K' | |
| 1494 | backupdef[0x02] = 0x39; // '9' | |
| 1495 | backupdef[0x03] = 0x33; // '3' | |
| 1496 | backupdef[0x04] = 0x31; // '1' | |
| 1497 | backupdef[0x05] = 0x00; // | |
| 1498 | backupdef[0x06] = 0x00; // | |
| 1499 | backupdef[0x07] = 0x00; // | |
| 1500 | backupdef[0x08] = 0x20; // | |
| 1501 | backupdef[0x09] = 0x00; // 2000 | |
| 1502 | backupdef[0x0a] = 0x55; // 'U' | |
| 1503 | backupdef[0x0b] = 0x41; // 'A' | |
| 1504 | backupdef[0x0c] = 0x41; // 'A' | |
| 1505 | backupdef[0x0d] = 0x00; // | |
| 1506 | ||
| 1507 | checksum = 0; | |
| 1508 | for (i=0; i < 14; i+=2) | |
| 1509 | { | |
| 1510 | checksum += (backupdef[i] << 8) | (backupdef[i+1]); | |
| 1511 | checksum &= 0xffff; | |
| 1512 | } | |
| 1513 | checksum = (-1 - checksum) - 1; | |
| 1514 | backupdef[0x0e] = (checksum >> 8) & 0xff; // checksum | |
| 1515 | backupdef[0x0f] = (checksum >> 0) & 0xff; // checksum | |
| 1516 | ||
| 1517 | ||
| 1518 | /* Silent Scope data */ | |
| 1519 | backupdef[0x1f40] = 0x47; // 'G' | |
| 1520 | backupdef[0x1f41] = 0x4b; // 'Q' | |
| 1521 | backupdef[0x1f42] = 0x38; // '8' | |
| 1522 | backupdef[0x1f43] = 0x33; // '3' | |
| 1523 | backupdef[0x1f44] = 0x30; // '0' | |
| 1524 | backupdef[0x1f45] = 0x00; // | |
| 1525 | backupdef[0x1f46] = 0x00; // | |
| 1526 | backupdef[0x1f47] = 0x00; // | |
| 1527 | backupdef[0x1f48] = 0x20; // | |
| 1528 | backupdef[0x1f49] = 0x00; // 2000 | |
| 1529 | backupdef[0x1f4a] = 0x55; // 'U' | |
| 1530 | backupdef[0x1f4b] = 0x41; // 'A' | |
| 1531 | backupdef[0x1f4c] = 0x41; // 'A' | |
| 1532 | backupdef[0x1f4d] = 0x00; // | |
| 1533 | ||
| 1534 | checksum = 0; | |
| 1535 | for (i=0x1f40; i < 0x1f4e; i+=2) | |
| 1536 | { | |
| 1537 | checksum += (backupdef[i] << 8) | (backupdef[i+1]); | |
| 1538 | checksum &= 0xffff; | |
| 1539 | } | |
| 1540 | checksum = (-1 - checksum) - 1; | |
| 1541 | backupdef[0x1f4e] = (checksum >> 8) & 0xff; // checksum | |
| 1542 | backupdef[0x1f4f] = (checksum >> 0) & 0xff; // checksum | |
| 1543 | ||
| 1544 | backup_ram = backupdef; | |
| 1545 | init_hornet_2board(machine); | |
| 1546 | } | |
| 1547 | ||
| 1548 | 1342 | /*****************************************************************************/ |
| 1549 | 1343 | |
| 1550 | 1344 | ROM_START(sscope) |
| r3171 | r3172 | |
| 1558 | 1352 | ROM_LOAD16_WORD_SWAP("ss1-1.7s", 0x000000, 0x80000, CRC(2805ea1d) SHA1(2556a51ee98cb8f59bf081e916c69a24532196f1)) |
| 1559 | 1353 | |
| 1560 | 1354 | ROM_REGION(0x1000000, "user5", 0) /* CG Board texture roms */ |
| 1561 | ROM_LOAD32_WORD( "ss1-3.u32", 0x000000, 0x400000, CRC(335793e1) SHA1(d582b53c3853abd59bc728f619a30c27cfc9497c) ) | |
| 1562 | ROM_LOAD32_WORD( "ss1-3.u24", 0x000002, 0x400000, CRC(d6e7877e) SHA1(b4d0e17ada7dd126ec564a20e7140775b4b3fdb7) ) | |
| 1355 | ROM_LOAD32_WORD( "ss1-3.u32", 0x000000, 0x400000, CRC(335793e1) SHA1(d582b53c3853abd59bc728f619a30c27cfc9497c) ) | |
| 1356 | ROM_LOAD32_WORD( "ss1-3.u24", 0x000002, 0x400000, CRC(d6e7877e) SHA1(b4d0e17ada7dd126ec564a20e7140775b4b3fdb7) ) | |
| 1563 | 1357 | |
| 1564 | 1358 | ROM_REGION(0x1000000, "rf", 0) /* PCM sample roms */ |
| 1565 | ROM_LOAD( "830a09.16p", 0x000000, 0x400000, CRC(e4b9f305) SHA1(ce2c6f63bdc9374dde48d8359102b57e48b4fdeb) ) | |
| 1566 | ROM_LOAD( "830a10.14p", 0x400000, 0x400000, CRC(8b8aaf7e) SHA1(49b694dc171c149056b87c15410a6bf37ff2987f) ) | |
| 1359 | ROM_LOAD( "830a09.16p", 0x000000, 0x400000, CRC(e4b9f305) SHA1(ce2c6f63bdc9374dde48d8359102b57e48b4fdeb) ) | |
| 1360 | ROM_LOAD( "830a10.14p", 0x400000, 0x400000, CRC(8b8aaf7e) SHA1(49b694dc171c149056b87c15410a6bf37ff2987f) ) | |
| 1361 | ||
| 1362 | ROM_REGION(0x2000, "m48t58",0) | |
| 1363 | ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(ee815325) SHA1(91b10802791b68a8360c0cd6c376c0c4bbbc6fa0) ) | |
| 1567 | 1364 | ROM_END |
| 1568 | 1365 | |
| 1569 | 1366 | ROM_START(sscopea) |
| r3171 | r3172 | |
| 1577 | 1374 | ROM_LOAD16_WORD_SWAP("ss1-1.7s", 0x000000, 0x80000, CRC(2805ea1d) SHA1(2556a51ee98cb8f59bf081e916c69a24532196f1)) |
| 1578 | 1375 | |
| 1579 | 1376 | ROM_REGION(0x1000000, "user5", 0) /* CG Board texture roms */ |
| 1580 | ROM_LOAD32_WORD( "ss1-3.u32", 0x000000, 0x400000, CRC(335793e1) SHA1(d582b53c3853abd59bc728f619a30c27cfc9497c) ) | |
| 1581 | ROM_LOAD32_WORD( "ss1-3.u24", 0x000002, 0x400000, CRC(d6e7877e) SHA1(b4d0e17ada7dd126ec564a20e7140775b4b3fdb7) ) | |
| 1377 | ROM_LOAD32_WORD( "ss1-3.u32", 0x000000, 0x400000, CRC(335793e1) SHA1(d582b53c3853abd59bc728f619a30c27cfc9497c) ) | |
| 1378 | ROM_LOAD32_WORD( "ss1-3.u24", 0x000002, 0x400000, CRC(d6e7877e) SHA1(b4d0e17ada7dd126ec564a20e7140775b4b3fdb7) ) | |
| 1582 | 1379 | |
| 1583 | 1380 | ROM_REGION(0x1000000, "rf", 0) /* PCM sample roms */ |
| 1584 | ROM_LOAD( "830a09.16p", 0x000000, 0x400000, CRC(e4b9f305) SHA1(ce2c6f63bdc9374dde48d8359102b57e48b4fdeb) ) | |
| 1585 | ROM_LOAD( "830a10.14p", 0x400000, 0x400000, CRC(8b8aaf7e) SHA1(49b694dc171c149056b87c15410a6bf37ff2987f) ) | |
| 1381 | ROM_LOAD( "830a09.16p", 0x000000, 0x400000, CRC(e4b9f305) SHA1(ce2c6f63bdc9374dde48d8359102b57e48b4fdeb) ) | |
| 1382 | ROM_LOAD( "830a10.14p", 0x400000, 0x400000, CRC(8b8aaf7e) SHA1(49b694dc171c149056b87c15410a6bf37ff2987f) ) | |
| 1383 | ||
| 1384 | ROM_REGION(0x2000, "m48t58",0) | |
| 1385 | ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(ee815325) SHA1(91b10802791b68a8360c0cd6c376c0c4bbbc6fa0) ) | |
| 1586 | 1386 | ROM_END |
| 1587 | 1387 | |
| 1588 | 1388 | ROM_START(sscope2) |
| r3171 | r3172 | |
| 1591 | 1391 | ROM_RELOAD(0x000000, 0x200000) |
| 1592 | 1392 | |
| 1593 | 1393 | ROM_REGION32_BE(0x800000, "user2", 0) /* Data roms */ |
| 1594 | | |
| 1394 | | |
| 1595 | 1395 | |
| 1596 | 1396 | ROM_REGION32_BE(0x800000, "user3", 0) /* Comm board roms */ |
| 1597 | 1397 | ROM_LOAD("931a19.bin", 0x000000, 0x400000, BAD_DUMP CRC(8e8bb6af) SHA1(1bb399f7897fbcbe6852fda3215052b2810437d8)) |
| r3171 | r3172 | |
| 1603 | 1403 | ROM_LOAD16_WORD_SWAP("931a08.bin", 0x000000, 0x80000, CRC(1597d604) SHA1(a1eab4d25907930b59ea558b484c3b6ddcb9303c)) |
| 1604 | 1404 | |
| 1605 | 1405 | ROM_REGION(0xc00000, "rf", 0) /* PCM sample roms */ |
| 1606 | ROM_LOAD( "931a09.bin", 0x000000, 0x400000, CRC(694c354c) SHA1(42f54254a5959e1b341f2801f1ad032c4ed6f329) ) | |
| 1607 | ROM_LOAD( "931a10.bin", 0x400000, 0x400000, CRC(78ceb519) SHA1(e61c0d21b6dc37a9293e72814474f5aee59115ad) ) | |
| 1608 | ROM_LOAD( "931a11.bin", 0x800000, 0x400000, CRC(9c8362b2) SHA1(a8158c4db386e2bbd61dc9a600720f07a1eba294) ) | |
| 1406 | ROM_LOAD( "931a09.bin", 0x000000, 0x400000, CRC(694c354c) SHA1(42f54254a5959e1b341f2801f1ad032c4ed6f329) ) | |
| 1407 | ROM_LOAD( "931a10.bin", 0x400000, 0x400000, CRC(78ceb519) SHA1(e61c0d21b6dc37a9293e72814474f5aee59115ad) ) | |
| 1408 | ROM_LOAD( "931a11.bin", 0x800000, 0x400000, CRC(9c8362b2) SHA1(a8158c4db386e2bbd61dc9a600720f07a1eba294) ) | |
| 1409 | ||
| 1410 | ROM_REGION(0x2000, "m48t58",0) | |
| 1411 | ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(d4e69d7a) SHA1(1e29eecf4886e5e098a388dedd5f3901c2bb65e5) ) | |
| 1609 | 1412 | ROM_END |
| 1610 | 1413 | |
| 1611 | 1414 | ROM_START(gradius4) |
| 1612 | 1415 | ROM_REGION32_BE(0x400000, "user1", 0) /* PowerPC program */ |
| 1613 | ROM_LOAD16_WORD_SWAP( "837c01.27p", 0x200000, 0x200000, CRC(ce003123) SHA1(15e33997be2c1b3f71998627c540db378680a7a1) ) | |
| 1614 | ROM_RELOAD(0x000000, 0x200000) | |
| 1416 | ROM_LOAD16_WORD_SWAP( "837c01.27p", 0x200000, 0x200000, CRC(ce003123) SHA1(15e33997be2c1b3f71998627c540db378680a7a1) ) | |
| 1417 | ROM_RELOAD(0x000000, 0x200000) | |
| 1615 | 1418 | |
| 1616 | 1419 | ROM_REGION32_BE(0x800000, "user2", 0) /* Data roms */ |
| 1617 | ROM_LOAD32_WORD_SWAP( "837a04.16t", 0x000000, 0x200000, CRC(18453b59) SHA1(3c75a54d8c09c0796223b42d30fb3867a911a074) ) | |
| 1618 | ROM_LOAD32_WORD_SWAP( "837a05.14t", 0x000002, 0x200000, CRC(77178633) SHA1(ececdd501d0692390325c8dad6dbb068808a8b26) ) | |
| 1420 | ROM_LOAD32_WORD_SWAP( "837a04.16t", 0x000000, 0x200000, CRC(18453b59) SHA1(3c75a54d8c09c0796223b42d30fb3867a911a074) ) | |
| 1421 | ROM_LOAD32_WORD_SWAP( "837a05.14t", 0x000002, 0x200000, CRC(77178633) SHA1(ececdd501d0692390325c8dad6dbb068808a8b26) ) | |
| 1619 | 1422 | |
| 1620 | 1423 | ROM_REGION32_BE(0x1000000, "user5", 0) /* CG Board texture roms */ |
| 1621 | ROM_LOAD32_WORD_SWAP( "837a14.32u", 0x000002, 0x400000, CRC(ff1b5d18) SHA1(7a38362170133dcc6ea01eb62981845917b85c36) ) | |
| 1622 | ROM_LOAD32_WORD_SWAP( "837a13.24u", 0x000000, 0x400000, CRC(d86e10ff) SHA1(6de1179d7081d9a93ab6df47692d3efc190c38ba) ) | |
| 1623 | ROM_LOAD32_WORD_SWAP( "837a16.32v", 0x800002, 0x400000, CRC(bb7a7558) SHA1(8c8cc062793c2dcfa72657b6ea0813d7223a0b87) ) | |
| 1624 | ROM_LOAD32_WORD_SWAP( "837a15.24v", 0x800000, 0x400000, CRC(e0620737) SHA1(c14078cdb44f75c7c956b3627045d8494941d6b4) ) | |
| 1424 | ROM_LOAD32_WORD_SWAP( "837a14.32u", 0x000002, 0x400000, CRC(ff1b5d18) SHA1(7a38362170133dcc6ea01eb62981845917b85c36) ) | |
| 1425 | ROM_LOAD32_WORD_SWAP( "837a13.24u", 0x000000, 0x400000, CRC(d86e10ff) SHA1(6de1179d7081d9a93ab6df47692d3efc190c38ba) ) | |
| 1426 | ROM_LOAD32_WORD_SWAP( "837a16.32v", 0x800002, 0x400000, CRC(bb7a7558) SHA1(8c8cc062793c2dcfa72657b6ea0813d7223a0b87) ) | |
| 1427 | ROM_LOAD32_WORD_SWAP( "837a15.24v", 0x800000, 0x400000, CRC(e0620737) SHA1(c14078cdb44f75c7c956b3627045d8494941d6b4) ) | |
| 1625 | 1428 | |
| 1626 | 1429 | ROM_REGION(0x80000, "audio", 0) /* 68K Program */ |
| 1627 | ||
| 1430 | | |
| 1628 | 1431 | |
| 1629 | 1432 | ROM_REGION(0x800000, "rf", 0) /* PCM sample roms */ |
| 1630 | ROM_LOAD( "837a09.16p", 0x000000, 0x400000, CRC(fb8f3dc2) SHA1(69e314ac06308c5a24309abc3d7b05af6c0302a8) ) | |
| 1631 | ROM_LOAD( "837a10.14p", 0x400000, 0x400000, CRC(1419cad2) SHA1(a6369a5c29813fa51e8246d0c091736f32994f3d) ) | |
| 1433 | ROM_LOAD( "837a09.16p", 0x000000, 0x400000, CRC(fb8f3dc2) SHA1(69e314ac06308c5a24309abc3d7b05af6c0302a8) ) | |
| 1434 | ROM_LOAD( "837a10.14p", 0x400000, 0x400000, CRC(1419cad2) SHA1(a6369a5c29813fa51e8246d0c091736f32994f3d) ) | |
| 1435 | ||
| 1436 | ROM_REGION(0x2000, "m48t58",0) | |
| 1437 | ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(935f9d05) SHA1(c3a787dff1b2ac4942858ffa1574405db01292b6) ) | |
| 1632 | 1438 | ROM_END |
| 1633 | 1439 | |
| 1634 | 1440 | ROM_START(nbapbp) |
| 1635 | 1441 | ROM_REGION32_BE(0x400000, "user1", 0) /* PowerPC program */ |
| 1636 | ROM_LOAD16_WORD_SWAP( "778a01.27p", 0x200000, 0x200000, CRC(e70019ce) SHA1(8b187b6e670fdc88771da08a56685cd621b139dc) ) | |
| 1637 | ROM_RELOAD(0x000000, 0x200000) | |
| 1442 | ROM_LOAD16_WORD_SWAP( "778a01.27p", 0x200000, 0x200000, CRC(e70019ce) SHA1(8b187b6e670fdc88771da08a56685cd621b139dc) ) | |
| 1443 | ROM_RELOAD(0x000000, 0x200000) | |
| 1638 | 1444 | |
| 1639 | 1445 | ROM_REGION32_BE(0x800000, "user2", 0) /* Data roms */ |
| 1640 | ROM_LOAD32_WORD_SWAP( "778a04.16t", 0x000000, 0x400000, CRC(62c70132) SHA1(405aed149fc51e0adfa3ace3c644e47d53cf1ee3) ) | |
| 1641 | ROM_LOAD32_WORD_SWAP( "778a05.14t", 0x000002, 0x400000, CRC(03249803) SHA1(f632a5f1dfa0a8500407214df0ec8d98ce09bc2b) ) | |
| 1446 | ROM_LOAD32_WORD_SWAP( "778a04.16t", 0x000000, 0x400000, CRC(62c70132) SHA1(405aed149fc51e0adfa3ace3c644e47d53cf1ee3) ) | |
| 1447 | ROM_LOAD32_WORD_SWAP( "778a05.14t", 0x000002, 0x400000, CRC(03249803) SHA1(f632a5f1dfa0a8500407214df0ec8d98ce09bc2b) ) | |
| 1642 | 1448 | |
| 1643 | 1449 | ROM_REGION32_BE(0x1000000, "user5", 0) /* CG Board texture roms */ |
| 1644 | ROM_LOAD32_WORD_SWAP( "778a14.32u", 0x000002, 0x400000, CRC(db0c278d) SHA1(bb9884b6cdcdb707fff7e56e92e2ede062abcfd3) ) | |
| 1645 | ROM_LOAD32_WORD_SWAP( "778a13.24u", 0x000000, 0x400000, CRC(47fda9cc) SHA1(4aae01c1f1861b4b12a3f9de6b39eb4d11a9736b) ) | |
| 1646 | ROM_LOAD32_WORD_SWAP( "778a16.32v", 0x800002, 0x400000, CRC(6c0f46ea) SHA1(c6b9fbe14e13114a91a5925a0b46496260539687) ) | |
| 1647 | ROM_LOAD32_WORD_SWAP( "778a15.24v", 0x800000, 0x400000, CRC(d176ad0d) SHA1(2be755dfa3f60379d396734809bbaaaad49e0db5) ) | |
| 1450 | ROM_LOAD32_WORD_SWAP( "778a14.32u", 0x000002, 0x400000, CRC(db0c278d) SHA1(bb9884b6cdcdb707fff7e56e92e2ede062abcfd3) ) | |
| 1451 | ROM_LOAD32_WORD_SWAP( "778a13.24u", 0x000000, 0x400000, CRC(47fda9cc) SHA1(4aae01c1f1861b4b12a3f9de6b39eb4d11a9736b) ) | |
| 1452 | ROM_LOAD32_WORD_SWAP( "778a16.32v", 0x800002, 0x400000, CRC(6c0f46ea) SHA1(c6b9fbe14e13114a91a5925a0b46496260539687) ) | |
| 1453 | ROM_LOAD32_WORD_SWAP( "778a15.24v", 0x800000, 0x400000, CRC(d176ad0d) SHA1(2be755dfa3f60379d396734809bbaaaad49e0db5) ) | |
| 1648 | 1454 | |
| 1649 | 1455 | ROM_REGION(0x80000, "audio", 0) /* 68K Program */ |
| 1650 | ||
| 1456 | | |
| 1651 | 1457 | |
| 1652 | 1458 | ROM_REGION(0x1000000, "rf", 0) /* PCM sample roms */ |
| 1653 | ROM_LOAD( "778a09.16p", 0x000000, 0x400000, CRC(e8c6fd93) SHA1(dd378b67b3b7dd932e4b39fbf4321e706522247f) ) | |
| 1654 | ROM_LOAD( "778a10.14p", 0x400000, 0x400000, CRC(c6a0857b) SHA1(976734ba56460fcc090619fbba043a3d888c4f4e) ) | |
| 1655 | ROM_LOAD( "778a11.12p", 0x800000, 0x400000, CRC(40199382) SHA1(bee268adf9b6634a4f6bb39278ecd02f2bdcb1f4) ) | |
| 1656 | ROM_LOAD( "778a12.9p", 0xc00000, 0x400000, CRC(27d0c724) SHA1(48e48cbaea6db0de8c3471a2eda6faaa16eed46e) ) | |
| 1459 | ROM_LOAD( "778a09.16p", 0x000000, 0x400000, CRC(e8c6fd93) SHA1(dd378b67b3b7dd932e4b39fbf4321e706522247f) ) | |
| 1460 | ROM_LOAD( "778a10.14p", 0x400000, 0x400000, CRC(c6a0857b) SHA1(976734ba56460fcc090619fbba043a3d888c4f4e) ) | |
| 1461 | ROM_LOAD( "778a11.12p", 0x800000, 0x400000, CRC(40199382) SHA1(bee268adf9b6634a4f6bb39278ecd02f2bdcb1f4) ) | |
| 1462 | ROM_LOAD( "778a12.9p", 0xc00000, 0x400000, CRC(27d0c724) SHA1(48e48cbaea6db0de8c3471a2eda6faaa16eed46e) ) | |
| 1463 | ||
| 1464 | ROM_REGION(0x2000, "m48t58",0) | |
| 1465 | ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(3cff1b1d) SHA1(bed0fc657a785be0c69bb21ad52365635c83d751) ) | |
| 1657 | 1466 | ROM_END |
| 1658 | 1467 | |
| 1659 | 1468 | ROM_START(terabrst) |
| 1660 | 1469 | ROM_REGION32_BE(0x400000, "user1", 0) /* PowerPC program */ |
| 1661 | ROM_LOAD32_WORD_SWAP( "715a02.25p", 0x000000, 0x200000, CRC(070c48b3) SHA1(066cefbd34d8f6476083417471114f782bef97fb) ) | |
| 1662 | ROM_LOAD32_WORD_SWAP( "715a03.22p", 0x000002, 0x200000, CRC(f77d242f) SHA1(7680e4abcccd549b3f6d1d245f64631fab57e80d) ) | |
| 1470 | ROM_LOAD32_WORD_SWAP( "715a02.25p", 0x000000, 0x200000, CRC(070c48b3) SHA1(066cefbd34d8f6476083417471114f782bef97fb) ) | |
| 1471 | ROM_LOAD32_WORD_SWAP( "715a03.22p", 0x000002, 0x200000, CRC(f77d242f) SHA1(7680e4abcccd549b3f6d1d245f64631fab57e80d) ) | |
| 1663 | 1472 | |
| 1664 | 1473 | ROM_REGION32_BE(0x800000, "user2", 0) /* Data roms */ |
| 1665 | ROM_LOAD32_WORD_SWAP( "715a04.16t", 0x000000, 0x200000, CRC(00d9567e) SHA1(fe372399ad0ae89d557c93c3145b38e3ed0f714d) ) | |
| 1666 | ROM_LOAD32_WORD_SWAP( "715a05.14t", 0x000002, 0x200000, CRC(462d53bf) SHA1(0216a84358571de6791365c69a1fa8fe2784148d) ) | |
| 1474 | ROM_LOAD32_WORD_SWAP( "715a04.16t", 0x000000, 0x200000, CRC(00d9567e) SHA1(fe372399ad0ae89d557c93c3145b38e3ed0f714d) ) | |
| 1475 | ROM_LOAD32_WORD_SWAP( "715a05.14t", 0x000002, 0x200000, CRC(462d53bf) SHA1(0216a84358571de6791365c69a1fa8fe2784148d) ) | |
| 1667 | 1476 | |
| 1668 | 1477 | ROM_REGION32_BE(0x1000000, "user5", 0) /* CG Board texture roms */ |
| 1669 | ROM_LOAD32_WORD_SWAP( "715a14.32u", 0x000002, 0x400000, CRC(bbb36be3) SHA1(c828d0af0546db02e87afe68423b9447db7c7e51) ) | |
| 1670 | ROM_LOAD32_WORD_SWAP( "715a13.24u", 0x000000, 0x400000, CRC(dbff58a1) SHA1(f0c60bb2cbf268cfcbdd65606ebb18f1b4839c0e) ) | |
| 1478 | ROM_LOAD32_WORD_SWAP( "715a14.32u", 0x000002, 0x400000, CRC(bbb36be3) SHA1(c828d0af0546db02e87afe68423b9447db7c7e51) ) | |
| 1479 | ROM_LOAD32_WORD_SWAP( "715a13.24u", 0x000000, 0x400000, CRC(dbff58a1) SHA1(f0c60bb2cbf268cfcbdd65606ebb18f1b4839c0e) ) | |
| 1671 | 1480 | |
| 1672 | 1481 | ROM_REGION(0x80000, "audio", 0) /* 68K Program */ |
| 1673 | ||
| 1482 | | |
| 1674 | 1483 | |
| 1675 | 1484 | ROM_REGION(0x1000000, "rf", 0) /* PCM sample roms */ |
| 1676 | ROM_LOAD( "715a09.16p", 0x000000, 0x400000, CRC(65845866) SHA1(d2a63d0deef1901e6fa21b55c5f96e1f781dceda) ) | |
| 1677 | ROM_LOAD( "715a10.14p", 0x400000, 0x400000, CRC(294fe71b) SHA1(ac5fff5627df1cee4f1e1867377f208b34334899) ) | |
| 1485 | ROM_LOAD( "715a09.16p", 0x000000, 0x400000, CRC(65845866) SHA1(d2a63d0deef1901e6fa21b55c5f96e1f781dceda) ) | |
| 1486 | ROM_LOAD( "715a10.14p", 0x400000, 0x400000, CRC(294fe71b) SHA1(ac5fff5627df1cee4f1e1867377f208b34334899) ) | |
| 1678 | 1487 | |
| 1679 | 1488 | ROM_REGION(0x20000, "dsp", 0) /* 68K Program */ |
| 1680 | ROM_LOAD16_WORD_SWAP( "715a17.20k", 0x000000, 0x020000, CRC(f0b7ba0c) SHA1(863b260824b0ae2f890ba84d1c9a8f436891b1ff) ) | |
| 1489 | ROM_LOAD16_WORD_SWAP( "715a17.20k", 0x000000, 0x020000, CRC(f0b7ba0c) SHA1(863b260824b0ae2f890ba84d1c9a8f436891b1ff) ) | |
| 1490 | ||
| 1491 | ROM_REGION(0x2000, "m48t58",0) | |
| 1492 | ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(62fecb78) SHA1(09509be8a947cf2d38e12a6ea755ec0de4aa9bd4) ) | |
| 1681 | 1493 | ROM_END |
| 1682 | 1494 | |
| 1683 | 1495 | /*************************************************************************/ |
| 1684 | 1496 | |
| 1685 | GAME( 1998, gradius4, 0, hornet, hornet, gradius4, ROT0, "Konami", "Gradius 4: Fukkatsu", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1686 | GAME( 1998, nbapbp, 0, hornet, hornet, nbapbp, ROT0, "Konami", "NBA Play By Play", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1687 | GAMEL( 1998, terabrst, 0, hornet_2board, hornet, terabrst, ROT0, "Konami", "Teraburst", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_dualhsxs ) | |
| 1688 | GAMEL( 2000, sscope, 0, hornet_2board, sscope, sscope, ROT0, "Konami", "Silent Scope (ver UAB)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs ) | |
| 1689 | GAMEL( 2000, sscopea, sscope, hornet_2board, sscope, sscope, ROT0, "Konami", "Silent Scope (ver UAA)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs ) | |
| 1690 | GAMEL( 2000, sscope2, 0, hornet_2board_v2, sscope, sscope2, ROT0, "Konami", "Silent Scope 2", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs ) | |
| 1497 | GAME( 1998, gradius4, 0, hornet, hornet, hornet, ROT0, "Konami", "Gradius 4: Fukkatsu", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1498 | GAME( 1998, nbapbp, 0, hornet, hornet, hornet, ROT0, "Konami", "NBA Play By Play", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 1499 | GAMEL( 1998, terabrst, 0, hornet_2board, hornet, hornet_2board, ROT0, "Konami", "Teraburst", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_dualhsxs ) | |
| 1500 | GAMEL( 2000, sscope, 0, hornet_2board, sscope, hornet_2board, ROT0, "Konami", "Silent Scope (ver UAB)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs ) | |
| 1501 | GAMEL( 2000, sscopea, sscope, hornet_2board, sscope, hornet_2board, ROT0, "Konami", "Silent Scope (ver UAA)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs ) | |
| 1502 | GAMEL( 2000, sscope2, 0, hornet_2board_v2, sscope, hornet_2board, ROT0, "Konami", "Silent Scope 2", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs ) |
| r3171 | r3172 | |
|---|---|---|
| 303 | 303 | AM_RANGE(0xf000, 0xffff) AM_WRITE(SMH_RAM) |
| 304 | 304 | ADDRESS_MAP_END |
| 305 | 305 | |
| 306 | ||
| 306 | 307 | static READ8_HANDLER( discoboy_port_06_r ) |
| 307 | 308 | { |
| 308 | 309 | return 0x00; |
| 309 | 310 | } |
| 310 | 311 | |
| 311 | static ADDRESS_MAP_START( | |
| 312 | static ADDRESS_MAP_START( io_ma | |
| 312 | 313 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 313 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSWA") | |
| 314 | AM_RANGE(0x01, 0x01) AM_READ_PORT("SYSTEM") | |
| 314 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSWA") AM_WRITE(discoboy_port_00_w) | |
| 315 | AM_RANGE(0x01, 0x01) AM_READ_PORT("SYSTEM") AM_WRITE(discoboy_port_01_w) | |
| 315 | 316 | AM_RANGE(0x02, 0x02) AM_READ_PORT("P1") |
| 316 | AM_RANGE(0x03, 0x03) AM_READ_PORT("P2") | |
| 317 | AM_RANGE(0x03, 0x03) AM_READ_PORT("P2") AM_WRITE(discoboy_port_03_w) | |
| 317 | 318 | AM_RANGE(0x04, 0x04) AM_READ_PORT("DSWB") |
| 318 | ||
| 319 | AM_RANGE(0x06, 0x06) AM_READ(discoboy_port_06_r) // ??? | |
| 320 | ADDRESS_MAP_END | |
| 321 | ||
| 322 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 323 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 324 | AM_RANGE(0x00, 0x00) AM_WRITE(discoboy_port_00_w) | |
| 325 | AM_RANGE(0x01, 0x01) AM_WRITE(discoboy_port_01_w) | |
| 326 | AM_RANGE(0x03, 0x03) AM_WRITE(discoboy_port_03_w) | |
| 327 | AM_RANGE(0x06, 0x06) AM_WRITE(discoboy_port_06_w) // ?? unk | |
| 328 | ||
| 319 | AM_RANGE(0x06, 0x06) AM_READWRITE(discoboy_port_06_r, discoboy_port_06_w) // ??? | |
| 329 | 320 | AM_RANGE(0x07, 0x07) AM_WRITE(rambank_select_w) // 0x20 is palette bank bit.. others? |
| 330 | 321 | ADDRESS_MAP_END |
| 331 | 322 | |
| r3171 | r3172 | |
| 341 | 332 | // adpcm_data = (adpcm_data << 4) & 0xf0; |
| 342 | 333 | } |
| 343 | 334 | |
| 344 | ||
| 345 | ||
| 346 | 335 | static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 347 | 336 | AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) |
| 348 | 337 | AM_RANGE(0xf000, 0xf7ff) AM_READ(SMH_RAM) |
| r3171 | r3172 | |
| 356 | 345 | AM_RANGE(0xec01, 0xec01) AM_WRITE(ym3812_write_port_0_w) |
| 357 | 346 | ADDRESS_MAP_END |
| 358 | 347 | |
| 359 | static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 ) | |
| 360 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 361 | ADDRESS_MAP_END | |
| 362 | 348 | |
| 363 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 364 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 365 | ADDRESS_MAP_END | |
| 366 | ||
| 367 | ||
| 368 | ||
| 369 | 349 | static INPUT_PORTS_START( discoboy ) |
| 370 | 350 | PORT_START("DSWA") |
| 371 | 351 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SWA:6,7,8") |
| r3171 | r3172 | |
| 481 | 461 | /* basic machine hardware */ |
| 482 | 462 | MDRV_CPU_ADD("main", Z80,12000000/2) /* 6 MHz? */ |
| 483 | 463 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 484 | MDRV_CPU_IO_MAP( | |
| 464 | MDRV_CPU_IO_MAP(io_ma | |
| 485 | 465 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 486 | 466 | |
| 487 | 467 | MDRV_CPU_ADD("audio", Z80,10000000/2) /* 5 MHz? */ |
| 488 | 468 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 489 | ||
| 469 | // MDRV_CPU_IO_MAP(sound_i | |
| 490 | 470 | // MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 491 | 471 | MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,32) |
| 492 | 472 | |
| r3171 | r3172 | |
| 576 | 556 | |
| 577 | 557 | |
| 578 | 558 | GAME( 1993, discoboy, 0, discoboy, discoboy, discoboy, ROT270, "Soft Art Co.", "Disco Boy", 0 ) |
| 559 |
| r3171 | r3172 | |
|---|---|---|
| 157 | 157 | AM_RANGE(0xfc00, 0xffff) AM_WRITE(tecfri_colorram2_w) AM_BASE(&tecfri_colorram2) |
| 158 | 158 | ADDRESS_MAP_END |
| 159 | 159 | |
| 160 | static ADDRESS_MAP_START( sauro_readport, ADDRESS_SPACE_IO, 8 ) | |
| 160 | ||
| 161 | static ADDRESS_MAP_START( sauro_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 161 | 162 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 162 | 163 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW1") |
| 163 | 164 | AM_RANGE(0x20, 0x20) AM_READ_PORT("DSW2") |
| 164 | 165 | AM_RANGE(0x40, 0x40) AM_READ_PORT("P1") |
| 165 | 166 | AM_RANGE(0x60, 0x60) AM_READ_PORT("P2") |
| 166 | ADDRESS_MAP_END | |
| 167 | ||
| 168 | static ADDRESS_MAP_START( sauro_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 169 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 167 | AM_RANGE(0x80, 0x80) AM_WRITE(sauro_sound_command_w) | |
| 170 | 168 | AM_RANGE(0xa0, 0xa0) AM_WRITE(tecfri_scroll_bg_w) |
| 171 | 169 | AM_RANGE(0xa1, 0xa1) AM_WRITE(sauro_scroll_fg_w) |
| 172 | AM_RANGE(0x80, 0x80) AM_WRITE(sauro_sound_command_w) | |
| 173 | 170 | AM_RANGE(0xc0, 0xc0) AM_WRITE(flip_screen_w) |
| 174 | AM_RANGE(0xc2, 0xc2) AM_WRITE(SMH_NOP) | |
| 171 | AM_RANGE(0xc2, 0xc2) AM_WRITE(SMH_NOP) /* coin reset */ | |
| 175 | 172 | AM_RANGE(0xc3, 0xc3) AM_WRITE(sauro_coin1_w) |
| 176 | 173 | AM_RANGE(0xc4, 0xc4) AM_WRITE(SMH_NOP) /* coin reset */ |
| 177 | 174 | AM_RANGE(0xc5, 0xc5) AM_WRITE(sauro_coin2_w) |
| 178 | 175 | AM_RANGE(0xc6, 0xc7) AM_WRITE(SMH_NOP) /* same as 0x80 - verified with debugger */ |
| 179 | 176 | AM_RANGE(0xc8, 0xc8) AM_WRITE(SMH_NOP) /* written every int: 0 written at end of isr */ |
| 180 | 177 | AM_RANGE(0xc9, 0xc9) AM_WRITE(SMH_NOP) /* written every int: 1 written at start of isr */ |
| 181 | AM_RANGE(0xca, 0xcb) AM_WRITE(sauro_palette_bank_w) /* 1 written upon death, cleared 2 vblanks later */ | |
| 182 | /* Sequence 3,2,1 written during intro screen */ | |
| 178 | AM_RANGE(0xca, 0xcb) AM_WRITE(sauro_palette_bank_w) /* 1 written upon death, cleared 2 vblanks later */ | |
| 179 | /* Sequence 3,2,1 written during intro screen */ | |
| 183 | 180 | AM_RANGE(0xcc, 0xcc) AM_WRITE(SMH_NOP) /* same as 0xca */ |
| 184 | 181 | AM_RANGE(0xcd, 0xcd) AM_WRITE(SMH_NOP) /* same as 0xcb */ |
| 185 | 182 | AM_RANGE(0xce, 0xce) AM_WRITE(SMH_NOP) /* only written at startup */ |
| r3171 | r3172 | |
| 393 | 390 | |
| 394 | 391 | MDRV_VIDEO_START(trckydoc) |
| 395 | 392 | MDRV_VIDEO_UPDATE(trckydoc) |
| 393 | ||
| 396 | 394 | MACHINE_DRIVER_END |
| 397 | 395 | |
| 398 | 396 | static MACHINE_DRIVER_START( sauro ) |
| r3171 | r3172 | |
| 400 | 398 | |
| 401 | 399 | MDRV_CPU_MODIFY("main") |
| 402 | 400 | MDRV_CPU_PROGRAM_MAP(sauro_readmem, sauro_writemem) |
| 403 | MDRV_CPU_IO_MAP(sauro_ | |
| 401 | MDRV_CPU_IO_MAP(sauro_i | |
| 404 | 402 | |
| 405 | 403 | MDRV_CPU_ADD("audio", Z80, 4000000) // 4 MHz? |
| 406 | 404 | MDRV_CPU_PROGRAM_MAP(sauro_sound_readmem, sauro_sound_writemem) |
| r3171 | r3172 | |
| 517 | 515 | GAME( 1987, sauro, 0, sauro, tecfri, tecfri, ROT0, "Tecfri", "Sauro", 0 ) |
| 518 | 516 | GAME( 1987, trckydoc, 0, trckydoc, tecfri, tecfri, ROT0, "Tecfri", "Tricky Doc (Set 1)", 0 ) |
| 519 | 517 | GAME( 1987, trckydca, trckydoc, trckydoc, tecfri, tecfri, ROT0, "Tecfri", "Tricky Doc (Set 2)", 0 ) |
| 518 |
| r3171 | r3172 | |
|---|---|---|
| 87 | 87 | AM_RANGE(0xf000, 0xffff) AM_WRITE(SMH_RAM) |
| 88 | 88 | ADDRESS_MAP_END |
| 89 | 89 | |
| 90 | static ADDRESS_MAP_START( | |
| 90 | static ADDRESS_MAP_START( io_ma | |
| 91 | 91 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 92 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") | |
| 93 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") | |
| 94 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") | |
| 95 | AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW2") | |
| 96 | AM_RANGE(0x05, 0x05) AM_READ(SMH_NOP) // unused? | |
| 97 | ADDRESS_MAP_END | |
| 98 | ||
| 99 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 100 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 101 | AM_RANGE(0x00, 0x00) AM_WRITE(sn76496_0_w) | |
| 102 | AM_RANGE(0x01, 0x01) AM_WRITE(sn76496_1_w) | |
| 92 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_WRITE(sn76496_0_w) | |
| 93 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_WRITE(sn76496_1_w) | |
| 103 | 94 | AM_RANGE(0x02, 0x02) AM_WRITE(sn76496_2_w) |
| 104 | AM_RANGE(0x03, 0x03) AM_WRITE(pcm_set_w) | |
| 105 | AM_RANGE(0x04, 0x04) AM_WRITE(nmi_enable_w) | |
| 106 | AM_RANGE(0x05, 0x05) AM_WRITE(SMH_NOP) // watchdog? | |
| 95 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") AM_WRITE(pcm_set_w) | |
| 96 | AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW2") AM_WRITE(nmi_enable_w) | |
| 97 | AM_RANGE(0x05, 0x05) AM_READWRITE(SMH_NOP, SMH_NOP) // unused? / watchdog? | |
| 107 | 98 | ADDRESS_MAP_END |
| 108 | 99 | |
| 109 | 100 | /****************************************************************************/ |
| r3171 | r3172 | |
| 230 | 221 | /* basic machine hardware */ |
| 231 | 222 | MDRV_CPU_ADD("main", Z80,MCLK/6) /* 3.072MHz? */ |
| 232 | 223 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 233 | MDRV_CPU_IO_MAP( | |
| 224 | MDRV_CPU_IO_MAP(io_ma | |
| 234 | 225 | MDRV_CPU_VBLANK_INT("main", drmicro_interrupt) |
| 235 | 226 | |
| 236 | 227 | MDRV_INTERLEAVE(1) |
| r3171 | r3172 | |
| 298 | 289 | ROM_END |
| 299 | 290 | |
| 300 | 291 | GAME( 1983, drmicro, 0, drmicro, drmicro, 0, ROT270, "Sanritsu", "Dr. Micro", 0 ) |
| 292 |
| r3171 | r3172 | |
|---|---|---|
| 169 | 169 | AM_RANGE(0xb000, 0xb3ff) AM_WRITE(speedatk_colorram_w) AM_BASE(&colorram) |
| 170 | 170 | ADDRESS_MAP_END |
| 171 | 171 | |
| 172 | static ADDRESS_MAP_START( | |
| 172 | static ADDRESS_MAP_START( io_ma | |
| 173 | 173 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 174 | AM_RANGE(0x40, 0x40) AM_READ_PORT("DSW") | |
| 174 | AM_RANGE(0x01, 0x01) AM_WRITE(speedatk_flip_screen_w) | |
| 175 | AM_RANGE(0x40, 0x40) AM_READ_PORT("DSW") AM_WRITE(ay8910_control_port_0_w) | |
| 176 | AM_RANGE(0x41, 0x41) AM_WRITE(ay8910_write_port_0_w) | |
| 175 | 177 | /* are these not used? after they're read it sets bit 7 */ |
| 176 | 178 | AM_RANGE(0x60, 0x60) AM_READ(SMH_NOP) |
| 177 | 179 | AM_RANGE(0x61, 0x61) AM_READ(SMH_NOP) |
| 178 | 180 | AM_RANGE(0x68, 0x68) AM_READ(SMH_NOP) |
| 179 | 181 | ADDRESS_MAP_END |
| 180 | 182 | |
| 181 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 182 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 183 | AM_RANGE(0x01, 0x01) AM_WRITE(speedatk_flip_screen_w) | |
| 184 | AM_RANGE(0x40, 0x40) AM_WRITE(ay8910_control_port_0_w) | |
| 185 | AM_RANGE(0x41, 0x41) AM_WRITE(ay8910_write_port_0_w) | |
| 186 | ADDRESS_MAP_END | |
| 187 | ||
| 188 | 183 | static INPUT_PORTS_START( speedatk ) |
| 189 | 184 | PORT_START("DSW") |
| 190 | 185 | PORT_SERVICE( 0x01, IP_ACTIVE_HIGH ) |
| r3171 | r3172 | |
| 269 | 264 | static MACHINE_DRIVER_START( speedatk ) |
| 270 | 265 | MDRV_CPU_ADD("main", Z80,12000000/2) |
| 271 | 266 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 272 | MDRV_CPU_IO_MAP( | |
| 267 | MDRV_CPU_IO_MAP(io_ma | |
| 273 | 268 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 274 | 269 | |
| 275 | 270 | /* video hardware */ |
| r3171 | r3172 | |
| 316 | 311 | ROM_END |
| 317 | 312 | |
| 318 | 313 | GAME( 1984, speedatk, 0, speedatk, speedatk, 0, ROT0, "Seta Kikaku Corp.", "Speed Attack!", 0 ) |
| 314 |
| r3171 | r3172 | |
|---|---|---|
| 492 | 492 | AM_RANGE(0x7800, 0x7fff) AM_WRITE(SMH_RAM) |
| 493 | 493 | ADDRESS_MAP_END |
| 494 | 494 | |
| 495 | ||
| 496 | static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 ) | |
| 495 | static ADDRESS_MAP_START( sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 497 | 496 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 498 | AM_RANGE(0x10, 0x13) AM_READ(z80ctc_0_r) | |
| 499 | AM_RANGE(0x50, 0x50) AM_READ(tmpz84c011_0_pa_r) | |
| 500 | AM_RANGE(0x51, 0x51) AM_READ(tmpz84c011_0_pb_r) | |
| 501 | AM_RANGE(0x52, 0x52) AM_READ(tmpz84c011_0_pc_r) | |
| 502 | AM_RANGE(0x30, 0x30) AM_READ(tmpz84c011_0_pd_r) | |
| 503 | AM_RANGE(0x40, 0x40) AM_READ(tmpz84c011_0_pe_r) | |
| 504 | AM_RANGE(0x54, 0x54) AM_READ(tmpz84c011_0_dir_pa_r) | |
| 505 | AM_RANGE(0x55, 0x55) AM_READ(tmpz84c011_0_dir_pb_r) | |
| 506 | AM_RANGE(0x56, 0x56) AM_READ(tmpz84c011_0_dir_pc_r) | |
| 507 | AM_RANGE(0x34, 0x34) AM_READ(tmpz84c011_0_dir_pd_r) | |
| 508 | AM_RANGE(0x44, 0x44) AM_READ(tmpz84c011_0_dir_pe_r) | |
| 509 | ADDRESS_MAP_END | |
| 510 | ||
| 511 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 512 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 513 | AM_RANGE(0x10, 0x13) AM_WRITE(z80ctc_0_w) | |
| 514 | AM_RANGE(0x50, 0x50) AM_WRITE(tmpz84c011_0_pa_w) | |
| 515 | AM_RANGE(0x51, 0x51) AM_WRITE(tmpz84c011_0_pb_w) | |
| 516 | AM_RANGE(0x52, 0x52) AM_WRITE(tmpz84c011_0_pc_w) | |
| 517 | AM_RANGE(0x30, 0x30) AM_WRITE(tmpz84c011_0_pd_w) | |
| 518 | AM_RANGE(0x40, 0x40) AM_WRITE(tmpz84c011_0_pe_w) | |
| 519 | AM_RANGE(0x54, 0x54) AM_WRITE(tmpz84c011_0_dir_pa_w) | |
| 520 | AM_RANGE(0x55, 0x55) AM_WRITE(tmpz84c011_0_dir_pb_w) | |
| 521 | AM_RANGE(0x56, 0x56) AM_WRITE(tmpz84c011_0_dir_pc_w) | |
| 522 | AM_RANGE(0x34, 0x34) AM_WRITE(tmpz84c011_0_dir_pd_w) | |
| 523 | AM_RANGE(0x44, 0x44) AM_WRITE(tmpz84c011_0_dir_pe_w) | |
| 497 | AM_RANGE(0x10, 0x13) AM_READWRITE(z80ctc_0_r, z80ctc_0_w) | |
| 498 | AM_RANGE(0x50, 0x50) AM_READWRITE(tmpz84c011_0_pa_r, tmpz84c011_0_pa_w) | |
| 499 | AM_RANGE(0x51, 0x51) AM_READWRITE(tmpz84c011_0_pb_r, tmpz84c011_0_pb_w) | |
| 500 | AM_RANGE(0x52, 0x52) AM_READWRITE(tmpz84c011_0_pc_r, tmpz84c011_0_pc_w) | |
| 501 | AM_RANGE(0x30, 0x30) AM_READWRITE(tmpz84c011_0_pd_r, tmpz84c011_0_pd_w) | |
| 502 | AM_RANGE(0x40, 0x40) AM_READWRITE(tmpz84c011_0_pe_r, tmpz84c011_0_pe_w) | |
| 503 | AM_RANGE(0x54, 0x54) AM_READWRITE(tmpz84c011_0_dir_pa_r, tmpz84c011_0_dir_pa_w) | |
| 504 | AM_RANGE(0x55, 0x55) AM_READWRITE(tmpz84c011_0_dir_pb_r, tmpz84c011_0_dir_pb_w) | |
| 505 | AM_RANGE(0x56, 0x56) AM_READWRITE(tmpz84c011_0_dir_pc_r, tmpz84c011_0_dir_pc_w) | |
| 506 | AM_RANGE(0x34, 0x34) AM_READWRITE(tmpz84c011_0_dir_pd_r, tmpz84c011_0_dir_pd_w) | |
| 507 | AM_RANGE(0x44, 0x44) AM_READWRITE(tmpz84c011_0_dir_pe_r, tmpz84c011_0_dir_pe_w) | |
| 524 | 508 | AM_RANGE(0x80, 0x80) AM_WRITE(ym3812_control_port_0_w) |
| 525 | 509 | AM_RANGE(0x81, 0x81) AM_WRITE(ym3812_write_port_0_w) |
| 526 | 510 | ADDRESS_MAP_END |
| r3171 | r3172 | |
| 899 | 883 | MDRV_CPU_ADD("audio", Z80, 8000000/1) /* TMPZ84C011, 8.00 MHz */ |
| 900 | 884 | MDRV_CPU_CONFIG(daisy_chain_sound) |
| 901 | 885 | MDRV_CPU_PROGRAM_MAP(sound_readmem, sound_writemem) |
| 902 | MDRV_CPU_IO_MAP(sound_ | |
| 886 | MDRV_CPU_IO_MAP(sound_i | |
| 903 | 887 | |
| 904 | 888 | MDRV_MACHINE_RESET(niyanpai) |
| 905 | 889 | MDRV_NVRAM_HANDLER(generic_0fill) |
| r3171 | r3172 | |
| 1028 | 1012 | GAME( 1995, musobana, 0, musobana, musobana, niyanpai, ROT0, "Nichibutsu/Yubis", "Musoubana (Japan)", 0 ) |
| 1029 | 1013 | GAME( 1994, 4psimasy, 0, musobana, 4psimasy, niyanpai, ROT0, "SPHINX/AV JAPAN", "Mahjong 4P Simasyo (Japan)", 0 ) |
| 1030 | 1014 | GAME( 199?, mhhonban, 0, mhhonban, mhhonban, niyanpai, ROT0, "Nichibutsu?", "Mahjong Housoukyoku Honbanchuu (Japan)", 0 ) |
| 1015 |
| r3171 | r3172 | |
|---|---|---|
| 95 | 95 | AM_RANGE(0xe000, 0xffff) AM_RAM // RAM |
| 96 | 96 | ADDRESS_MAP_END |
| 97 | 97 | |
| 98 | ||
| 99 | static ADDRESS_MAP_START( paradise_readport, ADDRESS_SPACE_IO, 8 ) | |
| 100 | AM_RANGE(0x0000, 0x17ff) AM_READ(SMH_RAM ) // Palette | |
| 101 | AM_RANGE(0x2010, 0x2010) AM_READ(okim6295_status_0_r) // OKI 0 | |
| 102 | AM_RANGE(0x2030, 0x2030) AM_READ(okim6295_status_1_r) // OKI 1 | |
| 103 | AM_RANGE(0x2020, 0x2020) AM_READ_PORT("DSW1") | |
| 104 | AM_RANGE(0x2021, 0x2021) AM_READ_PORT("DSW2") | |
| 105 | AM_RANGE(0x2022, 0x2022) AM_READ_PORT("P1") | |
| 106 | AM_RANGE(0x2023, 0x2023) AM_READ_PORT("P2") | |
| 107 | AM_RANGE(0x2024, 0x2024) AM_READ_PORT("SYSTEM") | |
| 108 | AM_RANGE(0x8000, 0xffff) AM_READ(SMH_RAM ) // Pixmap | |
| 109 | ADDRESS_MAP_END | |
| 110 | ||
| 111 | static ADDRESS_MAP_START( paradise_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 112 | AM_RANGE(0x0000, 0x17ff) AM_WRITE(paradise_palette_w ) AM_BASE(&paletteram) // Palette | |
| 98 | static ADDRESS_MAP_START( paradise_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 99 | AM_RANGE(0x0000, 0x17ff) AM_RAM_WRITE(paradise_palette_w) AM_BASE(&paletteram) // Palette | |
| 113 | 100 | AM_RANGE(0x1800, 0x1800) AM_WRITE(paradise_priority_w ) // Layers priority |
| 114 | 101 | AM_RANGE(0x2001, 0x2001) AM_WRITE(paradise_flipscreen_w ) // Flip Screen |
| 115 | 102 | AM_RANGE(0x2004, 0x2004) AM_WRITE(paradise_palbank_w ) // Layers palette bank |
| 116 | 103 | AM_RANGE(0x2006, 0x2006) AM_WRITE(paradise_rombank_w ) // ROM bank |
| 117 | 104 | AM_RANGE(0x2007, 0x2007) AM_WRITE(paradise_okibank_w ) // OKI 1 samples bank |
| 118 | AM_RANGE(0x2010, 0x2010) AM_WRITE(okim6295_data_0_w ) // OKI 0 | |
| 119 | AM_RANGE(0x2030, 0x2030) AM_WRITE(okim6295_data_1_w ) // OKI 1 | |
| 120 | AM_RANGE(0x8000, 0xffff) AM_WRITE(paradise_pixmap_w ) AM_BASE(&videoram) // Pixmap | |
| 105 | AM_RANGE(0x2010, 0x2010) AM_READWRITE(okim6295_status_0_r, okim6295_data_0_w) // OKI 0 | |
| 106 | AM_RANGE(0x2020, 0x2020) AM_READ_PORT("DSW1" ) | |
| 107 | AM_RANGE(0x2021, 0x2021) AM_READ_PORT("DSW2" ) | |
| 108 | AM_RANGE(0x2022, 0x2022) AM_READ_PORT("P1" ) | |
| 109 | AM_RANGE(0x2023, 0x2023) AM_READ_PORT("P2" ) | |
| 110 | AM_RANGE(0x2024, 0x2024) AM_READ_PORT("SYSTEM" ) | |
| 111 | AM_RANGE(0x2030, 0x2030) AM_READWRITE(okim6295_status_1_r, okim6295_data_1_w) // OKI 1 | |
| 112 | AM_RANGE(0x8000, 0xffff) AM_RAM_WRITE(paradise_pixmap_w ) AM_BASE(&videoram) // Pixmap | |
| 121 | 113 | ADDRESS_MAP_END |
| 122 | 114 | |
| 123 | 115 | |
| r3171 | r3172 | |
| 538 | 530 | /* basic machine hardware */ |
| 539 | 531 | MDRV_CPU_ADD("main", Z80, XTAL_12MHz/2) /* Z8400B - 6mhz Verified */ |
| 540 | 532 | MDRV_CPU_PROGRAM_MAP(paradise_map,0) |
| 541 | MDRV_CPU_IO_MAP(paradise_ | |
| 533 | MDRV_CPU_IO_MAP(paradise_ | |
| 542 | 534 | MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,4) /* No nmi routine */ |
| 543 | 535 | |
| 544 | 536 | /* video hardware */ |
| r3171 | r3172 | |
| 1009 | 1001 | GAME( 1996, torus, 0, torus, torus, torus, ROT90, "Yun Sung", "Torus", 0 ) |
| 1010 | 1002 | GAME( 1998, madball, 0, madball, madball, tgtball, ROT0, "Yun Sung", "Mad Ball V2.0", 0 ) |
| 1011 | 1003 | GAME( 1997, madballn, madball, madball, madball, tgtball, ROT0, "Yun Sung", "Mad Ball V2.0 (With Nudity)", 0 ) |
| 1004 |
| r3171 | r3172 | |
|---|---|---|
| 230 | 230 | ADDRESS_MAP_END |
| 231 | 231 | |
| 232 | 232 | |
| 233 | static ADDRESS_MAP_START( | |
| 233 | static ADDRESS_MAP_START( io_ma | |
| 234 | 234 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 235 | AM_RANGE(0x00, 0xff) AM_READ(ioread) | |
| 235 | AM_RANGE(0x00, 0xff) AM_READWRITE(ioread, iowrite) | |
| 236 | 236 | ADDRESS_MAP_END |
| 237 | 237 | |
| 238 | 238 | |
| 239 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 240 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 241 | AM_RANGE(0x00, 0xff) AM_WRITE(iowrite) | |
| 242 | ADDRESS_MAP_END | |
| 243 | 239 | |
| 244 | ||
| 245 | ||
| 246 | 240 | /************************************* |
| 247 | 241 | * |
| 248 | 242 | * Port definitions |
| r3171 | r3172 | |
| 303 | 297 | /* basic machine hardware */ |
| 304 | 298 | MDRV_CPU_ADD("main", Z80, 5000000) |
| 305 | 299 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 306 | MDRV_CPU_IO_MAP( | |
| 300 | MDRV_CPU_IO_MAP(io_ma | |
| 307 | 301 | MDRV_CPU_VBLANK_INT("main", dribling_irq_gen) |
| 308 | 302 | |
| 309 | 303 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) |
| r3171 | r3172 | |
| 385 | 379 | |
| 386 | 380 | GAME( 1983, dribling, 0, dribling, dribling, 0, ROT0, "Model Racing", "Dribbling", GAME_NO_SOUND ) |
| 387 | 381 | GAME( 1983, driblino, dribling, dribling, dribling, 0, ROT0, "Model Racing (Olympia license)", "Dribbling (Olympia)", GAME_NO_SOUND ) |
| 382 |
| r3171 | r3172 | |
|---|---|---|
| 154 | 154 | * - These locations not populated |
| 155 | 155 | ES5506 - Ensonic ES5506 OTTOR2, clock 16.000MHz |
| 156 | 156 | 6809 - STMicroelectronics EF68B09, clock 2.000MHz |
| 157 | ENSONIC- DIP42 chip labelled 'ENSONIC (C)1992 2M 1350901601 9320 1.00' at location ROM0 | |
| 157 | ENSONIC- DIP42 chip labelled 'ENSONIC (C)1992 2M 1350901601 9320 1.00' at location SROM0 | |
| 158 | 158 | -This is actually a 16MBit DIP42 MaskROM |
| 159 | 159 | MM5437 - National Semiconductor MM5437 pseudo-random noise generator chip (DIP8) |
| 160 | 160 | LED1 - Sound Status Yellow LED, blinks when active |
| 161 | 161 | PAL1 - Labelled 'ITBP-1' |
| 162 | 162 | PAL2 - Labelled 'ITSS-1' |
| 163 | JP3 - 4 pin connector for right speaker output | |
| 163 | JP3 - 4 pin connector for right & left speaker output | |
| 164 | 164 | |
| 165 | 165 | Main Board |
| 166 | 166 | ---------- |
| r3171 | r3172 | |
| 208 | 208 | 62256 - MOSEL MS62256L-10PC 32k x8 SRAM (DIP28) |
| 209 | 209 | V52C8128K70 - Vitelic V52C8128K70 ?? possibly 128k x8 DRAM (SOJ40) |
| 210 | 210 | |
| 211 | **************************************************************************** | |
| 212 | ||
| 213 | Hard Yardage | |
| 214 | Strata/Incredible Technologies, 1993 | |
| 215 | ||
| 216 | PCB Layout | |
| 217 | ---------- | |
| 218 | ||
| 219 | Top (2 separate PCBs plugged into the main board) | |
| 220 | --- | |
| 221 | ||
| 222 | P/N 1060 REV 0 P/N 1061 REV 1 | |
| 223 | |---------------------------------| |---------------------------------| | |
| 224 | |6522 SND.U17 SROM0 | | ITFB3 ITFB2 | | |
| 225 | | 6809 6264 ENSONIC | | | | |
| 226 | | | | ITFB7 ITFB6 | | |
| 227 | | LED1 | | | | |
| 228 | | PAL1 | | ITFB11 ITFB10 | | |
| 229 | | | | | | |
| 230 | | *SROM2 SROM1 | | *GROM18 *GROM13 | | |
| 231 | | ES5506 16MHz | | | | |
| 232 | | MM5437 | | *GROM19 *GROM14 | | |
| 233 | | | | | | |
| 234 | | PAL2 | | ITFB1 ITFB0 | | |
| 235 | | | | | | |
| 236 | | VOL | | ITFB5 ITFB4 | | |
| 237 | | TDA1543 | | | | |
| 238 | | | | ITFB9 ITFB8 | | |
| 239 | | 555 3403 3403 | | | | |
| 240 | | | | *GROM8 *GROM3 | | |
| 241 | | | | | | |
| 242 | | JP3 | | *GROM9 *GROM4 | | |
| 243 | |---------------------------------| |---------------------------------| | |
| 244 | ||
| 245 | Notes: | |
| 246 | Same main board (P/N 1059 REV3) & sound PCB(P/N 1060 REV 0) as shown above. | |
| 247 | * - These locations not populated | |
| 248 | ||
| 249 | **************************************************************************** | |
| 250 | ||
| 251 | World Class Bowling | |
| 252 | Incredible Technologies, 1995 | |
| 253 | ||
| 254 | PCB Layout | |
| 255 | ---------- | |
| 256 | ||
| 257 | Top (2 separate PCBs plugged into the main board) | |
| 258 | --- | |
| 259 | ||
| 260 | P/N 1060 REV 0 P/N 1079 REV 1 | |
| 261 | |---------------------------------| |---------------------------------| | |
| 262 | |6522 SND.U17 SROM0 | | | | |
| 263 | | 6809 6264 ENSONIC | | GRM0_3 GRM0_2 | | |
| 264 | | | | | | |
| 265 | | LED1 | | GRM1_3 GRM1_2 | | |
| 266 | | PAL1 | | | | |
| 267 | | | | *GRM2_3 *GRM2_2 | | |
| 268 | | *SROM2 SROM1 | | | | |
| 269 | | ES5506 16MHz | | | | |
| 270 | | MM5437 | | | | |
| 271 | | | | GRM0_1 GRM0_0 | | |
| 272 | | PAL2 | | | | |
| 273 | | | | GRM1_1 GRM1_0 | | |
| 274 | | VOL | | | | |
| 275 | | TDA1543 | | *GRM2_1 *GRM2_0 | | |
| 276 | | | | | | |
| 277 | | 555 3403 3403 | | | | |
| 278 | | | | ITBWL-1 JP7| | |
| 279 | | | | 4MHz | | |
| 280 | | JP3 | | LED JP8| | |
| 281 | |---------------------------------| |---------------------------------| | |
| 282 | ||
| 283 | Notes: | |
| 284 | Same main board (P/N 1059 REV3) & sound PCB(P/N 1060 REV 0) as shown above. | |
| 285 | * - These locations not populated | |
| 286 | ENSONIC - DIP42 chip labelled 'ENSONIC (C)1993 2MX16U 1350901801 9312 1.00' at location SROM0 | |
| 287 | - This is actually a 16MBit DIP42 MaskROM | |
| 288 | ITBWL-1 PIC 16C54 used for protection | |
| 289 | JP7 6 Pin trackball connector (Player 1) | |
| 290 | JP8 6 Pin trackball connector (Player 2) | |
| 291 | ||
| 292 | ||
| 211 | 293 | ****************************************************************************/ |
| 212 | 294 | |
| 213 | 295 | #include "driver.h" |
| r3171 | r3172 | |
| 219 | 301 | #include "itech32.h" |
| 220 | 302 | #include "sound/es5506.h" |
| 221 | 303 | #include "machine/timekpr.h" |
| 222 | #include " | |
| 304 | #include "devconv.h" | |
| 223 | 305 | |
| 224 | 306 | |
| 225 | 307 | #define FULL_LOGGING 0 |
| r3171 | r3172 | |
| 366 | 448 | return special_result; |
| 367 | 449 | } |
| 368 | 450 | |
| 369 | static READ16_HANDLER( drivedge_special_port_r ) | |
| 370 | { | |
| 371 | int result = input_port_read(machine, "82000"); | |
| 372 | if (sound_int_state) result ^= 0x08; | |
| 373 | return result; | |
| 374 | } | |
| 375 | ||
| 376 | 451 | static READ16_HANDLER( trackball_r ) |
| 377 | 452 | { |
| 378 | 453 | int lower = input_port_read(machine, "TRACKX1"); |
| r3171 | r3172 | |
| 766 | 841 | int1_ack_w(machine, offset, data, mem_mask); |
| 767 | 842 | } |
| 768 | 843 | |
| 769 | static WRITE32_HANDLER( timekeeper | |
| 844 | static WRITE32_DEVICE_HANDLER( timekeeper | |
| 770 | 845 | { |
| 771 | write32be_with_write8_handler( timekeeper_ | |
| 846 | write32be_with_write8_device_handler( timekeeper_ | |
| 772 | 847 | } |
| 773 | 848 | |
| 774 | static READ32_HANDLER( timekeeper | |
| 849 | static READ32_DEVICE_HANDLER( timekeeper | |
| 775 | 850 | { |
| 776 | return read32be_with_read8_handler( timekeeper_ | |
| 851 | return read32be_with_read8_device_handler( timekeeper_ | |
| 777 | 852 | } |
| 778 | 853 | |
| 779 | 854 | |
| r3171 | r3172 | |
| 820 | 895 | } |
| 821 | 896 | |
| 822 | 897 | |
| 823 | static NVRAM_HANDLER( tournament ) | |
| 824 | { | |
| 825 | NVRAM_HANDLER_CALL(itech020); | |
| 826 | NVRAM_HANDLER_CALL(timekeeper_0); | |
| 827 | } | |
| 828 | ||
| 829 | ||
| 830 | ||
| 831 | 898 | /************************************* |
| 832 | 899 | * |
| 833 | 900 | * Main CPU memory handlers |
| r3171 | r3172 | |
| 920 | 987 | AM_RANGE(0x000c00, 0x007fff) AM_MIRROR(0x40000) AM_READWRITE(test2_r, test2_w) |
| 921 | 988 | #endif |
| 922 | 989 | AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x40000) AM_RAM AM_BASE((UINT32 **)&main_ram) AM_SIZE(&main_ram_size) |
| 923 | AM_RANGE(0x080000, 0x080003) AM_READ16(input_port_3_word_r, 0xffff0000) | |
| 924 | AM_RANGE(0x082000, 0x082003) AM_READ16(drivedge_special_port_r, 0xffff0000) | |
| 990 | AM_RANGE(0x080000, 0x080003) AM_READ_PORT("80000") | |
| 991 | AM_RANGE(0x082000, 0x082003) AM_READ_PORT("82000") | |
| 925 | 992 | AM_RANGE(0x084000, 0x084003) AM_READWRITE(sound_data32_r, sound_data32_w) |
| 926 | 993 | // AM_RANGE(0x086000, 0x08623f) AM_RAM -- networking -- first 0x40 bytes = our data, next 0x40*8 bytes = their data, r/w on IRQ2 |
| 927 | 994 | AM_RANGE(0x088000, 0x088003) AM_READ(drivedge_steering_r) |
| r3171 | r3172 | |
| 1231 | 1298 | PORT_SERVICE_DIPLOC( 0x80000000, IP_ACTIVE_HIGH, "SW1:1" ) |
| 1232 | 1299 | |
| 1233 | 1300 | PORT_START("80000") |
| 1234 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x06) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_PLAYER(3) | |
| 1301 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1302 | PORT_BIT( 0x00ff0000, 0x00000000, IPT_PEDAL ) PORT_MINMAX(0x00000000,0x00060000) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_PLAYER(3) | |
| 1235 | 1303 | |
| 1236 | 1304 | PORT_START("82000") |
| 1237 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x06) PORT_SENSITIVITY(2) PORT_KEYDELTA(40) PORT_PLAYER(2) | |
| 1305 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1306 | PORT_BIT( 0x00ff0000, 0x00000000, IPT_PEDAL ) PORT_MINMAX(0x00000000,0x00060000) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_PLAYER(2) | |
| 1238 | 1307 | |
| 1239 | 1308 | PORT_START("STEER") /* 88000 */ |
| 1240 | 1309 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) |
| r3171 | r3172 | |
| 1699 | 1768 | /* basic machine hardware */ |
| 1700 | 1769 | MDRV_IMPORT_FROM(sftm) |
| 1701 | 1770 | |
| 1702 | MDRV_ | |
| 1771 | MDRV_DEVICE_ | |
| 1703 | 1772 | MACHINE_DRIVER_END |
| 1704 | 1773 | |
| 1705 | 1774 | |
| r3171 | r3172 | |
| 1918 | 1987 | ROM_END |
| 1919 | 1988 | |
| 1920 | 1989 | |
| 1921 | ROM_START( hardyard ) | |
| 1990 | ROM_START( hardyard ) /* Version 1.2 (3-tier board set: P/N 1059 Rev 3, P/N 1061 Rev 1 & P/N 1060 Rev 0) */ | |
| 1922 | 1991 | ROM_REGION16_BE( 0x80000, "user1", 0 ) |
| 1923 | 1992 | ROM_LOAD16_BYTE( "fb00v12.u83", 0x00000, 0x40000, CRC(c7497692) SHA1(6c11535cf011e15dd7ffb5eba8e8da557c38277e) ) |
| 1924 | ROM_LOAD16_BYTE( "fb0 | |
| 1993 | ROM_LOAD16_BYTE( "fb01v12.u88", 0x00001, 0x40000, CRC(3320c79a) SHA1(d1d32048c541782e60c525d9789fe12607a6df3a) ) | |
| 1925 | 1994 | |
| 1926 | 1995 | ROM_REGION( 0x28000, "sound", 0 ) |
| 1927 | 1996 | ROM_LOAD( "fbsndv11.u17", 0x10000, 0x18000, CRC(d221b121) SHA1(06f351274a9dcb522f67f58499c9dc2ef5f06c07) ) |
| r3171 | r3172 | |
| 1950 | 2019 | ROM_END |
| 1951 | 2020 | |
| 1952 | 2021 | |
| 1953 | ROM_START( hardyd10 ) | |
| 2022 | ROM_START( hardyd10 ) /* Version 1.0 (3-tier board set: P/N 1059 Rev 3, P/N 1061 Rev 1 & P/N 1060 Rev 0) */ | |
| 1954 | 2023 | ROM_REGION16_BE( 0x80000, "user1", 0 ) |
| 1955 | ROM_LOAD16_BYTE( "hrdyrd.u83", 0x00000, 0x40000, CRC(f839393c) SHA1(ba06172bc4781f7738ce43019031715fee4b344c) ) | |
| 1956 | ROM_LOAD16_BYTE( "hrdyrd.u88", 0x00001, 0x40000, CRC(ca444702) SHA1(49bcc0994da9cd2c31c0cd78b822aceeaffd035f) ) | |
| 2024 | ROM_LOAD16_BYTE( "fb00v10.u83", 0x00000, 0x40000, CRC(f839393c) SHA1(ba06172bc4781f7738ce43019031715fee4b344c) ) | |
| 2025 | ROM_LOAD16_BYTE( "fb01v10.u88", 0x00001, 0x40000, CRC(ca444702) SHA1(49bcc0994da9cd2c31c0cd78b822aceeaffd035f) ) | |
| 1957 | 2026 | |
| 1958 | 2027 | ROM_REGION( 0x28000, "sound", 0 ) |
| 1959 | ROM_LOAD( " | |
| 2028 | ROM_LOAD( " | |
| 1960 | 2029 | ROM_CONTINUE( 0x08000, 0x08000 ) |
| 1961 | 2030 | |
| 1962 | 2031 | ROM_REGION( 0x880000, "gfx1", 0 ) |
| r3171 | r3172 | |
| 1982 | 2051 | ROM_END |
| 1983 | 2052 | |
| 1984 | 2053 | |
| 1985 | ROM_START( pairs ) | |
| 2054 | ROM_START( pairs ) /* Version 1.2 (3-tier board set: P/N 1059 Rev 3, P/N ???? Rev ? & P/N 1060 Rev 0) */ | |
| 1986 | 2055 | ROM_REGION16_BE( 0x80000, "user1", 0 ) |
| 1987 | ROM_LOAD16_BYTE( "pair0.u83", 0x00000, 0x20000, CRC(a9c761d8) SHA1(2618c9c3f336cf30f760fd88f12c09985cfd4ee7) ) | |
| 1988 | ROM_LOAD16_BYTE( "pair1.u88", 0x00001, 0x20000, CRC(5141eb86) SHA1(3bb10d588e6334a33e5c2c468651699e84f46cdc) ) | |
| 2056 | ROM_LOAD16_BYTE( "pair0v12.u83", 0x00000, 0x20000, CRC(a9c761d8) SHA1(2618c9c3f336cf30f760fd88f12c09985cfd4ee7) ) | |
| 2057 | ROM_LOAD16_BYTE( "pair1v12.u88", 0x00001, 0x20000, CRC(5141eb86) SHA1(3bb10d588e6334a33e5c2c468651699e84f46cdc) ) | |
| 1989 | 2058 | |
| 1990 | 2059 | ROM_REGION( 0x28000, "sound", 0 ) |
| 1991 | 2060 | ROM_LOAD( "snd.u17", 0x10000, 0x18000, CRC(7a514cfd) SHA1(ef5bc74c9560d2c058298051070fa748e58f07e1) ) |
| r3171 | r3172 | |
| 2009 | 2078 | ROM_END |
| 2010 | 2079 | |
| 2011 | 2080 | |
| 2012 | ROM_START( pairsa ) | |
| 2081 | ROM_START( pairsa ) /* Version ?? (3-tier board set: P/N 1059 Rev 3, P/N ???? Rev ? & P/N 1060 Rev 0) */ | |
| 2013 | 2082 | ROM_REGION16_BE( 0x80000, "user1", 0 ) |
| 2014 | ROM_LOAD16_BYTE( "pair0", 0x00000, 0x20000, CRC(774995a3) SHA1(93df91378b56802d14c105f7f48ed8a4f7bafffd) ) | |
| 2015 | ROM_LOAD16_BYTE( "pair1", 0x00001, 0x20000, CRC(85d0b73a) SHA1(48a6ac6de94be13e407da13e3e2440d858714b4b) ) | |
| 2083 | ROM_LOAD16_BYTE( "pair0.u83", 0x00000, 0x20000, CRC(774995a3) SHA1(93df91378b56802d14c105f7f48ed8a4f7bafffd) ) | |
| 2084 | ROM_LOAD16_BYTE( "pair1.u88", 0x00001, 0x20000, CRC(85d0b73a) SHA1(48a6ac6de94be13e407da13e3e2440d858714b4b) ) | |
| 2016 | 2085 | |
| 2017 | 2086 | ROM_REGION( 0x28000, "sound", 0 ) |
| 2018 | 2087 | ROM_LOAD( "snd.u17", 0x10000, 0x18000, CRC(7a514cfd) SHA1(ef5bc74c9560d2c058298051070fa748e58f07e1) ) |
| r3171 | r3172 | |
| 2035 | 2104 | ROM_LOAD16_BYTE( "srom0", 0x000000, 0x80000, CRC(1d96c581) SHA1(3b7c84b7db3b098ec28c7058c16f97e9cf0e4733) ) |
| 2036 | 2105 | ROM_END |
| 2037 | 2106 | |
| 2038 | ROM_START( hotmemry ) | |
| 2107 | ROM_START( hotmemry ) /* Version 1.2 (3-tier board set: P/N 1059 Rev 3, P/N ???? Rev ? & P/N 1060 Rev 0) */ | |
| 2039 | 2108 | ROM_REGION16_BE( 0x80000, "user1", 0 ) |
| 2040 | 2109 | ROM_LOAD16_BYTE( "hotmem0.u83", 0x00000, 0x40000, CRC(5b9d87a2) SHA1(5a1ca7b622832fcb641e081d0c2a49c38ca795cd) ) |
| 2041 | 2110 | ROM_LOAD16_BYTE( "hotmem1.u88", 0x00001, 0x40000, CRC(aeea087c) SHA1(3a8bdc04bc4051691823d0c5a1a3429475692100) ) |
| r3171 | r3172 | |
| 3892 | 3961 | init_shuffle_bowl_common(machine, 0x1116); |
| 3893 | 3962 | } |
| 3894 | 3963 | |
| 3964 | static void install_timekeeper(running_machine *machine) | |
| 3965 | { | |
| 3966 | const device_config *device = device_list_find_by_tag(machine->config->devicelist, M48T02, "m48t02"); | |
| 3967 | memory_install_readwrite32_device_handler(device, 0, ADDRESS_SPACE_PROGRAM, 0x681000, 0x6817ff, 0, 0, timekeeper_32be_r, timekeeper_32be_w); | |
| 3968 | } | |
| 3969 | ||
| 3895 | 3970 | static DRIVER_INIT( wcbowlt ) /* PIC 16C54 labeled as ITBWL-3 */ |
| 3896 | 3971 | { |
| 3897 | 3972 | /* Tournament Version, Same protection memory address as WCB Deluxe, but uses the standard WCB pic ITBWL-3 */ |
| 3898 | 3973 | init_shuffle_bowl_common(machine, 0x111a); |
| 3899 | 3974 | |
| 3900 | timekeeper_init( machine, 0, TIMEKEEPER_M48T02, NULL ); | |
| 3901 | memory_install_readwrite32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x681000, 0x6817ff, 0, 0, timekeeper_0_32be_r, timekeeper_0_32be_w); | |
| 3975 | install_timekeeper(machine); | |
| 3902 | 3976 | } |
| 3903 | 3977 | |
| 3904 | 3978 | static void init_gt_common(running_machine *machine) |
| r3171 | r3172 | |
| 3946 | 4020 | Tournament Version - So install needed handler for the TimeKeeper ram |
| 3947 | 4021 | */ |
| 3948 | 4022 | DRIVER_INIT_CALL(aama); |
| 3949 | timekeeper_init( machine, 0, TIMEKEEPER_M48T02, NULL ); | |
| 3950 | memory_install_readwrite32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x681000, 0x6817ff, 0, 0, timekeeper_0_32be_r, timekeeper_0_32be_w); | |
| 4023 | ||
| 4024 | install_timekeeper(machine); | |
| 3951 | 4025 | } |
| 3952 | 4026 | |
| 3953 | 4027 |
| r3171 | r3172 | |
|---|---|---|
| 108 | 108 | ADDRESS_MAP_END |
| 109 | 109 | |
| 110 | 110 | |
| 111 | static ADDRESS_MAP_START( | |
| 111 | static ADDRESS_MAP_START( io_ma | |
| 112 | 112 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 113 | 113 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
| 114 | 114 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
| 115 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW") | |
| 116 | AM_RANGE(0x04, 0x04) AM_READ_PORT("IN2") | |
| 117 | ADDRESS_MAP_END | |
| 118 | ||
| 119 | ||
| 120 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 121 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 122 | 115 | AM_RANGE(0x00, 0x01) AM_WRITE(sspeedr_sound_w) |
| 123 | 116 | AM_RANGE(0x02, 0x02) AM_WRITE(sspeedr_lamp_w) |
| 117 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW") | |
| 118 | AM_RANGE(0x04, 0x04) AM_READ_PORT("IN2") | |
| 124 | 119 | AM_RANGE(0x04, 0x05) AM_WRITE(sspeedr_time_w) |
| 125 | 120 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
| 126 | 121 | AM_RANGE(0x10, 0x10) AM_WRITE(sspeedr_driver_horz_w) |
| r3171 | r3172 | |
| 220 | 215 | /* basic machine hardware */ |
| 221 | 216 | MDRV_CPU_ADD("main", Z80, 19968000 / 8) |
| 222 | 217 | MDRV_CPU_PROGRAM_MAP(readmem, writemem) |
| 223 | MDRV_CPU_IO_MAP( | |
| 218 | MDRV_CPU_IO_MAP(io_ma | |
| 224 | 219 | MDRV_CPU_VBLANK_INT("main", irq0_line_assert) |
| 225 | 220 | |
| 226 | 221 | /* video hardware */ |
| r3171 | r3172 | |
| 260 | 255 | |
| 261 | 256 | |
| 262 | 257 | GAMEL( 1979, sspeedr, 0, sspeedr, sspeedr, 0, ROT270, "Midway", "Super Speed Race", GAME_NO_SOUND, layout_sspeedr ) |
| 258 |
| r3171 | r3172 | |
|---|---|---|
| 92 | 92 | AM_RANGE(0x4000, 0x4000) AM_WRITE(SMH_NOP) /* watchdog? */ |
| 93 | 93 | ADDRESS_MAP_END |
| 94 | 94 | |
| 95 | static ADDRESS_MAP_START( | |
| 95 | static ADDRESS_MAP_START( io_ma | |
| 96 | 96 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 97 | ADDRESS_MAP_END | |
| 98 | ||
| 99 | static ADDRESS_MAP_START( writeport2, ADDRESS_SPACE_IO, 8 ) | |
| 100 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 101 | 97 | AM_RANGE(0x00, 0x00) AM_WRITE(ay8910_write_port_0_w) |
| 102 | 98 | AM_RANGE(0x01, 0x01) AM_WRITE(ay8910_control_port_0_w) |
| 103 | 99 | AM_RANGE(0x80, 0x80) AM_WRITE(ay8910_write_port_1_w) |
| r3171 | r3172 | |
| 206 | 202 | |
| 207 | 203 | MDRV_CPU_ADD("audio", Z80, 4000000) /* ??? */ |
| 208 | 204 | MDRV_CPU_PROGRAM_MAP(readmem2,writemem2) |
| 209 | MDRV_CPU_IO_MAP( | |
| 205 | MDRV_CPU_IO_MAP(io_ma | |
| 210 | 206 | MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,4) /* ??? This controls the sound tempo */ |
| 211 | 207 | |
| 212 | 208 | /* video hardware */ |
| r3171 | r3172 | |
| 302 | 298 | |
| 303 | 299 | GAME( 1983, mouser, 0, mouser, mouser, mouser, ROT90, "UPL", "Mouser", 0 ) |
| 304 | 300 | GAME( 1983, mouserc, mouser, mouser, mouser, mouser, ROT90, "[UPL] (Cosmos license)", "Mouser (Cosmos)", 0 ) |
| 301 |
| r3171 | r3172 | |
|---|---|---|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | |
| 92 | static MACHINE_START( midzeus2 ) | |
| 93 | { | |
| 94 | timekeeper_init(machine, 0, TIMEKEEPER_M48T35, NULL); | |
| 95 | MACHINE_START_CALL(midzeus); | |
| 96 | } | |
| 97 | ||
| 98 | ||
| 99 | 92 | static MACHINE_RESET( midzeus ) |
| 100 | 93 | { |
| 101 | 94 | memcpy(ram_base, memory_region(machine, "user1"), 0x40000*4); |
| r3171 | r3172 | |
| 161 | 154 | * |
| 162 | 155 | *************************************/ |
| 163 | 156 | |
| 164 | static READ32_HANDLER( timekeeper_r ) | |
| 157 | static READ32_DEVICE_HANDLER( zeus2_timekeeper_r ) | |
| 165 | 158 | { |
| 166 | return timekeeper_ | |
| 159 | return timekeeper_ | |
| 167 | 160 | } |
| 168 | 161 | |
| 169 | 162 | |
| 170 | static WRITE32_HANDLER( timekeeper_w ) | |
| 163 | static WRITE32_DEVICE_HANDLER( zeus2_timekeeper_w ) | |
| 171 | 164 | { |
| 172 | 165 | if (bitlatch[2] && !cmos_protected) |
| 173 | timekeeper_ | |
| 166 | timekeeper_ | |
| 174 | 167 | else |
| 175 | logerror("%06X:timekeeper_w with bitlatch[2] = %d, cmos_protected = %d\n", activecpu_get_pc(), bitlatch[2], cmos_protected); | |
| 168 | logerror("%06X:zeus2_timekeeper_w with bitlatch[2] = %d, cmos_protected = %d\n", activecpu_get_pc(), bitlatch[2], cmos_protected); | |
| 176 | 169 | cmos_protected = TRUE; |
| 177 | 170 | } |
| 178 | 171 | |
| r3171 | r3172 | |
| 201 | 194 | |
| 202 | 195 | static NVRAM_HANDLER( midzeus2 ) |
| 203 | 196 | { |
| 204 | NVRAM_HANDLER_CALL(timekeeper_0); | |
| 205 | ||
| 206 | 197 | if (read_or_write) |
| 207 | 198 | mame_fwrite(file, zpram, zpram_size); |
| 208 | 199 | else if (file) |
| r3171 | r3172 | |
| 612 | 603 | AM_RANGE(0x990000, 0x99000f) AM_READWRITE(midway_ioasic_r, midway_ioasic_w) |
| 613 | 604 | AM_RANGE(0x9c0000, 0x9c000f) AM_READWRITE(analog_r, analog_w) |
| 614 | 605 | AM_RANGE(0x9e0000, 0x9e0000) AM_WRITENOP // watchdog? |
| 615 | AM_RANGE(0x9f0000, 0x9f7fff) AM_READWRITE(timekeeper_r, timekeeper_w) | |
| 606 | AM_RANGE(0x9f0000, 0x9f7fff) AM_DEVREADWRITE(M48T35, "m48t35", zeus2_timekeeper_r, zeus2_timekeeper_w) | |
| 616 | 607 | AM_RANGE(0x9f8000, 0x9f8000) AM_WRITE(cmos_protect_w) |
| 617 | 608 | AM_RANGE(0xa00000, 0xbfffff) AM_ROM AM_REGION("user1", 0) |
| 618 | 609 | AM_RANGE(0xc00000, 0xffffff) AM_ROMBANK(1) AM_REGION("user2", 0) |
| r3171 | r3172 | |
| 1143 | 1134 | MDRV_CPU_PROGRAM_MAP(zeus2_map,0) |
| 1144 | 1135 | MDRV_CPU_VBLANK_INT("main", display_irq) |
| 1145 | 1136 | |
| 1146 | MDRV_MACHINE_START(midzeus | |
| 1137 | MDRV_MACHINE_START(midzeus | |
| 1147 | 1138 | MDRV_MACHINE_RESET(midzeus) |
| 1148 | 1139 | MDRV_NVRAM_HANDLER(midzeus2) |
| 1149 | 1140 | |
| r3171 | r3172 | |
| 1157 | 1148 | |
| 1158 | 1149 | /* sound hardware */ |
| 1159 | 1150 | MDRV_IMPORT_FROM(dcs2_audio_2104) |
| 1151 | ||
| 1152 | MDRV_DEVICE_ADD( "m48t35", M48T35 ) | |
| 1160 | 1153 | MACHINE_DRIVER_END |
| 1161 | 1154 | |
| 1162 | 1155 |
| r3171 | r3172 | |
|---|---|---|
| 52 | 52 | |
| 53 | 53 | tilemap_draw(bitmap,cliprect,superdq_tilemap,0,0); |
| 54 | 54 | |
| 55 | /* display disc information */ | |
| 56 | popmessage("%s", laserdisc_describe_state(laserdisc)); | |
| 57 | ||
| 58 | 55 | return 0; |
| 59 | 56 | } |
| 60 | 57 |
| r3171 | r3172 | |
|---|---|---|
| 421 | 421 | ADDRESS_MAP_END |
| 422 | 422 | |
| 423 | 423 | |
| 424 | static ADDRESS_MAP_START( | |
| 424 | static ADDRESS_MAP_START( io_ma | |
| 425 | 425 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 426 | 426 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
| 427 | 427 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
| 428 | AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW2") | |
| 429 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") | |
| 430 | ||
| 431 | /* protection ports - Super Punchout only (move to install handler?) */ | |
| 432 | AM_RANGE(0x07, 0x07) AM_READ(spunchout_prot_0_r) | |
| 433 | AM_RANGE(0x17, 0x17) AM_READ(spunchout_prot_1_r) | |
| 434 | AM_RANGE(0x27, 0x27) AM_READ(spunchout_prot_2_r) | |
| 435 | AM_RANGE(0x37, 0x37) AM_READ(spunchout_prot_3_r) | |
| 436 | AM_RANGE(0x57, 0x57) AM_READ(spunchout_prot_5_r) | |
| 437 | AM_RANGE(0x67, 0x67) AM_READ(spunchout_prot_6_r) | |
| 438 | AM_RANGE(0x97, 0x97) AM_READ(spunchout_prot_9_r) | |
| 439 | AM_RANGE(0xa7, 0xa7) AM_READ(spunchout_prot_a_r) | |
| 440 | AM_RANGE(0xb7, 0xb7) AM_READ(spunchout_prot_b_r) | |
| 441 | AM_RANGE(0xc7, 0xc7) AM_READ(spunchout_prot_c_r) | |
| 442 | /* AM_RANGE(0xf7, 0xf7) AM_READ(spunchout_prot_f_r) */ | |
| 443 | ADDRESS_MAP_END | |
| 444 | ||
| 445 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 446 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 447 | 428 | AM_RANGE(0x00, 0x01) AM_WRITE(SMH_NOP) /* the 2A03 #1 is not present */ |
| 448 | AM_RANGE(0x02, 0x02) AM_WRITE(soundlatch_w) | |
| 449 | AM_RANGE(0x03, 0x03) AM_WRITE(soundlatch2_w) | |
| 429 | AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW2") AM_WRITE(soundlatch_w) | |
| 430 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") AM_WRITE(soundlatch2_w) | |
| 450 | 431 | AM_RANGE(0x04, 0x04) AM_WRITE(vlm5030_data_w) /* VLM5030 */ |
| 451 | 432 | AM_RANGE(0x05, 0x05) AM_WRITE(SMH_NOP) /* unused */ |
| 433 | AM_RANGE(0x06, 0x06) AM_WRITE(SMH_NOP) | |
| 452 | 434 | AM_RANGE(0x08, 0x08) AM_WRITE(interrupt_enable_w) |
| 453 | 435 | AM_RANGE(0x09, 0x09) AM_WRITE(SMH_NOP) /* watchdog reset, seldom used because 08 clears the watchdog as well */ |
| 454 | 436 | AM_RANGE(0x0a, 0x0a) AM_WRITE(SMH_NOP) /* ?? */ |
| r3171 | r3172 | |
| 458 | 440 | AM_RANGE(0x0e, 0x0e) AM_WRITE(punchout_speech_vcu_w) /* VLM5030 */ |
| 459 | 441 | AM_RANGE(0x0f, 0x0f) AM_WRITE(SMH_NOP) /* enable NVRAM ? */ |
| 460 | 442 | |
| 461 | AM_RANGE(0x06, 0x06) AM_WRITE(SMH_NOP) | |
| 462 | ||
| 463 | /* protection ports */ | |
| 464 | AM_RANGE(0x07, 0x07) AM_WRITE(spunchout_prot_0_w) | |
| 465 | AM_RANGE(0x17, 0x17) AM_WRITE(spunchout_prot_1_w) | |
| 466 | AM_RANGE(0x27, 0x27) AM_WRITE(spunchout_prot_2_w) | |
| 467 | AM_RANGE(0x37, 0x37) AM_WRITE(spunchout_prot_3_w) | |
| 468 | AM_RANGE(0x57, 0x57) AM_WRITE(spunchout_prot_5_w) | |
| 469 | AM_RANGE(0x67, 0x67) AM_WRITE(spunchout_prot_6_w) | |
| 470 | AM_RANGE(0xa7, 0xa7) AM_WRITE(spunchout_prot_a_w) | |
| 471 | AM_RANGE(0xb7, 0xb7) AM_WRITE(spunchout_prot_b_w) | |
| 443 | /* protection ports - Super Punchout only (move to install handler?) */ | |
| 444 | AM_RANGE(0x07, 0x07) AM_READWRITE(spunchout_prot_0_r, spunchout_prot_0_w) | |
| 445 | AM_RANGE(0x17, 0x17) AM_READWRITE(spunchout_prot_1_r, spunchout_prot_1_w) | |
| 446 | AM_RANGE(0x27, 0x27) AM_READWRITE(spunchout_prot_2_r, spunchout_prot_2_w) | |
| 447 | AM_RANGE(0x37, 0x37) AM_READWRITE(spunchout_prot_3_r, spunchout_prot_3_w) | |
| 448 | AM_RANGE(0x57, 0x57) AM_READWRITE(spunchout_prot_5_r, spunchout_prot_5_w) | |
| 449 | AM_RANGE(0x67, 0x67) AM_READWRITE(spunchout_prot_6_r, spunchout_prot_6_w) | |
| 450 | AM_RANGE(0x97, 0x97) AM_READ(spunchout_prot_9_r) | |
| 451 | AM_RANGE(0xa7, 0xa7) AM_READWRITE(spunchout_prot_a_r, spunchout_prot_a_w) | |
| 452 | AM_RANGE(0xb7, 0xb7) AM_READWRITE(spunchout_prot_b_r, spunchout_prot_b_w) | |
| 453 | AM_RANGE(0xc7, 0xc7) AM_READ(spunchout_prot_c_r) | |
| 472 | 454 | AM_RANGE(0xd7, 0xd7) AM_WRITE(spunchout_prot_d_w) |
| 473 | 455 | AM_RANGE(0xf7, 0xf7) AM_WRITE(spunchout_prot_f_w) |
| 456 | /* AM_RANGE(0xf7, 0xf7) AM_READ(spunchout_prot_f_r) */ | |
| 474 | 457 | ADDRESS_MAP_END |
| 475 | 458 | |
| 476 | 459 | static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 692 | 675 | /* basic machine hardware */ |
| 693 | 676 | MDRV_CPU_ADD("main", Z80, 8000000/2) /* 4 MHz */ |
| 694 | 677 | MDRV_CPU_PROGRAM_MAP(punchout_map,0) |
| 695 | MDRV_CPU_IO_MAP( | |
| 678 | MDRV_CPU_IO_MAP(io_ma | |
| 696 | 679 | MDRV_CPU_VBLANK_INT("top", nmi_line_pulse) |
| 697 | 680 | |
| 698 | 681 | MDRV_CPU_ADD("audio", N2A03, N2A03_DEFAULTCLOCK) |
| r3171 | r3172 | |
| 1126 | 1109 | GAME( 1984, spnchout, 0, punchout, spnchout, spnchout, ROT0, "Nintendo", "Super Punch-Out!!", 0 ) |
| 1127 | 1110 | GAME( 1984, spnchotj, spnchout, punchout, spnchout, spnchotj, ROT0, "Nintendo", "Super Punch-Out!! (Japan)", 0 ) |
| 1128 | 1111 | GAME( 1985, armwrest, 0, armwrest, armwrest, armwrest, ROT0, "Nintendo", "Arm Wrestling", 0 ) |
| 1112 |
| r3171 | r3172 | |
|---|---|---|
| 141 | 141 | AM_RANGE(0x0000, 0x0fff) AM_WRITE(SMH_ROM) |
| 142 | 142 | ADDRESS_MAP_END |
| 143 | 143 | |
| 144 | static ADDRESS_MAP_START( i8039_readport, ADDRESS_SPACE_IO, 8 ) | |
| 145 | AM_RANGE(0x00, 0xff) AM_READ(soundlatch_r) | |
| 146 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(i8039_T1_r) | |
| 147 | ADDRESS_MAP_END | |
| 148 | ||
| 149 | static ADDRESS_MAP_START( i8039_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 144 | static ADDRESS_MAP_START( i8039_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 145 | AM_RANGE(0x00, 0xff) AM_READ(soundlatch_r) | |
| 150 | 146 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(dac_0_data_w) |
| 151 | 147 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_w) |
| 152 | 148 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_WRITE(i8039_T0_w) |
| 149 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(i8039_T1_r) | |
| 153 | 150 | ADDRESS_MAP_END |
| 154 | 151 | |
| 155 | 152 | |
| 156 | ||
| 157 | 153 | static INPUT_PORTS_START( finalizr ) |
| 158 | 154 | PORT_START("SYSTEM") |
| 159 | 155 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r3171 | r3172 | |
| 323 | 319 | |
| 324 | 320 | MDRV_CPU_ADD("audio", I8039,18432000/2) /* 9.216MHz clkin ?? */ |
| 325 | 321 | MDRV_CPU_PROGRAM_MAP(i8039_readmem,i8039_writemem) |
| 326 | MDRV_CPU_IO_MAP(i8039_ | |
| 322 | MDRV_CPU_IO_MAP(i8039_io_ma | |
| 327 | 323 | |
| 328 | 324 | /* video hardware */ |
| 329 | 325 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 417 | 413 | |
| 418 | 414 | GAME( 1985, finalizr, 0, finalizr, finalizr, finalizr, ROT90, "Konami", "Finalizer - Super Transformation", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) |
| 419 | 415 | GAME( 1985, finalizb, finalizr, finalizr, finalizb, finalizr, ROT90, "bootleg", "Finalizer - Super Transformation (bootleg)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) |
| 416 |
| r3171 | r3172 | |
|---|---|---|
| 74 | 74 | EEPROM read/write/control |
| 75 | 75 | ****************************************************************/ |
| 76 | 76 | |
| 77 | /* the EEPROM is read thru bit 4 */ | |
| 78 | static READ16_HANDLER( xorworld_input_r ) | |
| 79 | { | |
| 80 | return input_port_read(machine, "DSW") | ((eeprom_read_bit() & 0x01) << 4); | |
| 81 | } | |
| 82 | ||
| 83 | 77 | static WRITE16_HANDLER( eeprom_chip_select_w ) |
| 84 | 78 | { |
| 85 | 79 | /* bit 0 is CS (active low) */ |
| r3171 | r3172 | |
| 103 | 97 | AM_RANGE(0x000000, 0x01ffff) AM_ROM |
| 104 | 98 | AM_RANGE(0x200000, 0x200001) AM_READ_PORT("P1") |
| 105 | 99 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P2") |
| 106 | AM_RANGE(0x600000, 0x600001) AM_READ | |
| 100 | AM_RANGE(0x600000, 0x600001) AM_READ | |
| 107 | 101 | AM_RANGE(0x800000, 0x800001) AM_WRITE(saa1099_write_port_0_lsb_w) |
| 108 | 102 | AM_RANGE(0x800002, 0x800003) AM_WRITE(saa1099_control_port_0_lsb_w) |
| 109 | 103 | AM_RANGE(0xa00008, 0xa00009) AM_WRITE(eeprom_chip_select_w) |
| r3171 | r3172 | |
| 118 | 112 | |
| 119 | 113 | |
| 120 | 114 | static INPUT_PORTS_START( xorworld ) |
| 121 | PORT_START("DSW") | |
| 115 | PORT_START("DSW") | |
| 122 | 116 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) |
| 123 | 117 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) |
| 124 | 118 | PORT_DIPSETTING( 0x01, DEF_STR( 2C_2C ) ) |
| r3171 | r3172 | |
| 131 | 125 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) |
| 132 | 126 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 133 | 127 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 134 | | |
| 128 | | |
| 135 | 129 | PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) ) |
| 136 | 130 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 137 | 131 | PORT_DIPSETTING( 0x60, DEF_STR( Normal ) ) |
| r3171 | r3172 | |
| 139 | 133 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 140 | 134 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 141 | 135 | |
| 142 | PORT_START("P1") | |
| 136 | PORT_START("P1") | |
| 143 | 137 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| 144 | 138 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 145 | 139 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| r3171 | r3172 | |
| 149 | 143 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 150 | 144 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 151 | 145 | |
| 152 | PORT_START("P2") | |
| 146 | PORT_START("P2") | |
| 153 | 147 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 154 | 148 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 155 | 149 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| r3171 | r3172 | |
|---|---|---|
| 137 | 137 | AM_RANGE(0xc000, 0xffff) AM_WRITE(SMH_ROM) /* banked ROM */ |
| 138 | 138 | ADDRESS_MAP_END |
| 139 | 139 | |
| 140 | static ADDRESS_MAP_START( | |
| 140 | static ADDRESS_MAP_START( | |
| 141 | 141 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 142 | 142 | AM_RANGE(0x07, 0x07) AM_WRITE(speedspn_global_display_w) |
| 143 | AM_RANGE(0x12, 0x12) AM_WRITE(speedspn_banked_rom_change) | |
| 144 | AM_RANGE(0x13, 0x13) AM_WRITE(speedspn_sound_w) | |
| 145 | AM_RANGE(0x17, 0x17) AM_WRITE(speedspn_banked_vidram_change) | |
| 146 | ADDRESS_MAP_END | |
| 147 | ||
| 148 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 149 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 150 | 143 | AM_RANGE(0x10, 0x10) AM_READ_PORT("SYSTEM") |
| 151 | 144 | AM_RANGE(0x11, 0x11) AM_READ_PORT("P1") |
| 152 | AM_RANGE(0x12, 0x12) AM_READ_PORT("P2") | |
| 153 | AM_RANGE(0x13, 0x13) AM_READ_PORT("DSW1") | |
| 145 | AM_RANGE(0x12, 0x12) AM_READ_PORT("P2") AM_WRITE(speedspn_banked_rom_change) | |
| 146 | AM_RANGE(0x13, 0x13) AM_READ_PORT("DSW1") AM_WRITE(speedspn_sound_w) | |
| 154 | 147 | AM_RANGE(0x14, 0x14) AM_READ_PORT("DSW2") |
| 155 | 148 | AM_RANGE(0x16, 0x16) AM_READ(speedspn_irq_ack_r) // @@@ could be watchdog, value is discarded |
| 149 | AM_RANGE(0x17, 0x17) AM_WRITE(speedspn_banked_vidram_change) | |
| 156 | 150 | ADDRESS_MAP_END |
| 157 | 151 | |
| 158 | ||
| 159 | 152 | /* sound cpu */ |
| 160 | 153 | |
| 161 | 154 | static ADDRESS_MAP_START( readmem2, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 304 | 297 | /* basic machine hardware */ |
| 305 | 298 | MDRV_CPU_ADD("main",Z80,6000000) /* 6 MHz */ |
| 306 | 299 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 307 | MDRV_CPU_IO_MAP( | |
| 300 | MDRV_CPU_IO_MAP(io_ma | |
| 308 | 301 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 309 | 302 | |
| 310 | 303 | MDRV_CPU_ADD("audio", Z80,6000000) /* 6 MHz */ |
| r3171 | r3172 | |
| 374 | 367 | /*** GAME DRIVERS ************************************************************/ |
| 375 | 368 | |
| 376 | 369 | GAME( 1994, speedspn, 0, speedspn, speedspn, 0, ROT180, "TCH", "Speed Spin", GAME_IMPERFECT_GRAPHICS ) |
| 370 |
| r0 | r3172 | |
|---|---|---|
| 1 | /************************************************************************* | |
| 2 | ||
| 3 | VIDEO POKER - INTERFLIP | |
| 4 | ----------------------- | |
| 5 | ||
| 6 | Original driver by Grull Osgo. | |
| 7 | Rewrite and additional work by Roberto Fresca. | |
| 8 | ||
| 9 | ||
| 10 | Games running on this hardware: | |
| 11 | ||
| 12 | * Video Poker, 1984, InterFlip. | |
| 13 | * Black Jack, 1984, InterFlip. | |
| 14 | * Video Dado, 1987, InterFlip. | |
| 15 | * Video Cordoba, 1987, InterFlip. | |
| 16 | ||
| 17 | ||
| 18 | *************************************************************************** | |
| 19 | ||
| 20 | ||
| 21 | History: | |
| 22 | ======== | |
| 23 | ||
| 24 | InterFlip (Spain), is a subsidiary of Recreativos Franco. | |
| 25 | This company was created mainly with the purpose of manufacture | |
| 26 | and distribute export-class games. | |
| 27 | ||
| 28 | These machines were build in upright wood style cabinets, and compliment | |
| 29 | with class "C" (for casinos) spanish gaming regulations. | |
| 30 | ||
| 31 | ||
| 32 | *************************************************************************** | |
| 33 | ||
| 34 | ||
| 35 | Hardware Info | |
| 36 | ============= | |
| 37 | ||
| 38 | This is a two board system: Main & Sound board. | |
| 39 | ||
| 40 | ||
| 41 | * Main board: | |
| 42 | ||
| 43 | 1x Intel 8039 CPU Clocked @ 6/8 MHz. | |
| 44 | 2x 2716 EPROM Program ROM. | |
| 45 | 2x 2716 EPROM Character/graphics ROM. | |
| 46 | 1x 5101 (256 x 4) SRAM Data Memory (Battery Backed RAM). | |
| 47 | 2x 2114 (1024 x 4) SRAM 8-Bit Char. RAM. | |
| 48 | 1x 2114 (1024 x 4) SRAM 4-Bit Color RAM. | |
| 49 | 1x 74s287 (256 x 4) TTL PROM Color PROM. | |
| 50 | ||
| 51 | 1x 6 MHz.(or 8 MHz.) Crystal CPU clock. | |
| 52 | 1x 7.8643 MHz. Crystal Video System. | |
| 53 | ||
| 54 | 1x 3.6 Ni-Cd Battery Data Memory. | |
| 55 | ||
| 56 | TTL type Raster video Configurable HIGH-LOW resolution through hardware jumper. | |
| 57 | Configurable 50Hz-60Hz V-Sync through hardware jumper. | |
| 58 | ||
| 59 | I/O System Buffered, latched & optocoupled. | |
| 60 | ||
| 61 | ||
| 62 | * Sound board: | |
| 63 | ||
| 64 | 1x Intel 8039 CPU Clocked @ 8 MHz. | |
| 65 | 2x 2716 EPROM Program ROM. | |
| 66 | 1x 1408 DAC | |
| 67 | 1x 8.0000 MHz. Crystal | |
| 68 | ||
| 69 | ||
| 70 | ******************************************************************************** | |
| 71 | ||
| 72 | ||
| 73 | Main CPU Memory Map | |
| 74 | =================== | |
| 75 | ||
| 76 | 0x0000 - 0x0FFF Program ROM. | |
| 77 | ||
| 78 | Data & Video RAM are mapped through I/O hardware implementations due to | |
| 79 | I8039 memory addressing restrictions. | |
| 80 | ||
| 81 | ||
| 82 | Main CPU I/0 Map | |
| 83 | ================ | |
| 84 | ||
| 85 | P1.0 ; Used at bit level, Aux_0 signal. | |
| 86 | P1.1 ; Used at bit level, Aux_1 signal. | |
| 87 | P1.2 ; Used at bit level, Aux_2 signal. | |
| 88 | P1.3 ; Used at bit level, Aux_3 signal. | |
| 89 | P1.4 ; Used at bit level, Aux_4 signal & Sound Latch bit 3 | |
| 90 | P1.5 ; Used at bit level, Aux_5 signal & Sound Latch bit 0 | |
| 91 | P1.6 ; Expands address bus for video and color RAM access (V.A8) | |
| 92 | P1.7 ; Expands address bus for video and color RAM access (V.A9) | |
| 93 | ||
| 94 | P2.0 - P2.3: ; I8039 as address bus expansion (Program memory - High address nibble). | |
| 95 | ||
| 96 | P2.4: ; Reads 8 bits from data buffer input port (interface for switch encoder). | |
| 97 | Bit 0: Lamp_1. | |
| 98 | Bit 1: Lamp_2. | |
| 99 | Bit 2: Lamp_3. | |
| 100 | Bit 3: Lamp_4. | |
| 101 | Bit 4: Coin Acceptor. | |
| 102 | Bit 5: Hopper 1 & Sound Latch bit 1. | |
| 103 | Bit 6: Hopper 2 & Sound Latch bit 2. | |
| 104 | Bit 7: Diverter. | |
| 105 | ||
| 106 | Writes 8 bits to data latch out port (lamps, relays and coils). | |
| 107 | Bit 0: SW_encoder_0. | |
| 108 | Bit 1: SW_encoder_1. | |
| 109 | Bit 2: SW_encoder_2. | |
| 110 | Bit 3: SW_encoder_3. | |
| 111 | Bit 4: Coin Out. | |
| 112 | Bit 5: Undocumented jumper. | |
| 113 | Bit 6: N/U (pulled up). | |
| 114 | Bit 7: N/U (pulled up). | |
| 115 | ||
| 116 | P2.5: ; Enable access to data RAM. | |
| 117 | P2.6: ; Enable access to video RAM (write mode) - no read mode. | |
| 118 | P2.7: ; Enable access to color RAM (write Mode) - no read mode. | |
| 119 | ||
| 120 | ||
| 121 | ******************************************************************************** | |
| 122 | ||
| 123 | ||
| 124 | Game Info | |
| 125 | ========= | |
| 126 | ||
| 127 | Pay Tables: | |
| 128 | ||
| 129 | These machines had its pay tables out of screen, in the upper front panel (backlighted). | |
| 130 | ||
| 131 | ||
| 132 | Video Poker (Spanish text only) | |
| 133 | ---------------------------------------------------------------------------- | |
| 134 | Fichas Jugadas 1 Ficha 2 Fichas 3 Fichas 4 Fichas 5 Fichas | |
| 135 | ---------------------------------------------------------------------------- | |
| 136 | Escalera Maxima 250 500 750 1000 4000 | |
| 137 | de color | |
| 138 | ||
| 139 | Escalera de Color 100 200 300 400 500 | |
| 140 | ||
| 141 | Poker 50 100 150 200 250 | |
| 142 | ||
| 143 | Full 11 22 33 44 55 | |
| 144 | ||
| 145 | Color 7 14 21 28 35 | |
| 146 | ||
| 147 | Escalera 5 10 15 20 25 | |
| 148 | ||
| 149 | Trio 3 6 9 12 15 | |
| 150 | ||
| 151 | Doble Pareja 2 4 6 8 10 | |
| 152 | ---------------------------------------------------------------------------- | |
| 153 | ||
| 154 | ||
| 155 | Black Jack (Spanish text only) | |
| 156 | ---------------------------------------------------------------------------- | |
| 157 | Fichas Jugadas 1 Ficha 2 Fichas 3 Fichas 4 Fichas 5 Fichas | |
| 158 | ---------------------------------------------------------------------------- | |
| 159 | Empate 1 2 3 4 5 | |
| 160 | ||
| 161 | La Banca se pasa 2 4 6 8 10 | |
| 162 | ||
| 163 | Jugador tiene mas 2 4 6 8 10 | |
| 164 | que la banca | |
| 165 | ||
| 166 | Jugador tiene menos 2 4 6 8 10 | |
| 167 | de 22 con 6 cartas | |
| 168 | ||
| 169 | Jugador tiene blackjack 2 5 7 10 12 | |
| 170 | y la Banca no | |
| 171 | ---------------------------------------------------------------------------- | |
| 172 | ||
| 173 | ||
| 174 | Video Cordoba | |
| 175 | ---------------------------------------------------------------------------- | |
| 176 | Fichas Jugadas 1 Ficha 2 Fichas 3 Fichas 4 Fichas 5 Fichas | |
| 177 | ---------------------------------------------------------------------------- | |
| 178 | TRIPLE BAR 250 250 250 250 2000 | |
| 179 | ............................................................................ | |
| 180 | 3 x Doble Bar - 100 | Olive-Olive-Any Bar - 18 | |
| 181 | 3 x Single Bar - 50 | 3 x Orange - 14 | |
| 182 | 3 x Any Bar - 20 | Orange-Orange-Any Bar - 14 | |
| 183 | 3 x Bell - 20 | 3 x Cherry - 10 | |
| 184 | Bell-Bell-Any Bar - 20 | 2 x Cherry - 5 | |
| 185 | 3 x Olive - 10 | 1 x Cherry - 2 | |
| 186 | ............................................................................ | |
| 187 | All combinations are valid only from left to rigth | |
| 188 | ---------------------------------------------------------------------------- | |
| 189 | ||
| 190 | ||
| 191 | Video Dado | |
| 192 | --------------------------------------------- | |
| 193 | Twelve (12) 33 x 1 | |
| 194 | Eleven (11) 16 x 1 | |
| 195 | Crap (2,3,12) 8 x 1 | |
| 196 | Seven (7) 5 x 1 | |
| 197 | Field (2,12) 3 x 1 | |
| 198 | 8 or More (8,9,10,11,12) 2 x 1 | |
| 199 | 6 or Less (2,3,4,5,6) 2 x 1 | |
| 200 | ||
| 201 | Winnings less or equal to 25 can be re-played | |
| 202 | --------------------------------------------- | |
| 203 | ||
| 204 | ||
| 205 | All payments with less than 400 coins are done through hopper. | |
| 206 | (you need to press "Coin Out" button once per coin due to the lack of hopper emulation) | |
| 207 | ||
| 208 | Payments over 400 coins are manual. | |
| 209 | ||
| 210 | ||
| 211 | ************************************************************************** | |
| 212 | ||
| 213 | ||
| 214 | TO DO | |
| 215 | ===== | |
| 216 | ||
| 217 | * Fix the bug on bookeeping mode (videodad & videocba). | |
| 218 | * Figure out the undocumented jumper. | |
| 219 | * Properly dump the videocba color PROM. | |
| 220 | * Button-lamps layout. | |
| 221 | * Hopper simulation. | |
| 222 | * Decode output ports for electromechanical counters. | |
| 223 | ||
| 224 | ||
| 225 | **************************************************************************/ | |
| 226 | ||
| 227 | ||
| 228 | #define CPU_CLOCK (XTAL_6MHz) /* main cpu clock */ | |
| 229 | #define CPU_CLOCK_ALT (XTAL_8MHz) /* alternative main cpu clock for newer games */ | |
| 230 | #define SOUND_CLOCK (XTAL_8MHz) /* sound cpu clock */ | |
| 231 | #define VIDEO_CLOCK (XTAL_7.8643MHz) | |
| 232 | ||
| 233 | ||
| 234 | #include "driver.h" | |
| 235 | #include "cpu/mcs48/mcs48.c" | |
| 236 | #include "sound/dac.h" | |
| 237 | ||
| 238 | #define DATA_NVRAM_SIZE 0x100 | |
| 239 | ||
| 240 | static UINT8 data_ram[0x100]; | |
| 241 | static UINT8 video_ram[0x0400]; | |
| 242 | static UINT8 color_ram[0x0400]; | |
| 243 | static UINT16 p1, p2; | |
| 244 | static UINT8 t0_latch; | |
| 245 | static UINT16 n_offs; | |
| 246 | static emu_timer *t1_timer; | |
| 247 | ||
| 248 | static UINT8 vp_sound_p2; | |
| 249 | static UINT8 p24_data; | |
| 250 | static UINT8 sound_latch; | |
| 251 | static UINT8 sound_ant; | |
| 252 | static UINT8 dc_4020; | |
| 253 | static UINT8 dc_40103; | |
| 254 | static UINT8 te_40103; | |
| 255 | static UINT8 ld_40103; | |
| 256 | ||
| 257 | UINT8 c_io, hp_1, hp_2, bell, aux3; | |
| 258 | ||
| 259 | ||
| 260 | /************************* | |
| 261 | * Video Hardware * | |
| 262 | *************************/ | |
| 263 | ||
| 264 | static tilemap *bg_tilemap; | |
| 265 | ||
| 266 | ||
| 267 | PALETTE_INIT( videopkr ) | |
| 268 | { | |
| 269 | int i; | |
| 270 | ||
| 271 | for (i = 0; i < machine->config->total_colors; i++) | |
| 272 | { | |
| 273 | int r, g, b, j; | |
| 274 | ||
| 275 | j = 0x30 * ((color_prom[i] >> 3) & 0x01); | |
| 276 | ||
| 277 | /* red component */ | |
| 278 | r = j + 0xbf - (0xbf * ((color_prom[i] >> 0) & 0x01)); | |
| 279 | ||
| 280 | /* green component */ | |
| 281 | g = j + 0xbf - (0xbf * ((color_prom[i] >> 1) & 0x01)); | |
| 282 | ||
| 283 | /* blue component */ | |
| 284 | b = j + 0xbf - (0xbf * ((color_prom[i] >> 2) & 0x01)); | |
| 285 | ||
| 286 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 287 | } | |
| 288 | } | |
| 289 | ||
| 290 | ||
| 291 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 292 | { | |
| 293 | int offs = tile_index; | |
| 294 | int attr = color_ram[offs]; | |
| 295 | int code = video_ram[offs]; | |
| 296 | int color = attr; | |
| 297 | ||
| 298 | SET_TILE_INFO(0, code, color, 0); | |
| 299 | } | |
| 300 | ||
| 301 | ||
| 302 | VIDEO_START( videopkr ) | |
| 303 | { | |
| 304 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 305 | } | |
| 306 | ||
| 307 | VIDEO_START( vidadcba ) | |
| 308 | { | |
| 309 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 16, 8, 32, 32); | |
| 310 | } | |
| 311 | ||
| 312 | ||
| 313 | VIDEO_UPDATE( videopkr ) | |
| 314 | { | |
| 315 | tilemap_mark_all_tiles_dirty(bg_tilemap); | |
| 316 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 317 | return 0; | |
| 318 | } | |
| 319 | ||
| 320 | ||
| 321 | /******************** | |
| 322 | * NVRAM Handler * | |
| 323 | ********************/ | |
| 324 | ||
| 325 | static NVRAM_HANDLER( videopkr ) | |
| 326 | { | |
| 327 | if (read_or_write) | |
| 328 | { | |
| 329 | mame_fwrite(file, data_ram, DATA_NVRAM_SIZE); | |
| 330 | } | |
| 331 | else | |
| 332 | { | |
| 333 | if (file) | |
| 334 | { | |
| 335 | mame_fread(file, data_ram, DATA_NVRAM_SIZE); | |
| 336 | } | |
| 337 | else | |
| 338 | { | |
| 339 | memset(data_ram, 0, DATA_NVRAM_SIZE); | |
| 340 | } | |
| 341 | } | |
| 342 | } | |
| 343 | ||
| 344 | ||
| 345 | /************************* | |
| 346 | * R/W Handlers * | |
| 347 | *************************/ | |
| 348 | ||
| 349 | static READ8_HANDLER( videopkr_io_r ) | |
| 350 | { | |
| 351 | UINT8 valor = 0xff; | |
| 352 | UINT16 kbdin = 0x0000; | |
| 353 | ||
| 354 | switch (p2) | |
| 355 | { | |
| 356 | case 0xef: /* inputs are multiplexed through a diode matrix */ | |
| 357 | { | |
| 358 | kbdin = (input_port_read(machine, "IN1") << 8) + input_port_read(machine, "IN0"); | |
| 359 | ||
| 360 | switch (kbdin) | |
| 361 | { | |
| 362 | case 0x0001: valor = 0x01; break; | |
| 363 | case 0x0002: valor = 0x04; break; | |
| 364 | case 0x0004: valor = 0x05; break; | |
| 365 | case 0x0008: valor = 0x07; break; | |
| 366 | case 0x0010: valor = 0x08; break; | |
| 367 | case 0x0020: valor = 0x09; break; | |
| 368 | case 0x0040: valor = 0x0a; break; | |
| 369 | case 0x0080: valor = 0x0b; break; | |
| 370 | case 0x0100: valor = 0x0c; break; | |
| 371 | case 0x0200: valor = 0x0d; break; | |
| 372 | case 0x0400: valor = 0x0e; break; | |
| 373 | case 0x0800: valor = 0x0f; break; | |
| 374 | case 0x1000: valor = 0x10; break; | |
| 375 | ||
| 376 | default: valor = 0x00; | |
| 377 | } | |
| 378 | break; | |
| 379 | } | |
| 380 | case 0xdf: | |
| 381 | { | |
| 382 | n_offs = ((p1 & 0xc0) << 2 ) + offset; | |
| 383 | valor = data_ram[offset]; | |
| 384 | break; | |
| 385 | } | |
| 386 | case 0x5f: | |
| 387 | { | |
| 388 | n_offs = ((p1 & 0xc0) << 2 ) + offset; | |
| 389 | valor = data_ram[offset]; | |
| 390 | break; | |
| 391 | } | |
| 392 | case 0x7c: | |
| 393 | case 0x7d: | |
| 394 | case 0x7e: | |
| 395 | case 0x7f: | |
| 396 | { | |
| 397 | n_offs = ((p1 & 0xc0) << 2 ) + offset; | |
| 398 | valor = color_ram[n_offs] & 0x0f; | |
| 399 | break; | |
| 400 | } | |
| 401 | case 0xbc: | |
| 402 | case 0xbd: | |
| 403 | case 0xbe: | |
| 404 | case 0xbf: | |
| 405 | { | |
| 406 | n_offs = ((p1 & 0xc0) << 2 ) + offset; | |
| 407 | valor = video_ram[n_offs]; | |
| 408 | break; | |
| 409 | } | |
| 410 | } | |
| 411 | ||
| 412 | return valor; | |
| 413 | } | |
| 414 | ||
| 415 | static WRITE8_HANDLER( videopkr_io_w ) | |
| 416 | { | |
| 417 | switch (p2) | |
| 418 | { | |
| 419 | case 0x3c: | |
| 420 | case 0x3d: | |
| 421 | case 0x3e: | |
| 422 | case 0x3f: | |
| 423 | { | |
| 424 | n_offs = ((p1 & 0xc0) << 2 ) + offset; | |
| 425 | color_ram[n_offs] = data & 0x0f; | |
| 426 | video_ram[n_offs] = data; | |
| 427 | tilemap_mark_tile_dirty(bg_tilemap, n_offs); | |
| 428 | break; | |
| 429 | } | |
| 430 | case 0xdf: | |
| 431 | { | |
| 432 | data_ram[offset] = (data & 0x0f) + 0xf0; | |
| 433 | break; | |
| 434 | } | |
| 435 | case 0x7c: | |
| 436 | case 0x7d: | |
| 437 | case 0x7e: | |
| 438 | case 0x7f: | |
| 439 | { | |
| 440 | n_offs = ((p1 & 0xc0) << 2 ) + offset; | |
| 441 | color_ram[n_offs] = data & 0x0f; | |
| 442 | tilemap_mark_tile_dirty(bg_tilemap, n_offs); | |
| 443 | break; | |
| 444 | } | |
| 445 | case 0xbc: | |
| 446 | case 0xbd: | |
| 447 | case 0xbe: | |
| 448 | case 0xbf: | |
| 449 | { | |
| 450 | n_offs = ((p1 & 0xc0) << 2 ) + offset; | |
| 451 | video_ram[n_offs] = data; | |
| 452 | tilemap_mark_tile_dirty(bg_tilemap, n_offs); | |
| 453 | break; | |
| 454 | } | |
| 455 | case 0xef: /* Port 2.4 */ | |
| 456 | { | |
| 457 | output_set_lamp_value(0, (data & 1)); /* L_1 */ | |
| 458 | output_set_lamp_value(1, ((data >> 1)& 1)); /* L_2 */ | |
| 459 | output_set_lamp_value(2, ((data >> 2) & 1)); /* L_3 */ | |
| 460 | output_set_lamp_value(3, ((data >> 3) & 1)); /* L_4 */ | |
| 461 | output_set_lamp_value(4, ((data >> 4) & 1)); /* Coin */ | |
| 462 | output_set_lamp_value(5, ((data >> 5) & 1)); /* Hopper_1 */ | |
| 463 | output_set_lamp_value(6, ((data >> 6) & 1)); /* Hopper_2 */ | |
| 464 | output_set_lamp_value(7, ((data >> 7) & 1)); /* Diverter */ | |
| 465 | p24_data = data; | |
| 466 | ||
| 467 | break; | |
| 468 | } | |
| 469 | case 0xff: | |
| 470 | { | |
| 471 | t0_latch = t0_latch ^ 0x01; /* fix the bookkeeping mode */ | |
| 472 | break; | |
| 473 | } | |
| 474 | } | |
| 475 | } | |
| 476 | ||
| 477 | static READ8_HANDLER( videopkr_p1_data_r ) | |
| 478 | { | |
| 479 | return p1; | |
| 480 | } | |
| 481 | ||
| 482 | static READ8_HANDLER( videopkr_p2_data_r ) | |
| 483 | { | |
| 484 | return p2; | |
| 485 | } | |
| 486 | ||
| 487 | static WRITE8_HANDLER( videopkr_p1_data_w ) | |
| 488 | { | |
| 489 | p1 = data; | |
| 490 | ||
| 491 | output_set_lamp_value(8, (data & 1)); /* Aux_0 - */ | |
| 492 | output_set_lamp_value(9, ((data >> 1) & 1)); /* Aux_1 - */ | |
| 493 | output_set_lamp_value(10, ((data >> 2) & 1)); /* Aux_2 - */ | |
| 494 | output_set_lamp_value(11, ((data >> 3) & 1)); /* Aux_3 - */ | |
| 495 | output_set_lamp_value(12, ((data >> 4) & 1)); /* Aux_4 - Bell */ | |
| 496 | output_set_lamp_value(13, ((data >> 5) & 1)); /* Aux_5 - /CIO */ | |
| 497 | } | |
| 498 | ||
| 499 | static WRITE8_HANDLER( videopkr_p2_data_w ) | |
| 500 | { | |
| 501 | p2 = data; | |
| 502 | } | |
| 503 | ||
| 504 | static READ8_HANDLER( videopkr_t0_latch ) | |
| 505 | { | |
| 506 | return t0_latch; | |
| 507 | } | |
| 508 | ||
| 509 | static WRITE8_HANDLER(p4_w) | |
| 510 | { | |
| 511 | cputag_set_input_line(machine, "main", 0, CLEAR_LINE); /* clear interrupt FF */ | |
| 512 | } | |
| 513 | ||
| 514 | /************************* | |
| 515 | * Sound Handlers * | |
| 516 | *************************/ | |
| 517 | /* | |
| 518 | ||
| 519 | Sound Data ( Sound Board latch ) | |
| 520 | ||
| 521 | Data Bit Comes from | |
| 522 | --------------------------------------------- | |
| 523 | bit 0 Coin I/O Port 1.5 | |
| 524 | bit 1 Hopper2 Port 2.4 Data Bit 6 | |
| 525 | bit 2 Hopper1 Port 2.4 Data Bit 5 | |
| 526 | bit 3 Bell Port 1.4 | |
| 527 | bit 4 Aux_3 Port 1.3 | |
| 528 | bit 5 N/U Pulled Up | |
| 529 | bit 6 N/U Pulled Up | |
| 530 | bit 7 N/U Pulled Up | |
| 531 | ||
| 532 | ||
| 533 | Sound Codes | |
| 534 | ||
| 535 | Hex Bin Sound Game | |
| 536 | -------------------------------------------------------------------------- | |
| 537 | 0xFF 11111111 No Sound (default state) All Games. | |
| 538 | 0xFE 11111110 Coin In sound All Games. | |
| 539 | 0xEF 11101111 Cards draw sound Video Poker & Black Jack. | |
| 540 | 0xF9 11111001 Hopper run Video Poker & Black Jack. | |
| 541 | 0xF8 11111000 Coin Out sound Video Poker & Black Jack. | |
| 542 | 0xF6 11110110 Coin Out sound Video Dado & Video Cordoba. | |
| 543 | 0xFA 11111010 Dice rolling sound Video Dado. | |
| 544 | 0xFA 11111010 Spinning reels sound Video Cordoba. | |
| 545 | 0xFB 11111011 Dice rolling sound Video Dado. | |
| 546 | 0xFB 11111011 Stopping reels sound Video Cordoba. | |
| 547 | ||
| 548 | */ | |
| 549 | ||
| 550 | static READ8_HANDLER(sound_io_r) | |
| 551 | { | |
| 552 | switch (vp_sound_p2) | |
| 553 | { | |
| 554 | case 0xbf: | |
| 555 | { | |
| 556 | c_io = (p1 >> 5) & 1; | |
| 557 | hp_1 = (~p24_data >> 6) & 1; | |
| 558 | hp_2 = (~p24_data >> 5) & 1; | |
| 559 | bell = (p1 >> 4) & 1; | |
| 560 | ||
| 561 | sound_ant = sound_latch; | |
| 562 | sound_latch = c_io + (hp_1 << 1) + (hp_2 << 2) + (bell << 3) + 0xf0; | |
| 563 | ||
| 564 | break; | |
| 565 | } | |
| 566 | } | |
| 567 | ||
| 568 | return sound_latch; | |
| 569 | } | |
| 570 | ||
| 571 | static WRITE8_HANDLER(sound_io_w) | |
| 572 | { | |
| 573 | if (vp_sound_p2 == 0x5f || vp_sound_p2 == 0xdf) | |
| 574 | { | |
| 575 | dc_40103 = data; | |
| 576 | dc_4020 = 0; | |
| 577 | } | |
| 578 | } | |
| 579 | ||
| 580 | static READ8_HANDLER(sound_p2_r) | |
| 581 | { | |
| 582 | return vp_sound_p2; | |
| 583 | } | |
| 584 | ||
| 585 | static WRITE8_HANDLER(sound_p2_w) | |
| 586 | { | |
| 587 | vp_sound_p2 = data; | |
| 588 | ||
| 589 | switch (data) | |
| 590 | { | |
| 591 | case 0x5f: | |
| 592 | { | |
| 593 | te_40103 = 0; /* p2.7 LOW */ | |
| 594 | ld_40103 = 0; /* p2.5 LOW */ | |
| 595 | break; | |
| 596 | } | |
| 597 | case 0x7f: | |
| 598 | { | |
| 599 | te_40103 = 0; | |
| 600 | ld_40103 = 1; | |
| 601 | break; | |
| 602 | } | |
| 603 | case 0xff: | |
| 604 | { | |
| 605 | te_40103 = 1; | |
| 606 | ld_40103 = 1; | |
| 607 | break; | |
| 608 | } | |
| 609 | } | |
| 610 | } | |
| 611 | ||
| 612 | static TIMER_CALLBACK(sound_t1_callback) | |
| 613 | { | |
| 614 | if (te_40103 == 1) | |
| 615 | { | |
| 616 | dc_40103++; | |
| 617 | ||
| 618 | if (dc_40103 == 0) | |
| 619 | { | |
| 620 | cpunum_set_input_line(machine, 1, 0, 1); | |
| 621 | } | |
| 622 | } | |
| 623 | } | |
| 624 | ||
| 625 | /************************* | |
| 626 | * Memory Map Information * | |
| 627 | *************************/ | |
| 628 | ||
| 629 | static ADDRESS_MAP_START( i8039_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 630 | AM_RANGE(0x0000, 0x0fff) AM_ROM | |
| 631 | ADDRESS_MAP_END | |
| 632 | ||
| 633 | static ADDRESS_MAP_START( i8039_io_port, ADDRESS_SPACE_IO, 8 ) | |
| 634 | AM_RANGE(0x00, 0xff ) AM_READWRITE(videopkr_io_r, videopkr_io_w) | |
| 635 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(videopkr_p1_data_r, videopkr_p1_data_w) | |
| 636 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(videopkr_p2_data_r, videopkr_p2_data_w) | |
| 637 | AM_RANGE(MCS48_PORT_P4, MCS48_PORT_P4) AM_WRITE(p4_w) | |
| 638 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(videopkr_t0_latch) | |
| 639 | ADDRESS_MAP_END | |
| 640 | ||
| 641 | static ADDRESS_MAP_START( i8039_sound_mem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 642 | AM_RANGE(0x0000, 0x0fff) AM_ROM | |
| 643 | ADDRESS_MAP_END | |
| 644 | ||
| 645 | static ADDRESS_MAP_START( i8039_sound_port, ADDRESS_SPACE_IO, 8 ) | |
| 646 | AM_RANGE(0x00, 0xff ) AM_READWRITE(sound_io_r, sound_io_w) | |
| 647 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(dac_0_data_w) | |
| 648 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(sound_p2_r, sound_p2_w) | |
| 649 | ADDRESS_MAP_END | |
| 650 | ||
| 651 | ||
| 652 | /************************ | |
| 653 | * Input Ports * | |
| 654 | ************************/ | |
| 655 | ||
| 656 | static INPUT_PORTS_START( videopkr ) | |
| 657 | PORT_START("IN0") | |
| 658 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door") PORT_TOGGLE PORT_CODE(KEYCODE_0) | |
| 659 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books") PORT_CODE(KEYCODE_9) | |
| 660 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(4) | |
| 661 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start") PORT_CODE(KEYCODE_1) | |
| 662 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Discard") PORT_CODE(KEYCODE_2) | |
| 663 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Cancel") PORT_CODE(KEYCODE_N) | |
| 664 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Hold 1") PORT_CODE(KEYCODE_Z) | |
| 665 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Hold 2") PORT_CODE(KEYCODE_X) | |
| 666 | ||
| 667 | PORT_START("IN1") | |
| 668 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Hold 3") PORT_CODE(KEYCODE_C) | |
| 669 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Hold 4") PORT_CODE(KEYCODE_V) | |
| 670 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Hold 5") PORT_CODE(KEYCODE_B) | |
| 671 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8) | |
| 672 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_M) | |
| 673 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 674 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 675 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 676 | ||
| 677 | INPUT_PORTS_END | |
| 678 | ||
| 679 | static INPUT_PORTS_START( blckjack ) | |
| 680 | PORT_START("IN0") | |
| 681 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door") PORT_TOGGLE PORT_CODE(KEYCODE_0) | |
| 682 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books") PORT_CODE(KEYCODE_9) | |
| 683 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(4) | |
| 684 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start") PORT_CODE(KEYCODE_1) | |
| 685 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Hit") PORT_CODE(KEYCODE_Z) | |
| 686 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Stand") PORT_CODE(KEYCODE_X) | |
| 687 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Double") PORT_CODE(KEYCODE_C) | |
| 688 | ||
| 689 | PORT_START("IN1") | |
| 690 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 691 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 692 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 693 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8) | |
| 694 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_M) | |
| 695 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 696 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 697 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 698 | INPUT_PORTS_END | |
| 699 | ||
| 700 | static INPUT_PORTS_START( videodad ) | |
| 701 | PORT_START("IN0") | |
| 702 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door") PORT_TOGGLE PORT_CODE(KEYCODE_0) | |
| 703 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books") PORT_CODE(KEYCODE_9) | |
| 704 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(4) | |
| 705 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Get Credits") PORT_CODE(KEYCODE_Q) | |
| 706 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Crap") PORT_CODE(KEYCODE_A) | |
| 707 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("6 or Less") PORT_CODE(KEYCODE_Z) | |
| 708 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Seven") PORT_CODE(KEYCODE_X) | |
| 709 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("8 or More") PORT_CODE(KEYCODE_C) | |
| 710 | ||
| 711 | PORT_START("IN1") | |
| 712 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Field") PORT_CODE(KEYCODE_S) | |
| 713 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Eleven") PORT_CODE(KEYCODE_V) | |
| 714 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Twelve") PORT_CODE(KEYCODE_B) | |
| 715 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8) | |
| 716 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_M) | |
| 717 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 718 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 719 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 720 | INPUT_PORTS_END | |
| 721 | ||
| 722 | static INPUT_PORTS_START( videocba ) | |
| 723 | PORT_START("IN0") | |
| 724 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door") PORT_TOGGLE PORT_CODE(KEYCODE_0) | |
| 725 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books") PORT_CODE(KEYCODE_9) | |
| 726 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(4) | |
| 727 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start") PORT_CODE(KEYCODE_1) | |
| 728 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 729 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 730 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 731 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 732 | ||
| 733 | PORT_START("IN1") | |
| 734 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 735 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 736 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 737 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8) | |
| 738 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_M) | |
| 739 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 740 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 741 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 742 | INPUT_PORTS_END | |
| 743 | ||
| 744 | ||
| 745 | /************************* | |
| 746 | * Graphics Layouts * | |
| 747 | *************************/ | |
| 748 | ||
| 749 | static const gfx_layout tilelayout_16 = | |
| 750 | { | |
| 751 | 16, 8, | |
| 752 | RGN_FRAC(1,4), | |
| 753 | 2, | |
| 754 | { 0, RGN_FRAC(1,2) }, | |
| 755 | { 0, 1, 2, 3, 4, 5, 6, 7, | |
| 756 | RGN_FRAC(1,4), RGN_FRAC(1,4) + 1, RGN_FRAC(1,4) + 2, RGN_FRAC(1,4) + 3, | |
| 757 | RGN_FRAC(1,4) + 4, RGN_FRAC(1,4) + 5, RGN_FRAC(1,4) + 6, RGN_FRAC(1,4) + 7 | |
| 758 | }, | |
| 759 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 760 | 8*8 | |
| 761 | }; | |
| 762 | ||
| 763 | static const gfx_layout tilelayout_8 = | |
| 764 | { | |
| 765 | 8,8, | |
| 766 | RGN_FRAC(1,2), | |
| 767 | 2, | |
| 768 | { 0, RGN_FRAC(1,2) }, | |
| 769 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 770 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 771 | 8*8 | |
| 772 | }; | |
| 773 | ||
| 774 | ||
| 775 | /****************************** | |
| 776 | * Graphics Decode Information * | |
| 777 | ******************************/ | |
| 778 | ||
| 779 | static GFXDECODE_START( videopkr ) | |
| 780 | GFXDECODE_ENTRY( "tiles", 0, tilelayout_8, 0, 64 ) | |
| 781 | GFXDECODE_END | |
| 782 | ||
| 783 | ||
| 784 | static GFXDECODE_START( videodad ) | |
| 785 | GFXDECODE_ENTRY( "tiles", 0, tilelayout_16, 0, 64 ) | |
| 786 | GFXDECODE_END | |
| 787 | ||
| 788 | ||
| 789 | /******************************* | |
| 790 | * Machine Start / Reset * | |
| 791 | *******************************/ | |
| 792 | ||
| 793 | static MACHINE_START(videopkr) | |
| 794 | { | |
| 795 | vp_sound_p2 = 0xff; /* default P2 latch value */ | |
| 796 | sound_latch = 0xff; /* default sound data latch value */ | |
| 797 | p24_data = 0xff; | |
| 798 | p1 = 0xff; | |
| 799 | t1_timer = timer_alloc(sound_t1_callback, NULL); | |
| 800 | timer_adjust_periodic(t1_timer, attotime_zero, 0, ATTOTIME_IN_HZ(50)); /* yep, 50Hz. */ | |
| 801 | } | |
| 802 | ||
| 803 | ||
| 804 | /************************ | |
| 805 | * Machine Drivers * | |
| 806 | ************************/ | |
| 807 | ||
| 808 | static MACHINE_DRIVER_START( videopkr ) | |
| 809 | ||
| 810 | /* basic machine hardware */ | |
| 811 | MDRV_CPU_ADD("main", I8039, CPU_CLOCK) | |
| 812 | MDRV_CPU_PROGRAM_MAP(i8039_readmem, 0) | |
| 813 | MDRV_CPU_IO_MAP(i8039_io_port, 0) | |
| 814 | ||
| 815 | MDRV_CPU_VBLANK_INT("main", irq0_line_assert) | |
| 816 | ||
| 817 | MDRV_CPU_ADD("sound", I8039, SOUND_CLOCK) | |
| 818 | MDRV_CPU_PROGRAM_MAP(i8039_sound_mem, 0) | |
| 819 | MDRV_CPU_IO_MAP(i8039_sound_port, 0) | |
| 820 | ||
| 821 | MDRV_MACHINE_START(videopkr) | |
| 822 | MDRV_NVRAM_HANDLER(videopkr) | |
| 823 | ||
| 824 | /* video hardware */ | |
| 825 | MDRV_SCREEN_ADD("main", RASTER) | |
| 826 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 827 | ||
| 828 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 829 | MDRV_SCREEN_VISIBLE_AREA(5*8, 31*8-1, 3*8, 29*8-1) | |
| 830 | ||
| 831 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 832 | MDRV_SCREEN_VBLANK_TIME(2080) | |
| 833 | MDRV_GFXDECODE(videopkr) | |
| 834 | MDRV_PALETTE_INIT(videopkr) | |
| 835 | MDRV_PALETTE_LENGTH(256) | |
| 836 | MDRV_VIDEO_START(videopkr) | |
| 837 | MDRV_VIDEO_UPDATE(videopkr) | |
| 838 | ||
| 839 | /* sound hardware */ | |
| 840 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 841 | MDRV_SOUND_ADD("sound", DAC, 0) | |
| 842 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55) | |
| 843 | MACHINE_DRIVER_END | |
| 844 | ||
| 845 | ||
| 846 | static MACHINE_DRIVER_START( blckjack ) | |
| 847 | ||
| 848 | /* basic machine hardware */ | |
| 849 | MDRV_IMPORT_FROM(videopkr) | |
| 850 | ||
| 851 | /* video hardware */ | |
| 852 | MDRV_SCREEN_MODIFY("main") | |
| 853 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 854 | MDRV_SCREEN_VISIBLE_AREA(4*8, 31*8-1, 2*8, 30*8-1) | |
| 855 | MACHINE_DRIVER_END | |
| 856 | ||
| 857 | ||
| 858 | static MACHINE_DRIVER_START( videodad ) | |
| 859 | ||
| 860 | /* basic machine hardware */ | |
| 861 | MDRV_IMPORT_FROM(videopkr) | |
| 862 | MDRV_CPU_REPLACE("main", I8039, CPU_CLOCK_ALT) | |
| 863 | ||
| 864 | /* video hardware */ | |
| 865 | MDRV_SCREEN_MODIFY("main") | |
| 866 | MDRV_SCREEN_SIZE(32*16, 32*8) | |
| 867 | MDRV_SCREEN_VISIBLE_AREA(4*16, 31*16-1, 2*8, 30*8-1) | |
| 868 | ||
| 869 | MDRV_GFXDECODE(videodad) | |
| 870 | MDRV_VIDEO_START(vidadcba) | |
| 871 | MACHINE_DRIVER_END | |
| 872 | ||
| 873 | ||
| 874 | /************************* | |
| 875 | * Rom Load * | |
| 876 | *************************/ | |
| 877 | ||
| 878 | ROM_START( videopkr ) | |
| 879 | ROM_REGION( 0x1000, "main", 0 ) | |
| 880 | ROM_LOAD( "vpoker.c5", 0x0000, 0x0800, CRC(200d21e4) SHA1(d991c9f10a36a02491bb0aba32129675fed77a10) ) | |
| 881 | ROM_LOAD( "vpoker.c7", 0x0800, 0x0800, CRC(f72c2a90) SHA1(e9c54d1f895cde0aaca4121a252da40594195a25) ) | |
| 882 | ||
| 883 | ROM_REGION( 0x1000, "sound", 0 ) /* sound cpu program */ | |
| 884 | ROM_LOAD( "vpsona3.pbj", 0x0000, 0x0800, CRC(a4f7bf7f) SHA1(a08287821f3471cb3e1ae0528811da930fd57387) ) | |
| 885 | ROM_LOAD( "vpsona2.pbj", 0x0800, 0x0800, CRC(583a9b95) SHA1(a10e85452e285b2a63f885f4e39b7f76ee8b2407) ) | |
| 886 | ||
| 887 | ROM_REGION( 0x1000, "tiles", ROMREGION_DISPOSE ) | |
| 888 | ROM_LOAD( "vpbj_b15.org", 0x0000, 0x0800, CRC(67468e3a) SHA1(761766f0fb92693d32179a914e11da517cc5747d) ) | |
| 889 | ROM_LOAD( "vpbj_b12.org", 0x0800, 0x0800, CRC(4aba166e) SHA1(930cea2216a39b5d72021d1b449db018a121adce) ) | |
| 890 | ||
| 891 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 892 | ROM_LOAD( "vpbjorg.col", 0x0000, 0x0100, CRC(09abf5f1) SHA1(f2d6b4f2f08b47b93728dafb50576d5ca859255f) ) | |
| 893 | ROM_END | |
| 894 | ||
| 895 | ROM_START( blckjack ) | |
| 896 | ROM_REGION( 0x1000, "main", 0 ) | |
| 897 | ROM_LOAD( "bjc5org.old", 0x0000, 0x0800, CRC(e266a28a) SHA1(1f90c85a2a817f1927c9ab2cbf79cfa2dd116dc8) ) | |
| 898 | ROM_LOAD( "bjc7org.old", 0x0800, 0x0800, CRC(c60c565f) SHA1(c9ed232301750288bd000ac4e2dcf2253745ff0a) ) | |
| 899 | ||
| 900 | ROM_REGION( 0x1000, "sound", 0 ) /* sound cpu program */ | |
| 901 | ROM_LOAD( "vpsona3.pbj", 0x0000, 0x0800, CRC(a4f7bf7f) SHA1(a08287821f3471cb3e1ae0528811da930fd57387) ) | |
| 902 | ROM_LOAD( "vpsona2.pbj", 0x0800, 0x0800, CRC(583a9b95) SHA1(a10e85452e285b2a63f885f4e39b7f76ee8b2407) ) | |
| 903 | ||
| 904 | ROM_REGION( 0x1000, "tiles", ROMREGION_DISPOSE ) | |
| 905 | ROM_LOAD( "vpbj_b15.org", 0x0000, 0x0800, CRC(67468e3a) SHA1(761766f0fb92693d32179a914e11da517cc5747d) ) | |
| 906 | ROM_LOAD( "vpbj_b12.org", 0x0800, 0x0800, CRC(4aba166e) SHA1(930cea2216a39b5d72021d1b449db018a121adce) ) | |
| 907 | ||
| 908 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 909 | ROM_LOAD( "vpbjorg.col", 0x0000, 0x0100, CRC(09abf5f1) SHA1(f2d6b4f2f08b47b93728dafb50576d5ca859255f) ) | |
| 910 | ROM_END | |
| 911 | ||
| 912 | ROM_START( videodad ) | |
| 913 | ROM_REGION( 0x1000, "main", 0 ) | |
| 914 | ROM_LOAD( "dac5org.old", 0x0000, 0x0800, CRC(b373c8e9) SHA1(7a99d6aa152f8e6adeddbfdfd13278edeaa529bc) ) | |
| 915 | ROM_LOAD( "dac7org.old", 0x0800, 0x0800, CRC(afabae30) SHA1(c4198ba8de6811e3367b0154ff479f6738721bfa) ) | |
| 916 | ||
| 917 | ROM_REGION( 0x1000, "sound", 0 ) /* sound cpu program */ | |
| 918 | ROM_LOAD( "vdsona3.dad", 0x0000, 0x0800, CRC(13f7a462) SHA1(2e2e904637ca7873a2ed67d7ab1524e51b324660) ) | |
| 919 | ROM_LOAD( "vdsona2.dad", 0x0800, 0x0800, CRC(120e4512) SHA1(207748d4f5793180305bb115af877042517d901f) ) | |
| 920 | ||
| 921 | ROM_REGION( 0x2000, "tiles", ROMREGION_DISPOSE ) | |
| 922 | ROM_LOAD( "vdadob15.bin", 0x0000, 0x0800, CRC(caa6a4b0) SHA1(af99da30b8ee63d54ac1f1e6737ed707501a5a25) ) | |
| 923 | ROM_LOAD( "vdadob14.bin", 0x0800, 0x0800, CRC(eabfae6b) SHA1(189b38da5e9c99f99c5425cdfefccc6991e3f85e) ) | |
| 924 | ROM_LOAD( "vdadob12.bin", 0x1000, 0x0800, CRC(176f7b31) SHA1(613521ed9caf904db22860686e0424d0c0e0cba6) ) | |
| 925 | ROM_LOAD( "vdadob11.bin", 0x1800, 0x0800, CRC(259492c7) SHA1(003cc40a88f2b9fad0089574963e7e654211bb16) ) | |
| 926 | ||
| 927 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 928 | ROM_LOAD( "vdvcorg.col", 0x0000, 0x0100, CRC(741b1a22) SHA1(50983ea37f0479793ba38a112a0266c2edc4b5ef) ) | |
| 929 | ROM_END | |
| 930 | ||
| 931 | ROM_START( videocba ) | |
| 932 | ROM_REGION( 0x1000, "main", 0 ) | |
| 933 | ROM_LOAD( "vcc5org.old", 0x0000, 0x0800, CRC(e6a6a4e4) SHA1(ada1e241a2d39e5a9cf400559e825b0b7d88fca5) ) | |
| 934 | ROM_LOAD( "vcc7org.old", 0x0800, 0x0800, CRC(fdec55c1) SHA1(19b740f3b7f2acaa0fc09f4c0a2fe69721ebbcaf) ) | |
| 935 | ||
| 936 | ROM_REGION( 0x1000, "sound", 0 ) /* sound cpu program */ | |
| 937 | ROM_LOAD( "vcsona3.rod", 0x0000, 0x0800, CRC(b0948d6c) SHA1(6c45d350288f69b4b2b5ac16ab2b418f14c6eded) ) | |
| 938 | ROM_LOAD( "vcsona2.rod", 0x0800, 0x0800, CRC(44ff9e85) SHA1(5d7988d2d3bca932b77e014dc61f7a2347b01603) ) | |
| 939 | ||
| 940 | ROM_REGION( 0x2000, "tiles", ROMREGION_DISPOSE ) | |
| 941 | ROM_LOAD( "vcbab15.bin", 0x0000, 0x0800, CRC(f31281cb) SHA1(bd4743c328f56334ac015c1f10de01ac25810756) ) | |
| 942 | ROM_LOAD( "vcbab14.bin", 0x0800, 0x0800, CRC(6fd66330) SHA1(0ee3b3329b94ded81f028ebb687e580787c74ded) ) | |
| 943 | ROM_LOAD( "vcbab12.bin", 0x1000, 0x0800, CRC(eace907a) SHA1(c81fb5eb838fea809729edc8ab2f637fffd0b2d1) ) | |
| 944 | ROM_LOAD( "vcbab11.bin", 0x1800, 0x0800, CRC(e2069a6d) SHA1(2d4e71f2838451215e6f9629e2d1a35808510353) ) | |
| 945 | ||
| 946 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 947 | ROM_LOAD( "vdcbaorg.col", 0x0000, 0x0100, BAD_DUMP CRC(5b8e78b1) SHA1(ac5a1d7ab9dac7b4994d2f543801bf57e8573ba6) ) | |
| 948 | ROM_END | |
| 949 | ||
| 950 | ||
| 951 | /************************* | |
| 952 | * Game Drivers * | |
| 953 | *************************/ | |
| 954 | ||
| 955 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */ | |
| 956 | GAME( 1984, videopkr, 0, videopkr, videopkr, 0, ROT0, "InterFlip", "Video Poker", 0 ) | |
| 957 | GAME( 1984, blckjack, videopkr, blckjack, blckjack, 0, ROT0, "InterFlip", "Black Jack", 0 ) | |
| 958 | GAME( 1987, videodad, videopkr, videodad, videodad, 0, ROT0, "InterFlip", "Video Dado", 0 ) | |
| 959 | GAME( 1987, videocba, videopkr, videodad, videocba, 0, ROT0, "InterFlip", "Video Cordoba", GAME_IMPERFECT_COLORS ) |
| r3171 | r3172 | |
|---|---|---|
| 315 | 315 | #define DEBUG_PROTECTION (0) |
| 316 | 316 | #define DEBUG_DISC_SOUND (0) |
| 317 | 317 | |
| 318 | #define COMBINE_TYPE_PC(_tyn, _pc) ((_tyn)<<16 | (_pc)) | |
| 319 | ||
| 318 | 320 | /************************************* |
| 319 | 321 | * |
| 320 | 322 | * Prototypes |
| r3171 | r3172 | |
| 376 | 378 | * |
| 377 | 379 | *************************************/ |
| 378 | 380 | |
| 379 | static INTERRUPT_GEN( | |
| 381 | static INTERRUPT_GEN( s2650 | |
| 380 | 382 | { |
| 381 | 383 | cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0x03); |
| 382 | 384 | } |
| r3171 | r3172 | |
| 398 | 400 | |
| 399 | 401 | } |
| 400 | 402 | |
| 401 | static MACHINE_START( | |
| 403 | static MACHINE_START( s2650 | |
| 402 | 404 | { |
| 405 | dkong_state *state = machine->driver_data; | |
| 403 | 406 | UINT8 *p = memory_region(machine, "user1"); |
| 407 | const char *game_name = machine->gamedrv->name; | |
| 404 | 408 | int i; |
| 405 | 409 | |
| 406 | dkong_state *state = machine->driver_data; | |
| 407 | ||
| 408 | 410 | MACHINE_START_CALL(dkong2b); |
| 409 | 411 | |
| 410 | 412 | for (i=0;i<0x200;i++) |
| r3171 | r3172 | |
| 412 | 414 | for (i=0;i<0x200;i++) |
| 413 | 415 | state->rev_map[p[0x0000+i]] = i; |
| 414 | 416 | |
| 415 | state_save_register_global(state->hunchloopback); | |
| 416 | ||
| 417 | 417 | state->hunchloopback = 0; |
| 418 | 418 | |
| 419 | state_save_register_global(state->hunchloopback); | |
| 420 | ||
| 421 | if (strcmp(game_name,"herbiedk") == 0) state->protect_type = DK2650_HERBIEDK; | |
| 422 | else if (strcmp(game_name,"hunchbkd") == 0) state->protect_type = DK2650_HUNCHBKD; | |
| 423 | else if (strcmp(game_name,"sbdk") == 0) state->protect_type = DK2650_HUNCHBKD; | |
| 424 | else if (strcmp(game_name,"herodk") == 0) state->protect_type = DK2650_HUNCHBKD; | |
| 425 | else if (strcmp(game_name,"herodku") == 0) state->protect_type = DK2650_HUNCHBKD; | |
| 426 | else if (strcmp(game_name,"8ballact") == 0) state->protect_type = DK2650_EIGHTACT; | |
| 427 | else if (strcmp(game_name,"8ballat2") == 0) state->protect_type = DK2650_EIGHTACT; | |
| 428 | else if (strcmp(game_name,"shootgal") == 0) state->protect_type = DK2650_SHOOTGAL; | |
| 429 | else if (strcmp(game_name,"spclforc") == 0) state->protect_type = DK2650_SPCLFORC; | |
| 430 | else if (strcmp(game_name,"spcfrcii") == 0) state->protect_type = DK2650_SPCLFORC; | |
| 431 | else | |
| 432 | fatalerror("Unknown game <%s> in S2650 start.", game_name); | |
| 419 | 433 | } |
| 420 | 434 | |
| 421 | 435 | static MACHINE_START( radarscp ) |
| r3171 | r3172 | |
| 590 | 604 | return r; |
| 591 | 605 | } |
| 592 | 606 | |
| 593 | static READ8_HANDLER( | |
| 607 | static READ8_HANDLER( s2650 | |
| 594 | 608 | { |
| 595 | int data = program_read_byte(0x1000+offset); | |
| 596 | #if DEBUG_PROTECTION | |
| 597 | if (offset >= 0xc04 && offset < 0xc14) | |
| 598 | logerror("prot read %x, %x (%x)\n", offset, data, activecpu_get_pc()); | |
| 599 | #endif | |
| 600 | return data; | |
| 609 | return program_read_byte(0x1000+offset); | |
| 601 | 610 | } |
| 602 | 611 | |
| 603 | 612 | |
| 604 | static WRITE8_HANDLER( | |
| 613 | static WRITE8_HANDLER( s2650 | |
| 605 | 614 | { |
| 606 | #if DEBUG_PROTECTION | |
| 607 | if (offset >= 0xc04 && offset < 0xc14) | |
| 608 | logerror("prot write %x\n", data); | |
| 609 | #endif | |
| 610 | 615 | program_write_byte(0x1000+offset,data); |
| 611 | 616 | } |
| 612 | 617 | |
| r3171 | r3172 | |
| 641 | 646 | } |
| 642 | 647 | |
| 643 | 648 | |
| 644 | static WRITE8_HANDLER( | |
| 649 | static WRITE8_HANDLER( s2650 | |
| 645 | 650 | { |
| 646 | 651 | dkong_state *state = machine->driver_data; |
| 652 | #if DEBUG_PROTECTION | |
| 653 | logerror("write : pc = %04x, loopback = %02x\n",activecpu_get_pc(), data); | |
| 654 | #endif | |
| 647 | 655 | |
| 648 | 656 | state->hunchloopback = data; |
| 649 | 657 | } |
| 650 | 658 | |
| 651 | ||
| 652 | static READ8_HANDLER( hunchbkd_port0_r ) | |
| 659 | static READ8_HANDLER( s2650_port0_r ) | |
| 653 | 660 | { |
| 654 | 661 | dkong_state *state = machine->driver_data; |
| 655 | 662 | #if DEBUG_PROTECTION |
| 656 | logerror("port 0 : pc = %4x\n",activecpu_get_pc()); | |
| 663 | logerror("port 0 : pc = %04x, loopback = %02x\n",activecpu_get_pc(), state->hunchloopback); | |
| 657 | 664 | #endif |
| 658 | 665 | |
| 659 | switch (activecpu_get_pc()) | |
| 666 | switch (COMBINE_TYPE_PC(state->protect_type, activecpu_get_pc())) | |
| 660 | 667 | { |
| 661 | case 0x00e9: return 0xff; | |
| 662 | case 0x0114: return 0xfb; | |
| 663 | case 0x209b: return state->hunchloopback; /* this at least prevents reset after super bonus */ | |
| 668 | case COMBINE_TYPE_PC(DK2650_HUNCHBKD, 0x00e9): return 0xff; | |
| 669 | case COMBINE_TYPE_PC(DK2650_HUNCHBKD, 0x0114): return 0xfb; //fb | |
| 670 | case COMBINE_TYPE_PC(DK2650_HUNCHBKD, 0x209b): return state->hunchloopback; /* this at least prevents reset after super bonus */ | |
| 671 | case COMBINE_TYPE_PC(DK2650_SHOOTGAL, 0x0079): return 0xff; | |
| 672 | case COMBINE_TYPE_PC(DK2650_SPCLFORC, 0x00a3): return 0x01; | |
| 673 | case COMBINE_TYPE_PC(DK2650_SPCLFORC, 0x007b): return 0x01; | |
| 664 | 674 | } |
| 665 | 675 | |
| 666 | return 0; | |
| 667 | } | |
| 668 | ||
| 669 | ||
| 670 | static READ8_HANDLER( hunchbkd_port1_r ) | |
| 671 | { | |
| 672 | dkong_state *state = machine->driver_data; | |
| 673 | ||
| 674 | return state->hunchloopback; | |
| 675 | } | |
| 676 | ||
| 677 | ||
| 678 | static READ8_HANDLER( herbiedk_port1_r ) | |
| 679 | { | |
| 680 | switch (activecpu_get_pc()) | |
| 676 | switch (state->protect_type) | |
| 681 | 677 | { |
| 682 | case 0x002b: | |
| 683 | case 0x09dc: return 0x0; | |
| 678 | case DK2650_HUNCHBKD: return 0x00; | |
| 679 | case DK2650_SHOOTGAL: return 0x00; | |
| 680 | case DK2650_SPCLFORC: return 0x00; | |
| 684 | 681 | } |
| 685 | ||
| 686 | return 1; | |
| 682 | fatalerror("Unhandled read from port 0 : pc = %4x\n",activecpu_get_pc()); | |
| 687 | 683 | } |
| 688 | 684 | |
| 689 | 685 | |
| 690 | static READ8_HANDLER( s | |
| 686 | static READ8_HANDLER( s2650 | |
| 691 | 687 | { |
| 692 | switch (activecpu_get_pc()) | |
| 693 | { | |
| 694 | case 0x00a3: /* spclforc */ | |
| 695 | case 0x007b: /* spcfrcii */ | |
| 696 | return 1; | |
| 697 | } | |
| 688 | dkong_state *state = machine->driver_data; | |
| 689 | #if DEBUG_PROTECTION | |
| 690 | logerror("port 1 : pc = %04x, loopback = %02x\n",activecpu_get_pc(), state->hunchloopback); | |
| 691 | #endif | |
| 698 | 692 | |
| 699 | return 0; | |
| 700 | } | |
| 701 | ||
| 702 | static READ8_HANDLER( eightact_port1_r ) | |
| 703 | { | |
| 704 | switch (activecpu_get_pc()) | |
| 693 | switch (COMBINE_TYPE_PC(state->protect_type, activecpu_get_pc())) | |
| 705 | 694 | { |
| 706 | case 0x0021: | |
| 707 | return 0; | |
| 695 | case COMBINE_TYPE_PC(DK2650_EIGHTACT, 0x0021): return 0x00; | |
| 696 | case COMBINE_TYPE_PC(DK2650_HERBIEDK, 0x002b): return 0x00; | |
| 697 | case COMBINE_TYPE_PC(DK2650_HERBIEDK, 0x09dc): return 0x00; | |
| 708 | 698 | } |
| 709 | 699 | |
| 710 | return 1; | |
| 711 | } | |
| 712 | ||
| 713 | static READ8_HANDLER( shootgal_port0_r ) | |
| 714 | { | |
| 715 | switch (activecpu_get_pc()) | |
| 700 | switch (state->protect_type) | |
| 716 | 701 | { |
| 717 | case 0x0079: | |
| 718 | return 0xff; | |
| 702 | case DK2650_HUNCHBKD: return state->hunchloopback; | |
| 703 | case DK2650_EIGHTACT: return 1; | |
| 704 | case DK2650_HERBIEDK: return 1; | |
| 719 | 705 | } |
| 720 | ||
| 721 | return 0; | |
| 706 | fatalerror("Unhandled read from port 1 : pc = %4x\n",activecpu_get_pc()); | |
| 722 | 707 | } |
| 723 | 708 | |
| 709 | ||
| 724 | 710 | static WRITE8_HANDLER( dkong3_2a03_reset_w ) |
| 725 | 711 | { |
| 726 | 712 | if (data & 1) |
| r3171 | r3172 | |
| 861 | 847 | |
| 862 | 848 | /* S2650 conversions */ |
| 863 | 849 | |
| 864 | static ADDRESS_MAP_START( | |
| 850 | static ADDRESS_MAP_START( s2650 | |
| 865 | 851 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 866 | 852 | AM_RANGE(0x1000, 0x13ff) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram) |
| 867 | 853 | AM_SIZE_MEMBER(dkong_state, sprite_ram_size) /* 0x7000 */ |
| r3171 | r3172 | |
| 882 | 868 | AM_RANGE(0x1f80, 0x1f8f) AM_DEVREADWRITE(DMA8257, "dma8257", dma8257_r, dma8257_w) /* P8257 control registers */ |
| 883 | 869 | /* 0x6800 not remapped */ |
| 884 | 870 | AM_RANGE(0x2000, 0x2fff) AM_ROM |
| 885 | AM_RANGE(0x3000, 0x3fff) AM_READWRITE( | |
| 871 | AM_RANGE(0x3000, 0x3fff) AM_READWRITE(s2650 | |
| 886 | 872 | AM_RANGE(0x4000, 0x4fff) AM_ROM |
| 887 | AM_RANGE(0x5000, 0x5fff) AM_READWRITE( | |
| 873 | AM_RANGE(0x5000, 0x5fff) AM_READWRITE(s2650 | |
| 888 | 874 | AM_RANGE(0x6000, 0x6fff) AM_ROM |
| 889 | AM_RANGE(0x7000, 0x7fff) AM_READWRITE( | |
| 875 | AM_RANGE(0x7000, 0x7fff) AM_READWRITE(s2650 | |
| 890 | 876 | ADDRESS_MAP_END |
| 891 | 877 | |
| 892 | static ADDRESS_MAP_START( hunchbkd_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 893 | AM_RANGE(0x00, 0x00) AM_READ(hunchbkd_port0_r) | |
| 894 | AM_RANGE(0x01, 0x01) AM_READ(hunchbkd_port1_r) | |
| 878 | static ADDRESS_MAP_START( s2650_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 879 | AM_RANGE(0x00, 0x00) AM_READ(s2650_port0_r) | |
| 880 | AM_RANGE(0x01, 0x01) AM_READ(s2650_port1_r) | |
| 895 | 881 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") |
| 896 | AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE( | |
| 882 | AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(s2650 | |
| 897 | 883 | ADDRESS_MAP_END |
| 898 | 884 | |
| 899 | static ADDRESS_MAP_START( herbiedk_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 900 | AM_RANGE(0x01, 0x01) AM_READ(herbiedk_port1_r) | |
| 901 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") | |
| 902 | AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(hunchbkd_data_w) | |
| 903 | ADDRESS_MAP_END | |
| 904 | 885 | |
| 905 | static ADDRESS_MAP_START( spclforc_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 906 | AM_RANGE(0x00, 0x00) AM_READ(spclforc_port0_r) | |
| 907 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") | |
| 908 | AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(hunchbkd_data_w) | |
| 909 | ADDRESS_MAP_END | |
| 910 | 886 | |
| 911 | static ADDRESS_MAP_START( eightact_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 912 | AM_RANGE(0x01, 0x01) AM_READ(eightact_port1_r) | |
| 913 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT)AM_READ_PORT("SENSE") | |
| 914 | AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(hunchbkd_data_w) | |
| 915 | ADDRESS_MAP_END | |
| 916 | ||
| 917 | static ADDRESS_MAP_START( shootgal_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 918 | AM_RANGE(0x00, 0x00) AM_READ(shootgal_port0_r) | |
| 919 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") | |
| 920 | AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(hunchbkd_data_w) | |
| 921 | ADDRESS_MAP_END | |
| 922 | ||
| 923 | ||
| 924 | 887 | /************************************* |
| 925 | 888 | * |
| 926 | 889 | * Port definitions |
| r3171 | r3172 | |
| 1678 | 1641 | |
| 1679 | 1642 | MACHINE_DRIVER_END |
| 1680 | 1643 | |
| 1681 | ||
| 1682 | static MACHINE_DRIVER_START( hunchbkd ) | |
| 1683 | ||
| 1684 | MDRV_IMPORT_FROM(dkong2b) | |
| 1685 | ||
| 1686 | /* basic machine hardware */ | |
| 1687 | MDRV_CPU_REPLACE("main", S2650, CLOCK_1H / 2) /* ??? */ | |
| 1688 | MDRV_CPU_PROGRAM_MAP(hunchbkd_map, 0) | |
| 1689 | MDRV_CPU_IO_MAP(hunchbkd_io_map, 0) | |
| 1690 | MDRV_CPU_VBLANK_INT("main", hunchbkd_interrupt) | |
| 1691 | ||
| 1692 | MDRV_DEVICE_MODIFY("dma8257", DMA8257) | |
| 1693 | MDRV_DEVICE_CONFIG(hb_dma) | |
| 1694 | ||
| 1695 | MDRV_MACHINE_START(hunchbkd) | |
| 1696 | ||
| 1697 | MACHINE_DRIVER_END | |
| 1698 | ||
| 1699 | 1644 | static MACHINE_DRIVER_START( dkong3 ) |
| 1700 | 1645 | |
| 1701 | 1646 | /* driver data */ |
| r3171 | r3172 | |
| 1704 | 1649 | /* basic machine hardware */ |
| 1705 | 1650 | MDRV_CPU_ADD("main", Z80, XTAL_8MHz / 2) /* verified in schematics */ |
| 1706 | 1651 | MDRV_CPU_PROGRAM_MAP(dkong3_map, 0) |
| 1707 | MDRV_CPU_IO_MAP( | |
| 1652 | MDRV_CPU_IO_MAP( | |
| 1708 | 1653 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 1709 | 1654 | |
| 1710 | 1655 | MDRV_MACHINE_START(dkong3) |
| r3171 | r3172 | |
| 1751 | 1696 | |
| 1752 | 1697 | MACHINE_DRIVER_END |
| 1753 | 1698 | |
| 1754 | static MACHINE_DRIVER_START( | |
| 1699 | static MACHINE_DRIVER_START( | |
| 1755 | 1700 | |
| 1756 | 1701 | /* basic machine hardware */ |
| 1757 | MDRV_IMPORT_FROM(hunchbkd) | |
| 1758 | MDRV_CPU_MODIFY("main") | |
| 1759 | MDRV_CPU_IO_MAP(herbiedk_io_map, 0) | |
| 1760 | ||
| 1702 | MDRV_IMPORT_FROM(dkongjr) | |
| 1703 | MDRV_PALETTE_INIT(dkong3) | |
| 1761 | 1704 | MACHINE_DRIVER_END |
| 1762 | 1705 | |
| 1763 | static MACHINE_DRIVER_START( spclforc ) | |
| 1706 | /************************************* | |
| 1707 | * | |
| 1708 | * S2650 Machine drivers | |
| 1709 | * | |
| 1710 | *************************************/ | |
| 1764 | 1711 | |
| 1765 | /* basic machine hardware */ | |
| 1766 | MDRV_IMPORT_FROM(hunchbkd) | |
| 1767 | MDRV_CPU_MODIFY("main") | |
| 1768 | MDRV_CPU_IO_MAP(spclforc_io_map,0) | |
| 1712 | static MACHINE_DRIVER_START( s2650 ) | |
| 1769 | 1713 | |
| 1770 | MDRV_ | |
| 1714 | MDRV_IMPORT_FR | |
| 1771 | 1715 | |
| 1772 | /* video hardware */ | |
| 1773 | MDRV_VIDEO_UPDATE(spclforc) | |
| 1716 | /* basic machine hardware */ | |
| 1717 | MDRV_CPU_REPLACE("main", S2650, CLOCK_1H / 2) /* ??? */ | |
| 1718 | MDRV_CPU_PROGRAM_MAP(s2650_map, 0) | |
| 1719 | MDRV_CPU_IO_MAP(s2650_io_map, 0) | |
| 1720 | MDRV_CPU_VBLANK_INT("main", s2650_interrupt) | |
| 1774 | 1721 | |
| 1775 | /* analog sound */ | |
| 1776 | MACHINE_DRIVER_END | |
| 1722 | MDRV_DEVICE_MODIFY("dma8257", DMA8257) | |
| 1723 | MDRV_DEVICE_CONFIG(hb_dma) | |
| 1777 | 1724 | |
| 1778 | ||
| 1725 | | |
| 1779 | 1726 | |
| 1780 | /* basic machine hardware */ | |
| 1781 | MDRV_IMPORT_FROM(hunchbkd) | |
| 1782 | MDRV_CPU_MODIFY("main") | |
| 1783 | MDRV_CPU_IO_MAP(eightact_io_map, 0) | |
| 1784 | 1727 | MACHINE_DRIVER_END |
| 1785 | 1728 | |
| 1786 | static MACHINE_DRIVER_START( s | |
| 1729 | static MACHINE_DRIVER_START( spc | |
| 1787 | 1730 | |
| 1788 | 1731 | /* basic machine hardware */ |
| 1789 | MDRV_IMPORT_FROM(hunchbkd) | |
| 1790 | MDRV_CPU_MODIFY("main") | |
| 1791 | MDRV_CPU_IO_MAP(shootgal_io_map, 0) | |
| 1792 | MACHINE_DRIVER_END | |
| 1732 | MDRV_IMPORT_FROM(s2650) | |
| 1733 | MDRV_CPU_REMOVE("sound") | |
| 1793 | 1734 | |
| 1794 | static MACHINE_DRIVER_START( dkong3b ) | |
| 1735 | /* video hardware */ | |
| 1736 | MDRV_VIDEO_UPDATE(spclforc) | |
| 1795 | 1737 | |
| 1796 | /* basic machine hardware */ | |
| 1797 | MDRV_IMPORT_FROM(dkongjr) | |
| 1798 | MDRV_PALETTE_INIT(dkong3) | |
| 1799 | 1738 | MACHINE_DRIVER_END |
| 1800 | 1739 | |
| 1801 | 1740 | /************************************* |
| r3171 | r3172 | |
| 3001 | 2940 | GAME( 1983, dkong3j, dkong3, dkong3, dkong3, 0, ROT90, "Nintendo", "Donkey Kong 3 (Japan)", GAME_SUPPORTS_SAVE ) |
| 3002 | 2941 | GAME( 1984, dkong3b, dkong3, dkong3b, dkong3b, 0, ROT90, "bootleg", "Donkey Kong 3 (bootleg on Donkey Kong Jr. hardware)", GAME_SUPPORTS_SAVE ) |
| 3003 | 2942 | |
| 3004 | GAME( 1984, herbiedk, huncholy, herbiedk, herbiedk, 0, ROT90, "CVS", "Herbie at the Olympics (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 3005 | ||
| 3006 | GAME( 1983, hunchbkd, hunchbak, hunchbkd, hunchbkd, 0, ROT90, "Century Electronics", "Hunchback (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 3007 | ||
| 3008 | GAME( 1984, sbdk, superbik, hunchbkd, sbdk, 0, ROT90, "Century Electronics", "Super Bike (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 3009 | ||
| 3010 | GAME( 1984, herodk, hero, hunchbkd, herodk, herodk, ROT90, "Seatongrove Ltd (Crown license)", "Hero in the Castle of Doom (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 3011 | GAME( 1984, herodku, hero, hunchbkd, herodk, 0, ROT90, "Seatongrove Ltd (Crown license)", "Hero in the Castle of Doom (DK conversion not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 3012 | ||
| 3013 | GAME( 1984, 8ballact, 0, eightact, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 3014 | GAME( 1984, 8ballat2, 8ballact, eightact, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DKJr conversion)", GAME_SUPPORTS_SAVE ) | |
| 3015 | ||
| 3016 | GAME( 1984, shootgal, 0, shootgal, shootgal, 0, ROT180, "Seatongrove Ltd (Zaccaria licence)", "Shooting Gallery", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 3017 | ||
| 3018 | 2943 | GAME( 1983, pestplce, mario, pestplce, pestplce, 0, ROT180, "bootleg", "Pest Place", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 3019 | 2944 | |
| 2945 | /* 2650 based */ | |
| 2946 | GAME( 1984, herbiedk, huncholy, s2650, herbiedk, 0, ROT90, "CVS", "Herbie at the Olympics (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 2947 | GAME( 1983, hunchbkd, hunchbak, s2650, hunchbkd, 0, ROT90, "Century Electronics", "Hunchback (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 2948 | GAME( 1984, sbdk, superbik, s2650, sbdk, 0, ROT90, "Century Electronics", "Super Bike (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 2949 | GAME( 1984, herodk, hero, s2650, herodk, herodk, ROT90, "Seatongrove Ltd (Crown license)", "Hero in the Castle of Doom (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 2950 | GAME( 1984, herodku, hero, s2650, herodk, 0, ROT90, "Seatongrove Ltd (Crown license)", "Hero in the Castle of Doom (DK conversion not encrypted)", GAME_SUPPORTS_SAVE ) | |
| 2951 | GAME( 1984, 8ballact, 0, s2650, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DK conversion)", GAME_SUPPORTS_SAVE ) | |
| 2952 | GAME( 1984, 8ballat2, 8ballact, s2650, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DKJr conversion)", GAME_SUPPORTS_SAVE ) | |
| 2953 | GAME( 1984, shootgal, 0, s2650, shootgal, 0, ROT180, "Seatongrove Ltd (Zaccaria licence)", "Shooting Gallery", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 3020 | 2954 | GAME( 1985, spclforc, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) |
| 3021 | 2955 | GAME( 1985, spcfrcii, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces II", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) |
| 3022 | 2956 | |
| 2957 | /* EPOS */ | |
| 3023 | 2958 | GAME( 1984, drakton, 0, drakton, drakton, drakton, ROT90, "Epos Corporation", "Drakton (DK conversion)", GAME_SUPPORTS_SAVE ) |
| 3024 | 2959 | GAME( 1984, drktnjr, drakton, drktnjr, drakton, drakton, ROT90, "Epos Corporation", "Drakton (DKJr conversion)", GAME_SUPPORTS_SAVE ) |
| 3025 | 2960 | GAME( 1985, strtheat, 0, strtheat, strtheat, strtheat, ROT90, "Epos Corporation", "Street Heat - Cardinal Amusements", GAME_SUPPORTS_SAVE ) |
| r3171 | r3172 | |
|---|---|---|
| 549 | 549 | MDRV_CPU_ADD("audio", Z80, 3579545) /* 3.579545 MHz oscillator */ |
| 550 | 550 | MDRV_CPU_PROGRAM_MAP(saiyugb1_sound_map,0) |
| 551 | 551 | |
| 552 | MDRV_CPU_ADD("mcu", I8 | |
| 552 | MDRV_CPU_ADD("mcu", I8748, 9263750) /* 9.263750 MHz oscillator, divided by 3*5 internally */ | |
| 553 | 553 | MDRV_CPU_PROGRAM_MAP(i8748_map,0) |
| 554 | 554 | MDRV_CPU_IO_MAP(i8748_portmap,0) |
| 555 | 555 |
| r3171 | r3172 | |
|---|---|---|
| 113 | 113 | coin_counter_w(1, data & 2); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | static READ16_HANDLER( dbz_inp2_r ) | |
| 117 | { | |
| 118 | return input_port_read(machine, "DSW2") | (input_port_read(machine, "DSW2")<<8); | |
| 119 | } | |
| 120 | ||
| 121 | 116 | static WRITE16_HANDLER( dbz_sound_command_w ) |
| 122 | 117 | { |
| 123 | 118 | soundlatch_w(machine, 0, data>>8); |
| r3171 | r3172 | |
| 148 | 143 | AM_RANGE(0x4c0000, 0x4c0001) AM_READ(K053246_word_r) |
| 149 | 144 | AM_RANGE(0x4e0000, 0x4e0001) AM_READ_PORT("P1_P2") |
| 150 | 145 | AM_RANGE(0x4e0002, 0x4e0003) AM_READ_PORT("SYSTEM_DSW1") |
| 151 | AM_RANGE(0x4e4000, 0x4e4001) AM_READ | |
| 146 | AM_RANGE(0x4e4000, 0x4e4001) AM_READ | |
| 152 | 147 | AM_RANGE(0x500000, 0x501fff) AM_READ(SMH_RAM) |
| 153 | 148 | AM_RANGE(0x508000, 0x509fff) AM_READ(SMH_RAM) |
| 154 | 149 | AM_RANGE(0x510000, 0x513fff) AM_READ(SMH_RAM) |
| r3171 | r3172 | |
| 201 | 196 | AM_RANGE(0xd000, 0xd001) AM_WRITE(okim6295_data_0_w) |
| 202 | 197 | ADDRESS_MAP_END |
| 203 | 198 | |
| 204 | static ADDRESS_MAP_START( dbz_sound_ | |
| 199 | static ADDRESS_MAP_START( dbz_sound_ | |
| 205 | 200 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 206 | 201 | AM_RANGE(0x00, 0x00) AM_WRITE(SMH_NOP) |
| 207 | 202 | ADDRESS_MAP_END |
| r3171 | r3172 | |
| 258 | 253 | PORT_DIPSETTING( 0x8000, DEF_STR( On ) ) |
| 259 | 254 | |
| 260 | 255 | PORT_START("DSW2") |
| 256 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE") | |
| 257 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE") | |
| 258 | ||
| 259 | PORT_START("FAKE") | |
| 261 | 260 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) |
| 262 | 261 | PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) |
| 263 | 262 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) |
| r3171 | r3172 | |
| 347 | 346 | |
| 348 | 347 | MDRV_CPU_ADD("audio", Z80, 4000000) |
| 349 | 348 | MDRV_CPU_PROGRAM_MAP(dbz_sound_readmem, dbz_sound_writemem) |
| 350 | MDRV_CPU_IO_MAP( | |
| 349 | MDRV_CPU_IO_MAP( | |
| 351 | 350 | |
| 352 | 351 | MDRV_GFXDECODE(dbz) |
| 353 | 352 |
| r3171 | r3172 | |
|---|---|---|
| 125 | 125 | AM_RANGE(0xe000, 0xefff) AM_RAM_WRITE(wc90_txvideoram_w) AM_BASE(&wc90_txvideoram) /* tx video ram */ |
| 126 | 126 | AM_RANGE(0xf000, 0xf7ff) AM_READWRITE(SMH_BANK1, SMH_ROM) |
| 127 | 127 | AM_RANGE(0xf800, 0xfbff) AM_READWRITE(wc90_shared_r, wc90_shared_w) AM_BASE(&wc90_shared) |
| 128 | AM_RANGE(0xfc00, 0xfc00) AM_READ(input_port_0_r) /* Stick 1 */ | |
| 129 | AM_RANGE(0xfc02, 0xfc02) AM_READ(input_port_1_r) /* Stick 2 */ | |
| 130 | AM_RANGE(0xfc05, 0xfc05) AM_READ(input_port_4_r) /* Start & Coin */ | |
| 131 | AM_RANGE(0xfc06, 0xfc06) AM_READ(input_port_2_r) /* DIP Switch A */ | |
| 132 | AM_RANGE(0xfc07, 0xfc07) AM_READ(input_port_3_r) /* DIP Switch B */ | |
| 128 | AM_RANGE(0xfc00, 0xfc00) AM_READ_PORT("P1") | |
| 129 | AM_RANGE(0xfc02, 0xfc02) AM_READ_PORT("P2") | |
| 130 | AM_RANGE(0xfc05, 0xfc05) AM_READ_PORT("SYSTEM") | |
| 131 | AM_RANGE(0xfc06, 0xfc06) AM_READ_PORT("DSW1") | |
| 132 | AM_RANGE(0xfc07, 0xfc07) AM_READ_PORT("DSW2") | |
| 133 | 133 | AM_RANGE(0xfc02, 0xfc02) AM_WRITE(SMH_RAM) AM_BASE(&wc90_scroll0ylo) |
| 134 | 134 | AM_RANGE(0xfc03, 0xfc03) AM_WRITE(SMH_RAM) AM_BASE(&wc90_scroll0yhi) |
| 135 | 135 | AM_RANGE(0xfc06, 0xfc06) AM_WRITE(SMH_RAM) AM_BASE(&wc90_scroll0xlo) |
| r3171 | r3172 | |
| 172 | 172 | |
| 173 | 173 | |
| 174 | 174 | static INPUT_PORTS_START( wc90 ) |
| 175 | PORT_START("P1") | |
| 175 | PORT_START("P1") | |
| 176 | 176 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 177 | 177 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 178 | 178 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| r3171 | r3172 | |
| 182 | 182 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 183 | 183 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 184 | 184 | |
| 185 | PORT_START("P2") | |
| 185 | PORT_START("P2") | |
| 186 | 186 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 187 | 187 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 188 | 188 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| r3171 | r3172 | |
| 192 | 192 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 193 | 193 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 194 | 194 | |
| 195 | PORT_START("DSW1") | |
| 195 | PORT_START("DSW1") | |
| 196 | 196 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:8,7,6,5") |
| 197 | 197 | PORT_DIPSETTING( 0x00, "10 Coins/1 Credit" ) |
| 198 | 198 | PORT_DIPSETTING( 0x08, DEF_STR( 9C_1C ) ) |
| r3171 | r3172 | |
| 222 | 222 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 223 | 223 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 224 | 224 | |
| 225 | PORT_START("DSW2") | |
| 225 | PORT_START("DSW2") | |
| 226 | 226 | PORT_DIPNAME( 0x03, 0x03, "1 Player Game Time" ) PORT_DIPLOCATION("SW2:8,7") |
| 227 | 227 | PORT_DIPSETTING( 0x01, "1:00" ) |
| 228 | 228 | PORT_DIPSETTING( 0x02, "1:30" ) |
| r3171 | r3172 | |
| 245 | 245 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) /* ON by default */ |
| 246 | 246 | PORT_DIPSETTING( 0x80, DEF_STR( Japanese ) ) |
| 247 | 247 | |
| 248 | PORT_START("SYSTEM") | |
| 248 | PORT_START("SYSTEM") | |
| 249 | 249 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 250 | 250 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 251 | 251 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| r3171 | r3172 | |
|---|---|---|
| 480 | 480 | /* IC2 6840 PTM handler */ |
| 481 | 481 | static WRITE8_HANDLER( ic2_o1_callback ) |
| 482 | 482 | { |
| 483 | ptm6840_set_c2(0,data); | |
| 483 | ptm6840_set_c2(machine,0,data); | |
| 484 | 484 | |
| 485 | 485 | /* copy output value to IC2 c2 |
| 486 | 486 | this output is the clock for timer2 */ |
| r3171 | r3172 | |
| 492 | 492 | pia_set_input_ca1(0, data); /* copy output value to IC3 ca1 */ |
| 493 | 493 | |
| 494 | 494 | /* the output from timer2 is the input clock for timer3 */ |
| 495 | ptm6840_set_c3( 0, data); | |
| 495 | ptm6840_set_c3( machine, 0, data); | |
| 496 | 496 | } |
| 497 | 497 | |
| 498 | 498 | |
| r3171 | r3172 | |
| 501 | 501 | /* the output from timer3 is used as a square wave for the alarm output |
| 502 | 502 | and as an external clock source for timer 1! */ |
| 503 | 503 | |
| 504 | ptm6840_set_c1( 0, data); | |
| 504 | ptm6840_set_c1( machine, 0, data); | |
| 505 | 505 | } |
| 506 | 506 | |
| 507 | 507 | |
| r3171 | r3172 | |
| 1238 | 1238 | }; |
| 1239 | 1239 | |
| 1240 | 1240 | /* Common configurations */ |
| 1241 | static void mpu4_config_common( | |
| 1241 | static void mpu4_config_common(running_machine *machine) | |
| 1242 | 1242 | { |
| 1243 | 1243 | pia_config(0,&pia_ic3_intf); |
| 1244 | 1244 | pia_config(1,&pia_ic4_intf); |
| r3171 | r3172 | |
| 1249 | 1249 | |
| 1250 | 1250 | ic24_timer = timer_alloc(ic24_timeout, NULL); |
| 1251 | 1251 | /* setup 6840ptm */ |
| 1252 | ptm6840_config(0, &ptm_ic2_intf ); | |
| 1252 | ptm6840_config(machine, 0, &ptm_ic2_intf ); | |
| 1253 | 1253 | } |
| 1254 | 1254 | |
| 1255 | 1255 | static MACHINE_START( mpu4mod2 ) |
| 1256 | 1256 | { |
| 1257 | mpu4_config_common(); | |
| 1257 | mpu4_config_common(machine); | |
| 1258 | 1258 | pia_reset(); |
| 1259 | 1259 | |
| 1260 | 1260 | serial_card_connected=0; |
| r3171 | r3172 | |
|---|---|---|
| 156 | 156 | AM_RANGE(0x9800, 0x9fff) AM_READWRITE( SMH_RAM, skylncr_videoram2_w ) AM_BASE( &skylncr_videoram2 ) |
| 157 | 157 | AM_RANGE(0xa000, 0xa7ff) AM_READWRITE( SMH_RAM, skylncr_colorram2_w ) AM_BASE( &skylncr_colorram2 ) |
| 158 | 158 | |
| 159 | AM_RANGE(0xaa55, 0xaa55) AM_READ( ret_ff ) | |
| 159 | AM_RANGE(0xaa55, 0xaa55) AM_READ( ret_ff ) | |
| 160 | 160 | |
| 161 | 161 | AM_RANGE(0xb000, 0xb7ff) AM_RAM |
| 162 | 162 | |
| r3171 | r3172 | |
| 255 | 255 | 8*32*8/2 |
| 256 | 256 | }; |
| 257 | 257 | |
| 258 | static const gfx_layout mz_layout8x8x8 = | |
| 259 | { | |
| 260 | 8,8, | |
| 261 | RGN_FRAC(1,2), | |
| 262 | 8, | |
| 263 | { STEP8(0,1) }, | |
| 264 | { | |
| 265 | 8*0,8*1, | |
| 266 | RGN_FRAC(1,2)+8*0,RGN_FRAC(1,2)+8*1, | |
| 267 | 8*2,8*3, | |
| 268 | RGN_FRAC(1,2)+8*2,RGN_FRAC(1,2)+8*3 | |
| 269 | }, | |
| 270 | { STEP8(0,8*4) }, | |
| 271 | 8*8*4 | |
| 272 | }; | |
| 273 | ||
| 274 | static const gfx_layout mz_layout8x32x8 = | |
| 275 | { | |
| 276 | 8,32, | |
| 277 | RGN_FRAC(1,2), | |
| 278 | 8, | |
| 279 | { STEP8(0,1) }, | |
| 280 | { 8*0,8*1,8*2,8*3,8*4,8*5,8*6,8*7 }, | |
| 281 | { | |
| 282 | RGN_FRAC(1,2)+8*8*0, RGN_FRAC(0,2)+8*8*0, | |
| 283 | RGN_FRAC(1,2)+8*8*1, RGN_FRAC(0,2)+8*8*1, | |
| 284 | RGN_FRAC(1,2)+8*8*2, RGN_FRAC(0,2)+8*8*2, | |
| 285 | RGN_FRAC(1,2)+8*8*3, RGN_FRAC(0,2)+8*8*3, | |
| 286 | RGN_FRAC(1,2)+8*8*4, RGN_FRAC(0,2)+8*8*4, | |
| 287 | RGN_FRAC(1,2)+8*8*5, RGN_FRAC(0,2)+8*8*5, | |
| 288 | RGN_FRAC(1,2)+8*8*6, RGN_FRAC(0,2)+8*8*6, | |
| 289 | RGN_FRAC(1,2)+8*8*7, RGN_FRAC(0,2)+8*8*7, | |
| 290 | RGN_FRAC(1,2)+8*8*8, RGN_FRAC(0,2)+8*8*8, | |
| 291 | RGN_FRAC(1,2)+8*8*9, RGN_FRAC(0,2)+8*8*9, | |
| 292 | RGN_FRAC(1,2)+8*8*10,RGN_FRAC(0,2)+8*8*10, | |
| 293 | RGN_FRAC(1,2)+8*8*11,RGN_FRAC(0,2)+8*8*11, | |
| 294 | RGN_FRAC(1,2)+8*8*12,RGN_FRAC(0,2)+8*8*12, | |
| 295 | RGN_FRAC(1,2)+8*8*13,RGN_FRAC(0,2)+8*8*13, | |
| 296 | RGN_FRAC(1,2)+8*8*14,RGN_FRAC(0,2)+8*8*14, | |
| 297 | RGN_FRAC(1,2)+8*8*15,RGN_FRAC(0,2)+8*8*15 | |
| 298 | }, | |
| 299 | 8*16*8 | |
| 300 | }; | |
| 301 | ||
| 302 | static const gfx_layout mz_layout8x32x8_rot = | |
| 303 | { | |
| 304 | 8,32, | |
| 305 | RGN_FRAC(1,2), | |
| 306 | 8, | |
| 307 | { STEP8(0,1) }, | |
| 308 | { | |
| 309 | 8*0, 8*1, | |
| 310 | RGN_FRAC(1,2)+8*0, RGN_FRAC(1,2)+8*1, | |
| 311 | 8*2, 8*3, | |
| 312 | RGN_FRAC(1,2)+8*2, RGN_FRAC(1,2)+8*3 | |
| 313 | }, | |
| 314 | { | |
| 315 | STEP16(0,8*4), | |
| 316 | STEP16(16*8*4,8*4) | |
| 317 | }, | |
| 318 | 8*32*8/2 | |
| 319 | }; | |
| 320 | ||
| 258 | 321 | static GFXDECODE_START( skylncr ) |
| 259 | GFXDECODE_ENTRY( "gfx1", 0, layout8x8x8, | |
| 322 | GFXDECODE_ENTRY( "gfx1", 0, layout8x8x8, | |
| 260 | 323 | GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_rot, 0, 2 ) |
| 261 | 324 | GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8, 0, 2 ) |
| 262 | 325 | GFXDECODE_END |
| 263 | 326 | |
| 327 | static GFXDECODE_START( madzoo ) | |
| 328 | GFXDECODE_ENTRY( "gfx1", 0, mz_layout8x8x8, 0, 2 ) | |
| 329 | GFXDECODE_ENTRY( "gfx2", 0, mz_layout8x32x8_rot, 0, 2 ) | |
| 330 | GFXDECODE_ENTRY( "gfx2", 0, mz_layout8x32x8, 0, 2 ) | |
| 331 | GFXDECODE_END | |
| 332 | ||
| 264 | 333 | static INPUT_PORTS_START( skylncr ) |
| 265 | 334 | PORT_START("SYSTEM") /* $0 "PORT0 A" */ |
| 266 | 335 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1) |
| r3171 | r3172 | |
| 405 | 474 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 406 | 475 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 407 | 476 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 477 | ||
| 408 | 478 | INPUT_PORTS_END |
| 409 | 479 | |
| 410 | 480 | static const ay8910_interface ay8910_config = |
| r3171 | r3172 | |
| 453 | 523 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 454 | 524 | MACHINE_DRIVER_END |
| 455 | 525 | |
| 526 | static MACHINE_DRIVER_START( madzoo ) | |
| 527 | ||
| 528 | /* basic machine hardware */ | |
| 529 | MDRV_IMPORT_FROM(skylncr) | |
| 530 | ||
| 531 | /* video hardware */ | |
| 532 | MDRV_GFXDECODE(madzoo) | |
| 533 | MACHINE_DRIVER_END | |
| 534 | ||
| 456 | 535 | /* |
| 536 | ||
| 457 | 537 | Sky Lancer PCB Layout |
| 458 | 538 | --------------------- |
| 459 | 539 | |
| r3171 | r3172 | |
| 482 | 562 | WF19054 = AY-3-8910 @ 1.5MHz [12/8] |
| 483 | 563 | */ |
| 484 | 564 | |
| 485 | static DRIVER_INIT( skylncr ) | |
| 486 | { | |
| 487 | paletteram = auto_malloc(0x100*3); | |
| 488 | paletteram_2 = auto_malloc(0x100*3); | |
| 489 | } | |
| 490 | ||
| 491 | 565 | ROM_START( skylncr ) |
| 492 | 566 | ROM_REGION( 0x80000, "main", 0 ) |
| 493 | 567 | ROM_LOAD( "27512.u35", 0x00000, 0x10000, CRC(98b1c9fe) SHA1(9ca1706d25038a078fb07ba5c2e6681ed468bc88) ) |
| r3171 | r3172 | |
| 499 | 573 | ROM_LOAD( "574200.u33", 0x00000, 0x80000, CRC(19b25221) SHA1(2f32d337125a9fd0bc7f50713b05e564fd4f81b2) ) |
| 500 | 574 | ROM_END |
| 501 | 575 | |
| 576 | /* | |
| 577 | ||
| 578 | Mad Zoo PCB Layout | |
| 579 | ------------------ | |
| 580 | ||
| 581 | |-----| |------| |---------------------------| | |
| 582 | | |--| |--|ROM.U29 ROM.U52 | | |
| 583 | | | | |
| 584 | | DSW3(8) ROM.U31 ROM.U54 | | |
| 585 | | KC89C72 | | |
| 586 | | DSW4(8) ROM.U33 ROM.U56 | | |
| 587 | |_ | | |
| 588 | | PAL ROM.U35 ROM.U58 | | |
| 589 | | |-------| | | |
| 590 | _| |LATTICE| 6116 | | |
| 591 | | 12MHz |1016 | | | |
| 592 | | | | 6116 | | |
| 593 | | 8255 |-------| | | |
| 594 | | 6116 | | |
| 595 | | DSW1(8) DSW2(8) | | |
| 596 | | 8255 PAL ROM.U9 6116 | | |
| 597 | | | | |
| 598 | | 6264 Z80 6116 6116 | | |
| 599 | |_ 6264 PAL BATTERY| | |
| 600 | |--------------------------------------------| | |
| 601 | Notes: | |
| 602 | Z80 @ 3.0MHz [12/4] | |
| 603 | KC89C72 = AY-3-8910 @ 1.5MHz [12/8] | |
| 604 | */ | |
| 605 | ||
| 606 | ROM_START( madzoo ) | |
| 607 | ROM_REGION( 0x80000, "main", 0 ) | |
| 608 | ROM_LOAD( "27512.u9", 0x00000, 0x10000, CRC(98b1c9fe) SHA1(9ca1706d25038a078fb07ba5c2e6681ed468bc88) ) | |
| 609 | ||
| 610 | ROM_REGION( 0x80000, "gfx1", 0 ) | |
| 611 | ROM_LOAD( "27c301.u29", 0x00000, 0x20000, CRC(4d58ab1d) SHA1(a6c9a855de6c7c502deea6afe2061dbbc6a1dfce) ) | |
| 612 | ROM_LOAD( "27c301.u31", 0x20000, 0x20000, CRC(511a8d19) SHA1(d49cc025b7b44a1f364b843dbe215fd2aa1e8986) ) | |
| 613 | ROM_LOAD( "27c301.u33", 0x40000, 0x20000, CRC(63e7ec89) SHA1(5184c164c356976325c7ad715d0f32a16bd44061) ) | |
| 614 | ROM_LOAD( "27c301.u35", 0x60000, 0x20000, CRC(a1ef51d1) SHA1(76508de6ab9effd1c8e27753403f161da073014c) ) | |
| 615 | ||
| 616 | ROM_REGION( 0x80000, "gfx2", 0 ) | |
| 617 | ROM_LOAD( "27c301.u52", 0x00000, 0x20000, CRC(00cd5c9d) SHA1(68c2ffdba4018bcb03fe8a96c4a269d3ec7379d8) ) | |
| 618 | ROM_LOAD( "27c301.u54", 0x20000, 0x20000, CRC(9bd8af17) SHA1(5f32523ea797821205c5bb0f3c53c09ca784555b) ) | |
| 619 | ROM_LOAD( "27c301.u56", 0x40000, 0x20000, CRC(d73278a6) SHA1(2865659d80c76d73f19b178748cf67d792cd6a84) ) | |
| 620 | ROM_LOAD( "27c301.u58", 0x60000, 0x20000, CRC(895b2dac) SHA1(2a6dfec2a18a63f0cc4344506653ab7b14c31a59) ) | |
| 621 | ROM_END | |
| 622 | ||
| 623 | ||
| 624 | static DRIVER_INIT( skylncr ) | |
| 625 | { | |
| 626 | paletteram = auto_malloc(0x100*3); | |
| 627 | paletteram_2 = auto_malloc(0x100*3); | |
| 628 | } | |
| 629 | ||
| 630 | ||
| 631 | /***************************************************** | |
| 632 | Game Drivers | |
| 633 | *****************************************************/ | |
| 634 | ||
| 502 | 635 | GAME( 1995, skylncr, 0, skylncr, skylncr, skylncr, ROT0, "Bordun International", "Sky Lancer (Bordun International)", GAME_NOT_WORKING ) |
| 636 | GAME( 1995, madzoo, 0, madzoo, skylncr, skylncr, ROT0, "Bordun International", "Mad Zoo", GAME_NOT_WORKING ) |
| r3171 | r3172 | |
|---|---|---|
| 126 | 126 | AM_RANGE(0xf800, 0xffff) AM_WRITE(SMH_RAM) |
| 127 | 127 | ADDRESS_MAP_END |
| 128 | 128 | |
| 129 | static ADDRESS_MAP_START( sound_ | |
| 129 | static ADDRESS_MAP_START( sound_io_ma | |
| 130 | 130 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 131 | 131 | AM_RANGE(0x01, 0x01) AM_READ(soundlatch_r) |
| 132 | AM_RANGE(0x05, 0x05) AM_READ(okim6295_status_0_r) | |
| 133 | ADDRESS_MAP_END | |
| 134 | ||
| 135 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 136 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 137 | 132 | AM_RANGE(0x02, 0x02) AM_WRITE(ym3812_control_port_0_w) |
| 138 | 133 | AM_RANGE(0x03, 0x03) AM_WRITE(ym3812_write_port_0_w) |
| 139 | AM_RANGE(0x05, 0x05) AM_WRITE(okim6295_data_0_w) | |
| 134 | AM_RANGE(0x05, 0x05) AM_READWRITE(okim6295_status_0_r, okim6295_data_0_w) | |
| 140 | 135 | AM_RANGE(0x07, 0x07) AM_WRITE(deniam16b_oki_rom_bank_w) |
| 141 | 136 | ADDRESS_MAP_END |
| 142 | 137 | |
| 143 | ||
| 144 | 138 | /* identical to 16b, but handles sound directly */ |
| 145 | 139 | static ADDRESS_MAP_START( deniam16c_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 146 | 140 | AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM) |
| r3171 | r3172 | |
| 288 | 282 | |
| 289 | 283 | MDRV_CPU_ADD("audio", Z80,25000000/4) /* (makes logicpro music tempo correct) */ |
| 290 | 284 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 291 | MDRV_CPU_IO_MAP(sound_ | |
| 285 | MDRV_CPU_IO_MAP(sound_i | |
| 292 | 286 | |
| 293 | 287 | MDRV_MACHINE_RESET(deniam) |
| 294 | 288 | |
| r3171 | r3172 | |
| 451 | 445 | GAME( 1996, croquis, logicpro, deniam16b, logicpr2, logicpro, ROT0, "Deniam", "Croquis (Germany)", 0 ) |
| 452 | 446 | GAME( 1996, karianx, 0, deniam16b, karianx, karianx, ROT0, "Deniam", "Karian Cross (Rev. 1.0)", 0 ) |
| 453 | 447 | GAME( 1997, logicpr2, 0, deniam16c, logicpr2, logicpro, ROT0, "Deniam", "Logic Pro 2 (Japan)", GAME_IMPERFECT_SOUND ) |
| 448 |
| r3171 | r3172 | |
|---|---|---|
| 30 | 30 | { |
| 31 | 31 | switch (offset<<1) |
| 32 | 32 | { |
| 33 | case 0: | |
| 33 | case 0: | |
| 34 | 34 | return input_port_read(machine, "INPUTS"); |
| 35 | 35 | |
| 36 | case 2: /* Credits, start buttons */ | |
| 37 | return (input_port_read(machine, "COIN") | (input_port_read(machine, "COIN") << 8)); | |
| 36 | case 2: | |
| 37 | return input_port_read(machine, "COIN"); | |
| 38 | 38 | |
| 39 | case 4: | |
| 39 | case 4: | |
| 40 | 40 | return input_port_read(machine, "DSW"); |
| 41 | 41 | } |
| 42 | 42 | |
| r3171 | r3172 | |
| 131 | 131 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 132 | 132 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) |
| 133 | 133 | |
| 134 | PORT_START("COIN") /* 0x30c002 & 0x30c003 : Credits, start buttons */ | |
| 135 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* related to music/sound */ | |
| 136 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* related to music/sound */ | |
| 137 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* related to music/sound */ | |
| 138 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* related to music/sound */ | |
| 139 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 140 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 141 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 142 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 143 | ||
| 144 | 134 | PORT_START("DSW") /* 0x30c004 - 0x30c005 */ |
| 145 | 135 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coin_A ) ) |
| 146 | 136 | PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) |
| r3171 | r3172 | |
| 177 | 167 | PORT_DIPSETTING( 0x0000, "6 Credits" ) |
| 178 | 168 | PORT_DIPUNUSED( 0x4000, IP_ACTIVE_LOW ) |
| 179 | 169 | PORT_DIPUNUSED( 0x8000, IP_ACTIVE_LOW ) |
| 170 | ||
| 171 | PORT_START("COIN") /* 0x30c002 & 0x30c003 */ | |
| 172 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE") | |
| 173 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE") | |
| 174 | ||
| 175 | PORT_START("FAKE") | |
| 176 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* related to music/sound */ | |
| 177 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* related to music/sound */ | |
| 178 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* related to music/sound */ | |
| 179 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* related to music/sound */ | |
| 180 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 181 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 182 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 183 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 180 | 184 | INPUT_PORTS_END |
| 181 | 185 | |
| 182 | 186 | /******************************************************************************/ |
| r3171 | r3172 | |
|---|---|---|
| 76 | 76 | AM_RANGE(0xf800, 0xf800) AM_WRITE(SMH_NOP) // ??? |
| 77 | 77 | ADDRESS_MAP_END |
| 78 | 78 | |
| 79 | static ADDRESS_MAP_START( prehisle_sound_ | |
| 79 | static ADDRESS_MAP_START( prehisle_sound_io_ma | |
| 80 | 80 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 81 | AM_RANGE(0x00, 0x00) AM_READ(ym3812_status_port_0_r) | |
| 82 | ADDRESS_MAP_END | |
| 83 | ||
| 84 | static ADDRESS_MAP_START( prehisle_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 85 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 86 | AM_RANGE(0x00, 0x00) AM_WRITE(ym3812_control_port_0_w) | |
| 81 | AM_RANGE(0x00, 0x00) AM_READWRITE(ym3812_status_port_0_r, ym3812_control_port_0_w) | |
| 87 | 82 | AM_RANGE(0x20, 0x20) AM_WRITE(ym3812_write_port_0_w) |
| 88 | 83 | AM_RANGE(0x40, 0x40) AM_WRITE(D7759_write_port_0_w) |
| 89 | 84 | AM_RANGE(0x80, 0x80) AM_WRITE(upd7759_0_reset_w) |
| r3171 | r3172 | |
| 235 | 230 | |
| 236 | 231 | MDRV_CPU_ADD("audio", Z80, XTAL_4MHz) /* verified on pcb */ |
| 237 | 232 | MDRV_CPU_PROGRAM_MAP(prehisle_sound_readmem,prehisle_sound_writemem) |
| 238 | MDRV_CPU_IO_MAP(prehisle_sound_ | |
| 233 | MDRV_CPU_IO_MAP(prehisle_sound_ | |
| 239 | 234 | |
| 240 | 235 | /* video hardware */ |
| 241 | 236 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 354 | 349 | GAME( 1989, prehisle, 0, prehisle, prehisle, 0, ROT0, "SNK", "Prehistoric Isle in 1930 (World)", GAME_SUPPORTS_SAVE ) |
| 355 | 350 | GAME( 1989, prehislu, prehisle, prehisle, prehisle, 0, ROT0, "SNK of America", "Prehistoric Isle in 1930 (US)", GAME_SUPPORTS_SAVE ) |
| 356 | 351 | GAME( 1989, gensitou, prehisle, prehisle, prehisle, 0, ROT0, "SNK", "Genshi-Tou 1930's", GAME_SUPPORTS_SAVE ) |
| 352 |
| r3171 | r3172 | |
|---|---|---|
| 152 | 152 | |
| 153 | 153 | extern UINT16 *wwfsstar_fg0_videoram, *wwfsstar_bg0_videoram; |
| 154 | 154 | |
| 155 | static READ16_HANDLER( input_port_2_word_r_cust ); | |
| 156 | 155 | static WRITE16_HANDLER( wwfsstar_irqack_w ); |
| 157 | 156 | static WRITE16_HANDLER( wwfsstar_flipscreen_w ); |
| 158 | 157 | static WRITE16_HANDLER ( wwfsstar_soundwrite ); |
| r3171 | r3172 | |
| 173 | 172 | AM_RANGE(0x100000, 0x1003ff) AM_RAM AM_BASE(&spriteram16) /* SPR Ram */ |
| 174 | 173 | AM_RANGE(0x140000, 0x140fff) AM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE(&paletteram16) |
| 175 | 174 | AM_RANGE(0x180000, 0x180003) AM_WRITE(wwfsstar_irqack_w) |
| 176 | AM_RANGE(0x180000, 0x180001) AM_READ_PORT("DSW0") /* DSW0 */ | |
| 177 | AM_RANGE(0x180002, 0x180003) AM_READ_PORT("DSW1") /* DSW1 */ | |
| 178 | AM_RANGE(0x180004, 0x180005) AM_READ_PORT("P1") /* CTRLS0 */ | |
| 175 | AM_RANGE(0x180000, 0x180001) AM_READ_PORT("DSW1") | |
| 176 | AM_RANGE(0x180002, 0x180003) AM_READ_PORT("DSW2") | |
| 177 | AM_RANGE(0x180004, 0x180005) AM_READ_PORT("P1") | |
| 179 | 178 | AM_RANGE(0x180004, 0x180007) AM_WRITE(wwfsstar_scrollwrite) |
| 180 | AM_RANGE(0x180006, 0x180007) AM_READ_PORT("P2") /* CTRLS1 */ | |
| 181 | AM_RANGE(0x180008, 0x180009) AM_READ(input_port_2_word_r_cust) /* MISC */ | |
| 179 | AM_RANGE(0x180006, 0x180007) AM_READ_PORT("P2") | |
| 180 | AM_RANGE(0x180008, 0x180009) AM_READ_PORT("SYSTEM") | |
| 182 | 181 | AM_RANGE(0x180008, 0x180009) AM_WRITE(wwfsstar_soundwrite) |
| 183 | 182 | AM_RANGE(0x18000a, 0x18000b) AM_WRITE(wwfsstar_flipscreen_w) |
| 184 | 183 | AM_RANGE(0x1c0000, 0x1c3fff) AM_RAM /* Work Ram */ |
| r3171 | r3172 | |
| 277 | 276 | } |
| 278 | 277 | } |
| 279 | 278 | |
| 280 | static | |
| 279 | static CUSTOM_I | |
| 281 | 280 | { |
| 282 | return | |
| 281 | return | |
| 283 | 282 | } |
| 284 | 283 | |
| 285 | 284 | /******************************************************************************* |
| r3171 | r3172 | |
| 312 | 311 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Button B (1P VS 2P - Buy-in)") |
| 313 | 312 | |
| 314 | 313 | PORT_START("SYSTEM") |
| 315 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* VBlank */ | |
| 314 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(wwfsstar_vblank_r, NULL) /* VBlank */ | |
| 316 | 315 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 317 | 316 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 318 | 317 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r3171 | r3172 | |
| 321 | 320 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 322 | 321 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 323 | 322 | |
| 324 | PORT_START("DSW | |
| 323 | PORT_START("DSW1") | |
| 325 | 324 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) |
| 326 | 325 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) |
| 327 | 326 | PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) |
| r3171 | r3172 | |
| 347 | 346 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 348 | 347 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 349 | 348 | |
| 350 | PORT_START("DSW | |
| 349 | PORT_START("DSW2") | |
| 351 | 350 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| 352 | 351 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) |
| 353 | 352 | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) |
| r3171 | r3172 | |
|---|---|---|
| 414 | 414 | ROM_LOAD16_BYTE( "tgnr13h.bin", 0x40001, 0x20000, CRC(22effcc8) SHA1(4d174b0ce64def32050f87343c4b1424e0fef6f7) ) |
| 415 | 415 | |
| 416 | 416 | #if 0 |
| 417 | same data, different layout (and one bad ROM) | |
| 417 | /* same data, different layout (and one bad ROM) */ | |
| 418 | 418 | ROM_LOAD16_WORD_SWAP( "t-17.n12", 0x00000, 0x08000, CRC(e8875110) ) |
| 419 | 419 | ROM_LOAD16_WORD_SWAP( "t-18.n13", 0x08000, 0x08000, CRC(cf14471d) ) |
| 420 | 420 | ROM_LOAD16_WORD_SWAP( "t-19.n14", 0x10000, 0x08000, CRC(46ee5dd2) ) |
| r3171 | r3172 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | |
| 40 | static UINT8 backup_ram[0x2000]; | |
| 41 | ||
| 42 | 40 | static VIDEO_UPDATE(viper) |
| 43 | 41 | { |
| 44 | 42 | const device_config *device = device_list_find_by_tag(screen->machine->config->devicelist, VOODOO_GRAPHICS, "voodoo"); |
| r3171 | r3172 | |
| 561 | 559 | AM_RANGE(0xfee00000, 0xfeefffff) AM_READWRITE(pci_config_data_r, pci_config_data_w) |
| 562 | 560 | AM_RANGE(0xff300000, 0xff300fff) AM_DEVREADWRITE(IDE_CONTROLLER, "ide", ata_r, ata_w) |
| 563 | 561 | AM_RANGE(0xffe10000, 0xffe10007) AM_READ(unk1_r) |
| 564 | AM_RANGE(0xffe30000, 0xffe31fff) AM_READWRITE8(timekeeper_ | |
| 562 | AM_RANGE(0xffe30000, 0xffe31fff) AM_DEVREADWRITE8(M48T58,"m48t58",timekeeper_ | |
| 565 | 563 | AM_RANGE(0xffe40000, 0xffe4000f) AM_NOP |
| 566 | 564 | AM_RANGE(0xffe50000, 0xffe50007) AM_WRITE(unk2_w) |
| 567 | 565 | AM_RANGE(0xffe80000, 0xffe80007) AM_WRITE(unk1a_w) |
| r3171 | r3172 | |
| 592 | 590 | devtag_reset(machine, IDE_CONTROLLER, "ide"); |
| 593 | 591 | } |
| 594 | 592 | |
| 593 | static const timekeeper_config timekeeper_intf = | |
| 594 | { | |
| 595 | "m48t58" | |
| 596 | }; | |
| 597 | ||
| 595 | 598 | static MACHINE_DRIVER_START(viper) |
| 596 | 599 | |
| 597 | 600 | /* basic machine hardware */ |
| r3171 | r3172 | |
| 602 | 605 | |
| 603 | 606 | MDRV_MACHINE_RESET(viper) |
| 604 | 607 | |
| 605 | MDRV_NVRAM_HANDLER(timekeeper_0) | |
| 606 | ||
| 607 | 608 | MDRV_IDE_CONTROLLER_ADD("ide", ide_interrupt) |
| 608 | 609 | MDRV_3DFX_VOODOO_3_ADD("voodoo", STD_VOODOO_3_CLOCK, 16, "main") |
| 609 | 610 | |
| r3171 | r3172 | |
| 621 | 622 | /* sound hardware */ |
| 622 | 623 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 623 | 624 | |
| 625 | MDRV_DEVICE_ADD( "m48t58", M48T58 ) | |
| 626 | MDRV_DEVICE_CONFIG( timekeeper_intf ) | |
| 624 | 627 | MACHINE_DRIVER_END |
| 625 | 628 | |
| 626 | 629 | /*****************************************************************************/ |
| r3171 | r3172 | |
| 639 | 642 | |
| 640 | 643 | static DRIVER_INIT(viper) |
| 641 | 644 | { |
| 642 | UINT8 *nvram; | |
| 643 | ||
| 644 | 645 | pci_init(); |
| 645 | 646 | pci_add_device(0, 0, &mpc8240); |
| 646 | 647 | pci_add_device(0, 12, &voodoo3); |
| 647 | ||
| 648 | timekeeper_init(machine, 0, TIMEKEEPER_M48T58, backup_ram); | |
| 649 | ||
| 650 | nvram = memory_region(machine, "user2"); | |
| 651 | memcpy(backup_ram, nvram, 0x2000); | |
| 652 | 648 | } |
| 653 | 649 | |
| 654 | 650 | static DRIVER_INIT(vipercf) |
| r3171 | r3172 | |
| 661 | 657 | memory_install_readwrite64_device_handler( ide, 0, ADDRESS_SPACE_PROGRAM, 0xff200000, 0xff200fff, 0, 0, cf_card_r, cf_card_w ); |
| 662 | 658 | } |
| 663 | 659 | |
| 664 | static DRIVER_INIT(ppp2nd) | |
| 665 | { | |
| 666 | DRIVER_INIT_CALL(viper); | |
| 667 | 660 | |
| 668 | /* | |
| 669 | backup_ram[0x0000] = 0x50; // P | |
| 670 | backup_ram[0x0001] = 0x33; // 3 | |
| 671 | backup_ram[0x0002] = 0x5f; // _ | |
| 672 | backup_ram[0x0003] = 0x32; // 2 | |
| 673 | backup_ram[0x0004] = 0x6e; // n | |
| 674 | backup_ram[0x0005] = 0x64; // d | |
| 675 | backup_ram[0x0006] = 0x4d; // M | |
| 676 | backup_ram[0x0007] = 0x49; // I | |
| 677 | backup_ram[0x0008] = 0x58; // X | |
| 678 | backup_ram[0x0009] = 0x00; // | |
| 679 | backup_ram[0x000a] = 0x00; // | |
| 680 | backup_ram[0x000b] = 0x00; // | |
| 681 | backup_ram[0x000c] = 0x00; // | |
| 682 | backup_ram[0x000d] = 0x00; // | |
| 683 | backup_ram[0x000e] = 0x00; // | |
| 684 | backup_ram[0x000f] = 0x00; // | |
| 685 | ||
| 686 | backup_ram[0x0100] = 0x39; | |
| 687 | backup_ram[0x0101] = 0x89; | |
| 688 | backup_ram[0x0102] = 0x3a; | |
| 689 | backup_ram[0x0103] = 0xaa; | |
| 690 | */ | |
| 691 | } | |
| 692 | ||
| 693 | ||
| 694 | 661 | /*****************************************************************************/ |
| 695 | 662 | |
| 696 | 663 | #define ROM_LOAD_BIOS(bios,name,offset,length,hash) \ |
| r3171 | r3172 | |
| 705 | 672 | ROM_START(kviper) |
| 706 | 673 | VIPER_BIOS |
| 707 | 674 | |
| 708 | ROM_REGION(0x2000, " | |
| 675 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 709 | 676 | ROM_END |
| 710 | 677 | |
| 711 | 678 | |
| r3171 | r3172 | |
| 713 | 680 | ROM_START(ppp2nd) |
| 714 | 681 | VIPER_BIOS |
| 715 | 682 | |
| 716 | ROM_REGION(0x2000, " | |
| 683 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 717 | 684 | |
| 718 | 685 | DISK_REGION( "ide" ) |
| 719 | | |
| 686 | | |
| 720 | 687 | ROM_END |
| 721 | 688 | |
| 722 | 689 | /* Viper games with Compact Flash card */ |
| 723 | 690 | ROM_START(boxingm) |
| 724 | 691 | VIPER_BIOS |
| 725 | 692 | |
| 726 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 727 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(c24e29fc) SHA1(efb6ecaf25cbdf9d8dfcafa85e38a195fa5ff6c4)) | |
| 693 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 694 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(c24e29fc) SHA1(efb6ecaf25cbdf9d8dfcafa85e38a195fa5ff6c4)) | |
| 728 | 695 | |
| 729 | 696 | DISK_REGION( "ide" ) |
| 730 | | |
| 697 | | |
| 731 | 698 | ROM_END |
| 732 | 699 | |
| 733 | 700 | ROM_START(code1d) |
| 734 | 701 | VIPER_BIOS |
| 735 | 702 | |
| 736 | ROM_REGION(0x2000, " | |
| 703 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 737 | 704 | |
| 738 | 705 | DISK_REGION( "ide" ) |
| 739 | | |
| 706 | | |
| 740 | 707 | ROM_END |
| 741 | 708 | |
| 742 | 709 | ROM_START(code1db) |
| 743 | 710 | VIPER_BIOS |
| 744 | 711 | |
| 745 | ROM_REGION(0x2000, " | |
| 712 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 746 | 713 | |
| 747 | 714 | DISK_REGION( "ide" ) |
| 748 | | |
| 715 | | |
| 749 | 716 | ROM_END |
| 750 | 717 | |
| 751 | 718 | ROM_START(gticlub2) |
| 752 | 719 | VIPER_BIOS |
| 753 | 720 | |
| 754 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 755 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(d0604e84) SHA1(18d1183f1331af3e655a56692eb7ab877b4bc239)) | |
| 721 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 722 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(d0604e84) SHA1(18d1183f1331af3e655a56692eb7ab877b4bc239)) | |
| 756 | 723 | |
| 757 | 724 | DISK_REGION( "ide" ) |
| 758 | | |
| 725 | | |
| 759 | 726 | ROM_END |
| 760 | 727 | |
| 761 | 728 | ROM_START(jpark3) |
| 762 | 729 | VIPER_BIOS |
| 763 | 730 | |
| 764 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 765 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(55d1681d) SHA1(26868cf0d14f23f06b81f2df0b4186924439bb43)) | |
| 731 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 732 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(55d1681d) SHA1(26868cf0d14f23f06b81f2df0b4186924439bb43)) | |
| 766 | 733 | |
| 767 | 734 | DISK_REGION( "ide" ) |
| 768 | | |
| 735 | | |
| 769 | 736 | ROM_END |
| 770 | 737 | |
| 771 | 738 | ROM_START(mocapglf) |
| 772 | 739 | VIPER_BIOS |
| 773 | 740 | |
| 774 | ROM_REGION(0x2000, " | |
| 741 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 775 | 742 | |
| 776 | 743 | DISK_REGION( "ide" ) |
| 777 | | |
| 744 | | |
| 778 | 745 | ROM_END |
| 779 | 746 | |
| 780 | 747 | ROM_START(mocapb) |
| 781 | 748 | VIPER_BIOS |
| 782 | 749 | |
| 783 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 784 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(14b9fe68) SHA1(3c59e6df1bb46bc1835c13fd182b1bb092c08759)) | |
| 750 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 751 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(14b9fe68) SHA1(3c59e6df1bb46bc1835c13fd182b1bb092c08759)) | |
| 785 | 752 | |
| 786 | 753 | DISK_REGION( "ide" ) |
| 787 | | |
| 754 | | |
| 788 | 755 | ROM_END |
| 789 | 756 | |
| 790 | 757 | ROM_START(mocapbj) |
| 791 | 758 | VIPER_BIOS |
| 792 | 759 | |
| 793 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 794 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(2f7cdf27) SHA1(0b69d8728be12909e235268268a312982f81d46a)) | |
| 760 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 761 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(2f7cdf27) SHA1(0b69d8728be12909e235268268a312982f81d46a)) | |
| 795 | 762 | |
| 796 | 763 | DISK_REGION( "ide" ) |
| 797 | | |
| 764 | | |
| 798 | 765 | ROM_END |
| 799 | 766 | |
| 800 | 767 | ROM_START(p911) |
| 801 | 768 | VIPER_BIOS |
| 802 | 769 | |
| 803 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 804 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(cca056ca) SHA1(de1a00d84c1311d48bbe6d24f5b36e22ecf5e85a)) | |
| 770 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 771 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(cca056ca) SHA1(de1a00d84c1311d48bbe6d24f5b36e22ecf5e85a)) | |
| 805 | 772 | |
| 806 | 773 | DISK_REGION( "ide" ) |
| 807 | | |
| 774 | | |
| 808 | 775 | ROM_END |
| 809 | 776 | |
| 810 | 777 | ROM_START(p911uc) |
| 811 | 778 | VIPER_BIOS |
| 812 | 779 | |
| 813 | ROM_REGION(0x2000, " | |
| 780 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 814 | 781 | |
| 815 | 782 | DISK_REGION( "ide" ) |
| 816 | | |
| 783 | | |
| 817 | 784 | ROM_END |
| 818 | 785 | |
| 819 | 786 | ROM_START(p911e) |
| 820 | 787 | VIPER_BIOS |
| 821 | 788 | |
| 822 | ROM_REGION(0x2000, " | |
| 789 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 823 | 790 | |
| 824 | 791 | DISK_REGION( "ide" ) |
| 825 | | |
| 792 | | |
| 826 | 793 | ROM_END |
| 827 | 794 | |
| 828 | 795 | ROM_START(p911j) |
| 829 | 796 | VIPER_BIOS |
| 830 | 797 | |
| 831 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 832 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(9ecf70dc) SHA1(4769a99b0cc28563e219860b8d480f32d1e21f60)) | |
| 798 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 799 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(9ecf70dc) SHA1(4769a99b0cc28563e219860b8d480f32d1e21f60)) | |
| 833 | 800 | |
| 834 | 801 | DISK_REGION( "ide" ) |
| 835 | | |
| 802 | | |
| 836 | 803 | ROM_END |
| 837 | 804 | |
| 838 | 805 | ROM_START(p9112) |
| 839 | 806 | VIPER_BIOS |
| 840 | 807 | |
| 841 | ROM_REGION(0x2000, " | |
| 808 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 842 | 809 | |
| 843 | 810 | DISK_REGION( "ide" ) |
| 844 | | |
| 811 | | |
| 845 | 812 | ROM_END |
| 846 | 813 | |
| 847 | 814 | ROM_START(popn9) |
| 848 | 815 | VIPER_BIOS |
| 849 | 816 | |
| 850 | ROM_REGION(0x2000, " | |
| 817 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 851 | 818 | |
| 852 | 819 | DISK_REGION( "ide" ) |
| 853 | | |
| 820 | | |
| 854 | 821 | ROM_END |
| 855 | 822 | |
| 856 | 823 | ROM_START(sscopex) |
| 857 | 824 | VIPER_BIOS |
| 858 | 825 | |
| 859 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 860 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(7b0e1ac8) SHA1(1ea549964539e27f87370e9986bfa44eeed037cd)) | |
| 826 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 827 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(7b0e1ac8) SHA1(1ea549964539e27f87370e9986bfa44eeed037cd)) | |
| 861 | 828 | |
| 862 | 829 | DISK_REGION( "ide" ) |
| 863 | | |
| 830 | | |
| 864 | 831 | ROM_END |
| 865 | 832 | |
| 866 | 833 | ROM_START(sogeki) |
| 867 | 834 | VIPER_BIOS |
| 868 | 835 | |
| 869 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 870 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(2f325c55) SHA1(0bc44f40f981a815c8ce64eae95ae55db510c565)) | |
| 836 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 837 | ROM_LOAD("nvram.u39", 0x000000, 0x2000, CRC(2f325c55) SHA1(0bc44f40f981a815c8ce64eae95ae55db510c565)) | |
| 871 | 838 | |
| 872 | 839 | DISK_REGION( "ide" ) |
| 873 | | |
| 840 | | |
| 874 | 841 | ROM_END |
| 875 | 842 | |
| 876 | 843 | ROM_START(thrild2) |
| 877 | 844 | VIPER_BIOS |
| 878 | 845 | |
| 879 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 880 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(d5de9b8e) SHA1(768bcd46a6ad20948f60f5e0ecd2f7b9c2901061)) | |
| 846 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 847 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(d5de9b8e) SHA1(768bcd46a6ad20948f60f5e0ecd2f7b9c2901061)) | |
| 881 | 848 | |
| 882 | 849 | DISK_REGION( "ide" ) |
| 883 | | |
| 850 | | |
| 884 | 851 | ROM_END |
| 885 | 852 | |
| 886 | 853 | ROM_START(thrild2a) |
| 887 | 854 | VIPER_BIOS |
| 888 | 855 | |
| 889 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 890 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(3b7b0969) SHA1(3f11b6420ad3e3ee6f807e1ae14908bdc6e86d8f)) | |
| 856 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 857 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(3b7b0969) SHA1(3f11b6420ad3e3ee6f807e1ae14908bdc6e86d8f)) | |
| 891 | 858 | |
| 892 | 859 | DISK_REGION( "ide" ) |
| 893 | | |
| 860 | | |
| 894 | 861 | ROM_END |
| 895 | 862 | |
| 896 | 863 | ROM_START(tsurugi) |
| 897 | 864 | VIPER_BIOS |
| 898 | 865 | |
| 899 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 900 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(c123342c) SHA1(55416767608fe0311a362854a16b214b04435a31)) | |
| 866 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 867 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(c123342c) SHA1(55416767608fe0311a362854a16b214b04435a31)) | |
| 901 | 868 | |
| 902 | 869 | DISK_REGION( "ide" ) |
| 903 | | |
| 870 | | |
| 904 | 871 | ROM_END |
| 905 | 872 | |
| 906 | 873 | ROM_START(tsurugij) |
| 907 | 874 | VIPER_BIOS |
| 908 | 875 | |
| 909 | ROM_REGION(0x2000, " | |
| 876 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 910 | 877 | |
| 911 | 878 | DISK_REGION( "ide" ) |
| 912 | | |
| 879 | | |
| 913 | 880 | ROM_END |
| 914 | 881 | |
| 915 | 882 | ROM_START(wcombat) |
| 916 | 883 | VIPER_BIOS |
| 917 | 884 | |
| 918 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 919 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(4f8b5858) SHA1(68066241c6f9db7f45e55b3c5da101987f4ce53c)) | |
| 885 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 886 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(4f8b5858) SHA1(68066241c6f9db7f45e55b3c5da101987f4ce53c)) | |
| 920 | 887 | |
| 921 | 888 | DISK_REGION( "ide" ) |
| 922 | | |
| 889 | | |
| 923 | 890 | ROM_END |
| 924 | 891 | |
| 925 | 892 | ROM_START(wcombak) |
| 926 | 893 | VIPER_BIOS |
| 927 | 894 | |
| 928 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 929 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(ebd4d645) SHA1(2fa7e2c6b113214f3eb1900c8ceef4d5fcf0bb76)) | |
| 895 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 896 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(ebd4d645) SHA1(2fa7e2c6b113214f3eb1900c8ceef4d5fcf0bb76)) | |
| 930 | 897 | |
| 931 | 898 | DISK_REGION( "ide" ) |
| 932 | | |
| 899 | | |
| 933 | 900 | ROM_END |
| 934 | 901 | |
| 935 | 902 | ROM_START(wcombaj) |
| 936 | 903 | VIPER_BIOS |
| 937 | 904 | |
| 938 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 939 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(bd8a6640) SHA1(2d409197ef3fb07d984d27fa943f29c7a711d715)) | |
| 905 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 906 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(bd8a6640) SHA1(2d409197ef3fb07d984d27fa943f29c7a711d715)) | |
| 940 | 907 | |
| 941 | 908 | DISK_REGION( "ide" ) |
| 942 | | |
| 909 | | |
| 943 | 910 | ROM_END |
| 944 | 911 | |
| 945 | 912 | ROM_START(xtrial) |
| 946 | 913 | VIPER_BIOS |
| 947 | 914 | |
| 948 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 949 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(33708a93) SHA1(715968e3c9c15edf628fa6ac655dc0864e336c6c)) | |
| 915 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 916 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(33708a93) SHA1(715968e3c9c15edf628fa6ac655dc0864e336c6c)) | |
| 950 | 917 | |
| 951 | 918 | DISK_REGION( "ide" ) |
| 952 | | |
| 919 | | |
| 953 | 920 | ROM_END |
| 954 | 921 | |
| 955 | 922 | /* Viper Satellite Terminal games */ |
| r3171 | r3172 | |
| 1002 | 969 | ROM_START(mfightc) |
| 1003 | 970 | VIPER_BIOS |
| 1004 | 971 | |
| 1005 | ROM_REGION(0x2000, "user2", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 1006 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(9fb551a5) SHA1(a33d185e186d404c3bf62277d7e34e5ad0000b09)) | |
| 972 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 973 | ROM_LOAD("nvram.u39", 0x00000, 0x2000, CRC(9fb551a5) SHA1(a33d185e186d404c3bf62277d7e34e5ad0000b09)) | |
| 1007 | 974 | |
| 1008 | 975 | DISK_REGION( "ide" ) |
| 1009 | | |
| 976 | | |
| 1010 | 977 | ROM_END |
| 1011 | 978 | |
| 1012 | 979 | ROM_START(mfightcc) |
| 1013 | 980 | VIPER_BIOS |
| 1014 | 981 | |
| 1015 | ROM_REGION(0x2000, " | |
| 982 | ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 1016 | 983 | |
| 1017 | 984 | DISK_REGION( "ide" ) |
| 1018 | | |
| 985 | | |
| 1019 | 986 | ROM_END |
| 1020 | 987 | |
| 1021 | 988 | /*****************************************************************************/ |
| r3171 | r3172 | |
| 1023 | 990 | /* Viper BIOS */ |
| 1024 | 991 | GAME(1999, kviper, 0, viper, 0, viper, ROT0, "Konami", "Konami Viper BIOS", GAME_IS_BIOS_ROOT) |
| 1025 | 992 | |
| 1026 | GAME(2001, ppp2nd, kviper, viper, 0, p | |
| 993 | GAME(2001, ppp2nd, kviper, viper, 0, viper | |
| 1027 | 994 | |
| 1028 | 995 | GAME(2001, boxingm, kviper, viper, 0, vipercf, ROT0, "Konami", "Boxing Mania", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 1029 | 996 | GAME(2000, code1d, kviper, viper, 0, vipercf, ROT0, "Konami", "Code One Dispatch", GAME_NOT_WORKING|GAME_NO_SOUND) |
| r3171 | r3172 | |
|---|---|---|
| 44 | 44 | AM_RANGE(0x1000, 0x10ff) AM_WRITE(SMH_RAM) /* RAM */ |
| 45 | 45 | ADDRESS_MAP_END |
| 46 | 46 | |
| 47 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 48 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") | |
| 49 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") | |
| 50 | AM_RANGE(0x02, 0x02) AM_READ(starcrus_coll_det_r) | |
| 51 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW") | |
| 52 | ADDRESS_MAP_END | |
| 53 | 47 | |
| 54 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 55 | AM_RANGE(0x00, 0x00) AM_WRITE(starcrus_s1_x_w) | |
| 56 | AM_RANGE(0x01, 0x01) AM_WRITE(starcrus_s1_y_w) | |
| 57 | AM_RANGE(0x02, 0x02) AM_WRITE(starcrus_s2_x_w) | |
| 58 | AM_RANGE(0x03, 0x03) AM_WRITE(starcrus_s2_y_w) | |
| 48 | static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) | |
| 49 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_WRITE(starcrus_s1_x_w) | |
| 50 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_WRITE(starcrus_s1_y_w) | |
| 51 | AM_RANGE(0x02, 0x02) AM_READWRITE(starcrus_coll_det_r, starcrus_s2_x_w) | |
| 52 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW") AM_WRITE(starcrus_s2_y_w) | |
| 59 | 53 | AM_RANGE(0x04, 0x04) AM_WRITE(starcrus_p1_x_w) |
| 60 | 54 | AM_RANGE(0x05, 0x05) AM_WRITE(starcrus_p1_y_w) |
| 61 | 55 | AM_RANGE(0x06, 0x06) AM_WRITE(starcrus_p2_x_w) |
| r3171 | r3172 | |
| 67 | 61 | ADDRESS_MAP_END |
| 68 | 62 | |
| 69 | 63 | |
| 70 | ||
| 71 | 64 | static INPUT_PORTS_START( starcrus ) |
| 72 | 65 | PORT_START("P1") |
| 73 | 66 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY /* ccw */ |
| r3171 | r3172 | |
| 172 | 165 | /* basic machine hardware */ |
| 173 | 166 | MDRV_CPU_ADD("main", 8080,9750000/9) /* 8224 chip is a divide by 9 */ |
| 174 | 167 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 175 | MDRV_CPU_IO_MAP( | |
| 168 | MDRV_CPU_IO_MAP(io_ma | |
| 176 | 169 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 177 | 170 | |
| 178 | 171 | /* video hardware */ |
| r3171 | r3172 | |
| 228 | 221 | |
| 229 | 222 | |
| 230 | 223 | GAME( 1977, starcrus, 0, starcrus, starcrus, 0, ROT0, "RamTek", "Star Cruiser", 0 ) |
| 224 |
| r3171 | r3172 | |
|---|---|---|
| 125 | 125 | |
| 126 | 126 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 127 | 127 | AM_RANGE(0x000000, 0x07ffff) AM_ROM |
| 128 | AM_RANGE(0x800000, 0x800001) AM_READ(input_port_0_word_r ) // P1 + P2 | |
| 129 | AM_RANGE(0x800018, 0x800019) AM_READ(input_port_1_word_r ) // Coins | |
| 130 | AM_RANGE(0x80001a, 0x80001b) AM_READ(input_port_2_word_r ) // DSW1 | |
| 131 | AM_RANGE(0x80001c, 0x80001d) AM_READ(input_port_3_word_r ) // DSW2 | |
| 128 | AM_RANGE(0x800000, 0x800001) AM_READ_PORT("INPUTS") | |
| 129 | AM_RANGE(0x800018, 0x800019) AM_READ_PORT("SYSTEM") | |
| 130 | AM_RANGE(0x80001a, 0x80001b) AM_READ_PORT("DSW1") | |
| 131 | AM_RANGE(0x80001c, 0x80001d) AM_READ_PORT("DSW2") | |
| 132 | 132 | AM_RANGE(0x800030, 0x800031) AM_WRITE(SMH_NOP ) // ? (value: don't care) |
| 133 | 133 | AM_RANGE(0x800100, 0x800101) AM_WRITE(SMH_NOP ) // ? $9100 |
| 134 | 134 | AM_RANGE(0x800102, 0x800103) AM_WRITE(SMH_NOP ) // ? $9080 |
| r3171 | r3172 | |
| 206 | 206 | ***************************************************************************/ |
| 207 | 207 | |
| 208 | 208 | static INPUT_PORTS_START( magicbub ) |
| 209 | PORT_START("IN0") // $800000.w | |
| 210 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 211 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 212 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 213 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 214 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 215 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 216 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 217 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 218 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 219 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 220 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 221 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 222 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 223 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 224 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 225 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 209 | PORT_START("INPUTS") /* $800000.w */ | |
| 210 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 211 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 212 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 213 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 214 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 215 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 216 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 217 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 218 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 219 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 220 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 221 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 222 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 223 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 224 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 225 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 226 | 226 | |
| 227 | PORT_START("IN1") // $800019.b | |
| 228 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 229 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 230 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 231 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 232 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) | |
| 233 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) | |
| 234 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 235 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 227 | PORT_START("SYSTEM") /* $800019.b */ | |
| 228 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 229 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 230 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 231 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 232 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) | |
| 233 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) | |
| 234 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 235 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 236 | 236 | |
| 237 | PORT_START("DSW1") / | |
| 237 | PORT_START("DSW1") /* $80001b.b -> $ff0003.b */ | |
| 238 | 238 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) |
| 239 | 239 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) |
| 240 | 240 | PORT_DIPSETTING( 0x0004, DEF_STR( 2C_1C ) ) |
| r3171 | r3172 | |
| 255 | 255 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 256 | 256 | PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) |
| 257 | 257 | |
| 258 | PORT_START("DSW2") / | |
| 258 | PORT_START("DSW2") /* $80001d.b -> $ff0004.b */ | |
| 259 | 259 | PORT_DIPUNUSED( 0x0001, IP_ACTIVE_LOW ) |
| 260 | 260 | PORT_DIPUNUSED( 0x0002, IP_ACTIVE_LOW ) |
| 261 | 261 | PORT_DIPNAME( 0x000c, 0x000c, "1P Vs 2P Rounds (Start)" ) |
| r3171 | r3172 | |
| 291 | 291 | ***************************************************************************/ |
| 292 | 292 | |
| 293 | 293 | static INPUT_PORTS_START( shocking ) |
| 294 | PORT_START("IN0") // $800000.w | |
| 295 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 296 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 297 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 298 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 299 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 300 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 301 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 302 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 303 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 304 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 305 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 306 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 307 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 308 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 309 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 310 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 294 | PORT_START("INPUTS") /* $800000.w */ | |
| 295 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 296 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 297 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 298 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 299 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 300 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 301 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 302 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 303 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 304 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 305 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 306 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 307 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 308 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 309 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 310 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 311 | 311 | |
| 312 | PORT_START("IN1") // $800019.b | |
| 313 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 314 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 315 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 316 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 317 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) | |
| 318 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) | |
| 319 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 320 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 312 | PORT_START("SYSTEM") /* $800019.b */ | |
| 313 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 314 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 315 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 316 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 317 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) | |
| 318 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) | |
| 319 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 320 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 321 | 321 | |
| 322 | PORT_START("DSW1") / | |
| 322 | PORT_START("DSW1") /* $80001b.b -> $ff0c06.b */ | |
| 323 | 323 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) |
| 324 | 324 | PORT_DIPSETTING( 0x0001, DEF_STR( 3C_1C ) ) |
| 325 | 325 | PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) ) |
| r3171 | r3172 | |
| 337 | 337 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) /* "Korean" */ |
| 338 | 338 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) /* "English" */ |
| 339 | 339 | |
| 340 | PORT_START("DSW2") / | |
| 340 | PORT_START("DSW2") /* $80001d.b -> $ff0c07.b */ | |
| 341 | 341 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Difficulty ) ) |
| 342 | 342 | PORT_DIPSETTING( 0x0004, DEF_STR( Easiest ) ) |
| 343 | 343 | PORT_DIPSETTING( 0x0005, DEF_STR( Easier ) ) |
| r3171 | r3172 | |
| 364 | 364 | ***************************************************************************/ |
| 365 | 365 | |
| 366 | 366 | static INPUT_PORTS_START( bombkick ) |
| 367 | PORT_START("IN0") // $800000.w | |
| 368 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 369 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 370 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 371 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 372 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 373 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 374 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 375 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 376 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 377 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 378 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 379 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 380 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 381 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 382 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 383 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 367 | PORT_START("INPUTS") /* $800000.w */ | |
| 368 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 369 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 370 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 371 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 372 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 373 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 374 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 375 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 376 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 377 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 378 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 379 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 380 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 381 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 382 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 383 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 384 | 384 | |
| 385 | PORT_START("IN1") // $800019.b | |
| 386 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 387 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 388 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 389 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 390 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) | |
| 391 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) | |
| 392 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 393 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 385 | PORT_START("SYSTEM") /* $800019.b */ | |
| 386 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 387 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 388 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 389 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 390 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) | |
| 391 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) | |
| 392 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 393 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 394 | 394 | |
| 395 | PORT_START("DSW1") / | |
| 395 | PORT_START("DSW1") /* $80001b.b -> $ff0004.b */ | |
| 396 | 396 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) |
| 397 | 397 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) |
| 398 | 398 | PORT_DIPSETTING( 0x0004, DEF_STR( 2C_1C ) ) |
| r3171 | r3172 | |
| 415 | 415 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 416 | 416 | PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) |
| 417 | 417 | |
| 418 | PORT_START("DSW2") / | |
| 418 | PORT_START("DSW2") /* $80001d.b -> $ff0005.b */ | |
| 419 | 419 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Lives ) ) |
| 420 | 420 | PORT_DIPSETTING( 0x0000, "2" ) |
| 421 | 421 | PORT_DIPSETTING( 0x0003, "3" ) |
| r3171 | r3172 | |
| 446 | 446 | ***************************************************************************/ |
| 447 | 447 | |
| 448 | 448 | static INPUT_PORTS_START( paprazzi ) |
| 449 | PORT_START("IN0") // $800000.w | |
| 450 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 451 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 452 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 453 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 454 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 455 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 456 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 457 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 458 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 459 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 460 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 461 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 462 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 463 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 464 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 465 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 449 | PORT_START("INPUTS") /* $800000.w */ | |
| 450 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 451 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 452 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 453 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 454 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 455 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 456 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 457 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 458 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 459 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 460 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 461 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 462 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 463 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 464 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 465 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 466 | 466 | |
| 467 | PORT_START("IN1") // $800019.b | |
| 468 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 469 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 470 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 471 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 472 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) | |
| 473 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) | |
| 474 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 475 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 467 | PORT_START("SYSTEM") /* $800019.b */ | |
| 468 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 469 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 470 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 471 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 472 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) | |
| 473 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) | |
| 474 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 475 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 476 | 476 | |
| 477 | PORT_START("DSW1") / | |
| 477 | PORT_START("DSW1") /* $80001b.b -> $ff0aca.b */ | |
| 478 | 478 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) ) |
| 479 | 479 | PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) |
| 480 | 480 | PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) |
| r3171 | r3172 | |
| 494 | 494 | PORT_DIPSETTING( 0x0080, "120" ) |
| 495 | 495 | PORT_DIPSETTING( 0x00c0, "150" ) |
| 496 | 496 | |
| 497 | PORT_START("DSW2") / | |
| 497 | PORT_START("DSW2") /* $80001d.b -> $ff0acb.b */ | |
| 498 | 498 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Difficulty ) ) //not sure what is it . tested all 3 bits tested @ $be48 |
| 499 | 499 | PORT_DIPSETTING( 0x0004, DEF_STR( Easiest ) ) |
| 500 | 500 | PORT_DIPSETTING( 0x0005, DEF_STR( Easier ) ) |
| r3171 | r3172 | |
|---|---|---|
| 240 | 240 | AM_RANGE(0xe800, 0xe83f) AM_BASE(&wiz_attributesram) |
| 241 | 241 | AM_RANGE(0xe840, 0xe85f) AM_BASE(&spriteram) |
| 242 | 242 | AM_RANGE(0xe000, 0xe85f) AM_RAM |
| 243 | AM_RANGE(0xf000, 0xf000) AM_READ | |
| 243 | AM_RANGE(0xf000, 0xf000) AM_READ | |
| 244 | 244 | AM_RANGE(0xf000, 0xf000) AM_RAM AM_BASE(&wiz_sprite_bank) |
| 245 | 245 | AM_RANGE(0xf001, 0xf001) AM_WRITE(interrupt_enable_w) |
| 246 | 246 | AM_RANGE(0xf002, 0xf003) AM_WRITE(wiz_palettebank_w) |
| 247 | 247 | AM_RANGE(0xf004, 0xf005) AM_WRITE(wiz_char_bank_select_w) |
| 248 | 248 | AM_RANGE(0xf006, 0xf006) AM_WRITE(wiz_flipx_w) |
| 249 | 249 | AM_RANGE(0xf007, 0xf007) AM_WRITE(wiz_flipy_w) |
| 250 | AM_RANGE(0xf008, 0xf008) AM_READ | |
| 250 | AM_RANGE(0xf008, 0xf008) AM_READ | |
| 251 | 251 | AM_RANGE(0xf008, 0xf00f) AM_WRITE(SMH_NOP) /* initialized by Stinger/Scion */ |
| 252 | AM_RANGE(0xf010, 0xf010) AM_READ(input_port_0_r) /* IN0 */ | |
| 253 | AM_RANGE(0xf018, 0xf018) AM_READ(input_port_1_r) /* IN1 */ | |
| 252 | AM_RANGE(0xf010, 0xf010) AM_READ_PORT("IN0") | |
| 253 | AM_RANGE(0xf018, 0xf018) AM_READ_PORT("IN1") | |
| 254 | 254 | AM_RANGE(0xf800, 0xf800) AM_READ(watchdog_reset_r) |
| 255 | 255 | AM_RANGE(0xf800, 0xf80f) AM_WRITE(sound_command_w) /* sound registers */ |
| 256 | 256 | AM_RANGE(0xf818, 0xf818) AM_WRITE(wiz_bgcolor_w) |
| r3171 | r3172 | |
| 271 | 271 | |
| 272 | 272 | |
| 273 | 273 | |
| 274 | #define COMMON_IN01\ | |
| 275 | PORT_START("IN0")\ | |
| 276 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )\ | |
| 277 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL\ | |
| 278 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 )\ | |
| 279 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )\ | |
| 280 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )\ | |
| 281 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )\ | |
| 282 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 )\ | |
| 283 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL\ | |
| 284 | PORT_START("IN1")\ | |
| 285 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY\ | |
| 286 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY\ | |
| 287 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL\ | |
| 288 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL\ | |
| 289 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY\ | |
| 290 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY\ | |
| 291 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL\ | |
| 274 | static INPUT_PORTS_START( stinger ) | |
| 275 | PORT_START("IN0") | |
| 276 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 277 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 278 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 279 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 280 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 281 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 282 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 283 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 284 | ||
| 285 | PORT_START("IN1") | |
| 286 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 287 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 288 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 289 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 290 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 291 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 292 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 292 | 293 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 293 | 294 | |
| 294 | #define COMMON_DSW0\ | |
| 295 | PORT_START("DSW0")\ | |
| 296 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )\ | |
| 297 | PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) )\ | |
| 298 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )\ | |
| 299 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )\ | |
| 300 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_2C ) )\ | |
| 301 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )\ | |
| 302 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) )\ | |
| 303 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )\ | |
| 304 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )\ | |
| 305 | PORT_DIPNAME( 0x18, 0x08, DEF_STR( Lives ) )\ | |
| 306 | PORT_DIPSETTING( 0x00, "2" )\ | |
| 307 | PORT_DIPSETTING( 0x08, "3" )\ | |
| 308 | PORT_DIPSETTING( 0x10, "4" )\ | |
| 309 | PORT_DIPSETTING( 0x18, "5" )\ | |
| 310 | PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Bonus_Life ) )\ | |
| 311 | PORT_DIPSETTING( 0xe0, "20000 50000" )\ | |
| 312 | PORT_DIPSETTING( 0xc0, "20000 60000" )\ | |
| 313 | PORT_DIPSETTING( 0xa0, "20000 70000" )\ | |
| 314 | PORT_DIPSETTING( 0x80, "20000 80000" )\ | |
| 315 | PORT_DIPSETTING( 0x60, "20000 90000" )\ | |
| 316 | PORT_DIPSETTING( 0x40, "30000 80000" )\ | |
| 317 | PORT_DIPSETTING( 0x20, "30000 90000" )\ | |
| 295 | PORT_START("DSW0") | |
| 296 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) | |
| 297 | PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) | |
| 298 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) | |
| 299 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) | |
| 300 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_2C ) ) | |
| 301 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) | |
| 302 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) | |
| 303 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) | |
| 304 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) | |
| 305 | PORT_DIPNAME( 0x18, 0x08, DEF_STR( Lives ) ) | |
| 306 | PORT_DIPSETTING( 0x00, "2" ) | |
| 307 | PORT_DIPSETTING( 0x08, "3" ) | |
| 308 | PORT_DIPSETTING( 0x10, "4" ) | |
| 309 | PORT_DIPSETTING( 0x18, "5" ) | |
| 310 | PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Bonus_Life ) ) | |
| 311 | PORT_DIPSETTING( 0xe0, "20000 50000" ) | |
| 312 | PORT_DIPSETTING( 0xc0, "20000 60000" ) | |
| 313 | PORT_DIPSETTING( 0xa0, "20000 70000" ) | |
| 314 | PORT_DIPSETTING( 0x80, "20000 80000" ) | |
| 315 | PORT_DIPSETTING( 0x60, "20000 90000" ) | |
| 316 | PORT_DIPSETTING( 0x40, "30000 80000" ) | |
| 317 | PORT_DIPSETTING( 0x20, "30000 90000" ) | |
| 318 | 318 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 319 | 319 | |
| 320 | static INPUT_PORTS_START( stinger ) | |
| 321 | COMMON_IN01 | |
| 322 | COMMON_DSW0 | |
| 323 | 320 | PORT_START("DSW1") |
| 324 | 321 | PORT_DIPNAME( 0x01, 0x00, "Debug Mode" ) /* See notes */ |
| 325 | 322 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| r3171 | r3172 | |
| 347 | 344 | INPUT_PORTS_END |
| 348 | 345 | |
| 349 | 346 | static INPUT_PORTS_START( stinger2 ) |
| 350 | COMMON_IN01 | |
| 351 | COMMON_DSW0 | |
| 347 | PORT_INCLUDE( stinger ) | |
| 352 | 348 | |
| 353 | PORT_START("DSW1") | |
| 354 | PORT_DIPNAME( 0x01, 0x00, "Debug Mode" ) /* See notes */ | |
| 355 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 356 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 349 | PORT_MODIFY("DSW1") | |
| 357 | 350 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unused ) ) |
| 358 | 351 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 359 | 352 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| r3171 | r3172 | |
| 372 | 365 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_6C ) ) |
| 373 | 366 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_7C ) ) |
| 374 | 367 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_8C ) ) |
| 375 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) | |
| 376 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) | |
| 377 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 378 | 368 | INPUT_PORTS_END |
| 379 | 369 | |
| 380 | 370 | static INPUT_PORTS_START( scion ) |
| 381 | ||
| 371 | PORT | |
| 382 | 372 | |
| 383 | PORT_ | |
| 373 | PORT_MODIFY("DSW0") | |
| 384 | 374 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) |
| 385 | 375 | PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) |
| 386 | 376 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r3171 | r3172 | |
| 404 | 394 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 405 | 395 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 406 | 396 | |
| 407 | PORT_ | |
| 397 | PORT_MODIFY("DSW1") | |
| 408 | 398 | PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A ) ) |
| 409 | 399 | PORT_DIPSETTING( 0x07, DEF_STR( 5C_1C ) ) |
| 410 | 400 | PORT_DIPSETTING( 0x03, DEF_STR( 4C_1C ) ) |
| r3171 | r3172 | |
| 501 | 491 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 502 | 492 | INPUT_PORTS_END |
| 503 | 493 | |
| 494 | /* Are button 1 & 2 actually inverted? */ | |
| 504 | 495 | static INPUT_PORTS_START( wiz ) |
| 505 | PORT_START("IN1") //Are Buttons 1 and 2 the right way around? Because the majority of hardware | |
| 506 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) // In this driver has 2 first, then 1 (See COMMON_IN01 macro) | |
| 507 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 508 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 496 | PORT_START("IN0") | |
| 497 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 498 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL // Shoot | |
| 499 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // Shoot | |
| 509 | 500 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) |
| 510 | 501 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) |
| 511 | 502 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 512 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 513 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 503 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // Magic | |
| 504 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL // Magic | |
| 514 | 505 | |
| 515 | PORT_START("IN | |
| 506 | PORT_START("IN1") | |
| 516 | 507 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 517 | 508 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 518 | 509 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY |
| r3171 | r3172 | |
|---|---|---|
| 603 | 603 | } |
| 604 | 604 | m_n_oldcoin = ~n_coin; |
| 605 | 605 | |
| 606 | psx_vblank(machine, cpunum); | |
| 607 | ||
| 608 | 606 | if( strcmp( machine->gamedrv->name, "pocketrc" ) == 0 ) |
| 609 | 607 | { |
| 610 | 608 | if( g_p_n_psxram[ 0x12c74 / 4 ] == 0x1440fff9 ) |
| r3171 | r3172 | |
| 626 | 624 | |
| 627 | 625 | SHRAM( 0xbd30 ) = ( SHRAM( 0xbd30 ) & 0x0000ffff ) | ( 0x0080 << 16 ); |
| 628 | 626 | |
| 629 | SHRAM( 0xbd08 ) = ( SHRAM( 0xbd08 ) & 0x0000ffff ) | ( input_port_read(machine, "STEERING" ) << 16 ); | |
| 627 | SHRAM( 0xbd08 ) = ( SHRAM( 0xbd08 ) & 0x0000ffff ) | ( ( input_port_read(machine, "STEERING" ) - 0x8000 ) << 16 ); | |
| 630 | 628 | SHRAM( 0xbd0c ) = ( SHRAM( 0xbd0c ) & 0xffff0000 ) | ( input_port_read(machine, "GAS" ) << 0 ); |
| 631 | 629 | } |
| 630 | ||
| 631 | psx_vblank(machine, cpunum); | |
| 632 | 632 | } |
| 633 | 633 | |
| 634 | 634 | static TIMER_CALLBACK( mcu_timer ) |
| r3171 | r3172 | |
| 1162 | 1162 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1163 | 1163 | |
| 1164 | 1164 | PORT_START( "STEERING" ) |
| 1165 | PORT_BIT( 0xffff, 0x000 | |
| 1165 | PORT_BIT( 0xffff, 0x8000 | |
| 1166 | 1166 | |
| 1167 | 1167 | PORT_START( "GAS" ) |
| 1168 | 1168 | PORT_BIT( 0x00ff, 0x0000, IPT_PEDAL ) PORT_MINMAX( 0x0000, 0x00ff ) PORT_SENSITIVITY( 100 ) PORT_KEYDELTA( 15 ) PORT_PLAYER( 1 ) PORT_REVERSE |
| r3171 | r3172 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | **************************************************************************** |
| 18 | 18 | |
| 19 | EU21 EU18 EU20 32.000MHz | |
| 20 | M6295 M6295 M6295 Xilinx | |
| 21 | Dip-8 2.000Mhz 2.000Mhz 2.000Mhz | |
| 22 | J VC9 GUNCN | |
| 23 | A Dip-4 VC8 Xilinx EGR4 | |
| 24 | M Mach210 EGR6.3 | |
| 25 | M M5M442256x4 Mach210 Mach210 Mach210 EGR3 | |
| 26 | A 11.2896MHz EGR2 | |
| 27 | TMS34010 W241024x4 EGR1 | |
| 28 | 2803A EGR5.3 | |
| 29 | 40.000MHz Bt121 Mach210 Mach210 Mach210 | |
| 19 | Egg Venture | |
| 20 | The Gameroom, 1997 | |
| 30 | 21 | |
| 22 | PCB Layout | |
| 23 | ---------- | |
| 31 | 24 | |
| 32 | Chips: | |
| 33 | TMS34010FNL-40 Main CPU | |
| 34 | Xilinx XC3042-70 Field Programmable Gate Array | |
| 35 | Bt121KPJ80 Triple 8-bit 80MHz VideoDAC | |
| 36 | AMD Mach210A-10JC Programmable Logic Device (CPLD) | |
| 37 | ST ULN2803A 8 Darlington Transistor Array with common emitter | |
| 25 | (C) 1996 I.C.E. | |
| 26 | |-------------------------------------------------------| | |
| 27 | | EU21.U21 EU18.U18 EU20.U20 32MHz | | |
| 28 | | |-------| | | |
| 29 | | M6295 M6295 M6295 |XILINX | | | |
| 30 | | 2MHz 2MHz 2MHz |XC3042 | | | |
| 31 | | DSW(8) KYLR1 |-------| | | |
| 32 | |J EGR9.VC9 EGR4.GR4 | | |
| 33 | |A DSW(4)EGR8.VC8 |-------| | | |
| 34 | |M M5M442256 |XILINX | EGR6.GR6 | | |
| 35 | |M M5M442256 11.0592MHz |XC3042 | | | |
| 36 | |A M5M442256 MACH210 |-------| EGR3.GR3 | | |
| 37 | |4116R M5M442256 MACH210 MACH210 MACH210 | | |
| 38 | |4116R |--------| W241024 EGR1.GR2 | | |
| 39 | | |TMS34010| W241024 | | |
| 40 | |2803A |-50 | W241024 EGR1.GR1 | | |
| 41 | | | | W241024 | | |
| 42 | | 40MHz |--------| EGR5.GR5 | | |
| 43 | | BT121 MACH210 MACH210 MACH210 | | |
| 44 | |-------------------------------------------------------| | |
| 38 | 45 | |
| 39 | Note 1: Lethal Justice uses a 11.0592MHz OSC instead of the 11.2896MHz | |
| 40 | Note 2: Lethal Justice uses a TMS34010FNL-50 instead of the TMS34010FNL-40 | |
| 46 | Notes: | |
| 47 | TMS34010 - TMS34010FNL-50 CPU, clock input 20.000MHz [40/2] (PLCC68) | |
| 48 | M6295 - Clock input 2.000MHz, pin 7 HIGH (QFP44) | |
| 49 | XC3042 - XILINX XC3042 FPGA (PLCC84) | |
| 50 | BT121 - BT121KPJ80 Triple 8-bit 80MHz Video DAC (PLCC44) | |
| 51 | MACH210 - AMD MACH210A-10JC Complex Programmable Logic Device (CPLD, PLCC44) | |
| 52 | 2803A - ST ULN2803A Eight Darlington Transistor Arrays With Common Emitters (DIP18) | |
| 53 | 4116R - 4116R-001 Bourns Type 4100R Series Resistor Network (DIP16) | |
| 54 | M5M442256 - Mitsubishi M5M442256AL-8 256k x4 DRAM (ZIP28) | |
| 55 | W241024 - Winbond W241024AK-20 128 x8 SRAM (NDIP32) | |
| 56 | KYLR1 - 8 Pin Gun Connector | |
| 41 | 57 | |
| 58 | Note 1: Some PCBs use a 11.2896MHz OSC instead of the 11.0592MHz | |
| 59 | Note 2: Some PCBs use a TMS34010FNL-40 instead of the TMS34010FNL-50 | |
| 60 | ||
| 42 | 61 | ***************************************************************************/ |
| 43 | 62 | |
| 44 | 63 | #include "driver.h" |
| r3171 | r3172 | |
| 630 | 649 | ROM_END |
| 631 | 650 | |
| 632 | 651 | |
| 652 | ROM_START( eggventa ) /* Allied Leisure Australia, official license? */ | |
| 653 | ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */ | |
| 654 | ROM_LOAD16_BYTE( "egr8.vc8", 0x000000, 0x080000, CRC(a62c4143) SHA1(a21d6b7efdba4965285265426ed79f3249a86685) ) | |
| 655 | ROM_LOAD16_BYTE( "egr9.vc9", 0x000001, 0x080000, CRC(bc55bc7a) SHA1(d6e3fc76b4a0a20176af1338a32bb81f0599fdc0) ) | |
| 656 | ||
| 657 | ROM_REGION16_LE( 0x600000, "gfx1", 0 ) /* graphics data */ | |
| 658 | ROM_LOAD16_BYTE( "egr1.bin", 0x000000, 0x100000, CRC(f73f80d9) SHA1(6278b45579a256b9576ba6d4f5a15fab26797c3d) ) | |
| 659 | ROM_LOAD16_BYTE( "egr2.bin", 0x000001, 0x100000, CRC(3a9ba910) SHA1(465aa3119af103aa65b25042b3572fdcb9c1887a) ) | |
| 660 | ROM_LOAD16_BYTE( "egr4.bin", 0x200000, 0x100000, CRC(4ea5900e) SHA1(20341337ee3c6c22580c52312156b818f4187693) ) | |
| 661 | ROM_LOAD16_BYTE( "egr3.bin", 0x200001, 0x100000, CRC(3f8dfc73) SHA1(83a168069f896ea7e67a97c6d591d09b19d5f486) ) | |
| 662 | ROM_LOAD16_BYTE( "egr6.gr6", 0x400000, 0x100000, CRC(0d73dd85) SHA1(d99a95ace89483688bae48021b416fc0a3c531d6) ) | |
| 663 | ROM_LOAD16_BYTE( "egr5.gr5", 0x400001, 0x100000, CRC(6d89c4e3) SHA1(613703a3f194af3ed44a58610d99b7dc99382725) ) | |
| 664 | ||
| 665 | ROM_REGION( 0x40000, "oki1", 0 ) /* sound data */ | |
| 666 | ROM_LOAD( "eu20.bin", 0x00000, 0x40000, CRC(3760b1db) SHA1(70e258a6036f9ce26b354c4df57e0e4d2c871bcb) ) | |
| 667 | ||
| 668 | ROM_REGION( 0x40000, "oki2", 0 ) /* sound data */ | |
| 669 | ROM_LOAD( "eu21.bin", 0x00000, 0x40000, CRC(3760b1db) SHA1(70e258a6036f9ce26b354c4df57e0e4d2c871bcb) ) | |
| 670 | ||
| 671 | ROM_REGION( 0x40000, "oki3", 0 ) /* sound data */ | |
| 672 | ROM_LOAD( "eu18.bin", 0x00000, 0x40000, CRC(3760b1db) SHA1(70e258a6036f9ce26b354c4df57e0e4d2c871bcb) ) | |
| 673 | ROM_END | |
| 674 | ||
| 675 | ||
| 633 | 676 | ROM_START( eggvntdx ) |
| 634 | 677 | ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */ |
| 635 | 678 | ROM_LOAD16_BYTE( "eggdlx.vc8", 0x000000, 0x080000, CRC(d7f56141) SHA1(3c16b509fd1c763e452c27084fb0e90cde3947f7) ) |
| r3171 | r3172 | |
| 788 | 831 | GAME( 1996, lethalj, 0, lethalj, lethalj, 0, ROT0, "The Game Room", "Lethal Justice", 0 ) |
| 789 | 832 | GAME( 1997, eggventr, 0, gameroom, eggventr, 0, ROT0, "The Game Room", "Egg Venture (Release 10)", 0 ) |
| 790 | 833 | GAME( 1997, eggvent7, eggventr, gameroom, eggventr, 0, ROT0, "The Game Room", "Egg Venture (Release 7)", 0 ) |
| 834 | GAME( 1997, eggventa, eggventr, gameroom, eggventr, 0, ROT0, "The Game Room (Allied Leisure license)", "Egg Venture (A.L. Release)", 0 ) | |
| 791 | 835 | GAME( 1997, eggvntdx, eggventr, gameroom, eggvntdx, 0, ROT0, "The Game Room", "Egg Venture Deluxe", 0 ) |
| 792 | 836 | GAME( 1997, ripribit, 0, gameroom, ripribit, ripribit, ROT0, "LAI Games", "Ripper Ribbit (Version 2.8.4)", 0 ) |
| 793 | 837 | GAME( 1999, cfarm, 0, gameroom, cfarm, cfarm, ROT90, "LAI Games", "Chicken Farm (Version 2.0)", 0 ) |
| r3171 | r3172 | |
|---|---|---|
| 326 | 326 | AM_RANGE(0x8000, 0xffff) AM_WRITE(SMH_ROM) |
| 327 | 327 | ADDRESS_MAP_END |
| 328 | 328 | |
| 329 | static ADDRESS_MAP_START( sound_ | |
| 329 | static ADDRESS_MAP_START( sound_io_ma | |
| 330 | 330 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 331 | AM_RANGE(0x00, 0x00) AM_READ(ym2610_status_port_0_a_r) | |
| 332 | AM_RANGE(0x02, 0x02) AM_READ(ym2610_status_port_0_b_r) | |
| 333 | AM_RANGE(0x0c, 0x0c) AM_READ(soundlatch_r) | |
| 334 | ADDRESS_MAP_END | |
| 335 | ||
| 336 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 337 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 338 | AM_RANGE(0x00, 0x00) AM_WRITE(ym2610_control_port_0_a_w) | |
| 331 | AM_RANGE(0x00, 0x00) AM_READWRITE(ym2610_status_port_0_a_r, ym2610_control_port_0_a_w) | |
| 339 | 332 | AM_RANGE(0x01, 0x01) AM_WRITE(ym2610_data_port_0_a_w) |
| 340 | AM_RANGE(0x02, 0x02) AM_WRITE(ym2610_control_port_0_b_w) | |
| 333 | AM_RANGE(0x02, 0x02) AM_READWRITE(ym2610_status_port_0_b_r, ym2610_control_port_0_b_w) | |
| 341 | 334 | AM_RANGE(0x03, 0x03) AM_WRITE(ym2610_data_port_0_b_w) |
| 342 | 335 | AM_RANGE(0x04, 0x04) AM_WRITE(gs_sh_bankswitch_w) |
| 343 | 336 | AM_RANGE(0x08, 0x08) AM_WRITE(gs_sh_pending_command_clear_w) |
| 337 | AM_RANGE(0x0c, 0x0c) AM_READ(soundlatch_r) | |
| 344 | 338 | ADDRESS_MAP_END |
| 345 | 339 | |
| 346 | 340 | |
| 347 | ||
| 348 | 341 | static ADDRESS_MAP_START( vgoal_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 349 | 342 | AM_RANGE(0x000000, 0x0fffff) AM_ROM |
| 350 | 343 | AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(MB60553_0_vram_w) AM_BASE(&MB60553_0_vram) |
| r3171 | r3172 | |
| 578 | 571 | |
| 579 | 572 | MDRV_CPU_ADD("audio", Z80,8000000/2) /* 4 MHz ??? */ |
| 580 | 573 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 581 | MDRV_CPU_IO_MAP(sound_ | |
| 574 | MDRV_CPU_IO_MAP(sound_i | |
| 582 | 575 | |
| 583 | 576 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) |
| 584 | 577 | |
| r3171 | r3172 | |
| 618 | 611 | |
| 619 | 612 | MDRV_CPU_ADD("audio", Z80,8000000/2) /* 4 MHz ??? */ |
| 620 | 613 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 621 | MDRV_CPU_IO_MAP(sound_ | |
| 614 | MDRV_CPU_IO_MAP(sound_i | |
| 622 | 615 | |
| 623 | 616 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) |
| 624 | 617 | |
| r3171 | r3172 | |
| 1030 | 1023 | GAME( 199?, vgoalsca, vgoalsoc, vgoal, vgoalsoc, vgoalsoc, ROT0, "Tecmo", "V Goal Soccer (set 2)", GAME_NOT_WORKING ) |
| 1031 | 1024 | GAME( 1994, twrldc94, 0, twrldc94, twrldc94, twrldc94, ROT0, "Tecmo", "Tecmo World Cup '94 (set 1)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS ) |
| 1032 | 1025 | GAME( 1994, twrdc94a, twrldc94, twrldc94, twrldc94, twrldc94a, ROT0, "Tecmo", "Tecmo World Cup '94 (set 2)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS ) |
| 1026 |
| r3171 | r3172 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | various SNK triple Z80 games |
| 6 | 6 | |
| 7 | ay8910x2 + namco wave | |
| 8 | Jumping Cross | |
| 9 | ||
| 10 | 7 | ay8910x2 |
| 11 | Gladiator 1984 | |
| 8 | Jumping Cross, Gladiator 1984, HAL21 | |
| 12 | 9 | |
| 13 | 10 | ym3526 |
| 14 | 11 | ASO, Tank |
| r3171 | r3172 | |
| 32 | 29 | Credits (in alphabetical order) |
| 33 | 30 | Marco Cassili |
| 34 | 31 | Ernesto Corvi |
| 32 | Tim Lindquist | |
| 35 | 33 | Carlos A. Lozano |
| 36 | 34 | Bryan McPhail |
| 37 | 35 | Jarek Parchanski |
| r3171 | r3172 | |
| 45 | 43 | Notes: |
| 46 | 44 | ------ |
| 47 | 45 | - How to enter test mode: |
| 46 | 1983 marvins: n/a | |
| 47 | 1984 madcrash: keep F2 pressed during boot | |
| 48 | 1984 vangrd2: n/a | |
| 48 | 49 | 1984 jcross: n/a |
| 49 | 50 | 1984 sgladiat: keep F2 pressed during boot |
| 51 | 1985 hal21: n/a | |
| 52 | 1985 aso: keep 1 pressed during boot | |
| 50 | 53 | 1985 tnk3: keep 1 pressed during boot |
| 51 | 1985 aso: keep 1 pressed during boot | |
| 52 | 54 | 1986 athena: keep 1 pressed during boot |
| 53 | 55 | 1986 ikari: keep 1 pressed during boot |
| 54 | 56 | 1986 victroad: keep 1 pressed during boot |
| r3171 | r3172 | |
| 65 | 67 | - the I/O area (C000-CFFF) is probably mirrored in large part on the two main |
| 66 | 68 | CPUs, however I mapped only the addresses actually used by the games. |
| 67 | 69 | |
| 70 | - the Flip Screen dip switch in madcrash doesn't work correctly, the screen is | |
| 71 | inverted but the bg and sprite positions are wrong. This is a bug in the game; | |
| 72 | the Cocktail dip switch works correctly and the screen is properly flipped | |
| 73 | when player 2 plays. | |
| 74 | ||
| 75 | - madcrash fails the ROM test, but ROMs are verified to be good so it looks like | |
| 76 | a bug. The service mode functionality is very limited anyway. To get past the | |
| 77 | failed ROM test and see the service mode, use this ROM patch: | |
| 78 | ||
| 79 | UINT8 *mem = memory_region(machine, "main"); | |
| 80 | mem[0x3a5d] = mem[0x3a5e] = mem[0x3a5f] = 0; | |
| 81 | ||
| 82 | - The "SNK Wave" custom sound circuitry is only actually used by marvins and | |
| 83 | vangrd2. The madcrash pcb probably still has it, while later boards like jcross | |
| 84 | might not have it at all. | |
| 85 | ||
| 68 | 86 | - sgladiat runs on a modified jcross pcb (same pcb ID with flying wires). |
| 69 | 87 | |
| 70 | 88 | - the original sgladiat pcb is verified to have huge sprite lag. |
| 71 | 89 | |
| 72 | - RAM test fails in sgladiat when "Debug" Dip Switch is ON. Correct behaviour | |
| 90 | - RAM test fails in sgladiat when "Debug" Dip Switch is ON. Correct behaviour | |
| 73 | 91 | |
| 92 | - the only difference between hal21 and hal21j is the audio ROM. | |
| 93 | ||
| 94 | - there are no "Bonus Lives" settings in alphamis and arian (always 50k 100k) | |
| 95 | and only an "Occurence" Dip Switch. | |
| 96 | ||
| 97 | - when test mode displays 80k 160k in athena, it is in fact 60k 120k. | |
| 98 | ||
| 99 | - the Fighting Golf flyer shows a different gameplay, where button A is pressed | |
| 100 | multiple times to select the spin. The flyer also says that the game "includes | |
| 101 | the unique feature of 2 distinct styles of game play, selectable by dipswitch | |
| 102 | setting. For the avid golfer, a more challenging style of swing.". | |
| 103 | This feature only exists when "Language" Dip Swicth is set to "English" | |
| 104 | ||
| 74 | 105 | - there are two versions of the Ikari Warriors board, one has the standard JAMMA |
| 75 | 106 | connector while the other has the custom SNK connector. The video and audio |
| 76 | 107 | PCBs are the same, only the CPU PCB changes. |
| r3171 | r3172 | |
| 103 | 134 | - the worldwar test mode shows wrong descriptions for the dip switches, which |
| 104 | 135 | are actually correct for bermudaj. |
| 105 | 136 | |
| 106 | So in the end the cronology of the four sets is: | |
| 137 | So in the end the chronology of the four sets is: | |
| 107 | 138 | 1) bermudat |
| 108 | 139 | - Old gameplay |
| 109 | 140 | - World version? (English speech) |
| r3171 | r3172 | |
| 161 | 192 | TODO: |
| 162 | 193 | ----- |
| 163 | 194 | |
| 195 | - madcrash shadows change color, however this should be the correct behaviour | |
| 196 | as far as I can tell. Should be verified on the pcb. | |
| 197 | ||
| 198 | - one unknown dip switch in madcrash. Also the Difficulty dip switch is not | |
| 199 | verified (though it's listed in the manual). | |
| 200 | ||
| 164 | 201 | - jcross might be a bad dump. The current ROM set is made by mixing two sets |
| 165 | 202 | which were marked as 'bad'. |
| 166 | 203 | |
| r3171 | r3172 | |
| 170 | 207 | - sgladiat: unknown writes to D200/DA00, probably video related. Also some bits |
| 171 | 208 | of A600 are unknown. |
| 172 | 209 | |
| 210 | - one unknown dip switch in sgladiat. | |
| 211 | ||
| 212 | - hal21: unknown sound writes to E002. | |
| 213 | ||
| 214 | - hal21: when the flip screen dip switch is on, the game screen is correctly | |
| 215 | flipped, but the title screen remains upside down (and sprites are displayed | |
| 216 | in the wrong position). This looks like a bug in the game. | |
| 217 | ||
| 173 | 218 | - ASO: unknown writes to CE00, probably video related. Always 05? |
| 174 | 219 | Also unknown writes to F002 by the sound CPU, during reset. |
| 175 | 220 | |
| 176 | 221 | - Fighting Golf: unknown writes to CF00, probably video related. |
| 177 | 222 | |
| 178 | - The Fighting Golf flyer shows a different gameplay, where button A is pressed | |
| 179 | multiple times to select the spin. The flyer also says that the game "includes | |
| 180 | the unique feature of 2 distinct styles of game play, selectable by dipswitch | |
| 181 | setting. For the avid golfer, a more challenging style of swing.". | |
| 182 | Either a different ROM set exists, or we are missing some configuration option. | |
| 183 | ||
| 184 | 223 | - ikari/victroad: unknown writes to C980. This is probably (also) related to the |
| 185 | 224 | color used to draw the FG layer, and supporting it is needed to fix the color |
| 186 | 225 | test in ikaria/ikarijp. |
| r3171 | r3172 | |
| 204 | 243 | |
| 205 | 244 | #include "driver.h" |
| 206 | 245 | #include "snk.h" |
| 246 | #include "sound/snkwave.h" | |
| 207 | 247 | #include "sound/ay8910.h" |
| 208 | #include "sound/namco.h" | |
| 209 | 248 | #include "sound/3812intf.h" |
| 210 | 249 | |
| 211 | 250 | |
| 212 | 251 | static int countryc_trackball; |
| 213 | 252 | |
| 253 | static int marvins_sound_busy_flag; | |
| 214 | 254 | // FIXME this should be initialised on machine reset |
| 215 | 255 | static int sound_status; |
| 216 | 256 | |
| 217 | 257 | /*********************************************************************/ |
| 218 | // Interrupt | |
| 258 | // Interrupt handlers common to all SNK triple Z80 games | |
| 219 | 259 | |
| 220 | 260 | READ8_HANDLER ( snk_cpuA_nmi_trigger_r ) |
| 221 | 261 | { |
| 222 | 262 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, ASSERT_LINE); |
| 223 | return 0; | |
| 263 | return 0xff; | |
| 224 | 264 | } |
| 225 | 265 | |
| 226 | 266 | WRITE8_HANDLER( snk_cpuA_nmi_ack_w ) |
| r3171 | r3172 | |
| 231 | 271 | READ8_HANDLER ( snk_cpuB_nmi_trigger_r ) |
| 232 | 272 | { |
| 233 | 273 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, ASSERT_LINE); |
| 234 | return 0; | |
| 274 | return 0xff; | |
| 235 | 275 | } |
| 236 | 276 | |
| 237 | 277 | WRITE8_HANDLER( snk_cpuB_nmi_ack_w ) |
| r3171 | r3172 | |
| 252 | 292 | CMDIRQ_CLEAR |
| 253 | 293 | }; |
| 254 | 294 | |
| 295 | /*********************************************************************/ | |
| 255 | 296 | |
| 297 | static WRITE8_HANDLER( marvins_soundlatch_w ) | |
| 298 | { | |
| 299 | marvins_sound_busy_flag = 1; | |
| 300 | soundlatch_w(machine, offset, data); | |
| 301 | cpunum_set_input_line(machine, 2, 0, HOLD_LINE); | |
| 302 | } | |
| 303 | ||
| 304 | static READ8_HANDLER( marvins_soundlatch_r ) | |
| 305 | { | |
| 306 | marvins_sound_busy_flag = 0; | |
| 307 | return soundlatch_r(machine,0); | |
| 308 | } | |
| 309 | ||
| 310 | static CUSTOM_INPUT( marvins_sound_busy ) | |
| 311 | { | |
| 312 | return marvins_sound_busy_flag; | |
| 313 | } | |
| 314 | ||
| 315 | static READ8_HANDLER( marvins_sound_nmi_ack_r ) | |
| 316 | { | |
| 317 | cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, CLEAR_LINE); | |
| 318 | return 0xff; | |
| 319 | } | |
| 320 | ||
| 321 | /*********************************************************************/ | |
| 322 | ||
| 256 | 323 | static TIMER_CALLBACK( sgladiat_sndirq_update_callback ) |
| 257 | 324 | { |
| 258 | 325 | switch(param) |
| r3171 | r3172 | |
| 299 | 366 | } |
| 300 | 367 | |
| 301 | 368 | |
| 302 | /********************************************************************* | |
| 369 | /********************************************************************* | |
| 303 | 370 | |
| 304 | ||
| 305 | /* | |
| 306 | 371 | All the later games (from athena onwards) have the same sound status flag handling. |
| 307 | 372 | |
| 308 | 373 | This 4 bit register is mapped at 0xf800. |
| r3171 | r3172 | |
| 321 | 386 | bits since there is only one YM chip, and the bits are cleared using |
| 322 | 387 | separate memory addresses. Additionally, clearing the cmd irq also |
| 323 | 388 | clears the sound latch. |
| 324 | */ | |
| 325 | 389 | |
| 326 | ||
| 390 | ||
| 327 | 391 | |
| 328 | 392 | static TIMER_CALLBACK( sndirq_update_callback ) |
| 329 | 393 | { |
| r3171 | r3172 | |
| 363 | 427 | |
| 364 | 428 | |
| 365 | 429 | |
| 366 | static const namco_interface snkwave_interface = | |
| 367 | { | |
| 368 | 1, | |
| 369 | 0 /* stereo */ | |
| 370 | }; | |
| 371 | ||
| 372 | ||
| 373 | 430 | static void ymirq_callback_1(running_machine *machine, int irq) |
| 374 | 431 | { |
| 375 | 432 | if (irq) |
| r3171 | r3172 | |
| 670 | 727 | return value; |
| 671 | 728 | } |
| 672 | 729 | |
| 730 | CUSTOM_INPUT( gwarb_rotary ) | |
| 731 | { | |
| 732 | if (input_port_read(field->port->machine, "JOYSTICK_MODE") == 1) | |
| 733 | { | |
| 734 | return gwar_rotary(field, param); | |
| 735 | } | |
| 736 | else | |
| 737 | { | |
| 738 | return 0x0f; | |
| 739 | } | |
| 740 | } | |
| 673 | 741 | |
| 674 | 742 | /************************************************************************/ |
| 675 | 743 | |
| r3171 | r3172 | |
| 719 | 787 | |
| 720 | 788 | /************************************************************************/ |
| 721 | 789 | |
| 722 | static CUSTOM_INPUT( snk_ | |
| 790 | static CUSTOM_INPUT( snk_ | |
| 723 | 791 | { |
| 724 | 792 | int bit_mask = (FPTR)param; |
| 725 | 793 | |
| 726 | 794 | switch (bit_mask) |
| 727 | 795 | { |
| 728 | case 0x01: | |
| 796 | case 0x01: /* older games : "Occurence" Dip Switch (DSW2:1) */ | |
| 729 | 797 | return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 0); |
| 730 | case 0xc0: | |
| 798 | case 0xc0: /* older games : "Bonus Life" Dip Switches (DSW1:7,8) */ | |
| 731 | 799 | return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 6); |
| 732 | default: | |
| 733 | logerror("snk_older_bonus_r : invalid %02X bit_mask\n",bit_mask); | |
| 734 | return 0; | |
| 735 | } | |
| 736 | } | |
| 737 | 800 | |
| 738 | #if 0 | |
| 739 | static CUSTOM_INPUT( snk_later_bonus_r ) | |
| 740 | { | |
| 741 | int bit_mask = (FPTR)param; | |
| 742 | ||
| 743 | switch (bit_mask) | |
| 744 | { | |
| 745 | case 0x04: | |
| 801 | case 0x04: /* later games : "Occurence" Dip Switch (DSW1:3) */ | |
| 746 | 802 | return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 2); |
| 747 | case 0x30: | |
| 803 | case 0x30: /* later games : "Bonus Life" Dip Switches (DSW2:5,6) */ | |
| 748 | 804 | return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 4); |
| 805 | ||
| 749 | 806 | default: |
| 750 | logerror("snk_ | |
| 807 | logerror("snk_ | |
| 751 | 808 | return 0; |
| 752 | 809 | } |
| 753 | 810 | } |
| 754 | #endif | |
| 755 | 811 | |
| 756 | 812 | /************************************************************************/ |
| 757 | 813 | |
| 814 | static ADDRESS_MAP_START( marvins_cpuA_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 815 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 816 | AM_RANGE(0x6000, 0x6000) AM_WRITE(marvins_palette_bank_w) | |
| 817 | AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN0") | |
| 818 | AM_RANGE(0x8100, 0x8100) AM_READ_PORT("IN1") | |
| 819 | AM_RANGE(0x8200, 0x8200) AM_READ_PORT("IN2") | |
| 820 | AM_RANGE(0x8300, 0x8300) AM_WRITE(marvins_soundlatch_w) | |
| 821 | AM_RANGE(0x8400, 0x8400) AM_READ_PORT("DSW1") | |
| 822 | AM_RANGE(0x8500, 0x8500) AM_READ_PORT("DSW2") | |
| 823 | AM_RANGE(0x8600, 0x8600) AM_WRITE(marvins_flipscreen_w) | |
| 824 | AM_RANGE(0x8700, 0x8700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w) | |
| 825 | AM_RANGE(0xc000, 0xcfff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1) // + work ram | |
| 826 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(marvins_fg_videoram_w) AM_SHARE(2) AM_BASE(&snk_fg_videoram) | |
| 827 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(3) | |
| 828 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(4) AM_BASE(&snk_bg_videoram) | |
| 829 | AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE(5) | |
| 830 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(6) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 831 | AM_RANGE(0xf800, 0xf800) AM_WRITE(snk_sp16_scrolly_w) | |
| 832 | AM_RANGE(0xf900, 0xf900) AM_WRITE(snk_sp16_scrollx_w) | |
| 833 | AM_RANGE(0xfa00, 0xfa00) AM_WRITE(snk_fg_scrolly_w) | |
| 834 | AM_RANGE(0xfb00, 0xfb00) AM_WRITE(snk_fg_scrollx_w) | |
| 835 | AM_RANGE(0xfc00, 0xfc00) AM_WRITE(snk_bg_scrolly_w) | |
| 836 | AM_RANGE(0xfd00, 0xfd00) AM_WRITE(snk_bg_scrollx_w) | |
| 837 | AM_RANGE(0xfe00, 0xfe00) AM_WRITE(snk_sprite_split_point_w) | |
| 838 | AM_RANGE(0xff00, 0xff00) AM_WRITE(marvins_scroll_msb_w) | |
| 839 | ADDRESS_MAP_END | |
| 840 | ||
| 841 | static ADDRESS_MAP_START( marvins_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 842 | AM_RANGE(0x0000, 0x5fff) AM_ROM | |
| 843 | AM_RANGE(0x8700, 0x8700) AM_READWRITE(snk_cpuA_nmi_trigger_r, snk_cpuB_nmi_ack_w) | |
| 844 | AM_RANGE(0xc000, 0xcfff) AM_RAM AM_SHARE(1) | |
| 845 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(marvins_fg_videoram_w) AM_SHARE(2) | |
| 846 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(3) | |
| 847 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(4) | |
| 848 | AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE(5) | |
| 849 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(6) | |
| 850 | AM_RANGE(0xf800, 0xf800) AM_WRITE(snk_sp16_scrolly_w) | |
| 851 | AM_RANGE(0xf900, 0xf900) AM_WRITE(snk_sp16_scrollx_w) | |
| 852 | AM_RANGE(0xfa00, 0xfa00) AM_WRITE(snk_fg_scrolly_w) | |
| 853 | AM_RANGE(0xfb00, 0xfb00) AM_WRITE(snk_fg_scrollx_w) | |
| 854 | AM_RANGE(0xfc00, 0xfc00) AM_WRITE(snk_bg_scrolly_w) | |
| 855 | AM_RANGE(0xfd00, 0xfd00) AM_WRITE(snk_bg_scrollx_w) | |
| 856 | AM_RANGE(0xfe00, 0xfe00) AM_WRITE(snk_sprite_split_point_w) | |
| 857 | AM_RANGE(0xff00, 0xff00) AM_WRITE(marvins_scroll_msb_w) | |
| 858 | ADDRESS_MAP_END | |
| 859 | ||
| 860 | ||
| 861 | // vangrd2 accesses video registers at xxF1 instead of xx00 | |
| 862 | static ADDRESS_MAP_START( madcrash_cpuA_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 863 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 864 | AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN0") | |
| 865 | AM_RANGE(0x8100, 0x8100) AM_READ_PORT("IN1") | |
| 866 | AM_RANGE(0x8200, 0x8200) AM_READ_PORT("IN2") | |
| 867 | AM_RANGE(0x8300, 0x8300) AM_WRITE(marvins_soundlatch_w) | |
| 868 | AM_RANGE(0x8400, 0x8400) AM_READ_PORT("DSW1") | |
| 869 | AM_RANGE(0x8500, 0x8500) AM_READ_PORT("DSW2") | |
| 870 | AM_RANGE(0x8600, 0x8600) AM_MIRROR(0xff) AM_WRITE(marvins_flipscreen_w) | |
| 871 | AM_RANGE(0x8700, 0x8700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w) | |
| 872 | AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1) // + work ram | |
| 873 | AM_RANGE(0xc800, 0xc800) AM_MIRROR(0xff) AM_WRITE(marvins_palette_bank_w) | |
| 874 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(2) AM_BASE(&snk_bg_videoram) | |
| 875 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(3) | |
| 876 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(marvins_fg_videoram_w) AM_SHARE(4) AM_BASE(&snk_fg_videoram) | |
| 877 | AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE(5) | |
| 878 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(6) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 879 | AM_RANGE(0xf800, 0xf800) AM_MIRROR(0xff) AM_WRITE(snk_bg_scrolly_w) | |
| 880 | AM_RANGE(0xf900, 0xf900) AM_MIRROR(0xff) AM_WRITE(snk_bg_scrollx_w) | |
| 881 | AM_RANGE(0xfa00, 0xfa00) AM_MIRROR(0xff) AM_WRITE(snk_sprite_split_point_w) | |
| 882 | AM_RANGE(0xfb00, 0xfb00) AM_MIRROR(0xff) AM_WRITE(marvins_scroll_msb_w) | |
| 883 | AM_RANGE(0xfc00, 0xfc00) AM_MIRROR(0xff) AM_WRITE(snk_sp16_scrolly_w) | |
| 884 | AM_RANGE(0xfd00, 0xfd00) AM_MIRROR(0xff) AM_WRITE(snk_sp16_scrollx_w) | |
| 885 | AM_RANGE(0xfe00, 0xfe00) AM_MIRROR(0xff) AM_WRITE(snk_fg_scrolly_w) | |
| 886 | AM_RANGE(0xff00, 0xff00) AM_MIRROR(0xff) AM_WRITE(snk_fg_scrollx_w) | |
| 887 | ADDRESS_MAP_END | |
| 888 | ||
| 889 | static ADDRESS_MAP_START( madcrash_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 890 | AM_RANGE(0x8700, 0x8700) AM_WRITE(snk_cpuB_nmi_ack_w) // vangrd2 | |
| 891 | AM_RANGE(0x0000, 0x9fff) AM_ROM | |
| 892 | AM_RANGE(0xa000, 0xa000) AM_WRITE(snk_cpuB_nmi_ack_w) // madcrash | |
| 893 | AM_RANGE(0xc000, 0xc7ff) AM_RAM_WRITE(marvins_fg_videoram_w) AM_SHARE(4) | |
| 894 | AM_RANGE(0xc800, 0xcfff) AM_RAM AM_SHARE(5) | |
| 895 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(6) | |
| 896 | AM_RANGE(0xd800, 0xd800) AM_WRITE(snk_bg_scrolly_w) | |
| 897 | AM_RANGE(0xd900, 0xd900) AM_WRITE(snk_bg_scrollx_w) | |
| 898 | AM_RANGE(0xda00, 0xda00) AM_WRITE(snk_sprite_split_point_w) | |
| 899 | AM_RANGE(0xdb00, 0xdb00) AM_WRITE(marvins_scroll_msb_w) | |
| 900 | AM_RANGE(0xdc00, 0xdc00) AM_WRITE(snk_sp16_scrolly_w) | |
| 901 | AM_RANGE(0xdd00, 0xdd00) AM_WRITE(snk_sp16_scrollx_w) | |
| 902 | AM_RANGE(0xde00, 0xde00) AM_WRITE(snk_fg_scrolly_w) | |
| 903 | AM_RANGE(0xdf00, 0xdf00) AM_WRITE(snk_fg_scrollx_w) | |
| 904 | AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE(1) | |
| 905 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(2) | |
| 906 | AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE(3) | |
| 907 | ADDRESS_MAP_END | |
| 908 | ||
| 909 | ||
| 758 | 910 | static ADDRESS_MAP_START( jcross_cpuA_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 759 | 911 | AM_RANGE(0x0000, 0x9fff) AM_ROM |
| 760 | 912 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0") |
| r3171 | r3172 | |
| 763 | 915 | AM_RANGE(0xa300, 0xa300) AM_WRITE(sgladiat_soundlatch_w) |
| 764 | 916 | AM_RANGE(0xa400, 0xa400) AM_READ_PORT("DSW1") |
| 765 | 917 | AM_RANGE(0xa500, 0xa500) AM_READ_PORT("DSW2") |
| 766 | AM_RANGE(0xa600, 0xa600) AM_WRITE(sgladiat_flipscreen_w) | |
| 918 | AM_RANGE(0xa600, 0xa600) AM_WRITE(sgladiat_flipscreen_w) // flip screen, bg palette bank | |
| 767 | 919 | AM_RANGE(0xa700, 0xa700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w) |
| 768 | 920 | AM_RANGE(0xd300, 0xd300) AM_WRITE(jcross_scroll_msb_w) |
| 769 | 921 | AM_RANGE(0xd400, 0xd400) AM_WRITE(snk_sp16_scrolly_w) |
| 770 | 922 | AM_RANGE(0xd500, 0xd500) AM_WRITE(snk_sp16_scrollx_w) |
| 771 | 923 | AM_RANGE(0xd600, 0xd600) AM_WRITE(snk_bg_scrolly_w) |
| 772 | 924 | AM_RANGE(0xd700, 0xd700) AM_WRITE(snk_bg_scrollx_w) |
| 773 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1) | |
| 774 | AM_RANGE(0xe000, 0xefff) AM_RAM_WRITE(aso_bg_videoram_w) AM_SHARE(2) AM_BASE(&snk_bg_videoram) | |
| 775 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(snk_fg_videoram_w) AM_SHARE(3) AM_BASE(&snk_fg_videoram) // + work RAM | |
| 925 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1) // + work ram | |
| 926 | AM_RANGE(0xe000, 0xefff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(2) AM_BASE(&snk_bg_videoram) | |
| 927 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(3) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 776 | 928 | AM_RANGE(0xffff, 0xffff) AM_WRITENOP // simply a program patch to not write to two not existing video registers? |
| 777 | 929 | ADDRESS_MAP_END |
| 778 | 930 | |
| r3171 | r3172 | |
| 780 | 932 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 781 | 933 | AM_RANGE(0xa700, 0xa700) AM_READWRITE(snk_cpuA_nmi_trigger_r, snk_cpuB_nmi_ack_w) |
| 782 | 934 | AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE(1) |
| 783 | AM_RANGE(0xc800, 0xd7ff) AM_RAM_WRITE(aso_bg_videoram_w) AM_SHARE(2) | |
| 784 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(snk_fg_videoram_w) AM_SHARE(3) | |
| 935 | AM_RANGE(0xc800, 0xd7ff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(2) | |
| 936 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(3) | |
| 785 | 937 | ADDRESS_MAP_END |
| 786 | 938 | |
| 787 | 939 | |
| r3171 | r3172 | |
| 793 | 945 | AM_RANGE(0xa300, 0xa300) AM_WRITE(sgladiat_soundlatch_w) |
| 794 | 946 | AM_RANGE(0xa400, 0xa400) AM_READ_PORT("DSW1") |
| 795 | 947 | AM_RANGE(0xa500, 0xa500) AM_READ_PORT("DSW2") |
| 796 | AM_RANGE(0xa600, 0xa600) AM_WRITE(sgladiat_flipscreen_w) | |
| 948 | AM_RANGE(0xa600, 0xa600) AM_WRITE(sgladiat_flipscreen_w) // flip screen, bg palette bank | |
| 797 | 949 | AM_RANGE(0xa700, 0xa700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w) |
| 798 | 950 | AM_RANGE(0xd200, 0xd200) AM_WRITENOP // unknown |
| 799 | 951 | AM_RANGE(0xd300, 0xd300) AM_WRITE(sgladiat_scroll_msb_w) |
| r3171 | r3172 | |
| 801 | 953 | AM_RANGE(0xd500, 0xd500) AM_WRITE(snk_sp16_scrollx_w) |
| 802 | 954 | AM_RANGE(0xd600, 0xd600) AM_WRITE(snk_bg_scrolly_w) |
| 803 | 955 | AM_RANGE(0xd700, 0xd700) AM_WRITE(snk_bg_scrollx_w) |
| 804 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1) | |
| 805 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(aso_bg_videoram_w) AM_SHARE(2) AM_BASE(&snk_bg_videoram) | |
| 956 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1) // + work ram | |
| 957 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(2) AM_BASE(&snk_bg_videoram) | |
| 806 | 958 | AM_RANGE(0xe800, 0xefff) AM_RAM |
| 807 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(snk_ | |
| 959 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(3) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 808 | 960 | ADDRESS_MAP_END |
| 809 | 961 | |
| 810 | 962 | static ADDRESS_MAP_START( sgladiat_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 811 | 963 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 812 | 964 | AM_RANGE(0xa000, 0xa000) AM_READWRITE(snk_cpuA_nmi_trigger_r, snk_cpuB_nmi_ack_w) |
| 813 | AM_RANGE(0xa600, 0xa600) AM_WRITE(sgladiat_flipscreen_w) | |
| 965 | AM_RANGE(0xa600, 0xa600) AM_WRITE(sgladiat_flipscreen_w) // flip screen, bg palette bank | |
| 814 | 966 | AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE(1) |
| 815 | AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(as | |
| 967 | AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(marvins | |
| 816 | 968 | AM_RANGE(0xda00, 0xda00) AM_WRITENOP // unknown |
| 817 | 969 | AM_RANGE(0xdb00, 0xdb00) AM_WRITE(sgladiat_scroll_msb_w) |
| 818 | 970 | AM_RANGE(0xdc00, 0xdc00) AM_WRITE(snk_sp16_scrolly_w) |
| 819 | 971 | AM_RANGE(0xdd00, 0xdd00) AM_WRITE(snk_sp16_scrollx_w) |
| 820 | 972 | AM_RANGE(0xde00, 0xde00) AM_WRITE(snk_bg_scrolly_w) |
| 821 | 973 | AM_RANGE(0xdf00, 0xdf00) AM_WRITE(snk_bg_scrollx_w) |
| 822 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(snk_ | |
| 974 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(3) | |
| 823 | 975 | ADDRESS_MAP_END |
| 824 | 976 | |
| 825 | 977 | |
| 978 | static ADDRESS_MAP_START( hal21_cpuA_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 979 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 980 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN0") | |
| 981 | AM_RANGE(0xc100, 0xc100) AM_READ_PORT("IN1") | |
| 982 | AM_RANGE(0xc200, 0xc200) AM_READ_PORT("IN2") | |
| 983 | AM_RANGE(0xc300, 0xc300) AM_WRITE(sgladiat_soundlatch_w) | |
| 984 | AM_RANGE(0xc400, 0xc400) AM_READ_PORT("DSW1") | |
| 985 | AM_RANGE(0xc500, 0xc500) AM_READ_PORT("DSW2") | |
| 986 | AM_RANGE(0xc600, 0xc600) AM_WRITE(hal21_flipscreen_w) // flip screen, bg tile and palette bank | |
| 987 | AM_RANGE(0xc700, 0xc700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w) | |
| 988 | AM_RANGE(0xd300, 0xd300) AM_WRITE(jcross_scroll_msb_w) | |
| 989 | AM_RANGE(0xd400, 0xd400) AM_WRITE(snk_sp16_scrolly_w) | |
| 990 | AM_RANGE(0xd500, 0xd500) AM_WRITE(snk_sp16_scrollx_w) | |
| 991 | AM_RANGE(0xd600, 0xd600) AM_WRITE(snk_bg_scrolly_w) | |
| 992 | AM_RANGE(0xd700, 0xd700) AM_WRITE(snk_bg_scrollx_w) | |
| 993 | AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1) // + work ram | |
| 994 | AM_RANGE(0xe800, 0xf7ff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(2) AM_BASE(&snk_bg_videoram) | |
| 995 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(3) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 996 | ADDRESS_MAP_END | |
| 997 | ||
| 998 | static ADDRESS_MAP_START( hal21_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 999 | AM_RANGE(0x0000, 0x9fff) AM_ROM | |
| 1000 | AM_RANGE(0xa000, 0xa000) AM_WRITE(snk_cpuB_nmi_ack_w) | |
| 1001 | AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE(1) | |
| 1002 | AM_RANGE(0xd000, 0xdfff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(2) | |
| 1003 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(3) | |
| 1004 | ADDRESS_MAP_END | |
| 1005 | ||
| 1006 | ||
| 826 | 1007 | static ADDRESS_MAP_START( aso_cpuA_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 827 | 1008 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 828 | 1009 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN0") |
| r3171 | r3172 | |
| 841 | 1022 | AM_RANGE(0xcf00, 0xcf00) AM_WRITE(aso_bg_bank_w) // tile and palette bank |
| 842 | 1023 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(1) |
| 843 | 1024 | AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE(2) AM_BASE(&spriteram) // + work ram |
| 844 | AM_RANGE(0xe800, 0xf7ff) AM_RAM_WRITE(aso_bg_videoram_w) AM_SHARE(3) AM_BASE(&snk_bg_videoram) | |
| 845 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_fg_videoram_w) AM_SHARE(4) AM_BASE(&snk_fg_videoram) // + work RAM | |
| 1025 | AM_RANGE(0xe800, 0xf7ff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(3) AM_BASE(&snk_bg_videoram) | |
| 1026 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(4) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 846 | 1027 | ADDRESS_MAP_END |
| 847 | 1028 | |
| 848 | 1029 | static ADDRESS_MAP_START( aso_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 850 | 1031 | AM_RANGE(0xc000, 0xc000) AM_READWRITE(snk_cpuA_nmi_trigger_r, snk_cpuB_nmi_ack_w) |
| 851 | 1032 | AM_RANGE(0xc800, 0xcfff) AM_RAM AM_SHARE(1) |
| 852 | 1033 | AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_SHARE(2) |
| 853 | AM_RANGE(0xd800, 0xe7ff) AM_RAM_WRITE(aso_bg_videoram_w) AM_SHARE(3) | |
| 854 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_fg_videoram_w) AM_SHARE(4) | |
| 1034 | AM_RANGE(0xd800, 0xe7ff) AM_RAM_WRITE(marvins_bg_videoram_w) AM_SHARE(3) | |
| 1035 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(4) | |
| 855 | 1036 | ADDRESS_MAP_END |
| 856 | 1037 | |
| 857 | 1038 | |
| r3171 | r3172 | |
| 875 | 1056 | AM_RANGE(0xcf00, 0xcf00) AM_WRITENOP // fitegolf/countryc only. Either 0 or 1. Video related? |
| 876 | 1057 | AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_SHARE(1) AM_BASE(&spriteram) // + work ram |
| 877 | 1058 | AM_RANGE(0xd800, 0xf7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_SHARE(2) AM_BASE(&snk_bg_videoram) |
| 878 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_ | |
| 1059 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(3) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 879 | 1060 | ADDRESS_MAP_END |
| 880 | 1061 | |
| 881 | 1062 | static ADDRESS_MAP_START( tnk3_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 885 | 1066 | AM_RANGE(0xc800, 0xcfff) AM_RAM AM_SHARE(1) |
| 886 | 1067 | AM_RANGE(0xd000, 0xefff) AM_RAM_WRITE(snk_bg_videoram_w) AM_SHARE(2) |
| 887 | 1068 | AM_RANGE(0xf000, 0xf7ff) AM_RAM |
| 888 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_ | |
| 1069 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(3) | |
| 889 | 1070 | ADDRESS_MAP_END |
| 890 | 1071 | |
| 891 | 1072 | |
| r3171 | r3172 | |
| 921 | 1102 | // note the mirror. ikari and victroad use d800, ikarijp uses d000 |
| 922 | 1103 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_MIRROR(0x0800) AM_SHARE(2) AM_BASE(&snk_bg_videoram) |
| 923 | 1104 | AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(3) AM_BASE(&spriteram) // + work ram |
| 924 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_ | |
| 1105 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(4) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 925 | 1106 | ADDRESS_MAP_END |
| 926 | 1107 | |
| 927 | 1108 | static ADDRESS_MAP_START( ikari_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 940 | 1121 | AM_RANGE(0xcee0, 0xcee0) AM_READ(hardflags7_r) |
| 941 | 1122 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_MIRROR(0x0800) AM_SHARE(2) |
| 942 | 1123 | AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(3) |
| 943 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_ | |
| 1124 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(4) | |
| 944 | 1125 | ADDRESS_MAP_END |
| 945 | 1126 | |
| 946 | 1127 | |
| r3171 | r3172 | |
| 957 | 1138 | AM_RANGE(0xc800, 0xc800) AM_WRITE(snk_bg_scrolly_w) |
| 958 | 1139 | AM_RANGE(0xc840, 0xc840) AM_WRITE(snk_bg_scrollx_w) |
| 959 | 1140 | AM_RANGE(0xc880, 0xc880) AM_WRITE(gwara_videoattrs_w) // flip screen, scroll msb |
| 960 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_ | |
| 1141 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_tx_bank_w) // char and palette bank | |
| 961 | 1142 | AM_RANGE(0xc900, 0xc900) AM_WRITE(snk_sp16_scrolly_w) |
| 962 | 1143 | AM_RANGE(0xc940, 0xc940) AM_WRITE(snk_sp16_scrollx_w) |
| 963 | 1144 | AM_RANGE(0xc980, 0xc980) AM_WRITE(snk_sp32_scrolly_w) |
| r3171 | r3172 | |
| 966 | 1147 | AM_RANGE(0xca00, 0xca00) AM_WRITE(turbocheck16_1_w) |
| 967 | 1148 | AM_RANGE(0xca40, 0xca40) AM_WRITE(turbocheck16_2_w) |
| 968 | 1149 | AM_RANGE(0xca80, 0xca80) AM_WRITE(gwara_sp_scroll_msb_w) |
| 969 | AM_RANGE(0xcac0, 0xcac0) AM_WRITE( | |
| 1150 | AM_RANGE(0xcac0, 0xcac0) AM_WRITE(snk | |
| 970 | 1151 | AM_RANGE(0xcb00, 0xcb00) AM_READ(turbocheck16_1_r) |
| 971 | 1152 | AM_RANGE(0xcb10, 0xcb10) AM_READ(turbocheck16_2_r) |
| 972 | 1153 | AM_RANGE(0xcb20, 0xcb20) AM_READ(turbocheck16_3_r) |
| r3171 | r3172 | |
| 985 | 1166 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_SHARE(1) AM_BASE(&snk_bg_videoram) |
| 986 | 1167 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(2) |
| 987 | 1168 | AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(3) AM_BASE(&spriteram) // + work ram |
| 988 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_ | |
| 1169 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(4) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 989 | 1170 | ADDRESS_MAP_END |
| 990 | 1171 | |
| 991 | 1172 | static ADDRESS_MAP_START( bermudat_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 994 | 1175 | AM_RANGE(0xc800, 0xc800) AM_WRITE(snk_bg_scrolly_w) |
| 995 | 1176 | AM_RANGE(0xc840, 0xc840) AM_WRITE(snk_bg_scrollx_w) |
| 996 | 1177 | AM_RANGE(0xc880, 0xc880) AM_WRITE(gwara_videoattrs_w) // flip screen, scroll msb |
| 997 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_ | |
| 1178 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_tx_bank_w) // char and palette bank | |
| 998 | 1179 | AM_RANGE(0xc900, 0xc900) AM_WRITE(snk_sp16_scrolly_w) |
| 999 | 1180 | AM_RANGE(0xc940, 0xc940) AM_WRITE(snk_sp16_scrollx_w) |
| 1000 | 1181 | AM_RANGE(0xc980, 0xc980) AM_WRITE(snk_sp32_scrolly_w) |
| r3171 | r3172 | |
| 1003 | 1184 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_SHARE(1) |
| 1004 | 1185 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(2) |
| 1005 | 1186 | AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(3) |
| 1006 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_ | |
| 1187 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(4) | |
| 1007 | 1188 | ADDRESS_MAP_END |
| 1008 | 1189 | |
| 1009 | 1190 | |
| r3171 | r3172 | |
| 1020 | 1201 | AM_RANGE(0xc800, 0xc800) AM_WRITE(snk_bg_scrolly_w) |
| 1021 | 1202 | AM_RANGE(0xc840, 0xc840) AM_WRITE(snk_bg_scrollx_w) |
| 1022 | 1203 | AM_RANGE(0xc880, 0xc880) AM_WRITE(gwar_videoattrs_w) // flip screen, scroll msb |
| 1023 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_ | |
| 1204 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_tx_bank_w) // char and palette bank | |
| 1024 | 1205 | AM_RANGE(0xc900, 0xc900) AM_WRITE(snk_sp16_scrolly_w) |
| 1025 | 1206 | AM_RANGE(0xc940, 0xc940) AM_WRITE(snk_sp16_scrollx_w) |
| 1026 | 1207 | AM_RANGE(0xc980, 0xc980) AM_WRITE(snk_sp32_scrolly_w) |
| 1027 | 1208 | AM_RANGE(0xc9c0, 0xc9c0) AM_WRITE(snk_sp32_scrollx_w) |
| 1028 | 1209 | AM_RANGE(0xca00, 0xca00) AM_WRITENOP // always 0? |
| 1029 | 1210 | AM_RANGE(0xca40, 0xca40) AM_WRITENOP // always 0? |
| 1030 | AM_RANGE(0xcac0, 0xcac0) AM_WRITE( | |
| 1211 | AM_RANGE(0xcac0, 0xcac0) AM_WRITE(snk | |
| 1031 | 1212 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_SHARE(1) AM_BASE(&snk_bg_videoram) |
| 1032 | 1213 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(2) |
| 1033 | 1214 | AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(3) AM_BASE(&spriteram) // + work ram |
| 1034 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_ | |
| 1215 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(4) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 1035 | 1216 | ADDRESS_MAP_END |
| 1036 | 1217 | |
| 1037 | 1218 | static ADDRESS_MAP_START( gwar_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1038 | 1219 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 1039 | 1220 | AM_RANGE(0xc000, 0xc000) AM_READWRITE(snk_cpuA_nmi_trigger_r, snk_cpuB_nmi_ack_w) |
| 1040 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_ | |
| 1221 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_tx_bank_w) // char and palette bank | |
| 1041 | 1222 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_SHARE(1) |
| 1042 | 1223 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(2) |
| 1043 | 1224 | AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(3) |
| 1044 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_ | |
| 1225 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(4) | |
| 1045 | 1226 | ADDRESS_MAP_END |
| 1046 | 1227 | |
| 1047 | 1228 | |
| r3171 | r3172 | |
| 1055 | 1236 | AM_RANGE(0xc500, 0xc500) AM_READ_PORT("DSW1") |
| 1056 | 1237 | AM_RANGE(0xc600, 0xc600) AM_READ_PORT("DSW2") |
| 1057 | 1238 | AM_RANGE(0xc700, 0xc700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w) |
| 1058 | AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(snk_ | |
| 1239 | AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(1) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 1059 | 1240 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_SHARE(2) AM_BASE(&snk_bg_videoram) |
| 1060 | 1241 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(3) |
| 1061 | 1242 | AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(4) AM_BASE(&spriteram) // + work ram |
| 1062 | 1243 | AM_RANGE(0xf800, 0xf800) AM_WRITE(snk_bg_scrolly_w) |
| 1063 | 1244 | AM_RANGE(0xf840, 0xf840) AM_WRITE(snk_bg_scrollx_w) |
| 1064 | 1245 | AM_RANGE(0xf880, 0xf880) AM_WRITE(gwara_videoattrs_w) // flip screen, scroll msb |
| 1065 | AM_RANGE(0xf8c0, 0xf8c0) AM_WRITE(gwar_ | |
| 1246 | AM_RANGE(0xf8c0, 0xf8c0) AM_WRITE(gwar_tx_bank_w) // char and palette bank | |
| 1066 | 1247 | AM_RANGE(0xf900, 0xf900) AM_WRITE(snk_sp16_scrolly_w) |
| 1067 | 1248 | AM_RANGE(0xf940, 0xf940) AM_WRITE(snk_sp16_scrollx_w) |
| 1068 | 1249 | AM_RANGE(0xf980, 0xf980) AM_WRITE(snk_sp32_scrolly_w) |
| 1069 | 1250 | AM_RANGE(0xf9c0, 0xf9c0) AM_WRITE(snk_sp32_scrollx_w) |
| 1070 | 1251 | AM_RANGE(0xfa80, 0xfa80) AM_WRITE(gwara_sp_scroll_msb_w) |
| 1071 | AM_RANGE(0xfac0, 0xfac0) AM_WRITE( | |
| 1252 | AM_RANGE(0xfac0, 0xfac0) AM_WRITE(snk | |
| 1072 | 1253 | ADDRESS_MAP_END |
| 1073 | 1254 | |
| 1074 | 1255 | static ADDRESS_MAP_START( gwara_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1075 | 1256 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 1076 | 1257 | AM_RANGE(0xc000, 0xc000) AM_READWRITE(snk_cpuA_nmi_trigger_r, snk_cpuB_nmi_ack_w) |
| 1077 | AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(snk_ | |
| 1258 | AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(1) | |
| 1078 | 1259 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_SHARE(2) |
| 1079 | 1260 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(3) |
| 1080 | 1261 | AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(4) AM_BASE(&spriteram) // + work ram |
| 1081 | AM_RANGE(0xf8c0, 0xf8c0) AM_WRITE(gwar_ | |
| 1262 | AM_RANGE(0xf8c0, 0xf8c0) AM_WRITE(gwar_tx_bank_w) // char and palette bank | |
| 1082 | 1263 | ADDRESS_MAP_END |
| 1083 | 1264 | |
| 1084 | 1265 | |
| r3171 | r3172 | |
| 1102 | 1283 | AM_RANGE(0xc800, 0xc800) AM_WRITE(snk_bg_scrolly_w) |
| 1103 | 1284 | AM_RANGE(0xc840, 0xc840) AM_WRITE(snk_bg_scrollx_w) |
| 1104 | 1285 | AM_RANGE(0xc880, 0xc880) AM_WRITE(gwara_videoattrs_w) // flip screen, scroll msb |
| 1105 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_ | |
| 1286 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_tx_bank_w) // char and palette bank | |
| 1106 | 1287 | AM_RANGE(0xc900, 0xc900) AM_WRITE(tdfever_sp_scroll_msb_w) |
| 1107 | 1288 | AM_RANGE(0xc980, 0xc980) AM_WRITE(snk_sp32_scrolly_w) |
| 1108 | 1289 | AM_RANGE(0xc9c0, 0xc9c0) AM_WRITE(snk_sp32_scrollx_w) |
| 1109 | 1290 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_SHARE(1) AM_BASE(&snk_bg_videoram) |
| 1110 | 1291 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(2) |
| 1111 | 1292 | AM_RANGE(0xe000, 0xf7ff) AM_RAM_WRITE(tdfever_spriteram_w) AM_SHARE(3) AM_BASE(&spriteram) // + work ram |
| 1112 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_ | |
| 1293 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(4) AM_BASE(&snk_tx_videoram) // + work RAM | |
| 1113 | 1294 | ADDRESS_MAP_END |
| 1114 | 1295 | |
| 1115 | 1296 | static ADDRESS_MAP_START( tdfever_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1116 | 1297 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 1117 | 1298 | AM_RANGE(0xc000, 0xc000) AM_READWRITE(snk_cpuA_nmi_trigger_r, snk_cpuB_nmi_ack_w) // tdfever, tdfever2 |
| 1118 | 1299 | AM_RANGE(0xc700, 0xc700) AM_READWRITE(snk_cpuA_nmi_trigger_r, snk_cpuB_nmi_ack_w) // fsoccer |
| 1119 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_ | |
| 1300 | AM_RANGE(0xc8c0, 0xc8c0) AM_WRITE(gwar_tx_bank_w) // char and palette bank | |
| 1120 | 1301 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(snk_bg_videoram_w) AM_SHARE(1) |
| 1121 | 1302 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(2) |
| 1122 | 1303 | AM_RANGE(0xe000, 0xf7ff) AM_RAM_WRITE(tdfever_spriteram_w) AM_SHARE(3) |
| 1123 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_ | |
| 1304 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(snk_tx_videoram_w) AM_SHARE(4) | |
| 1124 | 1305 | ADDRESS_MAP_END |
| 1125 | 1306 | |
| 1126 | 1307 | /***********************************************************************/ |
| 1127 | 1308 | |
| 1309 | static ADDRESS_MAP_START( marvins_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1310 | AM_RANGE(0x0000, 0x3fff) AM_ROM | |
| 1311 | AM_RANGE(0x4000, 0x4000) AM_READ(marvins_soundlatch_r) | |
| 1312 | AM_RANGE(0x8000, 0x8000) AM_WRITE(ay8910_control_port_0_w) | |
| 1313 | AM_RANGE(0x8001, 0x8001) AM_WRITE(ay8910_write_port_0_w) | |
| 1314 | AM_RANGE(0x8002, 0x8007) AM_WRITE(snkwave_w) | |
| 1315 | AM_RANGE(0x8008, 0x8008) AM_WRITE(ay8910_control_port_1_w) | |
| 1316 | AM_RANGE(0x8009, 0x8009) AM_WRITE(ay8910_write_port_1_w) | |
| 1317 | AM_RANGE(0xa000, 0xa000) AM_READ(marvins_sound_nmi_ack_r) | |
| 1318 | AM_RANGE(0xe000, 0xe7ff) AM_RAM | |
| 1319 | ADDRESS_MAP_END | |
| 1320 | ||
| 1321 | static ADDRESS_MAP_START( marvins_sound_portmap, ADDRESS_SPACE_IO, 8 ) | |
| 1322 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 1323 | AM_RANGE(0x00, 0x00) AM_READNOP // read on startup, then the Z80 automatically pulls down the IORQ pin to ack irq | |
| 1324 | ADDRESS_MAP_END | |
| 1325 | ||
| 1326 | ||
| 1128 | 1327 | static ADDRESS_MAP_START( jcross_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1129 | AM_RANGE(0x0000, 0x3fff) AM_ROM | |
| 1328 | AM_RANGE(0x0000, 0x3fff) AM_ROM | |
| 1130 | 1329 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 1131 | 1330 | AM_RANGE(0xa000, 0xa000) AM_READ(sgladiat_soundlatch_r) |
| 1132 | 1331 | AM_RANGE(0xc000, 0xc000) AM_READ(sgladiat_sound_nmi_ack_r) |
| 1133 | 1332 | AM_RANGE(0xe000, 0xe000) AM_WRITE(ay8910_control_port_0_w) |
| 1134 | 1333 | AM_RANGE(0xe001, 0xe001) AM_WRITE(ay8910_write_port_0_w) |
| 1135 | AM_RANGE(0xe002, 0xe007) AM_WRITE(snkwave_w) | |
| 1136 | AM_RANGE(0xe008, 0xe008) AM_WRITE(ay8910_control_port_1_w) | |
| 1137 | AM_RANGE(0xe009, 0xe009) AM_WRITE(ay8910_write_port_1_w) | |
| 1334 | AM_RANGE(0xe002, 0xe003) AM_WRITENOP // ? always FFFF, snkwave leftover? | |
| 1335 | AM_RANGE(0xe004, 0xe004) AM_WRITE(ay8910_control_port_1_w) | |
| 1336 | AM_RANGE(0xe005, 0xe005) AM_WRITE(ay8910_write_port_1_w) | |
| 1138 | 1337 | ADDRESS_MAP_END |
| 1139 | 1338 | |
| 1140 | static ADDRESS_MAP_START( sgladiat_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1339 | static ADDRESS_MAP_START( jcross_sound_portmap, ADDRESS_SPACE_IO, 8 ) | |
| 1340 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 1341 | AM_RANGE(0x00, 0x00) AM_READ(sgladiat_sound_irq_ack_r) | |
| 1342 | ADDRESS_MAP_END | |
| 1343 | ||
| 1344 | ||
| 1345 | static ADDRESS_MAP_START( hal21_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1141 | 1346 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 1142 | 1347 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 1143 | 1348 | AM_RANGE(0xa000, 0xa000) AM_READ(sgladiat_soundlatch_r) |
| 1144 | 1349 | AM_RANGE(0xc000, 0xc000) AM_READ(sgladiat_sound_nmi_ack_r) |
| 1145 | 1350 | AM_RANGE(0xe000, 0xe000) AM_WRITE(ay8910_control_port_0_w) |
| 1146 | 1351 | AM_RANGE(0xe001, 0xe001) AM_WRITE(ay8910_write_port_0_w) |
| 1147 | AM_RANGE(0xe002, 0xe003) AM_WRITENOP // leftover wave generator ports? | |
| 1148 | AM_RANGE(0xe004, 0xe004) AM_WRITE(ay8910_control_port_1_w) | |
| 1149 | AM_RANGE(0xe005, 0xe005) AM_WRITE(ay8910_write_port_1_w) | |
| 1352 | // AM_RANGE(0xe002, 0xe002) AM_WRITENOP // bitfielded(0-5) details unknown. Filter enable? | |
| 1353 | AM_RANGE(0xe008, 0xe008) AM_WRITE(ay8910_control_port_1_w) | |
| 1354 | AM_RANGE(0xe009, 0xe009) AM_WRITE(ay8910_write_port_1_w) | |
| 1150 | 1355 | ADDRESS_MAP_END |
| 1151 | 1356 | |
| 1152 | static ADDRESS_MAP_START( | |
| 1357 | static ADDRESS_MAP_START( hal21 | |
| 1153 | 1358 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1154 | AM_RANGE(0x00, 0x00) AM_READ | |
| 1359 | AM_RANGE(0x00, 0x00) AM_READNOP // read on start | |
| 1155 | 1360 | ADDRESS_MAP_END |
| 1156 | 1361 | |
| 1362 | ||
| 1157 | 1363 | static ADDRESS_MAP_START( tnk3_YM3526_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1158 | 1364 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 1159 | 1365 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| r3171 | r3172 | |
| 1230 | 1436 | |
| 1231 | 1437 | /*********************************************************************/ |
| 1232 | 1438 | |
| 1439 | static INPUT_PORTS_START( marvins ) | |
| 1440 | PORT_START("IN0") | |
| 1441 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1442 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1443 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) | |
| 1444 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1445 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1446 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1447 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1448 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // service switch according to schematics, see code at 0x0453. Goes to garbage. | |
| 1449 | ||
| 1450 | PORT_START("IN1") | |
| 1451 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1452 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1453 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1454 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1455 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1456 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1457 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1458 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1459 | ||
| 1460 | PORT_START("IN2") | |
| 1461 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1462 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1463 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1464 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1465 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1466 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1467 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1468 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1469 | ||
| 1470 | PORT_START("DSW1") | |
| 1471 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:1,2") | |
| 1472 | PORT_DIPSETTING( 0x00, "1" ) | |
| 1473 | PORT_DIPSETTING( 0x01, "2" ) | |
| 1474 | PORT_DIPSETTING( 0x02, "3" ) | |
| 1475 | PORT_DIPSETTING( 0x03, "5" ) | |
| 1476 | PORT_DIPNAME(0x04, 0x04, "Infinite Lives (Cheat)") PORT_DIPLOCATION("DSW1:3") | |
| 1477 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 1478 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1479 | PORT_DIPNAME( 0x38, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6") | |
| 1480 | PORT_DIPSETTING( 0x38, DEF_STR( 5C_1C ) ) | |
| 1481 | PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) ) | |
| 1482 | PORT_DIPSETTING( 0x28, DEF_STR( 2C_1C ) ) | |
| 1483 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1484 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) | |
| 1485 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) | |
| 1486 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_5C ) ) | |
| 1487 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_6C ) ) | |
| 1488 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("DSW1:7") | |
| 1489 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1490 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1491 | PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("DSW1:8") | |
| 1492 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1493 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1494 | ||
| 1495 | PORT_START("DSW2") | |
| 1496 | PORT_DIPNAME( 0x07, 0x00, "1st Bonus Life" ) PORT_DIPLOCATION("DSW2:1,2,3") | |
| 1497 | PORT_DIPSETTING( 0x00, "10000" ) | |
| 1498 | PORT_DIPSETTING( 0x01, "20000" ) | |
| 1499 | PORT_DIPSETTING( 0x02, "30000" ) | |
| 1500 | PORT_DIPSETTING( 0x03, "40000" ) | |
| 1501 | PORT_DIPSETTING( 0x04, "50000" ) | |
| 1502 | PORT_DIPSETTING( 0x05, "60000" ) | |
| 1503 | PORT_DIPSETTING( 0x06, "70000" ) | |
| 1504 | PORT_DIPSETTING( 0x07, "80000" ) | |
| 1505 | PORT_DIPNAME( 0x18, 0x08, "2nd Bonus Life" ) PORT_DIPLOCATION("DSW2:4,5") | |
| 1506 | PORT_DIPSETTING( 0x08, "1st bonus*2" ) | |
| 1507 | PORT_DIPSETTING( 0x10, "1st bonus*3" ) | |
| 1508 | PORT_DIPSETTING( 0x18, "1st bonus*4" ) | |
| 1509 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1510 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:6") | |
| 1511 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1512 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 1513 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW2:7") | |
| 1514 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1515 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) | |
| 1516 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:8") | |
| 1517 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1518 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1519 | INPUT_PORTS_END | |
| 1520 | ||
| 1521 | ||
| 1522 | static INPUT_PORTS_START( vangrd2 ) | |
| 1523 | PORT_START("IN0") | |
| 1524 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1525 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1526 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1527 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1528 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1529 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1530 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1531 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1532 | ||
| 1533 | PORT_START("IN1") | |
| 1534 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1535 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1536 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1537 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1538 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1539 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1540 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1541 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1542 | ||
| 1543 | PORT_START("IN2") | |
| 1544 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1545 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1546 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1547 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1548 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 1549 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1550 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1551 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1552 | ||
| 1553 | PORT_START("DSW1") | |
| 1554 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:1,2,3") | |
| 1555 | PORT_DIPSETTING( 0x00, DEF_STR( 6C_1C ) ) | |
| 1556 | PORT_DIPSETTING( 0x01, DEF_STR( 5C_1C ) ) | |
| 1557 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) | |
| 1558 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) | |
| 1559 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) | |
| 1560 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) | |
| 1561 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) | |
| 1562 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) ) | |
| 1563 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW1:4,5,6") | |
| 1564 | PORT_DIPSETTING( 0x38, "30000" ) | |
| 1565 | PORT_DIPSETTING( 0x30, "40000" ) | |
| 1566 | PORT_DIPSETTING( 0x28, "50000" ) | |
| 1567 | PORT_DIPSETTING( 0x20, "60000" ) | |
| 1568 | PORT_DIPSETTING( 0x18, "70000" ) | |
| 1569 | PORT_DIPSETTING( 0x10, "80000" ) | |
| 1570 | PORT_DIPSETTING( 0x08, "90000" ) | |
| 1571 | PORT_DIPSETTING( 0x00, "100000" ) | |
| 1572 | PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:7,8") | |
| 1573 | PORT_DIPSETTING( 0x00, "1" ) | |
| 1574 | PORT_DIPSETTING( 0x40, "2" ) | |
| 1575 | PORT_DIPSETTING( 0x80, "3" ) | |
| 1576 | PORT_DIPSETTING( 0xc0, "5" ) | |
| 1577 | ||
| 1578 | PORT_START("DSW2") | |
| 1579 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:1") | |
| 1580 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1581 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1582 | PORT_DIPNAME( 0x02, 0x02, "Freeze" ) PORT_DIPLOCATION("DSW2:2") | |
| 1583 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 1584 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1585 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW2:3") | |
| 1586 | PORT_DIPSETTING( 0x04, DEF_STR( Upright ) ) | |
| 1587 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 1588 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Language ) ) PORT_DIPLOCATION("DSW2:4") | |
| 1589 | PORT_DIPSETTING( 0x08, DEF_STR( English ) ) | |
| 1590 | PORT_DIPSETTING( 0x00, DEF_STR( Japanese ) ) | |
| 1591 | PORT_DIPNAME( 0x10, 0x00, "Bonus Life Occurence" ) PORT_DIPLOCATION("DSW2:5") | |
| 1592 | PORT_DIPSETTING( 0x00, "Every bonus" ) | |
| 1593 | PORT_DIPSETTING( 0x10, "Bonus only" ) | |
| 1594 | PORT_DIPNAME( 0x20, 0x20, "Infinite Lives (Cheat)") PORT_DIPLOCATION("DSW2:6") | |
| 1595 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1596 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1597 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("DSW2:7") | |
| 1598 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1599 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1600 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:8") | |
| 1601 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1602 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1603 | INPUT_PORTS_END | |
| 1604 | ||
| 1605 | ||
| 1606 | static INPUT_PORTS_START( madcrash ) | |
| 1607 | PORT_START("IN0") | |
| 1608 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1609 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1610 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) | |
| 1611 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1612 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1613 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1614 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1615 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) | |
| 1616 | ||
| 1617 | PORT_START("IN1") | |
| 1618 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1619 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1620 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1621 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1622 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1623 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1624 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1625 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1626 | ||
| 1627 | PORT_START("IN2") | |
| 1628 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1629 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1630 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1631 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 1632 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 1633 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 1634 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1635 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1636 | ||
| 1637 | PORT_START("DSW1") | |
| 1638 | PORT_DIPUNUSED_DIPLOC(0x01, IP_ACTIVE_LOW, "DSW1:1") /* Listed as Unused */ | |
| 1639 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") | |
| 1640 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1641 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) | |
| 1642 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3") | |
| 1643 | PORT_DIPSETTING( 0x04, "3" ) | |
| 1644 | PORT_DIPSETTING( 0x00, "5" ) | |
| 1645 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6") | |
| 1646 | // PORT_DIPSETTING( 0x08, DEF_STR( 5C_1C ) ) | |
| 1647 | PORT_DIPSETTING( 0x10, DEF_STR( 5C_1C ) ) | |
| 1648 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) | |
| 1649 | PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) ) | |
| 1650 | PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) ) | |
| 1651 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) | |
| 1652 | PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) | |
| 1653 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 1654 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW1:7,8") | |
| 1655 | PORT_DIPSETTING( 0xc0, "20000 60000" ) | |
| 1656 | PORT_DIPSETTING( 0x80, "40000 90000" ) | |
| 1657 | PORT_DIPSETTING( 0x40, "50000 120000" ) | |
| 1658 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1659 | ||
| 1660 | PORT_START("DSW2") | |
| 1661 | PORT_DIPNAME( 0x01, 0x00, "Bonus Life Occurence" ) PORT_DIPLOCATION("DSW2:1") | |
| 1662 | PORT_DIPSETTING( 0x01, "1st, 2nd, then every 2nd" ) /* Check the "Non Bugs" page */ | |
| 1663 | PORT_DIPSETTING( 0x00, "1st and 2nd only" ) | |
| 1664 | PORT_DIPNAME( 0x06, 0x04, "Scroll Speed" ) PORT_DIPLOCATION("DSW2:2,3") | |
| 1665 | PORT_DIPSETTING( 0x06, "Slow" )//DEF_STR( Easy ) ) | |
| 1666 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) | |
| 1667 | PORT_DIPSETTING( 0x02, "Fast" )//DEF_STR( Hard ) ) | |
| 1668 | PORT_DIPSETTING( 0x00, "Faster" ) | |
| 1669 | PORT_DIPNAME( 0x18, 0x10, "Game mode" ) PORT_DIPLOCATION("DSW2:4,5") | |
| 1670 | PORT_DIPSETTING( 0x18, "Demo Sounds Off" ) | |
| 1671 | PORT_DIPSETTING( 0x10, "Demo Sounds On" ) | |
| 1672 | PORT_DIPSETTING( 0x08, "Infinite Lives (Cheat)") | |
| 1673 | PORT_DIPSETTING( 0x00, "Freeze" ) | |
| 1674 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6") | |
| 1675 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1676 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) /* Check the "Non Bugs" page */ | |
| 1677 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:7") | |
| 1678 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) | |
| 1679 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 1680 | PORT_DIPUNKNOWN_DIPLOC(0x80, IP_ACTIVE_LOW, "DSW2:8") /* Listed as Unused, it is actually tested in many places */ | |
| 1681 | INPUT_PORTS_END | |
| 1682 | ||
| 1683 | ||
| 1233 | 1684 | static INPUT_PORTS_START( jcross ) |
| 1234 | 1685 | PORT_START("IN0") |
| 1235 | 1686 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r3171 | r3172 | |
| 1262 | 1713 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1263 | 1714 | |
| 1264 | 1715 | PORT_START("DSW1") |
| 1265 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:1,2") | |
| 1266 | PORT_DIPSETTING( 0x03, "Upright, Single Controls" ) | |
| 1267 | // PORT_DIPSETTING( 0x01, "Upright, Single Controls" ) /* duplicated setting + unknown additional stuff (code at 0x03ff) */ | |
| 1268 | PORT_DIPSETTING( 0x00, "Upright, Dual Controls" ) | |
| 1716 | PORT_DIPNAME( 0x01, 0x01, "Upright Controls" ) PORT_DIPLOCATION("DSW1:1") | |
| 1717 | PORT_DIPSETTING( 0x01, DEF_STR( Single ) ) | |
| 1718 | PORT_DIPSETTING( 0x00, DEF_STR( Dual ) ) | |
| 1719 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") | |
| 1720 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1269 | 1721 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) |
| 1270 | 1722 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3") |
| 1271 | 1723 | PORT_DIPSETTING( 0x04, "3" ) |
| r3171 | r3172 | |
| 1279 | 1731 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 1280 | 1732 | // PORT_DIPSETTING( 0x10, "INVALID !" ) /* settings table at 0x0378 is only 5 bytes wide */ |
| 1281 | 1733 | // PORT_DIPSETTING( 0x08, "INVALID !" ) /* settings table at 0x0378 is only 5 bytes wide */ |
| 1282 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_ | |
| 1734 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_ | |
| 1283 | 1735 | |
| 1284 | 1736 | PORT_START("DSW2") |
| 1285 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_ | |
| 1737 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_ | |
| 1286 | 1738 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") |
| 1287 | 1739 | PORT_DIPSETTING( 0x06, DEF_STR( Easy ) ) |
| 1288 | 1740 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) |
| r3171 | r3172 | |
| 1297 | 1749 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1298 | 1750 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1299 | 1751 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" ) |
| 1300 | PORT_DIPNAME( 0x80, 0x80, " | |
| 1752 | PORT_DIPNAME( 0x80, 0x80, " | |
| 1301 | 1753 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1302 | 1754 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1303 | 1755 | |
| r3171 | r3172 | |
| 1318 | 1770 | PORT_START("IN0") |
| 1319 | 1771 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1320 | 1772 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1321 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_ | |
| 1773 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1322 | 1774 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 1323 | 1775 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 1324 | 1776 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) |
| r3171 | r3172 | |
| 1362 | 1814 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) |
| 1363 | 1815 | PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) |
| 1364 | 1816 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 1365 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_ | |
| 1817 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_ | |
| 1366 | 1818 | |
| 1367 | 1819 | PORT_START("DSW2") |
| 1368 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_ | |
| 1820 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_ | |
| 1369 | 1821 | PORT_DIPNAME( 0x02, 0x02, "Time" ) PORT_DIPLOCATION("DSW2:2") |
| 1370 | 1822 | PORT_DIPSETTING( 0x02, "More" ) /* Hazard race 2:30 / Chariot race 3:30 */ |
| 1371 | 1823 | PORT_DIPSETTING( 0x00, "Less" ) /* Hazard race 2:00 / Chariot race 3:00 */ |
| r3171 | r3172 | |
| 1381 | 1833 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7") /* code at 0x4169 */ |
| 1382 | 1834 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1383 | 1835 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1384 | PORT_DIPNAME( 0x80, 0x80, " | |
| 1836 | PORT_DIPNAME( 0x80, 0x80, " | |
| 1385 | 1837 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1386 | 1838 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1387 | 1839 | |
| r3171 | r3172 | |
| 1390 | 1842 | PORT_DIPSETTING( 0xc1, "20k 60k 60k+" ) |
| 1391 | 1843 | PORT_DIPSETTING( 0x81, "40k 90k 90k+" ) |
| 1392 | 1844 | PORT_DIPSETTING( 0x41, "50k 120k 120k+" ) |
| 1393 | PORT_DIPSETTING( 0xc0, "20k" ) | |
| 1394 | PORT_DIPSETTING( 0x80, "40k" ) | |
| 1395 | PORT_DIPSETTING( 0x40, "50k" ) | |
| 1845 | PORT_DIPSETTING( 0xc0, "20k 60k" ) | |
| 1846 | PORT_DIPSETTING( 0x80, "40k 90k" ) | |
| 1847 | PORT_DIPSETTING( 0x40, "50k 120k" ) | |
| 1396 | 1848 | // PORT_DIPSETTING( 0x01, DEF_STR( None ) ) /* duplicated setting */ |
| 1397 | 1849 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 1398 | 1850 | INPUT_PORTS_END |
| 1399 | 1851 | |
| 1400 | 1852 | |
| 1853 | static INPUT_PORTS_START( hal21 ) | |
| 1854 | PORT_START("IN0") | |
| 1855 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1856 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1857 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1858 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1859 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1860 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 1861 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1862 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1863 | ||
| 1864 | PORT_START("IN1") | |
| 1865 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1866 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1867 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1868 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1869 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1870 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1871 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1872 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1873 | ||
| 1874 | PORT_START("IN2") | |
| 1875 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1876 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1877 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1878 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1879 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1880 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1881 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1882 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1883 | ||
| 1884 | PORT_START("DSW1") | |
| 1885 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "DSW1:1" ) | |
| 1886 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") | |
| 1887 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) /* Dual Controls, simultaneous play */ | |
| 1888 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) /* Alternative play */ | |
| 1889 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3") | |
| 1890 | PORT_DIPSETTING( 0x04, "3" ) | |
| 1891 | PORT_DIPSETTING( 0x00, "5" ) | |
| 1892 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6") | |
| 1893 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) | |
| 1894 | PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) ) | |
| 1895 | PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) ) | |
| 1896 | // PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) /* duplicated setting */ | |
| 1897 | // PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) ) /* duplicated setting */ | |
| 1898 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) | |
| 1899 | PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) | |
| 1900 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 1901 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0xc0) | |
| 1902 | ||
| 1903 | PORT_START("DSW2") | |
| 1904 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x01) | |
| 1905 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") | |
| 1906 | PORT_DIPSETTING( 0x06, DEF_STR( Easy ) ) | |
| 1907 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) | |
| 1908 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 1909 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1910 | PORT_DIPNAME( 0x18, 0x10, "Game mode" ) PORT_DIPLOCATION("DSW2:4,5") | |
| 1911 | PORT_DIPSETTING( 0x18, "Demo Sounds Off" ) | |
| 1912 | PORT_DIPSETTING( 0x10, "Demo Sounds On" ) | |
| 1913 | PORT_DIPSETTING( 0x00, "Freeze" ) | |
| 1914 | PORT_DIPSETTING( 0x08, "Infinite Lives (Cheat)" ) | |
| 1915 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6") | |
| 1916 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 1917 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1918 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" ) | |
| 1919 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:8") | |
| 1920 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) | |
| 1921 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 1922 | ||
| 1923 | PORT_START("BONUS") /* fake port to handle bonus lives settings via multiple input ports */ | |
| 1924 | PORT_DIPNAME( 0xc1, 0xc1, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:1,DSW1:7,8") | |
| 1925 | PORT_DIPSETTING( 0xc1, "20k 60k 60k+" ) | |
| 1926 | PORT_DIPSETTING( 0x81, "40k 90k 90k+" ) | |
| 1927 | PORT_DIPSETTING( 0x41, "50k 120k 120k+" ) | |
| 1928 | PORT_DIPSETTING( 0xc0, "20k 60k" ) | |
| 1929 | PORT_DIPSETTING( 0x80, "40k 90k" ) | |
| 1930 | PORT_DIPSETTING( 0x40, "50k 120k" ) | |
| 1931 | // PORT_DIPSETTING( 0x01, DEF_STR( None ) ) /* duplicated setting */ | |
| 1932 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1933 | INPUT_PORTS_END | |
| 1934 | ||
| 1935 | ||
| 1401 | 1936 | static INPUT_PORTS_START( aso ) |
| 1402 | 1937 | PORT_START("IN0") |
| 1403 | 1938 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1404 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1405 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1939 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1940 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coinage" settings - code at 0x2e04 */ | |
| 1406 | 1941 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 1407 | 1942 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 1408 | 1943 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) |
| r3171 | r3172 | |
| 1410 | 1945 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1411 | 1946 | |
| 1412 | 1947 | PORT_START("IN1") |
| 1413 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1414 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1415 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1948 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1949 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1950 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1416 | 1951 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 1417 | 1952 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 1418 | 1953 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r3171 | r3172 | |
| 1420 | 1955 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1421 | 1956 | |
| 1422 | 1957 | PORT_START("IN2") |
| 1423 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1424 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1425 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1958 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1959 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1960 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1426 | 1961 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 1427 | 1962 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL |
| 1428 | 1963 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| r3171 | r3172 | |
| 1430 | 1965 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1431 | 1966 | |
| 1432 | 1967 | PORT_START("DSW1") |
| 1433 | PORT_DIPNAME( 0x01, 0x0 | |
| 1968 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW1:1") | |
| 1434 | 1969 | PORT_DIPSETTING( 0x01, DEF_STR( No ) ) |
| 1435 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 1436 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") | |
| 1437 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 1970 | PORT_DIPSETTING( 0x00, "3 Times" ) | |
| 1971 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") | |
| 1972 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) /* Single Controls */ | |
| 1438 | 1973 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) |
| 1439 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3") | |
| 1974 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3") | |
| 1440 | 1975 | PORT_DIPSETTING( 0x04, "3" ) |
| 1441 | 1976 | PORT_DIPSETTING( 0x00, "5" ) |
| 1442 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6") | |
| 1977 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6") | |
| 1443 | 1978 | PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) |
| 1444 | 1979 | PORT_DIPSETTING( 0x28, DEF_STR( 3C_1C ) ) |
| 1445 | 1980 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_1C ) ) |
| r3171 | r3172 | |
| 1448 | 1983 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) |
| 1449 | 1984 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_4C ) ) |
| 1450 | 1985 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) |
| 1451 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW1:7,8") | |
| 1986 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0xc0) | |
| 1987 | ||
| 1988 | PORT_START("DSW2") | |
| 1989 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x01) | |
| 1990 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") | |
| 1991 | PORT_DIPSETTING( 0x06, DEF_STR( Easy ) ) | |
| 1992 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) | |
| 1993 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 1994 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1995 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:4") | |
| 1996 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1997 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1998 | PORT_DIPNAME( 0x10, 0x10, "All Ships at Start (Cheat)") PORT_DIPLOCATION("DSW2:5") | |
| 1999 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2000 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2001 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6") | |
| 2002 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2003 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2004 | PORT_DIPNAME( 0xc0, 0xc0, "Start Area" ) PORT_DIPLOCATION("DSW2:7,8") | |
| 2005 | PORT_DIPSETTING( 0xc0, "1" ) | |
| 2006 | PORT_DIPSETTING( 0x80, "2" ) | |
| 2007 | PORT_DIPSETTING( 0x40, "3" ) | |
| 2008 | PORT_DIPSETTING( 0x00, "4" ) | |
| 2009 | ||
| 2010 | PORT_START("BONUS") /* fake port to handle bonus lives settings via multiple input ports */ | |
| 2011 | PORT_DIPNAME( 0xc1, 0xc1, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:1,DSW1:7,8") | |
| 2012 | PORT_DIPSETTING( 0xc1, "50k 100k 100k+" ) | |
| 2013 | PORT_DIPSETTING( 0x81, "60k 120k 120k+" ) | |
| 2014 | PORT_DIPSETTING( 0x41, "100k 200k 200k+" ) | |
| 1452 | 2015 | PORT_DIPSETTING( 0xc0, "50k 100k" ) |
| 1453 | 2016 | PORT_DIPSETTING( 0x80, "60k 120k" ) |
| 1454 | 2017 | PORT_DIPSETTING( 0x40, "100k 200k" ) |
| 2018 | // PORT_DIPSETTING( 0x01, DEF_STR( None ) ) /* duplicated setting */ | |
| 1455 | 2019 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 2020 | INPUT_PORTS_END | |
| 1456 | 2021 | |
| 2022 | ||
| 2023 | static INPUT_PORTS_START( alphamis ) | |
| 2024 | PORT_START("IN0") | |
| 2025 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 2026 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 2027 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x2e17 */ | |
| 2028 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 2029 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) | |
| 2030 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2031 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2032 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2033 | ||
| 2034 | PORT_START("IN1") | |
| 2035 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 2036 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 2037 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 2038 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 2039 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 2040 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 2041 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 2042 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2043 | ||
| 2044 | PORT_START("IN2") | |
| 2045 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 2046 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 2047 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 2048 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 2049 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL | |
| 2050 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 2051 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 2052 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2053 | ||
| 2054 | PORT_START("DSW1") | |
| 2055 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW1:1") | |
| 2056 | PORT_DIPSETTING( 0x01, DEF_STR( No ) ) | |
| 2057 | PORT_DIPSETTING( 0x00, "3 Times" ) | |
| 2058 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") | |
| 2059 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) /* Single Controls */ | |
| 2060 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) | |
| 2061 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3") | |
| 2062 | PORT_DIPSETTING( 0x04, "3" ) | |
| 2063 | PORT_DIPSETTING( 0x00, "5" ) | |
| 2064 | PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:4,5") | |
| 2065 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) | |
| 2066 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 2067 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 2068 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) | |
| 2069 | PORT_DIPNAME( 0x60, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:6,7") | |
| 2070 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) | |
| 2071 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 2072 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) | |
| 2073 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_6C ) ) | |
| 2074 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "DSW1:8" ) | |
| 2075 | ||
| 1457 | 2076 | PORT_START("DSW2") |
| 1458 | PORT_DIPNAME( 0x01, 0x01, "Bonus Occurrence" ) PORT_DIPLOCATION("DSW2:1") | |
| 1459 | PORT_DIPSETTING( 0x01, "1st & every 2nd" ) | |
| 1460 | PORT_DIPSETTING( 0x00, "1st & 2nd only" ) | |
| 1461 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") | |
| 2077 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x01) | |
| 2078 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") | |
| 1462 | 2079 | PORT_DIPSETTING( 0x06, DEF_STR( Easy ) ) |
| 1463 | 2080 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) |
| 1464 | 2081 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) |
| 1465 | 2082 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1466 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:4") | |
| 2083 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:4") | |
| 1467 | 2084 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1468 | 2085 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1469 | PORT_DIPNAME( 0x10, 0x10, " | |
| 2086 | PORT_DIPNAME( 0x10, 0x10, "All | |
| 1470 | 2087 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 1471 | 2088 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1472 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6") | |
| 2089 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6") | |
| 1473 | 2090 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1474 | 2091 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1475 | PORT_DIPNAME( 0xc0, 0xc0, "Start Area" ) PORT_DIPLOCATION("DSW2:7,8") | |
| 2092 | PORT_DIPNAME( 0xc0, 0xc0, "Start Area" ) PORT_DIPLOCATION("DSW2:7,8") | |
| 1476 | 2093 | PORT_DIPSETTING( 0xc0, "1" ) |
| 1477 | 2094 | PORT_DIPSETTING( 0x80, "2" ) |
| 1478 | 2095 | PORT_DIPSETTING( 0x40, "3" ) |
| 1479 | 2096 | PORT_DIPSETTING( 0x00, "4" ) |
| 2097 | ||
| 2098 | PORT_START("BONUS") /* fake port to handle bonus lives settings via multiple input ports */ | |
| 2099 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:1") | |
| 2100 | PORT_DIPSETTING( 0x01, "50k 100k 100k+" ) | |
| 2101 | PORT_DIPSETTING( 0x00, "50k 100k" ) | |
| 1480 | 2102 | INPUT_PORTS_END |
| 1481 | 2103 | |
| 1482 | 2104 | |
| r3171 | r3172 | |
| 1484 | 2106 | PORT_START("IN0") |
| 1485 | 2107 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1486 | 2108 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1487 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_ | |
| 2109 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1488 | 2110 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 1489 | 2111 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 1490 | 2112 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) |
| r3171 | r3172 | |
| 1492 | 2114 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1493 | 2115 | |
| 1494 | 2116 | PORT_START("IN1") |
| 1495 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1496 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1497 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 2117 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 2118 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 2119 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1498 | 2120 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 1499 | 2121 | PORT_BIT( 0xf0, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12) \ |
| 1500 | 2122 | |
| 1501 | 2123 | PORT_START("IN2") |
| 1502 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1503 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1504 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 2124 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 2125 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 2126 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1505 | 2127 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 1506 | 2128 | PORT_BIT( 0xf0, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12) |
| 1507 | 2129 | |
| r3171 | r3172 | |
| 1516 | 2138 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1517 | 2139 | |
| 1518 | 2140 | PORT_START("DSW1") |
| 1519 | PORT_DIPNAME( 0x01, 0x01, " | |
| 2141 | PORT_DIPNAME( 0x01, 0x01, "No | |
| 1520 | 2142 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1521 | 2143 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1522 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") | |
| 1523 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 2144 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") | |
| 2145 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) /* Single Controls */ | |
| 1524 | 2146 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) |
| 1525 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3") | |
| 2147 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3") | |
| 1526 | 2148 | PORT_DIPSETTING( 0x04, "3" ) |
| 1527 | 2149 | PORT_DIPSETTING( 0x00, "5" ) |
| 1528 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6") | |
| 1529 | /* 0x08 and 0x10: 1 Coin/1 Credit */ | |
| 2150 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6") | |
| 1530 | 2151 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) |
| 1531 | 2152 | PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) ) |
| 1532 | 2153 | PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) ) |
| 2154 | // PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) /* duplicated setting */ | |
| 2155 | // PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) ) /* duplicated setting */ | |
| 1533 | 2156 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) |
| 1534 | 2157 | PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) |
| 1535 | 2158 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 1536 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW1:7,8") | |
| 1537 | PORT_DIPSETTING( 0xc0, "20k 60k" ) | |
| 1538 | PORT_DIPSETTING( 0x80, "40k 90k" ) | |
| 1539 | PORT_DIPSETTING( 0x40, "50k 120k" ) | |
| 1540 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 2159 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0xc0) | |
| 1541 | 2160 | |
| 1542 | 2161 | PORT_START("DSW2") |
| 1543 | PORT_DIPNAME( 0x01, 0x01, "Bonus Occurrence" ) PORT_DIPLOCATION("DSW2:1") | |
| 1544 | PORT_DIPSETTING( 0x01, "1st & every 2nd" ) | |
| 1545 | PORT_DIPSETTING( 0x00, "1st & 2nd only" ) | |
| 1546 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") | |
| 2162 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x01) | |
| 2163 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") | |
| 1547 | 2164 | PORT_DIPSETTING( 0x06, DEF_STR( Easy ) ) |
| 1548 | 2165 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) |
| 1549 | 2166 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) |
| 1550 | 2167 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1551 | PORT_DIPNAME( 0x18, 0x10, "Game Mode" ) PORT_DIPLOCATION("DSW2:4,5") | |
| 2168 | PORT_DIPNAME( 0x18, 0x10, "Game Mode" ) PORT_DIPLOCATION("DSW2:4,5") | |
| 1552 | 2169 | PORT_DIPSETTING( 0x18, "Demo Sounds Off" ) |
| 1553 | 2170 | PORT_DIPSETTING( 0x10, "Demo Sounds On" ) |
| 1554 | 2171 | PORT_DIPSETTING( 0x00, "Freeze" ) |
| 1555 | 2172 | PORT_DIPSETTING( 0x08, "Infinite Lives (Cheat)") |
| 1556 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6") | |
| 2173 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6") | |
| 1557 | 2174 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1558 | 2175 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1559 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7") // unused in manual | |
| 1560 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1561 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1562 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:8") | |
| 2176 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" ) | |
| 2177 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:8") | |
| 1563 | 2178 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) |
| 1564 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 2179 | PORT_DIPSETTING( 0x00, "5 Times" ) | |
| 2180 | ||
| 2181 | PORT_START("BONUS") /* fake port to handle bonus lives settings via multiple input ports */ | |
| 2182 | PORT_DIPNAME( 0xc1, 0xc1, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:1,DSW1:7,8") | |
| 2183 | PORT_DIPSETTING( 0xc1, "20k 60k 60k+" ) | |
| 2184 | PORT_DIPSETTING( 0x81, "40k 90k 90k+" ) | |
| 2185 | PORT_DIPSETTING( 0x41, "50k 120k 120k+" ) | |
| 2186 | PORT_DIPSETTING( 0xc0, "20k 60k" ) | |
| 2187 | PORT_DIPSETTING( 0x80, "40k 90k" ) | |
| 2188 | PORT_DIPSETTING( 0x40, "50k 120k" ) | |
| 2189 | // PORT_DIPSETTING( 0x01, DEF_STR( None ) ) /* duplicated setting */ | |
| 2190 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1565 | 2191 | INPUT_PORTS_END |
| 1566 | 2192 | |
| 1567 | 2193 | |
| 1568 | 2194 | static INPUT_PORTS_START( athena ) |
| 1569 | 2195 | PORT_START("IN0") |
| 1570 | 2196 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) |
| 1571 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 2197 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x09d4 */ | |
| 1572 | 2198 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1573 | 2199 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1574 | 2200 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r3171 | r3172 | |
| 1577 | 2203 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 1578 | 2204 | |
| 1579 | 2205 | PORT_START("IN1") |
| 1580 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1581 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1582 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 2206 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 2207 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 2208 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1583 | 2209 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 1584 | 2210 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1585 | 2211 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| r3171 | r3172 | |
| 1587 | 2213 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1588 | 2214 | |
| 1589 | 2215 | PORT_START("IN2") |
| 1590 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 1591 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 1592 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 2216 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 2217 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 2218 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 1593 | 2219 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 1594 | 2220 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1595 | 2221 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| r3171 | r3172 | |
| 1600 | 2226 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1601 | 2227 | |
| 1602 | 2228 | PORT_START("DSW1") |
| 1603 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:1") /* Listed as "Unused" in the manual */ | |
| 1604 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1605 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1606 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") | |
| 1607 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 2229 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "DSW1:1" ) | |
| 2230 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") | |
| 2231 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) /* Single Controls */ | |
| 1608 | 2232 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) |
| 1609 | PORT_DIPNAME( 0x04, 0x04, "Bonus Occurrence" ) PORT_DIPLOCATION("DSW1:3") | |
| 1610 | PORT_DIPSETTING( 0x04, "1st & every 2nd" ) | |
| 1611 | PORT_DIPSETTING( 0x00, "1st & 2nd only" ) | |
| 1612 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4") | |
| 2233 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04) | |
| 2234 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4") | |
| 1613 | 2235 | PORT_DIPSETTING( 0x08, "3" ) |
| 1614 | 2236 | PORT_DIPSETTING( 0x00, "5" ) |
| 1615 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6") | |
| 2237 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6") | |
| 1616 | 2238 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) |
| 1617 | 2239 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) |
| 1618 | 2240 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) |
| 1619 | 2241 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) |
| 1620 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8") | |
| 2242 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8") | |
| 1621 | 2243 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) |
| 1622 | 2244 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) |
| 1623 | 2245 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 1624 | 2246 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 1625 | 2247 | |
| 1626 | 2248 | PORT_START("DSW2") |
| 1627 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2") | |
| 2249 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2") | |
| 1628 | 2250 | PORT_DIPSETTING( 0x03, DEF_STR( Easy ) ) |
| 1629 | 2251 | PORT_DIPSETTING( 0x02, DEF_STR( Normal ) ) |
| 1630 | 2252 | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) |
| 1631 | 2253 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1632 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:3") | |
| 2254 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:3") | |
| 1633 | 2255 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1634 | 2256 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1635 | PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("DSW2:4") | |
| 2257 | PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("DSW2:4") | |
| 1636 | 2258 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1637 | 2259 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1638 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:5,6") | |
| 2260 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30) | |
| 2261 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" ) | |
| 2262 | PORT_DIPNAME( 0x80, 0x80, "Energy" ) PORT_DIPLOCATION("DSW2:8") | |
| 2263 | PORT_DIPSETTING( 0x80, "12" ) | |
| 2264 | PORT_DIPSETTING( 0x00, "14" ) | |
| 2265 | ||
| 2266 | PORT_START("BONUS") /* fake port to handle bonus lives settings via multiple input ports */ | |
| 2267 | PORT_DIPNAME( 0x34, 0x34, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW1:3,DSW2:5,6") | |
| 2268 | PORT_DIPSETTING( 0x34, "50k 100k 100k+" ) | |
| 2269 | PORT_DIPSETTING( 0x24, "60k 120k 120k+" ) | |
| 2270 | PORT_DIPSETTING( 0x14, "100k 200k 200k+" ) | |
| 1639 | 2271 | PORT_DIPSETTING( 0x30, "50k 100k" ) |
| 1640 | PORT_DIPSETTING( 0x20, " | |
| 2272 | PORT_DIPSETTING( 0x20, "60k 120k" ) | |
| 1641 | 2273 | PORT_DIPSETTING( 0x10, "100k 200k" ) |
| 2274 | // PORT_DIPSETTING( 0x04, DEF_STR( None ) ) /* duplicated setting */ | |
| 1642 | 2275 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 1643 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7") /* Listed as "Unused" in the manual */ | |
| 1644 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 1645 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1646 | PORT_DIPNAME( 0x80, 0x80, "Energy" ) PORT_DIPLOCATION("DSW2:8") | |
| 1647 | PORT_DIPSETTING( 0x80, "12" ) | |
| 1648 | PORT_DIPSETTING( 0x00, "14" ) | |
| 1649 | 2276 | INPUT_PORTS_END |
| 1650 | 2277 | |
| 1651 | 2278 | |
| 1652 | 2279 | static INPUT_PORTS_START( fitegolf ) |
| 1653 | 2280 | PORT_START("IN0") |
| 1654 | 2281 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) |
| 1655 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1656 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ | |
| 1657 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) // same as the dip switch | |
| 2282 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x045b */ | |
| 2283 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ | |
| 2284 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch */ | |
| 1658 | 2285 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1659 | 2286 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1660 | 2287 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 1661 | 2288 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 1662 | 2289 | |
| 1663 | 2290 | PORT_START("IN1") |
| 1664 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1665 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1666 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 2291 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 2292 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 2293 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1667 | 2294 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 1668 | 2295 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 1669 | 2296 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| r3171 | r3172 | |
| 1671 | 2298 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1672 | 2299 | |
| 1673 | 2300 | PORT_START("IN2") |
| 1674 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1675 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1676 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 2301 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 2302 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 2303 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1677 | 2304 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 1678 | 2305 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_8WAY PORT_PLAYER(2) |
| 1679 | 2306 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_8WAY PORT_PLAYER(2) |
| r3171 | r3172 | |
| 1684 | 2311 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1685 | 2312 | |
| 1686 | 2313 | PORT_START("DSW1") |
| 1687 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Language ) ) PORT_DIPLOCATION("DSW1:1") /* Version */ | |
| 1688 | PORT_DIPSETTING( 0x01, DEF_STR( English ) ) /* Over Sea */ | |
| 1689 | PORT_DIPSETTING( 0x00, DEF_STR( Japanese ) ) /* Domestic */ | |
| 1690 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2") | |
| 2314 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Language ) ) PORT_DIPLOCATION("DSW1:1") /* Version */ | |
| 2315 | PORT_DIPSETTING( 0x01, DEF_STR( English ) ) /* Over Sea */ | |
| 2316 | PORT_DIPSETTING( 0x00, DEF_STR( Japanese ) ) /* Domestic */ | |
| 2317 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2") | |
| 1691 | 2318 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1692 | 2319 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1693 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:3") | |
| 1694 | PORT_DIPSETTING( 0x04, "Upright 2 Players" ) | |
| 2320 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:3") | |
| 2321 | PORT_DIPSETTING( 0x04, DEF_STR( Upright ) ) /* Dual Controls */ | |
| 1695 | 2322 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 1696 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:4,5") | |
| 2323 | PORT_DIPNAME( 0x08, 0x00, "Gameplay" ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) PORT_DIPLOCATION("DSW1:4") /* code at 0x011e */ | |
| 2324 | PORT_DIPSETTING( 0x00, "Basic Player" ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 2325 | PORT_DIPSETTING( 0x08, "Avid Golfer" ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 2326 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) PORT_DIPLOCATION("DSW1:4") | |
| 2327 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 2328 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 2329 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6") | |
| 1697 | 2330 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) |
| 1698 | 2331 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) |
| 1699 | 2332 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) |
| 1700 | 2333 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) |
| 1701 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1: | |
| 2334 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1: | |
| 1702 | 2335 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) |
| 1703 | 2336 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) |
| 1704 | 2337 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 1705 | 2338 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 1706 | 2339 | |
| 1707 | 2340 | PORT_START("DSW2") |
| 1708 | PORT_DIPNAME( 0x01, 0x01, "Shot Time" ) PORT_DIPLOCATION("DSW2:1") | |
| 2341 | PORT_DIPNAME( 0x01, 0x01, "Shot Time" ) PORT_DIPLOCATION("DSW2:1") | |
| 1709 | 2342 | PORT_DIPSETTING( 0x00, "Short (10 sec)" ) |
| 1710 | 2343 | PORT_DIPSETTING( 0x01, "Long (12 sec)" ) |
| 1711 | PORT_DIPNAME( 0x02, 0x02, "Bonus Holes" ) PORT_DIPLOCATION("DSW2:2") | |
| 1712 | PORT_DIPSETTING( 0x02, "5 (Par 1,Birdie 2,Eagle 3)" ) | |
| 1713 | PORT_DIPSETTING( 0x00, "3 (Par 0,Birdie 1,Eagle 2)" ) | |
| 1714 | PORT_DIPNAME( 0x0c, 0x0c, "Game Mode" ) PORT_DIPLOCATION("DSW2:3,4") | |
| 2344 | PORT_DIPNAME( 0x02, 0x02, "Bonus Holes" ) PORT_DIPLOCATION("DSW2:2") | |
| 2345 | PORT_DIPSETTING( 0x02, "More (Par 1,Birdie 2,Eagle 3)" ) | |
| 2346 | PORT_DIPSETTING( 0x00, "Less (Par 0,Birdie 1,Eagle 2)" ) | |
| 2347 | PORT_DIPNAME( 0x0c, 0x0c, "Game Mode" ) PORT_DIPLOCATION("DSW2:3,4") | |
| 1715 | 2348 | PORT_DIPSETTING( 0x04, "Demo Sounds Off" ) |
| 1716 | 2349 | PORT_DIPSETTING( 0x0c, "Demo Sounds On" ) |
| 1717 | 2350 | PORT_DIPSETTING( 0x00, "Freeze" ) |
| 1718 | PORT_DIPSETTING( 0x08, "Endless Game (Cheat)") | |
| 1719 | PORT_DIPNAME( 0x30, 0x30, "Play Holes" ) PORT_DIPLOCATION("DSW2:5,6") | |
| 2351 | PORT_DIPSETTING( 0x08, "Infinite Holes (Cheat)") | |
| 2352 | PORT_DIPNAME( 0x30, 0x30, "Play Holes" ) PORT_DIPLOCATION("DSW2:5,6") | |
| 1720 | 2353 | PORT_DIPSETTING( 0x30, "2" ) |
| 1721 | 2354 | PORT_DIPSETTING( 0x20, "3" ) |
| 1722 | 2355 | PORT_DIPSETTING( 0x10, "4" ) |
| 1723 | 2356 | PORT_DIPSETTING( 0x00, "5" ) |
| 1724 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7") | |
| 2357 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7") | |
| 1725 | 2358 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 1726 | 2359 | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) |
| 1727 | 2360 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) PORT_DIPLOCATION("DSW2:8") |
| r3171 | r3172 | |
| 1729 | 2362 | |
| 1730 | 2363 | |
| 1731 | 2364 | static INPUT_PORTS_START( countryc ) |
| 1732 | PORT_INCLUDE( fitegolf ) | |
| 2365 | PORT_START("IN0") | |
| 2366 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2367 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x0450 */ | |
| 2368 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ | |
| 2369 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch */ | |
| 2370 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 2371 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 2372 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) | |
| 2373 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1733 | 2374 | |
| 1734 | PORT_ | |
| 2375 | PORT_START | |
| 1735 | 2376 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(countryc_trackball_x, 0) |
| 1736 | 2377 | |
| 1737 | PORT_ | |
| 2378 | PORT_START | |
| 1738 | 2379 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(countryc_trackball_y, 0) |
| 1739 | 2380 | |
| 2381 | PORT_START("IN3") | |
| 2382 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2383 | ||
| 2384 | PORT_START("DSW1") | |
| 2385 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Language ) ) PORT_DIPLOCATION("DSW1:1") /* Version */ | |
| 2386 | PORT_DIPSETTING( 0x01, DEF_STR( English ) ) /* Over Sea */ | |
| 2387 | PORT_DIPSETTING( 0x00, DEF_STR( Japanese ) ) /* Domestic */ | |
| 2388 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2") | |
| 2389 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2390 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2391 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Controls ) ) PORT_DIPLOCATION("DSW1:3") | |
| 2392 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) | |
| 2393 | PORT_DIPSETTING( 0x04, DEF_STR( Dual ) ) | |
| 2394 | PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "DSW1:4" ) | |
| 2395 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6") | |
| 2396 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) | |
| 2397 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) | |
| 2398 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) | |
| 2399 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) | |
| 2400 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8") | |
| 2401 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) | |
| 2402 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) | |
| 2403 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 2404 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) | |
| 2405 | ||
| 2406 | PORT_START("DSW2") | |
| 2407 | PORT_DIPNAME( 0x01, 0x01, "Shot Time" ) PORT_DIPLOCATION("DSW2:1") | |
| 2408 | PORT_DIPSETTING( 0x00, "Short (15 sec)" ) | |
| 2409 | PORT_DIPSETTING( 0x01, "Long (20 sec)" ) | |
| 2410 | PORT_DIPNAME( 0x02, 0x02, "Bonus Holes" ) PORT_DIPLOCATION("DSW2:2") | |
| 2411 | PORT_DIPSETTING( 0x02, "More (Par 1,Birdie 2,Eagle 3)" ) | |
| 2412 | PORT_DIPSETTING( 0x00, "Less (Par 0,Birdie 1,Eagle 2)" ) | |
| 2413 | PORT_DIPNAME( 0x0c, 0x0c, "Game Mode" ) PORT_DIPLOCATION("DSW2:3,4") | |
| 2414 | PORT_DIPSETTING( 0x04, "Demo Sounds Off" ) | |
| 2415 | PORT_DIPSETTING( 0x0c, "Demo Sounds On" ) | |
| 2416 | PORT_DIPSETTING( 0x00, "Freeze" ) | |
| 2417 | PORT_DIPSETTING( 0x08, "Infinite Holes (Cheat)") | |
| 2418 | PORT_DIPNAME( 0x30, 0x30, "Play Holes" ) PORT_DIPLOCATION("DSW2:5,6") | |
| 2419 | PORT_DIPSETTING( 0x30, "2" ) | |
| 2420 | PORT_DIPSETTING( 0x20, "3" ) | |
| 2421 | PORT_DIPSETTING( 0x10, "4" ) | |
| 2422 | PORT_DIPSETTING( 0x00, "5" ) | |
| 2423 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7") | |
| 2424 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 2425 | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) | |
| 2426 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) PORT_DIPLOCATION("DSW2:8") | |
| 2427 | ||
| 1740 | 2428 | PORT_START("TRACKBALLX1") |
| 1741 | 2429 | PORT_BIT( 0x7f, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(1) |
| 1742 | 2430 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| r3171 | r3172 | |
| 1752 | 2440 | PORT_START("TRACKBALLY2") |
| 1753 | 2441 | PORT_BIT( 0x7f, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_PLAYER(2) |
| 1754 | 2442 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 1755 | ||
| 1756 | PORT_MODIFY("DSW1") | |
| 1757 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Controls ) ) PORT_DIPLOCATION("DSW1:3") | |
| 1758 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) | |
| 1759 | PORT_DIPSETTING( 0x04, DEF_STR( Dual ) ) | |
| 1760 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:6,7") | |
| 1761 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) | |
| 1762 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) | |
| 1763 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 1764 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) | |
| 1765 | 2443 | INPUT_PORTS_END |
| 1766 | 2444 | |
| 1767 | 2445 | |
| r3171 | r3172 | |
| 1849 | 2527 | INPUT_PORTS_END |
| 1850 | 2528 | |
| 1851 | 2529 | |
| 1852 | static INPUT_PORTS_START( ikari | |
| 2530 | static INPUT_PORTS_START( ikaria | |
| 1853 | 2531 | PORT_INCLUDE( ikari ) |
| 1854 | 2532 | |
| 2533 | // non-JAMMA system inputs | |
| 2534 | ||
| 1855 | 2535 | PORT_MODIFY("IN0") |
| 1856 | 2536 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1857 | 2537 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r3171 | r3172 | |
| 1861 | 2541 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) |
| 1862 | 2542 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1863 | 2543 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ |
| 2544 | INPUT_PORTS_END | |
| 1864 | 2545 | |
| 2546 | ||
| 2547 | static INPUT_PORTS_START( ikarinc ) | |
| 2548 | PORT_INCLUDE( ikaria ) | |
| 2549 | ||
| 2550 | // no continues in this version | |
| 2551 | ||
| 1865 | 2552 | PORT_MODIFY("DSW2") |
| 1866 | 2553 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8") |
| 1867 | 2554 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| r3171 | r3172 | |
| 1870 | 2557 | |
| 1871 | 2558 | |
| 1872 | 2559 | static INPUT_PORTS_START( ikarijpb ) |
| 1873 | PORT_INCLUDE( ikari | |
| 2560 | PORT_INCLUDE( ikarinc ) | |
| 1874 | 2561 | |
| 1875 | 2562 | // no rotary joystick in this version. Player fires in the direction he's facing. |
| 1876 | 2563 | // this is accomplished by hooking the joystick input to the rotary input, plus |
| r3171 | r3172 | |
| 1965 | 2652 | PORT_DIPSETTING( 0x20, "60k 120k" ) |
| 1966 | 2653 | PORT_DIPSETTING( 0x10, "100k 200k" ) |
| 1967 | 2654 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 1968 | PORT_DIPNAME( 0x40 | |
| 2655 | PORT_DIPNAME( 0x40 | |
| 1969 | 2656 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) |
| 1970 | 2657 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 1971 | 2658 | PORT_DIPNAME( 0x80, 0x80, "Credits Buy Lives During Play" ) PORT_DIPLOCATION("DSW2:8") |
| r3171 | r3172 | |
| 2079 | 2766 | PORT_INCLUDE( bermudat ) |
| 2080 | 2767 | |
| 2081 | 2768 | PORT_MODIFY("IN0") |
| 2082 | PORT_ | |
| 2769 | PORT_B | |
| 2083 | 2770 | |
| 2084 | 2771 | PORT_MODIFY("DSW1") |
| 2085 | 2772 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW1:1") |
| r3171 | r3172 | |
| 2118 | 2805 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) |
| 2119 | 2806 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2120 | 2807 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* tilt? causes reset */ |
| 2121 | PORT_ | |
| 2808 | PORT_B | |
| 2122 | 2809 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2123 | 2810 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2124 | 2811 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| r3171 | r3172 | |
| 2202 | 2889 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2203 | 2890 | INPUT_PORTS_END |
| 2204 | 2891 | |
| 2892 | static INPUT_PORTS_START( gwarb ) | |
| 2893 | PORT_INCLUDE( gwar ) | |
| 2205 | 2894 | |
| 2895 | // This version is modified to work either with or without a rotary joystick | |
| 2896 | // connected. If rotary is not connected, player fires in the direction he's facing. | |
| 2897 | ||
| 2898 | PORT_MODIFY("IN1") | |
| 2899 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwarb_rotary, (void*)0) | |
| 2900 | ||
| 2901 | PORT_START("JOYSTICK_MODE") | |
| 2902 | PORT_CONFNAME( 0x01, 0x00, "Joystick mode" ) | |
| 2903 | PORT_CONFSETTING( 0x00, "Normal Joystick" ) | |
| 2904 | PORT_CONFSETTING( 0x01, "Rotary Joystick" ) | |
| 2905 | INPUT_PORTS_END | |
| 2906 | ||
| 2206 | 2907 | static INPUT_PORTS_START( psychos ) |
| 2207 | 2908 | PORT_START("IN0") |
| 2208 | 2909 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) |
| r3171 | r3172 | |
| 2290 | 2991 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) |
| 2291 | 2992 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2292 | 2993 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* Reset */ |
| 2293 | PORT_ | |
| 2994 | PORT_B | |
| 2294 | 2995 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2295 | 2996 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2296 | 2997 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| r3171 | r3172 | |
| 2401 | 3102 | static INPUT_PORTS_START( tdfever ) |
| 2402 | 3103 | PORT_START("IN0") |
| 2403 | 3104 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2404 | PORT_ | |
| 3105 | PORT_B | |
| 2405 | 3106 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2406 | 3107 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) |
| 2407 | 3108 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r3171 | r3172 | |
| 2792 | 3493 | |
| 2793 | 3494 | /*********************************************************************/ |
| 2794 | 3495 | |
| 3496 | static GFXDECODE_START( marvins ) | |
| 3497 | GFXDECODE_ENTRY( "tx_tiles", 0, charlayout_4bpp, 0x180, 0x080>>4 ) | |
| 3498 | GFXDECODE_ENTRY( "fg_tiles", 0, charlayout_4bpp, 0x080, 0x080>>4 ) | |
| 3499 | GFXDECODE_ENTRY( "bg_tiles", 0, charlayout_4bpp, 0x100, 0x080>>4 ) | |
| 3500 | GFXDECODE_ENTRY( "sp16_tiles", 0, spritelayout_3bpp, 0x000, 0x080>>3 ) | |
| 3501 | /* colors 0x200-0x3ff contain shadows */ | |
| 3502 | GFXDECODE_END | |
| 3503 | ||
| 2795 | 3504 | static GFXDECODE_START( tnk3 ) |
| 2796 | GFXDECODE_ENTRY( " | |
| 3505 | GFXDECODE_ENTRY( "tx_tiles", 0, charlayout_4bpp, 0x180, 0x080>>4 ) | |
| 2797 | 3506 | GFXDECODE_ENTRY( "bg_tiles", 0, charlayout_4bpp, 0x080, 0x100>>4 ) |
| 2798 | 3507 | GFXDECODE_ENTRY( "sp16_tiles", 0, spritelayout_3bpp, 0x000, 0x080>>3 ) |
| 2799 | 3508 | /* colors 0x200-0x3ff contain shadows */ |
| 2800 | 3509 | GFXDECODE_END |
| 2801 | 3510 | |
| 2802 | 3511 | static GFXDECODE_START( ikari ) |
| 2803 | GFXDECODE_ENTRY( " | |
| 3512 | GFXDECODE_ENTRY( "tx_tiles", 0, charlayout_4bpp, 0x180, 0x080>>4 ) | |
| 2804 | 3513 | GFXDECODE_ENTRY( "bg_tiles", 0, tilelayout_4bpp, 0x100, 0x080>>4 ) |
| 2805 | 3514 | GFXDECODE_ENTRY( "sp16_tiles", 0, spritelayout_3bpp, 0x000, 0x080>>3 ) |
| 2806 | 3515 | GFXDECODE_ENTRY( "sp32_tiles", 0, bigspritelayout_3bpp, 0x080, 0x080>>3 ) |
| r3171 | r3172 | |
| 2808 | 3517 | GFXDECODE_END |
| 2809 | 3518 | |
| 2810 | 3519 | static GFXDECODE_START( gwar ) |
| 2811 | GFXDECODE_ENTRY( " | |
| 3520 | GFXDECODE_ENTRY( "tx_tiles", 0, charlayout_4bpp, 0x000, 0x100>>4 ) | |
| 2812 | 3521 | GFXDECODE_ENTRY( "bg_tiles", 0, tilelayout_4bpp, 0x300, 0x100>>4 ) |
| 2813 | 3522 | GFXDECODE_ENTRY( "sp16_tiles", 0, spritelayout_4bpp, 0x100, 0x080>>4 ) |
| 2814 | 3523 | GFXDECODE_ENTRY( "sp32_tiles", 0, bigspritelayout_4bpp, 0x200, 0x100>>4 ) |
| r3171 | r3172 | |
| 2816 | 3525 | GFXDECODE_END |
| 2817 | 3526 | |
| 2818 | 3527 | static GFXDECODE_START( tdfever ) |
| 2819 | GFXDECODE_ENTRY( " | |
| 3528 | GFXDECODE_ENTRY( "tx_tiles", 0, charlayout_4bpp, 0x000, 0x100>>4 ) | |
| 2820 | 3529 | GFXDECODE_ENTRY( "bg_tiles", 0, tilelayout_4bpp, 0x200, 0x100>>4 ) |
| 2821 | 3530 | GFXDECODE_ENTRY( "sp32_tiles", 0, bigspritelayout_4bpp, 0x100, 0x100>>4 ) |
| 2822 | 3531 | /* colors 0x300-0x3ff contain shadows */ |
| r3171 | r3172 | |
| 2824 | 3533 | |
| 2825 | 3534 | /**********************************************************************/ |
| 2826 | 3535 | |
| 3536 | static MACHINE_DRIVER_START( marvins ) | |
| 3537 | ||
| 3538 | /* basic machine hardware */ | |
| 3539 | MDRV_CPU_ADD("main", Z80, 3360000) /* 3.36 MHz */ | |
| 3540 | MDRV_CPU_PROGRAM_MAP(marvins_cpuA_map,0) | |
| 3541 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) | |
| 3542 | ||
| 3543 | MDRV_CPU_ADD("sub", Z80, 3360000) /* 3.36 MHz */ | |
| 3544 | MDRV_CPU_PROGRAM_MAP(marvins_cpuB_map,0) | |
| 3545 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) | |
| 3546 | ||
| 3547 | MDRV_CPU_ADD("audio", Z80, 4000000) /* verified on schematics */ | |
| 3548 | MDRV_CPU_PROGRAM_MAP(marvins_sound_map,0) | |
| 3549 | MDRV_CPU_IO_MAP(marvins_sound_portmap,0) | |
| 3550 | MDRV_CPU_PERIODIC_INT(nmi_line_assert, 244) // schematics show a separate 244Hz timer | |
| 3551 | ||
| 3552 | MDRV_INTERLEAVE(100) | |
| 3553 | ||
| 3554 | /* video hardware */ | |
| 3555 | MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS) | |
| 3556 | ||
| 3557 | MDRV_SCREEN_ADD("main", RASTER) | |
| 3558 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 3559 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 3560 | MDRV_SCREEN_SIZE(36*8, 28*8) | |
| 3561 | MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 1*8, 28*8-1) | |
| 3562 | ||
| 3563 | MDRV_GFXDECODE(marvins) | |
| 3564 | MDRV_PALETTE_LENGTH(0x400) | |
| 3565 | ||
| 3566 | MDRV_PALETTE_INIT(tnk3) | |
| 3567 | MDRV_VIDEO_START(marvins) | |
| 3568 | MDRV_VIDEO_UPDATE(marvins) | |
| 3569 | ||
| 3570 | /* sound hardware */ | |
| 3571 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 3572 | ||
| 3573 | MDRV_SOUND_ADD("ay1", AY8910, 2000000) /* verified on schematics */ | |
| 3574 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35) | |
| 3575 | ||
| 3576 | MDRV_SOUND_ADD("ay2", AY8910, 2000000) /* verified on schematics */ | |
| 3577 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35) | |
| 3578 | ||
| 3579 | MDRV_SOUND_ADD("wave", SNKWAVE, 8000000) /* verified on schematics */ | |
| 3580 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) | |
| 3581 | MACHINE_DRIVER_END | |
| 3582 | ||
| 3583 | ||
| 3584 | static MACHINE_DRIVER_START( vangrd2 ) | |
| 3585 | ||
| 3586 | MDRV_IMPORT_FROM(marvins) | |
| 3587 | ||
| 3588 | /* basic machine hardware */ | |
| 3589 | MDRV_CPU_MODIFY("main") | |
| 3590 | MDRV_CPU_PROGRAM_MAP(madcrash_cpuA_map,0) | |
| 3591 | ||
| 3592 | MDRV_CPU_MODIFY("sub") | |
| 3593 | MDRV_CPU_PROGRAM_MAP(madcrash_cpuB_map,0) | |
| 3594 | MACHINE_DRIVER_END | |
| 3595 | ||
| 3596 | ||
| 2827 | 3597 | static MACHINE_DRIVER_START( jcross ) |
| 2828 | 3598 | |
| 2829 | 3599 | /* basic machine hardware */ |
| 2830 | MDRV_CPU_ADD("main", Z80, 3 | |
| 3600 | MDRV_CPU_ADD("main", Z80, 3350000) /* NOT verified */ | |
| 2831 | 3601 | MDRV_CPU_PROGRAM_MAP(jcross_cpuA_map,0) |
| 2832 | 3602 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 2833 | 3603 | |
| 2834 | MDRV_CPU_ADD("sub", Z80, 3 | |
| 3604 | MDRV_CPU_ADD("sub", Z80, 3350000) /* NOT verified */ | |
| 2835 | 3605 | MDRV_CPU_PROGRAM_MAP(jcross_cpuB_map,0) |
| 2836 | 3606 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 2837 | 3607 | |
| r3171 | r3172 | |
| 2866 | 3636 | |
| 2867 | 3637 | MDRV_SOUND_ADD("ay2", AY8910, 2000000) /* NOT verified */ |
| 2868 | 3638 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35) |
| 2869 | ||
| 2870 | MDRV_SOUND_ADD("namco", NAMCO, 24000) | |
| 2871 | MDRV_SOUND_CONFIG(snkwave_interface) | |
| 2872 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08) | |
| 2873 | 3639 | MACHINE_DRIVER_END |
| 2874 | 3640 | |
| 2875 | 3641 | |
| r3171 | r3172 | |
| 2884 | 3650 | MDRV_CPU_MODIFY("sub") |
| 2885 | 3651 | MDRV_CPU_PROGRAM_MAP(sgladiat_cpuB_map,0) |
| 2886 | 3652 | |
| 2887 | MDRV_CPU_MODIFY("audio") | |
| 2888 | MDRV_CPU_PROGRAM_MAP(sgladiat_sound_map,0) | |
| 2889 | ||
| 2890 | 3653 | /* video hardware */ |
| 2891 | 3654 | /* visible area is correct. Debug info is shown in the black bars at the sides |
| 2892 | 3655 | of the screen when the Debug dip switch is on */ |
| 2893 | 3656 | |
| 2894 | 3657 | MDRV_VIDEO_START(sgladiat) |
| 3658 | MACHINE_DRIVER_END | |
| 2895 | 3659 | |
| 2896 | /* sound hardware */ | |
| 2897 | MDRV_SOUND_REMOVE("namco") | |
| 3660 | ||
| 3661 | static MACHINE_DRIVER_START( hal21 ) | |
| 3662 | ||
| 3663 | MDRV_IMPORT_FROM(jcross) | |
| 3664 | ||
| 3665 | /* basic machine hardware */ | |
| 3666 | MDRV_CPU_MODIFY("main") | |
| 3667 | MDRV_CPU_PROGRAM_MAP(hal21_cpuA_map,0) | |
| 3668 | ||
| 3669 | MDRV_CPU_MODIFY("sub") | |
| 3670 | MDRV_CPU_PROGRAM_MAP(hal21_cpuB_map,0) | |
| 3671 | ||
| 3672 | MDRV_CPU_MODIFY("audio") | |
| 3673 | MDRV_CPU_PROGRAM_MAP(hal21_sound_map,0) | |
| 3674 | MDRV_CPU_IO_MAP(hal21_sound_portmap,0) | |
| 3675 | MDRV_CPU_PERIODIC_INT(irq0_line_hold, 220) // music tempo, hand tuned | |
| 3676 | ||
| 3677 | /* video hardware */ | |
| 3678 | MDRV_VIDEO_START(hal21) | |
| 2898 | 3679 | MACHINE_DRIVER_END |
| 2899 | 3680 | |
| 2900 | 3681 | |
| r3171 | r3172 | |
| 3223 | 4004 | |
| 3224 | 4005 | /***********************************************************************/ |
| 3225 | 4006 | |
| 4007 | ROM_START( marvins ) | |
| 4008 | ROM_REGION( 0x10000, "main", 0 ) /* 64k for CPUA code */ | |
| 4009 | ROM_LOAD( "pa1", 0x0000, 0x2000, CRC(0008d791) SHA1(6ffb174b2d680314f74efeef83da9f3ee3e0c753) ) | |
| 4010 | ROM_LOAD( "pa2", 0x2000, 0x2000, CRC(9457003c) SHA1(05ecd5c638a12163e2a65bdfcc09875618f792e1) ) | |
| 4011 | ROM_LOAD( "pa3", 0x4000, 0x2000, CRC(54c33ecb) SHA1(cfbf9ffc125fbc51f2abef180f36781f9e748bbd) ) | |
| 4012 | ||
| 4013 | ROM_REGION( 0x10000, "sub", 0 ) /* 64k for CPUB code */ | |
| 4014 | ROM_LOAD( "pb1", 0x0000, 0x2000, CRC(3b6941a5) SHA1(9c29870196eaed87f34456fdb06bf7b69c8f489d) ) | |
| 4015 | ||
| 4016 | ROM_REGION( 0x10000, "audio", 0 ) /* 64k for sound code */ | |
| 4017 | ROM_LOAD( "m1", 0x0000, 0x2000, CRC(2314c696) SHA1(1b84a0c82a4dcff648752f53aa1f0abf5357c5d1) ) | |
| 4018 | ROM_LOAD( "m2", 0x2000, 0x2000, CRC(74ba5799) SHA1(c278b0e5c4134f6077d4ae7b51e3c5cba28af1a8) ) | |
| 4019 | ||
| 4020 | ROM_REGION( 0x2000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4021 | ROM_LOAD( "s1", 0x0000, 0x2000, CRC(327f70f3) SHA1(078dcc6b4697617d4d833ccd59c6a543b2a88d9e) ) | |
| 4022 | ||
| 4023 | ROM_REGION( 0x2000, "fg_tiles", ROMREGION_DISPOSE ) | |
| 4024 | ROM_LOAD( "b1", 0x0000, 0x2000, CRC(e528bc60) SHA1(3365ac7cbc57739054bc11e68831be87c0c1a97a) ) | |
| 4025 | ||
| 4026 | ROM_REGION( 0x2000, "bg_tiles", ROMREGION_DISPOSE ) | |
| 4027 | ROM_LOAD( "b2", 0x0000, 0x2000, CRC(e528bc60) SHA1(3365ac7cbc57739054bc11e68831be87c0c1a97a) ) | |
| 4028 | ||
| 4029 | ROM_REGION( 0x6000, "sp16_tiles", ROMREGION_DISPOSE ) | |
| 4030 | ROM_LOAD( "f1", 0x0000, 0x2000, CRC(0bd6b4e5) SHA1(c56747ff2135db734f1b5f6c2906de5ac8f53bbc) ) | |
| 4031 | ROM_LOAD( "f2", 0x2000, 0x2000, CRC(8fc2b081) SHA1(fb345965375cb62ec1b947d6c6d071380dc0f395) ) | |
| 4032 | ROM_LOAD( "f3", 0x4000, 0x2000, CRC(e55c9b83) SHA1(04b0d99955e4b11820015b7721ac6399a3d5a829) ) | |
| 4033 | ||
| 4034 | ROM_REGION( 0x0c00, "proms", 0 ) | |
| 4035 | ROM_LOAD( "marvmaze.j1", 0x000, 0x400, CRC(92f5b06d) SHA1(97979ffb6fb065d9c99da43173180fefb2de1886) ) | |
| 4036 | ROM_LOAD( "marvmaze.j2", 0x400, 0x400, CRC(d2b25665) SHA1(b913b8b9c5ee0a29b5a115b2432c5706979059cf) ) | |
| 4037 | ROM_LOAD( "marvmaze.j3", 0x800, 0x400, CRC(df9e6005) SHA1(8f633f664c3f8e4f6ca94bee74a68c8fda8873e3) ) | |
| 4038 | ROM_END | |
| 4039 | ||
| 4040 | /***********************************************************************/ | |
| 4041 | ||
| 4042 | ROM_START( madcrash ) | |
| 4043 | ROM_REGION( 0x10000, "main", 0 ) /* 64k for CPUA code */ | |
| 4044 | ROM_LOAD( "p8", 0x0000, 0x2000, CRC(ecb2fdc9) SHA1(7dd79fbbe286a9f18ed2cae45b1bfab765e549a1) ) | |
| 4045 | ROM_LOAD( "p9", 0x2000, 0x2000, CRC(0a87df26) SHA1(327710452bdc5dbb931abc853957225814f224c5) ) | |
| 4046 | ROM_LOAD( "p10", 0x4000, 0x2000, CRC(6eb8a87c) SHA1(375377df22b331175aaf1f9eb8d8ad83e8e146f6) ) | |
| 4047 | ||
| 4048 | ROM_REGION( 0x10000, "sub", 0 ) /* 64k for CPUB code */ | |
| 4049 | ROM_LOAD( "p4", 0x0000, 0x2000, CRC(5664d699) SHA1(5bfa57a0f8d718d522003da6513a70d7ca3a87a3) ) | |
| 4050 | ROM_LOAD( "p5", 0x2000, 0x2000, CRC(dea2865a) SHA1(0807281e35159ee29fbe2d1aa087b57804f1a14f) ) | |
| 4051 | ROM_LOAD( "p6", 0x4000, 0x2000, CRC(e25a9b9c) SHA1(26853611e3898907239e15f1a00f62290889f89b) ) | |
| 4052 | ROM_LOAD( "p7", 0x6000, 0x2000, CRC(55b14a36) SHA1(7d5566a6ba285af92ddf560efda60a79f1da84c2) ) | |
| 4053 | ROM_LOAD( "p3", 0x8000, 0x2000, CRC(e3c8c2cb) SHA1(b3e39eacd2609ff0fa0f511bff0fc83e6b3970d4) ) | |
| 4054 | ||
| 4055 | ROM_REGION( 0x10000, "audio", 0 ) /* 64k for sound code */ | |
| 4056 | ROM_LOAD( "p1", 0x0000, 0x2000, CRC(2dcd036d) SHA1(4da42ab1e502fff57f5d5787df406289538fa484) ) | |
| 4057 | ROM_LOAD( "p2", 0x2000, 0x2000, CRC(cc30ae8b) SHA1(ffedc747b9e0b616a163ff8bb1def318e522585b) ) | |
| 4058 | ||
| 4059 | ROM_REGION( 0x2000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4060 | ROM_LOAD( "p13", 0x0000, 0x2000, CRC(48c4ade0) SHA1(3628abb4f425b8c9d8659c8e4082735168b0f3e9) ) | |
| 4061 | ||
| 4062 | ROM_REGION( 0x2000, "fg_tiles", ROMREGION_DISPOSE ) | |
| 4063 | ROM_LOAD( "p11", 0x0000, 0x2000, CRC(67174956) SHA1(65a921176294212971c748932a9010f45e1fb499) ) | |
| 4064 | ||
| 4065 | ROM_REGION( 0x2000, "bg_tiles", ROMREGION_DISPOSE ) | |
| 4066 | ROM_LOAD( "p12", 0x0000, 0x2000, CRC(085094c1) SHA1(5c5599d1ed7f8a717ada54bbd28383a22e09a8fe) ) | |
| 4067 | ||
| 4068 | ROM_REGION( 0x6000, "sp16_tiles", ROMREGION_DISPOSE ) | |
| 4069 | ROM_LOAD( "p16", 0x0000, 0x2000, CRC(6153611a) SHA1(b352f92b233761122f74830e46913cc4df800259) ) | |
| 4070 | ROM_LOAD( "p15", 0x2000, 0x2000, CRC(a74149d4) SHA1(e8011a8d4d1a98a0ffe67fc28ea9fa192ca80321) ) | |
| 4071 | ROM_LOAD( "p14", 0x4000, 0x2000, CRC(07e807bc) SHA1(f651d3a5394ced8e0a1b2be3aa52b3e5a5d84c37) ) | |
| 4072 | ||
| 4073 | ROM_REGION( 0x0c00, "proms", 0 ) | |
| 4074 | ROM_LOAD( "m3-prom.j3", 0x000, 0x400, CRC(d19e8a91) SHA1(b21fbdb8ed8d0b27c3ec78cf2e115624f69c67e0) ) | |
| 4075 | ROM_LOAD( "m2-prom.j4", 0x400, 0x400, CRC(9fc325af) SHA1(a180662f168ba001376f25f5d9205cb119c1ffee) ) | |
| 4076 | ROM_LOAD( "m1-prom.j5", 0x800, 0x400, CRC(07678443) SHA1(267951886d8b031dd633dc4823d9bd862a585437) ) | |
| 4077 | ROM_END | |
| 4078 | ||
| 4079 | /***********************************************************************/ | |
| 4080 | ||
| 4081 | ROM_START( vangrd2 ) | |
| 4082 | ROM_REGION( 0x10000, "main", 0 ) | |
| 4083 | ROM_LOAD( "p1.9a", 0x0000, 0x2000, CRC(bc9eeca5) SHA1(5a737e0f0aa1a3a5296d1e1fec13b34aee970609) ) | |
| 4084 | ROM_LOAD( "p3.11a", 0x2000, 0x2000, CRC(3970f69d) SHA1(b0ef7494888804ab5b4002730fb0232a7fd6797b) ) | |
| 4085 | ROM_LOAD( "p2.12a", 0x4000, 0x2000, CRC(58b08b58) SHA1(eccc85191d678a0115a113002a43203afd857a5b) ) | |
| 4086 | ROM_LOAD( "p4.14a", 0x6000, 0x2000, CRC(a95f11ea) SHA1(8007efb4ad948c8768e474fc77134f3ce52da1d2) ) | |
| 4087 | ||
| 4088 | ROM_REGION( 0x10000, "sub", 0 ) | |
| 4089 | ROM_LOAD( "p5.4a", 0x0000, 0x2000, CRC(e4dfd0ba) SHA1(12d45ff147f3ea9c9e898c3831874cd7c1a071b7) ) | |
| 4090 | ROM_LOAD( "p6.6a", 0x2000, 0x2000, CRC(894ff00d) SHA1(1c66f327d8e94dc6ac386e11fcc5eb17c9081434) ) | |
| 4091 | ROM_LOAD( "p7.7a", 0x4000, 0x2000, CRC(40b4d069) SHA1(56c464bd055125ffc2da02d70137aa5efe5cd8f6) ) | |
| 4092 | ||
| 4093 | ROM_REGION( 0x10000, "audio", 0 ) /* 64k for sound code */ | |
| 4094 | ROM_LOAD( "p8.6a", 0x0000, 0x2000, CRC(a3daa438) SHA1(4e659ac7e3ebaf85bc3ce5c9946fcf0af23083b4) ) | |
| 4095 | ROM_LOAD( "p9.8a", 0x2000, 0x2000, CRC(9345101a) SHA1(b99ad1c2a79df50b0a60fdd43ca466f6cb38445b) ) | |
| 4096 | ||
| 4097 | ROM_REGION( 0x2000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4098 | ROM_LOAD( "p15.1e", 0x0000, 0x2000, CRC(85718a41) SHA1(4c9aa1f8b229410414cd67bac8cb10a14bea12f4) ) | |
| 4099 | ||
| 4100 | ROM_REGION( 0x2000, "fg_tiles", ROMREGION_DISPOSE ) | |
| 4101 | ROM_LOAD( "p13.1a", 0x0000, 0x2000, CRC(912f22c6) SHA1(5042edc80b58f77b3576b5e6eb8c6460c8a35494) ) | |
| 4102 | ||
| 4103 | ROM_REGION( 0x2000, "bg_tiles", ROMREGION_DISPOSE ) | |
| 4104 | ROM_LOAD( "p9", 0x0000, 0x2000, CRC(7aa0b684) SHA1(d52670ec50b1a07d6c2c537f67922063deacdeea) ) | |
| 4105 | ||
| 4106 | ROM_REGION( 0x6000, "sp16_tiles", ROMREGION_DISPOSE ) | |
| 4107 | ROM_LOAD( "p10.4kl", 0x0000, 0x2000, CRC(5bfc04c0) SHA1(4eb152fdf39cb0024f71d5bdf1bfc79c2b8c2329) ) | |
| 4108 | ROM_LOAD( "p11.3kl", 0x2000, 0x2000, CRC(620cd4ec) SHA1(a2fcc3d24d0d3c7cc601620ae7a709f46b613c0f) ) | |
| 4109 | ROM_LOAD( "p12.1kl", 0x4000, 0x2000, CRC(8658ea6c) SHA1(d5ea9be2c1776b11abc77c944a653eeb73b27fc8) ) | |
| 4110 | ||
| 4111 | ROM_REGION( 0x0c00, "proms", 0 ) | |
| 4112 | ROM_LOAD( "mb7054.3j", 0x000, 0x400, CRC(506f659a) SHA1(766f1a0dd462eba64546c514004e6542e200d7c3) ) | |
| 4113 | ROM_LOAD( "mb7054.4j", 0x400, 0x400, CRC(222133ce) SHA1(109a63c8c44608a8ad9183e7b5d269765cc5f067) ) | |
| 4114 | ROM_LOAD( "mb7054.5j", 0x800, 0x400, CRC(2e21a79b) SHA1(1956377c799e0bbd127bf4fae016adc148efe007) ) | |
| 4115 | ROM_END | |
| 4116 | ||
| 4117 | /***********************************************************************/ | |
| 4118 | ||
| 3226 | 4119 | ROM_START( jcross ) |
| 3227 | 4120 | ROM_REGION( 0x10000, "main", 0 ) |
| 3228 | 4121 | ROM_LOAD( "jcrossa0.10b", 0x0000, 0x2000, CRC(0e79bbcd) SHA1(7088a8effd30080529b797991e24e9807bf90475) ) |
| r3171 | r3172 | |
| 3241 | 4134 | ROM_LOAD( "jcrosss0.f1", 0x0000, 0x2000, CRC(9ae8ea93) SHA1(1d824302305a41bf5c354c36e2e11981d1aa5ea4) ) |
| 3242 | 4135 | ROM_LOAD( "jcrosss1.h2", 0x2000, 0x2000, CRC(83785601) SHA1(cd3d484ef5464090c4b543b1edbbedcc52b15071) ) |
| 3243 | 4136 | |
| 3244 | ROM_REGION( 0x4000, " | |
| 4137 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3245 | 4138 | ROM_LOAD( "jcrossb4.10a", 0x0000, 0x2000, CRC(08ad93fe) SHA1(04baf2d9735b0d794b114abeced5a6b899958ce7) ) |
| 3246 | 4139 | ROM_LOAD( "jcrosss.d2", 0x2000, 0x2000, CRC(3ebb5beb) SHA1(de0a1f0fdb5b08b76dab9fa64d9ae3047c4ff84b) ) |
| 3247 | 4140 | |
| r3171 | r3172 | |
| 3275 | 4168 | ROM_LOAD( "glad.007", 0x0000, 0x2000, CRC(c25b6731) SHA1(519c6844bfec958b9bb65f148b3527b41fe38b99) ) |
| 3276 | 4169 | ROM_LOAD( "glad.006", 0x2000, 0x2000, CRC(2024d716) SHA1(6ff069fc53524d13c386e8e714ba3056509adc4d) ) |
| 3277 | 4170 | |
| 3278 | ROM_REGION( 0x2000, " | |
| 4171 | ROM_REGION( 0x2000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3279 | 4172 | ROM_LOAD( "glad.011", 0x0000, 0x2000, CRC(305bb294) SHA1(e148571a581b12ff9502a65ec428e4d19bc757cb) ) |
| 3280 | 4173 | |
| 3281 | 4174 | ROM_REGION( 0x2000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3286 | 4179 | ROM_LOAD( "glad.009", 0x2000, 0x2000, CRC(912a20e0) SHA1(9621b955bc00b7c52ed8363bb441b568efb55863) ) |
| 3287 | 4180 | ROM_LOAD( "glad.010", 0x4000, 0x2000, CRC(8b1db3a5) SHA1(5ca403d40071ab13deb7fdb04cb0e055e6b30b05) ) |
| 3288 | 4181 | |
| 3289 | ROM_REGION( 0xc00, "proms", 0 ) | |
| 4182 | ROM_REGION( 0x0c00, "proms", 0 ) | |
| 3290 | 4183 | ROM_LOAD( "82s137.001", 0x000, 0x400, CRC(d9184823) SHA1(455c6a437d54c29673dddb8248ca78d000c7f354) ) |
| 3291 | 4184 | ROM_LOAD( "82s137.002", 0x400, 0x400, CRC(1a6b0953) SHA1(552ac2897abe507f2fd9ca11c8128a0314af215c) ) |
| 3292 | 4185 | ROM_LOAD( "82s137.003", 0x800, 0x400, CRC(c0e70308) SHA1(d7dbc500bc9991c2d1b95850f3723a2a224fbfbb) ) |
| r3171 | r3172 | |
| 3294 | 4187 | |
| 3295 | 4188 | /***********************************************************************/ |
| 3296 | 4189 | |
| 4190 | ROM_START( hal21 ) | |
| 4191 | ROM_REGION( 0x10000, "main", 0 ) | |
| 4192 | ROM_LOAD( "hal21p1.bin", 0x0000, 0x2000, CRC(9d193830) SHA1(8e4e9c8bc774d7c7c0b68a5fa5cabdc6b5cfa41b) ) | |
| 4193 | ROM_LOAD( "hal21p2.bin", 0x2000, 0x2000, CRC(c1f00350) SHA1(8709455a980931565ccca60162a04c6c3133099b) ) | |
| 4194 | ROM_LOAD( "hal21p3.bin", 0x4000, 0x2000, CRC(881d22a6) SHA1(4b2a65dc18620f7f77532f791212fccfe1f0b245) ) | |
| 4195 | ROM_LOAD( "hal21p4.bin", 0x6000, 0x2000, CRC(ce692534) SHA1(e1d8e6948578ec9d0b6dc2aff17ad23b8ce46d6a) ) | |
| 4196 | ||
| 4197 | ROM_REGION( 0x10000, "sub", 0 ) | |
| 4198 | ROM_LOAD( "hal21p5.bin", 0x0000, 0x2000, CRC(3ce0684a) SHA1(5e76770a3252d5565a8f11a79ac3a9a6c31a43e2) ) | |
| 4199 | ROM_LOAD( "hal21p6.bin", 0x2000, 0x2000, CRC(878ef798) SHA1(0aae152947c9c6733b77dd1ac14f2f6d6bfabeaa) ) | |
| 4200 | ROM_LOAD( "hal21p7.bin", 0x4000, 0x2000, CRC(72ebbe95) SHA1(b1f7dc535e7670647500391d21dfa971d5e342a2) ) | |
| 4201 | ROM_LOAD( "hal21p8.bin", 0x6000, 0x2000, CRC(17e22ad3) SHA1(0e10a3c0f2e2ec284f4e0f1055397a8ccd1ff0f7) ) | |
| 4202 | ROM_LOAD( "hal21p9.bin", 0x8000, 0x2000, CRC(b146f891) SHA1(0b2db3e14b0401a7914002c6f7c26933a1cba162) ) | |
| 4203 | ||
| 4204 | ROM_REGION( 0x10000, "audio", 0 ) | |
| 4205 | ROM_LOAD( "hal21p10.bin", 0x0000, 0x4000, CRC(916f7ba0) SHA1(7b8bcd59d768c4cd226de96895d3b9755bb3ba79) ) | |
| 4206 | ||
| 4207 | ROM_REGION( 0x2000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4208 | ROM_LOAD( "hal21p12.bin", 0x0000, 0x2000, CRC(9839a7cd) SHA1(d3f9d964263a64aa3648faf5eb2e4fa532ae7852) ) | |
| 4209 | ||
| 4210 | ROM_REGION( 0x4000, "bg_tiles", ROMREGION_DISPOSE ) | |
| 4211 | ROM_LOAD( "hal21p11.bin", 0x0000, 0x4000, CRC(24abc57e) SHA1(1d7557a62adc059fb3fe20a09be18c2f40441581) ) | |
| 4212 | ||
| 4213 | ROM_REGION( 0xc000, "sp16_tiles", ROMREGION_DISPOSE ) | |
| 4214 | ROM_LOAD( "hal21p13.bin", 0x00000, 0x4000, CRC(052b4f4f) SHA1(032eb5771d33defce86e222f3e7aa22bc37db6db) ) | |
| 4215 | ROM_LOAD( "hal21p14.bin", 0x04000, 0x4000, CRC(da0cb670) SHA1(1083bdd3488dfaa5094a2ef52cfc4206f35c9612) ) | |
| 4216 | ROM_LOAD( "hal21p15.bin", 0x08000, 0x4000, CRC(5c5ea945) SHA1(f9ce206cab4fad1f6478d731d4b096ec33e7b99f) ) | |
| 4217 | ||
| 4218 | ROM_REGION( 0x0c00, "proms", 0 ) | |
| 4219 | ROM_LOAD( "hal21_3.prm", 0x000, 0x400, CRC(605afff8) SHA1(94e80ebd574b1580dac4a2aebd57e3e767890c0d) ) | |
| 4220 | ROM_LOAD( "hal21_2.prm", 0x400, 0x400, CRC(c5d84225) SHA1(cc2cd32f81ed7c1bcdd68e91d00f8081cb706ce7) ) | |
| 4221 | ROM_LOAD( "hal21_1.prm", 0x800, 0x400, CRC(195768fc) SHA1(c88bc9552d57d52fb4b030d118f48fedccf563f4) ) | |
| 4222 | ROM_END | |
| 4223 | ||
| 4224 | ROM_START( hal21j ) | |
| 4225 | ROM_REGION( 0x10000, "main", 0 ) | |
| 4226 | ROM_LOAD( "hal21p1.bin", 0x0000, 0x2000, CRC(9d193830) SHA1(8e4e9c8bc774d7c7c0b68a5fa5cabdc6b5cfa41b) ) | |
| 4227 | ROM_LOAD( "hal21p2.bin", 0x2000, 0x2000, CRC(c1f00350) SHA1(8709455a980931565ccca60162a04c6c3133099b) ) | |
| 4228 | ROM_LOAD( "hal21p3.bin", 0x4000, 0x2000, CRC(881d22a6) SHA1(4b2a65dc18620f7f77532f791212fccfe1f0b245) ) | |
| 4229 | ROM_LOAD( "hal21p4.bin", 0x6000, 0x2000, CRC(ce692534) SHA1(e1d8e6948578ec9d0b6dc2aff17ad23b8ce46d6a) ) | |
| 4230 | ||
| 4231 | ROM_REGION( 0x10000, "sub", 0 ) | |
| 4232 | ROM_LOAD( "hal21p5.bin", 0x0000, 0x2000, CRC(3ce0684a) SHA1(5e76770a3252d5565a8f11a79ac3a9a6c31a43e2) ) | |
| 4233 | ROM_LOAD( "hal21p6.bin", 0x2000, 0x2000, CRC(878ef798) SHA1(0aae152947c9c6733b77dd1ac14f2f6d6bfabeaa) ) | |
| 4234 | ROM_LOAD( "hal21p7.bin", 0x4000, 0x2000, CRC(72ebbe95) SHA1(b1f7dc535e7670647500391d21dfa971d5e342a2) ) | |
| 4235 | ROM_LOAD( "hal21p8.bin", 0x6000, 0x2000, CRC(17e22ad3) SHA1(0e10a3c0f2e2ec284f4e0f1055397a8ccd1ff0f7) ) | |
| 4236 | ROM_LOAD( "hal21p9.bin", 0x8000, 0x2000, CRC(b146f891) SHA1(0b2db3e14b0401a7914002c6f7c26933a1cba162) ) | |
| 4237 | ||
| 4238 | ROM_REGION( 0x10000, "audio", 0 ) | |
| 4239 | ROM_LOAD( "hal21-10.bin", 0x0000, 0x4000, CRC(a182b3f0) SHA1(b76eff97a58a96467e9f3a74125a0a770e7678f8) ) | |
| 4240 | ||
| 4241 | ROM_REGION( 0x2000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4242 | ROM_LOAD( "hal21p12.bin", 0x0000, 0x2000, CRC(9839a7cd) SHA1(d3f9d964263a64aa3648faf5eb2e4fa532ae7852) ) | |
| 4243 | ||
| 4244 | ROM_REGION( 0x4000, "bg_tiles", ROMREGION_DISPOSE ) | |
| 4245 | ROM_LOAD( "hal21p11.bin", 0x0000, 0x4000, CRC(24abc57e) SHA1(1d7557a62adc059fb3fe20a09be18c2f40441581) ) | |
| 4246 | ||
| 4247 | ROM_REGION( 0xc000, "sp16_tiles", ROMREGION_DISPOSE ) | |
| 4248 | ROM_LOAD( "hal21p13.bin", 0x00000, 0x4000, CRC(052b4f4f) SHA1(032eb5771d33defce86e222f3e7aa22bc37db6db) ) | |
| 4249 | ROM_LOAD( "hal21p14.bin", 0x04000, 0x4000, CRC(da0cb670) SHA1(1083bdd3488dfaa5094a2ef52cfc4206f35c9612) ) | |
| 4250 | ROM_LOAD( "hal21p15.bin", 0x08000, 0x4000, CRC(5c5ea945) SHA1(f9ce206cab4fad1f6478d731d4b096ec33e7b99f) ) | |
| 4251 | ||
| 4252 | ROM_REGION( 0x0c00, "proms", 0 ) | |
| 4253 | ROM_LOAD( "hal21_3.prm", 0x000, 0x400, CRC(605afff8) SHA1(94e80ebd574b1580dac4a2aebd57e3e767890c0d) ) | |
| 4254 | ROM_LOAD( "hal21_2.prm", 0x400, 0x400, CRC(c5d84225) SHA1(cc2cd32f81ed7c1bcdd68e91d00f8081cb706ce7) ) | |
| 4255 | ROM_LOAD( "hal21_1.prm", 0x800, 0x400, CRC(195768fc) SHA1(c88bc9552d57d52fb4b030d118f48fedccf563f4) ) | |
| 4256 | ROM_END | |
| 4257 | ||
| 4258 | /***********************************************************************/ | |
| 4259 | ||
| 3297 | 4260 | ROM_START( aso ) |
| 3298 | 4261 | ROM_REGION( 0x10000, "main", 0 ) |
| 3299 | ROM_LOAD( "p1.bin", 0x0000, 0x8000, CRC(3fc9d5e4) SHA1(1318904d3d896affd5affd8e475ac9ee6929b955) ) | |
| 3300 | ROM_LOAD( "p3.bin", 0x8000, 0x4000, CRC(39a666d2) SHA1(b5426520eb600d44bc5566d742d7b88194076494) ) | |
| 4262 | ROM_LOAD( "aso_p1.d8", 0x0000, 0x4000, CRC(84981f3c) SHA1(5b6af7cf47f5f664df7ddc3615b4da0dea257a05) ) | |
| 4263 | ROM_LOAD( "aso_p2.d7", 0x4000, 0x4000, CRC(cfe912a6) SHA1(60138a7dcff8a65a33209619fcb58be313a77511) ) | |
| 4264 | ROM_LOAD( "aso_p3.d5", 0x8000, 0x4000, CRC(39a666d2) SHA1(b5426520eb600d44bc5566d742d7b88194076494) ) | |
| 3301 | 4265 | |
| 3302 | 4266 | ROM_REGION( 0x10000, "sub", 0 ) |
| 3303 | ROM_LOAD( "p4.bin", 0x0000, 0x8000, CRC(2429792b) SHA1(674e81880f359f7e8d34d0ad9074267360afadbf) ) | |
| 3304 | ROM_LOAD( "p6.bin", 0x8000, 0x4000, CRC(c0bfdf1f) SHA1(65b15ce9c2e78df79cb603c58639421d29701633) ) | |
| 4267 | ROM_LOAD( "aso_p4.d3", 0x0000, 0x4000, CRC(a4122355) SHA1(bca2b7f5abec502bde12ce591ee7af1329ce8ce5) ) | |
| 4268 | ROM_LOAD( "p5.d2", 0x4000, 0x4000, CRC(9879e506) SHA1(0bce5fcb9d05ce77cd8e9ad1cac04ef617928db0) ) | |
| 4269 | ROM_LOAD( "p6.d1", 0x8000, 0x4000, CRC(c0bfdf1f) SHA1(65b15ce9c2e78df79cb603c58639421d29701633) ) | |
| 3305 | 4270 | |
| 3306 | 4271 | ROM_REGION( 0x10000, "audio", 0 ) |
| 3307 | ROM_LOAD( "p7.bin", 0x0000, 0x8000, CRC(49258162) SHA1(c265b79d012be1e065389f910f7b4ce61f5b27ce) ) | |
| 3308 | ROM_LOAD( "p9.bin", 0x8000, 0x4000, CRC(aef5a4f4) SHA1(e908e79e27ff892fe75d1ba5cb0bc9dc6b7b4268) ) | |
| 4272 | ROM_LOAD( "p7.f4", 0x0000, 0x4000, CRC(dbc19736) SHA1(fe365d70ead8243374979d2162c395fed9870405) ) | |
| 4273 | ROM_LOAD( "p8.f3", 0x4000, 0x4000, CRC(537726a9) SHA1(ddf66946be71d2e6ab2cc53150e3b36d45dde2eb) ) | |
| 4274 | ROM_LOAD( "p9.f2", 0x8000, 0x4000, CRC(aef5a4f4) SHA1(e908e79e27ff892fe75d1ba5cb0bc9dc6b7b4268) ) | |
| 3309 | 4275 | |
| 3310 | ROM_REGION( 0x2000, "fg_tiles", ROMREGION_DISPOSE ) | |
| 3311 | ROM_LOAD( "p14.bin", 0x0000, 0x2000, CRC(8baa2253) SHA1(e6e4a5aa005e89744c4e2a19a080cf322edc6b52) ) | |
| 4276 | ROM_REGION( 0x2000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4277 | ROM_LOAD( "aso_p14.h1", 0x0000, 0x2000, CRC(8baa2253) SHA1(e6e4a5aa005e89744c4e2a19a080cf322edc6b52) ) | |
| 3312 | 4278 | |
| 3313 | 4279 | ROM_REGION( 0x8000, "bg_tiles", ROMREGION_DISPOSE ) |
| 3314 | ROM_LOAD( "p10. | |
| 4280 | ROM_LOAD( "p10.h14", 0x0000, 0x8000, CRC(00dff996) SHA1(4f6ce4c0f2da0d2a711bcbf9aa998b4e31d0d9bf) ) | |
| 3315 | 4281 | |
| 3316 | 4282 | ROM_REGION( 0x18000, "sp16_tiles", ROMREGION_DISPOSE ) |
| 3317 | ROM_LOAD( "p11. | |
| 4283 | ROM_LOAD( "p11.h11", 0x04000, 0x4000, CRC(7feac86c) SHA1(13b81f006ec587583416c1e7432da4c3f0375924) ) | |
| 3318 | 4284 | ROM_CONTINUE( 0x00000, 0x4000) |
| 3319 | ROM_LOAD( "p12. | |
| 4285 | ROM_LOAD( "p12.h9 | |
| 3320 | 4286 | ROM_CONTINUE( 0x08000, 0x4000) |
| 3321 | ROM_LOAD( "p13. | |
| 4287 | ROM_LOAD( "p13.h8 | |
| 3322 | 4288 | ROM_CONTINUE( 0x10000, 0x4000) |
| 3323 | 4289 | |
| 3324 | 4290 | ROM_REGION( 0x0c00, "proms", 0 ) |
| r3171 | r3172 | |
| 3339 | 4305 | ROM_LOAD( "p3.rom", 0x8000, 0x4000, CRC(b970d642) SHA1(d3a8045f05f001e5e2fae8ef7900cf87ab17fc74) ) |
| 3340 | 4306 | |
| 3341 | 4307 | ROM_REGION( 0x10000, "sub", 0 ) |
| 3342 | ROM_LOAD( "p4.rom", 0x0000, 0x4000, CRC(91a89d3c) SHA1(46ef8718c81aac2f09dd1884538750edf9662760) ) | |
| 3343 | ROM_LOAD( "p5.rom", 0x4000, 0x4000, CRC(9879e506) SHA1(0bce5fcb9d05ce77cd8e9ad1cac04ef617928db0) ) | |
| 3344 | ROM_LOAD( "p6.bin", 0x8000, 0x4000, CRC(c0bfdf1f) SHA1(65b15ce9c2e78df79cb603c58639421d29701633) ) | |
| 4308 | ROM_LOAD( "p4.rom", 0x0000, 0x4000, CRC(91a89d3c) SHA1(46ef8718c81aac2f09dd1884538750edf9662760) ) | |
| 4309 | ROM_LOAD( "p5.d2", 0x4000, 0x4000, CRC(9879e506) SHA1(0bce5fcb9d05ce77cd8e9ad1cac04ef617928db0) ) | |
| 4310 | ROM_LOAD( "p6.d1", 0x8000, 0x4000, CRC(c0bfdf1f) SHA1(65b15ce9c2e78df79cb603c58639421d29701633) ) | |
| 3345 | 4311 | |
| 3346 | 4312 | ROM_REGION( 0x10000, "audio", 0 ) |
| 3347 | ROM_LOAD( "p7.rom", 0x0000, 0x4000, CRC(dbc19736) SHA1(fe365d70ead8243374979d2162c395fed9870405) ) | |
| 3348 | ROM_LOAD( "p8.rom", 0x4000, 0x4000, CRC(537726a9) SHA1(ddf66946be71d2e6ab2cc53150e3b36d45dde2eb) ) | |
| 3349 | ROM_LOAD( "p9.bin", 0x8000, 0x4000, CRC(aef5a4f4) SHA1(e908e79e27ff892fe75d1ba5cb0bc9dc6b7b4268) ) | |
| 4313 | ROM_LOAD( "p7.f4", 0x0000, 0x4000, CRC(dbc19736) SHA1(fe365d70ead8243374979d2162c395fed9870405) ) | |
| 4314 | ROM_LOAD( "p8.f3", 0x4000, 0x4000, CRC(537726a9) SHA1(ddf66946be71d2e6ab2cc53150e3b36d45dde2eb) ) | |
| 4315 | ROM_LOAD( "p9.f2", 0x8000, 0x4000, CRC(aef5a4f4) SHA1(e908e79e27ff892fe75d1ba5cb0bc9dc6b7b4268) ) | |
| 3350 | 4316 | |
| 3351 | ROM_REGION( 0x2000, " | |
| 4317 | ROM_REGION( 0x2000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3352 | 4318 | ROM_LOAD( "p14.rom", 0x0000, 0x2000, CRC(acbe29b2) SHA1(e304c6d30888fa7549d25e6329ba94d5088bd8b7) ) |
| 3353 | 4319 | |
| 3354 | 4320 | ROM_REGION( 0x8000, "bg_tiles", ROMREGION_DISPOSE ) |
| 3355 | ROM_LOAD( "p10. | |
| 4321 | ROM_LOAD( "p10.h14", 0x0000, 0x8000, CRC(00dff996) SHA1(4f6ce4c0f2da0d2a711bcbf9aa998b4e31d0d9bf) ) | |
| 3356 | 4322 | |
| 3357 | 4323 | ROM_REGION( 0x18000, "sp16_tiles", ROMREGION_DISPOSE ) |
| 3358 | ROM_LOAD( "p11. | |
| 4324 | ROM_LOAD( "p11.h11", 0x04000, 0x4000, CRC(7feac86c) SHA1(13b81f006ec587583416c1e7432da4c3f0375924) ) | |
| 3359 | 4325 | ROM_CONTINUE( 0x00000, 0x4000) |
| 3360 | ROM_LOAD( "p12. | |
| 4326 | ROM_LOAD( "p12.h9 | |
| 3361 | 4327 | ROM_CONTINUE( 0x08000, 0x4000) |
| 3362 | ROM_LOAD( "p13. | |
| 4328 | ROM_LOAD( "p13.h8 | |
| 3363 | 4329 | ROM_CONTINUE( 0x10000, 0x4000) |
| 3364 | 4330 | |
| 3365 | 4331 | ROM_REGION( 0x0c00, "proms", 0 ) |
| r3171 | r3172 | |
| 3380 | 4346 | ROM_LOAD( "p3.d6", 0x8000, 0x4000, CRC(4d8db650) SHA1(184141847d38077737ee7140861d94832018e2e2) ) |
| 3381 | 4347 | |
| 3382 | 4348 | ROM_REGION( 0x10000, "sub", 0 ) |
| 3383 | ROM_LOAD( "p4.d3", 0x0000, 0x4000, CRC(47baf1db) SHA1(3947a679745811e5499d690f2b73b4f28b1d47f9) ) | |
| 3384 | ROM_LOAD( "p5.rom", 0x4000, 0x4000, CRC(9879e506) SHA1(0bce5fcb9d05ce77cd8e9ad1cac04ef617928db0) ) | |
| 3385 | ROM_LOAD( "p6.bin", 0x8000, 0x4000, CRC(c0bfdf1f) SHA1(65b15ce9c2e78df79cb603c58639421d29701633) ) | |
| 4349 | ROM_LOAD( "p4.d3", 0x0000, 0x4000, CRC(47baf1db) SHA1(3947a679745811e5499d690f2b73b4f28b1d47f9) ) | |
| 4350 | ROM_LOAD( "p5.d2", 0x4000, 0x4000, CRC(9879e506) SHA1(0bce5fcb9d05ce77cd8e9ad1cac04ef617928db0) ) | |
| 4351 | ROM_LOAD( "p6.d1", 0x8000, 0x4000, CRC(c0bfdf1f) SHA1(65b15ce9c2e78df79cb603c58639421d29701633) ) | |
| 3386 | 4352 | |
| 3387 | 4353 | ROM_REGION( 0x10000, "audio", 0 ) |
| 3388 | ROM_LOAD( "p7.rom", 0x0000, 0x4000, CRC(dbc19736) SHA1(fe365d70ead8243374979d2162c395fed9870405) ) | |
| 3389 | ROM_LOAD( "p8.rom", 0x4000, 0x4000, CRC(537726a9) SHA1(ddf66946be71d2e6ab2cc53150e3b36d45dde2eb) ) | |
| 3390 | ROM_LOAD( "p9.bin", 0x8000, 0x4000, CRC(aef5a4f4) SHA1(e908e79e27ff892fe75d1ba5cb0bc9dc6b7b4268) ) | |
| 4354 | ROM_LOAD( "p7.f4", 0x0000, 0x4000, CRC(dbc19736) SHA1(fe365d70ead8243374979d2162c395fed9870405) ) | |
| 4355 | ROM_LOAD( "p8.f3", 0x4000, 0x4000, CRC(537726a9) SHA1(ddf66946be71d2e6ab2cc53150e3b36d45dde2eb) ) | |
| 4356 | ROM_LOAD( "p9.f2", 0x8000, 0x4000, CRC(aef5a4f4) SHA1(e908e79e27ff892fe75d1ba5cb0bc9dc6b7b4268) ) | |
| 3391 | 4357 | |
| 3392 | ROM_REGION( 0x2000, " | |
| 4358 | ROM_REGION( 0x2000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3393 | 4359 | ROM_LOAD( "p14.h1", 0x0000, 0x2000, CRC(e599bd30) SHA1(bf70aae9a15d548bb532ca1fc8d7220dfa150d6e) ) |
| 3394 | 4360 | |
| 3395 | 4361 | ROM_REGION( 0x8000, "bg_tiles", ROMREGION_DISPOSE ) |
| 3396 | ROM_LOAD( "p10. | |
| 4362 | ROM_LOAD( "p10.h14", 0x0000, 0x8000, CRC(00dff996) SHA1(4f6ce4c0f2da0d2a711bcbf9aa998b4e31d0d9bf) ) | |
| 3397 | 4363 | |
| 3398 | 4364 | ROM_REGION( 0x18000, "sp16_tiles", ROMREGION_DISPOSE ) |
| 3399 | ROM_LOAD( "p11. | |
| 4365 | ROM_LOAD( "p11.h11", 0x04000, 0x4000, CRC(7feac86c) SHA1(13b81f006ec587583416c1e7432da4c3f0375924) ) | |
| 3400 | 4366 | ROM_CONTINUE( 0x00000, 0x4000) |
| 3401 | ROM_LOAD( "p12. | |
| 4367 | ROM_LOAD( "p12.h9 | |
| 3402 | 4368 | ROM_CONTINUE( 0x08000, 0x4000) |
| 3403 | ROM_LOAD( "p13. | |
| 4369 | ROM_LOAD( "p13.h8 | |
| 3404 | 4370 | ROM_CONTINUE( 0x10000, 0x4000) |
| 3405 | 4371 | |
| 3406 | 4372 | ROM_REGION( 0x0c00, "proms", 0 ) |
| r3171 | r3172 | |
| 3436 | 4402 | ROM_LOAD( "7122.1", 0x400, 0x400, CRC(6d0ac66a) SHA1(e792218ec43dd10473dc020afed8527cf43ea0d0) ) |
| 3437 | 4403 | ROM_LOAD( "7122.0", 0x800, 0x400, CRC(4662b4c8) SHA1(391c2b8a17ce2e092b46a17fc4170dc1e3bde426) ) |
| 3438 | 4404 | |
| 3439 | ROM_REGION( 0x4000, " | |
| 4405 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3440 | 4406 | ROM_LOAD( "tnk3-p14.bin", 0x0000, 0x2000, CRC(1fd18c43) SHA1(611b5aa97df84c0117681772deb006f32a899ad3) ) |
| 3441 | 4407 | ROM_RELOAD( 0x2000, 0x2000 ) |
| 3442 | 4408 | |
| r3171 | r3172 | |
| 3470 | 4436 | ROM_LOAD( "7122.1", 0x400, 0x400, CRC(6d0ac66a) SHA1(e792218ec43dd10473dc020afed8527cf43ea0d0) ) |
| 3471 | 4437 | ROM_LOAD( "7122.0", 0x800, 0x400, CRC(4662b4c8) SHA1(391c2b8a17ce2e092b46a17fc4170dc1e3bde426) ) |
| 3472 | 4438 | |
| 3473 | ROM_REGION( 0x4000, " | |
| 4439 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3474 | 4440 | ROM_LOAD( "p14.1e", 0x0000, 0x2000, CRC(6bd575ca) SHA1(446bb929fa19a7ff8b92731f71ab3e3252899f07) ) |
| 3475 | 4441 | ROM_RELOAD( 0x2000, 0x2000 ) |
| 3476 | 4442 | |
| r3171 | r3172 | |
| 3504 | 4470 | ROM_LOAD( "up02_b1.rom", 0x400, 0x400, CRC(d25c9099) SHA1(f3933075cce1255affc61dfefd9559b6e15ed29c) ) |
| 3505 | 4471 | ROM_LOAD( "up02_c1.rom", 0x800, 0x400, CRC(a4a4e7dc) SHA1(aa694c2d44dcabc6cfd46307c55c3759eff57236) ) |
| 3506 | 4472 | |
| 3507 | ROM_REGION( 0x4000, " | |
| 4473 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3508 | 4474 | ROM_LOAD( "up01_d2.rom", 0x0000, 0x4000, CRC(18b4bcca) SHA1(2476aa6c8d55e117d840202a97fe2a65e252ad7f) ) |
| 3509 | 4475 | |
| 3510 | 4476 | ROM_REGION( 0x8000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3536 | 4502 | ROM_LOAD( "82s137.1b", 0x00400, 0x00400, CRC(29e7986f) SHA1(85ba8d3443458c27728f633745857a1315dd183f) ) |
| 3537 | 4503 | ROM_LOAD( "82s137.1c", 0x00800, 0x00400, CRC(27ba9ff9) SHA1(f021d10460f40de4447560df5ac47fa53bb57ff9) ) |
| 3538 | 4504 | |
| 3539 | ROM_REGION( 0x4000, " | |
| 4505 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3540 | 4506 | ROM_LOAD( "gu8", 0x0000, 0x4000, CRC(f1628dcf) SHA1(efea343d3a9dd45ef74947c297e166e34afbb680) ) |
| 3541 | 4507 | |
| 3542 | 4508 | ROM_REGION( 0x8000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3571 | 4537 | ROM_LOAD( "82s137.1b", 0x00400, 0x00400, CRC(29e7986f) SHA1(85ba8d3443458c27728f633745857a1315dd183f) ) |
| 3572 | 4538 | ROM_LOAD( "82s137.1c", 0x00800, 0x00400, CRC(27ba9ff9) SHA1(f021d10460f40de4447560df5ac47fa53bb57ff9) ) |
| 3573 | 4539 | |
| 3574 | ROM_REGION( 0x4000, " | |
| 4540 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3575 | 4541 | ROM_LOAD( "gu8", 0x0000, 0x4000, CRC(f1628dcf) SHA1(efea343d3a9dd45ef74947c297e166e34afbb680) ) // D2.128 |
| 3576 | 4542 | |
| 3577 | 4543 | ROM_REGION( 0x8000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3658 | 4624 | ROM_LOAD( "cc2pr.5g", 0x400, 0x00400, CRC(982e4f46) SHA1(c4703a35201bc4c6b43f629a9a6a4c66354c6305) ) |
| 3659 | 4625 | ROM_LOAD( "cc3pr.5h", 0x800, 0x00400, CRC(47f2b83d) SHA1(6335be47f09ad33d7e05fda26a2f3fb9048dbbc2) ) |
| 3660 | 4626 | |
| 3661 | ROM_REGION( 0x4000, " | |
| 4627 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3662 | 4628 | ROM_LOAD( "cc11.1e", 0x0000, 0x4000, CRC(ce927ac7) SHA1(a0dd281912aa9ae7e408c2132fae30bffbc83750) ) |
| 3663 | 4629 | |
| 3664 | 4630 | ROM_REGION( 0x8000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3688 | 4654 | ROM_LOAD( "7122eg.prm", 0x400, 0x400, CRC(0703a770) SHA1(62861ef4987003d4965ef5018ccdf7157981d939) ) |
| 3689 | 4655 | ROM_LOAD( "7122eb.prm", 0x800, 0x400, CRC(0a11cdde) SHA1(faae17398341317e7afbd06b903b8e9e65967bf1) ) |
| 3690 | 4656 | |
| 3691 | ROM_REGION( 0x4000, " | |
| 4657 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3692 | 4658 | ROM_LOAD( "7.rom", 0x00000, 0x4000, CRC(a7eb4917) SHA1(6c07323cc243df4c5c30bc0daedbff3887309f65) ) |
| 3693 | 4659 | |
| 3694 | 4660 | ROM_REGION( 0x20000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3713 | 4679 | |
| 3714 | 4680 | ROM_START( ikaria ) |
| 3715 | 4681 | ROM_REGION( 0x10000, "main", 0 ) |
| 4682 | ROM_LOAD( "p1.bin", 0x0000, 0x4000, CRC(ad0e440e) SHA1(a942063e4d12e78c198b091596a82a56a6788e8d) ) | |
| 4683 | ROM_LOAD( "p2.bin", 0x4000, 0x8000, CRC(b585e931) SHA1(6eaf7592b2c42c5992c9fbece62640ad647f86ef) ) | |
| 4684 | ||
| 4685 | ROM_REGION( 0x10000, "sub", 0 ) | |
| 4686 | ROM_LOAD( "p3", 0x0000, 0x4000, CRC(8a9bd1f0) SHA1(dbf855e328daeddd38c64b7af2d303426d13bf3b) ) | |
| 4687 | ROM_LOAD( "p4", 0x4000, 0x8000, CRC(f4101cb4) SHA1(cee0eb1cae9f584fb5a866d3a8725f6a3feba912) ) | |
| 4688 | ||
| 4689 | ROM_REGION( 0x10000, "audio", 0 ) | |
| 4690 | ROM_LOAD( "ik5", 0x0000, 0x4000, CRC(863448fa) SHA1(19cad05dc9c4495f36e0d8627927ea6d0a971824) ) // p5 | |
| 4691 | ROM_LOAD( "ik6", 0x4000, 0x8000, CRC(9b16aa57) SHA1(69866ce41c587721702c92ac2e9ba3f6645004cf) ) // p6 | |
| 4692 | ||
| 4693 | ROM_REGION( 0x0c00, "proms", 0 ) | |
| 4694 | ROM_LOAD( "7122er.prm", 0x000, 0x400, CRC(b9bf2c2c) SHA1(8eb62152dcb04f463baf6ec2a66148eb947403ef) ) | |
| 4695 | ROM_LOAD( "7122eg.prm", 0x400, 0x400, CRC(0703a770) SHA1(62861ef4987003d4965ef5018ccdf7157981d939) ) | |
| 4696 | ROM_LOAD( "7122eb.prm", 0x800, 0x400, CRC(0a11cdde) SHA1(faae17398341317e7afbd06b903b8e9e65967bf1) ) | |
| 4697 | ||
| 4698 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4699 | ROM_LOAD( "7.rom", 0x00000, 0x4000, CRC(a7eb4917) SHA1(6c07323cc243df4c5c30bc0daedbff3887309f65) ) // p7 | |
| 4700 | ||
| 4701 | ROM_REGION( 0x20000, "bg_tiles", ROMREGION_DISPOSE ) | |
| 4702 | ROM_LOAD( "17.rom", 0x00000, 0x8000, CRC(e0dba976) SHA1(5a8f14f7a199b5fb1862debda0bceee42cddac59) ) | |
| 4703 | ROM_LOAD( "18.rom", 0x08000, 0x8000, CRC(24947d5f) SHA1(ffd18074ced8171c9da56c839e8289afc29af2c9) ) | |
| 4704 | ROM_LOAD( "19.rom", 0x10000, 0x8000, CRC(9ee59e91) SHA1(fe51d13ab73cb596a233669e304b2be66f9becae) ) | |
| 4705 | ROM_LOAD( "20.rom", 0x18000, 0x8000, CRC(5da7ec1a) SHA1(4b212c1dfe4c18eced90ee3a783e7edf8d23c906) ) | |
| 4706 | ||
| 4707 | ROM_REGION( 0x18000, "sp16_tiles", ROMREGION_DISPOSE ) | |
| 4708 | ROM_LOAD( "8.rom", 0x00000, 0x8000, CRC(9827c14a) SHA1(b54dcee95c6f6e46c187a117b4e7aaf1c0ece6c6) ) // p8 | |
| 4709 | ROM_LOAD( "9.rom", 0x08000, 0x8000, CRC(545c790c) SHA1(7738738f4a1343b04efd029ecaefac74010451f0) ) // p9 | |
| 4710 | ROM_LOAD( "10.rom", 0x10000, 0x8000, CRC(ec9ba07e) SHA1(6b492b2cd7b8cca948ce39c3450f1cc153f41d90) ) // p10 | |
| 4711 | ||
| 4712 | ROM_REGION( 0x30000, "sp32_tiles", ROMREGION_DISPOSE ) | |
| 4713 | ROM_LOAD( "11.rom", 0x00000, 0x8000, CRC(5c75ea8f) SHA1(4e8ee56a2dbeb9ac2dd74bc584dba29433d91ae0) ) | |
| 4714 | ROM_LOAD( "14.rom", 0x08000, 0x8000, CRC(3293fde4) SHA1(3e2f0fa00c22f1c0c1427d8d3de57dd9ec7682a9) ) | |
| 4715 | ROM_LOAD( "12.rom", 0x10000, 0x8000, CRC(95138498) SHA1(8ac3d2cd793312434b9ffb8c47c30473f713e0e8) ) | |
| 4716 | ROM_LOAD( "15.rom", 0x18000, 0x8000, CRC(65a61c99) SHA1(767694c919180de208b6211b593db68fc5a66ff1) ) | |
| 4717 | ROM_LOAD( "13.rom", 0x20000, 0x8000, CRC(315383d7) SHA1(1c1c5931e3447c4dcbd54fc8ae383b03cb5fbf5b) ) | |
| 4718 | ROM_LOAD( "16.rom", 0x28000, 0x8000, CRC(e9b03e07) SHA1(124e5328a965ea2af28c4d74934a82394a2ffd72) ) | |
| 4719 | ROM_END | |
| 4720 | ||
| 4721 | ROM_START( ikarinc ) | |
| 4722 | ROM_REGION( 0x10000, "main", 0 ) | |
| 3716 | 4723 | ROM_LOAD( "p1", 0x0000, 0x4000, CRC(738fcec4) SHA1(24a29f9487064b745262638350a332996b986e5d) ) |
| 3717 | 4724 | ROM_LOAD( "p2", 0x4000, 0x8000, CRC(89f7945a) SHA1(39f7f40b2028a77d6e7c79f27c2420b8422b5dab) ) |
| 3718 | 4725 | |
| r3171 | r3172 | |
| 3729 | 4736 | ROM_LOAD( "7122eg.prm", 0x400, 0x400, CRC(0703a770) SHA1(62861ef4987003d4965ef5018ccdf7157981d939) ) |
| 3730 | 4737 | ROM_LOAD( "7122eb.prm", 0x800, 0x400, CRC(0a11cdde) SHA1(faae17398341317e7afbd06b903b8e9e65967bf1) ) |
| 3731 | 4738 | |
| 3732 | ROM_REGION( 0x4000, " | |
| 4739 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3733 | 4740 | ROM_LOAD( "7.rom", 0x00000, 0x4000, CRC(a7eb4917) SHA1(6c07323cc243df4c5c30bc0daedbff3887309f65) ) // p7 |
| 3734 | 4741 | |
| 3735 | 4742 | ROM_REGION( 0x20000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3776 | 4783 | ROM_LOAD( "7122eg.prm", 0x400, 0x400, CRC(0703a770) SHA1(62861ef4987003d4965ef5018ccdf7157981d939) ) |
| 3777 | 4784 | ROM_LOAD( "7122eb.prm", 0x800, 0x400, CRC(0a11cdde) SHA1(faae17398341317e7afbd06b903b8e9e65967bf1) ) |
| 3778 | 4785 | |
| 3779 | ROM_REGION( 0x4000, " | |
| 4786 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3780 | 4787 | ROM_LOAD( "ik7", 0x00000, 0x4000, CRC(9e88f536) SHA1(80e9aadeb626e60318a2139fd1b3875f6256c492) ) |
| 3781 | 4788 | |
| 3782 | 4789 | ROM_REGION( 0x20000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3823 | 4830 | ROM_LOAD( "7122eg.prm", 0x400, 0x400, CRC(0703a770) SHA1(62861ef4987003d4965ef5018ccdf7157981d939) ) |
| 3824 | 4831 | ROM_LOAD( "7122eb.prm", 0x800, 0x400, CRC(0a11cdde) SHA1(faae17398341317e7afbd06b903b8e9e65967bf1) ) |
| 3825 | 4832 | |
| 3826 | ROM_REGION( 0x4000, " | |
| 4833 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3827 | 4834 | ROM_LOAD( "ik7", 0x0000, 0x4000, CRC(9e88f536) SHA1(80e9aadeb626e60318a2139fd1b3875f6256c492) ) |
| 3828 | 4835 | |
| 3829 | 4836 | ROM_REGION( 0x20000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3863 | 4870 | ROM_LOAD( "mb7122e.2l", 0x400, 0x400, CRC(8feca424) SHA1(c3d666f4b4b914199b24ded02f9a1b643bf90d26) ) |
| 3864 | 4871 | ROM_LOAD( "mb7122e.1l", 0x800, 0x400, CRC(220076ca) SHA1(a353c770c0ffb1105fb93c97977597ad2fda8ac8) ) |
| 3865 | 4872 | |
| 3866 | ROM_REGION( 0x4000, " | |
| 4873 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3867 | 4874 | ROM_LOAD( "p7", 0x0000, 0x4000, CRC(2b6ed95b) SHA1(dddf3aa21776778153572a20d29d47928a7116d8) ) |
| 3868 | 4875 | |
| 3869 | 4876 | ROM_REGION( 0x20000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3905 | 4912 | ROM_LOAD( "up03_l2.rom", 0x400, 0x400, CRC(99dc9792) SHA1(dcdcea2bad524776e17eaeb70dd4882283f1b125) ) |
| 3906 | 4913 | ROM_LOAD( "up03_l1.rom", 0x800, 0x400, CRC(e7213160) SHA1(bc762a346e1639c8a9636fe85c18d68a08c1b586) ) |
| 3907 | 4914 | |
| 3908 | ROM_REGION( 0x4000, " | |
| 4915 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3909 | 4916 | ROM_LOAD( "up02_b3.rom", 0x0000, 0x4000, CRC(51a4ec83) SHA1(8cb743c68a51b71ef3d78127b2cf6ab0877b13f6) ) |
| 3910 | 4917 | |
| 3911 | 4918 | ROM_REGION( 0x20000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 3947 | 4954 | ROM_LOAD( "up03_l2.rom", 0x400, 0x400, CRC(99dc9792) SHA1(dcdcea2bad524776e17eaeb70dd4882283f1b125) ) |
| 3948 | 4955 | ROM_LOAD( "up03_l1.rom", 0x800, 0x400, CRC(e7213160) SHA1(bc762a346e1639c8a9636fe85c18d68a08c1b586) ) |
| 3949 | 4956 | |
| 3950 | ROM_REGION( 0x4000, " | |
| 4957 | ROM_REGION( 0x4000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 3951 | 4958 | ROM_LOAD( "up02_b3.rom", 0x0000, 0x4000, CRC(51a4ec83) SHA1(8cb743c68a51b71ef3d78127b2cf6ab0877b13f6) ) |
| 3952 | 4959 | |
| 3953 | 4960 | ROM_REGION( 0x20000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4231 | 5238 | ROM_LOAD( "btj_h.prm", 0x0c00, 0x0400, CRC(c20b197b) SHA1(504cb28d652029fe87a5411d6239e78d93c83e91) ) /* ? */ |
| 4232 | 5239 | ROM_LOAD( "btj_v.prm", 0x1000, 0x0400, CRC(5d0c617f) SHA1(845e52173c33500227cabe1e21b34919d2856215) ) /* ? */ |
| 4233 | 5240 | |
| 4234 | ROM_REGION( 0x8000, " | |
| 5241 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4235 | 5242 | ROM_LOAD( "bt_p10.rom", 0x0000, 0x8000, CRC(d3650211) SHA1(cc7cfe05c5903caf33f8f02c416f68e6d2f6baa7) ) |
| 4236 | 5243 | |
| 4237 | 5244 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4278 | 5285 | ROM_LOAD( "btj_h.prm", 0x0c00, 0x0400, CRC(c20b197b) SHA1(504cb28d652029fe87a5411d6239e78d93c83e91) ) /* ? */ |
| 4279 | 5286 | ROM_LOAD( "btj_v.prm", 0x1000, 0x0400, CRC(5d0c617f) SHA1(845e52173c33500227cabe1e21b34919d2856215) ) /* ? */ |
| 4280 | 5287 | |
| 4281 | ROM_REGION( 0x8000, " | |
| 5288 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4282 | 5289 | ROM_LOAD( "bt_p10.rom", 0x0000, 0x8000, CRC(d3650211) SHA1(cc7cfe05c5903caf33f8f02c416f68e6d2f6baa7) ) |
| 4283 | 5290 | |
| 4284 | 5291 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4325 | 5332 | ROM_LOAD( "btj_h.prm", 0x0c00, 0x0400, CRC(c20b197b) SHA1(504cb28d652029fe87a5411d6239e78d93c83e91) ) /* ? */ |
| 4326 | 5333 | ROM_LOAD( "btj_v.prm", 0x1000, 0x0400, CRC(5d0c617f) SHA1(845e52173c33500227cabe1e21b34919d2856215) ) /* ? */ |
| 4327 | 5334 | |
| 4328 | ROM_REGION( 0x8000, " | |
| 5335 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4329 | 5336 | ROM_LOAD( "ww6.bin", 0x0000, 0x8000, CRC(d57570ab) SHA1(98997de12225d177be4916c7f2e6a7a2df24b8f2) ) |
| 4330 | 5337 | |
| 4331 | 5338 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4372 | 5379 | ROM_LOAD( "btj_h.prm", 0x0c00, 0x0400, CRC(c20b197b) SHA1(504cb28d652029fe87a5411d6239e78d93c83e91) ) /* ? */ |
| 4373 | 5380 | ROM_LOAD( "btj_v.prm", 0x1000, 0x0400, CRC(5d0c617f) SHA1(845e52173c33500227cabe1e21b34919d2856215) ) /* ? */ |
| 4374 | 5381 | |
| 4375 | ROM_REGION( 0x8000, " | |
| 5382 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4376 | 5383 | ROM_LOAD( "6", 0x0000, 0x8000, CRC(a0e6710c) SHA1(28010eaed046681295661b6fa3e76090ba86592b) ) |
| 4377 | 5384 | |
| 4378 | 5385 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4421 | 5428 | ROM_LOAD( "mb7122e.8j", 0x0c00, 0x400, CRC(c20b197b) SHA1(504cb28d652029fe87a5411d6239e78d93c83e91) ) /* ? */ |
| 4422 | 5429 | ROM_LOAD( "mb7122e.8k", 0x1000, 0x400, CRC(5d0c617f) SHA1(845e52173c33500227cabe1e21b34919d2856215) ) /* ? */ |
| 4423 | 5430 | |
| 4424 | ROM_REGION( 0x8000, " | |
| 5431 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4425 | 5432 | ROM_LOAD( "up02_a3.rom", 0x0000, 0x8000, CRC(11a71919) SHA1(ffb8c54ad5162ea5040508ccb9244b7cd087c047) ) |
| 4426 | 5433 | |
| 4427 | 5434 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4470 | 5477 | ROM_LOAD( "mb7122e.8j", 0x0c00, 0x400, CRC(c20b197b) SHA1(504cb28d652029fe87a5411d6239e78d93c83e91) ) /* ? */ |
| 4471 | 5478 | ROM_LOAD( "mb7122e.8k", 0x1000, 0x400, CRC(5d0c617f) SHA1(845e52173c33500227cabe1e21b34919d2856215) ) /* ? */ |
| 4472 | 5479 | |
| 4473 | ROM_REGION( 0x8000, " | |
| 5480 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4474 | 5481 | ROM_LOAD( "up02_a3.rom", 0x0000, 0x8000, CRC(11a71919) SHA1(ffb8c54ad5162ea5040508ccb9244b7cd087c047) ) |
| 4475 | 5482 | |
| 4476 | 5483 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4522 | 5529 | ROM_LOAD( "btj_v.prm", 0x1000, 0x0400, CRC(5d0c617f) SHA1(845e52173c33500227cabe1e21b34919d2856215) ) /* v-decode */ |
| 4523 | 5530 | ROM_LOAD( "ls.bin", 0x1400, 0x1000, CRC(73df921d) SHA1(c0f765da3e0e80d104b0baaa7a83bdcc399254b3) ) /* ls-joystick encoder */ |
| 4524 | 5531 | |
| 4525 | ROM_REGION( 0x8000, " | |
| 5532 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4526 | 5533 | ROM_LOAD( "g05", 0x0000, 0x08000, CRC(80f73e2e) SHA1(820824fb10f7dfec6247b46dde8ff7124bde3734) ) |
| 4527 | 5534 | |
| 4528 | 5535 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4569 | 5576 | ROM_LOAD( "btj_v.prm", 0x1000, 0x0400, CRC(5d0c617f) SHA1(845e52173c33500227cabe1e21b34919d2856215) ) /* v-decode */ |
| 4570 | 5577 | ROM_LOAD( "ls.bin", 0x1400, 0x1000, CRC(73df921d) SHA1(c0f765da3e0e80d104b0baaa7a83bdcc399254b3) ) /* ls-joystick encoder */ |
| 4571 | 5578 | |
| 4572 | ROM_REGION( 0x8000, " | |
| 5579 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4573 | 5580 | ROM_LOAD( "g05", 0x0000, 0x08000, CRC(80f73e2e) SHA1(820824fb10f7dfec6247b46dde8ff7124bde3734) ) |
| 4574 | 5581 | |
| 4575 | 5582 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4616 | 5623 | ROM_LOAD( "btj_v.prm", 0x1000, 0x0400, CRC(5d0c617f) SHA1(845e52173c33500227cabe1e21b34919d2856215) ) /* v-decode */ |
| 4617 | 5624 | ROM_LOAD( "ls.bin", 0x1400, 0x1000, CRC(73df921d) SHA1(c0f765da3e0e80d104b0baaa7a83bdcc399254b3) ) /* ls-joystick encoder */ |
| 4618 | 5625 | |
| 4619 | ROM_REGION( 0x8000, " | |
| 5626 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4620 | 5627 | ROM_LOAD( "792001", 0x0000, 0x08000, CRC(99d7ddf3) SHA1(4e4bc400d184e1fb9d0af3a33cc6f6d099bb3bee) ) |
| 4621 | 5628 | |
| 4622 | 5629 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4660 | 5667 | ROM_LOAD( "guprom.2", 0x400, 0x400, CRC(9147de69) SHA1(e4b3b546e429c195e82f97322e2a295882e38a58) ) /* green */ // up03_l1.rom |
| 4661 | 5668 | ROM_LOAD( "guprom.1", 0x800, 0x400, CRC(7f9c839e) SHA1(2fa60fa335f76891d961c9bd0066fa7f82f76779) ) /* blue */ // up03_k2.rom |
| 4662 | 5669 | |
| 4663 | ROM_REGION( 0x8000, " | |
| 5670 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4664 | 5671 | ROM_LOAD( "g05", 0x0000, 0x08000, CRC(80f73e2e) SHA1(820824fb10f7dfec6247b46dde8ff7124bde3734) ) |
| 4665 | 5672 | |
| 4666 | 5673 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4706 | 5713 | ROM_LOAD( "up03_l1.rom", 0x0400, 0x0400, CRC(15359fc3) SHA1(4ced674fb18b80ebe5fd6459e0fb9542461dbc74) ) /* green */ |
| 4707 | 5714 | ROM_LOAD( "up03_k2.rom", 0x0800, 0x0400, CRC(79b50f7d) SHA1(41579e498046570a6a74309310b5341fcde9c7de) ) /* blue */ |
| 4708 | 5715 | |
| 4709 | ROM_REGION( 0x8000, " | |
| 5716 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4710 | 5717 | ROM_LOAD( "kk_05.rom", 0x0000, 0x8000, CRC(defc0987) SHA1(ea8eca852aadce90857eb8e65d78631409faac01) ) |
| 4711 | 5718 | |
| 4712 | 5719 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4753 | 5760 | ROM_LOAD( "up03_l1.rom", 0x0400, 0x0400, CRC(15359fc3) SHA1(4ced674fb18b80ebe5fd6459e0fb9542461dbc74) ) /* green */ |
| 4754 | 5761 | ROM_LOAD( "up03_k2.rom", 0x0800, 0x0400, CRC(79b50f7d) SHA1(41579e498046570a6a74309310b5341fcde9c7de) ) /* blue */ |
| 4755 | 5762 | |
| 4756 | ROM_REGION( 0x8000, " | |
| 5763 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4757 | 5764 | ROM_LOAD( "kk_05.rom", 0x0000, 0x8000, CRC(defc0987) SHA1(ea8eca852aadce90857eb8e65d78631409faac01) ) |
| 4758 | 5765 | |
| 4759 | 5766 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4800 | 5807 | ROM_LOAD( "up03_l1.rom", 0x0400, 0x0400, CRC(15359fc3) SHA1(4ced674fb18b80ebe5fd6459e0fb9542461dbc74) ) /* green */ |
| 4801 | 5808 | ROM_LOAD( "up03_k2.rom", 0x0800, 0x0400, CRC(79b50f7d) SHA1(41579e498046570a6a74309310b5341fcde9c7de) ) /* blue */ |
| 4802 | 5809 | |
| 4803 | ROM_REGION( 0x8000, " | |
| 5810 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4804 | 5811 | ROM_LOAD( "kk_05.rom", 0x0000, 0x8000, CRC(defc0987) SHA1(ea8eca852aadce90857eb8e65d78631409faac01) ) |
| 4805 | 5812 | |
| 4806 | 5813 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4847 | 5854 | ROM_LOAD( "up03_l1.rom", 0x0400, 0x0400, CRC(15359fc3) SHA1(4ced674fb18b80ebe5fd6459e0fb9542461dbc74) ) /* green */ |
| 4848 | 5855 | ROM_LOAD( "up03_k2.rom", 0x0800, 0x0400, CRC(79b50f7d) SHA1(41579e498046570a6a74309310b5341fcde9c7de) ) /* blue */ |
| 4849 | 5856 | |
| 4850 | ROM_REGION( 0x8000, " | |
| 5857 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4851 | 5858 | ROM_LOAD( "kk_05.rom", 0x0000, 0x8000, CRC(defc0987) SHA1(ea8eca852aadce90857eb8e65d78631409faac01) ) |
| 4852 | 5859 | |
| 4853 | 5860 | ROM_REGION( 0x40000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4893 | 5900 | ROM_LOAD( "1.8d", 0x400, 0x400, CRC(1bac8010) SHA1(16854b1b6f3d1be48a247796d65aeb90547099b6) ) /* green */ |
| 4894 | 5901 | ROM_LOAD( "3.9e", 0x800, 0x400, CRC(dbeddb14) SHA1(6053b587a3c8272aefe728a7198a15aa7fb9b2fa) ) /* blue */ |
| 4895 | 5902 | |
| 4896 | ROM_REGION( 0x8000, " | |
| 5903 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4897 | 5904 | ROM_LOAD( "fs13.4n", 0x0000, 0x08000, CRC(0de7b7ad) SHA1(4fa54b2acf83f03d09d16fc054ad6623cafe0f4a) ) |
| 4898 | 5905 | |
| 4899 | 5906 | ROM_REGION( 0x50000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4929 | 5936 | ROM_LOAD( "1.8d", 0x400, 0x400, CRC(1bac8010) SHA1(16854b1b6f3d1be48a247796d65aeb90547099b6) ) /* green */ |
| 4930 | 5937 | ROM_LOAD( "3.9e", 0x800, 0x400, CRC(dbeddb14) SHA1(6053b587a3c8272aefe728a7198a15aa7fb9b2fa) ) /* blue */ |
| 4931 | 5938 | |
| 4932 | ROM_REGION( 0x8000, " | |
| 5939 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4933 | 5940 | ROM_LOAD( "fs13.4n", 0x0000, 0x08000, CRC(0de7b7ad) SHA1(4fa54b2acf83f03d09d16fc054ad6623cafe0f4a) ) |
| 4934 | 5941 | |
| 4935 | 5942 | ROM_REGION( 0x50000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 4965 | 5972 | ROM_LOAD( "1.8d", 0x400, 0x400, CRC(1bac8010) SHA1(16854b1b6f3d1be48a247796d65aeb90547099b6) ) /* green */ |
| 4966 | 5973 | ROM_LOAD( "3.9e", 0x800, 0x400, CRC(dbeddb14) SHA1(6053b587a3c8272aefe728a7198a15aa7fb9b2fa) ) /* blue */ |
| 4967 | 5974 | |
| 4968 | ROM_REGION( 0x8000, " | |
| 5975 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 4969 | 5976 | ROM_LOAD( "fs13.4n", 0x0000, 0x08000, CRC(0de7b7ad) SHA1(4fa54b2acf83f03d09d16fc054ad6623cafe0f4a) ) |
| 4970 | 5977 | |
| 4971 | 5978 | ROM_REGION( 0x50000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 5003 | 6010 | ROM_LOAD( "up03_d8.rom", 0x400, 0x00400, CRC(9c4a9198) SHA1(2d9be23c6a622eba5d3fb0d9912bad03658e563b) ) |
| 5004 | 6011 | ROM_LOAD( "up03_e9.rom", 0x800, 0x00400, CRC(c93c18e8) SHA1(9d4ca20c44bd35aabccab5f94cb45057361ccd99) ) |
| 5005 | 6012 | |
| 5006 | ROM_REGION( 0x8000, " | |
| 6013 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 5007 | 6014 | ROM_LOAD( "td14ver3.4n", 0x0000, 0x8000, CRC(e841bf1a) SHA1(ba93163b00e973eb5da9ddc64becce2bbe9ede05) ) |
| 5008 | 6015 | |
| 5009 | 6016 | ROM_REGION( 0x50000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 5043 | 6050 | ROM_LOAD( "up03_d8.rom", 0x400, 0x00400, CRC(9c4a9198) SHA1(2d9be23c6a622eba5d3fb0d9912bad03658e563b) ) /* green */ |
| 5044 | 6051 | ROM_LOAD( "up03_e9.rom", 0x800, 0x00400, CRC(c93c18e8) SHA1(9d4ca20c44bd35aabccab5f94cb45057361ccd99) ) /* blue */ |
| 5045 | 6052 | |
| 5046 | ROM_REGION( 0x8000, " | |
| 6053 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 5047 | 6054 | ROM_LOAD( "up01_n4.rom", 0x0000, 0x8000, CRC(af9bced5) SHA1(ec8b9c0649d33e4b0ed4f7d84530016581370278) ) |
| 5048 | 6055 | |
| 5049 | 6056 | ROM_REGION( 0x50000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 5083 | 6090 | ROM_LOAD( "up03_d82.rom", 0x400, 0x00400, CRC(ac9df947) SHA1(214855e1015f7b519e336159c6ea62ab1f576353) ) |
| 5084 | 6091 | ROM_LOAD( "up03_e92.rom", 0x800, 0x00400, CRC(73cdf192) SHA1(63d1aa1b00035bbfe5bebd9bc9992a5d6f5abd10) ) |
| 5085 | 6092 | |
| 5086 | ROM_REGION( 0x8000, " | |
| 6093 | ROM_REGION( 0x8000, "tx_tiles", ROMREGION_DISPOSE ) | |
| 5087 | 6094 | ROM_LOAD( "td06.3n", 0x0000, 0x8000, CRC(d6521b0d) SHA1(79aba420b2f039d580892fa34de5d63be1a4f222) ) |
| 5088 | 6095 | |
| 5089 | 6096 | ROM_REGION( 0x60000, "bg_tiles", ROMREGION_DISPOSE ) |
| r3171 | r3172 | |
| 5121 | 6128 | |
| 5122 | 6129 | |
| 5123 | 6130 | |
| 6131 | GAME( 1983, marvins, 0, marvins, marvins, 0, ROT270, "SNK", "Marvin's Maze", 0 ) | |
| 6132 | GAME( 1984, vangrd2, 0, vangrd2, vangrd2, 0, ROT270, "SNK", "Vanguard II", 0 ) | |
| 6133 | GAME( 1984, madcrash, 0, vangrd2, madcrash, 0, ROT0, "SNK", "Mad Crasher", 0 ) | |
| 6134 | ||
| 5124 | 6135 | GAME( 1984, jcross, 0, jcross, jcross, 0, ROT270, "SNK", "Jumping Cross", 0 ) |
| 5125 | 6136 | GAME( 1984, sgladiat, 0, sgladiat, sgladiat, 0, ROT0, "SNK", "Gladiator 1984", 0 ) |
| 6137 | GAME( 1985, hal21, 0, hal21, hal21, 0, ROT270, "SNK", "HAL21", 0 ) | |
| 6138 | GAME( 1985, hal21j, hal21, hal21, hal21, 0, ROT270, "SNK", "HAL21 (Japan)", 0 ) | |
| 5126 | 6139 | |
| 5127 | 6140 | GAME( 1985, aso, 0, aso, aso, 0, ROT270, "SNK", "ASO - Armored Scrum Object", 0 ) |
| 5128 | GAME( 1985, alphamis, aso, aso, aso, 0, ROT270, "SNK", "Alpha Mission", 0 ) | |
| 5129 | GAME( 1985, arian, aso, aso, aso, 0, ROT270, "SNK", "Arian Mission", 0 ) | |
| 6141 | GAME( 1985, alphamis, aso, aso, alphamis, 0, ROT270, "SNK", "Alpha Mission", 0 ) | |
| 6142 | GAME( 1985, arian, aso, aso, alphamis, 0, ROT270, "SNK", "Arian Mission", 0 ) | |
| 5130 | 6143 | GAME( 1985, tnk3, 0, tnk3, tnk3, 0, ROT270, "SNK", "T.N.K III (US)", 0 ) |
| 5131 | 6144 | GAME( 1985, tnk3j, tnk3, tnk3, tnk3, 0, ROT270, "SNK", "T.A.N.K (Japan)", 0 ) |
| 5132 | 6145 | GAME( 1986, athena, 0, athena, athena, 0, ROT0, "SNK", "Athena", 0 ) |
| r3171 | r3172 | |
| 5135 | 6148 | GAME( 1988, countryc, 0, fitegolf, countryc, countryc, ROT0, "SNK", "Country Club", 0 ) |
| 5136 | 6149 | |
| 5137 | 6150 | GAME( 1986, ikari, 0, ikari, ikari, 0, ROT270, "SNK", "Ikari Warriors (US JAMMA)", 0 ) |
| 5138 | GAME( 1986, ikaria, ikari, ikari, ikarijp, 0, ROT270, "SNK", "Ikari Warriors (US)", 0 ) | |
| 5139 | GAME( 1986, ikarijp, ikari, ikari, ikarijp, 0, ROT270, "SNK", "Ikari (Japan)", 0 ) | |
| 6151 | GAME( 1986, ikaria, ikari, ikari, ikaria, 0, ROT270, "SNK", "Ikari Warriors (US)", 0 ) | |
| 6152 | GAME( 1986, ikarinc, ikari, ikari, ikarinc, 0, ROT270, "SNK", "Ikari Warriors (US No Continues)", 0 ) | |
| 6153 | GAME( 1986, ikarijp, ikari, ikari, ikarinc, 0, ROT270, "SNK", "Ikari (Japan)", 0 ) | |
| 5140 | 6154 | GAME( 1986, ikarijpb, ikari, ikari, ikarijpb, 0, ROT270, "bootleg", "Ikari (Joystick hack bootleg)", 0 ) |
| 5141 | 6155 | GAME( 1986, victroad, 0, victroad, victroad, 0, ROT270, "SNK", "Victory Road", 0 ) |
| 5142 | 6156 | GAME( 1986, dogosoke, victroad, victroad, victroad, 0, ROT270, "SNK", "Dogou Souken", 0 ) |
| r3171 | r3172 | |
| 5151 | 6165 | GAME( 1987, gwar, 0, gwar, gwar, 0, ROT270, "SNK", "Guerrilla War (US)", 0 ) |
| 5152 | 6166 | GAME( 1987, gwarj, gwar, gwar, gwar, 0, ROT270, "SNK", "Guevara (Japan)", 0 ) |
| 5153 | 6167 | GAME( 1987, gwara, gwar, gwara, gwar, 0, ROT270, "SNK", "Guerrilla War (Version 1)", 0 ) |
| 5154 | GAME( 1987, gwarb, gwar, gwar, gwar, | |
| 6168 | GAME( 1987, gwarb, gwar, gwar, gwarb, | |
| 5155 | 6169 | GAME( 1988, chopper, 0, chopper1, chopper, 0, ROT270, "SNK", "Chopper I (US set 1)", 0 ) |
| 5156 | 6170 | GAME( 1988, choppera, chopper, choppera, choppera, 0, ROT270, "SNK", "Chopper I (US set 2)", 0 ) |
| 5157 | 6171 | GAME( 1988, chopperb, chopper, chopper1, chopper, 0, ROT270, "SNK", "Chopper I (US set 3)", 0 ) |
| r3171 | r3172 | |
|---|---|---|
| 176 | 176 | AM_RANGE(0x8000, 0xffff) AM_WRITE(SMH_ROM) |
| 177 | 177 | ADDRESS_MAP_END |
| 178 | 178 | |
| 179 | static ADDRESS_MAP_START( suprslam_sound_ | |
| 179 | static ADDRESS_MAP_START( suprslam_sound_io_ma | |
| 180 | 180 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 181 | AM_RANGE(0x04, 0x04) AM_READ(soundlatch_r) | |
| 182 | AM_RANGE(0x08, 0x08) AM_READ(ym2610_status_port_0_a_r) | |
| 183 | AM_RANGE(0x0a, 0x0a) AM_READ(ym2610_status_port_0_b_r) | |
| 184 | ADDRESS_MAP_END | |
| 185 | ||
| 186 | static ADDRESS_MAP_START( suprslam_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 187 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 188 | 181 | AM_RANGE(0x00, 0x00) AM_WRITE(suprslam_sh_bankswitch_w) |
| 189 | AM_RANGE(0x04, 0x04) AM_WRITE(pending_command_clear_w) | |
| 190 | AM_RANGE(0x08, 0x08) AM_WRITE(ym2610_control_port_0_a_w) | |
| 182 | AM_RANGE(0x04, 0x04) AM_READWRITE(soundlatch_r, pending_command_clear_w) | |
| 183 | AM_RANGE(0x08, 0x08) AM_READWRITE(ym2610_status_port_0_a_r, ym2610_control_port_0_a_w) | |
| 191 | 184 | AM_RANGE(0x09, 0x09) AM_WRITE(ym2610_data_port_0_a_w) |
| 192 | AM_RANGE(0x0a, 0x0a) AM_WRITE(ym2610_control_port_0_b_w) | |
| 185 | AM_RANGE(0x0a, 0x0a) AM_READWRITE(ym2610_status_port_0_b_r, ym2610_control_port_0_b_w) | |
| 193 | 186 | AM_RANGE(0x0b, 0x0b) AM_WRITE(ym2610_data_port_0_b_w) |
| 194 | 187 | ADDRESS_MAP_END |
| 195 | 188 | |
| r3171 | r3172 | |
| 329 | 322 | |
| 330 | 323 | MDRV_CPU_ADD("audio", Z80,8000000/2) /* 4 MHz ??? */ |
| 331 | 324 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 332 | MDRV_CPU_IO_MAP(suprslam_sound_ | |
| 325 | MDRV_CPU_IO_MAP(suprslam_sound_i | |
| 333 | 326 | |
| 334 | 327 | MDRV_GFXDECODE(suprslam) |
| 335 | 328 | |
| r3171 | r3172 | |
| 392 | 385 | |
| 393 | 386 | GAME( 1995, suprslam, 0, suprslam, suprslam, 0, ROT0, "Banpresto / Toei Animation", "Super Slams", GAME_IMPERFECT_GRAPHICS ) |
| 394 | 387 | |
| 388 |
| r3171 | r3172 | |
|---|---|---|
| 263 | 263 | return pixel_clock; |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | static | |
| 266 | static CUSTOM_I | |
| 267 | 267 | { |
| 268 | 268 | /* The top four address lines from the CRTC are bits 0-3 */ |
| 269 | ||
| 270 | return (input_port_read(machine, "IN0") & 0xf0) | ((video_screen_get_vpos(machine->primary_screen) & 0xf0) >> 4); | |
| 269 | return (video_screen_get_vpos(field->port->machine->primary_screen) & 0xf0) >> 4; | |
| 271 | 270 | } |
| 272 | 271 | |
| 273 | 272 | static READ8_HANDLER( magspot_coinage_dip_r ) |
| r3171 | r3172 | |
| 359 | 358 | ADDRESS_MAP_END |
| 360 | 359 | |
| 361 | 360 | static ADDRESS_MAP_START( cosmicg_readport, ADDRESS_SPACE_IO, 8 ) |
| 362 | AM_RANGE(0x00, 0x00) AM_READ | |
| 361 | AM_RANGE(0x00, 0x00) AM_READ | |
| 363 | 362 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
| 364 | 363 | ADDRESS_MAP_END |
| 365 | 364 | |
| r3171 | r3172 | |
| 504 | 503 | |
| 505 | 504 | static INPUT_PORTS_START( cosmicg ) |
| 506 | 505 | PORT_START("IN0") /* 4-7 */ |
| 507 | PORT_BIT( 0x0f, IP_ACTIVE_ | |
| 506 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(crtc_r, NULL) /* pixel clock */ | |
| 508 | 507 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 509 | 508 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 510 | 509 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r3171 | r3172 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | /* Puzzle Star Ports */ |
| 78 | 78 | |
| 79 | static ADDRESS_MAP_START | |
| 79 | static ADDRESS_MAP_START | |
| 80 | 80 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 81 | AM_RANGE( 0x98, 0x98) AM_READ( v9938_0_vram_r ) | |
| 82 | AM_RANGE( 0x99, 0x99) AM_READ( v9938_0_status_r ) | |
| 83 | AM_RANGE( 0xa0, 0xa0) AM_READ_PORT("P1") | |
| 84 | AM_RANGE( 0xa1, 0xa1) AM_READ_PORT("P2") | |
| 85 | AM_RANGE( 0xf7, 0xf7) AM_READ_PORT("DSW") | |
| 86 | ADDRESS_MAP_END | |
| 87 | ||
| 88 | static ADDRESS_MAP_START (writeport_pzlestar, ADDRESS_SPACE_IO, 8) | |
| 89 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 90 | AM_RANGE( 0x91, 0x91) AM_WRITE( pzlestar_bank_w ) | |
| 91 | 81 | AM_RANGE( 0x7c, 0x7c) AM_WRITE( ym2413_register_port_0_w ) |
| 92 | 82 | AM_RANGE( 0x7d, 0x7d) AM_WRITE( ym2413_data_port_0_w ) |
| 93 | AM_RANGE( 0x98, 0x98) AM_WRITE( v9938_0_vram_w ) | |
| 94 | AM_RANGE( 0x99, 0x99) AM_WRITE( v9938_0_command_w ) | |
| 83 | AM_RANGE( 0x91, 0x91) AM_WRITE( pzlestar_bank_w ) | |
| 84 | AM_RANGE( 0x98, 0x98) AM_READWRITE( v9938_0_vram_r, v9938_0_vram_w ) | |
| 85 | AM_RANGE( 0x99, 0x99) AM_READWRITE( v9938_0_status_r, v9938_0_command_w ) | |
| 95 | 86 | AM_RANGE( 0x9a, 0x9a) AM_WRITE( v9938_0_palette_w ) |
| 96 | 87 | AM_RANGE( 0x9b, 0x9b) AM_WRITE( v9938_0_register_w ) |
| 88 | AM_RANGE( 0xa0, 0xa0) AM_READ_PORT("P1") | |
| 89 | AM_RANGE( 0xa1, 0xa1) AM_READ_PORT("P2") | |
| 90 | AM_RANGE( 0xf7, 0xf7) AM_READ_PORT("DSW") | |
| 97 | 91 | ADDRESS_MAP_END |
| 98 | 92 | |
| 99 | 93 | /* Sexy Boom Ports */ |
| 100 | 94 | |
| 101 | static ADDRESS_MAP_START | |
| 95 | static ADDRESS_MAP_START | |
| 102 | 96 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 103 | 97 | AM_RANGE( 0xa0, 0xa0) AM_READ_PORT("P1") |
| 104 | 98 | AM_RANGE( 0xa1, 0xa1) AM_READ_PORT("P2") |
| 105 | 99 | AM_RANGE( 0xf7, 0xf7) AM_READ_PORT("DSW") |
| 106 | 100 | AM_RANGE( 0xf0, 0xf0) AM_READ( v9938_0_vram_r ) |
| 107 | 101 | AM_RANGE( 0xf1, 0xf1) AM_READ( v9938_0_status_r ) |
| 108 | ADDRESS_MAP_END | |
| 109 | 102 | |
| 110 | static ADDRESS_MAP_START (writeport_sexyboom, ADDRESS_SPACE_IO, 8) | |
| 111 | 103 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 112 | 104 | AM_RANGE( 0x7c, 0x7c) AM_WRITE( ym2413_register_port_0_w ) |
| 113 | 105 | AM_RANGE( 0x7d, 0x7d) AM_WRITE( ym2413_data_port_0_w ) |
| r3171 | r3172 | |
| 119 | 111 | ADDRESS_MAP_END |
| 120 | 112 | |
| 121 | 113 | |
| 122 | ||
| 123 | 114 | static INPUT_PORTS_START( sangho ) |
| 124 | 115 | PORT_START("P1") |
| 125 | 116 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| r3171 | r3172 | |
| 235 | 226 | |
| 236 | 227 | MDRV_CPU_ADD("main", Z80,8000000) // ? |
| 237 | 228 | MDRV_CPU_PROGRAM_MAP(readmem, 0) |
| 238 | MDRV_CPU_IO_MAP( | |
| 229 | MDRV_CPU_IO_MAP( | |
| 239 | 230 | MDRV_CPU_VBLANK_INT_HACK(sangho_interrupt,262) |
| 240 | 231 | |
| 241 | 232 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| r3171 | r3172 | |
| 268 | 259 | |
| 269 | 260 | MDRV_CPU_ADD("main", Z80,8000000) // ? |
| 270 | 261 | MDRV_CPU_PROGRAM_MAP(readmem, 0) |
| 271 | MDRV_CPU_IO_MAP( | |
| 262 | MDRV_CPU_IO_MAP( | |
| 272 | 263 | MDRV_CPU_VBLANK_INT_HACK(sangho_interrupt,262) |
| 273 | 264 | |
| 274 | 265 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| r3171 | r3172 | |
| 340 | 331 | |
| 341 | 332 | GAME( 1991, pzlestar, 0, pzlestar, sangho, sangho, ROT270, "Sang Ho Soft", "Puzzle Star (Sang Ho Soft)", GAME_NOT_WORKING ) |
| 342 | 333 | GAME( 1992, sexyboom, 0, sexyboom, sangho, sangho, ROT270, "Sang Ho Soft", "Sexy Boom", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| 334 |
| r3171 | r3172 | |
|---|---|---|
| 463 | 463 | /* basic machine hardware */ |
| 464 | 464 | MDRV_CPU_ADD("main", Z80, XTAL_18_432MHz/6) /* verified on pcb */ |
| 465 | 465 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 466 | MDRV_CPU_IO_MAP( | |
| 466 | MDRV_CPU_IO_MAP( | |
| 467 | 467 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 468 | 468 | |
| 469 | 469 | MDRV_CPU_ADD("sub", Z80, XTAL_18_432MHz/6) /* verified on pcb */ |
| r3171 | r3172 | |
| 515 | 515 | /* basic machine hardware */ |
| 516 | 516 | MDRV_IMPORT_FROM(gyrodine) |
| 517 | 517 | MDRV_CPU_MODIFY("main") |
| 518 | MDRV_CPU_IO_MAP( | |
| 518 | MDRV_CPU_IO_MAP( | |
| 519 | 519 | |
| 520 | 520 | MDRV_CPU_MODIFY("sub") |
| 521 | 521 | MDRV_CPU_PROGRAM_MAP(srdmissn_sub_map,0) |
| r3171 | r3172 | |
| 527 | 527 | /* basic machine hardware */ |
| 528 | 528 | MDRV_IMPORT_FROM(sonofphx) |
| 529 | 529 | MDRV_CPU_MODIFY("main") |
| 530 | MDRV_CPU_IO_MAP( | |
| 530 | MDRV_CPU_IO_MAP( | |
| 531 | 531 | MACHINE_DRIVER_END |
| 532 | 532 | |
| 533 | 533 | static MACHINE_DRIVER_START( flashgla ) |
| r3171 | r3172 | |
| 535 | 535 | /* basic machine hardware */ |
| 536 | 536 | MDRV_IMPORT_FROM(gyrodine) |
| 537 | 537 | MDRV_CPU_MODIFY("main") |
| 538 | MDRV_CPU_IO_MAP( | |
| 538 | MDRV_CPU_IO_MAP( | |
| 539 | 539 | |
| 540 | 540 | MDRV_CPU_MODIFY("sub") |
| 541 | 541 | MDRV_CPU_PROGRAM_MAP(flashgla_sub_map,0) |
| r3171 | r3172 | |
|---|---|---|
| 145 | 145 | AM_RANGE(0xe000, 0xe01f) AM_WRITE(SMH_ROM) |
| 146 | 146 | ADDRESS_MAP_END |
| 147 | 147 | |
| 148 | ||
| 149 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 148 | static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) | |
| 150 | 149 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 151 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") | |
| 152 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") | |
| 150 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_WRITE(ay8910_control_port_0_w) | |
| 151 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_WRITE(ay8910_write_port_0_w) | |
| 153 | 152 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN0") |
| 154 | 153 | AM_RANGE(0x03, 0x03) AM_READ(ay8910_read_port_0_r) |
| 155 | 154 | ADDRESS_MAP_END |
| 156 | 155 | |
| 157 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 158 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 159 | AM_RANGE(0x00, 0x00) AM_WRITE(ay8910_control_port_0_w) | |
| 160 | AM_RANGE(0x01, 0x01) AM_WRITE(ay8910_write_port_0_w) | |
| 161 | ADDRESS_MAP_END | |
| 162 | 156 | |
| 163 | ||
| 164 | ||
| 165 | 157 | static INPUT_PORTS_START( skyskipr ) |
| 166 | 158 | PORT_START("P1") /* IN0 */ |
| 167 | 159 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| r3171 | r3172 | |
| 485 | 477 | /* basic machine hardware */ |
| 486 | 478 | MDRV_CPU_ADD("main", Z80, 8000000/2) /* 4 MHz */ |
| 487 | 479 | MDRV_CPU_PROGRAM_MAP(skyskipr_readmem,skyskipr_writemem) |
| 488 | MDRV_CPU_IO_MAP( | |
| 480 | MDRV_CPU_IO_MAP(io_ma | |
| 489 | 481 | MDRV_CPU_VBLANK_INT("main", popeye_interrupt) |
| 490 | 482 | |
| 491 | 483 | /* video hardware */ |
| r3171 | r3172 | |
| 708 | 700 | GAME( 1982, popeyeu, popeye, popeye, popeye, popeye, ROT0, "Nintendo", "Popeye (revision D not protected)", 0 ) |
| 709 | 701 | GAME( 1982, popeyef, popeye, popeye, popeyef, popeye, ROT0, "Nintendo", "Popeye (revision F)", 0 ) |
| 710 | 702 | GAME( 1982, popeyebl, popeye, popeyebl, popeye, 0, ROT0, "bootleg", "Popeye (bootleg)", 0 ) |
| 703 |
| r3171 | r3172 | |
|---|---|---|
| 192 | 192 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(SMH_RAM) |
| 193 | 193 | ADDRESS_MAP_END |
| 194 | 194 | |
| 195 | static ADDRESS_MAP_START( sound_ | |
| 195 | static ADDRESS_MAP_START( sound_ | |
| 196 | 196 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 197 | 197 | AM_RANGE(0x00, 0x00) AM_WRITE(ym2203_control_port_0_w) |
| 198 | 198 | AM_RANGE(0x01, 0x01) AM_WRITE(ym2203_write_port_0_w) |
| r3171 | r3172 | |
| 457 | 457 | |
| 458 | 458 | MDRV_CPU_ADD("audio", Z80, 4000000) |
| 459 | 459 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 460 | MDRV_CPU_IO_MAP( | |
| 460 | MDRV_CPU_IO_MAP( | |
| 461 | 461 | |
| 462 | 462 | /* ElSemi. Reversed the CPU order so the sound callback works with bballs */ |
| 463 | 463 | MDRV_CPU_ADD("mcu", M68705, 4000000) /* No idea */ |
| r3171 | r3172 | |
| 499 | 499 | |
| 500 | 500 | MDRV_CPU_ADD("audio", Z80, 4000000) |
| 501 | 501 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 502 | MDRV_CPU_IO_MAP( | |
| 502 | MDRV_CPU_IO_MAP( | |
| 503 | 503 | |
| 504 | 504 | MDRV_INTERLEAVE(60) |
| 505 | 505 |
| r3171 | r3172 | |
|---|---|---|
| 43 | 43 | case 0x00: |
| 44 | 44 | return input_port_read(machine, "SYSTEM"); |
| 45 | 45 | case 0x01: |
| 46 | return | |
| 46 | return | |
| 47 | 47 | case 0x04: |
| 48 | return | |
| 48 | return | |
| 49 | 49 | case 0x05: |
| 50 | 50 | return input_port_read(machine, "DSWA"); |
| 51 | 51 | } |
| r3171 | r3172 | |
| 87 | 87 | |
| 88 | 88 | static INPUT_PORTS_START( zerozone ) |
| 89 | 89 | PORT_START("SYSTEM") |
| 90 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 91 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 92 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 93 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 94 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) | |
| 95 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 96 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 97 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 90 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 91 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 92 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 93 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) | |
| 94 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START2 ) | |
| 95 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 96 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 97 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 98 | 98 | |
| 99 | PORT_START("P1") | |
| 100 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) | |
| 101 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) | |
| 102 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) | |
| 103 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1) | |
| 104 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 105 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 106 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Score Line (Cheat)") | |
| 107 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 99 | PORT_START("INPUTS") | |
| 100 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) | |
| 101 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) | |
| 102 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) | |
| 103 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1) | |
| 104 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 105 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 106 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Score Line (Cheat)") | |
| 107 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 108 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) | |
| 109 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) | |
| 110 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) | |
| 111 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) | |
| 112 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 113 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 114 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Score Line (Cheat)") | |
| 115 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 108 | 116 | |
| 109 | PORT_START("P2") | |
| 110 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) | |
| 111 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) | |
| 112 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) | |
| 113 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) | |
| 114 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 115 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 116 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Score Line (Cheat)") | |
| 117 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 118 | ||
| 119 | 117 | PORT_START("DSWA") |
| 120 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) | |
| 121 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) | |
| 122 | PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) | |
| 123 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) | |
| 124 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) | |
| 125 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) | |
| 126 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) | |
| 127 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) | |
| 128 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) | |
| 129 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) ) | |
| 130 | PORT_DIPSETTING( 0x08, "In Game Default" ) // 130, 162 or 255 "lines" | |
| 131 | PORT_DIPSETTING( 0x00, "Always Hard" ) // 255 "lines" | |
| 132 | PORT_DIPNAME( 0x10, 0x10, "Speed" ) | |
| 133 | PORT_DIPSETTING( 0x10, DEF_STR( Normal ) ) // Drop every 20 frames | |
| 134 | PORT_DIPSETTING( 0x00, "Fast" ) // Drop every 18 frames | |
| 135 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) | |
| 136 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 137 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 138 | PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) | |
| 139 | PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) | |
| 118 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) | |
| 119 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) | |
| 120 | PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) | |
| 121 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) | |
| 122 | PORT_DIPSETTING( 0x0003, DEF_STR( 2C_1C ) ) | |
| 123 | PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) | |
| 124 | PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) | |
| 125 | PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) | |
| 126 | PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) | |
| 127 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Difficulty ) ) | |
| 128 | PORT_DIPSETTING( 0x0008, "In Game Default" ) // 130, 162 or 255 "lines" | |
| 129 | PORT_DIPSETTING( 0x0000, "Always Hard" ) // 255 "lines" | |
| 130 | PORT_DIPNAME( 0x0010, 0x0010, "Speed" ) | |
| 131 | PORT_DIPSETTING( 0x0010, DEF_STR( Normal ) ) // Drop every 20 frames | |
| 132 | PORT_DIPSETTING( 0x0000, "Fast" ) // Drop every 18 frames | |
| 133 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Demo_Sounds ) ) | |
| 134 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) | |
| 135 | PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) | |
| 136 | PORT_DIPUNUSED( 0x0040, IP_ACTIVE_LOW ) | |
| 137 | PORT_DIPUNUSED( 0x0080, IP_ACTIVE_LOW ) | |
| 140 | 138 | |
| 141 | 139 | PORT_START("DSWB") |
| 142 | PORT_DIPUNUSED( 0x01, IP_ACTIVE_LOW ) | |
| 143 | PORT_DIPUNUSED( 0x02, IP_ACTIVE_LOW ) | |
| 144 | PORT_DIPNAME( 0x04, 0x04, "Helps" ) | |
| 145 | PORT_DIPSETTING( 0x04, "1" ) | |
| 146 | PORT_DIPSETTING( 0x00, "2" ) | |
| 147 | PORT_DIPNAME( 0x08, 0x08, "Bonus Help" ) | |
| 148 | PORT_DIPSETTING( 0x00, "30000" ) | |
| 149 | PORT_DIPSETTING( 0x08, DEF_STR( None ) ) | |
| 150 | PORT_DIPNAME( 0x10, 0x10, "Activate 'Score Line'? (Cheat)") | |
| 151 | PORT_DIPSETTING( 0x10, DEF_STR( No ) ) | |
| 152 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 153 | PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) | |
| 154 | PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) | |
| 155 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) | |
| 140 | PORT_DIPUNUSED( 0x0100, IP_ACTIVE_LOW ) | |
| 141 | PORT_DIPUNUSED( 0x0200, IP_ACTIVE_LOW ) | |
| 142 | PORT_DIPNAME( 0x0400, 0x0400, "Helps" ) | |
| 143 | PORT_DIPSETTING( 0x0400, "1" ) | |
| 144 | PORT_DIPSETTING( 0x0000, "2" ) | |
| 145 | PORT_DIPNAME( 0x0800, 0x0800, "Bonus Help" ) | |
| 146 | PORT_DIPSETTING( 0x0000, "30000" ) | |
| 147 | PORT_DIPSETTING( 0x0800, DEF_STR( None ) ) | |
| 148 | PORT_DIPNAME( 0x1000, 0x1000, "Activate 'Score Line'? (Cheat)") | |
| 149 | PORT_DIPSETTING( 0x1000, DEF_STR( No ) ) | |
| 150 | PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) | |
| 151 | PORT_DIPUNUSED( 0x2000, IP_ACTIVE_LOW ) | |
| 152 | PORT_DIPUNUSED( 0x4000, IP_ACTIVE_LOW ) | |
| 153 | PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) | |
| 156 | 154 | INPUT_PORTS_END |
| 157 | 155 | |
| 158 | 156 |
| r3171 | r3172 | |
|---|---|---|
| 144 | 144 | AM_RANGE(0x6000, 0x6000) AM_WRITE(soundlatch_w) |
| 145 | 145 | ADDRESS_MAP_END |
| 146 | 146 | |
| 147 | static ADDRESS_MAP_START( sound_ | |
| 147 | static ADDRESS_MAP_START( sound_ | |
| 148 | 148 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 149 | 149 | AM_RANGE(0x00, 0x00) AM_WRITE(ay8910_control_port_0_w) |
| 150 | 150 | AM_RANGE(0x01, 0x01) AM_WRITE(ay8910_write_port_0_w) |
| r3171 | r3172 | |
| 319 | 319 | |
| 320 | 320 | MDRV_CPU_ADD("audio", Z80, 3072000) /* 2 MHz?????? */ |
| 321 | 321 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 322 | MDRV_CPU_IO_MAP( | |
| 322 | MDRV_CPU_IO_MAP( | |
| 323 | 323 | MDRV_CPU_VBLANK_INT_HACK(espial_sound_nmi_gen,4) |
| 324 | 324 | |
| 325 | 325 | MDRV_MACHINE_RESET(espial) |
| r3171 | r3172 | |
|---|---|---|
| 183 | 183 | AM_RANGE(0xe000, 0xffff) AM_WRITE(SMH_RAM) |
| 184 | 184 | ADDRESS_MAP_END |
| 185 | 185 | |
| 186 | ||
| 187 | static ADDRESS_MAP_START( tiamc1_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 186 | static ADDRESS_MAP_START( tiamc1_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 188 | 187 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 189 | 188 | AM_RANGE(0x40, 0x4f) AM_WRITE(tiamc1_sprite_y_w) /* sprites Y */ |
| 190 | 189 | AM_RANGE(0x50, 0x5f) AM_WRITE(tiamc1_sprite_x_w) /* sprites X */ |
| r3171 | r3172 | |
| 196 | 195 | AM_RANGE(0xbe, 0xbe) AM_WRITE(tiamc1_bankswitch_w) /* VRAM selector */ |
| 197 | 196 | AM_RANGE(0xbf, 0xbf) AM_WRITENOP /* charset control */ |
| 198 | 197 | AM_RANGE(0xc0, 0xc3) AM_WRITE(tiamc1_timer0_w) /* timer 0 */ |
| 198 | AM_RANGE(0xd0, 0xd0) AM_READ_PORT("IN0") | |
| 199 | AM_RANGE(0xd1, 0xd1) AM_READ_PORT("IN1") | |
| 200 | AM_RANGE(0xd2, 0xd2) AM_READ_PORT("IN2") | |
| 199 | 201 | AM_RANGE(0xd2, 0xd2) AM_WRITE(tiamc1_control_w) /* coin counter and lockout */ |
| 200 | 202 | AM_RANGE(0xd3, 0xd3) AM_WRITENOP /* 8255 ctrl. Used for i/o ports */ |
| 201 | 203 | AM_RANGE(0xd4, 0xd7) AM_WRITE(tiamc1_timer1_w) /* timer 1 */ |
| 202 | 204 | AM_RANGE(0xda, 0xda) AM_WRITE(tiamc1_timer1_gate_w) /* timer 1 gate control */ |
| 203 | 205 | ADDRESS_MAP_END |
| 204 | 206 | |
| 205 | static ADDRESS_MAP_START( tiamc1_readport, ADDRESS_SPACE_IO, 8 ) | |
| 206 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 207 | AM_RANGE(0xd0, 0xd0) AM_READ_PORT("IN0") | |
| 208 | AM_RANGE(0xd1, 0xd1) AM_READ_PORT("IN1") | |
| 209 | AM_RANGE(0xd2, 0xd2) AM_READ_PORT("IN2") | |
| 210 | ADDRESS_MAP_END | |
| 211 | ||
| 212 | 207 | static INPUT_PORTS_START( tiamc1 ) |
| 213 | 208 | PORT_START("IN0") |
| 214 | 209 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) /* Player 0 JOYSTICK_RIGHT */ |
| r3171 | r3172 | |
| 278 | 273 | /* basic machine hardware */ |
| 279 | 274 | MDRV_CPU_ADD("main", 8080,16000000/9) /* 16 MHz */ |
| 280 | 275 | MDRV_CPU_PROGRAM_MAP(tiamc1_readmem,tiamc1_writemem) |
| 281 | MDRV_CPU_IO_MAP(tiamc1_ | |
| 276 | MDRV_CPU_IO_MAP(tiamc1_ | |
| 282 | 277 | |
| 283 | 278 | MDRV_CPU_VBLANK_INT("main", irq1_line_hold) |
| 284 | 279 | |
| r3171 | r3172 | |
| 353 | 348 | |
| 354 | 349 | GAME( 1988, konek, 0, tiamc1, tiamc1, tiamc1, ROT0, "Terminal", "Konek-Gorbunok", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 355 | 350 | GAME( 1988, sosterm, 0, tiamc1, tiamc1, tiamc1, ROT0, "Terminal", "S.O.S.", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 351 |
| r3171 | r3172 | |
|---|---|---|
| 114 | 114 | AM_RANGE(0x8000, 0xffff) AM_WRITE(SMH_ROM) |
| 115 | 115 | ADDRESS_MAP_END |
| 116 | 116 | |
| 117 | ||
| 118 | static ADDRESS_MAP_START( hnayayoi_readport, ADDRESS_SPACE_IO, 8 ) | |
| 117 | static ADDRESS_MAP_START( hnayayoi_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 119 | 118 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 119 | AM_RANGE(0x00, 0x00) AM_WRITE(ym2203_control_port_0_w) | |
| 120 | AM_RANGE(0x01, 0x01) AM_WRITE(ym2203_write_port_0_w) | |
| 120 | 121 | AM_RANGE(0x02, 0x02) AM_READ(ym2203_status_port_0_r) |
| 121 | 122 | AM_RANGE(0x03, 0x03) AM_READ(ym2203_read_port_0_r) |
| 122 | 123 | AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW3") |
| 123 | AM_RANGE(0x41, 0x41) AM_READ(keyboard_0_r) | |
| 124 | AM_RANGE(0x42, 0x42) AM_READ(keyboard_1_r) | |
| 125 | AM_RANGE(0x43, 0x43) AM_READ_PORT("COIN") | |
| 126 | ADDRESS_MAP_END | |
| 127 | ||
| 128 | static ADDRESS_MAP_START( hnayayoi_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 129 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 130 | AM_RANGE(0x00, 0x00) AM_WRITE(ym2203_control_port_0_w) | |
| 131 | AM_RANGE(0x01, 0x01) AM_WRITE(ym2203_write_port_0_w) | |
| 132 | 124 | AM_RANGE(0x06, 0x06) AM_WRITE(adpcm_data_w) |
| 133 | 125 | // AM_RANGE(0x08, 0x08) AM_WRITE(SMH_NOP) // CRT Controller |
| 134 | 126 | // AM_RANGE(0x09, 0x09) AM_WRITE(SMH_NOP) // CRT Controller |
| r3171 | r3172 | |
| 137 | 129 | AM_RANGE(0x23, 0x23) AM_WRITE(adpcm_vclk_w) |
| 138 | 130 | AM_RANGE(0x24, 0x24) AM_WRITE(adpcm_reset_w) |
| 139 | 131 | AM_RANGE(0x40, 0x40) AM_WRITE(keyboard_w) |
| 132 | AM_RANGE(0x41, 0x41) AM_READ(keyboard_0_r) | |
| 133 | AM_RANGE(0x42, 0x42) AM_READ(keyboard_1_r) | |
| 134 | AM_RANGE(0x43, 0x43) AM_READ_PORT("COIN") | |
| 140 | 135 | AM_RANGE(0x60, 0x61) AM_WRITE(hnayayoi_palbank_w) |
| 141 | 136 | AM_RANGE(0x62, 0x67) AM_WRITE(dynax_blitter_rev1_param_w) |
| 142 | 137 | ADDRESS_MAP_END |
| 143 | 138 | |
| 144 | ||
| 145 | 139 | static ADDRESS_MAP_START( hnfubuki_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 146 | 140 | AM_RANGE(0x0000, 0x77ff) AM_READ(SMH_ROM) |
| 147 | 141 | AM_RANGE(0x7800, 0x7fff) AM_READ(SMH_RAM) |
| r3171 | r3172 | |
| 172 | 166 | AM_RANGE(0xff62, 0xff67) AM_WRITE(dynax_blitter_rev1_param_w) |
| 173 | 167 | ADDRESS_MAP_END |
| 174 | 168 | |
| 175 | ||
| 176 | static ADDRESS_MAP_START( hnfubuki_readport, ADDRESS_SPACE_IO, 8 ) | |
| 177 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 178 | ADDRESS_MAP_END | |
| 179 | ||
| 180 | static ADDRESS_MAP_START( hnfubuki_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 181 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 182 | ADDRESS_MAP_END | |
| 183 | ||
| 184 | ||
| 185 | 169 | static ADDRESS_MAP_START( untoucha_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 186 | 170 | AM_RANGE(0x0000, 0x77ff) AM_READ(SMH_ROM) |
| 187 | 171 | AM_RANGE(0x7800, 0x7fff) AM_READ(SMH_RAM) |
| r3171 | r3172 | |
| 194 | 178 | AM_RANGE(0x8000, 0xffff) AM_WRITE(SMH_ROM) |
| 195 | 179 | ADDRESS_MAP_END |
| 196 | 180 | |
| 197 | ||
| 198 | static ADDRESS_MAP_START( untoucha_readport, ADDRESS_SPACE_IO, 8 ) | |
| 181 | static ADDRESS_MAP_START( untoucha_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 199 | 182 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 200 | AM_RANGE(0x11, 0x11) AM_READ(ym2203_status_port_0_r) | |
| 201 | AM_RANGE(0x51, 0x51) AM_READ(ym2203_read_port_0_r) | |
| 202 | AM_RANGE(0x16, 0x16) AM_READ(keyboard_0_r) // bit 7 = blitter busy flag | |
| 203 | AM_RANGE(0x15, 0x15) AM_READ(keyboard_1_r) | |
| 204 | AM_RANGE(0x14, 0x14) AM_READ_PORT("COIN") | |
| 205 | ADDRESS_MAP_END | |
| 206 | ||
| 207 | static ADDRESS_MAP_START( untoucha_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 208 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 209 | 183 | AM_RANGE(0x10, 0x10) AM_WRITE(ym2203_control_port_0_w) |
| 210 | AM_RANGE(0x50, 0x50) AM_WRITE(ym2203_write_port_0_w) | |
| 211 | AM_RANGE(0x13, 0x13) AM_WRITE(adpcm_data_w) | |
| 184 | AM_RANGE(0x11, 0x11) AM_READ(ym2203_status_port_0_r) | |
| 212 | 185 | // AM_RANGE(0x12, 0x12) AM_WRITE(SMH_NOP) // CRT Controller |
| 213 | // AM_RANGE(0x52, 0x52) AM_WRITE(SMH_NOP) // CRT Controller | |
| 214 | AM_RANGE(0x28, 0x28) AM_WRITE(dynax_blitter_rev1_start_w) | |
| 215 | AM_RANGE(0x20, 0x20) AM_WRITE(dynax_blitter_rev1_clear_w) | |
| 216 | AM_RANGE(0x31, 0x31) AM_WRITE(adpcm_vclk_w) | |
| 217 | AM_RANGE(0x32, 0x32) AM_WRITE(adpcm_reset_inv_w) | |
| 186 | AM_RANGE(0x13, 0x13) AM_WRITE(adpcm_data_w) | |
| 187 | AM_RANGE(0x14, 0x14) AM_READ_PORT("COIN") | |
| 188 | AM_RANGE(0x15, 0x15) AM_READ(keyboard_1_r) | |
| 189 | AM_RANGE(0x16, 0x16) AM_READ(keyboard_0_r) // bit 7 = blitter busy flag | |
| 218 | 190 | AM_RANGE(0x17, 0x17) AM_WRITE(keyboard_w) |
| 219 | 191 | AM_RANGE(0x18, 0x19) AM_WRITE(hnayayoi_palbank_w) |
| 220 | 192 | AM_RANGE(0x1a, 0x1f) AM_WRITE(dynax_blitter_rev1_param_w) |
| 193 | AM_RANGE(0x20, 0x20) AM_WRITE(dynax_blitter_rev1_clear_w) | |
| 194 | AM_RANGE(0x28, 0x28) AM_WRITE(dynax_blitter_rev1_start_w) | |
| 195 | AM_RANGE(0x31, 0x31) AM_WRITE(adpcm_vclk_w) | |
| 196 | AM_RANGE(0x32, 0x32) AM_WRITE(adpcm_reset_inv_w) | |
| 197 | AM_RANGE(0x50, 0x50) AM_WRITE(ym2203_write_port_0_w) | |
| 198 | AM_RANGE(0x51, 0x51) AM_READ(ym2203_read_port_0_r) | |
| 199 | // AM_RANGE(0x52, 0x52) AM_WRITE(SMH_NOP) // CRT Controller | |
| 221 | 200 | ADDRESS_MAP_END |
| 222 | 201 | |
| 223 | ||
| 224 | 202 | static INPUT_PORTS_START( mj_keyboard ) |
| 225 | 203 | PORT_START("KEY0") |
| 226 | 204 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) |
| r3171 | r3172 | |
| 588 | 566 | /* basic machine hardware */ |
| 589 | 567 | MDRV_CPU_ADD("main", Z80, 20000000/4 ) /* 5 MHz ???? */ |
| 590 | 568 | MDRV_CPU_PROGRAM_MAP(hnayayoi_readmem,hnayayoi_writemem) |
| 591 | MDRV_CPU_IO_MAP(hnayayoi_ | |
| 569 | MDRV_CPU_IO_MAP(hnayayoi_ | |
| 592 | 570 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 593 | 571 | MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 8000) |
| 594 | 572 | |
| r3171 | r3172 | |
| 629 | 607 | MDRV_IMPORT_FROM(hnayayoi) |
| 630 | 608 | MDRV_CPU_MODIFY("main") |
| 631 | 609 | MDRV_CPU_PROGRAM_MAP(hnfubuki_readmem,hnfubuki_writemem) |
| 632 | MDRV_CPU_IO_MAP(hnfubuki_readport,hnfubuki_writeport) | |
| 633 | 610 | MACHINE_DRIVER_END |
| 634 | 611 | |
| 635 | 612 | static MACHINE_DRIVER_START( untoucha ) |
| 636 | 613 | MDRV_IMPORT_FROM(hnayayoi) |
| 637 | 614 | MDRV_CPU_MODIFY("main") |
| 638 | 615 | MDRV_CPU_PROGRAM_MAP(untoucha_readmem,untoucha_writemem) |
| 639 | MDRV_CPU_IO_MAP(untoucha_ | |
| 616 | MDRV_CPU_IO_MAP(untoucha_i | |
| 640 | 617 | |
| 641 | 618 | MDRV_VIDEO_START(untoucha) |
| 642 | 619 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 736 | 713 | GAME( 1987, hnayayoi, 0, hnayayoi, hnayayoi, 0, ROT0, "Dyna Electronics", "Hana Yayoi (Japan)", 0 ) |
| 737 | 714 | GAME( 1987, hnfubuki, hnayayoi, hnfubuki, hnfubuki, hnfubuki, ROT0, "Dynax", "Hana Fubuki [BET] (Japan)", 0 ) |
| 738 | 715 | GAME( 1987, untoucha, 0, untoucha, untoucha, 0, ROT0, "Dynax", "Untouchable (Japan)", 0 ) |
| 716 |
| r3171 | r3172 | |
|---|---|---|
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | /* |
| 12 | Raiden 2 Hardware | |
| 12 | Raiden DX | |
| 13 | Seibu Kaihatsu, 1994 | |
| 13 | 14 | |
| 15 | This readme covers Raiden DX and to some extent Raiden II | |
| 16 | which uses an almost identical PCB. | |
| 17 | ||
| 18 | PCB Layout | |
| 19 | ---------- | |
| 20 | ||
| 21 | (C) 1993 RAIDEN II DX SEIBU KAIHATSU INC.,o | |
| 22 | |----------------------------------------------------------| | |
| 23 | | 1 2 3 4 5 6 7 8 9 10 | | |
| 24 | |LA4460 M6295 PCM Z80 6116 A| | |
| 25 | | YM2151 M6295 6 5 6116 28.63636MHz B| | |
| 26 | | VOL YM3012 | | |
| 27 | |HB-45A |------| C| | |
| 28 | |HB-2 4560 |SIE150| 6116 |---------| | | |
| 29 | |RC220 | | 6116 | SEI252 | D| | |
| 30 | | |------| 6116 |SB05-106 | | | |
| 31 | | 6116 |(QFP208) | E| | |
| 32 | |J | | F| | |
| 33 | |A DSW2(8) |---------| | | |
| 34 | |M G| | |
| 35 | |M DSW1(8) CXK58258 | | |
| 36 | |A |---------|OBJ-1 OBJ-2 CXK58258 H| | |
| 37 | | | SEI360 | CXK58258 J| | |
| 38 | | |SB06-1937|DX_OBJ-3 DX_OBJ-4 CXK58258 K| | |
| 39 | | |(QFP160) | PAL1 |---------| L| | |
| 40 | | | | |SEI1000 | M| | |
| 41 | | |------| |---------| 1H 3H |SB01-001 | N| | |
| 42 | | |SEI200| 32MHz |(QFP184) | | | |
| 43 | | | |CY7C185 2H 4H | | P| | |
| 44 | | |------|CY7C185 |---------| | | |
| 45 | | Q| | |
| 46 | | PAL2 PAL3 |----| R| | |
| 47 | | |V30 | | | |
| 48 | | DX_BACK-1 DX_BACK-2 7 COPX-D2 |----| S| | |
| 49 | |----------------------------------------------------------| | |
| 50 | Notes: | |
| 51 | V30 clock - 16.000MHz [32/2]. Chip is stamped "NEC D70116HG-16 V30 NEC '84" (QFP52) | |
| 52 | Z80 clock - 3.579545MHz [28.63636/8] | |
| 53 | YM2151 clock - 3.579545MHz [28.63636/8] | |
| 54 | M6295 clocks - 1.022MHz [28.63636/28] and pin 7 HIGH (both) | |
| 55 | CXK58258 - Sony CXK58258 32k x8 SRAM (= 62256) | |
| 56 | CY7C185 - Cypress CY7C185 8k x8 SRAM (= 6264) | |
| 57 | 6116 - 2k x8 SRAM | |
| 58 | HB-45A - Seibu custom ceramic module sound DAC (SIP20) | |
| 59 | HB-2 - Seibu custom ceramic module connected to coin counters (SIP10) | |
| 60 | RC220 - Custom resistor network module used for inputs (SIP14) | |
| 61 | VSync - 55.4859Hz \ | |
| 62 | HSync - 15.5586kHz / measured via EL4583 | |
| 63 | PAL1 - AMI 18CV8 stamped 'JJ5004' (DIP20) | |
| 64 | PAL2 - AMI 18CV8 stamped 'JJ5002' (DIP20) | |
| 65 | PAL3 - AMI 18CV8 stamped 'JJ5001' (DIP20) | |
| 66 | ROMs - *PCM - 2M MaskROM stamped 'RAIDEN 2 PCM' at location U1018 (DIP32) | |
| 67 | 6 - 27C020 EPROM labelled 'SEIBU 6' at location U1017 (DIP32) | |
| 68 | 5 - 27C512 EPROM labelled 'SEIBU 5' at location U1110 (DIP28) | |
| 69 | *OBJ-1 - 16M MaskROM stamped 'RAIDEN 2 OBJ-1' at location U0811 (DIP42) | |
| 70 | *OBJ-2 - 16M MaskROM stamped 'RAIDEN 2 OBJ-2' at location U082 (DIP42) | |
| 71 | DX_OBJ-3 - 16M MaskROM stamped 'DX OBJ-3' at location U0837 (DIP42) | |
| 72 | DX_OBJ-4 - 16M MaskROM stamped 'DX OBJ-4' at location U0836 (DIP42) | |
| 73 | 1H - 27C4001 EPROM labelled 'SEIBU 1H' at location U1210 (DIP32) | |
| 74 | 2H - 27C4001 EPROM labelled 'SEIBU 2H' at location U1211 (DIP32) | |
| 75 | 3H - 27C4001 EPROM labelled 'SEIBU 3H' at location U129 (DIP32) | |
| 76 | 4H - 27C4001 EPROM labelled 'SEIBU 4H' at location U1212 (DIP32) | |
| 77 | DX_BACK-1 - 16M MaskROM stamped 'DX BACK-1' at location U075 (DIP42) | |
| 78 | DX_BACK-2 - 16M MaskROM stamped 'DX BACK-2' at location U0714 (DIP42) | |
| 79 | 7 - 27C210 EPROM labelled 'SEIBU 7' at location U0724 (DIP40) | |
| 80 | *COPX-D2 - 2M MaskROM stamped 'COPX-D2' at location U0313 (DIP40) | |
| 81 | ||
| 82 | * = these ROMs are soldered-in and match ROMs from the original Raiden II PCB | |
| 83 | ||
| 84 | SEIBU Custom ICs - | |
| 85 | SIE150 (QFP100) | |
| 86 | SEI252 SB05-106 (QFP208) | |
| 87 | SEI0200 TC110G21AF 0076 (QFP100) | |
| 88 | SEI360 SB06-1937 (QFP160) | |
| 89 | SEI1000 SB01-001 (QFP184) | |
| 90 | ||
| 91 | ||
| 14 | 92 | Games on this PCB / Similar PCBs |
| 15 | 93 | Raiden 2 |
| 16 | 94 | Raiden DX |
| r3171 | r3172 | |
| 1091 | 1169 | --------------------------------------- |
| 1092 | 1170 | malcor |
| 1093 | 1171 | |
| 1094 | ||
| 1095 | ||
| 1096 | 1172 | Location Type File ID Checksum |
| 1097 | 1173 | ------------------------------------------- |
| 1098 | 1174 | M6 U0211 27C240 ROM1 F9A9 |
| r3171 | r3172 | |
| 1283 | 1359 | of an ascending fighter. |
| 1284 | 1360 | |
| 1285 | 1361 | The entire FAQ is available here: |
| 1286 | ||
| 1287 | 1362 | http://www.gamefaqs.com/coinop/arcade/game/10729.html |
| 1288 | 1363 | |
| 1289 | Note: | |
| 1290 | This dump only contains the ROMS which differ from | |
| 1291 | the current available dump. | |
| 1292 | ||
| 1293 | Documentation: | |
| 1294 | ||
| 1295 | Name Size CRC32 | |
| 1296 | -------------------------------- | |
| 1297 | raiden2.jpg 822390 0x6babdbaf | |
| 1298 | ||
| 1299 | Roms: | |
| 1300 | ||
| 1301 | Name Size CRC32 Chip Type | |
| 1302 | ------------------------------------------- | |
| 1303 | r2_prg_0.bin 524288 0x2abc848c 27C240 | |
| 1304 | r2_prg_1.bin 524288 0x509ade43 27C240 | |
| 1305 | r2_fx0.bin 131072 0xc709bdf6 27C1024 | |
| 1306 | r2_snd.bin 65536 0x6bad0a3e 27C512 | |
| 1307 | r2_voi1.bin 262144 0x488d050f 27C020 | |
| 1308 | r2_voi2.bin 262144 0x8cf0d17e TC534000P Dumped as 27C040. 1'st and | |
| 1309 | 2'nd half identical. Cut in | |
| 1310 | half. | |
| 1311 | ||
| 1312 | 1364 | */ |
| 1313 | 1365 | |
| 1314 | 1366 | ROM_START( raiden2e ) |
| r3171 | r3172 | |
| 1376 | 1428 | |
| 1377 | 1429 | /* Raiden DX sets */ |
| 1378 | 1430 | |
| 1379 | /* | |
| 1380 | Raiden DX | |
| 1381 | Seibu Kaihatsu, 1994 | |
| 1382 | ||
| 1383 | PCB Layout | |
| 1384 | ---------- | |
| 1385 | ||
| 1386 | (C) 1993 RAIDEN II DX SEIBU KAIHATSU INC.,o | |
| 1387 | |----------------------------------------------------------| | |
| 1388 | | 1 2 3 4 5 6 7 8 9 10 | | |
| 1389 | |LA4460 M6295 PCM Z80 6116 A| | |
| 1390 | | YM2151 M6295 6 5 6116 28.63636MHz B| | |
| 1391 | | VOL YM3012 | | |
| 1392 | | |------| C| | |
| 1393 | | 4560 |SIE150| 6116 |---------| | | |
| 1394 | | | | 6116 | SEI252 | D| | |
| 1395 | |J |------| 6116 |SB05-106 | | | |
| 1396 | |A 6116 |(QFP208) | E| | |
| 1397 | |M | | F| | |
| 1398 | |M DSW2(8) |---------| | | |
| 1399 | |A G| | |
| 1400 | | DSW1(8) CXK58258 | | |
| 1401 | | |---------|OBJ-1 OBJ-2 CXK58258 H| | |
| 1402 | | | SEI360 | CXK58258 J| | |
| 1403 | | |SB06-1937|DX_OBJ-3 DX_OBJ-4 CXK58258 K| | |
| 1404 | | |(QFP160) | PAL1 |---------| L| | |
| 1405 | | | | |SEI1000 | M| | |
| 1406 | | |------| |---------| 1H 3H |SB01-001 | N| | |
| 1407 | | |SEI200| 32MHz |(QFP184) | | | |
| 1408 | | | |CY7C185 2H 4H | | P| | |
| 1409 | | |------|CY7C185 |---------| | | |
| 1410 | | Q| | |
| 1411 | | PAL2 PAL3 |----| R| | |
| 1412 | | |V30 | | | |
| 1413 | | DX_BACK-1 DX_BACK-2 7 COPX-D2 |----| S| | |
| 1414 | |----------------------------------------------------------| | |
| 1415 | Notes: | |
| 1416 | V30 clock - 16.000MHz [32/2]. Chip is stamped "NEC D70116HG-16 V30 NEC '84" (QFP52) | |
| 1417 | Z80 clock - 3.579545MHz [28.63636/8] | |
| 1418 | YM2151 clock - 3.579545MHz [28.63636/8] | |
| 1419 | M6295 clocks - 1.022MHz [28.63636/28]. Sample rate 1022000 / 132 | |
| 1420 | VSync - 58Hz | |
| 1421 | HSync - 15.59kHz | |
| 1422 | PAL1 - AMI 18CV8 stamped 'JJ5004' (DIP20) | |
| 1423 | PAL2 - AMI 18CV8 stamped 'JJ5002' (DIP20) | |
| 1424 | PAL3 - AMI 18CV8 stamped 'JJ5001' (DIP20) | |
| 1425 | ROMs - | |
| 1426 | *PCM - 2M MaskROM stamped 'RAIDEN 2 PCM' at location U1018 (DIP32) | |
| 1427 | 6 - 27C020 EPROM labelled 'SEIBU 6' at location U1017 (DIP32) | |
| 1428 | 5 - 27C512 EPROM labelled 'SEIBU 5' at location U1110 (DIP28) | |
| 1429 | *OBJ-1 - 16M MaskROM stamped 'RAIDEN 2 OBJ-1' at location U0811 (DIP42) | |
| 1430 | *OBJ-2 - 16M MaskROM stamped 'RAIDEN 2 OBJ-2' at location U082 (DIP42) | |
| 1431 | DX_OBJ-3 - 16M MaskROM stamped 'DX OBJ-3' at location U0837 (DIP42) | |
| 1432 | DX_OBJ-4 - 16M MaskROM stamped 'DX OBJ-4' at location U0836 (DIP42) | |
| 1433 | 1H - 27C4001 EPROM labelled 'SEIBU 1H' at location U1210 (DIP32) | |
| 1434 | 2H - 27C4001 EPROM labelled 'SEIBU 2H' at location U1211 (DIP32) | |
| 1435 | 3H - 27C4001 EPROM labelled 'SEIBU 3H' at location U129 (DIP32) | |
| 1436 | 4H - 27C4001 EPROM labelled 'SEIBU 4H' at location U1212 (DIP32) | |
| 1437 | DX_BACK-1 - 16M MaskROM stamped 'DX BACK-1' at location U075 (DIP42) | |
| 1438 | DX_BACK-2 - 16M MaskROM stamped 'DX BACK-2' at location U0714 (DIP42) | |
| 1439 | 7 - 27C210 EPROM labelled 'SEIBU 7' at location U0724 (DIP40) | |
| 1440 | *COPX-D2 - 2M MaskROM stamped 'COPX-D2' at location U0313 (DIP40) | |
| 1441 | * means these ROMs are soldered-in and match ROMs from the original Raiden II PCB | |
| 1442 | ||
| 1443 | SEIBU Custom ICs - | |
| 1444 | SIE150 (QFP100) | |
| 1445 | SEI252 SB05-106 (QFP208) | |
| 1446 | SEI0200 TC110G21AF 0076 (QFP100) | |
| 1447 | SEI360 SB06-1937 (QFP160) | |
| 1448 | SEI1000 SB01-001 (QFP184) | |
| 1449 | ||
| 1450 | NOTE! DX_1H.4N is bad (ROM was blown, I get a different read each time). The rest of the program ROMs are ok. | |
| 1451 | The PCB was only partially working originally (locks up almost immediately on power-up). I replaced the program ROMs from a | |
| 1452 | different set and it works, but locks up after a few minutes and the colors are bad ;-( | |
| 1453 | The intention of this particular dump is to complete the archive of the BG and OBJ ROMs that are soldered-in and are | |
| 1454 | not in the other dumps, and to better document the hardware :-) | |
| 1455 | */ | |
| 1456 | 1431 | ROM_START( raidndx ) |
| 1457 | 1432 | ROM_REGION( 0x200000, "user1", 0 ) /* v30 main cpu */ |
| 1458 | 1433 | ROM_LOAD32_BYTE("dx_1h.4n", 0x000000, 0x80000, BAD_DUMP CRC(7624c36b) SHA1(84c17f2988031210d06536710e1eac558f4290a1) ) // bad |
| r3171 | r3172 | |
| 1485 | 1460 | ROM_REGION( 0x40000, "user2", 0 ) /* COPDX */ |
| 1486 | 1461 | ROM_LOAD( "copx-d2.6s", 0x00000, 0x40000, CRC(a6732ff9) SHA1(c4856ec77869d9098da24b1bb3d7d58bb74b4cda) ) |
| 1487 | 1462 | ROM_END |
| 1488 | /* | |
| 1489 | 1463 | |
| 1490 | Raiden DX, Seibu License, Japan Version | |
| 1491 | ||
| 1492 | Note: | |
| 1493 | This dump only contains dumps from | |
| 1494 | the EPROMS. I have not dumped the OTP's. | |
| 1495 | ||
| 1496 | This dump is from the first revision | |
| 1497 | of the PCB. The board is labeled: | |
| 1498 | ||
| 1499 | "(C) 1993 RAIDEN II DX SEIBU KAIHATSU INC.,o" | |
| 1500 | ||
| 1501 | As far as I can see this PCB is exactly the same | |
| 1502 | as the RAIDEN 2 PCB I have dumped earlier. | |
| 1503 | ||
| 1504 | There exists a newer version which only contains SMD chips. | |
| 1505 | ||
| 1506 | Documentation: | |
| 1507 | ||
| 1508 | Name Size CRC32 | |
| 1509 | -------------------------------- | |
| 1510 | rdx_pcb.jpg 662446 0x282a5e53 | |
| 1511 | rdx_dip.jpg 541975 0x340664ec 200 DPI | |
| 1512 | ||
| 1513 | Roms: | |
| 1514 | ||
| 1515 | Name Size CRC32 Chip Type | |
| 1516 | ------------------------------------------- | |
| 1517 | rdxj_1.bin 524288 0xb5b32885 27C4001 | |
| 1518 | rdxj_2.bin 524288 0x7efd581d 27C4001 | |
| 1519 | rdxj_3.bin 524288 0x55ec0e1d 27C4001 | |
| 1520 | rdxj_4.bin 524288 0xf8fb31b4 27C4001 | |
| 1521 | rdxj_5.bin 65536 0x8c46857a 27C512 | |
| 1522 | rdxj_6.bin 262144 0x9a9196da 27C020 | |
| 1523 | rdxj_7.bin 131072 0xc73986d4 27C210 | |
| 1524 | ||
| 1525 | */ | |
| 1526 | ||
| 1527 | 1464 | ROM_START( raidndxj ) |
| 1528 | 1465 | ROM_REGION( 0x200000, "user1", 0 ) /* v30 main cpu */ |
| 1529 | 1466 | ROM_LOAD32_BYTE("rdxj_1.bin", 0x000000, 0x80000, CRC(b5b32885) SHA1(fb3c592b2436d347103c17bd765176062be95fa2) ) |
| r3171 | r3172 | |
| 1557 | 1494 | ROM_LOAD( "dx_pcm.3a", 0x00000, 0x40000, CRC(8cf0d17e) SHA1(0fbe0b1e1ca5360c7c8329331408e3d799b4714c) ) |
| 1558 | 1495 | |
| 1559 | 1496 | ROM_REGION( 0x40000, "user2", 0 ) /* COPDX */ |
| 1560 | | |
| 1497 | | |
| 1561 | 1498 | ROM_LOAD( "copx-d2.6s", 0x00000, 0x40000, CRC(a6732ff9) SHA1(c4856ec77869d9098da24b1bb3d7d58bb74b4cda) ) |
| 1562 | 1499 | ROM_END |
| 1563 | 1500 | |
| 1564 | /* | |
| 1565 | ||
| 1566 | Raiden DX, 1993 Seibu | |
| 1567 | ||
| 1568 | CPU: NEC V30 | |
| 1569 | SND: YM2151, 2x OKI 6295 | |
| 1570 | OSC: 32.000Mhz, 28.6360 Mhz | |
| 1571 | Dips: 2x 8position. see attached zip DIPS.ZIP, for Dip info | |
| 1572 | ||
| 1573 | Other (square socket mounted) chips, SEI1000SB01-001, SEI360 SB06-1937, SEI252 SB05-106, SEI0200 TC110G21AF, SIE150 W (then a triangle symbol then)40101 | |
| 1574 | btw, the last chip is labelled SIE, its not a typo :) | |
| 1575 | ||
| 1576 | ||
| 1577 | I also see a chip labelled COPX-D2 (C) Rise Corp. 1992, likely a protection CPU :( | |
| 1578 | ||
| 1579 | Raiden DX is actually Raiden II with some changed BG and OBJ roms. | |
| 1580 | It uses many of the roms from Raiden II, including some chips labelled.... | |
| 1581 | ||
| 1582 | RAIDEN II-PCM | |
| 1583 | RAIDEN 2 OBJ1 | |
| 1584 | RAIDEN 2 OBJ2 | |
| 1585 | ||
| 1586 | ||
| 1587 | These chips are particular to Raiden DX... | |
| 1588 | ||
| 1589 | DX BACK-1 TC5316200CP | |
| 1590 | DX BACK-2 TC5316200CP | |
| 1591 | DX OBJ3 TC5316200CP | |
| 1592 | DX OBJ4 TC5316200CP | |
| 1593 | ||
| 1594 | DX-1D 27C4000 | |
| 1595 | DX-2D 27C4000 | |
| 1596 | DX-3D 27C4000 | |
| 1597 | DX-4D 27C4000 | |
| 1598 | DX-5 27C512 | |
| 1599 | DX-6 27020 | |
| 1600 | DX-7 27C1024 | |
| 1601 | ||
| 1602 | Unfortunately, my reader doesnt support 42 pin roms, so i can not dump the BACK and OBJ roms. | |
| 1603 | ||
| 1604 | */ | |
| 1605 | ||
| 1606 | ROM_START( raidndxa ) | |
| 1501 | ROM_START( raidndxt ) | |
| 1607 | 1502 | ROM_REGION( 0x200000, "user1", 0 ) /* v30 main cpu */ |
| 1608 | ROM_LOAD32_BYTE("dx-1d.bin", 0x000000, 0x80000, CRC(14d725fc) SHA1(f12806f64f069fdc4ee29b309a32f7ca00b36f93) ) | |
| 1609 | ROM_LOAD32_BYTE("dx-2d.bin", 0x000001, 0x80000, CRC(5e7e45cb) SHA1(94eff893b5335c522f1c063c3175b9bac87b0a25) ) | |
| 1610 | ROM_LOAD32_BYTE("dx-3d.bin", 0x000002, 0x80000, CRC(f0a47e67) SHA1(8cbd21993077b2e01295db6e343cae9e0e4bfefe) ) | |
| 1611 | ROM_LOAD32_BYTE("dx-4d.bin", 0x000003, 0x80000, CRC(6bde6edc) SHA1(c3565a55b858c10659fd9b93b1cd92bc39e6446d) ) | |
| 1503 | ROM_LOAD32_BYTE("1d.u1210", 0x000000, 0x80000, CRC(14d725fc) SHA1(f12806f64f069fdc4ee29b309a32f7ca00b36f93) ) | |
| 1504 | ROM_LOAD32_BYTE("2d.u1211", 0x000001, 0x80000, CRC(5e7e45cb) SHA1(94eff893b5335c522f1c063c3175b9bac87b0a25) ) | |
| 1505 | ROM_LOAD32_BYTE("3d.u129", 0x000002, 0x80000, CRC(f0a47e67) SHA1(8cbd21993077b2e01295db6e343cae9e0e4bfefe) ) | |
| 1506 | ROM_LOAD32_BYTE("4d.u1212", 0x000003, 0x80000, CRC(6bde6edc) SHA1(c3565a55b858c10659fd9b93b1cd92bc39e6446d) ) | |
| 1612 | 1507 | |
| 1613 | 1508 | ROM_REGION( 0x20000, "audio", 0 ) /* 64k code for sound Z80 */ |
| 1614 | ROM_LOAD( " | |
| 1509 | ROM_LOAD( " | |
| 1615 | 1510 | |
| 1616 | 1511 | ROM_REGION( 0x020000, "gfx1", ROMREGION_DISPOSE ) /* chars */ |
| 1617 | ROM_LOAD( " | |
| 1512 | ROM_LOAD( " | |
| 1618 | 1513 | |
| 1619 | 1514 | ROM_REGION( 0x400000, "gfx2", ROMREGION_DISPOSE ) /* background gfx */ |
| 1620 | /* not from this set, assumed to be the same */ | |
| 1621 | ROM_LOAD( "dx_back1.1s", 0x000000, 0x200000, CRC(90970355) SHA1(d71d57cd550a800f583550365102adb7b1b779fc) ) | |
| 1622 | ROM_LOAD( "dx_back2.2s", 0x200000, 0x200000, CRC(5799af3e) SHA1(85d6532abd769da77bcba70bd2e77915af40f987) ) | |
| 1515 | ROM_LOAD( "dx_back-1.u075", 0x000000, 0x200000, CRC(90970355) SHA1(d71d57cd550a800f583550365102adb7b1b779fc) ) | |
| 1516 | ROM_LOAD( "dx_back-2.u0714", 0x200000, 0x200000, CRC(5799af3e) SHA1(85d6532abd769da77bcba70bd2e77915af40f987) ) | |
| 1623 | 1517 | |
| 1624 | 1518 | ROM_REGION( 0x800000, "gfx3", ROMREGION_DISPOSE ) /* sprite gfx (encrypted) */ |
| 1625 | /* not from this set, assumed to be the same */ | |
| 1626 | ROM_LOAD32_WORD( "obj1", 0x000000, 0x200000, CRC(ff08ef0b) SHA1(a1858430e8171ca8bab785457ef60e151b5e5cf1) ) /* Shared with original Raiden 2 */ | |
| 1627 | ROM_LOAD32_WORD( "obj2", 0x000002, 0x200000, CRC(638eb771) SHA1(9774cc070e71668d7d1d20795502dccd21ca557b) ) /* Shared with original Raiden 2 */ | |
| 1628 | ROM_LOAD32_WORD( "dx_obj3.4k", 0x400000, 0x200000, CRC(ba381227) SHA1(dfc4d659aca1722a981fa56a31afabe66f444d5d) ) | |
| 1629 | ROM_LOAD32_WORD( "dx_obj4.6k", 0x400002, 0x200000, CRC(65e50d19) SHA1(c46147b4132abce7314b46bf419ce4773e024b05) ) | |
| 1519 | ROM_LOAD32_WORD( "obj-1.u0811", 0x000000, 0x200000, CRC(ff08ef0b) SHA1(a1858430e8171ca8bab785457ef60e151b5e5cf1) ) /* Shared with original Raiden 2 */ | |
| 1520 | ROM_LOAD32_WORD( "obj-2.u082", 0x000002, 0x200000, CRC(638eb771) SHA1(9774cc070e71668d7d1d20795502dccd21ca557b) ) /* Shared with original Raiden 2 */ | |
| 1521 | ROM_LOAD32_WORD( "dx_obj-3.u0837", 0x400000, 0x200000, CRC(ba381227) SHA1(dfc4d659aca1722a981fa56a31afabe66f444d5d) ) | |
| 1522 | ROM_LOAD32_WORD( "dx_obj-4.u0836", 0x400002, 0x200000, CRC(65e50d19) SHA1(c46147b4132abce7314b46bf419ce4773e024b05) ) | |
| 1630 | 1523 | |
| 1631 | 1524 | ROM_REGION( 0x100000, "oki1", 0 ) /* ADPCM samples */ |
| 1632 | ROM_LOAD( "dx_6.3b", 0x00000, 0x40000, CRC(9a9196da) SHA1(3d1ee67fb0d40a231ce04d10718f07ffb76db455) ) | |
| 1633 | /* not from this set, assumed to be the same */ | |
| 1525 | ROM_LOAD( "6.u1017", 0x00000, 0x40000, CRC(9a9196da) SHA1(3d1ee67fb0d40a231ce04d10718f07ffb76db455) ) | |
| 1634 | 1526 | |
| 1635 | 1527 | ROM_REGION( 0x100000, "oki2", 0 ) /* ADPCM samples */ |
| 1636 | ROM_LOAD( " | |
| 1528 | ROM_LOAD( " | |
| 1637 | 1529 | |
| 1638 | 1530 | ROM_REGION( 0x40000, "user2", 0 ) /* COPDX */ |
| 1639 | /* not from this set, assumed to be the same */ | |
| 1640 | ROM_LOAD( "copx-d2.6s", 0x00000, 0x40000, CRC(a6732ff9) SHA1(c4856ec77869d9098da24b1bb3d7d58bb74b4cda) ) | |
| 1531 | ROM_LOAD( "copx-d2.u0313", 0x00000, 0x40000, CRC(a6732ff9) SHA1(c4856ec77869d9098da24b1bb3d7d58bb74b4cda) ) | |
| 1641 | 1532 | ROM_END |
| 1642 | 1533 | |
| 1643 | 1534 | ROM_START( raidndxm ) |
| r3171 | r3172 | |
| 1680 | 1571 | |
| 1681 | 1572 | /* Zero Team sets */ |
| 1682 | 1573 | |
| 1683 | ||
| 1684 | 1574 | ROM_START( zeroteam ) |
| 1685 | 1575 | ROM_REGION( 0x200000, "user1", 0 ) /* v30 main cpu */ |
| 1686 | 1576 | ROM_LOAD32_BYTE("1.5k", 0x000000, 0x40000, CRC(25aa5ba4) SHA1(40e6047620fbd195c87ac3763569af099096eff9) ) |
| r3171 | r3172 | |
| 2216 | 2106 | GAME( 1993, raiden2e, raiden2, raiden2, raiden2, raiden2, ROT270, "Seibu Kaihatsu", "Raiden 2 (set 6, Easy Version)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2217 | 2107 | GAME( 1993, raiden2f, raiden2, raiden2, raiden2, raiden2, ROT270, "Seibu Kaihatsu", "Raiden 2 (set 7)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2218 | 2108 | GAME( 1993, raidndx, 0, raiden2, raidendx, raiden2, ROT270, "Seibu Kaihatsu", "Raiden DX (set 1)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2219 | GAME( 1993, raidndxa, raidndx, raiden2, raidendx, raiden2, ROT270, "Seibu Kaihatsu", "Raiden DX (set 2)", GAME_NOT_WORKING|GAME_NO_SOUND) | |
| 2220 | 2109 | GAME( 1993, raidndxm, raidndx, raiden2, raidendx, raiden2, ROT270, "Seibu Kaihatsu", "Raiden DX (Metrotainment license)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2221 | 2110 | GAME( 1993, raidndxj, raidndx, raiden2, raidendx, raiden2, ROT270, "Seibu Kaihatsu", "Raiden DX (Japan)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2111 | GAME( 1993, raidndxt, raidndx, raiden2, raidendx, raiden2, ROT270, "Seibu Kaihatsu", "Raiden DX (Tuning license)", GAME_NOT_WORKING|GAME_NO_SOUND) | |
| 2222 | 2112 | GAME( 1993, zeroteam, 0, raiden2, raiden2, raiden2, ROT0, "Seibu Kaihatsu", "Zero Team (set 1)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2223 | 2113 | GAME( 1993, zeroteaa, zeroteam,raiden2, raiden2, raiden2, ROT0, "Seibu Kaihatsu", "Zero Team (set 2)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2224 | 2114 | GAME( 1993, zeroteab, zeroteam,raiden2, raiden2, raiden2, ROT0, "Seibu Kaihatsu", "Zero Team (set 3)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| r3171 | r3172 | |
|---|---|---|
| 53 | 53 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 54 | 54 | AM_RANGE(0x0000, 0x4fff) AM_ROM |
| 55 | 55 | AM_RANGE(0x5800, 0x5fff) AM_RAM |
| 56 | AM_RANGE(0x6081, 0x6081) AM_READWRITE(input_port_0_r, zodiack_control_w) | |
| 57 | AM_RANGE(0x6082, 0x6082) AM_READ(input_port_1_r) | |
| 58 | AM_RANGE(0x6083, 0x6083) AM_READ(input_port_2_r) | |
| 59 | AM_RANGE(0x6084, 0x6084) AM_READ(input_port_3_r) | |
| 56 | AM_RANGE(0x6081, 0x6081) AM_READ_PORT("DSW0") AM_WRITE(zodiack_control_w) | |
| 57 | AM_RANGE(0x6082, 0x6082) AM_READ_PORT("DSW1") | |
| 58 | AM_RANGE(0x6083, 0x6083) AM_READ_PORT("IN0") | |
| 59 | AM_RANGE(0x6084, 0x6084) AM_READ_PORT("IN1") | |
| 60 | 60 | AM_RANGE(0x6090, 0x6090) AM_READWRITE(soundlatch_r, zodiac_master_soundlatch_w) |
| 61 | 61 | AM_RANGE(0x7000, 0x7000) AM_READWRITE(SMH_NOP,watchdog_reset_w) /* NOP??? */ |
| 62 | 62 | AM_RANGE(0x7100, 0x7100) AM_WRITE(zodiac_master_interrupt_enable_w) |
| r3171 | r3172 | |
|---|---|---|
| 86 | 86 | tilemap_mark_tile_dirty(mogura_tilemap,offset&0x7ff); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | static WRITE8_HANDLER(dac_w) | |
| 90 | { | |
| 91 | dac_0_data_w(machine, 0, data & 0xf0 ); /* left */ | |
| 92 | dac_1_data_w(machine, 0, (data & 0x0f)<<4 ); /* right */ | |
| 93 | } | |
| 89 | 94 | |
| 90 | static ADDRESS_MAP_START( | |
| 95 | static ADDRESS_MAP_START( io_ma | |
| 91 | 96 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 97 | AM_RANGE(0x00, 0x00) AM_WRITE(SMH_NOP) // ?? | |
| 92 | 98 | AM_RANGE(0x08, 0x08) AM_READ_PORT("SYSTEM") |
| 93 | 99 | AM_RANGE(0x0c, 0x0c) AM_READ_PORT("P1") |
| 94 | 100 | AM_RANGE(0x0d, 0x0d) AM_READ_PORT("P2") |
| 95 | 101 | AM_RANGE(0x0e, 0x0e) AM_READ_PORT("P3") |
| 96 | 102 | AM_RANGE(0x0f, 0x0f) AM_READ_PORT("P4") |
| 97 | 103 | AM_RANGE(0x10, 0x10) AM_READ_PORT("SERVICE") |
| 98 | ADDRESS_MAP_END | |
| 99 | ||
| 100 | ||
| 101 | static WRITE8_HANDLER(dac_w) | |
| 102 | { | |
| 103 | dac_0_data_w(machine, 0, data & 0xf0 ); /* left */ | |
| 104 | dac_1_data_w(machine, 0, (data & 0x0f)<<4 ); /* right */ | |
| 105 | } | |
| 106 | ||
| 107 | ||
| 108 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 109 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 110 | AM_RANGE(0x00, 0x00) AM_WRITE(SMH_NOP) // ?? | |
| 111 | 104 | AM_RANGE(0x14, 0x14) AM_WRITE(dac_w) /* 4 bit DAC x 2. MSB = left, LSB = right */ |
| 112 | 105 | ADDRESS_MAP_END |
| 113 | 106 | |
| r3171 | r3172 | |
| 214 | 207 | /* basic machine hardware */ |
| 215 | 208 | MDRV_CPU_ADD("main", Z80,3000000) /* 3 MHz */ |
| 216 | 209 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 217 | MDRV_CPU_IO_MAP( | |
| 210 | MDRV_CPU_IO_MAP(io_ma | |
| 218 | 211 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 219 | 212 | |
| 220 | 213 | MDRV_GFXDECODE(mogura) |
| r3171 | r3172 | |
| 252 | 245 | ROM_END |
| 253 | 246 | |
| 254 | 247 | GAME( 1991, mogura, 0, mogura, mogura, 0, ROT0, "Konami", "Mogura Desse", 0 ) |
| 248 |
| r3171 | r3172 | |
|---|---|---|
| 126 | 126 | AM_RANGE(0xc807, 0xc807) AM_WRITE(pitnrun_ha_w) |
| 127 | 127 | ADDRESS_MAP_END |
| 128 | 128 | |
| 129 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 129 | ||
| 130 | static ADDRESS_MAP_START( sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 130 | 131 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 131 | 132 | AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_w) |
| 132 | 133 | AM_RANGE(0x8c, 0x8c) AM_WRITE(ay8910_control_port_1_w) |
| 133 | 134 | AM_RANGE(0x8d, 0x8d) AM_WRITE(ay8910_write_port_1_w) |
| 134 | 135 | AM_RANGE(0x8e, 0x8e) AM_WRITE(ay8910_control_port_0_w) |
| 135 | AM_RANGE(0x8f, 0x8f) AM_WRITE(ay8910_write_port_0_w) | |
| 136 | AM_RANGE(0x8f, 0x8f) AM_READWRITE(ay8910_read_port_0_r, ay8910_write_port_0_w) | |
| 136 | 137 | AM_RANGE(0x90, 0x96) AM_WRITE(SMH_NOP) |
| 137 | 138 | AM_RANGE(0x97, 0x97) AM_WRITE(SMH_NOP) |
| 138 | 139 | AM_RANGE(0x98, 0x98) AM_WRITE(SMH_NOP) |
| 139 | 140 | ADDRESS_MAP_END |
| 140 | 141 | |
| 141 | static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 ) | |
| 142 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 143 | AM_RANGE(0x8f, 0x8f) AM_READ(ay8910_read_port_0_r) | |
| 144 | ADDRESS_MAP_END | |
| 145 | ||
| 146 | ||
| 147 | 142 | static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 148 | 143 | AM_RANGE(0x0000, 0x2fff) AM_READ(SMH_ROM) |
| 149 | 144 | AM_RANGE(0x3800, 0x3bff) AM_READ(SMH_RAM) |
| 150 | 145 | ADDRESS_MAP_END |
| 151 | 146 | |
| 152 | ||
| 153 | 147 | static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 154 | 148 | AM_RANGE(0x0000, 0x2fff) AM_WRITE(SMH_ROM) |
| 155 | 149 | AM_RANGE(0x3800, 0x3bff) AM_WRITE(SMH_RAM) |
| 156 | 150 | ADDRESS_MAP_END |
| 157 | 151 | |
| 152 | ||
| 158 | 153 | static ADDRESS_MAP_START( mcu_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 159 | 154 | ADDRESS_MAP_GLOBAL_MASK(0x7ff) |
| 160 | 155 | AM_RANGE(0x0000, 0x0000) AM_READ(pitnrun_68705_portA_r) |
| r3171 | r3172 | |
| 164 | 159 | AM_RANGE(0x0080, 0x07ff) AM_READ(SMH_ROM) |
| 165 | 160 | ADDRESS_MAP_END |
| 166 | 161 | |
| 167 | ||
| 168 | 162 | static ADDRESS_MAP_START( mcu_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 169 | 163 | ADDRESS_MAP_GLOBAL_MASK(0x7ff) |
| 170 | 164 | AM_RANGE(0x0000, 0x0000) AM_WRITE(pitnrun_68705_portA_w) |
| r3171 | r3172 | |
| 265 | 259 | |
| 266 | 260 | MDRV_CPU_ADD("audio", Z80, XTAL_5MHz/2) /* verified on pcb */ |
| 267 | 261 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 268 | MDRV_CPU_IO_MAP(sound_ | |
| 262 | MDRV_CPU_IO_MAP(sound_i | |
| 269 | 263 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 270 | 264 | |
| 271 | 265 | MDRV_CPU_ADD("mcu", M68705,XTAL_18_432MHz/6) /* verified on pcb */ |
| r3171 | r3172 | |
| 374 | 368 | |
| 375 | 369 | GAME( 1984, pitnrun, 0, pitnrun, pitnrun, 0, ROT90, "Taito Corporation", "Pit & Run (set 1)", GAME_IMPERFECT_SOUND ) |
| 376 | 370 | GAME( 1984, pitnruna, pitnrun, pitnrun, pitnrun, 0, ROT90, "Taito Corporation", "Pit & Run (set 2)", GAME_IMPERFECT_SOUND ) |
| 371 |
| r3171 | r3172 | |
|---|---|---|
| 302 | 302 | return soundlatch_r(machine,0); |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | static ADDRESS_MAP_START( multchmp_sound_ | |
| 305 | static ADDRESS_MAP_START( multchmp_sound_io_ma | |
| 306 | 306 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 307 | AM_RANGE(0x02, 0x02) AM_READ(okim6295_status_0_r ) // M6295 | |
| 308 | AM_RANGE(0x03, 0x03) AM_READ(esd16_sound_command_r ) // From Main CPU | |
| 309 | AM_RANGE(0x06, 0x06) AM_READ(SMH_NOP ) // ? At the start | |
| 310 | ADDRESS_MAP_END | |
| 311 | ||
| 312 | static ADDRESS_MAP_START( multchmp_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 313 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 314 | 307 | AM_RANGE(0x00, 0x00) AM_WRITE(ym3812_control_port_0_w ) // YM3812 |
| 315 | 308 | AM_RANGE(0x01, 0x01) AM_WRITE(ym3812_write_port_0_w ) |
| 316 | AM_RANGE(0x02, 0x02) AM_WRITE(okim6295_data_0_w ) // M6295 | |
| 309 | AM_RANGE(0x02, 0x02) AM_READWRITE(okim6295_status_0_r, okim6295_data_0_w) // M6295 | |
| 310 | AM_RANGE(0x03, 0x03) AM_READ(esd16_sound_command_r ) // From Main CPU | |
| 317 | 311 | AM_RANGE(0x04, 0x04) AM_WRITE(SMH_NOP ) // ? $00, $30 |
| 318 | 312 | AM_RANGE(0x05, 0x05) AM_WRITE(esd16_sound_rombank_w ) // ROM Bank |
| 319 | AM_RANGE(0x06, 0x06) AM_WRITE(SMH_NOP | |
| 313 | AM_RANGE(0x06, 0x06) AM_READWRITE(SMH_NOP, SMH_NOP | |
| 320 | 314 | ADDRESS_MAP_END |
| 321 | 315 | |
| 322 | 316 | |
| r3171 | r3172 | |
| 576 | 570 | |
| 577 | 571 | MDRV_CPU_ADD("audio", Z80, 4000000) /* ? */ |
| 578 | 572 | MDRV_CPU_PROGRAM_MAP(multchmp_sound_readmem,multchmp_sound_writemem) |
| 579 | MDRV_CPU_IO_MAP(multchmp_sound_ | |
| 573 | MDRV_CPU_IO_MAP(multchmp_sound_i | |
| 580 | 574 | MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,32) /* IRQ By Main CPU */ |
| 581 | 575 | |
| 582 | 576 | /* video hardware */ |
| r3171 | r3172 | |
| 1143 | 1137 | /* ESD - This PCB looks identical to the ESD 08-26-1999 PCB */ |
| 1144 | 1138 | GAME( 2000, tangtang, 0, tangtang, hedpanic, 0, ROT0, "ESD", "Tang Tang (ver. 0526, 26/05/2000)", 0 ) // 26/05/2000 ? |
| 1145 | 1139 | GAME( 2001, swatpolc, 0, swatpolc, swatpolc, 0, ROT0, "ESD", "SWAT Police ", 0 ) |
| 1140 |
| r3171 | r3172 | |
|---|---|---|
| 560 | 560 | msm5205_reset_w(0, !(data & 0x20) ); /* my best guess, but it could be output enable as well */ |
| 561 | 561 | } |
| 562 | 562 | |
| 563 | static ADDRESS_MAP_START( darius_sound2_ | |
| 563 | static ADDRESS_MAP_START( darius_sound2_io_ma | |
| 564 | 564 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 565 | AM_RANGE(0x00, 0x00) AM_READ(adpcm_command_read) | |
| 566 | AM_RANGE(0x02, 0x02) AM_READ(readport2) /* ??? */ | |
| 565 | AM_RANGE(0x00, 0x00) AM_READWRITE(adpcm_command_read, adpcm_nmi_disable) | |
| 566 | AM_RANGE(0x01, 0x01) AM_WRITE(adpcm_nmi_enable) | |
| 567 | AM_RANGE(0x02, 0x02) AM_READWRITE(readport2, adpcm_data_w) /* readport2 ??? */ | |
| 567 | 568 | AM_RANGE(0x03, 0x03) AM_READ(readport3) /* ??? */ |
| 568 | 569 | ADDRESS_MAP_END |
| 569 | 570 | |
| 570 | static ADDRESS_MAP_START( darius_sound2_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 571 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 572 | AM_RANGE(0x00, 0x00) AM_WRITE(adpcm_nmi_disable) | |
| 573 | AM_RANGE(0x01, 0x01) AM_WRITE(adpcm_nmi_enable) | |
| 574 | AM_RANGE(0x02, 0x02) AM_WRITE(adpcm_data_w) | |
| 575 | ADDRESS_MAP_END | |
| 576 | 571 | |
| 577 | ||
| 578 | 572 | /*********************************************************** |
| 579 | 573 | INPUT PORTS, DIPs |
| 580 | 574 | ***********************************************************/ |
| r3171 | r3172 | |
| 849 | 843 | |
| 850 | 844 | MDRV_CPU_ADD("adpcm", Z80,8000000/2) /* 4 MHz ? */ /* ADPCM player using MSM5205 */ |
| 851 | 845 | MDRV_CPU_PROGRAM_MAP(darius_sound2_readmem,darius_sound2_writemem) |
| 852 | MDRV_CPU_IO_MAP(darius_sound2_ | |
| 846 | MDRV_CPU_IO_MAP(darius_sound2_ | |
| 853 | 847 | |
| 854 | 848 | MDRV_INTERLEAVE(10) /* 10 CPU slices per frame ? */ |
| 855 | 849 | |
| r3171 | r3172 | |
| 1245 | 1239 | GAME( 1986, dariusj, darius, darius, dariusj, darius, ROT0, "Taito Corporation", "Darius (Japan)", 0 ) |
| 1246 | 1240 | GAME( 1986, dariuso, darius, darius, dariusj, darius, ROT0, "Taito Corporation", "Darius (Japan old version)", 0 ) |
| 1247 | 1241 | GAME( 1986, dariuse, darius, darius, dariuse, darius, ROT0, "Taito Corporation", "Darius (Extra) (Japan)", 0 ) |
| 1242 |
| r3171 | r3172 | |
|---|---|---|
| 123 | 123 | |
| 124 | 124 | static MACHINE_START( cchasm ) |
| 125 | 125 | { |
| 126 | ptm6840_config(0, &cchasm_6840_intf ); | |
| 126 | ptm6840_config(machine, 0, &cchasm_6840_intf ); | |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 |
| r3171 | r3172 | |
|---|---|---|
| 248 | 248 | GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 0, 32 ) |
| 249 | 249 | GFXDECODE_END |
| 250 | 250 | |
| 251 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 252 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 253 | AM_RANGE(0x06, 0x06) AM_READ(ay8910_read_port_0_r) | |
| 254 | ADDRESS_MAP_END | |
| 255 | 251 | |
| 256 | static ADDRESS_MAP_START( | |
| 252 | static ADDRESS_MAP_START( | |
| 257 | 253 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 258 | 254 | AM_RANGE(0x04, 0x04) AM_WRITE(ay8910_control_port_0_w) |
| 259 | 255 | AM_RANGE(0x05, 0x05) AM_WRITE(ay8910_write_port_0_w) |
| 256 | AM_RANGE(0x06, 0x06) AM_READ(ay8910_read_port_0_r) | |
| 260 | 257 | ADDRESS_MAP_END |
| 261 | 258 | |
| 262 | 259 | static MACHINE_DRIVER_START( skyarmy ) |
| 263 | 260 | MDRV_CPU_ADD("main", Z80,4000000) |
| 264 | 261 | MDRV_CPU_PROGRAM_MAP(skyarmy_readmem,skyarmy_writemem) |
| 265 | MDRV_CPU_IO_MAP( | |
| 262 | MDRV_CPU_IO_MAP(io_ma | |
| 266 | 263 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 267 | 264 | MDRV_CPU_PERIODIC_INT(skyarmy_nmi_source,650) /* Hz */ |
| 268 | 265 | |
| r3171 | r3172 | |
| 295 | 292 | ROM_LOAD( "a3h.bin", 0x4000, 0x2000, CRC(95485e56) SHA1(c4cbcd31ba68769d2d0d0875e2a92982265339ae) ) |
| 296 | 293 | ROM_LOAD( "j4.bin", 0x6000, 0x2000, CRC(843783df) SHA1(256d8375a8af7de080d456dbc6290a22473d011b) ) |
| 297 | 294 | |
| 298 | ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE ) | |
| 299 | ROM_LOAD( "13b.bin", 0x0000, 0x0800, CRC(3b0e0f7c) SHA1(2bbba10121d3e745146f50c14dc6df97de40fb96) ) | |
| 300 | ROM_LOAD( "15b.bin", 0x0800, 0x0800, CRC(5ccfd782) SHA1(408406ae068e5578b8a742abed1c37dcd3720fe5) ) | |
| 295 | ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE ) | |
| 296 | ROM_LOAD( "13b.bin", 0x0000, 0x0800, CRC(3b0e0f7c) SHA1(2bbba10121d3e745146f50c14dc6df97de40fb96) ) | |
| 297 | ROM_LOAD( "15b.bin", 0x0800, 0x0800, CRC(5ccfd782) SHA1(408406ae068e5578b8a742abed1c37dcd3720fe5) ) | |
| 301 | 298 | |
| 302 | ROM_REGION( 0x1000, "gfx2", ROMREGION_DISPOSE ) | |
| 303 | ROM_LOAD( "8b.bin", 0x0000, 0x0800, CRC(6ac6bd98) SHA1(e653d80ec1b0f8e07821ea781942dae3de7d238d) ) | |
| 304 | ROM_LOAD( "10b.bin", 0x0800, 0x0800, CRC(cada7682) SHA1(83ce8336274cb8006a445ac17a179d9ffd4d6809) ) | |
| 299 | ROM_REGION( 0x1000, "gfx2", ROMREGION_DISPOSE ) | |
| 300 | ROM_LOAD( "8b.bin", 0x0000, 0x0800, CRC(6ac6bd98) SHA1(e653d80ec1b0f8e07821ea781942dae3de7d238d) ) | |
| 301 | ROM_LOAD( "10b.bin", 0x0800, 0x0800, CRC(cada7682) SHA1(83ce8336274cb8006a445ac17a179d9ffd4d6809) ) | |
| 305 | 302 | |
| 306 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 307 | ROM_LOAD( "a6.bin", 0x0000, 0x0020, CRC(c721220b) SHA1(61b3320fb616c0600d56840cb6438616c7e0c6eb) ) | |
| 303 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 304 | ROM_LOAD( "a6.bin", 0x0000, 0x0020, CRC(c721220b) SHA1(61b3320fb616c0600d56840cb6438616c7e0c6eb) ) | |
| 308 | 305 | ROM_END |
| 309 | 306 | |
| 310 | 307 | GAME( 1982, skyarmy, 0, skyarmy, skyarmy, 0, ROT90, "Shoei", "Sky Army", GAME_WRONG_COLORS ) |
| 308 |
| r3171 | r3172 | |
|---|---|---|
| 207 | 207 | /* bit 0 is EEPROM data */ |
| 208 | 208 | /* bit 1 is EEPROM ready */ |
| 209 | 209 | /* bit 3 is service button */ |
| 210 | res = | |
| 210 | res = | |
| 211 | 211 | |
| 212 | 212 | if (init_eeprom_count) |
| 213 | 213 | { |
| r3171 | r3172 | |
| 417 | 417 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 418 | 418 | |
| 419 | 419 | PORT_START("EEPROM") |
| 420 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ | |
| 420 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ | |
| 421 | 421 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM ready (always 1) */ |
| 422 | 422 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 423 | 423 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW ) |
| r3171 | r3172 | |
|---|---|---|
| 146 | 146 | AM_RANGE(0x8000, 0x83ff) AM_RAM_WRITE(wallc_videoram_w) AM_MIRROR(0xc00) AM_BASE(&videoram) /* 2114, 2114 */ |
| 147 | 147 | AM_RANGE(0xa000, 0xa3ff) AM_RAM /* 2114, 2114 */ |
| 148 | 148 | |
| 149 | AM_RANGE(0xb000, 0xb000) AM_READ(input_port_0_r) | |
| 150 | AM_RANGE(0xb200, 0xb200) AM_READ(input_port_1_r) | |
| 151 | AM_RANGE(0xb400, 0xb400) AM_READ(input_port_2_r) | |
| 152 | AM_RANGE(0xb600, 0xb600) AM_READ(input_port_3_r) | |
| 149 | AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW1") | |
| 150 | AM_RANGE(0xb200, 0xb200) AM_READ_PORT("SYSTEM") | |
| 151 | AM_RANGE(0xb400, 0xb400) AM_READ_PORT("DIAL") | |
| 152 | AM_RANGE(0xb600, 0xb600) AM_READ_PORT("DSW2") | |
| 153 | 153 | |
| 154 | 154 | AM_RANGE(0xb000, 0xb000) AM_WRITENOP |
| 155 | 155 | AM_RANGE(0xb100, 0xb100) AM_WRITE(wallc_coin_counter_w) |
| r3171 | r3172 | |
| 160 | 160 | |
| 161 | 161 | |
| 162 | 162 | static INPUT_PORTS_START( wallc ) |
| 163 | PORT_START("DSW1") /* DSW - read from b000 */ | |
| 163 | PORT_START("SYSTEM") /* b200 */ | |
| 164 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) //Right curve button; select current playfield in test mode | |
| 165 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) //not used ? | |
| 166 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) //service?? plays loud,high-pitched sound | |
| 167 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) //Left curve button; browse playfields in test mode | |
| 168 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) //ok | |
| 169 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) //ok | |
| 170 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) //ok | |
| 171 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) //ok | |
| 172 | ||
| 173 | PORT_START("DIAL") /* b400 - player position 8 bit analog input - value read is used as position of the player directly - what type of input is that ? DIAL ?*/ | |
| 174 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(3) PORT_REVERSE PORT_PLAYER(1) | |
| 175 | ||
| 176 | PORT_START("DSW1") /* b000 */ | |
| 164 | 177 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) |
| 165 | 178 | PORT_DIPSETTING( 0x03, "5" ) |
| 166 | 179 | PORT_DIPSETTING( 0x02, "4" ) |
| r3171 | r3172 | |
| 183 | 196 | PORT_DIPSETTING( 0x80, "Free Play With Level Select" ) |
| 184 | 197 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 185 | 198 | |
| 186 | PORT_START("SYSTEM") /* b200 */ | |
| 187 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) //Right curve button; select current playfield in test mode | |
| 188 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) //not used ? | |
| 189 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) //service?? plays loud,high-pitched sound | |
| 190 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) //Left curve button; browse playfields in test mode | |
| 191 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) //ok | |
| 192 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) //ok | |
| 193 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) //ok | |
| 194 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) //ok | |
| 195 | ||
| 196 | PORT_START("DIAL") /* b400 - player position 8 bit analog input - value read is used as position of the player directly - what type of input is that ? DIAL ?*/ | |
| 197 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(3) PORT_REVERSE PORT_PLAYER(1) | |
| 198 | ||
| 199 | PORT_START("DSW2") /* b600 - bits 0-5: coinage */ | |
| 199 | PORT_START("DSW2") /* b600 */ | |
| 200 | 200 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) |
| 201 | 201 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) |
| 202 | 202 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| r3171 | r3172 | |
|---|---|---|
| 185 | 185 | return cyq | (cyqh<<4); |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | static WRITE8_HANDLER( marinedt_obj1_a_w ) { marinedt_obj1_a = data; } | |
| 189 | static WRITE8_HANDLER( marinedt_obj1_x_w ) { marinedt_obj1_x = data; } | |
| 190 | static WRITE8_HANDLER( marinedt_obj1_y_w ) { marinedt_obj1_y = data; } | |
| 191 | static WRITE8_HANDLER( marinedt_obj2_a_w ) { marinedt_obj2_a = data; } | |
| 192 | static WRITE8_HANDLER( marinedt_obj2_x_w ) { marinedt_obj2_x = data; } | |
| 193 | static WRITE8_HANDLER( marinedt_obj2_y_w ) { marinedt_obj2_y = data; } | |
| 188 | 194 | |
| 189 | static ADDRESS_MAP_START( marinedt_readport, ADDRESS_SPACE_IO, 8 ) | |
| 190 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 191 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW0") //dips coinage | |
| 192 | AM_RANGE(0x01, 0x01) AM_READ(marinedt_port1_r) //trackball xy muxed | |
| 193 | AM_RANGE(0x02, 0x02) AM_READ(marinedt_obj1_x_r) | |
| 194 | AM_RANGE(0x03, 0x03) AM_READ_PORT("IN0") //buttons | |
| 195 | AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW1") //dips | |
| 196 | AM_RANGE(0x06, 0x06) AM_READ(marinedt_obj1_yr_r) | |
| 197 | AM_RANGE(0x0a, 0x0a) AM_READ(marinedt_obj1_yq_r) | |
| 198 | AM_RANGE(0x0e, 0x0e) AM_READ(marinedt_coll_r) | |
| 199 | ADDRESS_MAP_END | |
| 195 | static WRITE8_HANDLER( marinedt_music_w ){ marinedt_music = data; } | |
| 200 | 196 | |
| 201 | static WRITE8_HANDLER( marinedt_obj1_a_w ) { marinedt_obj1_a = data; } | |
| 202 | static WRITE8_HANDLER( marinedt_obj1_x_w ) { marinedt_obj1_x = data; } | |
| 203 | static WRITE8_HANDLER( marinedt_obj1_y_w ) { marinedt_obj1_y = data; } | |
| 204 | static WRITE8_HANDLER( marinedt_obj2_a_w ) { marinedt_obj2_a = data; } | |
| 205 | static WRITE8_HANDLER( marinedt_obj2_x_w ) { marinedt_obj2_x = data; } | |
| 206 | static WRITE8_HANDLER( marinedt_obj2_y_w ) { marinedt_obj2_y = data; } | |
| 207 | ||
| 208 | static WRITE8_HANDLER( marinedt_music_w ){ marinedt_music = data; } | |
| 209 | ||
| 210 | 197 | static WRITE8_HANDLER( marinedt_sound_w ) |
| 211 | 198 | { |
| 212 | 199 | //76543210 |
| r3171 | r3172 | |
| 282 | 269 | |
| 283 | 270 | } |
| 284 | 271 | |
| 285 | static ADDRESS_MAP_START( marinedt_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 272 | ||
| 273 | static ADDRESS_MAP_START( marinedt_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 286 | 274 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 287 | AM_RANGE(0x02, 0x02) AM_WRITE(marinedt_obj1_a_w) | |
| 288 | AM_RANGE(0x03, 0x03) AM_WRITE(marinedt_obj1_x_w) | |
| 289 | AM_RANGE(0x04, 0x04) AM_WRITE(marinedt_obj1_y_w) | |
| 275 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW0") //dips coinage | |
| 276 | AM_RANGE(0x01, 0x01) AM_READ(marinedt_port1_r) //trackball xy muxed | |
| 277 | AM_RANGE(0x02, 0x02) AM_READWRITE(marinedt_obj1_x_r, marinedt_obj1_a_w) | |
| 278 | AM_RANGE(0x03, 0x03) AM_READ_PORT("IN0") AM_WRITE(marinedt_obj1_x_w) | |
| 279 | AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW1") AM_WRITE(marinedt_obj1_y_w) | |
| 290 | 280 | AM_RANGE(0x05, 0x05) AM_WRITE(marinedt_music_w) |
| 291 | AM_RANGE(0x06, 0x06) AM_WRITE(marinedt_sound_w) | |
| 281 | AM_RANGE(0x06, 0x06) AM_READWRITE(marinedt_obj1_yr_r, marinedt_sound_w) | |
| 292 | 282 | AM_RANGE(0x08, 0x08) AM_WRITE(marinedt_obj2_a_w) |
| 293 | 283 | AM_RANGE(0x09, 0x09) AM_WRITE(marinedt_obj2_x_w) |
| 294 | AM_RANGE(0x0a, 0x0a) AM_WRITE(marinedt_obj2_y_w) | |
| 284 | AM_RANGE(0x0a, 0x0a) AM_READWRITE(marinedt_obj1_yq_r, marinedt_obj2_y_w) | |
| 295 | 285 | AM_RANGE(0x0d, 0x0d) AM_WRITE(marinedt_pd_w) |
| 296 | AM_RANGE(0x0e, 0x0e) AM_WRITE(watchdog_reset_w) | |
| 286 | AM_RANGE(0x0e, 0x0e) AM_READWRITE(marinedt_coll_r, watchdog_reset_w) | |
| 297 | 287 | AM_RANGE(0x0f, 0x0f) AM_WRITE(marinedt_pf_w) |
| 298 | 288 | ADDRESS_MAP_END |
| 299 | 289 | |
| 290 | ||
| 300 | 291 | static INPUT_PORTS_START( marinedt ) |
| 301 | 292 | PORT_START("DSW0") /* IN0 */ |
| 302 | 293 | PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_A ) ) |
| r3171 | r3172 | |
| 586 | 577 | /* basic machine hardware */ |
| 587 | 578 | MDRV_CPU_ADD("main", Z80,10000000/4) |
| 588 | 579 | MDRV_CPU_PROGRAM_MAP(marinedt_readmem,marinedt_writemem) |
| 589 | MDRV_CPU_IO_MAP(marinedt_ | |
| 580 | MDRV_CPU_IO_MAP(marinedt_i | |
| 590 | 581 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 591 | 582 | |
| 592 | 583 | /* video hardware */ |
| r3171 | r3172 | |
| 644 | 635 | ROM_END |
| 645 | 636 | |
| 646 | 637 | GAME( 1981, marinedt, 0, marinedt, marinedt, 0, ROT270, "Taito", "Marine Date", GAME_NO_SOUND ) |
| 638 |
| r3171 | r3172 | |
|---|---|---|
| 74 | 74 | AM_RANGE(0xe000, 0xe03f) AM_WRITE(battlex_palette_w) /* probably palette */ |
| 75 | 75 | ADDRESS_MAP_END |
| 76 | 76 | |
| 77 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 77 | ||
| 78 | static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) | |
| 78 | 79 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 79 | 80 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW1") |
| 80 | 81 | AM_RANGE(0x01, 0x01) AM_READ_PORT("SYSTEM") |
| 81 | 82 | AM_RANGE(0x02, 0x02) AM_READ_PORT("INPUTS") |
| 82 | 83 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW2") |
| 83 | ADDRESS_MAP_END | |
| 84 | ||
| 85 | ||
| 86 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 87 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 88 | 84 | AM_RANGE(0x10, 0x10) AM_WRITE(battlex_flipscreen_w) |
| 85 | ||
| 89 | 86 | /* verify all of these */ |
| 90 | 87 | AM_RANGE(0x22, 0x22) AM_WRITE(ay8910_write_port_0_w) |
| 91 | 88 | AM_RANGE(0x23, 0x23) AM_WRITE(ay8910_control_port_0_w) |
| r3171 | r3172 | |
| 210 | 207 | /* basic machine hardware */ |
| 211 | 208 | MDRV_CPU_ADD("main", Z80,10000000/2 ) /* 10 MHz, divided ? (Z80A CPU) */ |
| 212 | 209 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 213 | MDRV_CPU_IO_MAP( | |
| 210 | MDRV_CPU_IO_MAP(io_ma | |
| 214 | 211 | MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,8) /* controls game speed? */ |
| 215 | 212 | |
| 216 | 213 | /* video hardware */ |
| r3171 | r3172 | |
| 296 | 293 | /*** GAME DRIVERS ************************************************************/ |
| 297 | 294 | |
| 298 | 295 | GAME( 1982, battlex, 0, battlex, battlex, battlex, ROT180, "Omori Electric", "Battle Cross", GAME_IMPERFECT_GRAPHICS ) |
| 296 |
| r3171 | r3172 | |
|---|---|---|
| 90 | 90 | * |
| 91 | 91 | *************************************/ |
| 92 | 92 | |
| 93 | static ADDRESS_MAP_START( | |
| 93 | static ADDRESS_MAP_START( io_ma | |
| 94 | 94 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 95 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW") | |
| 96 | AM_RANGE(0x01, 0x01) AM_READ_PORT("SYSTEM") | |
| 97 | AM_RANGE(0x02, 0x02) AM_READ_PORT("INPUTS") | |
| 95 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW") AM_WRITE(watchdog_reset_w) | |
| 96 | AM_RANGE(0x01, 0x01) AM_READ_PORT("SYSTEM") AM_WRITE(epos_port_1_w) | |
| 97 | AM_RANGE(0x02, 0x02) AM_READ_PORT("INPUTS") AM_WRITE(ay8910_write_port_0_w) | |
| 98 | 98 | AM_RANGE(0x03, 0x03) AM_READ_PORT("UNK") |
| 99 | ADDRESS_MAP_END | |
| 100 | ||
| 101 | ||
| 102 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 103 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 104 | AM_RANGE(0x00, 0x00) AM_WRITE(watchdog_reset_w) | |
| 105 | AM_RANGE(0x01, 0x01) AM_WRITE(epos_port_1_w) | |
| 106 | AM_RANGE(0x02, 0x02) AM_WRITE(ay8910_write_port_0_w) | |
| 107 | 99 | AM_RANGE(0x06, 0x06) AM_WRITE(ay8910_control_port_0_w) |
| 108 | 100 | ADDRESS_MAP_END |
| 109 | 101 | |
| 110 | ||
| 111 | static ADDRESS_MAP_START( dealer_readport, ADDRESS_SPACE_IO, 8 ) | |
| 102 | static ADDRESS_MAP_START( dealer_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 112 | 103 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 113 | AM_RANGE(0x10, 0x13) AM_DEVREAD(PPI8255, "ppi8255", ppi8255_r) | |
| 114 | AM_RANGE(0x38, 0x38) AM_READ_PORT("DSW") | |
| 115 | ADDRESS_MAP_END | |
| 116 | ||
| 117 | static ADDRESS_MAP_START( dealer_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 118 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 119 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(PPI8255, "ppi8255", ppi8255_w) | |
| 104 | AM_RANGE(0x10, 0x13) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_r, ppi8255_w) | |
| 120 | 105 | AM_RANGE(0x20, 0x24) AM_WRITE(dealer_decrypt_rom) |
| 106 | AM_RANGE(0x38, 0x38) AM_READ_PORT("DSW") | |
| 121 | 107 | // AM_RANGE(0x40, 0x40) AM_WRITE(watchdog_reset_w) |
| 122 | 108 | ADDRESS_MAP_END |
| 123 | 109 | |
| 110 | ||
| 124 | 111 | /* |
| 125 | 112 | ROMs U01-U03 are checked with the same code in a loop. |
| 126 | 113 | There's a separate ROM check for banked U04 at 30F3. |
| r3171 | r3172 | |
| 360 | 347 | /* basic machine hardware */ |
| 361 | 348 | MDRV_CPU_ADD("main", Z80, 11000000/4) /* 2.75 MHz (see notes) */ |
| 362 | 349 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 363 | MDRV_CPU_IO_MAP( | |
| 350 | MDRV_CPU_IO_MAP(io_ma | |
| 364 | 351 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 365 | 352 | |
| 366 | 353 | /* video hardware */ |
| r3171 | r3172 | |
| 384 | 371 | /* basic machine hardware */ |
| 385 | 372 | MDRV_CPU_ADD("main", Z80, 11000000/4) /* 2.75 MHz (see notes) */ |
| 386 | 373 | MDRV_CPU_PROGRAM_MAP(dealer_readmem,dealer_writemem) |
| 387 | MDRV_CPU_IO_MAP(dealer_ | |
| 374 | MDRV_CPU_IO_MAP(dealer_i | |
| 388 | 375 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 389 | 376 | |
| 390 | 377 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) |
| r3171 | r3172 | |
| 633 | 620 | GAME( 1984, igmo, 0, epos, igmo, 0, ROT270, "Epos Corporation", "IGMO", GAME_WRONG_COLORS ) |
| 634 | 621 | GAME( 1984, dealer, 0, dealer, dealer, dealer, ROT270, "Epos Corporation", "The Dealer", GAME_WRONG_COLORS ) |
| 635 | 622 | GAME( 1984, revenger, 0, dealer, dealer, dealer, ROT270, "Epos Corporation", "Revenger", GAME_NOT_WORKING ) |
| 623 |
| r3171 | r3172 | |
|---|---|---|
| 170 | 170 | |
| 171 | 171 | /*******************************************************/ |
| 172 | 172 | |
| 173 | static ADDRESS_MAP_START( | |
| 173 | static ADDRESS_MAP_START( io_ma | |
| 174 | 174 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 175 | AM_RANGE(0x41, 0x41) AM_READ(mrflea_main_r) | |
| 176 | AM_RANGE(0x42, 0x42) AM_READ(mrflea_main_status_r) | |
| 177 | ADDRESS_MAP_END | |
| 178 | ||
| 179 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 180 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 181 | 175 | AM_RANGE(0x00, 0x00) AM_WRITE(SMH_NOP) /* watchdog? */ |
| 182 | 176 | AM_RANGE(0x40, 0x40) AM_WRITE(mrflea_io_w) |
| 177 | AM_RANGE(0x41, 0x41) AM_READ(mrflea_main_r) | |
| 178 | AM_RANGE(0x42, 0x42) AM_READ(mrflea_main_status_r) | |
| 183 | 179 | AM_RANGE(0x43, 0x43) AM_WRITE(SMH_NOP) /* 0xa6,0x0d,0x05 */ |
| 184 | 180 | AM_RANGE(0x60, 0x60) AM_WRITE(mrflea_gfx_bank_w) |
| 185 | 181 | ADDRESS_MAP_END |
| r3171 | r3172 | |
| 230 | 226 | |
| 231 | 227 | /*******************************************************/ |
| 232 | 228 | |
| 233 | static ADDRESS_MAP_START( readport_io, ADDRESS_SPACE_IO, 8 ) | |
| 234 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 235 | AM_RANGE(0x10, 0x10) AM_READ(mrflea_interrupt_type_r) /* ? */ | |
| 236 | AM_RANGE(0x20, 0x20) AM_READ(mrflea_io_r) | |
| 237 | AM_RANGE(0x22, 0x22) AM_READ(mrflea_io_status_r) | |
| 238 | AM_RANGE(0x40, 0x40) AM_READ(mrflea_input0_r) | |
| 239 | AM_RANGE(0x42, 0x42) AM_READ(mrflea_input1_r) | |
| 240 | AM_RANGE(0x44, 0x44) AM_READ(mrflea_input2_r) | |
| 241 | AM_RANGE(0x46, 0x46) AM_READ(mrflea_input3_r) | |
| 242 | ADDRESS_MAP_END | |
| 243 | ||
| 244 | 229 | static WRITE8_HANDLER( mrflea_data0_w ){ |
| 245 | 230 | ay8910_control_port_0_w( machine, offset, mrflea_select0 ); |
| 246 | 231 | ay8910_write_port_0_w( machine, offset, data ); |
| r3171 | r3172 | |
| 259 | 244 | ay8910_write_port_2_w( machine, offset, data ); |
| 260 | 245 | } |
| 261 | 246 | |
| 262 | static ADDRESS_MAP_START( | |
| 247 | static ADDRESS_MAP_START( | |
| 263 | 248 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 264 | 249 | AM_RANGE(0x00, 0x00) AM_WRITE(SMH_NOP) /* watchdog */ |
| 265 | AM_RANGE(0x10, 0x10) AM_WRITE(SMH_NOP) /* irq ACK */ | |
| 250 | AM_RANGE(0x10, 0x10) AM_READWRITE(mrflea_interrupt_type_r, SMH_NOP) /* ? / irq ACK */ | |
| 266 | 251 | AM_RANGE(0x11, 0x11) AM_WRITE(SMH_NOP) /* 0x83,0x00,0xfc */ |
| 252 | AM_RANGE(0x20, 0x20) AM_READ(mrflea_io_r) | |
| 267 | 253 | AM_RANGE(0x21, 0x21) AM_WRITE(mrflea_main_w) |
| 254 | AM_RANGE(0x22, 0x22) AM_READ(mrflea_io_status_r) | |
| 268 | 255 | AM_RANGE(0x23, 0x23) AM_WRITE(SMH_NOP) /* 0xb4,0x09,0x05 */ |
| 269 | AM_RANGE(0x40, 0x40) AM_WRITE(mrflea_data0_w) | |
| 256 | AM_RANGE(0x40, 0x40) AM_READWRITE(mrflea_input0_r, mrflea_data0_w) | |
| 270 | 257 | AM_RANGE(0x41, 0x41) AM_WRITE(mrflea_select0_w) |
| 271 | AM_RANGE(0x42, 0x42) AM_WRITE(mrflea_data1_w) | |
| 258 | AM_RANGE(0x42, 0x42) AM_READWRITE(mrflea_input1_r, mrflea_data1_w) | |
| 272 | 259 | AM_RANGE(0x43, 0x43) AM_WRITE(mrflea_select1_w) |
| 273 | AM_RANGE(0x44, 0x44) AM_WRITE(mrflea_data2_w) | |
| 260 | AM_RANGE(0x44, 0x44) AM_READWRITE(mrflea_input2_r, mrflea_data2_w) | |
| 274 | 261 | AM_RANGE(0x45, 0x45) AM_WRITE(mrflea_select2_w) |
| 275 | AM_RANGE(0x46, 0x46) AM_WRITE(mrflea_data3_w) | |
| 262 | AM_RANGE(0x46, 0x46) AM_READWRITE(mrflea_input3_r, mrflea_data3_w) | |
| 276 | 263 | AM_RANGE(0x47, 0x47) AM_WRITE(mrflea_select3_w) |
| 277 | 264 | ADDRESS_MAP_END |
| 278 | 265 | |
| 266 | /*******************************************************/ | |
| 267 | ||
| 279 | 268 | static MACHINE_DRIVER_START( mrflea ) |
| 280 | 269 | |
| 281 | 270 | /* basic machine hardware */ |
| 282 | 271 | MDRV_CPU_ADD("main", Z80, 4000000) /* 4 MHz? */ |
| 283 | 272 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 284 | MDRV_CPU_IO_MAP( | |
| 273 | MDRV_CPU_IO_MAP(io_ma | |
| 285 | 274 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) /* NMI resets the game */ |
| 286 | 275 | |
| 287 | 276 | MDRV_CPU_ADD("sub", Z80, 6000000) |
| 288 | 277 | MDRV_CPU_PROGRAM_MAP(readmem_io,writemem_io) |
| 289 | MDRV_CPU_IO_MAP( | |
| 278 | MDRV_CPU_IO_MAP( | |
| 290 | 279 | MDRV_CPU_VBLANK_INT_HACK(mrflea_io_interrupt,2) |
| 291 | 280 | |
| 292 | 281 | MDRV_INTERLEAVE(100) |
| r3171 | r3172 | |
| 425 | 414 | |
| 426 | 415 | |
| 427 | 416 | GAME( 1982, mrflea, 0, mrflea, mrflea, 0, ROT270, "Pacific Novelty", "The Amazing Adventures of Mr. F. Lea" , 0 ) |
| 417 |
| r3171 | r3172 | |
|---|---|---|
| 258 | 258 | AM_RANGE(0xf000, 0xf000) AM_WRITE(mcatadv_sound_bw_w) |
| 259 | 259 | ADDRESS_MAP_END |
| 260 | 260 | |
| 261 | static ADDRESS_MAP_START( mcatadv_sound_ | |
| 261 | static ADDRESS_MAP_START( mcatadv_sound_io_ma | |
| 262 | 262 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 263 | AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) | |
| 263 | AM_RANGE(0x80, 0x80) AM_READWRITE(soundlatch_r, soundlatch2_w) | |
| 264 | 264 | ADDRESS_MAP_END |
| 265 | 265 | |
| 266 | static ADDRESS_MAP_START( mcatadv_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 267 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 268 | AM_RANGE(0x80, 0x80) AM_WRITE(soundlatch2_w) | |
| 269 | ADDRESS_MAP_END | |
| 270 | 266 | |
| 271 | ||
| 272 | 267 | static ADDRESS_MAP_START( nost_sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 273 | 268 | AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM ) // ROM |
| 274 | 269 | AM_RANGE(0x8000, 0xbfff) AM_READ(SMH_BANK1 ) // ROM |
| r3171 | r3172 | |
| 281 | 276 | AM_RANGE(0xc000, 0xdfff) AM_WRITE(SMH_RAM ) // RAM |
| 282 | 277 | ADDRESS_MAP_END |
| 283 | 278 | |
| 284 | static ADDRESS_MAP_START( nost_sound_ | |
| 279 | static ADDRESS_MAP_START( nost_sound_io_ma | |
| 285 | 280 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 286 | AM_RANGE(0x04, 0x05) AM_READ(ym2610_status_port_0_a_r) | |
| 287 | AM_RANGE(0x06, 0x07) AM_READ(ym2610_status_port_0_b_r) | |
| 288 | AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) | |
| 289 | ADDRESS_MAP_END | |
| 290 | ||
| 291 | static ADDRESS_MAP_START( nost_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 292 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 293 | 281 | AM_RANGE(0x00, 0x00) AM_WRITE(ym2610_control_port_0_a_w) |
| 294 | 282 | AM_RANGE(0x01, 0x01) AM_WRITE(ym2610_data_port_0_a_w) |
| 295 | 283 | AM_RANGE(0x02, 0x02) AM_WRITE(ym2610_control_port_0_b_w) |
| 296 | 284 | AM_RANGE(0x03, 0x03) AM_WRITE(ym2610_data_port_0_b_w) |
| 285 | AM_RANGE(0x04, 0x05) AM_READ(ym2610_status_port_0_a_r) | |
| 286 | AM_RANGE(0x06, 0x07) AM_READ(ym2610_status_port_0_b_r) | |
| 297 | 287 | AM_RANGE(0x40, 0x40) AM_WRITE(mcatadv_sound_bw_w) |
| 298 | AM_RANGE(0x80, 0x80) AM_WRITE(soundlatch2_w) | |
| 288 | AM_RANGE(0x80, 0x80) AM_READWRITE(soundlatch_r, soundlatch2_w) | |
| 299 | 289 | ADDRESS_MAP_END |
| 300 | 290 | |
| 301 | 291 | /*** Inputs ***/ |
| r3171 | r3172 | |
| 494 | 484 | |
| 495 | 485 | MDRV_CPU_ADD("sound", Z80, XTAL_16MHz/4) /* verified on pcb */ |
| 496 | 486 | MDRV_CPU_PROGRAM_MAP(mcatadv_sound_readmem,mcatadv_sound_writemem) |
| 497 | MDRV_CPU_IO_MAP(mcatadv_sound_ | |
| 487 | MDRV_CPU_IO_MAP(mcatadv_sound_i | |
| 498 | 488 | |
| 499 | 489 | /* video hardware */ |
| 500 | 490 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 529 | 519 | |
| 530 | 520 | MDRV_CPU_MODIFY("sound") |
| 531 | 521 | MDRV_CPU_PROGRAM_MAP(nost_sound_readmem,nost_sound_writemem) |
| 532 | MDRV_CPU_IO_MAP(nost_sound_ | |
| 522 | MDRV_CPU_IO_MAP(nost_sound_i | |
| 533 | 523 | MACHINE_DRIVER_END |
| 534 | 524 | |
| 535 | 525 | |
| r3171 | r3172 | |
| 725 | 715 | GAME( 1993, nost, 0, nost, nost, mcatadv, ROT270, "Face", "Nostradamus", GAME_NO_COCKTAIL ) |
| 726 | 716 | GAME( 1993, nostj, nost, nost, nost, mcatadv, ROT270, "Face", "Nostradamus (Japan)", GAME_NO_COCKTAIL ) |
| 727 | 717 | GAME( 1993, nostk, nost, nost, nost, mcatadv, ROT270, "Face", "Nostradamus (Korea)", GAME_NO_COCKTAIL ) |
| 718 |
| r3171 | r3172 | |
|---|---|---|
| 49 | 49 | |
| 50 | 50 | SET NOTES: |
| 51 | 51 | |
| 52 | sstriker - might be a bootleg / hack, the region jumper is read with this set but even when set | |
| 53 | to Japan you get all english text etc which seems a little odd, but might be correct. | |
| 52 | sstriker - The region jumper is read with this set but even when set to Japan you get all english | |
| 53 | text etc which seems a little odd. However this has been verified correct on two boards. | |
| 54 | 54 | kingdmgp - might be a bootleg / hack, some of the tiles needed for the credits screen have been |
| 55 | 55 | stripped out, doesn't seem very professional, since its rare and should probably only |
| 56 | 56 | have a different graphics rom its nearly impossible for us to verify, a lot of boards |
| 57 | 57 | being sold as 'Kingdom Grand Prix' are infact conversions using Neill Corlett's hack |
| 58 | 58 | |
| 59 | ** update the above two look like genuine Korean release | |
| 60 | ?? boards, Raizing probably just missed a few things | |
| 59 | ** The above two look like genuine Korean release boards, Raizing probably just missed a few things | |
| 61 | 60 | |
| 62 | 61 | bgaregga - the clones have fewer types of enemy bullets (not fewer bullets, just fewer types!) |
| 63 | 62 | and Stage Edit is disabled - the dipswitch is still listed in service mode but it |
| r3171 | r3172 | |
| 166 | 165 | Sound CPU/MCU: |
| 167 | 166 | HD647180X0FS6 (Hitachi Z180 Compatible CPU with internal 16k ROM) |
| 168 | 167 | Z84C0006PEC (Z80) |
| 168 | NEC V25+ | |
| 169 | 169 | |
| 170 | ||
| 171 | 170 | Sound Chips: |
| 172 | 171 | YM3812 |
| 173 | 172 | YM2151 |
| r3171 | r3172 | |
| 190 | 189 | Mahou Daisakusen |
| 191 | 190 | Battle Bakraid |
| 192 | 191 | |
| 193 | ********************************************************************** | |
| 194 | ||
| 195 | Fix Eight (bootleg) | |
| 196 | Toaplan, 1992 | |
| 197 | ||
| 198 | PCB Layout | |
| 199 | ---------- | |
| 200 | ||
| 201 | |--------------------------------------------| | |
| 202 | | 1.BIN PAL 14MHz PAL| | |
| 203 | | M6295 PAL | | |
| 204 | | PAL 6116 4.BIN 681000 681000| | |
| 205 | | 6116 | | |
| 206 | | 6116 681000 681000| | |
| 207 | |J 6116 PAL | | |
| 208 | |A PAL | | |
| 209 | |M | | |
| 210 | |M 62256 62256 PAL | | |
| 211 | |A 2.BIN 3.BIN PAL | | |
| 212 | | PAL | | |
| 213 | | 68000 PAL | | |
| 214 | | DSW2 |------| 5.BIN | | |
| 215 | | DSW1 6264 |TPC | | | |
| 216 | | 3.579545MHz |1020 | 6.BIN | | |
| 217 | | 10MHz 6264 |------| 7.BIN | | |
| 218 | |--------------------------------------------| | |
| 219 | Notes: | |
| 220 | 68000 clock at 10.000MHz | |
| 221 | M6295 clock at 875kHz [14M/16]. Sample rate = 875000 / 165 | |
| 222 | VSync at 60Hz | |
| 223 | 6116 - 2k x8 SRAM (x4) | |
| 224 | 6264 - 8k x8 SRAM (x2) | |
| 225 | 62256 - 32k x8 SRAM (x2) | |
| 226 | 681000- 128k x8 SRAM (x4) | |
| 227 | ||
| 228 | 192 | ********************************************************************* |
| 229 | 193 | |
| 230 | 194 | Game status: |
| r3171 | r3172 | |
| 232 | 196 | Teki Paki Working, but no sound. Missing sound MCU dump. Chip is protected. It's a QFP80 Hitachi HD647180. |
| 233 | 197 | Ghox Working, but no sound. Missing sound MCU dump. It's a QFP80 Hitachi HD647180. |
| 234 | 198 | Dogyuun Working, but no sound. MCU type is likely a NEC V25+. Chip is a PLCC94 stamped 'TS-002-MACH'. |
| 235 | Knuckle Bash Working, but sound FX only (missing music). MCU type is a NEC V25+. Chip is a PLCC94 stamped 'TS-004-DASH'. Some PCBs use another version stamped 'NITRO' which is the same chip type. | |
| 199 | Knuckle Bash Working, but sound FX only (missing music). MCU type is a NEC V25+. Chip is a PLCC94 stamped 'TS-004-DASH'. | |
| 200 | Some PCBs use another version stamped 'NITRO' which is the same chip type. | |
| 236 | 201 | Truxton 2 Working. |
| 237 | 202 | Pipi & Bibis Working. |
| 238 | 203 | Whoopee Working. Missing sound MCU dump. It's a Hitachi HD647180. Using bootleg sound CPU dump for now. |
| 239 | 204 | Pipi & Bibis (Ryouta Kikaku) Working. |
| 240 | FixEight Not working properly. Missing background GFX, and sound FX only (missing music). Both controlled by | |
| 205 | FixEight Not working properly. Missing background GFX, and sound FX only (missing music). Both controlled by PLC | |
| 241 | 206 | FixEight bootleg Working. One unknown ROM (same as pipibibi one). Region hardcoded to Korea (@ $4d8) |
| 242 | 207 | Grind Stormer Working, but no sound. MCU type is a NEC V25+. Chip is a PLCC94 stamped 'TS-007-SPY'. |
| 243 | 208 | VFive Working, but no sound. MCU type is a NEC V25+. Chip is a PLCC94 stamped 'TS-007-SPY'. |
| r3171 | r3172 | |
| 272 | 237 | - Find out how exactly how sound CPU communication really works in bgaregga/batrider/bbakraid |
| 273 | 238 | current emulation seems to work (plays all sounds), but there are still some unknown reads/writes |
| 274 | 239 | |
| 240 | ||
| 275 | 241 | *****************************************************************************/ |
| 276 | 242 | |
| 277 | 243 | |
| r3171 | r3172 | |
| 3429 | 3395 | static MACHINE_DRIVER_START( tekipaki ) |
| 3430 | 3396 | |
| 3431 | 3397 | /* basic machine hardware */ |
| 3432 | MDRV_CPU_ADD("main", M68000, 10 | |
| 3398 | MDRV_CPU_ADD("main", M68000, XTAL_10MHz | |
| 3433 | 3399 | MDRV_CPU_PROGRAM_MAP(tekipaki_68k_mem, 0) |
| 3434 | 3400 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 3435 | 3401 | |
| 3436 | 3402 | #if USE_HD64x180 |
| 3437 | MDRV_CPU_ADD("mcu", Z180, 10 | |
| 3403 | MDRV_CPU_ADD("mcu", Z180, XTAL_10MHz | |
| 3438 | 3404 | MDRV_CPU_PROGRAM_MAP(hd647180_mem, 0) |
| 3439 | 3405 | #endif |
| 3440 | 3406 | |
| r3171 | r3172 | |
| 3459 | 3425 | /* sound hardware */ |
| 3460 | 3426 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 3461 | 3427 | |
| 3462 | MDRV_SOUND_ADD("ym", YM3812, 27 | |
| 3428 | MDRV_SOUND_ADD("ym", YM3812, XTAL_27MHz | |
| 3463 | 3429 | MDRV_SOUND_CONFIG(ym3812_config) |
| 3464 | 3430 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3465 | 3431 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 3522 | 3488 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| 3523 | 3489 | |
| 3524 | 3490 | MDRV_SCREEN_ADD("main", RASTER) |
| 3525 | MDRV_SCREEN_REFRESH_RATE( (XTAL_27MHz | |
| 3491 | MDRV_SCREEN_REFRESH_RATE( (XTAL_27MHz | |
| 3526 | 3492 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 3527 | 3493 | MDRV_SCREEN_SIZE(432, 262) |
| 3528 | 3494 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239) |
| r3171 | r3172 | |
| 3549 | 3515 | static MACHINE_DRIVER_START( kbash ) |
| 3550 | 3516 | |
| 3551 | 3517 | /* basic machine hardware */ |
| 3552 | MDRV_CPU_ADD("main", M68000, 16 | |
| 3518 | MDRV_CPU_ADD("main", M68000, XTAL_16MHz | |
| 3553 | 3519 | MDRV_CPU_PROGRAM_MAP(kbash_68k_mem, 0) |
| 3554 | 3520 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 3555 | 3521 | |
| 3556 | 3522 | /* ROM based v25 */ |
| 3557 | 3523 | #if USE_V25 |
| 3558 | MDRV_CPU_ADD("mcu", V25, 16 | |
| 3524 | MDRV_CPU_ADD("mcu", V25, XTAL_16MHz | |
| 3559 | 3525 | MDRV_CPU_PROGRAM_MAP(V25_mem, 0) |
| 3560 | 3526 | MDRV_CPU_IO_MAP(V25_port, 0) |
| 3561 | 3527 | #endif |
| r3171 | r3172 | |
| 3581 | 3547 | /* sound hardware */ |
| 3582 | 3548 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 3583 | 3549 | |
| 3584 | MDRV_SOUND_ADD("ym", YM2151, 27 | |
| 3550 | MDRV_SOUND_ADD("ym", YM2151, XTAL_27MHz | |
| 3585 | 3551 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3586 | 3552 | |
| 3587 | MDRV_SOUND_ADD("oki", OKIM6295, 32 | |
| 3553 | MDRV_SOUND_ADD("oki", OKIM6295, XTAL_32MHz | |
| 3588 | 3554 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) |
| 3589 | 3555 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3590 | 3556 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 3592 | 3558 | |
| 3593 | 3559 | static MACHINE_DRIVER_START( kbash2 ) |
| 3594 | 3560 | /* basic machine hardware */ |
| 3595 | MDRV_CPU_ADD("main", M68000, 16 | |
| 3561 | MDRV_CPU_ADD("main", M68000, XTAL_16MHz | |
| 3596 | 3562 | MDRV_CPU_PROGRAM_MAP(kbash2_68k_mem, 0) |
| 3597 | 3563 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 3598 | 3564 | |
| r3171 | r3172 | |
| 3617 | 3583 | /* sound hardware */ |
| 3618 | 3584 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 3619 | 3585 | |
| 3620 | MDRV_SOUND_ADD("oki1", OKIM6295, 16 | |
| 3586 | MDRV_SOUND_ADD("oki1", OKIM6295, XTAL_16MHz | |
| 3621 | 3587 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) |
| 3622 | 3588 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3623 | 3589 | |
| 3624 | MDRV_SOUND_ADD("oki2", OKIM6295, 16 | |
| 3590 | MDRV_SOUND_ADD("oki2", OKIM6295, XTAL_16MHz | |
| 3625 | 3591 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) |
| 3626 | 3592 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3627 | 3593 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 3640 | 3606 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| 3641 | 3607 | |
| 3642 | 3608 | MDRV_SCREEN_ADD("main", RASTER) |
| 3643 | MDRV_SCREEN_REFRESH_RATE( (XTAL_27MHz / 4) / (432 * 263) ) | |
| 3609 | MDRV_SCREEN_REFRESH_RATE( (XTAL_27MHz / 4) / (432 * 263) ) /* 27MHz Oscillator */ | |
| 3644 | 3610 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 3645 | 3611 | MDRV_SCREEN_SIZE(432, 262) |
| 3646 | 3612 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239) |
| r3171 | r3172 | |
| 3706 | 3672 | static MACHINE_DRIVER_START( whoopee ) |
| 3707 | 3673 | |
| 3708 | 3674 | /* basic machine hardware */ |
| 3709 | MDRV_CPU_ADD("main", M68000, 10 | |
| 3675 | MDRV_CPU_ADD("main", M68000, XTAL_10MHz | |
| 3710 | 3676 | MDRV_CPU_PROGRAM_MAP(tekipaki_68k_mem, 0) |
| 3711 | 3677 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 3712 | 3678 | |
| 3713 | MDRV_CPU_ADD("audio", Z80, 27 | |
| 3679 | MDRV_CPU_ADD("audio", Z80, XTAL_27MHz | |
| 3714 | 3680 | /* Change this to 10MHz when HD647180 gets dumped. 10MHz Oscillator */ |
| 3715 | 3681 | MDRV_CPU_PROGRAM_MAP(sound_z80_mem, 0) |
| 3716 | 3682 | |
| r3171 | r3172 | |
| 3737 | 3703 | /* sound hardware */ |
| 3738 | 3704 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 3739 | 3705 | |
| 3740 | MDRV_SOUND_ADD("ym", YM3812, 27 | |
| 3706 | MDRV_SOUND_ADD("ym", YM3812, XTAL_27MHz | |
| 3741 | 3707 | MDRV_SOUND_CONFIG(ym3812_config) |
| 3742 | 3708 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3743 | 3709 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 3746 | 3712 | static MACHINE_DRIVER_START( pipibibi ) |
| 3747 | 3713 | |
| 3748 | 3714 | /* basic machine hardware */ |
| 3749 | MDRV_CPU_ADD("main", M68000, 10 | |
| 3715 | MDRV_CPU_ADD("main", M68000, XTAL_10MHz | |
| 3750 | 3716 | MDRV_CPU_PROGRAM_MAP(pipibibi_68k_mem, 0) |
| 3751 | 3717 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 3752 | 3718 | |
| 3753 | MDRV_CPU_ADD("audio", Z80,27 | |
| 3719 | MDRV_CPU_ADD("audio", Z80, XTAL_27MHz | |
| 3754 | 3720 | MDRV_CPU_PROGRAM_MAP(sound_z80_mem, 0) |
| 3755 | 3721 | |
| 3756 | 3722 | MDRV_INTERLEAVE(10) |
| r3171 | r3172 | |
| 3776 | 3742 | /* sound hardware */ |
| 3777 | 3743 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 3778 | 3744 | |
| 3779 | MDRV_SOUND_ADD("ym", YM3812, 27 | |
| 3745 | MDRV_SOUND_ADD("ym", YM3812, XTAL_27MHz | |
| 3780 | 3746 | MDRV_SOUND_CONFIG(ym3812_config) |
| 3781 | 3747 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3782 | 3748 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 3802 | 3768 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| 3803 | 3769 | |
| 3804 | 3770 | MDRV_SCREEN_ADD("main", RASTER) |
| 3805 | MDRV_SCREEN_REFRESH_RATE( (XTAL_27MHz / 4) / (432 * 263) ) | |
| 3771 | MDRV_SCREEN_REFRESH_RATE( (XTAL_27MHz / 4) / (432 * 263) ) /* 27MHz Oscillator */ | |
| 3806 | 3772 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 3807 | 3773 | MDRV_SCREEN_SIZE(432, 262) |
| 3808 | 3774 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239) |
| r3171 | r3172 | |
| 3828 | 3794 | |
| 3829 | 3795 | static MACHINE_DRIVER_START( fixeighb ) |
| 3830 | 3796 | /* basic machine hardware */ |
| 3831 | MDRV_CPU_ADD("main", M68000, 10 | |
| 3797 | MDRV_CPU_ADD("main", M68000, XTAL_10MHz | |
| 3832 | 3798 | MDRV_CPU_PROGRAM_MAP(fixeighb_68k_mem, 0) |
| 3833 | 3799 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq2) |
| 3834 | 3800 | |
| r3171 | r3172 | |
| 3853 | 3819 | /* sound hardware */ |
| 3854 | 3820 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 3855 | 3821 | |
| 3856 | MDRV_SOUND_ADD("oki", OKIM6295, 14 | |
| 3822 | MDRV_SOUND_ADD("oki", OKIM6295, XTAL_14MHz | |
| 3857 | 3823 | MDRV_SOUND_CONFIG(okim6295_interface_pin7low) |
| 3858 | 3824 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3859 | 3825 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 3862 | 3828 | static MACHINE_DRIVER_START( vfive ) |
| 3863 | 3829 | |
| 3864 | 3830 | /* basic machine hardware */ |
| 3865 | MDRV_CPU_ADD("main", M68000, 10 | |
| 3831 | MDRV_CPU_ADD("main", M68000, XTAL_10MHz | |
| 3866 | 3832 | MDRV_CPU_PROGRAM_MAP(vfive_68k_mem, 0) |
| 3867 | 3833 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 3868 | 3834 | |
| 3869 | 3835 | #if USE_V25 |
| 3870 | MDRV_CPU_ADD("audio", V25, 32 | |
| 3836 | MDRV_CPU_ADD("audio", V25, XTAL_32MHz | |
| 3871 | 3837 | MDRV_CPU_PROGRAM_MAP(V25_rambased_mem, 0) |
| 3872 | 3838 | //MDRV_CPU_IO_MAP(V25_port, 0) |
| 3873 | 3839 | #endif |
| r3171 | r3172 | |
| 3878 | 3844 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| 3879 | 3845 | |
| 3880 | 3846 | MDRV_SCREEN_ADD("main", RASTER) |
| 3881 | MDRV_SCREEN_REFRESH_RATE( (27 | |
| 3847 | MDRV_SCREEN_REFRESH_RATE( (XTAL_27MHz | |
| 3882 | 3848 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 3883 | 3849 | MDRV_SCREEN_SIZE(432, 262) |
| 3884 | 3850 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239) |
| r3171 | r3172 | |
| 3893 | 3859 | /* sound hardware */ |
| 3894 | 3860 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 3895 | 3861 | |
| 3896 | MDRV_SOUND_ADD("ym", YM2151, 27 | |
| 3862 | MDRV_SOUND_ADD("ym", YM2151, XTAL_27MHz | |
| 3897 | 3863 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3898 | 3864 | MACHINE_DRIVER_END |
| 3899 | 3865 | |
| r3171 | r3172 | |
| 3918 | 3884 | static MACHINE_DRIVER_START( batsugun ) |
| 3919 | 3885 | |
| 3920 | 3886 | /* basic machine hardware */ |
| 3921 | MDRV_CPU_ADD("main", M68000,32 | |
| 3887 | MDRV_CPU_ADD("main", M68000, XTAL_32MHz | |
| 3922 | 3888 | MDRV_CPU_PROGRAM_MAP(batsugun_68k_mem, 0) |
| 3923 | 3889 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 3924 | 3890 | |
| 3925 | 3891 | #if USE_V25 |
| 3926 | MDRV_CPU_ADD("audio", V25, 32 | |
| 3892 | MDRV_CPU_ADD("audio", V25, XTAL_32MHz | |
| 3927 | 3893 | MDRV_CPU_PROGRAM_MAP(V25_rambased_mem, 0) |
| 3928 | 3894 | //MDRV_CPU_IO_MAP(V25_port, 0) |
| 3929 | 3895 | #endif |
| r3171 | r3172 | |
| 3949 | 3915 | /* sound hardware */ |
| 3950 | 3916 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 3951 | 3917 | |
| 3952 | MDRV_SOUND_ADD("ym", YM2151, 27 | |
| 3918 | MDRV_SOUND_ADD("ym", YM2151, XTAL_27MHz | |
| 3953 | 3919 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3954 | 3920 | MDRV_SOUND_CONFIG(batsugun_ym2151_interface) |
| 3955 | 3921 | |
| 3956 | MDRV_SOUND_ADD("oki", OKIM6295, 32 | |
| 3922 | MDRV_SOUND_ADD("oki", OKIM6295, XTAL_32MHz | |
| 3957 | 3923 | MDRV_SOUND_CONFIG(okim6295_interface_pin7low) |
| 3958 | 3924 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3959 | 3925 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 3962 | 3928 | static MACHINE_DRIVER_START( snowbro2 ) |
| 3963 | 3929 | |
| 3964 | 3930 | /* basic machine hardware */ |
| 3965 | MDRV_CPU_ADD("main", M68000, 16 | |
| 3931 | MDRV_CPU_ADD("main", M68000, XTAL_16MHz | |
| 3966 | 3932 | MDRV_CPU_PROGRAM_MAP(snowbro2_68k_mem, 0) |
| 3967 | 3933 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 3968 | 3934 | |
| r3171 | r3172 | |
| 3987 | 3953 | /* sound hardware */ |
| 3988 | 3954 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 3989 | 3955 | |
| 3990 | MDRV_SOUND_ADD("ym", YM2151, 27 | |
| 3956 | MDRV_SOUND_ADD("ym", YM2151, XTAL_27MHz | |
| 3991 | 3957 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3992 | 3958 | |
| 3993 | MDRV_SOUND_ADD("oki", OKIM6295, 27 | |
| 3959 | MDRV_SOUND_ADD("oki", OKIM6295, XTAL_27MHz | |
| 3994 | 3960 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) |
| 3995 | 3961 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3996 | 3962 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 3999 | 3965 | static MACHINE_DRIVER_START( mahoudai ) |
| 4000 | 3966 | |
| 4001 | 3967 | /* basic machine hardware */ |
| 4002 | MDRV_CPU_ADD("main", M68000,32 | |
| 3968 | MDRV_CPU_ADD("main", M68000, XTAL_32MHz | |
| 4003 | 3969 | MDRV_CPU_PROGRAM_MAP(mahoudai_68k_mem, 0) |
| 4004 | 3970 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 4005 | 3971 | |
| 4006 | MDRV_CPU_ADD("audio", Z80,32 | |
| 3972 | MDRV_CPU_ADD("audio", Z80, XTAL_32MHz | |
| 4007 | 3973 | MDRV_CPU_PROGRAM_MAP(raizing_sound_z80_mem, 0) |
| 4008 | 3974 | |
| 4009 | 3975 | MDRV_INTERLEAVE(10) |
| r3171 | r3172 | |
| 4029 | 3995 | /* sound hardware */ |
| 4030 | 3996 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 4031 | 3997 | |
| 4032 | MDRV_SOUND_ADD("ym", YM2151, 27 | |
| 3998 | MDRV_SOUND_ADD("ym", YM2151, XTAL_27MHz | |
| 4033 | 3999 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 4034 | 4000 | |
| 4035 | MDRV_SOUND_ADD("oki", OKIM6295, 32 | |
| 4001 | MDRV_SOUND_ADD("oki", OKIM6295, XTAL_32MHz | |
| 4036 | 4002 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) |
| 4037 | 4003 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 4038 | 4004 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 4041 | 4007 | static MACHINE_DRIVER_START( shippumd ) |
| 4042 | 4008 | |
| 4043 | 4009 | /* basic machine hardware */ |
| 4044 | MDRV_CPU_ADD("main", M68000,32 | |
| 4010 | MDRV_CPU_ADD("main", M68000, XTAL_32MHz | |
| 4045 | 4011 | MDRV_CPU_PROGRAM_MAP(shippumd_68k_mem, 0) |
| 4046 | 4012 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 4047 | 4013 | |
| 4048 | MDRV_CPU_ADD("audio", Z80,32 | |
| 4014 | MDRV_CPU_ADD("audio", Z80, XTAL_32MHz | |
| 4049 | 4015 | MDRV_CPU_PROGRAM_MAP(raizing_sound_z80_mem, 0) |
| 4050 | 4016 | |
| 4051 | 4017 | MDRV_INTERLEAVE(10) |
| r3171 | r3172 | |
| 4071 | 4037 | /* sound hardware */ |
| 4072 | 4038 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 4073 | 4039 | |
| 4074 | MDRV_SOUND_ADD("ym", YM2151, 27 | |
| 4040 | MDRV_SOUND_ADD("ym", YM2151, XTAL_27MHz | |
| 4075 | 4041 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono",1.0) |
| 4076 | 4042 | |
| 4077 | MDRV_SOUND_ADD("oki", OKIM6295, 32 | |
| 4043 | MDRV_SOUND_ADD("oki", OKIM6295, XTAL_32MHz | |
| 4078 | 4044 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) |
| 4079 | 4045 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 4080 | 4046 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 4083 | 4049 | static MACHINE_DRIVER_START( bgaregga ) |
| 4084 | 4050 | |
| 4085 | 4051 | /* basic machine hardware */ |
| 4086 | MDRV_CPU_ADD("main", M68000,32 | |
| 4052 | MDRV_CPU_ADD("main", M68000, XTAL_32MHz | |
| 4087 | 4053 | MDRV_CPU_PROGRAM_MAP(bgaregga_68k_mem, 0) |
| 4088 | 4054 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq4) |
| 4089 | 4055 | |
| 4090 | MDRV_CPU_ADD("audio", Z80,32 | |
| 4056 | MDRV_CPU_ADD("audio", Z80, XTAL_32MHz | |
| 4091 | 4057 | MDRV_CPU_PROGRAM_MAP(bgaregga_sound_z80_mem, 0) |
| 4092 | 4058 | |
| 4093 | 4059 | MDRV_INTERLEAVE(100) |
| r3171 | r3172 | |
| 4113 | 4079 | /* sound hardware */ |
| 4114 | 4080 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 4115 | 4081 | |
| 4116 | MDRV_SOUND_ADD("ym", YM2151, 32 | |
| 4082 | MDRV_SOUND_ADD("ym", YM2151, XTAL_32MHz | |
| 4117 | 4083 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 4118 | 4084 | |
| 4119 | MDRV_SOUND_ADD("oki", OKIM6295, 32 | |
| 4085 | MDRV_SOUND_ADD("oki", OKIM6295, XTAL_32MHz | |
| 4120 | 4086 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) |
| 4121 | 4087 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 4122 | 4088 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 4125 | 4091 | static MACHINE_DRIVER_START( batrider ) |
| 4126 | 4092 | |
| 4127 | 4093 | /* basic machine hardware */ |
| 4128 | MDRV_CPU_ADD("main", M68000,32 | |
| 4094 | MDRV_CPU_ADD("main", M68000, XTAL_32MHz | |
| 4129 | 4095 | MDRV_CPU_PROGRAM_MAP(batrider_68k_mem, 0) |
| 4130 | 4096 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq2) |
| 4131 | 4097 | |
| 4132 | MDRV_CPU_ADD("audio", Z80,32 | |
| 4098 | MDRV_CPU_ADD("audio", Z80, XTAL_32MHz | |
| 4133 | 4099 | MDRV_CPU_PROGRAM_MAP(batrider_sound_z80_mem, 0) |
| 4134 | 4100 | MDRV_CPU_IO_MAP(batrider_sound_z80_port, 0) |
| 4135 | 4101 | |
| r3171 | r3172 | |
| 4155 | 4121 | /* sound hardware */ |
| 4156 | 4122 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 4157 | 4123 | |
| 4158 | MDRV_SOUND_ADD("ym", YM2151, 32 | |
| 4124 | MDRV_SOUND_ADD("ym", YM2151, XTAL_32MHz | |
| 4159 | 4125 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 4160 | 4126 | |
| 4161 | MDRV_SOUND_ADD("oki1", OKIM6295, 32 | |
| 4127 | MDRV_SOUND_ADD("oki1", OKIM6295, XTAL_32MHz | |
| 4162 | 4128 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) |
| 4163 | 4129 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 4164 | 4130 | |
| 4165 | MDRV_SOUND_ADD("oki2", OKIM6295, 32 | |
| 4131 | MDRV_SOUND_ADD("oki2", OKIM6295, XTAL_32MHz | |
| 4166 | 4132 | MDRV_SOUND_CONFIG(okim6295_interface_pin7low) |
| 4167 | 4133 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 4168 | 4134 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 4170 | 4136 | static MACHINE_DRIVER_START( bbakraid ) |
| 4171 | 4137 | |
| 4172 | 4138 | /* basic machine hardware */ |
| 4173 | MDRV_CPU_ADD("main", M68000,32 | |
| 4139 | MDRV_CPU_ADD("main", M68000, XTAL_32MHz | |
| 4174 | 4140 | MDRV_CPU_PROGRAM_MAP(bbakraid_68k_mem, 0) |
| 4175 | 4141 | MDRV_CPU_VBLANK_INT("main", toaplan2_vblank_irq1) |
| 4176 | 4142 | |
| 4177 | MDRV_CPU_ADD("audio", Z80,32 | |
| 4143 | MDRV_CPU_ADD("audio", Z80, XTAL_32MHz | |
| 4178 | 4144 | MDRV_CPU_PROGRAM_MAP(bbakraid_sound_z80_mem, 0) |
| 4179 | 4145 | MDRV_CPU_IO_MAP(bbakraid_sound_z80_port, 0) |
| 4180 | 4146 | MDRV_CPU_PERIODIC_INT(bbakraid_snd_interrupt, 448) |
| r3171 | r3172 | |
| 4202 | 4168 | /* sound hardware */ |
| 4203 | 4169 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 4204 | 4170 | |
| 4205 | MDRV_SOUND_ADD("ymz", YMZ280B, 169344 | |
| 4171 | MDRV_SOUND_ADD("ymz", YMZ280B, XTAL_16_9344MHz) | |
| 4206 | 4172 | MDRV_SOUND_CONFIG(ymz280b_config) |
| 4207 | 4173 | MDRV_SOUND_ROUTE(0, "mono", 1.0) |
| 4208 | 4174 | MDRV_SOUND_ROUTE(1, "mono", 1.0) |
| r3171 | r3172 | |
| 4463 | 4429 | ROM_END |
| 4464 | 4430 | |
| 4465 | 4431 | |
| 4432 | /* | |
| 4433 | Fix Eight (bootleg) | |
| 4434 | Toaplan, 1992 | |
| 4435 | ||
| 4436 | PCB Layout | |
| 4437 | ---------- | |
| 4438 | ||
| 4439 | |--------------------------------------------| | |
| 4440 | | 1.BIN PAL 14MHz PAL| | |
| 4441 | | M6295 PAL | | |
| 4442 | | PAL 6116 4.BIN 681000 681000| | |
| 4443 | | 6116 | | |
| 4444 | | 6116 681000 681000| | |
| 4445 | |J 6116 PAL | | |
| 4446 | |A PAL | | |
| 4447 | |M | | |
| 4448 | |M 62256 62256 PAL | | |
| 4449 | |A 2.BIN 3.BIN PAL | | |
| 4450 | | PAL | | |
| 4451 | | 68000 PAL | | |
| 4452 | | DSW2 |------| 5.BIN | | |
| 4453 | | DSW1 6264 |TPC | | | |
| 4454 | | 3.579545MHz |1020 | 6.BIN | | |
| 4455 | | 10MHz 6264 |------| 7.BIN | | |
| 4456 | |--------------------------------------------| | |
| 4457 | Notes: | |
| 4458 | 68000 clock at 10.000MHz | |
| 4459 | M6295 clock at 875kHz [14M/16]. Sample rate = 875000 / 165 | |
| 4460 | VSync at 60Hz | |
| 4461 | 6116 - 2k x8 SRAM (x4) | |
| 4462 | 6264 - 8k x8 SRAM (x2) | |
| 4463 | 62256 - 32k x8 SRAM (x2) | |
| 4464 | 681000- 128k x8 SRAM (x4) | |
| 4465 | */ | |
| 4466 | ||
| 4467 | ||
| 4466 | 4468 | ROM_START( fixeighb ) |
| 4467 | 4469 | ROM_REGION( 0x100000, "main", 0 ) /* Main 68K code */ |
| 4468 | 4470 | ROM_LOAD16_BYTE( "3.bin", 0x000000, 0x80000, CRC(cc77d4b4) SHA1(4d3376cbae13d90c6314d8bb9236c2183fc6253c) ) |
| r3171 | r3172 | |
| 4629 | 4631 | |
| 4630 | 4632 | |
| 4631 | 4633 | /* -------------------------- Raizing games ------------------------- */ |
| 4632 | /* one of these sstriker sets might be bad .. they're very similar */ | |
| 4633 | 4634 | |
| 4635 | ||
| 4636 | /* | |
| 4637 | For the two sets of Sorcer Striker (World) the only differences | |
| 4638 | are 2 bytes plus a corrected checksum for each set: | |
| 4639 | ||
| 4640 | File Offset sstriker sstrikra | |
| 4641 | 0x160 17 0B <-- Rom checksum value | |
| 4642 | 0x161 79 6D <-- Rom checksum value | |
| 4643 | ||
| 4644 | 0x92C 18 0C <-- Unknown, but surrounding bytes are 0x18 | |
| 4645 | 0x92D 18 0C <-- Unknown, but surrounding bytes are 0x18 | |
| 4646 | ||
| 4647 | So it looks like sstriker was a slightly revised "final" version of the World set. | |
| 4648 | sstrikra has been verified on two boards as being correct. | |
| 4649 | ||
| 4650 | Printed labels for the eproms look like: | |
| 4651 | ||
| 4652 | RA-MA-01 | |
| 4653 | 01 | |
| 4654 | RAIZING | |
| 4655 | ||
| 4656 | Both English and Japanese sets use the same labels and numbers for the roms | |
| 4657 | even if the roms contain different code / data | |
| 4658 | ||
| 4659 | */ | |
| 4660 | ||
| 4634 | 4661 | ROM_START( sstriker ) |
| 4635 | 4662 | ROM_REGION( 0x080000, "main", 0 ) /* Main 68K code */ |
| 4636 | ROM_LOAD16_WORD_SWAP( "ra-ma-01 | |
| 4663 | ROM_LOAD16_WORD_SWAP( "ra-ma-01_01.u65", 0x000000, 0x080000, CRC(92259f84) SHA1(127e62e407d95efd360bfe2cac9577f326abf6ef) ) | |
| 4637 | 4664 | |
| 4638 | 4665 | ROM_REGION( 0x10000, "audio", 0 ) /* Sound Z80 code */ |
| 4639 | ROM_LOAD( "ra | |
| 4666 | ROM_LOAD( "ra-ma-01_02.u66", 0x00000, 0x10000, CRC(eabfa46d) SHA1(402c99ebf88f9025f74f0a28ced22b7882a65eb3) ) | |
| 4640 | 4667 | |
| 4641 | 4668 | ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE ) |
| 4642 | ROM_LOAD( "ra_ma_01.03", 0x000000, 0x100000, CRC(54e2bd95) SHA1(341359dd46152615675bb90e8a184216c8feebff) ) | |
| 4643 | ROM_LOAD( "ra_ma_01.04", 0x100000, 0x100000, CRC(21cd378f) SHA1(e1695bccec949d18b1c03e9c42dca384554b0d7c) ) | |
| 4669 | ROM_LOAD( "ra-ma01-rom2.u2", 0x000000, 0x100000, CRC(54e2bd95) SHA1(341359dd46152615675bb90e8a184216c8feebff) ) | |
| 4670 | ROM_LOAD( "ra-ma01-rom3.u1", 0x100000, 0x100000, CRC(21cd378f) SHA1(e1695bccec949d18b1c03e9c42dca384554b0d7c) ) | |
| 4644 | 4671 | |
| 4645 | 4672 | ROM_REGION( 0x008000, "gfx2", ROMREGION_DISPOSE ) |
| 4646 | ROM_LOAD( "ra-ma-01 | |
| 4673 | ROM_LOAD( "ra-ma-01_05.u81", 0x000000, 0x008000, CRC(88b58841) SHA1(1d16b538c11a291bd1f46a510bfbd6259b45a0b5) ) | |
| 4647 | 4674 | |
| 4648 | 4675 | ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM Samples */ |
| 4649 | ROM_LOAD( "ra | |
| 4676 | ROM_LOAD( "ra-ma | |
| 4650 | 4677 | ROM_END |
| 4651 | 4678 | |
| 4652 | 4679 | |
| 4653 | 4680 | ROM_START( sstrikra ) |
| 4654 | 4681 | ROM_REGION( 0x080000, "main", 0 ) /* Main 68K code */ |
| 4655 | ROM_LOAD16_WORD_SWAP( "rama1_01. | |
| 4682 | ROM_LOAD16_WORD_SWAP( "ra-ma_01_01.u65", 0x000000, 0x080000, CRC(708fd51d) SHA1(167186d4cf13af37ec0fa6a59c738c54dbbf3c7c) ) | |
| 4656 | 4683 | |
| 4657 | 4684 | ROM_REGION( 0x10000, "audio", 0 ) /* Sound Z80 code */ |
| 4658 | ROM_LOAD( "ra | |
| 4685 | ROM_LOAD( "ra-ma-01_02.u66", 0x00000, 0x10000, CRC(eabfa46d) SHA1(402c99ebf88f9025f74f0a28ced22b7882a65eb3) ) | |
| 4659 | 4686 | |
| 4660 | 4687 | ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE ) |
| 4661 | ROM_LOAD( "ra_ma_01.03", 0x000000, 0x100000, CRC(54e2bd95) SHA1(341359dd46152615675bb90e8a184216c8feebff) ) | |
| 4662 | ROM_LOAD( "ra_ma_01.04", 0x100000, 0x100000, CRC(21cd378f) SHA1(e1695bccec949d18b1c03e9c42dca384554b0d7c) ) | |
| 4688 | ROM_LOAD( "ra-ma01-rom2.u2", 0x000000, 0x100000, CRC(54e2bd95) SHA1(341359dd46152615675bb90e8a184216c8feebff) ) | |
| 4689 | ROM_LOAD( "ra-ma01-rom3.u1", 0x100000, 0x100000, CRC(21cd378f) SHA1(e1695bccec949d18b1c03e9c42dca384554b0d7c) ) | |
| 4663 | 4690 | |
| 4664 | 4691 | ROM_REGION( 0x008000, "gfx2", ROMREGION_DISPOSE ) |
| 4665 | ROM_LOAD( "ra-ma-01 | |
| 4692 | ROM_LOAD( "ra-ma-01_05.u81", 0x000000, 0x008000, CRC(88b58841) SHA1(1d16b538c11a291bd1f46a510bfbd6259b45a0b5) ) | |
| 4666 | 4693 | |
| 4667 | 4694 | ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM Samples */ |
| 4668 | ROM_LOAD( "ra | |
| 4695 | ROM_LOAD( "ra-ma | |
| 4669 | 4696 | ROM_END |
| 4670 | 4697 | |
| 4671 | 4698 | |
| 4672 | 4699 | ROM_START( mahoudai ) |
| 4673 | 4700 | ROM_REGION( 0x080000, "main", 0 ) /* Main 68K code */ |
| 4674 | ROM_LOAD16_WORD_SWAP( "ra_ma_01 | |
| 4701 | ROM_LOAD16_WORD_SWAP( "ra_ma_01_01.u65", 0x000000, 0x080000, CRC(970ccc5c) SHA1(c87cab83bde0284e631f02e50068407fee81d941) ) | |
| 4675 | 4702 | |
| 4676 | 4703 | ROM_REGION( 0x10000, "audio", 0 ) /* Sound Z80 code */ |
| 4677 | ROM_LOAD( "ra | |
| 4704 | ROM_LOAD( "ra-ma-01_02.u66", 0x00000, 0x10000, CRC(eabfa46d) SHA1(402c99ebf88f9025f74f0a28ced22b7882a65eb3) ) | |
| 4678 | 4705 | |
| 4679 | 4706 | ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE ) |
| 4680 | ROM_LOAD( "ra_ma_01.03", 0x000000, 0x100000, CRC(54e2bd95) SHA1(341359dd46152615675bb90e8a184216c8feebff) ) | |
| 4681 | ROM_LOAD( "ra_ma_01.04", 0x100000, 0x100000, CRC(21cd378f) SHA1(e1695bccec949d18b1c03e9c42dca384554b0d7c) ) | |
| 4707 | ROM_LOAD( "ra-ma01-rom2.u2", 0x000000, 0x100000, CRC(54e2bd95) SHA1(341359dd46152615675bb90e8a184216c8feebff) ) | |
| 4708 | ROM_LOAD( "ra-ma01-rom3.u1", 0x100000, 0x100000, CRC(21cd378f) SHA1(e1695bccec949d18b1c03e9c42dca384554b0d7c) ) | |
| 4682 | 4709 | |
| 4683 | 4710 | ROM_REGION( 0x008000, "gfx2", ROMREGION_DISPOSE ) |
| 4684 | ROM_LOAD( "ra_ma_01 | |
| 4711 | ROM_LOAD( "ra_ma_01_05.u81", 0x000000, 0x008000, CRC(c00d1e80) SHA1(53e64c4c0c6309130b37597d13b44a9e95b717d8) ) | |
| 4685 | 4712 | |
| 4686 | 4713 | ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM Samples */ |
| 4687 | ROM_LOAD( "ra | |
| 4714 | ROM_LOAD( "ra-ma | |
| 4688 | 4715 | ROM_END |
| 4689 | 4716 | |
| 4690 | 4717 | |
| r3171 | r3172 | |
| 5042 | 5069 | GAME( 1994, snowbro2, 0, snowbro2, snowbro2, T2_noZ80, ROT0, "[Toaplan] Hanafram", "Snow Bros. 2 - With New Elves / Otenki Paradise", 0 ) |
| 5043 | 5070 | GAME( 1993, mahoudai, 0, mahoudai, mahoudai, T2_Z80, ROT270, "Raizing (Able license)", "Mahou Daisakusen (Japan)", 0 ) |
| 5044 | 5071 | GAME( 1993, sstriker, mahoudai, mahoudai, sstriker, T2_Z80, ROT270, "Raizing", "Sorcer Striker (World)" , 0) // from korean board |
| 5045 | GAME( 1993, sstrikra, mahoudai, mahoudai, sstriker, T2_Z80, ROT270, "Raizing", "Sorcer Striker (World, alt)" , 0) // | |
| 5072 | GAME( 1993, sstrikra, mahoudai, mahoudai, sstriker, T2_Z80, ROT270, "Raizing", "Sorcer Striker (World, alt)" , 0) // verified on two differe | |
| 5046 | 5073 | GAME( 1994, shippumd, 0, shippumd, shippumd, T2_Z80, ROT270, "Raizing / Eighting", "Shippu Mahou Daisakusen (Japan)", 0 ) |
| 5047 | 5074 | GAME( 1994, kingdmgp, shippumd, shippumd, kingdmgp, T2_Z80, ROT270, "Raizing / Eighting", "Kingdom Grandprix (World)" , 0) // from korean board, missing letters on credits screen but this is correct |
| 5048 | 5075 | GAME( 1996, bgaregga, 0, bgaregga, bgaregga, T2_Z80, ROT270, "Raizing / Eighting", "Battle Garegga (Europe / USA / Japan / Asia) (Sat Feb 3 1996)", 0 ) |
| r3171 | r3172 | |
|---|---|---|
| 173 | 173 | AM_RANGE(0xe000, 0xf7ff) AM_WRITE(mjkjidai_videoram_w) AM_BASE(&mjkjidai_videoram) |
| 174 | 174 | ADDRESS_MAP_END |
| 175 | 175 | |
| 176 | static ADDRESS_MAP_START( | |
| 176 | static ADDRESS_MAP_START( io_ma | |
| 177 | 177 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 178 | 178 | AM_RANGE(0x00, 0x00) AM_READ(keyboard_r) |
| 179 | 179 | AM_RANGE(0x01, 0x01) AM_READ(SMH_NOP) // ??? |
| 180 | 180 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") |
| 181 | AM_RANGE(0x11, 0x11) AM_READ_PORT("IN0") | |
| 182 | AM_RANGE(0x12, 0x12) AM_READ_PORT("IN1") | |
| 183 | ADDRESS_MAP_END | |
| 184 | ||
| 185 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 186 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 187 | 181 | AM_RANGE(0x01, 0x02) AM_WRITE(keyboard_select_w) |
| 188 | 182 | AM_RANGE(0x10, 0x10) AM_WRITE(mjkjidai_ctrl_w) // rom bank, coin counter, flip screen etc |
| 183 | AM_RANGE(0x11, 0x11) AM_READ_PORT("IN0") | |
| 184 | AM_RANGE(0x12, 0x12) AM_READ_PORT("IN1") | |
| 189 | 185 | AM_RANGE(0x20, 0x20) AM_WRITE(sn76496_0_w) |
| 190 | 186 | AM_RANGE(0x30, 0x30) AM_WRITE(sn76496_1_w) |
| 191 | 187 | AM_RANGE(0x40, 0x40) AM_WRITE(adpcm_w) |
| 192 | 188 | ADDRESS_MAP_END |
| 193 | 189 | |
| 194 | 190 | |
| 195 | ||
| 196 | 191 | static INPUT_PORTS_START( mjkjidai ) |
| 197 | 192 | PORT_START("IN0") |
| 198 | 193 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| r3171 | r3172 | |
| 357 | 352 | /* basic machine hardware */ |
| 358 | 353 | MDRV_CPU_ADD("main", Z80,10000000/2) /* 5 MHz ??? */ |
| 359 | 354 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 360 | MDRV_CPU_IO_MAP( | |
| 355 | MDRV_CPU_IO_MAP(io_ma | |
| 361 | 356 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 362 | 357 | |
| 363 | 358 | MDRV_NVRAM_HANDLER(mjkjidai) |
| r3171 | r3172 | |
| 425 | 420 | |
| 426 | 421 | |
| 427 | 422 | GAME( 1986, mjkjidai, 0, mjkjidai, mjkjidai, 0, ROT0, "Sanritsu", "Mahjong Kyou Jidai (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 423 |
| r3171 | r3172 | |
|---|---|---|
| 68 | 68 | ADDRESS_MAP_END |
| 69 | 69 | |
| 70 | 70 | |
| 71 | static ADDRESS_MAP_START( readport_pastelg, ADDRESS_SPACE_IO, 8 ) | |
| 72 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 73 | AM_RANGE(0x00, 0x7f) AM_READ(nb1413m3_sndrom_r) | |
| 74 | AM_RANGE(0x81, 0x81) AM_READ(ay8910_read_port_0_r) | |
| 75 | AM_RANGE(0x90, 0x90) AM_READ_PORT("SYSTEM") | |
| 76 | AM_RANGE(0xa0, 0xa0) AM_READ(nb1413m3_inputport1_r) | |
| 77 | AM_RANGE(0xb0, 0xb0) AM_READ(nb1413m3_inputport2_r) | |
| 78 | AM_RANGE(0xc0, 0xc0) AM_READ(pastelg_sndrom_r) | |
| 79 | AM_RANGE(0xd0, 0xd0) AM_READ(SMH_NOP) // unknown | |
| 80 | AM_RANGE(0xe0, 0xe0) AM_READ_PORT("DSWC") | |
| 81 | ADDRESS_MAP_END | |
| 82 | 71 | |
| 83 | static ADDRESS_MAP_START( | |
| 72 | static ADDRESS_MAP_START( | |
| 84 | 73 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 85 | 74 | // AM_RANGE(0x00, 0x00) AM_WRITE(SMH_NOP) |
| 75 | AM_RANGE(0x00, 0x7f) AM_READ(nb1413m3_sndrom_r) | |
| 76 | AM_RANGE(0x81, 0x81) AM_READ(ay8910_read_port_0_r) | |
| 86 | 77 | AM_RANGE(0x82, 0x82) AM_WRITE(ay8910_write_port_0_w) |
| 87 | 78 | AM_RANGE(0x83, 0x83) AM_WRITE(ay8910_control_port_0_w) |
| 79 | AM_RANGE(0x90, 0x90) AM_READ_PORT("SYSTEM") | |
| 88 | 80 | AM_RANGE(0x90, 0x96) AM_WRITE(pastelg_blitter_w) |
| 89 | AM_RANGE(0xa0, 0xa0) AM_WRITE(nb1413m3_inputportsel_w) | |
| 90 | AM_RANGE(0xb0, 0xb0) AM_WRITE(pastelg_romsel_w) | |
| 81 | AM_RANGE(0xa0, 0xa0) AM_READWRITE(nb1413m3_inputport1_r, nb1413m3_inputportsel_w) | |
| 82 | AM_RANGE(0xb0, 0xb0) AM_READWRITE(nb1413m3_inputport2_r, pastelg_romsel_w) | |
| 83 | AM_RANGE(0xc0, 0xc0) AM_READ(pastelg_sndrom_r) | |
| 91 | 84 | AM_RANGE(0xc0, 0xcf) AM_WRITE(pastelg_clut_w) |
| 92 | AM_RANGE(0xd0, 0xd0) AM_WRITE(DAC_0_WRITE) | |
| 85 | AM_RANGE(0xd0, 0xd0) AM_READWRITE(SMH_NOP, DAC_0_WRITE) // unknown | |
| 86 | AM_RANGE(0xe0, 0xe0) AM_READ_PORT("DSWC") | |
| 93 | 87 | ADDRESS_MAP_END |
| 94 | 88 | |
| 95 | ||
| 96 | 89 | static INPUT_PORTS_START( pastelg ) |
| 97 | 90 | PORT_START("DSWA") |
| 98 | 91 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| r3171 | r3172 | |
| 197 | 190 | /* basic machine hardware */ |
| 198 | 191 | MDRV_CPU_ADD("main", Z80, 19968000/8) /* 2.496 MHz ? */ |
| 199 | 192 | MDRV_CPU_PROGRAM_MAP(readmem_pastelg, writemem_pastelg) |
| 200 | MDRV_CPU_IO_MAP( | |
| 193 | MDRV_CPU_IO_MAP( | |
| 201 | 194 | // MDRV_CPU_VBLANK_INT_HACK(nb1413m3_interrupt,96) // nmiclock not written, chip is 1411M1 instead of 1413M3 |
| 202 | 195 | MDRV_CPU_VBLANK_INT("main", nb1413m3_interrupt) |
| 203 | 196 | |
| r3171 | r3172 | |
| 255 | 248 | |
| 256 | 249 | |
| 257 | 250 | GAME( 1985, pastelg, 0, pastelg, pastelg, pastelg, ROT0, "Nichibutsu", "Pastel Gal (Japan 851224)", 0 ) |
| 251 |
| r3171 | r3172 | |
|---|---|---|
| 119 | 119 | AM_RANGE(0xf800, 0xf800) AM_WRITE(watchdog_reset_w) |
| 120 | 120 | ADDRESS_MAP_END |
| 121 | 121 | |
| 122 | ||
| 123 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 122 | static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) | |
| 124 | 123 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 125 | AM_RANGE(0x02, 0x02) AM_READ(ay8910_read_port_0_r) | |
| 126 | ADDRESS_MAP_END | |
| 127 | ||
| 128 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 129 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 130 | 124 | AM_RANGE(0x00, 0x00) AM_WRITE(ay8910_control_port_0_w) |
| 131 | 125 | AM_RANGE(0x01, 0x01) AM_WRITE(ay8910_write_port_0_w) |
| 126 | AM_RANGE(0x02, 0x02) AM_READ(ay8910_read_port_0_r) | |
| 132 | 127 | ADDRESS_MAP_END |
| 133 | 128 | |
| 134 | 129 | |
| r3171 | r3172 | |
| 305 | 300 | /* basic machine hardware */ |
| 306 | 301 | MDRV_CPU_ADD("main", Z80, 3072000) /* 3.072 MHz */ |
| 307 | 302 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 308 | MDRV_CPU_IO_MAP( | |
| 303 | MDRV_CPU_IO_MAP(io_ma | |
| 309 | 304 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 310 | 305 | |
| 311 | 306 | /* video hardware */ |
| r3171 | r3172 | |
| 441 | 436 | GAME( 1982, funkbeeb, funkybee, funkybee, funkbeeb, 0, ROT90, "bootleg", "Funky Bee (bootleg, harder)", 0 ) |
| 442 | 437 | GAME( 1983, skylancr, 0, funkybee, skylancr, 0, ROT90, "Orca", "Sky Lancer", 0 ) |
| 443 | 438 | GAME( 1983, skylance, skylancr, funkybee, skylance, 0, ROT90, "Orca (Esco Trading Co license)", "Sky Lancer (Esco Trading Co license)", 0 ) |
| 439 |
| r3171 | r3172 | |
|---|---|---|
| 257 | 257 | AM_RANGE(0xfc03, 0xfc03) AM_WRITE(sn76496_3_w) |
| 258 | 258 | ADDRESS_MAP_END |
| 259 | 259 | |
| 260 | static ADDRESS_MAP_START( gigas_ | |
| 260 | static ADDRESS_MAP_START( gigas_io_ma | |
| 261 | 261 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 262 | AM_RANGE(0x00, 0x00) AM_READ(spinner_r) | |
| 262 | AM_RANGE(0x00, 0x00) AM_READWRITE(spinner_r, spinner_select_w) | |
| 263 | 263 | AM_RANGE(0x01, 0x01) AM_READ(SMH_NOP) //unused dip 3 |
| 264 | 264 | ADDRESS_MAP_END |
| 265 | 265 | |
| 266 | static ADDRESS_MAP_START( | |
| 266 | static ADDRESS_MAP_START( oigas_ | |
| 267 | 267 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 268 | AM_RANGE(0x00, 0x00) AM_WRITE(spinner_select_w) | |
| 269 | ADDRESS_MAP_END | |
| 270 | ||
| 271 | static ADDRESS_MAP_START( oigas_readport, ADDRESS_SPACE_IO, 8 ) | |
| 272 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 273 | AM_RANGE(0x00, 0x00) AM_READ(spinner_r) | |
| 268 | AM_RANGE(0x00, 0x00) AM_READWRITE(spinner_r, spinner_select_w) | |
| 274 | 269 | AM_RANGE(0x01, 0x01) AM_READ(SMH_NOP) //unused dip 3 |
| 275 | 270 | AM_RANGE(0x02, 0x02) AM_READ(oigas_2_r) |
| 276 | 271 | AM_RANGE(0x03, 0x03) AM_READ(oigas_3_r) |
| 277 | ADDRESS_MAP_END | |
| 278 | ||
| 279 | static ADDRESS_MAP_START( oigas_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 280 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 281 | AM_RANGE(0x00, 0x00) AM_WRITE(spinner_select_w) | |
| 282 | 272 | AM_RANGE(0x05, 0x05) AM_WRITE(oigas_5_w) |
| 283 | 273 | ADDRESS_MAP_END |
| 284 | 274 | |
| 285 | static ADDRESS_MAP_START( freekckb_ | |
| 275 | static ADDRESS_MAP_START( freekckb_io_ma | |
| 286 | 276 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 287 | AM_RANGE(0xff, 0xff) AM_READ(freekick_ff_r) | |
| 277 | AM_RANGE(0xff, 0xff) AM_READWRITE(freekick_ff_r, freekick_ff_w) | |
| 288 | 278 | ADDRESS_MAP_END |
| 289 | 279 | |
| 290 | static ADDRESS_MAP_START( freekckb_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 291 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 292 | AM_RANGE(0xff, 0xff) AM_WRITE(freekick_ff_w) | |
| 293 | ADDRESS_MAP_END | |
| 294 | 280 | |
| 295 | ||
| 296 | ||
| 297 | 281 | /************************************* |
| 298 | 282 | * |
| 299 | 283 | * Game-specific port definitions |
| r3171 | r3172 | |
| 695 | 679 | |
| 696 | 680 | MDRV_CPU_MODIFY("main") |
| 697 | 681 | MDRV_CPU_PROGRAM_MAP(freekckb_readmem,freekckb_writemem) |
| 698 | MDRV_CPU_IO_MAP(freekckb_ | |
| 682 | MDRV_CPU_IO_MAP(freekckb_i | |
| 699 | 683 | |
| 700 | 684 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) |
| 701 | 685 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) |
| r3171 | r3172 | |
| 711 | 695 | |
| 712 | 696 | MDRV_CPU_MODIFY("main") |
| 713 | 697 | MDRV_CPU_PROGRAM_MAP(gigas_readmem,gigas_writemem) |
| 714 | MDRV_CPU_IO_MAP(gigas_ | |
| 698 | MDRV_CPU_IO_MAP(gigas_ | |
| 715 | 699 | |
| 716 | 700 | MDRV_VIDEO_UPDATE(gigas) |
| 717 | 701 | MACHINE_DRIVER_END |
| r3171 | r3172 | |
| 719 | 703 | static MACHINE_DRIVER_START( oigas ) |
| 720 | 704 | MDRV_IMPORT_FROM(gigas) |
| 721 | 705 | MDRV_CPU_MODIFY("main") |
| 722 | MDRV_CPU_IO_MAP(oigas_ | |
| 706 | MDRV_CPU_IO_MAP(oigas_ | |
| 723 | 707 | MACHINE_DRIVER_END |
| 724 | 708 | |
| 725 | 709 | |
| r3171 | r3172 | |
| 1098 | 1082 | GAME( 1988, countrun, 0, freekckb, countrun, 0, ROT0, "Nihon System (Sega license)", "Counter Run", GAME_NOT_WORKING ) |
| 1099 | 1083 | GAME( 1988, countrnb, countrun, freekckb, countrun, 0, ROT0, "bootleg", "Counter Run (bootleg set 1)", 0 ) |
| 1100 | 1084 | GAME( 1988, countrb2, countrun, freekckb, countrun, 0, ROT0, "bootleg", "Counter Run (bootleg set 2)", GAME_NOT_WORKING ) |
| 1085 |
| r3171 | r3172 | |
|---|---|---|
| 3798 | 3798 | ROM_REGION( 0x100000, "user4", 0 ) /* sound data and MCU BIOS */ |
| 3799 | 3799 | ROM_LOAD( "rv1data.6r", 0, 0x080000, CRC(d358ec20) SHA1(140c513349240417bb546dd2d151f3666b818e91) ) |
| 3800 | 3800 | |
| 3801 | | |
| 3801 | | |
| 3802 | 3802 | ROM_LOAD( "rv1cg0.1a", 0x200000*0x0, 0x200000,CRC(c518f06b) SHA1(4c01d453244192dd13087bdc72a7f7be80b47cbc) ) /* rv1cg0.2a */ |
| 3803 | 3803 | ROM_LOAD( "rv1cg1.1c", 0x200000*0x1, 0x200000,CRC(6628f792) SHA1(7a5405c5fcb2f3f001ae17df393c31e61a834f2b) ) /* rv1cg1.2c */ |
| 3804 | 3804 | ROM_LOAD( "rv1cg2.1d", 0x200000*0x2, 0x200000,CRC(0b707cc5) SHA1(38e1a554b278062edc369565353497ac4b016f78) ) /* rv1cg2.2d */ |
| r3171 | r3172 | |
|---|---|---|
| 1651 | 1651 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) |
| 1652 | 1652 | PORT_DIPSETTING( 0x04, "3" ) |
| 1653 | 1653 | PORT_DIPSETTING( 0x00, "5" ) |
| 1654 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_64v, | |
| 1654 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_64v, NULL) /* yes, this is different */ | |
| 1655 | 1655 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1656 | 1656 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1657 | 1657 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r3171 | r3172 | |
|---|---|---|
| 85 | 85 | AM_RANGE(0xffc000, 0xffc7ff) AM_MIRROR(0x7f8800) AM_RAM_WRITE(paletteram16_IIIIRRRRGGGGBBBB_word_w) AM_BASE(&paletteram16) |
| 86 | 86 | AM_RANGE(0xffd000, 0xffdfff) AM_MIRROR(0x7f8000) AM_READWRITE(atarigen_eeprom_r, atarigen_eeprom_w) AM_BASE(&atarigen_eeprom) AM_SIZE(&atarigen_eeprom_size) |
| 87 | 87 | AM_RANGE(0xffe000, 0xffe0ff) AM_MIRROR(0x7f8000) AM_READ(atarigen_sound_r) |
| 88 | AM_RANGE(0xffe100, 0xffe1ff) AM_MIRROR(0x7f8000) AM_READ | |
| 88 | AM_RANGE(0xffe100, 0xffe1ff) AM_MIRROR(0x7f8000) AM_READ | |
| 89 | 89 | AM_RANGE(0xffe200, 0xffe2ff) AM_MIRROR(0x7f8000) AM_READ(special_port1_r) |
| 90 | 90 | AM_RANGE(0xffe800, 0xffe8ff) AM_MIRROR(0x7f8000) AM_WRITE(atarigen_eeprom_enable_w) |
| 91 | 91 | AM_RANGE(0xffe900, 0xffe9ff) AM_MIRROR(0x7f8000) AM_WRITE(atarigen_sound_w) |
| r3171 | r3172 | |
| 103 | 103 | *************************************/ |
| 104 | 104 | |
| 105 | 105 | static INPUT_PORTS_START( xybots ) |
| 106 | PORT_START("FFE100") | |
| 106 | PORT_START("FFE100") | |
| 107 | 107 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) |
| 108 | 108 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 109 | 109 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Twist Right") PORT_CODE(KEYCODE_W) PORT_PLAYER(2) |
| r3171 | r3172 | |
| 121 | 121 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 122 | 122 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| 123 | 123 | |
| 124 | PORT_START("FFE200") | |
| 124 | PORT_START("FFE200") | |
| 125 | 125 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 126 | 126 | PORT_SERVICE( 0x0100, IP_ACTIVE_LOW ) |
| 127 | 127 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED ) /* /AUDBUSY */ |
| r3171 | r3172 | |
|---|---|---|
| 710 | 710 | AM_RANGE(0x8103, 0x8103) AM_WRITE(SMH_NOP) //only one 9b at reset |
| 711 | 711 | ADDRESS_MAP_END |
| 712 | 712 | |
| 713 | static ADDRESS_MAP_START( ozon1_ | |
| 713 | static ADDRESS_MAP_START( ozon1_ | |
| 714 | 714 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 715 | 715 | AM_RANGE(0x00, 0x00) AM_WRITE(ay8910_write_port_0_w) |
| 716 | 716 | AM_RANGE(0x01, 0x01) AM_WRITE(ay8910_control_port_0_w) |
| r3171 | r3172 | |
| 2461 | 2461 | MDRV_IMPORT_FROM(galaxold_base) |
| 2462 | 2462 | MDRV_CPU_MODIFY("main") |
| 2463 | 2463 | MDRV_CPU_PROGRAM_MAP(ozon1_readmem,ozon1_writemem) |
| 2464 | MDRV_CPU_IO_MAP( | |
| 2464 | MDRV_CPU_IO_MAP( | |
| 2465 | 2465 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 2466 | 2466 | |
| 2467 | 2467 | MDRV_MACHINE_RESET(NULL) |
| r3171 | r3172 | |
|---|---|---|
| 351 | 351 | } |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | static | |
| 354 | static CUSTOM_I | |
| 355 | 355 | { |
| 356 | return | |
| 356 | return | |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | static WRITE8_HANDLER( pending_command_clear_w ) |
| r3171 | r3172 | |
| 377 | 377 | AM_RANGE(0xfff004, 0xfff005) AM_READ_PORT("P3") /* Left Side Ctrls */ |
| 378 | 378 | AM_RANGE(0xfff004, 0xfff007) AM_WRITE(welltris_scrollreg_w) |
| 379 | 379 | AM_RANGE(0xfff006, 0xfff007) AM_READ_PORT("P4") /* Right Side Ctrls */ |
| 380 | AM_RANGE(0xfff008, 0xfff009) AM_READ | |
| 380 | AM_RANGE(0xfff008, 0xfff009) AM_READ | |
| 381 | 381 | AM_RANGE(0xfff008, 0xfff009) AM_WRITE(sound_command_w) |
| 382 | 382 | AM_RANGE(0xfff00a, 0xfff00b) AM_READ_PORT("EXTRA") /* P3+P4 Coin + Start Buttons */ |
| 383 | AM_RANGE(0xfff00c, 0xfff00d) AM_READ_PORT("DSW1") | |
| 383 | AM_RANGE(0xfff00c, 0xfff00d) AM_READ_PORT("DSW1") | |
| 384 | 384 | AM_RANGE(0xfff00c, 0xfff00d) AM_WRITE(SMH_NOP) /* ?? */ |
| 385 | AM_RANGE(0xfff00e, 0xfff00f) AM_READ_PORT("DSW2") | |
| 385 | AM_RANGE(0xfff00e, 0xfff00f) AM_READ_PORT("DSW2") | |
| 386 | 386 | AM_RANGE(0xfff00e, 0xfff00f) AM_WRITE(SMH_NOP) /* ?? */ |
| 387 | 387 | ADDRESS_MAP_END |
| 388 | 388 | |
| r3171 | r3172 | |
| 412 | 412 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* Test (used to go through tests in service mode) */ |
| 413 | 413 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) /* Tested at start of irq 1 */ |
| 414 | 414 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* Service (adds a coin) */ |
| 415 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* pending sound command */ | |
| 415 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(pending_sound_r, NULL) /* pending sound command */ | |
| 416 | 416 | |
| 417 | 417 | PORT_START("P1") |
| 418 | 418 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r3171 | r3172 | |
|---|---|---|
| 194 | 194 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 195 | 195 | INPUT_PORTS_END |
| 196 | 196 | |
| 197 | static INPUT_PORTS_START( rockduck ) | |
| 198 | PORT_INCLUDE( scregg ) | |
| 197 | 199 | |
| 200 | PORT_MODIFY("DSW2") | |
| 201 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) | |
| 202 | PORT_DIPSETTING( 0x01, "2" ) | |
| 203 | PORT_DIPSETTING( 0x00, "3" ) | |
| 198 | 204 | |
| 205 | INPUT_PORTS_END | |
| 199 | 206 | |
| 207 | ||
| 208 | ||
| 200 | 209 | static const gfx_layout charlayout = |
| 201 | 210 | { |
| 202 | 211 | 8,8, /* 8*8 characters */ |
| r3171 | r3172 | |
| 400 | 409 | GAME( 198?, dommy, 0, dommy, scregg, 0, ROT270, "Technos", "Dommy", 0 ) |
| 401 | 410 | GAME( 1983, scregg, 0, scregg, scregg, 0, ROT270, "Technos", "Scrambled Egg", 0 ) |
| 402 | 411 | GAME( 1983, eggs, scregg, scregg, scregg, 0, ROT270, "[Technos] Universal USA", "Eggs", 0 ) |
| 403 | GAME( 1983, rockduck, 0, scregg, | |
| 412 | GAME( 1983, rockduck, 0, scregg, |
| r3171 | r3172 | |
|---|---|---|
| 93 | 93 | AM_RANGE(0x8800, 0x8bff) AM_WRITE(SMH_RAM) |
| 94 | 94 | ADDRESS_MAP_END |
| 95 | 95 | |
| 96 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 97 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 98 | AM_RANGE(0x00, 0x00) AM_READ(hanaawas_input_port_0_r) | |
| 99 | AM_RANGE(0x01, 0x01) AM_READNOP /* it must return 0 */ | |
| 100 | AM_RANGE(0x10, 0x10) AM_READ(ay8910_read_port_0_r) | |
| 101 | ADDRESS_MAP_END | |
| 102 | 96 | |
| 103 | static ADDRESS_MAP_START( | |
| 97 | static ADDRESS_MAP_START( | |
| 104 | 98 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 105 | AM_RANGE(0x00, 0x00) AM_WRITE(hanaawas_inputs_mux_w) | |
| 106 | AM_RANGE(0x10, 0x10) AM_WRITE(ay8910_control_port_0_w) | |
| 99 | AM_RANGE(0x00, 0x00) AM_READWRITE(hanaawas_input_port_0_r, hanaawas_inputs_mux_w) | |
| 100 | AM_RANGE(0x01, 0x01) AM_READNOP /* it must return 0 */ | |
| 101 | AM_RANGE(0x10, 0x10) AM_READWRITE(ay8910_read_port_0_r, ay8910_control_port_0_w) | |
| 107 | 102 | AM_RANGE(0x11, 0x11) AM_WRITE(ay8910_write_port_0_w) |
| 108 | 103 | ADDRESS_MAP_END |
| 109 | 104 | |
| 110 | ||
| 111 | 105 | static INPUT_PORTS_START( hanaawas ) |
| 112 | 106 | PORT_START("IN0") /* IN0 */ |
| 113 | 107 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| r3171 | r3172 | |
| 209 | 203 | /* basic machine hardware */ |
| 210 | 204 | MDRV_CPU_ADD("main", Z80,18432000/6) /* 3.072 MHz ??? */ |
| 211 | 205 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 212 | MDRV_CPU_IO_MAP( | |
| 206 | MDRV_CPU_IO_MAP(io_ma | |
| 213 | 207 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 214 | 208 | |
| 215 | 209 | /* video hardware */ |
| r3171 | r3172 | |
| 264 | 258 | |
| 265 | 259 | |
| 266 | 260 | GAME( 1982, hanaawas, 0, hanaawas, hanaawas, 0, ROT0, "Setakikaku, Ltd.", "Hana Awase", 0 ) |
| 261 |
| r3171 | r3172 | |
|---|---|---|
| 329 | 329 | |
| 330 | 330 | static WRITE8_HANDLER( vid_o1_callback ) |
| 331 | 331 | { |
| 332 | ptm6840_set_c2( 1, data); /* this output is the clock for timer2 */ | |
| 332 | ptm6840_set_c2( machine, 1, data); /* this output is the clock for timer2 */ | |
| 333 | 333 | |
| 334 | 334 | if (data) |
| 335 | 335 | { |
| r3171 | r3172 | |
| 343 | 343 | |
| 344 | 344 | static WRITE8_HANDLER( vid_o2_callback ) |
| 345 | 345 | { |
| 346 | ptm6840_set_c3( 1, data); /* this output is the clock for timer3 */ | |
| 346 | ptm6840_set_c3( machine, 1, data); /* this output is the clock for timer3 */ | |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | |
| 350 | 350 | static WRITE8_HANDLER( vid_o3_callback ) |
| 351 | 351 | { |
| 352 | ptm6840_set_c1( 1, data); /* this output is the clock for timer1 */ | |
| 352 | ptm6840_set_c1( machine, 1, data); /* this output is the clock for timer1 */ | |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | |
| r3171 | r3172 | |
| 1349 | 1349 | /* machine start (called only once) */ |
| 1350 | 1350 | MACHINE_START( mpu4_vid ) |
| 1351 | 1351 | { |
| 1352 | mpu4_config_common(); | |
| 1352 | mpu4_config_common(machine); | |
| 1353 | 1353 | pia_reset(); |
| 1354 | 1354 | |
| 1355 | ptm6840_config(1, &ptm_vid_intf ); | |
| 1355 | ptm6840_config(machine, 1, &ptm_vid_intf ); | |
| 1356 | 1356 | |
| 1357 | 1357 | /* setup communications */ |
| 1358 | 1358 | serial_card_connected=1; |
| r3171 | r3172 | |
|---|---|---|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
| 126 | static READ32_HANDLER( port1_r ) | |
| 127 | { | |
| 128 | return (input_port_read(machine, "IN1") << 16) | input_port_read(machine, "IN1"); | |
| 129 | } | |
| 130 | ||
| 131 | ||
| 132 | static READ32_HANDLER( port2_r ) | |
| 133 | { | |
| 134 | return (input_port_read(machine, "DSW") << 16) | input_port_read(machine, "DSW"); | |
| 135 | } | |
| 136 | ||
| 137 | ||
| 138 | ||
| 139 | 126 | /************************************* |
| 140 | 127 | * |
| 141 | 128 | * ADC input ports |
| r3171 | r3172 | |
| 323 | 310 | static READ32_HANDLER( crusnwld_serial_status_r ) |
| 324 | 311 | { |
| 325 | 312 | int status = midway_serial_pic_status_r(); |
| 326 | return (port | |
| 313 | return (input_port | |
| 327 | 314 | } |
| 328 | 315 | |
| 329 | 316 | |
| r3171 | r3172 | |
| 387 | 374 | static READ32_HANDLER( offroadc_serial_status_r ) |
| 388 | 375 | { |
| 389 | 376 | int status = midway_serial_pic2_status_r(); |
| 390 | return (port | |
| 377 | return (input_port | |
| 391 | 378 | } |
| 392 | 379 | |
| 393 | 380 | |
| r3171 | r3172 | |
| 503 | 490 | AM_RANGE(0x980080, 0x980080) AM_NOP |
| 504 | 491 | AM_RANGE(0x980082, 0x980083) AM_READ(midvunit_dma_trigger_r) |
| 505 | 492 | AM_RANGE(0x990000, 0x990000) AM_READ(SMH_NOP) // link PAL (low 4 bits must == 4) |
| 506 | AM_RANGE(0x991030, 0x991030) AM_READ( | |
| 493 | AM_RANGE(0x991030, 0x991030) AM_READ_PORT("99 | |
| 507 | 494 | // AM_RANGE(0x991050, 0x991050) AM_READ(SMH_RAM) // seems to be another port |
| 508 | 495 | AM_RANGE(0x991060, 0x991060) AM_READ(port0_r) |
| 509 | AM_RANGE(0x992000, 0x992000) AM_READ( | |
| 496 | AM_RANGE(0x992000, 0x992000) AM_READ_PORT("99 | |
| 510 | 497 | AM_RANGE(0x993000, 0x993000) AM_READWRITE(midvunit_adc_r, midvunit_adc_w) |
| 511 | 498 | AM_RANGE(0x994000, 0x994000) AM_WRITE(midvunit_control_w) |
| 512 | 499 | AM_RANGE(0x995000, 0x995000) AM_WRITE(SMH_NOP) // force feedback? |
| r3171 | r3172 | |
| 554 | 541 | *************************************/ |
| 555 | 542 | |
| 556 | 543 | static INPUT_PORTS_START( crusnusa ) |
| 544 | PORT_START("991030") | |
| 545 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 546 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 547 | ||
| 548 | PORT_START("992000") | |
| 549 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 550 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 551 | ||
| 557 | 552 | PORT_START("IN0") |
| 558 | 553 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 559 | 554 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r3171 | r3172 | |
| 588 | 583 | PORT_DIPSETTING( 0x0000, "Master" ) |
| 589 | 584 | PORT_DIPSETTING( 0x0001, "Slave" ) |
| 590 | 585 | PORT_DIPNAME( 0x0002, 0x0002, "Link???" ) |
| 591 | PORT_DIPSETTING( 0x0002, DEF_STR( Off )) | |
| 592 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 586 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 587 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 593 | 588 | PORT_DIPNAME( 0x0004, 0x0004, "Linking" ) |
| 594 | PORT_DIPSETTING( 0x0004, DEF_STR( Off )) | |
| 595 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 596 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown )) | |
| 597 | PORT_DIPSETTING( 0x0008, DEF_STR( Off )) | |
| 598 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 589 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 590 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 591 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) | |
| 592 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 593 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 599 | 594 | PORT_DIPNAME( 0x0010, 0x0010, "Freeze" ) |
| 600 | PORT_DIPSETTING( 0x0010, DEF_STR( Off )) | |
| 601 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 602 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Cabinet )) | |
| 603 | PORT_DIPSETTING( 0x0020, DEF_STR( Upright )) | |
| 595 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 596 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 597 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Cabinet ) ) | |
| 598 | PORT_DIPSETTING( 0x0020, DEF_STR( Upright ) ) | |
| 604 | 599 | PORT_DIPSETTING( 0x0000, "Sitdown" ) |
| 605 | 600 | PORT_DIPNAME( 0x0040, 0x0040, "Enable Motion" ) |
| 606 | PORT_DIPSETTING( 0x0040, DEF_STR( Off )) | |
| 607 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 601 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 602 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 608 | 603 | PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) |
| 609 | 604 | PORT_DIPNAME( 0x0100, 0x0100, "Coin Counters" ) |
| 610 | 605 | PORT_DIPSETTING( 0x0100, "1" ) |
| 611 | 606 | PORT_DIPSETTING( 0x0000, "2" ) |
| 612 | PORT_DIPNAME( 0xfe00, 0xf800, DEF_STR( Coinage )) | |
| 607 | PORT_DIPNAME( 0xfe00, 0xf800, DEF_STR( Coinage ) ) | |
| 613 | 608 | PORT_DIPSETTING( 0xfe00, "USA-1" ) |
| 614 | 609 | PORT_DIPSETTING( 0xfa00, "USA-3" ) |
| 615 | 610 | PORT_DIPSETTING( 0xfc00, "USA-7" ) |
| r3171 | r3172 | |
| 678 | 673 | |
| 679 | 674 | |
| 680 | 675 | static INPUT_PORTS_START( crusnwld ) |
| 676 | PORT_START("991030") | |
| 677 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 678 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 679 | ||
| 680 | PORT_START("992000") | |
| 681 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 682 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 683 | ||
| 681 | 684 | PORT_START("IN0") |
| 682 | 685 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 683 | 686 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r3171 | r3172 | |
| 714 | 717 | PORT_DIPSETTING( 0x0002, "3" ) |
| 715 | 718 | PORT_DIPSETTING( 0x0003, "4" ) |
| 716 | 719 | PORT_DIPNAME( 0x0004, 0x0004, "Linking" ) |
| 717 | PORT_DIPSETTING( 0x0004, DEF_STR( Off )) | |
| 718 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 720 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 721 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 719 | 722 | PORT_DIPNAME( 0x0018, 0x0008, "Games Linked" ) |
| 720 | 723 | PORT_DIPSETTING( 0x0008, "2" ) |
| 721 | 724 | PORT_DIPSETTING( 0x0010, "3" ) |
| 722 | 725 | PORT_DIPSETTING( 0x0018, "4" ) |
| 723 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Cabinet )) | |
| 724 | PORT_DIPSETTING( 0x0020, DEF_STR( Upright )) | |
| 726 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Cabinet ) ) | |
| 727 | PORT_DIPSETTING( 0x0020, DEF_STR( Upright ) ) | |
| 725 | 728 | PORT_DIPSETTING( 0x0000, "Sitdown" ) |
| 726 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown )) | |
| 727 | PORT_DIPSETTING( 0x0040, DEF_STR( Off )) | |
| 728 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 729 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 730 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 731 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 729 | 732 | PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) |
| 730 | 733 | PORT_DIPNAME( 0x0100, 0x0100, "Coin Counters" ) |
| 731 | 734 | PORT_DIPSETTING( 0x0100, "1" ) |
| 732 | 735 | PORT_DIPSETTING( 0x0000, "2" ) |
| 733 | PORT_DIPNAME( 0xfe00, 0xf800, DEF_STR( Coinage )) | |
| 736 | PORT_DIPNAME( 0xfe00, 0xf800, DEF_STR( Coinage ) ) | |
| 734 | 737 | PORT_DIPSETTING( 0xfe00, "USA-1" ) |
| 735 | 738 | PORT_DIPSETTING( 0xfa00, "USA-3" ) |
| 736 | 739 | PORT_DIPSETTING( 0xfc00, "USA-7" ) |
| r3171 | r3172 | |
| 799 | 802 | |
| 800 | 803 | |
| 801 | 804 | static INPUT_PORTS_START( offroadc ) |
| 805 | PORT_START("991030") | |
| 806 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 807 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 808 | ||
| 809 | PORT_START("992000") | |
| 810 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 811 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 812 | ||
| 802 | 813 | PORT_START("IN0") |
| 803 | 814 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 804 | 815 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r3171 | r3172 | |
| 829 | 840 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 830 | 841 | |
| 831 | 842 | PORT_START("DSW") |
| 832 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown )) | |
| 833 | PORT_DIPSETTING( 0x0001, DEF_STR( Off )) | |
| 834 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 843 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) | |
| 844 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 845 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 835 | 846 | PORT_DIPNAME( 0x0002, 0x0000, "Shifter" ) |
| 836 | 847 | PORT_DIPSETTING( 0x0002, "Closed" ) |
| 837 | 848 | PORT_DIPSETTING( 0x0000, "Open" ) |
| 838 | 849 | PORT_DIPNAME( 0x0004, 0x0004, "Girls" ) |
| 839 | PORT_DIPSETTING( 0x0000, DEF_STR( Off )) | |
| 840 | PORT_DIPSETTING( 0x0004, DEF_STR( On )) | |
| 850 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) | |
| 851 | PORT_DIPSETTING( 0x0004, DEF_STR( On ) ) | |
| 841 | 852 | PORT_DIPNAME( 0x0008, 0x0008, "Road Kill" ) |
| 842 | PORT_DIPSETTING( 0x0000, DEF_STR( Off )) | |
| 843 | PORT_DIPSETTING( 0x0008, DEF_STR( On )) | |
| 844 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown )) | |
| 845 | PORT_DIPSETTING( 0x0010, DEF_STR( Off )) | |
| 846 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 853 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) | |
| 854 | PORT_DIPSETTING( 0x0008, DEF_STR( On ) ) | |
| 855 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) | |
| 856 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 857 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 847 | 858 | PORT_DIPNAME( 0x0020, 0x0020, "Link" ) |
| 848 | 859 | PORT_DIPSETTING( 0x0020, "Disabled" ) |
| 849 | 860 | PORT_DIPSETTING( 0x0000, "Enabled" ) |
| r3171 | r3172 | |
| 852 | 863 | PORT_DIPSETTING( 0x0080, "2" ) |
| 853 | 864 | PORT_DIPSETTING( 0x0040, "3" ) |
| 854 | 865 | PORT_DIPSETTING( 0x0000, "4" ) |
| 855 | PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown )) | |
| 856 | PORT_DIPSETTING( 0x0100, DEF_STR( Off )) | |
| 857 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 858 | PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown )) | |
| 859 | PORT_DIPSETTING( 0x0200, DEF_STR( Off )) | |
| 860 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 861 | PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown )) | |
| 862 | PORT_DIPSETTING( 0x0400, DEF_STR( Off )) | |
| 863 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 864 | PORT_DIPNAME( 0xf800, 0xf800, DEF_STR( Coinage )) | |
| 866 | PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) | |
| 867 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) | |
| 868 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 869 | PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) | |
| 870 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 871 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 872 | PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) | |
| 873 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) | |
| 874 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 875 | PORT_DIPNAME( 0xf800, 0xf800, DEF_STR( Coinage ) ) | |
| 865 | 876 | PORT_DIPSETTING( 0xf800, "USA 1" ) |
| 866 | 877 | PORT_DIPSETTING( 0xf000, "German 1" ) |
| 867 | 878 | PORT_DIPSETTING( 0xe800, "French 1" ) |
| r3171 | r3172 | |
| 894 | 905 | |
| 895 | 906 | |
| 896 | 907 | static INPUT_PORTS_START( wargods ) |
| 897 | PORT_START("DIPS") /* DS1 */ | |
| 898 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown )) | |
| 899 | PORT_DIPSETTING( 0x0001, DEF_STR( Off )) | |
| 900 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 901 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown )) | |
| 902 | PORT_DIPSETTING( 0x0002, DEF_STR( Off )) | |
| 903 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 904 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown )) | |
| 905 | PORT_DIPSETTING( 0x0004, DEF_STR( Off )) | |
| 906 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 908 | PORT_START("DIPS") | |
| 909 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) | |
| 910 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 911 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 912 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) | |
| 913 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 914 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 915 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) | |
| 916 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 917 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 907 | 918 | PORT_DIPNAME( 0x0008, 0x0008, "Blood" ) |
| 908 | PORT_DIPSETTING( 0x0000, DEF_STR( Off )) | |
| 909 | PORT_DIPSETTING( 0x0008, DEF_STR( On )) | |
| 919 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) | |
| 920 | PORT_DIPSETTING( 0x0008, DEF_STR( On ) ) | |
| 910 | 921 | PORT_DIPNAME( 0x0010, 0x0010, "Graphics" ) |
| 911 | 922 | PORT_DIPSETTING( 0x0010, DEF_STR( Normal ) ) |
| 912 | 923 | PORT_DIPSETTING( 0x0000, "Family" ) |
| 913 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown )) | |
| 914 | PORT_DIPSETTING( 0x0020, DEF_STR( Off )) | |
| 915 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 916 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown )) | |
| 917 | PORT_DIPSETTING( 0x0040, DEF_STR( Off )) | |
| 918 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 919 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown )) | |
| 920 | PORT_DIPSETTING( 0x0080, DEF_STR( Off )) | |
| 921 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 924 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 925 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 926 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 927 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 928 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 929 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 930 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 931 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 932 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 922 | 933 | PORT_DIPNAME( 0x0100, 0x0100, "Coinage Source" ) |
| 923 | 934 | PORT_DIPSETTING( 0x0100, "Dipswitch" ) |
| 924 | 935 | PORT_DIPSETTING( 0x0000, "CMOS" ) |
| 925 | PORT_DIPNAME( 0x3e00, 0x3e00, DEF_STR( Coinage )) | |
| 936 | PORT_DIPNAME( 0x3e00, 0x3e00, DEF_STR( Coinage ) ) | |
| 926 | 937 | PORT_DIPSETTING( 0x3e00, "USA-1" ) |
| 927 | 938 | PORT_DIPSETTING( 0x3c00, "USA-2" ) |
| 928 | 939 | PORT_DIPSETTING( 0x3a00, "USA-3" ) |
| r3171 | r3172 | |
| 943 | 954 | PORT_DIPSETTING( 0x1400, "French-11" ) |
| 944 | 955 | PORT_DIPSETTING( 0x1200, "French-12" ) |
| 945 | 956 | PORT_DIPSETTING( 0x1600, "French-ECA" ) |
| 946 | PORT_DIPSETTING( 0x3000, DEF_STR( Free_Play )) | |
| 947 | PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown )) | |
| 948 | PORT_DIPSETTING( 0x4000, DEF_STR( Off )) | |
| 949 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 957 | PORT_DIPSETTING( 0x3000, DEF_STR( Free_Play ) ) | |
| 958 | PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) | |
| 959 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 960 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 950 | 961 | PORT_DIPNAME( 0x8000, 0x8000, "Test Switch" ) |
| 951 | PORT_DIPSETTING( 0x8000, DEF_STR( Off )) | |
| 952 | PORT_DIPSETTING( 0x0000, DEF_STR( On )) | |
| 962 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 963 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 953 | 964 | |
| 954 | 965 | PORT_START("SYSTEM") |
| 955 | 966 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 956 | 967 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 957 | 968 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 958 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) | |
| 969 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ | |
| 959 | 970 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW ) |
| 960 | 971 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 961 | 972 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r3171 | r3172 | |
| 1060 | 1071 | * |
| 1061 | 1072 | *************************************/ |
| 1062 | 1073 | |
| 1074 | /* | |
| 1075 | Cruis'n USA | |
| 1076 | Midway, 1994 | |
| 1077 | ||
| 1078 | PCB Layout | |
| 1079 | ---------- | |
| 1080 | ||
| 1081 | 5770-14365-02 (C) 1994 NINTENDO | |
| 1082 | |-------------------------------------------------------------------------------| | |
| 1083 | | SOUND.U5 SOUND.U9 BATTERY GAME.U26 GAME.U27 GAME.U28 GAME.U29 | | |
| 1084 | | SOUND.U4 SOUND.U8 GAME.U22 GAME.U23 GAME.U24 GAME.U25 | | |
| 1085 | | SOUND.U3 SOUND.U7 6264 RESET_SW GAME.U18 GAME.U19 GAME.U20 GAME.U21 | | |
| 1086 | | SOUND.U2 SOUND.U6 GAME.U14 GAME.U15 GAME.U16 GAME.U17 | | |
| 1087 | | GAME.U10 GAME.U11 GAME.U12 GAME.U13 | | |
| 1088 | | 6116 PAL2 IDT7204 IDT7204 | | |
| 1089 | | LH521007 LH521007 LH521007 LH521007| | |
| 1090 | | 6116 6116 PAL3 | | |
| 1091 | | PAL1 PAL4 |----------| 4C4001 4C4001 |-------| | | |
| 1092 | |AD1851 33.3333MHz|LSI | 4C4001 4C4001 |TMS | | | |
| 1093 | | |L1A7968 | 4C4001 4C4001 |320C31 | | | |
| 1094 | | 40MHz|5410-1346500 4C4001 4C4001 |DSP | | | |
| 1095 | | |MIDWAY | |-------| | | |
| 1096 | | 10MHz ADSP-2105 CY7C199 |----------| 50MHz | | |
| 1097 | |TDA2030 CY7C199 DSW(8)| | |
| 1098 | | TL084 D482234 D482234 | | |
| 1099 | | TL084 D482234 D482234 DSW(8)| | |
| 1100 | |TDA2030 PAL5 SN75160 SN75160 PAL6 | | |
| 1101 | | P5 P7 SN75176 SN75176 P11 | | |
| 1102 | |P3 P4 |--| JAMMA |--|P8 P9 SN75176 SN75176 P10 ADC0844| | |
| 1103 | |------------| |----------------------| |-------------------------------------| | |
| 1104 | Notes: | |
| 1105 | TMS320C31 - Texas Instruments TMS320C31 32-bit Floating-Point DSP, clock input 50.000MHz | |
| 1106 | ADSP-2105 - Analog Devices ADSP-2105 16-bit Fixed-Point DSP Microprocessor with On-Chip Memory, clock input 10.000MHz | |
| 1107 | IDT7204 - IDT7204 4k x9 Async. FIFO | |
| 1108 | LH521007 - Sharp LH521007AK-17 128k x8 SRAM (SOJ32) | |
| 1109 | D482234 - NEC D482234LE-70 (possibly 256k x8 ?) DRAM (SOJ40) | |
| 1110 | 4C4001 - Micron Technology 4C4001JDJ-6 1M x4 DRAM (SOJ24/20) | |
| 1111 | CY7C199 - Cypress CY7C199-20PC 32k x8 SRAM | |
| 1112 | 6264 - 8k x8 SRAM (battery-backed) | |
| 1113 | 6116 - 2k x8 SRAM | |
| 1114 | AD1851 - Analog Devices AD1851 16 bit PCM Audio DAC | |
| 1115 | TDA2030 - ST TDA2030 Audio AMP | |
| 1116 | TL084 - Texas Instruments TL084 JFET-Input Operational Amplifier | |
| 1117 | ADC0844 - National Semiconductor ADC0844 8-Bit Microprocessor Compatible A/D Converter with Multiplexer Option | |
| 1118 | PAL1 - GAL20V8 labelled 'A-19668' | |
| 1119 | PAL2 - PALC22V10 (no label) | |
| 1120 | PAL3 - TIBPAL20L8 labelled 'A-19670' | |
| 1121 | PAL4 - TIBPAL22V10 labelled 'A-19671' | |
| 1122 | PAL5 - TIBPAL22V10 labelled 'A-19672' | |
| 1123 | PAL6 - TIBPAL22V10 labelled 'A-19673' | |
| 1124 | P3 - P11 - various connectors for controls | |
| 1125 | VSync - 57.7090Hz \ | |
| 1126 | HSync - 15.3544kHz / measured via EL4583 | |
| 1127 | ROMs - All ROMs 27C040 | |
| 1128 | SOUND.Uxx - Sound ROMs | |
| 1129 | GAME.Uxx - PROGRAM ROMs (including GFX) | |
| 1130 | */ | |
| 1131 | ||
| 1063 | 1132 | ROM_START( crusnusa ) /* Version 4.1, Mon Feb 13 1995 - 16:53:40 */ |
| 1064 | 1133 | ROM_REGION16_LE( 0x1000000, "dcs", ROMREGION_ERASEFF ) /* sound data */ |
| 1065 | 1134 | ROM_LOAD16_BYTE( "cusa.u2", 0x000000, 0x80000, CRC(b9338332) SHA1(e5c420e63c4eba0010a68c7e0a57ef210e2c83d2) ) |
| r3171 | r3172 | |
|---|---|---|
| 104 | 104 | static void zaccaria_irq0a(running_machine *machine, int state) { cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); } |
| 105 | 105 | static void zaccaria_irq0b(running_machine *machine, int state) { cpunum_set_input_line(machine, 1,0,state ? ASSERT_LINE : CLEAR_LINE); } |
| 106 | 106 | |
| 107 | static int active_8910,port0a,acs; | |
| 107 | static int active_8910, port0a, acs; | |
| 108 | 108 | |
| 109 | 109 | static READ8_HANDLER( zaccaria_port0a_r ) |
| 110 | 110 | { |
| r3171 | r3172 | |
| 299 | 299 | switch (offset) |
| 300 | 300 | { |
| 301 | 301 | case 0: |
| 302 | return | |
| 302 | return | |
| 303 | 303 | |
| 304 | 304 | case 2: |
| 305 | 305 | return 0x10; /* Jack Rabbit */ |
| r3171 | r3172 | |
| 367 | 367 | ADDRESS_MAP_END |
| 368 | 368 | |
| 369 | 369 | |
| 370 | static CUSTOM_INPUT( acs_r ) | |
| 371 | { | |
| 372 | return (acs & 0x08) ? 1 : 0; | |
| 373 | } | |
| 370 | 374 | |
| 371 | 375 | static INPUT_PORTS_START( monymony ) |
| 372 | 376 | PORT_START("IN0") |
| r3171 | r3172 | |
| 473 | 477 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 474 | 478 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 475 | 479 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 476 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* "ACS" - from pin 13 of a PIA on the sound board */ | |
| 480 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(acs_r, NULL) /* "ACS" - from pin 13 of a PIA on the sound board */ | |
| 477 | 481 | /* other bits come from a protection device */ |
| 478 | 482 | INPUT_PORTS_END |
| 479 | 483 |
| r3171 | r3172 | |
|---|---|---|
| 10 | 10 | such as 'mugsmash'), the Inputs and the Dip Switches are mangled, so you need |
| 11 | 11 | a specific read handler so end-uers can see them in a "standard" order. |
| 12 | 12 | IMO you should set the USE_SHADFRCE_FAKE_INPUT_PORTS macro to 1. |
| 13 | - Why do "Coin 2" and "Service 1" buttons only work in "test mode" ? | |
| 14 | 13 | |
| 15 | To Do: | |
| 14 | 01-Sept-2008 - Pierpaolo Prazzoli | |
| 15 | - Added irqs ack | |
| 16 | - Implemented raster irq | |
| 17 | - Fixed coin2 and service input not working during the game | |
| 18 | - Added watchdog | |
| 19 | - Fixed visible area | |
| 20 | - Added video enable and irqs enable flags | |
| 16 | 21 | |
| 17 | Graphic Glitches | |
| 18 | Spurious sprite at the top right of the title screen. Visible area too large? | |
| 19 | Other Interrupt? | |
| 20 | 22 | |
| 21 | 23 | ******************************************************************************* |
| 22 | 24 | |
| r3171 | r3172 | |
| 67 | 69 | |
| 68 | 70 | /* |
| 69 | 71 | 68k interrupts |
| 70 | lev 1 : 0x64 : 0004 fd00 - ? | |
| 71 | lev 2 : 0x68 : 0000 1f32 - vblank? | |
| 72 | lev 3 : 0x6c : 0000 10f4 - ? | |
| 72 | lev 1 : 0x64 : 0004 fd00 - raster irq | |
| 73 | lev 2 : 0x68 : 0000 1f32 - inputs irq (reads inputs, ...) | |
| 74 | lev 3 : 0x6c : 0000 10f4 - vblank irq | |
| 73 | 75 | lev 4 : 0x70 : 0000 11d0 - just rte |
| 74 | 76 | lev 5 : 0x74 : 0000 11d0 - just rte |
| 75 | 77 | lev 6 : 0x78 : 0000 11d0 - just rte |
| r3171 | r3172 | |
| 82 | 84 | #include "sound/okim6295.h" |
| 83 | 85 | |
| 84 | 86 | UINT16 *shadfrce_fgvideoram, *shadfrce_bg0videoram, *shadfrce_bg1videoram, *shadfrce_spvideoram; |
| 85 | /* UINT16 *shadfrce_videoregs; */ | |
| 86 | 87 | |
| 87 | 88 | /* in video */ |
| 88 | 89 | WRITE16_HANDLER ( shadfrce_bg0scrollx_w ); |
| r3171 | r3172 | |
| 96 | 97 | WRITE16_HANDLER( shadfrce_bg0videoram_w ); |
| 97 | 98 | WRITE16_HANDLER( shadfrce_bg1videoram_w ); |
| 98 | 99 | |
| 100 | int shadfrce_video_enable = 0; | |
| 101 | static int shadfrce_irqs_enable = 0; | |
| 102 | static int shadfrce_scanline = 0; | |
| 103 | static emu_timer *raster_irq_timer; | |
| 104 | static int vblank = 0; | |
| 99 | 105 | |
| 106 | ||
| 100 | 107 | static WRITE16_HANDLER( shadfrce_flip_screen ) |
| 101 | 108 | { |
| 102 | 109 | flip_screen_set(data & 0x01); |
| r3171 | r3172 | |
| 184 | 191 | #define USE_SHADFRCE_FAKE_INPUT_PORTS 1 |
| 185 | 192 | |
| 186 | 193 | #if USE_SHADFRCE_FAKE_INPUT_PORTS |
| 194 | ||
| 187 | 195 | static READ16_HANDLER( shadfrce_input_ports_r ) |
| 188 | 196 | { |
| 189 | 197 | UINT16 data = 0xffff; |
| r3171 | r3172 | |
| 200 | 208 | data = (input_port_read(machine, "EXTRA") & 0xff) | ((input_port_read(machine, "DSW1") & 0x3f) << 8); |
| 201 | 209 | break; |
| 202 | 210 | case 3 : |
| 203 | data = (input_port_read(machine, "OTHER") & 0xff) | ((input_port_read(machine, "DSW1") & 0xc0) << 2) | ((input_port_read(machine, "MISC") & 0x3 | |
| 211 | data = (input_port_read(machine, "OTHER") & 0xff) | ((input_port_read(machine, "DSW1") & 0xc0) << 2) | ((input_port_read(machine, "MISC") & 0x38) << 8) | (vblank << 8); | |
| 204 | 212 | break; |
| 205 | 213 | } |
| 206 | 214 | |
| 207 | 215 | return (data); |
| 208 | 216 | } |
| 217 | ||
| 218 | #else | |
| 219 | ||
| 220 | static READ16_HANDLER( shadfrce_input_ports_3_r ) | |
| 221 | { | |
| 222 | return (input_port_read(machine, "IN3") & ~0x0400) | (vblank << 8); | |
| 223 | } | |
| 224 | ||
| 209 | 225 | #endif |
| 210 | 226 | |
| 211 | 227 | static WRITE16_HANDLER ( shadfrce_sound_brt_w ) |
| r3171 | r3172 | |
| 225 | 241 | } |
| 226 | 242 | } |
| 227 | 243 | |
| 228 | /* Memory Maps - ToDo, Work Out Unknowns */ | |
| 244 | static TIMER_CALLBACK( raster_interrupt ) | |
| 245 | { | |
| 246 | // force a screen partial update on the previous scanline | |
| 247 | if (shadfrce_scanline != 0) | |
| 248 | video_screen_update_partial(machine->primary_screen, shadfrce_scanline - 1); | |
| 229 | 249 | |
| 230 | static ADDRESS_MAP_START( shadfrce_readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 231 | AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM) | |
| 232 | AM_RANGE(0x100000, 0x100fff) AM_READ(SMH_RAM) | |
| 233 | AM_RANGE(0x101000, 0x101fff) AM_READ(SMH_RAM) | |
| 234 | AM_RANGE(0x102000, 0x1027ff) AM_READ(SMH_RAM) | |
| 235 | AM_RANGE(0x102800, 0x103fff) AM_READ(SMH_RAM) | |
| 236 | AM_RANGE(0x140000, 0x141fff) AM_READ(SMH_RAM) | |
| 237 | AM_RANGE(0x142000, 0x143fff) AM_READ(SMH_RAM) | |
| 238 | AM_RANGE(0x180000, 0x187fff) AM_READ(SMH_RAM) | |
| 239 | /* inputs, dipswitches etc. */ | |
| 240 | AM_RANGE(0x1c000a, 0x1c000b) AM_READ(SMH_NOP) /* ?? */ | |
| 241 | AM_RANGE(0x1d000c, 0x1d000d) AM_READ(SMH_NOP) /* ?? */ | |
| 250 | shadfrce_scanline = (shadfrce_scanline + 1) % 256; | |
| 251 | ||
| 252 | // fire another raster irq for the next scanline | |
| 253 | cpunum_set_input_line(machine, 0, 1, ASSERT_LINE); | |
| 254 | timer_adjust_oneshot(raster_irq_timer, video_screen_get_time_until_pos(machine->primary_screen, shadfrce_scanline, 0), 0); | |
| 255 | } | |
| 256 | ||
| 257 | static WRITE16_HANDLER( shadfrce_irq_ack_w ) | |
| 258 | { | |
| 259 | cpunum_set_input_line(machine, 0, offset ^ 3, CLEAR_LINE); | |
| 260 | } | |
| 261 | ||
| 262 | static WRITE16_HANDLER( shadfrce_irq_w ) | |
| 263 | { | |
| 264 | static int prev_value = 0; | |
| 265 | ||
| 266 | shadfrce_irqs_enable = data & 1; // maybe, it's set/unset inside every trap instruction which is executed | |
| 267 | shadfrce_video_enable = data & 8; // probably | |
| 268 | ||
| 269 | // check if there's a high transition to enable the raster timer | |
| 270 | if((~prev_value & 4) && (data & 4)) | |
| 271 | { | |
| 272 | if( !timer_enabled(raster_irq_timer) ) | |
| 273 | { | |
| 274 | timer_enable(raster_irq_timer, 1); | |
| 275 | timer_adjust_oneshot(raster_irq_timer, video_screen_get_time_until_pos(machine->primary_screen, shadfrce_scanline, 0), 0); | |
| 276 | } | |
| 277 | } | |
| 278 | ||
| 279 | // check if there's a low transition to disable the raster timer | |
| 280 | if((prev_value & 4) && (~data & 4)) | |
| 281 | { | |
| 282 | if( timer_enabled(raster_irq_timer) ) | |
| 283 | { | |
| 284 | timer_enable(raster_irq_timer, 0); | |
| 285 | } | |
| 286 | } | |
| 287 | ||
| 288 | prev_value = data; | |
| 289 | } | |
| 290 | ||
| 291 | static WRITE16_HANDLER( shadfrce_scanline_w ) | |
| 292 | { | |
| 293 | shadfrce_scanline = data; // guess, 0 is always written | |
| 294 | } | |
| 295 | ||
| 296 | ||
| 297 | ||
| 298 | /* Memory Maps */ | |
| 299 | ||
| 300 | static ADDRESS_MAP_START( shadfrce_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 301 | AM_RANGE(0x000000, 0x0fffff) AM_ROM | |
| 302 | AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(shadfrce_bg0videoram_w) AM_BASE(&shadfrce_bg0videoram) /* video */ | |
| 303 | AM_RANGE(0x101000, 0x101fff) AM_RAM | |
| 304 | AM_RANGE(0x102000, 0x1027ff) AM_RAM_WRITE(shadfrce_bg1videoram_w) AM_BASE(&shadfrce_bg1videoram) /* bg 2 */ | |
| 305 | AM_RANGE(0x102800, 0x103fff) AM_RAM | |
| 306 | AM_RANGE(0x140000, 0x141fff) AM_RAM_WRITE(shadfrce_fgvideoram_w) AM_BASE(&shadfrce_fgvideoram) | |
| 307 | AM_RANGE(0x142000, 0x143fff) AM_RAM AM_BASE(&shadfrce_spvideoram) AM_SIZE(&spriteram_size) /* sprites */ | |
| 308 | AM_RANGE(0x180000, 0x187fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16) | |
| 309 | AM_RANGE(0x1c0000, 0x1c0001) AM_WRITE(shadfrce_bg0scrollx_w) /* SCROLL X */ | |
| 310 | AM_RANGE(0x1c0002, 0x1c0003) AM_WRITE(shadfrce_bg0scrolly_w) /* SCROLL Y */ | |
| 311 | AM_RANGE(0x1c0004, 0x1c0005) AM_WRITE(shadfrce_bg1scrollx_w) /* SCROLL X */ | |
| 312 | AM_RANGE(0x1c0006, 0x1c0007) AM_WRITE(shadfrce_bg1scrolly_w) /* SCROLL Y */ | |
| 313 | AM_RANGE(0x1c0008, 0x1c0009) AM_WRITENOP /* ?? */ | |
| 314 | AM_RANGE(0x1c000a, 0x1c000b) AM_READNOP AM_WRITE(shadfrce_flip_screen) | |
| 315 | AM_RANGE(0x1c000c, 0x1c000d) AM_WRITENOP /* ?? */ | |
| 316 | AM_RANGE(0x1d0000, 0x1d0005) AM_WRITE(shadfrce_irq_ack_w) | |
| 317 | AM_RANGE(0x1d0006, 0x1d0007) AM_WRITE(shadfrce_irq_w) | |
| 318 | AM_RANGE(0x1d0008, 0x1d0009) AM_WRITE(shadfrce_scanline_w) | |
| 319 | AM_RANGE(0x1d000c, 0x1d000d) AM_READNOP AM_WRITE(shadfrce_sound_brt_w) /* sound command + screen brightness */ | |
| 320 | AM_RANGE(0x1d0010, 0x1d0011) AM_WRITENOP /* ?? */ | |
| 321 | AM_RANGE(0x1d0012, 0x1d0013) AM_WRITENOP /* ?? */ | |
| 322 | AM_RANGE(0x1d0014, 0x1d0015) AM_WRITENOP /* ?? */ | |
| 323 | AM_RANGE(0x1d0016, 0x1d0017) AM_WRITE(watchdog_reset16_w) | |
| 242 | 324 | #if USE_SHADFRCE_FAKE_INPUT_PORTS |
| 243 | 325 | AM_RANGE(0x1d0020, 0x1d0027) AM_READ(shadfrce_input_ports_r) |
| 244 | 326 | #else |
| 245 | 327 | AM_RANGE(0x1d0020, 0x1d0021) AM_READ_PORT("IN0") |
| 246 | 328 | AM_RANGE(0x1d0022, 0x1d0023) AM_READ_PORT("IN1") |
| 247 | 329 | AM_RANGE(0x1d0024, 0x1d0025) AM_READ_PORT("IN2") |
| 248 | AM_RANGE(0x1d0026, 0x1d0027) AM_READ | |
| 330 | AM_RANGE(0x1d0026, 0x1d0027) AM_READ | |
| 249 | 331 | #endif |
| 250 | AM_RANGE(0x1 | |
| 332 | AM_RANGE(0x1f0000, 0x1fffff) AM_R | |
| 251 | 333 | ADDRESS_MAP_END |
| 252 | 334 | |
| 253 | static ADDRESS_MAP_START( shadfrce_writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 254 | AM_RANGE(0x000000, 0x0fffff) AM_WRITE(SMH_ROM) | |
| 255 | AM_RANGE(0x100000, 0x100fff) AM_WRITE(shadfrce_bg0videoram_w) AM_BASE(&shadfrce_bg0videoram) /* video */ | |
| 256 | AM_RANGE(0x101000, 0x101fff) AM_WRITE(SMH_RAM) | |
| 257 | AM_RANGE(0x102000, 0x1027ff) AM_WRITE(shadfrce_bg1videoram_w) AM_BASE(&shadfrce_bg1videoram) /* bg 2 */ | |
| 258 | AM_RANGE(0x102800, 0x103fff) AM_WRITE(SMH_RAM) | |
| 259 | AM_RANGE(0x140000, 0x141fff) AM_WRITE(shadfrce_fgvideoram_w) AM_BASE(&shadfrce_fgvideoram) | |
| 260 | AM_RANGE(0x142000, 0x143fff) AM_WRITE(SMH_RAM) AM_BASE(&shadfrce_spvideoram) AM_SIZE(&spriteram_size) /* sprites */ | |
| 261 | AM_RANGE(0x180000, 0x187fff) AM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16) /* ?? */ | |
| 262 | /* probably video registers etc. */ | |
| 263 | // AM_RANGE(0x1c0000, 0x1d000d) AM_WRITE(SMH_RAM) AM_BASE(&shadfrce_videoregs) | |
| 264 | AM_RANGE(0x1c0000, 0x1c0001) AM_WRITE(shadfrce_bg0scrollx_w) /* SCROLL X */ | |
| 265 | AM_RANGE(0x1c0002, 0x1c0003) AM_WRITE(shadfrce_bg0scrolly_w) /* SCROLL Y */ | |
| 266 | AM_RANGE(0x1c0004, 0x1c0005) AM_WRITE(shadfrce_bg1scrollx_w) /* SCROLL X */ | |
| 267 | AM_RANGE(0x1c0006, 0x1c0007) AM_WRITE(shadfrce_bg1scrolly_w) /* SCROLL Y */ | |
| 268 | AM_RANGE(0x1c0008, 0x1c0009) AM_WRITE(SMH_NOP) /* ?? */ | |
| 269 | AM_RANGE(0x1c000a, 0x1c000b) AM_WRITE(shadfrce_flip_screen) | |
| 270 | AM_RANGE(0x1c000c, 0x1c000d) AM_WRITE(SMH_NOP) /* ?? */ | |
| 271 | AM_RANGE(0x1d0000, 0x1d0001) AM_WRITE(SMH_NOP) /* ?? */ | |
| 272 | AM_RANGE(0x1d0002, 0x1d0003) AM_WRITE(SMH_NOP) /* ?? */ | |
| 273 | AM_RANGE(0x1d0006, 0x1d0007) AM_WRITE(SMH_NOP) /* ?? */ | |
| 274 | AM_RANGE(0x1d0008, 0x1d0009) AM_WRITE(SMH_NOP) /* ?? */ | |
| 275 | AM_RANGE(0x1d000c, 0x1d000d) AM_WRITE(shadfrce_sound_brt_w) /* sound command + screen brightness */ | |
| 276 | AM_RANGE(0x1d0010, 0x1d0011) AM_WRITE(SMH_NOP) /* ?? */ | |
| 277 | AM_RANGE(0x1d0012, 0x1d0013) AM_WRITE(SMH_NOP) /* ?? */ | |
| 278 | AM_RANGE(0x1d0014, 0x1d0015) AM_WRITE(SMH_NOP) /* ?? */ | |
| 279 | AM_RANGE(0x1d0016, 0x1d0017) AM_WRITE(SMH_NOP) /* ?? */ | |
| 280 | AM_RANGE(0x1f0000, 0x1fffff) AM_WRITE(SMH_RAM) | |
| 281 | ADDRESS_MAP_END | |
| 282 | ||
| 283 | 335 | /* and the sound cpu */ |
| 284 | 336 | |
| 285 | 337 | static WRITE8_HANDLER( oki_bankswitch_w ) |
| r3171 | r3172 | |
| 287 | 339 | okim6295_set_bank_base(0, (data & 1) * 0x40000); |
| 288 | 340 | } |
| 289 | 341 | |
| 290 | static ADDRESS_MAP_START( readmem_sound, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 291 | AM_RANGE(0x0000, 0xbfff) AM_READ(SMH_ROM) | |
| 292 | AM_RANGE(0xc000, 0xc7ff) AM_READ(SMH_RAM) | |
| 293 | AM_RANGE(0xc801, 0xc801) AM_READ(ym2151_status_port_0_r) | |
| 294 | AM_RANGE(0xd800, 0xd800) AM_READ(okim6295_status_0_r) | |
| 342 | static ADDRESS_MAP_START( shadfrce_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 343 | AM_RANGE(0x0000, 0xbfff) AM_ROM | |
| 344 | AM_RANGE(0xc000, 0xc7ff) AM_RAM | |
| 345 | AM_RANGE(0xc800, 0xc800) AM_WRITE(ym2151_register_port_0_w) | |
| 346 | AM_RANGE(0xc801, 0xc801) AM_READWRITE(ym2151_status_port_0_r, ym2151_data_port_0_w) | |
| 347 | AM_RANGE(0xd800, 0xd800) AM_READWRITE(okim6295_status_0_r, okim6295_data_0_w) | |
| 295 | 348 | AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) |
| 296 | AM_RANGE(0xf000, 0xffff) AM_READ(SMH_RAM) | |
| 297 | ADDRESS_MAP_END | |
| 298 | ||
| 299 | static ADDRESS_MAP_START( writemem_sound, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 300 | AM_RANGE(0x0000, 0xbfff) AM_WRITE(SMH_ROM) | |
| 301 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(SMH_RAM) | |
| 302 | AM_RANGE(0xc800, 0xc800) AM_WRITE(ym2151_register_port_0_w) | |
| 303 | AM_RANGE(0xc801, 0xc801) AM_WRITE(ym2151_data_port_0_w) | |
| 304 | AM_RANGE(0xd800, 0xd800) AM_WRITE(okim6295_data_0_w) | |
| 305 | 349 | AM_RANGE(0xe800, 0xe800) AM_WRITE(oki_bankswitch_w) |
| 306 | AM_RANGE(0xf000, 0xffff) AM_ | |
| 350 | AM_RANGE(0xf000, 0xffff) AM_ | |
| 307 | 351 | ADDRESS_MAP_END |
| 308 | 352 | |
| 309 | 353 | |
| r3171 | r3172 | |
| 349 | 393 | PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 350 | 394 | |
| 351 | 395 | PORT_START("MISC") /* Fake IN5 (misc) */ |
| 352 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_ | |
| 396 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL | |
| 353 | 397 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* must be ACTIVE_LOW or 'shadfrcj' jumps to the end (code at 0x04902e) */ |
| 354 | 398 | PORT_BIT( 0xeb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 355 | 399 | |
| r3171 | r3172 | |
| 480 | 524 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 481 | 525 | PORT_DIPSETTING( 0x0100, DEF_STR( On ) ) |
| 482 | 526 | PORT_SERVICE( 0x0200, IP_ACTIVE_LOW ) |
| 527 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SPECIAL ) /* guess */ | |
| 483 | 528 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_VBLANK ) /* guess */ |
| 484 | 529 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 485 | 530 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* must be ACTIVE_LOW or 'shadfrcj' jumps to the end (code at 0x04902e) */ |
| r3171 | r3172 | |
| 542 | 587 | irq_handler |
| 543 | 588 | }; |
| 544 | 589 | |
| 545 | static INTERRUPT_GEN( shadfrce_interrupt ) { | |
| 546 | if( cpu_getiloops() == 0 ) | |
| 547 | cpunum_set_input_line(machine, 0, 3, HOLD_LINE); | |
| 548 | else | |
| 549 | cpunum_set_input_line(machine, 0, 2, HOLD_LINE); | |
| 590 | /* | |
| 591 | Interrupts generation is guessed, but it requires the same hack as in wwfsstar.c | |
| 592 | */ | |
| 593 | static INTERRUPT_GEN( shadfrce_interrupt ) | |
| 594 | { | |
| 595 | int scanline = 255 - cpu_getiloops(); | |
| 596 | ||
| 597 | /* Vblank is lowered on scanline 0 (8) */ | |
| 598 | if (scanline == 0) | |
| 599 | { | |
| 600 | vblank = 0; | |
| 601 | } | |
| 602 | /* Hack */ | |
| 603 | else if (scanline==(248-1)) | |
| 604 | { | |
| 605 | vblank = 4; | |
| 606 | } | |
| 607 | /* Vblank is raised on scanline 248 (256) */ | |
| 608 | else if (scanline==248) | |
| 609 | { | |
| 610 | if(shadfrce_irqs_enable) | |
| 611 | cpunum_set_input_line(machine, 0, 3, ASSERT_LINE); | |
| 612 | } | |
| 613 | ||
| 614 | /* An interrupt is generated every 16 scanlines */ | |
| 615 | if (scanline%16 == 0) | |
| 616 | { | |
| 617 | if(shadfrce_irqs_enable) | |
| 618 | cpunum_set_input_line(machine, 0, 2, ASSERT_LINE); | |
| 619 | } | |
| 550 | 620 | } |
| 551 | 621 | |
| 622 | static MACHINE_RESET( shadfrce ) | |
| 623 | { | |
| 624 | raster_irq_timer = timer_alloc(raster_interrupt, NULL); | |
| 625 | timer_enable(raster_irq_timer, 0); | |
| 626 | shadfrce_scanline = 0; | |
| 627 | } | |
| 552 | 628 | |
| 553 | 629 | static MACHINE_DRIVER_START( shadfrce ) |
| 554 | 630 | MDRV_CPU_ADD("main", M68000, 28000000/2) /* ? Guess - CPU is rated for 16MHz */ |
| 555 | MDRV_CPU_PROGRAM_MAP(shadfrce_readmem,shadfrce_writemem) | |
| 556 | MDRV_CPU_VBLANK_INT_HACK(shadfrce_interrupt,2) | |
| 631 | MDRV_CPU_PROGRAM_MAP(shadfrce_map,0) | |
| 632 | MDRV_CPU_VBLANK_INT_HACK(shadfrce_interrupt,256) | |
| 557 | 633 | |
| 558 | 634 | MDRV_CPU_ADD("audio", Z80, 3579545) |
| 559 | MDRV_CPU_PROGRAM_MAP( | |
| 635 | MDRV_CPU_PROGRAM_MAP(shadf | |
| 560 | 636 | |
| 561 | MDRV_ | |
| 637 | MDRV_MA | |
| 562 | 638 | |
| 563 | ||
| 564 | 639 | MDRV_SCREEN_ADD("main", RASTER) |
| 565 | 640 | MDRV_SCREEN_REFRESH_RATE(60) |
| 566 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC( | |
| 641 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC( | |
| 567 | 642 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 568 | 643 | MDRV_SCREEN_SIZE(64*8, 32*8) |
| 569 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, | |
| 644 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1) | |
| 570 | 645 | |
| 646 | MDRV_GFXDECODE(shadfrce) | |
| 571 | 647 | MDRV_PALETTE_LENGTH(0x4000) |
| 572 | 648 | |
| 573 | 649 | MDRV_VIDEO_START(shadfrce) |
| r3171 | r3172 | |
|---|---|---|
| 380 | 380 | |
| 381 | 381 | /* ROM board using 128M TSOP48 MASKROMs */ |
| 382 | 382 | ROM_REGION( 0x10000000, "user2", 0) |
| 383 | ROM_LOAD("mpr-23573.ic37" , 0x0000000, 0x1000000, CRC(000b59d7) SHA1(7a4b90b5821ea8cce77c70628fdb9097e18596e2) ) // NOT verified | |
| 384 | ROM_LOAD("mpr-23577.ic38" , 0x1000000, 0x1000000, NO_DUMP ) | |
| 385 | ROM_LOAD("mpr-23574.ic41" , 0x2000000, 0x1000000, NO_DUMP ) | |
| 386 | ROM_LOAD("mpr-23578.ic42" , 0x3000000, 0x1000000, NO_DUMP ) | |
| 387 | ROM_LOAD("mpr-23575.ic45" , 0x4000000, 0x1000000, NO_DUMP ) | |
| 388 | ROM_LOAD("mpr-23579.ic46" , 0x5000000, 0x1000000, NO_DUMP ) | |
| 389 | ROM_LOAD("mpr-23576.ic49" , 0x6000000, 0x1000000, NO_DUMP ) | |
| 390 | ROM_LOAD("mpr-23580.ic50" , 0x7000000, 0x1000000, NO_DUMP ) | |
| 383 | ROM_LOAD("mpr-23573.ic37" , 0x0000000, 0x1000000, CRC(e22a0734) SHA1(fc06d5972d285d09473874aaeb1efed2d19c8f36) ) | |
| 384 | ROM_LOAD("mpr-23577.ic38" , 0x1000000, 0x1000000, CRC(d007680d) SHA1(a795057c40b1851adb0e19e5dfb39e16206215bf) ) | |
| 385 | ROM_LOAD("mpr-23574.ic41" , 0x2000000, 0x1000000, CRC(a77034a5) SHA1(e6e8e2f747e7a972144436103741acfd7030fe84) ) | |
| 386 | ROM_LOAD("mpr-23578.ic42" , 0x3000000, 0x1000000, CRC(db612dd6) SHA1(e6813a1e16099094d67347027e058be582750ad7) ) | |
| 387 | ROM_LOAD("mpr-23575.ic45" , 0x4000000, 0x1000000, CRC(fe660f06) SHA1(73916f67d852df719fd65b1ed0f8b977c0c33390) ) | |
| 388 | ROM_LOAD("mpr-23579.ic46" , 0x5000000, 0x1000000, CRC(55e656d2) SHA1(5d0b26807cf915ab0ae5cc3a7c9dd6bec43da7b2) ) | |
| 389 | ROM_LOAD("mpr-23576.ic49" , 0x6000000, 0x1000000, CRC(c01e0329) SHA1(df1a3c83f338925d69912af56f675197e14e1793) ) | |
| 390 | ROM_LOAD("mpr-23580.ic50" , 0x7000000, 0x1000000, CRC(d260f39c) SHA1(e5cdf399defaaa7dbcee62f7ab64b898c28d8f7d) ) | |
| 391 | 391 | /* ic53 unpopulated */ |
| 392 | 392 | /* ic54 unpopulated */ |
| 393 | 393 | /* ic57 unpopulated */ |
| r3171 | r3172 | |
|---|---|---|
| 237 | 237 | AM_RANGE(0x8000, 0xffff) AM_WRITE(SMH_ROM) |
| 238 | 238 | ADDRESS_MAP_END |
| 239 | 239 | |
| 240 | static ADDRESS_MAP_START( inufuku_ | |
| 240 | static ADDRESS_MAP_START( inufuku_ | |
| 241 | 241 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 242 | AM_RANGE(0x04, 0x04) AM_READ(soundlatch_r) | |
| 243 | AM_RANGE(0x08, 0x08) AM_READ(ym2610_status_port_0_a_r) | |
| 244 | AM_RANGE(0x09, 0x09) AM_READ(ym2610_read_port_0_r) | |
| 245 | AM_RANGE(0x0a, 0x0a) AM_READ(ym2610_status_port_0_b_r) | |
| 246 | ADDRESS_MAP_END | |
| 247 | ||
| 248 | static ADDRESS_MAP_START( inufuku_writeport_sound, ADDRESS_SPACE_IO, 8 ) | |
| 249 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 250 | 242 | AM_RANGE(0x00, 0x00) AM_WRITE(inufuku_soundrombank_w) |
| 251 | AM_RANGE(0x04, 0x04) AM_WRITE(pending_command_clear_w) | |
| 252 | AM_RANGE(0x08, 0x08) AM_WRITE(ym2610_control_port_0_a_w) | |
| 253 | AM_RANGE(0x09, 0x09) AM_WRITE(ym2610_data_port_0_a_w) | |
| 254 | AM_RANGE(0x0a, 0x0a) AM_WRITE(ym2610_control_port_0_b_w) | |
| 243 | AM_RANGE(0x04, 0x04) AM_READWRITE(soundlatch_r, pending_command_clear_w) | |
| 244 | AM_RANGE(0x08, 0x08) AM_READWRITE(ym2610_status_port_0_a_r, ym2610_control_port_0_a_w) | |
| 245 | AM_RANGE(0x09, 0x09) AM_READWRITE(ym2610_read_port_0_r, ym2610_data_port_0_a_w) | |
| 246 | AM_RANGE(0x0a, 0x0a) AM_READWRITE(ym2610_status_port_0_b_r, ym2610_control_port_0_b_w) | |
| 255 | 247 | AM_RANGE(0x0b, 0x0b) AM_WRITE(ym2610_data_port_0_b_w) |
| 256 | 248 | ADDRESS_MAP_END |
| 257 | 249 | |
| 258 | ||
| 259 | 250 | /****************************************************************************** |
| 260 | 251 | |
| 261 | 252 | Port definitions |
| r3171 | r3172 | |
| 396 | 387 | |
| 397 | 388 | MDRV_CPU_ADD("audio", Z80, 32000000/4) /* 8.00 MHz */ |
| 398 | 389 | MDRV_CPU_PROGRAM_MAP(inufuku_readmem_sound, inufuku_writemem_sound) |
| 399 | MDRV_CPU_IO_MAP(inufuku_ | |
| 390 | MDRV_CPU_IO_MAP(inufuku_ | |
| 400 | 391 | /* IRQs are triggered by the YM2610 */ |
| 401 | 392 | |
| 402 | 393 | MDRV_MACHINE_RESET(inufuku) |
| r3171 | r3172 | |
| 466 | 457 | ******************************************************************************/ |
| 467 | 458 | |
| 468 | 459 | GAME( 1998, inufuku, 0, inufuku, inufuku, inufuku, ROT0, "Video System Co.", "Quiz & Variety Sukusuku Inufuku (Japan)", GAME_NO_COCKTAIL ) |
| 460 |
| r3171 | r3172 | |
|---|---|---|
| 162 | 162 | AM_RANGE(0x8000, 0xffff) AM_WRITE(mjsister_videoram_w) |
| 163 | 163 | ADDRESS_MAP_END |
| 164 | 164 | |
| 165 | static ADDRESS_MAP_START( mjsister_ | |
| 165 | static ADDRESS_MAP_START( mjsister_io_ma | |
| 166 | 166 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 167 | AM_RANGE(0x11, 0x11) AM_READ(ay8910_read_port_0_r) | |
| 168 | AM_RANGE(0x20, 0x20) AM_READ(mjsister_keys_r) | |
| 169 | AM_RANGE(0x21, 0x21) AM_READ_PORT("IN0") | |
| 170 | ADDRESS_MAP_END | |
| 171 | ||
| 172 | static ADDRESS_MAP_START( mjsister_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 173 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 174 | 167 | AM_RANGE(0x00, 0x01) AM_WRITE(SMH_NOP) /* HD46505? */ |
| 175 | 168 | AM_RANGE(0x10, 0x10) AM_WRITE(ay8910_control_port_0_w) |
| 169 | AM_RANGE(0x11, 0x11) AM_READ(ay8910_read_port_0_r) | |
| 176 | 170 | AM_RANGE(0x12, 0x12) AM_WRITE(ay8910_write_port_0_w) |
| 171 | AM_RANGE(0x20, 0x20) AM_READ(mjsister_keys_r) | |
| 172 | AM_RANGE(0x21, 0x21) AM_READ_PORT("IN0") | |
| 177 | 173 | AM_RANGE(0x30, 0x30) AM_WRITE(mjsister_banksel1_w) |
| 178 | 174 | AM_RANGE(0x31, 0x31) AM_WRITE(mjsister_banksel2_w) |
| 179 | 175 | AM_RANGE(0x32, 0x32) AM_WRITE(mjsister_input_sel1_w) |
| r3171 | r3172 | |
| 313 | 309 | /* basic machine hardware */ |
| 314 | 310 | MDRV_CPU_ADD("main", Z80, MCLK/2) /* 6.000 MHz */ |
| 315 | 311 | MDRV_CPU_PROGRAM_MAP(mjsister_readmem,mjsister_writemem) |
| 316 | MDRV_CPU_IO_MAP(mjsister_ | |
| 312 | MDRV_CPU_IO_MAP(mjsister_ | |
| 317 | 313 | MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,2) |
| 318 | 314 | |
| 319 | 315 | MDRV_MACHINE_RESET(mjsister) |
| r3171 | r3172 | |
| 367 | 363 | ROM_END |
| 368 | 364 | |
| 369 | 365 | GAME( 1986, mjsister, 0, mjsister, mjsister, 0, ROT0, "Toaplan", "Mahjong Sisters (Japan)", 0 ) |
| 366 |
| r3171 | r3172 | |
|---|---|---|
| 107 | 107 | |
| 108 | 108 | static ADDRESS_MAP_START( port_map, ADDRESS_SPACE_IO, 8 ) |
| 109 | 109 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 110 | AM_RANGE(0x00, 0x00) AM_READWRITE(input_port_0_r, yunsung8_videobank_w ) // read = coins . write = video RAM bank | |
| 111 | AM_RANGE(0x01, 0x01) AM_READWRITE(input_port_1_r, yunsung8_bankswitch_w ) // read = P1 . write = ROM Bank + Layers Enable | |
| 112 | AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, soundlatch_w ) // read = P2 . write = To Sound CPU | |
| 113 | AM_RANGE(0x03, 0x03) AM_READ(input_port_3_r ) // DSW 1 | |
| 114 | AM_RANGE(0x04, 0x04) AM_READ(input_port_4_r ) // DSW 2 | |
| 110 | AM_RANGE(0x00, 0x00) AM_READ_PORT("SYSTEM") AM_WRITE(yunsung8_videobank_w) // video RAM bank | |
| 111 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P1") AM_WRITE(yunsung8_bankswitch_w ) // ROM Bank + Layers Enable | |
| 112 | AM_RANGE(0x02, 0x02) AM_READ_PORT("P2") AM_WRITE(soundlatch_w ) // To Sound CPU | |
| 113 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") | |
| 114 | AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW2") | |
| 115 | 115 | AM_RANGE(0x06, 0x06) AM_WRITE(yunsung8_flipscreen_w ) // Flip Screen |
| 116 | 116 | AM_RANGE(0x07, 0x07) AM_WRITE(SMH_NOP ) // ? (end of IRQ, random value) |
| 117 | 117 | ADDRESS_MAP_END |
| r3171 | r3172 | |
| 179 | 179 | ***************************************************************************/ |
| 180 | 180 | |
| 181 | 181 | static INPUT_PORTS_START( magix ) |
| 182 | ||
| 183 | PORT_START("SYSTEM") // IN0 - Coins | |
| 182 | PORT_START("SYSTEM") | |
| 184 | 183 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 185 | 184 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 186 | 185 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r3171 | r3172 | |
| 190 | 189 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 191 | 190 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 192 | 191 | |
| 193 | PORT_START("P1") | |
| 192 | PORT_START("P1") | |
| 194 | 193 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 195 | 194 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 196 | 195 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // same as button1 !? |
| r3171 | r3172 | |
| 200 | 199 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| 201 | 200 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 202 | 201 | |
| 203 | PORT_START("P2") | |
| 202 | PORT_START("P2") | |
| 204 | 203 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 205 | 204 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 206 | 205 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // same as button1 !? |
| r3171 | r3172 | |
| 210 | 209 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) |
| 211 | 210 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| 212 | 211 | |
| 213 | PORT_START("DSW1") | |
| 212 | PORT_START("DSW1") | |
| 214 | 213 | PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) |
| 215 | 214 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) |
| 216 | 215 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| r3171 | r3172 | |
| 233 | 232 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) |
| 234 | 233 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 235 | 234 | |
| 236 | PORT_START("DSW2") | |
| 235 | PORT_START("DSW2") | |
| 237 | 236 | PORT_DIPNAME( 0x01, 0x01, "Title" ) |
| 238 | 237 | PORT_DIPSETTING( 0x01, "Magix" ) |
| 239 | 238 | PORT_DIPSETTING( 0x00, "Rock" ) |
| r3171 | r3172 | |
| 258 | 257 | PORT_DIPNAME( 0x80, 0x80, "Unknown 2-7" ) |
| 259 | 258 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 260 | 259 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 261 | ||
| 262 | 260 | INPUT_PORTS_END |
| 263 | 261 | |
| 264 | 262 | |
| r3171 | r3172 | |
| 267 | 265 | ***************************************************************************/ |
| 268 | 266 | |
| 269 | 267 | static INPUT_PORTS_START( cannball ) |
| 270 | ||
| 271 | PORT_START("SYSTEM") // IN0 - Coins | |
| 268 | PORT_START("SYSTEM") | |
| 272 | 269 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 273 | 270 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 274 | 271 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r3171 | r3172 | |
| 278 | 275 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 279 | 276 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 280 | 277 | |
| 281 | PORT_START("P1") | |
| 278 | PORT_START("P1") | |
| 282 | 279 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 283 | 280 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 284 | 281 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| r3171 | r3172 | |
| 288 | 285 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| 289 | 286 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 290 | 287 | |
| 291 | PORT_START("P2") | |
| 288 | PORT_START("P2") | |
| 292 | 289 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 293 | 290 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 294 | 291 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| r3171 | r3172 | |
| 298 | 295 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) |
| 299 | 296 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| 300 | 297 | |
| 301 | PORT_START("DSW1") | |
| 298 | PORT_START("DSW1") | |
| 302 | 299 | PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) |
| 303 | 300 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) |
| 304 | 301 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| r3171 | r3172 | |
| 321 | 318 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) |
| 322 | 319 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 323 | 320 | |
| 324 | PORT_START("DSW2") | |
| 321 | PORT_START("DSW2") | |
| 325 | 322 | PORT_DIPNAME( 0x01, 0x01, "Unknown 2-0" ) |
| 326 | 323 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 327 | 324 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r3171 | r3172 | |
| 345 | 342 | PORT_DIPNAME( 0x80, 0x80, "Unknown 2-7" ) |
| 346 | 343 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 347 | 344 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 348 | ||
| 349 | 345 | INPUT_PORTS_END |
| 350 | 346 | |
| 351 | 347 | /*************************************************************************** |
| r3171 | r3172 | |
| 353 | 349 | ***************************************************************************/ |
| 354 | 350 | |
| 355 | 351 | static INPUT_PORTS_START( rocktris ) |
| 356 | ||
| 357 | PORT_START("SYSTEM") // IN0 - Coins | |
| 352 | PORT_START("SYSTEM") | |
| 358 | 353 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 359 | 354 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 360 | 355 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r3171 | r3172 | |
| 364 | 359 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 365 | 360 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) |
| 366 | 361 | |
| 367 | PORT_START("P1") | |
| 362 | PORT_START("P1") | |
| 368 | 363 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 369 | 364 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 370 | 365 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // same as button1 !? |
| r3171 | r3172 | |
| 374 | 369 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| 375 | 370 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 376 | 371 | |
| 377 | PORT_START("P2") | |
| 372 | PORT_START("P2") | |
| 378 | 373 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 379 | 374 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 380 | 375 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // same as button1 !? |
| r3171 | r3172 | |
| 384 | 379 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) |
| 385 | 380 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| 386 | 381 | |
| 387 | PORT_START("DSW1") | |
| 382 | PORT_START("DSW1") | |
| 388 | 383 | PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) |
| 389 | 384 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) |
| 390 | 385 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| r3171 | r3172 | |
| 407 | 402 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) |
| 408 | 403 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 409 | 404 | |
| 410 | PORT_START("DSW2") | |
| 405 | PORT_START("DSW2") | |
| 411 | 406 | PORT_DIPNAME( 0x01, 0x01, "Unknown 2-0" ) // the rest seems unused |
| 412 | 407 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 413 | 408 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r3171 | r3172 | |
| 432 | 427 | PORT_DIPNAME( 0x80, 0x80, "Unknown 2-7" ) |
| 433 | 428 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 434 | 429 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 435 | ||
| 436 | 430 | INPUT_PORTS_END |
| 437 | 431 | |
| 438 | 432 | /*************************************************************************** |
| r3171 | r3172 | |
|---|---|---|
| 176 | 176 | AM_RANGE(0xfd06, 0xfd06) AM_WRITEONLY AM_BASE(&wc90b_scroll1x) |
| 177 | 177 | AM_RANGE(0xfd08, 0xfd08) AM_WRITEONLY AM_BASE(&wc90b_scroll2y) |
| 178 | 178 | AM_RANGE(0xfd0a, 0xfd0a) AM_WRITEONLY AM_BASE(&wc90b_scroll2x) |
| 179 | AM_RANGE(0xfd00, 0xfd00) AM_READ(input_port_0_r) /* Stick 1, Coin 1 & Start 1 */ | |
| 180 | AM_RANGE(0xfd02, 0xfd02) AM_READ(input_port_1_r) /* Stick 2, Coin 2 & Start 2 */ | |
| 181 | AM_RANGE(0xfd06, 0xfd06) AM_READ(input_port_2_r) /* DIP Switch A */ | |
| 182 | AM_RANGE(0xfd08, 0xfd08) AM_READ(input_port_3_r) /* DIP Switch B */ | |
| 179 | AM_RANGE(0xfd00, 0xfd00) AM_READ_PORT("P1") | |
| 180 | AM_RANGE(0xfd02, 0xfd02) AM_READ_PORT("P2") | |
| 181 | AM_RANGE(0xfd06, 0xfd06) AM_READ_PORT("DSW1") | |
| 182 | AM_RANGE(0xfd08, 0xfd08) AM_READ_PORT("DSW2") | |
| 183 | 183 | ADDRESS_MAP_END |
| 184 | 184 | |
| 185 | 185 | static ADDRESS_MAP_START( wc90b_map2, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 208 | 208 | |
| 209 | 209 | |
| 210 | 210 | static INPUT_PORTS_START( wc90b ) |
| 211 | PORT_START("P1") | |
| 211 | PORT_START("P1") | |
| 212 | 212 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 213 | 213 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 214 | 214 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| r3171 | r3172 | |
| 218 | 218 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) |
| 219 | 219 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 220 | 220 | |
| 221 | PORT_START("P2") | |
| 221 | PORT_START("P2") | |
| 222 | 222 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 223 | 223 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 224 | 224 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| r3171 | r3172 | |
| 228 | 228 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 229 | 229 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 230 | 230 | |
| 231 | PORT_START("DSW1") | |
| 231 | PORT_START("DSW1") | |
| 232 | 232 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) ) |
| 233 | 233 | PORT_DIPSETTING( 0x00, "10 Coins/1 Credit" ) |
| 234 | 234 | PORT_DIPSETTING( 0x08, DEF_STR( 9C_1C ) ) |
| r3171 | r3172 | |
| 252 | 252 | PORT_DIPSETTING( 0x20, DEF_STR( Hard ) ) |
| 253 | 253 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 254 | 254 | PORT_DIPNAME( 0x40, 0x40, "Countdown Speed" ) |
| 255 | PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) | |
| 255 | PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) | |
| 256 | 256 | PORT_DIPSETTING( 0x00, "Fast" ) // 56/60 |
| 257 | 257 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) |
| 258 | 258 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 259 | 259 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 260 | 260 | |
| 261 | PORT_START("DSW2") | |
| 261 | PORT_START("DSW2") | |
| 262 | 262 | PORT_DIPNAME( 0x03, 0x03, "1 Player Game Time" ) |
| 263 | 263 | PORT_DIPSETTING( 0x01, "1:00" ) |
| 264 | 264 | PORT_DIPSETTING( 0x02, "1:30" ) |
| r3171 | r3172 | |
|---|---|---|
| 60 | 60 | AM_RANGE(0xf800, 0xf801) AM_WRITE(holeland_pal_offs_w) |
| 61 | 61 | ADDRESS_MAP_END |
| 62 | 62 | |
| 63 | static ADDRESS_MAP_START( | |
| 63 | static ADDRESS_MAP_START( io_ma | |
| 64 | 64 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 65 | 65 | AM_RANGE(0x01, 0x01) AM_READ(watchdog_reset_r) /* ? */ |
| 66 | AM_RANGE(0x04, 0x04) AM_READ(ay8910_read_port_0_r) | |
| 67 | AM_RANGE(0x06, 0x06) AM_READ(ay8910_read_port_1_r) | |
| 68 | ADDRESS_MAP_END | |
| 69 | ||
| 70 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 71 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 72 | AM_RANGE(0x04, 0x04) AM_WRITE(ay8910_control_port_0_w) | |
| 66 | AM_RANGE(0x04, 0x04) AM_READWRITE(ay8910_read_port_0_r, ay8910_control_port_0_w) | |
| 73 | 67 | AM_RANGE(0x05, 0x05) AM_WRITE(ay8910_write_port_0_w) |
| 74 | AM_RANGE(0x06, 0x06) AM_WRITE(ay8910_control_port_1_w) | |
| 68 | AM_RANGE(0x06, 0x06) AM_READWRITE(ay8910_read_port_1_r, ay8910_control_port_1_w) | |
| 75 | 69 | AM_RANGE(0x07, 0x07) AM_WRITE(ay8910_write_port_1_w) |
| 76 | 70 | ADDRESS_MAP_END |
| 77 | 71 | |
| 78 | 72 | |
| 79 | ||
| 80 | 73 | static INPUT_PORTS_START( holeland ) |
| 81 | 74 | PORT_START("IN0") |
| 82 | 75 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| r3171 | r3172 | |
| 307 | 300 | /* basic machine hardware */ |
| 308 | 301 | MDRV_CPU_ADD("main", Z80, 4000000) /* 4 MHz ? */ |
| 309 | 302 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 310 | MDRV_CPU_IO_MAP( | |
| 303 | MDRV_CPU_IO_MAP(io_ma | |
| 311 | 304 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 312 | 305 | |
| 313 | 306 | /* video hardware */ |
| r3171 | r3172 | |
| 376 | 369 | /* basic machine hardware */ |
| 377 | 370 | MDRV_CPU_ADD("main", Z80, 20000000/4) /* 5 MHz */ |
| 378 | 371 | MDRV_CPU_PROGRAM_MAP(crzrally_readmem,crzrally_writemem) |
| 379 | MDRV_CPU_IO_MAP( | |
| 372 | MDRV_CPU_IO_MAP(io_ma | |
| 380 | 373 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 381 | 374 | |
| 382 | 375 | /* video hardware */ |
| r3171 | r3172 | |
| 530 | 523 | GAME( 1985, crzrally, 0, crzrally, crzrally, 0, ROT270, "Tecfri", "Crazy Rally (set 1)", GAME_IMPERFECT_GRAPHICS ) |
| 531 | 524 | GAME( 1985, crzralla, crzrally, crzrally, crzrally, 0, ROT270, "Tecfri", "Crazy Rally (set 2)", GAME_IMPERFECT_GRAPHICS ) |
| 532 | 525 | GAME( 1985, crzrallg, crzrally, crzrally, crzrally, 0, ROT270, "Tecfri (Gecas license)", "Crazy Rally (Gecas license)", GAME_IMPERFECT_GRAPHICS ) |
| 526 |
| r3171 | r3172 | |
|---|---|---|
| 125 | 125 | AM_RANGE(0x8000, 0xffff) AM_WRITE(SMH_ROM) |
| 126 | 126 | ADDRESS_MAP_END |
| 127 | 127 | |
| 128 | static ADDRESS_MAP_START( deco16_readport, ADDRESS_SPACE_IO, 8 ) | |
| 129 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") | |
| 128 | static ADDRESS_MAP_START( deco16_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 129 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(deco16_bank_w) | |
| 130 | 130 | ADDRESS_MAP_END |
| 131 | 131 | |
| 132 | static ADDRESS_MAP_START( deco16_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 133 | AM_RANGE(0x00, 0x00) AM_WRITE(deco16_bank_w) | |
| 134 | ADDRESS_MAP_END | |
| 135 | ||
| 136 | 132 | static ADDRESS_MAP_START( liberatb_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 137 | 133 | AM_RANGE(0x00fe, 0x00fe) AM_READ_PORT("IN0") |
| 138 | 134 | AM_RANGE(0x0000, 0x0fff) AM_READ(SMH_RAM) |
| r3171 | r3172 | |
| 522 | 518 | /* basic machine hardware */ |
| 523 | 519 | MDRV_CPU_ADD("main",DECO16, 2000000) |
| 524 | 520 | MDRV_CPU_PROGRAM_MAP(liberate_readmem,liberate_writemem) |
| 525 | MDRV_CPU_IO_MAP(deco16_ | |
| 521 | MDRV_CPU_IO_MAP(deco16_i | |
| 526 | 522 | MDRV_CPU_VBLANK_INT("main", deco16_interrupt) |
| 527 | 523 | |
| 528 | 524 | MDRV_CPU_ADD("audio",M6502, 1500000) |
| r3171 | r3172 | |
| 579 | 575 | /* basic machine hardware */ |
| 580 | 576 | MDRV_CPU_ADD("main", DECO16, 3000000) |
| 581 | 577 | MDRV_CPU_PROGRAM_MAP(liberate_readmem,liberate_writemem) |
| 582 | MDRV_CPU_IO_MAP(deco16_ | |
| 578 | MDRV_CPU_IO_MAP(deco16_i | |
| 583 | 579 | |
| 584 | 580 | MDRV_IMPORT_FROM(liberate) |
| 585 | 581 | MDRV_CPU_REMOVE("main") |
| r3171 | r3172 | |
| 593 | 589 | /* basic machine hardware */ |
| 594 | 590 | MDRV_CPU_ADD("main", DECO16, 2000000) |
| 595 | 591 | MDRV_CPU_PROGRAM_MAP(prosport_readmem,prosport_writemem) |
| 596 | MDRV_CPU_IO_MAP(deco16_ | |
| 592 | MDRV_CPU_IO_MAP(deco16_i | |
| 597 | 593 | |
| 598 | 594 | MDRV_CPU_ADD("audio", M6502, 1500000) |
| 599 | 595 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| r3171 | r3172 | |
| 965 | 961 | GAME( 1984, liberate, 0, liberate, liberate, liberate, ROT270, "Data East Corporation", "Liberation", 0 ) |
| 966 | 962 | GAME( 1984, dualaslt, liberate, liberate, dualaslt, liberate, ROT270, "Data East USA", "Dual Assault", 0 ) |
| 967 | 963 | GAME( 1984, liberatb, liberate, liberatb, liberatb, prosport, ROT270, "bootleg", "Liberation (bootleg)", 0 ) |
| 964 |
| r3171 | r3172 | |
|---|---|---|
| 3004 | 3004 | AM_RANGE(0xf000, 0xffff) AM_WRITE(seta_sound_w) |
| 3005 | 3005 | ADDRESS_MAP_END |
| 3006 | 3006 | |
| 3007 | static ADDRESS_MAP_START( utoukond_sound_ | |
| 3007 | static ADDRESS_MAP_START( utoukond_sound_io_ma | |
| 3008 | 3008 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 3009 | AM_RANGE(0x00, 0x00) AM_READ(ym3438_status_port_0_a_r) | |
| 3010 | AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) | |
| 3011 | ADDRESS_MAP_END | |
| 3012 | static ADDRESS_MAP_START( utoukond_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 3013 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 3014 | AM_RANGE(0x00, 0x00) AM_WRITE(ym3438_control_port_0_a_w) | |
| 3009 | AM_RANGE(0x00, 0x00) AM_READWRITE(ym3438_status_port_0_a_r, ym3438_control_port_0_a_w) | |
| 3015 | 3010 | AM_RANGE(0x01, 0x01) AM_WRITE(ym3438_data_port_0_a_w) |
| 3016 | 3011 | AM_RANGE(0x02, 0x02) AM_WRITE(ym3438_control_port_0_b_w) |
| 3017 | 3012 | AM_RANGE(0x03, 0x03) AM_WRITE(ym3438_data_port_0_b_w) |
| 3018 | 3013 | AM_RANGE(0x80, 0x80) AM_WRITE(SMH_NOP) //? |
| 3014 | AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) | |
| 3019 | 3015 | ADDRESS_MAP_END |
| 3020 | 3016 | |
| 3021 | /* it has a series of tests on startup, if they don't pass it causes an address error */ | |
| 3022 | 3017 | static UINT16 pairslove_protram[0x200]; |
| 3023 | 3018 | static UINT16 pairslove_protram_old[0x200]; |
| 3024 | 3019 | |
| r3171 | r3172 | |
| 7920 | 7915 | |
| 7921 | 7916 | MDRV_CPU_ADD("audio", Z80, 16000000/4) /* 4 MHz */ |
| 7922 | 7917 | MDRV_CPU_PROGRAM_MAP(utoukond_sound_readmem,utoukond_sound_writemem) |
| 7923 | MDRV_CPU_IO_MAP(utoukond_sound_ | |
| 7918 | MDRV_CPU_IO_MAP(utoukond_sound_i | |
| 7924 | 7919 | |
| 7925 | 7920 | /* video hardware */ |
| 7926 | 7921 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 9596 | 9591 | GAME( 1995, zombraid, 0, gundhara, zombraid, zombraid, ROT0, "American Sammy", "Zombie Raid (US)", GAME_NO_COCKTAIL ) |
| 9597 | 9592 | GAME( 1996, crazyfgt, 0, crazyfgt, crazyfgt, crazyfgt, ROT0, "Subsino", "Crazy Fight", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 9598 | 9593 | GAME( 1998, inttoote, 0, inttoote, inttoote, inttoote, ROT0, "Coinmaster", "International Toote (Germany)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION ) |
| 9594 |
| r3171 | r3172 | |
|---|---|---|
| 504 | 504 | * denotes not dumped yet |
| 505 | 505 | |
| 506 | 506 | |
| 507 | ||
| 508 | ||
| 509 | ||
| 510 | ||
| 511 | ||
| 512 | ||
| 513 | ||
| 514 | ||
| 515 | ||
| 516 | ||
| 517 | Atomiswave cart PCB layout and game usage | |
| 518 | ----------------------------------------- | |
| 519 | ||
| 520 | Type 1 ROM Board: | |
| 521 | ||
| 522 | ||
| 523 | AM3AGB-04 | |
| 524 | MROM PCB | |
| 525 | 2002 | |
| 526 | |----------------------------| | |
| 527 | | XC9536 | | |
| 528 | | IC18 IC17* IC10 | | |
| 529 | | | | |
| 530 | | | | |
| 531 | | IC16* IC11 | | |
| 532 | | | | |
| 533 | | | | |
| 534 | ||-| IC15* IC12 | | |
| 535 | || | | | |
| 536 | || | | | |
| 537 | || |CN1 IC14* IC13 | | |
| 538 | || | | | |
| 539 | ||-| | | |
| 540 | |----------------------------| | |
| 541 | Notes: | |
| 542 | * - Denotes those devices are on the other side of the PCB | |
| 543 | CN1 - This connector plugs into the main board. | |
| 544 | XC9536 - Xilinx XC9536 in-system programmable CPLD (PLCC44), stamped with a | |
| 545 | game code. This code is different for each different game. | |
| 546 | The last 3 digits seems to be for the usage. | |
| 547 | F01 = CPLD/protection device and M01 = MASKROM | |
| 548 | ||
| 549 | Game (sorted by code) Code | |
| 550 | ------------------------------------------ | |
| 551 | Dolphin Blue AX0401F01 | |
| 552 | Demolish Fist AX0601F01 | |
| 553 | Guilt Gear Isuka AX1201F01 | |
| 554 | Knights Of Valour Seven Spirits AX1301F01 | |
| 555 | Salaryman Kintaro AX1401F01 | |
| 556 | Fist Of The North Star AX1901F01 | |
| 557 | King Of Fighters NEOWAVE AX2201F01 | |
| 558 | ||
| 559 | ||
| 560 | IC18 - Fujitsu 29DL640E 64M TSOP48 FlashROM. This ROM has no additional custom markings | |
| 561 | The name in the archive has been devised purely for convenience. | |
| 562 | This ROM holds the main program. | |
| 563 | ||
| 564 | IC10 to IC17 - Custom-badged 128M TSOP48 maskROMs. I suspect they are Macronix | |
| 565 | ROMs because the ROM on the main board is also a custom Macronix | |
| 566 | ROM and they have a history of producing custom ROMs for other | |
| 567 | companies that hide their ROM types like Nintendo etc. | |
| 568 | The ROMs match a pinout that is identical to.... | |
| 569 | Macronix MX26F128J3 (TSOP48) | |
| 570 | Oki MR27V12800 (TSOP48) | |
| 571 | More importantly the size is standard TSOP48 20mm long. | |
| 572 | They have been read as Oki MR27V12800 | |
| 573 | The pinout also matches the same ROMs found on Namco Mr Driller 2 | |
| 574 | and some Namco and Capcom NAOMI carts where these ROMs are used, | |
| 575 | although in all cases those ROMs are 18mm long, not 20mm. | |
| 576 | ||
| 577 | IC10 - Not Populated for 7 ROMs or less (ROM 01 if 8 ROMs are populated) | |
| 578 | IC11 - ROM 01 (or ROM 02 if 8 ROMs are populated) | |
| 579 | IC12 - ROM 02 (or ROM 03 if 8 ROMs are populated) | |
| 580 | IC13 - ROM 03 (or ROM 04 if 8 ROMs are populated) | |
| 581 | IC14 - ROM 04 (or ROM 05 if 8 ROMs are populated) | |
| 582 | IC15 - ROM 05 (or ROM 06 if 8 ROMs are populated) | |
| 583 | IC16 - ROM 06 (or ROM 07 if 8 ROMs are populated) | |
| 584 | IC17 - ROM 07 (or ROM 08 if 8 ROMs are populated) | |
| 585 | ||
| 586 | ROM Codes | |
| 587 | --------- | |
| 588 | Number | |
| 589 | Game (sorted by code) Code of ROMs | |
| 590 | ------------------------------------------------------------------ | |
| 591 | Dolphin Blue AX0401M01 to AX0405M01 5 | |
| 592 | Demolish Fist AX0601M01 to AX0607M01 7 | |
| 593 | Guilty Gear Isuka AX1201M01 to AX1208M01 8 | |
| 594 | Knights Of Valour Seven Spirits AX1301M01 to AX1307M01 7 | |
| 595 | Salaryman Kintaro AX1401M01 to AX1407M01 7 | |
| 596 | Fist Of The North Star AX1901M01 to AX1907M01 7 | |
| 597 | King Of Fighters NEOWAVE AX2201M01 to AX2206M01 6 | |
| 598 | ||
| 599 | ||
| 600 | ||
| 601 | Type 2 ROM Board: | |
| 602 | ||
| 603 | ||
| 604 | AM3ALW-02 | |
| 605 | MROM2 PCB | |
| 606 | 2005 | |
| 607 | |----------------------------| | |
| 608 | | FMEM1 | | |
| 609 | | FMEM2* MROM12 | | |
| 610 | | MROM11* | | |
| 611 | | MROM9 | | |
| 612 | | MROM10 MROM8*| | |
| 613 | | XCR3128XL* MROM7* | | |
| 614 | | | | |
| 615 | ||-| MROM6 | | |
| 616 | || | MROM3* MROM4 | | |
| 617 | || | MROM5*| | |
| 618 | || |CN1 MROM2 | | |
| 619 | || | MROM1* | | |
| 620 | ||-| | | |
| 621 | |----------------------------| | |
| 622 | Notes: | |
| 623 | * - Denotes those devices are on the other side of the PCB | |
| 624 | CN1 - This connector plugs into the main board. | |
| 625 | XCR3128XL - Xilinx XCR3128XL in-system programmable 128 Macro-cell CPLD (TQFP100) | |
| 626 | stamped with a game code. This code is different for each different game. | |
| 627 | The last 3 digits seems to be for the usage. | |
| 628 | F01 = CPLD/protection device and M01 = MASKROM | |
| 629 | ||
| 630 | Game (sorted by code) Code | |
| 631 | ------------------------------------------ | |
| 632 | Neogeo Battle Coliseum AX3301F01 | |
| 633 | ||
| 634 | ||
| 635 | FMEM1/FMEM2 - Fujitsu 29DL640E 64M TSOP48 FlashROM. This ROM has no additional custom markings | |
| 636 | The name in the archive has been devised purely for convenience. | |
| 637 | This ROM holds the main program. | |
| 638 | This location is wired to accept TSOP56 ROMs, however the actual chip populated | |
| 639 | is a TSOP48, using the middle pins. The other 2 pins on each side of the ROM | |
| 640 | are not connected to anything. | |
| 641 | ||
| 642 | MROM* - Custom-badged SSOP70 maskROMs. These may be OKI MR26V25605 or MR26V25655 (256M) | |
| 643 | or possibly 26V51253 (512M) or something else similar. | |
| 644 | ||
| 645 | ROM Codes | |
| 646 | --------- | |
| 647 | Number | |
| 648 | Game (sorted by code) Code of ROMs | |
| 649 | ------------------------------------------------------------------ | |
| 650 | Neogeo Battle Coliseum AX3301M01 to AX3307M01 7 | |
| 651 | ||
| 652 | ||
| 507 | 653 | */ |
| 508 | 654 | |
| 509 | 655 | #include "driver.h" |
| r3171 | r3172 | |
| 1086 | 1232 | ROM_REGION( 0x8400000, "user1", ROMREGION_ERASE) |
| 1087 | 1233 | ROM_END |
| 1088 | 1234 | |
| 1235 | ||
| 1236 | ROM_START( fotns ) | |
| 1237 | ROM_REGION( 0x200000, "main", 0) | |
| 1238 | AW_BIOS | |
| 1239 | ||
| 1240 | ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE) | |
| 1241 | ROM_LOAD("ax1901p01.ic18", 0x0000000, 0x0800000, CRC(a06998b0) SHA1(d617691db5170f6db176e40fc732966d523fd8cf) ) | |
| 1242 | ROM_LOAD("ax1901m01.ic11", 0x1000000, 0x1000000, CRC(ff5a1642) SHA1(49cefcce173f9a811fe9c0c07bee53aeba2bc3a8) ) | |
| 1243 | ROM_LOAD("ax1902m01.ic12", 0x2000000, 0x1000000, CRC(d9aae8a9) SHA1(bf87034088be0847b6e297b7665e0ea4d8cba631) ) | |
| 1244 | ROM_LOAD("ax1903m01.ic13", 0x3000000, 0x1000000, CRC(1711b23d) SHA1(ab628b2ec678839c75245e245297818ef1592d3b) ) | |
| 1245 | ROM_LOAD("ax1904m01.ic14", 0x4000000, 0x1000000, CRC(443bfb26) SHA1(6f7751afa0ca55dd0679758b27bed92b31c1b050) ) | |
| 1246 | ROM_LOAD("ax1905m01.ic15", 0x5000000, 0x1000000, CRC(eb1cada0) SHA1(459d21d622c72606f1d3095e8a25b6c4adccf8ab) ) | |
| 1247 | ROM_LOAD("ax1906m01.ic16", 0x6000000, 0x1000000, CRC(fe6da168) SHA1(d4ab6443383469bb5a4337005de917627a2e21cc) ) | |
| 1248 | ROM_LOAD("ax1907m01.ic17", 0x7000000, 0x1000000, CRC(9d3a0520) SHA1(78583fd171b34439f77a04a97ebe3c9d1bab61cc) ) | |
| 1249 | ROM_END | |
| 1250 | ||
| 1251 | ROM_START( demofist ) | |
| 1252 | ROM_REGION( 0x200000, "main", 0) | |
| 1253 | AW_BIOS | |
| 1254 | ||
| 1255 | ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE) | |
| 1256 | ROM_LOAD("ax0601p01.ic18", 0x0000000, 0x0800000, CRC(0efb38ad) SHA1(9400e37efe3e936474d74400ebdf28ad0869b67b) ) | |
| 1257 | /* incomplete, other rom names / sizes are.. ? */ | |
| 1258 | ROM_END | |
| 1259 | ||
| 1260 | ||
| 1261 | ||
| 1262 | struct AtomiswaveKey | |
| 1263 | { | |
| 1264 | int P0[16]; | |
| 1265 | int P1[16]; | |
| 1266 | int S0[32]; | |
| 1267 | int S1[16]; | |
| 1268 | int S2[16]; | |
| 1269 | int S3[8]; | |
| 1270 | }; | |
| 1271 | ||
| 1272 | struct AtomiswaveKey fotns_key = { | |
| 1273 | {0,2,7,11,12,1,5,6,15,4,8,9,14,3,10,13}, | |
| 1274 | {12,8,3,7,0,15,1,11,6,10,4,14,9,5,13,2}, | |
| 1275 | {4,1,10,16,9,25,26,31,13,0,14,15,24,6,30,18,7,20,5,12,22,17,27,3,8,11,21,29,19,23,28,2}, | |
| 1276 | {3,2,11,14,10,13,12,0,7,6,8,15,5,1,4,9}, | |
| 1277 | {10,3,6,12,7,11,4,14,0,2,8,1,15,13,5,9}, | |
| 1278 | {7,1,6,5,4,2,0,3} | |
| 1279 | }; | |
| 1280 | ||
| 1281 | struct AtomiswaveKey df_key = { | |
| 1282 | {1,4,5,6,9,7,10,11,13,0,8,12,14,2,3,15}, | |
| 1283 | {12,0,3,8,7,6,15,11,1,4,14,10,9,5,13,2}, | |
| 1284 | {9,27,15,6,28,30,7,12,21,0,1,25,22,3,16,29,13,4,24,20,2,5,23,19,18,10,8,14,17,11,31,26}, | |
| 1285 | {5,13,4,0,8,12,14,7,2,11,3,10,6,1,15,9}, | |
| 1286 | {11,6,2,9,12,1,7,4,10,0,13,3,8,14,15,5}, | |
| 1287 | {1,6,4,3,5,2,7,0} | |
| 1288 | }; | |
| 1289 | ||
| 1290 | ||
| 1291 | UINT16 atomiswave_decrypt(UINT16 cipherText, int address, struct AtomiswaveKey* key) | |
| 1292 | { | |
| 1293 | int b0,b1,b2,b3; | |
| 1294 | int aux; | |
| 1295 | ||
| 1296 | aux = BITSWAP16(cipherText, | |
| 1297 | key->P0[15],key->P0[14],key->P0[13],key->P0[12],key->P0[11],key->P0[10],key->P0[9],key->P0[8], | |
| 1298 | key->P0[7],key->P0[6],key->P0[5],key->P0[4],key->P0[3],key->P0[2],key->P0[1],key->P0[0]); | |
| 1299 | aux = aux ^ BITSWAP16(address/2, | |
| 1300 | key->P1[15],key->P1[14],key->P1[13],key->P1[12],key->P1[11],key->P1[10],key->P1[9],key->P1[8], | |
| 1301 | key->P1[7],key->P1[6],key->P1[5],key->P1[4],key->P1[3],key->P1[2],key->P1[1],key->P1[0]); | |
| 1302 | ||
| 1303 | b0 = aux&0x1f; | |
| 1304 | b1 = (aux>>5)&0xf; | |
| 1305 | b2 = (aux>>9)&0xf; | |
| 1306 | b3 = aux>>13; | |
| 1307 | ||
| 1308 | b0 = key->S0[b0]; | |
| 1309 | b1 = key->S1[b1]; | |
| 1310 | b2 = key->S2[b2]; | |
| 1311 | b3 = key->S3[b3]; | |
| 1312 | ||
| 1313 | return (b3<<13)|(b2<<9)|(b1<<5)|b0; | |
| 1314 | } | |
| 1315 | ||
| 1316 | ||
| 1317 | DRIVER_INIT(fotns) | |
| 1318 | { | |
| 1319 | int i; | |
| 1320 | UINT16 *src = (UINT16 *)(memory_region(machine, "user1")); | |
| 1321 | ||
| 1322 | long rom_size = memory_region_length(machine, "user1"); | |
| 1323 | ||
| 1324 | for(i=0; i<rom_size/2; i++) | |
| 1325 | { | |
| 1326 | src[i] = atomiswave_decrypt(src[i], i*2, &fotns_key); | |
| 1327 | } | |
| 1328 | ||
| 1329 | ||
| 1330 | { | |
| 1331 | FILE *fp; | |
| 1332 | const char *gamename = machine->gamedrv->name; | |
| 1333 | char filename[256]; | |
| 1334 | sprintf(filename, "%s.dump", gamename); | |
| 1335 | ||
| 1336 | fp=fopen(filename, "w+b"); | |
| 1337 | if (fp) | |
| 1338 | { | |
| 1339 | fwrite(src, rom_size, 1, fp); | |
| 1340 | fclose(fp); | |
| 1341 | } | |
| 1342 | } | |
| 1343 | } | |
| 1344 | ||
| 1345 | ||
| 1346 | ||
| 1347 | DRIVER_INIT(demofist) | |
| 1348 | { | |
| 1349 | int i; | |
| 1350 | UINT16 *src = (UINT16 *)(memory_region(machine, "user1")); | |
| 1351 | ||
| 1352 | long rom_size = memory_region_length(machine, "user1"); | |
| 1353 | ||
| 1354 | for(i=0; i<rom_size/2; i++) | |
| 1355 | { | |
| 1356 | src[i] = atomiswave_decrypt(src[i], i*2, &df_key); | |
| 1357 | } | |
| 1358 | ||
| 1359 | ||
| 1360 | { | |
| 1361 | FILE *fp; | |
| 1362 | const char *gamename = machine->gamedrv->name; | |
| 1363 | char filename[256]; | |
| 1364 | sprintf(filename, "%s.dump", gamename); | |
| 1365 | ||
| 1366 | fp=fopen(filename, "w+b"); | |
| 1367 | if (fp) | |
| 1368 | { | |
| 1369 | fwrite(src, rom_size, 1, fp); | |
| 1370 | fclose(fp); | |
| 1371 | } | |
| 1372 | } | |
| 1373 | } | |
| 1374 | ||
| 1375 | ||
| 1376 | ||
| 1089 | 1377 | /* Info above each set is automatically generated from the IC22 rom and may not be accurate */ |
| 1090 | 1378 | |
| 1091 | 1379 | /* |
| r3171 | r3172 | |
| 2627 | 2915 | |
| 2628 | 2916 | /* Atomiswave */ |
| 2629 | 2917 | GAME( 2001, awbios, 0, naomi, naomi, 0, ROT0, "Sammy", "Atomiswave Bios", GAME_NO_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT ) |
| 2630 | /* No Supported Sets */ | |
| 2918 | GAME( 2005, fotns, awbios, naomi, naomi, fotns, ROT0, "Sammy", "Fist Of The North Star", GAME_NO_SOUND|GAME_NOT_WORKING ) | |
| 2919 | GAME( 2003, demofist, awbios, naomi, naomi, demofist, ROT0, "Sammy", "Demolish Fist", GAME_NO_SOUND|GAME_NOT_WORKING ) | |
| 2920 |
| r3171 | r3172 | |
|---|---|---|
| 225 | 225 | AM_RANGE(0x6000, 0x67ff) AM_WRITE(SMH_RAM) |
| 226 | 226 | ADDRESS_MAP_END |
| 227 | 227 | |
| 228 | static ADDRESS_MAP_START( magmax_sound | |
| 228 | static ADDRESS_MAP_START( magmax_sound_io_ma | |
| 229 | 229 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 230 | AM_RANGE(0x06, 0x06) AM_READ(magmax_sound_r) | |
| 231 | ADDRESS_MAP_END | |
| 232 | ||
| 233 | static ADDRESS_MAP_START( magmax_soundwriteport, ADDRESS_SPACE_IO, 8 ) | |
| 234 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 235 | 230 | AM_RANGE(0x00, 0x00) AM_WRITE(ay8910_control_port_0_w) |
| 236 | 231 | AM_RANGE(0x01, 0x01) AM_WRITE(ay8910_write_port_0_w) |
| 237 | 232 | AM_RANGE(0x02, 0x02) AM_WRITE(ay8910_control_port_1_w) |
| 238 | 233 | AM_RANGE(0x03, 0x03) AM_WRITE(ay8910_write_port_1_w) |
| 239 | 234 | AM_RANGE(0x04, 0x04) AM_WRITE(ay8910_control_port_2_w) |
| 240 | 235 | AM_RANGE(0x05, 0x05) AM_WRITE(ay8910_write_port_2_w) |
| 236 | AM_RANGE(0x06, 0x06) AM_READ(magmax_sound_r) | |
| 241 | 237 | ADDRESS_MAP_END |
| 242 | 238 | |
| 243 | 239 | |
| r3171 | r3172 | |
| 362 | 358 | |
| 363 | 359 | MDRV_CPU_ADD("audio", Z80,XTAL_20MHz/8) /* verified on pcb */ |
| 364 | 360 | MDRV_CPU_PROGRAM_MAP(magmax_soundreadmem,magmax_soundwritemem) |
| 365 | MDRV_CPU_IO_MAP(magmax_sound | |
| 361 | MDRV_CPU_IO_MAP(magmax_sound_i | |
| 366 | 362 | |
| 367 | 363 | MDRV_INTERLEAVE(10) |
| 368 | 364 | |
| r3171 | r3172 | |
| 448 | 444 | |
| 449 | 445 | |
| 450 | 446 | GAME( 1985, magmax, 0, magmax, magmax, 0, ROT0, "Nichibutsu", "Mag Max", GAME_SUPPORTS_SAVE ) |
| 447 |
| r3171 | r3172 | |
|---|---|---|
| 52 | 52 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE ); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | /***************************************************************************/ | |
| 55 | 56 | |
| 56 | 57 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 57 | 58 | AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) /* rom */ |
| r3171 | r3172 | |
| 81 | 82 | AM_RANGE(0xc804, 0xc804) AM_WRITE(SMH_NOP) /* ???? not used */ |
| 82 | 83 | ADDRESS_MAP_END |
| 83 | 84 | |
| 84 | static ADDRESS_MAP_START( | |
| 85 | static ADDRESS_MAP_START( io_ma | |
| 85 | 86 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 86 | 87 | AM_RANGE(0x00, 0x00) AM_READ(watchdog_reset_r) |
| 87 | 88 | ADDRESS_MAP_END |
| r3171 | r3172 | |
| 96 | 97 | AM_RANGE(0x3800, 0x3bff) AM_WRITE(SMH_RAM) |
| 97 | 98 | ADDRESS_MAP_END |
| 98 | 99 | |
| 99 | static ADDRESS_MAP_START( | |
| 100 | static ADDRESS_MAP_START( | |
| 100 | 101 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 101 | AM_RANGE(0x8c, 0x8d) AM_READ(ay8910_read_port_0_r) | |
| 102 | AM_RANGE(0x8e, 0x8f) AM_READ(ay8910_read_port_1_r) | |
| 103 | ADDRESS_MAP_END | |
| 104 | ||
| 105 | static ADDRESS_MAP_START( writeport_sound, ADDRESS_SPACE_IO, 8 ) | |
| 106 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 107 | 102 | AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_w) |
| 108 | 103 | AM_RANGE(0x8c, 0x8c) AM_WRITE(ay8910_control_port_0_w) |
| 104 | AM_RANGE(0x8c, 0x8d) AM_READ(ay8910_read_port_0_r) | |
| 109 | 105 | AM_RANGE(0x8d, 0x8d) AM_WRITE(ay8910_write_port_0_w) |
| 110 | 106 | AM_RANGE(0x8e, 0x8e) AM_WRITE(ay8910_control_port_1_w) |
| 107 | AM_RANGE(0x8e, 0x8f) AM_READ(ay8910_read_port_1_r) | |
| 111 | 108 | AM_RANGE(0x8f, 0x8f) AM_WRITE(ay8910_write_port_1_w) |
| 112 | 109 | ADDRESS_MAP_END |
| 113 | 110 | |
| r3171 | r3172 | |
| 265 | 262 | /* basic machine hardware */ |
| 266 | 263 | MDRV_CPU_ADD("main", Z80, 5000000) /* 5.000 MHz */ |
| 267 | 264 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 268 | MDRV_CPU_IO_MAP( | |
| 265 | MDRV_CPU_IO_MAP(io_ma | |
| 269 | 266 | MDRV_CPU_VBLANK_INT("main", timelimt_irq) |
| 270 | 267 | |
| 271 | 268 | MDRV_CPU_ADD("audio", Z80,18432000/6) /* 3.072 MHz */ |
| 272 | 269 | MDRV_CPU_PROGRAM_MAP(readmem_sound,writemem_sound) |
| 273 | MDRV_CPU_IO_MAP( | |
| 270 | MDRV_CPU_IO_MAP( | |
| 274 | 271 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) /* ? */ |
| 275 | 272 | |
| 276 | 273 | MDRV_INTERLEAVE(50) |
| r3171 | r3172 | |
| 380 | 377 | |
| 381 | 378 | GAME( 1983, timelimt, 0, timelimt, timelimt, 0, ROT90, "Chuo Co. Ltd", "Time Limit", GAME_IMPERFECT_COLORS ) |
| 382 | 379 | GAME( 1984, progress, 0, progress, progress, 0, ROT90, "Chuo Co. Ltd", "Progress", 0 ) |
| 380 |
| r3171 | r3172 | |
|---|---|---|
| 86 | 86 | AM_RANGE(0xe000, 0xf7ff) AM_WRITE(mayumi_videoram_w) |
| 87 | 87 | ADDRESS_MAP_END |
| 88 | 88 | |
| 89 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 90 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 91 | AM_RANGE(0x30, 0x30) AM_READ_PORT("IN0") | |
| 92 | AM_RANGE(0xc1, 0xc2) AM_READ(key_matrix_r) // 0xc0-c3 8255ppi | |
| 93 | AM_RANGE(0xd1, 0xd1) AM_READ(ym2203_read_port_0_r) | |
| 94 | ADDRESS_MAP_END | |
| 95 | 89 | |
| 96 | static ADDRESS_MAP_START( | |
| 90 | static ADDRESS_MAP_START( | |
| 97 | 91 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 98 | AM_RANGE(0x30, 0x30) AM_WRITE(bank_sel_w) | |
| 92 | AM_RANGE(0x30, 0x30) AM_READ_PORT("IN0") AM_WRITE(bank_sel_w) | |
| 99 | 93 | AM_RANGE(0xc0, 0xc0) AM_WRITE(input_sel_w) |
| 94 | AM_RANGE(0xc1, 0xc2) AM_READ(key_matrix_r) // 0xc0-c3 8255ppi | |
| 100 | 95 | AM_RANGE(0xc3, 0xc3) AM_WRITE(SMH_NOP) // 0xc0-c3 8255ppi |
| 101 | 96 | AM_RANGE(0xd0, 0xd0) AM_WRITE(ym2203_control_port_0_w) |
| 102 | AM_RANGE(0xd1, 0xd1) AM_WRITE(ym2203_write_port_0_w) | |
| 97 | AM_RANGE(0xd1, 0xd1) AM_READWRITE(ym2203_read_port_0_r, ym2203_write_port_0_w) | |
| 103 | 98 | ADDRESS_MAP_END |
| 104 | 99 | |
| 105 | 100 | /****************************************************************************/ |
| r3171 | r3172 | |
| 284 | 279 | /* basic machine hardware */ |
| 285 | 280 | MDRV_CPU_ADD("main", Z80, MCLK/2) /* 5.000 MHz ? */ |
| 286 | 281 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 287 | MDRV_CPU_IO_MAP( | |
| 282 | MDRV_CPU_IO_MAP(io_ma | |
| 288 | 283 | MDRV_CPU_VBLANK_INT("main", mayumi_interrupt) |
| 289 | 284 | |
| 290 | 285 | MDRV_MACHINE_RESET( mayumi ) |
| r3171 | r3172 | |
| 338 | 333 | ROM_END |
| 339 | 334 | |
| 340 | 335 | GAME( 1988, mayumi, 0, mayumi, mayumi, 0, ROT0, "[Sanritsu] Victory L.L.C.", "Kikiippatsu Mayumi-chan (Japan)", 0 ) |
| 336 |
| r3171 | r3172 | |
|---|---|---|
| 228 | 228 | |
| 229 | 229 | ROM_START( astrowar ) |
| 230 | 230 | ROM_REGION( 0x10000, "main", 0 ) |
| 231 | ROM_LOAD( "astro8h.rom", 0x00000, 0x0400, CRC(b0ec246c) ) | |
| 232 | ROM_LOAD( "astro10h.rom", 0x00400, 0x0400, CRC(090d360f) ) | |
| 233 | ROM_LOAD( "astro11h.rom", 0x00800, 0x0400, CRC(72ab1378) ) | |
| 234 | ROM_LOAD( "astro13h.rom", 0x00c00, 0x0400, CRC(2dc4c895) ) | |
| 235 | ROM_LOAD( "astro8i.rom", 0x01000, 0x0400, CRC(ab87fbfc) ) | |
| 236 | ROM_LOAD( "astro10i.rom", 0x02000, 0x0400, CRC(533675c1) ) | |
| 237 | ROM_LOAD( "astro11i.rom", 0x02400, 0x0400, CRC(59cf8901) ) | |
| 238 | ROM_LOAD( "astro13i.rom", 0x02800, 0x0400, CRC(5149c121) ) | |
| 239 | ROM_LOAD( "astro11l.rom", 0x02c00, 0x0400, CRC(29f52f57) ) | |
| 240 | ROM_LOAD( "astro13l.rom", 0x03000, 0x0400, CRC(882cdb87) ) | |
| 231 | ROM_LOAD( "astro8h.rom", 0x00000, 0x0400, CRC(b0ec246c) SHA1(f9123b5e317938655f5e8b3f8a5810d0b2b7c7af) ) | |
| 232 | ROM_LOAD( "astro10h.rom", 0x00400, 0x0400, CRC(090d360f) SHA1(528ddcdc30a5a291bd8850ff6f134fcc19af562f) ) | |
| 233 | ROM_LOAD( "astro11h.rom", 0x00800, 0x0400, CRC(72ab1378) SHA1(50743c64c4775076aa6f1d8ab2e05c14884bf0ba) ) | |
| 234 | ROM_LOAD( "astro13h.rom", 0x00c00, 0x0400, CRC(2dc4c895) SHA1(831afbfd4ebfd6522ab0758222bc6f9826148a5d) ) | |
| 235 | ROM_LOAD( "astro8i.rom", 0x01000, 0x0400, CRC(ab87fbfc) SHA1(34b670f96c260f186c643e588995ae5d80377784) ) | |
| 236 | ROM_LOAD( "astro10i.rom", 0x02000, 0x0400, CRC(533675c1) SHA1(69cc066e1874a135a53a21b7b2461bda456504f1) ) | |
| 237 | ROM_LOAD( "astro11i.rom", 0x02400, 0x0400, CRC(59cf8901) SHA1(e849d4c99350b7e3453c156d91618b71b5be1163) ) | |
| 238 | ROM_LOAD( "astro13i.rom", 0x02800, 0x0400, CRC(5149c121) SHA1(232ba594e283fb25c31d8ae0b7d8315a81852a71) ) | |
| 239 | ROM_LOAD( "astro11l.rom", 0x02c00, 0x0400, CRC(29f52f57) SHA1(5cb50b82e09c537eeaeae167351fca686fde8228) ) | |
| 240 | ROM_LOAD( "astro13l.rom", 0x03000, 0x0400, CRC(882cdb87) SHA1(062ee8d296316cbce2eb62e72774aa4181e9847d) ) | |
| 241 | 241 | |
| 242 | 242 | ROM_REGION( 0x0800, "gfx1", 0 ) |
| 243 | ROM_LOAD( "astro1d.rom", 0x00000, 0x0400, CRC(6053f834) ) | |
| 244 | ROM_LOAD( "astro3d.rom", 0x00400, 0x0400, CRC(822505aa) ) | |
| 243 | ROM_LOAD( "astro1d.rom", 0x00000, 0x0400, CRC(6053f834) SHA1(e0b76800c241b3c8010c09869cecbc109b25310a) ) | |
| 244 | ROM_LOAD( "astro3d.rom", 0x00400, 0x0400, CRC(822505aa) SHA1(f9d3465e14bb850a286f8b4f42aa0a4044413b67) ) | |
| 245 | 245 | |
| 246 | 246 | ROM_REGION( 0x80000, "proms", 0 ) |
| 247 | 247 | ROM_LOAD( "11o.rom", 0x00000, 0x0200, NO_DUMP ) /* a rom is missing */ |
| r3171 | r3172 | |
|---|---|---|
| 449 | 449 | AM_RANGE(0xc000, 0xffff) AM_WRITE(SMH_BANK2) // RAM(BANK) |
| 450 | 450 | ADDRESS_MAP_END |
| 451 | 451 | |
| 452 | static ADDRESS_MAP_START( fromanc2_ | |
| 452 | static ADDRESS_MAP_START( fromanc2_ | |
| 453 | 453 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 454 | AM_RANGE(0x02, 0x02) AM_READ(fromanc2_maincpu_r_l) // to MAIN CPU | |
| 455 | AM_RANGE(0x04, 0x04) AM_READ(fromanc2_maincpu_r_h) // to MAIN CPU | |
| 456 | ADDRESS_MAP_END | |
| 457 | ||
| 458 | static ADDRESS_MAP_START( fromanc2_writeport_sub, ADDRESS_SPACE_IO, 8 ) | |
| 459 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 460 | 454 | AM_RANGE(0x00, 0x00) AM_WRITE(fromanc2_subcpu_rombank_w) |
| 461 | AM_RANGE(0x02, 0x02) AM_WRITE(fromanc2_maincpu_w_l) // from MAIN CPU | |
| 462 | AM_RANGE(0x04, 0x04) AM_WRITE(fromanc2_maincpu_w_h) // from MAIN CPU | |
| 455 | AM_RANGE(0x02, 0x02) AM_READWRITE(fromanc2_maincpu_r_l, fromanc2_maincpu_w_l) // to/from MAIN CPU | |
| 456 | AM_RANGE(0x04, 0x04) AM_READWRITE(fromanc2_maincpu_r_h, fromanc2_maincpu_w_h) // to/from MAIN CPU | |
| 463 | 457 | AM_RANGE(0x06, 0x06) AM_WRITE(fromanc2_subcpu_nmi_clr) |
| 464 | 458 | ADDRESS_MAP_END |
| 465 | 459 | |
| r3171 | r3172 | |
| 478 | 472 | AM_RANGE(0xe000, 0xffff) AM_WRITE(SMH_RAM) |
| 479 | 473 | ADDRESS_MAP_END |
| 480 | 474 | |
| 481 | static ADDRESS_MAP_START( fromanc2_ | |
| 475 | static ADDRESS_MAP_START( fromanc2_ | |
| 482 | 476 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 483 | AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) // snd cmd (1P) | |
| 484 | AM_RANGE(0x04, 0x04) AM_READ(soundlatch2_r) // snd cmd (2P) | |
| 485 | AM_RANGE(0x09, 0x09) AM_READ(SMH_NOP) // ? | |
| 486 | AM_RANGE(0x08, 0x08) AM_READ(ym2610_status_port_0_a_r) | |
| 487 | AM_RANGE(0x0a, 0x0a) AM_READ(ym2610_status_port_0_b_r) | |
| 477 | AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_r, SMH_NOP) // snd cmd (1P) / ? | |
| 478 | AM_RANGE(0x04, 0x04) AM_READ(soundlatch2_r) // snd cmd (2P) | |
| 479 | AM_RANGE(0x08, 0x08) AM_READWRITE(ym2610_status_port_0_a_r, ym2610_control_port_0_a_w) | |
| 480 | AM_RANGE(0x09, 0x09) AM_READWRITE(SMH_NOP, ym2610_data_port_0_a_w) // ? | |
| 481 | AM_RANGE(0x0a, 0x0a) AM_READWRITE(ym2610_status_port_0_b_r, ym2610_control_port_0_b_w) | |
| 482 | AM_RANGE(0x0b, 0x0b) AM_WRITE(ym2610_data_port_0_b_w) | |
| 488 | 483 | AM_RANGE(0x0c, 0x0c) AM_READ(fromanc2_sndcpu_nmi_clr) |
| 489 | 484 | ADDRESS_MAP_END |
| 490 | 485 | |
| 491 | static ADDRESS_MAP_START( fromanc2_writeport_sound, ADDRESS_SPACE_IO, 8 ) | |
| 492 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 493 | AM_RANGE(0x00, 0x00) AM_WRITE(SMH_NOP) // ? | |
| 494 | AM_RANGE(0x08, 0x08) AM_WRITE(ym2610_control_port_0_a_w) | |
| 495 | AM_RANGE(0x09, 0x09) AM_WRITE(ym2610_data_port_0_a_w) | |
| 496 | AM_RANGE(0x0a, 0x0a) AM_WRITE(ym2610_control_port_0_b_w) | |
| 497 | AM_RANGE(0x0b, 0x0b) AM_WRITE(ym2610_data_port_0_b_w) | |
| 498 | ADDRESS_MAP_END | |
| 499 | ||
| 500 | ||
| 501 | 486 | /* ---------------------------------------------------------------------------- |
| 502 | 487 | Input Ports |
| 503 | 488 | ---------------------------------------------------------------------------- */ |
| r3171 | r3172 | |
| 679 | 664 | |
| 680 | 665 | MDRV_CPU_ADD("audio", Z80,32000000/4) /* 8.00 MHz */ |
| 681 | 666 | MDRV_CPU_PROGRAM_MAP(fromanc2_readmem_sound,fromanc2_writemem_sound) |
| 682 | MDRV_CPU_IO_MAP(fromanc2_ | |
| 667 | MDRV_CPU_IO_MAP(fromanc2_ | |
| 683 | 668 | |
| 684 | 669 | MDRV_CPU_ADD("sub", Z80,32000000/4) /* 8.00 MHz */ |
| 685 | 670 | MDRV_CPU_PROGRAM_MAP(fromanc2_readmem_sub,fromanc2_writemem_sub) |
| 686 | MDRV_CPU_IO_MAP(fromanc2_ | |
| 671 | MDRV_CPU_IO_MAP(fromanc2_ | |
| 687 | 672 | |
| 688 | 673 | |
| 689 | 674 | MDRV_MACHINE_RESET(fromanc2) |
| r3171 | r3172 | |
| 731 | 716 | |
| 732 | 717 | MDRV_CPU_ADD("audio", Z80,32000000/4) /* 8.00 MHz */ |
| 733 | 718 | MDRV_CPU_PROGRAM_MAP(fromanc2_readmem_sound,fromanc2_writemem_sound) |
| 734 | MDRV_CPU_IO_MAP(fromanc2_ | |
| 719 | MDRV_CPU_IO_MAP(fromanc2_ | |
| 735 | 720 | |
| 736 | 721 | MDRV_CPU_ADD("sub", Z80,32000000/4) /* 8.00 MHz */ |
| 737 | 722 | MDRV_CPU_PROGRAM_MAP(fromanc2_readmem_sub,fromanc2_writemem_sub) |
| 738 | MDRV_CPU_IO_MAP(fromanc2_ | |
| 723 | MDRV_CPU_IO_MAP(fromanc2_ | |
| 739 | 724 | |
| 740 | 725 | MDRV_MACHINE_RESET(fromancr) |
| 741 | 726 | MDRV_NVRAM_HANDLER(93C46) |
| r3171 | r3172 | |
| 782 | 767 | |
| 783 | 768 | MDRV_CPU_ADD("audio", Z80,32000000/4) /* 8.00 MHz */ |
| 784 | 769 | MDRV_CPU_PROGRAM_MAP(fromanc2_readmem_sound,fromanc2_writemem_sound) |
| 785 | MDRV_CPU_IO_MAP(fromanc2_ | |
| 770 | MDRV_CPU_IO_MAP(fromanc2_ | |
| 786 | 771 | |
| 787 | 772 | MDRV_MACHINE_RESET(fromanc4) |
| 788 | 773 | MDRV_NVRAM_HANDLER(93C46) |
| r3171 | r3172 | |
| 930 | 915 | GAME( 1995, fromanc2, 0, fromanc2, fromanc2, fromanc2, ROT0, "Video System Co.", "Taisen Idol-Mahjong Final Romance 2 (Japan)", 0 ) |
| 931 | 916 | GAME( 1995, fromancr, 0, fromancr, fromanc2, fromancr, ROT0, "Video System Co.", "Taisen Mahjong FinalRomance R (Japan)", 0 ) |
| 932 | 917 | GAME( 1998, fromanc4, 0, fromanc4, fromanc4, fromanc4, ROT0, "Video System Co.", "Taisen Mahjong FinalRomance 4 (Japan)", 0 ) |
| 918 |
| r3171 | r3172 | |
|---|---|---|
| 330 | 330 | AM_RANGE(0xa180, 0xa187) AM_WRITE(rallyx_latch_w) |
| 331 | 331 | ADDRESS_MAP_END |
| 332 | 332 | |
| 333 | static ADDRESS_MAP_START( | |
| 333 | static ADDRESS_MAP_START( | |
| 334 | 334 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 335 | 335 | AM_RANGE(0, 0) AM_WRITE(rallyx_interrupt_vector_w) |
| 336 | 336 | ADDRESS_MAP_END |
| r3171 | r3172 | |
| 854 | 854 | /* basic machine hardware */ |
| 855 | 855 | MDRV_CPU_ADD("main", Z80, 18432000/6) /* 3.072 MHz */ |
| 856 | 856 | MDRV_CPU_PROGRAM_MAP(rallyx_map,0) |
| 857 | MDRV_CPU_IO_MAP( | |
| 857 | MDRV_CPU_IO_MAP( | |
| 858 | 858 | MDRV_CPU_VBLANK_INT("main", irq0_line_assert) |
| 859 | 859 | |
| 860 | 860 | /* video hardware */ |
| r3171 | r3172 | |
|---|---|---|
| 91 | 91 | AM_RANGE(0x2000, 0x27ff) AM_WRITE(SMH_RAM) |
| 92 | 92 | ADDRESS_MAP_END |
| 93 | 93 | |
| 94 | static ADDRESS_MAP_START( carjmbre_sound_readport, ADDRESS_SPACE_IO, 8 ) | |
| 95 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 96 | AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) | |
| 97 | AM_RANGE(0x24, 0x24) AM_READ(SMH_NOP) //?? | |
| 98 | ADDRESS_MAP_END | |
| 99 | 94 | |
| 100 | static ADDRESS_MAP_START( carjmbre_sound_ | |
| 95 | static ADDRESS_MAP_START( carjmbre_sound_ | |
| 101 | 96 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 97 | AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) | |
| 102 | 98 | AM_RANGE(0x10, 0x10) AM_WRITE(SMH_NOP) //?? written on init/0xff sound command reset |
| 103 | 99 | AM_RANGE(0x20, 0x20) AM_WRITE(ay8910_control_port_0_w) |
| 104 | 100 | AM_RANGE(0x21, 0x21) AM_WRITE(ay8910_write_port_0_w) |
| 105 | 101 | AM_RANGE(0x22, 0x22) AM_WRITE(SMH_NOP) //?? written before and after 0x21 with same value |
| 102 | AM_RANGE(0x24, 0x24) AM_READ(SMH_NOP) //?? | |
| 106 | 103 | AM_RANGE(0x30, 0x30) AM_WRITE(ay8910_control_port_1_w) |
| 107 | 104 | AM_RANGE(0x31, 0x31) AM_WRITE(ay8910_write_port_1_w) |
| 108 | 105 | AM_RANGE(0x32, 0x32) AM_WRITE(SMH_NOP) //?? written before and after 0x31 with same value |
| r3171 | r3172 | |
| 190 | 187 | |
| 191 | 188 | MDRV_CPU_ADD("audio", Z80, 1500000) |
| 192 | 189 | MDRV_CPU_PROGRAM_MAP(carjmbre_sound_readmem,carjmbre_sound_writemem) |
| 193 | MDRV_CPU_IO_MAP(carjmbre_sound_ | |
| 190 | MDRV_CPU_IO_MAP(carjmbre_sound_i | |
| 194 | 191 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 195 | 192 | |
| 196 | 193 | /* video hardware */ |
| r3171 | r3172 | |
| 248 | 245 | ROM_END |
| 249 | 246 | |
| 250 | 247 | GAME( 1983, carjmbre, 0, carjmbre, carjmbre, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", GAME_IMPERFECT_COLORS ) |
| 248 |
| r3171 | r3172 | |
|---|---|---|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | |
| 193 | static READ32_HANDLER( dreamwld_dips_r ) | |
| 194 | { | |
| 195 | return input_port_read(machine, "DSW") | (input_port_read(machine, "DSW")<<16); | |
| 196 | } | |
| 197 | ||
| 198 | 193 | static WRITE32_HANDLER( dreamwld_palette_w ) |
| 199 | 194 | { |
| 200 | 195 | UINT16 dat; |
| 201 | 196 | int color; |
| 202 | 197 | |
| 203 | 198 | COMBINE_DATA(&paletteram32[offset]); |
| 204 | color = offset*2; | |
| 199 | color = offset * 2; | |
| 205 | 200 | |
| 206 | dat = paletteram32[offset]&0x7fff; | |
| 207 | palette_set_color_rgb(machine,color+1,pal5bit(dat >> 10),pal5bit(dat >> 5),pal5bit(dat >> 0)); | |
| 201 | dat = paletteram32[offset] & 0x7fff; | |
| 202 | palette_set_color_rgb(machine, color + 1, pal5bit(dat >> 10), pal5bit(dat >> 5), pal5bit(dat >> 0)); | |
| 208 | 203 | |
| 209 | dat = (paletteram32[offset]>>16)&0x7fff; | |
| 210 | palette_set_color_rgb(machine,color,pal5bit(dat >> 10),pal5bit(dat >> 5),pal5bit(dat >> 0)); | |
| 211 | ||
| 204 | dat = (paletteram32[offset] >> 16) & 0x7fff; | |
| 205 | palette_set_color_rgb(machine, color, pal5bit(dat >> 10), pal5bit(dat >> 5), pal5bit(dat >> 0)); | |
| 212 | 206 | } |
| 213 | 207 | |
| 214 | 208 | static READ32_HANDLER(dreamwld_6295_0_r) |
| r3171 | r3172 | |
| 289 | 283 | AM_RANGE(0x804000, 0x805fff) AM_RAM AM_BASE( &dreamwld_bg_scroll ) // scroll regs etc. |
| 290 | 284 | |
| 291 | 285 | AM_RANGE(0xc00000, 0xc00003) AM_READ_PORT("INPUTS") |
| 292 | AM_RANGE(0xc00004, 0xc00007) AM_READ | |
| 286 | AM_RANGE(0xc00004, 0xc00007) AM_READ | |
| 293 | 287 | |
| 294 | ||
| 295 | 288 | AM_RANGE(0xc0000c, 0xc0000f) AM_WRITE( dreamwld_6295_0_bank_w ) // sfx |
| 296 | 289 | AM_RANGE(0xc00018, 0xc0001b) AM_READWRITE( dreamwld_6295_0_r, dreamwld_6295_0_w) // sfx |
| 297 | 290 | |
| r3171 | r3172 | |
| 369 | 362 | PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| 370 | 363 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 371 | 364 | |
| 365 | PORT_START("c00004") /* 32bit */ | |
| 366 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 367 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 368 | ||
| 372 | 369 | PORT_START("DSW") /* 16bit */ |
| 373 | 370 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") |
| 374 | 371 | PORT_DIPSETTING( 0x0001, "1" ) |
| r3171 | r3172 | |
|---|---|---|
| 243 | 243 | // logerror("write %02x to 68705\n",data); |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | static | |
| 246 | static CUSTOM_I | |
| 247 | 247 | { |
| 248 | return | |
| 248 | return | |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | static INTERRUPT_GEN( xain_interrupt ) |
| 252 | 252 | { |
| 253 | int scanline=255-cpu_getiloops(); | |
| 253 | int scanline = 255 - cpu_getiloops(); | |
| 254 | 254 | |
| 255 | 255 | /* FIRQ (IMS) fires every on every 8th scanline (except 0) */ |
| 256 | if (scanline&0x08) | |
| 256 | if (scanline & 0x08) | |
| 257 | 257 | cpunum_set_input_line(machine, 0, M6809_FIRQ_LINE, ASSERT_LINE); |
| 258 | 258 | |
| 259 | 259 | /* NMI fires on scanline 248 (VBL) and is latched */ |
| 260 | if (scanline==248) | |
| 260 | if (scanline == 248) | |
| 261 | 261 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, ASSERT_LINE); |
| 262 | 262 | |
| 263 | 263 | /* VBLANK input bit is held high from scanlines 248-255 */ |
| 264 | if (scanline>=248-1) // -1 is a hack - see notes above | |
| 265 | vblank=0x20; | |
| 264 | if (scanline >= 248-1) // -1 is a hack - see notes above | |
| 265 | vblank = 1; | |
| 266 | 266 | else |
| 267 | vblank=0; | |
| 267 | vblank = 0; | |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 282 | 282 | AM_RANGE(0x3a03, 0x3a03) AM_READ_PORT("DSW1") |
| 283 | 283 | AM_RANGE(0x3a04, 0x3a04) AM_READ(xain_68705_r) /* from the 68705 */ |
| 284 | 284 | AM_RANGE(0x3a04, 0x3a05) AM_WRITE(xain_scrollxP0_w) |
| 285 | AM_RANGE(0x3a05, 0x3a05) AM_READ | |
| 285 | AM_RANGE(0x3a05, 0x3a05) AM_READ | |
| 286 | 286 | // AM_RANGE(0x3a06, 0x3a06) AM_READ(SMH_NOP) /* ?? read (and discarded) on startup. Maybe reset the 68705 */ |
| 287 | 287 | AM_RANGE(0x3a06, 0x3a07) AM_WRITE(xain_scrollyP0_w) |
| 288 | 288 | AM_RANGE(0x3a08, 0x3a08) AM_WRITE(xain_sound_command_w) |
| r3171 | r3172 | |
| 394 | 394 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 395 | 395 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* when 0, 68705 is ready to send data */ |
| 396 | 396 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* when 1, 68705 is ready to receive data */ |
| 397 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* VBLANK */ | |
| 397 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xain_vblank_r, NULL) /* VBLANK */ | |
| 398 | 398 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 399 | 399 | INPUT_PORTS_END |
| 400 | 400 |
| r3171 | r3172 | |
|---|---|---|
| 890 | 890 | static INPUT_PORTS_START( mooncrgx ) |
| 891 | 891 | PORT_INCLUDE(mooncrst) |
| 892 | 892 | |
| 893 | PORT_MODIFY("IN0") | |
| 894 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 895 | ||
| 893 | 896 | PORT_MODIFY("IN1") |
| 894 | 897 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coin_A ) ) |
| 895 | 898 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) |
| r3171 | r3172 | |
| 1206 | 1209 | PORT_INCLUDE(galaxian) |
| 1207 | 1210 | |
| 1208 | 1211 | PORT_MODIFY("IN0") |
| 1209 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(kingball_muxbit_r, | |
| 1212 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(kingball_muxbit_r, NULL) | |
| 1210 | 1213 | /* Relating to above port:Hack? - possibly multiplexed via writes to $b003 */ |
| 1211 | 1214 | //PORT_DIPNAME( 0x40, 0x40, "Speech" ) |
| 1212 | 1215 | //PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1213 | 1216 | //PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1214 | 1217 | |
| 1215 | 1218 | PORT_MODIFY("IN1") |
| 1216 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(kingball_noise_r, | |
| 1219 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(kingball_noise_r, NULL) /* NOISE line */ | |
| 1217 | 1220 | |
| 1218 | 1221 | PORT_MODIFY("IN2") |
| 1219 | 1222 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) ) |
| r3171 | r3172 | |
|---|---|---|
| 132 | 132 | AM_RANGE(0xc001, 0xc001) AM_WRITE(watchdog_reset_w) |
| 133 | 133 | ADDRESS_MAP_END |
| 134 | 134 | |
| 135 | static ADDRESS_MAP_START( sound_ | |
| 135 | static ADDRESS_MAP_START( sound_io_ma | |
| 136 | 136 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 137 | AM_RANGE(0x00, 0x02) AM_READ(ay8910_read_port_0_r) | |
| 138 | ADDRESS_MAP_END | |
| 139 | ||
| 140 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 141 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 142 | 137 | AM_RANGE(0x00, 0x00) AM_WRITE(ay8910_control_port_0_w) |
| 138 | AM_RANGE(0x00, 0x02) AM_READ(ay8910_read_port_0_r) | |
| 143 | 139 | AM_RANGE(0x02, 0x02) AM_WRITE(ay8910_write_port_0_w) |
| 144 | 140 | ADDRESS_MAP_END |
| 145 | 141 | |
| r3171 | r3172 | |
| 151 | 147 | AM_RANGE(0x0000, 0x0fff) AM_WRITE(SMH_ROM) |
| 152 | 148 | ADDRESS_MAP_END |
| 153 | 149 | |
| 154 | static ADDRESS_MAP_START( i8039_ | |
| 150 | static ADDRESS_MAP_START( i8039_io_ma | |
| 155 | 151 | AM_RANGE(0x00, 0xff) AM_READ(soundlatch_r) |
| 156 | ADDRESS_MAP_END | |
| 157 | ||
| 158 | static ADDRESS_MAP_START( i8039_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 159 | 152 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(dac_0_data_w) |
| 160 | 153 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_and_status_w) |
| 161 | 154 | ADDRESS_MAP_END |
| r3171 | r3172 | |
| 320 | 313 | |
| 321 | 314 | MDRV_CPU_ADD("audio", Z80,18432000/6) /* Z80 Clock is derived from the H1 signal */ |
| 322 | 315 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 323 | MDRV_CPU_IO_MAP(sound_ | |
| 316 | MDRV_CPU_IO_MAP(sound_i | |
| 324 | 317 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 325 | 318 | |
| 326 | 319 | MDRV_CPU_ADD("dac", I8039,14318000/2) /* 1/2 14MHz crystal */ |
| 327 | 320 | MDRV_CPU_PROGRAM_MAP(i8039_readmem,i8039_writemem) |
| 328 | MDRV_CPU_IO_MAP(i8039_ | |
| 321 | MDRV_CPU_IO_MAP(i8039_io_ma | |
| 329 | 322 | |
| 330 | 323 | MDRV_INTERLEAVE(15) |
| 331 | 324 | |
| r3171 | r3172 | |
| 599 | 592 | |
| 600 | 593 | /* this displays Konami and Kosuka copyright with a Konami / Interlogic logo */ |
| 601 | 594 | GAME( 1983, megaznik, megazone, megazone, megazone, megazone, ROT90, "Konami / Interlogic + Kosuka", "Mega Zone (Interlogic + Kosuka)", 0 ) |
| 595 |
| r3171 | r3172 | |
|---|---|---|
| 152 | 152 | AM_RANGE(0xf800, 0xffff) AM_WRITE(SMH_RAM) |
| 153 | 153 | ADDRESS_MAP_END |
| 154 | 154 | |
| 155 | static ADDRESS_MAP_START( pass_sound_ | |
| 155 | static ADDRESS_MAP_START( pass_sound_io_ma | |
| 156 | 156 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 157 | 157 | AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) |
| 158 | AM_RANGE(0x70, 0x70) AM_READ(ym2203_status_port_0_r) | |
| 159 | AM_RANGE(0x71, 0x71) AM_READ(ym2203_read_port_0_r) | |
| 160 | ADDRESS_MAP_END | |
| 161 | ||
| 162 | static ADDRESS_MAP_START( pass_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 163 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 164 | AM_RANGE(0x70, 0x70) AM_WRITE(ym2203_control_port_0_w) | |
| 165 | AM_RANGE(0x71, 0x71) AM_WRITE(ym2203_write_port_0_w) | |
| 158 | AM_RANGE(0x70, 0x70) AM_READWRITE(ym2203_status_port_0_r, ym2203_control_port_0_w) | |
| 159 | AM_RANGE(0x71, 0x71) AM_READWRITE(ym2203_read_port_0_r, ym2203_write_port_0_w) | |
| 166 | 160 | AM_RANGE(0x80, 0x80) AM_WRITE(okim6295_data_0_w) |
| 167 | 161 | AM_RANGE(0xc0, 0xc0) AM_WRITE(soundlatch_clear_w) |
| 168 | 162 | ADDRESS_MAP_END |
| 169 | 163 | |
| 170 | ||
| 171 | 164 | /* todo : work out function of unknown but used dsw */ |
| 172 | 165 | static INPUT_PORTS_START( pass ) |
| 173 | 166 | PORT_START("DSW") |
| r3171 | r3172 | |
| 277 | 270 | |
| 278 | 271 | MDRV_CPU_ADD("audio", Z80, 14318180/4 ) |
| 279 | 272 | MDRV_CPU_PROGRAM_MAP(pass_sound_readmem,pass_sound_writemem) |
| 280 | MDRV_CPU_IO_MAP(pass_sound_ | |
| 273 | MDRV_CPU_IO_MAP(pass_sound_i | |
| 281 | 274 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 282 | 275 | |
| 283 | 276 | /* video hardware */ |
| r3171 | r3172 | |
| 330 | 323 | |
| 331 | 324 | |
| 332 | 325 | GAME( 1992, pass, 0, pass, pass, 0, ROT0, "Oksan", "Pass", 0) |
| 326 |
| r3171 | r3172 | |
|---|---|---|
| 134 | 134 | AM_RANGE(0xc000, 0xc3ff) AM_WRITE(SMH_RAM) |
| 135 | 135 | ADDRESS_MAP_END |
| 136 | 136 | |
| 137 | ||
| 138 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 137 | static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) | |
| 139 | 138 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 140 | AM_RANGE(0xBE, 0xBE) AM_READ(TMS9928A_vram_r) | |
| 141 | AM_RANGE(0xBF, 0xBF) AM_READ(TMS9928A_register_r) | |
| 139 | AM_RANGE(0x7f, 0x7F) AM_WRITE(sn76496_0_w) | |
| 140 | AM_RANGE(0xBE, 0xBE) AM_READWRITE(TMS9928A_vram_r, TMS9928A_vram_w) | |
| 141 | AM_RANGE(0xBF, 0xBF) AM_READWRITE(TMS9928A_register_r, TMS9928A_register_w) | |
| 142 | 142 | AM_RANGE(0xDC, 0xDC) AM_READ_PORT("P1") |
| 143 | 143 | AM_RANGE(0xDD, 0xDD) AM_READ_PORT("P2") |
| 144 | 144 | AM_RANGE(0xDE, 0xDE) AM_READ_PORT("DSW") |
| 145 | ADDRESS_MAP_END | |
| 146 | ||
| 147 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 148 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 149 | AM_RANGE(0xBE, 0xBE) AM_WRITE(TMS9928A_vram_w) | |
| 150 | AM_RANGE(0xBF, 0xBF) AM_WRITE(TMS9928A_register_w) | |
| 151 | 145 | AM_RANGE(0xDF, 0xDF) AM_WRITE(SMH_NOP) //? 8255 ? |
| 152 | AM_RANGE(0x7f, 0x7F) AM_WRITE(sn76496_0_w) | |
| 153 | 146 | ADDRESS_MAP_END |
| 154 | 147 | |
| 155 | 148 | /************************************* |
| r3171 | r3172 | |
| 268 | 261 | static MACHINE_DRIVER_START( sg1000a ) |
| 269 | 262 | MDRV_CPU_ADD("main", Z80, 3579545) /* 3.579545 Mhz */ |
| 270 | 263 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 271 | MDRV_CPU_IO_MAP( | |
| 264 | MDRV_CPU_IO_MAP(io_ma | |
| 272 | 265 | MDRV_CPU_VBLANK_INT("main", sg100a_interrupt) |
| 273 | 266 | |
| 274 | 267 | /* video hardware */ |
| r3171 | r3172 | |
| 339 | 332 | GAME( 1985, dokidoki, 0, sg1000a, dokidoki, sg1000a, ROT0, "Sega", "Doki Doki Penguin Land", 0) |
| 340 | 333 | |
| 341 | 334 | |
| 335 |
| r3171 | r3172 | |
|---|---|---|
| 49 | 49 | /* clear */ |
| 50 | 50 | fillbitmap(bitmap, 0, cliprect); |
| 51 | 51 | |
| 52 | /* display disc information */ | |
| 53 | popmessage("%s", laserdisc_describe_state(laserdisc)); | |
| 54 | ||
| 55 | 52 | /* DEBUG */ |
| 56 | 53 | /* |
| 57 | 54 | for (charx = 0; charx < 0x400; charx ++) |
| r3171 | r3172 | |
|---|---|---|
| 411 | 411 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(SMH_RAM) |
| 412 | 412 | ADDRESS_MAP_END |
| 413 | 413 | |
| 414 | static ADDRESS_MAP_START( sound_ | |
| 414 | static ADDRESS_MAP_START( sound_ | |
| 415 | 415 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 416 | 416 | AM_RANGE(0x00, 0x00) AM_WRITE(ym2203_control_port_0_w) |
| 417 | 417 | AM_RANGE(0x01, 0x01) AM_WRITE(ym2203_write_port_0_w) |
| r3171 | r3172 | |
| 559 | 559 | |
| 560 | 560 | MDRV_CPU_ADD("audio", Z80, 6000000) |
| 561 | 561 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 562 | MDRV_CPU_IO_MAP( | |
| 562 | MDRV_CPU_IO_MAP( | |
| 563 | 563 | |
| 564 | 564 | MDRV_INTERLEAVE(10) /* Allow time for 2nd cpu to interleave*/ |
| 565 | 565 | MDRV_MACHINE_RESET(psychic5) |
| r3171 | r3172 | |
|---|---|---|
| 83 | 83 | return 0x00; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 86 | ||
| 87 | static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) | |
| 87 | 88 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 88 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P2") | |
| 89 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P1") | |
| 90 | AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW") | |
| 89 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P2") AM_WRITE(io_0x00_w) | |
| 90 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P1") AM_WRITE(sn76496_0_w) | |
| 91 | AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW") AM_WRITE(sn76496_1_w) | |
| 91 | 92 | AM_RANGE(0x03, 0x03) AM_READ(io_0x03_r) // Unknown |
| 92 | 93 | ADDRESS_MAP_END |
| 93 | 94 | |
| 94 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 95 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 96 | AM_RANGE(0x00, 0x00) AM_WRITE(io_0x00_w) | |
| 97 | AM_RANGE(0x01, 0x01) AM_WRITE(sn76496_0_w) | |
| 98 | AM_RANGE(0x02, 0x02) AM_WRITE(sn76496_1_w) | |
| 99 | ADDRESS_MAP_END | |
| 100 | ||
| 101 | ||
| 102 | 95 | static INPUT_PORTS_START( mrjong ) |
| 103 | 96 | PORT_START("P2") |
| 104 | 97 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) |
| r3171 | r3172 | |
| 181 | 174 | /* basic machine hardware */ |
| 182 | 175 | MDRV_CPU_ADD("main", Z80,15468000/6) /* 2.578 MHz?? */ |
| 183 | 176 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 184 | MDRV_CPU_IO_MAP( | |
| 177 | MDRV_CPU_IO_MAP(io_ma | |
| 185 | 178 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 186 | 179 | |
| 187 | 180 | /* video hardware */ |
| r3171 | r3172 | |
| 267 | 260 | GAME( 1983, mrjong, 0, mrjong, mrjong, 0, ROT90, "Kiwako", "Mr. Jong (Japan)", 0 ) |
| 268 | 261 | GAME( 1983, crazyblk, mrjong, mrjong, mrjong, 0, ROT90, "Kiwako (ECI license)", "Crazy Blocks", 0 ) |
| 269 | 262 | GAME( 1983, blkbustr, mrjong, mrjong, mrjong, 0, ROT90, "Kiwako (ECI license)", "BlockBuster", 0 ) |
| 263 |
| r3171 | r3172 | |
|---|---|---|
| 297 | 297 | meritm_vint |= 0x08; |
| 298 | 298 | |
| 299 | 299 | if(i) |
| 300 | z80pio_p_w(0, 0, meritm_vint); | |
| 300 | z80pio_p_w(machine, 0, 0, meritm_vint); | |
| 301 | 301 | } |
| 302 | 302 | } |
| 303 | 303 | |
| r3171 | r3172 | |
| 312 | 312 | meritm_vint |= 0x10; |
| 313 | 313 | |
| 314 | 314 | if(i) |
| 315 | z80pio_p_w(0, 0, meritm_vint); | |
| 315 | z80pio_p_w(machine, 0, 0, meritm_vint); | |
| 316 | 316 | } |
| 317 | 317 | } |
| 318 | 318 | |
| r3171 | r3172 | |
| 822 | 822 | #ifdef UNUSED_FUNCTION |
| 823 | 823 | static void meritm_pio1_portb_input_changed_callback(void *param, UINT32 oldval, UINT32 newval) |
| 824 | 824 | { |
| 825 | z80pio_p_w(1, 1, (UINT8)newval); | |
| 825 | z80pio_p_w(Machine, 1, 1, (UINT8)newval); | |
| 826 | 826 | } |
| 827 | 827 | #endif |
| 828 | 828 |
| r3171 | r3172 | |
|---|---|---|
| 276 | 276 | MEMORY STRUCTURES |
| 277 | 277 | ***********************************************************/ |
| 278 | 278 | |
| 279 | static ADDRESS_MAP_START( slapshot_readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 280 | AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM) | |
| 281 | AM_RANGE(0x500000, 0x50ffff) AM_READ(SMH_RAM) /* main RAM */ | |
| 282 | AM_RANGE(0x600000, 0x60ffff) AM_READ(SMH_RAM) /* sprite ram */ | |
| 283 | AM_RANGE(0x700000, 0x701fff) AM_READ(SMH_RAM) /* debugging */ | |
| 284 | AM_RANGE(0x800000, 0x80ffff) AM_READ(TC0480SCP_word_r) /* tilemaps */ | |
| 285 | AM_RANGE(0x830000, 0x83002f) AM_READ(TC0480SCP_ctrl_word_r) | |
| 286 | AM_RANGE(0x900000, 0x907fff) AM_READ(color_ram_word_r) /* 8bpg palette */ | |
| 287 | AM_RANGE(0xa00000, 0xa03fff) AM_READ8(timekeeper_0_r, 0xff00) /* nvram (only low bytes used) */ | |
| 288 | AM_RANGE(0xc00000, 0xc0000f) AM_READ(TC0640FIO_halfword_byteswap_r) | |
| 279 | static ADDRESS_MAP_START( slapshot_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 280 | AM_RANGE(0x000000, 0x0fffff) AM_ROM | |
| 281 | AM_RANGE(0x500000, 0x50ffff) AM_RAM /* main RAM */ | |
| 282 | AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) /* sprite ram */ | |
| 283 | AM_RANGE(0x700000, 0x701fff) AM_RAM AM_BASE(&taito_sprite_ext) AM_SIZE(&taito_spriteext_size) /* debugging */ | |
| 284 | AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0480SCP_word_r, TC0480SCP_word_w) /* tilemaps */ | |
| 285 | AM_RANGE(0x830000, 0x83002f) AM_READWRITE(TC0480SCP_ctrl_word_r, TC0480SCP_ctrl_word_w) | |
| 286 | AM_RANGE(0x900000, 0x907fff) AM_READWRITE(color_ram_word_r, color_ram_word_w) AM_BASE(&color_ram) /* 8bpg palette */ | |
| 287 | AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE8(MK48T08, "mk48t08", timekeeper_r, timekeeper_w, 0xff00) /* nvram (only low bytes used) */ | |
| 288 | AM_RANGE(0xb00000, 0xb0001f) AM_WRITE(TC0360PRI_halfword_swap_w) /* priority chip */ | |
| 289 | AM_RANGE(0xc00000, 0xc0000f) AM_READWRITE(TC0640FIO_halfword_byteswap_r, TC0640FIO_halfword_byteswap_w) | |
| 289 | 290 | AM_RANGE(0xc00020, 0xc0002f) AM_READ(slapshot_service_input_r) /* service mirror */ |
| 290 | AM_RANGE(0xd00000, 0xd00003) AM_READ(slapshot_msb_sound_r) | |
| 291 | AM_RANGE(0xd00000, 0xd00003) AM_READWRITE(slapshot_msb_sound_r, slapshot_msb_sound_w) | |
| 291 | 292 | ADDRESS_MAP_END |
| 292 | 293 | |
| 293 | static ADDRESS_MAP_START( slapshot_writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 294 | AM_RANGE(0x000000, 0x0fffff) AM_WRITE(SMH_ROM) | |
| 295 | AM_RANGE(0x500000, 0x50ffff) AM_WRITE(SMH_RAM) | |
| 296 | AM_RANGE(0x600000, 0x60ffff) AM_WRITE(SMH_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) | |
| 297 | AM_RANGE(0x700000, 0x701fff) AM_WRITE(SMH_RAM) AM_BASE(&taito_sprite_ext) AM_SIZE(&taito_spriteext_size) | |
| 298 | AM_RANGE(0x800000, 0x80ffff) AM_WRITE(TC0480SCP_word_w) /* tilemaps */ | |
| 299 | AM_RANGE(0x830000, 0x83002f) AM_WRITE(TC0480SCP_ctrl_word_w) | |
| 300 | AM_RANGE(0x900000, 0x907fff) AM_WRITE(color_ram_word_w) AM_BASE(&color_ram) | |
| 301 | AM_RANGE(0xa00000, 0xa03fff) AM_WRITE8(timekeeper_0_w, 0xff00) | |
| 294 | static ADDRESS_MAP_START( opwolf3_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 295 | AM_RANGE(0x000000, 0x1fffff) AM_ROM | |
| 296 | AM_RANGE(0x500000, 0x50ffff) AM_RAM /* main RAM */ | |
| 297 | AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) /* sprite ram */ | |
| 298 | AM_RANGE(0x700000, 0x701fff) AM_RAM AM_BASE(&taito_sprite_ext) AM_SIZE(&taito_spriteext_size) /* debugging */ | |
| 299 | AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0480SCP_word_r, TC0480SCP_word_w) /* tilemaps */ | |
| 300 | AM_RANGE(0x830000, 0x83002f) AM_READWRITE(TC0480SCP_ctrl_word_r, TC0480SCP_ctrl_word_w) | |
| 301 | AM_RANGE(0x900000, 0x907fff) AM_READWRITE(color_ram_word_r, color_ram_word_w) AM_BASE(&color_ram) /* 8bpg palette */ | |
| 302 | AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE8(MK48T08, "mk48t08", timekeeper_r, timekeeper_w, 0xff00) /* nvram (only low bytes used) */ | |
| 302 | 303 | AM_RANGE(0xb00000, 0xb0001f) AM_WRITE(TC0360PRI_halfword_swap_w) /* priority chip */ |
| 303 | AM_RANGE(0xc00000, 0xc0000f) AM_WRITE(TC0640FIO_halfword_byteswap_w) | |
| 304 | AM_RANGE(0xd00000, 0xd00003) AM_WRITE(slapshot_msb_sound_w) | |
| 305 | ADDRESS_MAP_END | |
| 306 | ||
| 307 | static ADDRESS_MAP_START( opwolf3_readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 308 | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM) | |
| 309 | AM_RANGE(0x500000, 0x50ffff) AM_READ(SMH_RAM) /* main RAM */ | |
| 310 | AM_RANGE(0x600000, 0x60ffff) AM_READ(SMH_RAM) /* sprite ram */ | |
| 311 | AM_RANGE(0x700000, 0x701fff) AM_READ(SMH_RAM) /* debugging */ | |
| 312 | AM_RANGE(0x800000, 0x80ffff) AM_READ(TC0480SCP_word_r) /* tilemaps */ | |
| 313 | AM_RANGE(0x830000, 0x83002f) AM_READ(TC0480SCP_ctrl_word_r) | |
| 314 | AM_RANGE(0x900000, 0x907fff) AM_READ(color_ram_word_r) /* 8bpg palette */ | |
| 315 | AM_RANGE(0xa00000, 0xa03fff) AM_READ8(timekeeper_0_r, 0xff00) /* nvram (only low bytes used) */ | |
| 316 | AM_RANGE(0xc00000, 0xc0000f) AM_READ(TC0640FIO_halfword_byteswap_r) | |
| 304 | AM_RANGE(0xc00000, 0xc0000f) AM_READWRITE(TC0640FIO_halfword_byteswap_r, TC0640FIO_halfword_byteswap_w) | |
| 317 | 305 | AM_RANGE(0xc00020, 0xc0002f) AM_READ(slapshot_service_input_r) /* service mirror */ |
| 318 | AM_RANGE(0xd00000, 0xd00003) AM_READ(slapshot_msb_sound_r) | |
| 319 | AM_RANGE(0xe00000, 0xe00007) AM_READ(opwolf3_adc_r) | |
| 306 | AM_RANGE(0xd00000, 0xd00003) AM_READWRITE(slapshot_msb_sound_r, slapshot_msb_sound_w) | |
| 307 | AM_RANGE(0xe00000, 0xe00007) AM_READWRITE(opwolf3_adc_r, opwolf3_adc_req_w) | |
| 320 | 308 | ADDRESS_MAP_END |
| 321 | 309 | |
| 322 | static ADDRESS_MAP_START( opwolf3_writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 323 | AM_RANGE(0x000000, 0x1fffff) AM_WRITE(SMH_ROM) | |
| 324 | AM_RANGE(0x500000, 0x50ffff) AM_WRITE(SMH_RAM) | |
| 325 | AM_RANGE(0x600000, 0x60ffff) AM_WRITE(SMH_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) | |
| 326 | AM_RANGE(0x700000, 0x701fff) AM_WRITE(SMH_RAM) AM_BASE(&taito_sprite_ext) AM_SIZE(&taito_spriteext_size) | |
| 327 | AM_RANGE(0x800000, 0x80ffff) AM_WRITE(TC0480SCP_word_w) /* tilemaps */ | |
| 328 | AM_RANGE(0x830000, 0x83002f) AM_WRITE(TC0480SCP_ctrl_word_w) | |
| 329 | AM_RANGE(0x900000, 0x907fff) AM_WRITE(color_ram_word_w) AM_BASE(&color_ram) | |
| 330 | AM_RANGE(0xa00000, 0xa03fff) AM_WRITE8(timekeeper_0_w, 0xff00) | |
| 331 | AM_RANGE(0xb00000, 0xb0001f) AM_WRITE(TC0360PRI_halfword_swap_w) /* priority chip */ | |
| 332 | AM_RANGE(0xc00000, 0xc0000f) AM_WRITE(TC0640FIO_halfword_byteswap_w) | |
| 333 | AM_RANGE(0xd00000, 0xd00003) AM_WRITE(slapshot_msb_sound_w) | |
| 334 | AM_RANGE(0xe00000, 0xe00007) AM_WRITE(opwolf3_adc_req_w) | |
| 335 | ADDRESS_MAP_END | |
| 336 | ||
| 337 | 310 | /***************************************************************************/ |
| 338 | 311 | |
| 339 | 312 | static ADDRESS_MAP_START( z80_sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 555 | 528 | |
| 556 | 529 | /* basic machine hardware */ |
| 557 | 530 | MDRV_CPU_ADD("main", M68000, 14346000) /* 28.6860 MHz / 2 ??? */ |
| 558 | MDRV_CPU_PROGRAM_MAP(slapshot_ | |
| 531 | MDRV_CPU_PROGRAM_MAP(slapshot_ | |
| 559 | 532 | MDRV_CPU_VBLANK_INT("main", slapshot_interrupt) |
| 560 | 533 | |
| 561 | 534 | MDRV_CPU_ADD("audio", Z80,32000000/8) /* 4 MHz */ |
| r3171 | r3172 | |
| 564 | 537 | MDRV_INTERLEAVE(10) |
| 565 | 538 | |
| 566 | 539 | MDRV_MACHINE_START(slapshot) |
| 567 | MDRV_NVRAM_HANDLER(timekeeper_0) | |
| 568 | 540 | |
| 569 | 541 | /* video hardware */ |
| 570 | 542 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 590 | 562 | MDRV_SOUND_ROUTE(0, "right", 0.25) |
| 591 | 563 | MDRV_SOUND_ROUTE(1, "left", 1.0) |
| 592 | 564 | MDRV_SOUND_ROUTE(2, "right", 1.0) |
| 565 | ||
| 566 | MDRV_DEVICE_ADD( "mk48t08", MK48T08 ) | |
| 593 | 567 | MACHINE_DRIVER_END |
| 594 | 568 | |
| 595 | 569 | static MACHINE_DRIVER_START( opwolf3 ) |
| 596 | 570 | |
| 597 | 571 | /* basic machine hardware */ |
| 598 | 572 | MDRV_CPU_ADD("main", M68000, 14346000) /* 28.6860 MHz / 2 ??? */ |
| 599 | MDRV_CPU_PROGRAM_MAP(opwolf3_ | |
| 573 | MDRV_CPU_PROGRAM_MAP(opwolf3_ | |
| 600 | 574 | MDRV_CPU_VBLANK_INT("main", slapshot_interrupt) |
| 601 | 575 | |
| 602 | 576 | MDRV_CPU_ADD("audio", Z80,32000000/8) /* 4 MHz */ |
| r3171 | r3172 | |
| 604 | 578 | |
| 605 | 579 | MDRV_INTERLEAVE(10) |
| 606 | 580 | |
| 607 | MDRV_NVRAM_HANDLER(timekeeper_0) | |
| 608 | ||
| 609 | 581 | /* video hardware */ |
| 610 | 582 | MDRV_SCREEN_ADD("main", RASTER) |
| 611 | 583 | MDRV_SCREEN_REFRESH_RATE(60) |
| r3171 | r3172 | |
| 630 | 602 | MDRV_SOUND_ROUTE(0, "right", 0.25) |
| 631 | 603 | MDRV_SOUND_ROUTE(1, "left", 1.0) |
| 632 | 604 | MDRV_SOUND_ROUTE(2, "right", 1.0) |
| 605 | ||
| 606 | MDRV_DEVICE_ADD( "mk48t08", MK48T08 ) | |
| 633 | 607 | MACHINE_DRIVER_END |
| 634 | 608 | |
| 635 | 609 | /*************************************************************************** |
| r3171 | r3172 | |
| 731 | 705 | int size=memory_region_length(machine, "gfx2"); |
| 732 | 706 | int data; |
| 733 | 707 | |
| 734 | timekeeper_init( machine, 0, TIMEKEEPER_MK48T08, NULL ); | |
| 735 | ||
| 736 | 708 | offset = size/2; |
| 737 | 709 | for (i = size/2+size/4; i<size; i++) |
| 738 | 710 | { |
| r3171 | r3172 | |
|---|---|---|
| 206 | 206 | AM_RANGE(0x30, 0x33) AM_WRITE(wardner_fgscroll_w) /* scroll fg layer */ |
| 207 | 207 | AM_RANGE(0x34, 0x35) AM_WRITE(wardner_fglayer_w) /* offset in fg video RAM */ |
| 208 | 208 | AM_RANGE(0x40, 0x43) AM_WRITE(wardner_exscroll_w) /* scroll extra layer (not used) */ |
| 209 | AM_RANGE(0x50, 0x50) AM_READ(input_port_3_r) /* DSW A */ | |
| 210 | AM_RANGE(0x52, 0x52) AM_READ(input_port_4_r) /* DSW B */ | |
| 211 | AM_RANGE(0x54, 0x54) AM_READ(input_port_1_r) /* Player 1 */ | |
| 212 | AM_RANGE(0x56, 0x56) AM_READ(input_port_2_r) /* Player 2 */ | |
| 213 | AM_RANGE(0x58, 0x58) AM_READ(input_port_0_r) /* V-Blank/Coin/Start */ | |
| 209 | AM_RANGE(0x50, 0x50) AM_READ_PORT("DSWA") | |
| 210 | AM_RANGE(0x52, 0x52) AM_READ_PORT("DSWB") | |
| 211 | AM_RANGE(0x54, 0x54) AM_READ_PORT("P1") | |
| 212 | AM_RANGE(0x56, 0x56) AM_READ_PORT("P2") | |
| 213 | AM_RANGE(0x58, 0x58) AM_READ_PORT("SYSTEM") | |
| 214 | 214 | AM_RANGE(0x5a, 0x5a) AM_WRITE(wardner_coin_dsp_w) /* Machine system control */ |
| 215 | 215 | AM_RANGE(0x5c, 0x5c) AM_WRITE(wardner_control_w) /* Machine system control */ |
| 216 | 216 | AM_RANGE(0x60, 0x65) AM_READWRITE(wardner_videoram_r, wardner_videoram_w) /* data from video layer RAM */ |
| r3171 | r3172 | |
| 271 | 271 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(player) /* Shot C */ \ |
| 272 | 272 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(player) /* Shot D */ |
| 273 | 273 | |
| 274 | #define WARDNER_SYSTEM_INPUTS \ | |
| 275 | PORT_START("SYSTEM") /* test button doesnt seem to do anything ? */ \ | |
| 276 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 ) /* Service button */ \ | |
| 277 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT ) \ | |
| 278 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* Test button */ \ | |
| 279 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) \ | |
| 280 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) \ | |
| 281 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) \ | |
| 282 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) \ | |
| 274 | static INPUT_PORTS_START( wardner ) | |
| 275 | PORT_START("SYSTEM") /* test button doesnt seem to do anything ? */ | |
| 276 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 ) /* Service button */ | |
| 277 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT ) | |
| 278 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* Test button */ | |
| 279 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 280 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 281 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 282 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 283 | 283 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) /* V-Blank */ |
| 284 | 284 | |
| 285 | #define PYROS_DSW_A \ | |
| 286 | PORT_START("DSWA") /* DSW A */ \ | |
| 287 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) \ | |
| 288 | PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) \ | |
| 289 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) \ | |
| 290 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) \ | |
| 291 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ | |
| 292 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) \ | |
| 293 | PORT_DIPNAME( 0x04, 0x00, "Cross Hatch Pattern" ) \ | |
| 294 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ | |
| 295 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) \ | |
| 296 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) \ | |
| 297 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) \ | |
| 298 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ | |
| 299 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) \ | |
| 300 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ | |
| 301 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \ | |
| 302 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) \ | |
| 303 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) \ | |
| 304 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) \ | |
| 305 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \ | |
| 306 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \ | |
| 307 | PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) ) \ | |
| 308 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) | |
| 309 | ||
| 310 | #define WARDNER_DSW_B \ | |
| 311 | PORT_START("DSWB") /* DSW B */ \ | |
| 312 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) \ | |
| 313 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) \ | |
| 314 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) \ | |
| 315 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) \ | |
| 316 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) \ | |
| 317 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) \ | |
| 318 | PORT_DIPSETTING( 0x00, "30000 & 80000" ) \ | |
| 319 | PORT_DIPSETTING( 0x04, "50000 & 100000" ) \ | |
| 320 | PORT_DIPSETTING( 0x08, "30000" ) \ | |
| 321 | PORT_DIPSETTING( 0x0c, "50000" ) \ | |
| 322 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) \ | |
| 323 | PORT_DIPSETTING( 0x30, "1" ) \ | |
| 324 | PORT_DIPSETTING( 0x00, "3" ) \ | |
| 325 | PORT_DIPSETTING( 0x10, "4" ) \ | |
| 326 | PORT_DIPSETTING( 0x20, "5" ) \ | |
| 327 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) \ | |
| 328 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ | |
| 329 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) \ | |
| 330 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) \ | |
| 331 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ | |
| 332 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 333 | ||
| 334 | ||
| 335 | ||
| 336 | static INPUT_PORTS_START( wardner ) | |
| 337 | WARDNER_SYSTEM_INPUTS | |
| 338 | ||
| 339 | 285 | PORT_START("P1") |
| 340 | 286 | WARDNER_PLAYER_INPUT( 1 ) |
| 341 | 287 | |
| 342 | 288 | PORT_START("P2") |
| 343 | 289 | WARDNER_PLAYER_INPUT( 2 ) |
| 344 | 290 | |
| 345 | PORT_START("DSWA") | |
| 291 | PORT_START("DSWA") | |
| 346 | 292 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) |
| 347 | 293 | PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) |
| 348 | 294 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r3171 | r3172 | |
| 366 | 312 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 367 | 313 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 368 | 314 | |
| 369 | WARDNER_DSW_B | |
| 370 | INPUT_PORTS_END | |
| 371 | ||
| 372 | static INPUT_PORTS_START( pyros ) | |
| 373 | WARDNER_SYSTEM_INPUTS | |
| 374 | ||
| 375 | PORT_START("P1") | |
| 376 | WARDNER_PLAYER_INPUT( 1 ) | |
| 377 | ||
| 378 | PORT_START("P2") | |
| 379 | WARDNER_PLAYER_INPUT( 2 ) | |
| 380 | ||
| 381 | PYROS_DSW_A | |
| 382 | ||
| 383 | PORT_START("DSWB") /* DSW B */ | |
| 315 | PORT_START("DSWB") | |
| 384 | 316 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) |
| 385 | 317 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) |
| 386 | 318 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| r3171 | r3172 | |
| 396 | 328 | PORT_DIPSETTING( 0x00, "3" ) |
| 397 | 329 | PORT_DIPSETTING( 0x10, "4" ) |
| 398 | 330 | PORT_DIPSETTING( 0x20, "5" ) |
| 399 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) | |
| 400 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) | |
| 401 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 331 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 332 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 333 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 402 | 334 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) |
| 403 | 335 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 404 | 336 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 405 | 337 | INPUT_PORTS_END |
| 406 | 338 | |
| 407 | 339 | static INPUT_PORTS_START( wardnerj ) |
| 408 | | |
| 340 | POR | |
| 409 | 341 | |
| 410 | PORT_START("P1") | |
| 411 | WARDNER_PLAYER_INPUT( 1 ) | |
| 342 | PORT_MODIFY("DSWA") | |
| 343 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) | |
| 344 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) | |
| 345 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 346 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) | |
| 347 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) | |
| 348 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) | |
| 349 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) | |
| 350 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 351 | PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) ) | |
| 352 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) | |
| 353 | INPUT_PORTS_END | |
| 412 | 354 | |
| 413 | PORT_START("P2") | |
| 414 | WARDNER_PLAYER_INPUT( 2 ) | |
| 355 | static INPUT_PORTS_START( pyros ) | |
| 356 | PORT_INCLUDE( wardner ) | |
| 415 | 357 | |
| 416 | PYROS_DSW_A | |
| 358 | PORT_MODIFY("DSWA") | |
| 359 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) | |
| 360 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) | |
| 361 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 362 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) | |
| 363 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) | |
| 364 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) | |
| 365 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) | |
| 366 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 367 | PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) ) | |
| 368 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) | |
| 417 | 369 | |
| 418 | WARDNER_DSW_B | |
| 370 | PORT_MODIFY("DSWB") | |
| 371 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) | |
| 372 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) | |
| 373 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 419 | 374 | INPUT_PORTS_END |
| 420 | 375 | |
| 421 | 376 |
| r3171 | r3172 | |
|---|---|---|
| 153 | 153 | AM_RANGE(0xc000, 0xc3ff) AM_WRITE(SMH_RAM) /* work ram */ |
| 154 | 154 | ADDRESS_MAP_END |
| 155 | 155 | |
| 156 | static ADDRESS_MAP_START( sound_ | |
| 156 | static ADDRESS_MAP_START( sound_io_ma | |
| 157 | 157 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 158 | AM_RANGE(0x08, 0x08) AM_READ(ay8910_read_port_0_r) | |
| 159 | ADDRESS_MAP_END | |
| 160 | ||
| 161 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 162 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 163 | 158 | AM_RANGE(0x00, 0x00) AM_WRITE(dac_0_data_w) |
| 164 | AM_RANGE(0x08, 0x08) AM_WRITE(ay8910_write_port_0_w) | |
| 159 | AM_RANGE(0x08, 0x08) AM_READWRITE(ay8910_read_port_0_r, ay8910_write_port_0_w) | |
| 165 | 160 | AM_RANGE(0x0c, 0x0c) AM_WRITE(ay8910_control_port_0_w) |
| 166 | 161 | ADDRESS_MAP_END |
| 167 | 162 | |
| r3171 | r3172 | |
| 229 | 224 | AM_RANGE(0xa400, 0xa43f) AM_WRITE(SMH_RAM) /* something related to scroll? */ |
| 230 | 225 | ADDRESS_MAP_END |
| 231 | 226 | |
| 232 | static ADDRESS_MAP_START( rk_sound_ | |
| 227 | static ADDRESS_MAP_START( rk_sound_io_ma | |
| 233 | 228 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 234 | AM_RANGE(0x02, 0x02) AM_READ(ay8910_read_port_0_r) | |
| 235 | ADDRESS_MAP_END | |
| 236 | ||
| 237 | static ADDRESS_MAP_START( rk_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 238 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 239 | 229 | AM_RANGE(0x00, 0x00) AM_WRITE(dac_0_data_w) |
| 240 | AM_RANGE(0x02, 0x02) AM_WRITE(ay8910_write_port_0_w) | |
| 230 | AM_RANGE(0x02, 0x02) AM_READWRITE(ay8910_read_port_0_r, ay8910_write_port_0_w) | |
| 241 | 231 | AM_RANGE(0x03, 0x03) AM_WRITE(ay8910_control_port_0_w) |
| 242 | 232 | ADDRESS_MAP_END |
| 243 | 233 | |
| r3171 | r3172 | |
| 566 | 556 | |
| 567 | 557 | MDRV_CPU_ADD("audio", Z80, 4000000) /* 4.0 MHz */ |
| 568 | 558 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 569 | MDRV_CPU_IO_MAP(sound_ | |
| 559 | MDRV_CPU_IO_MAP(sound_i | |
| 570 | 560 | MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 6000) /* Hz */ |
| 571 | 561 | |
| 572 | 562 | MDRV_INTERLEAVE(100) /* We really need heavy synching among the processors */ |
| r3171 | r3172 | |
| 616 | 606 | |
| 617 | 607 | MDRV_CPU_ADD("audio", Z80, 4000000) /* 4.0 MHz */ |
| 618 | 608 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 619 | MDRV_CPU_IO_MAP(rk_sound_ | |
| 609 | MDRV_CPU_IO_MAP(rk_sound_i | |
| 620 | 610 | MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 6000) /* Hz */ |
| 621 | 611 | |
| 622 | 612 | MDRV_INTERLEAVE(100) /* We really need heavy synching among the processors */ |
| r3171 | r3172 | |
| 898 | 888 | GAME( 1985, ringkin2, kingofb, ringking, ringking, 0, ROT90, "Data East USA", "Ring King (US set 2)", 0 ) |
| 899 | 889 | GAME( 1985, ringkin3, kingofb, kingofb, kingofb, ringkin3, ROT90, "Data East USA", "Ring King (US set 3)", 0 ) |
| 900 | 890 | GAME( 1985, ringkinw, kingofb, kingofb, kingofb, ringkinw, ROT90, "Woodplace", "Ring King (US, Woodplace license)", 0 ) |
| 891 |
| r3171 | r3172 | |
|---|---|---|
| 123 | 123 | AM_RANGE(0xe200, 0xffff) AM_WRITE(SMH_RAM) |
| 124 | 124 | ADDRESS_MAP_END |
| 125 | 125 | |
| 126 | ||
| 127 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 126 | static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) | |
| 128 | 127 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 129 | 128 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") |
| 130 | 129 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") |
| 131 | 130 | AM_RANGE(0x02, 0x02) AM_READ_PORT("SYSTEM") |
| 132 | 131 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") |
| 133 | 132 | AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW2") |
| 134 | AM_RANGE(0xc0, 0xc0) AM_READ(IO_port_c0_r) /* dangar needs to return 0x58 */ | |
| 135 | ADDRESS_MAP_END | |
| 136 | ||
| 137 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 138 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 139 | 133 | AM_RANGE(0x40, 0x40) AM_WRITE(galivan_gfxbank_w) |
| 140 | 134 | AM_RANGE(0x41, 0x42) AM_WRITE(galivan_scrollx_w) |
| 141 | 135 | AM_RANGE(0x43, 0x44) AM_WRITE(galivan_scrolly_w) |
| 142 | 136 | AM_RANGE(0x45, 0x45) AM_WRITE(galivan_sound_command_w) |
| 143 | 137 | /* AM_RANGE(0x46, 0x46) AM_WRITE(SMH_NOP) */ |
| 144 | 138 | /* AM_RANGE(0x47, 0x47) AM_WRITE(SMH_NOP) */ |
| 139 | AM_RANGE(0xc0, 0xc0) AM_READ(IO_port_c0_r) /* dangar needs to return 0x58 */ | |
| 145 | 140 | ADDRESS_MAP_END |
| 146 | 141 | |
| 147 | static ADDRESS_MAP_START( ninjemak_ | |
| 142 | static ADDRESS_MAP_START( ninjemak_io_ma | |
| 148 | 143 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 149 | AM_RANGE(0x80, 0x80) AM_READ_PORT("P1") | |
| 144 | AM_RANGE(0x80, 0x80) AM_READ_PORT("P1") AM_WRITE(ninjemak_gfxbank_w) | |
| 150 | 145 | AM_RANGE(0x81, 0x81) AM_READ_PORT("P2") |
| 151 | 146 | AM_RANGE(0x82, 0x82) AM_READ_PORT("SYSTEM") |
| 152 | 147 | AM_RANGE(0x83, 0x83) AM_READ_PORT("SERVICE") |
| 153 | 148 | AM_RANGE(0x84, 0x84) AM_READ_PORT("DSW1") |
| 154 | AM_RANGE(0x85, 0x85) AM_READ_PORT("DSW2") | |
| 155 | ADDRESS_MAP_END | |
| 156 | ||
| 157 | static ADDRESS_MAP_START( ninjemak_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 158 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 159 | AM_RANGE(0x80, 0x80) AM_WRITE(ninjemak_gfxbank_w) | |
| 160 | AM_RANGE(0x85, 0x85) AM_WRITE(galivan_sound_command_w) | |
| 149 | AM_RANGE(0x85, 0x85) AM_READ_PORT("DSW2") AM_WRITE(galivan_sound_command_w) | |
| 161 | 150 | // AM_RANGE(0x86, 0x86) AM_WRITE(SMH_NOP) // ?? |
| 162 | 151 | // AM_RANGE(0x87, 0x87) AM_WRITE(SMH_NOP) // ?? |
| 163 | 152 | ADDRESS_MAP_END |
| 164 | 153 | |
| 165 | ||
| 166 | 154 | static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 167 | 155 | AM_RANGE(0x0000, 0xbfff) AM_READ(SMH_ROM) |
| 168 | 156 | AM_RANGE(0xc000, 0xc7ff) AM_READ(SMH_RAM) |
| r3171 | r3172 | |
| 173 | 161 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(SMH_RAM) |
| 174 | 162 | ADDRESS_MAP_END |
| 175 | 163 | |
| 176 | ||
| 177 | static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 ) | |
| 164 | static ADDRESS_MAP_START( sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 178 | 165 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 179 | /* AM_RANGE(0x04, 0x04) AM_READ(SMH_NOP) value read and *discarded* */ | |
| 180 | AM_RANGE(0x06, 0x06) AM_READ(galivan_sound_command_r) | |
| 181 | ADDRESS_MAP_END | |
| 182 | ||
| 183 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 184 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 185 | 166 | AM_RANGE(0x00, 0x00) AM_WRITE(ym3526_control_port_0_w) |
| 186 | 167 | AM_RANGE(0x01, 0x01) AM_WRITE(ym3526_write_port_0_w) |
| 187 | 168 | AM_RANGE(0x02, 0x02) AM_WRITE(dac_0_data_w) |
| 188 | 169 | AM_RANGE(0x03, 0x03) AM_WRITE(dac_1_data_w) |
| 170 | /* AM_RANGE(0x04, 0x04) AM_READ(SMH_NOP) value read and *discarded* */ | |
| 171 | AM_RANGE(0x06, 0x06) AM_READ(galivan_sound_command_r) | |
| 189 | 172 | ADDRESS_MAP_END |
| 190 | 173 | |
| 191 | 174 | |
| r3171 | r3172 | |
| 458 | 441 | /* basic machine hardware */ |
| 459 | 442 | MDRV_CPU_ADD("main", Z80,12000000/2) /* 6 MHz? */ |
| 460 | 443 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 461 | MDRV_CPU_IO_MAP( | |
| 444 | MDRV_CPU_IO_MAP(io_ma | |
| 462 | 445 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 463 | 446 | |
| 464 | 447 | MDRV_CPU_ADD("audio", Z80,8000000/2) /* 4 MHz? */ |
| 465 | 448 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 466 | MDRV_CPU_IO_MAP(sound_ | |
| 449 | MDRV_CPU_IO_MAP(sound_i | |
| 467 | 450 | MDRV_CPU_PERIODIC_INT(irq0_line_hold, 7250) /* timed interrupt, ?? Hz */ |
| 468 | 451 | |
| 469 | 452 | MDRV_MACHINE_RESET(galivan) |
| r3171 | r3172 | |
| 501 | 484 | /* basic machine hardware */ |
| 502 | 485 | MDRV_CPU_ADD("main", Z80,12000000/2) /* 6 MHz? */ |
| 503 | 486 | MDRV_CPU_PROGRAM_MAP(readmem,ninjemak_writemem) |
| 504 | MDRV_CPU_IO_MAP(ninjemak_ | |
| 487 | MDRV_CPU_IO_MAP(ninjemak_ | |
| 505 | 488 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 506 | 489 | |
| 507 | 490 | MDRV_CPU_ADD("audio", Z80,8000000/2) /* 4 MHz? */ |
| 508 | 491 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 509 | MDRV_CPU_IO_MAP(sound_ | |
| 492 | MDRV_CPU_IO_MAP(sound_i | |
| 510 | 493 | MDRV_CPU_PERIODIC_INT(irq0_line_hold, 7250) /* timed interrupt, ?? Hz */ |
| 511 | 494 | |
| 512 | 495 | MDRV_MACHINE_RESET(galivan) |
| r3171 | r3172 | |
| 1026 | 1009 | GAME( 1986, youmab, ninjemak, ninjemak, ninjemak, youmab, ROT270, "bootleg", "Youma Ninpou Chou (Game Electronics bootleg, set 1)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE ) // scrolling doesn't work |
| 1027 | 1010 | GAME( 1986, youmab2, ninjemak, ninjemak, ninjemak, youmab, ROT270, "bootleg", "Youma Ninpou Chou (Game Electronics bootleg, set 2)", GAME_NOT_WORKING|GAME_SUPPORTS_SAVE ) // scrolling doesn't work |
| 1028 | 1011 | |
| 1012 |
| r3171 | r3172 | |
|---|---|---|
| 191 | 191 | AM_RANGE(0x8000, 0xffff) AM_WRITE(SMH_ROM) |
| 192 | 192 | ADDRESS_MAP_END |
| 193 | 193 | |
| 194 | static ADDRESS_MAP_START( sound_ | |
| 194 | static ADDRESS_MAP_START( sound_io_ma | |
| 195 | 195 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 196 | AM_RANGE(0x14, 0x14) AM_READ(soundlatch_r) | |
| 197 | AM_RANGE(0x18, 0x18) AM_READ(ym2610_status_port_0_a_r) | |
| 198 | AM_RANGE(0x1a, 0x1a) AM_READ(ym2610_status_port_0_b_r) | |
| 199 | ADDRESS_MAP_END | |
| 200 | ||
| 201 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 202 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 203 | 196 | AM_RANGE(0x00, 0x00) AM_WRITE(f1gp_sh_bankswitch_w) // f1gp |
| 204 | 197 | AM_RANGE(0x0c, 0x0c) AM_WRITE(f1gp_sh_bankswitch_w) // f1gp2 |
| 205 | AM_RANGE(0x14, 0x14) AM_WRITE(pending_command_clear_w) | |
| 206 | AM_RANGE(0x18, 0x18) AM_WRITE(ym2610_control_port_0_a_w) | |
| 198 | AM_RANGE(0x14, 0x14) AM_READWRITE(soundlatch_r, pending_command_clear_w) | |
| 199 | AM_RANGE(0x18, 0x18) AM_READWRITE(ym2610_status_port_0_a_r, ym2610_control_port_0_a_w) | |
| 207 | 200 | AM_RANGE(0x19, 0x19) AM_WRITE(ym2610_data_port_0_a_w) |
| 208 | AM_RANGE(0x1a, 0x1a) AM_WRITE(ym2610_control_port_0_b_w) | |
| 201 | AM_RANGE(0x1a, 0x1a) AM_READWRITE(ym2610_status_port_0_b_r, ym2610_control_port_0_b_w) | |
| 209 | 202 | AM_RANGE(0x1b, 0x1b) AM_WRITE(ym2610_data_port_0_b_w) |
| 210 | 203 | ADDRESS_MAP_END |
| 211 | 204 | |
| r3171 | r3172 | |
| 488 | 481 | |
| 489 | 482 | MDRV_CPU_ADD("audio", Z80,XTAL_20MHz/4) /* verified on pcb */ |
| 490 | 483 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 491 | MDRV_CPU_IO_MAP(sound_ | |
| 484 | MDRV_CPU_IO_MAP(sound_i | |
| 492 | 485 | |
| 493 | 486 | MDRV_INTERLEAVE(100) /* 100 CPU slices per frame */ |
| 494 | 487 | |
| r3171 | r3172 | |
| 721 | 714 | GAME( 1991, f1gpb, f1gp, f1gpb, f1gp, 0, ROT90, "[Video System Co.] (Playmark bootleg)", "F-1 Grand Prix (Playmark bootleg)", GAME_NOT_WORKING ) // PCB marked 'Super Formula II', manufactured by Playmark. |
| 722 | 715 | |
| 723 | 716 | GAME( 1992, f1gp2, 0, f1gp2, f1gp2, 0, ROT90, "Video System Co.", "F-1 Grand Prix Part II", GAME_NO_COCKTAIL ) |
| 717 |
| r3171 | r3172 | |
|---|---|---|
| 542 | 542 | memory_set_bankptr( 1, memory_region(machine, "audio") + ((data-2) & 0x0f) * 0x4000 + 0x10000 ); |
| 543 | 543 | } |
| 544 | 544 | |
| 545 | static WRITE8_HANDLER( tecmosys_oki_bank_w ) | |
| 546 | { | |
| 547 | UINT8 upperbank = (data & 0x30) >> 4; | |
| 548 | UINT8 lowerbank = (data & 0x03) >> 0; | |
| 549 | UINT8* region = memory_region(machine, "oki"); | |
| 550 | ||
| 551 | memcpy( region+0x00000, region+0x80000 + lowerbank * 0x20000, 0x20000 ); | |
| 552 | memcpy( region+0x20000, region+0x80000 + upperbank * 0x20000, 0x20000 ); | |
| 553 | } | |
| 554 | ||
| 545 | 555 | static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 546 | 556 | AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) |
| 547 | 557 | AM_RANGE(0x8000, 0xbfff) AM_READ(SMH_BANK1) |
| r3171 | r3172 | |
| 553 | 563 | AM_RANGE(0xe000, 0xf7ff) AM_WRITE(SMH_RAM) |
| 554 | 564 | ADDRESS_MAP_END |
| 555 | 565 | |
| 556 | static ADDRESS_MAP_START( | |
| 566 | static ADDRESS_MAP_START( io_ma | |
| 557 | 567 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 558 | AM_RANGE(0x00, 0x00) AM_READ(ymf262_status_0_r) | |
| 559 | AM_RANGE(0x40, 0x40) AM_READ(soundlatch_r) | |
| 560 | AM_RANGE(0x60, 0x60) AM_READ(ymz280b_status_0_r) | |
| 561 | ADDRESS_MAP_END | |
| 562 | ||
| 563 | ||
| 564 | static WRITE8_HANDLER( tecmosys_oki_bank_w ) | |
| 565 | { | |
| 566 | UINT8 upperbank = (data & 0x30) >> 4; | |
| 567 | UINT8 lowerbank = (data & 0x03) >> 0; | |
| 568 | UINT8* region = memory_region(machine, "oki"); | |
| 569 | ||
| 570 | memcpy( region+0x00000, region+0x80000 + lowerbank * 0x20000, 0x20000 ); | |
| 571 | memcpy( region+0x20000, region+0x80000 + upperbank * 0x20000, 0x20000 ); | |
| 572 | } | |
| 573 | ||
| 574 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 575 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 576 | AM_RANGE(0x00, 0x00) AM_WRITE(ymf262_register_a_0_w) | |
| 568 | AM_RANGE(0x00, 0x00) AM_READWRITE(ymf262_status_0_r, ymf262_register_a_0_w) | |
| 577 | 569 | AM_RANGE(0x01, 0x01) AM_WRITE(ymf262_data_a_0_w) |
| 578 | 570 | AM_RANGE(0x02, 0x02) AM_WRITE(ymf262_register_b_0_w) |
| 579 | 571 | AM_RANGE(0x03, 0x03) AM_WRITE(ymf262_data_b_0_w) |
| 580 | ||
| 581 | 572 | AM_RANGE(0x10, 0x10) AM_WRITE(okim6295_data_0_w) |
| 582 | 573 | AM_RANGE(0x20, 0x20) AM_WRITE(tecmosys_oki_bank_w) |
| 583 | ||
| 584 | 574 | AM_RANGE(0x30, 0x30) AM_WRITE(deroon_bankswitch_w) |
| 585 | ||
| 575 | AM_RANGE(0x40, 0x40) AM_READ(soundlatch_r) | |
| 586 | 576 | AM_RANGE(0x50, 0x50) AM_WRITE(soundlatch2_w) |
| 587 | ||
| 588 | AM_RANGE(0x60, 0x60) AM_WRITE(ymz280b_register_0_w) | |
| 577 | AM_RANGE(0x60, 0x60) AM_READWRITE(ymz280b_status_0_r, ymz280b_register_0_w) | |
| 589 | 578 | AM_RANGE(0x61, 0x61) AM_WRITE(ymz280b_data_0_w) |
| 590 | 579 | ADDRESS_MAP_END |
| 591 | 580 | |
| 581 | ||
| 592 | 582 | static VIDEO_START(deroon) |
| 593 | 583 | { |
| 594 | 584 | sprite_bitmap = auto_bitmap_alloc(320,240,BITMAP_FORMAT_INDEXED16); |
| r3171 | r3172 | |
| 918 | 908 | |
| 919 | 909 | MDRV_CPU_ADD("audio", Z80, 16000000/2 ) /* 8 MHz ??? */ |
| 920 | 910 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 921 | MDRV_CPU_IO_MAP( | |
| 911 | MDRV_CPU_IO_MAP(io_ma | |
| 922 | 912 | |
| 923 | 913 | MDRV_GFXDECODE(tecmosys) |
| 924 | 914 | |
| r3171 | r3172 | |
| 1140 | 1130 | GAME( 1995, deroon, 0, deroon, deroon, deroon, ROT0, "Tecmo", "Deroon DeroDero", 0 ) |
| 1141 | 1131 | GAME( 1996, tkdensho, 0, deroon, deroon, tkdensho, ROT0, "Tecmo", "Touki Denshou -Angel Eyes- (VER. 960614)", 0 ) |
| 1142 | 1132 | GAME( 1996, tkdensha, tkdensho, deroon, deroon, tkdensha, ROT0, "Tecmo", "Touki Denshou -Angel Eyes- (VER. 960427)", 0 ) |
| 1133 |
| r3171 | r3172 | |
|---|---|---|
| 750 | 750 | } |
| 751 | 751 | } |
| 752 | 752 | |
| 753 | static ADDRESS_MAP_START( megaplay_bios_readport, ADDRESS_SPACE_IO, 8 ) | |
| 754 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 755 | // AM_RANGE(0xdc, 0xdc) AM_READ(megatech_bios_port_dc_r) // player inputs | |
| 756 | // AM_RANGE(0xdd, 0xdd) AM_READ(megatech_bios_port_dd_r) // other player 2 inputs | |
| 757 | AM_RANGE(0xbe, 0xbf) AM_READ(megaplay_bios_port_be_bf_r) /* VDP */ | |
| 758 | ADDRESS_MAP_END | |
| 759 | 753 | |
| 760 | static ADDRESS_MAP_START( megaplay_bios_ | |
| 754 | static ADDRESS_MAP_START( megaplay_bios_ | |
| 761 | 755 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 762 | 756 | // AM_RANGE(0x3f, 0x3f) AM_WRITE(megatech_bios_port_ctrl_w) |
| 763 | 757 | AM_RANGE(0x7f, 0x7f) AM_WRITE(sn76496_1_w) /* SN76489 */ |
| 764 | AM_RANGE(0xbe, 0xbf) AM_WRITE(megaplay_bios_port_be_bf_w) /* VDP */ | |
| 758 | // AM_RANGE(0xdc, 0xdc) AM_READ(megatech_bios_port_dc_r) // player inputs | |
| 759 | // AM_RANGE(0xdd, 0xdd) AM_READ(megatech_bios_port_dd_r) // other player 2 inputs | |
| 760 | AM_RANGE(0xbe, 0xbf) AM_READWRITE(megaplay_bios_port_be_bf_r, megaplay_bios_port_be_bf_w) /* VDP */ | |
| 765 | 761 | ADDRESS_MAP_END |
| 766 | 762 | |
| 767 | ||
| 768 | 763 | /* in video/segasyse.c */ |
| 769 | 764 | VIDEO_START( megaplay_normal ); |
| 770 | 765 | VIDEO_UPDATE( megaplay_normal ); |
| r3171 | r3172 | |
| 796 | 791 | which includes an SN76496 for sound */ |
| 797 | 792 | MDRV_CPU_ADD("megaplay_bios", Z80, MASTER_CLOCK / 15) /* ?? */ |
| 798 | 793 | MDRV_CPU_PROGRAM_MAP(megaplay_bios_readmem, megaplay_bios_writemem) |
| 799 | MDRV_CPU_IO_MAP(megaplay_bios_ | |
| 794 | MDRV_CPU_IO_MAP(megaplay_bios_i | |
| 800 | 795 | MDRV_CPU_VBLANK_INT_HACK(megaplay_bios_irq, 262) |
| 801 | 796 | |
| 802 | 797 | MDRV_INTERLEAVE(100) |
| r3171 | r3172 | |
| 1079 | 1074 | the numbering prior to 'Streets of Rage 2' |
| 1080 | 1075 | |
| 1081 | 1076 | */ |
| 1077 |
| r3171 | r3172 | |
|---|---|---|
| 38 | 38 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(SMH_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 39 | 39 | ADDRESS_MAP_END |
| 40 | 40 | |
| 41 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 42 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 43 | AM_RANGE(0x00, 0x00) AM_READ_PORT("INPUTS") | |
| 44 | ADDRESS_MAP_END | |
| 45 | 41 | |
| 46 | static ADDRESS_MAP_START( | |
| 42 | static ADDRESS_MAP_START( | |
| 47 | 43 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 48 | AM_RANGE(0x00, 0x00) AM_WRITE(dotrikun_color_w) | |
| 44 | AM_RANGE(0x00, 0x00) AM_READ_PORT("INPUTS") AM_WRITE(dotrikun_color_w) | |
| 49 | 45 | ADDRESS_MAP_END |
| 50 | 46 | |
| 51 | ||
| 52 | 47 | static INPUT_PORTS_START( dotrikun ) |
| 53 | 48 | PORT_START("INPUTS") |
| 54 | 49 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) |
| r3171 | r3172 | |
| 67 | 62 | /* basic machine hardware */ |
| 68 | 63 | MDRV_CPU_ADD("main", Z80, 4000000) /* 4 MHz */ |
| 69 | 64 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 70 | MDRV_CPU_IO_MAP( | |
| 65 | MDRV_CPU_IO_MAP(io_ma | |
| 71 | 66 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 72 | 67 | |
| 73 | 68 | /* video hardware */ |
| r3171 | r3172 | |
| 103 | 98 | |
| 104 | 99 | GAME( 1990, dotrikun, 0, dotrikun, dotrikun, 0, ROT0, "Sega", "Dottori Kun (new version)", GAME_NO_SOUND ) |
| 105 | 100 | GAME( 1990, dotriku2, dotrikun, dotrikun, dotrikun, 0, ROT0, "Sega", "Dottori Kun (old version)", GAME_NO_SOUND ) |
| 101 |
| r3171 | r3172 | |
|---|---|---|
| 266 | 266 | { |
| 267 | 267 | int i; |
| 268 | 268 | |
| 269 | NVRAM_HANDLER_CALL(timekeeper_0); | |
| 270 | ||
| 271 | 269 | if( nvram_handler_security_cart_0 != NULL ) |
| 272 | 270 | { |
| 273 | 271 | NVRAM_HANDLER_CALL(security_cart_0); |
| r3171 | r3172 | |
| 1299 | 1297 | AM_RANGE(0x1f500000, 0x1f500003) AM_READWRITE( control_r, control_w ) // Konami can't make a game without a "control" register. |
| 1300 | 1298 | AM_RANGE(0x1f560000, 0x1f560003) AM_WRITE( atapi_reset_w ) |
| 1301 | 1299 | AM_RANGE(0x1f5c0000, 0x1f5c0003) AM_WRITENOP // watchdog? |
| 1302 | AM_RANGE(0x1f620000, 0x1f623fff) AM_READWRITE8(timekeeper_ | |
| 1300 | AM_RANGE(0x1f620000, 0x1f623fff) AM_DEVREADWRITE8(M48T58, "m48t58", timekeeper_ | |
| 1303 | 1301 | AM_RANGE(0x1f680000, 0x1f68001f) AM_READWRITE(mb89371_r, mb89371_w) |
| 1304 | 1302 | AM_RANGE(0x1f6a0000, 0x1f6a0003) AM_READWRITE( security_r, security_w ) |
| 1305 | 1303 | AM_RANGE(0x1f800000, 0x1f8003ff) AM_RAM /* scratchpad */ |
| r3171 | r3172 | |
| 1503 | 1501 | m_p_timer_root[i] = timer_alloc(root_finished, NULL); |
| 1504 | 1502 | } |
| 1505 | 1503 | |
| 1506 | timekeeper_init( machine, 0, TIMEKEEPER_M48T58, memory_region( machine, "user11" ) ); | |
| 1507 | ||
| 1508 | 1504 | state_save_register_global( m_n_security_control ); |
| 1509 | 1505 | |
| 1510 | 1506 | security_cart_init( machine, 0, "user2", "user9" ); |
| r3171 | r3172 | |
| 2722 | 2718 | state_save_register_global( salarymc_lamp_clk ); |
| 2723 | 2719 | } |
| 2724 | 2720 | |
| 2721 | static const timekeeper_config timekeeper_intf = | |
| 2722 | { | |
| 2723 | "m48t58" | |
| 2724 | }; | |
| 2725 | ||
| 2725 | 2726 | static MACHINE_DRIVER_START( konami573 ) |
| 2726 | 2727 | /* basic machine hardware */ |
| 2727 | 2728 | MDRV_CPU_ADD("main", PSXCPU, XTAL_67_7376MHz ) |
| r3171 | r3172 | |
| 2756 | 2757 | MDRV_SOUND_ADD( "cdda", CDDA, 0 ) |
| 2757 | 2758 | MDRV_SOUND_ROUTE( 0, "left", 1.0 ) |
| 2758 | 2759 | MDRV_SOUND_ROUTE( 1, "right", 1.0 ) |
| 2760 | ||
| 2761 | MDRV_DEVICE_ADD( "m48t58", M48T58 ) | |
| 2762 | MDRV_DEVICE_CONFIG( timekeeper_intf ) | |
| 2759 | 2763 | MACHINE_DRIVER_END |
| 2760 | 2764 | |
| 2761 | 2765 | static INPUT_PORTS_START( konami573 ) |
| r3171 | r3172 | |
| 3500 | 3504 | ROM_REGION( 0x000008, "user10", 0 ) /* game security cart id */ |
| 3501 | 3505 | ROM_LOAD( "gca34ja.u6", 0x000000, 0x000008, BAD_DUMP CRC(ce84419e) SHA1(839e8ee080ecfc79021a06417d930e8b32dfc6a1) ) |
| 3502 | 3506 | |
| 3503 | ROM_REGION( 0x002000, " | |
| 3507 | ROM_REGION( 0x002000, "m48t58", 0 ) /* timekeeper */ | |
| 3504 | 3508 | ROM_LOAD( "gca34ja.22h", 0x000000, 0x002000, CRC(80575c1f) SHA1(a0594ca0f75bc7d49b645e835e9fa48a73c3c9c7) ) |
| 3505 | 3509 | |
| 3506 | 3510 | DISK_REGION( "cdrom0" ) |
| r3171 | r3172 | |
| 3529 | 3533 | ROM_REGION( 0x000008, "user10", 0 ) /* game security cart id */ |
| 3530 | 3534 | ROM_LOAD( "gca34jb.u6", 0x000000, 0x000008, BAD_DUMP CRC(ce84419e) SHA1(839e8ee080ecfc79021a06417d930e8b32dfc6a1) ) |
| 3531 | 3535 | |
| 3532 | ROM_REGION( 0x002000, " | |
| 3536 | ROM_REGION( 0x002000, "m48t58", 0 ) /* timekeeper */ | |
| 3533 | 3537 | ROM_LOAD( "gca34jb.22h", 0x000000, 0x002000, CRC(bc6c8bd7) SHA1(10ceec5c7bc5ca9fca88f3c083a7d97012982079) ) |
| 3534 | 3538 | |
| 3535 | 3539 | DISK_REGION( "cdrom0" ) |
| r3171 | r3172 | |
| 3708 | 3712 | ROM_LOAD( "gq881ja.31h", 0xc00000, 0x200000, CRC(a5b86ece) SHA1(9696f0c512501574bae6e436306675894bb2352e) ) |
| 3709 | 3713 | ROM_LOAD( "gq881ja.27h", 0xe00000, 0x200000, CRC(fc0b94c1) SHA1(967d374288db757d161d0e9e8e396a1176071c5f) ) |
| 3710 | 3714 | |
| 3711 | ROM_REGION( 0x002000, " | |
| 3715 | ROM_REGION( 0x002000, "m48t58", 0 ) /* timekeeper */ | |
| 3712 | 3716 | ROM_LOAD( "gq881ja.22h", 0x000000, 0x002000, CRC(e834d5ec) SHA1(1c845811e43d7dfec657da288b5a38b8bc9c8366) ) |
| 3713 | 3717 | |
| 3714 | 3718 | DISK_REGION( "cdrom0" ) |
| r3171 | r3172 | |
|---|---|---|
| 105 | 105 | ADDRESS_MAP_END |
| 106 | 106 | |
| 107 | 107 | |
| 108 | static ADDRESS_MAP_START( sound_ | |
| 108 | static ADDRESS_MAP_START( sound_ | |
| 109 | 109 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 110 | 110 | AM_RANGE(0x10, 0x10) AM_WRITE(ay8910_control_port_0_w) |
| 111 | 111 | AM_RANGE(0x11, 0x11) AM_WRITE(ay8910_write_port_0_w) |
| r3171 | r3172 | |
| 271 | 271 | |
| 272 | 272 | MDRV_CPU_ADD("audio", Z80, 3072000) |
| 273 | 273 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 274 | MDRV_CPU_IO_MAP( | |
| 274 | MDRV_CPU_IO_MAP( | |
| 275 | 275 | MDRV_CPU_VBLANK_INT_HACK(pbaction_interrupt,2) /* ??? */ |
| 276 | 276 | /* IRQs are caused by the main CPU */ |
| 277 | 277 |
| r3171 | r3172 | |
|---|---|---|
| 110 | 110 | AM_RANGE(0x0000, 0x07ff) AM_WRITE(SMH_ROM) |
| 111 | 111 | ADDRESS_MAP_END |
| 112 | 112 | |
| 113 | static ADDRESS_MAP_START( sound_ | |
| 113 | static ADDRESS_MAP_START( sound_io_ma | |
| 114 | 114 | AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(soundlatch_r) |
| 115 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(spcforce_SN76496_select_r) | |
| 115 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(spcforce_SN76496_latch_w) | |
| 116 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(spcforce_SN76496_select_r, spcforce_SN76496_select_w) | |
| 116 | 117 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(spcforce_t0_r) |
| 117 | 118 | ADDRESS_MAP_END |
| 118 | 119 | |
| 119 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 120 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(spcforce_SN76496_latch_w) | |
| 121 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(spcforce_SN76496_select_w) | |
| 122 | ADDRESS_MAP_END | |
| 123 | 120 | |
| 124 | ||
| 125 | 121 | static INPUT_PORTS_START( spcforce ) |
| 126 | 122 | PORT_START("DSW") |
| 127 | 123 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coin_A ) ) |
| r3171 | r3172 | |
| 262 | 258 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 263 | 259 | MDRV_CPU_VBLANK_INT("main", irq3_line_hold) |
| 264 | 260 | |
| 265 | MDRV_CPU_ADD("audio", I8035,6144000) /* divisor ??? */ | |
| 261 | MDRV_CPU_ADD("audio", I8035, 6144000) /* divisor ??? */ | |
| 266 | 262 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 267 | MDRV_CPU_IO_MAP(sound_ | |
| 263 | MDRV_CPU_IO_MAP(sound_i | |
| 268 | 264 | |
| 269 | 265 | /* video hardware */ |
| 270 | 266 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 372 | 368 | GAME( 1980, spcforce, 0, spcforce, spcforce, 0, ROT270, "Venture Line", "Space Force (set 1)", GAME_IMPERFECT_COLORS ) |
| 373 | 369 | GAME( 19??, spcforc2, spcforce, spcforce, spcforc2, 0, ROT270, "Elcon (bootleg?)", "Space Force (set 2)", GAME_IMPERFECT_COLORS ) |
| 374 | 370 | GAME( 1981, meteor, spcforce, spcforce, spcforc2, 0, ROT270, "Venture Line", "Meteoroids", GAME_IMPERFECT_COLORS ) |
| 371 |
| r3171 | r3172 | |
|---|---|---|
| 25 | 25 | |
| 26 | 26 | - This hardware is almost identical to that in magic10.c |
| 27 | 27 | |
| 28 | ||
| 29 | [31/08/2008] (Roberto Fresca) | |
| 30 | ||
| 31 | - Added Magic Joker. | |
| 32 | - Fixed the 3rd background offset to Galaxi. | |
| 33 | - Remapped inputs to match the standard poker games. | |
| 34 | ||
| 35 | ||
| 28 | 36 | ***************************************************************************/ |
| 29 | 37 | |
| 30 | 38 | #include "driver.h" |
| r3171 | r3172 | |
| 109 | 117 | |
| 110 | 118 | tilemap_set_transparent_pen(fg_tmap, 0); |
| 111 | 119 | |
| 112 | tilemap_set_scrolldx( bg3_tmap, - | |
| 120 | tilemap_set_scrolldx( bg3_tmap, -8 | |
| 113 | 121 | } |
| 114 | 122 | |
| 115 | 123 | static VIDEO_UPDATE(galaxi) |
| r3171 | r3172 | |
| 117 | 125 | int layers_ctrl = -1; |
| 118 | 126 | |
| 119 | 127 | #ifdef MAME_DEBUG |
| 120 | if (input_code_pressed(KEYCODE_ | |
| 128 | if (input_code_pressed(KEYCODE_R)) // remapped due to inputs changes. | |
| 121 | 129 | { |
| 122 | 130 | int msk = 0; |
| 123 | if (input_code_pressed(KEYCODE_Q)) msk |= 1; | |
| 124 | if (input_code_pressed(KEYCODE_W)) msk |= 2; | |
| 125 | if (input_code_pressed(KEYCODE_E)) msk |= 4; | |
| 126 | if (input_code_pressed(KEYCODE_R)) msk |= 8; | |
| 127 | if (input_code_pressed(KEYCODE_A)) msk |= 16; | |
| 131 | if (input_code_pressed(KEYCODE_T)) msk |= 1; | |
| 132 | if (input_code_pressed(KEYCODE_Y)) msk |= 2; | |
| 133 | if (input_code_pressed(KEYCODE_U)) msk |= 4; | |
| 134 | if (input_code_pressed(KEYCODE_I)) msk |= 8; | |
| 135 | if (input_code_pressed(KEYCODE_O)) msk |= 16; | |
| 128 | 136 | if (msk != 0) layers_ctrl &= msk; |
| 129 | 137 | } |
| 130 | 138 | #endif |
| r3171 | r3172 | |
| 208 | 216 | AM_RANGE( 0x100c00, 0x100fff ) AM_RAM_WRITE( galaxi_bg4_w ) AM_BASE( &bg4_ram ) |
| 209 | 217 | |
| 210 | 218 | AM_RANGE( 0x101000, 0x101fff ) AM_RAM_WRITE( galaxi_fg_w ) AM_BASE( &fg_ram ) |
| 219 | AM_RANGE( 0x102000, 0x1047ff ) AM_READNOP // unknown | |
| 211 | 220 | |
| 212 | 221 | AM_RANGE( 0x300000, 0x3007ff ) AM_RAM_WRITE( paletteram16_xRRRRRGGGGGBBBBB_word_w ) AM_BASE( &paletteram16 ) |
| 213 | 222 | |
| r3171 | r3172 | |
| 228 | 237 | INPUT_PORTS_START( galaxi ) |
| 229 | 238 | |
| 230 | 239 | PORT_START("INPUTS") |
| 231 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Hold 1") | |
| 232 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Hold 2") | |
| 233 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Hold 3") | |
| 234 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Hold 4") | |
| 235 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Hold 5") | |
| 240 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Hold 1") PORT_CODE(KEYCODE_Z) | |
| 241 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Hold 2") PORT_CODE(KEYCODE_X) | |
| 242 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Hold 3") PORT_CODE(KEYCODE_C) | |
| 243 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Hold 4") PORT_CODE(KEYCODE_V) | |
| 244 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Hold 5") PORT_CODE(KEYCODE_B) | |
| 236 | 245 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 ) |
| 237 | 246 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("Pay Out") |
| 238 | 247 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( hopper_r, (void *)0 ) // hopper sensor |
| r3171 | r3172 | |
| 247 | 256 | |
| 248 | 257 | INPUT_PORTS_END |
| 249 | 258 | |
| 259 | INPUT_PORTS_START( magjoker ) | |
| 250 | 260 | |
| 261 | PORT_START("INPUTS") | |
| 262 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Hold 1") PORT_CODE(KEYCODE_Z) | |
| 263 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Hold 2") PORT_CODE(KEYCODE_X) | |
| 264 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Hold 3") PORT_CODE(KEYCODE_C) | |
| 265 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Hold 4") PORT_CODE(KEYCODE_V) | |
| 266 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Hold 5") PORT_CODE(KEYCODE_B) | |
| 267 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 268 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("Pay Out") | |
| 269 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( hopper_r, (void *)0 ) // hopper sensor | |
| 270 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(5) // coin a | |
| 271 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(5) // coin b (token) | |
| 272 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper Refill") PORT_CODE(KEYCODE_H) | |
| 273 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( ticket_r, (void *)0 ) // ticket sensor | |
| 274 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // hopper out (pin 14LS) | |
| 275 | PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_HIGH ) // test | |
| 276 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Key Out") PORT_CODE(KEYCODE_W) // (pin 26LC) | |
| 277 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // (pin 15LS) | |
| 278 | ||
| 279 | INPUT_PORTS_END | |
| 280 | ||
| 281 | ||
| 251 | 282 | /*************************************************************************** |
| 252 | | |
| 283 | | |
| 253 | 284 | ***************************************************************************/ |
| 254 | 285 | |
| 255 | 286 | static const gfx_layout layout_8x8x4 = |
| r3171 | r3172 | |
| 281 | 312 | |
| 282 | 313 | |
| 283 | 314 | /*************************************************************************** |
| 284 | | |
| 315 | | |
| 285 | 316 | ***************************************************************************/ |
| 286 | 317 | |
| 287 | 318 | static MACHINE_DRIVER_START( galaxi ) |
| r3171 | r3172 | |
| 315 | 346 | MACHINE_DRIVER_END |
| 316 | 347 | |
| 317 | 348 | |
| 349 | static MACHINE_DRIVER_START( magjoker ) | |
| 350 | /* basic machine hardware */ | |
| 351 | MDRV_IMPORT_FROM(galaxi) | |
| 352 | ||
| 353 | /* sound hardware */ | |
| 354 | MDRV_SOUND_MODIFY("oki") | |
| 355 | ||
| 356 | /* ADPCM samples are recorded with extremely low volume */ | |
| 357 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 4.0) | |
| 358 | MACHINE_DRIVER_END | |
| 359 | ||
| 360 | ||
| 318 | 361 | /*************************************************************************** |
| 319 | 362 | ROMs Loading |
| 320 | 363 | ***************************************************************************/ |
| r3171 | r3172 | |
| 332 | 375 | ROM_LOAD( "1.u38", 0x00000, 0x40000, CRC(50e289db) SHA1(43c576c014f4c3d22bfa4c932e161d7558d483f6) ) |
| 333 | 376 | ROM_END |
| 334 | 377 | |
| 378 | ROM_START( magjoker ) | |
| 379 | ROM_REGION( 0x40000, "main", 0 ) | |
| 380 | ROM_LOAD16_BYTE( "25.u48", 0x00000, 0x20000, CRC(505bdef2) SHA1(9c2a525f2eb3cc39bdd6219bad7c5a1a8bc0b274) ) | |
| 381 | ROM_LOAD16_BYTE( "24.u47", 0x00001, 0x20000, CRC(380fd0cd) SHA1(bcd6d23e41e249c7e587b253958eec180440639a) ) | |
| 335 | 382 | |
| 336 | GAME( 2000, galaxi, 0, galaxi, galaxi, 0, ROT0, "B.R.L.", "Galaxi (v2.0)", 0 ) | |
| 383 | ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE ) | |
| 384 | ROM_LOAD16_BYTE( "23.u34", 0x00000, 0x80000, CRC(952b7c84) SHA1(a28e1b79444331837ffc07c8d3c16c1d9a3c974c) ) | |
| 385 | ROM_LOAD16_BYTE( "22.u33", 0x00001, 0x80000, CRC(41866733) SHA1(257d77f89fcf1e8f36fb6a8fcb8ad48b1127e457) ) | |
| 386 | ||
| 387 | ROM_REGION( 0x40000, "oki", 0 ) /* 4-bit ADPCM mono @ 6 kHz.*/ | |
| 388 | ROM_LOAD( "21.u38", 0x00000, 0x40000, CRC(199baf33) SHA1(006708d955481fe1ae44555d27896d18e1ff8440) ) | |
| 389 | ROM_END | |
| 390 | ||
| 391 | ||
| 392 | /*************************************************************************** | |
| 393 | Game Drivers | |
| 394 | ***************************************************************************/ | |
| 395 | ||
| 396 | GAME( 2000, galaxi, 0, galaxi, galaxi, 0, ROT0, "B.R.L.", "Galaxi (v2.0)", 0 ) | |
| 397 | GAME( 2000, magjoker, 0, magjoker, magjoker, 0, ROT0, "B.R.L.", "Magic Joker (v1.25.10.2000)", 0 ) |
| r3171 | r3172 | |
|---|---|---|
| 187 | 187 | AM_RANGE(0xf000, 0xffff) AM_ROM |
| 188 | 188 | ADDRESS_MAP_END |
| 189 | 189 | |
| 190 | static ADDRESS_MAP_START( mario_ | |
| 190 | static ADDRESS_MAP_START( mario_ | |
| 191 | 191 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 192 | 192 | AM_RANGE(0x00, 0x00) AM_DEVREADWRITE(Z80DMA, "z80dma", z80dma_r, z80dma_w) /* dma controller */ |
| 193 | 193 | ADDRESS_MAP_END |
| r3171 | r3172 | |
| 347 | 347 | /* basic machine hardware */ |
| 348 | 348 | MDRV_CPU_ADD("main", Z80, Z80_CLOCK) /* verified on pcb */ |
| 349 | 349 | MDRV_CPU_PROGRAM_MAP(mario_map, 0) |
| 350 | MDRV_CPU_IO_MAP( | |
| 350 | MDRV_CPU_IO_MAP( | |
| 351 | 351 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 352 | 352 | |
| 353 | 353 | /* devices */ |
| r3171 | r3172 | |
| 384 | 384 | |
| 385 | 385 | MDRV_CPU_REPLACE("main", Z80, 4000000) /* 4.000 MHz (?) */ |
| 386 | 386 | MDRV_CPU_PROGRAM_MAP(masao_map, 0) |
| 387 | MDRV_CPU_IO_MAP( | |
| 387 | MDRV_CPU_IO_MAP( | |
| 388 | 388 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 389 | 389 | |
| 390 | 390 | /* sound hardware */ |
| r3171 | r3172 | |
| 405 | 405 | ROM_LOAD( "tma1-c.7d_e-1", 0x4000, 0x2000, CRC(dcceb6c1) SHA1(b19804e69ce2c98cf276c6055c3a250316b96b45) ) |
| 406 | 406 | ROM_LOAD( "tma1-c.7c_e-3", 0xf000, 0x1000, CRC(0d31bd1c) SHA1(a2e238470ba2ea3c81225fec687f61f047c68c59) ) |
| 407 | 407 | |
| 408 | ROM_REGION( 0x1000, "audio", 0 ) /* sound */ | |
| 409 | ROM_LOAD( "tma1c-a.6k", 0x0000, 0x1000, CRC(06b9ff85) SHA1(111a29bcb9cda0d935675fa26eca6b099a88427f) ) | |
| 408 | ROM_REGION( 0x2000, "audio", 0 ) /* sound */ | |
| 409 | /* internal rom */ | |
| 410 | ROM_FILL( 0x0000, 0x0800, 0x00) | |
| 411 | /* first half banked */ | |
| 412 | ROM_LOAD( "tma1c-a.6k", 0x1000, 0x0800, CRC(06b9ff85) SHA1(111a29bcb9cda0d935675fa26eca6b099a88427f) ) | |
| 413 | /* second half always read */ | |
| 414 | ROM_CONTINUE( 0x0800, 0x0800) | |
| 410 | 415 | |
| 411 | 416 | ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE ) |
| 412 | 417 | ROM_LOAD( "mario.3f", 0x0000, 0x1000, CRC(28b0c42c) SHA1(46749568aff88a28c3b6a1ac423abd1b90742a4d) ) |
| r3171 | r3172 | |
|---|---|---|
| 76 | 76 | /* bit 6 is EEPROM data */ |
| 77 | 77 | /* bit 7 is EEPROM ready */ |
| 78 | 78 | /* bit 14 is service button */ |
| 79 | res = | |
| 79 | res = | |
| 80 | 80 | if (init_eeprom_count) |
| 81 | 81 | { |
| 82 | 82 | init_eeprom_count--; |
| r3171 | r3172 | |
| 85 | 85 | return res; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | static READ16_HANDLER( xmen6p_eeprom_r ) | |
| 89 | { | |
| 90 | int res; | |
| 91 | 88 | |
| 92 | logerror("%06x xmen6p_eeprom_r\n",activecpu_get_pc()); | |
| 93 | /* bit 6 is EEPROM data */ | |
| 94 | /* bit 7 is EEPROM ready */ | |
| 95 | /* bit 14 is service button */ | |
| 96 | res = (eeprom_read_bit() << 6) | input_port_read(machine, "EEPROM"); | |
| 97 | if (init_eeprom_count) | |
| 98 | { | |
| 99 | init_eeprom_count--; | |
| 100 | res &= 0xbfff; | |
| 101 | } | |
| 102 | return (res & 0x7fff) | xmen_current_frame; | |
| 103 | } | |
| 104 | ||
| 105 | ||
| 106 | 89 | static WRITE16_HANDLER( eeprom_w ) |
| 107 | 90 | { |
| 108 | 91 | logerror("%06x: write %04x to 108000\n",activecpu_get_pc(),data); |
| r3171 | r3172 | |
| 227 | 210 | AM_RANGE(0x108060, 0x10807f) AM_WRITE(K053251_lsb_w) |
| 228 | 211 | AM_RANGE(0x10a000, 0x10a001) AM_READ_PORT("P2_P4") AM_WRITE(watchdog_reset16_w) |
| 229 | 212 | AM_RANGE(0x10a002, 0x10a003) AM_READ_PORT("P1_P3") |
| 230 | AM_RANGE(0x10a004, 0x10a005) AM_READ( | |
| 213 | AM_RANGE(0x10a004, 0x10a005) AM_READ( | |
| 231 | 214 | AM_RANGE(0x10a006, 0x10a007) AM_READ_PORT("P5_P6") |
| 232 | 215 | AM_RANGE(0x10a00c, 0x10a00d) AM_READ(K053246_word_r) /* sprites */ |
| 233 | 216 | AM_RANGE(0x110000, 0x113fff) AM_RAM /* main RAM */ |
| r3171 | r3172 | |
| 306 | 289 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) |
| 307 | 290 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 308 | 291 | |
| 309 | PORT_START("EEPROM") | |
| 292 | PORT_START("EEPROM") | |
| 310 | 293 | PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 311 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_U | |
| 294 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUST | |
| 312 | 295 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* EEPROM status - always 1 */ |
| 313 | 296 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| 314 | 297 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| r3171 | r3172 | |
| 319 | 302 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 320 | 303 | INPUT_PORTS_END |
| 321 | 304 | |
| 305 | ||
| 306 | static CUSTOM_INPUT( xmen_frame_r ) | |
| 307 | { | |
| 308 | return xmen_current_frame; | |
| 309 | } | |
| 310 | ||
| 322 | 311 | static INPUT_PORTS_START( xmen6p ) |
| 323 | 312 | PORT_START("P2_P4") |
| 324 | 313 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| r3171 | r3172 | |
| 356 | 345 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) |
| 357 | 346 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 358 | 347 | |
| 359 | PORT_START("EEPROM") | |
| 348 | PORT_START("EEPROM") | |
| 360 | 349 | PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 361 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_U | |
| 350 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUST | |
| 362 | 351 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* EEPROM status - always 1 */ |
| 363 | 352 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| 364 | 353 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| r3171 | r3172 | |
| 367 | 356 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START5 ) /* not verified */ |
| 368 | 357 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_START6 ) /* not verified */ |
| 369 | 358 | PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW ) |
| 370 | PORT_BIT( 0x8000, IP_ACTIVE_ | |
| 359 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUST | |
| 371 | 360 | |
| 372 | 361 | PORT_START("P5_P6") |
| 373 | 362 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(5) |
| r3171 | r3172 | |
| 411 | 400 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 412 | 401 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 413 | 402 | |
| 414 | PORT_START("EEPROM") | |
| 403 | PORT_START("EEPROM") | |
| 415 | 404 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 416 | 405 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE2 ) |
| 417 | 406 | PORT_BIT( 0x003c, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 418 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_U | |
| 407 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUST | |
| 419 | 408 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* EEPROM status - always 1 */ |
| 420 | 409 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| 421 | 410 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| r3171 | r3172 | |
| 488 | 477 | |
| 489 | 478 | static MACHINE_RESET(xmen6p) |
| 490 | 479 | { |
| 491 | xmen_current_frame = 0x00 | |
| 480 | xmen_current_frame = 0x00 | |
| 492 | 481 | } |
| 493 | 482 | |
| 494 | 483 | static INTERRUPT_GEN( xmen6p_interrupt ) |
| r3171 | r3172 | |
| 504 | 493 | // if (xmen_irqenabled&0x04) |
| 505 | 494 | // { |
| 506 | 495 | irq3_line_hold(machine, cpunum); |
| 507 | // xmen_current_frame = 0x00 | |
| 496 | // xmen_current_frame = 0x00 | |
| 508 | 497 | |
| 509 | 498 | // } |
| 510 | 499 | } |
| r3171 | r3172 | |
|---|---|---|
| 562 | 562 | PORT_INCLUDE( lethalen ) |
| 563 | 563 | |
| 564 | 564 | PORT_MODIFY("LIGHT0_X") |
| 565 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, | |
| 565 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, | |
| 566 | 566 | |
| 567 | 567 | PORT_MODIFY("LIGHT0_Y") |
| 568 | 568 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_REVERSE |
| 569 | 569 | |
| 570 | 570 | PORT_MODIFY("LIGHT1_X") |
| 571 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, | |
| 571 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, | |
| 572 | 572 | |
| 573 | 573 | PORT_MODIFY("LIGHT1_Y") |
| 574 | 574 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_REVERSE |
| r3171 | r3172 | |
|---|---|---|
| 139 | 139 | msm_play_lo_nibble = 1; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | static ADDRESS_MAP_START( | |
| 142 | static ADDRESS_MAP_START( io_ma | |
| 143 | 143 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 144 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") | |
| 145 | AM_RANGE(0x40, 0x40) AM_READ_PORT("P2") | |
| 144 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_WRITE(kchamp_flipscreen_w) | |
| 145 | AM_RANGE(0x01, 0x01) AM_WRITE(control_w) | |
| 146 | AM_RANGE(0x02, 0x02) AM_WRITE(sound_reset_w) | |
| 147 | AM_RANGE(0x40, 0x40) AM_READ_PORT("P2") AM_WRITE(sound_command_w) | |
| 146 | 148 | AM_RANGE(0x80, 0x80) AM_READ_PORT("SYSTEM") |
| 147 | 149 | AM_RANGE(0xC0, 0xC0) AM_READ_PORT("DSW") |
| 148 | 150 | ADDRESS_MAP_END |
| 149 | 151 | |
| 150 | static ADDRESS_MAP_START( | |
| 152 | static ADDRESS_MAP_START( sound_i | |
| 151 | 153 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 152 | AM_RANGE(0x00, 0x00) AM_WRITE(kchamp_flipscreen_w) | |
| 153 | AM_RANGE(0x01, 0x01) AM_WRITE(control_w) | |
| 154 | AM_RANGE(0x02, 0x02) AM_WRITE(sound_reset_w) | |
| 155 | AM_RANGE(0x40, 0x40) AM_WRITE(sound_command_w) | |
| 156 | ADDRESS_MAP_END | |
| 157 | ||
| 158 | static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 ) | |
| 159 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 160 | AM_RANGE(0x01, 0x01) AM_READ(soundlatch_r) | |
| 161 | ADDRESS_MAP_END | |
| 162 | ||
| 163 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 164 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 165 | 154 | AM_RANGE(0x00, 0x00) AM_WRITE(ay8910_write_port_0_w) |
| 166 | AM_RANGE(0x01, 0x01) AM_WRITE(ay8910_control_port_0_w) | |
| 155 | AM_RANGE(0x01, 0x01) AM_READWRITE(soundlatch_r, ay8910_control_port_0_w) | |
| 167 | 156 | AM_RANGE(0x02, 0x02) AM_WRITE(ay8910_write_port_1_w) |
| 168 | 157 | AM_RANGE(0x03, 0x03) AM_WRITE(ay8910_control_port_1_w) |
| 169 | 158 | AM_RANGE(0x04, 0x04) AM_WRITE(sound_msm_w) |
| r3171 | r3172 | |
| 214 | 203 | // DAC_set_volume(0,( data == 1 ) ? 255 : 0,0); |
| 215 | 204 | } |
| 216 | 205 | |
| 217 | static ADDRESS_MAP_START( kc_ | |
| 206 | static ADDRESS_MAP_START( kc_io_ma | |
| 218 | 207 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 208 | AM_RANGE(0x80, 0x80) AM_READ_PORT("DSW") AM_WRITE(kchamp_flipscreen_w) | |
| 209 | AM_RANGE(0x81, 0x81) AM_WRITE(control_w) | |
| 219 | 210 | AM_RANGE(0x90, 0x90) AM_READ_PORT("P1") |
| 220 | 211 | AM_RANGE(0x98, 0x98) AM_READ_PORT("P2") |
| 221 | 212 | AM_RANGE(0xa0, 0xa0) AM_READ_PORT("SYSTEM") |
| 222 | AM_RANGE(0x80, 0x80) AM_READ_PORT("DSW") | |
| 223 | AM_RANGE(0xa8, 0xa8) AM_READ(sound_reset_r) | |
| 213 | AM_RANGE(0xa8, 0xa8) AM_READWRITE(sound_reset_r, sound_command_w) | |
| 224 | 214 | ADDRESS_MAP_END |
| 225 | 215 | |
| 226 | static ADDRESS_MAP_START( kc_ | |
| 216 | static ADDRESS_MAP_START( kc_sound_i | |
| 227 | 217 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 228 | AM_RANGE(0x80, 0x80) AM_WRITE(kchamp_flipscreen_w) | |
| 229 | AM_RANGE(0x81, 0x81) AM_WRITE(control_w) | |
| 230 | AM_RANGE(0xa8, 0xa8) AM_WRITE(sound_command_w) | |
| 231 | ADDRESS_MAP_END | |
| 232 | ||
| 233 | static ADDRESS_MAP_START( kc_sound_readport, ADDRESS_SPACE_IO, 8 ) | |
| 234 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 235 | AM_RANGE(0x06, 0x06) AM_READ(soundlatch_r) | |
| 236 | ADDRESS_MAP_END | |
| 237 | ||
| 238 | static ADDRESS_MAP_START( kc_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 239 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 240 | 218 | AM_RANGE(0x00, 0x00) AM_WRITE(ay8910_write_port_0_w) |
| 241 | 219 | AM_RANGE(0x01, 0x01) AM_WRITE(ay8910_control_port_0_w) |
| 242 | 220 | AM_RANGE(0x02, 0x02) AM_WRITE(ay8910_write_port_1_w) |
| 243 | 221 | AM_RANGE(0x03, 0x03) AM_WRITE(ay8910_control_port_1_w) |
| 244 | 222 | AM_RANGE(0x04, 0x04) AM_WRITE(dac_0_data_w) |
| 245 | 223 | AM_RANGE(0x05, 0x05) AM_WRITE(kc_sound_control_w) |
| 224 | AM_RANGE(0x06, 0x06) AM_READ(soundlatch_r) | |
| 246 | 225 | ADDRESS_MAP_END |
| 247 | 226 | |
| 248 | ||
| 249 | 227 | static INPUT_PORTS_START( kchampvs ) |
| 250 | 228 | PORT_START("P1") |
| 251 | 229 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_4WAY |
| r3171 | r3172 | |
| 442 | 420 | /* basic machine hardware */ |
| 443 | 421 | MDRV_CPU_ADD("main", Z80, 3000000) /* 12MHz / 4 = 3.0 MHz */ |
| 444 | 422 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 445 | MDRV_CPU_IO_MAP( | |
| 423 | MDRV_CPU_IO_MAP(io_ma | |
| 446 | 424 | MDRV_CPU_VBLANK_INT("main", kc_interrupt) |
| 447 | 425 | |
| 448 | 426 | MDRV_CPU_ADD("audio", Z80, 3000000) /* 12MHz / 4 = 3.0 MHz */ |
| 449 | 427 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 450 | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) | |
| 451 | /* irq's triggered from main cpu */ | |
| 452 | /* nmi's from msm5205 */ | |
| 428 | MDRV_CPU_IO_MAP(sound_io_map,0) /* irq's triggered from main cpu */ | |
| 429 | /* nmi's from msm5205 */ | |
| 453 | 430 | |
| 454 | 431 | /* video hardware */ |
| 455 | 432 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 489 | 466 | /* basic machine hardware */ |
| 490 | 467 | MDRV_CPU_ADD("main", Z80, 3000000) /* 12MHz / 4 = 3.0 MHz */ |
| 491 | 468 | MDRV_CPU_PROGRAM_MAP(kc_readmem,kc_writemem) |
| 492 | MDRV_CPU_IO_MAP(kc_ | |
| 469 | MDRV_CPU_IO_MAP(kc_i | |
| 493 | 470 | MDRV_CPU_VBLANK_INT("main", kc_interrupt) |
| 494 | 471 | |
| 495 | 472 | MDRV_CPU_ADD("audio", Z80, 3000000) /* 12MHz / 4 = 3.0 MHz */ |
| 496 | 473 | MDRV_CPU_PROGRAM_MAP(kc_sound_readmem,kc_sound_writemem) |
| 497 | MDRV_CPU_IO_MAP(kc_sound_readport,kc_sound_writeport) | |
| 498 | MDRV_CPU_PERIODIC_INT(sound_int, 125) /* Hz */ | |
| 499 | /* irq's triggered from main cpu */ | |
| 500 | /* nmi's from 125 Hz clock */ | |
| 474 | MDRV_CPU_IO_MAP(kc_sound_io_map,0) | |
| 475 | MDRV_CPU_PERIODIC_INT(sound_int, 125) /* Hz */ | |
| 476 | /* irq's triggered from main cpu */ | |
| 477 | /* nmi's from 125 Hz clock */ | |
| 501 | 478 | |
| 502 | 479 | /* video hardware */ |
| 503 | 480 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 739 | 716 | GAME( 1984, karatedo, kchamp, kchamp, kchamp, 0, ROT90, "Data East Corporation", "Karate Dou (Japan)", 0 ) |
| 740 | 717 | GAME( 1984, kchampvs, kchamp, kchampvs, kchampvs, kchampvs, ROT90, "Data East USA", "Karate Champ (US VS version)", 0 ) |
| 741 | 718 | GAME( 1984, karatevs, kchamp, kchampvs, kchampvs, kchampvs, ROT90, "Data East Corporation", "Taisen Karate Dou (Japan VS version)", 0 ) |
| 719 |
| r3171 | r3172 | |
|---|---|---|
| 480 | 480 | |
| 481 | 481 | /************************************* |
| 482 | 482 | * |
| 483 | * Input ports | |
| 484 | * | |
| 485 | *************************************/ | |
| 486 | ||
| 487 | ||
| 488 | static READ32_HANDLER( status_r ) | |
| 489 | { | |
| 490 | // D23-20 = /SER-4-1 | |
| 491 | // D19-16 = COINR4-1 | |
| 492 | // D7 = /VSYNCNEQ | |
| 493 | // D6 = /S-TEST | |
| 494 | // D5 = /VOLUMEUP | |
| 495 | // D4 = /VOLUMEDOWN | |
| 496 | // D3-D0 = ACTC4-1 | |
| 497 | return input_port_read(machine, "SYSTEM") | (input_port_read(machine, "SYSTEM") << 16); | |
| 498 | } | |
| 499 | ||
| 500 | ||
| 501 | ||
| 502 | /************************************* | |
| 503 | * | |
| 504 | 483 | * Output ports |
| 505 | 484 | * |
| 506 | 485 | *************************************/ |
| r3171 | r3172 | |
| 813 | 792 | AM_RANGE(0x04f03000, 0x04f03fff) AM_MIRROR(0x00008000) AM_RAM AM_BASE(&jaguar_gpu_ram) AM_SHARE(3) |
| 814 | 793 | AM_RANGE(0x04f10000, 0x04f103ff) AM_READWRITE(jaguar_jerry_regs32_r, jaguar_jerry_regs32_w) |
| 815 | 794 | AM_RANGE(0x04f16000, 0x04f1600b) AM_READ(cojag_gun_input_r) // GPI02 |
| 816 | AM_RANGE(0x04f17000, 0x04f17003) AM_READ | |
| 795 | AM_RANGE(0x04f17000, 0x04f17003) AM_READ | |
| 817 | 796 | AM_RANGE(0x04f17800, 0x04f17803) AM_WRITE(latch_w) // GPI04 |
| 818 | 797 | AM_RANGE(0x04f17c00, 0x04f17c03) AM_READ_PORT("P1_P2") // GPI05 |
| 819 | 798 | AM_RANGE(0x04f1a100, 0x04f1a13f) AM_READWRITE(dspctrl_r, dspctrl_w) |
| r3171 | r3172 | |
| 847 | 826 | AM_RANGE(0xf03000, 0xf03fff) AM_MIRROR(0x008000) AM_RAM AM_BASE(&jaguar_gpu_ram) AM_SHARE(3) |
| 848 | 827 | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE(jaguar_jerry_regs32_r, jaguar_jerry_regs32_w) |
| 849 | 828 | AM_RANGE(0xf16000, 0xf1600b) AM_READ(cojag_gun_input_r) // GPI02 |
| 850 | AM_RANGE(0xf17000, 0xf17003) AM_READ | |
| 829 | AM_RANGE(0xf17000, 0xf17003) AM_READ | |
| 851 | 830 | // AM_RANGE(0xf17800, 0xf17803) AM_WRITE(latch_w) // GPI04 |
| 852 | 831 | AM_RANGE(0xf17c00, 0xf17c03) AM_READ_PORT("P1_P2") // GPI05 |
| 853 | 832 | AM_RANGE(0xf1a100, 0xf1a13f) AM_READWRITE(dspctrl_r, dspctrl_w) |
| r3171 | r3172 | |
| 903 | 882 | * |
| 904 | 883 | *************************************/ |
| 905 | 884 | |
| 885 | /* "FAKE0" is read at 0x04f17000 | |
| 886 | D23-20 = /SER-4-1 | |
| 887 | D19-16 = COINR4-1 | |
| 888 | D7 = /VSYNCNEQ | |
| 889 | D6 = /S-TEST | |
| 890 | D5 = /VOLUMEUP | |
| 891 | D4 = /VOLUMEDOWN | |
| 892 | D3-D0 = ACTC4-1 | |
| 893 | */ | |
| 906 | 894 | static INPUT_PORTS_START( area51 ) |
| 907 | 895 | PORT_START("P1_P2") |
| 908 | 896 | PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r3171 | r3172 | |
| 914 | 902 | PORT_BIT( 0xfe000000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 915 | 903 | |
| 916 | 904 | PORT_START("SYSTEM") |
| 905 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 906 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 907 | ||
| 908 | PORT_START("FAKE0") | |
| 917 | 909 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 918 | 910 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 919 | 911 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r3171 | r3172 | |
| 937 | 929 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, (240.0 - 1)/240, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2) |
| 938 | 930 | |
| 939 | 931 | PORT_START("IN3") /* gun triggers */ |
| 940 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) // gun data valid | |
| 941 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) // gun data valid | |
| 942 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 943 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 944 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 932 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_SPECIAL ) // gun data valid | |
| 933 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_SPECIAL ) // gun data valid | |
| 934 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 935 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 936 | PORT_BIT( 0xfff00000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 945 | 937 | INPUT_PORTS_END |
| 946 | 938 | |
| 947 | 939 | |
| r3171 | r3172 | |
| 968 | 960 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 969 | 961 | |
| 970 | 962 | PORT_START("SYSTEM") |
| 963 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 964 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 965 | ||
| 966 | PORT_START("FAKE0") | |
| 971 | 967 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 972 | 968 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 973 | 969 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r3171 | r3172 | |
| 979 | 975 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 980 | 976 | |
| 981 | 977 | PORT_START("IN3") |
| 982 | PORT_BIT( 0x000f, IP_ACTIVE_HIGH, IPT_SPECIAL ) // coin returns | |
| 983 | PORT_BIT( 0x00f0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 984 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 978 | PORT_BIT( 0x000f0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // coin returns | |
| 979 | PORT_BIT( 0x00f00000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 980 | PORT_BIT( 0xff000000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 985 | 981 | INPUT_PORTS_END |
| 986 | 982 | |
| 987 | 983 | |
| r3171 | r3172 | |
| 1008 | 1004 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 1009 | 1005 | |
| 1010 | 1006 | PORT_START("SYSTEM") |
| 1007 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1008 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1009 | ||
| 1010 | PORT_START("FAKE0") | |
| 1011 | 1011 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1012 | 1012 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1013 | 1013 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r3171 | r3172 | |
| 1019 | 1019 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1020 | 1020 | |
| 1021 | 1021 | PORT_START("IN3") |
| 1022 | PORT_BIT( 0x000f, IP_ACTIVE_HIGH, IPT_SPECIAL ) // coin returns | |
| 1023 | PORT_BIT( 0x00f0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1024 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1022 | PORT_BIT( 0x000f0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // coin returns | |
| 1023 | PORT_BIT( 0x00f00000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1024 | PORT_BIT( 0xff000000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1025 | 1025 | INPUT_PORTS_END |
| 1026 | 1026 | |
| 1027 | 1027 | |
| r3171 | r3172 | |
| 1054 | 1054 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 1055 | 1055 | |
| 1056 | 1056 | PORT_START("SYSTEM") |
| 1057 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1058 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1059 | ||
| 1060 | PORT_START("FAKE0") | |
| 1057 | 1061 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1058 | 1062 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1059 | 1063 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r3171 | r3172 | |
| 1065 | 1069 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1066 | 1070 | |
| 1067 | 1071 | PORT_START("IN3") |
| 1068 | PORT_BIT( 0x000f, IP_ACTIVE_HIGH, IPT_SPECIAL ) // coin returns | |
| 1069 | PORT_BIT( 0x00f0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1070 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1072 | PORT_BIT( 0x000f0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // coin returns | |
| 1073 | PORT_BIT( 0x00f00000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1074 | PORT_BIT( 0xff000000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1071 | 1075 | INPUT_PORTS_END |
| 1072 | 1076 | |
| 1073 | 1077 |
| r3171 | r3172 | |
|---|---|---|
| 47 | 47 | /* clear */ |
| 48 | 48 | fillbitmap(bitmap, 0, cliprect); |
| 49 | 49 | |
| 50 | /* display disc information */ | |
| 51 | if (ld_video_visible) | |
| 52 | popmessage("%s", laserdisc_describe_state(laserdisc)); | |
| 53 | ||
| 54 | 50 | /* Draw tiles */ |
| 55 | 51 | for (charx = 0; charx < 32; charx++) |
| 56 | 52 | { |
| r3171 | r3172 | |
|---|---|---|
| 367 | 367 | |
| 368 | 368 | static READ8_HANDLER( sio_r ) |
| 369 | 369 | { |
| 370 | return (offset & 1) ? z80sio_c_r(0, (offset >> 1) & 1) : z80sio_d_r(0, (offset >> 1) & 1); | |
| 370 | return (offset & 1) ? z80sio_c_r(0, (offset >> 1) & 1) : z80sio_d_r(machine, 0, (offset >> 1) & 1); | |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | 373 | |
| 374 | 374 | static WRITE8_HANDLER( sio_w ) |
| 375 | 375 | { |
| 376 | 376 | if (offset & 1) |
| 377 | z80sio_c_w(0, (offset >> 1) & 1, data); | |
| 377 | z80sio_c_w(machine, 0, (offset >> 1) & 1, data); | |
| 378 | 378 | else |
| 379 | z80sio_d_w(0, (offset >> 1) & 1, data); | |
| 379 | z80sio_d_w(machine, 0, (offset >> 1) & 1, data); | |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 |
| r3171 | r3172 | |
|---|---|---|
| 1948 | 1948 | ROM_LOAD16_BYTE( "epr-11338.ic1", 0x000001, 0x20000, CRC(7d4a7ff3) SHA1(3d3af04d990d232ba0a8fe155de59bc632a0a461) ) |
| 1949 | 1949 | |
| 1950 | 1950 | ROM_REGION( 0x1d6000, "user2", 0) |
| 1951 | ROM_LOAD( "ds3-5000-01d_3p_turbo. | |
| 1951 | ROM_LOAD( "ds3-5000-01d_3p_turbo. | |
| 1952 | 1952 | ROM_END |
| 1953 | 1953 | |
| 1954 | 1954 | ROM_START( hotroda ) |
| r3171 | r3172 | |
| 1957 | 1957 | ROM_LOAD16_BYTE( "epr-11338.ic1", 0x000001, 0x20000, CRC(7d4a7ff3) SHA1(3d3af04d990d232ba0a8fe155de59bc632a0a461) ) |
| 1958 | 1958 | |
| 1959 | 1959 | ROM_REGION( 0x1d6000, "user2", 0) |
| 1960 | ROM_LOAD( "ds3-5000-01d. | |
| 1960 | ROM_LOAD( "ds3-5000-01d. | |
| 1961 | 1961 | ROM_END |
| 1962 | 1962 | |
| 1963 | 1963 | ROM_START( hotrodj ) |
| r3171 | r3172 | |
| 1966 | 1966 | ROM_LOAD16_BYTE( "epr-11338.ic1", 0x000001, 0x20000, CRC(7d4a7ff3) SHA1(3d3af04d990d232ba0a8fe155de59bc632a0a461) ) |
| 1967 | 1967 | |
| 1968 | 1968 | ROM_REGION( 0x1d6000, "user2", 0) |
| 1969 | ROM_LOAD( "ds3-5000-01a-revb. | |
| 1969 | ROM_LOAD( "ds3-5000-01a-rev-b. | |
| 1970 | 1970 | ROM_END |
| 1971 | 1971 | |
| 1972 | 1972 | ROM_START( qgh ) |
| r3171 | r3172 | |
| 2041 | 2041 | ROM_RELOAD ( 0x180001, 0x40000) |
| 2042 | 2042 | |
| 2043 | 2043 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2044 | ROM_LOAD( "ds3-5000-07d.img", | |
| 2044 | ROM_LOAD( "ds3-5000-07d.img", | |
| 2045 | 2045 | ROM_END |
| 2046 | 2046 | |
| 2047 | 2047 | ROM_START( bnzabrsj ) |
| r3171 | r3172 | |
| 2058 | 2058 | ROM_RELOAD ( 0x180001, 0x40000) |
| 2059 | 2059 | |
| 2060 | 2060 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2061 | ROM_LOAD( "ds3-5000-07b.img", | |
| 2061 | ROM_LOAD( "ds3-5000-07b.img", | |
| 2062 | 2062 | ROM_END |
| 2063 | 2063 | |
| 2064 | 2064 | ROM_START( quizmeku ) // Quiz Mekuromeku Story |
| r3171 | r3172 | |
| 2081 | 2081 | ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) ) |
| 2082 | 2082 | |
| 2083 | 2083 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2084 | ROM_LOAD( "ds3-5000-02-.img", | |
| 2084 | ROM_LOAD( "ds3-5000-02-.img", | |
| 2085 | 2085 | ROM_END |
| 2086 | 2086 | |
| 2087 | 2087 | ROM_START( sspiritj ) |
| r3171 | r3172 | |
| 2090 | 2090 | ROM_LOAD16_BYTE( "epr-11338.ic1", 0x000001, 0x20000, CRC(7d4a7ff3) SHA1(3d3af04d990d232ba0a8fe155de59bc632a0a461) ) |
| 2091 | 2091 | |
| 2092 | 2092 | ROM_REGION( 0x1d6000, "user2", 0) |
| 2093 | ROM_LOAD( "ds3-5000-02-rev-a.img", | |
| 2093 | ROM_LOAD( "ds3-5000-02-rev-a.img", | |
| 2094 | 2094 | ROM_END |
| 2095 | 2095 | |
| 2096 | 2096 | ROM_START( sspirtfc ) |
| r3171 | r3172 | |
| 2102 | 2102 | ROM_LOAD( "317-0058-02c.key", 0x0000, 0x2000, CRC(ebae170e) SHA1(b6d1e1b6943a35b96e98e426ecb39bb5a42fb643) ) |
| 2103 | 2103 | |
| 2104 | 2104 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2105 | ROM_LOAD( "ds3-5000-02c.img", | |
| 2105 | ROM_LOAD( "ds3-5000-02c.img", | |
| 2106 | 2106 | ROM_END |
| 2107 | 2107 | |
| 2108 | 2108 | ROM_START( sgmast ) |
| r3171 | r3172 | |
| 2130 | 2130 | ROM_LOAD( "317-0058-05c.key", 0x0000, 0x2000, CRC(ae0eabe5) SHA1(692d7565bf9c5b32cc80bb4bd88c9193aa04cbb0) ) |
| 2131 | 2131 | |
| 2132 | 2132 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2133 | ROM_LOAD( "ds3-5000-05c.img", | |
| 2133 | ROM_LOAD( "ds3-5000-05c.img", | |
| 2134 | 2134 | ROM_END |
| 2135 | 2135 | |
| 2136 | 2136 | ROM_START( sgmastj ) |
| r3171 | r3172 | |
| 2142 | 2142 | ROM_LOAD( "317-0058-05b.key", 0x0000, 0x2000, CRC(adc0c83b) SHA1(2328d82d5057062eeb0072fd57f0422218cf24fc) ) |
| 2143 | 2143 | |
| 2144 | 2144 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2145 | ROM_LOAD( "ds3-5000-05b.img", | |
| 2145 | ROM_LOAD( "ds3-5000-05b.img", | |
| 2146 | 2146 | ROM_END |
| 2147 | 2147 | |
| 2148 | 2148 | ROM_START( qsww ) |
| r3171 | r3172 | |
| 2154 | 2154 | ROM_LOAD( "317-0058-08b.key", 0x0000, 0x2000, CRC(fe0a336a) SHA1(f7a5b2c1a057d0bb8c1ae0453c58aa8f5fb731b9) ) |
| 2155 | 2155 | |
| 2156 | 2156 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2157 | ROM_LOAD( "ds3-5000-08b.img", | |
| 2157 | ROM_LOAD( "ds3-5000-08b.img", | |
| 2158 | 2158 | ROM_END |
| 2159 | 2159 | |
| 2160 | 2160 | ROM_START( gground ) |
| r3171 | r3172 | |
| 2163 | 2163 | ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) ) |
| 2164 | 2164 | |
| 2165 | 2165 | ROM_REGION( 0x2000, "user3", 0 ) /* decryption key */ |
| 2166 | ROM_LOAD( "317-0058-03 | |
| 2166 | ROM_LOAD( "317-0058-03d.key", 0x0000, 0x2000, CRC(e1785bbd) SHA1(b4bebb2829299f1c0815d6a5f317a2526b322f63) ) /* Als | |
| 2167 | 2167 | |
| 2168 | 2168 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2169 | ROM_LOAD( "ds3-5000-03 | |
| 2169 | ROM_LOAD( "ds3-5000-03d-rev-a.img", | |
| 2170 | 2170 | ROM_END |
| 2171 | 2171 | |
| 2172 | 2172 | ROM_START( ggroundj ) |
| r3171 | r3172 | |
| 2178 | 2178 | ROM_LOAD( "317-0058-03b.key", 0x0000, 0x2000, CRC(84aecdba) SHA1(ceddf967359a6e76543fe1ab00be53d0a11fe1ab) ) |
| 2179 | 2179 | |
| 2180 | 2180 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2181 | ROM_LOAD( "ds3-5000-03b.img", | |
| 2181 | ROM_LOAD( "ds3-5000-03b.img", | |
| 2182 | 2182 | ROM_END |
| 2183 | 2183 | |
| 2184 | 2184 | ROM_START( crkdown ) |
| r3171 | r3172 | |
| 2190 | 2190 | ROM_LOAD( "317-0058-04c.key", 0x0000, 0x2000, CRC(16e978cc) SHA1(0e1482b5efa93b732d4cf0990919cb3fc903dca7) ) |
| 2191 | 2191 | |
| 2192 | 2192 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2193 | ROM_LOAD( "ds3-5000-04c.img", | |
| 2193 | ROM_LOAD( "ds3-5000-04c.img", | |
| 2194 | 2194 | ROM_END |
| 2195 | 2195 | |
| 2196 | 2196 | ROM_START( crkdownu ) |
| r3171 | r3172 | |
| 2202 | 2202 | ROM_LOAD( "317-0058-04d.key", 0x0000, 0x2000, CRC(934ac358) SHA1(73418e22c9d201bc3fec5c63284858958c010e05) ) |
| 2203 | 2203 | |
| 2204 | 2204 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2205 | ROM_LOAD( "ds3-5000-04d.img", | |
| 2205 | ROM_LOAD( "ds3-5000-04d.img", | |
| 2206 | 2206 | ROM_END |
| 2207 | 2207 | |
| 2208 | 2208 | ROM_START( crkdownj ) |
| r3171 | r3172 | |
| 2211 | 2211 | ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) ) |
| 2212 | 2212 | |
| 2213 | 2213 | ROM_REGION( 0x2000, "user3", 0 ) /* decryption key */ |
| 2214 | ROM_LOAD( "317-0058-04b.key", 0x0000, 0x2000, CRC(4a99a202) SHA1(d7375f09e7246ecd60ba0e48f049e9e252af92a8) ) | |
| 2214 | ROM_LOAD( "317-0058-04b.key", 0x0000, 0x2000, CRC(4a99a202) SHA1(d7375f09e7246ecd60ba0e48f049e9e252af92a8) ) /* Also labeled "rev-A" but is it different? */ | |
| 2215 | 2215 | |
| 2216 | 2216 | ROM_REGION( 0x1c2000, "user2", 0) |
| 2217 | ROM_LOAD( "ds3-5000-04b.img", | |
| 2217 | ROM_LOAD( "ds3-5000-04b-rev-a.img", | |
| 2218 | 2218 | ROM_END |
| 2219 | 2219 | |
| 2220 | 2220 | ROM_START( dcclub ) |
| r3171 | r3172 | |
| 2279 | 2279 | |
| 2280 | 2280 | /* Disk Based Games */ |
| 2281 | 2281 | /* 01 */GAME( 1988, hotrod, 0, system24, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 1, Floppy Based)", 0 ) |
| 2282 | /* 01 */GAME( 1988, hotroda, hotrod, system24, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 2, Floppy Based)", GAME_NO_SOUND ) | |
| 2283 | /* 01 */GAME( 1988, hotrodj, hotrod, system24, hotrodj, hotrod, ROT0, "Sega", "Hot Rod (Japan, 4 Players, Floppy Based)", GAME_NO_SOUND ) | |
| 2282 | /* 01 */GAME( 1988, hotroda, hotrod, system24, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 2, Floppy Based)", 0 ) | |
| 2283 | /* 01 */GAME( 1988, hotrodj, hotrod, system24, hotrodj, hotrod, ROT0, "Sega", "Hot Rod (Japan, 4 Players, Floppy Based)", 0 ) | |
| 2284 | 2284 | /* 02 */GAME( 1988, sspirits, 0, system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based)", 0 ) |
| 2285 | 2285 | /* 02 */GAME( 1988, sspiritj, sspirits, system24, sspirits, sspiritj, ROT270, "Sega", "Scramble Spirits (Japan, Floppy DS3-5000-02-REV-A Based)", 0 ) |
| 2286 | 2286 | /* 02 */GAME( 1988, sspirtfc, sspirits, system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based, FD1094 317-0058-02c)",GAME_NOT_WORKING ) /* MISSING disk image */ |
| 2287 | /* 03 */GAME( 1988, gground, 0, system24, gground, gground, ROT270, "Sega", "Gain Ground (World, 3 Players, Floppy Based, FD1094 317-0058-03 | |
| 2287 | /* 03 */GAME( 1988, gground, 0, system24, gground, gground, ROT270, "Sega", "Gain Ground (World, 3 Players, Floppy Based, FD1094 317-0058-03d Rev A)", 0 ) | |
| 2288 | 2288 | /* 03 */GAME( 1988, ggroundj, gground, system24, gground, gground, ROT270, "Sega", "Gain Ground (Japan, 2 Players, Floppy Based, FD1094 317-0058-03b)", 0 ) |
| 2289 | 2289 | /* 04 */GAME( 1989, crkdown, 0, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (World, Floppy Based, FD1094 317-0058-04c)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display) |
| 2290 | 2290 | /* 04 */GAME( 1989, crkdownu, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (US, Floppy Based, FD1094 317-0058-04d)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display) |
| 2291 | /* 04 */GAME( 1989, crkdownj, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (Japan, Floppy Based, FD1094 317-0058-04b)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display) | |
| 2291 | /* 04 */GAME( 1989, crkdownj, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (Japan, Floppy Based, FD1094 317-0058-04b Rev A)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display) | |
| 2292 | 2292 | /* 05 */GAME( 1989, sgmast, 0, system24, sgmast, sgmast, ROT0, "Sega", "Super Masters Golf (World?, Floppy Based, FD1094 317-0058-05d?)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION ) // NOT decrypted |
| 2293 | 2293 | /* 05 */GAME( 1989, sgmastc, sgmast, system24, sgmast, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (World, Floppy Based, FD1094 317-0058-05c)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs? |
| 2294 | 2294 | /* 05 */GAME( 1989, sgmastj, sgmast, system24, sgmastj, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (Japan, Floppy Based, FD1094 317-0058-05b)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs? |
| r3171 | r3172 | |
|---|---|---|
| 63 | 63 | AM_RANGE(0xf000, 0xffff) AM_WRITE(SMH_RAM) AM_BASE(&carrera_tileram) |
| 64 | 64 | ADDRESS_MAP_END |
| 65 | 65 | |
| 66 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 66 | ||
| 67 | static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) | |
| 67 | 68 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 68 | 69 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
| 69 | 70 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
| r3171 | r3172 | |
| 71 | 72 | AM_RANGE(0x03, 0x03) AM_READ_PORT("IN3") |
| 72 | 73 | AM_RANGE(0x04, 0x04) AM_READ_PORT("IN4") |
| 73 | 74 | AM_RANGE(0x05, 0x05) AM_READ_PORT("IN5") |
| 74 | ADDRESS_MAP_END | |
| 75 | ||
| 76 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 77 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 78 | 75 | AM_RANGE(0x06, 0x06) AM_WRITE(SMH_NOP) // ? |
| 79 | ||
| 80 | 76 | AM_RANGE(0x08, 0x08) AM_WRITE(ay8910_control_port_0_w) |
| 81 | 77 | AM_RANGE(0x09, 0x09) AM_WRITE(ay8910_write_port_0_w) |
| 82 | 78 | ADDRESS_MAP_END |
| 83 | 79 | |
| 84 | ||
| 85 | 80 | static INPUT_PORTS_START( carrera ) |
| 86 | 81 | PORT_START("IN0") /* Port 0 */ |
| 87 | 82 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) |
| r3171 | r3172 | |
| 292 | 287 | /* basic machine hardware */ |
| 293 | 288 | MDRV_CPU_ADD("main", Z80,MASTER_CLOCK/6) |
| 294 | 289 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 295 | MDRV_CPU_IO_MAP( | |
| 290 | MDRV_CPU_IO_MAP(io_ma | |
| 296 | 291 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 297 | 292 | |
| 298 | 293 | /* video hardware */ |
| r3171 | r3172 | |
| 340 | 335 | |
| 341 | 336 | |
| 342 | 337 | GAME( 19??, carrera, 0, carrera, carrera,0, ROT0, "BS Electronics", "Carrera (Version 6.7)", GAME_WRONG_COLORS ) |
| 338 |
| r3171 | r3172 | |
|---|---|---|
| 202 | 202 | AM_RANGE(0xe000, 0xffff) AM_WRITE(SMH_RAM) |
| 203 | 203 | ADDRESS_MAP_END |
| 204 | 204 | |
| 205 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 205 | ||
| 206 | static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) | |
| 206 | 207 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 207 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW1") | |
| 208 | AM_RANGE(0x01, 0x01) AM_READ_PORT("SYSTEM") | |
| 208 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW1") AM_WRITE(egghunt_vidram_bank_w) | |
| 209 | AM_RANGE(0x01, 0x01) AM_READ_PORT("SYSTEM") AM_WRITE(egghunt_gfx_banking_w) | |
| 209 | 210 | AM_RANGE(0x02, 0x02) AM_READ_PORT("P1") |
| 210 | AM_RANGE(0x03, 0x03) AM_READ_PORT("P2") | |
| 211 | AM_RANGE(0x03, 0x03) AM_READ_PORT("P2") AM_WRITE(egghunt_soundlatch_w) | |
| 211 | 212 | AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW2") |
| 212 | AM_RANGE(0x06, 0x06) AM_READ_PORT("UNK") | |
| 213 | ADDRESS_MAP_END | |
| 214 | ||
| 215 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 216 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 217 | AM_RANGE(0x00, 0x00) AM_WRITE(egghunt_vidram_bank_w) | |
| 218 | AM_RANGE(0x01, 0x01) AM_WRITE(egghunt_gfx_banking_w) | |
| 219 | AM_RANGE(0x03, 0x03) AM_WRITE(egghunt_soundlatch_w) | |
| 220 | AM_RANGE(0x06, 0x06) AM_WRITENOP | |
| 213 | AM_RANGE(0x06, 0x06) AM_READ_PORT("UNK") AM_WRITENOP | |
| 221 | 214 | AM_RANGE(0x07, 0x07) AM_WRITENOP |
| 222 | 215 | ADDRESS_MAP_END |
| 223 | 216 | |
| 224 | ||
| 225 | 217 | static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 226 | 218 | AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) |
| 227 | 219 | AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) |
| r3171 | r3172 | |
| 387 | 379 | /* basic machine hardware */ |
| 388 | 380 | MDRV_CPU_ADD("main", Z80,12000000/2) /* 6 MHz ?*/ |
| 389 | 381 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 390 | MDRV_CPU_IO_MAP( | |
| 382 | MDRV_CPU_IO_MAP(io_ma | |
| 391 | 383 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) // or 2 like mitchell.c? |
| 392 | 384 | |
| 393 | 385 | MDRV_CPU_ADD("audio", Z80,12000000/2) /* 6 MHz ?*/ |
| r3171 | r3172 | |
| 441 | 433 | ROM_END |
| 442 | 434 | |
| 443 | 435 | GAME( 1995, egghunt, 0, egghunt, egghunt, 0, ROT0, "Invi Image", "Egg Hunt", 0 ) |
| 436 |
| r3171 | r3172 | |
|---|---|---|
| 186 | 186 | AM_RANGE(0x0000, 0x0fff) AM_WRITE(SMH_ROM) |
| 187 | 187 | ADDRESS_MAP_END |
| 188 | 188 | |
| 189 | static ADDRESS_MAP_START( i8039_ | |
| 189 | static ADDRESS_MAP_START( i8039_io_ma | |
| 190 | 190 | AM_RANGE(0x00, 0xff) AM_READ(soundlatch2_r) |
| 191 | ADDRESS_MAP_END | |
| 192 | ||
| 193 | static ADDRESS_MAP_START( i8039_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 194 | 191 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(dac_0_data_w) |
| 195 | 192 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_and_status_w) |
| 196 | 193 | ADDRESS_MAP_END |
| r3171 | r3172 | |
| 393 | 390 | |
| 394 | 391 | MDRV_CPU_ADD("mcu", I8039,14318000/2) |
| 395 | 392 | MDRV_CPU_PROGRAM_MAP(i8039_readmem,i8039_writemem) |
| 396 | MDRV_CPU_IO_MAP(i8039_ | |
| 393 | MDRV_CPU_IO_MAP(i8039_io_ma | |
| 397 | 394 | |
| 398 | 395 | MDRV_INTERLEAVE(50) /* slices per frame */ |
| 399 | 396 | |
| r3171 | r3172 | |
| 466 | 463 | |
| 467 | 464 | |
| 468 | 465 | GAME( 1984, pandoras, 0, pandoras, pandoras, 0, ROT90, "Konami/Interlogic", "Pandora's Palace", 0 ) |
| 466 |
| r3171 | r3172 | |
|---|---|---|
| 210 | 210 | gpworld_draw_tiles(screen->machine, bitmap, cliprect); |
| 211 | 211 | gpworld_draw_sprites(screen->machine, bitmap, cliprect); |
| 212 | 212 | |
| 213 | /* display disc information */ | |
| 214 | popmessage("%s", laserdisc_describe_state(laserdisc)); | |
| 215 | ||
| 216 | 213 | return 0; |
| 217 | 214 | } |
| 218 | 215 |
| r3171 | r3172 | |
|---|---|---|
| 1442 | 1442 | ROM_LOAD( "21j-l-0", 0x0100, 0x0200, CRC(46339529) SHA1(64f4c42a826d67b7cbaa8a23a45ebc4eb6248891) ) /* unknown */ |
| 1443 | 1443 | ROM_END |
| 1444 | 1444 | |
| 1445 | ROM_START( ddragob2 ) | |
| 1446 | ROM_REGION( 0x30000, "main", 0 ) /* 64k for code + bankswitched memory */ | |
| 1447 | ROM_LOAD( "4.bin", 0x08000, 0x08000, CRC(668dfa19) SHA1(9b2ff1b66eeba0989e4ed850b7df1f5719ba5572) ) | |
| 1448 | ROM_LOAD( "5.bin", 0x10000, 0x08000, CRC(5779705e) SHA1(4b8f22225d10f5414253ce0383bbebd6f720f3af) ) /* banked at 0x4000-0x8000 */ | |
| 1449 | ROM_LOAD( "6.bin", 0x18000, 0x08000, CRC(3bdea613) SHA1(d9038c80646a6ce3ea61da222873237b0383680e) ) /* banked at 0x4000-0x8000 */ | |
| 1450 | ROM_LOAD( "7.bin", 0x20000, 0x08000, CRC(728f87b9) SHA1(d7442be24d41bb9fc021587ef44ae5b830e4503d) ) /* banked at 0x4000-0x8000 */ | |
| 1445 | 1451 | |
| 1452 | ROM_REGION( 0x10000, "sub", 0 ) /* sprite cpu */ | |
| 1453 | ROM_LOAD( "63701.bin", 0xc000, 0x4000, CRC(f5232d03) SHA1(e2a194e38633592fd6587690b3cb2669d93985c7) ) | |
| 1454 | ||
| 1455 | ROM_REGION( 0x10000, "sound", 0 ) /* audio cpu */ | |
| 1456 | ROM_LOAD( "3.bin", 0x08000, 0x08000, CRC(9efa95bb) SHA1(da997d9cc7b9e7b2c70a4b6d30db693086a6f7d8) ) | |
| 1457 | ||
| 1458 | ROM_REGION( 0x08000, "gfx1", ROMREGION_DISPOSE ) | |
| 1459 | ROM_LOAD( "8.bin", 0x00000, 0x08000, CRC(7a8b8db4) SHA1(8368182234f9d4d763d4714fd7567a9e31b7ebeb) ) /* chars */ | |
| 1460 | ||
| 1461 | ROM_REGION( 0x80000, "gfx2", ROMREGION_DISPOSE ) | |
| 1462 | ROM_LOAD( "11.bin", 0x00000, 0x10000, CRC(574face3) SHA1(481fe574cb79d0159a65ff7486cbc945d50538c5) ) /* sprites */ | |
| 1463 | ROM_LOAD( "12.bin", 0x10000, 0x10000, CRC(40507a76) SHA1(74581a4b6f48100bddf20f319903af2fe36f39fa) ) | |
| 1464 | ROM_LOAD( "13.bin", 0x20000, 0x10000, CRC(c8b91e17) SHA1(0ce6f6ef68ecc7309a2923f7e756d5e2bf5c7a4a) ) | |
| 1465 | ROM_LOAD( "14.bin", 0x30000, 0x10000, CRC(cb4f231b) SHA1(9f2270f9ceedfe51c5e9a9bbb00d6f43dbc4a3ea) ) ROM_LOAD( "15.bin", 0x40000, 0x10000, CRC(a0a0c261) SHA1(25c534d82bd237386d447d72feee8d9541a5ded4) ) | |
| 1466 | ROM_LOAD( "15.bin", 0x40000, 0x10000, CRC(a0a0c261) SHA1(25c534d82bd237386d447d72feee8d9541a5ded4) ) | |
| 1467 | ROM_LOAD( "16.bin", 0x50000, 0x10000, CRC(6ba152f6) SHA1(a301ff809be0e1471f4ff8305b30c2fa4aa57fae) ) | |
| 1468 | ROM_LOAD( "17.bin", 0x60000, 0x10000, CRC(3220a0b6) SHA1(24a16ea509e9aff82b9ddd14935d61bb71acff84) ) | |
| 1469 | ROM_LOAD( "18.bin", 0x70000, 0x10000, CRC(65c7517d) SHA1(f177ba9c1c7cc75ff04d5591b9865ee364788f94) ) | |
| 1470 | ||
| 1471 | ROM_REGION( 0x40000, "gfx3", ROMREGION_DISPOSE ) | |
| 1472 | ROM_LOAD( "9.bin", 0x00000, 0x10000, CRC(7c435887) SHA1(ecb76f2148fa9773426f05aac208eb3ac02747db) ) /* tiles */ | |
| 1473 | ROM_LOAD( "10.bin", 0x10000, 0x10000, CRC(c6640aed) SHA1(f156c337f48dfe4f7e9caee9a72c7ea3d53e3098) ) | |
| 1474 | ROM_LOAD( "19.bin", 0x20000, 0x10000, CRC(22d65df2) SHA1(2f286a24ea7af438b39126a4ed0c515745981416) ) | |
| 1475 | ROM_LOAD( "20.bin", 0x30000, 0x10000, CRC(5fb42e7c) SHA1(7953316712c56c6f8ca6bba127319e24b618b646) ) | |
| 1476 | ||
| 1477 | ROM_REGION( 0x20000, "adpcm", 0 ) /* adpcm samples */ | |
| 1478 | ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(34755de3) SHA1(57c06d6ce9497901072fa50a92b6ed0d2d4d6528) ) | |
| 1479 | ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(904de6f8) SHA1(3623e5ea05fd7c455992b7ed87e605b87c3850aa) ) | |
| 1480 | ||
| 1481 | ROM_REGION( 0x0300, "proms", 0 ) | |
| 1482 | ROM_LOAD( "21j-k-0", 0x0000, 0x0100, CRC(fdb130a9) SHA1(4c4f214229b9fab2b5d69c745ec5428787b89e1f) ) /* unknown */ | |
| 1483 | ROM_LOAD( "21j-l-0", 0x0100, 0x0200, CRC(46339529) SHA1(64f4c42a826d67b7cbaa8a23a45ebc4eb6248891) ) /* unknown */ | |
| 1484 | ROM_END | |
| 1485 | ||
| 1446 | 1486 | /* this is a well known italian bootleg of Double Dragon it can be identified by the following gameplay trait |
| 1447 | 1487 | -- The Boss of level 4 is coloured like level 1 and 5 instead of green, and is invulnerable to rocks attack. |
| 1448 | 1488 | |
| r3171 | r3172 | |
| 1957 | 1997 | GAME( 1987, ddragnw1, ddragon, ddragon, ddragon, ddragon, ROT0, "[Technos] (Taito license)", "Double Dragon (World Set 2)", GAME_SUPPORTS_SAVE ) |
| 1958 | 1998 | GAME( 1987, ddragonu, ddragon, ddragon, ddragon, ddragon, ROT0, "[Technos] (Taito America license)", "Double Dragon (US Set 1)", GAME_SUPPORTS_SAVE ) |
| 1959 | 1999 | GAME( 1987, ddragoua, ddragon, ddragon, ddragon, ddragon, ROT0, "[Technos] (Taito America license)", "Double Dragon (US Set 2)", GAME_SUPPORTS_SAVE ) |
| 2000 | GAME( 1987, ddragob2, ddragon, ddragon, ddragon, ddragon, ROT0, "bootleg", "Double Dragon (bootleg)", GAME_SUPPORTS_SAVE ) | |
| 1960 | 2001 | GAME( 1987, ddragonb, ddragon, ddragonb, ddragon, ddragon, ROT0, "bootleg", "Double Dragon (bootleg with HD6309)", GAME_SUPPORTS_SAVE ) // according to dump notes |
| 1961 | 2002 | GAME( 1987, ddragnba, ddragon, ddragnba, ddragon, ddragon, ROT0, "bootleg", "Double Dragon (bootleg with M6803)", GAME_SUPPORTS_SAVE ) |
| 1962 | 2003 | GAME( 1987, ddgn6809, ddragon, ddgn6809, ddragon, ddgn6809, ROT0, "bootleg", "Double Dragon (bootleg with 3xM6809, set 1)", GAME_NOT_WORKING ) |
| r3171 | r3172 | |
|---|---|---|
| 606 | 606 | AM_RANGE(0x8080, 0x8080) AM_WRITE(mrokumei_sound_bank_w) |
| 607 | 607 | ADDRESS_MAP_END |
| 608 | 608 | |
| 609 | static ADDRESS_MAP_START( mrokumei_sound_readport, ADDRESS_SPACE_IO, 8 ) | |
| 610 | AM_RANGE(0x0000, 0xffff) AM_READ(mrokumei_sound_io_r) | |
| 611 | ADDRESS_MAP_END | |
| 612 | 609 | |
| 613 | static ADDRESS_MAP_START( mrokumei_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 614 | AM_RANGE(0x0000, 0xffff) AM_WRITE(mrokumei_sound_io_w) /* read address is 16-bit, write address is only 8-bit */ | |
| 610 | static ADDRESS_MAP_START( mrokumei_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 611 | AM_RANGE(0x0000, 0xffff) AM_READWRITE(mrokumei_sound_io_r, mrokumei_sound_io_w) /* read address is 16-bit, write address is only 8-bit */ | |
| 615 | 612 | ADDRESS_MAP_END |
| 616 | 613 | |
| 617 | 614 | /********************************************************************************/ |
| r3171 | r3172 | |
| 653 | 650 | AM_RANGE(0xff00, 0xffff) AM_WRITE(SMH_RAM) |
| 654 | 651 | ADDRESS_MAP_END |
| 655 | 652 | |
| 656 | static ADDRESS_MAP_START( reikaids_upd7807_readport, ADDRESS_SPACE_IO, 8 ) | |
| 657 | AM_RANGE(UPD7807_PORTA, UPD7807_PORTA) AM_READ(reikaids_upd7807_porta_r) | |
| 658 | AM_RANGE(UPD7807_PORTT, UPD7807_PORTT) AM_READ(reikaids_snd_command_r) | |
| 659 | ADDRESS_MAP_END | |
| 660 | ||
| 661 | static ADDRESS_MAP_START( reikaids_upd7807_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 662 | AM_RANGE(UPD7807_PORTA, UPD7807_PORTA) AM_WRITE(reikaids_upd7807_porta_w) | |
| 653 | static ADDRESS_MAP_START( reikaids_upd7807_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 654 | AM_RANGE(UPD7807_PORTA, UPD7807_PORTA) AM_READWRITE(reikaids_upd7807_porta_r, reikaids_upd7807_porta_w) | |
| 663 | 655 | AM_RANGE(UPD7807_PORTB, UPD7807_PORTB) AM_WRITE(dac_0_signed_data_w) |
| 664 | 656 | AM_RANGE(UPD7807_PORTC, UPD7807_PORTC) AM_WRITE(reikaids_upd7807_portc_w) |
| 657 | AM_RANGE(UPD7807_PORTT, UPD7807_PORTT) AM_READ(reikaids_snd_command_r) | |
| 665 | 658 | ADDRESS_MAP_END |
| 666 | 659 | |
| 667 | ||
| 668 | 660 | /**************************************************************************/ |
| 669 | 661 | |
| 670 | 662 | |
| r3171 | r3172 | |
| 706 | 698 | AM_RANGE(0xff00, 0xffff) AM_WRITE(SMH_RAM) |
| 707 | 699 | ADDRESS_MAP_END |
| 708 | 700 | |
| 709 | static ADDRESS_MAP_START( pteacher_upd7807_readport, ADDRESS_SPACE_IO, 8 ) | |
| 710 | AM_RANGE(UPD7807_PORTA, UPD7807_PORTA) AM_READ(pteacher_upd7807_porta_r) | |
| 701 | static ADDRESS_MAP_START( pteacher_upd7807_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 702 | AM_RANGE(UPD7807_PORTA, UPD7807_PORTA) AM_READWRITE(pteacher_upd7807_porta_r, pteacher_upd7807_porta_w) | |
| 703 | AM_RANGE(UPD7807_PORTB, UPD7807_PORTB) AM_WRITE(dac_0_signed_data_w) | |
| 704 | AM_RANGE(UPD7807_PORTC, UPD7807_PORTC) AM_READ_PORT("COIN") AM_WRITE(pteacher_upd7807_portc_w) | |
| 711 | 705 | AM_RANGE(UPD7807_PORTT, UPD7807_PORTT) AM_READ(pteacher_keyboard_r) |
| 712 | AM_RANGE(UPD7807_PORTC, UPD7807_PORTC) AM_READ_PORT("COIN") | |
| 713 | 706 | ADDRESS_MAP_END |
| 714 | 707 | |
| 715 | static ADDRESS_MAP_START( pteacher_upd7807_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 716 | AM_RANGE(UPD7807_PORTA, UPD7807_PORTA) AM_WRITE(pteacher_upd7807_porta_w) | |
| 717 | AM_RANGE(UPD7807_PORTB, UPD7807_PORTB) AM_WRITE(dac_0_signed_data_w) | |
| 718 | AM_RANGE(UPD7807_PORTC, UPD7807_PORTC) AM_WRITE(pteacher_upd7807_portc_w) | |
| 719 | ADDRESS_MAP_END | |
| 720 | ||
| 721 | ||
| 722 | 708 | /**************************************************************************/ |
| 723 | 709 | |
| 724 | 710 | |
| r3171 | r3172 | |
| 1231 | 1217 | |
| 1232 | 1218 | MDRV_CPU_ADD("audio", Z80, 16000000/4) /* 4MHz ? */ |
| 1233 | 1219 | MDRV_CPU_PROGRAM_MAP(mrokumei_sound_readmem,mrokumei_sound_writemem) |
| 1234 | MDRV_CPU_IO_MAP(mrokumei_sound_ | |
| 1220 | MDRV_CPU_IO_MAP(mrokumei_sound_ | |
| 1235 | 1221 | |
| 1236 | 1222 | /* video hardware */ |
| 1237 | 1223 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 1295 | 1281 | MDRV_CPU_ADD("audio", UPD7807, 8000000) /* ??? MHz (max speed for the 7807 is 12MHz) */ |
| 1296 | 1282 | MDRV_CPU_CONFIG(upd_config) |
| 1297 | 1283 | MDRV_CPU_PROGRAM_MAP(reikaids_upd7807_readmem,reikaids_upd7807_writemem) |
| 1298 | MDRV_CPU_IO_MAP(reikaids_upd7807_ | |
| 1284 | MDRV_CPU_IO_MAP(reikaids_upd7807_ | |
| 1299 | 1285 | MDRV_CPU_VBLANK_INT("main", upd7807_irq) |
| 1300 | 1286 | |
| 1301 | 1287 | MDRV_INTERLEAVE(500) // very high interleave required to sync for startup tests |
| r3171 | r3172 | |
| 1345 | 1331 | MDRV_CPU_ADD("audio", UPD7807, 9000000) /* 9MHz ? */ |
| 1346 | 1332 | MDRV_CPU_CONFIG(upd_config) |
| 1347 | 1333 | MDRV_CPU_PROGRAM_MAP(pteacher_upd7807_readmem,pteacher_upd7807_writemem) |
| 1348 | MDRV_CPU_IO_MAP(pteacher_upd7807_ | |
| 1334 | MDRV_CPU_IO_MAP(pteacher_upd7807_i | |
| 1349 | 1335 | MDRV_CPU_VBLANK_INT("main", upd7807_irq) |
| 1350 | 1336 | |
| 1351 | 1337 | MDRV_INTERLEAVE(100) // should be enough |
| r3171 | r3172 | |
| 1839 | 1825 | |
| 1840 | 1826 | GAME( 1991?,mjikaga, 0, lemnangl, mjikaga, mjikaga, ROT0, "Mitchell", "Mahjong Ikaga Desu ka (Japan)", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| 1841 | 1827 | |
| 1842 | ||
| 1843 |
| r3171 | r3172 | |
|---|---|---|
| 36 | 36 | memory_set_bank(1, data & 7); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | static | |
| 39 | static CUSTOM_I | |
| 40 | 40 | { |
| 41 | xxmissio_status = (xxmissio_status | 2) & ( input_port_read(machine, "IN2") | 0xfd ); | |
| 42 | return xxmissio_status; | |
| 41 | int bit_mask = (FPTR)param; | |
| 42 | return (xxmissio_status & bit_mask) ? 1 : 0; | |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | static WRITE8_HANDLER ( xxmissio_status_m_w ) |
| r3171 | r3172 | |
| 108 | 108 | AM_RANGE(0x8002, 0x8002) AM_READWRITE(ym2203_status_port_1_r, ym2203_control_port_1_w) |
| 109 | 109 | AM_RANGE(0x8003, 0x8003) AM_READWRITE(ym2203_read_port_1_r, ym2203_write_port_1_w) |
| 110 | 110 | |
| 111 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) | |
| 112 | AM_RANGE(0xa001, 0xa001) AM_READ(input_port_1_r) | |
| 113 | AM_RANGE(0xa002, 0xa002) AM_READ(xxmissio_status_r) | |
| 111 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1") | |
| 112 | AM_RANGE(0xa001, 0xa001) AM_READ_PORT("P2") | |
| 113 | AM_RANGE(0xa002, 0xa002) AM_READ_PORT("STATUS") | |
| 114 | 114 | AM_RANGE(0xa002, 0xa002) AM_WRITE(xxmissio_status_m_w) |
| 115 | 115 | AM_RANGE(0xa003, 0xa003) AM_WRITE(xxmissio_flipscreen_w) |
| 116 | 116 | |
| r3171 | r3172 | |
| 135 | 135 | AM_RANGE(0x8003, 0x8003) AM_READWRITE(ym2203_read_port_1_r, ym2203_write_port_1_w) |
| 136 | 136 | AM_RANGE(0x8006, 0x8006) AM_WRITE(xxmissio_bank_sel_w) |
| 137 | 137 | |
| 138 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) | |
| 139 | AM_RANGE(0xa001, 0xa001) AM_READ(input_port_1_r) | |
| 140 | AM_RANGE(0xa002, 0xa002) AM_READ(xxmissio_status_r) | |
| 138 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1") | |
| 139 | AM_RANGE(0xa001, 0xa001) AM_READ_PORT("P2") | |
| 140 | AM_RANGE(0xa002, 0xa002) AM_READ_PORT("STATUS") | |
| 141 | 141 | AM_RANGE(0xa002, 0xa002) AM_WRITE(xxmissio_status_s_w) |
| 142 | 142 | AM_RANGE(0xa003, 0xa003) AM_WRITE(xxmissio_flipscreen_w) |
| 143 | 143 | |
| r3171 | r3172 | |
| 155 | 155 | /****************************************************************************/ |
| 156 | 156 | |
| 157 | 157 | static INPUT_PORTS_START( xxmissio ) |
| 158 | PORT_START(" | |
| 158 | PORT_START("P1 | |
| 159 | 159 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 160 | 160 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) |
| 161 | 161 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| r3171 | r3172 | |
| 165 | 165 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 166 | 166 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 167 | 167 | |
| 168 | PORT_START(" | |
| 168 | PORT_START("P2 | |
| 169 | 169 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 170 | 170 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 171 | 171 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| r3171 | r3172 | |
| 222 | 222 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 223 | 223 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 224 | 224 | |
| 225 | PORT_START("IN2") | |
| 225 | PORT_START("STATUS") | |
| 226 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x01) | |
| 226 | 227 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 228 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x04) | |
| 229 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x08) | |
| 230 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x10) | |
| 231 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x20) | |
| 232 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x40) | |
| 233 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x80) | |
| 227 | 234 | INPUT_PORTS_END |
| 228 | 235 | |
| 229 | 236 | /****************************************************************************/ |
| r3171 | r3172 | |
|---|---|---|
| 64 | 64 | AM_RANGE(0xf000, 0xffff) AM_WRITE(SMH_RAM) AM_BASE(&nb1413m3_nvram) AM_SIZE(&nb1413m3_nvram_size) |
| 65 | 65 | ADDRESS_MAP_END |
| 66 | 66 | |
| 67 | ||
| 68 | static ADDRESS_MAP_START( readport_hyhoo, ADDRESS_SPACE_IO, 8 ) | |
| 67 | static ADDRESS_MAP_START( hyhoo_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 69 | 68 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 69 | // AM_RANGE(0x00, 0x00) AM_WRITE(nb1413m3_nmi_clock_w) | |
| 70 | 70 | AM_RANGE(0x00, 0x7f) AM_READ(nb1413m3_sndrom_r) |
| 71 | 71 | AM_RANGE(0x81, 0x81) AM_READ(ay8910_read_port_0_r) |
| 72 | AM_RANGE(0x90, 0x90) AM_READ_PORT("SYSTEM") | |
| 73 | AM_RANGE(0xa0, 0xa0) AM_READ(nb1413m3_inputport1_r) | |
| 74 | AM_RANGE(0xb0, 0xb0) AM_READ(nb1413m3_inputport2_r) | |
| 75 | AM_RANGE(0xd0, 0xd0) AM_READ(SMH_NOP) // unknown | |
| 76 | AM_RANGE(0xe0, 0xe1) AM_READ(nb1413m3_gfxrom_r) | |
| 77 | AM_RANGE(0xf0, 0xf0) AM_READ(nb1413m3_dipsw1_r) | |
| 78 | AM_RANGE(0xf1, 0xf1) AM_READ(nb1413m3_dipsw2_r) | |
| 79 | ADDRESS_MAP_END | |
| 80 | ||
| 81 | static ADDRESS_MAP_START( writeport_hyhoo, ADDRESS_SPACE_IO, 8 ) | |
| 82 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 83 | // AM_RANGE(0x00, 0x00) AM_WRITE(nb1413m3_nmi_clock_w) | |
| 84 | 72 | AM_RANGE(0x82, 0x82) AM_WRITE(ay8910_write_port_0_w) |
| 85 | 73 | AM_RANGE(0x83, 0x83) AM_WRITE(ay8910_control_port_0_w) |
| 74 | AM_RANGE(0x90, 0x90) AM_READ_PORT("SYSTEM") | |
| 86 | 75 | AM_RANGE(0x90, 0x97) AM_WRITE(hyhoo_blitter_w) |
| 87 | AM_RANGE(0xa0, 0xa0) AM_WRITE(nb1413m3_inputportsel_w) | |
| 88 | AM_RANGE(0xb0, 0xb0) AM_WRITE(nb1413m3_sndrombank1_w) | |
| 76 | AM_RANGE(0xa0, 0xa0) AM_READWRITE(nb1413m3_inputport1_r, nb1413m3_inputportsel_w) | |
| 77 | AM_RANGE(0xb0, 0xb0) AM_READWRITE(nb1413m3_inputport2_r, nb1413m3_sndrombank1_w) | |
| 89 | 78 | AM_RANGE(0xc0, 0xcf) AM_WRITE(SMH_RAM) AM_BASE(&hyhoo_clut) |
| 90 | AM_RANGE(0xd0, 0xd0) AM_WRITE(DAC_0_WRITE) | |
| 79 | AM_RANGE(0xd0, 0xd0) AM_READWRITE(SMH_NOP, DAC_0_WRITE) // unknown read | |
| 91 | 80 | AM_RANGE(0xe0, 0xe0) AM_WRITE(hyhoo_romsel_w) |
| 81 | AM_RANGE(0xe0, 0xe1) AM_READ(nb1413m3_gfxrom_r) | |
| 82 | AM_RANGE(0xf0, 0xf0) AM_READ(nb1413m3_dipsw1_r) | |
| 92 | 83 | // AM_RANGE(0xf0, 0xf0) AM_WRITE(SMH_NOP) |
| 84 | AM_RANGE(0xf1, 0xf1) AM_READ(nb1413m3_dipsw2_r) | |
| 93 | 85 | ADDRESS_MAP_END |
| 94 | 86 | |
| 95 | ||
| 96 | 87 | static INPUT_PORTS_START( hyhoo ) |
| 97 | 88 | PORT_START("DSWA") |
| 98 | 89 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) |
| r3171 | r3172 | |
| 271 | 262 | /* basic machine hardware */ |
| 272 | 263 | MDRV_CPU_ADD("main", Z80, 5000000/1) /* 5.00 MHz ?? */ |
| 273 | 264 | MDRV_CPU_PROGRAM_MAP(readmem_hyhoo, writemem_hyhoo) |
| 274 | MDRV_CPU_IO_MAP( | |
| 265 | MDRV_CPU_IO_MAP( | |
| 275 | 266 | MDRV_CPU_VBLANK_INT("main", nb1413m3_interrupt) |
| 276 | 267 | |
| 277 | 268 | MDRV_MACHINE_RESET(nb1413m3) |
| r3171 | r3172 | |
| 345 | 336 | |
| 346 | 337 | GAME( 1987, hyhoo, 0, hyhoo, hyhoo, hyhoo, ROT90, "Nichibutsu", "Taisen Quiz HYHOO (Japan)", 0 ) |
| 347 | 338 | GAME( 1987, hyhoo2, 0, hyhoo, hyhoo2, hyhoo2, ROT90, "Nichibutsu", "Taisen Quiz HYHOO 2 (Japan)", 0 ) |
| 339 |
| r3171 | r3172 | |
|---|---|---|
| 87 | 87 | astron_draw_characters(screen->machine, bitmap, cliprect); |
| 88 | 88 | astron_draw_sprites(bitmap, cliprect); |
| 89 | 89 | |
| 90 | /* display disc information */ | |
| 91 | popmessage("%s", laserdisc_describe_state(laserdisc)); | |
| 92 | ||
| 93 | 90 | return 0; |
| 94 | 91 | } |
| 95 | 92 |
| r3171 | r3172 | |
|---|---|---|
| 160 | 160 | |
| 161 | 161 | static ADDRESS_MAP_START( wldarrow_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 162 | 162 | AM_RANGE(0x0000, 0x2fff) AM_ROM |
| 163 | AM_RANGE(0x3800, 0x3800) AM_READ | |
| 163 | AM_RANGE(0x3800, 0x3800) AM_READ | |
| 164 | 164 | AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE(&wldarrow_videoram_0) AM_SIZE(&wldarrow_videoram_size) |
| 165 | 165 | AM_RANGE(0x6000, 0x7fff) AM_RAM AM_BASE(&wldarrow_videoram_1) |
| 166 | 166 | AM_RANGE(0x8000, 0x9fff) AM_RAM AM_BASE(&wldarrow_videoram_2) |
| 167 | 167 | AM_RANGE(0xcd00, 0xcdff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 168 | AM_RANGE(0xf000, 0xf000) AM_READWRITE(input_port_1_r, wldarrow_dac_1_w) | |
| 169 | AM_RANGE(0xf004, 0xf004) AM_READWRITE(input_port_2_r, lights_1_w) | |
| 170 | AM_RANGE(0xf006, 0xf006) AM_READWRITE(input_port_3_r, lights_2_w) | |
| 168 | AM_RANGE(0xf000, 0xf000) AM_READ_PORT("BITSW") AM_WRITE(wldarrow_dac_1_w) | |
| 169 | AM_RANGE(0xf004, 0xf004) AM_READ_PORT("IN1") AM_WRITE(lights_1_w) | |
| 170 | AM_RANGE(0xf006, 0xf006) AM_READ_PORT("IN2") AM_WRITE(lights_2_w) | |
| 171 | 171 | AM_RANGE(0xf008, 0xf008) AM_WRITE(counter_w) |
| 172 | 172 | AM_RANGE(0xf00f, 0xf00f) AM_WRITE(wldarrow_dac_2_w) |
| 173 | 173 | AM_RANGE(0xf0f0, 0xf0f0) AM_WRITE(wldarrow_dac_3_w) |
| r3171 | r3172 | |
| 231 | 231 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 232 | 232 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 233 | 233 | |
| 234 | PORT_START("IN | |
| 234 | PORT_START("IN1") | |
| 235 | 235 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Stop Reel 3") /* Skill Stop only? */ |
| 236 | 236 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Stop Reel 2") /* Skill Stop only? */ |
| 237 | 237 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Stop Reel 1") /* Skill Stop only? */ |
| r3171 | r3172 | |
| 247 | 247 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 248 | 248 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 249 | 249 | |
| 250 | PORT_START("IN | |
| 250 | PORT_START("IN2") | |
| 251 | 251 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED) |
| 252 | ||
| 253 | 252 | INPUT_PORTS_END |
| 254 | 253 | |
| 255 | 254 | |
| r3171 | r3172 | |
| 302 | 301 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 303 | 302 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 304 | 303 | |
| 305 | PORT_START("IN | |
| 304 | PORT_START("IN1") | |
| 306 | 305 | PORT_DIPNAME( 0x01, 0x01, "2-0" ) |
| 307 | 306 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 308 | 307 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r3171 | r3172 | |
| 328 | 327 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 329 | 328 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 330 | 329 | |
| 331 | PORT_START("IN | |
| 330 | PORT_START("IN2") | |
| 332 | 331 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED) |
| 333 | ||
| 334 | 332 | INPUT_PORTS_END |
| 335 | 333 | |
| 336 | 334 |
| r3171 | r3172 | |
|---|---|---|
| 50 | 50 | static WRITE16_HANDLER( wwfwfest_paletteram16_xxxxBBBBGGGGRRRR_word_w ); |
| 51 | 51 | static WRITE16_HANDLER( wwfwfest_1410_write ); /* priority write */ |
| 52 | 52 | static WRITE16_HANDLER( wwfwfest_scroll_write ); /* scrolling write */ |
| 53 | static READ16_HANDLER( wwfwfest_inputs_read ); | |
| 54 | 53 | static WRITE8_HANDLER( oki_bankswitch_w ); |
| 55 | 54 | static WRITE16_HANDLER ( wwfwfest_soundwrite ); |
| 56 | 55 | |
| r3171 | r3172 | |
| 77 | 76 | AM_RANGE(0x10000a, 0x10000b) AM_WRITE(wwfwfest_flipscreen_w) |
| 78 | 77 | AM_RANGE(0x140000, 0x140001) AM_WRITE(SMH_NOP) /* Irq 3 ack */ |
| 79 | 78 | AM_RANGE(0x140002, 0x140003) AM_WRITE(SMH_NOP) /* Irq 2 ack */ |
| 80 | AM_RANGE(0x14000 | |
| 79 | AM_RANGE(0x14000c, 0x14000d) AM_WRITE(wwfwfest_soundwrite) | |
| 81 | 80 | AM_RANGE(0x140010, 0x140011) AM_WRITE(wwfwfest_1410_write) |
| 82 | AM_RANGE(0x140020, 0x140027) AM_READ(wwfwfest_inputs_read) /* Inputs */ | |
| 81 | AM_RANGE(0x140020, 0x140021) AM_READ_PORT("P1") | |
| 82 | AM_RANGE(0x140022, 0x140023) AM_READ_PORT("P2") | |
| 83 | AM_RANGE(0x140024, 0x140025) AM_READ_PORT("P3") | |
| 84 | AM_RANGE(0x140026, 0x140027) AM_READ_PORT("P4") | |
| 83 | 85 | AM_RANGE(0x180000, 0x18ffff) AM_READWRITE(wwfwfest_paletteram16_xxxxBBBBGGGGRRRR_word_r,wwfwfest_paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE(&paletteram16) |
| 84 | 86 | AM_RANGE(0x1c0000, 0x1c3fff) AM_RAM /* Work Ram */ |
| 85 | 87 | ADDRESS_MAP_END |
| r3171 | r3172 | |
| 142 | 144 | } |
| 143 | 145 | } |
| 144 | 146 | |
| 145 | static READ16_HANDLER( wwfwfest_inputs_read ) | |
| 146 | { | |
| 147 | int tmp = 0; | |
| 148 | ||
| 149 | switch (offset) | |
| 150 | { | |
| 151 | case 0x00: | |
| 152 | tmp = input_port_read(machine, "P1") | input_port_read(machine, "SYSTEM") << 8; | |
| 153 | tmp &= 0xcfff; | |
| 154 | tmp |= ((input_port_read(machine, "DSW2") & 0xc0) << 6); | |
| 155 | break; | |
| 156 | case 0x01: | |
| 157 | tmp = input_port_read(machine, "P2"); | |
| 158 | tmp &= 0xc0ff; | |
| 159 | tmp |= ((input_port_read(machine, "DSW2") & 0x3f)<<8); | |
| 160 | break; | |
| 161 | case 0x02: | |
| 162 | tmp = input_port_read(machine, "P3"); | |
| 163 | tmp &= 0xc0ff; | |
| 164 | tmp |= ((input_port_read(machine, "DSW1") & 0x3f)<<8); | |
| 165 | break; | |
| 166 | case 0x03: | |
| 167 | tmp = (input_port_read(machine, "P4") | input_port_read(machine, "VBLANK") << 8) ; | |
| 168 | tmp &= 0xfcff; | |
| 169 | tmp |= ((input_port_read(machine, "DSW1") & 0xc0) << 2); | |
| 170 | break; | |
| 171 | } | |
| 172 | ||
| 173 | return tmp; | |
| 174 | } | |
| 175 | ||
| 176 | 147 | /*- Sound Related (from dd3) -*/ |
| 177 | 148 | |
| 178 | 149 | static WRITE8_HANDLER( oki_bankswitch_w ) |
| r3171 | r3172 | |
| 192 | 163 | There are 4 players, 2 sets of dipswitches and 2 misc |
| 193 | 164 | *******************************************************************************/ |
| 194 | 165 | |
| 166 | /* DIPs are spread accross the other input ports */ | |
| 167 | static CUSTOM_INPUT( dsw_3f_r ) | |
| 168 | { | |
| 169 | const char *tag = param; | |
| 170 | return input_port_read(field->port->machine, tag) & 0x3f; | |
| 171 | } | |
| 172 | ||
| 173 | static CUSTOM_INPUT( dsw_c0_r ) | |
| 174 | { | |
| 175 | const char *tag = param; | |
| 176 | return (input_port_read(field->port->machine, tag) & 0xc0) >> 6; | |
| 177 | } | |
| 178 | ||
| 179 | ||
| 195 | 180 | static INPUT_PORTS_START( wwfwfest ) |
| 196 | PORT_START("P1") | |
| 181 | PORT_START("P1") | |
| 197 | 182 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) |
| 198 | 183 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) |
| 199 | 184 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) |
| r3171 | r3172 | |
| 202 | 187 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 203 | 188 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 204 | 189 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 190 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 191 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 192 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 193 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 194 | PORT_BIT( 0x3000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dsw_c0_r, "DSW2") | |
| 195 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 196 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 205 | 197 | |
| 206 | PORT_START("P2") | |
| 198 | PORT_START("P2") | |
| 207 | 199 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 208 | 200 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 209 | 201 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| r3171 | r3172 | |
| 212 | 204 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 213 | 205 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 214 | 206 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 207 | PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dsw_3f_r, "DSW2") | |
| 215 | 208 | |
| 216 | PORT_START("P3") | |
| 209 | PORT_START("P3") | |
| 217 | 210 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) |
| 218 | 211 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) |
| 219 | 212 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3) |
| r3171 | r3172 | |
| 222 | 215 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) |
| 223 | 216 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 224 | 217 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START3 ) |
| 218 | PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dsw_3f_r, "DSW1") | |
| 225 | 219 | |
| 226 | PORT_START("P4") | |
| 220 | PORT_START("P4") | |
| 227 | 221 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) |
| 228 | 222 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) |
| 229 | 223 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4) |
| r3171 | r3172 | |
| 232 | 226 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) |
| 233 | 227 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 234 | 228 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START4 ) |
| 229 | PORT_BIT( 0x0300, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dsw_c0_r, "DSW1") | |
| 230 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_VBLANK ) | |
| 231 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 232 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 233 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 234 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 235 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 235 | 236 | |
| 236 | PORT_START("SYSTEM") /* Misc 1 */ | |
| 237 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 238 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 239 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 240 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 241 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 242 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 243 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 244 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 245 | ||
| 246 | PORT_START("VBLANK") /* Misc 2 */ | |
| 247 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 248 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 249 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK ) | |
| 250 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 251 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 252 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 253 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 254 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 255 | ||
| 256 | 237 | /* Nb: There are actually 3 dips on the board, 2 * 8, and 1 *4 */ |
| 257 | ||
| 258 | PORT_START("DSW1") /* Dips 1 */ | |
| 238 | PORT_START("DSW1") | |
| 259 | 239 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2") |
| 260 | 240 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) |
| 261 | 241 | PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) |
| r3171 | r3172 | |
| 280 | 260 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 281 | 261 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 282 | 262 | |
| 283 | PORT_START("DSW2") | |
| 263 | PORT_START("DSW2") | |
| 284 | 264 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 285 | 265 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |
| 286 | 266 | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) |
| r3171 | r3172 | |
|---|---|---|
| 155 | 155 | AM_RANGE(0x8000, 0xffff) AM_WRITE(SMH_ROM ) // Banked ROM |
| 156 | 156 | ADDRESS_MAP_END |
| 157 | 157 | |
| 158 | static ADDRESS_MAP_START( fuuki16_sound_ | |
| 158 | static ADDRESS_MAP_START( fuuki16_sound_io_ma | |
| 159 | 159 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 160 | AM_RANGE(0x11, 0x11) AM_READ(soundlatch_r ) // From Main CPU | |
| 161 | AM_RANGE(0x50, 0x50) AM_READ(ym3812_status_port_0_r ) // YM3812 | |
| 162 | AM_RANGE(0x60, 0x60) AM_READ(okim6295_status_0_r ) // M6295 | |
| 163 | ADDRESS_MAP_END | |
| 164 | ||
| 165 | static ADDRESS_MAP_START( fuuki16_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 166 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 167 | 160 | AM_RANGE(0x00, 0x00) AM_WRITE(fuuki16_sound_rombank_w ) // ROM Bank |
| 168 | AM_RANGE(0x11, 0x11) AM_WRITE(SMH_NOP | |
| 161 | AM_RANGE(0x11, 0x11) AM_READWRITE(soundlatch_r, SMH_NOP | |
| 169 | 162 | AM_RANGE(0x20, 0x20) AM_WRITE(fuuki16_oki_banking_w ) // Oki Banking |
| 170 | 163 | AM_RANGE(0x30, 0x30) AM_WRITE(SMH_NOP ) // ? In the NMI routine |
| 171 | 164 | AM_RANGE(0x40, 0x40) AM_WRITE(ym2203_control_port_0_w ) // YM2203 |
| 172 | 165 | AM_RANGE(0x41, 0x41) AM_WRITE(ym2203_write_port_0_w ) |
| 173 | AM_RANGE(0x50, 0x50) AM_WRITE(ym3812_control_port_0_w | |
| 166 | AM_RANGE(0x50, 0x50) AM_READWRITE(ym3812_status_port_0_r, ym3812_control_port_0_w | |
| 174 | 167 | AM_RANGE(0x51, 0x51) AM_WRITE(ym3812_write_port_0_w ) |
| 168 | AM_RANGE(0x60, 0x60) AM_READ(okim6295_status_0_r ) // M6295 | |
| 175 | 169 | AM_RANGE(0x61, 0x61) AM_WRITE(okim6295_data_0_w ) // M6295 |
| 176 | 170 | ADDRESS_MAP_END |
| 177 | 171 | |
| r3171 | r3172 | |
| 477 | 471 | |
| 478 | 472 | MDRV_CPU_ADD("audio", Z80, 3000000) /* ? */ |
| 479 | 473 | MDRV_CPU_PROGRAM_MAP(fuuki16_sound_readmem,fuuki16_sound_writemem) |
| 480 | MDRV_CPU_IO_MAP(fuuki16_sound_ | |
| 474 | MDRV_CPU_IO_MAP(fuuki16_sound_ | |
| 481 | 475 | |
| 482 | 476 | MDRV_MACHINE_START(fuuki16) |
| 483 | 477 | MDRV_MACHINE_RESET(fuuki16) |
| r3171 | r3172 | |
| 653 | 647 | ***************************************************************************/ |
| 654 | 648 | |
| 655 | 649 | ROM_START( pbancho ) |
| 656 | ||
| 657 | 650 | ROM_REGION( 0x100000, "main", 0 ) /* 68000 Code */ |
| 658 | 651 | ROM_LOAD16_BYTE( "rom2.no1", 0x000000, 0x080000, CRC(1b4fd178) SHA1(02cf3d2554b29cd253470d68ea959738f3b98dbe) ) // 1xxxxxxxxxxxxxxxxxx = 0xFF |
| 659 | 652 | ROM_LOAD16_BYTE( "rom1.no2", 0x000001, 0x080000, CRC(9cf510a5) SHA1(08e79b5bbd1c011c32f82dd15fba42d7898861be) ) // 1xxxxxxxxxxxxxxxxxx = 0xFF |
| r3171 | r3172 | |
| 677 | 670 | |
| 678 | 671 | ROM_REGION( 0x040000, "oki", 0 ) /* Samples */ |
| 679 | 672 | ROM_LOAD( "rom25.no3", 0x000000, 0x040000, CRC(a7bfb5ea) SHA1(61937eae4f8855bc09c494aff52d76d41dc3b76a) ) |
| 680 | ||
| 681 | 673 | ROM_END |
| 682 | 674 | |
| 683 | 675 | |
| r3171 | r3172 | |
| 692 | 684 | GAME( 1995, gogomile, 0, fuuki16, gogomile, 0, ROT0, "Fuuki", "Go Go! Mile Smile", 0 ) |
| 693 | 685 | GAME( 1995, gogomilj, gogomile, fuuki16, gogomilj, 0, ROT0, "Fuuki", "Susume! Mile Smile (Japan)", 0 ) |
| 694 | 686 | GAME( 1996, pbancho, 0, fuuki16, pbancho, 0, ROT0, "Fuuki", "Gyakuten!! Puzzle Bancho (Japan)", 0) |
| 687 |
| r3171 | r3172 | |
|---|---|---|
| 226 | 226 | static UINT8 led_reg0, led_reg1; |
| 227 | 227 | |
| 228 | 228 | static UINT32 *work_ram; |
| 229 | static UINT8 *backup_ram; | |
| 230 | 229 | |
| 231 | 230 | |
| 232 | 231 | static WRITE32_HANDLER( paletteram32_w ) |
| r3171 | r3172 | |
| 970 | 969 | AM_RANGE(0x780c0000, 0x780c0003) AM_READWRITE(cgboard_dsp_comm_r_ppc, cgboard_dsp_comm_w_ppc) |
| 971 | 970 | AM_RANGE(0x7d000000, 0x7d00ffff) AM_READ(sysreg_r) |
| 972 | 971 | AM_RANGE(0x7d010000, 0x7d01ffff) AM_WRITE(sysreg_w) |
| 973 | AM_RANGE(0x7d020000, 0x7d021fff) AM_READWRITE8(timekeeper_ | |
| 972 | AM_RANGE(0x7d020000, 0x7d021fff) AM_DEVREADWRITE8(M48T58, "m48t58", timekeeper_ | |
| 974 | 973 | AM_RANGE(0x7d030000, 0x7d030007) AM_READ(K056800_host_r) |
| 975 | 974 | AM_RANGE(0x7d030000, 0x7d030007) AM_WRITE(K056800_host_w) |
| 976 | 975 | AM_RANGE(0x7d030008, 0x7d03000f) AM_WRITE(K056800_host_w) |
| r3171 | r3172 | |
| 1091 | 1090 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, ASSERT_LINE); |
| 1092 | 1091 | } |
| 1093 | 1092 | |
| 1093 | static const timekeeper_config timekeeper_intf = | |
| 1094 | { | |
| 1095 | "m48t58" | |
| 1096 | }; | |
| 1097 | ||
| 1094 | 1098 | static MACHINE_DRIVER_START( nwktr ) |
| 1095 | 1099 | |
| 1096 | 1100 | /* basic machine hardware */ |
| r3171 | r3172 | |
| 1108 | 1112 | |
| 1109 | 1113 | MDRV_MACHINE_START(nwktr) |
| 1110 | 1114 | MDRV_MACHINE_RESET(nwktr) |
| 1111 | MDRV_NVRAM_HANDLER( timekeeper_0 ) | |
| 1112 | 1115 | |
| 1113 | 1116 | MDRV_3DFX_VOODOO_1_ADD("voodoo", STD_VOODOO_1_CLOCK, 2, "main") |
| 1114 | 1117 | MDRV_3DFX_VOODOO_TMU_MEMORY(0, 2) |
| r3171 | r3172 | |
| 1133 | 1136 | MDRV_SOUND_ROUTE(0, "left", 1.0) |
| 1134 | 1137 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| 1135 | 1138 | |
| 1139 | MDRV_DEVICE_ADD( "m48t58", M48T58 ) | |
| 1140 | MDRV_DEVICE_CONFIG( timekeeper_intf ) | |
| 1136 | 1141 | MACHINE_DRIVER_END |
| 1137 | 1142 | |
| 1138 | 1143 | /*****************************************************************************/ |
| r3171 | r3172 | |
| 1145 | 1150 | cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ2, PULSE_LINE); |
| 1146 | 1151 | } |
| 1147 | 1152 | |
| 1148 | static | |
| 1153 | static DRIVER | |
| 1149 | 1154 | { |
| 1150 | 1155 | init_konami_cgboard(1, CGBOARD_TYPE_NWKTR); |
| 1151 | 1156 | set_cgboard_texture_bank(0, 5, memory_region(machine, "user5")); |
| 1152 | 1157 | |
| 1153 | 1158 | sharc_dataram = auto_malloc(0x100000); |
| 1154 | 1159 | led_reg0 = led_reg1 = 0x7f; |
| 1155 | timekeeper_init(machine, 0, TIMEKEEPER_M48T58, backup_ram); | |
| 1156 | 1160 | |
| 1157 | 1161 | K056800_init(sound_irq_callback); |
| 1158 | 1162 | K033906_init(); |
| r3171 | r3172 | |
| 1164 | 1168 | lanc2_init(); |
| 1165 | 1169 | } |
| 1166 | 1170 | |
| 1167 | static DRIVER_INIT(thrilld) | |
| 1168 | { | |
| 1169 | int i; | |
| 1170 | UINT16 checksum; | |
| 1171 | 1171 | |
| 1172 | backup_ram = auto_malloc(0x2000); | |
| 1173 | memset(backup_ram, 0, 0x2000); | |
| 1174 | ||
| 1175 | /* RTC data */ | |
| 1176 | backup_ram[0x00] = 0x47; // 'G' | |
| 1177 | backup_ram[0x01] = 0x43; // 'C' | |
| 1178 | backup_ram[0x02] = 0x36; // '6' | |
| 1179 | backup_ram[0x03] = 0x37; // '7' | |
| 1180 | backup_ram[0x04] = 0x36; // '6' | |
| 1181 | backup_ram[0x05] = 0x00; // | |
| 1182 | backup_ram[0x06] = 0x00; // ? | |
| 1183 | backup_ram[0x07] = 0x00; // ? | |
| 1184 | backup_ram[0x08] = 0x19; // | |
| 1185 | backup_ram[0x09] = 0x99; // 1999 | |
| 1186 | backup_ram[0x0a] = 0x4a; // 'J' | |
| 1187 | backup_ram[0x0b] = 0x41; // 'A' | |
| 1188 | backup_ram[0x0c] = 0x41; // | |
| 1189 | backup_ram[0x0d] = 0x00; // | |
| 1190 | ||
| 1191 | checksum = 0; | |
| 1192 | for (i=0; i < 14; i+=2) | |
| 1193 | { | |
| 1194 | checksum += (backup_ram[i] << 8) | (backup_ram[i+1]); | |
| 1195 | checksum &= 0xffff; | |
| 1196 | } | |
| 1197 | checksum = -1 - checksum; | |
| 1198 | ||
| 1199 | backup_ram[0x0e] = (checksum >> 8) & 0xff; // checksum | |
| 1200 | backup_ram[0x0f] = (checksum >> 0) & 0xff; // checksum | |
| 1201 | ||
| 1202 | init_nwktr(machine); | |
| 1203 | } | |
| 1204 | ||
| 1205 | static DRIVER_INIT(racingj) | |
| 1206 | { | |
| 1207 | int i; | |
| 1208 | UINT32 checksum; | |
| 1209 | ||
| 1210 | backup_ram = auto_malloc(0x2000); | |
| 1211 | memset(backup_ram, 0, 0x2000); | |
| 1212 | ||
| 1213 | /* RTC data */ | |
| 1214 | backup_ram[0x00] = 0x47; // 'G' | |
| 1215 | backup_ram[0x01] = 0x6e; // 'n' | |
| 1216 | backup_ram[0x02] = 0x36; // '6' | |
| 1217 | backup_ram[0x03] = 0x37; // '7' | |
| 1218 | backup_ram[0x04] = 0x36; // '6' | |
| 1219 | backup_ram[0x05] = 0x00; // | |
| 1220 | backup_ram[0x06] = 0x00; // | |
| 1221 | backup_ram[0x07] = 0x00; // | |
| 1222 | backup_ram[0x08] = 0x00; // | |
| 1223 | backup_ram[0x09] = 0x00; // | |
| 1224 | backup_ram[0x0a] = 0x4a; // 'J' | |
| 1225 | backup_ram[0x0b] = 0x41; // 'A' | |
| 1226 | backup_ram[0x0c] = 0x45; // 'E' | |
| 1227 | backup_ram[0x0d] = 0x00; // | |
| 1228 | ||
| 1229 | checksum = 0; | |
| 1230 | for (i=0; i < 14; i+=2) | |
| 1231 | { | |
| 1232 | checksum += (backup_ram[i] << 8) | (backup_ram[i+1]); | |
| 1233 | checksum &= 0xffff; | |
| 1234 | } | |
| 1235 | checksum = -1 - checksum; | |
| 1236 | backup_ram[0x0e] = (checksum >> 8) & 0xff; // checksum | |
| 1237 | backup_ram[0x0f] = (checksum >> 0) & 0xff; // checksum | |
| 1238 | ||
| 1239 | init_nwktr(machine); | |
| 1240 | } | |
| 1241 | ||
| 1242 | static DRIVER_INIT(racingj2) | |
| 1243 | { | |
| 1244 | int i; | |
| 1245 | UINT32 checksum; | |
| 1246 | ||
| 1247 | backup_ram = auto_malloc(0x2000); | |
| 1248 | memset(backup_ram, 0, 0x2000); | |
| 1249 | ||
| 1250 | /* RTC data */ | |
| 1251 | backup_ram[0x00] = 0x47; // 'G' | |
| 1252 | backup_ram[0x01] = 0x6e; // 'n' | |
| 1253 | backup_ram[0x02] = 0x38; // '8' | |
| 1254 | backup_ram[0x03] = 0x38; // '8' | |
| 1255 | backup_ram[0x04] = 0x38; // '8' | |
| 1256 | backup_ram[0x05] = 0x00; // | |
| 1257 | backup_ram[0x06] = 0x00; // | |
| 1258 | backup_ram[0x07] = 0x00; // | |
| 1259 | backup_ram[0x08] = 0x00; // | |
| 1260 | backup_ram[0x09] = 0x00; // | |
| 1261 | backup_ram[0x0a] = 0x4a; // 'J' | |
| 1262 | backup_ram[0x0b] = 0x41; // 'A' | |
| 1263 | backup_ram[0x0c] = 0x45; // 'E' | |
| 1264 | backup_ram[0x0d] = 0x00; // | |
| 1265 | ||
| 1266 | checksum = 0; | |
| 1267 | for (i=0; i < 14; i+=2) | |
| 1268 | { | |
| 1269 | checksum += (backup_ram[i] << 8) | (backup_ram[i+1]); | |
| 1270 | checksum &= 0xffff; | |
| 1271 | } | |
| 1272 | checksum = -1 - checksum; | |
| 1273 | backup_ram[0x0e] = (checksum >> 8) & 0xff; // checksum | |
| 1274 | backup_ram[0x0f] = (checksum >> 0) & 0xff; // checksum | |
| 1275 | ||
| 1276 | init_nwktr(machine); | |
| 1277 | } | |
| 1278 | ||
| 1279 | ||
| 1280 | 1172 | /*****************************************************************************/ |
| 1281 | 1173 | |
| 1282 | 1174 | ROM_START(racingj) |
| r3171 | r3172 | |
| 1284 | 1176 | ROM_LOAD16_WORD_SWAP("676nc01.bin", 0x000000, 0x200000, CRC(690346b5) SHA1(157ab6788382ef4f5a8772f08819f54d0856fcc8)) |
| 1285 | 1177 | |
| 1286 | 1178 | ROM_REGION32_BE(0x800000, "user2", 0) /* Data roms */ |
| 1287 | ROM_LOAD32_WORD_SWAP("676a04.bin", 0x000000, 0x200000, CRC(d7808cb6) SHA1(0668fae5bb94cc120fe196d4b18200f7b512317f)) | |
| 1288 | ROM_LOAD32_WORD_SWAP("676a05.bin", 0x000002, 0x200000, CRC(fb4de1ad) SHA1(f6aa4eb1b5d22901a2aaf899ed3237a9dfdc55b5)) | |
| 1179 | ROM_LOAD32_WORD_SWAP("676a04.bin", 0x000000, 0x200000, CRC(d7808cb6) SHA1(0668fae5bb94cc120fe196d4b18200f7b512317f)) | |
| 1180 | ROM_LOAD32_WORD_SWAP("676a05.bin", 0x000002, 0x200000, CRC(fb4de1ad) SHA1(f6aa4eb1b5d22901a2aaf899ed3237a9dfdc55b5)) | |
| 1289 | 1181 | |
| 1290 | 1182 | ROM_REGION32_BE(0x800000, "user5", 0) /* CG Board texture roms */ |
| 1291 | ROM_LOAD32_WORD_SWAP( "676a13.8x", 0x000000, 0x400000, CRC(29077763) SHA1(ee087ca0d41966ca0fd10727055bb1dcd05a0873) ) | |
| 1292 | ROM_LOAD32_WORD_SWAP( "676a14.16x", 0x000002, 0x400000, CRC(50a7e3c0) SHA1(7468a66111a3ddf7c043cd400fa175cae5f65632) ) | |
| 1183 | ROM_LOAD32_WORD_SWAP( "676a13.8x", 0x000000, 0x400000, CRC(29077763) SHA1(ee087ca0d41966ca0fd10727055bb1dcd05a0873) ) | |
| 1184 | ROM_LOAD32_WORD_SWAP( "676a14.16x", 0x000002, 0x400000, CRC(50a7e3c0) SHA1(7468a66111a3ddf7c043cd400fa175cae5f65632) ) | |
| 1293 | 1185 | |
| 1294 | 1186 | ROM_REGION(0x80000, "audio", 0) /* 68k program roms */ |
| 1295 | ||
| 1187 | | |
| 1296 | 1188 | |
| 1297 | 1189 | ROM_REGION(0x1000000, "rf", 0) /* other roms (textures?) */ |
| 1298 | ROM_LOAD( "676a09.16p", 0x000000, 0x400000, CRC(f85c8dc6) SHA1(8b302c80be309b5cc68b75945fcd7b87a56a4c9b) ) | |
| 1299 | ROM_LOAD( "676a10.14p", 0x400000, 0x400000, CRC(7b5b7828) SHA1(aec224d62e4b1e8fdb929d7947ce70d84ba676cf) ) | |
| 1190 | ROM_LOAD( "676a09.16p", 0x000000, 0x400000, CRC(f85c8dc6) SHA1(8b302c80be309b5cc68b75945fcd7b87a56a4c9b) ) | |
| 1191 | ROM_LOAD( "676a10.14p", 0x400000, 0x400000, CRC(7b5b7828) SHA1(aec224d62e4b1e8fdb929d7947ce70d84ba676cf) ) | |
| 1192 | ||
| 1193 | ROM_REGION(0x2000, "m48t58",0) | |
| 1194 | ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(47e1628c) SHA1(7c42d06ae2f2cd24d083890f333552cbf4f1d3c9) ) | |
| 1300 | 1195 | ROM_END |
| 1301 | 1196 | |
| 1302 | 1197 | ROM_START(racingj2) |
| r3171 | r3172 | |
| 1304 | 1199 | ROM_LOAD16_WORD_SWAP("888a01.27p", 0x000000, 0x200000, CRC(d077890a) SHA1(08b252324cf46fbcdb95e8f9312287920cd87c5d)) |
| 1305 | 1200 | |
| 1306 | 1201 | ROM_REGION32_BE(0x800000, "user2", 0) /* Data roms */ |
| 1307 | ROM_LOAD32_WORD_SWAP( "676a04.bin", 0x000000, 0x200000, CRC(d7808cb6) SHA1(0668fae5bb94cc120fe196d4b18200f7b512317f)) | |
| 1308 | ROM_LOAD32_WORD_SWAP( "676a05.bin", 0x000002, 0x200000, CRC(fb4de1ad) SHA1(f6aa4eb1b5d22901a2aaf899ed3237a9dfdc55b5)) | |
| 1202 | ROM_LOAD32_WORD_SWAP( "676a04.bin", 0x000000, 0x200000, CRC(d7808cb6) SHA1(0668fae5bb94cc120fe196d4b18200f7b512317f)) | |
| 1203 | ROM_LOAD32_WORD_SWAP( "676a05.bin", 0x000002, 0x200000, CRC(fb4de1ad) SHA1(f6aa4eb1b5d22901a2aaf899ed3237a9dfdc55b5)) | |
| 1309 | 1204 | ROM_LOAD32_WORD_SWAP( "888a06.12t", 0x400000, 0x200000, CRC(00cbec4d) SHA1(1ce7807d86e90edbf4eecba462a27c725f5ad862)) |
| 1310 | 1205 | |
| 1311 | 1206 | ROM_REGION32_BE(0x800000, "user5", 0) /* CG Board Texture roms */ |
| 1312 | ROM_LOAD32_WORD_SWAP( "888a13.8x", 0x000000, 0x400000, CRC(2292f530) SHA1(0f4d1332708fd5366a065e0a928cc9610558b42d) ) | |
| 1313 | ROM_LOAD32_WORD_SWAP( "888a14.16x", 0x000002, 0x400000, CRC(6a834a26) SHA1(d1fbd7ae6afd05f0edac4efde12a5a45aa2bc7df) ) | |
| 1207 | ROM_LOAD32_WORD_SWAP( "888a13.8x", 0x000000, 0x400000, CRC(2292f530) SHA1(0f4d1332708fd5366a065e0a928cc9610558b42d) ) | |
| 1208 | ROM_LOAD32_WORD_SWAP( "888a14.16x", 0x000002, 0x400000, CRC(6a834a26) SHA1(d1fbd7ae6afd05f0edac4efde12a5a45aa2bc7df) ) | |
| 1314 | 1209 | |
| 1315 | 1210 | ROM_REGION(0x80000, "audio", 0) /* 68k program roms */ |
| 1316 | ||
| 1211 | | |
| 1317 | 1212 | |
| 1318 | 1213 | ROM_REGION(0x1000000, "rf", 0) /* PCM sample roms */ |
| 1319 | ROM_LOAD( "888a09.16p", 0x000000, 0x400000, CRC(11e2fed2) SHA1(24b8a367b59fedb62c56f066342f2fa87b135fc5) ) | |
| 1320 | ROM_LOAD( "888a10.14p", 0x400000, 0x400000, CRC(328ce610) SHA1(dbbc779a1890c53298c0db129d496df048929496) ) | |
| 1214 | ROM_LOAD( "888a09.16p", 0x000000, 0x400000, CRC(11e2fed2) SHA1(24b8a367b59fedb62c56f066342f2fa87b135fc5) ) | |
| 1215 | ROM_LOAD( "888a10.14p", 0x400000, 0x400000, CRC(328ce610) SHA1(dbbc779a1890c53298c0db129d496df048929496) ) | |
| 1216 | ||
| 1217 | ROM_REGION(0x2000, "m48t58",0) | |
| 1218 | ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(f691f5ab) SHA1(e81f652c5caa2caa8bd1c6d6db488d849bda058e) ) | |
| 1321 | 1219 | ROM_END |
| 1322 | 1220 | |
| 1323 | 1221 | ROM_START(thrilld) |
| r3171 | r3172 | |
| 1325 | 1223 | ROM_LOAD16_WORD_SWAP("713be01.27p", 0x000000, 0x200000, CRC(d84a7723) SHA1(f4e9e08591b7e5e8419266dbe744d56a185384ed)) |
| 1326 | 1224 | |
| 1327 | 1225 | ROM_REGION32_BE(0x800000, "user2", 0) /* Data roms */ |
| 1328 | ROM_LOAD32_WORD_SWAP("713a04.16t", 0x000000, 0x200000, CRC(c994aaa8) SHA1(d82b9930a11e5384ad583684a27c95beec03cd5a)) | |
| 1329 | ROM_LOAD32_WORD_SWAP("713a05.14t", 0x000002, 0x200000, CRC(6f1e6802) SHA1(91f8a170327e9b4ee6a64aee0c106b981a317e69)) | |
| 1226 | ROM_LOAD32_WORD_SWAP("713a04.16t", 0x000000, 0x200000, CRC(c994aaa8) SHA1(d82b9930a11e5384ad583684a27c95beec03cd5a)) | |
| 1227 | ROM_LOAD32_WORD_SWAP("713a05.14t", 0x000002, 0x200000, CRC(6f1e6802) SHA1(91f8a170327e9b4ee6a64aee0c106b981a317e69)) | |
| 1330 | 1228 | |
| 1331 | 1229 | ROM_REGION32_BE(0x800000, "user5", 0) /* CG Board Texture roms */ |
| 1332 | ROM_LOAD32_WORD_SWAP( "713a13.8x", 0x000000, 0x400000, CRC(b795c66b) SHA1(6e50de0d5cc444ffaa0fec7ada8c07f643374bb2) ) | |
| 1333 | ROM_LOAD32_WORD_SWAP( "713a14.16x", 0x000002, 0x400000, CRC(5275a629) SHA1(16fadef06975f0f3625cac8f84e2e77ed7d75e15) ) | |
| 1230 | ROM_LOAD32_WORD_SWAP( "713a13.8x", 0x000000, 0x400000, CRC(b795c66b) SHA1(6e50de0d5cc444ffaa0fec7ada8c07f643374bb2) ) | |
| 1231 | ROM_LOAD32_WORD_SWAP( "713a14.16x", 0x000002, 0x400000, CRC(5275a629) SHA1(16fadef06975f0f3625cac8f84e2e77ed7d75e15) ) | |
| 1334 | 1232 | |
| 1335 | 1233 | ROM_REGION(0x80000, "audio", 0) /* 68k program roms */ |
| 1336 | ||
| 1234 | | |
| 1337 | 1235 | |
| 1338 | 1236 | ROM_REGION(0x1000000, "rf", 0) /* PCM sample roms */ |
| 1339 | ROM_LOAD( "713a09.16p", 0x000000, 0x400000, CRC(058f250a) SHA1(63b8e60004ec49009633e86b4992c00083def9a8) ) | |
| 1340 | ROM_LOAD( "713a10.14p", 0x400000, 0x400000, CRC(27f9833e) SHA1(1540f00d2571ecb81b914c553682b67fca94bbbd) ) | |
| 1237 | ROM_LOAD( "713a09.16p", 0x000000, 0x400000, CRC(058f250a) SHA1(63b8e60004ec49009633e86b4992c00083def9a8) ) | |
| 1238 | ROM_LOAD( "713a10.14p", 0x400000, 0x400000, CRC(27f9833e) SHA1(1540f00d2571ecb81b914c553682b67fca94bbbd) ) | |
| 1239 | ||
| 1240 | ROM_REGION(0x2000, "m48t58",0) | |
| 1241 | ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(5d8fbcb2) SHA1(74ad91544d2a200cf599a565005476623075e7d6) ) | |
| 1341 | 1242 | ROM_END |
| 1342 | 1243 | |
| 1343 | 1244 | /*****************************************************************************/ |
| 1344 | 1245 | |
| 1345 | GAME( 1998, racingj, 0, nwktr, nwktr, racingj, ROT0, "Konami", "Racing Jam", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 1346 | GAME( 1999, racingj2, racingj,nwktr, nwktr, racingj2, ROT0, "Konami", "Racing Jam: Chapter 2", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 1347 | GAME( 1998, thrilld, 0, nwktr, nwktr, thrilld, ROT0, "Konami", "Thrill Drive", GAME_NOT_WORKING|GAME_IMPERFECT_SOUND ) | |
| 1246 | GAME( 1998, racingj, 0, nwktr, nwktr, nwktr, ROT0, "Konami", "Racing Jam", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 1247 | GAME( 1999, racingj2, racingj, nwktr, nwktr, nwktr, ROT0, "Konami", "Racing Jam: Chapter 2", GAME_NOT_WORKING|GAME_NO_SOUND ) | |
| 1248 | GAME( 1998, thrilld, 0, nwktr, nwktr, nwktr, ROT0, "Konami", "Thrill Drive", GAME_NOT_WORKING|GAME_IMPERFECT_SOUND ) |
| r3171 | r3172 | |
|---|---|---|
| 7 | 7 | 0000-00FF Base Page RAM |
| 8 | 8 | 0100-01FF Stack RAM |
| 9 | 9 | 1000-1FFF ROM |
| 10 | 2000 Clown Verticl | |
| 10 | 2000 Clown Vertical | |
| 11 | 11 | 3000 Clown Horizontal Position |
| 12 | 12 | 4000-43FF Video RAM |
| 13 | 13 | 8000 Clown Rotation and Audio Controls |
| r3171 | r3172 | |
| 275 | 275 | static MACHINE_DRIVER_START( circus ) |
| 276 | 276 | |
| 277 | 277 | /* basic machine hardware */ |
| 278 | MDRV_CPU_ADD("main", M6502,11289 | |
| 278 | MDRV_CPU_ADD("main", M6502, XTAL_11_289MHz / 16) /* 705.562kHz */ | |
| 279 | 279 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 280 | 280 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 281 | 281 | |
| r3171 | r3172 | |
| 310 | 310 | static MACHINE_DRIVER_START( robotbwl ) |
| 311 | 311 | |
| 312 | 312 | /* basic machine hardware */ |
| 313 | MDRV_CPU_ADD("main", M6502,11289 | |
| 313 | MDRV_CPU_ADD("main", M6502, XTAL_11_289MHz / 16) /* 705.562kHz */ | |
| 314 | 314 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 315 | 315 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 316 | 316 | |
| r3171 | r3172 | |
| 344 | 344 | static MACHINE_DRIVER_START( crash ) |
| 345 | 345 | |
| 346 | 346 | /* basic machine hardware */ |
| 347 | MDRV_CPU_ADD("main", M6502,11289 | |
| 347 | MDRV_CPU_ADD("main", M6502, XTAL_11_289MHz / 16) /* 705.562kHz */ | |
| 348 | 348 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 349 | 349 | MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,2) |
| 350 | 350 | |
| r3171 | r3172 | |
| 378 | 378 | static MACHINE_DRIVER_START( ripcord ) |
| 379 | 379 | |
| 380 | 380 | /* basic machine hardware */ |
| 381 | MDRV_CPU_ADD("main", M6502, | |
| 381 | MDRV_CPU_ADD("main", M6502, XTAL_ | |
| 382 | 382 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 383 | 383 | //MDRV_CPU_VBLANK_INT("main", ripcord_interrupt) //AT |
| 384 | 384 |
| r3171 | r3172 | |
|---|---|---|
| 193 | 193 | AM_RANGE(0xf800, 0xffff) AM_WRITE(SMH_RAM) |
| 194 | 194 | ADDRESS_MAP_END |
| 195 | 195 | |
| 196 | static ADDRESS_MAP_START( heberpop_sound_readport, ADDRESS_SPACE_IO, 8 ) | |
| 197 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 198 | AM_RANGE(0x00, 0x00) AM_READ(ym3438_status_port_0_a_r) | |
| 199 | AM_RANGE(0x80, 0x80) AM_READ(okim6295_status_0_r) | |
| 200 | AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) | |
| 201 | ADDRESS_MAP_END | |
| 202 | 196 | |
| 203 | static ADDRESS_MAP_START( heberpop_sound_ | |
| 197 | static ADDRESS_MAP_START( heberpop_sound_ | |
| 204 | 198 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 205 | AM_RANGE(0x00, 0x00) AM_WRITE(ym3438_control_port_0_a_w) | |
| 199 | AM_RANGE(0x00, 0x00) AM_READWRITE(ym3438_status_port_0_a_r, ym3438_control_port_0_a_w) | |
| 206 | 200 | AM_RANGE(0x01, 0x01) AM_WRITE(ym3438_data_port_0_a_w) |
| 207 | 201 | AM_RANGE(0x02, 0x02) AM_WRITE(ym3438_control_port_0_b_w) |
| 208 | 202 | AM_RANGE(0x03, 0x03) AM_WRITE(ym3438_data_port_0_b_w) |
| 209 | AM_RANGE(0x80, 0x80) AM_WRITE(okim6295_data_0_w) | |
| 203 | AM_RANGE(0x80, 0x80) AM_READWRITE(okim6295_status_0_r, okim6295_data_0_w) | |
| 204 | AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) | |
| 210 | 205 | ADDRESS_MAP_END |
| 211 | 206 | |
| 212 | 207 | |
| 213 | ||
| 214 | 208 | static INPUT_PORTS_START( shangha3 ) |
| 215 | 209 | PORT_START("INPUTS") |
| 216 | 210 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| r3171 | r3172 | |
| 542 | 536 | |
| 543 | 537 | MDRV_CPU_ADD("audio", Z80, 6000000) /* 6 MHz ??? */ |
| 544 | 538 | MDRV_CPU_PROGRAM_MAP(heberpop_sound_readmem,heberpop_sound_writemem) |
| 545 | MDRV_CPU_IO_MAP(heberpop_sound_readport,heberpop_sound_writeport) | |
| 546 | /* NMI triggered by YM3438 */ | |
| 539 | MDRV_CPU_IO_MAP(heberpop_sound_io_map,0) /* NMI triggered by YM3438 */ | |
| 547 | 540 | |
| 548 | 541 | /* video hardware */ |
| 549 | MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | |
| 542 | MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | |
| 550 | 543 | |
| 551 | 544 | MDRV_SCREEN_ADD("main", RASTER) |
| 552 | 545 | MDRV_SCREEN_REFRESH_RATE(60) |
| r3171 | r3172 | |
| 584 | 577 | |
| 585 | 578 | MDRV_CPU_ADD("audio", Z80, 6000000) /* 6 MHz ??? */ |
| 586 | 579 | MDRV_CPU_PROGRAM_MAP(heberpop_sound_readmem,heberpop_sound_writemem) |
| 587 | MDRV_CPU_IO_MAP(heberpop_sound_readport,heberpop_sound_writeport) | |
| 588 | /* NMI triggered by YM3438 */ | |
| 580 | MDRV_CPU_IO_MAP(heberpop_sound_io_map,0) /* NMI triggered by YM3438 */ | |
| 589 | 581 | |
| 590 | 582 | /* video hardware */ |
| 591 | 583 | MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS) |
| r3171 | r3172 | |
| 690 | 682 | GAME( 1993, shangha3, 0, shangha3, shangha3, shangha3, ROT0, "Sunsoft", "Shanghai III (Japan)", 0 ) |
| 691 | 683 | GAME( 1994, heberpop, 0, heberpop, heberpop, heberpop, ROT0, "Sunsoft / Atlus", "Hebereke no Popoon (Japan)", 0 ) |
| 692 | 684 | GAME( 1994, blocken, 0, blocken, blocken, heberpop, ROT0, "KID / Visco", "Blocken (Japan)", 0 ) |
| 685 |
| r3171 | r3172 | |
|---|---|---|
| 2 | 2 | * |
| 3 | 3 | * 39in1.c - bootleg MAME-based "39-in-1" arcade PCB |
| 4 | 4 | * Skeleton by R. Belmont, thanks to the Guru |
| 5 | * Decrypt by Andreas Naive | |
| 5 | 6 | * |
| 6 | * The program ROM appears to be encrypted, please help if you can! | |
| 7 | * | |
| 8 | 7 | * CPU: Intel Xscale PXA255 series @ 200 MHz, configured little-endian |
| 9 | 8 | * Xscale PXA consists of: |
| 10 | * ARMv5 instruction set without the FPU | |
| 9 | * ARMv5TE instruction set without the FPU | |
| 10 | * ARM standard MMU | |
| 11 | 11 | * ARM DSP extensions |
| 12 | 12 | * VGA-ish frame buffer with some 2D acceleration features |
| 13 | 13 | * AC97 stereo audio CODEC |
| 14 | 14 | * |
| 15 | 15 | * PCB also contains a custom ASIC, probably used for the decryption |
| 16 | 16 | * |
| 17 | * TODO: | |
| 18 | * Figure out weird memory test subroutine at 1c8 | |
| 19 | * PXA255 MMU and peripherals | |
| 20 | * | |
| 17 | 21 | **************************************************************************/ |
| 18 | 22 | |
| 19 | 23 | #include "driver.h" |
| 20 | 24 | #include "video/generic.h" |
| 21 | 25 | #include "cpu/arm7/arm7.h" |
| 22 | 26 | |
| 27 | static UINT32 counter_timer; | |
| 28 | ||
| 29 | // free-running 3.something MHz counter. this is a complete hack. | |
| 30 | static READ32_HANDLER( os_timer_counter_r ) | |
| 31 | { | |
| 32 | UINT32 ret; | |
| 33 | ||
| 34 | ret = counter_timer; | |
| 35 | counter_timer += 0x300; | |
| 36 | ||
| 37 | return ret; | |
| 38 | } | |
| 39 | ||
| 23 | 40 | static ADDRESS_MAP_START( 39in1_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 24 | 41 | AM_RANGE(0x00000000, 0x0007ffff) AM_ROM |
| 25 | AM_RANGE(0xfff80000, 0xffffffff) AM_ROM AM_REGION("main", 0) // mirror to prevent crashing | |
| 42 | AM_RANGE(0x40a00010, 0x40a00013) AM_READ( os_timer_counter_r ) | |
| 43 | AM_RANGE(0xa0000000, 0xa3ffffff) AM_RAM | |
| 26 | 44 | ADDRESS_MAP_END |
| 27 | 45 | |
| 28 | 46 | static INPUT_PORTS_START( 39in1 ) |
| r3171 | r3172 | |
| 33 | 51 | return 0; |
| 34 | 52 | } |
| 35 | 53 | |
| 54 | static MACHINE_START(39in1) | |
| 55 | { | |
| 56 | UINT8 *ROM = memory_region(machine, "main"); | |
| 57 | int i; | |
| 58 | ||
| 59 | for (i = 0; i < 0x80000; i += 2) | |
| 60 | { | |
| 61 | ROM[i] = BITSWAP8(ROM[i],7,2,5,6,0,3,1,4) ^ BITSWAP8((i>>3)&0xf, 3,2,4,1,4,4,0,4) ^ 0x90; | |
| 62 | } | |
| 63 | ||
| 64 | counter_timer = 0x300; | |
| 65 | } | |
| 66 | ||
| 36 | 67 | static MACHINE_DRIVER_START( 39in1 ) |
| 37 | 68 | MDRV_CPU_ADD("main", ARM7, 200000000) // actually Xscale PXA255, but ARM7 is a compatible subset |
| 38 | 69 | MDRV_CPU_PROGRAM_MAP(39in1_map,0) |
| r3171 | r3172 | |
| 43 | 74 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 44 | 75 | MDRV_SCREEN_RAW_PARAMS(16777216/4, 308, 0, 240, 228, 0, 160) // completely bogus for this h/w |
| 45 | 76 | |
| 77 | MDRV_MACHINE_START(39in1) | |
| 78 | ||
| 46 | 79 | MDRV_VIDEO_UPDATE(39in1) |
| 47 | 80 | |
| 48 | 81 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 49 | 82 | MACHINE_DRIVER_END |
| 50 | 83 | |
| 51 | 84 | ROM_START( 39in1 ) |
| 52 | // main program, | |
| 85 | // main program, | |
| 53 | 86 | ROM_REGION( 0x80000, "main", 0 ) |
| 54 | 87 | ROM_LOAD( "27c4096_plz-v001_ver.300.bin", 0x000000, 0x080000, CRC(9149dbc4) SHA1(40efe1f654f11474f75ae7fee1613f435dbede38) ) |
| 55 | 88 | |
| 56 | 89 | // data ROM - contains a filesystem with ROMs, fonts, graphics, etc. in an unknown compressed format |
| 57 | ROM_REGION32_LE( 0x200000, " | |
| 90 | ROM_REGION32_LE( 0x200000, "data | |
| 58 | 91 | ROM_LOAD( "16mflash.bin", 0x000000, 0x200000, CRC(a089f0f8) SHA1(e975eadd9176a8b9e416229589dfe3158cba22cb) ) |
| 59 | 92 | ROM_END |
| 60 | 93 | |
| 61 | 94 | GAME(2004, 39in1, 0, 39in1, 39in1, 0, ROT0, "????", "39 in 1 MAME bootleg", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 95 | ||
| 96 | /* | |
| 97 | ||
| 98 | cpu #0 (PC=00000010): unmapped program memory dword write to 40E00024 = FFFFFFFF & FFFFFFFF GPIO pin output clear 31:0 | |
| 99 | cpu #0 (PC=00000014): unmapped program memory dword write to 40E00028 = FFFFFFFF & FFFFFFFF 63:32 | |
| 100 | cpu #0 (PC=00000018): unmapped program memory dword write to 40E0002C = FFFFFFFF & FFFFFFFF 80:64 | |
| 101 | cpu #0 (PC=00000028): unmapped program memory dword write to 40E00018 = 01008000 & FFFFFFFF GPIO pin direction register 63:32 | |
| 102 | cpu #0 (PC=0000002C): unmapped program memory dword write to 40E0001C = 00020802 & FFFFFFFF pin output set 63:32 | |
| 103 | cpu #0 (PC=00000030): unmapped program memory dword write to 40E00020 = 0001CC00 & FFFFFFFF 80:64 | |
| 104 | cpu #0 (PC=00000040): unmapped program memory dword write to 40E0000C = DFE3FFDC & FFFFFFFF GPIO pin direction 31:0 | |
| 105 | cpu #0 (PC=00000044): unmapped program memory dword write to 40E00010 = FC9FAF83 & FFFFFFFF 63:32 | |
| 106 | cpu #0 (PC=00000048): unmapped program memory dword write to 40E00014 = 0001FFFF & FFFFFFFF | |
| 107 | cpu #0 (PC=00000064): unmapped program memory dword write to 40E00054 = 80000000 & FFFFFFFF GPIO alternate function | |
| 108 | cpu #0 (PC=00000068): unmapped program memory dword write to 40E00058 = 59000110 & FFFFFFFF | |
| 109 | cpu #0 (PC=0000006C): unmapped program memory dword write to 40E0005C = 600A9559 & FFFFFFFF | |
| 110 | cpu #0 (PC=00000070): unmapped program memory dword write to 40E00060 = AAA00008 & FFFFFFFF | |
| 111 | cpu #0 (PC=00000074): unmapped program memory dword write to 40E00064 = AAAAAAAA & FFFFFFFF | |
| 112 | cpu #0 (PC=00000078): unmapped program memory dword write to 40E00068 = 00000002 & FFFFFFFF | |
| 113 | cpu #0 (PC=00000084): unmapped program memory dword write to 40F00004 = 00000020 & FFFFFFFF power manager sleep status | |
| 114 | test_rt_r_callback opcode=ee160e10 | |
| 115 | test_rt_w_callback opcode=ee060e10, data from ARM7 register=2 | |
| 116 | cpu #0 (PC=0000009C): unmapped program memory dword write to 41300000 = 00000141 & FFFFFFFF core clock configure (multiplier=27, RAM is 99.53 MHz + multiplier = 2 * memory + turbo = 1x) | |
| 117 | test_rt_w_callback opcode=ee060e10, data from ARM7 register=3 | |
| 118 | test_rt_w_callback opcode=ee060e10, data from ARM7 register=1 | |
| 119 | cpu #0 (PC=000000B4): unmapped program memory dword read from 40A00010 & FFFFFFFF OS timer/counter | |
| 120 | cpu #0 (PC=000000B8): unmapped program memory dword read from 40A00010 & FFFFFFFF | |
| 121 | cpu #0 (PC=000000B8): unmapped program memory dword read from 40A00010 & FFFFFFFF | |
| 122 | ||
| 123 | */ |
| r3171 | r3172 | |
|---|---|---|
| 1959 | 1959 | ROM_REGION(0x300000, "gfx1" , ROMREGION_DISPOSE) /* Sprites (5bpp) */ |
| 1960 | 1960 | ROM_FILL ( 0x000000, 0x080000, 0 ) |
| 1961 | 1961 | ROM_LOAD("bsb_d18.bin", 0x080000, 0x080000, CRC(22d7eeb5) SHA1(30aa4493c5bc98d9256817b9e3341b20d2b76f1f) ) |
| 1962 | ROM_LOAD("bsb_d19.bin", 0x100000, 0x080000, | |
| 1962 | ROM_LOAD("bsb_d19.bin", 0x100000, 0x080000, | |
| 1963 | 1963 | ROM_LOAD("bsb_d20.bin", 0x180000, 0x080000, CRC(20222e15) SHA1(41f2f94afd65d0c106752f254f20b593906cba28) ) |
| 1964 | 1964 | ROM_LOAD("bsb_d17.bin", 0x200000, 0x080000, CRC(ea2eadfc) SHA1(2c4176e89f816166f410888cd2e837891a4289a3) ) |
| 1965 | 1965 | ROM_LOAD("bsb_d16.bin", 0x280000, 0x080000, CRC(edccd4e0) SHA1(e00d3c1a91f9a96e1ae7d45842315d839c9cd440) ) |
| r3171 | r3172 | |
| 1968 | 1968 | ROM_LOAD32_BYTE("bsb_d13b.bin", 0x000000, 0x080000, CRC(430af2aa) SHA1(e935f9f4e0558a25bd4010b44dbb4f38a9d359e0) ) |
| 1969 | 1969 | ROM_LOAD32_BYTE("bsb_d14b.bin", 0x000001, 0x080000, CRC(c006e832) SHA1(4aebbac188af1ef9176581ac68ac12ce397f2f08) ) |
| 1970 | 1970 | ROM_LOAD32_BYTE("bsb_d15b.bin", 0x000002, 0x080000, CRC(74644ad4) SHA1(c7610e413c965eb4e40b548d13efdcbc3dde23be) ) |
| 1971 | ROM_LOAD32_BYTE("bsb_d12b.bin", 0x000003, 0x080000, BAD_DUMP CRC(6760ac05) SHA1(65725bcc9aa94a1d800b8d569fef30df542f3c4d) ) // bad lines in places | |
| 1972 | ROM_LOAD32_BYTE("bsb_d11b.bin", 0x200000, 0x080000, BAD_DUMP CRC(d854a38b) SHA1(79fa66b72d526c8270ba2a356d2b44447f4c0a5c) ) // bad lines in places | |
| 1971 | ROM_LOAD32_BYTE("bsb_d12b.bin", 0x000003, 0x080000, CRC(cb2e2abb) SHA1(7e3a90cb8af298bac2aef80778341833e473b671) ) | |
| 1972 | ROM_LOAD32_BYTE("bsb_d11b.bin", 0x200000, 0x080000, CRC(d0607829) SHA1(546c629ec22bb98202c7127ccb77df0b8f3a1966) ) | |
| 1973 | 1973 | |
| 1974 | 1974 | ROM_REGION(0x100000, "oki" , ROMREGION_ERASE00 ) // OKI6295 samples |
| 1975 | 1975 | ROM_LOAD("bsb_d11.bin", 0x000000, 0x080000, CRC(26bdc617) SHA1(993e7a52128fdd58f22d95521a629beb71ca7b91) ) // I haven't verified this dump.. but given how bad the rest is I'm not confident |
| r3171 | r3172 | |
|---|---|---|
| 735 | 735 | static MACHINE_START( guab ) |
| 736 | 736 | { |
| 737 | 737 | fdc_timer = timer_alloc(fdc_data_callback, NULL); |
| 738 | ptm6840_config(0, &ptm_intf); | |
| 738 | ptm6840_config(machine, 0, &ptm_intf); | |
| 739 | 739 | } |
| 740 | 740 | |
| 741 | 741 | static MACHINE_RESET( guab ) |
| r3171 | r3172 | |
|---|---|---|
| 347 | 347 | // AM_RANGE(0xc00f, 0xc00f) AM_WRITENOP /* ??? */ |
| 348 | 348 | ADDRESS_MAP_END |
| 349 | 349 | |
| 350 | static ADDRESS_MAP_START( exctsccr_sound_ | |
| 350 | static ADDRESS_MAP_START( exctsccr_sound_ | |
| 351 | 351 | ADDRESS_MAP_GLOBAL_MASK( 0x00ff ) |
| 352 | 352 | AM_RANGE(0x82, 0x82) AM_WRITE(ay8910_write_port_0_w) |
| 353 | 353 | AM_RANGE(0x83, 0x83) AM_WRITE(ay8910_control_port_0_w) |
| r3171 | r3172 | |
| 650 | 650 | |
| 651 | 651 | MDRV_CPU_ADD("audio", Z80, 4123456) /* ??? with 4 MHz, nested NMIs might happen */ |
| 652 | 652 | MDRV_CPU_PROGRAM_MAP(exctsccr_sub_map,0) |
| 653 | MDRV_CPU_IO_MAP( | |
| 653 | MDRV_CPU_IO_MAP( | |
| 654 | 654 | MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 4000) /* 4 kHz, updates the dac */ |
| 655 | 655 | |
| 656 | 656 | /* MCU */ |
| r3171 | r3172 | |
|---|---|---|
| 231 | 231 | AM_RANGE(0x8000, 0xffff) AM_WRITE(SMH_ROM) |
| 232 | 232 | ADDRESS_MAP_END |
| 233 | 233 | |
| 234 | static ADDRESS_MAP_START( sound_ | |
| 234 | static ADDRESS_MAP_START( sound_io_ma | |
| 235 | 235 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 236 | AM_RANGE(0x04, 0x04) AM_READ(soundlatch_r) | |
| 237 | AM_RANGE(0x08, 0x08) AM_READ(ym2610_status_port_0_a_r) | |
| 238 | AM_RANGE(0x0a, 0x0a) AM_READ(ym2610_status_port_0_b_r) | |
| 239 | ADDRESS_MAP_END | |
| 240 | ||
| 241 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 242 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 243 | 236 | AM_RANGE(0x00, 0x00) AM_WRITE(crshrace_sh_bankswitch_w) |
| 244 | AM_RANGE(0x04, 0x04) AM_WRITE(pending_command_clear_w) | |
| 245 | AM_RANGE(0x08, 0x08) AM_WRITE(ym2610_control_port_0_a_w) | |
| 237 | AM_RANGE(0x04, 0x04) AM_READWRITE(soundlatch_r, pending_command_clear_w) | |
| 238 | AM_RANGE(0x08, 0x08) AM_READWRITE(ym2610_status_port_0_a_r, ym2610_control_port_0_a_w) | |
| 246 | 239 | AM_RANGE(0x09, 0x09) AM_WRITE(ym2610_data_port_0_a_w) |
| 247 | AM_RANGE(0x0a, 0x0a) AM_WRITE(ym2610_control_port_0_b_w) | |
| 240 | AM_RANGE(0x0a, 0x0a) AM_READWRITE(ym2610_status_port_0_b_r, ym2610_control_port_0_b_w) | |
| 248 | 241 | AM_RANGE(0x0b, 0x0b) AM_WRITE(ym2610_data_port_0_b_w) |
| 249 | 242 | ADDRESS_MAP_END |
| 250 | 243 | |
| 251 | 244 | |
| 252 | ||
| 253 | 245 | static INPUT_PORTS_START( crshrace ) |
| 254 | 246 | PORT_START("P1") |
| 255 | 247 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| r3171 | r3172 | |
| 463 | 455 | |
| 464 | 456 | MDRV_CPU_ADD("audio", Z80,4000000) /* 4 MHz ??? */ |
| 465 | 457 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 466 | MDRV_CPU_IO_MAP(sound_ | |
| 458 | MDRV_CPU_IO_MAP(sound_i | |
| 467 | 459 | |
| 468 | 460 | /* video hardware */ |
| 469 | 461 | MDRV_VIDEO_ATTRIBUTES(VIDEO_BUFFERS_SPRITERAM) |
| r3171 | r3172 | |
| 591 | 583 | |
| 592 | 584 | GAME( 1993, crshrace, 0, crshrace, crshrace, crshrace, ROT270, "Video System Co.", "Lethal Crash Race (set 1)", GAME_NO_COCKTAIL ) |
| 593 | 585 | GAME( 1993, crshrac2, crshrace, crshrace, crshrac2, crshrac2, ROT270, "Video System Co.", "Lethal Crash Race (set 2)", GAME_NO_COCKTAIL ) |
| 586 |
| r3171 | r3172 | |
|---|---|---|
| 235 | 235 | AM_RANGE(0xe000, 0xffff) AM_WRITE(SMH_ROM) AM_BASE(&bwp3_rombase) AM_SIZE(&bwp3_romsize) |
| 236 | 236 | ADDRESS_MAP_END |
| 237 | 237 | |
| 238 | static ADDRESS_MAP_START( bwp3_readport, ADDRESS_SPACE_IO, 8 ) | |
| 239 | AM_RANGE(0x00, 0x00) AM_READ_PORT("VBLANK") | |
| 240 | ADDRESS_MAP_END | |
| 241 | 238 | |
| 242 | static ADDRESS_MAP_START( bwp3_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 243 | AM_RANGE(0x00, 0x00) AM_WRITE(bwp3_u8F_w) | |
| 239 | static ADDRESS_MAP_START( bwp3_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 240 | AM_RANGE(0x00, 0x00) AM_READ_PORT("VBLANK") AM_WRITE(bwp3_u8F_w) | |
| 244 | 241 | ADDRESS_MAP_END |
| 245 | 242 | |
| 246 | 243 | //**************************************************************************** |
| r3171 | r3172 | |
| 399 | 396 | |
| 400 | 397 | MDRV_CPU_ADD("audio", DECO16, 2000000) |
| 401 | 398 | MDRV_CPU_PROGRAM_MAP(bwp3_readmem, bwp3_writemem) |
| 402 | MDRV_CPU_IO_MAP(bwp3_ | |
| 399 | MDRV_CPU_IO_MAP(bwp3_i | |
| 403 | 400 | MDRV_CPU_PERIODIC_INT(bwp3_interrupt, 1000) |
| 404 | 401 | |
| 405 | 402 | MDRV_INTERLEAVE(300) // high enough? |
| r3171 | r3172 | |
| 628 | 625 | |
| 629 | 626 | GAME( 1984, zaviga, 0, bwing, bwing, bwing, ROT90, "Data East Corporation", "Zaviga", 0 ) |
| 630 | 627 | GAME( 1984, zavigaj, zaviga, bwing, bwing, bwing, ROT90, "Data East Corporation", "Zaviga (Japan)", 0 ) |
| 628 |
| r3171 | r3172 | |
|---|---|---|
| 276 | 276 | AM_RANGE(0x0000, 0xffff) AM_WRITE(SMH_NOP) |
| 277 | 277 | ADDRESS_MAP_END |
| 278 | 278 | |
| 279 | static ADDRESS_MAP_START( sound2_ | |
| 279 | static ADDRESS_MAP_START( sound2_io_ma | |
| 280 | 280 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 281 | AM_RANGE(0x01, 0x01) AM_READ(soundlatch_r) | |
| 282 | ADDRESS_MAP_END | |
| 283 | ||
| 284 | ||
| 285 | static ADDRESS_MAP_START( sound2_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 286 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 287 | 281 | AM_RANGE(0x00, 0x01) AM_WRITE(msm5205_w) |
| 282 | AM_RANGE(0x01, 0x01) AM_READ(soundlatch_r) | |
| 288 | 283 | AM_RANGE(0x02, 0x02) AM_WRITE(sound2_bank_w) |
| 289 | 284 | ADDRESS_MAP_END |
| 290 | 285 | |
| r3171 | r3172 | |
| 827 | 822 | |
| 828 | 823 | MDRV_CPU_ADD("audio2", Z80, 3579545) /* ? xtal is 3.579545MHz */ |
| 829 | 824 | MDRV_CPU_PROGRAM_MAP(sound2_readmem,sound2_writemem) |
| 830 | MDRV_CPU_IO_MAP(sound2_ | |
| 825 | MDRV_CPU_IO_MAP(sound2_i | |
| 831 | 826 | MDRV_CPU_PERIODIC_INT(irq0_line_hold,8000) |
| 832 | 827 | |
| 833 | 828 | /* video hardware */ |
| r3171 | r3172 | |
| 1142 | 1137 | |
| 1143 | 1138 | |
| 1144 | 1139 | |
| 1145 | GAME( 1987, sf, 0, | |
| 1140 | GAME( 1987, sf, 0, | |
| 1146 | 1141 | GAME( 1987, sfus, sf, sfus, sfus, 0, ROT0, "Capcom", "Street Fighter (US)", 0 ) |
| 1147 | 1142 | GAME( 1987, sfjp, sf, sfjp, sfjp, 0, ROT0, "Capcom", "Street Fighter (Japan)", 0 ) |
| 1148 | 1143 | GAME( 1987, sfp, sf, sfp, sf, 0, ROT0, "Capcom", "Street Fighter (prototype)", 0 ) |
| 1144 |
| r3171 | r3172 | |
|---|---|---|
| 2725 | 2725 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc808, 0xc80b, 0, 0, pia_3_r, pia_3_w); |
| 2726 | 2726 | |
| 2727 | 2727 | /* install extra input handlers */ |
| 2728 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc800, 0xc800, 0, 0, input_port_5_r); | |
| 2729 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc801, 0xc801, 0, 0, input_port_6_r); | |
| 2730 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc802, 0xc802, 0, 0, input_port_7_r); | |
| 2731 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc803, 0xc803, 0, 0, input_port_8_r); | |
| 2728 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc800, 0xc800, 0, 0, input_port_read_handler8(machine->portconfig, "AN0")); | |
| 2729 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc801, 0xc801, 0, 0, input_port_read_handler8(machine->portconfig, "AN1")); | |
| 2730 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc802, 0xc802, 0, 0, input_port_read_handler8(machine->portconfig, "AN2")); | |
| 2731 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc803, 0xc803, 0, 0, input_port_read_handler8(machine->portconfig, "AN3")); | |
| 2732 | 2732 | } |
| 2733 | 2733 | |
| 2734 | 2734 |
| r3171 | r3172 | |
|---|---|---|
| 218 | 218 | |
| 219 | 219 | ***************************************************************************/ |
| 220 | 220 | |
| 221 | static const char *portnames[] = { "IN0", "IN1", "DSW0", "DSW1" }; | |
| 222 | ||
| 223 | #define FUUKI32_INPUT( _N_ ) \ | |
| 224 | \ | |
| 225 | static READ32_HANDLER( io32_##_N_##_r ) \ | |
| 226 | { \ | |
| 227 | return (input_port_read(machine, portnames[ _N_ ]) << 16) | input_port_read(machine, portnames[ _N_ ]); \ | |
| 228 | } | |
| 229 | ||
| 230 | FUUKI32_INPUT( 0 ) /* $800000.l Coins Inputs */ | |
| 231 | FUUKI32_INPUT( 1 ) /* $810000.l Player Inputs */ | |
| 232 | FUUKI32_INPUT( 2 ) /* $880000.l Dipswitches + Service */ | |
| 233 | FUUKI32_INPUT( 3 ) /* $890000.l More Dipswitches */ | |
| 234 | ||
| 235 | 221 | /* Sound comms */ |
| 236 | 222 | static READ32_HANDLER( snd_020_r ) |
| 237 | 223 | { |
| r3171 | r3172 | |
| 281 | 267 | |
| 282 | 268 | AM_RANGE(0x700000, 0x703fff) AM_READ(SMH_RAM) // Palette |
| 283 | 269 | |
| 284 | AM_RANGE(0x800000, 0x800003) AM_READ(io32_0_r) // Coin | |
| 285 | AM_RANGE(0x810000, 0x810003) AM_READ(io32_1_r) // Player Inputs | |
| 286 | AM_RANGE(0x880000, 0x880003) AM_READ(io32_2_r) // Service + DIPS | |
| 287 | AM_RANGE(0x890000, 0x890003) AM_READ(io32_3_r) // More DIPS | |
| 270 | AM_RANGE(0x800000, 0x800003) AM_READ_PORT("800000") // Coin | |
| 271 | AM_RANGE(0x810000, 0x810003) AM_READ_PORT("810000") // Player Inputs | |
| 272 | AM_RANGE(0x880000, 0x880003) AM_READ_PORT("880000") // Service + DIPS | |
| 273 | AM_RANGE(0x890000, 0x890003) AM_READ_PORT("890000") // More DIPS | |
| 288 | 274 | |
| 289 | 275 | AM_RANGE(0x8c0000, 0x8c001f) AM_READ(SMH_RAM)// Video Registers |
| 290 | 276 | |
| r3171 | r3172 | |
| 361 | 347 | AM_RANGE(0x8000, 0xffff) AM_WRITE(SMH_ROM ) // ROM |
| 362 | 348 | ADDRESS_MAP_END |
| 363 | 349 | |
| 364 | static ADDRESS_MAP_START( fuuki32_sound_ | |
| 350 | static ADDRESS_MAP_START( fuuki32_sound_io_ma | |
| 365 | 351 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 366 | AM_RANGE(0x40, 0x40) AM_READ(ymf262_status_0_r) | |
| 367 | ADDRESS_MAP_END | |
| 368 | ||
| 369 | static ADDRESS_MAP_START( fuuki32_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 370 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 371 | 352 | AM_RANGE(0x00, 0x00) AM_WRITE(fuuki32_sound_bw_w) |
| 372 | 353 | AM_RANGE(0x30, 0x30) AM_WRITE(SMH_NOP) |
| 373 | AM_RANGE(0x40, 0x40) AM_WRITE(ymf262_register_a_0_w) | |
| 354 | AM_RANGE(0x40, 0x40) AM_READWRITE(ymf262_status_0_r, ymf262_register_a_0_w) | |
| 374 | 355 | AM_RANGE(0x41, 0x41) AM_WRITE(ymf262_data_a_0_w) |
| 375 | 356 | AM_RANGE(0x42, 0x42) AM_WRITE(ymf262_register_b_0_w) |
| 376 | 357 | AM_RANGE(0x43, 0x43) AM_WRITE(ymf262_data_b_0_w) |
| r3171 | r3172 | |
| 378 | 359 | AM_RANGE(0x45, 0x45) AM_WRITE(ymf278b_data_port_0_c_w) |
| 379 | 360 | ADDRESS_MAP_END |
| 380 | 361 | |
| 381 | ||
| 382 | 362 | /*************************************************************************** |
| 383 | 363 | |
| 384 | 364 | |
| r3171 | r3172 | |
| 388 | 368 | ***************************************************************************/ |
| 389 | 369 | |
| 390 | 370 | static INPUT_PORTS_START( asurabld ) |
| 391 | PORT_START("IN0") // IN0 - $800000.w/$800002.w | |
| 392 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 393 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 394 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 395 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 396 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) | |
| 397 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) | |
| 398 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 399 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 400 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 401 | PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 371 | PORT_START("800000") | |
| 372 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "SYSTEM") | |
| 373 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "SYSTEM") | |
| 402 | 374 | |
| 403 | PORT_START("IN1") // IN1 - $810000.w/$810002.w | |
| 404 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 405 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 406 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 407 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 408 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 409 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 410 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 411 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 412 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 413 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 414 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 415 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 416 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 417 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 418 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 419 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 375 | PORT_START("810000") | |
| 376 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "INPUTS") | |
| 377 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "INPUTS") | |
| 420 | 378 | |
| 421 | PORT_START("DSW0") // IN2 - $880000.w/$880002.w | |
| 379 | PORT_START("880000") | |
| 380 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW1") | |
| 381 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW1") | |
| 382 | ||
| 383 | PORT_START("890000") | |
| 384 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW2") | |
| 385 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW2") | |
| 386 | ||
| 387 | PORT_START("SYSTEM") | |
| 388 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 389 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 390 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 391 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 392 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) | |
| 393 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) | |
| 394 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 395 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 396 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 397 | PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 398 | ||
| 399 | PORT_START("INPUTS") | |
| 400 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 401 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 402 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 403 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 404 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 405 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 406 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 407 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 408 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 409 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 410 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 411 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 412 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 413 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 414 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 415 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 416 | ||
| 417 | PORT_START("DSW1") | |
| 422 | 418 | PORT_SERVICE( 0x0001, 0x0001 ) |
| 423 | 419 | PORT_DIPNAME( 0x0002, 0x0002, "Blood Colour" ) // Any other censorship? (Tested in 3 locations) |
| 424 | 420 | PORT_DIPSETTING( 0x0002, "Red" ) |
| r3171 | r3172 | |
| 439 | 435 | PORT_DIPSETTING( 0x0000, "Joint" ) |
| 440 | 436 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 441 | 437 | |
| 442 | PORT_START("DSW | |
| 438 | PORT_START("DSW2") | |
| 443 | 439 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) |
| 444 | 440 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 445 | 441 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r3171 | r3172 | |
| 481 | 477 | PORT_DIPSETTING( 0x0e00, DEF_STR( 2C_1C ) ) |
| 482 | 478 | PORT_DIPSETTING( 0x0f00, DEF_STR( 1C_1C ) ) |
| 483 | 479 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) // Set both for Free Play |
| 484 | ||
| 485 | 480 | INPUT_PORTS_END |
| 486 | 481 | |
| 487 | 482 | |
| r3171 | r3172 | |
| 604 | 599 | |
| 605 | 600 | MDRV_CPU_ADD("sound", Z80, SOUND_CPU_CLOCK) /* 6MHz verified */ |
| 606 | 601 | MDRV_CPU_PROGRAM_MAP(fuuki32_sound_readmem,fuuki32_sound_writemem) |
| 607 | MDRV_CPU_IO_MAP(fuuki32_sound_ | |
| 602 | MDRV_CPU_IO_MAP(fuuki32_sound_ | |
| 608 | 603 | |
| 609 | 604 | MDRV_MACHINE_START(fuuki32) |
| 610 | 605 | MDRV_MACHINE_RESET(fuuki32) |
| r3171 | r3172 | |
| 753 | 748 | |
| 754 | 749 | GAME( 1998, asurabld, 0, fuuki32, asurabld, 0, ROT0, "Fuuki", "Asura Blade - Sword of Dynasty (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 755 | 750 | GAME( 2000, asurabus, 0, fuuki32, asurabld, 0, ROT0, "Fuuki", "Asura Buster - Eternal Warriors (Japan)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) // sounds loop forever? |
| 751 |
| r3171 | r3172 | |
|---|---|---|
| 620 | 620 | * |
| 621 | 621 | *************************************/ |
| 622 | 622 | |
| 623 | #define COMMON_IN01\ | |
| 624 | PORT_START("P1_P2")\ | |
| 625 | PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNUSED )\ | |
| 626 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_START2 )\ | |
| 627 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)\ | |
| 628 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)\ | |
| 629 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)\ | |
| 630 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)\ | |
| 631 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)\ | |
| 632 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)\ | |
| 633 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)\ | |
| 634 | PORT_BIT( 0x00ff0000, IP_ACTIVE_LOW, IPT_UNUSED )\ | |
| 635 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_START1 )\ | |
| 636 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)\ | |
| 637 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)\ | |
| 638 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)\ | |
| 639 | PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)\ | |
| 640 | PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)\ | |
| 641 | PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)\ | |
| 623 | static INPUT_PORTS_START( common ) | |
| 624 | PORT_START("P1_P2") /* 68.SW (A1=0, A1=1) */ | |
| 625 | PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 626 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_START2 ) | |
| 627 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 628 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 629 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 630 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 631 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 632 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 633 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 634 | PORT_BIT( 0x00ff0000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 635 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_START1 ) | |
| 636 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 637 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 638 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 639 | PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 640 | PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 641 | PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 642 | 642 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 643 | 643 | |
| 644 | #define COMMON_IN2\ | |
| 645 | PORT_START("SERVICE") /* 68.STATUS (A2=0) */ \ | |
| 646 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /A2DRDY */ \ | |
| 647 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_TILT ) /* TILT */ \ | |
| 648 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ23 */ \ | |
| 649 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */ \ | |
| 650 | PORT_BIT( 0x0030, IP_ACTIVE_LOW, IPT_UNUSED ) /* NC */ \ | |
| 651 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) /* SELFTEST */ \ | |
| 652 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK ) /* VBLANK */ \ | |
| 644 | PORT_START("SERVICE") /* 68.STATUS (A2=0) */ | |
| 645 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /A2DRDY */ | |
| 646 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_TILT ) /* TILT */ | |
| 647 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ23 */ | |
| 648 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */ | |
| 649 | PORT_BIT( 0x0030, IP_ACTIVE_LOW, IPT_UNUSED ) /* NC */ | |
| 650 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) /* SELFTEST */ | |
| 651 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK ) /* VBLANK */ | |
| 653 | 652 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 654 | 653 | |
| 655 | #define COMMON_IN3\ | |
| 656 | PORT_START("COIN") /* 68.STATUS (A2=1) */ \ | |
| 657 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /VBIRQ */ \ | |
| 658 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /4MSIRQ */ \ | |
| 659 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ0 */ \ | |
| 660 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ1 */ \ | |
| 661 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /SERVICER */ \ | |
| 662 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /SER.L */ \ | |
| 663 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) /* COINR */ \ | |
| 664 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) /* COINL */ \ | |
| 654 | PORT_START("COIN") /* 68.STATUS (A2=1) */ | |
| 655 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /VBIRQ */ | |
| 656 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /4MSIRQ */ | |
| 657 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ0 */ | |
| 658 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ1 */ | |
| 659 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /SERVICER */ | |
| 660 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /SER.L */ | |
| 661 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) /* COINR */ | |
| 662 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) /* COINL */ | |
| 665 | 663 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 664 | INPUT_PORTS_END | |
| 666 | 665 | |
| 667 | 666 | static INPUT_PORTS_START( tmek ) |
| 668 | COMMON_IN01 /* 68.SW (A1=0) */ | |
| 669 | /* 68.SW (A1=1) */ | |
| 667 | PORT_INCLUDE( common ) | |
| 670 | 668 | |
| 671 | COMMON_IN2 | |
| 672 | ||
| 673 | COMMON_IN3 | |
| 674 | ||
| 675 | 669 | #if (HACK_TMEK_CONTROLS) |
| 676 | 670 | PORT_START("FAKE") /* single digital joystick */ |
| 677 | 671 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| r3171 | r3172 | |
| 679 | 673 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 680 | 674 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 681 | 675 | #else |
| 676 | ||
| 682 | 677 | PORT_START("AN1") |
| 683 | 678 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) |
| 684 | 679 | |
| r3171 | r3172 | |
| 691 | 686 | PORT_START("AN4") |
| 692 | 687 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) |
| 693 | 688 | #endif |
| 694 | ||
| 695 | 689 | INPUT_PORTS_END |
| 696 | 690 | |
| 697 | 691 | |
| 698 | 692 | static INPUT_PORTS_START( primrage ) |
| 699 | COMMON_IN01 /* 68.SW (A1=0) */ | |
| 700 | /* 68.SW (A1=1) bit 0x0008 does something */ | |
| 693 | PORT_INCLUDE( common ) | |
| 701 | 694 | |
| 702 | COMMON_IN2 /* 68.STATUS (A2=0) */ | |
| 695 | /* primrage uses one of the 4 action buttons as start */ | |
| 696 | PORT_MODIFY( "P1_P2" ) | |
| 697 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 698 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 699 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 700 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 701 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 702 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 703 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 704 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 703 | 705 | |
| 704 | COMMON_IN3 /* 68.STATUS (A2=1) */ | |
| 705 | ||
| 706 | 706 | PORT_START("AN1") |
| 707 | 707 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 708 | 708 |
| r3171 | r3172 | |
|---|---|---|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | |
| 54 | static | |
| 54 | static CUSTOM_I | |
| 55 | 55 | { |
| 56 | UINT8 val = input_port_read(machine, "INPUTS"); | |
| 57 | ||
| 58 | if (((input_port_read(machine, "DIAL") + 0) / 2) & 1) | |
| 59 | { | |
| 60 | val |= 1; | |
| 61 | } | |
| 62 | if (((input_port_read(machine, "DIAL") + 1) / 2) & 1) | |
| 63 | { | |
| 64 | val |= 2; | |
| 65 | } | |
| 66 | ||
| 67 | return val; | |
| 56 | int bit = (FPTR)param; | |
| 57 | return ((input_port_read(field->port->machine, "DIAL") + bit) / 2) & 0x01; | |
| 68 | 58 | } |
| 69 | 59 | |
| 70 | 60 | |
| r3171 | r3172 | |
| 139 | 129 | |
| 140 | 130 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 141 | 131 | AM_RANGE(0x0000, 0x00ff) AM_RAM AM_MIRROR(0x100) |
| 142 | AM_RANGE(0x1000, 0x1000) AM_READ | |
| 132 | AM_RANGE(0x1000, 0x1000) AM_READ | |
| 143 | 133 | AM_RANGE(0x1000, 0x10ff) AM_WRITE(SMH_RAM) AM_BASE(&wolfpack_alpha_num_ram) |
| 144 | 134 | AM_RANGE(0x2000, 0x2000) AM_READ(wolfpack_misc_r) |
| 145 | 135 | AM_RANGE(0x2000, 0x2000) AM_WRITE(wolfpack_high_explo_w) |
| r3171 | r3172 | |
| 179 | 169 | |
| 180 | 170 | static INPUT_PORTS_START( wolfpack ) |
| 181 | 171 | PORT_START("INPUTS") |
| 182 | PORT_BIT ( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) /* dial connects here */ | |
| 183 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_TILT ) | |
| 184 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 172 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(wolfpack_dial_r, (void *)0) /* dial connects here */ | |
| 173 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(wolfpack_dial_r, (void *)1) /* dial connects here */ | |
| 174 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) | |
| 175 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 185 | 176 | PORT_SERVICE( 0x10, IP_ACTIVE_HIGH ) |
| 186 | PORT_BIT ( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 187 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 188 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 177 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 178 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 179 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 189 | 180 | |
| 190 | 181 | PORT_START("DSW") |
| 191 | 182 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Coinage ) ) |
| r3171 | r3172 | |
|---|---|---|
| 109 | 109 | AM_RANGE(0x10800c, 0x10800d) AM_WRITE(SMH_NOP) /* CLR INT Video */ |
| 110 | 110 | AM_RANGE(0x200000, 0x203fff) AM_READWRITE(SMH_RAM, paletteram16_xxxxBBBBRRRRGGGG_word_w) AM_BASE(&paletteram16) /* Palette */ |
| 111 | 111 | AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&wrally_spriteram) /* Sprite RAM */ |
| 112 | AM_RANGE(0x700000, 0x700001) AM_READ(input_port_0_word_r) /* DSW #1 & #2 */ | |
| 113 | AM_RANGE(0x700002, 0x700003) AM_READ(input_port_1_word_r) /* INPUT 1P & 2P, COINSW, STARTSW */ | |
| 114 | AM_RANGE(0x700004, 0x700005) AM_READ(input_port_2_word_r) /* Wheel */ | |
| 115 | AM_RANGE(0x700008, 0x700009) AM_READ(input_port_3_word_r) /* TESTSW & SERVICESW */ | |
| 112 | AM_RANGE(0x700000, 0x700001) AM_READ_PORT("DSW") | |
| 113 | AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P1_P2") | |
| 114 | AM_RANGE(0x700004, 0x700005) AM_READ_PORT("WHEEL") | |
| 115 | AM_RANGE(0x700008, 0x700009) AM_READ_PORT("SYSTEM") | |
| 116 | 116 | AM_RANGE(0x70000c, 0x70000d) AM_WRITE(OKIM6295_bankswitch_w) /* OKI6295 bankswitch */ |
| 117 | 117 | AM_RANGE(0x70000e, 0x70000f) AM_READWRITE(okim6295_status_0_lsb_r, okim6295_data_0_lsb_w) /* OKI6295 status/data register */ |
| 118 | 118 | AM_RANGE(0x70000a, 0x70001b) AM_WRITE(wrally_coin_lockout_w) /* Coin lockouts */ |
| r3171 | r3172 | |
| 154 | 154 | }; |
| 155 | 155 | |
| 156 | 156 | static INPUT_PORTS_START( wrally ) |
| 157 | PORT_START("DSW") | |
| 157 | PORT_START("DSW") | |
| 158 | 158 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) |
| 159 | 159 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) |
| 160 | 160 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) |
| r3171 | r3172 | |
| 199 | 199 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 200 | 200 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 201 | 201 | |
| 202 | PORT_START("P1_P2") | |
| 202 | PORT_START("P1_P2") | |
| 203 | 203 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| 204 | 204 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 205 | 205 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| r3171 | r3172 | |
| 217 | 217 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START1 ) |
| 218 | 218 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) |
| 219 | 219 | |
| 220 | PORT_START("WHEEL") | |
| 220 | PORT_START("WHEEL") | |
| 221 | 221 | PORT_BIT( 0xff00, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_RIGHT) PORT_CODE_INC(KEYCODE_LEFT) PORT_REVERSE |
| 222 | 222 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 223 | 223 | |
| 224 | PORT_START("SYSTEM") | |
| 224 | PORT_START("SYSTEM") | |
| 225 | 225 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 226 | 226 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* Go to test mode NOW */ |
| 227 | 227 | PORT_BIT( 0xfffc, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r3171 | r3172 | |
|---|---|---|
| 126 | 126 | AM_RANGE(0x24000, 0x241ff) AM_WRITE(paletteram_xRRRRRGGGGGBBBBB_le_w) AM_BASE(&paletteram) |
| 127 | 127 | ADDRESS_MAP_END |
| 128 | 128 | |
| 129 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 129 | ||
| 130 | static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) | |
| 130 | 131 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 132 | AM_RANGE(0x00, 0x3f) AM_WRITE(SMH_NOP) /* Z180 internal registers */ | |
| 131 | 133 | AM_RANGE(0x30, 0x30) AM_READ(SMH_NOP) /* Z180 internal registers */ |
| 132 | AM_RANGE(0x70, 0x70) AM_READ(ym2203_status_port_0_r) | |
| 133 | AM_RANGE(0x71, 0x71) AM_READ(ym2203_read_port_0_r) | |
| 134 | AM_RANGE(0x72, 0x72) AM_READ(protection_r) | |
| 134 | AM_RANGE(0x70, 0x70) AM_READWRITE(ym2203_status_port_0_r, ym2203_control_port_0_w) | |
| 135 | AM_RANGE(0x71, 0x71) AM_READWRITE(ym2203_read_port_0_r, ym2203_write_port_0_w) | |
| 136 | AM_RANGE(0x72, 0x72) AM_READWRITE(protection_r, protection_w) | |
| 135 | 137 | AM_RANGE(0x74, 0x74) AM_READ_PORT("P1") |
| 136 | 138 | AM_RANGE(0x76, 0x76) AM_READ_PORT("P2") |
| 137 | 139 | ADDRESS_MAP_END |
| 138 | 140 | |
| 139 | static ADDRESS_MAP_START( | |
| 141 | static ADDRESS_MAP_START( gfire2_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 140 | 142 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 141 | 143 | AM_RANGE(0x00, 0x3f) AM_WRITE(SMH_NOP) /* Z180 internal registers */ |
| 142 | AM_RANGE(0x70, 0x70) AM_WRITE(ym2203_control_port_0_w) | |
| 143 | AM_RANGE(0x71, 0x71) AM_WRITE(ym2203_write_port_0_w) | |
| 144 | AM_RANGE(0x72, 0x72) AM_WRITE(protection_w) | |
| 145 | ADDRESS_MAP_END | |
| 146 | ||
| 147 | static ADDRESS_MAP_START( gfire2_readport, ADDRESS_SPACE_IO, 8 ) | |
| 148 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 149 | 144 | AM_RANGE(0x30, 0x30) AM_READ(SMH_NOP) /* Z180 internal registers */ |
| 150 | AM_RANGE(0x70, 0x70) AM_READ(ym2203_status_port_0_r) | |
| 151 | AM_RANGE(0x71, 0x71) AM_READ(ym2203_read_port_0_r) | |
| 152 | AM_RANGE(0x72, 0x72) AM_READ(gfire2_protection_r) | |
| 145 | AM_RANGE(0x70, 0x70) AM_READWRITE(ym2203_status_port_0_r, ym2203_control_port_0_w) | |
| 146 | AM_RANGE(0x71, 0x71) AM_READWRITE(ym2203_read_port_0_r, ym2203_write_port_0_w) | |
| 147 | AM_RANGE(0x72, 0x72) AM_READWRITE(gfire2_protection_r, gfire2_protection_w) | |
| 153 | 148 | AM_RANGE(0x74, 0x74) AM_READ_PORT("P1") |
| 154 | 149 | AM_RANGE(0x76, 0x76) AM_READ_PORT("P2") |
| 155 | 150 | ADDRESS_MAP_END |
| 156 | 151 | |
| 157 | static ADDRESS_MAP_START( gfire2_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 158 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 159 | AM_RANGE(0x00, 0x3f) AM_WRITE(SMH_NOP) /* Z180 internal registers */ | |
| 160 | AM_RANGE(0x70, 0x70) AM_WRITE(ym2203_control_port_0_w) | |
| 161 | AM_RANGE(0x71, 0x71) AM_WRITE(ym2203_write_port_0_w) | |
| 162 | AM_RANGE(0x72, 0x72) AM_WRITE(gfire2_protection_w) | |
| 163 | ADDRESS_MAP_END | |
| 164 | 152 | |
| 165 | ||
| 166 | ||
| 167 | 153 | static INPUT_PORTS_START( mosaic ) |
| 168 | 154 | PORT_START("P1") |
| 169 | 155 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r3171 | r3172 | |
| 292 | 278 | static MACHINE_DRIVER_START( mosaic ) |
| 293 | 279 | MDRV_CPU_ADD("main", Z180, 7000000) /* ??? */ |
| 294 | 280 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 295 | MDRV_CPU_IO_MAP( | |
| 281 | MDRV_CPU_IO_MAP(io_ma | |
| 296 | 282 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 297 | 283 | |
| 298 | 284 | /* video hardware */ |
| r3171 | r3172 | |
| 321 | 307 | MDRV_IMPORT_FROM(mosaic) |
| 322 | 308 | MDRV_CPU_MODIFY("main") |
| 323 | 309 | MDRV_CPU_PROGRAM_MAP(gfire2_readmem,gfire2_writemem) |
| 324 | MDRV_CPU_IO_MAP(gfire2_ | |
| 310 | MDRV_CPU_IO_MAP(gfire2_ | |
| 325 | 311 | MACHINE_DRIVER_END |
| 326 | 312 | |
| 327 | 313 | |
| r3171 | r3172 | |
| 388 | 374 | GAME( 1990, mosaic, 0, mosaic, mosaic, 0, ROT0, "Space", "Mosaic", 0 ) |
| 389 | 375 | GAME( 1990, mosaica, mosaic, mosaic, mosaic, 0, ROT0, "Space (Fuuki license)", "Mosaic (Fuuki)", 0 ) |
| 390 | 376 | GAME( 1992, gfire2, 0, gfire2, gfire2, 0, ROT0, "Topis Corp", "Golden Fire II", 0 ) |
| 377 |
| r3171 | r3172 | |
|---|---|---|
| 134 | 134 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(SMH_RAM) |
| 135 | 135 | ADDRESS_MAP_END |
| 136 | 136 | |
| 137 | static ADDRESS_MAP_START( crospang_sound_ | |
| 137 | static ADDRESS_MAP_START( crospang_sound_io_ma | |
| 138 | 138 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 139 | AM_RANGE(0x00, 0x00) AM_READ(ym3812_status_port_0_r) | |
| 140 | AM_RANGE(0x02, 0x02) AM_READ(okim6295_status_0_r) | |
| 139 | AM_RANGE(0x00, 0x00) AM_READWRITE(ym3812_status_port_0_r, ym3812_control_port_0_w) | |
| 140 | AM_RANGE(0x01, 0x01) AM_WRITE(ym3812_write_port_0_w) | |
| 141 | AM_RANGE(0x02, 0x02) AM_READWRITE(okim6295_status_0_r, okim6295_data_0_w) | |
| 141 | 142 | AM_RANGE(0x06, 0x06) AM_READ(soundlatch_r) |
| 142 | 143 | ADDRESS_MAP_END |
| 143 | 144 | |
| 144 | static ADDRESS_MAP_START( crospang_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 145 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 146 | AM_RANGE(0x00, 0x00) AM_WRITE(ym3812_control_port_0_w) | |
| 147 | AM_RANGE(0x01, 0x01) AM_WRITE(ym3812_write_port_0_w) | |
| 148 | AM_RANGE(0x02, 0x02) AM_WRITE(okim6295_data_0_w) | |
| 149 | ADDRESS_MAP_END | |
| 150 | 145 | |
| 151 | 146 | static INPUT_PORTS_START( crospang ) |
| 152 | 147 | PORT_START("P1_P2") |
| r3171 | r3172 | |
| 338 | 333 | |
| 339 | 334 | MDRV_CPU_ADD("audio", Z80, 14318180/4) |
| 340 | 335 | MDRV_CPU_PROGRAM_MAP(crospang_sound_readmem,crospang_sound_writemem) |
| 341 | MDRV_CPU_IO_MAP(crospang_sound_ | |
| 336 | MDRV_CPU_IO_MAP(crospang_sound_i | |
| 342 | 337 | |
| 343 | 338 | /* video hardware */ |
| 344 | 339 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 375 | 370 | |
| 376 | 371 | MDRV_CPU_ADD("audio", Z80, 14318180/4) |
| 377 | 372 | MDRV_CPU_PROGRAM_MAP(crospang_sound_readmem,crospang_sound_writemem) |
| 378 | MDRV_CPU_IO_MAP(crospang_sound_ | |
| 373 | MDRV_CPU_IO_MAP(crospang_sound_i | |
| 379 | 374 | |
| 380 | 375 | /* video hardware */ |
| 381 | 376 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 595 | 590 | GAME( 1998, crospang, 0, crospang, crospang, crospang, ROT0, "F2 System", "Cross Pang", 0 ) |
| 596 | 591 | GAME( 199?, heuksun, 0, crospang, heuksun, crospang, ROT0, "Oksan / F2 System", "Heuk Sun Baek Sa (Korea)", 0 ) |
| 597 | 592 | GAME( 199?, bestri, 0, bestri, bestri, crospang, ROT0, "F2 System", "Bestri (Korea)", 0 ) |
| 593 |
| r3171 | r3172 | |
|---|---|---|
| 106 | 106 | AM_RANGE(0xe000, 0xffff) AM_WRITE(SMH_RAM) |
| 107 | 107 | ADDRESS_MAP_END |
| 108 | 108 | |
| 109 | static ADDRESS_MAP_START( | |
| 109 | static ADDRESS_MAP_START( io_ma | |
| 110 | 110 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 111 | AM_RANGE(0x00, 0x00) AM_READ_PORT("SYSTEM") | |
| 112 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P1") | |
| 111 | AM_RANGE(0x00, 0x00) AM_READ_PORT("SYSTEM") AM_WRITE(funybubl_vidram_bank_w) // vidram bank | |
| 112 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P1") AM_WRITE(funybubl_cpurombank_w) // rom bank? | |
| 113 | 113 | AM_RANGE(0x02, 0x02) AM_READ_PORT("P2") |
| 114 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW") | |
| 114 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW") AM_WRITE(funybubl_soundcommand_w) | |
| 115 | 115 | AM_RANGE(0x06, 0x06) AM_READ(SMH_NOP) /* Nothing is done with the data read */ |
| 116 | ADDRESS_MAP_END | |
| 117 | ||
| 118 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 119 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 120 | AM_RANGE(0x00, 0x00) AM_WRITE(funybubl_vidram_bank_w) // vidram bank | |
| 121 | AM_RANGE(0x01, 0x01) AM_WRITE(funybubl_cpurombank_w) // rom bank? | |
| 122 | AM_RANGE(0x03, 0x03) AM_WRITE(funybubl_soundcommand_w) | |
| 123 | 116 | AM_RANGE(0x06, 0x06) AM_WRITE(SMH_NOP) /* Written directly after IO port 0 */ |
| 124 | 117 | AM_RANGE(0x07, 0x07) AM_WRITE(SMH_NOP) /* Reset something on startup - Sound CPU ?? */ |
| 125 | 118 | ADDRESS_MAP_END |
| 126 | 119 | |
| 127 | ||
| 128 | 120 | /* Sound CPU */ |
| 129 | 121 | |
| 130 | 122 | static ADDRESS_MAP_START( soundreadmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r3171 | r3172 | |
| 246 | 238 | /* basic machine hardware */ |
| 247 | 239 | MDRV_CPU_ADD("main", Z80,12000000/2) /* 6 MHz?? */ |
| 248 | 240 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 249 | MDRV_CPU_IO_MAP( | |
| 241 | MDRV_CPU_IO_MAP(io_ma | |
| 250 | 242 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 251 | 243 | |
| 252 | 244 | MDRV_CPU_ADD("audio", Z80,8000000/2) /* 4 MHz?? */ |
| r3171 | r3172 | |
| 342 | 334 | |
| 343 | 335 | GAME( 1999, funybubl, 0, funybubl, funybubl, funybubl, ROT0, "In Chang Electronic Co", "Funny Bubble", 0 ) |
| 344 | 336 | GAME( 1999, funybubc, funybubl, funybubl, funybubl, funybubl, ROT0, "Comad Industry Co Ltd", "Funny Bubble (Comad version)", 0 ) |
| 337 |
| r3171 | r3172 | |
|---|---|---|
| 61 | 61 | AM_RANGE(0xe000, 0xffff) AM_WRITE(SMH_RAM) |
| 62 | 62 | ADDRESS_MAP_END |
| 63 | 63 | |
| 64 | static ADDRESS_MAP_START( | |
| 64 | static ADDRESS_MAP_START( io_ma | |
| 65 | 65 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 66 | AM_RANGE(0x00, 0x00) AM_READ(sichuan2_dsw1_r) | |
| 67 | AM_RANGE(0x01, 0x01) AM_READ_PORT("DSW2") | |
| 68 | AM_RANGE(0x02, 0x02) AM_READ_PORT("P1") | |
| 66 | AM_RANGE(0x00, 0x00) AM_READWRITE(sichuan2_dsw1_r, sichuan2_coin_w) | |
| 67 | AM_RANGE(0x01, 0x01) AM_READ_PORT("DSW2") AM_WRITE(m72_sound_command_byte_w) | |
| 68 | AM_RANGE(0x02, 0x02) AM_READ_PORT("P1") AM_WRITE(sichuan2_bankswitch_w) | |
| 69 | 69 | AM_RANGE(0x03, 0x03) AM_READ_PORT("P2") |
| 70 | 70 | AM_RANGE(0x04, 0x04) AM_READ_PORT("COIN") |
| 71 | 71 | ADDRESS_MAP_END |
| 72 | 72 | |
| 73 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 74 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 75 | AM_RANGE(0x00, 0x00) AM_WRITE(sichuan2_coin_w) | |
| 76 | AM_RANGE(0x01, 0x01) AM_WRITE(m72_sound_command_byte_w) | |
| 77 | AM_RANGE(0x02, 0x02) AM_WRITE(sichuan2_bankswitch_w) | |
| 78 | ADDRESS_MAP_END | |
| 79 | ||
| 80 | 73 | static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 81 | 74 | AM_RANGE(0x0000, 0x3fff) AM_READ(SMH_ROM) |
| 82 | 75 | AM_RANGE(0xfd00, 0xffff) AM_READ(SMH_RAM) |
| r3171 | r3172 | |
| 87 | 80 | AM_RANGE(0xfd00, 0xffff) AM_WRITE(SMH_RAM) |
| 88 | 81 | ADDRESS_MAP_END |
| 89 | 82 | |
| 90 | static ADDRESS_MAP_START( sound_ | |
| 83 | static ADDRESS_MAP_START( sound_io_ma | |
| 91 | 84 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 92 | AM_RANGE(0x01, 0x01) AM_READ(ym2151_status_port_0_r) | |
| 93 | AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) | |
| 94 | AM_RANGE(0x84, 0x84) AM_READ(m72_sample_r) | |
| 95 | ADDRESS_MAP_END | |
| 96 | ||
| 97 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 98 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 99 | 85 | AM_RANGE(0x00, 0x00) AM_WRITE(ym2151_register_port_0_w) |
| 100 | AM_RANGE(0x01, 0x01) AM_WRITE(ym2151_data_port_0_w) | |
| 86 | AM_RANGE(0x01, 0x01) AM_READWRITE(ym2151_status_port_0_r, ym2151_data_port_0_w) | |
| 87 | AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) | |
| 101 | 88 | AM_RANGE(0x80, 0x81) AM_WRITE(shisen_sample_addr_w) |
| 102 | 89 | AM_RANGE(0x82, 0x82) AM_WRITE(m72_sample_w) |
| 103 | 90 | AM_RANGE(0x83, 0x83) AM_WRITE(m72_sound_irq_ack_w) |
| 91 | AM_RANGE(0x84, 0x84) AM_READ(m72_sample_r) | |
| 104 | 92 | ADDRESS_MAP_END |
| 105 | 93 | |
| 106 | 94 | |
| r3171 | r3172 | |
| 243 | 231 | /* basic machine hardware */ |
| 244 | 232 | MDRV_CPU_ADD("main", Z80, 6000000) /* 6 MHz ? */ |
| 245 | 233 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 246 | MDRV_CPU_IO_MAP( | |
| 234 | MDRV_CPU_IO_MAP(io_ma | |
| 247 | 235 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 248 | 236 | |
| 249 | 237 | MDRV_CPU_ADD("audio", Z80, 3579645) |
| 250 | 238 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 251 | MDRV_CPU_IO_MAP(sound_ | |
| 239 | MDRV_CPU_IO_MAP(sound_i | |
| 252 | 240 | MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128) /* clocked by V1? (Vigilante) */ |
| 253 | 241 | /* IRQs are generated by main Z80 and YM2151 */ |
| 254 | 242 | |
| r3171 | r3172 | |
| 464 | 452 | GAME( 1989, shisen, matchit, shisen, shisen, 0, ROT0, "Tamtex", "Shisensho - Joshiryo-Hen (Japan)", 0 ) |
| 465 | 453 | GAME( 1989, sichuan2, matchit, shisen, shisen, 0, ROT0, "hack", "Sichuan II (hack, set 1)", 0 ) |
| 466 | 454 | GAME( 1989, sichuana, matchit, shisen, shisen, 0, ROT0, "hack", "Sichuan II (hack, set 2)", 0 ) |
| 455 |
| r3171 | r3172 | |
|---|---|---|
| 454 | 454 | AM_RANGE(0xf700, 0xf700) AM_WRITE(tharrier_oki6295_bankswitch_1_w) |
| 455 | 455 | ADDRESS_MAP_END |
| 456 | 456 | |
| 457 | static ADDRESS_MAP_START( tharrier_sound_ | |
| 457 | static ADDRESS_MAP_START( tharrier_sound_io_ma | |
| 458 | 458 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 459 | AM_RANGE(0x00, 0x00) AM_READ(ym2203_status_port_0_r) | |
| 460 | AM_RANGE(0x01, 0x01) AM_READ(ym2203_read_port_0_r) | |
| 459 | AM_RANGE(0x00, 0x00) AM_READWRITE(ym2203_status_port_0_r, ym2203_control_port_0_w) | |
| 460 | AM_RANGE(0x01, 0x01) AM_READWRITE(ym2203_read_port_0_r, ym2203_write_port_0_w) | |
| 461 | 461 | ADDRESS_MAP_END |
| 462 | 462 | |
| 463 | static ADDRESS_MAP_START( tharrier_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 464 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 465 | AM_RANGE(0x00, 0x00) AM_WRITE(ym2203_control_port_0_w) | |
| 466 | AM_RANGE(0x01, 0x01) AM_WRITE(ym2203_write_port_0_w) | |
| 467 | ADDRESS_MAP_END | |
| 468 | ||
| 469 | 463 | static ADDRESS_MAP_START( tharrier_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 470 | 464 | AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) |
| 471 | 465 | AM_RANGE(0x080000, 0x080001) AM_READ_PORT("IN0") |
| r3171 | r3172 | |
| 1095 | 1089 | AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch2_w) /* to 68000 */ |
| 1096 | 1090 | ADDRESS_MAP_END |
| 1097 | 1091 | |
| 1098 | static ADDRESS_MAP_START( macross2_sound_ | |
| 1092 | static ADDRESS_MAP_START( macross2_sound_io_ma | |
| 1099 | 1093 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1100 | AM_RANGE(0x00, 0x00) AM_READ(ym2203_status_port_0_r) | |
| 1101 | AM_RANGE(0x01, 0x01) AM_READ(ym2203_read_port_0_r) | |
| 1102 | AM_RANGE(0x80, 0x80) AM_READ(okim6295_status_0_r) | |
| 1103 | AM_RANGE(0x88, 0x88) AM_READ(okim6295_status_1_r) | |
| 1104 | ADDRESS_MAP_END | |
| 1105 | ||
| 1106 | static ADDRESS_MAP_START( macross2_sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 1107 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 1108 | AM_RANGE(0x00, 0x00) AM_WRITE(ym2203_control_port_0_w) | |
| 1109 | AM_RANGE(0x01, 0x01) AM_WRITE(ym2203_write_port_0_w) | |
| 1110 | AM_RANGE(0x80, 0x80) AM_WRITE(okim6295_data_0_w) | |
| 1111 | AM_RANGE(0x88, 0x88) AM_WRITE(okim6295_data_1_w) | |
| 1094 | AM_RANGE(0x00, 0x00) AM_READWRITE(ym2203_status_port_0_r, ym2203_control_port_0_w) | |
| 1095 | AM_RANGE(0x01, 0x01) AM_READWRITE(ym2203_read_port_0_r, ym2203_write_port_0_w) | |
| 1096 | AM_RANGE(0x80, 0x80) AM_READWRITE(okim6295_status_0_r, okim6295_data_0_w) | |
| 1097 | AM_RANGE(0x88, 0x88) AM_READWRITE(okim6295_status_1_r, okim6295_data_1_w) | |
| 1112 | 1098 | AM_RANGE(0x90, 0x97) AM_WRITE(NMK112_okibank_w) |
| 1113 | 1099 | ADDRESS_MAP_END |
| 1114 | 1100 | |
| r3171 | r3172 | |
| 3532 | 3518 | |
| 3533 | 3519 | MDRV_CPU_ADD("audio", Z80, 3000000) |
| 3534 | 3520 | MDRV_CPU_PROGRAM_MAP(tharrier_sound_readmem,tharrier_sound_writemem) |
| 3535 | MDRV_CPU_IO_MAP(tharrier_sound_ | |
| 3521 | MDRV_CPU_IO_MAP(tharrier_sound_ | |
| 3536 | 3522 | |
| 3537 | 3523 | MDRV_MACHINE_RESET(mustang_sound) |
| 3538 | 3524 | |
| r3171 | r3172 | |
| 3581 | 3567 | |
| 3582 | 3568 | MDRV_CPU_ADD("audio", Z80, 3000000) |
| 3583 | 3569 | MDRV_CPU_PROGRAM_MAP(tharrier_sound_readmem,tharrier_sound_writemem) |
| 3584 | MDRV_CPU_IO_MAP(tharrier_sound_ | |
| 3570 | MDRV_CPU_IO_MAP(tharrier_sound_ | |
| 3585 | 3571 | |
| 3586 | 3572 | /* video hardware */ |
| 3587 | 3573 | MDRV_SCREEN_ADD("main", RASTER) |
| r3171 | r3172 | |
| 4218 | 4204 | |
| 4219 | 4205 | MDRV_CPU_ADD("audio", Z80, 4000000) /* 4 MHz ? */ |
| 4220 | 4206 | MDRV_CPU_PROGRAM_MAP(macross2_sound_readmem,macross2_sound_writemem) |
| 4221 | MDRV_CPU_IO_MAP(macross2_sound_ | |
| 4207 | MDRV_CPU_IO_MAP(macross2_sound_i | |
| 4222 | 4208 | |
| 4223 | 4209 | MDRV_MACHINE_RESET(nmk16) |
| 4224 | 4210 | |
| r3171 | r3172 | |
| 4263 | 4249 | |
| 4264 | 4250 | MDRV_CPU_ADD("audio", Z80, 4000000) /* 4 MHz */ |
| 4265 | 4251 | MDRV_CPU_PROGRAM_MAP(macross2_sound_readmem,macross2_sound_writemem) |
| 4266 | MDRV_CPU_IO_MAP(macross2_sound_ | |
| 4252 | MDRV_CPU_IO_MAP(macross2_sound_i | |
| 4267 | 4253 | |
| 4268 | 4254 | MDRV_MACHINE_RESET(nmk16) |
| 4269 | 4255 | |
| r3171 | r3172 | |
| 6988 | 6974 | |
| 6989 | 6975 | // bee-oh board - different display / interrupt timing to others? |
| 6990 | 6976 | GAME( 1991, manybloc, 0, manybloc, manybloc, 0, ROT270, "Bee-Oh", "Many Block", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND ) |
| 6977 |
| r3171 | r3172 | |
|---|---|---|
| 94 | 94 | static void prepare_for_step_overout(debug_cpu_info *info); |
| 95 | 95 | static void process_source_file(void); |
| 96 | 96 | static void breakpoint_check(debug_cpu_info *info, offs_t pc); |
| 97 | static void watchpoint_check(int cpunum, int spacenum, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask); | |
| 97 | static void watchpoint_check(running_machine *machine, int cpunum, int spacenum, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask); | |
| 98 | 98 | static void check_hotspots(int cpunum, int spacenum, offs_t address); |
| 99 | 99 | |
| 100 | 100 | /* expression handlers */ |
| r3171 | r3172 | |
| 331 | 331 | |
| 332 | 332 | /* free all breakpoints */ |
| 333 | 333 | while (info->bplist) |
| 334 | debug_cpu_breakpoint_clear(info->bplist->index); | |
| 334 | debug_cpu_breakpoint_clear(machine, info->bplist->index); | |
| 335 | 335 | |
| 336 | 336 | /* loop over all address spaces */ |
| 337 | 337 | for (spacenum = 0; spacenum < ADDRESS_SPACES; spacenum++) |
| 338 | 338 | { |
| 339 | 339 | /* free all watchpoints */ |
| 340 | 340 | while (info->space[spacenum].wplist) |
| 341 | debug_cpu_watchpoint_clear(info->space[spacenum].wplist->index); | |
| 341 | debug_cpu_watchpoint_clear(machine, info->space[spacenum].wplist->index); | |
| 342 | 342 | } |
| 343 | 343 | } |
| 344 | 344 | |
| r3171 | r3172 | |
| 645 | 645 | |
| 646 | 646 | /* check watchpoints */ |
| 647 | 647 | if ((info->flags & (DEBUG_FLAG_LIVE_WPR_PROGRAM << spacenum)) != 0) |
| 648 | watchpoint_check(cpunum, spacenum, WATCHPOINT_READ, address, 0, mem_mask); | |
| 648 | watchpoint_check(machine, cpunum, spacenum, WATCHPOINT_READ, address, 0, mem_mask); | |
| 649 | 649 | |
| 650 | 650 | /* check hotspots */ |
| 651 | 651 | if (info->hotspots != NULL) |
| r3171 | r3172 | |
| 665 | 665 | |
| 666 | 666 | /* check watchpoints */ |
| 667 | 667 | if ((info->flags & (DEBUG_FLAG_LIVE_WPW_PROGRAM << spacenum)) != 0) |
| 668 | watchpoint_check(cpunum, spacenum, WATCHPOINT_WRITE, address, data, mem_mask); | |
| 668 | watchpoint_check(machine, cpunum, spacenum, WATCHPOINT_WRITE, address, data, mem_mask); | |
| 669 | 669 | } |
| 670 | 670 | |
| 671 | 671 | |
| r3171 | r3172 | |
| 1148 | 1148 | breakpoint flags |
| 1149 | 1149 | -------------------------------------------------*/ |
| 1150 | 1150 | |
| 1151 | static void breakpoint_update_flags(debug_cpu_info *info) | |
| 1151 | static void breakpoint_update_flags(running_machine *machine, debug_cpu_info *info) | |
| 1152 | 1152 | { |
| 1153 | 1153 | debug_cpu_breakpoint *bp; |
| 1154 | 1154 | |
| r3171 | r3172 | |
| 1163 | 1163 | |
| 1164 | 1164 | /* push the flags out globally */ |
| 1165 | 1165 | if (global.livecpu != NULL) |
| 1166 | compute_debug_flags( | |
| 1166 | compute_debug_flags(machine, global.livecpu); | |
| 1167 | 1167 | } |
| 1168 | 1168 | |
| 1169 | 1169 | |
| r3171 | r3172 | |
| 1203 | 1203 | debug_cpu_breakpoint_set - set a new breakpoint |
| 1204 | 1204 | -------------------------------------------------*/ |
| 1205 | 1205 | |
| 1206 | int debug_cpu_breakpoint_set(int cpunum, offs_t address, parsed_expression *condition, const char *action) | |
| 1206 | int debug_cpu_breakpoint_set(running_machine *machine, int cpunum, offs_t address, parsed_expression *condition, const char *action) | |
| 1207 | 1207 | { |
| 1208 | 1208 | debug_cpu_info *info = &global.cpuinfo[cpunum]; |
| 1209 | 1209 | debug_cpu_breakpoint *bp; |
| r3171 | r3172 | |
| 1228 | 1228 | info->bplist = bp; |
| 1229 | 1229 | |
| 1230 | 1230 | /* ensure the live breakpoint flag is set */ |
| 1231 | breakpoint_update_flags(info); | |
| 1231 | breakpoint_update_flags(machine, info); | |
| 1232 | 1232 | return bp->index; |
| 1233 | 1233 | } |
| 1234 | 1234 | |
| r3171 | r3172 | |
| 1237 | 1237 | debug_cpu_breakpoint_clear - clear a breakpoint |
| 1238 | 1238 | -------------------------------------------------*/ |
| 1239 | 1239 | |
| 1240 | int debug_cpu_breakpoint_clear(int bpnum) | |
| 1240 | int debug_cpu_breakpoint_clear(running_machine *machine, int bpnum) | |
| 1241 | 1241 | { |
| 1242 | 1242 | debug_cpu_breakpoint *bp, *pbp; |
| 1243 | 1243 | int cpunum; |
| r3171 | r3172 | |
| 1263 | 1263 | free(bp); |
| 1264 | 1264 | |
| 1265 | 1265 | /* update the flags */ |
| 1266 | breakpoint_update_flags(info); | |
| 1266 | breakpoint_update_flags(machine, info); | |
| 1267 | 1267 | return 1; |
| 1268 | 1268 | } |
| 1269 | 1269 | } |
| r3171 | r3172 | |
| 1278 | 1278 | breakpoint |
| 1279 | 1279 | -------------------------------------------------*/ |
| 1280 | 1280 | |
| 1281 | int debug_cpu_breakpoint_enable(int bpnum, int enable) | |
| 1281 | int debug_cpu_breakpoint_enable(running_machine *machine, int bpnum, int enable) | |
| 1282 | 1282 | { |
| 1283 | 1283 | debug_cpu_breakpoint *bp; |
| 1284 | 1284 | int cpunum; |
| r3171 | r3172 | |
| 1291 | 1291 | if (bp->index == bpnum) |
| 1292 | 1292 | { |
| 1293 | 1293 | bp->enabled = (enable != 0); |
| 1294 | breakpoint_update_flags(info); | |
| 1294 | breakpoint_update_flags(machine, info); | |
| 1295 | 1295 | return 1; |
| 1296 | 1296 | } |
| 1297 | 1297 | } |
| r3171 | r3172 | |
| 1310 | 1310 | watchpoint flags |
| 1311 | 1311 | -------------------------------------------------*/ |
| 1312 | 1312 | |
| 1313 | static void watchpoint_update_flags(debug_cpu_info *info, int spacenum) | |
| 1313 | static void watchpoint_update_flags(running_machine *machine, debug_cpu_info *info, int spacenum) | |
| 1314 | 1314 | { |
| 1315 | 1315 | UINT32 writeflag = DEBUG_FLAG_LIVE_WPW_PROGRAM << spacenum; |
| 1316 | 1316 | UINT32 readflag = DEBUG_FLAG_LIVE_WPR_PROGRAM << spacenum; |
| r3171 | r3172 | |
| 1344 | 1344 | |
| 1345 | 1345 | /* push the flags out globally */ |
| 1346 | 1346 | if (global.livecpu != NULL) |
| 1347 | compute_debug_flags( | |
| 1347 | compute_debug_flags(machine, global.livecpu); | |
| 1348 | 1348 | } |
| 1349 | 1349 | |
| 1350 | 1350 | |
| r3171 | r3172 | |
| 1353 | 1353 | for a given CPU and address space |
| 1354 | 1354 | -------------------------------------------------*/ |
| 1355 | 1355 | |
| 1356 | static void watchpoint_check(int cpunum, int spacenum, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask) | |
| 1356 | static void watchpoint_check(running_machine *machine, int cpunum, int spacenum, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask) | |
| 1357 | 1357 | { |
| 1358 | 1358 | const debug_cpu_info *info = &global.cpuinfo[cpunum]; |
| 1359 | 1359 | debug_cpu_watchpoint *wp; |
| r3171 | r3172 | |
| 1430 | 1430 | else |
| 1431 | 1431 | sprintf(buffer, "Stopped at watchpoint %X reading %s from %08X (PC=%X)", wp->index, sizes[size], BYTE2ADDR(address, &global.cpuinfo[cpunum], spacenum), activecpu_get_pc()); |
| 1432 | 1432 | debug_console_printf("%s\n", buffer); |
| 1433 | compute_debug_flags( | |
| 1433 | compute_debug_flags(machine, info); | |
| 1434 | 1434 | } |
| 1435 | 1435 | break; |
| 1436 | 1436 | } |
| r3171 | r3172 | |
| 1443 | 1443 | debug_cpu_watchpoint_set - set a new watchpoint |
| 1444 | 1444 | -------------------------------------------------*/ |
| 1445 | 1445 | |
| 1446 | int debug_cpu_watchpoint_set(int cpunum, int spacenum, int type, offs_t address, offs_t length, parsed_expression *condition, const char *action) | |
| 1446 | int debug_cpu_watchpoint_set(running_machine *machine, int cpunum, int spacenum, int type, offs_t address, offs_t length, parsed_expression *condition, const char *action) | |
| 1447 | 1447 | { |
| 1448 | 1448 | debug_cpu_info *info = &global.cpuinfo[cpunum]; |
| 1449 | 1449 | debug_cpu_watchpoint *wp = malloc_or_die(sizeof(*wp)); |
| r3171 | r3172 | |
| 1466 | 1466 | wp->next = info->space[spacenum].wplist; |
| 1467 | 1467 | info->space[spacenum].wplist = wp; |
| 1468 | 1468 | |
| 1469 | watchpoint_update_flags(info, spacenum); | |
| 1469 | watchpoint_update_flags(machine, info, spacenum); | |
| 1470 | 1470 | |
| 1471 | 1471 | return wp->index; |
| 1472 | 1472 | } |
| r3171 | r3172 | |
| 1476 | 1476 | debug_cpu_watchpoint_clear - clear a watchpoint |
| 1477 | 1477 | -------------------------------------------------*/ |
| 1478 | 1478 | |
| 1479 | int debug_cpu_watchpoint_clear(int wpnum) | |
| 1479 | int debug_cpu_watchpoint_clear(running_machine *machine, int wpnum) | |
| 1480 | 1480 | { |
| 1481 | 1481 | debug_cpu_watchpoint *wp, *pwp; |
| 1482 | 1482 | int cpunum, spacenum; |
| r3171 | r3172 | |
| 1503 | 1503 | free(wp->action); |
| 1504 | 1504 | free(wp); |
| 1505 | 1505 | |
| 1506 | watchpoint_update_flags(info, spacenum); | |
| 1506 | watchpoint_update_flags(machine, info, spacenum); | |
| 1507 | 1507 | return 1; |
| 1508 | 1508 | } |
| 1509 | 1509 | } |
| r3171 | r3172 | |
| 1518 | 1518 | watchpoint |
| 1519 | 1519 | -------------------------------------------------*/ |
| 1520 | 1520 | |
| 1521 | int debug_cpu_watchpoint_enable(int wpnum, int enable) | |
| 1521 | int debug_cpu_watchpoint_enable(running_machine *machine, int wpnum, int enable) | |
| 1522 | 1522 | { |
| 1523 | 1523 | debug_cpu_watchpoint *wp; |
| 1524 | 1524 | int cpunum, spacenum; |
| r3171 | r3172 | |
| 1533 | 1533 | if (wp->index == wpnum) |
| 1534 | 1534 | { |
| 1535 | 1535 | wp->enabled = (enable != 0); |
| 1536 | watchpoint_update_flags(info, spacenum); | |
| 1536 | watchpoint_update_flags(machine, info, spacenum); | |
| 1537 | 1537 | return 1; |
| 1538 | 1538 | } |
| 1539 | 1539 | } |
| r3171 | r3172 | |
| 1551 | 1551 | of hotspots |
| 1552 | 1552 | -------------------------------------------------*/ |
| 1553 | 1553 | |
| 1554 | int debug_cpu_hotspot_track(int cpunum, int numspots, int threshhold) | |
| 1554 | int debug_cpu_hotspot_track(running_machine *machine, int cpunum, int numspots, int threshhold) | |
| 1555 | 1555 | { |
| 1556 | 1556 | debug_cpu_info *info = &global.cpuinfo[cpunum]; |
| 1557 | 1557 | |
| r3171 | r3172 | |
| 1572 | 1572 | info->hotspot_threshhold = threshhold; |
| 1573 | 1573 | } |
| 1574 | 1574 | |
| 1575 | watchpoint_update_flags(info, ADDRESS_SPACE_PROGRAM); | |
| 1575 | watchpoint_update_flags(machine, info, ADDRESS_SPACE_PROGRAM); | |
| 1576 | 1576 | return 1; |
| 1577 | 1577 | } |
| 1578 | 1578 | |
| r3171 | r3172 | |
| 2661 | 2661 | script to use |
| 2662 | 2662 | -------------------------------------------------*/ |
| 2663 | 2663 | |
| 2664 | void debug_cpu_source_script(const char *file) | |
| 2664 | void debug_cpu_source_script(running_machine *machine, const char *file) | |
| 2665 | 2665 | { |
| 2666 | 2666 | if (debug_source_file) |
| 2667 | 2667 | { |
| r3171 | r3172 | |
| 2674 | 2674 | debug_source_file = fopen(file, "r"); |
| 2675 | 2675 | if (!debug_source_file) |
| 2676 | 2676 | { |
| 2677 | if (mame_get_phase( | |
| 2677 | if (mame_get_phase(machine) == MAME_PHASE_RUNNING) | |
| 2678 | 2678 | debug_console_printf("Cannot open command file '%s'\n", file); |
| 2679 | 2679 | else |
| 2680 | 2680 | fatalerror("Cannot open command file '%s'", file); |
| r3171 | r3172 | |
|---|---|---|
| 21 | 21 | int debug_comment_init(running_machine *machine); |
| 22 | 22 | |
| 23 | 23 | /* load and save */ |
| 24 | int debug_comment_save(void); | |
| 25 | int debug_comment_load(void); | |
| 24 | int debug_comment_save(running_machine *machine); | |
| 25 | int debug_comment_load(running_machine *machine); | |
| 26 | 26 | |
| 27 | 27 | /* comment interface functions */ |
| 28 | 28 | int debug_comment_add(int cpu_num, offs_t addr, const char *comment, rgb_t color, UINT32 c_crc); |
| r3171 | r3172 | |
|---|---|---|
| 250 | 250 | void debug_cpu_halt_on_next_instruction(running_machine *machine, const char *fmt, ...) ATTR_PRINTF(2,3); |
| 251 | 251 | int debug_cpu_is_stopped(running_machine *machine); |
| 252 | 252 | void debug_cpu_trace_printf(int cpunum, const char *fmt, ...) ATTR_PRINTF(2,3); |
| 253 | void debug_cpu_source_script(const char *file); | |
| 253 | void debug_cpu_source_script(running_machine *machine, const char *file); | |
| 254 | 254 | void debug_cpu_flush_traces(void); |
| 255 | 255 | |
| 256 | 256 | /* debugging hooks */ |
| r3171 | r3172 | |
| 272 | 272 | void debug_cpu_trace(int cpunum, FILE *file, int trace_over, const char *action); |
| 273 | 273 | |
| 274 | 274 | /* breakpoints */ |
| 275 | int debug_cpu_breakpoint_set(int cpunum, offs_t address, parsed_expression *condition, const char *action); | |
| 276 | int debug_cpu_breakpoint_clear(int bpnum); | |
| 277 | int debug_cpu_breakpoint_enable(int bpnum, int enable); | |
| 275 | int debug_cpu_breakpoint_set(running_machine *machine, int cpunum, offs_t address, parsed_expression *condition, const char *action); | |
| 276 | int debug_cpu_breakpoint_clear(running_machine *machine, int bpnum); | |
| 277 | int debug_cpu_breakpoint_enable(running_machine *machine, int bpnum, int enable); | |
| 278 | 278 | |
| 279 | 279 | /* watchpoints */ |
| 280 | int debug_cpu_watchpoint_set(int cpunum, int spacenum, int type, offs_t address, offs_t length, parsed_expression *condition, const char *action); | |
| 281 | int debug_cpu_watchpoint_clear(int wpnum); | |
| 282 | int debug_cpu_watchpoint_enable(int wpnum, int enable); | |
| 280 | int debug_cpu_watchpoint_set(running_machine *machine, int cpunum, int spacenum, int type, offs_t address, offs_t length, parsed_expression *condition, const char *action); | |
| 281 | int debug_cpu_watchpoint_clear(running_machine *machine, int wpnum); | |
| 282 | int debug_cpu_watchpoint_enable(running_machine *machine, int wpnum, int enable); | |
| 283 | 283 | |
| 284 | 284 | /* hotspots */ |
| 285 | int debug_cpu_hotspot_track(int cpunum, int numspots, int threshhold); | |
| 285 | int debug_cpu_hotspot_track(running_machine *machine, int cpunum, int numspots, int threshhold); | |
| 286 | 286 | |
| 287 | 287 | /* memory accessors */ |
| 288 | 288 | UINT8 debug_read_byte(int spacenum, offs_t address, int apply_translation); |
| r3171 | r3172 | |
|---|---|---|
| 259 | 259 | /* set up the initial debugscript if specified */ |
| 260 | 260 | name = options_get_string(mame_options(), OPTION_DEBUGSCRIPT); |
| 261 | 261 | if (name[0] != 0) |
| 262 | debug_cpu_source_script(name); | |
| 262 | debug_cpu_source_script(machine, name); | |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | |
| r3171 | r3172 | |
| 966 | 966 | |
| 967 | 967 | static void execute_comment_save(int ref, int params, const char *param[]) |
| 968 | 968 | { |
| 969 | if (debug_comment_save()) | |
| 969 | if (debug_comment_save(Machine)) | |
| 970 | 970 | debug_console_printf("Comments successfully saved\n"); |
| 971 | 971 | } |
| 972 | 972 | |
| r3171 | r3172 | |
| 1003 | 1003 | return; |
| 1004 | 1004 | |
| 1005 | 1005 | /* set the breakpoint */ |
| 1006 | bpnum = debug_cpu_breakpoint_set(cpu_getactivecpu(), address, condition, action); | |
| 1006 | bpnum = debug_cpu_breakpoint_set(Machine, cpu_getactivecpu(), address, condition, action); | |
| 1007 | 1007 | debug_console_printf("Breakpoint %X set\n", bpnum); |
| 1008 | 1008 | } |
| 1009 | 1009 | |
| r3171 | r3172 | |
| 1029 | 1029 | { |
| 1030 | 1030 | debug_cpu_breakpoint *bp; |
| 1031 | 1031 | while ((bp = cpuinfo->bplist) != NULL) |
| 1032 | debug_cpu_breakpoint_clear(bp->index); | |
| 1032 | debug_cpu_breakpoint_clear(Machine, bp->index); | |
| 1033 | 1033 | } |
| 1034 | 1034 | } |
| 1035 | 1035 | debug_console_printf("Cleared all breakpoints\n"); |
| r3171 | r3172 | |
| 1040 | 1040 | return; |
| 1041 | 1041 | else |
| 1042 | 1042 | { |
| 1043 | int found = debug_cpu_breakpoint_clear(bpindex); | |
| 1043 | int found = debug_cpu_breakpoint_clear(Machine, bpindex); | |
| 1044 | 1044 | if (found) |
| 1045 | 1045 | debug_console_printf("Breakpoint %X cleared\n", (UINT32)bpindex); |
| 1046 | 1046 | else |
| r3171 | r3172 | |
| 1070 | 1070 | { |
| 1071 | 1071 | debug_cpu_breakpoint *bp; |
| 1072 | 1072 | for (bp = cpuinfo->bplist; bp != NULL; bp = bp->next) |
| 1073 | debug_cpu_breakpoint_enable(bp->index, ref); | |
| 1073 | debug_cpu_breakpoint_enable(Machine, bp->index, ref); | |
| 1074 | 1074 | } |
| 1075 | 1075 | } |
| 1076 | 1076 | if (ref == 0) |
| r3171 | r3172 | |
| 1084 | 1084 | return; |
| 1085 | 1085 | else |
| 1086 | 1086 | { |
| 1087 | int found = debug_cpu_breakpoint_enable(bpindex, ref); | |
| 1087 | int found = debug_cpu_breakpoint_enable(Machine, bpindex, ref); | |
| 1088 | 1088 | if (found) |
| 1089 | 1089 | debug_console_printf("Breakpoint %X %s\n", (UINT32)bpindex, ref ? "enabled" : "disabled"); |
| 1090 | 1090 | else |
| r3171 | r3172 | |
| 1177 | 1177 | return; |
| 1178 | 1178 | |
| 1179 | 1179 | /* set the watchpoint */ |
| 1180 | wpnum = debug_cpu_watchpoint_set(cpu_getactivecpu(), ref, type, address, length, condition, action); | |
| 1180 | wpnum = debug_cpu_watchpoint_set(Machine, cpu_getactivecpu(), ref, type, address, length, condition, action); | |
| 1181 | 1181 | debug_console_printf("Watchpoint %X set\n", wpnum); |
| 1182 | 1182 | } |
| 1183 | 1183 | |
| r3171 | r3172 | |
| 1207 | 1207 | { |
| 1208 | 1208 | debug_cpu_watchpoint *wp; |
| 1209 | 1209 | while ((wp = cpuinfo->space[spacenum].wplist) != NULL) |
| 1210 | debug_cpu_watchpoint_clear(wp->index); | |
| 1210 | debug_cpu_watchpoint_clear(Machine, wp->index); | |
| 1211 | 1211 | } |
| 1212 | 1212 | } |
| 1213 | 1213 | } |
| r3171 | r3172 | |
| 1219 | 1219 | return; |
| 1220 | 1220 | else |
| 1221 | 1221 | { |
| 1222 | int found = debug_cpu_watchpoint_clear(wpindex); | |
| 1222 | int found = debug_cpu_watchpoint_clear(Machine, wpindex); | |
| 1223 | 1223 | if (found) |
| 1224 | 1224 | debug_console_printf("Watchpoint %X cleared\n", (UINT32)wpindex); |
| 1225 | 1225 | else |
| r3171 | r3172 | |
| 1253 | 1253 | { |
| 1254 | 1254 | debug_cpu_watchpoint *wp; |
| 1255 | 1255 | for (wp = cpuinfo->space[spacenum].wplist; wp != NULL; wp = wp->next) |
| 1256 | debug_cpu_watchpoint_enable(wp->index, ref); | |
| 1256 | debug_cpu_watchpoint_enable(Machine, wp->index, ref); | |
| 1257 | 1257 | } |
| 1258 | 1258 | } |
| 1259 | 1259 | } |
| r3171 | r3172 | |
| 1268 | 1268 | return; |
| 1269 | 1269 | else |
| 1270 | 1270 | { |
| 1271 | int found = debug_cpu_watchpoint_enable(wpindex, ref); | |
| 1271 | int found = debug_cpu_watchpoint_enable(Machine, wpindex, ref); | |
| 1272 | 1272 | if (found) |
| 1273 | 1273 | debug_console_printf("Watchpoint %X %s\n", (UINT32)wpindex, ref ? "enabled" : "disabled"); |
| 1274 | 1274 | else |
| r3171 | r3172 | |
| 1351 | 1351 | |
| 1352 | 1352 | if (cpuinfo->valid && cpuinfo->hotspots) |
| 1353 | 1353 | { |
| 1354 | debug_cpu_hotspot_track(cpunum, 0, 0); | |
| 1354 | debug_cpu_hotspot_track(Machine, cpunum, 0, 0); | |
| 1355 | 1355 | debug_console_printf("Cleared hotspot tracking on CPU %d\n", (int)cpunum); |
| 1356 | 1356 | cleared = TRUE; |
| 1357 | 1357 | } |
| r3171 | r3172 | |
| 1374 | 1374 | return; |
| 1375 | 1375 | |
| 1376 | 1376 | /* attempt to install */ |
| 1377 | if (debug_cpu_hotspot_track(cpunum, count, threshhold)) | |
| 1377 | if (debug_cpu_hotspot_track(Machine, cpunum, count, threshhold)) | |
| 1378 | 1378 | debug_console_printf("Now tracking hotspots on CPU %d using %d slots with a threshhold of %d\n", (int)cpunum, (int)count, (int)threshhold); |
| 1379 | 1379 | else |
| 1380 | 1380 | debug_console_printf("Error setting up the hotspot tracking\n"); |
| r3171 | r3172 | |
| 2050 | 2050 | |
| 2051 | 2051 | static void execute_source(int ref, int params, const char *param[]) |
| 2052 | 2052 | { |
| 2053 | debug_cpu_source_script(param[0]); | |
| 2053 | debug_cpu_source_script(Machine, param[0]); | |
| 2054 | 2054 | } |
| 2055 | 2055 | |
| 2056 | 2056 |
| r3171 | r3172 | |
|---|---|---|
| 26 | 26 | #include "debugcpu.h" |
| 27 | 27 | #include "debugvw.h" |
| 28 | 28 | #include "info.h" |
| 29 | #include "deprecat.h" | |
| 30 | 29 | #include <zlib.h> |
| 31 | 30 | |
| 32 | 31 | |
| r3171 | r3172 | |
| 84 | 83 | FUNCTION PROTOTYPES |
| 85 | 84 | ***************************************************************************/ |
| 86 | 85 | |
| 87 | static int debug_comment_load_xml(mame_file *file); | |
| 86 | static int debug_comment_load_xml(running_machine *machine, mame_file *file); | |
| 88 | 87 | static void debug_comment_exit(running_machine *machine); |
| 89 | 88 | static void debug_comment_free(void); |
| 90 | 89 | |
| r3171 | r3172 | |
| 110 | 109 | memset(debug_comments, 0, cpu_gettotalcpu() * sizeof(comment_group)); |
| 111 | 110 | |
| 112 | 111 | /* automatically load em up */ |
| 113 | debug_comment_load(); | |
| 112 | debug_comment_load(machine); | |
| 114 | 113 | |
| 115 | 114 | add_exit_callback(machine, debug_comment_exit); |
| 116 | 115 | } |
| r3171 | r3172 | |
| 379 | 378 | debug_comment_save - comment file saving |
| 380 | 379 | -------------------------------------------------------------------------*/ |
| 381 | 380 | |
| 382 | int debug_comment_save( | |
| 381 | int debug_comment_save(running_machine *machine) | |
| 383 | 382 | { |
| 384 | 383 | int i, j; |
| 385 | 384 | char crc_buf[20]; |
| r3171 | r3172 | |
| 401 | 400 | systemnode = xml_add_child(commentnode, "system", NULL); |
| 402 | 401 | if (!systemnode) |
| 403 | 402 | goto error; |
| 404 | xml_set_attribute(systemnode, "name", | |
| 403 | xml_set_attribute(systemnode, "name", machine->gamedrv->name); | |
| 405 | 404 | |
| 406 | 405 | /* for each cpu */ |
| 407 | 406 | for (i = 0; i < cpu_gettotalcpu(); i++) |
| r3171 | r3172 | |
| 431 | 430 | astring *fname; |
| 432 | 431 | mame_file *fp; |
| 433 | 432 | |
| 434 | fname = astring_assemble_2(astring_alloc(), | |
| 433 | fname = astring_assemble_2(astring_alloc(), machine->basename, ".cmt"); | |
| 435 | 434 | filerr = mame_fopen(SEARCHPATH_COMMENT, astring_c(fname), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &fp); |
| 436 | 435 | astring_free(fname); |
| 437 | 436 | |
| r3171 | r3172 | |
| 456 | 455 | debug_comment_load(_xml) - comment file loading |
| 457 | 456 | -------------------------------------------------------------------------*/ |
| 458 | 457 | |
| 459 | int debug_comment_load( | |
| 458 | int debug_comment_load(running_machine *machine) | |
| 460 | 459 | { |
| 461 | 460 | file_error filerr; |
| 462 | 461 | mame_file *fp; |
| 463 | 462 | astring *fname; |
| 464 | 463 | |
| 465 | fname = astring_assemble_2(astring_alloc(), | |
| 464 | fname = astring_assemble_2(astring_alloc(), machine->basename, ".cmt"); | |
| 466 | 465 | filerr = mame_fopen(SEARCHPATH_COMMENT, astring_c(fname), OPEN_FLAG_READ, &fp); |
| 467 | 466 | astring_free(fname); |
| 468 | 467 | |
| 469 | 468 | if (filerr != FILERR_NONE) return 0; |
| 470 | debug_comment_load_xml(fp); | |
| 469 | debug_comment_load_xml(machine, fp); | |
| 471 | 470 | mame_fclose(fp); |
| 472 | 471 | |
| 473 | 472 | return 1; |
| 474 | 473 | } |
| 475 | 474 | |
| 476 | static int debug_comment_load_xml(mame_file *fp) | |
| 475 | static int debug_comment_load_xml(running_machine *machine, mame_file *fp) | |
| 477 | 476 | { |
| 478 | 477 | int i, j; |
| 479 | 478 | xml_data_node *root, *commentnode, *systemnode, *cpunode, *datanode; |
| r3171 | r3172 | |
| 498 | 497 | /* check to make sure the file is applicable */ |
| 499 | 498 | systemnode = xml_get_sibling(commentnode->child, "system"); |
| 500 | 499 | name = xml_get_attribute_string(systemnode, "name", ""); |
| 501 | if (strcmp(name, | |
| 500 | if (strcmp(name, machine->gamedrv->name) != 0) | |
| 502 | 501 | goto error; |
| 503 | 502 | |
| 504 | 503 | i = 0; |
| r3171 | r3172 | |
| 544 | 543 | |
| 545 | 544 | static void debug_comment_exit(running_machine *machine) |
| 546 | 545 | { |
| 547 | debug_comment_save(); | |
| 546 | debug_comment_save(machine); | |
| 548 | 547 | debug_comment_free(); |
| 549 | 548 | } |
| 550 | 549 |
| r3171 | r3172 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | #include "debugger.h" |
| 35 | #include "deprecat.h" | |
| 35 | 36 | #include "m6805.h" |
| 36 | 37 | |
| 37 | 38 | #define IRQ_LEVEL_DETECT 0 |
| r3171 | r3172 | |
|---|---|---|
| 41 | 41 | ****************************************************************************/ |
| 42 | 42 | |
| 43 | 43 | #include "debugger.h" |
| 44 | #include "deprecat.h" | |
| 44 | 45 | |
| 45 | 46 | typedef UINT8 BOOLEAN; |
| 46 | 47 | typedef UINT8 BYTE; |
| r3171 | r3172 | |
|---|---|---|
| 18 | 18 | * |
| 19 | 19 | *****************************************************************************/ |
| 20 | 20 | #include "debugger.h" |
| 21 | #include "deprecat.h" | |
| 21 | 22 | |
| 22 | 23 | #include "lh5801.h" |
| 23 | 24 |
| r3171 | r3172 | |
|---|---|---|
| 71 | 71 | *****************************************************************************/ |
| 72 | 72 | |
| 73 | 73 | #include "debugger.h" |
| 74 | #include "deprecat.h" | |
| 74 | 75 | #include "m6809.h" |
| 75 | 76 | |
| 76 | 77 | /* Enable big switch statement for the main opcodes */ |
| r3171 | r3172 | |
|---|---|---|
| 8 | 8 | /* ======================================================================== */ |
| 9 | 9 | |
| 10 | 10 | #include "debugger.h" |
| 11 | #include "deprecat.h" | |
| 11 | 12 | #include "m68000.h" |
| 12 | 13 | |
| 13 | 14 | /* Configuration switches (see m68kconf.h for explanation) */ |
| r3171 | r3172 | |
|---|---|---|
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "debugger.h" |
| 12 | #include "deprecat.h" | |
| 12 | 13 | #include "ccpu.h" |
| 13 | 14 | |
| 14 | 15 |
| r3171 | r3172 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "debugger.h" |
| 10 | #include "deprecat.h" | |
| 10 | 11 | #include "tms32031.h" |
| 11 | 12 | #include "eminline.h" |
| 12 | 13 |
| r3171 | r3172 | |
|---|---|---|
| 43 | 43 | ***************************************************************************/ |
| 44 | 44 | |
| 45 | 45 | #include "debugger.h" |
| 46 | #include "deprecat.h" | |
| 46 | 47 | #include "mcs48.h" |
| 47 | 48 | |
| 48 | 49 | |
| r3171 | r3172 | |
| 699 | 700 | static void mcs48_init(int index, int clock, const void *config, int (*irqcallback)(int), UINT16 romsize) |
| 700 | 701 | { |
| 701 | 702 | memset(&mcs48, 0, sizeof(mcs48)); |
| 702 | ||
| 703 | ||
| 703 | 704 | /* External access line |
| 704 | * EA=1 : read from external rom | |
| 705 | * EA=0 : read from internal rom | |
| 706 | */ | |
| 707 | ||
| 705 | * EA=1 : read from external rom | |
| 706 | * EA=0 : read from internal rom | |
| 707 | */ | |
| 708 | ||
| 708 | 709 | /* FIXME: Current implementation suboptimal */ |
| 709 | 710 | mcs48.ea = (romsize ? 0 : 1); |
| 710 | 711 |
| r3171 | r3172 | |
|---|---|---|
| 576 | 576 | |
| 577 | 577 | static READ16_HANDLER( m37710_internal_word_r ) |
| 578 | 578 | { |
| 579 | return (m37710_internal_r(offset*2) | m37710_internal_r((offset*2)+1)<<8); | |
| 579 | if (mem_mask == 0xffff) | |
| 580 | { | |
| 581 | return (m37710_internal_r(offset*2) | m37710_internal_r((offset*2)+1)<<8); | |
| 582 | } | |
| 583 | else if (mem_mask == 0xff00) | |
| 584 | { | |
| 585 | return m37710_internal_r((offset*2)+1)<<8; | |
| 586 | } | |
| 587 | else if (mem_mask == 0x00ff) | |
| 588 | { | |
| 589 | return m37710_internal_r((offset*2)); | |
| 590 | } | |
| 591 | ||
| 592 | return 0; | |
| 580 | 593 | } |
| 581 | 594 | |
| 582 | 595 | static WRITE16_HANDLER( m37710_internal_word_w ) |
| r3171 | r3172 | |
|---|---|---|
| 2 | 2 | /* ============================= CONFIGURATION ============================ */ |
| 3 | 3 | /* ======================================================================== */ |
| 4 | 4 | |
| 5 | #include "deprecat.h" | |
| 5 | 6 | |
| 6 | 7 | #undef FLAG_SET_M |
| 7 | 8 | #undef FLAG_SET_X |
| r3171 | r3172 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | #include "sharc.h" |
| 7 | 7 | #include "debugger.h" |
| 8 | #include "deprecat.h" | |
| 8 | 9 | |
| 9 | 10 | static offs_t sharc_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); |
| 10 | 11 |
| r3171 | r3172 | |
|---|---|---|
| 77 | 77 | *****************************************************************************/ |
| 78 | 78 | |
| 79 | 79 | #include "debugger.h" |
| 80 | #include "deprecat.h" | |
| 80 | 81 | #include "z180.h" |
| 81 | 82 | #include "cpu/z80/z80daisy.h" |
| 82 | 83 |
| r3171 | r3172 | |
|---|---|---|
| 5 | 5 | /* 26.March 2000 PeT changed set_irq_line */ |
| 6 | 6 | |
| 7 | 7 | #include "debugger.h" |
| 8 | #include "deprecat.h" | |
| 8 | 9 | #include "cpuintrf.h" |
| 9 | 10 | |
| 10 | 11 | #include "host.h" |
| r3171 | r3172 | |
|---|---|---|
| 4 | 4 | ****************************************************************************/ |
| 5 | 5 | |
| 6 | 6 | #include "debugger.h" |
| 7 | #include "deprecat.h" | |
| 7 | 8 | #include "host.h" |
| 8 | 9 | |
| 9 | 10 |
| r3171 | r3172 | |
|---|---|---|
| 11 | 11 | ***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | #include "debugger.h" |
| 14 | #include "deprecat.h" | |
| 14 | 15 | #include "cubeqcpu.h" |
| 15 | 16 | |
| 16 | 17 |
| r3171 | r3172 | |
|---|---|---|
| 406 | 406 | |
| 407 | 407 | |
| 408 | 408 | #include "debugger.h" |
| 409 | #include "deprecat.h" | |
| 409 | 410 | #include "upd7810.h" |
| 410 | 411 | |
| 411 | 412 | static UPD7810 upd7810; |
| r3171 | r3172 | |
|---|---|---|
| 28 | 28 | *****************************************************************************/ |
| 29 | 29 | |
| 30 | 30 | #include "debugger.h" |
| 31 | #include "deprecat.h" | |
| 31 | 32 | |
| 32 | 33 | #include "sc61860.h" |
| 33 | 34 | #include "sc.h" |
| r3171 | r3172 | |
|---|---|---|
| 44 | 44 | |
| 45 | 45 | #include "minx.h" |
| 46 | 46 | #include "debugger.h" |
| 47 | #include "deprecat.h" | |
| 47 | 48 | |
| 48 | 49 | #define FLAG_I 0x80 |
| 49 | 50 | #define FLAG_D 0x40 |
| r3171 | r3172 | |
|---|---|---|
| 4 | 4 | // Portability fixes by Richter Belmont |
| 5 | 5 | |
| 6 | 6 | #include "debugger.h" |
| 7 | #include "deprecat.h" | |
| 7 | 8 | #include "v60.h" |
| 8 | 9 | |
| 9 | 10 | // memory accessors |
| r3171 | r3172 | |
|---|---|---|
| 30 | 30 | ***************************************************************************/ |
| 31 | 31 | |
| 32 | 32 | #include "debugger.h" |
| 33 | #include "deprecat.h" | |
| 33 | 34 | #include "dsp56k.h" |
| 34 | 35 | |
| 35 | 36 | #include "dsp56def.h" |
| r3171 | r3172 | |
|---|---|---|
| 62 | 62 | |
| 63 | 63 | #include <limits.h> |
| 64 | 64 | #include "debugger.h" |
| 65 | #include "deprecat.h" | |
| 65 | 66 | #include "spc700.h" |
| 66 | 67 | |
| 67 | 68 | /* ======================================================================== */ |
| r3171 | r3172 | |
|---|---|---|
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | 20 | #include "debugger.h" |
| 21 | #include "deprecat.h" | |
| 21 | 22 | #include "ssp1601.h" |
| 22 | 23 | |
| 23 | 24 |
| r3171 | r3172 | |
|---|---|---|
| 7 | 7 | *************************************************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "debugger.h" |
| 10 | #include "deprecat.h" | |
| 10 | 11 | #include "tlcs90.h" |
| 11 | 12 | |
| 12 | 13 | typedef struct |
| r3171 | r3172 | |
|---|---|---|
| 13 | 13 | *************************************************************************/ |
| 14 | 14 | |
| 15 | 15 | #include "debugger.h" |
| 16 | #include "deprecat.h" | |
| 16 | 17 | #include "s2650.h" |
| 17 | 18 | #include "s2650cpu.h" |
| 18 | 19 |
| r3171 | r3172 | |
|---|---|---|
| 1 | 1 | #include "debugger.h" |
| 2 | #include "deprecat.h" | |
| 2 | 3 | #include "se3208.h" |
| 3 | 4 | |
| 4 | 5 | /* |
| r3171 | r3172 | |
|---|---|---|
| 212 | 212 | *********************************************************************/ |
| 213 | 213 | |
| 214 | 214 | #include "debugger.h" |
| 215 | #include "deprecat.h" | |
| 215 | 216 | #include "eminline.h" |
| 216 | 217 | #include "e132xs.h" |
| 217 | 218 | #include "osd_cpu.h" |
| r3171 | r3172 | |
|---|---|---|
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | #include "debugger.h" |
| 8 | #include "deprecat.h" | |
| 8 | 9 | #include "mc68hc11.h" |
| 9 | 10 | |
| 10 | 11 | enum |
| r3171 | r3172 | |
|---|---|---|
| 96 | 96 | ***************************************************************************/ |
| 97 | 97 | |
| 98 | 98 | #include "debugger.h" |
| 99 | #include "deprecat.h" | |
| 99 | 100 | #include "adsp2100.h" |
| 100 | 101 | #include <stddef.h> |
| 101 | 102 |
| r3171 | r3172 | |
|---|---|---|
| 28 | 28 | ***************************************************************************/ |
| 29 | 29 | |
| 30 | 30 | #include "debugger.h" |
| 31 | #include "deprecat.h" | |
| 31 | 32 | #include "dsp32.h" |
| 32 | 33 | |
| 33 | 34 |
| r3171 | r3172 | |
|---|---|---|
| 14 | 14 | #include "drcbeut.h" |
| 15 | 15 | #include "eminline.h" |
| 16 | 16 | #include "debugger.h" |
| 17 | #include "deprecat.h" | |
| 17 | 18 | #include <math.h> |
| 18 | 19 | |
| 19 | 20 | #ifdef _MSC_VER |
| r3171 | r3172 | |
|---|---|---|
| 23 | 23 | #include "driver.h" |
| 24 | 24 | #include "cpuintrf.h" |
| 25 | 25 | #include "debugger.h" |
| 26 | #include "deprecat.h" | |
| 26 | 27 | #include "cop400.h" |
| 27 | 28 | |
| 28 | 29 | /* The opcode table now is a combination of cycle counts and function pointers */ |
| r3171 | r3172 | |
|---|---|---|
| 26 | 26 | |
| 27 | 27 | #include "cpuintrf.h" |
| 28 | 28 | #include "debugger.h" |
| 29 | #include "deprecat.h" | |
| 29 | 30 | #include "cop400.h" |
| 30 | 31 | |
| 31 | 32 | /* The opcode table now is a combination of cycle counts and function pointers */ |
| r3171 | r3172 | |
|---|---|---|
| 101 | 101 | */ |
| 102 | 102 | |
| 103 | 103 | #include "debugger.h" |
| 104 | #include "deprecat.h" | |
| 104 | 105 | #include "m6502.h" |
| 105 | 106 | #include "m4510.h" |
| 106 | 107 |
| r3171 | r3172 | |
|---|---|---|
| 30 | 30 | #endif |
| 31 | 31 | |
| 32 | 32 | #include "debugger.h" |
| 33 | #include "deprecat.h" | |
| 33 | 34 | #include "m6502.h" |
| 34 | 35 | #include "ops02.h" |
| 35 | 36 | #include "ill02.h" |
| r3171 | r3172 | |
|---|---|---|
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | 40 | #include "debugger.h" |
| 41 | #include "deprecat.h" | |
| 41 | 42 | #include "m6509.h" |
| 42 | 43 | |
| 43 | 44 | #include "ops02.h" |
| r3171 | r3172 | |
|---|---|---|
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | 40 | #include "debugger.h" |
| 41 | #include "deprecat.h" | |
| 41 | 42 | #include "m65ce02.h" |
| 42 | 43 | |
| 43 | 44 | #include "mincce02.h" |
| r3171 | r3172 | |
|---|---|---|
| 125 | 125 | /*int survival_prot = 0; */ |
| 126 | 126 | |
| 127 | 127 | #include "debugger.h" |
| 128 | #include "deprecat.h" | |
| 128 | 129 | #include "i8085.h" |
| 129 | 130 | #include "i8085cpu.h" |
| 130 | 131 | #include "i8085daa.h" |
| r3171 | r3172 | |
|---|---|---|
| 17 | 17 | |
| 18 | 18 | #include "arm.h" |
| 19 | 19 | #include "debugger.h" |
| 20 | #include "deprecat.h" | |
| 20 | 21 | |
| 21 | 22 | #define READ8(addr) cpu_read8(addr) |
| 22 | 23 | #define WRITE8(addr,data) cpu_write8(addr,data) |
| r3171 | r3172 | |
|---|---|---|
| 37 | 37 | /** **/ |
| 38 | 38 | /*************************************************************/ |
| 39 | 39 | #include "debugger.h" |
| 40 | #include "deprecat.h" | |
| 40 | 41 | #include "lr35902.h" |
| 41 | 42 | |
| 42 | 43 | #define FLAG_Z 0x80 |
| r3171 | r3172 | |
|---|---|---|
| 44 | 44 | *****************************************************************************/ |
| 45 | 45 | |
| 46 | 46 | #include "debugger.h" |
| 47 | #include "deprecat.h" | |
| 47 | 48 | #include "z8000.h" |
| 48 | 49 | #include "z8000cpu.h" |
| 49 | 50 | #include "osd_cpu.h" |
| r3171 | r3172 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | |
| 56 | 56 | #include "debugger.h" |
| 57 | #include "deprecat.h" | |
| 57 | 58 | #include "tms32010.h" |
| 58 | 59 | |
| 59 | 60 |
| r3171 | r3172 | |
|---|---|---|
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | #include "debugger.h" |
| 13 | #include "deprecat.h" | |
| 13 | 14 | #include "sm8500.h" |
| 14 | 15 | |
| 15 | 16 | #define FLAG_C 0x80 |
| r3171 | r3172 | |
|---|---|---|
| 14 | 14 | ***************************************************************************/ |
| 15 | 15 | |
| 16 | 16 | #include "debugger.h" |
| 17 | #include "deprecat.h" | |
| 17 | 18 | #include "mb88xx.h" |
| 18 | 19 | |
| 19 | 20 | /*************************************************************************** |
| r3171 | r3172 | |
|---|---|---|
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | #include "debugger.h" |
| 8 | #include "deprecat.h" | |
| 8 | 9 | #include "cpuintrf.h" |
| 9 | 10 | #include "tms32051.h" |
| 10 | 11 |
| r3171 | r3172 | |
|---|---|---|
| 148 | 148 | ****************************************************************************/ |
| 149 | 149 | |
| 150 | 150 | #include "debugger.h" |
| 151 | #include "deprecat.h" | |
| 151 | 152 | #include "alph8201.h" |
| 152 | 153 | |
| 153 | 154 | /* instruction cycle count */ |
| r3171 | r3172 | |
|---|---|---|
| 325 | 325 | |
| 326 | 326 | #include "cpuintrf.h" |
| 327 | 327 | #include "debugger.h" |
| 328 | #include "deprecat.h" | |
| 328 | 329 | #include "apexc.h" |
| 329 | 330 | |
| 330 | 331 | typedef struct |
| r3171 | r3172 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | #include "cpuintrf.h" |
| 83 | 83 | #include "debugger.h" |
| 84 | #include "deprecat.h" | |
| 84 | 85 | |
| 85 | 86 | enum |
| 86 | 87 | { |
| r3171 | r3172 | |
|---|---|---|
| 104 | 104 | ****************************************************************************/ |
| 105 | 105 | |
| 106 | 106 | #include "debugger.h" |
| 107 | #include "deprecat.h" | |
| 107 | 108 | |
| 108 | 109 | typedef UINT8 BOOLEAN; |
| 109 | 110 | typedef UINT8 BYTE; |
| r3171 | r3172 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "debugger.h" |
| 10 | #include "deprecat.h" | |
| 10 | 11 | #include "r3000.h" |
| 11 | 12 | |
| 12 | 13 |
| r3171 | r3172 | |
|---|---|---|
| 27 | 27 | */ |
| 28 | 28 | |
| 29 | 29 | #include "debugger.h" |
| 30 | #include "deprecat.h" | |
| 30 | 31 | #include "f8.h" |
| 31 | 32 | |
| 32 | 33 | #define S 0x01 |
| r3171 | r3172 | |
|---|---|---|
| 94 | 94 | *****************************************************************************/ |
| 95 | 95 | |
| 96 | 96 | #include "debugger.h" |
| 97 | #include "deprecat.h" | |
| 97 | 98 | #include "z80.h" |
| 98 | 99 | #include "z80daisy.h" |
| 99 | 100 |
| r3171 | r3172 | |
|---|---|---|
| 10 | 10 | ***************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "debugger.h" |
| 13 | #include "deprecat.h" | |
| 13 | 14 | #include "asap.h" |
| 14 | 15 | |
| 15 | 16 |
| r3171 | r3172 | |
|---|---|---|
| 1 | 1 | #include "debugger.h" |
| 2 | #include "deprecat.h" | |
| 2 | 3 | #include "i960.h" |
| 3 | 4 | #include "i960dis.h" |
| 4 | 5 | #include <math.h> |
| r3171 | r3172 | |
|---|---|---|
| 17 | 17 | ********************************************/ |
| 18 | 18 | |
| 19 | 19 | #include "debugger.h" |
| 20 | #include "deprecat.h" | |
| 20 | 21 | #include "v810.h" |
| 21 | 22 | |
| 22 | 23 | #define clkIF 3 |
| r3171 | r3172 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | |
| 121 | 121 | #include "debugger.h" |
| 122 | #include "deprecat.h" | |
| 122 | 123 | #include "tms32025.h" |
| 123 | 124 | |
| 124 | 125 |
| r3171 | r3172 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | |
| 56 | 56 | #include "debugger.h" |
| 57 | #include "deprecat.h" | |
| 57 | 58 | #include "pic16c5x.h" |
| 58 | 59 | |
| 59 | 60 |
| r3171 | r3172 | |
|---|---|---|
| 336 | 336 | |
| 337 | 337 | |
| 338 | 338 | #include "debugger.h" |
| 339 | #include "deprecat.h" | |
| 339 | 340 | #include "pdp1.h" |
| 340 | 341 | |
| 341 | 342 | #define LOG 0 |
| r3171 | r3172 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | #include "cpuintrf.h" |
| 12 | 12 | #include "debugger.h" |
| 13 | #include "deprecat.h" | |
| 13 | 14 | #include "tx0.h" |
| 14 | 15 | |
| 15 | 16 | #define LOG 0 |
| r3171 | r3172 | |
|---|---|---|
| 15 | 15 | |
| 16 | 16 | #include "mb86233.h" |
| 17 | 17 | #include "debugger.h" |
| 18 | #include "deprecat.h" | |
| 18 | 19 | |
| 19 | 20 | /*************************************************************************** |
| 20 | 21 | STRUCTURES & TYPEDEFS |
| r3171 | r3172 | |
|---|---|---|
| 12 | 12 | *****************************************************************************/ |
| 13 | 13 | |
| 14 | 14 | #include "debugger.h" |
| 15 | #include "deprecat.h" | |
| 15 | 16 | #include "t11.h" |
| 16 | 17 | |
| 17 | 18 |
| r3171 | r3172 | |
|---|---|---|
| 48 | 48 | static WRITE32_HANDLER(test_rt_w_callback); |
| 49 | 49 | static void test_dt_r_callback(UINT32 insn, UINT32 *prn, UINT32 (*read32)(UINT32 addr)); |
| 50 | 50 | static void test_dt_w_callback(UINT32 insn, UINT32 *prn, void (*write32)(UINT32 addr, UINT32 data)); |
| 51 | static char *Spec_RT(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0); | |
| 52 | static char *Spec_DT(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0); | |
| 53 | static char *Spec_DO(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0); | |
| 54 | 51 | #endif |
| 55 | 52 | |
| 56 | 53 | /* Macros that can be re-defined for custom cpu implementations - The core expects these to be defined */ |
| r3171 | r3172 | |
| 99 | 96 | arm7_coproc_rt_w_callback = test_rt_w_callback; |
| 100 | 97 | arm7_coproc_dt_r_callback = test_dt_r_callback; |
| 101 | 98 | arm7_coproc_dt_w_callback = test_dt_w_callback; |
| 102 | // setup dasm callbacks - direct method example | |
| 103 | arm7_dasm_cop_dt_callback = Spec_DT; | |
| 104 | arm7_dasm_cop_rt_callback = Spec_RT; | |
| 105 | arm7_dasm_cop_do_callback = Spec_DO; | |
| 106 | 99 | #endif |
| 107 | 100 | } |
| 108 | 101 | |
| r3171 | r3172 | |
| 432 | 425 | { |
| 433 | 426 | LOG(("test_dt_w_callback: opcode = %x\n", insn)); |
| 434 | 427 | } |
| 435 | ||
| 436 | /* Custom Co-proc DASM handlers */ | |
| 437 | static char *Spec_RT(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0) | |
| 438 | { | |
| 439 | pBuf += sprintf(pBuf, "SPECRT"); | |
| 440 | return pBuf; | |
| 441 | } | |
| 442 | static char *Spec_DT(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0) | |
| 443 | { | |
| 444 | pBuf += sprintf(pBuf, "SPECDT"); | |
| 445 | return pBuf; | |
| 446 | } | |
| 447 | static char *Spec_DO(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0) | |
| 448 | { | |
| 449 | pBuf += sprintf(pBuf, "SPECDO"); | |
| 450 | return pBuf; | |
| 451 | } | |
| 452 | 428 | #endif |
| r3171 | r3172 | |
|---|---|---|
| 586 | 586 | else if( (opcode&0x0e000000)==0x0c000000 ) //bits 27-25 == 110 |
| 587 | 587 | { |
| 588 | 588 | /* co processor data transfer */ |
| 589 | if(arm7_dasm_cop_dt_callback) | |
| 590 | arm7_dasm_cop_dt_callback(pBuf,opcode,(char*)pConditionCode,(char*)pBuf0); | |
| 591 | else | |
| 592 | DasmCoProc_DT(pBuf,opcode,(char*)pConditionCode,(char*)pBuf0); | |
| 589 | DasmCoProc_DT(pBuf,opcode,(char*)pConditionCode,(char*)pBuf0); | |
| 593 | 590 | } |
| 594 | 591 | else if( (opcode&0x0f000000)==0x0e000000 ) //bits 27-24 == 1110 |
| 595 | 592 | { |
| r3171 | r3172 | |
| 598 | 595 | //Register Transfer |
| 599 | 596 | if(opcode&0x10) |
| 600 | 597 | { |
| 601 | if(arm7_dasm_cop_rt_callback) | |
| 602 | arm7_dasm_cop_rt_callback(pBuf,opcode,(char*)pConditionCode,(char*)pBuf0); | |
| 603 | else | |
| 604 | DasmCoProc_RT(pBuf,opcode,pConditionCode,pBuf0); | |
| 598 | DasmCoProc_RT(pBuf,opcode,pConditionCode,pBuf0); | |
| 605 | 599 | } |
| 606 | 600 | //Data Op |
| 607 | 601 | else |
| 608 | 602 | { |
| 609 | if(arm7_dasm_cop_do_callback) | |
| 610 | arm7_dasm_cop_do_callback(pBuf,opcode,(char*)pConditionCode,(char*)pBuf0); | |
| 611 | else | |
| 612 | DasmCoProc_DO(pBuf,opcode,pConditionCode,pBuf0); | |
| 603 | DasmCoProc_DO(pBuf,opcode,pConditionCode,pBuf0); | |
| 613 | 604 | } |
| 614 | 605 | } |
| 615 | 606 | else if( (opcode&0x0f000000) == 0x0f000000 ) //bits 27-24 == 1111 |
| r3171 | r3172 | |
|---|---|---|
| 89 | 89 | #include "drcuml.h" |
| 90 | 90 | #include "drcbeut.h" |
| 91 | 91 | #include "debugger.h" |
| 92 | #include "deprecat.h" | |
| 92 | 93 | #include "x86emit.h" |
| 93 | 94 | #include "eminline.h" |
| 94 | 95 | #undef REG_SP |
| r3171 | r3172 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | ******************************************************************************/ |
| 110 | 110 | #include "debugger.h" |
| 111 | #include "deprecat.h" | |
| 111 | 112 | #include "h6280.h" |
| 112 | 113 | |
| 113 | 114 | static int h6280_ICount = 0; |
| r3171 | r3172 | |
|---|---|---|
| 74 | 74 | */ |
| 75 | 75 | |
| 76 | 76 | #include "debugger.h" |
| 77 | #include "deprecat.h" | |
| 77 | 78 | #include "m6800.h" |
| 78 | 79 | |
| 79 | 80 | #define VERBOSE 0 |
| r3171 | r3172 | |
|---|---|---|
| 22 | 22 | * |
| 23 | 23 | *****************************************************************************/ |
| 24 | 24 | #include "debugger.h" |
| 25 | #include "deprecat.h" | |
| 25 | 26 | |
| 26 | 27 | #include "saturn.h" |
| 27 | 28 |
| r3171 | r3172 | |
|---|---|---|
| 103 | 103 | *****************************************************************************/ |
| 104 | 104 | |
| 105 | 105 | #include "debugger.h" |
| 106 | #include "deprecat.h" | |
| 106 | 107 | #include "i8x41.h" |
| 107 | 108 | |
| 108 | 109 | typedef struct { |
| r3171 | r3172 | |
|---|---|---|
| 35 | 35 | *****************************************************************************/ |
| 36 | 36 | |
| 37 | 37 | #include "debugger.h" |
| 38 | #include "deprecat.h" | |
| 38 | 39 | #include "konami.h" |
| 39 | 40 | |
| 40 | 41 | #define VERBOSE 0 |
| r3171 | r3172 | |
|---|---|---|
| 2073 | 2073 | } |
| 2074 | 2074 | |
| 2075 | 2075 | /* compute a target speed as an integral percentage */ |
| 2076 | target_speed = floor(minrefresh * 100.0 / ATTOSECONDS_TO_HZ(min_frame_period)); | |
| 2076 | /* note that we lop 0.25Hz off of the minrefresh when doing the computation to allow for | |
| 2077 | the fact that most refresh rates are not accurate to 10 digits... */ | |
| 2078 | target_speed = floor((minrefresh - 0.25f) * 100.0 / ATTOSECONDS_TO_HZ(min_frame_period)); | |
| 2077 | 2079 | target_speed = MIN(target_speed, original_speed); |
| 2078 | 2080 | |
| 2079 | 2081 | /* if we changed, log that verbosely */ |
| 2080 | 2082 | if (target_speed != global.speed) |
| 2081 | 2083 | { |
| 2082 | mame_printf_verbose("Adjusting target speed to %d%%\n", target_speed); | |
| 2084 | mame_printf_verbose("Adjusting target speed to %d%% (hw=%.2fHz, game=%.2fHz, adjusted=%.2fHz)\n", target_speed, minrefresh, ATTOSECONDS_TO_HZ(min_frame_period), ATTOSECONDS_TO_HZ(min_frame_period * 100 / target_speed)); | |
| 2083 | 2085 | global.speed = target_speed; |
| 2084 | 2086 | } |
| 2085 | 2087 | } |
| r3171 | r3172 | |
|---|---|---|
| 2602 | 2602 | /* register for saving, but only if we're not part of a memory region */ |
| 2603 | 2603 | for (region = memory_region_next(machine, NULL); region != NULL; region = memory_region_next(machine, region)) |
| 2604 | 2604 | { |
| 2605 | UINT8 *region_base = memory_region(Machine, region); | |
| 2606 | UINT32 region_length = memory_region_length(Machine, region); | |
| 2605 | UINT8 *region_base = memory_region(machine, region); | |
| 2606 | UINT32 region_length = memory_region_length(machine, region); | |
| 2607 | 2607 | if (region_base != NULL && region_length != 0 && (UINT8 *)memory >= region_base && ((UINT8 *)memory + (byteend - bytestart + 1)) < region_base + region_length) |
| 2608 | 2608 | { |
| 2609 | 2609 | VPRINTF(("skipping save of this memory block as it is covered by a memory region\n")); |
| r3171 | r3172 | |
|---|---|---|
| 139 | 139 | $(EMUMACHINE)/idectrl.o \ |
| 140 | 140 | $(EMUMACHINE)/intelfsh.o \ |
| 141 | 141 | $(EMUMACHINE)/latch8.o \ |
| 142 | $(EMUMACHINE)/laserdsc.o \ | |
| 142 | $(EMUMACHINE)/ldcore.o \ | |
| 143 | $(EMUMACHINE)/ldpr8210.o \ | |
| 144 | $(EMUMACHINE)/ldv1000.o \ | |
| 143 | 145 | $(EMUMACHINE)/mb3773.o \ |
| 144 | 146 | $(EMUMACHINE)/mb87078.o \ |
| 145 | 147 | $(EMUMACHINE)/mc146818.o \ |
| r3171 | r3172 | |
|---|---|---|
| 12 | 12 | #include "driver.h" |
| 13 | 13 | #include "machine/timekpr.h" |
| 14 | 14 | |
| 15 | struct | |
| 15 | typedef struct | |
| 16 | 16 | { |
| 17 | 17 | UINT8 control; |
| 18 | 18 | UINT8 seconds; |
| r3171 | r3172 | |
| 24 | 24 | UINT8 year; |
| 25 | 25 | UINT8 century; |
| 26 | 26 | UINT8 *data; |
| 27 | int type; | |
| 27 | UINT8 *default_data; | |
| 28 | const device_config *device; | |
| 28 | 29 | int size; |
| 29 | 30 | int offset_control; |
| 30 | 31 | int offset_seconds; |
| r3171 | r3172 | |
| 36 | 37 | int offset_year; |
| 37 | 38 | int offset_century; |
| 38 | 39 | int offset_flags; |
| 39 | }; | |
| 40 | } timekeeper_state; | |
| 40 | 41 | |
| 41 | static struct timekeeper_chip timekeeper[ MAX_TIMEKEEPER_CHIPS ]; | |
| 42 | ||
| 43 | 42 | #define MASK_SECONDS ( 0x7f ) |
| 44 | 43 | #define MASK_MINUTES ( 0x7f ) |
| 45 | 44 | #define MASK_HOURS ( 0x3f ) |
| r3171 | r3172 | |
| 106 | 105 | } |
| 107 | 106 | } |
| 108 | 107 | |
| 109 | static void counters_to_ram( | |
| 108 | static void counters_to_ram( | |
| 110 | 109 | { |
| 111 | 110 | counter_to_ram( c->data, c->offset_control, c->control ); |
| 112 | 111 | counter_to_ram( c->data, c->offset_seconds, c->seconds ); |
| r3171 | r3172 | |
| 128 | 127 | return 0; |
| 129 | 128 | } |
| 130 | 129 | |
| 131 | static void counters_from_ram( i | |
| 130 | static void counters_from_ram( timekeeper_state *c | |
| 132 | 131 | { |
| 133 | struct timekeeper_chip *c = &timekeeper[ chip ]; | |
| 134 | ||
| 135 | 132 | c->control = counter_from_ram( c->data, c->offset_control ); |
| 136 | 133 | c->seconds = counter_from_ram( c->data, c->offset_seconds ); |
| 137 | 134 | c->minutes = counter_from_ram( c->data, c->offset_minutes ); |
| r3171 | r3172 | |
| 145 | 142 | |
| 146 | 143 | static TIMER_CALLBACK( timekeeper_tick ) |
| 147 | 144 | { |
| 148 | | |
| 145 | | |
| 149 | 146 | |
| 150 | 147 | int carry; |
| 151 | 148 | |
| r3171 | r3172 | |
| 203 | 200 | if( carry ) |
| 204 | 201 | { |
| 205 | 202 | carry = inc_bcd( &c->century, MASK_CENTURY, 0x00, 0x99 ); |
| 206 | switch( c->type ) | |
| 203 | ||
| 204 | if( c->device->type == M48T35 || | |
| 205 | c->device->type == M48T58 ) | |
| 207 | 206 | { |
| 208 | case TIMEKEEPER_M48T35: | |
| 209 | case TIMEKEEPER_M48T58: | |
| 210 | 207 | if( ( c->day & DAY_CEB ) != 0 ) |
| 211 | 208 | { |
| 212 | 209 | c->day ^= DAY_CB; |
| 213 | 210 | } |
| 214 | break; | |
| 215 | 211 | } |
| 216 | 212 | } |
| 217 | 213 | |
| r3171 | r3172 | |
| 221 | 217 | } |
| 222 | 218 | } |
| 223 | 219 | |
| 224 | void timekeeper_init( running_machine *machine, int chip, int type, UINT8 *data ) | |
| 220 | /*------------------------------------------------- | |
| 221 | get_safe_token - makes sure that the passed | |
| 222 | in device is the right type | |
| 223 | -------------------------------------------------*/ | |
| 224 | ||
| 225 | INLINE timekeeper_state *get_safe_token(const device_config *device) | |
| 225 | 226 | { |
| 226 | emu_timer *timer; | |
| 227 | attotime duration; | |
| 228 | mame_system_time systime; | |
| 229 | struct timekeeper_chip *c; | |
| 227 | assert(device != NULL); | |
| 228 | assert(device->token != NULL); | |
| 229 | assert((device->type == M48T02) || | |
| 230 | (device->type == M48T35) || | |
| 231 | (device->type == M48T58) || | |
| 232 | (device->type == MK48T08)); | |
| 230 | 233 | |
| 231 | if( chip >= MAX_TIMEKEEPER_CHIPS ) | |
| 232 | { | |
| 233 | logerror( "timekeeper_init( %d ) invalid chip\n", chip ); | |
| 234 | return; | |
| 235 | } | |
| 236 | c = &timekeeper[ chip ]; | |
| 234 | return (timekeeper_state *)device->token; | |
| 235 | } | |
| 237 | 236 | |
| 238 | ||
| 237 | /* | |
| 239 | 238 | |
| 240 | switch( c->type ) | |
| 239 | WRITE8_DEVICE_HANDLER( timekeeper_w ) | |
| 240 | { | |
| 241 | timekeeper_state *c = get_safe_token(device); | |
| 242 | ||
| 243 | if( offset == c->offset_control ) | |
| 241 | 244 | { |
| 242 | case TIMEKEEPER_M48T02: | |
| 243 | c->offset_control = 0x7f8; | |
| 244 | c->offset_seconds = 0x7f9; | |
| 245 | c->offset_minutes = 0x7fa; | |
| 246 | c->offset_hours = 0x7fb; | |
| 247 | c->offset_day = 0x7fc; | |
| 248 | c->offset_date = 0x7fd; | |
| 249 | c->offset_month = 0x7fe; | |
| 250 | c->offset_year = 0x7ff; | |
| 251 | c->offset_century = -1; | |
| 252 | c->offset_flags = -1; | |
| 253 | c->size = 0x800; | |
| 254 | break; | |
| 255 | case TIMEKEEPER_M48T35: | |
| 256 | c->offset_control = 0x7ff8; | |
| 257 | c->offset_seconds = 0x7ff9; | |
| 258 | c->offset_minutes = 0x7ffa; | |
| 259 | c->offset_hours = 0x7ffb; | |
| 260 | c->offset_day = 0x7ffc; | |
| 261 | c->offset_date = 0x7ffd; | |
| 262 | c->offset_month = 0x7ffe; | |
| 263 | c->offset_year = 0x7fff; | |
| 264 | c->offset_century = -1; | |
| 265 | c->offset_flags = -1; | |
| 266 | c->size = 0x8000; | |
| 267 | break; | |
| 268 | case TIMEKEEPER_M48T58: | |
| 269 | c->offset_control = 0x1ff8; | |
| 270 | c->offset_seconds = 0x1ff9; | |
| 271 | c->offset_minutes = 0x1ffa; | |
| 272 | c->offset_hours = 0x1ffb; | |
| 273 | c->offset_day = 0x1ffc; | |
| 274 | c->offset_date = 0x1ffd; | |
| 275 | c->offset_month = 0x1ffe; | |
| 276 | c->offset_year = 0x1fff; | |
| 277 | c->offset_century = -1; | |
| 278 | c->offset_flags = -1; | |
| 279 | c->size = 0x2000; | |
| 280 | break; | |
| 281 | case TIMEKEEPER_MK48T08: | |
| 282 | c->offset_control = 0x1ff8; | |
| 283 | c->offset_seconds = 0x1ff9; | |
| 284 | c->offset_minutes = 0x1ffa; | |
| 285 | c->offset_hours = 0x1ffb; | |
| 286 | c->offset_day = 0x1ffc; | |
| 287 | c->offset_date = 0x1ffd; | |
| 288 | c->offset_month = 0x1ffe; | |
| 289 | c->offset_year = 0x1fff; | |
| 290 | c->offset_century = 0x1ff1; | |
| 291 | c->offset_flags = 0x1ff0; | |
| 292 | c->size = 0x2000; | |
| 293 | break; | |
| 245 | if( ( c->control & CONTROL_W ) != 0 && | |
| 246 | ( data & CONTROL_W ) == 0 ) | |
| 247 | { | |
| 248 | counters_from_ram( c ); | |
| 249 | } | |
| 250 | c->control = data; | |
| 294 | 251 | } |
| 295 | ||
| 296 | if( data == NULL ) | |
| 252 | else if( offset == c->offset_day ) | |
| 297 | 253 | { |
| 298 | data = auto_malloc( c->size ); | |
| 299 | memset( data, 0xff, c->size ); | |
| 254 | if( c->device->type == M48T35 || | |
| 255 | c->device->type == M48T58 ) | |
| 256 | { | |
| 257 | c->day = ( c->day & ~DAY_CEB ) | ( data & DAY_CEB ); | |
| 258 | } | |
| 300 | 259 | } |
| 301 | c->data = data; | |
| 260 | else if( offset == c->offset_date && c->device->type == M48T58 ) | |
| 261 | { | |
| 262 | data &= ~DATE_BL; | |
| 263 | } | |
| 264 | else if( offset == c->offset_flags && c->device->type == MK48T08 ) | |
| 265 | { | |
| 266 | data &= ~FLAGS_BL; | |
| 267 | } | |
| 302 | 268 | |
| 303 | mame_get_base_datetime(machine, &systime); | |
| 269 | // logerror( "%08x: timekeeper_write( %s, %04x, %02x )\n", activecpu_get_pc(), c->device->tag, offset, data ); | |
| 270 | c->data[ offset ] = data; | |
| 271 | } | |
| 304 | 272 | |
| 273 | READ8_DEVICE_HANDLER( timekeeper_r ) | |
| 274 | { | |
| 275 | timekeeper_state *c = get_safe_token(device); | |
| 276 | UINT8 data = c->data[ offset ]; | |
| 277 | // logerror( "%08x: timekeeper_read( %s, %04x ) %02x\n", activecpu_get_pc(), c->device->tag, offset, data ); | |
| 278 | return data; | |
| 279 | } | |
| 280 | ||
| 281 | /*------------------------------------------------- | |
| 282 | device start callback | |
| 283 | -------------------------------------------------*/ | |
| 284 | ||
| 285 | static DEVICE_START(timekeeper) | |
| 286 | { | |
| 287 | timekeeper_state *c = get_safe_token(device); | |
| 288 | const timekeeper_config *config; | |
| 289 | char unique_tag[50]; | |
| 290 | emu_timer *timer; | |
| 291 | attotime duration; | |
| 292 | mame_system_time systime; | |
| 293 | ||
| 294 | /* validate some basic stuff */ | |
| 295 | assert(device != NULL); | |
| 296 | // assert(device->static_config != NULL); | |
| 297 | assert(device->inline_config == NULL); | |
| 298 | assert(device->machine != NULL); | |
| 299 | assert(device->machine->config != NULL); | |
| 300 | ||
| 301 | mame_get_base_datetime(device->machine, &systime); | |
| 302 | ||
| 303 | c->device = device; | |
| 305 | 304 | c->control = 0; |
| 306 | 305 | c->seconds = make_bcd( systime.local_time.second ); |
| 307 | 306 | c->minutes = make_bcd( systime.local_time.minute ); |
| r3171 | r3172 | |
| 311 | 310 | c->month = make_bcd( systime.local_time.month + 1 ); |
| 312 | 311 | c->year = make_bcd( systime.local_time.year % 100 ); |
| 313 | 312 | c->century = make_bcd( systime.local_time.year / 100 ); |
| 313 | c->data = auto_malloc( c->size ); | |
| 314 | 314 | |
| 315 | state_save_register_item( "timekeeper", chip, c->control ); | |
| 316 | state_save_register_item( "timekeeper", chip, c->seconds ); | |
| 317 | state_save_register_item( "timekeeper", chip, c->minutes ); | |
| 318 | state_save_register_item( "timekeeper", chip, c->hours ); | |
| 319 | state_save_register_item( "timekeeper", chip, c->day ); | |
| 320 | state_save_register_item( "timekeeper", chip, c->date ); | |
| 321 | state_save_register_item( "timekeeper", chip, c->month ); | |
| 322 | state_save_register_item( "timekeeper", chip, c->year ); | |
| 323 | state_save_register_item( "timekeeper", chip, c->century ); | |
| 324 | state_save_register_item_pointer( "timekeeper", chip, c->data, c->size ); | |
| 315 | config = device->static_config; | |
| 316 | if( config != NULL && config->data != NULL ) | |
| 317 | { | |
| 318 | c->default_data = memory_region( device->machine, config->data ); | |
| 319 | if( c->default_data != NULL ) | |
| 320 | { | |
| 321 | assert( memory_region_length( device->machine, config->data ) == c->size ); | |
| 322 | } | |
| 323 | } | |
| 325 | 324 | |
| 325 | assert( strlen( device->tag ) < 30 ); | |
| 326 | state_save_combine_module_and_tag( unique_tag, "timekeeper", device->tag ); | |
| 327 | ||
| 328 | state_save_register_item( unique_tag, 0, c->control ); | |
| 329 | state_save_register_item( unique_tag, 0, c->seconds ); | |
| 330 | state_save_register_item( unique_tag, 0, c->minutes ); | |
| 331 | state_save_register_item( unique_tag, 0, c->hours ); | |
| 332 | state_save_register_item( unique_tag, 0, c->day ); | |
| 333 | state_save_register_item( unique_tag, 0, c->date ); | |
| 334 | state_save_register_item( unique_tag, 0, c->month ); | |
| 335 | state_save_register_item( unique_tag, 0, c->year ); | |
| 336 | state_save_register_item( unique_tag, 0, c->century ); | |
| 337 | state_save_register_item_pointer( unique_tag, 0, c->data, c->size ); | |
| 338 | ||
| 326 | 339 | timer = timer_alloc( timekeeper_tick, c ); |
| 327 | 340 | duration = ATTOTIME_IN_SEC(1); |
| 328 | 341 | timer_adjust_periodic( timer, duration, 0, duration ); |
| 329 | 342 | } |
| 330 | 343 | |
| 331 | static | |
| 344 | static DEVICE | |
| 332 | 345 | { |
| 333 | struct timekeeper_chip *c; | |
| 334 | if( chip >= MAX_TIMEKEEPER_CHIPS ) | |
| 335 | { | |
| 336 | logerror( "timekeeper_nvram( %d ) invalid chip\n", chip ); | |
| 337 | return; | |
| 338 | } | |
| 339 | c = &timekeeper[ chip ]; | |
| 346 | timekeeper_state *c = get_safe_token(device); | |
| 340 | 347 | |
| 348 | c->offset_control = 0x7f8; | |
| 349 | c->offset_seconds = 0x7f9; | |
| 350 | c->offset_minutes = 0x7fa; | |
| 351 | c->offset_hours = 0x7fb; | |
| 352 | c->offset_day = 0x7fc; | |
| 353 | c->offset_date = 0x7fd; | |
| 354 | c->offset_month = 0x7fe; | |
| 355 | c->offset_year = 0x7ff; | |
| 356 | c->offset_century = -1; | |
| 357 | c->offset_flags = -1; | |
| 358 | c->size = 0x800; | |
| 359 | ||
| 360 | DEVICE_START_CALL( timekeeper ); | |
| 361 | } | |
| 362 | ||
| 363 | static DEVICE_START(m48t35) | |
| 364 | { | |
| 365 | timekeeper_state *c = get_safe_token(device); | |
| 366 | ||
| 367 | c->offset_control = 0x7ff8; | |
| 368 | c->offset_seconds = 0x7ff9; | |
| 369 | c->offset_minutes = 0x7ffa; | |
| 370 | c->offset_hours = 0x7ffb; | |
| 371 | c->offset_day = 0x7ffc; | |
| 372 | c->offset_date = 0x7ffd; | |
| 373 | c->offset_month = 0x7ffe; | |
| 374 | c->offset_year = 0x7fff; | |
| 375 | c->offset_century = -1; | |
| 376 | c->offset_flags = -1; | |
| 377 | c->size = 0x8000; | |
| 378 | ||
| 379 | DEVICE_START_CALL( timekeeper ); | |
| 380 | } | |
| 381 | ||
| 382 | static DEVICE_START(m48t58) | |
| 383 | { | |
| 384 | timekeeper_state *c = get_safe_token(device); | |
| 385 | ||
| 386 | c->offset_control = 0x1ff8; | |
| 387 | c->offset_seconds = 0x1ff9; | |
| 388 | c->offset_minutes = 0x1ffa; | |
| 389 | c->offset_hours = 0x1ffb; | |
| 390 | c->offset_day = 0x1ffc; | |
| 391 | c->offset_date = 0x1ffd; | |
| 392 | c->offset_month = 0x1ffe; | |
| 393 | c->offset_year = 0x1fff; | |
| 394 | c->offset_century = -1; | |
| 395 | c->offset_flags = -1; | |
| 396 | c->size = 0x2000; | |
| 397 | ||
| 398 | DEVICE_START_CALL( timekeeper ); | |
| 399 | } | |
| 400 | ||
| 401 | static DEVICE_START(mk48t08) | |
| 402 | { | |
| 403 | timekeeper_state *c = get_safe_token(device); | |
| 404 | ||
| 405 | c->offset_control = 0x1ff8; | |
| 406 | c->offset_seconds = 0x1ff9; | |
| 407 | c->offset_minutes = 0x1ffa; | |
| 408 | c->offset_hours = 0x1ffb; | |
| 409 | c->offset_day = 0x1ffc; | |
| 410 | c->offset_date = 0x1ffd; | |
| 411 | c->offset_month = 0x1ffe; | |
| 412 | c->offset_year = 0x1fff; | |
| 413 | c->offset_century = 0x1ff1; | |
| 414 | c->offset_flags = 0x1ff0; | |
| 415 | c->size = 0x2000; | |
| 416 | ||
| 417 | DEVICE_START_CALL( timekeeper ); | |
| 418 | } | |
| 419 | ||
| 420 | /*------------------------------------------------- | |
| 421 | device reset callback | |
| 422 | -------------------------------------------------*/ | |
| 423 | ||
| 424 | static DEVICE_RESET(timekeeper) | |
| 425 | { | |
| 426 | } | |
| 427 | ||
| 428 | static DEVICE_NVRAM(timekeeper) | |
| 429 | { | |
| 430 | timekeeper_state *c = get_safe_token(device); | |
| 431 | ||
| 341 | 432 | if( read_or_write ) |
| 342 | 433 | { |
| 343 | 434 | mame_fwrite( file, c->data, c->size ); |
| r3171 | r3172 | |
| 348 | 439 | { |
| 349 | 440 | mame_fread( file, c->data, c->size ); |
| 350 | 441 | } |
| 442 | else | |
| 443 | { | |
| 444 | if( c->default_data != NULL ) | |
| 445 | { | |
| 446 | memcpy( c->data, c->default_data, c->size ); | |
| 447 | } | |
| 448 | else | |
| 449 | { | |
| 450 | memset( c->data, 0xff, c->size ); | |
| 451 | } | |
| 452 | } | |
| 453 | ||
| 351 | 454 | counters_to_ram( c ); |
| 352 | 455 | } |
| 353 | 456 | } |
| 354 | 457 | |
| 355 | NVRAM_HANDLER( timekeeper_0 ) { timekeeper_nvram( 0, file, read_or_write ); } | |
| 458 | /*------------------------------------------------- | |
| 459 | device set info callback | |
| 460 | -------------------------------------------------*/ | |
| 356 | 461 | |
| 357 | static | |
| 462 | static DEVICE_SET_INFO(timekeeper | |
| 358 | 463 | { |
| 359 | UINT8 data; | |
| 360 | struct timekeeper_chip *c; | |
| 361 | if( chip >= MAX_TIMEKEEPER_CHIPS ) | |
| 464 | switch (state) | |
| 362 | 465 | { |
| 363 | logerror( "%08x: timekeeper_read( %d, %04x ) chip out of range\n", activecpu_get_pc(), chip, offset ); | |
| 364 | return 0; | |
| 466 | /* no parameters to set */ | |
| 365 | 467 | } |
| 366 | c = &timekeeper[ chip ]; | |
| 367 | ||
| 368 | data = c->data[ offset ]; | |
| 369 | // logerror( "%08x: timekeeper_read( %d, %04x ) %02x\n", activecpu_get_pc(), chip, offset, data ); | |
| 370 | return data; | |
| 371 | 468 | } |
| 372 | 469 | |
| 373 | static void timekeeper_write( UINT32 chip, offs_t offset, UINT8 data ) | |
| 470 | /*------------------------------------------------- | |
| 471 | device get info callback | |
| 472 | -------------------------------------------------*/ | |
| 473 | ||
| 474 | static DEVICE_GET_INFO(timekeeper) | |
| 374 | 475 | { |
| 375 | struct timekeeper_chip *c; | |
| 376 | if( chip >= MAX_TIMEKEEPER_CHIPS ) | |
| 476 | switch (state) | |
| 377 | 477 | { |
| 378 | logerror( "%08x: timekeeper_write( %d, %04x, %02x ) chip out of range\n", activecpu_get_pc(), chip, offset, data ); | |
| 379 | return; | |
| 478 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 479 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(timekeeper_state); break; | |
| 480 | case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = 0; break; // sizeof(timekeeper_config) | |
| 481 | case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; | |
| 482 | ||
| 483 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 484 | case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(timekeeper); break; | |
| 485 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(timekeeper); break; | |
| 486 | case DEVINFO_FCT_STOP: /* nothing */ break; | |
| 487 | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(timekeeper); break; | |
| 488 | case DEVINFO_FCT_NVRAM: info->nvram = DEVICE_NVRAM_NAME(timekeeper); break; | |
| 489 | ||
| 490 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 491 | case DEVINFO_STR_NAME: info->s = "Timekeeper"; break; | |
| 492 | case DEVINFO_STR_FAMILY: info->s = "EEPROM"; break; | |
| 493 | case DEVINFO_STR_VERSION: info->s = "1.0"; break; | |
| 494 | case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; | |
| 495 | case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 380 | 496 | } |
| 381 | ||
| 497 | } | |
| 382 | 498 | |
| 383 | if( offset == c->offset_control ) | |
| 499 | DEVICE_GET_INFO( m48t02 ) | |
| 500 | { | |
| 501 | switch (state) | |
| 384 | 502 | { |
| 385 | if( ( c->control & CONTROL_W ) != 0 && | |
| 386 | ( data & CONTROL_W ) == 0 ) | |
| 387 | { | |
| 388 | counters_from_ram( chip ); | |
| 389 | } | |
| 390 | c->control = data; | |
| 503 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 504 | case DEVINFO_STR_NAME: info->s = "M48T02"; break; | |
| 505 | ||
| 506 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 507 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(m48t02); break; | |
| 508 | ||
| 509 | default: DEVICE_GET_INFO_CALL(timekeeper); break; | |
| 391 | 510 | } |
| 392 | else if( offset == c->offset_day ) | |
| 511 | } | |
| 512 | ||
| 513 | DEVICE_GET_INFO( m48t35 ) | |
| 514 | { | |
| 515 | switch (state) | |
| 393 | 516 | { |
| 394 | switch( c->type ) | |
| 395 | { | |
| 396 | case TIMEKEEPER_M48T35: | |
| 397 | case TIMEKEEPER_M48T58: | |
| 398 | c->day = ( c->day & ~DAY_CEB ) | ( data & DAY_CEB ); | |
| 399 | break; | |
| 400 | } | |
| 517 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 518 | case DEVINFO_STR_NAME: info->s = "M48T35"; break; | |
| 519 | ||
| 520 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 521 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(m48t35); break; | |
| 522 | ||
| 523 | default: DEVICE_GET_INFO_CALL(timekeeper); break; | |
| 401 | 524 | } |
| 402 | else if( c->type == TIMEKEEPER_M48T58 && offset == c->offset_date ) | |
| 525 | } | |
| 526 | ||
| 527 | DEVICE_GET_INFO( m48t58 ) | |
| 528 | { | |
| 529 | switch (state) | |
| 403 | 530 | { |
| 404 | data &= ~DATE_BL; | |
| 531 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 532 | case DEVINFO_STR_NAME: info->s = "M48T58"; break; | |
| 533 | ||
| 534 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 535 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(m48t58); break; | |
| 536 | ||
| 537 | default: DEVICE_GET_INFO_CALL(timekeeper); break; | |
| 405 | 538 | } |
| 406 | else if( c->type == TIMEKEEPER_MK48T08 && offset == c->offset_flags ) | |
| 407 | { | |
| 408 | data &= ~FLAGS_BL; | |
| 409 | } | |
| 410 | ||
| 411 | // logerror( "%08x: timekeeper_write( %d, %04x, %02x )\n", activecpu_get_pc(), chip, offset, data ); | |
| 412 | c->data[ offset ] = data; | |
| 413 | 539 | } |
| 414 | 540 | |
| 415 | /* memory handlers */ | |
| 416 | ||
| 417 | READ8_HANDLER( timekeeper_0_r ) | |
| 541 | DEVICE_GET_INFO( mk48t08 ) | |
| 418 | 542 | { |
| 419 | return timekeeper_read(0, offset); | |
| 420 | } | |
| 543 | switch (state) | |
| 544 | { | |
| 545 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 546 | case DEVINFO_STR_NAME: info->s = "MK48T08"; break; | |
| 421 | 547 | |
| 422 | WRITE8_HANDLER( timekeeper_0_w ) | |
| 423 | { | |
| 424 | timekeeper_write(0, offset, data); | |
| 548 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 549 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(mk48t08); break; | |
| 550 | ||
| 551 | default: DEVICE_GET_INFO_CALL(timekeeper); break; | |
| 552 | } | |
| 425 | 553 | } |
| r3171 | r3172 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | 2 | * STmicroelectronics TIMEKEEPER SRAM |
| 3 | 3 | * |
| 4 | * Supports: MK48T08, M48T02 & M48T58 | |
| 4 | * Supports: | |
| 5 | * M48T02 | |
| 6 | * M48T35 | |
| 7 | * M48T58 | |
| 8 | * MK48T08 | |
| 5 | 9 | * |
| 6 | 10 | */ |
| 7 | 11 | |
| 8 | 12 | #if !defined( TIMEKPR_H ) |
| 9 | 13 | #define TIMEKPR_H ( 1 ) |
| 10 | 14 | |
| 11 | extern void timekeeper_init( running_machine *machine, int chip, int type, UINT8 *data ); | |
| 15 | typedef struct _timekeeper_config timekeeper_config; | |
| 16 | struct _timekeeper_config | |
| 17 | { | |
| 18 | const char *data; | |
| 19 | }; | |
| 12 | 20 | |
| 13 | #define MAX_TIMEKEEPER_CHIPS ( 1 ) | |
| 21 | #define M48T02 DEVICE_GET_INFO_NAME(m48t02) | |
| 22 | DEVICE_GET_INFO(m48t02); | |
| 14 | 23 | |
| 15 | #define TIMEKEEPER_M48T02 ( 1 ) | |
| 16 | #define TIMEKEEPER_M48T35 ( 2 ) | |
| 17 | #define TIMEKEEPER_M48T58 ( 3 ) | |
| 18 | #define TIMEKEEPER_MK48T08 ( 4 ) | |
| 24 | #define M48T35 DEVICE_GET_INFO_NAME(m48t35) | |
| 25 | DEVICE_GET_INFO(m48t35); | |
| 19 | 26 | |
| 20 | /* nvram handlers */ | |
| 27 | #define M48T58 DEVICE_GET_INFO_NAME(m48t58) | |
| 28 | DEVICE_GET_INFO(m48t58); | |
| 21 | 29 | |
| 22 | extern NVRAM_HANDLER( timekeeper_0 ); | |
| 30 | #define MK48T08 DEVICE_GET_INFO_NAME(mk48t08) | |
| 31 | DEVICE_GET_INFO(mk48t08); | |
| 23 | 32 | |
| 24 | 33 | /* memory handlers */ |
| 25 | 34 | |
| 26 | extern READ8_HANDLER( timekeeper_0_r ); | |
| 27 | extern WRITE8_HANDLER( timekeeper_0_w ); | |
| 35 | WRITE8_DEVICE_HANDLER( timekeeper_w ); | |
| 36 | READ8_DEVICE_HANDLER( timekeeper_r ); | |
| 28 | 37 | |
| 29 | 38 | #endif |
| r3171 | r3172 | |
|---|---|---|
| 2 | 2 | #define RC_MACROS_H |
| 3 | 3 | |
| 4 | 4 | /* Little helpers for magnitude conversions */ |
| 5 | #define RES_K(res) ((double)(res)*1e3) | |
| 6 | #define RES_M(res) ((double)(res)*1e6) | |
| 7 | #define CAP_U(cap) ((double)(cap)*1e-6) | |
| 8 | #define CAP_N(cap) ((double)(cap)*1e-9) | |
| 9 | #define CAP_P(cap) ((double)(cap)*1e-12) | |
| 5 | #define RES_K(res) ((double)(res) * 1e3) | |
| 6 | #define RES_M(res) ((double)(res) * 1e6) | |
| 7 | #define CAP_U(cap) ((double)(cap) * 1e-6) | |
| 8 | #define CAP_N(cap) ((double)(cap) * 1e-9) | |
| 9 | #define CAP_P(cap) ((double)(cap) * 1e-12) | |
| 10 | 10 | |
| 11 | /* vin --/\r1/\-- out --/\r2/\-- gnd */ | |
| 12 | #define RES_VOLTAGE_DIVIDER(r1, r2) ((double)(r2) / ((double)(r1) + (double)(r2))) | |
| 13 | ||
| 14 | #define RES_2_PARALLEL(r1, r2) (((r1) * (r2)) / ((r1) + (r2))) | |
| 15 | #define RES_3_PARALLEL(r1, r2, r3) (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3))) | |
| 16 | ||
| 11 | 17 | #endif |
| r0 | r3172 | |
|---|---|---|
| 1 | /************************************************************************* | |
| 2 | ||
| 3 | ldpr8210.c | |
| 4 | ||
| 5 | Pioneer PR-8210 laserdisc emulation. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | *************************************************************************/ | |
| 11 | ||
| 12 | #include "ldcore.h" | |
| 13 | ||
| 14 | ||
| 15 | ||
| 16 | /*************************************************************************** | |
| 17 | DEBUGGING | |
| 18 | ***************************************************************************/ | |
| 19 | ||
| 20 | #define PRINTF_COMMANDS 1 | |
| 21 | #define CMDPRINTF(x) do { if (PRINTF_COMMANDS) mame_printf_debug x; } while (0) | |
| 22 | ||
| 23 | ||
| 24 | ||
| 25 | /*************************************************************************** | |
| 26 | CONSTANTS | |
| 27 | ***************************************************************************/ | |
| 28 | ||
| 29 | /* Player-specific states */ | |
| 30 | enum | |
| 31 | { | |
| 32 | LDSTATE_STEPPING_BY_PARAMETER = LDSTATE_OTHER | |
| 33 | }; | |
| 34 | ||
| 35 | /* Pioneer PR-8210 specific information */ | |
| 36 | #define PR8210_SCAN_SPEED (2000 / 30) /* 2000 frames/second */ | |
| 37 | #define PR8210_SCAN_DURATION (10) /* scan for 10 vsyncs each time */ | |
| 38 | #define PR8210_SLOW_SPEED (5) /* 1/5x normal speed */ | |
| 39 | #define PR8210_FAST_SPEED (3) /* 3x normal speed */ | |
| 40 | #define PR8210_JUMP_REV_SPEED (15) /* 15x normal speed */ | |
| 41 | #define PR8210_SEEK_FAST_SPEED (1000) /* 1000x normal speed */ | |
| 42 | ||
| 43 | /* Us vs. Them requires at least this much "non-video" time in order to work */ | |
| 44 | #define PR8210_MINIMUM_SEEK_TIME ATTOTIME_IN_MSEC(150) | |
| 45 | ||
| 46 | ||
| 47 | ||
| 48 | /*************************************************************************** | |
| 49 | TYPE DEFINITIONS | |
| 50 | ***************************************************************************/ | |
| 51 | ||
| 52 | /* player-specific data */ | |
| 53 | struct _ldplayer_data | |
| 54 | { | |
| 55 | /* general modes and states */ | |
| 56 | UINT8 audio1disable; /* explicit disable for audio 1 */ | |
| 57 | UINT8 audio2disable; /* explicit disable for audio 2 */ | |
| 58 | UINT8 framedisplay; /* frame display */ | |
| 59 | INT32 parameter; /* parameter for numbers */ | |
| 60 | ||
| 61 | /* serial/command interface processing */ | |
| 62 | UINT8 lastcommand; /* last command byte received */ | |
| 63 | UINT8 seekstate; /* state of the seek command */ | |
| 64 | UINT16 accumulator; /* bit accumulator */ | |
| 65 | attotime lastbittime; /* time of last bit received */ | |
| 66 | attotime firstbittime; /* time of first bit in command */ | |
| 67 | ||
| 68 | /* Simutrek-specific data */ | |
| 69 | UINT8 cmdcnt; /* counter for multi-byte command */ | |
| 70 | UINT8 cmdbytes[3]; /* storage for multi-byte command */ | |
| 71 | void (*cmd_ack_callback)(void); /* callback to clear game command write flag */ | |
| 72 | }; | |
| 73 | ||
| 74 | ||
| 75 | ||
| 76 | /*************************************************************************** | |
| 77 | FUNCTION PROTOTYPES | |
| 78 | ***************************************************************************/ | |
| 79 | ||
| 80 | static void pr8210_init(laserdisc_state *ld); | |
| 81 | static void pr8210_soft_reset(laserdisc_state *ld); | |
| 82 | static void pr8210_update_squelch(laserdisc_state *ld); | |
| 83 | static int pr8210_switch_state(laserdisc_state *ld, UINT8 newstate, INT32 stateparam); | |
| 84 | static INT32 pr8210_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime); | |
| 85 | static void pr8210_command(laserdisc_state *ld); | |
| 86 | static void pr8210_control_w(laserdisc_state *ld, UINT8 prev, UINT8 data); | |
| 87 | ||
| 88 | static void simutrek_init(laserdisc_state *ld); | |
| 89 | static UINT8 simutrek_status_r(laserdisc_state *ld); | |
| 90 | static void simutrek_data_w(laserdisc_state *ld, UINT8 prev, UINT8 data); | |
| 91 | ||
| 92 | ||
| 93 | ||
| 94 | /*************************************************************************** | |
| 95 | INTERFACES | |
| 96 | ***************************************************************************/ | |
| 97 | ||
| 98 | const ldplayer_interface pr8210_interface = | |
| 99 | { | |
| 100 | LASERDISC_TYPE_PIONEER_PR8210, /* type of the player */ | |
| 101 | sizeof(ldplayer_data), /* size of the state */ | |
| 102 | "Pioneer PR-8210", /* name of the player */ | |
| 103 | pr8210_init, /* initialization callback */ | |
| 104 | pr8210_update, /* update callback */ | |
| 105 | NULL, /* parallel data write */ | |
| 106 | { /* single line write: */ | |
| 107 | NULL, /* LASERDISC_LINE_ENTER */ | |
| 108 | pr8210_control_w /* LASERDISC_LINE_CONTROL */ | |
| 109 | }, | |
| 110 | NULL, /* parallel data read */ | |
| 111 | { /* single line read: */ | |
| 112 | NULL, /* LASERDISC_LINE_READY */ | |
| 113 | NULL, /* LASERDISC_LINE_STATUS */ | |
| 114 | NULL, /* LASERDISC_LINE_COMMAND */ | |
| 115 | NULL, /* LASERDISC_LINE_DATA_AVAIL */ | |
| 116 | } | |
| 117 | }; | |
| 118 | ||
| 119 | ||
| 120 | const ldplayer_interface simutrek_interface = | |
| 121 | { | |
| 122 | LASERDISC_TYPE_SIMUTREK_SPECIAL, /* type of the player */ | |
| 123 | sizeof(ldplayer_data), /* size of the state */ | |
| 124 | "Simutrek Modified PR-8210", /* name of the player */ | |
| 125 | simutrek_init, /* initialization callback */ | |
| 126 | pr8210_update, /* update callback */ | |
| 127 | simutrek_data_w, /* parallel data write */ | |
| 128 | { /* single line write: */ | |
| 129 | NULL, /* LASERDISC_LINE_ENTER */ | |
| 130 | NULL /* LASERDISC_LINE_CONTROL */ | |
| 131 | }, | |
| 132 | NULL, /* parallel data read */ | |
| 133 | { /* single line read: */ | |
| 134 | NULL, /* LASERDISC_LINE_READY */ | |
| 135 | simutrek_status_r, /* LASERDISC_LINE_STATUS */ | |
| 136 | NULL, /* LASERDISC_LINE_COMMAND */ | |
| 137 | NULL, /* LASERDISC_LINE_DATA_AVAIL */ | |
| 138 | } | |
| 139 | }; | |
| 140 | ||
| 141 | ||
| 142 | ||
| 143 | /*************************************************************************** | |
| 144 | PIONEER PR-8210 IMPLEMENTATION | |
| 145 | ***************************************************************************/ | |
| 146 | ||
| 147 | /*------------------------------------------------- | |
| 148 | requires_state_save - returns TRUE if the | |
| 149 | given state will return to the previous | |
| 150 | state when done | |
| 151 | -------------------------------------------------*/ | |
| 152 | ||
| 153 | INLINE int requires_state_save(UINT8 state) | |
| 154 | { | |
| 155 | return (state == LDSTATE_SCANNING); | |
| 156 | } | |
| 157 | ||
| 158 | ||
| 159 | ||
| 160 | /*************************************************************************** | |
| 161 | PIONEER PR-8210 IMPLEMENTATION | |
| 162 | ***************************************************************************/ | |
| 163 | ||
| 164 | /*------------------------------------------------- | |
| 165 | pr8210_init - Pioneer PR-8210-specific | |
| 166 | initialization | |
| 167 | -------------------------------------------------*/ | |
| 168 | ||
| 169 | static void pr8210_init(laserdisc_state *ld) | |
| 170 | { | |
| 171 | /* do a soft reset */ | |
| 172 | pr8210_soft_reset(ld); | |
| 173 | } | |
| 174 | ||
| 175 | ||
| 176 | /*------------------------------------------------- | |
| 177 | pr8210_soft_reset - Pioneer PR-8210-specific | |
| 178 | soft reset | |
| 179 | -------------------------------------------------*/ | |
| 180 | ||
| 181 | static void pr8210_soft_reset(laserdisc_state *ld) | |
| 182 | { | |
| 183 | ldplayer_data *player = ld->player; | |
| 184 | attotime curtime = timer_get_time(); | |
| 185 | ||
| 186 | ld->state.state = LDSTATE_NONE; | |
| 187 | ld->state.substate = 0; | |
| 188 | ld->state.param = 0; | |
| 189 | ld->state.endtime = curtime; | |
| 190 | ||
| 191 | player->audio1disable = 0; | |
| 192 | player->audio2disable = 0; | |
| 193 | player->parameter = 0; | |
| 194 | ||
| 195 | player->lastcommand = 0; | |
| 196 | player->seekstate = 0; | |
| 197 | player->accumulator = 0; | |
| 198 | player->firstbittime = curtime; | |
| 199 | player->lastbittime = curtime; | |
| 200 | ||
| 201 | pr8210_switch_state(ld, LDSTATE_PARKED, 0); | |
| 202 | } | |
| 203 | ||
| 204 | ||
| 205 | /*------------------------------------------------- | |
| 206 | pr8210_update_squelch - update the squelch | |
| 207 | settings based on the current state | |
| 208 | -------------------------------------------------*/ | |
| 209 | ||
| 210 | static void pr8210_update_squelch(laserdisc_state *ld) | |
| 211 | { | |
| 212 | ldplayer_data *player = ld->player; | |
| 213 | ||
| 214 | switch (ld->state.state) | |
| 215 | { | |
| 216 | /* video on, audio on */ | |
| 217 | case LDSTATE_PLAYING: | |
| 218 | ldcore_set_audio_squelch(ld, player->audio1disable, player->audio2disable); | |
| 219 | ldcore_set_video_squelch(ld, FALSE); | |
| 220 | break; | |
| 221 | ||
| 222 | /* video on, audio off */ | |
| 223 | case LDSTATE_PAUSING: | |
| 224 | case LDSTATE_PAUSED: | |
| 225 | case LDSTATE_PLAYING_SLOW_REVERSE: | |
| 226 | case LDSTATE_PLAYING_SLOW_FORWARD: | |
| 227 | case LDSTATE_PLAYING_FAST_REVERSE: | |
| 228 | case LDSTATE_PLAYING_FAST_FORWARD: | |
| 229 | case LDSTATE_STEPPING_REVERSE: | |
| 230 | case LDSTATE_STEPPING_FORWARD: | |
| 231 | case LDSTATE_SCANNING: | |
| 232 | ldcore_set_audio_squelch(ld, TRUE, TRUE); | |
| 233 | ldcore_set_video_squelch(ld, FALSE); | |
| 234 | break; | |
| 235 | ||
| 236 | /* video off, audio off */ | |
| 237 | case LDSTATE_NONE: | |
| 238 | case LDSTATE_EJECTED: | |
| 239 | case LDSTATE_EJECTING: | |
| 240 | case LDSTATE_PARKED: | |
| 241 | case LDSTATE_LOADING: | |
| 242 | case LDSTATE_SPINUP: | |
| 243 | case LDSTATE_SEEKING: | |
| 244 | ldcore_set_audio_squelch(ld, TRUE, TRUE); | |
| 245 | ldcore_set_video_squelch(ld, TRUE); | |
| 246 | break; | |
| 247 | ||
| 248 | /* Simutrek: stepping by parameter with explicit audio squelch controls */ | |
| 249 | case LDSTATE_STEPPING_BY_PARAMETER: | |
| 250 | ldcore_set_video_squelch(ld, FALSE); | |
| 251 | break; | |
| 252 | } | |
| 253 | } | |
| 254 | ||
| 255 | ||
| 256 | /*------------------------------------------------- | |
| 257 | pr8210_switch_state - attempt to switch states | |
| 258 | if appropriate, and ensure the squelch values | |
| 259 | are correct | |
| 260 | -------------------------------------------------*/ | |
| 261 | ||
| 262 | static int pr8210_switch_state(laserdisc_state *ld, UINT8 newstate, INT32 parameter) | |
| 263 | { | |
| 264 | attotime curtime = timer_get_time(); | |
| 265 | ||
| 266 | /* if this is the same state, ignore */ | |
| 267 | if (ld->state.state == newstate) | |
| 268 | return TRUE; | |
| 269 | ||
| 270 | /* if we're in a timed state, we ignore changes until the time elapses */ | |
| 271 | if (attotime_compare(curtime, ld->state.endtime) < 0) | |
| 272 | return FALSE; | |
| 273 | ||
| 274 | /* if moving to a state that requires it, save the old state */ | |
| 275 | if (requires_state_save(newstate) && !requires_state_save(ld->state.state)) | |
| 276 | ld->savestate = ld->state; | |
| 277 | ||
| 278 | /* set up appropriate squelch and timing */ | |
| 279 | ld->state.state = newstate; | |
| 280 | ld->state.substate = 0; | |
| 281 | ld->state.param = parameter; | |
| 282 | ld->state.endtime = curtime; | |
| 283 | pr8210_update_squelch(ld); | |
| 284 | ||
| 285 | /* if we're switching to a timed state, set the appropriate timer */ | |
| 286 | switch (ld->state.state) | |
| 287 | { | |
| 288 | case LDSTATE_EJECTING: | |
| 289 | ld->state.endtime = attotime_add(curtime, GENERIC_EJECT_TIME); | |
| 290 | break; | |
| 291 | ||
| 292 | case LDSTATE_LOADING: | |
| 293 | ld->state.endtime = attotime_add(curtime, GENERIC_LOAD_TIME); | |
| 294 | break; | |
| 295 | ||
| 296 | case LDSTATE_SPINUP: | |
| 297 | ld->state.endtime = attotime_add(curtime, GENERIC_SPINUP_TIME); | |
| 298 | break; | |
| 299 | ||
| 300 | case LDSTATE_SEEKING: | |
| 301 | ld->state.endtime = attotime_add(curtime, PR8210_MINIMUM_SEEK_TIME); | |
| 302 | break; | |
| 303 | } | |
| 304 | return TRUE; | |
| 305 | } | |
| 306 | ||
| 307 | ||
| 308 | /*------------------------------------------------- | |
| 309 | pr8210_update - Pioneer PR-8210-specific | |
| 310 | update callback | |
| 311 | -------------------------------------------------*/ | |
| 312 | ||
| 313 | static INT32 pr8210_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime) | |
| 314 | { | |
| 315 | ldplayer_state newstate; | |
| 316 | INT32 advanceby = 0; | |
| 317 | int frame; | |
| 318 | ||
| 319 | /* handle things based on the state */ | |
| 320 | switch (ld->state.state) | |
| 321 | { | |
| 322 | case LDSTATE_EJECTING: | |
| 323 | case LDSTATE_EJECTED: | |
| 324 | case LDSTATE_PARKED: | |
| 325 | case LDSTATE_LOADING: | |
| 326 | case LDSTATE_SPINUP: | |
| 327 | case LDSTATE_PAUSING: | |
| 328 | case LDSTATE_PAUSED: | |
| 329 | case LDSTATE_PLAYING: | |
| 330 | case LDSTATE_PLAYING_SLOW_REVERSE: | |
| 331 | case LDSTATE_PLAYING_SLOW_FORWARD: | |
| 332 | case LDSTATE_PLAYING_FAST_REVERSE: | |
| 333 | case LDSTATE_PLAYING_FAST_FORWARD: | |
| 334 | case LDSTATE_STEPPING_REVERSE: | |
| 335 | case LDSTATE_STEPPING_FORWARD: | |
| 336 | case LDSTATE_SCANNING: | |
| 337 | /* generic behaviors are appropriate for all of these commands */ | |
| 338 | advanceby = ldcore_generic_update(ld, vbi, fieldnum, curtime, &newstate); | |
| 339 | pr8210_switch_state(ld, newstate.state, newstate.param); | |
| 340 | break; | |
| 341 | ||
| 342 | case LDSTATE_SEEKING: | |
| 343 | /* if we're in the final state, look for a matching frame and pause there */ | |
| 344 | frame = frame_from_metadata(vbi); | |
| 345 | if (ld->state.substate == 3 && is_start_of_frame(vbi) && frame == ld->state.param) | |
| 346 | pr8210_switch_state(ld, LDSTATE_PAUSED, fieldnum); | |
| 347 | ||
| 348 | /* otherwise, if we got frame data from the VBI, update our seeking logic */ | |
| 349 | else if (ld->state.substate < 3 && frame != FRAME_NOT_PRESENT) | |
| 350 | { | |
| 351 | static const INT32 seekspeed[] = { -PR8210_SEEK_FAST_SPEED, PR8210_SEEK_FAST_SPEED, -PR8210_JUMP_REV_SPEED }; | |
| 352 | INT32 curseekspeed = seekspeed[ld->state.substate]; | |
| 353 | INT32 delta = (ld->state.param - 1) - frame; | |
| 354 | ||
| 355 | if ((curseekspeed < 0 && delta <= 0) || (curseekspeed > 0 && delta >= 0)) | |
| 356 | advanceby = curseekspeed; | |
| 357 | else | |
| 358 | ld->state.substate++; | |
| 359 | } | |
| 360 | ||
| 361 | /* otherwise, keep advancing until we know what's up */ | |
| 362 | else if (fieldnum == 1) | |
| 363 | advanceby = 1; | |
| 364 | break; | |
| 365 | ||
| 366 | case LDSTATE_STEPPING_BY_PARAMETER: | |
| 367 | /* advance after the second field of each frame */ | |
| 368 | if (fieldnum == 1) | |
| 369 | { | |
| 370 | /* note that we switch directly to PAUSED as we are not looking for frames */ | |
| 371 | advanceby = ld->state.param; | |
| 372 | pr8210_switch_state(ld, LDSTATE_PAUSED, 0); | |
| 373 | } | |
| 374 | break; | |
| 375 | } | |
| 376 | ||
| 377 | return advanceby; | |
| 378 | } | |
| 379 | ||
| 380 | ||
| 381 | /*------------------------------------------------- | |
| 382 | pr8210_command - Pioneer PR-8210-specific | |
| 383 | command processing | |
| 384 | -------------------------------------------------*/ | |
| 385 | ||
| 386 | static void pr8210_command(laserdisc_state *ld) | |
| 387 | { | |
| 388 | ldplayer_data *player = ld->player; | |
| 389 | UINT8 cmd = player->lastcommand; | |
| 390 | ||
| 391 | switch (cmd) | |
| 392 | { | |
| 393 | case 0x00: CMDPRINTF(("pr8210: EOC\n")); | |
| 394 | /* EOC marker - can be safely ignored */ | |
| 395 | break; | |
| 396 | ||
| 397 | case 0x01: CMDPRINTF(("pr8210: 0\n")); | |
| 398 | player->parameter = (player->parameter == -1) ? 0 : (player->parameter * 10 + 0); | |
| 399 | break; | |
| 400 | ||
| 401 | case 0x02: CMDPRINTF(("pr8210: Slow reverse\n")); | |
| 402 | pr8210_switch_state(ld, LDSTATE_PLAYING_SLOW_REVERSE, PR8210_SLOW_SPEED); | |
| 403 | break; | |
| 404 | ||
| 405 | case 0x03: CMDPRINTF(("pr8210: 8\n")); | |
| 406 | player->parameter = (player->parameter == -1) ? 8 : (player->parameter * 10 + 8); | |
| 407 | break; | |
| 408 | ||
| 409 | case 0x04: CMDPRINTF(("pr8210: Step forward\n")); | |
| 410 | pr8210_switch_state(ld, LDSTATE_STEPPING_FORWARD, 0); | |
| 411 | break; | |
| 412 | ||
| 413 | case 0x05: CMDPRINTF(("pr8210: 4\n")); | |
| 414 | player->parameter = (player->parameter == -1) ? 4 : (player->parameter * 10 + 4); | |
| 415 | break; | |
| 416 | ||
| 417 | case 0x06 : CMDPRINTF(("pr8210: Chapter\n")); | |
| 418 | /* chapter -- not implemented */ | |
| 419 | break; | |
| 420 | ||
| 421 | case 0x08: CMDPRINTF(("pr8210: Scan forward\n")); | |
| 422 | if (ld->state.state != LDSTATE_SCANNING) | |
| 423 | pr8210_switch_state(ld, LDSTATE_SCANNING, SCANNING_PARAM(PR8210_SCAN_SPEED, PR8210_SCAN_DURATION)); | |
| 424 | else | |
| 425 | ld->state.substate = 0; | |
| 426 | break; | |
| 427 | ||
| 428 | case 0x09: CMDPRINTF(("pr8210: 2\n")); | |
| 429 | player->parameter = (player->parameter == -1) ? 2 : (player->parameter * 10 + 2); | |
| 430 | break; | |
| 431 | ||
| 432 | case 0x0a: CMDPRINTF(("pr8210: Pause\n")); | |
| 433 | pr8210_switch_state(ld, LDSTATE_PAUSING, 0); | |
| 434 | break; | |
| 435 | ||
| 436 | case 0x0b : CMDPRINTF(("pr8210: Frame\n")); | |
| 437 | /* frame -- not implemented */ | |
| 438 | break; | |
| 439 | ||
| 440 | case 0x0c: CMDPRINTF(("pr8210: Fast reverse\n")); | |
| 441 | pr8210_switch_state(ld, LDSTATE_PLAYING_FAST_REVERSE, PR8210_FAST_SPEED); | |
| 442 | break; | |
| 443 | ||
| 444 | case 0x0d: CMDPRINTF(("pr8210: 6\n")); | |
| 445 | player->parameter = (player->parameter == -1) ? 6 : (player->parameter * 10 + 6); | |
| 446 | break; | |
| 447 | ||
| 448 | case 0x0e: CMDPRINTF(("pr8210: Ch1 toggle\n")); | |
| 449 | player->audio1disable = !player->audio1disable; | |
| 450 | pr8210_update_squelch(ld); | |
| 451 | break; | |
| 452 | ||
| 453 | case 0x10: CMDPRINTF(("pr8210: Fast forward\n")); | |
| 454 | pr8210_switch_state(ld, LDSTATE_PLAYING_FAST_FORWARD, PR8210_FAST_SPEED); | |
| 455 | break; | |
| 456 | ||
| 457 | case 0x11: CMDPRINTF(("pr8210: 1\n")); | |
| 458 | player->parameter = (player->parameter == -1) ? 1 : (player->parameter * 10 + 1); | |
| 459 | break; | |
| 460 | ||
| 461 | case 0x12: CMDPRINTF(("pr8210: Step reverse\n")); | |
| 462 | pr8210_switch_state(ld, LDSTATE_STEPPING_REVERSE, 0); | |
| 463 | break; | |
| 464 | ||
| 465 | case 0x13: CMDPRINTF(("pr8210: 9\n")); | |
| 466 | player->parameter = (player->parameter == -1) ? 9 : (player->parameter * 10 + 9); | |
| 467 | break; | |
| 468 | ||
| 469 | case 0x14: CMDPRINTF(("pr8210: Play\n")); | |
| 470 | if (ld->state.state == LDSTATE_EJECTED) | |
| 471 | pr8210_switch_state(ld, LDSTATE_LOADING, 0); | |
| 472 | else if (ld->state.state == LDSTATE_PARKED) | |
| 473 | pr8210_switch_state(ld, LDSTATE_SPINUP, 0); | |
| 474 | else | |
| 475 | pr8210_switch_state(ld, LDSTATE_PLAYING, 0); | |
| 476 | break; | |
| 477 | ||
| 478 | case 0x15: CMDPRINTF(("pr8210: 5\n")); | |
| 479 | player->parameter = (player->parameter == -1) ? 5 : (player->parameter * 10 + 5); | |
| 480 | break; | |
| 481 | ||
| 482 | case 0x16: CMDPRINTF(("pr8210: Ch2 toggle\n")); | |
| 483 | player->audio2disable = !player->audio2disable; | |
| 484 | pr8210_update_squelch(ld); | |
| 485 | break; | |
| 486 | ||
| 487 | case 0x18: CMDPRINTF(("pr8210: Slow forward\n")); | |
| 488 | pr8210_switch_state(ld, LDSTATE_PLAYING_SLOW_FORWARD, PR8210_SLOW_SPEED); | |
| 489 | break; | |
| 490 | ||
| 491 | case 0x19: CMDPRINTF(("pr8210: 3\n")); | |
| 492 | player->parameter = (player->parameter == -1) ? 3 : (player->parameter * 10 + 3); | |
| 493 | break; | |
| 494 | ||
| 495 | case 0x1a: CMDPRINTF(("pr8210: Seek\n")); | |
| 496 | if (player->seekstate) | |
| 497 | { | |
| 498 | /* we're ready to seek */ | |
| 499 | CMDPRINTF(("pr8210: Seeking to frame %d\n", player->parameter)); | |
| 500 | pr8210_switch_state(ld, LDSTATE_SEEKING, player->parameter); | |
| 501 | } | |
| 502 | else | |
| 503 | { | |
| 504 | /* waiting for digits indicating position */ | |
| 505 | player->parameter = 0; | |
| 506 | } | |
| 507 | player->seekstate ^= 1; | |
| 508 | break; | |
| 509 | ||
| 510 | case 0x1c: CMDPRINTF(("pr8210: Scan reverse\n")); | |
| 511 | if (ld->state.state != LDSTATE_SCANNING) | |
| 512 | pr8210_switch_state(ld, LDSTATE_SCANNING, SCANNING_PARAM(-PR8210_SCAN_SPEED, PR8210_SCAN_DURATION)); | |
| 513 | else | |
| 514 | ld->state.substate = 0; | |
| 515 | break; | |
| 516 | ||
| 517 | case 0x1d: CMDPRINTF(("pr8210: 7\n")); | |
| 518 | player->parameter = (player->parameter == -1) ? 7 : (player->parameter * 10 + 7); | |
| 519 | break; | |
| 520 | ||
| 521 | case 0x1e: CMDPRINTF(("pr8210: Reject\n")); | |
| 522 | pr8210_switch_state(ld, LDSTATE_EJECTING, 0); | |
| 523 | break; | |
| 524 | ||
| 525 | default: CMDPRINTF(("pr8210: Unknown command %02X\n", cmd)); | |
| 526 | break; | |
| 527 | } | |
| 528 | } | |
| 529 | ||
| 530 | ||
| 531 | /*------------------------------------------------- | |
| 532 | pr8210_control_w - write callback when the | |
| 533 | CONTROL line is toggled | |
| 534 | -------------------------------------------------*/ | |
| 535 | ||
| 536 | static void pr8210_control_w(laserdisc_state *ld, UINT8 prev, UINT8 data) | |
| 537 | { | |
| 538 | ldplayer_data *player = ld->player; | |
| 539 | ||
| 540 | if (data == ASSERT_LINE) | |
| 541 | { | |
| 542 | attotime curtime = timer_get_time(); | |
| 543 | attotime delta; | |
| 544 | int longpulse; | |
| 545 | ||
| 546 | /* if we timed out, reset the accumulator */ | |
| 547 | delta = attotime_sub(curtime, player->firstbittime); | |
| 548 | if (delta.attoseconds > ATTOTIME_IN_USEC(25320).attoseconds) | |
| 549 | { | |
| 550 | player->firstbittime = curtime; | |
| 551 | player->accumulator = 0x5555; | |
| 552 | // printf("Reset accumulator\n"); | |
| 553 | } | |
| 554 | ||
| 555 | /* get the time difference from the last assert */ | |
| 556 | /* and update our internal command time */ | |
| 557 | delta = attotime_sub(curtime, player->lastbittime); | |
| 558 | player->lastbittime = curtime; | |
| 559 | ||
| 560 | /* 0 bit delta is 1.05 msec, 1 bit delta is 2.11 msec */ | |
| 561 | longpulse = (delta.attoseconds < ATTOTIME_IN_USEC(1500).attoseconds) ? 0 : 1; | |
| 562 | player->accumulator = (player->accumulator << 1) | longpulse; | |
| 563 | ||
| 564 | #if 0 | |
| 565 | { | |
| 566 | int usecdiff = (int)(delta.attoseconds / ATTOSECONDS_IN_USEC(1)); | |
| 567 | printf("bitdelta = %5d (%d) - accum = %04X\n", usecdiff, longpulse, player->accumulator); | |
| 568 | } | |
| 569 | #endif | |
| 570 | ||
| 571 | /* if we have a complete command, signal it */ | |
| 572 | /* a complete command is 0,0,1 followed by 5 bits, followed by 0,0 */ | |
| 573 | if ((player->accumulator & 0x383) == 0x80) | |
| 574 | { | |
| 575 | UINT8 newcommand = (player->accumulator >> 2) & 0x1f; | |
| 576 | ||
| 577 | //printf("New command = %02X (last=%02X)\n", newcommand, player->lastcommand); | |
| 578 | ||
| 579 | /* if we got a double command, act on it */ | |
| 580 | if (newcommand == player->lastcommand) | |
| 581 | { | |
| 582 | pr8210_command(ld); | |
| 583 | player->lastcommand = 0; | |
| 584 | } | |
| 585 | else | |
| 586 | player->lastcommand = newcommand; | |
| 587 | } | |
| 588 | } | |
| 589 | } | |
| 590 | ||
| 591 | ||
| 592 | ||
| 593 | /*************************************************************************** | |
| 594 | SIMUTREK MODIFIED PR-8210 PLAYER IMPLEMENTATION | |
| 595 | ***************************************************************************/ | |
| 596 | ||
| 597 | /*------------------------------------------------- | |
| 598 | ||
| 599 | Command Set: | |
| 600 | ||
| 601 | FX XX XX : Seek to frame XXXXX | |
| 602 | 01-19 : Skip forward 1-19 frames | |
| 603 | 99-81 : Skip back 1-19 frames | |
| 604 | 5a : Toggle frame display | |
| 605 | ||
| 606 | -------------------------------------------------*/ | |
| 607 | ||
| 608 | /*------------------------------------------------- | |
| 609 | simutrek_init - Simutrek-specific | |
| 610 | initialization | |
| 611 | -------------------------------------------------*/ | |
| 612 | ||
| 613 | static void simutrek_init(laserdisc_state *ld) | |
| 614 | { | |
| 615 | /* do a soft reset */ | |
| 616 | pr8210_soft_reset(ld); | |
| 617 | } | |
| 618 | ||
| 619 | ||
| 620 | /*------------------------------------------------- | |
| 621 | simutrek_status_r - Simutrek-specific | |
| 622 | command processing | |
| 623 | -------------------------------------------------*/ | |
| 624 | ||
| 625 | static UINT8 simutrek_status_r(laserdisc_state *ld) | |
| 626 | { | |
| 627 | return (ld->state.state != LDSTATE_SEEKING) ? ASSERT_LINE : CLEAR_LINE; | |
| 628 | } | |
| 629 | ||
| 630 | ||
| 631 | /*------------------------------------------------- | |
| 632 | simutrek_data_w - Simutrek-specific | |
| 633 | data processing | |
| 634 | -------------------------------------------------*/ | |
| 635 | ||
| 636 | static void simutrek_data_w(laserdisc_state *ld, UINT8 prev, UINT8 data) | |
| 637 | { | |
| 638 | ldplayer_data *player = ld->player; | |
| 639 | ||
| 640 | /* Acknowledge every command byte */ | |
| 641 | if (player->cmd_ack_callback != NULL) | |
| 642 | (*player->cmd_ack_callback)(); | |
| 643 | ||
| 644 | /* Is this byte part of a multi-byte seek command? */ | |
| 645 | if (player->cmdcnt > 0) | |
| 646 | { | |
| 647 | CMDPRINTF(("Simutrek: Seek to frame byte %d of 3\n", player->cmdcnt + 1)); | |
| 648 | player->cmdbytes[player->cmdcnt++] = data; | |
| 649 | ||
| 650 | if (player->cmdcnt == 3) | |
| 651 | { | |
| 652 | player->parameter = ((player->cmdbytes[0] & 0xf) * 10000) + | |
| 653 | ((player->cmdbytes[1] >> 4) * 1000) + | |
| 654 | ((player->cmdbytes[1] & 0xf) * 100) + | |
| 655 | ((player->cmdbytes[2] >> 4) * 10) + | |
| 656 | (player->cmdbytes[2] & 0xf); | |
| 657 | ||
| 658 | CMDPRINTF(("Simutrek: Seek to frame %d\n", player->parameter)); | |
| 659 | ||
| 660 | pr8210_switch_state(ld, LDSTATE_SEEKING, player->parameter); | |
| 661 | player->cmdcnt = 0; | |
| 662 | } | |
| 663 | } | |
| 664 | else if (data == 0) | |
| 665 | { | |
| 666 | CMDPRINTF(("Simutrek: 0 ?\n")); | |
| 667 | } | |
| 668 | else if ((data & 0xf0) == 0xf0) | |
| 669 | { | |
| 670 | CMDPRINTF(("Simutrek: Seek to frame byte 1 of 3\n")); | |
| 671 | player->cmdbytes[player->cmdcnt++] = data; | |
| 672 | } | |
| 673 | else if (data >= 1 && data <= 0x19) | |
| 674 | { | |
| 675 | int count = ((data >> 4) * 10) + (data & 0xf); | |
| 676 | CMDPRINTF(("Simutrek: Step forwards by %d frame(s)\n", count)); | |
| 677 | pr8210_switch_state(ld, LDSTATE_STEPPING_BY_PARAMETER, count); | |
| 678 | } | |
| 679 | else if (data >= 0x81 && data <= 0x99) | |
| 680 | { | |
| 681 | int count = (((data >> 4) * 10) + (data & 0xf)) - 100; | |
| 682 | CMDPRINTF(("Simutrek: Step backwards by %d frame(s)\n", count)); | |
| 683 | pr8210_switch_state(ld, LDSTATE_STEPPING_BY_PARAMETER, count); | |
| 684 | } | |
| 685 | else if (data == 0x5a) | |
| 686 | { | |
| 687 | CMDPRINTF(("Simutrek: Frame window toggle\n")); | |
| 688 | player->framedisplay ^= 1; | |
| 689 | } | |
| 690 | else | |
| 691 | { | |
| 692 | CMDPRINTF(("Simutrek: Unknown command (%.2x)\n", data)); | |
| 693 | } | |
| 694 | } | |
| 695 | ||
| 696 | ||
| 697 | /*------------------------------------------------- | |
| 698 | simutrek_set_audio_squelch - Simutrek-specific | |
| 699 | command to enable/disable audio squelch | |
| 700 | -------------------------------------------------*/ | |
| 701 | ||
| 702 | void simutrek_set_audio_squelch(const device_config *device, int state) | |
| 703 | { | |
| 704 | laserdisc_state *ld = ldcore_get_safe_token(device); | |
| 705 | int squelch = (state != ASSERT_LINE); | |
| 706 | ldcore_set_audio_squelch(ld, squelch, squelch); | |
| 707 | } | |
| 708 | ||
| 709 | ||
| 710 | /*------------------------------------------------- | |
| 711 | simutrek_set_audio_squelch - Simutrek-specific | |
| 712 | command to set callback function for | |
| 713 | player/interface command acknowledge | |
| 714 | -------------------------------------------------*/ | |
| 715 | ||
| 716 | void simutrek_set_cmd_ack_callback(const device_config *device, void (*callback)(void)) | |
| 717 | { | |
| 718 | laserdisc_state *ld = ldcore_get_safe_token(device); | |
| 719 | ldplayer_data *player = ld->player; | |
| 720 | ||
| 721 | player->cmd_ack_callback = callback; | |
| 722 | } |
| r3171 | r3172 | |
|---|---|---|
| 33 | 33 | **********************************************************************/ |
| 34 | 34 | |
| 35 | 35 | #include "driver.h" |
| 36 | #include "deprecat.h" | |
| 37 | 36 | #include "6840ptm.h" |
| 38 | 37 | |
| 39 | 38 | // Defines ///////////////////////////////////////////////////////////// |
| r3171 | r3172 | |
| 376 | 375 | // // |
| 377 | 376 | /////////////////////////////////////////////////////////////////////////// |
| 378 | 377 | |
| 379 | void ptm6840_config(int which, const ptm6840_interface *intf) | |
| 378 | void ptm6840_config(running_machine *machine, int which, const ptm6840_interface *intf) | |
| 380 | 379 | { |
| 381 | 380 | int i; |
| 382 | 381 | ptm6840 *currptr = ptm + which; |
| 383 | 382 | |
| 384 | assert_always(mame_get_phase( | |
| 383 | assert_always(mame_get_phase(machine) == MAME_PHASE_INIT, "Can only call ptm6840_config at init time!"); | |
| 385 | 384 | assert_always((which >= 0) && (which < PTM_6840_MAX), "ptm6840_config called on an invalid PTM!"); |
| 386 | 385 | assert_always(intf, "ptm6840_config called with an invalid interface!"); |
| 387 | 386 | ptm[which].intf = intf; |
| r3171 | r3172 | |
| 457 | 456 | // // |
| 458 | 457 | /////////////////////////////////////////////////////////////////////////// |
| 459 | 458 | |
| 460 | int ptm6840_read(int which, int offset) | |
| 459 | int ptm6840_read(running_machine *machine, int which, int offset) | |
| 461 | 460 | { |
| 462 | 461 | int val; |
| 463 | 462 | ptm6840 *currptr = ptm + which; |
| r3171 | r3172 | |
| 489 | 488 | if (currptr->status_read_since_int & (1 << idx)) |
| 490 | 489 | { |
| 491 | 490 | currptr->status_reg &= ~(1 << idx); |
| 492 | update_interrupts( | |
| 491 | update_interrupts(machine, which); | |
| 493 | 492 | } |
| 494 | 493 | |
| 495 | 494 | currptr->lsb_buffer = result & 0xff; |
| r3171 | r3172 | |
| 523 | 522 | // // |
| 524 | 523 | /////////////////////////////////////////////////////////////////////////// |
| 525 | 524 | |
| 526 | void ptm6840_write (int which, int offset, int data) | |
| 525 | void ptm6840_write (running_machine *machine, int which, int offset, int data) | |
| 527 | 526 | { |
| 528 | 527 | ptm6840 *currptr = ptm + which; |
| 529 | 528 | |
| r3171 | r3172 | |
| 553 | 552 | if ( currptr->intf ) |
| 554 | 553 | { |
| 555 | 554 | if ( currptr->intf->out_func[idx] ) |
| 556 | currptr->intf->out_func[idx]( | |
| 555 | currptr->intf->out_func[idx](machine, 0, 0); | |
| 557 | 556 | } |
| 558 | 557 | } |
| 559 | 558 | /* Reset? */ |
| r3171 | r3172 | |
| 573 | 572 | else |
| 574 | 573 | { |
| 575 | 574 | for (i = 0; i < 3; i++) |
| 576 | reload_count( | |
| 575 | reload_count(machine, which, i); | |
| 577 | 576 | } |
| 578 | 577 | |
| 579 | 578 | currptr->status_reg = 0; |
| 580 | update_interrupts( | |
| 579 | update_interrupts(machine, which); | |
| 581 | 580 | |
| 582 | 581 | /* Changing the clock source? (e.g. Zwackery) */ |
| 583 | 582 | if (diffs & 0x02) |
| 584 | reload_count( | |
| 583 | reload_count(machine, which, idx); | |
| 585 | 584 | } |
| 586 | 585 | break; |
| 587 | 586 | } |
| r3171 | r3172 | |
| 604 | 603 | |
| 605 | 604 | /* Clear the interrupt */ |
| 606 | 605 | currptr->status_reg &= ~(1 << idx); |
| 607 | update_interrupts( | |
| 606 | update_interrupts(machine, which); | |
| 608 | 607 | |
| 609 | 608 | /* Reload the count if in an appropriate mode */ |
| 610 | 609 | if (!(currptr->control_reg[idx] & 0x10)) |
| 611 | reload_count( | |
| 610 | reload_count(machine, which,idx); | |
| 612 | 611 | |
| 613 | 612 | PLOG(("%06X:MC6840 #%d: Counter %d latch = %04X\n", activecpu_get_previouspc(), which, idx, currptr->latch[idx])); |
| 614 | 613 | break; |
| r3171 | r3172 | |
| 689 | 688 | p->gate[idx] = state; |
| 690 | 689 | } |
| 691 | 690 | |
| 692 | void ptm6840_set_g1(int which, int state) { ptm6840_set_gate(Machine, which, state, 0); } | |
| 693 | void ptm6840_set_g2(int which, int state) { ptm6840_set_gate(Machine, which, state, 1); } | |
| 694 | void ptm6840_set_g3(int which, int state) { ptm6840_set_gate(Machine, which, state, 2); } | |
| 691 | void ptm6840_set_g1(running_machine *machine, int which, int state) { ptm6840_set_gate(machine, which, state, 0); } | |
| 692 | void ptm6840_set_g2(running_machine *machine, int which, int state) { ptm6840_set_gate(machine, which, state, 1); } | |
| 693 | void ptm6840_set_g3(running_machine *machine, int which, int state) { ptm6840_set_gate(machine, which, state, 2); } | |
| 695 | 694 | |
| 696 | 695 | /////////////////////////////////////////////////////////////////////////// |
| 697 | 696 | // // |
| r3171 | r3172 | |
| 778 | 777 | return currptr->external_clock[counter]; |
| 779 | 778 | } |
| 780 | 779 | |
| 781 | void ptm6840_set_c1(int which, int state) { ptm6840_set_clock(Machine, which, state, 0); } | |
| 782 | void ptm6840_set_c2(int which, int state) { ptm6840_set_clock(Machine, which, state, 1); } | |
| 783 | void ptm6840_set_c3(int which, int state) { ptm6840_set_clock(Machine, which, state, 2); } | |
| 780 | void ptm6840_set_c1(running_machine *machine, int which, int state) { ptm6840_set_clock(machine, which, state, 0); } | |
| 781 | void ptm6840_set_c2(running_machine *machine, int which, int state) { ptm6840_set_clock(machine, which, state, 1); } | |
| 782 | void ptm6840_set_c3(running_machine *machine, int which, int state) { ptm6840_set_clock(machine, which, state, 2); } | |
| 784 | 783 | |
| 785 | 784 | ///////////////////////////////////////////////////////////////////////////////// |
| 786 | 785 | |
| 787 | READ8_HANDLER( ptm6840_0_r ) { return ptm6840_read(0, offset); } | |
| 788 | READ8_HANDLER( ptm6840_1_r ) { return ptm6840_read(1, offset); } | |
| 789 | READ8_HANDLER( ptm6840_2_r ) { return ptm6840_read(2, offset); } | |
| 790 | READ8_HANDLER( ptm6840_3_r ) { return ptm6840_read(3, offset); } | |
| 786 | READ8_HANDLER( ptm6840_0_r ) { return ptm6840_read(machine, 0, offset); } | |
| 787 | READ8_HANDLER( ptm6840_1_r ) { return ptm6840_read(machine, 1, offset); } | |
| 788 | READ8_HANDLER( ptm6840_2_r ) { return ptm6840_read(machine, 2, offset); } | |
| 789 | READ8_HANDLER( ptm6840_3_r ) { return ptm6840_read(machine, 3, offset); } | |
| 791 | 790 | |
| 792 | WRITE8_HANDLER( ptm6840_0_w ) { ptm6840_write(0, offset, data); } | |
| 793 | WRITE8_HANDLER( ptm6840_1_w ) { ptm6840_write(1, offset, data); } | |
| 794 | WRITE8_HANDLER( ptm6840_2_w ) { ptm6840_write(2, offset, data); } | |
| 795 | WRITE8_HANDLER( ptm6840_3_w ) { ptm6840_write(3, offset, data); } | |
| 791 | WRITE8_HANDLER( ptm6840_0_w ) { ptm6840_write(machine, 0, offset, data); } | |
| 792 | WRITE8_HANDLER( ptm6840_1_w ) { ptm6840_write(machine, 1, offset, data); } | |
| 793 | WRITE8_HANDLER( ptm6840_2_w ) { ptm6840_write(machine, 2, offset, data); } | |
| 794 | WRITE8_HANDLER( ptm6840_3_w ) { ptm6840_write(machine, 3, offset, data); } | |
| 796 | 795 | |
| 797 | READ16_HANDLER( ptm6840_0_msb_r ) { return ptm6840_read(0, offset) << 8; } | |
| 798 | READ16_HANDLER( ptm6840_1_msb_r ) { return ptm6840_read(1, offset) << 8; } | |
| 799 | READ16_HANDLER( ptm6840_2_msb_r ) { return ptm6840_read(2, offset) << 8; } | |
| 800 | READ16_HANDLER( ptm6840_3_msb_r ) { return ptm6840_read(3, offset) << 8; } | |
| 796 | READ16_HANDLER( ptm6840_0_msb_r ) { return ptm6840_read(machine, 0, offset) << 8; } | |
| 797 | READ16_HANDLER( ptm6840_1_msb_r ) { return ptm6840_read(machine, 1, offset) << 8; } | |
| 798 | READ16_HANDLER( ptm6840_2_msb_r ) { return ptm6840_read(machine, 2, offset) << 8; } | |
| 799 | READ16_HANDLER( ptm6840_3_msb_r ) { return ptm6840_read(machine, 3, offset) << 8; } | |
| 801 | 800 | |
| 802 | WRITE16_HANDLER( ptm6840_0_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(0, offset, data >> 8); } | |
| 803 | WRITE16_HANDLER( ptm6840_1_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(1, offset, data >> 8); } | |
| 804 | WRITE16_HANDLER( ptm6840_2_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(2, offset, data >> 8); } | |
| 805 | WRITE16_HANDLER( ptm6840_3_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(3, offset, data >> 8); } | |
| 801 | WRITE16_HANDLER( ptm6840_0_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(machine, 0, offset, data >> 8); } | |
| 802 | WRITE16_HANDLER( ptm6840_1_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(machine, 1, offset, data >> 8); } | |
| 803 | WRITE16_HANDLER( ptm6840_2_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(machine, 2, offset, data >> 8); } | |
| 804 | WRITE16_HANDLER( ptm6840_3_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(machine, 3, offset, data >> 8); } | |
| 806 | 805 | |
| 807 | READ16_HANDLER( ptm6840_0_lsb_r ) { return ptm6840_read(0, offset); } | |
| 808 | READ16_HANDLER( ptm6840_1_lsb_r ) { return ptm6840_read(1, offset); } | |
| 809 | READ16_HANDLER( ptm6840_2_lsb_r ) { return ptm6840_read(2, offset); } | |
| 810 | READ16_HANDLER( ptm6840_3_lsb_r ) { return ptm6840_read(3, offset); } | |
| 806 | READ16_HANDLER( ptm6840_0_lsb_r ) { return ptm6840_read(machine, 0, offset); } | |
| 807 | READ16_HANDLER( ptm6840_1_lsb_r ) { return ptm6840_read(machine, 1, offset); } | |
| 808 | READ16_HANDLER( ptm6840_2_lsb_r ) { return ptm6840_read(machine, 2, offset); } | |
| 809 | READ16_HANDLER( ptm6840_3_lsb_r ) { return ptm6840_read(machine, 3, offset); } | |
| 811 | 810 | |
| 812 | WRITE16_HANDLER( ptm6840_0_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(0, offset, data & 0xff); } | |
| 813 | WRITE16_HANDLER( ptm6840_1_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(1, offset, data & 0xff); } | |
| 814 | WRITE16_HANDLER( ptm6840_2_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(2, offset, data & 0xff); } | |
| 815 | WRITE16_HANDLER( ptm6840_3_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(3, offset, data & 0xff); } | |
| 811 | WRITE16_HANDLER( ptm6840_0_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(machine, 0, offset, data & 0xff); } | |
| 812 | WRITE16_HANDLER( ptm6840_1_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(machine, 1, offset, data & 0xff); } | |
| 813 | WRITE16_HANDLER( ptm6840_2_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(machine, 2, offset, data & 0xff); } | |
| 814 | WRITE16_HANDLER( ptm6840_3_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(machine, 3, offset, data & 0xff); } |
| r3171 | r3172 | |
|---|---|---|
| 23 | 23 | void (*irq_func)(running_machine *machine, int state); // function called if IRQ line changes |
| 24 | 24 | }; |
| 25 | 25 | |
| 26 | void ptm6840_config( int which, const ptm6840_interface *intf); | |
| 26 | void ptm6840_config( running_machine *machine, int which, const ptm6840_interface *intf); | |
| 27 | 27 | void ptm6840_reset( int which); |
| 28 | int ptm6840_read( int which, int offset); | |
| 29 | void ptm6840_write( int which, int offset, int data); | |
| 28 | int ptm6840_read( running_machine *machine, int which, int offset); | |
| 29 | void ptm6840_write( running_machine *machine, int which, int offset, int data); | |
| 30 | 30 | |
| 31 | 31 | int ptm6840_get_status(int which, int clock); // get whether timer is enabled |
| 32 | 32 | int ptm6840_get_irq(int which); // get IRQ state |
| r3171 | r3172 | |
| 34 | 34 | void ptm6840_set_ext_clock(int which, int counter, int clock); // set clock frequency |
| 35 | 35 | int ptm6840_get_ext_clock(int which, int counter);// get clock frequency |
| 36 | 36 | |
| 37 | void ptm6840_set_g1(int which, int state); // set gate1 state | |
| 38 | void ptm6840_set_c1(int which, int state); // set clock1 state | |
| 37 | void ptm6840_set_g1(running_machine *machine, int which, int state); // set gate1 state | |
| 38 | void ptm6840_set_c1(running_machine *machine, int which, int state); // set clock1 state | |
| 39 | 39 | |
| 40 | void ptm6840_set_g2(int which, int state); // set gate2 state | |
| 41 | void ptm6840_set_c2(int which, int state); // set clock2 state | |
| 40 | void ptm6840_set_g2(running_machine *machine, int which, int state); // set gate2 state | |
| 41 | void ptm6840_set_c2(running_machine *machine, int which, int state); // set clock2 state | |
| 42 | 42 | |
| 43 | void ptm6840_set_g3(int which, int state); // set gate3 state | |
| 44 | void ptm6840_set_c3(int which, int state); // set clock3 state | |
| 43 | void ptm6840_set_g3(running_machine *machine, int which, int state); // set gate3 state | |
| 44 | void ptm6840_set_c3(running_machine *machine, int which, int state); // set clock3 state | |
| 45 | 45 | |
| 46 | 46 | /*-------------------------------------------------------------------------*/ |
| 47 | 47 |
| r3171 | r3172 | |
|---|---|---|
| 854 | 854 | READ32_HANDLER( input_port_30_dword_r ) { return input_port_read_indexed(machine, 30); } |
| 855 | 855 | READ32_HANDLER( input_port_31_dword_r ) { return input_port_read_indexed(machine, 31); } |
| 856 | 856 | |
| 857 | /*------------------------------------------------- | |
| 858 | custom_port_read - act like input_port_read | |
| 859 | but it is a custom port, it is useful for | |
| 860 | e.g. input ports which expect the same port | |
| 861 | repeated both in the upper and lower half | |
| 862 | -------------------------------------------------*/ | |
| 863 | ||
| 864 | CUSTOM_INPUT( custom_port_read ) | |
| 865 | { | |
| 866 | const char *tag = param; | |
| 867 | return input_port_read(field->port->machine, tag); | |
| 868 | } |
| r3171 | r3172 | |
|---|---|---|
| 284 | 284 | READ32_HANDLER( input_port_30_dword_r ); |
| 285 | 285 | READ32_HANDLER( input_port_31_dword_r ); |
| 286 | 286 | |
| 287 | /* custom handler */ | |
| 288 | CUSTOM_INPUT( custom_port_read ); | |
| 287 | 289 | |
| 288 | 290 | #endif /* __MACHINE_GENERIC_H__ */ |
| r3171 | r3172 | |
|---|---|---|
| 221 | 221 | CONTROL REGISTER READ/WRITE |
| 222 | 222 | ***************************************************************************/ |
| 223 | 223 | |
| 224 | void z80pio_c_w(int which, int ch, UINT8 data) | |
| 224 | void z80pio_c_w(running_machine *machine, int which, int ch, UINT8 data) | |
| 225 | 225 | { |
| 226 | 226 | z80pio *pio = pios + which; |
| 227 | 227 | |
| r3171 | r3172 | |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | /* interrupt check */ |
| 281 | update_irq_state( | |
| 281 | update_irq_state(machine, pio, ch); | |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | |
| r3171 | r3172 | |
| 294 | 294 | DATA REGISTER READ/WRITE |
| 295 | 295 | ***************************************************************************/ |
| 296 | 296 | |
| 297 | void z80pio_d_w(int which, int ch, UINT8 data) | |
| 297 | void z80pio_d_w(running_machine *machine, int which, int ch, UINT8 data) | |
| 298 | 298 | { |
| 299 | 299 | z80pio *pio = pios + which; |
| 300 | 300 | |
| 301 | 301 | pio->out[ch] = data; /* latch out data */ |
| 302 | 302 | if(pio->port_write[ch]) |
| 303 | pio->port_write[ch]( | |
| 303 | pio->port_write[ch](machine, 0, data); | |
| 304 | 304 | |
| 305 | 305 | switch (pio->mode[ch]) |
| 306 | 306 | { |
| 307 | 307 | case PIO_MODE0: /* mode 0 output */ |
| 308 | 308 | case PIO_MODE2: /* mode 2 i/o */ |
| 309 | 309 | set_rdy(pio, ch, 1); /* ready = H */ |
| 310 | update_irq_state( | |
| 310 | update_irq_state(machine, pio, ch); | |
| 311 | 311 | return; |
| 312 | 312 | |
| 313 | 313 | case PIO_MODE1: /* mode 1 input */ |
| r3171 | r3172 | |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | |
| 323 | UINT8 z80pio_d_r(int which, int ch) | |
| 323 | UINT8 z80pio_d_r(running_machine *machine, int which, int ch) | |
| 324 | 324 | { |
| 325 | 325 | z80pio *pio = pios + which; |
| 326 | 326 | |
| r3171 | r3172 | |
| 332 | 332 | case PIO_MODE1: /* mode 1 input */ |
| 333 | 333 | set_rdy(pio, ch, 1); /* ready = H */ |
| 334 | 334 | if(pio->port_read[ch]) |
| 335 | pio->in[ch] = pio->port_read[ch](Machine, 0); | |
| 336 | update_irq_state(Machine, pio, ch); | |
| 335 | pio->in[ch] = pio->port_read[ch](machine, 0); | |
| 336 | update_irq_state(machine, pio, ch); | |
| 337 | 337 | return pio->in[ch]; |
| 338 | 338 | |
| 339 | 339 | case PIO_MODE2: /* mode 2 i/o */ |
| 340 | 340 | if (ch) VPRINTF(("PIO-B mode 2 \n")); |
| 341 | 341 | set_rdy(pio, 1, 1); /* brdy = H */ |
| 342 | 342 | if(pio->port_read[ch]) |
| 343 | pio->in[ch] = pio->port_read[ch](Machine, 0); | |
| 344 | update_irq_state(Machine, pio, ch); | |
| 343 | pio->in[ch] = pio->port_read[ch](machine, 0); | |
| 344 | update_irq_state(machine, pio, ch); | |
| 345 | 345 | return pio->in[ch]; |
| 346 | 346 | |
| 347 | 347 | case PIO_MODE3: /* mode 3 bit */ |
| 348 | 348 | if(pio->port_read[ch]) |
| 349 | pio->in[ch] = pio->port_read[ch]( | |
| 349 | pio->in[ch] = pio->port_read[ch](machine, 0); | |
| 350 | 350 | return (pio->in[ch] & pio->dir[ch]) | (pio->out[ch] & ~pio->dir[ch]); |
| 351 | 351 | } |
| 352 | 352 | VPRINTF(("PIO-%c data read,bad mode\n",'A'+ch )); |
| r3171 | r3172 | |
| 359 | 359 | PORT I/O |
| 360 | 360 | ***************************************************************************/ |
| 361 | 361 | |
| 362 | void z80pio_p_w(int which, UINT8 ch, UINT8 data) | |
| 362 | void z80pio_p_w(running_machine *machine, int which, UINT8 ch, UINT8 data) | |
| 363 | 363 | { |
| 364 | 364 | z80pio *pio = pios + which; |
| 365 | 365 | |
| r3171 | r3172 | |
| 375 | 375 | |
| 376 | 376 | case PIO_MODE1: |
| 377 | 377 | set_rdy(pio, ch, 0); |
| 378 | update_irq_state( | |
| 378 | update_irq_state(machine, pio, ch); | |
| 379 | 379 | break; |
| 380 | 380 | |
| 381 | 381 | case PIO_MODE3: |
| 382 | 382 | /* irq check */ |
| 383 | update_irq_state( | |
| 383 | update_irq_state(machine, pio, ch); | |
| 384 | 384 | break; |
| 385 | 385 | } |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | |
| 389 | int z80pio_p_r(int which, UINT8 ch) | |
| 389 | int z80pio_p_r(running_machine *machine, int which, UINT8 ch) | |
| 390 | 390 | { |
| 391 | 391 | z80pio *pio = pios + which; |
| 392 | 392 | |
| r3171 | r3172 | |
| 395 | 395 | case PIO_MODE2: /* port A only */ |
| 396 | 396 | case PIO_MODE0: |
| 397 | 397 | set_rdy(pio, ch, 0); |
| 398 | update_irq_state( | |
| 398 | update_irq_state(machine, pio, ch); | |
| 399 | 399 | break; |
| 400 | 400 | |
| 401 | 401 | case PIO_MODE1: |
| r3171 | r3172 | |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | |
| 412 | WRITE8_HANDLER( z80pioA_0_p_w ) { z80pio_p_w(0, 0, data); } | |
| 413 | WRITE8_HANDLER( z80pioB_0_p_w ) { z80pio_p_w(0, 1, data); } | |
| 414 | READ8_HANDLER( z80pioA_0_p_r ) { return z80pio_p_r(0, 0); } | |
| 415 | READ8_HANDLER( z80pioB_0_p_r ) { return z80pio_p_r(0, 1); } | |
| 412 | WRITE8_HANDLER( z80pioA_0_p_w ) { z80pio_p_w(machine, 0, 0, data); } | |
| 413 | WRITE8_HANDLER( z80pioB_0_p_w ) { z80pio_p_w(machine, 0, 1, data); } | |
| 414 | READ8_HANDLER( z80pioA_0_p_r ) { return z80pio_p_r(machine, 0, 0); } | |
| 415 | READ8_HANDLER( z80pioB_0_p_r ) { return z80pio_p_r(machine, 0, 1); } | |
| 416 | 416 | |
| 417 | WRITE8_HANDLER( z80pioA_1_p_w ) { z80pio_p_w(1, 0, data); } | |
| 418 | WRITE8_HANDLER( z80pioB_1_p_w ) { z80pio_p_w(1, 1, data); } | |
| 419 | READ8_HANDLER( z80pioA_1_p_r ) { return z80pio_p_r(1, 0); } | |
| 420 | READ8_HANDLER( z80pioB_1_p_r ) { return z80pio_p_r(1, 1); } | |
| 417 | WRITE8_HANDLER( z80pioA_1_p_w ) { z80pio_p_w(machine, 1, 0, data); } | |
| 418 | WRITE8_HANDLER( z80pioB_1_p_w ) { z80pio_p_w(machine, 1, 1, data); } | |
| 419 | READ8_HANDLER( z80pioA_1_p_r ) { return z80pio_p_r(machine, 1, 0); } | |
| 420 | READ8_HANDLER( z80pioB_1_p_r ) { return z80pio_p_r(machine, 1, 1); } | |
| 421 | 421 | |
| 422 | 422 | |
| 423 | 423 | |
| r3171 | r3172 | |
| 425 | 425 | STROBE STATE MANAGEMENT |
| 426 | 426 | ***************************************************************************/ |
| 427 | 427 | |
| 428 | static void z80pio_update_strobe(int which, int ch, int state) | |
| 428 | static void z80pio_update_strobe(running_machine *machine, int which, int ch, int state) | |
| 429 | 429 | { |
| 430 | 430 | z80pio *pio = pios + which; |
| 431 | 431 | |
| r3171 | r3172 | |
| 463 | 463 | pio->strobe[ch] = state; |
| 464 | 464 | |
| 465 | 465 | /* check interrupt */ |
| 466 | interrupt_check( | |
| 466 | interrupt_check(machine, which); | |
| 467 | 467 | } |
| 468 | 468 | break; |
| 469 | 469 | |
| r3171 | r3172 | |
| 476 | 476 | } |
| 477 | 477 | |
| 478 | 478 | |
| 479 | void z80pio_astb_w(int which, int state) { z80pio_update_strobe(which, 0, state); } | |
| 480 | void z80pio_bstb_w(int which, int state) { z80pio_update_strobe(which, 1, state); } | |
| 479 | void z80pio_astb_w(running_machine *machine, int which, int state) { z80pio_update_strobe(machine, which, 0, state); } | |
| 480 | void z80pio_bstb_w(running_machine *machine, int which, int state) { z80pio_update_strobe(machine, which, 1, state); } | |
| 481 | 481 | |
| 482 | 482 | |
| 483 | 483 | |
| r3171 | r3172 | |
| 553 | 553 | ***************************************************************************/ |
| 554 | 554 | READ8_HANDLER(z80pio_0_r) |
| 555 | 555 | { |
| 556 | return (offset & 2) ? z80pio_c_r(0, offset & 1) : z80pio_d_r(0, offset & 1); | |
| 556 | return (offset & 2) ? z80pio_c_r(0, offset & 1) : z80pio_d_r(machine, 0, offset & 1); | |
| 557 | 557 | } |
| 558 | 558 | |
| 559 | 559 | WRITE8_HANDLER(z80pio_0_w) |
| 560 | 560 | { |
| 561 | 561 | if (offset & 2) |
| 562 | z80pio_c_w(0, offset & 1, data); | |
| 562 | z80pio_c_w(machine, 0, offset & 1, data); | |
| 563 | 563 | else |
| 564 | z80pio_d_w(0, offset & 1, data); | |
| 564 | z80pio_d_w(machine, 0, offset & 1, data); | |
| 565 | 565 | } |
| 566 | 566 | |
| 567 | 567 | READ8_HANDLER(z80pio_1_r) |
| 568 | 568 | { |
| 569 | return (offset & 2) ? z80pio_c_r(1, offset & 1) : z80pio_d_r(1, offset & 1); | |
| 569 | return (offset & 2) ? z80pio_c_r(1, offset & 1) : z80pio_d_r(machine, 1, offset & 1); | |
| 570 | 570 | } |
| 571 | 571 | |
| 572 | 572 | WRITE8_HANDLER(z80pio_1_w) |
| 573 | 573 | { |
| 574 | 574 | if (offset & 2) |
| 575 | z80pio_c_w(1, offset & 1, data); | |
| 575 | z80pio_c_w(machine, 1, offset & 1, data); | |
| 576 | 576 | else |
| 577 | z80pio_d_w(1, offset & 1, data); | |
| 577 | z80pio_d_w(machine, 1, offset & 1, data); | |
| 578 | 578 | } |
| r3171 | r3172 | |
|---|---|---|
| 46 | 46 | CONTROL REGISTER READ/WRITE |
| 47 | 47 | ***************************************************************************/ |
| 48 | 48 | |
| 49 | void z80pio_c_w(int which, int ch, UINT8 data); | |
| 49 | void z80pio_c_w(running_machine *machine, int which, int ch, UINT8 data); | |
| 50 | 50 | UINT8 z80pio_c_r(int which, int ch); |
| 51 | 51 | |
| 52 | 52 | |
| r3171 | r3172 | |
| 55 | 55 | DATA REGISTER READ/WRITE |
| 56 | 56 | ***************************************************************************/ |
| 57 | 57 | |
| 58 | void z80pio_d_w(int which, int ch, UINT8 data); | |
| 59 | UINT8 z80pio_d_r(int which, int ch); | |
| 58 | void z80pio_d_w(running_machine *machine, int which, int ch, UINT8 data); | |
| 59 | UINT8 z80pio_d_r(running_machine *machine, int which, int ch); | |
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 | |
| r3171 | r3172 | |
| 64 | 64 | PORT I/O |
| 65 | 65 | ***************************************************************************/ |
| 66 | 66 | |
| 67 | void z80pio_p_w(int which, UINT8 ch, UINT8 data); | |
| 68 | int z80pio_p_r(int which, UINT8 ch); | |
| 67 | void z80pio_p_w(running_machine *machine, int which, UINT8 ch, UINT8 data); | |
| 68 | int z80pio_p_r(running_machine *machine, int which, UINT8 ch); | |
| 69 | 69 | |
| 70 | 70 | WRITE8_HANDLER( z80pioA_0_p_w ); |
| 71 | 71 | WRITE8_HANDLER( z80pioB_0_p_w ); |
| r3171 | r3172 | |
| 82 | 82 | STROBE STATE MANAGEMENT |
| 83 | 83 | ***************************************************************************/ |
| 84 | 84 | |
| 85 | void z80pio_astb_w(int which, int state); | |
| 86 | void z80pio_bstb_w(int which, int state); | |
| 85 | void z80pio_astb_w(running_machine *machine, int which, int state); | |
| 86 | void z80pio_bstb_w(running_machine *machine, int which, int state); | |
| 87 | 87 | |
| 88 | 88 | |
| 89 | 89 |
| r3171 | r3172 | |
|---|---|---|
| 161 | 161 | /* call this once per field (i.e., 59.94 times/second for NTSC) */ |
| 162 | 162 | void laserdisc_vsync(const device_config *device); |
| 163 | 163 | |
| 164 | /* return a textual description of the current state (for debugging) */ | |
| 165 | const char *laserdisc_describe_state(const device_config *device); | |
| 166 | ||
| 167 | 164 | /* get a bitmap for the current frame (and the frame number) */ |
| 168 | 165 | UINT32 laserdisc_get_video(const device_config *device, bitmap_t **bitmap); |
| 169 | 166 |
| r0 | r3172 | |
|---|---|---|
| 1 | /************************************************************************* | |
| 2 | ||
| 3 | ldcore.c | |
| 4 | ||
| 5 | Private core laserdisc player implementation. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | *************************************************************************/ | |
| 11 | ||
| 12 | #include "driver.h" | |
| 13 | #include "ldcore.h" | |
| 14 | #include "avcomp.h" | |
| 15 | #include "streams.h" | |
| 16 | #include "vbiparse.h" | |
| 17 | #include "config.h" | |
| 18 | #include "sound/custom.h" | |
| 19 | ||
| 20 | ||
| 21 | ||
| 22 | /*************************************************************************** | |
| 23 | DEBUGGING | |
| 24 | ***************************************************************************/ | |
| 25 | ||
| 26 | #define LOG_POSITION(x) /*printf x*/ | |
| 27 | ||
| 28 | ||
| 29 | ||
| 30 | /*************************************************************************** | |
| 31 | CONSTANTS | |
| 32 | ***************************************************************************/ | |
| 33 | ||
| 34 | /* we simulate extra lead-in and lead-out tracks */ | |
| 35 | #define VIRTUAL_LEAD_IN_TRACKS 200 | |
| 36 | #define VIRTUAL_LEAD_OUT_TRACKS 200 | |
| 37 | ||
| 38 | ||
| 39 | ||
| 40 | /*************************************************************************** | |
| 41 | TYPE DEFINITIONS | |
| 42 | ***************************************************************************/ | |
| 43 | ||
| 44 | /* core-specific data */ | |
| 45 | struct _ldcore_data | |
| 46 | { | |
| 47 | /* general config */ | |
| 48 | laserdisc_config config; /* copy of the inline config */ | |
| 49 | ldplayer_interface intf; /* interface to the player */ | |
| 50 | ||
| 51 | /* disc parameters */ | |
| 52 | chd_file * disc; /* handle to the disc itself */ | |
| 53 | av_codec_decompress_config avconfig; /* decompression configuration */ | |
| 54 | UINT8 readpending; /* true if a read is pending */ | |
| 55 | UINT32 maxtrack; /* maximum track number */ | |
| 56 | ||
| 57 | /* core states */ | |
| 58 | UINT8 audiosquelch; /* audio squelch state: bit 0 = audio 1, bit 1 = audio 2 */ | |
| 59 | UINT8 videosquelch; /* video squelch state: bit 0 = on/off */ | |
| 60 | UINT8 fieldnum; /* field number (0 or 1) */ | |
| 61 | INT32 curtrack; /* current track */ | |
| 62 | ||
| 63 | /* video data */ | |
| 64 | bitmap_t * videoframe[3]; /* currently cached frames */ | |
| 65 | bitmap_t * videovisframe[3]; /* wrapper around videoframe with only visible lines */ | |
| 66 | UINT8 videofields[3]; /* number of fields in each frame */ | |
| 67 | UINT32 videoframenum[3]; /* frame number contained in each frame */ | |
| 68 | UINT8 videoindex; /* index of the current video buffer */ | |
| 69 | bitmap_t videotarget; /* fake target bitmap for decompression */ | |
| 70 | bitmap_t * emptyframe; /* blank frame */ | |
| 71 | ||
| 72 | /* audio data */ | |
| 73 | INT16 * audiobuffer[2]; /* buffer for audio samples */ | |
| 74 | UINT32 audiobufsize; /* size of buffer */ | |
| 75 | UINT32 audiobufin; /* input index */ | |
| 76 | UINT32 audiobufout; /* output index */ | |
| 77 | UINT32 audiocursamples; /* current samples this track */ | |
| 78 | UINT32 audiomaxsamples; /* maximum samples per track */ | |
| 79 | int audiocustom; /* custom sound index */ | |
| 80 | int samplerate; /* playback samplerate */ | |
| 81 | ||
| 82 | /* metadata */ | |
| 83 | vbi_metadata metadata[2]; /* metadata parsed from the stream, for each field */ | |
| 84 | int last_frame; /* last seen frame number */ | |
| 85 | int last_chapter; /* last seen chapter number */ | |
| 86 | ||
| 87 | /* I/O data */ | |
| 88 | UINT8 datain; /* current input data value */ | |
| 89 | UINT8 linein[LASERDISC_INPUT_LINES]; /* current input line state */ | |
| 90 | UINT8 dataout; /* current output data value */ | |
| 91 | UINT8 lineout[LASERDISC_OUTPUT_LINES]; /* current output line state */ | |
| 92 | ||
| 93 | /* video updating */ | |
| 94 | UINT8 videoenable; /* is video enabled? */ | |
| 95 | render_texture * videotex; /* texture for the video */ | |
| 96 | UINT8 overenable; /* is the overlay enabled? */ | |
| 97 | bitmap_t * overbitmap[2]; /* overlay bitmaps */ | |
| 98 | int overindex; /* index of the overlay bitmap */ | |
| 99 | render_texture * overtex; /* texture for the overlay */ | |
| 100 | }; | |
| 101 | ||
| 102 | ||
| 103 | /* sound callback info */ | |
| 104 | typedef struct _sound_token sound_token; | |
| 105 | struct _sound_token | |
| 106 | { | |
| 107 | sound_stream * stream; | |
| 108 | laserdisc_state * ld; | |
| 109 | }; | |
| 110 | ||
| 111 | ||
| 112 | ||
| 113 | /*************************************************************************** | |
| 114 | FUNCTION PROTOTYPES | |
| 115 | ***************************************************************************/ | |
| 116 | ||
| 117 | /* generic helper functions */ | |
| 118 | static void read_track_data(laserdisc_state *ld); | |
| 119 | static void process_track_data(const device_config *device); | |
| 120 | static void fake_metadata(UINT32 track, UINT8 which, vbi_metadata *metadata); | |
| 121 | //static void render_display(UINT16 *videodata, UINT32 rowpixels, UINT32 width, int frame); | |
| 122 | static void *custom_start(int clock, const custom_sound_interface *config); | |
| 123 | static void custom_stream_callback(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples); | |
| 124 | static void configuration_load(running_machine *machine, int config_type, xml_data_node *parentnode); | |
| 125 | static void configuration_save(running_machine *machine, int config_type, xml_data_node *parentnode); | |
| 126 | ||
| 127 | ||
| 128 | ||
| 129 | /*************************************************************************** | |
| 130 | GLOBAL VARIABLES | |
| 131 | ***************************************************************************/ | |
| 132 | ||
| 133 | static const ldplayer_interface *player_interfaces[] = | |
| 134 | { | |
| 135 | // &pr7820_interface, | |
| 136 | &pr8210_interface, | |
| 137 | &simutrek_interface, | |
| 138 | &ldv1000_interface, | |
| 139 | // &ldp1450_interface, | |
| 140 | // &vp932_interface | |
| 141 | }; | |
| 142 | ||
| 143 | const custom_sound_interface laserdisc_custom_interface = | |
| 144 | { | |
| 145 | custom_start | |
| 146 | }; | |
| 147 | ||
| 148 | static const UINT8 numberfont[10][8] = | |
| 149 | { | |
| 150 | { | |
| 151 | 0x30, // ..xx.... | |
| 152 | 0x48, // .x..x... | |
| 153 | 0x84, // x....x.. | |
| 154 | 0x84, // x....x.. | |
| 155 | 0x84, // x....x.. | |
| 156 | 0x48, // .x..x... | |
| 157 | 0x30 // ..xx.... | |
| 158 | }, | |
| 159 | { | |
| 160 | 0x10, // ...x.... | |
| 161 | 0x30, // ..xx.... | |
| 162 | 0x50, // .x.x.... | |
| 163 | 0x10, // ...x.... | |
| 164 | 0x10, // ...x.... | |
| 165 | 0x10, // ...x.... | |
| 166 | 0x7c // .xxxxx.. | |
| 167 | }, | |
| 168 | { | |
| 169 | 0x78, // .xxxx... | |
| 170 | 0x84, // x....x.. | |
| 171 | 0x04, // .....x.. | |
| 172 | 0x38, // ..xxx... | |
| 173 | 0x40, // .x...... | |
| 174 | 0x80, // x....... | |
| 175 | 0xfc // xxxxxx.. | |
| 176 | }, | |
| 177 | { | |
| 178 | 0x78, // .xxxx... | |
| 179 | 0x84, // x....x.. | |
| 180 | 0x04, // .....x.. | |
| 181 | 0x38, // ..xxx... | |
| 182 | 0x04, // .....x.. | |
| 183 | 0x84, // x....x.. | |
| 184 | 0x78 // .xxxx... | |
| 185 | }, | |
| 186 | { | |
| 187 | 0x08, // ....x... | |
| 188 | 0x18, // ...xx... | |
| 189 | 0x28, // ..x.x... | |
| 190 | 0x48, // .x..x... | |
| 191 | 0xfc, // xxxxxx.. | |
| 192 | 0x08, // ....x... | |
| 193 | 0x08 // ....x... | |
| 194 | }, | |
| 195 | { | |
| 196 | 0xfc, // xxxxxx.. | |
| 197 | 0x80, // x....... | |
| 198 | 0x80, // x....... | |
| 199 | 0xf8, // xxxxx... | |
| 200 | 0x04, // .....x.. | |
| 201 | 0x84, // x....x.. | |
| 202 | 0x78 // .xxxx... | |
| 203 | }, | |
| 204 | { | |
| 205 | 0x38, // ..xxx... | |
| 206 | 0x40, // .x...... | |
| 207 | 0x80, // x....... | |
| 208 | 0xf8, // xxxxx... | |
| 209 | 0x84, // x....x.. | |
| 210 | 0x84, // x....x.. | |
| 211 | 0x78 // .xxxx... | |
| 212 | }, | |
| 213 | { | |
| 214 | 0xfc, // xxxxxx.. | |
| 215 | 0x04, // .....x.. | |
| 216 | 0x08, // ....x... | |
| 217 | 0x10, // ...x.... | |
| 218 | 0x20, // ..x..... | |
| 219 | 0x20, // ..x..... | |
| 220 | 0x20 // ..x..... | |
| 221 | }, | |
| 222 | { | |
| 223 | 0x78, // .xxxx... | |
| 224 | 0x84, // x....x.. | |
| 225 | 0x84, // x....x.. | |
| 226 | 0x78, // .xxxx... | |
| 227 | 0x84, // x....x.. | |
| 228 | 0x84, // x....x.. | |
| 229 | 0x78 // .xxxx... | |
| 230 | }, | |
| 231 | { | |
| 232 | 0x78, // .xxxx.. | |
| 233 | 0x84, // x....x. | |
| 234 | 0x84, // x....x. | |
| 235 | 0x7c, // .xxxxx. | |
| 236 | 0x04, // .....x. | |
| 237 | 0x08, // ....x.. | |
| 238 | 0x70, // .xxx... | |
| 239 | } | |
| 240 | }; | |
| 241 | ||
| 242 | ||
| 243 | ||
| 244 | /*************************************************************************** | |
| 245 | INLINE FUNCTIONS | |
| 246 | ***************************************************************************/ | |
| 247 | ||
| 248 | /*------------------------------------------------- | |
| 249 | get_safe_token - makes sure that the passed | |
| 250 | in device is, in fact, a laserdisc device | |
| 251 | -------------------------------------------------*/ | |
| 252 | ||
| 253 | INLINE laserdisc_state *get_safe_token(const device_config *device) | |
| 254 | { | |
| 255 | assert(device != NULL); | |
| 256 | assert(device->token != NULL); | |
| 257 | assert(device->type == LASERDISC); | |
| 258 | ||
| 259 | return (laserdisc_state *)device->token; | |
| 260 | } | |
| 261 | ||
| 262 | ||
| 263 | /*------------------------------------------------- | |
| 264 | audio_channel_active - return TRUE if the | |
| 265 | given audio channel should be output | |
| 266 | -------------------------------------------------*/ | |
| 267 | ||
| 268 | INLINE int audio_channel_active(ldcore_data *ldcore, int channel) | |
| 269 | { | |
| 270 | return (~ldcore->audiosquelch >> channel) & 1; | |
| 271 | } | |
| 272 | ||
| 273 | ||
| 274 | /*------------------------------------------------- | |
| 275 | video_active - return TRUE if the video should | |
| 276 | be output | |
| 277 | -------------------------------------------------*/ | |
| 278 | ||
| 279 | INLINE int video_active(ldcore_data *ldcore) | |
| 280 | { | |
| 281 | return !ldcore->videosquelch; | |
| 282 | } | |
| 283 | ||
| 284 | ||
| 285 | /*------------------------------------------------- | |
| 286 | add_to_current_track - add a value to the | |
| 287 | current track, stopping if we hit the min or | |
| 288 | max | |
| 289 | -------------------------------------------------*/ | |
| 290 | ||
| 291 | INLINE int add_to_current_track(ldcore_data *ldcore, INT32 delta) | |
| 292 | { | |
| 293 | ldcore->curtrack += delta; | |
| 294 | if (ldcore->curtrack < 1) | |
| 295 | { | |
| 296 | ldcore->curtrack = 1; | |
| 297 | return TRUE; | |
| 298 | } | |
| 299 | else if (ldcore->curtrack >= ldcore->maxtrack - 1) | |
| 300 | { | |
| 301 | ldcore->curtrack = ldcore->maxtrack - 1; | |
| 302 | return TRUE; | |
| 303 | } | |
| 304 | return FALSE; | |
| 305 | } | |
| 306 | ||
| 307 | ||
| 308 | /*------------------------------------------------- | |
| 309 | fillbitmap_yuy16 - fill a YUY16 bitmap with a | |
| 310 | given color pattern | |
| 311 | -------------------------------------------------*/ | |
| 312 | ||
| 313 | INLINE void fillbitmap_yuy16(bitmap_t *bitmap, UINT8 yval, UINT8 cr, UINT8 cb) | |
| 314 | { | |
| 315 | UINT16 color0 = (yval << 8) | cb; | |
| 316 | UINT16 color1 = (yval << 8) | cr; | |
| 317 | int x, y; | |
| 318 | ||
| 319 | /* write 32 bits of color (2 pixels at a time) */ | |
| 320 | for (y = 0; y < bitmap->height; y++) | |
| 321 | { | |
| 322 | UINT16 *dest = (UINT16 *)bitmap->base + y * bitmap->rowpixels; | |
| 323 | for (x = 0; x < bitmap->width / 2; x++) | |
| 324 | { | |
| 325 | *dest++ = color0; | |
| 326 | *dest++ = color1; | |
| 327 | } | |
| 328 | } | |
| 329 | } | |
| 330 | ||
| 331 | ||
| 332 | ||
| 333 | /*************************************************************************** | |
| 334 | GENERIC IMPLEMENTATION | |
| 335 | ***************************************************************************/ | |
| 336 | ||
| 337 | /*------------------------------------------------- | |
| 338 | laserdisc_vsync - call this once per field | |
| 339 | on the VSYNC signal | |
| 340 | -------------------------------------------------*/ | |
| 341 | ||
| 342 | void laserdisc_vsync(const device_config *device) | |
| 343 | { | |
| 344 | laserdisc_state *ld = get_safe_token(device); | |
| 345 | ldcore_data *ldcore = ld->core; | |
| 346 | ||
| 347 | /* wait for previous read and decode to finish */ | |
| 348 | process_track_data(device); | |
| 349 | ||
| 350 | /* update the state */ | |
| 351 | if (ldcore->intf.update != NULL) | |
| 352 | { | |
| 353 | INT32 advanceby = (*ldcore->intf.update)(ld, &ldcore->metadata[ldcore->fieldnum], ldcore->fieldnum, timer_get_time()); | |
| 354 | add_to_current_track(ldcore, advanceby); | |
| 355 | } | |
| 356 | ||
| 357 | /* flush any audio before we read more */ | |
| 358 | if (ldcore->audiocustom != -1) | |
| 359 | { | |
| 360 | sound_token *token = custom_get_token(ldcore->audiocustom); | |
| 361 | stream_update(token->stream); | |
| 362 | } | |
| 363 | ||
| 364 | /* start reading the track data for the next round */ | |
| 365 | ldcore->fieldnum ^= 1; | |
| 366 | read_track_data(ld); | |
| 367 | } | |
| 368 | ||
| 369 | ||
| 370 | /*------------------------------------------------- | |
| 371 | laserdisc_data_w - write data to the given | |
| 372 | laserdisc player | |
| 373 | -------------------------------------------------*/ | |
| 374 | ||
| 375 | void laserdisc_data_w(const device_config *device, UINT8 data) | |
| 376 | { | |
| 377 | laserdisc_state *ld = get_safe_token(device); | |
| 378 | ldcore_data *ldcore = ld->core; | |
| 379 | UINT8 prev = ldcore->datain; | |
| 380 | ldcore->datain = data; | |
| 381 | ||
| 382 | /* call through to the player-specific write handler */ | |
| 383 | if (ldcore->intf.writedata != NULL) | |
| 384 | (*ldcore->intf.writedata)(ld, prev, data); | |
| 385 | } | |
| 386 | ||
| 387 | ||
| 388 | /*------------------------------------------------- | |
| 389 | laserdisc_line_w - control an input line | |
| 390 | -------------------------------------------------*/ | |
| 391 | ||
| 392 | void laserdisc_line_w(const device_config *device, UINT8 line, UINT8 newstate) | |
| 393 | { | |
| 394 | laserdisc_state *ld = get_safe_token(device); | |
| 395 | ldcore_data *ldcore = ld->core; | |
| 396 | ||
| 397 | assert(line < LASERDISC_INPUT_LINES); | |
| 398 | assert(newstate == ASSERT_LINE || newstate == CLEAR_LINE || newstate == PULSE_LINE); | |
| 399 | ||
| 400 | /* assert */ | |
| 401 | if (newstate == ASSERT_LINE || newstate == PULSE_LINE) | |
| 402 | { | |
| 403 | if (ldcore->linein[line] != ASSERT_LINE) | |
| 404 | { | |
| 405 | /* call through to the player-specific line handler */ | |
| 406 | if (ldcore->intf.writeline[line] != NULL) | |
| 407 | (*ldcore->intf.writeline[line])(ld, CLEAR_LINE, ASSERT_LINE); | |
| 408 | } | |
| 409 | ldcore->linein[line] = ASSERT_LINE; | |
| 410 | } | |
| 411 | ||
| 412 | /* deassert */ | |
| 413 | if (newstate == CLEAR_LINE || newstate == PULSE_LINE) | |
| 414 | { | |
| 415 | if (ldcore->linein[line] != CLEAR_LINE) | |
| 416 | { | |
| 417 | /* call through to the player-specific line handler */ | |
| 418 | if (ldcore->intf.writeline[line] != NULL) | |
| 419 | (*ldcore->intf.writeline[line])(ld, ASSERT_LINE, CLEAR_LINE); | |
| 420 | } | |
| 421 | ldcore->linein[line] = CLEAR_LINE; | |
| 422 | } | |
| 423 | } | |
| 424 | ||
| 425 | ||
| 426 | /*------------------------------------------------- | |
| 427 | laserdisc_data_r - return the current | |
| 428 | data byte | |
| 429 | -------------------------------------------------*/ | |
| 430 | ||
| 431 | UINT8 laserdisc_data_r(const device_config *device) | |
| 432 | { | |
| 433 | laserdisc_state *ld = get_safe_token(device); | |
| 434 | ldcore_data *ldcore = ld->core; | |
| 435 | UINT8 result = ldcore->dataout; | |
| 436 | ||
| 437 | /* call through to the player-specific data handler */ | |
| 438 | if (ldcore->intf.readdata != NULL) | |
| 439 | result = (*ldcore->intf.readdata)(ld); | |
| 440 | ||
| 441 | return result; | |
| 442 | } | |
| 443 | ||
| 444 | ||
| 445 | /*------------------------------------------------- | |
| 446 | laserdisc_line_r - return the current state | |
| 447 | of an output line | |
| 448 | -------------------------------------------------*/ | |
| 449 | ||
| 450 | UINT8 laserdisc_line_r(const device_config *device, UINT8 line) | |
| 451 | { | |
| 452 | laserdisc_state *ld = get_safe_token(device); | |
| 453 | ldcore_data *ldcore = ld->core; | |
| 454 | UINT8 result; | |
| 455 | ||
| 456 | assert(line < LASERDISC_OUTPUT_LINES); | |
| 457 | result = ldcore->lineout[line]; | |
| 458 | ||
| 459 | /* call through to the player-specific data handler */ | |
| 460 | if (ldcore->intf.readline[line] != NULL) | |
| 461 | result = (*ldcore->intf.readline[line])(ld); | |
| 462 | ||
| 463 | return result; | |
| 464 | } | |
| 465 | ||
| 466 | ||
| 467 | /*------------------------------------------------- | |
| 468 | laserdisc_get_video - return the current | |
| 469 | video frame | |
| 470 | -------------------------------------------------*/ | |
| 471 | ||
| 472 | UINT32 laserdisc_get_video(const device_config *device, bitmap_t **bitmap) | |
| 473 | { | |
| 474 | laserdisc_state *ld = get_safe_token(device); | |
| 475 | ldcore_data *ldcore = ld->core; | |
| 476 | int frameindex; | |
| 477 | ||
| 478 | /* determine the most recent live set of frames */ | |
| 479 | frameindex = ldcore->videoindex; | |
| 480 | if (ldcore->videofields[frameindex] < 2) | |
| 481 | frameindex = (frameindex + ARRAY_LENGTH(ldcore->videofields) - 1) % ARRAY_LENGTH(ldcore->videofields); | |
| 482 | ||
| 483 | /* if no video present, return the empty frame */ | |
| 484 | if (!video_active(ldcore) || ldcore->videofields[frameindex] < 2) | |
| 485 | { | |
| 486 | *bitmap = ldcore->emptyframe; | |
| 487 | return 0; | |
| 488 | } | |
| 489 | else | |
| 490 | { | |
| 491 | *bitmap = ldcore->videovisframe[frameindex]; | |
| 492 | return ldcore->videoframenum[frameindex]; | |
| 493 | } | |
| 494 | } | |
| 495 | ||
| 496 | ||
| 497 | /*------------------------------------------------- | |
| 498 | laserdisc_get_field_code - return raw field | |
| 499 | information read from the disc | |
| 500 | -------------------------------------------------*/ | |
| 501 | ||
| 502 | UINT32 laserdisc_get_field_code(const device_config *device, UINT8 code) | |
| 503 | { | |
| 504 | laserdisc_state *ld = get_safe_token(device); | |
| 505 | ldcore_data *ldcore = ld->core; | |
| 506 | int field = ldcore->fieldnum ^ 1; | |
| 507 | ||
| 508 | /* if no video present, return */ | |
| 509 | if (!video_active(ldcore)) | |
| 510 | return 0; | |
| 511 | ||
| 512 | switch (code) | |
| 513 | { | |
| 514 | case LASERDISC_CODE_WHITE_FLAG: | |
| 515 | return ldcore->metadata[field].white; | |
| 516 | ||
| 517 | case LASERDISC_CODE_LINE16: | |
| 518 | return ldcore->metadata[field].line16; | |
| 519 | ||
| 520 | case LASERDISC_CODE_LINE17: | |
| 521 | return ldcore->metadata[field].line17; | |
| 522 | ||
| 523 | case LASERDISC_CODE_LINE18: | |
| 524 | return ldcore->metadata[field].line18; | |
| 525 | } | |
| 526 | ||
| 527 | return 0; | |
| 528 | } | |
| 529 | ||
| 530 | ||
| 531 | ||
| 532 | /*************************************************************************** | |
| 533 | PLAYER-TO-CORE INTERFACES | |
| 534 | ***************************************************************************/ | |
| 535 | ||
| 536 | /*------------------------------------------------- | |
| 537 | ldcore_get_safe_token - return a token with | |
| 538 | type checking from a device | |
| 539 | -------------------------------------------------*/ | |
| 540 | ||
| 541 | laserdisc_state *ldcore_get_safe_token(const device_config *device) | |
| 542 | { | |
| 543 | return get_safe_token(device); | |
| 544 | } | |
| 545 | ||
| 546 | ||
| 547 | /*------------------------------------------------- | |
| 548 | ldcore_set_audio_squelch - set the left/right | |
| 549 | audio squelch states | |
| 550 | -------------------------------------------------*/ | |
| 551 | ||
| 552 | void ldcore_set_audio_squelch(laserdisc_state *ld, UINT8 squelchleft, UINT8 squelchright) | |
| 553 | { | |
| 554 | ld->core->audiosquelch = (squelchleft ? 1 : 0) | (squelchright ? 2 : 0); | |
| 555 | } | |
| 556 | ||
| 557 | ||
| 558 | /*------------------------------------------------- | |
| 559 | ldcore_set_video_squelch - set the video | |
| 560 | squelch state | |
| 561 | -------------------------------------------------*/ | |
| 562 | ||
| 563 | void ldcore_set_video_squelch(laserdisc_state *ld, UINT8 squelch) | |
| 564 | { | |
| 565 | ld->core->videosquelch = squelch; | |
| 566 | } | |
| 567 | ||
| 568 | ||
| 569 | ||
| 570 | /*************************************************************************** | |
| 571 | GENERIC HELPER FUNCTIONS | |
| 572 | ***************************************************************************/ | |
| 573 | ||
| 574 | /*------------------------------------------------- | |
| 575 | ldcore_generic_update - generically update in | |
| 576 | a way that works for most situations | |
| 577 | -------------------------------------------------*/ | |
| 578 | ||
| 579 | INT32 ldcore_generic_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime, ldplayer_state *newstate) | |
| 580 | { | |
| 581 | INT32 advanceby = 0; | |
| 582 | int frame; | |
| 583 | ||
| 584 | /* start by assuming the state doesn't change */ | |
| 585 | *newstate = ld->state; | |
| 586 | ||
| 587 | /* handle things based on the state */ | |
| 588 | switch (ld->state.state) | |
| 589 | { | |
| 590 | case LDSTATE_EJECTING: | |
| 591 | /* when time expires, switch to the ejected state */ | |
| 592 | if (attotime_compare(curtime, ld->state.endtime) >= 0) | |
| 593 | newstate->state = LDSTATE_EJECTED; | |
| 594 | break; | |
| 595 | ||
| 596 | case LDSTATE_EJECTED: | |
| 597 | /* do nothing */ | |
| 598 | break; | |
| 599 | ||
| 600 | case LDSTATE_PARKED: | |
| 601 | /* do nothing */ | |
| 602 | break; | |
| 603 | ||
| 604 | case LDSTATE_LOADING: | |
| 605 | /* when time expires, switch to the spinup state */ | |
| 606 | if (attotime_compare(curtime, ld->state.endtime) >= 0) | |
| 607 | newstate->state = LDSTATE_SPINUP; | |
| 608 | advanceby = -GENERIC_SEARCH_SPEED; | |
| 609 | break; | |
| 610 | ||
| 611 | case LDSTATE_SPINUP: | |
| 612 | /* when time expires, switch to the playing state */ | |
| 613 | if (attotime_compare(curtime, ld->state.endtime) >= 0) | |
| 614 | newstate->state = LDSTATE_PLAYING; | |
| 615 | advanceby = -GENERIC_SEARCH_SPEED; | |
| 616 | break; | |
| 617 | ||
| 618 | case LDSTATE_PAUSING: | |
| 619 | /* if he hit the start of a frame, switch to paused state */ | |
| 620 | if (is_start_of_frame(vbi)) | |
| 621 | { | |
| 622 | newstate->state = LDSTATE_PAUSED; | |
| 623 | newstate->param = fieldnum; | |
| 624 | } | |
| 625 | ||
| 626 | /* else advance until we hit it */ | |
| 627 | else if (fieldnum == 1) | |
| 628 | advanceby = 1; | |
| 629 | break; | |
| 630 | ||
| 631 | case LDSTATE_PAUSED: | |
| 632 | /* if we paused on field 1, we must flip back and forth */ | |
| 633 | if (ld->state.param == 1) | |
| 634 | advanceby = (fieldnum == 1) ? 1 : -1; | |
| 635 | break; | |
| 636 | ||
| 637 | case LDSTATE_PLAYING: | |
| 638 | /* if we hit the target frame, switch to the paused state */ | |
| 639 | if (ld->state.param > 0 && is_start_of_frame(vbi) && frame_from_metadata(vbi) == ld->state.param) | |
| 640 | { | |
| 641 | newstate->state = LDSTATE_PAUSED; | |
| 642 | newstate->param = fieldnum; | |
| 643 | } | |
| 644 | ||
| 645 | /* otherwise after the second field of each frame */ | |
| 646 | else if (fieldnum == 1) | |
| 647 | advanceby = 1; | |
| 648 | break; | |
| 649 | ||
| 650 | case LDSTATE_PLAYING_SLOW_REVERSE: | |
| 651 | /* after the second field of each frame, see if we need to advance */ | |
| 652 | if (fieldnum == 1 && ++ld->state.substate > ld->state.param) | |
| 653 | { | |
| 654 | advanceby = -1; | |
| 655 | ld->state.substate = 0; | |
| 656 | } | |
| 657 | break; | |
| 658 | ||
| 659 | case LDSTATE_PLAYING_SLOW_FORWARD: | |
| 660 | /* after the second field of each frame, see if we need to advance */ | |
| 661 | if (fieldnum == 1 && ++ld->state.substate > ld->state.param) | |
| 662 | { | |
| 663 | advanceby = 1; | |
| 664 | ld->state.substate = 0; | |
| 665 | } | |
| 666 | break; | |
| 667 | ||
| 668 | case LDSTATE_PLAYING_FAST_REVERSE: | |
| 669 | /* advance after the second field of each frame */ | |
| 670 | if (fieldnum == 1) | |
| 671 | advanceby = -ld->state.param; | |
| 672 | break; | |
| 673 | ||
| 674 | case LDSTATE_PLAYING_FAST_FORWARD: | |
| 675 | /* advance after the second field of each frame */ | |
| 676 | if (fieldnum == 1) | |
| 677 | advanceby = ld->state.param; | |
| 678 | break; | |
| 679 | ||
| 680 | case LDSTATE_SCANNING: | |
| 681 | /* advance after the second field of each frame */ | |
| 682 | if (fieldnum == 1) | |
| 683 | advanceby = ld->state.param >> 8; | |
| 684 | ||
| 685 | /* after we run out of vsyncs, revert to the saved state */ | |
| 686 | if (++ld->state.substate >= (ld->state.param & 0xff)) | |
| 687 | *newstate = ld->savestate; | |
| 688 | break; | |
| 689 | ||
| 690 | case LDSTATE_STEPPING_REVERSE: | |
| 691 | /* wait for the first field of the frame and then leap backwards */ | |
| 692 | if (is_start_of_frame(vbi)) | |
| 693 | { | |
| 694 | advanceby = (fieldnum == 1) ? -1 : -2; | |
| 695 | newstate->state = LDSTATE_PAUSING; | |
| 696 | } | |
| 697 | break; | |
| 698 | ||
| 699 | case LDSTATE_STEPPING_FORWARD: | |
| 700 | /* wait for the first field of the frame and then switch to pausing state */ | |
| 701 | if (is_start_of_frame(vbi)) | |
| 702 | newstate->state = LDSTATE_PAUSING; | |
| 703 | break; | |
| 704 | ||
| 705 | case LDSTATE_SEEKING: | |
| 706 | /* if we're in the final state, look for a matching frame and pause there */ | |
| 707 | frame = frame_from_metadata(vbi); | |
| 708 | if (ld->state.substate == 1 && is_start_of_frame(vbi) && frame == ld->state.param) | |
| 709 | { | |
| 710 | newstate->state = LDSTATE_PAUSED; | |
| 711 | newstate->param = fieldnum; | |
| 712 | } | |
| 713 | ||
| 714 | /* otherwise, if we got frame data from the VBI, update our seeking logic */ | |
| 715 | else if (ld->state.substate == 0 && frame != FRAME_NOT_PRESENT) | |
| 716 | { | |
| 717 | INT32 delta = (ld->state.param - 2) - frame; | |
| 718 | ||
| 719 | /* if we're within a couple of frames, just play until we hit it */ | |
| 720 | if (delta >= 0 && delta <= 2) | |
| 721 | ld->state.substate++; | |
| 722 | ||
| 723 | /* otherwise, compute the delta assuming 1:1 track to frame; this will correct eventually */ | |
| 724 | else | |
| 725 | { | |
| 726 | if (delta < 0) | |
| 727 | delta--; | |
| 728 | advanceby = delta; | |
| 729 | advanceby = MIN(advanceby, GENERIC_SEARCH_SPEED); | |
| 730 | advanceby = MAX(advanceby, -GENERIC_SEARCH_SPEED); | |
| 731 | } | |
| 732 | } | |
| 733 | ||
| 734 | /* otherwise, keep advancing until we know what's up */ | |
| 735 | else | |
| 736 | { | |
| 737 | if (fieldnum == 1) | |
| 738 | advanceby = 1; | |
| 739 | } | |
| 740 | break; | |
| 741 | } | |
| 742 | ||
| 743 | return advanceby; | |
| 744 | } | |
| 745 | ||
| 746 | ||
| 747 | /*------------------------------------------------- | |
| 748 | read_track_data - read and process data for | |
| 749 | a particular video track | |
| 750 | -------------------------------------------------*/ | |
| 751 | ||
| 752 | static void read_track_data(laserdisc_state *ld) | |
| 753 | { | |
| 754 | ldcore_data *ldcore = ld->core; | |
| 755 | UINT32 tracknum = ldcore->curtrack; | |
| 756 | UINT32 fieldnum = ldcore->fieldnum; | |
| 757 | chd_error err; | |
| 758 | ||
| 759 | /* if the previous field had the white flag, force the new field to pair with it */ | |
| 760 | if (ldcore->metadata[fieldnum ^ 1].white) | |
| 761 | ldcore->videofields[ldcore->videoindex] = 1; | |
| 762 | ||
| 763 | /* if we already have both fields on the current videoindex, advance */ | |
| 764 | if (ldcore->videofields[ldcore->videoindex] >= 2) | |
| 765 | { | |
| 766 | ldcore->videoindex = (ldcore->videoindex + 1) % ARRAY_LENGTH(ldcore->videofields); | |
| 767 | ldcore->videofields[ldcore->videoindex] = 0; | |
| 768 | } | |
| 769 | ||
| 770 | /* set the video target information */ | |
| 771 | ldcore->videotarget = *ldcore->videoframe[ldcore->videoindex]; | |
| 772 | ldcore->videotarget.base = BITMAP_ADDR16(&ldcore->videotarget, fieldnum, 0); | |
| 773 | ldcore->videotarget.height /= 2; | |
| 774 | ldcore->videotarget.rowpixels *= 2; | |
| 775 | ldcore->avconfig.video = &ldcore->videotarget; | |
| 776 | ||
| 777 | /* set the audio target information */ | |
| 778 | if (ldcore->audiobufin + ldcore->audiomaxsamples <= ldcore->audiobufsize) | |
| 779 | { | |
| 780 | /* if we can fit without wrapping, just read the data directly */ | |
| 781 | ldcore->avconfig.audio[0] = &ldcore->audiobuffer[0][ldcore->audiobufin]; | |
| 782 | ldcore->avconfig.audio[1] = &ldcore->audiobuffer[1][ldcore->audiobufin]; | |
| 783 | } | |
| 784 | else | |
| 785 | { | |
| 786 | /* otherwise, read to the beginning of the buffer */ | |
| 787 | ldcore->avconfig.audio[0] = &ldcore->audiobuffer[0][0]; | |
| 788 | ldcore->avconfig.audio[1] = &ldcore->audiobuffer[1][0]; | |
| 789 | } | |
| 790 | ||
| 791 | /* override if we're not decoding */ | |
| 792 | ldcore->avconfig.maxsamples = ldcore->audiomaxsamples; | |
| 793 | ldcore->avconfig.actsamples = &ldcore->audiocursamples; | |
| 794 | ldcore->audiocursamples = 0; | |
| 795 | if (!audio_channel_active(ldcore, 0)) | |
| 796 | ldcore->avconfig.audio[0] = NULL; | |
| 797 | if (!audio_channel_active(ldcore, 1)) | |
| 798 | ldcore->avconfig.audio[1] = NULL; | |
| 799 | ||
| 800 | /* configure the codec and then read */ | |
| 801 | if (ldcore->disc != NULL) | |
| 802 | { | |
| 803 | err = chd_codec_config(ldcore->disc, AV_CODEC_DECOMPRESS_CONFIG, &ldcore->avconfig); | |
| 804 | if (err == CHDERR_NONE) | |
| 805 | { | |
| 806 | INT32 maxtrack = chd_get_header(ldcore->disc)->totalhunks / 2; | |
| 807 | INT32 chdtrack = tracknum - 1 - VIRTUAL_LEAD_IN_TRACKS; | |
| 808 | ||
| 809 | /* clamp the track */ | |
| 810 | chdtrack = MAX(chdtrack, 0); | |
| 811 | chdtrack = MIN(chdtrack, maxtrack - 1); | |
| 812 | err = chd_read_async(ldcore->disc, chdtrack * 2 + fieldnum, NULL); | |
| 813 | ldcore->readpending = TRUE; | |
| 814 | } | |
| 815 | } | |
| 816 | } | |
| 817 | ||
| 818 | ||
| 819 | /*------------------------------------------------- | |
| 820 | process_track_data - process data from a | |
| 821 | track after it has been read | |
| 822 | -------------------------------------------------*/ | |
| 823 | ||
| 824 | static void process_track_data(const device_config *device) | |
| 825 | { | |
| 826 | laserdisc_state *ld = get_safe_token(device); | |
| 827 | ldcore_data *ldcore = ld->core; | |
| 828 | UINT32 tracknum = ldcore->curtrack; | |
| 829 | UINT32 fieldnum = ldcore->fieldnum; | |
| 830 | int frame, chapter; | |
| 831 | chd_error chderr; | |
| 832 | ||
| 833 | /* wait for the async operation to complete */ | |
| 834 | if (ldcore->disc != NULL && ldcore->readpending) | |
| 835 | { | |
| 836 | /* complete the async operation */ | |
| 837 | chderr = chd_async_complete(ldcore->disc); | |
| 838 | if (chderr != CHDERR_NONE && chderr != CHDERR_NO_ASYNC_OPERATION) | |
| 839 | ldcore->avconfig.video = NULL; | |
| 840 | } | |
| 841 | ldcore->readpending = FALSE; | |
| 842 | ||
| 843 | /* parse the metadata */ | |
| 844 | if (ldcore->disc != NULL && ldcore->avconfig.video != NULL) | |
| 845 | vbi_parse_all((const UINT16 *)ldcore->avconfig.video->base, ldcore->avconfig.video->rowpixels, ldcore->avconfig.video->width, 8, &ldcore->metadata[fieldnum]); | |
| 846 | else | |
| 847 | fake_metadata(tracknum, fieldnum, &ldcore->metadata[fieldnum]); | |
| 848 | // printf("Track %5d: Metadata = %d %08X %08X %08X %08X\n", tracknum, ldcore->metadata[fieldnum].white, ldcore->metadata[fieldnum].line16, ldcore->metadata[fieldnum].line17, ldcore->metadata[fieldnum].line18, ldcore->metadata[fieldnum].line1718); | |
| 849 | ||
| 850 | /* update the last seen frame and chapter */ | |
| 851 | frame = frame_from_metadata(&ldcore->metadata[fieldnum]); | |
| 852 | if (frame >= 1 && frame < 99999) | |
| 853 | ldcore->last_frame = frame; | |
| 854 | chapter = chapter_from_metadata(&ldcore->metadata[fieldnum]); | |
| 855 | if (chapter != -1) | |
| 856 | ldcore->last_chapter = chapter; | |
| 857 | ||
| 858 | /* render the display if present */ | |
| 859 | // if (ldcore->display && ldcore->avconfig.video != NULL) | |
| 860 | // render_display((UINT16 *)ldcore->avconfig.video->base, ldcore->avconfig.video->rowpixels, ldcore->avconfig.video->width, ldcore->last_frame); | |
| 861 | ||
| 862 | /* update video field */ | |
| 863 | if (ldcore->avconfig.video != NULL) | |
| 864 | { | |
| 865 | ldcore->videofields[ldcore->videoindex]++; | |
| 866 | ldcore->videoframenum[ldcore->videoindex] = ldcore->last_frame; | |
| 867 | } | |
| 868 | ||
| 869 | /* pass the audio to the callback */ | |
| 870 | if (ldcore->config.audio != NULL) | |
| 871 | (*ldcore->config.audio)(device, ldcore->samplerate, ldcore->audiocursamples, ldcore->avconfig.audio[0], ldcore->avconfig.audio[1]); | |
| 872 | ||
| 873 | /* shift audio data if we read it into the beginning of the buffer */ | |
| 874 | if (ldcore->audiocursamples != 0 && ldcore->audiobufin != 0) | |
| 875 | { | |
| 876 | int chnum; | |
| 877 | ||
| 878 | /* iterate over channels */ | |
| 879 | for (chnum = 0; chnum < 2; chnum++) | |
| 880 | if (ldcore->avconfig.audio[chnum] == &ldcore->audiobuffer[chnum][0]) | |
| 881 | { | |
| 882 | int samplesleft; | |
| 883 | ||
| 884 | /* move data to the end */ | |
| 885 | samplesleft = ldcore->audiobufsize - ldcore->audiobufin; | |
| 886 | samplesleft = MIN(samplesleft, ldcore->audiocursamples); | |
| 887 | memmove(&ldcore->audiobuffer[chnum][ldcore->audiobufin], &ldcore->audiobuffer[chnum][0], samplesleft * 2); | |
| 888 | ||
| 889 | /* shift data at the beginning */ | |
| 890 | if (samplesleft < ldcore->audiocursamples) | |
| 891 | memmove(&ldcore->audiobuffer[chnum][0], &ldcore->audiobuffer[chnum][samplesleft], (ldcore->audiocursamples - samplesleft) * 2); | |
| 892 | } | |
| 893 | } | |
| 894 | ||
| 895 | /* update the input buffer pointer */ | |
| 896 | ldcore->audiobufin = (ldcore->audiobufin + ldcore->audiocursamples) % ldcore->audiobufsize; | |
| 897 | } | |
| 898 | ||
| 899 | ||
| 900 | /*------------------------------------------------- | |
| 901 | fake_metadata - fake metadata when there's | |
| 902 | no disc present | |
| 903 | -------------------------------------------------*/ | |
| 904 | ||
| 905 | static void fake_metadata(UINT32 track, UINT8 which, vbi_metadata *metadata) | |
| 906 | { | |
| 907 | if (which == 0) | |
| 908 | { | |
| 909 | metadata->white = 1; | |
| 910 | metadata->line16 = 0; | |
| 911 | metadata->line17 = metadata->line18 = 0xf80000 | | |
| 912 | (((track / 10000) % 10) << 16) | | |
| 913 | (((track / 1000) % 10) << 12) | | |
| 914 | (((track / 100) % 10) << 8) | | |
| 915 | (((track / 10) % 10) << 4) | | |
| 916 | (((track / 1) % 10) << 0); | |
| 917 | } | |
| 918 | else | |
| 919 | memset(metadata, 0, sizeof(*metadata)); | |
| 920 | } | |
| 921 | ||
| 922 | ||
| 923 | /*------------------------------------------------- | |
| 924 | render_display - draw the frame display | |
| 925 | -------------------------------------------------*/ | |
| 926 | ||
| 927 | #ifdef UNUSED_FUNCTION | |
| 928 | static void render_display(UINT16 *videodata, UINT32 rowpixels, UINT32 width, int frame) | |
| 929 | { | |
| 930 | const int xscale = 4, yscale = 2; | |
| 931 | char buffer[10]; | |
| 932 | int x = width / 10; | |
| 933 | int y = 50; | |
| 934 | int ch; | |
| 935 | int delta; | |
| 936 | ||
| 937 | /* do nothing if no data */ | |
| 938 | if (videodata == NULL) | |
| 939 | return; | |
| 940 | ||
| 941 | /* convert to a character string and render */ | |
| 942 | sprintf(buffer, "%5d", frame); | |
| 943 | ||
| 944 | /* iterate over 5 positions: (-1,-1), (-1,1), (1,-1), (1,1) and (0,0) */ | |
| 945 | /* render all in black except the last one */ | |
| 946 | for (delta = 0; delta < 5; delta++) | |
| 947 | { | |
| 948 | int color = (delta < 4) ? 0x0080 : 0xff80; | |
| 949 | int dx = (delta < 4) ? ((delta & 1) ? -1 : 1) : 0; | |
| 950 | int dy = (delta < 4) ? ((delta & 2) ? -1 : 1) : 0; | |
| 951 | ||
| 952 | /* iterate over 5 characters */ | |
| 953 | for (ch = 0; ch < 5; ch++) | |
| 954 | if (buffer[ch] >= '0' && buffer[ch] <= '9') | |
| 955 | { | |
| 956 | const UINT8 *fontdata = &numberfont[buffer[ch] - '0'][0]; | |
| 957 | int cy, cx; | |
| 958 | ||
| 959 | /* iterate over the rows of the character */ | |
| 960 | for (cy = 0; cy < 8; cy++) | |
| 961 | { | |
| 962 | UINT8 bits = *fontdata++; | |
| 963 | ||
| 964 | /* and over the columns */ | |
| 965 | for (cx = 0; cx < 8; cx++) | |
| 966 | if (bits & (0x80 >> cx)) | |
| 967 | { | |
| 968 | int ix, iy; | |
| 969 | ||
| 970 | /* fill in an xscale x yscale pixel */ | |
| 971 | for (iy = 0; iy < yscale; iy++) | |
| 972 | for (ix = 0; ix < xscale; ix++) | |
| 973 | videodata[(y + cy * yscale + iy + dy) * rowpixels + (x + (ch * 9 + cx) * xscale + ix + dx)] = color; | |
| 974 | } | |
| 975 | } | |
| 976 | } | |
| 977 | } | |
| 978 | } | |
| 979 | #endif | |
| 980 | ||
| 981 | ||
| 982 | /*------------------------------------------------- | |
| 983 | custom_start - custom audio start | |
| 984 | for laserdiscs | |
| 985 | -------------------------------------------------*/ | |
| 986 | ||
| 987 | static void *custom_start(int clock, const custom_sound_interface *config) | |
| 988 | { | |
| 989 | sound_token *token = auto_malloc(sizeof(*token)); | |
| 990 | token->stream = stream_create(0, 2, 48000, token, custom_stream_callback); | |
| 991 | token->ld = NULL; | |
| 992 | return token; | |
| 993 | } | |
| 994 | ||
| 995 | ||
| 996 | /*------------------------------------------------- | |
| 997 | custom_stream_callback - audio streamer | |
| 998 | for laserdiscs | |
| 999 | -------------------------------------------------*/ | |
| 1000 | ||
| 1001 | static void custom_stream_callback(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples) | |
| 1002 | { | |
| 1003 | sound_token *token = param; | |
| 1004 | laserdisc_state *ld = token->ld; | |
| 1005 | ldcore_data *ldcore = ld->core; | |
| 1006 | stream_sample_t *dst0 = outputs[0]; | |
| 1007 | stream_sample_t *dst1 = outputs[1]; | |
| 1008 | int samples_avail = 0; | |
| 1009 | ||
| 1010 | /* see if we have enough samples to fill the buffer; if not, drop out */ | |
| 1011 | if (ld != NULL) | |
| 1012 | { | |
| 1013 | samples_avail = ldcore->audiobufin - ldcore->audiobufout; | |
| 1014 | if (samples_avail < 0) | |
| 1015 | samples_avail += ldcore->audiobufsize; | |
| 1016 | } | |
| 1017 | ||
| 1018 | /* if no attached ld, just clear the buffers */ | |
| 1019 | if (samples_avail < samples) | |
| 1020 | { | |
| 1021 | memset(dst0, 0, samples * sizeof(dst0[0])); | |
| 1022 | memset(dst1, 0, samples * sizeof(dst1[0])); | |
| 1023 | } | |
| 1024 | ||
| 1025 | /* otherwise, stream from our buffer */ | |
| 1026 | else | |
| 1027 | { | |
| 1028 | INT16 *buffer0 = ldcore->audiobuffer[0]; | |
| 1029 | INT16 *buffer1 = ldcore->audiobuffer[1]; | |
| 1030 | int sampout = ldcore->audiobufout; | |
| 1031 | ||
| 1032 | /* copy samples, clearing behind us as we go */ | |
| 1033 | while (sampout != ldcore->audiobufin && samples-- > 0) | |
| 1034 | { | |
| 1035 | *dst0++ = buffer0[sampout]; | |
| 1036 | *dst1++ = buffer1[sampout]; | |
| 1037 | buffer0[sampout] = 0; | |
| 1038 | buffer1[sampout] = 0; | |
| 1039 | sampout++; | |
| 1040 | if (sampout >= ldcore->audiobufsize) | |
| 1041 | sampout = 0; | |
| 1042 | } | |
| 1043 | ldcore->audiobufout = sampout; | |
| 1044 | ||
| 1045 | /* clear out the rest of the buffer */ | |
| 1046 | if (samples > 0) | |
| 1047 | { | |
| 1048 | int sampout = (ldcore->audiobufout == 0) ? ldcore->audiobufsize - 1 : ldcore->audiobufout - 1; | |
| 1049 | stream_sample_t fill0 = buffer0[sampout]; | |
| 1050 | stream_sample_t fill1 = buffer1[sampout]; | |
| 1051 | ||
| 1052 | while (samples-- > 0) | |
| 1053 | { | |
| 1054 | *dst0++ = fill0; | |
| 1055 | *dst1++ = fill1; | |
| 1056 | } | |
| 1057 | } | |
| 1058 | } | |
| 1059 | } | |
| 1060 | ||
| 1061 | ||
| 1062 | ||
| 1063 | /*************************************************************************** | |
| 1064 | CONFIG SETTINGS ACCESS | |
| 1065 | ***************************************************************************/ | |
| 1066 | ||
| 1067 | /*------------------------------------------------- | |
| 1068 | configuration_load - read and apply data from | |
| 1069 | the configuration file | |
| 1070 | -------------------------------------------------*/ | |
| 1071 | ||
| 1072 | static void configuration_load(running_machine *machine, int config_type, xml_data_node *parentnode) | |
| 1073 | { | |
| 1074 | xml_data_node *overnode; | |
| 1075 | xml_data_node *ldnode; | |
| 1076 | ||
| 1077 | /* we only care about game files */ | |
| 1078 | if (config_type != CONFIG_TYPE_GAME) | |
| 1079 | return; | |
| 1080 | ||
| 1081 | /* might not have any data */ | |
| 1082 | if (parentnode == NULL) | |
| 1083 | return; | |
| 1084 | ||
| 1085 | /* iterate over overlay nodes */ | |
| 1086 | for (ldnode = xml_get_sibling(parentnode->child, "device"); ldnode != NULL; ldnode = xml_get_sibling(ldnode->next, "device")) | |
| 1087 | { | |
| 1088 | const char *devtag = xml_get_attribute_string(ldnode, "tag", ""); | |
| 1089 | const device_config *device = device_list_find_by_tag(machine->config->devicelist, LASERDISC, devtag); | |
| 1090 | if (device != NULL) | |
| 1091 | { | |
| 1092 | laserdisc_state *ld = get_safe_token(device); | |
| 1093 | ldcore_data *ldcore = ld->core; | |
| 1094 | ||
| 1095 | /* handle the overlay node */ | |
| 1096 | overnode = xml_get_sibling(ldnode->child, "overlay"); | |
| 1097 | if (overnode != NULL) | |
| 1098 | { | |
| 1099 | /* fetch positioning controls */ | |
| 1100 | ldcore->config.overposx = xml_get_attribute_float(overnode, "hoffset", ldcore->config.overposx); | |
| 1101 | ldcore->config.overscalex = xml_get_attribute_float(overnode, "hstretch", ldcore->config.overscalex); | |
| 1102 | ldcore->config.overposy = xml_get_attribute_float(overnode, "voffset", ldcore->config.overposy); | |
| 1103 | ldcore->config.overscaley = xml_get_attribute_float(overnode, "vstretch", ldcore->config.overscaley); | |
| 1104 | } | |
| 1105 | } | |
| 1106 | } | |
| 1107 | } | |
| 1108 | ||
| 1109 | ||
| 1110 | /*------------------------------------------------- | |
| 1111 | configuration_save - save data to the | |
| 1112 | configuration file | |
| 1113 | -------------------------------------------------*/ | |
| 1114 | ||
| 1115 | static void configuration_save(running_machine *machine, int config_type, xml_data_node *parentnode) | |
| 1116 | { | |
| 1117 | const device_config *device; | |
| 1118 | ||
| 1119 | /* we only care about game files */ | |
| 1120 | if (config_type != CONFIG_TYPE_GAME) | |
| 1121 | return; | |
| 1122 | ||
| 1123 | /* iterate over disc devices */ | |
| 1124 | for (device = device_list_first(machine->config->devicelist, LASERDISC); device != NULL; device = device_list_next(device, LASERDISC)) | |
| 1125 | { | |
| 1126 | laserdisc_config *origconfig = device->inline_config; | |
| 1127 | laserdisc_state *ld = get_safe_token(device); | |
| 1128 | ldcore_data *ldcore = ld->core; | |
| 1129 | xml_data_node *overnode; | |
| 1130 | xml_data_node *ldnode; | |
| 1131 | ||
| 1132 | /* create a node */ | |
| 1133 | ldnode = xml_add_child(parentnode, "device", NULL); | |
| 1134 | if (ldnode != NULL) | |
| 1135 | { | |
| 1136 | int changed = FALSE; | |
| 1137 | ||
| 1138 | /* output the basics */ | |
| 1139 | xml_set_attribute(ldnode, "tag", device->tag); | |
| 1140 | ||
| 1141 | /* add an overlay node */ | |
| 1142 | overnode = xml_add_child(ldnode, "overlay", NULL); | |
| 1143 | if (overnode != NULL) | |
| 1144 | { | |
| 1145 | /* output the positioning controls */ | |
| 1146 | if (ldcore->config.overposx != origconfig->overposx) | |
| 1147 | { | |
| 1148 | xml_set_attribute_float(overnode, "hoffset", ldcore->config.overposx); | |
| 1149 | changed = TRUE; | |
| 1150 | } | |
| 1151 | ||
| 1152 | if (ldcore->config.overscalex != origconfig->overscalex) | |
| 1153 | { | |
| 1154 | xml_set_attribute_float(overnode, "hstretch", ldcore->config.overscalex); | |
| 1155 | changed = TRUE; | |
| 1156 | } | |
| 1157 | ||
| 1158 | if (ldcore->config.overposy != origconfig->overposy) | |
| 1159 | { | |
| 1160 | xml_set_attribute_float(overnode, "voffset", ldcore->config.overposy); | |
| 1161 | changed = TRUE; | |
| 1162 | } | |
| 1163 | ||
| 1164 | if (ldcore->config.overscaley != origconfig->overscaley) | |
| 1165 | { | |
| 1166 | xml_set_attribute_float(overnode, "vstretch", ldcore->config.overscaley); | |
| 1167 | changed = TRUE; | |
| 1168 | } | |
| 1169 | } | |
| 1170 | ||
| 1171 | /* if nothing changed, kill the node */ | |
| 1172 | if (!changed) | |
| 1173 | xml_delete_node(ldnode); | |
| 1174 | } | |
| 1175 | } | |
| 1176 | } | |
| 1177 | ||
| 1178 | ||
| 1179 | ||
| 1180 | /*************************************************************************** | |
| 1181 | VIDEO INTERFACE | |
| 1182 | ***************************************************************************/ | |
| 1183 | ||
| 1184 | /*------------------------------------------------- | |
| 1185 | laserdisc_video_enable - enable/disable the | |
| 1186 | video | |
| 1187 | -------------------------------------------------*/ | |
| 1188 | ||
| 1189 | void laserdisc_video_enable(const device_config *device, int enable) | |
| 1190 | { | |
| 1191 | laserdisc_state *ld = get_safe_token(device); | |
| 1192 | ld->core->videoenable = enable; | |
| 1193 | } | |
| 1194 | ||
| 1195 | ||
| 1196 | /*------------------------------------------------- | |
| 1197 | laserdisc_video_enable - enable/disable the | |
| 1198 | video | |
| 1199 | -------------------------------------------------*/ | |
| 1200 | ||
| 1201 | void laserdisc_overlay_enable(const device_config *device, int enable) | |
| 1202 | { | |
| 1203 | laserdisc_state *ld = get_safe_token(device); | |
| 1204 | ld->core->overenable = enable; | |
| 1205 | } | |
| 1206 | ||
| 1207 | ||
| 1208 | /*------------------------------------------------- | |
| 1209 | video update callback | |
| 1210 | -------------------------------------------------*/ | |
| 1211 | ||
| 1212 | VIDEO_UPDATE( laserdisc ) | |
| 1213 | { | |
| 1214 | const device_config *laserdisc = device_list_first(screen->machine->config->devicelist, LASERDISC); | |
| 1215 | if (laserdisc != NULL) | |
| 1216 | { | |
| 1217 | laserdisc_state *ld = laserdisc->token; | |
| 1218 | ldcore_data *ldcore = ld->core; | |
| 1219 | bitmap_t *overbitmap = ldcore->overbitmap[ldcore->overindex]; | |
| 1220 | bitmap_t *vidbitmap = NULL; | |
| 1221 | ||
| 1222 | /* handle the overlay if present */ | |
| 1223 | if (overbitmap != NULL && ldcore->config.overupdate != NULL) | |
| 1224 | { | |
| 1225 | rectangle clip = *cliprect; | |
| 1226 | ||
| 1227 | /* scale the cliprect to the overlay size and then call the update callback */ | |
| 1228 | clip.min_x = 0; | |
| 1229 | clip.max_x = ldcore->config.overwidth - 1; | |
| 1230 | clip.min_y = cliprect->min_y * overbitmap->height / bitmap->height; | |
| 1231 | clip.max_y = (cliprect->max_y + 1) * overbitmap->height / bitmap->height - 1; | |
| 1232 | (*ldcore->config.overupdate)(screen, overbitmap, &clip); | |
| 1233 | } | |
| 1234 | ||
| 1235 | /* if this is the last update, do the rendering */ | |
| 1236 | if (cliprect->max_y == video_screen_get_visible_area(screen)->max_y) | |
| 1237 | { | |
| 1238 | float x0, y0, x1, y1; | |
| 1239 | ||
| 1240 | /* update the texture with the overlay contents */ | |
| 1241 | if (overbitmap != NULL) | |
| 1242 | { | |
| 1243 | if (overbitmap->format == BITMAP_FORMAT_INDEXED16) | |
| 1244 | render_texture_set_bitmap(ldcore->overtex, overbitmap, &ldcore->config.overclip, 0, TEXFORMAT_PALETTEA16); | |
| 1245 | else if (overbitmap->format == BITMAP_FORMAT_RGB32) | |
| 1246 | render_texture_set_bitmap(ldcore->overtex, overbitmap, &ldcore->config.overclip, 0, TEXFORMAT_ARGB32); | |
| 1247 | } | |
| 1248 | ||
| 1249 | /* get the laserdisc video */ | |
| 1250 | laserdisc_get_video(laserdisc, &vidbitmap); | |
| 1251 | if (vidbitmap != NULL) | |
| 1252 | render_texture_set_bitmap(ldcore->videotex, vidbitmap, NULL, 0, TEXFORMAT_YUY16); | |
| 1253 | ||
| 1254 | /* reset the screen contents */ | |
| 1255 | render_container_empty(render_container_get_screen(screen)); | |
| 1256 | ||
| 1257 | /* add the video texture */ | |
| 1258 | if (ldcore->videoenable) | |
| 1259 | render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), ldcore->videotex, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1)); | |
| 1260 | ||
| 1261 | /* add the overlay */ | |
| 1262 | if (ldcore->overenable && overbitmap != NULL) | |
| 1263 | { | |
| 1264 | x0 = 0.5f - 0.5f * ldcore->config.overscalex + ldcore->config.overposx; | |
| 1265 | y0 = 0.5f - 0.5f * ldcore->config.overscaley + ldcore->config.overposy; | |
| 1266 | x1 = x0 + ldcore->config.overscalex; | |
| 1267 | y1 = y0 + ldcore->config.overscaley; | |
| 1268 | render_screen_add_quad(screen, x0, y0, x1, y1, MAKE_ARGB(0xff,0xff,0xff,0xff), ldcore->overtex, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1)); | |
| 1269 | } | |
| 1270 | ||
| 1271 | /* swap to the next bitmap */ | |
| 1272 | ldcore->overindex = (ldcore->overindex + 1) % ARRAY_LENGTH(ldcore->overbitmap); | |
| 1273 | } | |
| 1274 | } | |
| 1275 | ||
| 1276 | return 0; | |
| 1277 | } | |
| 1278 | ||
| 1279 | ||
| 1280 | ||
| 1281 | /*************************************************************************** | |
| 1282 | CONFIGURATION | |
| 1283 | ***************************************************************************/ | |
| 1284 | ||
| 1285 | /*------------------------------------------------- | |
| 1286 | laserdisc_get_config - return a copy of the | |
| 1287 | current live configuration settings | |
| 1288 | -------------------------------------------------*/ | |
| 1289 | ||
| 1290 | void laserdisc_get_config(const device_config *device, laserdisc_config *config) | |
| 1291 | { | |
| 1292 | laserdisc_state *ld = get_safe_token(device); | |
| 1293 | *config = ld->core->config; | |
| 1294 | } | |
| 1295 | ||
| 1296 | ||
| 1297 | /*------------------------------------------------- | |
| 1298 | laserdisc_get_config - change the current live | |
| 1299 | configuration settings | |
| 1300 | -------------------------------------------------*/ | |
| 1301 | ||
| 1302 | void laserdisc_set_config(const device_config *device, const laserdisc_config *config) | |
| 1303 | { | |
| 1304 | laserdisc_state *ld = get_safe_token(device); | |
| 1305 | ld->core->config = *config; | |
| 1306 | } | |
| 1307 | ||
| 1308 | ||
| 1309 | ||
| 1310 | /*************************************************************************** | |
| 1311 | DEVICE INTERFACE | |
| 1312 | ***************************************************************************/ | |
| 1313 | ||
| 1314 | /*------------------------------------------------- | |
| 1315 | device start callback | |
| 1316 | -------------------------------------------------*/ | |
| 1317 | ||
| 1318 | static DEVICE_START( laserdisc ) | |
| 1319 | { | |
| 1320 | int fps = 30, fpsfrac = 0, width = 720, height = 240, interlaced = 1, channels = 2, rate = 44100; | |
| 1321 | const laserdisc_config *config = device->inline_config; | |
| 1322 | laserdisc_state *ld = get_safe_token(device); | |
| 1323 | UINT32 fps_times_1million; | |
| 1324 | ldcore_data *ldcore; | |
| 1325 | char metadata[256]; | |
| 1326 | int sndnum, index; | |
| 1327 | int statesize; | |
| 1328 | chd_error err; | |
| 1329 | ||
| 1330 | /* save a copy of the device pointer */ | |
| 1331 | ld->device = device; | |
| 1332 | ||
| 1333 | /* allocate memory for the core state */ | |
| 1334 | ld->core = auto_malloc(sizeof(*ld->core)); | |
| 1335 | memset(ld->core, 0, sizeof(*ld->core)); | |
| 1336 | ldcore = ld->core; | |
| 1337 | ||
| 1338 | /* determine the maximum player-specific state size and allocate it */ | |
| 1339 | statesize = 0; | |
| 1340 | for (index = 0; index < ARRAY_LENGTH(player_interfaces); index++) | |
| 1341 | statesize = MAX(statesize, player_interfaces[index]->statesize); | |
| 1342 | ld->player = auto_malloc(statesize); | |
| 1343 | memset(ld->player, 0, statesize); | |
| 1344 | ||
| 1345 | /* copy config data to the live state */ | |
| 1346 | ldcore->config = *config; | |
| 1347 | if (ldcore->config.overclip.max_x == ldcore->config.overclip.min_x || ldcore->config.overclip.max_y == ldcore->config.overclip.min_y) | |
| 1348 | { | |
| 1349 | ldcore->config.overclip.min_x = ldcore->config.overclip.min_y = 0; | |
| 1350 | ldcore->config.overclip.max_x = ldcore->config.overwidth - 1; | |
| 1351 | ldcore->config.overclip.max_y = ldcore->config.overheight - 1; | |
| 1352 | } | |
| 1353 | if (ldcore->config.overscalex == 0) | |
| 1354 | ldcore->config.overscalex = 1.0f; | |
| 1355 | if (ldcore->config.overscaley == 0) | |
| 1356 | ldcore->config.overscaley = 1.0f; | |
| 1357 | ||
| 1358 | /* find the disc */ | |
| 1359 | ldcore->disc = get_disk_handle(device->tag); | |
| 1360 | ldcore->audiocustom = 0; | |
| 1361 | for (sndnum = 0; sndnum < MAX_SOUND; sndnum++) | |
| 1362 | { | |
| 1363 | if (device->machine->config->sound[sndnum].tag != NULL && strcmp(device->machine->config->sound[sndnum].tag, device->tag) == 0) | |
| 1364 | break; | |
| 1365 | if (device->machine->config->sound[sndnum].type == SOUND_CUSTOM) | |
| 1366 | ldcore->audiocustom++; | |
| 1367 | } | |
| 1368 | if (sndnum == MAX_SOUND) | |
| 1369 | ldcore->audiocustom = -1; | |
| 1370 | ||
| 1371 | /* get the disc metadata and extract the ld */ | |
| 1372 | if (ldcore->disc != NULL) | |
| 1373 | { | |
| 1374 | /* require the A/V codec */ | |
| 1375 | if (chd_get_header(ldcore->disc)->compression != CHDCOMPRESSION_AV) | |
| 1376 | fatalerror("Laserdisc video must be compressed with the A/V codec!"); | |
| 1377 | ||
| 1378 | /* read and extract the metadata */ | |
| 1379 | err = chd_get_metadata(ldcore->disc, AV_METADATA_TAG, 0, metadata, sizeof(metadata), NULL, NULL); | |
| 1380 | if (err != CHDERR_NONE) | |
| 1381 | fatalerror("Non-A/V CHD file specified"); | |
| 1382 | if (sscanf(metadata, AV_METADATA_FORMAT, &fps, &fpsfrac, &width, &height, &interlaced, &channels, &rate) != 7) | |
| 1383 | fatalerror("Invalid metadata in CHD file"); | |
| 1384 | ||
| 1385 | /* require interlaced video */ | |
| 1386 | if (!interlaced) | |
| 1387 | fatalerror("Laserdisc video must be interlaced!"); | |
| 1388 | ||
| 1389 | /* determine the maximum track and allocate a frame buffer */ | |
| 1390 | ldcore->maxtrack = chd_get_header(ldcore->disc)->totalhunks / 2; | |
| 1391 | } | |
| 1392 | else | |
| 1393 | ldcore->maxtrack = 54000; | |
| 1394 | ldcore->maxtrack += VIRTUAL_LEAD_IN_TRACKS + VIRTUAL_LEAD_OUT_TRACKS; | |
| 1395 | ||
| 1396 | /* allocate video frames */ | |
| 1397 | for (index = 0; index < ARRAY_LENGTH(ldcore->videofields); index++) | |
| 1398 | { | |
| 1399 | /* first allocate a YUY16 bitmap at 2x the height */ | |
| 1400 | ldcore->videoframe[index] = auto_bitmap_alloc(width, height * 2, BITMAP_FORMAT_YUY16); | |
| 1401 | fillbitmap_yuy16(ldcore->videoframe[index], 40, 109, 240); | |
| 1402 | ||
| 1403 | /* make a copy of the bitmap that clips out the VBI and horizontal blanking areas */ | |
| 1404 | ldcore->videovisframe[index] = auto_malloc(sizeof(*ldcore->videovisframe[index])); | |
| 1405 | *ldcore->videovisframe[index] = *ldcore->videoframe[index]; | |
| 1406 | ldcore->videovisframe[index]->base = BITMAP_ADDR16(ldcore->videovisframe[index], 44, ldcore->videoframe[index]->width * 8 / 720); | |
| 1407 | ldcore->videovisframe[index]->height -= 44; | |
| 1408 | ldcore->videovisframe[index]->width -= 2 * ldcore->videoframe[index]->width * 8 / 720; | |
| 1409 | } | |
| 1410 | ||
| 1411 | /* allocate an empty frame of the same size */ | |
| 1412 | ldcore->emptyframe = auto_bitmap_alloc(width, height * 2, BITMAP_FORMAT_YUY16); | |
| 1413 | fillbitmap_yuy16(ldcore->emptyframe, 0, 128, 128); | |
| 1414 | ||
| 1415 | /* allocate audio buffers */ | |
| 1416 | fps_times_1million = fps * 1000000 + fpsfrac; | |
| 1417 | ldcore->audiomaxsamples = ((UINT64)rate * 1000000 + fps_times_1million - 1) / fps_times_1million; | |
| 1418 | ldcore->audiobufsize = ldcore->audiomaxsamples * 4; | |
| 1419 | ldcore->audiobuffer[0] = auto_malloc(ldcore->audiobufsize * sizeof(ldcore->audiobuffer[0][0])); | |
| 1420 | ldcore->audiobuffer[1] = auto_malloc(ldcore->audiobufsize * sizeof(ldcore->audiobuffer[1][0])); | |
| 1421 | ldcore->samplerate = rate; | |
| 1422 | ||
| 1423 | /* allocate texture for rendering */ | |
| 1424 | ldcore->videoenable = TRUE; | |
| 1425 | ldcore->videotex = render_texture_alloc(NULL, NULL); | |
| 1426 | if (ldcore->videotex == NULL) | |
| 1427 | fatalerror("Out of memory allocating video texture"); | |
| 1428 | ||
| 1429 | /* allocate overlay */ | |
| 1430 | if (ldcore->config.overwidth > 0 && ldcore->config.overheight > 0 && ldcore->config.overupdate != NULL) | |
| 1431 | { | |
| 1432 | ldcore->overenable = TRUE; | |
| 1433 | ldcore->overbitmap[0] = auto_bitmap_alloc(ldcore->config.overwidth, ldcore->config.overheight, ldcore->config.overformat); | |
| 1434 | ldcore->overbitmap[1] = auto_bitmap_alloc(ldcore->config.overwidth, ldcore->config.overheight, ldcore->config.overformat); | |
| 1435 | ldcore->overtex = render_texture_alloc(NULL, NULL); | |
| 1436 | if (ldcore->overtex == NULL) | |
| 1437 | fatalerror("Out of memory allocating overlay texture"); | |
| 1438 | } | |
| 1439 | ||
| 1440 | /* register callbacks */ | |
| 1441 | config_register(device->machine, "laserdisc", configuration_load, configuration_save); | |
| 1442 | } | |
| 1443 | ||
| 1444 | ||
| 1445 | /*------------------------------------------------- | |
| 1446 | device exit callback | |
| 1447 | -------------------------------------------------*/ | |
| 1448 | ||
| 1449 | static DEVICE_STOP( laserdisc ) | |
| 1450 | { | |
| 1451 | laserdisc_state *ld = get_safe_token(device); | |
| 1452 | ldcore_data *ldcore = ld->core; | |
| 1453 | ||
| 1454 | /* make sure all async operations have completed */ | |
| 1455 | if (ldcore->disc != NULL) | |
| 1456 | chd_async_complete(ldcore->disc); | |
| 1457 | ||
| 1458 | /* free any textures */ | |
| 1459 | if (ldcore->videotex != NULL) | |
| 1460 | render_texture_free(ldcore->videotex); | |
| 1461 | if (ldcore->overtex != NULL) | |
| 1462 | render_texture_free(ldcore->overtex); | |
| 1463 | } | |
| 1464 | ||
| 1465 | ||
| 1466 | /*------------------------------------------------- | |
| 1467 | device reset callback | |
| 1468 | -------------------------------------------------*/ | |
| 1469 | ||
| 1470 | static DEVICE_RESET( laserdisc ) | |
| 1471 | { | |
| 1472 | laserdisc_state *ld = get_safe_token(device); | |
| 1473 | ldcore_data *ldcore = ld->core; | |
| 1474 | int pltype, line; | |
| 1475 | ||
| 1476 | /* find our interface */ | |
| 1477 | for (pltype = 0; pltype < ARRAY_LENGTH(player_interfaces); pltype++) | |
| 1478 | if (player_interfaces[pltype]->type == ldcore->config.type) | |
| 1479 | break; | |
| 1480 | if (pltype == ARRAY_LENGTH(player_interfaces)) | |
| 1481 | fatalerror("No interface found for laserdisc player type %d\n", ldcore->config.type); | |
| 1482 | ldcore->intf = *player_interfaces[pltype]; | |
| 1483 | ||
| 1484 | /* attempt to wire up the audio */ | |
| 1485 | if (ldcore->audiocustom != -1) | |
| 1486 | { | |
| 1487 | sound_token *token = custom_get_token(ldcore->audiocustom); | |
| 1488 | token->ld = ld; | |
| 1489 | stream_set_sample_rate(token->stream, ldcore->samplerate); | |
| 1490 | } | |
| 1491 | ||
| 1492 | /* set up the general ld */ | |
| 1493 | ldcore->videosquelch = 1; | |
| 1494 | ldcore->audiosquelch = 3; | |
| 1495 | ||
| 1496 | /* default to track 1 */ | |
| 1497 | ldcore->curtrack = 1; | |
| 1498 | ldcore->last_frame = 0; | |
| 1499 | ldcore->last_chapter = 0; | |
| 1500 | ||
| 1501 | /* reset the I/O lines */ | |
| 1502 | for (line = 0; line < LASERDISC_INPUT_LINES; line++) | |
| 1503 | ldcore->linein[line] = CLEAR_LINE; | |
| 1504 | for (line = 0; line < LASERDISC_OUTPUT_LINES; line++) | |
| 1505 | ldcore->lineout[line] = CLEAR_LINE; | |
| 1506 | ||
| 1507 | /* call the initialization */ | |
| 1508 | if (ldcore->intf.init != NULL) | |
| 1509 | (*ldcore->intf.init)(ld); | |
| 1510 | } | |
| 1511 | ||
| 1512 | ||
| 1513 | /*------------------------------------------------- | |
| 1514 | device set info callback | |
| 1515 | -------------------------------------------------*/ | |
| 1516 | ||
| 1517 | static DEVICE_SET_INFO( laserdisc ) | |
| 1518 | { | |
| 1519 | laserdisc_state *ld = get_safe_token(device); | |
| 1520 | switch (state) | |
| 1521 | { | |
| 1522 | /* --- the following bits of info are set as 64-bit signed integers --- */ | |
| 1523 | case LDINFO_INT_TYPE: | |
| 1524 | if (ld != NULL && ld->core != NULL && ld->core->config.type != info->i) | |
| 1525 | { | |
| 1526 | ld->core->config.type = info->i; | |
| 1527 | device_reset(device); | |
| 1528 | } | |
| 1529 | break; | |
| 1530 | } | |
| 1531 | } | |
| 1532 | ||
| 1533 | ||
| 1534 | /*------------------------------------------------- | |
| 1535 | device get info callback | |
| 1536 | -------------------------------------------------*/ | |
| 1537 | ||
| 1538 | DEVICE_GET_INFO( laserdisc ) | |
| 1539 | { | |
| 1540 | const laserdisc_config *config = NULL; | |
| 1541 | int pltype; | |
| 1542 | ||
| 1543 | /* if we have a device, figure out where our config lives */ | |
| 1544 | if (device != NULL) | |
| 1545 | { | |
| 1546 | laserdisc_state *ld = device->token; | |
| 1547 | config = (ld == NULL || ld->core == NULL) ? device->inline_config : &ld->core->config; | |
| 1548 | } | |
| 1549 | ||
| 1550 | switch (state) | |
| 1551 | { | |
| 1552 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 1553 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(laserdisc_state); break; | |
| 1554 | case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(laserdisc_config); break; | |
| 1555 | case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_VIDEO; break; | |
| 1556 | case LDINFO_INT_TYPE: info->i = config->type; break; | |
| 1557 | ||
| 1558 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 1559 | case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(laserdisc); break; | |
| 1560 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(laserdisc); break; | |
| 1561 | case DEVINFO_FCT_STOP: info->stop = DEVICE_STOP_NAME(laserdisc); break; | |
| 1562 | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(laserdisc); break; | |
| 1563 | ||
| 1564 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 1565 | case DEVINFO_STR_NAME: | |
| 1566 | info->s = "Unknown Laserdisc Player"; | |
| 1567 | for (pltype = 0; pltype < ARRAY_LENGTH(player_interfaces); pltype++) | |
| 1568 | if (player_interfaces[pltype]->type == config->type) | |
| 1569 | info->s = player_interfaces[pltype]->name; | |
| 1570 | break; | |
| 1571 | case DEVINFO_STR_FAMILY: info->s = "Laserdisc Player"; break; | |
| 1572 | case DEVINFO_STR_VERSION: info->s = "1.0"; break; | |
| 1573 | case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; | |
| 1574 | case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 1575 | } | |
| 1576 | } |
| r0 | r3172 | |
|---|---|---|
| 1 | /************************************************************************* | |
| 2 | ||
| 3 | ldcore.h | |
| 4 | ||
| 5 | Private core laserdisc player implementation. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | *************************************************************************/ | |
| 11 | ||
| 12 | #pragma once | |
| 13 | ||
| 14 | #ifndef __LDCORE_H__ | |
| 15 | #define __LDCORE_H__ | |
| 16 | ||
| 17 | #include "driver.h" | |
| 18 | #include "laserdsc.h" | |
| 19 | #include "vbiparse.h" | |
| 20 | ||
| 21 | ||
| 22 | /*************************************************************************** | |
| 23 | CONSTANTS | |
| 24 | ***************************************************************************/ | |
| 25 | ||
| 26 | /* common laserdisc states */ | |
| 27 | enum | |
| 28 | { | |
| 29 | LDSTATE_NONE, /* unspecified state */ | |
| 30 | LDSTATE_EJECTING, /* in the process of ejecting */ | |
| 31 | LDSTATE_EJECTED, /* fully ejected */ | |
| 32 | LDSTATE_PARKED, /* head parked in lead-in */ | |
| 33 | LDSTATE_LOADING, /* loading from ejected state */ | |
| 34 | LDSTATE_SPINUP, /* spinning up */ | |
| 35 | LDSTATE_PAUSING, /* looking for a frame boundary to pause */ | |
| 36 | LDSTATE_PAUSED, /* found a frame boundary; now paused */ | |
| 37 | /* parameter specifies the fieldnum of the first frame */ | |
| 38 | LDSTATE_PLAYING, /* playing forward normally, with audio */ | |
| 39 | /* parameter specifies the target frame, or 0 if none */ | |
| 40 | LDSTATE_PLAYING_SLOW_REVERSE, /* playing slow in the reverse direction, with no audio */ | |
| 41 | /* parameter specifies the number of times to repeat each track */ | |
| 42 | LDSTATE_PLAYING_SLOW_FORWARD, /* playing slow in the forward direction, with no audio */ | |
| 43 | /* parameter specifies the number of times to repeat each track */ | |
| 44 | LDSTATE_PLAYING_FAST_REVERSE, /* playing fast in the reverse direction, with no audio */ | |
| 45 | /* parameter specifies the number of frames to skip backwards after each frame */ | |
| 46 | LDSTATE_PLAYING_FAST_FORWARD, /* playing fast in the forward direction, with no audio */ | |
| 47 | /* parameter specifies the number of frames to skip forwards after each frame */ | |
| 48 | LDSTATE_STEPPING_REVERSE, /* single frame stepping in the reverse direction */ | |
| 49 | LDSTATE_STEPPING_FORWARD, /* single frame stepping in the forward direction */ | |
| 50 | LDSTATE_SCANNING, /* scanning in the forward or reverse direction */ | |
| 51 | /* parameter(0:7) controls how many vsyncs until revert to savestate */ | |
| 52 | /* parameter(8:31) specifies the speed */ | |
| 53 | LDSTATE_SEEKING, /* seeking to a specific frame */ | |
| 54 | /* parameter specifies the target frame */ | |
| 55 | LDSTATE_OTHER /* other states start here */ | |
| 56 | }; | |
| 57 | ||
| 58 | /* special frame and chapter numbers from VBI conversion */ | |
| 59 | #define FRAME_NOT_PRESENT -2 /* no frame number information present */ | |
| 60 | #define FRAME_LEAD_IN -1 /* lead-in code detected */ | |
| 61 | #define FRAME_LEAD_OUT 99999 /* lead-out code detected */ | |
| 62 | #define CHAPTER_NOT_PRESENT -2 /* no chapter number information present */ | |
| 63 | #define CHAPTER_LEAD_IN -1 /* lead-in code detected */ | |
| 64 | #define CHAPTER_LEAD_OUT 100 /* lead-out code detected */ | |
| 65 | ||
| 66 | /* generic head movement speeds; use player-specific information where appropriate */ | |
| 67 | #define GENERIC_SLOW_SPEED (5) /* 1/5 normal speed */ | |
| 68 | #define GENERIC_FAST_SPEED (3) /* 3x normal speed */ | |
| 69 | #define GENERIC_SCAN_SPEED (50) /* 50x normal speed */ | |
| 70 | #define GENERIC_SEARCH_SPEED (5000) /* 5000x normal speed */ | |
| 71 | ||
| 72 | /* generic timings; use player-specific information where appropriate */ | |
| 73 | #define GENERIC_EJECT_TIME (ATTOTIME_IN_SEC(5)) | |
| 74 | #define GENERIC_SPINUP_TIME (ATTOTIME_IN_SEC(2)) | |
| 75 | #define GENERIC_LOAD_TIME (ATTOTIME_IN_SEC(5)) | |
| 76 | ||
| 77 | ||
| 78 | ||
| 79 | /*************************************************************************** | |
| 80 | MACROS | |
| 81 | ***************************************************************************/ | |
| 82 | ||
| 83 | #define SCANNING_PARAM(speed,duration) (((speed) << 8) | ((duration) & 0xff)) | |
| 84 | ||
| 85 | ||
| 86 | ||
| 87 | /*************************************************************************** | |
| 88 | TYPE DEFINITIONS | |
| 89 | ***************************************************************************/ | |
| 90 | ||
| 91 | /* core-specific and player-specific data */ | |
| 92 | typedef struct _ldplayer_data ldplayer_data; | |
| 93 | typedef struct _ldcore_data ldcore_data; | |
| 94 | ||
| 95 | ||
| 96 | /* player state */ | |
| 97 | typedef struct _ldplayer_state ldplayer_state; | |
| 98 | struct _ldplayer_state | |
| 99 | { | |
| 100 | UINT8 state; /* current state */ | |
| 101 | INT32 substate; /* internal sub-state; starts at 0 on any state change */ | |
| 102 | INT32 param; /* parameter for current state */ | |
| 103 | attotime endtime; /* minimum ending time for current state */ | |
| 104 | }; | |
| 105 | ||
| 106 | ||
| 107 | /* generic data */ | |
| 108 | typedef struct _laserdisc_state laserdisc_state; | |
| 109 | struct _laserdisc_state | |
| 110 | { | |
| 111 | const device_config * device; /* pointer to owning device */ | |
| 112 | ldcore_data * core; /* private core data */ | |
| 113 | ldplayer_data * player; /* private player data */ | |
| 114 | ||
| 115 | ldplayer_state state; /* active state */ | |
| 116 | ldplayer_state savestate; /* saved state during temporary operations */ | |
| 117 | }; | |
| 118 | ||
| 119 | ||
| 120 | /* player-specific callbacks */ | |
| 121 | typedef void (*laserdisc_init_func)(laserdisc_state *ld); | |
| 122 | typedef INT32 (*laserdisc_update_func)(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime); | |
| 123 | typedef void (*laserdisc_w_func)(laserdisc_state *ld, UINT8 prev, UINT8 new); | |
| 124 | typedef UINT8 (*laserdisc_r_func)(laserdisc_state *ld); | |
| 125 | ||
| 126 | ||
| 127 | /* player configuration */ | |
| 128 | typedef struct _ldplayer_interface ldplayer_interface; | |
| 129 | struct _ldplayer_interface | |
| 130 | { | |
| 131 | int type; /* type of the player */ | |
| 132 | size_t statesize; /* size of the state */ | |
| 133 | const char * name; /* name of the player */ | |
| 134 | laserdisc_init_func init; /* initialization callback */ | |
| 135 | laserdisc_update_func update; /* update callback */ | |
| 136 | laserdisc_w_func writedata; /* parallel data write */ | |
| 137 | laserdisc_w_func writeline[LASERDISC_INPUT_LINES]; /* single line write */ | |
| 138 | laserdisc_r_func readdata; /* parallel data read */ | |
| 139 | laserdisc_r_func readline[LASERDISC_OUTPUT_LINES]; /* single line read */ | |
| 140 | }; | |
| 141 | ||
| 142 | ||
| 143 | ||
| 144 | /*************************************************************************** | |
| 145 | GLOBAL VARIABLES | |
| 146 | ***************************************************************************/ | |
| 147 | ||
| 148 | /* defined by each player */ | |
| 149 | extern const ldplayer_interface pr7820_interface; | |
| 150 | extern const ldplayer_interface pr8210_interface; | |
| 151 | extern const ldplayer_interface simutrek_interface; | |
| 152 | extern const ldplayer_interface ldv1000_interface; | |
| 153 | extern const ldplayer_interface ldp1450_interface; | |
| 154 | extern const ldplayer_interface vp932_interface; | |
| 155 | ||
| 156 | ||
| 157 | ||
| 158 | /*************************************************************************** | |
| 159 | FUNCTION PROTOTYPES | |
| 160 | ***************************************************************************/ | |
| 161 | ||
| 162 | ||
| 163 | /* ----- player interface ----- */ | |
| 164 | ||
| 165 | /* return a token with type checking from a device */ | |
| 166 | laserdisc_state *ldcore_get_safe_token(const device_config *device); | |
| 167 | ||
| 168 | /* set the left/right audio squelch states */ | |
| 169 | void ldcore_set_audio_squelch(laserdisc_state *ld, UINT8 squelchleft, UINT8 squelchright); | |
| 170 | ||
| 171 | /* set the video squelch state */ | |
| 172 | void ldcore_set_video_squelch(laserdisc_state *ld, UINT8 squelch); | |
| 173 | ||
| 174 | ||
| 175 | ||
| 176 | /* ----- generic implementations ----- */ | |
| 177 | ||
| 178 | /* generically update in a way that works for most situations */ | |
| 179 | INT32 ldcore_generic_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime, ldplayer_state *curstate); | |
| 180 | ||
| 181 | ||
| 182 | ||
| 183 | /*************************************************************************** | |
| 184 | INLINE FUNCTIONS | |
| 185 | ***************************************************************************/ | |
| 186 | ||
| 187 | /*------------------------------------------------- | |
| 188 | is_start_of_frame - return TRUE if this is | |
| 189 | the start of a frame | |
| 190 | -------------------------------------------------*/ | |
| 191 | ||
| 192 | INLINE int is_start_of_frame(const vbi_metadata *vbi) | |
| 193 | { | |
| 194 | /* is it not known if the white flag or the presence of a frame code | |
| 195 | determines the start of frame; the former seems to be the "official" | |
| 196 | way, but the latter seems to be the practical implementation */ | |
| 197 | return (vbi->white || (vbi->line1718 & 0xf80000) == 0xf80000); | |
| 198 | } | |
| 199 | ||
| 200 | ||
| 201 | /*------------------------------------------------- | |
| 202 | frame_from_metadata - return the frame number | |
| 203 | encoded in the metadata, if present, or | |
| 204 | FRAME_NOT_PRESENT | |
| 205 | -------------------------------------------------*/ | |
| 206 | ||
| 207 | INLINE int frame_from_metadata(const vbi_metadata *metadata) | |
| 208 | { | |
| 209 | UINT32 data; | |
| 210 | ||
| 211 | if ((metadata->line1718 & 0xf80000) == 0xf80000) | |
| 212 | data = metadata->line1718 & 0x7ffff; | |
| 213 | else if (metadata->line1718 == 0x88ffff) | |
| 214 | return FRAME_LEAD_IN; | |
| 215 | else if (metadata->line1718 == 0x80eeee) | |
| 216 | return FRAME_LEAD_OUT; | |
| 217 | else | |
| 218 | return FRAME_NOT_PRESENT; | |
| 219 | ||
| 220 | return (((data >> 16) & 0x0f) * 10000) + (((data >> 12) & 0x0f) * 1000) + (((data >> 8) & 0x0f) * 100) + (((data >> 4) & 0x0f) * 10) + (data & 0x0f); | |
| 221 | } | |
| 222 | ||
| 223 | ||
| 224 | /*------------------------------------------------- | |
| 225 | chapter_from_metadata - return the chapter | |
| 226 | number encoded in the metadata, if present, | |
| 227 | or CHAPTER_NOT_PRESENT | |
| 228 | -------------------------------------------------*/ | |
| 229 | ||
| 230 | INLINE int chapter_from_metadata(const vbi_metadata *metadata) | |
| 231 | { | |
| 232 | UINT32 data; | |
| 233 | ||
| 234 | if ((metadata->line1718 & 0xf00fff) == 0x800ddd) | |
| 235 | data = metadata->line1718 & 0x7f000; | |
| 236 | else if (metadata->line1718 == 0x88ffff) | |
| 237 | return CHAPTER_LEAD_IN; | |
| 238 | else if (metadata->line1718 == 0x80eeee) | |
| 239 | return CHAPTER_LEAD_OUT; | |
| 240 | else | |
| 241 | return CHAPTER_NOT_PRESENT; | |
| 242 | ||
| 243 | return (((data >> 16) & 0x0f) * 10) + ((data >> 12) & 0x0f); | |
| 244 | } | |
| 245 | ||
| 246 | ||
| 247 | #endif |
| r3171 | r3172 | |
|---|---|---|
| 360 | 360 | z80sio_c_w - write to a control register |
| 361 | 361 | -------------------------------------------------*/ |
| 362 | 362 | |
| 363 | void z80sio_c_w(int which, int ch, UINT8 data) | |
| 363 | void z80sio_c_w(running_machine *machine, int which, int ch, UINT8 data) | |
| 364 | 364 | { |
| 365 | 365 | z80sio *sio = sios + which; |
| 366 | 366 | sio_channel *chan = &sio->chan[ch]; |
| r3171 | r3172 | |
| 386 | 386 | { |
| 387 | 387 | case SIO_WR0_COMMAND_CH_RESET: |
| 388 | 388 | VPRINTF(("%04X:SIO reset channel %c\n", activecpu_get_pc(), 'A' + ch)); |
| 389 | reset_channel( | |
| 389 | reset_channel(machine, sio, ch); | |
| 390 | 390 | break; |
| 391 | 391 | |
| 392 | 392 | case SIO_WR0_COMMAND_RES_STATUS_INT: |
| 393 | 393 | sio->int_state[INT_CHA_STATUS - 4*ch] &= ~Z80_DAISY_INT; |
| 394 | interrupt_check( | |
| 394 | interrupt_check(machine, sio); | |
| 395 | 395 | break; |
| 396 | 396 | |
| 397 | 397 | case SIO_WR0_COMMAND_ENA_RX_INT: |
| 398 | 398 | chan->int_on_next_rx = TRUE; |
| 399 | interrupt_check( | |
| 399 | interrupt_check(machine, sio); | |
| 400 | 400 | break; |
| 401 | 401 | |
| 402 | 402 | case SIO_WR0_COMMAND_RES_TX_INT: |
| 403 | 403 | sio->int_state[INT_CHA_TRANSMIT - 4*ch] &= ~Z80_DAISY_INT; |
| 404 | interrupt_check( | |
| 404 | interrupt_check(machine, sio); | |
| 405 | 405 | break; |
| 406 | 406 | |
| 407 | 407 | case SIO_WR0_COMMAND_RES_ERROR: |
| 408 | 408 | sio->int_state[INT_CHA_ERROR - 4*ch] &= ~Z80_DAISY_INT; |
| 409 | interrupt_check( | |
| 409 | interrupt_check(machine, sio); | |
| 410 | 410 | break; |
| 411 | 411 | } |
| 412 | 412 | break; |
| 413 | 413 | |
| 414 | 414 | /* SIO write register 1 */ |
| 415 | 415 | case 1: |
| 416 | interrupt_check( | |
| 416 | interrupt_check(machine, sio); | |
| 417 | 417 | break; |
| 418 | 418 | |
| 419 | 419 | /* SIO write register 5 */ |
| 420 | 420 | case 5: |
| 421 | 421 | if (((old ^ data) & SIO_WR5_DTR) && sio->dtr_changed_cb) |
| 422 | (*sio->dtr_changed_cb)( | |
| 422 | (*sio->dtr_changed_cb)(machine, ch, (data & SIO_WR5_DTR) != 0); | |
| 423 | 423 | if (((old ^ data) & SIO_WR5_SEND_BREAK) && sio->break_changed_cb) |
| 424 | (*sio->break_changed_cb)( | |
| 424 | (*sio->break_changed_cb)(machine, ch, (data & SIO_WR5_SEND_BREAK) != 0); | |
| 425 | 425 | if (((old ^ data) & SIO_WR5_RTS) && sio->rts_changed_cb) |
| 426 | (*sio->rts_changed_cb)( | |
| 426 | (*sio->rts_changed_cb)(machine, ch, (data & SIO_WR5_RTS) != 0); | |
| 427 | 427 | break; |
| 428 | 428 | } |
| 429 | 429 | } |
| r3171 | r3172 | |
| 467 | 467 | z80sio_d_w - write to a data register |
| 468 | 468 | -------------------------------------------------*/ |
| 469 | 469 | |
| 470 | void z80sio_d_w(int which, int ch, UINT8 data) | |
| 470 | void z80sio_d_w(running_machine *machine, int which, int ch, UINT8 data) | |
| 471 | 471 | { |
| 472 | 472 | z80sio *sio = sios + which; |
| 473 | 473 | sio_channel *chan = &sio->chan[ch]; |
| r3171 | r3172 | |
| 483 | 483 | |
| 484 | 484 | /* reset the transmit interrupt */ |
| 485 | 485 | sio->int_state[INT_CHA_TRANSMIT - 4*ch] &= ~Z80_DAISY_INT; |
| 486 | interrupt_check( | |
| 486 | interrupt_check(machine, sio); | |
| 487 | 487 | |
| 488 | 488 | /* stash the character */ |
| 489 | 489 | chan->outbuf = data; |
| r3171 | r3172 | |
| 494 | 494 | z80sio_d_r - read from a data register |
| 495 | 495 | -------------------------------------------------*/ |
| 496 | 496 | |
| 497 | UINT8 z80sio_d_r(int which, int ch) | |
| 497 | UINT8 z80sio_d_r(running_machine *machine, int which, int ch) | |
| 498 | 498 | { |
| 499 | 499 | z80sio *sio = sios + which; |
| 500 | 500 | sio_channel *chan = &sio->chan[ch]; |
| r3171 | r3172 | |
| 504 | 504 | |
| 505 | 505 | /* reset the receive interrupt */ |
| 506 | 506 | sio->int_state[INT_CHA_RECEIVE - 4*ch] &= ~Z80_DAISY_INT; |
| 507 | interrupt_check( | |
| 507 | interrupt_check(machine, sio); | |
| 508 | 508 | |
| 509 | 509 | VPRINTF(("%04X:sio_data_r(%c) = %02X\n", activecpu_get_pc(), 'A' + ch, chan->inbuf)); |
| 510 | 510 |
| r3171 | r3172 | |
|---|---|---|
| 46 | 46 | CONTROL REGISTER READ/WRITE |
| 47 | 47 | ***************************************************************************/ |
| 48 | 48 | |
| 49 | void z80sio_c_w(int which, int ch, UINT8 data); | |
| 49 | void z80sio_c_w(running_machine *machine, int which, int ch, UINT8 data); | |
| 50 | 50 | UINT8 z80sio_c_r(int which, int ch); |
| 51 | 51 | |
| 52 | 52 | |
| r3171 | r3172 | |
| 55 | 55 | DATA REGISTER READ/WRITE |
| 56 | 56 | ***************************************************************************/ |
| 57 | 57 | |
| 58 | void z80sio_d_w(int which, int ch, UINT8 data); | |
| 59 | UINT8 z80sio_d_r(int which, int ch); | |
| 58 | void z80sio_d_w(running_machine *machine, int which, int ch, UINT8 data); | |
| 59 | UINT8 z80sio_d_r(running_machine *machine, int which, int ch); | |
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 |
| r0 | r3172 | |
|---|---|---|
| 1 | /************************************************************************* | |
| 2 | ||
| 3 | ldv1000.c | |
| 4 | ||
| 5 | Pioneer LD-V1000 laserdisc emulation. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | *************************************************************************/ | |
| 11 | ||
| 12 | #include "ldcore.h" | |
| 13 | ||
| 14 | ||
| 15 | ||
| 16 | /*************************************************************************** | |
| 17 | DEBUGGING | |
| 18 | ***************************************************************************/ | |
| 19 | ||
| 20 | #define PRINTF_COMMANDS 1 | |
| 21 | #define CMDPRINTF(x) do { if (PRINTF_COMMANDS) mame_printf_debug x; } while (0) | |
| 22 | ||
| 23 | ||
| 24 | ||
| 25 | /*************************************************************************** | |
| 26 | CONSTANTS | |
| 27 | ***************************************************************************/ | |
| 28 | ||
| 29 | /* Player-specific states */ | |
| 30 | enum | |
| 31 | { | |
| 32 | LDSTATE_SKIPPING = LDSTATE_OTHER, | |
| 33 | LDSTATE_WAITING | |
| 34 | }; | |
| 35 | ||
| 36 | /* Pioneer LD-V1000 specific information */ | |
| 37 | enum | |
| 38 | { | |
| 39 | LDV1000_MODE_STATUS, | |
| 40 | LDV1000_MODE_GET_FRAME, | |
| 41 | LDV1000_MODE_GET_1ST, | |
| 42 | LDV1000_MODE_GET_2ND, | |
| 43 | LDV1000_MODE_GET_RAM | |
| 44 | }; | |
| 45 | ||
| 46 | #define LDV1000_SCAN_SPEED (2000 / 30) /* 2000 frames/second */ | |
| 47 | #define LDV1000_SCAN_DURATION (4) /* scan for 4 vsyncs each time */ | |
| 48 | ||
| 49 | ||
| 50 | ||
| 51 | /*************************************************************************** | |
| 52 | TYPE DEFINITIONS | |
| 53 | ***************************************************************************/ | |
| 54 | ||
| 55 | /* player-specific data */ | |
| 56 | struct _ldplayer_data | |
| 57 | { | |
| 58 | /* general modes and states */ | |
| 59 | UINT8 audio1disable; /* explicit disable for audio 1 */ | |
| 60 | UINT8 audio2disable; /* explicit disable for audio 2 */ | |
| 61 | UINT8 framedisplay; /* frame display */ | |
| 62 | INT32 parameter; /* parameter for numbers */ | |
| 63 | ||
| 64 | UINT8 mode; /* current mode */ | |
| 65 | UINT8 lastchapter; /* last chapter seen */ | |
| 66 | UINT16 lastframe; /* last frame seen */ | |
| 67 | UINT32 activereg; /* active register index */ | |
| 68 | UINT8 ram[1024]; /* RAM */ | |
| 69 | UINT32 readpos; /* current read position */ | |
| 70 | UINT32 readtotal; /* current read position */ | |
| 71 | UINT8 readbuf[256]; /* temporary read buffer */ | |
| 72 | attotime lastvsynctime; /* time of last update/vsync */ | |
| 73 | }; | |
| 74 | ||
| 75 | ||
| 76 | ||
| 77 | /*************************************************************************** | |
| 78 | FUNCTION PROTOTYPES | |
| 79 | ***************************************************************************/ | |
| 80 | ||
| 81 | static void ldv1000_init(laserdisc_state *ld); | |
| 82 | static void ldv1000_soft_reset(laserdisc_state *ld); | |
| 83 | static void ldv1000_update_squelch(laserdisc_state *ld); | |
| 84 | static int ldv1000_switch_state(laserdisc_state *ld, UINT8 newstate, INT32 stateparam); | |
| 85 | static INT32 ldv1000_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime); | |
| 86 | static void ldv1000_data_w(laserdisc_state *ld, UINT8 prev, UINT8 data); | |
| 87 | static UINT8 ldv1000_status_strobe_r(laserdisc_state *ld); | |
| 88 | static UINT8 ldv1000_command_strobe_r(laserdisc_state *ld); | |
| 89 | static UINT8 ldv1000_status_r(laserdisc_state *ld); | |
| 90 | ||
| 91 | ||
| 92 | ||
| 93 | /*************************************************************************** | |
| 94 | INTERFACES | |
| 95 | ***************************************************************************/ | |
| 96 | ||
| 97 | const ldplayer_interface ldv1000_interface = | |
| 98 | { | |
| 99 | LASERDISC_TYPE_PIONEER_LDV1000, /* type of the player */ | |
| 100 | sizeof(ldplayer_data), /* size of the state */ | |
| 101 | "Pioneer LD-V1000", /* name of the player */ | |
| 102 | ldv1000_init, /* initialization callback */ | |
| 103 | ldv1000_update, /* update callback */ | |
| 104 | ldv1000_data_w, /* parallel data write */ | |
| 105 | { /* single line write: */ | |
| 106 | NULL, /* LASERDISC_LINE_ENTER */ | |
| 107 | NULL /* LASERDISC_LINE_CONTROL */ | |
| 108 | }, | |
| 109 | ldv1000_status_r, /* parallel data read */ | |
| 110 | { /* single line read: */ | |
| 111 | NULL, /* LASERDISC_LINE_READY */ | |
| 112 | ldv1000_status_strobe_r, /* LASERDISC_LINE_STATUS */ | |
| 113 | ldv1000_command_strobe_r, /* LASERDISC_LINE_COMMAND */ | |
| 114 | NULL, /* LASERDISC_LINE_DATA_AVAIL */ | |
| 115 | } | |
| 116 | }; | |
| 117 | ||
| 118 | ||
| 119 | ||
| 120 | /*************************************************************************** | |
| 121 | INLINE FUNCTIONS | |
| 122 | ***************************************************************************/ | |
| 123 | ||
| 124 | /*------------------------------------------------- | |
| 125 | requires_state_save - returns TRUE if the | |
| 126 | given state will return to the previous | |
| 127 | state when done | |
| 128 | -------------------------------------------------*/ | |
| 129 | ||
| 130 | INLINE int requires_state_save(UINT8 state) | |
| 131 | { | |
| 132 | return (state == LDSTATE_SCANNING || | |
| 133 | state == LDSTATE_SKIPPING || | |
| 134 | state == LDSTATE_WAITING); | |
| 135 | } | |
| 136 | ||
| 137 | ||
| 138 | /*------------------------------------------------- | |
| 139 | read_16bits_from_ram_be - read 16 bits from | |
| 140 | player RAM in big-endian format | |
| 141 | -------------------------------------------------*/ | |
| 142 | ||
| 143 | INLINE UINT16 read_16bits_from_ram_be(UINT8 *ram, UINT32 offset) | |
| 144 | { | |
| 145 | return (ram[offset + 0] << 8) | ram[offset + 1]; | |
| 146 | } | |
| 147 | ||
| 148 | ||
| 149 | /*------------------------------------------------- | |
| 150 | write_16bits_to_ram_be - write 16 bits to | |
| 151 | player RAM in big endian format | |
| 152 | -------------------------------------------------*/ | |
| 153 | ||
| 154 | INLINE void write_16bits_to_ram_be(UINT8 *ram, UINT32 offset, UINT16 data) | |
| 155 | { | |
| 156 | ram[offset + 0] = data >> 8; | |
| 157 | ram[offset + 1] = data >> 0; | |
| 158 | } | |
| 159 | ||
| 160 | ||
| 161 | ||
| 162 | /*************************************************************************** | |
| 163 | PIONEER LD-V1000 IMPLEMENTATION | |
| 164 | ***************************************************************************/ | |
| 165 | ||
| 166 | /*------------------------------------------------- | |
| 167 | ldv1000_init - Pioneer PR-8210-specific | |
| 168 | initialization | |
| 169 | -------------------------------------------------*/ | |
| 170 | ||
| 171 | static void ldv1000_init(laserdisc_state *ld) | |
| 172 | { | |
| 173 | /* do a soft reset */ | |
| 174 | ldv1000_soft_reset(ld); | |
| 175 | } | |
| 176 | ||
| 177 | ||
| 178 | /*------------------------------------------------- | |
| 179 | ldv1000_soft_reset - Pioneer LDV-1000-specific | |
| 180 | soft reset | |
| 181 | -------------------------------------------------*/ | |
| 182 | ||
| 183 | static void ldv1000_soft_reset(laserdisc_state *ld) | |
| 184 | { | |
| 185 | ldplayer_data *player = ld->player; | |
| 186 | attotime curtime = timer_get_time(); | |
| 187 | ||
| 188 | ld->state.state = LDSTATE_NONE; | |
| 189 | ld->state.substate = 0; | |
| 190 | ld->state.param = 0; | |
| 191 | ld->state.endtime = curtime; | |
| 192 | ||
| 193 | player->audio1disable = 0; | |
| 194 | player->audio2disable = 0; | |
| 195 | player->parameter = 0; | |
| 196 | ||
| 197 | player->mode = 0; | |
| 198 | player->activereg = 0; | |
| 199 | memset(player->ram, 0, sizeof(player->ram)); | |
| 200 | player->readpos = 0; | |
| 201 | player->readtotal = 0; | |
| 202 | memset(player->readbuf, 0, sizeof(player->readbuf)); | |
| 203 | player->lastvsynctime = curtime; | |
| 204 | ||
| 205 | ldv1000_switch_state(ld, LDSTATE_PARKED, 0); | |
| 206 | } | |
| 207 | ||
| 208 | ||
| 209 | /*------------------------------------------------- | |
| 210 | ldv1000_update_squelch - update the squelch | |
| 211 | settings based on the current state | |
| 212 | -------------------------------------------------*/ | |
| 213 | ||
| 214 | static void ldv1000_update_squelch(laserdisc_state *ld) | |
| 215 | { | |
| 216 | ldplayer_data *player = ld->player; | |
| 217 | ||
| 218 | switch (ld->state.state) | |
| 219 | { | |
| 220 | /* video on, audio on */ | |
| 221 | case LDSTATE_PLAYING: | |
| 222 | ldcore_set_audio_squelch(ld, player->audio1disable, player->audio2disable); | |
| 223 | ldcore_set_video_squelch(ld, FALSE); | |
| 224 | break; | |
| 225 | ||
| 226 | /* video on, audio off */ | |
| 227 | case LDSTATE_PAUSING: | |
| 228 | case LDSTATE_PAUSED: | |
| 229 | case LDSTATE_PLAYING_SLOW_REVERSE: | |
| 230 | case LDSTATE_PLAYING_SLOW_FORWARD: | |
| 231 | case LDSTATE_PLAYING_FAST_REVERSE: | |
| 232 | case LDSTATE_PLAYING_FAST_FORWARD: | |
| 233 | case LDSTATE_STEPPING_REVERSE: | |
| 234 | case LDSTATE_STEPPING_FORWARD: | |
| 235 | case LDSTATE_SCANNING: | |
| 236 | case LDSTATE_SKIPPING: | |
| 237 | case LDSTATE_WAITING: | |
| 238 | ldcore_set_audio_squelch(ld, TRUE, TRUE); | |
| 239 | ldcore_set_video_squelch(ld, FALSE); | |
| 240 | break; | |
| 241 | ||
| 242 | /* video off, audio off */ | |
| 243 | case LDSTATE_NONE: | |
| 244 | case LDSTATE_EJECTING: | |
| 245 | case LDSTATE_EJECTED: | |
| 246 | case LDSTATE_PARKED: | |
| 247 | case LDSTATE_LOADING: | |
| 248 | case LDSTATE_SPINUP: | |
| 249 | case LDSTATE_SEEKING: | |
| 250 | ldcore_set_audio_squelch(ld, TRUE, TRUE); | |
| 251 | ldcore_set_video_squelch(ld, TRUE); | |
| 252 | break; | |
| 253 | } | |
| 254 | } | |
| 255 | ||
| 256 | ||
| 257 | /*------------------------------------------------- | |
| 258 | ldv1000_switch_state - attempt to switch states | |
| 259 | if appropriate, and ensure the squelch values | |
| 260 | are correct | |
| 261 | -------------------------------------------------*/ | |
| 262 | ||
| 263 | static int ldv1000_switch_state(laserdisc_state *ld, UINT8 newstate, INT32 parameter) | |
| 264 | { | |
| 265 | attotime curtime = timer_get_time(); | |
| 266 | ||
| 267 | /* if this is the same state, ignore */ | |
| 268 | if (ld->state.state == newstate) | |
| 269 | return TRUE; | |
| 270 | ||
| 271 | /* if we're in a timed state, we ignore changes until the time elapses */ | |
| 272 | if (attotime_compare(curtime, ld->state.endtime) < 0) | |
| 273 | return FALSE; | |
| 274 | ||
| 275 | /* if moving to a state that requires it, save the old state */ | |
| 276 | if (requires_state_save(newstate) && !requires_state_save(ld->state.state)) | |
| 277 | ld->savestate = ld->state; | |
| 278 | ||
| 279 | /* set up appropriate squelch and timing */ | |
| 280 | ld->state.state = newstate; | |
| 281 | ld->state.substate = 0; | |
| 282 | ld->state.param = parameter; | |
| 283 | ld->state.endtime = curtime; | |
| 284 | ldv1000_update_squelch(ld); | |
| 285 | ||
| 286 | /* if we're switching to a timed state, set the appropriate timer */ | |
| 287 | switch (ld->state.state) | |
| 288 | { | |
| 289 | case LDSTATE_EJECTING: | |
| 290 | ld->state.endtime = attotime_add(curtime, GENERIC_EJECT_TIME); | |
| 291 | break; | |
| 292 | ||
| 293 | case LDSTATE_LOADING: | |
| 294 | ld->state.endtime = attotime_add(curtime, GENERIC_LOAD_TIME); | |
| 295 | break; | |
| 296 | ||
| 297 | case LDSTATE_SPINUP: | |
| 298 | ld->state.endtime = attotime_add(curtime, GENERIC_SPINUP_TIME); | |
| 299 | break; | |
| 300 | ||
| 301 | case LDSTATE_WAITING: | |
| 302 | ld->state.endtime = attotime_add(curtime, attotime_mul(ATTOTIME_IN_MSEC(100), ld->state.param)); | |
| 303 | break; | |
| 304 | } | |
| 305 | return TRUE; | |
| 306 | } | |
| 307 | ||
| 308 | ||
| 309 | /*------------------------------------------------- | |
| 310 | ldv1000_update - Pioneer PR-8210-specific | |
| 311 | update callback | |
| 312 | -------------------------------------------------*/ | |
| 313 | ||
| 314 | static INT32 ldv1000_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime) | |
| 315 | { | |
| 316 | ldplayer_data *player = ld->player; | |
| 317 | ldplayer_state newstate; | |
| 318 | INT32 advanceby = 0; | |
| 319 | int frame, chapter; | |
| 320 | ||
| 321 | /* remember the last frame and chapter */ | |
| 322 | player->lastvsynctime = curtime; | |
| 323 | frame = frame_from_metadata(vbi); | |
| 324 | if (frame != FRAME_NOT_PRESENT) | |
| 325 | player->lastframe = frame; | |
| 326 | chapter = chapter_from_metadata(vbi); | |
| 327 | if (chapter != CHAPTER_NOT_PRESENT) | |
| 328 | player->lastchapter = chapter; | |
| 329 | ||
| 330 | /* handle things based on the state */ | |
| 331 | switch (ld->state.state) | |
| 332 | { | |
| 333 | case LDSTATE_EJECTING: | |
| 334 | case LDSTATE_EJECTED: | |
| 335 | case LDSTATE_PARKED: | |
| 336 | case LDSTATE_LOADING: | |
| 337 | case LDSTATE_SPINUP: | |
| 338 | case LDSTATE_PAUSING: | |
| 339 | case LDSTATE_PAUSED: | |
| 340 | case LDSTATE_PLAYING: | |
| 341 | case LDSTATE_PLAYING_SLOW_REVERSE: | |
| 342 | case LDSTATE_PLAYING_SLOW_FORWARD: | |
| 343 | case LDSTATE_PLAYING_FAST_REVERSE: | |
| 344 | case LDSTATE_PLAYING_FAST_FORWARD: | |
| 345 | case LDSTATE_STEPPING_REVERSE: | |
| 346 | case LDSTATE_STEPPING_FORWARD: | |
| 347 | case LDSTATE_SCANNING: | |
| 348 | case LDSTATE_SEEKING: | |
| 349 | /* generic behaviors are appropriate for all of these commands */ | |
| 350 | advanceby = ldcore_generic_update(ld, vbi, fieldnum, curtime, &newstate); | |
| 351 | ldv1000_switch_state(ld, newstate.state, newstate.param); | |
| 352 | break; | |
| 353 | ||
| 354 | case LDSTATE_SKIPPING: | |
| 355 | /* just advance and return to previous state */ | |
| 356 | advanceby = ld->state.param; | |
| 357 | ldv1000_switch_state(ld, ld->savestate.state, ld->savestate.param); | |
| 358 | break; | |
| 359 | ||
| 360 | case LDSTATE_WAITING: | |
| 361 | /* keep trying to switch to the previous state until we succeed */ | |
| 362 | ldv1000_switch_state(ld, ld->savestate.state, ld->savestate.param); | |
| 363 | break; | |
| 364 | } | |
| 365 | ||
| 366 | return advanceby; | |
| 367 | } | |
| 368 | ||
| 369 | ||
| 370 | /*------------------------------------------------- | |
| 371 | ldv1000_data_w - write callback when the | |
| 372 | ENTER state is written | |
| 373 | -------------------------------------------------*/ | |
| 374 | ||
| 375 | static void ldv1000_data_w(laserdisc_state *ld, UINT8 prev, UINT8 data) | |
| 376 | { | |
| 377 | ldplayer_data *player = ld->player; | |
| 378 | int target; | |
| 379 | ||
| 380 | /* 0xff bytes are used for synchronization */ | |
| 381 | if (data == 0xff) | |
| 382 | return; | |
| 383 | ||
| 384 | /* handle commands */ | |
| 385 | switch (data) | |
| 386 | { | |
| 387 | case 0x3f: CMDPRINTF(("ldv1000: 0\n")); | |
| 388 | player->parameter = (player->parameter == -1) ? 0 : (player->parameter * 10 + 0); | |
| 389 | return; | |
| 390 | ||
| 391 | case 0x0f: CMDPRINTF(("ldv1000: 1\n")); | |
| 392 | player->parameter = (player->parameter == -1) ? 1 : (player->parameter * 10 + 1); | |
| 393 | return; | |
| 394 | ||
| 395 | case 0x8f: CMDPRINTF(("ldv1000: 2\n")); | |
| 396 | player->parameter = (player->parameter == -1) ? 2 : (player->parameter * 10 + 2); | |
| 397 | return; | |
| 398 | ||
| 399 | case 0x4f: CMDPRINTF(("ldv1000: 3\n")); | |
| 400 | player->parameter = (player->parameter == -1) ? 3 : (player->parameter * 10 + 3); | |
| 401 | return; | |
| 402 | ||
| 403 | case 0x2f: CMDPRINTF(("ldv1000: 4\n")); | |
| 404 | player->parameter = (player->parameter == -1) ? 4 : (player->parameter * 10 + 4); | |
| 405 | return; | |
| 406 | ||
| 407 | case 0xaf: CMDPRINTF(("ldv1000: 5\n")); | |
| 408 | player->parameter = (player->parameter == -1) ? 5 : (player->parameter * 10 + 5); | |
| 409 | return; | |
| 410 | ||
| 411 | case 0x6f: CMDPRINTF(("ldv1000: 6\n")); | |
| 412 | player->parameter = (player->parameter == -1) ? 6 : (player->parameter * 10 + 6); | |
| 413 | return; | |
| 414 | ||
| 415 | case 0x1f: CMDPRINTF(("ldv1000: 7\n")); | |
| 416 | player->parameter = (player->parameter == -1) ? 7 : (player->parameter * 10 + 7); | |
| 417 | return; | |
| 418 | ||
| 419 | case 0x9f: CMDPRINTF(("ldv1000: 8\n")); | |
| 420 | player->parameter = (player->parameter == -1) ? 8 : (player->parameter * 10 + 8); | |
| 421 | return; | |
| 422 | ||
| 423 | case 0x5f: CMDPRINTF(("ldv1000: 9\n")); | |
| 424 | player->parameter = (player->parameter == -1) ? 9 : (player->parameter * 10 + 9); | |
| 425 | return; | |
| 426 | ||
| 427 | case 0x7f: CMDPRINTF(("ldv1000: %d Recall\n", player->parameter)); | |
| 428 | /* set the active register */ | |
| 429 | player->activereg = player->parameter; | |
| 430 | /* should also display the register value */ | |
| 431 | break; | |
| 432 | ||
| 433 | case 0x20: CMDPRINTF(("ldv1000: x0 reverse (stop) - Badlands special\n")); | |
| 434 | ldv1000_switch_state(ld, LDSTATE_PLAYING_FAST_REVERSE, 0); | |
| 435 | break; | |
| 436 | ||
| 437 | case 0x21: CMDPRINTF(("ldv1000: x1/4 reverse - Badlands special\n")); | |
| 438 | ldv1000_switch_state(ld, LDSTATE_PLAYING_SLOW_REVERSE, 4); | |
| 439 | break; | |
| 440 | ||
| 441 | case 0x22: CMDPRINTF(("ldv1000: x1/2 reverse - Badlands special\n")); | |
| 442 | ldv1000_switch_state(ld, LDSTATE_PLAYING_SLOW_REVERSE, 2); | |
| 443 | break; | |
| 444 | ||
| 445 | case 0x23: | |
| 446 | case 0x24: | |
| 447 | case 0x25: | |
| 448 | case 0x26: | |
| 449 | case 0x27: CMDPRINTF(("ldv1000: x%d reverse - Badlands special\n", (data & 0x07) - 2)); | |
| 450 | ldv1000_switch_state(ld, LDSTATE_PLAYING_FAST_REVERSE, (data & 0x07) - 2); | |
| 451 | break; | |
| 452 | ||
| 453 | case 0xa0: CMDPRINTF(("ldv1000: x0 forward (stop)\n")); | |
| 454 | ldv1000_switch_state(ld, LDSTATE_PLAYING_FAST_FORWARD, 0); | |
| 455 | break; | |
| 456 | ||
| 457 | case 0xa1: CMDPRINTF(("ldv1000: x1/4 forward\n")); | |
| 458 | ldv1000_switch_state(ld, LDSTATE_PLAYING_SLOW_FORWARD, 4); | |
| 459 | break; | |
| 460 | ||
| 461 | case 0xa2: CMDPRINTF(("ldv1000: x1/2 forward\n")); | |
| 462 | ldv1000_switch_state(ld, LDSTATE_PLAYING_SLOW_FORWARD, 2); | |
| 463 | break; | |
| 464 | ||
| 465 | case 0xa3: | |
| 466 | case 0xa4: | |
| 467 | case 0xa5: | |
| 468 | case 0xa6: | |
| 469 | case 0xa7: CMDPRINTF(("ldv1000: x%d forward\n", (data & 0x07) - 2)); | |
| 470 | ldv1000_switch_state(ld, LDSTATE_PLAYING_FAST_FORWARD, (data & 0x07) - 2); | |
| 471 | break; | |
| 472 | ||
| 473 | case 0xb1: | |
| 474 | case 0xb2: | |
| 475 | case 0xb3: | |
| 476 | case 0xb4: | |
| 477 | case 0xb5: | |
| 478 | case 0xb6: | |
| 479 | case 0xb7: | |
| 480 | case 0xb8: | |
| 481 | case 0xb9: | |
| 482 | case 0xba: CMDPRINTF(("ldv1000: Skip forward %d0\n", data & 0x0f)); | |
| 483 | /* note that this skips tracks, not frames */ | |
| 484 | ldv1000_switch_state(ld, LDSTATE_SKIPPING, 10 * (data & 0x0f)); | |
| 485 | break; | |
| 486 | ||
| 487 | case 0x31: | |
| 488 | case 0x32: | |
| 489 | case 0x33: | |
| 490 | case 0x34: | |
| 491 | case 0x35: | |
| 492 | case 0x36: | |
| 493 | case 0x37: | |
| 494 | case 0x38: | |
| 495 | case 0x39: | |
| 496 | case 0x3a: CMDPRINTF(("ldv1000: Skip backwards %d0 - Badlands special\n", data & 0x0f)); | |
| 497 | /* note that this skips tracks, not frames */ | |
| 498 | ldv1000_switch_state(ld, LDSTATE_SKIPPING, -10 * (data & 0x0f)); | |
| 499 | break; | |
| 500 | ||
| 501 | case 0xbf: CMDPRINTF(("ldv1000: %d Clear\n", player->parameter)); | |
| 502 | /* clears register display and removes pending arguments */ | |
| 503 | player->parameter = -1; | |
| 504 | break; | |
| 505 | ||
| 506 | case 0xc2: CMDPRINTF(("ldv1000: Get frame no.\n")); | |
| 507 | /* returns the current frame number */ | |
| 508 | player->mode = LDV1000_MODE_GET_FRAME; | |
| 509 | player->readpos = 0; | |
| 510 | player->readtotal = 5; | |
| 511 | sprintf((char *)player->readbuf, "%05d", player->lastframe); | |
| 512 | break; | |
| 513 | ||
| 514 | case 0xc3: CMDPRINTF(("ldv1000: Get 2nd display\n")); | |
| 515 | /* returns the data from the 2nd display line */ | |
| 516 | player->mode = LDV1000_MODE_GET_2ND; | |
| 517 | player->readpos = 0; | |
| 518 | player->readtotal = 8; | |
| 519 | sprintf((char *)player->readbuf, " \x1c\x1c\x1c"); | |
| 520 | break; | |
| 521 | ||
| 522 | case 0xc4: CMDPRINTF(("ldv1000: Get 1st display\n")); | |
| 523 | /* returns the data from the 1st display line */ | |
| 524 | player->mode = LDV1000_MODE_GET_1ST; | |
| 525 | player->readpos = 0; | |
| 526 | player->readtotal = 8; | |
| 527 | sprintf((char *)player->readbuf, " \x1c\x1c\x1c"); | |
| 528 | break; | |
| 529 | ||
| 530 | case 0xc8: CMDPRINTF(("ldv1000: Transfer memory\n")); | |
| 531 | /* returns the data from RAM */ | |
| 532 | player->mode = LDV1000_MODE_GET_RAM; | |
| 533 | player->readpos = 0; | |
| 534 | player->readtotal = 1024; | |
| 535 | break; | |
| 536 | ||
| 537 | case 0xcc: CMDPRINTF(("ldv1000: Load\n")); | |
| 538 | /* load program from disc -- not implemented */ | |
| 539 | break; | |
| 540 | ||
| 541 | case 0xcd: CMDPRINTF(("ldv1000: Display disable\n")); | |
| 542 | /* disables the display of current command -- not implemented */ | |
| 543 | break; | |
| 544 | ||
| 545 | case 0xce: CMDPRINTF(("ldv1000: Display enable\n")); | |
| 546 | /* enables the display of current command -- not implemented */ | |
| 547 | break; | |
| 548 | ||
| 549 | case 0xf0: CMDPRINTF(("ldv1000: Scan forward\n")); | |
| 550 | if (ld->state.state != LDSTATE_SCANNING) | |
| 551 | ldv1000_switch_state(ld, LDSTATE_SCANNING, SCANNING_PARAM(LDV1000_SCAN_SPEED, LDV1000_SCAN_DURATION)); | |
| 552 | else | |
| 553 | ld->state.substate = 0; | |
| 554 | break; | |
| 555 | ||
| 556 | case 0xf1: CMDPRINTF(("ldv1000: %d Display\n", player->parameter)); | |
| 557 | player->framedisplay = (player->parameter == -1) ? !player->framedisplay : (player->parameter & 1); | |
| 558 | break; | |
| 559 | ||
| 560 | case 0xf3: CMDPRINTF(("ldv1000: %d Autostop\n", player->parameter)); | |
| 561 | target = (player->parameter != -1) ? player->parameter : read_16bits_from_ram_be(player->ram, (player->activereg++ * 2) % 1024); | |
| 562 | if (target > player->lastframe) | |
| 563 | ldv1000_switch_state(ld, LDSTATE_PLAYING, target); | |
| 564 | else | |
| 565 | ldv1000_switch_state(ld, LDSTATE_SEEKING, target); | |
| 566 | break; | |
| 567 | ||
| 568 | case 0xf4: CMDPRINTF(("ldv1000: %d Audio track 1\n", player->parameter)); | |
| 569 | if (player->parameter == -1) | |
| 570 | player->audio1disable ^= 1; | |
| 571 | else | |
| 572 | player->audio1disable = ~player->parameter & 1; | |
| 573 | break; | |
| 574 | ||
| 575 | case 0xf5: CMDPRINTF(("ldv1000: %d Store\n", player->parameter)); | |
| 576 | /* store either the current frame number or an explicit value into the active register */ | |
| 577 | if (player->parameter == -1) | |
| 578 | write_16bits_to_ram_be(player->ram, (player->activereg * 2) % 1024, player->lastframe); | |
| 579 | else | |
| 580 | write_16bits_to_ram_be(player->ram, (player->activereg * 2) % 1024, player->parameter); | |
| 581 | player->activereg++; | |
| 582 | break; | |
| 583 | ||
| 584 | case 0xf6: CMDPRINTF(("ldv1000: Step forward\n")); | |
| 585 | ldv1000_switch_state(ld, LDSTATE_STEPPING_FORWARD, 0); | |
| 586 | break; | |
| 587 | ||
| 588 | case 0xf7: CMDPRINTF(("ldv1000: %d Search\n", player->parameter)); | |
| 589 | target = (player->parameter != -1) ? player->parameter : read_16bits_from_ram_be(player->ram, (player->activereg * 2) % 1024); | |
| 590 | player->activereg++; | |
| 591 | ldv1000_switch_state(ld, LDSTATE_SEEKING, target); | |
| 592 | break; | |
| 593 | ||
| 594 | case 0xf8: CMDPRINTF(("ldv1000: Scan reverse\n")); | |
| 595 | if (ld->state.state != LDSTATE_SCANNING) | |
| 596 | ldv1000_switch_state(ld, LDSTATE_SCANNING, SCANNING_PARAM(-LDV1000_SCAN_SPEED, LDV1000_SCAN_DURATION)); | |
| 597 | else | |
| 598 | ld->state.substate = 0; | |
| 599 | break; | |
| 600 | ||
| 601 | case 0xf9: CMDPRINTF(("ldv1000: Reject\n")); | |
| 602 | ldv1000_switch_state(ld, LDSTATE_EJECTING, 0); | |
| 603 | break; | |
| 604 | ||
| 605 | case 0xfb: CMDPRINTF(("ldv1000: %d Stop/Wait\n", player->parameter)); | |
| 606 | ldv1000_switch_state(ld, LDSTATE_WAITING, player->parameter); | |
| 607 | break; | |
| 608 | ||
| 609 | case 0xfc: CMDPRINTF(("ldv1000: %d Audio track 2\n", player->parameter)); | |
| 610 | if (player->parameter == -1) | |
| 611 | player->audio2disable ^= 1; | |
| 612 | else | |
| 613 | player->audio2disable = ~player->parameter & 1; | |
| 614 | break; | |
| 615 | ||
| 616 | case 0xfd: CMDPRINTF(("ldv1000: Play\n")); | |
| 617 | if (ld->state.state == LDSTATE_EJECTED) | |
| 618 | ldv1000_switch_state(ld, LDSTATE_LOADING, 0); | |
| 619 | else if (ld->state.state == LDSTATE_PARKED) | |
| 620 | ldv1000_switch_state(ld, LDSTATE_SPINUP, 0); | |
| 621 | else | |
| 622 | ldv1000_switch_state(ld, LDSTATE_PLAYING, -1); | |
| 623 | break; | |
| 624 | ||
| 625 | case 0xfe: CMDPRINTF(("ldv1000: Step reverse\n")); | |
| 626 | ldv1000_switch_state(ld, LDSTATE_STEPPING_REVERSE, 0); | |
| 627 | break; | |
| 628 | ||
| 629 | default: CMDPRINTF(("ldv1000: %d Unknown command %02X\n", player->parameter, data)); | |
| 630 | /* unknown command */ | |
| 631 | break; | |
| 632 | } | |
| 633 | ||
| 634 | /* reset the parameter after executing a command */ | |
| 635 | player->parameter = -1; | |
| 636 | } | |
| 637 | ||
| 638 | ||
| 639 | /*------------------------------------------------- | |
| 640 | ldv1000_status_strobe_r - return state of the | |
| 641 | status strobe | |
| 642 | -------------------------------------------------*/ | |
| 643 | ||
| 644 | static UINT8 ldv1000_status_strobe_r(laserdisc_state *ld) | |
| 645 | { | |
| 646 | ldplayer_data *player = ld->player; | |
| 647 | ||
| 648 | /* the status strobe is asserted (active low) 500-650usec after VSYNC */ | |
| 649 | /* for a duration of 26usec; we pick 600-626usec */ | |
| 650 | attotime delta = attotime_sub(timer_get_time(), player->lastvsynctime); | |
| 651 | if (delta.attoseconds >= ATTOTIME_IN_USEC(600).attoseconds && delta.attoseconds < ATTOTIME_IN_USEC(626).attoseconds) | |
| 652 | return ASSERT_LINE; | |
| 653 | ||
| 654 | return CLEAR_LINE; | |
| 655 | } | |
| 656 | ||
| 657 | ||
| 658 | /*------------------------------------------------- | |
| 659 | ldv1000_command_strobe_r - return state of the | |
| 660 | command strobe | |
| 661 | -------------------------------------------------*/ | |
| 662 | ||
| 663 | static UINT8 ldv1000_command_strobe_r(laserdisc_state *ld) | |
| 664 | { | |
| 665 | ldplayer_data *player = ld->player; | |
| 666 | ||
| 667 | /* the command strobe is asserted (active low) 54 or 84usec after the status */ | |
| 668 | /* strobe for a duration of 25usec; we pick 600+84 = 684-709usec */ | |
| 669 | /* for a duration of 26usec; we pick 600-626usec */ | |
| 670 | attotime delta = attotime_sub(timer_get_time(), player->lastvsynctime); | |
| 671 | if (delta.attoseconds >= ATTOTIME_IN_USEC(684).attoseconds && delta.attoseconds < ATTOTIME_IN_USEC(709).attoseconds) | |
| 672 | return ASSERT_LINE; | |
| 673 | ||
| 674 | return CLEAR_LINE; | |
| 675 | } | |
| 676 | ||
| 677 | ||
| 678 | /*------------------------------------------------- | |
| 679 | ldv1000_status_r - return state of the ready | |
| 680 | line | |
| 681 | -------------------------------------------------*/ | |
| 682 | ||
| 683 | static UINT8 ldv1000_status_r(laserdisc_state *ld) | |
| 684 | { | |
| 685 | ldplayer_data *player = ld->player; | |
| 686 | UINT8 status = 0xff; | |
| 687 | ||
| 688 | /* switch off the current mode */ | |
| 689 | switch (player->mode) | |
| 690 | { | |
| 691 | /* reading frame number returns 5 characters */ | |
| 692 | /* reading display lines returns 8 characters */ | |
| 693 | case LDV1000_MODE_GET_FRAME: | |
| 694 | case LDV1000_MODE_GET_1ST: | |
| 695 | case LDV1000_MODE_GET_2ND: | |
| 696 | assert(player->readpos < player->readtotal); | |
| 697 | status = player->readbuf[player->readpos++]; | |
| 698 | if (player->readpos == player->readtotal) | |
| 699 | player->mode = LDV1000_MODE_STATUS; | |
| 700 | break; | |
| 701 | ||
| 702 | /* reading RAM returns 1024 bytes */ | |
| 703 | case LDV1000_MODE_GET_RAM: | |
| 704 | assert(player->readpos < player->readtotal); | |
| 705 | status = player->ram[1023 - player->readpos++]; | |
| 706 | if (player->readpos == player->readtotal) | |
| 707 | player->mode = LDV1000_MODE_STATUS; | |
| 708 | break; | |
| 709 | ||
| 710 | /* otherwise, we just compute a status code */ | |
| 711 | default: | |
| 712 | case LDV1000_MODE_STATUS: | |
| 713 | switch (ld->state.state) | |
| 714 | { | |
| 715 | case LDSTATE_EJECTING: status = 0x60; break; | |
| 716 | case LDSTATE_EJECTED: status = 0xe0; break; | |
| 717 | case LDSTATE_PARKED: status = 0xfc; break; | |
| 718 | case LDSTATE_LOADING: status = 0x48; break; | |
| 719 | case LDSTATE_SPINUP: status = 0x48; break; | |
| 720 | case LDSTATE_PAUSING: status = 0xe5; break; | |
| 721 | case LDSTATE_PAUSED: status = 0xe5; break; | |
| 722 | case LDSTATE_PLAYING: status = 0xe4; break; | |
| 723 | case LDSTATE_PLAYING_SLOW_REVERSE: status = 0xae; break; | |
| 724 | case LDSTATE_PLAYING_SLOW_FORWARD: status = 0xae; break; | |
| 725 | case LDSTATE_PLAYING_FAST_REVERSE: status = 0xae; break; | |
| 726 | case LDSTATE_PLAYING_FAST_FORWARD: status = 0xae; break; | |
| 727 | case LDSTATE_STEPPING_FORWARD: status = 0xe5; break; | |
| 728 | case LDSTATE_STEPPING_REVERSE: status = 0xe5; break; | |
| 729 | case LDSTATE_SCANNING: status = 0x4c; break; | |
| 730 | case LDSTATE_SEEKING: status = 0x50; break; | |
| 731 | // case LASERDISC_SEARCH_FINISHED: status = 0xd0; break; | |
| 732 | // case LASERDISC_AUTOSTOPPED: status = 0x54; break; | |
| 733 | default: | |
| 734 | fatalerror("Unexpected disc state in ldv1000_status_r\n"); | |
| 735 | break; | |
| 736 | } | |
| 737 | break; | |
| 738 | } | |
| 739 | ||
| 740 | /* bit 7 indicates our busy status */ | |
| 741 | return status; | |
| 742 | } |
| r3171 | r3172 | |
|---|---|---|
| 90 | 90 | UINT16 eindex; |
| 91 | 91 | UINT8 edata[0x2000]; |
| 92 | 92 | |
| 93 | int updated; /* update ended interrupt flag */ | |
| 94 | ||
| 93 | 95 | attotime last_refresh; |
| 94 | 96 | }; |
| 95 | 97 | |
| r3171 | r3172 | |
| 189 | 191 | } |
| 190 | 192 | } |
| 191 | 193 | } |
| 192 | ||
| 194 | mc146818->updated = 1; /* clock has been updated */ | |
| 193 | 195 | mc146818->last_refresh = timer_get_time(); |
| 194 | 196 | } |
| 195 | 197 | |
| r3171 | r3172 | |
| 324 | 326 | #endif |
| 325 | 327 | break; |
| 326 | 328 | |
| 329 | case 0xc: | |
| 330 | if(mc146818->updated != 0) /* the clock has been updated */ | |
| 331 | data = 0x10; | |
| 332 | else | |
| 333 | data = 0x00; | |
| 334 | break; | |
| 327 | 335 | case 0xd: |
| 328 | 336 | /* battery ok */ |
| 329 | 337 | data = mc146818->data[mc146818->index % MC146818_DATA_SIZE] | 0x80; |
| r3171 | r3172 | |
| 354 | 362 | break; |
| 355 | 363 | |
| 356 | 364 | case 1: |
| 357 | mc146818->data[mc146818->index % MC146818_DATA_SIZE] = data; | |
| 365 | switch(mc146818->index % MC146818_DATA_SIZE) | |
| 366 | { | |
| 367 | case 0x0b: | |
| 368 | if(data & 0x80) | |
| 369 | mc146818->updated = 0; | |
| 370 | mc146818->data[mc146818->index % MC146818_DATA_SIZE] = data; | |
| 371 | break; | |
| 372 | default: | |
| 373 | mc146818->data[mc146818->index % MC146818_DATA_SIZE] = data; | |
| 374 | } | |
| 358 | 375 | break; |
| 359 | 376 | } |
| 360 | 377 | } |
| r0 | r3172 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | SNK Wave sound driver. | |
| 4 | ||
| 5 | This is a very simple single-voice generator with a programmable waveform. | |
| 6 | ||
| 7 | ***************************************************************************/ | |
| 8 | ||
| 9 | #include "sndintrf.h" | |
| 10 | #include "streams.h" | |
| 11 | #include "snkwave.h" | |
| 12 | ||
| 13 | ||
| 14 | #define WAVEFORM_LENGTH 16 | |
| 15 | ||
| 16 | #define CLOCK_SHIFT 8 | |
| 17 | ||
| 18 | ||
| 19 | struct snkwave_sound | |
| 20 | { | |
| 21 | /* global sound parameters */ | |
| 22 | sound_stream * stream; | |
| 23 | int external_clock; | |
| 24 | int sample_rate; | |
| 25 | ||
| 26 | /* data about the sound system */ | |
| 27 | UINT32 frequency; | |
| 28 | UINT32 counter; | |
| 29 | int waveform_position; | |
| 30 | ||
| 31 | /* decoded waveform table */ | |
| 32 | INT16 waveform[WAVEFORM_LENGTH]; | |
| 33 | }; | |
| 34 | ||
| 35 | ||
| 36 | /* update the decoded waveform data */ | |
| 37 | /* The programmable waveform consists of 8 3-bit nibbles. | |
| 38 | The waveform goes to a 4-bit DAC and is played alternatingly forwards and | |
| 39 | backwards. | |
| 40 | When going forwards, bit 3 is 1. When going backwards, it's 0. | |
| 41 | So the sequence 01234567 will play as | |
| 42 | 89ABCDEF76543210 | |
| 43 | */ | |
| 44 | static void update_waveform(struct snkwave_sound *chip, unsigned int offset, UINT8 data) | |
| 45 | { | |
| 46 | assert(offset < WAVEFORM_LENGTH/4); | |
| 47 | ||
| 48 | chip->waveform[offset * 2] = ((data & 0x38) >> 3) << (12-CLOCK_SHIFT); | |
| 49 | chip->waveform[offset * 2 + 1] = ((data & 0x07) >> 0) << (12-CLOCK_SHIFT); | |
| 50 | chip->waveform[WAVEFORM_LENGTH-2 - offset * 2] = ~chip->waveform[offset * 2 + 1]; | |
| 51 | chip->waveform[WAVEFORM_LENGTH-1 - offset * 2] = ~chip->waveform[offset * 2]; | |
| 52 | } | |
| 53 | ||
| 54 | ||
| 55 | /* generate sound to the mix buffer */ | |
| 56 | static void snkwave_update(void *param, stream_sample_t **inputs, stream_sample_t **_buffer, int length) | |
| 57 | { | |
| 58 | struct snkwave_sound *chip = param; | |
| 59 | stream_sample_t *buffer = _buffer[0]; | |
| 60 | ||
| 61 | /* zap the contents of the buffer */ | |
| 62 | memset(buffer, 0, length * sizeof(*buffer)); | |
| 63 | ||
| 64 | assert(chip->counter < 0x1000); | |
| 65 | assert(chip->frequency < 0x1000); | |
| 66 | ||
| 67 | /* if no sound, we're done */ | |
| 68 | if (chip->frequency == 0xfff) | |
| 69 | return; | |
| 70 | ||
| 71 | /* generate sound into buffer while updating the counter */ | |
| 72 | while (length-- > 0) | |
| 73 | { | |
| 74 | int loops; | |
| 75 | INT16 out = 0; | |
| 76 | ||
| 77 | loops = 1 << CLOCK_SHIFT; | |
| 78 | while (loops > 0) | |
| 79 | { | |
| 80 | int steps = 0x1000 - chip->counter; | |
| 81 | ||
| 82 | if (steps <= loops) | |
| 83 | { | |
| 84 | out += chip->waveform[chip->waveform_position] * steps; | |
| 85 | chip->counter = chip->frequency; | |
| 86 | chip->waveform_position = (chip->waveform_position + 1) & (WAVEFORM_LENGTH-1); | |
| 87 | loops -= steps; | |
| 88 | } | |
| 89 | else | |
| 90 | { | |
| 91 | out += chip->waveform[chip->waveform_position] * loops; | |
| 92 | chip->counter += loops; | |
| 93 | loops = 0; | |
| 94 | } | |
| 95 | } | |
| 96 | ||
| 97 | *buffer++ = out; | |
| 98 | } | |
| 99 | } | |
| 100 | ||
| 101 | ||
| 102 | static void *snkwave_start(const char *tag, int sndindex, int clock, const void *config) | |
| 103 | { | |
| 104 | struct snkwave_sound *chip; | |
| 105 | ||
| 106 | assert(config == 0); | |
| 107 | ||
| 108 | chip = auto_malloc(sizeof(*chip)); | |
| 109 | memset(chip, 0, sizeof(*chip)); | |
| 110 | ||
| 111 | /* adjust internal clock */ | |
| 112 | chip->external_clock = clock; | |
| 113 | ||
| 114 | /* adjust output clock */ | |
| 115 | chip->sample_rate = chip->external_clock >> CLOCK_SHIFT; | |
| 116 | ||
| 117 | /* get stream channels */ | |
| 118 | chip->stream = stream_create(0, 1, chip->sample_rate, chip, snkwave_update); | |
| 119 | ||
| 120 | /* reset all the voices */ | |
| 121 | chip->frequency = 0; | |
| 122 | chip->counter = 0; | |
| 123 | chip->waveform_position = 0; | |
| 124 | ||
| 125 | /* register with the save state system */ | |
| 126 | state_save_register_item("snkwave", sndindex, chip->frequency); | |
| 127 | state_save_register_item("snkwave", sndindex, chip->counter); | |
| 128 | state_save_register_item("snkwave", sndindex, chip->waveform_position); | |
| 129 | state_save_register_item_pointer("snkwave", sndindex, chip->waveform, WAVEFORM_LENGTH); | |
| 130 | ||
| 131 | return chip; | |
| 132 | } | |
| 133 | ||
| 134 | ||
| 135 | /********************************************************************************/ | |
| 136 | ||
| 137 | /* SNK wave register map | |
| 138 | all registers are 6-bit | |
| 139 | 0-1 frequency (12-bit) | |
| 140 | 2-5 waveform (8 3-bit nibbles) | |
| 141 | */ | |
| 142 | ||
| 143 | WRITE8_HANDLER( snkwave_w ) | |
| 144 | { | |
| 145 | struct snkwave_sound *chip = sndti_token(SOUND_SNKWAVE, 0); | |
| 146 | ||
| 147 | stream_update(chip->stream); | |
| 148 | ||
| 149 | // all registers are 6-bit | |
| 150 | data &= 0x3f; | |
| 151 | ||
| 152 | if (offset == 0) | |
| 153 | chip->frequency = (chip->frequency & 0x03f) | (data << 6); | |
| 154 | else if (offset == 1) | |
| 155 | chip->frequency = (chip->frequency & 0xfc0) | data; | |
| 156 | else if (offset <= 5) | |
| 157 | update_waveform(chip, offset - 2, data); | |
| 158 | } | |
| 159 | ||
| 160 | ||
| 161 | ||
| 162 | /************************************************************************** | |
| 163 | * Generic get_info | |
| 164 | **************************************************************************/ | |
| 165 | ||
| 166 | static void snkwave_set_info(void *token, UINT32 state, sndinfo *info) | |
| 167 | { | |
| 168 | switch (state) | |
| 169 | { | |
| 170 | /* no parameters to set */ | |
| 171 | } | |
| 172 | } | |
| 173 | ||
| 174 | ||
| 175 | void snkwave_get_info(void *token, UINT32 state, sndinfo *info) | |
| 176 | { | |
| 177 | switch (state) | |
| 178 | { | |
| 179 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 180 | ||
| 181 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 182 | case SNDINFO_PTR_SET_INFO: info->set_info = snkwave_set_info; break; | |
| 183 | case SNDINFO_PTR_START: info->start = snkwave_start; break; | |
| 184 | case SNDINFO_PTR_STOP: /* Nothing */ break; | |
| 185 | case SNDINFO_PTR_RESET: /* Nothing */ break; | |
| 186 | ||
| 187 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 188 | case SNDINFO_STR_NAME: info->s = "SNK Wave"; break; | |
| 189 | case SNDINFO_STR_CORE_FAMILY: info->s = "SNK Wave"; break; | |
| 190 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; | |
| 191 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; | |
| 192 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 193 | } | |
| 194 | } |
| r0 | r3172 | |
|---|---|---|
| 1 | #pragma once | |
| 2 | ||
| 3 | #ifndef __SNKWAVE_H__ | |
| 4 | #define __SNKWAVE_H__ | |
| 5 | ||
| 6 | WRITE8_HANDLER( snkwave_w ); | |
| 7 | ||
| 8 | #endif /* __SNKWAVE_H__ */ | |
| 9 |
| r3171 | r3172 | |
|---|---|---|
| 70 | 70 | { |
| 71 | 71 | int type; |
| 72 | 72 | int size; |
| 73 | int | |
| 73 | int | |
| 74 | 74 | double r_total; |
| 75 | 75 | double *r_node[DISC_MIXER_MAX_INPS]; /* Either pointer to resistance node output OR NULL */ |
| 76 | 76 | double exponent_rc[DISC_MIXER_MAX_INPS]; /* For high pass filtering cause by cIn */ |
| r3171 | r3172 | |
| 270 | 270 | * Mar 2004, D Renaud. |
| 271 | 271 | ************************************************************************/ |
| 272 | 272 | #define DST_DAC_R1__ENABLE (*(node->input[0])) |
| 273 | #define DST_DAC_R1__DATA ( | |
| 273 | #define DST_DAC_R1__DATA ( | |
| 274 | 274 | #define DST_DAC_R1__VON (*(node->input[2])) |
| 275 | 275 | |
| 276 | 276 | static void dst_dac_r1_step(node_description *node) |
| r3171 | r3172 | |
| 283 | 283 | |
| 284 | 284 | i_total = context->i_bias; |
| 285 | 285 | |
| 286 | data = (int)DST_DAC_R1__DATA; | |
| 286 | data = (int)DST_DAC_R1__DATA; | |
| 287 | 287 | x_time = DST_DAC_R1__DATA - data; |
| 288 | 288 | |
| 289 | 289 | if (DST_DAC_R1__ENABLE) |
| r3171 | r3172 | |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | v = i_total * context->r_total; |
| 318 | context->last_data = data; | |
| 318 | 319 | |
| 319 | 320 | /* Filter if needed, else just output voltage */ |
| 320 | 321 | node->output[0] = info->cFilter ? node->output[0] + ((v - node->output[0]) * context->exponent) : v; |
| r3171 | r3172 | |
| 365 | 366 | context->r_total = 0; |
| 366 | 367 | for(bit = 0; bit < info->ladderLength; bit++) |
| 367 | 368 | { |
| 368 | if (info->r[bit]) | |
| 369 | if (info->r[bit] != 0) | |
| 369 | 370 | context->r_total += 1.0 / info->r[bit]; |
| 370 | 371 | } |
| 371 | 372 | if (info->rBias) context->r_total += 1.0 / info->rBias; |
| r3171 | r3172 | |
| 394 | 395 | * |
| 395 | 396 | * Dec 2004, D Renaud. |
| 396 | 397 | ************************************************************************/ |
| 397 | #define DST_DIODE_MIX__ENABLE (*(node->input[0])) | |
| 398 | #define DST_DIODE_MIX__VJUNC (*(node->input[1])) | |
| 399 | #define DST_DIODE_MIX__INP(addr) (*(node->input[2 + addr])) | |
| 398 | #define DST_DIODE_MIX__VJUNC (*(node->input[0])) | |
| 399 | #define DST_DIODE_MIX_INP_OFFSET 1 | |
| 400 | #define DST_DIODE_MIX__INP(addr) (*(node->input[DST_DIODE_MIX_INP_OFFSET + addr])) | |
| 400 | 401 | |
| 401 | 402 | static void dst_diode_mix_step(node_description *node) |
| 402 | 403 | { |
| r3171 | r3172 | |
| 405 | 406 | double max = 0; |
| 406 | 407 | int addr; |
| 407 | 408 | |
| 408 | | |
| 409 | | |
| 409 | 410 | { |
| 410 | for (addr = 0; addr < context->size; addr++) | |
| 411 | { | |
| 412 | if (DST_DIODE_MIX__INP(addr) > max) max = DST_DIODE_MIX__INP(addr); | |
| 413 | } | |
| 414 | node->output[0] = max - DST_DIODE_MIX__VJUNC; | |
| 415 | if (node->output[0] < 0) node->output[0] = 0; | |
| 411 | if (DST_DIODE_MIX__INP(addr) > max) max = DST_DIODE_MIX__INP(addr); | |
| 416 | 412 | } |
| 417 | else | |
| 418 | { | |
| 419 | node->output[0] = 0; | |
| 420 | } | |
| 413 | node->output[0] = max - DST_DIODE_MIX__VJUNC; | |
| 414 | if (node->output[0] < 0) node->output[0] = 0; | |
| 421 | 415 | } |
| 422 | 416 | |
| 423 | 417 | static void dst_diode_mix_reset(node_description *node) |
| 424 | 418 | { |
| 425 | 419 | struct dst_size_context *context = node->context; |
| 426 | 420 | |
| 427 | context->size = node->active_inputs - | |
| 421 | context->size = node->active_inputs - DST_DIODE_MIX_INP_OFFSET; | |
| 428 | 422 | |
| 429 | 423 | dst_diode_mix_step(node); |
| 430 | 424 | } |
| r3171 | r3172 | |
| 1000 | 994 | double i = 0; /* total current of inputs */ |
| 1001 | 995 | int bit, connected; |
| 1002 | 996 | |
| 997 | /* put commonly used stuff in local variables for speed */ | |
| 998 | double value; | |
| 999 | double dt = discrete_current_context->sample_rate; | |
| 1000 | int r_node_bit_flag = context->r_node_bit_flag; | |
| 1001 | int has_rF = (info->rF != 0); | |
| 1002 | int type = context->type; | |
| 1003 | double v_ref = info->vRef; | |
| 1004 | double rI = info->rI; | |
| 1005 | ||
| 1003 | 1006 | if (DST_MIXER__ENABLE) |
| 1004 | 1007 | { |
| 1005 | 1008 | r_total = context->r_total; |
| 1006 | 1009 | |
| 1007 | if (context-> | |
| 1010 | if (context-> | |
| 1008 | 1011 | { |
| 1009 | 1012 | /* loop and do any high pass filtering for connected caps */ |
| 1010 | 1013 | /* but first see if there is an r_node for the current path */ |
| r3171 | r3172 | |
| 1015 | 1018 | connected = 1; |
| 1016 | 1019 | vTemp = DST_MIXER__IN(bit); |
| 1017 | 1020 | |
| 1018 | if ( | |
| 1021 | if ( | |
| 1019 | 1022 | { |
| 1020 | /* a node has the posibility of being disconnected from the circuit. */ | |
| 1021 | if (*context->r_node[bit] == 0) | |
| 1023 | /* a node has the possibility of being disconnected from the circuit. */ | |
| 1024 | value = *context->r_node[bit]; | |
| 1025 | if (value == 0) | |
| 1022 | 1026 | connected = 0; |
| 1023 | 1027 | else |
| 1024 | 1028 | { |
| 1025 | rTemp += *context->r_node[bit]; | |
| 1029 | /* value currently holds resistance */ | |
| 1030 | rTemp += value; | |
| 1026 | 1031 | r_total += 1.0 / rTemp; |
| 1027 | if (info->c[bit] != 0) | |
| 1032 | value = info->c[bit]; | |
| 1033 | if (value != 0) | |
| 1028 | 1034 | { |
| 1029 | switch ( | |
| 1035 | switch ( | |
| 1030 | 1036 | { |
| 1031 | 1037 | case DISC_MIXER_IS_RESISTOR: |
| 1032 | 1038 | /* is there an rF? */ |
| 1033 | if ( | |
| 1039 | if (has_ | |
| 1034 | 1040 | { |
| 1035 | rTemp2 = | |
| 1041 | rTemp2 = RES_2_PARALLEL( | |
| 1036 | 1042 | break; |
| 1037 | 1043 | } |
| 1038 | 1044 | /* else, fall through and just use the resistor value */ |
| r3171 | r3172 | |
| 1040 | 1046 | rTemp2 = rTemp; |
| 1041 | 1047 | break; |
| 1042 | 1048 | case DISC_MIXER_IS_OP_AMP_WITH_RI: |
| 1043 | rTemp2 = rTemp + | |
| 1049 | rTemp2 = rTemp + | |
| 1044 | 1050 | break; |
| 1045 | 1051 | } |
| 1046 | 1052 | /* Re-calculate exponent if resistor is a node */ |
| 1047 | context->exponent_rc[bit] = -1.0 / (rTemp2 * info->c[bit] * discrete_current_context->sample_rate); | |
| 1048 | context->exponent_rc[bit] = 1.0 - exp(context->exponent_rc[bit]); | |
| 1053 | /* value currently holds capacitance */ | |
| 1054 | context->exponent_rc[bit] = 1.0 - exp(-1.0 / (rTemp2 * value * dt)); | |
| 1049 | 1055 | } |
| 1050 | 1056 | } |
| 1051 | 1057 | } |
| r3171 | r3172 | |
| 1055 | 1061 | if (info->c[bit] != 0) |
| 1056 | 1062 | { |
| 1057 | 1063 | /* do input high pass filtering if needed. */ |
| 1058 | context->v_cap[bit] += (vTemp - | |
| 1064 | context->v_cap[bit] += (vTemp - | |
| 1059 | 1065 | vTemp -= context->v_cap[bit]; |
| 1060 | 1066 | } |
| 1061 | i += (( | |
| 1067 | i += (( | |
| 1062 | 1068 | } |
| 1063 | 1069 | } |
| 1064 | 1070 | } |
| r3171 | r3172 | |
| 1067 | 1073 | /* no r_nodes, so just do high pass filtering */ |
| 1068 | 1074 | for (bit = 0; bit < context->size; bit++) |
| 1069 | 1075 | { |
| 1070 | rTemp = info->r[bit]; | |
| 1071 | 1076 | vTemp = DST_MIXER__IN(bit); |
| 1072 | 1077 | |
| 1073 | 1078 | if (info->c[bit] != 0) |
| 1074 | 1079 | { |
| 1075 | 1080 | /* do input high pass filtering if needed. */ |
| 1076 | context->v_cap[bit] += (vTemp - | |
| 1081 | context->v_cap[bit] += (vTemp - | |
| 1077 | 1082 | vTemp -= context->v_cap[bit]; |
| 1078 | 1083 | } |
| 1079 | i += (( | |
| 1084 | i += (( | |
| 1080 | 1085 | } |
| 1081 | 1086 | } |
| 1082 | 1087 | |
| 1083 | if (context->type == DISC_MIXER_IS_OP_AMP_WITH_RI) | |
| 1084 | i += info->vRef / info->rI; | |
| 1088 | if (type == DISC_MIXER_IS_OP_AMP_WITH_RI) | |
| 1089 | i += v_ref / rI; | |
| 1085 | 1090 | |
| 1086 | 1091 | r_total = 1.0 / r_total; |
| 1087 | 1092 | |
| 1088 | 1093 | /* If resistor network or has rI then Millman is used. |
| 1089 | 1094 | * If op-amp then summing formula is used. */ |
| 1090 | v = i * (( | |
| 1095 | v = i * (( | |
| 1091 | 1096 | |
| 1092 | if (context->type == DISC_MIXER_IS_OP_AMP_WITH_RI) | |
| 1093 | v = info->vRef + (context->gain * (info->vRef - v)); | |
| 1097 | if (type == DISC_MIXER_IS_OP_AMP_WITH_RI) | |
| 1098 | v = v_ref + (context->gain * (v_ref - v)); | |
| 1094 | 1099 | |
| 1095 | 1100 | /* Do the low pass filtering for cF */ |
| 1096 | 1101 | if (info->cF != 0) |
| 1097 | 1102 | { |
| 1098 | if ( | |
| 1103 | if ( | |
| 1099 | 1104 | { |
| 1100 | 1105 | /* Re-calculate exponent if resistor nodes are used */ |
| 1101 | context->exponent_c_f = -1.0 / (r_total * info->cF * discrete_current_context->sample_rate); | |
| 1102 | context->exponent_c_f = 1.0 - exp(context->exponent_c_f); | |
| 1106 | context->exponent_c_f = 1.0 - exp(-1.0 / (r_total * info->cF * dt)); | |
| 1103 | 1107 | } |
| 1104 | context->v_cap_f += (v - | |
| 1108 | context->v_cap_f += (v - | |
| 1105 | 1109 | v = context->v_cap_f; |
| 1106 | 1110 | } |
| 1107 | 1111 | |
| r3171 | r3172 | |
| 1129 | 1133 | double rTemp = 0; |
| 1130 | 1134 | |
| 1131 | 1135 | /* link to r_node outputs */ |
| 1132 | context-> | |
| 1136 | context-> | |
| 1133 | 1137 | for (bit = 0; bit < 8; bit++) |
| 1134 | 1138 | { |
| 1135 | 1139 | r_node = discrete_find_node(NULL, info->r_node[bit]); |
| 1136 | if (r_node) | |
| 1140 | if (r_node != NULL) | |
| 1137 | 1141 | { |
| 1138 | 1142 | context->r_node[bit] = &(r_node->output[NODE_CHILD_NODE_NUM(info->r_node[bit])]); |
| 1139 | context-> | |
| 1143 | context-> | |
| 1140 | 1144 | } |
| 1141 | 1145 | else |
| 1142 | 1146 | context->r_node[bit] = NULL; |
| r3171 | r3172 | |
| 1555 | 1559 | * input[5] - Channel4 input value |
| 1556 | 1560 | * |
| 1557 | 1561 | ************************************************************************/ |
| 1558 | #define DST_TRANSFORM__ENABLE (*(node->input[0])) | |
| 1559 | #define DST_TRANSFORM__IN0 (*(node->input[1])) | |
| 1560 | #define DST_TRANSFORM__IN1 (*(node->input[2])) | |
| 1561 | #define DST_TRANSFORM__IN2 (*(node->input[3])) | |
| 1562 | #define DST_TRANSFORM__IN3 (*(node->input[4])) | |
| 1563 | #define DST_TRANSFORM__IN4 (*(node->input[5])) | |
| 1562 | #define DST_TRANSFORM__IN0 (*(node->input[0])) | |
| 1563 | #define DST_TRANSFORM__IN1 (*(node->input[1])) | |
| 1564 | #define DST_TRANSFORM__IN2 (*(node->input[2])) | |
| 1565 | #define DST_TRANSFORM__IN3 (*(node->input[3])) | |
| 1566 | #define DST_TRANSFORM__IN4 (*(node->input[4])) | |
| 1564 | 1567 | |
| 1565 | 1568 | #define MAX_TRANS_STACK 16 |
| 1566 | 1569 | |
| r3171 | r3172 | |
| 1581 | 1584 | |
| 1582 | 1585 | static void dst_transform_step(node_description *node) |
| 1583 | 1586 | { |
| 1584 | if(DST_TRANSFORM__ENABLE) | |
| 1585 | { | |
| 1586 | double trans_stack[MAX_TRANS_STACK]; | |
| 1587 | double number1,top; | |
| 1588 | int trans_stack_ptr = 0; | |
| 1587 | double trans_stack[MAX_TRANS_STACK]; | |
| 1588 | double number1,top; | |
| 1589 | int trans_stack_ptr = 0; | |
| 1589 | 1590 | |
| 1590 | const char *fPTR = node->custom; | |
| 1591 | node->output[0] = 0; | |
| 1591 | const char *fPTR = node->custom; | |
| 1592 | node->output[0] = 0; | |
| 1592 | 1593 | |
| 1593 | | |
| 1594 | | |
| 1594 | 1595 | |
| 1595 | while(*fPTR != 0) | |
| 1596 | while(*fPTR != 0) | |
| 1597 | { | |
| 1598 | switch (*fPTR++) | |
| 1596 | 1599 | { |
| 1597 | switch (*fPTR++) | |
| 1598 | { | |
| 1599 | case '*': | |
| 1600 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1601 | top = number1 * top; | |
| 1602 | break; | |
| 1603 | case '/': | |
| 1604 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1605 | top = number1 / top; | |
| 1606 | break; | |
| 1607 | case '+': | |
| 1608 | number1=dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1609 | top = number1 + top; | |
| 1610 | break; | |
| 1611 | case '-': | |
| 1612 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1613 | top = number1 - top; | |
| 1614 | break; | |
| 1615 | case '0': | |
| 1616 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1617 | top = DST_TRANSFORM__IN0; | |
| 1618 | break; | |
| 1619 | case '1': | |
| 1620 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1621 | top = DST_TRANSFORM__IN1; | |
| 1622 | break; | |
| 1623 | case '2': | |
| 1624 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1625 | top = DST_TRANSFORM__IN2; | |
| 1626 | break; | |
| 1627 | case '3': | |
| 1628 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1629 | top = DST_TRANSFORM__IN3; | |
| 1630 | break; | |
| 1631 | case '4': | |
| 1632 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1633 | top = DST_TRANSFORM__IN4; | |
| 1634 | break; | |
| 1635 | case 'P': | |
| 1636 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1637 | break; | |
| 1638 | case 'i': /* * -1 */ | |
| 1639 | top = -top; | |
| 1640 | break; | |
| 1641 | case '!': /* Logical NOT of Last Value */ | |
| 1642 | top = !top; | |
| 1643 | break; | |
| 1644 | case '=': /* Logical = */ | |
| 1645 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1646 | top = (int)number1 == (int)top; | |
| 1647 | break; | |
| 1648 | case '>': /* Logical > */ | |
| 1649 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1650 | top = number1 > top; | |
| 1651 | break; | |
| 1652 | case '<': /* Logical < */ | |
| 1653 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1654 | top = number1 < top; | |
| 1655 | break; | |
| 1656 | case '&': /* Bitwise AND */ | |
| 1657 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1658 | top = (int)number1 & (int)top; | |
| 1659 | break; | |
| 1660 | case '|': /* Bitwise OR */ | |
| 1661 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1662 | top = (int)number1 | (int)top; | |
| 1663 | break; | |
| 1664 | case '^': /* Bitwise XOR */ | |
| 1665 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1666 | top = (int)number1 ^ (int)top; | |
| 1667 | break; | |
| 1668 | default: | |
| 1669 | discrete_log("dst_transform_step - Invalid function type/variable passed"); | |
| 1670 | node->output[0] = 0; | |
| 1671 | break; | |
| 1672 | } | |
| 1600 | case '*': | |
| 1601 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1602 | top = number1 * top; | |
| 1603 | break; | |
| 1604 | case '/': | |
| 1605 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1606 | top = number1 / top; | |
| 1607 | break; | |
| 1608 | case '+': | |
| 1609 | number1=dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1610 | top = number1 + top; | |
| 1611 | break; | |
| 1612 | case '-': | |
| 1613 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1614 | top = number1 - top; | |
| 1615 | break; | |
| 1616 | case '0': | |
| 1617 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1618 | top = DST_TRANSFORM__IN0; | |
| 1619 | break; | |
| 1620 | case '1': | |
| 1621 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1622 | top = DST_TRANSFORM__IN1; | |
| 1623 | break; | |
| 1624 | case '2': | |
| 1625 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1626 | top = DST_TRANSFORM__IN2; | |
| 1627 | break; | |
| 1628 | case '3': | |
| 1629 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1630 | top = DST_TRANSFORM__IN3; | |
| 1631 | break; | |
| 1632 | case '4': | |
| 1633 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1634 | top = DST_TRANSFORM__IN4; | |
| 1635 | break; | |
| 1636 | case 'P': | |
| 1637 | dst_transform_push(trans_stack, &trans_stack_ptr, top); | |
| 1638 | break; | |
| 1639 | case 'i': /* * -1 */ | |
| 1640 | top = -top; | |
| 1641 | break; | |
| 1642 | case '!': /* Logical NOT of Last Value */ | |
| 1643 | top = !top; | |
| 1644 | break; | |
| 1645 | case '=': /* Logical = */ | |
| 1646 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1647 | top = (int)number1 == (int)top; | |
| 1648 | break; | |
| 1649 | case '>': /* Logical > */ | |
| 1650 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1651 | top = number1 > top; | |
| 1652 | break; | |
| 1653 | case '<': /* Logical < */ | |
| 1654 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1655 | top = number1 < top; | |
| 1656 | break; | |
| 1657 | case '&': /* Bitwise AND */ | |
| 1658 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1659 | top = (int)number1 & (int)top; | |
| 1660 | break; | |
| 1661 | case '|': /* Bitwise OR */ | |
| 1662 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1663 | top = (int)number1 | (int)top; | |
| 1664 | break; | |
| 1665 | case '^': /* Bitwise XOR */ | |
| 1666 | number1 = dst_transform_pop(trans_stack, &trans_stack_ptr); | |
| 1667 | top = (int)number1 ^ (int)top; | |
| 1668 | break; | |
| 1669 | default: | |
| 1670 | discrete_log("dst_transform_step - Invalid function type/variable passed"); | |
| 1671 | node->output[0] = 0; | |
| 1672 | break; | |
| 1673 | 1673 | } |
| 1674 | node->output[0] = top; | |
| 1675 | 1674 | } |
| 1676 | else | |
| 1677 | { | |
| 1678 | node->output[0] = 0; | |
| 1679 | } | |
| 1675 | node->output[0] = top; | |
| 1680 | 1676 | } |
| 1681 | 1677 | |
| 1682 | 1678 |
| r3171 | r3172 | |
|---|---|---|
| 41 | 41 | 5, |
| 42 | 42 | { 5, 5, 4, 4, 4, 4, 4, 3, 3, 3 }, |
| 43 | 43 | /* E */ |
| 44 | { 0, 0, 1, 1, 2, 3, 5, 7, 10, 15, 21, 3 | |
| 44 | { 0, 0, 1, 1, 2, 3, 5, 7, 10, 15, 21, 30, 43, 61, 86, 511 },/* correct value of last number is really 0 */ | |
| 45 | 45 | /* P */ |
| 46 | 46 | { 0, 41, 43, 45, 47, 49, 51, 53, |
| 47 | 47 | 55, 58, 60, 63, 66, 70, 73, 76, |
| 48 | 79, 83, 87, 90, 94, 99, 103, 104, | |
| 49 | 112, 118, 120, 129, 134, 140, 147, 153 }, | |
| 48 | 79, 83, 87, 90, 94, 99, 103, 107, | |
| 49 | 112, 118, 123, 129, 134, 141, 147, 153 }, | |
| 50 | 50 | { |
| 51 | 51 | /* K1 */ |
| 52 | { -504, -497, -493, -488, -480, -471, -460, -446, | |
| 53 | -427, -408, -378, -344, -305, -259, -206, -148, | |
| 54 | -86, -5, 45, 110, 168, 227, 277, 325, | |
| 52 | { -501, -497, -493, -488, -480, -471, -460, -446, | |
| 53 | -427, -405, -378, -344, -305, -259, -206, -148, | |
| 54 | -86, -21, 45, 110, 171, 227, 277, 320, | |
| 55 | 55 | 357, 388, 413, 434, 451, 464, 474, 482 }, |
| 56 | 56 | /* K2 */ |
| 57 | 57 | { -349, -328, -305, -280, -252, -223, -192, -158, |
| 58 | 58 | -124, -88, -51, -14, 23, 60, 97, 133, |
| 59 | 167, 199, 230, 259, 287, 310, 333, 354, | |
| 60 | 372, 389, 404, 417, 427, 439, 449, 506 }, | |
| 59 | 167, 199, 230, 259, 286, 310, 333, 354, | |
| 60 | 372, 389, 404, 417, 429, 439, 449, 490 }, | |
| 61 | 61 | /* K3 */ |
| 62 | { -397, -365, -327, -282, -2 | |
| 62 | { -397, -365, -327, -282, -2 | |
| 63 | 63 | 35, 104, 169, 228, 281, 326, 364, 396 }, |
| 64 | 64 | /* K4 */ |
| 65 | { -37 | |
| 65 | { -373, -334, -293, -245, -191, -131, -67, -1, | |
| 66 | 66 | 64, 128, 188, 243, 291, 332, 367, 397 }, |
| 67 | 67 | /* K5 */ |
| 68 | 68 | { -319, -286, -250, -211, -168, -122, -74, -25, |
| 69 | 24, 73, 121, 167, 210, 2 | |
| 69 | 24, 73, 121, 167, 210, 249, 285, 319 }, | |
| 70 | 70 | /* K6 */ |
| 71 | { -290, -252, -209, -163, -114, -62, -9, 44, | |
| 72 | 97, 147, 194, 255, 278, 313, 344, 371 }, | |
| 71 | { -290, -252, -209, -163, -114, -62, -9, 44, | |
| 72 | 97, 147, 194, 239, 278, 313, 344, 371 }, | |
| 73 | 73 | /* K7 */ |
| 74 | 74 | { -291, -256, -216, -174, -128, -80, -31, 19, |
| 75 | 69, 117, 163, 20 | |
| 75 | 69, 117, 163, 206, 246, 283, 316, 345 }, | |
| 76 | 76 | /* K8 */ |
| 77 | 77 | { -219, -133, -38, 59, 152, 235, 305, 361 }, |
| 78 | 78 | /* K9 */ |
| 79 | { -225, -157, -8 | |
| 79 | { -225, -157, -82, | |
| 80 | 80 | /* K10 */ |
| 81 | { -179, - | |
| 81 | { -179, -122, -61, 1, 63, 123, 179, 231 }, | |
| 82 | 82 | }, |
| 83 | 83 | /* Chirptable */ |
| 84 | 84 | { 0, 42, -44, 50, -78, 18, 37, 20, |
| r3171 | r3172 | |
|---|---|---|
| 241 | 241 | { DST_RCDISC3 ,"DST_RCDISC3" , 1 ,sizeof(struct dst_rcdisc_context) ,dst_rcdisc3_reset ,dst_rcdisc3_step }, |
| 242 | 242 | { DST_RCDISC4 ,"DST_RCDISC4" , 1 ,sizeof(struct dst_rcdisc4_context) ,dst_rcdisc4_reset ,dst_rcdisc4_step }, |
| 243 | 243 | { DST_RCDISC5 ,"DST_RCDISC5" , 1 ,sizeof(struct dst_rcdisc_context) ,dst_rcdisc5_reset ,dst_rcdisc5_step }, |
| 244 | { DST_RCINTEGRATE ,"DST_RCINTEGRATE" , 1 ,sizeof(struct dst_rcdisc_context) ,dst_rcintegrate_reset ,dst_rcintegrate_step }, | |
| 245 | { DST_RCDISC_MOD ,"DST_RCDISC_MOD" , 1 ,sizeof(struct dst_rcdisc_context) ,dst_rcdisc_mod_reset ,dst_rcdisc_mod_step }, | |
| 244 | { DST_RCINTEGRATE ,"DST_RCINTEGRATE" , 1 ,sizeof(struct dst_rcintegrate_context) ,dst_rcintegrate_reset ,dst_rcintegrate_step }, | |
| 245 | { DST_RCDISC_MOD ,"DST_RCDISC_MOD" , 1 ,sizeof(struct dst_rcdisc_mod_context) ,dst_rcdisc_mod_reset ,dst_rcdisc_mod_step }, | |
| 246 | 246 | { DST_RCFILTER ,"DST_RCFILTER" , 1 ,sizeof(struct dst_rcfilter_context) ,dst_rcfilter_reset ,dst_rcfilter_step }, |
| 247 | 247 | { DST_RCFILTER_SW ,"DST_RCFILTER_SW" , 1 ,sizeof(struct dst_rcfilter_sw_context) ,dst_rcfilter_sw_reset ,dst_rcfilter_sw_step }, |
| 248 | 248 | /* For testing - seem to be buggered. Use versions not ending in N. */ |
| r3171 | r3172 | |
| 704 | 704 | { |
| 705 | 705 | node_description *node_ref = info->indexed_node[NODE_INDEX(inputnode)]; |
| 706 | 706 | if (!node_ref) |
| 707 | fatalerror("discrete_start - N | |
| 707 | fatalerror("discrete_start - N | |
| 708 | 708 | |
| 709 | 709 | if (NODE_CHILD_NODE_NUM(inputnode) >= node_ref->module.num_output) |
| 710 | fatalerror("discrete_start - N | |
| 710 | fatalerror("discrete_start - N | |
| 711 | 711 | |
| 712 | 712 | node->input[inputnum] = &(node_ref->output[NODE_CHILD_NODE_NUM(inputnode)]); /* Link referenced node out to input */ |
| 713 | 713 | node->input_is_node |= 1 << inputnum; /* Bit flag if input is node */ |
| 714 | 714 | } |
| 715 | else | |
| 716 | { | |
| 717 | /* warn if trying to use a node for an input that can only be static */ | |
| 718 | if IS_VALUE_A_NODE(block->initial[inputnum]) | |
| 719 | { | |
| 720 | discrete_log("Warning - discrete_start - NODE_%02d trying to use a node on static input %d", NODE_INDEX(node->node), inputnum); | |
| 721 | /* also report it in the error log so it is not missed */ | |
| 722 | logerror("Warning - discrete_start - NODE_%02d trying to use a node on static input %d", NODE_INDEX(node->node), inputnum); | |
| 723 | } | |
| 724 | } | |
| 715 | 725 | } |
| 716 | 726 | } |
| 717 | 727 | } |
| r3171 | r3172 | |
|---|---|---|
| 19 | 19 | * |
| 20 | 20 | *********************************************************************** |
| 21 | 21 | * |
| 22 | * For | |
| 22 | * For | |
| 23 | 23 | * http://www.ibiblio.org/obp/electricCircuits/ |
| 24 | * For a free circuit simulator: | |
| 25 | * http://qucs.sourceforge.net/index.html | |
| 26 | * For a free waveform editor to view DISCRETE_WAVELOG dumps: | |
| 27 | * http://audacity.sourceforge.net/ | |
| 28 | * http://www.sonicvisualiser.org/ | |
| 24 | 29 | * |
| 25 | 30 | *********************************************************************** |
| 26 | 31 | * |
| r3171 | r3172 | |
| 45 | 50 | * a logic block representation. |
| 46 | 51 | * |
| 47 | 52 | * There is the possibility to support multiple outputs per module. |
| 48 | * In this case, NODE_XXX is the default ouput. Alternative outputs may | |
| 53 | * In this case, NODE_XXX is the default output. Alternative outputs may | |
| 49 | 54 | * be accessed by using NODE_XXX_YY where 00<=Y<08. |
| 50 | 55 | * |
| 51 | 56 | * You may also access nodes with a macros: |
| r3171 | r3172 | |
| 57 | 62 | * One node point may feed a number of inputs, for example you could |
| 58 | 63 | * connect the output of a DISCRETE_SINEWAVE to the AMPLITUDE input |
| 59 | 64 | * of another DISCRETE_SINEWAVE to amplitude modulate its output and |
| 60 | * also connect it to the frequecy input of another to frequency | |
| 65 | * also connect it to the frequency input of another to frequency | |
| 61 | 66 | * modulate its output, the combinations are endless.... |
| 62 | 67 | * |
| 63 | 68 | * Consider the circuit below: |
| r3171 | r3172 | |
| 99 | 104 | * To aid simulation speed it is preferable to use the enable/disable |
| 100 | 105 | * inputs to a block rather than setting the output amplitude to zero |
| 101 | 106 | * |
| 102 | * Feedback loops are allowed BUT they will always feeback one time | |
| 107 | * Feedback loops are allowed BUT they will always feedback one time | |
| 103 | 108 | * step later, the loop over the netlist is only performed once per |
| 104 | 109 | * deltaT so feedback occurs in the next deltaT step. This is not |
| 105 | 110 | * the perfect solution but saves repeatedly traversing the netlist |
| r3171 | r3172 | |
| 112 | 117 | * |
| 113 | 118 | * Node numbers NODE_01 to NODE_299 are defined at present. |
| 114 | 119 | * |
| 115 | * It is recomended to put all Inputs at the start of the interface. | |
| 120 | * It is recommended to put all Inputs at the start of the interface. | |
| 116 | 121 | * That way they are updated first. |
| 117 | 122 | * |
| 118 | 123 | * Each sound effects final node should come after all nodes that |
| r3171 | r3172 | |
| 121 | 126 | * |
| 122 | 127 | *********************************************************************** |
| 123 | 128 | * |
| 124 | * x_time - ANTI-ALSING features. | |
| 129 | * x_time - ANTI-ALIASING features. | |
| 125 | 130 | * |
| 126 | 131 | * Certain modules make use of x_time. This is a feature that passes |
| 127 | * infomation between modules about how long in the current sample, the | |
| 132 | * information between modules about how long in the current sample, the | |
| 128 | 133 | * switch in state happened. This is a decimal value of the % of the |
| 129 | 134 | * full sample period that it has been in the new state. |
| 130 | 135 | * 0 means it has been at the same state the whole sample. |
| r3171 | r3172 | |
| 206 | 211 | * DISCRETE_SQUAREWAVE2(NODE,ENAB,AMPL,T_OFF,T_ON,BIAS,TSHIFT) |
| 207 | 212 | * DISCRETE_TRIANGLEWAVE(NODE,ENAB,FREQ,AMP,BIAS,PHASE) |
| 208 | 213 | * |
| 214 | * DISCRETE_INVERTER_OSC(NODE,ENAB,MOD,RCHARGE,RP,C,R2,INFO) | |
| 209 | 215 | * DISCRETE_OP_AMP_OSCILLATOR(NODE,ENAB,INFO) |
| 210 | 216 | * DISCRETE_OP_AMP_VCO1(NODE,ENAB,VMOD1,INFO) |
| 211 | 217 | * DISCRETE_OP_AMP_VCO2(NODE,ENAB,VMOD1,VMOD2,INFO) |
| r3171 | r3172 | |
| 227 | 233 | * DISCRETE_RAMP(NODE,ENAB,RAMP,GRAD,MIN,MAX,CLAMP) |
| 228 | 234 | * DISCRETE_SAMPLHOLD(NODE,ENAB,INP0,CLOCK,CLKTYPE) |
| 229 | 235 | * DISCRETE_SWITCH(NODE,ENAB,SWITCH,INP0,INP1) |
| 230 | * DISCRETE_TRANSFORM2(NODE,ENAB,INP0,INP1,FUNCT) | |
| 231 | * DISCRETE_TRANSFORM3(NODE,ENAB,INP0,INP1,INP2,FUNCT) | |
| 232 | * DISCRETE_TRANSFORM4(NODE,ENAB,INP0,INP1,INP2,INP3,FUNCT) | |
| 233 | * DISCRETE_TRANSFORM5(NODE,ENAB,INP0,INP1,INP2,INP3,INP4,FUNCT) | |
| 236 | * DISCRETE_TRANSFORM2(NODE,INP0,INP1,FUNCT) | |
| 237 | * DISCRETE_TRANSFORM3(NODE,INP0,INP1,INP2,FUNCT) | |
| 238 | * DISCRETE_TRANSFORM4(NODE,INP0,INP1,INP2,INP3,FUNCT) | |
| 239 | * DISCRETE_TRANSFORM5(NODE,INP0,INP1,INP2,INP3,INP4,FUNCT) | |
| 234 | 240 | * |
| 235 | 241 | * DISCRETE_COMP_ADDER(NODE,ENAB,DATA,TABLE) |
| 236 | 242 | * DISCRETE_DAC_R1(NODE,ENAB,DATA,VDATA,LADDER) |
| 237 | * DISCRETE_DIODE_MIXER2(NODE,ENAB,VJUNC,IN0,IN1) | |
| 238 | * DISCRETE_DIODE_MIXER3(NODE,ENAB,VJUNC,IN0,IN1,IN2) | |
| 239 | * DISCRETE_DIODE_MIXER4(NODE,ENAB,VJUNC,IN0,IN1,IN2,IN3) | |
| 243 | * DISCRETE_DIODE_MIXER2(NODE,VJUNC,IN0,IN1) | |
| 244 | * DISCRETE_DIODE_MIXER3(NODE,VJUNC,IN0,IN1,IN2) | |
| 245 | * DISCRETE_DIODE_MIXER4(NODE,VJUNC,IN0,IN1,IN2,IN3) | |
| 240 | 246 | * DISCRETE_INTEGRATE(NODE,TRG0,TRG1,INFO) |
| 241 | 247 | * DISCRETE_MIXER2(NODE,ENAB,IN0,IN1,INFO) |
| 242 | 248 | * DISCRETE_MIXER3(NODE,ENAB,IN0,IN1,IN2,INFO) |
| r3171 | r3172 | |
| 281 | 287 | * DISCRETE_RCDISC3(NODE,ENAB,INP0,RVAL0,RVAL1,CVAL) |
| 282 | 288 | * DISCRETE_RCDISC4(NODE,ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,VP,TYPE) |
| 283 | 289 | * DISCRETE_RCDISC5(NODE,ENAB,IN0,RVAL,CVAL) |
| 284 | * DISCRETE_RCINTEGRATE(NODE,ENAB,IN0,IN1,RVAL0,RVAL1,CVAL) | |
| 290 | * DISCRETE_RCINTEGRATE(NODE,INP0,RVAL0,RVAL1,RVAL2,CVAL,vP,TYPE) | |
| 291 | * DISCRETE_RCDISC_MODULATED(NODE,INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP) | |
| 285 | 292 | * DISCRETE_RCFILTER(NODE,ENAB,IN0,RVAL,CVAL) |
| 286 | 293 | * DISCRETE_RCFILTER_VREF(NODE,ENAB,IN0,RVAL,CVAL,VREF) |
| 287 | 294 | * |
| r3171 | r3172 | |
| 1601 | 1608 | * (n=2,3,4,5) |
| 1602 | 1609 | * .------------. |
| 1603 | 1610 | * | | |
| 1604 | * | |
| 1611 | * INPUT0 -0------>| | | |
| 1605 | 1612 | * | | |
| 1606 | * INPUT0 -1------>| | | |
| 1607 | * | | | |
| 1608 | * INPUT1 -2------>| Postfix | | |
| 1613 | * INPUT1 -1------>| Postfix | | |
| 1609 | 1614 | * | stack |----> Netlist node |
| 1610 | * INPUT2 - | |
| 1615 | * INPUT2 -2------>| maths | | |
| 1611 | 1616 | * | | |
| 1612 | * INPUT3 - | |
| 1617 | * INPUT3 -3------>| | | |
| 1613 | 1618 | * | | |
| 1614 | * INPUT4 - | |
| 1619 | * INPUT4 -4------>| | | |
| 1615 | 1620 | * | | |
| 1616 | 1621 | * '------------' |
| 1617 | 1622 | * |
| 1618 | 1623 | * Declaration syntax |
| 1619 | 1624 | * |
| 1620 | 1625 | * DISCRETE_TRANSFORMn(name of node, |
| 1621 | * enable node or static value, | |
| 1622 | 1626 | * input0 node or static value, |
| 1623 | 1627 | * input1 node or static value, |
| 1624 | 1628 | * input2 node or static value, [optional] |
| r3171 | r3172 | |
| 1628 | 1632 | * |
| 1629 | 1633 | * Example config line |
| 1630 | 1634 | * |
| 1631 | * DISCRETE_TRANSFORM4(NODE_12, | |
| 1635 | * DISCRETE_TRANSFORM4(NODE_12, | |
| 1632 | 1636 | * |
| 1633 | 1637 | * Arithmetic uses stack based arithmetic similar to Forth, the maths |
| 1634 | 1638 | * has 5 registers 0-4 and various arithmetic operations. The math |
| r3171 | r3172 | |
| 1756 | 1760 | * Declaration syntax |
| 1757 | 1761 | * |
| 1758 | 1762 | * DISCRETE_DIODE_MIXERx(name of node, |
| 1759 | * (x = 2/3/4) enable node or static value, | |
| 1760 | * voltage drop of the diode junction (static value), | |
| 1763 | * (x = 2/3/4) voltage drop of the diode junction (static value), | |
| 1761 | 1764 | * input 0 node, |
| 1762 | 1765 | * input 1 node, |
| 1763 | 1766 | * ...) |
| 1764 | 1767 | * |
| 1765 | * EXAMPLES: see | |
| 1768 | * EXAMPLES: see dkong | |
| 1766 | 1769 | * |
| 1767 | 1770 | *********************************************************************** |
| 1768 | 1771 | * |
| r3171 | r3172 | |
| 2594 | 2597 | * Declaration syntax |
| 2595 | 2598 | * |
| 2596 | 2599 | * DISCRETE_RCDISC_MODULATED(name of node, |
| 2597 | * enable, | |
| 2598 | 2600 | * INPUT1 node (or value), |
| 2599 | 2601 | * INPUT2 node (or value), |
| 2600 | * R1 value in OHMS, | |
| 2601 | * R2 value in OHMS, | |
| 2602 | * R3 value in OHMS, | |
| 2603 | * R4 value in OHMS, | |
| 2604 | * C1 value in FARADS, | |
| 2602 | * R1 value in OHMS (static value), | |
| 2603 | * R2 value in OHMS (static value), | |
| 2604 | * R3 value in OHMS (static value), | |
| 2605 | * R4 value in OHMS (static value), | |
| 2606 | * C1 value in FARADS (static value), | |
| 2605 | 2607 | * vP value in VOLTS) |
| 2606 | 2608 | * |
| 2607 | 2609 | * EXAMPLES: dkong |
| 2608 | 2610 | * |
| 2609 | 2611 | *********************************************************************** |
| 2610 | 2612 | * |
| 2611 | * DISCRETE_RCINTEGRATE - RC integration circuit/amplifier | |
| 2612 | * | |
| 2613 | * | |
| 2614 | * vP >-------------------+ | |
| 2615 | * | | |
| 2616 | * Z | |
| 2617 | * Z R3 | |
| 2618 | * Z | |
| 2619 | * | | |
| 2620 | * +-----------------> node (Type 3) | |
| 2621 | * / | |
| 2622 | * |/ | |
| 2623 | * INPUT >---------------| NPN | |
| 2624 | * \ .--------------> node (Type 2) | |
| 2625 | * > | R1 | |
| 2626 | * +--+--ZZZ-+-------> node (Type 1) | |
| 2627 | * | | | |
| 2628 | * Z --- | |
| 2629 | * Z R2 C--- | |
| 2630 | * Z | | |
| 2631 | * | | | |
| 2632 | * gnd gnd | |
| 2633 | * | |
| 2634 | * Declaration syntax | |
| 2635 | * | |
| 2636 | * DISCRETE_RCINTEGRATE(name of node, | |
| 2637 | * enable, | |
| 2638 | * INPUT node (or value), | |
| 2639 | * R1 value in OHMS, | |
| 2640 | * R2 value in OHMS, | |
| 2641 | * R3 value in OHMS, | |
| 2642 | * C value in FARADS, | |
| 2643 | * vP node (or value in VOLTS) | |
| 2644 | * TYPE) | |
| 2645 | * | |
| 2646 | * TYPE: RC_INTEGRATE_TYPE1, RC_INTEGRATE_TYPE2, RC_INTEGRATE_TYPE3 | |
| 2647 | * | |
| 2648 | * Actually an amplifier as well. Primary reason for implementation was integration. | |
| 2649 | * The integration configuration (TYPE3, R3=0) works quite well, the amplifying | |
| 2650 | * configuration is missing a good, yet simple ( :-) ) transistor model. Around the | |
| 2651 | * defined working point the amplifier delivers results. | |
| 2652 | * | |
| 2653 | * EXAMPLES: dkong | |
| 2654 | * | |
| 2655 | * | |
| 2656 | *********************************************************************** | |
| 2657 | * | |
| 2658 | 2613 | * DISCRETE_RCFILTER - Simple single pole RC filter network (vRef = 0) |
| 2659 | 2614 | * DISCRETE_RCFILTER_VREF - Same but refrenced to vRef not 0V |
| 2660 | 2615 | * |
| r3171 | r3172 | |
| 2740 | 2695 | * EXAMPLES: see circusc |
| 2741 | 2696 | * |
| 2742 | 2697 | *********************************************************************** |
| 2698 | * | |
| 2699 | * DISCRETE_RCINTEGRATE - RC integration circuit/amplifier | |
| 2700 | * | |
| 2701 | * | |
| 2702 | * vP >-------------------+ | |
| 2703 | * | | |
| 2704 | * Z | |
| 2705 | * Z R3 | |
| 2706 | * Z | |
| 2707 | * | | |
| 2708 | * +-----------------> node (Type 3) | |
| 2709 | * / | |
| 2710 | * |/ | |
| 2711 | * INPUT >---------------| NPN | |
| 2712 | * \ .--------------> node (Type 2) | |
| 2713 | * > | R1 | |
| 2714 | * +--+--ZZZ-+-------> node (Type 1) | |
| 2715 | * | | | |
| 2716 | * Z --- | |
| 2717 | * Z R2 C--- | |
| 2718 | * Z | | |
| 2719 | * | | | |
| 2720 | * gnd gnd | |
| 2721 | * | |
| 2722 | * Declaration syntax | |
| 2723 | * | |
| 2724 | * DISCRETE_RCINTEGRATE(name of node, | |
| 2725 | * INPUT node (or value), | |
| 2726 | * R1 value in OHMS, | |
| 2727 | * R2 value in OHMS, | |
| 2728 | * R3 value in OHMS, | |
| 2729 | * C value in FARADS, | |
| 2730 | * vP node (or value in VOLTS) | |
| 2731 | * TYPE) | |
| 2732 | * | |
| 2733 | * TYPE: RC_INTEGRATE_TYPE1, RC_INTEGRATE_TYPE2, RC_INTEGRATE_TYPE3 | |
| 2734 | * | |
| 2735 | * Actually an amplifier as well. Primary reason for implementation was integration. | |
| 2736 | * The integration configuration (TYPE3, R3=0) works quite well, the amplifying | |
| 2737 | * configuration is missing a good, yet simple ( :-) ) transistor model. Around the | |
| 2738 | * defined working point the amplifier delivers results. | |
| 2739 | * | |
| 2740 | * EXAMPLES: dkong | |
| 2741 | * | |
| 2742 | * | |
| 2743 | *********************************************************************** | |
| 2743 | 2744 | ======================================================================= |
| 2744 | * from from disc_ | |
| 2745 | * from from disc_dev.c | |
| 2745 | 2746 | * Component specific modules |
| 2746 | 2747 | ======================================================================= |
| 2747 | 2748 | *********************************************************************** |
| r3171 | r3172 | |
| 4018 | 4019 | |
| 4019 | 4020 | #define DISCRETE_SOUND_EXTERN(name) extern const discrete_sound_block name##_discrete_interface[] |
| 4020 | 4021 | #define DISCRETE_SOUND_START(name) const discrete_sound_block name##_discrete_interface[] = { |
| 4021 | #define DISCRETE_SOUND_END { NODE_00, DSS_NULL , 0, { NODE_NC }, { 0 } ,NULL ,"E | |
| 4022 | #define DISCRETE_SOUND_END { NODE_00, DSS_NULL , 0, { NODE_NC }, { 0 } ,NULL ,"DISCRETE_SOUND_END" } }; | |
| 4022 | 4023 | |
| 4023 | 4024 | /* from disc_inp.c */ |
| 4024 | 4025 | #define DISCRETE_ADJUSTMENT(NODE,MIN,MAX,LOGLIN,PORT) { NODE, DSS_ADJUSTMENT , 7, { NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { MIN,MAX,LOGLIN,PORT,0 ,100 }, NULL , "DISCRETE_ADJUSTMENT" }, |
| 4025 | 4026 | #define DISCRETE_ADJUSTMENT_TAG(NODE,MIN,MAX,LOGLIN,TAG) { NODE, DSS_ADJUSTMENT , 7, { NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { MIN,MAX,LOGLIN,0 ,0 ,100 }, TAG , "DISCRETE_ADJUSTMENT_TAG" }, |
| 4026 | 4027 | #define DISCRETE_ADJUSTMENTX(NODE,MIN,MAX,LOGLIN,PORT,PMIN,PMAX) { NODE, DSS_ADJUSTMENT , 7, { NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { MIN,MAX,LOGLIN,PORT,PMIN,PMAX }, NULL , "DISCRETE_ADJUSTMENTX" }, |
| 4027 | #define DISCRETE_CONSTANT(NODE,CONST) { NODE, DSS_CONSTANT , 1, { NODE_NC }, { CONST } ,NULL ,"Constant" }, | |
| 4028 | #define DISCRETE_INPUT_DATA(NODE) { NODE, DSS_INPUT_DATA , 3, { NODE_NC,NODE_NC,NODE_NC }, { 1,0,0 }, NULL, "Input Data" }, | |
| 4029 | #define DISCRETE_INPUTX_DATA(NODE,GAIN,OFFSET,INIT) { NODE, DSS_INPUT_DATA , 3, { NODE_NC,NODE_NC,NODE_NC }, { GAIN,OFFSET,INIT }, NULL, "InputX Data" }, | |
| 4030 | #define DISCRETE_INPUT_LOGIC(NODE) { NODE, DSS_INPUT_LOGIC , 3, { NODE_NC,NODE_NC,NODE_NC }, { 1,0,0 }, NULL, "Input Logic" }, | |
| 4031 | #define DISCRETE_INPUTX_LOGIC(NODE,GAIN,OFFSET,INIT) { NODE, DSS_INPUT_LOGIC , 3, { NODE_NC,NODE_NC,NODE_NC }, { GAIN,OFFSET,INIT }, NULL, "InputX Logic" }, | |
| 4032 | #define DISCRETE_INPUT_NOT(NODE) { NODE, DSS_INPUT_NOT , 3, { NODE_NC,NODE_NC,NODE_NC }, { 1,0,0 }, NULL, "Input Not" }, | |
| 4033 | #define DISCRETE_INPUTX_NOT(NODE,GAIN,OFFSET,INIT) { NODE, DSS_INPUT_NOT , 3, { NODE_NC,NODE_NC,NODE_NC }, { GAIN,OFFSET,INIT }, NULL, "InputX Not" }, | |
| 4034 | #define DISCRETE_INPUT_PULSE(NODE,INIT) { NODE, DSS_INPUT_PULSE , 3, { NODE_NC,NODE_NC,NODE_NC }, { 1,0,INIT }, NULL, "Input Pulse" }, | |
| 4035 | #define DISCRETE_INPUT_STREAM(NODE, NUM) { NODE, DSS_INPUT_STREAM, 3, { NUM,NODE_NC,NODE_NC }, { NUM,1,0 }, NULL, "Input Stream" }, | |
| 4036 | #define DISCRETE_INPUTX_STREAM(NODE, NUM, GAIN,OFFSET) { NODE, DSS_INPUT_STREAM, 3, { NUM,NODE_NC,NODE_NC }, { NUM,GAIN,OFFSET }, NULL, "InputX Stream" }, | |
| 4028 | #define DISCRETE_CONSTANT(NODE,CONST) { NODE, DSS_CONSTANT , 1, { NODE_NC }, { CONST } ,NULL ,"DISCRETE_CONSTANT" }, | |
| 4029 | #define DISCRETE_INPUT_DATA(NODE) { NODE, DSS_INPUT_DATA , 3, { NODE_NC,NODE_NC,NODE_NC }, { 1,0,0 }, NULL, "DISCRETE_INPUT_DATA" }, | |
| 4030 | #define DISCRETE_INPUTX_DATA(NODE,GAIN,OFFSET,INIT) { NODE, DSS_INPUT_DATA , 3, { NODE_NC,NODE_NC,NODE_NC }, { GAIN,OFFSET,INIT }, NULL, "DISCRETE_INPUTX_DATA" }, | |
| 4031 | #define DISCRETE_INPUT_LOGIC(NODE) { NODE, DSS_INPUT_LOGIC , 3, { NODE_NC,NODE_NC,NODE_NC }, { 1,0,0 }, NULL, "DISCRETE_INPUT_LOGIC" }, | |
| 4032 | #define DISCRETE_INPUTX_LOGIC(NODE,GAIN,OFFSET,INIT) { NODE, DSS_INPUT_LOGIC , 3, { NODE_NC,NODE_NC,NODE_NC }, { GAIN,OFFSET,INIT }, NULL, "DISCRETE_INPUTX_LOGIC" }, | |
| 4033 | #define DISCRETE_INPUT_NOT(NODE) { NODE, DSS_INPUT_NOT , 3, { NODE_NC,NODE_NC,NODE_NC }, { 1,0,0 }, NULL, "DISCRETE_INPUT_NOT" }, | |
| 4034 | #define DISCRETE_INPUTX_NOT(NODE,GAIN,OFFSET,INIT) { NODE, DSS_INPUT_NOT , 3, { NODE_NC,NODE_NC,NODE_NC }, { GAIN,OFFSET,INIT }, NULL, "DISCRETE_INPUTX_NOT" }, | |
| 4035 | #define DISCRETE_INPUT_PULSE(NODE,INIT) { NODE, DSS_INPUT_PULSE , 3, { NODE_NC,NODE_NC,NODE_NC }, { 1,0,INIT }, NULL, "DISCRETE_INPUT_PULSE" }, | |
| 4036 | #define DISCRETE_INPUT_STREAM(NODE, NUM) { NODE, DSS_INPUT_STREAM, 3, { NUM,NODE_NC,NODE_NC }, { NUM,1,0 }, NULL, "DISCRETE_INPUT_STREAM" }, | |
| 4037 | #define DISCRETE_INPUTX_STREAM(NODE, NUM, GAIN,OFFSET) { NODE, DSS_INPUT_STREAM, 3, { NUM,NODE_NC,NODE_NC }, { NUM,GAIN,OFFSET }, NULL, "DISCRETE_INPUTX_STREAM" }, | |
| 4037 | 4038 | |
| 4038 | 4039 | /* from disc_wav.c */ |
| 4039 | 4040 | /* generic modules */ |
| 4040 | 4041 | #define DISCRETE_COUNTER(NODE,ENAB,RESET,CLK,MAX,DIR,INIT0,CLKTYPE) { NODE, DSS_COUNTER , 7, { ENAB,RESET,CLK,NODE_NC,DIR,INIT0,NODE_NC }, { ENAB,RESET,CLK,MAX,DIR,INIT0,CLKTYPE }, NULL, "DISCRETE_COUNTER" }, |
| 4041 | 4042 | #define DISCRETE_COUNTER_7492(NODE,ENAB,RESET,CLK,CLKTYPE) { NODE, DSS_COUNTER , 7, { ENAB,RESET,CLK,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { ENAB,RESET,CLK,CLKTYPE,1,0,DISC_COUNTER_IS_7492 }, NULL, "DISCRETE_COUNTER_7492" }, |
| 4042 | #define DISCRETE_LFSR_NOISE(NODE,ENAB,RESET,CLK,AMPL,FEED,BIAS,LFSRTB) { NODE, DSS_LFSR_NOISE , 6, { ENAB,RESET,CLK,AMPL,FEED,BIAS }, { ENAB,RESET,CLK,AMPL,FEED,BIAS }, LFSRTB, "LFSR Noise Source" }, | |
| 4043 | #define DISCRETE_NOISE(NODE,ENAB,FREQ,AMPL,BIAS) { NODE, DSS_NOISE , 4, { ENAB,FREQ,AMPL,BIAS }, { ENAB,FREQ,AMPL,BIAS }, NULL, "Noise Source" }, | |
| 4044 | #define DISCRETE_NOTE(NODE,ENAB,CLK,DATA,MAX1,MAX2,CLKTYPE) { NODE, DSS_NOTE , 6, { ENAB,CLK,DATA,NODE_NC,NODE_NC,NODE_NC }, { ENAB,CLK,DATA,MAX1,MAX2,CLKTYPE }, NULL, "Note Generator" }, | |
| 4045 | #define DISCRETE_SAWTOOTHWAVE(NODE,ENAB,FREQ,AMPL,BIAS,GRAD,PHASE) { NODE, DSS_SAWTOOTHWAVE, 6, { ENAB,FREQ,AMPL,BIAS,NODE_NC,NODE_NC }, { ENAB,FREQ,AMPL,BIAS,GRAD,PHASE }, NULL, "Saw Tooth Wave" }, | |
| 4046 | #define DISCRETE_SINEWAVE(NODE,ENAB,FREQ,AMPL,BIAS,PHASE) { NODE, DSS_SINEWAVE , 5, { ENAB,FREQ,AMPL,BIAS,NODE_NC }, { ENAB,FREQ,AMPL,BIAS,PHASE }, NULL, "Sine Wave" }, | |
| 4047 | #define DISCRETE_SQUAREWAVE(NODE,ENAB,FREQ,AMPL,DUTY,BIAS,PHASE) { NODE, DSS_SQUAREWAVE , 6, { ENAB,FREQ,AMPL,DUTY,BIAS,NODE_NC }, { ENAB,FREQ,AMPL,DUTY,BIAS,PHASE }, NULL, "Square Wave" }, | |
| 4048 | #define DISCRETE_SQUAREWFIX(NODE,ENAB,FREQ,AMPL,DUTY,BIAS,PHASE) { NODE, DSS_SQUAREWFIX , 6, { ENAB,FREQ,AMPL,DUTY,BIAS,NODE_NC }, { ENAB,FREQ,AMPL,DUTY,BIAS,PHASE }, NULL, "Square Wave Fixed" }, | |
| 4049 | #define DISCRETE_SQUAREWAVE2(NODE,ENAB,AMPL,T_OFF,T_ON,BIAS,TSHIFT) { NODE, DSS_SQUAREWAVE2 , 6, { ENAB,AMPL,T_OFF,T_ON,BIAS,NODE_NC }, { ENAB,AMPL,T_OFF,T_ON,BIAS,TSHIFT }, NULL, "Square Wave 2" }, | |
| 4050 | #define DISCRETE_TRIANGLEWAVE(NODE,ENAB,FREQ,AMPL,BIAS,PHASE) { NODE, DSS_TRIANGLEWAVE, 5, { ENAB,FREQ,AMPL,BIAS,NODE_NC }, { ENAB,FREQ,AMPL,BIAS,PHASE }, NULL, "Triangle Wave" }, | |
| 4043 | #define DISCRETE_LFSR_NOISE(NODE,ENAB,RESET,CLK,AMPL,FEED,BIAS,LFSRTB) { NODE, DSS_LFSR_NOISE , 6, { ENAB,RESET,CLK,AMPL,FEED,BIAS }, { ENAB,RESET,CLK,AMPL,FEED,BIAS }, LFSRTB, "DISCRETE_LFSR_NOISE" }, | |
| 4044 | #define DISCRETE_NOISE(NODE,ENAB,FREQ,AMPL,BIAS) { NODE, DSS_NOISE , 4, { ENAB,FREQ,AMPL,BIAS }, { ENAB,FREQ,AMPL,BIAS }, NULL, "DISCRETE_NOISE" }, | |
| 4045 | #define DISCRETE_NOTE(NODE,ENAB,CLK,DATA,MAX1,MAX2,CLKTYPE) { NODE, DSS_NOTE , 6, { ENAB,CLK,DATA,NODE_NC,NODE_NC,NODE_NC }, { ENAB,CLK,DATA,MAX1,MAX2,CLKTYPE }, NULL, "DISCRETE_NOTE" }, | |
| 4046 | #define DISCRETE_SAWTOOTHWAVE(NODE,ENAB,FREQ,AMPL,BIAS,GRAD,PHASE) { NODE, DSS_SAWTOOTHWAVE, 6, { ENAB,FREQ,AMPL,BIAS,NODE_NC,NODE_NC }, { ENAB,FREQ,AMPL,BIAS,GRAD,PHASE }, NULL, "DISCRETE_SAWTOOTHWAVE" }, | |
| 4047 | #define DISCRETE_SINEWAVE(NODE,ENAB,FREQ,AMPL,BIAS,PHASE) { NODE, DSS_SINEWAVE , 5, { ENAB,FREQ,AMPL,BIAS,NODE_NC }, { ENAB,FREQ,AMPL,BIAS,PHASE }, NULL, "DISCRETE_SINEWAVE" }, | |
| 4048 | #define DISCRETE_SQUAREWAVE(NODE,ENAB,FREQ,AMPL,DUTY,BIAS,PHASE) { NODE, DSS_SQUAREWAVE , 6, { ENAB,FREQ,AMPL,DUTY,BIAS,NODE_NC }, { ENAB,FREQ,AMPL,DUTY,BIAS,PHASE }, NULL, "DISCRETE_SQUAREWAVE" }, | |
| 4049 | #define DISCRETE_SQUAREWFIX(NODE,ENAB,FREQ,AMPL,DUTY,BIAS,PHASE) { NODE, DSS_SQUAREWFIX , 6, { ENAB,FREQ,AMPL,DUTY,BIAS,NODE_NC }, { ENAB,FREQ,AMPL,DUTY,BIAS,PHASE }, NULL, "DISCRETE_SQUAREWFIX" }, | |
| 4050 | #define DISCRETE_SQUAREWAVE2(NODE,ENAB,AMPL,T_OFF,T_ON,BIAS,TSHIFT) { NODE, DSS_SQUAREWAVE2 , 6, { ENAB,AMPL,T_OFF,T_ON,BIAS,NODE_NC }, { ENAB,AMPL,T_OFF,T_ON,BIAS,TSHIFT }, NULL, "DISCRETE_SQUAREWAVE2" }, | |
| 4051 | #define DISCRETE_TRIANGLEWAVE(NODE,ENAB,FREQ,AMPL,BIAS,PHASE) { NODE, DSS_TRIANGLEWAVE, 5, { ENAB,FREQ,AMPL,BIAS,NODE_NC }, { ENAB,FREQ,AMPL,BIAS,PHASE }, NULL, "DISCRETE_TRIANGLEWAVE" }, | |
| 4051 | 4052 | /* Component specific */ |
| 4052 | #define DISCRETE_INVERTER_OSC(NODE,ENAB,MOD,RCHARGE,RP,C,R2,INFO) { NODE, DSS_INVERTER_OSC, 6, { ENAB,MOD,NODE_NC,NODE_NC,NODE_NC }, { ENAB,MOD,RCHARGE,RP,C,R2 }, INFO, "Inverter Oscillator" }, | |
| 4053 | #define DISCRETE_OP_AMP_OSCILLATOR(NODE,ENAB,INFO) { NODE, DSS_OP_AMP_OSC , 1, { ENAB }, { ENAB }, INFO, "Op Amp Oscillator" }, | |
| 4054 | #define DISCRETE_OP_AMP_VCO1(NODE,ENAB,VMOD1,INFO) { NODE, DSS_OP_AMP_OSC , 2, { ENAB,VMOD1 }, { ENAB,VMOD1 }, INFO, "Op Amp VCO 1-vMod" }, | |
| 4055 | #define DISCRETE_OP_AMP_VCO2(NODE,ENAB,VMOD1,VMOD2,INFO) { NODE, DSS_OP_AMP_OSC , 3, { ENAB,VMOD1,VMOD2 }, { ENAB,VMOD1,VMOD2 }, INFO, "Op Amp VCO 2-vMod" }, | |
| 4056 | #define DISCRETE_SCHMITT_OSCILLATOR(NODE,ENAB,INP0,AMPL,TABLE) { NODE, DSS_SCHMITT_OSC , 3, { ENAB,INP0,AMPL }, { ENAB,INP0,AMPL }, TABLE, "Schmitt Feedback Oscillator" }, | |
| 4053 | #define DISCRETE_INVERTER_OSC(NODE,ENAB,MOD,RCHARGE,RP,C,R2,INFO) { NODE, DSS_INVERTER_OSC, 6, { ENAB,MOD,NODE_NC,NODE_NC,NODE_NC }, { ENAB,MOD,RCHARGE,RP,C,R2 }, INFO, "DISCRETE_INVERTER_OSC" }, | |
| 4054 | #define DISCRETE_OP_AMP_OSCILLATOR(NODE,ENAB,INFO) { NODE, DSS_OP_AMP_OSC , 1, { ENAB }, { ENAB }, INFO, "DISCRETE_OP_AMP_OSCILLATOR" }, | |
| 4055 | #define DISCRETE_OP_AMP_VCO1(NODE,ENAB,VMOD1,INFO) { NODE, DSS_OP_AMP_OSC , 2, { ENAB,VMOD1 }, { ENAB,VMOD1 }, INFO, "DISCRETE_OP_AMP_VCO1" }, | |
| 4056 | #define DISCRETE_OP_AMP_VCO2(NODE,ENAB,VMOD1,VMOD2,INFO) { NODE, DSS_OP_AMP_OSC , 3, { ENAB,VMOD1,VMOD2 }, { ENAB,VMOD1,VMOD2 }, INFO, "DISCRETE_OP_AMP_VCO2" }, | |
| 4057 | #define DISCRETE_SCHMITT_OSCILLATOR(NODE,ENAB,INP0,AMPL,TABLE) { NODE, DSS_SCHMITT_OSC , 3, { ENAB,INP0,AMPL }, { ENAB,INP0,AMPL }, TABLE, "DISCRETE_SCHMITT_OSCILLATOR" }, | |
| 4057 | 4058 | /* Not yet implemented */ |
| 4058 | #define DISCRETE_ADSR_ENV(NODE,ENAB,TRIGGER,GAIN,ADSRTB) { NODE, DSS_ADSR , 3, { ENAB,TRIGGER,GAIN }, { ENAB,TRIGGER,GAIN }, ADSRTB, "ADSR | |
| 4059 | #define DISCRETE_ADSR_ENV(NODE,ENAB,TRIGGER,GAIN,ADSRTB) { NODE, DSS_ADSR , 3, { ENAB,TRIGGER,GAIN }, { ENAB,TRIGGER,GAIN }, ADSRTB, "DISCRETE_ADSR_ENV | |
| 4059 | 4060 | |
| 4060 | 4061 | /* from disc_mth.c */ |
| 4061 | 4062 | /* generic modules */ |
| 4062 | #define DISCRETE_ADDER2(NODE,ENAB,INP0,INP1) { NODE, DST_ADDER , 3, { ENAB,INP0,INP1 }, { ENAB,INP0,INP1 }, NULL, "Adder 2 Node" }, | |
| 4063 | #define DISCRETE_ADDER3(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_ADDER , 4, { ENAB,INP0,INP1,INP2 }, { ENAB,INP0,INP1,INP2 }, NULL, "Adder 3 Node" }, | |
| 4064 | #define DISCRETE_ADDER4(NODE,ENAB,INP0,INP1,INP2,INP3) { NODE, DST_ADDER , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 }, NULL, "Adder 4 Node" }, | |
| 4065 | #define DISCRETE_CLAMP(NODE,ENAB,INP0,MIN,MAX,CLAMP) { NODE, DST_CLAMP , 5, { ENAB,INP0,MIN,MAX,CLAMP }, { ENAB,INP0,MIN,MAX,CLAMP }, NULL, "Signal Clamp" }, | |
| 4066 | #define DISCRETE_DIVIDE(NODE,ENAB,INP0,INP1) { NODE, DST_DIVIDE , 3, { ENAB,INP0,INP1 }, { ENAB,INP0,INP1 }, NULL, "Divider" }, | |
| 4067 | #define DISCRETE_GAIN(NODE,INP0,GAIN) { NODE, DST_GAIN , 4, { NODE_NC,INP0,NODE_NC,NODE_NC }, { 1,INP0,GAIN,0 }, NULL, "Gain" }, | |
| 4068 | #define DISCRETE_INVERT(NODE,INP0) { NODE, DST_GAIN , 4, { NODE_NC,INP0,NODE_NC,NODE_NC }, { 1,INP0,-1,0 }, NULL, "Inverter" }, | |
| 4069 | #define DISCRETE_LOGIC_INVERT(NODE,ENAB,INP0) { NODE, DST_LOGIC_INV , 2, { ENAB,INP0 }, { ENAB,INP0 }, NULL, "Logic Invertor" }, | |
| 4070 | #define DISCRETE_LOGIC_AND(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_AND , 5, { ENAB,INP0,INP1,NODE_NC,NODE_NC }, { ENAB,INP0,INP1,1.0,1.0 }, NULL, "Logic AND (2inp)" }, | |
| 4071 | #define DISCRETE_LOGIC_AND3(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_LOGIC_AND , 5, { ENAB,INP0,INP1,INP2,NODE_NC }, { ENAB,INP0,INP1,INP2,1.0 }, NULL, "Logic AND (3inp)" }, | |
| 4072 | #define DISCRETE_LOGIC_AND4(NODE,ENAB,INP0,INP1,INP2,INP3) { NODE, DST_LOGIC_AND , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 } ,NULL, "Logic AND (4inp)" }, | |
| 4073 | #define DISCRETE_LOGIC_NAND(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_NAND , 5, { ENAB,INP0,INP1,NODE_NC,NODE_NC }, { ENAB,INP0,INP1,1.0,1.0 }, NULL, "Logic NAND (2inp)" }, | |
| 4074 | #define DISCRETE_LOGIC_NAND3(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_LOGIC_NAND , 5, { ENAB,INP0,INP1,INP2,NODE_NC }, { ENAB,INP0,INP1,INP2,1.0 }, NULL, "Logic NAND (3inp)" }, | |
| 4075 | #define DISCRETE_LOGIC_NAND4(NODE,ENAB,INP0,INP1,INP2,INP3) { NODE, DST_LOGIC_NAND , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 }, NULL, "Logic NAND (4inp)" }, | |
| 4076 | #define DISCRETE_LOGIC_OR(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_OR , 5, { ENAB,INP0,INP1,NODE_NC,NODE_NC }, { ENAB,INP0,INP1,0.0,0.0 }, NULL, "Logic OR (2inp)" }, | |
| 4077 | #define DISCRETE_LOGIC_OR3(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_LOGIC_OR , 5, { ENAB,INP0,INP1,INP2,NODE_NC }, { ENAB,INP0,INP1,INP2,0.0 }, NULL, "Logic OR (3inp)" }, | |
| 4078 | #define DISCRETE_LOGIC_OR4(NODE,ENAB,INP0,INP1,INP2,INP3) { NODE, DST_LOGIC_OR , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 }, NULL, "Logic OR (4inp)" }, | |
| 4079 | #define DISCRETE_LOGIC_NOR(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_NOR , 5, { ENAB,INP0,INP1,NODE_NC,NODE_NC }, { ENAB,INP0,INP1,0.0,0.0 }, NULL, "Logic NOR (2inp)" }, | |
| 4080 | #define DISCRETE_LOGIC_NOR3(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_LOGIC_NOR , 5, { ENAB,INP0,INP1,INP2,NODE_NC }, { ENAB,INP0,INP1,INP2,0.0 }, NULL, "Logic NOR (3inp)" }, | |
| 4081 | #define DISCRETE_LOGIC_NOR4(NODE,ENAB,INP0,INP1,INP2,INP3) { NODE, DST_LOGIC_NOR , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 }, NULL, "Logic NOR (4inp)" }, | |
| 4082 | #define DISCRETE_LOGIC_XOR(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_XOR , 3, { ENAB,INP0,INP1 }, { ENAB,INP0,INP1 }, NULL, "Logic XOR (2inp)" }, | |
| 4083 | #define DISCRETE_LOGIC_NXOR(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_NXOR , 3, { ENAB,INP0,INP1 }, { ENAB,INP0,INP1 }, NULL, "Logic NXOR (2inp)" }, | |
| 4084 | #define DISCRETE_LOGIC_DFLIPFLOP(NODE,ENAB,RESET,SET,CLK,INP) { NODE, DST_LOGIC_DFF , 5, { ENAB,RESET,SET,CLK,INP }, { ENAB,RESET,SET,CLK,INP }, NULL, "Logic DFlipFlop" }, | |
| 4085 | #define DISCRETE_LOGIC_JKFLIPFLOP(NODE,ENAB,RESET,SET,CLK,J,K) { NODE, DST_LOGIC_JKFF , 6, { ENAB,RESET,SET,CLK,J,K }, { ENAB,RESET,SET,CLK,J,K }, NULL, "Logic JKFlipFlop" }, | |
| 4086 | #define DISCRETE_LOOKUP_TABLE(NODE,ENAB,ADDR,SIZE,TABLE) { NODE, DST_LOOKUP_TABLE, 3, { ENAB,ADDR,NODE_NC }, { ENAB,ADDR,SIZE }, TABLE, "Lookup Table" }, | |
| 4087 | #define DISCRETE_MULTIPLEX2(NODE,ENAB,ADDR,INP0,INP1) { NODE, DST_MULTIPLEX , 4, { ENAB,ADDR,INP0,INP1 }, { ENAB,ADDR,INP0,INP1 }, NULL, "1 of 2 Multiplexer" }, | |
| 4088 | #define DISCRETE_MULTIPLEX4(NODE,ENAB,ADDR,INP0,INP1,INP2,INP3) { NODE, DST_MULTIPLEX , 6, { ENAB,ADDR,INP0,INP1,INP2,INP3 }, { ENAB,ADDR,INP0,INP1,INP2,INP3 }, NULL, "1 of 4 Multiplexer" }, | |
| 4089 | #define DISCRETE_MULTIPLEX8(NODE,ENAB,ADDR,INP0,INP1,INP2,INP3,INP4,INP5,INP6,INP7) { NODE, DST_MULTIPLEX, 10, { ENAB,ADDR,INP0,INP1,INP2,INP3,INP4,INP5,INP6,INP7 }, { ENAB,ADDR,INP0,INP1,INP2,INP3,INP4,INP5,INP6,INP7 }, NULL, "1 of 8 Multiplexer" }, | |
| 4090 | #define DISCRETE_MULTIPLY(NODE,ENAB,INP0,INP1) { NODE, DST_GAIN , 4, { ENAB,INP0,INP1,NODE_NC }, { ENAB,INP0,INP1,0 }, NULL, "Multiplier" }, | |
| 4091 | #define DISCRETE_MULTADD(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_GAIN , 4, { ENAB,INP0,INP1,INP2 }, { ENAB,INP0,INP1,INP2 }, NULL, "Multiply/Add" }, | |
| 4092 | #define DISCRETE_ONESHOT(NODE,TRIG,AMPL,WIDTH,TYPE) { NODE, DST_ONESHOT , 5, { NODE_NC,TRIG,AMPL,WIDTH,NODE_NC }, { 0,TRIG,AMPL,WIDTH,TYPE }, NULL, "One Shot" }, | |
| 4063 | #define DISCRETE_ADDER2(NODE,ENAB,INP0,INP1) { NODE, DST_ADDER , 3, { ENAB,INP0,INP1 }, { ENAB,INP0,INP1 }, NULL, "DISCRETE_ADDER2" }, | |
| 4064 | #define DISCRETE_ADDER3(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_ADDER , 4, { ENAB,INP0,INP1,INP2 }, { ENAB,INP0,INP1,INP2 }, NULL, "DISCRETE_ADDER3" }, | |
| 4065 | #define DISCRETE_ADDER4(NODE,ENAB,INP0,INP1,INP2,INP3) { NODE, DST_ADDER , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 }, NULL, "DISCRETE_ADDER4" }, | |
| 4066 | #define DISCRETE_CLAMP(NODE,ENAB,INP0,MIN,MAX,CLAMP) { NODE, DST_CLAMP , 5, { ENAB,INP0,MIN,MAX,CLAMP }, { ENAB,INP0,MIN,MAX,CLAMP }, NULL, "DISCRETE_CLAMP" }, | |
| 4067 | #define DISCRETE_DIVIDE(NODE,ENAB,INP0,INP1) { NODE, DST_DIVIDE , 3, { ENAB,INP0,INP1 }, { ENAB,INP0,INP1 }, NULL, "DISCRETE_DIVIDE" }, | |
| 4068 | #define DISCRETE_GAIN(NODE,INP0,GAIN) { NODE, DST_GAIN , 4, { NODE_NC,INP0,NODE_NC,NODE_NC }, { 1,INP0,GAIN,0 }, NULL, "DISCRETE_GAIN" }, | |
| 4069 | #define DISCRETE_INVERT(NODE,INP0) { NODE, DST_GAIN , 4, { NODE_NC,INP0,NODE_NC,NODE_NC }, { 1,INP0,-1,0 }, NULL, "DISCRETE_INVERT" }, | |
| 4070 | #define DISCRETE_LOGIC_INVERT(NODE,ENAB,INP0) { NODE, DST_LOGIC_INV , 2, { ENAB,INP0 }, { ENAB,INP0 }, NULL, "DISCRETE_LOGIC_INVERT" }, | |
| 4071 | #define DISCRETE_LOGIC_AND(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_AND , 5, { ENAB,INP0,INP1,NODE_NC,NODE_NC }, { ENAB,INP0,INP1,1.0,1.0 }, NULL, "DISCRETE_LOGIC_AND" }, | |
| 4072 | #define DISCRETE_LOGIC_AND3(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_LOGIC_AND , 5, { ENAB,INP0,INP1,INP2,NODE_NC }, { ENAB,INP0,INP1,INP2,1.0 }, NULL, "DISCRETE_LOGIC_AND3" }, | |
| 4073 | #define DISCRETE_LOGIC_AND4(NODE,ENAB,INP0,INP1,INP2,INP3) { NODE, DST_LOGIC_AND , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 } ,NULL, "DISCRETE_LOGIC_AND4" }, | |
| 4074 | #define DISCRETE_LOGIC_NAND(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_NAND , 5, { ENAB,INP0,INP1,NODE_NC,NODE_NC }, { ENAB,INP0,INP1,1.0,1.0 }, NULL, "DISCRETE_LOGIC_NAND" }, | |
| 4075 | #define DISCRETE_LOGIC_NAND3(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_LOGIC_NAND , 5, { ENAB,INP0,INP1,INP2,NODE_NC }, { ENAB,INP0,INP1,INP2,1.0 }, NULL, "DISCRETE_LOGIC_NAND3" }, | |
| 4076 | #define DISCRETE_LOGIC_NAND4(NODE,ENAB,INP0,INP1,INP2,INP3) { NODE, DST_LOGIC_NAND , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 }, NULL, ")DISCRETE_LOGIC_NAND4" }, | |
| 4077 | #define DISCRETE_LOGIC_OR(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_OR , 5, { ENAB,INP0,INP1,NODE_NC,NODE_NC }, { ENAB,INP0,INP1,0.0,0.0 }, NULL, "DISCRETE_LOGIC_OR" }, | |
| 4078 | #define DISCRETE_LOGIC_OR3(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_LOGIC_OR , 5, { ENAB,INP0,INP1,INP2,NODE_NC }, { ENAB,INP0,INP1,INP2,0.0 }, NULL, "DISCRETE_LOGIC_OR3" }, | |
| 4079 | #define DISCRETE_LOGIC_OR4(NODE,ENAB,INP0,INP1,INP2,INP3) { NODE, DST_LOGIC_OR , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 }, NULL, "DISCRETE_LOGIC_OR4" }, | |
| 4080 | #define DISCRETE_LOGIC_NOR(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_NOR , 5, { ENAB,INP0,INP1,NODE_NC,NODE_NC }, { ENAB,INP0,INP1,0.0,0.0 }, NULL, "DISCRETE_LOGIC_NOR" }, | |
| 4081 | #define DISCRETE_LOGIC_NOR3(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_LOGIC_NOR , 5, { ENAB,INP0,INP1,INP2,NODE_NC }, { ENAB,INP0,INP1,INP2,0.0 }, NULL, "DISCRETE_LOGIC_NOR3" }, | |
| 4082 | #define DISCRETE_LOGIC_NOR4(NODE,ENAB,INP0,INP1,INP2,INP3) { NODE, DST_LOGIC_NOR , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 }, NULL, "DISCRETE_LOGIC_NOR4" }, | |
| 4083 | #define DISCRETE_LOGIC_XOR(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_XOR , 3, { ENAB,INP0,INP1 }, { ENAB,INP0,INP1 }, NULL, "DISCRETE_LOGIC_XOR" }, | |
| 4084 | #define DISCRETE_LOGIC_NXOR(NODE,ENAB,INP0,INP1) { NODE, DST_LOGIC_NXOR , 3, { ENAB,INP0,INP1 }, { ENAB,INP0,INP1 }, NULL, "DISCRETE_LOGIC_NXOR" }, | |
| 4085 | #define DISCRETE_LOGIC_DFLIPFLOP(NODE,ENAB,RESET,SET,CLK,INP) { NODE, DST_LOGIC_DFF , 5, { ENAB,RESET,SET,CLK,INP }, { ENAB,RESET,SET,CLK,INP }, NULL, "DISCRETE_LOGIC_DFLIPFLOP" }, | |
| 4086 | #define DISCRETE_LOGIC_JKFLIPFLOP(NODE,ENAB,RESET,SET,CLK,J,K) { NODE, DST_LOGIC_JKFF , 6, { ENAB,RESET,SET,CLK,J,K }, { ENAB,RESET,SET,CLK,J,K }, NULL, "DISCRETE_LOGIC_JKFLIPFLOP" }, | |
| 4087 | #define DISCRETE_LOOKUP_TABLE(NODE,ENAB,ADDR,SIZE,TABLE) { NODE, DST_LOOKUP_TABLE, 3, { ENAB,ADDR,NODE_NC }, { ENAB,ADDR,SIZE }, TABLE, "DISCRETE_LOOKUP_TABLE" }, | |
| 4088 | #define DISCRETE_MULTIPLEX2(NODE,ENAB,ADDR,INP0,INP1) { NODE, DST_MULTIPLEX , 4, { ENAB,ADDR,INP0,INP1 }, { ENAB,ADDR,INP0,INP1 }, NULL, "DISCRETE_MULTIPLEX2" }, | |
| 4089 | #define DISCRETE_MULTIPLEX4(NODE,ENAB,ADDR,INP0,INP1,INP2,INP3) { NODE, DST_MULTIPLEX , 6, { ENAB,ADDR,INP0,INP1,INP2,INP3 }, { ENAB,ADDR,INP0,INP1,INP2,INP3 }, NULL, "DISCRETE_MULTIPLEX4" }, | |
| 4090 | #define DISCRETE_MULTIPLEX8(NODE,ENAB,ADDR,INP0,INP1,INP2,INP3,INP4,INP5,INP6,INP7) { NODE, DST_MULTIPLEX, 10, { ENAB,ADDR,INP0,INP1,INP2,INP3,INP4,INP5,INP6,INP7 }, { ENAB,ADDR,INP0,INP1,INP2,INP3,INP4,INP5,INP6,INP7 }, NULL, "DISCRETE_MULTIPLEX8" }, | |
| 4091 | #define DISCRETE_MULTIPLY(NODE,ENAB,INP0,INP1) { NODE, DST_GAIN , 4, { ENAB,INP0,INP1,NODE_NC }, { ENAB,INP0,INP1,0 }, NULL, "DISCRETE_MULTIPLY" }, | |
| 4092 | #define DISCRETE_MULTADD(NODE,ENAB,INP0,INP1,INP2) { NODE, DST_GAIN , 4, { ENAB,INP0,INP1,INP2 }, { ENAB,INP0,INP1,INP2 }, NULL, "DISCRETE_MULTADD" }, | |
| 4093 | #define DISCRETE_ONESHOT(NODE,TRIG,AMPL,WIDTH,TYPE) { NODE, DST_ONESHOT , 5, { NODE_NC,TRIG,AMPL,WIDTH,NODE_NC }, { 0,TRIG,AMPL,WIDTH,TYPE }, NULL, "DISCRETE_ONESHOT" }, | |
| 4093 | 4094 | #define DISCRETE_ONESHOTR(NODE,RESET,TRIG,AMPL,WIDTH,TYPE) { NODE, DST_ONESHOT , 5, { RESET,TRIG,AMPL,WIDTH,NODE_NC }, { RESET,TRIG,AMPL,WIDTH,TYPE }, NULL, "One Shot Resetable" }, |
| 4094 | #define DISCRETE_ONOFF(NODE,ENAB,INP0) { NODE, DST_GAIN , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,0,1,0 }, NULL, "OnOff Switch" }, | |
| 4095 | #define DISCRETE_RAMP(NODE,ENAB,RAMP,GRAD,START,END,CLAMP) { NODE, DST_RAMP , 6, { ENAB,RAMP,GRAD,START,END,CLAMP }, { ENAB,RAMP,GRAD,START,END,CLAMP }, NULL, "Ramp Up/Down" }, | |
| 4096 | #define DISCRETE_SAMPLHOLD(NODE,ENAB,INP0,CLOCK,CLKTYPE) { NODE, DST_SAMPHOLD , 4, { ENAB,INP0,CLOCK,NODE_NC }, { ENAB,INP0,CLOCK,CLKTYPE }, NULL, "Sample & Hold" }, | |
| 4097 | #define DISCRETE_SWITCH(NODE,ENAB,SWITCH,INP0,INP1) { NODE, DST_SWITCH , 4, { ENAB,SWITCH,INP0,INP1 }, { ENAB,SWITCH,INP0,INP1 }, NULL, "2 Pole Switch" }, | |
| 4095 | #define DISCRETE_ONOFF(NODE,ENAB,INP0) { NODE, DST_GAIN , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,0,1,0 }, NULL, "DISCRETE_ONOFF" }, | |
| 4096 | #define DISCRETE_RAMP(NODE,ENAB,RAMP,GRAD,START,END,CLAMP) { NODE, DST_RAMP , 6, { ENAB,RAMP,GRAD,START,END,CLAMP }, { ENAB,RAMP,GRAD,START,END,CLAMP }, NULL, "DISCRETE_RAMP" }, | |
| 4097 | #define DISCRETE_SAMPLHOLD(NODE,ENAB,INP0,CLOCK,CLKTYPE) { NODE, DST_SAMPHOLD , 4, { ENAB,INP0,CLOCK,NODE_NC }, { ENAB,INP0,CLOCK,CLKTYPE }, NULL, "DISCRETE_SAMPLHOLD" }, | |
| 4098 | #define DISCRETE_SWITCH(NODE,ENAB,SWITCH,INP0,INP1) { NODE, DST_SWITCH , 4, { ENAB,SWITCH,INP0,INP1 }, { ENAB,SWITCH,INP0,INP1 }, NULL, "DISCRETE_SWITCH" }, | |
| 4098 | 4099 | #define DISCRETE_ASWITCH(NODE,ENAB,CTRL,INP,THRESHOLD) { NODE, DST_ASWITCH , 3, { ENAB,CTRL,INP,THRESHOLD }, { ENAB,CTRL,INP, THRESHOLD}, NULL, "Analog Switch" }, |
| 4099 | #define DISCRETE_TRANSFORM2(NODE,ENAB,INP0,INP1,FUNCT) { NODE, DST_TRANSFORM , 3, { ENAB,INP0,INP1 }, { ENAB,INP0,INP1 }, FUNCT, "Transform 2 Nodes" }, | |
| 4100 | #define DISCRETE_TRANSFORM3(NODE,ENAB,INP0,INP1,INP2,FUNCT) { NODE, DST_TRANSFORM , 4, { ENAB,INP0,INP1,INP2 }, { ENAB,INP0,INP1,INP2 }, FUNCT, "Transform 3 Nodes" }, | |
| 4101 | #define DISCRETE_TRANSFORM4(NODE,ENAB,INP0,INP1,INP2,INP3,FUNCT) { NODE, DST_TRANSFORM , 5, { ENAB,INP0,INP1,INP2,INP3 }, { ENAB,INP0,INP1,INP2,INP3 }, FUNCT, "Transform 4 Nodes" }, | |
| 4102 | #define DISCRETE_TRANSFORM5(NODE,ENAB,INP0,INP1,INP2,INP3,INP4,FUNCT) { NODE, DST_TRANSFORM , 6, { ENAB,INP0,INP1,INP2,INP3,INP4 }, { ENAB,INP0,INP1,INP2,INP3,INP4 }, FUNCT, "Transform 5 Nodes" }, | |
| 4100 | #define DISCRETE_TRANSFORM2(NODE,INP0,INP1,FUNCT) { NODE, DST_TRANSFORM , 2, { INP0,INP1 }, { INP0,INP1 }, FUNCT, "DISCRETE_TRANSFORM2" }, | |
| 4101 | #define DISCRETE_TRANSFORM3(NODE,INP0,INP1,INP2,FUNCT) { NODE, DST_TRANSFORM , 3, { INP0,INP1,INP2 }, { INP0,INP1,INP2 }, FUNCT, "DISCRETE_TRANSFORM3" }, | |
| 4102 | #define DISCRETE_TRANSFORM4(NODE,INP0,INP1,INP2,INP3,FUNCT) { NODE, DST_TRANSFORM , 4, { INP0,INP1,INP2,INP3 }, { INP0,INP1,INP2,INP3 }, FUNCT, "DISCRETE_TRANSFORM4" }, | |
| 4103 | #define DISCRETE_TRANSFORM5(NODE,INP0,INP1,INP2,INP3,INP4,FUNCT) { NODE, DST_TRANSFORM , 5, { INP0,INP1,INP2,INP3,INP4 }, { INP0,INP1,INP2,INP3,INP4 }, FUNCT, "DISCRETE_TRANSFORM5" }, | |
| 4103 | 4104 | /* Component specific */ |
| 4104 | #define DISCRETE_COMP_ADDER(NODE,ENAB,DATA,TABLE) { NODE, DST_COMP_ADDER , 2, { ENAB,DATA }, { ENAB,DATA }, TABLE, "Selectable R or C component Adder" }, | |
| 4105 | #define DISCRETE_DAC_R1(NODE,ENAB,DATA,VDATA,LADDER) { NODE, DST_DAC_R1 , 3, { ENAB,DATA,VDATA }, { ENAB,DATA,VDATA }, LADDER, "DAC with R1 Ladder" }, | |
| 4106 | #define DISCRETE_DIODE_MIXER2(NODE,ENAB,VJUNC,IN0,IN1) { NODE, DST_DIODE_MIX , 4, { ENAB,NODE_NC,IN0,IN1 }, { ENAB,VJUNC,IN0,IN1 }, NULL, "Diode Mixer 2 Stage" }, | |
| 4107 | #define DISCRETE_DIODE_MIXER3(NODE,ENAB,VJUNC,IN0,IN1,IN2) { NODE, DST_DIODE_MIX , 5, { ENAB,NODE_NC,IN0,IN1,IN2 }, { ENAB,VJUNC,IN0,IN1,IN2 }, INFO, "Diode Mixer 3 Stage" }, | |
| 4108 | #define DISCRETE_DIODE_MIXER4(NODE,ENAB,VJUNC,IN0,IN1,IN2,IN3) { NODE, DST_DIODE_MIX , 6, { ENAB,NODE_NC,IN0,IN1,IN2,IN3 }, { ENAB,VJUNC,IN0,IN1,IN2,IN3 }, INFO, "Diode Mixer 4 Stage" }, | |
| 4109 | #define DISCRETE_INTEGRATE(NODE,TRG0,TRG1,INFO) { NODE, DST_INTEGRATE , 2, { TRG0,TRG1 }, { TRG0,TRG1 }, INFO, "Various Integraton Circuit" }, | |
| 4110 | #define DISCRETE_MIXER2(NODE,ENAB,IN0,IN1,INFO) { NODE, DST_MIXER , 3, { ENAB,IN0,IN1 }, { ENAB,IN0,IN1 }, INFO, "Final Mixer 2 Stage" }, | |
| 4111 | #define DISCRETE_MIXER3(NODE,ENAB,IN0,IN1,IN2,INFO) { NODE, DST_MIXER , 4, { ENAB,IN0,IN1,IN2 }, { ENAB,IN0,IN1,IN2 }, INFO, "Final Mixer 3 Stage" }, | |
| 4112 | #define DISCRETE_MIXER4(NODE,ENAB,IN0,IN1,IN2,IN3,INFO) { NODE, DST_MIXER , 5, { ENAB,IN0,IN1,IN2,IN3 }, { ENAB,IN0,IN1,IN2,IN3 }, INFO, "Final Mixer 4 Stage" }, | |
| 4113 | #define DISCRETE_MIXER5(NODE,ENAB,IN0,IN1,IN2,IN3,IN4,INFO) { NODE, DST_MIXER , 6, { ENAB,IN0,IN1,IN2,IN3,IN4 }, { ENAB,IN0,IN1,IN2,IN3,IN4 }, INFO, "Final Mixer 5 Stage" }, | |
| 4114 | #define DISCRETE_MIXER6(NODE,ENAB,IN0,IN1,IN2,IN3,IN4,IN5,INFO) { NODE, DST_MIXER , 7, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5 }, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5 }, INFO, "Final Mixer 6 Stage" }, | |
| 4115 | #define DISCRETE_MIXER7(NODE,ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6,INFO) { NODE, DST_MIXER , 8, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6 }, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6 }, INFO, "Final Mixer 7 Stage" }, | |
| 4116 | #define DISCRETE_MIXER8(NODE,ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6,IN7,INFO) { NODE, DST_MIXER , 9, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6,IN7 }, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6,IN7 }, INFO, "Final Mixer 8 Stage" }, | |
| 4117 | #define DISCRETE_OP_AMP(NODE,ENAB,IN0,IN1,INFO) { NODE, DST_OP_AMP , 3, { ENAB,IN0,IN1 }, { ENAB,IN0,IN1 }, INFO, "Op Amp Circuit" }, | |
| 4118 | #define DISCRETE_OP_AMP_ONESHOT(NODE,TRIG,INFO) { NODE, DST_OP_AMP_1SHT , 1, { TRIG }, { TRIG }, INFO, "Op Amp One Shot" }, | |
| 4119 | #define DISCRETE_OP_AMP_TRIG_VCA(NODE,TRG0,TRG1,TRG2,IN0,IN1,INFO) { NODE, DST_TVCA_OP_AMP , 5, { TRG0,TRG1,TRG2,IN0,IN1 }, { TRG0,TRG1,TRG2,IN0,IN1 }, INFO, "Triggered VCA Op Amp Circuit" }, | |
| 4120 | #define DISCRETE_VCA(NODE,ENAB,IN0,CTRL,TYPE) { NODE, DST_VCA , 4, { ENAB,IN0,CTRL,NODE_NC }, { ENAB,IN0,CTRL,TYPE }, NULL, "VCA IC" }, | |
| 4105 | #define DISCRETE_COMP_ADDER(NODE,ENAB,DATA,TABLE) { NODE, DST_COMP_ADDER , 2, { ENAB,DATA }, { ENAB,DATA }, TABLE, "DISCRETE_COMP_ADDER" }, | |
| 4106 | #define DISCRETE_DAC_R1(NODE,ENAB,DATA,VDATA,LADDER) { NODE, DST_DAC_R1 , 3, { ENAB,DATA,VDATA }, { ENAB,DATA,VDATA }, LADDER, "DISCRETE_DAC_R1" }, | |
| 4107 | #define DISCRETE_DIODE_MIXER2(NODE,VJUNC,IN0,IN1) { NODE, DST_DIODE_MIX , 3, { NODE_NC,IN0,IN1 }, { VJUNC,IN0,IN1 }, NULL, "DISCRETE_DIODE_MIXER2" }, | |
| 4108 | #define DISCRETE_DIODE_MIXER3(NODE,VJUNC,IN0,IN1,IN2) { NODE, DST_DIODE_MIX , 4, { NODE_NC,IN0,IN1,IN2 }, { VJUNC,IN0,IN1,IN2 }, INFO, "DISCRETE_DIODE_MIXER3" }, | |
| 4109 | #define DISCRETE_DIODE_MIXER4(NODE,VJUNC,IN0,IN1,IN2,IN3) { NODE, DST_DIODE_MIX , 5, { NODE_NC,IN0,IN1,IN2,IN3 }, { VJUNC,IN0,IN1,IN2,IN3 }, INFO, "DISCRETE_DIODE_MIXER4" }, | |
| 4110 | #define DISCRETE_INTEGRATE(NODE,TRG0,TRG1,INFO) { NODE, DST_INTEGRATE , 2, { TRG0,TRG1 }, { TRG0,TRG1 }, INFO, "DISCRETE_INTEGRATE" }, | |
| 4111 | #define DISCRETE_MIXER2(NODE,ENAB,IN0,IN1,INFO) { NODE, DST_MIXER , 3, { ENAB,IN0,IN1 }, { ENAB,IN0,IN1 }, INFO, "DISCRETE_MIXER2" }, | |
| 4112 | #define DISCRETE_MIXER3(NODE,ENAB,IN0,IN1,IN2,INFO) { NODE, DST_MIXER , 4, { ENAB,IN0,IN1,IN2 }, { ENAB,IN0,IN1,IN2 }, INFO, "DISCRETE_MIXER3" }, | |
| 4113 | #define DISCRETE_MIXER4(NODE,ENAB,IN0,IN1,IN2,IN3,INFO) { NODE, DST_MIXER , 5, { ENAB,IN0,IN1,IN2,IN3 }, { ENAB,IN0,IN1,IN2,IN3 }, INFO, "DISCRETE_MIXER4" }, | |
| 4114 | #define DISCRETE_MIXER5(NODE,ENAB,IN0,IN1,IN2,IN3,IN4,INFO) { NODE, DST_MIXER , 6, { ENAB,IN0,IN1,IN2,IN3,IN4 }, { ENAB,IN0,IN1,IN2,IN3,IN4 }, INFO, "DISCRETE_MIXER5" }, | |
| 4115 | #define DISCRETE_MIXER6(NODE,ENAB,IN0,IN1,IN2,IN3,IN4,IN5,INFO) { NODE, DST_MIXER , 7, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5 }, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5 }, INFO, "DISCRETE_MIXER6" }, | |
| 4116 | #define DISCRETE_MIXER7(NODE,ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6,INFO) { NODE, DST_MIXER , 8, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6 }, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6 }, INFO, "DISCRETE_MIXER7" }, | |
| 4117 | #define DISCRETE_MIXER8(NODE,ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6,IN7,INFO) { NODE, DST_MIXER , 9, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6,IN7 }, { ENAB,IN0,IN1,IN2,IN3,IN4,IN5,IN6,IN7 }, INFO, "DISCRETE_MIXER8" }, | |
| 4118 | #define DISCRETE_OP_AMP(NODE,ENAB,IN0,IN1,INFO) { NODE, DST_OP_AMP , 3, { ENAB,IN0,IN1 }, { ENAB,IN0,IN1 }, INFO, "DISCRETE_OP_AMP" }, | |
| 4119 | #define DISCRETE_OP_AMP_ONESHOT(NODE,TRIG,INFO) { NODE, DST_OP_AMP_1SHT , 1, { TRIG }, { TRIG }, INFO, "DISCRETE_OP_AMP_ONESHOT" }, | |
| 4120 | #define DISCRETE_OP_AMP_TRIG_VCA(NODE,TRG0,TRG1,TRG2,IN0,IN1,INFO) { NODE, DST_TVCA_OP_AMP , 5, { TRG0,TRG1,TRG2,IN0,IN1 }, { TRG0,TRG1,TRG2,IN0,IN1 }, INFO, "DISCRETE_OP_AMP_TRIG_VCA" }, | |
| 4121 | #define DISCRETE_VCA(NODE,ENAB,IN0,CTRL,TYPE) { NODE, DST_VCA , 4, { ENAB,IN0,CTRL,NODE_NC }, { ENAB,IN0,CTRL,TYPE }, NULL, "DISCRETE_VCA" }, | |
| 4121 | 4122 | |
| 4122 | 4123 | /* from disc_flt.c */ |
| 4123 | 4124 | /* generic modules */ |
| 4124 | #define DISCRETE_FILTER1(NODE,ENAB,INP0,FREQ,TYPE) { NODE, DST_FILTER1 , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,FREQ,TYPE }, NULL, "1st Order Filter" }, | |
| 4125 | #define DISCRETE_FILTER2(NODE,ENAB,INP0,FREQ,DAMP,TYPE) { NODE, DST_FILTER2 , 5, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,FREQ,DAMP,TYPE }, NULL, "2nd Order Filter" }, | |
| 4125 | #define DISCRETE_FILTER1(NODE,ENAB,INP0,FREQ,TYPE) { NODE, DST_FILTER1 , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,FREQ,TYPE }, NULL, "DISCRETE_FILTER1" }, | |
| 4126 | #define DISCRETE_FILTER2(NODE,ENAB,INP0,FREQ,DAMP,TYPE) { NODE, DST_FILTER2 , 5, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,FREQ,DAMP,TYPE }, NULL, "DISCRETE_FILTER2" }, | |
| 4126 | 4127 | /* Component specific */ |
| 4127 | #define DISCRETE_SALLEN_KEY_FILTER(NODE,ENAB,INP0,TYPE,INFO) { NODE, DST_SALLEN_KEY , 3, { ENAB,INP0,NODE_NC }, { ENAB,INP0,TYPE }, INFO, "Sallen-Key Filter" }, | |
| 4128 | #define DISCRETE_CRFILTER(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_CRFILTER , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "CR Filter" }, | |
| 4129 | #define DISCRETE_CRFILTER_VREF(NODE,ENAB,INP0,RVAL,CVAL,VREF) { NODE, DST_CRFILTER , 5, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL,VREF }, NULL, "CR Filter to VREF" }, | |
| 4130 | #define DISCRETE_OP_AMP_FILTER(NODE,ENAB,INP0,INP1,TYPE,INFO) { NODE, DST_OP_AMP_FILT , 4, { ENAB,INP0,INP1,NODE_NC }, { ENAB,INP0,INP1,TYPE }, INFO, "Op Amp Filter" }, | |
| 4131 | #define DISCRETE_RCDISC(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_RCDISC , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "RC Discharge" }, | |
| 4132 | #define DISCRETE_RCDISC2(NODE,SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL) { NODE, DST_RCDISC2 , 6, { SWITCH,INP0,NODE_NC,INP1,NODE_NC,NODE_NC }, { SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL }, NULL, "RC Discharge 2" }, | |
| 4133 | #define DISCRETE_RCDISC3(NODE,ENAB,INP0,RVAL0,RVAL1,CVAL) { NODE, DST_RCDISC3 , 5, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL0,RVAL1,CVAL }, NULL, "RC Discharge 3" }, | |
| 4134 | #define DISCRETE_RCDISC4(NODE,ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,VP,TYPE) { NODE, DST_RCDISC4 , 8, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,VP,TYPE }, NULL, "RC Discharge 4" }, | |
| 4135 | #define DISCRETE_RCDISC5(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_RCDISC5 , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "RC Discharge 5" }, | |
| 4136 | #define DISCRETE_RCINTEGRATE(NODE,ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,vP,TYPE) { NODE, DST_RCINTEGRATE , 8, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,vP,TYPE }, NULL, "RC Discharge 6" }, | |
| 4137 | #define DISCRETE_RCDISC_MODULATED(NODE,ENAB,INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP) { NODE, DST_RCDISC_MOD , 9, { ENAB,INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP }, { ENAB,INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP }, NULL, "Modulated RC Discharge" }, | |
| 4138 | #define DISCRETE_RCFILTER(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_RCFILTER , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "RC Filter" }, | |
| 4139 | #define DISCRETE_RCFILTER_SW(NODE,ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4) { NODE, DST_RCFILTER_SW, 8, { ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4 }, { ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4 }, NULL, "RC Filter Switch" }, | |
| 4140 | #define DISCRETE_RCFILTER_VREF(NODE,ENAB,INP0,RVAL,CVAL,VREF) { NODE, DST_RCFILTER , 5, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL,VREF }, NULL, "RC Filter to VREF" }, | |
| 4128 | #define DISCRETE_SALLEN_KEY_FILTER(NODE,ENAB,INP0,TYPE,INFO) { NODE, DST_SALLEN_KEY , 3, { ENAB,INP0,NODE_NC }, { ENAB,INP0,TYPE }, INFO, "DISCRETE_SALLEN_KEY_FILTER" }, | |
| 4129 | #define DISCRETE_CRFILTER(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_CRFILTER , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "DISCRETE_CRFILTER" }, | |
| 4130 | #define DISCRETE_CRFILTER_VREF(NODE,ENAB,INP0,RVAL,CVAL,VREF) { NODE, DST_CRFILTER , 5, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL,VREF }, NULL, "DISCRETE_CRFILTER_VREF" }, | |
| 4131 | #define DISCRETE_OP_AMP_FILTER(NODE,ENAB,INP0,INP1,TYPE,INFO) { NODE, DST_OP_AMP_FILT , 4, { ENAB,INP0,INP1,NODE_NC }, { ENAB,INP0,INP1,TYPE }, INFO, "DISCRETE_OP_AMP_FILTER" }, | |
| 4132 | #define DISCRETE_RCDISC(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_RCDISC , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "DISCRETE_RCDISC" }, | |
| 4133 | #define DISCRETE_RCDISC2(NODE,SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL) { NODE, DST_RCDISC2 , 6, { SWITCH,INP0,NODE_NC,INP1,NODE_NC,NODE_NC }, { SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL }, NULL, "DISCRETE_RCDISC2" }, | |
| 4134 | #define DISCRETE_RCDISC3(NODE,ENAB,INP0,RVAL0,RVAL1,CVAL) { NODE, DST_RCDISC3 , 5, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL0,RVAL1,CVAL }, NULL, "DISCRETE_RCDISC3" }, | |
| 4135 | #define DISCRETE_RCDISC4(NODE,ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,VP,TYPE) { NODE, DST_RCDISC4 , 8, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,VP,TYPE }, NULL, "DISCRETE_RCDISC4" }, | |
| 4136 | #define DISCRETE_RCDISC5(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_RCDISC5 , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "DISCRETE_RCDISC5" }, | |
| 4137 | #define DISCRETE_RCDISC_MODULATED(NODE,INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP) { NODE, DST_RCDISC_MOD, 8, { INP0,INP1,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP }, NULL, "DISCRETE_RCDISC_MODULATED" }, | |
| 4138 | #define DISCRETE_RCFILTER(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_RCFILTER , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "DISCRETE_RCFILTER" }, | |
| 4139 | #define DISCRETE_RCFILTER_SW(NODE,ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4) { NODE, DST_RCFILTER_SW, 8, { ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4 }, { ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4 }, NULL, "DISCRETE_RCFILTER_SW" }, | |
| 4140 | #define DISCRETE_RCFILTER_VREF(NODE,ENAB,INP0,RVAL,CVAL,VREF) { NODE, DST_RCFILTER , 5, { ENAB,INP0,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL,VREF }, NULL, "DISCRETE_RCFILTER_VREF" }, | |
| 4141 | #define DISCRETE_RCINTEGRATE(NODE,INP0,RVAL0,RVAL1,RVAL2,CVAL,vP,TYPE) { NODE, DST_RCINTEGRATE , 7, { INP0,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { INP0,RVAL0,RVAL1,RVAL2,CVAL,vP,TYPE }, NULL, "DISCRETE_RCINTEGRATE" }, | |
| 4141 | 4142 | /* For testing - seem to be buggered. Use versions not ending in N. */ |
| 4142 | #define DISCRETE_RCDISCN(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_RCDISCN , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "RC Discharge (New Type)" }, | |
| 4143 | #define DISCRETE_RCDISC2N(NODE,SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL) { NODE, DST_RCDISC2N , 6, { SWITCH,INP0,NODE_NC,INP1,NODE_NC,NODE_NC }, { SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL }, NULL, "RC Discharge 2 (New Type)" }, | |
| 4144 | #define DISCRETE_RCFILTERN(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_RCFILTERN , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "RC Filter (New Type)" }, | |
| 4143 | #define DISCRETE_RCDISCN(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_RCDISCN , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "DISCRETE_RCDISCN" }, | |
| 4144 | #define DISCRETE_RCDISC2N(NODE,SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL) { NODE, DST_RCDISC2N , 6, { SWITCH,INP0,NODE_NC,INP1,NODE_NC,NODE_NC }, { SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL }, NULL, "DISCRETE_RCDISC2N" }, | |
| 4145 | #define DISCRETE_RCFILTERN(NODE,ENAB,INP0,RVAL,CVAL) { NODE, DST_RCFILTERN , 4, { ENAB,INP0,NODE_NC,NODE_NC }, { ENAB,INP0,RVAL,CVAL }, NULL, "DISCRETE_RCFILTERN" }, | |
| 4145 | 4146 | |
| 4146 | 4147 | /* from disc_dev.c */ |
| 4147 | 4148 | /* generic modules */ |
| 4148 | #define DISCRETE_CUSTOM1(NODE,ENAB,IN0,INFO) { NODE, DST_CUSTOM , 2, { ENAB,IN0 }, { ENAB,IN0 }, INFO, "1 input custom module" }, | |
| 4149 | #define DISCRETE_CUSTOM2(NODE,ENAB,IN0,IN1,INFO) { NODE, DST_CUSTOM , 3, { ENAB,IN0,IN1 }, { ENAB,IN0,IN1 }, INFO, "2 input custom module" }, | |
| 4150 | #define DISCRETE_CUSTOM3(NODE,ENAB,IN0,IN1,IN2,INFO) { NODE, DST_CUSTOM , 4, { ENAB,IN0,IN1,IN2 }, { ENAB,IN0,IN1,IN2 }, INFO, "3 input custom module" }, | |
| 4151 | #define DISCRETE_CUSTOM4(NODE,ENAB,IN0,IN1,IN2,IN3,INFO) { NODE, DST_CUSTOM , 5, { ENAB,IN0,IN1,IN2,IN3 }, { ENAB,IN0,IN1,IN2,IN3 }, INFO, "4 input custom module" }, | |
| 4152 | #define DISCRETE_CUSTOM5(NODE,ENAB,IN0,IN1,IN2,IN3,IN4,INFO) { NODE, DST_CUSTOM , 6, { ENAB,IN0,IN1,IN2,IN3,IN4 }, { ENAB,IN0,IN1,IN2,IN3,IN4 }, INFO, "4 input custom module" }, | |
| 4149 | #define DISCRETE_CUSTOM1(NODE,ENAB,IN0,INFO) { NODE, DST_CUSTOM , 2, { ENAB,IN0 }, { ENAB,IN0 }, INFO, "DISCRETE_CUSTOM1" }, | |
| 4150 | #define DISCRETE_CUSTOM2(NODE,ENAB,IN0,IN1,INFO) { NODE, DST_CUSTOM , 3, { ENAB,IN0,IN1 }, { ENAB,IN0,IN1 }, INFO, "DISCRETE_CUSTOM2" }, | |
| 4151 | #define DISCRETE_CUSTOM3(NODE,ENAB,IN0,IN1,IN2,INFO) { NODE, DST_CUSTOM , 4, { ENAB,IN0,IN1,IN2 }, { ENAB,IN0,IN1,IN2 }, INFO, "DISCRETE_CUSTOM3" }, | |
| 4152 | #define DISCRETE_CUSTOM4(NODE,ENAB,IN0,IN1,IN2,IN3,INFO) { NODE, DST_CUSTOM , 5, { ENAB,IN0,IN1,IN2,IN3 }, { ENAB,IN0,IN1,IN2,IN3 }, INFO, "DISCRETE_CUSTOM4" }, | |
| 4153 | #define DISCRETE_CUSTOM5(NODE,ENAB,IN0,IN1,IN2,IN3,IN4,INFO) { NODE, DST_CUSTOM , 6, { ENAB,IN0,IN1,IN2,IN3,IN4 }, { ENAB,IN0,IN1,IN2,IN3,IN4 }, INFO, "DISCRETE_CUSTOM5" }, | |
| 4153 | 4154 | /* Component specific */ |
| 4154 | #define DISCRETE_555_ASTABLE(NODE,RESET,R1,R2,C,OPTIONS) { NODE, DSD_555_ASTBL , 5, { RESET,R1,R2,C,NODE_NC }, { RESET,R1,R2,C,-1 }, OPTIONS, "555 Astable" }, | |
| 4155 | #define DISCRETE_555_ASTABLE_CV(NODE,RESET,R1,R2,C,CTRLV,OPTIONS) { NODE, DSD_555_ASTBL , 5, { RESET,R1,R2,C,CTRLV }, { RESET,R1,R2,C,CTRLV }, OPTIONS, "555 Astable with CV" }, | |
| 4156 | #define DISCRETE_555_MSTABLE(NODE,RESET,TRIG,R,C,OPTIONS) { NODE, DSD_555_MSTBL , 4, { RESET,TRIG,R,C }, { RESET,TRIG,R,C }, OPTIONS, "555 Monostable" }, | |
| 4157 | #define DISCRETE_555_CC(NODE,RESET,VIN,R,C,RBIAS,RGND,RDIS,OPTIONS) { NODE, DSD_555_CC , 7, { RESET,VIN,R,C,RBIAS,RGND,RDIS }, { RESET,VIN,R,C,RBIAS,RGND,RDIS }, OPTIONS, "555 Constant Current VCO" }, | |
| 4158 | #define DISCRETE_555_VCO1(NODE,RESET,VIN,OPTIONS) { NODE, DSD_555_VCO1 , 3, { RESET,VIN,NODE_NC }, { RESET,VIN,-1 }, OPTIONS, "555 VCO1 - Op-Amp type" }, | |
| 4159 | #define DISCRETE_555_VCO1_CV(NODE,RESET,VIN,CTRLV,OPTIONS) { NODE, DSD_555_VCO1 , 3, { RESET,VIN,CTRLV }, { RESET,VIN,CTRLV }, OPTIONS, "555 VCO1 with CV - Op-Amp type" }, | |
| 4160 | #define DISCRETE_566(NODE,ENAB,VMOD,R,C,OPTIONS) { NODE, DSD_566 , 4, { ENAB,VMOD,R,C }, { ENAB,VMOD,R,C }, OPTIONS, "566" }, | |
| 4161 | #define DISCRETE_74LS624(NODE,ENAB,VMOD,VRNG,C,OUTTYPE) { NODE, DSD_LS624 , 5, { ENAB,VMOD,VRNG,C,NODE_NC }, { ENAB,VMOD,VRNG,C, OUTTYPE }, NULL, "74LS624" }, | |
| 4155 | #define DISCRETE_555_ASTABLE(NODE,RESET,R1,R2,C,OPTIONS) { NODE, DSD_555_ASTBL , 5, { RESET,R1,R2,C,NODE_NC }, { RESET,R1,R2,C,-1 }, OPTIONS, "DISCRETE_555_ASTABLE" }, | |
| 4156 | #define DISCRETE_555_ASTABLE_CV(NODE,RESET,R1,R2,C,CTRLV,OPTIONS) { NODE, DSD_555_ASTBL , 5, { RESET,R1,R2,C,CTRLV }, { RESET,R1,R2,C,CTRLV }, OPTIONS, "DISCRETE_555_ASTABLE_CV" }, | |
| 4157 | #define DISCRETE_555_MSTABLE(NODE,RESET,TRIG,R,C,OPTIONS) { NODE, DSD_555_MSTBL , 4, { RESET,TRIG,R,C }, { RESET,TRIG,R,C }, OPTIONS, "DISCRETE_555_MSTABLE" }, | |
| 4158 | #define DISCRETE_555_CC(NODE,RESET,VIN,R,C,RBIAS,RGND,RDIS,OPTIONS) { NODE, DSD_555_CC , 7, { RESET,VIN,R,C,RBIAS,RGND,RDIS }, { RESET,VIN,R,C,RBIAS,RGND,RDIS }, OPTIONS, "DISCRETE_555_CC" }, | |
| 4159 | #define DISCRETE_555_VCO1(NODE,RESET,VIN,OPTIONS) { NODE, DSD_555_VCO1 , 3, { RESET,VIN,NODE_NC }, { RESET,VIN,-1 }, OPTIONS, "DISCRETE_555_VCO1" }, | |
| 4160 | #define DISCRETE_555_VCO1_CV(NODE,RESET,VIN,CTRLV,OPTIONS) { NODE, DSD_555_VCO1 , 3, { RESET,VIN,CTRLV }, { RESET,VIN,CTRLV }, OPTIONS, "DISCRETE_555_VCO1_CV" }, | |
| 4161 | #define DISCRETE_566(NODE,ENAB,VMOD,R,C,OPTIONS) { NODE, DSD_566 , 4, { ENAB,VMOD,R,C }, { ENAB,VMOD,R,C }, OPTIONS, "DISCRETE_566" }, | |
| 4162 | #define DISCRETE_74LS624(NODE,ENAB,VMOD,VRNG,C,OUTTYPE) { NODE, DSD_LS624 , 5, { ENAB,VMOD,VRNG,C,NODE_NC }, { ENAB,VMOD,VRNG,C, OUTTYPE }, NULL, "DISCRETE_74LS624" }, | |
| 4162 | 4163 | |
| 4163 | 4164 | /* logging */ |
| 4164 | #define DISCRETE_CSVLOG1(NODE1) { NODE_SPECIAL, DSO_CSVLOG , 1, { NODE1 }, { NODE1 }, NULL, "CSV Log 1 Node" }, | |
| 4165 | #define DISCRETE_CSVLOG2(NODE1,NODE2) { NODE_SPECIAL, DSO_CSVLOG , 2, { NODE1,NODE2 }, { NODE1,NODE2 }, NULL, "CSV Log 2 Nodes" }, | |
| 4166 | #define DISCRETE_CSVLOG3(NODE1,NODE2,NODE3) { NODE_SPECIAL, DSO_CSVLOG , 3, { NODE1,NODE2,NODE3 }, { NODE1,NODE2,NODE3 }, NULL, "CSV Log 3 Nodes" }, | |
| 4167 | #define DISCRETE_CSVLOG4(NODE1,NODE2,NODE3,NODE4) { NODE_SPECIAL, DSO_CSVLOG , 4, { NODE1,NODE2,NODE3,NODE4 }, { NODE1,NODE2,NODE3,NODE4 }, NULL, "CSV Log 4 Nodes" }, | |
| 4168 | #define DISCRETE_CSVLOG5(NODE1,NODE2,NODE3,NODE4,NODE5) { NODE_SPECIAL, DSO_CSVLOG , 5, { NODE1,NODE2,NODE3,NODE4,NODE5 }, { NODE1,NODE2,NODE3,NODE4,NODE5 }, NULL, "CSV Log 5 Nodes" }, | |
| 4169 | #define DISCRETE_WAVELOG1(NODE1,GAIN1) { NODE_SPECIAL, DSO_WAVELOG , 2, { NODE1,NODE_NC }, { NODE1,GAIN1 }, NULL, "Wave Log 1 Node" }, | |
| 4170 | #define DISCRETE_WAVELOG2(NODE1,GAIN1,NODE2,GAIN2) { NODE_SPECIAL, DSO_WAVELOG , 4, { NODE1,NODE_NC,NODE2,NODE_NC }, { NODE1,GAIN1,NODE2,GAIN2 }, NULL, "Wave Log 2 Nodes" }, | |
| 4165 | #define DISCRETE_CSVLOG1(NODE1) { NODE_SPECIAL, DSO_CSVLOG , 1, { NODE1 }, { NODE1 }, NULL, "DISCRETE_CSVLOG1" }, | |
| 4166 | #define DISCRETE_CSVLOG2(NODE1,NODE2) { NODE_SPECIAL, DSO_CSVLOG , 2, { NODE1,NODE2 }, { NODE1,NODE2 }, NULL, "DISCRETE_CSVLOG2" }, | |
| 4167 | #define DISCRETE_CSVLOG3(NODE1,NODE2,NODE3) { NODE_SPECIAL, DSO_CSVLOG , 3, { NODE1,NODE2,NODE3 }, { NODE1,NODE2,NODE3 }, NULL, "DISCRETE_CSVLOG3" }, | |
| 4168 | #define DISCRETE_CSVLOG4(NODE1,NODE2,NODE3,NODE4) { NODE_SPECIAL, DSO_CSVLOG , 4, { NODE1,NODE2,NODE3,NODE4 }, { NODE1,NODE2,NODE3,NODE4 }, NULL, "DISCRETE_CSVLOG4" }, | |
| 4169 | #define DISCRETE_CSVLOG5(NODE1,NODE2,NODE3,NODE4,NODE5) { NODE_SPECIAL, DSO_CSVLOG , 5, { NODE1,NODE2,NODE3,NODE4,NODE5 }, { NODE1,NODE2,NODE3,NODE4,NODE5 }, NULL, "DISCRETE_CSVLOG5" }, | |
| 4170 | #define DISCRETE_WAVELOG1(NODE1,GAIN1) { NODE_SPECIAL, DSO_WAVELOG , 2, { NODE1,NODE_NC }, { NODE1,GAIN1 }, NULL, "DISCRETE_WAVELOG1" }, | |
| 4171 | #define DISCRETE_WAVELOG2(NODE1,GAIN1,NODE2,GAIN2) { NODE_SPECIAL, DSO_WAVELOG , 4, { NODE1,NODE_NC,NODE2,NODE_NC }, { NODE1,GAIN1,NODE2,GAIN2 }, NULL, "DISCRETE_WAVELOG2" }, | |
| 4171 | 4172 | /* output */ |
| 4172 | #define DISCRETE_OUTPUT(OPNODE,GAIN) { NODE_SPECIAL, DSO_OUTPUT , 2, { OPNODE,NODE_NC }, { 0,GAIN }, NULL, "O | |
| 4173 | #define DISCRETE_OUTPUT(OPNODE,GAIN) { NODE_SPECIAL, DSO_OUTPUT , 2, { OPNODE,NODE_NC }, { 0,GAIN }, NULL, "DISCRETE_OUTPUT | |
| 4173 | 4174 | |
| 4174 | 4175 | |
| 4175 | 4176 |
| r3171 | r3172 | |
|---|---|---|
| 38 | 38 | double v_out_high; /* Logic 1 voltage level */ |
| 39 | 39 | double v_charge; |
| 40 | 40 | double *v_charge_node; /* point to output of node */ |
| 41 | int has_rc_nodes; | |
| 42 | double exp_bleed; | |
| 43 | double exp_charge; | |
| 44 | double exp_discharge; | |
| 45 | double t_rc_charge; | |
| 46 | double t_rc_discharge; | |
| 41 | 47 | }; |
| 42 | 48 | |
| 43 | 49 | struct dsd_555_mstbl_context |
| r3171 | r3172 | |
| 67 | 73 | double trigger; |
| 68 | 74 | double v_out_high; /* Logic 1 voltage level */ |
| 69 | 75 | double v_cc_source; |
| 76 | int has_rc_nodes; | |
| 77 | double exp_bleed; | |
| 78 | double exp_charge; | |
| 79 | double exp_discharge; | |
| 80 | double exp_discharge_01; | |
| 81 | double exp_discharge_no_i; | |
| 82 | double t_rc_charge; | |
| 83 | double t_rc_discharge; | |
| 84 | double t_rc_discharge_01; | |
| 85 | double t_rc_discharge_no_i; | |
| 70 | 86 | }; |
| 71 | 87 | |
| 72 | 88 | struct dsd_555_vco1_context |
| r3171 | r3172 | |
| 127 | 143 | #define DSD_555_ASTBL__C (*(node->input[3])) |
| 128 | 144 | #define DSD_555_ASTBL__CTRLV (*(node->input[4])) |
| 129 | 145 | |
| 146 | /* bit mask of the above RC inputs */ | |
| 147 | #define DSD_555_ASTBL_RC_MASK 0x0e | |
| 148 | ||
| 149 | /* charge/discharge constants */ | |
| 150 | #define DSD_555_ASTBL_T_RC_BLEED (DEFAULT_555_CAP_BLEED * DSD_555_ASTBL__C) | |
| 151 | /* Use quick charge if specified. */ | |
| 152 | #define DSD_555_ASTBL_T_RC_CHARGE ((DSD_555_ASTBL__R1 + ((info->options & DISC_555_ASTABLE_HAS_FAST_CHARGE_DIODE) ? 0 : DSD_555_ASTBL__R2)) * DSD_555_ASTBL__C) | |
| 153 | #define DSD_555_ASTBL_T_RC_DISCHARGE (DSD_555_ASTBL__R2 * DSD_555_ASTBL__C) | |
| 154 | ||
| 130 | 155 | static void dsd_555_astbl_step(node_description *node) |
| 131 | 156 | { |
| 132 | 157 | const discrete_555_desc *info = node->custom; |
| r3171 | r3172 | |
| 139 | 164 | double t_rc = 0; /* RC time constant */ |
| 140 | 165 | double v_cap = context->cap_voltage; /* Current voltage on capacitor, before dt */ |
| 141 | 166 | double v_cap_next = 0; /* Voltage on capacitor, after dt */ |
| 142 | double v_charge; | |
| 167 | double v_charge, exponent; | |
| 168 | int update_exponent, update_t_rc; | |
| 143 | 169 | |
| 170 | /* put commonly used stuff in local variables for speed */ | |
| 171 | double threshold = context->threshold; | |
| 172 | double trigger = context->trigger; | |
| 173 | ||
| 144 | 174 | if(DSD_555_ASTBL__RESET) |
| 145 | 175 | { |
| 146 | 176 | /* We are in RESET */ |
| r3171 | r3172 | |
| 157 | 187 | * So we will just ignore it when it happens. */ |
| 158 | 188 | if (DSD_555_ASTBL__CTRLV < .25) return; |
| 159 | 189 | /* If it is a node then calculate thresholds based on Control Voltage */ |
| 160 | context->threshold = DSD_555_ASTBL__CTRLV; | |
| 161 | context->trigger = DSD_555_ASTBL__CTRLV / 2.0; | |
| 190 | threshold = DSD_555_ASTBL__CTRLV; | |
| 191 | trigger = DSD_555_ASTBL__CTRLV / 2.0; | |
| 162 | 192 | /* Since the thresholds may have changed we need to update the FF */ |
| 163 | if (v_cap >= | |
| 193 | if (v_cap >= | |
| 164 | 194 | { |
| 165 | 195 | context->flip_flop = 0; |
| 166 | 196 | count_f++; |
| 167 | 197 | } |
| 168 | 198 | else |
| 169 | if (v_cap <= | |
| 199 | if (v_cap <= | |
| 170 | 200 | { |
| 171 | 201 | context->flip_flop = 1; |
| 172 | 202 | count_r++; |
| r3171 | r3172 | |
| 217 | 247 | else |
| 218 | 248 | { |
| 219 | 249 | /* Keep looping until all toggling in time sample is used up. */ |
| 250 | update_t_rc = context->has_rc_nodes; | |
| 251 | update_exponent = update_t_rc; | |
| 220 | 252 | do |
| 221 | 253 | { |
| 222 | 254 | if (context->flip_flop) |
| r3171 | r3172 | |
| 225 | 257 | { |
| 226 | 258 | /* Oscillation disabled because there is no longer any charge resistor. */ |
| 227 | 259 | /* Bleed the cap due to circuit losses. */ |
| 228 | t_rc = DEFAULT_555_CAP_BLEED * DSD_555_ASTBL__C; | |
| 229 | v_cap_next = v_cap - (v_cap * (1.0 - exp(-(dt / t_rc )))); | |
| 260 | if (update_exponent) | |
| 261 | { | |
| 262 | t_rc = DSD_555_ASTBL_T_RC_BLEED; | |
| 263 | exponent = 1.0 - exp(-(dt / t_rc)); | |
| 264 | } | |
| 265 | else | |
| 266 | exponent = context->exp_bleed; | |
| 267 | v_cap_next = v_cap - (v_cap * exponent); | |
| 230 | 268 | dt = 0; |
| 231 | 269 | } |
| 232 | 270 | else |
| 233 | 271 | { |
| 234 | 272 | /* Charging */ |
| 235 | /* Use quick charge if specified. */ | |
| 236 | t_rc = (DSD_555_ASTBL__R1 + ((info->options & DISC_555_ASTABLE_HAS_FAST_CHARGE_DIODE) ? 0 : DSD_555_ASTBL__R2)) * DSD_555_ASTBL__C; | |
| 237 | v_cap_next = v_cap + ((v_charge - v_cap) * (1.0 - exp(-(dt / t_rc )))); | |
| 273 | if (update_t_rc) | |
| 274 | t_rc = DSD_555_ASTBL_T_RC_CHARGE; | |
| 275 | else | |
| 276 | t_rc = context->t_rc_charge; | |
| 277 | if (update_exponent) | |
| 278 | exponent = 1.0 - exp(-(dt / t_rc )); | |
| 279 | else | |
| 280 | exponent = context->exp_charge; | |
| 281 | v_cap_next = v_cap + ((v_charge - v_cap) * exponent); | |
| 238 | 282 | dt = 0; |
| 239 | 283 | |
| 240 | 284 | /* has it charged past upper limit? */ |
| 241 | if (v_cap_next >= | |
| 285 | if (v_cap_next >= | |
| 242 | 286 | { |
| 243 | 287 | /* calculate the overshoot time */ |
| 244 | dt = t_rc * log(1.0 / (1.0 - ((v_cap_next - | |
| 288 | dt = t_rc * log(1.0 / (1.0 - ((v_cap_next - | |
| 245 | 289 | x_time = dt; |
| 246 | v_cap = | |
| 290 | v_cap = | |
| 247 | 291 | context->flip_flop = 0; |
| 248 | 292 | count_f++; |
| 293 | update_exponent = 1; | |
| 249 | 294 | } |
| 250 | 295 | } |
| 251 | 296 | } |
| r3171 | r3172 | |
| 254 | 299 | /* Discharging */ |
| 255 | 300 | if(DSD_555_ASTBL__R2 != 0) |
| 256 | 301 | { |
| 257 | t_rc = DSD_555_ASTBL__R2 * DSD_555_ASTBL__C; | |
| 258 | v_cap_next = v_cap - (v_cap * (1 - exp(-(dt / t_rc )))); | |
| 302 | if (update_t_rc) | |
| 303 | t_rc = DSD_555_ASTBL_T_RC_DISCHARGE; | |
| 304 | else | |
| 305 | t_rc = context->t_rc_discharge; | |
| 306 | if (update_exponent) | |
| 307 | exponent = 1.0 - exp(-(dt / t_rc )); | |
| 308 | else | |
| 309 | exponent = context->exp_discharge; | |
| 310 | v_cap_next = v_cap - (v_cap * exponent); | |
| 259 | 311 | dt = 0; |
| 260 | 312 | } |
| 261 | 313 | else |
| 262 | 314 | { |
| 263 | 315 | /* no discharge resistor so we imediately discharge */ |
| 264 | v_cap_next = | |
| 316 | v_cap_next = | |
| 265 | 317 | } |
| 266 | 318 | |
| 267 | 319 | /* has it discharged past lower limit? */ |
| 268 | if (v_cap_next <= | |
| 320 | if (v_cap_next <= | |
| 269 | 321 | { |
| 270 | 322 | /* calculate the overshoot time */ |
| 271 | if (dt == 0) | |
| 272 | dt = t_rc * log(1.0 / (1.0 - ((context->trigger - v_cap_next) / v_cap))); | |
| 323 | dt = t_rc * log(1.0 / (1.0 - ((trigger - v_cap_next) / v_cap))); | |
| 273 | 324 | x_time = dt; |
| 274 | v_cap = | |
| 325 | v_cap = | |
| 275 | 326 | context->flip_flop = 1; |
| 276 | 327 | count_r++; |
| 328 | update_exponent = 1; | |
| 277 | 329 | } |
| 278 | 330 | } |
| 279 | 331 | } while(dt); |
| r3171 | r3172 | |
| 293 | 345 | node->output[0] = v_cap_next; |
| 294 | 346 | /* Fake it to AC if needed */ |
| 295 | 347 | if (context->output_is_ac) |
| 296 | node->output[0] -= | |
| 348 | node->output[0] -= | |
| 297 | 349 | break; |
| 298 | 350 | case DISC_555_OUT_ENERGY: |
| 299 | 351 | if (x_time == 0) x_time = 1.0; |
| r3171 | r3172 | |
| 324 | 376 | struct dsd_555_astbl_context *context = node->context; |
| 325 | 377 | node_description *v_charge_node; |
| 326 | 378 | |
| 379 | double neg_dt = 0.0 - discrete_current_context->sample_time; | |
| 380 | double t_rc; | |
| 381 | ||
| 327 | 382 | context->use_ctrlv = (node->input_is_node >> 4) & 1; |
| 328 | 383 | context->output_type = info->options & DISC_555_OUT_MASK; |
| 329 | 384 | |
| r3171 | r3172 | |
| 355 | 410 | context->trigger = info->v_pos / 3.0; |
| 356 | 411 | } |
| 357 | 412 | |
| 413 | /* optimization if none of the values are nodes */ | |
| 414 | context->has_rc_nodes = 0; | |
| 415 | if (node->input_is_node & DSD_555_ASTBL_RC_MASK) | |
| 416 | context->has_rc_nodes = 1; | |
| 417 | else | |
| 418 | { | |
| 419 | t_rc = DSD_555_ASTBL_T_RC_BLEED; | |
| 420 | context->exp_bleed = 1.0 - exp(neg_dt / t_rc); | |
| 421 | t_rc = DSD_555_ASTBL_T_RC_CHARGE; | |
| 422 | context->exp_charge = 1.0 - exp(neg_dt / t_rc); | |
| 423 | context->t_rc_charge = t_rc; | |
| 424 | t_rc = DSD_555_ASTBL_T_RC_DISCHARGE; | |
| 425 | context->exp_discharge = 1.0 - exp(neg_dt / t_rc); | |
| 426 | context->t_rc_discharge = t_rc; | |
| 427 | } | |
| 428 | ||
| 358 | 429 | context->output_is_ac = info->options & DISC_555_OUT_AC; |
| 359 | 430 | /* Calculate DC shift needed to make squarewave waveform AC */ |
| 360 | 431 | context->ac_shift = context->output_is_ac ? -context->v_out_high / 2.0 : 0; |
| r3171 | r3172 | |
| 528 | 599 | #define DSD_555_CC__RGND (*(node->input[5])) |
| 529 | 600 | #define DSD_555_CC__RDIS (*(node->input[6])) |
| 530 | 601 | |
| 602 | /* bit mask of the above RC inputs not including DSD_555_CC__R */ | |
| 603 | #define DSD_555_CC_RC_MASK 0x78 | |
| 604 | ||
| 605 | /* charge/discharge constants */ | |
| 606 | #define DSD_555_CC_T_RC_BLEED (DEFAULT_555_CAP_BLEED * DSD_555_CC__C) | |
| 607 | #define DSD_555_CC_T_RC_DISCHARGE_01 (DSD_555_CC__RDIS * DSD_555_CC__C) | |
| 608 | #define DSD_555_CC_T_RC_DISCHARGE_NO_I (DSD_555_CC__RGND * DSD_555_CC__C) | |
| 609 | #define DSD_555_CC_T_RC_CHARGE (r_charge * DSD_555_CC__C) | |
| 610 | #define DSD_555_CC_T_RC_DISCHARGE (r_discharge * DSD_555_CC__C) | |
| 611 | ||
| 612 | ||
| 531 | 613 | static void dsd_555_cc_step(node_description *node) |
| 532 | 614 | { |
| 533 | 615 | const discrete_555_cc_desc *info = node->custom; |
| r3171 | r3172 | |
| 548 | 630 | double v_cap_next = 0; /* Voltage on capacitor, after dt */ |
| 549 | 631 | double v_vcharge_limit; /* vIn and the junction voltage limit the max charging voltage from i */ |
| 550 | 632 | double r_temp; /* play thing */ |
| 633 | double exponent; | |
| 634 | int update_exponent, update_t_rc; | |
| 551 | 635 | |
| 552 | 636 | |
| 553 | 637 | if (DSD_555_CC__RESET) |
| r3171 | r3172 | |
| 571 | 655 | vi = i * DSD_555_CC__RDIS; |
| 572 | 656 | } |
| 573 | 657 | else |
| 574 | switch (context->type) /* see dsd_555_cc_reset for descriptions */ | |
| 575 | 658 | { |
| 576 | case 1: | |
| 577 | r_discharge = DSD_555_CC__RDIS; | |
| 578 | case 0: | |
| 579 | break; | |
| 580 | case 3: | |
| 581 | r_discharge = (DSD_555_CC__RDIS * DSD_555_CC__RGND) / (DSD_555_CC__RDIS + DSD_555_CC__RGND); | |
| 582 | case 2: | |
| 583 | r_charge = DSD_555_CC__RGND; | |
| 584 | vi = i * r_charge; | |
| 585 | break; | |
| 586 | case 4: | |
| 587 | r_charge = DSD_555_CC__RBIAS; | |
| 588 | vi = i * r_charge; | |
| 589 | v_bias = info->v_pos; | |
| 590 | break; | |
| 591 | case 5: | |
| 592 | r_charge = DSD_555_CC__RBIAS + DSD_555_CC__RDIS; | |
| 593 | vi = i * DSD_555_CC__RBIAS; | |
| 594 | v_bias = info->v_pos; | |
| 595 | r_discharge = DSD_555_CC__RDIS; | |
| 596 | break; | |
| 597 | case 6: | |
| 598 | r_charge = (DSD_555_CC__RBIAS * DSD_555_CC__RGND) / (DSD_555_CC__RBIAS + DSD_555_CC__RGND); | |
| 599 | vi = i * r_charge; | |
| 600 | v_bias = info->v_pos * (DSD_555_CC__RGND / (DSD_555_CC__RBIAS + DSD_555_CC__RGND)); | |
| 601 | break; | |
| 602 | case 7: | |
| 603 | r_temp = DSD_555_CC__RBIAS + DSD_555_CC__RDIS; | |
| 604 | r_charge = (r_temp * DSD_555_CC__RGND) / (r_temp + DSD_555_CC__RGND); | |
| 605 | r_temp += DSD_555_CC__RGND; | |
| 606 | r_temp = DSD_555_CC__RGND / r_temp; /* now has voltage divider ratio, not resistance */ | |
| 607 | vi = i * DSD_555_CC__RBIAS * r_temp; | |
| 608 | v_bias = info->v_pos * r_temp; | |
| 609 | r_discharge = (DSD_555_CC__RGND * DSD_555_CC__RDIS) / (DSD_555_CC__RGND + DSD_555_CC__RDIS); | |
| 610 | break; | |
| 659 | switch (context->type) /* see dsd_555_cc_reset for descriptions */ | |
| 660 | { | |
| 661 | case 1: | |
| 662 | r_discharge = DSD_555_CC__RDIS; | |
| 663 | case 0: | |
| 664 | break; | |
| 665 | case 3: | |
| 666 | r_discharge = RES_2_PARALLEL(DSD_555_CC__RDIS, DSD_555_CC__RGND); | |
| 667 | case 2: | |
| 668 | r_charge = DSD_555_CC__RGND; | |
| 669 | vi = i * r_charge; | |
| 670 | break; | |
| 671 | case 4: | |
| 672 | r_charge = DSD_555_CC__RBIAS; | |
| 673 | vi = i * r_charge; | |
| 674 | v_bias = info->v_pos; | |
| 675 | break; | |
| 676 | case 5: | |
| 677 | r_charge = DSD_555_CC__RBIAS + DSD_555_CC__RDIS; | |
| 678 | vi = i * DSD_555_CC__RBIAS; | |
| 679 | v_bias = info->v_pos; | |
| 680 | r_discharge = DSD_555_CC__RDIS; | |
| 681 | break; | |
| 682 | case 6: | |
| 683 | r_charge = RES_2_PARALLEL(DSD_555_CC__RBIAS, DSD_555_CC__RGND); | |
| 684 | vi = i * r_charge; | |
| 685 | v_bias = info->v_pos * RES_VOLTAGE_DIVIDER(DSD_555_CC__RGND, DSD_555_CC__RBIAS); | |
| 686 | break; | |
| 687 | case 7: | |
| 688 | r_temp = DSD_555_CC__RBIAS + DSD_555_CC__RDIS; | |
| 689 | r_charge = RES_2_PARALLEL(r_temp, DSD_555_CC__RGND); | |
| 690 | r_temp += DSD_555_CC__RGND; | |
| 691 | r_temp = DSD_555_CC__RGND / r_temp; /* now has voltage divider ratio, not resistance */ | |
| 692 | vi = i * DSD_555_CC__RBIAS * r_temp; | |
| 693 | v_bias = info->v_pos * r_temp; | |
| 694 | r_discharge = RES_2_PARALLEL(DSD_555_CC__RGND, DSD_555_CC__RDIS); | |
| 695 | break; | |
| 696 | } | |
| 611 | 697 | } |
| 612 | 698 | |
| 613 | 699 | /* Keep looping until all toggling in time sample is used up. */ |
| 700 | update_t_rc = context->has_rc_nodes; | |
| 701 | update_exponent = update_t_rc; | |
| 614 | 702 | do |
| 615 | 703 | { |
| 616 | 704 | if (context->type <= 1) |
| r3171 | r3172 | |
| 623 | 711 | /* No charging current, so we have to discharge the cap |
| 624 | 712 | * due to cap and circuit losses. |
| 625 | 713 | */ |
| 626 | t_rc = DEFAULT_555_CAP_BLEED * DSD_555_CC__C; | |
| 627 | v_cap_next = v_cap - (v_cap * (1.0 - exp(-(dt / t_rc )))); | |
| 714 | if (update_exponent) | |
| 715 | { | |
| 716 | t_rc = DSD_555_CC_T_RC_BLEED; | |
| 717 | exponent = 1.0 - exp(-(dt / t_rc)); | |
| 718 | } | |
| 719 | else | |
| 720 | exponent = context->exp_bleed; | |
| 721 | v_cap_next = v_cap - (v_cap * exponent); | |
| 628 | 722 | dt = 0; |
| 629 | 723 | } |
| 630 | 724 | else |
| r3171 | r3172 | |
| 649 | 743 | v_cap = context->threshold; |
| 650 | 744 | context->flip_flop = 0; |
| 651 | 745 | count_f++; |
| 746 | update_exponent = 1; | |
| 652 | 747 | } |
| 653 | 748 | } |
| 654 | 749 | } |
| 655 | else if (DSD_555_CC__RDIS) | |
| 750 | else if (DSD_555_CC__RDIS != 0) | |
| 656 | 751 | { |
| 657 | 752 | /* Discharging */ |
| 658 | t_rc = DSD_555_CC__RDIS * DSD_555_CC__C; | |
| 753 | if (update_t_rc) | |
| 754 | t_rc = DSD_555_CC_T_RC_DISCHARGE_01; | |
| 755 | else | |
| 756 | t_rc = context->t_rc_discharge_01; | |
| 757 | if (update_exponent) | |
| 758 | exponent = 1.0 - exp(-(dt / t_rc)); | |
| 759 | else | |
| 760 | exponent = context->exp_discharge_01; | |
| 659 | 761 | |
| 660 | 762 | if (info->options & DISCRETE_555_CC_TO_CAP) |
| 661 | 763 | { |
| r3171 | r3172 | |
| 664 | 766 | /* If the cap voltage is past the current source charging limit |
| 665 | 767 | * then only the bias voltage will charge the cap. */ |
| 666 | 768 | v = (v_cap < v_vcharge_limit) ? vi : v_vcharge_limit; |
| 667 | v_cap_next = v_cap + ((v - v_cap) * | |
| 769 | v_cap_next = v_cap + ((v - v_cap) * | |
| 668 | 770 | } |
| 669 | 771 | else |
| 670 | 772 | { |
| 671 | v_cap_next = v_cap - (v_cap * | |
| 773 | v_cap_next = v_cap - (v_cap * | |
| 672 | 774 | } |
| 673 | 775 | |
| 674 | 776 | dt = 0; |
| r3171 | r3172 | |
| 680 | 782 | v_cap = context->trigger; |
| 681 | 783 | context->flip_flop = 1; |
| 682 | 784 | count_r++; |
| 785 | update_exponent = 1; | |
| 683 | 786 | } |
| 684 | 787 | } |
| 685 | 788 | else /* Immediate discharge. No change in dt. */ |
| r3171 | r3172 | |
| 700 | 803 | /* No charging current, so we have to discharge the cap |
| 701 | 804 | * due to rGnd. |
| 702 | 805 | */ |
| 703 | t_rc = DSD_555_CC__RGND * DSD_555_CC__C; | |
| 704 | v_cap_next = v_cap - (v_cap * (1.0 - exp(-(dt / t_rc )))); | |
| 806 | if (update_t_rc) | |
| 807 | t_rc = DSD_555_CC_T_RC_DISCHARGE_NO_I; | |
| 808 | else | |
| 809 | t_rc = context->t_rc_discharge_no_i; | |
| 810 | if (update_exponent) | |
| 811 | exponent = 1.0 - exp(-(dt / t_rc)); | |
| 812 | else | |
| 813 | exponent = context->exp_discharge_no_i; | |
| 814 | ||
| 815 | v_cap_next = v_cap - (v_cap * exponent); | |
| 705 | 816 | dt = 0; |
| 706 | 817 | } |
| 707 | 818 | else |
| r3171 | r3172 | |
| 713 | 824 | if (v_cap < v_vcharge_limit) v += vi; |
| 714 | 825 | else if (context->type <= 3) v = v_vcharge_limit; |
| 715 | 826 | |
| 716 | t_rc = r_charge * DSD_555_CC__C; | |
| 717 | v_cap_next = v_cap + ((v - v_cap) * (1.0 - exp(-(dt / t_rc )))); | |
| 827 | if (update_t_rc) | |
| 828 | t_rc = DSD_555_CC_T_RC_CHARGE; | |
| 829 | else | |
| 830 | t_rc = context->t_rc_charge; | |
| 831 | if (update_exponent) | |
| 832 | exponent = 1.0 - exp(-(dt / t_rc)); | |
| 833 | else | |
| 834 | exponent = context->exp_charge; | |
| 835 | ||
| 836 | v_cap_next = v_cap + ((v - v_cap) * exponent); | |
| 718 | 837 | dt = 0; |
| 719 | 838 | |
| 720 | 839 | /* has it charged past upper limit? */ |
| r3171 | r3172 | |
| 726 | 845 | v_cap = context->threshold; |
| 727 | 846 | context->flip_flop = 0; |
| 728 | 847 | count_f++; |
| 848 | update_exponent = 1; | |
| 729 | 849 | } |
| 730 | 850 | } |
| 731 | 851 | } |
| 732 | 852 | else /* Discharging */ |
| 733 | 853 | if (r_discharge) |
| 734 | 854 | { |
| 735 | t_rc = r_discharge * DSD_555_CC__C; | |
| 736 | v_cap_next = v_cap - (v_cap * (1.0 - exp(-(dt / t_rc )))); | |
| 855 | if (update_t_rc) | |
| 856 | t_rc = DSD_555_CC_T_RC_DISCHARGE; | |
| 857 | else | |
| 858 | t_rc = context->t_rc_discharge; | |
| 859 | if (update_exponent) | |
| 860 | exponent = 1.0 - exp(-(dt / t_rc)); | |
| 861 | else | |
| 862 | exponent = context->exp_discharge; | |
| 863 | ||
| 864 | v_cap_next = v_cap - (v_cap * exponent); | |
| 737 | 865 | dt = 0; |
| 738 | 866 | |
| 739 | 867 | /* has it discharged past lower limit? */ |
| r3171 | r3172 | |
| 745 | 873 | v_cap = context->trigger; |
| 746 | 874 | context->flip_flop = 1; |
| 747 | 875 | count_r++; |
| 876 | update_exponent = 1; | |
| 748 | 877 | } |
| 749 | 878 | } |
| 750 | 879 | else /* Immediate discharge. No change in dt. */ |
| r3171 | r3172 | |
| 806 | 935 | const discrete_555_cc_desc *info = node->custom; |
| 807 | 936 | struct dsd_555_cc_context *context = node->context; |
| 808 | 937 | |
| 938 | double neg_dt = 0.0 - discrete_current_context->sample_time; | |
| 939 | double r_temp, r_discharge = 0, r_charge = 0, t_rc; | |
| 940 | ||
| 809 | 941 | context->flip_flop = 1; |
| 810 | 942 | context->cap_voltage = 0; |
| 811 | 943 | |
| r3171 | r3172 | |
| 826 | 958 | /* There are 8 different types of basic oscillators |
| 827 | 959 | * depending on the resistors used. We will determine |
| 828 | 960 | * the type of circuit at reset, because the ciruit type |
| 829 | * is constant. | |
| 961 | * is constant. See Below. | |
| 830 | 962 | */ |
| 831 | 963 | context->type = (DSD_555_CC__RDIS > 0) | ((DSD_555_CC__RGND > 0) << 1) | ((DSD_555_CC__RBIAS > 0) << 2); |
| 964 | ||
| 965 | /* optimization if none of the values are nodes */ | |
| 966 | context->has_rc_nodes = 0; | |
| 967 | if (node->input_is_node & DSD_555_CC_RC_MASK) | |
| 968 | context->has_rc_nodes = 1; | |
| 969 | else | |
| 970 | { | |
| 971 | switch (context->type) /* see dsd_555_cc_reset for descriptions */ | |
| 972 | { | |
| 973 | case 1: | |
| 974 | r_discharge = DSD_555_CC__RDIS; | |
| 975 | case 0: | |
| 976 | break; | |
| 977 | case 3: | |
| 978 | r_discharge = RES_2_PARALLEL(DSD_555_CC__RDIS, DSD_555_CC__RGND); | |
| 979 | case 2: | |
| 980 | r_charge = DSD_555_CC__RGND; | |
| 981 | break; | |
| 982 | case 4: | |
| 983 | r_charge = DSD_555_CC__RBIAS; | |
| 984 | break; | |
| 985 | case 5: | |
| 986 | r_charge = DSD_555_CC__RBIAS + DSD_555_CC__RDIS; | |
| 987 | r_discharge = DSD_555_CC__RDIS; | |
| 988 | break; | |
| 989 | case 6: | |
| 990 | r_charge = RES_2_PARALLEL(DSD_555_CC__RBIAS, DSD_555_CC__RGND); | |
| 991 | break; | |
| 992 | case 7: | |
| 993 | r_temp = DSD_555_CC__RBIAS + DSD_555_CC__RDIS; | |
| 994 | r_charge = RES_2_PARALLEL(r_temp, DSD_555_CC__RGND); | |
| 995 | r_discharge = RES_2_PARALLEL(DSD_555_CC__RGND, DSD_555_CC__RDIS); | |
| 996 | break; | |
| 997 | } | |
| 998 | ||
| 999 | t_rc = DSD_555_CC_T_RC_BLEED; | |
| 1000 | context->exp_bleed = 1.0 - exp(neg_dt / t_rc); | |
| 1001 | t_rc = DSD_555_CC_T_RC_DISCHARGE_01; | |
| 1002 | context->exp_discharge_01 = 1.0 - exp(neg_dt / t_rc); | |
| 1003 | context->t_rc_discharge_01 = t_rc; | |
| 1004 | t_rc = DSD_555_CC_T_RC_DISCHARGE_NO_I; | |
| 1005 | context->exp_discharge_no_i = 1.0 - exp(neg_dt / t_rc); | |
| 1006 | context->t_rc_discharge_no_i = t_rc; | |
| 1007 | t_rc = DSD_555_CC_T_RC_CHARGE; | |
| 1008 | context->exp_charge = 1.0 - exp(neg_dt / t_rc); | |
| 1009 | context->t_rc_charge = t_rc; | |
| 1010 | t_rc = DSD_555_CC_T_RC_DISCHARGE; | |
| 1011 | context->exp_discharge = 1.0 - exp(neg_dt / t_rc); | |
| 1012 | context->t_rc_discharge = t_rc; | |
| 1013 | } | |
| 1014 | ||
| 1015 | /* Step to set the output */ | |
| 1016 | dsd_555_cc_step(node); | |
| 1017 | ||
| 832 | 1018 | /* |
| 833 | 1019 | * TYPES: |
| 834 | 1020 | * Note: These are equivalent circuits shown without the 555 circuitry. |
| r3171 | r3172 | |
| 961 | 1147 | * | | | v = vi = i * rGnd |
| 962 | 1148 | * gnd gnd discharge Rc = rDischarge |
| 963 | 1149 | */ |
| 964 | ||
| 965 | /* Step to set the output */ | |
| 966 | dsd_555_cc_step(node); | |
| 967 | 1150 | } |
| 968 | 1151 | |
| 969 | 1152 |
| r3171 | r3172 | |
|---|---|---|
| 493 | 493 | |
| 494 | 494 | |
| 495 | 495 | #------------------------------------------------- |
| 496 | # SNK custom wave generator | |
| 497 | #------------------------------------------------- | |
| 498 | ||
| 499 | SOUNDDEFS += -DHAS_SNKWAVE=$(if $(filter SNKWAVE,$(SOUNDS)),1,0) | |
| 500 | ||
| 501 | ifneq ($(filter SNKWAVE,$(SOUNDS)),) | |
| 502 | SOUNDOBJS += $(SOUNDOBJ)/snkwave.o | |
| 503 | endif | |
| 504 | ||
| 505 | ||
| 506 | ||
| 507 | #------------------------------------------------- | |
| 496 | 508 | # Sony custom sound chips |
| 497 | 509 | #------------------------------------------------- |
| 498 | 510 |
| r3171 | r3172 | |
|---|---|---|
| 12 | 12 | * DST_FILTER1 - Generic 1st order filter |
| 13 | 13 | * DST_FILTER2 - Generic 2nd order filter |
| 14 | 14 | * DST_OP_AMP_FILT - Op Amp filter circuits |
| 15 | * DST_RCFILTER - Simple RC filter & also lowpass filter | |
| 16 | 15 | * DST_RCDISC - Simple discharging RC |
| 17 | 16 | * DST_RCDISC2 - Simple charge R1/C, discharge R0/C |
| 18 | 17 | * DST_RCDISC3 - Simple charge R1/c, discharge R0*R1/(R0+R1)/C |
| 19 | 18 | * DST_RCDISC4 - Various charge/discharge circuits |
| 20 | 19 | * DST_RCDISC5 - Diode in series with R//C |
| 20 | * DST_RCDISC_MOD - RC triggered by logic and modulated | |
| 21 | * DST_RCFILTER - Simple RC filter & also lowpass filter | |
| 22 | * DST_RCINTEGRATE - Two diode inputs, transistor and a R/C charge | |
| 23 | * discharge network | |
| 21 | 24 | * |
| 22 | 25 | ************************************************************************/ |
| 23 | 26 | |
| r3171 | r3172 | |
| 65 | 68 | { |
| 66 | 69 | int state; |
| 67 | 70 | double t; /* time */ |
| 68 | double f; /* RCINTEGRATE */ | |
| 69 | double R1; /* RCINTEGRATE */ | |
| 70 | double R2; /* RCINTEGRATE */ | |
| 71 | double R3; /* RCINTEGRATE */ | |
| 72 | double C; /* RCINTEGRATE */ | |
| 73 | double vCap; /* RCDISC_MOD */ | |
| 74 | double vCE; /* RCINTEGRATE */ | |
| 75 | 71 | double exponent0; |
| 76 | 72 | double exponent1; |
| 77 | double exp_exponent0;/* RCINTEGRATE */ | |
| 78 | double exp_exponent1;/* RCINTEGRATE */ | |
| 79 | 73 | }; |
| 80 | 74 | |
| 75 | struct dst_rcdisc_mod_context | |
| 76 | { | |
| 77 | double v_cap; | |
| 78 | double exp_low[2]; | |
| 79 | double exp_high[4]; | |
| 80 | double gain[2]; | |
| 81 | double vd_gain[4]; | |
| 82 | }; | |
| 83 | ||
| 81 | 84 | struct dst_rcdisc4_context |
| 82 | 85 | { |
| 83 | 86 | int type; |
| r3171 | r3172 | |
| 98 | 101 | double vCap[4]; |
| 99 | 102 | }; |
| 100 | 103 | |
| 104 | struct dst_rcintegrate_context | |
| 105 | { | |
| 106 | int type; | |
| 107 | double gain_r1_r2; | |
| 108 | double f; /* r2,r3 gain */ | |
| 109 | double vCap; | |
| 110 | double vCE; | |
| 111 | double exponent0; | |
| 112 | double exponent1; | |
| 113 | double exp_exponent0; | |
| 114 | double exp_exponent1; | |
| 115 | double c_exp0; | |
| 116 | double c_exp1; | |
| 117 | }; | |
| 118 | ||
| 101 | 119 | /************************************************************************ |
| 102 | 120 | * |
| 103 | 121 | * DST_CRFILTER - Usage of node_description values for CR filter |
| r3171 | r3172 | |
| 186 | 204 | static void dst_filter1_step(node_description *node) |
| 187 | 205 | { |
| 188 | 206 | struct dss_filter1_context *context = node->context; |
| 189 | ||
| 207 | ||
| 190 | 208 | double gain = 1.0; |
| 191 | 209 | |
| 192 | 210 | if (DST_FILTER1__ENABLE == 0.0) |
| r3171 | r3172 | |
| 584 | 602 | { |
| 585 | 603 | struct dst_rcdisc_context *context = node->context; |
| 586 | 604 | |
| 587 | switch (context->state) { | |
| 605 | switch (context->state) | |
| 606 | { | |
| 588 | 607 | case 0: /* waiting for trigger */ |
| 589 | if(DST_RCDISC__ENABLE) { | |
| 608 | if(DST_RCDISC__ENABLE) | |
| 609 | { | |
| 590 | 610 | context->state = 1; |
| 591 | 611 | context->t = 0; |
| 592 | 612 | } |
| r3171 | r3172 | |
| 594 | 614 | break; |
| 595 | 615 | |
| 596 | 616 | case 1: |
| 597 | if (DST_RCDISC__ENABLE) { | |
| 617 | if (DST_RCDISC__ENABLE) | |
| 618 | { | |
| 598 | 619 | node->output[0] = DST_RCDISC__IN * exp(context->t / context->exponent0); |
| 599 | 620 | context->t += discrete_current_context->sample_time; |
| 600 | } else { | |
| 601 | context->state = 0; | |
| 621 | } else | |
| 622 | { | |
| 623 | context->state = 0; | |
| 602 | 624 | } |
| 603 | 625 | } |
| 604 | 626 | } |
| r3171 | r3172 | |
| 645 | 667 | /* exponential based in difference between input/output */ |
| 646 | 668 | |
| 647 | 669 | diff = ((DST_RCDISC2__ENABLE == 0) ? DST_RCDISC2__IN0 : DST_RCDISC2__IN1) - node->output[0]; |
| 648 | diff = diff - (diff * ((DST_RCDISC2__ENABLE == 0) ? context->exp | |
| 670 | diff = diff - (diff * ((DST_RCDISC2__ENABLE == 0) ? context->exp | |
| 649 | 671 | node->output[0] += diff; |
| 650 | 672 | } |
| 651 | 673 | |
| r3171 | r3172 | |
| 653 | 675 | { |
| 654 | 676 | struct dst_rcdisc_context *context = node->context; |
| 655 | 677 | |
| 656 | node->output[0]=0; | |
| 678 | node->output[0] = 0; | |
| 657 | 679 | |
| 658 | 680 | context->state = 0; |
| 659 | 681 | context->t = 0; |
| 660 | context->exponent0 =-1.0 * DST_RCDISC2__R0 * DST_RCDISC2__C; | |
| 661 | context->exponent1 =-1.0 * DST_RCDISC2__R1 * DST_RCDISC2__C; | |
| 662 | context->exp_exponent0 = exp(discrete_current_context->sample_time/context->exponent0); | |
| 663 | context->exp_exponent1 = exp(discrete_current_context->sample_time/context->exponent1); | |
| 682 | context->exponent0 = -1.0 * DST_RCDISC2__R0 * DST_RCDISC2__C; | |
| 683 | context->exponent1 = -1.0 * DST_RCDISC2__R1 * DST_RCDISC2__C; | |
| 684 | context->exponent0 = exp(discrete_current_context->sample_time/context->exponent0); | |
| 685 | context->exponent1 = exp(discrete_current_context->sample_time/context->exponent1); | |
| 664 | 686 | } |
| 665 | 687 | |
| 666 | 688 | /************************************************************************ |
| r3171 | r3172 | |
| 706 | 728 | } |
| 707 | 729 | else |
| 708 | 730 | { |
| 709 | node->output[0]=0; | |
| 731 | node->output[0] = 0; | |
| 710 | 732 | } |
| 711 | 733 | } |
| 712 | 734 | |
| r3171 | r3172 | |
| 899 | 921 | context->exponent0 = -1.0 * DST_RCDISC5__R * DST_RCDISC5__C; |
| 900 | 922 | } |
| 901 | 923 | |
| 902 | /************************************************************************ | |
| 903 | * | |
| 904 | * DST_RCINTEGRATE - Two diode inputs, transistor and a R/C charge | |
| 905 | * discharge network | |
| 906 | * | |
| 907 | * input[0] - Enable input value | |
| 908 | * input[1] - input value 1 | |
| 909 | * input[2] - input value 2 | |
| 910 | * input[3] - Resistor 1 value (initialization only) | |
| 911 | * input[4] - Resistor 2 value (initialization only) | |
| 912 | * input[5] - Capacitor Value (initialization only) | |
| 913 | * | |
| 914 | ************************************************************************/ | |
| 915 | #define DST_RCINTEGRATE__ENABLE (*(node->input[0])) | |
| 916 | #define DST_RCINTEGRATE__IN1 (*(node->input[1])) | |
| 917 | #define DST_RCINTEGRATE__R1 (*(node->input[2])) | |
| 918 | #define DST_RCINTEGRATE__R2 (*(node->input[3])) | |
| 919 | #define DST_RCINTEGRATE__R3 (*(node->input[4])) | |
| 920 | #define DST_RCINTEGRATE__C (*(node->input[5])) | |
| 921 | #define DST_RCINTEGRATE__VP (*(node->input[6])) | |
| 922 | #define DST_RCINTEGRATE__TYPE (*(node->input[7])) | |
| 923 | 924 | |
| 924 | /* Ebers-Moll large signal model | |
| 925 | * Couriersud: | |
| 926 | * The implementation avoids all iterative approaches in order not to burn cycles | |
| 927 | * We will calculate Ic from vBE and use this as an indication where to go. | |
| 928 | * The implementation may oscillate if you change the weighting factors at the | |
| 929 | * end. | |
| 930 | * | |
| 931 | * This implementation is not perfect, but does it's job in dkong' | |
| 932 | */ | |
| 933 | ||
| 934 | /* reverse saturation current */ | |
| 935 | #define IES 7e-15 | |
| 936 | #define ALPHAT 0.99 | |
| 937 | #define KT 0.026 | |
| 938 | #define EM_IC(x) (ALPHAT * IES * exp( (x) / KT - 1.0 )) | |
| 939 | ||
| 940 | static void dst_rcintegrate_step(node_description *node) | |
| 941 | { | |
| 942 | struct dst_rcdisc_context *context = node->context; | |
| 943 | ||
| 944 | double diff, u, iQ, iQc, iC, RG, vE; | |
| 945 | double dt, vP; | |
| 946 | ||
| 947 | if(DST_RCINTEGRATE__ENABLE) | |
| 948 | { | |
| 949 | u = DST_RCINTEGRATE__IN1; | |
| 950 | vP = DST_RCINTEGRATE__VP; | |
| 951 | dt = discrete_current_context->sample_time; | |
| 952 | if ( u-0.7 < context->vCap*context->R2/(context->R1+context->R2)) | |
| 953 | { | |
| 954 | /* discharge .... */ | |
| 955 | diff = 0.0 - context->vCap; | |
| 956 | iC = 0.0 - context->C / context->exponent1 * diff * context->exp_exponent1; /* iC */ | |
| 957 | diff = diff - (diff * context->exp_exponent1); | |
| 958 | context->vCap += diff; | |
| 959 | iQ = 0; | |
| 960 | vE = context->vCap*context->R2/(context->R1+context->R2); | |
| 961 | RG = vE/(-iC); | |
| 962 | } | |
| 963 | else | |
| 964 | { | |
| 965 | /* charging */ | |
| 966 | diff = (vP - context->vCE) * context->f - context->vCap; | |
| 967 | iC = 0.0 - context->C / context->exponent0 * diff * context->exp_exponent0; /* iC */ | |
| 968 | diff = diff - (diff * context->exp_exponent0); | |
| 969 | context->vCap += diff; | |
| 970 | iQ = iC + (iC * context->R1 + context->vCap) / context->R2; | |
| 971 | RG = (vP - context->vCE)/iQ; | |
| 972 | vE = (RG - context->R3) / RG * (vP - context->vCE); | |
| 973 | } | |
| 974 | ||
| 975 | ||
| 976 | u = DST_RCINTEGRATE__IN1; | |
| 977 | if (u > 0.7+vE) | |
| 978 | vE = u-0.7; | |
| 979 | iQc = EM_IC(u - vE); | |
| 980 | context->vCE = MIN(vP - 0.1, vP - RG * iQc); | |
| 981 | ||
| 982 | /* Avoid oscillations | |
| 983 | * The method tends to largely overshoot - no wonder without | |
| 984 | * iterative solution approximation | |
| 985 | */ | |
| 986 | ||
| 987 | context->vCE = MAX(context->vCE, 0.1 ); | |
| 988 | context->vCE = 0.1 * context->vCE + 0.9 * (vP - vE - iQ * context->R3); | |
| 989 | ||
| 990 | switch (context->state) | |
| 991 | { | |
| 992 | case DISC_RC_INTEGRATE_TYPE1: | |
| 993 | node->output[0] = context->vCap; | |
| 994 | break; | |
| 995 | case DISC_RC_INTEGRATE_TYPE2: | |
| 996 | node->output[0] = vE; | |
| 997 | break; | |
| 998 | case DISC_RC_INTEGRATE_TYPE3: | |
| 999 | node->output[0] = MAX(0, vP - iQ * context->R3); | |
| 1000 | break; | |
| 1001 | } | |
| 1002 | } | |
| 1003 | else | |
| 1004 | { | |
| 1005 | node->output[0] = 0; | |
| 1006 | } | |
| 1007 | } | |
| 1008 | static void dst_rcintegrate_reset(node_description *node) | |
| 1009 | { | |
| 1010 | struct dst_rcdisc_context *context = node->context; | |
| 1011 | ||
| 1012 | double r; | |
| 1013 | double dt = discrete_current_context->sample_time; | |
| 1014 | ||
| 1015 | node->output[0]=0; | |
| 1016 | ||
| 1017 | context->state = DST_RCINTEGRATE__TYPE; | |
| 1018 | context->R1 = DST_RCINTEGRATE__R1; | |
| 1019 | context->R2 = DST_RCINTEGRATE__R2; | |
| 1020 | context->R3 = DST_RCINTEGRATE__R3; | |
| 1021 | context->C = DST_RCINTEGRATE__C; | |
| 1022 | ||
| 1023 | context->vCap = 0; | |
| 1024 | context->vCE = 0; | |
| 1025 | ||
| 1026 | r = context->R1 / context->R2 * context->R3 + context->R1 + context->R3; | |
| 1027 | ||
| 1028 | context->f = DST_RCINTEGRATE__R2/(DST_RCINTEGRATE__R2+DST_RCINTEGRATE__R3); | |
| 1029 | context->exponent0 = -1.0 * r * context->f * DST_RCINTEGRATE__C; | |
| 1030 | context->exponent1 = -1.0 * (DST_RCINTEGRATE__R1 + DST_RCINTEGRATE__R2) * DST_RCINTEGRATE__C; | |
| 1031 | context->exp_exponent0 = exp(dt / context->exponent0); | |
| 1032 | context->exp_exponent1 = exp(dt / context->exponent1); | |
| 1033 | } | |
| 1034 | ||
| 1035 | ||
| 1036 | 925 | /************************************************************************ |
| 1037 | 926 | * |
| 1038 | 927 | * DST_RCDISC_MOD - RC triggered by logic and modulated |
| r3171 | r3172 | |
| 1048 | 937 | * input[8] - Voltage Value (initialization only) |
| 1049 | 938 | * |
| 1050 | 939 | ************************************************************************/ |
| 1051 | #define DST_RCDISC_MOD__ENABLE (*(node->input[0])) | |
| 1052 | #define DST_RCDISC_MOD__IN1 (*(node->input[1])) | |
| 1053 | #define DST_RCDISC_MOD__IN2 (*(node->input[2])) | |
| 1054 | #define DST_RCDISC_MOD__R1 (*(node->input[3])) | |
| 1055 | #define DST_RCDISC_MOD__R2 (*(node->input[4])) | |
| 1056 | #define DST_RCDISC_MOD__R3 (*(node->input[5])) | |
| 1057 | #define DST_RCDISC_MOD__R4 (*(node->input[6])) | |
| 1058 | #define DST_RCDISC_MOD__C (*(node->input[7])) | |
| 1059 | #define DST_RCDISC_MOD__VP (*(node->input[8])) | |
| 940 | #define DST_RCDISC_MOD__IN1 (*(node->input[0])) | |
| 941 | #define DST_RCDISC_MOD__IN2 (*(node->input[1])) | |
| 942 | #define DST_RCDISC_MOD__R1 (*(node->input[2])) | |
| 943 | #define DST_RCDISC_MOD__R2 (*(node->input[3])) | |
| 944 | #define DST_RCDISC_MOD__R3 (*(node->input[4])) | |
| 945 | #define DST_RCDISC_MOD__R4 (*(node->input[5])) | |
| 946 | #define DST_RCDISC_MOD__C (*(node->input[6])) | |
| 947 | #define DST_RCDISC_MOD__VP (*(node->input[7])) | |
| 1060 | 948 | |
| 1061 | 949 | static void dst_rcdisc_mod_step(node_description *node) |
| 1062 | 950 | { |
| 1063 | struct dst_rcdisc_context *context = node->context; | |
| 951 | struct dst_rcdisc_mod_context *context = node->context; | |
| 1064 | 952 | |
| 1065 | double diff, Rc, Rc2, vCap, u, vD=0.0; | |
| 953 | double diff, v_cap, u, vD; | |
| 954 | int mod_state, mod1_state, mod2_state; | |
| 1066 | 955 | |
| 1067 | 956 | /* Exponential based in difference between input/output */ |
| 1068 | v | |
| 957 | v_cap = context->v_cap; | |
| 1069 | 958 | |
| 1070 | if(DST_RCDISC_MOD__ENABLE) | |
| 959 | mod1_state = DST_RCDISC_MOD__IN1 > 0.5; | |
| 960 | mod2_state = DST_RCDISC_MOD__IN2 > 0.6; | |
| 961 | mod_state = (mod2_state << 1) + mod1_state; | |
| 962 | ||
| 963 | u = mod1_state ? 0 : DST_RCDISC_MOD__VP; | |
| 964 | /* Clamp */ | |
| 965 | diff = u - v_cap; | |
| 966 | vD = diff * context->vd_gain[mod_state]; | |
| 967 | if (vD < -0.6) | |
| 1071 | 968 | { |
| 1072 | Rc = (DST_RCDISC_MOD__IN1 > 0.5) ? DST_RCDISC_MOD__R2 : DST_RCDISC_MOD__R1 + DST_RCDISC_MOD__R2; | |
| 1073 | if (Rc < 1.0) | |
| 1074 | Rc = 1.0; | |
| 1075 | u = (DST_RCDISC_MOD__IN1 > 0.5) ? 0 : DST_RCDISC_MOD__VP; | |
| 1076 | Rc2 = (DST_RCDISC_MOD__IN2 > 0.6) ? (DST_RCDISC_MOD__R3 * DST_RCDISC_MOD__R4 / (DST_RCDISC_MOD__R3 + DST_RCDISC_MOD__R4)) : DST_RCDISC_MOD__R4; | |
| 1077 | /* Clamp */ | |
| 1078 | diff = u - vCap; | |
| 1079 | vD = diff * Rc2 / (Rc + Rc2); | |
| 1080 | if (vD < -0.6) | |
| 1081 | { | |
| 1082 | Rc2 = 0; | |
| 1083 | diff = u + 0.6 - vCap; | |
| 1084 | diff = diff - (diff * exp(0.0 - discrete_current_context->sample_time / (DST_RCDISC_MOD__C * Rc))); | |
| 1085 | vCap += diff; | |
| 1086 | node->output[0] = (DST_RCDISC_MOD__IN2 <= 0.6) ? -0.6 : 0; | |
| 1087 | } | |
| 1088 | else | |
| 1089 | { | |
| 1090 | diff = diff - (diff * exp(0.0-discrete_current_context->sample_time / (DST_RCDISC_MOD__C*(Rc+Rc2)))); | |
| 1091 | vCap += diff; | |
| 1092 | /* neglecting current through R3 drawn by next node */ | |
| 1093 | node->output[0] = (DST_RCDISC_MOD__IN2 <= 0.6) ? (u - vCap) * DST_RCDISC_MOD__R4 / (DST_RCDISC_MOD__R4 + Rc) : 0; | |
| 1094 | } | |
| 1095 | context->vCap = vCap; | |
| 969 | diff = u + 0.6 - v_cap; | |
| 970 | diff -= diff * context->exp_low[mod1_state]; | |
| 971 | v_cap += diff; | |
| 972 | node->output[0] = mod2_state ? 0 : -0.6; | |
| 1096 | 973 | } |
| 1097 | 974 | else |
| 1098 | 975 | { |
| 1099 | node->output[0] = 0; | |
| 976 | diff -= diff * context->exp_high[mod_state]; | |
| 977 | v_cap += diff; | |
| 978 | /* neglecting current through R3 drawn by next8 node */ | |
| 979 | node->output[0] = mod2_state ? 0: (u - v_cap) * context->gain[mod1_state]; | |
| 1100 | 980 | } |
| 981 | context->v_cap = v_cap; | |
| 1101 | 982 | } |
| 1102 | 983 | |
| 1103 | 984 | static void dst_rcdisc_mod_reset(node_description *node) |
| 1104 | 985 | { |
| 1105 | struct dst_rcdisc_context *context = node->context; | |
| 986 | struct dst_rcdisc_mod_context *context = node->context; | |
| 1106 | 987 | |
| 988 | double rc[2], rc2[2]; | |
| 989 | double neg_dt = 0.0 - discrete_current_context->sample_time; | |
| 990 | ||
| 991 | /* pre-calculate fixed values */ | |
| 992 | /* DST_RCDISC_MOD__IN1 <= 0.5 */ | |
| 993 | rc[0] = DST_RCDISC_MOD__R1 + DST_RCDISC_MOD__R2; | |
| 994 | if (rc[0] < 1) rc[0] = 1; | |
| 995 | context->exp_low[0] = exp(neg_dt / (DST_RCDISC_MOD__C * rc[0])); | |
| 996 | context->gain[0] = RES_VOLTAGE_DIVIDER(rc[0], DST_RCDISC_MOD__R4); | |
| 997 | /* DST_RCDISC_MOD__IN1 > 0.5 */ | |
| 998 | rc[1] = DST_RCDISC_MOD__R2; | |
| 999 | if (rc[1] < 1) rc[1] = 1; | |
| 1000 | context->exp_low[1] = exp(neg_dt / (DST_RCDISC_MOD__C * rc[1])); | |
| 1001 | context->gain[1] = RES_VOLTAGE_DIVIDER(rc[1], DST_RCDISC_MOD__R4); | |
| 1002 | /* DST_RCDISC_MOD__IN2 <= 0.6 */ | |
| 1003 | rc2[0] = DST_RCDISC_MOD__R4; | |
| 1004 | /* DST_RCDISC_MOD__IN2 > 0.6 */ | |
| 1005 | rc2[1] = DST_RCDISC_MOD__R3 * DST_RCDISC_MOD__R4 / (DST_RCDISC_MOD__R3 + DST_RCDISC_MOD__R4); | |
| 1006 | /* DST_RCDISC_MOD__IN1 <= 0.5 && DST_RCDISC_MOD__IN2 <= 0.6 */ | |
| 1007 | context->exp_high[0] = exp(neg_dt / (DST_RCDISC_MOD__C * (rc[0] + rc2[0]))); | |
| 1008 | context->vd_gain[0] = RES_VOLTAGE_DIVIDER(rc[0], rc2[0]); | |
| 1009 | /* DST_RCDISC_MOD__IN1 > 0.5 && DST_RCDISC_MOD__IN2 <= 0.6 */ | |
| 1010 | context->exp_high[1] = exp(neg_dt / (DST_RCDISC_MOD__C * (rc[1] + rc2[0]))); | |
| 1011 | context->vd_gain[1] = RES_VOLTAGE_DIVIDER(rc[1], rc2[0]); | |
| 1012 | /* DST_RCDISC_MOD__IN1 <= 0.5 && DST_RCDISC_MOD__IN2 > 0.6 */ | |
| 1013 | context->exp_high[2] = exp(neg_dt / (DST_RCDISC_MOD__C * (rc[0] + rc2[1]))); | |
| 1014 | context->vd_gain[2] = RES_VOLTAGE_DIVIDER(rc[0], rc2[1]); | |
| 1015 | /* DST_RCDISC_MOD__IN1 > 0.5 && DST_RCDISC_MOD__IN2 > 0.6 */ | |
| 1016 | context->exp_high[3] = exp(neg_dt / (DST_RCDISC_MOD__C * (rc[1] + rc2[1]))); | |
| 1017 | context->vd_gain[3] = RES_VOLTAGE_DIVIDER(rc[1], rc2[1]); | |
| 1018 | ||
| 1019 | context->v_cap = 0; | |
| 1107 | 1020 | node->output[0] = 0; |
| 1108 | context->vCap = 0; | |
| 1109 | 1021 | } |
| 1110 | 1022 | |
| 1111 | 1023 | /************************************************************************ |
| r3171 | r3172 | |
| 1219 | 1131 | node->output[0] = 0; |
| 1220 | 1132 | } |
| 1221 | 1133 | |
| 1134 | ||
| 1135 | /************************************************************************ | |
| 1136 | * | |
| 1137 | * DST_RCINTEGRATE - Two diode inputs, transistor and a R/C charge | |
| 1138 | * discharge network | |
| 1139 | * | |
| 1140 | * input[0] - Enable input value | |
| 1141 | * input[1] - input value 1 | |
| 1142 | * input[2] - input value 2 | |
| 1143 | * input[3] - Resistor 1 value (initialization only) | |
| 1144 | * input[4] - Resistor 2 value (initialization only) | |
| 1145 | * input[5] - Capacitor Value (initialization only) | |
| 1146 | * | |
| 1147 | ************************************************************************/ | |
| 1148 | #define DST_RCINTEGRATE__IN1 (*(node->input[0])) | |
| 1149 | #define DST_RCINTEGRATE__R1 (*(node->input[1])) | |
| 1150 | #define DST_RCINTEGRATE__R2 (*(node->input[2])) | |
| 1151 | #define DST_RCINTEGRATE__R3 (*(node->input[3])) | |
| 1152 | #define DST_RCINTEGRATE__C (*(node->input[4])) | |
| 1153 | #define DST_RCINTEGRATE__VP (*(node->input[5])) | |
| 1154 | #define DST_RCINTEGRATE__TYPE (*(node->input[6])) | |
| 1155 | ||
| 1156 | /* Ebers-Moll large signal model | |
| 1157 | * Couriersud: | |
| 1158 | * The implementation avoids all iterative approaches in order not to burn cycles | |
| 1159 | * We will calculate Ic from vBE and use this as an indication where to go. | |
| 1160 | * The implementation may oscillate if you change the weighting factors at the | |
| 1161 | * end. | |
| 1162 | * | |
| 1163 | * This implementation is not perfect, but does it's job in dkong' | |
| 1164 | */ | |
| 1165 | ||
| 1166 | /* reverse saturation current */ | |
| 1167 | #define IES 7e-15 | |
| 1168 | #define ALPHAT 0.99 | |
| 1169 | #define KT 0.026 | |
| 1170 | #define EM_IC(x) (ALPHAT * IES * exp( (x) / KT - 1.0 )) | |
| 1171 | ||
| 1172 | static void dst_rcintegrate_step(node_description *node) | |
| 1173 | { | |
| 1174 | struct dst_rcintegrate_context *context = node->context; | |
| 1175 | ||
| 1176 | double diff, u, iQ, iQc, iC, RG, vE; | |
| 1177 | double vP; | |
| 1178 | ||
| 1179 | u = DST_RCINTEGRATE__IN1; | |
| 1180 | vP = DST_RCINTEGRATE__VP; | |
| 1181 | ||
| 1182 | if ( u - 0.7 < context->vCap * context->gain_r1_r2) | |
| 1183 | { | |
| 1184 | /* discharge .... */ | |
| 1185 | diff = 0.0 - context->vCap; | |
| 1186 | iC = 0.0 - context->c_exp1 * diff; /* iC */ | |
| 1187 | diff -= diff * context->exp_exponent1; | |
| 1188 | context->vCap += diff; | |
| 1189 | iQ = 0; | |
| 1190 | vE = context->vCap * context->gain_r1_r2; | |
| 1191 | RG = vE / (-iC); | |
| 1192 | } | |
| 1193 | else | |
| 1194 | { | |
| 1195 | /* charging */ | |
| 1196 | diff = (vP - context->vCE) * context->f - context->vCap; | |
| 1197 | iC = 0.0 - context->c_exp0 * diff; /* iC */ | |
| 1198 | diff -= diff * context->exp_exponent0; | |
| 1199 | context->vCap += diff; | |
| 1200 | iQ = iC + (iC * DST_RCINTEGRATE__R1 + context->vCap) / DST_RCINTEGRATE__R2; | |
| 1201 | RG = (vP - context->vCE) / iQ; | |
| 1202 | vE = (RG - DST_RCINTEGRATE__R3) / RG * (vP - context->vCE); | |
| 1203 | } | |
| 1204 | ||
| 1205 | ||
| 1206 | u = DST_RCINTEGRATE__IN1; | |
| 1207 | if (u > 0.7 + vE) | |
| 1208 | vE = u - 0.7; | |
| 1209 | iQc = EM_IC(u - vE); | |
| 1210 | context->vCE = MIN(vP - 0.1, vP - RG * iQc); | |
| 1211 | ||
| 1212 | /* Avoid oscillations | |
| 1213 | * The method tends to largely overshoot - no wonder without | |
| 1214 | * iterative solution approximation | |
| 1215 | */ | |
| 1216 | ||
| 1217 | context->vCE = MAX(context->vCE, 0.1 ); | |
| 1218 | context->vCE = 0.1 * context->vCE + 0.9 * (vP - vE - iQ * DST_RCINTEGRATE__R3); | |
| 1219 | ||
| 1220 | switch (context->type) | |
| 1221 | { | |
| 1222 | case DISC_RC_INTEGRATE_TYPE1: | |
| 1223 | node->output[0] = context->vCap; | |
| 1224 | break; | |
| 1225 | case DISC_RC_INTEGRATE_TYPE2: | |
| 1226 | node->output[0] = vE; | |
| 1227 | break; | |
| 1228 | case DISC_RC_INTEGRATE_TYPE3: | |
| 1229 | node->output[0] = MAX(0, vP - iQ * DST_RCINTEGRATE__R3); | |
| 1230 | break; | |
| 1231 | } | |
| 1232 | } | |
| 1233 | static void dst_rcintegrate_reset(node_description *node) | |
| 1234 | { | |
| 1235 | struct dst_rcintegrate_context *context = node->context; | |
| 1236 | ||
| 1237 | double r; | |
| 1238 | double dt = discrete_current_context->sample_time; | |
| 1239 | ||
| 1240 | context->type = DST_RCINTEGRATE__TYPE; | |
| 1241 | ||
| 1242 | context->vCap = 0; | |
| 1243 | context->vCE = 0; | |
| 1244 | ||
| 1245 | /* pre-calculate fixed values */ | |
| 1246 | context->gain_r1_r2 = RES_VOLTAGE_DIVIDER(DST_RCINTEGRATE__R1, DST_RCINTEGRATE__R2); | |
| 1247 | ||
| 1248 | r = DST_RCINTEGRATE__R1 / DST_RCINTEGRATE__R2 * DST_RCINTEGRATE__R3 + DST_RCINTEGRATE__R1 + DST_RCINTEGRATE__R3; | |
| 1249 | ||
| 1250 | context->f = RES_VOLTAGE_DIVIDER(DST_RCINTEGRATE__R3, DST_RCINTEGRATE__R2); | |
| 1251 | context->exponent0 = -1.0 * r * context->f * DST_RCINTEGRATE__C; | |
| 1252 | context->exponent1 = -1.0 * (DST_RCINTEGRATE__R1 + DST_RCINTEGRATE__R2) * DST_RCINTEGRATE__C; | |
| 1253 | context->exp_exponent0 = exp(dt / context->exponent0); | |
| 1254 | context->exp_exponent1 = exp(dt / context->exponent1); | |
| 1255 | context->c_exp0 = DST_RCINTEGRATE__C / context->exponent0 * context->exp_exponent0; | |
| 1256 | context->c_exp1 = DST_RCINTEGRATE__C / context->exponent1 * context->exp_exponent1; | |
| 1257 | ||
| 1258 | node->output[0] = 0; | |
| 1259 | } | |
| 1260 | ||
| 1261 | ||
| 1222 | 1262 | /* !!!!!!!!!!! NEW FILTERS for testing !!!!!!!!!!!!!!!!!!!!! */ |
| 1223 | 1263 | |
| 1224 | 1264 |
| r3171 | r3172 | |
|---|---|---|
| 799 | 799 | } |
| 800 | 800 | } |
| 801 | 801 | |
| 802 | /********************************************************************************/ | |
| 803 | 802 | |
| 804 | WRITE8_HANDLER( snkwave_w ) | |
| 805 | { | |
| 806 | struct namco_sound *chip = sndti_token(SOUND_NAMCO, 0); | |
| 807 | static int freq0 = 0xff; | |
| 808 | sound_channel *voice = chip->channel_list; | |
| 809 | if( offset==0 ) freq0 = data; | |
| 810 | if( offset==1 ) | |
| 811 | { | |
| 812 | stream_update(chip->stream); | |
| 813 | if( data==0xff || freq0==0 ) | |
| 814 | { | |
| 815 | voice->volume[0] = 0x0; | |
| 816 | } | |
| 817 | else | |
| 818 | { | |
| 819 | voice->volume[0] = 0x8; | |
| 820 | voice->frequency = (data<<16)/freq0; | |
| 821 | } | |
| 822 | } | |
| 823 | } | |
| 824 | 803 | |
| 825 | 804 | |
| 826 | ||
| 827 | ||
| 828 | 805 | /************************************************************************** |
| 829 | 806 | * Generic get_info |
| 830 | 807 | **************************************************************************/ |
| r3171 | r3172 | |
|---|---|---|
| 10 | 10 | int stereo; /* set to 1 to indicate stereo (e.g., System 1) */ |
| 11 | 11 | }; |
| 12 | 12 | |
| 13 | WRITE8_HANDLER( snkwave_w ); | |
| 14 | ||
| 15 | 13 | WRITE8_HANDLER( pacman_sound_enable_w ); |
| 16 | 14 | WRITE8_HANDLER( pacman_sound_w ); |
| 17 | 15 |
| r3171 | r3172 | |
|---|---|---|
| 106 | 106 | void namco_52xx_get_info(void *token, UINT32 state, sndinfo *info); |
| 107 | 107 | void namco_63701x_get_info(void *token, UINT32 state, sndinfo *info); |
| 108 | 108 | void namcona_get_info(void *token, UINT32 state, sndinfo *info); |
| 109 | void snkwave_get_info(void *token, UINT32 state, sndinfo *info); | |
| 109 | 110 | void tms36xx_get_info(void *token, UINT32 state, sndinfo *info); |
| 110 | 111 | void tms3615_get_info(void *token, UINT32 state, sndinfo *info); |
| 111 | 112 | void tms5100_get_info(void *token, UINT32 state, sndinfo *info); |
| r3171 | r3172 | |
| 291 | 292 | #if (HAS_NAMCONA) |
| 292 | 293 | { SOUND_NAMCONA, namcona_get_info }, |
| 293 | 294 | #endif |
| 295 | #if (HAS_SNKWAVE) | |
| 296 | { SOUND_SNKWAVE, snkwave_get_info }, | |
| 297 | #endif | |
| 294 | 298 | #if (HAS_TMS36XX) |
| 295 | 299 | { SOUND_TMS36XX, tms36xx_get_info }, |
| 296 | 300 | #endif |
| r3171 | r3172 | |
|---|---|---|
| 15 | 15 | #define __DEBUGGER_H__ |
| 16 | 16 | |
| 17 | 17 | #include "mame.h" |
| 18 | #include "deprecat.h" | |
| 19 | 18 | #include "debug/debugcpu.h" |
| 20 | 19 | |
| 21 | 20 |
| r3171 | r3172 | |
|---|---|---|
| 70 | 70 | SOUND_NAMCO_52XX, |
| 71 | 71 | SOUND_NAMCO_63701X, |
| 72 | 72 | SOUND_NAMCONA, |
| 73 | SOUND_SNKWAVE, | |
| 73 | 74 | SOUND_TMS36XX, |
| 74 | 75 | SOUND_TMS3615, |
| 75 | 76 | SOUND_TMS5100, |
| r3171 | r3172 | |
|---|---|---|
| 65 | 65 | XTAL_7MHz = 7000000, /* Jaleco Mega System PCBs */ |
| 66 | 66 | XTAL_7_15909MHz = 7159090, /* Blood Bros */ |
| 67 | 67 | XTAL_7_3728MHz = 7372800, |
| 68 | XTAL_7_8643MHz = 7864300, /* Used on InterFlip games as video clock */ | |
| 68 | 69 | XTAL_8MHz = 8000000, /* Extremely common, used on 100's of PCBs */ |
| 69 | 70 | XTAL_8_664MHz = 8664000, /* Touchmaster */ |
| 70 | 71 | XTAL_9_987MHz = 9987000, /* Crazy Balloon */ |
| r3171 | r3172 | |
|---|---|---|
| 92 | 92 | READ8_HANDLER ( mbee_pio_r ) |
| 93 | 93 | { |
| 94 | 94 | UINT8 data=0; |
| 95 | if (offset == 0) return z80pio_d_r(0,0); | |
| 95 | if (offset == 0) return z80pio_d_r(machine,0,0); | |
| 96 | 96 | if (offset == 1) return z80pio_c_r(0,0); |
| 97 | 97 | if (offset == 3) return z80pio_c_r(0,1); |
| 98 | data = z80pio_d_r(0,1) | 1; | |
| 98 | data = z80pio_d_r(machine,0,1) | 1; | |
| 99 | 99 | if (cassette_input(cassette_device_image()) > 0.03) |
| 100 | 100 | data &= ~1; |
| 101 | 101 | return data; |
| r3171 | r3172 | |
| 103 | 103 | |
| 104 | 104 | WRITE8_HANDLER ( mbee_pio_w ) |
| 105 | 105 | { |
| 106 | if (offset == 0) z80pio_d_w(0,0,data); | |
| 107 | if (offset == 1) z80pio_c_w(0,0,data); | |
| 108 | if (offset == 3) z80pio_c_w(0,1,data); | |
| 106 | if (offset == 0) z80pio_d_w(machine, 0,0,data); | |
| 107 | if (offset == 1) z80pio_c_w(machine, 0,0,data); | |
| 108 | if (offset == 3) z80pio_c_w(machine, 0,1,data); | |
| 109 | 109 | |
| 110 | 110 | if( offset == 2 ) |
| 111 | 111 | { |
| 112 | z80pio_d_w(0,1,data); | |
| 113 | data = z80pio_p_r(0,1); | |
| 112 | z80pio_d_w(machine, 0,1,data); | |
| 113 | data = z80pio_p_r(machine,0,1); | |
| 114 | 114 | cassette_output(cassette_device_image(), (data & 0x02) ? -1.0 : +1.0); |
| 115 | 115 | speaker_level_w(0, (data & 0x40) ? 1 : 0); |
| 116 | 116 | } |
| r3171 | r3172 | |
| 171 | 171 | INTERRUPT_GEN( mbee_interrupt ) |
| 172 | 172 | { |
| 173 | 173 | /* once per frame, pulse the PIO B bit 7 */ |
| 174 | z80pio_p_w(0, 1, 0x80); | |
| 175 | z80pio_p_w(0, 1, 0x00); | |
| 174 | z80pio_p_w(machine, 0, 1, 0x80); | |
| 175 | z80pio_p_w(machine, 0, 1, 0x00); | |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | DEVICE_IMAGE_LOAD( mbee_cart ) |
| r3171 | r3172 | |
|---|---|---|
| 410 | 410 | bit = 1; |
| 411 | 411 | |
| 412 | 412 | /* update astb with bit */ |
| 413 | z80pio_astb_w(0,bit & kc_ardy); | |
| 413 | z80pio_astb_w(machine,0,bit & kc_ardy); | |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | static void kc_cassette_init(void) |
| r3171 | r3172 | |
| 865 | 865 | LOG_KBD(("kc keyboard sending pulse: %02x\n",pulse_state)); |
| 866 | 866 | |
| 867 | 867 | /* set pulse */ |
| 868 | z80pio_bstb_w(0,pulse_state & kc_brdy); | |
| 868 | z80pio_bstb_w(machine,0,pulse_state & kc_brdy); | |
| 869 | 869 | |
| 870 | 870 | /* update counts */ |
| 871 | 871 | keyboard_data.transmit_pulse_count_remaining--; |
| r3171 | r3172 | |
| 920 | 920 | keyboard_data.transmit_pulse_count = 0; |
| 921 | 921 | |
| 922 | 922 | /* set initial state */ |
| 923 | z80pio_bstb_w(0,0); | |
| 923 | z80pio_bstb_w(machine,0,0); | |
| 924 | 924 | |
| 925 | 925 | |
| 926 | 926 | for (i=0; i<KC_KEYBOARD_NUM_LINES-1; i++) |
| r3171 | r3172 | |
| 1377 | 1377 | WRITE8_HANDLER ( kc85_4_pio_data_w ) |
| 1378 | 1378 | { |
| 1379 | 1379 | kc85_pio_data[offset] = data; |
| 1380 | z80pio_d_w(0, offset, data); | |
| 1380 | z80pio_d_w(machine, 0, offset, data); | |
| 1381 | 1381 | |
| 1382 | 1382 | switch (offset) |
| 1383 | 1383 | { |
| r3171 | r3172 | |
| 1619 | 1619 | WRITE8_HANDLER ( kc85_3_pio_data_w ) |
| 1620 | 1620 | { |
| 1621 | 1621 | kc85_pio_data[offset] = data; |
| 1622 | z80pio_d_w(0, offset, data); | |
| 1622 | z80pio_d_w(machine, 0, offset, data); | |
| 1623 | 1623 | |
| 1624 | 1624 | switch (offset) |
| 1625 | 1625 | { |
| r3171 | r3172 | |
| 1693 | 1693 | |
| 1694 | 1694 | READ8_HANDLER ( kc85_pio_data_r ) |
| 1695 | 1695 | { |
| 1696 | return z80pio_d_r(0,offset); | |
| 1696 | return z80pio_d_r(machine,0,offset); | |
| 1697 | 1697 | } |
| 1698 | 1698 | |
| 1699 | 1699 | READ8_HANDLER ( kc85_pio_control_r ) |
| r3171 | r3172 | |
| 1705 | 1705 | |
| 1706 | 1706 | WRITE8_HANDLER ( kc85_pio_control_w ) |
| 1707 | 1707 | { |
| 1708 | z80pio_c_w(0, offset, data); | |
| 1708 | z80pio_c_w(machine, 0, offset, data); | |
| 1709 | 1709 | } |
| 1710 | 1710 | |
| 1711 | 1711 |
| r3171 | r3172 | |
|---|---|---|
| 271 | 271 | #SOUNDS += NAMCO_52XX |
| 272 | 272 | #SOUNDS += NAMCO_63701X |
| 273 | 273 | #SOUNDS += NAMCONA |
| 274 | #SOUNDS += SNKWAVE | |
| 274 | 275 | #SOUNDS += C140 |
| 275 | 276 | #SOUNDS += C352 |
| 276 | 277 | #SOUNDS += TMS36XX |
| r3171 | r3172 | |
| 383 | 384 | $(MESSOBJ)/glasgow.a \ |
| 384 | 385 | $(MESSOBJ)/gmaster.a \ |
| 385 | 386 | $(MESSOBJ)/grundy.a \ |
| 387 | $(MESSOBJ)/homelab.a \ | |
| 386 | 388 | $(MESSOBJ)/hp48.a \ |
| 387 | $(MESSOBJ)/homelab.a \ | |
| 388 | 389 | $(MESSOBJ)/intv.a \ |
| 389 | 390 | $(MESSOBJ)/jupiter.a \ |
| 390 | 391 | $(MESSOBJ)/kaypro.a \ |
| r3171 | r3172 | |
|---|---|---|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | if (keycode) |
| 210 | z80pio_p_w( 0, 0, keycode | 0x80 ); | |
| 210 | z80pio_p_w( machine, 0, 0, keycode | 0x80 ); | |
| 211 | 211 | else |
| 212 | z80pio_p_w( 0, 0, 0 ); | |
| 212 | z80pio_p_w( machine, 0, 0, 0 ); | |
| 213 | 213 | |
| 214 | 214 | if (keycode != keylatch) program_write_byte(0xfdf5, 0x80); |
| 215 | 215 | |
| r3171 | r3172 | |
| 223 | 223 | switch (offset) |
| 224 | 224 | { |
| 225 | 225 | case 0: |
| 226 | return z80pio_d_r(0, 0); | |
| 226 | return z80pio_d_r(machine, 0, 0); | |
| 227 | 227 | case 1: |
| 228 | 228 | return z80pio_c_r(0, 0); |
| 229 | 229 | case 2: |
| 230 | return z80pio_d_r(0, 1); | |
| 230 | return z80pio_d_r(machine, 0, 1); | |
| 231 | 231 | case 3: |
| 232 | 232 | return z80pio_c_r(0, 1); |
| 233 | 233 | } |
| r3171 | r3172 | |
| 240 | 240 | switch (offset) |
| 241 | 241 | { |
| 242 | 242 | case 0: |
| 243 | z80pio_d_w(0, 0, data); | |
| 243 | z80pio_d_w(machine, 0, 0, data); | |
| 244 | 244 | break; |
| 245 | 245 | case 1: |
| 246 | z80pio_c_w(0, 0, data); | |
| 246 | z80pio_c_w(machine, 0, 0, data); | |
| 247 | 247 | break; |
| 248 | 248 | case 2: |
| 249 | z80pio_d_w(0, 1, data); | |
| 249 | z80pio_d_w(machine, 0, 1, data); | |
| 250 | 250 | break; |
| 251 | 251 | case 3: |
| 252 | z80pio_c_w(0, 1, data); | |
| 252 | z80pio_c_w(machine, 0, 1, data); | |
| 253 | 253 | break; |
| 254 | 254 | } |
| 255 | 255 | } |
| r3171 | r3172 | |
|---|---|---|
| 401 | 401 | |
| 402 | 402 | static TIMER_CALLBACK( super80_timer ) |
| 403 | 403 | { |
| 404 | UINT8 cass_ws=0, i, mask=1, out_f8=z80pio_p_r(0,0), in_fa=255; | |
| 404 | UINT8 cass_ws=0, i, mask=1, out_f8=z80pio_p_r(machine,0,0), in_fa=255; | |
| 405 | 405 | static const char *keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7" }; |
| 406 | 406 | |
| 407 | 407 | for ( i=0; i < 8;i++) |
| r3171 | r3172 | |
| 410 | 410 | mask<<=1; |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | z80pio_p_w(0,1,in_fa); | |
| 413 | z80pio_p_w(machine,0,1,in_fa); | |
| 414 | 414 | |
| 415 | 415 | cass_data[1]++; |
| 416 | 416 | cass_ws = (cassette_input(cassette_device_image()) > +0.03) ? 4 : 0; |
| r3171 | r3172 | |
| 501 | 501 | current_charset = data & 1; |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | static READ8_HANDLER( super80_f8_r ) { return z80pio_d_r (0,0); } | |
| 504 | static READ8_HANDLER( super80_f8_r ) { return z80pio_d_r (machine,0,0); } | |
| 505 | 505 | static READ8_HANDLER( super80_f9_r ) { return z80pio_c_r (0,0); } |
| 506 | static READ8_HANDLER( super80_fa_r ) { return z80pio_d_r (0,1); } | |
| 506 | static READ8_HANDLER( super80_fa_r ) { return z80pio_d_r (machine,0,1); } | |
| 507 | 507 | static READ8_HANDLER( super80_fb_r ) { return z80pio_c_r (0,1); } |
| 508 | static WRITE8_HANDLER( super80_f8_w ) { z80pio_d_w(0,0, data); } | |
| 509 | static WRITE8_HANDLER( super80_f9_w ) { z80pio_c_w(0,0, data); } | |
| 510 | static WRITE8_HANDLER( super80_fa_w ) { z80pio_d_w(0,1, data); } | |
| 511 | static WRITE8_HANDLER( super80_fb_w ) { z80pio_c_w(0,1, data); } | |
| 508 | static WRITE8_HANDLER( super80_f8_w ) { z80pio_d_w(machine, 0,0, data); } | |
| 509 | static WRITE8_HANDLER( super80_f9_w ) { z80pio_c_w(machine, 0,0, data); } | |
| 510 | static WRITE8_HANDLER( super80_fa_w ) { z80pio_d_w(machine, 0,1, data); } | |
| 511 | static WRITE8_HANDLER( super80_fb_w ) { z80pio_c_w(machine, 0,1, data); } | |
| 512 | 512 | |
| 513 | 513 | /**************************** MEMORY AND I/O MAPPINGS *****************************************************************/ |
| 514 | 514 |
| r3171 | r3172 | |
|---|---|---|
| 179 | 179 | switch (offset) |
| 180 | 180 | { |
| 181 | 181 | case 0: |
| 182 | return z80sio_d_r(0, 0); | |
| 182 | return z80sio_d_r(machine, 0, 0); | |
| 183 | 183 | case 1: |
| 184 | 184 | return z80sio_c_r(0, 0); |
| 185 | 185 | case 2: |
| 186 | return z80sio_d_r(0, 1); | |
| 186 | return z80sio_d_r(machine, 0, 1); | |
| 187 | 187 | case 3: |
| 188 | 188 | return z80sio_c_r(0, 1); |
| 189 | 189 | } |
| r3171 | r3172 | |
| 196 | 196 | switch (offset) |
| 197 | 197 | { |
| 198 | 198 | case 0: |
| 199 | z80sio_d_w(0, 0, data); | |
| 199 | z80sio_d_w(machine, 0, 0, data); | |
| 200 | 200 | break; |
| 201 | 201 | case 1: |
| 202 | z80sio_c_w(0, 0, data); | |
| 202 | z80sio_c_w(machine, 0, 0, data); | |
| 203 | 203 | break; |
| 204 | 204 | case 2: |
| 205 | z80sio_d_w(0, 1, data); | |
| 205 | z80sio_d_w(machine, 0, 1, data); | |
| 206 | 206 | break; |
| 207 | 207 | case 3: |
| 208 | z80sio_c_w(0, 1, data); | |
| 208 | z80sio_c_w(machine, 0, 1, data); | |
| 209 | 209 | break; |
| 210 | 210 | } |
| 211 | 211 | } |
| r3171 | r3172 | |
|---|---|---|
| 653 | 653 | break; |
| 654 | 654 | } |
| 655 | 655 | |
| 656 | z80pio_d_w( 0, (offset>>1) & 0x01,data); | |
| 656 | z80pio_d_w( machine, 0, (offset>>1) & 0x01,data); | |
| 657 | 657 | return; |
| 658 | 658 | } |
| 659 | 659 | |
| 660 | z80pio_c_w( 0, (offset>>1) & 0x01,data); | |
| 660 | z80pio_c_w( machine, 0, (offset>>1) & 0x01,data); | |
| 661 | 661 | } |
| 662 | 662 | |
| 663 | 663 | static READ8_HANDLER(einstein_pio_r) |
| r3171 | r3172 | |
| 666 | 666 | |
| 667 | 667 | if ((offset & 0x01)==0) |
| 668 | 668 | { |
| 669 | return z80pio_d_r( 0, (offset>>1) & 0x01); | |
| 669 | return z80pio_d_r( machine, 0, (offset>>1) & 0x01); | |
| 670 | 670 | } |
| 671 | 671 | |
| 672 | 672 | return z80pio_c_r( 0, (offset>>1) & 0x01); |
| r3171 | r3172 | |
| 1368 | 1368 | if (data & CENTRONICS_ACKNOWLEDGE) |
| 1369 | 1369 | { |
| 1370 | 1370 | /* /ack into /astb */ |
| 1371 | z80pio_astb_w(0, 0); | |
| 1371 | z80pio_astb_w(Machine, 0, 0); | |
| 1372 | 1372 | } |
| 1373 | 1373 | else |
| 1374 | 1374 | { |
| 1375 | z80pio_astb_w(0, 1); | |
| 1375 | z80pio_astb_w(Machine, 0, 1); | |
| 1376 | 1376 | } |
| 1377 | 1377 | } |
| 1378 | 1378 | } |
| r3171 | r3172 | |
|---|---|---|
| 29 | 29 | enum |
| 30 | 30 | { |
| 31 | 31 | CMD_SCAN_REVERSE, |
| 32 | CMD_SCAN_REVERSE_END, | |
| 33 | 32 | CMD_STEP_REVERSE, |
| 34 | 33 | CMD_SCAN_FORWARD, |
| 35 | CMD_SCAN_FORWARD_END, | |
| 36 | 34 | CMD_STEP_FORWARD, |
| 37 | 35 | CMD_PLAY, |
| 38 | 36 | CMD_PAUSE, |
| r3171 | r3172 | |
| 96 | 94 | int number; |
| 97 | 95 | |
| 98 | 96 | /* scan/step backwards */ |
| 99 | if ( | |
| 97 | if (p | |
| 100 | 98 | { |
| 101 | if ( | |
| 99 | if (co | |
| 102 | 100 | (*execute_command)(laserdisc, CMD_SCAN_REVERSE); |
| 103 | else | |
| 104 | (*execute_command)(laserdisc, CMD_STEP_REVERSE); | |
| 105 | 101 | } |
| 106 | else | |
| 102 | else | |
| 107 | 103 | { |
| 108 | if (playing) | |
| 109 | (*execute_command)(laserdisc, CMD_SCAN_REVERSE_END); | |
| 104 | if (!(last_controls & 0x01) && (controls & 0x01)) | |
| 105 | (*execute_command)(laserdisc, CMD_STEP_REVERSE); | |
| 110 | 106 | } |
| 111 | 107 | |
| 112 | 108 | /* scan/step forwards */ |
| 113 | if ( | |
| 109 | if (p | |
| 114 | 110 | { |
| 115 | if ( | |
| 111 | if (co | |
| 116 | 112 | (*execute_command)(laserdisc, CMD_SCAN_FORWARD); |
| 117 | else | |
| 118 | (*execute_command)(laserdisc, CMD_STEP_FORWARD); | |
| 119 | 113 | } |
| 120 | else | |
| 114 | else | |
| 121 | 115 | { |
| 122 | if (playing) | |
| 123 | (*execute_command)(laserdisc, CMD_SCAN_FORWARD_END); | |
| 116 | if (!(last_controls & 0x02) && (controls & 0x02)) | |
| 117 | (*execute_command)(laserdisc, CMD_STEP_FORWARD); | |
| 124 | 118 | } |
| 125 | 119 | |
| 126 | 120 | /* play/pause */ |
| r3171 | r3172 | |
| 158 | 152 | |
| 159 | 153 | /* handle commands */ |
| 160 | 154 | if (!param) |
| 155 | { | |
| 161 | 156 | process_commands(laserdisc); |
| 162 | 157 | |
| 163 | /* update the laserdisc */ | |
| 164 | laserdisc_vsync(laserdisc); | |
| 158 | /* update the laserdisc */ | |
| 159 | laserdisc_vsync(laserdisc); | |
| 160 | } | |
| 165 | 161 | |
| 166 | 162 | /* set a timer to go off on the next VBLANK */ |
| 167 | 163 | vblank_scanline = video_screen_get_visible_area(machine->primary_screen)->max_y + 1; |
| r3171 | r3172 | |
| 279 | 275 | switch (command) |
| 280 | 276 | { |
| 281 | 277 | case CMD_SCAN_REVERSE: |
| 282 | pr8210_add_command(0x1c); | |
| 283 | playing = TRUE; | |
| 278 | if (pr8210_command_buffer_in == pr8210_command_buffer_out) | |
| 279 | { | |
| 280 | pr8210_add_command(0x1c); | |
| 281 | playing = TRUE; | |
| 282 | } | |
| 284 | 283 | break; |
| 285 | 284 | |
| 286 | case CMD_SCAN_REVERSE_END: | |
| 287 | pr8210_add_command(0x14); | |
| 288 | playing = TRUE; | |
| 289 | break; | |
| 290 | ||
| 291 | 285 | case CMD_STEP_REVERSE: |
| 292 | 286 | pr8210_add_command(0x12); |
| 293 | 287 | playing = FALSE; |
| 294 | 288 | break; |
| 295 | 289 | |
| 296 | 290 | case CMD_SCAN_FORWARD: |
| 297 | pr8210_add_command(0x08); | |
| 298 | playing = TRUE; | |
| 291 | if (pr8210_command_buffer_in == pr8210_command_buffer_out) | |
| 292 | { | |
| 293 | pr8210_add_command(0x08); | |
| 294 | playing = TRUE; | |
| 295 | } | |
| 299 | 296 | break; |
| 300 | 297 | |
| 301 | case CMD_SCAN_FORWARD_END: | |
| 302 | pr8210_add_command(0x14); | |
| 303 | playing = TRUE; | |
| 304 | break; | |
| 305 | ||
| 306 | 298 | case CMD_STEP_FORWARD: |
| 307 | 299 | pr8210_add_command(0x04); |
| 308 | 300 | playing = FALSE; |
| r3171 | r3172 | |
| 369 | 361 | playing = TRUE; |
| 370 | 362 | break; |
| 371 | 363 | |
| 372 | case CMD_SCAN_REVERSE_END: | |
| 373 | laserdisc_data_w(laserdisc, 0xfd); | |
| 374 | playing = TRUE; | |
| 375 | break; | |
| 376 | ||
| 377 | 364 | case CMD_STEP_REVERSE: |
| 378 | 365 | laserdisc_data_w(laserdisc, 0xfe); |
| 379 | 366 | playing = FALSE; |
| r3171 | r3172 | |
| 384 | 371 | playing = TRUE; |
| 385 | 372 | break; |
| 386 | 373 | |
| 387 | case CMD_SCAN_FORWARD_END: | |
| 388 | laserdisc_data_w(laserdisc, 0xfd); | |
| 389 | playing = TRUE; | |
| 390 | break; | |
| 391 | ||
| 392 | 374 | case CMD_STEP_FORWARD: |
| 393 | 375 | laserdisc_data_w(laserdisc, 0xf6); |
| 394 | 376 | playing = FALSE; |
| r3171 | r3172 | |
|---|---|---|
| 6 | 6 | - Primo B32/ Primo B48/ Primo C64 [Miodrag Milanovic] |
| 7 | 7 | - Homelab 2/3/4 [Miodrag Milanovic] |
| 8 | 8 | |
| 9 | ||
| 10 | ||
| 9 | 11 | System Driver Changes: |
| 10 | 12 | ---------------------- |
| 11 | 13 | |
| r3171 | r3172 | |
| 108 | 110 | |
| 109 | 111 | Source Changes: |
| 110 | 112 | ---------------- |
| 111 | - The core is based on MAME 0.127u | |
| 113 | - The core is based on MAME 0.127u2. This incorporates all features of the | |
| 112 | 114 | update to this core. [MAME team] |
| 113 | 115 | |
| 114 | 116 |
| Previous | 15994 Revisions | Next |